diff --git a/.luarc.json b/.luarc.json new file mode 100644 index 00000000..3eb62ffa --- /dev/null +++ b/.luarc.json @@ -0,0 +1,30 @@ +{ + "diagnostics.disable": ["redundant-return-value"], + "workspace.library": ["addons"], + "workspace.ignoreDir": [ + "tools/lua-bindings/olua/examples/lua", + "frameworks/3rd/", + "src/cclua/3rd" + ], + "workspace.ignoreSubmodules": false, + "diagnostics.globals": [ + "DEBUG", + "main", + "api_dir", + "autoconf", + "clang", + "codeblock", + "entry", + "exclude_type", + "headers", + "import", + "luacls", + "luaopen", + "macro", + "olua", + "output_dir", + "typeconf", + "typedef", + "typeonly" + ] +} diff --git a/.vscode/launch.json b/.vscode/launch.json index ebde4908..ee372a2e 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -4,7 +4,20 @@ // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 "version": "0.2.0", "configurations": [ - + { + "type": "lua", + "request": "launch", + "name": "build-binding", + "windows": { + "luaexe": "lua.exe" + }, + "osx": { + "luaexe": "lua" + }, + "stopOnEntry": false, + "cwd": "${workspaceFolder}/tools/lua-bindings", + "program": "build.lua" + }, { "name": "LuaDebug", "program": "", @@ -22,20 +35,5 @@ ] ] }, - { - "type": "LuaHelper-Debug", - "request": "launch", - "name": "LuaPanda", - "description": "通用模式,通常调试项目请选择此模式", - "cwd": "${workspaceFolder}/assets", - "luaFileExtension": "", - "connectionPort": 8818, - "stopOnEntry": true, - "useCHook": true, - "args": ["--workdir", "${workspaceFolder}/assets", "--lua-debug", "luapanda"], - "windows": {"program": "${workspaceFolder}/build/vs-build/bin/cocoslua/Debug/cocoslua.exe"}, - "osx": {"program": "${workspaceFolder}/build/mac-build/bin/cocoslua/Debug/cocoslua.app/Contents/MacOS/cocoslua"}, - "autoPathMode": true - } ] } \ No newline at end of file diff --git a/addons/cclua/box2d/config.json b/addons/cclua/box2d/config.json new file mode 100644 index 00000000..202f1b0b --- /dev/null +++ b/addons/cclua/box2d/config.json @@ -0,0 +1,6 @@ +{ + "$schema": "https://raw.githubusercontent.com/LuaLS/LLS-Addons/main/schemas/addon_config.schema.json", + "words": ["%s+-box2d"], + "files": ["box2d"], + "settings": {} +} \ No newline at end of file diff --git a/addons/cclua/box2d/library/b2/AABB.lua b/addons/cclua/box2d/library/b2/AABB.lua new file mode 100644 index 00000000..f172ac11 --- /dev/null +++ b/addons/cclua/box2d/library/b2/AABB.lua @@ -0,0 +1,53 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta b2.AABB + +---An axis aligned bounding box. +---@class b2.AABB +---@field center b2.Vec2 Get the center of the AABB. +---@field extents b2.Vec2 Get the extents of the AABB (half-widths). +---@field perimeter number Get the perimeter length +---@field valid boolean Verify that the bounds are sorted. +---@field lowerBound b2.Vec2 +---@field upperBound b2.Vec2 +local AABB = {} + +---@return any +function AABB:__gc() end + +---@return any +function AABB:__olua_move() end + +---Combine an AABB into this one. +---@param aabb b2.AABB +--- +---Combine two AABBs into this one. +---@overload fun(self: b2.AABB, aabb1: b2.AABB, aabb2: b2.AABB) +function AABB:combine(aabb) end + +---Does this aabb contain the provided AABB. +---@param aabb b2.AABB +---@return boolean +function AABB:contains(aabb) end + +---Get the center of the AABB. +---@return b2.Vec2 +function AABB:getCenter() end + +---Get the extents of the AABB (half-widths). +---@return b2.Vec2 +function AABB:getExtents() end + +---Get the perimeter length +---@return number +function AABB:getPerimeter() end + +---Verify that the bounds are sorted. +---@return boolean +function AABB:isValid() end + +---@param output b2.RayCastOutput +---@param input b2.RayCastInput +---@return boolean +function AABB:rayCast(output, input) end + +return AABB \ No newline at end of file diff --git a/addons/cclua/box2d/library/b2/Body.lua b/addons/cclua/box2d/library/b2/Body.lua new file mode 100644 index 00000000..0fb1bc4d --- /dev/null +++ b/addons/cclua/box2d/library/b2/Body.lua @@ -0,0 +1,312 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta b2.Body + +---A rigid body. These are created via b2World::CreateBody. +---@class b2.Body +---@field angle number Get the angle in radians. \return the current world rotation angle in radians. +---@field angularDamping number Get the angular damping of the body. +---@field angularVelocity number Get the angular velocity. \return the angular velocity in radians/second. +---@field awake boolean Get the sleeping state of this body. \return true if the body is awake. +---@field bullet boolean Is this body treated like a bullet for continuous collision detection? +---@field contactList b2.ContactEdge Get the list of all contacts attached to this body. \warning this list changes during the time step and you may miss some collisions if you don't use b2ContactListener. +---@field enabled boolean Get the active state of the body. +---@field fixedRotation boolean Does this body have fixed rotation? +---@field fixtureList b2.Fixture Get the list of all fixtures attached to this body. +---@field gravityScale number Get the gravity scale of the body. +---@field inertia number Get the rotational inertia of the body about the local origin. \return the rotational inertia, usually in kg-m^2. +---@field jointList b2.JointEdge Get the list of all joints attached to this body. +---@field linearDamping number Get the linear damping of the body. +---@field linearVelocity b2.Vec2 Get the linear velocity of the center of mass. \return the linear velocity of the center of mass. +---@field localCenter b2.Vec2 Get the local position of the center of mass. +---@field mass number Get the total mass of the body. \return the mass, usually in kilograms (kg). +---@field massData b2.MassData Get the mass data of the body. \return a struct containing the mass, inertia and center of the body. +---@field next b2.Body Get the next body in the world's body list. +---@field position b2.Vec2 Get the world body origin position. \return the world position of the body's origin. +---@field sleepingAllowed boolean Is this body allowed to sleep +---@field type b2.BodyType Get the type of this body. +---@field userData b2.BodyUserData Get the user data pointer that was provided in the body definition. +---@field world b2.World Get the parent world of this body. +---@field worldCenter b2.Vec2 Get the world position of the center of mass. +local Body = {} + +---@return any +function Body:__olua_move() end + +---Apply an angular impulse. +---@param impulse number # the angular impulse in units of kg*m*m/s +---@param wake boolean # also wake up the body +function Body:applyAngularImpulse(impulse, wake) end + +---Apply a force at a world point. If the force is not +---applied at the center of mass, it will generate a torque and +---affect the angular velocity. This wakes up the body. +---@param force b2.Vec2 # the world force vector, usually in Newtons (N). +---@param point b2.Vec2 # the world position of the point of application. +---@param wake boolean # also wake up the body +function Body:applyForce(force, point, wake) end + +---Apply a force to the center of mass. This wakes up the body. +---@param force b2.Vec2 # the world force vector, usually in Newtons (N). +---@param wake boolean # also wake up the body +function Body:applyForceToCenter(force, wake) end + +---Apply an impulse at a point. This immediately modifies the velocity. +---It also modifies the angular velocity if the point of application +---is not at the center of mass. This wakes up the body. +---@param impulse b2.Vec2 # the world impulse vector, usually in N-seconds or kg-m/s. +---@param point b2.Vec2 # the world position of the point of application. +---@param wake boolean # also wake up the body +function Body:applyLinearImpulse(impulse, point, wake) end + +---Apply an impulse to the center of mass. This immediately modifies the velocity. +---@param impulse b2.Vec2 # the world impulse vector, usually in N-seconds or kg-m/s. +---@param wake boolean # also wake up the body +function Body:applyLinearImpulseToCenter(impulse, wake) end + +---Apply a torque. This affects the angular velocity +---without affecting the linear velocity of the center of mass. +---@param torque number # about the z-axis (out of the screen), usually in N-m. +---@param wake boolean # also wake up the body +function Body:applyTorque(torque, wake) end + +---Creates a fixture and attach it to this body. Use this function if you need +---to set some fixture parameters, like friction. Otherwise you can create the +---fixture directly from a shape. +---If the density is non-zero, this function automatically updates the mass of the body. +---Contacts are not created until the next time step. +---@param def b2.FixtureDef # the fixture definition. +---\warning This function is locked during callbacks. +---@return b2.Fixture +--- +---Creates a fixture from a shape and attach it to this body. +---This is a convenience function. Use b2FixtureDef if you need to set parameters +---like friction, restitution, user data, or filtering. +---If the density is non-zero, this function automatically updates the mass of the body. +---\param shape the shape to be cloned. +---\param density the shape density (set to zero for static bodies). +---\warning This function is locked during callbacks. +---@overload fun(self: b2.Body, shape: b2.Shape, density: number): b2.Fixture +function Body:createFixture(def) end + +---Destroy a fixture. This removes the fixture from the broad-phase and +---destroys all contacts associated with this fixture. This will +---automatically adjust the mass of the body if the body is dynamic and the +---fixture has positive density. +---All fixtures attached to a body are implicitly destroyed when the body is destroyed. +---@param fixture b2.Fixture # the fixture to be removed. +---\warning This function is locked during callbacks. +function Body:destroyFixture(fixture) end + +---Dump this body to a file +function Body:dump() end + +---Get the angle in radians. +---@return number # the current world rotation angle in radians. +function Body:getAngle() end + +---Get the angular damping of the body. +---@return number +function Body:getAngularDamping() end + +---Get the angular velocity. +---@return number # the angular velocity in radians/second. +function Body:getAngularVelocity() end + +---Get the list of all contacts attached to this body. +---\warning this list changes during the time step and you may +---miss some collisions if you don't use b2ContactListener. +---@return b2.ContactEdge +function Body:getContactList() end + +---Get the list of all fixtures attached to this body. +---@return b2.Fixture +function Body:getFixtureList() end + +---Get the gravity scale of the body. +---@return number +function Body:getGravityScale() end + +---Get the rotational inertia of the body about the local origin. +---@return number # the rotational inertia, usually in kg-m^2. +function Body:getInertia() end + +---Get the list of all joints attached to this body. +---@return b2.JointEdge +function Body:getJointList() end + +---Get the linear damping of the body. +---@return number +function Body:getLinearDamping() end + +---Get the linear velocity of the center of mass. +---@return b2.Vec2 # the linear velocity of the center of mass. +function Body:getLinearVelocity() end + +---Get the world velocity of a local point. +---@param localPoint b2.Vec2 # a point in local coordinates. +---@return b2.Vec2 # the world velocity of a point. +function Body:getLinearVelocityFromLocalPoint(localPoint) end + +---Get the world linear velocity of a world point attached to this body. +---@param worldPoint b2.Vec2 # a point in world coordinates. +---@return b2.Vec2 # the world velocity of a point. +function Body:getLinearVelocityFromWorldPoint(worldPoint) end + +---Get the local position of the center of mass. +---@return b2.Vec2 +function Body:getLocalCenter() end + +---Gets a local point relative to the body's origin given a world point. +---@param worldPoint b2.Vec2 # a point in world coordinates. +---@return b2.Vec2 # the corresponding local point relative to the body's origin. +function Body:getLocalPoint(worldPoint) end + +---Gets a local vector given a world vector. +---@param worldVector b2.Vec2 # a vector in world coordinates. +---@return b2.Vec2 # the corresponding local vector. +function Body:getLocalVector(worldVector) end + +---Get the total mass of the body. +---@return number # the mass, usually in kilograms (kg). +function Body:getMass() end + +---Get the mass data of the body. +---@return b2.MassData # a struct containing the mass, inertia and center of the body. +function Body:getMassData() end + +---Get the next body in the world's body list. +---@return b2.Body +function Body:getNext() end + +---Get the world body origin position. +---@return b2.Vec2 # the world position of the body's origin. +function Body:getPosition() end + +---Get the body transform for the body's origin. +---@return b2.Transform # the world transform of the body's origin. +function Body:getTransform() end + +---Get the type of this body. +---@return b2.BodyType +function Body:getType() end + +---Get the user data pointer that was provided in the body definition. +---@return b2.BodyUserData +function Body:getUserData() end + +---Get the parent world of this body. +---@return b2.World +function Body:getWorld() end + +---Get the world position of the center of mass. +---@return b2.Vec2 +function Body:getWorldCenter() end + +---Get the world coordinates of a point given the local coordinates. +---@param localPoint b2.Vec2 # a point on the body measured relative the the body's origin. +---@return b2.Vec2 # the same point expressed in world coordinates. +function Body:getWorldPoint(localPoint) end + +---Get the world coordinates of a vector given the local coordinates. +---@param localVector b2.Vec2 # a vector fixed in the body. +---@return b2.Vec2 # the same vector expressed in world coordinates. +function Body:getWorldVector(localVector) end + +---Get the sleeping state of this body. +---@return boolean # true if the body is awake. +function Body:isAwake() end + +---Is this body treated like a bullet for continuous collision detection? +---@return boolean +function Body:isBullet() end + +---Get the active state of the body. +---@return boolean +function Body:isEnabled() end + +---Does this body have fixed rotation? +---@return boolean +function Body:isFixedRotation() end + +---Is this body allowed to sleep +---@return boolean +function Body:isSleepingAllowed() end + +---This resets the mass properties to the sum of the mass properties of the fixtures. +---This normally does not need to be called unless you called SetMassData to override +---the mass and you later want to reset the mass. +function Body:resetMassData() end + +---Set the angular damping of the body. +---@param angularDamping number +function Body:setAngularDamping(angularDamping) end + +---Set the angular velocity. +---@param omega number # the new angular velocity in radians/second. +function Body:setAngularVelocity(omega) end + +---Set the sleep state of the body. A sleeping body has very +---low CPU cost. +---@param flag boolean # set to true to wake the body, false to put it to sleep. +function Body:setAwake(flag) end + +---Should this body be treated like a bullet for continuous collision detection? +---@param flag boolean +function Body:setBullet(flag) end + +---Allow a body to be disabled. A disabled body is not simulated and cannot +---be collided with or woken up. +---If you pass a flag of true, all fixtures will be added to the broad-phase. +---If you pass a flag of false, all fixtures will be removed from the +---broad-phase and all contacts will be destroyed. +---Fixtures and joints are otherwise unaffected. You may continue +---to create/destroy fixtures and joints on disabled bodies. +---Fixtures on a disabled body are implicitly disabled and will +---not participate in collisions, ray-casts, or queries. +---Joints connected to a disabled body are implicitly disabled. +---An diabled body is still owned by a b2World object and remains +---in the body list. +---@param flag boolean +function Body:setEnabled(flag) end + +---Set this body to have fixed rotation. This causes the mass +---to be reset. +---@param flag boolean +function Body:setFixedRotation(flag) end + +---Set the gravity scale of the body. +---@param scale number +function Body:setGravityScale(scale) end + +---Set the linear damping of the body. +---@param linearDamping number +function Body:setLinearDamping(linearDamping) end + +---Set the linear velocity of the center of mass. +---@param v b2.Vec2 # the new linear velocity of the center of mass. +function Body:setLinearVelocity(v) end + +---Set the mass properties to override the mass properties of the fixtures. +---Note that this changes the center of mass position. +---Note that creating or destroying fixtures can also alter the mass. +---This function has no effect if the body isn't dynamic. +---@param data b2.MassData # the mass properties. +function Body:setMassData(data) end + +---You can disable sleeping on this body. If you disable sleeping, the +---body will be woken. +---@param flag boolean +function Body:setSleepingAllowed(flag) end + +---Set the position of the body's origin and rotation. +---Manipulating a body's transform may cause non-physical behavior. +---Note: contacts are updated on the next call to b2World::Step. +---@param position b2.Vec2 # the world position of the body's local origin. +---@param angle number # the world rotation in radians. +function Body:setTransform(position, angle) end + +---Set the type of this body. This may alter the mass and velocity. +---@param type b2.BodyType +function Body:setType(type) end + +return Body \ No newline at end of file diff --git a/addons/cclua/box2d/library/b2/BodyDef.lua b/addons/cclua/box2d/library/b2/BodyDef.lua new file mode 100644 index 00000000..dbaac0c6 --- /dev/null +++ b/addons/cclua/box2d/library/b2/BodyDef.lua @@ -0,0 +1,33 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta b2.BodyDef + +---A body definition holds all the data needed to construct a rigid body. +---You can safely re-use body definitions. Shapes are added to a body after construction. +---@class b2.BodyDef +---@field allowSleep boolean +---@field angle number +---@field angularDamping number +---@field angularVelocity number +---@field awake boolean +---@field bullet boolean +---@field enabled boolean +---@field fixedRotation boolean +---@field gravityScale number +---@field linearDamping number +---@field linearVelocity b2.Vec2 +---@field position b2.Vec2 +---@field type b2.BodyType +---@field userData b2.BodyUserData +local BodyDef = {} + +---@return any +function BodyDef:__gc() end + +---@return any +function BodyDef:__olua_move() end + +---This constructor sets the body definition default values. +---@return b2.BodyDef +function BodyDef.new() end + +return BodyDef \ No newline at end of file diff --git a/addons/cclua/box2d/library/b2/BodyType.lua b/addons/cclua/box2d/library/b2/BodyType.lua new file mode 100644 index 00000000..a98cac4e --- /dev/null +++ b/addons/cclua/box2d/library/b2/BodyType.lua @@ -0,0 +1,15 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta b2.BodyType + +---@type b2.BodyType +local VALUE + +--- +---@enum b2.BodyType +local BodyType = { + dynamicBody = 2, + kinematicBody = 1, + staticBody = 0, +} + +return BodyType \ No newline at end of file diff --git a/addons/cclua/box2d/library/b2/BodyUserData.lua b/addons/cclua/box2d/library/b2/BodyUserData.lua new file mode 100644 index 00000000..f0ae9913 --- /dev/null +++ b/addons/cclua/box2d/library/b2/BodyUserData.lua @@ -0,0 +1,18 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta b2.BodyUserData + +---You can define this to inject whatever data you want in b2Body +---@class b2.BodyUserData +---@field pointer integer +local BodyUserData = {} + +---@return any +function BodyUserData:__gc() end + +---@return any +function BodyUserData:__olua_move() end + +---@return b2.BodyUserData +function BodyUserData.new() end + +return BodyUserData \ No newline at end of file diff --git a/addons/cclua/box2d/library/b2/BroadPhase.lua b/addons/cclua/box2d/library/b2/BroadPhase.lua new file mode 100644 index 00000000..6ae36c6b --- /dev/null +++ b/addons/cclua/box2d/library/b2/BroadPhase.lua @@ -0,0 +1,82 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta b2.BroadPhase + +---The broad-phase is used for computing pairs and performing volume queries and ray casts. +---This broad-phase does not persist pairs. Instead, this reports potentially new pairs. +---It is up to the client to consume the new pairs and to track subsequent overlap. +---@class b2.BroadPhase +---@field proxyCount any Get the number of proxies. +---@field treeBalance any Get the balance of the embedded tree. +---@field treeHeight any Get the height of the embedded tree. +---@field treeQuality number Get the quality metric of the embedded tree. +local BroadPhase = {} + +---@return any +function BroadPhase:__gc() end + +---@return any +function BroadPhase:__olua_move() end + +---Create a proxy with an initial AABB. Pairs are not reported until +---UpdatePairs is called. +---@param aabb b2.AABB +---@param userData any +---@return any +function BroadPhase:createProxy(aabb, userData) end + +---Destroy a proxy. It is up to the client to remove any pairs. +---@param proxyId any +function BroadPhase:destroyProxy(proxyId) end + +---Get the fat AABB for a proxy. +---@param proxyId any +---@return b2.AABB +function BroadPhase:getFatAABB(proxyId) end + +---Get the number of proxies. +---@return any +function BroadPhase:getProxyCount() end + +---Get the balance of the embedded tree. +---@return any +function BroadPhase:getTreeBalance() end + +---Get the height of the embedded tree. +---@return any +function BroadPhase:getTreeHeight() end + +---Get the quality metric of the embedded tree. +---@return number +function BroadPhase:getTreeQuality() end + +---Get user data from a proxy. Returns nullptr if the id is invalid. +---@param proxyId any +---@return any +function BroadPhase:getUserData(proxyId) end + +---Call MoveProxy as many times as you like, then when you are done +---call UpdatePairs to finalized the proxy pairs (for your time step). +---@param proxyId any +---@param aabb b2.AABB +---@param displacement b2.Vec2 +function BroadPhase:moveProxy(proxyId, aabb, displacement) end + +---@return b2.BroadPhase +function BroadPhase.new() end + +---Shift the world origin. Useful for large worlds. +---The shift formula is: position -= newOrigin +---@param newOrigin b2.Vec2 # the new origin with respect to the old origin +function BroadPhase:shiftOrigin(newOrigin) end + +---Test overlap of fat AABBs. +---@param proxyIdA any +---@param proxyIdB any +---@return boolean +function BroadPhase:testOverlap(proxyIdA, proxyIdB) end + +---Call to trigger a re-processing of it's pairs on the next call to UpdatePairs. +---@param proxyId any +function BroadPhase:touchProxy(proxyId) end + +return BroadPhase \ No newline at end of file diff --git a/addons/cclua/box2d/library/b2/ChainShape.lua b/addons/cclua/box2d/library/b2/ChainShape.lua new file mode 100644 index 00000000..2012792f --- /dev/null +++ b/addons/cclua/box2d/library/b2/ChainShape.lua @@ -0,0 +1,35 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta b2.ChainShape + +---A chain shape is a free form sequence of line segments. +---The chain has one-sided collision, with the surface normal pointing to the right of the edge. +---This provides a counter-clockwise winding like the polygon shape. +---Connectivity information is used to create smooth collisions. +---\warning the chain will not collide properly if there are self-intersections. +---@class b2.ChainShape : b2.Shape +local ChainShape = {} + +---Clear all data. +function ChainShape:clear() end + +---Create a chain with ghost vertices to connect multiple chains together. +---@param vertices b2.Vec2 # an array of vertices, these are copied +---@param count any # the vertex count +---@param prevVertex b2.Vec2 # previous vertex from chain that connects to the start +---@param nextVertex b2.Vec2 # next vertex from chain that connects to the end +function ChainShape:createChain(vertices, count, prevVertex, nextVertex) end + +---Create a loop. This automatically adjusts connectivity. +---@param vertices b2.Vec2 # an array of vertices, these are copied +---@param count any # the vertex count +function ChainShape:createLoop(vertices, count) end + +---Get a child edge. +---@param edge b2.EdgeShape +---@param index any +function ChainShape:getChildEdge(edge, index) end + +---@return b2.ChainShape +function ChainShape.new() end + +return ChainShape \ No newline at end of file diff --git a/addons/cclua/box2d/library/b2/CircleShape.lua b/addons/cclua/box2d/library/b2/CircleShape.lua new file mode 100644 index 00000000..2b70b103 --- /dev/null +++ b/addons/cclua/box2d/library/b2/CircleShape.lua @@ -0,0 +1,11 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta b2.CircleShape + +---A solid circle shape +---@class b2.CircleShape : b2.Shape +local CircleShape = {} + +---@return b2.CircleShape +function CircleShape.new() end + +return CircleShape \ No newline at end of file diff --git a/addons/cclua/box2d/library/b2/Color.lua b/addons/cclua/box2d/library/b2/Color.lua new file mode 100644 index 00000000..1c04ecf4 --- /dev/null +++ b/addons/cclua/box2d/library/b2/Color.lua @@ -0,0 +1,30 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta b2.Color + +---Color for debug drawing. Each value has the range [0,1]. +---@class b2.Color +---@field a number +---@field b number +---@field g number +---@field r number +local Color = {} + +---@return any +function Color:__gc() end + +---@return any +function Color:__olua_move() end + +---@return b2.Color +---@overload fun(rIn: number, gIn: number, bIn: number, aIn: number): b2.Color +---@overload fun(rIn: number, gIn: number, bIn: number): b2.Color +function Color.new() end + +---@param rIn number +---@param gIn number +---@param bIn number +---@param aIn number +---@overload fun(self: b2.Color, rIn: number, gIn: number, bIn: number) +function Color:set(rIn, gIn, bIn, aIn) end + +return Color \ No newline at end of file diff --git a/addons/cclua/box2d/library/b2/Contact.lua b/addons/cclua/box2d/library/b2/Contact.lua new file mode 100644 index 00000000..605f5659 --- /dev/null +++ b/addons/cclua/box2d/library/b2/Contact.lua @@ -0,0 +1,118 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta b2.Contact + +---The class manages contact between two shapes. A contact exists for each overlapping +---AABB in the broad-phase (except if filtered). Therefore a contact object may exist +---that has no contact points. +---@class b2.Contact +---@field childIndexA any Get the child primitive index for fixture A. +---@field childIndexB any Get the child primitive index for fixture B. +---@field enabled boolean Has this contact been disabled? +---@field fixtureA b2.Fixture Get fixture A in this contact. +---@field fixtureB b2.Fixture Get fixture B in this contact. +---@field friction number Get the friction. +---@field manifold b2.Manifold Get the contact manifold. Do not modify the manifold unless you understand the internals of Box2D. +---@field next b2.Contact Get the next contact in the world's contact list. +---@field restitution number Get the restitution. +---@field restitutionThreshold number Get the restitution threshold. +---@field tangentSpeed number Get the desired tangent speed. In meters per second. +---@field touching boolean Is this contact touching? +local Contact = {} + +---@return any +function Contact:__olua_move() end + +---Evaluate this contact with your own manifold and transforms. +---@param manifold b2.Manifold +---@param xfA b2.Transform +---@param xfB b2.Transform +function Contact:evaluate(manifold, xfA, xfB) end + +---Get the child primitive index for fixture A. +---@return any +function Contact:getChildIndexA() end + +---Get the child primitive index for fixture B. +---@return any +function Contact:getChildIndexB() end + +---Get fixture A in this contact. +---@return b2.Fixture +function Contact:getFixtureA() end + +---Get fixture B in this contact. +---@return b2.Fixture +function Contact:getFixtureB() end + +---Get the friction. +---@return number +function Contact:getFriction() end + +---Get the contact manifold. Do not modify the manifold unless you understand the +---internals of Box2D. +---@return b2.Manifold +function Contact:getManifold() end + +---Get the next contact in the world's contact list. +---@return b2.Contact +function Contact:getNext() end + +---Get the restitution. +---@return number +function Contact:getRestitution() end + +---Get the restitution threshold. +---@return number +function Contact:getRestitutionThreshold() end + +---Get the desired tangent speed. In meters per second. +---@return number +function Contact:getTangentSpeed() end + +---Get the world manifold. +---@param worldManifold b2.WorldManifold +function Contact:getWorldManifold(worldManifold) end + +---Has this contact been disabled? +---@return boolean +function Contact:isEnabled() end + +---Is this contact touching? +---@return boolean +function Contact:isTouching() end + +---Reset the friction mixture to the default value. +function Contact:resetFriction() end + +---Reset the restitution to the default value. +function Contact:resetRestitution() end + +---Reset the restitution threshold to the default value. +function Contact:resetRestitutionThreshold() end + +---Enable/disable this contact. This can be used inside the pre-solve +---contact listener. The contact is only disabled for the current +---time step (or sub-step in continuous collisions). +---@param flag boolean +function Contact:setEnabled(flag) end + +---Override the default friction mixture. You can call this in b2ContactListener::PreSolve. +---This value persists until set or reset. +---@param friction number +function Contact:setFriction(friction) end + +---Override the default restitution mixture. You can call this in b2ContactListener::PreSolve. +---The value persists until you set or reset. +---@param restitution number +function Contact:setRestitution(restitution) end + +---Override the default restitution velocity threshold mixture. You can call this in b2ContactListener::PreSolve. +---The value persists until you set or reset. +---@param threshold number +function Contact:setRestitutionThreshold(threshold) end + +---Set the desired tangent speed for a conveyor belt behavior. In meters per second. +---@param speed number +function Contact:setTangentSpeed(speed) end + +return Contact \ No newline at end of file diff --git a/addons/cclua/box2d/library/b2/ContactEdge.lua b/addons/cclua/box2d/library/b2/ContactEdge.lua new file mode 100644 index 00000000..bc756183 --- /dev/null +++ b/addons/cclua/box2d/library/b2/ContactEdge.lua @@ -0,0 +1,22 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta b2.ContactEdge + +---A contact edge is used to connect bodies and contacts together +---in a contact graph where each body is a node and each contact +---is an edge. A contact edge belongs to a doubly linked list +---maintained in each attached body. Each contact has two contact +---nodes, one for each attached body. +---@class b2.ContactEdge +---@field contact b2.Contact +---@field next b2.ContactEdge +---@field other b2.Body +---@field prev b2.ContactEdge +local ContactEdge = {} + +---@return any +function ContactEdge:__gc() end + +---@return any +function ContactEdge:__olua_move() end + +return ContactEdge \ No newline at end of file diff --git a/addons/cclua/box2d/library/b2/ContactFeature.lua b/addons/cclua/box2d/library/b2/ContactFeature.lua new file mode 100644 index 00000000..d329f7d7 --- /dev/null +++ b/addons/cclua/box2d/library/b2/ContactFeature.lua @@ -0,0 +1,19 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta b2.ContactFeature + +---The features that intersect to form the contact point +---This must be 4 bytes or less. +---@class b2.ContactFeature +---@field indexA any +---@field indexB any +---@field typeA any +---@field typeB any +local ContactFeature = {} + +---@return any +function ContactFeature:__gc() end + +---@return any +function ContactFeature:__olua_move() end + +return ContactFeature \ No newline at end of file diff --git a/addons/cclua/box2d/library/b2/ContactFilter.lua b/addons/cclua/box2d/library/b2/ContactFilter.lua new file mode 100644 index 00000000..60e3c3c8 --- /dev/null +++ b/addons/cclua/box2d/library/b2/ContactFilter.lua @@ -0,0 +1,12 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta b2.ContactFilter + +--- +---@class b2.ContactFilter : b2.interface.ContactFilter +---@field shouldCollide fun(arg1: b2.Fixture, arg2: b2.Fixture): boolean +local ContactFilter = {} + +---@return b2.ContactFilter +function ContactFilter.new() end + +return ContactFilter \ No newline at end of file diff --git a/addons/cclua/box2d/library/b2/ContactID.lua b/addons/cclua/box2d/library/b2/ContactID.lua new file mode 100644 index 00000000..0989d379 --- /dev/null +++ b/addons/cclua/box2d/library/b2/ContactID.lua @@ -0,0 +1,16 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta b2.ContactID + +---Contact ids to facilitate warm starting. +---@class b2.ContactID +---@field cf b2.ContactFeature +---@field key any +local ContactID = {} + +---@return any +function ContactID:__gc() end + +---@return any +function ContactID:__olua_move() end + +return ContactID \ No newline at end of file diff --git a/addons/cclua/box2d/library/b2/ContactImpulse.lua b/addons/cclua/box2d/library/b2/ContactImpulse.lua new file mode 100644 index 00000000..4e0fdee4 --- /dev/null +++ b/addons/cclua/box2d/library/b2/ContactImpulse.lua @@ -0,0 +1,17 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta b2.ContactImpulse + +---Contact impulses for reporting. Impulses are used instead of forces because +---sub-step forces may approach infinity for rigid body collisions. These +---match up one-to-one with the contact points in b2Manifold. +---@class b2.ContactImpulse +---@field count any +local ContactImpulse = {} + +---@return any +function ContactImpulse:__gc() end + +---@return any +function ContactImpulse:__olua_move() end + +return ContactImpulse \ No newline at end of file diff --git a/addons/cclua/box2d/library/b2/ContactListener.lua b/addons/cclua/box2d/library/b2/ContactListener.lua new file mode 100644 index 00000000..840f80cb --- /dev/null +++ b/addons/cclua/box2d/library/b2/ContactListener.lua @@ -0,0 +1,15 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta b2.ContactListener + +--- +---@class b2.ContactListener : b2.interface.ContactListener +---@field beginContact fun(arg1: b2.Contact) +---@field endContact fun(arg1: b2.Contact) +---@field postSolve fun(arg1: b2.Contact, arg2: b2.ContactImpulse) +---@field preSolve fun(arg1: b2.Contact, arg2: b2.Manifold) +local ContactListener = {} + +---@return b2.ContactListener +function ContactListener.new() end + +return ContactListener \ No newline at end of file diff --git a/addons/cclua/box2d/library/b2/ContactManager.lua b/addons/cclua/box2d/library/b2/ContactManager.lua new file mode 100644 index 00000000..e3d487a9 --- /dev/null +++ b/addons/cclua/box2d/library/b2/ContactManager.lua @@ -0,0 +1,28 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta b2.ContactManager + +--- +---@class b2.ContactManager +local ContactManager = {} + +---@return any +function ContactManager:__gc() end + +---@return any +function ContactManager:__olua_move() end + +---@param proxyUserDataA any +---@param proxyUserDataB any +function ContactManager:addPair(proxyUserDataA, proxyUserDataB) end + +function ContactManager:collide() end + +---@param c b2.Contact +function ContactManager:destroy(c) end + +function ContactManager:findNewContacts() end + +---@return b2.ContactManager +function ContactManager.new() end + +return ContactManager \ No newline at end of file diff --git a/addons/cclua/box2d/library/b2/DebugNode.lua b/addons/cclua/box2d/library/b2/DebugNode.lua new file mode 100644 index 00000000..42798b0e --- /dev/null +++ b/addons/cclua/box2d/library/b2/DebugNode.lua @@ -0,0 +1,29 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta b2.DebugNode + +--- +---@class b2.DebugNode : cc.DrawNode +---@field flags any +local DebugNode = {} + +---@param flags any +function DebugNode:appendFlags(flags) end + +---@param cls string +---@return any +function DebugNode:as(cls) end + +---@param flags any +function DebugNode:clearFlags(flags) end + +---@param world b2.World +---@return b2.DebugNode +function DebugNode.create(world) end + +---@return any +function DebugNode:getFlags() end + +---@param flags any +function DebugNode:setFlags(flags) end + +return DebugNode \ No newline at end of file diff --git a/addons/cclua/box2d/library/b2/DebugNode/Flags.lua b/addons/cclua/box2d/library/b2/DebugNode/Flags.lua new file mode 100644 index 00000000..9b916adc --- /dev/null +++ b/addons/cclua/box2d/library/b2/DebugNode/Flags.lua @@ -0,0 +1,17 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta b2.DebugNode.Flags + +---@type b2.DebugNode.Flags +local VALUE + +--- +---@enum b2.DebugNode.Flags +local Flags = { + AABB = 4, + CENTER_OF_MASS = 16, + JOINT = 2, + PAIRE = 8, + SHAPE = 1, +} + +return Flags \ No newline at end of file diff --git a/addons/cclua/box2d/library/b2/DestructionListener.lua b/addons/cclua/box2d/library/b2/DestructionListener.lua new file mode 100644 index 00000000..c1599638 --- /dev/null +++ b/addons/cclua/box2d/library/b2/DestructionListener.lua @@ -0,0 +1,13 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta b2.DestructionListener + +--- +---@class b2.DestructionListener : b2.interface.DestructionListener +---@field sayGoodbyeToFixture fun(arg1: b2.Fixture) +---@field sayGoodbyeToJoint fun(arg1: b2.Joint) +local DestructionListener = {} + +---@return b2.DestructionListener +function DestructionListener.new() end + +return DestructionListener \ No newline at end of file diff --git a/addons/cclua/box2d/library/b2/DistanceJoint.lua b/addons/cclua/box2d/library/b2/DistanceJoint.lua new file mode 100644 index 00000000..96bc53a5 --- /dev/null +++ b/addons/cclua/box2d/library/b2/DistanceJoint.lua @@ -0,0 +1,73 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta b2.DistanceJoint + +---A distance joint constrains two points on two bodies to remain at a fixed +---distance from each other. You can view this as a massless, rigid rod. +---@class b2.DistanceJoint : b2.Joint +---@field currentLength number Get the current length +---@field damping number +---@field length number Get the rest length +---@field localAnchorA b2.Vec2 The local anchor point relative to bodyA's origin. +---@field localAnchorB b2.Vec2 The local anchor point relative to bodyB's origin. +---@field maxLength number Get the maximum length +---@field minLength number Get the minimum length +---@field stiffness number +local DistanceJoint = {} + +---@return any +function DistanceJoint:__gc() end + +---Get the current length +---@return number +function DistanceJoint:getCurrentLength() end + +---@return number +function DistanceJoint:getDamping() end + +---Get the rest length +---@return number +function DistanceJoint:getLength() end + +---The local anchor point relative to bodyA's origin. +---@return b2.Vec2 +function DistanceJoint:getLocalAnchorA() end + +---The local anchor point relative to bodyB's origin. +---@return b2.Vec2 +function DistanceJoint:getLocalAnchorB() end + +---Get the maximum length +---@return number +function DistanceJoint:getMaxLength() end + +---Get the minimum length +---@return number +function DistanceJoint:getMinLength() end + +---@return number +function DistanceJoint:getStiffness() end + +---Set/get linear damping in N*s/m +---@param damping number +function DistanceJoint:setDamping(damping) end + +---Set the rest length +---@return number # s clamped rest length +---@param length number +function DistanceJoint:setLength(length) end + +---Set the maximum length +---@return number # s the clamped maximum length +---@param maxLength number +function DistanceJoint:setMaxLength(maxLength) end + +---Set the minimum length +---@return number # s the clamped minimum length +---@param minLength number +function DistanceJoint:setMinLength(minLength) end + +---Set/get the linear stiffness in N/m +---@param stiffness number +function DistanceJoint:setStiffness(stiffness) end + +return DistanceJoint \ No newline at end of file diff --git a/addons/cclua/box2d/library/b2/DistanceJointDef.lua b/addons/cclua/box2d/library/b2/DistanceJointDef.lua new file mode 100644 index 00000000..5dd6732f --- /dev/null +++ b/addons/cclua/box2d/library/b2/DistanceJointDef.lua @@ -0,0 +1,29 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta b2.DistanceJointDef + +---Distance joint definition. This requires defining an anchor point on both +---bodies and the non-zero distance of the distance joint. The definition uses +---local anchor points so that the initial configuration can violate the +---constraint slightly. This helps when saving and loading a game. +---@class b2.DistanceJointDef : b2.JointDef +---@field damping number +---@field length number +---@field localAnchorA b2.Vec2 +---@field localAnchorB b2.Vec2 +---@field maxLength number +---@field minLength number +---@field stiffness number +local DistanceJointDef = {} + +---Initialize the bodies, anchors, and rest length using world space anchors. +---The minimum and maximum lengths are set to the rest length. +---@param bodyA b2.Body +---@param bodyB b2.Body +---@param anchorA b2.Vec2 +---@param anchorB b2.Vec2 +function DistanceJointDef:initialize(bodyA, bodyB, anchorA, anchorB) end + +---@return b2.DistanceJointDef +function DistanceJointDef.new() end + +return DistanceJointDef \ No newline at end of file diff --git a/addons/cclua/box2d/library/b2/EdgeShape.lua b/addons/cclua/box2d/library/b2/EdgeShape.lua new file mode 100644 index 00000000..d839ab43 --- /dev/null +++ b/addons/cclua/box2d/library/b2/EdgeShape.lua @@ -0,0 +1,28 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta b2.EdgeShape + +---A line segment (edge) shape. These can be connected in chains or loops +---to other edge shapes. Edges created independently are two-sided and do +---no provide smooth movement across junctions. +---@class b2.EdgeShape : b2.Shape +local EdgeShape = {} + +---@return b2.EdgeShape +function EdgeShape.new() end + +---Set this as a part of a sequence. Vertex v0 precedes the edge and vertex v3 +---follows. These extra vertices are used to provide smooth movement +---across junctions. This also makes the collision one-sided. The edge +---normal points to the right looking from v1 to v2. +---@param v0 b2.Vec2 +---@param v1 b2.Vec2 +---@param v2 b2.Vec2 +---@param v3 b2.Vec2 +function EdgeShape:setOneSided(v0, v1, v2, v3) end + +---Set this as an isolated edge. Collision is two-sided. +---@param v1 b2.Vec2 +---@param v2 b2.Vec2 +function EdgeShape:setTwoSided(v1, v2) end + +return EdgeShape \ No newline at end of file diff --git a/addons/cclua/box2d/library/b2/Filter.lua b/addons/cclua/box2d/library/b2/Filter.lua new file mode 100644 index 00000000..76257790 --- /dev/null +++ b/addons/cclua/box2d/library/b2/Filter.lua @@ -0,0 +1,20 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta b2.Filter + +---This holds contact filtering data. +---@class b2.Filter +---@field categoryBits any +---@field groupIndex any +---@field maskBits any +local Filter = {} + +---@return any +function Filter:__gc() end + +---@return any +function Filter:__olua_move() end + +---@return b2.Filter +function Filter.new() end + +return Filter \ No newline at end of file diff --git a/addons/cclua/box2d/library/b2/Fixture.lua b/addons/cclua/box2d/library/b2/Fixture.lua new file mode 100644 index 00000000..1060a481 --- /dev/null +++ b/addons/cclua/box2d/library/b2/Fixture.lua @@ -0,0 +1,138 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta b2.Fixture + +---A fixture is used to attach a shape to a body for collision detection. A fixture +---inherits its transform from its parent. Fixtures hold additional non-geometric data +---such as friction, collision filters, etc. +---Fixtures are created via b2Body::CreateFixture. +---\warning you cannot reuse fixtures. +---@class b2.Fixture +---@field body b2.Body Get the parent body of this fixture. This is nullptr if the fixture is not attached. \return the parent body. +---@field density number Get the density of this fixture. +---@field filterData b2.Filter Get the contact filtering data. +---@field friction number Get the coefficient of friction. +---@field next b2.Fixture Get the next fixture in the parent body's fixture list. \return the next shape. +---@field restitution number Get the coefficient of restitution. +---@field restitutionThreshold number Get the restitution velocity threshold. +---@field sensor boolean Is this fixture a sensor (non-solid)? \return the true if the shape is a sensor. +---@field shape b2.Shape Get the child shape. You can modify the child shape, however you should not change the number of vertices because this will crash some collision caching mechanisms. Manipulating the shape may lead to non-physical behavior. +---@field type b2.Shape.Type Get the type of the child shape. You can use this to down cast to the concrete shape. \return the shape type. +---@field userData b2.FixtureUserData Get the user data that was assigned in the fixture definition. Use this to store your application specific data. +local Fixture = {} + +---@return any +function Fixture:__gc() end + +---@return any +function Fixture:__olua_move() end + +---Dump this fixture to the log file. +---@param bodyIndex any +function Fixture:dump(bodyIndex) end + +---Get the fixture's AABB. This AABB may be enlarge and/or stale. +---If you need a more accurate AABB, compute it using the shape and +---the body transform. +---@param childIndex any +---@return b2.AABB +function Fixture:getAABB(childIndex) end + +---Get the parent body of this fixture. This is nullptr if the fixture is not attached. +---@return b2.Body # the parent body. +function Fixture:getBody() end + +---Get the density of this fixture. +---@return number +function Fixture:getDensity() end + +---Get the contact filtering data. +---@return b2.Filter +function Fixture:getFilterData() end + +---Get the coefficient of friction. +---@return number +function Fixture:getFriction() end + +---Get the mass data for this fixture. The mass data is based on the density and +---the shape. The rotational inertia is about the shape's origin. This operation +---may be expensive. +---@param massData b2.MassData +function Fixture:getMassData(massData) end + +---Get the next fixture in the parent body's fixture list. +---@return b2.Fixture # the next shape. +function Fixture:getNext() end + +---Get the coefficient of restitution. +---@return number +function Fixture:getRestitution() end + +---Get the restitution velocity threshold. +---@return number +function Fixture:getRestitutionThreshold() end + +---Get the child shape. You can modify the child shape, however you should not change the +---number of vertices because this will crash some collision caching mechanisms. +---Manipulating the shape may lead to non-physical behavior. +---@return b2.Shape +function Fixture:getShape() end + +---Get the type of the child shape. You can use this to down cast to the concrete shape. +---@return b2.Shape.Type # the shape type. +function Fixture:getType() end + +---Get the user data that was assigned in the fixture definition. Use this to +---store your application specific data. +---@return b2.FixtureUserData +function Fixture:getUserData() end + +---Is this fixture a sensor (non-solid)? +---@return boolean # the true if the shape is a sensor. +function Fixture:isSensor() end + +---Cast a ray against this shape. +---@param output b2.RayCastOutput # the ray-cast results. +---@param input b2.RayCastInput # the ray-cast input parameters. +---@param childIndex any # the child shape index (e.g. edge index) +---@return boolean +function Fixture:rayCast(output, input, childIndex) end + +---Call this if you want to establish collision that was previously disabled by b2ContactFilter::ShouldCollide. +function Fixture:refilter() end + +---Set the density of this fixture. This will _not_ automatically adjust the mass +---of the body. You must call b2Body::ResetMassData to update the body's mass. +---@param density number +function Fixture:setDensity(density) end + +---Set the contact filtering data. This will not update contacts until the next time +---step when either parent body is active and awake. +---This automatically calls Refilter. +---@param filter b2.Filter +function Fixture:setFilterData(filter) end + +---Set the coefficient of friction. This will _not_ change the friction of +---existing contacts. +---@param friction number +function Fixture:setFriction(friction) end + +---Set the coefficient of restitution. This will _not_ change the restitution of +---existing contacts. +---@param restitution number +function Fixture:setRestitution(restitution) end + +---Set the restitution threshold. This will _not_ change the restitution threshold of +---existing contacts. +---@param threshold number +function Fixture:setRestitutionThreshold(threshold) end + +---Set if this fixture is a sensor. +---@param sensor boolean +function Fixture:setSensor(sensor) end + +---Test a point for containment in this fixture. +---@param p b2.Vec2 # a point in world coordinates. +---@return boolean +function Fixture:testPoint(p) end + +return Fixture \ No newline at end of file diff --git a/addons/cclua/box2d/library/b2/FixtureDef.lua b/addons/cclua/box2d/library/b2/FixtureDef.lua new file mode 100644 index 00000000..0502d70c --- /dev/null +++ b/addons/cclua/box2d/library/b2/FixtureDef.lua @@ -0,0 +1,27 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta b2.FixtureDef + +---A fixture definition is used to create a fixture. This class defines an +---abstract fixture definition. You can reuse fixture definitions safely. +---@class b2.FixtureDef +---@field density number +---@field filter b2.Filter +---@field friction number +---@field isSensor boolean +---@field restitution number +---@field restitutionThreshold number +---@field shape b2.Shape +---@field userData b2.FixtureUserData +local FixtureDef = {} + +---@return any +function FixtureDef:__gc() end + +---@return any +function FixtureDef:__olua_move() end + +---The constructor sets the default fixture definition values. +---@return b2.FixtureDef +function FixtureDef.new() end + +return FixtureDef \ No newline at end of file diff --git a/addons/cclua/box2d/library/b2/FixtureUserData.lua b/addons/cclua/box2d/library/b2/FixtureUserData.lua new file mode 100644 index 00000000..2d081194 --- /dev/null +++ b/addons/cclua/box2d/library/b2/FixtureUserData.lua @@ -0,0 +1,18 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta b2.FixtureUserData + +---You can define this to inject whatever data you want in b2Fixture +---@class b2.FixtureUserData +---@field pointer integer +local FixtureUserData = {} + +---@return any +function FixtureUserData:__gc() end + +---@return any +function FixtureUserData:__olua_move() end + +---@return b2.FixtureUserData +function FixtureUserData.new() end + +return FixtureUserData \ No newline at end of file diff --git a/addons/cclua/box2d/library/b2/FrictionJoint.lua b/addons/cclua/box2d/library/b2/FrictionJoint.lua new file mode 100644 index 00000000..539cddb7 --- /dev/null +++ b/addons/cclua/box2d/library/b2/FrictionJoint.lua @@ -0,0 +1,40 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta b2.FrictionJoint + +---Friction joint. This is used for top-down friction. +---It provides 2D translational friction and angular friction. +---@class b2.FrictionJoint : b2.Joint +---@field localAnchorA b2.Vec2 The local anchor point relative to bodyA's origin. +---@field localAnchorB b2.Vec2 The local anchor point relative to bodyB's origin. +---@field maxForce number Get the maximum friction force in N. +---@field maxTorque number Get the maximum friction torque in N*m. +local FrictionJoint = {} + +---@return any +function FrictionJoint:__gc() end + +---The local anchor point relative to bodyA's origin. +---@return b2.Vec2 +function FrictionJoint:getLocalAnchorA() end + +---The local anchor point relative to bodyB's origin. +---@return b2.Vec2 +function FrictionJoint:getLocalAnchorB() end + +---Get the maximum friction force in N. +---@return number +function FrictionJoint:getMaxForce() end + +---Get the maximum friction torque in N*m. +---@return number +function FrictionJoint:getMaxTorque() end + +---Set the maximum friction force in N. +---@param force number +function FrictionJoint:setMaxForce(force) end + +---Set the maximum friction torque in N*m. +---@param torque number +function FrictionJoint:setMaxTorque(torque) end + +return FrictionJoint \ No newline at end of file diff --git a/addons/cclua/box2d/library/b2/FrictionJointDef.lua b/addons/cclua/box2d/library/b2/FrictionJointDef.lua new file mode 100644 index 00000000..87c81de2 --- /dev/null +++ b/addons/cclua/box2d/library/b2/FrictionJointDef.lua @@ -0,0 +1,22 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta b2.FrictionJointDef + +---Friction joint definition. +---@class b2.FrictionJointDef : b2.JointDef +---@field localAnchorA b2.Vec2 +---@field localAnchorB b2.Vec2 +---@field maxForce number +---@field maxTorque number +local FrictionJointDef = {} + +---Initialize the bodies, anchors, axis, and reference angle using the world +---anchor and world axis. +---@param bodyA b2.Body +---@param bodyB b2.Body +---@param anchor b2.Vec2 +function FrictionJointDef:initialize(bodyA, bodyB, anchor) end + +---@return b2.FrictionJointDef +function FrictionJointDef.new() end + +return FrictionJointDef \ No newline at end of file diff --git a/addons/cclua/box2d/library/b2/GearJoint.lua b/addons/cclua/box2d/library/b2/GearJoint.lua new file mode 100644 index 00000000..0622214a --- /dev/null +++ b/addons/cclua/box2d/library/b2/GearJoint.lua @@ -0,0 +1,37 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta b2.GearJoint + +---A gear joint is used to connect two joints together. Either joint +---can be a revolute or prismatic joint. You specify a gear ratio +---to bind the motions together: +---coordinate1 + ratio * coordinate2 = constant +---The ratio can be negative or positive. If one joint is a revolute joint +---and the other joint is a prismatic joint, then the ratio will have units +---of length or units of 1/length. +---\warning You have to manually destroy the gear joint if joint1 or joint2 +---is destroyed. +---@class b2.GearJoint : b2.Joint +---@field joint1 b2.Joint Get the first joint. +---@field joint2 b2.Joint Get the second joint. +---@field ratio number +local GearJoint = {} + +---@return any +function GearJoint:__gc() end + +---Get the first joint. +---@return b2.Joint +function GearJoint:getJoint1() end + +---Get the second joint. +---@return b2.Joint +function GearJoint:getJoint2() end + +---@return number +function GearJoint:getRatio() end + +---Set/Get the gear ratio. +---@param ratio number +function GearJoint:setRatio(ratio) end + +return GearJoint \ No newline at end of file diff --git a/addons/cclua/box2d/library/b2/GearJointDef.lua b/addons/cclua/box2d/library/b2/GearJointDef.lua new file mode 100644 index 00000000..ed55b5f3 --- /dev/null +++ b/addons/cclua/box2d/library/b2/GearJointDef.lua @@ -0,0 +1,16 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta b2.GearJointDef + +---Gear joint definition. This definition requires two existing +---revolute or prismatic joints (any combination will work). +---\warning bodyB on the input joints must both be dynamic +---@class b2.GearJointDef : b2.JointDef +---@field joint1 b2.Joint +---@field joint2 b2.Joint +---@field ratio number +local GearJointDef = {} + +---@return b2.GearJointDef +function GearJointDef.new() end + +return GearJointDef \ No newline at end of file diff --git a/addons/cclua/box2d/library/b2/Joint.lua b/addons/cclua/box2d/library/b2/Joint.lua new file mode 100644 index 00000000..4d530108 --- /dev/null +++ b/addons/cclua/box2d/library/b2/Joint.lua @@ -0,0 +1,80 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta b2.Joint + +---The base joint class. Joints are used to constraint two bodies together in +---various fashions. Some joints also feature limits and motors. +---@class b2.Joint +---@field anchorA b2.Vec2 Get the anchor point on bodyA in world coordinates. +---@field anchorB b2.Vec2 Get the anchor point on bodyB in world coordinates. +---@field bodyA b2.Body Get the first body attached to this joint. +---@field bodyB b2.Body Get the second body attached to this joint. +---@field collideConnected boolean Get collide connected. Note: modifying the collide connect flag won't work correctly because the flag is only checked when fixture AABBs begin to overlap. +---@field enabled boolean Short-cut function to determine if either body is enabled. +---@field next b2.Joint Get the next joint the world joint list. +---@field type b2.JointType Get the type of the concrete joint. +---@field userData b2.JointUserData Get the user data pointer. +local Joint = {} + +---@return any +function Joint:__olua_move() end + +---Debug draw this joint +---@param draw b2.interface.Draw +function Joint:draw(draw) end + +---Dump this joint to the log file. +function Joint:dump() end + +---Get the anchor point on bodyA in world coordinates. +---@return b2.Vec2 +function Joint:getAnchorA() end + +---Get the anchor point on bodyB in world coordinates. +---@return b2.Vec2 +function Joint:getAnchorB() end + +---Get the first body attached to this joint. +---@return b2.Body +function Joint:getBodyA() end + +---Get the second body attached to this joint. +---@return b2.Body +function Joint:getBodyB() end + +---Get collide connected. +---Note: modifying the collide connect flag won't work correctly because +---the flag is only checked when fixture AABBs begin to overlap. +---@return boolean +function Joint:getCollideConnected() end + +---Get the next joint the world joint list. +---@return b2.Joint +function Joint:getNext() end + +---Get the reaction force on bodyB at the joint anchor in Newtons. +---@param inv_dt number +---@return b2.Vec2 +function Joint:getReactionForce(inv_dt) end + +---Get the reaction torque on bodyB in N*m. +---@param inv_dt number +---@return number +function Joint:getReactionTorque(inv_dt) end + +---Get the type of the concrete joint. +---@return b2.JointType +function Joint:getType() end + +---Get the user data pointer. +---@return b2.JointUserData +function Joint:getUserData() end + +---Short-cut function to determine if either body is enabled. +---@return boolean +function Joint:isEnabled() end + +---Shift the origin for any points stored in world coordinates. +---@param newOrigin b2.Vec2 +function Joint:shiftOrigin(newOrigin) end + +return Joint \ No newline at end of file diff --git a/addons/cclua/box2d/library/b2/JointDef.lua b/addons/cclua/box2d/library/b2/JointDef.lua new file mode 100644 index 00000000..0cd7c1ab --- /dev/null +++ b/addons/cclua/box2d/library/b2/JointDef.lua @@ -0,0 +1,22 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta b2.JointDef + +---Joint definitions are used to construct joints. +---@class b2.JointDef +---@field bodyA b2.Body +---@field bodyB b2.Body +---@field collideConnected boolean +---@field type b2.JointType +---@field userData b2.JointUserData +local JointDef = {} + +---@return any +function JointDef:__gc() end + +---@return any +function JointDef:__olua_move() end + +---@return b2.JointDef +function JointDef.new() end + +return JointDef \ No newline at end of file diff --git a/addons/cclua/box2d/library/b2/JointEdge.lua b/addons/cclua/box2d/library/b2/JointEdge.lua new file mode 100644 index 00000000..2ac016d1 --- /dev/null +++ b/addons/cclua/box2d/library/b2/JointEdge.lua @@ -0,0 +1,22 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta b2.JointEdge + +---A joint edge is used to connect bodies and joints together +---in a joint graph where each body is a node and each joint +---is an edge. A joint edge belongs to a doubly linked list +---maintained in each attached body. Each joint has two joint +---nodes, one for each attached body. +---@class b2.JointEdge +---@field joint b2.Joint +---@field next b2.JointEdge +---@field other b2.Body +---@field prev b2.JointEdge +local JointEdge = {} + +---@return any +function JointEdge:__gc() end + +---@return any +function JointEdge:__olua_move() end + +return JointEdge \ No newline at end of file diff --git a/addons/cclua/box2d/library/b2/JointType.lua b/addons/cclua/box2d/library/b2/JointType.lua new file mode 100644 index 00000000..349c1ff1 --- /dev/null +++ b/addons/cclua/box2d/library/b2/JointType.lua @@ -0,0 +1,23 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta b2.JointType + +---@type b2.JointType +local VALUE + +--- +---@enum b2.JointType +local JointType = { + distanceJoint = 3, + frictionJoint = 9, + gearJoint = 6, + motorJoint = 10, + mouseJoint = 5, + prismaticJoint = 2, + pulleyJoint = 4, + revoluteJoint = 1, + unknownJoint = 0, + weldJoint = 8, + wheelJoint = 7, +} + +return JointType \ No newline at end of file diff --git a/addons/cclua/box2d/library/b2/JointUserData.lua b/addons/cclua/box2d/library/b2/JointUserData.lua new file mode 100644 index 00000000..d55868f8 --- /dev/null +++ b/addons/cclua/box2d/library/b2/JointUserData.lua @@ -0,0 +1,18 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta b2.JointUserData + +---You can define this to inject whatever data you want in b2Joint +---@class b2.JointUserData +---@field pointer integer +local JointUserData = {} + +---@return any +function JointUserData:__gc() end + +---@return any +function JointUserData:__olua_move() end + +---@return b2.JointUserData +function JointUserData.new() end + +return JointUserData \ No newline at end of file diff --git a/addons/cclua/box2d/library/b2/Manifold.lua b/addons/cclua/box2d/library/b2/Manifold.lua new file mode 100644 index 00000000..07c19234 --- /dev/null +++ b/addons/cclua/box2d/library/b2/Manifold.lua @@ -0,0 +1,33 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta b2.Manifold + +---A manifold for two touching convex shapes. +---Box2D supports multiple types of contact: +---- clip point versus plane with radius +---- point versus point with radius (circles) +---The local point usage depends on the manifold type: +----e_circles: the local center of circleA +----e_faceA: the center of faceA +----e_faceB: the center of faceB +---Similarly the local normal usage: +----e_circles: not used +----e_faceA: the normal on polygonA +----e_faceB: the normal on polygonB +---We store contacts in this way so that position correction can +---account for movement, which is critical for continuous physics. +---All contact scenarios must be expressed in one of these types. +---This structure is stored across time steps, so we keep it small. +---@class b2.Manifold +---@field localNormal b2.Vec2 +---@field localPoint b2.Vec2 +---@field pointCount any +---@field type b2.Manifold.Type +local Manifold = {} + +---@return any +function Manifold:__gc() end + +---@return any +function Manifold:__olua_move() end + +return Manifold \ No newline at end of file diff --git a/addons/cclua/box2d/library/b2/Manifold/Type.lua b/addons/cclua/box2d/library/b2/Manifold/Type.lua new file mode 100644 index 00000000..89a0fe9c --- /dev/null +++ b/addons/cclua/box2d/library/b2/Manifold/Type.lua @@ -0,0 +1,15 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta b2.Manifold.Type + +---@type b2.Manifold.Type +local VALUE + +--- +---@enum b2.Manifold.Type +local Type = { + circles = 0, + faceA = 1, + faceB = 2, +} + +return Type \ No newline at end of file diff --git a/addons/cclua/box2d/library/b2/ManifoldPoint.lua b/addons/cclua/box2d/library/b2/ManifoldPoint.lua new file mode 100644 index 00000000..43d3333c --- /dev/null +++ b/addons/cclua/box2d/library/b2/ManifoldPoint.lua @@ -0,0 +1,27 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta b2.ManifoldPoint + +---A manifold point is a contact point belonging to a contact +---manifold. It holds details related to the geometry and dynamics +---of the contact points. +---The local point usage depends on the manifold type: +----e_circles: the local center of circleB +----e_faceA: the local center of cirlceB or the clip point of polygonB +----e_faceB: the clip point of polygonA +---This structure is stored across time steps, so we keep it small. +---Note: the impulses are used for internal caching and may not +---provide reliable contact forces, especially for high speed collisions. +---@class b2.ManifoldPoint +---@field id b2.ContactID +---@field localPoint b2.Vec2 +---@field normalImpulse number +---@field tangentImpulse number +local ManifoldPoint = {} + +---@return any +function ManifoldPoint:__gc() end + +---@return any +function ManifoldPoint:__olua_move() end + +return ManifoldPoint \ No newline at end of file diff --git a/addons/cclua/box2d/library/b2/MassData.lua b/addons/cclua/box2d/library/b2/MassData.lua new file mode 100644 index 00000000..b8f0e9ee --- /dev/null +++ b/addons/cclua/box2d/library/b2/MassData.lua @@ -0,0 +1,17 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta b2.MassData + +---This holds the mass data computed for a shape. +---@class b2.MassData +---@field I number +---@field center b2.Vec2 +---@field mass number +local MassData = {} + +---@return any +function MassData:__gc() end + +---@return any +function MassData:__olua_move() end + +return MassData \ No newline at end of file diff --git a/addons/cclua/box2d/library/b2/MotorJoint.lua b/addons/cclua/box2d/library/b2/MotorJoint.lua new file mode 100644 index 00000000..a2bc3001 --- /dev/null +++ b/addons/cclua/box2d/library/b2/MotorJoint.lua @@ -0,0 +1,56 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta b2.MotorJoint + +---A motor joint is used to control the relative motion +---between two bodies. A typical usage is to control the movement +---of a dynamic body with respect to the ground. +---@class b2.MotorJoint : b2.Joint +---@field angularOffset number +---@field correctionFactor number Get the position correction factor in the range [0,1]. +---@field linearOffset b2.Vec2 +---@field maxForce number Get the maximum friction force in N. +---@field maxTorque number Get the maximum friction torque in N*m. +local MotorJoint = {} + +---@return any +function MotorJoint:__gc() end + +---@return number +function MotorJoint:getAngularOffset() end + +---Get the position correction factor in the range [0,1]. +---@return number +function MotorJoint:getCorrectionFactor() end + +---@return b2.Vec2 +function MotorJoint:getLinearOffset() end + +---Get the maximum friction force in N. +---@return number +function MotorJoint:getMaxForce() end + +---Get the maximum friction torque in N*m. +---@return number +function MotorJoint:getMaxTorque() end + +---Set/get the target angular offset, in radians. +---@param angularOffset number +function MotorJoint:setAngularOffset(angularOffset) end + +---Set the position correction factor in the range [0,1]. +---@param factor number +function MotorJoint:setCorrectionFactor(factor) end + +---Set/get the target linear offset, in frame A, in meters. +---@param linearOffset b2.Vec2 +function MotorJoint:setLinearOffset(linearOffset) end + +---Set the maximum friction force in N. +---@param force number +function MotorJoint:setMaxForce(force) end + +---Set the maximum friction torque in N*m. +---@param torque number +function MotorJoint:setMaxTorque(torque) end + +return MotorJoint \ No newline at end of file diff --git a/addons/cclua/box2d/library/b2/MotorJointDef.lua b/addons/cclua/box2d/library/b2/MotorJointDef.lua new file mode 100644 index 00000000..288e6d1d --- /dev/null +++ b/addons/cclua/box2d/library/b2/MotorJointDef.lua @@ -0,0 +1,21 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta b2.MotorJointDef + +---Motor joint definition. +---@class b2.MotorJointDef : b2.JointDef +---@field angularOffset number +---@field correctionFactor number +---@field linearOffset b2.Vec2 +---@field maxForce number +---@field maxTorque number +local MotorJointDef = {} + +---Initialize the bodies and offsets using the current transforms. +---@param bodyA b2.Body +---@param bodyB b2.Body +function MotorJointDef:initialize(bodyA, bodyB) end + +---@return b2.MotorJointDef +function MotorJointDef.new() end + +return MotorJointDef \ No newline at end of file diff --git a/addons/cclua/box2d/library/b2/MouseJoint.lua b/addons/cclua/box2d/library/b2/MouseJoint.lua new file mode 100644 index 00000000..7aa761fe --- /dev/null +++ b/addons/cclua/box2d/library/b2/MouseJoint.lua @@ -0,0 +1,49 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta b2.MouseJoint + +---A mouse joint is used to make a point on a body track a +---specified world point. This a soft constraint with a maximum +---force. This allows the constraint to stretch and without +---applying huge forces. +---NOTE: this joint is not documented in the manual because it was +---developed to be used in the testbed. If you want to learn how to +---use the mouse joint, look at the testbed. +---@class b2.MouseJoint : b2.Joint +---@field damping number +---@field maxForce number +---@field stiffness number +---@field target b2.Vec2 +local MouseJoint = {} + +---@return any +function MouseJoint:__gc() end + +---@return number +function MouseJoint:getDamping() end + +---@return number +function MouseJoint:getMaxForce() end + +---@return number +function MouseJoint:getStiffness() end + +---@return b2.Vec2 +function MouseJoint:getTarget() end + +---Set/get linear damping in N*s/m +---@param damping number +function MouseJoint:setDamping(damping) end + +---Set/get the maximum force in Newtons. +---@param force number +function MouseJoint:setMaxForce(force) end + +---Set/get the linear stiffness in N/m +---@param stiffness number +function MouseJoint:setStiffness(stiffness) end + +---Use this to update the target point. +---@param target b2.Vec2 +function MouseJoint:setTarget(target) end + +return MouseJoint \ No newline at end of file diff --git a/addons/cclua/box2d/library/b2/MouseJointDef.lua b/addons/cclua/box2d/library/b2/MouseJointDef.lua new file mode 100644 index 00000000..43e28439 --- /dev/null +++ b/addons/cclua/box2d/library/b2/MouseJointDef.lua @@ -0,0 +1,16 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta b2.MouseJointDef + +---Mouse joint definition. This requires a world target point, +---tuning parameters, and the time step. +---@class b2.MouseJointDef : b2.JointDef +---@field damping number +---@field maxForce number +---@field stiffness number +---@field target b2.Vec2 +local MouseJointDef = {} + +---@return b2.MouseJointDef +function MouseJointDef.new() end + +return MouseJointDef \ No newline at end of file diff --git a/addons/cclua/box2d/library/b2/PolygonShape.lua b/addons/cclua/box2d/library/b2/PolygonShape.lua new file mode 100644 index 00000000..e3179c18 --- /dev/null +++ b/addons/cclua/box2d/library/b2/PolygonShape.lua @@ -0,0 +1,39 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta b2.PolygonShape + +---A solid convex polygon. It is assumed that the interior of the polygon is to +---the left of each edge. +---Polygons have a maximum number of vertices equal to b2_maxPolygonVertices. +---In most cases you should not need many vertices for a convex polygon. +---@class b2.PolygonShape : b2.Shape +local PolygonShape = {} + +---@return b2.PolygonShape +function PolygonShape.new() end + +---Create a convex hull from the given array of local points. +---The count must be in the range [3, b2_maxPolygonVertices]. +---\warning the points may be re-ordered, even if they form a convex polygon +---\warning collinear points are handled but not removed. Collinear points +---may lead to poor stacking behavior. +---@param points b2.Vec2 +---@param count any +function PolygonShape:set(points, count) end + +---Build vertices to represent an axis-aligned box centered on the local origin. +---@param hx number # the half-width. +---@param hy number # the half-height. +--- +---Build vertices to represent an oriented box. +---\param hx the half-width. +---\param hy the half-height. +---\param center the center of the box in local coordinates. +---\param angle the rotation of the box in local coordinates. +---@overload fun(self: b2.PolygonShape, hx: number, hy: number, center: b2.Vec2, angle: number) +function PolygonShape:setAsBox(hx, hy) end + +---Validate convexity. This is a very time consuming operation. +---@return boolean # s true if valid +function PolygonShape:validate() end + +return PolygonShape \ No newline at end of file diff --git a/addons/cclua/box2d/library/b2/PrismaticJoint.lua b/addons/cclua/box2d/library/b2/PrismaticJoint.lua new file mode 100644 index 00000000..285a0bed --- /dev/null +++ b/addons/cclua/box2d/library/b2/PrismaticJoint.lua @@ -0,0 +1,99 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta b2.PrismaticJoint + +---A prismatic joint. This joint provides one degree of freedom: translation +---along an axis fixed in bodyA. Relative rotation is prevented. You can +---use a joint limit to restrict the range of motion and a joint motor to +---drive the motion or to model joint friction. +---@class b2.PrismaticJoint : b2.Joint +---@field jointSpeed number Get the current joint translation speed, usually in meters per second. +---@field jointTranslation number Get the current joint translation, usually in meters. +---@field limitEnabled boolean Is the joint limit enabled? +---@field localAnchorA b2.Vec2 The local anchor point relative to bodyA's origin. +---@field localAnchorB b2.Vec2 The local anchor point relative to bodyB's origin. +---@field localAxisA b2.Vec2 The local joint axis relative to bodyA. +---@field lowerLimit number Get the lower joint limit, usually in meters. +---@field maxMotorForce number +---@field motorEnabled boolean Is the joint motor enabled? +---@field motorSpeed number Get the motor speed, usually in meters per second. +---@field referenceAngle number Get the reference angle. +---@field upperLimit number Get the upper joint limit, usually in meters. +local PrismaticJoint = {} + +---@return any +function PrismaticJoint:__gc() end + +---Enable/disable the joint limit. +---@param flag boolean +function PrismaticJoint:enableLimit(flag) end + +---Enable/disable the joint motor. +---@param flag boolean +function PrismaticJoint:enableMotor(flag) end + +---Get the current joint translation speed, usually in meters per second. +---@return number +function PrismaticJoint:getJointSpeed() end + +---Get the current joint translation, usually in meters. +---@return number +function PrismaticJoint:getJointTranslation() end + +---The local anchor point relative to bodyA's origin. +---@return b2.Vec2 +function PrismaticJoint:getLocalAnchorA() end + +---The local anchor point relative to bodyB's origin. +---@return b2.Vec2 +function PrismaticJoint:getLocalAnchorB() end + +---The local joint axis relative to bodyA. +---@return b2.Vec2 +function PrismaticJoint:getLocalAxisA() end + +---Get the lower joint limit, usually in meters. +---@return number +function PrismaticJoint:getLowerLimit() end + +---@return number +function PrismaticJoint:getMaxMotorForce() end + +---Get the current motor force given the inverse time step, usually in N. +---@param inv_dt number +---@return number +function PrismaticJoint:getMotorForce(inv_dt) end + +---Get the motor speed, usually in meters per second. +---@return number +function PrismaticJoint:getMotorSpeed() end + +---Get the reference angle. +---@return number +function PrismaticJoint:getReferenceAngle() end + +---Get the upper joint limit, usually in meters. +---@return number +function PrismaticJoint:getUpperLimit() end + +---Is the joint limit enabled? +---@return boolean +function PrismaticJoint:isLimitEnabled() end + +---Is the joint motor enabled? +---@return boolean +function PrismaticJoint:isMotorEnabled() end + +---Set the joint limits, usually in meters. +---@param lower number +---@param upper number +function PrismaticJoint:setLimits(lower, upper) end + +---Set the maximum motor force, usually in N. +---@param force number +function PrismaticJoint:setMaxMotorForce(force) end + +---Set the motor speed, usually in meters per second. +---@param speed number +function PrismaticJoint:setMotorSpeed(speed) end + +return PrismaticJoint \ No newline at end of file diff --git a/addons/cclua/box2d/library/b2/PrismaticJointDef.lua b/addons/cclua/box2d/library/b2/PrismaticJointDef.lua new file mode 100644 index 00000000..932fad38 --- /dev/null +++ b/addons/cclua/box2d/library/b2/PrismaticJointDef.lua @@ -0,0 +1,34 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta b2.PrismaticJointDef + +---Prismatic joint definition. This requires defining a line of +---motion using an axis and an anchor point. The definition uses local +---anchor points and a local axis so that the initial configuration +---can violate the constraint slightly. The joint translation is zero +---when the local anchor points coincide in world space. Using local +---anchors and a local axis helps when saving and loading a game. +---@class b2.PrismaticJointDef : b2.JointDef +---@field enableLimit boolean +---@field enableMotor boolean +---@field localAnchorA b2.Vec2 +---@field localAnchorB b2.Vec2 +---@field localAxisA b2.Vec2 +---@field lowerTranslation number +---@field maxMotorForce number +---@field motorSpeed number +---@field referenceAngle number +---@field upperTranslation number +local PrismaticJointDef = {} + +---Initialize the bodies, anchors, axis, and reference angle using the world +---anchor and unit world axis. +---@param bodyA b2.Body +---@param bodyB b2.Body +---@param anchor b2.Vec2 +---@param axis b2.Vec2 +function PrismaticJointDef:initialize(bodyA, bodyB, anchor, axis) end + +---@return b2.PrismaticJointDef +function PrismaticJointDef.new() end + +return PrismaticJointDef \ No newline at end of file diff --git a/addons/cclua/box2d/library/b2/Profile.lua b/addons/cclua/box2d/library/b2/Profile.lua new file mode 100644 index 00000000..70d5a14f --- /dev/null +++ b/addons/cclua/box2d/library/b2/Profile.lua @@ -0,0 +1,22 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta b2.Profile + +---Profiling data. Times are in milliseconds. +---@class b2.Profile +---@field broadphase number +---@field collide number +---@field solve number +---@field solveInit number +---@field solvePosition number +---@field solveTOI number +---@field solveVelocity number +---@field step number +local Profile = {} + +---@return any +function Profile:__gc() end + +---@return any +function Profile:__olua_move() end + +return Profile \ No newline at end of file diff --git a/addons/cclua/box2d/library/b2/PulleyJoint.lua b/addons/cclua/box2d/library/b2/PulleyJoint.lua new file mode 100644 index 00000000..87d1306b --- /dev/null +++ b/addons/cclua/box2d/library/b2/PulleyJoint.lua @@ -0,0 +1,53 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta b2.PulleyJoint + +---The pulley joint is connected to two bodies and two fixed ground points. +---The pulley supports a ratio such that: +---length1 + ratio * length2 <= constant +---Yes, the force transmitted is scaled by the ratio. +---Warning: the pulley joint can get a bit squirrelly by itself. They often +---work better when combined with prismatic joints. You should also cover the +---the anchor points with static shapes to prevent one side from going to +---zero length. +---@class b2.PulleyJoint : b2.Joint +---@field currentLengthA number Get the current length of the segment attached to bodyA. +---@field currentLengthB number Get the current length of the segment attached to bodyB. +---@field groundAnchorA b2.Vec2 Get the first ground anchor. +---@field groundAnchorB b2.Vec2 Get the second ground anchor. +---@field lengthA number Get the current length of the segment attached to bodyA. +---@field lengthB number Get the current length of the segment attached to bodyB. +---@field ratio number Get the pulley ratio. +local PulleyJoint = {} + +---@return any +function PulleyJoint:__gc() end + +---Get the current length of the segment attached to bodyA. +---@return number +function PulleyJoint:getCurrentLengthA() end + +---Get the current length of the segment attached to bodyB. +---@return number +function PulleyJoint:getCurrentLengthB() end + +---Get the first ground anchor. +---@return b2.Vec2 +function PulleyJoint:getGroundAnchorA() end + +---Get the second ground anchor. +---@return b2.Vec2 +function PulleyJoint:getGroundAnchorB() end + +---Get the current length of the segment attached to bodyA. +---@return number +function PulleyJoint:getLengthA() end + +---Get the current length of the segment attached to bodyB. +---@return number +function PulleyJoint:getLengthB() end + +---Get the pulley ratio. +---@return number +function PulleyJoint:getRatio() end + +return PulleyJoint \ No newline at end of file diff --git a/addons/cclua/box2d/library/b2/PulleyJointDef.lua b/addons/cclua/box2d/library/b2/PulleyJointDef.lua new file mode 100644 index 00000000..05e06f6b --- /dev/null +++ b/addons/cclua/box2d/library/b2/PulleyJointDef.lua @@ -0,0 +1,29 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta b2.PulleyJointDef + +---Pulley joint definition. This requires two ground anchors, +---two dynamic body anchor points, and a pulley ratio. +---@class b2.PulleyJointDef : b2.JointDef +---@field groundAnchorA b2.Vec2 +---@field groundAnchorB b2.Vec2 +---@field lengthA number +---@field lengthB number +---@field localAnchorA b2.Vec2 +---@field localAnchorB b2.Vec2 +---@field ratio number +local PulleyJointDef = {} + +---Initialize the bodies, anchors, lengths, max lengths, and ratio using the world anchors. +---@param bodyA b2.Body +---@param bodyB b2.Body +---@param groundAnchorA b2.Vec2 +---@param groundAnchorB b2.Vec2 +---@param anchorA b2.Vec2 +---@param anchorB b2.Vec2 +---@param ratio number +function PulleyJointDef:initialize(bodyA, bodyB, groundAnchorA, groundAnchorB, anchorA, anchorB, ratio) end + +---@return b2.PulleyJointDef +function PulleyJointDef.new() end + +return PulleyJointDef \ No newline at end of file diff --git a/addons/cclua/box2d/library/b2/QueryCallback.lua b/addons/cclua/box2d/library/b2/QueryCallback.lua new file mode 100644 index 00000000..7edb8ca8 --- /dev/null +++ b/addons/cclua/box2d/library/b2/QueryCallback.lua @@ -0,0 +1,12 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta b2.QueryCallback + +--- +---@class b2.QueryCallback : b2.interface.QueryCallback +---@field reportFixture fun(arg1: b2.Fixture): boolean +local QueryCallback = {} + +---@return b2.QueryCallback +function QueryCallback.new() end + +return QueryCallback \ No newline at end of file diff --git a/addons/cclua/box2d/library/b2/RayCastCallback.lua b/addons/cclua/box2d/library/b2/RayCastCallback.lua new file mode 100644 index 00000000..42319427 --- /dev/null +++ b/addons/cclua/box2d/library/b2/RayCastCallback.lua @@ -0,0 +1,12 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta b2.RayCastCallback + +--- +---@class b2.RayCastCallback : b2.interface.RayCastCallback +---@field reportFixture fun(arg1: b2.Fixture, arg2: b2.Vec2, arg3: b2.Vec2, arg4: number): number +local RayCastCallback = {} + +---@return b2.RayCastCallback +function RayCastCallback.new() end + +return RayCastCallback \ No newline at end of file diff --git a/addons/cclua/box2d/library/b2/RayCastInput.lua b/addons/cclua/box2d/library/b2/RayCastInput.lua new file mode 100644 index 00000000..b936efc7 --- /dev/null +++ b/addons/cclua/box2d/library/b2/RayCastInput.lua @@ -0,0 +1,17 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta b2.RayCastInput + +---Ray-cast input data. The ray extends from p1 to p1 + maxFraction * (p2 - p1). +---@class b2.RayCastInput +---@field maxFraction number +---@field p1 b2.Vec2 +---@field p2 b2.Vec2 +local RayCastInput = {} + +---@return any +function RayCastInput:__gc() end + +---@return any +function RayCastInput:__olua_move() end + +return RayCastInput \ No newline at end of file diff --git a/addons/cclua/box2d/library/b2/RayCastOutput.lua b/addons/cclua/box2d/library/b2/RayCastOutput.lua new file mode 100644 index 00000000..9d7c8cb9 --- /dev/null +++ b/addons/cclua/box2d/library/b2/RayCastOutput.lua @@ -0,0 +1,17 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta b2.RayCastOutput + +---Ray-cast output data. The ray hits at p1 + fraction * (p2 - p1), where p1 and p2 +---come from b2RayCastInput. +---@class b2.RayCastOutput +---@field fraction number +---@field normal b2.Vec2 +local RayCastOutput = {} + +---@return any +function RayCastOutput:__gc() end + +---@return any +function RayCastOutput:__olua_move() end + +return RayCastOutput \ No newline at end of file diff --git a/addons/cclua/box2d/library/b2/RevoluteJoint.lua b/addons/cclua/box2d/library/b2/RevoluteJoint.lua new file mode 100644 index 00000000..237d6405 --- /dev/null +++ b/addons/cclua/box2d/library/b2/RevoluteJoint.lua @@ -0,0 +1,97 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta b2.RevoluteJoint + +---A revolute joint constrains two bodies to share a common point while they +---are free to rotate about the point. The relative rotation about the shared +---point is the joint angle. You can limit the relative rotation with +---a joint limit that specifies a lower and upper angle. You can use a motor +---to drive the relative rotation about the shared point. A maximum motor torque +---is provided so that infinite forces are not generated. +---@class b2.RevoluteJoint : b2.Joint +---@field jointAngle number Get the current joint angle in radians. +---@field jointSpeed number Get the current joint angle speed in radians per second. +---@field limitEnabled boolean Is the joint limit enabled? +---@field localAnchorA b2.Vec2 The local anchor point relative to bodyA's origin. +---@field localAnchorB b2.Vec2 The local anchor point relative to bodyB's origin. +---@field lowerLimit number Get the lower joint limit in radians. +---@field maxMotorTorque number +---@field motorEnabled boolean Is the joint motor enabled? +---@field motorSpeed number Get the motor speed in radians per second. +---@field referenceAngle number Get the reference angle. +---@field upperLimit number Get the upper joint limit in radians. +local RevoluteJoint = {} + +---@return any +function RevoluteJoint:__gc() end + +---Enable/disable the joint limit. +---@param flag boolean +function RevoluteJoint:enableLimit(flag) end + +---Enable/disable the joint motor. +---@param flag boolean +function RevoluteJoint:enableMotor(flag) end + +---Get the current joint angle in radians. +---@return number +function RevoluteJoint:getJointAngle() end + +---Get the current joint angle speed in radians per second. +---@return number +function RevoluteJoint:getJointSpeed() end + +---The local anchor point relative to bodyA's origin. +---@return b2.Vec2 +function RevoluteJoint:getLocalAnchorA() end + +---The local anchor point relative to bodyB's origin. +---@return b2.Vec2 +function RevoluteJoint:getLocalAnchorB() end + +---Get the lower joint limit in radians. +---@return number +function RevoluteJoint:getLowerLimit() end + +---@return number +function RevoluteJoint:getMaxMotorTorque() end + +---Get the motor speed in radians per second. +---@return number +function RevoluteJoint:getMotorSpeed() end + +---Get the current motor torque given the inverse time step. +---Unit is N*m. +---@param inv_dt number +---@return number +function RevoluteJoint:getMotorTorque(inv_dt) end + +---Get the reference angle. +---@return number +function RevoluteJoint:getReferenceAngle() end + +---Get the upper joint limit in radians. +---@return number +function RevoluteJoint:getUpperLimit() end + +---Is the joint limit enabled? +---@return boolean +function RevoluteJoint:isLimitEnabled() end + +---Is the joint motor enabled? +---@return boolean +function RevoluteJoint:isMotorEnabled() end + +---Set the joint limits in radians. +---@param lower number +---@param upper number +function RevoluteJoint:setLimits(lower, upper) end + +---Set the maximum motor torque, usually in N-m. +---@param torque number +function RevoluteJoint:setMaxMotorTorque(torque) end + +---Set the motor speed in radians per second. +---@param speed number +function RevoluteJoint:setMotorSpeed(speed) end + +return RevoluteJoint \ No newline at end of file diff --git a/addons/cclua/box2d/library/b2/RevoluteJointDef.lua b/addons/cclua/box2d/library/b2/RevoluteJointDef.lua new file mode 100644 index 00000000..af962b1d --- /dev/null +++ b/addons/cclua/box2d/library/b2/RevoluteJointDef.lua @@ -0,0 +1,36 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta b2.RevoluteJointDef + +---Revolute joint definition. This requires defining an anchor point where the +---bodies are joined. The definition uses local anchor points so that the +---initial configuration can violate the constraint slightly. You also need to +---specify the initial relative angle for joint limits. This helps when saving +---and loading a game. +---The local anchor points are measured from the body's origin +---rather than the center of mass because: +---1. you might not know where the center of mass will be. +---2. if you add/remove shapes from a body and recompute the mass, +---the joints will be broken. +---@class b2.RevoluteJointDef : b2.JointDef +---@field enableLimit boolean +---@field enableMotor boolean +---@field localAnchorA b2.Vec2 +---@field localAnchorB b2.Vec2 +---@field lowerAngle number +---@field maxMotorTorque number +---@field motorSpeed number +---@field referenceAngle number +---@field upperAngle number +local RevoluteJointDef = {} + +---Initialize the bodies, anchors, and reference angle using a world +---anchor point. +---@param bodyA b2.Body +---@param bodyB b2.Body +---@param anchor b2.Vec2 +function RevoluteJointDef:initialize(bodyA, bodyB, anchor) end + +---@return b2.RevoluteJointDef +function RevoluteJointDef.new() end + +return RevoluteJointDef \ No newline at end of file diff --git a/addons/cclua/box2d/library/b2/Rot.lua b/addons/cclua/box2d/library/b2/Rot.lua new file mode 100644 index 00000000..3e63e5a4 --- /dev/null +++ b/addons/cclua/box2d/library/b2/Rot.lua @@ -0,0 +1,44 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta b2.Rot + +---Rotation +---@class b2.Rot +---@field angle number Get the angle in radians +---@field xAxis b2.Vec2 Get the x-axis +---@field yAxis b2.Vec2 Get the u-axis +---@field c number +---@field s number +local Rot = {} + +---@return any +function Rot:__gc() end + +---@return any +function Rot:__olua_move() end + +---Get the angle in radians +---@return number +function Rot:getAngle() end + +---Get the x-axis +---@return b2.Vec2 +function Rot:getXAxis() end + +---Get the u-axis +---@return b2.Vec2 +function Rot:getYAxis() end + +---@return b2.Rot +--- +---Initialize from an angle in radians +---@overload fun(angle: number): b2.Rot +function Rot.new() end + +---Set using an angle in radians. +---@param angle number +function Rot:set(angle) end + +---Set to the identity rotation +function Rot:setIdentity() end + +return Rot \ No newline at end of file diff --git a/addons/cclua/box2d/library/b2/Shape.lua b/addons/cclua/box2d/library/b2/Shape.lua new file mode 100644 index 00000000..6133ed56 --- /dev/null +++ b/addons/cclua/box2d/library/b2/Shape.lua @@ -0,0 +1,52 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta b2.Shape + +---\file +---Structures and functions used for computing contact points, distance +---queries, and TOI queries. +---@class b2.Shape +---@field childCount any Get the number of child primitives. +---@field type b2.Shape.Type Get the type of this shape. You can use this to down cast to the concrete shape. \return the shape type. +local Shape = {} + +---@return any +function Shape:__gc() end + +---@return any +function Shape:__olua_move() end + +---Given a transform, compute the associated axis aligned bounding box for a child shape. +---@param aabb b2.AABB # returns the axis aligned box. +---@param xf b2.Transform # the world transform of the shape. +---@param childIndex any # the child shape +function Shape:computeAABB(aabb, xf, childIndex) end + +---Compute the mass properties of this shape using its dimensions and density. +---The inertia tensor is computed about the local origin. +---@param massData b2.MassData # returns the mass data for this shape. +---@param density number # the density in kilograms per meter squared. +function Shape:computeMass(massData, density) end + +---Get the number of child primitives. +---@return any +function Shape:getChildCount() end + +---Get the type of this shape. You can use this to down cast to the concrete shape. +---@return b2.Shape.Type # the shape type. +function Shape:getType() end + +---Cast a ray against a child shape. +---@param output b2.RayCastOutput # the ray-cast results. +---@param input b2.RayCastInput # the ray-cast input parameters. +---@param transform b2.Transform # the transform to be applied to the shape. +---@param childIndex any # the child shape index +---@return boolean +function Shape:rayCast(output, input, transform, childIndex) end + +---Test a point for containment in this shape. This only works for convex shapes. +---@param xf b2.Transform # the shape world transform. +---@param p b2.Vec2 # a point in world coordinates. +---@return boolean +function Shape:testPoint(xf, p) end + +return Shape \ No newline at end of file diff --git a/addons/cclua/box2d/library/b2/Shape/Type.lua b/addons/cclua/box2d/library/b2/Shape/Type.lua new file mode 100644 index 00000000..46acc84d --- /dev/null +++ b/addons/cclua/box2d/library/b2/Shape/Type.lua @@ -0,0 +1,17 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta b2.Shape.Type + +---@type b2.Shape.Type +local VALUE + +--- +---@enum b2.Shape.Type +local Type = { + chain = 3, + circle = 0, + edge = 1, + polygon = 2, + typeCount = 4, +} + +return Type \ No newline at end of file diff --git a/addons/cclua/box2d/library/b2/Transform.lua b/addons/cclua/box2d/library/b2/Transform.lua new file mode 100644 index 00000000..861c566f --- /dev/null +++ b/addons/cclua/box2d/library/b2/Transform.lua @@ -0,0 +1,32 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta b2.Transform + +---A transform contains translation and rotation. It is used to represent +---the position and orientation of rigid frames. +---@class b2.Transform +---@field p b2.Vec2 +---@field q b2.Rot +local Transform = {} + +---@return any +function Transform:__gc() end + +---@return any +function Transform:__olua_move() end + +---The default constructor does nothing. +---@return b2.Transform +--- +---Initialize using a position vector and a rotation. +---@overload fun(position: b2.Vec2, rotation: b2.Rot): b2.Transform +function Transform.new() end + +---Set this based on the position and angle. +---@param position b2.Vec2 +---@param angle number +function Transform:set(position, angle) end + +---Set this to the identity transform. +function Transform:setIdentity() end + +return Transform \ No newline at end of file diff --git a/addons/cclua/box2d/library/b2/Vec2.lua b/addons/cclua/box2d/library/b2/Vec2.lua new file mode 100644 index 00000000..c64139d8 --- /dev/null +++ b/addons/cclua/box2d/library/b2/Vec2.lua @@ -0,0 +1,53 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta b2.Vec2 + +---A 2D column vector. +---@class b2.Vec2 +---@field valid boolean Does this vector contain finite coordinates? +---@field x number +---@field y number +local Vec2 = {} + +---@return any +function Vec2:__gc() end + +---@return any +function Vec2:__olua_move() end + +---Does this vector contain finite coordinates? +---@return boolean +function Vec2:isValid() end + +---Get the length of this vector (the norm). +---@return number +function Vec2:length() end + +---Get the length squared. For performance, use this instead of +---b2Vec2::Length (if possible). +---@return number +function Vec2:lengthSquared() end + +---Default constructor does nothing (for performance). +---@return b2.Vec2 +--- +---Construct using coordinates. +---@overload fun(xIn: number, yIn: number): b2.Vec2 +function Vec2.new() end + +---Convert this vector into a unit vector. Returns the length. +---@return number +function Vec2:normalize() end + +---Set this vector to some specified coordinates. +---@param x_ number +---@param y_ number +function Vec2:set(x_, y_) end + +---Set this vector to all zeros. +function Vec2:setZero() end + +---Get the skew vector such that dot(skew_vec, other) == cross(vec, other) +---@return b2.Vec2 +function Vec2:skew() end + +return Vec2 \ No newline at end of file diff --git a/addons/cclua/box2d/library/b2/Vec2Array.lua b/addons/cclua/box2d/library/b2/Vec2Array.lua new file mode 100644 index 00000000..04c2b296 --- /dev/null +++ b/addons/cclua/box2d/library/b2/Vec2Array.lua @@ -0,0 +1,49 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta b2.Vec2Array + +--- +---@class b2.Vec2Array +---@field buffer any +---@field length integer +---@field value b2.Vec2 +local Vec2Array = {} + +---@return any +function Vec2Array:__gc() end + +---@param idx integer +---@return b2.Vec2 +function Vec2Array:__index(idx) end + +---@param idx integer +---@param v b2.Vec2 +function Vec2Array:__newindex(idx, v) end + +---@return any +function Vec2Array:__olua_move() end + +---@param len integer +---@return b2.Vec2Array +---@overload fun(): b2.Vec2Array +function Vec2Array.new(len) end + +---@param from integer +---@param to integer +---@return b2.Vec2Array +---@overload fun(self: b2.Vec2Array, from: integer): b2.Vec2Array +function Vec2Array:slice(from, to) end + +---@param from integer +---@param to integer +---@return b2.Vec2Array +---@overload fun(self: b2.Vec2Array, from: integer): b2.Vec2Array +function Vec2Array:sub(from, to) end + +---@return b2.Vec2Array +function Vec2Array:take() end + +---@param len integer +---@return any +function Vec2Array:tostring(len) end + +return Vec2Array \ No newline at end of file diff --git a/addons/cclua/box2d/library/b2/Vec3.lua b/addons/cclua/box2d/library/b2/Vec3.lua new file mode 100644 index 00000000..a4e1f965 --- /dev/null +++ b/addons/cclua/box2d/library/b2/Vec3.lua @@ -0,0 +1,33 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta b2.Vec3 + +---A 2D column vector with 3 elements. +---@class b2.Vec3 +---@field x number +---@field y number +---@field z number +local Vec3 = {} + +---@return any +function Vec3:__gc() end + +---@return any +function Vec3:__olua_move() end + +---Default constructor does nothing (for performance). +---@return b2.Vec3 +--- +---Construct using coordinates. +---@overload fun(xIn: number, yIn: number, zIn: number): b2.Vec3 +function Vec3.new() end + +---Set this vector to some specified coordinates. +---@param x_ number +---@param y_ number +---@param z_ number +function Vec3:set(x_, y_, z_) end + +---Set this vector to all zeros. +function Vec3:setZero() end + +return Vec3 \ No newline at end of file diff --git a/addons/cclua/box2d/library/b2/WeldJoint.lua b/addons/cclua/box2d/library/b2/WeldJoint.lua new file mode 100644 index 00000000..30e5476e --- /dev/null +++ b/addons/cclua/box2d/library/b2/WeldJoint.lua @@ -0,0 +1,43 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta b2.WeldJoint + +---A weld joint essentially glues two bodies together. A weld joint may +---distort somewhat because the island constraint solver is approximate. +---@class b2.WeldJoint : b2.Joint +---@field damping number +---@field localAnchorA b2.Vec2 The local anchor point relative to bodyA's origin. +---@field localAnchorB b2.Vec2 The local anchor point relative to bodyB's origin. +---@field referenceAngle number Get the reference angle. +---@field stiffness number +local WeldJoint = {} + +---@return any +function WeldJoint:__gc() end + +---@return number +function WeldJoint:getDamping() end + +---The local anchor point relative to bodyA's origin. +---@return b2.Vec2 +function WeldJoint:getLocalAnchorA() end + +---The local anchor point relative to bodyB's origin. +---@return b2.Vec2 +function WeldJoint:getLocalAnchorB() end + +---Get the reference angle. +---@return number +function WeldJoint:getReferenceAngle() end + +---@return number +function WeldJoint:getStiffness() end + +---Set/get damping in N*m*s +---@param damping number +function WeldJoint:setDamping(damping) end + +---Set/get stiffness in N*m +---@param stiffness number +function WeldJoint:setStiffness(stiffness) end + +return WeldJoint \ No newline at end of file diff --git a/addons/cclua/box2d/library/b2/WeldJointDef.lua b/addons/cclua/box2d/library/b2/WeldJointDef.lua new file mode 100644 index 00000000..22451c7f --- /dev/null +++ b/addons/cclua/box2d/library/b2/WeldJointDef.lua @@ -0,0 +1,24 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta b2.WeldJointDef + +---Weld joint definition. You need to specify local anchor points +---where they are attached and the relative body angle. The position +---of the anchor points is important for computing the reaction torque. +---@class b2.WeldJointDef : b2.JointDef +---@field damping number +---@field localAnchorA b2.Vec2 +---@field localAnchorB b2.Vec2 +---@field referenceAngle number +---@field stiffness number +local WeldJointDef = {} + +---Initialize the bodies, anchors, reference angle, stiffness, and damping. +---@param bodyA b2.Body # the first body connected by this joint +---@param bodyB b2.Body # the second body connected by this joint +---@param anchor b2.Vec2 # the point of connection in world coordinates +function WeldJointDef:initialize(bodyA, bodyB, anchor) end + +---@return b2.WeldJointDef +function WeldJointDef.new() end + +return WeldJointDef \ No newline at end of file diff --git a/addons/cclua/box2d/library/b2/WheelJoint.lua b/addons/cclua/box2d/library/b2/WheelJoint.lua new file mode 100644 index 00000000..fc528b72 --- /dev/null +++ b/addons/cclua/box2d/library/b2/WheelJoint.lua @@ -0,0 +1,120 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta b2.WheelJoint + +---A wheel joint. This joint provides two degrees of freedom: translation +---along an axis fixed in bodyA and rotation in the plane. In other words, it is a point to +---line constraint with a rotational motor and a linear spring/damper. The spring/damper is +---initialized upon creation. This joint is designed for vehicle suspensions. +---@class b2.WheelJoint : b2.Joint +---@field damping number +---@field jointAngle number Get the current joint angle in radians. +---@field jointAngularSpeed number Get the current joint angular speed in radians per second. +---@field jointLinearSpeed number Get the current joint linear speed, usually in meters per second. +---@field jointTranslation number Get the current joint translation, usually in meters. +---@field limitEnabled boolean Is the joint limit enabled? +---@field localAnchorA b2.Vec2 The local anchor point relative to bodyA's origin. +---@field localAnchorB b2.Vec2 The local anchor point relative to bodyB's origin. +---@field localAxisA b2.Vec2 The local joint axis relative to bodyA. +---@field lowerLimit number Get the lower joint translation limit, usually in meters. +---@field maxMotorTorque number +---@field motorEnabled boolean Is the joint motor enabled? +---@field motorSpeed number Get the motor speed, usually in radians per second. +---@field stiffness number +---@field upperLimit number Get the upper joint translation limit, usually in meters. +local WheelJoint = {} + +---@return any +function WheelJoint:__gc() end + +---Enable/disable the joint translation limit. +---@param flag boolean +function WheelJoint:enableLimit(flag) end + +---Enable/disable the joint motor. +---@param flag boolean +function WheelJoint:enableMotor(flag) end + +---@return number +function WheelJoint:getDamping() end + +---Get the current joint angle in radians. +---@return number +function WheelJoint:getJointAngle() end + +---Get the current joint angular speed in radians per second. +---@return number +function WheelJoint:getJointAngularSpeed() end + +---Get the current joint linear speed, usually in meters per second. +---@return number +function WheelJoint:getJointLinearSpeed() end + +---Get the current joint translation, usually in meters. +---@return number +function WheelJoint:getJointTranslation() end + +---The local anchor point relative to bodyA's origin. +---@return b2.Vec2 +function WheelJoint:getLocalAnchorA() end + +---The local anchor point relative to bodyB's origin. +---@return b2.Vec2 +function WheelJoint:getLocalAnchorB() end + +---The local joint axis relative to bodyA. +---@return b2.Vec2 +function WheelJoint:getLocalAxisA() end + +---Get the lower joint translation limit, usually in meters. +---@return number +function WheelJoint:getLowerLimit() end + +---@return number +function WheelJoint:getMaxMotorTorque() end + +---Get the motor speed, usually in radians per second. +---@return number +function WheelJoint:getMotorSpeed() end + +---Get the current motor torque given the inverse time step, usually in N-m. +---@param inv_dt number +---@return number +function WheelJoint:getMotorTorque(inv_dt) end + +---@return number +function WheelJoint:getStiffness() end + +---Get the upper joint translation limit, usually in meters. +---@return number +function WheelJoint:getUpperLimit() end + +---Is the joint limit enabled? +---@return boolean +function WheelJoint:isLimitEnabled() end + +---Is the joint motor enabled? +---@return boolean +function WheelJoint:isMotorEnabled() end + +---Access damping +---@param damping number +function WheelJoint:setDamping(damping) end + +---Set the joint translation limits, usually in meters. +---@param lower number +---@param upper number +function WheelJoint:setLimits(lower, upper) end + +---Set/Get the maximum motor force, usually in N-m. +---@param torque number +function WheelJoint:setMaxMotorTorque(torque) end + +---Set the motor speed, usually in radians per second. +---@param speed number +function WheelJoint:setMotorSpeed(speed) end + +---Access spring stiffness +---@param stiffness number +function WheelJoint:setStiffness(stiffness) end + +return WheelJoint \ No newline at end of file diff --git a/addons/cclua/box2d/library/b2/WheelJointDef.lua b/addons/cclua/box2d/library/b2/WheelJointDef.lua new file mode 100644 index 00000000..27c04884 --- /dev/null +++ b/addons/cclua/box2d/library/b2/WheelJointDef.lua @@ -0,0 +1,35 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta b2.WheelJointDef + +---Wheel joint definition. This requires defining a line of +---motion using an axis and an anchor point. The definition uses local +---anchor points and a local axis so that the initial configuration +---can violate the constraint slightly. The joint translation is zero +---when the local anchor points coincide in world space. Using local +---anchors and a local axis helps when saving and loading a game. +---@class b2.WheelJointDef : b2.JointDef +---@field damping number +---@field enableLimit boolean +---@field enableMotor boolean +---@field localAnchorA b2.Vec2 +---@field localAnchorB b2.Vec2 +---@field localAxisA b2.Vec2 +---@field lowerTranslation number +---@field maxMotorTorque number +---@field motorSpeed number +---@field stiffness number +---@field upperTranslation number +local WheelJointDef = {} + +---Initialize the bodies, anchors, axis, and reference angle using the world +---anchor and world axis. +---@param bodyA b2.Body +---@param bodyB b2.Body +---@param anchor b2.Vec2 +---@param axis b2.Vec2 +function WheelJointDef:initialize(bodyA, bodyB, anchor, axis) end + +---@return b2.WheelJointDef +function WheelJointDef.new() end + +return WheelJointDef \ No newline at end of file diff --git a/addons/cclua/box2d/library/b2/World.lua b/addons/cclua/box2d/library/b2/World.lua new file mode 100644 index 00000000..6a017abe --- /dev/null +++ b/addons/cclua/box2d/library/b2/World.lua @@ -0,0 +1,232 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta b2.World + +---The world class manages all physics entities, dynamic simulation, +---and asynchronous queries. The world also contains efficient memory +---management facilities. +---@class b2.World +---@field allowSleeping boolean +---@field autoClearForces boolean Get the flag that controls automatic clearing of forces after each time step. +---@field bodyCount any Get the number of bodies. +---@field bodyList b2.Body Get the world body list. With the returned body, use b2Body::GetNext to get the next body in the world list. A nullptr body indicates the end of the list. \return the head of the world body list. +---@field contactCount any Get the number of contacts (each may have 0 or more contact points). +---@field contactList b2.Contact Get the world contact list. With the returned contact, use b2Contact::GetNext to get the next contact in the world list. A nullptr contact indicates the end of the list. \return the head of the world contact list. \warning contacts are created and destroyed in the middle of a time step. Use b2ContactListener to avoid missing contacts. +---@field contactManager b2.ContactManager Get the contact manager for testing. +---@field continuousPhysics boolean +---@field gravity b2.Vec2 Get the global gravity vector. +---@field jointCount any Get the number of joints. +---@field jointList b2.Joint Get the world joint list. With the returned joint, use b2Joint::GetNext to get the next joint in the world list. A nullptr joint indicates the end of the list. \return the head of the world joint list. +---@field locked boolean Is the world locked (in the middle of a time step). +---@field profile b2.Profile Get the current profile. +---@field proxyCount any Get the number of broad-phase proxies. +---@field subStepping boolean +---@field treeBalance any Get the balance of the dynamic tree. +---@field treeHeight any Get the height of the dynamic tree. +---@field treeQuality number Get the quality metric of the dynamic tree. The smaller the better. The minimum is 1. +---@field warmStarting boolean +local World = {} + +---@return any +function World:__gc() end + +---@return any +function World:__olua_move() end + +---Manually clear the force buffer on all bodies. By default, forces are cleared automatically +---after each call to Step. The default behavior is modified by calling SetAutoClearForces. +---The purpose of this function is to support sub-stepping. Sub-stepping is often used to maintain +---a fixed sized time step under a variable frame-rate. +---When you perform sub-stepping you will disable auto clearing of forces and instead call +---ClearForces after all sub-steps are complete in one pass of your game loop. +---\see SetAutoClearForces +function World:clearForces() end + +---Create a rigid body given a definition. No reference to the definition +---is retained. +---\warning This function is locked during callbacks. +---@param def b2.BodyDef +---@return b2.Body +function World:createBody(def) end + +---Create a joint to constrain bodies together. No reference to the definition +---is retained. This may cause the connected bodies to cease colliding. +---\warning This function is locked during callbacks. +---@param def b2.JointDef +---@return b2.Joint +function World:createJoint(def) end + +---Call this to draw shapes and other debug draw data. This is intentionally non-const. +function World:debugDraw() end + +---Destroy a rigid body given a definition. No reference to the definition +---is retained. This function is locked during callbacks. +---\warning This automatically deletes all associated shapes and joints. +---\warning This function is locked during callbacks. +---@param body b2.Body +function World:destroyBody(body) end + +---Destroy a joint. This may cause the connected bodies to begin colliding. +---\warning This function is locked during callbacks. +---@param joint b2.Joint +function World:destroyJoint(joint) end + +---Dump the world into the log file. +---\warning this should be called outside of a time step. +function World:dump() end + +---@return boolean +function World:getAllowSleeping() end + +---Get the flag that controls automatic clearing of forces after each time step. +---@return boolean +function World:getAutoClearForces() end + +---Get the number of bodies. +---@return any +function World:getBodyCount() end + +---Get the world body list. With the returned body, use b2Body::GetNext to get +---the next body in the world list. A nullptr body indicates the end of the list. +---@return b2.Body # the head of the world body list. +function World:getBodyList() end + +---Get the number of contacts (each may have 0 or more contact points). +---@return any +function World:getContactCount() end + +---Get the world contact list. With the returned contact, use b2Contact::GetNext to get +---the next contact in the world list. A nullptr contact indicates the end of the list. +---@return b2.Contact # the head of the world contact list. +---\warning contacts are created and destroyed in the middle of a time step. +---Use b2ContactListener to avoid missing contacts. +function World:getContactList() end + +---Get the contact manager for testing. +---@return b2.ContactManager +function World:getContactManager() end + +---@return boolean +function World:getContinuousPhysics() end + +---Get the global gravity vector. +---@return b2.Vec2 +function World:getGravity() end + +---Get the number of joints. +---@return any +function World:getJointCount() end + +---Get the world joint list. With the returned joint, use b2Joint::GetNext to get +---the next joint in the world list. A nullptr joint indicates the end of the list. +---@return b2.Joint # the head of the world joint list. +function World:getJointList() end + +---Get the current profile. +---@return b2.Profile +function World:getProfile() end + +---Get the number of broad-phase proxies. +---@return any +function World:getProxyCount() end + +---@return boolean +function World:getSubStepping() end + +---Get the balance of the dynamic tree. +---@return any +function World:getTreeBalance() end + +---Get the height of the dynamic tree. +---@return any +function World:getTreeHeight() end + +---Get the quality metric of the dynamic tree. The smaller the better. +---The minimum is 1. +---@return number +function World:getTreeQuality() end + +---@return boolean +function World:getWarmStarting() end + +---Is the world locked (in the middle of a time step). +---@return boolean +function World:isLocked() end + +---Construct a world object. +---@param gravity b2.Vec2 # the world gravity vector. +---@return b2.World +function World.new(gravity) end + +---Query the world for all fixtures that potentially overlap the +---provided AABB. +---@param callback b2.interface.QueryCallback # a user implemented callback class. +---@param aabb b2.AABB # the query box. +function World:queryAABB(callback, aabb) end + +---Ray-cast the world for all fixtures in the path of the ray. Your callback +---controls whether you get the closest point, any point, or n-points. +---The ray-cast ignores shapes that contain the starting point. +---@param callback b2.interface.RayCastCallback # a user implemented callback class. +---@param point1 b2.Vec2 # the ray starting point +---@param point2 b2.Vec2 # the ray ending point +function World:rayCast(callback, point1, point2) end + +---Enable/disable sleep. +---@param flag boolean +function World:setAllowSleeping(flag) end + +---Set flag to control automatic clearing of forces after each time step. +---@param flag boolean +function World:setAutoClearForces(flag) end + +---Register a contact filter to provide specific control over collision. +---Otherwise the default filter is used (b2_defaultFilter). The listener is +---owned by you and must remain in scope. +---@param filter b2.interface.ContactFilter +function World:setContactFilter(filter) end + +---Register a contact event listener. The listener is owned by you and must +---remain in scope. +---@param listener b2.interface.ContactListener +function World:setContactListener(listener) end + +---Enable/disable continuous physics. For testing. +---@param flag boolean +function World:setContinuousPhysics(flag) end + +---Register a routine for debug drawing. The debug draw functions are called +---inside with b2World::DebugDraw method. The debug draw object is owned +---by you and must remain in scope. +---@param debugDraw b2.interface.Draw +function World:setDebugDraw(debugDraw) end + +---Register a destruction listener. The listener is owned by you and must +---remain in scope. +---@param listener b2.interface.DestructionListener +function World:setDestructionListener(listener) end + +---Change the global gravity vector. +---@param gravity b2.Vec2 +function World:setGravity(gravity) end + +---Enable/disable single stepped continuous physics. For testing. +---@param flag boolean +function World:setSubStepping(flag) end + +---Enable/disable warm starting. For testing. +---@param flag boolean +function World:setWarmStarting(flag) end + +---Shift the world origin. Useful for large worlds. +---The body shift formula is: position -= newOrigin +---@param newOrigin b2.Vec2 # the new origin with respect to the old origin +function World:shiftOrigin(newOrigin) end + +---Take a time step. This performs collision detection, integration, +---and constraint solution. +---@param timeStep number # the amount of time to simulate, this should not vary. +---@param velocityIterations any # for the velocity constraint solver. +---@param positionIterations any # for the position constraint solver. +function World:step(timeStep, velocityIterations, positionIterations) end + +return World \ No newline at end of file diff --git a/addons/cclua/box2d/library/b2/WorldManifold.lua b/addons/cclua/box2d/library/b2/WorldManifold.lua new file mode 100644 index 00000000..3893f862 --- /dev/null +++ b/addons/cclua/box2d/library/b2/WorldManifold.lua @@ -0,0 +1,26 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta b2.WorldManifold + +---This is used to compute the current state of a contact manifold. +---@class b2.WorldManifold +---@field normal b2.Vec2 +local WorldManifold = {} + +---@return any +function WorldManifold:__gc() end + +---@return any +function WorldManifold:__olua_move() end + +---Evaluate the manifold with supplied transforms. This assumes +---modest motion from the original state. This does not change the +---point count, impulses, etc. The radii must come from the shapes +---that generated the manifold. +---@param manifold b2.Manifold +---@param xfA b2.Transform +---@param radiusA number +---@param xfB b2.Transform +---@param radiusB number +function WorldManifold:initialize(manifold, xfA, radiusA, xfB, radiusB) end + +return WorldManifold \ No newline at end of file diff --git a/addons/cclua/box2d/library/b2/interface/ContactFilter.lua b/addons/cclua/box2d/library/b2/interface/ContactFilter.lua new file mode 100644 index 00000000..21f54ff8 --- /dev/null +++ b/addons/cclua/box2d/library/b2/interface/ContactFilter.lua @@ -0,0 +1,15 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta b2.interface.ContactFilter + +---Implement this class to provide collision filtering. In other words, you can implement +---this class if you want finer control over contact creation. +---@class b2.interface.ContactFilter +local ContactFilter = {} + +---@return any +function ContactFilter:__gc() end + +---@return any +function ContactFilter:__olua_move() end + +return ContactFilter \ No newline at end of file diff --git a/addons/cclua/box2d/library/b2/interface/ContactListener.lua b/addons/cclua/box2d/library/b2/interface/ContactListener.lua new file mode 100644 index 00000000..ede93bdf --- /dev/null +++ b/addons/cclua/box2d/library/b2/interface/ContactListener.lua @@ -0,0 +1,22 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta b2.interface.ContactListener + +---Implement this class to get contact information. You can use these results for +---things like sounds and game logic. You can also get contact results by +---traversing the contact lists after the time step. However, you might miss +---some contacts because continuous physics leads to sub-stepping. +---Additionally you may receive multiple callbacks for the same contact in a +---single time step. +---You should strive to make your callbacks efficient because there may be +---many callbacks per time step. +---\warning You cannot create/destroy Box2D entities inside these callbacks. +---@class b2.interface.ContactListener +local ContactListener = {} + +---@return any +function ContactListener:__gc() end + +---@return any +function ContactListener:__olua_move() end + +return ContactListener \ No newline at end of file diff --git a/addons/cclua/box2d/library/b2/interface/DestructionListener.lua b/addons/cclua/box2d/library/b2/interface/DestructionListener.lua new file mode 100644 index 00000000..c04fa527 --- /dev/null +++ b/addons/cclua/box2d/library/b2/interface/DestructionListener.lua @@ -0,0 +1,16 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta b2.interface.DestructionListener + +---Joints and fixtures are destroyed when their associated +---body is destroyed. Implement this listener so that you +---may nullify references to these joints and shapes. +---@class b2.interface.DestructionListener +local DestructionListener = {} + +---@return any +function DestructionListener:__gc() end + +---@return any +function DestructionListener:__olua_move() end + +return DestructionListener \ No newline at end of file diff --git a/addons/cclua/box2d/library/b2/interface/Draw.lua b/addons/cclua/box2d/library/b2/interface/Draw.lua new file mode 100644 index 00000000..d3dc4118 --- /dev/null +++ b/addons/cclua/box2d/library/b2/interface/Draw.lua @@ -0,0 +1,15 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta b2.interface.Draw + +---Implement and register this class with a b2World to provide debug drawing of physics +---entities in your game. +---@class b2.interface.Draw +local Draw = {} + +---@return any +function Draw:__gc() end + +---@return any +function Draw:__olua_move() end + +return Draw \ No newline at end of file diff --git a/addons/cclua/box2d/library/b2/interface/QueryCallback.lua b/addons/cclua/box2d/library/b2/interface/QueryCallback.lua new file mode 100644 index 00000000..0153a2e2 --- /dev/null +++ b/addons/cclua/box2d/library/b2/interface/QueryCallback.lua @@ -0,0 +1,15 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta b2.interface.QueryCallback + +---Callback class for AABB queries. +---See b2World::Query +---@class b2.interface.QueryCallback +local QueryCallback = {} + +---@return any +function QueryCallback:__gc() end + +---@return any +function QueryCallback:__olua_move() end + +return QueryCallback \ No newline at end of file diff --git a/addons/cclua/box2d/library/b2/interface/RayCastCallback.lua b/addons/cclua/box2d/library/b2/interface/RayCastCallback.lua new file mode 100644 index 00000000..7a863346 --- /dev/null +++ b/addons/cclua/box2d/library/b2/interface/RayCastCallback.lua @@ -0,0 +1,15 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta b2.interface.RayCastCallback + +---Callback class for ray casts. +---See b2World::RayCast +---@class b2.interface.RayCastCallback +local RayCastCallback = {} + +---@return any +function RayCastCallback:__gc() end + +---@return any +function RayCastCallback:__olua_move() end + +return RayCastCallback \ No newline at end of file diff --git a/addons/cclua/cclua/config.json b/addons/cclua/cclua/config.json new file mode 100644 index 00000000..3199bef4 --- /dev/null +++ b/addons/cclua/cclua/config.json @@ -0,0 +1,6 @@ +{ + "$schema": "https://raw.githubusercontent.com/LuaLS/LLS-Addons/main/schemas/addon_config.schema.json", + "words": ["%s+-cclua"], + "files": ["cclua"], + "settings": {} +} \ No newline at end of file diff --git a/addons/cclua/cclua/library/cclua/Callback.lua b/addons/cclua/cclua/library/cclua/Callback.lua new file mode 100644 index 00000000..79f64aad --- /dev/null +++ b/addons/cclua/cclua/library/cclua/Callback.lua @@ -0,0 +1,14 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cclua.Callback + +--- +--- +---std::function +---@class cclua.Callback +local Callback = {} + +---@return cclua.Callback + +function Callback:__call() end + +return Callback \ No newline at end of file diff --git a/addons/cclua/cclua/library/cclua/Container.lua b/addons/cclua/cclua/library/cclua/Container.lua new file mode 100644 index 00000000..accf14ef --- /dev/null +++ b/addons/cclua/cclua/library/cclua/Container.lua @@ -0,0 +1,25 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cclua.Container + +--- +---@class cclua.Container : ccui.Layout +---@field clippingNode cc.DrawNode +---@field filter cc.Node +local Container = {} + +---@return cclua.Container +function Container.create() end + +---@return cc.DrawNode +function Container:getClippingNode() end + +---@return cc.Node +function Container:getFilter() end + +---@return cclua.Container +function Container.new() end + +---@param value cc.Node +function Container:setFilter(value) end + +return Container \ No newline at end of file diff --git a/addons/cclua/cclua/library/cclua/MP3Encoder.lua b/addons/cclua/cclua/library/cclua/MP3Encoder.lua new file mode 100644 index 00000000..d6901d47 --- /dev/null +++ b/addons/cclua/cclua/library/cclua/MP3Encoder.lua @@ -0,0 +1,505 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cclua.MP3Encoder + +--- +---@class cclua.MP3Encoder : cc.Ref +---@field allowDiffShort integer +---@field analysis integer +---@field atHlower number +---@field atHonly integer +---@field atHshort integer +---@field atHtype integer +---@field athaaSensitivity number +---@field athaaType integer +---@field audiophileGain integer +---@field bWriteVbrTag integer +---@field brate integer +---@field compressionRatio number +---@field copyright integer +---@field decodeOnTheFly integer +---@field decodeOnly integer +---@field disableReservoir integer +---@field emphasis integer +---@field encoderDelay integer +---@field encoderPadding integer +---@field errorProtection integer +---@field expNspsytune integer +---@field experimentalX integer +---@field experimentalY integer +---@field experimentalZ integer +---@field extension integer +---@field findReplayGain integer +---@field forceMs integer +---@field forceShortBlocks integer +---@field frameNum integer +---@field framesize integer +---@field freeFormat integer +---@field highpassfreq integer +---@field highpasswidth integer +---@field inSamplerate integer +---@field interChRatio number +---@field lameOsBitness string +---@field lameShortVersion string +---@field lameUrl string +---@field lameVersion string +---@field lameVeryShortVersion string +---@field lowpassfreq integer +---@field lowpasswidth integer +---@field mfSamplesToEncode integer +---@field mode cclua.MP3Encoder.MPEGMode +---@field msfix number +---@field noATH integer +---@field noShortBlocks integer +---@field noclipGainChange integer +---@field noclipScale number +---@field nogapCurrentindex integer +---@field nogapTotal integer +---@field numChannels integer +---@field numSamples integer +---@field original integer +---@field outSamplerate integer +---@field peakSample number +---@field psyVersion string +---@field quality integer +---@field quantComp integer +---@field quantCompShort integer +---@field radioGain integer +---@field scale number +---@field scaleLeft number +---@field scaleRight number +---@field sizeMp3buffer integer +---@field strictISO integer +---@field totalframes integer +---@field useTemporal integer +---@field vbr cclua.MP3Encoder.VBRMode +---@field vbrHardMin integer +---@field vbrMaxBitrateKbps integer +---@field vbrMeanBitrateKbps integer +---@field vbrMinBitrateKbps integer +---@field vbrQuality number +---@field vbrq integer +---@field version integer +local MP3Encoder = {} + +---@return number +function MP3Encoder:getATHlower() end + +---@return integer +function MP3Encoder:getATHonly() end + +---@return integer +function MP3Encoder:getATHshort() end + +---@return integer +function MP3Encoder:getATHtype() end + +---@return integer +function MP3Encoder:getAllowDiffShort() end + +---@return integer +function MP3Encoder:getAnalysis() end + +---@return number +function MP3Encoder:getAthaaSensitivity() end + +---@return integer +function MP3Encoder:getAthaaType() end + +---@return integer +function MP3Encoder:getAudiophileGain() end + +---@return integer +function MP3Encoder:getBWriteVbrTag() end + +---@return integer +function MP3Encoder:getBrate() end + +---@return number +function MP3Encoder:getCompressionRatio() end + +---@return integer +function MP3Encoder:getCopyright() end + +---@return integer +function MP3Encoder:getDecodeOnTheFly() end + +---@return integer +function MP3Encoder:getDecodeOnly() end + +---@return integer +function MP3Encoder:getDisableReservoir() end + +---@return integer +function MP3Encoder:getEmphasis() end + +---@return integer +function MP3Encoder:getEncoderDelay() end + +---@return integer +function MP3Encoder:getEncoderPadding() end + +---@return integer +function MP3Encoder:getErrorProtection() end + +---@return integer +function MP3Encoder:getExpNspsytune() end + +---@return integer +function MP3Encoder:getExperimentalX() end + +---@return integer +function MP3Encoder:getExperimentalY() end + +---@return integer +function MP3Encoder:getExperimentalZ() end + +---@return integer +function MP3Encoder:getExtension() end + +---@return integer +function MP3Encoder:getFindReplayGain() end + +---@return integer +function MP3Encoder:getForceMs() end + +---@return integer +function MP3Encoder:getForceShortBlocks() end + +---@return integer +function MP3Encoder:getFrameNum() end + +---@return integer +function MP3Encoder:getFramesize() end + +---@return integer +function MP3Encoder:getFreeFormat() end + +---@return integer +function MP3Encoder:getHighpassfreq() end + +---@return integer +function MP3Encoder:getHighpasswidth() end + +---@return integer +function MP3Encoder:getInSamplerate() end + +---@return number +function MP3Encoder:getInterChRatio() end + +---@return string +function MP3Encoder:getLameOsBitness() end + +---@return string +function MP3Encoder:getLameShortVersion() end + +---@return string +function MP3Encoder:getLameUrl() end + +---@return string +function MP3Encoder:getLameVersion() end + +---@return string +function MP3Encoder:getLameVeryShortVersion() end + +---@return integer +function MP3Encoder:getLowpassfreq() end + +---@return integer +function MP3Encoder:getLowpasswidth() end + +---@return integer +function MP3Encoder:getMfSamplesToEncode() end + +---@return cclua.MP3Encoder.MPEGMode +function MP3Encoder:getMode() end + +---@return number +function MP3Encoder:getMsfix() end + +---@return integer +function MP3Encoder:getNoATH() end + +---@return integer +function MP3Encoder:getNoShortBlocks() end + +---@return integer +function MP3Encoder:getNoclipGainChange() end + +---@return number +function MP3Encoder:getNoclipScale() end + +---@return integer +function MP3Encoder:getNogapCurrentindex() end + +---@return integer +function MP3Encoder:getNogapTotal() end + +---@return integer +function MP3Encoder:getNumChannels() end + +---@return integer +function MP3Encoder:getNumSamples() end + +---@return integer +function MP3Encoder:getOriginal() end + +---@return integer +function MP3Encoder:getOutSamplerate() end + +---@return number +function MP3Encoder:getPeakSample() end + +---@return string +function MP3Encoder:getPsyVersion() end + +---@return integer +function MP3Encoder:getQuality() end + +---@return integer +function MP3Encoder:getQuantComp() end + +---@return integer +function MP3Encoder:getQuantCompShort() end + +---@return integer +function MP3Encoder:getRadioGain() end + +---@return number +function MP3Encoder:getScale() end + +---@return number +function MP3Encoder:getScaleLeft() end + +---@return number +function MP3Encoder:getScaleRight() end + +---@return integer +function MP3Encoder:getSizeMp3buffer() end + +---@return integer +function MP3Encoder:getStrictISO() end + +---@return integer +function MP3Encoder:getTotalframes() end + +---@return integer +function MP3Encoder:getUseTemporal() end + +---@return cclua.MP3Encoder.VBRMode +function MP3Encoder:getVBR() end + +---@return integer +function MP3Encoder:getVBRHardMin() end + +---@return integer +function MP3Encoder:getVBRMaxBitrateKbps() end + +---@return integer +function MP3Encoder:getVBRMeanBitrateKbps() end + +---@return integer +function MP3Encoder:getVBRMinBitrateKbps() end + +---@return integer +function MP3Encoder:getVBRQ() end + +---@return number +function MP3Encoder:getVBRQuality() end + +---@return integer +function MP3Encoder:getVersion() end + +function MP3Encoder:initParams() end + +---@return cclua.MP3Encoder +function MP3Encoder.new() end + +function MP3Encoder:printConfig() end + +function MP3Encoder:printInternals() end + +---@param value number +function MP3Encoder:setATHlower(value) end + +---@param value integer +function MP3Encoder:setATHonly(value) end + +---@param value integer +function MP3Encoder:setATHshort(value) end + +---@param value integer +function MP3Encoder:setATHtype(value) end + +---@param value integer +function MP3Encoder:setAllowDiffShort(value) end + +---@param value integer +function MP3Encoder:setAnalysis(value) end + +---@param optim integer +---@param mode integer +function MP3Encoder:setAsmOptimizations(optim, mode) end + +---@param value number +function MP3Encoder:setAthaaSensitivity(value) end + +---@param value integer +function MP3Encoder:setAthaaType(value) end + +---@param value integer +function MP3Encoder:setBWriteVbrTag(value) end + +---@param value integer +function MP3Encoder:setBrate(value) end + +---@param value number +function MP3Encoder:setCompressionRatio(value) end + +---@param value integer +function MP3Encoder:setCopyright(value) end + +---@param value integer +function MP3Encoder:setDecodeOnTheFly(value) end + +---@param value integer +function MP3Encoder:setDecodeOnly(value) end + +---@param value integer +function MP3Encoder:setDisableReservoir(value) end + +---@param value integer +function MP3Encoder:setEmphasis(value) end + +---@param value integer +function MP3Encoder:setErrorProtection(value) end + +---@param value integer +function MP3Encoder:setExpNspsytune(value) end + +---@param value integer +function MP3Encoder:setExperimentalX(value) end + +---@param value integer +function MP3Encoder:setExperimentalY(value) end + +---@param value integer +function MP3Encoder:setExperimentalZ(value) end + +---@param value integer +function MP3Encoder:setExtension(value) end + +---@param value integer +function MP3Encoder:setFindReplayGain(value) end + +---@param value integer +function MP3Encoder:setForceMs(value) end + +---@param value integer +function MP3Encoder:setForceShortBlocks(value) end + +---@param value integer +function MP3Encoder:setFreeFormat(value) end + +---@param value integer +function MP3Encoder:setHighpassfreq(value) end + +---@param value integer +function MP3Encoder:setHighpasswidth(value) end + +---@param value integer +function MP3Encoder:setInSamplerate(value) end + +---@param value number +function MP3Encoder:setInterChRatio(value) end + +---@param value integer +function MP3Encoder:setLowpassfreq(value) end + +---@param value integer +function MP3Encoder:setLowpasswidth(value) end + +---@param value cclua.MP3Encoder.MPEGMode +function MP3Encoder:setMode(value) end + +---@param value number +function MP3Encoder:setMsfix(value) end + +---@param value integer +function MP3Encoder:setNoATH(value) end + +---@param value integer +function MP3Encoder:setNoShortBlocks(value) end + +---@param value integer +function MP3Encoder:setNogapCurrentindex(value) end + +---@param value integer +function MP3Encoder:setNogapTotal(value) end + +---@param value integer +function MP3Encoder:setNumChannels(value) end + +---@param value integer +function MP3Encoder:setNumSamples(value) end + +---@param value integer +function MP3Encoder:setOriginal(value) end + +---@param value integer +function MP3Encoder:setOutSamplerate(value) end + +---@param preset integer +function MP3Encoder:setPreset(preset) end + +---@param value integer +function MP3Encoder:setQuality(value) end + +---@param value integer +function MP3Encoder:setQuantComp(value) end + +---@param value integer +function MP3Encoder:setQuantCompShort(value) end + +---@param value number +function MP3Encoder:setScale(value) end + +---@param value number +function MP3Encoder:setScaleLeft(value) end + +---@param value number +function MP3Encoder:setScaleRight(value) end + +---@param value integer +function MP3Encoder:setStrictISO(value) end + +---@param value integer +function MP3Encoder:setUseTemporal(value) end + +---@param value cclua.MP3Encoder.VBRMode +function MP3Encoder:setVBR(value) end + +---@param value integer +function MP3Encoder:setVBRHardMin(value) end + +---@param value integer +function MP3Encoder:setVBRMaxBitrateKbps(value) end + +---@param value integer +function MP3Encoder:setVBRMeanBitrateKbps(value) end + +---@param value integer +function MP3Encoder:setVBRMinBitrateKbps(value) end + +---@param value integer +function MP3Encoder:setVBRQ(value) end + +---@param value number +function MP3Encoder:setVBRQuality(value) end + +---@param pcmPath string +---@param mp3Path string +function MP3Encoder:start(pcmPath, mp3Path) end + +function MP3Encoder:stop() end + +return MP3Encoder \ No newline at end of file diff --git a/addons/cclua/cclua/library/cclua/MP3Encoder/MPEGMode.lua b/addons/cclua/cclua/library/cclua/MP3Encoder/MPEGMode.lua new file mode 100644 index 00000000..a6b19b0f --- /dev/null +++ b/addons/cclua/cclua/library/cclua/MP3Encoder/MPEGMode.lua @@ -0,0 +1,18 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cclua.MP3Encoder.MPEGMode + +---@type cclua.MP3Encoder.MPEGMode +local VALUE + +--- +---@enum cclua.MP3Encoder.MPEGMode +local MPEGMode = { + DUAL_CHANNEL = 2, + JOINT_STEREO = 1, + MAX_INDICATOR = 5, + MONO = 3, + NOT_SET = 4, + STEREO = 0, +} + +return MPEGMode \ No newline at end of file diff --git a/addons/cclua/cclua/library/cclua/MP3Encoder/VBRMode.lua b/addons/cclua/cclua/library/cclua/MP3Encoder/VBRMode.lua new file mode 100644 index 00000000..db22fb6d --- /dev/null +++ b/addons/cclua/cclua/library/cclua/MP3Encoder/VBRMode.lua @@ -0,0 +1,19 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cclua.MP3Encoder.VBRMode + +---@type cclua.MP3Encoder.VBRMode +local VALUE + +--- +---@enum cclua.MP3Encoder.VBRMode +local VBRMode = { + ABR = 3, + DEFAULT = 4, + MAX_INDICATOR = 5, + MT = 1, + MTRH = 4, + OFF = 0, + RH = 2, +} + +return VBRMode \ No newline at end of file diff --git a/addons/cclua/cclua/library/cclua/QRCode.lua b/addons/cclua/cclua/library/cclua/QRCode.lua new file mode 100644 index 00000000..008f359c --- /dev/null +++ b/addons/cclua/cclua/library/cclua/QRCode.lua @@ -0,0 +1,20 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cclua.QRCode + +--- +---@class cclua.QRCode : cc.Sprite +local QRCode = {} + +---@param code string +---@param version integer +---@param level cclua.QRCode.ECLevel +---@param hint cclua.QRCode.EncodeMode +---@param casesensitive boolean +---@return cclua.QRCode +---@overload fun(code: string): cclua.QRCode +---@overload fun(code: string, version: integer): cclua.QRCode +---@overload fun(code: string, version: integer, level: cclua.QRCode.ECLevel): cclua.QRCode +---@overload fun(code: string, version: integer, level: cclua.QRCode.ECLevel, hint: cclua.QRCode.EncodeMode): cclua.QRCode +function QRCode.create(code, version, level, hint, casesensitive) end + +return QRCode \ No newline at end of file diff --git a/addons/cclua/cclua/library/cclua/QRCode/ECLevel.lua b/addons/cclua/cclua/library/cclua/QRCode/ECLevel.lua new file mode 100644 index 00000000..bd0e7888 --- /dev/null +++ b/addons/cclua/cclua/library/cclua/QRCode/ECLevel.lua @@ -0,0 +1,18 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cclua.QRCode.ECLevel + +---@type cclua.QRCode.ECLevel +local VALUE + +--- +---@enum cclua.QRCode.ECLevel +local ECLevel = { + ---< highest + QR_ECLEVEL_H = 3, + ---< lowest + QR_ECLEVEL_L = 0, + QR_ECLEVEL_M = 1, + QR_ECLEVEL_Q = 2, +} + +return ECLevel \ No newline at end of file diff --git a/addons/cclua/cclua/library/cclua/QRCode/EncodeMode.lua b/addons/cclua/cclua/library/cclua/QRCode/EncodeMode.lua new file mode 100644 index 00000000..8da23c6e --- /dev/null +++ b/addons/cclua/cclua/library/cclua/QRCode/EncodeMode.lua @@ -0,0 +1,24 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cclua.QRCode.EncodeMode + +---@type cclua.QRCode.EncodeMode +local VALUE + +--- +---@enum cclua.QRCode.EncodeMode +local EncodeMode = { + ---< 8-bit data mode + QR_MODE_8 = 2, + ---< Alphabet-numeric mode + QR_MODE_AN = 1, + ---< Kanji (shift-jis) mode + QR_MODE_KANJI = 3, + ---< Terminator (NUL character). Internal use only + QR_MODE_NUL = -1, + ---< Numeric mode + QR_MODE_NUM = 0, + ---< Internal use only + QR_MODE_STRUCTURE = 4, +} + +return EncodeMode \ No newline at end of file diff --git a/addons/cclua/cclua/library/cclua/SceneNoCamera.lua b/addons/cclua/cclua/library/cclua/SceneNoCamera.lua new file mode 100644 index 00000000..63f26e79 --- /dev/null +++ b/addons/cclua/cclua/library/cclua/SceneNoCamera.lua @@ -0,0 +1,21 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cclua.SceneNoCamera + +--- +---@class cclua.SceneNoCamera : cc.Scene +local SceneNoCamera = {} + +---@return cclua.SceneNoCamera +function SceneNoCamera.create() end + +---@return cclua.SceneNoCamera +function SceneNoCamera.createWithPhysics() end + +---@param size cc.Size +---@return cclua.SceneNoCamera +function SceneNoCamera.createWithSize(size) end + +---@return cclua.SceneNoCamera +function SceneNoCamera.new() end + +return SceneNoCamera \ No newline at end of file diff --git a/addons/cclua/cclua/library/cclua/XMLHttpRequest.lua b/addons/cclua/cclua/library/cclua/XMLHttpRequest.lua new file mode 100644 index 00000000..07553d66 --- /dev/null +++ b/addons/cclua/cclua/library/cclua/XMLHttpRequest.lua @@ -0,0 +1,105 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cclua.XMLHttpRequest + +--- +---@class cclua.XMLHttpRequest : cc.Ref +---@field aborted boolean +---@field allResponseHeaders { [string]: string } +---@field dataSize integer +---@field dataStr string +---@field errorFlag boolean +---@field readyState integer +---@field response any +---@field responseType cclua.XMLHttpRequest.ResponseType +---@field responseURL string +---@field status integer +---@field statusText string +---@field timeout integer +---@field url string +---@field withCredentials boolean +---@field DONE integer +---@field HEADERS_RECEIVED integer +---@field LOADING integer +---@field OPENED integer +---@field UNSENT integer +local XMLHttpRequest = {} + +function XMLHttpRequest:abort() end + +---@return { [string]: string } +function XMLHttpRequest:getAllResponseHeaders() end + +---@return integer +function XMLHttpRequest:getDataSize() end + +---@return string +function XMLHttpRequest:getDataStr() end + +---@return boolean +function XMLHttpRequest:getErrorFlag() end + +---@return integer +function XMLHttpRequest:getReadyState() end + +---@return any +function XMLHttpRequest.getResponse() end + +---@param name string +---@return string +function XMLHttpRequest:getResponseHeader(name) end + +---@return cclua.XMLHttpRequest.ResponseType +function XMLHttpRequest:getResponseType() end + +---@return string +function XMLHttpRequest:getResponseURL() end + +---@return integer +function XMLHttpRequest:getStatus() end + +---@return string +function XMLHttpRequest:getStatusText() end + +---@return integer +function XMLHttpRequest:getTimeout() end + +---@return string +function XMLHttpRequest:getURL() end + +---@return boolean +function XMLHttpRequest:getWithCredentials() end + +---@return boolean +function XMLHttpRequest:isAborted() end + +---@return cclua.XMLHttpRequest +function XMLHttpRequest.new() end + +---@param method string +---@param url string +function XMLHttpRequest:open(method, url) end + +---@param data any +---@overload fun(self: cclua.XMLHttpRequest) +function XMLHttpRequest:send(data) end + +---@param errorFlag boolean +function XMLHttpRequest:setErrorFlag(errorFlag) end + +---@param name string +---@param value string +function XMLHttpRequest:setRequestHeader(name, value) end + +---@param handler fun(arg1: integer) +function XMLHttpRequest:setResponseCallback(handler) end + +---@param value cclua.XMLHttpRequest.ResponseType +function XMLHttpRequest:setResponseType(value) end + +---@param value integer +function XMLHttpRequest:setTimeout(value) end + +---@param value boolean +function XMLHttpRequest:setWithCredentials(value) end + +return XMLHttpRequest \ No newline at end of file diff --git a/addons/cclua/cclua/library/cclua/XMLHttpRequest/ResponseType.lua b/addons/cclua/cclua/library/cclua/XMLHttpRequest/ResponseType.lua new file mode 100644 index 00000000..b224ee9b --- /dev/null +++ b/addons/cclua/cclua/library/cclua/XMLHttpRequest/ResponseType.lua @@ -0,0 +1,17 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cclua.XMLHttpRequest.ResponseType + +---@type cclua.XMLHttpRequest.ResponseType +local VALUE + +--- +---@enum cclua.XMLHttpRequest.ResponseType +local ResponseType = { + ARRAY_BUFFER = 1, + BLOB = 2, + DOCUMENT = 3, + JSON = 4, + STRING = 0, +} + +return ResponseType \ No newline at end of file diff --git a/addons/cclua/cclua/library/cclua/downloader.lua b/addons/cclua/cclua/library/cclua/downloader.lua new file mode 100644 index 00000000..62f9477b --- /dev/null +++ b/addons/cclua/cclua/library/cclua/downloader.lua @@ -0,0 +1,30 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cclua.downloader + +--- +---@class cclua.downloader +local downloader = {} + +---@return any +function downloader:__gc() end + +---@return any +function downloader:__olua_move() end + +function downloader.end_() end + +function downloader.init() end + +---@param uri string +---@param path string +---@param md5 string +---@overload fun(uri: string, path: string) +function downloader.load(uri, path, md5) end + +---@param dispatcher cclua.Callback +function downloader.setDispatcher(dispatcher) end + +---@param resolver fun(arg1: string): string +function downloader.setURIResolver(resolver) end + +return downloader \ No newline at end of file diff --git a/addons/cclua/cclua/library/cclua/filesystem.lua b/addons/cclua/cclua/library/cclua/filesystem.lua new file mode 100644 index 00000000..0472b8e0 --- /dev/null +++ b/addons/cclua/cclua/library/cclua/filesystem.lua @@ -0,0 +1,105 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cclua.filesystem + +--- +---@class cclua.filesystem +---@field builtinCacheDirectory string +---@field cacheDirectory string +---@field documentDirectory string +---@field sdCardDirectory string +---@field tmpDirectory string +---@field writablePath string +local filesystem = {} + +---@return any +function filesystem:__gc() end + +---@return any +function filesystem:__olua_move() end + +---@param path string +---@param front boolean +---@overload fun(path: string) +function filesystem.addSearchPath(path, front) end + +---@param srcPath string +---@param destPath string +---@return boolean +function filesystem.copy(srcPath, destPath) end + +---@param path string +---@param isFilePath boolean +---@return boolean +---@overload fun(path: string): boolean +function filesystem.createDirectory(path, isFilePath) end + +---@param path string +---@return boolean +function filesystem.exist(path) end + +---@param path string +---@return string +function filesystem.fullPath(path) end + +---@return string +function filesystem.getBuiltinCacheDirectory() end + +---@return string +function filesystem.getCacheDirectory() end + +---@return string +function filesystem.getDocumentDirectory() end + +---@return string +function filesystem.getSDCardDirectory() end + +---@return string +function filesystem.getTmpDirectory() end + +---@return string +function filesystem.getWritablePath() end + +---@param path string +---@return boolean +function filesystem.isAbsolutePath(path) end + +---@param path string +---@return boolean +function filesystem.isDirectory(path) end + +---@param path string +---@return boolean +function filesystem.isFile(path) end + +---@param path string +---@return any +function filesystem.read(path) end + +---@param path string +---@return boolean +function filesystem.remove(path) end + +---@param oldPath string +---@param newPath string +---@return boolean +function filesystem.rename(oldPath, newPath) end + +---@param path string +---@param limit integer +---@return string +---@overload fun(path: string): string +function filesystem.trimPath(path, limit) end + +---@param path string +---@param dest string +---@return boolean +function filesystem.unzip(path, dest) end + +---@param path string +---@param data string +---@param len integer +---@return boolean +---@overload fun(path: string, data: any): boolean +function filesystem.write(path, data, len) end + +return filesystem \ No newline at end of file diff --git a/addons/cclua/cclua/library/cclua/microphone.lua b/addons/cclua/cclua/library/cclua/microphone.lua new file mode 100644 index 00000000..de9e4abf --- /dev/null +++ b/addons/cclua/cclua/library/cclua/microphone.lua @@ -0,0 +1,30 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cclua.microphone + +--- +---@class cclua.microphone +---@field running boolean +local microphone = {} + +---@return any +function microphone:__gc() end + +---@return any +function microphone:__olua_move() end + +---@param event string +---@param data any +function microphone.dispatch(event, data) end + +---@return boolean +function microphone.isRunning() end + +---@param dispatcher cclua.Callback +function microphone.setDispatcher(dispatcher) end + +---@param path string +function microphone.start(path) end + +function microphone.stop() end + +return microphone \ No newline at end of file diff --git a/addons/cclua/cclua/library/cclua/permission.lua b/addons/cclua/cclua/library/cclua/permission.lua new file mode 100644 index 00000000..8cd1f893 --- /dev/null +++ b/addons/cclua/cclua/library/cclua/permission.lua @@ -0,0 +1,27 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cclua.permission + +--- +---@class cclua.permission +---@field android any +---@field status any +---@field CALENDAR string +---@field CAMERA string +---@field CONTACTS string +---@field LOCATION string +---@field MICROPHONE string +---@field PHONE string +---@field PHOTO string +---@field SENSORS string +---@field SMS string +---@field STORAGE string +---@field TRACKING string +local permission = {} + +---@return any +function permission:__gc() end + +---@return any +function permission:__olua_move() end + +return permission \ No newline at end of file diff --git a/addons/cclua/cclua/library/cclua/permission/android.lua b/addons/cclua/cclua/library/cclua/permission/android.lua new file mode 100644 index 00000000..d16cefa7 --- /dev/null +++ b/addons/cclua/cclua/library/cclua/permission/android.lua @@ -0,0 +1,165 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cclua.permission.android + +--- +---@class cclua.permission.android +---@field ACCEPT_HANDOVER string +---@field ACCESS_CHECKIN_PROPERTIES string +---@field ACCESS_COARSE_LOCATION string +---@field ACCESS_FINE_LOCATION string +---@field ACCESS_LOCATION_EXTRA_COMMANDS string +---@field ACCESS_NETWORK_STATE string +---@field ACCESS_NOTIFICATION_POLICY string +---@field ACCESS_WIFI_STATE string +---@field ACCOUNT_MANAGER string +---@field ADD_VOICEMAIL string +---@field ANSWER_PHONE_CALLS string +---@field BATTERY_STATS string +---@field BIND_ACCESSIBILITY_SERVICE string +---@field BIND_APPWIDGET string +---@field BIND_AUTOFILL_SERVICE string +---@field BIND_CARRIER_MESSAGING_SERVICE string +---@field BIND_CARRIER_SERVICES string +---@field BIND_CHOOSER_TARGET_SERVICE string +---@field BIND_CONDITION_PROVIDER_SERVICE string +---@field BIND_DEVICE_ADMIN string +---@field BIND_DREAM_SERVICE string +---@field BIND_INCALL_SERVICE string +---@field BIND_INPUT_METHOD string +---@field BIND_MIDI_DEVICE_SERVICE string +---@field BIND_NFC_SERVICE string +---@field BIND_NOTIFICATION_LISTENER_SERVICE string +---@field BIND_PRINT_SERVICE string +---@field BIND_QUICK_SETTINGS_TILE string +---@field BIND_REMOTEVIEWS string +---@field BIND_SCREENING_SERVICE string +---@field BIND_TELECOM_CONNECTION_SERVICE string +---@field BIND_TEXT_SERVICE string +---@field BIND_TV_INPUT string +---@field BIND_VISUAL_VOICEMAIL_SERVICE string +---@field BIND_VOICE_INTERACTION string +---@field BIND_VPN_SERVICE string +---@field BIND_VR_LISTENER_SERVICE string +---@field BIND_WALLPAPER string +---@field BLUETOOTH string +---@field BLUETOOTH_ADMIN string +---@field BLUETOOTH_PRIVILEGED string +---@field BODY_SENSORS string +---@field BROADCAST_PACKAGE_REMOVED string +---@field BROADCAST_SMS string +---@field BROADCAST_STICKY string +---@field BROADCAST_WAP_PUSH string +---@field CALL_PHONE string +---@field CALL_PRIVILEGED string +---@field CAMERA string +---@field CAPTURE_AUDIO_OUTPUT string +---@field CAPTURE_SECURE_VIDEO_OUTPUT string +---@field CAPTURE_VIDEO_OUTPUT string +---@field CHANGE_COMPONENT_ENABLED_STATE string +---@field CHANGE_CONFIGURATION string +---@field CHANGE_NETWORK_STATE string +---@field CHANGE_WIFI_MULTICAST_STATE string +---@field CHANGE_WIFI_STATE string +---@field CLEAR_APP_CACHE string +---@field CONTROL_LOCATION_UPDATES string +---@field DELETE_CACHE_FILES string +---@field DELETE_PACKAGES string +---@field DIAGNOSTIC string +---@field DISABLE_KEYGUARD string +---@field DUMP string +---@field EXPAND_STATUS_BAR string +---@field FACTORY_TEST string +---@field FOREGROUND_SERVICE string +---@field GET_ACCOUNTS string +---@field GET_ACCOUNTS_PRIVILEGED string +---@field GET_PACKAGE_SIZE string +---@field GET_TASKS string +---@field GLOBAL_SEARCH string +---@field INSTALL_LOCATION_PROVIDER string +---@field INSTALL_PACKAGES string +---@field INSTALL_SHORTCUT string +---@field INSTANT_APP_FOREGROUND_SERVICE string +---@field INTERNET string +---@field KILL_BACKGROUND_PROCESSES string +---@field LOCATION_HARDWARE string +---@field MANAGE_DOCUMENTS string +---@field MANAGE_OWN_CALLS string +---@field MASTER_CLEAR string +---@field MEDIA_CONTENT_CONTROL string +---@field MODIFY_AUDIO_SETTINGS string +---@field MODIFY_PHONE_STATE string +---@field MOUNT_FORMAT_FILESYSTEMS string +---@field MOUNT_UNMOUNT_FILESYSTEMS string +---@field NFC string +---@field NFC_TRANSACTION_EVENT string +---@field PACKAGE_USAGE_STATS string +---@field PERSISTENT_ACTIVITY string +---@field PROCESS_OUTGOING_CALLS string +---@field READ_CALENDAR string +---@field READ_CALL_LOG string +---@field READ_CONTACTS string +---@field READ_EXTERNAL_STORAGE string +---@field READ_FRAME_BUFFER string +---@field READ_INPUT_STATE string +---@field READ_LOGS string +---@field READ_PHONE_NUMBERS string +---@field READ_PHONE_STATE string +---@field READ_SMS string +---@field READ_SYNC_SETTINGS string +---@field READ_SYNC_STATS string +---@field READ_VOICEMAIL string +---@field REBOOT string +---@field RECEIVE_BOOT_COMPLETED string +---@field RECEIVE_MMS string +---@field RECEIVE_SMS string +---@field RECEIVE_WAP_PUSH string +---@field RECORD_AUDIO string +---@field REORDER_TASKS string +---@field REQUEST_COMPANION_RUN_IN_BACKGROUND string +---@field REQUEST_COMPANION_USE_DATA_IN_BACKGROUND string +---@field REQUEST_DELETE_PACKAGES string +---@field REQUEST_IGNORE_BATTERY_OPTIMIZATIONS string +---@field REQUEST_INSTALL_PACKAGES string +---@field RESTART_PACKAGES string +---@field SEND_RESPOND_VIA_MESSAGE string +---@field SEND_SMS string +---@field SET_ALARM string +---@field SET_ALWAYS_FINISH string +---@field SET_ANIMATION_SCALE string +---@field SET_DEBUG_APP string +---@field SET_PREFERRED_APPLICATIONS string +---@field SET_PROCESS_LIMIT string +---@field SET_TIME string +---@field SET_TIME_ZONE string +---@field SET_WALLPAPER string +---@field SET_WALLPAPER_HINTS string +---@field SIGNAL_PERSISTENT_PROCESSES string +---@field STATUS_BAR string +---@field SYSTEM_ALERT_WINDOW string +---@field TRANSMIT_IR string +---@field UNINSTALL_SHORTCUT string +---@field UPDATE_DEVICE_STATS string +---@field USE_BIOMETRIC string +---@field USE_FINGERPRINT string +---@field USE_SIP string +---@field VIBRATE string +---@field WAKE_LOCK string +---@field WRITE_APN_SETTINGS string +---@field WRITE_CALENDAR string +---@field WRITE_CALL_LOG string +---@field WRITE_CONTACTS string +---@field WRITE_EXTERNAL_STORAGE string +---@field WRITE_GSERVICES string +---@field WRITE_SECURE_SETTINGS string +---@field WRITE_SETTINGS string +---@field WRITE_SYNC_SETTINGS string +---@field WRITE_VOICEMAIL string +local android = {} + +---@return any +function android:__gc() end + +---@return any +function android:__olua_move() end + +return android \ No newline at end of file diff --git a/addons/cclua/cclua/library/cclua/permission/status.lua b/addons/cclua/cclua/library/cclua/permission/status.lua new file mode 100644 index 00000000..79173f23 --- /dev/null +++ b/addons/cclua/cclua/library/cclua/permission/status.lua @@ -0,0 +1,22 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cclua.permission.status + +--- +---@class cclua.permission.status +---@field ALWAYS string +---@field AUTHORIZED string +---@field DENIED string +---@field LIMITED string +---@field NOT_DETERMINED string +---@field RESTRICTED string +---@field UNKNOWN string +---@field WHEN_IN_USE string +local status = {} + +---@return any +function status:__gc() end + +---@return any +function status:__olua_move() end + +return status \ No newline at end of file diff --git a/addons/cclua/cclua/library/cclua/photo.lua b/addons/cclua/cclua/library/cclua/photo.lua new file mode 100644 index 00000000..73e78fe5 --- /dev/null +++ b/addons/cclua/cclua/library/cclua/photo.lua @@ -0,0 +1,34 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cclua.photo + +--- +---@class cclua.photo +local photo = {} + +---@return any +function photo:__gc() end + +---@return any +function photo:__olua_move() end + +---@param event string +---@param data any +function photo.dispatch(event, data) end + +---@param cachePath string +function photo.select(cachePath) end + +---@param cachePath string +---@param width integer +---@param height integer +function photo.selectAvatar(cachePath, width, height) end + +---@param dispatcher cclua.Callback +function photo.setDispatcher(dispatcher) end + +---@param cachePath string +---@param width integer +---@param height integer +function photo.takeAvatar(cachePath, width, height) end + +return photo \ No newline at end of file diff --git a/addons/cclua/cclua/library/cclua/preferences.lua b/addons/cclua/cclua/library/cclua/preferences.lua new file mode 100644 index 00000000..10b24630 --- /dev/null +++ b/addons/cclua/cclua/library/cclua/preferences.lua @@ -0,0 +1,69 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cclua.preferences + +--- +---@class cclua.preferences +local preferences = {} + +---@return any +function preferences:__gc() end + +---@return any +function preferences:__olua_move() end + +---@param key string +function preferences.deleteKey(key) end + +function preferences.flush() end + +---@param key string +---@param defaultValue boolean +---@return boolean +---@overload fun(key: string): boolean +function preferences.getBoolean(key, defaultValue) end + +---@param key string +---@param defaultValue number +---@return number +---@overload fun(key: string): number +function preferences.getDouble(key, defaultValue) end + +---@param key string +---@param defaultValue number +---@return number +---@overload fun(key: string): number +function preferences.getFloat(key, defaultValue) end + +---@param key string +---@param defaultValue integer +---@return integer +---@overload fun(key: string): integer +function preferences.getInteger(key, defaultValue) end + +---@param key string +---@param defaultValue string +---@return string +---@overload fun(key: string): string +function preferences.getString(key, defaultValue) end + +---@param key string +---@param value boolean +function preferences.setBoolean(key, value) end + +---@param key string +---@param value number +function preferences.setDouble(key, value) end + +---@param key string +---@param value number +function preferences.setFloat(key, value) end + +---@param key string +---@param value integer +function preferences.setInteger(key, value) end + +---@param key string +---@param value string +function preferences.setString(key, value) end + +return preferences \ No newline at end of file diff --git a/addons/cclua/cclua/library/cclua/runtime.lua b/addons/cclua/cclua/library/cclua/runtime.lua new file mode 100644 index 00000000..24df40e5 --- /dev/null +++ b/addons/cclua/cclua/library/cclua/runtime.lua @@ -0,0 +1,253 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cclua.runtime + +--- +---@class cclua.runtime +---@field actionManager cc.ActionManager +---@field appBuild string +---@field appName string +---@field appVersion string +---@field args string[] +---@field audioSessionCatalog string +---@field channel string +---@field cocosVersion integer +---@field debug boolean +---@field deviceInfo string +---@field displayStats boolean +---@field eventDispatcher cc.EventDispatcher +---@field fileUtils cc.FileUtils +---@field frameRate integer +---@field language string +---@field logPath string +---@field manifestVersion string +---@field maxFrameRate integer +---@field networkStatus string +---@field os string +---@field packageName string +---@field paste string +---@field programCache ccb.ProgramCache +---@field restarting boolean +---@field runningScene cc.Scene +---@field sampleCount integer +---@field scheduler cc.Scheduler +---@field spriteFrameCache cc.SpriteFrameCache +---@field textureCache cc.TextureCache +---@field time number +---@field version string +local runtime = {} + +---@return any +function runtime:__gc() end + +---@return any +function runtime:__olua_move() end + +---@param title string +---@param message string +---@param ok string +---@param no string +---@param callback fun(arg1: boolean) +function runtime.alert(title, message, ok, no, callback) end + +---@param uri string +---@return boolean +function runtime.canOpenURL(uri) end + +---@param node cc.Node +---@param width number +---@param height number +---@param scale number +---@param format ccb.PixelFormat +---@param depthStencilFormat ccb.PixelFormat +---@return cc.Sprite +---@overload fun(node: cc.Node, width: number, height: number): cc.Sprite +---@overload fun(node: cc.Node, width: number, height: number, scale: number): cc.Sprite +---@overload fun(node: cc.Node, width: number, height: number, scale: number, format: ccb.PixelFormat): cc.Sprite +function runtime.capture(node, width, height, scale, format, depthStencilFormat) end + +function runtime.clearStorage() end + +function runtime.disableReport() end + +function runtime.exit() end + +function runtime.gc() end + +---@return cc.ActionManager +function runtime.getActionManager() end + +---@return string +function runtime.getAppBuild() end + +---@return string +function runtime.getAppName() end + +---@return string +function runtime.getAppVersion() end + +---@return string[] +function runtime.getArgs() end + +---@return string +function runtime.getAudioSessionCatalog() end + +---@return string +function runtime.getChannel() end + +---@return integer +function runtime.getCocosVersion() end + +---@return string +function runtime.getDeviceInfo() end + +---@param key string +---@return string +function runtime.getEnv(key) end + +---@return cc.EventDispatcher +function runtime.getEventDispatcher() end + +---@return cc.FileUtils +function runtime.getFileUtils() end + +---@return integer +function runtime.getFrameRate() end + +---@return string +function runtime.getLanguage() end + +---@return string +function runtime.getLogPath() end + +---@return string +function runtime.getManifestVersion() end + +---@return integer +function runtime.getMaxFrameRate() end + +---@return string +function runtime.getNetworkStatus() end + +---@return string +function runtime.getOS() end + +---@return string +function runtime.getPackageName() end + +---@return string +function runtime.getPaste() end + +---@param permission string +---@return string +function runtime.getPermission(permission) end + +---@return ccb.ProgramCache +function runtime.getProgramCache() end + +---@return cc.Scene +function runtime.getRunningScene() end + +---@return integer +function runtime.getSampleCount() end + +---@return cc.Scheduler +function runtime.getScheduler() end + +---@return cc.SpriteFrameCache +function runtime.getSpriteFrameCache() end + +---@return cc.TextureCache +function runtime.getTextureCache() end + +---@return number +function runtime.getTime() end + +---@return string +function runtime.getVersion() end + +---@param api string +---@return boolean +function runtime.hasFeature(api) end + +---@param path string +function runtime.installAPK(path) end + +---@return boolean +function runtime.isDebug() end + +---@return boolean +function runtime.isDisplayStats() end + +---@return boolean +function runtime.isRestarting() end + +---@param scriptPath string +---@return boolean +function runtime.launch(scriptPath) end + +---@param name string +---@return any +---@overload fun(name: string, feature: string): any +function runtime.load(name) end + +---@param uri string +---@param callback fun(arg1: boolean) +---@overload fun(uri: string) +function runtime.openURL(uri, callback) end + +function runtime.popScene() end + +function runtime.popToRootScene() end + +function runtime.printFeatures() end + +function runtime.purgeCachedData() end + +---@param scene cc.Scene +function runtime.pushScene(scene) end + +---@param scene cc.Scene +function runtime.replaceScene(scene) end + +---@param permission string +---@param callback fun(arg1: string) +function runtime.requestPermission(permission, callback) end + +---@return boolean +function runtime.restart() end + +---@param catalog string +function runtime.setAudioSessionCatalog(catalog) end + +---@param dispatcher cclua.Callback +function runtime.setDispatcher(dispatcher) end + +---@param displayStats boolean +function runtime.setDisplayStats(displayStats) end + +---@param key string +---@param value string +---@param save boolean +---@overload fun(key: string, value: string) +function runtime.setEnv(key, value, save) end + +---@param frameRate integer +function runtime.setFrameRate(frameRate) end + +---@param path string +function runtime.setLogPath(path) end + +---@param version string +function runtime.setManifestVersion(version) end + +---@param text string +function runtime.setPaste(text) end + +---@param samples integer +function runtime.setSampleCount(samples) end + +function runtime.showLog() end + +function runtime.testCrash() end + +return runtime \ No newline at end of file diff --git a/addons/cclua/cclua/library/cclua/timer.lua b/addons/cclua/cclua/library/cclua/timer.lua new file mode 100644 index 00000000..7b453dff --- /dev/null +++ b/addons/cclua/cclua/library/cclua/timer.lua @@ -0,0 +1,37 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cclua.timer + +--- +---@class cclua.timer +local timer = {} + +---@return any +function timer:__gc() end + +---@return any +function timer:__olua_move() end + +---@return string +function timer.createTag() end + +---@param time number +---@param callback fun() +function timer.delay(time, callback) end + +---@param time number +---@param tag string +---@param callback fun() +function timer.delayWithTag(time, tag, callback) end + +---@param tag string +function timer.killDelay(tag) end + +---@param interval number +---@param tag string +---@param callback fun(arg1: number) +function timer.schedule(interval, tag, callback) end + +---@param tag string +function timer.unschedule(tag) end + +return timer \ No newline at end of file diff --git a/addons/cclua/cclua/library/cclua/window.lua b/addons/cclua/cclua/library/cclua/window.lua new file mode 100644 index 00000000..39161357 --- /dev/null +++ b/addons/cclua/cclua/library/cclua/window.lua @@ -0,0 +1,44 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cclua.window + +--- +---@class cclua.window +---@field designSize cc.Size +---@field frameSize cc.Size +---@field visibleBounds cc.Bounds +---@field visibleSize cc.Size +local window = {} + +---@return any +function window:__gc() end + +---@return any +function window:__olua_move() end + +---@param position cc.Vec2 +---@return cc.Vec2 +---@overload fun(position: cc.Vec2): cc.Vec2 +function window.convertToCameraSpace(position) end + +---@return cc.Size +function window.getDesignSize() end + +---@return cc.Size +function window.getFrameSize() end + +---@return cc.Bounds +function window.getVisibleBounds() end + +---@return cc.Size +function window.getVisibleSize() end + +---@param size cc.Size +---@param resolutionPolicy cc.ResolutionPolicy +---@overload fun(size: cc.Size, resolutionPolicy: cc.ResolutionPolicy) +function window.setDesignSize(size, resolutionPolicy) end + +---@param size cc.Size +---@overload fun(size: cc.Size) +function window.setFrameSize(size) end + +return window \ No newline at end of file diff --git a/addons/cclua/cocos2d/config.json b/addons/cclua/cocos2d/config.json new file mode 100644 index 00000000..0a5d99a5 --- /dev/null +++ b/addons/cclua/cocos2d/config.json @@ -0,0 +1,6 @@ +{ + "$schema": "https://raw.githubusercontent.com/LuaLS/LLS-Addons/main/schemas/addon_config.schema.json", + "words": ["%s+-cocos2d"], + "files": ["cocos2d"], + "settings": {} +} \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/AccelAmplitude.lua b/addons/cclua/cocos2d/library/cc/AccelAmplitude.lua new file mode 100644 index 00000000..78de03f6 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/AccelAmplitude.lua @@ -0,0 +1,24 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.AccelAmplitude + +---AccelAmplitude action. +---\js NA +---@class cc.AccelAmplitude : cc.ActionInterval +---@field rate number Get the value of amplitude rate. \return The value of amplitude rate. +local AccelAmplitude = {} + +---Create the action with an inner action that has the amplitude property, and a duration time. +---@param action cc.Action # A pointer of the inner action. +---@param duration number # Specify the duration of the AccelAmplitude action. +---@return cc.AccelAmplitude # Return a pointer of AccelAmplitude action. When the creation failed, return nil. +function AccelAmplitude.create(action, duration) end + +---Get the value of amplitude rate. +---@return number # The value of amplitude rate. +function AccelAmplitude:getRate() end + +---Set the value of amplitude rate. +---@param rate number # Specify the value of amplitude rate. +function AccelAmplitude:setRate(rate) end + +return AccelAmplitude \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/AccelDeccelAmplitude.lua b/addons/cclua/cocos2d/library/cc/AccelDeccelAmplitude.lua new file mode 100644 index 00000000..ffab0a05 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/AccelDeccelAmplitude.lua @@ -0,0 +1,24 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.AccelDeccelAmplitude + +---AccelDeccelAmplitude action. +---\js NA +---@class cc.AccelDeccelAmplitude : cc.ActionInterval +---@field rate number Get the value of amplitude rate. \return the value of amplitude rate. +local AccelDeccelAmplitude = {} + +---Create the action with an inner action that has the amplitude property, and a duration time. +---@param action cc.Action # A pointer of the inner action. +---@param duration number # Specify the duration of the AccelDeccelAmplitude action. +---@return cc.AccelDeccelAmplitude # Return a pointer of AccelDeccelAmplitude action. When the creation failed, return nil. +function AccelDeccelAmplitude.create(action, duration) end + +---Get the value of amplitude rate. +---@return number # the value of amplitude rate. +function AccelDeccelAmplitude:getRate() end + +---Set the value of amplitude rate. +---@param rate number # Specify the value of amplitude rate. +function AccelDeccelAmplitude:setRate(rate) end + +return AccelDeccelAmplitude \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/Acceleration.lua b/addons/cclua/cocos2d/library/cc/Acceleration.lua new file mode 100644 index 00000000..95715e6c --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/Acceleration.lua @@ -0,0 +1,13 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.Acceleration + +---\struct Acceleration +---The device accelerometer reports values for each axis in units of g-force. +---@class cc.Acceleration : cc.Ref +---@field timestamp number +---@field x number +---@field y number +---@field z number +local Acceleration = {} + +return Acceleration \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/Action.lua b/addons/cclua/cocos2d/library/cc/Action.lua new file mode 100644 index 00000000..4a1d7b19 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/Action.lua @@ -0,0 +1,105 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.Action + +---Base class for Action objects. +---@class cc.Action : cc.Ref +---@field done boolean Return true if the action has finished.

\return Is true if the action has finished. +---@field flags integer Returns a flag field that is used to group the actions easily.

\return A tag. +---@field originalTarget cc.Node Return a original Target.

\return A original Target. +---@field tag integer Returns a tag that is used to identify the action easily.

\return A tag. +---@field target cc.Node Return certain target.

\return A certain target. +---@field INVALID_TAG integer +local Action = {} + +---@param cls string +---@return any +function Action:as(cls) end + +---Returns a clone of action. +--- +---@return cc.Action # A clone action. +function Action:clone() end + +---\js NA +---\lua NA +---@return string +function Action:description() end + +---Returns a flag field that is used to group the actions easily. +--- +---@return integer # A tag. +function Action:getFlags() end + +---Return a original Target. +--- +---@return cc.Node # A original Target. +function Action:getOriginalTarget() end + +---Returns a tag that is used to identify the action easily. +--- +---@return integer # A tag. +function Action:getTag() end + +---Return certain target. +--- +---@return cc.Node # A certain target. +function Action:getTarget() end + +---Return true if the action has finished. +--- +---@return boolean # Is true if the action has finished. +function Action:isDone() end + +---Returns a new action that performs the exact reverse of the action. +--- +---@return cc.Action # A new action that performs the exact reverse of the action. +---\js NA +function Action:reverse() end + +---Changes the flag field that is used to group the actions easily. +--- +---@param flags integer # Used to group the actions easily. +function Action:setFlags(flags) end + +---Set the original target, since target can be nil. +---Is the target that were used to run the action. Unless you are doing something complex, like ActionManager, you should NOT call this method. +---The target is 'assigned', it is not 'retained'. +---\since v0.8.2 +--- +---@param originalTarget cc.Node # Is 'assigned', it is not 'retained'. +function Action:setOriginalTarget(originalTarget) end + +---Changes the tag that is used to identify the action easily. +--- +---@param tag integer # Used to identify the action easily. +function Action:setTag(tag) end + +---The action will modify the target properties. +--- +---@param target cc.Node # A certain target. +function Action:setTarget(target) end + +---Called before the action start. It will also set the target. +--- +---@param target cc.Node # A certain target. +function Action:startWithTarget(target) end + +---Called every frame with it's delta time, dt in seconds. DON'T override unless you know what you are doing. +--- +---@param dt number # In seconds. +function Action:step(dt) end + +---Called after the action has finished. It will set the 'target' to nil. +---IMPORTANT: You should never call "Action::stop()" manually. Instead, use: "target->stopAction(action);". +function Action:stop() end + +---Called once per frame. time a value between 0 and 1. +---For example: +---- 0 Means that the action just started. +---- 0.5 Means that the action is in the middle. +---- 1 Means that the action is over. +--- +---@param time number # A value between 0 and 1. +function Action:update(time) end + +return Action \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/ActionCamera.lua b/addons/cclua/cocos2d/library/cc/ActionCamera.lua new file mode 100644 index 00000000..0e255390 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/ActionCamera.lua @@ -0,0 +1,31 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.ActionCamera + +---Base class for Camera actions. +---\ingroup Actions +---@class cc.ActionCamera : cc.ActionInterval +---@field center cc.Vec3 +---@field eye cc.Vec3 +---@field up cc.Vec3 +local ActionCamera = {} + +---@return cc.Vec3 +function ActionCamera:getCenter() end + +---@return cc.Vec3 +function ActionCamera:getEye() end + +---@return cc.Vec3 +function ActionCamera:getUp() end + +---@param center cc.Vec3 +function ActionCamera:setCenter(center) end + +---@param eye cc.Vec3 +---@overload fun(self: cc.ActionCamera, x: number, y: number, z: number) +function ActionCamera:setEye(eye) end + +---@param up cc.Vec3 +function ActionCamera:setUp(up) end + +return ActionCamera \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/ActionEase.lua b/addons/cclua/cocos2d/library/cc/ActionEase.lua new file mode 100644 index 00000000..8e158551 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/ActionEase.lua @@ -0,0 +1,17 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.ActionEase + +---\class ActionEase +---Base class for Easing actions. +---\details Ease actions are created from other interval actions. +---The ease action will change the timeline of the inner action. +---\ingroup Actions +---@class cc.ActionEase : cc.ActionInterval +---@field innerAction cc.ActionInterval Get the pointer of the inner action. \return The pointer of the inner action. +local ActionEase = {} + +---Get the pointer of the inner action. +---@return cc.ActionInterval # The pointer of the inner action. +function ActionEase:getInnerAction() end + +return ActionEase \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/ActionFloat.lua b/addons/cclua/cocos2d/library/cc/ActionFloat.lua new file mode 100644 index 00000000..cf186c58 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/ActionFloat.lua @@ -0,0 +1,19 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.ActionFloat + +---\class ActionFloat +---Action used to animate any value in range [from,to] over specified time interval +---@class cc.ActionFloat : cc.ActionInterval +local ActionFloat = {} + +---Creates FloatAction with specified duration, from value, to value and callback to report back +---results +---@param duration number # of the action +---@param from number # value to start from +---@param to number # value to be at the end of the action +---@param callback cc.ActionFloat.ActionFloatCallback # to report back result +--- +---@return cc.ActionFloat # An autoreleased ActionFloat object +function ActionFloat.create(duration, from, to, callback) end + +return ActionFloat \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/ActionFloat/ActionFloatCallback.lua b/addons/cclua/cocos2d/library/cc/ActionFloat/ActionFloatCallback.lua new file mode 100644 index 00000000..8515d709 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/ActionFloat/ActionFloatCallback.lua @@ -0,0 +1,14 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.ActionFloat.ActionFloatCallback + +--- +--- +---std::function +---@class cc.ActionFloat.ActionFloatCallback +local ActionFloatCallback = {} + +---@return cc.ActionFloat.ActionFloatCallback + +function ActionFloatCallback:__call() end + +return ActionFloatCallback \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/ActionInstant.lua b/addons/cclua/cocos2d/library/cc/ActionInstant.lua new file mode 100644 index 00000000..55dd6a1b --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/ActionInstant.lua @@ -0,0 +1,9 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.ActionInstant + +---\class ActionInstant +---Instant actions are immediate actions. They don't have a duration like the IntervalAction actions. +---@class cc.ActionInstant : cc.FiniteTimeAction +local ActionInstant = {} + +return ActionInstant \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/ActionInterval.lua b/addons/cclua/cocos2d/library/cc/ActionInterval.lua new file mode 100644 index 00000000..210c84a3 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/ActionInterval.lua @@ -0,0 +1,26 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.ActionInterval + +---\addtogroup _2d +---\{ +---@class cc.ActionInterval : cc.FiniteTimeAction +---@field amplitudeRate number Gets the amplitude rate, extension in GridAction

\return The amplitude rate. +---@field elapsed number How many seconds had elapsed since the actions started to run.

\return The seconds had elapsed since the actions started to run. +local ActionInterval = {} + +---Gets the amplitude rate, extension in GridAction +--- +---@return number # The amplitude rate. +function ActionInterval:getAmplitudeRate() end + +---How many seconds had elapsed since the actions started to run. +--- +---@return number # The seconds had elapsed since the actions started to run. +function ActionInterval:getElapsed() end + +---Sets the amplitude rate, extension in GridAction +--- +---@param amp number # The amplitude rate. +function ActionInterval:setAmplitudeRate(amp) end + +return ActionInterval \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/ActionManager.lua b/addons/cclua/cocos2d/library/cc/ActionManager.lua new file mode 100644 index 00000000..ef3f16dd --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/ActionManager.lua @@ -0,0 +1,127 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.ActionManager + +---\class ActionManager +---ActionManager is a singleton that manages all the actions. +---Normally you won't need to use this singleton directly. 99% of the cases you will use the Node interface, +---which uses this singleton. +---But there are some cases where you might need to use this singleton. +---Examples: +---- When you want to run an action where the target is different from a Node. +---- When you want to pause / resume the actions. +--- +---\since v0.8 +---@class cc.ActionManager : cc.Ref +---@field numberOfRunningActions integer Returns the numbers of actions that are running in all targets. \return The numbers of actions that are running in all target. \js NA +local ActionManager = {} + +---Adds an action with a target. +---If the target is already present, then the action will be added to the existing target. +---If the target is not present, a new instance of this target will be created either paused or not, and the action will be added to the newly created target. +---When the target is paused, the queued actions won't be 'ticked'. +--- +---@param action cc.Action # A certain action. +---@param target cc.Node # The target which need to be added an action. +---@param paused boolean # Is the target paused or not. +function ActionManager:addAction(action, target, paused) end + +---Gets an action given its tag an a target. +--- +---@param tag integer # The action's tag. +---@param target cc.Node # A certain target. +---@return cc.Action # The Action the with the given tag. +function ActionManager:getActionByTag(tag, target) end + +---Returns the numbers of actions that are running in all targets. +---@return integer # The numbers of actions that are running in all target. +---\js NA +function ActionManager:getNumberOfRunningActions() end + +---Returns the numbers of actions that are running in a certain target. +---Composable actions are counted as 1 action. Example: +---- If you are running 1 Sequence of 7 actions, it will return 1. +---- If you are running 7 Sequences of 2 actions, it will return 7. +--- +---@param target cc.Node # A certain target. +---@return integer # The numbers of actions that are running in a certain target. +---\js NA +function ActionManager:getNumberOfRunningActionsInTarget(target) end + +---Returns the numbers of actions that are running in a +---certain target with a specific tag. +---Like getNumberOfRunningActionsInTarget Composable actions +---are counted as 1 action. Example: +---- If you are running 1 Sequence of 7 actions, it will return 1. +---- If you are running 7 Sequences of 2 actions, it will return 7. +--- +---@param target cc.Node # A certain target. +---@param tag integer # Tag that will be searched. +---@return integer # The numbers of actions that are running in a certain target +---with a specific tag. +---\see getNumberOfRunningActionsInTarget +---\js NA +function ActionManager:getNumberOfRunningActionsInTargetByTag(target, tag) end + +---\js ctor +---@return cc.ActionManager +function ActionManager.new() end + +---Pauses all running actions, returning a list of targets whose actions were paused. +--- +---@return any # A list of targets whose actions were paused. +function ActionManager:pauseAllRunningActions() end + +---Pauses the target: all running actions and newly added actions will be paused. +--- +---@param target cc.Node # A certain target. +function ActionManager:pauseTarget(target) end + +---Removes an action given an action reference. +--- +---@param action cc.Action # A certain target. +function ActionManager:removeAction(action) end + +---Removes an action given its tag and the target. +--- +---@param tag integer # The action's tag. +---@param target cc.Node # A certain target. +function ActionManager:removeActionByTag(tag, target) end + +---Removes all actions matching at least one bit in flags and the target. +--- +---@param flags integer # The flag field to match the actions' flags based on bitwise AND. +---@param target cc.Node # A certain target. +---\js NA +function ActionManager:removeActionsByFlags(flags, target) end + +---Removes all actions from all the targets. +function ActionManager:removeAllActions() end + +---Removes all actions given its tag and the target. +--- +---@param tag integer # The actions' tag. +---@param target cc.Node # A certain target. +---\js NA +function ActionManager:removeAllActionsByTag(tag, target) end + +---Removes all actions from a certain target. +---All the actions that belongs to the target will be removed. +--- +---@param target cc.Node # A certain target. +function ActionManager:removeAllActionsFromTarget(target) end + +---Resumes the target. All queued actions will be resumed. +--- +---@param target cc.Node # A certain target. +function ActionManager:resumeTarget(target) end + +---Resume a set of targets (convenience function to reverse a pauseAllRunningActions call). +--- +---@param targetsToResume any # A set of targets need to be resumed. +function ActionManager:resumeTargets(targetsToResume) end + +---Main loop of ActionManager. +---@param dt number # In seconds. +function ActionManager:update(dt) end + +return ActionManager \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/ActionTween.lua b/addons/cclua/cocos2d/library/cc/ActionTween.lua new file mode 100644 index 00000000..ce771043 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/ActionTween.lua @@ -0,0 +1,29 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.ActionTween + +---ActionTween +---ActionTween is an action that lets you update any property of an object. +---For example, if you want to modify the "width" property of a target from 200 to 300 in 2 seconds, then: +---\code +---auto modifyWidth = ActionTween::create(2, "width", 200, 300); +---target->runAction(modifyWidth); +---\endcode +---Another example: ScaleTo action could be rewritten using PropertyAction: +---\code +---scaleA and scaleB are equivalents +---auto scaleA = ScaleTo::create(2, 3); // (duration, to) +---auto scaleB = ActionTween::create(2, "scale", 1, 3); // (duration, key, from, to) +---\endcode +---\since v0.99.2 +---@class cc.ActionTween : cc.ActionInterval +local ActionTween = {} + +---Create and initializes the action with the property name (key), and the from and to parameters. +---@param duration number # The duration of the ActionTween. It's a value in seconds. +---@param key string # The key of property which should be updated. +---@param from number # The value of the specified property when the action begin. +---@param to number # The value of the specified property when the action end. +---@return cc.ActionTween # If the creation success, return a pointer of ActionTween; otherwise, return nil. +function ActionTween.create(duration, key, from, to) end + +return ActionTween \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/ActionTweenDelegate.lua b/addons/cclua/cocos2d/library/cc/ActionTweenDelegate.lua new file mode 100644 index 00000000..d723b0d7 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/ActionTweenDelegate.lua @@ -0,0 +1,24 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.ActionTweenDelegate + +---The delegate class for ActionTween. +---\details If you want to use ActionTween on a node. +---You should implement the node follow these steps: +---1. The node should be inherit from ActionTweenDelegate. +---2. Override the virtual method updateTweenAction in the node. +---Then once you running ActionTween on the node, the method updateTweenAction will be invoked. +---@class cc.ActionTweenDelegate +local ActionTweenDelegate = {} + +---@return any +function ActionTweenDelegate:__gc() end + +---@return any +function ActionTweenDelegate:__olua_move() end + +---The callback function when ActionTween is running. +---@param value number # The new value of the specified key. +---@param key string # The key of property which should be updated. +function ActionTweenDelegate:updateTweenAction(value, key) end + +return ActionTweenDelegate \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/AffineTransform.lua b/addons/cclua/cocos2d/library/cc/AffineTransform.lua new file mode 100644 index 00000000..ca3fe24c --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/AffineTransform.lua @@ -0,0 +1,30 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.AffineTransform + +---\{ +---Affine transform +---a b 0 +---c d 0 +---tx ty 1 +--- +---Identity +---1 0 0 +---0 1 0 +---0 0 1 +---@class cc.AffineTransform +---@field a number +---@field b number +---@field c number +---@field d number +---@field tx number +---@field ty number +---@field IDENTITY cc.AffineTransform +local AffineTransform = {} + +---@return any +function AffineTransform:__gc() end + +---@return any +function AffineTransform:__olua_move() end + +return AffineTransform \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/AmbientLight.lua b/addons/cclua/cocos2d/library/cc/AmbientLight.lua new file mode 100644 index 00000000..552e31e3 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/AmbientLight.lua @@ -0,0 +1,17 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.AmbientLight + +---\js NA +---@class cc.AmbientLight : cc.BaseLight +local AmbientLight = {} + +---Creates a ambient light. +---@param color any # The light's color. +--- +---@return cc.AmbientLight # The new ambient light. +function AmbientLight.create(color) end + +---@return cc.AmbientLight +function AmbientLight.new() end + +return AmbientLight \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/Animate.lua b/addons/cclua/cocos2d/library/cc/Animate.lua new file mode 100644 index 00000000..3e00f86d --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/Animate.lua @@ -0,0 +1,31 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.Animate + +---\class Animate +---Animates a sprite given the name of an Animation. +---@class cc.Animate : cc.ActionInterval +---@field animation cc.Animation returns the Animation object that is being animated

\return Gets the animation object that is being animated. +---@field currentFrameIndex integer Gets the index of sprite frame currently displayed. \return int the index of sprite frame currently displayed. +local Animate = {} + +---Creates the action with an Animation and will restore the original frame when the animation is over. +--- +---@param animation cc.Animation # A certain animation. +---@return cc.Animate # An autoreleased Animate object. +function Animate.create(animation) end + +---returns the Animation object that is being animated +--- +---@return cc.Animation # Gets the animation object that is being animated. +function Animate:getAnimation() end + +---Gets the index of sprite frame currently displayed. +---@return integer # int the index of sprite frame currently displayed. +function Animate:getCurrentFrameIndex() end + +---Sets the Animation object to be animated +--- +---@param animation cc.Animation # certain animation. +function Animate:setAnimation(animation) end + +return Animate \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/Animation.lua b/addons/cclua/cocos2d/library/cc/Animation.lua new file mode 100644 index 00000000..5bc225ad --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/Animation.lua @@ -0,0 +1,135 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.Animation + +---\class Animation +---A Animation object is used to perform animations on the Sprite objects. +---The Animation object contains AnimationFrame objects, and a possible delay between the frames. +---You can animate a Animation object by using the Animate action. Example: +---\code +---sprite->runAction(Animate::create(animation)); +---\endcode +---@class cc.Animation : cc.Ref +---@field delayPerUnit number Gets the delay in seconds of the "delay unit".

\return The delay in seconds of the "delay unit". +---@field duration number Gets the duration in seconds of the whole animation. It is the result of totalDelayUnits * delayPerUnit.

\return Result of totalDelayUnits * delayPerUnit. +---@field frames any Gets the array of AnimationFrames.

\return The array of AnimationFrames. +---@field loops integer Gets the times the animation is going to loop. 0 means animation is not animated. 1, animation is executed one time, ...

\return The times the animation is going to loop. +---@field restoreOriginalFrame boolean Checks whether to restore the original frame when animation finishes.

\return Restore the original frame when animation finishes. +---@field totalDelayUnits number Gets the total Delay units of the Animation.

\return The total Delay units of the Animation. +local Animation = {} + +---Adds a SpriteFrame to a Animation. +--- +---@param frame cc.SpriteFrame # The frame will be added with one "delay unit". +function Animation:addSpriteFrame(frame) end + +---Adds a frame with an image filename. Internally it will create a SpriteFrame and it will add it. +---The frame will be added with one "delay unit". +---Added to facilitate the migration from v0.8 to v0.9. +---@param filename string # The path of SpriteFrame. +function Animation:addSpriteFrameWithFile(filename) end + +---Adds a frame with a texture and a rect. Internally it will create a SpriteFrame and it will add it. +---The frame will be added with one "delay unit". +---Added to facilitate the migration from v0.8 to v0.9. +---@param pobTexture cc.Texture2D # A frame with a texture. +---@param rect cc.Rect # The Texture of rect. +function Animation:addSpriteFrameWithTexture(pobTexture, rect) end + +---@param cls string +---@return any +function Animation:as(cls) end + +---@return cc.Animation +function Animation:clone() end + +---Creates an animation. +---\since v0.99.5 +---@return cc.Animation +---@overload fun(arrayOfAnimationFrameNames: any, delayPerUnit: number, loops: integer): cc.Animation +---@overload fun(arrayOfAnimationFrameNames: any, delayPerUnit: number): cc.Animation +function Animation.create() end + +---@param arrayOfSpriteFrameNames any +---@param delay number +---@param loops integer +---@return cc.Animation +---@overload fun(arrayOfSpriteFrameNames: any): cc.Animation +---@overload fun(arrayOfSpriteFrameNames: any, delay: number): cc.Animation +function Animation.createWithSpriteFrames(arrayOfSpriteFrameNames, delay, loops) end + +---Gets the delay in seconds of the "delay unit". +--- +---@return number # The delay in seconds of the "delay unit". +function Animation:getDelayPerUnit() end + +---Gets the duration in seconds of the whole animation. It is the result of totalDelayUnits * delayPerUnit. +--- +---@return number # Result of totalDelayUnits * delayPerUnit. +function Animation:getDuration() end + +---Gets the array of AnimationFrames. +--- +---@return any # The array of AnimationFrames. +function Animation:getFrames() end + +---Gets the times the animation is going to loop. 0 means animation is not animated. 1, animation is executed one time, ... +--- +---@return integer # The times the animation is going to loop. +function Animation:getLoops() end + +---Checks whether to restore the original frame when animation finishes. +--- +---@return boolean # Restore the original frame when animation finishes. +function Animation:getRestoreOriginalFrame() end + +---Gets the total Delay units of the Animation. +--- +---@return number # The total Delay units of the Animation. +function Animation:getTotalDelayUnits() end + +---Initializes a Animation. +---@return boolean +function Animation:init() end + +---Initializes a Animation with AnimationFrame. +---\since v2.0 +---@param arrayOfAnimationFrameNames any +---@param delayPerUnit number +---@param loops integer +---@return boolean +function Animation:initWithAnimationFrames(arrayOfAnimationFrameNames, delayPerUnit, loops) end + +---Initializes a Animation with frames and a delay between frames. +---\since v0.99.5 +---@param arrayOfSpriteFrameNames any +---@param delay number +---@param loops integer +---@return boolean +---@overload fun(self: cc.Animation, arrayOfSpriteFrameNames: any): boolean +---@overload fun(self: cc.Animation, arrayOfSpriteFrameNames: any, delay: number): boolean +function Animation:initWithSpriteFrames(arrayOfSpriteFrameNames, delay, loops) end + +---@return cc.Animation +function Animation.new() end + +---Sets the delay in seconds of the "delay unit". +--- +---@param delayPerUnit number # The delay in seconds of the "delay unit". +function Animation:setDelayPerUnit(delayPerUnit) end + +---Sets the array of AnimationFrames. +--- +---@param frames any # The array of AnimationFrames. +function Animation:setFrames(frames) end + +---Sets the times the animation is going to loop. 0 means animation is not animated. 1, animation is executed one time, ... +--- +---@param loops integer # The times the animation is going to loop. +function Animation:setLoops(loops) end + +---Sets whether to restore the original frame when animation finishes. +--- +---@param restoreOriginalFrame boolean # Whether to restore the original frame when animation finishes. +function Animation:setRestoreOriginalFrame(restoreOriginalFrame) end + +return Animation \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/AnimationCache.lua b/addons/cclua/cocos2d/library/cc/AnimationCache.lua new file mode 100644 index 00000000..9672552c --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/AnimationCache.lua @@ -0,0 +1,66 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.AnimationCache + +---Singleton that manages the Animations. +---It saves in a cache the animations. You should use this class if you want to save your animations in a cache. +--- +---Before v0.99.5, the recommend way was to save them on the Sprite. Since v0.99.5, you should use this class instead. +--- +---\since v0.99.5 +---\js cc.animationCache +---@class cc.AnimationCache : cc.Ref +---@field instance cc.AnimationCache Returns the shared instance of the Animation cache \js NA +local AnimationCache = {} + +---Adds a Animation with a name. +--- +---@param animation cc.Animation # An animation. +---@param name string # The name of animation. +function AnimationCache:addAnimation(animation, name) end + +---Adds an animation from an NSDictionary. +---Make sure that the frames were previously loaded in the SpriteFrameCache. +---@param dictionary any # An NSDictionary. +---@param plist string # The path of the relative file,it use to find the plist path for load SpriteFrames. +---\since v1.1 +---\js NA +function AnimationCache:addAnimationsWithDictionary(dictionary, plist) end + +---Adds an animation from a plist file. +---Make sure that the frames were previously loaded in the SpriteFrameCache. +---\since v1.1 +---\js addAnimations +---\lua addAnimations +---@param plist string # An animation from a plist file. +function AnimationCache:addAnimationsWithFile(plist) end + +---Purges the cache. It releases all the Animation objects and the shared instance. +---\js NA +function AnimationCache.destroyInstance() end + +---Returns a Animation that was previously added. +---If the name is not found it will return nil. +---You should retain the returned copy if you are going to use it. +--- +---@return cc.Animation # A Animation that was previously added. If the name is not found it will return nil. +---@param name string +function AnimationCache:getAnimation(name) end + +---Returns the shared instance of the Animation cache +---\js NA +---@return cc.AnimationCache +function AnimationCache.getInstance() end + +---@return boolean +function AnimationCache:init() end + +---\js ctor +---@return cc.AnimationCache +function AnimationCache.new() end + +---Deletes a Animation from the cache. +--- +---@param name string # The name of animation. +function AnimationCache:removeAnimation(name) end + +return AnimationCache \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/AnimationFrame.lua b/addons/cclua/cocos2d/library/cc/AnimationFrame.lua new file mode 100644 index 00000000..c92313e6 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/AnimationFrame.lua @@ -0,0 +1,76 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.AnimationFrame + +---\class AnimationFrame +--- +---A frame of the animation. It contains information like: +---- sprite frame name. +---- # of delay units. +---- offset +--- +---\since v2.0 +---@class cc.AnimationFrame : cc.Ref +---@field delayUnits number Gets the units of time the frame takes.

\return The units of time the frame takes. +---@field spriteFrame cc.SpriteFrame Return a SpriteFrameName to be used.

\return a SpriteFrameName to be used. +---@field userInfo any Gets user information A AnimationFrameDisplayedNotification notification will be broadcast when the frame is displayed with this dictionary as UserInfo. If UserInfo is nil, then no notification will be broadcast.

\return A dictionary as UserInfo +local AnimationFrame = {} + +---@param cls string +---@return any +function AnimationFrame:as(cls) end + +---@return cc.AnimationFrame +function AnimationFrame:clone() end + +---Creates the animation frame with a spriteframe, number of delay units and a notification user info. +--- +---@param spriteFrame cc.SpriteFrame # The animation frame with a spriteframe. +---@param delayUnits number # Number of delay units. +---@param userInfo any # A notification user info. +---\since 3.0 +---@return cc.AnimationFrame +function AnimationFrame.create(spriteFrame, delayUnits, userInfo) end + +---Gets the units of time the frame takes. +--- +---@return number # The units of time the frame takes. +function AnimationFrame:getDelayUnits() end + +---Return a SpriteFrameName to be used. +--- +---@return cc.SpriteFrame # a SpriteFrameName to be used. +function AnimationFrame:getSpriteFrame() end + +---Gets user information +---A AnimationFrameDisplayedNotification notification will be broadcast when the frame is displayed with this dictionary as UserInfo. +---If UserInfo is nil, then no notification will be broadcast. +--- +---@return any # A dictionary as UserInfo +function AnimationFrame:getUserInfo() end + +---initializes the animation frame with a spriteframe, number of delay units and a notification user info +---@param spriteFrame cc.SpriteFrame +---@param delayUnits number +---@param userInfo any +---@return boolean +function AnimationFrame:initWithSpriteFrame(spriteFrame, delayUnits, userInfo) end + +---\js ctor +---@return cc.AnimationFrame +function AnimationFrame.new() end + +---Sets the units of time the frame takes. +--- +---@param delayUnits number # The units of time the frame takes. +function AnimationFrame:setDelayUnits(delayUnits) end + +---Set the SpriteFrame. +--- +---@param frame cc.SpriteFrame # A SpriteFrame will be used. +function AnimationFrame:setSpriteFrame(frame) end + +---Sets user information. +---@param userInfo any # A dictionary as UserInfo. +function AnimationFrame:setUserInfo(userInfo) end + +return AnimationFrame \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/Application.lua b/addons/cclua/cocos2d/library/cc/Application.lua new file mode 100644 index 00000000..3a578963 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/Application.lua @@ -0,0 +1,17 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.Application + +--- +---@class cc.Application : cc.ApplicationProtocol +---@field instance cc.Application Get current application instance. \return Current application instance pointer. +local Application = {} + +---Get current application instance. +---@return cc.Application # Current application instance pointer. +function Application.getInstance() end + +---Run the message loop. +---@return integer +function Application:run() end + +return Application \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/ApplicationProtocol.lua b/addons/cclua/cocos2d/library/cc/ApplicationProtocol.lua new file mode 100644 index 00000000..49b388e3 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/ApplicationProtocol.lua @@ -0,0 +1,83 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.ApplicationProtocol + +---\addtogroup platform +---\{ +---@class cc.ApplicationProtocol +---@field currentLanguage cc.LanguageType Get current language config. \return Current language config. \js NA \lua NA +---@field currentLanguageCode string Get current language iso 639-1 code. \return Current language iso 639-1 code. \js NA \lua NA +---@field targetPlatform cc.ApplicationProtocol.Platform Get target platform. \js NA \lua NA +---@field version string Get application version. \js NA \lua NA +local ApplicationProtocol = {} + +---@return any +function ApplicationProtocol:__gc() end + +---@return any +function ApplicationProtocol:__olua_move() end + +---This function will be called when the application enters background. +---\js NA +---\lua NA +function ApplicationProtocol:applicationDidEnterBackground() end + +---Implement Director and Scene init code here. +---@return boolean # true Initialize success, app continue. +---\return false Initialize failed, app terminate. +---\js NA +---\lua NA +function ApplicationProtocol:applicationDidFinishLaunching() end + +---This function will be called when the application enters foreground. +---\js NA +---\lua NA +function ApplicationProtocol:applicationWillEnterForeground() end + +---Get current language config. +---@return cc.LanguageType # Current language config. +---\js NA +---\lua NA +function ApplicationProtocol:getCurrentLanguage() end + +---Get current language iso 639-1 code. +---@return string # Current language iso 639-1 code. +---\js NA +---\lua NA +function ApplicationProtocol:getCurrentLanguageCode() end + +---Get target platform. +---\js NA +---\lua NA +---@return cc.ApplicationProtocol.Platform +function ApplicationProtocol:getTargetPlatform() end + +---Get application version. +---\js NA +---\lua NA +---@return string +function ApplicationProtocol:getVersion() end + +---Subclass override the function to set OpenGL context attribution instead of use default value. +---And now can only set six attributions:redBits,greenBits,blueBits,alphaBits,depthBits,stencilBits. +---Default value are(5,6,5,0,16,0), usually use as follows: +---void AppDelegate::initGLContextAttrs(){ +---GLContextAttrs glContextAttrs = {8, 8, 8, 8, 24, 8}; +---GLView::setGLContextAttrs(glContextAttrs); +---} +function ApplicationProtocol:initGLContextAttrs() end + +---Open url in default browser. +---\param String with url to open. +---@return boolean # True if the resource located by the URL was successfully opened; otherwise false. +---\js NA +---\lua NA +---@param url string +function ApplicationProtocol:openURL(url) end + +---Callback by Director for limit FPS. +---@param interval number # The time, expressed in seconds, between current frame and next. +---\js NA +---\lua NA +function ApplicationProtocol:setAnimationInterval(interval) end + +return ApplicationProtocol \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/ApplicationProtocol/Platform.lua b/addons/cclua/cocos2d/library/cc/ApplicationProtocol/Platform.lua new file mode 100644 index 00000000..233db82d --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/ApplicationProtocol/Platform.lua @@ -0,0 +1,24 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.ApplicationProtocol.Platform + +---@type cc.ApplicationProtocol.Platform +local VALUE + +--- +---@enum cc.ApplicationProtocol.Platform +local Platform = { + ---< Android + OS_ANDROID = 3, + ---< iPad + OS_IPAD = 5, + ---< iPhone + OS_IPHONE = 4, + ---< Linux + OS_LINUX = 1, + ---< Mac OS X + OS_MAC = 2, + ---< Windows + OS_WINDOWS = 0, +} + +return Platform \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/AtlasNode.lua b/addons/cclua/cocos2d/library/cc/AtlasNode.lua new file mode 100644 index 00000000..c6d2bdbc --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/AtlasNode.lua @@ -0,0 +1,85 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.AtlasNode + +---AtlasNode is a subclass of Node that implements the RGBAProtocol and TextureProtocol protocol. +---It knows how to render a TextureAtlas object. +---If you are going to render a TextureAtlas consider subclassing AtlasNode (or a subclass of AtlasNode). +---All features from Node are valid, plus the following features: +---- opacity and RGB colors. +---@class cc.AtlasNode : cc.Node +---@field blendFunc cc.BlendFunc \lua NA +---@field quadsToDraw integer +---@field texture cc.Texture2D +---@field textureAtlas cc.TextureAtlas Return the buffer manager of the texture vertex.

\return Return A TextureAtlas. +local AtlasNode = {} + +---@param cls string +---@return any +function AtlasNode:as(cls) end + +---creates a AtlasNode with an Atlas file the width and height of each item and the quantity of items to render. +--- +---@param filename string # The path of Atlas file. +---@param tileWidth integer # The width of the item. +---@param tileHeight integer # The height of the item. +---@param itemsToRender integer # The quantity of items to render. +---@return cc.AtlasNode +function AtlasNode.create(filename, tileWidth, tileHeight, itemsToRender) end + +---\lua NA +---@return cc.BlendFunc +function AtlasNode:getBlendFunc() end + +---@return integer +function AtlasNode:getQuadsToDraw() end + +---@return cc.Texture2D +function AtlasNode:getTexture() end + +---Return the buffer manager of the texture vertex. +--- +---@return cc.TextureAtlas # Return A TextureAtlas. +function AtlasNode:getTextureAtlas() end + +---Initializes an AtlasNode with a texture the width and height of each item measured in points and the quantity of items to render +---@param texture cc.Texture2D +---@param tileWidth integer +---@param tileHeight integer +---@param itemsToRender integer +---@return boolean +function AtlasNode:initWithTexture(texture, tileWidth, tileHeight, itemsToRender) end + +---Initializes an AtlasNode with an Atlas file the width and height of each item and the quantity of items to render +---@param tile string +---@param tileWidth integer +---@param tileHeight integer +---@param itemsToRender integer +---@return boolean +function AtlasNode:initWithTileFile(tile, tileWidth, tileHeight, itemsToRender) end + +---@return cc.AtlasNode +function AtlasNode.new() end + +---\code +---When this function bound into js or lua,the parameter will be changed +---In js: var setBlendFunc(var src, var dst) +---\endcode +---\lua NA +---@param blendFunc cc.BlendFunc +function AtlasNode:setBlendFunc(blendFunc) end + +---@param quadsToDraw integer +function AtlasNode:setQuadsToDraw(quadsToDraw) end + +---@param texture cc.Texture2D +function AtlasNode:setTexture(texture) end + +---Set an buffer manager of the texture vertex. +---@param textureAtlas cc.TextureAtlas +function AtlasNode:setTextureAtlas(textureAtlas) end + +---updates the Atlas (indexed vertex array). +---Shall be overridden in subclasses. +function AtlasNode:updateAtlasValues() end + +return AtlasNode \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/AttachNode.lua b/addons/cclua/cocos2d/library/cc/AttachNode.lua new file mode 100644 index 00000000..b978c7ef --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/AttachNode.lua @@ -0,0 +1,20 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.AttachNode + +---attach a node to a bone +---usage: auto sprite = Sprite3D::create("girl.c3b"); +---auto weapon = Sprite3D::create("weapon.c3b"); +---auto attachNode = sprite->getAttachNode("left hand"); +---attachNode->addChild(weapon); +---@class cc.AttachNode : cc.Node +local AttachNode = {} + +---creates an AttachNode +---@param attachBone cc.Bone3D # The bone to which the AttachNode is going to attach, the attacheBone must be a bone of the AttachNode's parent +---@return cc.AttachNode +function AttachNode.create(attachBone) end + +---@return cc.AttachNode +function AttachNode.new() end + +return AttachNode \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/AudioEngine.lua b/addons/cclua/cocos2d/library/cc/AudioEngine.lua new file mode 100644 index 00000000..6b71b86d --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/AudioEngine.lua @@ -0,0 +1,190 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.AudioEngine + +---\class AudioEngine +--- +---Offers a interface to play audio. +--- +---\note Make sure to call AudioEngine::end() when the audio engine is not needed anymore to release resources. +---\js NA +---@class cc.AudioEngine +---@field defaultProfile cc.AudioProfile Gets the default profile of audio instances.

\return The default profile of audio instances. +---@field enabled boolean Check whether AudioEngine is enabled. +---@field maxAudioInstance integer Gets the maximum number of simultaneous audio instance of AudioEngine. +---@field playingAudioCount integer Gets playing audio count. +---@field INVALID_AUDIO_ID integer +---@field TIME_UNKNOWN number +local AudioEngine = {} + +---@return any +function AudioEngine:__gc() end + +---@return any +function AudioEngine:__olua_move() end + +---Release objects relating to AudioEngine. +--- +---\warning It must be called before the application exit. +---\lua endToLua +function AudioEngine.end_() end + +---Gets the current playback position of an audio instance. +--- +---@param audioID integer # An audioID returned by the play2d function. +---@return number # The current playback position of an audio instance. +function AudioEngine.getCurrentTime(audioID) end + +---Gets the default profile of audio instances. +--- +---@return cc.AudioProfile # The default profile of audio instances. +function AudioEngine.getDefaultProfile() end + +---Gets the duration of an audio instance. +--- +---@param audioID integer # An audioID returned by the play2d function. +---@return number # The duration of an audio instance. +function AudioEngine.getDuration(audioID) end + +---Gets the maximum number of simultaneous audio instance of AudioEngine. +---@return integer +function AudioEngine.getMaxAudioInstance() end + +---Gets playing audio count. +---@return integer +function AudioEngine.getPlayingAudioCount() end + +---Gets the audio profile by id of audio instance. +--- +---@param audioID integer # An audioID returned by the play2d function. +---@return cc.AudioProfile # The audio profile. +--- +---Gets an audio profile by name. +--- +---\param profileName A name of audio profile. +---\return The audio profile. +---@overload fun(profileName: string): cc.AudioProfile +function AudioEngine.getProfile(audioID) end + +---Returns the state of an audio instance. +--- +---@param audioID integer # An audioID returned by the play2d function. +---@return cc.AudioEngine.AudioState # The status of an audio instance. +function AudioEngine.getState(audioID) end + +---Gets the volume value of an audio instance. +--- +---@param audioID integer # An audioID returned by the play2d function. +---@return number # Volume value (range from 0.0 to 1.0). +function AudioEngine.getVolume(audioID) end + +---Check whether AudioEngine is enabled. +---@return boolean +function AudioEngine.isEnabled() end + +---Checks whether an audio instance is loop. +--- +---@param audioID integer # An audioID returned by the play2d function. +---@return boolean # Whether or not an audio instance is loop. +function AudioEngine.isLoop(audioID) end + +---@return boolean +function AudioEngine.lazyInit() end + +---Pause an audio instance. +--- +---@param audioID integer # An audioID returned by the play2d function. +function AudioEngine.pause(audioID) end + +---Pause all playing audio instances. +function AudioEngine.pauseAll() end + +---Play 2d sound. +--- +---@param filePath string # The path of an audio file. +---@param loop boolean # Whether audio instance loop or not. +---@param volume number # Volume value (range from 0.0 to 1.0). +---@param position number # The offset in seconds from the start. +---@param profile cc.AudioProfile # A profile for audio instance. When profile is not specified, default profile will be used. +---@return integer # An audio ID. It allows you to dynamically change the behavior of an audio instance on the fly. +--- +---\see `AudioProfile` +---@overload fun(filePath: string): integer +---@overload fun(filePath: string, loop: boolean): integer +---@overload fun(filePath: string, loop: boolean, volume: number): integer +---@overload fun(filePath: string, loop: boolean, volume: number, position: number): integer +function AudioEngine.play2d(filePath, loop, volume, position, profile) end + +---Preload audio file. +---@param filePath string # The file path of an audio. +--- +---Preload audio file. +---\param filePath The file path of an audio. +---\param callback A callback which will be called after loading is finished. +---@overload fun(filePath: string, callback: fun(arg1: boolean)) +function AudioEngine.preload(filePath) end + +---Resume an audio instance. +--- +---@param audioID integer # An audioID returned by the play2d function. +function AudioEngine.resume(audioID) end + +---Resume all suspended audio instances. +function AudioEngine.resumeAll() end + +---Sets the current playback position of an audio instance. +--- +---@param audioID integer # An audioID returned by the play2d function. +---@param sec number # The offset in seconds from the start to seek to. +---@return boolean # +function AudioEngine.setCurrentTime(audioID, sec) end + +---Whether to enable playing audios +---\note If it's disabled, current playing audios will be stopped and the later 'preload', 'play2d' methods will take no effects. +---@param isEnabled boolean +function AudioEngine.setEnabled(isEnabled) end + +---Register a callback to be invoked when an audio instance has completed playing. +--- +---@param audioID integer # An audioID returned by the play2d function. +---@param callback fun(arg1: integer, arg2: string) # +function AudioEngine.setFinishCallback(audioID, callback) end + +---Sets whether an audio instance loop or not. +--- +---@param audioID integer # An audioID returned by the play2d function. +---@param loop boolean # Whether audio instance loop or not. +function AudioEngine.setLoop(audioID, loop) end + +---Sets the maximum number of simultaneous audio instance for AudioEngine. +--- +---@param maxInstances integer # The maximum number of simultaneous audio instance. +---@return boolean +function AudioEngine.setMaxAudioInstance(maxInstances) end + +---Sets volume for an audio instance. +--- +---@param audioID integer # An audioID returned by the play2d function. +---@param volume number # Volume value (range from 0.0 to 1.0). +function AudioEngine.setVolume(audioID, volume) end + +---Stop an audio instance. +--- +---@param audioID integer # An audioID returned by the play2d function. +function AudioEngine.stop(audioID) end + +---Stop all audio instances. +function AudioEngine.stopAll() end + +---Uncache the audio data from internal buffer. +---AudioEngine cache audio data on ios,mac, and win32 platform. +--- +---\warning This can lead to stop related audio first. +---@param filePath string # Audio file path. +function AudioEngine.uncache(filePath) end + +---Uncache all audio data from internal buffer. +--- +---\warning All audio will be stopped first. +function AudioEngine.uncacheAll() end + +return AudioEngine \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/AudioEngine/AudioState.lua b/addons/cclua/cocos2d/library/cc/AudioEngine/AudioState.lua new file mode 100644 index 00000000..a9eac850 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/AudioEngine/AudioState.lua @@ -0,0 +1,16 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.AudioEngine.AudioState + +---@type cc.AudioEngine.AudioState +local VALUE + +--- +---@enum cc.AudioEngine.AudioState +local AudioState = { + ERROR = -1, + INITIALIZING = 0, + PAUSED = 2, + PLAYING = 1, +} + +return AudioState \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/AudioProfile.lua b/addons/cclua/cocos2d/library/cc/AudioProfile.lua new file mode 100644 index 00000000..096b086c --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/AudioProfile.lua @@ -0,0 +1,26 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.AudioProfile + +---\class AudioProfile +--- +--- +---\js NA +---@class cc.AudioProfile +---@field maxInstances integer +---@field minDelay number +---@field name string +local AudioProfile = {} + +---@return any +function AudioProfile:__gc() end + +---@return any +function AudioProfile:__olua_move() end + +---Default constructor +--- +---\lua new +---@return cc.AudioProfile +function AudioProfile.new() end + +return AudioProfile \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/BaseLight.lua b/addons/cclua/cocos2d/library/cc/BaseLight.lua new file mode 100644 index 00000000..637412e7 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/BaseLight.lua @@ -0,0 +1,38 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.BaseLight + +---\js NA +---@class cc.BaseLight : cc.Node +---@field enabled boolean +---@field intensity number intensity getter and setter +---@field lightFlag cc.LightFlag light flag getter and setter +---@field lightType cc.LightType Get the light type,light type MUST be one of LightType::DIRECTIONAL , LightType::POINT, LightType::SPOT, LightType::AMBIENT. +local BaseLight = {} + +---intensity getter and setter +---@return number +function BaseLight:getIntensity() end + +---light flag getter and setter +---@return cc.LightFlag +function BaseLight:getLightFlag() end + +---Get the light type,light type MUST be one of LightType::DIRECTIONAL , +---LightType::POINT, LightType::SPOT, LightType::AMBIENT. +---@return cc.LightType +function BaseLight:getLightType() end + +---@return boolean +function BaseLight:isEnabled() end + +---light enabled getter and setter. +---@param enabled boolean +function BaseLight:setEnabled(enabled) end + +---@param intensity number +function BaseLight:setIntensity(intensity) end + +---@param flag cc.LightFlag +function BaseLight:setLightFlag(flag) end + +return BaseLight \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/BezierBy.lua b/addons/cclua/cocos2d/library/cc/BezierBy.lua new file mode 100644 index 00000000..d4417254 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/BezierBy.lua @@ -0,0 +1,21 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.BezierBy + +---\class BezierBy +---An action that moves the target with a cubic Bezier curve by a certain distance. +---@class cc.BezierBy : cc.ActionInterval +local BezierBy = {} + +---Creates the action with a duration and a bezier configuration. +---@param t number # Duration time, in seconds. +---@param c cc.ccBezierConfig # Bezier config. +---@return cc.BezierBy # An autoreleased BezierBy object. +---\code +---When this function bound to js or lua,the input params are changed. +---in js: var create(var t,var table) +---in lua: local create(local t, local table) +---\endcode +---@overload fun(t: number, c: cc.ccBezierConfig): cc.BezierBy +function BezierBy.create(t, c) end + +return BezierBy \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/BezierTo.lua b/addons/cclua/cocos2d/library/cc/BezierTo.lua new file mode 100644 index 00000000..9f3a7e10 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/BezierTo.lua @@ -0,0 +1,22 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.BezierTo + +---\class BezierTo +---An action that moves the target with a cubic Bezier curve to a destination point. +---\since v0.8.2 +---@class cc.BezierTo : cc.BezierBy +local BezierTo = {} + +---Creates the action with a duration and a bezier configuration. +---@param t number # Duration time, in seconds. +---@param c cc.ccBezierConfig # Bezier config. +---@return cc.BezierTo # An autoreleased BezierTo object. +---\code +---when this function bound to js or lua,the input params are changed +---in js: var create(var t,var table) +---in lua: local create(local t, local table) +---\endcode +---@overload fun(t: number, c: cc.ccBezierConfig): cc.BezierTo +function BezierTo.create(t, c) end + +return BezierTo \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/BillBoard.lua b/addons/cclua/cocos2d/library/cc/BillBoard.lua new file mode 100644 index 00000000..af884d66 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/BillBoard.lua @@ -0,0 +1,69 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.BillBoard + +---Inherit from Sprite, achieve BillBoard. +---@class cc.BillBoard : cc.Sprite +---@field mode cc.BillBoard.Mode Get the billboard rotation mode. +local BillBoard = {} + +---Creates an empty BillBoard without texture. You can call setTexture method subsequently. +--- +---@return cc.BillBoard # An autoreleased BillBoard object. +---@param mode cc.BillBoard.Mode +---@overload fun(): cc.BillBoard +--- +---Creates a BillBoard with an image filename. +--- +---After creation, the rect of BillBoard will be the size of the image, +---and the offset will be (0,0). +--- +---\param filename A path to image file, e.g., "scene1/monster.png" +---\return An autoreleased BillBoard object. +---@overload fun(filename: string, mode: cc.BillBoard.Mode): cc.BillBoard +--- +---Creates a BillBoard with an image filename. +--- +---After creation, the rect of BillBoard will be the size of the image, +---and the offset will be (0,0). +--- +---\param filename A path to image file, e.g., "scene1/monster.png" +---\return An autoreleased BillBoard object. +---@overload fun(filename: string): cc.BillBoard +--- +---Creates a BillBoard with an image filename and a rect. +--- +---\param filename A path to image file, e.g., "scene1/monster.png" +---\param rect A subrect of the image file +---\return An autoreleased BillBoard object +---@overload fun(filename: string, rect: cc.Rect, mode: cc.BillBoard.Mode): cc.BillBoard +--- +---Creates a BillBoard with an image filename and a rect. +--- +---\param filename A path to image file, e.g., "scene1/monster.png" +---\param rect A subrect of the image file +---\return An autoreleased BillBoard object +---@overload fun(filename: string, rect: cc.Rect): cc.BillBoard +function BillBoard.create(mode) end + +---Creates a BillBoard with a Texture2D object. +--- +---After creation, the rect will be the size of the texture, and the offset will be (0,0). +--- +---@param texture cc.Texture2D # A pointer to a Texture2D object. +---@return cc.BillBoard # An autoreleased BillBoard object +---@param mode cc.BillBoard.Mode +---@overload fun(texture: cc.Texture2D): cc.BillBoard +function BillBoard.createWithTexture(texture, mode) end + +---Get the billboard rotation mode. +---@return cc.BillBoard.Mode +function BillBoard:getMode() end + +---@return cc.BillBoard +function BillBoard.new() end + +---Set the billboard rotation mode. +---@param mode cc.BillBoard.Mode +function BillBoard:setMode(mode) end + +return BillBoard \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/BillBoard/Mode.lua b/addons/cclua/cocos2d/library/cc/BillBoard/Mode.lua new file mode 100644 index 00000000..4f70c223 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/BillBoard/Mode.lua @@ -0,0 +1,14 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.BillBoard.Mode + +---@type cc.BillBoard.Mode +local VALUE + +--- +---@enum cc.BillBoard.Mode +local Mode = { + VIEW_PLANE_ORIENTED = 1, + VIEW_POINT_ORIENTED = 0, +} + +return Mode \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/BlendFunc.lua b/addons/cclua/cocos2d/library/cc/BlendFunc.lua new file mode 100644 index 00000000..92a9224e --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/BlendFunc.lua @@ -0,0 +1,21 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.BlendFunc + +---\struct BlendFunc +---Blend Function used for textures. +---@class cc.BlendFunc +---@field dst ccb.BlendFactor +---@field src ccb.BlendFactor +---@field ADDITIVE cc.BlendFunc +---@field ALPHA_NON_PREMULTIPLIED cc.BlendFunc +---@field ALPHA_PREMULTIPLIED cc.BlendFunc +---@field DISABLE cc.BlendFunc +local BlendFunc = {} + +---@return any +function BlendFunc:__gc() end + +---@return any +function BlendFunc:__olua_move() end + +return BlendFunc \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/BlendProtocol.lua b/addons/cclua/cocos2d/library/cc/BlendProtocol.lua new file mode 100644 index 00000000..337f28af --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/BlendProtocol.lua @@ -0,0 +1,32 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.BlendProtocol + +---Specify the blending function according glBlendFunc +---Please refer to glBlendFunc in OpenGL ES Manual +---http://www.khronos.org/opengles/sdk/docs/man/xhtml/glBlendFunc.xml for more details. +---@class cc.BlendProtocol +---@field blendFunc cc.BlendFunc Returns the blending function that is currently being used.

\return A BlendFunc structure with source and destination factor which specified pixel arithmetic. \js NA \lua NA +local BlendProtocol = {} + +---@return any +function BlendProtocol:__gc() end + +---@return any +function BlendProtocol:__olua_move() end + +---Returns the blending function that is currently being used. +--- +---@return cc.BlendFunc # A BlendFunc structure with source and destination factor which specified pixel arithmetic. +---\js NA +---\lua NA +function BlendProtocol:getBlendFunc() end + +---Sets the source blending function. +--- +---@param blendFunc cc.BlendFunc # A structure with source and destination factor to specify pixel arithmetic, +---e.g. {BlendFactor::ONE, BlendFactor::ONE}, {BlendFactor::SRC_ALPHA, BlendFactor::ONE_MINUS_SRC_ALPHA}. +---\js NA +---\lua NA +function BlendProtocol:setBlendFunc(blendFunc) end + +return BlendProtocol \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/Blink.lua b/addons/cclua/cocos2d/library/cc/Blink.lua new file mode 100644 index 00000000..5999f534 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/Blink.lua @@ -0,0 +1,15 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.Blink + +---\class Blink +---Blinks a Node object by modifying it's visible attribute. +---@class cc.Blink : cc.ActionInterval +local Blink = {} + +---Creates the action. +---@param duration number # Duration time, in seconds. +---@param blinks integer # Blink times. +---@return cc.Blink # An autoreleased Blink object. +function Blink.create(duration, blinks) end + +return Blink \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/Bone3D.lua b/addons/cclua/cocos2d/library/cc/Bone3D.lua new file mode 100644 index 00000000..eceef722 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/Bone3D.lua @@ -0,0 +1,94 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.Bone3D + +---Defines a basic hierarchical structure of transformation spaces. +---\lua NA +---@class cc.Bone3D : cc.Ref +---@field childBoneCount integer get child bone count +---@field inverseBindPose cc.Mat4 Returns the inverse bind pose matrix for this joint.

\return Inverse bind pose matrix. +---@field name string get bone name +---@field parentBone cc.Bone3D bone tree, we do not inherit from Node, Node has too many properties that we do not need. A clean Node is needed. +---@field worldMat cc.Mat4 get world matrix +local Bone3D = {} + +---add child bone +---@param bone cc.Bone3D +function Bone3D:addChildBone(bone) end + +---clear bone blend states +function Bone3D:clearBoneBlendState() end + +---Creates C3DBone. +---@param id string +---@return cc.Bone3D +function Bone3D.create(id) end + +---get child bone by index +---@param index integer +---@return cc.Bone3D +function Bone3D:getChildBoneByIndex(index) end + +---get child bone count +---@return integer +function Bone3D:getChildBoneCount() end + +---Returns the inverse bind pose matrix for this joint. +--- +---@return cc.Mat4 # Inverse bind pose matrix. +function Bone3D:getInverseBindPose() end + +---get bone name +---@return string +function Bone3D:getName() end + +---bone tree, we do not inherit from Node, Node has too many properties that we do not need. A clean Node is needed. +---@return cc.Bone3D +function Bone3D:getParentBone() end + +---get world matrix +---@return cc.Mat4 +function Bone3D:getWorldMat() end + +---remove all child bone +function Bone3D:removeAllChildBone() end + +---remove child bone +---@param bone cc.Bone3D +function Bone3D:removeChildBone(bone) end + +---remove child bone by index +---@param index integer +function Bone3D:removeChildBoneByIndex(index) end + +---reset pose to origin +function Bone3D:resetPose() end + +---set animation value +---@param trans olua.float # translate vec3 +---@param rot olua.float # rotation quaternion +---@param scale olua.float # scale vec3 +---@param tag any # unique tag, only blend animation between different tags +---@param weight number # blend weight +---@overload fun(self: cc.Bone3D, trans: olua.float, rot: olua.float, scale: olua.float) +---@overload fun(self: cc.Bone3D, trans: olua.float, rot: olua.float, scale: olua.float, tag: any) +function Bone3D:setAnimationValue(trans, rot, scale, tag, weight) end + +---Sets the inverse bind pose matrix. +--- +---@param m cc.Mat4 # Mat4 representing the inverse bind pose for this Bone. +function Bone3D:setInverseBindPose(m) end + +---Sets the bone's original pose. +--- +---@param m cc.Mat4 # Mat4 representing the original pose for this Bone. +function Bone3D:setOriPose(m) end + +---Updates the joint matrix. +--- +---@param matrixPalette cc.Vec4 # The matrix palette to update. +function Bone3D:updateJointMatrix(matrixPalette) end + +---update own world matrix and children's +function Bone3D:updateWorldMat() end + +return Bone3D \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/Bounds.lua b/addons/cclua/cocos2d/library/cc/Bounds.lua new file mode 100644 index 00000000..51cdf367 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/Bounds.lua @@ -0,0 +1,21 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.Bounds + +--- +---@class cc.Bounds +---@field bottom number +---@field left number +---@field right number +---@field top number +local Bounds = {} + +---@return any +function Bounds:__gc() end + +---@return any +function Bounds:__olua_move() end + +---@return cc.Bounds +function Bounds.new() end + +return Bounds \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/CSLoader.lua b/addons/cclua/cocos2d/library/cc/CSLoader.lua new file mode 100644 index 00000000..f0a73753 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/CSLoader.lua @@ -0,0 +1,87 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.CSLoader + +--- +---@class cc.CSLoader +---@field instance cc.CSLoader +---@field jsonPath string +---@field recordJsonPath boolean +local CSLoader = {} + +---@return any +function CSLoader:__gc() end + +---@return any +function CSLoader:__olua_move() end + +---@param callbackName string +---@param callbackType string +---@param sender ccui.Widget +---@param handler cc.Node +---@return boolean +function CSLoader:bindCallback(callbackName, callbackType, sender, handler) end + +---@param filename string +---@return cc.Node +---@overload fun(filename: string, callback: fun(arg1: cc.Ref)): cc.Node +---@overload fun(data: any): cc.Node +---@overload fun(data: any, callback: fun(arg1: cc.Ref)): cc.Node +function CSLoader.createNode(filename) end + +---@param filename string +---@return cc.Node +function CSLoader:createNodeFromJson(filename) end + +---@param filename string +---@return cc.Node +function CSLoader:createNodeWithFlatBuffersFile(filename) end + +---@param filename string +---@return cc.Node +function CSLoader:createNodeWithFlatBuffersForSimulator(filename) end + +---@param filename string +---@return cc.Node +---@overload fun(filename: string, callback: fun(arg1: cc.Ref)): cc.Node +function CSLoader.createNodeWithVisibleSize(filename) end + +---@param filename string +---@return ccs.timeline.ActionTimeline +---@overload fun(data: any, filename: string): ccs.timeline.ActionTimeline +function CSLoader.createTimeline(filename) end + +function CSLoader.destroyInstance() end + +---@return cc.CSLoader +function CSLoader.getInstance() end + +---@return string +function CSLoader:getJsonPath() end + +function CSLoader:init() end + +---@return boolean +function CSLoader:isRecordJsonPath() end + +---@param content string +---@return cc.Node +function CSLoader:loadNodeWithContent(content) end + +---@param fileName string +---@return cc.Node +function CSLoader:loadNodeWithFile(fileName) end + +---@return cc.CSLoader +function CSLoader.new() end + +---@param fileName string +---@return cc.Node +function CSLoader:nodeWithFlatBuffersFile(fileName) end + +---@param jsonPath string +function CSLoader:setJsonPath(jsonPath) end + +---@param record boolean +function CSLoader:setRecordJsonPath(record) end + +return CSLoader \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/CallFunc.lua b/addons/cclua/cocos2d/library/cc/CallFunc.lua new file mode 100644 index 00000000..cbfe59f5 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/CallFunc.lua @@ -0,0 +1,22 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.CallFunc + +---\class CallFunc +---Calls a 'callback'. +---@class cc.CallFunc : cc.ActionInstant +local CallFunc = {} + +---Creates the action with the callback of type std::function. +---This is the preferred way to create the callback. +---When this function bound in js or lua ,the input param will be changed. +---In js: var create(var func, var this, var [data]) or var create(var func). +---In lua:local create(local funcID). +--- +---@param func fun() # A callback function need to be executed. +---@return cc.CallFunc # An autoreleased CallFunc object. +function CallFunc.create(func) end + +---Executes the callback. +function CallFunc:execute() end + +return CallFunc \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/Camera.lua b/addons/cclua/cocos2d/library/cc/Camera.lua new file mode 100644 index 00000000..8138fd72 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/Camera.lua @@ -0,0 +1,207 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.Camera + +---Defines a camera . +---@class cc.Camera : cc.Node +---@field backgroundBrush cc.CameraBackgroundBrush Get clear brush +---@field brushValid boolean +---@field cameraFlag cc.CameraFlag get & set Camera flag +---@field defaultCamera cc.Camera Get the default camera of the current running scene. +---@field defaultViewport cc.Viewport +---@field depth integer get depth, camera with larger depth is drawn on top of camera with smaller depth, the depth of camera with CameraFlag::DEFAULT is 0, user defined camera is -1 by default +---@field farPlane number Get the frustum's far plane. +---@field nearPlane number Get the frustum's near plane. +---@field projectionMatrix cc.Mat4 Gets the camera's projection matrix.

\return The camera projection matrix. +---@field renderOrder integer get rendered order +---@field type cc.Camera.Type Gets the type of camera.

\return The camera type. +---@field viewMatrix cc.Mat4 Gets the camera's view matrix.

\return The camera view matrix. +---@field viewProjectionMatrix cc.Mat4 get view projection matrix +---@field viewProjectionUpdated boolean Whether or not the viewprojection matrix was updated since the last frame. \return True if the viewprojection matrix was updated since the last frame. +---@field visitingCamera cc.Camera Get the visiting camera , the visiting camera shall be set on Scene::render +local Camera = {} + +---Apply the FBO, RenderTargets and viewport. +function Camera:apply() end + +function Camera:applyViewport() end + +---Before rendering scene with this camera, the background need to be cleared. It clears the depth buffer with max depth by default. Use setBackgroundBrush to modify the default behavior +function Camera:clearBackground() end + +---create default camera, the camera type depends on Director::getProjection, the depth of the default camera is 0 +---@return cc.Camera +function Camera.create() end + +---Creates an orthographic camera. +--- +---@param zoomX number # The zoom factor along the X-axis of the orthographic projection (the width of the ortho projection). +---@param zoomY number # The zoom factor along the Y-axis of the orthographic projection (the height of the ortho projection). +---@param nearPlane number # The near plane distance. +---@param farPlane number # The far plane distance. +---@return cc.Camera +function Camera.createOrthographic(zoomX, zoomY, nearPlane, farPlane) end + +---Creates a perspective camera. +--- +---@param fieldOfView number # The field of view for the perspective camera (normally in the range of 40-60 degrees). +---@param aspectRatio number # The aspect ratio of the camera (normally the width of the viewport divided by the height of the viewport). +---@param nearPlane number # The near plane distance. +---@param farPlane number # The far plane distance. +---@return cc.Camera +function Camera.createPerspective(fieldOfView, aspectRatio, nearPlane, farPlane) end + +---Get clear brush +---@return cc.CameraBackgroundBrush +function Camera:getBackgroundBrush() end + +---get & set Camera flag +---@return cc.CameraFlag +function Camera:getCameraFlag() end + +---Get the default camera of the current running scene. +---@return cc.Camera +function Camera.getDefaultCamera() end + +---@return cc.Viewport +function Camera.getDefaultViewport() end + +---get depth, camera with larger depth is drawn on top of camera with smaller depth, the depth of camera with CameraFlag::DEFAULT is 0, user defined camera is -1 by default +---@return integer +function Camera:getDepth() end + +---Get object depth towards camera +---@param transform cc.Mat4 +---@return number +function Camera:getDepthInView(transform) end + +---Get the frustum's far plane. +---@return number +function Camera:getFarPlane() end + +---Get the frustum's near plane. +---@return number +function Camera:getNearPlane() end + +---Gets the camera's projection matrix. +--- +---@return cc.Mat4 # The camera projection matrix. +function Camera:getProjectionMatrix() end + +---get rendered order +---@return integer +function Camera:getRenderOrder() end + +---Gets the type of camera. +--- +---@return cc.Camera.Type # The camera type. +function Camera:getType() end + +---Gets the camera's view matrix. +--- +---@return cc.Mat4 # The camera view matrix. +function Camera:getViewMatrix() end + +---get view projection matrix +---@return cc.Mat4 +function Camera:getViewProjectionMatrix() end + +---Get the visiting camera , the visiting camera shall be set on Scene::render +---@return cc.Camera +function Camera.getVisitingCamera() end + +---init camera +---@return boolean +function Camera:initDefault() end + +---@param zoomX number +---@param zoomY number +---@param nearPlane number +---@param farPlane number +---@return boolean +function Camera:initOrthographic(zoomX, zoomY, nearPlane, farPlane) end + +---@param fieldOfView number +---@param aspectRatio number +---@param nearPlane number +---@param farPlane number +---@return boolean +function Camera:initPerspective(fieldOfView, aspectRatio, nearPlane, farPlane) end + +---@return boolean +function Camera:isBrushValid() end + +---Whether or not the viewprojection matrix was updated since the last frame. +---@return boolean # True if the viewprojection matrix was updated since the last frame. +function Camera:isViewProjectionUpdated() end + +---Make Camera looks at target +--- +---@param target cc.Vec3 # The target camera is point at +---@param up cc.Vec3 # The up vector, usually it's Y axis +---@overload fun(self: cc.Camera, target: cc.Vec3) +function Camera:lookAt(target, up) end + +---@return cc.Camera +function Camera.new() end + +---@param src cc.Vec3 +---@return cc.Vec2 +function Camera:project(src) end + +---@param src cc.Vec3 +---@return cc.Vec2 +function Camera:projectGL(src) end + +---set additional matrix for the projection matrix, it multiplies mat to projection matrix when called, used by WP8 +---@param mat cc.Mat4 +function Camera:setAdditionalProjection(mat) end + +---set the background brush. See CameraBackgroundBrush for more information. +---@param clearBrush cc.CameraBackgroundBrush # Brush used to clear the background +function Camera:setBackgroundBrush(clearBrush) end + +---@param flag cc.CameraFlag +function Camera:setCameraFlag(flag) end + +---@param vp cc.Viewport +function Camera.setDefaultViewport(vp) end + +---set depth, camera with larger depth is drawn on top of camera with smaller depth, the depth of camera with CameraFlag::DEFAULT is 0, user defined camera is -1 by default +---@param depth integer +function Camera:setDepth(depth) end + +---Set the scene,this method shall not be invoke manually +---@param scene cc.Scene +function Camera:setScene(scene) end + +---Convert the specified point of screen-space coordinate into the 3D world-space coordinate. +--- +---Origin point at left top corner in screen-space. +---@param src cc.Vec3 # The screen-space position. +---@return cc.Vec3 # The 3D world-space position. +--- +---Convert the specified point of screen-space coordinate into the 3D world-space coordinate. +--- +---Origin point at left top corner in screen-space. +---\param size The window size to use. +---\param src The screen-space position. +---\param dst The 3D world-space position. +---@overload fun(self: cc.Camera, size: cc.Size, src: cc.Vec3, dst: cc.Vec3) +function Camera:unproject(src) end + +---Convert the specified point of GL-screen-space coordinate into the 3D world-space coordinate. +--- +---Origin point at left bottom corner in GL-screen-space. +---@param src cc.Vec3 # The GL-screen-space position. +---@return cc.Vec3 # The 3D world-space position. +--- +---Convert the specified point of GL-screen-space coordinate into the 3D world-space coordinate. +--- +---Origin point at left bottom corner in GL-screen-space. +---\param size The window size to use. +---\param src The GL-screen-space position. +---\param dst The 3D world-space position. +---@overload fun(self: cc.Camera, size: cc.Size, src: cc.Vec3, dst: cc.Vec3) +function Camera:unprojectGL(src) end + +return Camera \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/Camera/Type.lua b/addons/cclua/cocos2d/library/cc/Camera/Type.lua new file mode 100644 index 00000000..a84e571d --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/Camera/Type.lua @@ -0,0 +1,14 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.Camera.Type + +---@type cc.Camera.Type +local VALUE + +--- +---@enum cc.Camera.Type +local Type = { + ORTHOGRAPHIC = 2, + PERSPECTIVE = 1, +} + +return Type \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/CameraBackgroundBrush.lua b/addons/cclua/cocos2d/library/cc/CameraBackgroundBrush.lua new file mode 100644 index 00000000..5077aef9 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/CameraBackgroundBrush.lua @@ -0,0 +1,54 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.CameraBackgroundBrush + +---Defines a brush to clear the background of camera. +---There are 4 types of brush. None brush do nothing, Depth brush clear background with given depth, Color brush clear background with given color and depth, Skybox brush clear the background with a skybox. Camera uses depth brush by default. +---@class cc.CameraBackgroundBrush : cc.Ref +---@field brushType cc.CameraBackgroundBrush.BrushType get brush type \return BrushType +---@field valid boolean +local CameraBackgroundBrush = {} + +---Creates a color brush +---@param color any # Color of brush +---@param depth number # Depth used to clear depth buffer +---@return cc.CameraBackgroundColorBrush # Created brush +function CameraBackgroundBrush.createColorBrush(color, depth) end + +---Creates a depth brush, which clears depth buffer with a given depth. +---@param depth number # Depth used to clear depth buffer +---@return cc.CameraBackgroundDepthBrush # Created brush +---@overload fun(): cc.CameraBackgroundDepthBrush +function CameraBackgroundBrush.createDepthBrush(depth) end + +---Creates a none brush, it does nothing when clear the background +---@return cc.CameraBackgroundBrush # Created brush. +function CameraBackgroundBrush.createNoneBrush() end + +---Creates a Skybox brush with 6 textures. +---@param positive_x string # texture for the right side of the texture cube face. +---@param negative_x string # texture for the up side of the texture cube face. +---@param positive_y string # texture for the top side of the texture cube face +---@param negative_y string # texture for the bottom side of the texture cube face +---@param positive_z string # texture for the forward side of the texture cube face. +---@param negative_z string # texture for the rear side of the texture cube face. +---@return cc.CameraBackgroundSkyBoxBrush # A new brush inited with given parameters. +function CameraBackgroundBrush.createSkyboxBrush(positive_x, negative_x, positive_y, negative_y, positive_z, negative_z) end + +---draw the background +---@param arg1 cc.Camera +function CameraBackgroundBrush:drawBackground(arg1) end + +---get brush type +---@return cc.CameraBackgroundBrush.BrushType # BrushType +function CameraBackgroundBrush:getBrushType() end + +---@return boolean +function CameraBackgroundBrush:init() end + +---@return boolean +function CameraBackgroundBrush:isValid() end + +---@return cc.CameraBackgroundBrush +function CameraBackgroundBrush.new() end + +return CameraBackgroundBrush \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/CameraBackgroundBrush/BrushType.lua b/addons/cclua/cocos2d/library/cc/CameraBackgroundBrush/BrushType.lua new file mode 100644 index 00000000..e1431592 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/CameraBackgroundBrush/BrushType.lua @@ -0,0 +1,16 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.CameraBackgroundBrush.BrushType + +---@type cc.CameraBackgroundBrush.BrushType +local VALUE + +--- +---@enum cc.CameraBackgroundBrush.BrushType +local BrushType = { + COLOR = 2, + DEPTH = 1, + NONE = 0, + SKYBOX = 3, +} + +return BrushType \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/CameraBackgroundColorBrush.lua b/addons/cclua/cocos2d/library/cc/CameraBackgroundColorBrush.lua new file mode 100644 index 00000000..75a4da11 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/CameraBackgroundColorBrush.lua @@ -0,0 +1,21 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.CameraBackgroundColorBrush + +---Color brush clear buffer with given depth and color +---@class cc.CameraBackgroundColorBrush : cc.CameraBackgroundDepthBrush +local CameraBackgroundColorBrush = {} + +---Create a color brush +---@param color any # Color used to clear the color buffer +---@param depth number # Depth used to clear the depth buffer +---@return cc.CameraBackgroundColorBrush # Created brush +function CameraBackgroundColorBrush.create(color, depth) end + +---@return cc.CameraBackgroundColorBrush +function CameraBackgroundColorBrush.new() end + +---Set clear color +---@param color any # Color used to clear the color buffer +function CameraBackgroundColorBrush:setColor(color) end + +return CameraBackgroundColorBrush \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/CameraBackgroundDepthBrush.lua b/addons/cclua/cocos2d/library/cc/CameraBackgroundDepthBrush.lua new file mode 100644 index 00000000..99509169 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/CameraBackgroundDepthBrush.lua @@ -0,0 +1,20 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.CameraBackgroundDepthBrush + +---Depth brush clear depth buffer with given depth +---@class cc.CameraBackgroundDepthBrush : cc.CameraBackgroundBrush +local CameraBackgroundDepthBrush = {} + +---Create a depth brush +---@param depth number # Depth used to clear the depth buffer +---@return cc.CameraBackgroundDepthBrush # Created brush +function CameraBackgroundDepthBrush.create(depth) end + +---@return cc.CameraBackgroundDepthBrush +function CameraBackgroundDepthBrush.new() end + +---Set depth +---@param depth number # Depth used to clear depth buffer +function CameraBackgroundDepthBrush:setDepth(depth) end + +return CameraBackgroundDepthBrush \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/CameraBackgroundSkyBoxBrush.lua b/addons/cclua/cocos2d/library/cc/CameraBackgroundSkyBoxBrush.lua new file mode 100644 index 00000000..8cc931ad --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/CameraBackgroundSkyBoxBrush.lua @@ -0,0 +1,38 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.CameraBackgroundSkyBoxBrush + +---Skybox brush clear buffer with a skybox +---@class cc.CameraBackgroundSkyBoxBrush : cc.CameraBackgroundBrush +---@field actived boolean +local CameraBackgroundSkyBoxBrush = {} + +---Creates a Skybox brush with 6 textures. +---@param positive_x string # texture for the right side of the texture cube face. +---@param negative_x string # texture for the up side of the texture cube face. +---@param positive_y string # texture for the top side of the texture cube face +---@param negative_y string # texture for the bottom side of the texture cube face +---@param positive_z string # texture for the forward side of the texture cube face. +---@param negative_z string # texture for the rear side of the texture cube face. +---@return cc.CameraBackgroundSkyBoxBrush # A new brush inited with given parameters. +--- +---Creates a Skybox brush with 6 textures. +---@overload fun(): cc.CameraBackgroundSkyBoxBrush +function CameraBackgroundSkyBoxBrush.create(positive_x, negative_x, positive_y, negative_y, positive_z, negative_z) end + +---@return boolean +function CameraBackgroundSkyBoxBrush:isActived() end + +---@return cc.CameraBackgroundSkyBoxBrush +function CameraBackgroundSkyBoxBrush.new() end + +---@param actived boolean +function CameraBackgroundSkyBoxBrush:setActived(actived) end + +---Set skybox texture +---@param texture cc.TextureCube # Skybox texture +function CameraBackgroundSkyBoxBrush:setTexture(texture) end + +---@param valid boolean +function CameraBackgroundSkyBoxBrush:setTextureValid(valid) end + +return CameraBackgroundSkyBoxBrush \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/CameraFlag.lua b/addons/cclua/cocos2d/library/cc/CameraFlag.lua new file mode 100644 index 00000000..c1988617 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/CameraFlag.lua @@ -0,0 +1,21 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.CameraFlag + +---@type cc.CameraFlag +local VALUE + +--- +---@enum cc.CameraFlag +local CameraFlag = { + DEFAULT = 1, + USER1 = 2, + USER2 = 4, + USER3 = 8, + USER4 = 16, + USER5 = 32, + USER6 = 64, + USER7 = 128, + USER8 = 256, +} + +return CameraFlag \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/CardinalSplineBy.lua b/addons/cclua/cocos2d/library/cc/CardinalSplineBy.lua new file mode 100644 index 00000000..e15b6b5b --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/CardinalSplineBy.lua @@ -0,0 +1,24 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.CardinalSplineBy + +---\class CardinalSplineBy +---Cardinal Spline path. +---http://en.wikipedia.org/wiki/Cubic_Hermite_spline#Cardinal_spline +---\ingroup Actions +---@class cc.CardinalSplineBy : cc.CardinalSplineTo +local CardinalSplineBy = {} + +---Creates an action with a Cardinal Spline array of points and tension. +---\code +---When this function bound to js or lua,the input params are changed. +---In js: var create(var t,var table). +---In lua: local create(local t, local table). +---@param duration number # In seconds. +---\param point An PointArray. +---@param tension number # Goodness of fit. +---\endcode +---@param points cc.PointArray +---@return cc.CardinalSplineBy +function CardinalSplineBy.create(duration, points, tension) end + +return CardinalSplineBy \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/CardinalSplineTo.lua b/addons/cclua/cocos2d/library/cc/CardinalSplineTo.lua new file mode 100644 index 00000000..4dcceea7 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/CardinalSplineTo.lua @@ -0,0 +1,39 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.CardinalSplineTo + +---\class CardinalSplineTo +---Cardinal Spline path. +---http://en.wikipedia.org/wiki/Cubic_Hermite_spline#Cardinal_spline +---\ingroup Actions +---@class cc.CardinalSplineTo : cc.ActionInterval +---@field points cc.PointArray Return a PointArray.

\return A PointArray. +local CardinalSplineTo = {} + +---Creates an action with a Cardinal Spline array of points and tension. +---@param duration number # In seconds. +---@param points cc.PointArray # An PointArray. +---@param tension number # Goodness of fit. +---\code +---When this function bound to js or lua,the input params are changed. +---In js: var create(var t,var table) +---In lua: local create(local t, local table) +---\endcode +---@return cc.CardinalSplineTo +function CardinalSplineTo.create(duration, points, tension) end + +---Return a PointArray. +--- +---@return cc.PointArray # A PointArray. +function CardinalSplineTo:getPoints() end + +---\js NA +---\lua NA +---@param points cc.PointArray +function CardinalSplineTo:setPoints(points) end + +---It will update the target position and change the _previousPosition to newPos +--- +---@param newPos cc.Vec2 # The new position. +function CardinalSplineTo:updatePosition(newPos) end + +return CardinalSplineTo \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/CatmullRomBy.lua b/addons/cclua/cocos2d/library/cc/CatmullRomBy.lua new file mode 100644 index 00000000..d3d2dbe2 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/CatmullRomBy.lua @@ -0,0 +1,23 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.CatmullRomBy + +---\class CatmullRomBy +---An action that moves the target with a CatmullRom curve by a certain distance. +---A Catmull Rom is a Cardinal Spline with a tension of 0.5. +---http://en.wikipedia.org/wiki/Cubic_Hermite_spline#Catmull.E2.80.93Rom_spline +---\ingroup Actions +---@class cc.CatmullRomBy : cc.CardinalSplineBy +local CatmullRomBy = {} + +---Creates an action with a Cardinal Spline array of points and tension. +---@param dt number # In seconds. +---@param points cc.PointArray # An PointArray. +---\code +---When this function bound to js or lua,the input params are changed. +---In js: var create(var dt,var table). +---In lua: local create(local dt, local table). +---\endcode +---@return cc.CatmullRomBy +function CatmullRomBy.create(dt, points) end + +return CatmullRomBy \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/CatmullRomTo.lua b/addons/cclua/cocos2d/library/cc/CatmullRomTo.lua new file mode 100644 index 00000000..c627499f --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/CatmullRomTo.lua @@ -0,0 +1,23 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.CatmullRomTo + +---\class CatmullRomTo +---An action that moves the target with a CatmullRom curve to a destination point. +---A Catmull Rom is a Cardinal Spline with a tension of 0.5. +---http://en.wikipedia.org/wiki/Cubic_Hermite_spline#Catmull.E2.80.93Rom_spline +---\ingroup Actions +---@class cc.CatmullRomTo : cc.CardinalSplineTo +local CatmullRomTo = {} + +---Creates an action with a Cardinal Spline array of points and tension. +---@param dt number # In seconds. +---@param points cc.PointArray # An PointArray. +---\code +---When this function bound to js or lua,the input params are changed. +---In js: var create(var dt,var table). +---In lua: local create(local dt, local table). +---\endcode +---@return cc.CatmullRomTo +function CatmullRomTo.create(dt, points) end + +return CatmullRomTo \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/ClearFlag.lua b/addons/cclua/cocos2d/library/cc/ClearFlag.lua new file mode 100644 index 00000000..51dd6ab0 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/ClearFlag.lua @@ -0,0 +1,17 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.ClearFlag + +---@type cc.ClearFlag +local VALUE + +--- +---@enum cc.ClearFlag +local ClearFlag = { + ALL = 7, + COLOR = 1, + DEPTH = 2, + NONE = 0, + STENCIL = 4, +} + +return ClearFlag \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/ClippingNode.lua b/addons/cclua/cocos2d/library/cc/ClippingNode.lua new file mode 100644 index 00000000..da5e41bb --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/ClippingNode.lua @@ -0,0 +1,86 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.ClippingNode + +---\addtogroup _2d +---\{ +--- +---ClippingNode is a subclass of Node. +---It draws its content (children) clipped using a stencil. +---The stencil is an other Node that will not be drawn. +---The clipping is done using the alpha part of the stencil (adjusted with an alphaThreshold). +---@class cc.ClippingNode : cc.Node +---@field alphaThreshold number The alpha threshold. The content is drawn only where the stencil have pixel with alpha greater than the alphaThreshold. Should be a float between 0 and 1. This default to 1 (so alpha test is disabled).

\return The alpha threshold value,Should be a float between 0 and 1. +---@field inverted boolean Inverted. If this is set to true, the stencil is inverted, so the content is drawn where the stencil is NOT drawn. This default to false.

\return If the clippingNode is Inverted, it will be return true. +---@field stencil cc.Node The Node to use as a stencil to do the clipping. The stencil node will be retained. This default to nil.

\return The stencil node. +local ClippingNode = {} + +---Creates and initializes a clipping node without a stencil. +--- +---@return cc.ClippingNode # An autorelease ClippingNode. +--- +---Creates and initializes a clipping node with an other node as its stencil. +---The stencil node will be retained. +---\param stencil The stencil node. +---@overload fun(stencil: cc.Node): cc.ClippingNode +function ClippingNode.create() end + +---The alpha threshold. +---The content is drawn only where the stencil have pixel with alpha greater than the alphaThreshold. +---Should be a float between 0 and 1. +---This default to 1 (so alpha test is disabled). +--- +---@return number # The alpha threshold value,Should be a float between 0 and 1. +function ClippingNode:getAlphaThreshold() end + +---The Node to use as a stencil to do the clipping. +---The stencil node will be retained. +---This default to nil. +--- +---@return cc.Node # The stencil node. +function ClippingNode:getStencil() end + +---If stencil has no children it will not be drawn. +---If you have custom stencil-based node with stencil drawing mechanics other then children-based, +---then this method should return true every time you wish stencil to be visited. +---By default returns true if has any children attached. +--- +---@return boolean # If you have custom stencil-based node with stencil drawing mechanics other then children-based, +---then this method should return true every time you wish stencil to be visited. +---By default returns true if has any children attached. +---\js NA +function ClippingNode:hasContent() end + +---Initializes a clipping node without a stencil. +---@return boolean +--- +---Initializes a clipping node with an other node as its stencil. +---The stencil node will be retained, and its parent will be set to this clipping node. +---@overload fun(self: cc.ClippingNode, stencil: cc.Node): boolean +function ClippingNode:init() end + +---Inverted. If this is set to true, +---the stencil is inverted, so the content is drawn where the stencil is NOT drawn. +---This default to false. +--- +---@return boolean # If the clippingNode is Inverted, it will be return true. +function ClippingNode:isInverted() end + +---@return cc.ClippingNode +function ClippingNode.new() end + +---Set the alpha threshold. +--- +---@param alphaThreshold number # The alpha threshold. +function ClippingNode:setAlphaThreshold(alphaThreshold) end + +---Set the ClippingNode whether or not invert. +--- +---@param inverted boolean # A bool Type,to set the ClippingNode whether or not invert. +function ClippingNode:setInverted(inverted) end + +---Set the Node to use as a stencil to do the clipping. +--- +---@param stencil cc.Node # The Node to use as a stencil to do the clipping. +function ClippingNode:setStencil(stencil) end + +return ClippingNode \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/ClippingRectangleNode.lua b/addons/cclua/cocos2d/library/cc/ClippingRectangleNode.lua new file mode 100644 index 00000000..a11ec846 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/ClippingRectangleNode.lua @@ -0,0 +1,38 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.ClippingRectangleNode + +---Clipping Rectangle Node. +---\details A node that clipped with specified rectangle. +---The region of ClippingRectangleNode doesn't support any transform except scale. +---\js NA +---@class cc.ClippingRectangleNode : cc.Node +---@field clippingEnabled boolean Get whether the clipping is enabled or not. \return Whether the clipping is enabled or not. Default is true. +---@field clippingRegion cc.Rect Get the clipping rectangle. \return The clipping rectangle. +local ClippingRectangleNode = {} + +---Create node with specified clipping region. +---@param clippingRegion cc.Rect # Specify the clipping rectangle. +---@return cc.ClippingRectangleNode # If the creation success, return a pointer of ClippingRectangleNode; otherwise return nil. +--- +---Create a clipping rectangle node. +---\return If the creation success, return a pointer of ClippingRectangleNode; otherwise return nil. +---@overload fun(): cc.ClippingRectangleNode +function ClippingRectangleNode.create(clippingRegion) end + +---Get the clipping rectangle. +---@return cc.Rect # The clipping rectangle. +function ClippingRectangleNode:getClippingRegion() end + +---Get whether the clipping is enabled or not. +---@return boolean # Whether the clipping is enabled or not. Default is true. +function ClippingRectangleNode:isClippingEnabled() end + +---Enable/Disable the clipping. +---@param enabled boolean # Pass true to enable clipping. Pass false to disable clipping. +function ClippingRectangleNode:setClippingEnabled(enabled) end + +---Set the clipping rectangle. +---@param clippingRegion cc.Rect # Specify the clipping rectangle. +function ClippingRectangleNode:setClippingRegion(clippingRegion) end + +return ClippingRectangleNode \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/Clonable.lua b/addons/cclua/cocos2d/library/cc/Clonable.lua new file mode 100644 index 00000000..97b31cb4 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/Clonable.lua @@ -0,0 +1,20 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.Clonable + +---Interface that defines how to clone an Ref. +---\lua NA +---\js NA +---@class cc.Clonable +local Clonable = {} + +---@return any +function Clonable:__gc() end + +---@return any +function Clonable:__olua_move() end + +---Returns a copy of the Ref. +---@return cc.Clonable +function Clonable:clone() end + +return Clonable \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/Component.lua b/addons/cclua/cocos2d/library/cc/Component.lua new file mode 100644 index 00000000..6e14ff1d --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/Component.lua @@ -0,0 +1,54 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.Component + +--- +---@class cc.Component : cc.Ref +---@field enabled boolean +---@field name string +---@field owner cc.Node +local Component = {} + +---@return cc.Component +function Component.create() end + +---@return string +function Component:getName() end + +---@return cc.Node +function Component:getOwner() end + +---@return boolean +function Component:init() end + +---@return boolean +function Component:isEnabled() end + +---\js ctor +---@return cc.Component +function Component.new() end + +function Component:onAdd() end + +function Component:onEnter() end + +function Component:onExit() end + +function Component:onRemove() end + +---@param r any +---@return boolean +function Component:serialize(r) end + +---@param enabled boolean +function Component:setEnabled(enabled) end + +---@param name string +function Component:setName(name) end + +---@param owner cc.Node +function Component:setOwner(owner) end + +---@param delta number +function Component:update(delta) end + +return Component \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/Console.lua b/addons/cclua/cocos2d/library/cc/Console.lua new file mode 100644 index 00000000..62fc54df --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/Console.lua @@ -0,0 +1,64 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.Console + +---Console is helper class that lets the developer control the game from TCP connection. +---Console will spawn a new thread that will listen to a specified TCP port. +---Console has a basic token parser. Each token is associated with an std::function. +---If the std::function<> needs to use the cocos2d API, it needs to call +--- +---``` +---scheduler->performFunctionInCocosThread( ... ); +---``` +---@class cc.Console : cc.Ref +---@field commandSeparator integer The command separator +---@field ipv6Server boolean Checks whether the server for console is bound with ipv6 address +local Console = {} + +---delete custom command +---@param cmdName string +function Console:delCommand(cmdName) end + +---@param cmdName string +---@param subCmdName string +function Console:delSubCommand(cmdName, subCmdName) end + +---The command separator +---@return integer +function Console:getCommandSeparator() end + +---Checks whether the server for console is bound with ipv6 address +---@return boolean +function Console:isIpv6Server() end + +---starts listening to specified file descriptor +---@param fd integer +---@return boolean +function Console:listenOnFileDescriptor(fd) end + +---starts listening to specified TCP port +---@param port integer +---@return boolean +function Console:listenOnTCP(port) end + +---log something in the console +---@param buf string +function Console:log(buf) end + +---Constructor +---@return cc.Console +function Console.new() end + +---set bind address +--- +---\address : 127.0.0.1 +---@param address string +function Console:setBindAddress(address) end + +---The command separator +---@param var integer +function Console:setCommandSeparator(var) end + +---stops the Console. 'stop' will be called at destruction time as well +function Console:stop() end + +return Console \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/Controller.lua b/addons/cclua/cocos2d/library/cc/Controller.lua new file mode 100644 index 00000000..42b14605 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/Controller.lua @@ -0,0 +1,70 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.Controller + +---\class Controller +---A Controller object represents a connected physical game controller. +---\js NA +---@class cc.Controller +---@field allController cc.Controller[] Gets all Controller objects. +---@field connected boolean Indicates whether the Controller is connected. +---@field deviceId integer Gets the Controller id. +---@field deviceName string Gets the name of this Controller object. +---@field tag integer Returns a tag that is used to identify the controller easily.

\return An integer that identifies the controller. +---@field TAG_UNSET integer +local Controller = {} + +---@return any +function Controller:__olua_move() end + +---Gets all Controller objects. +---@return cc.Controller[] +function Controller.getAllController() end + +---Gets a Controller object with device ID. +--- +---@param deviceId integer # A unique identifier to find the controller. +---@return cc.Controller # A Controller object. +function Controller.getControllerByDeviceId(deviceId) end + +---Gets a Controller object with tag. +--- +---@param tag integer # An identifier to find the controller. +---@return cc.Controller # A Controller object. +function Controller.getControllerByTag(tag) end + +---Gets the Controller id. +---@return integer +function Controller:getDeviceId() end + +---Gets the name of this Controller object. +---@return string +function Controller:getDeviceName() end + +---@param keyCode integer +---@return cc.Controller.KeyStatus +function Controller:getKeyStatus(keyCode) end + +---Returns a tag that is used to identify the controller easily. +--- +---@return integer # An integer that identifies the controller. +function Controller:getTag() end + +---Indicates whether the Controller is connected. +---@return boolean +function Controller:isConnected() end + +---Changes the tag that is used to identify the controller easily. +---@param tag integer # A integer that identifies the controller. +function Controller:setTag(tag) end + +---Start discovering new controllers. +--- +---\warning The API has an empty implementation on Android. +function Controller.startDiscoveryController() end + +---Stop the discovery process. +--- +---\warning The API has an empty implementation on Android. +function Controller.stopDiscoveryController() end + +return Controller \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/Controller/Key.lua b/addons/cclua/cocos2d/library/cc/Controller/Key.lua new file mode 100644 index 00000000..fd842e22 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/Controller/Key.lua @@ -0,0 +1,38 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.Controller.Key + +---@type cc.Controller.Key +local VALUE + +--- +---@enum cc.Controller.Key +local Key = { + AXIS_LEFT_TRIGGER = 1017, + AXIS_RIGHT_TRIGGER = 1018, + BUTTON_A = 1004, + BUTTON_B = 1005, + BUTTON_C = 1006, + BUTTON_DPAD_CENTER = 1014, + BUTTON_DPAD_DOWN = 1011, + BUTTON_DPAD_LEFT = 1012, + BUTTON_DPAD_RIGHT = 1013, + BUTTON_DPAD_UP = 1010, + BUTTON_LEFT_SHOULDER = 1015, + BUTTON_LEFT_THUMBSTICK = 1019, + BUTTON_PAUSE = 1023, + BUTTON_RIGHT_SHOULDER = 1016, + BUTTON_RIGHT_THUMBSTICK = 1020, + BUTTON_SELECT = 1022, + BUTTON_START = 1021, + BUTTON_X = 1007, + BUTTON_Y = 1008, + BUTTON_Z = 1009, + JOYSTICK_LEFT_X = 1000, + JOYSTICK_LEFT_Y = 1001, + JOYSTICK_RIGHT_X = 1002, + JOYSTICK_RIGHT_Y = 1003, + KEY_MAX = 1024, + KEY_NONE = 0, +} + +return Key \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/Controller/KeyStatus.lua b/addons/cclua/cocos2d/library/cc/Controller/KeyStatus.lua new file mode 100644 index 00000000..37b0c9fd --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/Controller/KeyStatus.lua @@ -0,0 +1,17 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.Controller.KeyStatus + +---\struct KeyStatus +---@class cc.Controller.KeyStatus +---@field isAnalog boolean +---@field isPressed boolean +---@field value number +local KeyStatus = {} + +---@return any +function KeyStatus:__gc() end + +---@return any +function KeyStatus:__olua_move() end + +return KeyStatus \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/CustomCommand.lua b/addons/cclua/cocos2d/library/cc/CustomCommand.lua new file mode 100644 index 00000000..b0dfa732 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/CustomCommand.lua @@ -0,0 +1,170 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.CustomCommand + +---Custom command is used to draw all things except triangle commands. You can use +---this command to draw things, just provide vertex/index data and set corret flags. +---@class cc.CustomCommand : cc.RenderCommand +---@field afterCallback fun() +---@field beforeCallback fun() +---@field drawType cc.CustomCommand.DrawType +---@field indexCapacity any Get index buffer capacity. +---@field indexDrawCount any +---@field indexDrawOffset any +---@field indexFormat any +---@field lineWidth number +---@field primitiveType any +---@field vertexBuffer ccb.Buffer +---@field vertexCapacity any Get vertex buffer capacity. +---@field vertexDrawCount any +---@field vertexDrawStart any +---@field func fun() +local CustomCommand = {} + +---@return any +function CustomCommand:__gc() end + +---Create an index buffer of the custom command. The buffer size is (indexSize * capacity). +---Index size is determined by format. If the buffer already exists, then it will delete the +---old buffer and create a new one. +---@param format any # index fomrat, if format is U_SHORT, then the index data type should be +---unsigned short, otherwise should be unsigned int. +---@param capacity any # how many indices of the buffer +---@param usage any # the usage of the vertex buffer. Use Static of the index data are not updated +---every frame, otherwise use DYNAMIC. +function CustomCommand:createIndexBuffer(format, capacity, usage) end + +---Create a vertex buffer of the custom command. The buffer size is (vertexSize * capacity). +---If the buffer already exists, then it will delete the old buffer and create a new one. +---@param vertexSize any # the size of every vertex data. +---@param capacity any # how many vertices of the buffer +---@param usage any # the usage of the vertex buffer. Use Static of the vertex data are not updated +---every frame, otherwise use DYNAMIC. +function CustomCommand:createVertexBuffer(vertexSize, capacity, usage) end + +---@return fun() +function CustomCommand:getAfterCallback() end + +---@return fun() +function CustomCommand:getBeforeCallback() end + +---@return cc.CustomCommand.DrawType +function CustomCommand:getDrawType() end + +---@return ccb.Buffer +function CustomCommand:getIndexBuffer() end + +---Get index buffer capacity. +---@return any +function CustomCommand:getIndexCapacity() end + +---@return any +function CustomCommand:getIndexDrawCount() end + +---@return any +function CustomCommand:getIndexDrawOffset() end + +---@return any +function CustomCommand:getIndexFormat() end + +---@return number +function CustomCommand:getLineWidth() end + +---@return any +function CustomCommand:getPrimitiveType() end + +---@return ccb.Buffer +function CustomCommand:getVertexBuffer() end + +---Get vertex buffer capacity. +---@return any +function CustomCommand:getVertexCapacity() end + +---@return any +function CustomCommand:getVertexDrawCount() end + +---@return any +function CustomCommand:getVertexDrawStart() end + +---TODO: should remove it. +---Init function. +---@param globalZOrder number # GlobalZOrder of the render command. +---@param modelViewTransform cc.Mat4 # When in 3D mode, depth sorting needs modelViewTransform. +---@param flags integer # Use to identify that the render command is 3D mode or not. +--- +---Init function. The render command will be in 2D mode. +---\param globalZOrder GlobalZOrder of the render command. +---@overload fun(self: cc.CustomCommand, globalZOrder: number) +--- +---Init function. The render command will be in 2D mode. +---\param globalZOrder GlobalZOrder of the render command. +---\param blendFunc blend function of the render command. +---@overload fun(self: cc.CustomCommand, globalZOrder: number, blendFunc: cc.BlendFunc) +function CustomCommand:init(globalZOrder, modelViewTransform, flags) end + +---Constructor. +---@return cc.CustomCommand +function CustomCommand.new() end + +---set a callback which will be invoke after rendering +---@param after fun() +function CustomCommand:setAfterCallback(after) end + +---set a callback which will be invoke before rendering +---@param before fun() +function CustomCommand:setBeforeCallback(before) end + +---@param drawType cc.CustomCommand.DrawType +function CustomCommand:setDrawType(drawType) end + +---Set the index buffer. The existing index buffer will be replaced if exist. +---@param indexBuffer ccb.Buffer +---@param indexFormat any +function CustomCommand:setIndexBuffer(indexBuffer, indexFormat) end + +---Set the drawing information if the drawing type is ELEMENT. +---\start specifices the starting index of index buffer +---\count specifices the number of indices to be rendered +---@param start any +---@param count any +function CustomCommand:setIndexDrawInfo(start, count) end + +---@param lineWidth number +function CustomCommand:setLineWidth(lineWidth) end + +---@param primitiveType any +function CustomCommand:setPrimitiveType(primitiveType) end + +---Set the vertex buffer. The existing vertex buffer will be replaced if exist. +---@param vertexBuffer ccb.Buffer +function CustomCommand:setVertexBuffer(vertexBuffer) end + +---Set the drawing information if the drawing type is ARRAY. +---\start specifices the starting index of vertex buffer +---\count specifices the number of vertices to be rendered +---@param start any +---@param count any +function CustomCommand:setVertexDrawInfo(start, count) end + +---Update index buffer contents. +---@param data any # Specifies a pointer to the new data that will be copied into the data store. +---@param length any # Specifies the size in bytes of the data store region being replaced. +--- +---Update some or call contents of index buffer +---\param data Specifies a pointer to the new data that will be copied into the data store. +---\param offset specifies the offset into the buffer object's data store where data replacement will begin, measured in bytes. +---\param length Specifies the size in bytes of the data store region being replaced. +---@overload fun(self: cc.CustomCommand, data: any, offset: any, length: any) +function CustomCommand:updateIndexBuffer(data, length) end + +---Update vertex buffer contents. +---@param data any # Specifies a pointer to the new data that will be copied into the data store. +---@param length any # Specifies the length in bytes of the data store region being replaced. +--- +---Update some or all contents of vertex buffer. +---\param data Specifies a pointer to the new data that will be copied into the data store. +---\param offset Specifies the offset into the buffer object's data store where data replacement will begin, measured in bytes. +---\param length Specifies the size in bytes of the data store region being replaced. +---@overload fun(self: cc.CustomCommand, data: any, offset: any, length: any) +function CustomCommand:updateVertexBuffer(data, length) end + +return CustomCommand \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/CustomCommand/DrawType.lua b/addons/cclua/cocos2d/library/cc/CustomCommand/DrawType.lua new file mode 100644 index 00000000..6ea6706b --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/CustomCommand/DrawType.lua @@ -0,0 +1,14 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.CustomCommand.DrawType + +---@type cc.CustomCommand.DrawType +local VALUE + +--- +---@enum cc.CustomCommand.DrawType +local DrawType = { + ARRAY = 0, + ELEMENT = 1, +} + +return DrawType \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/DeccelAmplitude.lua b/addons/cclua/cocos2d/library/cc/DeccelAmplitude.lua new file mode 100644 index 00000000..6aef002e --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/DeccelAmplitude.lua @@ -0,0 +1,24 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.DeccelAmplitude + +---DeccelAmplitude action. +---\js NA +---@class cc.DeccelAmplitude : cc.ActionInterval +---@field rate number Get the value of amplitude rate. \return The value of amplitude rate. +local DeccelAmplitude = {} + +---Creates the action with an inner action that has the amplitude property, and a duration time. +---@param action cc.Action # A pointer of the inner action. +---@param duration number # Specify the duration of the DeccelAmplitude action. +---@return cc.DeccelAmplitude # Return a pointer of DeccelAmplitude. When the creation failed, return nil. +function DeccelAmplitude.create(action, duration) end + +---Get the value of amplitude rate. +---@return number # The value of amplitude rate. +function DeccelAmplitude:getRate() end + +---Set the value of amplitude rate. +---@param rate number # Specify the value. +function DeccelAmplitude:setRate(rate) end + +return DeccelAmplitude \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/DelayTime.lua b/addons/cclua/cocos2d/library/cc/DelayTime.lua new file mode 100644 index 00000000..b3c81d54 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/DelayTime.lua @@ -0,0 +1,14 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.DelayTime + +---\class DelayTime +---Delays the action a certain amount of seconds. +---@class cc.DelayTime : cc.ActionInterval +local DelayTime = {} + +---Creates the action. +---@param d number # Duration time, in seconds. +---@return cc.DelayTime # An autoreleased DelayTime object. +function DelayTime.create(d) end + +return DelayTime \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/Device.lua b/addons/cclua/cocos2d/library/cc/Device.lua new file mode 100644 index 00000000..452262be --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/Device.lua @@ -0,0 +1,40 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.Device + +---\class Device +--- +---@class cc.Device +---@field dpi integer Gets the DPI of device \return The DPI of device. +local Device = {} + +---@return any +function Device:__gc() end + +---@return any +function Device:__olua_move() end + +---Gets the DPI of device +---@return integer # The DPI of device. +function Device.getDPI() end + +---To enable or disable accelerometer. +---@param isEnabled boolean +function Device.setAccelerometerEnabled(isEnabled) end + +---Sets the interval of accelerometer. +---@param interval number +function Device.setAccelerometerInterval(interval) end + +---Controls whether the screen should remain on. +--- +---@param keepScreenOn boolean # One flag indicating that the screen should remain on. +function Device.setKeepScreenOn(keepScreenOn) end + +---Vibrate for the specified amount of time. +---If vibrate is not supported, then invoking this method has no effect. +---Some platforms limit to a maximum duration of 5 seconds. +---Duration is ignored on iOS due to API limitations. +---@param duration number # The duration in seconds. +function Device.vibrate(duration) end + +return Device \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/DirectionLight.lua b/addons/cclua/cocos2d/library/cc/DirectionLight.lua new file mode 100644 index 00000000..d776b54d --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/DirectionLight.lua @@ -0,0 +1,33 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.DirectionLight + +---\js NA +---@class cc.DirectionLight : cc.BaseLight +---@field direction cc.Vec3 Returns the Direction in parent. +---@field directionInWorld cc.Vec3 Returns direction in world. +local DirectionLight = {} + +---Creates a direction light. +---@param direction cc.Vec3 # The light's direction +---@param color any # The light's color. +--- +---@return cc.DirectionLight # The new direction light. +function DirectionLight.create(direction, color) end + +---Returns the Direction in parent. +---@return cc.Vec3 +function DirectionLight:getDirection() end + +---Returns direction in world. +---@return cc.Vec3 +function DirectionLight:getDirectionInWorld() end + +---@return cc.DirectionLight +function DirectionLight.new() end + +---Sets the Direction in parent. +--- +---@param dir cc.Vec3 # The Direction in parent. +function DirectionLight:setDirection(dir) end + +return DirectionLight \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/Director.lua b/addons/cclua/cocos2d/library/cc/Director.lua new file mode 100644 index 00000000..e4e89ea4 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/Director.lua @@ -0,0 +1,394 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.Director + +---Class that creates and handles the main Window and manages how +---and when to execute the Scenes. +--- +---The Director is also responsible for: +---- initializing the OpenGL context +---- setting the OpenGL buffer depth (default one is 0-bit) +---- setting the projection (default one is 3D) +--- +---Since the Director is a singleton, the standard way to use it is by calling: +---_ Director::getInstance()->methodName(); +---@class cc.Director : cc.Ref +---@field actionManager cc.ActionManager Gets the ActionManager associated with this director. \since v2.0 +---@field animationInterval number Gets the FPS value. +---@field console cc.Console Returns the Console associated with this director. \since v3.0 \js NA +---@field contentScaleFactor number Gets content scale factor. \see Director::setContentScaleFactor() +---@field deltaTime number +---@field displayStats boolean Whether or not displaying the FPS on the bottom-left corner of the screen. +---@field eventDispatcher cc.EventDispatcher Gets the EventDispatcher associated with this director. \since v3.0 \js NA +---@field frameRate number Gets Frame Rate. \js NA +---@field instance cc.Director Returns a shared instance of the director. \js _getInstance +---@field nextDeltaTimeZero boolean Whether or not `_nextDeltaTimeZero` is set to 0. +---@field notificationNode cc.Node This object will be visited after the main scene is visited. This object MUST implement the "visit" function. Useful to hook a notification object, like Notifications (http://github.com/manucorporat/CCNotifications) \since v0.99.5 +---@field openGLView cc.GLView Get the GLView. \lua NA +---@field paused boolean Whether or not the Director is paused. +---@field projection cc.Director.Projection Gets an OpenGL projection. \since v0.8.2 \lua NA +---@field renderer cc.Renderer Returns the Renderer associated with this director. \since v3.0 +---@field runningScene cc.Scene Gets current running Scene. Director can only run one Scene at a time. +---@field safeAreaRect cc.Rect Returns safe area rectangle of the OpenGL view in points. +---@field scheduler cc.Scheduler Gets the Scheduler associated with this director. \since v2.0 +---@field secondsPerFrame number Get seconds per frame. +---@field sendCleanupToScene boolean Whether or not the replaced scene will receive the cleanup message. If the new scene is pushed, then the old scene won't receive the "cleanup" message. If the new scene replaces the old one, the it will receive the "cleanup" message. \since v0.99.0 +---@field textureCache cc.TextureCache +---@field totalFrames integer How many frames were called since the director started +---@field valid boolean returns whether or not the Director is in a valid state +---@field visibleOrigin cc.Vec2 Returns visible origin coordinate of the OpenGL view in points. +---@field visibleSize cc.Size Returns visible size of the OpenGL view in points. The value is equal to `Director::getWinSize()` if don't invoke `GLView::setDesignResolutionSize()`. +---@field winSize cc.Size Returns the size of the OpenGL view in points. +---@field winSizeInPixels cc.Size Returns the size of the OpenGL view in pixels. +---@field zEye number Gets the distance between camera and near clipping frame. It is correct for default camera that near clipping frame is same as the screen. +---@field EVENT_AFTER_DRAW string +---@field EVENT_AFTER_SET_NEXT_SCENE string +---@field EVENT_AFTER_UPDATE string +---@field EVENT_AFTER_VISIT string +---@field EVENT_BEFORE_DRAW string +---@field EVENT_BEFORE_SET_NEXT_SCENE string +---@field EVENT_BEFORE_UPDATE string +---@field EVENT_PROJECTION_CHANGED string +---@field EVENT_RESET string +local Director = {} + +---Converts a screen coordinate to an OpenGL coordinate. +---Useful to convert (multi) touch coordinates to the current layout (portrait or landscape). +---@param point cc.Vec2 +---@return cc.Vec2 +---@overload fun(self: cc.Director, point: cc.Vec2): cc.Vec2 +function Director:convertToGL(point) end + +---Converts an OpenGL coordinate to a screen coordinate. +---Useful to convert node points to window points for calls such as glScissor. +---@param point cc.Vec2 +---@return cc.Vec2 +---@overload fun(self: cc.Director, point: cc.Vec2): cc.Vec2 +function Director:convertToUI(point) end + +---Draw the scene. +---This method is called every frame. Don't call it manually. +function Director:drawScene() end + +---Ends the execution, releases the running scene. +---\lua endToLua +function Director:end_() end + +---Gets the ActionManager associated with this director. +---\since v2.0 +---@return cc.ActionManager +function Director:getActionManager() end + +---Gets the FPS value. +---@return number +function Director:getAnimationInterval() end + +---Returns the Console associated with this director. +---\since v3.0 +---\js NA +---@return cc.Console +function Director:getConsole() end + +---Gets content scale factor. +---\see Director::setContentScaleFactor() +---@return number +function Director:getContentScaleFactor() end + +---@return number +function Director:getDeltaTime() end + +---Gets the EventDispatcher associated with this director. +---\since v3.0 +---\js NA +---@return cc.EventDispatcher +function Director:getEventDispatcher() end + +---Gets Frame Rate. +---\js NA +---@return number +function Director:getFrameRate() end + +---Returns a shared instance of the director. +---\js _getInstance +---@return cc.Director +function Director.getInstance() end + +---Gets the top matrix of specified type of matrix stack. +---\js NA +---@param type cc.MATRIX_STACK_TYPE +---@return cc.Mat4 +function Director:getMatrix(type) end + +---This object will be visited after the main scene is visited. +---This object MUST implement the "visit" function. +---Useful to hook a notification object, like Notifications (http://github.com/manucorporat/CCNotifications) +---\since v0.99.5 +---@return cc.Node +function Director:getNotificationNode() end + +---Get the GLView. +---\lua NA +---@return cc.GLView +function Director:getOpenGLView() end + +---Gets an OpenGL projection. +---\since v0.8.2 +---\lua NA +---@return cc.Director.Projection +function Director:getProjection() end + +---Returns the Renderer associated with this director. +---\since v3.0 +---@return cc.Renderer +function Director:getRenderer() end + +---Gets current running Scene. Director can only run one Scene at a time. +---@return cc.Scene +function Director:getRunningScene() end + +---Returns safe area rectangle of the OpenGL view in points. +---@return cc.Rect +function Director:getSafeAreaRect() end + +---Gets the Scheduler associated with this director. +---\since v2.0 +---@return cc.Scheduler +function Director:getScheduler() end + +---Get seconds per frame. +---@return number +function Director:getSecondsPerFrame() end + +---@return cc.TextureCache +function Director:getTextureCache() end + +---How many frames were called since the director started +---@return integer +function Director:getTotalFrames() end + +---Returns visible origin coordinate of the OpenGL view in points. +---@return cc.Vec2 +function Director:getVisibleOrigin() end + +---Returns visible size of the OpenGL view in points. +---The value is equal to `Director::getWinSize()` if don't invoke `GLView::setDesignResolutionSize()`. +---@return cc.Size +function Director:getVisibleSize() end + +---Returns the size of the OpenGL view in points. +---@return cc.Size +function Director:getWinSize() end + +---Returns the size of the OpenGL view in pixels. +---@return cc.Size +function Director:getWinSizeInPixels() end + +---Gets the distance between camera and near clipping frame. +---It is correct for default camera that near clipping frame is same as the screen. +---@return number +function Director:getZEye() end + +---@return boolean +function Director:init() end + +---Whether or not displaying the FPS on the bottom-left corner of the screen. +---@return boolean +function Director:isDisplayStats() end + +---Whether or not `_nextDeltaTimeZero` is set to 0. +---@return boolean +function Director:isNextDeltaTimeZero() end + +---Whether or not the Director is paused. +---@return boolean +function Director:isPaused() end + +---Whether or not the replaced scene will receive the cleanup message. +---If the new scene is pushed, then the old scene won't receive the "cleanup" message. +---If the new scene replaces the old one, the it will receive the "cleanup" message. +---\since v0.99.0 +---@return boolean +function Director:isSendCleanupToScene() end + +---returns whether or not the Director is in a valid state +---@return boolean +function Director:isValid() end + +---Adds an identity matrix to the top of specified type of matrix stack. +---\js NA +---@param type cc.MATRIX_STACK_TYPE +function Director:loadIdentityMatrix(type) end + +---Adds a matrix to the top of specified type of matrix stack. +--- +---@param type cc.MATRIX_STACK_TYPE # Matrix type. +---@param mat cc.Mat4 # The matrix that to be added. +---\js NA +function Director:loadMatrix(type, mat) end + +--- +---Invoke main loop with delta time. Then `calculateDeltaTime` can just use the delta time directly. +---The delta time paseed may include vsync time. See issue #17806 +---\since 3.16 +---@overload fun(self: cc.Director, dt: number) +function Director:mainLoop() end + +---Multiplies a matrix to the top of specified type of matrix stack. +--- +---@param type cc.MATRIX_STACK_TYPE # Matrix type. +---@param mat cc.Mat4 # The matrix that to be multiplied. +---\js NA +function Director:multiplyMatrix(type, mat) end + +---\js ctor +---@return cc.Director +function Director.new() end + +---Pauses the running scene. +---The running scene will be _drawed_ but all scheduled timers will be paused. +---While paused, the draw rate will be 4 FPS to reduce CPU consumption. +function Director:pause() end + +---Pops the top matrix of the specified type of matrix stack. +---\js NA +---@param type cc.MATRIX_STACK_TYPE +function Director:popMatrix(type) end + +---Pops out a scene from the stack. +---This scene will replace the running one. +---The running scene will be deleted. If there are no more scenes in the stack the execution is terminated. +---ONLY call it if there is a running scene. +function Director:popScene() end + +---Pops out all scenes from the stack until the root scene in the queue. +---This scene will replace the running one. +---Internally it will call `popToSceneStackLevel(1)`. +function Director:popToRootScene() end + +---Pops out all scenes from the stack until it reaches `level`. +---If level is 0, it will end the director. +---If level is 1, it will pop all scenes until it reaches to root scene. +---If level is <= than the current stack level, it won't do anything. +---@param level integer +function Director:popToSceneStackLevel(level) end + +---Removes all cocos2d cached data. +---It will purge the TextureCache, SpriteFrameCache, LabelBMFont cache +---\since v0.99.3 +function Director:purgeCachedData() end + +---Clones a specified type matrix and put it to the top of specified type of matrix stack. +---\js NA +---@param type cc.MATRIX_STACK_TYPE +function Director:pushMatrix(type) end + +---Suspends the execution of the running scene, pushing it on the stack of suspended scenes. +---The new scene will be executed. +---Try to avoid big stacks of pushed scenes to reduce memory allocation. +---ONLY call it if there is a running scene. +---@param scene cc.Scene +function Director:pushScene(scene) end + +---Replaces the running scene with a new one. The running scene is terminated. +---ONLY call it if there is a running scene. +---\js NA +---@param scene cc.Scene +function Director:replaceScene(scene) end + +---Clear all types of matrix stack, and add identity matrix to these matrix stacks. +---\js NA +function Director:resetMatrixStack() end + +function Director:restart() end + +---Resumes the paused scene. +---The scheduled timers will be activated again. +---The "delta time" will be 0 (as if the game wasn't paused). +function Director:resume() end + +---Enters the Director's main loop with the given Scene. +---Call it to run only your FIRST scene. +---Don't call it if there is already a running scene. +--- +---It will call pushScene: and then it will call startAnimation +---\js NA +---@param scene cc.Scene +function Director:runWithScene(scene) end + +---Sets the ActionManager associated with this director. +---\since v2.0 +---@param actionManager cc.ActionManager +function Director:setActionManager(actionManager) end + +---Sets the FPS value. FPS = 1/interval. +---@param interval number +function Director:setAnimationInterval(interval) end + +---Sets clear values for the color buffers, +---value range of each element is [0.0, 1.0]. +---\js NA +---@param clearColor any +function Director:setClearColor(clearColor) end + +---The size in pixels of the surface. It could be different than the screen size. +---High-res devices might have a higher surface size than the screen size. +---Only available when compiled using SDK >= 4.0. +---\since v0.99.4 +---@param scaleFactor number +function Director:setContentScaleFactor(scaleFactor) end + +---Sets the default values based on the Configuration info. +function Director:setDefaultValues() end + +---Display the FPS on the bottom-left corner of the screen. +---@param displayStats boolean +function Director:setDisplayStats(displayStats) end + +---Sets the EventDispatcher associated with this director. +---\since v3.0 +---\js NA +---@param dispatcher cc.EventDispatcher +function Director:setEventDispatcher(dispatcher) end + +---Sets the OpenGL default values. +---It will enable alpha blending, disable depth test. +---\js NA +function Director:setGLDefaultValues() end + +---Sets the delta time between current frame and next frame is 0. +---This value will be used in Schedule, and will affect all functions that are using frame delta time, such as Actions. +---This value will take effect only one time. +---@param nextDeltaTimeZero boolean +function Director:setNextDeltaTimeZero(nextDeltaTimeZero) end + +---Sets the notification node. +---\see Director::getNotificationNode() +---@param node cc.Node +function Director:setNotificationNode(node) end + +---Sets the GLView. +---\lua NA +---@param openGLView cc.GLView +function Director:setOpenGLView(openGLView) end + +---Sets OpenGL projection. +---@param projection cc.Director.Projection +function Director:setProjection(projection) end + +---Sets the Scheduler associated with this director. +---\since v2.0 +---@param scheduler cc.Scheduler +function Director:setScheduler(scheduler) end + +---Sets the glViewport. +function Director:setViewport() end + +---The main loop is triggered again. +---Call this function only if [stopAnimation] was called earlier. +---\warning Don't call this function to start the main loop. To run the main loop call runWithScene. +function Director:startAnimation() end + +---Stops the animation. Nothing will be drawn. The main loop won't be triggered anymore. +---If you don't want to pause your animation call [pause] instead. +function Director:stopAnimation() end + +return Director \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/Director/Projection.lua b/addons/cclua/cocos2d/library/cc/Director/Projection.lua new file mode 100644 index 00000000..5205ed48 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/Director/Projection.lua @@ -0,0 +1,20 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.Director.Projection + +---@type cc.Director.Projection +local VALUE + +--- +---@enum cc.Director.Projection +local Projection = { + ---It calls "updateProjection" on the projection delegate. + CUSTOM = 2, + ---Default projection is 3D projection. + DEFAULT = 1, + ---Sets a 2D projection (orthogonal projection). + _2D = 0, + ---Sets a 3D projection with a fovy=60, znear=0.5f and zfar=1500. + _3D = 1, +} + +return Projection \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/DrawNode.lua b/addons/cclua/cocos2d/library/cc/DrawNode.lua new file mode 100644 index 00000000..6b49fbee --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/DrawNode.lua @@ -0,0 +1,247 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.DrawNode + +---\class DrawNode +---Node that draws dots, segments and polygons. +---Faster than the "drawing primitives" since they draws everything in one single batch. +---\since v2.1 +---@class cc.DrawNode : cc.Node +---@field blendFunc cc.BlendFunc Get the color mixed mode. \lua NA +---@field isolated boolean +---@field lineWidth number +local DrawNode = {} + +---Clear the geometry in the node's buffer. +function DrawNode:clear() end + +---creates and initialize a DrawNode node. +--- +---@return cc.DrawNode # Return an autorelease object. +---@param defaultLineWidth number +---@overload fun(): cc.DrawNode +function DrawNode.create(defaultLineWidth) end + +---Draws a Cardinal Spline path. +--- +---@param config cc.PointArray # A array point. +---@param tension number # The tension of the spline. +---@param segments integer # The number of segments. +---@param color any # Set the Spline color. +function DrawNode:drawCardinalSpline(config, tension, segments, color) end + +---Draws a Catmull Rom path. +--- +---@param points cc.PointArray # A point array of control point. +---@param segments integer # The number of segments. +---@param color any # The Catmull Rom color. +function DrawNode:drawCatmullRom(points, segments, color) end + +---Draws a circle given the center, radius and number of segments. +--- +---@param center cc.Vec2 # The circle center point. +---@param radius number # The circle rotate of radius. +---@param angle number # The circle angle. +---@param segments integer # The number of segments. +---@param drawLineToCenter boolean # Whether or not draw the line from the origin to center. +---@param scaleX number # The scale value in x. +---@param scaleY number # The scale value in y. +---@param color any # Set the circle color. +--- +---Draws a circle given the center, radius and number of segments. +--- +---\param center The circle center point. +---\param radius The circle rotate of radius. +---\param angle The circle angle. +---\param segments The number of segments. +---\param drawLineToCenter Whether or not draw the line from the origin to center. +---\param color Set the circle color. +---@overload fun(self: cc.DrawNode, center: cc.Vec2, radius: number, angle: number, segments: integer, drawLineToCenter: boolean, color: any) +function DrawNode:drawCircle(center, radius, angle, segments, drawLineToCenter, scaleX, scaleY, color) end + +---Draw a cubic bezier curve with color and number of segments +--- +---@param origin cc.Vec2 # The origin of the bezier path. +---@param control1 cc.Vec2 # The first control of the bezier path. +---@param control2 cc.Vec2 # The second control of the bezier path. +---@param destination cc.Vec2 # The destination of the bezier path. +---@param segments integer # The number of segments. +---@param color any # Set the cubic bezier color. +function DrawNode:drawCubicBezier(origin, control1, control2, destination, segments, color) end + +---draw a dot at a position, with a given radius and color. +--- +---@param pos cc.Vec2 # The dot center. +---@param radius number # The dot radius. +---@param color any # The dot color. +function DrawNode:drawDot(pos, radius, color) end + +---Draw an line from origin to destination with color. +--- +---@param origin cc.Vec2 # The line origin. +---@param destination cc.Vec2 # The line destination. +---@param color any # The line color. +---\js NA +function DrawNode:drawLine(origin, destination, color) end + +---Draw a point. +--- +---@param point cc.Vec2 # A Vec2 used to point. +---@param pointSize number # The point size. +---@param color any # The point color. +---\js NA +function DrawNode:drawPoint(point, pointSize, color) end + +---Draw a group point. +--- +---@param position cc.Vec2 # A Vec2 pointer. +---@param numberOfPoints integer # The number of points. +---@param color any # The point color. +---\js NA +--- +---Draw a group point. +--- +---\param position A Vec2 pointer. +---\param numberOfPoints The number of points. +---\param pointSize The point size. +---\param color The point color. +---\js NA +---@overload fun(self: cc.DrawNode, position: cc.Vec2, numberOfPoints: integer, pointSize: number, color: any) +function DrawNode:drawPoints(position, numberOfPoints, color) end + +---Draws a polygon given a pointer to point coordinates and the number of vertices measured in points. +---The polygon can be closed or open. +--- +---@param poli cc.Vec2 # A pointer to point coordinates. +---@param numberOfPoints integer # The number of vertices measured in points. +---@param closePolygon boolean # The polygon can be closed or open. +---@param color any # The polygon color. +function DrawNode:drawPoly(poli, numberOfPoints, closePolygon, color) end + +---draw a polygon with a fill color and line color +---\code +---When this function bound into js or lua,the parameter will be changed +---In js: var drawPolygon(var Arrayofpoints, var fillColor, var width, var borderColor) +---In lua:local drawPolygon(local pointTable,local tableCount,local fillColor,local width,local borderColor) +---\endcode +---@param verts cc.Vec2 # A pointer to point coordinates. +---@param count integer # The number of verts measured in points. +---@param fillColor any # The color will fill in polygon. +---@param borderWidth number # The border of line width. +---@param borderColor any # The border of line color. +---\js NA +function DrawNode:drawPolygon(verts, count, fillColor, borderWidth, borderColor) end + +---Draws a quad bezier path. +--- +---@param origin cc.Vec2 # The origin of the bezier path. +---@param control cc.Vec2 # The control of the bezier path. +---@param destination cc.Vec2 # The destination of the bezier path. +---@param segments integer # The number of segments. +---@param color any # Set the quad bezier color. +function DrawNode:drawQuadBezier(origin, control, destination, segments, color) end + +---Draws a rectangle given the origin and destination point measured in points. +---The origin and the destination can not have the same x and y coordinate. +--- +---@param origin cc.Vec2 # The rectangle origin. +---@param destination cc.Vec2 # The rectangle destination. +---@param color any # The rectangle color. +--- +---Draws a rectangle with 4 points. +--- +---\param p1 The rectangle vertex point. +---\param p2 The rectangle vertex point. +---\param p3 The rectangle vertex point. +---\param p4 The rectangle vertex point. +---\param color The rectangle color. +---@overload fun(self: cc.DrawNode, p1: cc.Vec2, p2: cc.Vec2, p3: cc.Vec2, p4: cc.Vec2, color: any) +function DrawNode:drawRect(origin, destination, color) end + +---draw a segment with a radius and color. +--- +---@param from cc.Vec2 # The segment origin. +---@param to cc.Vec2 # The segment destination. +---@param radius number # The segment radius. +---@param color any # The segment color. +function DrawNode:drawSegment(from, to, radius, color) end + +---Draws a solid circle given the center, radius and number of segments. +---@param center cc.Vec2 # The circle center point. +---@param radius number # The circle rotate of radius. +---@param angle number # The circle angle. +---@param segments integer # The number of segments. +---@param scaleX number # The scale value in x. +---@param scaleY number # The scale value in y. +---@param color any # The solid circle color. +---\js NA +--- +---Draws a solid circle given the center, radius and number of segments. +---\param center The circle center point. +---\param radius The circle rotate of radius. +---\param angle The circle angle. +---\param segments The number of segments. +---\param color The solid circle color. +---\js NA +---@overload fun(self: cc.DrawNode, center: cc.Vec2, radius: number, angle: number, segments: integer, color: any) +function DrawNode:drawSolidCircle(center, radius, angle, segments, scaleX, scaleY, color) end + +---Draws a solid polygon given a pointer to CGPoint coordinates, the number of vertices measured in points, and a color. +--- +---@param poli cc.Vec2 # A solid polygon given a pointer to CGPoint coordinates. +---@param numberOfPoints integer # The number of vertices measured in points. +---@param color any # The solid polygon color. +---\js NA +function DrawNode:drawSolidPoly(poli, numberOfPoints, color) end + +---Draws a solid rectangle given the origin and destination point measured in points. +---The origin and the destination can not have the same x and y coordinate. +--- +---@param origin cc.Vec2 # The rectangle origin. +---@param destination cc.Vec2 # The rectangle destination. +---@param color any # The rectangle color. +---\js NA +function DrawNode:drawSolidRect(origin, destination, color) end + +---draw a triangle with color. +--- +---@param p1 cc.Vec2 # The triangle vertex point. +---@param p2 cc.Vec2 # The triangle vertex point. +---@param p3 cc.Vec2 # The triangle vertex point. +---@param color any # The triangle color. +---\js NA +function DrawNode:drawTriangle(p1, p2, p3, color) end + +---Get the color mixed mode. +---\lua NA +---@return cc.BlendFunc +function DrawNode:getBlendFunc() end + +---@return number +function DrawNode:getLineWidth() end + +---@return boolean +function DrawNode:isIsolated() end + +---@param lineWidth number +---@return cc.DrawNode +---@overload fun(): cc.DrawNode +function DrawNode.new(lineWidth) end + +---Set the color mixed mode. +---\code +---When this function bound into js or lua,the parameter will be changed +---In js: var setBlendFunc(var src, var dst) +---\endcode +---\lua NA +---@param blendFunc cc.BlendFunc +function DrawNode:setBlendFunc(blendFunc) end + +---When isolated is set, the position of the node is no longer affected by parent nodes. +---Which means it will be drawn just like a root node. +---@param isolated boolean +function DrawNode:setIsolated(isolated) end + +---@param lineWidth number +function DrawNode:setLineWidth(lineWidth) end + +return DrawNode \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/EaseBackIn.lua b/addons/cclua/cocos2d/library/cc/EaseBackIn.lua new file mode 100644 index 00000000..d14d5ee1 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/EaseBackIn.lua @@ -0,0 +1,12 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.EaseBackIn + +--- +---@class cc.EaseBackIn : cc.ActionEase +local EaseBackIn = {} + +---@param action cc.ActionInterval +---@return cc.EaseBackIn +function EaseBackIn.create(action) end + +return EaseBackIn \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/EaseBackInOut.lua b/addons/cclua/cocos2d/library/cc/EaseBackInOut.lua new file mode 100644 index 00000000..f4b88053 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/EaseBackInOut.lua @@ -0,0 +1,12 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.EaseBackInOut + +--- +---@class cc.EaseBackInOut : cc.ActionEase +local EaseBackInOut = {} + +---@param action cc.ActionInterval +---@return cc.EaseBackInOut +function EaseBackInOut.create(action) end + +return EaseBackInOut \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/EaseBackOut.lua b/addons/cclua/cocos2d/library/cc/EaseBackOut.lua new file mode 100644 index 00000000..ed70e50d --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/EaseBackOut.lua @@ -0,0 +1,12 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.EaseBackOut + +--- +---@class cc.EaseBackOut : cc.ActionEase +local EaseBackOut = {} + +---@param action cc.ActionInterval +---@return cc.EaseBackOut +function EaseBackOut.create(action) end + +return EaseBackOut \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/EaseBezierAction.lua b/addons/cclua/cocos2d/library/cc/EaseBezierAction.lua new file mode 100644 index 00000000..a57257b0 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/EaseBezierAction.lua @@ -0,0 +1,22 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.EaseBezierAction + +---\class EaseBezierAction +---Ease Bezier +---\ingroup Actions +---@class cc.EaseBezierAction : cc.ActionEase +local EaseBezierAction = {} + +---Create the action with the inner action. +---@param action cc.ActionInterval # The pointer of the inner action. +---@return cc.EaseBezierAction # A pointer of EaseBezierAction action. If creation failed, return nil. +function EaseBezierAction.create(action) end + +---Set the bezier parameters. +---@param p0 number +---@param p1 number +---@param p2 number +---@param p3 number +function EaseBezierAction:setBezierParamer(p0, p1, p2, p3) end + +return EaseBezierAction \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/EaseBounceIn.lua b/addons/cclua/cocos2d/library/cc/EaseBounceIn.lua new file mode 100644 index 00000000..5a4de4aa --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/EaseBounceIn.lua @@ -0,0 +1,12 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.EaseBounceIn + +--- +---@class cc.EaseBounceIn : cc.ActionEase +local EaseBounceIn = {} + +---@param action cc.ActionInterval +---@return cc.EaseBounceIn +function EaseBounceIn.create(action) end + +return EaseBounceIn \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/EaseBounceInOut.lua b/addons/cclua/cocos2d/library/cc/EaseBounceInOut.lua new file mode 100644 index 00000000..6333cc40 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/EaseBounceInOut.lua @@ -0,0 +1,12 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.EaseBounceInOut + +--- +---@class cc.EaseBounceInOut : cc.ActionEase +local EaseBounceInOut = {} + +---@param action cc.ActionInterval +---@return cc.EaseBounceInOut +function EaseBounceInOut.create(action) end + +return EaseBounceInOut \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/EaseBounceOut.lua b/addons/cclua/cocos2d/library/cc/EaseBounceOut.lua new file mode 100644 index 00000000..af12383e --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/EaseBounceOut.lua @@ -0,0 +1,12 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.EaseBounceOut + +--- +---@class cc.EaseBounceOut : cc.ActionEase +local EaseBounceOut = {} + +---@param action cc.ActionInterval +---@return cc.EaseBounceOut +function EaseBounceOut.create(action) end + +return EaseBounceOut \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/EaseCircleActionIn.lua b/addons/cclua/cocos2d/library/cc/EaseCircleActionIn.lua new file mode 100644 index 00000000..16837abe --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/EaseCircleActionIn.lua @@ -0,0 +1,12 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.EaseCircleActionIn + +--- +---@class cc.EaseCircleActionIn : cc.ActionEase +local EaseCircleActionIn = {} + +---@param action cc.ActionInterval +---@return cc.EaseCircleActionIn +function EaseCircleActionIn.create(action) end + +return EaseCircleActionIn \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/EaseCircleActionInOut.lua b/addons/cclua/cocos2d/library/cc/EaseCircleActionInOut.lua new file mode 100644 index 00000000..6007d5bb --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/EaseCircleActionInOut.lua @@ -0,0 +1,12 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.EaseCircleActionInOut + +--- +---@class cc.EaseCircleActionInOut : cc.ActionEase +local EaseCircleActionInOut = {} + +---@param action cc.ActionInterval +---@return cc.EaseCircleActionInOut +function EaseCircleActionInOut.create(action) end + +return EaseCircleActionInOut \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/EaseCircleActionOut.lua b/addons/cclua/cocos2d/library/cc/EaseCircleActionOut.lua new file mode 100644 index 00000000..99ec7e34 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/EaseCircleActionOut.lua @@ -0,0 +1,12 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.EaseCircleActionOut + +--- +---@class cc.EaseCircleActionOut : cc.ActionEase +local EaseCircleActionOut = {} + +---@param action cc.ActionInterval +---@return cc.EaseCircleActionOut +function EaseCircleActionOut.create(action) end + +return EaseCircleActionOut \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/EaseCubicActionIn.lua b/addons/cclua/cocos2d/library/cc/EaseCubicActionIn.lua new file mode 100644 index 00000000..6eb6a3bc --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/EaseCubicActionIn.lua @@ -0,0 +1,12 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.EaseCubicActionIn + +--- +---@class cc.EaseCubicActionIn : cc.ActionEase +local EaseCubicActionIn = {} + +---@param action cc.ActionInterval +---@return cc.EaseCubicActionIn +function EaseCubicActionIn.create(action) end + +return EaseCubicActionIn \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/EaseCubicActionInOut.lua b/addons/cclua/cocos2d/library/cc/EaseCubicActionInOut.lua new file mode 100644 index 00000000..da110c2a --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/EaseCubicActionInOut.lua @@ -0,0 +1,12 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.EaseCubicActionInOut + +--- +---@class cc.EaseCubicActionInOut : cc.ActionEase +local EaseCubicActionInOut = {} + +---@param action cc.ActionInterval +---@return cc.EaseCubicActionInOut +function EaseCubicActionInOut.create(action) end + +return EaseCubicActionInOut \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/EaseCubicActionOut.lua b/addons/cclua/cocos2d/library/cc/EaseCubicActionOut.lua new file mode 100644 index 00000000..77480e87 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/EaseCubicActionOut.lua @@ -0,0 +1,12 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.EaseCubicActionOut + +--- +---@class cc.EaseCubicActionOut : cc.ActionEase +local EaseCubicActionOut = {} + +---@param action cc.ActionInterval +---@return cc.EaseCubicActionOut +function EaseCubicActionOut.create(action) end + +return EaseCubicActionOut \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/EaseElastic.lua b/addons/cclua/cocos2d/library/cc/EaseElastic.lua new file mode 100644 index 00000000..89bb0e73 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/EaseElastic.lua @@ -0,0 +1,20 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.EaseElastic + +---\class EaseElastic +---Ease Elastic abstract class +---\since v0.8.2 +---\ingroup Actions +---@class cc.EaseElastic : cc.ActionEase +---@field period number Get period of the wave in radians. Default value is 0.3. \return Return the period of the wave in radians. +local EaseElastic = {} + +---Get period of the wave in radians. Default value is 0.3. +---@return number # Return the period of the wave in radians. +function EaseElastic:getPeriod() end + +---Set period of the wave in radians. +---@param fPeriod number # The value will be set. +function EaseElastic:setPeriod(fPeriod) end + +return EaseElastic \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/EaseElasticIn.lua b/addons/cclua/cocos2d/library/cc/EaseElasticIn.lua new file mode 100644 index 00000000..90fd924b --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/EaseElasticIn.lua @@ -0,0 +1,14 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.EaseElasticIn + +--- +---@class cc.EaseElasticIn : cc.EaseElastic +local EaseElasticIn = {} + +---@param action cc.ActionInterval +---@param rate number +---@return cc.EaseElasticIn +---@overload fun(action: cc.ActionInterval): cc.EaseElasticIn +function EaseElasticIn.create(action, rate) end + +return EaseElasticIn \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/EaseElasticInOut.lua b/addons/cclua/cocos2d/library/cc/EaseElasticInOut.lua new file mode 100644 index 00000000..642a2d7a --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/EaseElasticInOut.lua @@ -0,0 +1,14 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.EaseElasticInOut + +--- +---@class cc.EaseElasticInOut : cc.EaseElastic +local EaseElasticInOut = {} + +---@param action cc.ActionInterval +---@param rate number +---@return cc.EaseElasticInOut +---@overload fun(action: cc.ActionInterval): cc.EaseElasticInOut +function EaseElasticInOut.create(action, rate) end + +return EaseElasticInOut \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/EaseElasticOut.lua b/addons/cclua/cocos2d/library/cc/EaseElasticOut.lua new file mode 100644 index 00000000..f611a9a6 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/EaseElasticOut.lua @@ -0,0 +1,14 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.EaseElasticOut + +--- +---@class cc.EaseElasticOut : cc.EaseElastic +local EaseElasticOut = {} + +---@param action cc.ActionInterval +---@param rate number +---@return cc.EaseElasticOut +---@overload fun(action: cc.ActionInterval): cc.EaseElasticOut +function EaseElasticOut.create(action, rate) end + +return EaseElasticOut \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/EaseExponentialIn.lua b/addons/cclua/cocos2d/library/cc/EaseExponentialIn.lua new file mode 100644 index 00000000..ecd356ef --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/EaseExponentialIn.lua @@ -0,0 +1,12 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.EaseExponentialIn + +--- +---@class cc.EaseExponentialIn : cc.ActionEase +local EaseExponentialIn = {} + +---@param action cc.ActionInterval +---@return cc.EaseExponentialIn +function EaseExponentialIn.create(action) end + +return EaseExponentialIn \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/EaseExponentialInOut.lua b/addons/cclua/cocos2d/library/cc/EaseExponentialInOut.lua new file mode 100644 index 00000000..470ecb59 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/EaseExponentialInOut.lua @@ -0,0 +1,12 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.EaseExponentialInOut + +--- +---@class cc.EaseExponentialInOut : cc.ActionEase +local EaseExponentialInOut = {} + +---@param action cc.ActionInterval +---@return cc.EaseExponentialInOut +function EaseExponentialInOut.create(action) end + +return EaseExponentialInOut \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/EaseExponentialOut.lua b/addons/cclua/cocos2d/library/cc/EaseExponentialOut.lua new file mode 100644 index 00000000..50afc4ee --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/EaseExponentialOut.lua @@ -0,0 +1,12 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.EaseExponentialOut + +--- +---@class cc.EaseExponentialOut : cc.ActionEase +local EaseExponentialOut = {} + +---@param action cc.ActionInterval +---@return cc.EaseExponentialOut +function EaseExponentialOut.create(action) end + +return EaseExponentialOut \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/EaseIn.lua b/addons/cclua/cocos2d/library/cc/EaseIn.lua new file mode 100644 index 00000000..ba6962d7 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/EaseIn.lua @@ -0,0 +1,13 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.EaseIn + +--- +---@class cc.EaseIn : cc.EaseRateAction +local EaseIn = {} + +---@param action cc.ActionInterval +---@param rate number +---@return cc.EaseIn +function EaseIn.create(action, rate) end + +return EaseIn \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/EaseInOut.lua b/addons/cclua/cocos2d/library/cc/EaseInOut.lua new file mode 100644 index 00000000..55682f47 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/EaseInOut.lua @@ -0,0 +1,13 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.EaseInOut + +--- +---@class cc.EaseInOut : cc.EaseRateAction +local EaseInOut = {} + +---@param action cc.ActionInterval +---@param rate number +---@return cc.EaseInOut +function EaseInOut.create(action, rate) end + +return EaseInOut \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/EaseOut.lua b/addons/cclua/cocos2d/library/cc/EaseOut.lua new file mode 100644 index 00000000..2b61f81b --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/EaseOut.lua @@ -0,0 +1,13 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.EaseOut + +--- +---@class cc.EaseOut : cc.EaseRateAction +local EaseOut = {} + +---@param action cc.ActionInterval +---@param rate number +---@return cc.EaseOut +function EaseOut.create(action, rate) end + +return EaseOut \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/EaseQuadraticActionIn.lua b/addons/cclua/cocos2d/library/cc/EaseQuadraticActionIn.lua new file mode 100644 index 00000000..491ca5e4 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/EaseQuadraticActionIn.lua @@ -0,0 +1,12 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.EaseQuadraticActionIn + +--- +---@class cc.EaseQuadraticActionIn : cc.ActionEase +local EaseQuadraticActionIn = {} + +---@param action cc.ActionInterval +---@return cc.EaseQuadraticActionIn +function EaseQuadraticActionIn.create(action) end + +return EaseQuadraticActionIn \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/EaseQuadraticActionInOut.lua b/addons/cclua/cocos2d/library/cc/EaseQuadraticActionInOut.lua new file mode 100644 index 00000000..f793fa86 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/EaseQuadraticActionInOut.lua @@ -0,0 +1,12 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.EaseQuadraticActionInOut + +--- +---@class cc.EaseQuadraticActionInOut : cc.ActionEase +local EaseQuadraticActionInOut = {} + +---@param action cc.ActionInterval +---@return cc.EaseQuadraticActionInOut +function EaseQuadraticActionInOut.create(action) end + +return EaseQuadraticActionInOut \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/EaseQuadraticActionOut.lua b/addons/cclua/cocos2d/library/cc/EaseQuadraticActionOut.lua new file mode 100644 index 00000000..a8901cfb --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/EaseQuadraticActionOut.lua @@ -0,0 +1,12 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.EaseQuadraticActionOut + +--- +---@class cc.EaseQuadraticActionOut : cc.ActionEase +local EaseQuadraticActionOut = {} + +---@param action cc.ActionInterval +---@return cc.EaseQuadraticActionOut +function EaseQuadraticActionOut.create(action) end + +return EaseQuadraticActionOut \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/EaseQuarticActionIn.lua b/addons/cclua/cocos2d/library/cc/EaseQuarticActionIn.lua new file mode 100644 index 00000000..f77d6241 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/EaseQuarticActionIn.lua @@ -0,0 +1,12 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.EaseQuarticActionIn + +--- +---@class cc.EaseQuarticActionIn : cc.ActionEase +local EaseQuarticActionIn = {} + +---@param action cc.ActionInterval +---@return cc.EaseQuarticActionIn +function EaseQuarticActionIn.create(action) end + +return EaseQuarticActionIn \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/EaseQuarticActionInOut.lua b/addons/cclua/cocos2d/library/cc/EaseQuarticActionInOut.lua new file mode 100644 index 00000000..199d5288 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/EaseQuarticActionInOut.lua @@ -0,0 +1,12 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.EaseQuarticActionInOut + +--- +---@class cc.EaseQuarticActionInOut : cc.ActionEase +local EaseQuarticActionInOut = {} + +---@param action cc.ActionInterval +---@return cc.EaseQuarticActionInOut +function EaseQuarticActionInOut.create(action) end + +return EaseQuarticActionInOut \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/EaseQuarticActionOut.lua b/addons/cclua/cocos2d/library/cc/EaseQuarticActionOut.lua new file mode 100644 index 00000000..d4148a79 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/EaseQuarticActionOut.lua @@ -0,0 +1,12 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.EaseQuarticActionOut + +--- +---@class cc.EaseQuarticActionOut : cc.ActionEase +local EaseQuarticActionOut = {} + +---@param action cc.ActionInterval +---@return cc.EaseQuarticActionOut +function EaseQuarticActionOut.create(action) end + +return EaseQuarticActionOut \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/EaseQuinticActionIn.lua b/addons/cclua/cocos2d/library/cc/EaseQuinticActionIn.lua new file mode 100644 index 00000000..fb80d340 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/EaseQuinticActionIn.lua @@ -0,0 +1,12 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.EaseQuinticActionIn + +--- +---@class cc.EaseQuinticActionIn : cc.ActionEase +local EaseQuinticActionIn = {} + +---@param action cc.ActionInterval +---@return cc.EaseQuinticActionIn +function EaseQuinticActionIn.create(action) end + +return EaseQuinticActionIn \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/EaseQuinticActionInOut.lua b/addons/cclua/cocos2d/library/cc/EaseQuinticActionInOut.lua new file mode 100644 index 00000000..e3016539 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/EaseQuinticActionInOut.lua @@ -0,0 +1,12 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.EaseQuinticActionInOut + +--- +---@class cc.EaseQuinticActionInOut : cc.ActionEase +local EaseQuinticActionInOut = {} + +---@param action cc.ActionInterval +---@return cc.EaseQuinticActionInOut +function EaseQuinticActionInOut.create(action) end + +return EaseQuinticActionInOut \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/EaseQuinticActionOut.lua b/addons/cclua/cocos2d/library/cc/EaseQuinticActionOut.lua new file mode 100644 index 00000000..024b837f --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/EaseQuinticActionOut.lua @@ -0,0 +1,12 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.EaseQuinticActionOut + +--- +---@class cc.EaseQuinticActionOut : cc.ActionEase +local EaseQuinticActionOut = {} + +---@param action cc.ActionInterval +---@return cc.EaseQuinticActionOut +function EaseQuinticActionOut.create(action) end + +return EaseQuinticActionOut \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/EaseRateAction.lua b/addons/cclua/cocos2d/library/cc/EaseRateAction.lua new file mode 100644 index 00000000..fd50cbb3 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/EaseRateAction.lua @@ -0,0 +1,25 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.EaseRateAction + +---\class EaseRateAction +---Base class for Easing actions with rate parameters +---\details Ease the inner action with specified rate. +---\ingroup Actions +---@class cc.EaseRateAction : cc.ActionEase +---@field rate number Get the rate value of the ease rate action. \return Return the rate value of the ease rate action. +local EaseRateAction = {} + +---@param action cc.ActionInterval +---@param rate number +---@return cc.EaseRateAction +function EaseRateAction.create(action, rate) end + +---Get the rate value of the ease rate action. +---@return number # Return the rate value of the ease rate action. +function EaseRateAction:getRate() end + +---Set the rate value for the ease rate action. +---@param rate number # The value will be set. +function EaseRateAction:setRate(rate) end + +return EaseRateAction \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/EaseSineIn.lua b/addons/cclua/cocos2d/library/cc/EaseSineIn.lua new file mode 100644 index 00000000..b3949564 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/EaseSineIn.lua @@ -0,0 +1,12 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.EaseSineIn + +--- +---@class cc.EaseSineIn : cc.ActionEase +local EaseSineIn = {} + +---@param action cc.ActionInterval +---@return cc.EaseSineIn +function EaseSineIn.create(action) end + +return EaseSineIn \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/EaseSineInOut.lua b/addons/cclua/cocos2d/library/cc/EaseSineInOut.lua new file mode 100644 index 00000000..7bae664b --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/EaseSineInOut.lua @@ -0,0 +1,12 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.EaseSineInOut + +--- +---@class cc.EaseSineInOut : cc.ActionEase +local EaseSineInOut = {} + +---@param action cc.ActionInterval +---@return cc.EaseSineInOut +function EaseSineInOut.create(action) end + +return EaseSineInOut \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/EaseSineOut.lua b/addons/cclua/cocos2d/library/cc/EaseSineOut.lua new file mode 100644 index 00000000..c9115afa --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/EaseSineOut.lua @@ -0,0 +1,12 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.EaseSineOut + +--- +---@class cc.EaseSineOut : cc.ActionEase +local EaseSineOut = {} + +---@param action cc.ActionInterval +---@return cc.EaseSineOut +function EaseSineOut.create(action) end + +return EaseSineOut \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/Event.lua b/addons/cclua/cocos2d/library/cc/Event.lua new file mode 100644 index 00000000..44271ef0 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/Event.lua @@ -0,0 +1,36 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.Event + +---\addtogroup base +---\{ +---@class cc.Event : cc.Ref +---@field currentTarget cc.Node Gets current target of the event. \return The target with which the event associates. \note It's only available when the event listener is associated with node. It returns 0 when the listener is associated with fixed priority. +---@field stopped boolean Checks whether the event has been stopped.

\return True if the event has been stopped. +---@field type cc.Event.Type Gets the event type.

\return The event type. +local Event = {} + +---Gets current target of the event. +---@return cc.Node # The target with which the event associates. +---\note It's only available when the event listener is associated with node. +---It returns 0 when the listener is associated with fixed priority. +function Event:getCurrentTarget() end + +---Gets the event type. +--- +---@return cc.Event.Type # The event type. +function Event:getType() end + +---Checks whether the event has been stopped. +--- +---@return boolean # True if the event has been stopped. +function Event:isStopped() end + +---Constructor +---@param type cc.Event.Type +---@return cc.Event +function Event.new(type) end + +---Stops propagation for current event. +function Event:stopPropagation() end + +return Event \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/Event/Type.lua b/addons/cclua/cocos2d/library/cc/Event/Type.lua new file mode 100644 index 00000000..c2fe04e8 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/Event/Type.lua @@ -0,0 +1,19 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.Event.Type + +---@type cc.Event.Type +local VALUE + +--- +---@enum cc.Event.Type +local Type = { + ACCELERATION = 2, + CUSTOM = 6, + FOCUS = 4, + GAME_CONTROLLER = 5, + KEYBOARD = 1, + MOUSE = 3, + TOUCH = 0, +} + +return Type \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/EventAcceleration.lua b/addons/cclua/cocos2d/library/cc/EventAcceleration.lua new file mode 100644 index 00000000..1d99b690 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/EventAcceleration.lua @@ -0,0 +1,15 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.EventAcceleration + +---\class EventAcceleration +---Accelerometer event. +---@class cc.EventAcceleration : cc.Event +local EventAcceleration = {} + +---Constructor. +--- +---@param acc cc.Acceleration # A given Acceleration. +---@return cc.EventAcceleration +function EventAcceleration.new(acc) end + +return EventAcceleration \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/EventController.lua b/addons/cclua/cocos2d/library/cc/EventController.lua new file mode 100644 index 00000000..4c2c7755 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/EventController.lua @@ -0,0 +1,56 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.EventController + +---\class EventController +---Controller event. +---@class cc.EventController : cc.Event +---@field connected boolean Gets the connect status.

\return True if it's connected. +---@field controller cc.Controller +---@field controllerEventType cc.EventController.ControllerEventType Gets the event type of the controller.

\return The event type of the controller. +---@field keyCode integer Gets the key code of the controller.

\return The key code of the controller. +local EventController = {} + +---@return cc.Controller +function EventController:getController() end + +---Gets the event type of the controller. +--- +---@return cc.EventController.ControllerEventType # The event type of the controller. +function EventController:getControllerEventType() end + +---Gets the key code of the controller. +--- +---@return integer # The key code of the controller. +function EventController:getKeyCode() end + +---Gets the connect status. +--- +---@return boolean # True if it's connected. +function EventController:isConnected() end + +---Create a EventController with controller event type, controller and key code. +--- +---@param type cc.EventController.ControllerEventType # A given controller event type. +---@param controller cc.Controller # A given controller pointer. +---@param keyCode integer # A given key code. +---@return cc.EventController # An autoreleased EventController object. +--- +---Create a EventController with controller event type, controller and whether or not is connected. +--- +---\param type A given controller event type. +---\param controller A given controller pointer. +---\param isConnected True if it is connected. +---\return An autoreleased EventController object. +---@overload fun(type: cc.EventController.ControllerEventType, controller: cc.Controller, isConnected: boolean): cc.EventController +function EventController.new(type, controller, keyCode) end + +---Sets the connect status. +--- +---\param True if it's connected. +---@param isConnected boolean +function EventController:setConnectStatus(isConnected) end + +---@param keyCode integer +function EventController:setKeyCode(keyCode) end + +return EventController \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/EventController/ControllerEventType.lua b/addons/cclua/cocos2d/library/cc/EventController/ControllerEventType.lua new file mode 100644 index 00000000..caf244bd --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/EventController/ControllerEventType.lua @@ -0,0 +1,15 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.EventController.ControllerEventType + +---@type cc.EventController.ControllerEventType +local VALUE + +--- +---@enum cc.EventController.ControllerEventType +local ControllerEventType = { + AXIS_STATUS_CHANGED = 2, + BUTTON_STATUS_CHANGED = 1, + CONNECTION = 0, +} + +return ControllerEventType \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/EventCustom.lua b/addons/cclua/cocos2d/library/cc/EventCustom.lua new file mode 100644 index 00000000..63a628c9 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/EventCustom.lua @@ -0,0 +1,33 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.EventCustom + +---\addtogroup base +---\{ +---@class cc.EventCustom : cc.Event +---@field eventName string Gets event name.

\return The name of the event. +---@field userData any Gets user data.

\return The user data pointer, it's a void*. +local EventCustom = {} + +---Gets event name. +--- +---@return string # The name of the event. +function EventCustom:getEventName() end + +---Gets user data. +--- +---@return any # The user data pointer, it's a void*. +function EventCustom:getUserData() end + +---Constructor. +--- +---@param eventName string # A given name of the custom event. +---\js ctor +---@return cc.EventCustom +function EventCustom.new(eventName) end + +---Sets user data. +--- +---@param data any # The user data pointer, it's a void*. +function EventCustom:setUserData(data) end + +return EventCustom \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/EventDispatcher.lua b/addons/cclua/cocos2d/library/cc/EventDispatcher.lua new file mode 100644 index 00000000..3ee5c796 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/EventDispatcher.lua @@ -0,0 +1,121 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.EventDispatcher + +---\class EventDispatcher +---This class manages event listener subscriptions +---and event dispatching. +--- +---The EventListener list is managed in such a way that +---event listeners can be added and removed even +---from within an EventListener, while events are being +---dispatched. +---\js NA +---@class cc.EventDispatcher : cc.Ref +---@field enabled boolean Checks whether dispatching events is enabled.

\return True if dispatching events is enabled. +local EventDispatcher = {} + +---Adds a Custom event listener. +---It will use a fixed priority of 1. +---@param eventName string # A given name of the event. +---@param callback fun(arg1: cc.EventCustom) # A given callback method that associated the event name. +---@return cc.EventListenerCustom # the generated event. Needed in order to remove the event from the dispatcher +function EventDispatcher:addCustomEventListener(eventName, callback) end + +---@return any +function EventDispatcher:addEventListener() end + +---Adds a event listener for a specified event with the fixed priority. +---@param listener cc.EventListener # The listener of a specified event. +---@param fixedPriority integer # The fixed priority of the listener. +---\note A lower priority will be called before the ones that have a higher value. +---0 priority is forbidden for fixed priority since it's used for scene graph based priority. +function EventDispatcher:addEventListenerWithFixedPriority(listener, fixedPriority) end + +---Adds a event listener for a specified event with the priority of scene graph. +---@param listener cc.EventListener # The listener of a specified event. +---@param node cc.Node # The priority of the listener is based on the draw order of this node. +---\note The priority of scene graph will be fixed value 0. So the order of listener item +---in the vector will be ' <0, scene graph (0 priority), >0'. +function EventDispatcher:addEventListenerWithSceneGraphPriority(listener, node) end + +---Dispatches a Custom Event with a event name an optional user data. +--- +---@param eventName string # The name of the event which needs to be dispatched. +---@param optionalUserData any # The optional user data, it's a void*, the default value is nullptr. +---@overload fun(self: cc.EventDispatcher, eventName: string) +function EventDispatcher:dispatchCustomEvent(eventName, optionalUserData) end + +---Dispatches the event. +---Also removes all EventListeners marked for deletion from the +---event dispatcher list. +--- +---@param event cc.Event # The event needs to be dispatched. +function EventDispatcher:dispatchEvent(event) end + +---Query whether the specified event listener id has been added. +--- +---@param listenerID any # The listenerID of the event listener id. +--- +---@return boolean # True if dispatching events is exist +function EventDispatcher:hasEventListener(listenerID) end + +---Checks whether dispatching events is enabled. +--- +---@return boolean # True if dispatching events is enabled. +function EventDispatcher:isEnabled() end + +---Constructor of EventDispatcher. +---@return cc.EventDispatcher +function EventDispatcher.new() end + +---Pauses all listeners which are associated the specified target. +--- +---@param target cc.Node # A given target node. +---@param recursive boolean # True if pause recursively, the default value is false. +---@overload fun(self: cc.EventDispatcher, target: cc.Node) +function EventDispatcher:pauseEventListenersForTarget(target, recursive) end + +---Removes all listeners. +function EventDispatcher:removeAllEventListeners() end + +---Removes all custom listeners with the same event name. +--- +---@param customEventName string # A given event listener name which needs to be removed. +function EventDispatcher:removeCustomEventListeners(customEventName) end + +---Remove a listener. +--- +---@param listener cc.EventListener # The specified event listener which needs to be removed. +function EventDispatcher:removeEventListener(listener) end + +---Removes all listeners which are associated with the specified target. +--- +---@param target cc.Node # A given target node. +---@param recursive boolean # True if remove recursively, the default value is false. +---@overload fun(self: cc.EventDispatcher, target: cc.Node) +function EventDispatcher:removeEventListenersForTarget(target, recursive) end + +---Removes all listeners with the same event listener type. +--- +---@param listenerType cc.EventListener.Type # A given event listener type which needs to be removed. +function EventDispatcher:removeEventListenersForType(listenerType) end + +---Resumes all listeners which are associated the specified target. +--- +---@param target cc.Node # A given target node. +---@param recursive boolean # True if resume recursively, the default value is false. +---@overload fun(self: cc.EventDispatcher, target: cc.Node) +function EventDispatcher:resumeEventListenersForTarget(target, recursive) end + +---Whether to enable dispatching events. +--- +---@param isEnabled boolean # True if enable dispatching events. +function EventDispatcher:setEnabled(isEnabled) end + +---Sets listener's priority with fixed value. +--- +---@param listener cc.EventListener # A given listener. +---@param fixedPriority integer # The fixed priority value. +function EventDispatcher:setPriority(listener, fixedPriority) end + +return EventDispatcher \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/EventFocus.lua b/addons/cclua/cocos2d/library/cc/EventFocus.lua new file mode 100644 index 00000000..fb8bc44e --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/EventFocus.lua @@ -0,0 +1,17 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.EventFocus + +---\class EventFocus +---Focus event. +---@class cc.EventFocus : cc.Event +local EventFocus = {} + +---Constructor. +--- +---@param widgetLoseFocus ccui.Widget # The widget which lose focus. +---@param widgetGetFocus ccui.Widget # The widget which get focus. +---\js ctor +---@return cc.EventFocus +function EventFocus.new(widgetLoseFocus, widgetGetFocus) end + +return EventFocus \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/EventKeyboard.lua b/addons/cclua/cocos2d/library/cc/EventKeyboard.lua new file mode 100644 index 00000000..cabb5273 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/EventKeyboard.lua @@ -0,0 +1,17 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.EventKeyboard + +---\class EventKeyboard +---Keyboard event. +---@class cc.EventKeyboard : cc.Event +local EventKeyboard = {} + +---Constructor. +--- +---@param keyCode cc.EventKeyboard.KeyCode # A given keycode. +---@param isPressed boolean # True if the key is pressed. +---\js ctor +---@return cc.EventKeyboard +function EventKeyboard.new(keyCode, isPressed) end + +return EventKeyboard \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/EventKeyboard/KeyCode.lua b/addons/cclua/cocos2d/library/cc/EventKeyboard/KeyCode.lua new file mode 100644 index 00000000..0dfbc8cd --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/EventKeyboard/KeyCode.lua @@ -0,0 +1,182 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.EventKeyboard.KeyCode + +---@type cc.EventKeyboard.KeyCode +local VALUE + +--- +---@enum cc.EventKeyboard.KeyCode +local KeyCode = { + KEY_0 = 76, + KEY_1 = 77, + KEY_2 = 78, + KEY_3 = 79, + KEY_4 = 80, + KEY_5 = 81, + KEY_6 = 82, + KEY_7 = 83, + KEY_8 = 84, + KEY_9 = 85, + KEY_A = 124, + KEY_ALT = 16, + KEY_AMPERSAND = 66, + KEY_APOSTROPHE = 67, + KEY_ASTERISK = 70, + KEY_AT = 92, + KEY_B = 125, + KEY_BACK = 6, + KEY_BACKSPACE = 7, + KEY_BACK_SLASH = 120, + KEY_BACK_TAB = 9, + KEY_BAR = 151, + KEY_BREAK = 5, + KEY_C = 126, + KEY_CAPITAL_A = 93, + KEY_CAPITAL_B = 94, + KEY_CAPITAL_C = 95, + KEY_CAPITAL_D = 96, + KEY_CAPITAL_E = 97, + KEY_CAPITAL_F = 98, + KEY_CAPITAL_G = 99, + KEY_CAPITAL_H = 100, + KEY_CAPITAL_I = 101, + KEY_CAPITAL_J = 102, + KEY_CAPITAL_K = 103, + KEY_CAPITAL_L = 104, + KEY_CAPITAL_M = 105, + KEY_CAPITAL_N = 106, + KEY_CAPITAL_O = 107, + KEY_CAPITAL_P = 108, + KEY_CAPITAL_Q = 109, + KEY_CAPITAL_R = 110, + KEY_CAPITAL_S = 111, + KEY_CAPITAL_T = 112, + KEY_CAPITAL_U = 113, + KEY_CAPITAL_V = 114, + KEY_CAPITAL_W = 115, + KEY_CAPITAL_X = 116, + KEY_CAPITAL_Y = 117, + KEY_CAPITAL_Z = 118, + KEY_CAPS_LOCK = 11, + KEY_CIRCUMFLEX = 65, + KEY_COLON = 86, + KEY_COMMA = 72, + KEY_CTRL = 14, + KEY_D = 127, + KEY_DELETE = 23, + KEY_DOLLAR = 63, + KEY_DOWN_ARROW = 29, + KEY_DPAD_CENTER = 163, + KEY_DPAD_DOWN = 162, + KEY_DPAD_LEFT = 159, + KEY_DPAD_RIGHT = 160, + KEY_DPAD_UP = 161, + KEY_E = 128, + KEY_END = 24, + KEY_ENTER = 164, + KEY_EQUAL = 89, + KEY_ESCAPE = 6, + KEY_EURO = 154, + KEY_EXCLAM = 60, + KEY_F = 129, + KEY_F1 = 47, + KEY_F10 = 56, + KEY_F11 = 57, + KEY_F12 = 58, + KEY_F2 = 48, + KEY_F3 = 49, + KEY_F4 = 50, + KEY_F5 = 51, + KEY_F6 = 52, + KEY_F7 = 53, + KEY_F8 = 54, + KEY_F9 = 55, + KEY_G = 130, + KEY_GRAVE = 123, + KEY_GREATER_THAN = 90, + KEY_H = 131, + KEY_HOME = 21, + KEY_HYPER = 19, + KEY_I = 132, + KEY_INSERT = 20, + KEY_J = 133, + KEY_K = 134, + KEY_KP_DELETE = 46, + KEY_KP_DIVIDE = 34, + KEY_KP_DOWN = 43, + KEY_KP_END = 42, + KEY_KP_ENTER = 35, + KEY_KP_FIVE = 40, + KEY_KP_HOME = 36, + KEY_KP_INSERT = 45, + KEY_KP_LEFT = 39, + KEY_KP_MINUS = 32, + KEY_KP_MULTIPLY = 33, + KEY_KP_PG_DOWN = 44, + KEY_KP_PG_UP = 38, + KEY_KP_PLUS = 31, + KEY_KP_RIGHT = 41, + KEY_KP_UP = 37, + KEY_L = 135, + KEY_LEFT_ALT = 16, + KEY_LEFT_ARROW = 26, + KEY_LEFT_BRACE = 150, + KEY_LEFT_BRACKET = 119, + KEY_LEFT_CTRL = 14, + KEY_LEFT_PARENTHESIS = 68, + KEY_LEFT_SHIFT = 12, + KEY_LESS_THAN = 88, + KEY_M = 136, + KEY_MENU = 18, + KEY_MIDDLE_DOT = 157, + KEY_MINUS = 73, + KEY_N = 137, + KEY_NONE = 0, + KEY_NUMBER = 62, + KEY_NUM_LOCK = 30, + KEY_O = 138, + KEY_P = 139, + KEY_PAUSE = 1, + KEY_PERCENT = 64, + KEY_PERIOD = 74, + KEY_PG_DOWN = 25, + KEY_PG_UP = 22, + KEY_PLAY = 165, + KEY_PLUS = 71, + KEY_POUND = 155, + KEY_PRINT = 3, + KEY_Q = 140, + KEY_QUESTION = 91, + KEY_QUOTE = 61, + KEY_R = 141, + KEY_RETURN = 10, + KEY_RIGHT_ALT = 17, + KEY_RIGHT_ARROW = 27, + KEY_RIGHT_BRACE = 152, + KEY_RIGHT_BRACKET = 121, + KEY_RIGHT_CTRL = 15, + KEY_RIGHT_PARENTHESIS = 69, + KEY_RIGHT_SHIFT = 13, + KEY_S = 142, + KEY_SCROLL_LOCK = 2, + KEY_SEARCH = 158, + KEY_SEMICOLON = 87, + KEY_SHIFT = 12, + KEY_SLASH = 75, + KEY_SPACE = 59, + KEY_SYSREQ = 4, + KEY_T = 143, + KEY_TAB = 8, + KEY_TILDE = 153, + KEY_U = 144, + KEY_UNDERSCORE = 122, + KEY_UP_ARROW = 28, + KEY_V = 145, + KEY_W = 146, + KEY_X = 147, + KEY_Y = 148, + KEY_YEN = 156, + KEY_Z = 149, +} + +return KeyCode \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/EventListener.lua b/addons/cclua/cocos2d/library/cc/EventListener.lua new file mode 100644 index 00000000..54e7f996 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/EventListener.lua @@ -0,0 +1,36 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.EventListener + +---\class EventListener +---The base class of event listener. +---If you need custom listener which with different callback, you need to inherit this class. +---For instance, you could refer to EventListenerAcceleration, EventListenerKeyboard, EventListenerTouchOneByOne, EventListenerCustom. +---@class cc.EventListener : cc.Ref +---@field available boolean Checks whether the listener is available.

\return True if the listener is available. +---@field enabled boolean Checks whether the listener is enabled.

\return True if the listener is enabled. +local EventListener = {} + +---Checks whether the listener is available. +--- +---@return boolean # True if the listener is available. +function EventListener:checkAvailable() end + +---Clones the listener, its subclasses have to override this method. +---@return cc.EventListener +function EventListener:clone() end + +---Checks whether the listener is enabled. +--- +---@return boolean # True if the listener is enabled. +function EventListener:isEnabled() end + +---Enables or disables the listener. +---\note Only listeners with `enabled` state will be able to receive events. +---When an listener was initialized, it's enabled by default. +---An event listener can receive events when it is enabled and is not paused. +---paused state is always false when it is a fixed priority listener. +--- +---@param enabled boolean # True if enables the listener. +function EventListener:setEnabled(enabled) end + +return EventListener \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/EventListener/Type.lua b/addons/cclua/cocos2d/library/cc/EventListener/Type.lua new file mode 100644 index 00000000..2276b406 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/EventListener/Type.lua @@ -0,0 +1,21 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.EventListener.Type + +---@type cc.EventListener.Type +local VALUE + +--- +---@enum cc.EventListener.Type +local Type = { + ACCELERATION = 5, + CUSTOM = 8, + FOCUS = 6, + GAME_CONTROLLER = 7, + KEYBOARD = 3, + MOUSE = 4, + TOUCH_ALL_AT_ONCE = 2, + TOUCH_ONE_BY_ONE = 1, + UNKNOWN = 0, +} + +return Type \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/EventListenerAcceleration.lua b/addons/cclua/cocos2d/library/cc/EventListenerAcceleration.lua new file mode 100644 index 00000000..f6b57cd8 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/EventListenerAcceleration.lua @@ -0,0 +1,20 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.EventListenerAcceleration + +---\class EventListenerAcceleration +---Acceleration event listener. +---\js NA +---@class cc.EventListenerAcceleration : cc.EventListener +---@field LISTENER_ID string +local EventListenerAcceleration = {} + +---Create a acceleration EventListener. +--- +---@param callback fun(arg1: cc.Acceleration, arg2: cc.Event) # The acceleration callback method. +---@return cc.EventListenerAcceleration # An autoreleased EventListenerAcceleration object. +function EventListenerAcceleration.create(callback) end + +---@return cc.EventListenerAcceleration +function EventListenerAcceleration.new() end + +return EventListenerAcceleration \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/EventListenerController.lua b/addons/cclua/cocos2d/library/cc/EventListenerController.lua new file mode 100644 index 00000000..def95ec6 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/EventListenerController.lua @@ -0,0 +1,22 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.EventListenerController + +---\class EventListenerController +---\param Controller event listener. +---\js NA +---@class cc.EventListenerController : cc.EventListener +---@field onAxisEvent fun(arg1: cc.Controller, arg2: integer, arg3: cc.Event) +---@field onConnected fun(arg1: cc.Controller, arg2: cc.Event) +---@field onDisconnected fun(arg1: cc.Controller, arg2: cc.Event) +---@field onKeyDown fun(arg1: cc.Controller, arg2: integer, arg3: cc.Event) +---@field onKeyRepeat fun(arg1: cc.Controller, arg2: integer, arg3: cc.Event) +---@field onKeyUp fun(arg1: cc.Controller, arg2: integer, arg3: cc.Event) +---@field LISTENER_ID string +local EventListenerController = {} + +---Create a controller event listener. +--- +---@return cc.EventListenerController # An autoreleased EventListenerController object. +function EventListenerController.create() end + +return EventListenerController \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/EventListenerCustom.lua b/addons/cclua/cocos2d/library/cc/EventListenerCustom.lua new file mode 100644 index 00000000..a4fd4bf6 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/EventListenerCustom.lua @@ -0,0 +1,37 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.EventListenerCustom + +---\class EventListenerCustom +---Custom event listener. +---\code Usage: +---auto dispatcher = Director::getInstance()->getEventDispatcher(); +---Adds a listener: +--- +---auto callback = [](EventCustom* event){ do_some_thing(); }; +---auto listener = EventListenerCustom::create(callback); +---dispatcher->addEventListenerWithSceneGraphPriority(listener, one_node); +--- +---Dispatches a custom event: +--- +---EventCustom event("your_event_type"); +---dispatcher->dispatchEvent(&event); +--- +---Removes a listener +--- +---dispatcher->removeEventListener(listener); +---``` +---\js cc._EventListenerCustom +---@class cc.EventListenerCustom : cc.EventListener +local EventListenerCustom = {} + +---Creates an event listener with type and callback. +---@param eventName string # The type of the event. +---@param callback fun(arg1: cc.EventCustom) # The callback function when the specified event was emitted. +---@return cc.EventListenerCustom # An autoreleased EventListenerCustom object. +function EventListenerCustom.create(eventName, callback) end + +---Constructor +---@return cc.EventListenerCustom +function EventListenerCustom.new() end + +return EventListenerCustom \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/EventListenerFocus.lua b/addons/cclua/cocos2d/library/cc/EventListenerFocus.lua new file mode 100644 index 00000000..2c797fbd --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/EventListenerFocus.lua @@ -0,0 +1,19 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.EventListenerFocus + +---\class EventListenerFocus +---Focus event listener. +---@class cc.EventListenerFocus : cc.EventListener +---@field onFocusChanged fun(arg1: ccui.Widget, arg2: ccui.Widget) +---@field LISTENER_ID string +local EventListenerFocus = {} + +---Create a focus event listener. +--- +---@return cc.EventListenerFocus # An autoreleased EventListenerFocus object. +function EventListenerFocus.create() end + +---@return cc.EventListenerFocus +function EventListenerFocus.new() end + +return EventListenerFocus \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/EventListenerKeyboard.lua b/addons/cclua/cocos2d/library/cc/EventListenerKeyboard.lua new file mode 100644 index 00000000..41b18977 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/EventListenerKeyboard.lua @@ -0,0 +1,21 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.EventListenerKeyboard + +---\class EventListenerKeyboard +---Keyboard event listener. +---\js cc._EventListenerKeyboard +---@class cc.EventListenerKeyboard : cc.EventListener +---@field onKeyPressed fun(arg1: cc.EventKeyboard.KeyCode, arg2: cc.Event) +---@field onKeyReleased fun(arg1: cc.EventKeyboard.KeyCode, arg2: cc.Event) +---@field LISTENER_ID string +local EventListenerKeyboard = {} + +---Create a keyboard event listener. +--- +---@return cc.EventListenerKeyboard # An autoreleased EventListenerKeyboard object. +function EventListenerKeyboard.create() end + +---@return cc.EventListenerKeyboard +function EventListenerKeyboard.new() end + +return EventListenerKeyboard \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/EventListenerMouse.lua b/addons/cclua/cocos2d/library/cc/EventListenerMouse.lua new file mode 100644 index 00000000..e300505f --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/EventListenerMouse.lua @@ -0,0 +1,23 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.EventListenerMouse + +---\class EventListenerMouse +---Mouse event listener. +---\js cc._EventListenerMouse +---@class cc.EventListenerMouse : cc.EventListener +---@field onMouseDown fun(arg1: cc.EventMouse) +---@field onMouseMove fun(arg1: cc.EventMouse) +---@field onMouseScroll fun(arg1: cc.EventMouse) +---@field onMouseUp fun(arg1: cc.EventMouse) +---@field LISTENER_ID string +local EventListenerMouse = {} + +---Create a mouse event listener. +--- +---@return cc.EventListenerMouse # An autoreleased EventListenerMouse object. +function EventListenerMouse.create() end + +---@return cc.EventListenerMouse +function EventListenerMouse.new() end + +return EventListenerMouse \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/EventListenerPhysicsContact.lua b/addons/cclua/cocos2d/library/cc/EventListenerPhysicsContact.lua new file mode 100644 index 00000000..ea678d18 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/EventListenerPhysicsContact.lua @@ -0,0 +1,16 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.EventListenerPhysicsContact + +---Contact listener. It will receive all the contact callbacks. +---@class cc.EventListenerPhysicsContact : cc.EventListenerCustom +---@field onContactBegin fun(arg1: cc.PhysicsContact): boolean +---@field onContactPostSolve fun(arg1: cc.PhysicsContact, arg2: cc.PhysicsContactPostSolve) +---@field onContactPreSolve fun(arg1: cc.PhysicsContact, arg2: cc.PhysicsContactPreSolve): boolean +---@field onContactSeparate fun(arg1: cc.PhysicsContact) +local EventListenerPhysicsContact = {} + +---Create the listener. +---@return cc.EventListenerPhysicsContact +function EventListenerPhysicsContact.create() end + +return EventListenerPhysicsContact \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/EventListenerPhysicsContactWithBodies.lua b/addons/cclua/cocos2d/library/cc/EventListenerPhysicsContactWithBodies.lua new file mode 100644 index 00000000..959d9d0d --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/EventListenerPhysicsContactWithBodies.lua @@ -0,0 +1,19 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.EventListenerPhysicsContactWithBodies + +---This event listener only be called when bodyA and bodyB have contacts. +---@class cc.EventListenerPhysicsContactWithBodies : cc.EventListenerPhysicsContact +local EventListenerPhysicsContactWithBodies = {} + +---Create the listener. +---@param bodyA cc.PhysicsBody +---@param bodyB cc.PhysicsBody +---@return cc.EventListenerPhysicsContactWithBodies +function EventListenerPhysicsContactWithBodies.create(bodyA, bodyB) end + +---@param shapeA cc.PhysicsShape +---@param shapeB cc.PhysicsShape +---@return boolean +function EventListenerPhysicsContactWithBodies:hitTest(shapeA, shapeB) end + +return EventListenerPhysicsContactWithBodies \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/EventListenerPhysicsContactWithGroup.lua b/addons/cclua/cocos2d/library/cc/EventListenerPhysicsContactWithGroup.lua new file mode 100644 index 00000000..740fee28 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/EventListenerPhysicsContactWithGroup.lua @@ -0,0 +1,18 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.EventListenerPhysicsContactWithGroup + +---This event listener only be called when shapeA or shapeB is in the group your specified +---@class cc.EventListenerPhysicsContactWithGroup : cc.EventListenerPhysicsContact +local EventListenerPhysicsContactWithGroup = {} + +---Create the listener. +---@param group integer +---@return cc.EventListenerPhysicsContactWithGroup +function EventListenerPhysicsContactWithGroup.create(group) end + +---@param shapeA cc.PhysicsShape +---@param shapeB cc.PhysicsShape +---@return boolean +function EventListenerPhysicsContactWithGroup:hitTest(shapeA, shapeB) end + +return EventListenerPhysicsContactWithGroup \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/EventListenerPhysicsContactWithShapes.lua b/addons/cclua/cocos2d/library/cc/EventListenerPhysicsContactWithShapes.lua new file mode 100644 index 00000000..93034ad3 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/EventListenerPhysicsContactWithShapes.lua @@ -0,0 +1,19 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.EventListenerPhysicsContactWithShapes + +---This event listener only be called when shapeA and shapeB have contacts. +---@class cc.EventListenerPhysicsContactWithShapes : cc.EventListenerPhysicsContact +local EventListenerPhysicsContactWithShapes = {} + +---Create the listener. +---@param shapeA cc.PhysicsShape +---@param shapeB cc.PhysicsShape +---@return cc.EventListenerPhysicsContactWithShapes +function EventListenerPhysicsContactWithShapes.create(shapeA, shapeB) end + +---@param shapeA cc.PhysicsShape +---@param shapeB cc.PhysicsShape +---@return boolean +function EventListenerPhysicsContactWithShapes:hitTest(shapeA, shapeB) end + +return EventListenerPhysicsContactWithShapes \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/EventListenerTouchAllAtOnce.lua b/addons/cclua/cocos2d/library/cc/EventListenerTouchAllAtOnce.lua new file mode 100644 index 00000000..0faa9727 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/EventListenerTouchAllAtOnce.lua @@ -0,0 +1,22 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.EventListenerTouchAllAtOnce + +---\class EventListenerTouchAllAtOnce +---Multiple touches event listener. +---@class cc.EventListenerTouchAllAtOnce : cc.EventListener +---@field onTouchesBegan cc.EventListenerTouchAllAtOnce.ccTouchesCallback +---@field onTouchesCancelled cc.EventListenerTouchAllAtOnce.ccTouchesCallback +---@field onTouchesEnded cc.EventListenerTouchAllAtOnce.ccTouchesCallback +---@field onTouchesMoved cc.EventListenerTouchAllAtOnce.ccTouchesCallback +---@field LISTENER_ID string +local EventListenerTouchAllAtOnce = {} + +---Create a all at once event listener. +--- +---@return cc.EventListenerTouchAllAtOnce # An autoreleased EventListenerTouchAllAtOnce object. +function EventListenerTouchAllAtOnce.create() end + +---@return cc.EventListenerTouchAllAtOnce +function EventListenerTouchAllAtOnce.new() end + +return EventListenerTouchAllAtOnce \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/EventListenerTouchAllAtOnce/ccTouchesCallback.lua b/addons/cclua/cocos2d/library/cc/EventListenerTouchAllAtOnce/ccTouchesCallback.lua new file mode 100644 index 00000000..c2d5f488 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/EventListenerTouchAllAtOnce/ccTouchesCallback.lua @@ -0,0 +1,14 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.EventListenerTouchAllAtOnce.ccTouchesCallback + +--- +--- +---std::function &, cocos2d::Event *)> +---@class cc.EventListenerTouchAllAtOnce.ccTouchesCallback +local ccTouchesCallback = {} + +---@return cc.EventListenerTouchAllAtOnce.ccTouchesCallback + +function ccTouchesCallback:__call() end + +return ccTouchesCallback \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/EventListenerTouchOneByOne.lua b/addons/cclua/cocos2d/library/cc/EventListenerTouchOneByOne.lua new file mode 100644 index 00000000..aac1f47a --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/EventListenerTouchOneByOne.lua @@ -0,0 +1,33 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.EventListenerTouchOneByOne + +---\class EventListenerTouchOneByOne +---Single touch event listener. +---\js cc._EventListenerTouchOneByOne +---@class cc.EventListenerTouchOneByOne : cc.EventListener +---@field swallowTouches boolean Is swall touches or not.

\return True if needs to swall touches. +---@field onTouchBegan cc.EventListenerTouchOneByOne.ccTouchBeganCallback +---@field onTouchCancelled cc.EventListenerTouchOneByOne.ccTouchCallback +---@field onTouchEnded cc.EventListenerTouchOneByOne.ccTouchCallback +---@field onTouchMoved cc.EventListenerTouchOneByOne.ccTouchCallback +---@field LISTENER_ID string +local EventListenerTouchOneByOne = {} + +---Create a one by one touch event listener. +---@return cc.EventListenerTouchOneByOne +function EventListenerTouchOneByOne.create() end + +---Is swall touches or not. +--- +---@return boolean # True if needs to swall touches. +function EventListenerTouchOneByOne:isSwallowTouches() end + +---@return cc.EventListenerTouchOneByOne +function EventListenerTouchOneByOne.new() end + +---Whether or not to swall touches. +--- +---@param needSwallow boolean # True if needs to swall touches. +function EventListenerTouchOneByOne:setSwallowTouches(needSwallow) end + +return EventListenerTouchOneByOne \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/EventListenerTouchOneByOne/ccTouchBeganCallback.lua b/addons/cclua/cocos2d/library/cc/EventListenerTouchOneByOne/ccTouchBeganCallback.lua new file mode 100644 index 00000000..6de7a14f --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/EventListenerTouchOneByOne/ccTouchBeganCallback.lua @@ -0,0 +1,14 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.EventListenerTouchOneByOne.ccTouchBeganCallback + +--- +--- +---std::function +---@class cc.EventListenerTouchOneByOne.ccTouchBeganCallback +local ccTouchBeganCallback = {} + +---@return cc.EventListenerTouchOneByOne.ccTouchBeganCallback + +function ccTouchBeganCallback:__call() end + +return ccTouchBeganCallback \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/EventListenerTouchOneByOne/ccTouchCallback.lua b/addons/cclua/cocos2d/library/cc/EventListenerTouchOneByOne/ccTouchCallback.lua new file mode 100644 index 00000000..0cab5c17 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/EventListenerTouchOneByOne/ccTouchCallback.lua @@ -0,0 +1,14 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.EventListenerTouchOneByOne.ccTouchCallback + +--- +--- +---std::function +---@class cc.EventListenerTouchOneByOne.ccTouchCallback +local ccTouchCallback = {} + +---@return cc.EventListenerTouchOneByOne.ccTouchCallback + +function ccTouchCallback:__call() end + +return ccTouchCallback \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/EventMouse.lua b/addons/cclua/cocos2d/library/cc/EventMouse.lua new file mode 100644 index 00000000..7b0b0d10 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/EventMouse.lua @@ -0,0 +1,114 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.EventMouse + +---\class EventMouse +---The mouse event. +---@class cc.EventMouse : cc.Event +---@field cursorX number Get the cursor position of x axis.

\return The x coordinate of cursor position. \js getLocationX +---@field cursorY number Get the cursor position of y axis.

\return The y coordinate of cursor position. \js getLocationY +---@field delta cc.Vec2 Returns the delta of 2 current touches locations in screen coordinates.

\return The delta of 2 current touches locations in screen coordinates. +---@field location cc.Vec2 Returns the current touch location in OpenGL coordinates.

\return The current touch location in OpenGL coordinates. +---@field locationInView cc.Vec2 Returns the current touch location in screen coordinates.

\return The current touch location in screen coordinates. +---@field mouseButton cc.EventMouse.MouseButton Get mouse button.

\return The mouse button. \js getButton +---@field previousLocation cc.Vec2 Returns the previous touch location in OpenGL coordinates.

\return The previous touch location in OpenGL coordinates. \js NA +---@field previousLocationInView cc.Vec2 Returns the previous touch location in screen coordinates.

\return The previous touch location in screen coordinates. \js NA +---@field scrollX number Get mouse scroll data of x axis.

\return The scroll data of x axis. +---@field scrollY number Get mouse scroll data of y axis.

\return The scroll data of y axis. +---@field startLocation cc.Vec2 Returns the start touch location in OpenGL coordinates.

\return The start touch location in OpenGL coordinates. \js NA +---@field startLocationInView cc.Vec2 Returns the start touch location in screen coordinates.

\return The start touch location in screen coordinates. \js NA +local EventMouse = {} + +---Get the cursor position of x axis. +--- +---@return number # The x coordinate of cursor position. +---\js getLocationX +function EventMouse:getCursorX() end + +---Get the cursor position of y axis. +--- +---@return number # The y coordinate of cursor position. +---\js getLocationY +function EventMouse:getCursorY() end + +---Returns the delta of 2 current touches locations in screen coordinates. +--- +---@return cc.Vec2 # The delta of 2 current touches locations in screen coordinates. +function EventMouse:getDelta() end + +---Returns the current touch location in OpenGL coordinates. +--- +---@return cc.Vec2 # The current touch location in OpenGL coordinates. +function EventMouse:getLocation() end + +---Returns the current touch location in screen coordinates. +--- +---@return cc.Vec2 # The current touch location in screen coordinates. +function EventMouse:getLocationInView() end + +---Get mouse button. +--- +---@return cc.EventMouse.MouseButton # The mouse button. +---\js getButton +function EventMouse:getMouseButton() end + +---Returns the previous touch location in OpenGL coordinates. +--- +---@return cc.Vec2 # The previous touch location in OpenGL coordinates. +---\js NA +function EventMouse:getPreviousLocation() end + +---Returns the previous touch location in screen coordinates. +--- +---@return cc.Vec2 # The previous touch location in screen coordinates. +---\js NA +function EventMouse:getPreviousLocationInView() end + +---Get mouse scroll data of x axis. +--- +---@return number # The scroll data of x axis. +function EventMouse:getScrollX() end + +---Get mouse scroll data of y axis. +--- +---@return number # The scroll data of y axis. +function EventMouse:getScrollY() end + +---Returns the start touch location in OpenGL coordinates. +--- +---@return cc.Vec2 # The start touch location in OpenGL coordinates. +---\js NA +function EventMouse:getStartLocation() end + +---Returns the start touch location in screen coordinates. +--- +---@return cc.Vec2 # The start touch location in screen coordinates. +---\js NA +function EventMouse:getStartLocationInView() end + +---Constructor. +--- +---@param mouseEventCode cc.EventMouse.MouseEventType # A given mouse event type. +---\js ctor +---@return cc.EventMouse +function EventMouse.new(mouseEventCode) end + +---Set the cursor position. +--- +---@param x number # The x coordinate of cursor position. +---@param y number # The y coordinate of cursor position. +---\js setLocation +function EventMouse:setCursorPosition(x, y) end + +---Set mouse button. +--- +---@param button cc.EventMouse.MouseButton # a given mouse button. +---\js setButton +function EventMouse:setMouseButton(button) end + +---Set mouse scroll data. +--- +---@param scrollX number # The scroll data of x axis. +---@param scrollY number # The scroll data of y axis. +function EventMouse:setScrollData(scrollX, scrollY) end + +return EventMouse \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/EventMouse/MouseButton.lua b/addons/cclua/cocos2d/library/cc/EventMouse/MouseButton.lua new file mode 100644 index 00000000..1d1dcba6 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/EventMouse/MouseButton.lua @@ -0,0 +1,21 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.EventMouse.MouseButton + +---@type cc.EventMouse.MouseButton +local VALUE + +--- +---@enum cc.EventMouse.MouseButton +local MouseButton = { + BUTTON_4 = 3, + BUTTON_5 = 4, + BUTTON_6 = 5, + BUTTON_7 = 6, + BUTTON_8 = 7, + BUTTON_LEFT = 0, + BUTTON_MIDDLE = 2, + BUTTON_RIGHT = 1, + BUTTON_UNSET = -1, +} + +return MouseButton \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/EventMouse/MouseEventType.lua b/addons/cclua/cocos2d/library/cc/EventMouse/MouseEventType.lua new file mode 100644 index 00000000..71c82049 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/EventMouse/MouseEventType.lua @@ -0,0 +1,17 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.EventMouse.MouseEventType + +---@type cc.EventMouse.MouseEventType +local VALUE + +--- +---@enum cc.EventMouse.MouseEventType +local MouseEventType = { + MOUSE_DOWN = 1, + MOUSE_MOVE = 3, + MOUSE_NONE = 0, + MOUSE_SCROLL = 4, + MOUSE_UP = 2, +} + +return MouseEventType \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/EventTouch.lua b/addons/cclua/cocos2d/library/cc/EventTouch.lua new file mode 100644 index 00000000..17863535 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/EventTouch.lua @@ -0,0 +1,37 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.EventTouch + +---\class EventTouch +---Touch event. +---@class cc.EventTouch : cc.Event +---@field eventCode cc.EventTouch.EventCode Get event code.

\return The code of the event. +---@field touches cc.Touch[] Get the touches.

\return The touches of the event. +---@field MAX_TOUCHES integer +local EventTouch = {} + +---Get event code. +--- +---@return cc.EventTouch.EventCode # The code of the event. +function EventTouch:getEventCode() end + +---Get the touches. +--- +---@return cc.Touch[] # The touches of the event. +function EventTouch:getTouches() end + +---Constructor. +---\js NA +---@return cc.EventTouch +function EventTouch.new() end + +---Set the event code. +--- +---@param eventCode cc.EventTouch.EventCode # A given EventCode. +function EventTouch:setEventCode(eventCode) end + +---Set the touches +--- +---@param touches cc.Touch[] # A given touches vector. +function EventTouch:setTouches(touches) end + +return EventTouch \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/EventTouch/EventCode.lua b/addons/cclua/cocos2d/library/cc/EventTouch/EventCode.lua new file mode 100644 index 00000000..0152763e --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/EventTouch/EventCode.lua @@ -0,0 +1,16 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.EventTouch.EventCode + +---@type cc.EventTouch.EventCode +local VALUE + +--- +---@enum cc.EventTouch.EventCode +local EventCode = { + BEGAN = 0, + CANCELLED = 3, + ENDED = 2, + MOVED = 1, +} + +return EventCode \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/FadeFrom.lua b/addons/cclua/cocos2d/library/cc/FadeFrom.lua new file mode 100644 index 00000000..691c444d --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/FadeFrom.lua @@ -0,0 +1,13 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.FadeFrom + +--- +---@class cc.FadeFrom : cc.FadeTo +local FadeFrom = {} + +---@param d number +---@param opacity integer +---@return cc.FadeFrom +function FadeFrom.create(d, opacity) end + +return FadeFrom \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/FadeIn.lua b/addons/cclua/cocos2d/library/cc/FadeIn.lua new file mode 100644 index 00000000..31a1f4ca --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/FadeIn.lua @@ -0,0 +1,15 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.FadeIn + +---\class FadeIn +---Fades In an object that implements the RGBAProtocol protocol. It modifies the opacity from 0 to 255. +---The "reverse" of this action is FadeOut +---@class cc.FadeIn : cc.FadeTo +local FadeIn = {} + +---Creates the action. +---@param d number # Duration time, in seconds. +---@return cc.FadeIn # An autoreleased FadeIn object. +function FadeIn.create(d) end + +return FadeIn \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/FadeOut.lua b/addons/cclua/cocos2d/library/cc/FadeOut.lua new file mode 100644 index 00000000..6e09dbdb --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/FadeOut.lua @@ -0,0 +1,15 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.FadeOut + +---\class FadeOut +---Fades Out an object that implements the RGBAProtocol protocol. It modifies the opacity from 255 to 0. +---The "reverse" of this action is FadeIn +---@class cc.FadeOut : cc.FadeTo +local FadeOut = {} + +---Creates the action. +---@param d number # Duration time, in seconds. +---@return cc.FadeOut +function FadeOut.create(d) end + +return FadeOut \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/FadeOutBLTiles.lua b/addons/cclua/cocos2d/library/cc/FadeOutBLTiles.lua new file mode 100644 index 00000000..674b34f1 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/FadeOutBLTiles.lua @@ -0,0 +1,15 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.FadeOutBLTiles + +---FadeOutBLTiles action. +---\details Fades out the target node with many tiles from Top-Right to Bottom-Left. +---@class cc.FadeOutBLTiles : cc.FadeOutTRTiles +local FadeOutBLTiles = {} + +---Create the action with the grid size and the duration. +---@param duration number # Specify the duration of the FadeOutBLTiles action. It's a value in seconds. +---@param gridSize cc.Size # Specify the size of the grid. +---@return cc.FadeOutBLTiles # If the creation success, return a pointer of FadeOutBLTiles action; otherwise, return nil. +function FadeOutBLTiles.create(duration, gridSize) end + +return FadeOutBLTiles \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/FadeOutDownTiles.lua b/addons/cclua/cocos2d/library/cc/FadeOutDownTiles.lua new file mode 100644 index 00000000..e42e5ef6 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/FadeOutDownTiles.lua @@ -0,0 +1,15 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.FadeOutDownTiles + +---FadeOutDownTiles action. +---\details Fades out the target node with many tiles from top to bottom. +---@class cc.FadeOutDownTiles : cc.FadeOutUpTiles +local FadeOutDownTiles = {} + +---Create the action with the grid size and the duration. +---@param duration number # Specify the duration of the FadeOutDownTiles action. It's a value in seconds. +---@param gridSize cc.Size # Specify the size of the grid. +---@return cc.FadeOutDownTiles # If the creation success, return a pointer of FadeOutDownTiles action; otherwise, return nil. +function FadeOutDownTiles.create(duration, gridSize) end + +return FadeOutDownTiles \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/FadeOutTRTiles.lua b/addons/cclua/cocos2d/library/cc/FadeOutTRTiles.lua new file mode 100644 index 00000000..557fd09b --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/FadeOutTRTiles.lua @@ -0,0 +1,34 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.FadeOutTRTiles + +---FadeOutTRTiles action. +---\details Fades out the target node with many tiles from Bottom-Left to Top-Right. +---@class cc.FadeOutTRTiles : cc.TiledGrid3DAction +local FadeOutTRTiles = {} + +---Create the action with the grid size and the duration. +---@param duration number # Specify the duration of the FadeOutTRTiles action. It's a value in seconds. +---@param gridSize cc.Size # Specify the size of the grid. +---@return cc.FadeOutTRTiles # If the creation success, return a pointer of FadeOutTRTiles action; otherwise, return nil. +function FadeOutTRTiles.create(duration, gridSize) end + +---Calculate the percentage a tile should be shown. +---@param pos cc.Size # The position index of the tile. +---@param time number # The current percentage of the action. +---@return number # Return the percentage the tile should be shown. +function FadeOutTRTiles:testFunc(pos, time) end + +---Show part of the tile. +---@param pos cc.Vec2 # The position index of the tile should be shown. +---@param distance number # The percentage that the tile should be shown. +function FadeOutTRTiles:transformTile(pos, distance) end + +---Hide the tile at specified position. +---@param pos cc.Vec2 # The position index of the tile should be hide. +function FadeOutTRTiles:turnOffTile(pos) end + +---Show the tile at specified position. +---@param pos cc.Vec2 # The position index of the tile should be shown. +function FadeOutTRTiles:turnOnTile(pos) end + +return FadeOutTRTiles \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/FadeOutUpTiles.lua b/addons/cclua/cocos2d/library/cc/FadeOutUpTiles.lua new file mode 100644 index 00000000..e5d40a07 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/FadeOutUpTiles.lua @@ -0,0 +1,15 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.FadeOutUpTiles + +---FadeOutUpTiles action. +---\details Fades out the target node with many tiles from bottom to top. +---@class cc.FadeOutUpTiles : cc.FadeOutTRTiles +local FadeOutUpTiles = {} + +---Create the action with the grid size and the duration. +---@param duration number # Specify the duration of the FadeOutUpTiles action. It's a value in seconds. +---@param gridSize cc.Size # Specify the size of the grid. +---@return cc.FadeOutUpTiles # If the creation success, return a pointer of FadeOutUpTiles action; otherwise, return nil. +function FadeOutUpTiles.create(duration, gridSize) end + +return FadeOutUpTiles \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/FadeTo.lua b/addons/cclua/cocos2d/library/cc/FadeTo.lua new file mode 100644 index 00000000..b24c6d24 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/FadeTo.lua @@ -0,0 +1,16 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.FadeTo + +---\class FadeTo +---Fades an object that implements the RGBAProtocol protocol. It modifies the opacity from the current value to a custom one. +---\warning This action doesn't support "reverse" +---@class cc.FadeTo : cc.ActionInterval +local FadeTo = {} + +---Creates an action with duration and opacity. +---@param duration number # Duration time, in seconds. +---@param opacity integer # A certain opacity, the range is from 0 to 255. +---@return cc.FadeTo # An autoreleased FadeTo object. +function FadeTo.create(duration, opacity) end + +return FadeTo \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/FastTMXLayer.lua b/addons/cclua/cocos2d/library/cc/FastTMXLayer.lua new file mode 100644 index 00000000..69d5f52b --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/FastTMXLayer.lua @@ -0,0 +1,181 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.FastTMXLayer + +---FastTMXLayer represents the TMX layer. +---It is a subclass of SpriteBatchNode. By default the tiles are rendered using a TextureAtlas. +---If you modify a tile on runtime, then, that tile will become a Sprite, otherwise no Sprite objects are created. +---The benefits of using Sprite objects as tiles are: +---- tiles (Sprite) can be rotated/scaled/moved with a nice API. +---If the layer contains a property named "cc_vertexz" with an integer (in can be positive or negative), +---then all the tiles belonging to the layer will use that value as their OpenGL vertex Z for depth. +---On the other hand, if the "cc_vertexz" property has the "automatic" value, then the tiles will use an automatic vertex Z value. +---Also before drawing the tiles, GL_ALPHA_TEST will be enabled, and disabled after drawing them. The used alpha func will be: +---glAlphaFunc( GL_GREATER, value ). +---"value" by default is 0, but you can change it from Tiled by adding the "cc_alpha_func" property to the layer. +---The value 0 should work for most cases, but if you have tiles that are semi-transparent, then you might want to use a different +---value, like 0.5. +--- +---For further information, please see the programming guide: +---http://www.cocos2d-iphone.org/wiki/doku.php/prog_guide:tiled_maps +--- +---\since v3.2 +---\js NA +---@class cc.FastTMXLayer : cc.Node +---@field layerName string Get the tile layer name.

\return The tile layer name. +---@field layerOrientation integer Layer orientation, which is the same as the map orientation.

\return Layer orientation, which is the same as the map orientation. +---@field layerSize cc.Size Size of the layer in tiles.

\return Size of the layer in tiles. +---@field mapTileSize cc.Size Size of the map's tile (could be different from the tile's size).

\return Size of the map's tile (could be different from the tile's size). +---@field properties any Properties from the layer. They can be added using Tiled.

\return Properties from the layer. They can be added using Tiled. +---@field tileSet cc.TMXTilesetInfo Tileset information for the layer.

\return Tileset information for the layer. +---@field tiles olua.uint32 Pointer to the map of tiles. \js NA \lua NA \return The pointer to the map of tiles. +---@field FAST_TMX_ORIENTATION_HEX integer +---@field FAST_TMX_ORIENTATION_ISO integer +---@field FAST_TMX_ORIENTATION_ORTHO integer +local FastTMXLayer = {} + +---Creates a FastTMXLayer with an tileset info, a layer info and a map info. +--- +---@param tilesetInfo cc.TMXTilesetInfo # An tileset info. +---@param layerInfo cc.TMXLayerInfo # A layer info. +---@param mapInfo cc.TMXMapInfo # A map info. +---@return cc.FastTMXLayer # Return an autorelease object. +function FastTMXLayer.create(tilesetInfo, layerInfo, mapInfo) end + +---Get the tile layer name. +--- +---@return string # The tile layer name. +function FastTMXLayer:getLayerName() end + +---Layer orientation, which is the same as the map orientation. +--- +---@return integer # Layer orientation, which is the same as the map orientation. +function FastTMXLayer:getLayerOrientation() end + +---Size of the layer in tiles. +--- +---@return cc.Size # Size of the layer in tiles. +function FastTMXLayer:getLayerSize() end + +---Size of the map's tile (could be different from the tile's size). +--- +---@return cc.Size # Size of the map's tile (could be different from the tile's size). +function FastTMXLayer:getMapTileSize() end + +---Returns the position in points of a given tile coordinate. +--- +---@param tileCoordinate cc.Vec2 # The tile Coordinate. +---@return cc.Vec2 # The position in points of a given tile coordinate. +function FastTMXLayer:getPositionAt(tileCoordinate) end + +---Properties from the layer. They can be added using Tiled. +--- +---@return any # Properties from the layer. They can be added using Tiled. +function FastTMXLayer:getProperties() end + +---Return the value for the specific property name. +--- +---@param propertyName string # The value for the specific property name. +---@return any # The value for the specific property name. +function FastTMXLayer:getProperty(propertyName) end + +---Returns the tile (Sprite) at a given a tile coordinate. +---The returned Sprite will be already added to the TMXLayer. Don't add it again. +---The Sprite can be treated like any other Sprite: rotated, scaled, translated, opacity, color, etc. +---You can remove either by calling: +---- layer->removeChild(sprite, cleanup); +--- +---@return cc.Sprite # Returns the tile (Sprite) at a given a tile coordinate. +---@param tileCoordinate cc.Vec2 +function FastTMXLayer:getTileAt(tileCoordinate) end + +---Returns the tile gid at a given tile coordinate. It also returns the tile flags. +--- +---@param tileCoordinate cc.Vec2 # The tile coordinate. +---@param flags cc.types.TMXTileFlags # A TMXTileFlags. +---@return integer # The tile gid at a given tile coordinate. It also returns the tile flags. +---@overload fun(self: cc.FastTMXLayer, tileCoordinate: cc.Vec2): integer +function FastTMXLayer:getTileGIDAt(tileCoordinate, flags) end + +---Tileset information for the layer. +--- +---@return cc.TMXTilesetInfo # Tileset information for the layer. +function FastTMXLayer:getTileSet() end + +---Pointer to the map of tiles. +---\js NA +---\lua NA +---@return olua.uint32 # The pointer to the map of tiles. +function FastTMXLayer:getTiles() end + +---\js ctor +---@return cc.FastTMXLayer +function FastTMXLayer.new() end + +---Removes a tile at given tile coordinate. +--- +---@param tileCoordinate cc.Vec2 # The tile Coordinate. +function FastTMXLayer:removeTileAt(tileCoordinate) end + +---Set the tile layer name. +--- +---@param layerName string # The new layer name. +function FastTMXLayer:setLayerName(layerName) end + +---Set Layer orientation, which is the same as the map orientation. +--- +---@param orientation integer # Layer orientation, which is the same as the map orientation. +function FastTMXLayer:setLayerOrientation(orientation) end + +---Set the size of the layer in tiles. +--- +---@param size cc.Size # The new size of the layer in tiles. +function FastTMXLayer:setLayerSize(size) end + +---Set the size of the map's tile. +--- +---@param size cc.Size # The new size of the map's tile. +function FastTMXLayer:setMapTileSize(size) end + +---Set the properties to the layer. +--- +---@param properties any # The properties to the layer. +function FastTMXLayer:setProperties(properties) end + +---Sets the tile gid (gid = tile global id) at a given tile coordinate. +---The Tile GID can be obtained by using the method "tileGIDAt" or by using the TMX editor -> Tileset Mgr +1. +---If a tile is already placed at that position, then it will be removed. +---@param gid integer # The gid value. +---@param tileCoordinate cc.Vec2 # The tile coordinate. +--- +---Sets the tile gid (gid = tile global id) at a given tile coordinate. +---The Tile GID can be obtained by using the method "tileGIDAt" or by using the TMX editor -> Tileset Mgr +1. +---If a tile is already placed at that position, then it will be removed. +---Use withFlags if the tile flags need to be changed as well. +--- +---\param gid A integer value,it will be sets the tile gid. +---\param tileCoordinate The tile coordinate. +---\param flags A TMXTileFlags. +---@overload fun(self: cc.FastTMXLayer, gid: integer, tileCoordinate: cc.Vec2, flags: cc.TMXTileFlags) +function FastTMXLayer:setTileGID(gid, tileCoordinate) end + +---Set the tileset information for the layer. +--- +---@param info cc.TMXTilesetInfo # The new tileset information for the layer. +function FastTMXLayer:setTileSet(info) end + +---Set the pointer to the map of tiles. +--- +---@param tiles olua.uint32 # The pointer to the map of tiles. +function FastTMXLayer:setTiles(tiles) end + +---Set an sprite to the tile,with the tile coordinate and gid. +--- +---@param sprite cc.Sprite # A Sprite. +---@param pos cc.Vec2 # The tile coordinate. +---@param gid integer # The tile gid. +function FastTMXLayer:setupTileSprite(sprite, pos, gid) end + +---Creates the tiles. +function FastTMXLayer:setupTiles() end + +return FastTMXLayer \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/FastTMXTiledMap.lua b/addons/cclua/cocos2d/library/cc/FastTMXTiledMap.lua new file mode 100644 index 00000000..99b16680 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/FastTMXTiledMap.lua @@ -0,0 +1,141 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.FastTMXTiledMap + +---FastTMXTiledMap knows how to parse and render a TMX map. +---It adds support for the TMX tiled map format used by http://www.mapeditor.org. +---It supports isometric, hexagonal and orthogonal tiles. +---It also supports object groups, objects, and properties. +---Features: +---- Each tile will be treated as an Sprite. +---- The sprites are created on demand. They will be created only when you call "layer->tileAt(position)". +---- Each tile can be rotated / moved / scaled / tinted / "opaqued", since each tile is a Sprite. +---- Tiles can be added/removed in runtime. +---- The z-order of the tiles can be modified in runtime. +---- Each tile has an anchorPoint of (0,0). +---- The anchorPoint of the TMXTileMap is (0,0). +---- The TMX layers will be added as a child. +---- The TMX layers will be aliased by default. +---- The tileset image will be loaded using the TextureCache. +---- Each tile will have a unique tag. +---- Each tile will have a unique z value. top-left: z=1, bottom-right: z=max z. +---- Each object group will be treated as an MutableArray. +---- Object class which will contain all the properties in a dictionary. +---- Properties can be assigned to the Map, Layer, Object Group, and Object. +---Limitations: +---- It only supports one tileset per layer. +---- Embedded images are not supported. +---- It only supports the XML format (the JSON format is not supported). +---Technical description: +---Each layer is created using an FastTMXLayer (subclass of SpriteBatchNode). If you have 5 layers, then 5 FastTMXLayer will be created, +---unless the layer visibility is off. In that case, the layer won't be created at all. +---You can obtain the layers (FastTMXLayer objects) at runtime by: +---- map->getChildByTag(tag_number); // 0=1st layer, 1=2nd layer, 2=3rd layer, etc... +---- map->getLayer(name_of_the_layer); +---Each object group is created using a TMXObjectGroup which is a subclass of MutableArray. +---You can obtain the object groups at runtime by: +---- map->getObjectGroup(name_of_the_object_group); +---Each object is a TMXObject. +---Each property is stored as a key-value pair in an MutableDictionary. +---You can obtain the properties at runtime by: +---map->getProperty(name_of_the_property); +---layer->getProperty(name_of_the_property); +---objectGroup->getProperty(name_of_the_property); +---object->getProperty(name_of_the_property); +---\since v3.2 +---\js NA +---@class cc.FastTMXTiledMap : cc.Node +---@field mapOrientation integer Get map orientation.

\return The map orientation. +---@field mapSize cc.Size The map's size property measured in tiles.

\return The map's size property measured in tiles. +---@field objectGroups any Get object groups.

\return Object groups. +---@field properties any Get properties.

\return Properties. +---@field tileSize cc.Size The tiles's size property measured in pixels.

\return The tiles's size property measured in pixels. +local FastTMXTiledMap = {} + +---Creates a TMX Tiled Map with a TMX file. +--- +---@return cc.FastTMXTiledMap # An autorelease object. +---@param tmxFile string +function FastTMXTiledMap.create(tmxFile) end + +---Initializes a TMX Tiled Map with a TMX formatted XML string and a path to TMX resources. +--- +---@param tmxString string # A TMX formatted XML string. +---@param resourcePath string # A path to TMX resources. +---@return cc.FastTMXTiledMap # An autorelease object. +function FastTMXTiledMap.createWithXML(tmxString, resourcePath) end + +---Return the FastTMXLayer for the specific layer. +--- +---@return cc.FastTMXLayer # Return the FastTMXLayer for the specific layer. +---@param layerName string +function FastTMXTiledMap:getLayer(layerName) end + +---Get map orientation. +--- +---@return integer # The map orientation. +function FastTMXTiledMap:getMapOrientation() end + +---The map's size property measured in tiles. +--- +---@return cc.Size # The map's size property measured in tiles. +function FastTMXTiledMap:getMapSize() end + +---Return the TMXObjectGroup for the specific group. +--- +---@return cc.TMXObjectGroup # Return the TMXObjectGroup for the specific group. +---@param groupName string +function FastTMXTiledMap:getObjectGroup(groupName) end + +---Get object groups. +--- +---@return any # Object groups. +function FastTMXTiledMap:getObjectGroups() end + +---Get properties. +--- +---@return any # Properties. +function FastTMXTiledMap:getProperties() end + +---Return properties dictionary for tile GID. +--- +---@return any # Return properties dictionary for tile GID. +---@param GID integer +function FastTMXTiledMap:getPropertiesForGID(GID) end + +---Return the value for the specific property name. +--- +---@return any # Return the value for the specific property name. +---@param propertyName string +function FastTMXTiledMap:getProperty(propertyName) end + +---The tiles's size property measured in pixels. +--- +---@return cc.Size # The tiles's size property measured in pixels. +function FastTMXTiledMap:getTileSize() end + +---Set map orientation. +--- +---@param mapOrientation integer # The map orientation. +function FastTMXTiledMap:setMapOrientation(mapOrientation) end + +---Set the map's size property measured in tiles. +--- +---@param mapSize cc.Size # The map's size property measured in tiles. +function FastTMXTiledMap:setMapSize(mapSize) end + +---Set object groups. +--- +---@param groups any # An object groups. +function FastTMXTiledMap:setObjectGroups(groups) end + +---Set properties. +--- +---@param properties any # An ValueMap Properties. +function FastTMXTiledMap:setProperties(properties) end + +---Set the tiles's size property measured in pixels. +--- +---@param tileSize cc.Size # The tiles's size property measured in pixels. +function FastTMXTiledMap:setTileSize(tileSize) end + +return FastTMXTiledMap \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/FileUtils.lua b/addons/cclua/cocos2d/library/cc/FileUtils.lua new file mode 100644 index 00000000..19319f75 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/FileUtils.lua @@ -0,0 +1,549 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.FileUtils + +---Helper class to handle file operations. +---@class cc.FileUtils +---@field defaultResourceRootPath string Get default resource root path. +---@field fullPathCache { [string]: string } Returns the full path cache. +---@field instance cc.FileUtils Gets the instance of FileUtils. +---@field originalSearchPaths string[] Gets the original search path array set by 'setSearchPaths' or 'addSearchPath'. \return The array of the original search paths +---@field popupNotify boolean Checks whether to pop up a message box when failed to load an image. \return True if pop up a message box when failed to load an image, false if not. +---@field searchPaths string[] Gets the array of search paths.

\return The array of search paths which may contain the prefix of default resource root path. \note In best practise, getter function should return the value of setter function passes in. But since we should not break the compatibility, we keep using the old logic. Therefore, If you want to get the original search paths, please call 'getOriginalSearchPaths()' instead. \see fullPathForFilename(const char*). \lua NA +---@field searchResolutionsOrder string[] Gets the array that contains the search order of the resources.

\see setSearchResolutionsOrder(const std::vector&), fullPathForFilename(const char*). \since v2.1 \lua NA +---@field writablePath string Gets the writable path. \return The path that can be write/read a file in +local FileUtils = {} + +---@return any +function FileUtils:__gc() end + +---@return any +function FileUtils:__olua_move() end + +---Add search path. +--- +---\since v2.1 +---@param path string +---@param front boolean +---@overload fun(self: cc.FileUtils, path: string) +function FileUtils:addSearchPath(path, front) end + +---Append search order of the resources. +--- +---\see setSearchResolutionsOrder(), fullPathForFilename(). +---\since v2.1 +---@param order string +---@param front boolean +---@overload fun(self: cc.FileUtils, order: string) +function FileUtils:addSearchResolutionsOrder(order, front) end + +---Creates a directory. +--- +---@param dirPath string # The path of the directory, it must be an absolute path. +---@return boolean # True if the directory have been created successfully, false if not. +--- +---Create a directory, async off the main cocos thread. +--- +---\param dirPath the path of the directory, it must be an absolute path +---\param callback The function that will be called when the operation is complete. Will have one boolean +---argument, true if the directory was successfully, false otherwise. +---@overload fun(self: cc.FileUtils, dirPath: string, callback: fun(arg1: boolean)) +function FileUtils:createDirectory(dirPath) end + +---Destroys the instance of FileUtils. +function FileUtils.destroyInstance() end + +---Returns the fullpath for a given filename. +---First it will try to get a new filename from the "filenameLookup" dictionary. +---If a new filename can't be found on the dictionary, it will use the original filename. +---Then it will try to obtain the full path of the filename using the FileUtils search rules: resolutions, and search paths. +---The file search is based on the array element order of search paths and resolution directories. +---For instance: +---We set two elements("/mnt/sdcard/", "internal_dir/") to search paths vector by setSearchPaths, +---and set three elements("resources-ipadhd/", "resources-ipad/", "resources-iphonehd") +---to resolutions vector by setSearchResolutionsOrder. The "internal_dir" is relative to "Resources/". +---If we have a file named 'sprite.png', the mapping in fileLookup dictionary contains `key: sprite.png -> value: sprite.pvr.gz`. +---Firstly, it will replace 'sprite.png' with 'sprite.pvr.gz', then searching the file sprite.pvr.gz as follows: +---mnt/sdcard/resources-ipadhd/sprite.pvr.gz (if not found, search next) +---mnt/sdcard/resources-ipad/sprite.pvr.gz (if not found, search next) +---mnt/sdcard/resources-iphonehd/sprite.pvr.gz (if not found, search next) +---mnt/sdcard/sprite.pvr.gz (if not found, search next) +---internal_dir/resources-ipadhd/sprite.pvr.gz (if not found, search next) +---internal_dir/resources-ipad/sprite.pvr.gz (if not found, search next) +---internal_dir/resources-iphonehd/sprite.pvr.gz (if not found, search next) +---internal_dir/sprite.pvr.gz (if not found, return "sprite.png") +---If the filename contains relative path like "gamescene/uilayer/sprite.png", +---and the mapping in fileLookup dictionary contains `key: gamescene/uilayer/sprite.png -> value: gamescene/uilayer/sprite.pvr.gz`. +---The file search order will be: +---mnt/sdcard/gamescene/uilayer/resources-ipadhd/sprite.pvr.gz (if not found, search next) +---mnt/sdcard/gamescene/uilayer/resources-ipad/sprite.pvr.gz (if not found, search next) +---mnt/sdcard/gamescene/uilayer/resources-iphonehd/sprite.pvr.gz (if not found, search next) +---mnt/sdcard/gamescene/uilayer/sprite.pvr.gz (if not found, search next) +---internal_dir/gamescene/uilayer/resources-ipadhd/sprite.pvr.gz (if not found, search next) +---internal_dir/gamescene/uilayer/resources-ipad/sprite.pvr.gz (if not found, search next) +---internal_dir/gamescene/uilayer/resources-iphonehd/sprite.pvr.gz (if not found, search next) +---internal_dir/gamescene/uilayer/sprite.pvr.gz (if not found, return "gamescene/uilayer/sprite.png") +---If the new file can't be found on the file system, it will return the parameter filename directly. +---This method was added to simplify multiplatform support. Whether you are using cocos2d-js or any cross-compilation toolchain like StellaSDK or Apportable, +---you might need to load different resources for a given file in the different platforms. +---\since v2.1 +---@param filename string +---@return string +function FileUtils:fullPathForFilename(filename) end + +---Gets full path from a file name and the path of the relative file. +---@param filename string # The file name. +---@param relativeFile string # The path of the relative file. +---@return string # The full path. +---e.g. filename: hello.png, pszRelativeFile: /User/path1/path2/hello.plist +---Return: /User/path1/path2/hello.pvr (If there a a key(hello.png)-value(hello.pvr) in FilenameLookup dictionary. ) +function FileUtils:fullPathFromRelativeFile(filename, relativeFile) end + +---@param filename string +---@param buffer cc.ResizableBuffer +---@return cc.FileUtils.Status +function FileUtils:getContents(filename, buffer) end + +---Creates binary data from a file. +---@return any # A data object. +---@param filename string +--- +---Gets a binary data object from a file, async off the main cocos thread. +--- +---\param filename filepath for the data to be read. Can be relative or absolute path +---\param callback Function that will be called when file is read. Will be called +---on the main cocos thread. +---@overload fun(self: cc.FileUtils, filename: string, callback: fun(arg1: any)) +function FileUtils:getDataFromFile(filename) end + +---Get default resource root path. +---@return string +function FileUtils:getDefaultResourceRootPath() end + +---Gets resource file data from a zip file. +--- +---\param[in] filename The resource file name which contains the relative path of the zip file. +---\param[out] size If the file read operation succeeds, it will be the data size, otherwise 0. +---@return string # Upon success, a pointer to the data is returned, otherwise nullptr. +---\warning Recall: you are responsible for calling free() on any Non-nullptr pointer returned. +---@param zipFilePath string +---@param filename string +---@param size olua.ssize_t +---@overload fun(obj: cc.FileUtils, zipPath: string, name: string): any +function FileUtils:getFileDataFromZip(zipFilePath, filename, size) end + +---Gets filename extension is a suffix (separated from the base filename by a dot) in lower case. +---Examples of filename extensions are .png, .jpeg, .exe, .dmg and .txt. +---@param filePath string # The path of the file, it could be a relative or absolute path. +---@return string # suffix for filename in lower case or empty if a dot not found. +function FileUtils:getFileExtension(filePath) end + +---Retrieve the file size. +--- +---\note If a relative path was passed in, it will be inserted a default root path at the beginning. +---@param filepath string # The path of the file, it could be a relative or absolute path. +---@return integer # The file size. +--- +---Retrieve the file size, async off the main cocos thread. +--- +---\note If a relative path was passed in, it will be inserted a default root path at the beginning. +---\param filepath The path of the file, it could be a relative or absolute path. +---\param callback The function that will be called when the operation is complete. Will have one long +---argument, the file size. +---@overload fun(self: cc.FileUtils, filepath: string, callback: fun(arg1: integer)) +function FileUtils:getFileSize(filepath) end + +---Returns the full path cache. +---@return { [string]: string } +function FileUtils:getFullPathCache() end + +---Gets the instance of FileUtils. +---@return cc.FileUtils +function FileUtils.getInstance() end + +---Gets the new filename from the filename lookup dictionary. +---It is possible to have a override names. +---@param filename string # The original filename. +---@return string # The new filename after searching in the filename lookup dictionary. +---If the original filename wasn't in the dictionary, it will return the original filename. +function FileUtils:getNewFilename(filename) end + +---Gets the original search path array set by 'setSearchPaths' or 'addSearchPath'. +---@return string[] # The array of the original search paths +function FileUtils:getOriginalSearchPaths() end + +---Gets the array of search paths. +--- +---@return string[] # The array of search paths which may contain the prefix of default resource root path. +---\note In best practise, getter function should return the value of setter function passes in. +---But since we should not break the compatibility, we keep using the old logic. +---Therefore, If you want to get the original search paths, please call 'getOriginalSearchPaths()' instead. +---\see fullPathForFilename(const char*). +---\lua NA +function FileUtils:getSearchPaths() end + +---Gets the array that contains the search order of the resources. +--- +---\see setSearchResolutionsOrder(const std::vector&), fullPathForFilename(const char*). +---\since v2.1 +---\lua NA +---@return string[] +function FileUtils:getSearchResolutionsOrder() end + +---Gets string from a file. +---@param filename string +---@return string +--- +---Gets string from a file, async off the main cocos thread +--- +---\param path filepath for the string to be read. Can be relative or absolute path +---\param callback Function that will be called when file is read. Will be called +---on the main cocos thread. +---@overload fun(self: cc.FileUtils, path: string, callback: fun(arg1: string)) +function FileUtils:getStringFromFile(filename) end + +---Windows fopen can't support UTF-8 filename +---Need convert all parameters fopen and other 3rd-party libs +--- +---@param filenameUtf8 string # std::string name file for conversion from utf-8 +---@return string # std::string ansi filename in current locale +function FileUtils:getSuitableFOpen(filenameUtf8) end + +---Converts the contents of a file to a ValueMap. +---This method is used internally. +---@param filedata string +---@param filesize integer +---@return any +function FileUtils:getValueMapFromData(filedata, filesize) end + +---Converts the contents of a file to a ValueMap. +---@param filename string # The filename of the file to gets content. +---@return any # ValueMap of the file contents. +---\note This method is used internally. +function FileUtils:getValueMapFromFile(filename) end + +---@param filename string +---@return any +function FileUtils:getValueVectorFromFile(filename) end + +---Gets the writable path. +---@return string # The path that can be write/read a file in +function FileUtils:getWritablePath() end + +---Checks whether the path is an absolute path. +--- +---\note On Android, if the parameter passed in is relative to "assets/", this method will treat it as an absolute path. +---Also on Blackberry, path starts with "app/native/Resources/" is treated as an absolute path. +--- +---@param path string # The path that needs to be checked. +---@return boolean # True if it's an absolute path, false if not. +function FileUtils:isAbsolutePath(path) end + +---Checks whether the path is a directory. +--- +---@param dirPath string # The path of the directory, it could be a relative or an absolute path. +---@return boolean # True if the directory exists, false if not. +--- +---Checks whether the absoulate path is a directory, async off of the main cocos thread. +--- +---\param dirPath The path of the directory, it must be an absolute path +---\param callback that will accept a boolean, true if the file exists, false otherwise. +---Callback will happen on the main cocos thread. +---@overload fun(self: cc.FileUtils, fullPath: string, callback: fun(arg1: boolean)) +function FileUtils:isDirectoryExist(dirPath) end + +---Checks whether a file exists. +--- +---\note If a relative path was passed in, it will be inserted a default root path at the beginning. +---@param filename string # The path of the file, it could be a relative or absolute path. +---@return boolean # True if the file exists, false if not. +--- +---Checks if a file exists, done async off the main cocos thread. +--- +---Use this function if you need to check if a file exists while not blocking the main cocos thread. +--- +---\note If a relative path was passed in, it will be inserted a default root path at the beginning. +---\param filename The path of the file, it could be a relative or absolute path. +---\param callback The function that will be called when the operation is complete. Will have one boolean +---argument, true if the file exists, false otherwise. +---@overload fun(self: cc.FileUtils, filename: string, callback: fun(arg1: boolean)) +function FileUtils:isFileExist(filename) end + +---Checks whether to pop up a message box when failed to load an image. +---@return boolean # True if pop up a message box when failed to load an image, false if not. +function FileUtils:isPopupNotify() end + +---List all files in a directory. +--- +---@param dirPath string # The path of the directory, it could be a relative or an absolute path. +---@return string[] # File paths in a string vector +function FileUtils:listFiles(dirPath) end + +---List all files in a directory async, off of the main cocos thread. +--- +---@param dirPath string # The path of the directory, it could be a relative or an absolute path. +---@param callback fun(arg1: string[]) # The callback to be called once the list operation is complete. Will be called on the main cocos thread. +---\js NA +---\lua NA +function FileUtils:listFilesAsync(dirPath, callback) end + +---List all files recursively in a directory. +--- +---@param dirPath string # The path of the directory, it could be a relative or an absolute path. +---\return File paths in a string vector +---@param files cc.types.VectorString +function FileUtils:listFilesRecursively(dirPath, files) end + +---List all files recursively in a directory, async off the main cocos thread. +--- +---@param dirPath string # The path of the directory, it could be a relative or an absolute path. +---@param callback fun(arg1: string[]) # The callback to be called once the list operation is complete. +---Will be called on the main cocos thread. +---\js NA +---\lua NA +function FileUtils:listFilesRecursivelyAsync(dirPath, callback) end + +---Loads the filenameLookup dictionary from the contents of a filename. +--- +---\note The plist file name should follow the format below: +--- +---\code +--- +--- +--- +--- +---filenames +--- +---sounds/click.wav +---sounds/click.caf +---sounds/endgame.wav +---sounds/endgame.caf +---sounds/gem-0.wav +---sounds/gem-0.caf +--- +---metadata +--- +---version +---1 +--- +--- +--- +---\endcode +---@param filename string # The plist file name. +--- +---\since v2.1 +---\js loadFilenameLookup +---\lua loadFilenameLookup +function FileUtils:loadFilenameLookupDictionaryFromFile(filename) end + +---Purges full path caches. +function FileUtils:purgeCachedEntries() end + +---Removes a directory. +--- +---@param dirPath string # The full path of the directory, it must be an absolute path. +---@return boolean # True if the directory have been removed successfully, false if not. +--- +---Removes a directory, async off the main cocos thread. +--- +---\param dirPath the path of the directory, it must be an absolute path +---\param callback The function that will be called when the operation is complete. Will have one boolean +---argument, true if the directory was successfully removed, false otherwise. +---@overload fun(self: cc.FileUtils, dirPath: string, callback: fun(arg1: boolean)) +function FileUtils:removeDirectory(dirPath) end + +---Removes a file. +--- +---@param filepath string # The full path of the file, it must be an absolute path. +---@return boolean # True if the file have been removed successfully, false if not. +--- +---Removes a file, async off the main cocos thread. +--- +---\param filepath the path of the file to remove, it must be an absolute path +---\param callback The function that will be called when the operation is complete. Will have one boolean +---argument, true if the file was successfully removed, false otherwise. +---@overload fun(self: cc.FileUtils, filepath: string, callback: fun(arg1: boolean)) +function FileUtils:removeFile(filepath) end + +---Renames a file under the given directory. +--- +---@param path string # The parent directory path of the file, it must be an absolute path. +---@param oldname string # The current name of the file. +---@param name string # The new name of the file. +---@return boolean # True if the file have been renamed successfully, false if not. +--- +---Renames a file under the given directory, async off the main cocos thread. +--- +---\param path The parent directory path of the file, it must be an absolute path. +---\param oldname The current name of the file. +---\param name The new name of the file. +---\param callback The function that will be called when the operation is complete. Will have one boolean +---argument, true if the file was successfully renamed, false otherwise. +---@overload fun(self: cc.FileUtils, path: string, oldname: string, name: string, callback: fun(arg1: boolean)) +--- +---Renames a file under the given directory. +--- +---\param oldfullpath The current fullpath of the file. Includes path and name. +---\param newfullpath The new fullpath of the file. Includes path and name. +---\return True if the file have been renamed successfully, false if not. +---@overload fun(self: cc.FileUtils, oldfullpath: string, newfullpath: string): boolean +--- +---Renames a file under the given directory, async off the main cocos thread. +--- +---\param oldfullpath The current fullpath of the file. Includes path and name. +---\param newfullpath The new fullpath of the file. Includes path and name. +---\param callback The function that will be called when the operation is complete. Will have one boolean +---argument, true if the file was successfully renamed, false otherwise. +---@overload fun(self: cc.FileUtils, oldfullpath: string, newfullpath: string, callback: fun(arg1: boolean)) +function FileUtils:renameFile(path, oldname, name) end + +---Set default resource root path. +---@param path string +function FileUtils:setDefaultResourceRootPath(path) end + +---You can inherit from platform dependent implementation of FileUtils, such as FileUtilsAndroid, +---and use this function to set delegate, then FileUtils will invoke delegate's implementation. +---For example, your resources are encrypted, so you need to decrypt it after reading data from +---resources, then you can implement all getXXX functions, and engine will invoke your own getXX +---functions when reading data of resources. +--- +---If you don't want to system default implementation after setting delegate, you can just pass nullptr +---to this function. +--- +---\warning It will delete previous delegate +---\lua NA +---@param delegate cc.FileUtils +function FileUtils.setDelegate(delegate) end + +---Sets the filenameLookup dictionary. +--- +---@param filenameLookupDict any # The dictionary for replacing filename. +---\since v2.1 +function FileUtils:setFilenameLookupDictionary(filenameLookupDict) end + +---Sets whether to pop-up a message box when failed to load an image. +---@param notify boolean +function FileUtils:setPopupNotify(notify) end + +---Sets the array of search paths. +--- +---You can use this array to modify the search path of the resources. +---If you want to use "themes" or search resources in the "cache", you can do it easily by adding new entries in this array. +--- +---\note This method could access relative path and absolute path. +---If the relative path was passed to the vector, FileUtils will add the default resource directory before the relative path. +---For instance: +---On Android, the default resource root path is "assets/". +---If "/mnt/sdcard/" and "resources-large" were set to the search paths vector, +---"resources-large" will be converted to "assets/resources-large" since it was a relative path. +--- +---@param searchPaths string[] # The array contains search paths. +---\see fullPathForFilename(const char*) +---\since v2.1 +---In js:var setSearchPaths(var jsval); +---\lua NA +function FileUtils:setSearchPaths(searchPaths) end + +---Sets the array that contains the search order of the resources. +--- +---@param searchResolutionsOrder string[] # The source array that contains the search order of the resources. +---\see getSearchResolutionsOrder(), fullPathForFilename(const char*). +---\since v2.1 +---In js:var setSearchResolutionsOrder(var jsval) +---\lua NA +function FileUtils:setSearchResolutionsOrder(searchResolutionsOrder) end + +---Sets writable path. +---@param writablePath string +function FileUtils:setWritablePath(writablePath) end + +---write Data into a file +--- +---@param data any # the data want to save +---@param fullPath string # The full path to the file you want to save a string +---@return boolean # bool +--- +---Write Data into a file, done async off the main cocos thread. +--- +---Use this function if you need to write Data while not blocking the main cocos thread. +--- +---This function takes Data by value on purpose, to leverage move sematics. +---If you want to avoid a copy of your data, use std::move/std::forward if appropriate +--- +---\param data The data that will be written to disk +---\param fullPath The absolute file path that the data will be written to +---\param callback The function that will be called when data is written to disk. This +---function will be executed on the main cocos thread. It will have on boolean argument +---signifying if the write was successful. +---@overload fun(self: cc.FileUtils, data: any, fullPath: string, callback: fun(arg1: boolean)) +function FileUtils:writeDataToFile(data, fullPath) end + +---write a string into a file +--- +---@param dataStr string # the string want to save +---@param fullPath string # The full path to the file you want to save a string +---@return boolean # bool True if write success +--- +---Write a string to a file, done async off the main cocos thread +---Use this function if you need file access without blocking the main thread. +--- +---This function takes a std::string by value on purpose, to leverage move sematics. +---If you want to avoid a copy of your datastr, use std::move/std::forward if appropriate +--- +---\param dataStr the string want to save +---\param fullPath The full path to the file you want to save a string +---\param callback The function called once the string has been written to a file. This +---function will be executed on the main cocos thread. It will have on boolean argument +---signifying if the write was successful. +---@overload fun(self: cc.FileUtils, dataStr: string, fullPath: string, callback: fun(arg1: boolean)) +function FileUtils:writeStringToFile(dataStr, fullPath) end + +---write a ValueMap into a plist file +--- +---@param dict any # the ValueMap want to save +---@param fullPath string # The full path to the file you want to save a string +---@return boolean # bool +function FileUtils:writeToFile(dict, fullPath) end + +---write ValueMap into a plist file +--- +---@param dict any # the ValueMap want to save +---@param fullPath string # The full path to the file you want to save a string +---@return boolean # bool +--- +---Write a ValueMap into a file, done async off the main cocos thread. +--- +---Use this function if you need to write a ValueMap while not blocking the main cocos thread. +--- +---This function takes ValueMap by value on purpose, to leverage move sematics. +---If you want to avoid a copy of your dict, use std::move/std::forward if appropriate +--- +---\param dict The ValueMap that will be written to disk +---\param fullPath The absolute file path that the data will be written to +---\param callback The function that will be called when dict is written to disk. This +---function will be executed on the main cocos thread. It will have on boolean argument +---signifying if the write was successful. +---@overload fun(self: cc.FileUtils, dict: any, fullPath: string, callback: fun(arg1: boolean)) +function FileUtils:writeValueMapToFile(dict, fullPath) end + +---write ValueVector into a plist file +--- +---@param vecData any # the ValueVector want to save +---@param fullPath string # The full path to the file you want to save a string +---@return boolean # bool +--- +---Write a ValueVector into a file, done async off the main cocos thread. +--- +---Use this function if you need to write a ValueVector while not blocking the main cocos thread. +--- +---This function takes ValueVector by value on purpose, to leverage move sematics. +---If you want to avoid a copy of your dict, use std::move/std::forward if appropriate +--- +---\param vecData The ValueVector that will be written to disk +---\param fullPath The absolute file path that the data will be written to +---\param callback The function that will be called when vecData is written to disk. This +---function will be executed on the main cocos thread. It will have on boolean argument +---signifying if the write was successful. +---@overload fun(self: cc.FileUtils, vecData: any, fullPath: string, callback: fun(arg1: boolean)) +function FileUtils:writeValueVectorToFile(vecData, fullPath) end + +return FileUtils \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/FileUtils/Status.lua b/addons/cclua/cocos2d/library/cc/FileUtils/Status.lua new file mode 100644 index 00000000..1e917dfd --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/FileUtils/Status.lua @@ -0,0 +1,20 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.FileUtils.Status + +---@type cc.FileUtils.Status +local VALUE + +--- +---@enum cc.FileUtils.Status +local Status = { + NotExists = 1, + NotInitialized = 4, + NotRegularFileType = 7, + OK = 0, + ObtainSizeFailed = 6, + OpenFailed = 2, + ReadFailed = 3, + TooLarge = 5, +} + +return Status \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/FiniteTimeAction.lua b/addons/cclua/cocos2d/library/cc/FiniteTimeAction.lua new file mode 100644 index 00000000..186398ae --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/FiniteTimeAction.lua @@ -0,0 +1,25 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.FiniteTimeAction + +---\class FiniteTimeAction +--- +---Base class actions that do have a finite time duration. +---Possible actions: +---- An action with a duration of 0 seconds. +---- An action with a duration of 35.5 seconds. +---Infinite time actions are valid. +---@class cc.FiniteTimeAction : cc.Action +---@field duration number Get duration in seconds of the action.

\return The duration in seconds of the action. +local FiniteTimeAction = {} + +---Get duration in seconds of the action. +--- +---@return number # The duration in seconds of the action. +function FiniteTimeAction:getDuration() end + +---Set duration in seconds of the action. +--- +---@param duration number # In seconds of the action. +function FiniteTimeAction:setDuration(duration) end + +return FiniteTimeAction \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/FlipX.lua b/addons/cclua/cocos2d/library/cc/FlipX.lua new file mode 100644 index 00000000..5f73b6ba --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/FlipX.lua @@ -0,0 +1,16 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.FlipX + +---\class FlipX +---Flips the sprite horizontally. +---\since v0.99.0 +---@class cc.FlipX : cc.ActionInstant +local FlipX = {} + +---Create the action. +--- +---@param x boolean # Flips the sprite horizontally if true. +---@return cc.FlipX # An autoreleased FlipX object. +function FlipX.create(x) end + +return FlipX \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/FlipX3D.lua b/addons/cclua/cocos2d/library/cc/FlipX3D.lua new file mode 100644 index 00000000..de4e1dc2 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/FlipX3D.lua @@ -0,0 +1,20 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.FlipX3D + +---FlipX3D action. +---\details This action is used for flipping the target node on the x axis. +---@class cc.FlipX3D : cc.Grid3DAction +local FlipX3D = {} + +---Create the action with duration. +---@param duration number # Specify the duration of the FilpX3D action. It's a value in seconds. +---@return cc.FlipX3D # If the creation success, return a pointer of FilpX3D action; otherwise, return nil. +function FlipX3D.create(duration) end + +---Initializes an action with duration and grid size. +---@param gridSize cc.Size # Specify the grid size of the FlipX3D action. +---@param duration number # Specify the duration of the FlipX3D action. It's a value in seconds. +---@return boolean # If the initialization success, return true; otherwise, return false. +function FlipX3D:initWithSize(gridSize, duration) end + +return FlipX3D \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/FlipY.lua b/addons/cclua/cocos2d/library/cc/FlipY.lua new file mode 100644 index 00000000..32bed836 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/FlipY.lua @@ -0,0 +1,16 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.FlipY + +---\class FlipY +---Flips the sprite vertically. +---\since v0.99.0 +---@class cc.FlipY : cc.ActionInstant +local FlipY = {} + +---Create the action. +--- +---@param y boolean # Flips the sprite vertically if true. +---@return cc.FlipY # An autoreleased FlipY object. +function FlipY.create(y) end + +return FlipY \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/FlipY3D.lua b/addons/cclua/cocos2d/library/cc/FlipY3D.lua new file mode 100644 index 00000000..a3aa5112 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/FlipY3D.lua @@ -0,0 +1,14 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.FlipY3D + +---FlipY3D action. +---\details This action is used for flipping the target node on the y axis. +---@class cc.FlipY3D : cc.FlipX3D +local FlipY3D = {} + +---Create the action with duration. +---@param duration number # Specify the duration of the FlipY3D action. It's a value in seconds. +---@return cc.FlipY3D # If the creation success, return a pointer of FlipY3D action; otherwise, return nil. +function FlipY3D.create(duration) end + +return FlipY3D \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/Follow.lua b/addons/cclua/cocos2d/library/cc/Follow.lua new file mode 100644 index 00000000..ab9be162 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/Follow.lua @@ -0,0 +1,76 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.Follow + +---\class Follow +---Follow is an action that "follows" a node. +---Eg: +---\code +---layer->runAction(Follow::create(hero)); +---\endcode +---Instead of using Camera as a "follower", use this action instead. +---\since v0.99.2 +---@class cc.Follow : cc.Action +---@field boundarySet boolean Return boundarySet.

\return Return boundarySet. +local Follow = {} + +---Creates the action with a set boundary or with no boundary. +--- +---@param followedNode cc.Node # The node to be followed. +---@param rect cc.Rect # The boundary. If \p rect is equal to Rect::ZERO, it'll work +---with no boundary. +---@return cc.Follow +---@overload fun(followedNode: cc.Node): cc.Follow +function Follow.create(followedNode, rect) end + +---Creates the action with a set boundary or with no boundary with offsets. +--- +---@param followedNode cc.Node # The node to be followed. +---@param rect cc.Rect # The boundary. If \p rect is equal to Rect::ZERO, it'll work +---with no boundary. +---@param xOffset number # The horizontal offset from the center of the screen from which the +---node is to be followed.It can be positive,negative or zero.If +---set to zero the node will be horizontally centered followed. +---@param yOffset number # The vertical offset from the center of the screen from which the +---node is to be followed.It can be positive,negative or zero. +---If set to zero the node will be vertically centered followed. +---If both xOffset and yOffset are set to zero,then the node will be horizontally and vertically centered followed. +---@return cc.Follow +---@overload fun(followedNode: cc.Node, xOffset: number, yOffset: number): cc.Follow +function Follow.createWithOffset(followedNode, xOffset, yOffset, rect) end + +---Initializes the action with a set boundary or with no boundary. +--- +---@param followedNode cc.Node # The node to be followed. +---@param rect cc.Rect # The boundary. If \p rect is equal to Rect::ZERO, it'll work +---with no boundary. +---@return boolean +---@overload fun(self: cc.Follow, followedNode: cc.Node): boolean +function Follow:initWithTarget(followedNode, rect) end + +---Initializes the action with a set boundary or with no boundary with offsets. +--- +---@param followedNode cc.Node # The node to be followed. +---@param rect cc.Rect # The boundary. If \p rect is equal to Rect::ZERO, it'll work +---with no boundary. +---@param xOffset number # The horizontal offset from the center of the screen from which the +---node is to be followed.It can be positive,negative or zero.If +---set to zero the node will be horizontally centered followed. +---@param yOffset number # The vertical offset from the center of the screen from which the +---node is to be followed.It can be positive,negative or zero. +---If set to zero the node will be vertically centered followed. +---If both xOffset and yOffset are set to zero,then the node will be horizontally and vertically centered followed. +---@return boolean +---@overload fun(self: cc.Follow, followedNode: cc.Node, xOffset: number, yOffset: number): boolean +function Follow:initWithTargetAndOffset(followedNode, xOffset, yOffset, rect) end + +---Return boundarySet. +--- +---@return boolean # Return boundarySet. +function Follow:isBoundarySet() end + +---Alter behavior - turn on/off boundary. +--- +---@param value boolean # Turn on/off boundary. +function Follow:setBoundarySet(value) end + +return Follow \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/FontAtlas.lua b/addons/cclua/cocos2d/library/cc/FontAtlas.lua new file mode 100644 index 00000000..dc59673c --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/FontAtlas.lua @@ -0,0 +1,50 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.FontAtlas + +--- +---@class cc.FontAtlas : cc.Ref +---@field fontName string +---@field lineHeight number +---@field CMD_PURGE_FONTATLAS string +---@field CMD_RESET_FONTATLAS string +---@field CacheTextureHeight integer +---@field CacheTextureWidth integer +local FontAtlas = {} + +---@param texture cc.Texture2D +---@param slot integer +function FontAtlas:addTexture(texture, slot) end + +---@return string +function FontAtlas:getFontName() end + +---@return number +function FontAtlas:getLineHeight() end + +---@param slot integer +---@return cc.Texture2D +function FontAtlas:getTexture(slot) end + +---listen the event that renderer was recreated on Android/WP8 +---It only has effect on Android and WP8. +---@param event cc.EventCustom +function FontAtlas:listenRendererRecreated(event) end + +---Removes textures atlas. +---It will purge the textures atlas and if multiple texture exist in the FontAtlas. +function FontAtlas:purgeTexturesAtlas() end + +---sets font texture parameters: +---- GL_TEXTURE_MIN_FILTER = GL_NEAREST +---- GL_TEXTURE_MAG_FILTER = GL_NEAREST +function FontAtlas:setAliasTexParameters() end + +---sets font texture parameters: +---- GL_TEXTURE_MIN_FILTER = GL_LINEAR +---- GL_TEXTURE_MAG_FILTER = GL_LINEAR +function FontAtlas:setAntiAliasTexParameters() end + +---@param newHeight number +function FontAtlas:setLineHeight(newHeight) end + +return FontAtlas \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/GLContextAttrs.lua b/addons/cclua/cocos2d/library/cc/GLContextAttrs.lua new file mode 100644 index 00000000..ee2a3cba --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/GLContextAttrs.lua @@ -0,0 +1,23 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.GLContextAttrs + +---\struct GLContextAttrs +--- +---There are six opengl Context Attrs. +---@class cc.GLContextAttrs +---@field alphaBits integer +---@field blueBits integer +---@field depthBits integer +---@field greenBits integer +---@field multisamplingCount integer +---@field redBits integer +---@field stencilBits integer +local GLContextAttrs = {} + +---@return any +function GLContextAttrs:__gc() end + +---@return any +function GLContextAttrs:__olua_move() end + +return GLContextAttrs \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/GLView.lua b/addons/cclua/cocos2d/library/cc/GLView.lua new file mode 100644 index 00000000..d9621503 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/GLView.lua @@ -0,0 +1,233 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.GLView + +---\addtogroup platform +---\{ +--- +--- +---By GLView you can operate the frame information of EGL view through some function. +---@class cc.GLView : cc.Ref +---@field allTouches cc.Touch[] Get list of all active touches.

\return A list of all active touches. +---@field contentScaleFactor number Only works on ios platform. Get Content Scale of the Factor. +---@field frameZoomFactor number Get zoom factor for frame. This methods are for debugging big resolution (e.g.new ipad) app on desktop.

\return The zoom factor for frame. +---@field glContextAttrs cc.GLContextAttrs Return the OpenGL context attrs.

\return Return the OpenGL context attrs. +---@field openGLReady boolean Get whether opengl render system is ready, subclass must implement this method. +---@field resolutionPolicy cc.ResolutionPolicy Returns the current Resolution policy.

\return The current Resolution policy. +---@field retinaDisplay boolean Returns whether or not the view is in Retina Display mode.

\return Returns whether or not the view is in Retina Display mode. +---@field retinaFactor integer Get retina factor.

\return The retina factor. +---@field safeAreaRect cc.Rect Gets safe area rectangle +---@field scaleX number Get scale factor of the horizontal direction.

\return Scale factor of the horizontal direction. +---@field scaleY number Get scale factor of the vertical direction.

\return Scale factor of the vertical direction. +---@field scissorEnabled boolean Get whether GL_SCISSOR_TEST is enable.

\return Whether GL_SCISSOR_TEST is enable. +---@field scissorRect cc.Rect Get the current scissor rectangle.

\return The current scissor rectangle. +---@field viewName string Get the view name.

\return The view name. +---@field viewPortRect cc.Rect Get the opengl view port rectangle.

\return Return the opengl view port rectangle. +---@field visibleOrigin cc.Vec2 Get the visible origin point of opengl viewport.

\return The visible origin point of opengl viewport. +---@field visibleRect cc.Rect Get the visible rectangle of opengl viewport.

\return The visible rectangle of opengl viewport. +---@field visibleSize cc.Size Get the visible area size of opengl viewport.

\return The visible area size of opengl viewport. +local GLView = {} + +---Force destroying EGL view, subclass must implement this method. +--- +---\lua endToLua +function GLView:end_() end + +---Get list of all active touches. +--- +---@return cc.Touch[] # A list of all active touches. +function GLView:getAllTouches() end + +---Only works on ios platform. Get Content Scale of the Factor. +---@return number +function GLView:getContentScaleFactor() end + +---Get design resolution size. +---Default resolution size is the same as 'getFrameSize'. +--- +---@return cc.Size # The design resolution size. +function GLView:getDesignResolutionSize() end + +---Get the frame size of EGL view. +---In general, it returns the screen size since the EGL view is a fullscreen view. +--- +---@return cc.Size # The frame size of EGL view. +function GLView:getFrameSize() end + +---Get zoom factor for frame. This methods are for +---debugging big resolution (e.g.new ipad) app on desktop. +--- +---@return number # The zoom factor for frame. +function GLView:getFrameZoomFactor() end + +---Return the OpenGL context attrs. +--- +---@return cc.GLContextAttrs # Return the OpenGL context attrs. +function GLView.getGLContextAttrs() end + +---Returns the current Resolution policy. +--- +---@return cc.ResolutionPolicy # The current Resolution policy. +function GLView:getResolutionPolicy() end + +---Get retina factor. +--- +---@return integer # The retina factor. +function GLView:getRetinaFactor() end + +---Gets safe area rectangle +---@return cc.Rect +function GLView:getSafeAreaRect() end + +---Get scale factor of the horizontal direction. +--- +---@return number # Scale factor of the horizontal direction. +function GLView:getScaleX() end + +---Get scale factor of the vertical direction. +--- +---@return number # Scale factor of the vertical direction. +function GLView:getScaleY() end + +---Get the current scissor rectangle. +--- +---@return cc.Rect # The current scissor rectangle. +function GLView:getScissorRect() end + +---Get the view name. +--- +---@return string # The view name. +function GLView:getViewName() end + +---Get the opengl view port rectangle. +--- +---@return cc.Rect # Return the opengl view port rectangle. +function GLView:getViewPortRect() end + +---Get the visible origin point of opengl viewport. +--- +---@return cc.Vec2 # The visible origin point of opengl viewport. +function GLView:getVisibleOrigin() end + +---Get the visible rectangle of opengl viewport. +--- +---@return cc.Rect # The visible rectangle of opengl viewport. +function GLView:getVisibleRect() end + +---Get the visible area size of opengl viewport. +--- +---@return cc.Size # The visible area size of opengl viewport. +function GLView:getVisibleSize() end + +---Get whether opengl render system is ready, subclass must implement this method. +---@return boolean +function GLView:isOpenGLReady() end + +---Returns whether or not the view is in Retina Display mode. +--- +---@return boolean # Returns whether or not the view is in Retina Display mode. +function GLView:isRetinaDisplay() end + +---Get whether GL_SCISSOR_TEST is enable. +--- +---@return boolean # Whether GL_SCISSOR_TEST is enable. +function GLView:isScissorEnabled() end + +---Polls the events. +function GLView:pollEvents() end + +---Renders a Scene with a Renderer +---This method is called directly by the Director +---@param scene cc.Scene +---@param renderer cc.Renderer +function GLView:renderScene(scene, renderer) end + +---Only works on ios platform. Set Content Scale of the Factor. +---@param arg1 number +---@return boolean +function GLView:setContentScaleFactor(arg1) end + +---Hide or Show the mouse cursor if there is one. +--- +---\param isVisible Hide or Show the mouse cursor if there is one. +---@param arg1 boolean +function GLView:setCursorVisible(arg1) end + +---Set default window icon (implemented for windows and linux). +---On windows it will use icon from .exe file (if included). +---On linux it will use default window icon. +function GLView:setDefaultIcon() end + +---Set the design resolution size. +---@param width number # Design resolution width. +---@param height number # Design resolution height. +---@param resolutionPolicy cc.ResolutionPolicy # The resolution policy desired, you may choose: +---[1] EXACT_FIT Fill screen by stretch-to-fit: if the design resolution ratio of width to height is different from the screen resolution ratio, your game view will be stretched. +---[2] NO_BORDER Full screen without black border: if the design resolution ratio of width to height is different from the screen resolution ratio, two areas of your game view will be cut. +---[3] SHOW_ALL Full screen with black border: if the design resolution ratio of width to height is different from the screen resolution ratio, two black borders will be shown. +function GLView:setDesignResolutionSize(width, height, resolutionPolicy) end + +---Set the frame size of EGL view. +--- +---@param width number # The width of the fram size. +---@param height number # The height of the fram size. +function GLView:setFrameSize(width, height) end + +---Set zoom factor for frame. This methods are for +---debugging big resolution (e.g.new ipad) app on desktop. +--- +---\param zoomFactor The zoom factor for frame. +---@param arg1 number +function GLView:setFrameZoomFactor(arg1) end + +---Static method and member so that we can modify it on all platforms before create OpenGL context. +--- +---@param glContextAttrs cc.GLContextAttrs # The OpenGL context attrs. +function GLView.setGLContextAttrs(glContextAttrs) end + +---Open or close IME keyboard , subclass must implement this method. +--- +---@param open boolean # Open or close IME keyboard. +function GLView:setIMEKeyboardState(open) end + +---Set window icon (implemented for windows and linux). +--- +---@param filename string # A path to image file, e.g., "icons/cusom.png". +--- +---Set window icon (implemented for windows and linux). +---Best icon (based on size) will be auto selected. +--- +---\param filelist The array contains icons. +---@overload fun(self: cc.GLView, filelist: string[]) +function GLView:setIcon(filename) end + +---Set Scissor rectangle with points. +--- +---@param x number # Set the points of x. +---@param y number # Set the points of y. +---@param w number # Set the width of the view port +---@param h number # Set the Height of the view port. +function GLView:setScissorInPoints(x, y, w, h) end + +---Set the view name. +--- +---@param viewname string # A string will be set to the view as name. +function GLView:setViewName(viewname) end + +---Set opengl view port rectangle with points. +--- +---@param x number # Set the points of x. +---@param y number # Set the points of y. +---@param w number # Set the width of the view port +---@param h number # Set the Height of the view port. +function GLView:setViewPortInPoints(x, y, w, h) end + +---Exchanges the front and back buffers, subclass must implement this method. +function GLView:swapBuffers() end + +---When the window is closed, it will return false if the platforms is Ios or Android. +---If the platforms is windows or Mac,it will return true. +--- +---@return boolean # In ios and android it will return false,if in windows or Mac it will return true. +function GLView:windowShouldClose() end + +return GLView \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/GLViewImpl.lua b/addons/cclua/cocos2d/library/cc/GLViewImpl.lua new file mode 100644 index 00000000..ae69b15d --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/GLViewImpl.lua @@ -0,0 +1,8 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.GLViewImpl + +--- +---@class cc.GLViewImpl : cc.GLView +local GLViewImpl = {} + +return GLViewImpl \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/GlyphCollection.lua b/addons/cclua/cocos2d/library/cc/GlyphCollection.lua new file mode 100644 index 00000000..b62f8040 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/GlyphCollection.lua @@ -0,0 +1,16 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.GlyphCollection + +---@type cc.GlyphCollection +local VALUE + +--- +---@enum cc.GlyphCollection +local GlyphCollection = { + ASCII = 2, + CUSTOM = 3, + DYNAMIC = 0, + NEHE = 1, +} + +return GlyphCollection \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/Grid3D.lua b/addons/cclua/cocos2d/library/cc/Grid3D.lua new file mode 100644 index 00000000..21617210 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/Grid3D.lua @@ -0,0 +1,46 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.Grid3D + +---Grid3D is a 3D grid implementation. Each vertex has 3 dimensions: x,y,z +---@class cc.Grid3D : cc.GridBase +---@field needDepthTestForBlit boolean +local Grid3D = {} + +---create one Grid. +---@param gridSize cc.Size +---@return cc.Grid3D +---@overload fun(gridSize: cc.Size, rect: cc.Rect): cc.Grid3D +---@overload fun(gridSize: cc.Size, texture: cc.Texture2D, flipped: boolean): cc.Grid3D +---@overload fun(gridSize: cc.Size, texture: cc.Texture2D, flipped: boolean, rect: cc.Rect): cc.Grid3D +function Grid3D.create(gridSize) end + +---@return boolean +function Grid3D:getNeedDepthTestForBlit() end + +---Returns the original (non-transformed) vertex at a given position. +---\js NA +---\lua NA +---@param pos cc.Vec2 +---@return cc.Vec3 +function Grid3D:getOriginalVertex(pos) end + +---Returns the vertex at a given position. +---\js NA +---\lua NA +---@param pos cc.Vec2 +---@return cc.Vec3 +function Grid3D:getVertex(pos) end + +---\{ +---Getter and Setter for depth test state when blit. +---\js NA +---@param neededDepthTest boolean +function Grid3D:setNeedDepthTestForBlit(neededDepthTest) end + +---Sets a new vertex at a given position. +---\lua NA +---@param pos cc.Vec2 +---@param vertex cc.Vec3 +function Grid3D:setVertex(pos, vertex) end + +return Grid3D \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/Grid3DAction.lua b/addons/cclua/cocos2d/library/cc/Grid3DAction.lua new file mode 100644 index 00000000..f2130f99 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/Grid3DAction.lua @@ -0,0 +1,35 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.Grid3DAction + +---Base class for Grid3D actions. +---\details Grid3D actions can modify a non-tiled grid. +---@class cc.Grid3DAction : cc.GridAction +---@field gridRect cc.Rect Get the effect grid rect. \return Return the effect grid rect. +local Grid3DAction = {} + +---Get the effect grid rect. +---@return cc.Rect # Return the effect grid rect. +function Grid3DAction:getGridRect() end + +---Get the non-transformed vertex that belongs to certain position in the grid. +---@param position cc.Vec2 # The position of the grid. +---@return cc.Vec3 # Return a pointer of vertex. +---\js originalVertex +---\lua NA +function Grid3DAction:getOriginalVertex(position) end + +---Get the vertex that belongs to certain position in the grid. +---@param position cc.Vec2 # The position of the grid. +---@return cc.Vec3 # Return a pointer of vertex. +---\js vertex +---\lua NA +function Grid3DAction:getVertex(position) end + +---Set a new vertex to a certain position of the grid. +---@param position cc.Vec2 # The position of the grid. +---@param vertex cc.Vec3 # The vertex will be used on the certain position of grid. +---\js setVertex +---\lua NA +function Grid3DAction:setVertex(position, vertex) end + +return Grid3DAction \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/GridAction.lua b/addons/cclua/cocos2d/library/cc/GridAction.lua new file mode 100644 index 00000000..bae5f05a --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/GridAction.lua @@ -0,0 +1,15 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.GridAction + +---\class GridAction +---Base class for Grid actions. +---\details Grid actions are the actions take effect on GridBase. +---@class cc.GridAction : cc.ActionInterval +---@field grid cc.GridBase Get the pointer of GridBase. \return The pointer of GridBase. +local GridAction = {} + +---Get the pointer of GridBase. +---@return cc.GridBase # The pointer of GridBase. +function GridAction:getGrid() end + +return GridAction \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/GridBase.lua b/addons/cclua/cocos2d/library/cc/GridBase.lua new file mode 100644 index 00000000..cbebda23 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/GridBase.lua @@ -0,0 +1,101 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.GridBase + +---Base class for Other grid. +---@class cc.GridBase : cc.Ref +---@field active boolean \}*/ \{ Getter and setter of the active state of the grid. +---@field gridRect cc.Rect Get the effect grid rect. \return Return the effect grid rect. +---@field gridSize cc.Size Size of the grid. +---@field reuseGrid integer Get number of times that the grid will be reused. +---@field step cc.Vec2 Pixels between the grids. +---@field textureFlipped boolean is texture flipped. +local GridBase = {} + +function GridBase:afterBlit() end + +---@param target cc.Node +function GridBase:afterDraw(target) end + +---\{ +---Interface for custom action when before or after draw. +---\js NA +function GridBase:beforeBlit() end + +---\{ +---Init and reset the status when render effects by using the grid. +function GridBase:beforeDraw() end + +---Interface used to blit the texture with grid to screen. +function GridBase:blit() end + +---Interface, Calculate the vertices used for the blit. +function GridBase:calculateVertexPoints() end + +---Get the effect grid rect. +---@return cc.Rect # Return the effect grid rect. +function GridBase:getGridRect() end + +---Size of the grid. +---@return cc.Size +function GridBase:getGridSize() end + +---Get number of times that the grid will be reused. +---@return integer +function GridBase:getReuseGrid() end + +---Pixels between the grids. +---@return cc.Vec2 +function GridBase:getStep() end + +---\{ +---Init the Grid base. +---@param gridSize cc.Size # the size of the grid. +---\param texture The texture used for grab. +---\param flipped whether or not the grab texture should be flip by Y or not. +---\param rect The effective grid rect. +---@return boolean +---@overload fun(self: cc.GridBase, gridSize: cc.Size, rect: cc.Rect): boolean +---@overload fun(self: cc.GridBase, gridSize: cc.Size, texture: cc.Texture2D, flipped: boolean): boolean +---@overload fun(self: cc.GridBase, gridSize: cc.Size, texture: cc.Texture2D, flipped: boolean, rect: cc.Rect): boolean +function GridBase:initWithSize(gridSize) end + +---\}*/ +---\{ +---Getter and setter of the active state of the grid. +---@return boolean +function GridBase:isActive() end + +---is texture flipped. +---@return boolean +function GridBase:isTextureFlipped() end + +---Interface, Reuse the grid vertices. +function GridBase:reuse() end + +---Change projection to 2D for grabbing. +function GridBase:set2DProjection() end + +---@param active boolean +function GridBase:setActive(active) end + +---Set the effect grid rect. +---@param rect cc.Rect # The effect grid rect. +function GridBase:setGridRect(rect) end + +---Set the size of the grid. +---@param gridSize cc.Size +function GridBase:setGridSize(gridSize) end + +---Set number of times that the grid will be reused. +---@param reuseGrid integer +function GridBase:setReuseGrid(reuseGrid) end + +---Get the pixels between the grids. +---@param step cc.Vec2 +function GridBase:setStep(step) end + +---Set the texture flipped or not. +---@param flipped boolean +function GridBase:setTextureFlipped(flipped) end + +return GridBase \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/Hide.lua b/addons/cclua/cocos2d/library/cc/Hide.lua new file mode 100644 index 00000000..a512e525 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/Hide.lua @@ -0,0 +1,14 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.Hide + +---\class Hide +---Hide the node. +---@class cc.Hide : cc.ActionInstant +local Hide = {} + +---Allocates and initializes the action. +--- +---@return cc.Hide # An autoreleased Hide object. +function Hide.create() end + +return Hide \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/IMEDelegate.lua b/addons/cclua/cocos2d/library/cc/IMEDelegate.lua new file mode 100644 index 00000000..8ef25d12 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/IMEDelegate.lua @@ -0,0 +1,26 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.IMEDelegate + +---Input method editor delegate. +---@class cc.IMEDelegate +local IMEDelegate = {} + +---@return any +function IMEDelegate:__gc() end + +---@return any +function IMEDelegate:__olua_move() end + +---Default destructor. +---\js NA +---\lua NA +---@return boolean +function IMEDelegate:attachWithIME() end + +---Determine whether the IME is detached or not. +---\js NA +---\lua NA +---@return boolean +function IMEDelegate:detachWithIME() end + +return IMEDelegate \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/Image.lua b/addons/cclua/cocos2d/library/cc/Image.lua new file mode 100644 index 00000000..99cb5d00 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/Image.lua @@ -0,0 +1,110 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.Image + +--- +---@class cc.Image : cc.Ref +---@field bitPerPixel integer +---@field compressed boolean +---@field data string +---@field dataLen integer +---@field filePath string +---@field fileType cc.Image.Format +---@field height integer +---@field numberOfMipmaps integer +---@field pixelFormat ccb.PixelFormat +---@field pngPremultipliedAlphaEnabled boolean +---@field width integer +local Image = {} + +---@return integer +function Image:getBitPerPixel() end + +---@return string +function Image:getData() end + +---@return integer +function Image:getDataLen() end + +---@return string +function Image:getFilePath() end + +---@return cc.Image.Format +function Image:getFileType() end + +---@return integer +function Image:getHeight() end + +---@return integer +function Image:getNumberOfMipmaps() end + +---@return boolean +function Image.getPNGPremultipliedAlphaEnabled() end + +---@return ccb.PixelFormat +function Image:getPixelFormat() end + +---@return integer +function Image:getWidth() end + +---@return boolean +function Image:hasAlpha() end + +---@return boolean +function Image:hasPremultipliedAlpha() end + +---Load image from stream buffer. +---@param data string # stream buffer which holds the image data. +---@param dataLen integer # data length expressed in (number of) bytes. +---@return boolean # true if loaded correctly. +---\js NA +---\lua NA +function Image:initWithImageData(data, dataLen) end + +---Load the image from the specified path. +---@param path string # the absolute file path. +---@return boolean # true if loaded correctly. +function Image:initWithImageFile(path) end + +---@param data string +---@param dataLen integer +---@param width integer +---@param height integer +---@param bitsPerComponent integer +---@param preMulti boolean +---@return boolean +---@overload fun(self: cc.Image, data: string, dataLen: integer, width: integer, height: integer, bitsPerComponent: integer): boolean +function Image:initWithRawData(data, dataLen, width, height, bitsPerComponent, preMulti) end + +---@return boolean +function Image:isCompressed() end + +---\js ctor +---@return cc.Image +function Image.new() end + +function Image:premultiplyAlpha() end + +function Image:reversePremultipliedAlpha() end + +---Save Image data to the specified file, with specified format. +---\param filePath the file's absolute path, including file suffix. +---@param isToRGB boolean # whether the image is saved as RGB format. +---@param filename string +---@return boolean +---@overload fun(self: cc.Image, filename: string): boolean +function Image:saveToFile(filename, isToRGB) end + +---Enables or disables premultiplied alpha for PNG files. +--- +---@param enabled boolean # (default: true) +function Image.setPNGPremultipliedAlphaEnabled(enabled) end + +---treats (or not) PVR files as if they have alpha premultiplied. +---Since it is impossible to know at runtime if the PVR images have the alpha channel premultiplied, it is +---possible load them as if they have (or not) the alpha channel premultiplied. +--- +---By default it is disabled. +---@param haveAlphaPremultiplied boolean +function Image.setPVRImagesHavePremultipliedAlpha(haveAlphaPremultiplied) end + +return Image \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/Image/Format.lua b/addons/cclua/cocos2d/library/cc/Image/Format.lua new file mode 100644 index 00000000..1140c7fd --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/Image/Format.lua @@ -0,0 +1,32 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.Image.Format + +---@type cc.Image.Format +local VALUE + +--- +---@enum cc.Image.Format +local Format = { + ---! ATITC + ATITC = 6, + ---! ETC + ETC = 4, + ---! JPEG + JPG = 0, + ---! PNG + PNG = 1, + ---! PVR + PVR = 3, + ---! Raw Data + RAW_DATA = 8, + ---! S3TC + S3TC = 5, + ---! TGA + TGA = 7, + ---! Unknown format + UNKNOWN = 9, + ---! WebP + WEBP = 2, +} + +return Format \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/JumpBy.lua b/addons/cclua/cocos2d/library/cc/JumpBy.lua new file mode 100644 index 00000000..4c74d5d5 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/JumpBy.lua @@ -0,0 +1,18 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.JumpBy + +---\class JumpBy +---Moves a Node object simulating a parabolic jump movement by modifying it's position attribute. +---@class cc.JumpBy : cc.ActionInterval +local JumpBy = {} + +---Creates the action. +---@param duration number # Duration time, in seconds. +---@param position cc.Vec2 # The jumping distance. +---@param height number # The jumping height. +---@param jumps integer # The jumping times. +---@return cc.JumpBy # An autoreleased JumpBy object. +---@overload fun(duration: number, position: cc.Vec2, height: number, jumps: integer): cc.JumpBy +function JumpBy.create(duration, position, height, jumps) end + +return JumpBy \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/JumpTiles3D.lua b/addons/cclua/cocos2d/library/cc/JumpTiles3D.lua new file mode 100644 index 00000000..a16d7074 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/JumpTiles3D.lua @@ -0,0 +1,26 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.JumpTiles3D + +---JumpTiles3D action. +---\details Move the tiles of a target node across the Z axis. +---@class cc.JumpTiles3D : cc.TiledGrid3DAction +---@field amplitude number Get the amplitude of the effect. \return Return the amplitude of the effect. +local JumpTiles3D = {} + +---Create the action with the number of jumps, the sin amplitude, the grid size and the duration. +---@param duration number # Specify the duration of the JumpTiles3D action. It's a value in seconds. +---@param gridSize cc.Size # Specify the size of the grid. +---@param numberOfJumps integer # Specify the jump tiles count. +---@param amplitude number # Specify the amplitude of the JumpTiles3D action. +---@return cc.JumpTiles3D # If the creation success, return a pointer of JumpTiles3D action; otherwise, return nil. +function JumpTiles3D.create(duration, gridSize, numberOfJumps, amplitude) end + +---Get the amplitude of the effect. +---@return number # Return the amplitude of the effect. +function JumpTiles3D:getAmplitude() end + +---Set the amplitude to the effect. +---@param amplitude number # The value of amplitude will be set. +function JumpTiles3D:setAmplitude(amplitude) end + +return JumpTiles3D \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/JumpTo.lua b/addons/cclua/cocos2d/library/cc/JumpTo.lua new file mode 100644 index 00000000..5f4fb9b6 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/JumpTo.lua @@ -0,0 +1,18 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.JumpTo + +---\class JumpTo +---Moves a Node object to a parabolic position simulating a jump movement by modifying it's position attribute. +---@class cc.JumpTo : cc.JumpBy +local JumpTo = {} + +---Creates the action. +---@param duration number # Duration time, in seconds. +---@param position cc.Vec2 # The jumping destination position. +---@param height number # The jumping height. +---@param jumps integer # The jumping times. +---@return cc.JumpTo # An autoreleased JumpTo object. +---@overload fun(duration: number, position: cc.Vec2, height: number, jumps: integer): cc.JumpTo +function JumpTo.create(duration, position, height, jumps) end + +return JumpTo \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/Label.lua b/addons/cclua/cocos2d/library/cc/Label.lua new file mode 100644 index 00000000..3a062c81 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/Label.lua @@ -0,0 +1,553 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.Label + +---Label is a subclass of Node that knows how to render text labels. +--- +---Label can be created with: +---- A true type font file. +---- A bitmap font file. +---- A char map file. +---- The built in system font. +--- +---Bitmap Font supported editors: +---- http://glyphdesigner.71squared.com/ (Commercial, Mac OS X) +---- http://www.n4te.com/hiero/hiero.jnlp (Free, Java) +---- http://slick.cokeandcode.com/demos/hiero.jnlp (Free, Java) +---- http://www.angelcode.com/products/bmfont/ (Free, Windows only) +---\js NA +---@class cc.Label : cc.Node +---@field additionalKerning number Returns the additional kerning of the Label.

\warning Not support system font. \since v3.2.0 +---@field blendFunc cc.BlendFunc +---@field bmFontFilePath string Returns the bitmap font used by the Label. +---@field bmFontSize number Return the user define BMFont size.

\return The BMFont size in float value. +---@field clipMarginEnabled boolean +---@field effectColor any Return current effect color value. +---@field fontAtlas cc.FontAtlas +---@field height number +---@field horizontalAlignment cc.TextHAlignment Returns the Label's text horizontal alignment. +---@field labelEffectType cc.LabelEffect Return current effect type. +---@field labelType cc.Label.LabelType Returns type of label

\warning Not support system font. \return the type of label \since v3.18.0 +---@field lineHeight number Returns the line height of this Label. \warning Not support system font. \since v3.2.0 +---@field lineSpacing number +---@field maxLineWidth number +---@field outlineSize number Return the outline effect size value. +---@field overflow cc.Label.Overflow Query the label's Overflow type.

\return see `Overflow` +---@field renderingFontSize number Returns font size +---@field shadowBlurRadius number Return the shadow effect blur radius. +---@field shadowColor any Return the shadow effect color value. +---@field shadowEnabled boolean Return whether the shadow effect is enabled. +---@field shadowOffset cc.Size Return shadow effect offset value. +---@field string string Return the text the Label is currently displaying. +---@field stringLength integer Return length of string. +---@field stringNumLines integer Return the number of lines of text. +---@field systemFontName string Returns the system font used by the Label. +---@field systemFontSize number Returns the bitmap font path used by the Label. +---@field textAlignment cc.TextHAlignment Returns the Label's text horizontal alignment. +---@field textColor any Returns the text color of the Label. +---@field ttfConfig cc.TTFConfig Returns the TTF configuration object used by the Label. \see `TTFConfig` +---@field verticalAlignment cc.TextVAlignment Returns the Label's text vertical alignment. +---@field width number +---@field wrapEnabled boolean Query the wrap is enabled or not. Note: System font will always return true. +local Label = {} + +---@param cls string +---@return any +function Label:as(cls) end + +---Allocates and initializes a Label, with default settings. +--- +---@return cc.Label # An automatically released Label object. +function Label.create() end + +---Allocates and initializes a Label, with a bitmap font file. +--- +---@param bmfontPath string # A bitmap font file, it's a FNT format. +---@param text string # The initial text. +---@param hAlignment cc.TextHAlignment # Text horizontal alignment. +---@param maxLineWidth integer # The max line width. +--- +---@return cc.Label # An automatically released Label object. +---\see setBMFontFilePath setMaxLineWidth +---@overload fun(bmfontPath: string, text: string): cc.Label +---@overload fun(bmfontPath: string, text: string, hAlignment: cc.TextHAlignment): cc.Label +--- +---Allocates and initializes a Label, with a bitmap font file. +--- +---\param bmfontPath A bitmap font file, it's a FNT format. +---\param text The initial text. +---\param hAlignment Text horizontal alignment. +---\param maxLineWidth The max line width. +---\param imageRect +---\param imageRotated +--- +---\return An automatically released Label object. +---\see setBMFontFilePath setMaxLineWidth +---@overload fun(bmfontPath: string, text: string, hAlignment: cc.TextHAlignment, maxLineWidth: integer, imageRect: cc.Rect, imageRotated: boolean): cc.Label +--- +---Allocates and initializes a Label, with a bitmap font file. +--- +---\param bmfontPath A bitmap font file, it's a FNT format. +---\param text The initial text. +---\param hAlignment Text horizontal alignment. +---\param maxLineWidth The max line width. +---\param subTextureKey Name of entry in PLIST texture atlas/sprite sheet +--- +---\return An automatically released Label object. +---\see setBMFontFilePath setMaxLineWidth +---@overload fun(bmfontPath: string, text: string, hAlignment: cc.TextHAlignment, maxLineWidth: integer, subTextureKey: string): cc.Label +function Label.createWithBMFont(bmfontPath, text, hAlignment, maxLineWidth) end + +---Allocates and initializes a Label, with char map configuration. +--- +---@param charMapFile string # A char map file, it's a PNG format. +---@param itemWidth integer # The width in points of each element. +---@param itemHeight integer # The height in points of each element. +---@param startCharMap integer # The starting char of the char map. +--- +---@return cc.Label # An automatically released Label object. +--- +---Allocates and initializes a Label, with char map configuration. +--- +---\param texture A pointer to an existing Texture2D object. +---\param itemWidth The width in points of each element. +---\param itemHeight The height in points of each element. +---\param startCharMap The starting char of the char map. +--- +---\return An automatically released Label object. +---@overload fun(texture: cc.Texture2D, itemWidth: integer, itemHeight: integer, startCharMap: integer): cc.Label +--- +---Allocates and initializes a Label, with char map configuration. +--- +---\param plistFile A configuration file of char map. +--- +---\return An automatically released Label object. +---@overload fun(plistFile: string): cc.Label +function Label.createWithCharMap(charMapFile, itemWidth, itemHeight, startCharMap) end + +---Allocates and initializes a Label, base on platform-dependent API. +--- +---@param text string # The initial text. +---@param font string # A font file or a font family name. +---@param fontSize number # The font size. This value must be > 0. +---@param dimensions cc.Size # +---@param hAlignment cc.TextHAlignment # The text horizontal alignment. +---@param vAlignment cc.TextVAlignment # The text vertical alignment. +--- +---\warning It will generate texture by the platform-dependent code. +--- +---@return cc.Label # An automatically released Label object. +---@overload fun(text: string, font: string, fontSize: number): cc.Label +---@overload fun(text: string, font: string, fontSize: number, dimensions: cc.Size): cc.Label +---@overload fun(text: string, font: string, fontSize: number, dimensions: cc.Size, hAlignment: cc.TextHAlignment): cc.Label +function Label.createWithSystemFont(text, font, fontSize, dimensions, hAlignment, vAlignment) end + +---Allocates and initializes a Label, base on FreeType2. +--- +---@param text string # The initial text. +---@param fontFilePath string # A font file. +---@param fontSize number # The font size. This value must be > 0. +---@param dimensions cc.Size # +---@param hAlignment cc.TextHAlignment # The text horizontal alignment. +---@param vAlignment cc.TextVAlignment # The text vertical alignment. +--- +---@return cc.Label # An automatically released Label object. +---@overload fun(text: string, fontFilePath: string, fontSize: number): cc.Label +---@overload fun(text: string, fontFilePath: string, fontSize: number, dimensions: cc.Size): cc.Label +---@overload fun(text: string, fontFilePath: string, fontSize: number, dimensions: cc.Size, hAlignment: cc.TextHAlignment): cc.Label +--- +---Allocates and initializes a Label, base on FreeType2. +--- +---\param ttfConfig A pointer to a TTFConfig object. +---\param text The initial text. +---\param hAlignment The text horizontal alignment. +---\param maxLineWidth The max line width. +--- +---\return An automatically released Label object. +---\see TTFConfig setTTFConfig setMaxLineWidth +---@overload fun(ttfConfig: cc.TTFConfig, text: string, hAlignment: cc.TextHAlignment, maxLineWidth: integer): cc.Label +--- +---Allocates and initializes a Label, base on FreeType2. +--- +---\param ttfConfig A pointer to a TTFConfig object. +---\param text The initial text. +---\param hAlignment The text horizontal alignment. +---\param maxLineWidth The max line width. +--- +---\return An automatically released Label object. +---\see TTFConfig setTTFConfig setMaxLineWidth +---@overload fun(ttfConfig: cc.TTFConfig, text: string): cc.Label +--- +---Allocates and initializes a Label, base on FreeType2. +--- +---\param ttfConfig A pointer to a TTFConfig object. +---\param text The initial text. +---\param hAlignment The text horizontal alignment. +---\param maxLineWidth The max line width. +--- +---\return An automatically released Label object. +---\see TTFConfig setTTFConfig setMaxLineWidth +---@overload fun(ttfConfig: cc.TTFConfig, text: string, hAlignment: cc.TextHAlignment): cc.Label +function Label.createWithTTF(text, fontFilePath, fontSize, dimensions, hAlignment, vAlignment) end + +---Disable all effect applied to Label. +---\warning Please use disableEffect(LabelEffect::ALL) instead of this API. +--- +---Disable effect to Label. +--- +---\see `LabelEffect` +---@overload fun(self: cc.Label, effect: cc.LabelEffect) +function Label:disableEffect() end + +---Enable bold rendering +function Label:enableBold() end + +---Enable glow effect to Label. +---\warning Limiting use to only when the Label created with true type font. +---@param glowColor any +function Label:enableGlow(glowColor) end + +---Enable italics rendering +function Label:enableItalics() end + +---Enable outline effect to Label. +---\warning Limiting use to only when the Label created with true type font or system font. +---@param outlineColor any +---@param outlineSize integer +---@overload fun(self: cc.Label, outlineColor: any) +function Label:enableOutline(outlineColor, outlineSize) end + +---Enable shadow effect to Label. +--- +---\todo Support blur for shadow effect. +---@param shadowColor any +---@param offset cc.Size +---@param blurRadius integer +---@overload fun(self: cc.Label) +---@overload fun(self: cc.Label, shadowColor: any) +---@overload fun(self: cc.Label, shadowColor: any, offset: cc.Size) +function Label:enableShadow(shadowColor, offset, blurRadius) end + +---Enables strikethrough. +---Underline and Strikethrough cannot be enabled at the same time. +---Strikethrough is like an underline but at the middle of the glyph +function Label:enableStrikethrough() end + +---Enable underline +function Label:enableUnderline() end + +---Toggle wrap option of the label. +---Note: System font doesn't support manually toggle wrap. +--- +---@param enable boolean # Set true to enable wrap and false to disable wrap. +function Label:enableWrap(enable) end + +---Returns the additional kerning of the Label. +--- +---\warning Not support system font. +---\since v3.2.0 +---@return number +function Label:getAdditionalKerning() end + +---Returns the bitmap font used by the Label. +---@return string +function Label:getBMFontFilePath() end + +---Return the user define BMFont size. +--- +---@return number # The BMFont size in float value. +function Label:getBMFontSize() end + +---@return cc.BlendFunc +function Label:getBlendFunc() end + +---@return cc.Size +function Label:getDimensions() end + +---Return current effect color value. +---@return any +function Label:getEffectColor() end + +---@return cc.FontAtlas +function Label:getFontAtlas() end + +---@return number +function Label:getHeight() end + +---Returns the Label's text horizontal alignment. +---@return cc.TextHAlignment +function Label:getHorizontalAlignment() end + +---Return current effect type. +---@return cc.LabelEffect +function Label:getLabelEffectType() end + +---Returns type of label +--- +---\warning Not support system font. +---@return cc.Label.LabelType # the type of label +---\since v3.18.0 +function Label:getLabelType() end + +---Provides a way to treat each character like a Sprite. +---\warning No support system font. +---@param lettetIndex integer +---@return cc.Sprite +function Label:getLetter(lettetIndex) end + +---Returns the line height of this Label. +---\warning Not support system font. +---\since v3.2.0 +---@return number +function Label:getLineHeight() end + +---@return number +function Label:getLineSpacing() end + +---@return number +function Label:getMaxLineWidth() end + +---Return the outline effect size value. +---@return number +function Label:getOutlineSize() end + +---Query the label's Overflow type. +--- +---@return cc.Label.Overflow # see `Overflow` +function Label:getOverflow() end + +---Returns font size +---@return number +function Label:getRenderingFontSize() end + +---Return the shadow effect blur radius. +---@return number +function Label:getShadowBlurRadius() end + +---Return the shadow effect color value. +---@return any +function Label:getShadowColor() end + +---Return shadow effect offset value. +---@return cc.Size +function Label:getShadowOffset() end + +---Return the text the Label is currently displaying. +---@return string +function Label:getString() end + +---Return length of string. +---@return integer +function Label:getStringLength() end + +---Return the number of lines of text. +---@return integer +function Label:getStringNumLines() end + +---Returns the system font used by the Label. +---@return string +function Label:getSystemFontName() end + +---Returns the bitmap font path used by the Label. +---@return number +function Label:getSystemFontSize() end + +---Returns the TTF configuration object used by the Label. +---\see `TTFConfig` +---@return cc.TTFConfig +function Label:getTTFConfig() end + +---Returns the Label's text horizontal alignment. +---@return cc.TextHAlignment +function Label:getTextAlignment() end + +---Returns the text color of the Label. +---@return any +function Label:getTextColor() end + +---Returns the Label's text vertical alignment. +---@return cc.TextVAlignment +function Label:getVerticalAlignment() end + +---@return number +function Label:getWidth() end + +---@param text string +---@param fontFilePath string +---@param fontSize number +---@param dimensions cc.Size +---@param hAlignment cc.TextHAlignment +---@param vAlignment cc.TextVAlignment +---@return boolean +---@overload fun(self: cc.Label, text: string, fontFilePath: string, fontSize: number): boolean +---@overload fun(self: cc.Label, text: string, fontFilePath: string, fontSize: number, dimensions: cc.Size): boolean +---@overload fun(self: cc.Label, text: string, fontFilePath: string, fontSize: number, dimensions: cc.Size, hAlignment: cc.TextHAlignment): boolean +---@overload fun(self: cc.Label, ttfConfig: cc.TTFConfig, text: string, hAlignment: cc.TextHAlignment, maxLineWidth: integer): boolean +---@overload fun(self: cc.Label, ttfConfig: cc.TTFConfig, text: string): boolean +---@overload fun(self: cc.Label, ttfConfig: cc.TTFConfig, text: string, hAlignment: cc.TextHAlignment): boolean +function Label:initWithTTF(text, fontFilePath, fontSize, dimensions, hAlignment, vAlignment) end + +---@return boolean +function Label:isClipMarginEnabled() end + +---Return whether the shadow effect is enabled. +---@return boolean +function Label:isShadowEnabled() end + +---Query the wrap is enabled or not. +---Note: System font will always return true. +---@return boolean +function Label:isWrapEnabled() end + +---Constructor of Label. +---\js NA +---@param hAlignment cc.TextHAlignment +---@param vAlignment cc.TextVAlignment +---@return cc.Label +---@overload fun(): cc.Label +---@overload fun(hAlignment: cc.TextHAlignment): cc.Label +function Label.new(hAlignment, vAlignment) end + +---\warning This method is not recommended for game developers. +function Label:requestSystemFontRefresh() end + +---Sets the additional kerning of the Label. +--- +---\warning Not support system font. +---\since v3.2.0 +---@param space number +function Label:setAdditionalKerning(space) end + +---Sets the Label's text horizontal alignment. +---@param hAlignment cc.TextHAlignment +--- +---Sets the Label's text alignment. +---@overload fun(self: cc.Label, hAlignment: cc.TextHAlignment, vAlignment: cc.TextVAlignment) +function Label:setAlignment(hAlignment) end + +---Sets a new bitmap font to Label +---@param bmfontFilePath string +---@param fontSize number +---@return boolean +---@overload fun(self: cc.Label, bmfontFilePath: string): boolean +---@overload fun(self: cc.Label, bmfontFilePath: string, imageRect: cc.Rect, imageRotated: boolean, fontSize: number): boolean +---@overload fun(self: cc.Label, bmfontFilePath: string, imageRect: cc.Rect, imageRotated: boolean): boolean +---@overload fun(self: cc.Label, bmfontFilePath: string, subTextureKey: string, fontSize: number): boolean +---@overload fun(self: cc.Label, bmfontFilePath: string, subTextureKey: string): boolean +function Label:setBMFontFilePath(bmfontFilePath, fontSize) end + +---Change font size of label type BMFONT +---Note: This function only scale the BMFONT letter to mimic the font size change effect. +--- +---@param fontSize number # The desired font size in float. +function Label:setBMFontSize(fontSize) end + +---@param blendFunc cc.BlendFunc +function Label:setBlendFunc(blendFunc) end + +---Sets a new char map configuration to Label. +--- +---\see `createWithCharMap(const std::string&,int,int,int)` +---@param charMapFile string +---@param itemWidth integer +---@param itemHeight integer +---@param startCharMap integer +---@return boolean +--- +---Sets a new char map configuration to Label. +--- +---\see `createWithCharMap(Texture2D*,int,int,int)` +---@overload fun(self: cc.Label, texture: cc.Texture2D, itemWidth: integer, itemHeight: integer, startCharMap: integer): boolean +--- +---Sets a new char map configuration to Label. +--- +---\see `createWithCharMap(const std::string&)` +---@overload fun(self: cc.Label, plistFile: string): boolean +function Label:setCharMap(charMapFile, itemWidth, itemHeight, startCharMap) end + +---Clips upper and lower margin to reduce height of Label. +---@param clipEnabled boolean +function Label:setClipMarginEnabled(clipEnabled) end + +---Sets the untransformed size of the Label in a more efficient way. +---@param width number +---@param height number +function Label:setDimensions(width, height) end + +---Makes the Label exactly this untransformed height. +--- +---The Label's height be used for text align if the value not equal zero. +---The text will display incomplete if the size of Label is not large enough to display all text. +---@param height number +function Label:setHeight(height) end + +---Sets the Label's text horizontal alignment. +---@param hAlignment cc.TextHAlignment +function Label:setHorizontalAlignment(hAlignment) end + +---Specify what happens when a line is too long for Label. +--- +---@param breakWithoutSpace boolean # Lines are automatically broken between words if this value is false. +function Label:setLineBreakWithoutSpace(breakWithoutSpace) end + +---Sets the line height of the Label. +---\warning Not support system font. +---\since v3.2.0 +---@param height number +function Label:setLineHeight(height) end + +---@param height number +function Label:setLineSpacing(height) end + +---Makes the Label at most this line untransformed width. +---The Label's max line width be used for force line breaks if the value not equal zero. +---@param maxLineWidth number +function Label:setMaxLineWidth(maxLineWidth) end + +---Change the label's Overflow type, currently only TTF and BMFont support all the valid Overflow type. +---Char Map font supports all the Overflow type except for SHRINK, because we can't measure it's font size. +---System font only support Overflow::Normal and Overflow::RESIZE_HEIGHT. +--- +---@param overflow cc.Label.Overflow # see `Overflow` +function Label:setOverflow(overflow) end + +---Sets the text that this Label is to display. +---@param text string +function Label:setString(text) end + +---Sets a new system font to Label. +--- +---@param font string # A font file or a font family name. +---\warning +function Label:setSystemFontName(font) end + +---@param fontSize number +function Label:setSystemFontSize(fontSize) end + +---Sets a new TTF configuration to Label. +---\see `TTFConfig` +---@param ttfConfig cc.TTFConfig +---@return boolean +function Label:setTTFConfig(ttfConfig) end + +---Sets the text color of Label. +--- +---The text color is different from the color of Node. +--- +---\warning Limiting use to only when the Label created with true type font or system font. +---@param color any +function Label:setTextColor(color) end + +---Sets the Label's text vertical alignment. +---@param vAlignment cc.TextVAlignment +function Label:setVerticalAlignment(vAlignment) end + +---Makes the Label exactly this untransformed width. +--- +---The Label's width be used for text align if the value not equal zero. +---@param width number +function Label:setWidth(width) end + +---Update content immediately. +function Label:updateContent() end + +return Label \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/Label/LabelType.lua b/addons/cclua/cocos2d/library/cc/Label/LabelType.lua new file mode 100644 index 00000000..1caf415c --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/Label/LabelType.lua @@ -0,0 +1,16 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.Label.LabelType + +---@type cc.Label.LabelType +local VALUE + +--- +---@enum cc.Label.LabelType +local LabelType = { + BMFONT = 1, + CHARMAP = 2, + STRING_TEXTURE = 3, + TTF = 0, +} + +return LabelType \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/Label/Overflow.lua b/addons/cclua/cocos2d/library/cc/Label/Overflow.lua new file mode 100644 index 00000000..41c6d445 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/Label/Overflow.lua @@ -0,0 +1,19 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.Label.Overflow + +---@type cc.Label.Overflow +local VALUE + +--- +---@enum cc.Label.Overflow +local Overflow = { + ---In CLAMP mode, when label content goes out of the bounding box, it will be clipped. + CLAMP = 1, + NONE = 0, + ---In RESIZE_HEIGHT mode, you can only change the width of label and the height is changed automatically. + RESIZE_HEIGHT = 3, + ---In SHRINK mode, the font size will change dynamically to adapt the content size. + SHRINK = 2, +} + +return Overflow \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/LabelAtlas.lua b/addons/cclua/cocos2d/library/cc/LabelAtlas.lua new file mode 100644 index 00000000..8e06480f --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/LabelAtlas.lua @@ -0,0 +1,51 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.LabelAtlas + +---\addtogroup base +---\{ +---@class cc.LabelAtlas : cc.AtlasNode +---@field string string +local LabelAtlas = {} + +---@param cls string +---@return any +function LabelAtlas:as(cls) end + +---Creates an empty LabelAtlas. +---User need to call initWithString(...) later to make this object work properly. +---@return cc.LabelAtlas +--- +---Creates the LabelAtlas with a string, a char map file(the atlas), the width and height of each element and the starting char of the atlas. +---@overload fun(string: string, charMapFile: string, itemWidth: integer, itemHeight: integer, startCharMap: integer): cc.LabelAtlas +--- +---Creates the LabelAtlas with a string and a configuration file. +---\since v2.0 +---@overload fun(string: string, fntFile: string): cc.LabelAtlas +function LabelAtlas.create() end + +---@return string +function LabelAtlas:getString() end + +---Initializes the LabelAtlas with a string, a char map file(the atlas), the width and height of each element and the starting char of the atlas. +---@param string string +---@param charMapFile string +---@param itemWidth integer +---@param itemHeight integer +---@param startCharMap integer +---@return boolean +--- +---Initializes the LabelAtlas with a string and a configuration file. +---\since v2.0 +---@overload fun(self: cc.LabelAtlas, string: string, fntFile: string): boolean +--- +---Initializes the LabelAtlas with a string, a texture, the width and height in points of each element and the starting char of the atlas +---@overload fun(self: cc.LabelAtlas, string: string, texture: cc.Texture2D, itemWidth: integer, itemHeight: integer, startCharMap: integer): boolean +function LabelAtlas:initWithString(string, charMapFile, itemWidth, itemHeight, startCharMap) end + +---@return cc.LabelAtlas +function LabelAtlas.new() end + +---@param label string +function LabelAtlas:setString(label) end + +return LabelAtlas \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/LabelEffect.lua b/addons/cclua/cocos2d/library/cc/LabelEffect.lua new file mode 100644 index 00000000..2800d4bb --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/LabelEffect.lua @@ -0,0 +1,21 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.LabelEffect + +---@type cc.LabelEffect +local VALUE + +--- +---@enum cc.LabelEffect +local LabelEffect = { + ALL = 8, + BOLD = 5, + GLOW = 3, + ITALICS = 4, + NORMAL = 0, + OUTLINE = 1, + SHADOW = 2, + STRIKETHROUGH = 7, + UNDERLINE = 6, +} + +return LabelEffect \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/LabelProtocol.lua b/addons/cclua/cocos2d/library/cc/LabelProtocol.lua new file mode 100644 index 00000000..f7e539a8 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/LabelProtocol.lua @@ -0,0 +1,29 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.LabelProtocol + +---Common interface for Labels +---@class cc.LabelProtocol +---@field string string Returns the string that is currently being used in this label

\return The string that is currently being used in this label \js NA \lua NA +local LabelProtocol = {} + +---@return any +function LabelProtocol:__gc() end + +---@return any +function LabelProtocol:__olua_move() end + +---Returns the string that is currently being used in this label +--- +---@return string # The string that is currently being used in this label +---\js NA +---\lua NA +function LabelProtocol:getString() end + +---Sets a new label using a string +--- +---@param label string # The name of the new label. +---\js NA +---\lua NA +function LabelProtocol:setString(label) end + +return LabelProtocol \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/LanguageType.lua b/addons/cclua/cocos2d/library/cc/LanguageType.lua new file mode 100644 index 00000000..288b28d9 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/LanguageType.lua @@ -0,0 +1,32 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.LanguageType + +---@type cc.LanguageType +local VALUE + +--- +---@enum cc.LanguageType +local LanguageType = { + ARABIC = 12, + BELARUSIAN = 19, + BULGARIAN = 18, + CHINESE = 1, + DUTCH = 6, + ENGLISH = 0, + FRENCH = 2, + GERMAN = 4, + HUNGARIAN = 10, + ITALIAN = 3, + JAPANESE = 9, + KOREAN = 8, + NORWEGIAN = 13, + POLISH = 14, + PORTUGUESE = 11, + ROMANIAN = 17, + RUSSIAN = 7, + SPANISH = 5, + TURKISH = 15, + UKRAINIAN = 16, +} + +return LanguageType \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/Layer.lua b/addons/cclua/cocos2d/library/cc/Layer.lua new file mode 100644 index 00000000..e552c3e5 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/Layer.lua @@ -0,0 +1,96 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.Layer + +---\class Layer +---Layer is a subclass of Node that implements the TouchEventsDelegate protocol. +--- +---All features from Node are valid, plus the following new features: +---- It can receive iPhone Touches +---- It can receive Accelerometer input +---@class cc.Layer : cc.Node +local Layer = {} + +---Creates a fullscreen black layer. +--- +---@return cc.Layer # An autoreleased Layer object. +function Layer.create() end + +---@return cc.Layer +function Layer.new() end + +---Callback function for acceleration. +---@param acc cc.Acceleration # Acceleration information. +---@param unused_event cc.Event # Event information. +---\js NA +function Layer:onAcceleration(acc, unused_event) end + +---Callback function for key pressed. +---@param keyCode cc.EventKeyboard.KeyCode # KeyCode information. +---@param event cc.Event # Event information. +---\js NA +function Layer:onKeyPressed(keyCode, event) end + +---Callback function for key released. +---@param keyCode cc.EventKeyboard.KeyCode # KeyCode information. +---@param event cc.Event # Event information. +---\js NA +function Layer:onKeyReleased(keyCode, event) end + +---Callback function for touch began. +--- +---@param touch cc.Touch # Touch information. +---@param unused_event cc.Event # Event information. +---@return boolean # if return false, onTouchMoved, onTouchEnded, onTouchCancelled will never called. +---\js NA +function Layer:onTouchBegan(touch, unused_event) end + +---Callback function for touch cancelled. +--- +---@param touch cc.Touch # Touch information. +---@param unused_event cc.Event # Event information. +---\js NA +function Layer:onTouchCancelled(touch, unused_event) end + +---Callback function for touch ended. +--- +---@param touch cc.Touch # Touch information. +---@param unused_event cc.Event # Event information. +---\js NA +function Layer:onTouchEnded(touch, unused_event) end + +---Callback function for touch moved. +--- +---@param touch cc.Touch # Touch information. +---@param unused_event cc.Event # Event information. +---\js NA +function Layer:onTouchMoved(touch, unused_event) end + +---Callback function for multiple touches began. +--- +---@param touches cc.Touch[] # Touches information. +---@param unused_event cc.Event # Event information. +---\js NA +function Layer:onTouchesBegan(touches, unused_event) end + +---Callback function for multiple touches cancelled. +--- +---@param touches cc.Touch[] # Touches information. +---@param unused_event cc.Event # Event information. +---\js NA +function Layer:onTouchesCancelled(touches, unused_event) end + +---Callback function for multiple touches ended. +--- +---@param touches cc.Touch[] # Touches information. +---@param unused_event cc.Event # Event information. +---\js NA +function Layer:onTouchesEnded(touches, unused_event) end + +---Callback function for multiple touches moved. +--- +---@param touches cc.Touch[] # Touches information. +---@param unused_event cc.Event # Event information. +---\js NA +function Layer:onTouchesMoved(touches, unused_event) end + +return Layer \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/LayerColor.lua b/addons/cclua/cocos2d/library/cc/LayerColor.lua new file mode 100644 index 00000000..8dd43a5d --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/LayerColor.lua @@ -0,0 +1,78 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.LayerColor + +---\class LayerColor +---LayerColor is a subclass of Layer that implements the RGBAProtocol protocol. +--- +---All features from Layer are valid, plus the following new features: +---- opacity +---- RGB colors +---@class cc.LayerColor : cc.Layer +---@field blendFunc cc.BlendFunc BlendFunction. Conforms to BlendProtocol protocol */

\lua NA +local LayerColor = {} + +---@param cls string +---@return any +function LayerColor:as(cls) end + +---Change height in Points. +--- +---@param h number # The height of layer. +function LayerColor:changeHeight(h) end + +---Change width in Points. +--- +---@param w number # The width of layer. +function LayerColor:changeWidth(w) end + +---Change width and height in Points. +--- +---@param w number # The width of layer. +---@param h number # The Height of layer. +---\since v0.8 +function LayerColor:changeWidthAndHeight(w, h) end + +---Creates a fullscreen black layer. +--- +---@return cc.LayerColor # An autoreleased LayerColor object. +--- +---Creates a Layer with color, width and height in Points. +--- +---\param color The color of layer. +---\param width The width of layer. +---\param height The height of layer. +---\return An autoreleased LayerColor object. +---@overload fun(color: any, width: number, height: number): cc.LayerColor +--- +---Creates a Layer with color. Width and height are the window size. +--- +---\param color The color of layer. +---\return An autoreleased LayerColor object. +---@overload fun(color: any): cc.LayerColor +function LayerColor.create() end + +---BlendFunction. Conforms to BlendProtocol protocol */ +--- +---\lua NA +---@return cc.BlendFunc +function LayerColor:getBlendFunc() end + +---@param color any +---@param width number +---@param height number +---@return boolean +---@overload fun(self: cc.LayerColor, color: any): boolean +function LayerColor:initWithColor(color, width, height) end + +---@return cc.LayerColor +function LayerColor.new() end + +---\code +---When this function bound into js or lua,the parameter will be changed +---In js: var setBlendFunc(var src, var dst) +---In lua: local setBlendFunc(local src, local dst) +---\endcode +---@param blendFunc cc.BlendFunc +function LayerColor:setBlendFunc(blendFunc) end + +return LayerColor \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/LayerGradient.lua b/addons/cclua/cocos2d/library/cc/LayerGradient.lua new file mode 100644 index 00000000..828a4a5d --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/LayerGradient.lua @@ -0,0 +1,130 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.LayerGradient + +---\class LayerGradient +---LayerGradient is a subclass of LayerColor that draws gradients across the background. +--- +---All features from LayerColor are valid, plus the following new features: +---- direction +---- final color +---- interpolation mode +--- +---Color is interpolated between the startColor and endColor along the given +---vector (starting at the origin, ending at the terminus). If no vector is +---supplied, it defaults to (0, -1) -- a fade from top to bottom. +--- +---If 'compressedInterpolation' is disabled, you will not see either the start or end color for +---non-cardinal vectors; a smooth gradient implying both end points will be still +---be drawn, however. +--- +---If ' compressedInterpolation' is enabled (default mode) you will see both the start and end colors of the gradient. +--- +---\since v0.99.5 +---@class cc.LayerGradient : cc.LayerColor +---@field compressedInterpolation boolean Get the compressedInterpolation

\return The interpolation will be compressed if true. +---@field endColor any Returns the end color of the gradient.

\return The end color. +---@field endOpacity integer Returns the end opacity of the gradient.

\return The end opacity. +---@field startColor any Returns the start color of the gradient.

\return The start color. +---@field startOpacity integer Returns the start opacity of the gradient.

\return The start opacity. +---@field vector cc.Vec2 Returns the directional vector used for the gradient.

\return The direction of gradient. +local LayerGradient = {} + +---Creates a fullscreen black layer. +--- +---@return cc.LayerGradient # An autoreleased LayerGradient object. +--- +---Creates a full-screen Layer with a gradient between start and end. +--- +---\param start The start color. +---\param end The end color. +---\return An autoreleased LayerGradient object. +---@overload fun(start: any, end_: any): cc.LayerGradient +--- +---Creates a full-screen Layer with a gradient between start and end in the direction of v. +--- +---\param start The start color. +---\param end The end color. +---\param v The direction of gradient color. +---\return An autoreleased LayerGradient object. +---@overload fun(start: any, end_: any, v: cc.Vec2): cc.LayerGradient +function LayerGradient.create() end + +---Returns the end color of the gradient. +--- +---@return any # The end color. +function LayerGradient:getEndColor() end + +---Returns the end opacity of the gradient. +--- +---@return integer # The end opacity. +function LayerGradient:getEndOpacity() end + +---Returns the start color of the gradient. +--- +---@return any # The start color. +function LayerGradient:getStartColor() end + +---Returns the start opacity of the gradient. +--- +---@return integer # The start opacity. +function LayerGradient:getStartOpacity() end + +---Returns the directional vector used for the gradient. +--- +---@return cc.Vec2 # The direction of gradient. +function LayerGradient:getVector() end + +---Initializes the Layer with a gradient between start and end. +---\js init +---\lua init +---@param start any +---@param end_ any +---@return boolean +--- +---Initializes the Layer with a gradient between start and end in the direction of v. +---\js init +---\lua init +---@overload fun(self: cc.LayerGradient, start: any, end_: any, v: cc.Vec2): boolean +function LayerGradient:initWithColor(start, end_) end + +---Get the compressedInterpolation +--- +---@return boolean # The interpolation will be compressed if true. +function LayerGradient:isCompressedInterpolation() end + +---@return cc.LayerGradient +function LayerGradient.new() end + +---Whether or not the interpolation will be compressed in order to display all the colors of the gradient both in canonical and non canonical vectors. +---Default: true. +--- +---@param compressedInterpolation boolean # The interpolation will be compressed if true. +function LayerGradient:setCompressedInterpolation(compressedInterpolation) end + +---Sets the end color of the gradient. +--- +---@param endColor any # The end color. +function LayerGradient:setEndColor(endColor) end + +---Returns the end opacity of the gradient. +--- +---@param endOpacity integer # The end opacity, from 0 to 255. +function LayerGradient:setEndOpacity(endOpacity) end + +---Sets the start color of the gradient. +--- +---@param startColor any # The start color. +function LayerGradient:setStartColor(startColor) end + +---Returns the start opacity of the gradient. +--- +---@param startOpacity integer # The start opacity, from 0 to 255. +function LayerGradient:setStartOpacity(startOpacity) end + +---Sets the directional vector that will be used for the gradient. +---The default value is vertical direction (0,-1). +--- +---@param alongVector cc.Vec2 # The direction of gradient. +function LayerGradient:setVector(alongVector) end + +return LayerGradient \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/LayerMultiplex.lua b/addons/cclua/cocos2d/library/cc/LayerMultiplex.lua new file mode 100644 index 00000000..664c1e16 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/LayerMultiplex.lua @@ -0,0 +1,202 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.LayerMultiplex + +---\class LayerMultiplex +---MultipleLayer is a Layer with the ability to multiplex it's children. +---Features: +---- It supports one or more children +---- Only one children will be active a time +---@class cc.LayerMultiplex : cc.Layer +local LayerMultiplex = {} + +---Add a certain layer to LayerMultiplex. +--- +---@param layer cc.Layer # A layer need to be added to the LayerMultiplex. +function LayerMultiplex:addLayer(layer) end + +---Creates and initializes a LayerMultiplex object. +---\lua NA +--- +---@return cc.LayerMultiplex # An autoreleased LayerMultiplex object. +--- +---Creates a LayerMultiplex with one or more layers using a variable argument list. +---\code +---When this function bound to lua or js,the input params are changed. +---In js:var create(...) +---In lua:local create(...) +---\endcode +---@overload fun(layer: cc.Layer): cc.LayerMultiplex +--- +---Creates a LayerMultiplex with one or more layers using a variable argument list. +---\code +---When this function bound to lua or js,the input params are changed. +---In js:var create(...) +---In lua:local create(...) +---\endcode +---@overload fun(layer: cc.Layer, layer_1: cc.Layer): cc.LayerMultiplex +--- +---Creates a LayerMultiplex with one or more layers using a variable argument list. +---\code +---When this function bound to lua or js,the input params are changed. +---In js:var create(...) +---In lua:local create(...) +---\endcode +---@overload fun(layer: cc.Layer, layer_1: cc.Layer, layer_2: cc.Layer): cc.LayerMultiplex +--- +---Creates a LayerMultiplex with one or more layers using a variable argument list. +---\code +---When this function bound to lua or js,the input params are changed. +---In js:var create(...) +---In lua:local create(...) +---\endcode +---@overload fun(layer: cc.Layer, layer_1: cc.Layer, layer_2: cc.Layer, layer_3: cc.Layer): cc.LayerMultiplex +--- +---Creates a LayerMultiplex with one or more layers using a variable argument list. +---\code +---When this function bound to lua or js,the input params are changed. +---In js:var create(...) +---In lua:local create(...) +---\endcode +---@overload fun(layer: cc.Layer, layer_1: cc.Layer, layer_2: cc.Layer, layer_3: cc.Layer, layer_4: cc.Layer): cc.LayerMultiplex +--- +---Creates a LayerMultiplex with one or more layers using a variable argument list. +---\code +---When this function bound to lua or js,the input params are changed. +---In js:var create(...) +---In lua:local create(...) +---\endcode +---@overload fun(layer: cc.Layer, layer_1: cc.Layer, layer_2: cc.Layer, layer_3: cc.Layer, layer_4: cc.Layer, layer_5: cc.Layer): cc.LayerMultiplex +--- +---Creates a LayerMultiplex with one or more layers using a variable argument list. +---\code +---When this function bound to lua or js,the input params are changed. +---In js:var create(...) +---In lua:local create(...) +---\endcode +---@overload fun(layer: cc.Layer, layer_1: cc.Layer, layer_2: cc.Layer, layer_3: cc.Layer, layer_4: cc.Layer, layer_5: cc.Layer, layer_6: cc.Layer): cc.LayerMultiplex +--- +---Creates a LayerMultiplex with one or more layers using a variable argument list. +---\code +---When this function bound to lua or js,the input params are changed. +---In js:var create(...) +---In lua:local create(...) +---\endcode +---@overload fun(layer: cc.Layer, layer_1: cc.Layer, layer_2: cc.Layer, layer_3: cc.Layer, layer_4: cc.Layer, layer_5: cc.Layer, layer_6: cc.Layer, layer_7: cc.Layer): cc.LayerMultiplex +--- +---Creates a LayerMultiplex with one or more layers using a variable argument list. +---\code +---When this function bound to lua or js,the input params are changed. +---In js:var create(...) +---In lua:local create(...) +---\endcode +---@overload fun(layer: cc.Layer, layer_1: cc.Layer, layer_2: cc.Layer, layer_3: cc.Layer, layer_4: cc.Layer, layer_5: cc.Layer, layer_6: cc.Layer, layer_7: cc.Layer, layer_8: cc.Layer): cc.LayerMultiplex +--- +---Creates a LayerMultiplex with one or more layers using a variable argument list. +---\code +---When this function bound to lua or js,the input params are changed. +---In js:var create(...) +---In lua:local create(...) +---\endcode +---@overload fun(layer: cc.Layer, layer_1: cc.Layer, layer_2: cc.Layer, layer_3: cc.Layer, layer_4: cc.Layer, layer_5: cc.Layer, layer_6: cc.Layer, layer_7: cc.Layer, layer_8: cc.Layer, layer_9: cc.Layer): cc.LayerMultiplex +--- +---Creates a LayerMultiplex with one or more layers using a variable argument list. +---\code +---When this function bound to lua or js,the input params are changed. +---In js:var create(...) +---In lua:local create(...) +---\endcode +---@overload fun(layer: cc.Layer, layer_1: cc.Layer, layer_2: cc.Layer, layer_3: cc.Layer, layer_4: cc.Layer, layer_5: cc.Layer, layer_6: cc.Layer, layer_7: cc.Layer, layer_8: cc.Layer, layer_9: cc.Layer, layer_10: cc.Layer): cc.LayerMultiplex +--- +---Creates a LayerMultiplex with one or more layers using a variable argument list. +---\code +---When this function bound to lua or js,the input params are changed. +---In js:var create(...) +---In lua:local create(...) +---\endcode +---@overload fun(layer: cc.Layer, layer_1: cc.Layer, layer_2: cc.Layer, layer_3: cc.Layer, layer_4: cc.Layer, layer_5: cc.Layer, layer_6: cc.Layer, layer_7: cc.Layer, layer_8: cc.Layer, layer_9: cc.Layer, layer_10: cc.Layer, layer_11: cc.Layer): cc.LayerMultiplex +--- +---Creates a LayerMultiplex with one or more layers using a variable argument list. +---\code +---When this function bound to lua or js,the input params are changed. +---In js:var create(...) +---In lua:local create(...) +---\endcode +---@overload fun(layer: cc.Layer, layer_1: cc.Layer, layer_2: cc.Layer, layer_3: cc.Layer, layer_4: cc.Layer, layer_5: cc.Layer, layer_6: cc.Layer, layer_7: cc.Layer, layer_8: cc.Layer, layer_9: cc.Layer, layer_10: cc.Layer, layer_11: cc.Layer, layer_12: cc.Layer): cc.LayerMultiplex +--- +---Creates a LayerMultiplex with one or more layers using a variable argument list. +---\code +---When this function bound to lua or js,the input params are changed. +---In js:var create(...) +---In lua:local create(...) +---\endcode +---@overload fun(layer: cc.Layer, layer_1: cc.Layer, layer_2: cc.Layer, layer_3: cc.Layer, layer_4: cc.Layer, layer_5: cc.Layer, layer_6: cc.Layer, layer_7: cc.Layer, layer_8: cc.Layer, layer_9: cc.Layer, layer_10: cc.Layer, layer_11: cc.Layer, layer_12: cc.Layer, layer_13: cc.Layer): cc.LayerMultiplex +--- +---Creates a LayerMultiplex with one or more layers using a variable argument list. +---\code +---When this function bound to lua or js,the input params are changed. +---In js:var create(...) +---In lua:local create(...) +---\endcode +---@overload fun(layer: cc.Layer, layer_1: cc.Layer, layer_2: cc.Layer, layer_3: cc.Layer, layer_4: cc.Layer, layer_5: cc.Layer, layer_6: cc.Layer, layer_7: cc.Layer, layer_8: cc.Layer, layer_9: cc.Layer, layer_10: cc.Layer, layer_11: cc.Layer, layer_12: cc.Layer, layer_13: cc.Layer, layer_14: cc.Layer): cc.LayerMultiplex +--- +---Creates a LayerMultiplex with one or more layers using a variable argument list. +---\code +---When this function bound to lua or js,the input params are changed. +---In js:var create(...) +---In lua:local create(...) +---\endcode +---@overload fun(layer: cc.Layer, layer_1: cc.Layer, layer_2: cc.Layer, layer_3: cc.Layer, layer_4: cc.Layer, layer_5: cc.Layer, layer_6: cc.Layer, layer_7: cc.Layer, layer_8: cc.Layer, layer_9: cc.Layer, layer_10: cc.Layer, layer_11: cc.Layer, layer_12: cc.Layer, layer_13: cc.Layer, layer_14: cc.Layer, layer_15: cc.Layer): cc.LayerMultiplex +--- +---Creates a LayerMultiplex with one or more layers using a variable argument list. +---\code +---When this function bound to lua or js,the input params are changed. +---In js:var create(...) +---In lua:local create(...) +---\endcode +---@overload fun(layer: cc.Layer, layer_1: cc.Layer, layer_2: cc.Layer, layer_3: cc.Layer, layer_4: cc.Layer, layer_5: cc.Layer, layer_6: cc.Layer, layer_7: cc.Layer, layer_8: cc.Layer, layer_9: cc.Layer, layer_10: cc.Layer, layer_11: cc.Layer, layer_12: cc.Layer, layer_13: cc.Layer, layer_14: cc.Layer, layer_15: cc.Layer, layer_16: cc.Layer): cc.LayerMultiplex +function LayerMultiplex.create() end + +---Creates a LayerMultiplex with an array of layers. +---\since v2.1 +---\js NA +--- +---@param arrayOfLayers any # An array of layers. +---@return cc.LayerMultiplex # An autoreleased LayerMultiplex object. +function LayerMultiplex.createWithArray(arrayOfLayers) end + +---Creates a LayerMultiplex with one layer. +---Lua script can not init with undetermined number of variables +---so add these functions to be used with lua. +---\js NA +---\lua NA +--- +---@param layer cc.Layer # A certain layer. +---@return cc.LayerMultiplex # An autoreleased LayerMultiplex object. +function LayerMultiplex.createWithLayer(layer) end + +---initializes a MultiplexLayer with an array of layers +---\since v2.1 +---@param arrayOfLayers any +---@return boolean +function LayerMultiplex:initWithArray(arrayOfLayers) end + +---\js ctor +---@return cc.LayerMultiplex +function LayerMultiplex.new() end + +---Switches to a certain layer indexed by n. +---The current (old) layer will be removed from it's parent with 'cleanup=true'. +--- +---@param n integer # The layer indexed by n will display. +--- +---The same as switchTo(int), but has a parameter to set if need to clean up child. +---@overload fun(self: cc.LayerMultiplex, n: integer, cleanup: boolean) +function LayerMultiplex:switchTo(n) end + +---release the current layer and switches to another layer indexed by n. +---The current (old) layer will be removed from it's parent with 'cleanup=true'. +--- +---@param n integer # The layer indexed by n will display. +function LayerMultiplex:switchToAndReleaseMe(n) end + +return LayerMultiplex \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/LayerRadialGradient.lua b/addons/cclua/cocos2d/library/cc/LayerRadialGradient.lua new file mode 100644 index 00000000..375157bf --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/LayerRadialGradient.lua @@ -0,0 +1,98 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.LayerRadialGradient + +---\class LayerRadialGradient +---LayerRadialGradient is a subclass of Layer that draws radial gradients across the background. +---\since v3.16 +---@class cc.LayerRadialGradient : cc.Layer +---@field blendFunc cc.BlendFunc +---@field center cc.Vec2 +---@field endColor any +---@field endColor3B any +---@field endOpacity integer +---@field expand number +---@field radius number +---@field startColor any +---@field startColor3B any +---@field startOpacity integer +local LayerRadialGradient = {} + +---Create a LayerRadialGradient +---@param startColor any # the inner color of the gradient +---@param endColor any # the out color of the gradient +---@param radius number # the radius of the gradient(length from center of gradient to outer color) +---@param center cc.Vec2 # the position of the center of the gradient +---@param expand number # an alpha value(0.f-1.f) that specifies how much of that radius in only inner color(the gradient +---starts outside of that amount) +---@return cc.LayerRadialGradient +---@overload fun(): cc.LayerRadialGradient +function LayerRadialGradient.create(startColor, endColor, radius, center, expand) end + +---@return cc.BlendFunc +function LayerRadialGradient:getBlendFunc() end + +---@return cc.Vec2 +function LayerRadialGradient:getCenter() end + +---@return any +function LayerRadialGradient:getEndColor() end + +---@return any +function LayerRadialGradient:getEndColor3B() end + +---@return integer +function LayerRadialGradient:getEndOpacity() end + +---@return number +function LayerRadialGradient:getExpand() end + +---@return number +function LayerRadialGradient:getRadius() end + +---@return any +function LayerRadialGradient:getStartColor() end + +---@return any +function LayerRadialGradient:getStartColor3B() end + +---@return integer +function LayerRadialGradient:getStartOpacity() end + +---@param startColor any +---@param endColor any +---@param radius number +---@param center cc.Vec2 +---@param expand number +---@return boolean +function LayerRadialGradient:initWithColor(startColor, endColor, radius, center, expand) end + +---@return cc.LayerRadialGradient +function LayerRadialGradient.new() end + +---@param blendFunc cc.BlendFunc +function LayerRadialGradient:setBlendFunc(blendFunc) end + +---@param center cc.Vec2 +function LayerRadialGradient:setCenter(center) end + +---@param color any +---@overload fun(self: cc.LayerRadialGradient, color: any) +function LayerRadialGradient:setEndColor(color) end + +---@param opacity integer +function LayerRadialGradient:setEndOpacity(opacity) end + +---@param expand number +function LayerRadialGradient:setExpand(expand) end + +---@param radius number +function LayerRadialGradient:setRadius(radius) end + +---@param color any +---@overload fun(self: cc.LayerRadialGradient, color: any) +function LayerRadialGradient:setStartColor(color) end + +---@param opacity integer +function LayerRadialGradient:setStartOpacity(opacity) end + +return LayerRadialGradient \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/Lens3D.lua b/addons/cclua/cocos2d/library/cc/Lens3D.lua new file mode 100644 index 00000000..7643d721 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/Lens3D.lua @@ -0,0 +1,42 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.Lens3D + +---Lens3D action. +---\details This action is used for take effect on the target node as lens. +---You can create the action by these parameters: +---duration, grid size, center position of lens, radius of lens. +---Also you can change the lens effect value & whether effect is concave by the setter methods. +---@class cc.Lens3D : cc.Grid3DAction +---@field lensEffect number Get the value of lens effect. Default value is 0.7. \return The value of lens effect. +---@field position cc.Vec2 Get the center position of lens effect. \return The center position of lens effect. +local Lens3D = {} + +---Create the action with center position, radius, a grid size and duration. +---@param duration number # Specify the duration of the Lens3D action. It's a value in seconds. +---@param gridSize cc.Size # Specify the size of the grid. +---@param position cc.Vec2 # Specify the center position of the lens. +---@param radius number # Specify the radius of the lens. +---@return cc.Lens3D # If the creation success, return a pointer of Lens3D action; otherwise, return nil. +function Lens3D.create(duration, gridSize, position, radius) end + +---Get the value of lens effect. Default value is 0.7. +---@return number # The value of lens effect. +function Lens3D:getLensEffect() end + +---Get the center position of lens effect. +---@return cc.Vec2 # The center position of lens effect. +function Lens3D:getPosition() end + +---Set whether lens is concave. +---@param concave boolean # Whether lens is concave. +function Lens3D:setConcave(concave) end + +---Set the value of lens effect. +---@param lensEffect number # The value of lens effect will be set. +function Lens3D:setLensEffect(lensEffect) end + +---Set the center position of lens effect. +---@param position cc.Vec2 # The center position will be set. +function Lens3D:setPosition(position) end + +return Lens3D \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/LightFlag.lua b/addons/cclua/cocos2d/library/cc/LightFlag.lua new file mode 100644 index 00000000..37bf495f --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/LightFlag.lua @@ -0,0 +1,28 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.LightFlag + +---@type cc.LightFlag +local VALUE + +--- +---@enum cc.LightFlag +local LightFlag = { + LIGHT0 = 1, + LIGHT1 = 2, + LIGHT10 = 1024, + LIGHT11 = 2048, + LIGHT12 = 4096, + LIGHT13 = 8192, + LIGHT14 = 16384, + LIGHT15 = 32768, + LIGHT2 = 4, + LIGHT3 = 8, + LIGHT4 = 16, + LIGHT5 = 32, + LIGHT6 = 64, + LIGHT7 = 128, + LIGHT8 = 256, + LIGHT9 = 512, +} + +return LightFlag \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/LightType.lua b/addons/cclua/cocos2d/library/cc/LightType.lua new file mode 100644 index 00000000..3afd389a --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/LightType.lua @@ -0,0 +1,16 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.LightType + +---@type cc.LightType +local VALUE + +--- +---@enum cc.LightType +local LightType = { + AMBIENT = 3, + DIRECTIONAL = 0, + POINT = 1, + SPOT = 2, +} + +return LightType \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/Liquid.lua b/addons/cclua/cocos2d/library/cc/Liquid.lua new file mode 100644 index 00000000..991171a1 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/Liquid.lua @@ -0,0 +1,28 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.Liquid + +---Liquid action. +---\details This action is used for take effect on the target node as liquid. +---You can create the action by these parameters: +---duration, grid size, waves count, amplitude of the liquid effect. +---@class cc.Liquid : cc.Grid3DAction +---@field amplitude number Get the amplitude of the effect. \return Return the amplitude of the effect. +local Liquid = {} + +---Create the action with amplitude, grid size, waves count and duration. +---@param duration number # Specify the duration of the Liquid action. It's a value in seconds. +---@param gridSize cc.Size # Specify the size of the grid. +---@param waves integer # Specify the waves count of the Liquid action. +---@param amplitude number # Specify the amplitude of the Liquid action. +---@return cc.Liquid # If the creation success, return a pointer of Liquid action; otherwise, return nil. +function Liquid.create(duration, gridSize, waves, amplitude) end + +---Get the amplitude of the effect. +---@return number # Return the amplitude of the effect. +function Liquid:getAmplitude() end + +---Set the amplitude to the effect. +---@param amplitude number # The value of amplitude will be set. +function Liquid:setAmplitude(amplitude) end + +return Liquid \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/LuaComponent.lua b/addons/cclua/cocos2d/library/cc/LuaComponent.lua new file mode 100644 index 00000000..8bc6e37f --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/LuaComponent.lua @@ -0,0 +1,19 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.LuaComponent + +--- +---@class cc.LuaComponent : cc.Component +---@field onAdd fun() +---@field onEnter fun() +---@field onExit fun() +---@field onRemove fun() +---@field onUpdate fun(arg1: number) +local LuaComponent = {} + +---@return cc.LuaComponent +function LuaComponent.create() end + +---@return cc.LuaComponent +function LuaComponent.new() end + +return LuaComponent \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/LuaTweenNode.lua b/addons/cclua/cocos2d/library/cc/LuaTweenNode.lua new file mode 100644 index 00000000..245fad9e --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/LuaTweenNode.lua @@ -0,0 +1,20 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.LuaTweenNode + +--- +---@class cc.LuaTweenNode : cc.Node +local LuaTweenNode = {} + +---@param cls string +---@return any +function LuaTweenNode:as(cls) end + +---@param callback fun(arg1: number, arg2: string) +---@return cc.LuaTweenNode +function LuaTweenNode.create(callback) end + +---@param value number +---@param key string +function LuaTweenNode:updateTweenAction(value, key) end + +return LuaTweenNode \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/LuaWebSocketDelegate.lua b/addons/cclua/cocos2d/library/cc/LuaWebSocketDelegate.lua new file mode 100644 index 00000000..1b0406e2 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/LuaWebSocketDelegate.lua @@ -0,0 +1,15 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.LuaWebSocketDelegate + +--- +---@class cc.LuaWebSocketDelegate : cc.WebSocket.Delegate +---@field onClose fun(arg1: cc.WebSocket) +---@field onError fun(arg1: cc.WebSocket, arg2: cc.WebSocket.ErrorCode) +---@field onMessage fun(arg1: cc.WebSocket, arg2: any) +---@field onOpen fun(arg1: cc.WebSocket) +local LuaWebSocketDelegate = {} + +---@return cc.LuaWebSocketDelegate +function LuaWebSocketDelegate.new() end + +return LuaWebSocketDelegate \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/MATRIX_STACK_TYPE.lua b/addons/cclua/cocos2d/library/cc/MATRIX_STACK_TYPE.lua new file mode 100644 index 00000000..2ada224a --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/MATRIX_STACK_TYPE.lua @@ -0,0 +1,18 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.MATRIX_STACK_TYPE + +---@type cc.MATRIX_STACK_TYPE +local VALUE + +--- +---@enum cc.MATRIX_STACK_TYPE +local MATRIX_STACK_TYPE = { + ---Model view matrix stack + MATRIX_STACK_MODELVIEW = 0, + ---projection matrix stack + MATRIX_STACK_PROJECTION = 1, + ---texture matrix stack + MATRIX_STACK_TEXTURE = 2, +} + +return MATRIX_STACK_TYPE \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/Mat4.lua b/addons/cclua/cocos2d/library/cc/Mat4.lua new file mode 100644 index 00000000..ab989158 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/Mat4.lua @@ -0,0 +1,636 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.Mat4 + +---\addtogroup base +---\{ +---@class cc.Mat4 +---@field identity boolean Determines if this matrix is equal to the identity matrix.

\return true if the matrix is an identity matrix, false otherwise. +---@field inversed cc.Mat4 Get the inversed matrix. +---@field negated cc.Mat4 Get the Negated matrix. +---@field transposed cc.Mat4 Get the Transposed matrix. +---@field IDENTITY cc.Mat4 +---@field ZERO cc.Mat4 +local Mat4 = {} + +---@param mat1 cc.Mat4 +---@param mat2 cc.Mat4 +---@return cc.Mat4 +function Mat4.__add(mat1, mat2) end + +---@return any +function Mat4:__gc() end + +---@param mat1 cc.Mat4 +---@param mat2 cc.Mat4 +---@return cc.Mat4 +function Mat4.__mul(mat1, mat2) end + +---@return any +function Mat4:__olua_move() end + +---@param mat1 cc.Mat4 +---@param mat2 cc.Mat4 +---@return cc.Mat4 +function Mat4.__sub(mat1, mat2) end + +---Adds a scalar value to each component of this matrix. +--- +---@param scalar number # The scalar to add. +--- +---Adds a scalar value to each component of this matrix and stores the result in dst. +--- +---\param scalar The scalar value to add. +---\param dst A matrix to store the result in. +---@overload fun(self: cc.Mat4, scalar: number, dst: cc.Mat4) +--- +---Adds the specified matrix to this matrix. +--- +---\param mat The matrix to add. +---@overload fun(self: cc.Mat4, mat: cc.Mat4) +--- +---Adds the specified matrices and stores the result in dst. +--- +---\param m1 The first matrix. +---\param m2 The second matrix. +---\param dst The destination matrix to add to. +---@overload fun(m1: cc.Mat4, m2: cc.Mat4, dst: cc.Mat4) +function Mat4:add(scalar) end + +---Creates a spherical billboard that rotates around a specified object position. +--- +---This method computes the facing direction of the billboard from the object position +---and camera position. When the object and camera positions are too close, the matrix +---will not be accurate. To avoid this problem, this method defaults to the identity +---rotation if the positions are too close. (See the other overload of createBillboard +---for an alternative approach). +--- +---@param objectPosition cc.Vec3 # The position of the object the billboard will rotate around. +---@param cameraPosition cc.Vec3 # The position of the camera. +---@param cameraUpVector cc.Vec3 # The up vector of the camera. +---@param dst cc.Mat4 # A matrix to store the result in. +--- +---Creates a spherical billboard that rotates around a specified object position with +---provision for a safe default orientation. +--- +---This method computes the facing direction of the billboard from the object position +---and camera position. When the object and camera positions are too close, the matrix +---will not be accurate. To avoid this problem, this method uses the specified camera +---forward vector if the positions are too close. (See the other overload of createBillboard +---for an alternative approach). +--- +---\param objectPosition The position of the object the billboard will rotate around. +---\param cameraPosition The position of the camera. +---\param cameraUpVector The up vector of the camera. +---\param cameraForwardVector The forward vector of the camera, used if the positions are too close. +---\param dst A matrix to store the result in. +---@overload fun(objectPosition: cc.Vec3, cameraPosition: cc.Vec3, cameraUpVector: cc.Vec3, cameraForwardVector: cc.Vec3, dst: cc.Mat4) +function Mat4.createBillboard(objectPosition, cameraPosition, cameraUpVector, dst) end + +---Creates a view matrix based on the specified input parameters. +--- +---@param eyePosition cc.Vec3 # The eye position. +---@param targetPosition cc.Vec3 # The target's center position. +---@param up cc.Vec3 # The up vector. +---@param dst cc.Mat4 # A matrix to store the result in. +--- +---Creates a view matrix based on the specified input parameters. +--- +---\param eyePositionX The eye x-coordinate position. +---\param eyePositionY The eye y-coordinate position. +---\param eyePositionZ The eye z-coordinate position. +---\param targetCenterX The target's center x-coordinate position. +---\param targetCenterY The target's center y-coordinate position. +---\param targetCenterZ The target's center z-coordinate position. +---\param upX The up vector x-coordinate value. +---\param upY The up vector y-coordinate value. +---\param upZ The up vector z-coordinate value. +---\param dst A matrix to store the result in. +---@overload fun(eyePositionX: number, eyePositionY: number, eyePositionZ: number, targetCenterX: number, targetCenterY: number, targetCenterZ: number, upX: number, upY: number, upZ: number, dst: cc.Mat4) +function Mat4.createLookAt(eyePosition, targetPosition, up, dst) end + +---Creates an orthographic projection matrix. +--- +---@param width number # The width of the view. +---@param height number # The height of the view. +---@param zNearPlane number # The minimum z-value of the view volume. +---@param zFarPlane number # The maximum z-value of the view volume. +---@param dst cc.Mat4 # A matrix to store the result in. +function Mat4.createOrthographic(width, height, zNearPlane, zFarPlane, dst) end + +---Creates an orthographic projection matrix. +--- +---Projection space refers to the space after applying +---projection transformation from view space. After the +---projection transformation, visible content has +---x and y coordinates ranging from -1 to 1, and z coordinates +---ranging from 0 to 1. +--- +---Unlike perspective projection, in orthographic projection +---there is no perspective foreshortening. +--- +---The viewable area of this orthographic projection extends +---from left to right on the x-axis, bottom to top on the y-axis, +---and zNearPlane to zFarPlane on the z-axis. These values are +---relative to the position and x, y, and z-axes of the view. +---To obtain the viewable area (in world space) of a scene, +---create a BoundingFrustum and pass the combined view and +---projection matrix to the constructor. +--- +---@param left number # The minimum x-value of the view volume. +---@param right number # The maximum x-value of the view volume. +---@param bottom number # The minimum y-value of the view volume. +---@param top number # The maximum y-value of the view volume. +---@param zNearPlane number # The minimum z-value of the view volume. +---@param zFarPlane number # The maximum z-value of the view volume. +---@param dst cc.Mat4 # A matrix to store the result in. +function Mat4.createOrthographicOffCenter(left, right, bottom, top, zNearPlane, zFarPlane, dst) end + +---Builds a perspective projection matrix based on a field of view and returns by value. +--- +---Projection space refers to the space after applying projection transformation from view space. +---After the projection transformation, visible content has x- and y-coordinates ranging from -1 to 1, +---and a z-coordinate ranging from 0 to 1. To obtain the viewable area (in world space) of a scene, +---create a BoundingFrustum and pass the combined view and projection matrix to the constructor. +--- +---@param fieldOfView number # The field of view in the y direction (in degrees). +---@param aspectRatio number # The aspect ratio, defined as view space width divided by height. +---@param zNearPlane number # The distance to the near view plane. +---@param zFarPlane number # The distance to the far view plane. +---@param dst cc.Mat4 # A matrix to store the result in. +function Mat4.createPerspective(fieldOfView, aspectRatio, zNearPlane, zFarPlane, dst) end + +---Creates a rotation matrix from the specified quaternion. +--- +---@param quat cc.Quaternion # A quaternion describing a 3D orientation. +---@param dst cc.Mat4 # A matrix to store the result in. +--- +---Creates a rotation matrix from the specified axis and angle. +--- +---\param axis A vector describing the axis to rotate about. +---\param angle The angle (in radians). +---\param dst A matrix to store the result in. +---@overload fun(axis: cc.Vec3, angle: number, dst: cc.Mat4) +function Mat4.createRotation(quat, dst) end + +---Creates a matrix describing a rotation around the x-axis. +--- +---@param angle number # The angle of rotation (in radians). +---@param dst cc.Mat4 # A matrix to store the result in. +function Mat4.createRotationX(angle, dst) end + +---Creates a matrix describing a rotation around the y-axis. +--- +---@param angle number # The angle of rotation (in radians). +---@param dst cc.Mat4 # A matrix to store the result in. +function Mat4.createRotationY(angle, dst) end + +---Creates a matrix describing a rotation around the z-axis. +--- +---@param angle number # The angle of rotation (in radians). +---@param dst cc.Mat4 # A matrix to store the result in. +function Mat4.createRotationZ(angle, dst) end + +---Creates a scale matrix. +--- +---@param scale cc.Vec3 # The amount to scale. +---@param dst cc.Mat4 # A matrix to store the result in. +--- +---Creates a scale matrix. +--- +---\param xScale The amount to scale along the x-axis. +---\param yScale The amount to scale along the y-axis. +---\param zScale The amount to scale along the z-axis. +---\param dst A matrix to store the result in. +---@overload fun(xScale: number, yScale: number, zScale: number, dst: cc.Mat4) +function Mat4.createScale(scale, dst) end + +---Creates a translation matrix. +--- +---@param translation cc.Vec3 # The translation. +---@param dst cc.Mat4 # A matrix to store the result in. +--- +---Creates a translation matrix. +--- +---\param xTranslation The translation on the x-axis. +---\param yTranslation The translation on the y-axis. +---\param zTranslation The translation on the z-axis. +---\param dst A matrix to store the result in. +---@overload fun(xTranslation: number, yTranslation: number, zTranslation: number, dst: cc.Mat4) +function Mat4.createTranslation(translation, dst) end + +---Decomposes the scale, rotation and translation components of this matrix. +--- +---@param scale cc.Vec3 # The scale. +---@param rotation cc.Quaternion # The rotation. +---@param translation cc.Vec3 # The translation. +---@return boolean +function Mat4:decompose(scale, rotation, translation) end + +---Computes the determinant of this matrix. +--- +---@return number # The determinant. +function Mat4:determinant() end + +---Gets the backward vector of this matrix. +--- +---@param dst cc.Vec3 # The destination vector. +function Mat4:getBackVector(dst) end + +---Gets the down vector of this matrix. +--- +---@param dst cc.Vec3 # The destination vector. +function Mat4:getDownVector(dst) end + +---Gets the forward vector of this matrix. +--- +---@param dst cc.Vec3 # The destination vector. +function Mat4:getForwardVector(dst) end + +---Get the inversed matrix. +---@return cc.Mat4 +function Mat4:getInversed() end + +---Gets the left vector of this matrix. +--- +---@param dst cc.Vec3 # The destination vector. +function Mat4:getLeftVector(dst) end + +---Get the Negated matrix. +---@return cc.Mat4 +function Mat4:getNegated() end + +---Gets the right vector of this matrix. +--- +---@param dst cc.Vec3 # The destination vector. +function Mat4:getRightVector(dst) end + +---Gets the rotational component of this matrix in the specified quaternion. +--- +---@param rotation cc.Quaternion # A quaternion to receive the rotation. +--- +---@return boolean # true if the rotation is successfully extracted, false otherwise. +function Mat4:getRotation(rotation) end + +---Gets the scalar component of this matrix in the specified vector. +--- +---If the scalar component of this matrix has negative parts, +---it is not possible to always extract the exact scalar component; +---instead, a scale vector that is mathematically equivalent to the +---original scale vector is extracted and returned. +--- +---@param scale cc.Vec3 # A vector to receive the scale. +function Mat4:getScale(scale) end + +---Gets the translational component of this matrix in the specified vector. +--- +---@param translation cc.Vec3 # A vector to receive the translation. +function Mat4:getTranslation(translation) end + +---Get the Transposed matrix. +---@return cc.Mat4 +function Mat4:getTransposed() end + +---Gets the up vector of this matrix. +--- +---@param dst cc.Vec3 # The destination vector. +function Mat4:getUpVector(dst) end + +---Inverts this matrix. +--- +---@return boolean # true if the matrix can be inverted, false otherwise. +function Mat4:inverse() end + +---Determines if this matrix is equal to the identity matrix. +--- +---@return boolean # true if the matrix is an identity matrix, false otherwise. +function Mat4:isIdentity() end + +---Multiplies the components of this matrix by the specified scalar. +--- +---@param scalar number # The scalar value. +--- +---Multiplies the components of this matrix by a scalar and stores the result in dst. +--- +---\param scalar The scalar value. +---\param dst A matrix to store the result in. +---@overload fun(self: cc.Mat4, scalar: number, dst: cc.Mat4) +--- +---Multiplies the components of the specified matrix by a scalar and stores the result in dst. +--- +---\param mat The matrix. +---\param scalar The scalar value. +---\param dst A matrix to store the result in. +---@overload fun(mat: cc.Mat4, scalar: number, dst: cc.Mat4) +--- +---Multiplies this matrix by the specified one. +--- +---\param mat The matrix to multiply. +---@overload fun(self: cc.Mat4, mat: cc.Mat4) +--- +---Multiplies m1 by m2 and stores the result in dst. +--- +---\param m1 The first matrix to multiply. +---\param m2 The second matrix to multiply. +---\param dst A matrix to store the result in. +---@overload fun(m1: cc.Mat4, m2: cc.Mat4, dst: cc.Mat4) +function Mat4:multiply(scalar) end + +---Negates this matrix. +function Mat4:negate() end + +---Default constructor. +---Constructs a matrix initialized to the identity matrix: +--- +---1 0 0 0 +---0 1 0 0 +---0 0 1 0 +---0 0 0 1 +---@return cc.Mat4 +--- +---Constructs a matrix initialized to the specified value. +--- +---\param m11 The first element of the first row. +---\param m12 The second element of the first row. +---\param m13 The third element of the first row. +---\param m14 The fourth element of the first row. +---\param m21 The first element of the second row. +---\param m22 The second element of the second row. +---\param m23 The third element of the second row. +---\param m24 The fourth element of the second row. +---\param m31 The first element of the third row. +---\param m32 The second element of the third row. +---\param m33 The third element of the third row. +---\param m34 The fourth element of the third row. +---\param m41 The first element of the fourth row. +---\param m42 The second element of the fourth row. +---\param m43 The third element of the fourth row. +---\param m44 The fourth element of the fourth row. +---@overload fun(m11: number, m12: number, m13: number, m14: number, m21: number, m22: number, m23: number, m24: number, m31: number, m32: number, m33: number, m34: number, m41: number, m42: number, m43: number, m44: number): cc.Mat4 +--- +---Creates a matrix initialized to the specified column-major array. +--- +---The passed-in array is in column-major order, so the memory layout of the array is as follows: +--- +---0 4 8 12 +---1 5 9 13 +---2 6 10 14 +---3 7 11 15 +--- +---\param mat An array containing 16 elements in column-major order. +---@overload fun(mat: olua.float): cc.Mat4 +function Mat4.new() end + +---Post-multiplies this matrix by the matrix corresponding to the +---specified quaternion rotation. +--- +---@param q cc.Quaternion # The quaternion to rotate by. +--- +---Post-multiplies this matrix by the matrix corresponding to the +---specified quaternion rotation and stores the result in dst. +--- +---\param q The quaternion to rotate by. +---\param dst A matrix to store the result in. +---@overload fun(self: cc.Mat4, q: cc.Quaternion, dst: cc.Mat4) +--- +---Post-multiplies this matrix by the matrix corresponding to the +---specified rotation about the specified axis. +--- +---\param axis The axis to rotate about. +---\param angle The angle (in radians). +---@overload fun(self: cc.Mat4, axis: cc.Vec3, angle: number) +--- +---Post-multiplies this matrix by the matrix corresponding to the specified +---rotation about the specified axis and stores the result in dst. +--- +---\param axis The axis to rotate about. +---\param angle The angle (in radians). +---\param dst A matrix to store the result in. +---@overload fun(self: cc.Mat4, axis: cc.Vec3, angle: number, dst: cc.Mat4) +function Mat4:rotate(q) end + +---Post-multiplies this matrix by the matrix corresponding to the +---specified rotation around the x-axis. +--- +---@param angle number # The angle (in radians). +--- +---Post-multiplies this matrix by the matrix corresponding to the +---specified rotation around the x-axis and stores the result in dst. +--- +---\param angle The angle (in radians). +---\param dst A matrix to store the result in. +---@overload fun(self: cc.Mat4, angle: number, dst: cc.Mat4) +function Mat4:rotateX(angle) end + +---Post-multiplies this matrix by the matrix corresponding to the +---specified rotation around the y-axis. +--- +---@param angle number # The angle (in radians). +--- +---Post-multiplies this matrix by the matrix corresponding to the +---specified rotation around the y-axis and stores the result in dst. +--- +---\param angle The angle (in radians). +---\param dst A matrix to store the result in. +---@overload fun(self: cc.Mat4, angle: number, dst: cc.Mat4) +function Mat4:rotateY(angle) end + +---Post-multiplies this matrix by the matrix corresponding to the +---specified rotation around the z-axis. +--- +---@param angle number # The angle (in radians). +--- +---Post-multiplies this matrix by the matrix corresponding to the +---specified rotation around the z-axis and stores the result in dst. +--- +---\param angle The angle (in radians). +---\param dst A matrix to store the result in. +---@overload fun(self: cc.Mat4, angle: number, dst: cc.Mat4) +function Mat4:rotateZ(angle) end + +---Post-multiplies this matrix by the matrix corresponding to the +---specified scale transformation. +--- +---@param value number # The amount to scale along all axes. +--- +---Post-multiplies this matrix by the matrix corresponding to the +---specified scale transformation and stores the result in dst. +--- +---\param value The amount to scale along all axes. +---\param dst A matrix to store the result in. +---@overload fun(self: cc.Mat4, value: number, dst: cc.Mat4) +--- +---Post-multiplies this matrix by the matrix corresponding to the +---specified scale transformation. +--- +---\param xScale The amount to scale along the x-axis. +---\param yScale The amount to scale along the y-axis. +---\param zScale The amount to scale along the z-axis. +---@overload fun(self: cc.Mat4, xScale: number, yScale: number, zScale: number) +--- +---Post-multiplies this matrix by the matrix corresponding to the +---specified scale transformation and stores the result in dst. +--- +---\param xScale The amount to scale along the x-axis. +---\param yScale The amount to scale along the y-axis. +---\param zScale The amount to scale along the z-axis. +---\param dst A matrix to store the result in. +---@overload fun(self: cc.Mat4, xScale: number, yScale: number, zScale: number, dst: cc.Mat4) +--- +---Post-multiplies this matrix by the matrix corresponding to the +---specified scale transformation. +--- +---\param s The scale values along the x, y and z axes. +---@overload fun(self: cc.Mat4, s: cc.Vec3) +--- +---Post-multiplies this matrix by the matrix corresponding to the +---specified scale transformation and stores the result in dst. +--- +---\param s The scale values along the x, y and z axes. +---\param dst A matrix to store the result in. +---@overload fun(self: cc.Mat4, s: cc.Vec3, dst: cc.Mat4) +function Mat4:scale(value) end + +---Sets the values of this matrix. +--- +---@param m11 number # The first element of the first row. +---@param m12 number # The second element of the first row. +---@param m13 number # The third element of the first row. +---@param m14 number # The fourth element of the first row. +---@param m21 number # The first element of the second row. +---@param m22 number # The second element of the second row. +---@param m23 number # The third element of the second row. +---@param m24 number # The fourth element of the second row. +---@param m31 number # The first element of the third row. +---@param m32 number # The second element of the third row. +---@param m33 number # The third element of the third row. +---@param m34 number # The fourth element of the third row. +---@param m41 number # The first element of the fourth row. +---@param m42 number # The second element of the fourth row. +---@param m43 number # The third element of the fourth row. +---@param m44 number # The fourth element of the fourth row. +--- +---Sets the values of this matrix to those in the specified column-major array. +--- +---\param mat An array containing 16 elements in column-major format. +---@overload fun(self: cc.Mat4, mat: olua.float) +--- +---Sets the values of this matrix to those of the specified matrix. +--- +---\param mat The source matrix. +---@overload fun(self: cc.Mat4, mat: cc.Mat4) +function Mat4:set(m11, m12, m13, m14, m21, m22, m23, m24, m31, m32, m33, m34, m41, m42, m43, m44) end + +---Sets this matrix to the identity matrix. +function Mat4:setIdentity() end + +---Sets all elements of the current matrix to zero. +function Mat4:setZero() end + +---Subtracts the specified matrix from the current matrix. +--- +---@param mat cc.Mat4 # The matrix to subtract. +--- +---Subtracts the specified matrix from the current matrix. +--- +---\param m1 The first matrix. +---\param m2 The second matrix. +---\param dst A matrix to store the result in. +---@overload fun(m1: cc.Mat4, m2: cc.Mat4, dst: cc.Mat4) +function Mat4:subtract(mat) end + +---@param mat cc.Mat4 +---@param p cc.Vec4 +---@return cc.Vec4 +---@overload fun(mat: cc.Mat4, p: cc.Vec3): cc.Vec3 +---@overload fun(mat: cc.Mat4, p: cc.Vec2): cc.Vec2 +---@overload fun(mat: cc.Mat4, p: cc.Vec4): cc.Vec4 +---@overload fun(mat: cc.Mat4, p: cc.Vec3): cc.Vec3 +---@overload fun(mat: cc.Mat4, p: cc.Vec2): cc.Vec2 +function Mat4.transform(mat, p) end + +---Transforms the specified point by this matrix. +--- +---The result of the transformation is stored directly into point. +--- +---@param point cc.Vec3 # The point to transform and also a vector to hold the result in. +--- +---Transforms the specified point by this matrix, and stores +---the result in dst. +--- +---\param point The point to transform. +---\param dst A vector to store the transformed point in. +---@overload fun(self: cc.Mat4, point: cc.Vec3, dst: cc.Vec3) +function Mat4:transformPoint(point) end + +---Transforms the specified vector by this matrix by +---treating the fourth (w) coordinate as zero. +--- +---The result of the transformation is stored directly into vector. +--- +---@param vector cc.Vec3 # The vector to transform and also a vector to hold the result in. +--- +---Transforms the specified vector by this matrix by +---treating the fourth (w) coordinate as zero, and stores the +---result in dst. +--- +---\param vector The vector to transform. +---\param dst A vector to store the transformed vector in. +---@overload fun(self: cc.Mat4, vector: cc.Vec3, dst: cc.Vec3) +--- +---Transforms the specified vector by this matrix. +--- +---\param x The vector x-coordinate to transform by. +---\param y The vector y-coordinate to transform by. +---\param z The vector z-coordinate to transform by. +---\param w The vector w-coordinate to transform by. +---\param dst A vector to store the transformed point in. +---@overload fun(self: cc.Mat4, x: number, y: number, z: number, w: number, dst: cc.Vec3) +--- +---Transforms the specified vector by this matrix. +--- +---The result of the transformation is stored directly into vector. +--- +---\param vector The vector to transform. +---@overload fun(self: cc.Mat4, vector: cc.Vec4) +--- +---Transforms the specified vector by this matrix. +--- +---\param vector The vector to transform. +---\param dst A vector to store the transformed point in. +---@overload fun(self: cc.Mat4, vector: cc.Vec4, dst: cc.Vec4) +function Mat4:transformVector(vector) end + +---Post-multiplies this matrix by the matrix corresponding to the +---specified translation. +--- +---@param x number # The amount to translate along the x-axis. +---@param y number # The amount to translate along the y-axis. +---@param z number # The amount to translate along the z-axis. +--- +---Post-multiplies this matrix by the matrix corresponding to the +---specified translation and stores the result in dst. +--- +---\param x The amount to translate along the x-axis. +---\param y The amount to translate along the y-axis. +---\param z The amount to translate along the z-axis. +---\param dst A matrix to store the result in. +---@overload fun(self: cc.Mat4, x: number, y: number, z: number, dst: cc.Mat4) +--- +---Post-multiplies this matrix by the matrix corresponding to the +---specified translation. +--- +---\param t The translation values along the x, y and z axes. +---@overload fun(self: cc.Mat4, t: cc.Vec3) +--- +---Post-multiplies this matrix by the matrix corresponding to the +---specified translation and stores the result in dst. +--- +---\param t The translation values along the x, y and z axes. +---\param dst A matrix to store the result in. +---@overload fun(self: cc.Mat4, t: cc.Vec3, dst: cc.Mat4) +function Mat4:translate(x, y, z) end + +---Transposes this matrix. +function Mat4:transpose() end + +return Mat4 \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/Material.lua b/addons/cclua/cocos2d/library/cc/Material.lua new file mode 100644 index 00000000..bf406d95 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/Material.lua @@ -0,0 +1,94 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.Material + +---Material +---@class cc.Material : cc.Ref +---@field name string returns the material name +---@field renderState cc.RenderState +---@field technique cc.Technique Returns the Technique used by the Material +---@field techniqueCount integer Returns the number of Techniques in the Material. +---@field techniques any Returns the list of Techniques +local Material = {} + +---Adds a Technique into the Material +---@param technique cc.Technique +function Material:addTechnique(technique) end + +---returns a clone (deep-copy) of the material +---@return cc.Material +function Material:clone() end + +---Creates a Material using the data from the Properties object defined at the specified URL, +---where the URL is of the format ".#//.../" +---(and "#//.../" is optional). +--- +---\param url The URL pointing to the Properties object defining the material. +--- +---@return cc.Material # A new Material or NULL if there was an error. +---@param path string +function Material.createWithFilename(path) end + +---Creates a Material with a GLProgramState. +---It will only contain one Technique and one Pass. +---Added in order to support legacy code. +---@param programState ccb.ProgramState +---@return cc.Material +function Material.createWithProgramState(programState) end + +---Creates a material from the specified properties object. +--- +---@param materialProperties cc.Properties # The properties object defining the +---material (must have namespace equal to 'material'). +---@return cc.Material # A new Material. +function Material.createWithProperties(materialProperties) end + +---@param meshCommand cc.MeshCommand +---@param globalZOrder number +---@param vertexBuffer ccb.Buffer +---@param indexBuffer ccb.Buffer +---@param primitive any +---@param indexFormat any +---@param indexCount integer +---@param modelView cc.Mat4 +function Material:draw(meshCommand, globalZOrder, vertexBuffer, indexBuffer, primitive, indexFormat, indexCount, modelView) end + +---returns the material name +---@return string +function Material:getName() end + +---@return cc.RenderState +function Material:getRenderState() end + +---Returns the Technique used by the Material +---@return cc.Technique +function Material:getTechnique() end + +---Returns a Technique by index. +---returns `nullptr` if the index is invalid. +---@param index integer +---@return cc.Technique +function Material:getTechniqueByIndex(index) end + +---Returns a Technique by its name. +---returns `nullptr` if the Technique can't be found. +---@param name string +---@return cc.Technique +function Material:getTechniqueByName(name) end + +---Returns the number of Techniques in the Material. +---@return integer +function Material:getTechniqueCount() end + +---Returns the list of Techniques +---@return any +function Material:getTechniques() end + +---sets the material name +---@param name string +function Material:setName(name) end + +---Sets the current technique +---@param techniqueName string +function Material:setTechnique(techniqueName) end + +return Material \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/Mesh.lua b/addons/cclua/cocos2d/library/cc/Mesh.lua new file mode 100644 index 00000000..6ec5b838 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/Mesh.lua @@ -0,0 +1,190 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.Mesh + +---Mesh: contains ref to index buffer, GLProgramState, texture, skin, blend function, aabb and so on +---@class cc.Mesh : cc.Ref +---@field blendFunc cc.BlendFunc +---@field indexBuffer ccb.Buffer get index buffer

\lua NA +---@field indexCount integer get index count

\lua NA +---@field indexFormat any get index format

\lua NA +---@field material cc.Material Returns the Material being used by the Mesh +---@field meshVertexAttribCount integer get mesh vertex attribute count +---@field name string name getter +---@field primitiveType any get primitive type

\lua NA +---@field programState ccb.ProgramState get ProgramState

\lua NA +---@field skin cc.MeshSkin skin getter

\lua NA +---@field textureFileName string +---@field vertexBuffer ccb.Buffer get vertex buffer

\lua NA +---@field vertexSizeInBytes integer get per vertex size in bytes +---@field visible boolean +local Mesh = {} + +---calculate the AABB of the mesh +---\note the AABB is in the local space, not the world space +function Mesh:calculateAABB() end + +---create mesh from positions, normals, and so on, single SubMesh +---@param positions number[] +---@param normals number[] +---@param texs number[] +---@param indices integer[] +---@return cc.Mesh +--- +---\lua NA +---@overload fun(vertices: number[], perVertexSizeInFloat: integer, indices: integer[], attribs: cc.MeshVertexAttrib[]): cc.Mesh +function Mesh.create(positions, normals, texs, indices) end + +---@param renderer cc.Renderer +---@param globalZ number +---@param transform cc.Mat4 +---@param flags integer +---@param lightMask integer +---@param color cc.Vec4 +---@param forceDepthWrite boolean +function Mesh:draw(renderer, globalZ, transform, flags, lightMask, color, forceDepthWrite) end + +---@return cc.BlendFunc +function Mesh:getBlendFunc() end + +---get index buffer +--- +---\lua NA +---@return ccb.Buffer +function Mesh:getIndexBuffer() end + +---get index count +--- +---\lua NA +---@return integer +function Mesh:getIndexCount() end + +---get index format +--- +---\lua NA +---@return any +function Mesh:getIndexFormat() end + +---Returns the Material being used by the Mesh +---@return cc.Material +function Mesh:getMaterial() end + +---get mesh vertex attribute count +---@return integer +function Mesh:getMeshVertexAttribCount() end + +---get MeshVertexAttribute by index +---@param idx integer +---@return cc.MeshVertexAttrib +function Mesh:getMeshVertexAttribute(idx) end + +---name getter +---@return string +function Mesh:getName() end + +---get primitive type +--- +---\lua NA +---@return any +function Mesh:getPrimitiveType() end + +---get ProgramState +--- +---\lua NA +---@return ccb.ProgramState +function Mesh:getProgramState() end + +---skin getter +--- +---\lua NA +---@return cc.MeshSkin +function Mesh:getSkin() end + +---Get texture (diffuse), which is responsible for the main appearance. It is also means main texture, you can also call getTexture(NTextureData::Usage::Diffuse) +---@return cc.Texture2D # Texture used, return the texture of first mesh if multiple meshes exist +--- +---Get texture +---\param usage Usage of returned texture +---\return The texture of this usage, return the texture of first mesh if multiple meshes exist +---@overload fun(self: cc.Mesh, usage: cc.NTextureData.Usage): cc.Texture2D +function Mesh:getTexture() end + +---@return string +function Mesh:getTextureFileName() end + +---get vertex buffer +--- +---\lua NA +---@return ccb.Buffer +function Mesh:getVertexBuffer() end + +---get per vertex size in bytes +---@return integer +function Mesh:getVertexSizeInBytes() end + +---has vertex attribute? +--- +---\lua NA +---@param attrib cc.VertexKey +---@return boolean +function Mesh:hasVertexAttrib(attrib) end + +---@return boolean +function Mesh:isVisible() end + +---@return cc.Mesh +function Mesh.new() end + +---@param blendFunc cc.BlendFunc +function Mesh:setBlendFunc(blendFunc) end + +---force set this Sprite3D to 2D render queue +---@param force2D boolean +function Mesh:setForce2DQueue(force2D) end + +---Sets a new Material to the Mesh +---@param material cc.Material +function Mesh:setMaterial(material) end + +---name setter +---@param name string +function Mesh:setName(name) end + +---Sets a new ProgramState for the Mesh +---A new Material will be created for it +---@param programState ccb.ProgramState +function Mesh:setProgramState(programState) end + +---skin setter +---@param skin cc.MeshSkin +function Mesh:setSkin(skin) end + +---set texture (diffuse), which is responsible for the main appearance. It is also means main texture, you can also call setTexture(texPath, NTextureData::Usage::Diffuse) +---@param texPath string # texture path +--- +---set texture (diffuse), which is responsible for the main appearance. It is also means main texture, you can also call setTexture(texPath, NTextureData::Usage::Diffuse) +---\param tex texture to be set +---@overload fun(self: cc.Mesh, tex: cc.Texture2D) +--- +---set texture +---\param tex texture to be set +---\param usage Usage of this texture +---\param whether refresh the cache file name +---@overload fun(self: cc.Mesh, tex: cc.Texture2D, usage: cc.NTextureData.Usage, cacheFileName: boolean) +--- +---set texture +---\param tex texture to be set +---\param usage Usage of this texture +---\param whether refresh the cache file name +---@overload fun(self: cc.Mesh, tex: cc.Texture2D, usage: cc.NTextureData.Usage) +--- +---set texture +---\param texPath texture path +---\param usage Usage of this texture +---@overload fun(self: cc.Mesh, texPath: string, usage: cc.NTextureData.Usage) +function Mesh:setTexture(texPath) end + +---visible getter and setter +---@param visible boolean +function Mesh:setVisible(visible) end + +return Mesh \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/MeshCommand.lua b/addons/cclua/cocos2d/library/cc/MeshCommand.lua new file mode 100644 index 00000000..1fbf1886 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/MeshCommand.lua @@ -0,0 +1,16 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.MeshCommand + +--- +---@class cc.MeshCommand : cc.CustomCommand +local MeshCommand = {} + +---Init function. The render command will be in 2D mode. +---@param globalZOrder number # GlobalZOrder of the render command. +---@overload fun(self: cc.MeshCommand, globalZOrder: number, transform: cc.Mat4) +function MeshCommand:init(globalZOrder) end + +---@return cc.MeshCommand +function MeshCommand.new() end + +return MeshCommand \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/MeshSkin.lua b/addons/cclua/cocos2d/library/cc/MeshSkin.lua new file mode 100644 index 00000000..786074f1 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/MeshSkin.lua @@ -0,0 +1,65 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.MeshSkin + +---MeshSkin, A class maintain a collection of bones that affect Mesh vertex. +---And it is responsible for computing matrix palettes that used by skin mesh rendering. +---\js NA +---\lua NA +---@class cc.MeshSkin : cc.Ref +---@field boneCount integer get total bone count, skin bone + node bone +---@field matrixPalette cc.Vec4 compute matrix palette used by gpu skin +---@field matrixPaletteSize integer getSkinBoneCount() * 3 +---@field matrixPaletteSizeInBytes integer getSkinBoneCount() * 3 * sizeof(Vec4) +---@field rootBone cc.Bone3D get root bone of the skin +local MeshSkin = {} + +---add skin bone +---@param bone cc.Bone3D +function MeshSkin:addSkinBone(bone) end + +---get bone +---@param index integer +---@return cc.Bone3D +function MeshSkin:getBoneByIndex(index) end + +---@param id string +---@return cc.Bone3D +function MeshSkin:getBoneByName(id) end + +---get total bone count, skin bone + node bone +---@return integer +function MeshSkin:getBoneCount() end + +---get bone index +---@param bone cc.Bone3D +---@return integer +function MeshSkin:getBoneIndex(bone) end + +---get inverse bind pose +---@param bone cc.Bone3D +---@return cc.Mat4 +function MeshSkin:getInvBindPose(bone) end + +---compute matrix palette used by gpu skin +---@return cc.Vec4 +function MeshSkin:getMatrixPalette() end + +---getSkinBoneCount() * 3 +---@return integer +function MeshSkin:getMatrixPaletteSize() end + +---getSkinBoneCount() * 3 * sizeof(Vec4) +---@return integer +function MeshSkin:getMatrixPaletteSizeInBytes() end + +---get root bone of the skin +---@return cc.Bone3D +function MeshSkin:getRootBone() end + +---@return cc.MeshSkin +function MeshSkin.new() end + +---remove all bones +function MeshSkin:removeAllBones() end + +return MeshSkin \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/MeshVertexAttrib.lua b/addons/cclua/cocos2d/library/cc/MeshVertexAttrib.lua new file mode 100644 index 00000000..7aac52bc --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/MeshVertexAttrib.lua @@ -0,0 +1,22 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.MeshVertexAttrib + +---mesh vertex attribute +---\js NA +---\lua NA +---@class cc.MeshVertexAttrib +---@field attribSizeBytes integer +---@field type ccb.VertexFormat +---@field vertexAttrib cc.VertexKey +local MeshVertexAttrib = {} + +---@return any +function MeshVertexAttrib:__gc() end + +---@return any +function MeshVertexAttrib:__olua_move() end + +---@return integer +function MeshVertexAttrib:getAttribSizeBytes() end + +return MeshVertexAttrib \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/MotionStreak.lua b/addons/cclua/cocos2d/library/cc/MotionStreak.lua new file mode 100644 index 00000000..3beced33 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/MotionStreak.lua @@ -0,0 +1,107 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.MotionStreak + +---\class MotionStreak. +---Creates a trailing path. +---@class cc.MotionStreak : cc.Node +---@field blendFunc cc.BlendFunc \js NA \lua NA +---@field fastMode boolean When fast mode is enabled, new points are added faster but with lower precision.

\return True if fast mode is enabled. +---@field startingPositionInitialized boolean Is the starting position initialized or not.

\return True if the starting position is initialized. +---@field stroke number Get stroke.

\return float stroke. +---@field texture cc.Texture2D +local MotionStreak = {} + +---@param cls string +---@return any +function MotionStreak:as(cls) end + +---Creates and initializes a motion streak with fade in seconds, minimum segments, stroke's width, color, texture filename. +--- +---@param timeToFade number # The fade time, in seconds. +---@param minSeg number # The minimum segments. +---@param strokeWidth number # The width of stroke. +---@param strokeColor any # The color of stroke. +---@param imagePath string # The texture file name of stoke. +---@return cc.MotionStreak # An autoreleased MotionStreak object. +--- +---Creates and initializes a motion streak with fade in seconds, minimum segments, stroke's width, color, texture. +--- +---\param timeToFade The fade time, in seconds. +---\param minSeg The minimum segments. +---\param strokeWidth The width of stroke. +---\param strokeColor The color of stroke. +---\param texture The texture name of stoke. +---\return An autoreleased MotionStreak object. +---@overload fun(timeToFade: number, minSeg: number, strokeWidth: number, strokeColor: any, texture: cc.Texture2D): cc.MotionStreak +function MotionStreak.create(timeToFade, minSeg, strokeWidth, strokeColor, imagePath) end + +---\js NA +---\lua NA +---@return cc.BlendFunc +function MotionStreak:getBlendFunc() end + +---Get stroke. +--- +---@return number # float stroke. +function MotionStreak:getStroke() end + +---@return cc.Texture2D +function MotionStreak:getTexture() end + +---initializes a motion streak with fade in seconds, minimum segments, stroke's width, color and texture filename +---@param fade number +---@param minSeg number +---@param stroke number +---@param color any +---@param path string +---@return boolean +--- +---initializes a motion streak with fade in seconds, minimum segments, stroke's width, color and texture +---@overload fun(self: cc.MotionStreak, fade: number, minSeg: number, stroke: number, color: any, texture: cc.Texture2D): boolean +function MotionStreak:initWithFade(fade, minSeg, stroke, color, path) end + +---When fast mode is enabled, new points are added faster but with lower precision. +--- +---@return boolean # True if fast mode is enabled. +function MotionStreak:isFastMode() end + +---Is the starting position initialized or not. +--- +---@return boolean # True if the starting position is initialized. +function MotionStreak:isStartingPositionInitialized() end + +---@return cc.MotionStreak +function MotionStreak.new() end + +---Remove all living segments of the ribbon. +function MotionStreak:reset() end + +---\js NA +---\lua NA +---@param blendFunc cc.BlendFunc +function MotionStreak:setBlendFunc(blendFunc) end + +---Sets fast mode or not. +--- +---@param bFastMode boolean # True if enabled fast mode. +function MotionStreak:setFastMode(bFastMode) end + +---Sets the starting position initialized or not. +--- +---@param bStartingPositionInitialized boolean # True if initialized the starting position. +function MotionStreak:setStartingPositionInitialized(bStartingPositionInitialized) end + +---Set stroke. +--- +---@param stroke number # The width of stroke. +function MotionStreak:setStroke(stroke) end + +---@param texture cc.Texture2D +function MotionStreak:setTexture(texture) end + +---Color used for the tint. +--- +---@param colors any # The color used for the tint. +function MotionStreak:tintWithColor(colors) end + +return MotionStreak \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/MoveBy.lua b/addons/cclua/cocos2d/library/cc/MoveBy.lua new file mode 100644 index 00000000..ce343431 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/MoveBy.lua @@ -0,0 +1,35 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.MoveBy + +---\class MoveBy +---Moves a Node object x,y pixels by modifying it's position attribute. +---x and y are relative to the position of the object. +---Several MoveBy actions can be concurrently called, and the resulting +---movement will be the sum of individual movements. +---\since v2.1beta2-custom +---@class cc.MoveBy : cc.ActionInterval +local MoveBy = {} + +---Creates the action. +--- +---@param duration number # Duration time, in seconds. +---@param deltaPosition cc.Vec2 # The delta distance in 2d, it's a Vec2 type. +---@return cc.MoveBy # An autoreleased MoveBy object. +--- +---Creates the action. +--- +---\param duration Duration time, in seconds. +---\param deltaPosition The delta distance in 3d, it's a Vec3 type. +---\return An autoreleased MoveBy object. +---@overload fun(duration: number, deltaPosition: cc.Vec3): cc.MoveBy +---@overload fun(duration: number, deltaPosition: cc.Vec2): cc.MoveBy +--- +---Creates the action. +--- +---\param duration Duration time, in seconds. +---\param deltaPosition The delta distance in 3d, it's a Vec3 type. +---\return An autoreleased MoveBy object. +---@overload fun(duration: number, deltaPosition: cc.Vec3): cc.MoveBy +function MoveBy.create(duration, deltaPosition) end + +return MoveBy \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/MoveFrom.lua b/addons/cclua/cocos2d/library/cc/MoveFrom.lua new file mode 100644 index 00000000..c3c1a553 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/MoveFrom.lua @@ -0,0 +1,16 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.MoveFrom + +--- +---@class cc.MoveFrom : cc.MoveBy +local MoveFrom = {} + +---@param duration number +---@param position cc.Vec2 +---@return cc.MoveFrom +---@overload fun(duration: number, position: cc.Vec3): cc.MoveFrom +---@overload fun(duration: number, position: cc.Vec2): cc.MoveFrom +---@overload fun(duration: number, position: cc.Vec3): cc.MoveFrom +function MoveFrom.create(duration, position) end + +return MoveFrom \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/MoveTo.lua b/addons/cclua/cocos2d/library/cc/MoveTo.lua new file mode 100644 index 00000000..ca15a9ce --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/MoveTo.lua @@ -0,0 +1,31 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.MoveTo + +---\class MoveTo +---Moves a Node object to the position x,y. x and y are absolute coordinates by modifying it's position attribute. +---Several MoveTo actions can be concurrently called, and the resulting +---movement will be the sum of individual movements. +---\since v2.1beta2-custom +---@class cc.MoveTo : cc.MoveBy +local MoveTo = {} + +---Creates the action. +---@param duration number # Duration time, in seconds. +---@param position cc.Vec2 # The destination position in 2d. +---@return cc.MoveTo # An autoreleased MoveTo object. +--- +---Creates the action. +---\param duration Duration time, in seconds. +---\param position The destination position in 3d. +---\return An autoreleased MoveTo object. +---@overload fun(duration: number, position: cc.Vec3): cc.MoveTo +---@overload fun(duration: number, position: cc.Vec2): cc.MoveTo +--- +---Creates the action. +---\param duration Duration time, in seconds. +---\param position The destination position in 3d. +---\return An autoreleased MoveTo object. +---@overload fun(duration: number, position: cc.Vec3): cc.MoveTo +function MoveTo.create(duration, position) end + +return MoveTo \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/NTextureData.lua b/addons/cclua/cocos2d/library/cc/NTextureData.lua new file mode 100644 index 00000000..980034ed --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/NTextureData.lua @@ -0,0 +1,21 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.NTextureData + +---new material, since 3.3 +---\js NA +---\lua NA +---@class cc.NTextureData +---@field filename string +---@field id string +---@field type cc.NTextureData.Usage +---@field wrapS ccb.SamplerAddressMode +---@field wrapT ccb.SamplerAddressMode +local NTextureData = {} + +---@return any +function NTextureData:__gc() end + +---@return any +function NTextureData:__olua_move() end + +return NTextureData \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/NTextureData/Usage.lua b/addons/cclua/cocos2d/library/cc/NTextureData/Usage.lua new file mode 100644 index 00000000..a00c22b0 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/NTextureData/Usage.lua @@ -0,0 +1,23 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.NTextureData.Usage + +---@type cc.NTextureData.Usage +local VALUE + +--- +---@enum cc.NTextureData.Usage +local Usage = { + Ambient = 4, + Bump = 8, + Diffuse = 2, + Emissive = 3, + None = 1, + Normal = 7, + Reflection = 10, + Shininess = 6, + Specular = 5, + Transparency = 9, + Unknown = 0, +} + +return Usage \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/NavMesh.lua b/addons/cclua/cocos2d/library/cc/NavMesh.lua new file mode 100644 index 00000000..cabf4692 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/NavMesh.lua @@ -0,0 +1,57 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.NavMesh + +---NavMesh: The NavMesh information container, include mesh, tileCache, and so on. +---@class cc.NavMesh : cc.Ref +---@field debugDrawEnabled boolean Check enabled debug draw. +local NavMesh = {} + +---add a agent to navmesh. +---@param agent cc.NavMeshAgent +function NavMesh:addNavMeshAgent(agent) end + +---add a obstacle to navmesh. +---@param obstacle cc.NavMeshObstacle +function NavMesh:addNavMeshObstacle(obstacle) end + +---Create navmesh +---@param navFilePath string # The NavMesh File path. +---@param geomFilePath string # The geometry File Path,include offmesh information,etc. +---@return cc.NavMesh +function NavMesh.create(navFilePath, geomFilePath) end + +---Internal method, the updater of debug drawing, need called each frame. +---@param renderer cc.Renderer +function NavMesh:debugDraw(renderer) end + +---find a path on navmesh +---@param start cc.Vec3 # The start search position in world coordinate system. +---\param end The end search position in world coordinate system. +---@param pathPoints cc.Vec3[] # the key points of path. +---@param end_ cc.Vec3 +function NavMesh:findPath(start, end_, pathPoints) end + +---Check enabled debug draw. +---@return boolean +function NavMesh:isDebugDrawEnabled() end + +---@return cc.NavMesh +function NavMesh.new() end + +---remove a agent from navmesh. +---@param agent cc.NavMeshAgent +function NavMesh:removeNavMeshAgent(agent) end + +---remove a obstacle from navmesh. +---@param obstacle cc.NavMeshObstacle +function NavMesh:removeNavMeshObstacle(obstacle) end + +---Enable debug draw or disable. +---@param enable boolean +function NavMesh:setDebugDrawEnable(enable) end + +---update navmesh. +---@param dt number +function NavMesh:update(dt) end + +return NavMesh \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/NavMeshAgent.lua b/addons/cclua/cocos2d/library/cc/NavMeshAgent.lua new file mode 100644 index 00000000..ffaaf020 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/NavMeshAgent.lua @@ -0,0 +1,145 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.NavMeshAgent + +---NavMeshAgent: The code wrapping of dtCrowdAgent, use component mode. +---@class cc.NavMeshAgent : cc.Component +---@field currentOffMeshLinkData cc.OffMeshLinkData Get current OffMeshLink information +---@field currentVelocity cc.Vec3 get current velocity +---@field height number get agent height +---@field maxAcceleration number get maximal acceleration of agent +---@field maxSpeed number get maximal speed of agent +---@field navMeshAgentComponentName string +---@field obstacleAvoidanceType integer get obstacle avoidance type +---@field onOffMeshLink boolean Check agent arrived OffMeshLink +---@field radius number get agent radius +---@field separationWeight number get separation weight +---@field syncFlag cc.NavMeshAgent.NavMeshAgentSyncFlag +---@field userData any +---@field velocity cc.Vec3 get current velocity +local NavMeshAgent = {} + +---Traverse OffMeshLink manually +function NavMeshAgent:completeOffMeshLink() end + +---Create agent +---@param param cc.NavMeshAgentParam # The parameters of agent. +---@return cc.NavMeshAgent +function NavMeshAgent.create(param) end + +---Get current OffMeshLink information +---@return cc.OffMeshLinkData +function NavMeshAgent:getCurrentOffMeshLinkData() end + +---get current velocity +---@return cc.Vec3 +function NavMeshAgent:getCurrentVelocity() end + +---get agent height +---@return number +function NavMeshAgent:getHeight() end + +---get maximal acceleration of agent +---@return number +function NavMeshAgent:getMaxAcceleration() end + +---get maximal speed of agent +---@return number +function NavMeshAgent:getMaxSpeed() end + +---@return string +function NavMeshAgent.getNavMeshAgentComponentName() end + +---get obstacle avoidance type +---@return integer +function NavMeshAgent:getObstacleAvoidanceType() end + +---get agent radius +---@return number +function NavMeshAgent:getRadius() end + +---get separation weight +---@return number +function NavMeshAgent:getSeparationWeight() end + +---@return cc.NavMeshAgent.NavMeshAgentSyncFlag +function NavMeshAgent:getSyncFlag() end + +---@return any +function NavMeshAgent:getUserData() end + +---get current velocity +---@return cc.Vec3 +function NavMeshAgent:getVelocity() end + +---Check agent arrived OffMeshLink +---@return boolean +function NavMeshAgent:isOnOffMeshLink() end + +---Move agent to a destination +---@param destination cc.Vec3 # The position in world coordinate system. +---@param callback fun(arg1: cc.NavMeshAgent, arg2: number) # Use this function can catch movement state. +---@overload fun(self: cc.NavMeshAgent, destination: cc.Vec3) +function NavMeshAgent:move(destination, callback) end + +---@return cc.NavMeshAgent +function NavMeshAgent.new() end + +---pause movement +function NavMeshAgent:pause() end + +---resume movement +function NavMeshAgent:resume() end + +---Set automatic Orientation +---@param isAuto boolean +function NavMeshAgent:setAutoOrientation(isAuto) end + +---Set automatic Traverse OffMeshLink +---@param isAuto boolean +function NavMeshAgent:setAutoTraverseOffMeshLink(isAuto) end + +---set agent height +---@param height number +function NavMeshAgent:setHeight(height) end + +---set maximal acceleration of agent +---@param maxAcceleration number +function NavMeshAgent:setMaxAcceleration(maxAcceleration) end + +---set maximal speed of agent +---@param maxSpeed number +function NavMeshAgent:setMaxSpeed(maxSpeed) end + +---set obstacle avoidance type +---@param type integer +function NavMeshAgent:setObstacleAvoidanceType(type) end + +---Set the reference axes of agent's orientation +---@param rotRefAxes cc.Vec3 # The value of reference axes in local coordinate system. +function NavMeshAgent:setOrientationRefAxes(rotRefAxes) end + +---set agent radius +---@param radius number +function NavMeshAgent:setRadius(radius) end + +---set separation weight +---@param weight number +function NavMeshAgent:setSeparationWeight(weight) end + +---synchronization between node and agent is time consuming, you can skip some synchronization using this function +---@param flag cc.NavMeshAgent.NavMeshAgentSyncFlag +function NavMeshAgent:setSyncFlag(flag) end + +---@param data any +function NavMeshAgent:setUserData(data) end + +---stop movement +function NavMeshAgent:stop() end + +---synchronize parameter to agent. +function NavMeshAgent:syncToAgent() end + +---synchronize parameter to node. +function NavMeshAgent:syncToNode() end + +return NavMeshAgent \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/NavMeshAgent/NavMeshAgentSyncFlag.lua b/addons/cclua/cocos2d/library/cc/NavMeshAgent/NavMeshAgentSyncFlag.lua new file mode 100644 index 00000000..a46f8bbb --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/NavMeshAgent/NavMeshAgentSyncFlag.lua @@ -0,0 +1,16 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.NavMeshAgent.NavMeshAgentSyncFlag + +---@type cc.NavMeshAgent.NavMeshAgentSyncFlag +local VALUE + +--- +---@enum cc.NavMeshAgent.NavMeshAgentSyncFlag +local NavMeshAgentSyncFlag = { + AGENT_TO_NODE = 2, + NODE_AND_NODE = 3, + NODE_TO_AGENT = 1, + NONE = 0, +} + +return NavMeshAgentSyncFlag \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/NavMeshAgentParam.lua b/addons/cclua/cocos2d/library/cc/NavMeshAgentParam.lua new file mode 100644 index 00000000..8408aae2 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/NavMeshAgentParam.lua @@ -0,0 +1,28 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.NavMeshAgentParam + +---\addtogroup 3d +---\{ +---@class cc.NavMeshAgentParam +---@field collisionQueryRange number +---@field height number +---@field maxAcceleration number +---@field maxSpeed number +---@field obstacleAvoidanceType integer +---@field pathOptimizationRange number +---@field queryFilterType integer +---@field radius number +---@field separationWeight number +---@field updateFlags integer +local NavMeshAgentParam = {} + +---@return any +function NavMeshAgentParam:__gc() end + +---@return any +function NavMeshAgentParam:__olua_move() end + +---@return cc.NavMeshAgentParam +function NavMeshAgentParam.new() end + +return NavMeshAgentParam \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/NavMeshObstacle.lua b/addons/cclua/cocos2d/library/cc/NavMeshObstacle.lua new file mode 100644 index 00000000..fa500213 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/NavMeshObstacle.lua @@ -0,0 +1,58 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.NavMeshObstacle + +---NavMeshObstacle: The code wrapping of dtTileCacheObstacle, use component mode. +---@class cc.NavMeshObstacle : cc.Component +---@field height number Get height of obstacle +---@field navMeshObstacleComponentName string +---@field radius number Get radius of obstacle +---@field syncFlag cc.NavMeshObstacle.NavMeshObstacleSyncFlag +local NavMeshObstacle = {} + +---Create obstacle, shape is cylinder +---@param radius number # The radius of obstacle. +---@param height number # The height of obstacle. +---@return cc.NavMeshObstacle +function NavMeshObstacle.create(radius, height) end + +---Get height of obstacle +---@return number +function NavMeshObstacle:getHeight() end + +---@return string +function NavMeshObstacle.getNavMeshObstacleComponentName() end + +---Get radius of obstacle +---@return number +function NavMeshObstacle:getRadius() end + +---@return cc.NavMeshObstacle.NavMeshObstacleSyncFlag +function NavMeshObstacle:getSyncFlag() end + +---@param radius number +---@param height number +---@return boolean +function NavMeshObstacle:initWith(radius, height) end + +---@return cc.NavMeshObstacle +function NavMeshObstacle.new() end + +---Set height of obstacle +---@param height number +function NavMeshObstacle:setHeight(height) end + +---Set radius of obstacle +---@param radius number +function NavMeshObstacle:setRadius(radius) end + +---synchronization between node and obstacle is time consuming, you can skip some synchronization using this function +---@param flag cc.NavMeshObstacle.NavMeshObstacleSyncFlag +function NavMeshObstacle:setSyncFlag(flag) end + +---synchronize parameter to node. +function NavMeshObstacle:syncToNode() end + +---synchronize parameter to obstacle. +function NavMeshObstacle:syncToObstacle() end + +return NavMeshObstacle \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/NavMeshObstacle/NavMeshObstacleSyncFlag.lua b/addons/cclua/cocos2d/library/cc/NavMeshObstacle/NavMeshObstacleSyncFlag.lua new file mode 100644 index 00000000..b7b84ed2 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/NavMeshObstacle/NavMeshObstacleSyncFlag.lua @@ -0,0 +1,16 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.NavMeshObstacle.NavMeshObstacleSyncFlag + +---@type cc.NavMeshObstacle.NavMeshObstacleSyncFlag +local VALUE + +--- +---@enum cc.NavMeshObstacle.NavMeshObstacleSyncFlag +local NavMeshObstacleSyncFlag = { + NODE_AND_NODE = 3, + NODE_TO_OBSTACLE = 1, + NONE = 0, + OBSTACLE_TO_NODE = 2, +} + +return NavMeshObstacleSyncFlag \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/Node.lua b/addons/cclua/cocos2d/library/cc/Node.lua new file mode 100644 index 00000000..d3895387 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/Node.lua @@ -0,0 +1,1367 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.Node + +---\class Node +---Node is the base element of the Scene Graph. Elements of the Scene Graph must be Node objects or subclasses of it. +---The most common Node objects are: Scene, Layer, Sprite, Menu, Label. +---The main features of a Node are: +---- They can contain other Node objects (`addChild`, `getChildByTag`, `removeChild`, etc) +---- They can schedule periodic callback (`schedule`, `unschedule`, etc) +---- They can execute actions (`runAction`, `stopAction`, etc) +---Subclassing a Node usually means (one/all) of: +---- overriding init to initialize resources and schedule callbacks +---- create callbacks to handle the advancement of time +---- overriding `draw` to render the node +---Properties of Node: +---- position (default: x=0, y=0) +---- scale (default: x=1, y=1) +---- rotation (in degrees, clockwise) (default: 0) +---- anchor point (default: x=0, y=0) +---- contentSize (default: width=0, height=0) +---- visible (default: true) +---Limitations: +---- A Node is a "void" object. If you want to draw something on the screen, you should use a Sprite instead. Or subclass Node and override `draw`. +---@class cc.Node : cc.Ref +---@field actionManager cc.ActionManager Gets the ActionManager object that is used by all actions. \see setActionManager(ActionManager*) \return A ActionManager object. +---@field alpha number +---@field anchorPoint cc.Vec2 Returns the anchor point in percent.

\see `setAnchorPoint(const Vec2&)`

\return The anchor point of node. +---@field anchorPointInPoints cc.Vec2 Returns the anchorPoint in absolute pixels.

\warning You can only read it. If you wish to modify it, use anchorPoint instead. \see `getAnchorPoint()`

\return The anchor point in absolute pixels. +---@field anchorX number +---@field anchorY number +---@field attachedNodeCount integer Gets count of nodes those are attached to scene graph. +---@field boundingBox cc.Rect Returns an AABB (axis-aligned bounding-box) in its parent's coordinate system.

\return An AABB (axis-aligned bounding-box) in its parent's coordinate system +---@field cameraMask integer get & set camera mask, the node is visible by the camera whose camera flag & node's camera mask is true +---@field cascadeColorEnabled boolean Query whether cascadeColor is enabled or not. \return Whether cascadeColor is enabled or not. +---@field cascadeOpacityEnabled boolean Whether cascadeOpacity is enabled or not. \return A boolean value. +---@field children any Returns the array of the node's children.

\return the array the node's children. +---@field childrenCount integer Returns the amount of children.

\return The amount of children. +---@field color any Query node's color value. \return A Color3B color value. +---@field contentSize cc.Size Returns the untransformed size of the node.

\see `setContentSize(const Size&)`

\return The untransformed size of the node. +---@field description string Gets the description string. It makes debugging easier. \return A string \js NA \lua NA +---@field displayedColor any Query node's displayed color. \return A Color3B color value. +---@field displayedOpacity integer Return the node's display opacity. The difference between opacity and displayedOpacity is: The displayedOpacity is what's the final rendering opacity of node. \return A GLubyte value. +---@field eventDispatcher cc.EventDispatcher Get the event dispatcher of scene.

\return The event dispatcher of scene. +---@field globalZOrder number Returns the Node's Global Z Order.

\see `setGlobalZOrder(int)`

\return The node's global Z order +---@field height number +---@field ignoreAnchorPointForPosition boolean Gets whether the anchor point will be (0,0) when you position this node.

\see `setIgnoreAnchorPointForPosition(bool)`

\return true if the anchor point will be (0,0) when you position this node. +---@field localZOrder any Gets the local Z order of this node.

\see `setLocalZOrder(int)`

\return The local (relative to its siblings) Z order. +---@field name string Returns a string that is used to identify the node. \return A string that identifies the node.

\since v3.2 +---@field nodeToWorldAffineTransform cc.AffineTransform +---@field nodeToWorldTransform cc.Mat4 Returns the world affine transform matrix. The matrix is in Pixels.

\return transformation matrix, in pixels. +---@field normalizedPosition cc.Vec2 +---@field numberOfRunningActions integer Returns the numbers of actions that are running plus the ones that are schedule to run (actions in actionsToAdd and actions arrays).

Composable actions are counted as 1 action. Example: If you are running 1 Sequence of 7 actions, it will return 1. If you are running 7 Sequences of 2 actions, it will return 7.

\return The number of actions that are running plus the ones that are schedule to run. +---@field onEnterCallback fun() Get the callback of event onEnter. \return A std:function callback. +---@field onEnterTransitionDidFinishCallback fun() Get the callback of event EnterTransitionDidFinish. \return std::function +---@field onExitCallback fun() Get the callback of event onExit. \return A std::function. +---@field onExitTransitionDidStartCallback fun() Get the callback of event ExitTransitionDidStart. \return std::function +---@field opacity integer Return the node's opacity. \return A GLubyte value. +---@field opacityModifyRGB boolean If node opacity will modify the RGB color value, then you should override this method and return true. \return A boolean value, true indicates that opacity will modify color; false otherwise. +---@field parent cc.Node Returns a pointer to the parent node.

\see `setParent(Node*)`

\returns A pointer to the parent node. +---@field parentToNodeAffineTransform cc.AffineTransform +---@field parentToNodeTransform cc.Mat4 Returns the matrix that transform parent's space coordinates to the node's (local) space coordinates. The matrix is in Pixels.

\return The transformation matrix. +---@field physicsBody cc.PhysicsBody +---@field position3D cc.Vec3 Returns the position (X,Y,Z) in its parent's coordinate system.

\return The position (X, Y, and Z) in its parent's coordinate system. \js NA +---@field positionNormalized cc.Vec2 Returns the normalized position.

\return The normalized position. +---@field positionX number Gets the x coordinate of the node in its parent's coordinate system.

\return The x coordinate of the node. +---@field positionY number Gets the y coordinate of the node in its parent's coordinate system.

\return The y coordinate of the node. +---@field positionZ number Gets position Z coordinate of this node.

\see setPositionZ(float)

\return The position Z coordinate of this node. \js getVertexZ +---@field programState ccb.ProgramState +---@field rotation number Returns the rotation of the node in degrees.

\see `setRotation(float)`

\return The rotation of the node in degrees. +---@field rotation3D cc.Vec3 Returns the rotation (X,Y,Z) in degrees.

\return The rotation of the node in 3d. \js NA +---@field rotationQuat cc.Quaternion Return the rotation by quaternion, Note that when _rotationZ_X == _rotationZ_Y, the returned quaternion equals to RotationZ_X * RotationY * RotationX, it equals to RotationY * RotationX otherwise.

\return The rotation in quaternion. \js NA +---@field rotationSkewX number Gets the X rotation (angle) of the node in degrees which performs a horizontal rotation skew.

\see `setRotationSkewX(float)`

\return The X rotation in degrees. \js getRotationX +---@field rotationSkewY number Gets the Y rotation (angle) of the node in degrees which performs a vertical rotational skew.

\see `setRotationSkewY(float)`

\return The Y rotation in degrees. \js getRotationY +---@field running boolean Returns whether or not the node is "running".

If the node is running it will accept event callbacks like onEnter(), onExit(), update().

\return Whether or not the node is running. +---@field scale number Gets the scale factor of the node, when X and Y have the same scale factor.

\warning Assert when `_scaleX != _scaleY` \see setScale(float)

\return The scale factor of the node. +---@field scaleX number Returns the scale factor on X axis of this node

\see setScaleX(float)

\return The scale factor on X axis. +---@field scaleY number Returns the scale factor on Y axis of this node

\see `setScaleY(float)`

\return The scale factor on Y axis. +---@field scaleZ number Returns the scale factor on Z axis of this node

\see `setScaleZ(float)`

\return The scale factor on Z axis. +---@field scene cc.Scene Returns the Scene that contains the Node. It returns `nullptr` if the node doesn't belong to any Scene. This function recursively calls parent->getScene() until parent is a Scene object. The results are not cached. It is that the user caches the results in case this functions is being used inside a loop.

\return The Scene that contains the node. +---@field scheduler cc.Scheduler Gets a Scheduler object.

\see setScheduler(Scheduler*) \return A Scheduler object. +---@field skewX number Returns the X skew angle of the node in degrees.

\see `setSkewX(float)`

\return The X skew angle of the node in degrees. +---@field skewY number Returns the Y skew angle of the node in degrees.

\see `setSkewY(float)`

\return The Y skew angle of the node in degrees. +---@field tag integer Returns a tag that is used to identify the node easily.

\return An integer that identifies the node.

Please use `getTag()` instead. +---@field userData any Returns a custom user data pointer.

You can set everything in UserData pointer, a data block, a structure or an object.

\return A custom user data pointer. \lua NA +---@field userObject cc.Ref Returns a user assigned Object.

Similar to userData, but instead of holding a void* it holds an object.

\return A user assigned Object. \lua NA +---@field visible boolean Determines if the node is visible.

\see `setVisible(bool)`

\return true if the node is visible, false if the node is hidden. +---@field width number +---@field worldToNodeAffineTransform cc.AffineTransform +---@field worldToNodeTransform cc.Mat4 Returns the inverse world affine transform matrix. The matrix is in Pixels.

\return The transformation matrix. +---@field x number Gets the x coordinate of the node in its parent's coordinate system.

\return The x coordinate of the node. +---@field y number Gets the y coordinate of the node in its parent's coordinate system.

\return The y coordinate of the node. +---@field z number Gets position Z coordinate of this node.

\see setPositionZ(float)

\return The position Z coordinate of this node. \js getVertexZ +---@field INVALID_TAG integer +local Node = {} + +---@return any +function Node.__index() end + +---Adds a child to the container with z-order as 0. +--- +---If the child is added to a 'running' node, then 'onEnter' and 'onEnterTransitionDidFinish' will be called immediately. +--- +---@param child cc.Node # A child node. +--- +---Adds a child to the container with a local z-order. +--- +---If the child is added to a 'running' node, then 'onEnter' and 'onEnterTransitionDidFinish' will be called immediately. +--- +---\param child A child node. +---\param localZOrder Z order for drawing priority. Please refer to `setLocalZOrder(int)`. +---@overload fun(self: cc.Node, child: cc.Node, localZOrder: integer) +--- +---Adds a child to the container with z order and tag. +--- +---If the child is added to a 'running' node, then 'onEnter' and 'onEnterTransitionDidFinish' will be called immediately. +--- +---\param child A child node. +---\param localZOrder Z order for drawing priority. Please refer to `setLocalZOrder(int)`. +---\param tag An integer to identify the node easily. Please refer to `setTag(int)`. +--- +---Please use `addChild(Node* child, int localZOrder, const std::string &name)` instead. +---@overload fun(self: cc.Node, child: cc.Node, localZOrder: integer, tag: integer) +--- +---Adds a child to the container with z order and tag +--- +---If the child is added to a 'running' node, then 'onEnter' and 'onEnterTransitionDidFinish' will be called immediately. +--- +---\param child A child node. +---\param localZOrder Z order for drawing priority. Please refer to `setLocalZOrder(int)`. +---\param name A string to identify the node easily. Please refer to `setName(int)`. +---@overload fun(self: cc.Node, child: cc.Node, localZOrder: integer, name: string) +function Node:addChild(child) end + +---Adds a component. +--- +---@param component cc.Component # A given component. +---@return boolean # True if added success. +function Node:addComponent(component) end + +---Stops all running actions and schedulers +function Node:cleanup() end + +---Converts a Vec2 to node (local) space coordinates. The result is in Points. +--- +---@param worldPoint cc.Vec2 # A given coordinate. +---@return cc.Vec2 # A point in node (local) space coordinates. +---@overload fun(self: cc.Node, worldPoint: cc.Vec2): cc.Vec2 +function Node:convertToNodeSpace(worldPoint) end + +---Converts a Vec2 to node (local) space coordinates. The result is in Points. +---treating the returned/received node point as anchor relative. +--- +---@param worldPoint cc.Vec2 # A given coordinate. +---@return cc.Vec2 # A point in node (local) space coordinates, anchor relative. +---@overload fun(self: cc.Node, worldPoint: cc.Vec2): cc.Vec2 +function Node:convertToNodeSpaceAR(worldPoint) end + +---Converts a Vec2 to world space coordinates. The result is in Points. +--- +---@param nodePoint cc.Vec2 # A given coordinate. +---@return cc.Vec2 # A point in world space coordinates. +---@overload fun(self: cc.Node, nodePoint: cc.Vec2): cc.Vec2 +function Node:convertToWorldSpace(nodePoint) end + +---Converts a local Vec2 to world space coordinates.The result is in Points. +---treating the returned/received node point as anchor relative. +--- +---@param nodePoint cc.Vec2 # A given coordinate. +---@return cc.Vec2 # A point in world space coordinates, anchor relative. +---@overload fun(self: cc.Node, nodePoint: cc.Vec2): cc.Vec2 +function Node:convertToWorldSpaceAR(nodePoint) end + +---convenience methods which take a Touch instead of Vec2. +--- +---@param touch cc.Touch # A given touch. +---@return cc.Vec2 # A point in world space coordinates. +function Node:convertTouchToNodeSpace(touch) end + +---converts a Touch (world coordinates) into a local coordinate. This method is AR (Anchor Relative). +--- +---@param touch cc.Touch # A given touch. +---@return cc.Vec2 # A point in world space coordinates, anchor relative. +function Node:convertTouchToNodeSpaceAR(touch) end + +---Allocates and initializes a node. +---@return cc.Node # A initialized node which is marked as "autorelease". +function Node.create() end + +---Override this method to draw your own node. +---The following GL states will be enabled by default: +---- `glEnableClientState(GL_VERTEX_ARRAY);` +---- `glEnableClientState(GL_COLOR_ARRAY);` +---- `glEnableClientState(GL_TEXTURE_COORD_ARRAY);` +---- `glEnable(GL_TEXTURE_2D);` +---AND YOU SHOULD NOT DISABLE THEM AFTER DRAWING YOUR NODE +---But if you enable any other GL state, you should disable it after drawing your node. +--- +---@param renderer cc.Renderer # A given renderer. +---@param transform cc.Mat4 # A transform matrix. +---@param flags integer # Renderer flag. +---@overload fun(self: cc.Node) +function Node:draw(renderer, transform, flags) end + +---Search the children of the receiving node to perform processing for nodes which share a name. +--- +---@param name string # The name to search for, supports c++11 regular expression. +---Search syntax options: +---`//`: Can only be placed at the begin of the search string. This indicates that it will search recursively. +---`/..`: The search should move up to the node's parent. Can only be placed at the end of string. +---`/` : When placed anywhere but the start of the search string, this indicates that the search should move to the node's children. +--- +---\code +---enumerateChildren("//MyName", ...): This searches the children recursively and matches any node with the name `MyName`. +---enumerateChildren("[[:alnum:]]+", ...): This search string matches every node of its children. +---enumerateChildren("A[[:digit:]]", ...): This searches the node's children and returns any child named `A0`, `A1`, ..., `A9`. +---enumerateChildren("Abby/Normal", ...): This searches the node's grandchildren and returns any node whose name is `Normal` +---and whose parent is named `Abby`. +---enumerateChildren("//Abby/Normal", ...): This searches recursively and returns any node whose name is `Normal` and whose +---parent is named `Abby`. +---\endcode +--- +---\warning Only support alpha or number for name, and not support unicode. +--- +---@param callback fun(arg1: cc.Node): boolean # A callback function to execute on nodes that match the `name` parameter. The function takes the following arguments: +---`node` +---A node that matches the name +---And returns a boolean result. Your callback can return `true` to terminate the enumeration. +--- +---\since v3.2 +function Node:enumerateChildren(name, callback) end + +---Gets an action from the running action list by its tag. +--- +---\see `setTag(int)`, `getTag()`. +--- +---@return cc.Action # The action object with the given tag. +---@param tag integer +function Node:getActionByTag(tag) end + +---Gets the ActionManager object that is used by all actions. +---\see setActionManager(ActionManager*) +---@return cc.ActionManager # A ActionManager object. +function Node:getActionManager() end + +---@param obj cc.Node +---@return number +function Node.getAlpha(obj) end + +---Returns the anchor point in percent. +--- +---\see `setAnchorPoint(const Vec2&)` +--- +---@return cc.Vec2 # The anchor point of node. +function Node:getAnchorPoint() end + +---Returns the anchorPoint in absolute pixels. +--- +---\warning You can only read it. If you wish to modify it, use anchorPoint instead. +---\see `getAnchorPoint()` +--- +---@return cc.Vec2 # The anchor point in absolute pixels. +function Node:getAnchorPointInPoints() end + +---@param obj cc.Node +---@return number +function Node.getAnchorX(obj) end + +---@param obj cc.Node +---@return number +function Node.getAnchorY(obj) end + +---Gets count of nodes those are attached to scene graph. +---@return integer +function Node.getAttachedNodeCount() end + +---Returns an AABB (axis-aligned bounding-box) in its parent's coordinate system. +--- +---@return cc.Rect # An AABB (axis-aligned bounding-box) in its parent's coordinate system +function Node:getBoundingBox() end + +---@param obj cc.Node +---@param target cc.Node +---@param left number +---@param right number +---@param top number +---@param bottom number +---@return cc.Bounds +function Node.getBounds(obj, target, left, right, top, bottom) end + +---get & set camera mask, the node is visible by the camera whose camera flag & node's camera mask is true +---@return integer +function Node:getCameraMask() end + +---Gets a child from the container with its name. +--- +---@param name string # An identifier to find the child node. +--- +---@return cc.Node # a Node object whose name equals to the input parameter. +--- +---\since v3.2 +function Node:getChildByName(name) end + +---Gets a child from the container with its tag. +--- +---@param tag integer # An identifier to find the child node. +--- +---@return cc.Node # a Node object whose tag equals to the input parameter. +--- +---Please use `getChildByName()` instead. +function Node:getChildByTag(tag) end + +---Returns the array of the node's children. +--- +---@return any # the array the node's children. +function Node:getChildren() end + +---Returns the amount of children. +--- +---@return integer # The amount of children. +function Node:getChildrenCount() end + +---Query node's color value. +---@return any # A Color3B color value. +function Node:getColor() end + +---\{ +---\name component functions +--- +---Gets a component by its name. +--- +---@param name string # A given name of component. +---@return cc.Component # The Component by name. +function Node:getComponent(name) end + +---Returns the untransformed size of the node. +--- +---\see `setContentSize(const Size&)` +--- +---@return cc.Size # The untransformed size of the node. +function Node:getContentSize() end + +---Gets the description string. It makes debugging easier. +---@return string # A string +---\js NA +---\lua NA +function Node:getDescription() end + +---Query node's displayed color. +---@return any # A Color3B color value. +function Node:getDisplayedColor() end + +---Return the node's display opacity. +---The difference between opacity and displayedOpacity is: +---The displayedOpacity is what's the final rendering opacity of node. +---@return integer # A GLubyte value. +function Node:getDisplayedOpacity() end + +---Get the event dispatcher of scene. +--- +---@return cc.EventDispatcher # The event dispatcher of scene. +function Node:getEventDispatcher() end + +---Returns the Node's Global Z Order. +--- +---\see `setGlobalZOrder(int)` +--- +---@return number # The node's global Z order +function Node:getGlobalZOrder() end + +---@param obj cc.Node +---@return number +function Node.getHeight(obj) end + +---Gets the local Z order of this node. +--- +---\see `setLocalZOrder(int)` +--- +---@return any # The local (relative to its siblings) Z order. +function Node:getLocalZOrder() end + +---Returns a string that is used to identify the node. +---@return string # A string that identifies the node. +--- +---\since v3.2 +function Node:getName() end + +---@return cc.AffineTransform +--- +---Returns the affine transform matrix that transform the node's (local) space coordinates into the parent's space coordinates. +---The matrix is in Pixels. +--- +---Note: If ancestor is not a valid ancestor of the node, the API would return the same value as @see getNodeToWorldAffineTransform +--- +---\param ancestor The parent's node pointer. +---\since v3.7 +---\return The affine transformation matrix. +---@overload fun(self: cc.Node, ancestor: cc.Node): cc.AffineTransform +function Node:getNodeToParentAffineTransform() end + +---Returns the matrix that transform the node's (local) space coordinates into the parent's space coordinates. +---The matrix is in Pixels. +--- +---@return cc.Mat4 # The transformation matrix. +--- +---Returns the matrix that transform the node's (local) space coordinates into the parent's space coordinates. +---The matrix is in Pixels. +---Note: If ancestor is not a valid ancestor of the node, the API would return the same value as @see getNodeToWorldTransform +--- +---\param ancestor The parent's node pointer. +---\since v3.7 +---\return The transformation matrix. +---@overload fun(self: cc.Node, ancestor: cc.Node): cc.Mat4 +function Node:getNodeToParentTransform() end + +---@return cc.AffineTransform +function Node:getNodeToWorldAffineTransform() end + +---Returns the world affine transform matrix. The matrix is in Pixels. +--- +---@return cc.Mat4 # transformation matrix, in pixels. +function Node:getNodeToWorldTransform() end + +---@return cc.Vec2 +function Node:getNormalizedPosition() end + +---Returns the numbers of actions that are running plus the ones that are schedule to run (actions in actionsToAdd and actions arrays). +--- +---Composable actions are counted as 1 action. Example: +---If you are running 1 Sequence of 7 actions, it will return 1. +---If you are running 7 Sequences of 2 actions, it will return 7. +--- +---@return integer # The number of actions that are running plus the ones that are schedule to run. +function Node:getNumberOfRunningActions() end + +---Returns the numbers of actions that are running plus the ones that are +---schedule to run (actions in actionsToAdd and actions arrays) with a +---specific tag. +--- +---Composable actions are counted as 1 action. Example: +---If you are running 1 Sequence of 7 actions, it will return 1. +---If you are running 7 Sequences of 2 actions, it will return 7. +--- +---@param tag integer # The tag that will be searched. +--- +---@return integer # The number of actions that are running plus the +---ones that are schedule to run with specific tag. +function Node:getNumberOfRunningActionsByTag(tag) end + +---Get the callback of event onEnter. +---@return fun() # A std:function callback. +function Node:getOnEnterCallback() end + +---Get the callback of event EnterTransitionDidFinish. +---@return fun() # std::function +function Node:getOnEnterTransitionDidFinishCallback() end + +---Get the callback of event onExit. +---@return fun() # A std::function. +function Node:getOnExitCallback() end + +---Get the callback of event ExitTransitionDidStart. +---@return fun() # std::function +function Node:getOnExitTransitionDidStartCallback() end + +---Return the node's opacity. +---@return integer # A GLubyte value. +function Node:getOpacity() end + +---Returns a pointer to the parent node. +--- +---\see `setParent(Node*)` +--- +---@return cc.Node # s A pointer to the parent node. +function Node:getParent() end + +---@return cc.AffineTransform +function Node:getParentToNodeAffineTransform() end + +---Returns the matrix that transform parent's space coordinates to the node's (local) space coordinates. +---The matrix is in Pixels. +--- +---@return cc.Mat4 # The transformation matrix. +function Node:getParentToNodeTransform() end + +---@return cc.PhysicsBody +function Node:getPhysicsBody() end + +---Gets the position (x,y) of the node in its parent's coordinate system. +--- +---\see setPosition(const Vec2&) +--- +---@return cc.Vec2 # The position (x,y) of the node in OpenGL coordinates. +---\code +---In js and lua return value is table which contains x,y. +---\endcode +--- +---Gets position in a more efficient way, returns two number instead of a Vec2 object. +--- +---\see `setPosition(float, float)` +---In js,out value not return. +--- +---\param x To receive x coordinate for position. +---\param y To receive y coordinate for position. +---@overload fun(self: cc.Node, x: olua.float, y: olua.float) +function Node:getPosition() end + +---Returns the position (X,Y,Z) in its parent's coordinate system. +--- +---@return cc.Vec3 # The position (X, Y, and Z) in its parent's coordinate system. +---\js NA +function Node:getPosition3D() end + +---Returns the normalized position. +--- +---@return cc.Vec2 # The normalized position. +function Node:getPositionNormalized() end + +---Gets the x coordinate of the node in its parent's coordinate system. +--- +---@return number # The x coordinate of the node. +function Node:getPositionX() end + +---Gets the y coordinate of the node in its parent's coordinate system. +--- +---@return number # The y coordinate of the node. +function Node:getPositionY() end + +---Gets position Z coordinate of this node. +--- +---\see setPositionZ(float) +--- +---@return number # The position Z coordinate of this node. +---\js getVertexZ +function Node:getPositionZ() end + +---@return ccb.ProgramState +function Node:getProgramState() end + +---Returns the rotation of the node in degrees. +--- +---\see `setRotation(float)` +--- +---@return number # The rotation of the node in degrees. +function Node:getRotation() end + +---Returns the rotation (X,Y,Z) in degrees. +--- +---@return cc.Vec3 # The rotation of the node in 3d. +---\js NA +function Node:getRotation3D() end + +---Return the rotation by quaternion, Note that when _rotationZ_X == _rotationZ_Y, the returned quaternion equals to RotationZ_X * RotationY * RotationX, +---it equals to RotationY * RotationX otherwise. +--- +---@return cc.Quaternion # The rotation in quaternion. +---\js NA +function Node:getRotationQuat() end + +---Gets the X rotation (angle) of the node in degrees which performs a horizontal rotation skew. +--- +---\see `setRotationSkewX(float)` +--- +---@return number # The X rotation in degrees. +---\js getRotationX +function Node:getRotationSkewX() end + +---Gets the Y rotation (angle) of the node in degrees which performs a vertical rotational skew. +--- +---\see `setRotationSkewY(float)` +--- +---@return number # The Y rotation in degrees. +---\js getRotationY +function Node:getRotationSkewY() end + +---Gets the scale factor of the node, when X and Y have the same scale factor. +--- +---\warning Assert when `_scaleX != _scaleY` +---\see setScale(float) +--- +---@return number # The scale factor of the node. +function Node:getScale() end + +---Returns the scale factor on X axis of this node +--- +---\see setScaleX(float) +--- +---@return number # The scale factor on X axis. +function Node:getScaleX() end + +---Returns the scale factor on Y axis of this node +--- +---\see `setScaleY(float)` +--- +---@return number # The scale factor on Y axis. +function Node:getScaleY() end + +---Returns the scale factor on Z axis of this node +--- +---\see `setScaleZ(float)` +--- +---@return number # The scale factor on Z axis. +function Node:getScaleZ() end + +---Returns the Scene that contains the Node. +---It returns `nullptr` if the node doesn't belong to any Scene. +---This function recursively calls parent->getScene() until parent is a Scene object. The results are not cached. It is that the user caches the results in case this functions is being used inside a loop. +--- +---@return cc.Scene # The Scene that contains the node. +function Node:getScene() end + +---Gets a Scheduler object. +--- +---\see setScheduler(Scheduler*) +---@return cc.Scheduler # A Scheduler object. +function Node:getScheduler() end + +---Returns the X skew angle of the node in degrees. +--- +---\see `setSkewX(float)` +--- +---@return number # The X skew angle of the node in degrees. +function Node:getSkewX() end + +---Returns the Y skew angle of the node in degrees. +--- +---\see `setSkewY(float)` +--- +---@return number # The Y skew angle of the node in degrees. +function Node:getSkewY() end + +---Returns a tag that is used to identify the node easily. +--- +---@return integer # An integer that identifies the node. +--- +---Please use `getTag()` instead. +function Node:getTag() end + +---Returns a custom user data pointer. +--- +---You can set everything in UserData pointer, a data block, a structure or an object. +--- +---@return any # A custom user data pointer. +---\lua NA +function Node:getUserData() end + +---Returns a user assigned Object. +--- +---Similar to userData, but instead of holding a void* it holds an object. +--- +---@return cc.Ref # A user assigned Object. +---\lua NA +function Node:getUserObject() end + +---@param obj cc.Node +---@return number +function Node.getWidth(obj) end + +---@return cc.AffineTransform +function Node:getWorldToNodeAffineTransform() end + +---Returns the inverse world affine transform matrix. The matrix is in Pixels. +--- +---@return cc.Mat4 # The transformation matrix. +function Node:getWorldToNodeTransform() end + +---@return boolean +function Node:init() end + +---Query whether cascadeColor is enabled or not. +---@return boolean # Whether cascadeColor is enabled or not. +function Node:isCascadeColorEnabled() end + +---Whether cascadeOpacity is enabled or not. +---@return boolean # A boolean value. +function Node:isCascadeOpacityEnabled() end + +---Gets whether the anchor point will be (0,0) when you position this node. +--- +---\see `setIgnoreAnchorPointForPosition(bool)` +--- +---@return boolean # true if the anchor point will be (0,0) when you position this node. +function Node:isIgnoreAnchorPointForPosition() end + +---If node opacity will modify the RGB color value, then you should override this method and return true. +---@return boolean # A boolean value, true indicates that opacity will modify color; false otherwise. +function Node:isOpacityModifyRGB() end + +---Returns whether or not the node is "running". +--- +---If the node is running it will accept event callbacks like onEnter(), onExit(), update(). +--- +---@return boolean # Whether or not the node is running. +function Node:isRunning() end + +---Checks whether a lambda function is scheduled. +--- +---@param key string # key of the callback +---@return boolean # Whether the lambda function selector is scheduled. +---\js NA +---\lua NA +function Node:isScheduled(key) end + +---Determines if the node is visible. +--- +---\see `setVisible(bool)` +--- +---@return boolean # true if the node is visible, false if the node is hidden. +function Node:isVisible() end + +---@return cc.Node +function Node.new() end + +---Event callback that is invoked every time when Node enters the 'stage'. +---If the Node enters the 'stage' with a transition, this event is called when the transition starts. +---During onEnter you can't access a "sister/brother" node. +---If you override onEnter, you shall call its parent's one, e.g., Node::onEnter(). +---\lua NA +function Node:onEnter() end + +---Event callback that is invoked when the Node enters in the 'stage'. +---If the Node enters the 'stage' with a transition, this event is called when the transition finishes. +---If you override onEnterTransitionDidFinish, you shall call its parent's one, e.g. Node::onEnterTransitionDidFinish() +---\lua NA +function Node:onEnterTransitionDidFinish() end + +---Event callback that is invoked every time the Node leaves the 'stage'. +---If the Node leaves the 'stage' with a transition, this event is called when the transition finishes. +---During onExit you can't access a sibling node. +---If you override onExit, you shall call its parent's one, e.g., Node::onExit(). +---\lua NA +function Node:onExit() end + +---Event callback that is called every time the Node leaves the 'stage'. +---If the Node leaves the 'stage' with a transition, this callback is called when the transition starts. +---\lua NA +function Node:onExitTransitionDidStart() end + +---Pauses all scheduled selectors, actions and event listeners. +---This method is called internally by onExit. +function Node:pause() end + +---Removes all children from the container with a cleanup. +--- +---\see `removeAllChildrenWithCleanup(bool)` +function Node:removeAllChildren() end + +---Removes all children from the container, and do a cleanup to all running actions depending on the cleanup parameter. +--- +---@param cleanup boolean # True if all running actions on all children nodes should be cleanup, false otherwise. +---\js removeAllChildren +---\lua removeAllChildren +function Node:removeAllChildrenWithCleanup(cleanup) end + +---Removes all components +function Node:removeAllComponents() end + +---Removes a child from the container. It will also cleanup all running actions depending on the cleanup parameter. +--- +---@param child cc.Node # The child node which will be removed. +---@param cleanup boolean # True if all running actions and callbacks on the child node will be cleanup, false otherwise. +---@overload fun(self: cc.Node, child: cc.Node) +function Node:removeChild(child, cleanup) end + +---Removes a child from the container by tag value. It will also cleanup all running actions depending on the cleanup parameter. +--- +---@param name string # A string that identifies a child node. +---@param cleanup boolean # True if all running actions and callbacks on the child node will be cleanup, false otherwise. +---@overload fun(self: cc.Node, name: string) +function Node:removeChildByName(name, cleanup) end + +---Removes a child from the container by tag value. It will also cleanup all running actions depending on the cleanup parameter. +--- +---@param tag integer # An integer number that identifies a child node. +---@param cleanup boolean # True if all running actions and callbacks on the child node will be cleanup, false otherwise. +--- +---Please use `removeChildByName` instead. +---@overload fun(self: cc.Node, tag: integer) +function Node:removeChildByTag(tag, cleanup) end + +---Removes a component by its name. +--- +---@param name string # A given name of component. +---@return boolean # True if removed success. +--- +---Removes a component by its pointer. +--- +---\param component A given component. +---\return True if removed success. +---@overload fun(self: cc.Node, component: cc.Component): boolean +function Node:removeComponent(name) end + +---Removes this node itself from its parent node with a cleanup. +---If the node orphan, then nothing happens. +---\see `removeFromParentAndCleanup(bool)` +function Node:removeFromParent() end + +---Removes this node itself from its parent node. +---If the node orphan, then nothing happens. +---@param cleanup boolean # true if all actions and callbacks on this node should be removed, false otherwise. +---\js removeFromParent +---\lua removeFromParent +function Node:removeFromParentAndCleanup(cleanup) end + +---Reorders a child according to a new z value. +--- +---@param child cc.Node # An already added child node. It MUST be already added. +---@param localZOrder integer # Z order for drawing priority. Please refer to setLocalZOrder(int). +function Node:reorderChild(child, localZOrder) end + +---Resumes all scheduled selectors, actions and event listeners. +---This method is called internally by onEnter. +function Node:resume() end + +---Executes an action, and returns the action that is executed. +--- +---This node becomes the action's target. Refer to Action::getTarget(). +---\warning Actions don't retain their target. +--- +---@param action cc.Action # An Action pointer. +---@return cc.Action +function Node:runAction(action) end + +---Schedules a lambda function. The scheduled lambda function will be called every frame. +--- +---@param callback fun(arg1: number) # The lambda function to be scheduled. +---@param key string # The key of the lambda function. To be used if you want to unschedule it. +---\lua NA +--- +---Schedules a lambda function. The scheduled lambda function will be called every "interval" seconds +--- +---\param callback The lambda function to be scheduled +---\param interval Callback interval time in seconds. 0 means every frame, +---\param key The key of the lambda function. To be used if you want to unschedule it +---\lua NA +---@overload fun(self: cc.Node, callback: fun(arg1: number), interval: number, key: string) +--- +---Schedules a lambda function. +--- +---\param callback The lambda function to be schedule. +---\param interval Tick interval in seconds. 0 means tick every frame. +---\param repeat The selector will be executed (repeat + 1) times, you can use CC_REPEAT_FOREVER for tick infinitely. +---\param delay The amount of time that the first tick will wait before execution. +---\param key The key of the lambda function. To be used if you want to unschedule it. +---\lua NA +---@overload fun(self: cc.Node, callback: fun(arg1: number), interval: number, repeat_: integer, delay: number, key: string) +function Node:schedule(callback, key) end + +---Schedules a lambda function that runs only once, with a delay of 0 or larger +--- +---@param callback fun(arg1: number) # The lambda function to be scheduled. +---@param delay number # The amount of time that the first tick will wait before execution. +---@param key string # The key of the lambda function. To be used if you want to unschedule it. +---\lua NA +function Node:scheduleOnce(callback, delay, key) end + +---Schedules the "update" method. +--- +---It will use the order number 0. This method will be called every frame. +---Scheduled methods with a lower order value will be called before the ones that have a higher order value. +---Only one "update" method could be scheduled per node. +---\lua NA +function Node:scheduleUpdate() end + +---Schedules the "update" method with a custom priority. +--- +---This selector will be called every frame. +---Scheduled methods with a lower priority will be called before the ones that have a higher value. +---Only one "update" selector could be scheduled per node (You can't have 2 'update' selectors). +---\lua NA +--- +---@param priority integer # A given priority value. +function Node:scheduleUpdateWithPriority(priority) end + +---Sets the ActionManager object that is used by all actions. +--- +---\warning If you set a new ActionManager, then previously created actions will be removed. +--- +---@param actionManager cc.ActionManager # A ActionManager object that is used by all actions. +function Node:setActionManager(actionManager) end + +---Sets an additional transform matrix to the node. +--- +---In order to remove it, call it again with the argument `nullptr`. +--- +---\note The additional transform will be concatenated at the end of getNodeToParentTransform. +---It could be used to simulate `parent-child` relationship between two nodes (e.g. one is in BatchNode, another isn't). +--- +---@param additionalTransform cc.Mat4 # An additional transform matrix. +---@overload fun(self: cc.Node, additionalTransform: cc.Mat4) +---@overload fun(self: cc.Node, additionalTransform: cc.AffineTransform) +function Node:setAdditionalTransform(additionalTransform) end + +---@param obj cc.Node +---@param value number +function Node.setAlpha(obj, value) end + +---Sets the anchor point in percent. +--- +---anchorPoint is the point around which all transformations and positioning manipulations take place. +---It's like a pin in the node where it is "attached" to its parent. +---The anchorPoint is normalized, like a percentage. (0,0) means the bottom-left corner and (1,1) means the top-right corner. +---But you can use values higher than (1,1) and lower than (0,0) too. +---The default anchorPoint is (0,0), so it starts in the lower left corner of the node. +---\note If node has a physics body, the anchor must be in the middle, you can't change this to other value. +--- +---@param anchorPoint cc.Vec2 # The anchor point of node. +function Node:setAnchorPoint(anchorPoint) end + +---@param obj cc.Node +---@param value number +function Node.setAnchorX(obj, value) end + +---@param obj cc.Node +---@param value number +function Node.setAnchorY(obj, value) end + +---Modify the camera mask for current node. +---If applyChildren is true, then it will modify the camera mask of its children recursively. +---@param mask integer # A unsigned short bit for mask. +---@param applyChildren boolean # A boolean value to determine whether the mask bit should apply to its children or not. +---@overload fun(self: cc.Node, mask: integer) +function Node:setCameraMask(mask, applyChildren) end + +---If you want node's color affect the children node's color, then set it to true. +---Otherwise, set it to false. +---@param cascadeColorEnabled boolean # A boolean value. +function Node:setCascadeColorEnabled(cascadeColorEnabled) end + +---Change node's cascadeOpacity property. +---@param cascadeOpacityEnabled boolean # True to enable cascadeOpacity, false otherwise. +function Node:setCascadeOpacityEnabled(cascadeOpacityEnabled) end + +---Change the color of node. +---@param color any # A Color3B color value. +function Node:setColor(color) end + +---Sets the untransformed size of the node. +--- +---The contentSize remains the same no matter the node is scaled or rotated. +---All nodes has a size. Layer and Scene has the same size of the screen. +--- +---@param contentSize cc.Size # The untransformed size of the node. +function Node:setContentSize(contentSize) end + +---Set event dispatcher for scene. +--- +---@param dispatcher cc.EventDispatcher # The event dispatcher of scene. +function Node:setEventDispatcher(dispatcher) end + +---Defines the order in which the nodes are renderer. +---Nodes that have a Global Z Order lower, are renderer first. +--- +---In case two or more nodes have the same Global Z Order, the order is not guaranteed. +---The only exception if the Nodes have a Global Z Order == 0. In that case, the Scene Graph order is used. +--- +---By default, all nodes have a Global Z Order = 0. That means that by default, the Scene Graph order is used to render the nodes. +--- +---Global Z Order is useful when you need to render nodes in an order different than the Scene Graph order. +--- +---Limitations: Global Z Order can't be used by Nodes that have SpriteBatchNode as one of their ancestors. +---And if ClippingNode is one of the ancestors, then "global Z order" will be relative to the ClippingNode. +---\see `setLocalZOrder()` +---\see `setVertexZ()` +---\since v3.0 +--- +---@param globalZOrder number # The global Z order value. +function Node:setGlobalZOrder(globalZOrder) end + +---@param obj cc.Node +---@param value number +function Node.setHeight(obj, value) end + +---Sets whether the anchor point will be (0,0) when you position this node. +--- +---This is an internal method, only used by Layer and Scene. Don't call it outside framework. +---The default value is false, while in Layer and Scene are true. +--- +---@param ignore boolean # true if anchor point will be (0,0) when you position this node. +function Node:setIgnoreAnchorPointForPosition(ignore) end + +---LocalZOrder is the 'key' used to sort the node relative to its siblings. +---The Node's parent will sort all its children based on the LocalZOrder value. +---If two nodes have the same LocalZOrder, then the node that was added first to the children's array will be in front of the other node in the array. +--- +---Also, the Scene Graph is traversed using the "In-Order" tree traversal algorithm ( http://en.wikipedia.org/wiki/Tree_traversal#In-order ) +---And Nodes that have LocalZOrder values < 0 are the "left" subtree +---While Nodes with LocalZOrder >=0 are the "right" subtree. +--- +---\see `setGlobalZOrder` +---\see `setVertexZ` +--- +---@param localZOrder any # The local Z order value. +function Node:setLocalZOrder(localZOrder) end + +---Changes the name that is used to identify the node easily. +---@param name string # A string that identifies the node. +--- +---\since v3.2 +function Node:setName(name) end + +---Sets the transformation matrix manually. +--- +---@param transform cc.Mat4 # A given transformation matrix. +function Node:setNodeToParentTransform(transform) end + +---@param position cc.Vec2 +function Node:setNormalizedPosition(position) end + +---Set the callback of event onEnter. +---@param callback fun() # A std::function callback. +function Node:setOnEnterCallback(callback) end + +---Set the callback of event EnterTransitionDidFinish. +---@param callback fun() # A std::function callback. +function Node:setOnEnterTransitionDidFinishCallback(callback) end + +---Set the callback of event onExit. +---@param callback fun() # A std::function callback. +function Node:setOnExitCallback(callback) end + +---Set the callback of event ExitTransitionDidStart. +---@param callback fun() # A std::function callback. +function Node:setOnExitTransitionDidStartCallback(callback) end + +---Change node opacity. +---@param opacity integer # A GLubyte opacity value. +function Node:setOpacity(opacity) end + +---If you want the opacity affect the color property, then set to true. +---@param value boolean # A boolean value. +function Node:setOpacityModifyRGB(value) end + +---Sets the parent node. +--- +---@param parent cc.Node # A pointer to the parent node. +function Node:setParent(parent) end + +---@param physicsBody cc.PhysicsBody +function Node:setPhysicsBody(physicsBody) end + +---Sets the position (x,y) of the node in its parent's coordinate system. +--- +---Usually we use `Vec2(x,y)` to compose Vec2 object. +---This code snippet sets the node in the center of screen. +---\code +---Size size = Director::getInstance()->getWinSize(); +---node->setPosition(size.width/2, size.height/2); +---\endcode +--- +---@param position cc.Vec2 # The position (x,y) of the node in OpenGL coordinates. +--- +---Sets the position (x,y) of the node in its parent's coordinate system. +--- +---Passing two numbers (x,y) is much efficient than passing Vec2 object. +---This method is bound to Lua and JavaScript. +---Passing a number is 10 times faster than passing a object from Lua to c++. +--- +---\code +---sample code in Lua +---local pos = node::getPosition() -- returns Vec2 object from C++. +---node:setPosition(x, y) -- pass x, y coordinate to C++. +---\endcode +--- +---\param x X coordinate for position. +---\param y Y coordinate for position. +---@overload fun(self: cc.Node, x: number, y: number) +function Node:setPosition(position) end + +---Sets the position (X, Y, and Z) in its parent's coordinate system. +--- +---@param position cc.Vec3 # The position (X, Y, and Z) in its parent's coordinate system. +---\js NA +function Node:setPosition3D(position) end + +---Sets the position (x,y) using values between 0 and 1. +---The positions in pixels is calculated like the following: +---\code +---pseudo code +---void setNormalizedPosition(Vec2 pos) { +---Size s = getParent()->getContentSize(); +---_position = pos * s; +---} +---\endcode +--- +---@param position cc.Vec2 # The normalized position (x,y) of the node, using value between 0 and 1. +function Node:setPositionNormalized(position) end + +---Gets/Sets x or y coordinate individually for position. +---These methods are used in Lua and Javascript Bindings +--- +---Sets the x coordinate of the node in its parent's coordinate system. +--- +---@param x number # The x coordinate of the node. +function Node:setPositionX(x) end + +---Sets the y coordinate of the node in its parent's coordinate system. +--- +---@param y number # The y coordinate of the node. +function Node:setPositionY(y) end + +---Sets the 'z' coordinate in the position. It is the OpenGL Z vertex value. +--- +---The OpenGL depth buffer and depth testing are disabled by default. You need to turn them on. +---In order to use this property correctly. +--- +---`setPositionZ()` also sets the `setGlobalZValue()` with the positionZ as value. +--- +---\see `setGlobalZValue()` +--- +---@param positionZ number # OpenGL Z vertex of this node. +---\js setVertexZ +function Node:setPositionZ(positionZ) end + +---@param programState ccb.ProgramState +function Node:setProgramState(programState) end + +---Sets the rotation (angle) of the node in degrees. +--- +---0 is the default rotation angle. +---Positive values rotate node clockwise, and negative values for anti-clockwise. +--- +---@param rotation number # The rotation of the node in degrees. +function Node:setRotation(rotation) end + +---Sets the rotation (X,Y,Z) in degrees. +---Useful for 3d rotations. +--- +---\warning The physics body doesn't support this. +--- +---@param rotation cc.Vec3 # The rotation of the node in 3d. +---\js NA +function Node:setRotation3D(rotation) end + +---Set rotation by quaternion. You should make sure the quaternion is normalized. +--- +---@param quat cc.Quaternion # The rotation in quaternion, note that the quat must be normalized. +---\js NA +function Node:setRotationQuat(quat) end + +---Sets the X rotation (angle) of the node in degrees which performs a horizontal rotational skew. +--- +---The difference between `setRotationalSkew()` and `setSkew()` is that the first one simulate Flash's skew functionality, +---while the second one uses the real skew function. +--- +---0 is the default rotation angle. +---Positive values rotate node clockwise, and negative values for anti-clockwise. +--- +---@param rotationX number # The X rotation in degrees which performs a horizontal rotational skew. +--- +---\warning The physics body doesn't support this. +---\js setRotationX +function Node:setRotationSkewX(rotationX) end + +---Sets the Y rotation (angle) of the node in degrees which performs a vertical rotational skew. +--- +---The difference between `setRotationalSkew()` and `setSkew()` is that the first one simulate Flash's skew functionality, +---while the second one uses the real skew function. +--- +---0 is the default rotation angle. +---Positive values rotate node clockwise, and negative values for anti-clockwise. +--- +---@param rotationY number # The Y rotation in degrees. +--- +---\warning The physics body doesn't support this. +---\js setRotationY +function Node:setRotationSkewY(rotationY) end + +---Sets the scale (x,y,z) of the node. +--- +---It is a scaling factor that multiplies the width, height and depth of the node and its children. +--- +---@param scale number # The scale factor for both X and Y axis. +--- +---\warning The physics body doesn't support this. +--- +---Sets the scale (x,y) of the node. +--- +---It is a scaling factor that multiplies the width and height of the node and its children. +--- +---\param scaleX The scale factor on X axis. +---\param scaleY The scale factor on Y axis. +--- +---\warning The physics body doesn't support this. +---@overload fun(self: cc.Node, scaleX: number, scaleY: number) +function Node:setScale(scale) end + +---Sets the scale (x) of the node. +--- +---It is a scaling factor that multiplies the width of the node and its children. +--- +---@param scaleX number # The scale factor on X axis. +--- +---\warning The physics body doesn't support this. +function Node:setScaleX(scaleX) end + +---Sets the scale (y) of the node. +--- +---It is a scaling factor that multiplies the height of the node and its children. +--- +---@param scaleY number # The scale factor on Y axis. +--- +---\warning The physics body doesn't support this. +function Node:setScaleY(scaleY) end + +---Changes the scale factor on Z axis of this node +--- +---The Default value is 1.0 if you haven't changed it before. +--- +---@param scaleZ number # The scale factor on Z axis. +--- +---\warning The physics body doesn't support this. +function Node:setScaleZ(scaleZ) end + +---Sets a Scheduler object that is used to schedule all "updates" and timers. +--- +---\warning If you set a new Scheduler, then previously created timers/update are going to be removed. +---@param scheduler cc.Scheduler # A Scheduler object that is used to schedule all "update" and timers. +function Node:setScheduler(scheduler) end + +---Changes the X skew angle of the node in degrees. +--- +---The difference between `setRotationalSkew()` and `setSkew()` is that the first one simulate Flash's skew functionality +---while the second one uses the real skew function. +--- +---This angle describes the shear distortion in the X direction. +---Thus, it is the angle between the Y coordinate and the left edge of the shape +---The default skewX angle is 0. Positive values distort the node in a CW direction. +--- +---@param skewX number # The X skew angle of the node in degrees. +--- +---\warning The physics body doesn't support this. +function Node:setSkewX(skewX) end + +---Changes the Y skew angle of the node in degrees. +--- +---The difference between `setRotationalSkew()` and `setSkew()` is that the first one simulate Flash's skew functionality +---while the second one uses the real skew function. +--- +---This angle describes the shear distortion in the Y direction. +---Thus, it is the angle between the X coordinate and the bottom edge of the shape. +---The default skewY angle is 0. Positive values distort the node in a CCW direction. +--- +---@param skewY number # The Y skew angle of the node in degrees. +--- +---\warning The physics body doesn't support this. +function Node:setSkewY(skewY) end + +---Changes the tag that is used to identify the node easily. +--- +---Please refer to getTag for the sample code. +--- +---@param tag integer # A integer that identifies the node. +--- +---Please use `setName()` instead. +function Node:setTag(tag) end + +---Sets a custom user data pointer. +--- +---You can set everything in UserData pointer, a data block, a structure or an object, etc. +---\warning Don't forget to release the memory manually, +---especially before you change this data pointer, and before this node is autoreleased. +--- +---@param userData any # A custom user data pointer. +---\lua NA +function Node:setUserData(userData) end + +---Returns a user assigned Object. +--- +---Similar to UserData, but instead of holding a void* it holds an object. +---The UserObject will be retained once in this method, +---and the previous UserObject (if existed) will be released. +---The UserObject will be released in Node's destructor. +--- +---@param userObject cc.Ref # A user assigned Object. +function Node:setUserObject(userObject) end + +---Sets whether the node is visible. +--- +---The default value is true, a node is default to visible. +--- +---@param visible boolean # true if the node is visible, false if the node is hidden. +function Node:setVisible(visible) end + +---@param obj cc.Node +---@param value number +function Node.setWidth(obj, value) end + +---Sorts the children array once before drawing, instead of every time when a child is added or reordered. +---This approach can improve the performance massively. +---\note Don't call this manually unless a child added needs to be removed in the same frame. +function Node:sortAllChildren() end + +---Stops and removes an action from the running action list. +--- +---@param action cc.Action # The action object to be removed. +function Node:stopAction(action) end + +---Removes an action from the running action list by its tag. +--- +---@param tag integer # A tag that indicates the action to be removed. +function Node:stopActionByTag(tag) end + +---Removes all actions from the running action list by its flags. +--- +---@param flags integer # A flag field that removes actions based on bitwise AND. +function Node:stopActionsByFlags(flags) end + +---Stops and removes all actions from the running action list . +function Node:stopAllActions() end + +---Removes all actions from the running action list by its tag. +--- +---@param tag integer # A tag that indicates the action to be removed. +function Node:stopAllActionsByTag(tag) end + +---Unschedules a lambda function. +--- +---@param key string # The key of the lambda function to be unscheduled. +---\lua NA +function Node:unschedule(key) end + +---Unschedule all scheduled selectors and lambda functions: custom selectors, and the 'update' selector and lambda functions. +---Actions are not affected by this method. +---\lua NA +function Node:unscheduleAllCallbacks() end + +function Node:unscheduleUpdate() end + +---Update method will be called automatically every frame if "scheduleUpdate" is called, and the node is "live". +---@param delta number # In seconds. +function Node:update(delta) end + +---Update node's displayed color with its parent color. +---@param parentColor any # A Color3B color value. +function Node:updateDisplayedColor(parentColor) end + +---Update the displayed opacity of node with it's parent opacity; +---@param parentOpacity integer # The opacity of parent node. +function Node:updateDisplayedOpacity(parentOpacity) end + +---!!! ONLY FOR INTERNAL USE +---Sets the arrival order when this node has a same ZOrder with other children. +--- +---A node which called addChild subsequently will take a larger arrival order, +---If two children have the same Z order, the child with larger arrival order will be drawn later. +--- +---\warning This method is used internally for localZOrder sorting, don't change this manually +--- +---\param orderOfArrival The arrival order. +function Node:updateOrderOfArrival() end + +---Calls children's updateTransform() method recursively. +--- +---This method is moved from Sprite, so it's no longer specific to Sprite. +---As the result, you apply SpriteBatchNode's optimization on your customed Node. +---e.g., `batchNode->addChild(myCustomNode)`, while you can only addChild(sprite) before. +function Node:updateTransform() end + +---Visits this node's children and draw them recursively. +--- +---@param renderer cc.Renderer # A given renderer. +---@param parentTransform cc.Mat4 # A transform matrix. +---@param parentFlags integer # Renderer flag. +---@overload fun(self: cc.Node) +function Node:visit(renderer, parentTransform, parentFlags) end + +return Node \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/NodeGrid.lua b/addons/cclua/cocos2d/library/cc/NodeGrid.lua new file mode 100644 index 00000000..3800969a --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/NodeGrid.lua @@ -0,0 +1,39 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.NodeGrid + +---Base class for Grid Node. +---@class cc.NodeGrid : cc.Node +---@field grid cc.GridBase Get a Grid Node.

\return Return a GridBase. +---@field gridRect cc.Rect Get the effect grid rect. \return Return the effect grid rect. +local NodeGrid = {} + +---Create a Grid Node. +--- +---@return cc.NodeGrid # An autorelease Grid Node. +---@overload fun(rect: cc.Rect): cc.NodeGrid +function NodeGrid.create() end + +---Get a Grid Node. +--- +---@return cc.GridBase # Return a GridBase. +function NodeGrid:getGrid() end + +---Get the effect grid rect. +---@return cc.Rect # Return the effect grid rect. +function NodeGrid:getGridRect() end + +---Changes a grid object that is used when applying effects. +--- +---@param grid cc.GridBase # A Grid object that is used when applying effects. +function NodeGrid:setGrid(grid) end + +---Set the effect grid rect. +---@param gridRect cc.Rect # The effect grid rect. +function NodeGrid:setGridRect(gridRect) end + +---Set the Grid Target. +--- +---@param target cc.Node # A Node is used to set the Grid Target. +function NodeGrid:setTarget(target) end + +return NodeGrid \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/OffMeshLinkData.lua b/addons/cclua/cocos2d/library/cc/OffMeshLinkData.lua new file mode 100644 index 00000000..b7ffcf78 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/OffMeshLinkData.lua @@ -0,0 +1,16 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.OffMeshLinkData + +--- +---@class cc.OffMeshLinkData +---@field endPosition cc.Vec3 +---@field startPosition cc.Vec3 +local OffMeshLinkData = {} + +---@return any +function OffMeshLinkData:__gc() end + +---@return any +function OffMeshLinkData:__olua_move() end + +return OffMeshLinkData \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/OrbitCamera.lua b/addons/cclua/cocos2d/library/cc/OrbitCamera.lua new file mode 100644 index 00000000..766a9b08 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/OrbitCamera.lua @@ -0,0 +1,31 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.OrbitCamera + +---\class OrbitCamera +--- +---OrbitCamera action. +---Orbits the camera around the center of the screen using spherical coordinates. +---\ingroup Actions +---@class cc.OrbitCamera : cc.ActionCamera +local OrbitCamera = {} + +---Creates a OrbitCamera action with radius, delta-radius, z, deltaZ, x, deltaX. +--- +---@param t number # Duration in seconds. +---@param radius number # The start radius. +---@param deltaRadius number # The delta radius. +---@param angleZ number # The start angle in Z. +---@param deltaAngleZ number # The delta angle in Z. +---@param angleX number # The start angle in X. +---@param deltaAngleX number # The delta angle in X. +---@return cc.OrbitCamera # An OrbitCamera. +function OrbitCamera.create(t, radius, deltaRadius, angleZ, deltaAngleZ, angleX, deltaAngleX) end + +---Positions the camera according to spherical coordinates. +--- +---@param r olua.float # The spherical radius. +---@param zenith olua.float # The spherical zenith. +---@param azimuth olua.float # The spherical azimuth. +function OrbitCamera:sphericalRadius(r, zenith, azimuth) end + +return OrbitCamera \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/PageTurn3D.lua b/addons/cclua/cocos2d/library/cc/PageTurn3D.lua new file mode 100644 index 00000000..36887066 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/PageTurn3D.lua @@ -0,0 +1,20 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.PageTurn3D + +---This action simulates a page turn from the bottom right hand corner of the screen. +--- +---\details It's not much use by itself but is used by the PageTurnTransition. +---Based on an original paper by L Hong et al. +---http://www.parc.com/publication/1638/turning-pages-of-3d-electronic-books.html +--- +---\since v0.8.2 +---@class cc.PageTurn3D : cc.Grid3DAction +local PageTurn3D = {} + +---Create an action with duration, grid size. +---@param duration number # Specify the duration of the PageTurn3D action. It's a value in seconds. +---@param gridSize cc.Size # Specify the size of the grid. +---@return cc.PageTurn3D # If the creation success, return a pointer of PageTurn3D action; otherwise, return nil. +function PageTurn3D.create(duration, gridSize) end + +return PageTurn3D \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/ParallaxNode.lua b/addons/cclua/cocos2d/library/cc/ParallaxNode.lua new file mode 100644 index 00000000..46711388 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/ParallaxNode.lua @@ -0,0 +1,48 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.ParallaxNode + +---\class ParallaxNode +---ParallaxNode: A node that simulates a parallax scroller +--- +---The children will be moved faster / slower than the parent according the parallax ratio. +---@class cc.ParallaxNode : cc.Node +local ParallaxNode = {} + +---Adds a child to the container with a local z-order, parallax ratio and position offset. +--- +---@param child cc.Node # A child node. +---@param z integer # Z order for drawing priority. +---@param parallaxRatio cc.Vec2 # A given parallax ratio. +---@param positionOffset cc.Vec2 # A given position offset. +---@overload fun(self: cc.ParallaxNode, child: cc.Node, zOrder: integer, tag: integer) +---@overload fun(self: cc.ParallaxNode, child: cc.Node, zOrder: integer, name: string) +--- +---Adds a child to the container with z-order as 0. +--- +---If the child is added to a 'running' node, then 'onEnter' and 'onEnterTransitionDidFinish' will be called immediately. +--- +---\param child A child node. +---@overload fun(self: cc.ParallaxNode, child: cc.Node) +--- +---Adds a child to the container with a local z-order. +--- +---If the child is added to a 'running' node, then 'onEnter' and 'onEnterTransitionDidFinish' will be called immediately. +--- +---\param child A child node. +---\param localZOrder Z order for drawing priority. Please refer to `setLocalZOrder(int)`. +---@overload fun(self: cc.ParallaxNode, child: cc.Node, localZOrder: integer) +function ParallaxNode:addChild(child, z, parallaxRatio, positionOffset) end + +---Create a Parallax node. +--- +---@return cc.ParallaxNode # An autoreleased ParallaxNode object. +function ParallaxNode.create() end + +---Adds a child to the container with a z-order, a parallax ratio and a position offset +---It returns self, so you can chain several addChilds. +---\since v0.8 +---\js ctor +---@return cc.ParallaxNode +function ParallaxNode.new() end + +return ParallaxNode \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/ParticleBatchNode.lua b/addons/cclua/cocos2d/library/cc/ParticleBatchNode.lua new file mode 100644 index 00000000..181a3fe0 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/ParticleBatchNode.lua @@ -0,0 +1,111 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.ParticleBatchNode + +---\class ParticleBatchNode +---ParticleBatchNode is like a batch node: if it contains children, it will draw them in 1 single OpenGL call +---(often known as "batch draw"). +--- +---A ParticleBatchNode can reference one and only one texture (one image file, one texture atlas). +---Only the ParticleSystems that are contained in that texture can be added to the SpriteBatchNode. +---All ParticleSystems added to a SpriteBatchNode are drawn in one OpenGL ES draw call. +---If the ParticleSystems are not added to a ParticleBatchNode then an OpenGL ES draw call will be needed for each one, which is less efficient. +--- +--- +---Limitations: +---- At the moment only ParticleSystemQuad is supported +---- All systems need to be drawn with the same parameters, blend function, aliasing, texture +--- +---Most efficient usage +---- Initialize the ParticleBatchNode with the texture and enough capacity for all the particle systems +---- Initialize all particle systems and add them as child to the batch node +---\since v1.1 +---@class cc.ParticleBatchNode : cc.Node +---@field blendFunc cc.BlendFunc \js NA \lua NA +---@field texture cc.Texture2D +---@field textureAtlas cc.TextureAtlas Gets the texture atlas used for drawing the quads.

\return The texture atlas used for drawing the quads. +local ParticleBatchNode = {} + +---@param cls string +---@return any +function ParticleBatchNode:as(cls) end + +---Create the particle system with the name of a file on disk (for a list of supported formats look at the Texture2D class), a capacity of particles. +--- +---@param fileImage string # A given file name. +---@param capacity integer # A capacity of particles. +---@return cc.ParticleBatchNode # An autoreleased ParticleBatchNode object. +---@overload fun(fileImage: string): cc.ParticleBatchNode +function ParticleBatchNode.create(fileImage, capacity) end + +---Create the particle system with Texture2D, a capacity of particles, which particle system to use. +--- +---@param tex cc.Texture2D # A given texture. +---@param capacity integer # A capacity of particles. +---@return cc.ParticleBatchNode # An autoreleased ParticleBatchNode object. +---\js NA +---@overload fun(tex: cc.Texture2D): cc.ParticleBatchNode +function ParticleBatchNode.createWithTexture(tex, capacity) end + +---Disables a particle by inserting a 0'd quad into the texture atlas. +--- +---@param particleIndex integer # The index of the particle. +function ParticleBatchNode:disableParticle(particleIndex) end + +---\js NA +---\lua NA +---@return cc.BlendFunc +function ParticleBatchNode:getBlendFunc() end + +---@return cc.Texture2D +function ParticleBatchNode:getTexture() end + +---Gets the texture atlas used for drawing the quads. +--- +---@return cc.TextureAtlas # The texture atlas used for drawing the quads. +function ParticleBatchNode:getTextureAtlas() end + +---initializes the particle system with the name of a file on disk (for a list of supported formats look at the Texture2D class), a capacity of particles +---@param fileImage string +---@param capacity integer +---@return boolean +function ParticleBatchNode:initWithFile(fileImage, capacity) end + +---initializes the particle system with Texture2D, a capacity of particles +---@param tex cc.Texture2D +---@param capacity integer +---@return boolean +function ParticleBatchNode:initWithTexture(tex, capacity) end + +---Inserts a child into the ParticleBatchNode. +--- +---@param system cc.ParticleSystem # A given particle system. +---@param index integer # The insert index. +function ParticleBatchNode:insertChild(system, index) end + +---\js ctor +---@return cc.ParticleBatchNode +function ParticleBatchNode.new() end + +---Remove a child of the ParticleBatchNode. +--- +---@param index integer # The index of the child. +---@param doCleanup boolean # True if all actions and callbacks on this node should be removed, false otherwise. +function ParticleBatchNode:removeChildAtIndex(index, doCleanup) end + +---\code +---When this function bound into js or lua,the parameter will be changed +---In js: var setBlendFunc(var src, var dst) +---\endcode +---\lua NA +---@param blendFunc cc.BlendFunc +function ParticleBatchNode:setBlendFunc(blendFunc) end + +---@param texture cc.Texture2D +function ParticleBatchNode:setTexture(texture) end + +---Sets the texture atlas used for drawing the quads. +--- +---@param atlas cc.TextureAtlas # The texture atlas used for drawing the quads. +function ParticleBatchNode:setTextureAtlas(atlas) end + +return ParticleBatchNode \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/ParticleExplosion.lua b/addons/cclua/cocos2d/library/cc/ParticleExplosion.lua new file mode 100644 index 00000000..ba34f604 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/ParticleExplosion.lua @@ -0,0 +1,25 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.ParticleExplosion + +---\class ParticleExplosion +---An explosion particle system. +---@class cc.ParticleExplosion : cc.ParticleSystemQuad +local ParticleExplosion = {} + +---Create a explosion particle system. +--- +---@return cc.ParticleExplosion # An autoreleased ParticleExplosion object. +function ParticleExplosion.create() end + +---Create a explosion particle system withe a fixed number of particles. +--- +---@param numberOfParticles integer # A given number of particles. +---@return cc.ParticleExplosion # An autoreleased ParticleExplosion object. +---\js NA +function ParticleExplosion.createWithTotalParticles(numberOfParticles) end + +---\js ctor +---@return cc.ParticleExplosion +function ParticleExplosion.new() end + +return ParticleExplosion \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/ParticleFire.lua b/addons/cclua/cocos2d/library/cc/ParticleFire.lua new file mode 100644 index 00000000..fc9cb9d1 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/ParticleFire.lua @@ -0,0 +1,25 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.ParticleFire + +---\class ParticleFire +---A fire particle system. +---@class cc.ParticleFire : cc.ParticleSystemQuad +local ParticleFire = {} + +---Create a fire particle system. +--- +---@return cc.ParticleFire # An autoreleased ParticleFire object. +function ParticleFire.create() end + +---Create a fire particle system withe a fixed number of particles. +--- +---@param numberOfParticles integer # A given number of particles. +---@return cc.ParticleFire # An autoreleased ParticleFire object. +---\js NA +function ParticleFire.createWithTotalParticles(numberOfParticles) end + +---\js ctor +---@return cc.ParticleFire +function ParticleFire.new() end + +return ParticleFire \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/ParticleFireworks.lua b/addons/cclua/cocos2d/library/cc/ParticleFireworks.lua new file mode 100644 index 00000000..38e1aa23 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/ParticleFireworks.lua @@ -0,0 +1,25 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.ParticleFireworks + +---\class ParticleFireworks +---A fireworks particle system. +---@class cc.ParticleFireworks : cc.ParticleSystemQuad +local ParticleFireworks = {} + +---Create a fireworks particle system. +--- +---@return cc.ParticleFireworks # An autoreleased ParticleFireworks object. +function ParticleFireworks.create() end + +---Create a fireworks particle system withe a fixed number of particles. +--- +---@param numberOfParticles integer # A given number of particles. +---@return cc.ParticleFireworks # An autoreleased ParticleFireworks object. +---\js NA +function ParticleFireworks.createWithTotalParticles(numberOfParticles) end + +---\js ctor +---@return cc.ParticleFireworks +function ParticleFireworks.new() end + +return ParticleFireworks \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/ParticleFlower.lua b/addons/cclua/cocos2d/library/cc/ParticleFlower.lua new file mode 100644 index 00000000..dbd5b1b1 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/ParticleFlower.lua @@ -0,0 +1,25 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.ParticleFlower + +---\class ParticleFlower +---A flower particle system. +---@class cc.ParticleFlower : cc.ParticleSystemQuad +local ParticleFlower = {} + +---Create a flower particle system. +--- +---@return cc.ParticleFlower # An autoreleased ParticleFlower object. +function ParticleFlower.create() end + +---Create a flower particle system withe a fixed number of particles. +--- +---@param numberOfParticles integer # A given number of particles. +---@return cc.ParticleFlower # An autoreleased ParticleFlower object. +---\js NA +function ParticleFlower.createWithTotalParticles(numberOfParticles) end + +---\js ctor +---@return cc.ParticleFlower +function ParticleFlower.new() end + +return ParticleFlower \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/ParticleGalaxy.lua b/addons/cclua/cocos2d/library/cc/ParticleGalaxy.lua new file mode 100644 index 00000000..ae58ded3 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/ParticleGalaxy.lua @@ -0,0 +1,25 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.ParticleGalaxy + +---\class ParticleGalaxy +---A galaxy particle system. +---@class cc.ParticleGalaxy : cc.ParticleSystemQuad +local ParticleGalaxy = {} + +---Create a galaxy particle system. +--- +---@return cc.ParticleGalaxy # An autoreleased ParticleGalaxy object. +function ParticleGalaxy.create() end + +---Create a galaxy particle system withe a fixed number of particles. +--- +---@param numberOfParticles integer # A given number of particles. +---@return cc.ParticleGalaxy # An autoreleased ParticleGalaxy object. +---\js NA +function ParticleGalaxy.createWithTotalParticles(numberOfParticles) end + +---\js ctor +---@return cc.ParticleGalaxy +function ParticleGalaxy.new() end + +return ParticleGalaxy \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/ParticleMeteor.lua b/addons/cclua/cocos2d/library/cc/ParticleMeteor.lua new file mode 100644 index 00000000..38e324dc --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/ParticleMeteor.lua @@ -0,0 +1,25 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.ParticleMeteor + +---\class ParticleMeteor +---A meteor particle system. +---@class cc.ParticleMeteor : cc.ParticleSystemQuad +local ParticleMeteor = {} + +---Create a meteor particle system. +--- +---@return cc.ParticleMeteor # An autoreleased ParticleMeteor object. +function ParticleMeteor.create() end + +---Create a meteor particle system withe a fixed number of particles. +--- +---@param numberOfParticles integer # A given number of particles. +---@return cc.ParticleMeteor # An autoreleased ParticleMeteor object. +---\js NA +function ParticleMeteor.createWithTotalParticles(numberOfParticles) end + +---\js ctor +---@return cc.ParticleMeteor +function ParticleMeteor.new() end + +return ParticleMeteor \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/ParticleRain.lua b/addons/cclua/cocos2d/library/cc/ParticleRain.lua new file mode 100644 index 00000000..4757112b --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/ParticleRain.lua @@ -0,0 +1,25 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.ParticleRain + +---\class ParticleRain +---A rain particle system. +---@class cc.ParticleRain : cc.ParticleSystemQuad +local ParticleRain = {} + +---Create a rain particle system. +--- +---@return cc.ParticleRain # An autoreleased ParticleRain object. +function ParticleRain.create() end + +---Create a rain particle system withe a fixed number of particles. +--- +---@param numberOfParticles integer # A given number of particles. +---@return cc.ParticleRain # An autoreleased ParticleRain object. +---\js NA +function ParticleRain.createWithTotalParticles(numberOfParticles) end + +---\js ctor +---@return cc.ParticleRain +function ParticleRain.new() end + +return ParticleRain \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/ParticleSmoke.lua b/addons/cclua/cocos2d/library/cc/ParticleSmoke.lua new file mode 100644 index 00000000..516efaf9 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/ParticleSmoke.lua @@ -0,0 +1,25 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.ParticleSmoke + +---\class ParticleSmoke +---An smoke particle system. +---@class cc.ParticleSmoke : cc.ParticleSystemQuad +local ParticleSmoke = {} + +---Create a smoke particle system. +--- +---@return cc.ParticleSmoke # An autoreleased ParticleSmoke object. +function ParticleSmoke.create() end + +---Create a smoke particle system withe a fixed number of particles. +--- +---@param numberOfParticles integer # A given number of particles. +---@return cc.ParticleSmoke # An autoreleased ParticleSmoke object. +---\js NA +function ParticleSmoke.createWithTotalParticles(numberOfParticles) end + +---\js ctor +---@return cc.ParticleSmoke +function ParticleSmoke.new() end + +return ParticleSmoke \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/ParticleSnow.lua b/addons/cclua/cocos2d/library/cc/ParticleSnow.lua new file mode 100644 index 00000000..a7d27afe --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/ParticleSnow.lua @@ -0,0 +1,25 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.ParticleSnow + +---\class ParticleSnow +---An snow particle system. +---@class cc.ParticleSnow : cc.ParticleSystemQuad +local ParticleSnow = {} + +---Create a snow particle system. +--- +---@return cc.ParticleSnow # An autoreleased ParticleSnow object. +function ParticleSnow.create() end + +---Create a snow particle system withe a fixed number of particles. +--- +---@param numberOfParticles integer # A given number of particles. +---@return cc.ParticleSnow # An autoreleased ParticleSnow object. +---\js NA +function ParticleSnow.createWithTotalParticles(numberOfParticles) end + +---\js ctor +---@return cc.ParticleSnow +function ParticleSnow.new() end + +return ParticleSnow \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/ParticleSpiral.lua b/addons/cclua/cocos2d/library/cc/ParticleSpiral.lua new file mode 100644 index 00000000..e06c2367 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/ParticleSpiral.lua @@ -0,0 +1,25 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.ParticleSpiral + +---\class ParticleSpiral +---An spiral particle system. +---@class cc.ParticleSpiral : cc.ParticleSystemQuad +local ParticleSpiral = {} + +---Create a spiral particle system. +--- +---@return cc.ParticleSpiral # An autoreleased ParticleSpiral object. +function ParticleSpiral.create() end + +---Create a spiral particle system withe a fixed number of particles. +--- +---@param numberOfParticles integer # A given number of particles. +---@return cc.ParticleSpiral # An autoreleased ParticleSpiral object. +---\js NA +function ParticleSpiral.createWithTotalParticles(numberOfParticles) end + +---\js ctor +---@return cc.ParticleSpiral +function ParticleSpiral.new() end + +return ParticleSpiral \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/ParticleSun.lua b/addons/cclua/cocos2d/library/cc/ParticleSun.lua new file mode 100644 index 00000000..6b844d0f --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/ParticleSun.lua @@ -0,0 +1,25 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.ParticleSun + +---\class ParticleSun +---A sun particle system. +---@class cc.ParticleSun : cc.ParticleSystemQuad +local ParticleSun = {} + +---Create a sun particle system. +--- +---@return cc.ParticleSun # An autoreleased ParticleSun object. +function ParticleSun.create() end + +---Create a sun particle system withe a fixed number of particles. +--- +---@param numberOfParticles integer # A given number of particles. +---@return cc.ParticleSun # An autoreleased ParticleSun object. +---\js NA +function ParticleSun.createWithTotalParticles(numberOfParticles) end + +---\js ctor +---@return cc.ParticleSun +function ParticleSun.new() end + +return ParticleSun \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/ParticleSystem.lua b/addons/cclua/cocos2d/library/cc/ParticleSystem.lua new file mode 100644 index 00000000..d390b75d --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/ParticleSystem.lua @@ -0,0 +1,641 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.ParticleSystem + +---\class ParticleSystem +---Particle System base class. +---Attributes of a Particle System: +---- emission rate of the particles +---- Gravity Mode (Mode A): +---- gravity +---- direction +---- speed +- variance +---- tangential acceleration +- variance +---- radial acceleration +- variance +---- Radius Mode (Mode B): +---- startRadius +- variance +---- endRadius +- variance +---- rotate +- variance +---- Properties common to all modes: +---- life +- life variance +---- start spin +- variance +---- end spin +- variance +---- start size +- variance +---- end size +- variance +---- start color +- variance +---- end color +- variance +---- life +- variance +---- blending function +---- texture +--- +---Cocos2d also supports particles generated by Particle Designer (http://particledesigner.71squared.com/). +---'Radius Mode' in Particle Designer uses a fixed emit rate of 30 hz. Since that can't be guaranteed in cocos2d, +---cocos2d uses a another approach, but the results are almost identical. +--- +---Cocos2d supports all the variables used by Particle Designer plus a bit more: +---- spinning particles (supported when using ParticleSystemQuad) +---- tangential acceleration (Gravity mode) +---- radial acceleration (Gravity mode) +---- radius direction (Radius mode) (Particle Designer supports outwards to inwards direction only) +--- +---It is possible to customize any of the above mentioned properties in runtime. Example: +--- +---\code +---emitter.radialAccel = 15; +---emitter.startSpin = 0; +---\endcode +---@class cc.ParticleSystem : cc.Node +---@field active boolean Whether or not the particle system is active.

\return True if the particle system is active. +---@field allParticleSystems any Gets all ParticleSystem references +---@field angle number Gets the angle of each particle.

\return The angle of each particle. +---@field angleVar number Gets the angle variance of each particle.

\return The angle variance of each particle. +---@field atlasIndex integer Gets the index of system in batch node array.

\return The index of system in batch node array. +---@field autoRemoveOnFinish boolean Whether or not the particle system removed self on finish.

\return True if the particle system removed self on finish. +---@field batchNode cc.ParticleBatchNode Gets the batch node.

\return The batch node. +---@field blendAdditive boolean Whether or not the particle system is blend additive.

\return True if the particle system is blend additive. +---@field blendFunc cc.BlendFunc \js NA \lua NA +---@field duration number Gets how many seconds the emitter will run. -1 means 'forever'.

\return The seconds that the emitter will run. -1 means 'forever'. +---@field emissionRate number Gets the emission rate of the particles.

\return The emission rate of the particles. +---@field emitterMode cc.ParticleSystem.Mode Switch between different kind of emitter modes: - kParticleModeGravity: uses gravity, speed, radial and tangential acceleration. - kParticleModeRadius: uses radius movement + rotation.

\return The mode of the emitter. +---@field endColor any Gets the end color and end color variation of each particle.

\return The end color and end color variation of each particle. +---@field endColorVar any Gets the end color variance of each particle.

\return The end color variance of each particle. +---@field endRadius number Gets the end radius.

\return The end radius. +---@field endRadiusVar number Gets the end radius variance.

\return The end radius variance. +---@field endSize number Gets the end size in pixels of each particle.

\return The end size in pixels of each particle. +---@field endSizeVar number Gets the end size variance in pixels of each particle.

\return The end size variance in pixels of each particle. +---@field endSpin number Gets the end spin of each particle.

\return The end spin of each particle. +---@field endSpinVar number Gets the end spin variance of each particle.

\return The end spin variance of each particle. +---@field full boolean Whether or not the system is full.

\return True if the system is full. +---@field gravity cc.Vec2 Gets the gravity.

\return The gravity. +---@field life number Gets the life of each particle.

\return The life of each particle. +---@field lifeVar number Gets the life variance of each particle.

\return The life variance of each particle. +---@field particleCount integer Gets the Quantity of particles that are being simulated at the moment.

\return The Quantity of particles that are being simulated at the moment. +---@field paused boolean Are the emissions paused \return True if the emissions are paused, else false +---@field posVar cc.Vec2 Gets the position variance of the emitter.

\return The position variance of the emitter. +---@field positionType cc.ParticleSystem.PositionType Gets the particles movement type: Free or Grouped. \since v0.8

\return The particles movement type. +---@field radialAccel number Gets the radial acceleration.

\return The radial acceleration. +---@field radialAccelVar number Gets the radial acceleration variance.

\return The radial acceleration variance. +---@field resourceFile string +---@field rotatePerSecond number Gets the number of degrees to rotate a particle around the source pos per second.

\return The number of degrees to rotate a particle around the source pos per second. +---@field rotatePerSecondVar number Gets the rotate per second variance.

\return The rotate per second variance. +---@field rotationIsDir boolean Whether or not the rotation of each particle to its direction.

\return True if the rotation is the direction. +---@field sourcePosition cc.Vec2 Gets the source position of the emitter.

\return The source position of the emitter. +---@field sourcePositionCompatible boolean +---@field speed number Gets the speed.

\return The speed. +---@field speedVar number Gets the speed variance.

\return The speed variance. +---@field startColor any Gets the start color of each particle.

\return The start color of each particle. +---@field startColorVar any Gets the start color variance of each particle.

\return The start color variance of each particle. +---@field startRadius number Gets the start radius.

\return The start radius. +---@field startRadiusVar number Gets the start radius variance.

\return The start radius variance. +---@field startSize number Gets the start size in pixels of each particle.

\return The start size in pixels of each particle. +---@field startSizeVar number Gets the start size variance in pixels of each particle.

\return The start size variance in pixels of each particle. +---@field startSpin number Gets the start spin of each particle.

\return The start spin of each particle. +---@field startSpinVar number Gets the start spin variance of each particle.

\return The start spin variance of each particle. +---@field tangentialAccel number Gets the tangential acceleration.

\return The tangential acceleration. +---@field tangentialAccelVar number Gets the tangential acceleration variance.

\return The tangential acceleration variance. +---@field texture cc.Texture2D +---@field totalParticles integer Gets the maximum particles of the system.

\return The maximum particles of the system. +local ParticleSystem = {} + +---@param count integer +function ParticleSystem:addParticles(count) end + +---@param cls string +---@return any +function ParticleSystem:as(cls) end + +---Creates an initializes a ParticleSystem from a plist file. +---This plist files can be created manually or with Particle Designer: +---http://particledesigner.71squared.com/ +---\since v2.0 +--- +---@param plistFile string # Particle plist file name. +---@return cc.ParticleSystem # An autoreleased ParticleSystem object. +function ParticleSystem.create(plistFile) end + +---Create a system with a fixed number of particles. +--- +---@param numberOfParticles integer # A given number of particles. +---@return cc.ParticleSystem # An autoreleased ParticleSystemQuad object. +---\js NA +function ParticleSystem.createWithTotalParticles(numberOfParticles) end + +---Gets all ParticleSystem references +---@return any +function ParticleSystem.getAllParticleSystems() end + +---Gets the angle of each particle. +--- +---@return number # The angle of each particle. +function ParticleSystem:getAngle() end + +---Gets the angle variance of each particle. +--- +---@return number # The angle variance of each particle. +function ParticleSystem:getAngleVar() end + +---Gets the index of system in batch node array. +--- +---@return integer # The index of system in batch node array. +function ParticleSystem:getAtlasIndex() end + +---Gets the batch node. +--- +---@return cc.ParticleBatchNode # The batch node. +function ParticleSystem:getBatchNode() end + +---\js NA +---\lua NA +---@return cc.BlendFunc +function ParticleSystem:getBlendFunc() end + +---Gets how many seconds the emitter will run. -1 means 'forever'. +--- +---@return number # The seconds that the emitter will run. -1 means 'forever'. +function ParticleSystem:getDuration() end + +---Gets the emission rate of the particles. +--- +---@return number # The emission rate of the particles. +function ParticleSystem:getEmissionRate() end + +---Switch between different kind of emitter modes: +---- kParticleModeGravity: uses gravity, speed, radial and tangential acceleration. +---- kParticleModeRadius: uses radius movement + rotation. +--- +---@return cc.ParticleSystem.Mode # The mode of the emitter. +function ParticleSystem:getEmitterMode() end + +---Gets the end color and end color variation of each particle. +--- +---@return any # The end color and end color variation of each particle. +function ParticleSystem:getEndColor() end + +---Gets the end color variance of each particle. +--- +---@return any # The end color variance of each particle. +function ParticleSystem:getEndColorVar() end + +---Gets the end radius. +--- +---@return number # The end radius. +function ParticleSystem:getEndRadius() end + +---Gets the end radius variance. +--- +---@return number # The end radius variance. +function ParticleSystem:getEndRadiusVar() end + +---Gets the end size in pixels of each particle. +--- +---@return number # The end size in pixels of each particle. +function ParticleSystem:getEndSize() end + +---Gets the end size variance in pixels of each particle. +--- +---@return number # The end size variance in pixels of each particle. +function ParticleSystem:getEndSizeVar() end + +---Gets the end spin of each particle. +--- +---@return number # The end spin of each particle. +function ParticleSystem:getEndSpin() end + +---Gets the end spin variance of each particle. +--- +---@return number # The end spin variance of each particle. +function ParticleSystem:getEndSpinVar() end + +---Gets the gravity. +--- +---@return cc.Vec2 # The gravity. +function ParticleSystem:getGravity() end + +---Gets the life of each particle. +--- +---@return number # The life of each particle. +function ParticleSystem:getLife() end + +---Gets the life variance of each particle. +--- +---@return number # The life variance of each particle. +function ParticleSystem:getLifeVar() end + +---Gets the Quantity of particles that are being simulated at the moment. +--- +---@return integer # The Quantity of particles that are being simulated at the moment. +function ParticleSystem:getParticleCount() end + +---Gets the position variance of the emitter. +--- +---@return cc.Vec2 # The position variance of the emitter. +function ParticleSystem:getPosVar() end + +---Gets the particles movement type: Free or Grouped. +---\since v0.8 +--- +---@return cc.ParticleSystem.PositionType # The particles movement type. +function ParticleSystem:getPositionType() end + +---Gets the radial acceleration. +--- +---@return number # The radial acceleration. +function ParticleSystem:getRadialAccel() end + +---Gets the radial acceleration variance. +--- +---@return number # The radial acceleration variance. +function ParticleSystem:getRadialAccelVar() end + +---@return string +function ParticleSystem:getResourceFile() end + +---Gets the number of degrees to rotate a particle around the source pos per second. +--- +---@return number # The number of degrees to rotate a particle around the source pos per second. +function ParticleSystem:getRotatePerSecond() end + +---Gets the rotate per second variance. +--- +---@return number # The rotate per second variance. +function ParticleSystem:getRotatePerSecondVar() end + +---Whether or not the rotation of each particle to its direction. +--- +---@return boolean # True if the rotation is the direction. +function ParticleSystem:getRotationIsDir() end + +---Gets the source position of the emitter. +--- +---@return cc.Vec2 # The source position of the emitter. +function ParticleSystem:getSourcePosition() end + +---Gets the speed. +--- +---@return number # The speed. +function ParticleSystem:getSpeed() end + +---Gets the speed variance. +--- +---@return number # The speed variance. +function ParticleSystem:getSpeedVar() end + +---Gets the start color of each particle. +--- +---@return any # The start color of each particle. +function ParticleSystem:getStartColor() end + +---Gets the start color variance of each particle. +--- +---@return any # The start color variance of each particle. +function ParticleSystem:getStartColorVar() end + +---Gets the start radius. +--- +---@return number # The start radius. +function ParticleSystem:getStartRadius() end + +---Gets the start radius variance. +--- +---@return number # The start radius variance. +function ParticleSystem:getStartRadiusVar() end + +---Gets the start size in pixels of each particle. +--- +---@return number # The start size in pixels of each particle. +function ParticleSystem:getStartSize() end + +---Gets the start size variance in pixels of each particle. +--- +---@return number # The start size variance in pixels of each particle. +function ParticleSystem:getStartSizeVar() end + +---Gets the start spin of each particle. +--- +---@return number # The start spin of each particle. +function ParticleSystem:getStartSpin() end + +---Gets the start spin variance of each particle. +--- +---@return number # The start spin variance of each particle. +function ParticleSystem:getStartSpinVar() end + +---Gets the tangential acceleration. +--- +---@return number # The tangential acceleration. +function ParticleSystem:getTangentialAccel() end + +---Gets the tangential acceleration variance. +--- +---@return number # The tangential acceleration variance. +function ParticleSystem:getTangentialAccelVar() end + +---@return cc.Texture2D +function ParticleSystem:getTexture() end + +---Gets the maximum particles of the system. +--- +---@return integer # The maximum particles of the system. +function ParticleSystem:getTotalParticles() end + +---initializes a QuadParticleSystem from a Dictionary. +---\since v0.99.3 +---@param dictionary cc.types.ValueMap +---@return boolean +--- +---initializes a particle system from a NSDictionary and the path from where to load the png +---\since v2.1 +---@overload fun(self: cc.ParticleSystem, dictionary: cc.types.ValueMap, dirname: string): boolean +function ParticleSystem:initWithDictionary(dictionary) end + +---initializes a ParticleSystem from a plist file. +---This plist files can be created manually or with Particle Designer: +---http://particledesigner.71squared.com/ +---\since v0.99.3 +---@param plistFile string +---@return boolean +function ParticleSystem:initWithFile(plistFile) end + +---! Initializes a system with a fixed number of particles +---@param numberOfParticles integer +---@return boolean +function ParticleSystem:initWithTotalParticles(numberOfParticles) end + +---Whether or not the particle system is active. +--- +---@return boolean # True if the particle system is active. +function ParticleSystem:isActive() end + +---Whether or not the particle system removed self on finish. +--- +---@return boolean # True if the particle system removed self on finish. +function ParticleSystem:isAutoRemoveOnFinish() end + +---Whether or not the particle system is blend additive. +--- +---@return boolean # True if the particle system is blend additive. +function ParticleSystem:isBlendAdditive() end + +---Whether or not the system is full. +--- +---@return boolean # True if the system is full. +function ParticleSystem:isFull() end + +---Are the emissions paused +---@return boolean # True if the emissions are paused, else false +function ParticleSystem:isPaused() end + +---@return boolean +function ParticleSystem:isSourcePositionCompatible() end + +---\js ctor +---@return cc.ParticleSystem +function ParticleSystem.new() end + +function ParticleSystem:pauseEmissions() end + +---Update the VBO verts buffer which does not use batch node, +---should be overridden by subclasses. +function ParticleSystem:postStep() end + +---Kill all living particles. +function ParticleSystem:resetSystem() end + +function ParticleSystem:resumeEmissions() end + +---Sets the angle of each particle. +--- +---@param angle number # The angle of each particle. +function ParticleSystem:setAngle(angle) end + +---Sets the angle variance of each particle. +--- +---@param angleVar number # The angle variance of each particle. +function ParticleSystem:setAngleVar(angleVar) end + +---Sets the index of system in batch node array. +--- +---@param index integer # The index of system in batch node array. +function ParticleSystem:setAtlasIndex(index) end + +---Set the particle system auto removed it self on finish. +--- +---@param var boolean # True if the particle system removed self on finish. +function ParticleSystem:setAutoRemoveOnFinish(var) end + +---Sets the batch node. +--- +---@param batchNode cc.ParticleBatchNode # The batch node. +function ParticleSystem:setBatchNode(batchNode) end + +---Sets the particle system blend additive. +--- +---@param value boolean # True if the particle system is blend additive. +function ParticleSystem:setBlendAdditive(value) end + +---\code +---When this function bound into js or lua,the parameter will be changed +---In js: var setBlendFunc(var src, var dst) +---In lua: local setBlendFunc(local src, local dst) +---\endcode +---@param blendFunc cc.BlendFunc +function ParticleSystem:setBlendFunc(blendFunc) end + +---Sets how many seconds the emitter will run. -1 means 'forever'. +--- +---@param duration number # The seconds that the emitter will run. -1 means 'forever'. +function ParticleSystem:setDuration(duration) end + +---Sets the emission rate of the particles. +--- +---@param rate number # The emission rate of the particles. +function ParticleSystem:setEmissionRate(rate) end + +---Sets the mode of the emitter. +--- +---@param mode cc.ParticleSystem.Mode # The mode of the emitter. +function ParticleSystem:setEmitterMode(mode) end + +---Sets the end color and end color variation of each particle. +--- +---@param color any # The end color and end color variation of each particle. +function ParticleSystem:setEndColor(color) end + +---Sets the end color variance of each particle. +--- +---@param color any # The end color variance of each particle. +function ParticleSystem:setEndColorVar(color) end + +---Sets the end radius. +--- +---@param endRadius number # The end radius. +function ParticleSystem:setEndRadius(endRadius) end + +---Sets the end radius variance. +--- +---@param endRadiusVar number # The end radius variance. +function ParticleSystem:setEndRadiusVar(endRadiusVar) end + +---Sets the end size in pixels of each particle. +--- +---@param endSize number # The end size in pixels of each particle. +function ParticleSystem:setEndSize(endSize) end + +---Sets the end size variance in pixels of each particle. +--- +---@param sizeVar number # The end size variance in pixels of each particle. +function ParticleSystem:setEndSizeVar(sizeVar) end + +---Sets the end spin of each particle. +--- +---@param endSpin number # The end spin of each particle. +function ParticleSystem:setEndSpin(endSpin) end + +---Sets the end spin variance of each particle. +--- +---@param endSpinVar number # The end spin variance of each particle. +function ParticleSystem:setEndSpinVar(endSpinVar) end + +---Sets the gravity. +--- +---@param g cc.Vec2 # The gravity. +function ParticleSystem:setGravity(g) end + +---Sets the life of each particle. +--- +---@param life number # The life of each particle. +function ParticleSystem:setLife(life) end + +---Sets the life variance of each particle. +--- +---@param lifeVar number # The life variance of each particle. +function ParticleSystem:setLifeVar(lifeVar) end + +---Sets the position variance of the emitter. +--- +---@param pos cc.Vec2 # The position variance of the emitter. +function ParticleSystem:setPosVar(pos) end + +---Sets the particles movement type: Free or Grouped. +---\since v0.8 +--- +---@param type cc.ParticleSystem.PositionType # The particles movement type. +function ParticleSystem:setPositionType(type) end + +---Sets the radial acceleration. +--- +---@param t number # The radial acceleration. +function ParticleSystem:setRadialAccel(t) end + +---Sets the radial acceleration variance. +--- +---@param t number # The radial acceleration variance. +function ParticleSystem:setRadialAccelVar(t) end + +---Sets the number of degrees to rotate a particle around the source pos per second. +--- +---@param degrees number # The number of degrees to rotate a particle around the source pos per second. +function ParticleSystem:setRotatePerSecond(degrees) end + +---Sets the rotate per second variance. +--- +---@param degrees number # The rotate per second variance. +function ParticleSystem:setRotatePerSecondVar(degrees) end + +---Sets the rotation of each particle to its direction. +--- +---@param t boolean # True if the rotation is the direction. +function ParticleSystem:setRotationIsDir(t) end + +---Sets the source position of the emitter. +--- +---@param pos cc.Vec2 # The source position of the emitter. +function ParticleSystem:setSourcePosition(pos) end + +---\} end of PlayableProtocol +---@param sourcePositionCompatible boolean +function ParticleSystem:setSourcePositionCompatible(sourcePositionCompatible) end + +---Sets the speed. +--- +---@param speed number # The speed. +function ParticleSystem:setSpeed(speed) end + +---Sets the speed variance. +--- +---@param speed number # The speed variance. +function ParticleSystem:setSpeedVar(speed) end + +---Sets the start color of each particle. +--- +---@param color any # The start color of each particle. +function ParticleSystem:setStartColor(color) end + +---Sets the start color variance of each particle. +--- +---@param color any # The start color variance of each particle. +function ParticleSystem:setStartColorVar(color) end + +---Sets the start radius. +--- +---@param startRadius number # The start radius. +function ParticleSystem:setStartRadius(startRadius) end + +---Sets the start radius variance. +--- +---@param startRadiusVar number # The start radius variance. +function ParticleSystem:setStartRadiusVar(startRadiusVar) end + +---Sets the start size in pixels of each particle. +--- +---@param startSize number # The start size in pixels of each particle. +function ParticleSystem:setStartSize(startSize) end + +---Sets the start size variance in pixels of each particle. +--- +---@param sizeVar number # The start size variance in pixels of each particle. +function ParticleSystem:setStartSizeVar(sizeVar) end + +---Sets the start spin of each particle. +--- +---@param spin number # The start spin of each particle. +function ParticleSystem:setStartSpin(spin) end + +---Sets the start spin variance of each particle. +--- +---@param pinVar number # The start spin variance of each particle. +function ParticleSystem:setStartSpinVar(pinVar) end + +---Sets the tangential acceleration. +--- +---@param t number # The tangential acceleration. +function ParticleSystem:setTangentialAccel(t) end + +---Sets the tangential acceleration variance. +--- +---@param t number # The tangential acceleration variance. +function ParticleSystem:setTangentialAccelVar(t) end + +---@param texture cc.Texture2D +function ParticleSystem:setTexture(texture) end + +---Sets the maximum particles of the system. +--- +---@param totalParticles integer # The maximum particles of the system. +function ParticleSystem:setTotalParticles(totalParticles) end + +---\{ +---\name implement Playable Protocol +function ParticleSystem:start() end + +function ParticleSystem:stop() end + +function ParticleSystem:stopSystem() end + +---Update the verts position data of particle, +---should be overridden by subclasses. +function ParticleSystem:updateParticleQuads() end + +---Call the update method with no time.. +function ParticleSystem:updateWithNoTime() end + +return ParticleSystem \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/ParticleSystem/Mode.lua b/addons/cclua/cocos2d/library/cc/ParticleSystem/Mode.lua new file mode 100644 index 00000000..936b5007 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/ParticleSystem/Mode.lua @@ -0,0 +1,14 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.ParticleSystem.Mode + +---@type cc.ParticleSystem.Mode +local VALUE + +--- +---@enum cc.ParticleSystem.Mode +local Mode = { + GRAVITY = 0, + RADIUS = 1, +} + +return Mode \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/ParticleSystem/PositionType.lua b/addons/cclua/cocos2d/library/cc/ParticleSystem/PositionType.lua new file mode 100644 index 00000000..6d5aa1f4 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/ParticleSystem/PositionType.lua @@ -0,0 +1,18 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.ParticleSystem.PositionType + +---@type cc.ParticleSystem.PositionType +local VALUE + +--- +---@enum cc.ParticleSystem.PositionType +local PositionType = { + FREE = 0, + ---Living particles are attached to the world but will follow the emitter repositioning. + ---Use case: Attach an emitter to an sprite, and you want that the emitter follows the sprite. + GROUPED = 2, + ---Living particles are attached to the world and are unaffected by emitter repositioning. + RELATIVE = 1, +} + +return PositionType \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/ParticleSystemQuad.lua b/addons/cclua/cocos2d/library/cc/ParticleSystemQuad.lua new file mode 100644 index 00000000..788d4fab --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/ParticleSystemQuad.lua @@ -0,0 +1,72 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.ParticleSystemQuad + +---\class ParticleSystemQuad +---ParticleSystemQuad is a subclass of ParticleSystem. +--- +---It includes all the features of ParticleSystem. +--- +---Special features and Limitations: +---- Particle size can be any float number. +---- The system can be scaled. +---- The particles can be rotated. +---- It supports subrects. +---- It supports batched rendering since 1.1. +---\since v0.8 +---\js NA +---@class cc.ParticleSystemQuad : cc.ParticleSystem +local ParticleSystemQuad = {} + +---Creates a Particle Emitter. +--- +---@return cc.ParticleSystemQuad # An autoreleased ParticleSystemQuad object. +--- +---Creates an initializes a ParticleSystemQuad from a plist file. +---This plist files can be created manually or with Particle Designer. +--- +---\param filename Particle plist file name. +---\return An autoreleased ParticleSystemQuad object. +---@overload fun(filename: string): cc.ParticleSystemQuad +--- +---Creates a Particle Emitter with a dictionary. +--- +---\param dictionary Particle dictionary. +---\return An autoreleased ParticleSystemQuad object. +---@overload fun(dictionary: cc.types.ValueMap): cc.ParticleSystemQuad +function ParticleSystemQuad.create() end + +---Creates a Particle Emitter with a number of particles. +--- +---@param numberOfParticles integer # A given number of particles. +---@return cc.ParticleSystemQuad # An autoreleased ParticleSystemQuad object. +function ParticleSystemQuad.createWithTotalParticles(numberOfParticles) end + +---Listen the event that renderer was recreated on Android/WP8. +---\js NA +---\lua NA +--- +---@param event cc.EventCustom # the event that renderer was recreated on Android/WP8. +function ParticleSystemQuad:listenRendererRecreated(event) end + +---\js ctor +---@return cc.ParticleSystemQuad +function ParticleSystemQuad.new() end + +---Sets a new SpriteFrame as particle. +---WARNING: this method is experimental. Use setTextureWithRect instead. +--- +---@param spriteFrame cc.SpriteFrame # A given sprite frame as particle texture. +---\since v0.99.4 +function ParticleSystemQuad:setDisplayFrame(spriteFrame) end + +---Sets a new texture with a rect. The rect is in Points. +---\since v0.99.4 +---\js NA +---\lua NA +--- +---@param texture cc.Texture2D # A given texture. +---8 @param rect A given rect, in points. +---@param rect cc.Rect +function ParticleSystemQuad:setTextureWithRect(texture, rect) end + +return ParticleSystemQuad \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/Pass.lua b/addons/cclua/cocos2d/library/cc/Pass.lua new file mode 100644 index 00000000..42fb6ae5 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/Pass.lua @@ -0,0 +1,8 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.Pass + +--- +---@class cc.Pass : cc.Ref +local Pass = {} + +return Pass \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/PhysicsBody.lua b/addons/cclua/cocos2d/library/cc/PhysicsBody.lua new file mode 100644 index 00000000..56188778 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/PhysicsBody.lua @@ -0,0 +1,442 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.PhysicsBody + +---A body affect by physics. +--- +---It can attach one or more shapes. +---If you create body with createXXX, it will automatically compute mass and moment with density your specified(which is PHYSICSBODY_MATERIAL_DEFAULT by default, and the density value is 0.1f), and it based on the formula: mass = density * area. +---If you create body with createEdgeXXX, the mass and moment will be PHYSICS_INFINITY by default. And it's a static body. +---You can change mass and moment with setMass() and setMoment(). And you can change the body to be dynamic or static by use function setDynamic(). +---@class cc.PhysicsBody : cc.Component +---@field angularDamping number Get angular damping. +---@field angularVelocity number get the angular velocity of a body +---@field angularVelocityLimit number get the max of angular velocity +---@field categoryBitmask integer Return bitmask of first shape.

\return If there is no shape in body, return default value.(0xFFFFFFFF) +---@field collisionBitmask integer Return bitmask of first shape.

\return If there is no shape in body, return default value.(0xFFFFFFFF) +---@field contactTestBitmask integer Return bitmask of first shape.

\return If there is no shape in body, return default value.(0x00000000) +---@field dynamic boolean Test the body is dynamic or not.

A dynamic body will effect with gravity. +---@field firstShape cc.PhysicsShape Get the first shape of the body shapes.

\return The first shape in this body. +---@field gravityEnabled boolean Whether this physics body is affected by the physics world's gravitational force. +---@field group integer Return group of first shape.

\return If there is no shape in body, return default value.(0) +---@field joints cc.PhysicsJoint[] get all joints the body have +---@field linearDamping number get linear damping. +---@field mass number Get the body mass. +---@field moment number Get the body moment of inertia. +---@field node cc.Node get the node the body set to. +---@field position cc.Vec2 get the body position. +---@field positionOffset cc.Vec2 get body position offset. +---@field resting boolean Whether the body is at rest. +---@field rotation number get the body rotation. +---@field rotationEnabled boolean Whether the body can rotation. +---@field rotationOffset number set the body rotation offset +---@field shapes any Get the body shapes.

\return A Vector object contains PhysicsShape pointer. +---@field tag integer Get the body's tag. +---@field velocity cc.Vec2 Get the velocity of a body. +---@field velocityLimit number get the max of velocity +---@field world cc.PhysicsWorld get the world body added to. +---@field COMPONENT_NAME string +local PhysicsBody = {} + +---Add mass to body. +--- +---@param mass number # If _mass(mass of the body) == PHYSICS_INFINITY, it remains. +---if mass == PHYSICS_INFINITY, _mass will be PHYSICS_INFINITY. +---if mass == -PHYSICS_INFINITY, _mass will not change. +---if mass + _mass <= 0, _mass will equal to MASS_DEFAULT(1.0) +---other wise, mass = mass + _mass; +function PhysicsBody:addMass(mass) end + +---Add moment of inertia to body. +--- +---@param moment number # If _moment(moment of the body) == PHYSICS_INFINITY, it remains. +---if moment == PHYSICS_INFINITY, _moment will be PHYSICS_INFINITY. +---if moment == -PHYSICS_INFINITY, _moment will not change. +---if moment + _moment <= 0, _moment will equal to MASS_DEFAULT(1.0) +---other wise, moment = moment + _moment; +function PhysicsBody:addMoment(moment) end + +---Add a shape to body. +---@param shape cc.PhysicsShape # The shape to be added. +---@param addMassAndMoment boolean # If this is true, the shape's mass and moment will be added to body. The default is true. +---@return cc.PhysicsShape # This shape's pointer if added success or nullptr if failed. +---@overload fun(self: cc.PhysicsBody, shape: cc.PhysicsShape): cc.PhysicsShape +function PhysicsBody:addShape(shape, addMassAndMoment) end + +---Applies a continuous force to body. +--- +---@param force cc.Vec2 # The force is applies to this body. +---@param offset cc.Vec2 # A Vec2 object, it is the offset from the body's center of gravity in world coordinates. +---@overload fun(self: cc.PhysicsBody, force: cc.Vec2) +function PhysicsBody:applyForce(force, offset) end + +---Applies a immediate force to body. +--- +---@param impulse cc.Vec2 # The impulse is applies to this body. +---@param offset cc.Vec2 # A Vec2 object, it is the offset from the body's center of gravity in world coordinates. +---@overload fun(self: cc.PhysicsBody, impulse: cc.Vec2) +function PhysicsBody:applyImpulse(impulse, offset) end + +---Applies a torque force to body. +--- +---@param torque number # The torque is applies to this body. +function PhysicsBody:applyTorque(torque) end + +---Create a body with default mass and moment. +--- +---This default mass value is 1.0. +---This default moment value is 200. +---@return cc.PhysicsBody # An autoreleased PhysicsBody object pointer. +--- +---Create a body with mass and default moment. +--- +---\param mass This body's mass. +---\return An autoreleased PhysicsBody object pointer. +---@overload fun(mass: number): cc.PhysicsBody +--- +---Create a body with mass and moment. +--- +---\param mass This body's mass. +---\param moment This body's moment. +---\return An autoreleased PhysicsBody object pointer. +---@overload fun(mass: number, moment: number): cc.PhysicsBody +function PhysicsBody.create() end + +---Create a body contains a box shape. +--- +---@param size cc.Size # Size contains this box's width and height. +---@param material cc.PhysicsMaterial # A PhysicsMaterial object, the default value is PHYSICSSHAPE_MATERIAL_DEFAULT. +---@param offset cc.Vec2 # A Vec2 object, it is the offset from the body's center of gravity in body local coordinates. +---@return cc.PhysicsBody # An autoreleased PhysicsBody object pointer. +---@overload fun(size: cc.Size): cc.PhysicsBody +---@overload fun(size: cc.Size, material: cc.PhysicsMaterial): cc.PhysicsBody +function PhysicsBody.createBox(size, material, offset) end + +---Create a body contains a circle. +--- +---@param radius number # A float number, it is the circle's radius. +---@param material cc.PhysicsMaterial # A PhysicsMaterial object, the default value is PHYSICSSHAPE_MATERIAL_DEFAULT. +---@param offset cc.Vec2 # A Vec2 object, it is the offset from the body's center of gravity in body local coordinates. +---@return cc.PhysicsBody # An autoreleased PhysicsBody object pointer. +---@overload fun(radius: number): cc.PhysicsBody +---@overload fun(radius: number, material: cc.PhysicsMaterial): cc.PhysicsBody +function PhysicsBody.createCircle(radius, material, offset) end + +---Create a body contains a EdgeBox shape. +---@param size cc.Size # Size contains this box's width and height. +---@param material cc.PhysicsMaterial # A PhysicsMaterial object, the default value is PHYSICSSHAPE_MATERIAL_DEFAULT. +---@param border number # It's a edge's border width. +---@param offset cc.Vec2 # A Vec2 object, it is the offset from the body's center of gravity in body local coordinates. +---@return cc.PhysicsBody # An autoreleased PhysicsBody object pointer. +---@overload fun(size: cc.Size): cc.PhysicsBody +---@overload fun(size: cc.Size, material: cc.PhysicsMaterial): cc.PhysicsBody +---@overload fun(size: cc.Size, material: cc.PhysicsMaterial, border: number): cc.PhysicsBody +function PhysicsBody.createEdgeBox(size, material, border, offset) end + +---Create a body contains a EdgeChain shape. +--- +---@param points cc.Vec2 # A Vec2 object pointer, it contains an array of points. +---@param count integer # An integer number, contains the count of the points array. +---@param material cc.PhysicsMaterial # A PhysicsMaterial object, the default value is PHYSICSSHAPE_MATERIAL_DEFAULT. +---@param border number # It's a edge's border width. +---@return cc.PhysicsBody # An autoreleased PhysicsBody object pointer. +---@overload fun(points: cc.Vec2, count: integer): cc.PhysicsBody +---@overload fun(points: cc.Vec2, count: integer, material: cc.PhysicsMaterial): cc.PhysicsBody +function PhysicsBody.createEdgeChain(points, count, material, border) end + +---Create a body contains a EdgePolygon shape. +--- +---@param points cc.Vec2 # Points is an array of Vec2 structs defining a convex hull with a clockwise winding. +---@param count integer # An integer number, contains the count of the points array. +---@param material cc.PhysicsMaterial # A PhysicsMaterial object, the default value is PHYSICSSHAPE_MATERIAL_DEFAULT. +---@param border number # It's a edge's border width. +---@return cc.PhysicsBody # An autoreleased PhysicsBody object pointer. +---@overload fun(points: cc.Vec2, count: integer): cc.PhysicsBody +---@overload fun(points: cc.Vec2, count: integer, material: cc.PhysicsMaterial): cc.PhysicsBody +function PhysicsBody.createEdgePolygon(points, count, material, border) end + +---Create a body contains a EdgeSegment shape. +--- +---@param a cc.Vec2 # It's the edge's begin position. +---@param b cc.Vec2 # It's the edge's end position. +---@param material cc.PhysicsMaterial # A PhysicsMaterial object, the default value is PHYSICSSHAPE_MATERIAL_DEFAULT. +---@param border number # It's a edge's border width. +---@return cc.PhysicsBody # An autoreleased PhysicsBody object pointer. +---@overload fun(a: cc.Vec2, b: cc.Vec2): cc.PhysicsBody +---@overload fun(a: cc.Vec2, b: cc.Vec2, material: cc.PhysicsMaterial): cc.PhysicsBody +function PhysicsBody.createEdgeSegment(a, b, material, border) end + +---Create a body contains a polygon shape. +--- +---@param points cc.Vec2 # Points is an array of Vec2 structs defining a convex hull with a clockwise winding. +---@param count integer # An integer number, contains the count of the points array. +---@param material cc.PhysicsMaterial # A PhysicsMaterial object, the default value is PHYSICSSHAPE_MATERIAL_DEFAULT. +---@param offset cc.Vec2 # A Vec2 object, it is the offset from the body's center of gravity in body local coordinates. +---@return cc.PhysicsBody # An autoreleased PhysicsBody object pointer. +---@overload fun(points: cc.Vec2, count: integer): cc.PhysicsBody +---@overload fun(points: cc.Vec2, count: integer, material: cc.PhysicsMaterial): cc.PhysicsBody +function PhysicsBody.createPolygon(points, count, material, offset) end + +---Get angular damping. +---@return number +function PhysicsBody:getAngularDamping() end + +---get the angular velocity of a body +---@return number +function PhysicsBody:getAngularVelocity() end + +---get the max of angular velocity +---@return number +function PhysicsBody:getAngularVelocityLimit() end + +---Return bitmask of first shape. +--- +---@return integer # If there is no shape in body, return default value.(0xFFFFFFFF) +function PhysicsBody:getCategoryBitmask() end + +---Return bitmask of first shape. +--- +---@return integer # If there is no shape in body, return default value.(0xFFFFFFFF) +function PhysicsBody:getCollisionBitmask() end + +---Return bitmask of first shape. +--- +---@return integer # If there is no shape in body, return default value.(0x00000000) +function PhysicsBody:getContactTestBitmask() end + +---Get the first shape of the body shapes. +--- +---@return cc.PhysicsShape # The first shape in this body. +function PhysicsBody:getFirstShape() end + +---Return group of first shape. +--- +---@return integer # If there is no shape in body, return default value.(0) +function PhysicsBody:getGroup() end + +---get all joints the body have +---@return cc.PhysicsJoint[] +function PhysicsBody:getJoints() end + +---get linear damping. +---@return number +function PhysicsBody:getLinearDamping() end + +---Get the body mass. +---@return number +function PhysicsBody:getMass() end + +---Get the body moment of inertia. +---@return number +function PhysicsBody:getMoment() end + +---get the node the body set to. +---@return cc.Node +function PhysicsBody:getNode() end + +---get the body position. +---@return cc.Vec2 +function PhysicsBody:getPosition() end + +---get body position offset. +---@return cc.Vec2 +function PhysicsBody:getPositionOffset() end + +---get the body rotation. +---@return number +function PhysicsBody:getRotation() end + +---set the body rotation offset +---@return number +function PhysicsBody:getRotationOffset() end + +---get the shape of the body. +--- +---@param tag integer # An integer number that identifies a PhysicsShape object. +---@return cc.PhysicsShape # A PhysicsShape object pointer or nullptr if no shapes were found. +function PhysicsBody:getShape(tag) end + +---Get the body shapes. +--- +---@return any # A Vector object contains PhysicsShape pointer. +function PhysicsBody:getShapes() end + +---Get the body's tag. +---@return integer +function PhysicsBody:getTag() end + +---Get the velocity of a body. +---@return cc.Vec2 +function PhysicsBody:getVelocity() end + +---Get the angular velocity of a body at a local point. +---@param point cc.Vec2 +---@return cc.Vec2 +function PhysicsBody:getVelocityAtLocalPoint(point) end + +---get the angular velocity of a body at a world point +---@param point cc.Vec2 +---@return cc.Vec2 +function PhysicsBody:getVelocityAtWorldPoint(point) end + +---get the max of velocity +---@return number +function PhysicsBody:getVelocityLimit() end + +---get the world body added to. +---@return cc.PhysicsWorld +function PhysicsBody:getWorld() end + +---Test the body is dynamic or not. +--- +---A dynamic body will effect with gravity. +---@return boolean +function PhysicsBody:isDynamic() end + +---Whether this physics body is affected by the physics world's gravitational force. +---@return boolean +function PhysicsBody:isGravityEnabled() end + +---Whether the body is at rest. +---@return boolean +function PhysicsBody:isResting() end + +---Whether the body can rotation. +---@return boolean +function PhysicsBody:isRotationEnabled() end + +---Convert the local point to world. +---@param point cc.Vec2 +---@return cc.Vec2 +function PhysicsBody:local2World(point) end + +---Remove all shapes. +--- +---@param reduceMassAndMoment boolean # If this is true, the body mass and moment will be reduced by shape. The default is true. +---@overload fun(self: cc.PhysicsBody) +function PhysicsBody:removeAllShapes(reduceMassAndMoment) end + +---remove the body from the world it added to +function PhysicsBody:removeFromWorld() end + +---Remove a shape from body. +---@param shape cc.PhysicsShape # Shape the shape to be removed. +---@param reduceMassAndMoment boolean # If this is true, the body mass and moment will be reduced by shape. The default is true. +---@overload fun(self: cc.PhysicsBody, shape: cc.PhysicsShape) +--- +---Remove a shape from body. +---\param tag The tag of the shape to be removed. +---\param reduceMassAndMoment If this is true, the body mass and moment will be reduced by shape. The default is true. +---@overload fun(self: cc.PhysicsBody, tag: integer, reduceMassAndMoment: boolean) +--- +---Remove a shape from body. +---\param tag The tag of the shape to be removed. +---\param reduceMassAndMoment If this is true, the body mass and moment will be reduced by shape. The default is true. +---@overload fun(self: cc.PhysicsBody, tag: integer) +function PhysicsBody:removeShape(shape, reduceMassAndMoment) end + +---reset all the force applied to body. +function PhysicsBody:resetForces() end + +---Set angular damping. +--- +---It is used to simulate fluid or air friction forces on the body. +---@param damping number # The value is 0.0f to 1.0f. +function PhysicsBody:setAngularDamping(damping) end + +---Set the angular velocity of a body. +--- +---@param velocity number # The angular velocity is set to this body. +function PhysicsBody:setAngularVelocity(velocity) end + +---set the max of angular velocity +---@param limit number +function PhysicsBody:setAngularVelocityLimit(limit) end + +---A mask that defines which categories this physics body belongs to. +--- +---Every physics body in a scene can be assigned to up to 32 different categories, each corresponding to a bit in the bit mask. You define the mask values used in your game. In conjunction with the collisionBitMask and contactTestBitMask properties, you define which physics bodies interact with each other and when your game is notified of these interactions. +---@param bitmask integer # An integer number, the default value is 0xFFFFFFFF (all bits set). +function PhysicsBody:setCategoryBitmask(bitmask) end + +---A mask that defines which categories of physics bodies can collide with this physics body. +--- +---When two physics bodies contact each other, a collision may occur. This body's collision mask is compared to the other body's category mask by performing a logical AND operation. If the result is a non-zero value, then this body is affected by the collision. Each body independently chooses whether it wants to be affected by the other body. For example, you might use this to avoid collision calculations that would make negligible changes to a body's velocity. +---@param bitmask integer # An integer number, the default value is 0xFFFFFFFF (all bits set). +function PhysicsBody:setCollisionBitmask(bitmask) end + +---A mask that defines which categories of bodies cause intersection notifications with this physics body. +--- +---When two bodies share the same space, each body's category mask is tested against the other body's contact mask by performing a logical AND operation. If either comparison results in a non-zero value, an PhysicsContact object is created and passed to the physics world’s delegate. For best performance, only set bits in the contacts mask for interactions you are interested in. +---@param bitmask integer # An integer number, the default value is 0x00000000 (all bits cleared). +function PhysicsBody:setContactTestBitmask(bitmask) end + +---Set dynamic to body. +--- +---A dynamic body will effect with gravity. +---@param dynamic boolean +function PhysicsBody:setDynamic(dynamic) end + +---Set the body is affected by the physics world's gravitational force or not. +---@param enable boolean +function PhysicsBody:setGravityEnable(enable) end + +---Set the group of body. +--- +---Collision groups let you specify an integral group index. You can have all fixtures with the same group index always collide (positive index) or never collide (negative index). +---It have high priority than bit masks. +---@param group integer +function PhysicsBody:setGroup(group) end + +---Set linear damping. +--- +---it is used to simulate fluid or air friction forces on the body. +---@param damping number # The value is 0.0f to 1.0f. +function PhysicsBody:setLinearDamping(damping) end + +---Set the body mass. +--- +---\attention If you need add/subtract mass to body, don't use setMass(getMass() +/- mass), because the mass of body may be equal to PHYSICS_INFINITY, it will cause some unexpected result, please use addMass() instead. +---@param mass number +function PhysicsBody:setMass(mass) end + +---Set the body moment of inertia. +--- +---\note If you need add/subtract moment to body, don't use setMoment(getMoment() +/- moment), because the moment of body may be equal to PHYSICS_INFINITY, it will cause some unexpected result, please use addMoment() instead. +---@param moment number +function PhysicsBody:setMoment(moment) end + +---set body position offset, it's the position witch relative to node +---@param position cc.Vec2 +function PhysicsBody:setPositionOffset(position) end + +---set body to rest +---@param rest boolean +function PhysicsBody:setResting(rest) end + +---Set the body is allow rotation or not +---@param enable boolean +function PhysicsBody:setRotationEnable(enable) end + +---set body rotation offset, it's the rotation witch relative to node +---@param rotation number +function PhysicsBody:setRotationOffset(rotation) end + +---set the body's tag. +---@param tag integer +function PhysicsBody:setTag(tag) end + +---Set the velocity of a body. +--- +---@param velocity cc.Vec2 # The velocity is set to this body. +function PhysicsBody:setVelocity(velocity) end + +---set the max of velocity +---@param limit number +function PhysicsBody:setVelocityLimit(limit) end + +---Convert the world point to local. +---@param point cc.Vec2 +---@return cc.Vec2 +function PhysicsBody:world2Local(point) end + +return PhysicsBody \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/PhysicsContact.lua b/addons/cclua/cocos2d/library/cc/PhysicsContact.lua new file mode 100644 index 00000000..6caf50a0 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/PhysicsContact.lua @@ -0,0 +1,39 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.PhysicsContact + +---Contact information. +--- +---It will created automatically when two shape contact with each other. And it will destroyed automatically when two shape separated. +---@class cc.PhysicsContact : cc.EventCustom +---@field data any Get data. \lua NA +---@field eventCode cc.PhysicsContact.EventCode Get the event code +---@field shapeA cc.PhysicsShape Get contact shape A. +---@field shapeB cc.PhysicsShape Get contact shape B. +local PhysicsContact = {} + +---Get data. +---\lua NA +---@return any +function PhysicsContact:getData() end + +---Get the event code +---@return cc.PhysicsContact.EventCode +function PhysicsContact:getEventCode() end + +---Get contact shape A. +---@return cc.PhysicsShape +function PhysicsContact:getShapeA() end + +---Get contact shape B. +---@return cc.PhysicsShape +function PhysicsContact:getShapeB() end + +---Set data to contact. +--- +---You must manage the memory yourself, Generally you can set data at contact begin, and destroy it at contact separate. +--- +---\lua NA +---@param data any +function PhysicsContact:setData(data) end + +return PhysicsContact \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/PhysicsContact/EventCode.lua b/addons/cclua/cocos2d/library/cc/PhysicsContact/EventCode.lua new file mode 100644 index 00000000..a94dc3a7 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/PhysicsContact/EventCode.lua @@ -0,0 +1,17 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.PhysicsContact.EventCode + +---@type cc.PhysicsContact.EventCode +local VALUE + +--- +---@enum cc.PhysicsContact.EventCode +local EventCode = { + BEGIN = 1, + NONE = 0, + POSTSOLVE = 3, + PRESOLVE = 2, + SEPARATE = 4, +} + +return EventCode \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/PhysicsContactPostSolve.lua b/addons/cclua/cocos2d/library/cc/PhysicsContactPostSolve.lua new file mode 100644 index 00000000..cbd6b61b --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/PhysicsContactPostSolve.lua @@ -0,0 +1,26 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.PhysicsContactPostSolve + +---Postsolve value generated when onContactPostSolve called. +---@class cc.PhysicsContactPostSolve +---@field friction number Get friction between two bodies. +---@field restitution number Get restitution between two bodies. +---@field surfaceVelocity cc.Vec2 Get surface velocity between two bodies. +local PhysicsContactPostSolve = {} + +---@return any +function PhysicsContactPostSolve:__olua_move() end + +---Get friction between two bodies. +---@return number +function PhysicsContactPostSolve:getFriction() end + +---Get restitution between two bodies. +---@return number +function PhysicsContactPostSolve:getRestitution() end + +---Get surface velocity between two bodies. +---@return cc.Vec2 +function PhysicsContactPostSolve:getSurfaceVelocity() end + +return PhysicsContactPostSolve \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/PhysicsContactPreSolve.lua b/addons/cclua/cocos2d/library/cc/PhysicsContactPreSolve.lua new file mode 100644 index 00000000..c5a49162 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/PhysicsContactPreSolve.lua @@ -0,0 +1,41 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.PhysicsContactPreSolve + +---Presolve value generated when onContactPreSolve called. +---@class cc.PhysicsContactPreSolve +---@field friction number Get friction between two bodies. +---@field restitution number Get restitution between two bodies. +---@field surfaceVelocity cc.Vec2 Get surface velocity between two bodies. +local PhysicsContactPreSolve = {} + +---@return any +function PhysicsContactPreSolve:__olua_move() end + +---Get friction between two bodies. +---@return number +function PhysicsContactPreSolve:getFriction() end + +---Get restitution between two bodies. +---@return number +function PhysicsContactPreSolve:getRestitution() end + +---Get surface velocity between two bodies. +---@return cc.Vec2 +function PhysicsContactPreSolve:getSurfaceVelocity() end + +---Ignore the rest of the contact presolve and postsolve callbacks. +function PhysicsContactPreSolve:ignore() end + +---Set the friction. +---@param friction number +function PhysicsContactPreSolve:setFriction(friction) end + +---Set the restitution. +---@param restitution number +function PhysicsContactPreSolve:setRestitution(restitution) end + +---Set the surface velocity. +---@param velocity cc.Vec2 +function PhysicsContactPreSolve:setSurfaceVelocity(velocity) end + +return PhysicsContactPreSolve \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/PhysicsJoint.lua b/addons/cclua/cocos2d/library/cc/PhysicsJoint.lua new file mode 100644 index 00000000..3e88e7da --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/PhysicsJoint.lua @@ -0,0 +1,67 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.PhysicsJoint + +---An PhysicsJoint object connects two physics bodies together. +---@class cc.PhysicsJoint +---@field bodyA cc.PhysicsBody Get physics body a connected to this joint. +---@field bodyB cc.PhysicsBody Get physics body b connected to this joint. +---@field collisionEnabled boolean Determines if the collision is enable. +---@field enabled boolean Determines if the joint is enable. +---@field maxForce number Get the max force setting. +---@field tag integer Get this joint's tag.

\return An integer number. +---@field world cc.PhysicsWorld Get the physics world. +local PhysicsJoint = {} + +---@return any +function PhysicsJoint:__olua_move() end + +---Get physics body a connected to this joint. +---@return cc.PhysicsBody +function PhysicsJoint:getBodyA() end + +---Get physics body b connected to this joint. +---@return cc.PhysicsBody +function PhysicsJoint:getBodyB() end + +---Get the max force setting. +---@return number +function PhysicsJoint:getMaxForce() end + +---Get this joint's tag. +--- +---@return integer # An integer number. +function PhysicsJoint:getTag() end + +---Get the physics world. +---@return cc.PhysicsWorld +function PhysicsJoint:getWorld() end + +---Determines if the collision is enable. +---@return boolean +function PhysicsJoint:isCollisionEnabled() end + +---Determines if the joint is enable. +---@return boolean +function PhysicsJoint:isEnabled() end + +---Remove the joint from the world. +function PhysicsJoint:removeFormWorld() end + +---Enable/disable the collision between two bodies. +---@param enable boolean +function PhysicsJoint:setCollisionEnable(enable) end + +---Enable/Disable the joint. +---@param enable boolean +function PhysicsJoint:setEnable(enable) end + +---Set the max force between two bodies. +---@param force number +function PhysicsJoint:setMaxForce(force) end + +---Set this joint's tag. +--- +---@param tag integer # An integer number that identifies a PhysicsJoint. +function PhysicsJoint:setTag(tag) end + +return PhysicsJoint \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/PhysicsJointDistance.lua b/addons/cclua/cocos2d/library/cc/PhysicsJointDistance.lua new file mode 100644 index 00000000..89083874 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/PhysicsJointDistance.lua @@ -0,0 +1,29 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.PhysicsJointDistance + +---Set the fixed distance with two bodies +---@class cc.PhysicsJointDistance : cc.PhysicsJoint +---@field distance number Get the distance of the anchor points. +local PhysicsJointDistance = {} + +---Create a fixed distance joint. +--- +---@param a cc.PhysicsBody # A is the body to connect. +---@param b cc.PhysicsBody # B is the body to connect. +---@param anchr1 cc.Vec2 # Anchr1 is the anchor point on body a. +---@param anchr2 cc.Vec2 # Anchr2 is the anchor point on body b. +---@return cc.PhysicsJointDistance # A object pointer. +function PhysicsJointDistance.construct(a, b, anchr1, anchr2) end + +---@return boolean +function PhysicsJointDistance:createConstraints() end + +---Get the distance of the anchor points. +---@return number +function PhysicsJointDistance:getDistance() end + +---Set the distance of the anchor points. +---@param distance number +function PhysicsJointDistance:setDistance(distance) end + +return PhysicsJointDistance \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/PhysicsJointFixed.lua b/addons/cclua/cocos2d/library/cc/PhysicsJointFixed.lua new file mode 100644 index 00000000..d75c9cf7 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/PhysicsJointFixed.lua @@ -0,0 +1,19 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.PhysicsJointFixed + +---A fixed joint fuses the two bodies together at a reference point. Fixed joints are useful for creating complex shapes that can be broken apart later. +---@class cc.PhysicsJointFixed : cc.PhysicsJoint +local PhysicsJointFixed = {} + +---Create a fixed joint. +--- +---@param a cc.PhysicsBody # A is the body to connect. +---@param b cc.PhysicsBody # B is the body to connect. +---@param anchr cc.Vec2 # It's the pivot position. +---@return cc.PhysicsJointFixed # A object pointer. +function PhysicsJointFixed.construct(a, b, anchr) end + +---@return boolean +function PhysicsJointFixed:createConstraints() end + +return PhysicsJointFixed \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/PhysicsJointGear.lua b/addons/cclua/cocos2d/library/cc/PhysicsJointGear.lua new file mode 100644 index 00000000..3ba51a48 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/PhysicsJointGear.lua @@ -0,0 +1,38 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.PhysicsJointGear + +---Keeps the angular velocity ratio of a pair of bodies constant. +---@class cc.PhysicsJointGear : cc.PhysicsJoint +---@field phase number Get the angular offset of the two bodies. +---@field ratio number Get the ratio. +local PhysicsJointGear = {} + +---Create a gear joint. +--- +---@param a cc.PhysicsBody # A is the body to connect. +---@param b cc.PhysicsBody # B is the body to connect. +---@param phase number # Phase is the initial angular offset of the two bodies. +---@param ratio number # Ratio is always measured in absolute terms. +---@return cc.PhysicsJointGear # A object pointer. +function PhysicsJointGear.construct(a, b, phase, ratio) end + +---@return boolean +function PhysicsJointGear:createConstraints() end + +---Get the angular offset of the two bodies. +---@return number +function PhysicsJointGear:getPhase() end + +---Get the ratio. +---@return number +function PhysicsJointGear:getRatio() end + +---Set the angular offset of the two bodies. +---@param phase number +function PhysicsJointGear:setPhase(phase) end + +---Set the ratio. +---@param ratchet number +function PhysicsJointGear:setRatio(ratchet) end + +return PhysicsJointGear \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/PhysicsJointGroove.lua b/addons/cclua/cocos2d/library/cc/PhysicsJointGroove.lua new file mode 100644 index 00000000..c0daf732 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/PhysicsJointGroove.lua @@ -0,0 +1,48 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.PhysicsJointGroove + +---Attach body a to a line, and attach body b to a dot. +---@class cc.PhysicsJointGroove : cc.PhysicsJoint +---@field anchr2 cc.Vec2 Get the anchor point on body b. +---@field grooveA cc.Vec2 Get the line begin position +---@field grooveB cc.Vec2 Get the line end position +local PhysicsJointGroove = {} + +---Create a groove joint. +--- +---@param a cc.PhysicsBody # A is the body to connect. +---@param b cc.PhysicsBody # B is the body to connect. +---@param grooveA cc.Vec2 # The line begin position. +---@param grooveB cc.Vec2 # The line end position. +---@param anchr2 cc.Vec2 # Anchr2 is the anchor point on body b. +---@return cc.PhysicsJointGroove # A object pointer. +function PhysicsJointGroove.construct(a, b, grooveA, grooveB, anchr2) end + +---@return boolean +function PhysicsJointGroove:createConstraints() end + +---Get the anchor point on body b. +---@return cc.Vec2 +function PhysicsJointGroove:getAnchr2() end + +---Get the line begin position +---@return cc.Vec2 +function PhysicsJointGroove:getGrooveA() end + +---Get the line end position +---@return cc.Vec2 +function PhysicsJointGroove:getGrooveB() end + +---Set the anchor point on body b. +---@param anchr2 cc.Vec2 +function PhysicsJointGroove:setAnchr2(anchr2) end + +---Set the line begin position +---@param grooveA cc.Vec2 +function PhysicsJointGroove:setGrooveA(grooveA) end + +---Set the line end position +---@param grooveB cc.Vec2 +function PhysicsJointGroove:setGrooveB(grooveB) end + +return PhysicsJointGroove \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/PhysicsJointLimit.lua b/addons/cclua/cocos2d/library/cc/PhysicsJointLimit.lua new file mode 100644 index 00000000..657d9937 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/PhysicsJointLimit.lua @@ -0,0 +1,67 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.PhysicsJointLimit + +---A limit joint imposes a maximum distance between the two bodies, as if they were connected by a rope. +---@class cc.PhysicsJointLimit : cc.PhysicsJoint +---@field anchr1 cc.Vec2 Get the anchor point on body a. +---@field anchr2 cc.Vec2 Get the anchor point on body b. +---@field max number Get the allowed max distance of the anchor points. +---@field min number Get the allowed min distance of the anchor points. +local PhysicsJointLimit = {} + +---Create a limit joint. +--- +---@param a cc.PhysicsBody # A is the body to connect. +---@param b cc.PhysicsBody # B is the body to connect. +---@param anchr1 cc.Vec2 # Anchr1 is the anchor point on body a. +---@param anchr2 cc.Vec2 # Anchr2 is the anchor point on body b. +---@return cc.PhysicsJointLimit # A object pointer. +--- +---Create a limit joint. +--- +---\param a A is the body to connect. +---\param b B is the body to connect. +---\param anchr1 Anchr1 is the anchor point on body a. +---\param anchr2 Anchr2 is the anchor point on body b. +---\param min Define the allowed min distance of the anchor points. +---\param max Define the allowed max distance of the anchor points. +---\return A object pointer. +---@overload fun(a: cc.PhysicsBody, b: cc.PhysicsBody, anchr1: cc.Vec2, anchr2: cc.Vec2, min: number, max: number): cc.PhysicsJointLimit +function PhysicsJointLimit.construct(a, b, anchr1, anchr2) end + +---@return boolean +function PhysicsJointLimit:createConstraints() end + +---Get the anchor point on body a. +---@return cc.Vec2 +function PhysicsJointLimit:getAnchr1() end + +---Get the anchor point on body b. +---@return cc.Vec2 +function PhysicsJointLimit:getAnchr2() end + +---Get the allowed max distance of the anchor points. +---@return number +function PhysicsJointLimit:getMax() end + +---Get the allowed min distance of the anchor points. +---@return number +function PhysicsJointLimit:getMin() end + +---Set the anchor point on body a. +---@param anchr1 cc.Vec2 +function PhysicsJointLimit:setAnchr1(anchr1) end + +---Set the anchor point on body b. +---@param anchr2 cc.Vec2 +function PhysicsJointLimit:setAnchr2(anchr2) end + +---Set the max distance of the anchor points. +---@param max number +function PhysicsJointLimit:setMax(max) end + +---Set the min distance of the anchor points. +---@param min number +function PhysicsJointLimit:setMin(min) end + +return PhysicsJointLimit \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/PhysicsJointMotor.lua b/addons/cclua/cocos2d/library/cc/PhysicsJointMotor.lua new file mode 100644 index 00000000..d07d365f --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/PhysicsJointMotor.lua @@ -0,0 +1,28 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.PhysicsJointMotor + +---Keeps the relative angular velocity of a pair of bodies constant. +---@class cc.PhysicsJointMotor : cc.PhysicsJoint +---@field rate number Get the relative angular velocity. +local PhysicsJointMotor = {} + +---Create a motor joint. +--- +---@param a cc.PhysicsBody # A is the body to connect. +---@param b cc.PhysicsBody # B is the body to connect. +---@param rate number # Rate is the desired relative angular velocity. +---@return cc.PhysicsJointMotor # A object pointer. +function PhysicsJointMotor.construct(a, b, rate) end + +---@return boolean +function PhysicsJointMotor:createConstraints() end + +---Get the relative angular velocity. +---@return number +function PhysicsJointMotor:getRate() end + +---Set the relative angular velocity. +---@param rate number +function PhysicsJointMotor:setRate(rate) end + +return PhysicsJointMotor \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/PhysicsJointPin.lua b/addons/cclua/cocos2d/library/cc/PhysicsJointPin.lua new file mode 100644 index 00000000..34752226 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/PhysicsJointPin.lua @@ -0,0 +1,28 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.PhysicsJointPin + +---A pin joint allows the two bodies to independently rotate around the anchor point as if pinned together. +---@class cc.PhysicsJointPin : cc.PhysicsJoint +local PhysicsJointPin = {} + +---Create a pin joint. +--- +---@param a cc.PhysicsBody # A is the body to connect. +---@param b cc.PhysicsBody # B is the body to connect. +---@param pivot cc.Vec2 # It's the pivot position. +---@return cc.PhysicsJointPin # A object pointer. +--- +---Create a pin joint. +--- +---\param a A is the body to connect. +---\param b B is the body to connect. +---\param anchr1 Anchr1 is the anchor point on body a. +---\param anchr2 Anchr2 is the anchor point on body b. +---\return A object pointer. +---@overload fun(a: cc.PhysicsBody, b: cc.PhysicsBody, anchr1: cc.Vec2, anchr2: cc.Vec2): cc.PhysicsJointPin +function PhysicsJointPin.construct(a, b, pivot) end + +---@return boolean +function PhysicsJointPin:createConstraints() end + +return PhysicsJointPin \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/PhysicsJointRatchet.lua b/addons/cclua/cocos2d/library/cc/PhysicsJointRatchet.lua new file mode 100644 index 00000000..31b63e90 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/PhysicsJointRatchet.lua @@ -0,0 +1,47 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.PhysicsJointRatchet + +---Works like a socket wrench. +---@class cc.PhysicsJointRatchet : cc.PhysicsJoint +---@field angle number Get the ratchet angle. +---@field phase number Get the initial offset. +---@field ratchet number Get the distance between "clicks". +local PhysicsJointRatchet = {} + +---Create a ratchet joint. +--- +---@param a cc.PhysicsBody # A is the body to connect. +---@param b cc.PhysicsBody # B is the body to connect. +---@param phase number # Phase is the initial offset to use when deciding where the ratchet angles are. +---@param ratchet number # Ratchet is the distance between "clicks". +---@return cc.PhysicsJointRatchet # A object pointer. +function PhysicsJointRatchet.construct(a, b, phase, ratchet) end + +---@return boolean +function PhysicsJointRatchet:createConstraints() end + +---Get the ratchet angle. +---@return number +function PhysicsJointRatchet:getAngle() end + +---Get the initial offset. +---@return number +function PhysicsJointRatchet:getPhase() end + +---Get the distance between "clicks". +---@return number +function PhysicsJointRatchet:getRatchet() end + +---Set the ratchet angle. +---@param angle number +function PhysicsJointRatchet:setAngle(angle) end + +---Set the initial offset. +---@param phase number +function PhysicsJointRatchet:setPhase(phase) end + +---Set the distance between "clicks". +---@param ratchet number +function PhysicsJointRatchet:setRatchet(ratchet) end + +return PhysicsJointRatchet \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/PhysicsJointRotaryLimit.lua b/addons/cclua/cocos2d/library/cc/PhysicsJointRotaryLimit.lua new file mode 100644 index 00000000..3ec23068 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/PhysicsJointRotaryLimit.lua @@ -0,0 +1,45 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.PhysicsJointRotaryLimit + +---Likes a limit joint, but works with rotary. +---@class cc.PhysicsJointRotaryLimit : cc.PhysicsJoint +---@field max number Get the max rotation limit. +---@field min number Get the min rotation limit. +local PhysicsJointRotaryLimit = {} + +---Create a limit rotary joint. +--- +---@param a cc.PhysicsBody # A is the body to connect. +---@param b cc.PhysicsBody # B is the body to connect. +---@param min number # It's min rotation limit in radians. +---@param max number # It's max rotation limit in radians. +---@return cc.PhysicsJointRotaryLimit # A object pointer. +--- +---Create a limit rotary joint. +--- +---\param a A is the body to connect. +---\param b B is the body to connect. +---\return A object pointer. +---@overload fun(a: cc.PhysicsBody, b: cc.PhysicsBody): cc.PhysicsJointRotaryLimit +function PhysicsJointRotaryLimit.construct(a, b, min, max) end + +---@return boolean +function PhysicsJointRotaryLimit:createConstraints() end + +---Get the max rotation limit. +---@return number +function PhysicsJointRotaryLimit:getMax() end + +---Get the min rotation limit. +---@return number +function PhysicsJointRotaryLimit:getMin() end + +---Set the max rotation limit. +---@param max number +function PhysicsJointRotaryLimit:setMax(max) end + +---Set the min rotation limit. +---@param min number +function PhysicsJointRotaryLimit:setMin(min) end + +return PhysicsJointRotaryLimit \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/PhysicsJointRotarySpring.lua b/addons/cclua/cocos2d/library/cc/PhysicsJointRotarySpring.lua new file mode 100644 index 00000000..7a28cc8b --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/PhysicsJointRotarySpring.lua @@ -0,0 +1,47 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.PhysicsJointRotarySpring + +---Likes a spring joint, but works with rotary. +---@class cc.PhysicsJointRotarySpring : cc.PhysicsJoint +---@field damping number Get the spring soft constant. +---@field restAngle number Get the relative angle in radians from the body a to b. +---@field stiffness number Get the spring constant. +local PhysicsJointRotarySpring = {} + +---Create a damped rotary spring joint. +--- +---@param a cc.PhysicsBody # A is the body to connect. +---@param b cc.PhysicsBody # B is the body to connect. +---@param stiffness number # It's the spring constant. +---@param damping number # It's how soft to make the damping of the spring. +---@return cc.PhysicsJointRotarySpring # A object pointer. +function PhysicsJointRotarySpring.construct(a, b, stiffness, damping) end + +---@return boolean +function PhysicsJointRotarySpring:createConstraints() end + +---Get the spring soft constant. +---@return number +function PhysicsJointRotarySpring:getDamping() end + +---Get the relative angle in radians from the body a to b. +---@return number +function PhysicsJointRotarySpring:getRestAngle() end + +---Get the spring constant. +---@return number +function PhysicsJointRotarySpring:getStiffness() end + +---Set the spring soft constant. +---@param damping number +function PhysicsJointRotarySpring:setDamping(damping) end + +---Set the relative angle in radians from the body a to b. +---@param restAngle number +function PhysicsJointRotarySpring:setRestAngle(restAngle) end + +---Set the spring constant. +---@param stiffness number +function PhysicsJointRotarySpring:setStiffness(stiffness) end + +return PhysicsJointRotarySpring \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/PhysicsJointSpring.lua b/addons/cclua/cocos2d/library/cc/PhysicsJointSpring.lua new file mode 100644 index 00000000..81fc0f6f --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/PhysicsJointSpring.lua @@ -0,0 +1,67 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.PhysicsJointSpring + +---Connecting two physics bodies together with a spring. +---@class cc.PhysicsJointSpring : cc.PhysicsJoint +---@field anchr1 cc.Vec2 Get the anchor point on body a. +---@field anchr2 cc.Vec2 Get the anchor point on body b. +---@field damping number Get the spring soft constant. +---@field restLength number Get the distance of the anchor points. +---@field stiffness number Get the spring constant. +local PhysicsJointSpring = {} + +---Create a fixed distance joint. +--- +---@param a cc.PhysicsBody # A is the body to connect. +---@param b cc.PhysicsBody # B is the body to connect. +---@param anchr1 cc.Vec2 # Anchr1 is the anchor point on body a. +---@param anchr2 cc.Vec2 # Anchr2 is the anchor point on body b. +---@param stiffness number # It's the spring constant. +---@param damping number # It's how soft to make the damping of the spring. +---@return cc.PhysicsJointSpring # A object pointer. +function PhysicsJointSpring.construct(a, b, anchr1, anchr2, stiffness, damping) end + +---@return boolean +function PhysicsJointSpring:createConstraints() end + +---Get the anchor point on body a. +---@return cc.Vec2 +function PhysicsJointSpring:getAnchr1() end + +---Get the anchor point on body b. +---@return cc.Vec2 +function PhysicsJointSpring:getAnchr2() end + +---Get the spring soft constant. +---@return number +function PhysicsJointSpring:getDamping() end + +---Get the distance of the anchor points. +---@return number +function PhysicsJointSpring:getRestLength() end + +---Get the spring constant. +---@return number +function PhysicsJointSpring:getStiffness() end + +---Set the anchor point on body a. +---@param anchr1 cc.Vec2 +function PhysicsJointSpring:setAnchr1(anchr1) end + +---Set the anchor point on body b. +---@param anchr2 cc.Vec2 +function PhysicsJointSpring:setAnchr2(anchr2) end + +---Set the spring soft constant. +---@param damping number +function PhysicsJointSpring:setDamping(damping) end + +---Set the distance of the anchor points. +---@param restLength number +function PhysicsJointSpring:setRestLength(restLength) end + +---Set the spring constant. +---@param stiffness number +function PhysicsJointSpring:setStiffness(stiffness) end + +return PhysicsJointSpring \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/PhysicsMaterial.lua b/addons/cclua/cocos2d/library/cc/PhysicsMaterial.lua new file mode 100644 index 00000000..c4fbff65 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/PhysicsMaterial.lua @@ -0,0 +1,21 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.PhysicsMaterial + +--- +---@class cc.PhysicsMaterial +---@field density number +---@field friction number +---@field restitution number +local PhysicsMaterial = {} + +---@return any +function PhysicsMaterial:__gc() end + +---@return any +function PhysicsMaterial:__olua_move() end + +---@return cc.PhysicsMaterial +---@overload fun(aDensity: number, aRestitution: number, aFriction: number): cc.PhysicsMaterial +function PhysicsMaterial.new() end + +return PhysicsMaterial \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/PhysicsQueryPointCallbackFunc.lua b/addons/cclua/cocos2d/library/cc/PhysicsQueryPointCallbackFunc.lua new file mode 100644 index 00000000..ec584720 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/PhysicsQueryPointCallbackFunc.lua @@ -0,0 +1,14 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.PhysicsQueryPointCallbackFunc + +--- +--- +---std::function +---@class cc.PhysicsQueryPointCallbackFunc +local PhysicsQueryPointCallbackFunc = {} + +---@return cc.PhysicsQueryPointCallbackFunc + +function PhysicsQueryPointCallbackFunc:__call() end + +return PhysicsQueryPointCallbackFunc \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/PhysicsQueryRectCallbackFunc.lua b/addons/cclua/cocos2d/library/cc/PhysicsQueryRectCallbackFunc.lua new file mode 100644 index 00000000..1d3f8c09 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/PhysicsQueryRectCallbackFunc.lua @@ -0,0 +1,14 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.PhysicsQueryRectCallbackFunc + +--- +--- +---std::function +---@class cc.PhysicsQueryRectCallbackFunc +local PhysicsQueryRectCallbackFunc = {} + +---@return cc.PhysicsQueryRectCallbackFunc + +function PhysicsQueryRectCallbackFunc:__call() end + +return PhysicsQueryRectCallbackFunc \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/PhysicsRayCastCallbackFunc.lua b/addons/cclua/cocos2d/library/cc/PhysicsRayCastCallbackFunc.lua new file mode 100644 index 00000000..fae4fc6a --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/PhysicsRayCastCallbackFunc.lua @@ -0,0 +1,14 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.PhysicsRayCastCallbackFunc + +--- +--- +---std::function +---@class cc.PhysicsRayCastCallbackFunc +local PhysicsRayCastCallbackFunc = {} + +---@return cc.PhysicsRayCastCallbackFunc + +function PhysicsRayCastCallbackFunc:__call() end + +return PhysicsRayCastCallbackFunc \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/PhysicsRayCastInfo.lua b/addons/cclua/cocos2d/library/cc/PhysicsRayCastInfo.lua new file mode 100644 index 00000000..92e4172f --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/PhysicsRayCastInfo.lua @@ -0,0 +1,21 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.PhysicsRayCastInfo + +--- +---@class cc.PhysicsRayCastInfo +---@field contact cc.Vec2 +---@field data any +---@field end cc.Vec2 +---@field fraction number +---@field normal cc.Vec2 +---@field shape cc.PhysicsShape +---@field start cc.Vec2 +local PhysicsRayCastInfo = {} + +---@return any +function PhysicsRayCastInfo:__gc() end + +---@return any +function PhysicsRayCastInfo:__olua_move() end + +return PhysicsRayCastInfo \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/PhysicsShape.lua b/addons/cclua/cocos2d/library/cc/PhysicsShape.lua new file mode 100644 index 00000000..4dc96dcd --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/PhysicsShape.lua @@ -0,0 +1,211 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.PhysicsShape + +---A shape for body. You do not create PhysicsWorld objects directly, instead, you can view PhysicsBody to see how to create it. +---@class cc.PhysicsShape : cc.Ref +---@field area number Return this shape's area.

\return A float number. +---@field body cc.PhysicsBody Get the body that this shape attaches.

\return A PhysicsBody object pointer. +---@field categoryBitmask integer Get a mask that defines which categories this physics body belongs to.

\return An integer number. +---@field center cc.Vec2 Get this shape's center position.

This function should be overridden in inherit classes. \return A Vec2 object. +---@field collisionBitmask integer Get a mask that defines which categories of physics bodies can collide with this physics body.

\return An integer number. +---@field contactTestBitmask integer Get a mask that defines which categories of bodies cause intersection notifications with this physics body.

\return An integer number. +---@field density number Get this shape's density.

\return A float number. +---@field friction number Get this shape's friction.

\return A float number. +---@field group integer Get the group of body.

\return An integer number. +---@field mass number Get the mass of this shape.

\return A float number. +---@field material cc.PhysicsMaterial Get this shape's PhysicsMaterial object.

\return A PhysicsMaterial object reference. +---@field moment number Get this shape's moment.

\return A float number. +---@field offset cc.Vec2 Get this shape's position offset.

This function should be overridden in inherit classes. \return A Vec2 object. +---@field restitution number Get this shape's restitution.

\return A float number. +---@field sensor boolean +---@field tag integer Get this shape's tag.

\return An integer number. +---@field type cc.PhysicsShape.Type Return this shape's type.

\return A Type object. +local PhysicsShape = {} + +---Calculate the default moment value. +--- +---This function should be overridden in inherit classes. +---@return number # A float number, equals 0.0. +function PhysicsShape:calculateDefaultMoment() end + +---Test point is inside this shape or not. +--- +---@param point cc.Vec2 # A Vec2 object. +---@return boolean # A bool object. +function PhysicsShape:containsPoint(point) end + +---Return this shape's area. +--- +---@return number # A float number. +function PhysicsShape:getArea() end + +---Get the body that this shape attaches. +--- +---@return cc.PhysicsBody # A PhysicsBody object pointer. +function PhysicsShape:getBody() end + +---Get a mask that defines which categories this physics body belongs to. +--- +---@return integer # An integer number. +function PhysicsShape:getCategoryBitmask() end + +---Get this shape's center position. +--- +---This function should be overridden in inherit classes. +---@return cc.Vec2 # A Vec2 object. +function PhysicsShape:getCenter() end + +---Get a mask that defines which categories of physics bodies can collide with this physics body. +--- +---@return integer # An integer number. +function PhysicsShape:getCollisionBitmask() end + +---Get a mask that defines which categories of bodies cause intersection notifications with this physics body. +--- +---@return integer # An integer number. +function PhysicsShape:getContactTestBitmask() end + +---Get this shape's density. +--- +---@return number # A float number. +function PhysicsShape:getDensity() end + +---Get this shape's friction. +--- +---@return number # A float number. +function PhysicsShape:getFriction() end + +---Get the group of body. +--- +---@return integer # An integer number. +function PhysicsShape:getGroup() end + +---Get the mass of this shape. +--- +---@return number # A float number. +function PhysicsShape:getMass() end + +---Get this shape's PhysicsMaterial object. +--- +---@return cc.PhysicsMaterial # A PhysicsMaterial object reference. +function PhysicsShape:getMaterial() end + +---Get this shape's moment. +--- +---@return number # A float number. +function PhysicsShape:getMoment() end + +---Get this shape's position offset. +--- +---This function should be overridden in inherit classes. +---@return cc.Vec2 # A Vec2 object. +function PhysicsShape:getOffset() end + +---Get center of the polygon points. +--- +---@param points cc.Vec2 # A Vec2 object pointer. +---@param count integer # An integer number. +---@return cc.Vec2 # A Vec2 object. +function PhysicsShape.getPolygonCenter(points, count) end + +---Get this shape's restitution. +--- +---@return number # A float number. +function PhysicsShape:getRestitution() end + +---Get this shape's tag. +--- +---@return integer # An integer number. +function PhysicsShape:getTag() end + +---Return this shape's type. +--- +---@return cc.PhysicsShape.Type # A Type object. +function PhysicsShape:getType() end + +---@return boolean +function PhysicsShape:isSensor() end + +---Move the points to the center. +--- +---@param points cc.Vec2 # A Vec2 object pointer. +---@param count integer # An integer number. +---@param center cc.Vec2 # A Vec2 object, default value is Vec2(0,0). +---@overload fun(points: cc.Vec2, count: integer) +function PhysicsShape.recenterPoints(points, count, center) end + +---Set a mask that defines which categories this physics body belongs to. +--- +---Every physics body in a scene can be assigned to up to 32 different categories, each corresponding to a bit in the bit mask. You define the mask values used in your game. In conjunction with the collisionBitMask and contactTestBitMask properties, you define which physics bodies interact with each other and when your game is notified of these interactions. +---@param bitmask integer # An integer number, the default value is 0xFFFFFFFF (all bits set). +function PhysicsShape:setCategoryBitmask(bitmask) end + +---A mask that defines which categories of physics bodies can collide with this physics body. +--- +---When two physics bodies contact each other, a collision may occur. This body's collision mask is compared to the other body's category mask by performing a logical AND operation. If the result is a non-zero value, then this body is affected by the collision. Each body independently chooses whether it wants to be affected by the other body. For example, you might use this to avoid collision calculations that would make negligible changes to a body's velocity. +---@param bitmask integer # An integer number, the default value is 0xFFFFFFFF (all bits set). +function PhysicsShape:setCollisionBitmask(bitmask) end + +---A mask that defines which categories of bodies cause intersection notifications with this physics body. +--- +---When two bodies share the same space, each body's category mask is tested against the other body's contact mask by performing a logical AND operation. If either comparison results in a non-zero value, an PhysicsContact object is created and passed to the physics world’s delegate. For best performance, only set bits in the contacts mask for interactions you are interested in. +---@param bitmask integer # An integer number, the default value is 0x00000000 (all bits cleared). +function PhysicsShape:setContactTestBitmask(bitmask) end + +---Set this shape's density. +--- +---It will change the body's mass this shape attaches. +--- +---@param density number # A float number. +function PhysicsShape:setDensity(density) end + +---Set this shape's friction. +--- +---It will change the shape's friction. +--- +---@param friction number # A float number. +function PhysicsShape:setFriction(friction) end + +---Set the group of body. +--- +---Collision groups let you specify an integral group index. You can have all fixtures with the same group index always collide (positive index) or never collide (negative index). +---@param group integer # An integer number, it have high priority than bit masks. +function PhysicsShape:setGroup(group) end + +---Set this shape's mass. +--- +---It will change the body's mass this shape attaches. +--- +---@param mass number # A float number. +function PhysicsShape:setMass(mass) end + +---Set this shape's material. +--- +---It will change the shape's mass, elasticity and friction. +--- +---@param material cc.PhysicsMaterial # A PhysicsMaterial object. +function PhysicsShape:setMaterial(material) end + +---Set this shape's moment. +--- +---It will change the body's moment this shape attaches. +--- +---@param moment number # A float number. +function PhysicsShape:setMoment(moment) end + +---Set this shape's restitution. +--- +---It will change the shape's elasticity. +--- +---@param restitution number # A float number. +function PhysicsShape:setRestitution(restitution) end + +---@param sensor boolean +function PhysicsShape:setSensor(sensor) end + +---Set this shape's tag. +--- +---@param tag integer # An integer number that identifies a shape object. +function PhysicsShape:setTag(tag) end + +return PhysicsShape \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/PhysicsShape/Type.lua b/addons/cclua/cocos2d/library/cc/PhysicsShape/Type.lua new file mode 100644 index 00000000..b91c5c61 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/PhysicsShape/Type.lua @@ -0,0 +1,24 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.PhysicsShape.Type + +---@type cc.PhysicsShape.Type +local VALUE + +--- +---@enum cc.PhysicsShape.Type +local Type = { + BOX = 2, + CIRCLE = 1, + EDGEBOX = 5, + EDGECHAIN = 7, + ---\deprecated Use Type::EDGEPOLYGON instead. + EDGEPOLYGEN = 6, + EDGEPOLYGON = 6, + EDGESEGMENT = 4, + ---\deprecated Use Type::POLYGON instead. + POLYGEN = 3, + POLYGON = 3, + UNKNOWN = 0, +} + +return Type \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/PhysicsShapeBox.lua b/addons/cclua/cocos2d/library/cc/PhysicsShapeBox.lua new file mode 100644 index 00000000..c728c917 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/PhysicsShapeBox.lua @@ -0,0 +1,26 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.PhysicsShapeBox + +---A box shape. +---@class cc.PhysicsShapeBox : cc.PhysicsShapePolygon +---@field size cc.Size Get this box's width and height.

\return An Size object. +local PhysicsShapeBox = {} + +---Creates a PhysicsShapeBox with specified value. +--- +---@param size cc.Size # Size contains this box's width and height. +---@param material cc.PhysicsMaterial # A PhysicsMaterial object, the default value is PHYSICSSHAPE_MATERIAL_DEFAULT. +---@param offset cc.Vec2 # A Vec2 object, it is the offset from the body's center of gravity in body local coordinates. +---@return cc.PhysicsShapeBox # An autoreleased PhysicsShapeBox object pointer. +---@param radius number +---@overload fun(size: cc.Size): cc.PhysicsShapeBox +---@overload fun(size: cc.Size, material: cc.PhysicsMaterial): cc.PhysicsShapeBox +---@overload fun(size: cc.Size, material: cc.PhysicsMaterial, offset: cc.Vec2): cc.PhysicsShapeBox +function PhysicsShapeBox.create(size, material, offset, radius) end + +---Get this box's width and height. +--- +---@return cc.Size # An Size object. +function PhysicsShapeBox:getSize() end + +return PhysicsShapeBox \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/PhysicsShapeCircle.lua b/addons/cclua/cocos2d/library/cc/PhysicsShapeCircle.lua new file mode 100644 index 00000000..ea311bf7 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/PhysicsShapeCircle.lua @@ -0,0 +1,39 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.PhysicsShapeCircle + +---A circle shape. +---@class cc.PhysicsShapeCircle : cc.PhysicsShape +---@field radius number Get the circle's radius.

\return A float number. +local PhysicsShapeCircle = {} + +---Calculate the area of a circle with specified radius. +--- +---@param radius number # A float number +---@return number # A float number +function PhysicsShapeCircle.calculateArea(radius) end + +---Calculate the moment of a circle with specified value. +--- +---@param mass number # A float number +---@param radius number # A float number +---@param offset cc.Vec2 # A Vec2 object, it is the offset from the body's center of gravity in body local coordinates. +---@return number # A float number +---@overload fun(mass: number, radius: number): number +function PhysicsShapeCircle.calculateMoment(mass, radius, offset) end + +---Creates a PhysicsShapeCircle with specified value. +--- +---@param radius number # A float number, it is the circle's radius. +---@param material cc.PhysicsMaterial # A PhysicsMaterial object, the default value is PHYSICSSHAPE_MATERIAL_DEFAULT. +---@param offset cc.Vec2 # A Vec2 object, it is the offset from the body's center of gravity in body local coordinates. +---@return cc.PhysicsShapeCircle # An autoreleased PhysicsShapeCircle object pointer. +---@overload fun(radius: number): cc.PhysicsShapeCircle +---@overload fun(radius: number, material: cc.PhysicsMaterial): cc.PhysicsShapeCircle +function PhysicsShapeCircle.create(radius, material, offset) end + +---Get the circle's radius. +--- +---@return number # A float number. +function PhysicsShapeCircle:getRadius() end + +return PhysicsShapeCircle \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/PhysicsShapeEdgeBox.lua b/addons/cclua/cocos2d/library/cc/PhysicsShapeEdgeBox.lua new file mode 100644 index 00000000..5de75fd7 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/PhysicsShapeEdgeBox.lua @@ -0,0 +1,20 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.PhysicsShapeEdgeBox + +---An edge box shape. +---@class cc.PhysicsShapeEdgeBox : cc.PhysicsShapeEdgePolygon +local PhysicsShapeEdgeBox = {} + +---Creates a PhysicsShapeEdgeBox with specified value. +--- +---@param size cc.Size # Size contains this box's width and height. +---@param material cc.PhysicsMaterial # A PhysicsMaterial object, the default value is PHYSICSSHAPE_MATERIAL_DEFAULT. +---@param border number # It's a edge's border width. +---@param offset cc.Vec2 # A Vec2 object, it is the offset from the body's center of gravity in body local coordinates. +---@return cc.PhysicsShapeEdgeBox # An autoreleased PhysicsShapeEdgeBox object pointer. +---@overload fun(size: cc.Size): cc.PhysicsShapeEdgeBox +---@overload fun(size: cc.Size, material: cc.PhysicsMaterial): cc.PhysicsShapeEdgeBox +---@overload fun(size: cc.Size, material: cc.PhysicsMaterial, border: number): cc.PhysicsShapeEdgeBox +function PhysicsShapeEdgeBox.create(size, material, border, offset) end + +return PhysicsShapeEdgeBox \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/PhysicsShapeEdgeChain.lua b/addons/cclua/cocos2d/library/cc/PhysicsShapeEdgeChain.lua new file mode 100644 index 00000000..74a08fd2 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/PhysicsShapeEdgeChain.lua @@ -0,0 +1,30 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.PhysicsShapeEdgeChain + +---A chain shape. +---@class cc.PhysicsShapeEdgeChain : cc.PhysicsShape +---@field pointsCount integer Get this chain's points array count.

\return An integer number. +local PhysicsShapeEdgeChain = {} + +---Creates a PhysicsShapeEdgeChain with specified value. +--- +---@param points cc.Vec2 # A Vec2 object pointer, it contains an array of points. +---@param count integer # An integer number, contains the count of the points array. +---@param material cc.PhysicsMaterial # A PhysicsMaterial object, the default value is PHYSICSSHAPE_MATERIAL_DEFAULT. +---@param border number # It's a edge's border width. +---@return cc.PhysicsShapeEdgeChain # An autoreleased PhysicsShapeEdgeChain object pointer. +---@overload fun(points: cc.Vec2, count: integer): cc.PhysicsShapeEdgeChain +---@overload fun(points: cc.Vec2, count: integer, material: cc.PhysicsMaterial): cc.PhysicsShapeEdgeChain +function PhysicsShapeEdgeChain.create(points, count, material, border) end + +---Get this chain's points array. +--- +---@param outPoints cc.Vec2 # A Vec2 array pointer. +function PhysicsShapeEdgeChain:getPoints(outPoints) end + +---Get this chain's points array count. +--- +---@return integer # An integer number. +function PhysicsShapeEdgeChain:getPointsCount() end + +return PhysicsShapeEdgeChain \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/PhysicsShapeEdgePolygon.lua b/addons/cclua/cocos2d/library/cc/PhysicsShapeEdgePolygon.lua new file mode 100644 index 00000000..4de779ea --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/PhysicsShapeEdgePolygon.lua @@ -0,0 +1,30 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.PhysicsShapeEdgePolygon + +---An edge polygon shape. +---@class cc.PhysicsShapeEdgePolygon : cc.PhysicsShape +---@field pointsCount integer Get this polygon's points array count.

\return An integer number. +local PhysicsShapeEdgePolygon = {} + +---Creates a PhysicsShapeEdgePolygon with specified value. +--- +---@param points cc.Vec2 # A Vec2 object pointer, it contains an array of points. +---@param count integer # An integer number, contains the count of the points array. +---@param material cc.PhysicsMaterial # A PhysicsMaterial object, the default value is PHYSICSSHAPE_MATERIAL_DEFAULT. +---@param border number # It's a edge's border width. +---@return cc.PhysicsShapeEdgePolygon # An autoreleased PhysicsShapeEdgePolygon object pointer. +---@overload fun(points: cc.Vec2, count: integer): cc.PhysicsShapeEdgePolygon +---@overload fun(points: cc.Vec2, count: integer, material: cc.PhysicsMaterial): cc.PhysicsShapeEdgePolygon +function PhysicsShapeEdgePolygon.create(points, count, material, border) end + +---Get this polygon's points array. +--- +---@param outPoints cc.Vec2 # A Vec2 array pointer. +function PhysicsShapeEdgePolygon:getPoints(outPoints) end + +---Get this polygon's points array count. +--- +---@return integer # An integer number. +function PhysicsShapeEdgePolygon:getPointsCount() end + +return PhysicsShapeEdgePolygon \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/PhysicsShapeEdgeSegment.lua b/addons/cclua/cocos2d/library/cc/PhysicsShapeEdgeSegment.lua new file mode 100644 index 00000000..ac779425 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/PhysicsShapeEdgeSegment.lua @@ -0,0 +1,31 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.PhysicsShapeEdgeSegment + +---A segment shape. +---@class cc.PhysicsShapeEdgeSegment : cc.PhysicsShape +---@field pointA cc.Vec2 Get this edge's begin position.

\return A Vec2 object. +---@field pointB cc.Vec2 Get this edge's end position.

\return A Vec2 object. +local PhysicsShapeEdgeSegment = {} + +---Creates a PhysicsShapeEdgeSegment with specified value. +--- +---@param a cc.Vec2 # It's the edge's begin position. +---@param b cc.Vec2 # It's the edge's end position. +---@param material cc.PhysicsMaterial # A PhysicsMaterial object, the default value is PHYSICSSHAPE_MATERIAL_DEFAULT. +---@param border number # It's a edge's border width. +---@return cc.PhysicsShapeEdgeSegment # An autoreleased PhysicsShapeEdgeSegment object pointer. +---@overload fun(a: cc.Vec2, b: cc.Vec2): cc.PhysicsShapeEdgeSegment +---@overload fun(a: cc.Vec2, b: cc.Vec2, material: cc.PhysicsMaterial): cc.PhysicsShapeEdgeSegment +function PhysicsShapeEdgeSegment.create(a, b, material, border) end + +---Get this edge's begin position. +--- +---@return cc.Vec2 # A Vec2 object. +function PhysicsShapeEdgeSegment:getPointA() end + +---Get this edge's end position. +--- +---@return cc.Vec2 # A Vec2 object. +function PhysicsShapeEdgeSegment:getPointB() end + +return PhysicsShapeEdgeSegment \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/PhysicsShapePolygon.lua b/addons/cclua/cocos2d/library/cc/PhysicsShapePolygon.lua new file mode 100644 index 00000000..5c321d90 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/PhysicsShapePolygon.lua @@ -0,0 +1,57 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.PhysicsShapePolygon + +---A polygon shape. +---@class cc.PhysicsShapePolygon : cc.PhysicsShape +---@field pointsCount integer Get this polygon's points array count.

\return An integer number. +local PhysicsShapePolygon = {} + +---Calculate the area of a polygon with specified value. +--- +---@param points cc.Vec2 # A Vec2 object pointer, it is an array of Vec2. +---@param count integer # An integer number, contains the count of the points array. +---@return number # A float number. +function PhysicsShapePolygon.calculateArea(points, count) end + +---Calculate the moment of a polygon with specified value. +--- +---@param mass number # A float number +---@param points cc.Vec2 # A Vec2 object pointer, it is an array of Vec2. +---@param count integer # An integer number, contains the count of the points array. +---@param offset cc.Vec2 # A Vec2 object, it is the offset from the body's center of gravity in body local coordinates. +---@return number # A float number +---@param radius number +---@overload fun(mass: number, points: cc.Vec2, count: integer): number +---@overload fun(mass: number, points: cc.Vec2, count: integer, offset: cc.Vec2): number +function PhysicsShapePolygon.calculateMoment(mass, points, count, offset, radius) end + +---Creates a PhysicsShapePolygon with specified value. +--- +---@param points cc.Vec2 # A Vec2 object pointer, it is an array of Vec2. +---@param count integer # An integer number, contains the count of the points array. +---@param material cc.PhysicsMaterial # A PhysicsMaterial object, the default value is PHYSICSSHAPE_MATERIAL_DEFAULT. +---@param offset cc.Vec2 # A Vec2 object, it is the offset from the body's center of gravity in body local coordinates. +---@return cc.PhysicsShapePolygon # An autoreleased PhysicsShapePolygon object pointer. +---@param radius number +---@overload fun(points: cc.Vec2, count: integer): cc.PhysicsShapePolygon +---@overload fun(points: cc.Vec2, count: integer, material: cc.PhysicsMaterial): cc.PhysicsShapePolygon +---@overload fun(points: cc.Vec2, count: integer, material: cc.PhysicsMaterial, offset: cc.Vec2): cc.PhysicsShapePolygon +function PhysicsShapePolygon.create(points, count, material, offset, radius) end + +---Get a point of this polygon's points array. +--- +---@param i integer # A index of this polygon's points array. +---@return cc.Vec2 # A point value. +function PhysicsShapePolygon:getPoint(i) end + +---Get this polygon's points array. +--- +---@param outPoints cc.Vec2 # A Vec2 array pointer. +function PhysicsShapePolygon:getPoints(outPoints) end + +---Get this polygon's points array count. +--- +---@return integer # An integer number. +function PhysicsShapePolygon:getPointsCount() end + +return PhysicsShapePolygon \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/PhysicsWorld.lua b/addons/cclua/cocos2d/library/cc/PhysicsWorld.lua new file mode 100644 index 00000000..09c044d4 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/PhysicsWorld.lua @@ -0,0 +1,219 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.PhysicsWorld + +---\class PhysicsWorld CCPhysicsWorld.h +---An PhysicsWorld object simulates collisions and other physical properties. You do not create PhysicsWorld objects directly; instead, you can get it from an Scene object. +---@class cc.PhysicsWorld +---@field allBodies any Get all the bodies that in this physics world.

\return A Vector& object contains all bodies in this physics world. +---@field autoStep boolean Get the auto step of this physics world.

\return A bool object. +---@field debugDrawMask integer Get the debug draw mask.

\return An integer number. +---@field fixedUpdateRate integer get the number of substeps +---@field gravity cc.Vec2 Get the gravity value of this physics world.

\return A Vec2 object. +---@field scene cc.Scene Get a scene contain this physics world.

\attention This value is initialized in constructor \return A Scene object reference. +---@field speed number Get the speed of this physics world.

\return A float number. +---@field substeps integer Get the number of substeps of this physics world.

\return An integer number. +---@field updateRate integer Get the update rate of this physics world.

\return An integer number. +---@field DEBUGDRAW_ALL integer +---@field DEBUGDRAW_CONTACT integer +---@field DEBUGDRAW_JOINT integer +---@field DEBUGDRAW_NONE integer +---@field DEBUGDRAW_SHAPE integer +local PhysicsWorld = {} + +---@return any +function PhysicsWorld:__olua_move() end + +---Adds a joint to this physics world. +--- +---This joint will be added to this physics world at next frame. +---\attention If this joint is already added to another physics world, it will be removed from that world first and then add to this world. +---@param joint cc.PhysicsJoint # A pointer to an existing PhysicsJoint object. +function PhysicsWorld:addJoint(joint) end + +---Get all the bodies that in this physics world. +--- +---@return any # A Vector& object contains all bodies in this physics world. +function PhysicsWorld:getAllBodies() end + +---Get a body by tag. +--- +---@param tag integer # An integer number that identifies a PhysicsBody object. +---@return cc.PhysicsBody # A PhysicsBody object pointer or nullptr if no shapes were found. +function PhysicsWorld:getBody(tag) end + +---Get the debug draw mask. +--- +---@return integer # An integer number. +function PhysicsWorld:getDebugDrawMask() end + +---get the number of substeps +---@return integer +function PhysicsWorld:getFixedUpdateRate() end + +---Get the gravity value of this physics world. +--- +---@return cc.Vec2 # A Vec2 object. +function PhysicsWorld:getGravity() end + +---Get a scene contain this physics world. +--- +---\attention This value is initialized in constructor +---@return cc.Scene # A Scene object reference. +function PhysicsWorld:getScene() end + +---Get the nearest physics shape that contains the point. +--- +---Query this physics world at point and return the closest shape. +---@param point cc.Vec2 # A Vec2 object contains the position of the point. +---@return cc.PhysicsShape # A PhysicsShape object pointer or nullptr if no shapes were found +function PhysicsWorld:getShape(point) end + +---Get physics shapes that contains the point. +--- +---All shapes contains the point will be pushed in a Vector object. +---\attention The point must lie inside a shape. +---@param point cc.Vec2 # A Vec2 object contains the position of the point. +---@return any # A Vector object contains all found PhysicsShape pointer. +function PhysicsWorld:getShapes(point) end + +---Get the speed of this physics world. +--- +---@return number # A float number. +function PhysicsWorld:getSpeed() end + +---Get the number of substeps of this physics world. +--- +---@return integer # An integer number. +function PhysicsWorld:getSubsteps() end + +---Get the update rate of this physics world. +--- +---@return integer # An integer number. +function PhysicsWorld:getUpdateRate() end + +---Get the auto step of this physics world. +--- +---@return boolean # A bool object. +function PhysicsWorld:isAutoStep() end + +---Searches for physics shapes that contains the point. +--- +---\attention The point must lie inside a shape. +---@param func cc.PhysicsQueryPointCallbackFunc # Func is called for each shape contains the point. +---@param point cc.Vec2 # A Vec2 object contains the position of the point. +---@param data any # User defined data, it is passed to func. +function PhysicsWorld:queryPoint(func, point, data) end + +---Searches for physics shapes that contains in the rect. +--- +---Query this physics world to find all shapes overlap rect. +---@param func cc.PhysicsQueryRectCallbackFunc # Func is called for each shape whose bounding box overlaps rect. +---@param rect cc.Rect # A Rect object contains a rectangle's x, y, width and height. +---@param data any # User defined data, it is passed to func. +function PhysicsWorld:queryRect(func, rect, data) end + +---Searches for physics shapes that intersects the ray. +--- +---Query this physics world along the line segment from start to end. +---@param func cc.PhysicsRayCastCallbackFunc # Func is called for each shape found. +---@param start cc.Vec2 # A Vec2 object contains the begin position of the ray. +---\param end A Vec2 object contains the end position of the ray. +---@param data any # User defined data, it is passed to func. +---@param end_ cc.Vec2 +function PhysicsWorld:rayCast(func, start, end_, data) end + +---Remove all bodies from physics world. +--- +---If this world is not locked, those body are removed immediately, otherwise at next frame. +function PhysicsWorld:removeAllBodies() end + +---Remove all joints from this physics world. +--- +---\attention This function is invoked in the destructor of this physics world, you do not use this api in common. +---@param destroy boolean # true all joints will be destroyed after remove from this world, false otherwise. +---@overload fun(self: cc.PhysicsWorld) +function PhysicsWorld:removeAllJoints(destroy) end + +---Remove a body from this physics world. +--- +---If this world is not locked, the body is removed immediately, otherwise at next frame. +---\attention If this body has joints, those joints will be removed also. +---@param body cc.PhysicsBody # A pointer to an existing PhysicsBody object. +--- +---Remove body by tag. +--- +---If this world is not locked, the object is removed immediately, otherwise at next frame. +---\attention If this body has joints, those joints will be removed also. +---\param tag An integer number that identifies a PhysicsBody object. +---@overload fun(self: cc.PhysicsWorld, tag: integer) +function PhysicsWorld:removeBody(body) end + +---Remove a joint from this physics world. +--- +---If this world is not locked, the joint is removed immediately, otherwise at next frame. +---If this joint is connected with a body, it will be removed from the body also. +---@param joint cc.PhysicsJoint # A pointer to an existing PhysicsJoint object. +---@param destroy boolean # true this joint will be destroyed after remove from this world, false otherwise. +---@overload fun(self: cc.PhysicsWorld, joint: cc.PhysicsJoint) +function PhysicsWorld:removeJoint(joint, destroy) end + +---To control the step of physics. +--- +---If you want control it by yourself( fixed-timestep for example ), you can set this to false and call step by yourself. +---\attention If you set auto step to false, setSpeed setSubsteps and setUpdateRate won't work, you need to control the time step by yourself. +---@param autoStep boolean # A bool object, default value is true. +function PhysicsWorld:setAutoStep(autoStep) end + +---Set the debug draw mask of this physics world. +--- +---This physics world will draw shapes and joints by DrawNode according to mask. +---@param mask integer # Mask has four value:DEBUGDRAW_NONE, DEBUGDRAW_SHAPE, DEBUGDRAW_JOINT, DEBUGDRAW_CONTACT and DEBUGDRAW_ALL, default is DEBUGDRAW_NONE +function PhysicsWorld:setDebugDrawMask(mask) end + +---set the number of update of the physics world in a second. +---0 - disable fixed step system +---default value is 0 +---@param updatesPerSecond integer +function PhysicsWorld:setFixedUpdateRate(updatesPerSecond) end + +---set the gravity value of this physics world. +--- +---@param gravity cc.Vec2 # A gravity value of this physics world. +function PhysicsWorld:setGravity(gravity) end + +---set the callback which invoked after update of each object in physics world. +---@param callback fun() +function PhysicsWorld:setPostUpdateCallback(callback) end + +---set the callback which invoked before update of each object in physics world. +---@param callback fun() +function PhysicsWorld:setPreUpdateCallback(callback) end + +---Set the speed of this physics world. +--- +---\attention if you setAutoStep(false), this won't work. +---@param speed number # A float number. Speed is the rate at which the simulation executes. default value is 1.0. +function PhysicsWorld:setSpeed(speed) end + +---set the number of substeps in an update of the physics world. +--- +---One physics update will be divided into several substeps to increase its accuracy. +---@param steps integer # An integer number, default value is 1. +function PhysicsWorld:setSubsteps(steps) end + +---Set the update rate of this physics world +--- +---Update rate is the value of EngineUpdateTimes/PhysicsWorldUpdateTimes. +---Set it higher can improve performance, set it lower can improve accuracy of physics world simulation. +---\attention if you setAutoStep(false), this won't work. +---@param rate integer # An integer number, default value is 1.0. +function PhysicsWorld:setUpdateRate(rate) end + +---The step for physics world. +--- +---The times passing for simulate the physics. +---\attention You need to setAutoStep(false) first before it can work. +---@param delta number # A float number. +function PhysicsWorld:step(delta) end + +return PhysicsWorld \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/PipelineDescriptor.lua b/addons/cclua/cocos2d/library/cc/PipelineDescriptor.lua new file mode 100644 index 00000000..5959e420 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/PipelineDescriptor.lua @@ -0,0 +1,17 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.PipelineDescriptor + +---\addtogroup renderer +---\{ +---@class cc.PipelineDescriptor +---@field blendDescriptor ccb.BlendDescriptor +---@field programState ccb.ProgramState +local PipelineDescriptor = {} + +---@return any +function PipelineDescriptor:__gc() end + +---@return any +function PipelineDescriptor:__olua_move() end + +return PipelineDescriptor \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/Place.lua b/addons/cclua/cocos2d/library/cc/Place.lua new file mode 100644 index 00000000..ebb3ef66 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/Place.lua @@ -0,0 +1,15 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.Place + +---\class Place +---Places the node in a certain position. +---@class cc.Place : cc.ActionInstant +local Place = {} + +---Creates a Place action with a position. +--- +---@param pos cc.Vec2 # A certain position. +---@return cc.Place # An autoreleased Place object. +function Place.create(pos) end + +return Place \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/PlayableProtocol.lua b/addons/cclua/cocos2d/library/cc/PlayableProtocol.lua new file mode 100644 index 00000000..7584700e --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/PlayableProtocol.lua @@ -0,0 +1,18 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.PlayableProtocol + +---interface for playable items +---@class cc.PlayableProtocol +local PlayableProtocol = {} + +---@return any +function PlayableProtocol:__gc() end + +---@return any +function PlayableProtocol:__olua_move() end + +function PlayableProtocol:start() end + +function PlayableProtocol:stop() end + +return PlayableProtocol \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/PointArray.lua b/addons/cclua/cocos2d/library/cc/PointArray.lua new file mode 100644 index 00000000..906535dd --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/PointArray.lua @@ -0,0 +1,91 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.PointArray + +---An Array that contain control points. +---Used by CardinalSplineTo and (By) and CatmullRomTo (and By) actions. +---\ingroup Actions +---\js NA +---@class cc.PointArray : cc.Ref +---@field controlPoints cc.Vec2[] \js NA +local PointArray = {} + +---Appends a control point. +--- +---\js NA +---@param controlPoint cc.Vec2 # A control point. +function PointArray:addControlPoint(controlPoint) end + +---@param cls string +---@return any +function PointArray:as(cls) end + +---\js NA +---\lua NA +---@return cc.PointArray +function PointArray:clone() end + +---Returns the number of objects of the control point array. +--- +---\js NA +---@return integer # The number of objects of the control point array. +function PointArray:count() end + +---Creates and initializes a Points array with capacity. +---\js NA +---@param capacity integer # The size of the array. +---@return cc.PointArray +function PointArray.create(capacity) end + +---Get the value of a controlPoint at a given index. +--- +---\js NA +---@param index integer # Get the point in index. +---@return cc.Vec2 # A Vec2. +function PointArray:getControlPointAtIndex(index) end + +---\js NA +---@return cc.Vec2[] +function PointArray:getControlPoints() end + +---Initializes a Catmull Rom config with a capacity hint. +--- +---\js NA +---@param capacity integer # The size of the array. +---@return boolean # True. +function PointArray:initWithCapacity(capacity) end + +---Inserts a controlPoint at index. +--- +---\js NA +---@param controlPoint cc.Vec2 # A control point. +---@param index integer # Insert the point to array in index. +function PointArray:insertControlPoint(controlPoint, index) end + +---Deletes a control point at a given index +--- +---\js NA +---@param index integer # Remove the point in index. +function PointArray:removeControlPointAtIndex(index) end + +---Replaces an existing controlPoint at index. +--- +---\js NA +---@param controlPoint cc.Vec2 # A control point. +---@param index integer # Replace the point to array in index. +function PointArray:replaceControlPoint(controlPoint, index) end + +---Returns a new copy of the array reversed. User is responsible for releasing this copy. +--- +---\js NA +---@return cc.PointArray # A new copy of the array reversed. +function PointArray:reverse() end + +---Reverse the current control point array inline, without generating a new one. +---\js NA +function PointArray:reverseInline() end + +---\js NA +---@param controlPoints cc.Vec2[] +function PointArray:setControlPoints(controlPoints) end + +return PointArray \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/PointLight.lua b/addons/cclua/cocos2d/library/cc/PointLight.lua new file mode 100644 index 00000000..099a213e --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/PointLight.lua @@ -0,0 +1,27 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.PointLight + +---\js NA +---@class cc.PointLight : cc.BaseLight +---@field range number get or set range +local PointLight = {} + +---Creates a point light. +---@param position cc.Vec3 # The light's position +---@param color any # The light's color. +---@param range number # The light's range. +--- +---@return cc.PointLight # The new point light. +function PointLight.create(position, color, range) end + +---get or set range +---@return number +function PointLight:getRange() end + +---@return cc.PointLight +function PointLight.new() end + +---@param range number +function PointLight:setRange(range) end + +return PointLight \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/ProgressFromTo.lua b/addons/cclua/cocos2d/library/cc/ProgressFromTo.lua new file mode 100644 index 00000000..3dcba0ae --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/ProgressFromTo.lua @@ -0,0 +1,16 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.ProgressFromTo + +---Progress from a percentage to another percentage. +---\since v0.99.1 +---@class cc.ProgressFromTo : cc.ActionInterval +local ProgressFromTo = {} + +---Create and initializes the action with a duration, a "from" percentage and a "to" percentage. +---@param duration number # Specify the duration of the ProgressFromTo action. It's a value in seconds. +---@param fromPercentage number # Specify the source percentage. +---@param toPercentage number # Specify the destination percentage. +---@return cc.ProgressFromTo # If the creation success, return a pointer of ProgressFromTo action; otherwise, return nil. +function ProgressFromTo.create(duration, fromPercentage, toPercentage) end + +return ProgressFromTo \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/ProgressTimer.lua b/addons/cclua/cocos2d/library/cc/ProgressTimer.lua new file mode 100644 index 00000000..59ff9013 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/ProgressTimer.lua @@ -0,0 +1,100 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.ProgressTimer + +---ProgressTimer is a subclass of Node. +---It renders the inner sprite according to the percentage. +---The progress can be Radial, Horizontal or vertical. +---\since v0.99.1 +---@class cc.ProgressTimer : cc.Node +---@field barChangeRate cc.Vec2 Returns the BarChangeRate.

\return A barChangeRate. +---@field midpoint cc.Vec2 Returns the Midpoint.

\return A Vec2. +---@field percentage number Percentages are from 0 to 100.

\return Percentages. +---@field reverseDirection boolean Return the Reverse direction.

\return If the direction is Anti-clockwise,it will return true. +---@field sprite cc.Sprite The image to show the progress percentage, retain.

\return A sprite. +---@field type cc.ProgressTimer.Type Change the percentage to change progress.

\return A Type +local ProgressTimer = {} + +---Creates a progress timer with the sprite as the shape the timer goes through. +--- +---@param sp cc.Sprite # The sprite as the shape the timer goes through. +---@return cc.ProgressTimer # A ProgressTimer. +function ProgressTimer.create(sp) end + +---Returns the BarChangeRate. +--- +---@return cc.Vec2 # A barChangeRate. +function ProgressTimer:getBarChangeRate() end + +---Returns the Midpoint. +--- +---@return cc.Vec2 # A Vec2. +function ProgressTimer:getMidpoint() end + +---Percentages are from 0 to 100. +--- +---@return number # Percentages. +function ProgressTimer:getPercentage() end + +---The image to show the progress percentage, retain. +--- +---@return cc.Sprite # A sprite. +function ProgressTimer:getSprite() end + +---Change the percentage to change progress. +--- +---@return cc.ProgressTimer.Type # A Type +function ProgressTimer:getType() end + +---Initializes a progress timer with the sprite as the shape the timer goes through +---@param sp cc.Sprite +---@return boolean +function ProgressTimer:initWithSprite(sp) end + +---Return the Reverse direction. +--- +---@return boolean # If the direction is Anti-clockwise,it will return true. +function ProgressTimer:isReverseDirection() end + +---\js ctor +---@return cc.ProgressTimer +function ProgressTimer.new() end + +---This allows the bar type to move the component at a specific rate. +---Set the component to 0 to make sure it stays at 100%. +---For example you want a left to right bar but not have the height stay 100%. +---Set the rate to be Vec2(0,1); and set the midpoint to = Vec2(0,.5f). +---@param barChangeRate cc.Vec2 # A Vec2. +function ProgressTimer:setBarChangeRate(barChangeRate) end + +---Midpoint is used to modify the progress start position. +---If you're using radials type then the midpoint changes the center point. +---If you're using bar type then the midpoint changes the bar growth. +---it expands from the center but clamps to the sprites edge so: +---you want a left to right then set the midpoint all the way to Vec2(0,y). +---you want a right to left then set the midpoint all the way to Vec2(1,y). +---you want a bottom to top then set the midpoint all the way to Vec2(x,0). +---you want a top to bottom then set the midpoint all the way to Vec2(x,1). +---@param point cc.Vec2 # A Vec2 point. +function ProgressTimer:setMidpoint(point) end + +---Set the initial percentage values. +--- +---@param percentage number # The initial percentage values. +function ProgressTimer:setPercentage(percentage) end + +---Set the Reverse direction. +--- +---@param value boolean # If value is false it will clockwise,if is true it will Anti-clockwise. +function ProgressTimer:setReverseDirection(value) end + +---Set the sprite as the shape. +--- +---@param sprite cc.Sprite # The sprite as the shape. +function ProgressTimer:setSprite(sprite) end + +---Set the ProgressTimer type. +--- +---@param type cc.ProgressTimer.Type # Is an Type. +function ProgressTimer:setType(type) end + +return ProgressTimer \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/ProgressTimer/Type.lua b/addons/cclua/cocos2d/library/cc/ProgressTimer/Type.lua new file mode 100644 index 00000000..1403c9e1 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/ProgressTimer/Type.lua @@ -0,0 +1,15 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.ProgressTimer.Type + +---@type cc.ProgressTimer.Type +local VALUE + +--- +---@enum cc.ProgressTimer.Type +local Type = { + ---Radial Counter-Clockwise. + BAR = 1, + RADIAL = 0, +} + +return Type \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/ProgressTo.lua b/addons/cclua/cocos2d/library/cc/ProgressTo.lua new file mode 100644 index 00000000..615d3917 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/ProgressTo.lua @@ -0,0 +1,17 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.ProgressTo + +---Progress to percentage. +---\details This action show the target node from current percentage to the specified percentage. +---You should specify the destination percentage when creating the action. +---\since v0.99.1 +---@class cc.ProgressTo : cc.ActionInterval +local ProgressTo = {} + +---Create and initializes with a duration and a destination percentage. +---@param duration number # Specify the duration of the ProgressTo action. It's a value in seconds. +---@param percent number # Specify the destination percentage. +---@return cc.ProgressTo # If the creation success, return a pointer of ProgressTo action; otherwise, return nil. +function ProgressTo.create(duration, percent) end + +return ProgressTo \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/Properties.lua b/addons/cclua/cocos2d/library/cc/Properties.lua new file mode 100644 index 00000000..2a2d1ec2 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/Properties.lua @@ -0,0 +1,432 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.Properties + +---Defines a properties file for loading text files. +--- +---A properties file has very simple syntax and can contain only namespaces and +---name/value pairs (the properties of a namespace). +---The file can have any file extension a user specifies. +--- +---Here's an example of a simple +---file that uses all the available features of the markup language: +--- +---\verbatim +---This is a comment. +--- +---This property is in the default namespace: +---integerProperty = 5 +--- +---This line defines a namespace of type "mynamespace" without an ID: +---mynamespace +---{ +---This namespace can be retrieved by searching for its ID, "spriteTexture", +---or by its name "texture": +---texture spriteTexture +---{ +---fileName = sprite.png +---width = 64 +---height = 64 +---} +--- +---This property is in the "space" namespace: +---booleanProperty = true +--- +---It's legal to have a name without a value if you leave out the '=' character: +---foo +--- +---In fact, the '=' character is optional if you'd rather write: +---bar 23 +--- +---But don't write this or you'll get an error: +---illegalProperty = +--- +---Or this: +---= 15 +--- +---Properties objects let you retrieve values as various types. +---floatProperty = 3.333 +---stringProperty = This is a string. +---vector3Property = 1.0, 5.0, 3.55 +---colorProperty = 1.0, 0.4, 0.0, 1.0 +---} +---\endverbatim +--- +---Retrieving information out of a file like this could be done in two ways. If the +---available namespaces and name/value pairs are known in advance they can be queried by ID or name. +---For example, if the namespace "spriteTexture" and its properties are required then they can +---be retrieved with a call to getNamespace() followed by calls to getString() and getInt(). +---A namespace is stored and retrieved as a Properties object. +---Reading the spriteTexture properties out of the file above in this way could be done with the following code: +--- +---\verbatim +---Create the top-level Properties object. +---Properties* properties = Properties::createNonRefCounted("example.properties"); +---Retrieve the "spriteTexture" namespace. +---Properties* spriteTexture = properties->getNamespace("spriteTexture"); +--- +---Get the values of known texture properties out of the namespace. +---const char* fileName = spriteTexture->getString("fileName"); +---int width = spriteTexture->getInt("width"); +---int height = spriteTexture->getInt("height"); +--- +---Deleting the top-level Properties object will clean up all nested namespaces. +---SAFE_DELETE(properties); +---\endverbatim +---On the other hand, if the structure of the file is not known in advance its +---namespaces and name/value pairs can be retrieved one by one using the getNextNamespace() +---and getNextProperty() methods. The following method prints the contents of any properties file +---to the console: +--- +---\verbatim +---void printProperties(Properties* properties) +---{ +---Print the name and ID of the current namespace. +---const char* spacename = properties->getNamespace(); +---const char* id = properties->getId(); +---GP_WARN("Namespace: %s ID: %s\n{", spacename, id); +--- +---Print all properties in this namespace. +---const char* name = properties->getNextProperty(); +---const char* value = NULL; +---while (name != NULL) +---{ +---value = properties->getString(name); +---GP_WARN("%s = %s", name, value); +---name = properties->getNextProperty(); +---} +---GP_WARN("}\n"); +--- +---Print the properties of every namespace within this one. +---Properties* space = properties->getNextNamespace(); +---while (space != NULL) +---{ +---printProperties(space); +---space = properties->getNextNamespace(); +---} +---} +---\endverbatim +---Note that this method does not keep track of the namespace hierarchy, but could be +---modified to do so. Also note that nothing in a properties file indicates the type +---of a property. If the type is unknown, its string can be retrieved and interpreted +---as necessary. +---@class cc.Properties +---@field id string Get the ID of this Property's namespace. The ID should be a unique identifier, but its uniqueness is not enforced.

\return The ID of this Property's namespace. +---@field nextNamespace cc.Properties Get the next namespace. +---@field nextProperty string Get the name of the next property.

If a valid next property is returned, the value of the property can be retrieved using any of the get methods in this class, passing NULL for the property name.

\return The name of the next property, or NULL if there are no properties remaining. +local Properties = {} + +---@return any +function Properties:__gc() end + +---@return any +function Properties:__olua_move() end + +---Creates a Properties runtime settings from the specified URL, where the URL is of +---the format ".#//.../" +---(and "#//.../" is optional). +--- +---@param url string # The URL to create the properties from. +--- +---@return cc.Properties # The created Properties or NULL if there was an error. +---\script{create} +function Properties.createNonRefCounted(url) end + +---Check if a property with the given name is specified in this Properties object. +--- +---@param name string # The name of the property to query. +--- +---@return boolean # True if the property exists, false otherwise. +function Properties:exists(name) end + +---Interpret the value of the given property as a boolean. +--- +---@param name string # The name of the property to interpret, or NULL to return the current property's value. +---@param defaultValue boolean # the default value to return if the specified property does not exist within the properties file. +--- +---@return boolean # true if the property exists and its value is "true", otherwise false. +---@overload fun(self: cc.Properties): boolean +---@overload fun(self: cc.Properties, name: string): boolean +function Properties:getBool(name, defaultValue) end + +---Interpret the value of the given property as an RGB color in hex and write this color to a Vector3. +---E.g. 0xff0000 represents red and sets the vector to (1, 0, 0). +---If the property does not exist, out will be set to Vector3(0.0f, 0.0f, 0.0f). +---If the property exists but could not be scanned, an error will be logged and out will be set +---to Vector3(0.0f, 0.0f, 0.0f). +--- +---@param name string # The name of the property to interpret, or NULL to return the current property's value. +---@param out cc.Vec3 # The vector to set to this property's interpreted value. +--- +---@return boolean # True on success, false if the property does not exist or could not be scanned. +--- +---Interpret the value of the given property as an RGBA color in hex and write this color to a Vector4. +---E.g. 0xff0000ff represents opaque red and sets the vector to (1, 0, 0, 1). +---If the property does not exist, out will be set to Vector4(0.0f, 0.0f, 0.0f, 0.0f). +---If the property exists but could not be scanned, an error will be logged and out will be set +---to Vector4(0.0f, 0.0f, 0.0f, 0.0f). +--- +---\param name The name of the property to interpret, or NULL to return the current property's value. +---\param out The vector to set to this property's interpreted value. +--- +---\return True on success, false if the property does not exist or could not be scanned. +---@overload fun(self: cc.Properties, name: string, out: cc.Vec4): boolean +function Properties:getColor(name, out) end + +---Interpret the value of the given property as a floating-point number. +---If the property does not exist, zero will be returned. +---If the property exists but could not be scanned, an error will be logged and zero will be returned. +--- +---@param name string # The name of the property to interpret, or NULL to return the current property's value. +--- +---@return number # The value of the given property interpreted as a float. +---Zero if the property does not exist or could not be scanned. +---@overload fun(self: cc.Properties): number +function Properties:getFloat(name) end + +---Get the ID of this Property's namespace. The ID should be a unique identifier, +---but its uniqueness is not enforced. +--- +---@return string # The ID of this Property's namespace. +function Properties:getId() end + +---Interpret the value of the given property as an integer. +---If the property does not exist, zero will be returned. +---If the property exists but could not be scanned, an error will be logged and zero will be returned. +--- +---@param name string # The name of the property to interpret, or NULL to return the current property's value. +--- +---@return integer # The value of the given property interpreted as an integer. +---Zero if the property does not exist or could not be scanned. +---@overload fun(self: cc.Properties): integer +function Properties:getInt(name) end + +---Interpret the value of the given property as a long integer. +---If the property does not exist, zero will be returned. +---If the property exists but could not be scanned, an error will be logged and zero will be returned. +--- +---@param name string # The name of the property to interpret, or NULL to return the current property's value. +--- +---@return integer # The value of the given property interpreted as a long. +---Zero if the property does not exist or could not be scanned. +---@overload fun(self: cc.Properties): integer +function Properties:getLong(name) end + +---Interpret the value of the given property as a Matrix. +---If the property does not exist, out will be set to the identity matrix. +---If the property exists but could not be scanned, an error will be logged and out will be set +---to the identity matrix. +--- +---@param name string # The name of the property to interpret, or NULL to return the current property's value. +---@param out cc.Mat4 # The matrix to set to this property's interpreted value. +--- +---@return boolean # True on success, false if the property does not exist or could not be scanned. +function Properties:getMat4(name, out) end + +---Get a specific namespace by ID or name. This method will optionally +---perform a depth-first search on all namespaces and inner namespaces +---within this Property. +--- +---@param id string # The ID or name of the namespace to find. +---@param searchNames boolean # If true, namespace names are used in the search, +---instead of namespace IDs. By default this parameter is false +---and namespace IDs are searched. +---@param recurse boolean # If true, perform a depth-first search, otherwise search +---only the immediate child namespaces. +--- +---@return cc.Properties # A properties object with the given ID or name. +---@overload fun(self: cc.Properties, id: string): cc.Properties +---@overload fun(self: cc.Properties, id: string, searchNames: boolean): cc.Properties +--- +---Get the name of this Property's namespace. +--- +---\return The name of this Property's namespace. +---@overload fun(self: cc.Properties): string +function Properties:getNamespace(id, searchNames, recurse) end + +---Get the next namespace. +---@return cc.Properties +function Properties:getNextNamespace() end + +---Get the name of the next property. +--- +---If a valid next property is returned, the value of the property can be +---retrieved using any of the get methods in this class, passing NULL for +---the property name. +--- +---@return string # The name of the next property, or NULL if there are no properties remaining. +function Properties:getNextProperty() end + +---Gets the file path for the given property if the file exists. +--- +---This method will first search for the file relative to the working directory. +---If the file is not found then it will search relative to the directory the bundle file is in. +--- +---@param name string # The name of the property. +---@param path olua.string # The string to copy the path to if the file exists. +--- +---@return boolean # True if the property exists and the file exists, false otherwise. +--- +---\script{ignore} +function Properties:getPath(name, path) end + +---Interpret the value of the given property as a Quaternion specified as an axis angle. +---If the property does not exist, out will be set to Quaternion(). +---If the property exists but could not be scanned, an error will be logged and out will be set +---to Quaternion(). +--- +---@param name string # The name of the property to interpret, or NULL to return the current property's value. +---@param out cc.Quaternion # The quaternion to set to this property's interpreted value. +--- +---@return boolean # True on success, false if the property does not exist or could not be scanned. +function Properties:getQuaternionFromAxisAngle(name, out) end + +---Get the value of the given property as a string. This can always be retrieved, +---whatever the intended type of the property. +--- +---@param name string # The name of the property to interpret, or NULL to return the current property's value. +---@param defaultValue string # The default value to return if the specified property does not exist. +--- +---@return string # The value of the given property as a string, or the empty string if no property with that name exists. +---@overload fun(self: cc.Properties): string +---@overload fun(self: cc.Properties, name: string): string +function Properties:getString(name, defaultValue) end + +---Returns the type of a property. +--- +---@param name string # The name of the property to interpret, or NULL to return the current property's type. +--- +---@return cc.Properties.Type # The type of the property. +---@overload fun(self: cc.Properties): cc.Properties.Type +function Properties:getType(name) end + +---Returns the value of a variable that is set in this Properties object. +--- +---Variables take on the format ${name} and are inherited from parent Property objects. +--- +---@param name string # Name of the variable to get. +---@param defaultValue string # Value to return if the variable is not found. +--- +---@return string # The value of the specified variable, or defaultValue if not found. +---@overload fun(self: cc.Properties, name: string): string +function Properties:getVariable(name, defaultValue) end + +---Interpret the value of the given property as a Vector2. +---If the property does not exist, out will be set to Vector2(0.0f, 0.0f). +---If the property exists but could not be scanned, an error will be logged and out will be set +---to Vector2(0.0f, 0.0f). +--- +---@param name string # The name of the property to interpret, or NULL to return the current property's value. +---@param out cc.Vec2 # The vector to set to this property's interpreted value. +--- +---@return boolean # True on success, false if the property does not exist or could not be scanned. +function Properties:getVec2(name, out) end + +---Interpret the value of the given property as a Vector3. +---If the property does not exist, out will be set to Vector3(0.0f, 0.0f, 0.0f). +---If the property exists but could not be scanned, an error will be logged and out will be set +---to Vector3(0.0f, 0.0f, 0.0f). +--- +---@param name string # The name of the property to interpret, or NULL to return the current property's value. +---@param out cc.Vec3 # The vector to set to this property's interpreted value. +--- +---@return boolean # True on success, false if the property does not exist or could not be scanned. +function Properties:getVec3(name, out) end + +---Interpret the value of the given property as a Vector4. +---If the property does not exist, out will be set to Vector4(0.0f, 0.0f, 0.0f, 0.0f). +---If the property exists but could not be scanned, an error will be logged and out will be set +---to Vector4(0.0f, 0.0f, 0.0f, 0.0f). +--- +---@param name string # The name of the property to interpret, or NULL to return the current property's value. +---@param out cc.Vec4 # The vector to set to this property's interpreted value. +--- +---@return boolean # True on success, false if the property does not exist or could not be scanned. +function Properties:getVec4(name, out) end + +---Attempts to parse the specified string as an axis-angle value. +--- +---The specified string is expected to contain four comma-separated +---values, where the first three values represents the axis and the +---fourth value represents the angle, in degrees. +--- +---On error, false is returned and the output is set to all zero values. +--- +---@param str string # The string to parse. +---@param out cc.Quaternion # A Quaternion populated with the orientation of the axis-angle, if successful. +--- +---@return boolean # True if a valid axis-angle was parsed, false otherwise. +function Properties.parseAxisAngle(str, out) end + +---Attempts to parse the specified string as an RGB color value. +--- +---@param str string # The string to parse. +---@param out cc.Vec3 # The value to populate if successful. +--- +---@return boolean # True if a valid RGB color was parsed, false otherwise. +--- +---Attempts to parse the specified string as an RGBA color value. +--- +---\param str The string to parse. +---\param out The value to populate if successful. +--- +---\return True if a valid RGBA color was parsed, false otherwise. +---@overload fun(str: string, out: cc.Vec4): boolean +function Properties.parseColor(str, out) end + +---Attempts to parse the specified string as a Vector2 value. +--- +---On error, false is returned and the output is set to all zero values. +--- +---@param str string # The string to parse. +---@param out cc.Vec2 # The value to populate if successful. +--- +---@return boolean # True if a valid Vector2 was parsed, false otherwise. +function Properties.parseVec2(str, out) end + +---Attempts to parse the specified string as a Vector3 value. +--- +---On error, false is returned and the output is set to all zero values. +--- +---@param str string # The string to parse. +---@param out cc.Vec3 # The value to populate if successful. +--- +---@return boolean # True if a valid Vector3 was parsed, false otherwise. +function Properties.parseVec3(str, out) end + +---Attempts to parse the specified string as a Vector4 value. +--- +---On error, false is returned and the output is set to all zero values. +--- +---@param str string # The string to parse. +---@param out cc.Vec4 # The value to populate if successful. +--- +---@return boolean # True if a valid Vector4 was parsed, false otherwise. +function Properties.parseVec4(str, out) end + +---Rewind the getNextProperty() and getNextNamespace() iterators +---to the beginning of the file. +function Properties:rewind() end + +---Sets the value of the property with the specified name. +--- +---If there is no property in this namespace with the current name, +---one is added. Otherwise, the value of the first property with the +---specified name is updated. +--- +---If name is NULL, the value current property (see getNextProperty) is +---set, unless there is no current property, in which case false +---is returned. +--- +---@param name string # The name of the property to set. +---@param value string # The property value. +--- +---@return boolean # True if the property was set, false otherwise. +function Properties:setString(name, value) end + +---Sets the value of the specified variable. +--- +---@param name string # Name of the variable to set. +---@param value string # The value to set. +function Properties:setVariable(name, value) end + +return Properties \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/Properties/Type.lua b/addons/cclua/cocos2d/library/cc/Properties/Type.lua new file mode 100644 index 00000000..375d6630 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/Properties/Type.lua @@ -0,0 +1,19 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.Properties.Type + +---@type cc.Properties.Type +local VALUE + +--- +---@enum cc.Properties.Type +local Type = { + MATRIX = 6, + NONE = 0, + NUMBER = 2, + STRING = 1, + VECTOR2 = 3, + VECTOR3 = 4, + VECTOR4 = 5, +} + +return Type \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/ProtectedNode.lua b/addons/cclua/cocos2d/library/cc/ProtectedNode.lua new file mode 100644 index 00000000..49a9d5a7 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/ProtectedNode.lua @@ -0,0 +1,88 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.ProtectedNode + +---A inner node type mainly used for UI module. +---It is useful for composing complex node type and it's children are protected. +---@class cc.ProtectedNode : cc.Node +local ProtectedNode = {} + +---Adds a child to the container with z-order as 0. +--- +---If the child is added to a 'running' node, then 'onEnter' and 'onEnterTransitionDidFinish' will be called immediately. +--- +---@param child cc.Node # A child node +--- +---Adds a child to the container with a local z-order. +--- +---If the child is added to a 'running' node, then 'onEnter' and 'onEnterTransitionDidFinish' will be called immediately. +--- +---\param child A child node +---\param localZOrder Z order for drawing priority. Please refer to `setLocalZOrder(int)` +---@overload fun(self: cc.ProtectedNode, child: cc.Node, localZOrder: integer) +--- +---Adds a child to the container with z order and tag. +--- +---If the child is added to a 'running' node, then 'onEnter' and 'onEnterTransitionDidFinish' will be called immediately. +--- +---\param child A child node +---\param localZOrder Z order for drawing priority. Please refer to `setLocalZOrder(int)` +---\param tag An integer to identify the node easily. Please refer to `setTag(int)` +---@overload fun(self: cc.ProtectedNode, child: cc.Node, localZOrder: integer, tag: integer) +function ProtectedNode:addProtectedChild(child) end + +---Creates a ProtectedNode with no argument. +---@return cc.ProtectedNode # A instance of ProtectedNode. +function ProtectedNode.create() end + +function ProtectedNode:disableCascadeColor() end + +function ProtectedNode:disableCascadeOpacity() end + +---Gets a child from the container with its tag. +--- +---@param tag integer # An identifier to find the child node. +--- +---@return cc.Node # a Node object whose tag equals to the input parameter. +function ProtectedNode:getProtectedChildByTag(tag) end + +---@return cc.ProtectedNode +function ProtectedNode.new() end + +---Removes all children from the container with a cleanup. +--- +---\see `removeAllChildrenWithCleanup(bool)`. +function ProtectedNode:removeAllProtectedChildren() end + +---Removes all children from the container, and do a cleanup to all running actions depending on the cleanup parameter. +--- +---@param cleanup boolean # true if all running actions on all children nodes should be cleanup, false otherwise. +---\js removeAllChildren +---\lua removeAllChildren +function ProtectedNode:removeAllProtectedChildrenWithCleanup(cleanup) end + +---Removes a child from the container. It will also cleanup all running actions depending on the cleanup parameter. +--- +---@param child cc.Node # The child node which will be removed. +---@param cleanup boolean # true if all running actions and callbacks on the child node will be cleanup, false otherwise. +---@overload fun(self: cc.ProtectedNode, child: cc.Node) +function ProtectedNode:removeProtectedChild(child, cleanup) end + +---Removes a child from the container by tag value. It will also cleanup all running actions depending on the cleanup parameter. +--- +---@param tag integer # An integer number that identifies a child node. +---@param cleanup boolean # true if all running actions and callbacks on the child node will be cleanup, false otherwise. +---@overload fun(self: cc.ProtectedNode, tag: integer) +function ProtectedNode:removeProtectedChildByTag(tag, cleanup) end + +---Reorders a child according to a new z value. +--- +---@param child cc.Node # An already added child node. It MUST be already added. +---@param localZOrder integer # Z order for drawing priority. Please refer to setLocalZOrder(int) +function ProtectedNode:reorderProtectedChild(child, localZOrder) end + +---Sorts the children array once before drawing, instead of every time when a child is added or reordered. +---This approach can improves the performance massively. +---\note Don't call this manually unless a child added needs to be removed in the same frame +function ProtectedNode:sortAllProtectedChildren() end + +return ProtectedNode \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/Quad3.lua b/addons/cclua/cocos2d/library/cc/Quad3.lua new file mode 100644 index 00000000..962f3fff --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/Quad3.lua @@ -0,0 +1,19 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.Quad3 + +---\struct Quad3 +---A 3D Quad. 4 * 3 floats. +---@class cc.Quad3 +---@field bl cc.Vec3 +---@field br cc.Vec3 +---@field tl cc.Vec3 +---@field tr cc.Vec3 +local Quad3 = {} + +---@return any +function Quad3:__gc() end + +---@return any +function Quad3:__olua_move() end + +return Quad3 \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/Quaternion.lua b/addons/cclua/cocos2d/library/cc/Quaternion.lua new file mode 100644 index 00000000..6c26a5f9 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/Quaternion.lua @@ -0,0 +1,244 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.Quaternion + +---Defines a 4-element quaternion that represents the orientation of an object in space. +--- +---Quaternions are typically used as a replacement for euler angles and rotation matrices as a way to achieve smooth interpolation and avoid gimbal lock. +--- +---Note that this quaternion class does not automatically keep the quaternion normalized. Therefore, care must be taken to normalize the quaternion when necessary, by calling the normalize method. +---This class provides three methods for doing quaternion interpolation: lerp, slerp, and squad. +--- +---lerp (linear interpolation): the interpolation curve gives a straight line in quaternion space. It is simple and fast to compute. The only problem is that it does not provide constant angular velocity. Note that a constant velocity is not necessarily a requirement for a curve; +---slerp (spherical linear interpolation): the interpolation curve forms a great arc on the quaternion unit sphere. Slerp provides constant angular velocity; +---squad (spherical spline interpolation): interpolating between a series of rotations using slerp leads to the following problems: +---- the curve is not smooth at the control points; +---- the angular velocity is not constant; +---- the angular velocity is not continuous at the control points. +--- +---Since squad is continuously differentiable, it remedies the first and third problems mentioned above. +---The slerp method provided here is intended for interpolation of principal rotations. It treats +q and -q as the same principal rotation and is at liberty to use the negative of either input. The resulting path is always the shorter arc. +--- +---The lerp method provided here interpolates strictly in quaternion space. Note that the resulting path may pass through the origin if interpolating between a quaternion and its exact negative. +--- +---As an example, consider the following quaternions: +--- +---q1 = (0.6, 0.8, 0.0, 0.0), +---q2 = (0.0, 0.6, 0.8, 0.0), +---q3 = (0.6, 0.0, 0.8, 0.0), and +---q4 = (-0.8, 0.0, -0.6, 0.0). +---For the point p = (1.0, 1.0, 1.0), the following figures show the trajectories of p using lerp, slerp, and squad. +---@class cc.Quaternion +---@field conjugated cc.Quaternion Gets the conjugate of this quaternion. +---@field inversed cc.Quaternion Gets the inverse of this quaternion.

Note that the inverse of a quaternion is equal to its conjugate when the quaternion is unit-length. For this reason, it is more efficient to use the conjugate method directly when you know your quaternion is already unit-length. +---@field normalized cc.Quaternion Get the normalized quaternion.

If the quaternion already has unit length or if the length of the quaternion is zero, this method simply copies this vector. +---@field w number +---@field x number +---@field y number +---@field z number +---@field ZERO cc.Quaternion +local Quaternion = {} + +---@return any +function Quaternion:__gc() end + +---@return any +function Quaternion:__olua_move() end + +---Sets this quaternion to the conjugate of itself. +function Quaternion:conjugate() end + +---Creates this quaternion equal to the rotation from the specified axis and angle +---and stores the result in dst. +--- +---@param axis cc.Vec3 # A vector describing the axis of rotation. +---@param angle number # The angle of rotation (in radians). +---@param dst cc.Quaternion # A quaternion to store the conjugate in. +function Quaternion.createFromAxisAngle(axis, angle, dst) end + +---Creates a quaternion equal to the rotational part of the specified matrix +---and stores the result in dst. +--- +---@param m cc.Mat4 # The matrix. +---@param dst cc.Quaternion # A quaternion to store the conjugate in. +function Quaternion.createFromRotationMatrix(m, dst) end + +---Gets the conjugate of this quaternion. +---@return cc.Quaternion +function Quaternion:getConjugated() end + +---Gets the inverse of this quaternion. +--- +---Note that the inverse of a quaternion is equal to its conjugate +---when the quaternion is unit-length. For this reason, it is more +---efficient to use the conjugate method directly when you know your +---quaternion is already unit-length. +---@return cc.Quaternion +function Quaternion:getInversed() end + +---Get the normalized quaternion. +--- +---If the quaternion already has unit length or if the length +---of the quaternion is zero, this method simply copies +---this vector. +---@return cc.Quaternion +function Quaternion:getNormalized() end + +---Returns the identity quaternion. +--- +---@return cc.Quaternion # The identity quaternion. +function Quaternion.identity() end + +---Sets this quaternion to the inverse of itself. +--- +---Note that the inverse of a quaternion is equal to its conjugate +---when the quaternion is unit-length. For this reason, it is more +---efficient to use the conjugate method directly when you know your +---quaternion is already unit-length. +--- +---@return boolean # true if the inverse can be computed, false otherwise. +function Quaternion:inverse() end + +---Determines if this quaternion is equal to the identity quaternion. +--- +---@return boolean # true if it is the identity quaternion, false otherwise. +function Quaternion:isIdentity() end + +---Determines if this quaternion is all zeros. +--- +---@return boolean # true if this quaternion is all zeros, false otherwise. +function Quaternion:isZero() end + +---Interpolates between two quaternions using linear interpolation. +--- +---The interpolation curve for linear interpolation between +---quaternions gives a straight line in quaternion space. +--- +---@param q1 cc.Quaternion # The first quaternion. +---@param q2 cc.Quaternion # The second quaternion. +---@param t number # The interpolation coefficient. +---@param dst cc.Quaternion # A quaternion to store the result in. +function Quaternion.lerp(q1, q2, t, dst) end + +---Multiplies this quaternion by the specified one and stores the result in this quaternion. +--- +---@param q cc.Quaternion # The quaternion to multiply. +--- +---Multiplies the specified quaternions and stores the result in dst. +--- +---\param q1 The first quaternion. +---\param q2 The second quaternion. +---\param dst A quaternion to store the result in. +---@overload fun(q1: cc.Quaternion, q2: cc.Quaternion, dst: cc.Quaternion) +function Quaternion:multiply(q) end + +---Constructs a quaternion initialized to (0, 0, 0, 1). +---@return cc.Quaternion +--- +---Constructs a quaternion initialized to (0, 0, 0, 1). +--- +---\param xx The x component of the quaternion. +---\param yy The y component of the quaternion. +---\param zz The z component of the quaternion. +---\param ww The w component of the quaternion. +---@overload fun(xx: number, yy: number, zz: number, ww: number): cc.Quaternion +--- +---Constructs a new quaternion from the values in the specified array. +--- +---\param array The values for the new quaternion. +---@overload fun(array: olua.float): cc.Quaternion +--- +---Constructs a quaternion equal to the rotational part of the specified matrix. +--- +---\param m The matrix. +---@overload fun(m: cc.Mat4): cc.Quaternion +--- +---Constructs a quaternion equal to the rotation from the specified axis and angle. +--- +---\param axis A vector describing the axis of rotation. +---\param angle The angle of rotation (in radians). +---@overload fun(axis: cc.Vec3, angle: number): cc.Quaternion +function Quaternion.new() end + +---Normalizes this quaternion to have unit length. +--- +---If the quaternion already has unit length or if the length +---of the quaternion is zero, this method does nothing. +function Quaternion:normalize() end + +---Sets the elements of the quaternion to the specified values. +--- +---@param xx number # The new x-value. +---@param yy number # The new y-value. +---@param zz number # The new z-value. +---@param ww number # The new w-value. +--- +---Sets the elements of the quaternion from the values in the specified array. +--- +---\param array An array containing the elements of the quaternion in the order x, y, z, w. +---@overload fun(self: cc.Quaternion, array: olua.float) +--- +---Sets the quaternion equal to the rotational part of the specified matrix. +--- +---\param m The matrix. +---@overload fun(self: cc.Quaternion, m: cc.Mat4) +--- +---Sets the quaternion equal to the rotation from the specified axis and angle. +--- +---\param axis The axis of rotation. +---\param angle The angle of rotation (in radians). +---@overload fun(self: cc.Quaternion, axis: cc.Vec3, angle: number) +--- +---Sets the elements of this quaternion to a copy of the specified quaternion. +--- +---\param q The quaternion to copy. +---@overload fun(self: cc.Quaternion, q: cc.Quaternion) +function Quaternion:set(xx, yy, zz, ww) end + +---Sets this quaternion to be equal to the identity quaternion. +function Quaternion:setIdentity() end + +---Interpolates between two quaternions using spherical linear interpolation. +--- +---Spherical linear interpolation provides smooth transitions between different +---orientations and is often useful for animating models or cameras in 3D. +--- +---Note: For accurate interpolation, the input quaternions must be at (or close to) unit length. +---This method does not automatically normalize the input quaternions, so it is up to the +---caller to ensure they call normalize beforehand, if necessary. +--- +---@param q1 cc.Quaternion # The first quaternion. +---@param q2 cc.Quaternion # The second quaternion. +---@param t number # The interpolation coefficient. +---@param dst cc.Quaternion # A quaternion to store the result in. +function Quaternion.slerp(q1, q2, t, dst) end + +---Interpolates over a series of quaternions using spherical spline interpolation. +--- +---Spherical spline interpolation provides smooth transitions between different +---orientations and is often useful for animating models or cameras in 3D. +--- +---Note: For accurate interpolation, the input quaternions must be unit. +---This method does not automatically normalize the input quaternions, +---so it is up to the caller to ensure they call normalize beforehand, if necessary. +--- +---@param q1 cc.Quaternion # The first quaternion. +---@param q2 cc.Quaternion # The second quaternion. +---@param s1 cc.Quaternion # The first control point. +---@param s2 cc.Quaternion # The second control point. +---@param t number # The interpolation coefficient. +---@param dst cc.Quaternion # A quaternion to store the result in. +function Quaternion.squad(q1, q2, s1, s2, t, dst) end + +---Converts this Quaternion4f to axis-angle notation. The axis is normalized. +--- +---@param e cc.Vec3 # The Vec3f which stores the axis. +--- +---@return number # The angle (in radians). +function Quaternion:toAxisAngle(e) end + +---Returns the quaternion with all zeros. +--- +---@return cc.Quaternion # The quaternion. +function Quaternion.zero() end + +return Quaternion \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/Rect.lua b/addons/cclua/cocos2d/library/cc/Rect.lua new file mode 100644 index 00000000..bb0ecb51 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/Rect.lua @@ -0,0 +1,126 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.Rect + +---Rectangle area. +---@class cc.Rect +---@field maxX number return the midpoint x-value of current rect

Get the right of rect. \js NA +---@field maxY number return the midpoint y-value of current rect

Get top of rect. \js NA +---@field midX number return the leftmost x-value of current rect

Get the X coordinate of center point. \js NA +---@field midY number return the bottommost y-value of current rect

Get the Y coordinate of center point. \js NA +---@field minX number Get the left of the rect. \js NA +---@field minY number return the rightmost x-value of current rect

Get the bottom of rect. \js NA +---@field origin cc.Vec2 +---@field size cc.Size +---@field ZERO cc.Rect +local Rect = {} + +---@return any +function Rect.__call() end + +---@return any +function Rect:__gc() end + +---@return any +function Rect:__olua_move() end + +---Check if the points is contained in the rect. +---\js NA +---@param point cc.Vec2 +---@return boolean +function Rect:containsPoint(point) end + +---return the topmost y-value of current rect +--- +---Compare two rects. +---\js NA +---@param rect cc.Rect +---@return boolean +function Rect:equals(rect) end + +---return the midpoint x-value of current rect +--- +---Get the right of rect. +---\js NA +---@return number +function Rect:getMaxX() end + +---return the midpoint y-value of current rect +--- +---Get top of rect. +---\js NA +---@return number +function Rect:getMaxY() end + +---return the leftmost x-value of current rect +--- +---Get the X coordinate of center point. +---\js NA +---@return number +function Rect:getMidX() end + +---return the bottommost y-value of current rect +--- +---Get the Y coordinate of center point. +---\js NA +---@return number +function Rect:getMidY() end + +---Get the left of the rect. +---\js NA +---@return number +function Rect:getMinX() end + +---return the rightmost x-value of current rect +--- +---Get the bottom of rect. +---\js NA +---@return number +function Rect:getMinY() end + +---Check the intersect status of the rect and a circle. +---\js NA +---@param center cc.Vec2 +---@param radius number +---@return boolean +function Rect:intersectsCircle(center, radius) end + +---Check the intersect status of two rects. +---\js NA +---@param rect cc.Rect +---@return boolean +function Rect:intersectsRect(rect) end + +---Compute the min rect which can contain this and rect, assign it to this. +---@param rect cc.Rect +function Rect:merge(rect) end + +---Constructor an empty Rect. +---\js NA +---@return cc.Rect +--- +---Constructor a rect. +---\js NA +---@overload fun(x: number, y: number, width: number, height: number): cc.Rect +--- +---Constructor a rect. +---\js NA +---@overload fun(pos: cc.Vec2, dimension: cc.Size): cc.Rect +function Rect.new() end + +---Set the x, y, width and height of Rect. +---\js NA +---\lua NA +---@param x number +---@param y number +---@param width number +---@param height number +function Rect:setRect(x, y, width, height) end + +---Get the min rect which can contain this and rect. +---\js NA +---\lua NA +---@param rect cc.Rect +---@return cc.Rect +function Rect:unionWithRect(rect) end + +return Rect \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/Ref.lua b/addons/cclua/cocos2d/library/cc/Ref.lua new file mode 100644 index 00000000..a21aad62 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/Ref.lua @@ -0,0 +1,22 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.Ref + +---\addtogroup base +---\{ +---@class cc.Ref +---@field referenceCount integer Returns the Ref's current reference count.

\returns The Ref's reference count. \js NA +local Ref = {} + +---@return any +function Ref:__gc() end + +---@return any +function Ref:__olua_move() end + +---Returns the Ref's current reference count. +--- +---@return integer # s The Ref's reference count. +---\js NA +function Ref:getReferenceCount() end + +return Ref \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/RemoveSelf.lua b/addons/cclua/cocos2d/library/cc/RemoveSelf.lua new file mode 100644 index 00000000..83aa3175 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/RemoveSelf.lua @@ -0,0 +1,16 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.RemoveSelf + +---\class RemoveSelf +---Remove the node. +---@class cc.RemoveSelf : cc.ActionInstant +local RemoveSelf = {} + +---Create the action. +--- +---@param isNeedCleanUp boolean # Is need to clean up, the default value is true. +---@return cc.RemoveSelf # An autoreleased RemoveSelf object. +---@overload fun(): cc.RemoveSelf +function RemoveSelf.create(isNeedCleanUp) end + +return RemoveSelf \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/RenderCommand.lua b/addons/cclua/cocos2d/library/cc/RenderCommand.lua new file mode 100644 index 00000000..5958ad13 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/RenderCommand.lua @@ -0,0 +1,69 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.RenderCommand + +---Base class of the `RenderCommand` hierarchy. +--- +---The `Renderer` knows how to render `RenderCommands` objects. +---@class cc.RenderCommand +---@field depth number Get the depth by current model view matrix. +---@field globalOrder number Get global Z order. +---@field mv cc.Mat4 +---@field pipelineDescriptor cc.PipelineDescriptor Can use the result to change the descriptor content. +---@field skipBatching boolean Get skip batching status, if a rendering is skip batching, it will be forced to be rendering separately. +---@field transparent boolean Returns whether is transparent. +---@field type cc.RenderCommand.Type Returns the Command type. +local RenderCommand = {} + +---@return any +function RenderCommand:__olua_move() end + +---Get the depth by current model view matrix. +---@return number +function RenderCommand:getDepth() end + +---Get global Z order. +---@return number +function RenderCommand:getGlobalOrder() end + +---@return cc.Mat4 +function RenderCommand:getMV() end + +---Can use the result to change the descriptor content. +---@return cc.PipelineDescriptor +function RenderCommand:getPipelineDescriptor() end + +---Returns the Command type. +---@return cc.RenderCommand.Type +function RenderCommand:getType() end + +---Init function, will be called by all the render commands. +---@param globalZOrder number # The global order of command, used for rendercommand sorting. +---@param modelViewTransform cc.Mat4 # Modelview matrix when submitting the render command. +---@param flags integer # Flag used to indicate whether the command should be draw at 3D mode or not. +function RenderCommand:init(globalZOrder, modelViewTransform, flags) end + +---Whether the command should be rendered at 3D mode. +---@return boolean +function RenderCommand:is3D() end + +---Get skip batching status, if a rendering is skip batching, it will be forced to be rendering separately. +---@return boolean +function RenderCommand:isSkipBatching() end + +---Returns whether is transparent. +---@return boolean +function RenderCommand:isTransparent() end + +---Set the command rendered in 3D mode or not. +---@param value boolean +function RenderCommand:set3D(value) end + +---Set skip batching. +---@param value boolean +function RenderCommand:setSkipBatching(value) end + +---Set transparent flag. +---@param isTransparent boolean +function RenderCommand:setTransparent(isTransparent) end + +return RenderCommand \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/RenderCommand/Type.lua b/addons/cclua/cocos2d/library/cc/RenderCommand/Type.lua new file mode 100644 index 00000000..342d4537 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/RenderCommand/Type.lua @@ -0,0 +1,27 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.RenderCommand.Type + +---@type cc.RenderCommand.Type +local VALUE + +--- +---@enum cc.RenderCommand.Type +local Type = { + ---Callback command, used for calling callback for rendering. + CALLBACK_COMMAND = 6, + CAPTURE_SCREEN_COMMAND = 7, + ---Custom command, used to draw things other then TRIANGLES_COMMAND. + CUSTOM_COMMAND = 2, + ---Group command, which can group command in a tree hierarchy. + GROUP_COMMAND = 3, + ---Mesh command, used to draw 3D meshes. + MESH_COMMAND = 4, + ---Quad command, used for draw quad. + QUAD_COMMAND = 1, + ---Triangles command, used to draw triangles. + TRIANGLES_COMMAND = 5, + ---Reserved type. + UNKNOWN_COMMAND = 0, +} + +return Type \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/RenderState.lua b/addons/cclua/cocos2d/library/cc/RenderState.lua new file mode 100644 index 00000000..b5e1ddae --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/RenderState.lua @@ -0,0 +1,8 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.RenderState + +---Defines the rendering state of the graphics device. +---@class cc.RenderState : cc.Ref +local RenderState = {} + +return RenderState \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/RenderTargetFlag.lua b/addons/cclua/cocos2d/library/cc/RenderTargetFlag.lua new file mode 100644 index 00000000..ec66f5a8 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/RenderTargetFlag.lua @@ -0,0 +1,16 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.RenderTargetFlag + +---@type cc.RenderTargetFlag +local VALUE + +--- +---@enum cc.RenderTargetFlag +local RenderTargetFlag = { + ALL = 7, + COLOR = 1, + DEPTH = 2, + STENCIL = 4, +} + +return RenderTargetFlag \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/RenderTexture.lua b/addons/cclua/cocos2d/library/cc/RenderTexture.lua new file mode 100644 index 00000000..c2fde731 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/RenderTexture.lua @@ -0,0 +1,289 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.RenderTexture + +---RenderTexture is a generic rendering target. To render things into it, +---simply construct a render target, call begin on it, call visit on any cocos +---scenes or objects to render them, and call end. For convenience, render texture +---adds a sprite as it's display child with the results, so you can simply add +---the render texture to your scene and treat it like any other CocosNode. +---There are also functions for saving the render texture to disk in PNG or JPG format. +---\since v0.8.1 +---@class cc.RenderTexture : cc.Node +---@field autoDraw boolean When enabled, it will render its children into the texture automatically. Disabled by default for compatibility reasons. Will be enabled in the future.

\return Return the autoDraw value. +---@field clearColor any Clear color value. Valid only when "autoDraw" is true.

\return Color value. +---@field clearFlags cc.ClearFlag Valid when "autoDraw" is true.

\return Clear flags. +---@field sprite cc.Sprite Gets the Sprite being used.

\return A Sprite. +local RenderTexture = {} + +---Starts grabbing. +function RenderTexture:begin() end + +---@param rt cc.RenderTexture +function RenderTexture.beginVisit(rt) end + +---Starts rendering to the texture while clearing the texture first. +---This is more efficient then calling -clear first and then -begin. +--- +---@param r number # Red. +---@param g number # Green. +---@param b number # Blue. +---@param a number # Alpha. +--- +---Starts rendering to the texture while clearing the texture first. +---This is more efficient then calling -clear first and then -begin. +--- +---\param r Red. +---\param g Green. +---\param b Blue. +---\param a Alpha. +---\param depthValue The depth Value. +---@overload fun(self: cc.RenderTexture, r: number, g: number, b: number, a: number, depthValue: number) +--- +---Starts rendering to the texture while clearing the texture first. +---This is more efficient then calling -clear first and then -begin. +--- +---\param r Red. +---\param g Green. +---\param b Blue. +---\param a Alpha. +---\param depthValue A specified depth value. +---\param stencilValue A specified stencil value. +---@overload fun(self: cc.RenderTexture, r: number, g: number, b: number, a: number, depthValue: number, stencilValue: integer) +function RenderTexture:beginWithClear(r, g, b, a) end + +---Clears the texture with a color. +--- +---@param r number # Red. +---@param g number # Green. +---@param b number # Blue. +---@param a number # Alpha. +function RenderTexture:clear(r, g, b, a) end + +---Clears the texture with a specified depth value. +--- +---@param depthValue number # A specified depth value. +function RenderTexture:clearDepth(depthValue) end + +---Clears the texture with a specified stencil value. +--- +---@param stencilValue integer # A specified stencil value. +function RenderTexture:clearStencil(stencilValue) end + +---Initializes a RenderTexture object with width and height in Points and a pixel format( only RGB and RGBA formats are valid ) and depthStencil format. +--- +---@param w integer # The RenderTexture object width. +---@param h integer # The RenderTexture object height. +---@param format ccb.PixelFormat # In Points and a pixel format( only RGB and RGBA formats are valid ). +---@param depthStencilFormat ccb.PixelFormat # The depthStencil format. +---@return cc.RenderTexture +--- +---Creates a RenderTexture object with width and height in Points and a pixel format, only RGB and RGBA formats are valid. +--- +---\param w The RenderTexture object width. +---\param h The RenderTexture object height. +---\param format In Points and a pixel format( only RGB and RGBA formats are valid ). +---@overload fun(w: integer, h: integer, format: ccb.PixelFormat): cc.RenderTexture +--- +---Creates a RenderTexture object with width and height in Points, pixel format is RGBA8888. +--- +---\param w The RenderTexture object width. +---\param h The RenderTexture object height. +---@overload fun(w: integer, h: integer): cc.RenderTexture +function RenderTexture.create(w, h, format, depthStencilFormat) end + +---@param rt cc.RenderTexture +function RenderTexture.endVisit(rt) end + +---Ends grabbing. +---\lua endToLua +function RenderTexture:end_() end + +---Clear color value. Valid only when "autoDraw" is true. +--- +---@return any # Color value. +function RenderTexture:getClearColor() end + +---Value for clearDepth. Valid only when "autoDraw" is true. +--- +---@return number # Value for clearDepth. +function RenderTexture:getClearDepth() end + +---Valid when "autoDraw" is true. +--- +---@return cc.ClearFlag # Clear flags. +function RenderTexture:getClearFlags() end + +---Value for clear Stencil. Valid only when "autoDraw" is true. +--- +---@return integer # Value for clear Stencil. +function RenderTexture:getClearStencil() end + +---Gets the Sprite being used. +--- +---@return cc.Sprite # A Sprite. +function RenderTexture:getSprite() end + +---Initializes a RenderTexture object with width and height in Points and a pixel format, only RGB and RGBA formats are valid. +--- +---@param w integer # The RenderTexture object width. +---@param h integer # The RenderTexture object height. +---@param format ccb.PixelFormat # In Points and a pixel format( only RGB and RGBA formats are valid ). +---@return boolean # If succeed, it will return true. +--- +---Initializes a RenderTexture object with width and height in Points and a pixel format( only RGB and RGBA formats are valid ) and depthStencil format. +--- +---\param w The RenderTexture object width. +---\param h The RenderTexture object height. +---\param format In Points and a pixel format( only RGB and RGBA formats are valid ). +---\param depthStencilFormat The depthStencil format. +---\return If succeed, it will return true. +---@overload fun(self: cc.RenderTexture, w: integer, h: integer, format: ccb.PixelFormat, depthStencilFormat: ccb.PixelFormat): boolean +function RenderTexture:initWithWidthAndHeight(w, h, format) end + +---When enabled, it will render its children into the texture automatically. Disabled by default for compatibility reasons. +---Will be enabled in the future. +--- +---@return boolean # Return the autoDraw value. +function RenderTexture:isAutoDraw() end + +---Listen "come to background" message, and save render texture. +---It only has effect on Android. +--- +---@param event cc.EventCustom # Event Custom. +function RenderTexture:listenToBackground(event) end + +---Listen "come to foreground" message and restore the frame buffer object. +---It only has effect on Android. +--- +---@param event cc.EventCustom # Event Custom. +function RenderTexture:listenToForeground(event) end + +---FIXME: should be protected. +---but due to a bug in PowerVR + Android, +---the constructor is public again. +---\js ctor +---@return cc.RenderTexture +function RenderTexture.new() end + +---@param imageCallback fun(arg1: cc.Image) +---@param flipImage boolean +---@overload fun(self: cc.RenderTexture, imageCallback: fun(arg1: cc.Image)) +function RenderTexture:newImage(imageCallback, flipImage) end + +---Saves the texture into a file using JPEG format. The file will be saved in the Documents folder. +---Returns true if the operation is successful. +--- +---@param filename string # The file name. +---@param isRGBA boolean # The file is RGBA or not. +---@param callback fun(arg1: cc.RenderTexture, arg2: string) # When the file is save finished,it will callback this function. +---@return boolean # Returns true if the operation is successful. +---@overload fun(self: cc.RenderTexture, filename: string): boolean +---@overload fun(self: cc.RenderTexture, filename: string, isRGBA: boolean): boolean +--- +---saves the texture into a file. The format could be JPG or PNG. The file will be saved in the Documents folder. +---Returns true if the operation is successful. +---Notes: since v3.x, saveToFile will generate a custom command, which will be called in the following render->render(). +---So if this function is called in a event handler, the actual save file will be called in the next frame. If we switch to a different scene, the game will crash. +---To solve this, add Director::getInstance()->getRenderer()->render(); after this function. +--- +---\param filename The file name. +---\param format The image format. +---\param isRGBA The file is RGBA or not. +---\param callback When the file is save finished,it will callback this function. +---\return Returns true if the operation is successful. +---@overload fun(self: cc.RenderTexture, filename: string, format: cc.Image.Format, isRGBA: boolean, callback: fun(arg1: cc.RenderTexture, arg2: string)): boolean +--- +---saves the texture into a file. The format could be JPG or PNG. The file will be saved in the Documents folder. +---Returns true if the operation is successful. +---Notes: since v3.x, saveToFile will generate a custom command, which will be called in the following render->render(). +---So if this function is called in a event handler, the actual save file will be called in the next frame. If we switch to a different scene, the game will crash. +---To solve this, add Director::getInstance()->getRenderer()->render(); after this function. +--- +---\param filename The file name. +---\param format The image format. +---\param isRGBA The file is RGBA or not. +---\param callback When the file is save finished,it will callback this function. +---\return Returns true if the operation is successful. +---@overload fun(self: cc.RenderTexture, filename: string, format: cc.Image.Format): boolean +--- +---saves the texture into a file. The format could be JPG or PNG. The file will be saved in the Documents folder. +---Returns true if the operation is successful. +---Notes: since v3.x, saveToFile will generate a custom command, which will be called in the following render->render(). +---So if this function is called in a event handler, the actual save file will be called in the next frame. If we switch to a different scene, the game will crash. +---To solve this, add Director::getInstance()->getRenderer()->render(); after this function. +--- +---\param filename The file name. +---\param format The image format. +---\param isRGBA The file is RGBA or not. +---\param callback When the file is save finished,it will callback this function. +---\return Returns true if the operation is successful. +---@overload fun(self: cc.RenderTexture, filename: string, format: cc.Image.Format, isRGBA: boolean): boolean +function RenderTexture:saveToFile(filename, isRGBA, callback) end + +---Saves the texture into a file using JPEG format. The file will be saved in the Documents folder. +---Returns true if the operation is successful. +--- +---@param filename string # The file name. +---@param isRGBA boolean # The file is RGBA or not. +---@param callback fun(arg1: cc.RenderTexture, arg2: string) # When the file is save finished,it will callback this function. +---@return boolean # Returns true if the operation is successful. +---@overload fun(self: cc.RenderTexture, filename: string): boolean +---@overload fun(self: cc.RenderTexture, filename: string, isRGBA: boolean): boolean +--- +---saves the texture into a file in non-PMA. The format could be JPG or PNG. The file will be saved in the Documents folder. +---Returns true if the operation is successful. +---Notes: since v3.x, saveToFile will generate a custom command, which will be called in the following render->render(). +---So if this function is called in a event handler, the actual save file will be called in the next frame. If we switch to a different scene, the game will crash. +---To solve this, add Director::getInstance()->getRenderer()->render(); after this function. +--- +---\param filename The file name. +---\param format The image format. +---\param isRGBA The file is RGBA or not. +---\param callback When the file is save finished,it will callback this function. +---\return Returns true if the operation is successful. +---@overload fun(self: cc.RenderTexture, fileName: string, format: cc.Image.Format, isRGBA: boolean, callback: fun(arg1: cc.RenderTexture, arg2: string)): boolean +function RenderTexture:saveToFileAsNonPMA(filename, isRGBA, callback) end + +---Set a valve to control whether or not render its children into the texture automatically. +--- +---@param isAutoDraw boolean # Whether or not render its children into the texture automatically. +function RenderTexture:setAutoDraw(isAutoDraw) end + +---Set color value. +--- +---@param clearColor any # Color value. +function RenderTexture:setClearColor(clearColor) end + +---Set Value for clearDepth. +--- +---@param clearDepth number # Value for clearDepth. +function RenderTexture:setClearDepth(clearDepth) end + +---Set flags. +--- +---@param clearFlags cc.ClearFlag # set clear flags. +function RenderTexture:setClearFlags(clearFlags) end + +---Set Value for clear Stencil. +--- +---@param clearStencil integer # Value for clear Stencil. +function RenderTexture:setClearStencil(clearStencil) end + +---Flag: Use stack matrix computed from scene hierarchy or generate new modelView and projection matrix. +--- +---@param keepMatrix boolean # Whether or not use stack matrix computed from scene hierarchy or generate new modelView and projection matrix. +---\js NA +function RenderTexture:setKeepMatrix(keepMatrix) end + +---Sets the Sprite being used. +--- +---@param sprite cc.Sprite # A Sprite. +function RenderTexture:setSprite(sprite) end + +---Used for grab part of screen to a texture. +---@param rtBegin cc.Vec2 # The position of renderTexture on the fullRect. +---@param fullRect cc.Rect # The total size of screen. +---@param fullViewport cc.Rect # The total viewportSize. +function RenderTexture:setVirtualViewport(rtBegin, fullRect, fullViewport) end + +return RenderTexture \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/Renderer.lua b/addons/cclua/cocos2d/library/cc/Renderer.lua new file mode 100644 index 00000000..bde7dad3 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/Renderer.lua @@ -0,0 +1,277 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.Renderer + +---\addtogroup 3d +---\{ +---@class cc.Renderer +---@field clearColor any Get color clear value. \return Color clear value. +---@field clearDepth number Get depth clear value. \return Depth clear value. +---@field clearFlag cc.ClearFlag Get the clear flag. \return The clear flag. +---@field clearStencil integer Get the index when the stencil buffer is cleared. \return The index used when the stencil buffer is cleared. +---@field colorAttachment cc.Texture2D Get color attachment. \return Color attachment. +---@field cullMode any Get cull mode. \return The cull mode. +---@field depthAttachment cc.Texture2D Get depth attachment. \return Depth attachment. +---@field depthCompareFunction ccb.CompareFunction Get depth compare function. \return Depth compare function. +---@field depthTest boolean Get whether depth test state is enabled or disabled. \return true if depth test is enabled, otherwise false. +---@field depthWrite boolean Get whether writing to depth buffer is enabled or not. \return true if enable writing into the depth buffer, false otherwise. +---@field drawnBatches integer +---@field drawnVertices integer +---@field renderTargetFlag cc.RenderTargetFlag Get the render target flag. \return The render target flag. +---@field scissorTest boolean +---@field stencilAttachment cc.Texture2D Get stencil attachment. \return Stencil attachment. +---@field stencilDepthPassOperation ccb.StencilOperation Get the stencil action when both the stencil test and the depth test pass, or when the stencil test passes and either there is no depth buffer or depth testing is not enabled. +---@field stencilFailureOperation ccb.StencilOperation Get the action to take when the stencil test fails. +---@field stencilPassDepthFailureOperation ccb.StencilOperation Get the stencil action when the stencil test passes, but the depth test fails. +---@field stencilReadMask integer Get the stencil readMask. \return Stencil read mask. \see `setStencilCompareFunction(backend::CompareFunction func, unsigned int ref, unsigned int readMask)` +---@field stencilReferenceValue integer Get stencil reference value set by `setStencilCompareFunction`. \return Stencil reference value. \see `setStencilCompareFunction(backend::CompareFunction func, unsigned int ref, unsigned int readMask)` +---@field stencilTest boolean Get whether stencil test is enabled or not. \return true if stencil test is enabled, false otherwise. +---@field stencilWriteMask integer Get the stencil write mask. \return Stencil write mask. \see `setStencilWriteMask(unsigned int mask)` +---@field winding any Get winding mode. \return The winding mode. +---@field BATCH_TRIAGCOMMAND_RESERVED_SIZE integer +---@field INDEX_VBO_SIZE integer +---@field MATERIAL_ID_DO_NOT_BATCH integer +---@field VBO_SIZE integer +local Renderer = {} + +---@return any +function Renderer:__gc() end + +---@return any +function Renderer:__olua_move() end + +---Adds a `RenderComamnd` into the renderer +---@param command cc.RenderCommand +--- +---Adds a `RenderComamnd` into the renderer specifying a particular render queue ID +---@overload fun(self: cc.Renderer, command: cc.RenderCommand, renderQueueID: integer) +function Renderer:addCommand(command) end + +---@param number integer +function Renderer:addDrawnBatches(number) end + +---@param number integer +function Renderer:addDrawnVertices(number) end + +---returns whether or not a rectangle is visible or not +---@param transform cc.Mat4 +---@param size cc.Size +---@return boolean +function Renderer:checkVisibility(transform, size) end + +---Cleans all `RenderCommand`s in the queue +function Renderer:clean() end + +---Set clear values for each attachment. +---\flags Flags to indicate which attachment clear value to be modified. +---\color The clear color value. +---\depth The clear depth value. +---\stencil The clear stencil value. +---@param flags cc.ClearFlag +---@param color any +---@param depth number +---@param stencil integer +---@param globalOrder number +function Renderer:clear(flags, color, depth, stencil, globalOrder) end + +function Renderer:clearDrawStats() end + +---Creates a render queue and returns its Id +---@return integer +function Renderer:createRenderQueue() end + +---draw command now +---@param command cc.RenderCommand +function Renderer:drawCommand(command) end + +---Get color clear value. +---@return any # Color clear value. +function Renderer:getClearColor() end + +---Get depth clear value. +---@return number # Depth clear value. +function Renderer:getClearDepth() end + +---Get the clear flag. +---@return cc.ClearFlag # The clear flag. +function Renderer:getClearFlag() end + +---Get the index when the stencil buffer is cleared. +---@return integer # The index used when the stencil buffer is cleared. +function Renderer:getClearStencil() end + +---Get color attachment. +---@return cc.Texture2D # Color attachment. +function Renderer:getColorAttachment() end + +---Get cull mode. +---@return any # The cull mode. +function Renderer:getCullMode() end + +---Get depth attachment. +---@return cc.Texture2D # Depth attachment. +function Renderer:getDepthAttachment() end + +---Get depth compare function. +---@return ccb.CompareFunction # Depth compare function. +function Renderer:getDepthCompareFunction() end + +---Get whether depth test state is enabled or disabled. +---@return boolean # true if depth test is enabled, otherwise false. +function Renderer:getDepthTest() end + +---Get whether writing to depth buffer is enabled or not. +---@return boolean # true if enable writing into the depth buffer, false otherwise. +function Renderer:getDepthWrite() end + +---@return integer +function Renderer:getDrawnBatches() end + +---@return integer +function Renderer:getDrawnVertices() end + +---Get the render target flag. +---@return cc.RenderTargetFlag # The render target flag. +function Renderer:getRenderTargetFlag() end + +---@return cc.ScissorRect +function Renderer:getScissorRect() end + +---@return boolean +function Renderer:getScissorTest() end + +---Get stencil attachment. +---@return cc.Texture2D # Stencil attachment. +function Renderer:getStencilAttachment() end + +---Get the stencil test function. +---@return ccb.CompareFunction +function Renderer:getStencilCompareFunction() end + +---Get the stencil action when both the stencil test and the depth test pass, or when the stencil test passes and either there is no depth buffer or depth testing is not enabled. +---@return ccb.StencilOperation +function Renderer:getStencilDepthPassOperation() end + +---Get the action to take when the stencil test fails. +---@return ccb.StencilOperation +function Renderer:getStencilFailureOperation() end + +---Get the stencil action when the stencil test passes, but the depth test fails. +---@return ccb.StencilOperation +function Renderer:getStencilPassDepthFailureOperation() end + +---Get the stencil readMask. +---@return integer # Stencil read mask. +---\see `setStencilCompareFunction(backend::CompareFunction func, unsigned int ref, unsigned int readMask)` +function Renderer:getStencilReadMask() end + +---Get stencil reference value set by `setStencilCompareFunction`. +---@return integer # Stencil reference value. +---\see `setStencilCompareFunction(backend::CompareFunction func, unsigned int ref, unsigned int readMask)` +function Renderer:getStencilReferenceValue() end + +---Get whether stencil test is enabled or not. +---@return boolean # true if stencil test is enabled, false otherwise. +function Renderer:getStencilTest() end + +---Get the stencil write mask. +---@return integer # Stencil write mask. +---\see `setStencilWriteMask(unsigned int mask)` +function Renderer:getStencilWriteMask() end + +---Get viewport. +---@return cc.Viewport +function Renderer:getViewport() end + +---Get winding mode. +---@return any # The winding mode. +function Renderer:getWinding() end + +function Renderer:init() end + +---Constructor. +---@return cc.Renderer +function Renderer.new() end + +---Pops a group from the render queue +function Renderer:popGroup() end + +---Pushes a group into the render queue +---@param renderQueueID integer +function Renderer:pushGroup(renderQueueID) end + +---Renders into the GLView all the queued `RenderCommand` objects +function Renderer:render() end + +---Fixed-function state +---@param mode any # Controls if primitives are culled when front facing, back facing, or not culled at all. +function Renderer:setCullMode(mode) end + +---Set depth compare function. +---@param func ccb.CompareFunction # Specifies the value used for depth buffer comparisons. +function Renderer:setDepthCompareFunction(func) end + +---Enable/disable depth test. +---@param value boolean # true means enable depth test, otherwise false. +function Renderer:setDepthTest(value) end + +---Enable/disable to update depth buffer. +---@param value boolean # true means enable writing into the depth buffer, otherwise false. +function Renderer:setDepthWrite(value) end + +---Set render targets. If not set, will use default render targets. It will effect all commands. +---\flags Flags to indicate which attachment to be replaced. +---\colorAttachment The value to replace color attachment, only one color attachment supported now. +---\depthAttachment The value to repalce depth attachment. +---\stencilAttachment The value to replace stencil attachment. Depth attachment and stencil attachment +---can be the same value. +---@param flags cc.RenderTargetFlag +---@param colorAttachment cc.Texture2D +---@param depthAttachment cc.Texture2D +---@param stencilAttachment cc.Texture2D +function Renderer:setRenderTarget(flags, colorAttachment, depthAttachment, stencilAttachment) end + +---Fixed-function state +---@param x number # , y Specifies the lower left corner of the scissor box +---\param wdith Specifies the width of the scissor box +---@param height number # Specifies the height of the scissor box +---@param y number +---@param width number +function Renderer:setScissorRect(x, y, width, height) end + +---Enable/disable scissor test. +---@param enabled boolean # true if enable scissor test, false otherwise. +function Renderer:setScissorTest(enabled) end + +---Set front and back function and reference value for stencil testing. +---@param func ccb.CompareFunction # Specifies the stencil test function. +---@param ref integer # Specifies the reference value for the stencil test. +---\readMask Specifies a mask that is ANDed with both the reference value and the stored stencil value when the test is done. +---@param readMask integer +function Renderer:setStencilCompareFunction(func, ref, readMask) end + +---Set front and back stencil test actions. +---@param stencilFailureOp ccb.StencilOperation # Specifies the action to take when the stencil test fails. +---@param depthFailureOp ccb.StencilOperation # Specifies the stencil action when the stencil test passes, but the depth test fails. +---@param stencilDepthPassOp ccb.StencilOperation # Specifies the stencil action when both the stencil test and the depth test pass, or when the stencil test passes and either there is no depth buffer or depth testing is not enabled. +function Renderer:setStencilOperation(stencilFailureOp, depthFailureOp, stencilDepthPassOp) end + +---Enable/disable stencil test. +---@param value boolean # true means enable stencil test, otherwise false. +function Renderer:setStencilTest(value) end + +---Control the front and back writing of individual bits in the stencil planes. +---@param mask integer # Specifies a bit mask to enable and disable writing of individual bits in the stencil planes. +function Renderer:setStencilWriteMask(mask) end + +---Fixed-function state +---@param x integer # The x coordinate of the upper-left corner of the viewport. +---@param y integer # The y coordinate of the upper-left corner of the viewport. +---@param w integer # The width of the viewport, in pixels. +---@param h integer # The height of the viewport, in pixels. +function Renderer:setViewPort(x, y, w, h) end + +---Fixed-function state +---@param winding any # The winding order of front-facing primitives. +function Renderer:setWinding(winding) end + +return Renderer \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/Repeat.lua b/addons/cclua/cocos2d/library/cc/Repeat.lua new file mode 100644 index 00000000..f7267f0b --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/Repeat.lua @@ -0,0 +1,28 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.Repeat + +---\class Repeat +---Repeats an action a number of times. +---To repeat an action forever use the RepeatForever action. +---@class cc.Repeat : cc.ActionInterval +---@field innerAction cc.FiniteTimeAction Gets the inner action.

\return The inner action. +local Repeat = {} + +---Creates a Repeat action. Times is an unsigned integer between 1 and pow(2,30). +--- +---@param action cc.FiniteTimeAction # The action needs to repeat. +---@param times integer # The repeat times. +---@return cc.Repeat # An autoreleased Repeat object. +function Repeat.create(action, times) end + +---Gets the inner action. +--- +---@return cc.FiniteTimeAction # The inner action. +function Repeat:getInnerAction() end + +---Sets the inner action. +--- +---@param action cc.FiniteTimeAction # The inner action. +function Repeat:setInnerAction(action) end + +return Repeat \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/RepeatForever.lua b/addons/cclua/cocos2d/library/cc/RepeatForever.lua new file mode 100644 index 00000000..de340581 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/RepeatForever.lua @@ -0,0 +1,28 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.RepeatForever + +---\class RepeatForever +---Repeats an action for ever. +---To repeat the an action for a limited number of times use the Repeat action. +---\warning This action can't be Sequenceable because it is not an IntervalAction. +---@class cc.RepeatForever : cc.ActionInterval +---@field innerAction cc.ActionInterval Gets the inner action.

\return The inner action. +local RepeatForever = {} + +---Creates the action. +--- +---@param action cc.ActionInterval # The action need to repeat forever. +---@return cc.RepeatForever # An autoreleased RepeatForever object. +function RepeatForever.create(action) end + +---Gets the inner action. +--- +---@return cc.ActionInterval # The inner action. +function RepeatForever:getInnerAction() end + +---Sets the inner action. +--- +---@param action cc.ActionInterval # The inner action. +function RepeatForever:setInnerAction(action) end + +return RepeatForever \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/ResizableBuffer.lua b/addons/cclua/cocos2d/library/cc/ResizableBuffer.lua new file mode 100644 index 00000000..56808a41 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/ResizableBuffer.lua @@ -0,0 +1,21 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.ResizableBuffer + +---\addtogroup platform +---\{ +---@class cc.ResizableBuffer +local ResizableBuffer = {} + +---@return any +function ResizableBuffer:__gc() end + +---@return any +function ResizableBuffer:__olua_move() end + +---@return any +function ResizableBuffer:buffer() end + +---@param size integer +function ResizableBuffer:resize(size) end + +return ResizableBuffer \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/ResizeBy.lua b/addons/cclua/cocos2d/library/cc/ResizeBy.lua new file mode 100644 index 00000000..abd19c54 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/ResizeBy.lua @@ -0,0 +1,16 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.ResizeBy + +---\class ResizeBy +---Resize a Node object by a Size. Works on all nodes where setContentSize is effective. But it's mostly useful for nodes where 9-slice is enabled +---@class cc.ResizeBy : cc.ActionInterval +local ResizeBy = {} + +---Creates the action. +--- +---@param duration number # Duration time, in seconds. +---@param deltaSize cc.Size # The delta size. +---@return cc.ResizeBy # An autoreleased ResizeBy object. +function ResizeBy.create(duration, deltaSize) end + +return ResizeBy \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/ResizeTo.lua b/addons/cclua/cocos2d/library/cc/ResizeTo.lua new file mode 100644 index 00000000..dfb8d4fa --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/ResizeTo.lua @@ -0,0 +1,16 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.ResizeTo + +---\class ResizeTo +---Resize a Node object to the final size by modifying it's Size attribute. +---@class cc.ResizeTo : cc.ActionInterval +local ResizeTo = {} + +---Creates the action. +---Resize a Node object to the final size by modifying it's Size attribute. Works on all nodes where setContentSize is effective. But it's mostly useful for nodes where 9-slice is enabled +---@param duration number # Duration time, in seconds. +---@param final_size cc.Size # The target size to reach +---@return cc.ResizeTo # An autoreleased RotateTo object. +function ResizeTo.create(duration, final_size) end + +return ResizeTo \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/ResolutionPolicy.lua b/addons/cclua/cocos2d/library/cc/ResolutionPolicy.lua new file mode 100644 index 00000000..1e94d163 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/ResolutionPolicy.lua @@ -0,0 +1,32 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.ResolutionPolicy + +---@type cc.ResolutionPolicy +local VALUE + +--- +---@enum cc.ResolutionPolicy +local ResolutionPolicy = { + ---The entire application is visible in the specified area without trying to preserve the original aspect ratio. + ---Distortion can occur, and the application may appear stretched or compressed. + EXACT_FIT = 0, + ---The application takes the height of the design resolution size and modifies the width of the internal + ---canvas so that it fits the aspect ratio of the device. + ---No distortion will occur however you must make sure your application works on different + ---aspect ratios. + FIXED_HEIGHT = 3, + ---The application takes the width of the design resolution size and modifies the height of the internal + ---canvas so that it fits the aspect ratio of the device. + ---No distortion will occur however you must make sure your application works on different + ---aspect ratios. + FIXED_WIDTH = 4, + ---The entire application fills the specified area, without distortion but possibly with some cropping, + ---while maintaining the original aspect ratio of the application. + NO_BORDER = 1, + ---The entire application is visible in the specified area without distortion while maintaining the original + ---aspect ratio of the application. Borders can appear on two sides of the application. + SHOW_ALL = 2, + UNKNOWN = 5, +} + +return ResolutionPolicy \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/ResourceData.lua b/addons/cclua/cocos2d/library/cc/ResourceData.lua new file mode 100644 index 00000000..e0405d39 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/ResourceData.lua @@ -0,0 +1,22 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.ResourceData + +---\addtogroup ui +---\{ +---@class cc.ResourceData +---@field file string +---@field plist string +---@field type integer +local ResourceData = {} + +---@return any +function ResourceData:__gc() end + +---@return any +function ResourceData:__olua_move() end + +---@return cc.ResourceData +---@overload fun(iType: integer, sFile: string, sPlist: string): cc.ResourceData +function ResourceData.new() end + +return ResourceData \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/ReuseGrid.lua b/addons/cclua/cocos2d/library/cc/ReuseGrid.lua new file mode 100644 index 00000000..5445af17 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/ReuseGrid.lua @@ -0,0 +1,18 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.ReuseGrid + +---ReuseGrid action. +---@class cc.ReuseGrid : cc.ActionInstant +local ReuseGrid = {} + +---Create an action with the number of times that the current grid will be reused. +---@param times integer # Specify times the grid will be reused. +---@return cc.ReuseGrid # Return a pointer of ReuseGrid. When the creation failed, return nil. +function ReuseGrid.create(times) end + +---Initializes an action with the number of times that the current grid will be reused. +---@param times integer # Specify times the grid will be reused. +---@return boolean # If the initialization success, return true; otherwise, return false. +function ReuseGrid:initWithTimes(times) end + +return ReuseGrid \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/ReverseTime.lua b/addons/cclua/cocos2d/library/cc/ReverseTime.lua new file mode 100644 index 00000000..e37c5ff7 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/ReverseTime.lua @@ -0,0 +1,20 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.ReverseTime + +---\class ReverseTime +---Executes an action in reverse order, from time=duration to time=0 +--- +---\warning Use this action carefully. This action is not +---sequenceable. Use it as the default "reversed" method +---of your own actions, but using it outside the "reversed" +---scope is not recommended. +---@class cc.ReverseTime : cc.ActionInterval +local ReverseTime = {} + +---Creates the action. +--- +---@param action cc.FiniteTimeAction # a certain action. +---@return cc.ReverseTime # An autoreleased ReverseTime object. +function ReverseTime.create(action) end + +return ReverseTime \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/Ripple3D.lua b/addons/cclua/cocos2d/library/cc/Ripple3D.lua new file mode 100644 index 00000000..d55f5cbb --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/Ripple3D.lua @@ -0,0 +1,40 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.Ripple3D + +---Ripple3D action. +---\details This action is used for take effect on the target node as ripple. +---You can create the action by these parameters: +---duration, grid size, center position of ripple, +---radius of ripple, waves count, amplitude. +---@class cc.Ripple3D : cc.Grid3DAction +---@field amplitude number Get the amplitude of ripple effect. \return The amplitude of ripple effect. +---@field position cc.Vec2 Get the center position of ripple effect. \return The center position of ripple effect. +local Ripple3D = {} + +---Create the action with center position, radius, number of waves, amplitude, a grid size and duration. +---@param duration number # Specify the duration of the Ripple3D action. It's a value in seconds. +---@param gridSize cc.Size # Specify the size of the grid. +---@param position cc.Vec2 # Specify the center position of the ripple effect. +---@param radius number # Specify the radius of the ripple effect. +---@param waves integer # Specify the waves count of the ripple effect. +---@param amplitude number # Specify the amplitude of the ripple effect. +---@return cc.Ripple3D # If the creation success, return a pointer of Ripple3D action; otherwise, return nil. +function Ripple3D.create(duration, gridSize, position, radius, waves, amplitude) end + +---Get the amplitude of ripple effect. +---@return number # The amplitude of ripple effect. +function Ripple3D:getAmplitude() end + +---Get the center position of ripple effect. +---@return cc.Vec2 # The center position of ripple effect. +function Ripple3D:getPosition() end + +---Set the amplitude of ripple effect. +---@param fAmplitude number # The amplitude of ripple effect. +function Ripple3D:setAmplitude(fAmplitude) end + +---Set the center position of ripple effect. +---@param position cc.Vec2 # The center position of ripple effect will be set. +function Ripple3D:setPosition(position) end + +return Ripple3D \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/RotateBy.lua b/addons/cclua/cocos2d/library/cc/RotateBy.lua new file mode 100644 index 00000000..43cad2a6 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/RotateBy.lua @@ -0,0 +1,32 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.RotateBy + +---\class RotateBy +---Rotates a Node object clockwise a number of degrees by modifying it's rotation attribute. +---@class cc.RotateBy : cc.ActionInterval +local RotateBy = {} + +---Creates the action. +--- +---@param duration number # Duration time, in seconds. +---@param deltaAngle number # In degreesCW. +---@return cc.RotateBy # An autoreleased RotateBy object. +--- +---Creates the action with separate rotation angles. +--- +---\param duration Duration time, in seconds. +---\param deltaAngleZ_X In degreesCW. +---\param deltaAngleZ_Y In degreesCW. +---\return An autoreleased RotateBy object. +---\warning The physics body contained in Node doesn't support rotate with different x and y angle. +---@overload fun(duration: number, deltaAngleZ_X: number, deltaAngleZ_Y: number): cc.RotateBy +--- +---Creates the action with 3D rotation angles. +--- +---\param duration Duration time, in seconds. +---\param deltaAngle3D A Vec3 angle. +---\return An autoreleased RotateBy object. +---@overload fun(duration: number, deltaAngle3D: cc.Vec3): cc.RotateBy +function RotateBy.create(duration, deltaAngle) end + +return RotateBy \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/RotateFrom.lua b/addons/cclua/cocos2d/library/cc/RotateFrom.lua new file mode 100644 index 00000000..d83ffd22 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/RotateFrom.lua @@ -0,0 +1,16 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.RotateFrom + +--- +---@class cc.RotateFrom : cc.RotateTo +local RotateFrom = {} + +---@param duration number +---@param fromAngleX number +---@param fromAngleY number +---@return cc.RotateFrom +---@overload fun(duration: number, fromAngle: number): cc.RotateFrom +---@overload fun(duration: number, fromAngle3D: cc.Vec3): cc.RotateFrom +function RotateFrom.create(duration, fromAngleX, fromAngleY) end + +return RotateFrom \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/RotateTo.lua b/addons/cclua/cocos2d/library/cc/RotateTo.lua new file mode 100644 index 00000000..7dfd19a9 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/RotateTo.lua @@ -0,0 +1,31 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.RotateTo + +---\class RotateTo +---Rotates a Node object to a certain angle by modifying it's rotation attribute. +---The direction will be decided by the shortest angle. +---@class cc.RotateTo : cc.ActionInterval +local RotateTo = {} + +---Creates the action with separate rotation angles. +--- +---@param duration number # Duration time, in seconds. +---@param dstAngleX number # In degreesCW. +---@param dstAngleY number # In degreesCW. +---@return cc.RotateTo # An autoreleased RotateTo object. +--- +---Creates the action. +--- +---\param duration Duration time, in seconds. +---\param dstAngle In degreesCW. +---\return An autoreleased RotateTo object. +---@overload fun(duration: number, dstAngle: number): cc.RotateTo +--- +---Creates the action with 3D rotation angles. +---\param duration Duration time, in seconds. +---\param dstAngle3D A Vec3 angle. +---\return An autoreleased RotateTo object. +---@overload fun(duration: number, dstAngle3D: cc.Vec3): cc.RotateTo +function RotateTo.create(duration, dstAngleX, dstAngleY) end + +return RotateTo \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/SAXDelegator.lua b/addons/cclua/cocos2d/library/cc/SAXDelegator.lua new file mode 100644 index 00000000..617c7e67 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/SAXDelegator.lua @@ -0,0 +1,27 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.SAXDelegator + +--- +---@class cc.SAXDelegator +local SAXDelegator = {} + +---@return any +function SAXDelegator:__gc() end + +---@return any +function SAXDelegator:__olua_move() end + +---\js NA +---\lua NA +---@param ctx any +---@param name string +function SAXDelegator:endElement(ctx, name) end + +---\js NA +---\lua NA +---@param ctx any +---@param s string +---@param len integer +function SAXDelegator:textHandler(ctx, s, len) end + +return SAXDelegator \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/ScaleBy.lua b/addons/cclua/cocos2d/library/cc/ScaleBy.lua new file mode 100644 index 00000000..9563a78c --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/ScaleBy.lua @@ -0,0 +1,31 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.ScaleBy + +---\class ScaleBy +---Scales a Node object a zoom factor by modifying it's scale attribute. +---\warning The physics body contained in Node doesn't support this action. +---@class cc.ScaleBy : cc.ScaleTo +local ScaleBy = {} + +---Creates the action with the same scale factor for X and Y. +---@param duration number # Duration time, in seconds. +---@param s number # Scale factor of x and y. +---@return cc.ScaleBy # An autoreleased ScaleBy object. +--- +---Creates the action with and X factor and a Y factor. +---\param duration Duration time, in seconds. +---\param sx Scale factor of x. +---\param sy Scale factor of y. +---\return An autoreleased ScaleBy object. +---@overload fun(duration: number, sx: number, sy: number): cc.ScaleBy +--- +---Creates the action with X Y Z factor. +---\param duration Duration time, in seconds. +---\param sx Scale factor of x. +---\param sy Scale factor of y. +---\param sz Scale factor of z. +---\return An autoreleased ScaleBy object. +---@overload fun(duration: number, sx: number, sy: number, sz: number): cc.ScaleBy +function ScaleBy.create(duration, s) end + +return ScaleBy \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/ScaleFrom.lua b/addons/cclua/cocos2d/library/cc/ScaleFrom.lua new file mode 100644 index 00000000..356188aa --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/ScaleFrom.lua @@ -0,0 +1,15 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.ScaleFrom + +--- +---@class cc.ScaleFrom : cc.ScaleTo +local ScaleFrom = {} + +---@param duration number +---@param s number +---@return cc.ScaleFrom +---@overload fun(duration: number, sx: number, sy: number): cc.ScaleFrom +---@overload fun(duration: number, sx: number, sy: number, sz: number): cc.ScaleFrom +function ScaleFrom.create(duration, s) end + +return ScaleFrom \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/ScaleTo.lua b/addons/cclua/cocos2d/library/cc/ScaleTo.lua new file mode 100644 index 00000000..d8a0eac7 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/ScaleTo.lua @@ -0,0 +1,32 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.ScaleTo + +---\class ScaleTo +---Scales a Node object to a zoom factor by modifying it's scale attribute. +---\warning This action doesn't support "reverse". +---\warning The physics body contained in Node doesn't support this action. +---@class cc.ScaleTo : cc.ActionInterval +local ScaleTo = {} + +---Creates the action with the same scale factor for X and Y. +---@param duration number # Duration time, in seconds. +---@param s number # Scale factor of x and y. +---@return cc.ScaleTo # An autoreleased ScaleTo object. +--- +---Creates the action with and X factor and a Y factor. +---\param duration Duration time, in seconds. +---\param sx Scale factor of x. +---\param sy Scale factor of y. +---\return An autoreleased ScaleTo object. +---@overload fun(duration: number, sx: number, sy: number): cc.ScaleTo +--- +---Creates the action with X Y Z factor. +---\param duration Duration time, in seconds. +---\param sx Scale factor of x. +---\param sy Scale factor of y. +---\param sz Scale factor of z. +---\return An autoreleased ScaleTo object. +---@overload fun(duration: number, sx: number, sy: number, sz: number): cc.ScaleTo +function ScaleTo.create(duration, s) end + +return ScaleTo \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/Scene.lua b/addons/cclua/cocos2d/library/cc/Scene.lua new file mode 100644 index 00000000..c1164a8e --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/Scene.lua @@ -0,0 +1,101 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.Scene + +---\class Scene +---Scene is a subclass of Node that is used only as an abstract concept. +--- +---Scene and Node are almost identical with the difference that Scene has its +---anchor point (by default) at the center of the screen. +--- +---For the moment Scene has no other logic than that, but in future releases it might have +---additional logic. +--- +---It is a good practice to use a Scene as the parent of all your nodes. +--- +---Scene will create a default camera for you. +---@class cc.Scene : cc.Node +---@field cameras cc.Camera[] Get all cameras.

\return The vector of all cameras, ordered by camera depth. \js NA +---@field defaultCamera cc.Camera Get the default camera. \js NA \return The default camera of scene. +---@field lights cc.BaseLight[] Get lights. \return The vector of lights. \js NA +---@field navMesh cc.NavMesh get navigation mesh +---@field physicsWorld cc.PhysicsWorld Get the physics world of the scene. \return The physics world of the scene. \js NA +local Scene = {} + +---Creates a new Scene object. +--- +---@return cc.Scene # An autoreleased Scene object. +function Scene.create() end + +---Create a scene with physics. +---@return cc.Scene # An autoreleased Scene object with physics. +---\js NA +function Scene.createWithPhysics() end + +---Creates a new Scene object with a predefined Size. +--- +---@param size cc.Size # The predefined size of scene. +---@return cc.Scene # An autoreleased Scene object. +---\js NA +function Scene.createWithSize(size) end + +---Get all cameras. +--- +---@return cc.Camera[] # The vector of all cameras, ordered by camera depth. +---\js NA +function Scene:getCameras() end + +---Get the default camera. +---\js NA +---@return cc.Camera # The default camera of scene. +function Scene:getDefaultCamera() end + +---Get lights. +---@return cc.BaseLight[] # The vector of lights. +---\js NA +function Scene:getLights() end + +---get navigation mesh +---@return cc.NavMesh +function Scene:getNavMesh() end + +---Get the physics world of the scene. +---@return cc.PhysicsWorld # The physics world of the scene. +---\js NA +function Scene:getPhysicsWorld() end + +---@param size cc.Size +---@return boolean +function Scene:initWithSize(size) end + +---@return cc.Scene +function Scene.new() end + +---@param event cc.EventCustom +function Scene:onProjectionChanged(event) end + +---Render the scene. +---@param renderer cc.Renderer # The renderer use to render the scene. +---@param eyeTransform cc.Mat4 # The AdditionalTransform of camera. +---@param eyeProjection cc.Mat4 # The projection matrix of camera. +---\js NA +---@overload fun(self: cc.Scene, renderer: cc.Renderer, eyeTransform: cc.Mat4) +function Scene:render(renderer, eyeTransform, eyeProjection) end + +function Scene:setCameraOrderDirty() end + +---set navigation mesh +---@param navMesh cc.NavMesh +function Scene:setNavMesh(navMesh) end + +---Set NavMesh debug draw camera. +---@param camera cc.Camera +function Scene:setNavMeshDebugCamera(camera) end + +---Set Physics3D debug draw camera. +---@param camera cc.Camera +function Scene:setPhysics3DDebugCamera(camera) end + +---@param deltaTime number +function Scene:stepPhysicsAndNavigation(deltaTime) end + +return Scene \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/Scheduler.lua b/addons/cclua/cocos2d/library/cc/Scheduler.lua new file mode 100644 index 00000000..ea9e3d4a --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/Scheduler.lua @@ -0,0 +1,161 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.Scheduler + +---Scheduler is responsible for triggering the scheduled callbacks. +---You should not use system timer for your game logic. Instead, use this class. +--- +---There are 2 different types of callbacks (selectors): +--- +---- update selector: the 'update' selector will be called every frame. You can customize the priority. +---- custom selector: A custom selector will be called every frame, or with a custom interval of time +--- +---The 'custom selectors' should be avoided when possible. It is faster, and consumes less memory to use the 'update selector'. +---@class cc.Scheduler : cc.Ref +---@field timeScale number Gets the time scale of schedule callbacks. \see Scheduler::setTimeScale() +---@field PRIORITY_NON_SYSTEM_MIN integer +---@field PRIORITY_SYSTEM integer +local Scheduler = {} + +---Gets the time scale of schedule callbacks. +---\see Scheduler::setTimeScale() +---@return number +function Scheduler:getTimeScale() end + +---Checks whether a callback associated with 'key' and 'target' is scheduled. +---@param key string # The key to identify the callback function, because there is not way to identify a std::function<>. +---@param target any # The target of the callback. +---@return boolean # True if the specified callback is invoked, false if not. +---\since v3.0.0 +function Scheduler:isScheduled(key, target) end + +---Returns whether or not the target is paused. +---@param target any # The target to be checked. +---@return boolean # True if the target is paused, false if not. +---\since v1.0.0 +---\lua NA +function Scheduler:isTargetPaused(target) end + +---Constructor +--- +---\js ctor +---@return cc.Scheduler +function Scheduler.new() end + +---Pause all selectors from all targets. +---You should NEVER call this method, unless you know what you are doing. +---\since v2.0.0 +---@return any[] +function Scheduler:pauseAllTargets() end + +---Pause all selectors from all targets with a minimum priority. +---You should only call this with PRIORITY_NON_SYSTEM_MIN or higher. +---@param minPriority integer # The minimum priority of selector to be paused. Which means, all selectors which +---priority is higher than minPriority will be paused. +---\since v2.0.0 +---@return any[] +function Scheduler:pauseAllTargetsWithMinPriority(minPriority) end + +---Pauses the target. +---All scheduled selectors/update for a given target won't be 'ticked' until the target is resumed. +---If the target is not present, nothing happens. +---@param target any # The target to be paused. +---\since v0.99.3 +function Scheduler:pauseTarget(target) end + +---Remove all pending functions queued to be performed with Scheduler::performFunctionInCocosThread +---Functions unscheduled in this manner will not be executed +---This function is thread safe +---\since v3.14 +---\js NA +function Scheduler:removeAllFunctionsToBePerformedInCocosThread() end + +---Resumes the target. +---The 'target' will be unpaused, so all schedule selectors/update will be 'ticked' again. +---If the target is not present, nothing happens. +---@param target any # The target to be resumed. +---\since v0.99.3 +function Scheduler:resumeTarget(target) end + +---Resume selectors on a set of targets. +---This can be useful for undoing a call to pauseAllSelectors. +---@param targetsToResume any[] # The set of targets to be resumed. +---\since v2.0.0 +function Scheduler:resumeTargets(targetsToResume) end + +---The scheduled method will be called every 'interval' seconds. +---If paused is true, then it won't be called until it is resumed. +---If 'interval' is 0, it will be called every frame, but if so, it's recommended to use 'scheduleUpdate' instead. +---If the 'callback' is already scheduled, then only the interval parameter will be updated without re-scheduling it again. +---repeat let the action be repeated repeat + 1 times, use CC_REPEAT_FOREVER to let the action run continuously +---delay is the amount of time the action will wait before it'll start. +---@param callback cc.ccSchedulerFunc # The callback function. +---@param target any # The target of the callback function. +---@param interval number # The interval to schedule the callback. If the value is 0, then the callback will be scheduled every frame. +---\param repeat repeat+1 times to schedule the callback. +---@param delay number # Schedule call back after `delay` seconds. If the value is not 0, the first schedule will happen after `delay` seconds. +---But it will only affect first schedule. After first schedule, the delay time is determined by `interval`. +---@param paused boolean # Whether or not to pause the schedule. +---@param key string # The key to identify the callback function, because there is not way to identify a std::function<>. +---\since v3.0 +---@param repeat_ integer +--- +---The scheduled method will be called every 'interval' seconds for ever. +---\param callback The callback function. +---\param target The target of the callback function. +---\param interval The interval to schedule the callback. If the value is 0, then the callback will be scheduled every frame. +---\param paused Whether or not to pause the schedule. +---\param key The key to identify the callback function, because there is not way to identify a std::function<>. +---\since v3.0 +---@overload fun(self: cc.Scheduler, callback: cc.ccSchedulerFunc, target: any, interval: number, paused: boolean, key: string) +function Scheduler:schedule(callback, target, interval, repeat_, delay, paused, key) end + +---@return any +function Scheduler:scheduleUpdate() end + +---Modifies the time of all scheduled callbacks. +---You can use this property to create a 'slow motion' or 'fast forward' effect. +---Default is 1.0. To create a 'slow motion' effect, use values below 1.0. +---To create a 'fast forward' effect, use values higher than 1.0. +---\since v0.8 +---\warning It will affect EVERY scheduled selector / action. +---@param timeScale number +function Scheduler:setTimeScale(timeScale) end + +---Unschedules a callback for a key and a given target. +---If you want to unschedule the 'callbackPerFrame', use unscheduleUpdate. +---@param key string # The key to identify the callback function, because there is not way to identify a std::function<>. +---@param target any # The target to be unscheduled. +---\since v3.0 +function Scheduler:unschedule(key, target) end + +---Unschedules all selectors from all targets. +---You should NEVER call this method, unless you know what you are doing. +---\since v0.99.3 +function Scheduler:unscheduleAll() end + +---Unschedules all selectors for a given target. +---This also includes the "update" selector. +---@param target any # The target to be unscheduled. +---\since v0.99.3 +---\lua NA +function Scheduler:unscheduleAllForTarget(target) end + +---Unschedules all selectors from all targets with a minimum priority. +---You should only call this with `PRIORITY_NON_SYSTEM_MIN` or higher. +---@param minPriority integer # The minimum priority of selector to be unscheduled. Which means, all selectors which +---priority is higher than minPriority will be unscheduled. +---\since v2.0.0 +function Scheduler:unscheduleAllWithMinPriority(minPriority) end + +---Unschedules the update selector for a given target +---@param target any # The target to be unscheduled. +---\since v0.99.3 +function Scheduler:unscheduleUpdate(target) end + +---'update' the scheduler. +---You should NEVER call this method, unless you know what you are doing. +---\lua NA +---@param dt number +function Scheduler:update(dt) end + +return Scheduler \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/ScissorRect.lua b/addons/cclua/cocos2d/library/cc/ScissorRect.lua new file mode 100644 index 00000000..eb8e8b1b --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/ScissorRect.lua @@ -0,0 +1,18 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.ScissorRect + +--- +---@class cc.ScissorRect +---@field height number +---@field width number +---@field x number +---@field y number +local ScissorRect = {} + +---@return any +function ScissorRect:__gc() end + +---@return any +function ScissorRect:__olua_move() end + +return ScissorRect \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/Sequence.lua b/addons/cclua/cocos2d/library/cc/Sequence.lua new file mode 100644 index 00000000..0740b15a --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/Sequence.lua @@ -0,0 +1,49 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.Sequence + +---\class Sequence +---Runs actions sequentially, one after another. +---@class cc.Sequence : cc.ActionInterval +local Sequence = {} + +---Helper constructor to create an array of sequenceable actions. +--- +---@return cc.Sequence # An autoreleased Sequence object. +---@param action1 cc.FiniteTimeAction +---@overload fun(action1: cc.FiniteTimeAction, action1_1: cc.FiniteTimeAction): cc.Sequence +---@overload fun(action1: cc.FiniteTimeAction, action1_1: cc.FiniteTimeAction, action1_2: cc.FiniteTimeAction): cc.Sequence +---@overload fun(action1: cc.FiniteTimeAction, action1_1: cc.FiniteTimeAction, action1_2: cc.FiniteTimeAction, action1_3: cc.FiniteTimeAction): cc.Sequence +---@overload fun(action1: cc.FiniteTimeAction, action1_1: cc.FiniteTimeAction, action1_2: cc.FiniteTimeAction, action1_3: cc.FiniteTimeAction, action1_4: cc.FiniteTimeAction): cc.Sequence +---@overload fun(action1: cc.FiniteTimeAction, action1_1: cc.FiniteTimeAction, action1_2: cc.FiniteTimeAction, action1_3: cc.FiniteTimeAction, action1_4: cc.FiniteTimeAction, action1_5: cc.FiniteTimeAction): cc.Sequence +---@overload fun(action1: cc.FiniteTimeAction, action1_1: cc.FiniteTimeAction, action1_2: cc.FiniteTimeAction, action1_3: cc.FiniteTimeAction, action1_4: cc.FiniteTimeAction, action1_5: cc.FiniteTimeAction, action1_6: cc.FiniteTimeAction): cc.Sequence +---@overload fun(action1: cc.FiniteTimeAction, action1_1: cc.FiniteTimeAction, action1_2: cc.FiniteTimeAction, action1_3: cc.FiniteTimeAction, action1_4: cc.FiniteTimeAction, action1_5: cc.FiniteTimeAction, action1_6: cc.FiniteTimeAction, action1_7: cc.FiniteTimeAction): cc.Sequence +---@overload fun(action1: cc.FiniteTimeAction, action1_1: cc.FiniteTimeAction, action1_2: cc.FiniteTimeAction, action1_3: cc.FiniteTimeAction, action1_4: cc.FiniteTimeAction, action1_5: cc.FiniteTimeAction, action1_6: cc.FiniteTimeAction, action1_7: cc.FiniteTimeAction, action1_8: cc.FiniteTimeAction): cc.Sequence +---@overload fun(action1: cc.FiniteTimeAction, action1_1: cc.FiniteTimeAction, action1_2: cc.FiniteTimeAction, action1_3: cc.FiniteTimeAction, action1_4: cc.FiniteTimeAction, action1_5: cc.FiniteTimeAction, action1_6: cc.FiniteTimeAction, action1_7: cc.FiniteTimeAction, action1_8: cc.FiniteTimeAction, action1_9: cc.FiniteTimeAction): cc.Sequence +---@overload fun(action1: cc.FiniteTimeAction, action1_1: cc.FiniteTimeAction, action1_2: cc.FiniteTimeAction, action1_3: cc.FiniteTimeAction, action1_4: cc.FiniteTimeAction, action1_5: cc.FiniteTimeAction, action1_6: cc.FiniteTimeAction, action1_7: cc.FiniteTimeAction, action1_8: cc.FiniteTimeAction, action1_9: cc.FiniteTimeAction, action1_10: cc.FiniteTimeAction): cc.Sequence +---@overload fun(action1: cc.FiniteTimeAction, action1_1: cc.FiniteTimeAction, action1_2: cc.FiniteTimeAction, action1_3: cc.FiniteTimeAction, action1_4: cc.FiniteTimeAction, action1_5: cc.FiniteTimeAction, action1_6: cc.FiniteTimeAction, action1_7: cc.FiniteTimeAction, action1_8: cc.FiniteTimeAction, action1_9: cc.FiniteTimeAction, action1_10: cc.FiniteTimeAction, action1_11: cc.FiniteTimeAction): cc.Sequence +---@overload fun(action1: cc.FiniteTimeAction, action1_1: cc.FiniteTimeAction, action1_2: cc.FiniteTimeAction, action1_3: cc.FiniteTimeAction, action1_4: cc.FiniteTimeAction, action1_5: cc.FiniteTimeAction, action1_6: cc.FiniteTimeAction, action1_7: cc.FiniteTimeAction, action1_8: cc.FiniteTimeAction, action1_9: cc.FiniteTimeAction, action1_10: cc.FiniteTimeAction, action1_11: cc.FiniteTimeAction, action1_12: cc.FiniteTimeAction): cc.Sequence +---@overload fun(action1: cc.FiniteTimeAction, action1_1: cc.FiniteTimeAction, action1_2: cc.FiniteTimeAction, action1_3: cc.FiniteTimeAction, action1_4: cc.FiniteTimeAction, action1_5: cc.FiniteTimeAction, action1_6: cc.FiniteTimeAction, action1_7: cc.FiniteTimeAction, action1_8: cc.FiniteTimeAction, action1_9: cc.FiniteTimeAction, action1_10: cc.FiniteTimeAction, action1_11: cc.FiniteTimeAction, action1_12: cc.FiniteTimeAction, action1_13: cc.FiniteTimeAction): cc.Sequence +---@overload fun(action1: cc.FiniteTimeAction, action1_1: cc.FiniteTimeAction, action1_2: cc.FiniteTimeAction, action1_3: cc.FiniteTimeAction, action1_4: cc.FiniteTimeAction, action1_5: cc.FiniteTimeAction, action1_6: cc.FiniteTimeAction, action1_7: cc.FiniteTimeAction, action1_8: cc.FiniteTimeAction, action1_9: cc.FiniteTimeAction, action1_10: cc.FiniteTimeAction, action1_11: cc.FiniteTimeAction, action1_12: cc.FiniteTimeAction, action1_13: cc.FiniteTimeAction, action1_14: cc.FiniteTimeAction): cc.Sequence +---@overload fun(action1: cc.FiniteTimeAction, action1_1: cc.FiniteTimeAction, action1_2: cc.FiniteTimeAction, action1_3: cc.FiniteTimeAction, action1_4: cc.FiniteTimeAction, action1_5: cc.FiniteTimeAction, action1_6: cc.FiniteTimeAction, action1_7: cc.FiniteTimeAction, action1_8: cc.FiniteTimeAction, action1_9: cc.FiniteTimeAction, action1_10: cc.FiniteTimeAction, action1_11: cc.FiniteTimeAction, action1_12: cc.FiniteTimeAction, action1_13: cc.FiniteTimeAction, action1_14: cc.FiniteTimeAction, action1_15: cc.FiniteTimeAction): cc.Sequence +---@overload fun(action1: cc.FiniteTimeAction, action1_1: cc.FiniteTimeAction, action1_2: cc.FiniteTimeAction, action1_3: cc.FiniteTimeAction, action1_4: cc.FiniteTimeAction, action1_5: cc.FiniteTimeAction, action1_6: cc.FiniteTimeAction, action1_7: cc.FiniteTimeAction, action1_8: cc.FiniteTimeAction, action1_9: cc.FiniteTimeAction, action1_10: cc.FiniteTimeAction, action1_11: cc.FiniteTimeAction, action1_12: cc.FiniteTimeAction, action1_13: cc.FiniteTimeAction, action1_14: cc.FiniteTimeAction, action1_15: cc.FiniteTimeAction, action1_16: cc.FiniteTimeAction): cc.Sequence +--- +---Helper constructor to create an array of sequenceable actions given an array. +---\code +---When this function bound to the js or lua,the input params changed +---in js :var create(var object1,var object2, ...) +---in lua :local create(local object1,local object2, ...) +---\endcode +--- +---\param arrayOfActions An array of sequenceable actions. +---\return An autoreleased Sequence object. +---@overload fun(arrayOfActions: any): cc.Sequence +function Sequence.create(action1) end + +---Creates the action. +---@param actionOne cc.FiniteTimeAction # The first sequenceable action. +---@param actionTwo cc.FiniteTimeAction # The second sequenceable action. +---@return cc.Sequence # An autoreleased Sequence object. +---\js NA +function Sequence.createWithTwoActions(actionOne, actionTwo) end + +return Sequence \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/Shaky3D.lua b/addons/cclua/cocos2d/library/cc/Shaky3D.lua new file mode 100644 index 00000000..ea66dbf9 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/Shaky3D.lua @@ -0,0 +1,19 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.Shaky3D + +---Shaky3D action. +---\details This action is used for take effect on the target node as shaky. +---You can create the action by these parameters: +---duration, grid size, range, whether shake on the z axis. +---@class cc.Shaky3D : cc.Grid3DAction +local Shaky3D = {} + +---Create the action with a range, shake Z vertices, a grid and duration. +---@param initWithDuration number # Specify the duration of the Shaky3D action. It's a value in seconds. +---@param gridSize cc.Size # Specify the size of the grid. +---@param range integer # Specify the range of the shaky effect. +---@param shakeZ boolean # Specify whether shake on the z axis. +---@return cc.Shaky3D # If the creation success, return a pointer of Shaky3D action; otherwise, return nil. +function Shaky3D.create(initWithDuration, gridSize, range, shakeZ) end + +return Shaky3D \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/ShakyTiles3D.lua b/addons/cclua/cocos2d/library/cc/ShakyTiles3D.lua new file mode 100644 index 00000000..9449e476 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/ShakyTiles3D.lua @@ -0,0 +1,19 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.ShakyTiles3D + +---ShakyTiles3D action. +---\details This action is make the target node shake with many tiles. +---You can create the action by these parameters: +---duration, grid size, range, whether shake on the z axis. +---@class cc.ShakyTiles3D : cc.TiledGrid3DAction +local ShakyTiles3D = {} + +---Create the action with a range, shake Z vertices, a grid and duration. +---@param duration number # Specify the duration of the ShakyTiles3D action. It's a value in seconds. +---@param gridSize cc.Size # Specify the size of the grid. +---@param range integer # Specify the range of the shaky effect. +---@param shakeZ boolean # Specify whether shake on the z axis. +---@return cc.ShakyTiles3D # If the creation success, return a pointer of ShakyTiles3D action; otherwise, return nil. +function ShakyTiles3D.create(duration, gridSize, range, shakeZ) end + +return ShakyTiles3D \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/ShatteredTiles3D.lua b/addons/cclua/cocos2d/library/cc/ShatteredTiles3D.lua new file mode 100644 index 00000000..330c5d13 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/ShatteredTiles3D.lua @@ -0,0 +1,19 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.ShatteredTiles3D + +---ShatteredTiles3D action. +---\details This action make the target node shattered with many tiles. +---You can create the action by these parameters: +---duration, grid size, range, whether shatter on the z axis. +---@class cc.ShatteredTiles3D : cc.TiledGrid3DAction +local ShatteredTiles3D = {} + +---Create the action with a range, whether of not to shatter Z vertices, grid size and duration. +---@param duration number # Specify the duration of the ShatteredTiles3D action. It's a value in seconds. +---@param gridSize cc.Size # Specify the size of the grid. +---@param range integer # Specify the range of the shatter effect. +---@param shatterZ boolean # Specify whether shatter on the z axis. +---@return cc.ShatteredTiles3D # If the creation success, return a pointer of ShatteredTiles3D action; otherwise, return nil. +function ShatteredTiles3D.create(duration, gridSize, range, shatterZ) end + +return ShatteredTiles3D \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/Show.lua b/addons/cclua/cocos2d/library/cc/Show.lua new file mode 100644 index 00000000..d48c5773 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/Show.lua @@ -0,0 +1,14 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.Show + +---\class Show +---Show the node. +---@class cc.Show : cc.ActionInstant +local Show = {} + +---Allocates and initializes the action. +--- +---@return cc.Show # An autoreleased Show object. +function Show.create() end + +return Show \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/ShuffleTiles.lua b/addons/cclua/cocos2d/library/cc/ShuffleTiles.lua new file mode 100644 index 00000000..5e60ba3b --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/ShuffleTiles.lua @@ -0,0 +1,26 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.ShuffleTiles + +---ShuffleTiles action. +---\details This action make the target node shuffle with many tiles in random order. +---You can create the action by these parameters: +---duration, grid size, the random seed. +---@class cc.ShuffleTiles : cc.TiledGrid3DAction +local ShuffleTiles = {} + +---Create the action with grid size, random seed and duration. +---@param duration number # Specify the duration of the ShuffleTiles action. It's a value in seconds. +---@param gridSize cc.Size # Specify the size of the grid. +---@param seed integer # Specify the random seed. +---@return cc.ShuffleTiles # If the creation success, return a pointer of ShuffleTiles action; otherwise, return nil. +function ShuffleTiles.create(duration, gridSize, seed) end + +---@param pos cc.Size +---@return cc.Size +function ShuffleTiles:getDelta(pos) end + +---@param array olua.uint +---@param len integer +function ShuffleTiles:shuffle(array, len) end + +return ShuffleTiles \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/Size.lua b/addons/cclua/cocos2d/library/cc/Size.lua new file mode 100644 index 00000000..55810195 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/Size.lua @@ -0,0 +1,42 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.Size + +---\addtogroup base +---\{ +---@class cc.Size +---@field height number +---@field width number +---@field ZERO cc.Size +local Size = {} + +---@return any +function Size:__gc() end + +---@return any +function Size:__olua_move() end + +---Check if two size is the same. +---\js NA +---@param target cc.Size +---@return boolean +function Size:equals(target) end + +---\{ +---Constructor. +---\param width Width of the size. +---\param height Height of the size. +---\param other Copy constructor. +---\param point Conversion from a point. +---@return cc.Size +---@overload fun(width: number, height: number): cc.Size +---@overload fun(point: cc.Vec2): cc.Size +function Size.new() end + +---Set the width and height of Size. +---\js NA +---\lua NA +---@param width number +---@param height number +function Size:setSize(width, height) end + +return Size \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/Skeleton3D.lua b/addons/cclua/cocos2d/library/cc/Skeleton3D.lua new file mode 100644 index 00000000..e6cf546c --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/Skeleton3D.lua @@ -0,0 +1,49 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.Skeleton3D + +---Skeleton +---@class cc.Skeleton3D : cc.Ref +---@field boneCount integer get total bone count +---@field rootCount integer get & set root bone +local Skeleton3D = {} + +---add bone +---@param bone cc.Bone3D +function Skeleton3D:addBone(bone) end + +---get bone +---@param index integer +---@return cc.Bone3D +function Skeleton3D:getBoneByIndex(index) end + +---@param id string +---@return cc.Bone3D +function Skeleton3D:getBoneByName(id) end + +---get total bone count +---@return integer +function Skeleton3D:getBoneCount() end + +---get bone index +---@param bone cc.Bone3D +---@return integer +function Skeleton3D:getBoneIndex(bone) end + +---@param index integer +---@return cc.Bone3D +function Skeleton3D:getRootBone(index) end + +---get & set root bone +---@return integer +function Skeleton3D:getRootCount() end + +---@return cc.Skeleton3D +function Skeleton3D.new() end + +---remove all bones +function Skeleton3D:removeAllBones() end + +---refresh bone world matrix +function Skeleton3D:updateBoneMatrix() end + +return Skeleton3D \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/SkewBy.lua b/addons/cclua/cocos2d/library/cc/SkewBy.lua new file mode 100644 index 00000000..b384aa3a --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/SkewBy.lua @@ -0,0 +1,17 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.SkewBy + +---\class SkewBy +---Skews a Node object by skewX and skewY degrees. +---\since v1.0 +---@class cc.SkewBy : cc.SkewTo +local SkewBy = {} + +---Creates the action. +---@param t number # Duration time, in seconds. +---@param deltaSkewX number # Skew x delta angle. +---@param deltaSkewY number # Skew y delta angle. +---@return cc.SkewBy # An autoreleased SkewBy object. +function SkewBy.create(t, deltaSkewX, deltaSkewY) end + +return SkewBy \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/SkewTo.lua b/addons/cclua/cocos2d/library/cc/SkewTo.lua new file mode 100644 index 00000000..aa93191f --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/SkewTo.lua @@ -0,0 +1,17 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.SkewTo + +---\class SkewTo +---Skews a Node object to given angles by modifying it's skewX and skewY attributes +---\since v1.0 +---@class cc.SkewTo : cc.ActionInterval +local SkewTo = {} + +---Creates the action. +---@param t number # Duration time, in seconds. +---@param sx number # Skew x angle. +---@param sy number # Skew y angle. +---@return cc.SkewTo # An autoreleased SkewTo object. +function SkewTo.create(t, sx, sy) end + +return SkewTo \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/Spawn.lua b/addons/cclua/cocos2d/library/cc/Spawn.lua new file mode 100644 index 00000000..9d52374d --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/Spawn.lua @@ -0,0 +1,50 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.Spawn + +---\class Spawn +---Spawn a new action immediately +---@class cc.Spawn : cc.ActionInterval +local Spawn = {} + +---Helper constructor to create an array of spawned actions. +---\code +---When this function bound to the js or lua, the input params changed. +---in js :var create(var object1,var object2, ...) +---in lua :local create(local object1,local object2, ...) +---\endcode +--- +---@return cc.Spawn # An autoreleased Spawn object. +---@param action1 cc.FiniteTimeAction +---@overload fun(action1: cc.FiniteTimeAction, action1_1: cc.FiniteTimeAction): cc.Spawn +---@overload fun(action1: cc.FiniteTimeAction, action1_1: cc.FiniteTimeAction, action1_2: cc.FiniteTimeAction): cc.Spawn +---@overload fun(action1: cc.FiniteTimeAction, action1_1: cc.FiniteTimeAction, action1_2: cc.FiniteTimeAction, action1_3: cc.FiniteTimeAction): cc.Spawn +---@overload fun(action1: cc.FiniteTimeAction, action1_1: cc.FiniteTimeAction, action1_2: cc.FiniteTimeAction, action1_3: cc.FiniteTimeAction, action1_4: cc.FiniteTimeAction): cc.Spawn +---@overload fun(action1: cc.FiniteTimeAction, action1_1: cc.FiniteTimeAction, action1_2: cc.FiniteTimeAction, action1_3: cc.FiniteTimeAction, action1_4: cc.FiniteTimeAction, action1_5: cc.FiniteTimeAction): cc.Spawn +---@overload fun(action1: cc.FiniteTimeAction, action1_1: cc.FiniteTimeAction, action1_2: cc.FiniteTimeAction, action1_3: cc.FiniteTimeAction, action1_4: cc.FiniteTimeAction, action1_5: cc.FiniteTimeAction, action1_6: cc.FiniteTimeAction): cc.Spawn +---@overload fun(action1: cc.FiniteTimeAction, action1_1: cc.FiniteTimeAction, action1_2: cc.FiniteTimeAction, action1_3: cc.FiniteTimeAction, action1_4: cc.FiniteTimeAction, action1_5: cc.FiniteTimeAction, action1_6: cc.FiniteTimeAction, action1_7: cc.FiniteTimeAction): cc.Spawn +---@overload fun(action1: cc.FiniteTimeAction, action1_1: cc.FiniteTimeAction, action1_2: cc.FiniteTimeAction, action1_3: cc.FiniteTimeAction, action1_4: cc.FiniteTimeAction, action1_5: cc.FiniteTimeAction, action1_6: cc.FiniteTimeAction, action1_7: cc.FiniteTimeAction, action1_8: cc.FiniteTimeAction): cc.Spawn +---@overload fun(action1: cc.FiniteTimeAction, action1_1: cc.FiniteTimeAction, action1_2: cc.FiniteTimeAction, action1_3: cc.FiniteTimeAction, action1_4: cc.FiniteTimeAction, action1_5: cc.FiniteTimeAction, action1_6: cc.FiniteTimeAction, action1_7: cc.FiniteTimeAction, action1_8: cc.FiniteTimeAction, action1_9: cc.FiniteTimeAction): cc.Spawn +---@overload fun(action1: cc.FiniteTimeAction, action1_1: cc.FiniteTimeAction, action1_2: cc.FiniteTimeAction, action1_3: cc.FiniteTimeAction, action1_4: cc.FiniteTimeAction, action1_5: cc.FiniteTimeAction, action1_6: cc.FiniteTimeAction, action1_7: cc.FiniteTimeAction, action1_8: cc.FiniteTimeAction, action1_9: cc.FiniteTimeAction, action1_10: cc.FiniteTimeAction): cc.Spawn +---@overload fun(action1: cc.FiniteTimeAction, action1_1: cc.FiniteTimeAction, action1_2: cc.FiniteTimeAction, action1_3: cc.FiniteTimeAction, action1_4: cc.FiniteTimeAction, action1_5: cc.FiniteTimeAction, action1_6: cc.FiniteTimeAction, action1_7: cc.FiniteTimeAction, action1_8: cc.FiniteTimeAction, action1_9: cc.FiniteTimeAction, action1_10: cc.FiniteTimeAction, action1_11: cc.FiniteTimeAction): cc.Spawn +---@overload fun(action1: cc.FiniteTimeAction, action1_1: cc.FiniteTimeAction, action1_2: cc.FiniteTimeAction, action1_3: cc.FiniteTimeAction, action1_4: cc.FiniteTimeAction, action1_5: cc.FiniteTimeAction, action1_6: cc.FiniteTimeAction, action1_7: cc.FiniteTimeAction, action1_8: cc.FiniteTimeAction, action1_9: cc.FiniteTimeAction, action1_10: cc.FiniteTimeAction, action1_11: cc.FiniteTimeAction, action1_12: cc.FiniteTimeAction): cc.Spawn +---@overload fun(action1: cc.FiniteTimeAction, action1_1: cc.FiniteTimeAction, action1_2: cc.FiniteTimeAction, action1_3: cc.FiniteTimeAction, action1_4: cc.FiniteTimeAction, action1_5: cc.FiniteTimeAction, action1_6: cc.FiniteTimeAction, action1_7: cc.FiniteTimeAction, action1_8: cc.FiniteTimeAction, action1_9: cc.FiniteTimeAction, action1_10: cc.FiniteTimeAction, action1_11: cc.FiniteTimeAction, action1_12: cc.FiniteTimeAction, action1_13: cc.FiniteTimeAction): cc.Spawn +---@overload fun(action1: cc.FiniteTimeAction, action1_1: cc.FiniteTimeAction, action1_2: cc.FiniteTimeAction, action1_3: cc.FiniteTimeAction, action1_4: cc.FiniteTimeAction, action1_5: cc.FiniteTimeAction, action1_6: cc.FiniteTimeAction, action1_7: cc.FiniteTimeAction, action1_8: cc.FiniteTimeAction, action1_9: cc.FiniteTimeAction, action1_10: cc.FiniteTimeAction, action1_11: cc.FiniteTimeAction, action1_12: cc.FiniteTimeAction, action1_13: cc.FiniteTimeAction, action1_14: cc.FiniteTimeAction): cc.Spawn +---@overload fun(action1: cc.FiniteTimeAction, action1_1: cc.FiniteTimeAction, action1_2: cc.FiniteTimeAction, action1_3: cc.FiniteTimeAction, action1_4: cc.FiniteTimeAction, action1_5: cc.FiniteTimeAction, action1_6: cc.FiniteTimeAction, action1_7: cc.FiniteTimeAction, action1_8: cc.FiniteTimeAction, action1_9: cc.FiniteTimeAction, action1_10: cc.FiniteTimeAction, action1_11: cc.FiniteTimeAction, action1_12: cc.FiniteTimeAction, action1_13: cc.FiniteTimeAction, action1_14: cc.FiniteTimeAction, action1_15: cc.FiniteTimeAction): cc.Spawn +---@overload fun(action1: cc.FiniteTimeAction, action1_1: cc.FiniteTimeAction, action1_2: cc.FiniteTimeAction, action1_3: cc.FiniteTimeAction, action1_4: cc.FiniteTimeAction, action1_5: cc.FiniteTimeAction, action1_6: cc.FiniteTimeAction, action1_7: cc.FiniteTimeAction, action1_8: cc.FiniteTimeAction, action1_9: cc.FiniteTimeAction, action1_10: cc.FiniteTimeAction, action1_11: cc.FiniteTimeAction, action1_12: cc.FiniteTimeAction, action1_13: cc.FiniteTimeAction, action1_14: cc.FiniteTimeAction, action1_15: cc.FiniteTimeAction, action1_16: cc.FiniteTimeAction): cc.Spawn +--- +---Helper constructor to create an array of spawned actions given an array. +--- +---\param arrayOfActions An array of spawned actions. +---\return An autoreleased Spawn object. +---@overload fun(arrayOfActions: any): cc.Spawn +function Spawn.create(action1) end + +---Creates the Spawn action. +--- +---@param action1 cc.FiniteTimeAction # The first spawned action. +---@param action2 cc.FiniteTimeAction # The second spawned action. +---@return cc.Spawn # An autoreleased Spawn object. +---\js NA +function Spawn.createWithTwoActions(action1, action2) end + +return Spawn \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/Speed.lua b/addons/cclua/cocos2d/library/cc/Speed.lua new file mode 100644 index 00000000..b932482d --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/Speed.lua @@ -0,0 +1,41 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.Speed + +---\class Speed +---Changes the speed of an action, making it take longer (speed>1) +---or shorter (speed<1) time. +---Useful to simulate 'slow motion' or 'fast forward' effect. +---\warning This action can't be Sequenceable because it is not an IntervalAction. +---@class cc.Speed : cc.Action +---@field innerAction cc.ActionInterval Return the interior action.

\return The interior action. +---@field speed number Return the speed.

\return The action speed. +local Speed = {} + +---Create the action and set the speed. +--- +---@param action cc.ActionInterval # An action. +---@param speed number # The action speed. +---@return cc.Speed +function Speed.create(action, speed) end + +---Return the interior action. +--- +---@return cc.ActionInterval # The interior action. +function Speed:getInnerAction() end + +---Return the speed. +--- +---@return number # The action speed. +function Speed:getSpeed() end + +---Replace the interior action. +--- +---@param action cc.ActionInterval # The new action, it will replace the running action. +function Speed:setInnerAction(action) end + +---Alter the speed of the inner function in runtime. +--- +---@param speed number # Alter the speed of the inner function in runtime. +function Speed:setSpeed(speed) end + +return Speed \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/SplitCols.lua b/addons/cclua/cocos2d/library/cc/SplitCols.lua new file mode 100644 index 00000000..31250caf --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/SplitCols.lua @@ -0,0 +1,16 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.SplitCols + +---SplitCols action. +---\details Split the target node in many columns. +---Then move out some columns from top, move out the other columns from bottom. +---@class cc.SplitCols : cc.TiledGrid3DAction +local SplitCols = {} + +---Create the action with the number of columns and the duration. +---@param duration number # Specify the duration of the SplitCols action. It's a value in seconds. +---@param cols integer # Specify the columns count should be split. +---@return cc.SplitCols # If the creation success, return a pointer of SplitCols action; otherwise, return nil. +function SplitCols.create(duration, cols) end + +return SplitCols \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/SplitRows.lua b/addons/cclua/cocos2d/library/cc/SplitRows.lua new file mode 100644 index 00000000..b18aea75 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/SplitRows.lua @@ -0,0 +1,16 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.SplitRows + +---SplitRows action. +---\details Split the target node in many rows. +---Then move out some rows from left, move out the other rows from right. +---@class cc.SplitRows : cc.TiledGrid3DAction +local SplitRows = {} + +---Create the action with the number of rows and the duration. +---@param duration number # Specify the duration of the SplitRows action. It's a value in seconds. +---@param rows integer # Specify the rows count should be split. +---@return cc.SplitRows # If the creation success, return a pointer of SplitRows action; otherwise, return nil. +function SplitRows.create(duration, rows) end + +return SplitRows \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/SpotLight.lua b/addons/cclua/cocos2d/library/cc/SpotLight.lua new file mode 100644 index 00000000..5b784169 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/SpotLight.lua @@ -0,0 +1,78 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.SpotLight + +---\js NA +---@class cc.SpotLight : cc.BaseLight +---@field cosInnerAngle number get cos innerAngle +---@field cosOuterAngle number get cos outAngle +---@field direction cc.Vec3 Returns the Direction in parent. +---@field directionInWorld cc.Vec3 Returns direction in world. +---@field innerAngle number Returns the inner angle the spot light (in radians). +---@field outerAngle number Returns the outer angle of the spot light (in radians). +---@field range number Returns the range of point or spot light.

\return The range of the point or spot light. +local SpotLight = {} + +---Creates a spot light. +---@param direction cc.Vec3 # The light's direction +---@param position cc.Vec3 # The light's position +---@param color any # The light's color. +---@param innerAngle number # The light's inner angle (in radians). +---@param outerAngle number # The light's outer angle (in radians). +---@param range number # The light's range. +--- +---@return cc.SpotLight # The new spot light. +function SpotLight.create(direction, position, color, innerAngle, outerAngle, range) end + +---get cos innerAngle +---@return number +function SpotLight:getCosInnerAngle() end + +---get cos outAngle +---@return number +function SpotLight:getCosOuterAngle() end + +---Returns the Direction in parent. +---@return cc.Vec3 +function SpotLight:getDirection() end + +---Returns direction in world. +---@return cc.Vec3 +function SpotLight:getDirectionInWorld() end + +---Returns the inner angle the spot light (in radians). +---@return number +function SpotLight:getInnerAngle() end + +---Returns the outer angle of the spot light (in radians). +---@return number +function SpotLight:getOuterAngle() end + +---Returns the range of point or spot light. +--- +---@return number # The range of the point or spot light. +function SpotLight:getRange() end + +---@return cc.SpotLight +function SpotLight.new() end + +---Sets the Direction in parent. +--- +---@param dir cc.Vec3 # The Direction in parent. +function SpotLight:setDirection(dir) end + +---Sets the inner angle of a spot light (in radians). +--- +---@param angle number # The angle of spot light (in radians). +function SpotLight:setInnerAngle(angle) end + +---Sets the outer angle of a spot light (in radians). +--- +---@param outerAngle number # The angle of spot light (in radians). +function SpotLight:setOuterAngle(outerAngle) end + +---Sets the range of point or spot light. +--- +---@param range number # The range of point or spot light. +function SpotLight:setRange(range) end + +return SpotLight \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/Sprite.lua b/addons/cclua/cocos2d/library/cc/Sprite.lua new file mode 100644 index 00000000..1d9c0371 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/Sprite.lua @@ -0,0 +1,379 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.Sprite + +---\addtogroup ui +---\{ +---@class cc.Sprite : cc.Node +---@field atlasIndex integer Returns the index used on the TextureAtlas. +---@field batchNode cc.SpriteBatchNode Returns the batch node object if this sprite is rendered by SpriteBatchNode.

\return The SpriteBatchNode object if this sprite is rendered by SpriteBatchNode, nullptr if the sprite isn't used batch node. +---@field blendFunc cc.BlendFunc \js NA \lua NA +---@field centerRect cc.Rect Returns the Cap Insets rect

\return Scale9Sprite's cap inset. +---@field centerRectNormalized cc.Rect getCenterRectNormalized

Returns the CenterRect in normalized coordinates +---@field dirty boolean Whether or not the Sprite needs to be updated in the Atlas.

\return True if the sprite needs to be updated in the Atlas, false otherwise. +---@field flippedX boolean Returns the flag which indicates whether the sprite is flipped horizontally or not.

It only flips the texture of the sprite, and not the texture of the sprite's children. Also, flipping the texture doesn't alter the anchorPoint. If you want to flip the anchorPoint too, and/or to flip the children too use: sprite->setScaleX(sprite->getScaleX() * -1);

\return true if the sprite is flipped horizontally, false otherwise. +---@field flippedY boolean Return the flag which indicates whether the sprite is flipped vertically or not.

It only flips the texture of the sprite, and not the texture of the sprite's children. Also, flipping the texture doesn't alter the anchorPoint. If you want to flip the anchorPoint too, and/or to flip the children too use: sprite->setScaleY(sprite->getScaleY() * -1);

\return true if the sprite is flipped vertically, false otherwise. +---@field offsetPosition cc.Vec2 Gets the offset position of the sprite. Calculated automatically by editors like Zwoptex. +---@field resourceName string +---@field resourceType integer \} +---@field spriteFrame cc.SpriteFrame Returns the current displayed frame. +---@field stretchEnabled boolean returns whether or not contentSize stretches the sprite's texture +---@field texture cc.Texture2D Returns the Texture2D object used by the sprite. +---@field textureAtlas cc.TextureAtlas Gets the weak reference of the TextureAtlas when the sprite is rendered using via SpriteBatchNode. +---@field textureRect cc.Rect Returns the rect of the Sprite in points. +---@field textureRectRotated boolean Returns whether or not the texture rectangle is rotated. +---@field INDEX_NOT_INITIALIZED integer +local Sprite = {} + +---@param cls string +---@return any +function Sprite:as(cls) end + +---Creates an empty sprite without texture. You can call setTexture method subsequently. +--- +---\memberof Sprite +---@return cc.Sprite # An autoreleased sprite object. +--- +---Creates a sprite with an image filename. +--- +---After creation, the rect of sprite will be the size of the image, +---and the offset will be (0,0). +--- +---\param filename A path to image file, e.g., "scene1/monster.png". +---\return An autoreleased sprite object. +---@overload fun(filename: string): cc.Sprite +--- +---Creates a sprite with an image filename and a rect. +--- +---\param filename A path to image file, e.g., "scene1/monster.png". +---\param rect A subrect of the image file. +---\return An autoreleased sprite object. +---@overload fun(filename: string, rect: cc.Rect): cc.Sprite +function Sprite.create() end + +---Creates a sprite with an sprite frame. +--- +---@param spriteFrame cc.SpriteFrame # A sprite frame which involves a texture and a rect. +---@return cc.Sprite # An autoreleased sprite object. +function Sprite.createWithSpriteFrame(spriteFrame) end + +---Creates a sprite with an sprite frame name. +--- +---A SpriteFrame will be fetched from the SpriteFrameCache by spriteFrameName param. +---If the SpriteFrame doesn't exist it will raise an exception. +--- +---@param spriteFrameName string # The name of sprite frame. +---@return cc.Sprite # An autoreleased sprite object. +function Sprite.createWithSpriteFrameName(spriteFrameName) end + +---Creates a sprite with a Texture2D object. +--- +---After creation, the rect will be the size of the texture, and the offset will be (0,0). +--- +---@param texture cc.Texture2D # A pointer to a Texture2D object. +---@return cc.Sprite # An autoreleased sprite object. +--- +---Creates a sprite with a texture and a rect. +--- +---After creation, the offset will be (0,0). +--- +---\param texture A pointer to an existing Texture2D object. +---You can use a Texture2D object for many sprites. +---\param rect Only the contents inside the rect of this texture will be applied for this sprite. +---\param rotated Whether or not the rect is rotated. +---\return An autoreleased sprite object. +---@overload fun(texture: cc.Texture2D, rect: cc.Rect, rotated: boolean): cc.Sprite +--- +---Creates a sprite with a texture and a rect. +--- +---After creation, the offset will be (0,0). +--- +---\param texture A pointer to an existing Texture2D object. +---You can use a Texture2D object for many sprites. +---\param rect Only the contents inside the rect of this texture will be applied for this sprite. +---\param rotated Whether or not the rect is rotated. +---\return An autoreleased sprite object. +---@overload fun(texture: cc.Texture2D, rect: cc.Rect): cc.Sprite +function Sprite.createWithTexture(texture) end + +---Returns the index used on the TextureAtlas. +---@return integer +function Sprite:getAtlasIndex() end + +---Returns the batch node object if this sprite is rendered by SpriteBatchNode. +--- +---@return cc.SpriteBatchNode # The SpriteBatchNode object if this sprite is rendered by SpriteBatchNode, +---nullptr if the sprite isn't used batch node. +function Sprite:getBatchNode() end + +---\js NA +---\lua NA +---@return cc.BlendFunc +function Sprite:getBlendFunc() end + +---Returns the Cap Insets rect +--- +---@return cc.Rect # Scale9Sprite's cap inset. +function Sprite:getCenterRect() end + +---getCenterRectNormalized +--- +---Returns the CenterRect in normalized coordinates +---@return cc.Rect +function Sprite:getCenterRectNormalized() end + +---Gets the offset position of the sprite. Calculated automatically by editors like Zwoptex. +---@return cc.Vec2 +function Sprite:getOffsetPosition() end + +---@return string +function Sprite:getResourceName() end + +---\} +---@return integer +function Sprite:getResourceType() end + +---Returns the current displayed frame. +---@return cc.SpriteFrame +function Sprite:getSpriteFrame() end + +---Returns the Texture2D object used by the sprite. +---@return cc.Texture2D +function Sprite:getTexture() end + +---Gets the weak reference of the TextureAtlas when the sprite is rendered using via SpriteBatchNode. +---@return cc.TextureAtlas +function Sprite:getTextureAtlas() end + +---Returns the rect of the Sprite in points. +---@return cc.Rect +function Sprite:getTextureRect() end + +---Initializes a sprite with an image filename. +--- +---This method will find filename from local file system, load its content to Texture2D, +---then use Texture2D to create a sprite. +---After initialization, the rect used will be the size of the image. The offset will be (0,0). +--- +---@param filename string # The path to an image file in local file system. +---@return boolean # True if the sprite is initialized properly, false otherwise. +---\lua init +--- +---Initializes a sprite with an image filename, and a rect. +--- +---This method will find filename from local file system, load its content to Texture2D, +---then use Texture2D to create a sprite. +---After initialization, the offset will be (0,0). +--- +---\param filename The path to an image file in local file system. +---\param rect The rectangle assigned the content area from texture. +---\return True if the sprite is initialized properly, false otherwise. +---\lua init +---@overload fun(self: cc.Sprite, filename: string, rect: cc.Rect): boolean +function Sprite:initWithFile(filename) end + +---Initializes a sprite with an SpriteFrame. The texture and rect in SpriteFrame will be applied on this sprite. +--- +---@param spriteFrame cc.SpriteFrame # A SpriteFrame object. It should includes a valid texture and a rect. +---@return boolean # True if the sprite is initialized properly, false otherwise. +function Sprite:initWithSpriteFrame(spriteFrame) end + +---Initializes a sprite with an sprite frame name. +--- +---A SpriteFrame will be fetched from the SpriteFrameCache by name. +---If the SpriteFrame doesn't exist it will raise an exception. +--- +---@param spriteFrameName string # A key string that can fetched a valid SpriteFrame from SpriteFrameCache. +---@return boolean # True if the sprite is initialized properly, false otherwise. +function Sprite:initWithSpriteFrameName(spriteFrameName) end + +---Initializes a sprite with a texture. +--- +---After initialization, the rect used will be the size of the texture, and the offset will be (0,0). +--- +---@param texture cc.Texture2D # A pointer to an existing Texture2D object. +---You can use a Texture2D object for many sprites. +---@return boolean # True if the sprite is initialized properly, false otherwise. +--- +---Initializes a sprite with a texture and a rect. +--- +---After initialization, the offset will be (0,0). +--- +---\param texture A pointer to an existing Texture2D object. +---You can use a Texture2D object for many sprites. +---\param rect Only the contents inside rect of this texture will be applied for this sprite. +---\return True if the sprite is initialized properly, false otherwise. +---@overload fun(self: cc.Sprite, texture: cc.Texture2D, rect: cc.Rect): boolean +--- +---Initializes a sprite with a texture and a rect in points, optionally rotated. +--- +---After initialization, the offset will be (0,0). +---\note This is the designated initializer. +--- +---\param texture A Texture2D object whose texture will be applied to this sprite. +---\param rect A rectangle assigned the contents of texture. +---\param rotated Whether or not the texture rectangle is rotated. +---\return True if the sprite is initialized properly, false otherwise. +---@overload fun(self: cc.Sprite, texture: cc.Texture2D, rect: cc.Rect, rotated: boolean): boolean +function Sprite:initWithTexture(texture) end + +---Whether or not the Sprite needs to be updated in the Atlas. +--- +---@return boolean # True if the sprite needs to be updated in the Atlas, false otherwise. +function Sprite:isDirty() end + +---Returns the flag which indicates whether the sprite is flipped horizontally or not. +--- +---It only flips the texture of the sprite, and not the texture of the sprite's children. +---Also, flipping the texture doesn't alter the anchorPoint. +---If you want to flip the anchorPoint too, and/or to flip the children too use: +---sprite->setScaleX(sprite->getScaleX() * -1); +--- +---@return boolean # true if the sprite is flipped horizontally, false otherwise. +function Sprite:isFlippedX() end + +---Return the flag which indicates whether the sprite is flipped vertically or not. +--- +---It only flips the texture of the sprite, and not the texture of the sprite's children. +---Also, flipping the texture doesn't alter the anchorPoint. +---If you want to flip the anchorPoint too, and/or to flip the children too use: +---sprite->setScaleY(sprite->getScaleY() * -1); +--- +---@return boolean # true if the sprite is flipped vertically, false otherwise. +function Sprite:isFlippedY() end + +---Returns whether or not a SpriteFrame is being displayed. +---@param frame cc.SpriteFrame +---@return boolean +function Sprite:isFrameDisplayed(frame) end + +---returns whether or not contentSize stretches the sprite's texture +---@return boolean +function Sprite:isStretchEnabled() end + +---Returns whether or not the texture rectangle is rotated. +---@return boolean +function Sprite:isTextureRectRotated() end + +---\js ctor +---@return cc.Sprite +function Sprite.new() end + +---Sets the index used on the TextureAtlas. +--- +---\warning Don't modify this value unless you know what you are doing. +---@param atlasIndex integer +function Sprite:setAtlasIndex(atlasIndex) end + +---Sets the batch node to sprite. +---\warning This method is not recommended for game developers. Sample code for using batch node +---\code +---SpriteBatchNode *batch = SpriteBatchNode::create("Images/grossini_dance_atlas.png", 15); +---Sprite *sprite = Sprite::createWithTexture(batch->getTexture(), Rect(0, 0, 57, 57)); +---batch->addChild(sprite); +---layer->addChild(batch); +---\endcode +---@param spriteBatchNode cc.SpriteBatchNode +function Sprite:setBatchNode(spriteBatchNode) end + +---\{ +---\name Functions inherited from TextureProtocol. +--- +---\code +---When this function bound into js or lua,the parameter will be changed. +---In js: var setBlendFunc(var src, var dst). +---In lua: local setBlendFunc(local src, local dst). +---\endcode +---@param blendFunc cc.BlendFunc +function Sprite:setBlendFunc(blendFunc) end + +---@param rect cc.Rect +function Sprite:setCenterRect(rect) end + +---setCenterRectNormalized +--- +---Useful to implement "9 sliced" sprites. +---The default value is (0,0) - (1,1), which means that only one "slice" will be used: From top-left (0,0) to bottom-right (1,1). +---If the value is different than (0,0), (1,1), then the sprite will be sliced into a 3 x 3 grid. The four corners of this grid are applied without +---performing any scaling. The upper- and lower-middle parts are scaled horizontally, and the left- and right-middle parts are scaled vertically. +---The center is scaled in both directions. +---Important: The scaling is based the Sprite's trimmed size. +--- +---Limitations: Does not work when the sprite is part of `SpriteBatchNode`. +---@param rect cc.Rect +function Sprite:setCenterRectNormalized(rect) end + +---Makes the Sprite to be updated in the Atlas. +---@param dirty boolean +function Sprite:setDirty(dirty) end + +---\{ +---\name Animation methods +--- +---Changes the display frame with animation name and index. +---The animation name will be get from the AnimationCache. +---@param animationName string +---@param frameIndex integer +function Sprite:setDisplayFrameWithAnimationName(animationName, frameIndex) end + +---Sets whether the sprite should be flipped horizontally or not. +--- +---@param flippedX boolean # true if the sprite should be flipped horizontally, false otherwise. +function Sprite:setFlippedX(flippedX) end + +---Sets whether the sprite should be flipped vertically or not. +--- +---@param flippedY boolean # true if the sprite should be flipped vertically, false otherwise. +function Sprite:setFlippedY(flippedY) end + +---\{ +---Sets a new SpriteFrame to the Sprite. +---@param spriteFrameName string +---@overload fun(self: cc.Sprite, newFrame: cc.SpriteFrame) +function Sprite:setSpriteFrame(spriteFrameName) end + +---whether or not contentSize stretches the sprite's texture +---@param enabled boolean +function Sprite:setStretchEnabled(enabled) end + +---Sets a new texture (from a filename) to the sprite. +--- +---\memberof Sprite +---It will call `setTextureRect()` with the texture's content size. +---@param filename string +--- +---\overload +--- +---The Texture's rect is not changed. +---@overload fun(self: cc.Sprite, texture: cc.Texture2D) +function Sprite:setTexture(filename) end + +---Sets the weak reference of the TextureAtlas when the sprite is rendered using via SpriteBatchNode. +---@param textureAtlas cc.TextureAtlas +function Sprite:setTextureAtlas(textureAtlas) end + +---Updates the texture rect of the Sprite in points. +--- +---It will call setTextureRect(const Rect& rect, bool rotated, const Size& untrimmedSize) with \p rotated = false, and \p utrimmedSize = rect.size. +---@param rect cc.Rect +--- +---\overload +--- +---It will update the texture coordinates and the vertex rectangle. +---@overload fun(self: cc.Sprite, rect: cc.Rect, rotated: boolean, untrimmedSize: cc.Size) +function Sprite:setTextureRect(rect) end + +function Sprite:setVertexLayout() end + +---Sets the vertex rect. +--- +---It will be called internally by setTextureRect. +---Useful if you want to create 2x images from SD images in Retina Display. +---Do not call it manually. Use setTextureRect instead. +---@param rect cc.Rect +function Sprite:setVertexRect(rect) end + +---@param vert string +---@param frag string +function Sprite:updateShaders(vert, frag) end + +return Sprite \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/Sprite3D.lua b/addons/cclua/cocos2d/library/cc/Sprite3D.lua new file mode 100644 index 00000000..98b121e3 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/Sprite3D.lua @@ -0,0 +1,160 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.Sprite3D + +---Sprite3D: A sprite can be loaded from 3D model files, .obj, .c3t, .c3b, then can be drawn as sprite +---@class cc.Sprite3D : cc.Node +---@field blendFunc cc.BlendFunc +---@field forceDepthWrite boolean +---@field lightMask integer +---@field mesh cc.Mesh get mesh +---@field meshCount integer get mesh count +---@field meshes any Get meshes used in sprite 3d +---@field skeleton cc.Skeleton3D +local Sprite3D = {} + +---@param mesh cc.Mesh +function Sprite3D:addMesh(mesh) end + +---@param param any +function Sprite3D:afterAsyncLoad(param) end + +---@param cls string +---@return any +function Sprite3D:as(cls) end + +---Creates an empty sprite3D without 3D model and texture. +--- +---@return cc.Sprite3D # An autoreleased sprite3D object. +--- +---creates a Sprite3D +---@overload fun(modelPath: string): cc.Sprite3D +---@overload fun(modelPath: string, texturePath: string): cc.Sprite3D +function Sprite3D.create() end + +---create 3d sprite asynchronously +---If the 3d model was previously loaded, it will create a new 3d sprite and the callback will be called at once. +---Otherwise it will load the model file in a new thread, and when the 3d sprite is loaded, the callback will be called with the created Sprite3D and a user-defined parameter. +---The callback will be called from the main thread, so it is safe to create any cocos2d object from the callback. +---@param modelPath string # model to be loaded +---@param callback fun(arg1: cc.Sprite3D, arg2: any) # callback after loading +---@param callbackparam any # user defined parameter for the callback +---@overload fun(modelPath: string, texturePath: string, callback: fun(arg1: cc.Sprite3D, arg2: any), callbackparam: any) +function Sprite3D.createAsync(modelPath, callback, callbackparam) end + +---generate default material +---@param useLight boolean +---@overload fun(self: cc.Sprite3D) +function Sprite3D:genMaterial(useLight) end + +---get AttachNode by bone name, return nullptr if not exist +---@param boneName string +---@return cc.AttachNode +function Sprite3D:getAttachNode(boneName) end + +---@return cc.BlendFunc +function Sprite3D:getBlendFunc() end + +---@return integer +function Sprite3D:getLightMask() end + +---Adds a new material to a particular mesh of the sprite. +---meshIndex is the mesh that will be applied to. +---if meshIndex == -1, then it will be applied to all the meshes that belong to the sprite. +---@param meshIndex integer +---@return cc.Material +function Sprite3D:getMaterial(meshIndex) end + +---get mesh +---@return cc.Mesh +function Sprite3D:getMesh() end + +---get mesh array by name, returns all meshes with the given name +--- +---\lua NA +---@param name string +---@return cc.Mesh[] +function Sprite3D:getMeshArrayByName(name) end + +---get Mesh by index +---@param index integer +---@return cc.Mesh +function Sprite3D:getMeshByIndex(index) end + +---get Mesh by Name, it returns the first one if there are more than one mesh with the same name +---@param name string +---@return cc.Mesh +function Sprite3D:getMeshByName(name) end + +---get mesh count +---@return integer +function Sprite3D:getMeshCount() end + +---Get meshes used in sprite 3d +---@return any +function Sprite3D:getMeshes() end + +---@return cc.Skeleton3D +function Sprite3D:getSkeleton() end + +---@param path string +---@return boolean +function Sprite3D:initWithFile(path) end + +---@return boolean +function Sprite3D:isForceDepthWrite() end + +---load sprite3d from cache, return true if succeed, false otherwise +---@param path string +---@return boolean +function Sprite3D:loadFromCache(path) end + +---@return cc.Sprite3D +function Sprite3D.new() end + +function Sprite3D:onAABBDirty() end + +---remove all attach nodes +function Sprite3D:removeAllAttachNode() end + +---remove attach node +---@param boneName string +function Sprite3D:removeAttachNode(boneName) end + +---@param blendFunc cc.BlendFunc +function Sprite3D:setBlendFunc(blendFunc) end + +---@param side any +function Sprite3D:setCullFace(side) end + +---@param enable boolean +function Sprite3D:setCullFaceEnabled(enable) end + +---force set this Sprite3D to 2D render queue +---@param force2D boolean +function Sprite3D:setForce2DQueue(force2D) end + +---Force to write to depth buffer, this is useful if you want to achieve effects like fading. +---@param value boolean +function Sprite3D:setForceDepthWrite(value) end + +---light mask getter & setter, light works only when _lightmask & light's flag is true, default value of _lightmask is 0xffff +---@param mask integer +function Sprite3D:setLightMask(mask) end + +---Adds a new material to the sprite. +---The Material will be applied to all the meshes that belong to the sprite. +---Internally it will call `setMaterial(material,-1)` +---@param material cc.Material +--- +---Adds a new material to a particular mesh of the sprite. +---meshIndex is the mesh that will be applied to. +---if meshIndex == -1, then it will be applied to all the meshes that belong to the sprite. +---@overload fun(self: cc.Sprite3D, material: cc.Material, meshIndex: integer) +function Sprite3D:setMaterial(material) end + +---set diffuse texture, set the first if multiple textures exist +---@param texFile string +---@overload fun(self: cc.Sprite3D, texture: cc.Texture2D) +function Sprite3D:setTexture(texFile) end + +return Sprite3D \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/Sprite3DMaterial.lua b/addons/cclua/cocos2d/library/cc/Sprite3DMaterial.lua new file mode 100644 index 00000000..c879910b --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/Sprite3DMaterial.lua @@ -0,0 +1,41 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.Sprite3DMaterial + +---Sprite3DMaterial: Material for Sprite3D. +---@class cc.Sprite3DMaterial : cc.Material +---@field materialType cc.Sprite3DMaterial.MaterialType Get material type \return Material type +local Sprite3DMaterial = {} + +---Create built in material from material type +---@param type cc.Sprite3DMaterial.MaterialType # Material type +---@param skinned boolean # Has skin? +---@return cc.Sprite3DMaterial # Created material +--- +---Create all build in materials +---@overload fun() +function Sprite3DMaterial.createBuiltInMaterial(type, skinned) end + +---Create material with file name, it creates material from cache if it is previously loaded +---@param path string # Path of material file +---@return cc.Sprite3DMaterial # Created material +function Sprite3DMaterial.createWithFilename(path) end + +---@param programState ccb.ProgramState +---@return cc.Sprite3DMaterial +function Sprite3DMaterial.createWithProgramState(programState) end + +---Get material type +---@return cc.Sprite3DMaterial.MaterialType # Material type +function Sprite3DMaterial:getMaterialType() end + +---Release all built in materials +function Sprite3DMaterial.releaseBuiltInMaterial() end + +---Release all cached materials +function Sprite3DMaterial.releaseCachedMaterial() end + +---@param tex cc.Texture2D +---@param usage cc.NTextureData.Usage +function Sprite3DMaterial:setTexture(tex, usage) end + +return Sprite3DMaterial \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/Sprite3DMaterial/MaterialType.lua b/addons/cclua/cocos2d/library/cc/Sprite3DMaterial/MaterialType.lua new file mode 100644 index 00000000..12bdf0ec --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/Sprite3DMaterial/MaterialType.lua @@ -0,0 +1,19 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.Sprite3DMaterial.MaterialType + +---@type cc.Sprite3DMaterial.MaterialType +local VALUE + +--- +---@enum cc.Sprite3DMaterial.MaterialType +local MaterialType = { + BUMPED_DIFFUSE = 5, + CUSTOM = 6, + DIFFUSE = 3, + DIFFUSE_NOTEX = 4, + UNLIT = 0, + UNLIT_NOTEX = 1, + VERTEX_LIT = 2, +} + +return MaterialType \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/SpriteBatchNode.lua b/addons/cclua/cocos2d/library/cc/SpriteBatchNode.lua new file mode 100644 index 00000000..bfecfa86 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/SpriteBatchNode.lua @@ -0,0 +1,173 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.SpriteBatchNode + +---SpriteBatchNode is like a batch node: if it contains children, it will draw them in 1 single OpenGL call +---(often known as "batch draw"). +--- +---A SpriteBatchNode can reference one and only one texture (one image file, one texture atlas). +---Only the Sprites that are contained in that texture can be added to the SpriteBatchNode. +---All Sprites added to a SpriteBatchNode are drawn in one OpenGL ES draw call. +---If the Sprites are not added to a SpriteBatchNode then an OpenGL ES draw call will be needed for each one, which is less efficient. +--- +--- +---Limitations: +---- The only object that is accepted as child (or grandchild, grand-grandchild, etc...) is Sprite or any subclass of Sprite. eg: particles, labels and layer can't be added to a SpriteBatchNode. +---- Either all its children are Aliased or Antialiased. It can't be a mix. This is because "alias" is a property of the texture, and all the sprites share the same texture. +--- +---\since v0.7.1 +---@class cc.SpriteBatchNode : cc.Node +---@field blendFunc cc.BlendFunc \lua NA +---@field descendants cc.Sprite[] Returns an array with the descendants (children, gran children, etc.). This is specific to BatchNode. In order to use the children, use getChildren() instead.

\return An array with the descendants (children, gran children, etc.). +---@field texture cc.Texture2D +---@field textureAtlas cc.TextureAtlas Returns the TextureAtlas object.

\return The TextureAtlas object. +local SpriteBatchNode = {} + +---@param child cc.Sprite +---@param z integer +---@param aTag integer +---@return cc.SpriteBatchNode +function SpriteBatchNode:addSpriteWithoutQuad(child, z, aTag) end + +---Append the child. +--- +---@param sprite cc.Sprite # A Sprite. +function SpriteBatchNode:appendChild(sprite) end + +---@param cls string +---@return any +function SpriteBatchNode:as(cls) end + +---Get the nearest index from the sprite in z. +--- +---@param sprite cc.Sprite # The parent sprite. +---@param z integer # Z order for drawing priority. +---@return integer # Index. +function SpriteBatchNode:atlasIndexForChild(sprite, z) end + +---Creates a SpriteBatchNode with a file image (.png, .jpeg, .pvr, etc) and capacity of children. +---The capacity will be increased in 33% in runtime if it runs out of space. +---The file will be loaded using the TextureMgr. +--- +---@param fileImage string # A file image (.png, .jpeg, .pvr, etc). +---@param capacity integer # The capacity of children. +---@return cc.SpriteBatchNode # Return an autorelease object. +---@overload fun(fileImage: string): cc.SpriteBatchNode +function SpriteBatchNode.create(fileImage, capacity) end + +---Creates a SpriteBatchNode with a texture2d and capacity of children. +---The capacity will be increased in 33% in runtime if it runs out of space. +--- +---@param tex cc.Texture2D # A texture2d. +---@param capacity integer # The capacity of children. +---@return cc.SpriteBatchNode # Return an autorelease object. +---@overload fun(tex: cc.Texture2D): cc.SpriteBatchNode +function SpriteBatchNode.createWithTexture(tex, capacity) end + +---\lua NA +---@return cc.BlendFunc +function SpriteBatchNode:getBlendFunc() end + +---Returns an array with the descendants (children, gran children, etc.). +---This is specific to BatchNode. In order to use the children, use getChildren() instead. +--- +---@return cc.Sprite[] # An array with the descendants (children, gran children, etc.). +function SpriteBatchNode:getDescendants() end + +---@return cc.Texture2D +function SpriteBatchNode:getTexture() end + +---Returns the TextureAtlas object. +--- +---@return cc.TextureAtlas # The TextureAtlas object. +function SpriteBatchNode:getTextureAtlas() end + +---Get the Max image block index,in all child. +--- +---@param sprite cc.Sprite # The parent sprite. +---@return integer # Index. +function SpriteBatchNode:highestAtlasIndexInChild(sprite) end + +---Increase the Atlas Capacity. +function SpriteBatchNode:increaseAtlasCapacity() end + +---initializes a SpriteBatchNode with a file image (.png, .jpeg, .pvr, etc) and a capacity of children. +---The capacity will be increased in 33% in runtime if it runs out of space. +---The file will be loaded using the TextureMgr. +---\js init +---\lua init +---@param fileImage string +---@param capacity integer +---@return boolean +---@overload fun(self: cc.SpriteBatchNode, fileImage: string): boolean +function SpriteBatchNode:initWithFile(fileImage, capacity) end + +---initializes a SpriteBatchNode with a texture2d and capacity of children. +---The capacity will be increased in 33% in runtime if it runs out of space. +---@param tex cc.Texture2D +---@param capacity integer +---@return boolean +---@overload fun(self: cc.SpriteBatchNode, tex: cc.Texture2D): boolean +function SpriteBatchNode:initWithTexture(tex, capacity) end + +---Inserts a quad at a certain index into the texture atlas. The Sprite won't be added into the children array. +---This method should be called only when you are dealing with very big AtlasSprite and when most of the Sprite won't be updated. +---For example: a tile map (TMXMap) or a label with lots of characters (LabelBMFont). +---@param sprite cc.Sprite +---@param index integer +function SpriteBatchNode:insertQuadFromSprite(sprite, index) end + +---Get the Min image block index,in all child. +--- +---@param sprite cc.Sprite # The parent sprite. +---@return integer # Index. +function SpriteBatchNode:lowestAtlasIndexInChild(sprite) end + +---\js ctor +---@return cc.SpriteBatchNode +function SpriteBatchNode.new() end + +---Rebuild index with a sprite all child. +--- +---@param parent cc.Sprite # The parent sprite. +---@param index integer # The child index. +---@return integer # Index. +function SpriteBatchNode:rebuildIndexInOrder(parent, index) end + +---Removes a child given a certain index. It will also cleanup the running actions depending on the cleanup parameter. +--- +---@param index integer # A certain index. +---@param doCleanup boolean # Whether or not to cleanup the running actions. +---\warning Removing a child from a SpriteBatchNode is very slow. +function SpriteBatchNode:removeChildAtIndex(index, doCleanup) end + +---Remove a sprite from Atlas. +--- +---@param sprite cc.Sprite # A Sprite. +function SpriteBatchNode:removeSpriteFromAtlas(sprite) end + +---@param reorder boolean +function SpriteBatchNode:reorderBatch(reorder) end + +---reserves capacity for the batch node. +---If the current capacity is bigger, nothing happens. +---otherwise, a new capacity is allocated +---@param newCapacity integer +function SpriteBatchNode:reserveCapacity(newCapacity) end + +---\code +---When this function bound into js or lua,the parameter will be changed. +---In js: var setBlendFunc(var src, var dst). +---\endcode +---\lua NA +---@param blendFunc cc.BlendFunc +function SpriteBatchNode:setBlendFunc(blendFunc) end + +---@param texture cc.Texture2D +function SpriteBatchNode:setTexture(texture) end + +---Sets the TextureAtlas object. +--- +---@param textureAtlas cc.TextureAtlas # The TextureAtlas object. +function SpriteBatchNode:setTextureAtlas(textureAtlas) end + +return SpriteBatchNode \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/SpriteFrame.lua b/addons/cclua/cocos2d/library/cc/SpriteFrame.lua new file mode 100644 index 00000000..85c2ddb5 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/SpriteFrame.lua @@ -0,0 +1,221 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.SpriteFrame + +---\class SpriteFrame +---A SpriteFrame has: +---- texture: A Texture2D that will be used by the Sprite +---- rectangle: A rectangle of the texture +---You can modify the frame of a Sprite by doing: +--- +---\code +---SpriteFrame* frame = SpriteFrame::createWithTexture(texture, rect); +---sprite->setSpriteFrame(frame); +---\endcode +---@class cc.SpriteFrame : cc.Ref +---@field anchorPoint cc.Vec2 Get anchor point of the frame.

\return The anchor point of the sprite frame. +---@field centerRect cc.Rect Get center rect of the frame.

Useful to create 9-slice sprites

\return The center rect of the sprite frame in points +---@field offset cc.Vec2 Get offset of the frame.

\return The offset of the sprite frame. +---@field offsetInPixels cc.Vec2 Get offset of the frame.

\return The offset of the sprite frame, in pixels. +---@field originalSize cc.Size Get original size of the trimmed image.

\return The original size of the trimmed image. +---@field originalSizeInPixels cc.Size Get original size of the trimmed image.

\return The original size of the trimmed image, in pixels. +---@field rect cc.Rect Get rect of the frame.

\return The rect of the sprite frame. +---@field rectInPixels cc.Rect Get rect of the sprite frame.

\return The rect of the sprite frame, in pixels. +---@field rotated boolean Is the sprite frame rotated or not.

\return Is rotated if true. +---@field texture cc.Texture2D Get texture of the frame.

\return The texture of the sprite frame. +local SpriteFrame = {} + +---@param cls string +---@return any +function SpriteFrame:as(cls) end + +---@return cc.SpriteFrame +function SpriteFrame:clone() end + +---Create a SpriteFrame with a texture filename, rect in points. +---It is assumed that the frame was not trimmed. +--- +---@param filename string # Texture file name. +---@param rect cc.Rect # A specified rect. +---@return cc.SpriteFrame # An autoreleased SpriteFrame object. +--- +---Create a SpriteFrame with a texture filename, rect, rotated, offset and originalSize in pixels. +---The originalSize is the size in pixels of the frame before being trimmed. +--- +---\param filename Texture filename +---\param rect A specified rect. +---\param rotated Is rotated if true. +---\param offset A specified offset. +---\param originalSize A specified original size. +---\return An autoreleased SpriteFrame object. +---@overload fun(filename: string, rect: cc.Rect, rotated: boolean, offset: cc.Vec2, originalSize: cc.Size): cc.SpriteFrame +function SpriteFrame.create(filename, rect) end + +---Create a SpriteFrame with a texture, rect in points. +---It is assumed that the frame was not trimmed. +---@param pobTexture cc.Texture2D # The texture pointer. +---@param rect cc.Rect # A specified rect. +---@return cc.SpriteFrame # An autoreleased SpriteFrame object. +--- +---Create a SpriteFrame with a texture, rect, rotated, offset and originalSize in pixels. +---The originalSize is the size in points of the frame before being trimmed. +---\param pobTexture The texture pointer. +---\param rect A specified rect. +---\param rotated Is rotated if true. +---\param offset A specified offset. +---\param originalSize A specified original size. +---\return An autoreleased SpriteFrame object. +---@overload fun(pobTexture: cc.Texture2D, rect: cc.Rect, rotated: boolean, offset: cc.Vec2, originalSize: cc.Size): cc.SpriteFrame +function SpriteFrame.createWithTexture(pobTexture, rect) end + +---Get anchor point of the frame. +--- +---@return cc.Vec2 # The anchor point of the sprite frame. +function SpriteFrame:getAnchorPoint() end + +---Get center rect of the frame. +--- +---Useful to create 9-slice sprites +--- +---@return cc.Rect # The center rect of the sprite frame in points +function SpriteFrame:getCenterRect() end + +---Get offset of the frame. +--- +---@return cc.Vec2 # The offset of the sprite frame. +function SpriteFrame:getOffset() end + +---Get offset of the frame. +--- +---@return cc.Vec2 # The offset of the sprite frame, in pixels. +function SpriteFrame:getOffsetInPixels() end + +---Get original size of the trimmed image. +--- +---@return cc.Size # The original size of the trimmed image. +function SpriteFrame:getOriginalSize() end + +---Get original size of the trimmed image. +--- +---@return cc.Size # The original size of the trimmed image, in pixels. +function SpriteFrame:getOriginalSizeInPixels() end + +---Get rect of the frame. +--- +---@return cc.Rect # The rect of the sprite frame. +function SpriteFrame:getRect() end + +---Get rect of the sprite frame. +--- +---@return cc.Rect # The rect of the sprite frame, in pixels. +function SpriteFrame:getRectInPixels() end + +---Get texture of the frame. +--- +---@return cc.Texture2D # The texture of the sprite frame. +function SpriteFrame:getTexture() end + +---Check if anchor point is defined for the frame. +--- +---@return boolean # true if anchor point is available. +function SpriteFrame:hasAnchorPoint() end + +---hasCenterRect +---@return boolean # Whether or not it has a centerRect +function SpriteFrame:hasCenterRect() end + +---Check if sprite frame is a polygon sprite +--- +---@return boolean # true if polygonInfo is available +function SpriteFrame:hasPolygonInfo() end + +---Initializes a SpriteFrame with a texture, rect in points. +---It is assumed that the frame was not trimmed. +---@param pobTexture cc.Texture2D +---@param rect cc.Rect +---@return boolean +--- +---Initializes a SpriteFrame with a texture, rect, rotated, offset and originalSize in pixels. +---The originalSize is the size in points of the frame before being trimmed. +---@overload fun(self: cc.SpriteFrame, pobTexture: cc.Texture2D, rect: cc.Rect, rotated: boolean, offset: cc.Vec2, originalSize: cc.Size): boolean +function SpriteFrame:initWithTexture(pobTexture, rect) end + +---Initializes a SpriteFrame with a texture filename, rect in points; +---It is assumed that the frame was not trimmed. +---@param filename string +---@param rect cc.Rect +---@return boolean +--- +---Initializes a SpriteFrame with a texture, rect, rotated, offset and originalSize in pixels. +---The originalSize is the size in pixels of the frame before being trimmed. +--- +---\since v1.1 +---@overload fun(self: cc.SpriteFrame, filename: string, rect: cc.Rect, rotated: boolean, offset: cc.Vec2, originalSize: cc.Size): boolean +function SpriteFrame:initWithTextureFilename(filename, rect) end + +---Is the sprite frame rotated or not. +--- +---@return boolean # Is rotated if true. +function SpriteFrame:isRotated() end + +---\lua NA +---@return cc.SpriteFrame +function SpriteFrame.new() end + +---Set anchor point of the frame. +--- +---@param anchorPoint cc.Vec2 # The anchor point of the sprite frame. +function SpriteFrame:setAnchorPoint(anchorPoint) end + +---setCenterRect +--- +---Useful to implement "9 sliced" sprites. +---The sprite will be sliced into a 3 x 3 grid. The four corners of this grid are applied without +---performing any scaling. The upper- and lower-middle parts are scaled horizontally, and the left- and right-middle parts are scaled vertically. +---The center is scaled in both directions. +---Important: The scaling is based the Sprite's trimmed size. +--- +---Limitations: Does not work when the sprite is part of `SpriteBatchNode`. +---@param centerRect cc.Rect # the Rect in points +function SpriteFrame:setCenterRectInPixels(centerRect) end + +---Set offset of the frame. +--- +---@param offsets cc.Vec2 # The offset of the sprite frame. +function SpriteFrame:setOffset(offsets) end + +---Set offset of the frame. +--- +---@param offsetInPixels cc.Vec2 # The offset of the sprite frame, in pixels. +function SpriteFrame:setOffsetInPixels(offsetInPixels) end + +---Set original size of the trimmed image. +--- +---@param sizeInPixels cc.Size # The original size of the trimmed image. +function SpriteFrame:setOriginalSize(sizeInPixels) end + +---Set original size of the trimmed image. +--- +---@param sizeInPixels cc.Size # The original size of the trimmed image, in pixels. +function SpriteFrame:setOriginalSizeInPixels(sizeInPixels) end + +---Set rect of the frame. +--- +---@param rect cc.Rect # The rect of the sprite. +function SpriteFrame:setRect(rect) end + +---Set rect of the sprite frame. +--- +---@param rectInPixels cc.Rect # The rect of the sprite frame, in pixels. +function SpriteFrame:setRectInPixels(rectInPixels) end + +---Set rotated of the sprite frame. +--- +---@param rotated boolean # Rotated the sprite frame if true. +function SpriteFrame:setRotated(rotated) end + +---Set texture of the frame, the texture is retained. +--- +---@param pobTexture cc.Texture2D # The texture of the sprite frame. +function SpriteFrame:setTexture(pobTexture) end + +return SpriteFrame \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/SpriteFrameCache.lua b/addons/cclua/cocos2d/library/cc/SpriteFrameCache.lua new file mode 100644 index 00000000..50d8ed59 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/SpriteFrameCache.lua @@ -0,0 +1,160 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.SpriteFrameCache + +---\class SpriteFrameCache +---Singleton that handles the loading of the sprite frames. +---The SpriteFrameCache loads SpriteFrames from a .plist file. +---A SpriteFrame contains information about how to use a sprite +---located in a sprite sheet. +--- +---The .plist file contains the following elements: +---- `frames`: +---Dictionary of sprites. Key is the sprite's name, value a dict containing the sprite frame data. +---A sprite frame consists of the following values: +---- `spriteOffset`: difference vector between the original sprite's center and the center of the trimmed sprite +---- `spriteSize`: size of the trimmed sprite +---- `spriteSourceSize`: size of the original sprite +---- `textureRect`: the position of the sprite in the sprite sheet +---- `textureRotated`: true if the sprite is rotated clockwise +---- `anchor`: anchor point in normalized coordinates (optional) +---Optional values when using polygon outlines +---- `triangles`: 3 indices per triangle, pointing to vertices and verticesUV coordinates +---- `vertices`: vertices in sprite coordinates, each vertex consists of a pair of x and y coordinates +---- `verticesUV`: vertices in the sprite sheet, each vertex consists of a pair of x and y coordinates +--- +---- `metadata`: +---Dictionary containing additional information about the sprite sheet: +---- `format`: plist file format, currently 3 +---- `size`: size of the texture (optional) +---- `textureFileName`: name of the texture's image file +--- +---Use one of the following tools to create the .plist file and sprite sheet: +---- [TexturePacker](https://www.codeandweb.com/texturepacker/cocos2d) +---- [Zwoptex](https://zwopple.com/zwoptex/) +--- +---\since v0.9 +---\js cc.spriteFrameCache +---@class cc.SpriteFrameCache : cc.Ref +---@field instance cc.SpriteFrameCache Returns the shared instance of the Sprite Frame cache.

\return The instance of the Sprite Frame Cache. \js NA +local SpriteFrameCache = {} + +---Adds an sprite frame with a given name. +---If the name already exists, then the contents of the old name will be replaced with the new one. +--- +---@param frame cc.SpriteFrame # A certain sprite frame. +---@param frameName string # The name of the sprite frame. +function SpriteFrameCache:addSpriteFrame(frame, frameName) end + +---Adds multiple Sprite Frames from a plist file. +---A texture will be loaded automatically. The texture name will composed by replacing the .plist suffix with .png. +---If you want to use another texture, you should use the addSpriteFramesWithFile(const std::string& plist, const std::string& textureFileName) method. +---\js addSpriteFrames +---\lua addSpriteFrames +--- +---@param plist string # Plist file name. +--- +---Adds multiple Sprite Frames from a plist file. The texture will be associated with the created sprite frames. +---\since v0.99.5 +---\js addSpriteFrames +---\lua addSpriteFrames +--- +---\param plist Plist file name. +---\param textureFileName Texture file name. +---@overload fun(self: cc.SpriteFrameCache, plist: string, textureFileName: string) +--- +---Adds multiple Sprite Frames from a plist file. The texture will be associated with the created sprite frames. +---\js addSpriteFrames +---\lua addSpriteFrames +--- +---\param plist Plist file name. +---\param texture Texture pointer. +---@overload fun(self: cc.SpriteFrameCache, plist: string, texture: cc.Texture2D) +function SpriteFrameCache:addSpriteFramesWithFile(plist) end + +---Adds multiple Sprite Frames from a plist file content. The texture will be associated with the created sprite frames. +---\js NA +---\lua addSpriteFrames +--- +---@param plist_content string # Plist file content string. +---@param texture cc.Texture2D # Texture pointer. +function SpriteFrameCache:addSpriteFramesWithFileContent(plist_content, texture) end + +---Destroys the cache. It releases all the Sprite Frames and the retained instance. +---\js NA +function SpriteFrameCache.destroyInstance() end + +---Returns the shared instance of the Sprite Frame cache. +--- +---@return cc.SpriteFrameCache # The instance of the Sprite Frame Cache. +---\js NA +function SpriteFrameCache.getInstance() end + +---Returns an Sprite Frame that was previously added. +---If the name is not found it will return nil. +---You should retain the returned copy if you are going to use it. +---\js getSpriteFrame +---\lua getSpriteFrame +--- +---@param name string # A certain sprite frame name. +---@return cc.SpriteFrame # The sprite frame. +function SpriteFrameCache:getSpriteFrameByName(name) end + +---Initialize method. +--- +---@return boolean # if success return true. +function SpriteFrameCache:init() end + +---Check if multiple Sprite Frames from a plist file have been loaded. +---\js NA +---\lua NA +--- +---@param plist string # Plist file name. +---@return boolean # True if the file is loaded. +function SpriteFrameCache:isSpriteFramesWithFileLoaded(plist) end + +---@param plist string +---@return boolean +function SpriteFrameCache:reloadTexture(plist) end + +---Deletes an sprite frame from the sprite frame cache. +--- +---@param name string # The name of the sprite frame that needs to removed. +function SpriteFrameCache:removeSpriteFrameByName(name) end + +---Purges the dictionary of loaded sprite frames. +---Call this method if you receive the "Memory Warning". +---In the short term: it will free some resources preventing your app from being killed. +---In the medium term: it will allocate more resources. +---In the long term: it will be the same. +function SpriteFrameCache:removeSpriteFrames() end + +---Removes multiple Sprite Frames from a plist file. +---Sprite Frames stored in this file will be removed. +---It is convenient to call this method when a specific texture needs to be removed. +---\since v0.99.5 +--- +---@param plist string # The name of the plist that needs to removed. +function SpriteFrameCache:removeSpriteFramesFromFile(plist) end + +---Removes multiple Sprite Frames from a plist file content. +---Sprite Frames stored in this file will be removed. +---It is convenient to call this method when a specific texture needs to be removed. +--- +---@param plist_content string # The string of the plist content that needs to removed. +---\js NA +function SpriteFrameCache:removeSpriteFramesFromFileContent(plist_content) end + +---Removes all Sprite Frames associated with the specified textures. +---It is convenient to call this method when a specific texture needs to be removed. +---\since v0.995. +--- +---@param texture cc.Texture2D # The texture that needs to removed. +function SpriteFrameCache:removeSpriteFramesFromTexture(texture) end + +---Removes unused sprite frames. +---Sprite Frames that have a retain count of 1 will be deleted. +---It is convenient to call this method after when starting a new Scene. +---\js NA +function SpriteFrameCache:removeUnusedSpriteFrames() end + +return SpriteFrameCache \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/StopGrid.lua b/addons/cclua/cocos2d/library/cc/StopGrid.lua new file mode 100644 index 00000000..2d2692c6 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/StopGrid.lua @@ -0,0 +1,17 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.StopGrid + +---StopGrid action. +---\warning Don't call this action if another grid action is active. +---Call if you want to remove the grid effect. Example: +---\code +---Sequence::create(Lens3D::create(...), StopGrid::create(), nullptr); +---\endcode +---@class cc.StopGrid : cc.ActionInstant +local StopGrid = {} + +---Create a StopGrid Action. +---@return cc.StopGrid # Return a pointer of StopGrid. When the creation failed, return nil. +function StopGrid.create() end + +return StopGrid \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/T2F_Quad.lua b/addons/cclua/cocos2d/library/cc/T2F_Quad.lua new file mode 100644 index 00000000..cb1adfa3 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/T2F_Quad.lua @@ -0,0 +1,19 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.T2F_Quad + +---\struct T2F_Quad +---Texture coordinates for a quad. +---@class cc.T2F_Quad +---@field bl cc.Tex2F +---@field br cc.Tex2F +---@field tl cc.Tex2F +---@field tr cc.Tex2F +local T2F_Quad = {} + +---@return any +function T2F_Quad:__gc() end + +---@return any +function T2F_Quad:__olua_move() end + +return T2F_Quad \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/TMXLayer.lua b/addons/cclua/cocos2d/library/cc/TMXLayer.lua new file mode 100644 index 00000000..6717fad9 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/TMXLayer.lua @@ -0,0 +1,187 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.TMXLayer + +---TMXLayer represents the TMX layer. +---It is a subclass of SpriteBatchNode. By default the tiles are rendered using a TextureAtlas. +---If you modify a tile on runtime, then, that tile will become a Sprite, otherwise no Sprite objects are created. +---The benefits of using Sprite objects as tiles are: +---- tiles (Sprite) can be rotated/scaled/moved with a nice API. +---If the layer contains a property named "cc_vertexz" with an integer (in can be positive or negative), +---then all the tiles belonging to the layer will use that value as their OpenGL vertex Z for depth. +---On the other hand, if the "cc_vertexz" property has the "automatic" value, then the tiles will use an automatic vertex Z value. +---Also before drawing the tiles, GL_ALPHA_TEST will be enabled, and disabled after drawing them. The used alpha func will be: +---glAlphaFunc( GL_GREATER, value ). +---"value" by default is 0, but you can change it from Tiled by adding the "cc_alpha_func" property to the layer. +---The value 0 should work for most cases, but if you have tiles that are semi-transparent, then you might want to use a different +---value, like 0.5. +---For further information, please see the programming guide: +---http://www.cocos2d-iphone.org/wiki/doku.php/prog_guide:tiled_maps +---\since v0.8.1 +---Tiles can have tile flags for additional properties. At the moment only flip horizontal and flip vertical are used. These bit flags are defined in TMXXMLParser.h. +---\since 1.1 +---@class cc.TMXLayer : cc.SpriteBatchNode +---@field layerName string Get the layer name.

\return The layer name. +---@field layerOrientation integer Layer orientation, which is the same as the map orientation.

\return Layer orientation, which is the same as the map orientation. +---@field layerSize cc.Size Size of the layer in tiles.

\return Size of the layer in tiles. +---@field mapTileSize cc.Size Size of the map's tile (could be different from the tile's size).

\return The size of the map's tile. +---@field properties any Properties from the layer. They can be added using Tiled.

\return Properties from the layer. They can be added using Tiled. +---@field tileSet cc.TMXTilesetInfo Tileset information for the layer.

\return Tileset information for the layer. +---@field tiles olua.uint32 Pointer to the map of tiles. \js NA \lua NA \return Pointer to the map of tiles. +local TMXLayer = {} + +---Creates a TMXLayer with an tileset info, a layer info and a map info. +--- +---@param tilesetInfo cc.TMXTilesetInfo # An tileset info. +---@param layerInfo cc.TMXLayerInfo # A layer info. +---@param mapInfo cc.TMXMapInfo # A map info. +---@return cc.TMXLayer # An autorelease object. +function TMXLayer.create(tilesetInfo, layerInfo, mapInfo) end + +---Get the layer name. +--- +---@return string # The layer name. +function TMXLayer:getLayerName() end + +---Layer orientation, which is the same as the map orientation. +--- +---@return integer # Layer orientation, which is the same as the map orientation. +function TMXLayer:getLayerOrientation() end + +---Size of the layer in tiles. +--- +---@return cc.Size # Size of the layer in tiles. +function TMXLayer:getLayerSize() end + +---Size of the map's tile (could be different from the tile's size). +--- +---@return cc.Size # The size of the map's tile. +function TMXLayer:getMapTileSize() end + +---Returns the position in points of a given tile coordinate. +--- +---@param tileCoordinate cc.Vec2 # The tile coordinate. +---@return cc.Vec2 # The position in points of a given tile coordinate. +function TMXLayer:getPositionAt(tileCoordinate) end + +---Properties from the layer. They can be added using Tiled. +--- +---@return any # Properties from the layer. They can be added using Tiled. +function TMXLayer:getProperties() end + +---Return the value for the specific property name. +--- +---@param propertyName string # The specific property name. +---@return any # Return the value for the specific property name. +function TMXLayer:getProperty(propertyName) end + +---Returns the tile (Sprite) at a given a tile coordinate. +---The returned Sprite will be already added to the TMXLayer. Don't add it again. +---The Sprite can be treated like any other Sprite: rotated, scaled, translated, opacity, color, etc. +---You can remove either by calling: +---- layer->removeChild(sprite, cleanup); +---- or layer->removeTileAt(Vec2(x,y)); +--- +---@param tileCoordinate cc.Vec2 # A tile coordinate. +---@return cc.Sprite # Returns the tile (Sprite) at a given a tile coordinate. +function TMXLayer:getTileAt(tileCoordinate) end + +---Returns the tile gid at a given tile coordinate. It also returns the tile flags. +---This method requires the tile map has not been previously released (eg. don't call [layer releaseMap]). +--- +---@param tileCoordinate cc.Vec2 # The tile coordinate. +---@param flags cc.types.TMXTileFlags # Tile flags. +---@return integer # Returns the tile gid at a given tile coordinate. It also returns the tile flags. +---@overload fun(self: cc.TMXLayer, tileCoordinate: cc.Vec2): integer +function TMXLayer:getTileGIDAt(tileCoordinate, flags) end + +---Tileset information for the layer. +--- +---@return cc.TMXTilesetInfo # Tileset information for the layer. +function TMXLayer:getTileSet() end + +---Pointer to the map of tiles. +---\js NA +---\lua NA +---@return olua.uint32 # Pointer to the map of tiles. +function TMXLayer:getTiles() end + +---Initializes a TMXLayer with a tileset info, a layer info and a map info. +--- +---@param tilesetInfo cc.TMXTilesetInfo # An tileset info. +---@param layerInfo cc.TMXLayerInfo # A layer info. +---@param mapInfo cc.TMXMapInfo # A map info. +---@return boolean # If initializes successfully, it will return true. +function TMXLayer:initWithTilesetInfo(tilesetInfo, layerInfo, mapInfo) end + +---\js ctor +---@return cc.TMXLayer +function TMXLayer.new() end + +---Dealloc the map that contains the tile position from memory. +---Unless you want to know at runtime the tiles positions, you can safely call this method. +---If you are going to call layer->tileGIDAt() then, don't release the map. +function TMXLayer:releaseMap() end + +---Removes a tile at given tile coordinate. +--- +---@param tileCoordinate cc.Vec2 # The tile coordinate. +function TMXLayer:removeTileAt(tileCoordinate) end + +---Set the layer name. +--- +---@param layerName string # The layer name. +function TMXLayer:setLayerName(layerName) end + +---Set layer orientation, which is the same as the map orientation. +--- +---@param orientation integer # Layer orientation,which is the same as the map orientation. +function TMXLayer:setLayerOrientation(orientation) end + +---Set size of the layer in tiles. +--- +---@param size cc.Size # Size of the layer in tiles. +function TMXLayer:setLayerSize(size) end + +---Set the size of the map's tile. +--- +---@param size cc.Size # The size of the map's tile. +function TMXLayer:setMapTileSize(size) end + +---Set an Properties from to layer. +--- +---@param properties any # It is used to set the layer Properties. +function TMXLayer:setProperties(properties) end + +---Sets the tile gid (gid = tile global id) at a given tile coordinate. +---The Tile GID can be obtained by using the method "tileGIDAt" or by using the TMX editor -> Tileset Mgr +1. +---If a tile is already placed at that position, then it will be removed. +--- +---@param gid integer # The tile gid. +---@param tileCoordinate cc.Vec2 # The tile coordinate. +--- +---Sets the tile gid (gid = tile global id) at a given tile coordinate. +---The Tile GID can be obtained by using the method "tileGIDAt" or by using the TMX editor -> Tileset Mgr +1. +---If a tile is already placed at that position, then it will be removed. +---Use withFlags if the tile flags need to be changed as well. +--- +---\param gid The tile gid. +---\param tileCoordinate The tile coordinate. +---\param flags The tile flags. +---@overload fun(self: cc.TMXLayer, gid: integer, tileCoordinate: cc.Vec2, flags: cc.TMXTileFlags) +function TMXLayer:setTileGID(gid, tileCoordinate) end + +---Set tileset information for the layer. +--- +---@param info cc.TMXTilesetInfo # The tileset information for the layer. +---\js NA +function TMXLayer:setTileSet(info) end + +---Set a pointer to the map of tiles. +--- +---@param tiles olua.uint32 # A pointer to the map of tiles. +function TMXLayer:setTiles(tiles) end + +---Creates the tiles. +function TMXLayer:setupTiles() end + +return TMXLayer \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/TMXLayerInfo.lua b/addons/cclua/cocos2d/library/cc/TMXLayerInfo.lua new file mode 100644 index 00000000..eda3db0d --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/TMXLayerInfo.lua @@ -0,0 +1,25 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.TMXLayerInfo + +---TMXLayerInfo contains the information about the layers like: +---- Layer name +---- Layer size +---- Layer opacity at creation time (it can be modified at runtime) +---- Whether the layer is visible (if it's not visible, then the CocosNode won't be created) +--- +---This information is obtained from the TMX file. +---@class cc.TMXLayerInfo : cc.Ref +---@field properties cc.types.ValueMap +local TMXLayerInfo = {} + +---@return cc.types.ValueMap +function TMXLayerInfo:getProperties() end + +---\js ctor +---@return cc.TMXLayerInfo +function TMXLayerInfo.new() end + +---@param properties any +function TMXLayerInfo:setProperties(properties) end + +return TMXLayerInfo \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/TMXMapInfo.lua b/addons/cclua/cocos2d/library/cc/TMXMapInfo.lua new file mode 100644 index 00000000..355764c7 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/TMXMapInfo.lua @@ -0,0 +1,207 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.TMXMapInfo + +---TMXMapInfo contains the information about the map like: +---- Map orientation (hexagonal, isometric or orthogonal) +---- Tile size +---- Map size +--- +---And it also contains: +---- Layers (an array of TMXLayerInfo objects) +---- Tilesets (an array of TMXTilesetInfo objects) +---- ObjectGroups (an array of TMXObjectGroupInfo objects) +--- +---This information is obtained from the TMX file. +---@class cc.TMXMapInfo : cc.Ref +---@field currentString string +---@field externalTilesetFileName string +---@field hexSideLength integer map hexsidelength +---@field layerAttribs integer layer attribs +---@field layers any Layers +---@field mapSize cc.Size map width & height +---@field objectGroups any ObjectGroups +---@field orientation integer map orientation +---@field parentElement integer parent element +---@field parentGID integer parent GID +---@field properties any properties +---@field staggerAxis integer map staggeraxis +---@field staggerIndex integer map stagger index +---@field storingCharacters boolean is storing characters? +---@field tileProperties any +---@field tileSize cc.Size tiles width & height +---@field tilesets any tilesets +---@field tmxFileName string +local TMXMapInfo = {} + +---@param cls string +---@return any +function TMXMapInfo:as(cls) end + +---creates a TMX Format with a tmx file +---@param tmxFile string +---@return cc.TMXMapInfo +function TMXMapInfo.create(tmxFile) end + +---creates a TMX Format with an XML string and a TMX resource path +---@param tmxString string +---@param resourcePath string +---@return cc.TMXMapInfo +function TMXMapInfo.createWithXML(tmxString, resourcePath) end + +---\js NA +---\lua NA +---@param ctx any +---@param name string +function TMXMapInfo:endElement(ctx, name) end + +---@return string +function TMXMapInfo:getCurrentString() end + +---@return string +function TMXMapInfo:getExternalTilesetFileName() end + +---map hexsidelength +---@return integer +function TMXMapInfo:getHexSideLength() end + +---layer attribs +---@return integer +function TMXMapInfo:getLayerAttribs() end + +---Layers +---@return any +function TMXMapInfo:getLayers() end + +---map width & height +---@return cc.Size +function TMXMapInfo:getMapSize() end + +---ObjectGroups +---@return any +function TMXMapInfo:getObjectGroups() end + +---map orientation +---@return integer +function TMXMapInfo:getOrientation() end + +---parent element +---@return integer +function TMXMapInfo:getParentElement() end + +---parent GID +---@return integer +function TMXMapInfo:getParentGID() end + +---properties +---@return any +function TMXMapInfo:getProperties() end + +---map staggeraxis +---@return integer +function TMXMapInfo:getStaggerAxis() end + +---map stagger index +---@return integer +function TMXMapInfo:getStaggerIndex() end + +---@return string +function TMXMapInfo:getTMXFileName() end + +---@return any +function TMXMapInfo:getTileProperties() end + +---tiles width & height +---@return cc.Size +function TMXMapInfo:getTileSize() end + +---tilesets +---@return any +function TMXMapInfo:getTilesets() end + +---initializes a TMX format with a tmx file +---@param tmxFile string +---@return boolean +function TMXMapInfo:initWithTMXFile(tmxFile) end + +---initializes a TMX format with an XML string and a TMX resource path +---@param tmxString string +---@param resourcePath string +---@return boolean +function TMXMapInfo:initWithXML(tmxString, resourcePath) end + +---is storing characters? +---@return boolean +function TMXMapInfo:isStoringCharacters() end + +---\js ctor +---@return cc.TMXMapInfo +function TMXMapInfo.new() end + +---initializes parsing of an XML file, either a tmx (Map) file or tsx (Tileset) file +---@param xmlFilename string +---@return boolean +function TMXMapInfo:parseXMLFile(xmlFilename) end + +---@param xmlString string +---@return boolean +function TMXMapInfo:parseXMLString(xmlString) end + +---@param currentString string +function TMXMapInfo:setCurrentString(currentString) end + +---@param hexSideLength integer +function TMXMapInfo:setHexSideLength(hexSideLength) end + +---@param layerAttribs integer +function TMXMapInfo:setLayerAttribs(layerAttribs) end + +---@param layers any +function TMXMapInfo:setLayers(layers) end + +---@param mapSize cc.Size +function TMXMapInfo:setMapSize(mapSize) end + +---@param groups any +function TMXMapInfo:setObjectGroups(groups) end + +---@param orientation integer +function TMXMapInfo:setOrientation(orientation) end + +---@param element integer +function TMXMapInfo:setParentElement(element) end + +---@param gid integer +function TMXMapInfo:setParentGID(gid) end + +---@param properties any +function TMXMapInfo:setProperties(properties) end + +---@param staggerAxis integer +function TMXMapInfo:setStaggerAxis(staggerAxis) end + +---@param staggerIndex integer +function TMXMapInfo:setStaggerIndex(staggerIndex) end + +---@param storingCharacters boolean +function TMXMapInfo:setStoringCharacters(storingCharacters) end + +---@param fileName string +function TMXMapInfo:setTMXFileName(fileName) end + +---@param tileProperties any +function TMXMapInfo:setTileProperties(tileProperties) end + +---@param tileSize cc.Size +function TMXMapInfo:setTileSize(tileSize) end + +---@param tilesets any +function TMXMapInfo:setTilesets(tilesets) end + +---\js NA +---\lua NA +---@param ctx any +---@param ch string +---@param len integer +function TMXMapInfo:textHandler(ctx, ch, len) end + +return TMXMapInfo \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/TMXObjectGroup.lua b/addons/cclua/cocos2d/library/cc/TMXObjectGroup.lua new file mode 100644 index 00000000..bf81c872 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/TMXObjectGroup.lua @@ -0,0 +1,71 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.TMXObjectGroup + +---TMXObjectGroup represents the TMX object group. +---\since v0.99.0 +---@class cc.TMXObjectGroup : cc.Ref +---@field groupName string Get the group name.

\return The group name. +---@field objects any Gets the array of the objects.

\return The array of the objects. +---@field positionOffset cc.Vec2 Gets the offset position of child objects.

\return The offset position of child objects. +---@field properties any Gets the list of properties stored in a dictionary.

\return The list of properties stored in a dictionary. +local TMXObjectGroup = {} + +---Get the group name. +--- +---@return string # The group name. +function TMXObjectGroup:getGroupName() end + +---Return the dictionary for the specific object name. +---It will return the 1st object found on the array for the given name. +--- +---@return any # Return the dictionary for the specific object name. +---@param objectName string +function TMXObjectGroup:getObject(objectName) end + +---Gets the array of the objects. +--- +---@return any # The array of the objects. +function TMXObjectGroup:getObjects() end + +---Gets the offset position of child objects. +--- +---@return cc.Vec2 # The offset position of child objects. +function TMXObjectGroup:getPositionOffset() end + +---Gets the list of properties stored in a dictionary. +--- +---@return any # The list of properties stored in a dictionary. +function TMXObjectGroup:getProperties() end + +---Return the value for the specific property name. +--- +---@param propertyName string # The specific property name. +---@return any # Return the value for the specific property name. +---\js NA +function TMXObjectGroup:getProperty(propertyName) end + +---\js ctor +---@return cc.TMXObjectGroup +function TMXObjectGroup.new() end + +---Set the group name. +--- +---@param groupName string # A string,it is used to set the group name. +function TMXObjectGroup:setGroupName(groupName) end + +---Sets the array of the objects. +--- +---@param objects any # The array of the objects. +function TMXObjectGroup:setObjects(objects) end + +---Sets the offset position of child objects. +--- +---@param offset cc.Vec2 # The offset position of child objects. +function TMXObjectGroup:setPositionOffset(offset) end + +---Sets the list of properties. +--- +---@param properties any # The list of properties. +function TMXObjectGroup:setProperties(properties) end + +return TMXObjectGroup \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/TMXTileFlags.lua b/addons/cclua/cocos2d/library/cc/TMXTileFlags.lua new file mode 100644 index 00000000..d04dd6a4 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/TMXTileFlags.lua @@ -0,0 +1,17 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.TMXTileFlags + +---@type cc.TMXTileFlags +local VALUE + +--- +---@enum cc.TMXTileFlags +local TMXTileFlags = { + kTMXFlipedAll = -536870912, + kTMXFlippedMask = 536870911, + kTMXTileDiagonalFlag = 536870912, + kTMXTileHorizontalFlag = -2147483648, + kTMXTileVerticalFlag = 1073741824, +} + +return TMXTileFlags \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/TMXTiledMap.lua b/addons/cclua/cocos2d/library/cc/TMXTiledMap.lua new file mode 100644 index 00000000..df725fe4 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/TMXTiledMap.lua @@ -0,0 +1,164 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.TMXTiledMap + +---TMXTiledMap knows how to parse and render a TMX map. +---It adds support for the TMX tiled map format used by http://www.mapeditor.org +---It supports isometric, hexagonal and orthogonal tiles. +---It also supports object groups, objects, and properties. +---Features: +---- Each tile will be treated as an Sprite. +---- The sprites are created on demand. They will be created only when you call "layer->tileAt(position)". +---- Each tile can be rotated / moved / scaled / tinted / "opaqued", since each tile is a Sprite. +---- Tiles can be added/removed in runtime. +---- The z-order of the tiles can be modified in runtime. +---- Each tile has an anchorPoint of (0,0). +---- The anchorPoint of the TMXTileMap is (0,0). +---- The TMX layers will be added as a child. +---- The TMX layers will be aliased by default. +---- The tileset image will be loaded using the TextureCache. +---- Each tile will have a unique tag. +---- Each tile will have a unique z value. top-left: z=1, bottom-right: z=max z. +---- Each object group will be treated as an MutableArray. +---- Object class which will contain all the properties in a dictionary. +---- Properties can be assigned to the Map, Layer, Object Group, and Object. +---Limitations: +---- It only supports one tileset per layer. +---- Embedded images are not supported. +---- It only supports the XML format (the JSON format is not supported). +---Technical description: +---Each layer is created using an TMXLayer (subclass of SpriteBatchNode). If you have 5 layers, then 5 TMXLayer will be created, +---unless the layer visibility is off. In that case, the layer won't be created at all. +---You can obtain the layers (TMXLayer objects) at runtime by: +---- map->getChildByTag(tag_number); // 0=1st layer, 1=2nd layer, 2=3rd layer, etc... +---- map->getLayer(name_of_the_layer); +---Each object group is created using a TMXObjectGroup which is a subclass of MutableArray. +---You can obtain the object groups at runtime by: +---- map->getObjectGroup(name_of_the_object_group); +---Each object is a TMXObject. +---Each property is stored as a key-value pair in an MutableDictionary. +---You can obtain the properties at runtime by: +---map->getProperty(name_of_the_property); +---layer->getProperty(name_of_the_property); +---objectGroup->getProperty(name_of_the_property); +---object->getProperty(name_of_the_property); +---\since v0.8.1 +---@class cc.TMXTiledMap : cc.Node +---@field layerNum integer +---@field mapOrientation integer Map orientation.

\return Map orientation. +---@field mapSize cc.Size The map's size property measured in tiles.

\return The map's size property measured in tiles. +---@field objectGroups any Get the Object groups.

\return The object groups. +---@field properties cc.types.ValueMap Properties.

\return Properties. +---@field resourceFile string +---@field tileSize cc.Size The tiles's size property measured in pixels.

\return The tiles's size property measured in pixels. +local TMXTiledMap = {} + +---Creates a TMX Tiled Map with a TMX file. +--- +---@param tmxFile string # A TMX file. +---@return cc.TMXTiledMap # An autorelease object. +function TMXTiledMap.create(tmxFile) end + +---Initializes a TMX Tiled Map with a TMX formatted XML string and a path to TMX resources. +--- +---@param tmxString string # A TMX formatted XML string. +---@param resourcePath string # The path to TMX resources. +---@return cc.TMXTiledMap # An autorelease object. +---\js NA +function TMXTiledMap.createWithXML(tmxString, resourcePath) end + +---Return the TMXLayer for the specific layer. +--- +---@param layerName string # A specific layer. +---@return cc.TMXLayer # The TMXLayer for the specific layer. +function TMXTiledMap:getLayer(layerName) end + +---@return integer +function TMXTiledMap:getLayerNum() end + +---Map orientation. +--- +---@return integer # Map orientation. +function TMXTiledMap:getMapOrientation() end + +---The map's size property measured in tiles. +--- +---@return cc.Size # The map's size property measured in tiles. +function TMXTiledMap:getMapSize() end + +---Return the TMXObjectGroup for the specific group. +--- +---@param groupName string # The group Name. +---@return cc.TMXObjectGroup # A Type of TMXObjectGroup. +function TMXTiledMap:getObjectGroup(groupName) end + +---Get the Object groups. +--- +---@return any # The object groups. +function TMXTiledMap:getObjectGroups() end + +---Properties. +--- +---@return cc.types.ValueMap # Properties. +function TMXTiledMap:getProperties() end + +---Return properties dictionary for tile GID. +--- +---@param GID integer # The tile GID. +---@return any # Return properties dictionary for tile GID. +function TMXTiledMap:getPropertiesForGID(GID) end + +---Return the value for the specific property name. +--- +---@param propertyName string # The specific property name. +---@return any # Return the value for the specific property name. +function TMXTiledMap:getProperty(propertyName) end + +---@return string +function TMXTiledMap:getResourceFile() end + +---The tiles's size property measured in pixels. +--- +---@return cc.Size # The tiles's size property measured in pixels. +function TMXTiledMap:getTileSize() end + +---initializes a TMX Tiled Map with a TMX file +---@param tmxFile string +---@return boolean +function TMXTiledMap:initWithTMXFile(tmxFile) end + +---initializes a TMX Tiled Map with a TMX formatted XML string and a path to TMX resources +---@param tmxString string +---@param resourcePath string +---@return boolean +function TMXTiledMap:initWithXML(tmxString, resourcePath) end + +---\js ctor +---@return cc.TMXTiledMap +function TMXTiledMap.new() end + +---Set map orientation. +--- +---@param mapOrientation integer # The map orientation. +function TMXTiledMap:setMapOrientation(mapOrientation) end + +---Set the map's size property measured in tiles. +--- +---@param mapSize cc.Size # The map's size property measured in tiles. +function TMXTiledMap:setMapSize(mapSize) end + +---Set the object groups. +--- +---@param groups any # The object groups. +function TMXTiledMap:setObjectGroups(groups) end + +---Set the properties. +--- +---@param properties any # A Type of ValueMap to set the properties. +function TMXTiledMap:setProperties(properties) end + +---Set the tiles's size property measured in pixels. +--- +---@param tileSize cc.Size # The tiles's size property measured in pixels. +function TMXTiledMap:setTileSize(tileSize) end + +return TMXTiledMap \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/TMXTilesetInfo.lua b/addons/cclua/cocos2d/library/cc/TMXTilesetInfo.lua new file mode 100644 index 00000000..02108a2b --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/TMXTilesetInfo.lua @@ -0,0 +1,24 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.TMXTilesetInfo + +---TMXTilesetInfo contains the information about the tilesets like: +---- Tileset name +---- Tileset spacing +---- Tileset margin +---- size of the tiles +---- Image used for the tiles +---- Image size +--- +---This information is obtained from the TMX file. +---@class cc.TMXTilesetInfo : cc.Ref +local TMXTilesetInfo = {} + +---@param gid integer +---@return cc.Rect +function TMXTilesetInfo:getRectForGID(gid) end + +---\js ctor +---@return cc.TMXTilesetInfo +function TMXTilesetInfo.new() end + +return TMXTilesetInfo \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/TTFConfig.lua b/addons/cclua/cocos2d/library/cc/TTFConfig.lua new file mode 100644 index 00000000..5fa5f403 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/TTFConfig.lua @@ -0,0 +1,25 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.TTFConfig + +---\struct TTFConfig +---\see `GlyphCollection` +---@class cc.TTFConfig +---@field bold boolean +---@field customGlyphs string +---@field distanceFieldEnabled boolean +---@field fontFilePath string +---@field fontSize number +---@field glyphs cc.GlyphCollection +---@field italics boolean +---@field outlineSize integer +---@field strikethrough boolean +---@field underline boolean +local TTFConfig = {} + +---@return any +function TTFConfig:__gc() end + +---@return any +function TTFConfig:__olua_move() end + +return TTFConfig \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/TargetedAction.lua b/addons/cclua/cocos2d/library/cc/TargetedAction.lua new file mode 100644 index 00000000..f96823bd --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/TargetedAction.lua @@ -0,0 +1,34 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.TargetedAction + +---\class TargetedAction +---Overrides the target of an action so that it always runs on the target +---specified at action creation rather than the one specified by runAction. +---@class cc.TargetedAction : cc.ActionInterval +---@field forcedTarget cc.Node returns the target that the action is forced to run with.

\return The target that the action is forced to run with. +local TargetedAction = {} + +---Create an action with the specified action and forced target. +--- +---@param target cc.Node # The target needs to override. +---@param action cc.FiniteTimeAction # The action needs to override. +---@return cc.TargetedAction # An autoreleased TargetedAction object. +function TargetedAction.create(target, action) end + +---returns the target that the action is forced to run with. +--- +---@return cc.Node # The target that the action is forced to run with. +function TargetedAction:getForcedTarget() end + +---Init an action with the specified action and forced target +---@param target cc.Node +---@param action cc.FiniteTimeAction +---@return boolean +function TargetedAction:initWithTarget(target, action) end + +---Sets the target that the action will be forced to run with. +--- +---@param forcedTarget cc.Node # The target that the action will be forced to run with. +function TargetedAction:setForcedTarget(forcedTarget) end + +return TargetedAction \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/Technique.lua b/addons/cclua/cocos2d/library/cc/Technique.lua new file mode 100644 index 00000000..2e66dc57 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/Technique.lua @@ -0,0 +1,8 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.Technique + +---Technique +---@class cc.Technique : cc.Ref +local Technique = {} + +return Technique \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/Tex2F.lua b/addons/cclua/cocos2d/library/cc/Tex2F.lua new file mode 100644 index 00000000..4dffb0d9 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/Tex2F.lua @@ -0,0 +1,24 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.Tex2F + +---\struct Tex2F +---A TEXCOORD composed of 2 floats: u, y +---\since v3.0 +---@class cc.Tex2F +---@field u number +---@field v number +local Tex2F = {} + +---@return any +function Tex2F:__gc() end + +---@return any +function Tex2F:__olua_move() end + +---@param _u number +---@param _v number +---@return cc.Tex2F +---@overload fun(): cc.Tex2F +function Tex2F.new(_u, _v) end + +return Tex2F \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/TextFieldDelegate.lua b/addons/cclua/cocos2d/library/cc/TextFieldDelegate.lua new file mode 100644 index 00000000..80416fb4 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/TextFieldDelegate.lua @@ -0,0 +1,47 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.TextFieldDelegate + +---A input protocol for TextField. +---@class cc.TextFieldDelegate +local TextFieldDelegate = {} + +---@return any +function TextFieldDelegate:__gc() end + +---@return any +function TextFieldDelegate:__olua_move() end + +---If the sender doesn't want to attach to the IME, return true. +---@param sender cc.TextFieldTTF +---@return boolean +function TextFieldDelegate:onTextFieldAttachWithIME(sender) end + +---If the sender doesn't want to delete the delText, return true. +---@param sender cc.TextFieldTTF +---@param delText string +---@param nLen integer +---@return boolean +function TextFieldDelegate:onTextFieldDeleteBackward(sender, delText, nLen) end + +---If the sender doesn't want to detach from the IME, return true. +---@param sender cc.TextFieldTTF +---@return boolean +function TextFieldDelegate:onTextFieldDetachWithIME(sender) end + +---If the sender doesn't want to insert the text, return true. +---@param sender cc.TextFieldTTF +---@param text string +---@param nLen integer +---@return boolean +function TextFieldDelegate:onTextFieldInsertText(sender, text, nLen) end + +---If the sender doesn't want to draw, return true. +---\js NA +---@param sender cc.TextFieldTTF +---@param renderer cc.Renderer +---@param transform cc.Mat4 +---@param flags integer +---@return boolean +function TextFieldDelegate:onVisit(sender, renderer, transform, flags) end + +return TextFieldDelegate \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/TextFieldTTF.lua b/addons/cclua/cocos2d/library/cc/TextFieldTTF.lua new file mode 100644 index 00000000..e89bebd5 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/TextFieldTTF.lua @@ -0,0 +1,133 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.TextFieldTTF + +---\addtogroup ui +---\{ +---@class cc.TextFieldTTF : cc.Label +---@field charCount any Query the currently inputed character count. \return The total input character count. +---@field colorSpaceHolder any Query the color of place holder. \return The place holder color. +---@field delegate cc.TextFieldDelegate \lua NA +---@field passwordTextStyle string +---@field placeHolder string Query the placeholder string. \return The placeholder string. +---@field secureTextEntry boolean Query whether the currently display mode is secure text entry or not. \return Whether current text is displayed as secure text entry. \js NA +local TextFieldTTF = {} + +---Append to input text of TextField. +---@param text string # The append text of TextField. +function TextFieldTTF:appendString(text) end + +---@param cls string +---@return any +function TextFieldTTF:as(cls) end + +---Open keyboard and receive input text. +---@return boolean +function TextFieldTTF:attachWithIME() end + +---End text input and close keyboard. +---@return boolean +function TextFieldTTF:detachWithIME() end + +---Query the currently inputed character count. +---@return any # The total input character count. +function TextFieldTTF:getCharCount() end + +---Query the color of place holder. +---@return any # The place holder color. +function TextFieldTTF:getColorSpaceHolder() end + +---\lua NA +---@return cc.TextFieldDelegate +function TextFieldTTF:getDelegate() end + +---@return string +function TextFieldTTF:getPasswordTextStyle() end + +---Query the placeholder string. +---@return string # The placeholder string. +function TextFieldTTF:getPlaceHolder() end + +---Initializes the TextFieldTTF with a font name, alignment, dimension and font size. +---@param placeholder string +---@param dimensions cc.Size +---@param alignment cc.TextHAlignment +---@param fontName string +---@param fontSize number +---@return boolean +--- +---Initializes the TextFieldTTF with a font name and font size. +---@overload fun(self: cc.TextFieldTTF, placeholder: string, fontName: string, fontSize: number): boolean +function TextFieldTTF:initWithPlaceHolder(placeholder, dimensions, alignment, fontName, fontSize) end + +---Query whether the currently display mode is secure text entry or not. +---@return boolean # Whether current text is displayed as secure text entry. +---\js NA +function TextFieldTTF:isSecureTextEntry() end + +---Default constructor. +---\js ctor +---@return cc.TextFieldTTF +function TextFieldTTF.new() end + +---Change input placeholder color. +---@param color any # A color value in `Color3B`. +--- +---Change the placeholder color. +---\param color The placeholder color in Color4B. +---@overload fun(self: cc.TextFieldTTF, color: any) +function TextFieldTTF:setColorSpaceHolder(color) end + +---Set char showing cursor. +---\js NA +---@param cursor integer +function TextFieldTTF:setCursorChar(cursor) end + +---Set enable cursor use. +---\js NA +---@param enabled boolean +function TextFieldTTF:setCursorEnabled(enabled) end + +---Set cursor position to hit letter, if enabled +---\js NA +---@param point cc.Vec2 +---@param camera cc.Camera +function TextFieldTTF:setCursorFromPoint(point, camera) end + +---Set cursor position, if enabled +---\js NA +---@param cursorPosition any +function TextFieldTTF:setCursorPosition(cursorPosition) end + +---\lua NA +---@param delegate cc.TextFieldDelegate +function TextFieldTTF:setDelegate(delegate) end + +---@param text string +function TextFieldTTF:setPasswordTextStyle(text) end + +---Change placeholder text. +---place holder text displayed when there is no text in the text field. +---@param text string # The placeholder string. +function TextFieldTTF:setPlaceHolder(text) end + +---Set enable secure text entry representation. +---If you want to display password in TextField, this option is very helpful. +---@param value boolean # Whether or not to display text with secure text entry. +---\js NA +function TextFieldTTF:setSecureTextEntry(value) end + +---Creates a TextFieldTTF from a fontname, alignment, dimension and font size. +---\js NA +---@param placeholder string +---@param dimensions cc.Size +---@param alignment cc.TextHAlignment +---@param fontName string +---@param fontSize number +---@return cc.TextFieldTTF +--- +---Creates a TextFieldTTF from a fontname and font size. +---\js NA +---@overload fun(placeholder: string, fontName: string, fontSize: number): cc.TextFieldTTF +function TextFieldTTF.textFieldWithPlaceHolder(placeholder, dimensions, alignment, fontName, fontSize) end + +return TextFieldTTF \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/TextHAlignment.lua b/addons/cclua/cocos2d/library/cc/TextHAlignment.lua new file mode 100644 index 00000000..db14c6a0 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/TextHAlignment.lua @@ -0,0 +1,15 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.TextHAlignment + +---@type cc.TextHAlignment +local VALUE + +--- +---@enum cc.TextHAlignment +local TextHAlignment = { + CENTER = 1, + LEFT = 0, + RIGHT = 2, +} + +return TextHAlignment \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/TextVAlignment.lua b/addons/cclua/cocos2d/library/cc/TextVAlignment.lua new file mode 100644 index 00000000..4a57cd13 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/TextVAlignment.lua @@ -0,0 +1,15 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.TextVAlignment + +---@type cc.TextVAlignment +local VALUE + +--- +---@enum cc.TextVAlignment +local TextVAlignment = { + BOTTOM = 2, + CENTER = 1, + TOP = 0, +} + +return TextVAlignment \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/Texture2D.lua b/addons/cclua/cocos2d/library/cc/Texture2D.lua new file mode 100644 index 00000000..0ff94ecc --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/Texture2D.lua @@ -0,0 +1,266 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.Texture2D + +---Texture2D class. This class allows to easily create OpenGL 2D textures from images, text or raw data. +---The created Texture2D object will always have power-of-two dimensions. +---Depending on how you create the Texture2D object, the actual image area of the texture might be smaller than the texture dimensions i.e. "contentSize" != (pixelsWide, pixelsHigh) and (maxS, maxT) != (1.0, 1.0). +---Be aware that the content of the generated textures will be upside-down! +---@class cc.Texture2D : cc.Ref +---@field alphaTexture cc.Texture2D +---@field alphaTextureName boolean +---@field backendTexture ccb.TextureBackend +---@field contentSize cc.Size Get the texture content size. +---@field contentSizeInPixels cc.Size Get content size. +---@field defaultAlphaPixelFormat ccb.PixelFormat Returns the alpha pixel format. \since v0.8 +---@field maxS number Gets max S. +---@field maxT number Gets max T. +---@field path string +---@field pixelFormat ccb.PixelFormat Gets the pixel format of the texture. +---@field pixelFormatInfoMap { [ccb.PixelFormat]: cc.Texture2D.PixelFormatInfo } Get pixel info map, the key-value pairs is PixelFormat and PixelFormatInfo. +---@field pixelsHigh integer Gets the height of the texture in pixels. +---@field pixelsWide integer Gets the width of the texture in pixels. +---@field renderTarget boolean +---@field stringForFormat string Returns the pixel format. \since v2.0 +local Texture2D = {} + +---Drawing extensions to make it easy to draw basic quads using a Texture2D object. +---These functions require GL_TEXTURE_2D and both GL_VERTEX_ARRAY and GL_TEXTURE_COORD_ARRAY client states to be enabled. +--- +---Draws a texture at a given point. +---@param point cc.Vec2 +---@param globalZOrder number +function Texture2D:drawAtPoint(point, globalZOrder) end + +---Draws a texture inside a rect. +---@param rect cc.Rect +---@param globalZOrder number +function Texture2D:drawInRect(rect, globalZOrder) end + +---Generates mipmap images for the texture. +---It only works if the texture size is POT (power of 2). +---\since v0.99.0 +function Texture2D:generateMipmap() end + +---@return cc.Texture2D +function Texture2D:getAlphaTexture() end + +---@return boolean +function Texture2D:getAlphaTextureName() end + +---@return ccb.TextureBackend +function Texture2D:getBackendTexture() end + +---Returns the bits-per-pixel of the in-memory OpenGL texture +---\since v1.0 +---@return integer +--- +---Helper functions that returns bits per pixels for a given format. +---\since v2.0 +---@overload fun(self: cc.Texture2D, format: ccb.PixelFormat): integer +function Texture2D:getBitsPerPixelForFormat() end + +---Get the texture content size. +---@return cc.Size +function Texture2D:getContentSize() end + +---Get content size. +---@return cc.Size +function Texture2D:getContentSizeInPixels() end + +---Returns the alpha pixel format. +---\since v0.8 +---@return ccb.PixelFormat +function Texture2D.getDefaultAlphaPixelFormat() end + +---Gets max S. +---@return number +function Texture2D:getMaxS() end + +---Gets max T. +---@return number +function Texture2D:getMaxT() end + +---@return string +function Texture2D:getPath() end + +---Gets the pixel format of the texture. +---@return ccb.PixelFormat +function Texture2D:getPixelFormat() end + +---Get pixel info map, the key-value pairs is PixelFormat and PixelFormatInfo. +---@return { [ccb.PixelFormat]: cc.Texture2D.PixelFormatInfo } +function Texture2D.getPixelFormatInfoMap() end + +---Gets the height of the texture in pixels. +---@return integer +function Texture2D:getPixelsHigh() end + +---Gets the width of the texture in pixels. +---@return integer +function Texture2D:getPixelsWide() end + +---Returns the pixel format. +---\since v2.0 +---@return string +function Texture2D:getStringForFormat() end + +---Whether or not the texture has mip maps. +---@return boolean +function Texture2D:hasMipmaps() end + +---Whether or not the texture has their Alpha premultiplied. +---@return boolean +function Texture2D:hasPremultipliedAlpha() end + +---@param texture ccb.TextureBackend +---@param preMultipliedAlpha boolean +---@return boolean +---@overload fun(self: cc.Texture2D, texture: ccb.TextureBackend): boolean +function Texture2D:initWithBackendTexture(texture, preMultipliedAlpha) end + +---Initializes with a texture2d with data. +--- +---@param data any # Specifies a pointer to the image data in memory. +---@param dataLen integer # The image data length. +---@param pixelFormat ccb.PixelFormat # The image pixelFormat. +---@param pixelsWide integer # The image width. +---@param pixelsHigh integer # The image height. +---@param contentSize cc.Size # The image content size. +---@param preMultipliedAlpha boolean # The texture has premultiplied alpha +---\js NA +---\lua NA +---@return boolean +---@overload fun(self: cc.Texture2D, data: any, dataLen: integer, pixelFormat: ccb.PixelFormat, pixelsWide: integer, pixelsHigh: integer, contentSize: cc.Size): boolean +--- +---Initializes with a texture2d with data. +--- +---\param data Specifies a pointer to the image data in memory. +---\param dataLen The image data length. +---\param pixelFormat The image pixelFormat. +---\param renderFormat The format converted to. +---\param pixelsWide The image width. +---\param pixelsHigh The image height. +---\param contentSize The image content size. +---\param preMultipliedAlpha The texture has premultiplied alpha +---\js NA +---\lua NA +---@overload fun(self: cc.Texture2D, data: any, dataLen: integer, pixelFormat: ccb.PixelFormat, renderFormat: ccb.PixelFormat, pixelsWide: integer, pixelsHigh: integer, contentSize: cc.Size, preMultipliedAlpha: boolean): boolean +--- +---Initializes with a texture2d with data. +--- +---\param data Specifies a pointer to the image data in memory. +---\param dataLen The image data length. +---\param pixelFormat The image pixelFormat. +---\param renderFormat The format converted to. +---\param pixelsWide The image width. +---\param pixelsHigh The image height. +---\param contentSize The image content size. +---\param preMultipliedAlpha The texture has premultiplied alpha +---\js NA +---\lua NA +---@overload fun(self: cc.Texture2D, data: any, dataLen: integer, pixelFormat: ccb.PixelFormat, renderFormat: ccb.PixelFormat, pixelsWide: integer, pixelsHigh: integer, contentSize: cc.Size): boolean +function Texture2D:initWithData(data, dataLen, pixelFormat, pixelsWide, pixelsHigh, contentSize, preMultipliedAlpha) end + +---Extensions to make it easy to create a Texture2D object from an image file. +--- +--- +---Initializes a texture from a UIImage object. +---We will use the format you specified with setDefaultAlphaPixelFormat to convert the image for texture. +---NOTE: It will not convert the pvr image file. +---@param image cc.Image # An UIImage object. +---@return boolean +--- +---Initializes a texture from a UIImage object. +---We will use the format you passed to the function to convert the image format to the texture format. +---If you pass PixelFormat::Automatic, we will auto detect the image render type and use that type for texture to render. +---\param image An UIImage object. +---\param format Texture pixel formats. +---@overload fun(self: cc.Texture2D, image: cc.Image, format: ccb.PixelFormat): boolean +function Texture2D:initWithImage(image) end + +---Initializes a texture from a string with dimensions, alignment, font name and font size. +--- +---@param text string # A null terminated string. +---@param fontName string # The font name. +---@param fontSize number # The font size. +---@param dimensions cc.Size # The font dimension. +---@param hAlignment cc.TextHAlignment # The font horizontal text alignment type. +---@param vAlignment cc.TextVAlignment # The font vertical text alignment type. +---@param enableWrap boolean # Whether enable text wrap or not. +---@param overflow integer # Whether shrink font size when content larger than the dimensions. +---@return boolean +---@overload fun(self: cc.Texture2D, text: string, fontName: string, fontSize: number): boolean +---@overload fun(self: cc.Texture2D, text: string, fontName: string, fontSize: number, dimensions: cc.Size): boolean +---@overload fun(self: cc.Texture2D, text: string, fontName: string, fontSize: number, dimensions: cc.Size, hAlignment: cc.TextHAlignment): boolean +---@overload fun(self: cc.Texture2D, text: string, fontName: string, fontSize: number, dimensions: cc.Size, hAlignment: cc.TextHAlignment, vAlignment: cc.TextVAlignment): boolean +---@overload fun(self: cc.Texture2D, text: string, fontName: string, fontSize: number, dimensions: cc.Size, hAlignment: cc.TextHAlignment, vAlignment: cc.TextVAlignment, enableWrap: boolean): boolean +function Texture2D:initWithString(text, fontName, fontSize, dimensions, hAlignment, vAlignment, enableWrap, overflow) end + +---@return boolean +function Texture2D:isRenderTarget() end + +---\js ctor +---@return cc.Texture2D +function Texture2D.new() end + +---Sets alias texture parameters: +---- GL_TEXTURE_MIN_FILTER = GL_NEAREST +---- GL_TEXTURE_MAG_FILTER = GL_NEAREST +---\warning Calling this method could allocate additional texture memory. +---\since v0.8 +function Texture2D:setAliasTexParameters() end + +---@param alphaTexture cc.Texture2D +function Texture2D:setAlphaTexture(alphaTexture) end + +---Sets antialias texture parameters: +---- GL_TEXTURE_MIN_FILTER = GL_LINEAR +---- GL_TEXTURE_MAG_FILTER = GL_LINEAR +--- +---\warning Calling this method could allocate additional texture memory. +--- +---\since v0.8 +function Texture2D:setAntiAliasTexParameters() end + +---sets the default pixel format for UIImagescontains alpha channel. +--- +---@param format ccb.PixelFormat # +---If the UIImage contains alpha channel, then the options are: +---- generate 32-bit textures: backend::PixelFormat::RGBA8888 (default one) +---- generate 24-bit textures: backend::PixelFormat::RGB888 +---- generate 16-bit textures: backend::PixelFormat::RGBA4444 +---- generate 16-bit textures: backend::PixelFormat::RGB5A1 +---- generate 16-bit textures: backend::PixelFormat::RGB565 +---- generate 8-bit textures: backend::PixelFormat::A8 (only use it if you use just 1 color) +---How does it work ? +---- If the image is an RGBA (with Alpha) then the default pixel format will be used (it can be a 8-bit, 16-bit or 32-bit texture) +---- If the image is an RGB (without Alpha) then: If the default pixel format is RGBA8888 then a RGBA8888 (32-bit) will be used. Otherwise a RGB565 (16-bit texture) will be used. +---This parameter is not valid for PVR / PVR.CCZ images. +---\since v0.8 +function Texture2D.setDefaultAlphaPixelFormat(format) end + +---Sets max S. +---@param maxS number +function Texture2D:setMaxS(maxS) end + +---Sets max T. +---@param maxT number +function Texture2D:setMaxT(maxT) end + +---@param renderTarget boolean +function Texture2D:setRenderTarget(renderTarget) end + +---@param params ccb.SamplerDescriptor +function Texture2D:setTexParameters(params) end + +---Update with texture data. +--- +---@param data any # Specifies a pointer to the image data in memory. +---@param offsetX integer # Specifies a texel offset in the x direction within the texture array. +---@param offsetY integer # Specifies a texel offset in the y direction within the texture array. +---@param width integer # Specifies the width of the texture subimage. +---@param height integer # Specifies the height of the texture subimage. +---@return boolean +function Texture2D:updateWithData(data, offsetX, offsetY, width, height) end + +return Texture2D \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/Texture2D/PixelFormatInfo.lua b/addons/cclua/cocos2d/library/cc/Texture2D/PixelFormatInfo.lua new file mode 100644 index 00000000..29f06a48 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/Texture2D/PixelFormatInfo.lua @@ -0,0 +1,23 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.Texture2D.PixelFormatInfo + +--- +---@class cc.Texture2D.PixelFormatInfo +---@field alpha boolean +---@field bpp integer +---@field compressed boolean +local PixelFormatInfo = {} + +---@return any +function PixelFormatInfo:__gc() end + +---@return any +function PixelFormatInfo:__olua_move() end + +---@param aBpp integer +---@param aCompressed boolean +---@param anAlpha boolean +---@return cc.Texture2D.PixelFormatInfo +function PixelFormatInfo.new(aBpp, aCompressed, anAlpha) end + +return PixelFormatInfo \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/TextureAtlas.lua b/addons/cclua/cocos2d/library/cc/TextureAtlas.lua new file mode 100644 index 00000000..0c5f5d56 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/TextureAtlas.lua @@ -0,0 +1,145 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.TextureAtlas + +---\addtogroup _2d +---\{ +---@class cc.TextureAtlas : cc.Ref +---@field capacity integer Gets the quantity of quads that can be stored with the current texture atlas size. +---@field description string Get quads total amount. \js NA \lua NA +---@field dirty boolean Whether or not the array buffer of the VBO needs to be updated. +---@field indices olua.ushort +---@field texture cc.Texture2D Gets the texture of the texture atlas. +---@field totalQuads integer Gets the quantity of quads that are going to be drawn. +local TextureAtlas = {} + +---Creates a TextureAtlas with an filename and with an initial capacity for Quads. +---The TextureAtlas capacity can be increased in runtime. +---@param file string # The file path. +---@param capacity integer # Capacity for Quads. +---@return cc.TextureAtlas +function TextureAtlas.create(file, capacity) end + +---Creates a TextureAtlas with a previously initialized Texture2D object, and +---with an initial capacity for n Quads. +---The TextureAtlas capacity can be increased in runtime. +---@param texture cc.Texture2D # A texture2D object pointer. +---@param capacity integer # Capacity for Quads. +---@return cc.TextureAtlas +function TextureAtlas.createWithTexture(texture, capacity) end + +---Ensures that after a realloc quads are still empty. +---Used internally by ParticleBatchNode. +---\since 1.1 +---@param index integer +---@param amount integer +function TextureAtlas:fillWithEmptyQuadsFromIndex(index, amount) end + +---Gets the quantity of quads that can be stored with the current texture atlas size. +---@return integer +function TextureAtlas:getCapacity() end + +---Get quads total amount. +---\js NA +---\lua NA +---@return string +function TextureAtlas:getDescription() end + +---@return olua.ushort +function TextureAtlas:getIndices() end + +---Gets the texture of the texture atlas. +---@return cc.Texture2D +function TextureAtlas:getTexture() end + +---Gets the quantity of quads that are going to be drawn. +---@return integer +function TextureAtlas:getTotalQuads() end + +---Used internally by ParticleBatchNode. +---don't use this unless you know what you're doing. +---\since 1.1 +---@param amount integer +function TextureAtlas:increaseTotalQuadsWith(amount) end + +---Initializes a TextureAtlas with a filename and with a certain capacity for Quads. +---The TextureAtlas capacity can be increased in runtime. +--- +---\attention Do not reinitialize the TextureAtlas because it will leak memory (issue #706). +---@param file string # The file path. +---@param capacity integer # Capacity for Quads. +---@return boolean +function TextureAtlas:initWithFile(file, capacity) end + +---Initializes a TextureAtlas with a previously initialized Texture2D object, and +---with an initial capacity for Quads. +---The TextureAtlas capacity can be increased in runtime. +---\attention: Do not reinitialize the TextureAtlas because it will leak memory (issue #706). +---@param texture cc.Texture2D # A texture2D object pointer. +---@param capacity integer # Capacity for Quads. +---@return boolean +function TextureAtlas:initWithTexture(texture, capacity) end + +---Removes the quad that is located at a certain index and inserts it at a new index. +---This operation is faster than removing and inserting in a quad in 2 different steps. +---\since v0.7.2 +---@param fromIndex integer +---@param newIndex integer +function TextureAtlas:insertQuadFromIndex(fromIndex, newIndex) end + +---Whether or not the array buffer of the VBO needs to be updated. +---@return boolean +function TextureAtlas:isDirty() end + +---Moves an amount of quads from oldIndex at newIndex. +---\since v1.1 +---@param oldIndex integer +---@param amount integer +---@param newIndex integer +--- +---Moves quads from index till totalQuads to the newIndex. +---Used internally by ParticleBatchNode. +---This method doesn't enlarge the array if newIndex + quads to be moved > capacity. +---\since 1.1 +---@overload fun(self: cc.TextureAtlas, index: integer, newIndex: integer) +function TextureAtlas:moveQuadsFromIndex(oldIndex, amount, newIndex) end + +---\js ctor +---@return cc.TextureAtlas +function TextureAtlas.new() end + +---Removes all Quads. +---The TextureAtlas capacity remains untouched. No memory is freed. +---The total number of quads to be drawn will be 0. +---\since v0.7.2 +function TextureAtlas:removeAllQuads() end + +---Removes a quad at a given index number. +---The capacity remains the same, but the total number of quads to be drawn is reduced in 1. +---\since v0.7.2 +---@param index integer +function TextureAtlas:removeQuadAtIndex(index) end + +---Removes a amount of quads starting from index. +---\since 1.1 +---@param index integer +---@param amount integer +function TextureAtlas:removeQuadsAtIndex(index, amount) end + +---Resize the capacity of the TextureAtlas. +---The new capacity can be lower or higher than the current one. +---It returns true if the resize was successful. +---If it fails to resize the capacity it will return false with a new capacity of 0. +--- +---@param capacity integer # Capacity for Quads. +---@return boolean +function TextureAtlas:resizeCapacity(capacity) end + +---Specify if the array buffer of the VBO needs to be updated. +---@param bDirty boolean +function TextureAtlas:setDirty(bDirty) end + +---Sets the texture for the texture atlas. +---@param texture cc.Texture2D +function TextureAtlas:setTexture(texture) end + +return TextureAtlas \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/TextureCache.lua b/addons/cclua/cocos2d/library/cc/TextureCache.lua new file mode 100644 index 00000000..f7852139 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/TextureCache.lua @@ -0,0 +1,127 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.TextureCache + +---Singleton that handles the loading of textures. +---Once the texture is loaded, the next time it will return. +---A reference of the previously loaded texture reducing GPU & CPU memory. +---@class cc.TextureCache : cc.Ref +---@field cachedTextureInfo string Output to CCLOG the current contents of this TextureCache. This will attempt to calculate the size of each texture, and the total texture memory in use.

\since v1.0 +---@field description string \js NA \lua NA +---@field etC1AlphaFileSuffix string +local TextureCache = {} + +---Returns a Texture2D object given an filename. +---If the filename was not previously loaded, it will create a new Texture2D. +---Object and it will return it. It will use the filename as a key. +---Otherwise it will return a reference of a previously loaded image. +---Supported image extensions: .png, .bmp, .jpeg, .pvr. +---@param filepath string # The file path. +---@return cc.Texture2D +--- +---Returns a Texture2D object given an Image. +---If the image was not previously loaded, it will create a new Texture2D object and it will return it. +---Otherwise it will return a reference of a previously loaded image. +---\param key The "key" parameter will be used as the "key" for the cache. +---If "key" is nil, then a new texture will be created each time. +---@overload fun(self: cc.TextureCache, image: cc.Image, key: string): cc.Texture2D +function TextureCache:addImage(filepath) end + +---Returns a Texture2D object given a file image. +---If the file image was not previously loaded, it will create a new Texture2D object and it will return it. +---Otherwise it will load a texture in a new thread, and when the image is loaded, the callback will be called with the Texture2D as a parameter. +---The callback will be called from the main thread, so it is safe to create any cocos2d object from the callback. +---Supported image extensions: .png, .jpg +---@param filepath string # The file path. +---@param callback fun(arg1: cc.Texture2D) # A callback function would be invoked after the image is loaded. +---\since v0.8 +---@overload fun(self: cc.TextureCache, path: string, callback: fun(arg1: cc.Texture2D), callbackKey: string) +function TextureCache:addImageAsync(filepath, callback) end + +---Output to CCLOG the current contents of this TextureCache. +---This will attempt to calculate the size of each texture, and the total texture memory in use. +--- +---\since v1.0 +---@return string +function TextureCache:getCachedTextureInfo() end + +---\js NA +---\lua NA +---@return string +function TextureCache:getDescription() end + +---@return string +function TextureCache.getETC1AlphaFileSuffix() end + +---Get the file path of the texture +--- +---@param texture cc.Texture2D # A Texture2D object pointer. +--- +---@return string # The full path of the file. +function TextureCache:getTextureFilePath(texture) end + +---Returns an already created texture. Returns nil if the texture doesn't exist. +---@param key string # It's the related/absolute path of the file image. +---\since v0.99.5 +---@return cc.Texture2D +function TextureCache:getTextureForKey(key) end + +---\js ctor +---@return cc.TextureCache +function TextureCache.new() end + +---Reload texture from the image file. +---If the file image hasn't loaded before, load it. +---Otherwise the texture will be reloaded from the file image. +---@param fileName string # It's the related/absolute path of the file image. +---@return boolean # True if the reloading is succeed, otherwise return false. +function TextureCache:reloadTexture(fileName) end + +---Purges the dictionary of loaded textures. +---Call this method if you receive the "Memory Warning". +---In the short term: it will free some resources preventing your app from being killed. +---In the medium term: it will allocate more resources. +---In the long term: it will be the same. +function TextureCache:removeAllTextures() end + +---Deletes a texture from the cache given a texture. +---@param texture cc.Texture2D +function TextureCache:removeTexture(texture) end + +---Deletes a texture from the cache given a its key name. +---@param key string # It's the related/absolute path of the file image. +---\since v0.99.4 +function TextureCache:removeTextureForKey(key) end + +---Removes unused textures. +---Textures that have a retain count of 1 will be deleted. +---It is convenient to call this method after when starting a new Scene. +---\since v0.8 +function TextureCache:removeUnusedTextures() end + +---Reload texture from a new file. +---This function is mainly for editor, won't suggest use it in game for performance reason. +--- +---@param srcName string # Original texture file name. +---@param dstName string # New texture file name. +--- +---\since v3.10 +function TextureCache:renameTextureWithKey(srcName, dstName) end + +---@param suffix string +function TextureCache.setETC1AlphaFileSuffix(suffix) end + +---Unbind all bound image asynchronous load callbacks. +---\since v3.1 +function TextureCache:unbindAllImageAsync() end + +---Unbind a specified bound image asynchronous callback. +---In the case an object who was bound to an image asynchronous callback was destroyed before the callback is invoked, +---the object always need to unbind this callback manually. +---@param filename string # It's the related/absolute path of the file image. +---\since v3.1 +function TextureCache:unbindImageAsync(filename) end + +---Called by director, please do not called outside. +function TextureCache:waitForQuit() end + +return TextureCache \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/TextureCube.lua b/addons/cclua/cocos2d/library/cc/TextureCube.lua new file mode 100644 index 00000000..9a851738 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/TextureCube.lua @@ -0,0 +1,36 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.TextureCube + +---\addtogroup _3d +---\{ +---@class cc.TextureCube : cc.Ref +---@field backendTexture ccb.TextureBackend +local TextureCube = {} + +---create cube texture from 6 textures. +---@param positive_x string # texture for the right side of the texture cube face. +---@param negative_x string # texture for the up side of the texture cube face. +---@param positive_y string # texture for the top side of the texture cube face +---@param negative_y string # texture for the bottom side of the texture cube face +---@param positive_z string # texture for the forward side of the texture cube face. +---@param negative_z string # texture for the rear side of the texture cube face. +---@return cc.TextureCube # A new texture cube inited with given parameters. +function TextureCube.create(positive_x, negative_x, positive_y, negative_y, positive_z, negative_z) end + +---@return ccb.TextureBackend +function TextureCube:getBackendTexture() end + +---Constructor. +---@return cc.TextureCube +function TextureCube.new() end + +---reload texture cube after GLESContext reconstructed. +---@return boolean +function TextureCube:reloadTexture() end + +---Sets the min filter, mag filter, wrap s and wrap t texture parameters. +---If the texture size is NPOT (non power of 2), then in can only use GL_CLAMP_TO_EDGE in GL_TEXTURE_WRAP_{S,T}. +---@param arg1 ccb.SamplerDescriptor +function TextureCube:setTexParameters(arg1) end + +return TextureCube \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/TextureProtocol.lua b/addons/cclua/cocos2d/library/cc/TextureProtocol.lua new file mode 100644 index 00000000..5ad10821 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/TextureProtocol.lua @@ -0,0 +1,29 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.TextureProtocol + +---Node objects that uses a Texture2D to render the images. +---The texture can have a blending function. +---If the texture has alpha premultiplied the default blending function is: +---src=BlendFactor::ONE dst= BlendFactor::ONE_MINUS_SRC_ALPHA +---else +---src=BlendFactor::SRC_ALPHA dst= BlendFactor::ONE_MINUS_SRC_ALPHA +---But you can change the blending function at any time. +---@class cc.TextureProtocol : cc.BlendProtocol +---@field texture cc.Texture2D Returns the currently used texture

\return The texture that is currently being used. \js NA \lua NA +local TextureProtocol = {} + +---Returns the currently used texture +--- +---@return cc.Texture2D # The texture that is currently being used. +---\js NA +---\lua NA +function TextureProtocol:getTexture() end + +---Sets a new texture. It will be retained. +--- +---@param texture cc.Texture2D # A valid Texture2D object, which will be applied to this sprite object. +---\js NA +---\lua NA +function TextureProtocol:setTexture(texture) end + +return TextureProtocol \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/TileMapAtlas.lua b/addons/cclua/cocos2d/library/cc/TileMapAtlas.lua new file mode 100644 index 00000000..c075f905 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/TileMapAtlas.lua @@ -0,0 +1,68 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.TileMapAtlas + +---TileMapAtlas is a subclass of AtlasNode. +--- +---It knows how to render a map based of tiles. +---The tiles must be in a .PNG format while the map must be a .TGA file. +--- +---For more information regarding the format, please see this post: +---http://www.cocos2d-iphone.org/archives/27 +--- +---All features from AtlasNode are valid in TileMapAtlas +--- +---IMPORTANT: +---This class is deprecated. It is maintained for compatibility reasons only. +---You SHOULD not use this class. +---Instead, use the newer TMX file format: TMXTiledMap +---\js NA +---@class cc.TileMapAtlas : cc.AtlasNode +---@field tgaInfo cc.sImageTGA Query TGA image info. \return The TGA image info. +local TileMapAtlas = {} + +---creates a TileMap with a tile file (atlas) with a map file and the width and height of each tile in points. +---The tile file will be loaded using the TextureMgr. +---@param tile string +---@param mapFile string +---@param tileWidth integer +---@param tileHeight integer +---@return cc.TileMapAtlas +function TileMapAtlas.create(tile, mapFile, tileWidth, tileHeight) end + +---Query TGA image info. +---@return cc.sImageTGA # The TGA image info. +function TileMapAtlas:getTGAInfo() end + +---Returns a tile from position x,y. +---For the moment only channel R is used +---@param position cc.Vec2 +---@return any +function TileMapAtlas:getTileAt(position) end + +---initializes a TileMap with a tile file (atlas) with a map file and the width and height of each tile in points. +---The file will be loaded using the TextureMgr. +---@param tile string +---@param mapFile string +---@param tileWidth integer +---@param tileHeight integer +---@return boolean +function TileMapAtlas:initWithTileFile(tile, mapFile, tileWidth, tileHeight) end + +---\js ctor +---@return cc.TileMapAtlas +function TileMapAtlas.new() end + +---dealloc the map from memory +function TileMapAtlas:releaseMap() end + +---Set the TGA image info for TileMapAtlas +---@param TGAInfo cc.sImageTGA # The TGA info in sImageTGA. +function TileMapAtlas:setTGAInfo(TGAInfo) end + +---sets a tile at position x,y. +---For the moment only channel R is used +---@param tile any +---@param position cc.Vec2 +function TileMapAtlas:setTile(tile, position) end + +return TileMapAtlas \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/TiledGrid3D.lua b/addons/cclua/cocos2d/library/cc/TiledGrid3D.lua new file mode 100644 index 00000000..5d97c66a --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/TiledGrid3D.lua @@ -0,0 +1,37 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.TiledGrid3D + +---TiledGrid3D is a 3D grid implementation. It differs from Grid3D in that +---the tiles can be separated from the grid. +---@class cc.TiledGrid3D : cc.GridBase +local TiledGrid3D = {} + +---Create one Grid. +---@param gridSize cc.Size +---@return cc.TiledGrid3D +---@overload fun(gridSize: cc.Size, rect: cc.Rect): cc.TiledGrid3D +---@overload fun(gridSize: cc.Size, texture: cc.Texture2D, flipped: boolean): cc.TiledGrid3D +---@overload fun(gridSize: cc.Size, texture: cc.Texture2D, flipped: boolean, rect: cc.Rect): cc.TiledGrid3D +function TiledGrid3D.create(gridSize) end + +---Returns the original tile (untransformed) at the given position. +---\js NA +---\lua NA +---@param pos cc.Vec2 +---@return cc.Quad3 +function TiledGrid3D:getOriginalTile(pos) end + +---Returns the tile at the given position. +---\js NA +---\lua NA +---@param pos cc.Vec2 +---@return cc.Quad3 +function TiledGrid3D:getTile(pos) end + +---Sets a new tile. +---\lua NA +---@param pos cc.Vec2 +---@param coords cc.Quad3 +function TiledGrid3D:setTile(pos, coords) end + +return TiledGrid3D \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/TiledGrid3DAction.lua b/addons/cclua/cocos2d/library/cc/TiledGrid3DAction.lua new file mode 100644 index 00000000..5cbd2cf9 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/TiledGrid3DAction.lua @@ -0,0 +1,35 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.TiledGrid3DAction + +---Base class for TiledGrid3D actions. +---@class cc.TiledGrid3DAction : cc.GridAction +local TiledGrid3DAction = {} + +---Create the action with size and duration. +---@param duration number # The duration of the action. It's a value in seconds. +---@param gridSize cc.Size # Specify the grid size of the action. +---@return cc.TiledGrid3DAction # A pointer of TiledGrid3DAction. If creation failed, return nil. +---\lua NA +function TiledGrid3DAction.create(duration, gridSize) end + +---Get the non-transformed tile that belongs to a certain position of the grid. +---@param position cc.Vec2 # The position of the tile want to get. +---@return cc.Quad3 # A quadrilateral of the tile. +---\js originalTile +---\lua NA +function TiledGrid3DAction:getOriginalTile(position) end + +---Get the tile that belongs to a certain position of the grid. +---@param position cc.Vec2 # The position of the tile want to get. +---@return cc.Quad3 # A quadrilateral of the tile. +---\js tile +---\lua NA +function TiledGrid3DAction:getTile(position) end + +---Set a new tile to a certain position of the grid. +---@param position cc.Vec2 # The position of the tile. +---@param coords cc.Quad3 # The quadrilateral of the new tile. +---\lua NA +function TiledGrid3DAction:setTile(position, coords) end + +return TiledGrid3DAction \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/TintBy.lua b/addons/cclua/cocos2d/library/cc/TintBy.lua new file mode 100644 index 00000000..d8aeaf42 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/TintBy.lua @@ -0,0 +1,18 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.TintBy + +---\class TintBy +---Tints a Node that implements the NodeRGB protocol from current tint to a custom one. +---\since v0.7.2 +---@class cc.TintBy : cc.ActionInterval +local TintBy = {} + +---Creates an action with duration and color. +---@param duration number # Duration time, in seconds. +---@param deltaRed integer # Delta red color. +---@param deltaGreen integer # Delta green color. +---@param deltaBlue integer # Delta blue color. +---@return cc.TintBy # An autoreleased TintBy object. +function TintBy.create(duration, deltaRed, deltaGreen, deltaBlue) end + +return TintBy \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/TintTo.lua b/addons/cclua/cocos2d/library/cc/TintTo.lua new file mode 100644 index 00000000..f7d74d36 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/TintTo.lua @@ -0,0 +1,25 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.TintTo + +---\class TintTo +---Tints a Node that implements the NodeRGB protocol from current tint to a custom one. +---\warning This action doesn't support "reverse" +---\since v0.7.2 +---@class cc.TintTo : cc.ActionInterval +local TintTo = {} + +---Creates an action with duration and color. +---@param duration number # Duration time, in seconds. +---@param red integer # Red Color, from 0 to 255. +---@param green integer # Green Color, from 0 to 255. +---@param blue integer # Blue Color, from 0 to 255. +---@return cc.TintTo # An autoreleased TintTo object. +--- +---Creates an action with duration and color. +---\param duration Duration time, in seconds. +---\param color It's a Color3B type. +---\return An autoreleased TintTo object. +---@overload fun(duration: number, color: any): cc.TintTo +function TintTo.create(duration, red, green, blue) end + +return TintTo \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/ToggleVisibility.lua b/addons/cclua/cocos2d/library/cc/ToggleVisibility.lua new file mode 100644 index 00000000..5d1ae921 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/ToggleVisibility.lua @@ -0,0 +1,14 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.ToggleVisibility + +---\class ToggleVisibility +---Toggles the visibility of a node. +---@class cc.ToggleVisibility : cc.ActionInstant +local ToggleVisibility = {} + +---Allocates and initializes the action. +--- +---@return cc.ToggleVisibility # An autoreleased ToggleVisibility object. +function ToggleVisibility.create() end + +return ToggleVisibility \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/Touch.lua b/addons/cclua/cocos2d/library/cc/Touch.lua new file mode 100644 index 00000000..2343646b --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/Touch.lua @@ -0,0 +1,93 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.Touch + +---\class Touch +---Encapsulates the Touch information, such as touch point, id and so on, +---and provides the methods that commonly used. +---@class cc.Touch : cc.Ref +---@field currentForce number Returns the current touch force for 3d touch.

\return The current touch force for 3d touch. +---@field delta cc.Vec2 Returns the delta of 2 current touches locations in screen coordinates.

\return The delta of 2 current touches locations in screen coordinates. +---@field id integer Get touch id. \js getId \lua getId

\return The id of touch. +---@field location cc.Vec2 Returns the current touch location in OpenGL coordinates.

\return The current touch location in OpenGL coordinates. +---@field locationInView cc.Vec2 Returns the current touch location in screen coordinates.

\return The current touch location in screen coordinates. +---@field maxForce number Returns the maximum touch force for 3d touch.

\return The maximum touch force for 3d touch. +---@field previousLocation cc.Vec2 Returns the previous touch location in OpenGL coordinates.

\return The previous touch location in OpenGL coordinates. +---@field previousLocationInView cc.Vec2 Returns the previous touch location in screen coordinates.

\return The previous touch location in screen coordinates. +---@field startLocation cc.Vec2 Returns the start touch location in OpenGL coordinates.

\return The start touch location in OpenGL coordinates. +---@field startLocationInView cc.Vec2 Returns the start touch location in screen coordinates.

\return The start touch location in screen coordinates. +local Touch = {} + +---Returns the current touch force for 3d touch. +--- +---@return number # The current touch force for 3d touch. +function Touch:getCurrentForce() end + +---Returns the delta of 2 current touches locations in screen coordinates. +--- +---@return cc.Vec2 # The delta of 2 current touches locations in screen coordinates. +function Touch:getDelta() end + +---Get touch id. +---\js getId +---\lua getId +--- +---@return integer # The id of touch. +function Touch:getID() end + +---Returns the current touch location in OpenGL coordinates. +--- +---@return cc.Vec2 # The current touch location in OpenGL coordinates. +function Touch:getLocation() end + +---Returns the current touch location in screen coordinates. +--- +---@return cc.Vec2 # The current touch location in screen coordinates. +function Touch:getLocationInView() end + +---Returns the maximum touch force for 3d touch. +--- +---@return number # The maximum touch force for 3d touch. +function Touch:getMaxForce() end + +---Returns the previous touch location in OpenGL coordinates. +--- +---@return cc.Vec2 # The previous touch location in OpenGL coordinates. +function Touch:getPreviousLocation() end + +---Returns the previous touch location in screen coordinates. +--- +---@return cc.Vec2 # The previous touch location in screen coordinates. +function Touch:getPreviousLocationInView() end + +---Returns the start touch location in OpenGL coordinates. +--- +---@return cc.Vec2 # The start touch location in OpenGL coordinates. +function Touch:getStartLocation() end + +---Returns the start touch location in screen coordinates. +--- +---@return cc.Vec2 # The start touch location in screen coordinates. +function Touch:getStartLocationInView() end + +---Constructor. +---\js ctor +---@return cc.Touch +function Touch.new() end + +---Set the touch information. It always used to monitor touch event. +--- +---@param id integer # A given id +---@param x number # A given x coordinate. +---@param y number # A given y coordinate. +--- +---Set the touch information. It always used to monitor touch event. +--- +---\param id A given id +---\param x A given x coordinate. +---\param y A given y coordinate. +---\param force Current force for 3d touch. +---\param maxForce maximum possible force for 3d touch. +---@overload fun(self: cc.Touch, id: integer, x: number, y: number, force: number, maxForce: number) +function Touch:setTouchInfo(id, x, y) end + +return Touch \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/Touch/DispatchMode.lua b/addons/cclua/cocos2d/library/cc/Touch/DispatchMode.lua new file mode 100644 index 00000000..24a3c4e1 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/Touch/DispatchMode.lua @@ -0,0 +1,15 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.Touch.DispatchMode + +---@type cc.Touch.DispatchMode +local VALUE + +--- +---@enum cc.Touch.DispatchMode +local DispatchMode = { + ALL_AT_ONCE = 0, + ---All at once. + ONE_BY_ONE = 1, +} + +return DispatchMode \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/TransitionCrossFade.lua b/addons/cclua/cocos2d/library/cc/TransitionCrossFade.lua new file mode 100644 index 00000000..f028c7d0 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/TransitionCrossFade.lua @@ -0,0 +1,20 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.TransitionCrossFade + +---\class TransitionCrossFade +---TransitionCrossFade: +---Cross fades two scenes using the RenderTexture object. +---@class cc.TransitionCrossFade : cc.TransitionScene +local TransitionCrossFade = {} + +---Creates a transition with duration and incoming scene. +--- +---@param t number # Duration time, in seconds. +---@param scene cc.Scene # A given scene. +---@return cc.TransitionCrossFade # A autoreleased TransitionCrossFade object. +function TransitionCrossFade.create(t, scene) end + +---@return cc.TransitionCrossFade +function TransitionCrossFade.new() end + +return TransitionCrossFade \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/TransitionEaseScene.lua b/addons/cclua/cocos2d/library/cc/TransitionEaseScene.lua new file mode 100644 index 00000000..0dfdcafe --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/TransitionEaseScene.lua @@ -0,0 +1,24 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.TransitionEaseScene + +---\class TransitionEaseScene +---TransitionEaseScene can ease the actions of the scene protocol. +---\since v0.8.2 +---\js NA +---@class cc.TransitionEaseScene +local TransitionEaseScene = {} + +---@return any +function TransitionEaseScene:__gc() end + +---@return any +function TransitionEaseScene:__olua_move() end + +---Returns the Ease action that will be performed on a linear action. +---\since v0.8.2 +--- +---@param action cc.ActionInterval # A given interval action. +---@return cc.ActionInterval # The Ease action that will be performed on a linear action. +function TransitionEaseScene:easeActionWithAction(action) end + +return TransitionEaseScene \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/TransitionFade.lua b/addons/cclua/cocos2d/library/cc/TransitionFade.lua new file mode 100644 index 00000000..e751c69d --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/TransitionFade.lua @@ -0,0 +1,29 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.TransitionFade + +---\class TransitionFade +---TransitionFade: +---Fade out the outgoing scene and then fade in the incoming scene.''' +---@class cc.TransitionFade : cc.TransitionScene +local TransitionFade = {} + +---Creates the transition with a duration and with an RGB color +---Example: FadeTransition::create(2, scene, Color3B(255,0,0); // red color +--- +---@param duration number # Duration time, in seconds. +---@param scene cc.Scene # A given scene. +---@param color any # A given transition color. +---@return cc.TransitionFade # A autoreleased TransitionFade object. +--- +---Creates the transition with a duration. +--- +---\param duration Duration time, in seconds. +---\param scene A given scene. +---\return A autoreleased TransitionFade object. +---@overload fun(duration: number, scene: cc.Scene): cc.TransitionFade +function TransitionFade.create(duration, scene, color) end + +---@return cc.TransitionFade +function TransitionFade.new() end + +return TransitionFade \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/TransitionFadeBL.lua b/addons/cclua/cocos2d/library/cc/TransitionFadeBL.lua new file mode 100644 index 00000000..610dafd7 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/TransitionFadeBL.lua @@ -0,0 +1,20 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.TransitionFadeBL + +---\class TransitionFadeBL +---TransitionFadeBL: +---Fade the tiles of the outgoing scene from the top-right corner to the bottom-left corner. +---@class cc.TransitionFadeBL : cc.TransitionFadeTR +local TransitionFadeBL = {} + +---Creates a transition with duration and incoming scene. +--- +---@param t number # Duration time, in seconds. +---@param scene cc.Scene # A given scene. +---@return cc.TransitionFadeBL # A autoreleased TransitionFadeBL object. +function TransitionFadeBL.create(t, scene) end + +---@return cc.TransitionFadeBL +function TransitionFadeBL.new() end + +return TransitionFadeBL \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/TransitionFadeDown.lua b/addons/cclua/cocos2d/library/cc/TransitionFadeDown.lua new file mode 100644 index 00000000..e3de4c2f --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/TransitionFadeDown.lua @@ -0,0 +1,20 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.TransitionFadeDown + +---\class TransitionFadeDown +---TransitionFadeDown: +---Fade the tiles of the outgoing scene from the top to the bottom. +---@class cc.TransitionFadeDown : cc.TransitionFadeTR +local TransitionFadeDown = {} + +---Creates a transition with duration and incoming scene. +--- +---@param t number # Duration time, in seconds. +---@param scene cc.Scene # A given scene. +---@return cc.TransitionFadeDown # A autoreleased TransitionFadeDown object. +function TransitionFadeDown.create(t, scene) end + +---@return cc.TransitionFadeDown +function TransitionFadeDown.new() end + +return TransitionFadeDown \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/TransitionFadeTR.lua b/addons/cclua/cocos2d/library/cc/TransitionFadeTR.lua new file mode 100644 index 00000000..2345baea --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/TransitionFadeTR.lua @@ -0,0 +1,34 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.TransitionFadeTR + +---\class TransitionFadeTR +---TransitionFadeTR: +---Fade the tiles of the outgoing scene from the left-bottom corner the to top-right corner. +---@class cc.TransitionFadeTR : cc.TransitionScene +local TransitionFadeTR = {} + +---Returns the action that will be performed with size. +--- +---@param size cc.Size # A given size. +---@return cc.ActionInterval # The action that will be performed. +function TransitionFadeTR:actionWithSize(size) end + +---@param cls string +---@return any +function TransitionFadeTR:as(cls) end + +---Creates a transition with duration and incoming scene. +--- +---@param t number # Duration time, in seconds. +---@param scene cc.Scene # A given scene. +---@return cc.TransitionFadeTR # A autoreleased TransitionFadeTR object. +function TransitionFadeTR.create(t, scene) end + +---@param action cc.ActionInterval +---@return cc.ActionInterval +function TransitionFadeTR:easeActionWithAction(action) end + +---@return cc.TransitionFadeTR +function TransitionFadeTR.new() end + +return TransitionFadeTR \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/TransitionFadeUp.lua b/addons/cclua/cocos2d/library/cc/TransitionFadeUp.lua new file mode 100644 index 00000000..6e61cea5 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/TransitionFadeUp.lua @@ -0,0 +1,20 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.TransitionFadeUp + +---\class TransitionFadeUp +---TransitionFadeUp: +---Fade the tiles of the outgoing scene from the bottom to the top. +---@class cc.TransitionFadeUp : cc.TransitionFadeTR +local TransitionFadeUp = {} + +---Creates a transition with duration and incoming scene. +--- +---@param t number # Duration time, in seconds. +---@param scene cc.Scene # A given scene. +---@return cc.TransitionFadeUp # A autoreleased TransitionFadeUp object. +function TransitionFadeUp.create(t, scene) end + +---@return cc.TransitionFadeUp +function TransitionFadeUp.new() end + +return TransitionFadeUp \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/TransitionFlipAngular.lua b/addons/cclua/cocos2d/library/cc/TransitionFlipAngular.lua new file mode 100644 index 00000000..3b439fd4 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/TransitionFlipAngular.lua @@ -0,0 +1,29 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.TransitionFlipAngular + +---\class TransitionFlipAngular +---TransitionFlipAngular: +---Flips the screen half horizontally and half vertically. +---The front face is the outgoing scene and the back face is the incoming scene. +---@class cc.TransitionFlipAngular : cc.TransitionSceneOriented +local TransitionFlipAngular = {} + +---Creates a transition with duration, incoming scene and orientation. +--- +---@param t number # Duration time, in seconds. +---@param s cc.Scene # A given scene. +---@param o cc.TransitionScene.Orientation # A given orientation. +---@return cc.TransitionFlipAngular # A autoreleased TransitionFlipAngular object. +--- +---Creates a transition with duration and incoming scene. +--- +---\param t Duration time, in seconds. +---\param s A given scene. +---\return A autoreleased TransitionFlipAngular object. +---@overload fun(t: number, s: cc.Scene): cc.TransitionFlipAngular +function TransitionFlipAngular.create(t, s, o) end + +---@return cc.TransitionFlipAngular +function TransitionFlipAngular.new() end + +return TransitionFlipAngular \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/TransitionFlipX.lua b/addons/cclua/cocos2d/library/cc/TransitionFlipX.lua new file mode 100644 index 00000000..880c4d91 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/TransitionFlipX.lua @@ -0,0 +1,29 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.TransitionFlipX + +---\class TransitionFlipX +---TransitionFlipX: +---Flips the screen horizontally. +---The front face is the outgoing scene and the back face is the incoming scene. +---@class cc.TransitionFlipX : cc.TransitionSceneOriented +local TransitionFlipX = {} + +---Creates a transition with duration, incoming scene and orientation. +--- +---@param t number # Duration time, in seconds. +---@param s cc.Scene # A given scene. +---@param o cc.TransitionScene.Orientation # A given orientation. +---@return cc.TransitionFlipX # A autoreleased TransitionFlipX object. +--- +---Creates a transition with duration and incoming scene. +--- +---\param t Duration time, in seconds. +---\param s A given scene. +---\return A autoreleased TransitionFlipX object. +---@overload fun(t: number, s: cc.Scene): cc.TransitionFlipX +function TransitionFlipX.create(t, s, o) end + +---@return cc.TransitionFlipX +function TransitionFlipX.new() end + +return TransitionFlipX \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/TransitionFlipY.lua b/addons/cclua/cocos2d/library/cc/TransitionFlipY.lua new file mode 100644 index 00000000..56c9e103 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/TransitionFlipY.lua @@ -0,0 +1,29 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.TransitionFlipY + +---\class TransitionFlipY +---TransitionFlipY: +---Flips the screen vertically. +---The front face is the outgoing scene and the back face is the incoming scene. +---@class cc.TransitionFlipY : cc.TransitionSceneOriented +local TransitionFlipY = {} + +---Creates a transition with duration, incoming scene and orientation. +--- +---@param t number # Duration time, in seconds. +---@param s cc.Scene # A given scene. +---@param o cc.TransitionScene.Orientation # A given orientation. +---@return cc.TransitionFlipY # A autoreleased TransitionFlipY object. +--- +---Creates a transition with duration and incoming scene. +--- +---\param t Duration time, in seconds. +---\param s A given scene. +---\return A autoreleased TransitionFlipY object. +---@overload fun(t: number, s: cc.Scene): cc.TransitionFlipY +function TransitionFlipY.create(t, s, o) end + +---@return cc.TransitionFlipY +function TransitionFlipY.new() end + +return TransitionFlipY \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/TransitionJumpZoom.lua b/addons/cclua/cocos2d/library/cc/TransitionJumpZoom.lua new file mode 100644 index 00000000..2740676e --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/TransitionJumpZoom.lua @@ -0,0 +1,20 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.TransitionJumpZoom + +---\class TransitionJumpZoom +---TransitionJumpZoom: +---Zoom out and jump the outgoing scene, and then jump and zoom in the incoming +---@class cc.TransitionJumpZoom : cc.TransitionScene +local TransitionJumpZoom = {} + +---Creates a transition with duration and incoming scene. +--- +---@param t number # Duration time, in seconds. +---@param scene cc.Scene # A given scene. +---@return cc.TransitionJumpZoom # A autoreleased TransitionJumpZoom object. +function TransitionJumpZoom.create(t, scene) end + +---@return cc.TransitionJumpZoom +function TransitionJumpZoom.new() end + +return TransitionJumpZoom \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/TransitionMoveInB.lua b/addons/cclua/cocos2d/library/cc/TransitionMoveInB.lua new file mode 100644 index 00000000..6870e535 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/TransitionMoveInB.lua @@ -0,0 +1,20 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.TransitionMoveInB + +---\class TransitionMoveInB +---TransitionMoveInB: +---Move in from to the bottom the incoming scene. +---@class cc.TransitionMoveInB : cc.TransitionMoveInL +local TransitionMoveInB = {} + +---Creates a transition with duration and incoming scene. +--- +---@param t number # Duration time, in seconds. +---@param scene cc.Scene # A given scene. +---@return cc.TransitionMoveInB # A autoreleased TransitionMoveInB object. +function TransitionMoveInB.create(t, scene) end + +---@return cc.TransitionMoveInB +function TransitionMoveInB.new() end + +return TransitionMoveInB \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/TransitionMoveInL.lua b/addons/cclua/cocos2d/library/cc/TransitionMoveInL.lua new file mode 100644 index 00000000..858b8e22 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/TransitionMoveInL.lua @@ -0,0 +1,33 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.TransitionMoveInL + +---\class TransitionMoveInL +---TransitionMoveInL: +---Move in from to the left the incoming scene. +---@class cc.TransitionMoveInL : cc.TransitionScene +local TransitionMoveInL = {} + +---Returns the action that will be performed. +--- +---@return cc.ActionInterval # The action that will be performed. +function TransitionMoveInL:action() end + +---@param cls string +---@return any +function TransitionMoveInL:as(cls) end + +---Creates a transition with duration and incoming scene. +--- +---@param t number # Duration time, in seconds. +---@param scene cc.Scene # A given scene. +---@return cc.TransitionMoveInL # A autoreleased TransitionMoveInL object. +function TransitionMoveInL.create(t, scene) end + +---@param action cc.ActionInterval +---@return cc.ActionInterval +function TransitionMoveInL:easeActionWithAction(action) end + +---@return cc.TransitionMoveInL +function TransitionMoveInL.new() end + +return TransitionMoveInL \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/TransitionMoveInR.lua b/addons/cclua/cocos2d/library/cc/TransitionMoveInR.lua new file mode 100644 index 00000000..b9a4c485 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/TransitionMoveInR.lua @@ -0,0 +1,20 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.TransitionMoveInR + +---\class TransitionMoveInR +---TransitionMoveInR: +---Move in from to the right the incoming scene. +---@class cc.TransitionMoveInR : cc.TransitionMoveInL +local TransitionMoveInR = {} + +---Creates a transition with duration and incoming scene. +--- +---@param t number # Duration time, in seconds. +---@param scene cc.Scene # A given scene. +---@return cc.TransitionMoveInR # A autoreleased TransitionMoveInR object. +function TransitionMoveInR.create(t, scene) end + +---@return cc.TransitionMoveInR +function TransitionMoveInR.new() end + +return TransitionMoveInR \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/TransitionMoveInT.lua b/addons/cclua/cocos2d/library/cc/TransitionMoveInT.lua new file mode 100644 index 00000000..823e0624 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/TransitionMoveInT.lua @@ -0,0 +1,20 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.TransitionMoveInT + +---\class TransitionMoveInT +---TransitionMoveInT: +---Move in from to the top the incoming scene. +---@class cc.TransitionMoveInT : cc.TransitionMoveInL +local TransitionMoveInT = {} + +---Creates a transition with duration and incoming scene. +--- +---@param t number # Duration time, in seconds. +---@param scene cc.Scene # A given scene. +---@return cc.TransitionMoveInT # A autoreleased TransitionMoveInT object. +function TransitionMoveInT.create(t, scene) end + +---@return cc.TransitionMoveInT +function TransitionMoveInT.new() end + +return TransitionMoveInT \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/TransitionPageTurn.lua b/addons/cclua/cocos2d/library/cc/TransitionPageTurn.lua new file mode 100644 index 00000000..8410dbc1 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/TransitionPageTurn.lua @@ -0,0 +1,35 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.TransitionPageTurn + +---\class TransitionPageTurn +---A transition which peels back the bottom right hand corner of a scene +---to transition to the scene beneath it simulating a page turn. +--- +---This uses a 3DAction so it's strongly recommended that depth buffering +---is turned on in Director using: +---Director::getInstance()->setDepthBufferFormat(kDepthBuffer16); +---\since v0.8.2 +---@class cc.TransitionPageTurn : cc.TransitionScene +local TransitionPageTurn = {} + +---Returns the action that will be performed with size. +--- +---@param vector cc.Size # A given size. +---@return cc.ActionInterval # The action that will be performed. +function TransitionPageTurn:actionWithSize(vector) end + +---Creates a base transition with duration and incoming scene. +---If back is true then the effect is reversed to appear as if the incoming +---scene is being turned from left over the outgoing scene. +--- +---@param t number # Duration time, in seconds. +---@param scene cc.Scene # A given scene. +---@param backwards boolean # If back is true then the effect is reversed to appear as if the incoming scene is being turned from left over the outgoing scene. +---@return cc.TransitionPageTurn # An autoreleased TransitionPageTurn object. +function TransitionPageTurn.create(t, scene, backwards) end + +---\js ctor +---@return cc.TransitionPageTurn +function TransitionPageTurn.new() end + +return TransitionPageTurn \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/TransitionProgress.lua b/addons/cclua/cocos2d/library/cc/TransitionProgress.lua new file mode 100644 index 00000000..0abbfc48 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/TransitionProgress.lua @@ -0,0 +1,22 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.TransitionProgress + +---\addtogroup _2d +---\{ +--- +---\class TransitionProgress +---A base class of progress transition. +---@class cc.TransitionProgress : cc.TransitionScene +local TransitionProgress = {} + +---Creates a transition with duration and incoming scene. +--- +---@param t number # Duration time, in seconds. +---@param scene cc.Scene # A given scene. +---@return cc.TransitionProgress # An autoreleased TransitionProgress object. +function TransitionProgress.create(t, scene) end + +---@return cc.TransitionProgress +function TransitionProgress.new() end + +return TransitionProgress \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/TransitionProgressHorizontal.lua b/addons/cclua/cocos2d/library/cc/TransitionProgressHorizontal.lua new file mode 100644 index 00000000..33da94b4 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/TransitionProgressHorizontal.lua @@ -0,0 +1,21 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.TransitionProgressHorizontal + +---\class TransitionProgressHorizontal +---TransitionProgressHorizontal transition. +---A clock-wise radial transition to the next scene +---@class cc.TransitionProgressHorizontal : cc.TransitionProgress +local TransitionProgressHorizontal = {} + +---Creates a transition with duration and incoming scene. +--- +---@param t number # Duration time, in seconds. +---@param scene cc.Scene # A given scene. +---@return cc.TransitionProgressHorizontal # An autoreleased TransitionProgressHorizontal object. +function TransitionProgressHorizontal.create(t, scene) end + +---\js ctor +---@return cc.TransitionProgressHorizontal +function TransitionProgressHorizontal.new() end + +return TransitionProgressHorizontal \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/TransitionProgressInOut.lua b/addons/cclua/cocos2d/library/cc/TransitionProgressInOut.lua new file mode 100644 index 00000000..59da3941 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/TransitionProgressInOut.lua @@ -0,0 +1,20 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.TransitionProgressInOut + +---\class TransitionProgressInOut +---TransitionProgressInOut transition. +---@class cc.TransitionProgressInOut : cc.TransitionProgress +local TransitionProgressInOut = {} + +---Creates a transition with duration and incoming scene. +--- +---@param t number # Duration time, in seconds. +---@param scene cc.Scene # A given scene. +---@return cc.TransitionProgressInOut # An autoreleased TransitionProgressInOut object. +function TransitionProgressInOut.create(t, scene) end + +---\js ctor +---@return cc.TransitionProgressInOut +function TransitionProgressInOut.new() end + +return TransitionProgressInOut \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/TransitionProgressOutIn.lua b/addons/cclua/cocos2d/library/cc/TransitionProgressOutIn.lua new file mode 100644 index 00000000..ab2fa5f1 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/TransitionProgressOutIn.lua @@ -0,0 +1,20 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.TransitionProgressOutIn + +---\class TransitionProgressOutIn +---TransitionProgressOutIn transition. +---@class cc.TransitionProgressOutIn : cc.TransitionProgress +local TransitionProgressOutIn = {} + +---Creates a transition with duration and incoming scene. +--- +---@param t number # Duration time, in seconds. +---@param scene cc.Scene # A given scene. +---@return cc.TransitionProgressOutIn # An autoreleased TransitionProgressOutIn object. +function TransitionProgressOutIn.create(t, scene) end + +---\js ctor +---@return cc.TransitionProgressOutIn +function TransitionProgressOutIn.new() end + +return TransitionProgressOutIn \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/TransitionProgressRadialCCW.lua b/addons/cclua/cocos2d/library/cc/TransitionProgressRadialCCW.lua new file mode 100644 index 00000000..b9269d3e --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/TransitionProgressRadialCCW.lua @@ -0,0 +1,21 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.TransitionProgressRadialCCW + +---\class TransitionProgressRadialCCW +---TransitionRadialCCW transition. +---A counter clock-wise radial transition to the next scene +---@class cc.TransitionProgressRadialCCW : cc.TransitionProgress +local TransitionProgressRadialCCW = {} + +---Creates a transition with duration and incoming scene. +--- +---@param t number # Duration time, in seconds. +---@param scene cc.Scene # A given scene. +---@return cc.TransitionProgressRadialCCW # An autoreleased TransitionProgressRadialCCW object. +function TransitionProgressRadialCCW.create(t, scene) end + +---\js ctor +---@return cc.TransitionProgressRadialCCW +function TransitionProgressRadialCCW.new() end + +return TransitionProgressRadialCCW \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/TransitionProgressRadialCW.lua b/addons/cclua/cocos2d/library/cc/TransitionProgressRadialCW.lua new file mode 100644 index 00000000..4b419738 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/TransitionProgressRadialCW.lua @@ -0,0 +1,21 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.TransitionProgressRadialCW + +---\class TransitionProgressRadialCW +---TransitionRadialCW transition. +---A counter clock-wise radial transition to the next scene. +---@class cc.TransitionProgressRadialCW : cc.TransitionProgress +local TransitionProgressRadialCW = {} + +---Creates a transition with duration and incoming scene. +--- +---@param t number # Duration time, in seconds. +---@param scene cc.Scene # A given scene. +---@return cc.TransitionProgressRadialCW # An autoreleased TransitionProgressRadialCW object. +function TransitionProgressRadialCW.create(t, scene) end + +---\js ctor +---@return cc.TransitionProgressRadialCW +function TransitionProgressRadialCW.new() end + +return TransitionProgressRadialCW \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/TransitionProgressVertical.lua b/addons/cclua/cocos2d/library/cc/TransitionProgressVertical.lua new file mode 100644 index 00000000..063f0646 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/TransitionProgressVertical.lua @@ -0,0 +1,20 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.TransitionProgressVertical + +---\class TransitionProgressVertical +---TransitionProgressVertical transition. +---@class cc.TransitionProgressVertical : cc.TransitionProgress +local TransitionProgressVertical = {} + +---Creates a transition with duration and incoming scene. +--- +---@param t number # Duration time, in seconds. +---@param scene cc.Scene # A given scene. +---@return cc.TransitionProgressVertical # An autoreleased TransitionProgressVertical object. +function TransitionProgressVertical.create(t, scene) end + +---\js ctor +---@return cc.TransitionProgressVertical +function TransitionProgressVertical.new() end + +return TransitionProgressVertical \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/TransitionRotoZoom.lua b/addons/cclua/cocos2d/library/cc/TransitionRotoZoom.lua new file mode 100644 index 00000000..3821b036 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/TransitionRotoZoom.lua @@ -0,0 +1,20 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.TransitionRotoZoom + +---\class TransitionRotoZoom +---TransitionRotoZoom: +---Rotate and zoom out the outgoing scene, and then rotate and zoom in the incoming +---@class cc.TransitionRotoZoom : cc.TransitionScene +local TransitionRotoZoom = {} + +---Creates a transition with duration and incoming scene. +--- +---@param t number # Duration time, in seconds. +---@param scene cc.Scene # A given scene. +---@return cc.TransitionRotoZoom # A autoreleased TransitionRotoZoom object. +function TransitionRotoZoom.create(t, scene) end + +---@return cc.TransitionRotoZoom +function TransitionRotoZoom.new() end + +return TransitionRotoZoom \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/TransitionScene.lua b/addons/cclua/cocos2d/library/cc/TransitionScene.lua new file mode 100644 index 00000000..c48826dc --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/TransitionScene.lua @@ -0,0 +1,33 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.TransitionScene + +---\class TransitionScene +---Base class for Transition scenes. +---@class cc.TransitionScene : cc.Scene +---@field duration number +---@field inScene cc.Scene +local TransitionScene = {} + +---Creates a base transition with duration and incoming scene. +--- +---@param t number # Duration time, in seconds. +---@param scene cc.Scene # A given scene. +---@return cc.TransitionScene # A autoreleased TransitionScene object. +function TransitionScene.create(t, scene) end + +---Called after the transition finishes. +function TransitionScene:finish() end + +---@return number +function TransitionScene:getDuration() end + +---@return cc.Scene +function TransitionScene:getInScene() end + +---Used by some transitions to hide the outer scene. +function TransitionScene:hideOutShowIn() end + +---@return cc.TransitionScene +function TransitionScene.new() end + +return TransitionScene \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/TransitionScene/Orientation.lua b/addons/cclua/cocos2d/library/cc/TransitionScene/Orientation.lua new file mode 100644 index 00000000..2479286a --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/TransitionScene/Orientation.lua @@ -0,0 +1,20 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.TransitionScene.Orientation + +---@type cc.TransitionScene.Orientation +local VALUE + +--- +---@enum cc.TransitionScene.Orientation +local Orientation = { + ---A vertical orientation where the Bottom is nearer + DOWN_OVER = 1, + ---An horizontal orientation where the Left is nearer + LEFT_OVER = 0, + ---An horizontal orientation where the Right is nearer + RIGHT_OVER = 1, + ---A vertical orientation where the Up is nearer + UP_OVER = 0, +} + +return Orientation \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/TransitionSceneOriented.lua b/addons/cclua/cocos2d/library/cc/TransitionSceneOriented.lua new file mode 100644 index 00000000..6fedcb5b --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/TransitionSceneOriented.lua @@ -0,0 +1,21 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.TransitionSceneOriented + +---\class TransitionSceneOriented +---A Transition that supports orientation like. +---Possible orientation: LeftOver, RightOver, UpOver, DownOver +---@class cc.TransitionSceneOriented : cc.TransitionScene +local TransitionSceneOriented = {} + +---Creates a transition with duration, incoming scene and orientation. +--- +---@param t number # Duration time, in seconds. +---@param scene cc.Scene # A given scene. +---@param orientation cc.TransitionScene.Orientation # A given orientation: LeftOver, RightOver, UpOver, DownOver. +---@return cc.TransitionSceneOriented # A autoreleased TransitionSceneOriented object. +function TransitionSceneOriented.create(t, scene, orientation) end + +---@return cc.TransitionSceneOriented +function TransitionSceneOriented.new() end + +return TransitionSceneOriented \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/TransitionShrinkGrow.lua b/addons/cclua/cocos2d/library/cc/TransitionShrinkGrow.lua new file mode 100644 index 00000000..9e892c92 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/TransitionShrinkGrow.lua @@ -0,0 +1,27 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.TransitionShrinkGrow + +---\class TransitionShrinkGrow +---Shrink the outgoing scene while grow the incoming scene +---@class cc.TransitionShrinkGrow : cc.TransitionScene +local TransitionShrinkGrow = {} + +---@param cls string +---@return any +function TransitionShrinkGrow:as(cls) end + +---Creates a transition with duration and incoming scene. +--- +---@param t number # Duration time, in seconds. +---@param scene cc.Scene # A given scene. +---@return cc.TransitionShrinkGrow # A autoreleased TransitionShrinkGrow object. +function TransitionShrinkGrow.create(t, scene) end + +---@param action cc.ActionInterval +---@return cc.ActionInterval +function TransitionShrinkGrow:easeActionWithAction(action) end + +---@return cc.TransitionShrinkGrow +function TransitionShrinkGrow.new() end + +return TransitionShrinkGrow \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/TransitionSlideInB.lua b/addons/cclua/cocos2d/library/cc/TransitionSlideInB.lua new file mode 100644 index 00000000..1c171b52 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/TransitionSlideInB.lua @@ -0,0 +1,20 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.TransitionSlideInB + +---\class TransitionSlideInB +---TransitionSlideInB: +---Slide in the incoming scene from the bottom border. +---@class cc.TransitionSlideInB : cc.TransitionSlideInL +local TransitionSlideInB = {} + +---Creates a transition with duration and incoming scene. +--- +---@param t number # Duration time, in seconds. +---@param scene cc.Scene # A given scene. +---@return cc.TransitionSlideInB # A autoreleased TransitionSlideInB object. +function TransitionSlideInB.create(t, scene) end + +---@return cc.TransitionSlideInB +function TransitionSlideInB.new() end + +return TransitionSlideInB \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/TransitionSlideInL.lua b/addons/cclua/cocos2d/library/cc/TransitionSlideInL.lua new file mode 100644 index 00000000..e3575b4b --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/TransitionSlideInL.lua @@ -0,0 +1,33 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.TransitionSlideInL + +---\class TransitionSlideInL +---TransitionSlideInL: +---Slide in the incoming scene from the left border. +---@class cc.TransitionSlideInL : cc.TransitionScene +local TransitionSlideInL = {} + +---Returns the action that will be performed by the incoming and outgoing scene. +--- +---@return cc.ActionInterval # The action that will be performed by the incoming and outgoing scene. +function TransitionSlideInL:action() end + +---@param cls string +---@return any +function TransitionSlideInL:as(cls) end + +---Creates a transition with duration and incoming scene. +--- +---@param t number # Duration time, in seconds. +---@param scene cc.Scene # A given scene. +---@return cc.TransitionSlideInL # A autoreleased TransitionSlideInL object. +function TransitionSlideInL.create(t, scene) end + +---@param action cc.ActionInterval +---@return cc.ActionInterval +function TransitionSlideInL:easeActionWithAction(action) end + +---@return cc.TransitionSlideInL +function TransitionSlideInL.new() end + +return TransitionSlideInL \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/TransitionSlideInR.lua b/addons/cclua/cocos2d/library/cc/TransitionSlideInR.lua new file mode 100644 index 00000000..d7dc1c57 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/TransitionSlideInR.lua @@ -0,0 +1,20 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.TransitionSlideInR + +---\class TransitionSlideInR +---TransitionSlideInR: +---Slide in the incoming scene from the right border. +---@class cc.TransitionSlideInR : cc.TransitionSlideInL +local TransitionSlideInR = {} + +---Creates a transition with duration and incoming scene. +--- +---@param t number # Duration time, in seconds. +---@param scene cc.Scene # A given scene. +---@return cc.TransitionSlideInR # A autoreleased TransitionSlideInR object. +function TransitionSlideInR.create(t, scene) end + +---@return cc.TransitionSlideInR +function TransitionSlideInR.new() end + +return TransitionSlideInR \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/TransitionSlideInT.lua b/addons/cclua/cocos2d/library/cc/TransitionSlideInT.lua new file mode 100644 index 00000000..495d9c6e --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/TransitionSlideInT.lua @@ -0,0 +1,20 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.TransitionSlideInT + +---\class TransitionSlideInT +---TransitionSlideInT: +---Slide in the incoming scene from the top border. +---@class cc.TransitionSlideInT : cc.TransitionSlideInL +local TransitionSlideInT = {} + +---Creates a transition with duration and incoming scene. +--- +---@param t number # Duration time, in seconds. +---@param scene cc.Scene # A given scene. +---@return cc.TransitionSlideInT # A autoreleased TransitionSlideInT object. +function TransitionSlideInT.create(t, scene) end + +---@return cc.TransitionSlideInT +function TransitionSlideInT.new() end + +return TransitionSlideInT \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/TransitionSplitCols.lua b/addons/cclua/cocos2d/library/cc/TransitionSplitCols.lua new file mode 100644 index 00000000..637d2f5e --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/TransitionSplitCols.lua @@ -0,0 +1,33 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.TransitionSplitCols + +---\class TransitionSplitCols +---TransitionSplitCols: +---The odd columns goes upwards while the even columns goes downwards. +---@class cc.TransitionSplitCols : cc.TransitionScene +local TransitionSplitCols = {} + +---Returns the action that will be performed. +--- +---@return cc.ActionInterval # The action that will be performed. +function TransitionSplitCols:action() end + +---@param cls string +---@return any +function TransitionSplitCols:as(cls) end + +---Creates a transition with duration and incoming scene. +--- +---@param t number # Duration time, in seconds. +---@param scene cc.Scene # A given scene. +---@return cc.TransitionSplitCols # A autoreleased TransitionSplitCols object. +function TransitionSplitCols.create(t, scene) end + +---@param action cc.ActionInterval +---@return cc.ActionInterval +function TransitionSplitCols:easeActionWithAction(action) end + +---@return cc.TransitionSplitCols +function TransitionSplitCols.new() end + +return TransitionSplitCols \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/TransitionSplitRows.lua b/addons/cclua/cocos2d/library/cc/TransitionSplitRows.lua new file mode 100644 index 00000000..85848627 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/TransitionSplitRows.lua @@ -0,0 +1,20 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.TransitionSplitRows + +---\class TransitionSplitRows +---TransitionSplitRows: +---The odd rows goes to the left while the even rows goes to the right. +---@class cc.TransitionSplitRows : cc.TransitionSplitCols +local TransitionSplitRows = {} + +---Creates a transition with duration and incoming scene. +--- +---@param t number # Duration time, in seconds. +---@param scene cc.Scene # A given scene. +---@return cc.TransitionSplitRows # A autoreleased TransitionSplitRows object. +function TransitionSplitRows.create(t, scene) end + +---@return cc.TransitionSplitRows +function TransitionSplitRows.new() end + +return TransitionSplitRows \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/TransitionTurnOffTiles.lua b/addons/cclua/cocos2d/library/cc/TransitionTurnOffTiles.lua new file mode 100644 index 00000000..fbfcaf15 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/TransitionTurnOffTiles.lua @@ -0,0 +1,28 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.TransitionTurnOffTiles + +---\class TransitionTurnOffTiles +---TransitionTurnOffTiles: +---Turn off the tiles of the outgoing scene in random order +---@class cc.TransitionTurnOffTiles : cc.TransitionScene +local TransitionTurnOffTiles = {} + +---@param cls string +---@return any +function TransitionTurnOffTiles:as(cls) end + +---Creates a transition with duration and incoming scene. +--- +---@param t number # Duration time, in seconds. +---@param scene cc.Scene # A given scene. +---@return cc.TransitionTurnOffTiles # A autoreleased TransitionTurnOffTiles object. +function TransitionTurnOffTiles.create(t, scene) end + +---@param action cc.ActionInterval +---@return cc.ActionInterval +function TransitionTurnOffTiles:easeActionWithAction(action) end + +---@return cc.TransitionTurnOffTiles +function TransitionTurnOffTiles.new() end + +return TransitionTurnOffTiles \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/TransitionZoomFlipAngular.lua b/addons/cclua/cocos2d/library/cc/TransitionZoomFlipAngular.lua new file mode 100644 index 00000000..99fec881 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/TransitionZoomFlipAngular.lua @@ -0,0 +1,29 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.TransitionZoomFlipAngular + +---\class TransitionZoomFlipAngular +---TransitionZoomFlipAngular: +---Flips the screen half horizontally and half vertically doing a little zooming out/in. +---The front face is the outgoing scene and the back face is the incoming scene. +---@class cc.TransitionZoomFlipAngular : cc.TransitionSceneOriented +local TransitionZoomFlipAngular = {} + +---Creates a transition with duration, incoming scene and orientation. +--- +---@param t number # Duration time, in seconds. +---@param s cc.Scene # A given scene. +---@param o cc.TransitionScene.Orientation # A given orientation. +---@return cc.TransitionZoomFlipAngular # A autoreleased TransitionZoomFlipAngular object. +--- +---Creates a transition with duration and incoming scene. +--- +---\param t Duration time, in seconds. +---\param s A given scene. +---\return A autoreleased TransitionZoomFlipAngular object. +---@overload fun(t: number, s: cc.Scene): cc.TransitionZoomFlipAngular +function TransitionZoomFlipAngular.create(t, s, o) end + +---@return cc.TransitionZoomFlipAngular +function TransitionZoomFlipAngular.new() end + +return TransitionZoomFlipAngular \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/TransitionZoomFlipX.lua b/addons/cclua/cocos2d/library/cc/TransitionZoomFlipX.lua new file mode 100644 index 00000000..118ae5b0 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/TransitionZoomFlipX.lua @@ -0,0 +1,29 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.TransitionZoomFlipX + +---\class TransitionZoomFlipX +---TransitionZoomFlipX: +---Flips the screen horizontally doing a zoom out/in +---The front face is the outgoing scene and the back face is the incoming scene. +---@class cc.TransitionZoomFlipX : cc.TransitionSceneOriented +local TransitionZoomFlipX = {} + +---Creates a transition with duration, incoming scene and orientation. +--- +---@param t number # Duration time, in seconds. +---@param s cc.Scene # A given scene. +---@param o cc.TransitionScene.Orientation # A given orientation. +---@return cc.TransitionZoomFlipX # A autoreleased TransitionZoomFlipX object. +--- +---Creates a transition with duration and incoming scene. +--- +---\param t Duration time, in seconds. +---\param s A given scene. +---\return A autoreleased TransitionZoomFlipX object. +---@overload fun(t: number, s: cc.Scene): cc.TransitionZoomFlipX +function TransitionZoomFlipX.create(t, s, o) end + +---@return cc.TransitionZoomFlipX +function TransitionZoomFlipX.new() end + +return TransitionZoomFlipX \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/TransitionZoomFlipY.lua b/addons/cclua/cocos2d/library/cc/TransitionZoomFlipY.lua new file mode 100644 index 00000000..14ab7885 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/TransitionZoomFlipY.lua @@ -0,0 +1,29 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.TransitionZoomFlipY + +---\class TransitionZoomFlipY +---TransitionZoomFlipY: +---Flips the screen vertically doing a little zooming out/in +---The front face is the outgoing scene and the back face is the incoming scene. +---@class cc.TransitionZoomFlipY : cc.TransitionSceneOriented +local TransitionZoomFlipY = {} + +---Creates a transition with duration, incoming scene and orientation. +--- +---@param t number # Duration time, in seconds. +---@param s cc.Scene # A given scene. +---@param o cc.TransitionScene.Orientation # A given orientation. +---@return cc.TransitionZoomFlipY # A autoreleased TransitionZoomFlipY object. +--- +---Creates a transition with duration and incoming scene. +--- +---\param t Duration time, in seconds. +---\param s A given scene. +---\return A autoreleased TransitionZoomFlipY object. +---@overload fun(t: number, s: cc.Scene): cc.TransitionZoomFlipY +function TransitionZoomFlipY.create(t, s, o) end + +---@return cc.TransitionZoomFlipY +function TransitionZoomFlipY.new() end + +return TransitionZoomFlipY \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/TurnOffTiles.lua b/addons/cclua/cocos2d/library/cc/TurnOffTiles.lua new file mode 100644 index 00000000..9fcd4bc9 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/TurnOffTiles.lua @@ -0,0 +1,35 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.TurnOffTiles + +---TurnOffTiles action. +---\details Turn off the target node with many tiles in random order. +---@class cc.TurnOffTiles : cc.TiledGrid3DAction +local TurnOffTiles = {} + +---Create the action with the grid size and the duration. +---@param duration number # Specify the duration of the TurnOffTiles action. It's a value in seconds. +---@param gridSize cc.Size # Specify the size of the grid. +---@return cc.TurnOffTiles # If the creation success, return a pointer of TurnOffTiles action; otherwise, return nil. +--- +---Create the action with the grid size and the duration. +---\param duration Specify the duration of the TurnOffTiles action. It's a value in seconds. +---\param gridSize Specify the size of the grid. +---\param seed Specify the random seed. +---\return If the creation success, return a pointer of TurnOffTiles action; otherwise, return nil. +---@overload fun(duration: number, gridSize: cc.Size, seed: integer): cc.TurnOffTiles +function TurnOffTiles.create(duration, gridSize) end + +---Shuffle the array specified. +---@param array olua.uint # The array will be shuffled. +---@param len integer # The size of the array. +function TurnOffTiles:shuffle(array, len) end + +---Hide the tile at specified position. +---@param pos cc.Vec2 # The position index of the tile should be hide. +function TurnOffTiles:turnOffTile(pos) end + +---Show the tile at specified position. +---@param pos cc.Vec2 # The position index of the tile should be shown. +function TurnOffTiles:turnOnTile(pos) end + +return TurnOffTiles \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/Twirl.lua b/addons/cclua/cocos2d/library/cc/Twirl.lua new file mode 100644 index 00000000..0a7b5f84 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/Twirl.lua @@ -0,0 +1,38 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.Twirl + +---Twirl action. +---\details This action is used for take effect on the target node as twirl. +---You can control the effect by these parameters: +---duration, grid size, center position, twirls count, amplitude. +---@class cc.Twirl : cc.Grid3DAction +---@field amplitude number Get the amplitude of the effect. \return Return the amplitude of the effect. +---@field position cc.Vec2 Get the center position of twirl action. \return The center position of twirl action. +local Twirl = {} + +---Create the action with center position, number of twirls, amplitude, a grid size and duration. +---@param duration number # Specify the duration of the Twirl action. It's a value in seconds. +---@param gridSize cc.Size # Specify the size of the grid. +---@param position cc.Vec2 # Specify the center position of the twirl action. +---@param twirls integer # Specify the twirls count of the Twirl action. +---@param amplitude number # Specify the amplitude of the Twirl action. +---@return cc.Twirl # If the creation success, return a pointer of Twirl action; otherwise, return nil. +function Twirl.create(duration, gridSize, position, twirls, amplitude) end + +---Get the amplitude of the effect. +---@return number # Return the amplitude of the effect. +function Twirl:getAmplitude() end + +---Get the center position of twirl action. +---@return cc.Vec2 # The center position of twirl action. +function Twirl:getPosition() end + +---Set the amplitude to the effect. +---@param amplitude number # The value of amplitude will be set. +function Twirl:setAmplitude(amplitude) end + +---Set the center position of twirl action. +---@param position cc.Vec2 # The center position of twirl action will be set. +function Twirl:setPosition(position) end + +return Twirl \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/Uniformkey.lua b/addons/cclua/cocos2d/library/cc/Uniformkey.lua new file mode 100644 index 00000000..c2bba756 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/Uniformkey.lua @@ -0,0 +1,42 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.Uniformkey + +---@type cc.Uniformkey +local VALUE + +--- +---@enum cc.Uniformkey +local Uniformkey = { + ---Ambient color. + UNIFORM_AMBIENT_COLOR = 0, + ---cos(Time). + UNIFORM_COS_TIME = 9, + ---\} + UNIFORM_MAX = 15, + ---MultiView Model view projection matrix. + UNIFORM_MULTIVIEW_MVP_MATRIX = 5, + ---MultiView Projection matrix. + UNIFORM_MULTIVIEW_P_MATRIX = 2, + ---Model view projection matrix. + UNIFORM_MVP_MATRIX = 4, + ---Model view matrix. + UNIFORM_MV_MATRIX = 3, + ---Normal matrix. + UNIFORM_NORMAL_MATRIX = 6, + ---Projection matrix. + UNIFORM_P_MATRIX = 1, + ---Random number. + UNIFORM_RANDOM01 = 10, + ---\{ + ---Sampler 0-3, used for texture. + UNIFORM_SAMPLER0 = 11, + UNIFORM_SAMPLER1 = 12, + UNIFORM_SAMPLER2 = 13, + UNIFORM_SAMPLER3 = 14, + ---sin(Time). + UNIFORM_SIN_TIME = 8, + ---Time. + UNIFORM_TIME = 7, +} + +return Uniformkey \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/UserDefault.lua b/addons/cclua/cocos2d/library/cc/UserDefault.lua new file mode 100644 index 00000000..c38f7534 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/UserDefault.lua @@ -0,0 +1,165 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.UserDefault + +---UserDefault acts as a tiny database. You can save and get base type values by it. +---For example, setBoolForKey("played", true) will add a bool value true into the database. +---Its key is "played". You can get the value of the key by getBoolForKey("played"). +--- +---It supports the following base types: +---bool, int, float, double, string +--- +---\warning: On windows, linux, use XML to store data, which means there are some limitations of +---the key string, for example, `/` is not valid. +---@class cc.UserDefault +---@field instance cc.UserDefault Returns the singleton. \js NA \lua NA +---@field xmlFileExist boolean All supported platforms other iOS & Android use xml file to save values. This function checks whether the xml file exists or not. \return True if the xml file exists, false if not. \js NA +---@field xmlFilePath string All supported platforms other iOS & Android use xml file to save values. This function is return the file path of the xml path. \js NA +local UserDefault = {} + +---@return any +function UserDefault:__olua_move() end + +---delete any value by key, +---@param key string # The key to delete value. +---\js NA +function UserDefault:deleteValueForKey(key) end + +---\js NA +function UserDefault.destroyInstance() end + +---You should invoke this function to save values set by setXXXForKey(). +---\js NA +function UserDefault:flush() end + +---Get bool value by key, if the key doesn't exist, will return false. +---You can set the default value, or it is false. +---@param key string # The key to get value. +---@return boolean # Bool value by `key`. +---\js NA +--- +---Get bool value by key, if the key doesn't exist, will return passed default value. +---\param key The key to get value. +---\param defaultValue The default value to return if the key doesn't exist. +---\js NA +---@overload fun(self: cc.UserDefault, key: string, defaultValue: boolean): boolean +function UserDefault:getBoolForKey(key) end + +---Get Data value by key, if the key doesn't exist, will return an empty Data. +---@param key string # The key to get value. +---@return any # Data value of the key. +---\js NA +--- +---Get Data value by key, if the key doesn't exist, will return an empty Data. +---\param key The key to get value. +---\param defaultValue The default value to return if the key doesn't exist. +---\return Data value of the key. +---\js NA +---@overload fun(self: cc.UserDefault, key: string, defaultValue: any): any +function UserDefault:getDataForKey(key) end + +---Get double value by key, if the key doesn't exist, will return 0.0. +---@param key string # The key to get value. +---@return number # Double value of the key. +---\js NA +--- +---Get double value by key, if the key doesn't exist, will return passed default value. +---\param key The key to get value. +---\param defaultValue The default value to return if the key doesn't exist. +---\return Double value of the key. +---\js NA +---@overload fun(self: cc.UserDefault, key: string, defaultValue: number): number +function UserDefault:getDoubleForKey(key) end + +---Get float value by key, if the key doesn't exist, will return 0.0. +---@param key string # The key to get value. +---@return number # Float value of the key. +---\js NA +--- +---Get float value by key, if the key doesn't exist, will return passed default value. +---\param key The key to get value. +---\param defaultValue The default value to return if the key doesn't exist. +---\return Float value of the key. +---\js NA +---@overload fun(self: cc.UserDefault, key: string, defaultValue: number): number +function UserDefault:getFloatForKey(key) end + +---Returns the singleton. +---\js NA +---\lua NA +---@return cc.UserDefault +function UserDefault.getInstance() end + +---Get integer value by key, if the key doesn't exist, will return 0. +---You can set the default value, or it is 0. +---@param key string # The key to get value. +---@return integer # Integer value of the key. +---\js NA +--- +---Get bool value by key, if the key doesn't exist, will return passed default value. +---\param key The key to get value. +---\param defaultValue The default value to return if the key doesn't exist. +---\return Integer value of the key. +---\js NA +---@overload fun(self: cc.UserDefault, key: string, defaultValue: integer): integer +function UserDefault:getIntegerForKey(key) end + +---Get string value by key, if the key doesn't exist, will return an empty string. +---@param key string # The key to get value. +---@return string # String value of the key. +---\js NA +--- +---Get string value by key, if the key doesn't exist, will return passed default value. +---\param key The key to get value. +---\param defaultValue The default value to return if the key doesn't exist. +---\return String value of the key. +---\js NA +---@overload fun(self: cc.UserDefault, key: string, defaultValue: string): string +function UserDefault:getStringForKey(key) end + +---All supported platforms other iOS & Android use xml file to save values. This function is return the file path of the xml path. +---\js NA +---@return string +function UserDefault.getXMLFilePath() end + +---All supported platforms other iOS & Android use xml file to save values. This function checks whether the xml file exists or not. +---@return boolean # True if the xml file exists, false if not. +---\js NA +function UserDefault.isXMLFileExist() end + +---Set bool value by key. +---@param key string # The key to set. +---@param value boolean # A bool value to set to the key. +---\js NA +function UserDefault:setBoolForKey(key, value) end + +---Set Data value by key. +---@param key string # The key to set. +---@param value any # A Data value to set to the key. +---\js NA +function UserDefault:setDataForKey(key, value) end + +---Set double value by key. +---@param key string # The key to set. +---@param value number # A double value to set to the key. +---\js NA +function UserDefault:setDoubleForKey(key, value) end + +---Set float value by key. +---@param key string # The key to set. +---@param value number # A float value to set to the key. +---\js NA +function UserDefault:setFloatForKey(key, value) end + +---Set integer value by key. +---@param key string # The key to set. +---@param value integer # A integer value to set to the key. +---\js NA +function UserDefault:setIntegerForKey(key, value) end + +---Set string value by key. +---@param key string # The key to set. +---@param value string # A string value to set to the key. +---\js NA +function UserDefault:setStringForKey(key, value) end + +return UserDefault \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/ValueMap.lua b/addons/cclua/cocos2d/library/cc/ValueMap.lua new file mode 100644 index 00000000..5f35175d --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/ValueMap.lua @@ -0,0 +1,55 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.ValueMap + +--- +---@class cc.ValueMap +---@field length integer +---@field rawdata any +---@field sizeof integer +---@field value any +local ValueMap = {} + + +---@return any +function ValueMap:__gc() end + +---@param idx integer +---@return any +function ValueMap:__index(idx) end + +---@param idx integer +---@param v any +function ValueMap:__newindex(idx, v) end + +---@return any +function ValueMap:__olua_move() end + +---@param data string +---@param len integer +function ValueMap:assign(data, len) end + +---@param len integer +---@return cc.ValueMap +---@overload fun(): cc.ValueMap +function ValueMap.new(len) end + +---@param from integer +---@param to integer +---@return cc.ValueMap +---@overload fun(self: cc.ValueMap, from: integer): cc.ValueMap +function ValueMap:slice(from, to) end + +---@param from integer +---@param to integer +---@return cc.ValueMap +---@overload fun(self: cc.ValueMap, from: integer): cc.ValueMap +function ValueMap:sub(from, to) end + +---@return cc.ValueMap +function ValueMap:take() end + +---@param len integer +---@return any +function ValueMap:tostring(len) end + +return ValueMap \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/Vec2.lua b/addons/cclua/cocos2d/library/cc/Vec2.lua new file mode 100644 index 00000000..c4507263 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/Vec2.lua @@ -0,0 +1,483 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.Vec2 + +---Defines a 2-element floating point vector. +---@class cc.Vec2 +---@field lengthSq number Calculates the square length of a Vec2 (not calling sqrt() ) \return float \since v2.1.4 \js NA \lua NA +---@field normalized cc.Vec2 Get the normalized vector. +---@field one boolean Indicates whether this vector contains all ones.

\return true if this vector contains all ones, false otherwise. +---@field perp cc.Vec2 Calculates perpendicular of v, rotated 90 degrees counter-clockwise -- cross(v, perp(v)) >= 0 \return Vec2 \since v2.1.4 \js NA \lua NA +---@field rPerp cc.Vec2 Calculates perpendicular of v, rotated 90 degrees clockwise -- cross(v, rperp(v)) <= 0 \return Vec2 \since v2.1.4 \js NA \lua NA +---@field zero boolean Indicates whether this vector contains all zeros.

\return true if this vector contains all zeros, false otherwise. +---@field x number +---@field y number +---@field ANCHOR_BOTTOM_LEFT cc.Vec2 +---@field ANCHOR_BOTTOM_RIGHT cc.Vec2 +---@field ANCHOR_MIDDLE cc.Vec2 +---@field ANCHOR_MIDDLE_BOTTOM cc.Vec2 +---@field ANCHOR_MIDDLE_LEFT cc.Vec2 +---@field ANCHOR_MIDDLE_RIGHT cc.Vec2 +---@field ANCHOR_MIDDLE_TOP cc.Vec2 +---@field ANCHOR_TOP_LEFT cc.Vec2 +---@field ANCHOR_TOP_RIGHT cc.Vec2 +---@field ONE cc.Vec2 +---@field UNIT_X cc.Vec2 +---@field UNIT_Y cc.Vec2 +---@field ZERO cc.Vec2 +local Vec2 = {} + +---@return any +function Vec2:__gc() end + +---@return any +function Vec2:__olua_move() end + +---Adds the elements of the specified vector to this one. +--- +---@param v cc.Vec2 # The vector to add. +--- +---Adds the specified vectors and stores the result in dst. +--- +---\param v1 The first vector. +---\param v2 The second vector. +---\param dst A vector to store the result in. +---@overload fun(v1: cc.Vec2, v2: cc.Vec2, dst: cc.Vec2) +function Vec2:add(v) end + +---Returns the angle (in radians) between the specified vectors. +--- +---@param v1 cc.Vec2 # The first vector. +---@param v2 cc.Vec2 # The second vector. +--- +---@return number # The angle between the two vectors (in radians). +function Vec2.angle(v1, v2) end + +---Clamps this vector within the specified range. +--- +---@param min cc.Vec2 # The minimum value. +---@param max cc.Vec2 # The maximum value. +--- +---Clamps the specified vector within the specified range and returns it in dst. +--- +---\param v The vector to clamp. +---\param min The minimum value. +---\param max The maximum value. +---\param dst A vector to store the result in. +---@overload fun(v: cc.Vec2, min: cc.Vec2, max: cc.Vec2, dst: cc.Vec2) +function Vec2:clamp(min, max) end + +---Run a math operation function on each point component +---absf, floorf, ceilf, roundf +---any function that has the signature: float func(float); +---For example: let's try to take the floor of x,y +---p.compOp(floorf); +---\since v3.0 +---\js NA +---\lua NA +---@param function_ fun(arg1: number): number +---@return cc.Vec2 +function Vec2:compOp(function_) end + +---Calculates cross product of two points. +---@return number # float +---\since v2.1.4 +---\js NA +---\lua NA +---@param other cc.Vec2 +function Vec2:cross(other) end + +---Returns the distance between this vector and v. +--- +---@param v cc.Vec2 # The other vector. +--- +---@return number # The distance between this vector and v. +--- +---\see distanceSquared +function Vec2:distance(v) end + +---Returns the squared distance between this vector and v. +--- +---When it is not necessary to get the exact distance between +---two vectors (for example, when simply comparing the +---distance between different vectors), it is advised to use +---this method instead of distance. +--- +---@param v cc.Vec2 # The other vector. +--- +---@return number # The squared distance between this vector and v. +--- +---\see distance +function Vec2:distanceSquared(v) end + +---Returns the dot product of this vector and the specified vector. +--- +---@param v cc.Vec2 # The vector to compute the dot product with. +--- +---@return number # The dot product. +--- +---Returns the dot product between the specified vectors. +--- +---\param v1 The first vector. +---\param v2 The second vector. +--- +---\return The dot product between the vectors. +---@overload fun(v1: cc.Vec2, v2: cc.Vec2): number +function Vec2:dot(v) end + +---\js NA +---@param target cc.Vec2 +---@return boolean +function Vec2:equals(target) end + +---\js NA +---\lua NA +---@param a number +---@return cc.Vec2 +function Vec2.forAngle(a) end + +---@return boolean # s if points have fuzzy equality which means equal with some degree of variance. +---\since v2.1.4 +---\js NA +---\lua NA +---@param target cc.Vec2 +---@param variance number +function Vec2:fuzzyEquals(target, variance) end + +---@return number # s the angle in radians between this vector and the x axis +---\since v2.1.4 +---\js NA +---\lua NA +--- +---\returns the angle in radians between two vector directions +---\since v2.1.4 +---\js NA +---\lua NA +---@overload fun(self: cc.Vec2, other: cc.Vec2): number +function Vec2:getAngle() end + +---Clamp a point between from and to. +---\since v3.0 +---\js NA +---\lua NA +---@param min_inclusive cc.Vec2 +---@param max_inclusive cc.Vec2 +---@return cc.Vec2 +function Vec2:getClampPoint(min_inclusive, max_inclusive) end + +---Calculates the distance between two points +---@return number # float +---\since v2.1.4 +---\js NA +---\lua NA +---@param other cc.Vec2 +function Vec2:getDistance(other) end + +---Calculates the square distance between two points (not calling sqrt() ) +---@return number # float +---\since v2.1.4 +---\js NA +---\lua NA +---@param other cc.Vec2 +function Vec2:getDistanceSq(other) end + +---returns the intersection point of line A-B, C-D +---\since v3.0 +---\js NA +---\lua NA +---@param A cc.Vec2 +---@param B cc.Vec2 +---@param C cc.Vec2 +---@param D cc.Vec2 +---@return cc.Vec2 +function Vec2.getIntersectPoint(A, B, C, D) end + +---Calculates distance between point an origin +---@return number # float +---\since v2.1.4 +---\js NA +---\lua NA +function Vec2:getLength() end + +---Calculates the square length of a Vec2 (not calling sqrt() ) +---@return number # float +---\since v2.1.4 +---\js NA +---\lua NA +function Vec2:getLengthSq() end + +---Calculates midpoint between two points. +---@return cc.Vec2 # Vec2 +---\since v3.0 +---\js NA +---\lua NA +---@param other cc.Vec2 +function Vec2:getMidpoint(other) end + +---Get the normalized vector. +---@return cc.Vec2 +function Vec2:getNormalized() end + +---Calculates perpendicular of v, rotated 90 degrees counter-clockwise -- cross(v, perp(v)) >= 0 +---@return cc.Vec2 # Vec2 +---\since v2.1.4 +---\js NA +---\lua NA +function Vec2:getPerp() end + +---Calculates perpendicular of v, rotated 90 degrees clockwise -- cross(v, rperp(v)) <= 0 +---@return cc.Vec2 # Vec2 +---\since v2.1.4 +---\js NA +---\lua NA +function Vec2:getRPerp() end + +---A general line-line intersection test +---@param A cc.Vec2 # the startpoint for the first line L1 = (A - B) +---@param B cc.Vec2 # the endpoint for the first line L1 = (A - B) +---@param C cc.Vec2 # the startpoint for the second line L2 = (C - D) +---@param D cc.Vec2 # the endpoint for the second line L2 = (C - D) +---@param S olua.float # the range for a hitpoint in L1 (p = A + S*(B - A)) +---@param T olua.float # the range for a hitpoint in L2 (p = C + T*(D - C)) +---@return boolean # whether these two lines intersects. +---Note that to truly test intersection for segments we have to make +---sure that S & T lie within [0..1] and for rays, make sure S & T > 0 +---the hit point is C + T * (D - C); +---the hit point also is A + S * (B - A); +---\since 3.0 +---\js NA +---\lua NA +---@overload fun(A: cc.Vec2, B: cc.Vec2, C: cc.Vec2, D: cc.Vec2): boolean +---@overload fun(A: cc.Vec2, B: cc.Vec2, C: cc.Vec2, D: cc.Vec2, S: olua.float): boolean +function Vec2.isLineIntersect(A, B, C, D, S, T) end + +---returns true if Line A-B overlap with segment C-D +---\since v3.0 +---\js NA +---\lua NA +---@param A cc.Vec2 +---@param B cc.Vec2 +---@param C cc.Vec2 +---@param D cc.Vec2 +---@return boolean +function Vec2.isLineOverlap(A, B, C, D) end + +---returns true if Line A-B parallel with segment C-D +---\since v3.0 +---\js NA +---\lua NA +---@param A cc.Vec2 +---@param B cc.Vec2 +---@param C cc.Vec2 +---@param D cc.Vec2 +---@return boolean +function Vec2.isLineParallel(A, B, C, D) end + +---Indicates whether this vector contains all ones. +--- +---@return boolean # true if this vector contains all ones, false otherwise. +function Vec2:isOne() end + +---returns true if Segment A-B intersects with segment C-D +---\since v3.0 +---\js NA +---\lua NA +---@param A cc.Vec2 +---@param B cc.Vec2 +---@param C cc.Vec2 +---@param D cc.Vec2 +---@return boolean +function Vec2.isSegmentIntersect(A, B, C, D) end + +---returns true if Segment A-B overlap with segment C-D +---\since v3.0 +---\js NA +---\lua NA +---@param A cc.Vec2 +---@param B cc.Vec2 +---@param C cc.Vec2 +---@param D cc.Vec2 +---@param S cc.Vec2 +---@param E cc.Vec2 +---@return boolean +---@overload fun(A: cc.Vec2, B: cc.Vec2, C: cc.Vec2, D: cc.Vec2): boolean +---@overload fun(A: cc.Vec2, B: cc.Vec2, C: cc.Vec2, D: cc.Vec2, S: cc.Vec2): boolean +function Vec2.isSegmentOverlap(A, B, C, D, S, E) end + +---Indicates whether this vector contains all zeros. +--- +---@return boolean # true if this vector contains all zeros, false otherwise. +function Vec2:isZero() end + +---Computes the length of this vector. +--- +---@return number # The length of the vector. +--- +---\see lengthSquared +function Vec2:length() end + +---Returns the squared length of this vector. +--- +---When it is not necessary to get the exact length of a +---vector (for example, when simply comparing the lengths of +---different vectors), it is advised to use this method +---instead of length. +--- +---@return number # The squared length of the vector. +--- +---\see length +function Vec2:lengthSquared() end + +---Linear Interpolation between two points a and b +---@return cc.Vec2 # s +---alpha == 0 ? a +---alpha == 1 ? b +---otherwise a value between a..b +---\since v2.1.4 +---\js NA +---\lua NA +---@param other cc.Vec2 +---@param alpha number +function Vec2:lerp(other, alpha) end + +---Negates this vector. +function Vec2:negate() end + +---Constructs a new vector initialized to all zeros. +---@return cc.Vec2 +--- +---Constructs a new vector initialized to the specified values. +--- +---\param xx The x coordinate. +---\param yy The y coordinate. +---@overload fun(xx: number, yy: number): cc.Vec2 +--- +---Constructs a new vector from the values in the specified array. +--- +---\param array An array containing the elements of the vector in the order x, y. +---@overload fun(array: olua.float): cc.Vec2 +--- +---Constructs a vector that describes the direction between the specified points. +--- +---\param p1 The first point. +---\param p2 The second point. +---@overload fun(p1: cc.Vec2, p2: cc.Vec2): cc.Vec2 +function Vec2.new() end + +---Normalizes this vector. +--- +---This method normalizes this Vec2 so that it is of +---unit length (in other words, the length of the vector +---after calling this method will be 1.0f). If the vector +---already has unit length or if the length of the vector +---is zero, this method does nothing. +--- +---\return This vector, after the normalization occurs. +function Vec2:normalize() end + +---Calculates the projection of this over other. +---@return cc.Vec2 # Vec2 +---\since v2.1.4 +---\js NA +---\lua NA +---@param other cc.Vec2 +function Vec2:project(other) end + +---Rotates this vector by angle (specified in radians) around the given point. +--- +---@param point cc.Vec2 # The point to rotate around. +---@param angle number # The angle to rotate by (in radians). +--- +---Complex multiplication of two points ("rotates" two points). +---\return Vec2 vector with an angle of this.getAngle() + other.getAngle(), +---and a length of this.getLength() * other.getLength(). +---\since v2.1.4 +---\js NA +---\lua NA +---@overload fun(self: cc.Vec2, other: cc.Vec2): cc.Vec2 +function Vec2:rotate(point, angle) end + +---Rotates a point counter clockwise by the angle around a pivot +---@param pivot cc.Vec2 # is the pivot, naturally +---@param angle number # is the angle of rotation ccw in radians +---@return cc.Vec2 # s the rotated point +---\since v2.1.4 +---\js NA +---\lua NA +function Vec2:rotateByAngle(pivot, angle) end + +---Scales all elements of this vector by the specified value. +--- +---@param scalar number # The scalar value. +--- +---Scales each element of this vector by the matching component of scale. +--- +---\param scale The vector to scale by. +---@overload fun(self: cc.Vec2, scale: cc.Vec2) +function Vec2:scale(scalar) end + +---Sets the elements of this vector to the specified values. +--- +---@param xx number # The new x coordinate. +---@param yy number # The new y coordinate. +--- +---Sets the elements of this vector from the values in the specified array. +--- +---\param array An array containing the elements of the vector in the order x, y. +---@overload fun(self: cc.Vec2, array: olua.float) +--- +---Sets the elements of this vector to those in the specified vector. +--- +---\param v The vector to copy. +---@overload fun(self: cc.Vec2, v: cc.Vec2) +--- +---Sets this vector to the directional vector between the specified points. +--- +---\param p1 The first point. +---\param p2 The second point. +---@overload fun(self: cc.Vec2, p1: cc.Vec2, p2: cc.Vec2) +function Vec2:set(xx, yy) end + +---\js NA +---\lua NA +---@param xx number +---@param yy number +function Vec2:setPoint(xx, yy) end + +---Sets the elements of this vector to zero. +function Vec2:setZero() end + +---Updates this vector towards the given target using a smoothing function. +---The given response time determines the amount of smoothing (lag). A longer +---response time yields a smoother result and more lag. To force this vector to +---follow the target closely, provide a response time that is very small relative +---to the given elapsed time. +--- +---@param target cc.Vec2 # target value. +---@param elapsedTime number # elapsed time between calls. +---@param responseTime number # response time (in the same units as elapsedTime). +function Vec2:smooth(target, elapsedTime, responseTime) end + +---Subtracts this vector and the specified vector as (this - v) +---and stores the result in this vector. +--- +---@param v cc.Vec2 # The vector to subtract. +--- +---Subtracts the specified vectors and stores the result in dst. +---The resulting vector is computed as (v1 - v2). +--- +---\param v1 The first vector. +---\param v2 The second vector. +---\param dst The destination vector. +---@overload fun(v1: cc.Vec2, v2: cc.Vec2, dst: cc.Vec2) +function Vec2:subtract(v) end + +---Unrotates two points. +---@return cc.Vec2 # Vec2 vector with an angle of this.getAngle() - other.getAngle(), +---and a length of this.getLength() * other.getLength(). +---\since v2.1.4 +---\js NA +---\lua NA +---@param other cc.Vec2 +function Vec2:unrotate(other) end + +return Vec2 \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/Vec2Array.lua b/addons/cclua/cocos2d/library/cc/Vec2Array.lua new file mode 100644 index 00000000..e5f54213 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/Vec2Array.lua @@ -0,0 +1,55 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.Vec2Array + +--- +---@class cc.Vec2Array +---@field length integer +---@field rawdata any +---@field sizeof integer +---@field value cc.Vec2 +local Vec2Array = {} + + +---@return any +function Vec2Array:__gc() end + +---@param idx integer +---@return cc.Vec2 +function Vec2Array:__index(idx) end + +---@param idx integer +---@param v cc.Vec2 +function Vec2Array:__newindex(idx, v) end + +---@return any +function Vec2Array:__olua_move() end + +---@param data string +---@param len integer +function Vec2Array:assign(data, len) end + +---@param len integer +---@return cc.Vec2Array +---@overload fun(): cc.Vec2Array +function Vec2Array.new(len) end + +---@param from integer +---@param to integer +---@return cc.Vec2Array +---@overload fun(self: cc.Vec2Array, from: integer): cc.Vec2Array +function Vec2Array:slice(from, to) end + +---@param from integer +---@param to integer +---@return cc.Vec2Array +---@overload fun(self: cc.Vec2Array, from: integer): cc.Vec2Array +function Vec2Array:sub(from, to) end + +---@return cc.Vec2Array +function Vec2Array:take() end + +---@param len integer +---@return any +function Vec2Array:tostring(len) end + +return Vec2Array \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/Vec3.lua b/addons/cclua/cocos2d/library/cc/Vec3.lua new file mode 100644 index 00000000..3ca88f28 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/Vec3.lua @@ -0,0 +1,259 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.Vec3 + +---Defines a 3-element floating point vector. +--- +---When using a vector to represent a surface normal, +---the vector should typically be normalized. +---Other uses of directional vectors may wish to leave +---the magnitude of the vector intact. When used as a point, +---the elements of the vector represent a position in 3D space. +---@class cc.Vec3 +---@field normalized cc.Vec3 Get the normalized vector. +---@field one boolean Indicates whether this vector contains all ones.

\return true if this vector contains all ones, false otherwise. +---@field zero boolean Indicates whether this vector contains all zeros.

\return true if this vector contains all zeros, false otherwise. +---@field x number +---@field y number +---@field z number +---@field ONE cc.Vec3 +---@field UNIT_X cc.Vec3 +---@field UNIT_Y cc.Vec3 +---@field UNIT_Z cc.Vec3 +---@field ZERO cc.Vec3 +local Vec3 = {} + +---@return any +function Vec3:__gc() end + +---@return any +function Vec3:__olua_move() end + +---Adds the elements of the specified vector to this one. +--- +---@param v cc.Vec3 # The vector to add. +--- +---Adds the elements of this vector to the specified values. +--- +---\param xx The add x coordinate. +---\param yy The add y coordinate. +---\param zz The add z coordinate. +---@overload fun(self: cc.Vec3, xx: number, yy: number, zz: number) +--- +---Adds the specified vectors and stores the result in dst. +--- +---\param v1 The first vector. +---\param v2 The second vector. +---\param dst A vector to store the result in. +---@overload fun(v1: cc.Vec3, v2: cc.Vec3, dst: cc.Vec3) +function Vec3:add(v) end + +---Returns the angle (in radians) between the specified vectors. +--- +---@param v1 cc.Vec3 # The first vector. +---@param v2 cc.Vec3 # The second vector. +--- +---@return number # The angle between the two vectors (in radians). +function Vec3.angle(v1, v2) end + +---Clamps this vector within the specified range. +--- +---@param min cc.Vec3 # The minimum value. +---@param max cc.Vec3 # The maximum value. +--- +---Clamps the specified vector within the specified range and returns it in dst. +--- +---\param v The vector to clamp. +---\param min The minimum value. +---\param max The maximum value. +---\param dst A vector to store the result in. +---@overload fun(v: cc.Vec3, min: cc.Vec3, max: cc.Vec3, dst: cc.Vec3) +function Vec3:clamp(min, max) end + +---Sets this vector to the cross product between itself and the specified vector. +--- +---@param v cc.Vec3 # The vector to compute the cross product with. +--- +---Computes the cross product of the specified vectors and stores the result in dst. +--- +---\param v1 The first vector. +---\param v2 The second vector. +---\param dst A vector to store the result in. +---@overload fun(v1: cc.Vec3, v2: cc.Vec3, dst: cc.Vec3) +function Vec3:cross(v) end + +---Returns the distance between this vector and v. +--- +---@param v cc.Vec3 # The other vector. +--- +---@return number # The distance between this vector and v. +--- +---\see distanceSquared +function Vec3:distance(v) end + +---Returns the squared distance between this vector and v. +--- +---When it is not necessary to get the exact distance between +---two vectors (for example, when simply comparing the +---distance between different vectors), it is advised to use +---this method instead of distance. +--- +---@param v cc.Vec3 # The other vector. +--- +---@return number # The squared distance between this vector and v. +--- +---\see distance +function Vec3:distanceSquared(v) end + +---Returns the dot product of this vector and the specified vector. +--- +---@param v cc.Vec3 # The vector to compute the dot product with. +--- +---@return number # The dot product. +--- +---Returns the dot product between the specified vectors. +--- +---\param v1 The first vector. +---\param v2 The second vector. +--- +---\return The dot product between the vectors. +---@overload fun(v1: cc.Vec3, v2: cc.Vec3): number +function Vec3:dot(v) end + +---Creates a new vector from an integer interpreted as an RGB value. +---E.g. 0xff0000 represents red or the vector (1, 0, 0). +--- +---@param color integer # The integer to interpret as an RGB value. +--- +---@return cc.Vec3 # A vector corresponding to the interpreted RGB color. +function Vec3.fromColor(color) end + +---Get the normalized vector. +---@return cc.Vec3 +function Vec3:getNormalized() end + +---Indicates whether this vector contains all ones. +--- +---@return boolean # true if this vector contains all ones, false otherwise. +function Vec3:isOne() end + +---Indicates whether this vector contains all zeros. +--- +---@return boolean # true if this vector contains all zeros, false otherwise. +function Vec3:isZero() end + +---Computes the length of this vector. +--- +---@return number # The length of the vector. +--- +---\see lengthSquared +function Vec3:length() end + +---Returns the squared length of this vector. +--- +---When it is not necessary to get the exact length of a +---vector (for example, when simply comparing the lengths of +---different vectors), it is advised to use this method +---instead of length. +--- +---@return number # The squared length of the vector. +--- +---\see length +function Vec3:lengthSquared() end + +---Linear interpolation between two vectors A and B by alpha which +---is in the range [0,1] +---@param target cc.Vec3 +---@param alpha number +---@return cc.Vec3 +function Vec3:lerp(target, alpha) end + +---Negates this vector. +function Vec3:negate() end + +---Constructs a new vector initialized to all zeros. +---@return cc.Vec3 +--- +---Constructs a new vector initialized to the specified values. +--- +---\param xx The x coordinate. +---\param yy The y coordinate. +---\param zz The z coordinate. +---@overload fun(xx: number, yy: number, zz: number): cc.Vec3 +--- +---Constructs a new vector from the values in the specified array. +--- +---\param array An array containing the elements of the vector in the order x, y, z. +---@overload fun(array: olua.float): cc.Vec3 +--- +---Constructs a vector that describes the direction between the specified points. +--- +---\param p1 The first point. +---\param p2 The second point. +---@overload fun(p1: cc.Vec3, p2: cc.Vec3): cc.Vec3 +function Vec3.new() end + +---Normalizes this vector. +--- +---This method normalizes this Vec3 so that it is of +---unit length (in other words, the length of the vector +---after calling this method will be 1.0f). If the vector +---already has unit length or if the length of the vector +---is zero, this method does nothing. +--- +---\return This vector, after the normalization occurs. +function Vec3:normalize() end + +---Scales all elements of this vector by the specified value. +--- +---@param scalar number # The scalar value. +function Vec3:scale(scalar) end + +---Sets the elements of this vector to the specified values. +--- +---@param xx number # The new x coordinate. +---@param yy number # The new y coordinate. +---@param zz number # The new z coordinate. +--- +---Sets the elements of this vector from the values in the specified array. +--- +---\param array An array containing the elements of the vector in the order x, y, z. +---@overload fun(self: cc.Vec3, array: olua.float) +--- +---Sets the elements of this vector to those in the specified vector. +--- +---\param v The vector to copy. +---@overload fun(self: cc.Vec3, v: cc.Vec3) +--- +---Sets this vector to the directional vector between the specified points. +---@overload fun(self: cc.Vec3, p1: cc.Vec3, p2: cc.Vec3) +function Vec3:set(xx, yy, zz) end + +---Sets the elements of this vector to zero. +function Vec3:setZero() end + +---Updates this vector towards the given target using a smoothing function. +---The given response time determines the amount of smoothing (lag). A longer +---response time yields a smoother result and more lag. To force this vector to +---follow the target closely, provide a response time that is very small relative +---to the given elapsed time. +--- +---@param target cc.Vec3 # target value. +---@param elapsedTime number # elapsed time between calls. +---@param responseTime number # response time (in the same units as elapsedTime). +function Vec3:smooth(target, elapsedTime, responseTime) end + +---Subtracts this vector and the specified vector as (this - v) +---and stores the result in this vector. +--- +---@param v cc.Vec3 # The vector to subtract. +--- +---Subtracts the specified vectors and stores the result in dst. +---The resulting vector is computed as (v1 - v2). +--- +---\param v1 The first vector. +---\param v2 The second vector. +---\param dst The destination vector. +---@overload fun(v1: cc.Vec3, v2: cc.Vec3, dst: cc.Vec3) +function Vec3:subtract(v) end + +return Vec3 \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/Vec4.lua b/addons/cclua/cocos2d/library/cc/Vec4.lua new file mode 100644 index 00000000..467b8a9b --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/Vec4.lua @@ -0,0 +1,220 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.Vec4 + +---Defines 4-element floating point vector. +---@class cc.Vec4 +---@field normalized cc.Vec4 Get the normalized vector. +---@field one boolean Indicates whether this vector contains all ones.

\return true if this vector contains all ones, false otherwise. +---@field zero boolean Indicates whether this vector contains all zeros.

\return true if this vector contains all zeros, false otherwise. +---@field w number +---@field x number +---@field y number +---@field z number +---@field ONE cc.Vec4 +---@field UNIT_W cc.Vec4 +---@field UNIT_X cc.Vec4 +---@field UNIT_Y cc.Vec4 +---@field UNIT_Z cc.Vec4 +---@field ZERO cc.Vec4 +local Vec4 = {} + +---@return any +function Vec4:__gc() end + +---@return any +function Vec4:__olua_move() end + +---Adds the elements of the specified vector to this one. +--- +---@param v cc.Vec4 # The vector to add. +--- +---Adds the specified vectors and stores the result in dst. +--- +---\param v1 The first vector. +---\param v2 The second vector. +---\param dst A vector to store the result in. +---@overload fun(v1: cc.Vec4, v2: cc.Vec4, dst: cc.Vec4) +function Vec4:add(v) end + +---Returns the angle (in radians) between the specified vectors. +--- +---@param v1 cc.Vec4 # The first vector. +---@param v2 cc.Vec4 # The second vector. +--- +---@return number # The angle between the two vectors (in radians). +function Vec4.angle(v1, v2) end + +---Clamps this vector within the specified range. +--- +---@param min cc.Vec4 # The minimum value. +---@param max cc.Vec4 # The maximum value. +--- +---Clamps the specified vector within the specified range and returns it in dst. +--- +---\param v The vector to clamp. +---\param min The minimum value. +---\param max The maximum value. +---\param dst A vector to store the result in. +---@overload fun(v: cc.Vec4, min: cc.Vec4, max: cc.Vec4, dst: cc.Vec4) +function Vec4:clamp(min, max) end + +---Returns the distance between this vector and v. +--- +---@param v cc.Vec4 # The other vector. +--- +---@return number # The distance between this vector and v. +--- +---\see distanceSquared +function Vec4:distance(v) end + +---Returns the squared distance between this vector and v. +--- +---When it is not necessary to get the exact distance between +---two vectors (for example, when simply comparing the +---distance between different vectors), it is advised to use +---this method instead of distance. +--- +---@param v cc.Vec4 # The other vector. +--- +---@return number # The squared distance between this vector and v. +--- +---\see distance +function Vec4:distanceSquared(v) end + +---Returns the dot product of this vector and the specified vector. +--- +---@param v cc.Vec4 # The vector to compute the dot product with. +--- +---@return number # The dot product. +--- +---Returns the dot product between the specified vectors. +--- +---\param v1 The first vector. +---\param v2 The second vector. +--- +---\return The dot product between the vectors. +---@overload fun(v1: cc.Vec4, v2: cc.Vec4): number +function Vec4:dot(v) end + +---Creates a new vector from an integer interpreted as an RGBA value. +---E.g. 0xff0000ff represents opaque red or the vector (1, 0, 0, 1). +--- +---@param color integer # The integer to interpret as an RGBA value. +--- +---@return cc.Vec4 # A vector corresponding to the interpreted RGBA color. +function Vec4.fromColor(color) end + +---Get the normalized vector. +---@return cc.Vec4 +function Vec4:getNormalized() end + +---Indicates whether this vector contains all ones. +--- +---@return boolean # true if this vector contains all ones, false otherwise. +function Vec4:isOne() end + +---Indicates whether this vector contains all zeros. +--- +---@return boolean # true if this vector contains all zeros, false otherwise. +function Vec4:isZero() end + +---Computes the length of this vector. +--- +---@return number # The length of the vector. +--- +---\see lengthSquared +function Vec4:length() end + +---Returns the squared length of this vector. +--- +---When it is not necessary to get the exact length of a +---vector (for example, when simply comparing the lengths of +---different vectors), it is advised to use this method +---instead of length. +--- +---@return number # The squared length of the vector. +--- +---\see length +function Vec4:lengthSquared() end + +---Negates this vector. +function Vec4:negate() end + +---Constructs a new vector initialized to all zeros. +---@return cc.Vec4 +--- +---Constructs a new vector initialized to the specified values. +--- +---\param xx The x coordinate. +---\param yy The y coordinate. +---\param zz The z coordinate. +---\param ww The w coordinate. +---@overload fun(xx: number, yy: number, zz: number, ww: number): cc.Vec4 +--- +---Constructs a new vector from the values in the specified array. +--- +---\param array An array containing the elements of the vector in the order x, y, z, w. +---@overload fun(array: olua.float): cc.Vec4 +--- +---Constructs a vector that describes the direction between the specified points. +--- +---\param p1 The first point. +---\param p2 The second point. +---@overload fun(p1: cc.Vec4, p2: cc.Vec4): cc.Vec4 +function Vec4.new() end + +---Normalizes this vector. +--- +---This method normalizes this Vec4 so that it is of +---unit length (in other words, the length of the vector +---after calling this method will be 1.0f). If the vector +---already has unit length or if the length of the vector +---is zero, this method does nothing. +--- +---\return This vector, after the normalization occurs. +function Vec4:normalize() end + +---Scales all elements of this vector by the specified value. +--- +---@param scalar number # The scalar value. +function Vec4:scale(scalar) end + +---Sets the elements of this vector to the specified values. +--- +---@param xx number # The new x coordinate. +---@param yy number # The new y coordinate. +---@param zz number # The new z coordinate. +---@param ww number # The new w coordinate. +--- +---Sets the elements of this vector from the values in the specified array. +--- +---\param array An array containing the elements of the vector in the order x, y, z, w. +---@overload fun(self: cc.Vec4, array: olua.float) +--- +---Sets the elements of this vector to those in the specified vector. +--- +---\param v The vector to copy. +---@overload fun(self: cc.Vec4, v: cc.Vec4) +--- +---Sets this vector to the directional vector between the specified points. +--- +---\param p1 The first point. +---\param p2 The second point. +---@overload fun(self: cc.Vec4, p1: cc.Vec4, p2: cc.Vec4) +function Vec4:set(xx, yy, zz, ww) end + +---Subtracts this vector and the specified vector as (this - v) +---and stores the result in this vector. +--- +---@param v cc.Vec4 # The vector to subtract. +--- +---Subtracts the specified vectors and stores the result in dst. +---The resulting vector is computed as (v1 - v2). +--- +---\param v1 The first vector. +---\param v2 The second vector. +---\param dst The destination vector. +---@overload fun(v1: cc.Vec4, v2: cc.Vec4, dst: cc.Vec4) +function Vec4:subtract(v) end + +return Vec4 \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/VectorInt.lua b/addons/cclua/cocos2d/library/cc/VectorInt.lua new file mode 100644 index 00000000..67036bf0 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/VectorInt.lua @@ -0,0 +1,55 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.VectorInt + +--- +---@class cc.VectorInt +---@field length integer +---@field rawdata any +---@field sizeof integer +---@field value integer[] +local VectorInt = {} + + +---@return any +function VectorInt:__gc() end + +---@param idx integer +---@return integer[] +function VectorInt:__index(idx) end + +---@param idx integer +---@param v integer[] +function VectorInt:__newindex(idx, v) end + +---@return any +function VectorInt:__olua_move() end + +---@param data string +---@param len integer +function VectorInt:assign(data, len) end + +---@param len integer +---@return cc.VectorInt +---@overload fun(): cc.VectorInt +function VectorInt.new(len) end + +---@param from integer +---@param to integer +---@return cc.VectorInt +---@overload fun(self: cc.VectorInt, from: integer): cc.VectorInt +function VectorInt:slice(from, to) end + +---@param from integer +---@param to integer +---@return cc.VectorInt +---@overload fun(self: cc.VectorInt, from: integer): cc.VectorInt +function VectorInt:sub(from, to) end + +---@return cc.VectorInt +function VectorInt:take() end + +---@param len integer +---@return any +function VectorInt:tostring(len) end + +return VectorInt \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/VectorString.lua b/addons/cclua/cocos2d/library/cc/VectorString.lua new file mode 100644 index 00000000..e7f97a7c --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/VectorString.lua @@ -0,0 +1,55 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.VectorString + +--- +---@class cc.VectorString +---@field length integer +---@field rawdata any +---@field sizeof integer +---@field value string[] +local VectorString = {} + + +---@return any +function VectorString:__gc() end + +---@param idx integer +---@return string[] +function VectorString:__index(idx) end + +---@param idx integer +---@param v string[] +function VectorString:__newindex(idx, v) end + +---@return any +function VectorString:__olua_move() end + +---@param data string +---@param len integer +function VectorString:assign(data, len) end + +---@param len integer +---@return cc.VectorString +---@overload fun(): cc.VectorString +function VectorString.new(len) end + +---@param from integer +---@param to integer +---@return cc.VectorString +---@overload fun(self: cc.VectorString, from: integer): cc.VectorString +function VectorString:slice(from, to) end + +---@param from integer +---@param to integer +---@return cc.VectorString +---@overload fun(self: cc.VectorString, from: integer): cc.VectorString +function VectorString:sub(from, to) end + +---@return cc.VectorString +function VectorString:take() end + +---@param len integer +---@return any +function VectorString:tostring(len) end + +return VectorString \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/VertexKey.lua b/addons/cclua/cocos2d/library/cc/VertexKey.lua new file mode 100644 index 00000000..0f49075e --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/VertexKey.lua @@ -0,0 +1,37 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.VertexKey + +---@type cc.VertexKey +local VALUE + +--- +---@enum cc.VertexKey +local VertexKey = { + ---Index 10 will be used as Binormal. + VERTEX_ATTRIB_BINORMAL = 10, + ---Index 8 will be used as Blend index. + VERTEX_ATTRIB_BLEND_INDEX = 8, + ---Index 7 will be used as Blend weight for hardware skin. + VERTEX_ATTRIB_BLEND_WEIGHT = 7, + ---Index 1 will be used as Color. + VERTEX_ATTRIB_COLOR = 1, + VERTEX_ATTRIB_ERROR = -1, + VERTEX_ATTRIB_MAX = 11, + ---Index 6 will be used as Normal. + VERTEX_ATTRIB_NORMAL = 6, + ---Index 0 will be used as Position. + VERTEX_ATTRIB_POSITION = 0, + ---Index 9 will be used as tangent. + VERTEX_ATTRIB_TANGENT = 9, + ---Index 2 will be used as Tex coord unit 0. + VERTEX_ATTRIB_TEX_COORD = 2, + ---Index 3 will be used as Tex coord unit 1. + VERTEX_ATTRIB_TEX_COORD1 = 3, + ---Index 4 will be used as Tex coord unit 2. + VERTEX_ATTRIB_TEX_COORD2 = 4, + ---Index 5 will be used as Tex coord unit 3. + VERTEX_ATTRIB_TEX_COORD3 = 5, + VERTEX_ATTRIB_TEX_COORDS = 2, +} + +return VertexKey \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/Viewport.lua b/addons/cclua/cocos2d/library/cc/Viewport.lua new file mode 100644 index 00000000..379b0e7b --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/Viewport.lua @@ -0,0 +1,18 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.Viewport + +--- +---@class cc.Viewport +---@field h integer +---@field w integer +---@field x integer +---@field y integer +local Viewport = {} + +---@return any +function Viewport:__gc() end + +---@return any +function Viewport:__olua_move() end + +return Viewport \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/Waves.lua b/addons/cclua/cocos2d/library/cc/Waves.lua new file mode 100644 index 00000000..8a4a6d2f --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/Waves.lua @@ -0,0 +1,31 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.Waves + +---Waves action. +---\details This action is used for take effect on the target node as waves. +---You can control the effect by these parameters: +---duration, grid size, waves count, amplitude, +---whether waves on horizontal and whether waves on vertical. +---@class cc.Waves : cc.Grid3DAction +---@field amplitude number Get the amplitude of the effect. \return Return the amplitude of the effect. +local Waves = {} + +---Create the action with amplitude, horizontal sin, vertical sin, grid size, waves count and duration. +---@param duration number # Specify the duration of the Waves action. It's a value in seconds. +---@param gridSize cc.Size # Specify the size of the grid. +---@param waves integer # Specify the waves count of the Waves action. +---@param amplitude number # Specify the amplitude of the Waves action. +---@param horizontal boolean # Specify whether waves on horizontal. +---@param vertical boolean # Specify whether waves on vertical. +---@return cc.Waves # If the creation success, return a pointer of Waves action; otherwise, return nil. +function Waves.create(duration, gridSize, waves, amplitude, horizontal, vertical) end + +---Get the amplitude of the effect. +---@return number # Return the amplitude of the effect. +function Waves:getAmplitude() end + +---Set the amplitude to the effect. +---@param amplitude number # The value of amplitude will be set. +function Waves:setAmplitude(amplitude) end + +return Waves \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/Waves3D.lua b/addons/cclua/cocos2d/library/cc/Waves3D.lua new file mode 100644 index 00000000..7738ab48 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/Waves3D.lua @@ -0,0 +1,28 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.Waves3D + +---Waves3D action. +---\details This action is used for take effect on the target node as 3D waves. +---You can control the effect by these parameters: +---duration, grid size, waves count, amplitude. +---@class cc.Waves3D : cc.Grid3DAction +---@field amplitude number Get the amplitude of the effect. \return Return the amplitude of the effect. +local Waves3D = {} + +---Create an action with duration, grid size, waves and amplitude. +---@param duration number # Specify the duration of the Waves3D action. It's a value in seconds. +---@param gridSize cc.Size # Specify the size of the grid. +---@param waves integer # Specify the waves count of the Waves3D action. +---@param amplitude number # Specify the amplitude of the Waves3D action. +---@return cc.Waves3D # If the creation success, return a pointer of Waves3D action; otherwise, return nil. +function Waves3D.create(duration, gridSize, waves, amplitude) end + +---Get the amplitude of the effect. +---@return number # Return the amplitude of the effect. +function Waves3D:getAmplitude() end + +---Set the amplitude to the effect. +---@param amplitude number # The value of amplitude will be set. +function Waves3D:setAmplitude(amplitude) end + +return Waves3D \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/WavesTiles3D.lua b/addons/cclua/cocos2d/library/cc/WavesTiles3D.lua new file mode 100644 index 00000000..26848880 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/WavesTiles3D.lua @@ -0,0 +1,26 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.WavesTiles3D + +---WavesTiles3D action. +---\details This action wave the target node with many tiles. +---@class cc.WavesTiles3D : cc.TiledGrid3DAction +---@field amplitude number Get the amplitude of the effect. \return Return the amplitude of the effect. +local WavesTiles3D = {} + +---Create the action with a number of waves, the waves amplitude, the grid size and the duration. +---@param duration number # Specify the duration of the WavesTiles3D action. It's a value in seconds. +---@param gridSize cc.Size # Specify the size of the grid. +---@param waves integer # Specify the waves count of the WavesTiles3D action. +---@param amplitude number # Specify the amplitude of the WavesTiles3D action. +---@return cc.WavesTiles3D # If the creation success, return a pointer of WavesTiles3D action; otherwise, return nil. +function WavesTiles3D.create(duration, gridSize, waves, amplitude) end + +---Get the amplitude of the effect. +---@return number # Return the amplitude of the effect. +function WavesTiles3D:getAmplitude() end + +---Set the amplitude to the effect. +---@param amplitude number # The value of amplitude will be set. +function WavesTiles3D:setAmplitude(amplitude) end + +return WavesTiles3D \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/WebSocket.lua b/addons/cclua/cocos2d/library/cc/WebSocket.lua new file mode 100644 index 00000000..0132ab6e --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/WebSocket.lua @@ -0,0 +1,66 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.WebSocket + +---WebSocket is wrapper of the libwebsockets-protocol, let the develop could call the websocket easily. +---Please note that all public methods of WebSocket have to be invoked on Cocos Thread. +---@class cc.WebSocket +---@field protocol string Gets the protocol selected by websocket server. +---@field readyState cc.WebSocket.State Gets current state of connection. \return State the state value could be State::CONNECTING, State::OPEN, State::CLOSING or State::CLOSED +---@field url string Gets the URL of websocket connection. +local WebSocket = {} + +---@return any +function WebSocket:__gc() end + +---@return any +function WebSocket:__olua_move() end + +---Closes the connection to server synchronously. +---\note It's a synchronous method, it will not return until websocket thread exits. +function WebSocket:close() end + +---Close all connections and wait for all websocket threads to exit +---\note This method has to be invoked on Cocos Thread +function WebSocket.closeAllConnections() end + +---Closes the connection to server asynchronously. +---\note It's an asynchronous method, it just notifies websocket thread to exit and returns directly, +---If using 'closeAsync' to close websocket connection, +---be careful of not using destructed variables in the callback of 'onClose'. +function WebSocket:closeAsync() end + +---Gets the protocol selected by websocket server. +---@return string +function WebSocket:getProtocol() end + +---Gets current state of connection. +---@return cc.WebSocket.State # State the state value could be State::CONNECTING, State::OPEN, State::CLOSING or State::CLOSED +function WebSocket:getReadyState() end + +---Gets the URL of websocket connection. +---@return string +function WebSocket:getUrl() end + +---@return any +function WebSocket:init() end + +---Constructor of WebSocket. +--- +---\js ctor +---@return cc.WebSocket +function WebSocket.new() end + +---Sends string data to websocket server. +--- +---@param message string # string data. +---\lua sendstring +--- +---Sends binary data to websocket server. +--- +---\param binaryMsg binary string data. +---\param len the size of binary string data. +---\lua sendstring +---@overload fun(self: cc.WebSocket, binaryMsg: string, len: integer) +function WebSocket:send(message) end + +return WebSocket \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/WebSocket/Delegate.lua b/addons/cclua/cocos2d/library/cc/WebSocket/Delegate.lua new file mode 100644 index 00000000..75b0968c --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/WebSocket/Delegate.lua @@ -0,0 +1,44 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.WebSocket.Delegate + +---The delegate class is used to process websocket events. +--- +---The most member function are pure virtual functions,they should be implemented the in subclass. +---\lua NA +---@class cc.WebSocket.Delegate +local Delegate = {} + +---@return any +function Delegate:__gc() end + +---@return any +function Delegate:__olua_move() end + +---When the WebSocket object connected wants to close or the protocol won't get used at all and current _readyState is State::CLOSING,this function is to be called. +--- +---@param ws cc.WebSocket # The WebSocket object connected. +function Delegate:onClose(ws) end + +---This function is to be called in the following cases: +---1. client connection is failed. +---2. the request client connection has been unable to complete a handshake with the remote server. +---3. the protocol won't get used at all after this callback and current _readyState is State::CONNECTING. +---4. when a socket descriptor needs to be removed from an external polling array. in is again the struct libwebsocket_pollargs containing the fd member to be removed. If you are using the internal polling loop, you can just ignore it and current _readyState is State::CONNECTING. +--- +---@param ws cc.WebSocket # The WebSocket object connected. +---@param error cc.WebSocket.ErrorCode # WebSocket::ErrorCode enum,would be ErrorCode::TIME_OUT or ErrorCode::CONNECTION_FAILURE. +function Delegate:onError(ws, error) end + +---This function to be called when data has appeared from the server for the client connection. +--- +---@param ws cc.WebSocket # The WebSocket object connected. +---@param data any # Data object for message. +function Delegate:onMessage(ws, data) end + +---This function to be called after the client connection complete a handshake with the remote server. +---This means that the WebSocket connection is ready to send and receive data. +--- +---@param ws cc.WebSocket # The WebSocket object connected +function Delegate:onOpen(ws) end + +return Delegate \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/WebSocket/ErrorCode.lua b/addons/cclua/cocos2d/library/cc/WebSocket/ErrorCode.lua new file mode 100644 index 00000000..29338dab --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/WebSocket/ErrorCode.lua @@ -0,0 +1,17 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.WebSocket.ErrorCode + +---@type cc.WebSocket.ErrorCode +local VALUE + +--- +---@enum cc.WebSocket.ErrorCode +local ErrorCode = { + ---< value 0 + CONNECTION_FAILURE = 1, + TIME_OUT = 0, + ---< value 1 + UNKNOWN = 2, +} + +return ErrorCode \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/WebSocket/State.lua b/addons/cclua/cocos2d/library/cc/WebSocket/State.lua new file mode 100644 index 00000000..c9b90400 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/WebSocket/State.lua @@ -0,0 +1,19 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.WebSocket.State + +---@type cc.WebSocket.State +local VALUE + +--- +---@enum cc.WebSocket.State +local State = { + ---< value 2 + CLOSED = 3, + ---< value 1 + CLOSING = 2, + CONNECTING = 0, + ---< value 0 + OPEN = 1, +} + +return State \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/ccBezierConfig.lua b/addons/cclua/cocos2d/library/cc/ccBezierConfig.lua new file mode 100644 index 00000000..7e517a77 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/ccBezierConfig.lua @@ -0,0 +1,17 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.ccBezierConfig + +---\struct Bezier configuration structure +---@class cc.ccBezierConfig +---@field controlPoint_1 cc.Vec2 +---@field controlPoint_2 cc.Vec2 +---@field endPosition cc.Vec2 +local ccBezierConfig = {} + +---@return any +function ccBezierConfig:__gc() end + +---@return any +function ccBezierConfig:__olua_move() end + +return ccBezierConfig \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/ccSchedulerFunc.lua b/addons/cclua/cocos2d/library/cc/ccSchedulerFunc.lua new file mode 100644 index 00000000..13ef732d --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/ccSchedulerFunc.lua @@ -0,0 +1,14 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.ccSchedulerFunc + +--- +--- +---std::function +---@class cc.ccSchedulerFunc +local ccSchedulerFunc = {} + +---@return cc.ccSchedulerFunc + +function ccSchedulerFunc:__call() end + +return ccSchedulerFunc \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/sImageTGA.lua b/addons/cclua/cocos2d/library/cc/sImageTGA.lua new file mode 100644 index 00000000..e151dd34 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/sImageTGA.lua @@ -0,0 +1,21 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.sImageTGA + +---TGA format +---@class cc.sImageTGA +---@field flipped integer +---@field height integer +---@field imageData string +---@field pixelDepth integer +---@field status integer +---@field type integer +---@field width integer +local sImageTGA = {} + +---@return any +function sImageTGA:__gc() end + +---@return any +function sImageTGA:__olua_move() end + +return sImageTGA \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/tweenfunc.lua b/addons/cclua/cocos2d/library/cc/tweenfunc.lua new file mode 100644 index 00000000..24b9fd3f --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/tweenfunc.lua @@ -0,0 +1,181 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.tweenfunc + +--- +---@class cc.tweenfunc +local tweenfunc = {} + +---@param time number # in seconds. +---@return number +function tweenfunc.backEaseIn(time) end + +---@param time number # in seconds. +---@return number +function tweenfunc.backEaseInOut(time) end + +---@param time number # in seconds. +---@return number +function tweenfunc.backEaseOut(time) end + +---@param t number # ime in seconds. +---@param a number +---@param b number +---@param c number +---@param d number +---@return number +function tweenfunc.bezieratFunction(a, b, c, d, t) end + +---@param time number # in seconds. +---@return number +function tweenfunc.bounceEaseIn(time) end + +---@param time number # in seconds. +---@return number +function tweenfunc.bounceEaseInOut(time) end + +---@param time number # in seconds. +---@return number +function tweenfunc.bounceEaseOut(time) end + +---@param time number # in seconds. +---@return number +function tweenfunc.circEaseIn(time) end + +---@param time number # in seconds. +---@return number +function tweenfunc.circEaseInOut(time) end + +---@param time number # in seconds. +---@return number +function tweenfunc.circEaseOut(time) end + +---@param time number # in seconds. +---@return number +function tweenfunc.cubicEaseIn(time) end + +---@param time number # in seconds. +---@return number +function tweenfunc.cubicEaseInOut(time) end + +---@param time number # in seconds. +---@return number +function tweenfunc.cubicEaseOut(time) end + +---@param time number # in seconds. +---@param easingParam olua.float +---@return number +function tweenfunc.customEase(time, easingParam) end + +---@param time number # in seconds. +---@param rate number +---@return number +function tweenfunc.easeIn(time, rate) end + +---@param time number # in seconds. +---@param rate number +---@return number +function tweenfunc.easeInOut(time, rate) end + +---@param time number # in seconds. +---@param rate number +---@return number +function tweenfunc.easeOut(time, rate) end + +---@param time number # in seconds. +---@param period number # in seconds. +---@return number +function tweenfunc.elasticEaseIn(time, period) end + +---@param time number # in seconds. +---@param period number # in seconds. +---@return number +function tweenfunc.elasticEaseInOut(time, period) end + +---@param time number # in seconds. +---@param period number # in seconds. +---@return number +function tweenfunc.elasticEaseOut(time, period) end + +---@param time number # in seconds. +---@return number +function tweenfunc.expoEaseIn(time) end + +---@param time number # in seconds. +---@return number +function tweenfunc.expoEaseInOut(time) end + +---@param time number # in seconds. +---@return number +function tweenfunc.expoEaseOut(time) end + +---@param time number # in seconds. +---@return number +function tweenfunc.linear(time) end + +---@param time number # in seconds. +---@return number +function tweenfunc.quadEaseIn(time) end + +---@param time number # in seconds. +---@return number +function tweenfunc.quadEaseInOut(time) end + +---@param time number # in seconds. +---@return number +function tweenfunc.quadEaseOut(time) end + +---@param time number # in seconds. +---@return number +function tweenfunc.quadraticIn(time) end + +---@param time number # in seconds. +---@return number +function tweenfunc.quadraticInOut(time) end + +---@param time number # in seconds. +---@return number +function tweenfunc.quadraticOut(time) end + +---@param time number # in seconds. +---@return number +function tweenfunc.quartEaseIn(time) end + +---@param time number # in seconds. +---@return number +function tweenfunc.quartEaseInOut(time) end + +---@param time number # in seconds. +---@return number +function tweenfunc.quartEaseOut(time) end + +---@param time number # in seconds. +---@return number +function tweenfunc.quintEaseIn(time) end + +---@param time number # in seconds. +---@return number +function tweenfunc.quintEaseInOut(time) end + +---@param time number # in seconds. +---@return number +function tweenfunc.quintEaseOut(time) end + +---@param time number # in seconds. +---@return number +function tweenfunc.sineEaseIn(time) end + +---@param time number # in seconds. +---@return number +function tweenfunc.sineEaseInOut(time) end + +---@param time number # in seconds. +---@return number +function tweenfunc.sineEaseOut(time) end + +---@param time number # in seconds. +---@param type cc.tweenfunc.TweenType +---@param easingParam olua.float +---@return number +function tweenfunc.tweenTo(time, type, easingParam) end + +return tweenfunc \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/tweenfunc/TweenType.lua b/addons/cclua/cocos2d/library/cc/tweenfunc/TweenType.lua new file mode 100644 index 00000000..c106314d --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/tweenfunc/TweenType.lua @@ -0,0 +1,45 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.tweenfunc.TweenType + +---@type cc.tweenfunc.TweenType +local VALUE + +--- +---@enum cc.tweenfunc.TweenType +local TweenType = { + Back_EaseIn = 25, + Back_EaseInOut = 27, + Back_EaseOut = 26, + Bounce_EaseIn = 28, + Bounce_EaseInOut = 30, + Bounce_EaseOut = 29, + CUSTOM_EASING = -1, + Circ_EaseIn = 19, + Circ_EaseInOut = 21, + Circ_EaseOut = 20, + Cubic_EaseIn = 7, + Cubic_EaseInOut = 9, + Cubic_EaseOut = 8, + Elastic_EaseIn = 22, + Elastic_EaseInOut = 24, + Elastic_EaseOut = 23, + Expo_EaseIn = 16, + Expo_EaseInOut = 18, + Expo_EaseOut = 17, + Linear = 0, + Quad_EaseIn = 4, + Quad_EaseInOut = 6, + Quad_EaseOut = 5, + Quart_EaseIn = 10, + Quart_EaseInOut = 12, + Quart_EaseOut = 11, + Quint_EaseIn = 13, + Quint_EaseInOut = 15, + Quint_EaseOut = 14, + Sine_EaseIn = 1, + Sine_EaseInOut = 3, + Sine_EaseOut = 2, + TWEEN_EASING_MAX = 10000, +} + +return TweenType \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/types/TMXTileFlags.lua b/addons/cclua/cocos2d/library/cc/types/TMXTileFlags.lua new file mode 100644 index 00000000..781d9f41 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/types/TMXTileFlags.lua @@ -0,0 +1,49 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.types.TMXTileFlags + +--- +---@class cc.types.TMXTileFlags +---@field buffer any +---@field length integer +---@field value cc.TMXTileFlags +local TMXTileFlags = {} + +---@return any +function TMXTileFlags:__gc() end + +---@param idx integer +---@return cc.TMXTileFlags +function TMXTileFlags:__index(idx) end + +---@param idx integer +---@param v cc.TMXTileFlags +function TMXTileFlags:__newindex(idx, v) end + +---@return any +function TMXTileFlags:__olua_move() end + +---@param len integer +---@return cc.types.TMXTileFlags +---@overload fun(): cc.types.TMXTileFlags +function TMXTileFlags.new(len) end + +---@param from integer +---@param to integer +---@return cc.types.TMXTileFlags +---@overload fun(self: cc.types.TMXTileFlags, from: integer): cc.types.TMXTileFlags +function TMXTileFlags:slice(from, to) end + +---@param from integer +---@param to integer +---@return cc.types.TMXTileFlags +---@overload fun(self: cc.types.TMXTileFlags, from: integer): cc.types.TMXTileFlags +function TMXTileFlags:sub(from, to) end + +---@return cc.types.TMXTileFlags +function TMXTileFlags:take() end + +---@param len integer +---@return any +function TMXTileFlags:tostring(len) end + +return TMXTileFlags \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/types/ValueMap.lua b/addons/cclua/cocos2d/library/cc/types/ValueMap.lua new file mode 100644 index 00000000..82abdc44 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/types/ValueMap.lua @@ -0,0 +1,49 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.types.ValueMap + +--- +---@class cc.types.ValueMap +---@field buffer any +---@field length integer +---@field value any +local ValueMap = {} + +---@return any +function ValueMap:__gc() end + +---@param idx integer +---@return any +function ValueMap:__index(idx) end + +---@param idx integer +---@param v any +function ValueMap:__newindex(idx, v) end + +---@return any +function ValueMap:__olua_move() end + +---@param len integer +---@return cc.types.ValueMap +---@overload fun(): cc.types.ValueMap +function ValueMap.new(len) end + +---@param from integer +---@param to integer +---@return cc.types.ValueMap +---@overload fun(self: cc.types.ValueMap, from: integer): cc.types.ValueMap +function ValueMap:slice(from, to) end + +---@param from integer +---@param to integer +---@return cc.types.ValueMap +---@overload fun(self: cc.types.ValueMap, from: integer): cc.types.ValueMap +function ValueMap:sub(from, to) end + +---@return cc.types.ValueMap +function ValueMap:take() end + +---@param len integer +---@return any +function ValueMap:tostring(len) end + +return ValueMap \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/types/Vec2Array.lua b/addons/cclua/cocos2d/library/cc/types/Vec2Array.lua new file mode 100644 index 00000000..0dcd53e0 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/types/Vec2Array.lua @@ -0,0 +1,49 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.types.Vec2Array + +--- +---@class cc.types.Vec2Array +---@field buffer any +---@field length integer +---@field value cc.Vec2 +local Vec2Array = {} + +---@return any +function Vec2Array:__gc() end + +---@param idx integer +---@return cc.Vec2 +function Vec2Array:__index(idx) end + +---@param idx integer +---@param v cc.Vec2 +function Vec2Array:__newindex(idx, v) end + +---@return any +function Vec2Array:__olua_move() end + +---@param len integer +---@return cc.types.Vec2Array +---@overload fun(): cc.types.Vec2Array +function Vec2Array.new(len) end + +---@param from integer +---@param to integer +---@return cc.types.Vec2Array +---@overload fun(self: cc.types.Vec2Array, from: integer): cc.types.Vec2Array +function Vec2Array:slice(from, to) end + +---@param from integer +---@param to integer +---@return cc.types.Vec2Array +---@overload fun(self: cc.types.Vec2Array, from: integer): cc.types.Vec2Array +function Vec2Array:sub(from, to) end + +---@return cc.types.Vec2Array +function Vec2Array:take() end + +---@param len integer +---@return any +function Vec2Array:tostring(len) end + +return Vec2Array \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/types/VectorInt.lua b/addons/cclua/cocos2d/library/cc/types/VectorInt.lua new file mode 100644 index 00000000..7f09b3ba --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/types/VectorInt.lua @@ -0,0 +1,49 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.types.VectorInt + +--- +---@class cc.types.VectorInt +---@field buffer any +---@field length integer +---@field value integer[] +local VectorInt = {} + +---@return any +function VectorInt:__gc() end + +---@param idx integer +---@return integer[] +function VectorInt:__index(idx) end + +---@param idx integer +---@param v integer[] +function VectorInt:__newindex(idx, v) end + +---@return any +function VectorInt:__olua_move() end + +---@param len integer +---@return cc.types.VectorInt +---@overload fun(): cc.types.VectorInt +function VectorInt.new(len) end + +---@param from integer +---@param to integer +---@return cc.types.VectorInt +---@overload fun(self: cc.types.VectorInt, from: integer): cc.types.VectorInt +function VectorInt:slice(from, to) end + +---@param from integer +---@param to integer +---@return cc.types.VectorInt +---@overload fun(self: cc.types.VectorInt, from: integer): cc.types.VectorInt +function VectorInt:sub(from, to) end + +---@return cc.types.VectorInt +function VectorInt:take() end + +---@param len integer +---@return any +function VectorInt:tostring(len) end + +return VectorInt \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/types/VectorString.lua b/addons/cclua/cocos2d/library/cc/types/VectorString.lua new file mode 100644 index 00000000..ad47dbe5 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/types/VectorString.lua @@ -0,0 +1,49 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.types.VectorString + +--- +---@class cc.types.VectorString +---@field buffer any +---@field length integer +---@field value string[] +local VectorString = {} + +---@return any +function VectorString:__gc() end + +---@param idx integer +---@return string[] +function VectorString:__index(idx) end + +---@param idx integer +---@param v string[] +function VectorString:__newindex(idx, v) end + +---@return any +function VectorString:__olua_move() end + +---@param len integer +---@return cc.types.VectorString +---@overload fun(): cc.types.VectorString +function VectorString.new(len) end + +---@param from integer +---@param to integer +---@return cc.types.VectorString +---@overload fun(self: cc.types.VectorString, from: integer): cc.types.VectorString +function VectorString:slice(from, to) end + +---@param from integer +---@param to integer +---@return cc.types.VectorString +---@overload fun(self: cc.types.VectorString, from: integer): cc.types.VectorString +function VectorString:sub(from, to) end + +---@return cc.types.VectorString +function VectorString:take() end + +---@param len integer +---@return any +function VectorString:tostring(len) end + +return VectorString \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/cc/ui/Margin.lua b/addons/cclua/cocos2d/library/cc/ui/Margin.lua new file mode 100644 index 00000000..d34dcc54 --- /dev/null +++ b/addons/cclua/cocos2d/library/cc/ui/Margin.lua @@ -0,0 +1,43 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cc.ui.Margin + +---Margin of widget's in point. Margin value should be positive. +---\lua NA +---@class cc.ui.Margin +---@field bottom number +---@field left number +---@field right number +---@field top number +---@field ZERO cc.ui.Margin +local Margin = {} + +---@return any +function Margin:__gc() end + +---@return any +function Margin:__olua_move() end + +---Test equality of two margins. +---@param target cc.ui.Margin # A Margin instance. +---@return boolean # True if two margins are equal, false otherwise. +function Margin:equals(target) end + +---Default constructor. +---@return cc.ui.Margin +--- +---Construct a Margin instance with left, top, right and bottom margins. +---\param l Left margin in float. +---\param t Top margin in float. +---\param r Right margin in float. +---\param b Bottom margin in float. +---@overload fun(l: number, t: number, r: number, b: number): cc.ui.Margin +function Margin.new() end + +---Change margin with left, top, right and bottom margin. +---@param l number # Left margin in float. +---@param t number # Top margin in float. +---@param r number # Right margin in float. +---@param b number # Bottom margin in float. +function Margin:setMargin(l, t, r, b) end + +return Margin \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccb/Attribute.lua b/addons/cclua/cocos2d/library/ccb/Attribute.lua new file mode 100644 index 00000000..4fd00534 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccb/Attribute.lua @@ -0,0 +1,19 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccb.Attribute + +---@type ccb.Attribute +local VALUE + +--- +---@enum ccb.Attribute +local Attribute = { + ATTRIBUTE_MAX = 6, + COLOR = 1, + POSITION = 0, + TEXCOORD = 2, + TEXCOORD1 = 3, + TEXCOORD2 = 4, + TEXCOORD3 = 5, +} + +return Attribute \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccb/AttributeBindInfo.lua b/addons/cclua/cocos2d/library/ccb/AttributeBindInfo.lua new file mode 100644 index 00000000..893eb46f --- /dev/null +++ b/addons/cclua/cocos2d/library/ccb/AttributeBindInfo.lua @@ -0,0 +1,18 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccb.AttributeBindInfo + +--- +---@class ccb.AttributeBindInfo +---@field attributeName string +---@field location integer +---@field size integer +---@field type integer +local AttributeBindInfo = {} + +---@return any +function AttributeBindInfo:__gc() end + +---@return any +function AttributeBindInfo:__olua_move() end + +return AttributeBindInfo \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccb/BlendDescriptor.lua b/addons/cclua/cocos2d/library/ccb/BlendDescriptor.lua new file mode 100644 index 00000000..f6672639 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccb/BlendDescriptor.lua @@ -0,0 +1,22 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccb.BlendDescriptor + +---a structor to store blend descriptor +---@class ccb.BlendDescriptor +---@field alphaBlendOperation ccb.BlendOperation +---@field blendEnabled boolean +---@field destinationAlphaBlendFactor ccb.BlendFactor +---@field destinationRGBBlendFactor ccb.BlendFactor +---@field rgbBlendOperation ccb.BlendOperation +---@field sourceAlphaBlendFactor ccb.BlendFactor +---@field sourceRGBBlendFactor ccb.BlendFactor +---@field writeMask ccb.ColorWriteMask +local BlendDescriptor = {} + +---@return any +function BlendDescriptor:__gc() end + +---@return any +function BlendDescriptor:__olua_move() end + +return BlendDescriptor \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccb/BlendFactor.lua b/addons/cclua/cocos2d/library/ccb/BlendFactor.lua new file mode 100644 index 00000000..499a6064 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccb/BlendFactor.lua @@ -0,0 +1,26 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccb.BlendFactor + +---@type ccb.BlendFactor +local VALUE + +--- +---@enum ccb.BlendFactor +local BlendFactor = { + BLEND_CLOLOR = 13, + CONSTANT_ALPHA = 10, + DST_ALPHA = 8, + DST_COLOR = 6, + ONE = 1, + ONE_MINUS_CONSTANT_ALPHA = 12, + ONE_MINUS_DST_ALPHA = 9, + ONE_MINUS_DST_COLOR = 7, + ONE_MINUS_SRC_ALPHA = 5, + ONE_MINUS_SRC_COLOR = 3, + SRC_ALPHA = 4, + SRC_ALPHA_SATURATE = 11, + SRC_COLOR = 2, + ZERO = 0, +} + +return BlendFactor \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccb/BlendOperation.lua b/addons/cclua/cocos2d/library/ccb/BlendOperation.lua new file mode 100644 index 00000000..a49c67b6 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccb/BlendOperation.lua @@ -0,0 +1,15 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccb.BlendOperation + +---@type ccb.BlendOperation +local VALUE + +--- +---@enum ccb.BlendOperation +local BlendOperation = { + ADD = 0, + RESERVE_SUBTRACT = 2, + SUBTRACT = 1, +} + +return BlendOperation \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccb/Buffer.lua b/addons/cclua/cocos2d/library/ccb/Buffer.lua new file mode 100644 index 00000000..25965179 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccb/Buffer.lua @@ -0,0 +1,31 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccb.Buffer + +---Used to store vertex and index data data. +---@class ccb.Buffer : cc.Ref +---@field size any Get buffer size in bytes. \return The buffer size in bytes. +local Buffer = {} + +---Get buffer size in bytes. +---@return any # The buffer size in bytes. +function Buffer:getSize() end + +---Update buffer data +---@param data any # Specifies a pointer to data that will be copied into the data store for initialization. +---@param size any # Specifies the size in bytes of the data store region being replaced. +---\see `updateSubData(void* data, unsigned int offset, unsigned int size)` +function Buffer:updateData(data, size) end + +---Update buffer sub-region data +---@param data any # Specifies a pointer to the new data that will be copied into the data store. +---@param offset any # Specifies the offset into the buffer object's data store where data replacement will begin, measured in bytes. +---@param size any # Specifies the size in bytes of the data store region being replaced. +---\see `updateData(void* data, unsigned int size)` +function Buffer:updateSubData(data, offset, size) end + +---By default, static buffer data will automatically stored when it comes to foreground. +---This function is used to indicate whether external data needs to be used to update the buffer instead of using the default stored data. +---@param needDefaultStoredData boolean # Specifies whether to use the default stored data. +function Buffer:usingDefaultStoredData(needDefaultStoredData) end + +return Buffer \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccb/BufferType.lua b/addons/cclua/cocos2d/library/ccb/BufferType.lua new file mode 100644 index 00000000..5cc85a6d --- /dev/null +++ b/addons/cclua/cocos2d/library/ccb/BufferType.lua @@ -0,0 +1,14 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccb.BufferType + +---@type ccb.BufferType +local VALUE + +--- +---@enum ccb.BufferType +local BufferType = { + INDEX = 1, + VERTEX = 0, +} + +return BufferType \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccb/BufferUsage.lua b/addons/cclua/cocos2d/library/ccb/BufferUsage.lua new file mode 100644 index 00000000..ccba2901 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccb/BufferUsage.lua @@ -0,0 +1,14 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccb.BufferUsage + +---@type ccb.BufferUsage +local VALUE + +--- +---@enum ccb.BufferUsage +local BufferUsage = { + DYNAMIC = 1, + STATIC = 0, +} + +return BufferUsage \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccb/ColorWriteMask.lua b/addons/cclua/cocos2d/library/ccb/ColorWriteMask.lua new file mode 100644 index 00000000..d1936110 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccb/ColorWriteMask.lua @@ -0,0 +1,18 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccb.ColorWriteMask + +---@type ccb.ColorWriteMask +local VALUE + +--- +---@enum ccb.ColorWriteMask +local ColorWriteMask = { + ALL = 15, + ALPHA = 8, + BLUE = 4, + GREEN = 2, + NONE = 0, + RED = 1, +} + +return ColorWriteMask \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccb/CommandBuffer.lua b/addons/cclua/cocos2d/library/ccb/CommandBuffer.lua new file mode 100644 index 00000000..a3a2d4cf --- /dev/null +++ b/addons/cclua/cocos2d/library/ccb/CommandBuffer.lua @@ -0,0 +1,99 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccb.CommandBuffer + +---Store encoded commands for the GPU to execute. +---A command buffer stores encoded commands until the buffer is committed for execution by the GPU +---@class ccb.CommandBuffer : cc.Ref +local CommandBuffer = {} + +---\name Setters & Getters +--- +---Indicate the begining of a frame +function CommandBuffer:beginFrame() end + +---Get a screen snapshot +---@param callback fun(arg1: string, arg2: integer, arg3: integer) # A callback to deal with screen snapshot image. +function CommandBuffer:captureScreen(callback) end + +---Draw primitives without an index list. +---@param primitiveType ccb.PrimitiveType # The type of primitives that elements are assembled into. +---@param start any # For each instance, the first index to draw +---@param count any # For each instance, the number of indexes to draw +---\see `drawElements(PrimitiveType primitiveType, IndexFormat indexType, unsigned int count, unsigned int offset)` +function CommandBuffer:drawArrays(primitiveType, start, count) end + +---Draw primitives with an index list. +---@param primitiveType ccb.PrimitiveType # The type of primitives that elements are assembled into. +---@param indexType ccb.IndexFormat # The type if indexes, either 16 bit integer or 32 bit integer. +---@param count any # The number of indexes to read from the index buffer for each instance. +---@param offset any # Byte offset within indexBuffer to start reading indexes from. +---\see `setIndexBuffer(Buffer* buffer)` +---\see `drawArrays(PrimitiveType primitiveType, unsigned int start, unsigned int count)` +function CommandBuffer:drawElements(primitiveType, indexType, count, offset) end + +---Present a drawable and commit a command buffer so it can be executed as soon as possible. +function CommandBuffer:endFrame() end + +---Do some resources release. +function CommandBuffer:endRenderPass() end + +---Fixed-function state +---@param mode ccb.CullMode # Controls if primitives are culled when front facing, back facing, or not culled at all. +function CommandBuffer:setCullMode(mode) end + +---Set depthStencil status +---@param depthStencilState ccb.DepthStencilState # Specifies the depth and stencil status +function CommandBuffer:setDepthStencilState(depthStencilState) end + +---Set indexes when drawing primitives with index list +---\ buffer A buffer object that the device will read indexes from. +---\ see `drawElements(PrimitiveType primitiveType, IndexFormat indexType, unsigned int count, unsigned int offset)` +---@param buffer ccb.Buffer +function CommandBuffer:setIndexBuffer(buffer) end + +---Fixed-function state +---@param lineWidth number # Specifies the width of rasterized lines. +function CommandBuffer:setLineWidth(lineWidth) end + +---Set unifroms and textures +---@param programState ccb.ProgramState # A programState object that hold the uniform and texture data. +function CommandBuffer:setProgramState(programState) end + +---Sets the current render pipeline state object. +---@param renderPipeline ccb.RenderPipeline # An object that contains the graphics functions and configuration state used in a render pass. +function CommandBuffer:setRenderPipeline(renderPipeline) end + +---Fixed-function state +---@param x number # , y Specifies the lower left corner of the scissor box +---\param wdith Specifies the width of the scissor box +---@param height number # Specifies the height of the scissor box +---@param isEnabled boolean +---@param y number +---@param width number +function CommandBuffer:setScissorRect(isEnabled, x, y, width, height) end + +---Update both front and back stencil reference value. +---@param value integer # Specifies stencil reference value. +--- +---Update stencil reference value. +---\param frontRef Specifies front stencil reference value. +---\param backRef Specifies back stencil reference value. +---@overload fun(self: ccb.CommandBuffer, frontRef: integer, backRef: integer) +function CommandBuffer:setStencilReferenceValue(value) end + +---Set a global buffer for all vertex shaders at the given bind point index 0. +---@param buffer ccb.Buffer # The vertex buffer to be setted in the buffer argument table. +function CommandBuffer:setVertexBuffer(buffer) end + +---Fixed-function state +---@param x integer # The x coordinate of the upper-left corner of the viewport. +---@param y integer # The y coordinate of the upper-left corner of the viewport. +---@param w integer # The width of the viewport, in pixels. +---@param h integer # The height of the viewport, in pixels. +function CommandBuffer:setViewport(x, y, w, h) end + +---Fixed-function state +---@param winding ccb.Winding # The winding order of front-facing primitives. +function CommandBuffer:setWinding(winding) end + +return CommandBuffer \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccb/CompareFunction.lua b/addons/cclua/cocos2d/library/ccb/CompareFunction.lua new file mode 100644 index 00000000..6d20c389 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccb/CompareFunction.lua @@ -0,0 +1,20 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccb.CompareFunction + +---@type ccb.CompareFunction +local VALUE + +--- +---@enum ccb.CompareFunction +local CompareFunction = { + ALWAYS = 7, + EQUAL = 5, + GREATER = 3, + GREATER_EQUAL = 4, + LESS = 1, + LESS_EQUAL = 2, + NEVER = 0, + NOT_EQUAL = 6, +} + +return CompareFunction \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccb/CullMode.lua b/addons/cclua/cocos2d/library/ccb/CullMode.lua new file mode 100644 index 00000000..1b81afe7 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccb/CullMode.lua @@ -0,0 +1,15 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccb.CullMode + +---@type ccb.CullMode +local VALUE + +--- +---@enum ccb.CullMode +local CullMode = { + BACK = 1, + FRONT = 2, + NONE = 0, +} + +return CullMode \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccb/DepthStencilDescriptor.lua b/addons/cclua/cocos2d/library/ccb/DepthStencilDescriptor.lua new file mode 100644 index 00000000..3d65aa5f --- /dev/null +++ b/addons/cclua/cocos2d/library/ccb/DepthStencilDescriptor.lua @@ -0,0 +1,20 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccb.DepthStencilDescriptor + +---Depth and stencil descriptor. +---@class ccb.DepthStencilDescriptor +---@field backFaceStencil ccb.StencilDescriptor +---@field depthCompareFunction ccb.CompareFunction +---@field depthTestEnabled boolean +---@field depthWriteEnabled boolean +---@field frontFaceStencil ccb.StencilDescriptor +---@field stencilTestEnabled boolean +local DepthStencilDescriptor = {} + +---@return any +function DepthStencilDescriptor:__gc() end + +---@return any +function DepthStencilDescriptor:__olua_move() end + +return DepthStencilDescriptor \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccb/DepthStencilState.lua b/addons/cclua/cocos2d/library/ccb/DepthStencilState.lua new file mode 100644 index 00000000..cfd7d2b4 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccb/DepthStencilState.lua @@ -0,0 +1,8 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccb.DepthStencilState + +---Store Depth and stencil status. +---@class ccb.DepthStencilState : cc.Ref +local DepthStencilState = {} + +return DepthStencilState \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccb/Device.lua b/addons/cclua/cocos2d/library/ccb/Device.lua new file mode 100644 index 00000000..9e251e9e --- /dev/null +++ b/addons/cclua/cocos2d/library/ccb/Device.lua @@ -0,0 +1,58 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccb.Device + +---New or create resources from Device. +---@class ccb.Device : cc.Ref +---@field deviceInfo ccb.DeviceInfo Get a DeviceInfo object. \return A DeviceInfo object. +---@field instance ccb.Device Returns a shared instance of the device. +local Device = {} + +---Create an auto released DepthStencilState object. +---@param descriptor ccb.DepthStencilDescriptor # Specifies depth and stencil description. +---@return ccb.DepthStencilState # An auto release DepthStencilState object. +function Device:createDepthStencilState(descriptor) end + +---Get a DeviceInfo object. +---@return ccb.DeviceInfo # A DeviceInfo object. +function Device:getDeviceInfo() end + +---Returns a shared instance of the device. +---@return ccb.Device +function Device.getInstance() end + +---New a Buffer object, not auto released. +---@param size integer # Specifies the size in bytes of the buffer object's new data store. +---@param type ccb.BufferType # Specifies the target buffer object. The symbolic constant must be BufferType::VERTEX or BufferType::INDEX. +---@param usage ccb.BufferUsage # Specifies the expected usage pattern of the data store. The symbolic constant must be BufferUsage::STATIC, BufferUsage::DYNAMIC. +---@return ccb.Buffer # A Buffer object. +function Device:newBuffer(size, type, usage) end + +---New a CommandBuffer object, not auto released. +---@return ccb.CommandBuffer # A CommandBuffer object. +function Device:newCommandBuffer() end + +---Create an auto released Program. +---@param vertexShader string # Specifes this is a vertex shader source. +---@param fragmentShader string # Specifes this is a fragment shader source. +---@return ccb.Program # A Program instance. +function Device:newProgram(vertexShader, fragmentShader) end + +---New a RenderPipeline object, not auto released. +---\param descriptor Specifies render pipeline description. +---@return ccb.RenderPipeline # A RenderPipeline object. +function Device:newRenderPipeline() end + +---New a TextureBackend object, not auto released. +---@param descriptor ccb.TextureDescriptor # Specifies texture description. +---@return ccb.TextureBackend # A TextureBackend object. +function Device:newTexture(descriptor) end + +---This property controls whether or not the drawables' +---metal textures may only be used for framebuffer attachments (YES) or +---whether they may also be used for texture sampling and pixel +---read/write operations (NO). +---@param frameBufferOnly boolean # A value of YES allows CAMetalLayer to allocate the MTLTexture objects in ways that are optimized for display purposes that makes them unsuitable for sampling. The recommended value for most applications is YES. +---\note This interface is specificaly designed for metal. +function Device:setFrameBufferOnly(frameBufferOnly) end + +return Device \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccb/DeviceInfo.lua b/addons/cclua/cocos2d/library/ccb/DeviceInfo.lua new file mode 100644 index 00000000..50278bf9 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccb/DeviceInfo.lua @@ -0,0 +1,63 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccb.DeviceInfo + +---Used to query features and implementation limits +---@class ccb.DeviceInfo +---@field extension string get extensions. \return Extension supported by device. +---@field maxAttributes integer Get maximum attribute counts. \return Maximum attribute counts. +---@field maxSamplesAllowed integer Get maximum sampler count. \return Maximum sampler count. +---@field maxTextureSize integer Get maximum texture size. \return Maximum texture size. +---@field maxTextureUnits integer Get maximum texture unit. \return Maximum texture unit. +---@field renderer string Get the full name of the vendor device. \return The full name of the vendor device. +---@field vendor string Get vendor device name. \return Vendor device name. +---@field version string Get version name. \return Version name. +local DeviceInfo = {} + +---@return any +function DeviceInfo:__gc() end + +---@return any +function DeviceInfo:__olua_move() end + +---Check if feature supported by device. +---@param feature ccb.FeatureType # Specify feature to be query. +---@return boolean # true if the feature is supported, false otherwise. +function DeviceInfo:checkForFeatureSupported(feature) end + +---get extensions. +---@return string # Extension supported by device. +function DeviceInfo:getExtension() end + +---Get maximum attribute counts. +---@return integer # Maximum attribute counts. +function DeviceInfo:getMaxAttributes() end + +---Get maximum sampler count. +---@return integer # Maximum sampler count. +function DeviceInfo:getMaxSamplesAllowed() end + +---Get maximum texture size. +---@return integer # Maximum texture size. +function DeviceInfo:getMaxTextureSize() end + +---Get maximum texture unit. +---@return integer # Maximum texture unit. +function DeviceInfo:getMaxTextureUnits() end + +---Get the full name of the vendor device. +---@return string # The full name of the vendor device. +function DeviceInfo:getRenderer() end + +---Get vendor device name. +---@return string # Vendor device name. +function DeviceInfo:getVendor() end + +---Get version name. +---@return string # Version name. +function DeviceInfo:getVersion() end + +---Gather features and implementation limits +---@return boolean +function DeviceInfo:init() end + +return DeviceInfo \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccb/FeatureType.lua b/addons/cclua/cocos2d/library/ccb/FeatureType.lua new file mode 100644 index 00000000..c557d55a --- /dev/null +++ b/addons/cclua/cocos2d/library/ccb/FeatureType.lua @@ -0,0 +1,23 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccb.FeatureType + +---@type ccb.FeatureType +local VALUE + +--- +---@enum ccb.FeatureType +local FeatureType = { + AMD_COMPRESSED_ATC = 2, + ASTC = 10, + DEPTH24 = 9, + DISCARD_FRAMEBUFFER = 5, + ETC1 = 0, + IMG_FORMAT_BGRA8888 = 4, + MAPBUFFER = 8, + PACKED_DEPTH_STENCIL = 6, + PVRTC = 3, + S3TC = 1, + VAO = 7, +} + +return FeatureType \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccb/IndexFormat.lua b/addons/cclua/cocos2d/library/ccb/IndexFormat.lua new file mode 100644 index 00000000..286f94d6 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccb/IndexFormat.lua @@ -0,0 +1,14 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccb.IndexFormat + +---@type ccb.IndexFormat +local VALUE + +--- +---@enum ccb.IndexFormat +local IndexFormat = { + U_INT = 1, + U_SHORT = 0, +} + +return IndexFormat \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccb/PixelFormat.lua b/addons/cclua/cocos2d/library/ccb/PixelFormat.lua new file mode 100644 index 00000000..99f9f736 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccb/PixelFormat.lua @@ -0,0 +1,61 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccb.PixelFormat + +---@type ccb.PixelFormat +local VALUE + +--- +---@enum ccb.PixelFormat +local PixelFormat = { + ---! 8-bit textures used as masks + A8 = 5, + ---! 16-bit textures used as masks + AI88 = 7, + ---! ATITC-compressed texture: ATC_EXPLICIT_ALPHA + ATC_EXPLICIT_ALPHA = 19, + ---! ATITC-compressed texture: ATC_INTERPOLATED_ALPHA + ATC_INTERPOLATED_ALPHA = 20, + ---! ATITC-compressed texture: ATC_RGB + ATC_RGB = 18, + ---! auto detect the type + AUTO = 0, + ---! 32-bit texture: BGRA8888 + BGRA8888 = 1, + D24S8 = 24, + DEFAULT = 0, + ---! ETC-compressed texture: ETC + ETC = 14, + ---! 8-bit intensity texture + I8 = 6, + MTL_ABGR4 = 23, + ---! Default texture format: AUTO + MTL_B5G6R5 = 21, + MTL_BGR5A1 = 22, + NONE = -1, + ---! 2-bit PVRTC-compressed texture: PVRTC2 + PVRTC2 = 12, + ---! 2-bit PVRTC-compressed texture: PVRTC2 (has alpha channel) + PVRTC2A = 13, + ---! 4-bit PVRTC-compressed texture: PVRTC4 + PVRTC4 = 10, + ---! 4-bit PVRTC-compressed texture: PVRTC4 (has alpha channel) + PVRTC4A = 11, + ---! 16-bit texture without Alpha channel + RGB565 = 4, + ---! 16-bit textures: RGB5A1 + RGB5A1 = 9, + ---! 24-bit texture: RGBA888 + RGB888 = 3, + ---! 16-bit textures: RGBA4444 + RGBA4444 = 8, + ---! 32-bit texture: RGBA8888 + RGBA8888 = 2, + ---! S3TC-compressed texture: S3TC_Dxt1 + S3TC_DXT1 = 15, + ---! S3TC-compressed texture: S3TC_Dxt3 + S3TC_DXT3 = 16, + ---! S3TC-compressed texture: S3TC_Dxt5 + S3TC_DXT5 = 17, +} + +return PixelFormat \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccb/PrimitiveType.lua b/addons/cclua/cocos2d/library/ccb/PrimitiveType.lua new file mode 100644 index 00000000..34b8f083 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccb/PrimitiveType.lua @@ -0,0 +1,17 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccb.PrimitiveType + +---@type ccb.PrimitiveType +local VALUE + +--- +---@enum ccb.PrimitiveType +local PrimitiveType = { + LINE = 1, + LINE_STRIP = 2, + POINT = 0, + TRIANGLE = 3, + TRIANGLE_STRIP = 4, +} + +return PrimitiveType \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccb/Program.lua b/addons/cclua/cocos2d/library/ccb/Program.lua new file mode 100644 index 00000000..1d638fba --- /dev/null +++ b/addons/cclua/cocos2d/library/ccb/Program.lua @@ -0,0 +1,80 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccb.Program + +---A program. +---@class ccb.Program : cc.Ref +---@field activeAttributes { [string]: ccb.AttributeBindInfo } Get active vertex attributes. \return Active vertex attributes. key is active attribute name, Value is corresponding attribute info. +---@field fragmentShader string Get fragment shader. \ Fragment shader. +---@field maxFragmentLocation integer Get maximum fragment location. \return Maximum fragment location. +---@field maxVertexLocation integer Get maximum vertex location. \return Maximum vertex locaiton. +---@field programType ccb.ProgramType Get engine built-in program type. \return The built-in program type. +---@field vertexShader string Get vertex shader. \return Vertex shader. +local Program = {} + +---Get active vertex attributes. +---@return { [string]: ccb.AttributeBindInfo } # Active vertex attributes. key is active attribute name, Value is corresponding attribute info. +function Program:getActiveAttributes() end + +---Get a uniformInfo in given location from the specific shader stage. +---@param stage ccb.ShaderStage # Specifies the shader stage. The symbolic constant can be either VERTEX or FRAGMENT. +---@param location integer # Specifies the uniform locaion. +---@return ccb.UniformInfo # The uniformInfo. +function Program:getActiveUniformInfo(stage, location) end + +---Get all uniformInfos. +---@return { [string]: ccb.UniformInfo } # The uniformInfos. +---@param stage ccb.ShaderStage +function Program:getAllActiveUniformInfo(stage) end + +---Get attribute location by attribute name. +---@param name string # Specifies the attribute name. +---@return integer # The attribute location. +--- +---Get attribute location by engine built-in attribute enum name. +---\param name Specifies the engine built-in attribute enum name. +---\return The attribute location. +---@overload fun(self: ccb.Program, name: ccb.Attribute): integer +function Program:getAttributeLocation(name) end + +---Get engine built-in program. +---@param type ccb.ProgramType # Specifies the built-in program type. +---@return ccb.Program +function Program.getBuiltinProgram(type) end + +---Get fragment shader. +---\ Fragment shader. +---@return string +function Program:getFragmentShader() end + +---Get maximum fragment location. +---@return integer # Maximum fragment location. +function Program:getMaxFragmentLocation() end + +---Get maximum vertex location. +---@return integer # Maximum vertex locaiton. +function Program:getMaxVertexLocation() end + +---Get engine built-in program type. +---@return ccb.ProgramType # The built-in program type. +function Program:getProgramType() end + +---Get uniform buffer size in bytes that can hold all the uniforms. +---@param stage ccb.ShaderStage # Specifies the shader stage. The symbolic constant can be either VERTEX or FRAGMENT. +---@return any # The uniform buffer size in bytes. +function Program:getUniformBufferSize(stage) end + +---Get uniform location by name. +---@param uniform string # Specifies the uniform name. +---@return ccb.UniformLocation # The uniform location. +--- +---Get uniform location by engine built-in uniform enum name. +---\param name Specifies the engine built-in uniform enum name. +---\return The uniform location. +---@overload fun(self: ccb.Program, name: ccb.Uniform): ccb.UniformLocation +function Program:getUniformLocation(uniform) end + +---Get vertex shader. +---@return string # Vertex shader. +function Program:getVertexShader() end + +return Program \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccb/ProgramCache.lua b/addons/cclua/cocos2d/library/ccb/ProgramCache.lua new file mode 100644 index 00000000..f14a9267 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccb/ProgramCache.lua @@ -0,0 +1,41 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccb.ProgramCache + +---Cache and reuse program object. +---@class ccb.ProgramCache : cc.Ref +---@field instance ccb.ProgramCache returns the shared instance +local ProgramCache = {} + +---Add custom program to the cache. +---@param key string # Specifies the key used to store the program. +---@param program ccb.Program # Specifies the program to store in the cache. +function ProgramCache:addCustomProgram(key, program) end + +---purges the cache. It releases the retained instance. +function ProgramCache.destroyInstance() end + +---get built-in program +---@param type ccb.ProgramType +---@return ccb.Program +function ProgramCache:getBuiltinProgram(type) end + +---Get custom program from cache. +---@param key string +---@return ccb.Program +function ProgramCache:getCustomProgram(key) end + +---returns the shared instance +---@return ccb.ProgramCache +function ProgramCache.getInstance() end + +---Remove all program objects from cache. +function ProgramCache:removeAllPrograms() end + +---Remove a program object from cache. +---@param program ccb.Program # Specifies the program object to move. +function ProgramCache:removeProgram(program) end + +---Remove all unused program objects from cache. +function ProgramCache:removeUnusedProgram() end + +return ProgramCache \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccb/ProgramState.lua b/addons/cclua/cocos2d/library/ccb/ProgramState.lua new file mode 100644 index 00000000..0f59e9d9 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccb/ProgramState.lua @@ -0,0 +1,87 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccb.ProgramState + +---A program state object can create or reuse a program. +---Each program state object keep its own unifroms and textures data. +---@class ccb.ProgramState : cc.Ref +---@field fragmentTextureInfos { [integer]: ccb.TextureInfo } Get fragment texture informations \return Fragment texture informations. Key is the texture location, Value store the texture informations +---@field program ccb.Program Get the program object. +---@field vertexTextureInfos { [integer]: ccb.TextureInfo } Get vertex texture informations \return Vertex texture informations. Key is the texture location, Value store the texture informations +local ProgramState = {} + +---Deep clone ProgramState +---@return ccb.ProgramState +function ProgramState:clone() end + +---Get an attribute location by the actual attribute name. +---@param name string # Specifies the attribute name. +---@return integer # Attribute location. +---\see `int getAttributeLocation(const std::string& name) const` +--- +---Get an attribute location by the engine built-in attribute name. +---\param name Specifies the built-in attribute name. +---\return Attribute location. +---\see `int getAttributeLocation(const std::string& name) const` +---@overload fun(self: ccb.ProgramState, name: ccb.Attribute): integer +function ProgramState:getAttributeLocation(name) end + +---Get fragment texture informations +---@return { [integer]: ccb.TextureInfo } # Fragment texture informations. Key is the texture location, Value store the texture informations +function ProgramState:getFragmentTextureInfos() end + +---Get the program object. +---@return ccb.Program +function ProgramState:getProgram() end + +---Get uniform location in given uniform name. +---@param uniform string # Specifies the uniform name. +---@return ccb.UniformLocation # Uniform location. +---\see `backend::UniformLocation getUniformLocation(backend::Uniform name) const` +--- +---Get uniform location in a more efficient way by the given built-in uniform name. +---\param uniform Specifies the engin built-in uniform name. +---\return Uniform location. +---\see `backend::UniformLocation getUniformLocation(backend::Uniform name) const` +---@overload fun(self: ccb.ProgramState, name: ccb.Uniform): ccb.UniformLocation +function ProgramState:getUniformLocation(uniform) end + +---@return any +function ProgramState:getVertexLayout() end + +---Get vertex texture informations +---@return { [integer]: ccb.TextureInfo } # Vertex texture informations. Key is the texture location, Value store the texture informations +function ProgramState:getVertexTextureInfos() end + +---@param program ccb.Program # Specifies the program. +---@return ccb.ProgramState +function ProgramState.new(program) end + +---Sets a uniform auto-binding. +--- +---This method parses the passed in autoBinding string and attempts to convert it +---to an enumeration value. If it matches to one of the predefined strings, it will create a +---callback to get the correct value at runtime. +--- +---@param uniformName string # The name of the material parameter to store an auto-binding for. +---@param autoBinding string # A string matching one of the built-in AutoBinding enum constants. +function ProgramState:setParameterAutoBinding(uniformName, autoBinding) end + +---Set texture. +---@param uniformLocation ccb.UniformLocation # Specifies texture location. +---@param slot integer # Specifies texture slot selector. +---@param texture ccb.TextureBackend # Specifies a pointer to backend texture. +function ProgramState:setTexture(uniformLocation, slot, texture) end + +---Set textures in array. +---@param uniformLocation ccb.UniformLocation # Specifies texture location. +---@param slots integer[] # Specifies texture slot selector. +---@param textures ccb.TextureBackend[] # Specifies a vector of backend texture object. +function ProgramState:setTextureArray(uniformLocation, slots, textures) end + +---Specify the value of a uniform variable for the current program state object. +---@param uniformLocation ccb.UniformLocation # Specifies the uniform location. +---@param data any # Specifies the new values to be used for the specified uniform variable. +---@param size any # Specifies the uniform data size. +function ProgramState:setUniform(uniformLocation, data, size) end + +return ProgramState \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccb/ProgramType.lua b/addons/cclua/cocos2d/library/ccb/ProgramType.lua new file mode 100644 index 00000000..8742219b --- /dev/null +++ b/addons/cclua/cocos2d/library/ccb/ProgramType.lua @@ -0,0 +1,43 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccb.ProgramType + +---@type ccb.ProgramType +local VALUE + +--- +---@enum ccb.ProgramType +local ProgramType = { + CAMERA_CLEAR = 16, + CUSTOM_PROGRAM = 30, + ETC1 = 13, + ETC1_GRAY = 14, + GRAY_SCALE = 15, + LABEL_DISTANCE_NORMAL = 11, + LABEL_NORMAL = 8, + LABLE_DISTANCEFIELD_GLOW = 10, + LABLE_OUTLINE = 9, + LAYER_RADIA_GRADIENT = 12, + LINE_COLOR_3D = 18, + PARTICLE_COLOR_3D = 29, + PARTICLE_TEXTURE_3D = 28, + POSITION = 3, + POSITION_3D = 25, + POSITION_BUMPEDNORMAL_TEXTURE_3D = 26, + POSITION_COLOR = 2, + POSITION_COLOR_LENGTH_TEXTURE = 0, + POSITION_COLOR_TEXTURE_AS_POINTSIZE = 1, + POSITION_NORMAL_3D = 23, + POSITION_NORMAL_TEXTURE_3D = 22, + POSITION_TEXTURE = 5, + POSITION_TEXTURE_3D = 24, + POSITION_TEXTURE_COLOR = 6, + POSITION_TEXTURE_COLOR_ALPHA_TEST = 7, + POSITION_UCOLOR = 4, + SKINPOSITION_BUMPEDNORMAL_TEXTURE_3D = 27, + SKINPOSITION_NORMAL_TEXTURE_3D = 21, + SKINPOSITION_TEXTURE_3D = 20, + SKYBOX_3D = 19, + TERRAIN_3D = 17, +} + +return ProgramType \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccb/RenderPipeline.lua b/addons/cclua/cocos2d/library/ccb/RenderPipeline.lua new file mode 100644 index 00000000..e85797b5 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccb/RenderPipeline.lua @@ -0,0 +1,8 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccb.RenderPipeline + +---Render pipeline +---@class ccb.RenderPipeline : cc.Ref +local RenderPipeline = {} + +return RenderPipeline \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccb/SamplerAddressMode.lua b/addons/cclua/cocos2d/library/ccb/SamplerAddressMode.lua new file mode 100644 index 00000000..28e766a7 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccb/SamplerAddressMode.lua @@ -0,0 +1,16 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccb.SamplerAddressMode + +---@type ccb.SamplerAddressMode +local VALUE + +--- +---@enum ccb.SamplerAddressMode +local SamplerAddressMode = { + CLAMP_TO_EDGE = 2, + DONT_CARE = 3, + MIRROR_REPEAT = 1, + REPEAT = 0, +} + +return SamplerAddressMode \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccb/SamplerDescriptor.lua b/addons/cclua/cocos2d/library/ccb/SamplerDescriptor.lua new file mode 100644 index 00000000..e2385b6e --- /dev/null +++ b/addons/cclua/cocos2d/library/ccb/SamplerDescriptor.lua @@ -0,0 +1,22 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccb.SamplerDescriptor + +--- +---@class ccb.SamplerDescriptor +---@field magFilter ccb.SamplerFilter +---@field minFilter ccb.SamplerFilter +---@field sAddressMode ccb.SamplerAddressMode +---@field tAddressMode ccb.SamplerAddressMode +local SamplerDescriptor = {} + +---@return any +function SamplerDescriptor:__gc() end + +---@return any +function SamplerDescriptor:__olua_move() end + +---@return ccb.SamplerDescriptor +---@overload fun(_magFilter: ccb.SamplerFilter, _minFilter: ccb.SamplerFilter, _sAddressMode: ccb.SamplerAddressMode, _tAddressMode: ccb.SamplerAddressMode): ccb.SamplerDescriptor +function SamplerDescriptor.new() end + +return SamplerDescriptor \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccb/SamplerFilter.lua b/addons/cclua/cocos2d/library/ccb/SamplerFilter.lua new file mode 100644 index 00000000..f270eaa5 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccb/SamplerFilter.lua @@ -0,0 +1,19 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccb.SamplerFilter + +---@type ccb.SamplerFilter +local VALUE + +--- +---@enum ccb.SamplerFilter +local SamplerFilter = { + DONT_CARE = 6, + LINEAR = 3, + LINEAR_MIPMAP_LINEAR = 4, + LINEAR_MIPMAP_NEAREST = 5, + NEAREST = 0, + NEAREST_MIPMAP_LINEAR = 2, + NEAREST_MIPMAP_NEAREST = 1, +} + +return SamplerFilter \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccb/ShaderCache.lua b/addons/cclua/cocos2d/library/ccb/ShaderCache.lua new file mode 100644 index 00000000..376bb751 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccb/ShaderCache.lua @@ -0,0 +1,31 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccb.ShaderCache + +---Create and reuse shader module. +---@class ccb.ShaderCache : cc.Ref +---@field instance ccb.ShaderCache returns the shared instance +local ShaderCache = {} + +---purges the cache. It releases the retained instance. +function ShaderCache.destroyInstance() end + +---returns the shared instance +---@return ccb.ShaderCache +function ShaderCache.getInstance() end + +---Create a fragment shader module. +---If it is created before, then just return the cached shader module. +---@param shaderSource string # The source code of the shader. +---@return ccb.ShaderModule +function ShaderCache.newFragmentShaderModule(shaderSource) end + +---Create a vertex shader module and add it to cache. +---If it is created before, then just return the cached shader module. +---@param shaderSource string # The source code of the shader. +---@return ccb.ShaderModule +function ShaderCache.newVertexShaderModule(shaderSource) end + +---Remove all unused shaders. +function ShaderCache:removeUnusedShader() end + +return ShaderCache \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccb/ShaderModule.lua b/addons/cclua/cocos2d/library/ccb/ShaderModule.lua new file mode 100644 index 00000000..a2ecfab6 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccb/ShaderModule.lua @@ -0,0 +1,17 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccb.ShaderModule + +---Create shader. +---@class ccb.ShaderModule : cc.Ref +---@field hashValue any +---@field shaderStage ccb.ShaderStage Get shader stage. The symbolic constant can be either VERTEX or FRAGMENT. \return Shader stage. +local ShaderModule = {} + +---@return any +function ShaderModule:getHashValue() end + +---Get shader stage. The symbolic constant can be either VERTEX or FRAGMENT. +---@return ccb.ShaderStage # Shader stage. +function ShaderModule:getShaderStage() end + +return ShaderModule \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccb/ShaderStage.lua b/addons/cclua/cocos2d/library/ccb/ShaderStage.lua new file mode 100644 index 00000000..44fbbb3f --- /dev/null +++ b/addons/cclua/cocos2d/library/ccb/ShaderStage.lua @@ -0,0 +1,15 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccb.ShaderStage + +---@type ccb.ShaderStage +local VALUE + +--- +---@enum ccb.ShaderStage +local ShaderStage = { + FRAGMENT = 1, + VERTEX = 0, + VERTEX_AND_FRAGMENT = 2, +} + +return ShaderStage \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccb/StencilDescriptor.lua b/addons/cclua/cocos2d/library/ccb/StencilDescriptor.lua new file mode 100644 index 00000000..08515498 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccb/StencilDescriptor.lua @@ -0,0 +1,20 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccb.StencilDescriptor + +---Stencil descriptor. +---@class ccb.StencilDescriptor +---@field depthFailureOperation ccb.StencilOperation +---@field depthStencilPassOperation ccb.StencilOperation +---@field readMask integer +---@field stencilCompareFunction ccb.CompareFunction +---@field stencilFailureOperation ccb.StencilOperation +---@field writeMask integer +local StencilDescriptor = {} + +---@return any +function StencilDescriptor:__gc() end + +---@return any +function StencilDescriptor:__olua_move() end + +return StencilDescriptor \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccb/StencilOperation.lua b/addons/cclua/cocos2d/library/ccb/StencilOperation.lua new file mode 100644 index 00000000..807c5d88 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccb/StencilOperation.lua @@ -0,0 +1,18 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccb.StencilOperation + +---@type ccb.StencilOperation +local VALUE + +--- +---@enum ccb.StencilOperation +local StencilOperation = { + DECREMENT_WRAP = 5, + INCREMENT_WRAP = 4, + INVERT = 3, + KEEP = 0, + REPLACE = 2, + ZERO = 1, +} + +return StencilOperation \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccb/Texture2DBackend.lua b/addons/cclua/cocos2d/library/ccb/Texture2DBackend.lua new file mode 100644 index 00000000..90a125e0 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccb/Texture2DBackend.lua @@ -0,0 +1,52 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccb.Texture2DBackend + +---A 2D texture. +---@class ccb.Texture2DBackend : ccb.TextureBackend +---@field height any Get texture height. \return Texture height. +---@field width any Get texture width. \return Texture width. +local Texture2DBackend = {} + +---Get texture height. +---@return any # Texture height. +function Texture2DBackend:getHeight() end + +---Get texture width. +---@return any # Texture width. +function Texture2DBackend:getWidth() end + +---Update a two-dimensional texture image in a compressed format +---@param data olua.uint8 # Specifies a pointer to the compressed image data in memory. +---@param width any # Specifies the width of the texture image. +---@param height any # Specifies the height of the texture image. +---@param dataLen any # Specifies the totoal size of compressed image in bytes. +---@param level any # Specifies the level-of-detail number. Level 0 is the base image level. Level n is the nth mipmap reduction image. +function Texture2DBackend:updateCompressedData(data, width, height, dataLen, level) end + +---Update a two-dimensional texture subimage in a compressed format +---@param xoffset any # Specifies a texel offset in the x direction within the texture array. +---@param yoffset any # Specifies a texel offset in the y direction within the texture array. +---@param width any # Specifies the width of the texture subimage. +---@param height any # Specifies the height of the texture subimage. +---@param dataLen any # Specifies the totoal size of compressed subimage in bytes. +---@param level any # Specifies the level-of-detail number. Level 0 is the base image level. Level n is the nth mipmap reduction image. +---@param data olua.uint8 # Specifies a pointer to the compressed image data in memory. +function Texture2DBackend:updateCompressedSubData(xoffset, yoffset, width, height, dataLen, level, data) end + +---Update a two-dimensional texture image +---@param data olua.uint8 # Specifies a pointer to the image data in memory. +---@param width any # Specifies the width of the texture image. +---@param height any # Specifies the height of the texture image. +---@param level any # Specifies the level-of-detail number. Level 0 is the base image level. Level n is the nth mipmap reduction image. +function Texture2DBackend:updateData(data, width, height, level) end + +---Update a two-dimensional texture subimage +---@param xoffset any # Specifies a texel offset in the x direction within the texture array. +---@param yoffset any # Specifies a texel offset in the y direction within the texture array. +---@param width any # Specifies the width of the texture subimage. +---@param height any # Specifies the height of the texture subimage. +---@param level any # Specifies the level-of-detail number. Level 0 is the base image level. Level n is the nth mipmap reduction image. +---@param data olua.uint8 # Specifies a pointer to the image data in memory. +function Texture2DBackend:updateSubData(xoffset, yoffset, width, height, level, data) end + +return Texture2DBackend \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccb/TextureBackend.lua b/addons/cclua/cocos2d/library/ccb/TextureBackend.lua new file mode 100644 index 00000000..28686439 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccb/TextureBackend.lua @@ -0,0 +1,47 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccb.TextureBackend + +---A base texture +---@class ccb.TextureBackend : cc.Ref +---@field textureFormat ccb.PixelFormat Get texture format. \return Texture format. +---@field textureType ccb.TextureType Get texture type. Symbolic constant value can be either TEXTURE_2D or TEXTURE_CUBE. \return Texture type. +---@field textureUsage ccb.TextureUsage Get texture usage. Symbolic constant can be READ, WRITE or RENDER_TARGET. \return Texture usage. +local TextureBackend = {} + +---Generate mipmaps. +function TextureBackend:generateMipmaps() end + +---Read a block of pixels from the drawable texture +---@param x any # ,y Specify the window coordinates of the first pixel that is read from the drawable texture. This location is the lower left corner of a rectangular block of pixels. +---@param width any # ,height Specify the dimensions of the pixel rectangle. width and height of one correspond to a single pixel. +---@param flipImage boolean # Specifies if needs to flip the image. +---@param callback fun(arg1: string, arg2: any, arg3: any) # Specifies a call back function to deal with the image. +---@param y any +---@param height any +function TextureBackend:getBytes(x, y, width, height, flipImage, callback) end + +---Get texture format. +---@return ccb.PixelFormat # Texture format. +function TextureBackend:getTextureFormat() end + +---Get texture type. Symbolic constant value can be either TEXTURE_2D or TEXTURE_CUBE. +---@return ccb.TextureType # Texture type. +function TextureBackend:getTextureType() end + +---Get texture usage. Symbolic constant can be READ, WRITE or RENDER_TARGET. +---@return ccb.TextureUsage # Texture usage. +function TextureBackend:getTextureUsage() end + +---Check if mipmap had generated before. +---@return boolean # true if the mipmap has always generated before, otherwise false. +function TextureBackend:hasMipmaps() end + +---Update sampler +---@param sampler ccb.SamplerDescriptor # Specifies the sampler descriptor. +function TextureBackend:updateSamplerDescriptor(sampler) end + +---Update texture description. +---@param descriptor ccb.TextureDescriptor # Specifies texture and sampler descriptor. +function TextureBackend:updateTextureDescriptor(descriptor) end + +return TextureBackend \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccb/TextureCubeFace.lua b/addons/cclua/cocos2d/library/ccb/TextureCubeFace.lua new file mode 100644 index 00000000..08b18994 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccb/TextureCubeFace.lua @@ -0,0 +1,18 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccb.TextureCubeFace + +---@type ccb.TextureCubeFace +local VALUE + +--- +---@enum ccb.TextureCubeFace +local TextureCubeFace = { + NEGATIVE_X = 1, + NEGATIVE_Y = 3, + NEGATIVE_Z = 5, + POSITIVE_X = 0, + POSITIVE_Y = 2, + POSITIVE_Z = 4, +} + +return TextureCubeFace \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccb/TextureCubemapBackend.lua b/addons/cclua/cocos2d/library/ccb/TextureCubemapBackend.lua new file mode 100644 index 00000000..314c45d6 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccb/TextureCubemapBackend.lua @@ -0,0 +1,13 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccb.TextureCubemapBackend + +---A cubemap texture. +---@class ccb.TextureCubemapBackend : ccb.TextureBackend +local TextureCubemapBackend = {} + +---Update texutre cube data in give slice side. +---@param side ccb.TextureCubeFace # Specifies which slice texture of cube to be update. +---@param data any # Specifies a pointer to the image data in memory. +function TextureCubemapBackend:updateFaceData(side, data) end + +return TextureCubemapBackend \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccb/TextureDescriptor.lua b/addons/cclua/cocos2d/library/ccb/TextureDescriptor.lua new file mode 100644 index 00000000..0c0f1643 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccb/TextureDescriptor.lua @@ -0,0 +1,22 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccb.TextureDescriptor + +---Store texture description. +---@class ccb.TextureDescriptor +---@field depth integer +---@field height integer +---@field sampleCount integer +---@field samplerDescriptor ccb.SamplerDescriptor +---@field textureFormat ccb.PixelFormat +---@field textureType ccb.TextureType +---@field textureUsage ccb.TextureUsage +---@field width integer +local TextureDescriptor = {} + +---@return any +function TextureDescriptor:__gc() end + +---@return any +function TextureDescriptor:__olua_move() end + +return TextureDescriptor \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccb/TextureInfo.lua b/addons/cclua/cocos2d/library/ccb/TextureInfo.lua new file mode 100644 index 00000000..8f415e73 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccb/TextureInfo.lua @@ -0,0 +1,26 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccb.TextureInfo + +---Store texture information. +---@class ccb.TextureInfo +---@field slot integer[] +---@field textures ccb.TextureBackend[] +local TextureInfo = {} + +---@return any +function TextureInfo:__gc() end + +---@return any +function TextureInfo:__olua_move() end + +---@param _slots integer[] +---@param _textures ccb.TextureBackend[] +---@return ccb.TextureInfo +---@overload fun(): ccb.TextureInfo +function TextureInfo.new(_slots, _textures) end + +function TextureInfo:releaseTextures() end + +function TextureInfo:retainTextures() end + +return TextureInfo \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccb/TextureType.lua b/addons/cclua/cocos2d/library/ccb/TextureType.lua new file mode 100644 index 00000000..6dc84d6c --- /dev/null +++ b/addons/cclua/cocos2d/library/ccb/TextureType.lua @@ -0,0 +1,14 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccb.TextureType + +---@type ccb.TextureType +local VALUE + +--- +---@enum ccb.TextureType +local TextureType = { + TEXTURE_2D = 0, + TEXTURE_CUBE = 1, +} + +return TextureType \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccb/TextureUsage.lua b/addons/cclua/cocos2d/library/ccb/TextureUsage.lua new file mode 100644 index 00000000..e5cff4cd --- /dev/null +++ b/addons/cclua/cocos2d/library/ccb/TextureUsage.lua @@ -0,0 +1,15 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccb.TextureUsage + +---@type ccb.TextureUsage +local VALUE + +--- +---@enum ccb.TextureUsage +local TextureUsage = { + READ = 0, + RENDER_TARGET = 2, + WRITE = 1, +} + +return TextureUsage \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccb/Uniform.lua b/addons/cclua/cocos2d/library/ccb/Uniform.lua new file mode 100644 index 00000000..91a88225 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccb/Uniform.lua @@ -0,0 +1,21 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccb.Uniform + +---@type ccb.Uniform +local VALUE + +--- +---@enum ccb.Uniform +local Uniform = { + EFFECT_COLOR = 7, + EFFECT_TYPE = 6, + MVP_MATRIX = 0, + TEXTURE = 1, + TEXTURE1 = 2, + TEXTURE2 = 3, + TEXTURE3 = 4, + TEXT_COLOR = 5, + UNIFORM_MAX = 8, +} + +return Uniform \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccb/UniformInfo.lua b/addons/cclua/cocos2d/library/ccb/UniformInfo.lua new file mode 100644 index 00000000..ab4a1ac8 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccb/UniformInfo.lua @@ -0,0 +1,22 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccb.UniformInfo + +--- +---@class ccb.UniformInfo +---@field bufferOffset integer +---@field count integer +---@field isArray boolean +---@field isMatrix boolean +---@field location integer +---@field needConvert boolean +---@field size integer +---@field type integer +local UniformInfo = {} + +---@return any +function UniformInfo:__gc() end + +---@return any +function UniformInfo:__olua_move() end + +return UniformInfo \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccb/UniformLocation.lua b/addons/cclua/cocos2d/library/ccb/UniformLocation.lua new file mode 100644 index 00000000..a8790ee9 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccb/UniformLocation.lua @@ -0,0 +1,20 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccb.UniformLocation + +--- +---@class ccb.UniformLocation +---@field shaderStage ccb.ShaderStage +local UniformLocation = {} + +---@return any +function UniformLocation:__gc() end + +---@return any +function UniformLocation:__olua_move() end + +---@return ccb.UniformLocation +function UniformLocation.new() end + +function UniformLocation:reset() end + +return UniformLocation \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccb/VertexFormat.lua b/addons/cclua/cocos2d/library/ccb/VertexFormat.lua new file mode 100644 index 00000000..7140df47 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccb/VertexFormat.lua @@ -0,0 +1,23 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccb.VertexFormat + +---@type ccb.VertexFormat +local VALUE + +--- +---@enum ccb.VertexFormat +local VertexFormat = { + FLOAT = 3, + FLOAT2 = 2, + FLOAT3 = 1, + FLOAT4 = 0, + INT = 7, + INT2 = 6, + INT3 = 5, + INT4 = 4, + UBYTE4 = 10, + USHORT2 = 9, + USHORT4 = 8, +} + +return VertexFormat \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccb/VertexLayout.lua b/addons/cclua/cocos2d/library/ccb/VertexLayout.lua new file mode 100644 index 00000000..0b6b71e0 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccb/VertexLayout.lua @@ -0,0 +1,50 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccb.VertexLayout + +---Store vertex attribute layout. +---@class ccb.VertexLayout +---@field attributes { [string]: ccb.VertexLayout.Attribute } Get attribute informations \return Atrribute informations. +---@field stride any Get the distance between the data of two vertices, in bytes. \return The distance between the data of two vertices, in bytes. +---@field valid boolean Check if vertex layout has been set. +---@field vertexStepMode ccb.VertexStepMode Get vertex step function. Default value is VERTEX. \return Vertex step function. \note Used in metal. +local VertexLayout = {} + +---@return any +function VertexLayout:__gc() end + +---@return any +function VertexLayout:__olua_move() end + +---Get attribute informations +---@return { [string]: ccb.VertexLayout.Attribute } # Atrribute informations. +function VertexLayout:getAttributes() end + +---Get the distance between the data of two vertices, in bytes. +---@return any # The distance between the data of two vertices, in bytes. +function VertexLayout:getStride() end + +---Get vertex step function. Default value is VERTEX. +---@return ccb.VertexStepMode # Vertex step function. +---\note Used in metal. +function VertexLayout:getVertexStepMode() end + +---Check if vertex layout has been set. +---@return boolean +function VertexLayout:isValid() end + +---@return ccb.VertexLayout +function VertexLayout.new() end + +---Set attribute values to name. +---@param name string # Specifies the attribute name. +---@param index any # Specifies the index of the generic vertex attribute to be modified. +---@param format ccb.VertexFormat # Specifies how the vertex attribute data is laid out in memory. +---@param offset any # Specifies the byte offset to the first component of the first generic vertex attribute. +---@param needToBeNormallized boolean # Specifies whether fixed-point data values should be normalized (true) or converted directly as fixed-point values (false) when they are accessed. +function VertexLayout:setAttribute(name, index, format, offset, needToBeNormallized) end + +---Set stride of vertices. +---@param stride any # Specifies the distance between the data of two vertices, in bytes. +function VertexLayout:setLayout(stride) end + +return VertexLayout \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccb/VertexLayout/Attribute.lua b/addons/cclua/cocos2d/library/ccb/VertexLayout/Attribute.lua new file mode 100644 index 00000000..4dc109e7 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccb/VertexLayout/Attribute.lua @@ -0,0 +1,23 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccb.VertexLayout.Attribute + +--- +---@class ccb.VertexLayout.Attribute +---@field format ccb.VertexFormat +---@field index any +---@field name string +---@field needToBeNormallized boolean +---@field offset any +local Attribute = {} + +---@return any +function Attribute:__gc() end + +---@return any +function Attribute:__olua_move() end + +---@return ccb.VertexLayout.Attribute +---@overload fun(_name: string, _index: any, _format: ccb.VertexFormat, _offset: any, needToBeNormallized: boolean): ccb.VertexLayout.Attribute +function Attribute.new() end + +return Attribute \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccb/VertexStepMode.lua b/addons/cclua/cocos2d/library/ccb/VertexStepMode.lua new file mode 100644 index 00000000..dfd9e67b --- /dev/null +++ b/addons/cclua/cocos2d/library/ccb/VertexStepMode.lua @@ -0,0 +1,14 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccb.VertexStepMode + +---@type ccb.VertexStepMode +local VALUE + +--- +---@enum ccb.VertexStepMode +local VertexStepMode = { + INSTANCE = 1, + VERTEX = 0, +} + +return VertexStepMode \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccb/Winding.lua b/addons/cclua/cocos2d/library/ccb/Winding.lua new file mode 100644 index 00000000..5146bfce --- /dev/null +++ b/addons/cclua/cocos2d/library/ccb/Winding.lua @@ -0,0 +1,14 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccb.Winding + +---@type ccb.Winding +local VALUE + +--- +---@enum ccb.Winding +local Winding = { + CLOCK_WISE = 0, + COUNTER_CLOCK_WISE = 1, +} + +return Winding \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccs/ActionFadeFrame.lua b/addons/cclua/cocos2d/library/ccs/ActionFadeFrame.lua new file mode 100644 index 00000000..02597d74 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccs/ActionFadeFrame.lua @@ -0,0 +1,24 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccs.ActionFadeFrame + +---\js NA +---\lua NA +---@class ccs.ActionFadeFrame : ccs.ActionFrame +---@field opacity integer Gets the fade action opacity.

\return the fade action opacity. +local ActionFadeFrame = {} + +---Gets the fade action opacity. +--- +---@return integer # the fade action opacity. +function ActionFadeFrame:getOpacity() end + +---Default constructor +---@return ccs.ActionFadeFrame +function ActionFadeFrame.new() end + +---Changes the fade action opacity. +--- +---@param opacity integer # the fade action opacity +function ActionFadeFrame:setOpacity(opacity) end + +return ActionFadeFrame \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccs/ActionFrame.lua b/addons/cclua/cocos2d/library/ccs/ActionFrame.lua new file mode 100644 index 00000000..ab75bc48 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccs/ActionFrame.lua @@ -0,0 +1,78 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccs.ActionFrame + +---\js NA +---\lua NA +---@class ccs.ActionFrame : cc.Ref +---@field easingType integer Gets the easing type.

\return the easing type. +---@field frameIndex integer Gets the index of action frame

\return the index of action frame +---@field frameTime number Gets the time of action frame

\return fTime the time of action frame +---@field frameType integer Gets the type of action frame

\return the type of action frame +local ActionFrame = {} + +---Gets the ActionInterval of ActionFrame. +--- +---@param duration number # the duration time of ActionFrame +--- +---@return cc.ActionInterval # ActionInterval +--- +---Gets the ActionInterval of ActionFrame. +--- +---\param duration the duration time of ActionFrame +--- +---\param duration the source ActionFrame +--- +---\return ActionInterval +---@overload fun(self: ccs.ActionFrame, duration: number, srcFrame: ccs.ActionFrame): cc.ActionInterval +function ActionFrame:getAction(duration) end + +---Gets the easing type. +--- +---@return integer # the easing type. +function ActionFrame:getEasingType() end + +---Gets the index of action frame +--- +---@return integer # the index of action frame +function ActionFrame:getFrameIndex() end + +---Gets the time of action frame +--- +---@return number # fTime the time of action frame +function ActionFrame:getFrameTime() end + +---Gets the type of action frame +--- +---@return integer # the type of action frame +function ActionFrame:getFrameType() end + +---Default constructor +---@return ccs.ActionFrame +function ActionFrame.new() end + +---Set the ActionInterval easing parameter. +--- +---@param parameter number[] # the parameter for frame ease +function ActionFrame:setEasingParameter(parameter) end + +---Changes the easing type. +--- +---@param easingType integer # the easing type. +function ActionFrame:setEasingType(easingType) end + +---Changes the index of action frame +--- +---@param index integer # the index of action frame +function ActionFrame:setFrameIndex(index) end + +---Changes the time of action frame +--- +---@param fTime number # the time of action frame +function ActionFrame:setFrameTime(fTime) end + +---Changes the type of action frame +--- +---@param frameType integer # the type of action frame +function ActionFrame:setFrameType(frameType) end + +return ActionFrame \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccs/ActionFrameEasing.lua b/addons/cclua/cocos2d/library/ccs/ActionFrameEasing.lua new file mode 100644 index 00000000..91330b77 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccs/ActionFrameEasing.lua @@ -0,0 +1,20 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccs.ActionFrameEasing + +---\js NA +---\lua NA +---@class ccs.ActionFrameEasing : cc.Ref +local ActionFrameEasing = {} + +---@param t number +---@return number +function ActionFrameEasing:bounceTime(t) end + +---@param t number +---@return number +function ActionFrameEasing:easeValue(t) end + +---@return ccs.ActionFrameEasing +function ActionFrameEasing.new() end + +return ActionFrameEasing \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccs/ActionManagerEx.lua b/addons/cclua/cocos2d/library/ccs/ActionManagerEx.lua new file mode 100644 index 00000000..f51de8ec --- /dev/null +++ b/addons/cclua/cocos2d/library/ccs/ActionManagerEx.lua @@ -0,0 +1,68 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccs.ActionManagerEx + +--- +---@class ccs.ActionManagerEx : cc.Ref +---@field instance ccs.ActionManagerEx Gets the static instance of ActionManager. \js getInstance \lua getInstance +---@field studioVersionNumber integer +local ActionManagerEx = {} + +---Purges ActionManager point. +---\js purge +---\lua destroyActionManager +function ActionManagerEx.destroyInstance() end + +---Gets an ActionObject with a name. +--- +---@param jsonName string # UI file name +--- +---@param actionName string # action name in the UI file. +--- +---@return ccs.ActionObject # ActionObject which named as the param name +function ActionManagerEx:getActionByName(jsonName, actionName) end + +---Gets the static instance of ActionManager. +---\js getInstance +---\lua getInstance +---@return ccs.ActionManagerEx +function ActionManagerEx.getInstance() end + +---@return integer +function ActionManagerEx:getStudioVersionNumber() end + +---Default constructor +---\js ctor +---@return ccs.ActionManagerEx +function ActionManagerEx.new() end + +---Play an Action with a name. +--- +---@param jsonName string # UI file name +--- +---@param actionName string # action name in the UIfile. +--- +---@return ccs.ActionObject # ActionObject which named as the param name +--- +---Play an Action with a name. +--- +---\param jsonName UI file name +--- +---\param actionName action name in the UIfile. +--- +---\param func ui action call back +---@overload fun(self: ccs.ActionManagerEx, jsonName: string, actionName: string, func: cc.CallFunc): ccs.ActionObject +function ActionManagerEx:playActionByName(jsonName, actionName) end + +---Release all actions. +function ActionManagerEx:releaseActions() end + +---Stop an Action with a name. +--- +---@param jsonName string # UI file name +--- +---@param actionName string # action name in the UIfile. +--- +---@return ccs.ActionObject # ActionObject which named as the param name +function ActionManagerEx:stopActionByName(jsonName, actionName) end + +return ActionManagerEx \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccs/ActionMoveFrame.lua b/addons/cclua/cocos2d/library/ccs/ActionMoveFrame.lua new file mode 100644 index 00000000..1eafcbf6 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccs/ActionMoveFrame.lua @@ -0,0 +1,25 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccs.ActionMoveFrame + +---\js NA +---\lua NA +---@class ccs.ActionMoveFrame : ccs.ActionFrame +---@field position cc.Vec2 Gets the move action position.

\return the move action position. +local ActionMoveFrame = {} + +---Gets the move action position. +--- +---@return cc.Vec2 # the move action position. +function ActionMoveFrame:getPosition() end + +---Default constructor +---@return ccs.ActionMoveFrame +function ActionMoveFrame.new() end + +---Changes the move action position. +--- +---\param the move action position. +---@param pos cc.Vec2 +function ActionMoveFrame:setPosition(pos) end + +return ActionMoveFrame \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccs/ActionNode.lua b/addons/cclua/cocos2d/library/ccs/ActionNode.lua new file mode 100644 index 00000000..d383e37f --- /dev/null +++ b/addons/cclua/cocos2d/library/ccs/ActionNode.lua @@ -0,0 +1,96 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccs.ActionNode + +---\js NA +---\lua NA +---@class ccs.ActionNode : cc.Ref +---@field actionDoneOnce boolean Gets if the action is done once time.

\return that if the action is done once time +---@field actionTag integer Gets tag for ActionNode

\return tag tag of ActionNode +---@field firstFrameIndex integer Gets index of first ActionFrame.

\return index of first ActionFrame +---@field lastFrameIndex integer Gets index of last ActionFrame.

\return index of last ActionFrame +---@field object cc.Ref Gets node which will run a action.

\return node which will run a action +---@field unitTime number Gets the time interval of frame.

\return fTime the time interval of frame +local ActionNode = {} + +---Pushes back a ActionFrame to ActionNode. +--- +---@param frame ccs.ActionFrame # the ActionFrame which will be added +function ActionNode:addFrame(frame) end + +---Remove all ActionFrames from ActionNode. +function ActionNode:clearAllFrame() end + +---Remove a ActionFrame from ActionNode. +--- +---@param frame ccs.ActionFrame # the ActionFrame which will be removed +function ActionNode:deleteFrame(frame) end + +---Gets tag for ActionNode +--- +---@return integer # tag tag of ActionNode +function ActionNode:getActionTag() end + +---Gets index of first ActionFrame. +--- +---@return integer # index of first ActionFrame +function ActionNode:getFirstFrameIndex() end + +---Gets index of last ActionFrame. +--- +---@return integer # index of last ActionFrame +function ActionNode:getLastFrameIndex() end + +---Gets node which will run a action. +--- +---@return cc.Ref # node which will run a action +function ActionNode:getObject() end + +---Gets the time interval of frame. +--- +---@return number # fTime the time interval of frame +function ActionNode:getUnitTime() end + +---Insets a ActionFrame to ActionNode. +--- +---@param index integer # the index of ActionFrame +--- +---@param frame ccs.ActionFrame # the ActionFrame which will be inserted +function ActionNode:insertFrame(index, frame) end + +---Gets if the action is done once time. +--- +---@return boolean # that if the action is done once time +function ActionNode:isActionDoneOnce() end + +---Default constructor +---@return ccs.ActionNode +function ActionNode.new() end + +---Play the action. +function ActionNode:playAction() end + +---Sets tag for ActionNode +--- +---@param tag integer # tag of ActionNode +function ActionNode:setActionTag(tag) end + +---Sets node which will run a action. +--- +---@param node cc.Ref # which will run a action +function ActionNode:setObject(node) end + +---Sets the time interval of frame. +--- +---@param fTime number # the time interval of frame +function ActionNode:setUnitTime(fTime) end + +---Stop the action. +function ActionNode:stopAction() end + +---Updates action states to some time. +--- +---@param fTime number # the time when need to update +---@return boolean +function ActionNode:updateActionToTimeLine(fTime) end + +return ActionNode \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccs/ActionObject.lua b/addons/cclua/cocos2d/library/ccs/ActionObject.lua new file mode 100644 index 00000000..f1ba1463 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccs/ActionObject.lua @@ -0,0 +1,99 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccs.ActionObject + +---\js NA +---\lua NA +---@class ccs.ActionObject : cc.Ref +---@field currentTime number Gets the current time of frame.

\return the current time of frame +---@field loop boolean Gets if the action will loop play.

\return that if the action will loop play +---@field name string Gets name of object

\return name of object +---@field playing boolean Return if the action is playing.

\return true if the action is playing, false the otherwise +---@field totalTime number Gets the total time of frame.

\return the total time of frame +---@field unitTime number Gets the time interval of frame.

\return the time interval of frame +local ActionObject = {} + +---Adds a ActionNode to play the action. +--- +---@param node ccs.ActionNode # the ActionNode which will play the action +function ActionObject:addActionNode(node) end + +---Gets the current time of frame. +--- +---@return number # the current time of frame +function ActionObject:getCurrentTime() end + +---Gets if the action will loop play. +--- +---@return boolean # that if the action will loop play +function ActionObject:getLoop() end + +---Gets name of object +--- +---@return string # name of object +function ActionObject:getName() end + +---Gets the total time of frame. +--- +---@return number # the total time of frame +function ActionObject:getTotalTime() end + +---Gets the time interval of frame. +--- +---@return number # the time interval of frame +function ActionObject:getUnitTime() end + +---Return if the action is playing. +--- +---@return boolean # true if the action is playing, false the otherwise +function ActionObject:isPlaying() end + +---Default constructor +---@return ccs.ActionObject +function ActionObject.new() end + +---Pause the action. +function ActionObject:pause() end + +---Play the action. +--- +---Play the action. +--- +---\param func Action Call Back +---@overload fun(self: ccs.ActionObject, func: cc.CallFunc) +function ActionObject:play() end + +---Removes a ActionNode which play the action. +--- +---@param node ccs.ActionNode # the ActionNode which play the action +function ActionObject:removeActionNode(node) end + +---Sets the current time of frame. +--- +---@param fTime number # the current time of frame +function ActionObject:setCurrentTime(fTime) end + +---Sets if the action will loop play. +--- +---@param bLoop boolean # that if the action will loop play +function ActionObject:setLoop(bLoop) end + +---Sets name for object +--- +---@param name string # name of object +function ActionObject:setName(name) end + +---Sets the time interval of frame. +--- +---@param fTime number # the time interval of frame +function ActionObject:setUnitTime(fTime) end + +---@param dt number +function ActionObject:simulationActionUpdate(dt) end + +---Stop the action. +function ActionObject:stop() end + +---@param fTime number +function ActionObject:updateToFrameByTime(fTime) end + +return ActionObject \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccs/ActionRotationFrame.lua b/addons/cclua/cocos2d/library/ccs/ActionRotationFrame.lua new file mode 100644 index 00000000..9a15d77d --- /dev/null +++ b/addons/cclua/cocos2d/library/ccs/ActionRotationFrame.lua @@ -0,0 +1,24 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccs.ActionRotationFrame + +---\js NA +---\lua NA +---@class ccs.ActionRotationFrame : ccs.ActionFrame +---@field rotation number Gets the rotate action rotation.

\return the rotate action rotation. +local ActionRotationFrame = {} + +---Gets the rotate action rotation. +--- +---@return number # the rotate action rotation. +function ActionRotationFrame:getRotation() end + +---Default constructor +---@return ccs.ActionRotationFrame +function ActionRotationFrame.new() end + +---Changes rotate action rotation. +--- +---@param rotation number # rotate action rotation. +function ActionRotationFrame:setRotation(rotation) end + +return ActionRotationFrame \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccs/ActionScaleFrame.lua b/addons/cclua/cocos2d/library/ccs/ActionScaleFrame.lua new file mode 100644 index 00000000..f18de2b4 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccs/ActionScaleFrame.lua @@ -0,0 +1,37 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccs.ActionScaleFrame + +---\js NA +---\lua NA +---@class ccs.ActionScaleFrame : ccs.ActionFrame +---@field scaleX number Gets the scale action scaleX.

\return the scale action scaleX. +---@field scaleY number Gets the scale action scaleY.

\return the scale action scaleY. +local ActionScaleFrame = {} + +---Gets the scale action scaleX. +--- +---@return number # the scale action scaleX. +function ActionScaleFrame:getScaleX() end + +---Gets the scale action scaleY. +--- +---@return number # the scale action scaleY. +function ActionScaleFrame:getScaleY() end + +---Default constructor +---@return ccs.ActionScaleFrame +function ActionScaleFrame.new() end + +---Changes the scale action scaleX. +--- +---\param the scale action scaleX. +---@param scaleX number +function ActionScaleFrame:setScaleX(scaleX) end + +---Changes the scale action scaleY. +--- +---\param rotation the scale action scaleY. +---@param scaleY number +function ActionScaleFrame:setScaleY(scaleY) end + +return ActionScaleFrame \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccs/ActionTintFrame.lua b/addons/cclua/cocos2d/library/ccs/ActionTintFrame.lua new file mode 100644 index 00000000..a401870a --- /dev/null +++ b/addons/cclua/cocos2d/library/ccs/ActionTintFrame.lua @@ -0,0 +1,24 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccs.ActionTintFrame + +---\js NA +---\lua NA +---@class ccs.ActionTintFrame : ccs.ActionFrame +---@field color any Gets the tint action color.

\return the tint action color. +local ActionTintFrame = {} + +---Gets the tint action color. +--- +---@return any # the tint action color. +function ActionTintFrame:getColor() end + +---Default constructor +---@return ccs.ActionTintFrame +function ActionTintFrame.new() end + +---Changes the tint action color. +--- +---@param ccolor any # the tint action color +function ActionTintFrame:setColor(ccolor) end + +return ActionTintFrame \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccs/AnimationData.lua b/addons/cclua/cocos2d/library/ccs/AnimationData.lua new file mode 100644 index 00000000..fe24e667 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccs/AnimationData.lua @@ -0,0 +1,33 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccs.AnimationData + +---AnimationData include all movement information for the Armature +---The struct is AnimationData -> MovementData -> MovementBoneData -> FrameData +----> MovementFrameData +---\js NA +---\lua NA +---@class ccs.AnimationData : cc.Ref +---@field movementCount integer +---@field movementDataDic any +---@field movementNames string[] +---@field name string +local AnimationData = {} + +---@param movData ccs.MovementData +function AnimationData:addMovement(movData) end + +---@return ccs.AnimationData +function AnimationData.create() end + +---@param movementName string +---@return ccs.MovementData +function AnimationData:getMovement(movementName) end + +---@return integer +function AnimationData:getMovementCount() end + +---\js ctor +---@return ccs.AnimationData +function AnimationData.new() end + +return AnimationData \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccs/Armature.lua b/addons/cclua/cocos2d/library/ccs/Armature.lua new file mode 100644 index 00000000..c9784a3b --- /dev/null +++ b/addons/cclua/cocos2d/library/ccs/Armature.lua @@ -0,0 +1,127 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccs.Armature + +--- +---@class ccs.Armature : cc.Node +---@field animation ccs.ArmatureAnimation +---@field armatureData ccs.ArmatureData +---@field armatureTransformDirty boolean +---@field batchNode ccs.BatchNode +---@field blendFunc cc.BlendFunc \js NA \lua NA +---@field boneDic any Get Armature's bone dictionary \return Armature's bone dictionary +---@field offsetPoints cc.Vec2 +---@field parentBone ccs.Bone +---@field version number +local Armature = {} + +---Add a Bone to this Armature, +--- +---@param bone ccs.Bone # The Bone you want to add to Armature +---@param parentName string # The parent Bone's name you want to add to . If it's nullptr, then set Armature to its parent +function Armature:addBone(bone, parentName) end + +---@param cls string +---@return any +function Armature:as(cls) end + +---Change a bone's parent with the specified parent name. +--- +---@param bone ccs.Bone # The bone you want to change parent +---@param parentName string # The new parent's name. +function Armature:changeBoneParent(bone, parentName) end + +---Allocates and initializes an armature. +---@return ccs.Armature # An initialized armature which is marked as "autorelease". +--- +---Allocates an armature, and use the ArmatureData named name in ArmatureDataManager to initializes the armature. +--- +---\param name Armature will use the name to find the ArmatureData to initializes it. +---\return A initialized armature which is marked as "autorelease". +---@overload fun(name: string): ccs.Armature +---@overload fun(name: string, parentBone: ccs.Bone): ccs.Armature +function Armature.create() end + +---@return ccs.ArmatureAnimation +function Armature:getAnimation() end + +---@return ccs.ArmatureData +function Armature:getArmatureData() end + +---@return boolean +function Armature:getArmatureTransformDirty() end + +---@return ccs.BatchNode +function Armature:getBatchNode() end + +---\js NA +---\lua NA +---@return cc.BlendFunc +function Armature:getBlendFunc() end + +---Get a bone with the specified name +--- +---@param name string # The bone's name you want to get +---@return ccs.Bone +function Armature:getBone(name) end + +---@param x number +---@param y number +---@return ccs.Bone +function Armature:getBoneAtPoint(x, y) end + +---Get Armature's bone dictionary +---@return any # Armature's bone dictionary +function Armature:getBoneDic() end + +---@return cc.Vec2 +function Armature:getOffsetPoints() end + +---@return ccs.Bone +function Armature:getParentBone() end + +---@return number +function Armature:getVersion() end + +---Init the empty armature +---@return boolean +--- +---Init an armature with specified name +---\param name Armature name +---@overload fun(self: ccs.Armature, name: string): boolean +---@overload fun(self: ccs.Armature, name: string, parentBone: ccs.Bone): boolean +function Armature:init() end + +---\js ctor +---@return ccs.Armature +function Armature.new() end + +---Remove a bone with the specified name. If recursion it will also remove child Bone recursionly. +--- +---@param bone ccs.Bone # The bone you want to remove +---@param recursion boolean # Determine whether remove the bone's child recursion. +function Armature:removeBone(bone, recursion) end + +---@param animation ccs.ArmatureAnimation +function Armature:setAnimation(animation) end + +---@param armatureData ccs.ArmatureData +function Armature:setArmatureData(armatureData) end + +---@param batchNode ccs.BatchNode +function Armature:setBatchNode(batchNode) end + +---\js NA +---\lua NA +---@param blendFunc cc.BlendFunc +function Armature:setBlendFunc(blendFunc) end + +---@param parentBone ccs.Bone +function Armature:setParentBone(parentBone) end + +---@param version number +function Armature:setVersion(version) end + +---Set contentsize and Calculate anchor point. +function Armature:updateOffsetPoint() end + +return Armature \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccs/ArmatureAnimation.lua b/addons/cclua/cocos2d/library/ccs/ArmatureAnimation.lua new file mode 100644 index 00000000..475c06af --- /dev/null +++ b/addons/cclua/cocos2d/library/ccs/ArmatureAnimation.lua @@ -0,0 +1,152 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccs.ArmatureAnimation + +--- +---@class ccs.ArmatureAnimation : ccs.ProcessBase +---@field animationData ccs.AnimationData +---@field currentMovementID string Get current movementID \return The name of current movement +---@field movementCount integer Get movement count +---@field speedScale number +---@field userObject cc.Ref Returns a user assigned Object

Similar to userData, but instead of holding a void* it holds an object

\return A user assigned Object \js NA \lua NA +local ArmatureAnimation = {} + +---Create with a Armature +---@param armature ccs.Armature # The Armature ArmatureAnimation will bind to +---@return ccs.ArmatureAnimation +function ArmatureAnimation.create(armature) end + +---@return ccs.AnimationData +function ArmatureAnimation:getAnimationData() end + +---Get current movementID +---@return string # The name of current movement +function ArmatureAnimation:getCurrentMovementID() end + +---Get movement count +---@return integer +function ArmatureAnimation:getMovementCount() end + +---@return number +function ArmatureAnimation:getSpeedScale() end + +---Returns a user assigned Object +--- +---Similar to userData, but instead of holding a void* it holds an object +--- +---@return cc.Ref # A user assigned Object +---\js NA +---\lua NA +function ArmatureAnimation:getUserObject() end + +---Go to specified frame and pause current movement. +---@param frameIndex integer +function ArmatureAnimation:gotoAndPause(frameIndex) end + +---Go to specified frame and play current movement. +---You need first switch to the movement you want to play, then call this function. +--- +---example : playByIndex(0); +---gotoAndPlay(0); +---playByIndex(1); +---gotoAndPlay(0); +---gotoAndPlay(15); +---@param frameIndex integer +function ArmatureAnimation:gotoAndPlay(frameIndex) end + +---Init with a Armature +---@param armature ccs.Armature # The Armature ArmatureAnimation will bind to +---@return boolean +function ArmatureAnimation:init(armature) end + +---\js ctor +---@return ccs.ArmatureAnimation +function ArmatureAnimation.new() end + +---Play animation by animation name. +--- +---@param animationName string # The animation name you want to play +---@param durationTo integer # The frames between two animation changing-over. +---It's meaning is changing to this animation need how many frames +--- +----1 : use the value from MovementData get from flash design panel +---@param loop integer # Whether the animation is loop +--- +---loop < 0 : use the value from MovementData get from flash design panel +---loop = 0 : this animation is not loop +---loop > 0 : this animation is loop +---@overload fun(self: ccs.ArmatureAnimation, animationName: string) +---@overload fun(self: ccs.ArmatureAnimation, animationName: string, durationTo: integer) +--- +---Play animation by animation name. +--- +---\param durationTo The frames between two animation changing-over. +---It's meaning is changing to this animation need how many frames +--- +----1 : use the value from MovementData get from flash design panel +---\param durationTween The frame count you want to play in the game. +---if _durationTween is 80, then the animation will played 80 frames in a loop +--- +----1 : use the value from MovementData get from flash design panel +--- +---\param loop Whether the animation is loop +--- +---loop < 0 : use the value from MovementData get from flash design panel +---loop = 0 : this animation is not loop +---loop > 0 : this animation is loop +--- +---\param tweenEasing Tween easing is used for calculate easing effect +--- +---TWEEN_EASING_MAX : use the value from MovementData get from flash design panel +----1 : fade out +---0 : line +---1 : fade in +---2 : fade in and out +---@overload fun(self: ccs.ArmatureAnimation, durationTo: integer, durationTween: integer, loop: integer, tweenEasing: integer) +function ArmatureAnimation:play(animationName, durationTo, loop) end + +---@param animationIndex integer +---@param durationTo integer +---@param loop integer +---@overload fun(self: ccs.ArmatureAnimation, animationIndex: integer) +---@overload fun(self: ccs.ArmatureAnimation, animationIndex: integer, durationTo: integer) +function ArmatureAnimation:playWithIndex(animationIndex, durationTo, loop) end + +---@param movementIndexes integer[] +---@param durationTo integer +---@param loop boolean +---@overload fun(self: ccs.ArmatureAnimation, movementIndexes: integer[]) +---@overload fun(self: ccs.ArmatureAnimation, movementIndexes: integer[], durationTo: integer) +function ArmatureAnimation:playWithIndexes(movementIndexes, durationTo, loop) end + +---@param movementNames string[] +---@param durationTo integer +---@param loop boolean +---@overload fun(self: ccs.ArmatureAnimation, movementNames: string[]) +---@overload fun(self: ccs.ArmatureAnimation, movementNames: string[], durationTo: integer) +function ArmatureAnimation:playWithNames(movementNames, durationTo, loop) end + +---@param data ccs.AnimationData +function ArmatureAnimation:setAnimationData(data) end + +---@param listener fun(arg1: ccs.Bone, arg2: string, arg3: integer, arg4: integer) +function ArmatureAnimation:setFrameEventCallFunc(listener) end + +---@param listener fun(arg1: ccs.Armature, arg2: ccs.MovementEventType, arg3: string) +function ArmatureAnimation:setMovementEventCallFunc(listener) end + +---Scale animation play speed. +---\param animationScale Scale value +---@param speedScale number +function ArmatureAnimation:setSpeedScale(speedScale) end + +---Returns a user assigned Object +--- +---Similar to UserData, but instead of holding a void* it holds an object. +---The UserObject will be retained once in this method, +---and the previous UserObject (if existed) will be release. +---The UserObject will be released in Node's destructor. +--- +---@param userObject cc.Ref # A user assigned Object +function ArmatureAnimation:setUserObject(userObject) end + +return ArmatureAnimation \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccs/ArmatureData.lua b/addons/cclua/cocos2d/library/ccs/ArmatureData.lua new file mode 100644 index 00000000..f02d8209 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccs/ArmatureData.lua @@ -0,0 +1,32 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccs.ArmatureData + +---ArmatureData saved the Armature name and Bonedata needed for the CCBones in this Armature +---When we create a Armature, we need to get each Bone's BoneData as it's init information. +---So we can get a BoneData from the Dictionary saved in the ArmatureData. +---\js NA +---\lua NA +---@class ccs.ArmatureData : cc.Ref +---@field boneDataDic any +---@field dataVersion number +---@field name string +local ArmatureData = {} + +---@param boneData ccs.BoneData +function ArmatureData:addBoneData(boneData) end + +---@return ccs.ArmatureData +function ArmatureData.create() end + +---@param boneName string +---@return ccs.BoneData +function ArmatureData:getBoneData(boneName) end + +---@return boolean +function ArmatureData:init() end + +---\js ctor +---@return ccs.ArmatureData +function ArmatureData.new() end + +return ArmatureData \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccs/ArmatureDataManager.lua b/addons/cclua/cocos2d/library/ccs/ArmatureDataManager.lua new file mode 100644 index 00000000..d4529aa7 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccs/ArmatureDataManager.lua @@ -0,0 +1,100 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccs.ArmatureDataManager + +---format and manage armature configuration and armature animation +---@class ccs.ArmatureDataManager : cc.Ref +---@field animationDatas any +---@field armatureDatas any +---@field autoLoadSpriteFile boolean Judge whether or not need auto load sprite file +---@field instance ccs.ArmatureDataManager +---@field textureDatas any +local ArmatureDataManager = {} + +---add animation data +---@param id string # the id of the animation data +---\return AnimationData +---@param animationData ccs.AnimationData +---@param configFilePath string +---@overload fun(self: ccs.ArmatureDataManager, id: string, animationData: ccs.AnimationData) +function ArmatureDataManager:addAnimationData(id, animationData, configFilePath) end + +---Add armature data +---@param id string # The id of the armature data +---@param armatureData ccs.ArmatureData # ArmatureData +---@param configFilePath string +---@overload fun(self: ccs.ArmatureDataManager, id: string, armatureData: ccs.ArmatureData) +function ArmatureDataManager:addArmatureData(id, armatureData, configFilePath) end + +---Add ArmatureFileInfo, it is managed by ArmatureDataManager. +---@param configFilePath string +---@overload fun(self: ccs.ArmatureDataManager, imagePath: string, plistPath: string, configFilePath: string) +function ArmatureDataManager:addArmatureFileInfo(configFilePath) end + +---Add sprite frame to CCSpriteFrameCache, it will save display name and it's relative image name +---@param plistPath string +---@param imagePath string +---@param configFilePath string +---@overload fun(self: ccs.ArmatureDataManager, plistPath: string, imagePath: string) +function ArmatureDataManager:addSpriteFrameFromFile(plistPath, imagePath, configFilePath) end + +---add texture data +---@param id string # the id of the texture data +---\return TextureData +---@param textureData ccs.TextureData +---@param configFilePath string +---@overload fun(self: ccs.ArmatureDataManager, id: string, textureData: ccs.TextureData) +function ArmatureDataManager:addTextureData(id, textureData, configFilePath) end + +function ArmatureDataManager.destroyInstance() end + +---get animation data from _animationDatas(Dictionary) +---@param id string # the id of the animation data you want to get +---@return ccs.AnimationData # AnimationData +function ArmatureDataManager:getAnimationData(id) end + +---@return any +function ArmatureDataManager:getAnimationDatas() end + +---get armature data +---@param id string # the id of the armature data you want to get +---@return ccs.ArmatureData # ArmatureData +function ArmatureDataManager:getArmatureData(id) end + +---@return any +function ArmatureDataManager:getArmatureDatas() end + +---@return ccs.ArmatureDataManager +function ArmatureDataManager.getInstance() end + +---get texture data +---@param id string # the id of the texture data you want to get +---@return ccs.TextureData # TextureData +function ArmatureDataManager:getTextureData(id) end + +---@return any +function ArmatureDataManager:getTextureDatas() end + +---Init ArmatureDataManager +---@return boolean +function ArmatureDataManager:init() end + +---Judge whether or not need auto load sprite file +---@return boolean +function ArmatureDataManager:isAutoLoadSpriteFile() end + +---remove animation data +---@param id string # the id of the animation data +function ArmatureDataManager:removeAnimationData(id) end + +---remove armature data +---@param id string # the id of the armature data you want to get +function ArmatureDataManager:removeArmatureData(id) end + +---@param configFilePath string +function ArmatureDataManager:removeArmatureFileInfo(configFilePath) end + +---remove texture data +---@param id string # the id of the texture data you want to get +function ArmatureDataManager:removeTextureData(id) end + +return ArmatureDataManager \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccs/ArmatureDisplayData.lua b/addons/cclua/cocos2d/library/ccs/ArmatureDisplayData.lua new file mode 100644 index 00000000..e3c78079 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccs/ArmatureDisplayData.lua @@ -0,0 +1,16 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccs.ArmatureDisplayData + +---\js NA +---\lua NA +---@class ccs.ArmatureDisplayData : ccs.DisplayData +local ArmatureDisplayData = {} + +---@return ccs.ArmatureDisplayData +function ArmatureDisplayData.create() end + +---\js ctor +---@return ccs.ArmatureDisplayData +function ArmatureDisplayData.new() end + +return ArmatureDisplayData \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccs/ArmatureMovementDispatcher.lua b/addons/cclua/cocos2d/library/ccs/ArmatureMovementDispatcher.lua new file mode 100644 index 00000000..90280cea --- /dev/null +++ b/addons/cclua/cocos2d/library/ccs/ArmatureMovementDispatcher.lua @@ -0,0 +1,8 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccs.ArmatureMovementDispatcher + +--- +---@class ccs.ArmatureMovementDispatcher : cc.Ref +local ArmatureMovementDispatcher = {} + +return ArmatureMovementDispatcher \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccs/BaseData.lua b/addons/cclua/cocos2d/library/ccs/BaseData.lua new file mode 100644 index 00000000..25717fdc --- /dev/null +++ b/addons/cclua/cocos2d/library/ccs/BaseData.lua @@ -0,0 +1,45 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccs.BaseData + +---The base node include a lot of attributes. +---\js NA +---\lua NA +---@class ccs.BaseData : cc.Ref +---@field color any +---@field a integer +---@field b integer +---@field g integer +---@field isUseColorInfo boolean +---@field r integer +---@field scaleX number +---@field scaleY number +---@field skewX number +---@field skewY number +---@field tweenRotate number +---@field x number +---@field y number +---@field zOrder integer +local BaseData = {} + +---@param node ccs.BaseData +function BaseData:copy(node) end + +---@return ccs.BaseData +function BaseData.create() end + +---@return any +function BaseData:getColor() end + +---\js ctor +---@return ccs.BaseData +function BaseData.new() end + +---@param color any +function BaseData:setColor(color) end + +---@param from ccs.BaseData +---@param to ccs.BaseData +---@param limit boolean +function BaseData:subtract(from, to, limit) end + +return BaseData \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccs/BaseTriggerAction.lua b/addons/cclua/cocos2d/library/ccs/BaseTriggerAction.lua new file mode 100644 index 00000000..73d3eba7 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccs/BaseTriggerAction.lua @@ -0,0 +1,15 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccs.BaseTriggerAction + +--- +---@class ccs.BaseTriggerAction : cc.Ref +local BaseTriggerAction = {} + +function BaseTriggerAction:done() end + +---@return boolean +function BaseTriggerAction:init() end + +function BaseTriggerAction:removeAll() end + +return BaseTriggerAction \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccs/BaseTriggerCondition.lua b/addons/cclua/cocos2d/library/ccs/BaseTriggerCondition.lua new file mode 100644 index 00000000..20943928 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccs/BaseTriggerCondition.lua @@ -0,0 +1,16 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccs.BaseTriggerCondition + +--- +---@class ccs.BaseTriggerCondition : cc.Ref +local BaseTriggerCondition = {} + +---@return boolean +function BaseTriggerCondition:detect() end + +---@return boolean +function BaseTriggerCondition:init() end + +function BaseTriggerCondition:removeAll() end + +return BaseTriggerCondition \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccs/BatchNode.lua b/addons/cclua/cocos2d/library/ccs/BatchNode.lua new file mode 100644 index 00000000..0cebd1b8 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccs/BatchNode.lua @@ -0,0 +1,15 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccs.BatchNode + +--- +---@class ccs.BatchNode : cc.Node +local BatchNode = {} + +---@return ccs.BatchNode +function BatchNode.create() end + +---\js ctor +---@return ccs.BatchNode +function BatchNode.new() end + +return BatchNode \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccs/Bone.lua b/addons/cclua/cocos2d/library/ccs/Bone.lua new file mode 100644 index 00000000..fb0a967a --- /dev/null +++ b/addons/cclua/cocos2d/library/ccs/Bone.lua @@ -0,0 +1,175 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccs.Bone + +--- +---@class ccs.Bone : cc.Node +---@field armature ccs.Armature +---@field blendDirty boolean +---@field blendFunc cc.BlendFunc +---@field boneData ccs.BoneData +---@field childArmature ccs.Armature +---@field colliderDetector ccs.ColliderDetector +---@field displayManager ccs.DisplayManager +---@field displayRenderNode cc.Node +---@field displayRenderNodeType ccs.DisplayType +---@field ignoreMovementBoneData boolean +---@field nodeToArmatureTransform cc.Mat4 +---@field parentBone ccs.Bone Get parent bone \return parent bone +---@field transformDirty boolean +---@field tween ccs.Tween +---@field tweenData ccs.FrameData +---@field worldInfo ccs.BaseData +local Bone = {} + +---Add a child to this bone, and it will let this child call setParent(Bone *parent) function to set self to it's parent +---@param child ccs.Bone # the child you want to add +function Bone:addChildBone(child) end + +---Add display and use displayData to init the display. +---If index already have a display, then replace it. +---If index is current display index, then also change display to _index +--- +---@param displayData ccs.DisplayData # it include the display information, like DisplayType. +---If you want to create a sprite display, then create a SpriteDisplayData param +--- +---@param index integer # the index of the display you want to replace or add to +----1 : append display from back +---@overload fun(self: ccs.Bone, display: cc.Node, index: integer) +function Bone:addDisplay(displayData, index) end + +---@param index integer +---@param force boolean +function Bone:changeDisplayWithIndex(index, force) end + +---@param name string +---@param force boolean +function Bone:changeDisplayWithName(name, force) end + +---Allocates and initializes a bone. +---@return ccs.Bone # A initialized bone which is marked as "autorelease". +--- +---Allocates and initializes a bone. +--- +---\param name If name is not null, then set name to the bone's name +---\return A initialized bone which is marked as "autorelease". +---@overload fun(name: string): ccs.Bone +function Bone.create() end + +---@return ccs.Armature +function Bone:getArmature() end + +---@return cc.BlendFunc +function Bone:getBlendFunc() end + +---@return ccs.BoneData +function Bone:getBoneData() end + +---@return ccs.Armature +function Bone:getChildArmature() end + +---@return ccs.ColliderDetector +function Bone:getColliderDetector() end + +---@return ccs.DisplayManager +function Bone:getDisplayManager() end + +---@return cc.Node +function Bone:getDisplayRenderNode() end + +---@return ccs.DisplayType +function Bone:getDisplayRenderNodeType() end + +---@return cc.Mat4 +function Bone:getNodeToArmatureTransform() end + +---Get parent bone +---@return ccs.Bone # parent bone +function Bone:getParentBone() end + +---@return ccs.Tween +function Bone:getTween() end + +---@return ccs.FrameData +function Bone:getTweenData() end + +---@return ccs.BaseData +function Bone:getWorldInfo() end + +---Initializes an empty Bone with nothing init. +---@return boolean +--- +---Initializes a Bone with the specified name +---\param name Bone's name. +---@overload fun(self: ccs.Bone, name: string): boolean +function Bone:init() end + +---@return boolean +function Bone:isBlendDirty() end + +---@return boolean +function Bone:isIgnoreMovementBoneData() end + +---@return boolean +function Bone:isTransformDirty() end + +---\js ctor +---@return ccs.Bone +function Bone.new() end + +---Removes a child Bone +---@param bone ccs.Bone # the bone you want to remove +---@param recursion boolean +function Bone:removeChildBone(bone, recursion) end + +---@param index integer +function Bone:removeDisplay(index) end + +---Remove itself from its parent. +---@param recursion boolean # whether or not to remove childBone's display +--- +---Removes this node itself from its parent node with a cleanup. +---If the node orphan, then nothing happens. +---\see `removeFromParentAndCleanup(bool)` +---@overload fun(self: ccs.Bone) +function Bone:removeFromParent(recursion) end + +---@param armature ccs.Armature +function Bone:setArmature(armature) end + +---@param dirty boolean +function Bone:setBlendDirty(dirty) end + +---@param blendFunc cc.BlendFunc +function Bone:setBlendFunc(blendFunc) end + +---@param boneData ccs.BoneData +function Bone:setBoneData(boneData) end + +---@param childArmature ccs.Armature +function Bone:setChildArmature(childArmature) end + +---\lua NA +---@param ignore boolean +function Bone:setIgnoreMovementBoneData(ignore) end + +---@param zOrder integer +function Bone:setLocalZOrder(zOrder) end + +---Set parent bone. +---If parent is null, then also remove this bone from armature. +---It will not set the Armature, if you want to add the bone to a Armature, you should use Armature::addBone(Bone *bone, const char* parentName). +--- +---@param parent ccs.Bone # the parent bone. +---nullptr : remove this bone from armature +function Bone:setParentBone(parent) end + +---@param dirty boolean +function Bone:setTransformDirty(dirty) end + +---! Update color to render display +function Bone:updateColor() end + +---! Update zorder +function Bone:updateZOrder() end + +return Bone \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccs/BoneData.lua b/addons/cclua/cocos2d/library/ccs/BoneData.lua new file mode 100644 index 00000000..4734bc01 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccs/BoneData.lua @@ -0,0 +1,33 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccs.BoneData + +---BoneData used to init a Bone. +---BoneData keeps a DisplayData list, a Bone can have many display to change. +---The display information saved in the DisplayData +---\js NA +---\lua NA +---@class ccs.BoneData : ccs.BaseData +---@field boneDataTransform cc.AffineTransform +---@field displayDataList any +---@field name string +---@field parentName string +local BoneData = {} + +---@param displayData ccs.DisplayData +function BoneData:addDisplayData(displayData) end + +---@return ccs.BoneData +function BoneData.create() end + +---@param index integer +---@return ccs.DisplayData +function BoneData:getDisplayData(index) end + +---@return boolean +function BoneData:init() end + +---\js ctor +---@return ccs.BoneData +function BoneData.new() end + +return BoneData \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccs/CocoLoader.lua b/addons/cclua/cocos2d/library/ccs/CocoLoader.lua new file mode 100644 index 00000000..06fe37a8 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccs/CocoLoader.lua @@ -0,0 +1,14 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccs.CocoLoader + +--- +---@class ccs.CocoLoader +local CocoLoader = {} + +---@return any +function CocoLoader:__gc() end + +---@return any +function CocoLoader:__olua_move() end + +return CocoLoader \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccs/ColliderBody.lua b/addons/cclua/cocos2d/library/ccs/ColliderBody.lua new file mode 100644 index 00000000..ae93bbd6 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccs/ColliderBody.lua @@ -0,0 +1,20 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccs.ColliderBody + +--- +---@class ccs.ColliderBody : cc.Ref +---@field calculatedVertexList cc.Vec2[] +---@field contourData ccs.ContourData +local ColliderBody = {} + +---@return cc.Vec2[] +function ColliderBody:getCalculatedVertexList() end + +---@return ccs.ContourData +function ColliderBody:getContourData() end + +---@param contourData ccs.ContourData +---@return ccs.ColliderBody +function ColliderBody.new(contourData) end + +return ColliderBody \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccs/ColliderDetector.lua b/addons/cclua/cocos2d/library/ccs/ColliderDetector.lua new file mode 100644 index 00000000..23119fde --- /dev/null +++ b/addons/cclua/cocos2d/library/ccs/ColliderDetector.lua @@ -0,0 +1,52 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccs.ColliderDetector + +--- +---@class ccs.ColliderDetector : cc.Ref +---@field active boolean +---@field bone ccs.Bone +---@field colliderBodyList any +local ColliderDetector = {} + +---@param contourData ccs.ContourData +function ColliderDetector:addContourData(contourData) end + +---@param contourDataList any +function ColliderDetector:addContourDataList(contourDataList) end + +---@return ccs.ColliderDetector +---@overload fun(bone: ccs.Bone): ccs.ColliderDetector +function ColliderDetector.create() end + +---@return boolean +function ColliderDetector:getActive() end + +---@return ccs.Bone +function ColliderDetector:getBone() end + +---@return any +function ColliderDetector:getColliderBodyList() end + +---@return boolean +---@overload fun(self: ccs.ColliderDetector, bone: ccs.Bone): boolean +function ColliderDetector:init() end + +---\js ctor +---@return ccs.ColliderDetector +function ColliderDetector.new() end + +function ColliderDetector:removeAll() end + +---@param contourData ccs.ContourData +function ColliderDetector:removeContourData(contourData) end + +---@param active boolean +function ColliderDetector:setActive(active) end + +---@param bone ccs.Bone +function ColliderDetector:setBone(bone) end + +---@param t cc.Mat4 +function ColliderDetector:updateTransform(t) end + +return ColliderDetector \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccs/ColliderFilter.lua b/addons/cclua/cocos2d/library/ccs/ColliderFilter.lua new file mode 100644 index 00000000..41fc89ea --- /dev/null +++ b/addons/cclua/cocos2d/library/ccs/ColliderFilter.lua @@ -0,0 +1,15 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccs.ColliderFilter + +---\js NA +---\lua NA +---@class ccs.ColliderFilter +local ColliderFilter = {} + +---@return any +function ColliderFilter:__gc() end + +---@return any +function ColliderFilter:__olua_move() end + +return ColliderFilter \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccs/ComAttribute.lua b/addons/cclua/cocos2d/library/ccs/ComAttribute.lua new file mode 100644 index 00000000..5424e4c9 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccs/ComAttribute.lua @@ -0,0 +1,63 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccs.ComAttribute + +--- +---@class ccs.ComAttribute : cc.Component +---@field COMPONENT_NAME string +local ComAttribute = {} + +---@return ccs.ComAttribute +function ComAttribute.create() end + +---@return cc.Ref +function ComAttribute.createInstance() end + +---@param key string +---@param def boolean +---@return boolean +---@overload fun(self: ccs.ComAttribute, key: string): boolean +function ComAttribute:getBool(key, def) end + +---@param key string +---@param def number +---@return number +---@overload fun(self: ccs.ComAttribute, key: string): number +function ComAttribute:getFloat(key, def) end + +---@param key string +---@param def integer +---@return integer +---@overload fun(self: ccs.ComAttribute, key: string): integer +function ComAttribute:getInt(key, def) end + +---@param key string +---@param def string +---@return string +---@overload fun(self: ccs.ComAttribute, key: string): string +function ComAttribute:getString(key, def) end + +---\js ctor +---@return ccs.ComAttribute +function ComAttribute.new() end + +---@param jsonFile string +---@return boolean +function ComAttribute:parse(jsonFile) end + +---@param key string +---@param value boolean +function ComAttribute:setBool(key, value) end + +---@param key string +---@param value number +function ComAttribute:setFloat(key, value) end + +---@param key string +---@param value integer +function ComAttribute:setInt(key, value) end + +---@param key string +---@param value string +function ComAttribute:setString(key, value) end + +return ComAttribute \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccs/ComAudio.lua b/addons/cclua/cocos2d/library/ccs/ComAudio.lua new file mode 100644 index 00000000..2245a692 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccs/ComAudio.lua @@ -0,0 +1,114 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccs.ComAudio + +--- +---@class ccs.ComAudio : cc.Component +---@field backgroundMusicPlaying boolean +---@field backgroundMusicVolume number +---@field effectsVolume number +---@field file string +---@field loop boolean +---@field COMPONENT_NAME string +local ComAudio = {} + +---@param cls string +---@return any +function ComAudio:as(cls) end + +---@return ccs.ComAudio +function ComAudio.create() end + +---@return cc.Ref +function ComAudio.createInstance() end + +---\lua endToLua +function ComAudio:end_() end + +---@return number +function ComAudio:getBackgroundMusicVolume() end + +---@return number +function ComAudio:getEffectsVolume() end + +---@return string +function ComAudio:getFile() end + +---@return boolean +function ComAudio:isBackgroundMusicPlaying() end + +---@return boolean +function ComAudio:isLoop() end + +---\js ctor +---@return ccs.ComAudio +function ComAudio.new() end + +function ComAudio:pauseAllEffects() end + +function ComAudio:pauseBackgroundMusic() end + +---@param nSoundId integer +function ComAudio:pauseEffect(nSoundId) end + +---@param pszFilePath string +---@param bLoop boolean +---@overload fun(self: ccs.ComAudio, pszFilePath: string) +---@overload fun(self: ccs.ComAudio) +function ComAudio:playBackgroundMusic(pszFilePath, bLoop) end + +---@param pszFilePath string +---@param bLoop boolean +---@return integer +---@overload fun(self: ccs.ComAudio, pszFilePath: string): integer +---@overload fun(self: ccs.ComAudio): integer +function ComAudio:playEffect(pszFilePath, bLoop) end + +---@param pszFilePath string +function ComAudio:preloadBackgroundMusic(pszFilePath) end + +---@param pszFilePath string +function ComAudio:preloadEffect(pszFilePath) end + +function ComAudio:resumeAllEffects() end + +function ComAudio:resumeBackgroundMusic() end + +---@param nSoundId integer +function ComAudio:resumeEffect(nSoundId) end + +function ComAudio:rewindBackgroundMusic() end + +---@param volume number +function ComAudio:setBackgroundMusicVolume(volume) end + +---@param volume number +function ComAudio:setEffectsVolume(volume) end + +---@param pszFilePath string +function ComAudio:setFile(pszFilePath) end + +---@param bLoop boolean +function ComAudio:setLoop(bLoop) end + +---\{ +---\name implement Playable Protocol +function ComAudio:start() end + +function ComAudio:stop() end + +function ComAudio:stopAllEffects() end + +---@param bReleaseData boolean +---@overload fun(self: ccs.ComAudio) +function ComAudio:stopBackgroundMusic(bReleaseData) end + +---@param nSoundId integer +function ComAudio:stopEffect(nSoundId) end + +---@param pszFilePath string +function ComAudio:unloadEffect(pszFilePath) end + +---@return boolean +function ComAudio:willPlayBackgroundMusic() end + +return ComAudio \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccs/ComController.lua b/addons/cclua/cocos2d/library/ccs/ComController.lua new file mode 100644 index 00000000..fa9d094e --- /dev/null +++ b/addons/cclua/cocos2d/library/ccs/ComController.lua @@ -0,0 +1,114 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccs.ComController + +--- +---@class ccs.ComController : cc.Component +---@field accelerometerEnabled boolean +---@field keypadEnabled boolean +---@field touchEnabled boolean +---@field touchMode cc.Touch.DispatchMode +---@field touchPriority integer +---@field COMPONENT_NAME string +local ComController = {} + +---@param cls string +---@return any +function ComController:as(cls) end + +---@return ccs.ComController +function ComController.create() end + +---@return cc.Ref +function ComController.createInstance() end + +---@return cc.Touch.DispatchMode +function ComController:getTouchMode() end + +---@return integer +function ComController:getTouchPriority() end + +---@return boolean +function ComController:isAccelerometerEnabled() end + +---@return boolean +function ComController:isKeypadEnabled() end + +---@return boolean +function ComController:isTouchEnabled() end + +---\js ctor +---@return ccs.ComController +function ComController.new() end + +---\js NA +---@param acc cc.Acceleration +---@param event cc.Event +function ComController:onAcceleration(acc, event) end + +---\js NA +---@param keyCode cc.EventKeyboard.KeyCode +---@param event cc.Event +function ComController:onKeyPressed(keyCode, event) end + +---\js NA +---@param keyCode cc.EventKeyboard.KeyCode +---@param event cc.Event +function ComController:onKeyReleased(keyCode, event) end + +---\js NA +---@param touch cc.Touch +---@param event cc.Event +---@return boolean +function ComController:onTouchBegan(touch, event) end + +---\js NA +---@param touch cc.Touch +---@param event cc.Event +function ComController:onTouchCancelled(touch, event) end + +---\js NA +---@param touch cc.Touch +---@param event cc.Event +function ComController:onTouchEnded(touch, event) end + +---\js NA +---@param touch cc.Touch +---@param event cc.Event +function ComController:onTouchMoved(touch, event) end + +---\js NA +---@param touches cc.Touch[] +---@param event cc.Event +function ComController:onTouchesBegan(touches, event) end + +---\js NA +---@param touches cc.Touch[] +---@param event cc.Event +function ComController:onTouchesCancelled(touches, event) end + +---\js NA +---@param touches cc.Touch[] +---@param event cc.Event +function ComController:onTouchesEnded(touches, event) end + +---\js NA +---@param touches cc.Touch[] +---@param event cc.Event +function ComController:onTouchesMoved(touches, event) end + +---@param value boolean +function ComController:setAccelerometerEnabled(value) end + +---@param value boolean +function ComController:setKeypadEnabled(value) end + +---@param value boolean +function ComController:setTouchEnabled(value) end + +---@param mode cc.Touch.DispatchMode +function ComController:setTouchMode(mode) end + +---@param priority integer +function ComController:setTouchPriority(priority) end + +return ComController \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccs/ComRender.lua b/addons/cclua/cocos2d/library/ccs/ComRender.lua new file mode 100644 index 00000000..ac9ad557 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccs/ComRender.lua @@ -0,0 +1,28 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccs.ComRender + +--- +---@class ccs.ComRender : cc.Component +---@field node cc.Node +---@field COMPONENT_NAME string +local ComRender = {} + +---@return ccs.ComRender +---@overload fun(node: cc.Node, comName: string): ccs.ComRender +function ComRender.create() end + +---@return cc.Ref +function ComRender.createInstance() end + +---@return cc.Node +function ComRender:getNode() end + +---\js ctor +---@return ccs.ComRender +---@overload fun(node: cc.Node, comName: string): ccs.ComRender +function ComRender.new() end + +---@param node cc.Node +function ComRender:setNode(node) end + +return ComRender \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccs/ContourData.lua b/addons/cclua/cocos2d/library/ccs/ContourData.lua new file mode 100644 index 00000000..93b17039 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccs/ContourData.lua @@ -0,0 +1,22 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccs.ContourData + +--- +---@class ccs.ContourData : cc.Ref +---@field vertexList cc.Vec2[] +local ContourData = {} + +---@param vertex cc.Vec2 +function ContourData:addVertex(vertex) end + +---@return ccs.ContourData +function ContourData.create() end + +---@return boolean +function ContourData:init() end + +---\js ctor +---@return ccs.ContourData +function ContourData.new() end + +return ContourData \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccs/DataReaderHelper.lua b/addons/cclua/cocos2d/library/ccs/DataReaderHelper.lua new file mode 100644 index 00000000..257f0832 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccs/DataReaderHelper.lua @@ -0,0 +1,43 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccs.DataReaderHelper + +---\js NA +---\lua NA +---@class ccs.DataReaderHelper +---@field instance ccs.DataReaderHelper +---@field positionReadScale number +local DataReaderHelper = {} + +---@return any +function DataReaderHelper:__gc() end + +---@return any +function DataReaderHelper:__olua_move() end + +---@param dt number +function DataReaderHelper:addDataAsyncCallBack(dt) end + +---@param filePath string +function DataReaderHelper:addDataFromFile(filePath) end + +---@return ccs.DataReaderHelper +function DataReaderHelper.getInstance() end + +---@return number +function DataReaderHelper.getPositionReadScale() end + +---\js ctor +---@return ccs.DataReaderHelper +function DataReaderHelper.new() end + +function DataReaderHelper.purge() end + +---@param configFile string +function DataReaderHelper:removeConfigFile(configFile) end + +---Scale the position data, used for multiresolution adapter +---It won't effect the data already read. +---@param scale number +function DataReaderHelper.setPositionReadScale(scale) end + +return DataReaderHelper \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccs/DecorativeDisplay.lua b/addons/cclua/cocos2d/library/ccs/DecorativeDisplay.lua new file mode 100644 index 00000000..682015c3 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccs/DecorativeDisplay.lua @@ -0,0 +1,39 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccs.DecorativeDisplay + +---\js NA +---\lua NA +---@class ccs.DecorativeDisplay : cc.Ref +---@field colliderDetector ccs.ColliderDetector +---@field display cc.Node +---@field displayData ccs.DisplayData +local DecorativeDisplay = {} + +---@return ccs.DecorativeDisplay +function DecorativeDisplay.create() end + +---@return ccs.ColliderDetector +function DecorativeDisplay:getColliderDetector() end + +---@return cc.Node +function DecorativeDisplay:getDisplay() end + +---@return ccs.DisplayData +function DecorativeDisplay:getDisplayData() end + +---@return boolean +function DecorativeDisplay:init() end + +---@return ccs.DecorativeDisplay +function DecorativeDisplay.new() end + +---@param detector ccs.ColliderDetector +function DecorativeDisplay:setColliderDetector(detector) end + +---@param display cc.Node +function DecorativeDisplay:setDisplay(display) end + +---@param data ccs.DisplayData +function DecorativeDisplay:setDisplayData(data) end + +return DecorativeDisplay \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccs/DisplayData.lua b/addons/cclua/cocos2d/library/ccs/DisplayData.lua new file mode 100644 index 00000000..7183a394 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccs/DisplayData.lua @@ -0,0 +1,25 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccs.DisplayData + +---\js NA +---\lua NA +---@class ccs.DisplayData : cc.Ref +---@field displayName string +---@field displayType ccs.DisplayType +local DisplayData = {} + +---@param displayName string +---@return string +function DisplayData.changeDisplayToTexture(displayName) end + +---@param displayData ccs.DisplayData +function DisplayData:copy(displayData) end + +---@return ccs.DisplayData +function DisplayData.create() end + +---\js ctor +---@return ccs.DisplayData +function DisplayData.new() end + +return DisplayData \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccs/DisplayFactory.lua b/addons/cclua/cocos2d/library/ccs/DisplayFactory.lua new file mode 100644 index 00000000..305a0d78 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccs/DisplayFactory.lua @@ -0,0 +1,72 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccs.DisplayFactory + +---\js NA +---\lua NA +---@class ccs.DisplayFactory +local DisplayFactory = {} + +---@return any +function DisplayFactory:__gc() end + +---@return any +function DisplayFactory:__olua_move() end + +---@param bone ccs.Bone +---@param decoDisplay ccs.DecorativeDisplay +---@param displayData ccs.DisplayData +function DisplayFactory.addArmatureDisplay(bone, decoDisplay, displayData) end + +---@param bone ccs.Bone +---@param decoDisplay ccs.DecorativeDisplay +---@param displayData ccs.DisplayData +function DisplayFactory.addDisplay(bone, decoDisplay, displayData) end + +---@param bone ccs.Bone +---@param decoDisplay ccs.DecorativeDisplay +---@param displayData ccs.DisplayData +function DisplayFactory.addParticleDisplay(bone, decoDisplay, displayData) end + +---@param bone ccs.Bone +---@param decoDisplay ccs.DecorativeDisplay +---@param displayData ccs.DisplayData +function DisplayFactory.addSpriteDisplay(bone, decoDisplay, displayData) end + +---@param bone ccs.Bone +---@param decoDisplay ccs.DecorativeDisplay +function DisplayFactory.createArmatureDisplay(bone, decoDisplay) end + +---@param bone ccs.Bone +---@param decoDisplay ccs.DecorativeDisplay +function DisplayFactory.createDisplay(bone, decoDisplay) end + +---@param bone ccs.Bone +---@param decoDisplay ccs.DecorativeDisplay +function DisplayFactory.createParticleDisplay(bone, decoDisplay) end + +---@param bone ccs.Bone +---@param decoDisplay ccs.DecorativeDisplay +function DisplayFactory.createSpriteDisplay(bone, decoDisplay) end + +---@param bone ccs.Bone +---@param decoDisplay ccs.DecorativeDisplay +---@param displayName string +---@param skin ccs.Skin +function DisplayFactory.initSpriteDisplay(bone, decoDisplay, displayName, skin) end + +---@param bone ccs.Bone +---@param display cc.Node +---@param dt number +function DisplayFactory.updateArmatureDisplay(bone, display, dt) end + +---@param bone ccs.Bone +---@param dt number +---@param dirty boolean +function DisplayFactory.updateDisplay(bone, dt, dirty) end + +---@param bone ccs.Bone +---@param display cc.Node +---@param dt number +function DisplayFactory.updateParticleDisplay(bone, display, dt) end + +return DisplayFactory \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccs/DisplayManager.lua b/addons/cclua/cocos2d/library/ccs/DisplayManager.lua new file mode 100644 index 00000000..19d8e196 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccs/DisplayManager.lua @@ -0,0 +1,124 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccs.DisplayManager + +---! DisplayManager manages Bone's display +---\js NA +---\lua NA +---@class ccs.DisplayManager : cc.Ref +---@field anchorPoint cc.Vec2 +---@field anchorPointInPoints cc.Vec2 +---@field boundingBox cc.Rect +---@field contentSize cc.Size +---@field currentDecorativeDisplay ccs.DecorativeDisplay +---@field currentDisplayIndex integer +---@field decorativeDisplayList any +---@field displayRenderNode cc.Node +---@field displayRenderNodeType ccs.DisplayType +---@field forceChangeDisplay boolean +---@field visible boolean Determines if the display is visible

\see setVisible(bool) \return true if the node is visible, false if the node is hidden. +local DisplayManager = {} + +---Add display and use _DisplayData init the display. +---If index already have a display, then replace it. +---If index is current display index, then also change display to _index +--- +---@param displayData ccs.DisplayData # it include the display information, like DisplayType. +---If you want to create a sprite display, then create a SpriteDisplayData param +--- +---@param index integer # the index of the display you want to replace or add to +----1 : append display from back +---@overload fun(self: ccs.DisplayManager, display: cc.Node, index: integer) +function DisplayManager:addDisplay(displayData, index) end + +---Change display by index. You can just use this method to change display in the display list. +---The display list is just used for this bone, and it is the displays you may use in every frame. +--- +---Note : if index is the same with prev index, the method will not effect +--- +---@param index integer # The index of the display you want to change +---@param force boolean # If true, then force change display to specified display, or current display will set to display index edit in the flash every key frame. +function DisplayManager:changeDisplayWithIndex(index, force) end + +---@param name string +---@param force boolean +function DisplayManager:changeDisplayWithName(name, force) end + +---Check if the position is inside the bone. +---@param _point cc.Vec2 +---@return boolean +---@overload fun(self: ccs.DisplayManager, x: number, y: number): boolean +function DisplayManager:containPoint(_point) end + +---@param bone ccs.Bone +---@return ccs.DisplayManager +function DisplayManager.create(bone) end + +---@return cc.Vec2 +function DisplayManager:getAnchorPoint() end + +---@return cc.Vec2 +function DisplayManager:getAnchorPointInPoints() end + +---@return cc.Rect +function DisplayManager:getBoundingBox() end + +---@return cc.Size +function DisplayManager:getContentSize() end + +---@return ccs.DecorativeDisplay +function DisplayManager:getCurrentDecorativeDisplay() end + +---@return integer +function DisplayManager:getCurrentDisplayIndex() end + +---@param index integer +---@return ccs.DecorativeDisplay +function DisplayManager:getDecorativeDisplayByIndex(index) end + +---@return any +function DisplayManager:getDecorativeDisplayList() end + +---@return cc.Node +function DisplayManager:getDisplayRenderNode() end + +---@return ccs.DisplayType +function DisplayManager:getDisplayRenderNodeType() end + +---@param bone ccs.Bone +---@return boolean +function DisplayManager:init(bone) end + +---Use BoneData to init the display list. +---If display is a sprite, and it have texture info in the TextureData, then use TextureData to init the display's anchor point +---If the display is a Armature, then create a new Armature +---@param boneData ccs.BoneData +function DisplayManager:initDisplayList(boneData) end + +---@return boolean +function DisplayManager:isForceChangeDisplay() end + +---Determines if the display is visible +--- +---\see setVisible(bool) +---@return boolean # true if the node is visible, false if the node is hidden. +function DisplayManager:isVisible() end + +---@return ccs.DisplayManager +function DisplayManager.new() end + +---@param index integer +function DisplayManager:removeDisplay(index) end + +---@param decoDisplay ccs.DecorativeDisplay +function DisplayManager:setCurrentDecorativeDisplay(decoDisplay) end + +---@param force boolean +function DisplayManager:setForceChangeDisplay(force) end + +---Sets whether the display is visible +---The default value is true, a node is default to visible +--- +---@param visible boolean # true if the node is visible, false if the node is hidden. +function DisplayManager:setVisible(visible) end + +return DisplayManager \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccs/DisplayType.lua b/addons/cclua/cocos2d/library/ccs/DisplayType.lua new file mode 100644 index 00000000..2e774c5e --- /dev/null +++ b/addons/cclua/cocos2d/library/ccs/DisplayType.lua @@ -0,0 +1,19 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccs.DisplayType + +---@type ccs.DisplayType +local VALUE + +--- +---@enum ccs.DisplayType +local DisplayType = { + ---! display is a single Sprite + CS_DISPLAY_ARMATURE = 1, + ---! display is a CCParticle. + CS_DISPLAY_MAX = 3, + ---! display is a Armature + CS_DISPLAY_PARTICLE = 2, + CS_DISPLAY_SPRITE = 0, +} + +return DisplayType \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccs/FrameData.lua b/addons/cclua/cocos2d/library/ccs/FrameData.lua new file mode 100644 index 00000000..a84474f7 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccs/FrameData.lua @@ -0,0 +1,28 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccs.FrameData + +---\js NA +---\lua NA +---@class ccs.FrameData : ccs.BaseData +---@field blendFunc cc.BlendFunc +---@field displayIndex integer +---@field duration integer +---@field easingParamNumber integer +---@field easingParams olua.float +---@field frameID integer +---@field isTween boolean +---@field strEvent string +---@field strMovement string +---@field strSound string +---@field strSoundEffect string +---@field tweenEasing cc.tweenfunc.TweenType +local FrameData = {} + +---@return ccs.FrameData +function FrameData.create() end + +---\js ctor +---@return ccs.FrameData +function FrameData.new() end + +return FrameData \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccs/GUIReader.lua b/addons/cclua/cocos2d/library/ccs/GUIReader.lua new file mode 100644 index 00000000..e0963397 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccs/GUIReader.lua @@ -0,0 +1,43 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccs.GUIReader + +--- +---@class ccs.GUIReader : cc.Ref +---@field filePath string +---@field instance ccs.GUIReader +local GUIReader = {} + +function GUIReader.destroyInstance() end + +---\js NA +---@param fileName string +---@return cc.Size +function GUIReader:getFileDesignSize(fileName) end + +---@return string +function GUIReader:getFilePath() end + +---@return ccs.GUIReader +function GUIReader.getInstance() end + +---@param str string +---@return integer +function GUIReader:getVersionInteger(str) end + +---@param strFilePath string +function GUIReader:setFilePath(strFilePath) end + +---\js NA +---@param fileName string +---@param size cc.Size +function GUIReader:storeFileDesignSize(fileName, size) end + +---@param fileName string +---@return ccui.Widget +function GUIReader:widgetFromBinaryFile(fileName) end + +---@param fileName string +---@return ccui.Widget +function GUIReader:widgetFromJsonFile(fileName) end + +return GUIReader \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccs/InputDelegate.lua b/addons/cclua/cocos2d/library/ccs/InputDelegate.lua new file mode 100644 index 00000000..11f66fde --- /dev/null +++ b/addons/cclua/cocos2d/library/ccs/InputDelegate.lua @@ -0,0 +1,109 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccs.InputDelegate + +---\lua NA +---@class ccs.InputDelegate +---@field accelerometerEnabled boolean +---@field keypadEnabled boolean +---@field touchEnabled boolean +---@field touchMode cc.Touch.DispatchMode +---@field touchPriority integer +local InputDelegate = {} + +---@return any +function InputDelegate:__gc() end + +---@return any +function InputDelegate:__olua_move() end + +---@return cc.Touch.DispatchMode +function InputDelegate:getTouchMode() end + +---@return integer +function InputDelegate:getTouchPriority() end + +---@return boolean +function InputDelegate:isAccelerometerEnabled() end + +---@return boolean +function InputDelegate:isKeypadEnabled() end + +---@return boolean +function InputDelegate:isTouchEnabled() end + +---\js ctor +---@return ccs.InputDelegate +function InputDelegate.new() end + +---\js NA +---@param acc cc.Acceleration +---@param event cc.Event +function InputDelegate:onAcceleration(acc, event) end + +---\js NA +---@param keyCode cc.EventKeyboard.KeyCode +---@param event cc.Event +function InputDelegate:onKeyPressed(keyCode, event) end + +---\js NA +---@param keyCode cc.EventKeyboard.KeyCode +---@param event cc.Event +function InputDelegate:onKeyReleased(keyCode, event) end + +---\js NA +---@param touch cc.Touch +---@param event cc.Event +---@return boolean +function InputDelegate:onTouchBegan(touch, event) end + +---\js NA +---@param touch cc.Touch +---@param event cc.Event +function InputDelegate:onTouchCancelled(touch, event) end + +---\js NA +---@param touch cc.Touch +---@param event cc.Event +function InputDelegate:onTouchEnded(touch, event) end + +---\js NA +---@param touch cc.Touch +---@param event cc.Event +function InputDelegate:onTouchMoved(touch, event) end + +---\js NA +---@param touches cc.Touch[] +---@param event cc.Event +function InputDelegate:onTouchesBegan(touches, event) end + +---\js NA +---@param touches cc.Touch[] +---@param event cc.Event +function InputDelegate:onTouchesCancelled(touches, event) end + +---\js NA +---@param touches cc.Touch[] +---@param event cc.Event +function InputDelegate:onTouchesEnded(touches, event) end + +---\js NA +---@param touches cc.Touch[] +---@param event cc.Event +function InputDelegate:onTouchesMoved(touches, event) end + +---@param value boolean +function InputDelegate:setAccelerometerEnabled(value) end + +---@param value boolean +function InputDelegate:setKeypadEnabled(value) end + +---@param value boolean +function InputDelegate:setTouchEnabled(value) end + +---@param mode cc.Touch.DispatchMode +function InputDelegate:setTouchMode(mode) end + +---@param priority integer +function InputDelegate:setTouchPriority(priority) end + +return InputDelegate \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccs/MovementBoneData.lua b/addons/cclua/cocos2d/library/ccs/MovementBoneData.lua new file mode 100644 index 00000000..251518b8 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccs/MovementBoneData.lua @@ -0,0 +1,31 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccs.MovementBoneData + +---\js NA +---\lua NA +---@class ccs.MovementBoneData : cc.Ref +---@field delay number +---@field duration number +---@field frameList any +---@field name string +---@field scale number +local MovementBoneData = {} + +---@param frameData ccs.FrameData +function MovementBoneData:addFrameData(frameData) end + +---@return ccs.MovementBoneData +function MovementBoneData.create() end + +---@param index integer +---@return ccs.FrameData +function MovementBoneData:getFrameData(index) end + +---@return boolean +function MovementBoneData:init() end + +---\js ctor +---@return ccs.MovementBoneData +function MovementBoneData.new() end + +return MovementBoneData \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccs/MovementData.lua b/addons/cclua/cocos2d/library/ccs/MovementData.lua new file mode 100644 index 00000000..acea0ec8 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccs/MovementData.lua @@ -0,0 +1,31 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccs.MovementData + +---\js NA +---\lua NA +---@class ccs.MovementData : cc.Ref +---@field duration integer +---@field durationTo integer +---@field durationTween integer +---@field loop boolean +---@field movBoneDataDic any +---@field name string +---@field scale number +---@field tweenEasing cc.tweenfunc.TweenType +local MovementData = {} + +---@param movBoneData ccs.MovementBoneData +function MovementData:addMovementBoneData(movBoneData) end + +---@return ccs.MovementData +function MovementData.create() end + +---@param boneName string +---@return ccs.MovementBoneData +function MovementData:getMovementBoneData(boneName) end + +---\js ctor +---@return ccs.MovementData +function MovementData.new() end + +return MovementData \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccs/MovementEventType.lua b/addons/cclua/cocos2d/library/ccs/MovementEventType.lua new file mode 100644 index 00000000..606c4719 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccs/MovementEventType.lua @@ -0,0 +1,15 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccs.MovementEventType + +---@type ccs.MovementEventType +local VALUE + +--- +---@enum ccs.MovementEventType +local MovementEventType = { + COMPLETE = 1, + LOOP_COMPLETE = 2, + START = 0, +} + +return MovementEventType \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccs/ParticleDisplayData.lua b/addons/cclua/cocos2d/library/ccs/ParticleDisplayData.lua new file mode 100644 index 00000000..a40ced6e --- /dev/null +++ b/addons/cclua/cocos2d/library/ccs/ParticleDisplayData.lua @@ -0,0 +1,16 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccs.ParticleDisplayData + +---\js NA +---\lua NA +---@class ccs.ParticleDisplayData : ccs.DisplayData +local ParticleDisplayData = {} + +---@return ccs.ParticleDisplayData +function ParticleDisplayData.create() end + +---\js ctor +---@return ccs.ParticleDisplayData +function ParticleDisplayData.new() end + +return ParticleDisplayData \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccs/ProcessBase.lua b/addons/cclua/cocos2d/library/ccs/ProcessBase.lua new file mode 100644 index 00000000..81f45a47 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccs/ProcessBase.lua @@ -0,0 +1,93 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccs.ProcessBase + +---\js NA +---\lua NA +---@class ccs.ProcessBase : cc.Ref +---@field complete boolean +---@field currentFrameIndex integer +---@field currentPercent number +---@field playing boolean +---@field processScale number +---@field rawDuration integer +local ProcessBase = {} + +---@return integer +function ProcessBase:getCurrentFrameIndex() end + +---@return number +function ProcessBase:getCurrentPercent() end + +---@return number +function ProcessBase:getProcessScale() end + +---@return integer +function ProcessBase:getRawDuration() end + +---@return boolean +function ProcessBase:isComplete() end + +---@return boolean +function ProcessBase:isPause() end + +---@return boolean +function ProcessBase:isPlaying() end + +---@return ccs.ProcessBase +function ProcessBase.new() end + +---Pause the Process +function ProcessBase:pause() end + +---Play animation by animation name. +--- +---@param durationTo integer # The frames between two animation changing-over. +---It's meaning is changing to this animation need how many frames +--- +----1 : use the value from MovementData get from flash design panel +---@param durationTween integer # The frame count you want to play in the game. +---if _durationTween is 80, then the animation will played 80 frames in a loop +--- +----1 : use the value from MovementData get from flash design panel +--- +---@param loop integer # Whether the animation is loop +--- +---loop < 0 : use the value from MovementData get from flash design panel +---loop = 0 : this animation is not loop +---loop > 0 : this animation is loop +--- +---@param tweenEasing integer # Tween easing is used for calculate easing effect +--- +---TWEEN_EASING_MAX : use the value from MovementData get from flash design panel +----1 : fade out +---0 : line +---1 : fade in +---2 : fade in and out +function ProcessBase:play(durationTo, durationTween, loop, tweenEasing) end + +---Resume the Process +function ProcessBase:resume() end + +---@param complete boolean +function ProcessBase:setIsComplete(complete) end + +---@param pause boolean +function ProcessBase:setIsPause(pause) end + +---@param playing boolean +function ProcessBase:setIsPlaying(playing) end + +---@param processScale number +function ProcessBase:setProcessScale(processScale) end + +---Stop the Process +function ProcessBase:stop() end + +---You should never call this function, unless you know what you do +---Update the Process, include current process, current frame and son on +--- +---\param The duration since last update +---@param dt number +function ProcessBase:update(dt) end + +return ProcessBase \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccs/SceneReader.lua b/addons/cclua/cocos2d/library/ccs/SceneReader.lua new file mode 100644 index 00000000..2f804eb9 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccs/SceneReader.lua @@ -0,0 +1,45 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccs.SceneReader + +--- +---@class ccs.SceneReader +---@field attachComponentType ccs.SceneReader.AttachComponentType +---@field instance ccs.SceneReader +local SceneReader = {} + +---@return any +function SceneReader:__gc() end + +---@return any +function SceneReader:__olua_move() end + +---@param fileName string +---@param attachComponent ccs.SceneReader.AttachComponentType +---@return cc.Node +---@overload fun(self: ccs.SceneReader, fileName: string): cc.Node +function SceneReader:createNodeWithSceneFile(fileName, attachComponent) end + +---\js purge +---\lua destroySceneReader +function SceneReader.destroyInstance() end + +---@return ccs.SceneReader.AttachComponentType +function SceneReader:getAttachComponentType() end + +---@return ccs.SceneReader +function SceneReader.getInstance() end + +---@param nTag integer +---@return cc.Node +function SceneReader:getNodeByTag(nTag) end + +---@return ccs.SceneReader +function SceneReader.new() end + +---@return string +function SceneReader.sceneReaderVersion() end + +---@param selector fun(arg1: cc.Ref, arg2: any) +function SceneReader:setTarget(selector) end + +return SceneReader \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccs/SceneReader/AttachComponentType.lua b/addons/cclua/cocos2d/library/ccs/SceneReader/AttachComponentType.lua new file mode 100644 index 00000000..16acd97c --- /dev/null +++ b/addons/cclua/cocos2d/library/ccs/SceneReader/AttachComponentType.lua @@ -0,0 +1,25 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccs.SceneReader.AttachComponentType + +---@type ccs.SceneReader.AttachComponentType +local VALUE + +--- +---@enum ccs.SceneReader.AttachComponentType +local AttachComponentType = { + ---Default AttachComponentType is _EmptyNode + DEFAULT = 0, + ---parent: Empty Node + ---ComRender(Sprite, Armature, TMXTiledMap, ParticleSystemQuad, GUIComponent) + ---ComAttribute + ---ComAudio + ---.... + EMPTY_NODE = 0, + ---parent: ComRender(Sprite, Armature, TMXTiledMap, ParticleSystemQuad, GUIComponent) + ---ComAttribute + ---ComAudio + ---..... + RENDER_NODE = 1, +} + +return AttachComponentType \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccs/Skin.lua b/addons/cclua/cocos2d/library/ccs/Skin.lua new file mode 100644 index 00000000..88db7170 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccs/Skin.lua @@ -0,0 +1,48 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccs.Skin + +--- +---@class ccs.Skin : cc.Sprite +---@field bone ccs.Bone +---@field displayName string +---@field nodeToWorldTransformAR cc.Mat4 +---@field skinData ccs.BaseData \js NA \lua NA +local Skin = {} + +---@return ccs.Skin +---@overload fun(pszFileName: string): ccs.Skin +function Skin.create() end + +---@param pszSpriteFrameName string +---@return ccs.Skin +function Skin.createWithSpriteFrameName(pszSpriteFrameName) end + +---@return ccs.Bone +function Skin:getBone() end + +---@return string +function Skin:getDisplayName() end + +---@return cc.Mat4 +function Skin:getNodeToWorldTransformAR() end + +---\js NA +---\lua NA +---@return ccs.BaseData +function Skin:getSkinData() end + +---\js ctor +---@return ccs.Skin +function Skin.new() end + +---@param bone ccs.Bone +function Skin:setBone(bone) end + +---\js NA +---\lua NA +---@param data ccs.BaseData +function Skin:setSkinData(data) end + +function Skin:updateArmatureTransform() end + +return Skin \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccs/SpriteDisplayData.lua b/addons/cclua/cocos2d/library/ccs/SpriteDisplayData.lua new file mode 100644 index 00000000..a67fa1cd --- /dev/null +++ b/addons/cclua/cocos2d/library/ccs/SpriteDisplayData.lua @@ -0,0 +1,17 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccs.SpriteDisplayData + +---\js NA +---\lua NA +---@class ccs.SpriteDisplayData : ccs.DisplayData +---@field skinData ccs.BaseData +local SpriteDisplayData = {} + +---@return ccs.SpriteDisplayData +function SpriteDisplayData.create() end + +---\js ctor +---@return ccs.SpriteDisplayData +function SpriteDisplayData.new() end + +return SpriteDisplayData \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccs/SpriteFrameCacheHelper.lua b/addons/cclua/cocos2d/library/ccs/SpriteFrameCacheHelper.lua new file mode 100644 index 00000000..2d9fd06f --- /dev/null +++ b/addons/cclua/cocos2d/library/ccs/SpriteFrameCacheHelper.lua @@ -0,0 +1,26 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccs.SpriteFrameCacheHelper + +---\js NA +---\lua NA +---@class ccs.SpriteFrameCacheHelper +---@field instance ccs.SpriteFrameCacheHelper +local SpriteFrameCacheHelper = {} + +---@return any +function SpriteFrameCacheHelper:__olua_move() end + +---Add sprite frame to CCSpriteFrameCache, it will save display name and it's relative image name +---@param plistPath string +---@param imagePath string +function SpriteFrameCacheHelper:addSpriteFrameFromFile(plistPath, imagePath) end + +---@return ccs.SpriteFrameCacheHelper +function SpriteFrameCacheHelper.getInstance() end + +function SpriteFrameCacheHelper.purge() end + +---@param plistPath string +function SpriteFrameCacheHelper:removeSpriteFrameFromFile(plistPath) end + +return SpriteFrameCacheHelper \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccs/TextureData.lua b/addons/cclua/cocos2d/library/ccs/TextureData.lua new file mode 100644 index 00000000..fd7e32d3 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccs/TextureData.lua @@ -0,0 +1,31 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccs.TextureData + +--- +---@class ccs.TextureData : cc.Ref +---@field contourDataList any +---@field height number +---@field name string +---@field pivotX number +---@field pivotY number +---@field width number +local TextureData = {} + +---@param contourData ccs.ContourData +function TextureData:addContourData(contourData) end + +---@return ccs.TextureData +function TextureData.create() end + +---@param index integer +---@return ccs.ContourData +function TextureData:getContourData(index) end + +---@return boolean +function TextureData:init() end + +---\js ctor +---@return ccs.TextureData +function TextureData.new() end + +return TextureData \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccs/Tween.lua b/addons/cclua/cocos2d/library/ccs/Tween.lua new file mode 100644 index 00000000..0638687f --- /dev/null +++ b/addons/cclua/cocos2d/library/ccs/Tween.lua @@ -0,0 +1,89 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccs.Tween + +---\js NA +---\lua NA +---@class ccs.Tween : ccs.ProcessBase +---@field animation ccs.ArmatureAnimation +---@field movementBoneData ccs.MovementBoneData +local Tween = {} + +---Create with a Bone +---@param bone ccs.Bone # the Bone Tween will bind to +---@return ccs.Tween +function Tween.create(bone) end + +---@return ccs.ArmatureAnimation +function Tween:getAnimation() end + +---@return ccs.MovementBoneData +function Tween:getMovementBoneData() end + +---@param frameIndex integer +function Tween:gotoAndPause(frameIndex) end + +---@param frameIndex integer +function Tween:gotoAndPlay(frameIndex) end + +---Init with a Bone +---@param bone ccs.Bone # the Bone Tween will bind to +---@return boolean +function Tween:init(bone) end + +---@return ccs.Tween +function Tween.new() end + +---Start the Process +--- +---@param movementBoneData ccs.MovementBoneData # the MovementBoneData include all FrameData +---@param durationTo integer # the number of frames changing to this animation needs. +---@param durationTween integer # the number of frames this animation actual last. +--- +---@param loop integer # whether the animation is loop +--- +---loop < 0 : use the value from MovementData get from Action Editor +---loop = 0 : this animation is not loop +---loop > 0 : this animation is loop +--- +---@param tweenEasing integer # tween easing is used for calculate easing effect +--- +---TWEEN_EASING_MAX : use the value from MovementData get from Action Editor +----1 : fade out +---0 : line +---1 : fade in +---2 : fade in and out +--- +---Play animation by animation name. +--- +---\param durationTo The frames between two animation changing-over. +---It's meaning is changing to this animation need how many frames +--- +----1 : use the value from MovementData get from flash design panel +---\param durationTween The frame count you want to play in the game. +---if _durationTween is 80, then the animation will played 80 frames in a loop +--- +----1 : use the value from MovementData get from flash design panel +--- +---\param loop Whether the animation is loop +--- +---loop < 0 : use the value from MovementData get from flash design panel +---loop = 0 : this animation is not loop +---loop > 0 : this animation is loop +--- +---\param tweenEasing Tween easing is used for calculate easing effect +--- +---TWEEN_EASING_MAX : use the value from MovementData get from flash design panel +----1 : fade out +---0 : line +---1 : fade in +---2 : fade in and out +---@overload fun(self: ccs.Tween, durationTo: integer, durationTween: integer, loop: integer, tweenEasing: integer) +function Tween:play(movementBoneData, durationTo, durationTween, loop, tweenEasing) end + +---@param animation ccs.ArmatureAnimation +function Tween:setAnimation(animation) end + +---@param data ccs.MovementBoneData +function Tween:setMovementBoneData(data) end + +return Tween \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccs/timeline/ActionTimeline.lua b/addons/cclua/cocos2d/library/ccs/timeline/ActionTimeline.lua new file mode 100644 index 00000000..61f5baa6 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccs/timeline/ActionTimeline.lua @@ -0,0 +1,159 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccs.timeline.ActionTimeline + +--- +---@class ccs.timeline.ActionTimeline : cc.Action +---@field currentFrame integer Get current frame. +---@field duration integer +---@field endFrame integer End frame of this action. When action play to this frame, if action is not loop, then it will stop, or it will play from start frame again. +---@field playing boolean Whether or not Action is playing. +---@field startFrame integer Start frame index of this action +---@field timeSpeed number Get current animation speed. +---@field timelines any +local ActionTimeline = {} + +---@param animationName string +---@return boolean +function ActionTimeline:IsAnimationInfoExists(animationName) end + +---AnimationInfo +---@param animationInfo ccs.timeline.AnimationInfo +function ActionTimeline:addAnimationInfo(animationInfo) end + +---add a callback function after played frameIndex +---@param frameIndex integer # the frame index call back after +---@param funcKey string # for identity the callback function +---@param func fun() # the callback function +function ActionTimeline:addFrameEndCallFunc(frameIndex, funcKey, func) end + +---add Timeline to ActionTimeline +---@param timeline ccs.timeline.Timeline +function ActionTimeline:addTimeline(timeline) end + +---@param cls string +---@return any +function ActionTimeline:as(cls) end + +function ActionTimeline:clearFrameEndCallFuncs() end + +function ActionTimeline:clearFrameEventCallFunc() end + +function ActionTimeline:clearLastFrameCallFunc() end + +---@return ccs.timeline.ActionTimeline +function ActionTimeline.create() end + +---@param animationName string +---@return ccs.timeline.AnimationInfo +function ActionTimeline:getAnimationInfo(animationName) end + +---Get current frame. +---@return integer +function ActionTimeline:getCurrentFrame() end + +---@return integer +function ActionTimeline:getDuration() end + +---End frame of this action. +---When action play to this frame, if action is not loop, then it will stop, +---or it will play from start frame again. +---@return integer +function ActionTimeline:getEndFrame() end + +---Start frame index of this action +---@return integer +function ActionTimeline:getStartFrame() end + +---Get current animation speed. +---@return number +function ActionTimeline:getTimeSpeed() end + +---@return any +function ActionTimeline:getTimelines() end + +---Goto the specified frame index, and pause at this index. +---@param startIndex integer # The animation will pause at this index. +function ActionTimeline:gotoFrameAndPause(startIndex) end + +---Goto the specified frame index, and start playing from this index. +---@param startIndex integer # The animation will play from this index. +--- +---Goto the specified frame index, and start playing from this index. +---\param startIndex The animation will play from this index. +---\param loop Whether or not the animation need loop. +---@overload fun(self: ccs.timeline.ActionTimeline, startIndex: integer, loop: boolean) +--- +---Goto the specified frame index, and start playing from start index, end at end index. +---\param startIndex The animation will play from this index. +---\param endIndex The animation will end at this index. +---\param loop Whether or not the animation need loop. +---@overload fun(self: ccs.timeline.ActionTimeline, startIndex: integer, endIndex: integer, loop: boolean) +--- +---Goto the specified frame index, and start playing from start index, end at end index. +---\param startIndex The animation will play from this index. +---\param endIndex The animation will end at this index. +---\param currentFrameIndex set current frame index. +---\param loop Whether or not the animation need loop. +---@overload fun(self: ccs.timeline.ActionTimeline, startIndex: integer, endIndex: integer, currentFrameIndex: integer, loop: boolean) +function ActionTimeline:gotoFrameAndPlay(startIndex) end + +---Whether or not Action is playing. +---@return boolean +function ActionTimeline:isPlaying() end + +---@return ccs.timeline.ActionTimeline +function ActionTimeline.new() end + +---Pause the animation. +function ActionTimeline:pause() end + +---@param animationName string +---@param loop boolean +function ActionTimeline:play(animationName, loop) end + +---@param animationName string +function ActionTimeline:removeAnimationInfo(animationName) end + +---@param frameIndex integer +---@param funcKey string +function ActionTimeline:removeFrameEndCallFunc(frameIndex, funcKey) end + +---@param frameIndex integer +function ActionTimeline:removeFrameEndCallFuncs(frameIndex) end + +---@param timeline ccs.timeline.Timeline +function ActionTimeline:removeTimeline(timeline) end + +---Resume the animation. +function ActionTimeline:resume() end + +---add a frame end call back to animation's end frame +---@param animationName string # @addFrameEndCallFunc, make the animationName as funcKey +---@param func fun() # the callback function +function ActionTimeline:setAnimationEndCallFunc(animationName, func) end + +---Set current frame index, this will cause action plays to this frame. +---@param frameIndex integer +function ActionTimeline:setCurrentFrame(frameIndex) end + +---duration of the whole action +---@param duration integer +function ActionTimeline:setDuration(duration) end + +---Set ActionTimeline's frame event callback function +---@param listener fun(arg1: ccs.timeline.Frame) +function ActionTimeline:setFrameEventCallFunc(listener) end + +---Last frame callback will call when arriving last frame +---@param listener fun() +function ActionTimeline:setLastFrameCallFunc(listener) end + +---Set the animation speed, this will speed up or slow down the speed. +---@param speed number +function ActionTimeline:setTimeSpeed(speed) end + +---\{ +---\name implement Playable Protocol +function ActionTimeline:start() end + +return ActionTimeline \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccs/timeline/ActionTimelineCache.lua b/addons/cclua/cocos2d/library/ccs/timeline/ActionTimelineCache.lua new file mode 100644 index 00000000..072b5d14 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccs/timeline/ActionTimelineCache.lua @@ -0,0 +1,75 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccs.timeline.ActionTimelineCache + +--- +---@class ccs.timeline.ActionTimelineCache +---@field instance ccs.timeline.ActionTimelineCache Gets the singleton +local ActionTimelineCache = {} + +---@return any +function ActionTimelineCache:__gc() end + +---@return any +function ActionTimelineCache:__olua_move() end + +---@param fileName string +---@return ccs.timeline.ActionTimeline +function ActionTimelineCache.createAction(fileName) end + +---@param fileName string +---@param content string +---@return ccs.timeline.ActionTimeline +function ActionTimelineCache:createActionFromContent(fileName, content) end + +---Clone a action with the specified name from the container. +---@param fileName string +---@return ccs.timeline.ActionTimeline +function ActionTimelineCache:createActionFromJson(fileName) end + +---@param data any +---@param fileName string +---@return ccs.timeline.ActionTimeline +function ActionTimelineCache:createActionWithDataBuffer(data, fileName) end + +---@param fileName string +---@return ccs.timeline.ActionTimeline +function ActionTimelineCache:createActionWithFlatBuffersFile(fileName) end + +---@param fileName string +---@return ccs.timeline.ActionTimeline +function ActionTimelineCache:createActionWithFlatBuffersForSimulator(fileName) end + +---Destroys the singleton +function ActionTimelineCache.destroyInstance() end + +---Gets the singleton +---@return ccs.timeline.ActionTimelineCache +function ActionTimelineCache.getInstance() end + +function ActionTimelineCache:init() end + +---@param fileName string +---@param content string +---@return ccs.timeline.ActionTimeline +function ActionTimelineCache:loadAnimationActionWithContent(fileName, content) end + +---@param fileName string +---@return ccs.timeline.ActionTimeline +function ActionTimelineCache:loadAnimationActionWithFile(fileName) end + +---@param fileName string +---@return ccs.timeline.ActionTimeline +function ActionTimelineCache:loadAnimationActionWithFlatBuffersFile(fileName) end + +---@param data any +---@param fileName string +---@return ccs.timeline.ActionTimeline +function ActionTimelineCache:loadAnimationWithDataBuffer(data, fileName) end + +function ActionTimelineCache:purge() end + +---Remove action with filename, and also remove other resource relate with this file +---@param fileName string +function ActionTimelineCache:removeAction(fileName) end + +return ActionTimelineCache \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccs/timeline/ActionTimelineData.lua b/addons/cclua/cocos2d/library/ccs/timeline/ActionTimelineData.lua new file mode 100644 index 00000000..3c10244e --- /dev/null +++ b/addons/cclua/cocos2d/library/ccs/timeline/ActionTimelineData.lua @@ -0,0 +1,26 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccs.timeline.ActionTimelineData + +--- +---@class ccs.timeline.ActionTimelineData : cc.Ref +---@field actionTag integer +local ActionTimelineData = {} + +---@param actionTag integer +---@return ccs.timeline.ActionTimelineData +function ActionTimelineData.create(actionTag) end + +---@return integer +function ActionTimelineData:getActionTag() end + +---@param actionTag integer +---@return boolean +function ActionTimelineData:init(actionTag) end + +---@return ccs.timeline.ActionTimelineData +function ActionTimelineData.new() end + +---@param actionTag integer +function ActionTimelineData:setActionTag(actionTag) end + +return ActionTimelineData \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccs/timeline/ActionTimelineNode.lua b/addons/cclua/cocos2d/library/ccs/timeline/ActionTimelineNode.lua new file mode 100644 index 00000000..fccedf03 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccs/timeline/ActionTimelineNode.lua @@ -0,0 +1,34 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccs.timeline.ActionTimelineNode + +--- +---@class ccs.timeline.ActionTimelineNode : cc.Node +---@field actionTimeline ccs.timeline.ActionTimeline +---@field root cc.Node +local ActionTimelineNode = {} + +---@param root cc.Node +---@param action ccs.timeline.ActionTimeline +---@return ccs.timeline.ActionTimelineNode +function ActionTimelineNode.create(root, action) end + +---@return ccs.timeline.ActionTimeline +function ActionTimelineNode:getActionTimeline() end + +---@return cc.Node +function ActionTimelineNode:getRoot() end + +---@return boolean +---@overload fun(self: ccs.timeline.ActionTimelineNode, root: cc.Node, action: ccs.timeline.ActionTimeline): boolean +function ActionTimelineNode:init() end + +---@return ccs.timeline.ActionTimelineNode +function ActionTimelineNode.new() end + +---@param action ccs.timeline.ActionTimeline +function ActionTimelineNode:setActionTimeline(action) end + +---@param root cc.Node +function ActionTimelineNode:setRoot(root) end + +return ActionTimelineNode \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccs/timeline/AlphaFrame.lua b/addons/cclua/cocos2d/library/ccs/timeline/AlphaFrame.lua new file mode 100644 index 00000000..e7e2cab2 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccs/timeline/AlphaFrame.lua @@ -0,0 +1,21 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccs.timeline.AlphaFrame + +--- +---@class ccs.timeline.AlphaFrame : ccs.timeline.Frame +---@field alpha integer +local AlphaFrame = {} + +---@return ccs.timeline.AlphaFrame +function AlphaFrame.create() end + +---@return integer +function AlphaFrame:getAlpha() end + +---@return ccs.timeline.AlphaFrame +function AlphaFrame.new() end + +---@param alpha integer +function AlphaFrame:setAlpha(alpha) end + +return AlphaFrame \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccs/timeline/AnchorPointFrame.lua b/addons/cclua/cocos2d/library/ccs/timeline/AnchorPointFrame.lua new file mode 100644 index 00000000..e6016ba8 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccs/timeline/AnchorPointFrame.lua @@ -0,0 +1,21 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccs.timeline.AnchorPointFrame + +--- +---@class ccs.timeline.AnchorPointFrame : ccs.timeline.Frame +---@field anchorPoint cc.Vec2 +local AnchorPointFrame = {} + +---@return ccs.timeline.AnchorPointFrame +function AnchorPointFrame.create() end + +---@return cc.Vec2 +function AnchorPointFrame:getAnchorPoint() end + +---@return ccs.timeline.AnchorPointFrame +function AnchorPointFrame.new() end + +---@param point cc.Vec2 +function AnchorPointFrame:setAnchorPoint(point) end + +return AnchorPointFrame \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccs/timeline/AnimationInfo.lua b/addons/cclua/cocos2d/library/ccs/timeline/AnimationInfo.lua new file mode 100644 index 00000000..8e99014c --- /dev/null +++ b/addons/cclua/cocos2d/library/ccs/timeline/AnimationInfo.lua @@ -0,0 +1,22 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccs.timeline.AnimationInfo + +--- +---@class ccs.timeline.AnimationInfo +---@field clipEndCallBack fun() +---@field endIndex integer +---@field name string +---@field startIndex integer +local AnimationInfo = {} + +---@return any +function AnimationInfo:__gc() end + +---@return any +function AnimationInfo:__olua_move() end + +---@return ccs.timeline.AnimationInfo +---@overload fun(otherName: string, otherStartIndex: integer, otherEndIndex: integer): ccs.timeline.AnimationInfo +function AnimationInfo.new() end + +return AnimationInfo \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccs/timeline/BlendFuncFrame.lua b/addons/cclua/cocos2d/library/ccs/timeline/BlendFuncFrame.lua new file mode 100644 index 00000000..fa924d02 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccs/timeline/BlendFuncFrame.lua @@ -0,0 +1,21 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccs.timeline.BlendFuncFrame + +--- +---@class ccs.timeline.BlendFuncFrame : ccs.timeline.Frame +---@field blendFunc cc.BlendFunc +local BlendFuncFrame = {} + +---@return ccs.timeline.BlendFuncFrame +function BlendFuncFrame.create() end + +---@return cc.BlendFunc +function BlendFuncFrame:getBlendFunc() end + +---@return ccs.timeline.BlendFuncFrame +function BlendFuncFrame.new() end + +---@param blendFunc cc.BlendFunc +function BlendFuncFrame:setBlendFunc(blendFunc) end + +return BlendFuncFrame \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccs/timeline/BoneNode.lua b/addons/cclua/cocos2d/library/ccs/timeline/BoneNode.lua new file mode 100644 index 00000000..983d45e9 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccs/timeline/BoneNode.lua @@ -0,0 +1,111 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccs.timeline.BoneNode + +--- +---@class ccs.timeline.BoneNode : cc.Node +---@field allSubBones any : get all bones in this bone tree +---@field allSubSkins any : get all skins in this bone tree +---@field blendFunc cc.BlendFunc +---@field childBones any +---@field debugDrawColor any +---@field debugDrawEnabled boolean +---@field debugDrawLength number +---@field debugDrawWidth number +---@field rootSkeletonNode ccs.timeline.SkeletonNode +---@field skins any get skins in this bone's children +---@field visibleSkins any +---@field visibleSkinsRect cc.Rect get displayings rect in self transform +local BoneNode = {} + +---: add a skin +---\param: display, whether display this skin +---@param skin cc.Node +---@param display boolean +--- +---: add a skin +---\param: display, whether display this skin +---\param: hideOthers, whether hide other skins added to this bone +---@overload fun(self: ccs.timeline.BoneNode, skin: cc.Node, display: boolean, hideOthers: boolean) +function BoneNode:addSkin(skin, display) end + +---@param cls string +---@return any +function BoneNode:as(cls) end + +---@return ccs.timeline.BoneNode +---@overload fun(length: integer): ccs.timeline.BoneNode +function BoneNode.create() end + +---: display skin +---\param: hideOthers, set other skins invisible +---@param skin cc.Node +---@param hideOthers boolean +--- +---: display all skins named skinName, if hide display only one skin, +---prefer to use display(SkinNode* skin, bool hideOthers = false) +---\param: hideOthers, set other skins invisible +---@overload fun(self: ccs.timeline.BoneNode, skinName: string, hideOthers: boolean) +function BoneNode:displaySkin(skin, hideOthers) end + +---: get all bones in this bone tree +---@return any +function BoneNode:getAllSubBones() end + +---: get all skins in this bone tree +---@return any +function BoneNode:getAllSubSkins() end + +---@return cc.BlendFunc +function BoneNode:getBlendFunc() end + +---@return any +function BoneNode:getChildBones() end + +---@return any +function BoneNode:getDebugDrawColor() end + +---@return number +function BoneNode:getDebugDrawLength() end + +---@return number +function BoneNode:getDebugDrawWidth() end + +---@return ccs.timeline.SkeletonNode +function BoneNode:getRootSkeletonNode() end + +---get skins in this bone's children +---@return any +function BoneNode:getSkins() end + +---@return any +function BoneNode:getVisibleSkins() end + +---get displayings rect in self transform +---@return cc.Rect +function BoneNode:getVisibleSkinsRect() end + +---@return boolean +function BoneNode:isDebugDrawEnabled() end + +---@return ccs.timeline.BoneNode +function BoneNode.new() end + +---@param blendFunc cc.BlendFunc +function BoneNode:setBlendFunc(blendFunc) end + +---@param color any +function BoneNode:setDebugDrawColor(color) end + +---@param isDebugDraw boolean +function BoneNode:setDebugDrawEnabled(isDebugDraw) end + +---@param length number +function BoneNode:setDebugDrawLength(length) end + +---@param width number +function BoneNode:setDebugDrawWidth(width) end + +---@param localZOrder integer +function BoneNode:setLocalZOrder(localZOrder) end + +return BoneNode \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccs/timeline/ColorFrame.lua b/addons/cclua/cocos2d/library/ccs/timeline/ColorFrame.lua new file mode 100644 index 00000000..72222c31 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccs/timeline/ColorFrame.lua @@ -0,0 +1,21 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccs.timeline.ColorFrame + +--- +---@class ccs.timeline.ColorFrame : ccs.timeline.Frame +---@field color any +local ColorFrame = {} + +---@return ccs.timeline.ColorFrame +function ColorFrame.create() end + +---@return any +function ColorFrame:getColor() end + +---@return ccs.timeline.ColorFrame +function ColorFrame.new() end + +---@param color any +function ColorFrame:setColor(color) end + +return ColorFrame \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccs/timeline/EventFrame.lua b/addons/cclua/cocos2d/library/ccs/timeline/EventFrame.lua new file mode 100644 index 00000000..8becccdc --- /dev/null +++ b/addons/cclua/cocos2d/library/ccs/timeline/EventFrame.lua @@ -0,0 +1,23 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccs.timeline.EventFrame + +--- +---@class ccs.timeline.EventFrame : ccs.timeline.Frame +---@field event string +local EventFrame = {} + +---@return ccs.timeline.EventFrame +function EventFrame.create() end + +---@return string +function EventFrame:getEvent() end + +function EventFrame:init() end + +---@return ccs.timeline.EventFrame +function EventFrame.new() end + +---@param event string +function EventFrame:setEvent(event) end + +return EventFrame \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccs/timeline/Frame.lua b/addons/cclua/cocos2d/library/ccs/timeline/Frame.lua new file mode 100644 index 00000000..1f3e2e88 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccs/timeline/Frame.lua @@ -0,0 +1,64 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccs.timeline.Frame + +--- +---@class ccs.timeline.Frame : cc.Ref +---@field easingParams number[] +---@field enterWhenPassed boolean +---@field frameIndex integer +---@field node cc.Node +---@field timeline ccs.timeline.Timeline +---@field tween boolean +---@field tweenType cc.tweenfunc.TweenType +local Frame = {} + +---@param percent number +function Frame:apply(percent) end + +---@return ccs.timeline.Frame +function Frame:clone() end + +---@return number[] +function Frame:getEasingParams() end + +---@return integer +function Frame:getFrameIndex() end + +---@return cc.Node +function Frame:getNode() end + +---@return ccs.timeline.Timeline +function Frame:getTimeline() end + +---@return cc.tweenfunc.TweenType +function Frame:getTweenType() end + +---@return boolean +function Frame:isEnterWhenPassed() end + +---@return boolean +function Frame:isTween() end + +---@param nextFrame ccs.timeline.Frame +---@param currentFrameIndex integer +function Frame:onEnter(nextFrame, currentFrameIndex) end + +---@param easingParams number[] +function Frame:setEasingParams(easingParams) end + +---@param frameIndex integer +function Frame:setFrameIndex(frameIndex) end + +---@param node cc.Node +function Frame:setNode(node) end + +---@param timeline ccs.timeline.Timeline +function Frame:setTimeline(timeline) end + +---@param tween boolean +function Frame:setTween(tween) end + +---@param tweenType cc.tweenfunc.TweenType +function Frame:setTweenType(tweenType) end + +return Frame \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccs/timeline/InnerActionFrame.lua b/addons/cclua/cocos2d/library/ccs/timeline/InnerActionFrame.lua new file mode 100644 index 00000000..e0209e22 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccs/timeline/InnerActionFrame.lua @@ -0,0 +1,49 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccs.timeline.InnerActionFrame + +--- +---@class ccs.timeline.InnerActionFrame : ccs.timeline.Frame +---@field endFrameIndex integer +---@field innerActionType ccs.timeline.InnerActionType +---@field singleFrameIndex integer +---@field startFrameIndex integer +---@field AnimationAllName string +local InnerActionFrame = {} + +---@return ccs.timeline.InnerActionFrame +function InnerActionFrame.create() end + +---@return integer +function InnerActionFrame:getEndFrameIndex() end + +---@return ccs.timeline.InnerActionType +function InnerActionFrame:getInnerActionType() end + +---@return integer +function InnerActionFrame:getSingleFrameIndex() end + +---@return integer +function InnerActionFrame:getStartFrameIndex() end + +---@return ccs.timeline.InnerActionFrame +function InnerActionFrame.new() end + +---@param animationNamed string +function InnerActionFrame:setAnimationName(animationNamed) end + +---@param frameIndex integer +function InnerActionFrame:setEndFrameIndex(frameIndex) end + +---@param isEnterWithName boolean +function InnerActionFrame:setEnterWithName(isEnterWithName) end + +---@param type ccs.timeline.InnerActionType +function InnerActionFrame:setInnerActionType(type) end + +---@param frameIndex integer +function InnerActionFrame:setSingleFrameIndex(frameIndex) end + +---@param frameIndex integer +function InnerActionFrame:setStartFrameIndex(frameIndex) end + +return InnerActionFrame \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccs/timeline/InnerActionType.lua b/addons/cclua/cocos2d/library/ccs/timeline/InnerActionType.lua new file mode 100644 index 00000000..00bf8895 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccs/timeline/InnerActionType.lua @@ -0,0 +1,15 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccs.timeline.InnerActionType + +---@type ccs.timeline.InnerActionType +local VALUE + +--- +---@enum ccs.timeline.InnerActionType +local InnerActionType = { + LoopAction = 0, + NoLoopAction = 1, + SingleFrame = 2, +} + +return InnerActionType \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccs/timeline/PlayableFrame.lua b/addons/cclua/cocos2d/library/ccs/timeline/PlayableFrame.lua new file mode 100644 index 00000000..63076d5f --- /dev/null +++ b/addons/cclua/cocos2d/library/ccs/timeline/PlayableFrame.lua @@ -0,0 +1,22 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccs.timeline.PlayableFrame + +--- +---@class ccs.timeline.PlayableFrame : ccs.timeline.Frame +---@field playableAct string +---@field PLAYABLE_EXTENTION string +local PlayableFrame = {} + +---@return ccs.timeline.PlayableFrame +function PlayableFrame.create() end + +---@return string +function PlayableFrame:getPlayableAct() end + +---@return ccs.timeline.PlayableFrame +function PlayableFrame.new() end + +---@param playact string +function PlayableFrame:setPlayableAct(playact) end + +return PlayableFrame \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccs/timeline/PositionFrame.lua b/addons/cclua/cocos2d/library/ccs/timeline/PositionFrame.lua new file mode 100644 index 00000000..0fd25158 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccs/timeline/PositionFrame.lua @@ -0,0 +1,35 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccs.timeline.PositionFrame + +--- +---@class ccs.timeline.PositionFrame : ccs.timeline.Frame +---@field position cc.Vec2 +---@field x number +---@field y number +local PositionFrame = {} + +---@return ccs.timeline.PositionFrame +function PositionFrame.create() end + +---@return cc.Vec2 +function PositionFrame:getPosition() end + +---@return number +function PositionFrame:getX() end + +---@return number +function PositionFrame:getY() end + +---@return ccs.timeline.PositionFrame +function PositionFrame.new() end + +---@param position cc.Vec2 +function PositionFrame:setPosition(position) end + +---@param x number +function PositionFrame:setX(x) end + +---@param y number +function PositionFrame:setY(y) end + +return PositionFrame \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccs/timeline/RotationFrame.lua b/addons/cclua/cocos2d/library/ccs/timeline/RotationFrame.lua new file mode 100644 index 00000000..bcf48ff0 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccs/timeline/RotationFrame.lua @@ -0,0 +1,21 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccs.timeline.RotationFrame + +--- +---@class ccs.timeline.RotationFrame : ccs.timeline.Frame +---@field rotation number +local RotationFrame = {} + +---@return ccs.timeline.RotationFrame +function RotationFrame.create() end + +---@return number +function RotationFrame:getRotation() end + +---@return ccs.timeline.RotationFrame +function RotationFrame.new() end + +---@param rotation number +function RotationFrame:setRotation(rotation) end + +return RotationFrame \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccs/timeline/RotationSkewFrame.lua b/addons/cclua/cocos2d/library/ccs/timeline/RotationSkewFrame.lua new file mode 100644 index 00000000..1e5f13e7 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccs/timeline/RotationSkewFrame.lua @@ -0,0 +1,14 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccs.timeline.RotationSkewFrame + +--- +---@class ccs.timeline.RotationSkewFrame : ccs.timeline.SkewFrame +local RotationSkewFrame = {} + +---@return ccs.timeline.RotationSkewFrame +function RotationSkewFrame.create() end + +---@return ccs.timeline.RotationSkewFrame +function RotationSkewFrame.new() end + +return RotationSkewFrame \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccs/timeline/ScaleFrame.lua b/addons/cclua/cocos2d/library/ccs/timeline/ScaleFrame.lua new file mode 100644 index 00000000..80f4113b --- /dev/null +++ b/addons/cclua/cocos2d/library/ccs/timeline/ScaleFrame.lua @@ -0,0 +1,31 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccs.timeline.ScaleFrame + +--- +---@class ccs.timeline.ScaleFrame : ccs.timeline.Frame +---@field scaleX number +---@field scaleY number +local ScaleFrame = {} + +---@return ccs.timeline.ScaleFrame +function ScaleFrame.create() end + +---@return number +function ScaleFrame:getScaleX() end + +---@return number +function ScaleFrame:getScaleY() end + +---@return ccs.timeline.ScaleFrame +function ScaleFrame.new() end + +---@param scale number +function ScaleFrame:setScale(scale) end + +---@param scaleX number +function ScaleFrame:setScaleX(scaleX) end + +---@param scaleY number +function ScaleFrame:setScaleY(scaleY) end + +return ScaleFrame \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccs/timeline/SkeletonNode.lua b/addons/cclua/cocos2d/library/ccs/timeline/SkeletonNode.lua new file mode 100644 index 00000000..a40c014b --- /dev/null +++ b/addons/cclua/cocos2d/library/ccs/timeline/SkeletonNode.lua @@ -0,0 +1,40 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccs.timeline.SkeletonNode + +--- +---@class ccs.timeline.SkeletonNode : ccs.timeline.BoneNode +---@field allSubBonesMap any get All bones in this skeleton, +local SkeletonNode = {} + +---: add a boneSkinNameMap as a SkinGroup named groupName +---\param: groupName, key +---\param: boneSkinNameMap, map +---@param groupName string +---@param boneSkinNameMap { [string]: string } +function SkeletonNode:addSkinGroup(groupName, boneSkinNameMap) end + +---: change displays +---\param: boneSkinNameMap, map +---@param boneSkinNameMap { [string]: string } +--- +---: change displays +---\param: skinGroupName have +---@overload fun(self: ccs.timeline.SkeletonNode, skinGroupName: string) +function SkeletonNode:changeSkins(boneSkinNameMap) end + +---@return ccs.timeline.SkeletonNode +function SkeletonNode.create() end + +---get All bones in this skeleton, +---@return any +function SkeletonNode:getAllSubBonesMap() end + +---get bonenode in skeleton node by bone name +---@param boneName string +---@return ccs.timeline.BoneNode +function SkeletonNode:getBoneNode(boneName) end + +---@return ccs.timeline.SkeletonNode +function SkeletonNode.new() end + +return SkeletonNode \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccs/timeline/SkewFrame.lua b/addons/cclua/cocos2d/library/ccs/timeline/SkewFrame.lua new file mode 100644 index 00000000..a49ef12c --- /dev/null +++ b/addons/cclua/cocos2d/library/ccs/timeline/SkewFrame.lua @@ -0,0 +1,28 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccs.timeline.SkewFrame + +--- +---@class ccs.timeline.SkewFrame : ccs.timeline.Frame +---@field skewX number +---@field skewY number +local SkewFrame = {} + +---@return ccs.timeline.SkewFrame +function SkewFrame.create() end + +---@return number +function SkewFrame:getSkewX() end + +---@return number +function SkewFrame:getSkewY() end + +---@return ccs.timeline.SkewFrame +function SkewFrame.new() end + +---@param skewx number +function SkewFrame:setSkewX(skewx) end + +---@param skewy number +function SkewFrame:setSkewY(skewy) end + +return SkewFrame \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccs/timeline/TextureFrame.lua b/addons/cclua/cocos2d/library/ccs/timeline/TextureFrame.lua new file mode 100644 index 00000000..94bd2639 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccs/timeline/TextureFrame.lua @@ -0,0 +1,21 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccs.timeline.TextureFrame + +--- +---@class ccs.timeline.TextureFrame : ccs.timeline.Frame +---@field textureName string +local TextureFrame = {} + +---@return ccs.timeline.TextureFrame +function TextureFrame.create() end + +---@return string +function TextureFrame:getTextureName() end + +---@return ccs.timeline.TextureFrame +function TextureFrame.new() end + +---@param textureName string +function TextureFrame:setTextureName(textureName) end + +return TextureFrame \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccs/timeline/Timeline.lua b/addons/cclua/cocos2d/library/ccs/timeline/Timeline.lua new file mode 100644 index 00000000..7f9066d6 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccs/timeline/Timeline.lua @@ -0,0 +1,58 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccs.timeline.Timeline + +--- +---@class ccs.timeline.Timeline : cc.Ref +---@field actionTag integer +---@field actionTimeline ccs.timeline.ActionTimeline +---@field frames any +---@field node cc.Node +local Timeline = {} + +---@param frame ccs.timeline.Frame +function Timeline:addFrame(frame) end + +---@return ccs.timeline.Timeline +function Timeline:clone() end + +---@return ccs.timeline.Timeline +function Timeline.create() end + +---@return integer +function Timeline:getActionTag() end + +---@return ccs.timeline.ActionTimeline +function Timeline:getActionTimeline() end + +---@return any +function Timeline:getFrames() end + +---@return cc.Node +function Timeline:getNode() end + +---@param frameIndex integer +function Timeline:gotoFrame(frameIndex) end + +---@param frame ccs.timeline.Frame +---@param index integer +function Timeline:insertFrame(frame, index) end + +---@return ccs.timeline.Timeline +function Timeline.new() end + +---@param frame ccs.timeline.Frame +function Timeline:removeFrame(frame) end + +---@param tag integer +function Timeline:setActionTag(tag) end + +---@param action ccs.timeline.ActionTimeline +function Timeline:setActionTimeline(action) end + +---@param node cc.Node +function Timeline:setNode(node) end + +---@param frameIndex integer +function Timeline:stepToFrame(frameIndex) end + +return Timeline \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccs/timeline/VisibleFrame.lua b/addons/cclua/cocos2d/library/ccs/timeline/VisibleFrame.lua new file mode 100644 index 00000000..2478248a --- /dev/null +++ b/addons/cclua/cocos2d/library/ccs/timeline/VisibleFrame.lua @@ -0,0 +1,21 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccs.timeline.VisibleFrame + +--- +---@class ccs.timeline.VisibleFrame : ccs.timeline.Frame +---@field visible boolean +local VisibleFrame = {} + +---@return ccs.timeline.VisibleFrame +function VisibleFrame.create() end + +---@return boolean +function VisibleFrame:isVisible() end + +---@return ccs.timeline.VisibleFrame +function VisibleFrame.new() end + +---@param visible boolean +function VisibleFrame:setVisible(visible) end + +return VisibleFrame \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccs/timeline/ZOrderFrame.lua b/addons/cclua/cocos2d/library/ccs/timeline/ZOrderFrame.lua new file mode 100644 index 00000000..b5e3cb3a --- /dev/null +++ b/addons/cclua/cocos2d/library/ccs/timeline/ZOrderFrame.lua @@ -0,0 +1,21 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccs.timeline.ZOrderFrame + +--- +---@class ccs.timeline.ZOrderFrame : ccs.timeline.Frame +---@field zOrder integer +local ZOrderFrame = {} + +---@return ccs.timeline.ZOrderFrame +function ZOrderFrame.create() end + +---@return integer +function ZOrderFrame:getZOrder() end + +---@return ccs.timeline.ZOrderFrame +function ZOrderFrame.new() end + +---@param zorder integer +function ZOrderFrame:setZOrder(zorder) end + +return ZOrderFrame \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccui/AbstractCheckButton.lua b/addons/cclua/cocos2d/library/ccui/AbstractCheckButton.lua new file mode 100644 index 00000000..cd46629c --- /dev/null +++ b/addons/cclua/cocos2d/library/ccui/AbstractCheckButton.lua @@ -0,0 +1,127 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccui.AbstractCheckButton + +---AbstractCheckButton is a specific type of two-states button that can be either checked or unchecked. +---@class ccui.AbstractCheckButton : ccui.Widget +---@field backDisabledFile cc.ResourceData +---@field backNormalFile cc.ResourceData +---@field backPressedFile cc.ResourceData +---@field crossDisabledFile cc.ResourceData +---@field crossNormalFile cc.ResourceData +---@field rendererBackground cc.Sprite Return the sprite instance of background \return the sprite instance of background. +---@field rendererBackgroundDisabled cc.Sprite Return the sprite instance of background when disabled \return the sprite instance of background when disabled +---@field rendererBackgroundSelected cc.Sprite Return the sprite instance of background when selected \return the sprite instance of background when selected +---@field rendererFrontCross cc.Sprite Return the sprite instance of front cross \return the sprite instance of front cross +---@field rendererFrontCrossDisabled cc.Sprite Return the sprite instance of front cross when disabled \return the sprite instance of front cross when disabled +---@field selected boolean Query whether CheckBox is selected or not. \return true means "selected", false otherwise. +---@field zoomScale number Return a zoom scale \return A zoom scale of Checkbox. \since v3.3 +local AbstractCheckButton = {} + +---@return cc.ResourceData +function AbstractCheckButton:getBackDisabledFile() end + +---@return cc.ResourceData +function AbstractCheckButton:getBackNormalFile() end + +---@return cc.ResourceData +function AbstractCheckButton:getBackPressedFile() end + +---@return cc.ResourceData +function AbstractCheckButton:getCrossDisabledFile() end + +---@return cc.ResourceData +function AbstractCheckButton:getCrossNormalFile() end + +---Return the sprite instance of background +---@return cc.Sprite # the sprite instance of background. +function AbstractCheckButton:getRendererBackground() end + +---Return the sprite instance of background when disabled +---@return cc.Sprite # the sprite instance of background when disabled +function AbstractCheckButton:getRendererBackgroundDisabled() end + +---Return the sprite instance of background when selected +---@return cc.Sprite # the sprite instance of background when selected +function AbstractCheckButton:getRendererBackgroundSelected() end + +---Return the sprite instance of front cross +---@return cc.Sprite # the sprite instance of front cross +function AbstractCheckButton:getRendererFrontCross() end + +---Return the sprite instance of front cross when disabled +---@return cc.Sprite # the sprite instance of front cross when disabled +function AbstractCheckButton:getRendererFrontCrossDisabled() end + +---Return a zoom scale +---@return number # A zoom scale of Checkbox. +---\since v3.3 +function AbstractCheckButton:getZoomScale() end + +---@return boolean +---@overload fun(self: ccui.AbstractCheckButton, backGround: string, backGroundSelected: string, cross: string, backGroundDisabled: string, frontCrossDisabled: string, texType: ccui.Widget.TextureResType): boolean +---@overload fun(self: ccui.AbstractCheckButton, backGround: string, backGroundSelected: string, cross: string, backGroundDisabled: string, frontCrossDisabled: string): boolean +function AbstractCheckButton:init() end + +---Query whether CheckBox is selected or not. +---@return boolean # true means "selected", false otherwise. +function AbstractCheckButton:isSelected() end + +---Load background texture for check button. +--- +---@param backGround string # The background image name. +---@param type ccui.Widget.TextureResType # @see `Widget::TextureResType` +---@overload fun(self: ccui.AbstractCheckButton, backGround: string) +function AbstractCheckButton:loadTextureBackGround(backGround, type) end + +---Load background disabled state texture for checkbox. +--- +---@param backGroundDisabled string # The background disabled state texture name. +--- +---@param texType ccui.Widget.TextureResType # @see `Widget::TextureResType` +---@overload fun(self: ccui.AbstractCheckButton, backGroundDisabled: string) +function AbstractCheckButton:loadTextureBackGroundDisabled(backGroundDisabled, texType) end + +---Load background selected state texture for check button. +--- +---@param backGroundSelected string # The background selected state image name. +---@param texType ccui.Widget.TextureResType # @see `Widget::TextureResType` +---@overload fun(self: ccui.AbstractCheckButton, backGroundSelected: string) +function AbstractCheckButton:loadTextureBackGroundSelected(backGroundSelected, texType) end + +---Load cross texture for check button. +--- +---@param crossTextureName string # The cross texture name. +---@param texType ccui.Widget.TextureResType # @see `Widget::TextureResType` +---@overload fun(self: ccui.AbstractCheckButton, crossTextureName: string) +function AbstractCheckButton:loadTextureFrontCross(crossTextureName, texType) end + +---Load frontcross disabled texture for checkbox. +--- +---@param frontCrossDisabled string # The front cross disabled state texture name. +---@param texType ccui.Widget.TextureResType # @see `Widget::TextureResType` +---@overload fun(self: ccui.AbstractCheckButton, frontCrossDisabled: string) +function AbstractCheckButton:loadTextureFrontCrossDisabled(frontCrossDisabled, texType) end + +---Load all textures for initializing a check button. +--- +---@param background string # The background image name. +---@param backgroundSelected string # The background selected image name. +---@param cross string # The cross image name. +---@param backgroundDisabled string # The background disabled state texture. +---@param frontCrossDisabled string # The front cross disabled state image name. +---@param texType ccui.Widget.TextureResType # @see `Widget::TextureResType` +---@overload fun(self: ccui.AbstractCheckButton, background: string, backgroundSelected: string, cross: string, backgroundDisabled: string, frontCrossDisabled: string) +function AbstractCheckButton:loadTextures(background, backgroundSelected, cross, backgroundDisabled, frontCrossDisabled, texType) end + +---Change CheckBox state. +---Set to true will cause the CheckBox's state to "selected", false otherwise. +---@param selected boolean # Set to true will change CheckBox to selected state, false otherwise. +function AbstractCheckButton:setSelected(selected) end + +---When user pressed the CheckBox, the button will zoom to a scale. +---The final scale of the CheckBox equals (CheckBox original scale + _zoomScale) +---\since v3.3 +---@param scale number +function AbstractCheckButton:setZoomScale(scale) end + +return AbstractCheckButton \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccui/Button.lua b/addons/cclua/cocos2d/library/ccui/Button.lua new file mode 100644 index 00000000..f6cc9572 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccui/Button.lua @@ -0,0 +1,255 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccui.Button + +---Represents a push-button widget. +---Push-buttons can be pressed, or clicked, by the user to perform an action. +---@class ccui.Button : ccui.Widget +---@field capInsetsDisabledRenderer cc.Rect Return the capInsets of disabled state scale9sprite. \return The disabled scale9 renderer capInsets. +---@field capInsetsNormalRenderer cc.Rect Return the capInsets of normal state scale9sprite. \return The normal scale9 renderer capInsets. +---@field capInsetsPressedRenderer cc.Rect Return the capInsets of pressed state scale9sprite. \return The pressed scale9 renderer capInsets. +---@field disabledFile cc.ResourceData +---@field normalFile cc.ResourceData +---@field normalTextureSize cc.Size +---@field pressedFile cc.ResourceData +---@field rendererClicked ccui.Scale9Sprite Return the nine-patch sprite of clicked state \return the nine-patch sprite of clicked state \since v3.9 +---@field rendererDisabled ccui.Scale9Sprite Return the nine-patch sprite of disabled state \return the nine-patch sprite of disabled state \since v3.9 +---@field rendererNormal ccui.Scale9Sprite Return the nine-patch sprite of normal state \return the nine-patch sprite of normal state \since v3.9 +---@field scale9Enabled boolean Query whether button is using scale9 renderer or not. \return whether button use scale9 renderer or not. +---@field titleColor any Query the button title color. \return Color3B of button title. +---@field titleFontName string Query the font name of button's title \return font name in std::string +---@field titleFontSize number Query the font size of button title \return font size in float. +---@field titleLabel cc.Label returns the current Label being used +---@field titleRenderer cc.Label Return the inner title renderer of Button. \return The button title. \since v3.3 +---@field titleText string Query the button title content. \return Get the button's title content. +---@field zoomScale number Return a zoom scale \return the zoom scale in float \since v3.3 +local Button = {} + +---Create a empty Button. +---@return ccui.Button # A empty Button instance. +--- +---Create a button with custom textures. +---\param normalImage normal state texture name. +---\param selectedImage selected state texture name. +---\param disableImage disabled state texture name. +---\param texType @see `TextureResType` +---\return a Button instance. +---@overload fun(normalImage: string, selectedImage: string, disableImage: string, texType: ccui.Widget.TextureResType): ccui.Button +--- +---Create a button with custom textures. +---\param normalImage normal state texture name. +---\param selectedImage selected state texture name. +---\param disableImage disabled state texture name. +---\param texType @see `TextureResType` +---\return a Button instance. +---@overload fun(normalImage: string): ccui.Button +--- +---Create a button with custom textures. +---\param normalImage normal state texture name. +---\param selectedImage selected state texture name. +---\param disableImage disabled state texture name. +---\param texType @see `TextureResType` +---\return a Button instance. +---@overload fun(normalImage: string, selectedImage: string): ccui.Button +--- +---Create a button with custom textures. +---\param normalImage normal state texture name. +---\param selectedImage selected state texture name. +---\param disableImage disabled state texture name. +---\param texType @see `TextureResType` +---\return a Button instance. +---@overload fun(normalImage: string, selectedImage: string, disableImage: string): ccui.Button +function Button.create() end + +---@return cc.Ref +function Button.createInstance() end + +---Return the capInsets of disabled state scale9sprite. +---@return cc.Rect # The disabled scale9 renderer capInsets. +function Button:getCapInsetsDisabledRenderer() end + +---Return the capInsets of normal state scale9sprite. +---@return cc.Rect # The normal scale9 renderer capInsets. +function Button:getCapInsetsNormalRenderer() end + +---Return the capInsets of pressed state scale9sprite. +---@return cc.Rect # The pressed scale9 renderer capInsets. +function Button:getCapInsetsPressedRenderer() end + +---@return cc.ResourceData +function Button:getDisabledFile() end + +---@return cc.ResourceData +function Button:getNormalFile() end + +---@return cc.Size +function Button:getNormalTextureSize() end + +---@return cc.ResourceData +function Button:getPressedFile() end + +---Return the nine-patch sprite of clicked state +---@return ccui.Scale9Sprite # the nine-patch sprite of clicked state +---\since v3.9 +function Button:getRendererClicked() end + +---Return the nine-patch sprite of disabled state +---@return ccui.Scale9Sprite # the nine-patch sprite of disabled state +---\since v3.9 +function Button:getRendererDisabled() end + +---Return the nine-patch sprite of normal state +---@return ccui.Scale9Sprite # the nine-patch sprite of normal state +---\since v3.9 +function Button:getRendererNormal() end + +---Query the button title color. +---@return any # Color3B of button title. +function Button:getTitleColor() end + +---Query the font name of button's title +---@return string # font name in std::string +function Button:getTitleFontName() end + +---Query the font size of button title +---@return number # font size in float. +function Button:getTitleFontSize() end + +---returns the current Label being used +---@return cc.Label +function Button:getTitleLabel() end + +---Return the inner title renderer of Button. +---@return cc.Label # The button title. +---\since v3.3 +function Button:getTitleRenderer() end + +---Query the button title content. +---@return string # Get the button's title content. +function Button:getTitleText() end + +---Return a zoom scale +---@return number # the zoom scale in float +---\since v3.3 +function Button:getZoomScale() end + +---@return boolean +---@overload fun(self: ccui.Button, normalImage: string, selectedImage: string, disableImage: string, texType: ccui.Widget.TextureResType): boolean +---@overload fun(self: ccui.Button, normalImage: string): boolean +---@overload fun(self: ccui.Button, normalImage: string, selectedImage: string): boolean +---@overload fun(self: ccui.Button, normalImage: string, selectedImage: string, disableImage: string): boolean +function Button:init() end + +---Query whether button is using scale9 renderer or not. +---@return boolean # whether button use scale9 renderer or not. +function Button:isScale9Enabled() end + +---Load disabled state texture for button. +--- +---@param disabled string # dark state texture. +---@param texType ccui.Widget.TextureResType # @see `TextureResType` +---@overload fun(self: ccui.Button, disabled: string) +function Button:loadTextureDisabled(disabled, texType) end + +---Load normal state texture for button. +--- +---@param normal string # normal state texture. +---@param texType ccui.Widget.TextureResType # @see `TextureResType` +---@overload fun(self: ccui.Button, normal: string) +function Button:loadTextureNormal(normal, texType) end + +---Load selected state texture for button. +--- +---@param selected string # selected state texture. +---@param texType ccui.Widget.TextureResType # @see `TextureResType` +---@overload fun(self: ccui.Button, selected: string) +function Button:loadTexturePressed(selected, texType) end + +---Load textures for button. +--- +---@param normal string # normal state texture name. +---@param selected string # selected state texture name. +---@param disabled string # disabled state texture name. +---@param texType ccui.Widget.TextureResType # @see `TextureResType` +---@overload fun(self: ccui.Button, normal: string, selected: string) +---@overload fun(self: ccui.Button, normal: string, selected: string, disabled: string) +function Button:loadTextures(normal, selected, disabled, texType) end + +---Default constructor. +---@return ccui.Button +function Button.new() end + +function Button:resetDisabledRender() end + +function Button:resetNormalRender() end + +function Button:resetPressedRender() end + +---Sets capInsets for button. +---The capInset affects all button scale9 renderer only if `setScale9Enabled(true)` is called +--- +---@param capInsets cc.Rect # capInset in Rect. +function Button:setCapInsets(capInsets) end + +---Sets capInsets for button, only the disabled state scale9 renderer will be affected. +--- +---@param capInsets cc.Rect # capInsets in Rect. +function Button:setCapInsetsDisabledRenderer(capInsets) end + +---Sets capInsets for button, only the normal state scale9 renderer will be affected. +--- +---@param capInsets cc.Rect # capInsets in Rect. +function Button:setCapInsetsNormalRenderer(capInsets) end + +---Sets capInsets for button, only the pressed state scale9 renderer will be affected. +--- +---@param capInsets cc.Rect # capInsets in Rect +function Button:setCapInsetsPressedRenderer(capInsets) end + +---Enable zooming action when button is pressed. +--- +---@param enabled boolean # Set to true will enable zoom effect, false otherwise. +function Button:setPressedActionEnabled(enabled) end + +---Enable scale9 renderer. +--- +---@param enable boolean # Set to true will use scale9 renderer, false otherwise. +function Button:setScale9Enabled(enable) end + +---Sets the title's text horizontal alignment. +--- +---@param hAlignment cc.TextHAlignment # see TextHAlignment +--- +---Sets the title's text vertical alignment. +--- +---\param hAlignment see TextHAlignment. +---\param vAlignment see TextVAlignment. +---@overload fun(self: ccui.Button, hAlignment: cc.TextHAlignment, vAlignment: cc.TextVAlignment) +function Button:setTitleAlignment(hAlignment) end + +---Change the color of button's title. +---@param color any # The title color in Color3B. +function Button:setTitleColor(color) end + +---Change the font name of button's title +---@param fontName string # a font name string. +function Button:setTitleFontName(fontName) end + +---Change the font size of button's title +---@param size number # Title font size in float. +function Button:setTitleFontSize(size) end + +---replaces the current Label node with a new one +---@param label cc.Label +function Button:setTitleLabel(label) end + +---Change the content of button's title. +---@param text string # The title in std::string. +function Button:setTitleText(text) end + +---When user pressed the button, the button will zoom to a scale. +---The final scale of the button equals (button original scale + _zoomScale) +---\since v3.3 +---@param scale number +function Button:setZoomScale(scale) end + +return Button \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccui/CheckBox.lua b/addons/cclua/cocos2d/library/ccui/CheckBox.lua new file mode 100644 index 00000000..82348e63 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccui/CheckBox.lua @@ -0,0 +1,65 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccui.CheckBox + +---Checkbox is a specific type of two-states button that can be either checked or unchecked. +---@class ccui.CheckBox : ccui.AbstractCheckButton +local CheckBox = {} + +---Add a callback function which would be called when checkbox is selected or unselected. +---@param callback ccui.CheckBox.ccCheckBoxCallback # A std::function with type @see `ccCheckBoxCallback` +function CheckBox:addEventListener(callback) end + +---Create and return a empty CheckBox instance pointer. +---@return ccui.CheckBox +--- +---Create an checkbox with various images. +--- +---\param backGround backGround texture. +---\param backGroundSelected backGround selected state texture. +---\param cross cross texture. +---\param backGroundDisabled backGround disabled state texture. +---\param frontCrossDisabled cross dark state texture. +---\param texType @see `Widget::TextureResType` +--- +---\return A CheckBox instance pointer. +---@overload fun(backGround: string, backGroundSelected: string, cross: string, backGroundDisabled: string, frontCrossDisabled: string, texType: ccui.Widget.TextureResType): ccui.CheckBox +--- +---Create an checkbox with various images. +--- +---\param backGround backGround texture. +---\param backGroundSelected backGround selected state texture. +---\param cross cross texture. +---\param backGroundDisabled backGround disabled state texture. +---\param frontCrossDisabled cross dark state texture. +---\param texType @see `Widget::TextureResType` +--- +---\return A CheckBox instance pointer. +---@overload fun(backGround: string, backGroundSelected: string, cross: string, backGroundDisabled: string, frontCrossDisabled: string): ccui.CheckBox +--- +---Another factory method to create a CheckBox instance. +---This method uses less resource to create a CheckBox. +---\param backGround The background image name in `std::string`. +---\param cross The cross image name in `std::string`. +---\param texType The texture's resource type in `Widget::TextureResType`. +---\return A CheckBox instance pointer +---@overload fun(backGround: string, cross: string, texType: ccui.Widget.TextureResType): ccui.CheckBox +--- +---Another factory method to create a CheckBox instance. +---This method uses less resource to create a CheckBox. +---\param backGround The background image name in `std::string`. +---\param cross The cross image name in `std::string`. +---\param texType The texture's resource type in `Widget::TextureResType`. +---\return A CheckBox instance pointer +---@overload fun(backGround: string, cross: string): ccui.CheckBox +function CheckBox.create() end + +---@return cc.Ref +function CheckBox.createInstance() end + +---Default constructor. +--- +---\lua new +---@return ccui.CheckBox +function CheckBox.new() end + +return CheckBox \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccui/CheckBox/EventType.lua b/addons/cclua/cocos2d/library/ccui/CheckBox/EventType.lua new file mode 100644 index 00000000..dcc25433 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccui/CheckBox/EventType.lua @@ -0,0 +1,14 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccui.CheckBox.EventType + +---@type ccui.CheckBox.EventType +local VALUE + +--- +---@enum ccui.CheckBox.EventType +local EventType = { + SELECTED = 0, + UNSELECTED = 1, +} + +return EventType \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccui/CheckBox/ccCheckBoxCallback.lua b/addons/cclua/cocos2d/library/ccui/CheckBox/ccCheckBoxCallback.lua new file mode 100644 index 00000000..e0e8d8cd --- /dev/null +++ b/addons/cclua/cocos2d/library/ccui/CheckBox/ccCheckBoxCallback.lua @@ -0,0 +1,14 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccui.CheckBox.ccCheckBoxCallback + +--- +--- +---std::function +---@class ccui.CheckBox.ccCheckBoxCallback +local ccCheckBoxCallback = {} + +---@return ccui.CheckBox.ccCheckBoxCallback + +function ccCheckBoxCallback:__call() end + +return ccCheckBoxCallback \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccui/EditBox.lua b/addons/cclua/cocos2d/library/ccui/EditBox.lua new file mode 100644 index 00000000..8e75167c --- /dev/null +++ b/addons/cclua/cocos2d/library/ccui/EditBox.lua @@ -0,0 +1,295 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccui.EditBox + +---Class for edit box. +--- +---You can use this widget to gather small amounts of text from the user. +---@class ccui.EditBox : ccui.Widget +---@field capInsetsDisabledRenderer cc.Rect Return the capInsets of disabled state scale9sprite. \return The disabled scale9 renderer capInsets. +---@field capInsetsNormalRenderer cc.Rect Return the capInsets of normal state scale9sprite. \return The normal scale9 renderer capInsets. +---@field capInsetsPressedRenderer cc.Rect Return the capInsets of pressed state scale9sprite. \return The pressed scale9 renderer capInsets. +---@field delegate ccui.EditBoxDelegate \js NA \lua NA +---@field fontColor any Get the font color of the widget's text. +---@field fontName string Get the font name. \return The font name. +---@field fontSize integer Get the font size. \return The font size. +---@field inputFlag ccui.EditBox.InputFlag Get the input flags that are to be applied to the edit box. \return One of the EditBox::InputFlag constants. +---@field inputMode ccui.EditBox.InputMode Get the input mode of the edit box. \return One of the EditBox::InputMode constants. +---@field maxLength integer Gets the maximum input length of the edit box.

\return Maximum input length. +---@field placeHolder string Get a text in the edit box that acts as a placeholder when an edit box is empty. +---@field placeholderFontColor any Get the font color of the placeholder text when the edit box is empty. +---@field placeholderFontName string Get the placeholder's font name. only system font is allowed. \return The font name. +---@field placeholderFontSize integer Get the placeholder's font size. \return The font size. +---@field returnType ccui.EditBox.KeyboardReturnType Get the return type that are to be applied to the edit box. \return One of the EditBox::KeyboardReturnType constants. +---@field text string Get the text entered in the edit box. \return The text entered in the edit box. +---@field textHorizontalAlignment cc.TextHAlignment Get the text horizontal alignment. +local EditBox = {} + +---@param cls string +---@return any +function EditBox:as(cls) end + +---Default destructor. +---\js NA +---\lua NA +---@return boolean +function EditBox:attachWithIME() end + +---create a edit box with size. +---@return ccui.EditBox # An autorelease pointer of EditBox, you don't need to release it only if you retain it again. +---@param size cc.Size +---@param normalSprite ccui.Scale9Sprite +---@param pressedSprite ccui.Scale9Sprite +---@param disabledSprite ccui.Scale9Sprite +---@overload fun(size: cc.Size, normalSprite: ccui.Scale9Sprite): ccui.EditBox +---@overload fun(size: cc.Size, normalSprite: ccui.Scale9Sprite, pressedSprite: ccui.Scale9Sprite): ccui.EditBox +---@overload fun(size: cc.Size, normalImage: string, texType: ccui.Widget.TextureResType): ccui.EditBox +---@overload fun(size: cc.Size, normalImage: string, pressedImage: string, disabledImage: string, texType: ccui.Widget.TextureResType): ccui.EditBox +---@overload fun(size: cc.Size, normalImage: string): ccui.EditBox +---@overload fun(size: cc.Size, normalImage: string, pressedImage: string): ccui.EditBox +---@overload fun(size: cc.Size, normalImage: string, pressedImage: string, disabledImage: string): ccui.EditBox +function EditBox.create(size, normalSprite, pressedSprite, disabledSprite) end + +---Determine whether the IME is detached or not. +---\js NA +---\lua NA +---@return boolean +function EditBox:detachWithIME() end + +---Return the capInsets of disabled state scale9sprite. +---@return cc.Rect # The disabled scale9 renderer capInsets. +function EditBox:getCapInsetsDisabledRenderer() end + +---Return the capInsets of normal state scale9sprite. +---@return cc.Rect # The normal scale9 renderer capInsets. +function EditBox:getCapInsetsNormalRenderer() end + +---Return the capInsets of pressed state scale9sprite. +---@return cc.Rect # The pressed scale9 renderer capInsets. +function EditBox:getCapInsetsPressedRenderer() end + +---\js NA +---\lua NA +---@return ccui.EditBoxDelegate +function EditBox:getDelegate() end + +---Get the font color of the widget's text. +---@return any +function EditBox:getFontColor() end + +---Get the font name. +---@return string # The font name. +function EditBox:getFontName() end + +---Get the font size. +---@return integer # The font size. +function EditBox:getFontSize() end + +---Get the input flags that are to be applied to the edit box. +---@return ccui.EditBox.InputFlag # One of the EditBox::InputFlag constants. +function EditBox:getInputFlag() end + +---Get the input mode of the edit box. +---@return ccui.EditBox.InputMode # One of the EditBox::InputMode constants. +function EditBox:getInputMode() end + +---Gets the maximum input length of the edit box. +--- +---@return integer # Maximum input length. +function EditBox:getMaxLength() end + +---Get a text in the edit box that acts as a placeholder when an +---edit box is empty. +---@return string +function EditBox:getPlaceHolder() end + +---Get the font color of the placeholder text when the edit box is empty. +---@return any +function EditBox:getPlaceholderFontColor() end + +---Get the placeholder's font name. only system font is allowed. +---@return string # The font name. +function EditBox:getPlaceholderFontName() end + +---Get the placeholder's font size. +---@return integer # The font size. +function EditBox:getPlaceholderFontSize() end + +---Get the return type that are to be applied to the edit box. +---@return ccui.EditBox.KeyboardReturnType # One of the EditBox::KeyboardReturnType constants. +function EditBox:getReturnType() end + +---Get the text entered in the edit box. +---@return string # The text entered in the edit box. +function EditBox:getText() end + +---Get the text horizontal alignment. +---@return cc.TextHAlignment +function EditBox:getTextHorizontalAlignment() end + +---Init edit box with specified size. This method should be invoked right after constructor. +---@param size cc.Size # The size of edit box. +---@param normal9SpriteBg string # background image of edit box. +---@param texType ccui.Widget.TextureResType # the resource type, the default value is TextureResType::LOCAL +---@return boolean # Whether initialization is successfully or not. +---@overload fun(self: ccui.EditBox, size: cc.Size, normal9SpriteBg: string): boolean +--- +---Init edit box with specified size. This method should be invoked right after constructor. +---\param size The size of edit box. +---\param normal9SpriteBg background image of edit box. +---\return Whether initialization is successfully or not. +---@overload fun(self: ccui.EditBox, size: cc.Size, normal9SpriteBg: ccui.Scale9Sprite): boolean +--- +---Init edit box with specified size. This method should be invoked right after constructor. +---\param size The size of edit box. +---\param normalSprite normal state image of edit box. +---\param pressedSprite pressed state image of edit box. +---\param disabledSprite disabled state image of edit box. +---\return Whether initialization is successfully or not. +---@overload fun(self: ccui.EditBox, size: cc.Size, normalSprite: ccui.Scale9Sprite, pressedSprite: ccui.Scale9Sprite, disabledSprite: ccui.Scale9Sprite): boolean +function EditBox:initWithSizeAndBackgroundSprite(size, normal9SpriteBg, texType) end + +---Init edit box with specified size. This method should be invoked right after constructor. +---@param size cc.Size # The size of edit box. +---@param normalImage string # normal state texture name. +---@param pressedImage string # pressed state texture name. +---@param disabledImage string # disabled state texture name. +---@return boolean # Whether initialization is successfully or not. +---@param texType ccui.Widget.TextureResType +---@overload fun(self: ccui.EditBox, size: cc.Size, normalImage: string): boolean +---@overload fun(self: ccui.EditBox, size: cc.Size, normalImage: string, pressedImage: string): boolean +---@overload fun(self: ccui.EditBox, size: cc.Size, normalImage: string, pressedImage: string, disabledImage: string): boolean +function EditBox:initWithSizeAndTexture(size, normalImage, pressedImage, disabledImage, texType) end + +---Load disabled state texture for edit box. +--- +---@param disabled string # dark state texture. +---@param texType ccui.Widget.TextureResType # @see `TextureResType` +---@overload fun(self: ccui.EditBox, disabled: string) +function EditBox:loadTextureDisabled(disabled, texType) end + +---Load normal state texture for edit box. +--- +---@param normal string # normal state texture. +---@param texType ccui.Widget.TextureResType # @see `TextureResType` +---@overload fun(self: ccui.EditBox, normal: string) +function EditBox:loadTextureNormal(normal, texType) end + +---Load pressed state texture for edit box. +--- +---@param pressed string # pressed state texture. +---@param texType ccui.Widget.TextureResType # @see `TextureResType` +---@overload fun(self: ccui.EditBox, pressed: string) +function EditBox:loadTexturePressed(pressed, texType) end + +---Load textures for edit box. +--- +---@param normal string # normal state texture name. +---@param pressed string # pressed state texture name. +---@param disabled string # disabled state texture name. +---@param texType ccui.Widget.TextureResType # @see `TextureResType` +---@overload fun(self: ccui.EditBox, normal: string, pressed: string) +---@overload fun(self: ccui.EditBox, normal: string, pressed: string, disabled: string) +function EditBox:loadTextures(normal, pressed, disabled, texType) end + +---Constructor. +---\js ctor +---\lua new +---@return ccui.EditBox +function EditBox.new() end + +function EditBox:openKeyboard() end + +---Sets capInsets for edit box. +--- +---@param capInsets cc.Rect # capInset in Rect. +function EditBox:setCapInsets(capInsets) end + +---Sets capInsets for edit box, only the disabled state scale9 renderer will be affected. +--- +---@param capInsets cc.Rect # capInsets in Rect. +function EditBox:setCapInsetsDisabledRenderer(capInsets) end + +---Sets capInsets for edit box, only the normal state scale9 renderer will be affected. +--- +---@param capInsets cc.Rect # capInsets in Rect. +function EditBox:setCapInsetsNormalRenderer(capInsets) end + +---Sets capInsets for edit box, only the pressed state scale9 renderer will be affected. +--- +---@param capInsets cc.Rect # capInsets in Rect +function EditBox:setCapInsetsPressedRenderer(capInsets) end + +---Gets/Sets the delegate for edit box. +---\lua NA +---@param delegate ccui.EditBoxDelegate +function EditBox:setDelegate(delegate) end + +---Set the font. Only system font is allowed. +---@param pFontName string # The font name. +---@param fontSize integer # The font size. +function EditBox:setFont(pFontName, fontSize) end + +---Set the font color of the widget's text. +---@param color any +---@overload fun(self: ccui.EditBox, color: any) +function EditBox:setFontColor(color) end + +---Set the font name. Only system font is allowed. +---@param pFontName string # The font name. +function EditBox:setFontName(pFontName) end + +---Set the font size. +---@param fontSize integer # The font size. +function EditBox:setFontSize(fontSize) end + +---Set the input flags that are to be applied to the edit box. +---@param inputFlag ccui.EditBox.InputFlag # One of the EditBox::InputFlag constants. +function EditBox:setInputFlag(inputFlag) end + +---Set the input mode of the edit box. +---@param inputMode ccui.EditBox.InputMode # One of the EditBox::InputMode constants. +function EditBox:setInputMode(inputMode) end + +---Sets the maximum input length of the edit box. +---Setting this value enables multiline input mode by default. +---Available on Android, iOS and Windows Phone. +--- +---@param maxLength integer # The maximum length. +function EditBox:setMaxLength(maxLength) end + +---Set a text in the edit box that acts as a placeholder when an +---edit box is empty. +---@param pText string # The given text. +function EditBox:setPlaceHolder(pText) end + +---Set the placeholder's font. Only system font is allowed. +---@param pFontName string # The font name. +---@param fontSize integer # The font size. +function EditBox:setPlaceholderFont(pFontName, fontSize) end + +---Set the font color of the placeholder text when the edit box is empty. +---@param color any +---@overload fun(self: ccui.EditBox, color: any) +function EditBox:setPlaceholderFontColor(color) end + +---Set the placeholder's font name. only system font is allowed. +---@param pFontName string # The font name. +function EditBox:setPlaceholderFontName(pFontName) end + +---Set the placeholder's font size. +---@param fontSize integer # The font size. +function EditBox:setPlaceholderFontSize(fontSize) end + +---Set the return type that are to be applied to the edit box. +---@param returnType ccui.EditBox.KeyboardReturnType # One of the EditBox::KeyboardReturnType constants. +function EditBox:setReturnType(returnType) end + +---Set the text entered in the edit box. +---@param pText string # The given text. +function EditBox:setText(pText) end + +---Set the text horizontal alignment. +---@param alignment cc.TextHAlignment +function EditBox:setTextHorizontalAlignment(alignment) end + +return EditBox \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccui/EditBox/InputFlag.lua b/addons/cclua/cocos2d/library/ccui/EditBox/InputFlag.lua new file mode 100644 index 00000000..037ab974 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccui/EditBox/InputFlag.lua @@ -0,0 +1,30 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccui.EditBox.InputFlag + +---@type ccui.EditBox.InputFlag +local VALUE + +--- +---@enum ccui.EditBox.InputFlag +local InputFlag = { + ---Capitalize all characters automatically. + INITIAL_CAPS_ALL_CHARACTERS = 4, + ---This flag is a hint to the implementation that during text editing, + ---the initial letter of each sentence should be capitalized. + INITIAL_CAPS_SENTENCE = 3, + ---This flag is a hint to the implementation that during text editing, + ---the initial letter of each word should be capitalized. + INITIAL_CAPS_WORD = 2, + ---Lowercase all characters automatically. + LOWERCASE_ALL_CHARACTERS = 5, + ---Indicates that the text entered is confidential data that should be + ---obscured whenever possible. This implies EDIT_BOX_INPUT_FLAG_SENSITIVE. + PASSWORD = 0, + ---Indicates that the text entered is sensitive data that the + ---implementation must never store into a dictionary or table for use + ---in predictive, auto-completing, or other accelerated input schemes. + ---A credit card number is an example of sensitive data. + SENSITIVE = 1, +} + +return InputFlag \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccui/EditBox/InputMode.lua b/addons/cclua/cocos2d/library/ccui/EditBox/InputMode.lua new file mode 100644 index 00000000..ea4eab49 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccui/EditBox/InputMode.lua @@ -0,0 +1,27 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccui.EditBox.InputMode + +---@type ccui.EditBox.InputMode +local VALUE + +--- +---@enum ccui.EditBox.InputMode +local InputMode = { + ---The user is allowed to enter any text, including line breaks. + ANY = 0, + ---The user is allowed to enter a real number value. + ---This extends kEditBoxInputModeNumeric by allowing a decimal point. + DECIMAL = 5, + ---The user is allowed to enter an e-mail address. + EMAIL_ADDRESS = 1, + ---The user is allowed to enter an integer value. + NUMERIC = 2, + ---The user is allowed to enter a phone number. + PHONE_NUMBER = 3, + ---The user is allowed to enter any text, except for line breaks. + SINGLE_LINE = 6, + ---The user is allowed to enter a URL. + URL = 4, +} + +return InputMode \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccui/EditBox/KeyboardReturnType.lua b/addons/cclua/cocos2d/library/ccui/EditBox/KeyboardReturnType.lua new file mode 100644 index 00000000..b72a7e4b --- /dev/null +++ b/addons/cclua/cocos2d/library/ccui/EditBox/KeyboardReturnType.lua @@ -0,0 +1,18 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccui.EditBox.KeyboardReturnType + +---@type ccui.EditBox.KeyboardReturnType +local VALUE + +--- +---@enum ccui.EditBox.KeyboardReturnType +local KeyboardReturnType = { + DEFAULT = 0, + DONE = 1, + GO = 4, + NEXT = 5, + SEARCH = 3, + SEND = 2, +} + +return KeyboardReturnType \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccui/EditBoxDelegate.lua b/addons/cclua/cocos2d/library/ccui/EditBoxDelegate.lua new file mode 100644 index 00000000..a5b6482b --- /dev/null +++ b/addons/cclua/cocos2d/library/ccui/EditBoxDelegate.lua @@ -0,0 +1,41 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccui.EditBoxDelegate + +---Editbox delegate class. +---It's useful when you want to do some customization during Editbox input event +--- +---\js NA +---\lua NA +---@class ccui.EditBoxDelegate +local EditBoxDelegate = {} + +---@return any +function EditBoxDelegate:__gc() end + +---@return any +function EditBoxDelegate:__olua_move() end + +---This method is called when an edit box gains focus after keyboard is shown. +---\param editBox The edit box object that generated the event. +---@param arg1 ccui.EditBox +function EditBoxDelegate:editBoxEditingDidBegin(arg1) end + +---This method is called when an edit box loses focus after keyboard is hidden. +---\param editBox The edit box object that generated the event. +---\param type The reason why editing ended. +---@param arg1 ccui.EditBox +---@param arg2 ccui.EditBoxDelegate.EditBoxEndAction +function EditBoxDelegate:editBoxEditingDidEndWithAction(arg1, arg2) end + +---This method is called when the return button was pressed or the outside area of keyboard was touched. +---@param editBox ccui.EditBox # The edit box object that generated the event. +function EditBoxDelegate:editBoxReturn(editBox) end + +---This method is called when the edit box text was changed. +---\param editBox The edit box object that generated the event. +---\param text The new text. +---@param arg1 ccui.EditBox +---@param arg2 string +function EditBoxDelegate:editBoxTextChanged(arg1, arg2) end + +return EditBoxDelegate \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccui/EditBoxDelegate/EditBoxEndAction.lua b/addons/cclua/cocos2d/library/ccui/EditBoxDelegate/EditBoxEndAction.lua new file mode 100644 index 00000000..79749655 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccui/EditBoxDelegate/EditBoxEndAction.lua @@ -0,0 +1,16 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccui.EditBoxDelegate.EditBoxEndAction + +---@type ccui.EditBoxDelegate.EditBoxEndAction +local VALUE + +--- +---@enum ccui.EditBoxDelegate.EditBoxEndAction +local EditBoxEndAction = { + RETURN = 3, + TAB_TO_NEXT = 1, + TAB_TO_PREVIOUS = 2, + UNKNOWN = 0, +} + +return EditBoxEndAction \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccui/HBox.lua b/addons/cclua/cocos2d/library/ccui/HBox.lua new file mode 100644 index 00000000..f92237ae --- /dev/null +++ b/addons/cclua/cocos2d/library/ccui/HBox.lua @@ -0,0 +1,28 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccui.HBox + +---HBox is just a convenient wrapper class for horizontal layout type. +---HBox lays out its children in a single horizontal row. +---@class ccui.HBox : ccui.Layout +local HBox = {} + +---Create a empty HBox instance. +---@return ccui.HBox # A HBox instance pointer. +--- +---Create a HBox with a certain size. +---\param size The content size of the layout. +---\return A HBox instance pointer. +---@overload fun(size: cc.Size): ccui.HBox +function HBox.create() end + +---@param size cc.Size +---@return boolean +function HBox:initWithSize(size) end + +---Default constructor +---\js ctor +---\lua new +---@return ccui.HBox +function HBox.new() end + +return HBox \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccui/Helper.lua b/addons/cclua/cocos2d/library/ccui/Helper.lua new file mode 100644 index 00000000..0f833fb1 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccui/Helper.lua @@ -0,0 +1,70 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccui.Helper + +---Helper class for traversing children in widget tree. +---It also provides some helper functions for layout. +---@class ccui.Helper +local Helper = {} + +---@return any +function Helper:__gc() end + +---@return any +function Helper:__olua_move() end + +---Change the active property of Layout's @see `LayoutComponent` +---@param active boolean # A boolean value. +function Helper.changeLayoutSystemActiveState(active) end + +---Convert a node's boundingBox rect into screen coordinates. +--- +---@param node cc.Node # Any node pointer. +--- +---@return cc.Rect # A Rect in screen coordinates. +function Helper.convertBoundingBoxToScreen(node) end + +---Refresh object and it's children layout state +--- +---@param rootNode cc.Node # A Node* or Node* descendant instance pointer. +function Helper.doLayout(rootNode) end + +---Get a UTF8 substring from a std::string with a given start position and length +---Sample: std::string str = "中国中国中国"; substr = getSubStringOfUTF8String(str,0,2) will = "中国" +--- +---@param str string # The source string. +---@param start any # The start position of the substring. +---@param length any # The length of the substring in UTF8 count +---@return string # a UTF8 substring +---\js NA +function Helper.getSubStringOfUTF8String(str, start, length) end + +---restrict capInsetSize, when the capInsets's width is larger than the textureSize, it will restrict to 0, +---the height goes the same way as width. +---@param capInsets cc.Rect # A user defined capInsets. +---@param textureSize cc.Size # The size of a scale9enabled texture +---@return cc.Rect # a restricted capInset. +function Helper.restrictCapInsetRect(capInsets, textureSize) end + +---Find a widget with a specific action tag from root widget +---This search will be recursive through all child widgets. +---@param root ccui.Widget # The be searched root widget. +---@param tag integer # The widget action's tag. +---@return ccui.Widget # Widget instance pointer. +function Helper.seekActionWidgetByActionTag(root, tag) end + +---Find a widget with a specific name from root widget. +---This search will be recursive through all child widgets. +--- +---@param root ccui.Widget # The be searched root widget. +---@param name string # The widget name. +---@return ccui.Widget # Widget instance pointer. +function Helper.seekWidgetByName(root, name) end + +---Find a widget with a specific tag from root widget. +---This search will be recursive through all child widgets. +---@param root ccui.Widget # The be searched root widget. +---@param tag integer # The widget tag. +---@return ccui.Widget # Widget instance pointer. +function Helper.seekWidgetByTag(root, tag) end + +return Helper \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccui/ImageView.lua b/addons/cclua/cocos2d/library/ccui/ImageView.lua new file mode 100644 index 00000000..244ed0c4 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccui/ImageView.lua @@ -0,0 +1,97 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccui.ImageView + +---A widget to display images. +---@class ccui.ImageView : ccui.Widget +---@field blendFunc cc.BlendFunc Returns the blending function that is currently being used.

\return A BlendFunc structure with source and destination factor which specified pixel arithmetic. \js NA \lua NA +---@field capInsets cc.Rect Get ImageView's capInsets size. \return Query capInsets size in Rect \see `setCapInsets(const Rect&)` +---@field renderFile cc.ResourceData +---@field scale9Enabled boolean Query whether button is using scale9 renderer or not. \return whether button use scale9 renderer or not. +local ImageView = {} + +---@param cls string +---@return any +function ImageView:as(cls) end + +---Create a empty ImageView. +---@return ccui.ImageView +--- +---Create a imageview with a image name. +--- +---\param imageFileName file name of texture. +---\param texType @see `Widget::TextureResType` +---\return A ImageView instance. +---@overload fun(imageFileName: string, texType: ccui.Widget.TextureResType): ccui.ImageView +--- +---Create a imageview with a image name. +--- +---\param imageFileName file name of texture. +---\param texType @see `Widget::TextureResType` +---\return A ImageView instance. +---@overload fun(imageFileName: string): ccui.ImageView +function ImageView.create() end + +---@return cc.Ref +function ImageView.createInstance() end + +---Returns the blending function that is currently being used. +--- +---@return cc.BlendFunc # A BlendFunc structure with source and destination factor which specified pixel arithmetic. +---\js NA +---\lua NA +function ImageView:getBlendFunc() end + +---Get ImageView's capInsets size. +---@return cc.Rect # Query capInsets size in Rect +---\see `setCapInsets(const Rect&)` +function ImageView:getCapInsets() end + +---@return cc.ResourceData +function ImageView:getRenderFile() end + +---@return boolean +---@overload fun(self: ccui.ImageView, imageFileName: string, texType: ccui.Widget.TextureResType): boolean +---@overload fun(self: ccui.ImageView, imageFileName: string): boolean +function ImageView:init() end + +---Query whether button is using scale9 renderer or not. +---@return boolean # whether button use scale9 renderer or not. +function ImageView:isScale9Enabled() end + +---Load texture for imageview. +--- +---@param fileName string # file name of texture. +---@param texType ccui.Widget.TextureResType # @see `Widget::TextureResType` +---@overload fun(self: ccui.ImageView, fileName: string) +function ImageView:loadTexture(fileName, texType) end + +---Default constructor +---\js ctor +---\lua new +---@return ccui.ImageView +function ImageView.new() end + +---Sets the source blending function. +--- +---@param blendFunc cc.BlendFunc # A structure with source and destination factor to specify pixel arithmetic. e.g. {BlendFactor::ONE, BlendFactor::ONE}, {BlendFactor::SRC_ALPHA, BlendFactor::ONE_MINUS_SRC_ALPHA}. +---\js NA +---\lua NA +function ImageView:setBlendFunc(blendFunc) end + +---Sets capInsets for imageview. +---The capInsets affects the ImageView's renderer only if `setScale9Enabled(true)` is called. +--- +---@param capInsets cc.Rect # capinsets for imageview +function ImageView:setCapInsets(capInsets) end + +---Enable scale9 renderer. +--- +---@param enabled boolean # Set to true will use scale9 renderer, false otherwise. +function ImageView:setScale9Enabled(enabled) end + +---Updates the texture rect of the ImageView in points. +---It will call setTextureRect:rotated:untrimmedSize with rotated = NO, and utrimmedSize = rect.size. +---@param rect cc.Rect +function ImageView:setTextureRect(rect) end + +return ImageView \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccui/Layout.lua b/addons/cclua/cocos2d/library/ccui/Layout.lua new file mode 100644 index 00000000..3c73aaac --- /dev/null +++ b/addons/cclua/cocos2d/library/ccui/Layout.lua @@ -0,0 +1,205 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccui.Layout + +---A container for holding a few child widgets. +--- +---The child widgets could be rearranged according to the layout type and it also enables clipping, set background image and color. +--- +---There are mainly four types of layout: +---- Absolute layout: This the default layout type, child elements are arranged by their absolute position. +---- Horizontal layout: child elements are arranged horizontally. +---- Vertical layout: child elements are arranged vertically. +---- Relative layout: child elements are arranged relative to certain rules. +---@class ccui.Layout : ccui.Widget +---@field backGroundColor any Query the layout's background color. \return Background color in Color3B. +---@field backGroundColorOpacity integer Get the layout's background color opacity. \return Background color opacity value. +---@field backGroundColorType ccui.Layout.BackGroundColorType Query the layout's background color type. \return The layout's background color type. +---@field backGroundColorVector cc.Vec2 Get the layout's background color vector. \return Background color vector. +---@field backGroundEndColor any Get the gradient background end color. \return Gradient background end color value. +---@field backGroundImageCapInsets cc.Rect Query background image's capInsets size. \return The background image capInsets. +---@field backGroundImageColor any Get color of layout's background image. \return Layout's background image color. +---@field backGroundImageOpacity integer Get the opacity of layout's background image. \return The opacity of layout's background image. +---@field backGroundImageScale9Enabled boolean Query background image scale9 enable status. \return Whether background image is scale9 enabled or not. +---@field backGroundImageTextureSize cc.Size Gets background image texture size.

\return background image texture size. +---@field backGroundStartColor any Get the gradient background start color. \return Gradient background start color value. +---@field clippingEnabled boolean Gets if layout is clipping enabled.

\return if layout is clipping enabled. +---@field clippingType ccui.Layout.ClippingType \see `setClippingType(ClippingType)` +---@field layoutType ccui.Layout.Type Query layout type. \return Get the layout type. +---@field loopFocus boolean \return If focus loop is enabled, then it will return true, otherwise it returns false. The default value is false. +---@field passFocusToChild boolean \return To query whether the layout will pass the focus to its children or not. The default value is true +---@field renderFile cc.ResourceData +---@field onPassFocusToChild fun(arg1: ccui.Widget.FocusDirection, arg2: ccui.Widget): integer +local Layout = {} + +---@param cls string +---@return any +function Layout:as(cls) end + +---Create a empty layout. +---@return ccui.Layout +function Layout.create() end + +---@return cc.Ref +function Layout.createInstance() end + +---force refresh widget layout +function Layout:forceDoLayout() end + +---Query the layout's background color. +---@return any # Background color in Color3B. +function Layout:getBackGroundColor() end + +---Get the layout's background color opacity. +---@return integer # Background color opacity value. +function Layout:getBackGroundColorOpacity() end + +---Query the layout's background color type. +---@return ccui.Layout.BackGroundColorType # The layout's background color type. +function Layout:getBackGroundColorType() end + +---Get the layout's background color vector. +---@return cc.Vec2 # Background color vector. +function Layout:getBackGroundColorVector() end + +---Get the gradient background end color. +---@return any # Gradient background end color value. +function Layout:getBackGroundEndColor() end + +---Query background image's capInsets size. +---@return cc.Rect # The background image capInsets. +function Layout:getBackGroundImageCapInsets() end + +---Get color of layout's background image. +---@return any # Layout's background image color. +function Layout:getBackGroundImageColor() end + +---Get the opacity of layout's background image. +---@return integer # The opacity of layout's background image. +function Layout:getBackGroundImageOpacity() end + +---Gets background image texture size. +--- +---@return cc.Size # background image texture size. +function Layout:getBackGroundImageTextureSize() end + +---Get the gradient background start color. +---@return any # Gradient background start color value. +function Layout:getBackGroundStartColor() end + +---\see `setClippingType(ClippingType)` +---@return ccui.Layout.ClippingType +function Layout:getClippingType() end + +---Query layout type. +---@return ccui.Layout.Type # Get the layout type. +function Layout:getLayoutType() end + +---@return cc.ResourceData +function Layout:getRenderFile() end + +---Query background image scale9 enable status. +---@return boolean # Whether background image is scale9 enabled or not. +function Layout:isBackGroundImageScale9Enabled() end + +---Gets if layout is clipping enabled. +--- +---@return boolean # if layout is clipping enabled. +function Layout:isClippingEnabled() end + +---@return boolean # If focus loop is enabled, then it will return true, otherwise it returns false. The default value is false. +function Layout:isLoopFocus() end + +---@return boolean # To query whether the layout will pass the focus to its children or not. The default value is true +function Layout:isPassFocusToChild() end + +---Default constructor +---\js ctor +---\lua new +---@return ccui.Layout +function Layout.new() end + +---Remove the background image of layout. +function Layout:removeBackGroundImage() end + +---request to refresh widget layout +function Layout:requestDoLayout() end + +---Set background color for layout +---The color only applies to layout when it's color type is BackGroundColorType::SOLIDE +--- +---@param color any # Color in Color3B. +--- +---Set start and end background color for layout. +---This setting only take effect when the layout's color type is BackGroundColorType::GRADIENT +--- +---\param startColor Color value in Color3B. +---\param endColor Color value in Color3B. +---@overload fun(self: ccui.Layout, startColor: any, endColor: any) +function Layout:setBackGroundColor(color) end + +---Sets background color opacity of layout. +--- +---@param opacity integer # The opacity in `GLubyte`. +function Layout:setBackGroundColorOpacity(opacity) end + +---Sets Color Type for layout's background +--- +---@param type ccui.Layout.BackGroundColorType # @see `BackGroundColorType` +function Layout:setBackGroundColorType(type) end + +---Sets background color vector for layout. +---This setting only take effect when layout's color type is BackGroundColorType::GRADIENT +--- +---@param vector cc.Vec2 # The color vector in `Vec2`. +function Layout:setBackGroundColorVector(vector) end + +---Sets a background image for layout. +--- +---@param fileName string # image file path. +---@param texType ccui.Widget.TextureResType # @see TextureResType. +---@overload fun(self: ccui.Layout, fileName: string) +function Layout:setBackGroundImage(fileName, texType) end + +---Sets a background image capinsets for layout, it only affects the scale9 enabled background image +--- +---@param capInsets cc.Rect # The capInsets in Rect. +function Layout:setBackGroundImageCapInsets(capInsets) end + +---Set layout's background image color. +---@param color any # Background color value in `Color3B`. +function Layout:setBackGroundImageColor(color) end + +---Set opacity of background image. +---@param opacity integer # Background image opacity in GLubyte. +function Layout:setBackGroundImageOpacity(opacity) end + +---Enable background image scale9 rendering. +--- +---@param enabled boolean # True means enable scale9 rendering for background image, false otherwise. +function Layout:setBackGroundImageScale9Enabled(enabled) end + +---Toggle layout clipping. +--- +---If you do need clipping, you pass true to this function. +--- +---@param enabled boolean # Pass true to enable clipping, false otherwise. +function Layout:setClippingEnabled(enabled) end + +---Change the clipping type of layout. +---On default, the clipping type is `ClippingType::STENCIL`. +---\see `ClippingType` +---@param type ccui.Layout.ClippingType # The clipping type of layout. +function Layout:setClippingType(type) end + +---Change the layout type. +---@param type ccui.Layout.Type # Layout type. +function Layout:setLayoutType(type) end + +---If a layout is loop focused which means that the focus movement will be inside the layout +---@param loop boolean # pass true to let the focus movement loop inside the layout +function Layout:setLoopFocus(loop) end + +---@param pass boolean # To specify whether the layout pass its focus to its child +function Layout:setPassFocusToChild(pass) end + +return Layout \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccui/Layout/BackGroundColorType.lua b/addons/cclua/cocos2d/library/ccui/Layout/BackGroundColorType.lua new file mode 100644 index 00000000..78f6a764 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccui/Layout/BackGroundColorType.lua @@ -0,0 +1,15 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccui.Layout.BackGroundColorType + +---@type ccui.Layout.BackGroundColorType +local VALUE + +--- +---@enum ccui.Layout.BackGroundColorType +local BackGroundColorType = { + GRADIENT = 2, + NONE = 0, + SOLID = 1, +} + +return BackGroundColorType \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccui/Layout/ClippingType.lua b/addons/cclua/cocos2d/library/ccui/Layout/ClippingType.lua new file mode 100644 index 00000000..7700d33f --- /dev/null +++ b/addons/cclua/cocos2d/library/ccui/Layout/ClippingType.lua @@ -0,0 +1,14 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccui.Layout.ClippingType + +---@type ccui.Layout.ClippingType +local VALUE + +--- +---@enum ccui.Layout.ClippingType +local ClippingType = { + SCISSOR = 1, + STENCIL = 0, +} + +return ClippingType \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccui/Layout/Type.lua b/addons/cclua/cocos2d/library/ccui/Layout/Type.lua new file mode 100644 index 00000000..4ad64fe3 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccui/Layout/Type.lua @@ -0,0 +1,16 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccui.Layout.Type + +---@type ccui.Layout.Type +local VALUE + +--- +---@enum ccui.Layout.Type +local Type = { + ABSOLUTE = 0, + HORIZONTAL = 2, + RELATIVE = 3, + VERTICAL = 1, +} + +return Type \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccui/LayoutComponent.lua b/addons/cclua/cocos2d/library/ccui/LayoutComponent.lua new file mode 100644 index 00000000..6a5276b5 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccui/LayoutComponent.lua @@ -0,0 +1,248 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccui.LayoutComponent + +---A component class used for layout. +---The LayoutComponent holds all the data for layouting. +---@class ccui.LayoutComponent : cc.Component +---@field anchorPosition cc.Vec2 Query the anchor position. \return Anchor position to it's parent +---@field bottomMargin number Query the bottom margin of owner relative to its parent. \return Bottom margin in float. +---@field horizontalEdge ccui.LayoutComponent.HorizontalEdge Query element horizontal dock type. \return Horizontal dock type. +---@field leftMargin number Query left margin of owner relative to its parent. \return Left margin in float. +---@field percentContentSize cc.Vec2 Query the percent content size value. \return Percent (x,y) in Vec2. +---@field percentHeight number Query percent height of owner. \return Percent height in float. +---@field percentHeightEnabled boolean Query whether percent height is enabled or not. \return True if percent height is enabled, false otherwise. +---@field percentWidth number Query percent width of owner. \return percent width in float. +---@field percentWidthEnabled boolean Query whether percent width is enabled or not. \return True if percent width is enabled, false, otherwise. +---@field position cc.Vec2 Query the owner's position. \return The owner's position. +---@field positionPercentX number Query the position percent X value. \return Position percent X value in float. +---@field positionPercentXEnabled boolean Whether position percentX is enabled or not. \return True if position percentX is enable, false otherwise. +---@field positionPercentY number Query the position percentY Y value. \return Position percent Y value in float. +---@field positionPercentYEnabled boolean Whether position percentY is enabled or not. \see `setPositionPercentYEnabled` \return True if position percentY is enabled, false otherwise. +---@field rightMargin number Query the right margin of owner relative to its parent. \return Right margin in float. +---@field size cc.Size Query owner's content size. \return Owner's content size. +---@field sizeHeight number Query size height of owner. \return Size height in float. +---@field sizeWidth number Query content size width of owner. \return Content size width in float. +---@field stretchHeightEnabled boolean Query whether stretch height is enabled or not. \return True if stretch height is enabled, false otherwise. +---@field stretchWidthEnabled boolean Query whether stretch width is enabled or not. \return True if stretch width is enabled, false otherwise. +---@field topMargin number Query the top margin of owner relative to its parent. \return Top margin in float. +---@field usingPercentContentSize boolean Query whether use percent content size or not. \return True if using percent content size, false otherwise. +---@field verticalEdge ccui.LayoutComponent.VerticalEdge Query element vertical dock type. \return Vertical dock type. +local LayoutComponent = {} + +---Bind a LayoutComponent to a specified node. +---If the node has already binded a LayoutComponent named __LAYOUT_COMPONENT_NAME, just return the LayoutComponent. +---Otherwise, create a new LayoutComponent and bind the LayoutComponent to the node. +---@param node cc.Node # A Node* instance pointer. +---@return ccui.LayoutComponent # The binded LayoutComponent instance pointer. +function LayoutComponent.bindLayoutComponent(node) end + +---Create a LayoutComponent instance with default settings. +---@return ccui.LayoutComponent +function LayoutComponent.create() end + +---Query the anchor position. +---@return cc.Vec2 # Anchor position to it's parent +function LayoutComponent:getAnchorPosition() end + +---Query the bottom margin of owner relative to its parent. +---@return number # Bottom margin in float. +function LayoutComponent:getBottomMargin() end + +---Query element horizontal dock type. +---@return ccui.LayoutComponent.HorizontalEdge # Horizontal dock type. +function LayoutComponent:getHorizontalEdge() end + +---Query left margin of owner relative to its parent. +---@return number # Left margin in float. +function LayoutComponent:getLeftMargin() end + +---Query the percent content size value. +---@return cc.Vec2 # Percent (x,y) in Vec2. +function LayoutComponent:getPercentContentSize() end + +---Query percent height of owner. +---@return number # Percent height in float. +function LayoutComponent:getPercentHeight() end + +---Query percent width of owner. +---@return number # percent width in float. +function LayoutComponent:getPercentWidth() end + +---Query the owner's position. +---@return cc.Vec2 # The owner's position. +function LayoutComponent:getPosition() end + +---Query the position percent X value. +---@return number # Position percent X value in float. +function LayoutComponent:getPositionPercentX() end + +---Query the position percentY Y value. +---@return number # Position percent Y value in float. +function LayoutComponent:getPositionPercentY() end + +---Query the right margin of owner relative to its parent. +---@return number # Right margin in float. +function LayoutComponent:getRightMargin() end + +---Query owner's content size. +---@return cc.Size # Owner's content size. +function LayoutComponent:getSize() end + +---Query size height of owner. +---@return number # Size height in float. +function LayoutComponent:getSizeHeight() end + +---Query content size width of owner. +---@return number # Content size width in float. +function LayoutComponent:getSizeWidth() end + +---Query the top margin of owner relative to its parent. +---@return number # Top margin in float. +function LayoutComponent:getTopMargin() end + +---Query whether use percent content size or not. +---@return boolean # True if using percent content size, false otherwise. +function LayoutComponent:getUsingPercentContentSize() end + +---Query element vertical dock type. +---@return ccui.LayoutComponent.VerticalEdge # Vertical dock type. +function LayoutComponent:getVerticalEdge() end + +---Query whether percent height is enabled or not. +---@return boolean # True if percent height is enabled, false otherwise. +function LayoutComponent:isPercentHeightEnabled() end + +---Query whether percent width is enabled or not. +---@return boolean # True if percent width is enabled, false, otherwise. +function LayoutComponent:isPercentWidthEnabled() end + +---Whether position percentX is enabled or not. +---@return boolean # True if position percentX is enable, false otherwise. +function LayoutComponent:isPositionPercentXEnabled() end + +---Whether position percentY is enabled or not. +---\see `setPositionPercentYEnabled` +---@return boolean # True if position percentY is enabled, false otherwise. +function LayoutComponent:isPositionPercentYEnabled() end + +---Query whether stretch height is enabled or not. +---@return boolean # True if stretch height is enabled, false otherwise. +function LayoutComponent:isStretchHeightEnabled() end + +---Query whether stretch width is enabled or not. +---@return boolean # True if stretch width is enabled, false otherwise. +function LayoutComponent:isStretchWidthEnabled() end + +---Default constructor +--- +---\lua new +---@return ccui.LayoutComponent +function LayoutComponent.new() end + +---Refresh layout of the owner. +function LayoutComponent:refreshLayout() end + +---Toggle active enabled of LayoutComponent's owner. +---@param enable boolean # True if active layout component, false otherwise. +function LayoutComponent:setActiveEnabled(enable) end + +---Change the anchor position to it's parent. +---@param point cc.Vec2 # A value in (x,y) format. +function LayoutComponent:setAnchorPosition(point) end + +---Change the bottom margin of owner relative to its parent. +---@param margin number # in float. +function LayoutComponent:setBottomMargin(margin) end + +---Change element's horizontal dock type. +---@param hEage ccui.LayoutComponent.HorizontalEdge # Horizontal dock type @see `HorizontalEdge` +function LayoutComponent:setHorizontalEdge(hEage) end + +---Change left margin of owner relative to its parent. +---@param margin number # Margin in float. +function LayoutComponent:setLeftMargin(margin) end + +---Set percent content size. +---The value should be [0-1], 0 means the child's content size will be 0 +---and 1 means the child's content size is the same as its parents. +---@param percent cc.Vec2 # The percent (x,y) of the node in [0-1] scope. +function LayoutComponent:setPercentContentSize(percent) end + +---Change percent height value of owner. +---@param percentHeight number # Percent height in float. +function LayoutComponent:setPercentHeight(percentHeight) end + +---Toggle enable percent height. +---@param isUsed boolean # True if percent height is enabled, false otherwise. +function LayoutComponent:setPercentHeightEnabled(isUsed) end + +---Toggle enable percent only. +---@param enable boolean # True if percent only is enabled, false otherwise. +function LayoutComponent:setPercentOnlyEnabled(enable) end + +---Change percent width of owner. +---@param percentWidth number # Percent Width in float. +function LayoutComponent:setPercentWidth(percentWidth) end + +---Toggle enable percent width. +---@param isUsed boolean # True if percent width is enabled, false otherwise. +function LayoutComponent:setPercentWidthEnabled(isUsed) end + +---Change the position of component owner. +---@param position cc.Vec2 # A position in (x,y) +function LayoutComponent:setPosition(position) end + +---Change position percent X value. +---@param percentMargin number # Margin in float. +function LayoutComponent:setPositionPercentX(percentMargin) end + +---Toggle position percentX enabled. +---@param isUsed boolean # True if enable position percentX, false otherwise. +function LayoutComponent:setPositionPercentXEnabled(isUsed) end + +---Change position percentY value. +---@param percentMargin number # Margin in float. +function LayoutComponent:setPositionPercentY(percentMargin) end + +---Toggle position percentY enabled. +---@param isUsed boolean # True if position percentY is enabled, false otherwise. +function LayoutComponent:setPositionPercentYEnabled(isUsed) end + +---Change right margin of owner relative to its parent. +---@param margin number # Margin in float. +function LayoutComponent:setRightMargin(margin) end + +---Change the content size of owner. +---@param size cc.Size # Content size in @see `Size`. +function LayoutComponent:setSize(size) end + +---Change size height of owner. +---@param height number # Size height in float. +function LayoutComponent:setSizeHeight(height) end + +---Change content size width of owner. +---@param width number # Content size width in float. +function LayoutComponent:setSizeWidth(width) end + +---Toggle enable stretch height. +---@param isUsed boolean # True if stretch height is enabled, false otherwise. +function LayoutComponent:setStretchHeightEnabled(isUsed) end + +---Toggle enable stretch width. +---@param isUsed boolean # True if enable stretch width, false otherwise. +function LayoutComponent:setStretchWidthEnabled(isUsed) end + +---Change the top margin of owner relative to its parent. +---@param margin number # Margin in float. +function LayoutComponent:setTopMargin(margin) end + +---Percent content size is used to adapt node's content size based on parent's content size. +---If set to true then node's content size will be changed based on the value set by @see setPercentContentSize +---@param isUsed boolean # True to enable percent content size, false otherwise. +function LayoutComponent:setUsingPercentContentSize(isUsed) end + +---Change element's vertical dock type. +---@param vEage ccui.LayoutComponent.VerticalEdge # Vertical dock type @see `VerticalEdge`. +function LayoutComponent:setVerticalEdge(vEage) end + +return LayoutComponent \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccui/LayoutComponent/HorizontalEdge.lua b/addons/cclua/cocos2d/library/ccui/LayoutComponent/HorizontalEdge.lua new file mode 100644 index 00000000..10a034a0 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccui/LayoutComponent/HorizontalEdge.lua @@ -0,0 +1,16 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccui.LayoutComponent.HorizontalEdge + +---@type ccui.LayoutComponent.HorizontalEdge +local VALUE + +--- +---@enum ccui.LayoutComponent.HorizontalEdge +local HorizontalEdge = { + Center = 3, + Left = 1, + None = 0, + Right = 2, +} + +return HorizontalEdge \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccui/LayoutComponent/VerticalEdge.lua b/addons/cclua/cocos2d/library/ccui/LayoutComponent/VerticalEdge.lua new file mode 100644 index 00000000..96ae54c7 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccui/LayoutComponent/VerticalEdge.lua @@ -0,0 +1,16 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccui.LayoutComponent.VerticalEdge + +---@type ccui.LayoutComponent.VerticalEdge +local VALUE + +--- +---@enum ccui.LayoutComponent.VerticalEdge +local VerticalEdge = { + Bottom = 1, + Center = 3, + None = 0, + Top = 2, +} + +return VerticalEdge \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccui/LayoutManager.lua b/addons/cclua/cocos2d/library/ccui/LayoutManager.lua new file mode 100644 index 00000000..7c2dec1c --- /dev/null +++ b/addons/cclua/cocos2d/library/ccui/LayoutManager.lua @@ -0,0 +1,13 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccui.LayoutManager + +---Base class for managing layout. +---All the concrete layout manager should inherit from this class. +---@class ccui.LayoutManager : cc.Ref +local LayoutManager = {} + +---The interface does the actual layouting work. +---@param layout ccui.LayoutProtocol +function LayoutManager:doLayout(layout) end + +return LayoutManager \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccui/LayoutParameter.lua b/addons/cclua/cocos2d/library/ccui/LayoutParameter.lua new file mode 100644 index 00000000..7f966407 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccui/LayoutParameter.lua @@ -0,0 +1,50 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccui.LayoutParameter + +---Base class for various LayoutParameter. +---@class ccui.LayoutParameter : cc.Ref +---@field layoutType ccui.LayoutParameter.Type Gets LayoutParameterType of LayoutParameter.

\see LayoutParameterType. \return LayoutParameterType +---@field margin cc.ui.Margin Gets margin parameter of LayoutParameter.

\see Margin \return Margin of layout parameter. +local LayoutParameter = {} + +---Create a copy of original LayoutParameter. +---@return ccui.LayoutParameter # A LayoutParameter pointer. +function LayoutParameter:clone() end + +---Copy all the member field from argument LayoutParameter to self. +---@param model ccui.LayoutParameter # A LayoutParameter instance. +function LayoutParameter:copyProperties(model) end + +---Create a empty LayoutParameter. +---@return ccui.LayoutParameter # A autorelease LayoutParameter instance. +function LayoutParameter.create() end + +---Create a cloned instance of LayoutParameter. +---@return ccui.LayoutParameter # A LayoutParameter pointer. +function LayoutParameter:createCloneInstance() end + +---Gets LayoutParameterType of LayoutParameter. +--- +---\see LayoutParameterType. +---@return ccui.LayoutParameter.Type # LayoutParameterType +function LayoutParameter:getLayoutType() end + +---Gets margin parameter of LayoutParameter. +--- +---\see Margin +---@return cc.ui.Margin # Margin of layout parameter. +function LayoutParameter:getMargin() end + +---Default constructor. +--- +---\lua new +---@return ccui.LayoutParameter +function LayoutParameter.new() end + +---Set margin parameter for LayoutParameter. +--- +---\see Margin +---@param margin cc.ui.Margin # +function LayoutParameter:setMargin(margin) end + +return LayoutParameter \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccui/LayoutParameter/Type.lua b/addons/cclua/cocos2d/library/ccui/LayoutParameter/Type.lua new file mode 100644 index 00000000..6752ea2b --- /dev/null +++ b/addons/cclua/cocos2d/library/ccui/LayoutParameter/Type.lua @@ -0,0 +1,15 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccui.LayoutParameter.Type + +---@type ccui.LayoutParameter.Type +local VALUE + +--- +---@enum ccui.LayoutParameter.Type +local Type = { + LINEAR = 1, + NONE = 0, + RELATIVE = 2, +} + +return Type \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccui/LayoutParameterProtocol.lua b/addons/cclua/cocos2d/library/ccui/LayoutParameterProtocol.lua new file mode 100644 index 00000000..6e71a6bc --- /dev/null +++ b/addons/cclua/cocos2d/library/ccui/LayoutParameterProtocol.lua @@ -0,0 +1,19 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccui.LayoutParameterProtocol + +---Protocol for getting a LayoutParameter. +---Every element want to have layout parameter should inherit from this class. +---@class ccui.LayoutParameterProtocol +---@field layoutParameter ccui.LayoutParameter \return A LayoutParameter and its descendant pointer. +local LayoutParameterProtocol = {} + +---@return any +function LayoutParameterProtocol:__gc() end + +---@return any +function LayoutParameterProtocol:__olua_move() end + +---@return ccui.LayoutParameter # A LayoutParameter and its descendant pointer. +function LayoutParameterProtocol:getLayoutParameter() end + +return LayoutParameterProtocol \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccui/LayoutProtocol.lua b/addons/cclua/cocos2d/library/ccui/LayoutProtocol.lua new file mode 100644 index 00000000..f42bee19 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccui/LayoutProtocol.lua @@ -0,0 +1,36 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccui.LayoutProtocol + +---Layout interface for creating LayoutManger and do actual layout. +---\js NA +---@class ccui.LayoutProtocol +---@field layoutContentSize cc.Size Return the content size of layout.

\return A content size in Size. +---@field layoutElements any Get all elements of the layout.

\return A vector of Node pointers. +local LayoutProtocol = {} + +---@return any +function LayoutProtocol:__gc() end + +---@return any +function LayoutProtocol:__olua_move() end + +---Create a custom layout manager. +--- +---@return ccui.LayoutManager # A LayoutManager descendants instance. +function LayoutProtocol:createLayoutManager() end + +---The main function to do the layout job. +---Different layout manager should implement its own layout algorithm. +function LayoutProtocol:doLayout() end + +---Return the content size of layout. +--- +---@return cc.Size # A content size in Size. +function LayoutProtocol:getLayoutContentSize() end + +---Get all elements of the layout. +--- +---@return any # A vector of Node pointers. +function LayoutProtocol:getLayoutElements() end + +return LayoutProtocol \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccui/LinearLayoutParameter.lua b/addons/cclua/cocos2d/library/ccui/LinearLayoutParameter.lua new file mode 100644 index 00000000..45738cd3 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccui/LinearLayoutParameter.lua @@ -0,0 +1,32 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccui.LinearLayoutParameter + +---Linear layout parameter. +---It is used by linear layout manager for arranging elements linearly. +---@class ccui.LinearLayoutParameter : ccui.LayoutParameter +---@field gravity ccui.LinearLayoutParameter.LinearGravity Gets LinearGravity parameter for LayoutParameter.

\see LinearGravity \return LinearGravity +local LinearLayoutParameter = {} + +---Create a empty LinearLayoutParameter instance. +---@return ccui.LinearLayoutParameter # A initialized LayoutParameter which is marked as "autorelease". +function LinearLayoutParameter.create() end + +---Gets LinearGravity parameter for LayoutParameter. +--- +---\see LinearGravity +---@return ccui.LinearLayoutParameter.LinearGravity # LinearGravity +function LinearLayoutParameter:getGravity() end + +---Default constructor. +--- +---\lua new +---@return ccui.LinearLayoutParameter +function LinearLayoutParameter.new() end + +---Sets LinearGravity parameter for LayoutParameter. +--- +---\see LinearGravity +---@param gravity ccui.LinearLayoutParameter.LinearGravity # Gravity in LinearGravity. +function LinearLayoutParameter:setGravity(gravity) end + +return LinearLayoutParameter \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccui/LinearLayoutParameter/LinearGravity.lua b/addons/cclua/cocos2d/library/ccui/LinearLayoutParameter/LinearGravity.lua new file mode 100644 index 00000000..b99cede0 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccui/LinearLayoutParameter/LinearGravity.lua @@ -0,0 +1,19 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccui.LinearLayoutParameter.LinearGravity + +---@type ccui.LinearLayoutParameter.LinearGravity +local VALUE + +--- +---@enum ccui.LinearLayoutParameter.LinearGravity +local LinearGravity = { + BOTTOM = 4, + CENTER_HORIZONTAL = 6, + CENTER_VERTICAL = 5, + LEFT = 1, + NONE = 0, + RIGHT = 3, + TOP = 2, +} + +return LinearGravity \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccui/ListView.lua b/addons/cclua/cocos2d/library/ccui/ListView.lua new file mode 100644 index 00000000..f3239356 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccui/ListView.lua @@ -0,0 +1,241 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccui.ListView + +---ListView is a view group that displays a list of scrollable items. +---The list items are inserted to the list by using `addChild` or `insertDefaultItem`. +---\warning The list item in ListView doesn't support cell reuse at the moment, if you have a large amount of data need to be displayed, use `TableView` instead. +---ListView is a subclass of `ScrollView`, so it shares many features of ScrollView. +---@class ccui.ListView : ccui.ScrollView +---@field bottomPadding number Get the bottom padding in ListView \return Bottom padding in float +---@field bottommostItemInCurrentView ccui.Widget Query the bottommost item in horizontal list \return An item instance. +---@field centerItemInCurrentView ccui.Widget Query the center item \return An item instance. +---@field curSelectedIndex integer Query current selected widget's index.

\return An index of a selected item. +---@field items any Return all items in a ListView. \returns A vector of widget pointers. +---@field itemsMargin number Query margin between each item in ListView.

\return A margin in float. +---@field leftPadding number Get the left padding in ListView \return Left padding in float +---@field leftmostItemInCurrentView ccui.Widget Query the leftmost item in horizontal list \return An item instance. +---@field magneticAllowedOutOfBoundary boolean Query whether the magnetic out of boundary is allowed. +---@field magneticType ccui.ListView.MagneticType Get magnetic type of ListView. +---@field rightPadding number Get the right padding in ListView \return Right padding in float +---@field rightmostItemInCurrentView ccui.Widget Query the rightmost item in horizontal list \return An item instance. +---@field scrollDuration number Get the time in seconds to scroll between items. \return The time in seconds to scroll between items \see setScrollDuration(float) +---@field topPadding number Get the top padding in ListView \return Top padding in float +---@field topmostItemInCurrentView ccui.Widget Query the topmost item in horizontal list \return An item instance. +local ListView = {} + +---Add an event click callback to ListView, then one item of Listview is clicked, the callback will be called. +---@param callback ccui.ListView.ccListViewCallback # A callback function with type of `ccListViewCallback`. +--- +---Add callback function which will be called when scrollview event triggered. +---\param callback A callback function with type of `ccScrollViewCallback`. +---@overload fun(self: ccui.ListView, callback: ccui.ScrollView.ccScrollViewCallback) +function ListView:addEventListener(callback) end + +---Create an empty ListView. +---@return ccui.ListView # A ListView instance. +function ListView.create() end + +---@return cc.Ref +function ListView.createInstance() end + +function ListView:doLayout() end + +---Get the bottom padding in ListView +---@return number # Bottom padding in float +function ListView:getBottomPadding() end + +---Query the bottommost item in horizontal list +---@return ccui.Widget # An item instance. +function ListView:getBottommostItemInCurrentView() end + +---Query the center item +---@return ccui.Widget # An item instance. +function ListView:getCenterItemInCurrentView() end + +---Query the closest item to a specific position in inner container. +--- +---@param targetPosition cc.Vec2 # Specifies the target position in inner container's coordinates. +---@param itemAnchorPoint cc.Vec2 # Specifies an anchor point of each item for position to calculate distance. +---@return ccui.Widget # An item instance if list view is not empty. Otherwise, returns null. +function ListView:getClosestItemToPosition(targetPosition, itemAnchorPoint) end + +---Query the closest item to a specific position in current view. +---For instance, to find the item in the center of view, call 'getClosestItemToPositionInCurrentView(Vec2::ANCHOR_MIDDLE, Vec2::ANCHOR_MIDDLE)'. +--- +---@param positionRatioInView cc.Vec2 # Specifies the target position with ratio in list view's content size. +---@param itemAnchorPoint cc.Vec2 # Specifies an anchor point of each item for position to calculate distance. +---@return ccui.Widget # An item instance if list view is not empty. Otherwise, returns null. +function ListView:getClosestItemToPositionInCurrentView(positionRatioInView, itemAnchorPoint) end + +---Query current selected widget's index. +--- +--- +---@return integer # An index of a selected item. +function ListView:getCurSelectedIndex() end + +---Return the index of specified widget. +--- +---@param item ccui.Widget # A widget pointer. +---@return integer # The index of a given widget in ListView. +function ListView:getIndex(item) end + +---Return an item at a given index. +--- +---@param index integer # A given index in ssize_t. +---@return ccui.Widget # A widget instance. +function ListView:getItem(index) end + +---Return all items in a ListView. +---@return any # s A vector of widget pointers. +function ListView:getItems() end + +---Query margin between each item in ListView. +--- +--- +---@return number # A margin in float. +function ListView:getItemsMargin() end + +---Get the left padding in ListView +---@return number # Left padding in float +function ListView:getLeftPadding() end + +---Query the leftmost item in horizontal list +---@return ccui.Widget # An item instance. +function ListView:getLeftmostItemInCurrentView() end + +---Query whether the magnetic out of boundary is allowed. +---@return boolean +function ListView:getMagneticAllowedOutOfBoundary() end + +---Get magnetic type of ListView. +---@return ccui.ListView.MagneticType +function ListView:getMagneticType() end + +---Get the right padding in ListView +---@return number # Right padding in float +function ListView:getRightPadding() end + +---Query the rightmost item in horizontal list +---@return ccui.Widget # An item instance. +function ListView:getRightmostItemInCurrentView() end + +---Get the time in seconds to scroll between items. +---@return number # The time in seconds to scroll between items +---\see setScrollDuration(float) +function ListView:getScrollDuration() end + +---Get the top padding in ListView +---@return number # Top padding in float +function ListView:getTopPadding() end + +---Query the topmost item in horizontal list +---@return ccui.Widget # An item instance. +function ListView:getTopmostItemInCurrentView() end + +---Insert a custom widget into ListView at a given index. +--- +---@param item ccui.Widget # A widget pointer to be inserted. +---@param index integer # A given index in ssize_t. +function ListView:insertCustomItem(item, index) end + +---Insert a default item(create by cloning model) into listview at a give index. +---@param index integer # An index in ssize_t. +function ListView:insertDefaultItem(index) end + +---Jump to specific item +---@param itemIndex integer # Specifies the item's index +---@param positionRatioInView cc.Vec2 # Specifies the position with ratio in list view's content size. +---@param itemAnchorPoint cc.Vec2 # Specifies an anchor point of each item for position to calculate distance. +function ListView:jumpToItem(itemIndex, positionRatioInView, itemAnchorPoint) end + +---Default constructor +---\js ctor +---\lua new +---@return ccui.ListView +function ListView.new() end + +---Insert a custom item into the end of ListView. +---@param item ccui.Widget # An item in `Widget*`. +function ListView:pushBackCustomItem(item) end + +---Insert a default item(create by a cloned model) at the end of the listview. +function ListView:pushBackDefaultItem() end + +---Remove all items in current ListView. +function ListView:removeAllItems() end + +---Remove an item at given index. +--- +---@param index integer # A given index in ssize_t. +function ListView:removeItem(index) end + +---Removes the last item of ListView. +function ListView:removeLastItem() end + +---Scroll to specific item +---@param positionRatioInView cc.Vec2 # Specifies the position with ratio in list view's content size. +---@param itemAnchorPoint cc.Vec2 # Specifies an anchor point of each item for position to calculate distance. +---\param timeInSec Scroll time +---@param itemIndex integer +---@overload fun(self: ccui.ListView, itemIndex: integer, positionRatioInView: cc.Vec2, itemAnchorPoint: cc.Vec2, timeInSec: number) +function ListView:scrollToItem(itemIndex, positionRatioInView, itemAnchorPoint) end + +---Change padding with bottom padding +---@param b number # Bottom padding in float +function ListView:setBottomPadding(b) end + +---Set current selected widget's index and call TouchEventType::ENDED event. +---@param itemIndex integer # A index of a selected item. +function ListView:setCurSelectedIndex(itemIndex) end + +---Set the gravity of ListView. +---\see `ListViewGravity` +---@param gravity ccui.ListView.Gravity +function ListView:setGravity(gravity) end + +---Set an item model for listview. +--- +---When calling `pushBackDefaultItem`, the model will be used as a blueprint and new model copy will be inserted into ListView. +---@param model ccui.Widget # Model in `Widget*`. +function ListView:setItemModel(model) end + +---Set the margin between each item in ListView. +--- +---@param margin number # A margin in float. +function ListView:setItemsMargin(margin) end + +---Change padding with left padding +---@param l number # Left padding in float. +function ListView:setLeftPadding(l) end + +---Set magnetic allowed out of boundary. +---@param magneticAllowedOutOfBoundary boolean +function ListView:setMagneticAllowedOutOfBoundary(magneticAllowedOutOfBoundary) end + +---Set magnetic type of ListView. +---\see `MagneticType` +---@param magneticType ccui.ListView.MagneticType +function ListView:setMagneticType(magneticType) end + +---Change padding with left, top, right, and bottom padding. +---@param l number # Left padding in float. +---@param t number # Top margin in float. +---@param r number # Right margin in float. +---@param b number # Bottom margin in float. +function ListView:setPadding(l, t, r, b) end + +---Change padding with right padding +---@param r number # Right padding in float +function ListView:setRightPadding(r) end + +---Set the time in seconds to scroll between items. +---Subsequent calls of function 'scrollToItem', will take 'time' seconds for scrolling. +---@param time number # The seconds needed to scroll between two items. 'time' must be >= 0 +---\see scrollToItem(ssize_t, const Vec2&, const Vec2&) +function ListView:setScrollDuration(time) end + +---Change padding with top padding +---@param t number # Top padding in float +function ListView:setTopPadding(t) end + +return ListView \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccui/ListView/EventType.lua b/addons/cclua/cocos2d/library/ccui/ListView/EventType.lua new file mode 100644 index 00000000..bb46d232 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccui/ListView/EventType.lua @@ -0,0 +1,14 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccui.ListView.EventType + +---@type ccui.ListView.EventType +local VALUE + +--- +---@enum ccui.ListView.EventType +local EventType = { + ON_SELECTED_ITEM_END = 1, + ON_SELECTED_ITEM_START = 0, +} + +return EventType \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccui/ListView/Gravity.lua b/addons/cclua/cocos2d/library/ccui/ListView/Gravity.lua new file mode 100644 index 00000000..bee709e6 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccui/ListView/Gravity.lua @@ -0,0 +1,18 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccui.ListView.Gravity + +---@type ccui.ListView.Gravity +local VALUE + +--- +---@enum ccui.ListView.Gravity +local Gravity = { + BOTTOM = 4, + CENTER_HORIZONTAL = 2, + CENTER_VERTICAL = 5, + LEFT = 0, + RIGHT = 1, + TOP = 3, +} + +return Gravity \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccui/ListView/MagneticType.lua b/addons/cclua/cocos2d/library/ccui/ListView/MagneticType.lua new file mode 100644 index 00000000..faacf154 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccui/ListView/MagneticType.lua @@ -0,0 +1,19 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccui.ListView.MagneticType + +---@type ccui.ListView.MagneticType +local VALUE + +--- +---@enum ccui.ListView.MagneticType +local MagneticType = { + BOTH_END = 2, + BOTTOM = 6, + CENTER = 1, + LEFT = 3, + NONE = 0, + RIGHT = 4, + TOP = 5, +} + +return MagneticType \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccui/ListView/ccListViewCallback.lua b/addons/cclua/cocos2d/library/ccui/ListView/ccListViewCallback.lua new file mode 100644 index 00000000..85e500c0 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccui/ListView/ccListViewCallback.lua @@ -0,0 +1,14 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccui.ListView.ccListViewCallback + +--- +--- +---std::function +---@class ccui.ListView.ccListViewCallback +local ccListViewCallback = {} + +---@return ccui.ListView.ccListViewCallback + +function ccListViewCallback:__call() end + +return ccListViewCallback \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccui/LoadingBar.lua b/addons/cclua/cocos2d/library/ccui/LoadingBar.lua new file mode 100644 index 00000000..41159756 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccui/LoadingBar.lua @@ -0,0 +1,107 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccui.LoadingBar + +---Visual indicator of progress in some operation. +---Displays a bar to the user representing how far the operation has progressed. +---@class ccui.LoadingBar : ccui.Widget +---@field capInsets cc.Rect Query LoadingBar's capInsets. \return CapInsets of LoadingBar. +---@field direction ccui.LoadingBar.Direction Get the progress direction of LoadingBar.

\see Direction `LEFT` means progress left to right, `RIGHT` otherwise. \return LoadingBar progress direction. +---@field percent number Get the progress value of LoadingBar.

\return Progress value from 1 to 100. +---@field renderFile cc.ResourceData +---@field scale9Enabled boolean Query whether LoadingBar is using scale9 renderer or not. \return Whether LoadingBar uses scale9 renderer or not. +local LoadingBar = {} + +---Create an empty LoadingBar. +---@return ccui.LoadingBar # A LoadingBar instance. +--- +---Create a LoadingBar with a texture name and a predefined progress value. +--- +---\param textureName LoadingBar background texture name. +---\param percentage A percentage in float. +---\return A LoadingBar instance. +---@overload fun(textureName: string, percentage: number): ccui.LoadingBar +--- +---Create a LoadingBar with a texture name and a predefined progress value. +--- +---\param textureName LoadingBar background texture name. +---\param percentage A percentage in float. +---\return A LoadingBar instance. +---@overload fun(textureName: string): ccui.LoadingBar +--- +---Create a LoadingBar with a texture name along with its texture type and a predefined progress value. +--- +---\param textureName LoadingBar background texture name. +---\param texType LoadingBar background texture type. +---\param percentage A percentage in float, default value is 0. +---\return A LoadingBar instance. +---@overload fun(textureName: string, texType: ccui.Widget.TextureResType, percentage: number): ccui.LoadingBar +--- +---Create a LoadingBar with a texture name along with its texture type and a predefined progress value. +--- +---\param textureName LoadingBar background texture name. +---\param texType LoadingBar background texture type. +---\param percentage A percentage in float, default value is 0. +---\return A LoadingBar instance. +---@overload fun(textureName: string, texType: ccui.Widget.TextureResType): ccui.LoadingBar +function LoadingBar.create() end + +---@return cc.Ref +function LoadingBar.createInstance() end + +---Query LoadingBar's capInsets. +---@return cc.Rect # CapInsets of LoadingBar. +function LoadingBar:getCapInsets() end + +---Get the progress direction of LoadingBar. +--- +---\see Direction `LEFT` means progress left to right, `RIGHT` otherwise. +---@return ccui.LoadingBar.Direction # LoadingBar progress direction. +function LoadingBar:getDirection() end + +---Get the progress value of LoadingBar. +--- +---@return number # Progress value from 1 to 100. +function LoadingBar:getPercent() end + +---@return cc.ResourceData +function LoadingBar:getRenderFile() end + +---Query whether LoadingBar is using scale9 renderer or not. +---@return boolean # Whether LoadingBar uses scale9 renderer or not. +function LoadingBar:isScale9Enabled() end + +---Load texture for LoadingBar. +--- +---@param texture string # File name of texture. +---@param texType ccui.Widget.TextureResType # Texture resource type,@see TextureResType. +---@overload fun(self: ccui.LoadingBar, texture: string) +function LoadingBar:loadTexture(texture, texType) end + +---Default constructor. +---\js ctor +---\lua new +---@return ccui.LoadingBar +function LoadingBar.new() end + +---Set capInsets for LoadingBar. +---This setting only take effect when enable scale9 renderer. +---@param capInsets cc.Rect # CapInset in `Rect`. +function LoadingBar:setCapInsets(capInsets) end + +---Change the progress direction of LoadingBar. +--- +---\see Direction `LEFT` means progress left to right, `RIGHT` otherwise. +---@param direction ccui.LoadingBar.Direction # Direction +function LoadingBar:setDirection(direction) end + +---Changes the progress value of LoadingBar. +--- +---@param percent number # Percent value from 1 to 100. +function LoadingBar:setPercent(percent) end + +---Enable scale9 renderer. +--- +---@param enabled boolean # Set to true will use scale9 renderer, false otherwise. +function LoadingBar:setScale9Enabled(enabled) end + +return LoadingBar \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccui/LoadingBar/Direction.lua b/addons/cclua/cocos2d/library/ccui/LoadingBar/Direction.lua new file mode 100644 index 00000000..e1ff4c6b --- /dev/null +++ b/addons/cclua/cocos2d/library/ccui/LoadingBar/Direction.lua @@ -0,0 +1,14 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccui.LoadingBar.Direction + +---@type ccui.LoadingBar.Direction +local VALUE + +--- +---@enum ccui.LoadingBar.Direction +local Direction = { + LEFT = 0, + RIGHT = 1, +} + +return Direction \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccui/LuaEditBoxDelegate.lua b/addons/cclua/cocos2d/library/ccui/LuaEditBoxDelegate.lua new file mode 100644 index 00000000..ff37172f --- /dev/null +++ b/addons/cclua/cocos2d/library/ccui/LuaEditBoxDelegate.lua @@ -0,0 +1,15 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccui.LuaEditBoxDelegate + +--- +---@class ccui.LuaEditBoxDelegate : ccui.EditBoxDelegate +---@field onEditingDidBegin fun(arg1: ccui.EditBox) +---@field onEditingDidEndWithAction fun(arg1: ccui.EditBox, arg2: ccui.EditBoxDelegate.EditBoxEndAction) +---@field onReturn fun(arg1: ccui.EditBox) +---@field onTextChanged fun(arg1: ccui.EditBox, arg2: string) +local LuaEditBoxDelegate = {} + +---@return ccui.LuaEditBoxDelegate +function LuaEditBoxDelegate.new() end + +return LuaEditBoxDelegate \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccui/PageView.lua b/addons/cclua/cocos2d/library/ccui/PageView.lua new file mode 100644 index 00000000..76626ece --- /dev/null +++ b/addons/cclua/cocos2d/library/ccui/PageView.lua @@ -0,0 +1,199 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccui.PageView + +---Layout manager that allows the user to flip left & right and up & down through pages of data. +---@class ccui.PageView : ccui.ListView +---@field currentPageIndex integer Gets current displayed page index. \return current page index. +---@field indicatorEnabled boolean Query page indicator state.

\return True if page indicator is enabled, false otherwise. +---@field indicatorIndexNodesColor any Get the color of page indicator's index nodes.

\return color +---@field indicatorIndexNodesOpacity integer Get the opacity of page indicator's index nodes.

\return opacity +---@field indicatorIndexNodesScale number Get scale of page indicator's index nodes.

\return indexNodesScale +---@field indicatorPosition cc.Vec2 Get the page indicator's position.

\return positionAsAnchorPoint +---@field indicatorPositionAsAnchorPoint cc.Vec2 Get the page indicator's position as anchor point.

\return positionAsAnchorPoint +---@field indicatorSelectedIndexColor any Get the color of page indicator's selected index.

\return color +---@field indicatorSelectedIndexOpacity integer Get the opacity of page indicator's selected index.

\return opacity +---@field indicatorSpaceBetweenIndexNodes number Get the space between page indicator's index nodes.

\return spaceBetweenIndexNodes +local PageView = {} + +---Add a page turn callback to PageView, then when one page is turning, the callback will be called. +--- +---@param callback ccui.PageView.ccPageViewCallback # A page turning callback. +--- +---Add callback function which will be called when scrollview event triggered. +---\param callback A callback function with type of `ccScrollViewCallback`. +---@overload fun(self: ccui.PageView, callback: ccui.ScrollView.ccScrollViewCallback) +function PageView:addEventListener(callback) end + +---Insert a page into the end of PageView. +--- +---@param page ccui.Widget # Page to be inserted. +function PageView:addPage(page) end + +---Create an empty PageView. +---@return ccui.PageView # A PageView instance. +function PageView.create() end + +---@return cc.Ref +function PageView.createInstance() end + +---Gets current displayed page index. +---@return integer # current page index. +function PageView:getCurrentPageIndex() end + +---Query page indicator state. +--- +---@return boolean # True if page indicator is enabled, false otherwise. +function PageView:getIndicatorEnabled() end + +---Get the color of page indicator's index nodes. +--- +---@return any # color +function PageView:getIndicatorIndexNodesColor() end + +---Get the opacity of page indicator's index nodes. +--- +---@return integer # opacity +function PageView:getIndicatorIndexNodesOpacity() end + +---Get scale of page indicator's index nodes. +--- +---@return number # indexNodesScale +function PageView:getIndicatorIndexNodesScale() end + +---Get the page indicator's position. +--- +---@return cc.Vec2 # positionAsAnchorPoint +function PageView:getIndicatorPosition() end + +---Get the page indicator's position as anchor point. +--- +---@return cc.Vec2 # positionAsAnchorPoint +function PageView:getIndicatorPositionAsAnchorPoint() end + +---Get the color of page indicator's selected index. +--- +---@return any # color +function PageView:getIndicatorSelectedIndexColor() end + +---Get the opacity of page indicator's selected index. +--- +---@return integer # opacity +function PageView:getIndicatorSelectedIndexOpacity() end + +---Get the space between page indicator's index nodes. +--- +---@return number # spaceBetweenIndexNodes +function PageView:getIndicatorSpaceBetweenIndexNodes() end + +---Insert a page into PageView at a given index. +--- +---@param page ccui.Widget # Page to be inserted. +---@param idx integer # A given index. +function PageView:insertPage(page, idx) end + +---Default constructor +---\js ctor +---\lua new +---@return ccui.PageView +function PageView.new() end + +---Remove all pages of the PageView. +function PageView:removeAllPages() end + +---Remove a page of PageView. +--- +---@param page ccui.Widget # Page to be removed. +function PageView:removePage(page) end + +---Remove a page at a given index of PageView. +--- +---@param index integer # A given index. +function PageView:removePageAtIndex(index) end + +---Scroll to a page with a given index. +--- +---@param itemIndex integer # A given index in the PageView. Index start from 0 to pageCount -1. +--- +---Scroll to a item with a given index and with a given scroll time. +--- +---\param idx A given index in the PageView. Index start from 0 to pageCount -1. +---\param time Scroll time must be >= 0. Otherwise last set scrolltime will be used. +---@overload fun(self: ccui.PageView, idx: integer, time: number) +function PageView:scrollToItem(itemIndex) end + +---Scroll to a page with a given index. +--- +---@param idx integer # A given index in the PageView. Index start from 0 to pageCount -1. +--- +---Scroll to a page with a given index and with a given scroll time. +--- +---\param idx A given index in the PageView. Index start from 0 to pageCount -1. +---\param time Scroll time must be >= 0. Otherwise last set scroll time will be used. +---@overload fun(self: ccui.PageView, idx: integer, time: number) +function PageView:scrollToPage(idx) end + +---@param epsilon number +function PageView:setAutoScrollStopEpsilon(epsilon) end + +---Jump to a page with a given index without scrolling. +---This is the different between scrollToPage. +--- +---@param index integer # A given index in PageView. Index start from 0 to pageCount -1. +function PageView:setCurrentPageIndex(index) end + +---Toggle page indicator enabled. +--- +---@param enabled boolean # True if enable page indicator, false otherwise. +function PageView:setIndicatorEnabled(enabled) end + +---Set color of page indicator's index nodes. +--- +---@param color any # New indicator node color. +function PageView:setIndicatorIndexNodesColor(color) end + +---Set opacity of page indicator's index nodes. +--- +---@param opacity integer # New indicator node opacity. +function PageView:setIndicatorIndexNodesOpacity(opacity) end + +---Set scale of page indicator's index nodes. +--- +---@param indexNodesScale number # Scale of index nodes. +function PageView:setIndicatorIndexNodesScale(indexNodesScale) end + +---sets texture for index nodes. +--- +---\param fileName File name of texture. +---\param resType @see TextureResType . +---@param texName string +---@param texType ccui.Widget.TextureResType +---@overload fun(self: ccui.PageView, texName: string) +function PageView:setIndicatorIndexNodesTexture(texName, texType) end + +---Set the page indicator's position in page view. +--- +---@param position cc.Vec2 # The position in page view +function PageView:setIndicatorPosition(position) end + +---Set the page indicator's position using anchor point. +--- +---@param positionAsAnchorPoint cc.Vec2 # The position as anchor point. +function PageView:setIndicatorPositionAsAnchorPoint(positionAsAnchorPoint) end + +---Set color of page indicator's selected index. +--- +---@param color any # New color for selected (current) index. +function PageView:setIndicatorSelectedIndexColor(color) end + +---Set opacity of page indicator's selected index. +--- +---\param color New opacity for selected (current) index. +---@param opacity integer +function PageView:setIndicatorSelectedIndexOpacity(opacity) end + +---Set space between page indicator's index nodes. +--- +---@param spaceBetweenIndexNodes number # Space between nodes in pixel. +function PageView:setIndicatorSpaceBetweenIndexNodes(spaceBetweenIndexNodes) end + +return PageView \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccui/PageView/EventType.lua b/addons/cclua/cocos2d/library/ccui/PageView/EventType.lua new file mode 100644 index 00000000..1dbee3e0 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccui/PageView/EventType.lua @@ -0,0 +1,13 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccui.PageView.EventType + +---@type ccui.PageView.EventType +local VALUE + +--- +---@enum ccui.PageView.EventType +local EventType = { + TURNING = 0, +} + +return EventType \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccui/PageView/TouchDirection.lua b/addons/cclua/cocos2d/library/ccui/PageView/TouchDirection.lua new file mode 100644 index 00000000..4ff62b43 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccui/PageView/TouchDirection.lua @@ -0,0 +1,16 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccui.PageView.TouchDirection + +---@type ccui.PageView.TouchDirection +local VALUE + +--- +---@enum ccui.PageView.TouchDirection +local TouchDirection = { + DOWN = 3, + LEFT = 0, + RIGHT = 1, + UP = 2, +} + +return TouchDirection \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccui/PageView/ccPageViewCallback.lua b/addons/cclua/cocos2d/library/ccui/PageView/ccPageViewCallback.lua new file mode 100644 index 00000000..fab96836 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccui/PageView/ccPageViewCallback.lua @@ -0,0 +1,14 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccui.PageView.ccPageViewCallback + +--- +--- +---std::function +---@class ccui.PageView.ccPageViewCallback +local ccPageViewCallback = {} + +---@return ccui.PageView.ccPageViewCallback + +function ccPageViewCallback:__call() end + +return ccPageViewCallback \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccui/RadioButton.lua b/addons/cclua/cocos2d/library/ccui/RadioButton.lua new file mode 100644 index 00000000..b7478d7c --- /dev/null +++ b/addons/cclua/cocos2d/library/ccui/RadioButton.lua @@ -0,0 +1,66 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccui.RadioButton + +---RadioButton is a specific type of two-states button that is similar to CheckBox. +---Additionally, it can be used together with RadioButtonGroup to interact with other radio buttons. +---@class ccui.RadioButton : ccui.AbstractCheckButton +local RadioButton = {} + +---Add a callback function which would be called when radio button is selected or unselected. +---@param callback ccui.RadioButton.ccRadioButtonCallback # A std::function with type @see `ccRadioButtonCallback` +function RadioButton:addEventListener(callback) end + +---Create and return a empty RadioButton instance pointer. +---@return ccui.RadioButton +--- +---Create a radio button with various images. +--- +---\param backGround backGround texture. +---\param backGroundSelected backGround selected state texture. +---\param cross cross texture. +---\param backGroundDisabled backGround disabled state texture. +---\param frontCrossDisabled cross dark state texture. +---\param texType @see `Widget::TextureResType` +--- +---\return A RadioButton instance pointer. +---@overload fun(backGround: string, backGroundSelected: string, cross: string, backGroundDisabled: string, frontCrossDisabled: string, texType: ccui.Widget.TextureResType): ccui.RadioButton +--- +---Create a radio button with various images. +--- +---\param backGround backGround texture. +---\param backGroundSelected backGround selected state texture. +---\param cross cross texture. +---\param backGroundDisabled backGround disabled state texture. +---\param frontCrossDisabled cross dark state texture. +---\param texType @see `Widget::TextureResType` +--- +---\return A RadioButton instance pointer. +---@overload fun(backGround: string, backGroundSelected: string, cross: string, backGroundDisabled: string, frontCrossDisabled: string): ccui.RadioButton +--- +---Another factory method to create a RadioButton instance. +---This method uses less resource to create a RadioButton. +---\param backGround The background image name in `std::string`. +---\param cross The cross image name in `std::string`. +---\param texType The texture's resource type in `Widget::TextureResType`. +---\return A RadioButton instance pointer +---@overload fun(backGround: string, cross: string, texType: ccui.Widget.TextureResType): ccui.RadioButton +--- +---Another factory method to create a RadioButton instance. +---This method uses less resource to create a RadioButton. +---\param backGround The background image name in `std::string`. +---\param cross The cross image name in `std::string`. +---\param texType The texture's resource type in `Widget::TextureResType`. +---\return A RadioButton instance pointer +---@overload fun(backGround: string, cross: string): ccui.RadioButton +function RadioButton.create() end + +---@return cc.Ref +function RadioButton.createInstance() end + +---Default constructor. +--- +---\lua new +---@return ccui.RadioButton +function RadioButton.new() end + +return RadioButton \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccui/RadioButton/EventType.lua b/addons/cclua/cocos2d/library/ccui/RadioButton/EventType.lua new file mode 100644 index 00000000..8c1ca3de --- /dev/null +++ b/addons/cclua/cocos2d/library/ccui/RadioButton/EventType.lua @@ -0,0 +1,14 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccui.RadioButton.EventType + +---@type ccui.RadioButton.EventType +local VALUE + +--- +---@enum ccui.RadioButton.EventType +local EventType = { + SELECTED = 0, + UNSELECTED = 1, +} + +return EventType \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccui/RadioButton/ccRadioButtonCallback.lua b/addons/cclua/cocos2d/library/ccui/RadioButton/ccRadioButtonCallback.lua new file mode 100644 index 00000000..34999df9 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccui/RadioButton/ccRadioButtonCallback.lua @@ -0,0 +1,14 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccui.RadioButton.ccRadioButtonCallback + +--- +--- +---std::function +---@class ccui.RadioButton.ccRadioButtonCallback +local ccRadioButtonCallback = {} + +---@return ccui.RadioButton.ccRadioButtonCallback + +function ccRadioButtonCallback:__call() end + +return ccRadioButtonCallback \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccui/RadioButtonGroup.lua b/addons/cclua/cocos2d/library/ccui/RadioButtonGroup.lua new file mode 100644 index 00000000..d1d4caf3 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccui/RadioButtonGroup.lua @@ -0,0 +1,92 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccui.RadioButtonGroup + +---RadioButtonGroup groups designated radio buttons to make them interact to each other. +---In one RadioButtonGroup, only one or no RadioButton can be checked. +---@class ccui.RadioButtonGroup : ccui.Widget +---@field allowedNoSelection boolean Query whether no-selection is allowed or not.

\param true means no-selection is allowed, false means no-selection is not allowed. +---@field numberOfRadioButtons integer Get the number of radio buttons in this group.

\return the number of radio buttons in this group +---@field selectedButtonIndex integer Get the index of selected radio button.

\return the selected button's index. Returns -1 if no button is selected. +local RadioButtonGroup = {} + +---Add a callback function which would be called when radio button is selected or unselected. +---@param callback ccui.RadioButtonGroup.ccRadioButtonGroupCallback # A std::function with type @see `ccRadioButtonGroupCallback` +function RadioButtonGroup:addEventListener(callback) end + +---Add a radio button into this group. +--- +---\param radio button instance +---@param radioButton ccui.RadioButton +function RadioButtonGroup:addRadioButton(radioButton) end + +---Create and return a empty RadioButtonGroup instance pointer. +---@return ccui.RadioButtonGroup +function RadioButtonGroup.create() end + +---Get the number of radio buttons in this group. +--- +---@return integer # the number of radio buttons in this group +function RadioButtonGroup:getNumberOfRadioButtons() end + +---Get a radio button in this group by index. +--- +---@param index integer # of the radio button +---@return ccui.RadioButton # radio button instance. Returns nullptr if out of index. +function RadioButtonGroup:getRadioButtonByIndex(index) end + +---Get the index of selected radio button. +--- +---@return integer # the selected button's index. Returns -1 if no button is selected. +function RadioButtonGroup:getSelectedButtonIndex() end + +---Query whether no-selection is allowed or not. +--- +---\param true means no-selection is allowed, false means no-selection is not allowed. +---@return boolean +function RadioButtonGroup:isAllowedNoSelection() end + +---Default constructor. +--- +---\lua new +---@return ccui.RadioButtonGroup +function RadioButtonGroup.new() end + +---Remove all radio button from this group. +function RadioButtonGroup:removeAllRadioButtons() end + +---Remove a radio button from this group. +--- +---\param radio button instance +---@param radioButton ccui.RadioButton +function RadioButtonGroup:removeRadioButton(radioButton) end + +---Set a flag for allowing no-selection feature. +---If it is allowed, no radio button can be selected. +---If it is not allowed, one radio button must be selected all time except it is empty. +---Default is not allowed. +--- +---\param true means allowing no-selection, false means disallowing no-selection. +---@param allowedNoSelection boolean +function RadioButtonGroup:setAllowedNoSelection(allowedNoSelection) end + +---Select a radio button by index. +--- +---@param index integer # of the radio button +--- +---Select a radio button by instance. +--- +---\param radio button instance +---@overload fun(self: ccui.RadioButtonGroup, radioButton: ccui.RadioButton) +function RadioButtonGroup:setSelectedButton(index) end + +---Select a radio button by index without event dispatch. +--- +---@param index integer # of the radio button +--- +---Select a radio button by instance without event dispatch. +--- +---\param radio button instance +---@overload fun(self: ccui.RadioButtonGroup, radioButton: ccui.RadioButton) +function RadioButtonGroup:setSelectedButtonWithoutEvent(index) end + +return RadioButtonGroup \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccui/RadioButtonGroup/EventType.lua b/addons/cclua/cocos2d/library/ccui/RadioButtonGroup/EventType.lua new file mode 100644 index 00000000..2180d418 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccui/RadioButtonGroup/EventType.lua @@ -0,0 +1,13 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccui.RadioButtonGroup.EventType + +---@type ccui.RadioButtonGroup.EventType +local VALUE + +--- +---@enum ccui.RadioButtonGroup.EventType +local EventType = { + SELECT_CHANGED = 0, +} + +return EventType \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccui/RadioButtonGroup/ccRadioButtonGroupCallback.lua b/addons/cclua/cocos2d/library/ccui/RadioButtonGroup/ccRadioButtonGroupCallback.lua new file mode 100644 index 00000000..16db90b4 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccui/RadioButtonGroup/ccRadioButtonGroupCallback.lua @@ -0,0 +1,14 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccui.RadioButtonGroup.ccRadioButtonGroupCallback + +--- +--- +---std::function +---@class ccui.RadioButtonGroup.ccRadioButtonGroupCallback +local ccRadioButtonGroupCallback = {} + +---@return ccui.RadioButtonGroup.ccRadioButtonGroupCallback + +function ccRadioButtonGroupCallback:__call() end + +return ccRadioButtonGroupCallback \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccui/RelativeBox.lua b/addons/cclua/cocos2d/library/ccui/RelativeBox.lua new file mode 100644 index 00000000..16625722 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccui/RelativeBox.lua @@ -0,0 +1,29 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccui.RelativeBox + +---RelativeBox is just a convenient wrapper class for relative layout type. +---RelativeBox lays out its children relative to a widget or a position. +---@class ccui.RelativeBox : ccui.Layout +local RelativeBox = {} + +---Create an empty RelativeBox instance. +---@return ccui.RelativeBox # A RelativeBox instance. +--- +---Create a RelativeBox with a fixed size. +--- +---\param size Size in `Size`. +---\return A RelativeBox instance. +---@overload fun(size: cc.Size): ccui.RelativeBox +function RelativeBox.create() end + +---@param size cc.Size +---@return boolean +function RelativeBox:initWithSize(size) end + +---Default constructor. +---\js ctor +---\lua new +---@return ccui.RelativeBox +function RelativeBox.new() end + +return RelativeBox \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccui/RelativeLayoutParameter.lua b/addons/cclua/cocos2d/library/ccui/RelativeLayoutParameter.lua new file mode 100644 index 00000000..f2e9de85 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccui/RelativeLayoutParameter.lua @@ -0,0 +1,53 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccui.RelativeLayoutParameter + +---Relative layout parameter. +---It is mainly used by `RelativeLayoutManager`. +---@class ccui.RelativeLayoutParameter : ccui.LayoutParameter +---@field align ccui.RelativeLayoutParameter.RelativeAlign Get RelativeAlign parameter for LayoutParameter.

\see RelativeAlign \return A RelativeAlign variable. +---@field relativeName string Get a name of LayoutParameter in Relative Layout.

\return name Relative name in string. +---@field relativeToWidgetName string Get the relative widget name. \return name A relative widget name in string. +local RelativeLayoutParameter = {} + +---Create a RelativeLayoutParameter instance. +---@return ccui.RelativeLayoutParameter # A initialized LayoutParameter which is marked as "autorelease". +function RelativeLayoutParameter.create() end + +---Get RelativeAlign parameter for LayoutParameter. +--- +---\see RelativeAlign +---@return ccui.RelativeLayoutParameter.RelativeAlign # A RelativeAlign variable. +function RelativeLayoutParameter:getAlign() end + +---Get a name of LayoutParameter in Relative Layout. +--- +---@return string # name Relative name in string. +function RelativeLayoutParameter:getRelativeName() end + +---Get the relative widget name. +---@return string # name A relative widget name in string. +function RelativeLayoutParameter:getRelativeToWidgetName() end + +---Default constructor +--- +---\lua new +---@return ccui.RelativeLayoutParameter +function RelativeLayoutParameter.new() end + +---Sets RelativeAlign parameter for LayoutParameter. +--- +---\see RelativeAlign +---@param align ccui.RelativeLayoutParameter.RelativeAlign # Relative align in `RelativeAlign`. +function RelativeLayoutParameter:setAlign(align) end + +---Set a name for LayoutParameter in Relative Layout. +--- +---@param name string # A string name. +function RelativeLayoutParameter:setRelativeName(name) end + +---Set widget name your widget want to relative to. +--- +---@param name string # Relative widget name. +function RelativeLayoutParameter:setRelativeToWidgetName(name) end + +return RelativeLayoutParameter \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccui/RelativeLayoutParameter/RelativeAlign.lua b/addons/cclua/cocos2d/library/ccui/RelativeLayoutParameter/RelativeAlign.lua new file mode 100644 index 00000000..ddd90dff --- /dev/null +++ b/addons/cclua/cocos2d/library/ccui/RelativeLayoutParameter/RelativeAlign.lua @@ -0,0 +1,34 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccui.RelativeLayoutParameter.RelativeAlign + +---@type ccui.RelativeLayoutParameter.RelativeAlign +local VALUE + +--- +---@enum ccui.RelativeLayoutParameter.RelativeAlign +local RelativeAlign = { + CENTER_IN_PARENT = 5, + LOCATION_ABOVE_CENTER = 11, + LOCATION_ABOVE_LEFTALIGN = 10, + LOCATION_ABOVE_RIGHTALIGN = 12, + LOCATION_BELOW_CENTER = 20, + LOCATION_BELOW_LEFTALIGN = 19, + LOCATION_BELOW_RIGHTALIGN = 21, + LOCATION_LEFT_OF_BOTTOMALIGN = 15, + LOCATION_LEFT_OF_CENTER = 14, + LOCATION_LEFT_OF_TOPALIGN = 13, + LOCATION_RIGHT_OF_BOTTOMALIGN = 18, + LOCATION_RIGHT_OF_CENTER = 17, + LOCATION_RIGHT_OF_TOPALIGN = 16, + NONE = 0, + PARENT_BOTTOM_CENTER_HORIZONTAL = 8, + PARENT_LEFT_BOTTOM = 7, + PARENT_LEFT_CENTER_VERTICAL = 4, + PARENT_RIGHT_BOTTOM = 9, + PARENT_RIGHT_CENTER_VERTICAL = 6, + PARENT_TOP_CENTER_HORIZONTAL = 2, + PARENT_TOP_LEFT = 1, + PARENT_TOP_RIGHT = 3, +} + +return RelativeAlign \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccui/RichElement.lua b/addons/cclua/cocos2d/library/ccui/RichElement.lua new file mode 100644 index 00000000..06da9f5a --- /dev/null +++ b/addons/cclua/cocos2d/library/ccui/RichElement.lua @@ -0,0 +1,30 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccui.RichElement + +---Rich text element base class. +---It defines the basic common properties for all rich text element. +---@class ccui.RichElement : cc.Ref +local RichElement = {} + +---@param type ccui.RichElement.Type +---@return boolean +function RichElement:equalType(type) end + +---Initialize a rich element with different arguments. +--- +---@param tag integer # A integer tag value. +---@param color any # A color in @see `Color3B`. +---@param opacity integer # A opacity value in `GLubyte`. +---@return boolean # True if initialize success, false otherwise. +function RichElement:init(tag, color, opacity) end + +---Default constructor. +---\js ctor +---\lua new +---@return ccui.RichElement +function RichElement.new() end + +---@param color any +function RichElement:setColor(color) end + +return RichElement \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccui/RichElement/Type.lua b/addons/cclua/cocos2d/library/ccui/RichElement/Type.lua new file mode 100644 index 00000000..b9db9881 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccui/RichElement/Type.lua @@ -0,0 +1,20 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccui.RichElement.Type + +---@type ccui.RichElement.Type +local VALUE + +--- +---@enum ccui.RichElement.Type +local Type = { + ---!< RichElementCustomNode + CUSTOM = 2, + ---!< RichElementImage + IMAGE = 1, + ---!< RichElementNewLine + NEWLINE = 3, + ---!< RichElementText + TEXT = 0, +} + +return Type \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccui/RichElementCustomNode.lua b/addons/cclua/cocos2d/library/ccui/RichElementCustomNode.lua new file mode 100644 index 00000000..7ad4d426 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccui/RichElementCustomNode.lua @@ -0,0 +1,32 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccui.RichElementCustomNode + +---Rich element for displaying custom node type. +---@class ccui.RichElementCustomNode : ccui.RichElement +local RichElementCustomNode = {} + +---Create a RichElementCustomNode with various arguments. +--- +---@param tag integer # A integer tag value. +---@param color any # A color in Color3B. +---@param opacity integer # A opacity in GLubyte. +---@param customNode cc.Node # A custom node pointer. +---@return ccui.RichElementCustomNode # A RichElementCustomNode instance. +function RichElementCustomNode.create(tag, color, opacity, customNode) end + +---Initialize a RichElementCustomNode with various arguments. +--- +---@param tag integer # A integer tag value. +---@param color any # A color in Color3B. +---@param opacity integer # A opacity in GLubyte. +---@param customNode cc.Node # A custom node pointer. +---@return boolean # True if initialize success, false otherwise. +function RichElementCustomNode:init(tag, color, opacity, customNode) end + +---Default constructor. +---\js ctor +---\lua new +---@return ccui.RichElementCustomNode +function RichElementCustomNode.new() end + +return RichElementCustomNode \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccui/RichElementImage.lua b/addons/cclua/cocos2d/library/ccui/RichElementImage.lua new file mode 100644 index 00000000..16737f26 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccui/RichElementImage.lua @@ -0,0 +1,49 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccui.RichElementImage + +---Rich element for displaying images. +---@class ccui.RichElementImage : ccui.RichElement +local RichElementImage = {} + +---Create a RichElementImage with various arguments. +--- +---@param tag integer # A integer tag value. +---@param color any # A color in Color3B. +---@param opacity integer # A opacity in GLubyte. +---@param filePath string # A image file name. +---@param url string # uniform resource locator +---@param texType ccui.Widget.TextureResType # texture type, may be a valid file path, or a sprite frame name +---@return ccui.RichElementImage # A RichElementImage instance. +---@overload fun(tag: integer, color: any, opacity: integer, filePath: string): ccui.RichElementImage +---@overload fun(tag: integer, color: any, opacity: integer, filePath: string, url: string): ccui.RichElementImage +function RichElementImage.create(tag, color, opacity, filePath, url, texType) end + +---Initialize a RichElementImage with various arguments. +--- +---@param tag integer # A integer tag value. +---@param color any # A color in Color3B. +---@param opacity integer # A opacity in GLubyte. +---@param filePath string # A image file name. +---@param url string # uniform resource locator +---@param texType ccui.Widget.TextureResType # texture type, may be a valid file path, or a sprite frame name +---@return boolean # True if initialize success, false otherwise. +---@overload fun(self: ccui.RichElementImage, tag: integer, color: any, opacity: integer, filePath: string): boolean +---@overload fun(self: ccui.RichElementImage, tag: integer, color: any, opacity: integer, filePath: string, url: string): boolean +function RichElementImage:init(tag, color, opacity, filePath, url, texType) end + +---Default constructor. +---\js ctor +---\lua new +---@return ccui.RichElementImage +function RichElementImage.new() end + +---@param height integer +function RichElementImage:setHeight(height) end + +---@param url string +function RichElementImage:setUrl(url) end + +---@param width integer +function RichElementImage:setWidth(width) end + +return RichElementImage \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccui/RichElementNewLine.lua b/addons/cclua/cocos2d/library/ccui/RichElementNewLine.lua new file mode 100644 index 00000000..033efe64 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccui/RichElementNewLine.lua @@ -0,0 +1,22 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccui.RichElementNewLine + +---Rich element for new line. +---@class ccui.RichElementNewLine : ccui.RichElement +local RichElementNewLine = {} + +---Create a RichElementNewLine with various arguments. +--- +---@param tag integer # A integer tag value. +---@param color any # A color in Color3B. +---@param opacity integer # A opacity in GLubyte. +---@return ccui.RichElementNewLine # A RichElementNewLine instance. +function RichElementNewLine.create(tag, color, opacity) end + +---Default constructor. +---\js ctor +---\lua new +---@return ccui.RichElementNewLine +function RichElementNewLine.new() end + +return RichElementNewLine \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccui/RichElementText.lua b/addons/cclua/cocos2d/library/ccui/RichElementText.lua new file mode 100644 index 00000000..c6838f9e --- /dev/null +++ b/addons/cclua/cocos2d/library/ccui/RichElementText.lua @@ -0,0 +1,66 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccui.RichElementText + +---Rich element for displaying text. +---@class ccui.RichElementText : ccui.RichElement +local RichElementText = {} + +---Create a RichElementText with various arguments. +--- +---@param tag integer # A integer tag value. +---@param color any # A color in Color3B. +---@param opacity integer # A opacity in GLubyte. +---@param text string # Content string. +---@param fontName string # Content font name. +---@param fontSize number # Content font size. +---@param flags integer # italics, bold, underline, strikethrough, url, outline, shadow or glow +---@param url string # uniform resource locator +---@param outlineColor any # the color of the outline +---@param outlineSize integer # the outline effect size value +---@param shadowColor any # the shadow effect color value +---@param shadowOffset cc.Size # shadow effect offset value +---@param shadowBlurRadius integer # the shadow effect blur radius +---@param glowColor any # glow color +---@return ccui.RichElementText # RichElementText instance. +---@overload fun(tag: integer, color: any, opacity: integer, text: string, fontName: string, fontSize: number): ccui.RichElementText +---@overload fun(tag: integer, color: any, opacity: integer, text: string, fontName: string, fontSize: number, flags: integer): ccui.RichElementText +---@overload fun(tag: integer, color: any, opacity: integer, text: string, fontName: string, fontSize: number, flags: integer, url: string): ccui.RichElementText +---@overload fun(tag: integer, color: any, opacity: integer, text: string, fontName: string, fontSize: number, flags: integer, url: string, outlineColor: any): ccui.RichElementText +---@overload fun(tag: integer, color: any, opacity: integer, text: string, fontName: string, fontSize: number, flags: integer, url: string, outlineColor: any, outlineSize: integer): ccui.RichElementText +---@overload fun(tag: integer, color: any, opacity: integer, text: string, fontName: string, fontSize: number, flags: integer, url: string, outlineColor: any, outlineSize: integer, shadowColor: any): ccui.RichElementText +---@overload fun(tag: integer, color: any, opacity: integer, text: string, fontName: string, fontSize: number, flags: integer, url: string, outlineColor: any, outlineSize: integer, shadowColor: any, shadowOffset: cc.Size): ccui.RichElementText +---@overload fun(tag: integer, color: any, opacity: integer, text: string, fontName: string, fontSize: number, flags: integer, url: string, outlineColor: any, outlineSize: integer, shadowColor: any, shadowOffset: cc.Size, shadowBlurRadius: integer): ccui.RichElementText +function RichElementText.create(tag, color, opacity, text, fontName, fontSize, flags, url, outlineColor, outlineSize, shadowColor, shadowOffset, shadowBlurRadius, glowColor) end + +---Initialize a RichElementText with various arguments. +--- +---@param tag integer # A integer tag value. +---@param color any # A color in Color3B. +---@param opacity integer # A opacity in GLubyte. +---@param text string # Content string. +---@param fontName string # Content font name. +---@param fontSize number # Content font size. +---@param flags integer # italics, bold, underline, strikethrough, url, outline, shadow or glow +---@param url string # uniform resource locator +---@param outlineColor any # the color of the outline +---@param outlineSize integer # the outline effect size value +---@param shadowColor any # the shadow effect color value +---@param shadowOffset cc.Size # shadow effect offset value +---@param shadowBlurRadius integer # the shadow effect blur radius +---@param glowColor any # glow color +---@return boolean # True if initialize success, false otherwise. +---@overload fun(self: ccui.RichElementText, tag: integer, color: any, opacity: integer, text: string, fontName: string, fontSize: number, flags: integer, url: string): boolean +---@overload fun(self: ccui.RichElementText, tag: integer, color: any, opacity: integer, text: string, fontName: string, fontSize: number, flags: integer, url: string, outlineColor: any): boolean +---@overload fun(self: ccui.RichElementText, tag: integer, color: any, opacity: integer, text: string, fontName: string, fontSize: number, flags: integer, url: string, outlineColor: any, outlineSize: integer): boolean +---@overload fun(self: ccui.RichElementText, tag: integer, color: any, opacity: integer, text: string, fontName: string, fontSize: number, flags: integer, url: string, outlineColor: any, outlineSize: integer, shadowColor: any): boolean +---@overload fun(self: ccui.RichElementText, tag: integer, color: any, opacity: integer, text: string, fontName: string, fontSize: number, flags: integer, url: string, outlineColor: any, outlineSize: integer, shadowColor: any, shadowOffset: cc.Size): boolean +---@overload fun(self: ccui.RichElementText, tag: integer, color: any, opacity: integer, text: string, fontName: string, fontSize: number, flags: integer, url: string, outlineColor: any, outlineSize: integer, shadowColor: any, shadowOffset: cc.Size, shadowBlurRadius: integer): boolean +function RichElementText:init(tag, color, opacity, text, fontName, fontSize, flags, url, outlineColor, outlineSize, shadowColor, shadowOffset, shadowBlurRadius, glowColor) end + +---Default constructor. +---\js ctor +---\lua new +---@return ccui.RichElementText +function RichElementText.new() end + +return RichElementText \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccui/RichText.lua b/addons/cclua/cocos2d/library/ccui/RichText.lua new file mode 100644 index 00000000..f5474939 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccui/RichText.lua @@ -0,0 +1,267 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccui.RichText + +---A container for displaying various RichElements. +---We could use it to display texts with images easily. +---@class ccui.RichText : ccui.Widget +---@field anchorFontColor string +---@field anchorFontColor3B any +---@field anchorTextBoldEnabled boolean +---@field anchorTextDelEnabled boolean +---@field anchorTextGlowColor3B any +---@field anchorTextGlowEnabled boolean +---@field anchorTextItalicEnabled boolean +---@field anchorTextOutlineColor3B any +---@field anchorTextOutlineEnabled boolean +---@field anchorTextOutlineSize integer +---@field anchorTextShadowBlurRadius integer +---@field anchorTextShadowColor3B any +---@field anchorTextShadowEnabled boolean +---@field anchorTextShadowOffset cc.Size +---@field anchorTextUnderlineEnabled boolean +---@field defaults any +---@field fontColor string +---@field fontColor3B any +---@field fontFace string +---@field fontSize number +---@field horizontalAlignment ccui.RichText.HorizontalAlignment +---@field wrapMode ccui.RichText.WrapMode +---@field KEY_ANCHOR_FONT_COLOR_STRING string +---@field KEY_ANCHOR_TEXT_BOLD string +---@field KEY_ANCHOR_TEXT_GLOW_COLOR string +---@field KEY_ANCHOR_TEXT_ITALIC string +---@field KEY_ANCHOR_TEXT_LINE string +---@field KEY_ANCHOR_TEXT_OUTLINE_COLOR string +---@field KEY_ANCHOR_TEXT_OUTLINE_SIZE string +---@field KEY_ANCHOR_TEXT_SHADOW_BLUR_RADIUS string +---@field KEY_ANCHOR_TEXT_SHADOW_COLOR string +---@field KEY_ANCHOR_TEXT_SHADOW_OFFSET_HEIGHT string +---@field KEY_ANCHOR_TEXT_SHADOW_OFFSET_WIDTH string +---@field KEY_ANCHOR_TEXT_STYLE string +---@field KEY_FONT_BIG string +---@field KEY_FONT_COLOR_STRING string +---@field KEY_FONT_FACE string +---@field KEY_FONT_SIZE string +---@field KEY_FONT_SMALL string +---@field KEY_HORIZONTAL_ALIGNMENT string +---@field KEY_TEXT_BOLD string +---@field KEY_TEXT_GLOW_COLOR string +---@field KEY_TEXT_ITALIC string +---@field KEY_TEXT_LINE string +---@field KEY_TEXT_OUTLINE_COLOR string +---@field KEY_TEXT_OUTLINE_SIZE string +---@field KEY_TEXT_SHADOW_BLUR_RADIUS string +---@field KEY_TEXT_SHADOW_COLOR string +---@field KEY_TEXT_SHADOW_OFFSET_HEIGHT string +---@field KEY_TEXT_SHADOW_OFFSET_WIDTH string +---@field KEY_TEXT_STYLE string +---@field KEY_URL string +---@field KEY_VERTICAL_SPACE string +---@field KEY_WRAP_MODE string +---@field VALUE_TEXT_LINE_DEL string +---@field VALUE_TEXT_LINE_NONE string +---@field VALUE_TEXT_LINE_UNDER string +---@field VALUE_TEXT_STYLE_GLOW string +---@field VALUE_TEXT_STYLE_NONE string +---@field VALUE_TEXT_STYLE_OUTLINE string +---@field VALUE_TEXT_STYLE_SHADOW string +local RichText = {} + +---@param color string +---@return any +function RichText:color3BWithString(color) end + +---Create a empty RichText. +--- +---@return ccui.RichText # RichText instance. +function RichText.create() end + +---Create a RichText from an XML +--- +---@return ccui.RichText # RichText instance. +---@param xml string +---@param defaults any +---@param handleOpenUrl ccui.RichText.OpenUrlHandler +---@overload fun(xml: string): ccui.RichText +---@overload fun(xml: string, defaults: any): ccui.RichText +function RichText.createWithXML(xml, defaults, handleOpenUrl) end + +---Rearrange all RichElement in the RichText. +---It's usually called internally. +function RichText:formatText() end + +---@return string +function RichText:getAnchorFontColor() end + +---@return any +function RichText:getAnchorFontColor3B() end + +---@return any +function RichText:getAnchorTextGlowColor3B() end + +---@return any +function RichText:getAnchorTextOutlineColor3B() end + +---@return integer +function RichText:getAnchorTextOutlineSize() end + +---@return integer +function RichText:getAnchorTextShadowBlurRadius() end + +---@return any +function RichText:getAnchorTextShadowColor3B() end + +---@return cc.Size +function RichText:getAnchorTextShadowOffset() end + +---@return any +function RichText:getDefaults() end + +---@return string +function RichText:getFontColor() end + +---@return any +function RichText:getFontColor3B() end + +---@return string +function RichText:getFontFace() end + +---@return number +function RichText:getFontSize() end + +---@return ccui.RichText.HorizontalAlignment +function RichText:getHorizontalAlignment() end + +---@return ccui.RichText.WrapMode +function RichText:getWrapMode() end + +---Insert a RichElement at a given index. +--- +---@param element ccui.RichElement # A RichElement type. +---@param index integer # A given index. +function RichText:insertElement(element, index) end + +---@return boolean +function RichText:isAnchorTextBoldEnabled() end + +---@return boolean +function RichText:isAnchorTextDelEnabled() end + +---@return boolean +function RichText:isAnchorTextGlowEnabled() end + +---@return boolean +function RichText:isAnchorTextItalicEnabled() end + +---@return boolean +function RichText:isAnchorTextOutlineEnabled() end + +---@return boolean +function RichText:isAnchorTextShadowEnabled() end + +---@return boolean +function RichText:isAnchorTextUnderlineEnabled() end + +---Default constructor. +---\js ctor +---\lua new +---@return ccui.RichText +function RichText.new() end + +---@param url string +function RichText:openUrl(url) end + +---Add a RichElement at the end of RichText. +--- +---@param element ccui.RichElement # A RichElement instance. +function RichText:pushBackElement(element) end + +---Remove a RichElement at a given index. +--- +---@param index integer # A integer index value. +--- +---Remove specific RichElement. +--- +---\param element A RichElement type. +---@overload fun(self: ccui.RichText, element: ccui.RichElement) +function RichText:removeElement(index) end + +---remove a callback to own tag. +---@param tag string # tag's name +function RichText.removeTagDescription(tag) end + +---@param color string +function RichText:setAnchorFontColor(color) end + +---@param enable boolean +function RichText:setAnchorTextBold(enable) end + +---@param enable boolean +function RichText:setAnchorTextDel(enable) end + +---@param enable boolean +---@param glowColor any +---@overload fun(self: ccui.RichText, enable: boolean) +function RichText:setAnchorTextGlow(enable, glowColor) end + +---@param enable boolean +function RichText:setAnchorTextItalic(enable) end + +---enable the outline of a-tag +---@param enable boolean +---@param outlineColor any +---@param outlineSize integer +---@overload fun(self: ccui.RichText, enable: boolean) +---@overload fun(self: ccui.RichText, enable: boolean, outlineColor: any) +function RichText:setAnchorTextOutline(enable, outlineColor, outlineSize) end + +---enable the shadow of a-tag +---@param enable boolean +---@param shadowColor any +---@param offset cc.Size +---@param blurRadius integer +---@overload fun(self: ccui.RichText, enable: boolean) +---@overload fun(self: ccui.RichText, enable: boolean, shadowColor: any) +---@overload fun(self: ccui.RichText, enable: boolean, shadowColor: any, offset: cc.Size) +function RichText:setAnchorTextShadow(enable, shadowColor, offset, blurRadius) end + +---@param enable boolean +function RichText:setAnchorTextUnderline(enable) end + +---@param defaults any +function RichText:setDefaults(defaults) end + +---@param color string +function RichText:setFontColor(color) end + +---@param face string +function RichText:setFontFace(face) end + +---@param size number +function RichText:setFontSize(size) end + +---@param a ccui.RichText.HorizontalAlignment +function RichText:setHorizontalAlignment(a) end + +---Asks the callback to open a resource specified by a URL. +---\discussion If you set up your own URL in the anchor tag, it is used to intercept the URL open. +---@param handleOpenUrl ccui.RichText.OpenUrlHandler # the callback +function RichText:setOpenUrlHandler(handleOpenUrl) end + +---Set vertical space between each RichElement. +--- +---@param space number # Point in float. +function RichText:setVerticalSpace(space) end + +---@param wrapMode ccui.RichText.WrapMode +function RichText:setWrapMode(wrapMode) end + +---@param color3b any +---@return string +function RichText:stringWithColor3B(color3b) end + +---@param color4b any +---@return string +function RichText:stringWithColor4B(color4b) end + +return RichText \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccui/RichText/HorizontalAlignment.lua b/addons/cclua/cocos2d/library/ccui/RichText/HorizontalAlignment.lua new file mode 100644 index 00000000..d9d3f223 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccui/RichText/HorizontalAlignment.lua @@ -0,0 +1,15 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccui.RichText.HorizontalAlignment + +---@type ccui.RichText.HorizontalAlignment +local VALUE + +--- +---@enum ccui.RichText.HorizontalAlignment +local HorizontalAlignment = { + CENTER = 1, + LEFT = 0, + RIGHT = 2, +} + +return HorizontalAlignment \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccui/RichText/OpenUrlHandler.lua b/addons/cclua/cocos2d/library/ccui/RichText/OpenUrlHandler.lua new file mode 100644 index 00000000..46115d5f --- /dev/null +++ b/addons/cclua/cocos2d/library/ccui/RichText/OpenUrlHandler.lua @@ -0,0 +1,14 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccui.RichText.OpenUrlHandler + +--- +--- +---std::function +---@class ccui.RichText.OpenUrlHandler +local OpenUrlHandler = {} + +---@return ccui.RichText.OpenUrlHandler + +function OpenUrlHandler:__call() end + +return OpenUrlHandler \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccui/RichText/WrapMode.lua b/addons/cclua/cocos2d/library/ccui/RichText/WrapMode.lua new file mode 100644 index 00000000..6b27d135 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccui/RichText/WrapMode.lua @@ -0,0 +1,14 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccui.RichText.WrapMode + +---@type ccui.RichText.WrapMode +local VALUE + +--- +---@enum ccui.RichText.WrapMode +local WrapMode = { + WRAP_PER_CHAR = 1, + WRAP_PER_WORD = 0, +} + +return WrapMode \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccui/Scale9Sprite.lua b/addons/cclua/cocos2d/library/ccui/Scale9Sprite.lua new file mode 100644 index 00000000..f09e8278 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccui/Scale9Sprite.lua @@ -0,0 +1,393 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccui.Scale9Sprite + +---A 9-slice sprite for cocos2d-x. +--- +---9-slice scaling allows you to specify how scaling is applied +---to specific areas of a sprite. With 9-slice scaling (3x3 grid), +---you can ensure that the sprite does not become distorted when +---scaled. +---Note: When you set _scale9Enabled to false, +---then you could call `scale9Sprite->getSprite()` to return the inner Sprite pointer. +---Then you could call any methods of Sprite class with the return pointers. +---@class ccui.Scale9Sprite : cc.Sprite +---@field capInsets cc.Rect Returns the Cap Insets +---@field insetBottom number Query the bottom sprite's cap inset.

\return The bottom sprite's cap inset. +---@field insetLeft number Query the left sprite's cap inset.

\return The left sprite's cap inset. +---@field insetRight number Query the right sprite's cap inset.

\return The right sprite's cap inset. +---@field insetTop number Query the top sprite's cap inset.

\return The top sprite's cap inset. +---@field originalSize cc.Size Query the sprite's original size.

\return Sprite size. +---@field preferredSize cc.Size Query the Scale9Sprite's preferred size.

\return Scale9Sprite's preferred size. +---@field renderingType ccui.Scale9Sprite.RenderingType Return the slice sprite rendering type. +---@field scale9Enabled boolean Query whether the Scale9Sprite is enable 9-slice or not.

\return True if 9-slice is enabled, false otherwise. \js NA +---@field sprite cc.Sprite Get the original no 9-sliced sprite

\return A sprite instance. +---@field state ccui.Scale9Sprite.State Query the current bright state. \return @see `State` \since v3.7 +local Scale9Sprite = {} + +---copies self to copy +---@param copy ccui.Scale9Sprite +function Scale9Sprite:copyTo(copy) end + +---Create an empty Scale9Sprite. +--- +---@return ccui.Scale9Sprite # A Scale9Sprite instance. +--- +---Creates a 9-slice sprite with a texture file, a delimitation zone and +---with the specified cap insets. +--- +---\see initWithFile(const char *file, const Rect& rect, const Rect& capInsets) +---\param file A texture file name. +---\param rect A delimitation zone. +---\param capInsets A specified cap insets. +---\return A Scale9Sprite instance. +---@overload fun(file: string, rect: cc.Rect, capInsets: cc.Rect): ccui.Scale9Sprite +--- +---Creates a 9-slice sprite with a texture file. The whole texture will be +---broken down into a 3×3 grid of equal blocks. +--- +---\see initWithFile(const Rect& capInsets, const char *file) +---\param capInsets A specified cap insets. +---\param file A texture file name. +---\return A Scale9Sprite instance. +---@overload fun(capInsets: cc.Rect, file: string): ccui.Scale9Sprite +--- +---Creates a 9-slice sprite with a texture file and a delimitation zone. The +---texture will be broken down into a 3×3 grid of equal blocks. +--- +---\see initWithFile(const char *file, const Rect& rect) +---\param file A texture file name. +---\param rect A delimitation zone. +---\return A Scale9Sprite instance. +---@overload fun(file: string, rect: cc.Rect): ccui.Scale9Sprite +--- +---Creates a 9-slice sprite with a texture file. The whole texture will be +---broken down into a 3×3 grid of equal blocks. +--- +---\see initWithFile(const char *file) +---\param file A texture file name. +---\return A Scale9Sprite instance. +---@overload fun(file: string): ccui.Scale9Sprite +function Scale9Sprite.create() end + +---Creates a 9-slice sprite with an sprite frame. +---Once the sprite is created, you can then call its "setContentSize:" method +---to resize the sprite will all it's 9-slice goodness interact. +---It respects the anchorPoint too. +--- +---\see initWithSpriteFrame(SpriteFrame *spriteFrame) +---@param spriteFrame cc.SpriteFrame # A sprite frame pointer. +---@return ccui.Scale9Sprite # A Scale9Sprite instance. +--- +---Creates a 9-slice sprite with an sprite frame and the centre of its zone. +---Once the sprite is created, you can then call its "setContentSize:" method +---to resize the sprite will all it's 9-slice goodness interact. +---It respects the anchorPoint too. +--- +---\see initWithSpriteFrame(SpriteFrame *spriteFrame, const Rect& capInsets) +---\param spriteFrame A sprite frame pointer. +---\param capInsets A delimitation zone. +---\return A Scale9Sprite instance. +---@overload fun(spriteFrame: cc.SpriteFrame, capInsets: cc.Rect): ccui.Scale9Sprite +function Scale9Sprite.createWithSpriteFrame(spriteFrame) end + +---Creates a 9-slice sprite with an sprite frame name. +---Once the sprite is created, you can then call its "setContentSize:" method +---to resize the sprite will all it's 9-slice goodness interact. +---It respects the anchorPoint too. +--- +---\see initWithSpriteFrameName(const char *spriteFrameName) +---@param spriteFrameName string # A sprite frame name. +---@return ccui.Scale9Sprite # A Scale9Sprite instance. +--- +---Creates a 9-slice sprite with an sprite frame name and the centre of its zone. +---Once the sprite is created, you can then call its "setContentSize:" method +---to resize the sprite will all it's 9-slice goodness interact. +---It respects the anchorPoint too. +--- +---\see initWithSpriteFrameName(const char *spriteFrameName, const Rect& capInsets) +---\param spriteFrameName A sprite frame name. +---\param capInsets A delimitation zone. +---\return A Scale9Sprite instance. +---@overload fun(spriteFrameName: string, capInsets: cc.Rect): ccui.Scale9Sprite +function Scale9Sprite.createWithSpriteFrameName(spriteFrameName) end + +---Returns the Cap Insets +---@return cc.Rect +function Scale9Sprite:getCapInsets() end + +---Query the bottom sprite's cap inset. +--- +---@return number # The bottom sprite's cap inset. +function Scale9Sprite:getInsetBottom() end + +---Query the left sprite's cap inset. +--- +---@return number # The left sprite's cap inset. +function Scale9Sprite:getInsetLeft() end + +---Query the right sprite's cap inset. +--- +---@return number # The right sprite's cap inset. +function Scale9Sprite:getInsetRight() end + +---Query the top sprite's cap inset. +--- +---@return number # The top sprite's cap inset. +function Scale9Sprite:getInsetTop() end + +---Query the sprite's original size. +--- +---@return cc.Size # Sprite size. +function Scale9Sprite:getOriginalSize() end + +---Query the Scale9Sprite's preferred size. +--- +---@return cc.Size # Scale9Sprite's preferred size. +function Scale9Sprite:getPreferredSize() end + +---Return the slice sprite rendering type. +---@return ccui.Scale9Sprite.RenderingType +function Scale9Sprite:getRenderingType() end + +---Get the original no 9-sliced sprite +--- +---@return cc.Sprite # A sprite instance. +function Scale9Sprite:getSprite() end + +---Query the current bright state. +---@return ccui.Scale9Sprite.State # @see `State` +---\since v3.7 +function Scale9Sprite:getState() end + +---@return boolean +--- +---Initializes a 9-slice sprite with an sprite instance. +---Once the sprite is created, you can then call its "setContentSize:" method +---to resize the sprite will all it's 9-slice goodness interact. +---It respects the anchorPoint too. +--- +---\param sprite The sprite instance. +---\param rect A delimitation zone. +---\param rotated Whether the sprite is rotated or not. +---\param capInsets The values to use for the cap insets. +---\return True if initializes success, false otherwise. +---@overload fun(self: ccui.Scale9Sprite, sprite: cc.Sprite, rect: cc.Rect, rotated: boolean, capInsets: cc.Rect): boolean +--- +---Initializes a 9-slice sprite with an sprite instance. +---Once the sprite is created, you can then call its "setContentSize:" method +---to resize the sprite will all it's 9-slice goodness interact. +---It respects the anchorPoint too. +--- +---\param sprite The sprite instance. +---\param rect A delimitation zone. +---\param capInsets The values to use for the cap insets. +---\return True if initializes success, false otherwise. +---@overload fun(self: ccui.Scale9Sprite, sprite: cc.Sprite, rect: cc.Rect, capInsets: cc.Rect): boolean +--- +---Initializes a 9-slice sprite with an sprite instance. +---Once the sprite is created, you can then call its "setContentSize:" method +---to resize the sprite will all it's 9-slice goodness interact. +---It respects the anchorPoint too. +--- +---\param sprite The sprite instance. +---\param rect A delimitation zone. +---\param rotated Whether the sprite is rotated or not. +---\param offset The offset when slice the sprite. +---\param originalSize The original size of sprite. +---\param capInsets The values to use for the cap insets. +---\return True if initializes success, false otherwise. +---@overload fun(self: ccui.Scale9Sprite, sprite: cc.Sprite, rect: cc.Rect, rotated: boolean, offset: cc.Vec2, originalSize: cc.Size, capInsets: cc.Rect): boolean +function Scale9Sprite:init() end + +---Initializes a 9-slice sprite with a texture file, a delimitation zone and +---with the specified cap insets. +---Once the sprite is created, you can then call its "setContentSize:" method +---to resize the sprite will all it's 9-slice goodness interact. +---It respects the anchorPoint too. +--- +---@param file string # The name of the texture file. +---@param rect cc.Rect # The rectangle that describes the sub-part of the texture that +---is the whole image. If the shape is the whole texture, set this to the +---texture's full rect. +---@param capInsets cc.Rect # The values to use for the cap insets. +---@return boolean # True if initialize success, false otherwise. +--- +---Initializes a 9-slice sprite with a texture file and with the specified cap +---insets. +---Once the sprite is created, you can then call its "setContentSize:" method +---to resize the sprite will all it's 9-slice goodness interact. +---It respects the anchorPoint too. +--- +---\param file The name of the texture file. +---\param capInsets The values to use for the cap insets. +---\return True if initializes success, false otherwise. +---@overload fun(self: ccui.Scale9Sprite, capInsets: cc.Rect, file: string): boolean +--- +---Initializes a 9-slice sprite with a texture file and a delimitation zone. The +---texture will be broken down into a 3×3 grid of equal blocks. +---Once the sprite is created, you can then call its "setContentSize:" method +---to resize the sprite will all it's 9-slice goodness interact. +---It respects the anchorPoint too. +--- +---\param file The name of the texture file. +---\param rect The rectangle that describes the sub-part of the texture that +---is the whole image. If the shape is the whole texture, set this to the +---texture's full rect. +---\return True if initializes success, false otherwise. +---@overload fun(self: ccui.Scale9Sprite, file: string, rect: cc.Rect): boolean +--- +---Initializes a 9-slice sprite with a texture file. The whole texture will be +---broken down into a 3×3 grid of equal blocks. +---Once the sprite is created, you can then call its "setContentSize:" method +---to resize the sprite will all it's 9-slice goodness interact. +---It respects the anchorPoint too. +--- +---\param file The name of the texture file. +---\return True if initializes success, false otherwise. +---@overload fun(self: ccui.Scale9Sprite, file: string): boolean +function Scale9Sprite:initWithFile(file, rect, capInsets) end + +---Initializes a 9-slice sprite with an sprite frame and with the specified +---cap insets. +---Once the sprite is created, you can then call its "setContentSize:" method +---to resize the sprite will all it's 9-slice goodness interact. +---It respects the anchorPoint too. +--- +---@param spriteFrame cc.SpriteFrame # The sprite frame object. +---@param capInsets cc.Rect # The values to use for the cap insets. +---@return boolean # True if initializes success, false otherwise. +--- +---Initializes a sprite with an SpriteFrame. The texture and rect in SpriteFrame will be applied on this sprite. +--- +---\param spriteFrame A SpriteFrame object. It should includes a valid texture and a rect. +---\return True if the sprite is initialized properly, false otherwise. +---@overload fun(self: ccui.Scale9Sprite, spriteFrame: cc.SpriteFrame): boolean +function Scale9Sprite:initWithSpriteFrame(spriteFrame, capInsets) end + +---Initializes a 9-slice sprite with an sprite frame name and with the specified +---cap insets. +---Once the sprite is created, you can then call its "setContentSize:" method +---to resize the sprite will all it's 9-slice goodness interact. +---It respects the anchorPoint too. +--- +---@param spriteFrameName string # The sprite frame name. +---@param capInsets cc.Rect # The values to use for the cap insets. +---@return boolean # True if initializes success, false otherwise. +--- +---Initializes a 9-slice sprite with an sprite frame name. +---Once the sprite is created, you can then call its "setContentSize:" method +---to resize the sprite will all it's 9-slice goodness interact. +---It respects the anchorPoint too. +--- +---\param spriteFrameName The sprite frame name. +---\return True if initializes success, false otherwise. +---@overload fun(self: ccui.Scale9Sprite, spriteFrameName: string): boolean +function Scale9Sprite:initWithSpriteFrameName(spriteFrameName, capInsets) end + +---Query whether the Scale9Sprite is enable 9-slice or not. +--- +---@return boolean # True if 9-slice is enabled, false otherwise. +---\js NA +function Scale9Sprite:isScale9Enabled() end + +---Default constructor. +---\js ctor +---\lua new +---@return ccui.Scale9Sprite +function Scale9Sprite.new() end + +function Scale9Sprite:resetRender() end + +---Creates and returns a new sprite object with the specified cap insets. +---You use this method to add cap insets to a sprite or to change the existing +---cap insets of a sprite. In both cases, you get back a new image and the +---original sprite remains untouched. +--- +---@param capInsets cc.Rect # The values to use for the cap insets. +---@return ccui.Scale9Sprite # A Scale9Sprite instance. +function Scale9Sprite:resizableSpriteWithCapInsets(capInsets) end + +---Set the Cap Insets in Points using the untrimmed size as reference +---@param insets cc.Rect +function Scale9Sprite:setCapInsets(insets) end + +---Change the bottom sprite's cap inset. +--- +---@param bottomInset number # The values to use for the cap inset. +function Scale9Sprite:setInsetBottom(bottomInset) end + +---Change the left sprite's cap inset. +--- +---@param leftInset number # The values to use for the cap inset. +function Scale9Sprite:setInsetLeft(leftInset) end + +---Change the right sprite's cap inset. +--- +---@param rightInset number # The values to use for the cap inset. +function Scale9Sprite:setInsetRight(rightInset) end + +---Change the top sprite's cap inset. +--- +---@param topInset number # The values to use for the cap inset. +function Scale9Sprite:setInsetTop(topInset) end + +---Change the preferred size of Scale9Sprite. +--- +---@param size cc.Size # A delimitation zone. +function Scale9Sprite:setPreferredSize(size) end + +---Set the slice sprite rendering type. +---When setting to SIMPLE, only 4 vertexes is used to rendering. +---otherwise 16 vertexes will be used to rendering. +---\see RenderingType +---@param type ccui.Scale9Sprite.RenderingType +function Scale9Sprite:setRenderingType(type) end + +---Toggle 9-slice feature. +---If Scale9Sprite is 9-slice disabled, the Scale9Sprite will rendered as a normal sprite. +---\warning: Don't use setScale9Enabled(false), use setRenderingType(RenderingType::SIMPLE) instead. +---The setScale9Enabled(false) is kept only for back back compatibility. +---@param enabled boolean # True to enable 9-slice, false otherwise. +---\js NA +function Scale9Sprite:setScale9Enabled(enabled) end + +---Change inner sprite's sprite frame. +--- +---@param spriteFrame cc.SpriteFrame # A sprite frame pointer. +---@param capInsets cc.Rect # The values to use for the cap insets. +--- +---\{ +---Sets a new SpriteFrame to the Sprite. +---@overload fun(self: ccui.Scale9Sprite, spriteFrameName: string) +---@overload fun(self: ccui.Scale9Sprite, newFrame: cc.SpriteFrame) +function Scale9Sprite:setSpriteFrame(spriteFrame, capInsets) end + +---Change the state of 9-slice sprite. +---\see `State` +---@param state ccui.Scale9Sprite.State # A enum value in State. +---\since v3.4 +function Scale9Sprite:setState(state) end + +---Update Scale9Sprite with a specified sprite. +--- +---@param sprite cc.Sprite # A sprite pointer. +---@param rect cc.Rect # A delimitation zone. +---@param rotated boolean # Whether the sprite is rotated or not. +---@param capInsets cc.Rect # The Values to use for the cap insets. +---@return boolean # True if update success, false otherwise. +---\js NA +--- +---Update Scale9Sprite with a specified sprite. +--- +---\param sprite A sprite pointer. +---\param rect A delimitation zone. +---\param rotated Whether the sprite is rotated or not. +---\param offset The offset when slice the sprite. +---\param originalSize The original size of the sprite. +---\param capInsets The Values to use for the cap insets. +---\return True if update success, false otherwise. +---\js NA +---@overload fun(self: ccui.Scale9Sprite, sprite: cc.Sprite, rect: cc.Rect, rotated: boolean, offset: cc.Vec2, originalSize: cc.Size, capInsets: cc.Rect): boolean +function Scale9Sprite:updateWithSprite(sprite, rect, rotated, capInsets) end + +return Scale9Sprite \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccui/Scale9Sprite/RenderingType.lua b/addons/cclua/cocos2d/library/ccui/Scale9Sprite/RenderingType.lua new file mode 100644 index 00000000..ad7e66ea --- /dev/null +++ b/addons/cclua/cocos2d/library/ccui/Scale9Sprite/RenderingType.lua @@ -0,0 +1,14 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccui.Scale9Sprite.RenderingType + +---@type ccui.Scale9Sprite.RenderingType +local VALUE + +--- +---@enum ccui.Scale9Sprite.RenderingType +local RenderingType = { + SIMPLE = 0, + SLICE = 1, +} + +return RenderingType \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccui/Scale9Sprite/State.lua b/addons/cclua/cocos2d/library/ccui/Scale9Sprite/State.lua new file mode 100644 index 00000000..60060f17 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccui/Scale9Sprite/State.lua @@ -0,0 +1,14 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccui.Scale9Sprite.State + +---@type ccui.Scale9Sprite.State +local VALUE + +--- +---@enum ccui.Scale9Sprite.State +local State = { + GRAY = 1, + NORMAL = 0, +} + +return State \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccui/ScrollView.lua b/addons/cclua/cocos2d/library/ccui/ScrollView.lua new file mode 100644 index 00000000..e1fa34f0 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccui/ScrollView.lua @@ -0,0 +1,333 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccui.ScrollView + +---Layout container for a view hierarchy that can be scrolled by the user, allowing it to be larger than the physical display. +---It holds a inner `Layout` container for storing child items horizontally or vertically. +---@class ccui.ScrollView : ccui.Layout +---@field autoScrolling boolean * @return Whether the ScrollView is currently scrolling because of a bounceback or inertia slowdown. +---@field bounceEnabled boolean Query bounce state.

\return True if bounce is enabled, false otherwise. +---@field direction ccui.ScrollView.Direction Query scroll direction of scrollview.

\see `Direction` Direction::VERTICAL means vertical scroll, Direction::HORIZONTAL means horizontal scroll

\return Scrollview scroll direction. +---@field inertiaScrollEnabled boolean Query inertia scroll state.

\return True if inertia is enabled, false otherwise. +---@field innerContainer ccui.Layout Get inner container of scrollview.

Inner container is a child of scrollview.

\return Inner container pointer. +---@field innerContainerPosition cc.Vec2 Get inner container position

\return The inner container position. +---@field innerContainerSize cc.Size Get inner container size of scrollview.

Inner container size must be larger than or equal scrollview's size.

\return The inner container size. +---@field scrollBarAutoHideEnabled boolean Query scroll bar auto hide state

\return True if scroll bar auto hide is enabled, false otherwise. +---@field scrollBarAutoHideTime number Get the scroll bar's auto hide time

\return the scroll bar's auto hide time +---@field scrollBarColor any Get the scroll bar's color

\return the scroll bar's color +---@field scrollBarEnabled boolean Query scroll bar state.

\return True if scroll bar is enabled, false otherwise. +---@field scrollBarOpacity integer Get the scroll bar's opacity

\return the scroll bar's opacity +---@field scrollBarPositionFromCornerForHorizontal cc.Vec2 Get the horizontal scroll bar's position from right-top corner.

\return positionFromCorner +---@field scrollBarPositionFromCornerForVertical cc.Vec2 Get the vertical scroll bar's position from right-top corner.

\return positionFromCorner +---@field scrollBarWidth number Get the scroll bar's width

\return the scroll bar's width +---@field scrolledPercentBothDirection cc.Vec2 * @return How far the scroll view is scrolled in both axes, combined as a Vec2 +---@field scrolledPercentHorizontal number * @return How far the scroll view is scrolled in the horizontal axis +---@field scrolledPercentVertical number * @return How far the scroll view is scrolled in the vertical axis +---@field scrolling boolean * @return Whether the user is currently dragging the ScrollView to scroll it +---@field touchTotalTimeThreshold number Get the touch total time threshold

\return the touch total time threshold +local ScrollView = {} + +---Add callback function which will be called when scrollview event triggered. +---@param callback ccui.ScrollView.ccScrollViewCallback # A callback function with type of `ccScrollViewCallback`. +function ScrollView:addEventListener(callback) end + +---Create an empty ScrollView. +---@return ccui.ScrollView # A ScrollView instance. +function ScrollView.create() end + +---@return cc.Ref +function ScrollView.createInstance() end + +---Query scroll direction of scrollview. +--- +---\see `Direction` Direction::VERTICAL means vertical scroll, Direction::HORIZONTAL means horizontal scroll +--- +---@return ccui.ScrollView.Direction # Scrollview scroll direction. +function ScrollView:getDirection() end + +---Get inner container of scrollview. +--- +---Inner container is a child of scrollview. +--- +---@return ccui.Layout # Inner container pointer. +function ScrollView:getInnerContainer() end + +---Get inner container position +--- +---@return cc.Vec2 # The inner container position. +function ScrollView:getInnerContainerPosition() end + +---Get inner container size of scrollview. +--- +---Inner container size must be larger than or equal scrollview's size. +--- +---@return cc.Size # The inner container size. +function ScrollView:getInnerContainerSize() end + +---Get the scroll bar's auto hide time +--- +---@return number # the scroll bar's auto hide time +function ScrollView:getScrollBarAutoHideTime() end + +---Get the scroll bar's color +--- +---@return any # the scroll bar's color +function ScrollView:getScrollBarColor() end + +---Get the scroll bar's opacity +--- +---@return integer # the scroll bar's opacity +function ScrollView:getScrollBarOpacity() end + +---Get the horizontal scroll bar's position from right-top corner. +--- +---@return cc.Vec2 # positionFromCorner +function ScrollView:getScrollBarPositionFromCornerForHorizontal() end + +---Get the vertical scroll bar's position from right-top corner. +--- +---@return cc.Vec2 # positionFromCorner +function ScrollView:getScrollBarPositionFromCornerForVertical() end + +---Get the scroll bar's width +--- +---@return number # the scroll bar's width +function ScrollView:getScrollBarWidth() end + +--- * @return How far the scroll view is scrolled in both axes, combined as a Vec2 +---@return cc.Vec2 +function ScrollView:getScrolledPercentBothDirection() end + +--- * @return How far the scroll view is scrolled in the horizontal axis +---@return number +function ScrollView:getScrolledPercentHorizontal() end + +--- * @return How far the scroll view is scrolled in the vertical axis +---@return number +function ScrollView:getScrolledPercentVertical() end + +---Get the touch total time threshold +--- +---@return number # the touch total time threshold +function ScrollView:getTouchTotalTimeThreshold() end + +--- * @return Whether the ScrollView is currently scrolling because of a bounceback or inertia slowdown. +---@return boolean +function ScrollView:isAutoScrolling() end + +---Query bounce state. +--- +---@return boolean # True if bounce is enabled, false otherwise. +function ScrollView:isBounceEnabled() end + +---Query inertia scroll state. +--- +---@return boolean # True if inertia is enabled, false otherwise. +function ScrollView:isInertiaScrollEnabled() end + +---Query scroll bar auto hide state +--- +---@return boolean # True if scroll bar auto hide is enabled, false otherwise. +function ScrollView:isScrollBarAutoHideEnabled() end + +---Query scroll bar state. +--- +---@return boolean # True if scroll bar is enabled, false otherwise. +function ScrollView:isScrollBarEnabled() end + +--- * @return Whether the user is currently dragging the ScrollView to scroll it +---@return boolean +function ScrollView:isScrolling() end + +---Move inner container to bottom boundary of scrollview. +function ScrollView:jumpToBottom() end + +---Move inner container to bottom and left boundary of scrollview. +function ScrollView:jumpToBottomLeft() end + +---Move inner container to bottom and right boundary of scrollview. +function ScrollView:jumpToBottomRight() end + +---Move inner container to left boundary of scrollview. +function ScrollView:jumpToLeft() end + +---Move inner container to both direction percent position of scrollview. +---@param percent cc.Vec2 # A value between 0 and 100. +function ScrollView:jumpToPercentBothDirection(percent) end + +---Move inner container to horizontal percent position of scrollview. +---@param percent number # A value between 0 and 100. +function ScrollView:jumpToPercentHorizontal(percent) end + +---Move inner container to vertical percent position of scrollview. +---@param percent number # A value between 0 and 100. +function ScrollView:jumpToPercentVertical(percent) end + +---Move inner container to right boundary of scrollview. +function ScrollView:jumpToRight() end + +---Move inner container to top boundary of scrollview. +function ScrollView:jumpToTop() end + +---Move inner container to top and left boundary of scrollview. +function ScrollView:jumpToTopLeft() end + +---Move inner container to top and right boundary of scrollview. +function ScrollView:jumpToTopRight() end + +---Default constructor +---\js ctor +---\lua new +---@return ccui.ScrollView +function ScrollView.new() end + +---Scroll inner container to bottom boundary of scrollview. +---@param timeInSec number # Time in seconds. +---@param attenuated boolean # Whether scroll speed attenuate or not. +function ScrollView:scrollToBottom(timeInSec, attenuated) end + +---Scroll inner container to bottom and left boundary of scrollview. +---@param timeInSec number # Time in seconds. +---@param attenuated boolean # Whether scroll speed attenuate or not. +function ScrollView:scrollToBottomLeft(timeInSec, attenuated) end + +---Scroll inner container to bottom and right boundary of scrollview. +---@param timeInSec number # Time in seconds +---@param attenuated boolean # Whether scroll speed attenuate or not. +function ScrollView:scrollToBottomRight(timeInSec, attenuated) end + +---Scroll inner container to left boundary of scrollview. +---@param timeInSec number # Time in seconds. +---@param attenuated boolean # Whether scroll speed attenuate or not. +function ScrollView:scrollToLeft(timeInSec, attenuated) end + +---Scroll inner container to both direction percent position of scrollview. +---@param percent cc.Vec2 # A value between 0 and 100. +---@param timeInSec number # Time in seconds. +---@param attenuated boolean # Whether scroll speed attenuate or not. +function ScrollView:scrollToPercentBothDirection(percent, timeInSec, attenuated) end + +---Scroll inner container to horizontal percent position of scrollview. +---@param percent number # A value between 0 and 100. +---@param timeInSec number # Time in seconds. +---@param attenuated boolean # Whether scroll speed attenuate or not. +function ScrollView:scrollToPercentHorizontal(percent, timeInSec, attenuated) end + +---Scroll inner container to vertical percent position of scrollview. +---@param percent number # A value between 0 and 100. +---@param timeInSec number # Time in seconds. +---@param attenuated boolean # Whether scroll speed attenuate or not. +function ScrollView:scrollToPercentVertical(percent, timeInSec, attenuated) end + +---Scroll inner container to right boundary of scrollview. +---@param timeInSec number # Time in seconds. +---@param attenuated boolean # Whether scroll speed attenuate or not. +function ScrollView:scrollToRight(timeInSec, attenuated) end + +---Scroll inner container to top boundary of scrollview. +---@param timeInSec number # Time in seconds. +---@param attenuated boolean # Whether scroll speed attenuate or not. +function ScrollView:scrollToTop(timeInSec, attenuated) end + +---Scroll inner container to top and left boundary of scrollview. +---@param timeInSec number # Time in seconds. +---@param attenuated boolean # Whether scroll speed attenuate or not. +function ScrollView:scrollToTopLeft(timeInSec, attenuated) end + +---Scroll inner container to top and right boundary of scrollview. +---@param timeInSec number # Time in seconds. +---@param attenuated boolean # Whether scroll speed attenuate or not. +function ScrollView:scrollToTopRight(timeInSec, attenuated) end + +---Toggle bounce enabled when scroll to the edge. +--- +---@param enabled boolean # True if enable bounce, false otherwise. +function ScrollView:setBounceEnabled(enabled) end + +---Changes scroll direction of scrollview. +--- +---\see `Direction` +---@param dir ccui.ScrollView.Direction # Scroll direction enum. +function ScrollView:setDirection(dir) end + +---Toggle whether enable scroll inertia while scrolling. +--- +---@param enabled boolean # True if enable inertia, false otherwise. +function ScrollView:setInertiaScrollEnabled(enabled) end + +---Set inner container position +--- +---@param pos cc.Vec2 # Inner container position. +function ScrollView:setInnerContainerPosition(pos) end + +---Change inner container size of scrollview. +--- +---Inner container size must be larger than or equal scrollview's size. +--- +---@param size cc.Size # Inner container size. +function ScrollView:setInnerContainerSize(size) end + +---Set scroll bar auto hide state +--- +---\param scroll bar auto hide state +---@param autoHideEnabled boolean +function ScrollView:setScrollBarAutoHideEnabled(autoHideEnabled) end + +---Set scroll bar auto hide time +--- +---\param scroll bar auto hide time +---@param autoHideTime number +function ScrollView:setScrollBarAutoHideTime(autoHideTime) end + +---Set the scroll bar's color +--- +---\param the scroll bar's color +---@param color any +function ScrollView:setScrollBarColor(color) end + +---Toggle scroll bar enabled. +--- +---@param enabled boolean # True if enable scroll bar, false otherwise. +function ScrollView:setScrollBarEnabled(enabled) end + +---Set the scroll bar's opacity +--- +---\param the scroll bar's opacity +---@param opacity integer +function ScrollView:setScrollBarOpacity(opacity) end + +---Set the scroll bar positions from the left-bottom corner (horizontal) and right-top corner (vertical). +--- +---@param positionFromCorner cc.Vec2 # The position from the left-bottom corner (horizontal) and right-top corner (vertical). +function ScrollView:setScrollBarPositionFromCorner(positionFromCorner) end + +---Set the horizontal scroll bar position from left-bottom corner. +--- +---@param positionFromCorner cc.Vec2 # The position from left-bottom corner +function ScrollView:setScrollBarPositionFromCornerForHorizontal(positionFromCorner) end + +---Set the vertical scroll bar position from right-top corner. +--- +---@param positionFromCorner cc.Vec2 # The position from right-top corner +function ScrollView:setScrollBarPositionFromCornerForVertical(positionFromCorner) end + +---Set the scroll bar's width +--- +---@param width number # The scroll bar's width +function ScrollView:setScrollBarWidth(width) end + +---Set the touch total time threshold +--- +---\param the touch total time threshold +---@param touchTotalTimeThreshold number +function ScrollView:setTouchTotalTimeThreshold(touchTotalTimeThreshold) end + +---Immediately stops inner container scroll initiated by any of the "scrollTo*" member functions +function ScrollView:stopAutoScroll() end + +---Immediately stops inner container scroll if any. +function ScrollView:stopOverallScroll() end + +---Immediately stops inner container scroll (auto scrolling is not affected). +function ScrollView:stopScroll() end + +return ScrollView \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccui/ScrollView/Direction.lua b/addons/cclua/cocos2d/library/ccui/ScrollView/Direction.lua new file mode 100644 index 00000000..d663388f --- /dev/null +++ b/addons/cclua/cocos2d/library/ccui/ScrollView/Direction.lua @@ -0,0 +1,16 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccui.ScrollView.Direction + +---@type ccui.ScrollView.Direction +local VALUE + +--- +---@enum ccui.ScrollView.Direction +local Direction = { + BOTH = 3, + HORIZONTAL = 2, + NONE = 0, + VERTICAL = 1, +} + +return Direction \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccui/ScrollView/EventType.lua b/addons/cclua/cocos2d/library/ccui/ScrollView/EventType.lua new file mode 100644 index 00000000..ad02f79a --- /dev/null +++ b/addons/cclua/cocos2d/library/ccui/ScrollView/EventType.lua @@ -0,0 +1,25 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccui.ScrollView.EventType + +---@type ccui.ScrollView.EventType +local VALUE + +--- +---@enum ccui.ScrollView.EventType +local EventType = { + AUTOSCROLL_ENDED = 12, + BOUNCE_BOTTOM = 6, + BOUNCE_LEFT = 7, + BOUNCE_RIGHT = 8, + BOUNCE_TOP = 5, + CONTAINER_MOVED = 9, + SCROLLING = 4, + SCROLLING_BEGAN = 10, + SCROLLING_ENDED = 11, + SCROLL_TO_BOTTOM = 1, + SCROLL_TO_LEFT = 2, + SCROLL_TO_RIGHT = 3, + SCROLL_TO_TOP = 0, +} + +return EventType \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccui/ScrollView/ccScrollViewCallback.lua b/addons/cclua/cocos2d/library/ccui/ScrollView/ccScrollViewCallback.lua new file mode 100644 index 00000000..d334ab38 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccui/ScrollView/ccScrollViewCallback.lua @@ -0,0 +1,14 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccui.ScrollView.ccScrollViewCallback + +--- +--- +---std::function +---@class ccui.ScrollView.ccScrollViewCallback +local ccScrollViewCallback = {} + +---@return ccui.ScrollView.ccScrollViewCallback + +function ccScrollViewCallback:__call() end + +return ccScrollViewCallback \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccui/ScrollViewBar.lua b/addons/cclua/cocos2d/library/ccui/ScrollViewBar.lua new file mode 100644 index 00000000..950870b7 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccui/ScrollViewBar.lua @@ -0,0 +1,80 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccui.ScrollViewBar + +---Scroll bar being attached to ScrollView layout container. +---@class ccui.ScrollViewBar : cc.ProtectedNode +---@field autoHideEnabled boolean Query scroll bar auto hide state

\return True if scroll bar auto hide is enabled, false otherwise. +---@field autoHideTime number Get the scroll bar's auto hide time

\return the scroll bar's auto hide time +---@field positionFromCorner cc.Vec2 Get the scroll bar position from the left-bottom corner (horizontal) or right-top corner (vertical).

\return positionFromCorner +---@field width number Get the scroll bar's width

\return the scroll bar's width +local ScrollViewBar = {} + +---Create a scroll bar with its parent scroll view and direction. +---@return ccui.ScrollViewBar # A scroll bar instance. +---@param parent ccui.ScrollView +---@param direction ccui.ScrollView.Direction +function ScrollViewBar.create(parent, direction) end + +---Get the scroll bar's auto hide time +--- +---@return number # the scroll bar's auto hide time +function ScrollViewBar:getAutoHideTime() end + +---Get the scroll bar position from the left-bottom corner (horizontal) or right-top corner (vertical). +--- +---@return cc.Vec2 # positionFromCorner +function ScrollViewBar:getPositionFromCorner() end + +---Get the scroll bar's width +--- +---@return number # the scroll bar's width +function ScrollViewBar:getWidth() end + +---Query scroll bar auto hide state +--- +---@return boolean # True if scroll bar auto hide is enabled, false otherwise. +function ScrollViewBar:isAutoHideEnabled() end + +---Default constructor +---\js ctor +---\lua new +---@param parent ccui.ScrollView +---@param direction ccui.ScrollView.Direction +---@return ccui.ScrollViewBar +function ScrollViewBar.new(parent, direction) end + +---This is called by parent ScrollView when the parent is scrolled. Don't call this directly. +--- +---\param amount how much the inner container of ScrollView is out of boundary +---@param outOfBoundary cc.Vec2 +function ScrollViewBar:onScrolled(outOfBoundary) end + +---This is called by parent ScrollView when a touch is began. Don't call this directly. +function ScrollViewBar:onTouchBegan() end + +---This is called by parent ScrollView when a touch is ended. Don't call this directly. +function ScrollViewBar:onTouchEnded() end + +---Set scroll bar auto hide state +--- +---\param scroll bar auto hide state +---@param autoHideEnabled boolean +function ScrollViewBar:setAutoHideEnabled(autoHideEnabled) end + +---Set scroll bar auto hide time +--- +---\param scroll bar auto hide time +---@param autoHideTime number +function ScrollViewBar:setAutoHideTime(autoHideTime) end + +---Set the scroll bar position from the left-bottom corner (horizontal) or right-top corner (vertical). +--- +---@param positionFromCorner cc.Vec2 # The position from the left-bottom corner (horizontal) or right-top corner (vertical). +function ScrollViewBar:setPositionFromCorner(positionFromCorner) end + +---Set the scroll bar's width +--- +---@param width number # The scroll bar's width +function ScrollViewBar:setWidth(width) end + +return ScrollViewBar \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccui/Slider.lua b/addons/cclua/cocos2d/library/ccui/Slider.lua new file mode 100644 index 00000000..1435cac1 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccui/Slider.lua @@ -0,0 +1,194 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccui.Slider + +---UI Slider widget. +---@class ccui.Slider : ccui.Widget +---@field backFile cc.ResourceData +---@field ballDisabledFile cc.ResourceData +---@field ballNormalFile cc.ResourceData +---@field ballPressedFile cc.ResourceData +---@field capInsetsBarRenderer cc.Rect Gets capinsets for bar slider, if slider is using scale9 renderer. \return capInsets Capinsets for bar slider. +---@field capInsetsProgressBarRenderer cc.Rect Gets capinsets for progress bar slider, if slider is using scale9 renderer. \return Capinsets for progress bar slider. \js NA +---@field maxPercent integer Query the maximum percent of Slider. The default value is 100. \since v3.7 \return The maximum percent of the Slider. +---@field percent integer Gets the progress direction of slider.

\return percent Percent value from 1 to 100. +---@field progressBarFile cc.ResourceData +---@field scale9Enabled boolean Gets If slider is using scale9 renderer. \return True that using scale9 renderer, false otherwise. +---@field slidBallDisabledRenderer cc.Sprite +---@field slidBallNormalRenderer cc.Sprite +---@field slidBallPressedRenderer cc.Sprite +---@field slidBallRenderer cc.Node +---@field zoomScale number Return a zoom scale \since v3.3 +local Slider = {} + +---Add call back function called when slider's percent has changed to slider. +--- +---@param callback ccui.Slider.ccSliderCallback # An given call back function called when slider's percent has changed to slider. +function Slider:addEventListener(callback) end + +---Create a slider widget. +--- +---@return ccui.Slider # An autoreleased Slider object. +--- +---Create a slider widget with bar texture, ball texture and texture resource type. +--- +---\param barTextureName Bar texture file name. +---\param normalBallTextureName Ball texture file name. +---\param resType Texture resource type. +---\return An autoreleased Slider object. +---@overload fun(barTextureName: string, normalBallTextureName: string, resType: ccui.Widget.TextureResType): ccui.Slider +--- +---Create a slider widget with bar texture, ball texture and texture resource type. +--- +---\param barTextureName Bar texture file name. +---\param normalBallTextureName Ball texture file name. +---\param resType Texture resource type. +---\return An autoreleased Slider object. +---@overload fun(barTextureName: string, normalBallTextureName: string): ccui.Slider +function Slider.create() end + +---@return cc.Ref +function Slider.createInstance() end + +---@return cc.ResourceData +function Slider:getBackFile() end + +---@return cc.ResourceData +function Slider:getBallDisabledFile() end + +---@return cc.ResourceData +function Slider:getBallNormalFile() end + +---@return cc.ResourceData +function Slider:getBallPressedFile() end + +---Gets capinsets for bar slider, if slider is using scale9 renderer. +---@return cc.Rect # capInsets Capinsets for bar slider. +function Slider:getCapInsetsBarRenderer() end + +---Gets capinsets for progress bar slider, if slider is using scale9 renderer. +---@return cc.Rect # Capinsets for progress bar slider. +---\js NA +function Slider:getCapInsetsProgressBarRenderer() end + +---Query the maximum percent of Slider. The default value is 100. +---\since v3.7 +---@return integer # The maximum percent of the Slider. +function Slider:getMaxPercent() end + +---Gets the progress direction of slider. +--- +---@return integer # percent Percent value from 1 to 100. +function Slider:getPercent() end + +---@return cc.ResourceData +function Slider:getProgressBarFile() end + +---@return cc.Sprite +function Slider:getSlidBallDisabledRenderer() end + +---@return cc.Sprite +function Slider:getSlidBallNormalRenderer() end + +---@return cc.Sprite +function Slider:getSlidBallPressedRenderer() end + +---@return cc.Node +function Slider:getSlidBallRenderer() end + +---Return a zoom scale +---\since v3.3 +---@return number +function Slider:getZoomScale() end + +---Gets If slider is using scale9 renderer. +---@return boolean # True that using scale9 renderer, false otherwise. +function Slider:isScale9Enabled() end + +---Load texture for slider bar. +--- +---@param fileName string # File name of texture. +---@param resType ccui.Widget.TextureResType # @see TextureResType . +---@overload fun(self: ccui.Slider, fileName: string) +function Slider:loadBarTexture(fileName, resType) end + +---Load dark state texture for slider progress bar. +--- +---@param fileName string # File path of texture. +---@param resType ccui.Widget.TextureResType # @see TextureResType . +---@overload fun(self: ccui.Slider, fileName: string) +function Slider:loadProgressBarTexture(fileName, resType) end + +---Load disabled state texture for slider ball. +--- +---@param disabled string # Disabled state texture. +---@param resType ccui.Widget.TextureResType # @see TextureResType . +---@overload fun(self: ccui.Slider, disabled: string) +function Slider:loadSlidBallTextureDisabled(disabled, resType) end + +---Load normal state texture for slider ball. +--- +---@param normal string # Normal state texture. +---@param resType ccui.Widget.TextureResType # @see TextureResType . +---@overload fun(self: ccui.Slider, normal: string) +function Slider:loadSlidBallTextureNormal(normal, resType) end + +---Load pressed state texture for slider ball. +--- +---@param pressed string # Pressed state texture. +---@param resType ccui.Widget.TextureResType # @see TextureResType . +---@overload fun(self: ccui.Slider, pressed: string) +function Slider:loadSlidBallTexturePressed(pressed, resType) end + +---Load textures for slider ball. +--- +---@param normal string # Normal state texture. +---@param pressed string # Pressed state texture. +---@param disabled string # Disabled state texture. +---@param texType ccui.Widget.TextureResType # @see TextureResType . +---@overload fun(self: ccui.Slider, normal: string) +---@overload fun(self: ccui.Slider, normal: string, pressed: string) +---@overload fun(self: ccui.Slider, normal: string, pressed: string, disabled: string) +function Slider:loadSlidBallTextures(normal, pressed, disabled, texType) end + +---Default constructor. +---\js ctor +---\lua new +---@return ccui.Slider +function Slider.new() end + +---Sets capinsets for progress bar slider, if slider is using scale9 renderer. +---@param capInsets cc.Rect # Capinsets for progress bar slider. +---\js NA +function Slider:setCapInsetProgressBarRenderer(capInsets) end + +---Sets capinsets for slider, if slider is using scale9 renderer. +---@param capInsets cc.Rect # Capinsets for slider. +function Slider:setCapInsets(capInsets) end + +---Sets capinsets for bar slider, if slider is using scale9 renderer. +---@param capInsets cc.Rect # Capinsets for bar slider. +function Slider:setCapInsetsBarRenderer(capInsets) end + +---Set a large value could give more control to the precision. +---\since v3.7 +---@param percent integer # The max percent of Slider. +function Slider:setMaxPercent(percent) end + +---Changes the progress direction of slider. +---@param percent integer # Percent value from 1 to 100. +function Slider:setPercent(percent) end + +---Sets if slider is using scale9 renderer. +---@param able boolean # True that using scale9 renderer, false otherwise. +function Slider:setScale9Enabled(able) end + +---When user pressed the button, the button will zoom to a scale. +---The final scale of the button equals (button original scale + _zoomScale) +---\since v3.3 +---@param scale number +function Slider:setZoomScale(scale) end + +---Updates the visual elements of the slider. +function Slider:updateVisualSlider() end + +return Slider \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccui/Slider/EventType.lua b/addons/cclua/cocos2d/library/ccui/Slider/EventType.lua new file mode 100644 index 00000000..3f620fb8 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccui/Slider/EventType.lua @@ -0,0 +1,16 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccui.Slider.EventType + +---@type ccui.Slider.EventType +local VALUE + +--- +---@enum ccui.Slider.EventType +local EventType = { + ON_PERCENTAGE_CHANGED = 0, + ON_SLIDEBALL_CANCEL = 3, + ON_SLIDEBALL_DOWN = 1, + ON_SLIDEBALL_UP = 2, +} + +return EventType \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccui/Slider/ccSliderCallback.lua b/addons/cclua/cocos2d/library/ccui/Slider/ccSliderCallback.lua new file mode 100644 index 00000000..3eef383b --- /dev/null +++ b/addons/cclua/cocos2d/library/ccui/Slider/ccSliderCallback.lua @@ -0,0 +1,14 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccui.Slider.ccSliderCallback + +--- +--- +---std::function +---@class ccui.Slider.ccSliderCallback +local ccSliderCallback = {} + +---@return ccui.Slider.ccSliderCallback + +function ccSliderCallback:__call() end + +return ccSliderCallback \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccui/TabControl.lua b/addons/cclua/cocos2d/library/ccui/TabControl.lua new file mode 100644 index 00000000..724dba13 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccui/TabControl.lua @@ -0,0 +1,102 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccui.TabControl + +---TabControl, use header button switch container +---@class ccui.TabControl : ccui.Widget +---@field headerDockPlace ccui.TabControl.Dock +---@field headerHeight integer get tab header's height \return header's height +---@field headerSelectedZoom number get the delta zoom of selected tab \return zoom, the delta zoom +---@field headerWidth number get tab header's width \return header's width +---@field selectedTabIndex integer get current selected tab's index \return the current selected tab index +---@field tabCount integer get the count of tabs in this TabControl \return the count of tabs +local TabControl = {} + +---@return ccui.TabControl +function TabControl.create() end + +---@return ccui.TabControl.Dock +function TabControl:getHeaderDockPlace() end + +---get tab header's height +---@return integer # header's height +function TabControl:getHeaderHeight() end + +---get the delta zoom of selected tab +---@return number # zoom, the delta zoom +function TabControl:getHeaderSelectedZoom() end + +---get tab header's width +---@return number # header's width +function TabControl:getHeaderWidth() end + +---get current selected tab's index +---@return integer # the current selected tab index +function TabControl:getSelectedTabIndex() end + +---get Container +---@param index integer # The index of tab +---@return ccui.Layout +function TabControl:getTabContainer(index) end + +---get the count of tabs in this TabControl +---@return integer # the count of tabs +function TabControl:getTabCount() end + +---get TabHeader +---@param index integer # The index of tab +---@return ccui.TabHeader +function TabControl:getTabHeader(index) end + +---ignore the textures' size in header, scale them with _headerWidth and _headerHeight +---@param ignore boolean # is `true`, the header's texture scale with _headerWidth and _headerHeight +---ignore is `false`, use the texture's size, do not scale them +function TabControl:ignoreHeadersTextureSize(ignore) end + +---get the index of tabCell in TabView, return -1 if not exists in. +---@return integer # the index of tabCell in TabView, `-1` means not exists in. +---@param tabCell ccui.TabHeader +function TabControl:indexOfTabHeader(tabCell) end + +---insert tab, and init the position of header and container +---@param index integer # The index tab should be +---@param header ccui.TabHeader # The header Button, will be a protected child in TabControl +---@param container ccui.Layout # The container, will be a protected child in TabControl +function TabControl:insertTab(index, header, container) end + +---get whether ignore the textures' size in header, scale them with _headerWidth and _headerHeight +---@return boolean # whether ignore the textures' size in header +function TabControl:isIgnoreHeadersTextureSize() end + +---remove the tab from this TabControl +---@param index integer # The index of tab +function TabControl:removeTab(index) end + +---the header dock place of header in TabControl +---@param dockPlace ccui.TabControl.Dock # The strip place +function TabControl:setHeaderDockPlace(dockPlace) end + +---set header height, affect all tab +---@param headerHeight number # each tab header's height +function TabControl:setHeaderHeight(headerHeight) end + +---set the delta zoom of selected tab +---@param zoom number # The delta zoom +function TabControl:setHeaderSelectedZoom(zoom) end + +---set header width, affect all tab +---@param headerWidth number # each tab header's width +function TabControl:setHeaderWidth(headerWidth) end + +---set tab selected, switch the current selected tab and visible container +---@param index integer # The index of tab +--- +---set tab selected, switch the current selected tab and visible container +---\param tabHeader The tab instance +---@overload fun(self: ccui.TabControl, tabHeader: ccui.TabHeader) +function TabControl:setSelectTab(index) end + +---Add a callback function which would be called when selected tab changed +---@param callback ccui.TabControl.ccTabControlCallback # A std::function with type @see `ccTabControlCallback` +function TabControl:setTabChangedEventListener(callback) end + +return TabControl \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccui/TabControl/Dock.lua b/addons/cclua/cocos2d/library/ccui/TabControl/Dock.lua new file mode 100644 index 00000000..3c46a7e6 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccui/TabControl/Dock.lua @@ -0,0 +1,16 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccui.TabControl.Dock + +---@type ccui.TabControl.Dock +local VALUE + +--- +---@enum ccui.TabControl.Dock +local Dock = { + BOTTOM = 2, + LEFT = 1, + RIGHT = 3, + TOP = 0, +} + +return Dock \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccui/TabControl/EventType.lua b/addons/cclua/cocos2d/library/ccui/TabControl/EventType.lua new file mode 100644 index 00000000..4cfa8033 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccui/TabControl/EventType.lua @@ -0,0 +1,13 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccui.TabControl.EventType + +---@type ccui.TabControl.EventType +local VALUE + +--- +---@enum ccui.TabControl.EventType +local EventType = { + SELECT_CHANGED = 0, +} + +return EventType \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccui/TabControl/ccTabControlCallback.lua b/addons/cclua/cocos2d/library/ccui/TabControl/ccTabControlCallback.lua new file mode 100644 index 00000000..a3aa8955 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccui/TabControl/ccTabControlCallback.lua @@ -0,0 +1,14 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccui.TabControl.ccTabControlCallback + +--- +--- +---std::function +---@class ccui.TabControl.ccTabControlCallback +local ccTabControlCallback = {} + +---@return ccui.TabControl.ccTabControlCallback + +function ccTabControlCallback:__call() end + +return ccTabControlCallback \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccui/TabHeader.lua b/addons/cclua/cocos2d/library/ccui/TabHeader.lua new file mode 100644 index 00000000..d81a5afd --- /dev/null +++ b/addons/cclua/cocos2d/library/ccui/TabHeader.lua @@ -0,0 +1,100 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccui.TabHeader + +---the header button in TabControl +---@class ccui.TabHeader : ccui.AbstractCheckButton +---@field indexInTabControl integer get the index this header in the TabControl \return -1 means not in any TabControl +---@field titleColor any get the TabHeader text color. \return Color4B of TabHeader text. +---@field titleFontName string get the font name of TabHeader text \return font name in std::string +---@field titleFontSize number get the font size of TabHeader text \return TabHeader text's font size in float. +---@field titleRenderer cc.Label Return the inner Label renderer of TabHeader. \return The TabHeader Label. +---@field titleText string get the TabHeader text \return he TabHeader text +local TabHeader = {} + +---Create and return a empty TabHeader instance pointer. +---@return ccui.TabHeader +--- +---factory method to create a TabHeader instance. +---This method uses less resource to create a TabHeader. +---\param titleStr The text on the TabHeader +---\param backGround The background image name in `std::string`. +---\param cross The cross image name in `std::string`. +---\param texType The texture's resource type in `Widget::TextureResType`. +---\return A TabHeader instance pointer +---@overload fun(titleStr: string, backGround: string, cross: string, texType: ccui.Widget.TextureResType): ccui.TabHeader +--- +---factory method to create a TabHeader instance. +---This method uses less resource to create a TabHeader. +---\param titleStr The text on the TabHeader +---\param backGround The background image name in `std::string`. +---\param cross The cross image name in `std::string`. +---\param texType The texture's resource type in `Widget::TextureResType`. +---\return A TabHeader instance pointer +---@overload fun(titleStr: string, backGround: string, cross: string): ccui.TabHeader +--- +---Create a TabHeader with various images. +---\param titleStr The text on the TabHeader +---\param backGround backGround texture. +---\param backGroundSelected backGround selected state texture. +---\param cross cross texture. +---\param backGroundDisabled backGround disabled state texture. +---\param frontCrossDisabled cross dark state texture. +---\param texType @see `Widget::TextureResType` +--- +---\return A TabHeader instance pointer. +---@overload fun(titleStr: string, backGround: string, backGroundSelected: string, cross: string, backGroundDisabled: string, frontCrossDisabled: string, texType: ccui.Widget.TextureResType): ccui.TabHeader +--- +---Create a TabHeader with various images. +---\param titleStr The text on the TabHeader +---\param backGround backGround texture. +---\param backGroundSelected backGround selected state texture. +---\param cross cross texture. +---\param backGroundDisabled backGround disabled state texture. +---\param frontCrossDisabled cross dark state texture. +---\param texType @see `Widget::TextureResType` +--- +---\return A TabHeader instance pointer. +---@overload fun(titleStr: string, backGround: string, backGroundSelected: string, cross: string, backGroundDisabled: string, frontCrossDisabled: string): ccui.TabHeader +function TabHeader.create() end + +---get the index this header in the TabControl +---@return integer # -1 means not in any TabControl +function TabHeader:getIndexInTabControl() end + +---get the TabHeader text color. +---@return any # Color4B of TabHeader text. +function TabHeader:getTitleColor() end + +---get the font name of TabHeader text +---@return string # font name in std::string +function TabHeader:getTitleFontName() end + +---get the font size of TabHeader text +---@return number # TabHeader text's font size in float. +function TabHeader:getTitleFontSize() end + +---Return the inner Label renderer of TabHeader. +---@return cc.Label # The TabHeader Label. +function TabHeader:getTitleRenderer() end + +---get the TabHeader text +---@return string # he TabHeader text +function TabHeader:getTitleText() end + +---Change the color of he TabHeader text +---@param color any # The he TabHeader text's color in Color4B. +function TabHeader:setTitleColor(color) end + +---Change the font name of TabHeader text +---@param fontName string # a font name string. +function TabHeader:setTitleFontName(fontName) end + +---Change the font size of TabHeader text +---@param size number # TabHeader text's font size in float. +function TabHeader:setTitleFontSize(size) end + +---Change the content of Header's text. +---@param text string # The Header's text. +function TabHeader:setTitleText(text) end + +return TabHeader \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccui/TabHeader/EventType.lua b/addons/cclua/cocos2d/library/ccui/TabHeader/EventType.lua new file mode 100644 index 00000000..738853eb --- /dev/null +++ b/addons/cclua/cocos2d/library/ccui/TabHeader/EventType.lua @@ -0,0 +1,14 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccui.TabHeader.EventType + +---@type ccui.TabHeader.EventType +local VALUE + +--- +---@enum ccui.TabHeader.EventType +local EventType = { + SELECTED = 0, + UNSELECTED = 1, +} + +return EventType \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccui/Text.lua b/addons/cclua/cocos2d/library/ccui/Text.lua new file mode 100644 index 00000000..ac800c3a --- /dev/null +++ b/addons/cclua/cocos2d/library/ccui/Text.lua @@ -0,0 +1,256 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccui.Text + +---For creating a system font or a TTF font Text +---@class ccui.Text : ccui.Widget +---@field autoRenderSize cc.Size Gets the render size in auto mode.

\return The size of render size in auto mode. +---@field blendFunc cc.BlendFunc Returns the blending function that is currently being used.

\return A BlendFunc structure with source and destination factor which specified pixel arithmetic. \js NA \lua NA +---@field effectColor any Return current effect color value. +---@field fontName string Gets the font name.

\return Font name. +---@field fontSize number Gets the font size of label.

\return The font size. +---@field labelEffectType cc.LabelEffect Return current effect type. +---@field outlineSize integer Return the outline effect size value. +---@field shadowBlurRadius number Return the shadow effect blur radius. +---@field shadowColor any Return the shadow effect color value. +---@field shadowEnabled boolean Return whether the shadow effect is enabled. +---@field shadowOffset cc.Size Return shadow effect offset value. +---@field string string Gets the string value of label.

\return String value. +---@field stringLength integer Gets the string length of the label. Note: This length will be larger than the raw string length, if you want to get the raw string length, you should call this->getString().size() instead.

\return String length. +---@field textAreaSize cc.Size Return the text rendering area size.

\return The text rendering area size. +---@field textColor any Gets text color.

\return Text color. +---@field textHorizontalAlignment cc.TextHAlignment Gets text horizontal alignment.

\return Horizontal text alignment type +---@field textVerticalAlignment cc.TextVAlignment Gets text vertical alignment.

\return Vertical text alignment type +---@field touchScaleChangeEnabled boolean Gets the touch scale enabled of label.

\return Touch scale enabled of label. +---@field type ccui.Text.Type Gets the font type. \return The font type. +local Text = {} + +---@param cls string +---@return any +function Text:as(cls) end + +---Create a Text object. +--- +---@return ccui.Text # An autoreleased Text object. +--- +---Create a Text object with textContent, fontName and fontSize. +---The fontName could be a system font name or a TTF file path. +---Usage: +---\code +---create a system font UIText. +---Text *text = Text::create("Hello", "Arial", 20); +---create a TTF font UIText. +---Text *text = Text::create("Hello", "xxx\xxx.ttf", 20); +---\endcode +--- +---\param textContent Text content string. +---\param fontName A given font name. +---\param fontSize A given font size. +---\return An autoreleased Text object. +---@overload fun(textContent: string, fontName: string, fontSize: number): ccui.Text +function Text.create() end + +---@return cc.Ref +function Text.createInstance() end + +---Disable all text effects, including shadow, outline and glow. +--- +---Disable specific text effect. +---Use LabelEffect parameter to specify which effect should be disabled. +--- +---\see `LabelEffect` +---@overload fun(self: ccui.Text, effect: cc.LabelEffect) +function Text:disableEffect() end + +---Only support for TTF. +--- +---@param glowColor any # The color of glow. +function Text:enableGlow(glowColor) end + +---Enable outline for the label. +---It only works on IOS and Android when you use System fonts. +--- +---@param outlineColor any # The color of outline. +---@param outlineSize integer # The size of outline. +---@overload fun(self: ccui.Text, outlineColor: any) +function Text:enableOutline(outlineColor, outlineSize) end + +---Enable shadow for the label. +--- +---\todo support blur for shadow effect +--- +---@param shadowColor any # The color of shadow effect. +---@param offset cc.Size # The offset of shadow effect. +---@param blurRadius integer # The blur radius of shadow effect. +---@overload fun(self: ccui.Text) +---@overload fun(self: ccui.Text, shadowColor: any) +---@overload fun(self: ccui.Text, shadowColor: any, offset: cc.Size) +function Text:enableShadow(shadowColor, offset, blurRadius) end + +---Gets the render size in auto mode. +--- +---@return cc.Size # The size of render size in auto mode. +function Text:getAutoRenderSize() end + +---Returns the blending function that is currently being used. +--- +---@return cc.BlendFunc # A BlendFunc structure with source and destination factor which specified pixel arithmetic. +---\js NA +---\lua NA +function Text:getBlendFunc() end + +---Return current effect color value. +---@return any +function Text:getEffectColor() end + +---Gets the font name. +--- +---@return string # Font name. +function Text:getFontName() end + +---Gets the font size of label. +--- +---@return number # The font size. +function Text:getFontSize() end + +---Return current effect type. +---@return cc.LabelEffect +function Text:getLabelEffectType() end + +---Provides a way to treat each character like a Sprite. +---\warning No support system font. +---@param lettetIndex integer +---@return cc.Sprite +function Text:getLetter(lettetIndex) end + +---Return the outline effect size value. +---@return integer +function Text:getOutlineSize() end + +---Return the shadow effect blur radius. +---@return number +function Text:getShadowBlurRadius() end + +---Return the shadow effect color value. +---@return any +function Text:getShadowColor() end + +---Return shadow effect offset value. +---@return cc.Size +function Text:getShadowOffset() end + +---Gets the string value of label. +--- +---@return string # String value. +function Text:getString() end + +---Gets the string length of the label. +---Note: This length will be larger than the raw string length, +---if you want to get the raw string length, +---you should call this->getString().size() instead. +--- +---@return integer # String length. +function Text:getStringLength() end + +---Return the text rendering area size. +--- +---@return cc.Size # The text rendering area size. +function Text:getTextAreaSize() end + +---Gets text color. +--- +---@return any # Text color. +function Text:getTextColor() end + +---Gets text horizontal alignment. +--- +---@return cc.TextHAlignment # Horizontal text alignment type +function Text:getTextHorizontalAlignment() end + +---Gets text vertical alignment. +--- +---@return cc.TextVAlignment # Vertical text alignment type +function Text:getTextVerticalAlignment() end + +---Gets the font type. +---@return ccui.Text.Type # The font type. +function Text:getType() end + +---@return boolean +---@overload fun(self: ccui.Text, textContent: string, fontName: string, fontSize: number): boolean +function Text:init() end + +---Return whether the shadow effect is enabled. +---@return boolean +function Text:isShadowEnabled() end + +---Gets the touch scale enabled of label. +--- +---@return boolean # Touch scale enabled of label. +function Text:isTouchScaleChangeEnabled() end + +---Default constructor. +---\js ctor +---\lua new +---@return ccui.Text +function Text.new() end + +---Sets the source blending function. +--- +---@param blendFunc cc.BlendFunc # A structure with source and destination factor to specify pixel arithmetic. e.g. {BlendFactor::ONE, BlendFactor::ONE}, {BlendFactor::SRC_ALPHA, BlendFactor::ONE_MINUS_SRC_ALPHA}. +---\js NA +---\lua NA +function Text:setBlendFunc(blendFunc) end + +---Sets the font name of label. +---If you are trying to use a system font, you could just pass a font name +---If you are trying to use a TTF, you should pass a file path to the TTF file +---Usage: +---\code +---create a system font UIText +---Text *text = Text::create("Hello", "Arial", 20); +---it will change the font to system font no matter the previous font type is TTF or system font +---text->setFontName("Marfelt"); +---it will change the font to TTF font no matter the previous font type is TTF or system font +---text->setFontName("xxxx/xxx.ttf"); +---\endcode +---@param name string # Font name. +function Text:setFontName(name) end + +---Sets the font size of label. +--- +---@param size number # The font size. +function Text:setFontSize(size) end + +---Changes the string value of label. +--- +---@param text string # String value. +function Text:setString(text) end + +---Sets the rendering size of the text, you should call this method +---along with calling `ignoreContentAdaptWithSize(false)`, otherwise the text area +---size is calculated by the real size of the text content. +--- +---@param size cc.Size # The text rendering area size. +function Text:setTextAreaSize(size) end + +---Sets text color. +--- +---@param color any # Text color. +function Text:setTextColor(color) end + +---Sets text horizontal alignment. +--- +---@param alignment cc.TextHAlignment # Horizontal text alignment type +function Text:setTextHorizontalAlignment(alignment) end + +---Sets text vertical alignment. +--- +---@param alignment cc.TextVAlignment # vertical text alignment type +function Text:setTextVerticalAlignment(alignment) end + +---Sets the touch scale enabled of label. +--- +---@param enabled boolean # Touch scale enabled of label. +function Text:setTouchScaleChangeEnabled(enabled) end + +return Text \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccui/Text/Type.lua b/addons/cclua/cocos2d/library/ccui/Text/Type.lua new file mode 100644 index 00000000..6c507e6f --- /dev/null +++ b/addons/cclua/cocos2d/library/ccui/Text/Type.lua @@ -0,0 +1,14 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccui.Text.Type + +---@type ccui.Text.Type +local VALUE + +--- +---@enum ccui.Text.Type +local Type = { + SYSTEM = 0, + TTF = 1, +} + +return Type \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccui/TextAtlas.lua b/addons/cclua/cocos2d/library/ccui/TextAtlas.lua new file mode 100644 index 00000000..209d3036 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccui/TextAtlas.lua @@ -0,0 +1,67 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccui.TextAtlas + +---UI TextAtlas widget. +---@class ccui.TextAtlas : ccui.Widget +---@field renderFile cc.ResourceData +---@field string string Get string value for labelatlas.

\return The string value of TextAtlas. +---@field stringLength integer Gets the string length of the label. Note: This length will be larger than the raw string length, if you want to get the raw string length, you should call this->getString().size() instead

\return string length. +local TextAtlas = {} + +---\js NA +function TextAtlas:adaptRenderers() end + +---Create a TexAtlas object. +--- +---@return ccui.TextAtlas # An autoreleased TextAtlas object. +--- +---Create a LabelAtlas from a char map file. +--- +---\param stringValue A given string needs to be displayed. +---\param charMapFile A given char map file name. +---\param itemWidth The element width. +---\param itemHeight The element height. +---\param startCharMap The starting char of the atlas. +---\return An autoreleased TextAtlas object. +---@overload fun(stringValue: string, charMapFile: string, itemWidth: integer, itemHeight: integer, startCharMap: string): ccui.TextAtlas +function TextAtlas.create() end + +---@return cc.Ref +function TextAtlas.createInstance() end + +---@return cc.ResourceData +function TextAtlas:getRenderFile() end + +---Get string value for labelatlas. +--- +---@return string # The string value of TextAtlas. +function TextAtlas:getString() end + +---Gets the string length of the label. +---Note: This length will be larger than the raw string length, +---if you want to get the raw string length, you should call this->getString().size() instead +--- +---@return integer # string length. +function TextAtlas:getStringLength() end + +---Default constructor. +--- +---\lua new +---@return ccui.TextAtlas +function TextAtlas.new() end + +---Initializes the LabelAtlas with a string, a char map file(the atlas), the width and height of each element and the starting char of the atlas. +--- +---@param stringValue string # A given string needs to be displayed. +---@param charMapFile string # A given char map file name. +---@param itemWidth integer # The element width. +---@param itemHeight integer # The element height. +---@param startCharMap string # The starting char of the atlas. +function TextAtlas:setProperty(stringValue, charMapFile, itemWidth, itemHeight, startCharMap) end + +---Set string value for labelatlas. +--- +---@param value string # A given string needs to be displayed. +function TextAtlas:setString(value) end + +return TextAtlas \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccui/TextBMFont.lua b/addons/cclua/cocos2d/library/ccui/TextBMFont.lua new file mode 100644 index 00000000..567ef6e3 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccui/TextBMFont.lua @@ -0,0 +1,50 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccui.TextBMFont + +---A widget for displaying BMFont label. +---@class ccui.TextBMFont : ccui.Widget +---@field renderFile cc.ResourceData +---@field string string get string value for labelbmfont +---@field stringLength integer Gets the string length of the label. Note: This length will be larger than the raw string length, if you want to get the raw string length, you should call this->getString().size() instead

\return string length. +local TextBMFont = {} + +---Allocates and initializes. +---@return ccui.TextBMFont +---@overload fun(text: string, filename: string): ccui.TextBMFont +function TextBMFont.create() end + +---@return cc.Ref +function TextBMFont.createInstance() end + +---@return cc.ResourceData +function TextBMFont:getRenderFile() end + +---get string value for labelbmfont +---@return string +function TextBMFont:getString() end + +---Gets the string length of the label. +---Note: This length will be larger than the raw string length, +---if you want to get the raw string length, you should call this->getString().size() instead +--- +---@return integer # string length. +function TextBMFont:getStringLength() end + +---Default constructor +---\js ctor +---\lua new +---@return ccui.TextBMFont +function TextBMFont.new() end + +---reset TextBMFont inner label +function TextBMFont:resetRender() end + +---init a bitmap font atlas with an initial string and the FNT file +---@param fileName string +function TextBMFont:setFntFile(fileName) end + +---set string value for labelbmfont +---@param value string +function TextBMFont:setString(value) end + +return TextBMFont \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccui/TextField.lua b/addons/cclua/cocos2d/library/ccui/TextField.lua new file mode 100644 index 00000000..f55ecea7 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccui/TextField.lua @@ -0,0 +1,274 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccui.TextField + +---A widget which allows users to input text. +---The rendering of the input text are based on @see `TextFieldTTF'. +---If you want to use system control behavior, please use @see `EditBox` instead. +---\js NA +---\lua NA +---@class ccui.TextField : ccui.Widget +---@field autoRenderSize cc.Size Get the renderer size in auto mode.

\return A delimitation zone. +---@field deleteBackward boolean Whether it is ready to delete backward in TextField.

\return True is the delete backward is enabled, false otherwise. +---@field detachWithIME boolean Query whether IME is detached or not.

\return True if IME is detached, false otherwise. +---@field fontName string Query the TextField's font name.

\return The font name string. +---@field fontSize integer Query the font size.

\return The integer font size. +---@field insertText boolean Whether it is ready to get the inserted text or not.

\return True if the insert text is ready, false otherwise. +---@field maxLength integer Query maximize input length of TextField.

\return The integer value of maximize input length. +---@field maxLengthEnabled boolean Query whether max length is enabled or not.

\return True if maximize length is enabled, false otherwise. +---@field passwordEnabled boolean Query whether password is enabled or not.

\return True if password is enabled, false otherwise. +---@field passwordStyleText string Query the password style text.

\return A password style text. +---@field placeHolder string Get the placeholder of TextField.

\return A placeholder string. +---@field placeHolderColor any Query the placeholder string color.

\return The color of placeholder. +---@field string string Query the content of TextField. \return The string value of TextField. +---@field stringLength integer Query the input string length.

\return A integer length value. +---@field textColor any Query the text string color.

\return The color of the text. +---@field textHorizontalAlignment cc.TextHAlignment Inquire the horizontal alignment

\return The horizontal alignment +---@field textVerticalAlignment cc.TextVAlignment Inquire the horizontal alignment

\return The horizontal alignment +---@field touchSize cc.Size Get current touch size of TextField.

\return The TextField's touch size. +local TextField = {} + +---Add a event listener to TextField, when some predefined event happens, the callback will be called. +---@param callback ccui.TextField.ccTextFieldCallback # A callback function with type of `ccTextFieldCallback`. +function TextField:addEventListener(callback) end + +---Attach the IME for inputing. +function TextField:attachWithIME() end + +---Create an empty TextField. +--- +---@return ccui.TextField # A TextField instance. +--- +---Create a TextField with a placeholder, a font name and a font size. +--- +---\param placeholder The placeholder string. +---\param fontName The font name. +---\param fontSize The font size. +---\return A TextField instance. +---@overload fun(placeholder: string, fontName: string, fontSize: integer): ccui.TextField +function TextField.create() end + +---@return cc.Ref +function TextField.createInstance() end + +---Detach the IME. +function TextField:didNotSelectSelf() end + +---Query whether the IME is attached or not. +--- +---@return boolean # True if IME is attached, false otherwise. +function TextField:getAttachWithIME() end + +---Get the renderer size in auto mode. +--- +---@return cc.Size # A delimitation zone. +function TextField:getAutoRenderSize() end + +---Whether it is ready to delete backward in TextField. +--- +---@return boolean # True is the delete backward is enabled, false otherwise. +function TextField:getDeleteBackward() end + +---Query whether IME is detached or not. +--- +---@return boolean # True if IME is detached, false otherwise. +function TextField:getDetachWithIME() end + +---Query the TextField's font name. +--- +---@return string # The font name string. +function TextField:getFontName() end + +---Query the font size. +--- +---@return integer # The integer font size. +function TextField:getFontSize() end + +---Whether it is ready to get the inserted text or not. +--- +---@return boolean # True if the insert text is ready, false otherwise. +function TextField:getInsertText() end + +---Query maximize input length of TextField. +--- +---@return integer # The integer value of maximize input length. +function TextField:getMaxLength() end + +---Query the password style text. +--- +---@return string # A password style text. +function TextField:getPasswordStyleText() end + +---Get the placeholder of TextField. +--- +---@return string # A placeholder string. +function TextField:getPlaceHolder() end + +---Query the placeholder string color. +--- +---@return any # The color of placeholder. +function TextField:getPlaceHolderColor() end + +---Query the content of TextField. +---@return string # The string value of TextField. +function TextField:getString() end + +---Query the input string length. +--- +---@return integer # A integer length value. +function TextField:getStringLength() end + +---Query the text string color. +--- +---@return any # The color of the text. +function TextField:getTextColor() end + +---Inquire the horizontal alignment +--- +---@return cc.TextHAlignment # The horizontal alignment +function TextField:getTextHorizontalAlignment() end + +---Inquire the horizontal alignment +--- +---@return cc.TextVAlignment # The horizontal alignment +function TextField:getTextVerticalAlignment() end + +---Get current touch size of TextField. +--- +---@return cc.Size # The TextField's touch size. +function TextField:getTouchSize() end + +---Query whether max length is enabled or not. +--- +---@return boolean # True if maximize length is enabled, false otherwise. +function TextField:isMaxLengthEnabled() end + +---Query whether password is enabled or not. +--- +---@return boolean # True if password is enabled, false otherwise. +function TextField:isPasswordEnabled() end + +---Default constructor. +---@return ccui.TextField +function TextField.new() end + +---Toggle attach with IME. +--- +---@param attach boolean # True if attach with IME, false otherwise. +function TextField:setAttachWithIME(attach) end + +---Set char showing cursor. +---\js NA +---@param cursor integer +function TextField:setCursorChar(cursor) end + +---Set enable cursor use. +---\js NA +---@param enabled boolean +function TextField:setCursorEnabled(enabled) end + +---Set cursor position to hit letter, if enabled +---\js NA +---@param point cc.Vec2 +---@param camera cc.Camera +function TextField:setCursorFromPoint(point, camera) end + +---Set cursor position, if enabled +---\js NA +---@param cursorPosition any +function TextField:setCursorPosition(cursorPosition) end + +---Toggle enable delete backward mode. +--- +---@param deleteBackward boolean # True is delete backward is enabled, false otherwise. +function TextField:setDeleteBackward(deleteBackward) end + +---Toggle detach with IME. +--- +---@param detach boolean # True if detach with IME, false otherwise. +function TextField:setDetachWithIME(detach) end + +---Change the font name of TextField. +--- +---@param name string # The font name string. +function TextField:setFontName(name) end + +---Change font size of TextField. +--- +---@param size integer # The integer font size. +function TextField:setFontSize(size) end + +---Toggle enable insert text mode +--- +---@param insertText boolean # True if enable insert text, false otherwise. +function TextField:setInsertText(insertText) end + +---Change maximize input length limitation. +--- +---@param length integer # A character count in integer. +function TextField:setMaxLength(length) end + +---Toggle maximize length enable +--- +---@param enable boolean # True if enable maximize length, false otherwise. +function TextField:setMaxLengthEnabled(enable) end + +---Toggle enable password input mode. +--- +---@param enable boolean # True if enable password input mode, false otherwise. +function TextField:setPasswordEnabled(enable) end + +---Change password style text. +--- +---@param styleText string # The styleText for password mask, the default value is "*". +function TextField:setPasswordStyleText(styleText) end + +---Set placeholder of TextField. +--- +---@param value string # The string value of placeholder. +function TextField:setPlaceHolder(value) end + +---Change the placeholder color. +--- +---@param color any # A color value in `Color3B`. +--- +---Change the placeholder color. +--- +---\param color A color value in `Color4B`. +---@overload fun(self: ccui.TextField, color: any) +function TextField:setPlaceHolderColor(color) end + +---Change content of TextField. +---@param text string # A string content. +function TextField:setString(text) end + +---Change the text area size. +--- +---@param size cc.Size # A delimitation zone. +function TextField:setTextAreaSize(size) end + +---Change the text color. +--- +---@param textColor any # The color value in `Color4B`. +function TextField:setTextColor(textColor) end + +---Change horizontal text alignment. +--- +---@param alignment cc.TextHAlignment # A alignment arguments in @see `TextHAlignment`. +function TextField:setTextHorizontalAlignment(alignment) end + +---Change the vertical text alignment. +--- +---@param alignment cc.TextVAlignment # A alignment arguments in @see `TextVAlignment`. +function TextField:setTextVerticalAlignment(alignment) end + +---Toggle enable touch area. +--- +---@param enable boolean # True if enable touch area, false otherwise. +function TextField:setTouchAreaEnabled(enable) end + +---Set the touch size +---The touch size is used for @see `hitTest`. +---@param size cc.Size # A delimitation zone. +function TextField:setTouchSize(size) end + +return TextField \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccui/TextField/EventType.lua b/addons/cclua/cocos2d/library/ccui/TextField/EventType.lua new file mode 100644 index 00000000..c378d708 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccui/TextField/EventType.lua @@ -0,0 +1,16 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccui.TextField.EventType + +---@type ccui.TextField.EventType +local VALUE + +--- +---@enum ccui.TextField.EventType +local EventType = { + ATTACH_WITH_IME = 0, + DELETE_BACKWARD = 3, + DETACH_WITH_IME = 1, + INSERT_TEXT = 2, +} + +return EventType \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccui/TextField/ccTextFieldCallback.lua b/addons/cclua/cocos2d/library/ccui/TextField/ccTextFieldCallback.lua new file mode 100644 index 00000000..e830cea9 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccui/TextField/ccTextFieldCallback.lua @@ -0,0 +1,14 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccui.TextField.ccTextFieldCallback + +--- +--- +---std::function +---@class ccui.TextField.ccTextFieldCallback +local ccTextFieldCallback = {} + +---@return ccui.TextField.ccTextFieldCallback + +function ccTextFieldCallback:__call() end + +return ccTextFieldCallback \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccui/UICCTextField.lua b/addons/cclua/cocos2d/library/ccui/UICCTextField.lua new file mode 100644 index 00000000..e1cdf427 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccui/UICCTextField.lua @@ -0,0 +1,152 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccui.UICCTextField + +---A helper class which inherit from @see `TextFieldTTF` and implements the @see `TextFieldDelegate` protocol. +---It is mainly be used internally by @see `UITextField` class. +---\js NA +---\lua NA +---@class ccui.UICCTextField : cc.TextFieldTTF +---@field attachWithIME boolean Query whether the IME is attached or not.

\return True if IME is attached, false otherwise. +---@field deleteBackward boolean Query whether delete backward is enabled or not.

\return True if delete backward is enabled, false otherwise. +---@field detachWithIME boolean Query whether IME is detached or not.

\return True if IME is detached, false otherwise. +---@field maxLength integer Get maximize length. \return Maximize length. +---@field maxLengthEnabled boolean Query max length enable state. \return Whether max length is enabled or not. +---@field passwordEnabled boolean Query whether password input mode is enabled or not.

\return True if password input is enabled, false otherwise. +local UICCTextField = {} + +---@param cls string +---@return any +function UICCTextField:as(cls) end + +---Close the IME. +function UICCTextField:closeIME() end + +---Create an empty UICCTextField. +--- +---@return ccui.UICCTextField # A UICCTextField instance. +--- +---Create a UICCTextField instance with a placeholder, a fontName and a fontSize. +---\param placeholder Placeholder in string. +---\param fontName Font name in string. +---\param fontSize Font size in float. +---\return A UICCTextField instance. +---@overload fun(placeholder: string, fontName: string, fontSize: number): ccui.UICCTextField +function UICCTextField.create() end + +---Query whether the IME is attached or not. +--- +---@return boolean # True if IME is attached, false otherwise. +function UICCTextField:getAttachWithIME() end + +---Query whether delete backward is enabled or not. +--- +---@return boolean # True if delete backward is enabled, false otherwise. +function UICCTextField:getDeleteBackward() end + +---Query whether IME is detached or not. +--- +---@return boolean # True if IME is detached, false otherwise. +function UICCTextField:getDetachWithIME() end + +---Query whether insert text is enabled or not. +--- +---@return boolean # True if insert text is enabled, false otherwise. +function UICCTextField:getInsertText() end + +---Get maximize length. +---@return integer # Maximize length. +function UICCTextField:getMaxLength() end + +---@param text string +---@param len integer +function UICCTextField:insertText(text, len) end + +---Query max length enable state. +---@return boolean # Whether max length is enabled or not. +function UICCTextField:isMaxLengthEnabled() end + +---Query whether password input mode is enabled or not. +--- +---@return boolean # True if password input is enabled, false otherwise. +function UICCTextField:isPasswordEnabled() end + +---Default constructor +---@return ccui.UICCTextField +function UICCTextField.new() end + +---@param pSender cc.TextFieldTTF +---@return boolean +function UICCTextField:onTextFieldAttachWithIME(pSender) end + +---@param pSender cc.TextFieldTTF +---@param delText string +---@param nLen integer +---@return boolean +function UICCTextField:onTextFieldDeleteBackward(pSender, delText, nLen) end + +---@param pSender cc.TextFieldTTF +---@return boolean +function UICCTextField:onTextFieldDetachWithIME(pSender) end + +---@param pSender cc.TextFieldTTF +---@param text string +---@param nLen integer +---@return boolean +function UICCTextField:onTextFieldInsertText(pSender, text, nLen) end + +---If the sender doesn't want to draw, return true. +---\js NA +---@param sender cc.TextFieldTTF +---@param renderer cc.Renderer +---@param transform cc.Mat4 +---@param flags integer +---@return boolean +function UICCTextField:onVisit(sender, renderer, transform, flags) end + +---Open up the IME. +function UICCTextField:openIME() end + +---Toggle attach with IME. +--- +---@param attach boolean # True if attach with IME, false otherwise. +function UICCTextField:setAttachWithIME(attach) end + +---Toggle enable delete backward. +--- +---@param deleteBackward boolean # True if enable delete backward, false otherwise. +function UICCTextField:setDeleteBackward(deleteBackward) end + +---Toggle detach with IME. +--- +---@param detach boolean # True if detach with IME, false otherwise. +function UICCTextField:setDetachWithIME(detach) end + +---Toggle enable text insert. +--- +---@param insert boolean # True if enable insert text, false otherwise. +function UICCTextField:setInsertText(insert) end + +---Set maximize length. +---@param length integer # The maximize length in integer. +function UICCTextField:setMaxLength(length) end + +---Toggle enable max length limitation. +---@param enable boolean # True to enable max length, false otherwise. +function UICCTextField:setMaxLengthEnabled(enable) end + +---Toggle password input mode. +--- +---@param enable boolean # True if enable password input, false otherwise. +function UICCTextField:setPasswordEnabled(enable) end + +---Change password style text. +--- +---@param styleText string # The styleText for password mask, the default value is "*". +function UICCTextField:setPasswordStyleText(styleText) end + +---Set the password text content. +--- +---@param text string # The content of password. +function UICCTextField:setPasswordText(text) end + +return UICCTextField \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccui/VBox.lua b/addons/cclua/cocos2d/library/ccui/VBox.lua new file mode 100644 index 00000000..a0b3d68c --- /dev/null +++ b/addons/cclua/cocos2d/library/ccui/VBox.lua @@ -0,0 +1,28 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccui.VBox + +---VBox is just a convenient wrapper class for vertical layout type. +---VBox lays out its children in a single vertical column. +---@class ccui.VBox : ccui.Layout +local VBox = {} + +---Create a empty VBox instance. +---@return ccui.VBox # A VBox instance pointer. +--- +---Create a VBox with a certain size. +---\param size The content size of the layout. +---\return A VBox instance pointer. +---@overload fun(size: cc.Size): ccui.VBox +function VBox.create() end + +---@param size cc.Size +---@return boolean +function VBox:initWithSize(size) end + +---Default constructor +---\js ctor +---\lua new +---@return ccui.VBox +function VBox.new() end + +return VBox \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccui/VideoPlayer.lua b/addons/cclua/cocos2d/library/ccui/VideoPlayer.lua new file mode 100644 index 00000000..3fff63b4 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccui/VideoPlayer.lua @@ -0,0 +1,116 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccui.VideoPlayer + +---\class VideoPlayer +---Displays a video file. +--- +---\note VideoPlayer displays a video file base on system widget. +---It's mean VideoPlayer displays a video file above all graphical elements of cocos2d-x. +---\js NA +---@class ccui.VideoPlayer : ccui.Widget +---@field fileName string Get the local video file name.

\return The video file name. +---@field fullScreenEnabled boolean Indicates whether the video player is in full-screen mode.

\return True if the video player is in full-screen mode, false otherwise. +---@field keepAspectRatioEnabled boolean Indicates whether the video player keep aspect ratio when displaying the video. +---@field looping boolean Checks whether the VideoPlayer is set with looping mode.

\return true if the videoplayer is set to loop, false otherwise. +---@field playing boolean Checks whether the VideoPlayer is playing.

\return True if currently playing, false otherwise. +---@field url string Get the URL of remoting video source.

\return A remoting URL address. +---@field userInputEnabled boolean Checks whether the VideoPlayer is set to listen user input to resume and pause the video

\return true if the videoplayer user input is set, false otherwise. +local VideoPlayer = {} + +---Register a callback to be invoked when the video state is updated. +--- +---@param callback ccui.VideoPlayer.ccVideoPlayerCallback # The callback that will be run. +function VideoPlayer:addEventListener(callback) end + +---Static create method for instancing a VideoPlayer. +---@return ccui.VideoPlayer +function VideoPlayer.create() end + +---Get the local video file name. +--- +---@return string # The video file name. +function VideoPlayer:getFileName() end + +---Get the URL of remoting video source. +--- +---@return string # A remoting URL address. +function VideoPlayer:getURL() end + +---Indicates whether the video player is in full-screen mode. +--- +---@return boolean # True if the video player is in full-screen mode, false otherwise. +function VideoPlayer:isFullScreenEnabled() end + +---Indicates whether the video player keep aspect ratio when displaying the video. +---@return boolean +function VideoPlayer:isKeepAspectRatioEnabled() end + +---Checks whether the VideoPlayer is set with looping mode. +--- +---@return boolean # true if the videoplayer is set to loop, false otherwise. +function VideoPlayer:isLooping() end + +---Checks whether the VideoPlayer is playing. +--- +---@return boolean # True if currently playing, false otherwise. +function VideoPlayer:isPlaying() end + +---Checks whether the VideoPlayer is set to listen user input to resume and pause the video +--- +---@return boolean # true if the videoplayer user input is set, false otherwise. +function VideoPlayer:isUserInputEnabled() end + +---@return ccui.VideoPlayer +function VideoPlayer.new() end + +---A function which will be called when video is playing. +--- +---@param event integer # @see VideoPlayer::EventType. +function VideoPlayer:onPlayEvent(event) end + +---Starts playback. +function VideoPlayer:play() end + +---Seeks to specified time position. +--- +---@param sec number # The offset in seconds from the start to seek to. +function VideoPlayer:seekTo(sec) end + +---Sets a file path as a video source for VideoPlayer. +---@param videoPath string +function VideoPlayer:setFileName(videoPath) end + +---Causes the video player to enter or exit full-screen mode. +--- +---@param fullscreen boolean # Specify true to enter full-screen mode or false to exit full-screen mode. +function VideoPlayer:setFullScreenEnabled(fullscreen) end + +---Causes the video player to keep aspect ratio or no when displaying the video. +--- +---@param enable boolean # Specify true to keep aspect ratio or false to scale the video until +---both dimensions fit the visible bounds of the view exactly. +function VideoPlayer:setKeepAspectRatioEnabled(enable) end + +---Set if playback is done in loop mode +--- +---@param looping boolean # the video will or not automatically restart at the end +function VideoPlayer:setLooping(looping) end + +---Set the style of the player +--- +---@param style ccui.VideoPlayer.StyleType # The corresponding style +function VideoPlayer:setStyle(style) end + +---Sets a URL as a video source for VideoPlayer. +---@param _videoURL string +function VideoPlayer:setURL(_videoURL) end + +---Set if the player will enable user input for basic pause and resume of video +--- +---@param enableInput boolean # If true, input will be handled for basic functionality (pause/resume) +function VideoPlayer:setUserInputEnabled(enableInput) end + +---Stops playback. +function VideoPlayer:stop() end + +return VideoPlayer \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccui/VideoPlayer/EventType.lua b/addons/cclua/cocos2d/library/ccui/VideoPlayer/EventType.lua new file mode 100644 index 00000000..885fba72 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccui/VideoPlayer/EventType.lua @@ -0,0 +1,17 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccui.VideoPlayer.EventType + +---@type ccui.VideoPlayer.EventType +local VALUE + +--- +---@enum ccui.VideoPlayer.EventType +local EventType = { + COMPLETED = 3, + ERROR = 4, + PAUSED = 1, + PLAYING = 0, + STOPPED = 2, +} + +return EventType \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccui/VideoPlayer/StyleType.lua b/addons/cclua/cocos2d/library/ccui/VideoPlayer/StyleType.lua new file mode 100644 index 00000000..f8f04d26 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccui/VideoPlayer/StyleType.lua @@ -0,0 +1,14 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccui.VideoPlayer.StyleType + +---@type ccui.VideoPlayer.StyleType +local VALUE + +--- +---@enum ccui.VideoPlayer.StyleType +local StyleType = { + DEFAULT = 0, + NONE = 1, +} + +return StyleType \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccui/VideoPlayer/ccVideoPlayerCallback.lua b/addons/cclua/cocos2d/library/ccui/VideoPlayer/ccVideoPlayerCallback.lua new file mode 100644 index 00000000..cddfbd56 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccui/VideoPlayer/ccVideoPlayerCallback.lua @@ -0,0 +1,14 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccui.VideoPlayer.ccVideoPlayerCallback + +--- +--- +---std::function +---@class ccui.VideoPlayer.ccVideoPlayerCallback +local ccVideoPlayerCallback = {} + +---@return ccui.VideoPlayer.ccVideoPlayerCallback + +function ccVideoPlayerCallback:__call() end + +return ccVideoPlayerCallback \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccui/WebView.lua b/addons/cclua/cocos2d/library/ccui/WebView.lua new file mode 100644 index 00000000..9ea53810 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccui/WebView.lua @@ -0,0 +1,142 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccui.WebView + +---A View that displays web pages. +--- +---\note WebView displays web pages base on system widget. +---It's mean WebView displays web pages above all graphical elements of cocos2d-x. +---\js NA +---@class ccui.WebView : ccui.Widget +---@field onDidFailLoading ccui.WebView.ccWebViewCallback Get the callback when WebView has failed loading. +---@field onDidFinishLoading ccui.WebView.ccWebViewCallback Get the callback when WebView has finished loading. +---@field onJSCallback ccui.WebView.ccWebViewCallback Get the Javascript callback. +---@field onShouldStartLoading fun(arg1: ccui.WebView, arg2: string): boolean Get the callback when WebView is about to start. +---@field opacityWebView number getOpacity of webview. +local WebView = {} + +---Gets whether this WebView has a back history item. +--- +---@return boolean # WebView has a back history item. +function WebView:canGoBack() end + +---Gets whether this WebView has a forward history item. +--- +---@return boolean # WebView has a forward history item. +function WebView:canGoForward() end + +---Allocates and initializes a WebView. +---@return ccui.WebView +function WebView.create() end + +---Evaluates JavaScript in the context of the currently displayed page. +---@param js string +function WebView:evaluateJS(js) end + +---Get the callback when WebView has failed loading. +---@return ccui.WebView.ccWebViewCallback +function WebView:getOnDidFailLoading() end + +---Get the callback when WebView has finished loading. +---@return ccui.WebView.ccWebViewCallback +function WebView:getOnDidFinishLoading() end + +---Get the Javascript callback. +---@return ccui.WebView.ccWebViewCallback +function WebView:getOnJSCallback() end + +---Get the callback when WebView is about to start. +---@return fun(arg1: ccui.WebView, arg2: string): boolean +function WebView:getOnShouldStartLoading() end + +---getOpacity of webview. +---@return number +function WebView:getOpacityWebView() end + +---Goes back in the history. +function WebView:goBack() end + +---Goes forward in the history. +function WebView:goForward() end + +---Sets the main page contents, MIME type, content encoding, and base URL. +--- +---@param data any # The content for the main page. +---@param MIMEType string # The MIME type of the data. +---@param encoding string # The encoding of the data. +---@param baseURL string # The base URL for the content. +function WebView:loadData(data, MIMEType, encoding, baseURL) end + +---Loads the given fileName. +--- +---@param fileName string # Content fileName. +function WebView:loadFile(fileName) end + +---Sets the main page content and base URL. +--- +---@param string string # The content for the main page. +---@param baseURL string # The base URL for the content. +---@overload fun(self: ccui.WebView, string: string) +function WebView:loadHTMLString(string, baseURL) end + +---Loads the given URL. It doesn't clean cached data. +--- +---@param url string # Content URL. +--- +---Loads the given URL with cleaning cached data or not. +---\param url Content URL. +---\cleanCachedData Whether to clean cached data. +---@overload fun(self: ccui.WebView, url: string, cleanCachedData: boolean) +function WebView:loadURL(url) end + +---Default constructor. +---@return ccui.WebView +function WebView.new() end + +---Reloads the current URL. +function WebView:reload() end + +---set the background transparent +function WebView:setBackgroundTransparent() end + +---Set whether the webview bounces at end of scroll of WebView. +---@param bounce boolean +function WebView:setBounces(bounce) end + +---Set javascript interface scheme. +--- +---\see WebView::setOnJSCallback() +---@param scheme string +function WebView:setJavascriptInterfaceScheme(scheme) end + +---Call if a web view failed to load content. +--- +---@param callback ccui.WebView.ccWebViewCallback # The web view that has failed loading. +function WebView:setOnDidFailLoading(callback) end + +---Call after a web view finishes loading. +--- +---@param callback ccui.WebView.ccWebViewCallback # The web view that has finished loading. +function WebView:setOnDidFinishLoading(callback) end + +---This callback called when load URL that start with javascript interface scheme. +---@param callback ccui.WebView.ccWebViewCallback +function WebView:setOnJSCallback(callback) end + +---Call before a web view begins loading. +--- +---@param callback fun(arg1: ccui.WebView, arg2: string): boolean # The web view that is about to load new content. +---\return YES if the web view should begin loading content; otherwise, NO. +function WebView:setOnShouldStartLoading(callback) end + +---SetOpacity of webview. +---@param opacity number +function WebView:setOpacityWebView(opacity) end + +---Set WebView should support zooming. The default value is false. +---@param scalesPageToFit boolean +function WebView:setScalesPageToFit(scalesPageToFit) end + +---Stops the current load. +function WebView:stopLoading() end + +return WebView \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccui/WebView/ccWebViewCallback.lua b/addons/cclua/cocos2d/library/ccui/WebView/ccWebViewCallback.lua new file mode 100644 index 00000000..d186ad07 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccui/WebView/ccWebViewCallback.lua @@ -0,0 +1,14 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccui.WebView.ccWebViewCallback + +--- +--- +---std::function +---@class ccui.WebView.ccWebViewCallback +local ccWebViewCallback = {} + +---@return ccui.WebView.ccWebViewCallback + +function ccWebViewCallback:__call() end + +return ccWebViewCallback \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccui/Widget.lua b/addons/cclua/cocos2d/library/ccui/Widget.lua new file mode 100644 index 00000000..1e21d8f9 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccui/Widget.lua @@ -0,0 +1,446 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccui.Widget + +---Base class for all ui widgets. +---This class inherent from `ProtectedNode` and `LayoutParameterProtocol`. +---If you want to implements your own ui widget, you should subclass it. +---@class ccui.Widget : cc.ProtectedNode +---@field actionTag integer Get the action tag. \return Action tag. +---@field bottomBoundary number Gets the bottom boundary position of this widget in parent's coordination system. \return The bottom boundary position of this widget. +---@field bright boolean Determines if the widget is bright

\return true if the widget is bright, false if the widget is dark. +---@field callbackName string Query callback name. \return The callback name. +---@field callbackType string Query callback type. \return Callback type string. +---@field currentFocusedWidget ccui.Widget Return a current focused widget in your UI scene. No matter what widget object you call this method on , it will return you the exact one focused widget. +---@field customSize cc.Size Get the user defined widget size. \return User defined size. +---@field enabled boolean Determines if the widget is enabled or not.

\return true if the widget is enabled, false if the widget is disabled. +---@field flippedX boolean Returns the flag which indicates whether the widget is flipped horizontally or not.

It not only flips the texture of the widget, but also the texture of the widget's children. Also, flipping relies on widget's anchor point. Internally, it just use setScaleX(-1) to flip the widget.

\return true if the widget is flipped horizontally, false otherwise. +---@field flippedY boolean Return the flag which indicates whether the widget is flipped vertically or not.

It not only flips the texture of the widget, but also the texture of the widget's children. Also, flipping relies on widget's anchor point. Internally, it just use setScaleY(-1) to flip the widget.

\return true if the widget is flipped vertically, false otherwise. +---@field focusEnabled boolean Query widget's focus enable state. \return true represent the widget could accept focus, false represent the widget couldn't accept focus +---@field focused boolean Query whether widget is focused or not. \return whether the widget is focused or not +---@field highlighted boolean Determines if the widget is highlighted

\return true if the widget is highlighted, false if the widget is not highlighted. +---@field layoutComponentEnabled boolean Query whether layout component is enabled or not. \return true represent the widget use Layout Component, false represent the widget couldn't use Layout Component. +---@field layoutParameter ccui.LayoutParameter Gets LayoutParameter of widget.

\see LayoutParameter \return LayoutParameter +---@field layoutSize cc.Size Get the content size of widget. \warning This API exists mainly for keeping back compatibility. \return +---@field leftBoundary number Gets the left boundary position of this widget in parent's coordination system. \return The left boundary position of this widget. +---@field positionPercent cc.Vec2 Gets the percent (x,y) of the widget in OpenGL coordinates

\see setPosition(const Vec2&)

\return The percent (x,y) of the widget in OpenGL coordinates +---@field positionType ccui.Widget.PositionType Gets the position type of the widget

\see `PositionType`

\return type the position type of widget +---@field propagateTouchEvents boolean Return whether the widget is propagate touch events to its parents or not \return whether touch event propagation is allowed or not. \since v3.3 +---@field rightBoundary number Gets the right boundary position of this widget in parent's coordination system. \return The right boundary position of this widget. +---@field sizePercent cc.Vec2 Get size percent of widget.

\return Percent size. +---@field sizeType ccui.Widget.SizeType Gets the size type of widget.

\see `SizeType` +---@field swallowTouches boolean Return whether the widget is swallowing touch or not \return Whether touch is swallowed. \since v3.3 +---@field topBoundary number Gets the top boundary position of this widget in parent's coordination system. \return The top boundary position of this widget. +---@field touchBeganPosition cc.Vec2 Gets the touch began point of widget when widget is selected. \return the touch began point. +---@field touchEnabled boolean Determines if the widget is touch enabled

\return true if the widget is touch enabled, false if the widget is touch disabled. +---@field touchEndPosition cc.Vec2 +---@field touchMovePosition cc.Vec2 +---@field unifySizeEnabled boolean Query whether unify size enable state. \return true represent the widget use Unify Size, false represent the widget couldn't use Unify Size +---@field virtualRenderer cc.Node Gets the inner Renderer node of widget.

For example, a button's Virtual Renderer is it's texture renderer.

\return Node pointer. +---@field virtualRendererSize cc.Size Get the virtual renderer's size \return Widget virtual renderer size. +---@field worldPosition cc.Vec2 Gets position of widget in world space.

\return Position of widget in world space. +---@field onFocusChanged fun(arg1: ccui.Widget, arg2: ccui.Widget) +---@field onNextFocusedWidget fun(arg1: ccui.Widget.FocusDirection): ccui.Widget +local Widget = {} + +---Set a event handler to the widget in order to use cocostudio editor and framework +---@param callback ccui.Widget.ccWidgetEventCallback # The callback in `ccWidgetEventCallback`. +---\lua NA +function Widget:addCCSEventListener(callback) end + +---Set a click event handler to the widget. +---@param callback ccui.Widget.ccWidgetClickCallback # The callback in `ccWidgetClickCallback`. +function Widget:addClickEventListener(callback) end + +---Set a callback to touch vent listener. +---@param callback ccui.Widget.ccWidgetTouchCallback # The callback in `ccWidgetEventCallback.` +function Widget:addTouchEventListener(callback) end + +---@param cls string +---@return any +function Widget:as(cls) end + +---Create a new widget copy of the original one. +---@return ccui.Widget # A cloned widget copy of original. +function Widget:clone() end + +---Create and return a empty Widget instance pointer. +---@return ccui.Widget +function Widget.create() end + +---Dispatch a EventFocus through a EventDispatcher +---@param widgetLoseFocus ccui.Widget # The widget which lose its focus +---@param widgetGetFocus ccui.Widget # he widget which get its focus +function Widget:dispatchFocusEvent(widgetLoseFocus, widgetGetFocus) end + +---@param enable boolean +function Widget.enableDpadNavigation(enable) end + +---When a widget is in a layout, you could call this method to get the next focused widget within a specified direction. +---If the widget is not in a layout, it will return itself +---@param direction ccui.Widget.FocusDirection # the direction to look for the next focused widget in a layout +---@param current ccui.Widget # the current focused widget +---@return ccui.Widget # the next focused widget in a layout +function Widget:findNextFocusedWidget(direction, current) end + +---Get the action tag. +---@return integer # Action tag. +function Widget:getActionTag() end + +---Gets the bottom boundary position of this widget in parent's coordination system. +---@return number # The bottom boundary position of this widget. +function Widget:getBottomBoundary() end + +---Query callback name. +---@return string # The callback name. +function Widget:getCallbackName() end + +---Query callback type. +---@return string # Callback type string. +function Widget:getCallbackType() end + +---Return a current focused widget in your UI scene. +---No matter what widget object you call this method on , it will return you the exact one focused widget. +---@return ccui.Widget +function Widget.getCurrentFocusedWidget() end + +---Get the user defined widget size. +---@return cc.Size # User defined size. +function Widget:getCustomSize() end + +---Gets LayoutParameter of widget. +--- +---\see LayoutParameter +---@return ccui.LayoutParameter # LayoutParameter +function Widget:getLayoutParameter() end + +---Get the content size of widget. +---\warning This API exists mainly for keeping back compatibility. +---@return cc.Size # +function Widget:getLayoutSize() end + +---Gets the left boundary position of this widget in parent's coordination system. +---@return number # The left boundary position of this widget. +function Widget:getLeftBoundary() end + +---Gets the percent (x,y) of the widget in OpenGL coordinates +--- +---\see setPosition(const Vec2&) +--- +---@return cc.Vec2 # The percent (x,y) of the widget in OpenGL coordinates +function Widget:getPositionPercent() end + +---Gets the position type of the widget +--- +---\see `PositionType` +--- +---@return ccui.Widget.PositionType # type the position type of widget +function Widget:getPositionType() end + +---Gets the right boundary position of this widget in parent's coordination system. +---@return number # The right boundary position of this widget. +function Widget:getRightBoundary() end + +---Get size percent of widget. +--- +---@return cc.Vec2 # Percent size. +function Widget:getSizePercent() end + +---Gets the size type of widget. +--- +---\see `SizeType` +---@return ccui.Widget.SizeType +function Widget:getSizeType() end + +---Gets the top boundary position of this widget in parent's coordination system. +---@return number # The top boundary position of this widget. +function Widget:getTopBoundary() end + +---Gets the touch began point of widget when widget is selected. +---@return cc.Vec2 # the touch began point. +function Widget:getTouchBeganPosition() end + +---@return cc.Vec2 +function Widget:getTouchEndPosition() end + +---@return cc.Vec2 +function Widget:getTouchMovePosition() end + +---Gets the inner Renderer node of widget. +--- +---For example, a button's Virtual Renderer is it's texture renderer. +--- +---@return cc.Node # Node pointer. +function Widget:getVirtualRenderer() end + +---Get the virtual renderer's size +---@return cc.Size # Widget virtual renderer size. +function Widget:getVirtualRendererSize() end + +---Gets position of widget in world space. +--- +---@return cc.Vec2 # Position of widget in world space. +function Widget:getWorldPosition() end + +---Checks a point is in widget's content space. +---This function is used for determining touch area of widget. +--- +---@param pt cc.Vec2 # The point in `Vec2`. +---@param camera cc.Camera # The camera look at widget, used to convert GL screen point to near/far plane. +---@param p cc.Vec3 # Point to a Vec3 for store the intersect point, if don't need them set to nullptr. +---@return boolean # true if the point is in widget's content space, false otherwise. +function Widget:hitTest(pt, camera, p) end + +---Toggle whether ignore user defined content size for widget. +---Set true will ignore user defined content size which means +---the widget size is always equal to the return value of `getVirtualRendererSize`. +--- +---@param ignore boolean # set member variable _ignoreSize to ignore +function Widget:ignoreContentAdaptWithSize(ignore) end + +---@param event ccui.Widget.TouchEventType +---@param sender ccui.Widget +---@param touch cc.Touch +function Widget:interceptTouchEvent(event, sender, touch) end + +---Determines if the widget is bright +--- +---@return boolean # true if the widget is bright, false if the widget is dark. +function Widget:isBright() end + +---Checks a point if in parent's area. +--- +---@param pt cc.Vec2 # A point in `Vec2`. +---@return boolean # true if the point is in parent's area, false otherwise. +function Widget:isClippingParentContainsPoint(pt) end + +---Determines if the widget is enabled or not. +--- +---@return boolean # true if the widget is enabled, false if the widget is disabled. +function Widget:isEnabled() end + +---Returns the flag which indicates whether the widget is flipped horizontally or not. +--- +---It not only flips the texture of the widget, but also the texture of the widget's children. +---Also, flipping relies on widget's anchor point. +---Internally, it just use setScaleX(-1) to flip the widget. +--- +---@return boolean # true if the widget is flipped horizontally, false otherwise. +function Widget:isFlippedX() end + +---Return the flag which indicates whether the widget is flipped vertically or not. +--- +---It not only flips the texture of the widget, but also the texture of the widget's children. +---Also, flipping relies on widget's anchor point. +---Internally, it just use setScaleY(-1) to flip the widget. +--- +---@return boolean # true if the widget is flipped vertically, false otherwise. +function Widget:isFlippedY() end + +---Query widget's focus enable state. +---@return boolean # true represent the widget could accept focus, false represent the widget couldn't accept focus +function Widget:isFocusEnabled() end + +---Query whether widget is focused or not. +---@return boolean # whether the widget is focused or not +function Widget:isFocused() end + +---Determines if the widget is highlighted +--- +---@return boolean # true if the widget is highlighted, false if the widget is not highlighted. +function Widget:isHighlighted() end + +---Query whether the widget ignores user defined content size or not +--- +---@return boolean # True means ignore user defined content size, false otherwise. +function Widget:isIgnoreContentAdaptWithSize() end + +---Query whether layout component is enabled or not. +---@return boolean # true represent the widget use Layout Component, false represent the widget couldn't use Layout Component. +function Widget:isLayoutComponentEnabled() end + +---Return whether the widget is propagate touch events to its parents or not +---@return boolean # whether touch event propagation is allowed or not. +---\since v3.3 +function Widget:isPropagateTouchEvents() end + +---Return whether the widget is swallowing touch or not +---@return boolean # Whether touch is swallowed. +---\since v3.3 +function Widget:isSwallowTouches() end + +---Determines if the widget is touch enabled +--- +---@return boolean # true if the widget is touch enabled, false if the widget is touch disabled. +function Widget:isTouchEnabled() end + +---Query whether unify size enable state. +---@return boolean # true represent the widget use Unify Size, false represent the widget couldn't use Unify Size +function Widget:isUnifySizeEnabled() end + +---Default constructor +---\js ctor +---\lua new +---@return ccui.Widget +function Widget.new() end + +---This method is called when a focus change event happens +---@param widgetLostFocus ccui.Widget # The widget which lose its focus +---@param widgetGetFocus ccui.Widget # The widget which get its focus +function Widget:onFocusChange(widgetLostFocus, widgetGetFocus) end + +---A callback which will be called when touch began event is issued. +---@param touch cc.Touch # The touch info. +---@param unusedEvent cc.Event # The touch event info. +---@return boolean # True if user want to handle touches, false otherwise. +function Widget:onTouchBegan(touch, unusedEvent) end + +---A callback which will be called when touch cancelled event is issued. +---@param touch cc.Touch # The touch info. +---@param unusedEvent cc.Event # The touch event info. +function Widget:onTouchCancelled(touch, unusedEvent) end + +---A callback which will be called when touch ended event is issued. +---@param touch cc.Touch # The touch info. +---@param unusedEvent cc.Event # The touch event info. +function Widget:onTouchEnded(touch, unusedEvent) end + +---A callback which will be called when touch moved event is issued. +---@param touch cc.Touch # The touch info. +---@param unusedEvent cc.Event # The touch event info. +function Widget:onTouchMoved(touch, unusedEvent) end + +---Propagate touch events to its parents +---@param event ccui.Widget.TouchEventType +---@param sender ccui.Widget +---@param touch cc.Touch +function Widget:propagateTouchEvent(event, sender, touch) end + +---when a widget calls this method, it will get focus immediately. +function Widget:requestFocus() end + +---Set the tag of action. +---@param tag integer # A integer tag value. +function Widget:setActionTag(tag) end + +---Sets whether the widget is bright +--- +---The default value is true, a widget is default to bright +--- +---@param bright boolean # true if the widget is bright, false if the widget is dark. +function Widget:setBright(bright) end + +---To set the bright style of widget. +--- +---\see BrightStyle +--- +---@param style ccui.Widget.BrightStyle # BrightStyle::NORMAL means the widget is in normal state, BrightStyle::HIGHLIGHT means the widget is in highlight state. +function Widget:setBrightStyle(style) end + +---Set callback name. +---@param callbackName string # A string representation of callback name. +function Widget:setCallbackName(callbackName) end + +---Set callback type. +---@param callbackType string # A string representation of callback type. +function Widget:setCallbackType(callbackType) end + +---Sets whether the widget is enabled +--- +---true if the widget is enabled, widget may be touched , false if the widget is disabled, widget cannot be touched. +--- +---Note: If you want to change the widget's appearance to disabled state, you should also call `setBright(false)`. +--- +---The default value is true, a widget is default to enable touch. +--- +---@param enabled boolean # Set to true to enable touch, false otherwise. +function Widget:setEnabled(enabled) end + +---Sets whether the widget should be flipped horizontally or not. +--- +---@param flippedX boolean # true if the widget should be flipped horizontally, false otherwise. +function Widget:setFlippedX(flippedX) end + +---Sets whether the widget should be flipped vertically or not. +--- +---@param flippedY boolean # true if the widget should be flipped vertically, false otherwise. +function Widget:setFlippedY(flippedY) end + +---Allow widget to accept focus. +---@param enable boolean # pass true/false to enable/disable the focus ability of a widget +function Widget:setFocusEnabled(enable) end + +---Toggle widget focus status. +---@param focus boolean # pass true to let the widget get focus or pass false to let the widget lose focus +function Widget:setFocused(focus) end + +---Sets whether the widget is highlighted +--- +---The default value is false, a widget is default to not highlighted +--- +---@param highlight boolean # true if the widget is highlighted, false if the widget is not highlighted. +function Widget:setHighlighted(highlight) end + +---Toggle layout component enable. +---@param enable boolean # Layout Component of a widget +function Widget:setLayoutComponentEnabled(enable) end + +---Sets a LayoutParameter to widget. +--- +---\see LayoutParameter +---@param parameter ccui.LayoutParameter # LayoutParameter pointer +function Widget:setLayoutParameter(parameter) end + +---Set the percent(x,y) of the widget in OpenGL coordinates +--- +---@param percent cc.Vec2 # The percent (x,y) of the widget in OpenGL coordinates +function Widget:setPositionPercent(percent) end + +---Changes the position type of the widget +--- +---\see `PositionType` +--- +---@param type ccui.Widget.PositionType # the position type of widget +function Widget:setPositionType(type) end + +---Allow widget touch events to propagate to its parents. Set false will disable propagation +---@param isPropagate boolean # True to allow propagation, false otherwise. +---\since v3.3 +function Widget:setPropagateTouchEvents(isPropagate) end + +---Changes the percent that is widget's percent size +--- +---@param percent cc.Vec2 # that is widget's percent size +function Widget:setSizePercent(percent) end + +---Changes the size type of widget. +--- +---\see `SizeType` +--- +---@param type ccui.Widget.SizeType # that is widget's size type +function Widget:setSizeType(type) end + +---Toggle widget swallow touch option. +---Specify widget to swallow touches or not +---@param swallow boolean # True to swallow touch, false otherwise. +---\since v3.3 +function Widget:setSwallowTouches(swallow) end + +---Sets whether the widget is touch enabled. +--- +---The default value is false, a widget is default to touch disabled. +--- +---@param enabled boolean # True if the widget is touch enabled, false if the widget is touch disabled. +function Widget:setTouchEnabled(enabled) end + +---Toggle use unify size. +---@param enable boolean # True to use unify size, false otherwise. +function Widget:setUnifySizeEnabled(enable) end + +---Update all children's contents size and position recursively. +---\see `updateSizeAndPosition(const Size&)` +--- +---Update all children's contents size and position recursively. +---@overload fun(self: ccui.Widget, parentSize: cc.Size) +function Widget:updateSizeAndPosition() end + +return Widget \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccui/Widget/BrightStyle.lua b/addons/cclua/cocos2d/library/ccui/Widget/BrightStyle.lua new file mode 100644 index 00000000..052c79a9 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccui/Widget/BrightStyle.lua @@ -0,0 +1,15 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccui.Widget.BrightStyle + +---@type ccui.Widget.BrightStyle +local VALUE + +--- +---@enum ccui.Widget.BrightStyle +local BrightStyle = { + HIGHLIGHT = 1, + NONE = -1, + NORMAL = 0, +} + +return BrightStyle \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccui/Widget/FocusDirection.lua b/addons/cclua/cocos2d/library/ccui/Widget/FocusDirection.lua new file mode 100644 index 00000000..adcaf833 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccui/Widget/FocusDirection.lua @@ -0,0 +1,16 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccui.Widget.FocusDirection + +---@type ccui.Widget.FocusDirection +local VALUE + +--- +---@enum ccui.Widget.FocusDirection +local FocusDirection = { + DOWN = 3, + LEFT = 0, + RIGHT = 1, + UP = 2, +} + +return FocusDirection \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccui/Widget/PositionType.lua b/addons/cclua/cocos2d/library/ccui/Widget/PositionType.lua new file mode 100644 index 00000000..c5bca9f1 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccui/Widget/PositionType.lua @@ -0,0 +1,14 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccui.Widget.PositionType + +---@type ccui.Widget.PositionType +local VALUE + +--- +---@enum ccui.Widget.PositionType +local PositionType = { + ABSOLUTE = 0, + PERCENT = 1, +} + +return PositionType \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccui/Widget/SizeType.lua b/addons/cclua/cocos2d/library/ccui/Widget/SizeType.lua new file mode 100644 index 00000000..c59d4b5c --- /dev/null +++ b/addons/cclua/cocos2d/library/ccui/Widget/SizeType.lua @@ -0,0 +1,14 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccui.Widget.SizeType + +---@type ccui.Widget.SizeType +local VALUE + +--- +---@enum ccui.Widget.SizeType +local SizeType = { + ABSOLUTE = 0, + PERCENT = 1, +} + +return SizeType \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccui/Widget/TextureResType.lua b/addons/cclua/cocos2d/library/ccui/Widget/TextureResType.lua new file mode 100644 index 00000000..c8683e15 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccui/Widget/TextureResType.lua @@ -0,0 +1,14 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccui.Widget.TextureResType + +---@type ccui.Widget.TextureResType +local VALUE + +--- +---@enum ccui.Widget.TextureResType +local TextureResType = { + LOCAL = 0, + PLIST = 1, +} + +return TextureResType \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccui/Widget/TouchEventType.lua b/addons/cclua/cocos2d/library/ccui/Widget/TouchEventType.lua new file mode 100644 index 00000000..63370ba8 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccui/Widget/TouchEventType.lua @@ -0,0 +1,16 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccui.Widget.TouchEventType + +---@type ccui.Widget.TouchEventType +local VALUE + +--- +---@enum ccui.Widget.TouchEventType +local TouchEventType = { + BEGAN = 0, + CANCELED = 3, + ENDED = 2, + MOVED = 1, +} + +return TouchEventType \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccui/Widget/ccWidgetClickCallback.lua b/addons/cclua/cocos2d/library/ccui/Widget/ccWidgetClickCallback.lua new file mode 100644 index 00000000..ff9d2c52 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccui/Widget/ccWidgetClickCallback.lua @@ -0,0 +1,14 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccui.Widget.ccWidgetClickCallback + +--- +--- +---std::function +---@class ccui.Widget.ccWidgetClickCallback +local ccWidgetClickCallback = {} + +---@return ccui.Widget.ccWidgetClickCallback + +function ccWidgetClickCallback:__call() end + +return ccWidgetClickCallback \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccui/Widget/ccWidgetEventCallback.lua b/addons/cclua/cocos2d/library/ccui/Widget/ccWidgetEventCallback.lua new file mode 100644 index 00000000..7b4d1b14 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccui/Widget/ccWidgetEventCallback.lua @@ -0,0 +1,14 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccui.Widget.ccWidgetEventCallback + +--- +--- +---std::function +---@class ccui.Widget.ccWidgetEventCallback +local ccWidgetEventCallback = {} + +---@return ccui.Widget.ccWidgetEventCallback + +function ccWidgetEventCallback:__call() end + +return ccWidgetEventCallback \ No newline at end of file diff --git a/addons/cclua/cocos2d/library/ccui/Widget/ccWidgetTouchCallback.lua b/addons/cclua/cocos2d/library/ccui/Widget/ccWidgetTouchCallback.lua new file mode 100644 index 00000000..3d9d2362 --- /dev/null +++ b/addons/cclua/cocos2d/library/ccui/Widget/ccWidgetTouchCallback.lua @@ -0,0 +1,14 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta ccui.Widget.ccWidgetTouchCallback + +--- +--- +---std::function +---@class ccui.Widget.ccWidgetTouchCallback +local ccWidgetTouchCallback = {} + +---@return ccui.Widget.ccWidgetTouchCallback + +function ccWidgetTouchCallback:__call() end + +return ccWidgetTouchCallback \ No newline at end of file diff --git a/addons/cclua/fairygui/config.json b/addons/cclua/fairygui/config.json new file mode 100644 index 00000000..710d62ae --- /dev/null +++ b/addons/cclua/fairygui/config.json @@ -0,0 +1,6 @@ +{ + "$schema": "https://raw.githubusercontent.com/LuaLS/LLS-Addons/main/schemas/addon_config.schema.json", + "words": ["%s+-fairygui"], + "files": ["fairygui"], + "settings": {} +} \ No newline at end of file diff --git a/addons/cclua/fairygui/library/fgui/AutoSizeType.lua b/addons/cclua/fairygui/library/fgui/AutoSizeType.lua new file mode 100644 index 00000000..2dfcf60e --- /dev/null +++ b/addons/cclua/fairygui/library/fgui/AutoSizeType.lua @@ -0,0 +1,16 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta fgui.AutoSizeType + +---@type fgui.AutoSizeType +local VALUE + +--- +---@enum fgui.AutoSizeType +local AutoSizeType = { + BOTH = 1, + HEIGHT = 2, + NONE = 0, + SHRINK = 3, +} + +return AutoSizeType \ No newline at end of file diff --git a/addons/cclua/fairygui/library/fgui/ButtonMode.lua b/addons/cclua/fairygui/library/fgui/ButtonMode.lua new file mode 100644 index 00000000..dc0c7c30 --- /dev/null +++ b/addons/cclua/fairygui/library/fgui/ButtonMode.lua @@ -0,0 +1,15 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta fgui.ButtonMode + +---@type fgui.ButtonMode +local VALUE + +--- +---@enum fgui.ButtonMode +local ButtonMode = { + CHECK = 1, + COMMON = 0, + RADIO = 2, +} + +return ButtonMode \ No newline at end of file diff --git a/addons/cclua/fairygui/library/fgui/ChildrenRenderOrder.lua b/addons/cclua/fairygui/library/fgui/ChildrenRenderOrder.lua new file mode 100644 index 00000000..c2861b46 --- /dev/null +++ b/addons/cclua/fairygui/library/fgui/ChildrenRenderOrder.lua @@ -0,0 +1,15 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta fgui.ChildrenRenderOrder + +---@type fgui.ChildrenRenderOrder +local VALUE + +--- +---@enum fgui.ChildrenRenderOrder +local ChildrenRenderOrder = { + ARCH = 2, + ASCENT = 0, + DESCENT = 1, +} + +return ChildrenRenderOrder \ No newline at end of file diff --git a/addons/cclua/fairygui/library/fgui/DragDropManager.lua b/addons/cclua/fairygui/library/fgui/DragDropManager.lua new file mode 100644 index 00000000..c938aa81 --- /dev/null +++ b/addons/cclua/fairygui/library/fgui/DragDropManager.lua @@ -0,0 +1,38 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta fgui.DragDropManager + +--- +---@class fgui.DragDropManager +---@field agent fgui.GLoader +---@field dragging boolean +---@field instance fgui.DragDropManager +local DragDropManager = {} + +---@return any +function DragDropManager:__gc() end + +---@return any +function DragDropManager:__olua_move() end + +function DragDropManager:cancel() end + +---@return fgui.GLoader +function DragDropManager:getAgent() end + +---@return fgui.DragDropManager +function DragDropManager.getInstance() end + +---@return boolean +function DragDropManager:isDragging() end + +---@return fgui.DragDropManager +function DragDropManager.new() end + +---@param icon string +---@param sourceData any +---@param touchPointID integer +---@overload fun(self: fgui.DragDropManager, icon: string) +---@overload fun(self: fgui.DragDropManager, icon: string, sourceData: any) +function DragDropManager:startDrag(icon, sourceData, touchPointID) end + +return DragDropManager \ No newline at end of file diff --git a/addons/cclua/fairygui/library/fgui/EaseManager.lua b/addons/cclua/fairygui/library/fgui/EaseManager.lua new file mode 100644 index 00000000..d628d5b9 --- /dev/null +++ b/addons/cclua/fairygui/library/fgui/EaseManager.lua @@ -0,0 +1,22 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta fgui.EaseManager + +--- +---@class fgui.EaseManager +local EaseManager = {} + +---@return any +function EaseManager:__gc() end + +---@return any +function EaseManager:__olua_move() end + +---@param easeType fgui.EaseType +---@param time number +---@param duration number +---@param overshootOrAmplitude number +---@param period number +---@return number +function EaseManager.evaluate(easeType, time, duration, overshootOrAmplitude, period) end + +return EaseManager \ No newline at end of file diff --git a/addons/cclua/fairygui/library/fgui/EaseType.lua b/addons/cclua/fairygui/library/fgui/EaseType.lua new file mode 100644 index 00000000..925c815a --- /dev/null +++ b/addons/cclua/fairygui/library/fgui/EaseType.lua @@ -0,0 +1,44 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta fgui.EaseType + +---@type fgui.EaseType +local VALUE + +--- +---@enum fgui.EaseType +local EaseType = { + BackIn = 25, + BackInOut = 27, + BackOut = 26, + BounceIn = 28, + BounceInOut = 30, + BounceOut = 29, + CircIn = 19, + CircInOut = 21, + CircOut = 20, + CubicIn = 7, + CubicInOut = 9, + CubicOut = 8, + Custom = 31, + ElasticIn = 22, + ElasticInOut = 24, + ElasticOut = 23, + ExpoIn = 16, + ExpoInOut = 18, + ExpoOut = 17, + Linear = 0, + QuadIn = 4, + QuadInOut = 6, + QuadOut = 5, + QuartIn = 10, + QuartInOut = 12, + QuartOut = 11, + QuintIn = 13, + QuintInOut = 15, + QuintOut = 14, + SineIn = 1, + SineInOut = 3, + SineOut = 2, +} + +return EaseType \ No newline at end of file diff --git a/addons/cclua/fairygui/library/fgui/EventCallback.lua b/addons/cclua/fairygui/library/fgui/EventCallback.lua new file mode 100644 index 00000000..70d559c4 --- /dev/null +++ b/addons/cclua/fairygui/library/fgui/EventCallback.lua @@ -0,0 +1,14 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta fgui.EventCallback + +--- +--- +---std::function +---@class fgui.EventCallback +local EventCallback = {} + +---@return fgui.EventCallback + +function EventCallback:__call() end + +return EventCallback \ No newline at end of file diff --git a/addons/cclua/fairygui/library/fgui/EventContext.lua b/addons/cclua/fairygui/library/fgui/EventContext.lua new file mode 100644 index 00000000..09efefd0 --- /dev/null +++ b/addons/cclua/fairygui/library/fgui/EventContext.lua @@ -0,0 +1,49 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta fgui.EventContext + +--- +---@class fgui.EventContext +---@field data any +---@field dataValue any +---@field defaultPrevented boolean +---@field input fgui.InputEvent +---@field sender cc.Ref +---@field type integer +local EventContext = {} + +---@return any +function EventContext:__gc() end + +---@return any +function EventContext:__olua_move() end + +function EventContext:captureTouch() end + +---@return any +function EventContext:getData() end + +---@return any +function EventContext:getDataValue() end + +---@return fgui.InputEvent +function EventContext:getInput() end + +---@return cc.Ref +function EventContext:getSender() end + +---@return integer +function EventContext:getType() end + +---@return boolean +function EventContext:isDefaultPrevented() end + +---@return fgui.EventContext +function EventContext.new() end + +function EventContext:preventDefault() end + +function EventContext:stopPropagation() end + +function EventContext:uncaptureTouch() end + +return EventContext \ No newline at end of file diff --git a/addons/cclua/fairygui/library/fgui/FUIContainer.lua b/addons/cclua/fairygui/library/fgui/FUIContainer.lua new file mode 100644 index 00000000..10ca8029 --- /dev/null +++ b/addons/cclua/fairygui/library/fgui/FUIContainer.lua @@ -0,0 +1,50 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta fgui.FUIContainer + +--- +---@class fgui.FUIContainer : cc.Node +---@field alphaThreshold number +---@field clippingEnabled boolean +---@field clippingRegion cc.Rect +---@field inverted boolean +---@field stencil cc.Node +---@field gOwner fgui.GObject +local FUIContainer = {} + +---@return fgui.FUIContainer +function FUIContainer.create() end + +---@return number +function FUIContainer:getAlphaThreshold() end + +---@return cc.Rect +function FUIContainer:getClippingRegion() end + +---@return cc.Node +function FUIContainer:getStencil() end + +---@return boolean +function FUIContainer:isClippingEnabled() end + +---@return boolean +function FUIContainer:isInverted() end + +---@return fgui.FUIContainer +function FUIContainer.new() end + +---@param alphaThreshold number +function FUIContainer:setAlphaThreshold(alphaThreshold) end + +---@param value boolean +function FUIContainer:setClippingEnabled(value) end + +---@param clippingRegion cc.Rect +function FUIContainer:setClippingRegion(clippingRegion) end + +---@param inverted boolean +function FUIContainer:setInverted(inverted) end + +---@param stencil cc.Node +function FUIContainer:setStencil(stencil) end + +return FUIContainer \ No newline at end of file diff --git a/addons/cclua/fairygui/library/fgui/FUIInput.lua b/addons/cclua/fairygui/library/fgui/FUIInput.lua new file mode 100644 index 00000000..e20837ac --- /dev/null +++ b/addons/cclua/fairygui/library/fgui/FUIInput.lua @@ -0,0 +1,43 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta fgui.FUIInput + +--- +---@class fgui.FUIInput : ccui.EditBox +---@field password boolean +---@field singleLine boolean +---@field textFormat fgui.TextFormat +local FUIInput = {} + +function FUIInput:applyTextFormat() end + +---@return fgui.FUIInput +function FUIInput.create() end + +---@return fgui.TextFormat +function FUIInput:getTextFormat() end + +---@return boolean +function FUIInput:isPassword() end + +---@return boolean +function FUIInput:isSingleLine() end + +---@return integer +function FUIInput:keyboardType() end + +---@return fgui.FUIInput +function FUIInput.new() end + +---@param value integer +function FUIInput:setKeyboardType(value) end + +---@param value boolean +function FUIInput:setPassword(value) end + +---@param value boolean +function FUIInput:setSingleLine(value) end + +---@param value string +function FUIInput:setText(value) end + +return FUIInput \ No newline at end of file diff --git a/addons/cclua/fairygui/library/fgui/FUILabel.lua b/addons/cclua/fairygui/library/fgui/FUILabel.lua new file mode 100644 index 00000000..95ab3d08 --- /dev/null +++ b/addons/cclua/fairygui/library/fgui/FUILabel.lua @@ -0,0 +1,46 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta fgui.FUILabel + +--- +---@class fgui.FUILabel : cc.Label +---@field text string +---@field textFormat fgui.TextFormat +local FUILabel = {} + +function FUILabel:applyTextFormat() end + +---@return fgui.FUILabel +function FUILabel.create() end + +---@return string +function FUILabel:getText() end + +---@return fgui.TextFormat +function FUILabel:getTextFormat() end + +---@return fgui.FUILabel +function FUILabel.new() end + +---@param bmfontFilePath string +---@param imageOffset cc.Vec2 +---@param fontSize number +---@return boolean +---@overload fun(self: fgui.FUILabel, bmfontFilePath: string, imageOffset: cc.Vec2): boolean +---@overload fun(self: fgui.FUILabel, bmfontFilePath: string, fontSize: number): boolean +---@overload fun(self: fgui.FUILabel, bmfontFilePath: string): boolean +---@overload fun(self: fgui.FUILabel, bmfontFilePath: string, imageRect: cc.Rect, imageRotated: boolean, fontSize: number): boolean +---@overload fun(self: fgui.FUILabel, bmfontFilePath: string, imageRect: cc.Rect, imageRotated: boolean): boolean +---@overload fun(self: fgui.FUILabel, bmfontFilePath: string, subTextureKey: string, fontSize: number): boolean +---@overload fun(self: fgui.FUILabel, bmfontFilePath: string, subTextureKey: string): boolean +function FUILabel:setBMFontFilePath(bmfontFilePath, imageOffset, fontSize) end + +---@param value boolean +function FUILabel:setGrayed(value) end + +---@param value string +function FUILabel:setText(value) end + +---@param value any +function FUILabel:setUnderlineColor(value) end + +return FUILabel \ No newline at end of file diff --git a/addons/cclua/fairygui/library/fgui/FUIRichText.lua b/addons/cclua/fairygui/library/fgui/FUIRichText.lua new file mode 100644 index 00000000..51dd8b01 --- /dev/null +++ b/addons/cclua/fairygui/library/fgui/FUIRichText.lua @@ -0,0 +1,69 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta fgui.FUIRichText + +--- +---@class fgui.FUIRichText : cc.Node +---@field anchorFontColor any +---@field anchorTextUnderline boolean +---@field controls fgui.HtmlObject[] +---@field overflow cc.Label.Overflow +---@field textFormat fgui.TextFormat +local FUIRichText = {} + +function FUIRichText:applyTextFormat() end + +---@return fgui.FUIRichText +function FUIRichText.create() end + +---@return any +function FUIRichText:getAnchorFontColor() end + +---@param name string +---@return fgui.HtmlObject +function FUIRichText:getControl(name) end + +---@return fgui.HtmlObject[] +function FUIRichText:getControls() end + +---@return cc.Size +function FUIRichText:getDimensions() end + +---@return cc.Label.Overflow +function FUIRichText:getOverflow() end + +---@return fgui.TextFormat +function FUIRichText:getTextFormat() end + +---@param worldPoint cc.Vec2 +---@return string +function FUIRichText:hitTestLink(worldPoint) end + +---@return boolean +function FUIRichText:isAnchorTextUnderline() end + +---@return fgui.FUIRichText +function FUIRichText.new() end + +---@return fgui.HtmlParseOptions +function FUIRichText:parseOptions() end + +---@param color any +function FUIRichText:setAnchorFontColor(color) end + +---@param enable boolean +function FUIRichText:setAnchorTextUnderline(enable) end + +---@param width number +---@param height number +function FUIRichText:setDimensions(width, height) end + +---@param value fun(arg1: fgui.HtmlElement): fgui.HtmlObject +function FUIRichText:setObjectFactory(value) end + +---@param overflow cc.Label.Overflow +function FUIRichText:setOverflow(overflow) end + +---@param value string +function FUIRichText:setText(value) end + +return FUIRichText \ No newline at end of file diff --git a/addons/cclua/fairygui/library/fgui/FUISprite.lua b/addons/cclua/fairygui/library/fgui/FUISprite.lua new file mode 100644 index 00000000..25fc8e43 --- /dev/null +++ b/addons/cclua/fairygui/library/fgui/FUISprite.lua @@ -0,0 +1,57 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta fgui.FUISprite + +--- +---@class fgui.FUISprite : cc.Sprite +---@field fillAmount number +---@field fillClockwise boolean +---@field fillMethod fgui.FillMethod +---@field fillOrigin fgui.FillOrigin +---@field scaleByTile boolean +local FUISprite = {} + +function FUISprite:clearContent() end + +---@return fgui.FUISprite +function FUISprite.create() end + +---@return number +function FUISprite:getFillAmount() end + +---@return fgui.FillMethod +function FUISprite:getFillMethod() end + +---@return fgui.FillOrigin +function FUISprite:getFillOrigin() end + +---@return boolean +function FUISprite:isFillClockwise() end + +---@return boolean +function FUISprite:isScaleByTile() end + +---@return fgui.FUISprite +function FUISprite.new() end + +---@param value number +function FUISprite:setFillAmount(value) end + +---@param value boolean +function FUISprite:setFillClockwise(value) end + +---@param value fgui.FillMethod +function FUISprite:setFillMethod(value) end + +---@param value fgui.FillOrigin +function FUISprite:setFillOrigin(value) end + +---@param value boolean +function FUISprite:setGrayed(value) end + +---@param value cc.Rect +function FUISprite:setScale9Grid(value) end + +---@param value boolean +function FUISprite:setScaleByTile(value) end + +return FUISprite \ No newline at end of file diff --git a/addons/cclua/fairygui/library/fgui/FillMethod.lua b/addons/cclua/fairygui/library/fgui/FillMethod.lua new file mode 100644 index 00000000..2c97d378 --- /dev/null +++ b/addons/cclua/fairygui/library/fgui/FillMethod.lua @@ -0,0 +1,18 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta fgui.FillMethod + +---@type fgui.FillMethod +local VALUE + +--- +---@enum fgui.FillMethod +local FillMethod = { + Horizontal = 1, + None = 0, + Radial180 = 4, + Radial360 = 5, + Radial90 = 3, + Vertical = 2, +} + +return FillMethod \ No newline at end of file diff --git a/addons/cclua/fairygui/library/fgui/FillOrigin.lua b/addons/cclua/fairygui/library/fgui/FillOrigin.lua new file mode 100644 index 00000000..9023361a --- /dev/null +++ b/addons/cclua/fairygui/library/fgui/FillOrigin.lua @@ -0,0 +1,16 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta fgui.FillOrigin + +---@type fgui.FillOrigin +local VALUE + +--- +---@enum fgui.FillOrigin +local FillOrigin = { + Bottom = 1, + Left = 2, + Right = 3, + Top = 0, +} + +return FillOrigin \ No newline at end of file diff --git a/addons/cclua/fairygui/library/fgui/FlipType.lua b/addons/cclua/fairygui/library/fgui/FlipType.lua new file mode 100644 index 00000000..f42cbc25 --- /dev/null +++ b/addons/cclua/fairygui/library/fgui/FlipType.lua @@ -0,0 +1,16 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta fgui.FlipType + +---@type fgui.FlipType +local VALUE + +--- +---@enum fgui.FlipType +local FlipType = { + BOTH = 3, + HORIZONTAL = 1, + NONE = 0, + VERTICAL = 2, +} + +return FlipType \ No newline at end of file diff --git a/addons/cclua/fairygui/library/fgui/GBasicTextField.lua b/addons/cclua/fairygui/library/fgui/GBasicTextField.lua new file mode 100644 index 00000000..79f449af --- /dev/null +++ b/addons/cclua/fairygui/library/fgui/GBasicTextField.lua @@ -0,0 +1,14 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta fgui.GBasicTextField + +--- +---@class fgui.GBasicTextField : fgui.GTextField +local GBasicTextField = {} + +---@return fgui.GBasicTextField +function GBasicTextField.create() end + +---@return fgui.GBasicTextField +function GBasicTextField.new() end + +return GBasicTextField \ No newline at end of file diff --git a/addons/cclua/fairygui/library/fgui/GButton.lua b/addons/cclua/fairygui/library/fgui/GButton.lua new file mode 100644 index 00000000..61959181 --- /dev/null +++ b/addons/cclua/fairygui/library/fgui/GButton.lua @@ -0,0 +1,80 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta fgui.GButton + +--- +---@class fgui.GButton : fgui.GComponent +---@field changeStateOnClick boolean +---@field relatedController fgui.GController +---@field selected boolean +---@field selectedIcon string +---@field selectedTitle string +---@field textField fgui.GTextField +---@field title string +---@field titleColor any +---@field titleFontSize integer +---@field DISABLED string +---@field DOWN string +---@field OVER string +---@field SELECTED_DISABLED string +---@field SELECTED_OVER string +---@field UP string +local GButton = {} + +---@return fgui.GButton +function GButton.create() end + +---@return fgui.GController +function GButton:getRelatedController() end + +---@return string +function GButton:getSelectedIcon() end + +---@return string +function GButton:getSelectedTitle() end + +---@return fgui.GTextField +function GButton:getTextField() end + +---@return string +function GButton:getTitle() end + +---@return any +function GButton:getTitleColor() end + +---@return integer +function GButton:getTitleFontSize() end + +---@return boolean +function GButton:isChangeStateOnClick() end + +---@return boolean +function GButton:isSelected() end + +---@return fgui.GButton +function GButton.new() end + +---@param value boolean +function GButton:setChangeStateOnClick(value) end + +---@param c fgui.GController +function GButton:setRelatedController(c) end + +---@param value boolean +function GButton:setSelected(value) end + +---@param value string +function GButton:setSelectedIcon(value) end + +---@param value string +function GButton:setSelectedTitle(value) end + +---@param value string +function GButton:setTitle(value) end + +---@param value any +function GButton:setTitleColor(value) end + +---@param value integer +function GButton:setTitleFontSize(value) end + +return GButton \ No newline at end of file diff --git a/addons/cclua/fairygui/library/fgui/GComboBox.lua b/addons/cclua/fairygui/library/fgui/GComboBox.lua new file mode 100644 index 00000000..7aee22b3 --- /dev/null +++ b/addons/cclua/fairygui/library/fgui/GComboBox.lua @@ -0,0 +1,80 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta fgui.GComboBox + +--- +---@class fgui.GComboBox : fgui.GComponent +---@field dropdown fgui.GObject +---@field icons cc.types.VectorString +---@field items cc.types.VectorString +---@field selectedIndex integer +---@field selectionController fgui.GController +---@field textField fgui.GTextField +---@field title string +---@field titleColor any +---@field titleFontSize integer +---@field value string +---@field values cc.types.VectorString +---@field popupDirection fgui.PopupDirection +---@field visibleItemCount integer +local GComboBox = {} + +---@return fgui.GComboBox +function GComboBox.create() end + +---@return fgui.GObject +function GComboBox:getDropdown() end + +---@return cc.types.VectorString +function GComboBox:getIcons() end + +---@return cc.types.VectorString +function GComboBox:getItems() end + +---@return integer +function GComboBox:getSelectedIndex() end + +---@return fgui.GController +function GComboBox:getSelectionController() end + +---@return fgui.GTextField +function GComboBox:getTextField() end + +---@return string +function GComboBox:getTitle() end + +---@return any +function GComboBox:getTitleColor() end + +---@return integer +function GComboBox:getTitleFontSize() end + +---@return string +function GComboBox:getValue() end + +---@return cc.types.VectorString +function GComboBox:getValues() end + +---@return fgui.GComboBox +function GComboBox.new() end + +function GComboBox:refresh() end + +---@param value integer +function GComboBox:setSelectedIndex(value) end + +---@param value fgui.GController +function GComboBox:setSelectionController(value) end + +---@param value string +function GComboBox:setTitle(value) end + +---@param value any +function GComboBox:setTitleColor(value) end + +---@param value integer +function GComboBox:setTitleFontSize(value) end + +---@param value string +function GComboBox:setValue(value) end + +return GComboBox \ No newline at end of file diff --git a/addons/cclua/fairygui/library/fgui/GComponent.lua b/addons/cclua/fairygui/library/fgui/GComponent.lua new file mode 100644 index 00000000..925727e6 --- /dev/null +++ b/addons/cclua/fairygui/library/fgui/GComponent.lua @@ -0,0 +1,220 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta fgui.GComponent + +--- +---@class fgui.GComponent : fgui.GObject +---@field apexIndex integer +---@field baseUserData string +---@field children any +---@field childrenRenderOrder fgui.ChildrenRenderOrder +---@field controllers any +---@field firstChildInView integer +---@field hitArea fgui.IHitTest +---@field margin fgui.Margin +---@field mask cc.Node +---@field numChildren integer +---@field opaque boolean +---@field scrollPane fgui.ScrollPane +---@field transitions any +---@field viewHeight number +---@field viewWidth number +local GComponent = {} + +---@return any +function GComponent:__index() end + +---@param child fgui.GObject +---@return fgui.GObject +function GComponent:addChild(child) end + +---@param child fgui.GObject +---@param index integer +---@return fgui.GObject +function GComponent:addChildAt(child, index) end + +---@param c fgui.GController +function GComponent:addController(c) end + +---@param obj fgui.GObject +---@param c fgui.GController +function GComponent:adjustRadioGroupDepth(obj, c) end + +function GComponent:applyAllControllers() end + +---@param c fgui.GController +function GComponent:applyController(c) end + +---@param child fgui.GObject +---@param oldValue integer +---@param newValue integer +function GComponent:childSortingOrderChanged(child, oldValue, newValue) end + +---@param child fgui.GObject +function GComponent:childStateChanged(child) end + +---@return fgui.GComponent +function GComponent.create() end + +function GComponent:ensureBoundsCorrect() end + +---@return integer +function GComponent:getApexIndex() end + +---@return string +function GComponent:getBaseUserData() end + +---@param name string +---@return fgui.GObject +function GComponent:getChild(name) end + +---@param index integer +---@return fgui.GObject +function GComponent:getChildAt(index) end + +---@param id string +---@return fgui.GObject +function GComponent:getChildById(id) end + +---@param path string +---@return fgui.GObject +function GComponent:getChildByPath(path) end + +---@param group fgui.GGroup +---@param name string +---@return fgui.GObject +function GComponent:getChildInGroup(group, name) end + +---@param child fgui.GObject +---@return integer +function GComponent:getChildIndex(child) end + +---@return any +function GComponent:getChildren() end + +---@return fgui.ChildrenRenderOrder +function GComponent:getChildrenRenderOrder() end + +---@param name string +---@return fgui.GController +function GComponent:getController(name) end + +---@param index integer +---@return fgui.GController +function GComponent:getControllerAt(index) end + +---@return any +function GComponent:getControllers() end + +---@return integer +function GComponent:getFirstChildInView() end + +---@return fgui.IHitTest +function GComponent:getHitArea() end + +---@return fgui.Margin +function GComponent:getMargin() end + +---@return cc.Node +function GComponent:getMask() end + +---@return boolean +function GComponent:getOpaque() end + +---@return fgui.ScrollPane +function GComponent:getScrollPane() end + +---@param pt cc.Vec2 +---@return cc.Vec2 +function GComponent:getSnappingPosition(pt) end + +---@param name string +---@return fgui.Transition +function GComponent:getTransition(name) end + +---@param index integer +---@return fgui.Transition +function GComponent:getTransitionAt(index) end + +---@return any +function GComponent:getTransitions() end + +---@return number +function GComponent:getViewHeight() end + +---@return number +function GComponent:getViewWidth() end + +---@param obj fgui.GObject +---@return boolean +function GComponent:isAncestorOf(obj) end + +---@param child fgui.GObject +---@return boolean +function GComponent:isChildInView(child) end + +---@return fgui.GComponent +function GComponent.new() end + +---@param child fgui.GObject +function GComponent:removeChild(child) end + +---@param index integer +function GComponent:removeChildAt(index) end + +---@overload fun(self: fgui.GComponent, beginIndex: integer, endIndex: integer) +function GComponent:removeChildren() end + +---@param c fgui.GController +function GComponent:removeController(c) end + +---@param name string +---@return unknown + +function GComponent:resolve(name) end + +---@param value integer +function GComponent:setApexIndex(value) end + +function GComponent:setBoundsChangedFlag() end + +---@param child fgui.GObject +---@param index integer +function GComponent:setChildIndex(child, index) end + +---@param child fgui.GObject +---@param index integer +---@return integer +function GComponent:setChildIndexBefore(child, index) end + +---@param value fgui.ChildrenRenderOrder +function GComponent:setChildrenRenderOrder(value) end + +---@param value fgui.IHitTest +function GComponent:setHitArea(value) end + +---@param value fgui.Margin +function GComponent:setMargin(value) end + +---@param value cc.Node +---@param inverted boolean +---@overload fun(self: fgui.GComponent, value: cc.Node) +function GComponent:setMask(value, inverted) end + +---@param value boolean +function GComponent:setOpaque(value) end + +---@param value number +function GComponent:setViewHeight(value) end + +---@param value number +function GComponent:setViewWidth(value) end + +---@param child1 fgui.GObject +---@param child2 fgui.GObject +function GComponent:swapChildren(child1, child2) end + +---@param index1 integer +---@param index2 integer +function GComponent:swapChildrenAt(index1, index2) end + +return GComponent \ No newline at end of file diff --git a/addons/cclua/fairygui/library/fgui/GController.lua b/addons/cclua/fairygui/library/fgui/GController.lua new file mode 100644 index 00000000..a026f202 --- /dev/null +++ b/addons/cclua/fairygui/library/fgui/GController.lua @@ -0,0 +1,85 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta fgui.GController + +--- +---@class fgui.GController : fgui.UIEventDispatcher +---@field pageCount integer +---@field parent fgui.GComponent +---@field previousPage string +---@field previousPageId string +---@field previsousIndex integer +---@field selectedIndex integer +---@field selectedPage string +---@field selectedPageId string +---@field autoRadioGroupDepth boolean +---@field changing boolean +---@field name string +local GController = {} + +---@return integer +function GController:getPageCount() end + +---@param index integer +---@return string +function GController:getPageId(index) end + +---@param value string +---@return integer +function GController:getPageIndexById(value) end + +---@param value string +---@return string +function GController:getPageNameById(value) end + +---@return fgui.GComponent +function GController:getParent() end + +---@return string +function GController:getPreviousPage() end + +---@return string +function GController:getPreviousPageId() end + +---@return integer +function GController:getPrevisousIndex() end + +---@return integer +function GController:getSelectedIndex() end + +---@return string +function GController:getSelectedPage() end + +---@return string +function GController:getSelectedPageId() end + +---@param aName string +---@return boolean +function GController:hasPage(aName) end + +---@return fgui.GController +function GController.new() end + +function GController:runActions() end + +---@param value string +function GController:setOppositePageId(value) end + +---@param value fgui.GComponent +function GController:setParent(value) end + +---@param value integer +---@param triggerEvent boolean +---@overload fun(self: fgui.GController, value: integer) +function GController:setSelectedIndex(value, triggerEvent) end + +---@param value string +---@param triggerEvent boolean +---@overload fun(self: fgui.GController, value: string) +function GController:setSelectedPage(value, triggerEvent) end + +---@param value string +---@param triggerEvent boolean +---@overload fun(self: fgui.GController, value: string) +function GController:setSelectedPageId(value, triggerEvent) end + +return GController \ No newline at end of file diff --git a/addons/cclua/fairygui/library/fgui/GGraph.lua b/addons/cclua/fairygui/library/fgui/GGraph.lua new file mode 100644 index 00000000..54041e00 --- /dev/null +++ b/addons/cclua/fairygui/library/fgui/GGraph.lua @@ -0,0 +1,58 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta fgui.GGraph + +--- +---@class fgui.GGraph : fgui.GObject +---@field color any +---@field empty boolean +local GGraph = {} + +---@return fgui.GGraph +function GGraph.create() end + +---@param aWidth number +---@param aHeight number +---@param lineSize integer +---@param lineColor any +---@param fillColor any +function GGraph:drawEllipse(aWidth, aHeight, lineSize, lineColor, fillColor) end + +---@param lineSize integer +---@param lineColor any +---@param fillColor any +---@param points cc.Vec2 +---@param count integer +function GGraph:drawPolygon(lineSize, lineColor, fillColor, points, count) end + +---@param aWidth number +---@param aHeight number +---@param lineSize integer +---@param lineColor any +---@param fillColor any +function GGraph:drawRect(aWidth, aHeight, lineSize, lineColor, fillColor) end + +---@param lineSize integer +---@param lineColor any +---@param fillColor any +---@param sides integer +---@param startAngle number +---@param distances olua.float +---@param distanceCount integer +---@overload fun(self: fgui.GGraph, lineSize: integer, lineColor: any, fillColor: any, sides: integer) +---@overload fun(self: fgui.GGraph, lineSize: integer, lineColor: any, fillColor: any, sides: integer, startAngle: number) +---@overload fun(self: fgui.GGraph, lineSize: integer, lineColor: any, fillColor: any, sides: integer, startAngle: number, distances: olua.float) +function GGraph:drawRegularPolygon(lineSize, lineColor, fillColor, sides, startAngle, distances, distanceCount) end + +---@return any +function GGraph:getColor() end + +---@return boolean +function GGraph:isEmpty() end + +---@return fgui.GGraph +function GGraph.new() end + +---@param value any +function GGraph:setColor(value) end + +return GGraph \ No newline at end of file diff --git a/addons/cclua/fairygui/library/fgui/GGroup.lua b/addons/cclua/fairygui/library/fgui/GGroup.lua new file mode 100644 index 00000000..9f23ef33 --- /dev/null +++ b/addons/cclua/fairygui/library/fgui/GGroup.lua @@ -0,0 +1,75 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta fgui.GGroup + +--- +---@class fgui.GGroup : fgui.GObject +---@field autoSizeDisabled boolean +---@field columnGap integer +---@field excludeInvisibles boolean +---@field layout fgui.GroupLayoutType +---@field lineGap integer +---@field mainGridIndex integer +---@field mainGridMinSize integer +local GGroup = {} + +---@return fgui.GGroup +function GGroup.create() end + +---@return integer +function GGroup:getColumnGap() end + +---@return fgui.GroupLayoutType +function GGroup:getLayout() end + +---@return integer +function GGroup:getLineGap() end + +---@return integer +function GGroup:getMainGridIndex() end + +---@return integer +function GGroup:getMainGridMinSize() end + +---@return boolean +function GGroup:isAutoSizeDisabled() end + +---@return boolean +function GGroup:isExcludeInvisibles() end + +---@param dx number +---@param dy number +function GGroup:moveChildren(dx, dy) end + +---@return fgui.GGroup +function GGroup.new() end + +---@param dw number +---@param dh number +function GGroup:resizeChildren(dw, dh) end + +---@param value boolean +function GGroup:setAutoSizeDisabled(value) end + +---@param positionChangedOnly boolean +---@overload fun(self: fgui.GGroup) +function GGroup:setBoundsChangedFlag(positionChangedOnly) end + +---@param value integer +function GGroup:setColumnGap(value) end + +---@param value boolean +function GGroup:setExcludeInvisibles(value) end + +---@param value fgui.GroupLayoutType +function GGroup:setLayout(value) end + +---@param value integer +function GGroup:setLineGap(value) end + +---@param value integer +function GGroup:setMainGridIndex(value) end + +---@param value integer +function GGroup:setMainGridMinSize(value) end + +return GGroup \ No newline at end of file diff --git a/addons/cclua/fairygui/library/fgui/GImage.lua b/addons/cclua/fairygui/library/fgui/GImage.lua new file mode 100644 index 00000000..47490798 --- /dev/null +++ b/addons/cclua/fairygui/library/fgui/GImage.lua @@ -0,0 +1,56 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta fgui.GImage + +--- +---@class fgui.GImage : fgui.GObject +---@field color any +---@field fillAmount number +---@field fillClockwise boolean +---@field fillMethod fgui.FillMethod +---@field fillOrigin fgui.FillOrigin +---@field flip fgui.FlipType +local GImage = {} + +---@return fgui.GImage +function GImage.create() end + +---@return any +function GImage:getColor() end + +---@return number +function GImage:getFillAmount() end + +---@return fgui.FillMethod +function GImage:getFillMethod() end + +---@return fgui.FillOrigin +function GImage:getFillOrigin() end + +---@return fgui.FlipType +function GImage:getFlip() end + +---@return boolean +function GImage:isFillClockwise() end + +---@return fgui.GImage +function GImage.new() end + +---@param value any +function GImage:setColor(value) end + +---@param value number +function GImage:setFillAmount(value) end + +---@param value boolean +function GImage:setFillClockwise(value) end + +---@param value fgui.FillMethod +function GImage:setFillMethod(value) end + +---@param value fgui.FillOrigin +function GImage:setFillOrigin(value) end + +---@param value fgui.FlipType +function GImage:setFlip(value) end + +return GImage \ No newline at end of file diff --git a/addons/cclua/fairygui/library/fgui/GLabel.lua b/addons/cclua/fairygui/library/fgui/GLabel.lua new file mode 100644 index 00000000..e5b1c561 --- /dev/null +++ b/addons/cclua/fairygui/library/fgui/GLabel.lua @@ -0,0 +1,39 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta fgui.GLabel + +--- +---@class fgui.GLabel : fgui.GComponent +---@field textField fgui.GTextField +---@field title string +---@field titleColor any +---@field titleFontSize integer +local GLabel = {} + +---@return fgui.GLabel +function GLabel.create() end + +---@return fgui.GTextField +function GLabel:getTextField() end + +---@return string +function GLabel:getTitle() end + +---@return any +function GLabel:getTitleColor() end + +---@return integer +function GLabel:getTitleFontSize() end + +---@return fgui.GLabel +function GLabel.new() end + +---@param value string +function GLabel:setTitle(value) end + +---@param value any +function GLabel:setTitleColor(value) end + +---@param value integer +function GLabel:setTitleFontSize(value) end + +return GLabel \ No newline at end of file diff --git a/addons/cclua/fairygui/library/fgui/GList.lua b/addons/cclua/fairygui/library/fgui/GList.lua new file mode 100644 index 00000000..184cd779 --- /dev/null +++ b/addons/cclua/fairygui/library/fgui/GList.lua @@ -0,0 +1,177 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta fgui.GList + +--- +---@class fgui.GList : fgui.GComponent +---@field align cc.TextHAlignment +---@field autoResizeItem boolean +---@field columnCount integer +---@field columnGap integer +---@field defaultItem string +---@field layout fgui.ListLayoutType +---@field lineCount integer +---@field lineGap integer +---@field numItems integer +---@field selectedIndex integer +---@field selectionController fgui.GController +---@field selectionMode fgui.ListSelectionMode +---@field verticalAlign cc.TextVAlignment +---@field virtual boolean +---@field foldInvisibleItems boolean +---@field itemProvider fgui.GList.ListItemProvider +---@field itemRenderer fgui.GList.ListItemRenderer +---@field scrollItemToViewOnClick boolean +local GList = {} + +---@return fgui.GObject +---@overload fun(self: fgui.GList, url: string): fgui.GObject +function GList:addItemFromPool() end + +---@param index integer +---@param scrollItToView boolean +function GList:addSelection(index, scrollItToView) end + +---@param index integer +---@return integer +function GList:childIndexToItemIndex(index) end + +function GList:clearSelection() end + +---@return fgui.GList +function GList.create() end + +---@return cc.TextHAlignment +function GList:getAlign() end + +---@return boolean +function GList:getAutoResizeItem() end + +---@return integer +function GList:getColumnCount() end + +---@return integer +function GList:getColumnGap() end + +---@return string +function GList:getDefaultItem() end + +---@return fgui.GObject +---@overload fun(self: fgui.GList, url: string): fgui.GObject +function GList:getFromPool() end + +---@return fgui.ListLayoutType +function GList:getLayout() end + +---@return integer +function GList:getLineCount() end + +---@return integer +function GList:getLineGap() end + +---@return integer +function GList:getNumItems() end + +---@return integer +function GList:getSelectedIndex() end + +---@param result cc.types.VectorInt +function GList:getSelection(result) end + +---@return fgui.GController +function GList:getSelectionController() end + +---@return fgui.ListSelectionMode +function GList:getSelectionMode() end + +---@return cc.TextVAlignment +function GList:getVerticalAlign() end + +---@param dir integer +function GList:handleArrowKey(dir) end + +---@return boolean +function GList:isVirtual() end + +---@param index integer +---@return integer +function GList:itemIndexToChildIndex(index) end + +---@return fgui.GList +function GList.new() end + +function GList:refreshVirtualList() end + +---@param child fgui.GObject +function GList:removeChildToPool(child) end + +---@param index integer +function GList:removeChildToPoolAt(index) end + +---@overload fun(self: fgui.GList, beginIndex: integer, endIndex: integer) +function GList:removeChildrenToPool() end + +---@param index integer +function GList:removeSelection(index) end + +---@param itemCount integer +---@overload fun(self: fgui.GList, itemCount: integer, minSize: integer) +function GList:resizeToFit(itemCount) end + +---@param obj fgui.GObject +function GList:returnToPool(obj) end + +---@param index integer +---@param ani boolean +---@param setFirst boolean +---@overload fun(self: fgui.GList, index: integer) +---@overload fun(self: fgui.GList, index: integer, ani: boolean) +function GList:scrollToView(index, ani, setFirst) end + +function GList:selectAll() end + +function GList:selectReverse() end + +---@param value cc.TextHAlignment +function GList:setAlign(value) end + +---@param value boolean +function GList:setAutoResizeItem(value) end + +---@param value integer +function GList:setColumnCount(value) end + +---@param value integer +function GList:setColumnGap(value) end + +---@param value string +function GList:setDefaultItem(value) end + +---@param value fgui.ListLayoutType +function GList:setLayout(value) end + +---@param value integer +function GList:setLineCount(value) end + +---@param value integer +function GList:setLineGap(value) end + +---@param value integer +function GList:setNumItems(value) end + +---@param value integer +function GList:setSelectedIndex(value) end + +---@param value fgui.GController +function GList:setSelectionController(value) end + +---@param value fgui.ListSelectionMode +function GList:setSelectionMode(value) end + +---@param value cc.TextVAlignment +function GList:setVerticalAlign(value) end + +function GList:setVirtual() end + +function GList:setVirtualAndLoop() end + +return GList \ No newline at end of file diff --git a/addons/cclua/fairygui/library/fgui/GList/ListItemProvider.lua b/addons/cclua/fairygui/library/fgui/GList/ListItemProvider.lua new file mode 100644 index 00000000..b4ba2958 --- /dev/null +++ b/addons/cclua/fairygui/library/fgui/GList/ListItemProvider.lua @@ -0,0 +1,14 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta fgui.GList.ListItemProvider + +--- +--- +---std::function +---@class fgui.GList.ListItemProvider +local ListItemProvider = {} + +---@return fgui.GList.ListItemProvider + +function ListItemProvider:__call() end + +return ListItemProvider \ No newline at end of file diff --git a/addons/cclua/fairygui/library/fgui/GList/ListItemRenderer.lua b/addons/cclua/fairygui/library/fgui/GList/ListItemRenderer.lua new file mode 100644 index 00000000..33b44ff7 --- /dev/null +++ b/addons/cclua/fairygui/library/fgui/GList/ListItemRenderer.lua @@ -0,0 +1,14 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta fgui.GList.ListItemRenderer + +--- +--- +---std::function +---@class fgui.GList.ListItemRenderer +local ListItemRenderer = {} + +---@return fgui.GList.ListItemRenderer + +function ListItemRenderer:__call() end + +return ListItemRenderer \ No newline at end of file diff --git a/addons/cclua/fairygui/library/fgui/GLoader.lua b/addons/cclua/fairygui/library/fgui/GLoader.lua new file mode 100644 index 00000000..86f44735 --- /dev/null +++ b/addons/cclua/fairygui/library/fgui/GLoader.lua @@ -0,0 +1,113 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta fgui.GLoader + +--- +---@class fgui.GLoader : fgui.GObject +---@field align cc.TextHAlignment +---@field autoSize boolean +---@field color any +---@field component fgui.GComponent +---@field contentSize cc.Size +---@field fill fgui.LoaderFillType +---@field fillAmount number +---@field fillClockwise boolean +---@field fillMethod fgui.FillMethod +---@field fillOrigin fgui.FillOrigin +---@field frame integer +---@field playing boolean +---@field shrinkOnly boolean +---@field url string +---@field verticalAlign cc.TextVAlignment +local GLoader = {} + +---@return fgui.GLoader +function GLoader.create() end + +---@return cc.TextHAlignment +function GLoader:getAlign() end + +---@return boolean +function GLoader:getAutoSize() end + +---@return any +function GLoader:getColor() end + +---@return fgui.GComponent +function GLoader:getComponent() end + +---@return cc.Size +function GLoader:getContentSize() end + +---@return fgui.LoaderFillType +function GLoader:getFill() end + +---@return number +function GLoader:getFillAmount() end + +---@return fgui.FillMethod +function GLoader:getFillMethod() end + +---@return fgui.FillOrigin +function GLoader:getFillOrigin() end + +---@return integer +function GLoader:getFrame() end + +---@return string +function GLoader:getURL() end + +---@return cc.TextVAlignment +function GLoader:getVerticalAlign() end + +---@return boolean +function GLoader:isFillClockwise() end + +---@return boolean +function GLoader:isPlaying() end + +---@return boolean +function GLoader:isShrinkOnly() end + +---@return fgui.GLoader +function GLoader.new() end + +---@param value cc.TextHAlignment +function GLoader:setAlign(value) end + +---@param value boolean +function GLoader:setAutoSize(value) end + +---@param value any +function GLoader:setColor(value) end + +---@param value fgui.LoaderFillType +function GLoader:setFill(value) end + +---@param value number +function GLoader:setFillAmount(value) end + +---@param value boolean +function GLoader:setFillClockwise(value) end + +---@param value fgui.FillMethod +function GLoader:setFillMethod(value) end + +---@param value fgui.FillOrigin +function GLoader:setFillOrigin(value) end + +---@param value integer +function GLoader:setFrame(value) end + +---@param value boolean +function GLoader:setPlaying(value) end + +---@param value boolean +function GLoader:setShrinkOnly(value) end + +---@param value string +function GLoader:setURL(value) end + +---@param value cc.TextVAlignment +function GLoader:setVerticalAlign(value) end + +return GLoader \ No newline at end of file diff --git a/addons/cclua/fairygui/library/fgui/GLoader3D.lua b/addons/cclua/fairygui/library/fgui/GLoader3D.lua new file mode 100644 index 00000000..5c82cde2 --- /dev/null +++ b/addons/cclua/fairygui/library/fgui/GLoader3D.lua @@ -0,0 +1,105 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta fgui.GLoader3D + +--- +---@class fgui.GLoader3D : fgui.GObject +---@field align cc.TextHAlignment +---@field animationName string +---@field autoSize boolean +---@field color any +---@field content cc.Node +---@field fill fgui.LoaderFillType +---@field frame integer +---@field loop boolean +---@field playing boolean +---@field shrinkOnly boolean +---@field skinName string +---@field url string +---@field verticalAlign cc.TextVAlignment +local GLoader3D = {} + +---@return fgui.GLoader3D +function GLoader3D.create() end + +---@return cc.TextHAlignment +function GLoader3D:getAlign() end + +---@return string +function GLoader3D:getAnimationName() end + +---@return boolean +function GLoader3D:getAutoSize() end + +---@return any +function GLoader3D:getColor() end + +---@return cc.Node +function GLoader3D:getContent() end + +---@return fgui.LoaderFillType +function GLoader3D:getFill() end + +---@return integer +function GLoader3D:getFrame() end + +---@return boolean +function GLoader3D:getLoop() end + +---@return string +function GLoader3D:getSkinName() end + +---@return string +function GLoader3D:getURL() end + +---@return cc.TextVAlignment +function GLoader3D:getVerticalAlign() end + +---@return boolean +function GLoader3D:isPlaying() end + +---@return boolean +function GLoader3D:isShrinkOnly() end + +---@return fgui.GLoader3D +function GLoader3D.new() end + +---@param value cc.TextHAlignment +function GLoader3D:setAlign(value) end + +---@param value string +function GLoader3D:setAnimationName(value) end + +---@param value boolean +function GLoader3D:setAutoSize(value) end + +---@param value any +function GLoader3D:setColor(value) end + +---@param value cc.Node +function GLoader3D:setContent(value) end + +---@param value fgui.LoaderFillType +function GLoader3D:setFill(value) end + +---@param value integer +function GLoader3D:setFrame(value) end + +---@param value boolean +function GLoader3D:setLoop(value) end + +---@param value boolean +function GLoader3D:setPlaying(value) end + +---@param value boolean +function GLoader3D:setShrinkOnly(value) end + +---@param value string +function GLoader3D:setSkinName(value) end + +---@param value string +function GLoader3D:setURL(value) end + +---@param value cc.TextVAlignment +function GLoader3D:setVerticalAlign(value) end + +return GLoader3D \ No newline at end of file diff --git a/addons/cclua/fairygui/library/fgui/GMovieClip.lua b/addons/cclua/fairygui/library/fgui/GMovieClip.lua new file mode 100644 index 00000000..0ef5b201 --- /dev/null +++ b/addons/cclua/fairygui/library/fgui/GMovieClip.lua @@ -0,0 +1,64 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta fgui.GMovieClip + +--- +---@class fgui.GMovieClip : fgui.GObject +---@field color any +---@field flip fgui.FlipType +---@field frame integer +---@field playing boolean +---@field timeScale number +local GMovieClip = {} + +---@param time number +function GMovieClip:advance(time) end + +---@return fgui.GMovieClip +function GMovieClip.create() end + +---@return any +function GMovieClip:getColor() end + +---@return fgui.FlipType +function GMovieClip:getFlip() end + +---@return integer +function GMovieClip:getFrame() end + +---@return number +function GMovieClip:getTimeScale() end + +---@return boolean +function GMovieClip:isPlaying() end + +---@return fgui.GMovieClip +function GMovieClip.new() end + +---@param value any +function GMovieClip:setColor(value) end + +---@param value fgui.FlipType +function GMovieClip:setFlip(value) end + +---@param value integer +function GMovieClip:setFrame(value) end + +---@param start integer +---@param end_ integer +---@param times integer +---@param endAt integer +---@param completeCallback fun() +---@overload fun(self: fgui.GMovieClip) +---@overload fun(self: fgui.GMovieClip, start: integer) +---@overload fun(self: fgui.GMovieClip, start: integer, end_: integer) +---@overload fun(self: fgui.GMovieClip, start: integer, end_: integer, times: integer) +---@overload fun(self: fgui.GMovieClip, start: integer, end_: integer, times: integer, endAt: integer) +function GMovieClip:setPlaySettings(start, end_, times, endAt, completeCallback) end + +---@param value boolean +function GMovieClip:setPlaying(value) end + +---@param value number +function GMovieClip:setTimeScale(value) end + +return GMovieClip \ No newline at end of file diff --git a/addons/cclua/fairygui/library/fgui/GObject.lua b/addons/cclua/fairygui/library/fgui/GObject.lua new file mode 100644 index 00000000..d2c6ff5c --- /dev/null +++ b/addons/cclua/fairygui/library/fgui/GObject.lua @@ -0,0 +1,343 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta fgui.GObject + +--- +---@class fgui.GObject : fgui.UIEventDispatcher +---@field alpha number +---@field customData any +---@field data any +---@field displayObject cc.Node +---@field dragBounds cc.Rect +---@field draggable boolean +---@field draggingObject fgui.GObject +---@field grayed boolean +---@field group fgui.GGroup +---@field height number +---@field icon string +---@field packageItem fgui.PackageItem +---@field parent fgui.GComponent +---@field pivot cc.Vec2 +---@field pivotAsAnchor boolean +---@field pixelSnapping boolean +---@field relations fgui.Relations +---@field resourceURL string +---@field root fgui.GRoot +---@field rotation number +---@field scaleX number +---@field scaleY number +---@field size cc.Size +---@field skewX number +---@field skewY number +---@field sortingOrder integer +---@field text string +---@field tooltips string +---@field touchable boolean +---@field visible boolean +---@field width number +---@field x number +---@field xMin number +---@field y number +---@field yMin number +---@field id string +---@field initSize cc.Size +---@field maxSize cc.Size +---@field minSize cc.Size +---@field name string +---@field sourceSize cc.Size +local GObject = {} + +---@param callback fgui.EventCallback +---@overload fun(self: fgui.GObject, callback: fgui.EventCallback, tag: any) +function GObject:addClickListener(callback) end + +---@return integer +function GObject:addDisplayLock() end + +---@param target fgui.GObject +---@param relationType fgui.RelationType +---@param usePercent boolean +---@overload fun(self: fgui.GObject, target: fgui.GObject, relationType: fgui.RelationType) +function GObject:addRelation(target, relationType, usePercent) end + +---@param restraint boolean +---@overload fun(self: fgui.GObject) +function GObject:center(restraint) end + +---@param index integer +---@param c fgui.GController +---@return boolean +function GObject:checkGearController(index, c) end + +---@return fgui.GObject +function GObject.create() end + +---@return fgui.GObject +function GObject:findParent() end + +---@return number +function GObject:getAlpha() end + +---@return any +function GObject:getCustomData() end + +---@return any +function GObject:getData() end + +---@return cc.Rect +function GObject:getDragBounds() end + +---@return fgui.GObject +function GObject.getDraggingObject() end + +---@param index integer +---@return fgui.GearBase +function GObject:getGear(index) end + +---@return fgui.GGroup +function GObject:getGroup() end + +---@return number +function GObject:getHeight() end + +---@return string +function GObject:getIcon() end + +---@return fgui.PackageItem +function GObject:getPackageItem() end + +---@return fgui.GComponent +function GObject:getParent() end + +---@return cc.Vec2 +function GObject:getPivot() end + +---@return cc.Vec2 +function GObject:getPosition() end + +---@param propId fgui.ObjectPropID +---@return any +function GObject:getProp(propId) end + +---@return string +function GObject:getResourceURL() end + +---@return fgui.GRoot +function GObject:getRoot() end + +---@return number +function GObject:getRotation() end + +---@return cc.Vec2 +function GObject:getScale() end + +---@return number +function GObject:getScaleX() end + +---@return number +function GObject:getScaleY() end + +---@return cc.Size +function GObject:getSize() end + +---@return number +function GObject:getSkewX() end + +---@return number +function GObject:getSkewY() end + +---@return integer +function GObject:getSortingOrder() end + +---@return string +function GObject:getText() end + +---@return string +function GObject:getTooltips() end + +---@return number +function GObject:getWidth() end + +---@return number +function GObject:getX() end + +---@return number +function GObject:getXMin() end + +---@return number +function GObject:getY() end + +---@return number +function GObject:getYMin() end + +---@param pt cc.Vec2 +---@return cc.Vec2 +---@overload fun(self: fgui.GObject, rect: cc.Rect): cc.Rect +---@overload fun(self: fgui.GObject, pt: cc.Vec2): cc.Vec2 +---@overload fun(self: fgui.GObject, rect: cc.Rect): cc.Rect +function GObject:globalToLocal(pt) end + +---@param worldPoint cc.Vec2 +---@param camera cc.Camera +---@return fgui.GObject +function GObject:hitTest(worldPoint, camera) end + +---@return boolean +function GObject:isDraggable() end + +---@return boolean +function GObject:isGrayed() end + +---@return boolean +function GObject:isPivotAsAnchor() end + +---@return boolean +function GObject:isPixelSnapping() end + +---@return boolean +function GObject:isTouchable() end + +---@return boolean +function GObject:isVisible() end + +---@param pt cc.Vec2 +---@return cc.Vec2 +---@overload fun(self: fgui.GObject, rect: cc.Rect): cc.Rect +---@overload fun(self: fgui.GObject, pt: cc.Vec2): cc.Vec2 +---@overload fun(self: fgui.GObject, rect: cc.Rect): cc.Rect +function GObject:localToGlobal(pt) end + +function GObject:makeFullScreen() end + +---@return fgui.GObject +function GObject.new() end + +---@return boolean +function GObject:onStage() end + +---@param token integer +function GObject:releaseDisplayLock(token) end + +---@param tag any +function GObject:removeClickListener(tag) end + +function GObject:removeFromParent() end + +---@param target fgui.GObject +---@param relationType fgui.RelationType +function GObject:removeRelation(target, relationType) end + +---@param value number +function GObject:setAlpha(value) end + +---@param value any +function GObject:setCustomData(value) end + +---@param value any +function GObject:setData(value) end + +---@param value cc.Rect +function GObject:setDragBounds(value) end + +---@param value boolean +function GObject:setDraggable(value) end + +---@param value boolean +function GObject:setGrayed(value) end + +---@param value fgui.GGroup +function GObject:setGroup(value) end + +---@param value number +function GObject:setHeight(value) end + +---@param text string +function GObject:setIcon(text) end + +---@param xv number +---@param yv number +---@param asAnchor boolean +---@overload fun(self: fgui.GObject, xv: number, yv: number) +function GObject:setPivot(xv, yv, asAnchor) end + +---@param value boolean +function GObject:setPixelSnapping(value) end + +---@param xv number +---@param yv number +function GObject:setPosition(xv, yv) end + +---@param propId fgui.ObjectPropID +---@param value any +function GObject:setProp(propId, value) end + +---@param value number +function GObject:setRotation(value) end + +---@param xv number +---@param yv number +function GObject:setScale(xv, yv) end + +---@param value number +function GObject:setScaleX(value) end + +---@param value number +function GObject:setScaleY(value) end + +---@param wv number +---@param hv number +---@param ignorePivot boolean +---@overload fun(self: fgui.GObject, wv: number, hv: number) +function GObject:setSize(wv, hv, ignorePivot) end + +---@param value number +function GObject:setSkewX(value) end + +---@param value number +function GObject:setSkewY(value) end + +---@param value integer +function GObject:setSortingOrder(value) end + +---@param text string +function GObject:setText(text) end + +---@param value string +function GObject:setTooltips(value) end + +---@param value boolean +function GObject:setTouchable(value) end + +---@param value boolean +function GObject:setVisible(value) end + +---@param value number +function GObject:setWidth(value) end + +---@param value number +function GObject:setX(value) end + +---@param value number +function GObject:setXMin(value) end + +---@param value number +function GObject:setY(value) end + +---@param value number +function GObject:setYMin(value) end + +---@param touchId integer +---@overload fun(self: fgui.GObject) +function GObject:startDrag(touchId) end + +function GObject:stopDrag() end + +---@param rect cc.Rect +---@param targetSpace fgui.GObject +---@return cc.Rect +---@overload fun(self: fgui.GObject, rect: cc.Rect, targetSpace: fgui.GObject): cc.Rect +function GObject:transformRect(rect, targetSpace) end + +---@return fgui.GTreeNode +function GObject:treeNode() end + +return GObject \ No newline at end of file diff --git a/addons/cclua/fairygui/library/fgui/GPath.lua b/addons/cclua/fairygui/library/fgui/GPath.lua new file mode 100644 index 00000000..d61cc16f --- /dev/null +++ b/addons/cclua/fairygui/library/fgui/GPath.lua @@ -0,0 +1,14 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta fgui.GPath + +--- +---@class fgui.GPath +local GPath = {} + +---@return any +function GPath:__gc() end + +---@return any +function GPath:__olua_move() end + +return GPath \ No newline at end of file diff --git a/addons/cclua/fairygui/library/fgui/GProgressBar.lua b/addons/cclua/fairygui/library/fgui/GProgressBar.lua new file mode 100644 index 00000000..1b6059df --- /dev/null +++ b/addons/cclua/fairygui/library/fgui/GProgressBar.lua @@ -0,0 +1,49 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta fgui.GProgressBar + +--- +---@class fgui.GProgressBar : fgui.GComponent +---@field max number +---@field min number +---@field titleType fgui.ProgressTitleType +---@field value number +local GProgressBar = {} + +---@return fgui.GProgressBar +function GProgressBar.create() end + +---@return number +function GProgressBar:getMax() end + +---@return number +function GProgressBar:getMin() end + +---@return fgui.ProgressTitleType +function GProgressBar:getTitleType() end + +---@return number +function GProgressBar:getValue() end + +---@return fgui.GProgressBar +function GProgressBar.new() end + +---@param value number +function GProgressBar:setMax(value) end + +---@param value number +function GProgressBar:setMin(value) end + +---@param value fgui.ProgressTitleType +function GProgressBar:setTitleType(value) end + +---@param value number +function GProgressBar:setValue(value) end + +---@param value number +---@param duration number +function GProgressBar:tweenValue(value, duration) end + +---@param newValue number +function GProgressBar:update(newValue) end + +return GProgressBar \ No newline at end of file diff --git a/addons/cclua/fairygui/library/fgui/GRichTextField.lua b/addons/cclua/fairygui/library/fgui/GRichTextField.lua new file mode 100644 index 00000000..dd75100a --- /dev/null +++ b/addons/cclua/fairygui/library/fgui/GRichTextField.lua @@ -0,0 +1,18 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta fgui.GRichTextField + +--- +---@class fgui.GRichTextField : fgui.GTextField +local GRichTextField = {} + +---@return fgui.GRichTextField +function GRichTextField.create() end + +---@param name string +---@return fgui.HtmlObject +function GRichTextField:getControl(name) end + +---@return fgui.GRichTextField +function GRichTextField.new() end + +return GRichTextField \ No newline at end of file diff --git a/addons/cclua/fairygui/library/fgui/GRoot.lua b/addons/cclua/fairygui/library/fgui/GRoot.lua new file mode 100644 index 00000000..0fd63c4a --- /dev/null +++ b/addons/cclua/fairygui/library/fgui/GRoot.lua @@ -0,0 +1,133 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta fgui.GRoot + +--- +---@class fgui.GRoot : fgui.GComponent +---@field UIRoot fgui.GRoot +---@field inputProcessor fgui.InputProcessor +---@field instance fgui.GRoot +---@field modalLayer fgui.GGraph +---@field modalWaiting boolean +---@field modalWaitingPane fgui.GObject +---@field soundEnabled boolean +---@field soundVolumeScale number +---@field topWindow fgui.Window +---@field touchTarget fgui.GObject +---@field contentScaleLevel integer +local GRoot = {} + +---@param win fgui.Window +function GRoot:bringToFront(win) end + +function GRoot:closeAllExceptModals() end + +function GRoot:closeAllWindows() end + +function GRoot:closeModalWait() end + +---@param scene cc.Scene +---@param zOrder integer +---@return fgui.GRoot +---@overload fun(scene: cc.Scene): fgui.GRoot +function GRoot.create(scene, zOrder) end + +---@return fgui.InputProcessor +function GRoot:getInputProcessor() end + +---@return fgui.GRoot +function GRoot.getInstance() end + +---@return fgui.GGraph +function GRoot:getModalLayer() end + +---@return fgui.GObject +function GRoot:getModalWaitingPane() end + +---@param popup fgui.GObject +---@param target fgui.GObject +---@param dir fgui.PopupDirection +---@return cc.Vec2 +function GRoot:getPoupPosition(popup, target, dir) end + +---@return number +function GRoot:getSoundVolumeScale() end + +---@return fgui.Window +function GRoot:getTopWindow() end + +---@param touchId integer +---@return cc.Vec2 +function GRoot:getTouchPosition(touchId) end + +---@return fgui.GObject +function GRoot:getTouchTarget() end + +---@return boolean +function GRoot:hasAnyPopup() end + +---@return boolean +function GRoot:hasModalWindow() end + +---@overload fun(self: fgui.GRoot, popup: fgui.GObject) +function GRoot:hidePopup() end + +function GRoot:hideTooltips() end + +---@param win fgui.Window +function GRoot:hideWindow(win) end + +---@param win fgui.Window +function GRoot:hideWindowImmediately(win) end + +---@return boolean +function GRoot:isModalWaiting() end + +---@return boolean +function GRoot:isSoundEnabled() end + +---@return fgui.GRoot +function GRoot.new() end + +---@param url string +---@param volumeScale number +---@overload fun(self: fgui.GRoot, url: string) +function GRoot:playSound(url, volumeScale) end + +---@param pt cc.Vec2 +---@return cc.Vec2 +---@overload fun(self: fgui.GRoot, pt: cc.Vec2): cc.Vec2 +function GRoot:rootToWorld(pt) end + +function GRoot:setNotAsUIRoot() end + +---@param value boolean +function GRoot:setSoundEnabled(value) end + +---@param value number +function GRoot:setSoundVolumeScale(value) end + +function GRoot:showModalWait() end + +---@param popup fgui.GObject +---@overload fun(self: fgui.GRoot, popup: fgui.GObject, target: fgui.GObject, dir: fgui.PopupDirection) +function GRoot:showPopup(popup) end + +---@param msg string +function GRoot:showTooltips(msg) end + +---@param tooltipWin fgui.GObject +function GRoot:showTooltipsWin(tooltipWin) end + +---@param win fgui.Window +function GRoot:showWindow(win) end + +---@param popup fgui.GObject +---@overload fun(self: fgui.GRoot, popup: fgui.GObject, target: fgui.GObject, dir: fgui.PopupDirection) +function GRoot:togglePopup(popup) end + +---@param pt cc.Vec2 +---@return cc.Vec2 +---@overload fun(self: fgui.GRoot, pt: cc.Vec2): cc.Vec2 +function GRoot:worldToRoot(pt) end + +return GRoot \ No newline at end of file diff --git a/addons/cclua/fairygui/library/fgui/GScrollBar.lua b/addons/cclua/fairygui/library/fgui/GScrollBar.lua new file mode 100644 index 00000000..0c287517 --- /dev/null +++ b/addons/cclua/fairygui/library/fgui/GScrollBar.lua @@ -0,0 +1,28 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta fgui.GScrollBar + +--- +---@class fgui.GScrollBar : fgui.GComponent +---@field minSize number +local GScrollBar = {} + +---@return fgui.GScrollBar +function GScrollBar.create() end + +---@return number +function GScrollBar:getMinSize() end + +---@return fgui.GScrollBar +function GScrollBar.new() end + +---@param value number +function GScrollBar:setDisplayPerc(value) end + +---@param target fgui.ScrollPane +---@param vertical boolean +function GScrollBar:setScrollPane(target, vertical) end + +---@param value number +function GScrollBar:setScrollPerc(value) end + +return GScrollBar \ No newline at end of file diff --git a/addons/cclua/fairygui/library/fgui/GSlider.lua b/addons/cclua/fairygui/library/fgui/GSlider.lua new file mode 100644 index 00000000..99fd71e3 --- /dev/null +++ b/addons/cclua/fairygui/library/fgui/GSlider.lua @@ -0,0 +1,51 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta fgui.GSlider + +--- +---@class fgui.GSlider : fgui.GComponent +---@field max number +---@field min number +---@field titleType fgui.ProgressTitleType +---@field value number +---@field wholeNumbers boolean +---@field canDrag boolean +---@field changeOnClick boolean +local GSlider = {} + +---@return fgui.GSlider +function GSlider.create() end + +---@return number +function GSlider:getMax() end + +---@return number +function GSlider:getMin() end + +---@return fgui.ProgressTitleType +function GSlider:getTitleType() end + +---@return number +function GSlider:getValue() end + +---@return boolean +function GSlider:getWholeNumbers() end + +---@return fgui.GSlider +function GSlider.new() end + +---@param value number +function GSlider:setMax(value) end + +---@param value number +function GSlider:setMin(value) end + +---@param value fgui.ProgressTitleType +function GSlider:setTitleType(value) end + +---@param value number +function GSlider:setValue(value) end + +---@param value boolean +function GSlider:setWholeNumbers(value) end + +return GSlider \ No newline at end of file diff --git a/addons/cclua/fairygui/library/fgui/GTextField.lua b/addons/cclua/fairygui/library/fgui/GTextField.lua new file mode 100644 index 00000000..afa6682f --- /dev/null +++ b/addons/cclua/fairygui/library/fgui/GTextField.lua @@ -0,0 +1,74 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta fgui.GTextField + +--- +---@class fgui.GTextField : fgui.GObject +---@field autoSize fgui.AutoSizeType +---@field color any +---@field fontSize number +---@field outlineColor any +---@field singleLine boolean +---@field templateVars cc.types.ValueMap +---@field textFormat fgui.TextFormat +---@field textSize cc.Size +---@field ubbEnabled boolean +local GTextField = {} + +function GTextField:applyTextFormat() end + +function GTextField:flushVars() end + +---@return fgui.AutoSizeType +function GTextField:getAutoSize() end + +---@return any +function GTextField:getColor() end + +---@return number +function GTextField:getFontSize() end + +---@return any +function GTextField:getOutlineColor() end + +---@return cc.types.ValueMap +function GTextField:getTemplateVars() end + +---@return fgui.TextFormat +function GTextField:getTextFormat() end + +---@return cc.Size +function GTextField:getTextSize() end + +---@return boolean +function GTextField:isSingleLine() end + +---@return boolean +function GTextField:isUBBEnabled() end + +---@param value fgui.AutoSizeType +function GTextField:setAutoSize(value) end + +---@param value any +function GTextField:setColor(value) end + +---@param value number +function GTextField:setFontSize(value) end + +---@param value any +function GTextField:setOutlineColor(value) end + +---@param value boolean +function GTextField:setSingleLine(value) end + +---@param value cc.types.ValueMap +function GTextField:setTemplateVars(value) end + +---@param value boolean +function GTextField:setUBBEnabled(value) end + +---@param name string +---@param value any +---@return fgui.GTextField +function GTextField:setVar(name, value) end + +return GTextField \ No newline at end of file diff --git a/addons/cclua/fairygui/library/fgui/GTextInput.lua b/addons/cclua/fairygui/library/fgui/GTextInput.lua new file mode 100644 index 00000000..1263b301 --- /dev/null +++ b/addons/cclua/fairygui/library/fgui/GTextInput.lua @@ -0,0 +1,29 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta fgui.GTextInput + +--- +---@class fgui.GTextInput : fgui.GTextField +local GTextInput = {} + +---@return fgui.GTextInput +function GTextInput.create() end + +---@return fgui.GTextInput +function GTextInput.new() end + +---@param value integer +function GTextInput:setKeyboardType(value) end + +---@param value integer +function GTextInput:setMaxLength(value) end + +---@param value boolean +function GTextInput:setPassword(value) end + +---@param value string +function GTextInput:setPrompt(value) end + +---@param value string +function GTextInput:setRestrict(value) end + +return GTextInput \ No newline at end of file diff --git a/addons/cclua/fairygui/library/fgui/GTree.lua b/addons/cclua/fairygui/library/fgui/GTree.lua new file mode 100644 index 00000000..59fc12d8 --- /dev/null +++ b/addons/cclua/fairygui/library/fgui/GTree.lua @@ -0,0 +1,55 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta fgui.GTree + +--- +---@class fgui.GTree : fgui.GList +---@field clickToExpand integer +---@field indent integer +---@field rootNode fgui.GTreeNode +---@field selectedNode fgui.GTreeNode +---@field treeNodeRender fgui.GTree.TreeNodeRenderFunction +---@field treeNodeWillExpand fgui.GTree.TreeNodeWillExpandFunction +local GTree = {} + +---@param folderNode fgui.GTreeNode +function GTree:collapseAll(folderNode) end + +---@return fgui.GTree +function GTree.create() end + +---@param folderNode fgui.GTreeNode +function GTree:expandAll(folderNode) end + +---@return integer +function GTree:getClickToExpand() end + +---@return integer +function GTree:getIndent() end + +---@return fgui.GTreeNode +function GTree:getRootNode() end + +---@return fgui.GTreeNode +function GTree:getSelectedNode() end + +---@param result fgui.VectorTreeNode +function GTree:getSelectedNodes(result) end + +---@return fgui.GTree +function GTree.new() end + +---@param node fgui.GTreeNode +---@param scrollItToView boolean +---@overload fun(self: fgui.GTree, node: fgui.GTreeNode) +function GTree:selectNode(node, scrollItToView) end + +---@param value integer +function GTree:setClickToExpand(value) end + +---@param value integer +function GTree:setIndent(value) end + +---@param node fgui.GTreeNode +function GTree:unselectNode(node) end + +return GTree \ No newline at end of file diff --git a/addons/cclua/fairygui/library/fgui/GTree/TreeNodeRenderFunction.lua b/addons/cclua/fairygui/library/fgui/GTree/TreeNodeRenderFunction.lua new file mode 100644 index 00000000..55e53bde --- /dev/null +++ b/addons/cclua/fairygui/library/fgui/GTree/TreeNodeRenderFunction.lua @@ -0,0 +1,14 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta fgui.GTree.TreeNodeRenderFunction + +--- +--- +---std::function +---@class fgui.GTree.TreeNodeRenderFunction +local TreeNodeRenderFunction = {} + +---@return fgui.GTree.TreeNodeRenderFunction + +function TreeNodeRenderFunction:__call() end + +return TreeNodeRenderFunction \ No newline at end of file diff --git a/addons/cclua/fairygui/library/fgui/GTree/TreeNodeWillExpandFunction.lua b/addons/cclua/fairygui/library/fgui/GTree/TreeNodeWillExpandFunction.lua new file mode 100644 index 00000000..732d83ad --- /dev/null +++ b/addons/cclua/fairygui/library/fgui/GTree/TreeNodeWillExpandFunction.lua @@ -0,0 +1,14 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta fgui.GTree.TreeNodeWillExpandFunction + +--- +--- +---std::function +---@class fgui.GTree.TreeNodeWillExpandFunction +local TreeNodeWillExpandFunction = {} + +---@return fgui.GTree.TreeNodeWillExpandFunction + +function TreeNodeWillExpandFunction:__call() end + +return TreeNodeWillExpandFunction \ No newline at end of file diff --git a/addons/cclua/fairygui/library/fgui/GTreeNode.lua b/addons/cclua/fairygui/library/fgui/GTreeNode.lua new file mode 100644 index 00000000..6705816c --- /dev/null +++ b/addons/cclua/fairygui/library/fgui/GTreeNode.lua @@ -0,0 +1,114 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta fgui.GTreeNode + +--- +---@class fgui.GTreeNode : cc.Ref +---@field cell fgui.GComponent +---@field data any +---@field expanded boolean +---@field folder boolean +---@field icon string +---@field nextSibling fgui.GTreeNode +---@field numChildren integer +---@field parent fgui.GTreeNode +---@field prevSibling fgui.GTreeNode +---@field text string +---@field tree fgui.GTree +local GTreeNode = {} + +---@param child fgui.GTreeNode +---@return fgui.GTreeNode +function GTreeNode:addChild(child) end + +---@param child fgui.GTreeNode +---@param index integer +---@return fgui.GTreeNode +function GTreeNode:addChildAt(child, index) end + +---@param isFolder boolean +---@param resURL string +---@return fgui.GTreeNode +---@overload fun(): fgui.GTreeNode +---@overload fun(isFolder: boolean): fgui.GTreeNode +function GTreeNode.create(isFolder, resURL) end + +---@return fgui.GComponent +function GTreeNode:getCell() end + +---@param index integer +---@return fgui.GTreeNode +function GTreeNode:getChildAt(index) end + +---@param child fgui.GTreeNode +---@return integer +function GTreeNode:getChildIndex(child) end + +---@return any +function GTreeNode:getData() end + +---@return string +function GTreeNode:getIcon() end + +---@return fgui.GTreeNode +function GTreeNode:getNextSibling() end + +---@return fgui.GTreeNode +function GTreeNode:getParent() end + +---@return fgui.GTreeNode +function GTreeNode:getPrevSibling() end + +---@return string +function GTreeNode:getText() end + +---@return fgui.GTree +function GTreeNode:getTree() end + +---@return boolean +function GTreeNode:isExpanded() end + +---@return boolean +function GTreeNode:isFolder() end + +---@return fgui.GTreeNode +function GTreeNode.new() end + +---@param child fgui.GTreeNode +function GTreeNode:removeChild(child) end + +---@param index integer +function GTreeNode:removeChildAt(index) end + +---@overload fun(self: fgui.GTreeNode, beginIndex: integer, endIndex: integer) +function GTreeNode:removeChildren() end + +---@param child fgui.GTreeNode +---@param index integer +function GTreeNode:setChildIndex(child, index) end + +---@param child fgui.GTreeNode +---@param index integer +---@return integer +function GTreeNode:setChildIndexBefore(child, index) end + +---@param value any +function GTreeNode:setData(value) end + +---@param value boolean +function GTreeNode:setExpaned(value) end + +---@param value string +function GTreeNode:setIcon(value) end + +---@param value string +function GTreeNode:setText(value) end + +---@param child1 fgui.GTreeNode +---@param child2 fgui.GTreeNode +function GTreeNode:swapChildren(child1, child2) end + +---@param index1 integer +---@param index2 integer +function GTreeNode:swapChildrenAt(index1, index2) end + +return GTreeNode \ No newline at end of file diff --git a/addons/cclua/fairygui/library/fgui/GTween.lua b/addons/cclua/fairygui/library/fgui/GTween.lua new file mode 100644 index 00000000..24e4a79b --- /dev/null +++ b/addons/cclua/fairygui/library/fgui/GTween.lua @@ -0,0 +1,63 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta fgui.GTween + +--- +---@class fgui.GTween +local GTween = {} + +---@return any +function GTween:__gc() end + +---@return any +function GTween:__olua_move() end + +function GTween.clean() end + +---@param delay number +---@return fgui.GTweener +function GTween.delayedCall(delay) end + +---@param target cc.Ref +---@return fgui.GTweener +---@overload fun(target: cc.Ref, propType: fgui.TweenPropType): fgui.GTweener +function GTween.getTween(target) end + +---@param target cc.Ref +---@return boolean +---@overload fun(target: cc.Ref, propType: fgui.TweenPropType): boolean +function GTween.isTweening(target) end + +---@param target cc.Ref +---@overload fun(target: cc.Ref, complete: boolean) +---@overload fun(target: cc.Ref, propType: fgui.TweenPropType, complete: boolean) +function GTween.kill(target) end + +---@param startValue cc.Vec2 +---@param amplitude number +---@param duration number +---@return fgui.GTweener +function GTween.shake(startValue, amplitude, duration) end + +---@param startValue number +---@param endValue number +---@param duration number +---@return fgui.GTweener +---@overload fun(startValue: cc.Vec2, endValue: cc.Vec2, duration: number): fgui.GTweener +---@overload fun(startValue: cc.Vec3, endValue: cc.Vec3, duration: number): fgui.GTweener +---@overload fun(startValue: cc.Vec4, endValue: cc.Vec4, duration: number): fgui.GTweener +---@overload fun(startValue: any, endValue: any, duration: number): fgui.GTweener +function GTween.to(startValue, endValue, duration) end + +---@param startValue any +---@param endValue any +---@param duration number +---@return fgui.GTweener +function GTween.toColor(startValue, endValue, duration) end + +---@param startValue number +---@param endValue number +---@param duration number +---@return fgui.GTweener +function GTween.toDouble(startValue, endValue, duration) end + +return GTween \ No newline at end of file diff --git a/addons/cclua/fairygui/library/fgui/GTweener.lua b/addons/cclua/fairygui/library/fgui/GTweener.lua new file mode 100644 index 00000000..5e7cb4dd --- /dev/null +++ b/addons/cclua/fairygui/library/fgui/GTweener.lua @@ -0,0 +1,128 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta fgui.GTweener + +--- +---@class fgui.GTweener : cc.Ref +---@field completed boolean +---@field delay number +---@field duration number +---@field normalizedTime number +---@field repeat integer +---@field target any +---@field userData any +---@field deltaValue fgui.TweenValue +---@field endValue fgui.TweenValue +---@field startValue fgui.TweenValue +---@field value fgui.TweenValue +local GTweener = {} + +---@return boolean +function GTweener:allCompleted() end + +---@return number +function GTweener:getDelay() end + +---@return number +function GTweener:getDuration() end + +---@return number +function GTweener:getNormalizedTime() end + +---@return integer +function GTweener:getRepeat() end + +---@return any +function GTweener:getTarget() end + +---@return any +function GTweener:getUserData() end + +---@return boolean +function GTweener:isCompleted() end + +---@param complete boolean +---@overload fun(self: fgui.GTweener) +function GTweener:kill(complete) end + +---@return fgui.GTweener +function GTweener.new() end + +---@param callback fgui.GTweener.GTweenCallback0 +---@return fgui.GTweener +function GTweener:onComplete(callback) end + +---@param callback fgui.GTweener.GTweenCallback +---@return fgui.GTweener +function GTweener:onComplete1(callback) end + +---@param callback fgui.GTweener.GTweenCallback +---@return fgui.GTweener +function GTweener:onStart(callback) end + +---@param callback fgui.GTweener.GTweenCallback +---@return fgui.GTweener +function GTweener:onUpdate(callback) end + +---@param time number +function GTweener:seek(time) end + +---@param value number +---@return fgui.GTweener +function GTweener:setBreakpoint(value) end + +---@param value number +---@return fgui.GTweener +function GTweener:setDelay(value) end + +---@param value number +---@return fgui.GTweener +function GTweener:setDuration(value) end + +---@param value fgui.EaseType +---@return fgui.GTweener +function GTweener:setEase(value) end + +---@param value number +---@return fgui.GTweener +function GTweener:setEaseOvershootOrAmplitude(value) end + +---@param value number +---@return fgui.GTweener +function GTweener:setEasePeriod(value) end + +---@param path fgui.GPath +---@return fgui.GTweener +function GTweener:setPath(path) end + +---@param paused boolean +---@return fgui.GTweener +function GTweener:setPaused(paused) end + +---@param repeat_ integer +---@param yoyo boolean +---@return fgui.GTweener +---@overload fun(self: fgui.GTweener, repeat_: integer): fgui.GTweener +function GTweener:setRepeat(repeat_, yoyo) end + +---@param value boolean +---@return fgui.GTweener +function GTweener:setSnapping(value) end + +---@param target cc.Ref +---@return fgui.GTweener +---@overload fun(self: fgui.GTweener, target: cc.Ref, propType: fgui.TweenPropType): fgui.GTweener +function GTweener:setTarget(target) end + +---@param value any +---@return fgui.GTweener +function GTweener:setTargetAny(value) end + +---@param value number +---@return fgui.GTweener +function GTweener:setTimeScale(value) end + +---@param value any +---@return fgui.GTweener +function GTweener:setUserData(value) end + +return GTweener \ No newline at end of file diff --git a/addons/cclua/fairygui/library/fgui/GTweener/GTweenCallback.lua b/addons/cclua/fairygui/library/fgui/GTweener/GTweenCallback.lua new file mode 100644 index 00000000..9e0deae0 --- /dev/null +++ b/addons/cclua/fairygui/library/fgui/GTweener/GTweenCallback.lua @@ -0,0 +1,14 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta fgui.GTweener.GTweenCallback + +--- +--- +---std::function +---@class fgui.GTweener.GTweenCallback +local GTweenCallback = {} + +---@return fgui.GTweener.GTweenCallback + +function GTweenCallback:__call() end + +return GTweenCallback \ No newline at end of file diff --git a/addons/cclua/fairygui/library/fgui/GTweener/GTweenCallback0.lua b/addons/cclua/fairygui/library/fgui/GTweener/GTweenCallback0.lua new file mode 100644 index 00000000..76279dfd --- /dev/null +++ b/addons/cclua/fairygui/library/fgui/GTweener/GTweenCallback0.lua @@ -0,0 +1,14 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta fgui.GTweener.GTweenCallback0 + +--- +--- +---std::function +---@class fgui.GTweener.GTweenCallback0 +local GTweenCallback0 = {} + +---@return fgui.GTweener.GTweenCallback0 + +function GTweenCallback0:__call() end + +return GTweenCallback0 \ No newline at end of file diff --git a/addons/cclua/fairygui/library/fgui/GearBase.lua b/addons/cclua/fairygui/library/fgui/GearBase.lua new file mode 100644 index 00000000..dc32f7c9 --- /dev/null +++ b/addons/cclua/fairygui/library/fgui/GearBase.lua @@ -0,0 +1,24 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta fgui.GearBase + +--- +---@class fgui.GearBase +---@field disableAllTweenEffect boolean +local GearBase = {} + +---@return any +function GearBase:__gc() end + +---@return any +function GearBase:__olua_move() end + +---@param owner fgui.GObject +---@param index integer +---@return fgui.GearBase +function GearBase.create(owner, index) end + +---@param owner fgui.GObject +---@return fgui.GearBase +function GearBase.new(owner) end + +return GearBase \ No newline at end of file diff --git a/addons/cclua/fairygui/library/fgui/GroupLayoutType.lua b/addons/cclua/fairygui/library/fgui/GroupLayoutType.lua new file mode 100644 index 00000000..c8f1001b --- /dev/null +++ b/addons/cclua/fairygui/library/fgui/GroupLayoutType.lua @@ -0,0 +1,15 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta fgui.GroupLayoutType + +---@type fgui.GroupLayoutType +local VALUE + +--- +---@enum fgui.GroupLayoutType +local GroupLayoutType = { + HORIZONTAL = 1, + NONE = 0, + VERTICAL = 2, +} + +return GroupLayoutType \ No newline at end of file diff --git a/addons/cclua/fairygui/library/fgui/HtmlElement.lua b/addons/cclua/fairygui/library/fgui/HtmlElement.lua new file mode 100644 index 00000000..430b6f0d --- /dev/null +++ b/addons/cclua/fairygui/library/fgui/HtmlElement.lua @@ -0,0 +1,41 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta fgui.HtmlElement + +--- +---@class fgui.HtmlElement +---@field attrs any +---@field format fgui.TextFormat +---@field link fgui.HtmlElement +---@field obj fgui.HtmlObject +---@field space integer +---@field text string +---@field type fgui.HtmlElement.Type +local HtmlElement = {} + +---@return any +function HtmlElement:__gc() end + +---@return any +function HtmlElement:__olua_move() end + +---@param attrName string +---@return any +function HtmlElement:getArray(attrName) end + +---@param attrName string +---@param defValue integer +---@return integer +---@overload fun(self: fgui.HtmlElement, attrName: string): integer +function HtmlElement:getInt(attrName, defValue) end + +---@param attrName string +---@param defValue string +---@return string +---@overload fun(self: fgui.HtmlElement, attrName: string): string +function HtmlElement:getString(attrName, defValue) end + +---@param type fgui.HtmlElement.Type +---@return fgui.HtmlElement +function HtmlElement.new(type) end + +return HtmlElement \ No newline at end of file diff --git a/addons/cclua/fairygui/library/fgui/HtmlElement/Type.lua b/addons/cclua/fairygui/library/fgui/HtmlElement/Type.lua new file mode 100644 index 00000000..26d4fd8b --- /dev/null +++ b/addons/cclua/fairygui/library/fgui/HtmlElement/Type.lua @@ -0,0 +1,18 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta fgui.HtmlElement.Type + +---@type fgui.HtmlElement.Type +local VALUE + +--- +---@enum fgui.HtmlElement.Type +local Type = { + IMAGE = 1, + INPUT = 3, + LINK = 2, + OBJECT = 5, + SELECT = 4, + TEXT = 0, +} + +return Type \ No newline at end of file diff --git a/addons/cclua/fairygui/library/fgui/HtmlObject.lua b/addons/cclua/fairygui/library/fgui/HtmlObject.lua new file mode 100644 index 00000000..f47a42b6 --- /dev/null +++ b/addons/cclua/fairygui/library/fgui/HtmlObject.lua @@ -0,0 +1,40 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta fgui.HtmlObject + +--- +---@class fgui.HtmlObject +---@field element fgui.HtmlElement +---@field hidden boolean +---@field ui fgui.GObject +---@field buttonResource string +---@field inputResource string +---@field loaderPool any +---@field selectResource string +---@field usePool boolean +local HtmlObject = {} + +---@return any +function HtmlObject:__gc() end + +---@return any +function HtmlObject:__olua_move() end + +---@param owner fgui.FUIRichText +---@param element fgui.HtmlElement +function HtmlObject:create(owner, element) end + +function HtmlObject:destroy() end + +---@return fgui.HtmlElement +function HtmlObject:getElement() end + +---@return fgui.GObject +function HtmlObject:getUI() end + +---@return boolean +function HtmlObject:isHidden() end + +---@return fgui.HtmlObject +function HtmlObject.new() end + +return HtmlObject \ No newline at end of file diff --git a/addons/cclua/fairygui/library/fgui/HtmlParseOptions.lua b/addons/cclua/fairygui/library/fgui/HtmlParseOptions.lua new file mode 100644 index 00000000..9d48d71b --- /dev/null +++ b/addons/cclua/fairygui/library/fgui/HtmlParseOptions.lua @@ -0,0 +1,21 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta fgui.HtmlParseOptions + +--- +---@class fgui.HtmlParseOptions +---@field defaultLinkColor any +---@field defaultLinkUnderline boolean +---@field linkColor any +---@field linkUnderline boolean +local HtmlParseOptions = {} + +---@return any +function HtmlParseOptions:__gc() end + +---@return any +function HtmlParseOptions:__olua_move() end + +---@return fgui.HtmlParseOptions +function HtmlParseOptions.new() end + +return HtmlParseOptions \ No newline at end of file diff --git a/addons/cclua/fairygui/library/fgui/IHitTest.lua b/addons/cclua/fairygui/library/fgui/IHitTest.lua new file mode 100644 index 00000000..14d6b62c --- /dev/null +++ b/addons/cclua/fairygui/library/fgui/IHitTest.lua @@ -0,0 +1,19 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta fgui.IHitTest + +--- +---@class fgui.IHitTest +local IHitTest = {} + +---@return any +function IHitTest:__gc() end + +---@return any +function IHitTest:__olua_move() end + +---@param obj fgui.GComponent +---@param localPoint cc.Vec2 +---@return boolean +function IHitTest:hitTest(obj, localPoint) end + +return IHitTest \ No newline at end of file diff --git a/addons/cclua/fairygui/library/fgui/IUISource.lua b/addons/cclua/fairygui/library/fgui/IUISource.lua new file mode 100644 index 00000000..21285d90 --- /dev/null +++ b/addons/cclua/fairygui/library/fgui/IUISource.lua @@ -0,0 +1,22 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta fgui.IUISource + +--- +---@class fgui.IUISource : cc.Ref +---@field fileName string +---@field loaded boolean +local IUISource = {} + +---@return string +function IUISource:getFileName() end + +---@return boolean +function IUISource:isLoaded() end + +---@param callback fun() +function IUISource:load(callback) end + +---@param value string +function IUISource:setFileName(value) end + +return IUISource \ No newline at end of file diff --git a/addons/cclua/fairygui/library/fgui/InputEvent.lua b/addons/cclua/fairygui/library/fgui/InputEvent.lua new file mode 100644 index 00000000..7b482164 --- /dev/null +++ b/addons/cclua/fairygui/library/fgui/InputEvent.lua @@ -0,0 +1,73 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta fgui.InputEvent + +--- +---@class fgui.InputEvent +---@field altDown boolean +---@field button cc.EventMouse.MouseButton +---@field ctrlDown boolean +---@field doubleClick integer +---@field keyCode cc.EventKeyboard.KeyCode +---@field mouseWheelDelta integer +---@field position cc.Vec2 +---@field processor fgui.InputProcessor +---@field shiftDown boolean +---@field target fgui.GObject +---@field touch cc.Touch +---@field touchId integer +---@field x integer +---@field y integer +local InputEvent = {} + +---@return any +function InputEvent:__gc() end + +---@return any +function InputEvent:__olua_move() end + +---@return cc.EventMouse.MouseButton +function InputEvent:getButton() end + +---@return cc.EventKeyboard.KeyCode +function InputEvent:getKeyCode() end + +---@return integer +function InputEvent:getMouseWheelDelta() end + +---@return cc.Vec2 +function InputEvent:getPosition() end + +---@return fgui.InputProcessor +function InputEvent:getProcessor() end + +---@return fgui.GObject +function InputEvent:getTarget() end + +---@return cc.Touch +function InputEvent:getTouch() end + +---@return integer +function InputEvent:getTouchId() end + +---@return integer +function InputEvent:getX() end + +---@return integer +function InputEvent:getY() end + +---@return boolean +function InputEvent:isAltDown() end + +---@return boolean +function InputEvent:isCtrlDown() end + +---@return integer +function InputEvent:isDoubleClick() end + +---@return boolean +function InputEvent:isShiftDown() end + +---@return fgui.InputEvent +function InputEvent.new() end + +return InputEvent \ No newline at end of file diff --git a/addons/cclua/fairygui/library/fgui/InputProcessor.lua b/addons/cclua/fairygui/library/fgui/InputProcessor.lua new file mode 100644 index 00000000..dde47431 --- /dev/null +++ b/addons/cclua/fairygui/library/fgui/InputProcessor.lua @@ -0,0 +1,63 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta fgui.InputProcessor + +--- +---@class fgui.InputProcessor +---@field recentInput fgui.InputEvent +---@field touchOnUI boolean +local InputProcessor = {} + +---@return any +function InputProcessor:__gc() end + +---@return any +function InputProcessor:__olua_move() end + +---@param touchId integer +---@param target fgui.GObject +function InputProcessor:addTouchMonitor(touchId, target) end + +---@param touchId integer +function InputProcessor:cancelClick(touchId) end + +function InputProcessor:disableDefaultTouchEvent() end + +---@return fgui.InputEvent +function InputProcessor:getRecentInput() end + +---@param touchId integer +---@return cc.Vec2 +function InputProcessor:getTouchPosition(touchId) end + +---@return boolean +function InputProcessor.isTouchOnUI() end + +---@param owner fgui.GComponent +---@return fgui.InputProcessor +function InputProcessor.new(owner) end + +---@param target fgui.GObject +function InputProcessor:removeTouchMonitor(target) end + +---@param value fgui.InputProcessor.CaptureEventCallback +function InputProcessor:setCaptureCallback(value) end + +---@param target fgui.GObject +---@param touchId integer +---@overload fun(self: fgui.InputProcessor, target: fgui.GObject) +function InputProcessor:simulateClick(target, touchId) end + +---@param touch cc.Touch +---@param event cc.Event +---@return boolean +function InputProcessor:touchDown(touch, event) end + +---@param touch cc.Touch +---@param event cc.Event +function InputProcessor:touchMove(touch, event) end + +---@param touch cc.Touch +---@param event cc.Event +function InputProcessor:touchUp(touch, event) end + +return InputProcessor \ No newline at end of file diff --git a/addons/cclua/fairygui/library/fgui/InputProcessor/CaptureEventCallback.lua b/addons/cclua/fairygui/library/fgui/InputProcessor/CaptureEventCallback.lua new file mode 100644 index 00000000..10f69a25 --- /dev/null +++ b/addons/cclua/fairygui/library/fgui/InputProcessor/CaptureEventCallback.lua @@ -0,0 +1,14 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta fgui.InputProcessor.CaptureEventCallback + +--- +--- +---std::function +---@class fgui.InputProcessor.CaptureEventCallback +local CaptureEventCallback = {} + +---@return fgui.InputProcessor.CaptureEventCallback + +function CaptureEventCallback:__call() end + +return CaptureEventCallback \ No newline at end of file diff --git a/addons/cclua/fairygui/library/fgui/ListLayoutType.lua b/addons/cclua/fairygui/library/fgui/ListLayoutType.lua new file mode 100644 index 00000000..9de08d54 --- /dev/null +++ b/addons/cclua/fairygui/library/fgui/ListLayoutType.lua @@ -0,0 +1,17 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta fgui.ListLayoutType + +---@type fgui.ListLayoutType +local VALUE + +--- +---@enum fgui.ListLayoutType +local ListLayoutType = { + FLOW_HORIZONTAL = 2, + FLOW_VERTICAL = 3, + PAGINATION = 4, + SINGLE_COLUMN = 0, + SINGLE_ROW = 1, +} + +return ListLayoutType \ No newline at end of file diff --git a/addons/cclua/fairygui/library/fgui/ListSelectionMode.lua b/addons/cclua/fairygui/library/fgui/ListSelectionMode.lua new file mode 100644 index 00000000..d0f050a8 --- /dev/null +++ b/addons/cclua/fairygui/library/fgui/ListSelectionMode.lua @@ -0,0 +1,16 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta fgui.ListSelectionMode + +---@type fgui.ListSelectionMode +local VALUE + +--- +---@enum fgui.ListSelectionMode +local ListSelectionMode = { + MULTIPLE = 1, + MULTIPLE_SINGLECLICK = 2, + NONE = 3, + SINGLE = 0, +} + +return ListSelectionMode \ No newline at end of file diff --git a/addons/cclua/fairygui/library/fgui/LoaderFillType.lua b/addons/cclua/fairygui/library/fgui/LoaderFillType.lua new file mode 100644 index 00000000..f360c634 --- /dev/null +++ b/addons/cclua/fairygui/library/fgui/LoaderFillType.lua @@ -0,0 +1,18 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta fgui.LoaderFillType + +---@type fgui.LoaderFillType +local VALUE + +--- +---@enum fgui.LoaderFillType +local LoaderFillType = { + NONE = 0, + SCALE = 1, + SCALE_FREE = 4, + SCALE_MATCH_HEIGHT = 2, + SCALE_MATCH_WIDTH = 3, + SCALE_NO_BORDER = 5, +} + +return LoaderFillType \ No newline at end of file diff --git a/addons/cclua/fairygui/library/fgui/Margin.lua b/addons/cclua/fairygui/library/fgui/Margin.lua new file mode 100644 index 00000000..b7a8a527 --- /dev/null +++ b/addons/cclua/fairygui/library/fgui/Margin.lua @@ -0,0 +1,42 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta fgui.Margin + +--- +---@class fgui.Margin +---@field bottom number +---@field left number +---@field right number +---@field top number +---@field ZERO fgui.Margin +local Margin = {} + +---@return any +function Margin:__gc() end + +---@return any +function Margin:__olua_move() end + +---Test equality of two margins. +---@param target fgui.Margin # A Margin instance. +---@return boolean # True if two margins are equal, false otherwise. +function Margin:equals(target) end + +---Default constructor. +---@return fgui.Margin +--- +---Construct a Margin instance with left, top, right and bottom margins. +---\param l Left margin in float. +---\param t Top margin in float. +---\param r Right margin in float. +---\param b Bottom margin in float. +---@overload fun(l: number, t: number, r: number, b: number): fgui.Margin +function Margin.new() end + +---Change margin with left, top, right and bottom margin. +---@param l number # Left margin in float. +---@param t number # Top margin in float. +---@param r number # Right margin in float. +---@param b number # Bottom margin in float. +function Margin:setMargin(l, t, r, b) end + +return Margin \ No newline at end of file diff --git a/addons/cclua/fairygui/library/fgui/ObjectPropID.lua b/addons/cclua/fairygui/library/fgui/ObjectPropID.lua new file mode 100644 index 00000000..eb8e08cf --- /dev/null +++ b/addons/cclua/fairygui/library/fgui/ObjectPropID.lua @@ -0,0 +1,22 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta fgui.ObjectPropID + +---@type fgui.ObjectPropID +local VALUE + +--- +---@enum fgui.ObjectPropID +local ObjectPropID = { + Color = 2, + DeltaTime = 6, + FontSize = 8, + Frame = 5, + Icon = 1, + OutlineColor = 3, + Playing = 4, + Selected = 9, + Text = 0, + TimeScale = 7, +} + +return ObjectPropID \ No newline at end of file diff --git a/addons/cclua/fairygui/library/fgui/ObjectType.lua b/addons/cclua/fairygui/library/fgui/ObjectType.lua new file mode 100644 index 00000000..fe3cb74b --- /dev/null +++ b/addons/cclua/fairygui/library/fgui/ObjectType.lua @@ -0,0 +1,31 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta fgui.ObjectType + +---@type fgui.ObjectType +local VALUE + +--- +---@enum fgui.ObjectType +local ObjectType = { + BUTTON = 12, + COMBOBOX = 13, + COMPONENT = 9, + GRAPH = 3, + GROUP = 5, + IMAGE = 0, + INPUTTEXT = 8, + LABEL = 11, + LIST = 10, + LOADER = 4, + LOADER3D = 18, + MOVIECLIP = 1, + PROGRESSBAR = 14, + RICHTEXT = 7, + SCROLLBAR = 16, + SLIDER = 15, + SWF = 2, + TEXT = 6, + TREE = 17, +} + +return ObjectType \ No newline at end of file diff --git a/addons/cclua/fairygui/library/fgui/OverflowType.lua b/addons/cclua/fairygui/library/fgui/OverflowType.lua new file mode 100644 index 00000000..ba1212cc --- /dev/null +++ b/addons/cclua/fairygui/library/fgui/OverflowType.lua @@ -0,0 +1,15 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta fgui.OverflowType + +---@type fgui.OverflowType +local VALUE + +--- +---@enum fgui.OverflowType +local OverflowType = { + HIDDEN = 1, + SCROLL = 2, + VISIBLE = 0, +} + +return OverflowType \ No newline at end of file diff --git a/addons/cclua/fairygui/library/fgui/PackageItem.lua b/addons/cclua/fairygui/library/fgui/PackageItem.lua new file mode 100644 index 00000000..c942eefd --- /dev/null +++ b/addons/cclua/fairygui/library/fgui/PackageItem.lua @@ -0,0 +1,40 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta fgui.PackageItem + +--- +---@class fgui.PackageItem : cc.Ref +---@field branch fgui.PackageItem +---@field highResolution fgui.PackageItem +---@field animation cc.Animation +---@field branches cc.types.VectorString +---@field delayPerUnit number +---@field file string +---@field height integer +---@field id string +---@field name string +---@field objectType fgui.ObjectType +---@field owner fgui.UIPackage +---@field repeatDelay number +---@field scaleByTile boolean +---@field skeletonAnchor cc.Vec2 +---@field spriteFrame cc.SpriteFrame +---@field swing boolean +---@field texture cc.Texture2D +---@field tileGridIndice integer +---@field translated boolean +---@field type fgui.PackageItemType +---@field width integer +local PackageItem = {} + +---@return fgui.PackageItem +function PackageItem:getBranch() end + +---@return fgui.PackageItem +function PackageItem:getHighResolution() end + +function PackageItem:load() end + +---@return fgui.PackageItem +function PackageItem.new() end + +return PackageItem \ No newline at end of file diff --git a/addons/cclua/fairygui/library/fgui/PackageItemType.lua b/addons/cclua/fairygui/library/fgui/PackageItemType.lua new file mode 100644 index 00000000..a47b3c73 --- /dev/null +++ b/addons/cclua/fairygui/library/fgui/PackageItemType.lua @@ -0,0 +1,23 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta fgui.PackageItemType + +---@type fgui.PackageItemType +local VALUE + +--- +---@enum fgui.PackageItemType +local PackageItemType = { + ATLAS = 4, + COMPONENT = 3, + DRAGONBONES = 10, + FONT = 5, + IMAGE = 0, + MISC = 7, + MOVIECLIP = 1, + SOUND = 2, + SPINE = 9, + SWF = 6, + UNKNOWN = 8, +} + +return PackageItemType \ No newline at end of file diff --git a/addons/cclua/fairygui/library/fgui/PixelHitTest.lua b/addons/cclua/fairygui/library/fgui/PixelHitTest.lua new file mode 100644 index 00000000..5e992948 --- /dev/null +++ b/addons/cclua/fairygui/library/fgui/PixelHitTest.lua @@ -0,0 +1,18 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta fgui.PixelHitTest + +--- +---@class fgui.PixelHitTest : fgui.IHitTest +---@field offsetX integer +---@field offsetY integer +---@field scaleX number +---@field scaleY number +local PixelHitTest = {} + +---@param data fgui.PixelHitTestData +---@param offsetX integer +---@param offsetY integer +---@return fgui.PixelHitTest +function PixelHitTest.new(data, offsetX, offsetY) end + +return PixelHitTest \ No newline at end of file diff --git a/addons/cclua/fairygui/library/fgui/PixelHitTestData.lua b/addons/cclua/fairygui/library/fgui/PixelHitTestData.lua new file mode 100644 index 00000000..20fd7699 --- /dev/null +++ b/addons/cclua/fairygui/library/fgui/PixelHitTestData.lua @@ -0,0 +1,21 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta fgui.PixelHitTestData + +--- +---@class fgui.PixelHitTestData +---@field pixelWidth integer +---@field pixels string +---@field pixelsLength integer +---@field scale number +local PixelHitTestData = {} + +---@return any +function PixelHitTestData:__gc() end + +---@return any +function PixelHitTestData:__olua_move() end + +---@return fgui.PixelHitTestData +function PixelHitTestData.new() end + +return PixelHitTestData \ No newline at end of file diff --git a/addons/cclua/fairygui/library/fgui/PopupDirection.lua b/addons/cclua/fairygui/library/fgui/PopupDirection.lua new file mode 100644 index 00000000..c854dbac --- /dev/null +++ b/addons/cclua/fairygui/library/fgui/PopupDirection.lua @@ -0,0 +1,15 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta fgui.PopupDirection + +---@type fgui.PopupDirection +local VALUE + +--- +---@enum fgui.PopupDirection +local PopupDirection = { + AUTO = 0, + DOWN = 2, + UP = 1, +} + +return PopupDirection \ No newline at end of file diff --git a/addons/cclua/fairygui/library/fgui/PopupMenu.lua b/addons/cclua/fairygui/library/fgui/PopupMenu.lua new file mode 100644 index 00000000..517098e4 --- /dev/null +++ b/addons/cclua/fairygui/library/fgui/PopupMenu.lua @@ -0,0 +1,78 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta fgui.PopupMenu + +--- +---@class fgui.PopupMenu : cc.Ref +---@field contentPane fgui.GComponent +---@field itemCount integer +---@field list fgui.GList +local PopupMenu = {} + +---@param caption string +---@param callback fgui.EventCallback +---@return fgui.GButton +function PopupMenu:addItem(caption, callback) end + +---@param caption string +---@param index integer +---@param callback fgui.EventCallback +---@return fgui.GButton +function PopupMenu:addItemAt(caption, index, callback) end + +function PopupMenu:addSeperator() end + +function PopupMenu:clearItems() end + +---@param resourceURL string +---@return fgui.PopupMenu +---@overload fun(): fgui.PopupMenu +function PopupMenu.create(resourceURL) end + +---@return fgui.GComponent +function PopupMenu:getContentPane() end + +---@return integer +function PopupMenu:getItemCount() end + +---@param index integer +---@return string +function PopupMenu:getItemName(index) end + +---@return fgui.GList +function PopupMenu:getList() end + +---@param name string +---@return boolean +function PopupMenu:isItemChecked(name) end + +---@return fgui.PopupMenu +function PopupMenu.new() end + +---@param name string +---@return boolean +function PopupMenu:removeItem(name) end + +---@param name string +---@param checkable boolean +function PopupMenu:setItemCheckable(name, checkable) end + +---@param name string +---@param check boolean +function PopupMenu:setItemChecked(name, check) end + +---@param name string +---@param grayed boolean +function PopupMenu:setItemGrayed(name, grayed) end + +---@param name string +---@param caption string +function PopupMenu:setItemText(name, caption) end + +---@param name string +---@param visible boolean +function PopupMenu:setItemVisible(name, visible) end + +---@overload fun(self: fgui.PopupMenu, target: fgui.GObject, dir: fgui.PopupDirection) +function PopupMenu:show() end + +return PopupMenu \ No newline at end of file diff --git a/addons/cclua/fairygui/library/fgui/ProgressTitleType.lua b/addons/cclua/fairygui/library/fgui/ProgressTitleType.lua new file mode 100644 index 00000000..64154a41 --- /dev/null +++ b/addons/cclua/fairygui/library/fgui/ProgressTitleType.lua @@ -0,0 +1,16 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta fgui.ProgressTitleType + +---@type fgui.ProgressTitleType +local VALUE + +--- +---@enum fgui.ProgressTitleType +local ProgressTitleType = { + MAX = 3, + PERCENT = 0, + VALUE = 2, + VALUE_MAX = 1, +} + +return ProgressTitleType \ No newline at end of file diff --git a/addons/cclua/fairygui/library/fgui/RelationItem.lua b/addons/cclua/fairygui/library/fgui/RelationItem.lua new file mode 100644 index 00000000..a5235179 --- /dev/null +++ b/addons/cclua/fairygui/library/fgui/RelationItem.lua @@ -0,0 +1,48 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta fgui.RelationItem + +--- +---@class fgui.RelationItem +---@field empty boolean +---@field target fgui.GObject +local RelationItem = {} + +---@return any +function RelationItem:__gc() end + +---@return any +function RelationItem:__olua_move() end + +---@param relationType fgui.RelationType +---@param usePercent boolean +function RelationItem:add(relationType, usePercent) end + +---@param dWidth number +---@param dHeight number +---@param applyPivot boolean +function RelationItem:applyOnSelfSizeChanged(dWidth, dHeight, applyPivot) end + +---@return any +function RelationItem:copyFrom() end + +---@return fgui.GObject +function RelationItem:getTarget() end + +---@param relationType fgui.RelationType +---@param usePercent boolean +function RelationItem:internalAdd(relationType, usePercent) end + +---@return boolean +function RelationItem:isEmpty() end + +---@param owner fgui.GObject +---@return fgui.RelationItem +function RelationItem.new(owner) end + +---@param relationType fgui.RelationType +function RelationItem:remove(relationType) end + +---@param value fgui.GObject +function RelationItem:setTarget(value) end + +return RelationItem \ No newline at end of file diff --git a/addons/cclua/fairygui/library/fgui/RelationType.lua b/addons/cclua/fairygui/library/fgui/RelationType.lua new file mode 100644 index 00000000..e3baad14 --- /dev/null +++ b/addons/cclua/fairygui/library/fgui/RelationType.lua @@ -0,0 +1,37 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta fgui.RelationType + +---@type fgui.RelationType +local VALUE + +--- +---@enum fgui.RelationType +local RelationType = { + BottomExt_Bottom = 23, + BottomExt_Top = 22, + Bottom_Bottom = 13, + Bottom_Middle = 12, + Bottom_Top = 11, + Center_Center = 3, + Height = 15, + LeftExt_Left = 16, + LeftExt_Right = 17, + Left_Center = 1, + Left_Left = 0, + Left_Right = 2, + Middle_Middle = 10, + RightExt_Left = 18, + RightExt_Right = 19, + Right_Center = 5, + Right_Left = 4, + Right_Right = 6, + Size = 24, + TopExt_Bottom = 21, + TopExt_Top = 20, + Top_Bottom = 9, + Top_Middle = 8, + Top_Top = 7, + Width = 14, +} + +return RelationType \ No newline at end of file diff --git a/addons/cclua/fairygui/library/fgui/Relations.lua b/addons/cclua/fairygui/library/fgui/Relations.lua new file mode 100644 index 00000000..a7458c98 --- /dev/null +++ b/addons/cclua/fairygui/library/fgui/Relations.lua @@ -0,0 +1,49 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta fgui.Relations + +--- +---@class fgui.Relations +---@field empty boolean +---@field handling fgui.GObject +local Relations = {} + +---@return any +function Relations:__gc() end + +---@return any +function Relations:__olua_move() end + +---@param target fgui.GObject +---@param relationType fgui.RelationType +---@overload fun(self: fgui.Relations, target: fgui.GObject, relationType: fgui.RelationType, usePercent: boolean) +function Relations:add(target, relationType) end + +function Relations:clearAll() end + +---@param target fgui.GObject +function Relations:clearFor(target) end + +---@param target fgui.GObject +---@return boolean +function Relations:contains(target) end + +---@return any +function Relations:copyFrom() end + +---@return boolean +function Relations:isEmpty() end + +---@param owner fgui.GObject +---@return fgui.Relations +function Relations.new(owner) end + +---@param dWidth number +---@param dHeight number +---@param applyPivot boolean +function Relations:onOwnerSizeChanged(dWidth, dHeight, applyPivot) end + +---@param target fgui.GObject +---@param relationType fgui.RelationType +function Relations:remove(target, relationType) end + +return Relations \ No newline at end of file diff --git a/addons/cclua/fairygui/library/fgui/ScrollBarDisplayType.lua b/addons/cclua/fairygui/library/fgui/ScrollBarDisplayType.lua new file mode 100644 index 00000000..71bb43db --- /dev/null +++ b/addons/cclua/fairygui/library/fgui/ScrollBarDisplayType.lua @@ -0,0 +1,16 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta fgui.ScrollBarDisplayType + +---@type fgui.ScrollBarDisplayType +local VALUE + +--- +---@enum fgui.ScrollBarDisplayType +local ScrollBarDisplayType = { + AUTO = 2, + DEFAULT = 0, + HIDDEN = 3, + VISIBLE = 1, +} + +return ScrollBarDisplayType \ No newline at end of file diff --git a/addons/cclua/fairygui/library/fgui/ScrollPane.lua b/addons/cclua/fairygui/library/fgui/ScrollPane.lua new file mode 100644 index 00000000..8ec64287 --- /dev/null +++ b/addons/cclua/fairygui/library/fgui/ScrollPane.lua @@ -0,0 +1,231 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta fgui.ScrollPane + +--- +---@class fgui.ScrollPane : cc.Ref +---@field bottomMost boolean +---@field bouncebackEffect boolean +---@field contentSize cc.Size +---@field decelerationRate number +---@field draggingPane fgui.ScrollPane +---@field footer fgui.GComponent +---@field header fgui.GComponent +---@field hzScrollBar fgui.GScrollBar +---@field inertiaDisabled boolean +---@field mouseWheelEnabled boolean +---@field owner fgui.GComponent +---@field pageController fgui.GController +---@field pageMode boolean +---@field pageX integer +---@field pageY integer +---@field percX number +---@field percY number +---@field posX number +---@field posY number +---@field rightMost boolean +---@field scrollStep number +---@field scrollingPosX number +---@field scrollingPosY number +---@field snapToItem boolean +---@field touchEffect boolean +---@field viewSize cc.Size +---@field vtScrollBar fgui.GScrollBar +local ScrollPane = {} + +function ScrollPane:cancelDragging() end + +---@return cc.Size +function ScrollPane:getContentSize() end + +---@return number +function ScrollPane:getDecelerationRate() end + +---@return fgui.ScrollPane +function ScrollPane.getDraggingPane() end + +---@return fgui.GComponent +function ScrollPane:getFooter() end + +---@return fgui.GComponent +function ScrollPane:getHeader() end + +---@return fgui.GScrollBar +function ScrollPane:getHzScrollBar() end + +---@return fgui.GComponent +function ScrollPane:getOwner() end + +---@return fgui.GController +function ScrollPane:getPageController() end + +---@return integer +function ScrollPane:getPageX() end + +---@return integer +function ScrollPane:getPageY() end + +---@return number +function ScrollPane:getPercX() end + +---@return number +function ScrollPane:getPercY() end + +---@return number +function ScrollPane:getPosX() end + +---@return number +function ScrollPane:getPosY() end + +---@return number +function ScrollPane:getScrollStep() end + +---@return number +function ScrollPane:getScrollingPosX() end + +---@return number +function ScrollPane:getScrollingPosY() end + +---@return cc.Size +function ScrollPane:getViewSize() end + +---@return fgui.GScrollBar +function ScrollPane:getVtScrollBar() end + +---@return boolean +function ScrollPane:isBottomMost() end + +---@return boolean +function ScrollPane:isBouncebackEffect() end + +---@param obj fgui.GObject +---@return boolean +function ScrollPane:isChildInView(obj) end + +---@return boolean +function ScrollPane:isInertiaDisabled() end + +---@return boolean +function ScrollPane:isMouseWheelEnabled() end + +---@return boolean +function ScrollPane:isPageMode() end + +---@return boolean +function ScrollPane:isRightMost() end + +---@return boolean +function ScrollPane:isSnapToItem() end + +---@return boolean +function ScrollPane:isTouchEffect() end + +---@param size integer +function ScrollPane:lockFooter(size) end + +---@param size integer +function ScrollPane:lockHeader(size) end + +---@param owner fgui.GComponent +---@return fgui.ScrollPane +function ScrollPane.new(owner) end + +---@param ani boolean +---@overload fun(self: fgui.ScrollPane) +function ScrollPane:scrollBottom(ani) end + +---@param ratio number +---@param ani boolean +---@overload fun(self: fgui.ScrollPane) +---@overload fun(self: fgui.ScrollPane, ratio: number) +function ScrollPane:scrollDown(ratio, ani) end + +---@param ratio number +---@param ani boolean +---@overload fun(self: fgui.ScrollPane) +---@overload fun(self: fgui.ScrollPane, ratio: number) +function ScrollPane:scrollLeft(ratio, ani) end + +---@param ratio number +---@param ani boolean +---@overload fun(self: fgui.ScrollPane) +---@overload fun(self: fgui.ScrollPane, ratio: number) +function ScrollPane:scrollRight(ratio, ani) end + +---@param obj fgui.GObject +---@param ani boolean +---@param setFirst boolean +---@overload fun(self: fgui.ScrollPane, obj: fgui.GObject) +---@overload fun(self: fgui.ScrollPane, obj: fgui.GObject, ani: boolean) +---@overload fun(self: fgui.ScrollPane, rect: cc.Rect, ani: boolean, setFirst: boolean) +---@overload fun(self: fgui.ScrollPane, rect: cc.Rect) +---@overload fun(self: fgui.ScrollPane, rect: cc.Rect, ani: boolean) +function ScrollPane:scrollToView(obj, ani, setFirst) end + +---@param ani boolean +---@overload fun(self: fgui.ScrollPane) +function ScrollPane:scrollTop(ani) end + +---@param ratio number +---@param ani boolean +---@overload fun(self: fgui.ScrollPane) +---@overload fun(self: fgui.ScrollPane, ratio: number) +function ScrollPane:scrollUp(ratio, ani) end + +---@param value boolean +function ScrollPane:setBouncebackEffect(value) end + +---@param value number +function ScrollPane:setDecelerationRate(value) end + +---@param value boolean +function ScrollPane:setInertiaDisabled(value) end + +---@param value boolean +function ScrollPane:setMouseWheelEnabled(value) end + +---@param value fgui.GController +function ScrollPane:setPageController(value) end + +---@param value boolean +function ScrollPane:setPageMode(value) end + +---@param value integer +---@param ani boolean +---@overload fun(self: fgui.ScrollPane, value: integer) +function ScrollPane:setPageX(value, ani) end + +---@param value integer +---@param ani boolean +---@overload fun(self: fgui.ScrollPane, value: integer) +function ScrollPane:setPageY(value, ani) end + +---@param value number +---@param ani boolean +---@overload fun(self: fgui.ScrollPane, value: number) +function ScrollPane:setPercX(value, ani) end + +---@param value number +---@param ani boolean +---@overload fun(self: fgui.ScrollPane, value: number) +function ScrollPane:setPercY(value, ani) end + +---@param value number +---@param ani boolean +---@overload fun(self: fgui.ScrollPane, value: number) +function ScrollPane:setPosX(value, ani) end + +---@param value number +---@param ani boolean +---@overload fun(self: fgui.ScrollPane, value: number) +function ScrollPane:setPosY(value, ani) end + +---@param value number +function ScrollPane:setScrollStep(value) end + +---@param value boolean +function ScrollPane:setSnapToItem(value) end + +---@param value boolean +function ScrollPane:setTouchEffect(value) end + +return ScrollPane \ No newline at end of file diff --git a/addons/cclua/fairygui/library/fgui/ScrollType.lua b/addons/cclua/fairygui/library/fgui/ScrollType.lua new file mode 100644 index 00000000..140cfe65 --- /dev/null +++ b/addons/cclua/fairygui/library/fgui/ScrollType.lua @@ -0,0 +1,15 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta fgui.ScrollType + +---@type fgui.ScrollType +local VALUE + +--- +---@enum fgui.ScrollType +local ScrollType = { + BOTH = 2, + HORIZONTAL = 0, + VERTICAL = 1, +} + +return ScrollType \ No newline at end of file diff --git a/addons/cclua/fairygui/library/fgui/TextFormat.lua b/addons/cclua/fairygui/library/fgui/TextFormat.lua new file mode 100644 index 00000000..47014b38 --- /dev/null +++ b/addons/cclua/fairygui/library/fgui/TextFormat.lua @@ -0,0 +1,50 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta fgui.TextFormat + +--- +---@class fgui.TextFormat +---@field align cc.TextHAlignment +---@field bold boolean +---@field color any +---@field effect integer +---@field face string +---@field fontSize number +---@field glowColor any +---@field italics boolean +---@field letterSpacing integer +---@field lineSpacing integer +---@field outlineColor any +---@field outlineSize integer +---@field shadowBlurRadius integer +---@field shadowColor any +---@field shadowOffset cc.Size +---@field underline boolean +---@field verticalAlign cc.TextVAlignment +---@field GLOW integer +---@field OUTLINE integer +---@field SHADOW integer +local TextFormat = {} + +---@return any +function TextFormat:__gc() end + +---@return any +function TextFormat:__olua_move() end + +---@param effectFlag integer +function TextFormat:disableEffect(effectFlag) end + +---@param effectFlag integer +function TextFormat:enableEffect(effectFlag) end + +---@param effectFlag integer +---@return boolean +function TextFormat:hasEffect(effectFlag) end + +---@return fgui.TextFormat +function TextFormat.new() end + +---@param format fgui.TextFormat +function TextFormat:setFormat(format) end + +return TextFormat \ No newline at end of file diff --git a/addons/cclua/fairygui/library/fgui/Transition.lua b/addons/cclua/fairygui/library/fgui/Transition.lua new file mode 100644 index 00000000..834540ae --- /dev/null +++ b/addons/cclua/fairygui/library/fgui/Transition.lua @@ -0,0 +1,87 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta fgui.Transition + +--- +---@class fgui.Transition : cc.Ref +---@field owner fgui.GComponent +---@field playing boolean +---@field timeScale number +---@field name string +local Transition = {} + +---@param value integer +function Transition:changePlayTimes(value) end + +function Transition:clearHooks() end + +---@param label string +---@return number +function Transition:getLabelTime(label) end + +---@return fgui.GComponent +function Transition:getOwner() end + +---@return number +function Transition:getTimeScale() end + +---@return boolean +function Transition:isPlaying() end + +---@param owner fgui.GComponent +---@return fgui.Transition +function Transition.new(owner) end + +function Transition:onOwnerAddedToStage() end + +function Transition:onOwnerRemovedFromStage() end + +---@param callback fgui.Transition.PlayCompleteCallback +---@overload fun(self: fgui.Transition) +---@overload fun(self: fgui.Transition, times: integer, delay: number, callback: fgui.Transition.PlayCompleteCallback) +---@overload fun(self: fgui.Transition, times: integer, delay: number) +---@overload fun(self: fgui.Transition, times: integer, delay: number, startTime: number, endTime: number, callback: fgui.Transition.PlayCompleteCallback) +---@overload fun(self: fgui.Transition, times: integer, delay: number, startTime: number, endTime: number) +function Transition:play(callback) end + +---@param callback fgui.Transition.PlayCompleteCallback +---@overload fun(self: fgui.Transition) +---@overload fun(self: fgui.Transition, times: integer, delay: number, callback: fgui.Transition.PlayCompleteCallback) +---@overload fun(self: fgui.Transition, times: integer, delay: number) +function Transition:playReverse(callback) end + +---@param autoPlay boolean +---@param times integer +---@param delay number +function Transition:setAutoPlay(autoPlay, times, delay) end + +---@param label string +---@param value number +function Transition:setDuration(label, value) end + +---@param label string +---@param callback fgui.Transition.TransitionHook +function Transition:setHook(label, callback) end + +---@param paused boolean +function Transition:setPaused(paused) end + +---@param label string +---@param newTarget fgui.GObject +function Transition:setTarget(label, newTarget) end + +---@param value number +function Transition:setTimeScale(value) end + +---@param label string +---@param values any +function Transition:setValue(label, values) end + +---@overload fun(self: fgui.Transition, setToComplete: boolean, processCallback: boolean) +function Transition:stop() end + +---@param targetId string +---@param dx number +---@param dy number +function Transition:updateFromRelations(targetId, dx, dy) end + +return Transition \ No newline at end of file diff --git a/addons/cclua/fairygui/library/fgui/Transition/PlayCompleteCallback.lua b/addons/cclua/fairygui/library/fgui/Transition/PlayCompleteCallback.lua new file mode 100644 index 00000000..b5ac1f4d --- /dev/null +++ b/addons/cclua/fairygui/library/fgui/Transition/PlayCompleteCallback.lua @@ -0,0 +1,14 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta fgui.Transition.PlayCompleteCallback + +--- +--- +---std::function +---@class fgui.Transition.PlayCompleteCallback +local PlayCompleteCallback = {} + +---@return fgui.Transition.PlayCompleteCallback + +function PlayCompleteCallback:__call() end + +return PlayCompleteCallback \ No newline at end of file diff --git a/addons/cclua/fairygui/library/fgui/Transition/TransitionHook.lua b/addons/cclua/fairygui/library/fgui/Transition/TransitionHook.lua new file mode 100644 index 00000000..754ddd2e --- /dev/null +++ b/addons/cclua/fairygui/library/fgui/Transition/TransitionHook.lua @@ -0,0 +1,14 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta fgui.Transition.TransitionHook + +--- +--- +---std::function +---@class fgui.Transition.TransitionHook +local TransitionHook = {} + +---@return fgui.Transition.TransitionHook + +function TransitionHook:__call() end + +return TransitionHook \ No newline at end of file diff --git a/addons/cclua/fairygui/library/fgui/TransitionActionType.lua b/addons/cclua/fairygui/library/fgui/TransitionActionType.lua new file mode 100644 index 00000000..7d12e3a6 --- /dev/null +++ b/addons/cclua/fairygui/library/fgui/TransitionActionType.lua @@ -0,0 +1,29 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta fgui.TransitionActionType + +---@type fgui.TransitionActionType +local VALUE + +--- +---@enum fgui.TransitionActionType +local TransitionActionType = { + Alpha = 4, + Animation = 7, + Color = 6, + ColorFilter = 12, + Icon = 15, + Pivot = 3, + Rotation = 5, + Scale = 2, + Shake = 11, + Size = 1, + Skew = 13, + Sound = 9, + Text = 14, + Transition = 10, + Unknown = 16, + Visible = 8, + XY = 0, +} + +return TransitionActionType \ No newline at end of file diff --git a/addons/cclua/fairygui/library/fgui/TweenPropType.lua b/addons/cclua/fairygui/library/fgui/TweenPropType.lua new file mode 100644 index 00000000..613ab8af --- /dev/null +++ b/addons/cclua/fairygui/library/fgui/TweenPropType.lua @@ -0,0 +1,25 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta fgui.TweenPropType + +---@type fgui.TweenPropType +local VALUE + +--- +---@enum fgui.TweenPropType +local TweenPropType = { + Alpha = 11, + Height = 5, + None = 0, + Position = 3, + Progress = 12, + Rotation = 10, + Scale = 9, + ScaleX = 7, + ScaleY = 8, + Size = 6, + Width = 4, + X = 1, + Y = 2, +} + +return TweenPropType \ No newline at end of file diff --git a/addons/cclua/fairygui/library/fgui/TweenValue.lua b/addons/cclua/fairygui/library/fgui/TweenValue.lua new file mode 100644 index 00000000..e9798be6 --- /dev/null +++ b/addons/cclua/fairygui/library/fgui/TweenValue.lua @@ -0,0 +1,52 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta fgui.TweenValue + +--- +---@class fgui.TweenValue +---@field color any +---@field vec2 cc.Vec2 +---@field vec3 cc.Vec3 +---@field vec4 cc.Vec4 +---@field d number +---@field w number +---@field x number +---@field y number +---@field z number +local TweenValue = {} + +---@return any +function TweenValue:__gc() end + +---@return any +function TweenValue:__olua_move() end + +---@return any +function TweenValue:getColor() end + +---@return cc.Vec2 +function TweenValue:getVec2() end + +---@return cc.Vec3 +function TweenValue:getVec3() end + +---@return cc.Vec4 +function TweenValue:getVec4() end + +---@return fgui.TweenValue +function TweenValue.new() end + +---@param value any +function TweenValue:setColor(value) end + +---@param value cc.Vec2 +function TweenValue:setVec2(value) end + +---@param value cc.Vec3 +function TweenValue:setVec3(value) end + +---@param value cc.Vec4 +function TweenValue:setVec4(value) end + +function TweenValue:setZero() end + +return TweenValue \ No newline at end of file diff --git a/addons/cclua/fairygui/library/fgui/UIConfig.lua b/addons/cclua/fairygui/library/fgui/UIConfig.lua new file mode 100644 index 00000000..4c240840 --- /dev/null +++ b/addons/cclua/fairygui/library/fgui/UIConfig.lua @@ -0,0 +1,45 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta fgui.UIConfig + +--- +---@class fgui.UIConfig +---@field bringWindowToFrontOnClick boolean +---@field buttonSound string +---@field buttonSoundVolumeScale number +---@field clickDragSensitivity integer +---@field defaultComboBoxVisibleItemCount integer +---@field defaultFont string +---@field defaultScrollBarDisplay fgui.ScrollBarDisplayType +---@field defaultScrollBounceEffect boolean +---@field defaultScrollDecelerationRate number +---@field defaultScrollStep integer +---@field defaultScrollTouchEffect boolean +---@field globalModalWaiting string +---@field horizontalScrollBar string +---@field modalLayerColor any +---@field popupMenu string +---@field popupMenu_seperator string +---@field tooltipsWin string +---@field touchDragSensitivity integer +---@field touchScrollSensitivity integer +---@field verticalScrollBar string +---@field windowModalWaiting string +local UIConfig = {} + +---@return any +function UIConfig:__gc() end + +---@return any +function UIConfig:__olua_move() end + +---@param aliasName string +---@param isTTF olua.bool +---@return string +---@overload fun(aliasName: string): string +function UIConfig.getRealFontName(aliasName, isTTF) end + +---@param aliasName string +---@param realName string +function UIConfig.registerFont(aliasName, realName) end + +return UIConfig \ No newline at end of file diff --git a/addons/cclua/fairygui/library/fgui/UIEventDispatcher.lua b/addons/cclua/fairygui/library/fgui/UIEventDispatcher.lua new file mode 100644 index 00000000..37a421aa --- /dev/null +++ b/addons/cclua/fairygui/library/fgui/UIEventDispatcher.lua @@ -0,0 +1,47 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta fgui.UIEventDispatcher + +--- +---@class fgui.UIEventDispatcher : cc.Ref +local UIEventDispatcher = {} + +---@param eventType integer +---@param callback fgui.EventCallback +---@overload fun(self: fgui.UIEventDispatcher, eventType: integer, callback: fgui.EventCallback, tag: any) +function UIEventDispatcher:addEventListener(eventType, callback) end + +---@param eventType integer +---@param data any +---@param dataValue any +---@return boolean +---@overload fun(self: fgui.UIEventDispatcher, eventType: integer): boolean +---@overload fun(self: fgui.UIEventDispatcher, eventType: integer, data: any): boolean +function UIEventDispatcher:bubbleEvent(eventType, data, dataValue) end + +---@param eventType integer +---@param data any +---@param dataValue any +---@return boolean +---@overload fun(self: fgui.UIEventDispatcher, eventType: integer): boolean +---@overload fun(self: fgui.UIEventDispatcher, eventType: integer, data: any): boolean +function UIEventDispatcher:dispatchEvent(eventType, data, dataValue) end + +---@param eventType integer +---@return boolean +---@overload fun(self: fgui.UIEventDispatcher, eventType: integer, tag: any): boolean +function UIEventDispatcher:hasEventListener(eventType) end + +---@param eventType integer +---@return boolean +function UIEventDispatcher:isDispatchingEvent(eventType) end + +---@return fgui.UIEventDispatcher +function UIEventDispatcher.new() end + +---@param eventType integer +---@overload fun(self: fgui.UIEventDispatcher, eventType: integer, tag: any) +function UIEventDispatcher:removeEventListener(eventType) end + +function UIEventDispatcher:removeEventListeners() end + +return UIEventDispatcher \ No newline at end of file diff --git a/addons/cclua/fairygui/library/fgui/UIEventType.lua b/addons/cclua/fairygui/library/fgui/UIEventType.lua new file mode 100644 index 00000000..e8beff1c --- /dev/null +++ b/addons/cclua/fairygui/library/fgui/UIEventType.lua @@ -0,0 +1,44 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta fgui.UIEventType + +--- +---@class fgui.UIEventType +---@field Changed integer +---@field Click integer +---@field ClickItem integer +---@field ClickLink integer +---@field ClickMenu integer +---@field DragEnd integer +---@field DragMove integer +---@field DragStart integer +---@field Drop integer +---@field Enter integer +---@field Exit integer +---@field GearStop integer +---@field KeyDown integer +---@field KeyUp integer +---@field MiddleClick integer +---@field MouseWheel integer +---@field PositionChange integer +---@field PullDownRelease integer +---@field PullUpRelease integer +---@field RightClick integer +---@field RightClickItem integer +---@field RollOut integer +---@field RollOver integer +---@field Scroll integer +---@field ScrollEnd integer +---@field SizeChange integer +---@field Submit integer +---@field TouchBegin integer +---@field TouchEnd integer +---@field TouchMove integer +local UIEventType = {} + +---@return any +function UIEventType:__gc() end + +---@return any +function UIEventType:__olua_move() end + +return UIEventType \ No newline at end of file diff --git a/addons/cclua/fairygui/library/fgui/UIObjectFactory.lua b/addons/cclua/fairygui/library/fgui/UIObjectFactory.lua new file mode 100644 index 00000000..3302ffd7 --- /dev/null +++ b/addons/cclua/fairygui/library/fgui/UIObjectFactory.lua @@ -0,0 +1,26 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta fgui.UIObjectFactory + +--- +---@class fgui.UIObjectFactory +local UIObjectFactory = {} + +---@return any +function UIObjectFactory:__gc() end + +---@return any +function UIObjectFactory:__olua_move() end + +---@param pi fgui.PackageItem +---@return fgui.GObject +---@overload fun(type: fgui.ObjectType): fgui.GObject +function UIObjectFactory.newObject(pi) end + +---@param creator fgui.UIObjectFactory.GLoaderCreator +function UIObjectFactory.setLoaderExtension(creator) end + +---@param url string +---@param creator fgui.UIObjectFactory.GComponentCreator +function UIObjectFactory.setPackageItemExtension(url, creator) end + +return UIObjectFactory \ No newline at end of file diff --git a/addons/cclua/fairygui/library/fgui/UIObjectFactory/GComponentCreator.lua b/addons/cclua/fairygui/library/fgui/UIObjectFactory/GComponentCreator.lua new file mode 100644 index 00000000..794802c1 --- /dev/null +++ b/addons/cclua/fairygui/library/fgui/UIObjectFactory/GComponentCreator.lua @@ -0,0 +1,14 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta fgui.UIObjectFactory.GComponentCreator + +--- +--- +---std::function +---@class fgui.UIObjectFactory.GComponentCreator +local GComponentCreator = {} + +---@return fgui.UIObjectFactory.GComponentCreator + +function GComponentCreator:__call() end + +return GComponentCreator \ No newline at end of file diff --git a/addons/cclua/fairygui/library/fgui/UIObjectFactory/GLoaderCreator.lua b/addons/cclua/fairygui/library/fgui/UIObjectFactory/GLoaderCreator.lua new file mode 100644 index 00000000..48333f2f --- /dev/null +++ b/addons/cclua/fairygui/library/fgui/UIObjectFactory/GLoaderCreator.lua @@ -0,0 +1,14 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta fgui.UIObjectFactory.GLoaderCreator + +--- +--- +---std::function +---@class fgui.UIObjectFactory.GLoaderCreator +local GLoaderCreator = {} + +---@return fgui.UIObjectFactory.GLoaderCreator + +function GLoaderCreator:__call() end + +return GLoaderCreator \ No newline at end of file diff --git a/addons/cclua/fairygui/library/fgui/UIPackage.lua b/addons/cclua/fairygui/library/fgui/UIPackage.lua new file mode 100644 index 00000000..cadc69cb --- /dev/null +++ b/addons/cclua/fairygui/library/fgui/UIPackage.lua @@ -0,0 +1,100 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta fgui.UIPackage + +--- +---@class fgui.UIPackage : cc.Ref +---@field branch string +---@field emptyTexture cc.Texture2D +---@field id string +---@field name string +---@field URL_PREFIX string +local UIPackage = {} + +---@param descFilePath string +---@return fgui.UIPackage +function UIPackage.addPackage(descFilePath) end + +---@param pkgName string +---@param resName string +---@return fgui.GObject +function UIPackage.createObject(pkgName, resName) end + +---@param url string +---@return fgui.GObject +function UIPackage.createObjectFromURL(url) end + +---@return string +function UIPackage.getBranch() end + +---@param id string +---@return fgui.UIPackage +function UIPackage.getById(id) end + +---@param name string +---@return fgui.UIPackage +function UIPackage.getByName(name) end + +---@return cc.Texture2D +function UIPackage.getEmptyTexture() end + +---@return string +function UIPackage:getId() end + +---@param itemId string +---@return fgui.PackageItem +function UIPackage:getItem(itemId) end + +---@param pkgName string +---@param resName string +---@param type fgui.PackageItemType +---@return any +---@overload fun(pkgName: string, resName: string): any +---@overload fun(self: fgui.UIPackage, item: fgui.PackageItem): any +function UIPackage.getItemAsset(pkgName, resName, type) end + +---@param url string +---@param type fgui.PackageItemType +---@return any +---@overload fun(url: string): any +function UIPackage.getItemAssetByURL(url, type) end + +---@param itemName string +---@return fgui.PackageItem +function UIPackage:getItemByName(itemName) end + +---@param url string +---@return fgui.PackageItem +function UIPackage.getItemByURL(url) end + +---@param pkgName string +---@param resName string +---@return string +function UIPackage.getItemURL(pkgName, resName) end + +---@return string +function UIPackage:getName() end + +---@param key string +---@return string +function UIPackage.getVar(key) end + +---@return fgui.UIPackage +function UIPackage.new() end + +---@param url string +---@return string +function UIPackage.normalizeURL(url) end + +function UIPackage.removeAllPackages() end + +---@param packageIdOrName string +function UIPackage.removePackage(packageIdOrName) end + +---@param value string +function UIPackage.setBranch(value) end + +---@param key string +---@param value string +function UIPackage.setVar(key, value) end + +return UIPackage \ No newline at end of file diff --git a/addons/cclua/fairygui/library/fgui/UISource.lua b/addons/cclua/fairygui/library/fgui/UISource.lua new file mode 100644 index 00000000..f8bf0ba3 --- /dev/null +++ b/addons/cclua/fairygui/library/fgui/UISource.lua @@ -0,0 +1,13 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta fgui.UISource + +--- +---@class fgui.UISource : fgui.IUISource +local UISource = {} + +---@return fgui.UISource +function UISource.create() end + +function UISource:loadComplete() end + +return UISource \ No newline at end of file diff --git a/addons/cclua/fairygui/library/fgui/VectorTreeNode.lua b/addons/cclua/fairygui/library/fgui/VectorTreeNode.lua new file mode 100644 index 00000000..7a22174c --- /dev/null +++ b/addons/cclua/fairygui/library/fgui/VectorTreeNode.lua @@ -0,0 +1,49 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta fgui.VectorTreeNode + +--- +---@class fgui.VectorTreeNode +---@field buffer any +---@field length integer +---@field value fgui.GTreeNode[] +local VectorTreeNode = {} + +---@return any +function VectorTreeNode:__gc() end + +---@param idx integer +---@return fgui.GTreeNode[] +function VectorTreeNode:__index(idx) end + +---@param idx integer +---@param v fgui.GTreeNode[] +function VectorTreeNode:__newindex(idx, v) end + +---@return any +function VectorTreeNode:__olua_move() end + +---@param len integer +---@return fgui.VectorTreeNode +---@overload fun(): fgui.VectorTreeNode +function VectorTreeNode.new(len) end + +---@param from integer +---@param to integer +---@return fgui.VectorTreeNode +---@overload fun(self: fgui.VectorTreeNode, from: integer): fgui.VectorTreeNode +function VectorTreeNode:slice(from, to) end + +---@param from integer +---@param to integer +---@return fgui.VectorTreeNode +---@overload fun(self: fgui.VectorTreeNode, from: integer): fgui.VectorTreeNode +function VectorTreeNode:sub(from, to) end + +---@return fgui.VectorTreeNode +function VectorTreeNode:take() end + +---@param len integer +---@return any +function VectorTreeNode:tostring(len) end + +return VectorTreeNode \ No newline at end of file diff --git a/addons/cclua/fairygui/library/fgui/Window.lua b/addons/cclua/fairygui/library/fgui/Window.lua new file mode 100644 index 00000000..7143cddc --- /dev/null +++ b/addons/cclua/fairygui/library/fgui/Window.lua @@ -0,0 +1,94 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta fgui.Window + +--- +---@class fgui.Window : fgui.GComponent +---@field bringToFrontOnClick boolean +---@field closeButton fgui.GObject +---@field contentArea fgui.GObject +---@field contentPane fgui.GComponent +---@field dragArea fgui.GObject +---@field frame fgui.GComponent +---@field modal boolean +---@field modalWaitingPane fgui.GObject +---@field showing boolean +---@field top boolean +local Window = {} + +---@param uiSource fgui.IUISource +function Window:addUISource(uiSource) end + +function Window:bringToFront() end + +---@return boolean +---@overload fun(self: fgui.Window, requestingCmd: integer): boolean +function Window:closeModalWait() end + +---@return fgui.Window +function Window.create() end + +---@return fgui.GObject +function Window:getCloseButton() end + +---@return fgui.GObject +function Window:getContentArea() end + +---@return fgui.GComponent +function Window:getContentPane() end + +---@return fgui.GObject +function Window:getDragArea() end + +---@return fgui.GComponent +function Window:getFrame() end + +---@return fgui.GObject +function Window:getModalWaitingPane() end + +function Window:hide() end + +function Window:hideImmediately() end + +function Window:initWindow() end + +---@return boolean +function Window:isBringToFrontOnClick() end + +---@return boolean +function Window:isModal() end + +---@return boolean +function Window:isShowing() end + +---@return boolean +function Window:isTop() end + +---@return fgui.Window +function Window.new() end + +---@param value boolean +function Window:setBringToFrontOnClick(value) end + +---@param value fgui.GObject +function Window:setCloseButton(value) end + +---@param value fgui.GObject +function Window:setContentArea(value) end + +---@param value fgui.GComponent +function Window:setContentPane(value) end + +---@param value fgui.GObject +function Window:setDragArea(value) end + +---@param value boolean +function Window:setModal(value) end + +function Window:show() end + +---@overload fun(self: fgui.Window, requestingCmd: integer) +function Window:showModalWait() end + +function Window:toggleStatus() end + +return Window \ No newline at end of file diff --git a/addons/cclua/olua/config.json b/addons/cclua/olua/config.json new file mode 100644 index 00000000..52e10496 --- /dev/null +++ b/addons/cclua/olua/config.json @@ -0,0 +1,6 @@ +{ + "$schema": "https://raw.githubusercontent.com/LuaLS/LLS-Addons/main/schemas/addon_config.schema.json", + "words": ["%s+-olua"], + "files": ["olua"], + "settings": {} +} \ No newline at end of file diff --git a/addons/cclua/olua/library/olua/bool.lua b/addons/cclua/olua/library/olua/bool.lua new file mode 100644 index 00000000..457f9cfc --- /dev/null +++ b/addons/cclua/olua/library/olua/bool.lua @@ -0,0 +1,49 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta olua.bool + +--- +---@class olua.bool +---@field buffer any +---@field length integer +---@field value boolean +local bool = {} + +---@return any +function bool:__gc() end + +---@param idx integer +---@return boolean +function bool:__index(idx) end + +---@param idx integer +---@param v boolean +function bool:__newindex(idx, v) end + +---@return any +function bool:__olua_move() end + +---@param len integer +---@return olua.bool +---@overload fun(): olua.bool +function bool.new(len) end + +---@param from integer +---@param to integer +---@return olua.bool +---@overload fun(self: olua.bool, from: integer): olua.bool +function bool:slice(from, to) end + +---@param from integer +---@param to integer +---@return olua.bool +---@overload fun(self: olua.bool, from: integer): olua.bool +function bool:sub(from, to) end + +---@return olua.bool +function bool:take() end + +---@param len integer +---@return any +function bool:tostring(len) end + +return bool \ No newline at end of file diff --git a/addons/cclua/olua/library/olua/char.lua b/addons/cclua/olua/library/olua/char.lua new file mode 100644 index 00000000..c5b9d223 --- /dev/null +++ b/addons/cclua/olua/library/olua/char.lua @@ -0,0 +1,49 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta olua.char + +--- +---@class olua.char +---@field buffer any +---@field length integer +---@field value any +local char = {} + +---@return any +function char:__gc() end + +---@param idx integer +---@return any +function char:__index(idx) end + +---@param idx integer +---@param v any +function char:__newindex(idx, v) end + +---@return any +function char:__olua_move() end + +---@param len integer +---@return olua.char +---@overload fun(): olua.char +function char.new(len) end + +---@param from integer +---@param to integer +---@return olua.char +---@overload fun(self: olua.char, from: integer): olua.char +function char:slice(from, to) end + +---@param from integer +---@param to integer +---@return olua.char +---@overload fun(self: olua.char, from: integer): olua.char +function char:sub(from, to) end + +---@return olua.char +function char:take() end + +---@param len integer +---@return any +function char:tostring(len) end + +return char \ No newline at end of file diff --git a/addons/cclua/olua/library/olua/double.lua b/addons/cclua/olua/library/olua/double.lua new file mode 100644 index 00000000..07c578aa --- /dev/null +++ b/addons/cclua/olua/library/olua/double.lua @@ -0,0 +1,49 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta olua.double + +--- +---@class olua.double +---@field buffer any +---@field length integer +---@field value any +local double = {} + +---@return any +function double:__gc() end + +---@param idx integer +---@return any +function double:__index(idx) end + +---@param idx integer +---@param v any +function double:__newindex(idx, v) end + +---@return any +function double:__olua_move() end + +---@param len integer +---@return olua.double +---@overload fun(): olua.double +function double.new(len) end + +---@param from integer +---@param to integer +---@return olua.double +---@overload fun(self: olua.double, from: integer): olua.double +function double:slice(from, to) end + +---@param from integer +---@param to integer +---@return olua.double +---@overload fun(self: olua.double, from: integer): olua.double +function double:sub(from, to) end + +---@return olua.double +function double:take() end + +---@param len integer +---@return any +function double:tostring(len) end + +return double \ No newline at end of file diff --git a/addons/cclua/olua/library/olua/float.lua b/addons/cclua/olua/library/olua/float.lua new file mode 100644 index 00000000..c84259ea --- /dev/null +++ b/addons/cclua/olua/library/olua/float.lua @@ -0,0 +1,49 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta olua.float + +--- +---@class olua.float +---@field buffer any +---@field length integer +---@field value any +local float = {} + +---@return any +function float:__gc() end + +---@param idx integer +---@return any +function float:__index(idx) end + +---@param idx integer +---@param v any +function float:__newindex(idx, v) end + +---@return any +function float:__olua_move() end + +---@param len integer +---@return olua.float +---@overload fun(): olua.float +function float.new(len) end + +---@param from integer +---@param to integer +---@return olua.float +---@overload fun(self: olua.float, from: integer): olua.float +function float:slice(from, to) end + +---@param from integer +---@param to integer +---@return olua.float +---@overload fun(self: olua.float, from: integer): olua.float +function float:sub(from, to) end + +---@return olua.float +function float:take() end + +---@param len integer +---@return any +function float:tostring(len) end + +return float \ No newline at end of file diff --git a/addons/cclua/olua/library/olua/int.lua b/addons/cclua/olua/library/olua/int.lua new file mode 100644 index 00000000..781a97ba --- /dev/null +++ b/addons/cclua/olua/library/olua/int.lua @@ -0,0 +1,49 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta olua.int + +--- +---@class olua.int +---@field buffer any +---@field length integer +---@field value any +local int = {} + +---@return any +function int:__gc() end + +---@param idx integer +---@return any +function int:__index(idx) end + +---@param idx integer +---@param v any +function int:__newindex(idx, v) end + +---@return any +function int:__olua_move() end + +---@param len integer +---@return olua.int +---@overload fun(): olua.int +function int.new(len) end + +---@param from integer +---@param to integer +---@return olua.int +---@overload fun(self: olua.int, from: integer): olua.int +function int:slice(from, to) end + +---@param from integer +---@param to integer +---@return olua.int +---@overload fun(self: olua.int, from: integer): olua.int +function int:sub(from, to) end + +---@return olua.int +function int:take() end + +---@param len integer +---@return any +function int:tostring(len) end + +return int \ No newline at end of file diff --git a/addons/cclua/olua/library/olua/int16.lua b/addons/cclua/olua/library/olua/int16.lua new file mode 100644 index 00000000..53412cd9 --- /dev/null +++ b/addons/cclua/olua/library/olua/int16.lua @@ -0,0 +1,49 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta olua.int16 + +--- +---@class olua.int16 +---@field buffer any +---@field length integer +---@field value integer +local int16 = {} + +---@return any +function int16:__gc() end + +---@param idx integer +---@return integer +function int16:__index(idx) end + +---@param idx integer +---@param v integer +function int16:__newindex(idx, v) end + +---@return any +function int16:__olua_move() end + +---@param len integer +---@return olua.int16 +---@overload fun(): olua.int16 +function int16.new(len) end + +---@param from integer +---@param to integer +---@return olua.int16 +---@overload fun(self: olua.int16, from: integer): olua.int16 +function int16:slice(from, to) end + +---@param from integer +---@param to integer +---@return olua.int16 +---@overload fun(self: olua.int16, from: integer): olua.int16 +function int16:sub(from, to) end + +---@return olua.int16 +function int16:take() end + +---@param len integer +---@return any +function int16:tostring(len) end + +return int16 \ No newline at end of file diff --git a/addons/cclua/olua/library/olua/int32.lua b/addons/cclua/olua/library/olua/int32.lua new file mode 100644 index 00000000..9b7dbb6e --- /dev/null +++ b/addons/cclua/olua/library/olua/int32.lua @@ -0,0 +1,49 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta olua.int32 + +--- +---@class olua.int32 +---@field buffer any +---@field length integer +---@field value integer +local int32 = {} + +---@return any +function int32:__gc() end + +---@param idx integer +---@return integer +function int32:__index(idx) end + +---@param idx integer +---@param v integer +function int32:__newindex(idx, v) end + +---@return any +function int32:__olua_move() end + +---@param len integer +---@return olua.int32 +---@overload fun(): olua.int32 +function int32.new(len) end + +---@param from integer +---@param to integer +---@return olua.int32 +---@overload fun(self: olua.int32, from: integer): olua.int32 +function int32:slice(from, to) end + +---@param from integer +---@param to integer +---@return olua.int32 +---@overload fun(self: olua.int32, from: integer): olua.int32 +function int32:sub(from, to) end + +---@return olua.int32 +function int32:take() end + +---@param len integer +---@return any +function int32:tostring(len) end + +return int32 \ No newline at end of file diff --git a/addons/cclua/olua/library/olua/int64.lua b/addons/cclua/olua/library/olua/int64.lua new file mode 100644 index 00000000..c042dd6c --- /dev/null +++ b/addons/cclua/olua/library/olua/int64.lua @@ -0,0 +1,49 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta olua.int64 + +--- +---@class olua.int64 +---@field buffer any +---@field length integer +---@field value integer +local int64 = {} + +---@return any +function int64:__gc() end + +---@param idx integer +---@return integer +function int64:__index(idx) end + +---@param idx integer +---@param v integer +function int64:__newindex(idx, v) end + +---@return any +function int64:__olua_move() end + +---@param len integer +---@return olua.int64 +---@overload fun(): olua.int64 +function int64.new(len) end + +---@param from integer +---@param to integer +---@return olua.int64 +---@overload fun(self: olua.int64, from: integer): olua.int64 +function int64:slice(from, to) end + +---@param from integer +---@param to integer +---@return olua.int64 +---@overload fun(self: olua.int64, from: integer): olua.int64 +function int64:sub(from, to) end + +---@return olua.int64 +function int64:take() end + +---@param len integer +---@return any +function int64:tostring(len) end + +return int64 \ No newline at end of file diff --git a/addons/cclua/olua/library/olua/int8.lua b/addons/cclua/olua/library/olua/int8.lua new file mode 100644 index 00000000..f8305c95 --- /dev/null +++ b/addons/cclua/olua/library/olua/int8.lua @@ -0,0 +1,49 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta olua.int8 + +--- +---@class olua.int8 +---@field buffer any +---@field length integer +---@field value integer +local int8 = {} + +---@return any +function int8:__gc() end + +---@param idx integer +---@return integer +function int8:__index(idx) end + +---@param idx integer +---@param v integer +function int8:__newindex(idx, v) end + +---@return any +function int8:__olua_move() end + +---@param len integer +---@return olua.int8 +---@overload fun(): olua.int8 +function int8.new(len) end + +---@param from integer +---@param to integer +---@return olua.int8 +---@overload fun(self: olua.int8, from: integer): olua.int8 +function int8:slice(from, to) end + +---@param from integer +---@param to integer +---@return olua.int8 +---@overload fun(self: olua.int8, from: integer): olua.int8 +function int8:sub(from, to) end + +---@return olua.int8 +function int8:take() end + +---@param len integer +---@return any +function int8:tostring(len) end + +return int8 \ No newline at end of file diff --git a/addons/cclua/olua/library/olua/ldouble.lua b/addons/cclua/olua/library/olua/ldouble.lua new file mode 100644 index 00000000..a294ddc5 --- /dev/null +++ b/addons/cclua/olua/library/olua/ldouble.lua @@ -0,0 +1,49 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta olua.ldouble + +--- +---@class olua.ldouble +---@field buffer any +---@field length integer +---@field value any +local ldouble = {} + +---@return any +function ldouble:__gc() end + +---@param idx integer +---@return any +function ldouble:__index(idx) end + +---@param idx integer +---@param v any +function ldouble:__newindex(idx, v) end + +---@return any +function ldouble:__olua_move() end + +---@param len integer +---@return olua.ldouble +---@overload fun(): olua.ldouble +function ldouble.new(len) end + +---@param from integer +---@param to integer +---@return olua.ldouble +---@overload fun(self: olua.ldouble, from: integer): olua.ldouble +function ldouble:slice(from, to) end + +---@param from integer +---@param to integer +---@return olua.ldouble +---@overload fun(self: olua.ldouble, from: integer): olua.ldouble +function ldouble:sub(from, to) end + +---@return olua.ldouble +function ldouble:take() end + +---@param len integer +---@return any +function ldouble:tostring(len) end + +return ldouble \ No newline at end of file diff --git a/addons/cclua/olua/library/olua/llong.lua b/addons/cclua/olua/library/olua/llong.lua new file mode 100644 index 00000000..d25163cf --- /dev/null +++ b/addons/cclua/olua/library/olua/llong.lua @@ -0,0 +1,49 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta olua.llong + +--- +---@class olua.llong +---@field buffer any +---@field length integer +---@field value any +local llong = {} + +---@return any +function llong:__gc() end + +---@param idx integer +---@return any +function llong:__index(idx) end + +---@param idx integer +---@param v any +function llong:__newindex(idx, v) end + +---@return any +function llong:__olua_move() end + +---@param len integer +---@return olua.llong +---@overload fun(): olua.llong +function llong.new(len) end + +---@param from integer +---@param to integer +---@return olua.llong +---@overload fun(self: olua.llong, from: integer): olua.llong +function llong:slice(from, to) end + +---@param from integer +---@param to integer +---@return olua.llong +---@overload fun(self: olua.llong, from: integer): olua.llong +function llong:sub(from, to) end + +---@return olua.llong +function llong:take() end + +---@param len integer +---@return any +function llong:tostring(len) end + +return llong \ No newline at end of file diff --git a/addons/cclua/olua/library/olua/long.lua b/addons/cclua/olua/library/olua/long.lua new file mode 100644 index 00000000..ef900f30 --- /dev/null +++ b/addons/cclua/olua/library/olua/long.lua @@ -0,0 +1,49 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta olua.long + +--- +---@class olua.long +---@field buffer any +---@field length integer +---@field value any +local long = {} + +---@return any +function long:__gc() end + +---@param idx integer +---@return any +function long:__index(idx) end + +---@param idx integer +---@param v any +function long:__newindex(idx, v) end + +---@return any +function long:__olua_move() end + +---@param len integer +---@return olua.long +---@overload fun(): olua.long +function long.new(len) end + +---@param from integer +---@param to integer +---@return olua.long +---@overload fun(self: olua.long, from: integer): olua.long +function long:slice(from, to) end + +---@param from integer +---@param to integer +---@return olua.long +---@overload fun(self: olua.long, from: integer): olua.long +function long:sub(from, to) end + +---@return olua.long +function long:take() end + +---@param len integer +---@return any +function long:tostring(len) end + +return long \ No newline at end of file diff --git a/addons/cclua/olua/library/olua/short.lua b/addons/cclua/olua/library/olua/short.lua new file mode 100644 index 00000000..1b16b04c --- /dev/null +++ b/addons/cclua/olua/library/olua/short.lua @@ -0,0 +1,49 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta olua.short + +--- +---@class olua.short +---@field buffer any +---@field length integer +---@field value any +local short = {} + +---@return any +function short:__gc() end + +---@param idx integer +---@return any +function short:__index(idx) end + +---@param idx integer +---@param v any +function short:__newindex(idx, v) end + +---@return any +function short:__olua_move() end + +---@param len integer +---@return olua.short +---@overload fun(): olua.short +function short.new(len) end + +---@param from integer +---@param to integer +---@return olua.short +---@overload fun(self: olua.short, from: integer): olua.short +function short:slice(from, to) end + +---@param from integer +---@param to integer +---@return olua.short +---@overload fun(self: olua.short, from: integer): olua.short +function short:sub(from, to) end + +---@return olua.short +function short:take() end + +---@param len integer +---@return any +function short:tostring(len) end + +return short \ No newline at end of file diff --git a/addons/cclua/olua/library/olua/size_t.lua b/addons/cclua/olua/library/olua/size_t.lua new file mode 100644 index 00000000..9de14cdf --- /dev/null +++ b/addons/cclua/olua/library/olua/size_t.lua @@ -0,0 +1,49 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta olua.size_t + +--- +---@class olua.size_t +---@field buffer any +---@field length integer +---@field value integer +local size_t = {} + +---@return any +function size_t:__gc() end + +---@param idx integer +---@return integer +function size_t:__index(idx) end + +---@param idx integer +---@param v integer +function size_t:__newindex(idx, v) end + +---@return any +function size_t:__olua_move() end + +---@param len integer +---@return olua.size_t +---@overload fun(): olua.size_t +function size_t.new(len) end + +---@param from integer +---@param to integer +---@return olua.size_t +---@overload fun(self: olua.size_t, from: integer): olua.size_t +function size_t:slice(from, to) end + +---@param from integer +---@param to integer +---@return olua.size_t +---@overload fun(self: olua.size_t, from: integer): olua.size_t +function size_t:sub(from, to) end + +---@return olua.size_t +function size_t:take() end + +---@param len integer +---@return any +function size_t:tostring(len) end + +return size_t \ No newline at end of file diff --git a/addons/cclua/olua/library/olua/ssize_t.lua b/addons/cclua/olua/library/olua/ssize_t.lua new file mode 100644 index 00000000..5afd45a8 --- /dev/null +++ b/addons/cclua/olua/library/olua/ssize_t.lua @@ -0,0 +1,49 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta olua.ssize_t + +--- +---@class olua.ssize_t +---@field buffer any +---@field length integer +---@field value integer +local ssize_t = {} + +---@return any +function ssize_t:__gc() end + +---@param idx integer +---@return integer +function ssize_t:__index(idx) end + +---@param idx integer +---@param v integer +function ssize_t:__newindex(idx, v) end + +---@return any +function ssize_t:__olua_move() end + +---@param len integer +---@return olua.ssize_t +---@overload fun(): olua.ssize_t +function ssize_t.new(len) end + +---@param from integer +---@param to integer +---@return olua.ssize_t +---@overload fun(self: olua.ssize_t, from: integer): olua.ssize_t +function ssize_t:slice(from, to) end + +---@param from integer +---@param to integer +---@return olua.ssize_t +---@overload fun(self: olua.ssize_t, from: integer): olua.ssize_t +function ssize_t:sub(from, to) end + +---@return olua.ssize_t +function ssize_t:take() end + +---@param len integer +---@return any +function ssize_t:tostring(len) end + +return ssize_t \ No newline at end of file diff --git a/addons/cclua/olua/library/olua/string.lua b/addons/cclua/olua/library/olua/string.lua new file mode 100644 index 00000000..b89f39c1 --- /dev/null +++ b/addons/cclua/olua/library/olua/string.lua @@ -0,0 +1,49 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta olua.string + +--- +---@class olua.string +---@field buffer any +---@field length integer +---@field value string +local string = {} + +---@return any +function string:__gc() end + +---@param idx integer +---@return string +function string:__index(idx) end + +---@param idx integer +---@param v string +function string:__newindex(idx, v) end + +---@return any +function string:__olua_move() end + +---@param len integer +---@return olua.string +---@overload fun(): olua.string +function string.new(len) end + +---@param from integer +---@param to integer +---@return olua.string +---@overload fun(self: olua.string, from: integer): olua.string +function string:slice(from, to) end + +---@param from integer +---@param to integer +---@return olua.string +---@overload fun(self: olua.string, from: integer): olua.string +function string:sub(from, to) end + +---@return olua.string +function string:take() end + +---@param len integer +---@return any +function string:tostring(len) end + +return string \ No newline at end of file diff --git a/addons/cclua/olua/library/olua/uchar.lua b/addons/cclua/olua/library/olua/uchar.lua new file mode 100644 index 00000000..b51e159e --- /dev/null +++ b/addons/cclua/olua/library/olua/uchar.lua @@ -0,0 +1,49 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta olua.uchar + +--- +---@class olua.uchar +---@field buffer any +---@field length integer +---@field value any +local uchar = {} + +---@return any +function uchar:__gc() end + +---@param idx integer +---@return any +function uchar:__index(idx) end + +---@param idx integer +---@param v any +function uchar:__newindex(idx, v) end + +---@return any +function uchar:__olua_move() end + +---@param len integer +---@return olua.uchar +---@overload fun(): olua.uchar +function uchar.new(len) end + +---@param from integer +---@param to integer +---@return olua.uchar +---@overload fun(self: olua.uchar, from: integer): olua.uchar +function uchar:slice(from, to) end + +---@param from integer +---@param to integer +---@return olua.uchar +---@overload fun(self: olua.uchar, from: integer): olua.uchar +function uchar:sub(from, to) end + +---@return olua.uchar +function uchar:take() end + +---@param len integer +---@return any +function uchar:tostring(len) end + +return uchar \ No newline at end of file diff --git a/addons/cclua/olua/library/olua/uint.lua b/addons/cclua/olua/library/olua/uint.lua new file mode 100644 index 00000000..e5b92a54 --- /dev/null +++ b/addons/cclua/olua/library/olua/uint.lua @@ -0,0 +1,49 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta olua.uint + +--- +---@class olua.uint +---@field buffer any +---@field length integer +---@field value any +local uint = {} + +---@return any +function uint:__gc() end + +---@param idx integer +---@return any +function uint:__index(idx) end + +---@param idx integer +---@param v any +function uint:__newindex(idx, v) end + +---@return any +function uint:__olua_move() end + +---@param len integer +---@return olua.uint +---@overload fun(): olua.uint +function uint.new(len) end + +---@param from integer +---@param to integer +---@return olua.uint +---@overload fun(self: olua.uint, from: integer): olua.uint +function uint:slice(from, to) end + +---@param from integer +---@param to integer +---@return olua.uint +---@overload fun(self: olua.uint, from: integer): olua.uint +function uint:sub(from, to) end + +---@return olua.uint +function uint:take() end + +---@param len integer +---@return any +function uint:tostring(len) end + +return uint \ No newline at end of file diff --git a/addons/cclua/olua/library/olua/uint16.lua b/addons/cclua/olua/library/olua/uint16.lua new file mode 100644 index 00000000..9b230cf1 --- /dev/null +++ b/addons/cclua/olua/library/olua/uint16.lua @@ -0,0 +1,49 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta olua.uint16 + +--- +---@class olua.uint16 +---@field buffer any +---@field length integer +---@field value integer +local uint16 = {} + +---@return any +function uint16:__gc() end + +---@param idx integer +---@return integer +function uint16:__index(idx) end + +---@param idx integer +---@param v integer +function uint16:__newindex(idx, v) end + +---@return any +function uint16:__olua_move() end + +---@param len integer +---@return olua.uint16 +---@overload fun(): olua.uint16 +function uint16.new(len) end + +---@param from integer +---@param to integer +---@return olua.uint16 +---@overload fun(self: olua.uint16, from: integer): olua.uint16 +function uint16:slice(from, to) end + +---@param from integer +---@param to integer +---@return olua.uint16 +---@overload fun(self: olua.uint16, from: integer): olua.uint16 +function uint16:sub(from, to) end + +---@return olua.uint16 +function uint16:take() end + +---@param len integer +---@return any +function uint16:tostring(len) end + +return uint16 \ No newline at end of file diff --git a/addons/cclua/olua/library/olua/uint32.lua b/addons/cclua/olua/library/olua/uint32.lua new file mode 100644 index 00000000..9898b95b --- /dev/null +++ b/addons/cclua/olua/library/olua/uint32.lua @@ -0,0 +1,49 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta olua.uint32 + +--- +---@class olua.uint32 +---@field buffer any +---@field length integer +---@field value integer +local uint32 = {} + +---@return any +function uint32:__gc() end + +---@param idx integer +---@return integer +function uint32:__index(idx) end + +---@param idx integer +---@param v integer +function uint32:__newindex(idx, v) end + +---@return any +function uint32:__olua_move() end + +---@param len integer +---@return olua.uint32 +---@overload fun(): olua.uint32 +function uint32.new(len) end + +---@param from integer +---@param to integer +---@return olua.uint32 +---@overload fun(self: olua.uint32, from: integer): olua.uint32 +function uint32:slice(from, to) end + +---@param from integer +---@param to integer +---@return olua.uint32 +---@overload fun(self: olua.uint32, from: integer): olua.uint32 +function uint32:sub(from, to) end + +---@return olua.uint32 +function uint32:take() end + +---@param len integer +---@return any +function uint32:tostring(len) end + +return uint32 \ No newline at end of file diff --git a/addons/cclua/olua/library/olua/uint64.lua b/addons/cclua/olua/library/olua/uint64.lua new file mode 100644 index 00000000..aadada3c --- /dev/null +++ b/addons/cclua/olua/library/olua/uint64.lua @@ -0,0 +1,49 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta olua.uint64 + +--- +---@class olua.uint64 +---@field buffer any +---@field length integer +---@field value integer +local uint64 = {} + +---@return any +function uint64:__gc() end + +---@param idx integer +---@return integer +function uint64:__index(idx) end + +---@param idx integer +---@param v integer +function uint64:__newindex(idx, v) end + +---@return any +function uint64:__olua_move() end + +---@param len integer +---@return olua.uint64 +---@overload fun(): olua.uint64 +function uint64.new(len) end + +---@param from integer +---@param to integer +---@return olua.uint64 +---@overload fun(self: olua.uint64, from: integer): olua.uint64 +function uint64:slice(from, to) end + +---@param from integer +---@param to integer +---@return olua.uint64 +---@overload fun(self: olua.uint64, from: integer): olua.uint64 +function uint64:sub(from, to) end + +---@return olua.uint64 +function uint64:take() end + +---@param len integer +---@return any +function uint64:tostring(len) end + +return uint64 \ No newline at end of file diff --git a/addons/cclua/olua/library/olua/uint8.lua b/addons/cclua/olua/library/olua/uint8.lua new file mode 100644 index 00000000..d5362341 --- /dev/null +++ b/addons/cclua/olua/library/olua/uint8.lua @@ -0,0 +1,49 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta olua.uint8 + +--- +---@class olua.uint8 +---@field buffer any +---@field length integer +---@field value integer +local uint8 = {} + +---@return any +function uint8:__gc() end + +---@param idx integer +---@return integer +function uint8:__index(idx) end + +---@param idx integer +---@param v integer +function uint8:__newindex(idx, v) end + +---@return any +function uint8:__olua_move() end + +---@param len integer +---@return olua.uint8 +---@overload fun(): olua.uint8 +function uint8.new(len) end + +---@param from integer +---@param to integer +---@return olua.uint8 +---@overload fun(self: olua.uint8, from: integer): olua.uint8 +function uint8:slice(from, to) end + +---@param from integer +---@param to integer +---@return olua.uint8 +---@overload fun(self: olua.uint8, from: integer): olua.uint8 +function uint8:sub(from, to) end + +---@return olua.uint8 +function uint8:take() end + +---@param len integer +---@return any +function uint8:tostring(len) end + +return uint8 \ No newline at end of file diff --git a/addons/cclua/olua/library/olua/ullong.lua b/addons/cclua/olua/library/olua/ullong.lua new file mode 100644 index 00000000..ae5066c6 --- /dev/null +++ b/addons/cclua/olua/library/olua/ullong.lua @@ -0,0 +1,49 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta olua.ullong + +--- +---@class olua.ullong +---@field buffer any +---@field length integer +---@field value any +local ullong = {} + +---@return any +function ullong:__gc() end + +---@param idx integer +---@return any +function ullong:__index(idx) end + +---@param idx integer +---@param v any +function ullong:__newindex(idx, v) end + +---@return any +function ullong:__olua_move() end + +---@param len integer +---@return olua.ullong +---@overload fun(): olua.ullong +function ullong.new(len) end + +---@param from integer +---@param to integer +---@return olua.ullong +---@overload fun(self: olua.ullong, from: integer): olua.ullong +function ullong:slice(from, to) end + +---@param from integer +---@param to integer +---@return olua.ullong +---@overload fun(self: olua.ullong, from: integer): olua.ullong +function ullong:sub(from, to) end + +---@return olua.ullong +function ullong:take() end + +---@param len integer +---@return any +function ullong:tostring(len) end + +return ullong \ No newline at end of file diff --git a/addons/cclua/olua/library/olua/ulong.lua b/addons/cclua/olua/library/olua/ulong.lua new file mode 100644 index 00000000..c2b9ff2a --- /dev/null +++ b/addons/cclua/olua/library/olua/ulong.lua @@ -0,0 +1,49 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta olua.ulong + +--- +---@class olua.ulong +---@field buffer any +---@field length integer +---@field value any +local ulong = {} + +---@return any +function ulong:__gc() end + +---@param idx integer +---@return any +function ulong:__index(idx) end + +---@param idx integer +---@param v any +function ulong:__newindex(idx, v) end + +---@return any +function ulong:__olua_move() end + +---@param len integer +---@return olua.ulong +---@overload fun(): olua.ulong +function ulong.new(len) end + +---@param from integer +---@param to integer +---@return olua.ulong +---@overload fun(self: olua.ulong, from: integer): olua.ulong +function ulong:slice(from, to) end + +---@param from integer +---@param to integer +---@return olua.ulong +---@overload fun(self: olua.ulong, from: integer): olua.ulong +function ulong:sub(from, to) end + +---@return olua.ulong +function ulong:take() end + +---@param len integer +---@return any +function ulong:tostring(len) end + +return ulong \ No newline at end of file diff --git a/addons/cclua/olua/library/olua/ushort.lua b/addons/cclua/olua/library/olua/ushort.lua new file mode 100644 index 00000000..25d732c7 --- /dev/null +++ b/addons/cclua/olua/library/olua/ushort.lua @@ -0,0 +1,49 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta olua.ushort + +--- +---@class olua.ushort +---@field buffer any +---@field length integer +---@field value any +local ushort = {} + +---@return any +function ushort:__gc() end + +---@param idx integer +---@return any +function ushort:__index(idx) end + +---@param idx integer +---@param v any +function ushort:__newindex(idx, v) end + +---@return any +function ushort:__olua_move() end + +---@param len integer +---@return olua.ushort +---@overload fun(): olua.ushort +function ushort.new(len) end + +---@param from integer +---@param to integer +---@return olua.ushort +---@overload fun(self: olua.ushort, from: integer): olua.ushort +function ushort:slice(from, to) end + +---@param from integer +---@param to integer +---@return olua.ushort +---@overload fun(self: olua.ushort, from: integer): olua.ushort +function ushort:sub(from, to) end + +---@return olua.ushort +function ushort:take() end + +---@param len integer +---@return any +function ushort:tostring(len) end + +return ushort \ No newline at end of file diff --git a/addons/cclua/plugin/alipay/config.json b/addons/cclua/plugin/alipay/config.json new file mode 100644 index 00000000..72ce5df2 --- /dev/null +++ b/addons/cclua/plugin/alipay/config.json @@ -0,0 +1,6 @@ +{ + "$schema": "https://raw.githubusercontent.com/LuaLS/LLS-Addons/main/schemas/addon_config.schema.json", + "words": ["%s+-alipay"], + "files": ["alipay"], + "settings": {} +} \ No newline at end of file diff --git a/addons/cclua/plugin/alipay/library/cclua/plugin/alipay.lua b/addons/cclua/plugin/alipay/library/cclua/plugin/alipay.lua new file mode 100644 index 00000000..395fbb8f --- /dev/null +++ b/addons/cclua/plugin/alipay/library/cclua/plugin/alipay.lua @@ -0,0 +1,24 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cclua.plugin.alipay + +--- +---@class cclua.plugin.alipay +local alipay = {} + +---@return any +function alipay:__gc() end + +---@return any +function alipay:__olua_move() end + +---@param event string +---@param data any +function alipay.dispatch(event, data) end + +---@param order string +function alipay.pay(order) end + +---@param dispatcher cclua.Callback +function alipay.setDispatcher(dispatcher) end + +return alipay \ No newline at end of file diff --git a/addons/cclua/plugin/apple/config.json b/addons/cclua/plugin/apple/config.json new file mode 100644 index 00000000..21425d0f --- /dev/null +++ b/addons/cclua/plugin/apple/config.json @@ -0,0 +1,6 @@ +{ + "$schema": "https://raw.githubusercontent.com/LuaLS/LLS-Addons/main/schemas/addon_config.schema.json", + "words": ["%s+-apple"], + "files": ["apple"], + "settings": {} +} \ No newline at end of file diff --git a/addons/cclua/plugin/apple/library/cclua/plugin/apple.lua b/addons/cclua/plugin/apple/library/cclua/plugin/apple.lua new file mode 100644 index 00000000..eef156c4 --- /dev/null +++ b/addons/cclua/plugin/apple/library/cclua/plugin/apple.lua @@ -0,0 +1,48 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cclua.plugin.apple + +--- +---@class cclua.plugin.apple +---@field pendingTransactions any +local apple = {} + +---@return any +function apple:__gc() end + +---@return any +function apple:__olua_move() end + +function apple.auth() end + +---@return boolean +function apple.canMakeAuth() end + +---@return boolean +function apple.canMakePayments() end + +---@param event string +---@param data any +function apple.dispatch(event, data) end + +---@param tid string +function apple.finishTransaction(tid) end + +---@return any +function apple.getPendingTransactions() end + +---@param product string +---@param quantify integer +---@overload fun(product: string) +function apple.purchase(product, quantify) end + +---@param products string[] +function apple.requestProducts(products) end + +---@param appUsername string +---@overload fun() +function apple.restoreTransactions(appUsername) end + +---@param dispatcher cclua.Callback +function apple.setDispatcher(dispatcher) end + +return apple \ No newline at end of file diff --git a/addons/cclua/plugin/bugly/config.json b/addons/cclua/plugin/bugly/config.json new file mode 100644 index 00000000..7324fc5f --- /dev/null +++ b/addons/cclua/plugin/bugly/config.json @@ -0,0 +1,6 @@ +{ + "$schema": "https://raw.githubusercontent.com/LuaLS/LLS-Addons/main/schemas/addon_config.schema.json", + "words": ["%s+-bugly"], + "files": ["bugly"], + "settings": {} +} \ No newline at end of file diff --git a/addons/cclua/plugin/bugly/library/cclua/bugly.lua b/addons/cclua/plugin/bugly/library/cclua/bugly.lua new file mode 100644 index 00000000..7e8a49d8 --- /dev/null +++ b/addons/cclua/plugin/bugly/library/cclua/bugly.lua @@ -0,0 +1,41 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cclua.bugly + +--- +---@class cclua.bugly +local bugly = {} + +---@return any +function bugly:__gc() end + +---@return any +function bugly:__olua_move() end + +---@param appid string +function bugly.init(appid) end + +---@param level cclua.bugly.LogLevel +---@param message string +function bugly.log(level, message) end + +---@param msg string +---@param traceback string +function bugly.reportException(msg, traceback) end + +---@param channel string +function bugly.setChannel(channel) end + +---@param tag integer +function bugly.setTag(tag) end + +---@param uid string +function bugly.setUid(uid) end + +---@param key string +---@param value string +function bugly.setUserValue(key, value) end + +---@param version string +function bugly.setVersion(version) end + +return bugly \ No newline at end of file diff --git a/addons/cclua/plugin/bugly/library/cclua/bugly/LogLevel.lua b/addons/cclua/plugin/bugly/library/cclua/bugly/LogLevel.lua new file mode 100644 index 00000000..fcaf2626 --- /dev/null +++ b/addons/cclua/plugin/bugly/library/cclua/bugly/LogLevel.lua @@ -0,0 +1,18 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cclua.bugly.LogLevel + +---@type cclua.bugly.LogLevel +local VALUE + +--- +---@enum cclua.bugly.LogLevel +local LogLevel = { + Debug = 4, + Error = 1, + Info = 3, + Off = 0, + Verbose = 5, + Warning = 2, +} + +return LogLevel \ No newline at end of file diff --git a/addons/cclua/plugin/huawei/config.json b/addons/cclua/plugin/huawei/config.json new file mode 100644 index 00000000..7eaea1dc --- /dev/null +++ b/addons/cclua/plugin/huawei/config.json @@ -0,0 +1,6 @@ +{ + "$schema": "https://raw.githubusercontent.com/LuaLS/LLS-Addons/main/schemas/addon_config.schema.json", + "words": ["%s+-huawei"], + "files": ["huawei"], + "settings": {} +} \ No newline at end of file diff --git a/addons/cclua/plugin/huawei/library/cclua/plugin/huawei.lua b/addons/cclua/plugin/huawei/library/cclua/plugin/huawei.lua new file mode 100644 index 00000000..71fa42bb --- /dev/null +++ b/addons/cclua/plugin/huawei/library/cclua/plugin/huawei.lua @@ -0,0 +1,40 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cclua.plugin.huawei + +--- +---@class cclua.plugin.huawei +local huawei = {} + +---@return any +function huawei:__gc() end + +---@return any +function huawei:__olua_move() end + +---@param event string +---@param data any +function huawei.dispatch(event, data) end + +function huawei.init() end + +function huawei.login() end + +function huawei.logout() end + +---@param appid string +---@param cpid string +---@param cp string +---@param orderNo string +---@param pid string +---@param url string +---@param serviceCatalog string +---@param extReserved string +---@param sign string +function huawei.pay(appid, cpid, cp, orderNo, pid, url, serviceCatalog, extReserved, sign) end + +function huawei.revokeAccess() end + +---@param dispatcher cclua.Callback +function huawei.setDispatcher(dispatcher) end + +return huawei \ No newline at end of file diff --git a/addons/cclua/plugin/janalytics/config.json b/addons/cclua/plugin/janalytics/config.json new file mode 100644 index 00000000..49e4822a --- /dev/null +++ b/addons/cclua/plugin/janalytics/config.json @@ -0,0 +1,6 @@ +{ + "$schema": "https://raw.githubusercontent.com/LuaLS/LLS-Addons/main/schemas/addon_config.schema.json", + "words": ["%s+-janalytics"], + "files": ["janalytics"], + "settings": {} +} \ No newline at end of file diff --git a/addons/cclua/plugin/janalytics/library/cclua/plugin/janalytics.lua b/addons/cclua/plugin/janalytics/library/cclua/plugin/janalytics.lua new file mode 100644 index 00000000..dfe6177a --- /dev/null +++ b/addons/cclua/plugin/janalytics/library/cclua/plugin/janalytics.lua @@ -0,0 +1,39 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cclua.plugin.janalytics + +--- +---@class cclua.plugin.janalytics +local janalytics = {} + +---@return any +function janalytics:__gc() end + +---@return any +function janalytics:__olua_move() end + +function janalytics.detachAccount() end + +---@param value any +function janalytics.identifyAccount(value) end + +---@param appKey string +---@param channel string +function janalytics.init(appKey, channel) end + +---@param enable boolean +function janalytics.setDebug(enable) end + +---@param frequency integer +function janalytics.setFrequency(frequency) end + +---@param pageName string +function janalytics.startTrackPage(pageName) end + +---@param pageName string +function janalytics.stopTrackPage(pageName) end + +---@param type cclua.plugin.janalytics.EventType +---@param value any +function janalytics.trackEvent(type, value) end + +return janalytics \ No newline at end of file diff --git a/addons/cclua/plugin/janalytics/library/cclua/plugin/janalytics/EventType.lua b/addons/cclua/plugin/janalytics/library/cclua/plugin/janalytics/EventType.lua new file mode 100644 index 00000000..c50615e2 --- /dev/null +++ b/addons/cclua/plugin/janalytics/library/cclua/plugin/janalytics/EventType.lua @@ -0,0 +1,18 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cclua.plugin.janalytics.EventType + +---@type cclua.plugin.janalytics.EventType +local VALUE + +--- +---@enum cclua.plugin.janalytics.EventType +local EventType = { + BROWSE = 3, + CALCULATE = 5, + COUNT = 4, + LOGIN = 0, + PURCHASE = 2, + REGISTER = 1, +} + +return EventType \ No newline at end of file diff --git a/addons/cclua/plugin/jauth/config.json b/addons/cclua/plugin/jauth/config.json new file mode 100644 index 00000000..1de088b2 --- /dev/null +++ b/addons/cclua/plugin/jauth/config.json @@ -0,0 +1,6 @@ +{ + "$schema": "https://raw.githubusercontent.com/LuaLS/LLS-Addons/main/schemas/addon_config.schema.json", + "words": ["%s+-jauth"], + "files": ["jauth"], + "settings": {} +} \ No newline at end of file diff --git a/addons/cclua/plugin/jauth/library/cclua/plugin/jauth.lua b/addons/cclua/plugin/jauth/library/cclua/plugin/jauth.lua new file mode 100644 index 00000000..eb5df78d --- /dev/null +++ b/addons/cclua/plugin/jauth/library/cclua/plugin/jauth.lua @@ -0,0 +1,63 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cclua.plugin.jauth + +--- +---@class cclua.plugin.jauth +---@field initSuccess boolean +local jauth = {} + +---@return any +function jauth:__gc() end + +---@return any +function jauth:__olua_move() end + +---@return boolean +function jauth.checkVerifyEnable() end + +function jauth.clearPreLoginCache() end + +---@param value any +---@param landscape boolean +---@overload fun(value: any) +function jauth.configUI(value, landscape) end + +---@param needCloseAnim boolean +---@overload fun() +function jauth.dismissLoginAuth(needCloseAnim) end + +---@param event string +---@param data any +function jauth.dispatch(event, data) end + +---@param phonenum string +---@param signid string +---@param tempid string +function jauth.getSmsCode(phonenum, signid, tempid) end + +---@param timeout integer +function jauth.getToken(timeout) end + +---@param appKey string +---@param channel string +function jauth.init(appKey, channel) end + +---@return boolean +function jauth.isInitSuccess() end + +---@param timeout integer +function jauth.loginAuth(timeout) end + +---@param timeout integer +function jauth.preLogin(timeout) end + +---@param enabled boolean +function jauth.setDebug(enabled) end + +---@param dispatcher cclua.Callback +function jauth.setDispatcher(dispatcher) end + +---@param intervalTime integer +function jauth.setSmsIntervalTime(intervalTime) end + +return jauth \ No newline at end of file diff --git a/addons/cclua/plugin/jpush/config.json b/addons/cclua/plugin/jpush/config.json new file mode 100644 index 00000000..24fa0e59 --- /dev/null +++ b/addons/cclua/plugin/jpush/config.json @@ -0,0 +1,6 @@ +{ + "$schema": "https://raw.githubusercontent.com/LuaLS/LLS-Addons/main/schemas/addon_config.schema.json", + "words": ["%s+-jpush"], + "files": ["jpush"], + "settings": {} +} \ No newline at end of file diff --git a/addons/cclua/plugin/jpush/library/cclua/plugin/jpush.lua b/addons/cclua/plugin/jpush/library/cclua/plugin/jpush.lua new file mode 100644 index 00000000..ff1840a2 --- /dev/null +++ b/addons/cclua/plugin/jpush/library/cclua/plugin/jpush.lua @@ -0,0 +1,52 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cclua.plugin.jpush + +--- +---@class cclua.plugin.jpush +---@field enabled boolean +---@field registrationID string +local jpush = {} + +---@return any +function jpush:__gc() end + +---@return any +function jpush:__olua_move() end + +---@param tags string[] +function jpush.addTags(tags) end + +function jpush.cleanTags() end + +function jpush.deleteAlias() end + +---@param tags string[] +function jpush.deleteTags(tags) end + +---@return string +function jpush.getRegistrationID() end + +---@param appKey string +---@param channel string +function jpush.init(appKey, channel) end + +---@return boolean +function jpush.isEnabled() end + +function jpush.requestPermission() end + +---@param alias string +function jpush.setAlias(alias) end + +---@param value integer +function jpush.setBadge(value) end + +---@param enabled boolean +function jpush.setDebug(enabled) end + +function jpush.setLogOFF() end + +---@param tags string[] +function jpush.setTags(tags) end + +return jpush \ No newline at end of file diff --git a/addons/cclua/plugin/oppo/config.json b/addons/cclua/plugin/oppo/config.json new file mode 100644 index 00000000..17a03dd4 --- /dev/null +++ b/addons/cclua/plugin/oppo/config.json @@ -0,0 +1,6 @@ +{ + "$schema": "https://raw.githubusercontent.com/LuaLS/LLS-Addons/main/schemas/addon_config.schema.json", + "words": ["%s+-oppo"], + "files": ["oppo"], + "settings": {} +} \ No newline at end of file diff --git a/addons/cclua/plugin/oppo/library/cclua/plugin/oppo.lua b/addons/cclua/plugin/oppo/library/cclua/plugin/oppo.lua new file mode 100644 index 00000000..c69c484c --- /dev/null +++ b/addons/cclua/plugin/oppo/library/cclua/plugin/oppo.lua @@ -0,0 +1,31 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cclua.plugin.oppo + +--- +---@class cclua.plugin.oppo +local oppo = {} + +---@return any +function oppo:__gc() end + +---@return any +function oppo:__olua_move() end + +---@param event string +---@param data any +function oppo.dispatch(event, data) end + +function oppo.init() end + +---@param orderNo string +---@param attach string +---@param price integer +---@param name string +---@param desc string +---@param url string +function oppo.pay(orderNo, attach, price, name, desc, url) end + +---@param dispatcher cclua.Callback +function oppo.setDispatcher(dispatcher) end + +return oppo \ No newline at end of file diff --git a/addons/cclua/plugin/talkingdata/config.json b/addons/cclua/plugin/talkingdata/config.json new file mode 100644 index 00000000..235c5b08 --- /dev/null +++ b/addons/cclua/plugin/talkingdata/config.json @@ -0,0 +1,6 @@ +{ + "$schema": "https://raw.githubusercontent.com/LuaLS/LLS-Addons/main/schemas/addon_config.schema.json", + "words": ["%s+-talkingdata"], + "files": ["talkingdata"], + "settings": {} +} \ No newline at end of file diff --git a/addons/cclua/plugin/talkingdata/library/cclua/plugin/talkingdata.lua b/addons/cclua/plugin/talkingdata/library/cclua/plugin/talkingdata.lua new file mode 100644 index 00000000..52525d50 --- /dev/null +++ b/addons/cclua/plugin/talkingdata/library/cclua/plugin/talkingdata.lua @@ -0,0 +1,98 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cclua.plugin.talkingdata + +--- +---@class cclua.plugin.talkingdata +---@field deviceId string +local talkingdata = {} + +---@return any +function talkingdata:__gc() end + +---@return any +function talkingdata:__olua_move() end + +function talkingdata.backgroundSessionEnabled() end + +---@return string +function talkingdata.getDeviceId() end + +---@param appkey string +---@param channel string +---@param custom string +---@overload fun(appkey: string, channel: string) +function talkingdata.init(appkey, channel, custom) end + +---@param uid string +---@param method string +---@param content string +function talkingdata.onCreateCard(uid, method, content) end + +---@param event string +---@param value number +---@param data any +function talkingdata.onEvent(event, value, data) end + +---@param category string +---@param content string +function talkingdata.onFavorite(category, content) end + +---@param uid string +---@param data any +function talkingdata.onLogin(uid, data) end + +---@param name string +function talkingdata.onPageBegin(name) end + +---@param name string +function talkingdata.onPageEnd(name) end + +---@param data any +function talkingdata.onProfileUpdate(data) end + +---@param uid string +---@param punchid string +function talkingdata.onPunch(uid, punchid) end + +---@param link string +function talkingdata.onReceiveDeepLink(link) end + +---@param uid string +---@param data any +---@param invitationCode string +function talkingdata.onRegister(uid, data, invitationCode) end + +---@param data any +function talkingdata.onSearch(data) end + +---@param uid string +---@param content string +function talkingdata.onShare(uid, content) end + +---@param key string +function talkingdata.removeGlobalKV(key) end + +---@param options integer +function talkingdata.setConfigurationDisable(options) end + +---@param value boolean +function talkingdata.setExceptionReportEnabled(value) end + +---@param key string +---@param value any +function talkingdata.setGlobalKV(key, value) end + +---@param latitude number +---@param longitude number +function talkingdata.setLocation(latitude, longitude) end + +---@param value boolean +function talkingdata.setSignalReportEnabled(value) end + +---@param vendorId string +---@param type integer +function talkingdata.setVendorId(vendorId, type) end + +function talkingdata.setVerboseLogDisable() end + +return talkingdata \ No newline at end of file diff --git a/addons/cclua/plugin/vivo/config.json b/addons/cclua/plugin/vivo/config.json new file mode 100644 index 00000000..af21f813 --- /dev/null +++ b/addons/cclua/plugin/vivo/config.json @@ -0,0 +1,6 @@ +{ + "$schema": "https://raw.githubusercontent.com/LuaLS/LLS-Addons/main/schemas/addon_config.schema.json", + "words": ["%s+-vivo"], + "files": ["vivo"], + "settings": {} +} \ No newline at end of file diff --git a/addons/cclua/plugin/vivo/library/cclua/plugin/vivo.lua b/addons/cclua/plugin/vivo/library/cclua/plugin/vivo.lua new file mode 100644 index 00000000..852aec9b --- /dev/null +++ b/addons/cclua/plugin/vivo/library/cclua/plugin/vivo.lua @@ -0,0 +1,32 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cclua.plugin.vivo + +--- +---@class cclua.plugin.vivo +local vivo = {} + +---@return any +function vivo:__gc() end + +---@return any +function vivo:__olua_move() end + +---@param event string +---@param data any +function vivo.dispatch(event, data) end + +function vivo.init() end + +---@param appid string +---@param orderNo string +---@param url string +---@param price string +---@param name string +---@param desc string +---@param sign string +function vivo.pay(appid, orderNo, url, price, name, desc, sign) end + +---@param dispatcher cclua.Callback +function vivo.setDispatcher(dispatcher) end + +return vivo \ No newline at end of file diff --git a/addons/cclua/plugin/wechat/config.json b/addons/cclua/plugin/wechat/config.json new file mode 100644 index 00000000..e611b3fb --- /dev/null +++ b/addons/cclua/plugin/wechat/config.json @@ -0,0 +1,6 @@ +{ + "$schema": "https://raw.githubusercontent.com/LuaLS/LLS-Addons/main/schemas/addon_config.schema.json", + "words": ["%s+-wechat"], + "files": ["wechat"], + "settings": {} +} \ No newline at end of file diff --git a/addons/cclua/plugin/wechat/library/cclua/plugin/wechat.lua b/addons/cclua/plugin/wechat/library/cclua/plugin/wechat.lua new file mode 100644 index 00000000..3751133f --- /dev/null +++ b/addons/cclua/plugin/wechat/library/cclua/plugin/wechat.lua @@ -0,0 +1,65 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cclua.plugin.wechat + +--- +---@class cclua.plugin.wechat +---@field installed boolean +local wechat = {} + +---@return any +function wechat:__gc() end + +---@return any +function wechat:__olua_move() end + +---@param scope string +---@param state string +function wechat.auth(scope, state) end + +---@param appid string +---@param nonceStr string +---@param timestamp string +---@param scope string +---@param signature string +function wechat.authQRCode(appid, nonceStr, timestamp, scope, signature) end + +---@param event string +---@param data any +function wechat.dispatch(event, data) end + +---@param appid string +---@param universalLink string +function wechat.init(appid, universalLink) end + +---@return boolean +function wechat.isInstalled() end + +---@param username string +---@param path string +---@param type cclua.plugin.wechat.ProgramType +---@overload fun(username: string) +---@overload fun(username: string, path: string) +function wechat.open(username, path, type) end + +---@param corpid string +---@param url string +function wechat.openCustomerService(corpid, url) end + +---@param partnerId string +---@param prepayId string +---@param noncestr string +---@param timestamp string +---@param packageValue string +---@param sign string +function wechat.pay(partnerId, prepayId, noncestr, timestamp, packageValue, sign) end + +---@param dispatcher cclua.Callback +function wechat.setDispatcher(dispatcher) end + +---@param type cclua.plugin.wechat.ShareType +---@param value cc.types.ValueMap +function wechat.share(type, value) end + +function wechat.stopAuth() end + +return wechat \ No newline at end of file diff --git a/addons/cclua/plugin/wechat/library/cclua/plugin/wechat/ProgramType.lua b/addons/cclua/plugin/wechat/library/cclua/plugin/wechat/ProgramType.lua new file mode 100644 index 00000000..c69698fe --- /dev/null +++ b/addons/cclua/plugin/wechat/library/cclua/plugin/wechat/ProgramType.lua @@ -0,0 +1,15 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cclua.plugin.wechat.ProgramType + +---@type cclua.plugin.wechat.ProgramType +local VALUE + +--- +---@enum cclua.plugin.wechat.ProgramType +local ProgramType = { + PREVIEW = 2, + RELEASE = 0, + TEST = 1, +} + +return ProgramType \ No newline at end of file diff --git a/addons/cclua/plugin/wechat/library/cclua/plugin/wechat/ShareType.lua b/addons/cclua/plugin/wechat/library/cclua/plugin/wechat/ShareType.lua new file mode 100644 index 00000000..b227d871 --- /dev/null +++ b/addons/cclua/plugin/wechat/library/cclua/plugin/wechat/ShareType.lua @@ -0,0 +1,18 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta cclua.plugin.wechat.ShareType + +---@type cclua.plugin.wechat.ShareType +local VALUE + +--- +---@enum cclua.plugin.wechat.ShareType +local ShareType = { + IMAGE = 2, + MUSIC = 3, + NONE = 0, + TEXT = 1, + VIDEO = 4, + WEB = 5, +} + +return ShareType \ No newline at end of file diff --git a/addons/cclua/spine/config.json b/addons/cclua/spine/config.json new file mode 100644 index 00000000..b2be3304 --- /dev/null +++ b/addons/cclua/spine/config.json @@ -0,0 +1,6 @@ +{ + "$schema": "https://raw.githubusercontent.com/LuaLS/LLS-Addons/main/schemas/addon_config.schema.json", + "words": ["%s+-spine"], + "files": ["spine"], + "settings": {} +} \ No newline at end of file diff --git a/addons/cclua/spine/library/spine/AlphaTimeline.lua b/addons/cclua/spine/library/spine/AlphaTimeline.lua new file mode 100644 index 00000000..064ad561 --- /dev/null +++ b/addons/cclua/spine/library/spine/AlphaTimeline.lua @@ -0,0 +1,21 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta spine.AlphaTimeline + +--- +---@class spine.AlphaTimeline : spine.CurveTimeline1 +---@field slotIndex integer +local AlphaTimeline = {} + +---@return integer +function AlphaTimeline:getSlotIndex() end + +---@param frameCount integer +---@param bezierCount integer +---@param slotIndex integer +---@return spine.AlphaTimeline +function AlphaTimeline.new(frameCount, bezierCount, slotIndex) end + +---@param inValue integer +function AlphaTimeline:setSlotIndex(inValue) end + +return AlphaTimeline \ No newline at end of file diff --git a/addons/cclua/spine/library/spine/Animation.lua b/addons/cclua/spine/library/spine/Animation.lua new file mode 100644 index 00000000..4aa69501 --- /dev/null +++ b/addons/cclua/spine/library/spine/Animation.lua @@ -0,0 +1,39 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta spine.Animation + +--- +---@class spine.Animation : spine.SpineObject +---@field duration number +---@field name any +---@field timelines any +local Animation = {} + +---@return number +function Animation:getDuration() end + +---@return any +function Animation:getName() end + +---@return any +function Animation:getTimelines() end + +---@param ids any +---@return boolean +function Animation:hasTimeline(ids) end + +---@param name any +---@param timelines any +---@param duration number +---@return spine.Animation +function Animation.new(name, timelines, duration) end + +---@param target number # After the first and before the last entry. +---@param values any +---@return integer +---@overload fun(values: any, target: number, step: integer): integer +function Animation.search(values, target) end + +---@param inValue number +function Animation:setDuration(inValue) end + +return Animation \ No newline at end of file diff --git a/addons/cclua/spine/library/spine/AnimationState.lua b/addons/cclua/spine/library/spine/AnimationState.lua new file mode 100644 index 00000000..bd19ed56 --- /dev/null +++ b/addons/cclua/spine/library/spine/AnimationState.lua @@ -0,0 +1,126 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta spine.AnimationState + +--- +---@class spine.AnimationState : spine.SpineObject +---@field data spine.AnimationStateData +---@field manualTrackEntryDisposal boolean +---@field timeScale number +---@field tracks any A list of tracks that have animations, which may contain NULLs. +local AnimationState = {} + +---Queues an animation by name. +---addAnimation(int, Animation, bool, float) +---@param trackIndex integer +---@param animationName any +---@param loop boolean +---@param delay number +---@return spine.TrackEntry +--- +---Adds an animation to be played delay seconds after the current or last queued animation +---for a track. If the track is empty, it is equivalent to calling setAnimation. +---\param delay +---Seconds to begin this animation after the start of the previous animation. May be <= 0 to use the animation +---duration of the previous track minus any mix duration plus the negative delay. +--- +---\return A track entry to allow further customization of animation playback. References to the track entry must not be kept +---after AnimationState.Dispose +---@overload fun(self: spine.AnimationState, trackIndex: integer, animation: spine.Animation, loop: boolean, delay: number): spine.TrackEntry +function AnimationState:addAnimation(trackIndex, animationName, loop, delay) end + +---Adds an empty animation to be played after the current or last queued animation for a track, and mixes to it over the +---specified mix duration. +---@return spine.TrackEntry # +---A track entry to allow further customization of animation playback. References to the track entry must not be kept after AnimationState.Dispose. +--- +---@param trackIndex integer # Track number. +---@param mixDuration number # Mix duration. +---@param delay number # Seconds to begin this animation after the start of the previous animation. May be <= 0 to use the animation +---duration of the previous track minus any mix duration plus the negative delay. +function AnimationState:addEmptyAnimation(trackIndex, mixDuration, delay) end + +---Poses the skeleton using the track entry animations. There are no side effects other than invoking listeners, so the +---animation state can be applied to multiple skeletons to pose them identically. +---@param skeleton spine.Skeleton +---@return boolean +function AnimationState:apply(skeleton) end + +---Removes all animations from the tracks, leaving skeletons in their previous pose. +---It may be desired to use AnimationState.setEmptyAnimations(float) to mix the skeletons back to the setup pose, +---rather than leaving them in their previous pose. +---@param trackIndex integer +function AnimationState:clearTrack(trackIndex) end + +---Removes all animations from all tracks, leaving skeletons in their previous pose. +---It may be desired to use AnimationState.setEmptyAnimations(float) to mix the skeletons back to the setup pose, +---rather than leaving them in their previous pose. +function AnimationState:clearTracks() end + +function AnimationState:disableQueue() end + +---@param entry spine.TrackEntry +function AnimationState:disposeTrackEntry(entry) end + +function AnimationState:enableQueue() end + +---@return spine.TrackEntry # The track entry for the animation currently playing on the track, or NULL if no animation is currently playing. +---@param trackIndex integer +function AnimationState:getCurrent(trackIndex) end + +---@return spine.AnimationStateData +function AnimationState:getData() end + +---@return boolean +function AnimationState:getManualTrackEntryDisposal() end + +---@return number +function AnimationState:getTimeScale() end + +---A list of tracks that have animations, which may contain NULLs. +---@return any +function AnimationState:getTracks() end + +---@param data spine.AnimationStateData +---@return spine.AnimationState +function AnimationState.new(data) end + +---Sets an animation by name. setAnimation(int, Animation, bool) +---@param trackIndex integer +---@param animationName any +---@param loop boolean +---@return spine.TrackEntry +--- +---Sets the current animation for a track, discarding any queued animations. +---\param loop If true, the animation will repeat. +---If false, it will not, instead its last frame is applied if played beyond its duration. +---In either case TrackEntry.TrackEnd determines when the track is cleared. +---\return +---A track entry to allow further customization of animation playback. References to the track entry must not be kept +---after AnimationState.Dispose. +---@overload fun(self: spine.AnimationState, trackIndex: integer, animation: spine.Animation, loop: boolean): spine.TrackEntry +function AnimationState:setAnimation(trackIndex, animationName, loop) end + +---Sets an empty animation for a track, discarding any queued animations, and mixes to it over the specified mix duration. +---@param trackIndex integer +---@param mixDuration number +---@return spine.TrackEntry +function AnimationState:setEmptyAnimation(trackIndex, mixDuration) end + +---Sets an empty animation for every track, discarding any queued animations, and mixes to it over the specified mix duration. +---@param mixDuration number +function AnimationState:setEmptyAnimations(mixDuration) end + +---@param listener spine.AnimationStateListener +function AnimationState:setListener(listener) end + +---@param inValue boolean +function AnimationState:setManualTrackEntryDisposal(inValue) end + +---@param inValue number +function AnimationState:setTimeScale(inValue) end + +---Increments the track entry times, setting queued animations as current if needed +---@param delta number # delta time +function AnimationState:update(delta) end + +return AnimationState \ No newline at end of file diff --git a/addons/cclua/spine/library/spine/AnimationStateData.lua b/addons/cclua/spine/library/spine/AnimationStateData.lua new file mode 100644 index 00000000..3b21e3fc --- /dev/null +++ b/addons/cclua/spine/library/spine/AnimationStateData.lua @@ -0,0 +1,45 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta spine.AnimationStateData + +---Stores mix (crossfade) durations to be applied when AnimationState animations are changed. +---@class spine.AnimationStateData : spine.SpineObject +---@field defaultMix number The mix duration to use when no mix duration has been specifically defined between two animations. +---@field skeletonData spine.SkeletonData The SkeletonData to look up animations when they are specified by name. +local AnimationStateData = {} + +---Removes all mixes and sets the default mix to 0. +function AnimationStateData:clear() end + +---The mix duration to use when no mix duration has been specifically defined between two animations. +---@return number +function AnimationStateData:getDefaultMix() end + +---The mix duration to use when changing from the specified animation to the other, +---or the DefaultMix if no mix duration has been set. +---@param from spine.Animation +---@param to spine.Animation +---@return number +function AnimationStateData:getMix(from, to) end + +---The SkeletonData to look up animations when they are specified by name. +---@return spine.SkeletonData +function AnimationStateData:getSkeletonData() end + +---@param skeletonData spine.SkeletonData +---@return spine.AnimationStateData +function AnimationStateData.new(skeletonData) end + +---@param inValue number +function AnimationStateData:setDefaultMix(inValue) end + +---Sets a mix duration by animation names. +---@param fromName any +---@param toName any +---@param duration number +--- +---Sets a mix duration when changing from the specified animation to the other. +---See TrackEntry.MixDuration. +---@overload fun(self: spine.AnimationStateData, from: spine.Animation, to: spine.Animation, duration: number) +function AnimationStateData:setMix(fromName, toName, duration) end + +return AnimationStateData \ No newline at end of file diff --git a/addons/cclua/spine/library/spine/AnimationStateListener.lua b/addons/cclua/spine/library/spine/AnimationStateListener.lua new file mode 100644 index 00000000..a9decfe4 --- /dev/null +++ b/addons/cclua/spine/library/spine/AnimationStateListener.lua @@ -0,0 +1,14 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta spine.AnimationStateListener + +--- +--- +---std::function +---@class spine.AnimationStateListener +local AnimationStateListener = {} + +---@return spine.AnimationStateListener + +function AnimationStateListener:__call() end + +return AnimationStateListener \ No newline at end of file diff --git a/addons/cclua/spine/library/spine/Atlas.lua b/addons/cclua/spine/library/spine/Atlas.lua new file mode 100644 index 00000000..1debda75 --- /dev/null +++ b/addons/cclua/spine/library/spine/Atlas.lua @@ -0,0 +1,8 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta spine.Atlas + +--- +---@class spine.Atlas : spine.SpineObject +local Atlas = {} + +return Atlas \ No newline at end of file diff --git a/addons/cclua/spine/library/spine/Attachment.lua b/addons/cclua/spine/library/spine/Attachment.lua new file mode 100644 index 00000000..2d502de8 --- /dev/null +++ b/addons/cclua/spine/library/spine/Attachment.lua @@ -0,0 +1,23 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta spine.Attachment + +--- +---@class spine.Attachment : spine.SpineObject +---@field name any +---@field refCount integer +local Attachment = {} + +---@return spine.Attachment +function Attachment:copy() end + +function Attachment:dereference() end + +---@return any +function Attachment:getName() end + +---@return integer +function Attachment:getRefCount() end + +function Attachment:reference() end + +return Attachment \ No newline at end of file diff --git a/addons/cclua/spine/library/spine/AttachmentTimeline.lua b/addons/cclua/spine/library/spine/AttachmentTimeline.lua new file mode 100644 index 00000000..ff852142 --- /dev/null +++ b/addons/cclua/spine/library/spine/AttachmentTimeline.lua @@ -0,0 +1,24 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta spine.AttachmentTimeline + +--- +---@class spine.AttachmentTimeline : spine.Timeline +---@field attachmentNames any +---@field slotIndex integer +local AttachmentTimeline = {} + +---@return any +function AttachmentTimeline:getAttachmentNames() end + +---@return integer +function AttachmentTimeline:getSlotIndex() end + +---@param frameCount integer +---@param slotIndex integer +---@return spine.AttachmentTimeline +function AttachmentTimeline.new(frameCount, slotIndex) end + +---@param inValue integer +function AttachmentTimeline:setSlotIndex(inValue) end + +return AttachmentTimeline \ No newline at end of file diff --git a/addons/cclua/spine/library/spine/AttachmentType.lua b/addons/cclua/spine/library/spine/AttachmentType.lua new file mode 100644 index 00000000..e96f8de4 --- /dev/null +++ b/addons/cclua/spine/library/spine/AttachmentType.lua @@ -0,0 +1,19 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta spine.AttachmentType + +---@type spine.AttachmentType +local VALUE + +--- +---@enum spine.AttachmentType +local AttachmentType = { + Boundingbox = 1, + Clipping = 6, + Linkedmesh = 3, + Mesh = 2, + Path = 4, + Point = 5, + Region = 0, +} + +return AttachmentType \ No newline at end of file diff --git a/addons/cclua/spine/library/spine/BlendMode.lua b/addons/cclua/spine/library/spine/BlendMode.lua new file mode 100644 index 00000000..7d16825f --- /dev/null +++ b/addons/cclua/spine/library/spine/BlendMode.lua @@ -0,0 +1,16 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta spine.BlendMode + +---@type spine.BlendMode +local VALUE + +--- +---@enum spine.BlendMode +local BlendMode = { + Additive = 1, + Multiply = 2, + Normal = 0, + Screen = 3, +} + +return BlendMode \ No newline at end of file diff --git a/addons/cclua/spine/library/spine/Bone.lua b/addons/cclua/spine/library/spine/Bone.lua new file mode 100644 index 00000000..ba8f2679 --- /dev/null +++ b/addons/cclua/spine/library/spine/Bone.lua @@ -0,0 +1,267 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta spine.Bone + +---Stores a bone's current pose. +--- +---A bone has a local transform which is used to compute its world transform. A bone also has an applied transform, which is a +---local transform that can be applied to compute the world transform. The local transform and applied transform may differ if a +---constraint or application code modifies the world transform after it was computed from the local transform. +---@class spine.Bone : spine.Updatable +---@field a number +---@field aScaleX number The applied local scaleX. +---@field aScaleY number The applied local scaleY. +---@field aShearX number The applied local shearX. +---@field aShearY number The applied local shearY. +---@field appliedRotation number The rotation, as calculated by any constraints. +---@field ax number The applied local x translation. +---@field ay number The applied local y translation. +---@field b number +---@field c number +---@field children any +---@field d number +---@field data spine.BoneData +---@field inherit spine.Inherit +---@field parent spine.Bone +---@field rotation number The local rotation. +---@field scaleX number The local scaleX. +---@field scaleY number The local scaleY. +---@field shearX number The local shearX. +---@field shearY number The local shearY. +---@field skeleton spine.Skeleton +---@field worldRotationX number +---@field worldRotationY number +---@field worldScaleX number Returns the magnitide (always positive) of the world scale X. +---@field worldScaleY number Returns the magnitide (always positive) of the world scale Y. +---@field worldToLocalRotationX number +---@field worldToLocalRotationY number +---@field worldX number +---@field worldY number +---@field x number The local X translation. +---@field y number The local Y translation. +---@field yDown boolean +local Bone = {} + +---@return number +function Bone:getA() end + +---The applied local scaleX. +---@return number +function Bone:getAScaleX() end + +---The applied local scaleY. +---@return number +function Bone:getAScaleY() end + +---The applied local shearX. +---@return number +function Bone:getAShearX() end + +---The applied local shearY. +---@return number +function Bone:getAShearY() end + +---The applied local x translation. +---@return number +function Bone:getAX() end + +---The applied local y translation. +---@return number +function Bone:getAY() end + +---The rotation, as calculated by any constraints. +---@return number +function Bone:getAppliedRotation() end + +---@return number +function Bone:getB() end + +---@return number +function Bone:getC() end + +---@return any +function Bone:getChildren() end + +---@return number +function Bone:getD() end + +---@return spine.BoneData +function Bone:getData() end + +---@return spine.Inherit +function Bone:getInherit() end + +---@return spine.Bone +function Bone:getParent() end + +---The local rotation. +---@return number +function Bone:getRotation() end + +---The local scaleX. +---@return number +function Bone:getScaleX() end + +---The local scaleY. +---@return number +function Bone:getScaleY() end + +---The local shearX. +---@return number +function Bone:getShearX() end + +---The local shearY. +---@return number +function Bone:getShearY() end + +---@return spine.Skeleton +function Bone:getSkeleton() end + +---@return number +function Bone:getWorldRotationX() end + +---@return number +function Bone:getWorldRotationY() end + +---Returns the magnitide (always positive) of the world scale X. +---@return number +function Bone:getWorldScaleX() end + +---Returns the magnitide (always positive) of the world scale Y. +---@return number +function Bone:getWorldScaleY() end + +---@return number +function Bone:getWorldToLocalRotationX() end + +---@return number +function Bone:getWorldToLocalRotationY() end + +---@return number +function Bone:getWorldX() end + +---@return number +function Bone:getWorldY() end + +---The local X translation. +---@return number +function Bone:getX() end + +---The local Y translation. +---@return number +function Bone:getY() end + +---@return boolean +function Bone.isYDown() end + +---@param localRotation number +---@return number +function Bone:localToWorldRotation(localRotation) end + +---@param parent spine.Bone # May be NULL. +---@param data spine.BoneData +---@param skeleton spine.Skeleton +---@return spine.Bone +---@overload fun(data: spine.BoneData, skeleton: spine.Skeleton): spine.Bone +function Bone.new(data, skeleton, parent) end + +---@param worldX number +---@param worldY number +---@param outX olua.float +---@param outY olua.float +function Bone:parentToWorld(worldX, worldY, outX, outY) end + +---Rotates the world transform the specified amount and sets isAppliedValid to false. +---@param degrees number # Degrees. +function Bone:rotateWorld(degrees) end + +---@param inValue number +function Bone:setA(inValue) end + +---@param inValue number +function Bone:setAScaleX(inValue) end + +---@param inValue number +function Bone:setAScaleY(inValue) end + +---@param inValue number +function Bone:setAShearX(inValue) end + +---@param inValue number +function Bone:setAShearY(inValue) end + +---@param inValue number +function Bone:setAX(inValue) end + +---@param inValue number +function Bone:setAY(inValue) end + +---@param inValue number +function Bone:setAppliedRotation(inValue) end + +---@param inValue number +function Bone:setB(inValue) end + +---@param inValue number +function Bone:setC(inValue) end + +---@param inValue number +function Bone:setD(inValue) end + +---@param inValue spine.Inherit +function Bone:setInherit(inValue) end + +---@param inValue number +function Bone:setRotation(inValue) end + +---@param inValue number +function Bone:setScaleX(inValue) end + +---@param inValue number +function Bone:setScaleY(inValue) end + +---@param inValue number +function Bone:setShearX(inValue) end + +---@param inValue number +function Bone:setShearY(inValue) end + +function Bone:setToSetupPose() end + +---@param inValue number +function Bone:setWorldX(inValue) end + +---@param inValue number +function Bone:setWorldY(inValue) end + +---@param inValue number +function Bone:setX(inValue) end + +---@param inValue number +function Bone:setY(inValue) end + +---@param inValue boolean +function Bone.setYDown(inValue) end + +---Computes the individual applied transform values from the world transform. This can be useful to perform processing using +---the applied transform after the world transform has been modified directly (eg, by a constraint).. +--- +---Some information is ambiguous in the world transform, such as -1,-1 scale versus 180 rotation. +function Bone:updateAppliedTransform() end + +---Computes the world transform using the parent bone and this bone's local transform. +--- +---Computes the world transform using the parent bone and the specified local transform. +---@overload fun(self: spine.Bone, x: number, y: number, rotation: number, scaleX: number, scaleY: number, shearX: number, shearY: number) +function Bone:updateWorldTransform() end + +---@param worldRotation number +---@return number +function Bone:worldToLocalRotation(worldRotation) end + +---@param worldX number +---@param worldY number +---@param outParentX olua.float +---@param outParentY olua.float +function Bone:worldToParent(worldX, worldY, outParentX, outParentY) end + +return Bone \ No newline at end of file diff --git a/addons/cclua/spine/library/spine/BoneData.lua b/addons/cclua/spine/library/spine/BoneData.lua new file mode 100644 index 00000000..d038e5ec --- /dev/null +++ b/addons/cclua/spine/library/spine/BoneData.lua @@ -0,0 +1,126 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta spine.BoneData + +--- +---@class spine.BoneData : spine.SpineObject +---@field color any +---@field icon any +---@field index integer The index of the bone in Skeleton.Bones +---@field inherit spine.Inherit The transform mode for how parent world transforms affect this bone. +---@field length number +---@field name any The name of the bone, which is unique within the skeleton. +---@field parent spine.BoneData May be NULL. +---@field rotation number Local rotation. +---@field scaleX number Local scaleX. +---@field scaleY number Local scaleY. +---@field shearX number Local shearX. +---@field shearY number Local shearY. +---@field skinRequired boolean +---@field visible boolean +---@field x number Local X translation. +---@field y number Local Y translation. +local BoneData = {} + +---@return any +function BoneData:getColor() end + +---@return any +function BoneData:getIcon() end + +---The index of the bone in Skeleton.Bones +---@return integer +function BoneData:getIndex() end + +---The transform mode for how parent world transforms affect this bone. +---@return spine.Inherit +function BoneData:getInherit() end + +---@return number +function BoneData:getLength() end + +---The name of the bone, which is unique within the skeleton. +---@return any +function BoneData:getName() end + +---May be NULL. +---@return spine.BoneData +function BoneData:getParent() end + +---Local rotation. +---@return number +function BoneData:getRotation() end + +---Local scaleX. +---@return number +function BoneData:getScaleX() end + +---Local scaleY. +---@return number +function BoneData:getScaleY() end + +---Local shearX. +---@return number +function BoneData:getShearX() end + +---Local shearY. +---@return number +function BoneData:getShearY() end + +---Local X translation. +---@return number +function BoneData:getX() end + +---Local Y translation. +---@return number +function BoneData:getY() end + +---@return boolean +function BoneData:isSkinRequired() end + +---@return boolean +function BoneData:isVisible() end + +---@param index integer +---@param name any +---@param parent spine.BoneData +---@return spine.BoneData +---@overload fun(index: integer, name: any): spine.BoneData +function BoneData.new(index, name, parent) end + +---@param icon any +function BoneData:setIcon(icon) end + +---@param inValue spine.Inherit +function BoneData:setInherit(inValue) end + +---@param inValue number +function BoneData:setLength(inValue) end + +---@param inValue number +function BoneData:setRotation(inValue) end + +---@param inValue number +function BoneData:setScaleX(inValue) end + +---@param inValue number +function BoneData:setScaleY(inValue) end + +---@param inValue number +function BoneData:setShearX(inValue) end + +---@param inValue number +function BoneData:setShearY(inValue) end + +---@param inValue boolean +function BoneData:setSkinRequired(inValue) end + +---@param inValue boolean +function BoneData:setVisible(inValue) end + +---@param inValue number +function BoneData:setX(inValue) end + +---@param inValue number +function BoneData:setY(inValue) end + +return BoneData \ No newline at end of file diff --git a/addons/cclua/spine/library/spine/BoundingBoxAttachment.lua b/addons/cclua/spine/library/spine/BoundingBoxAttachment.lua new file mode 100644 index 00000000..b92f95e2 --- /dev/null +++ b/addons/cclua/spine/library/spine/BoundingBoxAttachment.lua @@ -0,0 +1,16 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta spine.BoundingBoxAttachment + +---Attachment that has a polygon for bounds checking. +---@class spine.BoundingBoxAttachment : spine.VertexAttachment +---@field color any +local BoundingBoxAttachment = {} + +---@return any +function BoundingBoxAttachment:getColor() end + +---@param name any +---@return spine.BoundingBoxAttachment +function BoundingBoxAttachment.new(name) end + +return BoundingBoxAttachment \ No newline at end of file diff --git a/addons/cclua/spine/library/spine/ClippingAttachment.lua b/addons/cclua/spine/library/spine/ClippingAttachment.lua new file mode 100644 index 00000000..fd032b19 --- /dev/null +++ b/addons/cclua/spine/library/spine/ClippingAttachment.lua @@ -0,0 +1,23 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta spine.ClippingAttachment + +--- +---@class spine.ClippingAttachment : spine.VertexAttachment +---@field color any +---@field endSlot spine.SlotData +local ClippingAttachment = {} + +---@return any +function ClippingAttachment:getColor() end + +---@return spine.SlotData +function ClippingAttachment:getEndSlot() end + +---@param name any +---@return spine.ClippingAttachment +function ClippingAttachment.new(name) end + +---@param inValue spine.SlotData +function ClippingAttachment:setEndSlot(inValue) end + +return ClippingAttachment \ No newline at end of file diff --git a/addons/cclua/spine/library/spine/CompleteListener.lua b/addons/cclua/spine/library/spine/CompleteListener.lua new file mode 100644 index 00000000..15f10dc1 --- /dev/null +++ b/addons/cclua/spine/library/spine/CompleteListener.lua @@ -0,0 +1,14 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta spine.CompleteListener + +--- +--- +---std::function +---@class spine.CompleteListener +local CompleteListener = {} + +---@return spine.CompleteListener + +function CompleteListener:__call() end + +return CompleteListener \ No newline at end of file diff --git a/addons/cclua/spine/library/spine/ConstraintData.lua b/addons/cclua/spine/library/spine/ConstraintData.lua new file mode 100644 index 00000000..89a901b7 --- /dev/null +++ b/addons/cclua/spine/library/spine/ConstraintData.lua @@ -0,0 +1,33 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta spine.ConstraintData + +---The interface for all constraints. +---@class spine.ConstraintData : spine.SpineObject +---@field name any The IK constraint's name, which is unique within the skeleton. +---@field order integer The ordinal for the order a skeleton's constraints will be applied. +---@field skinRequired boolean Whether the constraint is only active for a specific skin. +local ConstraintData = {} + +---The IK constraint's name, which is unique within the skeleton. +---@return any +function ConstraintData:getName() end + +---The ordinal for the order a skeleton's constraints will be applied. +---@return integer +function ConstraintData:getOrder() end + +---Whether the constraint is only active for a specific skin. +---@return boolean +function ConstraintData:isSkinRequired() end + +---@param name any +---@return spine.ConstraintData +function ConstraintData.new(name) end + +---@param inValue integer +function ConstraintData:setOrder(inValue) end + +---@param inValue boolean +function ConstraintData:setSkinRequired(inValue) end + +return ConstraintData \ No newline at end of file diff --git a/addons/cclua/spine/library/spine/CurveTimeline.lua b/addons/cclua/spine/library/spine/CurveTimeline.lua new file mode 100644 index 00000000..c2a9794b --- /dev/null +++ b/addons/cclua/spine/library/spine/CurveTimeline.lua @@ -0,0 +1,38 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta spine.CurveTimeline + +---Base class for frames that use an interpolation bezier curve. +---@class spine.CurveTimeline : spine.Timeline +---@field curves any +local CurveTimeline = {} + +---@param time number +---@param frame integer +---@param valueOffset integer +---@param i integer +---@return number +function CurveTimeline:getBezierValue(time, frame, valueOffset, i) end + +---@return any +function CurveTimeline:getCurves() end + +---@param bezier integer +---@param frame integer +---@param value number +---@param time1 number +---@param value1 number +---@param cx1 number +---@param cy1 number +---@param cx2 number +---@param cy2 number +---@param time2 number +---@param value2 number +function CurveTimeline:setBezier(bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2) end + +---@param frame integer +function CurveTimeline:setLinear(frame) end + +---@param frame integer +function CurveTimeline:setStepped(frame) end + +return CurveTimeline \ No newline at end of file diff --git a/addons/cclua/spine/library/spine/CurveTimeline1.lua b/addons/cclua/spine/library/spine/CurveTimeline1.lua new file mode 100644 index 00000000..10053d99 --- /dev/null +++ b/addons/cclua/spine/library/spine/CurveTimeline1.lua @@ -0,0 +1,38 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta spine.CurveTimeline1 + +--- +---@class spine.CurveTimeline1 : spine.CurveTimeline +local CurveTimeline1 = {} + +---@param time number +---@param alpha number +---@param blend spine.MixBlend +---@param current number +---@param setup number +---@return number +---@overload fun(self: spine.CurveTimeline1, time: number, alpha: number, blend: spine.MixBlend, current: number, setup: number, value: number): number +function CurveTimeline1:getAbsoluteValue(time, alpha, blend, current, setup) end + +---@param time number +---@return number +function CurveTimeline1:getCurveValue(time) end + +---@param time number +---@param alpha number +---@param blend spine.MixBlend +---@param current number +---@param setup number +---@return number +function CurveTimeline1:getRelativeValue(time, alpha, blend, current, setup) end + +---@param time number +---@param alpha number +---@param blend spine.MixBlend +---@param direction spine.MixDirection +---@param current number +---@param setup number +---@return number +function CurveTimeline1:getScaleValue(time, alpha, blend, direction, current, setup) end + +return CurveTimeline1 \ No newline at end of file diff --git a/addons/cclua/spine/library/spine/CurveTimeline2.lua b/addons/cclua/spine/library/spine/CurveTimeline2.lua new file mode 100644 index 00000000..aeceab1b --- /dev/null +++ b/addons/cclua/spine/library/spine/CurveTimeline2.lua @@ -0,0 +1,12 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta spine.CurveTimeline2 + +--- +---@class spine.CurveTimeline2 : spine.CurveTimeline +local CurveTimeline2 = {} + +---@param time number +---@return number +function CurveTimeline2:getCurveValue(time) end + +return CurveTimeline2 \ No newline at end of file diff --git a/addons/cclua/spine/library/spine/DeformTimeline.lua b/addons/cclua/spine/library/spine/DeformTimeline.lua new file mode 100644 index 00000000..88ae0899 --- /dev/null +++ b/addons/cclua/spine/library/spine/DeformTimeline.lua @@ -0,0 +1,34 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta spine.DeformTimeline + +--- +---@class spine.DeformTimeline : spine.CurveTimeline +---@field attachment spine.VertexAttachment +---@field slotIndex integer +local DeformTimeline = {} + +---@return spine.VertexAttachment +function DeformTimeline:getAttachment() end + +---@param time number +---@param frame integer +---@return number +function DeformTimeline:getCurvePercent(time, frame) end + +---@return integer +function DeformTimeline:getSlotIndex() end + +---@param frameCount integer +---@param bezierCount integer +---@param slotIndex integer +---@param attachment spine.VertexAttachment +---@return spine.DeformTimeline +function DeformTimeline.new(frameCount, bezierCount, slotIndex, attachment) end + +---@param inValue spine.VertexAttachment +function DeformTimeline:setAttachment(inValue) end + +---@param inValue integer +function DeformTimeline:setSlotIndex(inValue) end + +return DeformTimeline \ No newline at end of file diff --git a/addons/cclua/spine/library/spine/DisposeListener.lua b/addons/cclua/spine/library/spine/DisposeListener.lua new file mode 100644 index 00000000..9c0d186e --- /dev/null +++ b/addons/cclua/spine/library/spine/DisposeListener.lua @@ -0,0 +1,14 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta spine.DisposeListener + +--- +--- +---std::function +---@class spine.DisposeListener +local DisposeListener = {} + +---@return spine.DisposeListener + +function DisposeListener:__call() end + +return DisposeListener \ No newline at end of file diff --git a/addons/cclua/spine/library/spine/DrawOrderTimeline.lua b/addons/cclua/spine/library/spine/DrawOrderTimeline.lua new file mode 100644 index 00000000..6ffbdaf9 --- /dev/null +++ b/addons/cclua/spine/library/spine/DrawOrderTimeline.lua @@ -0,0 +1,12 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta spine.DrawOrderTimeline + +--- +---@class spine.DrawOrderTimeline : spine.Timeline +local DrawOrderTimeline = {} + +---@param frameCount integer +---@return spine.DrawOrderTimeline +function DrawOrderTimeline.new(frameCount) end + +return DrawOrderTimeline \ No newline at end of file diff --git a/addons/cclua/spine/library/spine/EndListener.lua b/addons/cclua/spine/library/spine/EndListener.lua new file mode 100644 index 00000000..f9e00718 --- /dev/null +++ b/addons/cclua/spine/library/spine/EndListener.lua @@ -0,0 +1,14 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta spine.EndListener + +--- +--- +---std::function +---@class spine.EndListener +local EndListener = {} + +---@return spine.EndListener + +function EndListener:__call() end + +return EndListener \ No newline at end of file diff --git a/addons/cclua/spine/library/spine/Event.lua b/addons/cclua/spine/library/spine/Event.lua new file mode 100644 index 00000000..3226f24a --- /dev/null +++ b/addons/cclua/spine/library/spine/Event.lua @@ -0,0 +1,52 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta spine.Event + +---Stores the current pose values for an Event. +---@class spine.Event : spine.SpineObject +---@field balance number +---@field data spine.EventData +---@field floatValue number +---@field intValue integer +---@field stringValue any +---@field time number The animation time this event was keyed. +---@field volume number +local Event = {} + +---@return number +function Event:getBalance() end + +---@return spine.EventData +function Event:getData() end + +---@return number +function Event:getFloatValue() end + +---@return integer +function Event:getIntValue() end + +---@return any +function Event:getStringValue() end + +---The animation time this event was keyed. +---@return number +function Event:getTime() end + +---@return number +function Event:getVolume() end + +---@param inValue number +function Event:setBalance(inValue) end + +---@param inValue number +function Event:setFloatValue(inValue) end + +---@param inValue integer +function Event:setIntValue(inValue) end + +---@param inValue any +function Event:setStringValue(inValue) end + +---@param inValue number +function Event:setVolume(inValue) end + +return Event \ No newline at end of file diff --git a/addons/cclua/spine/library/spine/EventData.lua b/addons/cclua/spine/library/spine/EventData.lua new file mode 100644 index 00000000..d36b338d --- /dev/null +++ b/addons/cclua/spine/library/spine/EventData.lua @@ -0,0 +1,59 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta spine.EventData + +---Stores the setup pose values for an Event. +---@class spine.EventData : spine.SpineObject +---@field audioPath any +---@field balance number +---@field floatValue number +---@field intValue integer +---@field name any The name of the event, which is unique within the skeleton. +---@field stringValue any +---@field volume number +local EventData = {} + +---@return any +function EventData:getAudioPath() end + +---@return number +function EventData:getBalance() end + +---@return number +function EventData:getFloatValue() end + +---@return integer +function EventData:getIntValue() end + +---The name of the event, which is unique within the skeleton. +---@return any +function EventData:getName() end + +---@return any +function EventData:getStringValue() end + +---@return number +function EventData:getVolume() end + +---@param name any +---@return spine.EventData +function EventData.new(name) end + +---@param inValue any +function EventData:setAudioPath(inValue) end + +---@param inValue number +function EventData:setBalance(inValue) end + +---@param inValue number +function EventData:setFloatValue(inValue) end + +---@param inValue integer +function EventData:setIntValue(inValue) end + +---@param inValue any +function EventData:setStringValue(inValue) end + +---@param inValue number +function EventData:setVolume(inValue) end + +return EventData \ No newline at end of file diff --git a/addons/cclua/spine/library/spine/EventListener.lua b/addons/cclua/spine/library/spine/EventListener.lua new file mode 100644 index 00000000..46f2ee11 --- /dev/null +++ b/addons/cclua/spine/library/spine/EventListener.lua @@ -0,0 +1,14 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta spine.EventListener + +--- +--- +---std::function +---@class spine.EventListener +local EventListener = {} + +---@return spine.EventListener + +function EventListener:__call() end + +return EventListener \ No newline at end of file diff --git a/addons/cclua/spine/library/spine/EventTimeline.lua b/addons/cclua/spine/library/spine/EventTimeline.lua new file mode 100644 index 00000000..002505b6 --- /dev/null +++ b/addons/cclua/spine/library/spine/EventTimeline.lua @@ -0,0 +1,12 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta spine.EventTimeline + +--- +---@class spine.EventTimeline : spine.Timeline +local EventTimeline = {} + +---@param frameCount integer +---@return spine.EventTimeline +function EventTimeline.new(frameCount) end + +return EventTimeline \ No newline at end of file diff --git a/addons/cclua/spine/library/spine/EventType.lua b/addons/cclua/spine/library/spine/EventType.lua new file mode 100644 index 00000000..5d1f6be6 --- /dev/null +++ b/addons/cclua/spine/library/spine/EventType.lua @@ -0,0 +1,18 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta spine.EventType + +---@type spine.EventType +local VALUE + +--- +---@enum spine.EventType +local EventType = { + Complete = 3, + Dispose = 4, + End = 2, + Event = 5, + Interrupt = 1, + Start = 0, +} + +return EventType \ No newline at end of file diff --git a/addons/cclua/spine/library/spine/IkConstraint.lua b/addons/cclua/spine/library/spine/IkConstraint.lua new file mode 100644 index 00000000..8e0ae45a --- /dev/null +++ b/addons/cclua/spine/library/spine/IkConstraint.lua @@ -0,0 +1,85 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta spine.IkConstraint + +--- +---@class spine.IkConstraint : spine.Updatable +---@field bendDirection integer +---@field bones any +---@field compress boolean +---@field data spine.IkConstraintData +---@field mix number +---@field order integer +---@field softness number +---@field stretch boolean +---@field target spine.Bone +local IkConstraint = {} + +---Adjusts the bone rotation so the tip is as close to the target position as possible. The target is specified +---in the world coordinate system. +---@param bone spine.Bone +---@param targetX number +---@param targetY number +---@param compress boolean +---@param stretch boolean +---@param uniform boolean +---@param alpha number +--- +---Adjusts the parent and child bone rotations so the tip of the child is as close to the target position as +---possible. The target is specified in the world coordinate system. +---\param child A direct descendant of the parent bone. +---@overload fun(parent: spine.Bone, child: spine.Bone, targetX: number, targetY: number, bendDir: integer, stretch: boolean, uniform: boolean, softness: number, alpha: number) +function IkConstraint.apply(bone, targetX, targetY, compress, stretch, uniform, alpha) end + +---@return integer +function IkConstraint:getBendDirection() end + +---@return any +function IkConstraint:getBones() end + +---@return boolean +function IkConstraint:getCompress() end + +---@return spine.IkConstraintData +function IkConstraint:getData() end + +---@return number +function IkConstraint:getMix() end + +---@return integer +function IkConstraint:getOrder() end + +---@return number +function IkConstraint:getSoftness() end + +---@return boolean +function IkConstraint:getStretch() end + +---@return spine.Bone +function IkConstraint:getTarget() end + +---@param data spine.IkConstraintData +---@param skeleton spine.Skeleton +---@return spine.IkConstraint +function IkConstraint.new(data, skeleton) end + +---@param inValue integer +function IkConstraint:setBendDirection(inValue) end + +---@param inValue boolean +function IkConstraint:setCompress(inValue) end + +---@param inValue number +function IkConstraint:setMix(inValue) end + +---@param inValue number +function IkConstraint:setSoftness(inValue) end + +---@param inValue boolean +function IkConstraint:setStretch(inValue) end + +---@param inValue spine.Bone +function IkConstraint:setTarget(inValue) end + +function IkConstraint:setToSetupPose() end + +return IkConstraint \ No newline at end of file diff --git a/addons/cclua/spine/library/spine/IkConstraintData.lua b/addons/cclua/spine/library/spine/IkConstraintData.lua new file mode 100644 index 00000000..6fa6f469 --- /dev/null +++ b/addons/cclua/spine/library/spine/IkConstraintData.lua @@ -0,0 +1,68 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta spine.IkConstraintData + +--- +---@class spine.IkConstraintData : spine.ConstraintData +---@field bendDirection integer Controls the bend direction of the IK bones, either 1 or -1. +---@field bones any The bones that are constrained by this IK Constraint. +---@field compress boolean +---@field mix number +---@field softness number +---@field stretch boolean +---@field target spine.BoneData The bone that is the IK target. +---@field uniform boolean +local IkConstraintData = {} + +---Controls the bend direction of the IK bones, either 1 or -1. +---@return integer +function IkConstraintData:getBendDirection() end + +---The bones that are constrained by this IK Constraint. +---@return any +function IkConstraintData:getBones() end + +---@return boolean +function IkConstraintData:getCompress() end + +---@return number +function IkConstraintData:getMix() end + +---@return number +function IkConstraintData:getSoftness() end + +---@return boolean +function IkConstraintData:getStretch() end + +---The bone that is the IK target. +---@return spine.BoneData +function IkConstraintData:getTarget() end + +---@return boolean +function IkConstraintData:getUniform() end + +---@param name any +---@return spine.IkConstraintData +function IkConstraintData.new(name) end + +---@param inValue integer +function IkConstraintData:setBendDirection(inValue) end + +---@param inValue boolean +function IkConstraintData:setCompress(inValue) end + +---@param inValue number +function IkConstraintData:setMix(inValue) end + +---@param inValue number +function IkConstraintData:setSoftness(inValue) end + +---@param inValue boolean +function IkConstraintData:setStretch(inValue) end + +---@param inValue spine.BoneData +function IkConstraintData:setTarget(inValue) end + +---@param inValue boolean +function IkConstraintData:setUniform(inValue) end + +return IkConstraintData \ No newline at end of file diff --git a/addons/cclua/spine/library/spine/IkConstraintTimeline.lua b/addons/cclua/spine/library/spine/IkConstraintTimeline.lua new file mode 100644 index 00000000..a5dc3d3e --- /dev/null +++ b/addons/cclua/spine/library/spine/IkConstraintTimeline.lua @@ -0,0 +1,21 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta spine.IkConstraintTimeline + +--- +---@class spine.IkConstraintTimeline : spine.CurveTimeline +---@field ikConstraintIndex integer +local IkConstraintTimeline = {} + +---@return integer +function IkConstraintTimeline:getIkConstraintIndex() end + +---@param frameCount integer +---@param bezierCount integer +---@param ikConstraintIndex integer +---@return spine.IkConstraintTimeline +function IkConstraintTimeline.new(frameCount, bezierCount, ikConstraintIndex) end + +---@param inValue integer +function IkConstraintTimeline:setIkConstraintIndex(inValue) end + +return IkConstraintTimeline \ No newline at end of file diff --git a/addons/cclua/spine/library/spine/Inherit.lua b/addons/cclua/spine/library/spine/Inherit.lua new file mode 100644 index 00000000..9ac41608 --- /dev/null +++ b/addons/cclua/spine/library/spine/Inherit.lua @@ -0,0 +1,17 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta spine.Inherit + +---@type spine.Inherit +local VALUE + +--- +---@enum spine.Inherit +local Inherit = { + NoRotationOrReflection = 2, + NoScale = 3, + NoScaleOrReflection = 4, + Normal = 0, + OnlyTranslation = 1, +} + +return Inherit \ No newline at end of file diff --git a/addons/cclua/spine/library/spine/InterruptListener.lua b/addons/cclua/spine/library/spine/InterruptListener.lua new file mode 100644 index 00000000..46cf5abb --- /dev/null +++ b/addons/cclua/spine/library/spine/InterruptListener.lua @@ -0,0 +1,14 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta spine.InterruptListener + +--- +--- +---std::function +---@class spine.InterruptListener +local InterruptListener = {} + +---@return spine.InterruptListener + +function InterruptListener:__call() end + +return InterruptListener \ No newline at end of file diff --git a/addons/cclua/spine/library/spine/MeshAttachment.lua b/addons/cclua/spine/library/spine/MeshAttachment.lua new file mode 100644 index 00000000..556a6122 --- /dev/null +++ b/addons/cclua/spine/library/spine/MeshAttachment.lua @@ -0,0 +1,87 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta spine.MeshAttachment + +---Attachment that displays a texture region using a mesh. +---@class spine.MeshAttachment : spine.VertexAttachment +---@field color any +---@field edges any +---@field height number +---@field hullLength integer +---@field parentMesh spine.MeshAttachment +---@field path any +---@field region spine.TextureRegion +---@field regionUVs any +---@field sequence spine.Sequence +---@field triangles any +---@field uvs any The UV pair for each vertex, normalized within the entire texture. See also MeshAttachment::updateRegion +---@field width number +local MeshAttachment = {} + +---@return any +function MeshAttachment:getColor() end + +---@return any +function MeshAttachment:getEdges() end + +---@return number +function MeshAttachment:getHeight() end + +---@return integer +function MeshAttachment:getHullLength() end + +---@return spine.MeshAttachment +function MeshAttachment:getParentMesh() end + +---@return any +function MeshAttachment:getPath() end + +---@return spine.TextureRegion +function MeshAttachment:getRegion() end + +---@return any +function MeshAttachment:getRegionUVs() end + +---@return spine.Sequence +function MeshAttachment:getSequence() end + +---@return any +function MeshAttachment:getTriangles() end + +---The UV pair for each vertex, normalized within the entire texture. See also MeshAttachment::updateRegion +---@return any +function MeshAttachment:getUVs() end + +---@return number +function MeshAttachment:getWidth() end + +---@param name any +---@return spine.MeshAttachment +function MeshAttachment.new(name) end + +---@return spine.MeshAttachment +function MeshAttachment:newLinkedMesh() end + +---@param inValue number +function MeshAttachment:setHeight(inValue) end + +---@param inValue integer +function MeshAttachment:setHullLength(inValue) end + +---@param inValue spine.MeshAttachment +function MeshAttachment:setParentMesh(inValue) end + +---@param inValue any +function MeshAttachment:setPath(inValue) end + +---@param region spine.TextureRegion +function MeshAttachment:setRegion(region) end + +---@param sequence spine.Sequence +function MeshAttachment:setSequence(sequence) end + +---@param inValue number +function MeshAttachment:setWidth(inValue) end + +function MeshAttachment:updateRegion() end + +return MeshAttachment \ No newline at end of file diff --git a/addons/cclua/spine/library/spine/MixBlend.lua b/addons/cclua/spine/library/spine/MixBlend.lua new file mode 100644 index 00000000..a8f9c9e3 --- /dev/null +++ b/addons/cclua/spine/library/spine/MixBlend.lua @@ -0,0 +1,16 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta spine.MixBlend + +---@type spine.MixBlend +local VALUE + +--- +---@enum spine.MixBlend +local MixBlend = { + Add = 3, + First = 1, + Replace = 2, + Setup = 0, +} + +return MixBlend \ No newline at end of file diff --git a/addons/cclua/spine/library/spine/MixDirection.lua b/addons/cclua/spine/library/spine/MixDirection.lua new file mode 100644 index 00000000..29bf0728 --- /dev/null +++ b/addons/cclua/spine/library/spine/MixDirection.lua @@ -0,0 +1,14 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta spine.MixDirection + +---@type spine.MixDirection +local VALUE + +--- +---@enum spine.MixDirection +local MixDirection = { + In = 0, + Out = 1, +} + +return MixDirection \ No newline at end of file diff --git a/addons/cclua/spine/library/spine/PathAttachment.lua b/addons/cclua/spine/library/spine/PathAttachment.lua new file mode 100644 index 00000000..6fce77d2 --- /dev/null +++ b/addons/cclua/spine/library/spine/PathAttachment.lua @@ -0,0 +1,35 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta spine.PathAttachment + +--- +---@class spine.PathAttachment : spine.VertexAttachment +---@field closed boolean +---@field color any +---@field constantSpeed boolean +---@field lengths any The length in the setup pose from the start of the path to the end of each curve. +local PathAttachment = {} + +---@return any +function PathAttachment:getColor() end + +---The length in the setup pose from the start of the path to the end of each curve. +---@return any +function PathAttachment:getLengths() end + +---@return boolean +function PathAttachment:isClosed() end + +---@return boolean +function PathAttachment:isConstantSpeed() end + +---@param name any +---@return spine.PathAttachment +function PathAttachment.new(name) end + +---@param inValue boolean +function PathAttachment:setClosed(inValue) end + +---@param inValue boolean +function PathAttachment:setConstantSpeed(inValue) end + +return PathAttachment \ No newline at end of file diff --git a/addons/cclua/spine/library/spine/PathConstraint.lua b/addons/cclua/spine/library/spine/PathConstraint.lua new file mode 100644 index 00000000..3a1778bb --- /dev/null +++ b/addons/cclua/spine/library/spine/PathConstraint.lua @@ -0,0 +1,69 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta spine.PathConstraint + +--- +---@class spine.PathConstraint : spine.Updatable +---@field bones any +---@field data spine.PathConstraintData +---@field mixRotate number +---@field mixX number +---@field mixY number +---@field order integer +---@field position number +---@field spacing number +---@field target spine.Slot +local PathConstraint = {} + +---@return any +function PathConstraint:getBones() end + +---@return spine.PathConstraintData +function PathConstraint:getData() end + +---@return number +function PathConstraint:getMixRotate() end + +---@return number +function PathConstraint:getMixX() end + +---@return number +function PathConstraint:getMixY() end + +---@return integer +function PathConstraint:getOrder() end + +---@return number +function PathConstraint:getPosition() end + +---@return number +function PathConstraint:getSpacing() end + +---@return spine.Slot +function PathConstraint:getTarget() end + +---@param data spine.PathConstraintData +---@param skeleton spine.Skeleton +---@return spine.PathConstraint +function PathConstraint.new(data, skeleton) end + +---@param inValue number +function PathConstraint:setMixRotate(inValue) end + +---@param inValue number +function PathConstraint:setMixX(inValue) end + +---@param inValue number +function PathConstraint:setMixY(inValue) end + +---@param inValue number +function PathConstraint:setPosition(inValue) end + +---@param inValue number +function PathConstraint:setSpacing(inValue) end + +---@param inValue spine.Slot +function PathConstraint:setTarget(inValue) end + +function PathConstraint:setToSetupPose() end + +return PathConstraint \ No newline at end of file diff --git a/addons/cclua/spine/library/spine/PathConstraintData.lua b/addons/cclua/spine/library/spine/PathConstraintData.lua new file mode 100644 index 00000000..21ca42a0 --- /dev/null +++ b/addons/cclua/spine/library/spine/PathConstraintData.lua @@ -0,0 +1,86 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta spine.PathConstraintData + +--- +---@class spine.PathConstraintData : spine.ConstraintData +---@field bones any +---@field mixRotate number +---@field mixX number +---@field mixY number +---@field offsetRotation number +---@field position number +---@field positionMode spine.PositionMode +---@field rotateMode spine.RotateMode +---@field spacing number +---@field spacingMode spine.SpacingMode +---@field target spine.SlotData +local PathConstraintData = {} + +---@return any +function PathConstraintData:getBones() end + +---@return number +function PathConstraintData:getMixRotate() end + +---@return number +function PathConstraintData:getMixX() end + +---@return number +function PathConstraintData:getMixY() end + +---@return number +function PathConstraintData:getOffsetRotation() end + +---@return number +function PathConstraintData:getPosition() end + +---@return spine.PositionMode +function PathConstraintData:getPositionMode() end + +---@return spine.RotateMode +function PathConstraintData:getRotateMode() end + +---@return number +function PathConstraintData:getSpacing() end + +---@return spine.SpacingMode +function PathConstraintData:getSpacingMode() end + +---@return spine.SlotData +function PathConstraintData:getTarget() end + +---@param name any +---@return spine.PathConstraintData +function PathConstraintData.new(name) end + +---@param inValue number +function PathConstraintData:setMixRotate(inValue) end + +---@param inValue number +function PathConstraintData:setMixX(inValue) end + +---@param inValue number +function PathConstraintData:setMixY(inValue) end + +---@param inValue number +function PathConstraintData:setOffsetRotation(inValue) end + +---@param inValue number +function PathConstraintData:setPosition(inValue) end + +---@param inValue spine.PositionMode +function PathConstraintData:setPositionMode(inValue) end + +---@param inValue spine.RotateMode +function PathConstraintData:setRotateMode(inValue) end + +---@param inValue number +function PathConstraintData:setSpacing(inValue) end + +---@param inValue spine.SpacingMode +function PathConstraintData:setSpacingMode(inValue) end + +---@param inValue spine.SlotData +function PathConstraintData:setTarget(inValue) end + +return PathConstraintData \ No newline at end of file diff --git a/addons/cclua/spine/library/spine/PathConstraintMixTimeline.lua b/addons/cclua/spine/library/spine/PathConstraintMixTimeline.lua new file mode 100644 index 00000000..f381fc5e --- /dev/null +++ b/addons/cclua/spine/library/spine/PathConstraintMixTimeline.lua @@ -0,0 +1,21 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta spine.PathConstraintMixTimeline + +--- +---@class spine.PathConstraintMixTimeline : spine.CurveTimeline +---@field pathConstraintIndex integer +local PathConstraintMixTimeline = {} + +---@return integer +function PathConstraintMixTimeline:getPathConstraintIndex() end + +---@param frameCount integer +---@param bezierCount integer +---@param pathConstraintIndex integer +---@return spine.PathConstraintMixTimeline +function PathConstraintMixTimeline.new(frameCount, bezierCount, pathConstraintIndex) end + +---@param inValue integer +function PathConstraintMixTimeline:setPathConstraintIndex(inValue) end + +return PathConstraintMixTimeline \ No newline at end of file diff --git a/addons/cclua/spine/library/spine/PathConstraintPositionTimeline.lua b/addons/cclua/spine/library/spine/PathConstraintPositionTimeline.lua new file mode 100644 index 00000000..f51df8e1 --- /dev/null +++ b/addons/cclua/spine/library/spine/PathConstraintPositionTimeline.lua @@ -0,0 +1,22 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta spine.PathConstraintPositionTimeline + +--- +---@class spine.PathConstraintPositionTimeline : spine.CurveTimeline1 +---@field pathConstraintIndex integer +---@field ENTRIES integer +local PathConstraintPositionTimeline = {} + +---@return integer +function PathConstraintPositionTimeline:getPathConstraintIndex() end + +---@param frameCount integer +---@param bezierCount integer +---@param pathConstraintIndex integer +---@return spine.PathConstraintPositionTimeline +function PathConstraintPositionTimeline.new(frameCount, bezierCount, pathConstraintIndex) end + +---@param inValue integer +function PathConstraintPositionTimeline:setPathConstraintIndex(inValue) end + +return PathConstraintPositionTimeline \ No newline at end of file diff --git a/addons/cclua/spine/library/spine/PathConstraintSpacingTimeline.lua b/addons/cclua/spine/library/spine/PathConstraintSpacingTimeline.lua new file mode 100644 index 00000000..2d4aec6e --- /dev/null +++ b/addons/cclua/spine/library/spine/PathConstraintSpacingTimeline.lua @@ -0,0 +1,21 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta spine.PathConstraintSpacingTimeline + +--- +---@class spine.PathConstraintSpacingTimeline : spine.CurveTimeline1 +---@field pathConstraintIndex integer +local PathConstraintSpacingTimeline = {} + +---@return integer +function PathConstraintSpacingTimeline:getPathConstraintIndex() end + +---@param frameCount integer +---@param bezierCount integer +---@param pathConstraintIndex integer +---@return spine.PathConstraintSpacingTimeline +function PathConstraintSpacingTimeline.new(frameCount, bezierCount, pathConstraintIndex) end + +---@param inValue integer +function PathConstraintSpacingTimeline:setPathConstraintIndex(inValue) end + +return PathConstraintSpacingTimeline \ No newline at end of file diff --git a/addons/cclua/spine/library/spine/Physics.lua b/addons/cclua/spine/library/spine/Physics.lua new file mode 100644 index 00000000..4df05d9f --- /dev/null +++ b/addons/cclua/spine/library/spine/Physics.lua @@ -0,0 +1,20 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta spine.Physics + +---@type spine.Physics +local VALUE + +--- +---@enum spine.Physics +local Physics = { + ---Physics are not updated or applied. + None = 0, + ---Physics are not updated but the pose from physics is applied. + Pose = 3, + ---Physics are reset to the current pose. + Reset = 1, + ---Physics are updated and the pose from physics is applied. + Update = 2, +} + +return Physics \ No newline at end of file diff --git a/addons/cclua/spine/library/spine/PhysicsConstraint.lua b/addons/cclua/spine/library/spine/PhysicsConstraint.lua new file mode 100644 index 00000000..1df59cf9 --- /dev/null +++ b/addons/cclua/spine/library/spine/PhysicsConstraint.lua @@ -0,0 +1,8 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta spine.PhysicsConstraint + +--- +---@class spine.PhysicsConstraint : spine.Updatable +local PhysicsConstraint = {} + +return PhysicsConstraint \ No newline at end of file diff --git a/addons/cclua/spine/library/spine/PhysicsConstraintData.lua b/addons/cclua/spine/library/spine/PhysicsConstraintData.lua new file mode 100644 index 00000000..e4241282 --- /dev/null +++ b/addons/cclua/spine/library/spine/PhysicsConstraintData.lua @@ -0,0 +1,8 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta spine.PhysicsConstraintData + +--- +---@class spine.PhysicsConstraintData : spine.ConstraintData +local PhysicsConstraintData = {} + +return PhysicsConstraintData \ No newline at end of file diff --git a/addons/cclua/spine/library/spine/PointAttachment.lua b/addons/cclua/spine/library/spine/PointAttachment.lua new file mode 100644 index 00000000..358ca725 --- /dev/null +++ b/addons/cclua/spine/library/spine/PointAttachment.lua @@ -0,0 +1,50 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta spine.PointAttachment + +---An attachment which is a single point and a rotation. This can be used to spawn projectiles, particles, etc. A bone can be +---used in similar ways, but a PointAttachment is slightly less expensive to compute and can be hidden, shown, and placed in a +---skin. +--- +---See http://esotericsoftware.com/spine-point-attachments for Point Attachments in the Spine User Guide. +---@class spine.PointAttachment : spine.Attachment +---@field color any +---@field rotation number +---@field x number +---@field y number +local PointAttachment = {} + +---@param bone spine.Bone +---@param ox olua.float +---@param oy olua.float +function PointAttachment:computeWorldPosition(bone, ox, oy) end + +---@param bone spine.Bone +---@return number +function PointAttachment:computeWorldRotation(bone) end + +---@return any +function PointAttachment:getColor() end + +---@return number +function PointAttachment:getRotation() end + +---@return number +function PointAttachment:getX() end + +---@return number +function PointAttachment:getY() end + +---@param name any +---@return spine.PointAttachment +function PointAttachment.new(name) end + +---@param inValue number +function PointAttachment:setRotation(inValue) end + +---@param inValue number +function PointAttachment:setX(inValue) end + +---@param inValue number +function PointAttachment:setY(inValue) end + +return PointAttachment \ No newline at end of file diff --git a/addons/cclua/spine/library/spine/Polygon.lua b/addons/cclua/spine/library/spine/Polygon.lua new file mode 100644 index 00000000..d21c3817 --- /dev/null +++ b/addons/cclua/spine/library/spine/Polygon.lua @@ -0,0 +1,8 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta spine.Polygon + +--- +---@class spine.Polygon : spine.SpineObject +local Polygon = {} + +return Polygon \ No newline at end of file diff --git a/addons/cclua/spine/library/spine/PositionMode.lua b/addons/cclua/spine/library/spine/PositionMode.lua new file mode 100644 index 00000000..e4f795d5 --- /dev/null +++ b/addons/cclua/spine/library/spine/PositionMode.lua @@ -0,0 +1,14 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta spine.PositionMode + +---@type spine.PositionMode +local VALUE + +--- +---@enum spine.PositionMode +local PositionMode = { + Fixed = 0, + Percent = 1, +} + +return PositionMode \ No newline at end of file diff --git a/addons/cclua/spine/library/spine/RGB2Timeline.lua b/addons/cclua/spine/library/spine/RGB2Timeline.lua new file mode 100644 index 00000000..8c541468 --- /dev/null +++ b/addons/cclua/spine/library/spine/RGB2Timeline.lua @@ -0,0 +1,21 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta spine.RGB2Timeline + +--- +---@class spine.RGB2Timeline : spine.CurveTimeline +---@field slotIndex integer +local RGB2Timeline = {} + +---@return integer +function RGB2Timeline:getSlotIndex() end + +---@param frameCount integer +---@param bezierCount integer +---@param slotIndex integer +---@return spine.RGB2Timeline +function RGB2Timeline.new(frameCount, bezierCount, slotIndex) end + +---@param inValue integer +function RGB2Timeline:setSlotIndex(inValue) end + +return RGB2Timeline \ No newline at end of file diff --git a/addons/cclua/spine/library/spine/RGBA2Timeline.lua b/addons/cclua/spine/library/spine/RGBA2Timeline.lua new file mode 100644 index 00000000..5e8fab54 --- /dev/null +++ b/addons/cclua/spine/library/spine/RGBA2Timeline.lua @@ -0,0 +1,21 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta spine.RGBA2Timeline + +--- +---@class spine.RGBA2Timeline : spine.CurveTimeline +---@field slotIndex integer +local RGBA2Timeline = {} + +---@return integer +function RGBA2Timeline:getSlotIndex() end + +---@param frameCount integer +---@param bezierCount integer +---@param slotIndex integer +---@return spine.RGBA2Timeline +function RGBA2Timeline.new(frameCount, bezierCount, slotIndex) end + +---@param inValue integer +function RGBA2Timeline:setSlotIndex(inValue) end + +return RGBA2Timeline \ No newline at end of file diff --git a/addons/cclua/spine/library/spine/RGBATimeline.lua b/addons/cclua/spine/library/spine/RGBATimeline.lua new file mode 100644 index 00000000..763bffdc --- /dev/null +++ b/addons/cclua/spine/library/spine/RGBATimeline.lua @@ -0,0 +1,21 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta spine.RGBATimeline + +--- +---@class spine.RGBATimeline : spine.CurveTimeline +---@field slotIndex integer +local RGBATimeline = {} + +---@return integer +function RGBATimeline:getSlotIndex() end + +---@param frameCount integer +---@param bezierCount integer +---@param slotIndex integer +---@return spine.RGBATimeline +function RGBATimeline.new(frameCount, bezierCount, slotIndex) end + +---@param inValue integer +function RGBATimeline:setSlotIndex(inValue) end + +return RGBATimeline \ No newline at end of file diff --git a/addons/cclua/spine/library/spine/RGBTimeline.lua b/addons/cclua/spine/library/spine/RGBTimeline.lua new file mode 100644 index 00000000..89108d07 --- /dev/null +++ b/addons/cclua/spine/library/spine/RGBTimeline.lua @@ -0,0 +1,21 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta spine.RGBTimeline + +--- +---@class spine.RGBTimeline : spine.CurveTimeline +---@field slotIndex integer +local RGBTimeline = {} + +---@return integer +function RGBTimeline:getSlotIndex() end + +---@param frameCount integer +---@param bezierCount integer +---@param slotIndex integer +---@return spine.RGBTimeline +function RGBTimeline.new(frameCount, bezierCount, slotIndex) end + +---@param inValue integer +function RGBTimeline:setSlotIndex(inValue) end + +return RGBTimeline \ No newline at end of file diff --git a/addons/cclua/spine/library/spine/RegionAttachment.lua b/addons/cclua/spine/library/spine/RegionAttachment.lua new file mode 100644 index 00000000..fa3cf6ed --- /dev/null +++ b/addons/cclua/spine/library/spine/RegionAttachment.lua @@ -0,0 +1,106 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta spine.RegionAttachment + +---Attachment that displays a texture region. +---@class spine.RegionAttachment : spine.Attachment +---@field color any +---@field height number +---@field offset any +---@field path any +---@field region spine.TextureRegion +---@field rotation number +---@field scaleX number +---@field scaleY number +---@field sequence spine.Sequence +---@field uvs any +---@field width number +---@field x number +---@field y number +local RegionAttachment = {} + +---Transforms the attachment's four vertices to world coordinates. +---@param slot spine.Slot # The parent slot. +---@param worldVertices olua.float # The output world vertices. Must have a length greater than or equal to offset + 8. +---@param offset integer # The worldVertices index to begin writing values. +---@param stride integer # The number of worldVertices entries between the value pairs written. +---@overload fun(self: spine.RegionAttachment, slot: spine.Slot, worldVertices: olua.float, offset: integer) +---@overload fun(self: spine.RegionAttachment, slot: spine.Slot, worldVertices: any, offset: integer, stride: integer) +---@overload fun(self: spine.RegionAttachment, slot: spine.Slot, worldVertices: any, offset: integer) +function RegionAttachment:computeWorldVertices(slot, worldVertices, offset, stride) end + +---@return any +function RegionAttachment:getColor() end + +---@return number +function RegionAttachment:getHeight() end + +---@return any +function RegionAttachment:getOffset() end + +---@return any +function RegionAttachment:getPath() end + +---@return spine.TextureRegion +function RegionAttachment:getRegion() end + +---@return number +function RegionAttachment:getRotation() end + +---@return number +function RegionAttachment:getScaleX() end + +---@return number +function RegionAttachment:getScaleY() end + +---@return spine.Sequence +function RegionAttachment:getSequence() end + +---@return any +function RegionAttachment:getUVs() end + +---@return number +function RegionAttachment:getWidth() end + +---@return number +function RegionAttachment:getX() end + +---@return number +function RegionAttachment:getY() end + +---@param name any +---@return spine.RegionAttachment +function RegionAttachment.new(name) end + +---@param inValue number +function RegionAttachment:setHeight(inValue) end + +---@param inValue any +function RegionAttachment:setPath(inValue) end + +---@param region spine.TextureRegion +function RegionAttachment:setRegion(region) end + +---@param inValue number +function RegionAttachment:setRotation(inValue) end + +---@param inValue number +function RegionAttachment:setScaleX(inValue) end + +---@param inValue number +function RegionAttachment:setScaleY(inValue) end + +---@param sequence spine.Sequence +function RegionAttachment:setSequence(sequence) end + +---@param inValue number +function RegionAttachment:setWidth(inValue) end + +---@param inValue number +function RegionAttachment:setX(inValue) end + +---@param inValue number +function RegionAttachment:setY(inValue) end + +function RegionAttachment:updateRegion() end + +return RegionAttachment \ No newline at end of file diff --git a/addons/cclua/spine/library/spine/RotateMode.lua b/addons/cclua/spine/library/spine/RotateMode.lua new file mode 100644 index 00000000..4b5c86aa --- /dev/null +++ b/addons/cclua/spine/library/spine/RotateMode.lua @@ -0,0 +1,15 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta spine.RotateMode + +---@type spine.RotateMode +local VALUE + +--- +---@enum spine.RotateMode +local RotateMode = { + Chain = 1, + ChainScale = 2, + Tangent = 0, +} + +return RotateMode \ No newline at end of file diff --git a/addons/cclua/spine/library/spine/RotateTimeline.lua b/addons/cclua/spine/library/spine/RotateTimeline.lua new file mode 100644 index 00000000..7a9ecc4b --- /dev/null +++ b/addons/cclua/spine/library/spine/RotateTimeline.lua @@ -0,0 +1,21 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta spine.RotateTimeline + +--- +---@class spine.RotateTimeline : spine.CurveTimeline1 +---@field boneIndex integer +local RotateTimeline = {} + +---@return integer +function RotateTimeline:getBoneIndex() end + +---@param frameCount integer +---@param bezierCount integer +---@param boneIndex integer +---@return spine.RotateTimeline +function RotateTimeline.new(frameCount, bezierCount, boneIndex) end + +---@param inValue integer +function RotateTimeline:setBoneIndex(inValue) end + +return RotateTimeline \ No newline at end of file diff --git a/addons/cclua/spine/library/spine/ScaleTimeline.lua b/addons/cclua/spine/library/spine/ScaleTimeline.lua new file mode 100644 index 00000000..7b90016c --- /dev/null +++ b/addons/cclua/spine/library/spine/ScaleTimeline.lua @@ -0,0 +1,21 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta spine.ScaleTimeline + +--- +---@class spine.ScaleTimeline : spine.CurveTimeline2 +---@field boneIndex integer +local ScaleTimeline = {} + +---@return integer +function ScaleTimeline:getBoneIndex() end + +---@param frameCount integer +---@param bezierCount integer +---@param boneIndex integer +---@return spine.ScaleTimeline +function ScaleTimeline.new(frameCount, bezierCount, boneIndex) end + +---@param inValue integer +function ScaleTimeline:setBoneIndex(inValue) end + +return ScaleTimeline \ No newline at end of file diff --git a/addons/cclua/spine/library/spine/ScaleXTimeline.lua b/addons/cclua/spine/library/spine/ScaleXTimeline.lua new file mode 100644 index 00000000..1e02fd0c --- /dev/null +++ b/addons/cclua/spine/library/spine/ScaleXTimeline.lua @@ -0,0 +1,21 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta spine.ScaleXTimeline + +--- +---@class spine.ScaleXTimeline : spine.CurveTimeline1 +---@field boneIndex integer +local ScaleXTimeline = {} + +---@return integer +function ScaleXTimeline:getBoneIndex() end + +---@param frameCount integer +---@param bezierCount integer +---@param boneIndex integer +---@return spine.ScaleXTimeline +function ScaleXTimeline.new(frameCount, bezierCount, boneIndex) end + +---@param inValue integer +function ScaleXTimeline:setBoneIndex(inValue) end + +return ScaleXTimeline \ No newline at end of file diff --git a/addons/cclua/spine/library/spine/ScaleYTimeline.lua b/addons/cclua/spine/library/spine/ScaleYTimeline.lua new file mode 100644 index 00000000..1b5ecec1 --- /dev/null +++ b/addons/cclua/spine/library/spine/ScaleYTimeline.lua @@ -0,0 +1,21 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta spine.ScaleYTimeline + +--- +---@class spine.ScaleYTimeline : spine.CurveTimeline1 +---@field boneIndex integer +local ScaleYTimeline = {} + +---@return integer +function ScaleYTimeline:getBoneIndex() end + +---@param frameCount integer +---@param bezierCount integer +---@param boneIndex integer +---@return spine.ScaleYTimeline +function ScaleYTimeline.new(frameCount, bezierCount, boneIndex) end + +---@param inValue integer +function ScaleYTimeline:setBoneIndex(inValue) end + +return ScaleYTimeline \ No newline at end of file diff --git a/addons/cclua/spine/library/spine/Sequence.lua b/addons/cclua/spine/library/spine/Sequence.lua new file mode 100644 index 00000000..e05e4f35 --- /dev/null +++ b/addons/cclua/spine/library/spine/Sequence.lua @@ -0,0 +1,56 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta spine.Sequence + +--- +---@class spine.Sequence : spine.SpineObject +---@field digits integer +---@field id integer +---@field regions any +---@field setupIndex integer +---@field start integer +local Sequence = {} + +---@param slot spine.Slot +---@param attachment spine.Attachment +function Sequence:apply(slot, attachment) end + +---@return spine.Sequence +function Sequence:copy() end + +---@return integer +function Sequence:getDigits() end + +---@return integer +function Sequence:getId() end + +---@param basePath any +---@param index integer +---@return any +function Sequence:getPath(basePath, index) end + +---@return any +function Sequence:getRegions() end + +---@return integer +function Sequence:getSetupIndex() end + +---@return integer +function Sequence:getStart() end + +---@param count integer +---@return spine.Sequence +function Sequence.new(count) end + +---@param digits integer +function Sequence:setDigits(digits) end + +---@param id integer +function Sequence:setId(id) end + +---@param setupIndex integer +function Sequence:setSetupIndex(setupIndex) end + +---@param start integer +function Sequence:setStart(start) end + +return Sequence \ No newline at end of file diff --git a/addons/cclua/spine/library/spine/SequenceMode.lua b/addons/cclua/spine/library/spine/SequenceMode.lua new file mode 100644 index 00000000..49e0e6fd --- /dev/null +++ b/addons/cclua/spine/library/spine/SequenceMode.lua @@ -0,0 +1,19 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta spine.SequenceMode + +---@type spine.SequenceMode +local VALUE + +--- +---@enum spine.SequenceMode +local SequenceMode = { + hold = 0, + loop = 2, + loopReverse = 5, + once = 1, + onceReverse = 4, + pingpong = 3, + pingpongReverse = 6, +} + +return SequenceMode \ No newline at end of file diff --git a/addons/cclua/spine/library/spine/ShearTimeline.lua b/addons/cclua/spine/library/spine/ShearTimeline.lua new file mode 100644 index 00000000..63b4f2fd --- /dev/null +++ b/addons/cclua/spine/library/spine/ShearTimeline.lua @@ -0,0 +1,21 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta spine.ShearTimeline + +--- +---@class spine.ShearTimeline : spine.CurveTimeline2 +---@field boneIndex integer +local ShearTimeline = {} + +---@return integer +function ShearTimeline:getBoneIndex() end + +---@param frameCount integer +---@param bezierCount integer +---@param boneIndex integer +---@return spine.ShearTimeline +function ShearTimeline.new(frameCount, bezierCount, boneIndex) end + +---@param inValue integer +function ShearTimeline:setBoneIndex(inValue) end + +return ShearTimeline \ No newline at end of file diff --git a/addons/cclua/spine/library/spine/ShearXTimeline.lua b/addons/cclua/spine/library/spine/ShearXTimeline.lua new file mode 100644 index 00000000..6edb36b4 --- /dev/null +++ b/addons/cclua/spine/library/spine/ShearXTimeline.lua @@ -0,0 +1,21 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta spine.ShearXTimeline + +--- +---@class spine.ShearXTimeline : spine.CurveTimeline1 +---@field boneIndex integer +local ShearXTimeline = {} + +---@return integer +function ShearXTimeline:getBoneIndex() end + +---@param frameCount integer +---@param bezierCount integer +---@param boneIndex integer +---@return spine.ShearXTimeline +function ShearXTimeline.new(frameCount, bezierCount, boneIndex) end + +---@param inValue integer +function ShearXTimeline:setBoneIndex(inValue) end + +return ShearXTimeline \ No newline at end of file diff --git a/addons/cclua/spine/library/spine/ShearYTimeline.lua b/addons/cclua/spine/library/spine/ShearYTimeline.lua new file mode 100644 index 00000000..91f7e294 --- /dev/null +++ b/addons/cclua/spine/library/spine/ShearYTimeline.lua @@ -0,0 +1,21 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta spine.ShearYTimeline + +--- +---@class spine.ShearYTimeline : spine.CurveTimeline1 +---@field boneIndex integer +local ShearYTimeline = {} + +---@return integer +function ShearYTimeline:getBoneIndex() end + +---@param frameCount integer +---@param bezierCount integer +---@param boneIndex integer +---@return spine.ShearYTimeline +function ShearYTimeline.new(frameCount, bezierCount, boneIndex) end + +---@param inValue integer +function ShearYTimeline:setBoneIndex(inValue) end + +return ShearYTimeline \ No newline at end of file diff --git a/addons/cclua/spine/library/spine/Skeleton.lua b/addons/cclua/spine/library/spine/Skeleton.lua new file mode 100644 index 00000000..f614190f --- /dev/null +++ b/addons/cclua/spine/library/spine/Skeleton.lua @@ -0,0 +1,183 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta spine.Skeleton + +--- +---@class spine.Skeleton : spine.SpineObject +---@field bones any +---@field color any +---@field data spine.SkeletonData +---@field drawOrder any +---@field ikConstraints any +---@field pathConstraints any +---@field physicsConstraints any +---@field rootBone spine.Bone +---@field scaleX number +---@field scaleY number +---@field skin spine.Skin +---@field slots any +---@field time number +---@field transformConstraints any +---@field updateCacheList any +---@field x number +---@field y number +local Skeleton = {} + +---@return spine.Bone # May be NULL. +---@param boneName any +function Skeleton:findBone(boneName) end + +---@return spine.IkConstraint # May be NULL. +---@param constraintName any +function Skeleton:findIkConstraint(constraintName) end + +---@return spine.PathConstraint # May be NULL. +---@param constraintName any +function Skeleton:findPathConstraint(constraintName) end + +---@return spine.PhysicsConstraint # May be NULL. +---@param constraintName any +function Skeleton:findPhysicsConstraint(constraintName) end + +---@return spine.Slot # May be NULL. +---@param slotName any +function Skeleton:findSlot(slotName) end + +---@return spine.TransformConstraint # May be NULL. +---@param constraintName any +function Skeleton:findTransformConstraint(constraintName) end + +---@return spine.Attachment # May be NULL. +---@param slotName any +---@param attachmentName any +---@overload fun(self: spine.Skeleton, slotIndex: integer, attachmentName: any): spine.Attachment +function Skeleton:getAttachment(slotName, attachmentName) end + +---@return any +function Skeleton:getBones() end + +---@return any +function Skeleton:getColor() end + +---@return spine.SkeletonData +function Skeleton:getData() end + +---@return any +function Skeleton:getDrawOrder() end + +---@return any +function Skeleton:getIkConstraints() end + +---@return any +function Skeleton:getPathConstraints() end + +---@return any +function Skeleton:getPhysicsConstraints() end + +---@return spine.Bone +function Skeleton:getRootBone() end + +---@return number +function Skeleton:getScaleX() end + +---@return number +function Skeleton:getScaleY() end + +---@return spine.Skin +function Skeleton:getSkin() end + +---@return any +function Skeleton:getSlots() end + +---@return number +function Skeleton:getTime() end + +---@return any +function Skeleton:getTransformConstraints() end + +---@return any +function Skeleton:getUpdateCacheList() end + +---@return number +function Skeleton:getX() end + +---@return number +function Skeleton:getY() end + +---@param skeletonData spine.SkeletonData +---@return spine.Skeleton +function Skeleton.new(skeletonData) end + +---Calls {@link PhysicsConstraint#rotate(float, float, float)} for each physics constraint. +---@param x number +---@param y number +---@param degrees number +function Skeleton:physicsRotate(x, y, degrees) end + +---Rotates the physics constraint so next {@link #update(Physics)} forces are applied as if the bone rotated around the +---specified point in world space. +---@param x number +---@param y number +function Skeleton:physicsTranslate(x, y) end + +function Skeleton:printUpdateCache() end + +---@param attachmentName any # May be empty. +---@param slotName any +function Skeleton:setAttachment(slotName, attachmentName) end + +---Sets the bones and constraints to their setup pose values. +function Skeleton:setBonesToSetupPose() end + +---@param x number +---@param y number +function Skeleton:setPosition(x, y) end + +---@param inValue number +function Skeleton:setScaleX(inValue) end + +---@param inValue number +function Skeleton:setScaleY(inValue) end + +---Sets a skin by name (see setSkin). +---@param skinName any +--- +---Attachments from the new skin are attached if the corresponding attachment from the old skin was attached. +---If there was no old skin, each slot's setup mode attachment is attached from the new skin. +---After changing the skin, the visible attachments can be reset to those attached in the setup pose by calling +---See Skeleton::setSlotsToSetupPose() +---Also, often AnimationState::apply(Skeleton&) is called before the next time the +---skeleton is rendered to allow any attachment keys in the current animation(s) to hide or show attachments from the new skin. +---\param newSkin May be NULL. +---@overload fun(self: spine.Skeleton, newSkin: spine.Skin) +function Skeleton:setSkin(skinName) end + +function Skeleton:setSlotsToSetupPose() end + +---@param time number +function Skeleton:setTime(time) end + +---Sets the bones, constraints, and slots to their setup pose values. +function Skeleton:setToSetupPose() end + +---@param inValue number +function Skeleton:setX(inValue) end + +---@param inValue number +function Skeleton:setY(inValue) end + +---@param delta number +function Skeleton:update(delta) end + +---Caches information about bones and constraints. Must be called if bones, constraints or weighted path attachments are added +---or removed. +function Skeleton:updateCache() end + +---Updates the world transform for each bone and applies all constraints. +--- +---See [World transforms](http://esotericsoftware.com/spine-runtime-skeletons#World-transforms) in the Spine +---Runtimes Guide. +---@param physics spine.Physics +---@overload fun(self: spine.Skeleton, physics: spine.Physics, parent: spine.Bone) +function Skeleton:updateWorldTransform(physics) end + +return Skeleton \ No newline at end of file diff --git a/addons/cclua/spine/library/spine/SkeletonAnimation.lua b/addons/cclua/spine/library/spine/SkeletonAnimation.lua new file mode 100644 index 00000000..45ad224b --- /dev/null +++ b/addons/cclua/spine/library/spine/SkeletonAnimation.lua @@ -0,0 +1,156 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta spine.SkeletonAnimation + +---Draws an animated skeleton, providing an AnimationState for applying one or more animations and queuing animations to be +---played later. +---@class spine.SkeletonAnimation : spine.SkeletonRenderer +---@field state spine.AnimationState +local SkeletonAnimation = {} + +---@param trackIndex integer +---@param name string +---@param loop boolean +---@param delay number +---@return spine.TrackEntry +---@overload fun(self: spine.SkeletonAnimation, trackIndex: integer, name: string, loop: boolean): spine.TrackEntry +function SkeletonAnimation:addAnimation(trackIndex, name, loop, delay) end + +---@param trackIndex integer +---@param mixDuration number +---@param delay number +---@return spine.TrackEntry +---@overload fun(self: spine.SkeletonAnimation, trackIndex: integer, mixDuration: number): spine.TrackEntry +function SkeletonAnimation:addEmptyAnimation(trackIndex, mixDuration, delay) end + +---@param trackIndex integer +---@overload fun(self: spine.SkeletonAnimation) +function SkeletonAnimation:clearTrack(trackIndex) end + +function SkeletonAnimation:clearTracks() end + +---@return spine.SkeletonAnimation +function SkeletonAnimation.create() end + +---@param skeletonBinaryFile string +---@param atlas spine.Atlas +---@param scale number +---@return spine.SkeletonAnimation +---@overload fun(skeletonBinaryFile: string, atlas: spine.Atlas): spine.SkeletonAnimation +---@overload fun(skeletonBinaryFile: string, atlasFile: string, scale: number): spine.SkeletonAnimation +---@overload fun(skeletonBinaryFile: string, atlasFile: string): spine.SkeletonAnimation +function SkeletonAnimation.createWithBinaryFile(skeletonBinaryFile, atlas, scale) end + +---@param skeletonData spine.SkeletonData +---@param ownsSkeletonData boolean +---@return spine.SkeletonAnimation +---@overload fun(skeletonData: spine.SkeletonData): spine.SkeletonAnimation +function SkeletonAnimation.createWithData(skeletonData, ownsSkeletonData) end + +---@param skeletonJsonFile string +---@param atlas spine.Atlas +---@param scale number +---@return spine.SkeletonAnimation +---@overload fun(skeletonJsonFile: string, atlas: spine.Atlas): spine.SkeletonAnimation +---@overload fun(skeletonJsonFile: string, atlasFile: string, scale: number): spine.SkeletonAnimation +---@overload fun(skeletonJsonFile: string, atlasFile: string): spine.SkeletonAnimation +function SkeletonAnimation.createWithJsonFile(skeletonJsonFile, atlas, scale) end + +---@param name string +---@return spine.Animation +function SkeletonAnimation:findAnimation(name) end + +---@param trackIndex integer +---@return spine.TrackEntry +---@overload fun(self: spine.SkeletonAnimation): spine.TrackEntry +function SkeletonAnimation:getCurrent(trackIndex) end + +---@return spine.AnimationState +function SkeletonAnimation:getState() end + +---@return spine.SkeletonAnimation +function SkeletonAnimation.new() end + +---@param entry spine.TrackEntry +---@param type spine.EventType +---@param event spine.Event +function SkeletonAnimation:onAnimationStateEvent(entry, type, event) end + +---@param entry spine.TrackEntry +---@param type spine.EventType +---@param event spine.Event +function SkeletonAnimation:onTrackEntryEvent(entry, type, event) end + +---@param trackIndex integer +---@param name string +---@param loop boolean +---@return spine.TrackEntry +function SkeletonAnimation:setAnimation(trackIndex, name, loop) end + +---@param stateData spine.AnimationStateData +function SkeletonAnimation:setAnimationStateData(stateData) end + +---@param listener spine.CompleteListener +function SkeletonAnimation:setCompleteListener(listener) end + +---@param listener spine.DisposeListener +function SkeletonAnimation:setDisposeListener(listener) end + +---@param trackIndex integer +---@param mixDuration number +---@return spine.TrackEntry +function SkeletonAnimation:setEmptyAnimation(trackIndex, mixDuration) end + +---@param mixDuration number +function SkeletonAnimation:setEmptyAnimations(mixDuration) end + +---@param listener spine.EndListener +function SkeletonAnimation:setEndListener(listener) end + +---@param listener spine.EventListener +function SkeletonAnimation:setEventListener(listener) end + +---@param listener spine.InterruptListener +function SkeletonAnimation:setInterruptListener(listener) end + +---@param fromAnimation string +---@param toAnimation string +---@param duration number +function SkeletonAnimation:setMix(fromAnimation, toAnimation, duration) end + +---@param listener spine.UpdateWorldTransformsListener +function SkeletonAnimation:setPostUpdateWorldTransformsListener(listener) end + +---@param listener spine.UpdateWorldTransformsListener +function SkeletonAnimation:setPreUpdateWorldTransformsListener(listener) end + +---@param listener spine.StartListener +function SkeletonAnimation:setStartListener(listener) end + +---@param entry spine.TrackEntry +---@param listener spine.CompleteListener +function SkeletonAnimation:setTrackCompleteListener(entry, listener) end + +---@param entry spine.TrackEntry +---@param listener spine.DisposeListener +function SkeletonAnimation:setTrackDisposeListener(entry, listener) end + +---@param entry spine.TrackEntry +---@param listener spine.EndListener +function SkeletonAnimation:setTrackEndListener(entry, listener) end + +---@param entry spine.TrackEntry +---@param listener spine.EventListener +function SkeletonAnimation:setTrackEventListener(entry, listener) end + +---@param entry spine.TrackEntry +---@param listener spine.InterruptListener +function SkeletonAnimation:setTrackInterruptListener(entry, listener) end + +---@param entry spine.TrackEntry +---@param listener spine.StartListener +function SkeletonAnimation:setTrackStartListener(entry, listener) end + +---@param status boolean +function SkeletonAnimation:setUpdateOnlyIfVisible(status) end + +return SkeletonAnimation \ No newline at end of file diff --git a/addons/cclua/spine/library/spine/SkeletonBounds.lua b/addons/cclua/spine/library/spine/SkeletonBounds.lua new file mode 100644 index 00000000..5bd49c3f --- /dev/null +++ b/addons/cclua/spine/library/spine/SkeletonBounds.lua @@ -0,0 +1,91 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta spine.SkeletonBounds + +---Collects each BoundingBoxAttachment that is visible and computes the world vertices for its polygon. +---The polygon vertices are provided along with convenience methods for doing hit detection. +---@class spine.SkeletonBounds : spine.SpineObject +---@field boundingBoxes any Returns all bounding boxes. Requires a call to update() first. +---@field height number +---@field polygons any Returns all polygons or an empty vector. Requires a call to update() first. +---@field width number +local SkeletonBounds = {} + +---Returns true if the axis aligned bounding box intersects the axis aligned bounding box of the specified bounds. +---@param bounds spine.SkeletonBounds +---@return boolean +function SkeletonBounds:aabbIntersectsSkeleton(bounds) end + +---Returns true if the axis aligned bounding box contains the point. +---@param x number +---@param y number +---@return boolean +function SkeletonBounds:aabbcontainsPoint(x, y) end + +---Returns true if the axis aligned bounding box intersects the line segment. +---@param x1 number +---@param y1 number +---@param x2 number +---@param y2 number +---@return boolean +function SkeletonBounds:aabbintersectsSegment(x1, y1, x2, y2) end + +---Returns true if the polygon contains the point. +---@param polygon spine.Polygon +---@param x number +---@param y number +---@return boolean +--- +---Returns the first bounding box attachment that contains the point, or NULL. When doing many checks, it is usually more +---efficient to only call this method if {@link #aabbcontainsPoint(float, float)} returns true. +---@overload fun(self: spine.SkeletonBounds, x: number, y: number): spine.BoundingBoxAttachment +function SkeletonBounds:containsPoint(polygon, x, y) end + +---Returns the bounding box for the given polygon or null. Requires a call to update() first. +---@param polygon spine.Polygon +---@return spine.BoundingBoxAttachment +function SkeletonBounds:getBoundingBox(polygon) end + +---Returns all bounding boxes. Requires a call to update() first. +---@return any +function SkeletonBounds:getBoundingBoxes() end + +---@return number +function SkeletonBounds:getHeight() end + +---Returns the polygon for the given bounding box attachment or null if no +---polygon can be found for the attachment. Requires a call to update() first. +---@param attachment spine.BoundingBoxAttachment +---@return spine.Polygon +function SkeletonBounds:getPolygon(attachment) end + +---Returns all polygons or an empty vector. Requires a call to update() first. +---@return any +function SkeletonBounds:getPolygons() end + +---@return number +function SkeletonBounds:getWidth() end + +---Returns the first bounding box attachment that contains the line segment, or NULL. When doing many checks, it is usually +---more efficient to only call this method if {@link #aabbintersectsSegment(float, float, float, float)} returns true. +---@param x1 number +---@param y1 number +---@param x2 number +---@param y2 number +---@return spine.BoundingBoxAttachment +--- +---Returns true if the polygon contains the line segment. +---@overload fun(self: spine.SkeletonBounds, polygon: spine.Polygon, x1: number, y1: number, x2: number, y2: number): boolean +function SkeletonBounds:intersectsSegment(x1, y1, x2, y2) end + +---@return spine.SkeletonBounds +function SkeletonBounds.new() end + +---Clears any previous polygons, finds all visible bounding box attachments, +---and computes the world vertices for each bounding box's polygon. +---@param skeleton spine.Skeleton # The skeleton. +---@param updateAabb boolean # +---If true, the axis aligned bounding box containing all the polygons is computed. +---If false, the SkeletonBounds AABB methods will always return true. +function SkeletonBounds:update(skeleton, updateAabb) end + +return SkeletonBounds \ No newline at end of file diff --git a/addons/cclua/spine/library/spine/SkeletonClipping.lua b/addons/cclua/spine/library/spine/SkeletonClipping.lua new file mode 100644 index 00000000..d3138748 --- /dev/null +++ b/addons/cclua/spine/library/spine/SkeletonClipping.lua @@ -0,0 +1,8 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta spine.SkeletonClipping + +--- +---@class spine.SkeletonClipping : spine.SpineObject +local SkeletonClipping = {} + +return SkeletonClipping \ No newline at end of file diff --git a/addons/cclua/spine/library/spine/SkeletonData.lua b/addons/cclua/spine/library/spine/SkeletonData.lua new file mode 100644 index 00000000..a8ea9203 --- /dev/null +++ b/addons/cclua/spine/library/spine/SkeletonData.lua @@ -0,0 +1,185 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta spine.SkeletonData + +---Stores the setup pose and all of the stateless data for a skeleton. +---@class spine.SkeletonData : spine.SpineObject +---@field animations any +---@field audioPath any +---@field bones any The skeleton's bones, sorted parent first. The root bone is always the first bone. +---@field defaultSkin spine.Skin The skeleton's default skin. By default this skin contains all attachments that were not in a skin in Spine. \return May be NULL. +---@field events any +---@field fps number The dopesheet FPS in Spine. Available only when nonessential data was exported. +---@field hash any +---@field height number +---@field ikConstraints any +---@field imagesPath any +---@field name any +---@field pathConstraints any +---@field physicsConstraints any +---@field referenceScale number +---@field skins any All skins, including the default skin. +---@field slots any +---@field transformConstraints any +---@field version any The Spine version used to export this data, or NULL. +---@field width number +---@field x number +---@field y number +local SkeletonData = {} + +---@return any +function SkeletonData.__gc() end + +---@param skelPath string +---@param atlasPath string +---@param scale number +---@return any +---@overload fun(skelPath: string, atlasPath: string): any +function SkeletonData.create(skelPath, atlasPath, scale) end + +---@return any +function SkeletonData.dispose() end + +---@return spine.Animation # May be NULL. +---@param animationName any +function SkeletonData:findAnimation(animationName) end + +---Finds a bone by comparing each bone's name. +---It is more efficient to cache the results of this method than to call it multiple times. +---@return spine.BoneData # May be NULL. +---@param boneName any +function SkeletonData:findBone(boneName) end + +---@return spine.EventData # May be NULL. +---@param eventDataName any +function SkeletonData:findEvent(eventDataName) end + +---@return spine.IkConstraintData # May be NULL. +---@param constraintName any +function SkeletonData:findIkConstraint(constraintName) end + +---@return spine.PathConstraintData # May be NULL. +---@param constraintName any +function SkeletonData:findPathConstraint(constraintName) end + +---@return spine.PhysicsConstraintData # May be NULL. +---@param constraintName any +function SkeletonData:findPhysicsConstraint(constraintName) end + +---@return spine.Skin # May be NULL. +---@param skinName any +function SkeletonData:findSkin(skinName) end + +---@return spine.SlotData # May be NULL. +---@param slotName any +function SkeletonData:findSlot(slotName) end + +---@return spine.TransformConstraintData # May be NULL. +---@param constraintName any +function SkeletonData:findTransformConstraint(constraintName) end + +---@return any +function SkeletonData:getAnimations() end + +---@return any +function SkeletonData:getAudioPath() end + +---The skeleton's bones, sorted parent first. The root bone is always the first bone. +---@return any +function SkeletonData:getBones() end + +---The skeleton's default skin. +---By default this skin contains all attachments that were not in a skin in Spine. +---@return spine.Skin # May be NULL. +function SkeletonData:getDefaultSkin() end + +---@return any +function SkeletonData:getEvents() end + +---The dopesheet FPS in Spine. Available only when nonessential data was exported. +---@return number +function SkeletonData:getFps() end + +---@return any +function SkeletonData:getHash() end + +---@return number +function SkeletonData:getHeight() end + +---@return any +function SkeletonData:getIkConstraints() end + +---@return any +function SkeletonData:getImagesPath() end + +---@return any +function SkeletonData:getName() end + +---@return any +function SkeletonData:getPathConstraints() end + +---@return any +function SkeletonData:getPhysicsConstraints() end + +---@return number +function SkeletonData:getReferenceScale() end + +---All skins, including the default skin. +---@return any +function SkeletonData:getSkins() end + +---@return any +function SkeletonData:getSlots() end + +---@return any +function SkeletonData:getTransformConstraints() end + +---The Spine version used to export this data, or NULL. +---@return any +function SkeletonData:getVersion() end + +---@return number +function SkeletonData:getWidth() end + +---@return number +function SkeletonData:getX() end + +---@return number +function SkeletonData:getY() end + +---@param inValue any +function SkeletonData:setAudioPath(inValue) end + +---@param inValue spine.Skin +function SkeletonData:setDefaultSkin(inValue) end + +---@param inValue number +function SkeletonData:setFps(inValue) end + +---@param inValue any +function SkeletonData:setHash(inValue) end + +---@param inValue number +function SkeletonData:setHeight(inValue) end + +---@param inValue any +function SkeletonData:setImagesPath(inValue) end + +---@param inValue any +function SkeletonData:setName(inValue) end + +---@param inValue number +function SkeletonData:setReferenceScale(inValue) end + +---@param inValue any +function SkeletonData:setVersion(inValue) end + +---@param inValue number +function SkeletonData:setWidth(inValue) end + +---@param inValue number +function SkeletonData:setX(inValue) end + +---@param inValue number +function SkeletonData:setY(inValue) end + +return SkeletonData \ No newline at end of file diff --git a/addons/cclua/spine/library/spine/SkeletonRenderer.lua b/addons/cclua/spine/library/spine/SkeletonRenderer.lua new file mode 100644 index 00000000..56a773a4 --- /dev/null +++ b/addons/cclua/spine/library/spine/SkeletonRenderer.lua @@ -0,0 +1,174 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta spine.SkeletonRenderer + +--- +---@class spine.SkeletonRenderer : cc.Node +---@field blendFunc cc.BlendFunc +---@field debugBonesEnabled boolean +---@field debugBoundingRectEnabled boolean +---@field debugMeshesEnabled boolean +---@field debugSlotsEnabled boolean +---@field skeleton spine.Skeleton +---@field timeScale number +---@field twoColorTint boolean +local SkeletonRenderer = {} + +---@param cls string +---@return any +function SkeletonRenderer:as(cls) end + +---@return spine.SkeletonRenderer +function SkeletonRenderer.create() end + +---@param skeletonData spine.SkeletonData +---@param ownsSkeletonData boolean +---@return spine.SkeletonRenderer +---@overload fun(skeletonData: spine.SkeletonData): spine.SkeletonRenderer +function SkeletonRenderer.createWithData(skeletonData, ownsSkeletonData) end + +---@param skeletonDataFile string +---@param atlas spine.Atlas +---@param scale number +---@return spine.SkeletonRenderer +---@overload fun(skeletonDataFile: string, atlas: spine.Atlas): spine.SkeletonRenderer +---@overload fun(skeletonDataFile: string, atlasFile: string, scale: number): spine.SkeletonRenderer +---@overload fun(skeletonDataFile: string, atlasFile: string): spine.SkeletonRenderer +function SkeletonRenderer.createWithFile(skeletonDataFile, atlas, scale) end + +---@param skeleton spine.Skeleton +---@param ownsSkeleton boolean +---@param ownsSkeletonData boolean +---@return spine.SkeletonRenderer +---@overload fun(skeleton: spine.Skeleton): spine.SkeletonRenderer +---@overload fun(skeleton: spine.Skeleton, ownsSkeleton: boolean): spine.SkeletonRenderer +function SkeletonRenderer.createWithSkeleton(skeleton, ownsSkeleton, ownsSkeletonData) end + +---@param boneName string +---@return spine.Bone +function SkeletonRenderer:findBone(boneName) end + +---@param slotName string +---@return spine.Slot +function SkeletonRenderer:findSlot(slotName) end + +---@param slotName string +---@param attachmentName string +---@return spine.Attachment +function SkeletonRenderer:getAttachment(slotName, attachmentName) end + +---@return cc.BlendFunc +function SkeletonRenderer:getBlendFunc() end + +---@return boolean +function SkeletonRenderer:getDebugBonesEnabled() end + +---@return boolean +function SkeletonRenderer:getDebugBoundingRectEnabled() end + +---@return boolean +function SkeletonRenderer:getDebugMeshesEnabled() end + +---@return boolean +function SkeletonRenderer:getDebugSlotsEnabled() end + +---@return spine.Skeleton +function SkeletonRenderer:getSkeleton() end + +---@return number +function SkeletonRenderer:getTimeScale() end + +---@param skeletonDataFile string +---@param atlas spine.Atlas +---@param scale number +---@overload fun(self: spine.SkeletonRenderer, skeletonDataFile: string, atlas: spine.Atlas) +---@overload fun(self: spine.SkeletonRenderer, skeletonDataFile: string, atlasFile: string, scale: number) +---@overload fun(self: spine.SkeletonRenderer, skeletonDataFile: string, atlasFile: string) +function SkeletonRenderer:initWithBinaryFile(skeletonDataFile, atlas, scale) end + +---@param skeletonData spine.SkeletonData +---@param ownsSkeletonData boolean +---@overload fun(self: spine.SkeletonRenderer, skeletonData: spine.SkeletonData) +function SkeletonRenderer:initWithData(skeletonData, ownsSkeletonData) end + +---@param skeletonDataFile string +---@param atlas spine.Atlas +---@param scale number +---@overload fun(self: spine.SkeletonRenderer, skeletonDataFile: string, atlas: spine.Atlas) +---@overload fun(self: spine.SkeletonRenderer, skeletonDataFile: string, atlasFile: string, scale: number) +---@overload fun(self: spine.SkeletonRenderer, skeletonDataFile: string, atlasFile: string) +function SkeletonRenderer:initWithJsonFile(skeletonDataFile, atlas, scale) end + +---@param skeleton spine.Skeleton +---@param ownsSkeleton boolean +---@param ownsSkeletonData boolean +---@param ownsAtlas boolean +---@overload fun(self: spine.SkeletonRenderer, skeleton: spine.Skeleton) +---@overload fun(self: spine.SkeletonRenderer, skeleton: spine.Skeleton, ownsSkeleton: boolean) +---@overload fun(self: spine.SkeletonRenderer, skeleton: spine.Skeleton, ownsSkeleton: boolean, ownsSkeletonData: boolean) +function SkeletonRenderer:initWithSkeleton(skeleton, ownsSkeleton, ownsSkeletonData, ownsAtlas) end + +function SkeletonRenderer:initialize() end + +---@return boolean +function SkeletonRenderer:isTwoColorTint() end + +---@return spine.SkeletonRenderer +---@overload fun(skeleton: spine.Skeleton, ownsSkeleton: boolean, ownsSkeletonData: boolean, ownsAtlas: boolean): spine.SkeletonRenderer +---@overload fun(skeleton: spine.Skeleton): spine.SkeletonRenderer +---@overload fun(skeleton: spine.Skeleton, ownsSkeleton: boolean): spine.SkeletonRenderer +---@overload fun(skeleton: spine.Skeleton, ownsSkeleton: boolean, ownsSkeletonData: boolean): spine.SkeletonRenderer +---@overload fun(skeletonData: spine.SkeletonData, ownsSkeletonData: boolean): spine.SkeletonRenderer +---@overload fun(skeletonData: spine.SkeletonData): spine.SkeletonRenderer +---@overload fun(skeletonDataFile: string, atlas: spine.Atlas, scale: number): spine.SkeletonRenderer +---@overload fun(skeletonDataFile: string, atlas: spine.Atlas): spine.SkeletonRenderer +---@overload fun(skeletonDataFile: string, atlasFile: string, scale: number): spine.SkeletonRenderer +---@overload fun(skeletonDataFile: string, atlasFile: string): spine.SkeletonRenderer +function SkeletonRenderer.new() end + +---@param slotName string +---@param attachmentName string +---@return boolean +---@overload fun(self: spine.SkeletonRenderer, slotName: string, attachmentName: string): boolean +function SkeletonRenderer:setAttachment(slotName, attachmentName) end + +---@param blendFunc cc.BlendFunc +function SkeletonRenderer:setBlendFunc(blendFunc) end + +function SkeletonRenderer:setBonesToSetupPose() end + +---@param enabled boolean +function SkeletonRenderer:setDebugBonesEnabled(enabled) end + +---@param enabled boolean +function SkeletonRenderer:setDebugBoundingRectEnabled(enabled) end + +---@param enabled boolean +function SkeletonRenderer:setDebugMeshesEnabled(enabled) end + +---@param enabled boolean +function SkeletonRenderer:setDebugSlotsEnabled(enabled) end + +---@param skinName string +--- +---\param skin May be 0 for no skin. +---@overload fun(self: spine.SkeletonRenderer, skinName: string) +function SkeletonRenderer:setSkin(skinName) end + +---@param startSlotIndex integer +---@param endSlotIndex integer +function SkeletonRenderer:setSlotsRange(startSlotIndex, endSlotIndex) end + +function SkeletonRenderer:setSlotsToSetupPose() end + +---@param scale number +function SkeletonRenderer:setTimeScale(scale) end + +function SkeletonRenderer:setToSetupPose() end + +---@param enabled boolean +function SkeletonRenderer:setTwoColorTint(enabled) end + +---@param physics spine.Physics +function SkeletonRenderer:updateWorldTransform(physics) end + +return SkeletonRenderer \ No newline at end of file diff --git a/addons/cclua/spine/library/spine/Skin.lua b/addons/cclua/spine/library/spine/Skin.lua new file mode 100644 index 00000000..1b0e5a4a --- /dev/null +++ b/addons/cclua/spine/library/spine/Skin.lua @@ -0,0 +1,55 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta spine.Skin + +---Stores attachments by slot index and attachment name. +---See SkeletonData::getDefaultSkin, Skeleton::getSkin, and +---http://esotericsoftware.com/spine-runtime-skins in the Spine Runtimes Guide. +---@class spine.Skin : spine.SpineObject +---@field bones any +---@field color any +---@field constraints any +---@field name any +local Skin = {} + +---Adds all attachments, bones, and constraints from the specified skin to this skin. +---@param other spine.Skin +function Skin:addSkin(other) end + +---Adds all attachments, bones, and constraints from the specified skin to this skin. Attachments are deep copied. +---@param other spine.Skin +function Skin:copySkin(other) end + +---Returns the attachment for the specified slot index and name, or NULL. +---@param slotIndex integer +---@param name any +---@return spine.Attachment +function Skin:getAttachment(slotIndex, name) end + +---@return any +function Skin:getBones() end + +---@return any +function Skin:getColor() end + +---@return any +function Skin:getConstraints() end + +---@return any +function Skin:getName() end + +---@param name any +---@return spine.Skin +function Skin.new(name) end + +---@param slotIndex integer +---@param name any +function Skin:removeAttachment(slotIndex, name) end + +---Adds an attachment to the skin for the specified slot index and name. +---If the name already exists for the slot, the previous value is replaced. +---@param slotIndex integer +---@param name any +---@param attachment spine.Attachment +function Skin:setAttachment(slotIndex, name, attachment) end + +return Skin \ No newline at end of file diff --git a/addons/cclua/spine/library/spine/Slot.lua b/addons/cclua/spine/library/spine/Slot.lua new file mode 100644 index 00000000..f052378c --- /dev/null +++ b/addons/cclua/spine/library/spine/Slot.lua @@ -0,0 +1,64 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta spine.Slot + +--- +---@class spine.Slot : spine.SpineObject +---@field attachment spine.Attachment May be NULL. +---@field attachmentState integer +---@field bone spine.Bone +---@field color any +---@field darkColor any +---@field data spine.SlotData +---@field deform any +---@field sequenceIndex integer +---@field skeleton spine.Skeleton +local Slot = {} + +---May be NULL. +---@return spine.Attachment +function Slot:getAttachment() end + +---@return integer +function Slot:getAttachmentState() end + +---@return spine.Bone +function Slot:getBone() end + +---@return any +function Slot:getColor() end + +---@return any +function Slot:getDarkColor() end + +---@return spine.SlotData +function Slot:getData() end + +---@return any +function Slot:getDeform() end + +---@return integer +function Slot:getSequenceIndex() end + +---@return spine.Skeleton +function Slot:getSkeleton() end + +---@return boolean +function Slot:hasDarkColor() end + +---@param data spine.SlotData +---@param bone spine.Bone +---@return spine.Slot +function Slot.new(data, bone) end + +---@param inValue spine.Attachment +function Slot:setAttachment(inValue) end + +---@param state integer +function Slot:setAttachmentState(state) end + +---@param index integer +function Slot:setSequenceIndex(index) end + +function Slot:setToSetupPose() end + +return Slot \ No newline at end of file diff --git a/addons/cclua/spine/library/spine/SlotData.lua b/addons/cclua/spine/library/spine/SlotData.lua new file mode 100644 index 00000000..c80dd1b9 --- /dev/null +++ b/addons/cclua/spine/library/spine/SlotData.lua @@ -0,0 +1,62 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta spine.SlotData + +--- +---@class spine.SlotData : spine.SpineObject +---@field attachmentName any May be empty. +---@field blendMode spine.BlendMode +---@field boneData spine.BoneData +---@field color any +---@field darkColor any +---@field index integer +---@field name any +---@field visible boolean +local SlotData = {} + +---May be empty. +---@return any +function SlotData:getAttachmentName() end + +---@return spine.BlendMode +function SlotData:getBlendMode() end + +---@return spine.BoneData +function SlotData:getBoneData() end + +---@return any +function SlotData:getColor() end + +---@return any +function SlotData:getDarkColor() end + +---@return integer +function SlotData:getIndex() end + +---@return any +function SlotData:getName() end + +---@return boolean +function SlotData:hasDarkColor() end + +---@return boolean +function SlotData:isVisible() end + +---@param index integer +---@param name any +---@param boneData spine.BoneData +---@return spine.SlotData +function SlotData.new(index, name, boneData) end + +---@param inValue any +function SlotData:setAttachmentName(inValue) end + +---@param inValue spine.BlendMode +function SlotData:setBlendMode(inValue) end + +---@param inValue boolean +function SlotData:setHasDarkColor(inValue) end + +---@param inValue boolean +function SlotData:setVisible(inValue) end + +return SlotData \ No newline at end of file diff --git a/addons/cclua/spine/library/spine/SpacingMode.lua b/addons/cclua/spine/library/spine/SpacingMode.lua new file mode 100644 index 00000000..3844d287 --- /dev/null +++ b/addons/cclua/spine/library/spine/SpacingMode.lua @@ -0,0 +1,16 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta spine.SpacingMode + +---@type spine.SpacingMode +local VALUE + +--- +---@enum spine.SpacingMode +local SpacingMode = { + Fixed = 1, + Length = 0, + Percent = 2, + Proportional = 3, +} + +return SpacingMode \ No newline at end of file diff --git a/addons/cclua/spine/library/spine/SpineObject.lua b/addons/cclua/spine/library/spine/SpineObject.lua new file mode 100644 index 00000000..437d6739 --- /dev/null +++ b/addons/cclua/spine/library/spine/SpineObject.lua @@ -0,0 +1,14 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta spine.SpineObject + +--- +---@class spine.SpineObject +local SpineObject = {} + +---@return any +function SpineObject:__gc() end + +---@return any +function SpineObject:__olua_move() end + +return SpineObject \ No newline at end of file diff --git a/addons/cclua/spine/library/spine/StartListener.lua b/addons/cclua/spine/library/spine/StartListener.lua new file mode 100644 index 00000000..6d626831 --- /dev/null +++ b/addons/cclua/spine/library/spine/StartListener.lua @@ -0,0 +1,14 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta spine.StartListener + +--- +--- +---std::function +---@class spine.StartListener +local StartListener = {} + +---@return spine.StartListener + +function StartListener:__call() end + +return StartListener \ No newline at end of file diff --git a/addons/cclua/spine/library/spine/TextureRegion.lua b/addons/cclua/spine/library/spine/TextureRegion.lua new file mode 100644 index 00000000..7d0cc43e --- /dev/null +++ b/addons/cclua/spine/library/spine/TextureRegion.lua @@ -0,0 +1,23 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta spine.TextureRegion + +--- +---@class spine.TextureRegion : spine.SpineObject +---@field degrees integer +---@field height integer +---@field offsetX number +---@field offsetY number +---@field originalHeight integer +---@field originalWidth integer +---@field rendererObject any +---@field u number +---@field u2 number +---@field v number +---@field v2 number +---@field width integer +local TextureRegion = {} + +---@return spine.TextureRegion +function TextureRegion.new() end + +return TextureRegion \ No newline at end of file diff --git a/addons/cclua/spine/library/spine/Timeline.lua b/addons/cclua/spine/library/spine/Timeline.lua new file mode 100644 index 00000000..5592a8ae --- /dev/null +++ b/addons/cclua/spine/library/spine/Timeline.lua @@ -0,0 +1,28 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta spine.Timeline + +--- +---@class spine.Timeline : spine.SpineObject +---@field duration number +---@field frameCount integer +---@field frameEntries integer +---@field frames any +---@field propertyIds any +local Timeline = {} + +---@return number +function Timeline:getDuration() end + +---@return integer +function Timeline:getFrameCount() end + +---@return integer +function Timeline:getFrameEntries() end + +---@return any +function Timeline:getFrames() end + +---@return any +function Timeline:getPropertyIds() end + +return Timeline \ No newline at end of file diff --git a/addons/cclua/spine/library/spine/TrackEntry.lua b/addons/cclua/spine/library/spine/TrackEntry.lua new file mode 100644 index 00000000..b700a96b --- /dev/null +++ b/addons/cclua/spine/library/spine/TrackEntry.lua @@ -0,0 +1,269 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta spine.TrackEntry + +---State for the playback of an animation +---@class spine.TrackEntry : spine.SpineObject +---@field alpha number Values less than 1 mix this animation with the last skeleton pose. Defaults to 1, which overwrites the last skeleton pose with this animation.

Typically track 0 is used to completely pose the skeleton, then alpha can be used on higher tracks. It doesn't make sense to use alpha on track 0 if the skeleton pose is from the last frame render. +---@field alphaAttachmentThreshold number When getAlpha() is greater than alphaAttachmentThreshold, attachment timelines are applied. Defaults to 0, so attachment timelines are always applied. +---@field animation spine.Animation The animation to apply for this track entry. +---@field animationEnd number Seconds for the last frame of this animation. Non-looping animations won't play past this time. Looping animations will loop back to TrackEntry.AnimationStart at this time. Defaults to the animation duration. +---@field animationLast number The time in seconds this animation was last applied. Some timelines use this for one-time triggers. Eg, when this animation is applied, event timelines will fire all events between the animation last time (exclusive) and animation time (inclusive). Defaults to -1 to ensure triggers on frame 0 happen the first time this animation is applied. +---@field animationStart number Seconds when this animation starts, both initially and after looping. Defaults to 0.

When changing the animation start time, it often makes sense to set TrackEntry.AnimationLast to the same value to prevent timeline keys before the start time from triggering. +---@field animationTime number Uses TrackEntry.TrackTime to compute the animation time between TrackEntry.AnimationStart. and TrackEntry.AnimationEnd. When the track time is 0, the animation time is equal to the animation start time. +---@field complete boolean Returns true if at least one loop has been completed. +---@field delay number Seconds to postpone playing the animation. When a track entry is the current track entry, delay postpones incrementing the track time. When a track entry is queued, delay is the time from the start of the previous animation to when the track entry will become the current track entry. +---@field eventThreshold number /// When the mix percentage (mix time / mix duration) is less than the event threshold, event timelines for the animation being mixed out will be applied. Defaults to 0, so event timelines are not applied for an animation being mixed out. +---@field holdPrevious boolean If true, when mixing from the previous animation to this animation, the previous animation is applied as normal instead of being mixed out.

When mixing between animations that key the same property, if a lower track also keys that property then the value will briefly dip toward the lower track value during the mix. This happens because the first animation mixes from 100% to 0% while the second animation mixes from 0% to 100%. Setting holdPrevious to true applies the first animation at 100% during the mix so the lower track value is overwritten. Such dipping does not occur on the lowest track which keys the property, only when a higher track also keys the property.

Snapping will occur if holdPrevious is true and this animation does not key all the same properties as the previous animation. +---@field loop boolean If true, the animation will repeat. If false, it will not, instead its last frame is applied if played beyond its duration. +---@field mixAttachmentThreshold number When the mix percentage (mix time / mix duration) is less than the attachment threshold, attachment timelines for the animation being mixed out will be applied. Defaults to 0, so attachment timelines are not applied for an animation being mixed out. +---@field mixBlend spine.MixBlend +---@field mixDrawOrderThreshold number When the mix percentage (mix time / mix duration) is less than the draw order threshold, draw order timelines for the animation being mixed out will be applied. Defaults to 0, so draw order timelines are not applied for an animation being mixed out. +---@field mixDuration number Seconds for mixing from the previous animation to this animation. Defaults to the value provided by AnimationStateData based on the animation before this animation (if any).

The mix duration can be set manually rather than use the value from AnimationStateData.GetMix. In that case, the mixDuration must be set before AnimationState.update(float) is next called.

When using AnimationState::addAnimation(int, Animation, bool, float) with a delay less than or equal to 0, note the Delay is set using the mix duration from the AnimationStateData +---@field mixTime number Seconds from 0 to the mix duration when mixing from the previous animation to this animation. May be slightly more than TrackEntry.MixDuration when the mix is complete. +---@field mixingFrom spine.TrackEntry The track entry for the previous animation when mixing from the previous animation to this animation, or NULL if no mixing is currently occuring. When mixing from multiple animations, MixingFrom makes up a double linked list with MixingTo. +---@field mixingTo spine.TrackEntry The track entry for the next animation when mixing from this animation, or NULL if no mixing is currently occuring. When mixing from multiple animations, MixingTo makes up a double linked list with MixingFrom. +---@field next spine.TrackEntry The animation queued to start after this animation, or NULL. +---@field previous spine.TrackEntry +---@field reverse boolean +---@field shortestRotation boolean +---@field timeScale number Multiplier for the delta time when the animation state is updated, causing time for this animation to play slower or faster. Defaults to 1. +---@field trackComplete number +---@field trackEnd number The track time in seconds when this animation will be removed from the track. Defaults to the animation duration for non-looping animations and to int.MaxValue for looping animations. If the track end time is reached and no other animations are queued for playback, and mixing from any previous animations is complete, properties keyed by the animation, are set to the setup pose and the track is cleared.

It may be desired to use AnimationState.addEmptyAnimation(int, float, float) to mix the properties back to the setup pose over time, rather than have it happen instantly. +---@field trackIndex integer The index of the track where this entry is either current or queued. +---@field trackTime number Current time in seconds this track entry has been the current track entry. The track time determines TrackEntry.AnimationTime. The track time can be set to start the animation at a time other than 0, without affecting looping. +local TrackEntry = {} + +---Values less than 1 mix this animation with the last skeleton pose. Defaults to 1, which overwrites the last skeleton pose with +---this animation. +--- +---Typically track 0 is used to completely pose the skeleton, then alpha can be used on higher tracks. It doesn't make sense +---to use alpha on track 0 if the skeleton pose is from the last frame render. +---@return number +function TrackEntry:getAlpha() end + +---When getAlpha() is greater than alphaAttachmentThreshold, attachment timelines are applied. +---Defaults to 0, so attachment timelines are always applied. +---@return number +function TrackEntry:getAlphaAttachmentThreshold() end + +---The animation to apply for this track entry. +---@return spine.Animation +function TrackEntry:getAnimation() end + +---Seconds for the last frame of this animation. Non-looping animations won't play past this time. Looping animations will +---loop back to TrackEntry.AnimationStart at this time. Defaults to the animation duration. +---@return number +function TrackEntry:getAnimationEnd() end + +---The time in seconds this animation was last applied. Some timelines use this for one-time triggers. Eg, when this +---animation is applied, event timelines will fire all events between the animation last time (exclusive) and animation time +---(inclusive). Defaults to -1 to ensure triggers on frame 0 happen the first time this animation is applied. +---@return number +function TrackEntry:getAnimationLast() end + +---Seconds when this animation starts, both initially and after looping. Defaults to 0. +--- +---When changing the animation start time, it often makes sense to set TrackEntry.AnimationLast to the same value to +---prevent timeline keys before the start time from triggering. +---@return number +function TrackEntry:getAnimationStart() end + +---Uses TrackEntry.TrackTime to compute the animation time between TrackEntry.AnimationStart. and +---TrackEntry.AnimationEnd. When the track time is 0, the animation time is equal to the animation start time. +---@return number +function TrackEntry:getAnimationTime() end + +---Seconds to postpone playing the animation. When a track entry is the current track entry, delay postpones incrementing +---the track time. When a track entry is queued, delay is the time from the start of the previous animation to when the +---track entry will become the current track entry. +---@return number +function TrackEntry:getDelay() end + +--- /// When the mix percentage (mix time / mix duration) is less than the event threshold, event timelines for the animation +---being mixed out will be applied. Defaults to 0, so event timelines are not applied for an animation being mixed out. +---@return number +function TrackEntry:getEventThreshold() end + +---If true, when mixing from the previous animation to this animation, the previous animation is applied as normal instead +---of being mixed out. +--- +---When mixing between animations that key the same property, if a lower track also keys that property then the value will +---briefly dip toward the lower track value during the mix. This happens because the first animation mixes from 100% to 0% +---while the second animation mixes from 0% to 100%. Setting holdPrevious to true applies the first animation +---at 100% during the mix so the lower track value is overwritten. Such dipping does not occur on the lowest track which +---keys the property, only when a higher track also keys the property. +--- +---Snapping will occur if holdPrevious is true and this animation does not key all the same properties as the +---previous animation. +---@return boolean +function TrackEntry:getHoldPrevious() end + +---If true, the animation will repeat. If false, it will not, instead its last frame is applied if played beyond its duration. +---@return boolean +function TrackEntry:getLoop() end + +---When the mix percentage (mix time / mix duration) is less than the attachment threshold, attachment timelines for the +---animation being mixed out will be applied. Defaults to 0, so attachment timelines are not applied for an animation being +---mixed out. +---@return number +function TrackEntry:getMixAttachmentThreshold() end + +---@return spine.MixBlend +function TrackEntry:getMixBlend() end + +---When the mix percentage (mix time / mix duration) is less than the draw order threshold, draw order timelines for the +---animation being mixed out will be applied. Defaults to 0, so draw order timelines are not applied for an animation being +---mixed out. +---@return number +function TrackEntry:getMixDrawOrderThreshold() end + +---Seconds for mixing from the previous animation to this animation. Defaults to the value provided by +---AnimationStateData based on the animation before this animation (if any). +--- +---The mix duration can be set manually rather than use the value from AnimationStateData.GetMix. +---In that case, the mixDuration must be set before AnimationState.update(float) is next called. +--- +---When using AnimationState::addAnimation(int, Animation, bool, float) with a delay +---less than or equal to 0, note the Delay is set using the mix duration from the AnimationStateData +---@return number +function TrackEntry:getMixDuration() end + +---Seconds from 0 to the mix duration when mixing from the previous animation to this animation. May be slightly more than +---TrackEntry.MixDuration when the mix is complete. +---@return number +function TrackEntry:getMixTime() end + +---The track entry for the previous animation when mixing from the previous animation to this animation, or NULL if no +---mixing is currently occuring. When mixing from multiple animations, MixingFrom makes up a double linked list with MixingTo. +---@return spine.TrackEntry +function TrackEntry:getMixingFrom() end + +---The track entry for the next animation when mixing from this animation, or NULL if no mixing is currently occuring. +---When mixing from multiple animations, MixingTo makes up a double linked list with MixingFrom. +---@return spine.TrackEntry +function TrackEntry:getMixingTo() end + +---The animation queued to start after this animation, or NULL. +---@return spine.TrackEntry +function TrackEntry:getNext() end + +---@return spine.TrackEntry +function TrackEntry:getPrevious() end + +---@return boolean +function TrackEntry:getReverse() end + +---@return boolean +function TrackEntry:getShortestRotation() end + +---Multiplier for the delta time when the animation state is updated, causing time for this animation to play slower or +---faster. Defaults to 1. +---@return number +function TrackEntry:getTimeScale() end + +---@return number +function TrackEntry:getTrackComplete() end + +---The track time in seconds when this animation will be removed from the track. Defaults to the animation duration for +---non-looping animations and to int.MaxValue for looping animations. If the track end time is reached and no +---other animations are queued for playback, and mixing from any previous animations is complete, properties keyed by the animation, +---are set to the setup pose and the track is cleared. +--- +---It may be desired to use AnimationState.addEmptyAnimation(int, float, float) to mix the properties back to the +---setup pose over time, rather than have it happen instantly. +---@return number +function TrackEntry:getTrackEnd() end + +---The index of the track where this entry is either current or queued. +---@return integer +function TrackEntry:getTrackIndex() end + +---Current time in seconds this track entry has been the current track entry. The track time determines +---TrackEntry.AnimationTime. The track time can be set to start the animation at a time other than 0, without affecting looping. +---@return number +function TrackEntry:getTrackTime() end + +---Returns true if at least one loop has been completed. +---@return boolean +function TrackEntry:isComplete() end + +---@return spine.TrackEntry +function TrackEntry.new() end + +---Resets the rotation directions for mixing this entry's rotate timelines. This can be useful to avoid bones rotating the +---long way around when using alpha and starting animations on other tracks. +--- +---Mixing involves finding a rotation between two others, which has two possible solutions: the short way or the long way around. +---The two rotations likely change over time, so which direction is the short or long way also changes. +---If the short way was always chosen, bones would flip to the other side when that direction became the long way. +---TrackEntry chooses the short way the first time it is applied and remembers that direction. +function TrackEntry:resetRotationDirections() end + +---@param inValue number +function TrackEntry:setAlpha(inValue) end + +---@param inValue number +function TrackEntry:setAlphaAttachmentThreshold(inValue) end + +---@param inValue number +function TrackEntry:setAnimationEnd(inValue) end + +---@param inValue number +function TrackEntry:setAnimationLast(inValue) end + +---@param inValue number +function TrackEntry:setAnimationStart(inValue) end + +---@param inValue number +function TrackEntry:setDelay(inValue) end + +---@param inValue number +function TrackEntry:setEventThreshold(inValue) end + +---@param inValue boolean +function TrackEntry:setHoldPrevious(inValue) end + +---@param listener spine.AnimationStateListener +function TrackEntry:setListener(listener) end + +---@param inValue boolean +function TrackEntry:setLoop(inValue) end + +---@param inValue number +function TrackEntry:setMixAttachmentThreshold(inValue) end + +---@param blend spine.MixBlend +function TrackEntry:setMixBlend(blend) end + +---@param inValue number +function TrackEntry:setMixDrawOrderThreshold(inValue) end + +---@param inValue number +---@overload fun(self: spine.TrackEntry, mixDuration: number, delay: number) +function TrackEntry:setMixDuration(inValue) end + +---@param inValue number +function TrackEntry:setMixTime(inValue) end + +---@param inValue boolean +function TrackEntry:setReverse(inValue) end + +---@param inValue boolean +function TrackEntry:setShortestRotation(inValue) end + +---@param inValue number +function TrackEntry:setTimeScale(inValue) end + +---@param inValue number +function TrackEntry:setTrackEnd(inValue) end + +---@param inValue number +function TrackEntry:setTrackTime(inValue) end + +---Returns true if this track entry has been applied at least once. +--- +---See AnimationState::apply(Skeleton). +---@return boolean +function TrackEntry:wasApplied() end + +return TrackEntry \ No newline at end of file diff --git a/addons/cclua/spine/library/spine/TransformConstraint.lua b/addons/cclua/spine/library/spine/TransformConstraint.lua new file mode 100644 index 00000000..09ce3672 --- /dev/null +++ b/addons/cclua/spine/library/spine/TransformConstraint.lua @@ -0,0 +1,76 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta spine.TransformConstraint + +--- +---@class spine.TransformConstraint : spine.Updatable +---@field bones any +---@field data spine.TransformConstraintData +---@field mixRotate number +---@field mixScaleX number +---@field mixScaleY number +---@field mixShearY number +---@field mixX number +---@field mixY number +---@field order integer +---@field target spine.Bone +local TransformConstraint = {} + +---@return any +function TransformConstraint:getBones() end + +---@return spine.TransformConstraintData +function TransformConstraint:getData() end + +---@return number +function TransformConstraint:getMixRotate() end + +---@return number +function TransformConstraint:getMixScaleX() end + +---@return number +function TransformConstraint:getMixScaleY() end + +---@return number +function TransformConstraint:getMixShearY() end + +---@return number +function TransformConstraint:getMixX() end + +---@return number +function TransformConstraint:getMixY() end + +---@return integer +function TransformConstraint:getOrder() end + +---@return spine.Bone +function TransformConstraint:getTarget() end + +---@param data spine.TransformConstraintData +---@param skeleton spine.Skeleton +---@return spine.TransformConstraint +function TransformConstraint.new(data, skeleton) end + +---@param inValue number +function TransformConstraint:setMixRotate(inValue) end + +---@param inValue number +function TransformConstraint:setMixScaleX(inValue) end + +---@param inValue number +function TransformConstraint:setMixScaleY(inValue) end + +---@param inValue number +function TransformConstraint:setMixShearY(inValue) end + +---@param inValue number +function TransformConstraint:setMixX(inValue) end + +---@param inValue number +function TransformConstraint:setMixY(inValue) end + +---@param inValue spine.Bone +function TransformConstraint:setTarget(inValue) end + +function TransformConstraint:setToSetupPose() end + +return TransformConstraint \ No newline at end of file diff --git a/addons/cclua/spine/library/spine/TransformConstraintData.lua b/addons/cclua/spine/library/spine/TransformConstraintData.lua new file mode 100644 index 00000000..ba136c42 --- /dev/null +++ b/addons/cclua/spine/library/spine/TransformConstraintData.lua @@ -0,0 +1,121 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta spine.TransformConstraintData + +--- +---@class spine.TransformConstraintData : spine.ConstraintData +---@field bones any +---@field local boolean +---@field mixRotate number +---@field mixScaleX number +---@field mixScaleY number +---@field mixShearY number +---@field mixX number +---@field mixY number +---@field offsetRotation number +---@field offsetScaleX number +---@field offsetScaleY number +---@field offsetShearY number +---@field offsetX number +---@field offsetY number +---@field relative boolean +---@field target spine.BoneData +local TransformConstraintData = {} + +---@return any +function TransformConstraintData:getBones() end + +---@return number +function TransformConstraintData:getMixRotate() end + +---@return number +function TransformConstraintData:getMixScaleX() end + +---@return number +function TransformConstraintData:getMixScaleY() end + +---@return number +function TransformConstraintData:getMixShearY() end + +---@return number +function TransformConstraintData:getMixX() end + +---@return number +function TransformConstraintData:getMixY() end + +---@return number +function TransformConstraintData:getOffsetRotation() end + +---@return number +function TransformConstraintData:getOffsetScaleX() end + +---@return number +function TransformConstraintData:getOffsetScaleY() end + +---@return number +function TransformConstraintData:getOffsetShearY() end + +---@return number +function TransformConstraintData:getOffsetX() end + +---@return number +function TransformConstraintData:getOffsetY() end + +---@return spine.BoneData +function TransformConstraintData:getTarget() end + +---@return boolean +function TransformConstraintData:isLocal() end + +---@return boolean +function TransformConstraintData:isRelative() end + +---@param name any +---@return spine.TransformConstraintData +function TransformConstraintData.new(name) end + +---@param isLocal boolean +function TransformConstraintData:setLocal(isLocal) end + +---@param mixRotate number +function TransformConstraintData:setMixRotate(mixRotate) end + +---@param mixScaleX number +function TransformConstraintData:setMixScaleX(mixScaleX) end + +---@param mixScaleY number +function TransformConstraintData:setMixScaleY(mixScaleY) end + +---@param mixShearY number +function TransformConstraintData:setMixShearY(mixShearY) end + +---@param mixX number +function TransformConstraintData:setMixX(mixX) end + +---@param mixY number +function TransformConstraintData:setMixY(mixY) end + +---@param offsetRotation number +function TransformConstraintData:setOffsetRotation(offsetRotation) end + +---@param offsetScaleX number +function TransformConstraintData:setOffsetScaleX(offsetScaleX) end + +---@param offsetScaleY number +function TransformConstraintData:setOffsetScaleY(offsetScaleY) end + +---@param offsetShearY number +function TransformConstraintData:setOffsetShearY(offsetShearY) end + +---@param offsetX number +function TransformConstraintData:setOffsetX(offsetX) end + +---@param offsetY number +function TransformConstraintData:setOffsetY(offsetY) end + +---@param isRelative boolean +function TransformConstraintData:setRelative(isRelative) end + +---@param target spine.BoneData +function TransformConstraintData:setTarget(target) end + +return TransformConstraintData \ No newline at end of file diff --git a/addons/cclua/spine/library/spine/TransformConstraintTimeline.lua b/addons/cclua/spine/library/spine/TransformConstraintTimeline.lua new file mode 100644 index 00000000..6f39da2e --- /dev/null +++ b/addons/cclua/spine/library/spine/TransformConstraintTimeline.lua @@ -0,0 +1,21 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta spine.TransformConstraintTimeline + +--- +---@class spine.TransformConstraintTimeline : spine.CurveTimeline +---@field transformConstraintIndex integer +local TransformConstraintTimeline = {} + +---@return integer +function TransformConstraintTimeline:getTransformConstraintIndex() end + +---@param frameCount integer +---@param bezierCount integer +---@param transformConstraintIndex integer +---@return spine.TransformConstraintTimeline +function TransformConstraintTimeline.new(frameCount, bezierCount, transformConstraintIndex) end + +---@param inValue integer +function TransformConstraintTimeline:setTransformConstraintIndex(inValue) end + +return TransformConstraintTimeline \ No newline at end of file diff --git a/addons/cclua/spine/library/spine/TranslateTimeline.lua b/addons/cclua/spine/library/spine/TranslateTimeline.lua new file mode 100644 index 00000000..909a8f71 --- /dev/null +++ b/addons/cclua/spine/library/spine/TranslateTimeline.lua @@ -0,0 +1,21 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta spine.TranslateTimeline + +--- +---@class spine.TranslateTimeline : spine.CurveTimeline2 +---@field boneIndex integer +local TranslateTimeline = {} + +---@return integer +function TranslateTimeline:getBoneIndex() end + +---@param frameCount integer +---@param bezierCount integer +---@param boneIndex integer +---@return spine.TranslateTimeline +function TranslateTimeline.new(frameCount, bezierCount, boneIndex) end + +---@param inValue integer +function TranslateTimeline:setBoneIndex(inValue) end + +return TranslateTimeline \ No newline at end of file diff --git a/addons/cclua/spine/library/spine/TranslateXTimeline.lua b/addons/cclua/spine/library/spine/TranslateXTimeline.lua new file mode 100644 index 00000000..3b2ad843 --- /dev/null +++ b/addons/cclua/spine/library/spine/TranslateXTimeline.lua @@ -0,0 +1,21 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta spine.TranslateXTimeline + +--- +---@class spine.TranslateXTimeline : spine.CurveTimeline1 +---@field boneIndex integer +local TranslateXTimeline = {} + +---@return integer +function TranslateXTimeline:getBoneIndex() end + +---@param frameCount integer +---@param bezierCount integer +---@param boneIndex integer +---@return spine.TranslateXTimeline +function TranslateXTimeline.new(frameCount, bezierCount, boneIndex) end + +---@param inValue integer +function TranslateXTimeline:setBoneIndex(inValue) end + +return TranslateXTimeline \ No newline at end of file diff --git a/addons/cclua/spine/library/spine/TranslateYTimeline.lua b/addons/cclua/spine/library/spine/TranslateYTimeline.lua new file mode 100644 index 00000000..9fc18cae --- /dev/null +++ b/addons/cclua/spine/library/spine/TranslateYTimeline.lua @@ -0,0 +1,21 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta spine.TranslateYTimeline + +--- +---@class spine.TranslateYTimeline : spine.CurveTimeline1 +---@field boneIndex integer +local TranslateYTimeline = {} + +---@return integer +function TranslateYTimeline:getBoneIndex() end + +---@param frameCount integer +---@param bezierCount integer +---@param boneIndex integer +---@return spine.TranslateYTimeline +function TranslateYTimeline.new(frameCount, bezierCount, boneIndex) end + +---@param inValue integer +function TranslateYTimeline:setBoneIndex(inValue) end + +return TranslateYTimeline \ No newline at end of file diff --git a/addons/cclua/spine/library/spine/Updatable.lua b/addons/cclua/spine/library/spine/Updatable.lua new file mode 100644 index 00000000..726c17bb --- /dev/null +++ b/addons/cclua/spine/library/spine/Updatable.lua @@ -0,0 +1,18 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta spine.Updatable + +--- +---@class spine.Updatable : spine.SpineObject +---@field active boolean +local Updatable = {} + +---@return boolean +function Updatable:isActive() end + +---@param inValue boolean +function Updatable:setActive(inValue) end + +---@param physics spine.Physics +function Updatable:update(physics) end + +return Updatable \ No newline at end of file diff --git a/addons/cclua/spine/library/spine/UpdateWorldTransformsListener.lua b/addons/cclua/spine/library/spine/UpdateWorldTransformsListener.lua new file mode 100644 index 00000000..b36dc63c --- /dev/null +++ b/addons/cclua/spine/library/spine/UpdateWorldTransformsListener.lua @@ -0,0 +1,14 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta spine.UpdateWorldTransformsListener + +--- +--- +---std::function +---@class spine.UpdateWorldTransformsListener +local UpdateWorldTransformsListener = {} + +---@return spine.UpdateWorldTransformsListener + +function UpdateWorldTransformsListener:__call() end + +return UpdateWorldTransformsListener \ No newline at end of file diff --git a/addons/cclua/spine/library/spine/VertexAttachment.lua b/addons/cclua/spine/library/spine/VertexAttachment.lua new file mode 100644 index 00000000..a8c9f5df --- /dev/null +++ b/addons/cclua/spine/library/spine/VertexAttachment.lua @@ -0,0 +1,61 @@ +---AUTO GENERATED, DO NOT MODIFY! +---@meta spine.VertexAttachment + +---An attachment with vertices that are transformed by one or more bones and can be deformed by a slot's vertices. +---@class spine.VertexAttachment : spine.Attachment +---@field bones any +---@field id integer Gets a unique ID for this attachment. +---@field timelineAttachment spine.Attachment +---@field vertices any +---@field worldVerticesLength integer +local VertexAttachment = {} + +---@param slot spine.Slot +---@param worldVertices olua.float +---@overload fun(self: spine.VertexAttachment, slot: spine.Slot, worldVertices: any) +--- +---Transforms local vertices to world coordinates. +---\param start The index of the first Vertices value to transform. Each vertex has 2 values, x and y. +---\param count The number of world vertex values to output. Must be less than or equal to WorldVerticesLength - start. +---\param worldVertices The output world vertices. Must have a length greater than or equal to offset + count. +---\param offset The worldVertices index to begin writing values. +---\param stride The number of worldVertices entries between the value pairs written. +---@overload fun(self: spine.VertexAttachment, slot: spine.Slot, start: integer, count: integer, worldVertices: olua.float, offset: integer, stride: integer) +--- +---Transforms local vertices to world coordinates. +---\param start The index of the first Vertices value to transform. Each vertex has 2 values, x and y. +---\param count The number of world vertex values to output. Must be less than or equal to WorldVerticesLength - start. +---\param worldVertices The output world vertices. Must have a length greater than or equal to offset + count. +---\param offset The worldVertices index to begin writing values. +---\param stride The number of worldVertices entries between the value pairs written. +---@overload fun(self: spine.VertexAttachment, slot: spine.Slot, start: integer, count: integer, worldVertices: olua.float, offset: integer) +---@overload fun(self: spine.VertexAttachment, slot: spine.Slot, start: integer, count: integer, worldVertices: any, offset: integer, stride: integer) +---@overload fun(self: spine.VertexAttachment, slot: spine.Slot, start: integer, count: integer, worldVertices: any, offset: integer) +function VertexAttachment:computeWorldVertices(slot, worldVertices) end + +---@param other spine.VertexAttachment +function VertexAttachment:copyTo(other) end + +---@return any +function VertexAttachment:getBones() end + +---Gets a unique ID for this attachment. +---@return integer +function VertexAttachment:getId() end + +---@return spine.Attachment +function VertexAttachment:getTimelineAttachment() end + +---@return any +function VertexAttachment:getVertices() end + +---@return integer +function VertexAttachment:getWorldVerticesLength() end + +---@param attachment spine.Attachment +function VertexAttachment:setTimelineAttachment(attachment) end + +---@param inValue integer +function VertexAttachment:setWorldVerticesLength(inValue) end + +return VertexAttachment \ No newline at end of file diff --git a/assets/src/cclua/ui/AbsoluteLayout.lua b/assets/src/cclua/ui/AbsoluteLayout.lua index f6b17dd8..6ba0d0b7 100644 --- a/assets/src/cclua/ui/AbsoluteLayout.lua +++ b/assets/src/cclua/ui/AbsoluteLayout.lua @@ -2,6 +2,7 @@ local class = require "cclua.class" local Align = require "cclua.ui.Align" local LayoutBase = require "cclua.ui.LayoutBase" +---@class AbsoluteLayout : LayoutBase local AbsoluteLayout = class("AbsoluteLayout", LayoutBase) function AbsoluteLayout:doLayout() diff --git a/assets/src/cclua/ui/FGUINode.lua b/assets/src/cclua/ui/FGUINode.lua index 5b2d3c24..5c0e7cd8 100644 --- a/assets/src/cclua/ui/FGUINode.lua +++ b/assets/src/cclua/ui/FGUINode.lua @@ -17,7 +17,7 @@ end function FGUINode.Get:cobj() local width, height = window.getVisibleSize() - local cobj = Scene.createWithSize(Size{width = width, height = height}) + local cobj = Scene.createWithSize(Size.new(width, height)) rawset(self, 'cobj', cobj) return cobj end diff --git a/assets/src/cclua/ui/LayoutBase.lua b/assets/src/cclua/ui/LayoutBase.lua index 6c86614c..aece17b5 100644 --- a/assets/src/cclua/ui/LayoutBase.lua +++ b/assets/src/cclua/ui/LayoutBase.lua @@ -2,6 +2,7 @@ local class = require "cclua.class" local Event = require "cclua.Event" local layouter = require "cclua.ui.layouter" +---@class LayoutBase local LayoutBase = class("LayoutBase") function LayoutBase:ctor() diff --git a/assets/src/cclua/ui/UIScene.lua b/assets/src/cclua/ui/UIScene.lua index 88047c5f..5c2d6714 100644 --- a/assets/src/cclua/ui/UIScene.lua +++ b/assets/src/cclua/ui/UIScene.lua @@ -17,7 +17,7 @@ end function UIScene.Get:cobj() local width, height = window.getVisibleSize() - local cobj = Scene.createWithSize(Size{width = width, height = height}) + local cobj = Scene.createWithSize(Size.new(width, height)) rawset(self, 'cobj', cobj) return cobj end diff --git a/assets/src/cclua/ui/UITextField.lua b/assets/src/cclua/ui/UITextField.lua index 8fe46bc4..69b9af98 100644 --- a/assets/src/cclua/ui/UITextField.lua +++ b/assets/src/cclua/ui/UITextField.lua @@ -3,6 +3,7 @@ local font = require "cclua.font" local Align = require "cclua.ui.Align" local UIView = require "cclua.ui.UIView" local Label = require "cc.Label" +local Size = require "cc.Size" local TTFConfig = require "cc.TTFConfig" local GlyphCollection = require "cc.GlyphCollection" @@ -53,7 +54,7 @@ function UITextField:enableShadow(color, offsetX, offsetY, blurRadius) offsetX = offsetX or 2 offsetY = offsetY or -2 blurRadius = blurRadius or 0 - self.cobj:enableShadow(color, {width = offsetX, height = offsetY}, blurRadius) + self.cobj:enableShadow(color, Size.new(offsetX, offsetY), blurRadius) end function UITextField.Get:width(value) diff --git a/assets/src/cclua/ui/UITextInput.lua b/assets/src/cclua/ui/UITextInput.lua index f9b64d5e..97552cc9 100644 --- a/assets/src/cclua/ui/UITextInput.lua +++ b/assets/src/cclua/ui/UITextInput.lua @@ -6,6 +6,7 @@ local Layout = require "ccui.Layout" local EditBox = require "ccui.EditBox" local Scale9Sprite = require "ccui.Scale9Sprite" local EditBoxDelegate = require "ccui.LuaEditBoxDelegate" +local Size = require "cc.Size" local UITextInput = class("UITextInput", UIView) @@ -30,8 +31,7 @@ function UITextInput.Get:cobj() cobj.touchEnabled = false rawset(self, "cobj", cobj) - local label = EditBox.create({width = 10, height = 10}, - Scale9Sprite.create(), nil, nil) + local label = EditBox.create(Size.new(10, 10), Scale9Sprite.create(), nil, nil) label.touchEnabled = false label.ignoreAnchorPointForPosition = true cobj:addChild(label, 0) diff --git a/assets/src/cclua/ui/dataloader.lua b/assets/src/cclua/ui/dataloader.lua index 901f11de..a2349f3e 100644 --- a/assets/src/cclua/ui/dataloader.lua +++ b/assets/src/cclua/ui/dataloader.lua @@ -1,6 +1,7 @@ -local font = require "cclua.font" -local Align = require "cclua.ui.Align" -local TouchStyle = require "cclua.ui.TouchStyle" +local olua = require "olua.c" +local font = require "cclua.font" +local Align = require "cclua.ui.Align" +local TouchStyle = require "cclua.ui.TouchStyle" local assert = assert diff --git a/assets/src/init.lua b/assets/src/init.lua index ed4e831a..7a644ebe 100644 --- a/assets/src/init.lua +++ b/assets/src/init.lua @@ -2,7 +2,7 @@ local window = require "cclua.window" local runtime = require "cclua.runtime" local timer = require "cclua.timer" local Director = require "cc.Director" -local olua = require "olua" +local olua = require "olua.c" olua.debug(DEBUG) diff --git a/assets/src/main.lua b/assets/src/main.lua index 29e9d2a9..78c68ad8 100755 --- a/assets/src/main.lua +++ b/assets/src/main.lua @@ -6,6 +6,6 @@ function main() local Console = require('system.console.Console') cclua.stage:addChild(Console.new()) - cclua.startScene('test.SpineTest') - -- cclua.startScene('test.FGUITest') + -- cclua.startScene('test.SpineTest') + cclua.startScene('test.FGUITest') end \ No newline at end of file diff --git a/assets/src/test/SpineTest.lua b/assets/src/test/SpineTest.lua index f3bcd7a9..d453f672 100644 --- a/assets/src/test/SpineTest.lua +++ b/assets/src/test/SpineTest.lua @@ -7,7 +7,7 @@ local SkeletonAnimation = require "spine.SkeletonAnimation" local SkeletonData = require "spine.SkeletonData" function SpineTest:ctor() - local data = SkeletonData.new("res/spine/raptor-pro.skel", "res/spine/raptor-pro.atlas", 0.4) + local data = SkeletonData.create("res/spine/raptor-pro.skel", "res/spine/raptor-pro.atlas", 0.4) local animation = SkeletonAnimation.createWithData(data) animation.x = 500 animation.y = 100 diff --git a/cocos-lua.code-workspace b/cocos-lua.code-workspace index ce4ae15c..34b9b5a8 100644 --- a/cocos-lua.code-workspace +++ b/cocos-lua.code-workspace @@ -22,6 +22,7 @@ "631", // Line is too long ], "editor.snippetSuggestions": "bottom", + "Lua.workspace.library": ["tools/lua-bindings/olua/addons"], "files.associations": { "*.manifest": "json", "*.jsfl": "javascript", diff --git a/frameworks/cclua/src/box2d/box2d-2dx.h b/frameworks/cclua/src/box2d/box2d-2dx.h index 5d385141..fa8cf03e 100644 --- a/frameworks/cclua/src/box2d/box2d-2dx.h +++ b/frameworks/cclua/src/box2d/box2d-2dx.h @@ -12,7 +12,7 @@ NS_BOX2D_BEGIN -typedef olua::pointer Vec2Array; +typedef olua::value_ptr Vec2Array; class DestructionListener : public b2DestructionListener { diff --git a/frameworks/cclua/src/bugly/lua_bugly.cpp b/frameworks/cclua/src/bugly/lua_bugly.cpp index 3fc25316..65bc95f9 100644 --- a/frameworks/cclua/src/bugly/lua_bugly.cpp +++ b/frameworks/cclua/src/bugly/lua_bugly.cpp @@ -1,5 +1,5 @@ // -// AUTO BUILD, DON'T MODIFY! +// AUTO GENERATED, DO NOT MODIFY! // #include "lua_bugly.h" #include "lua-bindings/lua_cocos2d_types.h" @@ -7,8 +7,7 @@ #include "bugly/CrashReport.h" #ifdef CCLUA_BUILD_BUGLY -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cclua_bugly_LogLevel(lua_State *L) +static int _olua_cls_cclua_bugly_LogLevel(lua_State *L) { oluacls_class(L, "cclua.bugly.LogLevel"); oluacls_func(L, "__index", olua_indexerror); @@ -22,11 +21,21 @@ OLUA_LIB int luaopen_cclua_bugly_LogLevel(lua_State *L) return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cclua_bugly_LogLevel(lua_State *L) +{ + olua_require(L, "bugly", luaopen_bugly); + if (!olua_getclass(L, "cclua.bugly.LogLevel")) { + luaL_error(L, "class not found: cclua::bugly::LogLevel"); + } + return 1; +} OLUA_END_DECLS #endif #ifdef CCLUA_BUILD_BUGLY -static int _cclua_bugly___gc(lua_State *L) +static int _olua_fun_cclua_bugly___gc(lua_State *L) { olua_startinvoke(L); @@ -38,7 +47,7 @@ static int _cclua_bugly___gc(lua_State *L) return 0; } -static int _cclua_bugly___olua_move(lua_State *L) +static int _olua_fun_cclua_bugly___olua_move(lua_State *L) { olua_startinvoke(L); @@ -50,7 +59,7 @@ static int _cclua_bugly___olua_move(lua_State *L) return 1; } -static int _cclua_bugly_init(lua_State *L) +static int _olua_fun_cclua_bugly_init(lua_State *L) { olua_startinvoke(L); @@ -66,7 +75,7 @@ static int _cclua_bugly_init(lua_State *L) return 0; } -static int _cclua_bugly_log(lua_State *L) +static int _olua_fun_cclua_bugly_log(lua_State *L) { olua_startinvoke(L); @@ -84,7 +93,7 @@ static int _cclua_bugly_log(lua_State *L) return 0; } -static int _cclua_bugly_reportException(lua_State *L) +static int _olua_fun_cclua_bugly_reportException(lua_State *L) { olua_startinvoke(L); @@ -102,7 +111,7 @@ static int _cclua_bugly_reportException(lua_State *L) return 0; } -static int _cclua_bugly_setChannel(lua_State *L) +static int _olua_fun_cclua_bugly_setChannel(lua_State *L) { olua_startinvoke(L); @@ -118,7 +127,7 @@ static int _cclua_bugly_setChannel(lua_State *L) return 0; } -static int _cclua_bugly_setTag(lua_State *L) +static int _olua_fun_cclua_bugly_setTag(lua_State *L) { olua_startinvoke(L); @@ -134,7 +143,7 @@ static int _cclua_bugly_setTag(lua_State *L) return 0; } -static int _cclua_bugly_setUid(lua_State *L) +static int _olua_fun_cclua_bugly_setUid(lua_State *L) { olua_startinvoke(L); @@ -150,7 +159,7 @@ static int _cclua_bugly_setUid(lua_State *L) return 0; } -static int _cclua_bugly_setUserValue(lua_State *L) +static int _olua_fun_cclua_bugly_setUserValue(lua_State *L) { olua_startinvoke(L); @@ -168,7 +177,7 @@ static int _cclua_bugly_setUserValue(lua_State *L) return 0; } -static int _cclua_bugly_setVersion(lua_State *L) +static int _olua_fun_cclua_bugly_setVersion(lua_State *L) { olua_startinvoke(L); @@ -184,25 +193,34 @@ static int _cclua_bugly_setVersion(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cclua_bugly(lua_State *L) +static int _olua_cls_cclua_bugly(lua_State *L) { oluacls_class(L, "cclua.bugly"); - oluacls_func(L, "__gc", _cclua_bugly___gc); - oluacls_func(L, "__olua_move", _cclua_bugly___olua_move); - oluacls_func(L, "init", _cclua_bugly_init); - oluacls_func(L, "log", _cclua_bugly_log); - oluacls_func(L, "reportException", _cclua_bugly_reportException); - oluacls_func(L, "setChannel", _cclua_bugly_setChannel); - oluacls_func(L, "setTag", _cclua_bugly_setTag); - oluacls_func(L, "setUid", _cclua_bugly_setUid); - oluacls_func(L, "setUserValue", _cclua_bugly_setUserValue); - oluacls_func(L, "setVersion", _cclua_bugly_setVersion); + oluacls_func(L, "__gc", _olua_fun_cclua_bugly___gc); + oluacls_func(L, "__olua_move", _olua_fun_cclua_bugly___olua_move); + oluacls_func(L, "init", _olua_fun_cclua_bugly_init); + oluacls_func(L, "log", _olua_fun_cclua_bugly_log); + oluacls_func(L, "reportException", _olua_fun_cclua_bugly_reportException); + oluacls_func(L, "setChannel", _olua_fun_cclua_bugly_setChannel); + oluacls_func(L, "setTag", _olua_fun_cclua_bugly_setTag); + oluacls_func(L, "setUid", _olua_fun_cclua_bugly_setUid); + oluacls_func(L, "setUserValue", _olua_fun_cclua_bugly_setUserValue); + oluacls_func(L, "setVersion", _olua_fun_cclua_bugly_setVersion); cclua::runtime::registerFeature("cclua.bugly", true); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cclua_bugly(lua_State *L) +{ + olua_require(L, "bugly", luaopen_bugly); + if (!olua_getclass(L, "cclua.bugly")) { + luaL_error(L, "class not found: cclua::bugly"); + } + return 1; +} OLUA_END_DECLS #endif @@ -210,8 +228,8 @@ OLUA_BEGIN_DECLS OLUA_LIB int luaopen_bugly(lua_State *L) { #ifdef CCLUA_BUILD_BUGLY - olua_require(L, "cclua.bugly.LogLevel", luaopen_cclua_bugly_LogLevel); - olua_require(L, "cclua.bugly", luaopen_cclua_bugly); + olua_require(L, "cclua.bugly.LogLevel", _olua_cls_cclua_bugly_LogLevel); + olua_require(L, "cclua.bugly", _olua_cls_cclua_bugly); #endif return 0; diff --git a/frameworks/cclua/src/bugly/lua_bugly.h b/frameworks/cclua/src/bugly/lua_bugly.h index b1a06adc..b230b5fb 100644 --- a/frameworks/cclua/src/bugly/lua_bugly.h +++ b/frameworks/cclua/src/bugly/lua_bugly.h @@ -1,5 +1,5 @@ // -// AUTO BUILD, DON'T MODIFY! +// AUTO GENERATED, DO NOT MODIFY! // #ifndef __AUTO_GEN_LUA_BUGLY_H__ #define __AUTO_GEN_LUA_BUGLY_H__ diff --git a/frameworks/cclua/src/cclua/cclua-extend.cpp b/frameworks/cclua/src/cclua/cclua-extend.cpp index 444bf7c4..2f08b2df 100644 --- a/frameworks/cclua/src/cclua/cclua-extend.cpp +++ b/frameworks/cclua/src/cclua/cclua-extend.cpp @@ -515,11 +515,19 @@ olua_Return cocos2d::RectExtend::__call(lua_State *L) rect.size.width = (float)olua_checkfieldnumber(L, 2, "width"); rect.size.height = (float)olua_checkfieldnumber(L, 2, "height"); - olua_pushcopy_object(L, rect, olua_getluatype(L)); + olua_copy_object(L, rect, olua_getluatype(L)); return 1; } +void cocos2d::RenderTextureExtend::beginVisit(cocos2d::RenderTexture *rt) { + rt->begin(); +} + +void cocos2d::RenderTextureExtend::endVisit(cocos2d::RenderTexture *rt) { + rt->end(); +} + #ifdef CCLUA_BUILD_SPINE using namespace spine; @@ -551,6 +559,11 @@ olua_Return SkeletonDataExtend::__gc(lua_State *L) return 0; } +olua_Return SkeletonDataExtend::dispose(lua_State *L) +{ + return SkeletonDataExtend::__gc(L); +} + olua_Return SkeletonDataExtend::create(lua_State *L, const char *skel_path, const char *atlas_path, float scale) { auto texture_loader = new spine::Cocos2dTextureLoader(); diff --git a/frameworks/cclua/src/cclua/cclua-extend.h b/frameworks/cclua/src/cclua/cclua-extend.h index 1b2ce643..7836a350 100644 --- a/frameworks/cclua/src/cclua/cclua-extend.h +++ b/frameworks/cclua/src/cclua/cclua-extend.h @@ -12,11 +12,11 @@ NS_CC_BEGIN namespace types { -typedef olua::pointer> VectorString; -typedef olua::pointer> VectorInt; -typedef olua::pointer ValueMap; -typedef olua::pointer TMXTileFlags; -typedef olua::pointer Vec2Array; +typedef olua::value_ptr> VectorString; +typedef olua::value_ptr> VectorInt; +typedef olua::value_ptr ValueMap; +typedef olua::value_ptr TMXTileFlags; +typedef olua::value_ptr Vec2Array; } struct Bounds { @@ -282,6 +282,12 @@ class RectExtend { static olua_Return __call(lua_State *L); }; +class RenderTextureExtend { +public: + static void beginVisit(cocos2d::RenderTexture *rt); + static void endVisit(cocos2d::RenderTexture *rt); +}; + NS_CC_END #ifdef CCLUA_BUILD_SPINE @@ -292,6 +298,7 @@ namespace spine { class SkeletonDataExtend { public: static olua_Return __gc(lua_State *L); + static olua_Return dispose(lua_State *L); static olua_Return create(lua_State *L, const char *skelPath, const char *atlasPath, float scale = 1.0f); }; @@ -303,7 +310,7 @@ class SkeletonDataExtend { NS_FGUI_BEGIN -typedef olua::pointer> VectorTreeNode; +typedef olua::value_ptr> VectorTreeNode; class UISource : public IUISource { public: diff --git a/frameworks/cclua/src/lua-bindings/lua_box2d.cpp b/frameworks/cclua/src/lua-bindings/lua_box2d.cpp index 08014a32..a236ece6 100644 --- a/frameworks/cclua/src/lua-bindings/lua_box2d.cpp +++ b/frameworks/cclua/src/lua-bindings/lua_box2d.cpp @@ -1,5 +1,5 @@ // -// AUTO BUILD, DON'T MODIFY! +// AUTO GENERATED, DO NOT MODIFY! // #include "lua_box2d.h" #include "lua-bindings/lua_cocos2d_types.h" @@ -7,35 +7,7 @@ #include "box2d/box2d.h" #include "box2d/box2d-2dx.h" -static int _b2Vec2___call(lua_State *L) -{ - olua_startinvoke(L); - - b2Vec2 ret; - - luaL_checktype(L, 2, LUA_TTABLE); - - float arg1 = 0; /** x */ - float arg2 = 0; /** y */ - - olua_getfield(L, 2, "x"); - olua_check_number(L, -1, &arg1); - ret.x = arg1; - lua_pop(L, 1); - - olua_getfield(L, 2, "y"); - olua_check_number(L, -1, &arg2); - ret.y = arg2; - lua_pop(L, 1); - - olua_pushcopy_object(L, ret, "b2.Vec2"); - - olua_endinvoke(L); - - return 1; -} - -static int _b2Vec2___gc(lua_State *L) +static int _olua_fun_b2Vec2___gc(lua_State *L) { olua_startinvoke(L); @@ -47,7 +19,7 @@ static int _b2Vec2___gc(lua_State *L) return 0; } -static int _b2Vec2___olua_move(lua_State *L) +static int _olua_fun_b2Vec2___olua_move(lua_State *L) { olua_startinvoke(L); @@ -59,7 +31,7 @@ static int _b2Vec2___olua_move(lua_State *L) return 1; } -static int _b2Vec2_IsValid(lua_State *L) +static int _olua_fun_b2Vec2_isValid(lua_State *L) { olua_startinvoke(L); @@ -76,7 +48,7 @@ static int _b2Vec2_IsValid(lua_State *L) return num_ret; } -static int _b2Vec2_Length(lua_State *L) +static int _olua_fun_b2Vec2_length(lua_State *L) { olua_startinvoke(L); @@ -93,7 +65,7 @@ static int _b2Vec2_Length(lua_State *L) return num_ret; } -static int _b2Vec2_LengthSquared(lua_State *L) +static int _olua_fun_b2Vec2_lengthSquared(lua_State *L) { olua_startinvoke(L); @@ -110,7 +82,7 @@ static int _b2Vec2_LengthSquared(lua_State *L) return num_ret; } -static int _b2Vec2_new$1(lua_State *L) +static int _olua_fun_b2Vec2_new$1(lua_State *L) { olua_startinvoke(L); @@ -124,7 +96,7 @@ static int _b2Vec2_new$1(lua_State *L) return num_ret; } -static int _b2Vec2_new$2(lua_State *L) +static int _olua_fun_b2Vec2_new$2(lua_State *L) { olua_startinvoke(L); @@ -144,19 +116,19 @@ static int _b2Vec2_new$2(lua_State *L) return num_ret; } -static int _b2Vec2_new(lua_State *L) +static int _olua_fun_b2Vec2_new(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 0) { // b2Vec2() - return _b2Vec2_new$1(L); + return _olua_fun_b2Vec2_new$1(L); } if (num_args == 2) { // if ((olua_is_number(L, 1)) && (olua_is_number(L, 2))) { // b2Vec2(float xIn, float yIn) - return _b2Vec2_new$2(L); + return _olua_fun_b2Vec2_new$2(L); // } } @@ -165,7 +137,7 @@ static int _b2Vec2_new(lua_State *L) return 0; } -static int _b2Vec2_Normalize(lua_State *L) +static int _olua_fun_b2Vec2_normalize(lua_State *L) { olua_startinvoke(L); @@ -182,7 +154,7 @@ static int _b2Vec2_Normalize(lua_State *L) return num_ret; } -static int _b2Vec2_Set(lua_State *L) +static int _olua_fun_b2Vec2_set(lua_State *L) { olua_startinvoke(L); @@ -202,7 +174,7 @@ static int _b2Vec2_Set(lua_State *L) return 0; } -static int _b2Vec2_SetZero(lua_State *L) +static int _olua_fun_b2Vec2_setZero(lua_State *L) { olua_startinvoke(L); @@ -218,7 +190,7 @@ static int _b2Vec2_SetZero(lua_State *L) return 0; } -static int _b2Vec2_Skew(lua_State *L) +static int _olua_fun_b2Vec2_skew(lua_State *L) { olua_startinvoke(L); @@ -228,14 +200,14 @@ static int _b2Vec2_Skew(lua_State *L) // b2Vec2 Skew() b2Vec2 ret = self->Skew(); - int num_ret = olua_pushcopy_object(L, ret, "b2.Vec2"); + int num_ret = olua_copy_object(L, ret, "b2.Vec2"); olua_endinvoke(L); return num_ret; } -static int _b2Vec2_get_x(lua_State *L) +static int _olua_fun_b2Vec2_x$1(lua_State *L) { olua_startinvoke(L); @@ -252,7 +224,7 @@ static int _b2Vec2_get_x(lua_State *L) return num_ret; } -static int _b2Vec2_set_x(lua_State *L) +static int _olua_fun_b2Vec2_x$2(lua_State *L) { olua_startinvoke(L); @@ -270,7 +242,28 @@ static int _b2Vec2_set_x(lua_State *L) return 0; } -static int _b2Vec2_get_y(lua_State *L) +static int _olua_fun_b2Vec2_x(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float x + return _olua_fun_b2Vec2_x$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float x + return _olua_fun_b2Vec2_x$2(L); + // } + } + + luaL_error(L, "method 'b2Vec2::x' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_b2Vec2_y$1(lua_State *L) { olua_startinvoke(L); @@ -287,7 +280,7 @@ static int _b2Vec2_get_y(lua_State *L) return num_ret; } -static int _b2Vec2_set_y(lua_State *L) +static int _olua_fun_b2Vec2_y$2(lua_State *L) { olua_startinvoke(L); @@ -305,64 +298,59 @@ static int _b2Vec2_set_y(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_b2Vec2(lua_State *L) -{ - oluacls_class(L, "b2.Vec2"); - oluacls_func(L, "__call", _b2Vec2___call); - oluacls_func(L, "__gc", _b2Vec2___gc); - oluacls_func(L, "__olua_move", _b2Vec2___olua_move); - oluacls_func(L, "isValid", _b2Vec2_IsValid); - oluacls_func(L, "length", _b2Vec2_Length); - oluacls_func(L, "lengthSquared", _b2Vec2_LengthSquared); - oluacls_func(L, "new", _b2Vec2_new); - oluacls_func(L, "normalize", _b2Vec2_Normalize); - oluacls_func(L, "set", _b2Vec2_Set); - oluacls_func(L, "setZero", _b2Vec2_SetZero); - oluacls_func(L, "skew", _b2Vec2_Skew); - oluacls_prop(L, "valid", _b2Vec2_IsValid, nullptr); - oluacls_prop(L, "x", _b2Vec2_get_x, _b2Vec2_set_x); - oluacls_prop(L, "y", _b2Vec2_get_y, _b2Vec2_set_y); - - return 1; -} -OLUA_END_DECLS - -static int _b2Vec3___call(lua_State *L) +static int _olua_fun_b2Vec2_y(lua_State *L) { - olua_startinvoke(L); - - b2Vec3 ret; - - luaL_checktype(L, 2, LUA_TTABLE); + int num_args = lua_gettop(L) - 1; - float arg1 = 0; /** x */ - float arg2 = 0; /** y */ - float arg3 = 0; /** z */ + if (num_args == 0) { + // float y + return _olua_fun_b2Vec2_y$1(L); + } - olua_getfield(L, 2, "x"); - olua_check_number(L, -1, &arg1); - ret.x = arg1; - lua_pop(L, 1); + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float y + return _olua_fun_b2Vec2_y$2(L); + // } + } - olua_getfield(L, 2, "y"); - olua_check_number(L, -1, &arg2); - ret.y = arg2; - lua_pop(L, 1); + luaL_error(L, "method 'b2Vec2::y' not support '%d' arguments", num_args); - olua_getfield(L, 2, "z"); - olua_check_number(L, -1, &arg3); - ret.z = arg3; - lua_pop(L, 1); + return 0; +} - olua_pushcopy_object(L, ret, "b2.Vec3"); +static int _olua_cls_b2_Vec2(lua_State *L) +{ + oluacls_class(L, "b2.Vec2"); + oluacls_func(L, "__gc", _olua_fun_b2Vec2___gc); + oluacls_func(L, "__olua_move", _olua_fun_b2Vec2___olua_move); + oluacls_func(L, "isValid", _olua_fun_b2Vec2_isValid); + oluacls_func(L, "length", _olua_fun_b2Vec2_length); + oluacls_func(L, "lengthSquared", _olua_fun_b2Vec2_lengthSquared); + oluacls_func(L, "new", _olua_fun_b2Vec2_new); + oluacls_func(L, "normalize", _olua_fun_b2Vec2_normalize); + oluacls_func(L, "set", _olua_fun_b2Vec2_set); + oluacls_func(L, "setZero", _olua_fun_b2Vec2_setZero); + oluacls_func(L, "skew", _olua_fun_b2Vec2_skew); + oluacls_prop(L, "valid", _olua_fun_b2Vec2_isValid, nullptr); + oluacls_prop(L, "x", _olua_fun_b2Vec2_x, _olua_fun_b2Vec2_x); + oluacls_prop(L, "y", _olua_fun_b2Vec2_y, _olua_fun_b2Vec2_y); - olua_endinvoke(L); + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_b2_Vec2(lua_State *L) +{ + olua_require(L, "box2d", luaopen_box2d); + if (!olua_getclass(L, "b2.Vec2")) { + luaL_error(L, "class not found: b2Vec2"); + } return 1; } +OLUA_END_DECLS -static int _b2Vec3___gc(lua_State *L) +static int _olua_fun_b2Vec3___gc(lua_State *L) { olua_startinvoke(L); @@ -374,7 +362,7 @@ static int _b2Vec3___gc(lua_State *L) return 0; } -static int _b2Vec3___olua_move(lua_State *L) +static int _olua_fun_b2Vec3___olua_move(lua_State *L) { olua_startinvoke(L); @@ -386,7 +374,7 @@ static int _b2Vec3___olua_move(lua_State *L) return 1; } -static int _b2Vec3_new$1(lua_State *L) +static int _olua_fun_b2Vec3_new$1(lua_State *L) { olua_startinvoke(L); @@ -400,7 +388,7 @@ static int _b2Vec3_new$1(lua_State *L) return num_ret; } -static int _b2Vec3_new$2(lua_State *L) +static int _olua_fun_b2Vec3_new$2(lua_State *L) { olua_startinvoke(L); @@ -422,19 +410,19 @@ static int _b2Vec3_new$2(lua_State *L) return num_ret; } -static int _b2Vec3_new(lua_State *L) +static int _olua_fun_b2Vec3_new(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 0) { // b2Vec3() - return _b2Vec3_new$1(L); + return _olua_fun_b2Vec3_new$1(L); } if (num_args == 3) { // if ((olua_is_number(L, 1)) && (olua_is_number(L, 2)) && (olua_is_number(L, 3))) { // b2Vec3(float xIn, float yIn, float zIn) - return _b2Vec3_new$2(L); + return _olua_fun_b2Vec3_new$2(L); // } } @@ -443,7 +431,7 @@ static int _b2Vec3_new(lua_State *L) return 0; } -static int _b2Vec3_Set(lua_State *L) +static int _olua_fun_b2Vec3_set(lua_State *L) { olua_startinvoke(L); @@ -465,7 +453,7 @@ static int _b2Vec3_Set(lua_State *L) return 0; } -static int _b2Vec3_SetZero(lua_State *L) +static int _olua_fun_b2Vec3_setZero(lua_State *L) { olua_startinvoke(L); @@ -481,7 +469,7 @@ static int _b2Vec3_SetZero(lua_State *L) return 0; } -static int _b2Vec3_get_x(lua_State *L) +static int _olua_fun_b2Vec3_x$1(lua_State *L) { olua_startinvoke(L); @@ -498,7 +486,7 @@ static int _b2Vec3_get_x(lua_State *L) return num_ret; } -static int _b2Vec3_set_x(lua_State *L) +static int _olua_fun_b2Vec3_x$2(lua_State *L) { olua_startinvoke(L); @@ -516,7 +504,28 @@ static int _b2Vec3_set_x(lua_State *L) return 0; } -static int _b2Vec3_get_y(lua_State *L) +static int _olua_fun_b2Vec3_x(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float x + return _olua_fun_b2Vec3_x$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float x + return _olua_fun_b2Vec3_x$2(L); + // } + } + + luaL_error(L, "method 'b2Vec3::x' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_b2Vec3_y$1(lua_State *L) { olua_startinvoke(L); @@ -533,7 +542,7 @@ static int _b2Vec3_get_y(lua_State *L) return num_ret; } -static int _b2Vec3_set_y(lua_State *L) +static int _olua_fun_b2Vec3_y$2(lua_State *L) { olua_startinvoke(L); @@ -551,7 +560,28 @@ static int _b2Vec3_set_y(lua_State *L) return 0; } -static int _b2Vec3_get_z(lua_State *L) +static int _olua_fun_b2Vec3_y(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float y + return _olua_fun_b2Vec3_y$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float y + return _olua_fun_b2Vec3_y$2(L); + // } + } + + luaL_error(L, "method 'b2Vec3::y' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_b2Vec3_z$1(lua_State *L) { olua_startinvoke(L); @@ -568,7 +598,7 @@ static int _b2Vec3_get_z(lua_State *L) return num_ret; } -static int _b2Vec3_set_z(lua_State *L) +static int _olua_fun_b2Vec3_z$2(lua_State *L) { olua_startinvoke(L); @@ -586,53 +616,54 @@ static int _b2Vec3_set_z(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_b2Vec3(lua_State *L) -{ - oluacls_class(L, "b2.Vec3"); - oluacls_func(L, "__call", _b2Vec3___call); - oluacls_func(L, "__gc", _b2Vec3___gc); - oluacls_func(L, "__olua_move", _b2Vec3___olua_move); - oluacls_func(L, "new", _b2Vec3_new); - oluacls_func(L, "set", _b2Vec3_Set); - oluacls_func(L, "setZero", _b2Vec3_SetZero); - oluacls_prop(L, "x", _b2Vec3_get_x, _b2Vec3_set_x); - oluacls_prop(L, "y", _b2Vec3_get_y, _b2Vec3_set_y); - oluacls_prop(L, "z", _b2Vec3_get_z, _b2Vec3_set_z); - - return 1; -} -OLUA_END_DECLS - -static int _b2ContactID___call(lua_State *L) +static int _olua_fun_b2Vec3_z(lua_State *L) { - olua_startinvoke(L); - - b2ContactID ret; + int num_args = lua_gettop(L) - 1; - luaL_checktype(L, 2, LUA_TTABLE); + if (num_args == 0) { + // float z + return _olua_fun_b2Vec3_z$1(L); + } - b2ContactFeature arg1; /** cf */ - uint32 arg2 = 0; /** key */ + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float z + return _olua_fun_b2Vec3_z$2(L); + // } + } - olua_getfield(L, 2, "cf"); - olua_check_object(L, -1, &arg1, "b2.ContactFeature"); - ret.cf = arg1; - lua_pop(L, 1); + luaL_error(L, "method 'b2Vec3::z' not support '%d' arguments", num_args); - olua_getfield(L, 2, "key"); - olua_check_integer(L, -1, &arg2); - ret.key = arg2; - lua_pop(L, 1); + return 0; +} - olua_pushcopy_object(L, ret, "b2.ContactID"); +static int _olua_cls_b2_Vec3(lua_State *L) +{ + oluacls_class(L, "b2.Vec3"); + oluacls_func(L, "__gc", _olua_fun_b2Vec3___gc); + oluacls_func(L, "__olua_move", _olua_fun_b2Vec3___olua_move); + oluacls_func(L, "new", _olua_fun_b2Vec3_new); + oluacls_func(L, "set", _olua_fun_b2Vec3_set); + oluacls_func(L, "setZero", _olua_fun_b2Vec3_setZero); + oluacls_prop(L, "x", _olua_fun_b2Vec3_x, _olua_fun_b2Vec3_x); + oluacls_prop(L, "y", _olua_fun_b2Vec3_y, _olua_fun_b2Vec3_y); + oluacls_prop(L, "z", _olua_fun_b2Vec3_z, _olua_fun_b2Vec3_z); - olua_endinvoke(L); + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_b2_Vec3(lua_State *L) +{ + olua_require(L, "box2d", luaopen_box2d); + if (!olua_getclass(L, "b2.Vec3")) { + luaL_error(L, "class not found: b2Vec3"); + } return 1; } +OLUA_END_DECLS -static int _b2ContactID___gc(lua_State *L) +static int _olua_fun_b2ContactID___gc(lua_State *L) { olua_startinvoke(L); @@ -644,7 +675,7 @@ static int _b2ContactID___gc(lua_State *L) return 0; } -static int _b2ContactID___olua_move(lua_State *L) +static int _olua_fun_b2ContactID___olua_move(lua_State *L) { olua_startinvoke(L); @@ -656,7 +687,7 @@ static int _b2ContactID___olua_move(lua_State *L) return 1; } -static int _b2ContactID_get_cf(lua_State *L) +static int _olua_fun_b2ContactID_cf$1(lua_State *L) { olua_startinvoke(L); @@ -666,32 +697,53 @@ static int _b2ContactID_get_cf(lua_State *L) // b2ContactFeature cf b2ContactFeature &ret = self->cf; - int num_ret = olua_pushcopy_object(L, ret, "b2.ContactFeature"); + int num_ret = olua_copy_object(L, ret, "b2.ContactFeature"); olua_endinvoke(L); return num_ret; } -static int _b2ContactID_set_cf(lua_State *L) +static int _olua_fun_b2ContactID_cf$2(lua_State *L) { olua_startinvoke(L); b2ContactID *self = nullptr; - b2ContactFeature arg1; /** cf */ + b2ContactFeature *arg1; /** cf */ olua_to_object(L, 1, &self, "b2.ContactID"); olua_check_object(L, 2, &arg1, "b2.ContactFeature"); // b2ContactFeature cf - self->cf = arg1; + self->cf = *arg1; olua_endinvoke(L); return 0; } -static int _b2ContactID_get_key(lua_State *L) +static int _olua_fun_b2ContactID_cf(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // b2ContactFeature cf + return _olua_fun_b2ContactID_cf$1(L); + } + + if (num_args == 1) { + // if ((olua_is_object(L, 2, "b2.ContactFeature"))) { + // b2ContactFeature cf + return _olua_fun_b2ContactID_cf$2(L); + // } + } + + luaL_error(L, "method 'b2ContactID::cf' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_b2ContactID_key$1(lua_State *L) { olua_startinvoke(L); @@ -708,7 +760,7 @@ static int _b2ContactID_get_key(lua_State *L) return num_ret; } -static int _b2ContactID_set_key(lua_State *L) +static int _olua_fun_b2ContactID_key$2(lua_State *L) { olua_startinvoke(L); @@ -726,61 +778,50 @@ static int _b2ContactID_set_key(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_b2ContactID(lua_State *L) -{ - oluacls_class(L, "b2.ContactID"); - oluacls_func(L, "__call", _b2ContactID___call); - oluacls_func(L, "__gc", _b2ContactID___gc); - oluacls_func(L, "__olua_move", _b2ContactID___olua_move); - oluacls_prop(L, "cf", _b2ContactID_get_cf, _b2ContactID_set_cf); - oluacls_prop(L, "key", _b2ContactID_get_key, _b2ContactID_set_key); - - return 1; -} -OLUA_END_DECLS - -static int _b2ContactFeature___call(lua_State *L) +static int _olua_fun_b2ContactID_key(lua_State *L) { - olua_startinvoke(L); - - b2ContactFeature ret; - - luaL_checktype(L, 2, LUA_TTABLE); - - uint8 arg1 = 0; /** indexA */ - uint8 arg2 = 0; /** indexB */ - uint8 arg3 = 0; /** typeA */ - uint8 arg4 = 0; /** typeB */ + int num_args = lua_gettop(L) - 1; - olua_getfield(L, 2, "indexA"); - olua_check_integer(L, -1, &arg1); - ret.indexA = arg1; - lua_pop(L, 1); + if (num_args == 0) { + // uint32 key + return _olua_fun_b2ContactID_key$1(L); + } - olua_getfield(L, 2, "indexB"); - olua_check_integer(L, -1, &arg2); - ret.indexB = arg2; - lua_pop(L, 1); + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // uint32 key + return _olua_fun_b2ContactID_key$2(L); + // } + } - olua_getfield(L, 2, "typeA"); - olua_check_integer(L, -1, &arg3); - ret.typeA = arg3; - lua_pop(L, 1); + luaL_error(L, "method 'b2ContactID::key' not support '%d' arguments", num_args); - olua_getfield(L, 2, "typeB"); - olua_check_integer(L, -1, &arg4); - ret.typeB = arg4; - lua_pop(L, 1); + return 0; +} - olua_pushcopy_object(L, ret, "b2.ContactFeature"); +static int _olua_cls_b2_ContactID(lua_State *L) +{ + oluacls_class(L, "b2.ContactID"); + oluacls_func(L, "__gc", _olua_fun_b2ContactID___gc); + oluacls_func(L, "__olua_move", _olua_fun_b2ContactID___olua_move); + oluacls_prop(L, "cf", _olua_fun_b2ContactID_cf, _olua_fun_b2ContactID_cf); + oluacls_prop(L, "key", _olua_fun_b2ContactID_key, _olua_fun_b2ContactID_key); - olua_endinvoke(L); + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_b2_ContactID(lua_State *L) +{ + olua_require(L, "box2d", luaopen_box2d); + if (!olua_getclass(L, "b2.ContactID")) { + luaL_error(L, "class not found: b2ContactID"); + } return 1; } +OLUA_END_DECLS -static int _b2ContactFeature___gc(lua_State *L) +static int _olua_fun_b2ContactFeature___gc(lua_State *L) { olua_startinvoke(L); @@ -792,7 +833,7 @@ static int _b2ContactFeature___gc(lua_State *L) return 0; } -static int _b2ContactFeature___olua_move(lua_State *L) +static int _olua_fun_b2ContactFeature___olua_move(lua_State *L) { olua_startinvoke(L); @@ -804,7 +845,7 @@ static int _b2ContactFeature___olua_move(lua_State *L) return 1; } -static int _b2ContactFeature_get_indexA(lua_State *L) +static int _olua_fun_b2ContactFeature_indexA$1(lua_State *L) { olua_startinvoke(L); @@ -821,7 +862,7 @@ static int _b2ContactFeature_get_indexA(lua_State *L) return num_ret; } -static int _b2ContactFeature_set_indexA(lua_State *L) +static int _olua_fun_b2ContactFeature_indexA$2(lua_State *L) { olua_startinvoke(L); @@ -839,7 +880,28 @@ static int _b2ContactFeature_set_indexA(lua_State *L) return 0; } -static int _b2ContactFeature_get_indexB(lua_State *L) +static int _olua_fun_b2ContactFeature_indexA(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // uint8 indexA + return _olua_fun_b2ContactFeature_indexA$1(L); + } + + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // uint8 indexA + return _olua_fun_b2ContactFeature_indexA$2(L); + // } + } + + luaL_error(L, "method 'b2ContactFeature::indexA' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_b2ContactFeature_indexB$1(lua_State *L) { olua_startinvoke(L); @@ -856,7 +918,7 @@ static int _b2ContactFeature_get_indexB(lua_State *L) return num_ret; } -static int _b2ContactFeature_set_indexB(lua_State *L) +static int _olua_fun_b2ContactFeature_indexB$2(lua_State *L) { olua_startinvoke(L); @@ -874,7 +936,28 @@ static int _b2ContactFeature_set_indexB(lua_State *L) return 0; } -static int _b2ContactFeature_get_typeA(lua_State *L) +static int _olua_fun_b2ContactFeature_indexB(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // uint8 indexB + return _olua_fun_b2ContactFeature_indexB$1(L); + } + + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // uint8 indexB + return _olua_fun_b2ContactFeature_indexB$2(L); + // } + } + + luaL_error(L, "method 'b2ContactFeature::indexB' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_b2ContactFeature_typeA$1(lua_State *L) { olua_startinvoke(L); @@ -891,7 +974,7 @@ static int _b2ContactFeature_get_typeA(lua_State *L) return num_ret; } -static int _b2ContactFeature_set_typeA(lua_State *L) +static int _olua_fun_b2ContactFeature_typeA$2(lua_State *L) { olua_startinvoke(L); @@ -909,7 +992,28 @@ static int _b2ContactFeature_set_typeA(lua_State *L) return 0; } -static int _b2ContactFeature_get_typeB(lua_State *L) +static int _olua_fun_b2ContactFeature_typeA(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // uint8 typeA + return _olua_fun_b2ContactFeature_typeA$1(L); + } + + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // uint8 typeA + return _olua_fun_b2ContactFeature_typeA$2(L); + // } + } + + luaL_error(L, "method 'b2ContactFeature::typeA' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_b2ContactFeature_typeB$1(lua_State *L) { olua_startinvoke(L); @@ -926,7 +1030,7 @@ static int _b2ContactFeature_get_typeB(lua_State *L) return num_ret; } -static int _b2ContactFeature_set_typeB(lua_State *L) +static int _olua_fun_b2ContactFeature_typeB$2(lua_State *L) { olua_startinvoke(L); @@ -944,63 +1048,52 @@ static int _b2ContactFeature_set_typeB(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_b2ContactFeature(lua_State *L) -{ - oluacls_class(L, "b2.ContactFeature"); - oluacls_func(L, "__call", _b2ContactFeature___call); - oluacls_func(L, "__gc", _b2ContactFeature___gc); - oluacls_func(L, "__olua_move", _b2ContactFeature___olua_move); - oluacls_prop(L, "indexA", _b2ContactFeature_get_indexA, _b2ContactFeature_set_indexA); - oluacls_prop(L, "indexB", _b2ContactFeature_get_indexB, _b2ContactFeature_set_indexB); - oluacls_prop(L, "typeA", _b2ContactFeature_get_typeA, _b2ContactFeature_set_typeA); - oluacls_prop(L, "typeB", _b2ContactFeature_get_typeB, _b2ContactFeature_set_typeB); - - return 1; -} -OLUA_END_DECLS - -static int _b2Color___call(lua_State *L) +static int _olua_fun_b2ContactFeature_typeB(lua_State *L) { - olua_startinvoke(L); - - b2Color ret; - - luaL_checktype(L, 2, LUA_TTABLE); - - float arg1 = 0; /** r */ - float arg2 = 0; /** g */ - float arg3 = 0; /** b */ - float arg4 = 0; /** a */ + int num_args = lua_gettop(L) - 1; - olua_getfield(L, 2, "r"); - olua_check_number(L, -1, &arg1); - ret.r = arg1; - lua_pop(L, 1); + if (num_args == 0) { + // uint8 typeB + return _olua_fun_b2ContactFeature_typeB$1(L); + } - olua_getfield(L, 2, "g"); - olua_check_number(L, -1, &arg2); - ret.g = arg2; - lua_pop(L, 1); + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // uint8 typeB + return _olua_fun_b2ContactFeature_typeB$2(L); + // } + } - olua_getfield(L, 2, "b"); - olua_check_number(L, -1, &arg3); - ret.b = arg3; - lua_pop(L, 1); + luaL_error(L, "method 'b2ContactFeature::typeB' not support '%d' arguments", num_args); - olua_getfield(L, 2, "a"); - olua_check_number(L, -1, &arg4); - ret.a = arg4; - lua_pop(L, 1); + return 0; +} - olua_pushcopy_object(L, ret, "b2.Color"); +static int _olua_cls_b2_ContactFeature(lua_State *L) +{ + oluacls_class(L, "b2.ContactFeature"); + oluacls_func(L, "__gc", _olua_fun_b2ContactFeature___gc); + oluacls_func(L, "__olua_move", _olua_fun_b2ContactFeature___olua_move); + oluacls_prop(L, "indexA", _olua_fun_b2ContactFeature_indexA, _olua_fun_b2ContactFeature_indexA); + oluacls_prop(L, "indexB", _olua_fun_b2ContactFeature_indexB, _olua_fun_b2ContactFeature_indexB); + oluacls_prop(L, "typeA", _olua_fun_b2ContactFeature_typeA, _olua_fun_b2ContactFeature_typeA); + oluacls_prop(L, "typeB", _olua_fun_b2ContactFeature_typeB, _olua_fun_b2ContactFeature_typeB); - olua_endinvoke(L); + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_b2_ContactFeature(lua_State *L) +{ + olua_require(L, "box2d", luaopen_box2d); + if (!olua_getclass(L, "b2.ContactFeature")) { + luaL_error(L, "class not found: b2ContactFeature"); + } return 1; } +OLUA_END_DECLS -static int _b2Color___gc(lua_State *L) +static int _olua_fun_b2Color___gc(lua_State *L) { olua_startinvoke(L); @@ -1012,7 +1105,7 @@ static int _b2Color___gc(lua_State *L) return 0; } -static int _b2Color___olua_move(lua_State *L) +static int _olua_fun_b2Color___olua_move(lua_State *L) { olua_startinvoke(L); @@ -1024,164 +1117,119 @@ static int _b2Color___olua_move(lua_State *L) return 1; } -static int _b2Color_new$1(lua_State *L) +static int _olua_fun_b2Color_a$1(lua_State *L) { olua_startinvoke(L); - // b2Color() - b2Color *ret = new b2Color(); - int num_ret = olua_push_object(L, ret, "b2.Color"); - olua_postnew(L, ret); + b2Color *self = nullptr; + + olua_to_object(L, 1, &self, "b2.Color"); + + // float a + float ret = self->a; + int num_ret = olua_push_number(L, ret); olua_endinvoke(L); return num_ret; } -static int _b2Color_new$2(lua_State *L) +static int _olua_fun_b2Color_a$2(lua_State *L) { olua_startinvoke(L); - float arg1 = 0; /** rIn */ - float arg2 = 0; /** gIn */ - float arg3 = 0; /** bIn */ - float arg4 = 0; /** aIn */ - - olua_check_number(L, 1, &arg1); - olua_check_number(L, 2, &arg2); - olua_check_number(L, 3, &arg3); - olua_check_number(L, 4, &arg4); + b2Color *self = nullptr; + float arg1 = 0; /** a */ - // b2Color(float rIn, float gIn, float bIn, @optional float aIn) - b2Color *ret = new b2Color(arg1, arg2, arg3, arg4); - int num_ret = olua_push_object(L, ret, "b2.Color"); - olua_postnew(L, ret); - - olua_endinvoke(L); - - return num_ret; -} - -static int _b2Color_new$3(lua_State *L) -{ - olua_startinvoke(L); - - float arg1 = 0; /** rIn */ - float arg2 = 0; /** gIn */ - float arg3 = 0; /** bIn */ - - olua_check_number(L, 1, &arg1); - olua_check_number(L, 2, &arg2); - olua_check_number(L, 3, &arg3); + olua_to_object(L, 1, &self, "b2.Color"); + olua_check_number(L, 2, &arg1); - // b2Color(float rIn, float gIn, float bIn, @optional float aIn) - b2Color *ret = new b2Color(arg1, arg2, arg3); - int num_ret = olua_push_object(L, ret, "b2.Color"); - olua_postnew(L, ret); + // float a + self->a = arg1; olua_endinvoke(L); - return num_ret; + return 0; } -static int _b2Color_new(lua_State *L) +static int _olua_fun_b2Color_a(lua_State *L) { - int num_args = lua_gettop(L); + int num_args = lua_gettop(L) - 1; if (num_args == 0) { - // b2Color() - return _b2Color_new$1(L); + // float a + return _olua_fun_b2Color_a$1(L); } - if (num_args == 3) { - // if ((olua_is_number(L, 1)) && (olua_is_number(L, 2)) && (olua_is_number(L, 3))) { - // b2Color(float rIn, float gIn, float bIn, @optional float aIn) - return _b2Color_new$3(L); - // } - } - - if (num_args == 4) { - // if ((olua_is_number(L, 1)) && (olua_is_number(L, 2)) && (olua_is_number(L, 3)) && (olua_is_number(L, 4))) { - // b2Color(float rIn, float gIn, float bIn, @optional float aIn) - return _b2Color_new$2(L); + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float a + return _olua_fun_b2Color_a$2(L); // } } - luaL_error(L, "method 'b2Color::new' not support '%d' arguments", num_args); + luaL_error(L, "method 'b2Color::a' not support '%d' arguments", num_args); return 0; } -static int _b2Color_Set$1(lua_State *L) +static int _olua_fun_b2Color_b$1(lua_State *L) { olua_startinvoke(L); b2Color *self = nullptr; - float arg1 = 0; /** rIn */ - float arg2 = 0; /** gIn */ - float arg3 = 0; /** bIn */ - float arg4 = 0; /** aIn */ olua_to_object(L, 1, &self, "b2.Color"); - olua_check_number(L, 2, &arg1); - olua_check_number(L, 3, &arg2); - olua_check_number(L, 4, &arg3); - olua_check_number(L, 5, &arg4); - // void Set(float rIn, float gIn, float bIn, @optional float aIn) - self->Set(arg1, arg2, arg3, arg4); + // float b + float ret = self->b; + int num_ret = olua_push_number(L, ret); olua_endinvoke(L); - return 0; + return num_ret; } -static int _b2Color_Set$2(lua_State *L) +static int _olua_fun_b2Color_b$2(lua_State *L) { olua_startinvoke(L); b2Color *self = nullptr; - float arg1 = 0; /** rIn */ - float arg2 = 0; /** gIn */ - float arg3 = 0; /** bIn */ + float arg1 = 0; /** b */ olua_to_object(L, 1, &self, "b2.Color"); olua_check_number(L, 2, &arg1); - olua_check_number(L, 3, &arg2); - olua_check_number(L, 4, &arg3); - // void Set(float rIn, float gIn, float bIn, @optional float aIn) - self->Set(arg1, arg2, arg3); + // float b + self->b = arg1; olua_endinvoke(L); return 0; } -static int _b2Color_Set(lua_State *L) +static int _olua_fun_b2Color_b(lua_State *L) { int num_args = lua_gettop(L) - 1; - if (num_args == 3) { - // if ((olua_is_number(L, 2)) && (olua_is_number(L, 3)) && (olua_is_number(L, 4))) { - // void Set(float rIn, float gIn, float bIn, @optional float aIn) - return _b2Color_Set$2(L); - // } + if (num_args == 0) { + // float b + return _olua_fun_b2Color_b$1(L); } - if (num_args == 4) { - // if ((olua_is_number(L, 2)) && (olua_is_number(L, 3)) && (olua_is_number(L, 4)) && (olua_is_number(L, 5))) { - // void Set(float rIn, float gIn, float bIn, @optional float aIn) - return _b2Color_Set$1(L); + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float b + return _olua_fun_b2Color_b$2(L); // } } - luaL_error(L, "method 'b2Color::Set' not support '%d' arguments", num_args); + luaL_error(L, "method 'b2Color::b' not support '%d' arguments", num_args); return 0; } -static int _b2Color_get_a(lua_State *L) +static int _olua_fun_b2Color_g$1(lua_State *L) { olua_startinvoke(L); @@ -1189,8 +1237,8 @@ static int _b2Color_get_a(lua_State *L) olua_to_object(L, 1, &self, "b2.Color"); - // float a - float ret = self->a; + // float g + float ret = self->g; int num_ret = olua_push_number(L, ret); olua_endinvoke(L); @@ -1198,95 +1246,134 @@ static int _b2Color_get_a(lua_State *L) return num_ret; } -static int _b2Color_set_a(lua_State *L) +static int _olua_fun_b2Color_g$2(lua_State *L) { olua_startinvoke(L); b2Color *self = nullptr; - float arg1 = 0; /** a */ + float arg1 = 0; /** g */ olua_to_object(L, 1, &self, "b2.Color"); olua_check_number(L, 2, &arg1); - // float a - self->a = arg1; + // float g + self->g = arg1; olua_endinvoke(L); return 0; } -static int _b2Color_get_b(lua_State *L) +static int _olua_fun_b2Color_g(lua_State *L) { - olua_startinvoke(L); + int num_args = lua_gettop(L) - 1; - b2Color *self = nullptr; + if (num_args == 0) { + // float g + return _olua_fun_b2Color_g$1(L); + } - olua_to_object(L, 1, &self, "b2.Color"); + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float g + return _olua_fun_b2Color_g$2(L); + // } + } - // float b - float ret = self->b; - int num_ret = olua_push_number(L, ret); + luaL_error(L, "method 'b2Color::g' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_b2Color_new$1(lua_State *L) +{ + olua_startinvoke(L); + + // b2Color() + b2Color *ret = new b2Color(); + int num_ret = olua_push_object(L, ret, "b2.Color"); + olua_postnew(L, ret); olua_endinvoke(L); return num_ret; } -static int _b2Color_set_b(lua_State *L) +static int _olua_fun_b2Color_new$2(lua_State *L) { olua_startinvoke(L); - b2Color *self = nullptr; - float arg1 = 0; /** b */ + float arg1 = 0; /** rIn */ + float arg2 = 0; /** gIn */ + float arg3 = 0; /** bIn */ + float arg4 = 0; /** aIn */ - olua_to_object(L, 1, &self, "b2.Color"); - olua_check_number(L, 2, &arg1); + olua_check_number(L, 1, &arg1); + olua_check_number(L, 2, &arg2); + olua_check_number(L, 3, &arg3); + olua_check_number(L, 4, &arg4); - // float b - self->b = arg1; + // b2Color(float rIn, float gIn, float bIn, @optional float aIn) + b2Color *ret = new b2Color(arg1, arg2, arg3, arg4); + int num_ret = olua_push_object(L, ret, "b2.Color"); + olua_postnew(L, ret); olua_endinvoke(L); - return 0; + return num_ret; } -static int _b2Color_get_g(lua_State *L) +static int _olua_fun_b2Color_new$3(lua_State *L) { olua_startinvoke(L); - b2Color *self = nullptr; + float arg1 = 0; /** rIn */ + float arg2 = 0; /** gIn */ + float arg3 = 0; /** bIn */ - olua_to_object(L, 1, &self, "b2.Color"); + olua_check_number(L, 1, &arg1); + olua_check_number(L, 2, &arg2); + olua_check_number(L, 3, &arg3); - // float g - float ret = self->g; - int num_ret = olua_push_number(L, ret); + // b2Color(float rIn, float gIn, float bIn) + b2Color *ret = new b2Color(arg1, arg2, arg3); + int num_ret = olua_push_object(L, ret, "b2.Color"); + olua_postnew(L, ret); olua_endinvoke(L); return num_ret; } -static int _b2Color_set_g(lua_State *L) +static int _olua_fun_b2Color_new(lua_State *L) { - olua_startinvoke(L); + int num_args = lua_gettop(L); - b2Color *self = nullptr; - float arg1 = 0; /** g */ + if (num_args == 0) { + // b2Color() + return _olua_fun_b2Color_new$1(L); + } - olua_to_object(L, 1, &self, "b2.Color"); - olua_check_number(L, 2, &arg1); + if (num_args == 3) { + // if ((olua_is_number(L, 1)) && (olua_is_number(L, 2)) && (olua_is_number(L, 3))) { + // b2Color(float rIn, float gIn, float bIn) + return _olua_fun_b2Color_new$3(L); + // } + } - // float g - self->g = arg1; + if (num_args == 4) { + // if ((olua_is_number(L, 1)) && (olua_is_number(L, 2)) && (olua_is_number(L, 3)) && (olua_is_number(L, 4))) { + // b2Color(float rIn, float gIn, float bIn, @optional float aIn) + return _olua_fun_b2Color_new$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'b2Color::new' not support '%d' arguments", num_args); return 0; } -static int _b2Color_get_r(lua_State *L) +static int _olua_fun_b2Color_r$1(lua_State *L) { olua_startinvoke(L); @@ -1303,7 +1390,7 @@ static int _b2Color_get_r(lua_State *L) return num_ret; } -static int _b2Color_set_r(lua_State *L) +static int _olua_fun_b2Color_r$2(lua_State *L) { olua_startinvoke(L); @@ -1321,47 +1408,123 @@ static int _b2Color_set_r(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_b2Color(lua_State *L) +static int _olua_fun_b2Color_r(lua_State *L) { - oluacls_class(L, "b2.Color"); - oluacls_func(L, "__call", _b2Color___call); - oluacls_func(L, "__gc", _b2Color___gc); - oluacls_func(L, "__olua_move", _b2Color___olua_move); - oluacls_func(L, "new", _b2Color_new); - oluacls_func(L, "set", _b2Color_Set); - oluacls_prop(L, "a", _b2Color_get_a, _b2Color_set_a); - oluacls_prop(L, "b", _b2Color_get_b, _b2Color_set_b); - oluacls_prop(L, "g", _b2Color_get_g, _b2Color_set_g); - oluacls_prop(L, "r", _b2Color_get_r, _b2Color_set_r); + int num_args = lua_gettop(L) - 1; - return 1; + if (num_args == 0) { + // float r + return _olua_fun_b2Color_r$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float r + return _olua_fun_b2Color_r$2(L); + // } + } + + luaL_error(L, "method 'b2Color::r' not support '%d' arguments", num_args); + + return 0; } -OLUA_END_DECLS -static int _b2FixtureUserData___call(lua_State *L) +static int _olua_fun_b2Color_set$1(lua_State *L) { olua_startinvoke(L); - b2FixtureUserData ret; + b2Color *self = nullptr; + float arg1 = 0; /** rIn */ + float arg2 = 0; /** gIn */ + float arg3 = 0; /** bIn */ + float arg4 = 0; /** aIn */ - luaL_checktype(L, 2, LUA_TTABLE); + olua_to_object(L, 1, &self, "b2.Color"); + olua_check_number(L, 2, &arg1); + olua_check_number(L, 3, &arg2); + olua_check_number(L, 4, &arg3); + olua_check_number(L, 5, &arg4); - uintptr_t arg1 = 0; /** pointer */ + // void Set(float rIn, float gIn, float bIn, @optional float aIn) + self->Set(arg1, arg2, arg3, arg4); + + olua_endinvoke(L); + + return 0; +} + +static int _olua_fun_b2Color_set$2(lua_State *L) +{ + olua_startinvoke(L); + + b2Color *self = nullptr; + float arg1 = 0; /** rIn */ + float arg2 = 0; /** gIn */ + float arg3 = 0; /** bIn */ - olua_getfield(L, 2, "pointer"); - olua_check_integer(L, -1, &arg1); - ret.pointer = arg1; - lua_pop(L, 1); + olua_to_object(L, 1, &self, "b2.Color"); + olua_check_number(L, 2, &arg1); + olua_check_number(L, 3, &arg2); + olua_check_number(L, 4, &arg3); - olua_pushcopy_object(L, ret, "b2.FixtureUserData"); + // void Set(float rIn, float gIn, float bIn) + self->Set(arg1, arg2, arg3); olua_endinvoke(L); + return 0; +} + +static int _olua_fun_b2Color_set(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 3) { + // if ((olua_is_number(L, 2)) && (olua_is_number(L, 3)) && (olua_is_number(L, 4))) { + // void Set(float rIn, float gIn, float bIn) + return _olua_fun_b2Color_set$2(L); + // } + } + + if (num_args == 4) { + // if ((olua_is_number(L, 2)) && (olua_is_number(L, 3)) && (olua_is_number(L, 4)) && (olua_is_number(L, 5))) { + // void Set(float rIn, float gIn, float bIn, @optional float aIn) + return _olua_fun_b2Color_set$1(L); + // } + } + + luaL_error(L, "method 'b2Color::set' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_cls_b2_Color(lua_State *L) +{ + oluacls_class(L, "b2.Color"); + oluacls_func(L, "__gc", _olua_fun_b2Color___gc); + oluacls_func(L, "__olua_move", _olua_fun_b2Color___olua_move); + oluacls_func(L, "new", _olua_fun_b2Color_new); + oluacls_func(L, "set", _olua_fun_b2Color_set); + oluacls_prop(L, "a", _olua_fun_b2Color_a, _olua_fun_b2Color_a); + oluacls_prop(L, "b", _olua_fun_b2Color_b, _olua_fun_b2Color_b); + oluacls_prop(L, "g", _olua_fun_b2Color_g, _olua_fun_b2Color_g); + oluacls_prop(L, "r", _olua_fun_b2Color_r, _olua_fun_b2Color_r); + return 1; } -static int _b2FixtureUserData___gc(lua_State *L) +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_b2_Color(lua_State *L) +{ + olua_require(L, "box2d", luaopen_box2d); + if (!olua_getclass(L, "b2.Color")) { + luaL_error(L, "class not found: b2Color"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_fun_b2FixtureUserData___gc(lua_State *L) { olua_startinvoke(L); @@ -1373,7 +1536,7 @@ static int _b2FixtureUserData___gc(lua_State *L) return 0; } -static int _b2FixtureUserData___olua_move(lua_State *L) +static int _olua_fun_b2FixtureUserData___olua_move(lua_State *L) { olua_startinvoke(L); @@ -1385,7 +1548,7 @@ static int _b2FixtureUserData___olua_move(lua_State *L) return 1; } -static int _b2FixtureUserData_new(lua_State *L) +static int _olua_fun_b2FixtureUserData_new(lua_State *L) { olua_startinvoke(L); @@ -1399,7 +1562,7 @@ static int _b2FixtureUserData_new(lua_State *L) return num_ret; } -static int _b2FixtureUserData_get_pointer(lua_State *L) +static int _olua_fun_b2FixtureUserData_pointer$1(lua_State *L) { olua_startinvoke(L); @@ -1416,7 +1579,7 @@ static int _b2FixtureUserData_get_pointer(lua_State *L) return num_ret; } -static int _b2FixtureUserData_set_pointer(lua_State *L) +static int _olua_fun_b2FixtureUserData_pointer$2(lua_State *L) { olua_startinvoke(L); @@ -1434,55 +1597,50 @@ static int _b2FixtureUserData_set_pointer(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_b2FixtureUserData(lua_State *L) +static int _olua_fun_b2FixtureUserData_pointer(lua_State *L) { - oluacls_class(L, "b2.FixtureUserData"); - oluacls_func(L, "__call", _b2FixtureUserData___call); - oluacls_func(L, "__gc", _b2FixtureUserData___gc); - oluacls_func(L, "__olua_move", _b2FixtureUserData___olua_move); - oluacls_func(L, "new", _b2FixtureUserData_new); - oluacls_prop(L, "pointer", _b2FixtureUserData_get_pointer, _b2FixtureUserData_set_pointer); - - return 1; -} -OLUA_END_DECLS - -static int _b2Filter___call(lua_State *L) -{ - olua_startinvoke(L); - - b2Filter ret; - - luaL_checktype(L, 2, LUA_TTABLE); + int num_args = lua_gettop(L) - 1; - uint16 arg1 = 0; /** categoryBits */ - uint16 arg2 = 0; /** maskBits */ - int16 arg3 = 0; /** groupIndex */ + if (num_args == 0) { + // uintptr_t pointer + return _olua_fun_b2FixtureUserData_pointer$1(L); + } - olua_getfield(L, 2, "categoryBits"); - olua_check_integer(L, -1, &arg1); - ret.categoryBits = arg1; - lua_pop(L, 1); + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // uintptr_t pointer + return _olua_fun_b2FixtureUserData_pointer$2(L); + // } + } - olua_getfield(L, 2, "maskBits"); - olua_check_integer(L, -1, &arg2); - ret.maskBits = arg2; - lua_pop(L, 1); + luaL_error(L, "method 'b2FixtureUserData::pointer' not support '%d' arguments", num_args); - olua_getfield(L, 2, "groupIndex"); - olua_check_integer(L, -1, &arg3); - ret.groupIndex = arg3; - lua_pop(L, 1); + return 0; +} - olua_pushcopy_object(L, ret, "b2.Filter"); +static int _olua_cls_b2_FixtureUserData(lua_State *L) +{ + oluacls_class(L, "b2.FixtureUserData"); + oluacls_func(L, "__gc", _olua_fun_b2FixtureUserData___gc); + oluacls_func(L, "__olua_move", _olua_fun_b2FixtureUserData___olua_move); + oluacls_func(L, "new", _olua_fun_b2FixtureUserData_new); + oluacls_prop(L, "pointer", _olua_fun_b2FixtureUserData_pointer, _olua_fun_b2FixtureUserData_pointer); - olua_endinvoke(L); + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_b2_FixtureUserData(lua_State *L) +{ + olua_require(L, "box2d", luaopen_box2d); + if (!olua_getclass(L, "b2.FixtureUserData")) { + luaL_error(L, "class not found: b2FixtureUserData"); + } return 1; } +OLUA_END_DECLS -static int _b2Filter___gc(lua_State *L) +static int _olua_fun_b2Filter___gc(lua_State *L) { olua_startinvoke(L); @@ -1494,7 +1652,7 @@ static int _b2Filter___gc(lua_State *L) return 0; } -static int _b2Filter___olua_move(lua_State *L) +static int _olua_fun_b2Filter___olua_move(lua_State *L) { olua_startinvoke(L); @@ -1506,21 +1664,7 @@ static int _b2Filter___olua_move(lua_State *L) return 1; } -static int _b2Filter_new(lua_State *L) -{ - olua_startinvoke(L); - - // b2Filter() - b2Filter *ret = new b2Filter(); - int num_ret = olua_push_object(L, ret, "b2.Filter"); - olua_postnew(L, ret); - - olua_endinvoke(L); - - return num_ret; -} - -static int _b2Filter_get_categoryBits(lua_State *L) +static int _olua_fun_b2Filter_categoryBits$1(lua_State *L) { olua_startinvoke(L); @@ -1537,7 +1681,7 @@ static int _b2Filter_get_categoryBits(lua_State *L) return num_ret; } -static int _b2Filter_set_categoryBits(lua_State *L) +static int _olua_fun_b2Filter_categoryBits$2(lua_State *L) { olua_startinvoke(L); @@ -1555,7 +1699,28 @@ static int _b2Filter_set_categoryBits(lua_State *L) return 0; } -static int _b2Filter_get_groupIndex(lua_State *L) +static int _olua_fun_b2Filter_categoryBits(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // uint16 categoryBits + return _olua_fun_b2Filter_categoryBits$1(L); + } + + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // uint16 categoryBits + return _olua_fun_b2Filter_categoryBits$2(L); + // } + } + + luaL_error(L, "method 'b2Filter::categoryBits' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_b2Filter_groupIndex$1(lua_State *L) { olua_startinvoke(L); @@ -1572,7 +1737,7 @@ static int _b2Filter_get_groupIndex(lua_State *L) return num_ret; } -static int _b2Filter_set_groupIndex(lua_State *L) +static int _olua_fun_b2Filter_groupIndex$2(lua_State *L) { olua_startinvoke(L); @@ -1590,7 +1755,28 @@ static int _b2Filter_set_groupIndex(lua_State *L) return 0; } -static int _b2Filter_get_maskBits(lua_State *L) +static int _olua_fun_b2Filter_groupIndex(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // int16 groupIndex + return _olua_fun_b2Filter_groupIndex$1(L); + } + + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // int16 groupIndex + return _olua_fun_b2Filter_groupIndex$2(L); + // } + } + + luaL_error(L, "method 'b2Filter::groupIndex' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_b2Filter_maskBits$1(lua_State *L) { olua_startinvoke(L); @@ -1607,7 +1793,7 @@ static int _b2Filter_get_maskBits(lua_State *L) return num_ret; } -static int _b2Filter_set_maskBits(lua_State *L) +static int _olua_fun_b2Filter_maskBits$2(lua_State *L) { olua_startinvoke(L); @@ -1625,63 +1811,66 @@ static int _b2Filter_set_maskBits(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_b2Filter(lua_State *L) +static int _olua_fun_b2Filter_maskBits(lua_State *L) { - oluacls_class(L, "b2.Filter"); - oluacls_func(L, "__call", _b2Filter___call); - oluacls_func(L, "__gc", _b2Filter___gc); - oluacls_func(L, "__olua_move", _b2Filter___olua_move); - oluacls_func(L, "new", _b2Filter_new); - oluacls_prop(L, "categoryBits", _b2Filter_get_categoryBits, _b2Filter_set_categoryBits); - oluacls_prop(L, "groupIndex", _b2Filter_get_groupIndex, _b2Filter_set_groupIndex); - oluacls_prop(L, "maskBits", _b2Filter_get_maskBits, _b2Filter_set_maskBits); - - return 1; -} -OLUA_END_DECLS + int num_args = lua_gettop(L) - 1; -static int _b2ManifoldPoint___call(lua_State *L) -{ - olua_startinvoke(L); + if (num_args == 0) { + // uint16 maskBits + return _olua_fun_b2Filter_maskBits$1(L); + } - b2ManifoldPoint ret; + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // uint16 maskBits + return _olua_fun_b2Filter_maskBits$2(L); + // } + } - luaL_checktype(L, 2, LUA_TTABLE); + luaL_error(L, "method 'b2Filter::maskBits' not support '%d' arguments", num_args); - b2Vec2 arg1; /** localPoint */ - float arg2 = 0; /** normalImpulse */ - float arg3 = 0; /** tangentImpulse */ - b2ContactID arg4; /** id */ + return 0; +} - olua_getfield(L, 2, "localPoint"); - olua_check_object(L, -1, &arg1, "b2.Vec2"); - ret.localPoint = arg1; - lua_pop(L, 1); +static int _olua_fun_b2Filter_new(lua_State *L) +{ + olua_startinvoke(L); - olua_getfield(L, 2, "normalImpulse"); - olua_check_number(L, -1, &arg2); - ret.normalImpulse = arg2; - lua_pop(L, 1); + // b2Filter() + b2Filter *ret = new b2Filter(); + int num_ret = olua_push_object(L, ret, "b2.Filter"); + olua_postnew(L, ret); - olua_getfield(L, 2, "tangentImpulse"); - olua_check_number(L, -1, &arg3); - ret.tangentImpulse = arg3; - lua_pop(L, 1); + olua_endinvoke(L); - olua_getfield(L, 2, "id"); - olua_check_object(L, -1, &arg4, "b2.ContactID"); - ret.id = arg4; - lua_pop(L, 1); + return num_ret; +} - olua_pushcopy_object(L, ret, "b2.ManifoldPoint"); +static int _olua_cls_b2_Filter(lua_State *L) +{ + oluacls_class(L, "b2.Filter"); + oluacls_func(L, "__gc", _olua_fun_b2Filter___gc); + oluacls_func(L, "__olua_move", _olua_fun_b2Filter___olua_move); + oluacls_func(L, "new", _olua_fun_b2Filter_new); + oluacls_prop(L, "categoryBits", _olua_fun_b2Filter_categoryBits, _olua_fun_b2Filter_categoryBits); + oluacls_prop(L, "groupIndex", _olua_fun_b2Filter_groupIndex, _olua_fun_b2Filter_groupIndex); + oluacls_prop(L, "maskBits", _olua_fun_b2Filter_maskBits, _olua_fun_b2Filter_maskBits); - olua_endinvoke(L); + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_b2_Filter(lua_State *L) +{ + olua_require(L, "box2d", luaopen_box2d); + if (!olua_getclass(L, "b2.Filter")) { + luaL_error(L, "class not found: b2Filter"); + } return 1; } +OLUA_END_DECLS -static int _b2ManifoldPoint___gc(lua_State *L) +static int _olua_fun_b2ManifoldPoint___gc(lua_State *L) { olua_startinvoke(L); @@ -1693,7 +1882,7 @@ static int _b2ManifoldPoint___gc(lua_State *L) return 0; } -static int _b2ManifoldPoint___olua_move(lua_State *L) +static int _olua_fun_b2ManifoldPoint___olua_move(lua_State *L) { olua_startinvoke(L); @@ -1705,7 +1894,7 @@ static int _b2ManifoldPoint___olua_move(lua_State *L) return 1; } -static int _b2ManifoldPoint_get_id(lua_State *L) +static int _olua_fun_b2ManifoldPoint_id$1(lua_State *L) { olua_startinvoke(L); @@ -1715,32 +1904,53 @@ static int _b2ManifoldPoint_get_id(lua_State *L) // b2ContactID id b2ContactID &ret = self->id; - int num_ret = olua_pushcopy_object(L, ret, "b2.ContactID"); + int num_ret = olua_copy_object(L, ret, "b2.ContactID"); olua_endinvoke(L); return num_ret; } -static int _b2ManifoldPoint_set_id(lua_State *L) +static int _olua_fun_b2ManifoldPoint_id$2(lua_State *L) { olua_startinvoke(L); b2ManifoldPoint *self = nullptr; - b2ContactID arg1; /** id */ + b2ContactID *arg1; /** id */ + + olua_to_object(L, 1, &self, "b2.ManifoldPoint"); + olua_check_object(L, 2, &arg1, "b2.ContactID"); + + // b2ContactID id + self->id = *arg1; + + olua_endinvoke(L); + + return 0; +} + +static int _olua_fun_b2ManifoldPoint_id(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; - olua_to_object(L, 1, &self, "b2.ManifoldPoint"); - olua_check_object(L, 2, &arg1, "b2.ContactID"); + if (num_args == 0) { + // b2ContactID id + return _olua_fun_b2ManifoldPoint_id$1(L); + } - // b2ContactID id - self->id = arg1; + if (num_args == 1) { + // if ((olua_is_object(L, 2, "b2.ContactID"))) { + // b2ContactID id + return _olua_fun_b2ManifoldPoint_id$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'b2ManifoldPoint::id' not support '%d' arguments", num_args); return 0; } -static int _b2ManifoldPoint_get_localPoint(lua_State *L) +static int _olua_fun_b2ManifoldPoint_localPoint$1(lua_State *L) { olua_startinvoke(L); @@ -1750,32 +1960,53 @@ static int _b2ManifoldPoint_get_localPoint(lua_State *L) // b2Vec2 localPoint b2Vec2 &ret = self->localPoint; - int num_ret = olua_pushcopy_object(L, ret, "b2.Vec2"); + int num_ret = olua_copy_object(L, ret, "b2.Vec2"); olua_endinvoke(L); return num_ret; } -static int _b2ManifoldPoint_set_localPoint(lua_State *L) +static int _olua_fun_b2ManifoldPoint_localPoint$2(lua_State *L) { olua_startinvoke(L); b2ManifoldPoint *self = nullptr; - b2Vec2 arg1; /** localPoint */ + b2Vec2 *arg1; /** localPoint */ olua_to_object(L, 1, &self, "b2.ManifoldPoint"); olua_check_object(L, 2, &arg1, "b2.Vec2"); // b2Vec2 localPoint - self->localPoint = arg1; + self->localPoint = *arg1; olua_endinvoke(L); return 0; } -static int _b2ManifoldPoint_get_normalImpulse(lua_State *L) +static int _olua_fun_b2ManifoldPoint_localPoint(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // b2Vec2 localPoint + return _olua_fun_b2ManifoldPoint_localPoint$1(L); + } + + if (num_args == 1) { + // if ((olua_is_object(L, 2, "b2.Vec2"))) { + // b2Vec2 localPoint + return _olua_fun_b2ManifoldPoint_localPoint$2(L); + // } + } + + luaL_error(L, "method 'b2ManifoldPoint::localPoint' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_b2ManifoldPoint_normalImpulse$1(lua_State *L) { olua_startinvoke(L); @@ -1792,7 +2023,7 @@ static int _b2ManifoldPoint_get_normalImpulse(lua_State *L) return num_ret; } -static int _b2ManifoldPoint_set_normalImpulse(lua_State *L) +static int _olua_fun_b2ManifoldPoint_normalImpulse$2(lua_State *L) { olua_startinvoke(L); @@ -1810,7 +2041,28 @@ static int _b2ManifoldPoint_set_normalImpulse(lua_State *L) return 0; } -static int _b2ManifoldPoint_get_tangentImpulse(lua_State *L) +static int _olua_fun_b2ManifoldPoint_normalImpulse(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float normalImpulse + return _olua_fun_b2ManifoldPoint_normalImpulse$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float normalImpulse + return _olua_fun_b2ManifoldPoint_normalImpulse$2(L); + // } + } + + luaL_error(L, "method 'b2ManifoldPoint::normalImpulse' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_b2ManifoldPoint_tangentImpulse$1(lua_State *L) { olua_startinvoke(L); @@ -1827,7 +2079,7 @@ static int _b2ManifoldPoint_get_tangentImpulse(lua_State *L) return num_ret; } -static int _b2ManifoldPoint_set_tangentImpulse(lua_State *L) +static int _olua_fun_b2ManifoldPoint_tangentImpulse$2(lua_State *L) { olua_startinvoke(L); @@ -1845,75 +2097,132 @@ static int _b2ManifoldPoint_set_tangentImpulse(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_b2ManifoldPoint(lua_State *L) +static int _olua_fun_b2ManifoldPoint_tangentImpulse(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float tangentImpulse + return _olua_fun_b2ManifoldPoint_tangentImpulse$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float tangentImpulse + return _olua_fun_b2ManifoldPoint_tangentImpulse$2(L); + // } + } + + luaL_error(L, "method 'b2ManifoldPoint::tangentImpulse' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_cls_b2_ManifoldPoint(lua_State *L) { oluacls_class(L, "b2.ManifoldPoint"); - oluacls_func(L, "__call", _b2ManifoldPoint___call); - oluacls_func(L, "__gc", _b2ManifoldPoint___gc); - oluacls_func(L, "__olua_move", _b2ManifoldPoint___olua_move); - oluacls_prop(L, "id", _b2ManifoldPoint_get_id, _b2ManifoldPoint_set_id); - oluacls_prop(L, "localPoint", _b2ManifoldPoint_get_localPoint, _b2ManifoldPoint_set_localPoint); - oluacls_prop(L, "normalImpulse", _b2ManifoldPoint_get_normalImpulse, _b2ManifoldPoint_set_normalImpulse); - oluacls_prop(L, "tangentImpulse", _b2ManifoldPoint_get_tangentImpulse, _b2ManifoldPoint_set_tangentImpulse); + oluacls_func(L, "__gc", _olua_fun_b2ManifoldPoint___gc); + oluacls_func(L, "__olua_move", _olua_fun_b2ManifoldPoint___olua_move); + oluacls_prop(L, "id", _olua_fun_b2ManifoldPoint_id, _olua_fun_b2ManifoldPoint_id); + oluacls_prop(L, "localPoint", _olua_fun_b2ManifoldPoint_localPoint, _olua_fun_b2ManifoldPoint_localPoint); + oluacls_prop(L, "normalImpulse", _olua_fun_b2ManifoldPoint_normalImpulse, _olua_fun_b2ManifoldPoint_normalImpulse); + oluacls_prop(L, "tangentImpulse", _olua_fun_b2ManifoldPoint_tangentImpulse, _olua_fun_b2ManifoldPoint_tangentImpulse); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_b2_ManifoldPoint(lua_State *L) +{ + olua_require(L, "box2d", luaopen_box2d); + if (!olua_getclass(L, "b2.ManifoldPoint")) { + luaL_error(L, "class not found: b2ManifoldPoint"); + } return 1; } OLUA_END_DECLS -static int _b2Rot___call(lua_State *L) +static int _olua_fun_b2Rot___gc(lua_State *L) { olua_startinvoke(L); - b2Rot ret; - - luaL_checktype(L, 2, LUA_TTABLE); + auto self = (b2Rot *)olua_toobj(L, 1, "b2.Rot"); + olua_postgc(L, self); - float arg1 = 0; /** s */ - float arg2 = 0; /** c */ + olua_endinvoke(L); - olua_getfield(L, 2, "s"); - olua_check_number(L, -1, &arg1); - ret.s = arg1; - lua_pop(L, 1); + return 0; +} - olua_getfield(L, 2, "c"); - olua_check_number(L, -1, &arg2); - ret.c = arg2; - lua_pop(L, 1); +static int _olua_fun_b2Rot___olua_move(lua_State *L) +{ + olua_startinvoke(L); - olua_pushcopy_object(L, ret, "b2.Rot"); + auto self = (b2Rot *)olua_toobj(L, 1, "b2.Rot"); + olua_push_object(L, self, "b2.Rot"); olua_endinvoke(L); return 1; } -static int _b2Rot___gc(lua_State *L) +static int _olua_fun_b2Rot_c$1(lua_State *L) { olua_startinvoke(L); - auto self = (b2Rot *)olua_toobj(L, 1, "b2.Rot"); - olua_postgc(L, self); + b2Rot *self = nullptr; + + olua_to_object(L, 1, &self, "b2.Rot"); + + // float c + float ret = self->c; + int num_ret = olua_push_number(L, ret); olua_endinvoke(L); - return 0; + return num_ret; } -static int _b2Rot___olua_move(lua_State *L) +static int _olua_fun_b2Rot_c$2(lua_State *L) { olua_startinvoke(L); - auto self = (b2Rot *)olua_toobj(L, 1, "b2.Rot"); - olua_push_object(L, self, "b2.Rot"); + b2Rot *self = nullptr; + float arg1 = 0; /** c */ + + olua_to_object(L, 1, &self, "b2.Rot"); + olua_check_number(L, 2, &arg1); + + // float c + self->c = arg1; olua_endinvoke(L); - return 1; + return 0; +} + +static int _olua_fun_b2Rot_c(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float c + return _olua_fun_b2Rot_c$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float c + return _olua_fun_b2Rot_c$2(L); + // } + } + + luaL_error(L, "method 'b2Rot::c' not support '%d' arguments", num_args); + + return 0; } -static int _b2Rot_GetAngle(lua_State *L) +static int _olua_fun_b2Rot_getAngle(lua_State *L) { olua_startinvoke(L); @@ -1930,7 +2239,7 @@ static int _b2Rot_GetAngle(lua_State *L) return num_ret; } -static int _b2Rot_GetXAxis(lua_State *L) +static int _olua_fun_b2Rot_getXAxis(lua_State *L) { olua_startinvoke(L); @@ -1940,14 +2249,14 @@ static int _b2Rot_GetXAxis(lua_State *L) // b2Vec2 GetXAxis() b2Vec2 ret = self->GetXAxis(); - int num_ret = olua_pushcopy_object(L, ret, "b2.Vec2"); + int num_ret = olua_copy_object(L, ret, "b2.Vec2"); olua_endinvoke(L); return num_ret; } -static int _b2Rot_GetYAxis(lua_State *L) +static int _olua_fun_b2Rot_getYAxis(lua_State *L) { olua_startinvoke(L); @@ -1957,14 +2266,14 @@ static int _b2Rot_GetYAxis(lua_State *L) // b2Vec2 GetYAxis() b2Vec2 ret = self->GetYAxis(); - int num_ret = olua_pushcopy_object(L, ret, "b2.Vec2"); + int num_ret = olua_copy_object(L, ret, "b2.Vec2"); olua_endinvoke(L); return num_ret; } -static int _b2Rot_new$1(lua_State *L) +static int _olua_fun_b2Rot_new$1(lua_State *L) { olua_startinvoke(L); @@ -1978,7 +2287,7 @@ static int _b2Rot_new$1(lua_State *L) return num_ret; } -static int _b2Rot_new$2(lua_State *L) +static int _olua_fun_b2Rot_new$2(lua_State *L) { olua_startinvoke(L); @@ -1996,19 +2305,19 @@ static int _b2Rot_new$2(lua_State *L) return num_ret; } -static int _b2Rot_new(lua_State *L) +static int _olua_fun_b2Rot_new(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 0) { // b2Rot() - return _b2Rot_new$1(L); + return _olua_fun_b2Rot_new$1(L); } if (num_args == 1) { // if ((olua_is_number(L, 1))) { // b2Rot(float angle) - return _b2Rot_new$2(L); + return _olua_fun_b2Rot_new$2(L); // } } @@ -2017,76 +2326,81 @@ static int _b2Rot_new(lua_State *L) return 0; } -static int _b2Rot_Set(lua_State *L) +static int _olua_fun_b2Rot_s$1(lua_State *L) { olua_startinvoke(L); b2Rot *self = nullptr; - float arg1 = 0; /** angle */ olua_to_object(L, 1, &self, "b2.Rot"); - olua_check_number(L, 2, &arg1); - // void Set(float angle) - self->Set(arg1); + // float s + float ret = self->s; + int num_ret = olua_push_number(L, ret); olua_endinvoke(L); - return 0; + return num_ret; } -static int _b2Rot_SetIdentity(lua_State *L) +static int _olua_fun_b2Rot_s$2(lua_State *L) { olua_startinvoke(L); b2Rot *self = nullptr; + float arg1 = 0; /** s */ olua_to_object(L, 1, &self, "b2.Rot"); + olua_check_number(L, 2, &arg1); - // void SetIdentity() - self->SetIdentity(); + // float s + self->s = arg1; olua_endinvoke(L); return 0; } -static int _b2Rot_get_c(lua_State *L) +static int _olua_fun_b2Rot_s(lua_State *L) { - olua_startinvoke(L); - - b2Rot *self = nullptr; + int num_args = lua_gettop(L) - 1; - olua_to_object(L, 1, &self, "b2.Rot"); + if (num_args == 0) { + // float s + return _olua_fun_b2Rot_s$1(L); + } - // float c - float ret = self->c; - int num_ret = olua_push_number(L, ret); + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float s + return _olua_fun_b2Rot_s$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'b2Rot::s' not support '%d' arguments", num_args); - return num_ret; + return 0; } -static int _b2Rot_set_c(lua_State *L) +static int _olua_fun_b2Rot_set(lua_State *L) { olua_startinvoke(L); b2Rot *self = nullptr; - float arg1 = 0; /** c */ + float arg1 = 0; /** angle */ olua_to_object(L, 1, &self, "b2.Rot"); olua_check_number(L, 2, &arg1); - // float c - self->c = arg1; + // void Set(float angle) + self->Set(arg1); olua_endinvoke(L); return 0; } -static int _b2Rot_get_s(lua_State *L) +static int _olua_fun_b2Rot_setIdentity(lua_State *L) { olua_startinvoke(L); @@ -2094,57 +2408,46 @@ static int _b2Rot_get_s(lua_State *L) olua_to_object(L, 1, &self, "b2.Rot"); - // float s - float ret = self->s; - int num_ret = olua_push_number(L, ret); + // void SetIdentity() + self->SetIdentity(); olua_endinvoke(L); - return num_ret; + return 0; } -static int _b2Rot_set_s(lua_State *L) +static int _olua_cls_b2_Rot(lua_State *L) { - olua_startinvoke(L); - - b2Rot *self = nullptr; - float arg1 = 0; /** s */ - - olua_to_object(L, 1, &self, "b2.Rot"); - olua_check_number(L, 2, &arg1); - - // float s - self->s = arg1; - - olua_endinvoke(L); + oluacls_class(L, "b2.Rot"); + oluacls_func(L, "__gc", _olua_fun_b2Rot___gc); + oluacls_func(L, "__olua_move", _olua_fun_b2Rot___olua_move); + oluacls_func(L, "getAngle", _olua_fun_b2Rot_getAngle); + oluacls_func(L, "getXAxis", _olua_fun_b2Rot_getXAxis); + oluacls_func(L, "getYAxis", _olua_fun_b2Rot_getYAxis); + oluacls_func(L, "new", _olua_fun_b2Rot_new); + oluacls_func(L, "set", _olua_fun_b2Rot_set); + oluacls_func(L, "setIdentity", _olua_fun_b2Rot_setIdentity); + oluacls_prop(L, "angle", _olua_fun_b2Rot_getAngle, nullptr); + oluacls_prop(L, "xAxis", _olua_fun_b2Rot_getXAxis, nullptr); + oluacls_prop(L, "yAxis", _olua_fun_b2Rot_getYAxis, nullptr); + oluacls_prop(L, "c", _olua_fun_b2Rot_c, _olua_fun_b2Rot_c); + oluacls_prop(L, "s", _olua_fun_b2Rot_s, _olua_fun_b2Rot_s); - return 0; + return 1; } OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_b2Rot(lua_State *L) +OLUA_LIB int luaopen_b2_Rot(lua_State *L) { - oluacls_class(L, "b2.Rot"); - oluacls_func(L, "__call", _b2Rot___call); - oluacls_func(L, "__gc", _b2Rot___gc); - oluacls_func(L, "__olua_move", _b2Rot___olua_move); - oluacls_func(L, "getAngle", _b2Rot_GetAngle); - oluacls_func(L, "getXAxis", _b2Rot_GetXAxis); - oluacls_func(L, "getYAxis", _b2Rot_GetYAxis); - oluacls_func(L, "new", _b2Rot_new); - oluacls_func(L, "set", _b2Rot_Set); - oluacls_func(L, "setIdentity", _b2Rot_SetIdentity); - oluacls_prop(L, "angle", _b2Rot_GetAngle, nullptr); - oluacls_prop(L, "xAxis", _b2Rot_GetXAxis, nullptr); - oluacls_prop(L, "yAxis", _b2Rot_GetYAxis, nullptr); - oluacls_prop(L, "c", _b2Rot_get_c, _b2Rot_set_c); - oluacls_prop(L, "s", _b2Rot_get_s, _b2Rot_set_s); - + olua_require(L, "box2d", luaopen_box2d); + if (!olua_getclass(L, "b2.Rot")) { + luaL_error(L, "class not found: b2Rot"); + } return 1; } OLUA_END_DECLS -static int _b2Draw___gc(lua_State *L) +static int _olua_fun_b2Draw___gc(lua_State *L) { olua_startinvoke(L); @@ -2156,7 +2459,7 @@ static int _b2Draw___gc(lua_State *L) return 0; } -static int _b2Draw___olua_move(lua_State *L) +static int _olua_fun_b2Draw___olua_move(lua_State *L) { olua_startinvoke(L); @@ -2168,18 +2471,27 @@ static int _b2Draw___olua_move(lua_State *L) return 1; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_b2Draw(lua_State *L) +static int _olua_cls_b2_interface_Draw(lua_State *L) { oluacls_class(L, "b2.interface.Draw"); - oluacls_func(L, "__gc", _b2Draw___gc); - oluacls_func(L, "__olua_move", _b2Draw___olua_move); + oluacls_func(L, "__gc", _olua_fun_b2Draw___gc); + oluacls_func(L, "__olua_move", _olua_fun_b2Draw___olua_move); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_b2_interface_Draw(lua_State *L) +{ + olua_require(L, "box2d", luaopen_box2d); + if (!olua_getclass(L, "b2.interface.Draw")) { + luaL_error(L, "class not found: b2Draw"); + } return 1; } OLUA_END_DECLS -static int _b2DestructionListener___gc(lua_State *L) +static int _olua_fun_b2DestructionListener___gc(lua_State *L) { olua_startinvoke(L); @@ -2191,7 +2503,7 @@ static int _b2DestructionListener___gc(lua_State *L) return 0; } -static int _b2DestructionListener___olua_move(lua_State *L) +static int _olua_fun_b2DestructionListener___olua_move(lua_State *L) { olua_startinvoke(L); @@ -2203,18 +2515,27 @@ static int _b2DestructionListener___olua_move(lua_State *L) return 1; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_b2DestructionListener(lua_State *L) +static int _olua_cls_b2_interface_DestructionListener(lua_State *L) { oluacls_class(L, "b2.interface.DestructionListener"); - oluacls_func(L, "__gc", _b2DestructionListener___gc); - oluacls_func(L, "__olua_move", _b2DestructionListener___olua_move); + oluacls_func(L, "__gc", _olua_fun_b2DestructionListener___gc); + oluacls_func(L, "__olua_move", _olua_fun_b2DestructionListener___olua_move); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_b2_interface_DestructionListener(lua_State *L) +{ + olua_require(L, "box2d", luaopen_box2d); + if (!olua_getclass(L, "b2.interface.DestructionListener")) { + luaL_error(L, "class not found: b2DestructionListener"); + } return 1; } OLUA_END_DECLS -static int _b2ContactFilter___gc(lua_State *L) +static int _olua_fun_b2ContactFilter___gc(lua_State *L) { olua_startinvoke(L); @@ -2226,7 +2547,7 @@ static int _b2ContactFilter___gc(lua_State *L) return 0; } -static int _b2ContactFilter___olua_move(lua_State *L) +static int _olua_fun_b2ContactFilter___olua_move(lua_State *L) { olua_startinvoke(L); @@ -2238,18 +2559,27 @@ static int _b2ContactFilter___olua_move(lua_State *L) return 1; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_b2ContactFilter(lua_State *L) +static int _olua_cls_b2_interface_ContactFilter(lua_State *L) { oluacls_class(L, "b2.interface.ContactFilter"); - oluacls_func(L, "__gc", _b2ContactFilter___gc); - oluacls_func(L, "__olua_move", _b2ContactFilter___olua_move); + oluacls_func(L, "__gc", _olua_fun_b2ContactFilter___gc); + oluacls_func(L, "__olua_move", _olua_fun_b2ContactFilter___olua_move); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_b2_interface_ContactFilter(lua_State *L) +{ + olua_require(L, "box2d", luaopen_box2d); + if (!olua_getclass(L, "b2.interface.ContactFilter")) { + luaL_error(L, "class not found: b2ContactFilter"); + } return 1; } OLUA_END_DECLS -static int _b2ContactListener___gc(lua_State *L) +static int _olua_fun_b2ContactListener___gc(lua_State *L) { olua_startinvoke(L); @@ -2261,7 +2591,7 @@ static int _b2ContactListener___gc(lua_State *L) return 0; } -static int _b2ContactListener___olua_move(lua_State *L) +static int _olua_fun_b2ContactListener___olua_move(lua_State *L) { olua_startinvoke(L); @@ -2273,18 +2603,27 @@ static int _b2ContactListener___olua_move(lua_State *L) return 1; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_b2ContactListener(lua_State *L) +static int _olua_cls_b2_interface_ContactListener(lua_State *L) { oluacls_class(L, "b2.interface.ContactListener"); - oluacls_func(L, "__gc", _b2ContactListener___gc); - oluacls_func(L, "__olua_move", _b2ContactListener___olua_move); + oluacls_func(L, "__gc", _olua_fun_b2ContactListener___gc); + oluacls_func(L, "__olua_move", _olua_fun_b2ContactListener___olua_move); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_b2_interface_ContactListener(lua_State *L) +{ + olua_require(L, "box2d", luaopen_box2d); + if (!olua_getclass(L, "b2.interface.ContactListener")) { + luaL_error(L, "class not found: b2ContactListener"); + } + return 1; +} OLUA_END_DECLS -static int _b2QueryCallback___gc(lua_State *L) +static int _olua_fun_b2QueryCallback___gc(lua_State *L) { olua_startinvoke(L); @@ -2296,7 +2635,7 @@ static int _b2QueryCallback___gc(lua_State *L) return 0; } -static int _b2QueryCallback___olua_move(lua_State *L) +static int _olua_fun_b2QueryCallback___olua_move(lua_State *L) { olua_startinvoke(L); @@ -2308,18 +2647,27 @@ static int _b2QueryCallback___olua_move(lua_State *L) return 1; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_b2QueryCallback(lua_State *L) +static int _olua_cls_b2_interface_QueryCallback(lua_State *L) { oluacls_class(L, "b2.interface.QueryCallback"); - oluacls_func(L, "__gc", _b2QueryCallback___gc); - oluacls_func(L, "__olua_move", _b2QueryCallback___olua_move); + oluacls_func(L, "__gc", _olua_fun_b2QueryCallback___gc); + oluacls_func(L, "__olua_move", _olua_fun_b2QueryCallback___olua_move); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_b2_interface_QueryCallback(lua_State *L) +{ + olua_require(L, "box2d", luaopen_box2d); + if (!olua_getclass(L, "b2.interface.QueryCallback")) { + luaL_error(L, "class not found: b2QueryCallback"); + } return 1; } OLUA_END_DECLS -static int _b2RayCastCallback___gc(lua_State *L) +static int _olua_fun_b2RayCastCallback___gc(lua_State *L) { olua_startinvoke(L); @@ -2331,7 +2679,7 @@ static int _b2RayCastCallback___gc(lua_State *L) return 0; } -static int _b2RayCastCallback___olua_move(lua_State *L) +static int _olua_fun_b2RayCastCallback___olua_move(lua_State *L) { olua_startinvoke(L); @@ -2343,18 +2691,27 @@ static int _b2RayCastCallback___olua_move(lua_State *L) return 1; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_b2RayCastCallback(lua_State *L) +static int _olua_cls_b2_interface_RayCastCallback(lua_State *L) { oluacls_class(L, "b2.interface.RayCastCallback"); - oluacls_func(L, "__gc", _b2RayCastCallback___gc); - oluacls_func(L, "__olua_move", _b2RayCastCallback___olua_move); + oluacls_func(L, "__gc", _olua_fun_b2RayCastCallback___gc); + oluacls_func(L, "__olua_move", _olua_fun_b2RayCastCallback___olua_move); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_b2_interface_RayCastCallback(lua_State *L) +{ + olua_require(L, "box2d", luaopen_box2d); + if (!olua_getclass(L, "b2.interface.RayCastCallback")) { + luaL_error(L, "class not found: b2RayCastCallback"); + } return 1; } OLUA_END_DECLS -static int _box2d_Vec2Array___gc(lua_State *L) +static int _olua_fun_box2d_Vec2Array___gc(lua_State *L) { olua_startinvoke(L); @@ -2370,7 +2727,7 @@ static int _box2d_Vec2Array___gc(lua_State *L) return (int)ret; } -static int _box2d_Vec2Array___index(lua_State *L) +static int _olua_fun_box2d_Vec2Array___index(lua_State *L) { olua_startinvoke(L); @@ -2382,34 +2739,34 @@ static int _box2d_Vec2Array___index(lua_State *L) // b2Vec2 __index(unsigned int idx) b2Vec2 ret = self->__index(arg1); - int num_ret = olua_pushcopy_object(L, ret, "b2.Vec2"); + int num_ret = olua_copy_object(L, ret, "b2.Vec2"); olua_endinvoke(L); return num_ret; } -static int _box2d_Vec2Array___newindex(lua_State *L) +static int _olua_fun_box2d_Vec2Array___newindex(lua_State *L) { olua_startinvoke(L); box2d::Vec2Array *self = nullptr; unsigned int arg1 = 0; /** idx */ - b2Vec2 arg2; /** v */ + b2Vec2 *arg2; /** v */ olua_to_object(L, 1, &self, "b2.Vec2Array"); olua_check_integer(L, 2, &arg1); olua_check_object(L, 3, &arg2, "b2.Vec2"); // void __newindex(unsigned int idx, const b2Vec2 &v) - self->__newindex(arg1, arg2); + self->__newindex(arg1, *arg2); olua_endinvoke(L); return 0; } -static int _box2d_Vec2Array___olua_move(lua_State *L) +static int _olua_fun_box2d_Vec2Array___olua_move(lua_State *L) { olua_startinvoke(L); @@ -2421,27 +2778,41 @@ static int _box2d_Vec2Array___olua_move(lua_State *L) return 1; } -static int _box2d_Vec2Array_assign(lua_State *L) +static int _olua_fun_box2d_Vec2Array_buffer(lua_State *L) { olua_startinvoke(L); box2d::Vec2Array *self = nullptr; - const char *arg1 = nullptr; /** data */ - size_t arg2 = 0; /** len */ olua_to_object(L, 1, &self, "b2.Vec2Array"); - olua_check_string(L, 2, &arg1); - olua_check_integer(L, 3, &arg2); - // void assign(const char *data, size_t len) - self->assign(arg1, arg2); + // @getter @name(buffer) @type(void *) b2Vec2 *buffer() + void *ret = self->buffer(); + int num_ret = olua_push_object(L, ret, "void *"); olua_endinvoke(L); - return 0; + return num_ret; +} + +static int _olua_fun_box2d_Vec2Array_length(lua_State *L) +{ + olua_startinvoke(L); + + box2d::Vec2Array *self = nullptr; + + olua_to_object(L, 1, &self, "b2.Vec2Array"); + + // @getter @name(length) size_t length() + size_t ret = self->length(); + int num_ret = olua_push_integer(L, ret); + + olua_endinvoke(L); + + return num_ret; } -static int _box2d_Vec2Array_create$1(lua_State *L) +static int _olua_fun_box2d_Vec2Array_new$1(lua_State *L) { olua_startinvoke(L); @@ -2461,11 +2832,11 @@ static int _box2d_Vec2Array_create$1(lua_State *L) return num_ret; } -static int _box2d_Vec2Array_create$2(lua_State *L) +static int _olua_fun_box2d_Vec2Array_new$2(lua_State *L) { olua_startinvoke(L); - // @postnew @name(new) static box2d::Vec2Array *create(@optional size_t len) + // @postnew @name(new) static box2d::Vec2Array *create() box2d::Vec2Array *ret = box2d::Vec2Array::create(); int num_ret = olua_push_object(L, ret, "b2.Vec2Array"); @@ -2477,28 +2848,28 @@ static int _box2d_Vec2Array_create$2(lua_State *L) return num_ret; } -static int _box2d_Vec2Array_create(lua_State *L) +static int _olua_fun_box2d_Vec2Array_new(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 0) { - // @postnew @name(new) static box2d::Vec2Array *create(@optional size_t len) - return _box2d_Vec2Array_create$2(L); + // @postnew @name(new) static box2d::Vec2Array *create() + return _olua_fun_box2d_Vec2Array_new$2(L); } if (num_args == 1) { // if ((olua_is_integer(L, 1))) { // @postnew @name(new) static box2d::Vec2Array *create(@optional size_t len) - return _box2d_Vec2Array_create$1(L); + return _olua_fun_box2d_Vec2Array_new$1(L); // } } - luaL_error(L, "method 'box2d::Vec2Array::create' not support '%d' arguments", num_args); + luaL_error(L, "method 'box2d::Vec2Array::new' not support '%d' arguments", num_args); return 0; } -static int _box2d_Vec2Array_slice$1(lua_State *L) +static int _olua_fun_box2d_Vec2Array_slice$1(lua_State *L) { olua_startinvoke(L); @@ -2522,7 +2893,7 @@ static int _box2d_Vec2Array_slice$1(lua_State *L) return num_ret; } -static int _box2d_Vec2Array_slice$2(lua_State *L) +static int _olua_fun_box2d_Vec2Array_slice$2(lua_State *L) { olua_startinvoke(L); @@ -2532,7 +2903,7 @@ static int _box2d_Vec2Array_slice$2(lua_State *L) olua_to_object(L, 1, &self, "b2.Vec2Array"); olua_check_integer(L, 2, &arg1); - // @postnew box2d::Vec2Array *slice(size_t from, @optional size_t to) + // @postnew box2d::Vec2Array *slice(size_t from) box2d::Vec2Array *ret = self->slice(arg1); int num_ret = olua_push_object(L, ret, "b2.Vec2Array"); @@ -2544,21 +2915,21 @@ static int _box2d_Vec2Array_slice$2(lua_State *L) return num_ret; } -static int _box2d_Vec2Array_slice(lua_State *L) +static int _olua_fun_box2d_Vec2Array_slice(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_integer(L, 2))) { - // @postnew box2d::Vec2Array *slice(size_t from, @optional size_t to) - return _box2d_Vec2Array_slice$2(L); + // @postnew box2d::Vec2Array *slice(size_t from) + return _olua_fun_box2d_Vec2Array_slice$2(L); // } } if (num_args == 2) { // if ((olua_is_integer(L, 2)) && (olua_is_integer(L, 3))) { // @postnew box2d::Vec2Array *slice(size_t from, @optional size_t to) - return _box2d_Vec2Array_slice$1(L); + return _olua_fun_box2d_Vec2Array_slice$1(L); // } } @@ -2567,7 +2938,7 @@ static int _box2d_Vec2Array_slice(lua_State *L) return 0; } -static int _box2d_Vec2Array_sub$1(lua_State *L) +static int _olua_fun_box2d_Vec2Array_sub$1(lua_State *L) { olua_startinvoke(L); @@ -2591,7 +2962,7 @@ static int _box2d_Vec2Array_sub$1(lua_State *L) return num_ret; } -static int _box2d_Vec2Array_sub$2(lua_State *L) +static int _olua_fun_box2d_Vec2Array_sub$2(lua_State *L) { olua_startinvoke(L); @@ -2601,7 +2972,7 @@ static int _box2d_Vec2Array_sub$2(lua_State *L) olua_to_object(L, 1, &self, "b2.Vec2Array"); olua_check_integer(L, 2, &arg1); - // @postnew box2d::Vec2Array *sub(size_t from, @optional size_t to) + // @postnew box2d::Vec2Array *sub(size_t from) box2d::Vec2Array *ret = self->sub(arg1); int num_ret = olua_push_object(L, ret, "b2.Vec2Array"); @@ -2613,21 +2984,21 @@ static int _box2d_Vec2Array_sub$2(lua_State *L) return num_ret; } -static int _box2d_Vec2Array_sub(lua_State *L) +static int _olua_fun_box2d_Vec2Array_sub(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_integer(L, 2))) { - // @postnew box2d::Vec2Array *sub(size_t from, @optional size_t to) - return _box2d_Vec2Array_sub$2(L); + // @postnew box2d::Vec2Array *sub(size_t from) + return _olua_fun_box2d_Vec2Array_sub$2(L); // } } if (num_args == 2) { // if ((olua_is_integer(L, 2)) && (olua_is_integer(L, 3))) { // @postnew box2d::Vec2Array *sub(size_t from, @optional size_t to) - return _box2d_Vec2Array_sub$1(L); + return _olua_fun_box2d_Vec2Array_sub$1(L); // } } @@ -2636,7 +3007,7 @@ static int _box2d_Vec2Array_sub(lua_State *L) return 0; } -static int _box2d_Vec2Array_take(lua_State *L) +static int _olua_fun_box2d_Vec2Array_take(lua_State *L) { olua_startinvoke(L); @@ -2653,7 +3024,7 @@ static int _box2d_Vec2Array_take(lua_State *L) return num_ret; } -static int _box2d_Vec2Array_tostring(lua_State *L) +static int _olua_fun_box2d_Vec2Array_tostring(lua_State *L) { olua_startinvoke(L); @@ -2668,27 +3039,10 @@ static int _box2d_Vec2Array_tostring(lua_State *L) olua_endinvoke(L); - return (int)ret; -} - -static int _box2d_Vec2Array_length(lua_State *L) -{ - olua_startinvoke(L); - - box2d::Vec2Array *self = nullptr; - - olua_to_object(L, 1, &self, "b2.Vec2Array"); - - // @getter @name(length) size_t length() - size_t ret = self->length(); - int num_ret = olua_push_integer(L, ret); - - olua_endinvoke(L); - - return num_ret; + return (int)ret; } -static int _box2d_Vec2Array_rawdata(lua_State *L) +static int _olua_fun_box2d_Vec2Array_value$1(lua_State *L) { olua_startinvoke(L); @@ -2696,77 +3050,89 @@ static int _box2d_Vec2Array_rawdata(lua_State *L) olua_to_object(L, 1, &self, "b2.Vec2Array"); - // @getter @name(rawdata) void *rawdata() - void *ret = self->rawdata(); - int num_ret = olua_push_object(L, ret, "void *"); + // @getter @name(value) const b2Vec2 &value() + const b2Vec2 &ret = self->value(); + int num_ret = olua_push_object(L, ret, "b2.Vec2"); olua_endinvoke(L); return num_ret; } -static int _box2d_Vec2Array_size(lua_State *L) +static int _olua_fun_box2d_Vec2Array_value$2(lua_State *L) { olua_startinvoke(L); box2d::Vec2Array *self = nullptr; + b2Vec2 *arg1; /** v */ olua_to_object(L, 1, &self, "b2.Vec2Array"); + olua_check_object(L, 2, &arg1, "b2.Vec2"); - // @getter @name(sizeof) size_t size() - size_t ret = self->size(); - int num_ret = olua_push_integer(L, ret); + // @setter @name(value) void value(const b2Vec2 &v) + self->value(*arg1); olua_endinvoke(L); - return num_ret; + return 0; } -static int _box2d_Vec2Array_value(lua_State *L) +static int _olua_fun_box2d_Vec2Array_value(lua_State *L) { - olua_startinvoke(L); - - box2d::Vec2Array *self = nullptr; + int num_args = lua_gettop(L) - 1; - olua_to_object(L, 1, &self, "b2.Vec2Array"); + if (num_args == 0) { + // @getter @name(value) const b2Vec2 &value() + return _olua_fun_box2d_Vec2Array_value$1(L); + } - // @getter @name(value) const b2Vec2 &value() - const b2Vec2 &ret = self->value(); - int num_ret = olua_push_object(L, ret, "b2.Vec2"); + if (num_args == 1) { + // if ((olua_is_object(L, 2, "b2.Vec2"))) { + // @setter @name(value) void value(const b2Vec2 &v) + return _olua_fun_box2d_Vec2Array_value$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'box2d::Vec2Array::value' not support '%d' arguments", num_args); - return num_ret; + return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_box2d_Vec2Array(lua_State *L) +static int _olua_cls_b2_Vec2Array(lua_State *L) { oluacls_class(L, "b2.Vec2Array"); - oluacls_func(L, "__gc", _box2d_Vec2Array___gc); - oluacls_func(L, "__index", _box2d_Vec2Array___index); - oluacls_func(L, "__newindex", _box2d_Vec2Array___newindex); - oluacls_func(L, "__olua_move", _box2d_Vec2Array___olua_move); - oluacls_func(L, "assign", _box2d_Vec2Array_assign); - oluacls_func(L, "new", _box2d_Vec2Array_create); - oluacls_func(L, "slice", _box2d_Vec2Array_slice); - oluacls_func(L, "sub", _box2d_Vec2Array_sub); - oluacls_func(L, "take", _box2d_Vec2Array_take); - oluacls_func(L, "tostring", _box2d_Vec2Array_tostring); - oluacls_prop(L, "length", _box2d_Vec2Array_length, _box2d_Vec2Array_length); - oluacls_prop(L, "rawdata", _box2d_Vec2Array_rawdata, nullptr); - oluacls_prop(L, "sizeof", _box2d_Vec2Array_size, nullptr); - oluacls_prop(L, "value", _box2d_Vec2Array_value, _box2d_Vec2Array_value); + oluacls_func(L, "__gc", _olua_fun_box2d_Vec2Array___gc); + oluacls_func(L, "__index", _olua_fun_box2d_Vec2Array___index); + oluacls_func(L, "__newindex", _olua_fun_box2d_Vec2Array___newindex); + oluacls_func(L, "__olua_move", _olua_fun_box2d_Vec2Array___olua_move); + oluacls_func(L, "new", _olua_fun_box2d_Vec2Array_new); + oluacls_func(L, "slice", _olua_fun_box2d_Vec2Array_slice); + oluacls_func(L, "sub", _olua_fun_box2d_Vec2Array_sub); + oluacls_func(L, "take", _olua_fun_box2d_Vec2Array_take); + oluacls_func(L, "tostring", _olua_fun_box2d_Vec2Array_tostring); + oluacls_prop(L, "buffer", _olua_fun_box2d_Vec2Array_buffer, nullptr); + oluacls_prop(L, "length", _olua_fun_box2d_Vec2Array_length, nullptr); + oluacls_prop(L, "value", _olua_fun_box2d_Vec2Array_value, _olua_fun_box2d_Vec2Array_value); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_b2_Vec2Array(lua_State *L) +{ + olua_require(L, "box2d", luaopen_box2d); + if (!olua_getclass(L, "b2.Vec2Array")) { + luaL_error(L, "class not found: box2d::Vec2Array"); + } return 1; } OLUA_END_DECLS -static int _box2d_DestructionListener_new(lua_State *L) +static int _olua_fun_box2d_DestructionListener_new(lua_State *L) { olua_startinvoke(L); - // DestructionListener() + // box2d::DestructionListener() box2d::DestructionListener *ret = new box2d::DestructionListener(); int num_ret = olua_push_object(L, ret, "b2.DestructionListener"); olua_postnew(L, ret); @@ -2776,7 +3142,7 @@ static int _box2d_DestructionListener_new(lua_State *L) return num_ret; } -static int _box2d_DestructionListener_get_sayGoodbyeToFixture(lua_State *L) +static int _olua_fun_box2d_DestructionListener_sayGoodbyeToFixture$1(lua_State *L) { olua_startinvoke(L); @@ -2788,7 +3154,7 @@ static int _box2d_DestructionListener_get_sayGoodbyeToFixture(lua_State *L) std::string cb_tag = "sayGoodbyeToFixture"; olua_getcallback(L, cb_store, cb_tag.c_str(), OLUA_TAG_EQUAL); - // @nullable @localvar std::function sayGoodbyeToFixture + // std::function sayGoodbyeToFixture std::function ret = self->sayGoodbyeToFixture; int num_ret = olua_push_callback(L, &ret, "std.function"); @@ -2797,7 +3163,7 @@ static int _box2d_DestructionListener_get_sayGoodbyeToFixture(lua_State *L) return num_ret; } -static int _box2d_DestructionListener_set_sayGoodbyeToFixture(lua_State *L) +static int _olua_fun_box2d_DestructionListener_sayGoodbyeToFixture$2(lua_State *L) { olua_startinvoke(L); @@ -2813,9 +3179,10 @@ static int _box2d_DestructionListener_set_sayGoodbyeToFixture(lua_State *L) std::string cb_tag = "sayGoodbyeToFixture"; std::string cb_name; if (olua_isfunction(L, 2)) { - cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](b2Fixture *arg1) { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](b2Fixture *cb_arg1) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); @@ -2823,7 +3190,7 @@ static int _box2d_DestructionListener_set_sayGoodbyeToFixture(lua_State *L) int top = lua_gettop(L); size_t last = olua_push_objpool(L); olua_enable_objpool(L); - olua_push_object(L, arg1, "b2.Fixture"); + olua_push_object(L, cb_arg1, "b2.Fixture"); olua_disable_objpool(L); olua_callback(L, cb_store, cb_name.c_str(), 1); @@ -2838,7 +3205,7 @@ static int _box2d_DestructionListener_set_sayGoodbyeToFixture(lua_State *L) arg1 = nullptr; } - // @nullable @localvar std::function sayGoodbyeToFixture + // std::function sayGoodbyeToFixture self->sayGoodbyeToFixture = arg1; olua_endinvoke(L); @@ -2846,7 +3213,28 @@ static int _box2d_DestructionListener_set_sayGoodbyeToFixture(lua_State *L) return 0; } -static int _box2d_DestructionListener_get_sayGoodbyeToJoint(lua_State *L) +static int _olua_fun_box2d_DestructionListener_sayGoodbyeToFixture(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // std::function sayGoodbyeToFixture + return _olua_fun_box2d_DestructionListener_sayGoodbyeToFixture$1(L); + } + + if (num_args == 1) { + // if ((olua_is_callback(L, 2, "std.function") || olua_isnil(L, 2))) { + // std::function sayGoodbyeToFixture + return _olua_fun_box2d_DestructionListener_sayGoodbyeToFixture$2(L); + // } + } + + luaL_error(L, "method 'box2d::DestructionListener::sayGoodbyeToFixture' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_box2d_DestructionListener_sayGoodbyeToJoint$1(lua_State *L) { olua_startinvoke(L); @@ -2858,7 +3246,7 @@ static int _box2d_DestructionListener_get_sayGoodbyeToJoint(lua_State *L) std::string cb_tag = "sayGoodbyeToJoint"; olua_getcallback(L, cb_store, cb_tag.c_str(), OLUA_TAG_EQUAL); - // @nullable @localvar std::function sayGoodbyeToJoint + // std::function sayGoodbyeToJoint std::function ret = self->sayGoodbyeToJoint; int num_ret = olua_push_callback(L, &ret, "std.function"); @@ -2867,7 +3255,7 @@ static int _box2d_DestructionListener_get_sayGoodbyeToJoint(lua_State *L) return num_ret; } -static int _box2d_DestructionListener_set_sayGoodbyeToJoint(lua_State *L) +static int _olua_fun_box2d_DestructionListener_sayGoodbyeToJoint$2(lua_State *L) { olua_startinvoke(L); @@ -2883,9 +3271,10 @@ static int _box2d_DestructionListener_set_sayGoodbyeToJoint(lua_State *L) std::string cb_tag = "sayGoodbyeToJoint"; std::string cb_name; if (olua_isfunction(L, 2)) { - cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](b2Joint *arg1) { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](b2Joint *cb_arg1) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); @@ -2893,7 +3282,7 @@ static int _box2d_DestructionListener_set_sayGoodbyeToJoint(lua_State *L) int top = lua_gettop(L); size_t last = olua_push_objpool(L); olua_enable_objpool(L); - olua_push_object(L, arg1, "b2.Joint"); + olua_push_object(L, cb_arg1, "b2.Joint"); olua_disable_objpool(L); olua_callback(L, cb_store, cb_name.c_str(), 1); @@ -2908,7 +3297,7 @@ static int _box2d_DestructionListener_set_sayGoodbyeToJoint(lua_State *L) arg1 = nullptr; } - // @nullable @localvar std::function sayGoodbyeToJoint + // std::function sayGoodbyeToJoint self->sayGoodbyeToJoint = arg1; olua_endinvoke(L); @@ -2916,23 +3305,53 @@ static int _box2d_DestructionListener_set_sayGoodbyeToJoint(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_box2d_DestructionListener(lua_State *L) +static int _olua_fun_box2d_DestructionListener_sayGoodbyeToJoint(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // std::function sayGoodbyeToJoint + return _olua_fun_box2d_DestructionListener_sayGoodbyeToJoint$1(L); + } + + if (num_args == 1) { + // if ((olua_is_callback(L, 2, "std.function") || olua_isnil(L, 2))) { + // std::function sayGoodbyeToJoint + return _olua_fun_box2d_DestructionListener_sayGoodbyeToJoint$2(L); + // } + } + + luaL_error(L, "method 'box2d::DestructionListener::sayGoodbyeToJoint' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_cls_b2_DestructionListener(lua_State *L) { oluacls_class(L, "b2.DestructionListener"); - oluacls_func(L, "new", _box2d_DestructionListener_new); - oluacls_prop(L, "sayGoodbyeToFixture", _box2d_DestructionListener_get_sayGoodbyeToFixture, _box2d_DestructionListener_set_sayGoodbyeToFixture); - oluacls_prop(L, "sayGoodbyeToJoint", _box2d_DestructionListener_get_sayGoodbyeToJoint, _box2d_DestructionListener_set_sayGoodbyeToJoint); + oluacls_func(L, "new", _olua_fun_box2d_DestructionListener_new); + oluacls_prop(L, "sayGoodbyeToFixture", _olua_fun_box2d_DestructionListener_sayGoodbyeToFixture, _olua_fun_box2d_DestructionListener_sayGoodbyeToFixture); + oluacls_prop(L, "sayGoodbyeToJoint", _olua_fun_box2d_DestructionListener_sayGoodbyeToJoint, _olua_fun_box2d_DestructionListener_sayGoodbyeToJoint); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_b2_DestructionListener(lua_State *L) +{ + olua_require(L, "box2d", luaopen_box2d); + if (!olua_getclass(L, "b2.DestructionListener")) { + luaL_error(L, "class not found: box2d::DestructionListener"); + } return 1; } OLUA_END_DECLS -static int _box2d_ContactFilter_new(lua_State *L) +static int _olua_fun_box2d_ContactFilter_new(lua_State *L) { olua_startinvoke(L); - // ContactFilter() + // box2d::ContactFilter() box2d::ContactFilter *ret = new box2d::ContactFilter(); int num_ret = olua_push_object(L, ret, "b2.ContactFilter"); olua_postnew(L, ret); @@ -2942,7 +3361,7 @@ static int _box2d_ContactFilter_new(lua_State *L) return num_ret; } -static int _box2d_ContactFilter_get_shouldCollide(lua_State *L) +static int _olua_fun_box2d_ContactFilter_shouldCollide$1(lua_State *L) { olua_startinvoke(L); @@ -2954,7 +3373,7 @@ static int _box2d_ContactFilter_get_shouldCollide(lua_State *L) std::string cb_tag = "shouldCollide"; olua_getcallback(L, cb_store, cb_tag.c_str(), OLUA_TAG_EQUAL); - // @nullable @localvar std::function shouldCollide + // std::function shouldCollide std::function ret = self->shouldCollide; int num_ret = olua_push_callback(L, &ret, "std.function"); @@ -2963,7 +3382,7 @@ static int _box2d_ContactFilter_get_shouldCollide(lua_State *L) return num_ret; } -static int _box2d_ContactFilter_set_shouldCollide(lua_State *L) +static int _olua_fun_box2d_ContactFilter_shouldCollide$2(lua_State *L) { olua_startinvoke(L); @@ -2979,9 +3398,10 @@ static int _box2d_ContactFilter_set_shouldCollide(lua_State *L) std::string cb_tag = "shouldCollide"; std::string cb_name; if (olua_isfunction(L, 2)) { - cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](b2Fixture *arg1, b2Fixture *arg2) { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](b2Fixture *cb_arg1, b2Fixture *cb_arg2) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); bool ret = false; /** ret */ @@ -2989,8 +3409,8 @@ static int _box2d_ContactFilter_set_shouldCollide(lua_State *L) int top = lua_gettop(L); size_t last = olua_push_objpool(L); olua_enable_objpool(L); - olua_push_object(L, arg1, "b2.Fixture"); - olua_push_object(L, arg2, "b2.Fixture"); + olua_push_object(L, cb_arg1, "b2.Fixture"); + olua_push_object(L, cb_arg2, "b2.Fixture"); olua_disable_objpool(L); olua_callback(L, cb_store, cb_name.c_str(), 2); @@ -3010,7 +3430,7 @@ static int _box2d_ContactFilter_set_shouldCollide(lua_State *L) arg1 = nullptr; } - // @nullable @localvar std::function shouldCollide + // std::function shouldCollide self->shouldCollide = arg1; olua_endinvoke(L); @@ -3018,32 +3438,48 @@ static int _box2d_ContactFilter_set_shouldCollide(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_box2d_ContactFilter(lua_State *L) +static int _olua_fun_box2d_ContactFilter_shouldCollide(lua_State *L) { - oluacls_class(L, "b2.ContactFilter"); - oluacls_func(L, "new", _box2d_ContactFilter_new); - oluacls_prop(L, "shouldCollide", _box2d_ContactFilter_get_shouldCollide, _box2d_ContactFilter_set_shouldCollide); + int num_args = lua_gettop(L) - 1; - return 1; + if (num_args == 0) { + // std::function shouldCollide + return _olua_fun_box2d_ContactFilter_shouldCollide$1(L); + } + + if (num_args == 1) { + // if ((olua_is_callback(L, 2, "std.function") || olua_isnil(L, 2))) { + // std::function shouldCollide + return _olua_fun_box2d_ContactFilter_shouldCollide$2(L); + // } + } + + luaL_error(L, "method 'box2d::ContactFilter::shouldCollide' not support '%d' arguments", num_args); + + return 0; } -OLUA_END_DECLS -static int _box2d_ContactListener_new(lua_State *L) +static int _olua_cls_b2_ContactFilter(lua_State *L) { - olua_startinvoke(L); - - // ContactListener() - box2d::ContactListener *ret = new box2d::ContactListener(); - int num_ret = olua_push_object(L, ret, "b2.ContactListener"); - olua_postnew(L, ret); + oluacls_class(L, "b2.ContactFilter"); + oluacls_func(L, "new", _olua_fun_box2d_ContactFilter_new); + oluacls_prop(L, "shouldCollide", _olua_fun_box2d_ContactFilter_shouldCollide, _olua_fun_box2d_ContactFilter_shouldCollide); - olua_endinvoke(L); + return 1; +} - return num_ret; +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_b2_ContactFilter(lua_State *L) +{ + olua_require(L, "box2d", luaopen_box2d); + if (!olua_getclass(L, "b2.ContactFilter")) { + luaL_error(L, "class not found: box2d::ContactFilter"); + } + return 1; } +OLUA_END_DECLS -static int _box2d_ContactListener_get_beginContact(lua_State *L) +static int _olua_fun_box2d_ContactListener_beginContact$1(lua_State *L) { olua_startinvoke(L); @@ -3055,7 +3491,7 @@ static int _box2d_ContactListener_get_beginContact(lua_State *L) std::string cb_tag = "beginContact"; olua_getcallback(L, cb_store, cb_tag.c_str(), OLUA_TAG_EQUAL); - // @nullable @localvar std::function beginContact + // std::function beginContact std::function ret = self->beginContact; int num_ret = olua_push_callback(L, &ret, "std.function"); @@ -3064,7 +3500,7 @@ static int _box2d_ContactListener_get_beginContact(lua_State *L) return num_ret; } -static int _box2d_ContactListener_set_beginContact(lua_State *L) +static int _olua_fun_box2d_ContactListener_beginContact$2(lua_State *L) { olua_startinvoke(L); @@ -3080,9 +3516,10 @@ static int _box2d_ContactListener_set_beginContact(lua_State *L) std::string cb_tag = "beginContact"; std::string cb_name; if (olua_isfunction(L, 2)) { - cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](b2Contact *arg1) { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](b2Contact *cb_arg1) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); @@ -3090,7 +3527,7 @@ static int _box2d_ContactListener_set_beginContact(lua_State *L) int top = lua_gettop(L); size_t last = olua_push_objpool(L); olua_enable_objpool(L); - olua_push_object(L, arg1, "b2.Contact"); + olua_push_object(L, cb_arg1, "b2.Contact"); olua_disable_objpool(L); olua_callback(L, cb_store, cb_name.c_str(), 1); @@ -3105,7 +3542,7 @@ static int _box2d_ContactListener_set_beginContact(lua_State *L) arg1 = nullptr; } - // @nullable @localvar std::function beginContact + // std::function beginContact self->beginContact = arg1; olua_endinvoke(L); @@ -3113,7 +3550,28 @@ static int _box2d_ContactListener_set_beginContact(lua_State *L) return 0; } -static int _box2d_ContactListener_get_endContact(lua_State *L) +static int _olua_fun_box2d_ContactListener_beginContact(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // std::function beginContact + return _olua_fun_box2d_ContactListener_beginContact$1(L); + } + + if (num_args == 1) { + // if ((olua_is_callback(L, 2, "std.function") || olua_isnil(L, 2))) { + // std::function beginContact + return _olua_fun_box2d_ContactListener_beginContact$2(L); + // } + } + + luaL_error(L, "method 'box2d::ContactListener::beginContact' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_box2d_ContactListener_endContact$1(lua_State *L) { olua_startinvoke(L); @@ -3125,7 +3583,7 @@ static int _box2d_ContactListener_get_endContact(lua_State *L) std::string cb_tag = "endContact"; olua_getcallback(L, cb_store, cb_tag.c_str(), OLUA_TAG_EQUAL); - // @nullable @localvar std::function endContact + // std::function endContact std::function ret = self->endContact; int num_ret = olua_push_callback(L, &ret, "std.function"); @@ -3134,7 +3592,7 @@ static int _box2d_ContactListener_get_endContact(lua_State *L) return num_ret; } -static int _box2d_ContactListener_set_endContact(lua_State *L) +static int _olua_fun_box2d_ContactListener_endContact$2(lua_State *L) { olua_startinvoke(L); @@ -3150,9 +3608,10 @@ static int _box2d_ContactListener_set_endContact(lua_State *L) std::string cb_tag = "endContact"; std::string cb_name; if (olua_isfunction(L, 2)) { - cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](b2Contact *arg1) { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](b2Contact *cb_arg1) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); @@ -3160,7 +3619,7 @@ static int _box2d_ContactListener_set_endContact(lua_State *L) int top = lua_gettop(L); size_t last = olua_push_objpool(L); olua_enable_objpool(L); - olua_push_object(L, arg1, "b2.Contact"); + olua_push_object(L, cb_arg1, "b2.Contact"); olua_disable_objpool(L); olua_callback(L, cb_store, cb_name.c_str(), 1); @@ -3175,7 +3634,7 @@ static int _box2d_ContactListener_set_endContact(lua_State *L) arg1 = nullptr; } - // @nullable @localvar std::function endContact + // std::function endContact self->endContact = arg1; olua_endinvoke(L); @@ -3183,7 +3642,42 @@ static int _box2d_ContactListener_set_endContact(lua_State *L) return 0; } -static int _box2d_ContactListener_get_postSolve(lua_State *L) +static int _olua_fun_box2d_ContactListener_endContact(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // std::function endContact + return _olua_fun_box2d_ContactListener_endContact$1(L); + } + + if (num_args == 1) { + // if ((olua_is_callback(L, 2, "std.function") || olua_isnil(L, 2))) { + // std::function endContact + return _olua_fun_box2d_ContactListener_endContact$2(L); + // } + } + + luaL_error(L, "method 'box2d::ContactListener::endContact' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_box2d_ContactListener_new(lua_State *L) +{ + olua_startinvoke(L); + + // box2d::ContactListener() + box2d::ContactListener *ret = new box2d::ContactListener(); + int num_ret = olua_push_object(L, ret, "b2.ContactListener"); + olua_postnew(L, ret); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_box2d_ContactListener_postSolve$1(lua_State *L) { olua_startinvoke(L); @@ -3195,7 +3689,7 @@ static int _box2d_ContactListener_get_postSolve(lua_State *L) std::string cb_tag = "postSolve"; olua_getcallback(L, cb_store, cb_tag.c_str(), OLUA_TAG_EQUAL); - // @nullable @localvar std::function postSolve + // std::function postSolve std::function ret = self->postSolve; int num_ret = olua_push_callback(L, &ret, "std.function"); @@ -3204,7 +3698,7 @@ static int _box2d_ContactListener_get_postSolve(lua_State *L) return num_ret; } -static int _box2d_ContactListener_set_postSolve(lua_State *L) +static int _olua_fun_box2d_ContactListener_postSolve$2(lua_State *L) { olua_startinvoke(L); @@ -3220,9 +3714,10 @@ static int _box2d_ContactListener_set_postSolve(lua_State *L) std::string cb_tag = "postSolve"; std::string cb_name; if (olua_isfunction(L, 2)) { - cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](b2Contact *arg1, const b2ContactImpulse *arg2) { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](b2Contact *cb_arg1, const b2ContactImpulse *cb_arg2) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); @@ -3230,8 +3725,8 @@ static int _box2d_ContactListener_set_postSolve(lua_State *L) int top = lua_gettop(L); size_t last = olua_push_objpool(L); olua_enable_objpool(L); - olua_push_object(L, arg1, "b2.Contact"); - olua_push_object(L, arg2, "b2.ContactImpulse"); + olua_push_object(L, cb_arg1, "b2.Contact"); + olua_push_object(L, cb_arg2, "b2.ContactImpulse"); olua_disable_objpool(L); olua_callback(L, cb_store, cb_name.c_str(), 2); @@ -3246,7 +3741,7 @@ static int _box2d_ContactListener_set_postSolve(lua_State *L) arg1 = nullptr; } - // @nullable @localvar std::function postSolve + // std::function postSolve self->postSolve = arg1; olua_endinvoke(L); @@ -3254,7 +3749,28 @@ static int _box2d_ContactListener_set_postSolve(lua_State *L) return 0; } -static int _box2d_ContactListener_get_preSolve(lua_State *L) +static int _olua_fun_box2d_ContactListener_postSolve(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // std::function postSolve + return _olua_fun_box2d_ContactListener_postSolve$1(L); + } + + if (num_args == 1) { + // if ((olua_is_callback(L, 2, "std.function") || olua_isnil(L, 2))) { + // std::function postSolve + return _olua_fun_box2d_ContactListener_postSolve$2(L); + // } + } + + luaL_error(L, "method 'box2d::ContactListener::postSolve' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_box2d_ContactListener_preSolve$1(lua_State *L) { olua_startinvoke(L); @@ -3266,7 +3782,7 @@ static int _box2d_ContactListener_get_preSolve(lua_State *L) std::string cb_tag = "preSolve"; olua_getcallback(L, cb_store, cb_tag.c_str(), OLUA_TAG_EQUAL); - // @nullable @localvar std::function preSolve + // std::function preSolve std::function ret = self->preSolve; int num_ret = olua_push_callback(L, &ret, "std.function"); @@ -3275,7 +3791,7 @@ static int _box2d_ContactListener_get_preSolve(lua_State *L) return num_ret; } -static int _box2d_ContactListener_set_preSolve(lua_State *L) +static int _olua_fun_box2d_ContactListener_preSolve$2(lua_State *L) { olua_startinvoke(L); @@ -3291,9 +3807,10 @@ static int _box2d_ContactListener_set_preSolve(lua_State *L) std::string cb_tag = "preSolve"; std::string cb_name; if (olua_isfunction(L, 2)) { - cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](b2Contact *arg1, const b2Manifold *arg2) { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](b2Contact *cb_arg1, const b2Manifold *cb_arg2) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); @@ -3301,8 +3818,8 @@ static int _box2d_ContactListener_set_preSolve(lua_State *L) int top = lua_gettop(L); size_t last = olua_push_objpool(L); olua_enable_objpool(L); - olua_push_object(L, arg1, "b2.Contact"); - olua_push_object(L, arg2, "b2.Manifold"); + olua_push_object(L, cb_arg1, "b2.Contact"); + olua_push_object(L, cb_arg2, "b2.Manifold"); olua_disable_objpool(L); olua_callback(L, cb_store, cb_name.c_str(), 2); @@ -3317,7 +3834,7 @@ static int _box2d_ContactListener_set_preSolve(lua_State *L) arg1 = nullptr; } - // @nullable @localvar std::function preSolve + // std::function preSolve self->preSolve = arg1; olua_endinvoke(L); @@ -3325,25 +3842,55 @@ static int _box2d_ContactListener_set_preSolve(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_box2d_ContactListener(lua_State *L) +static int _olua_fun_box2d_ContactListener_preSolve(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // std::function preSolve + return _olua_fun_box2d_ContactListener_preSolve$1(L); + } + + if (num_args == 1) { + // if ((olua_is_callback(L, 2, "std.function") || olua_isnil(L, 2))) { + // std::function preSolve + return _olua_fun_box2d_ContactListener_preSolve$2(L); + // } + } + + luaL_error(L, "method 'box2d::ContactListener::preSolve' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_cls_b2_ContactListener(lua_State *L) { oluacls_class(L, "b2.ContactListener"); - oluacls_func(L, "new", _box2d_ContactListener_new); - oluacls_prop(L, "beginContact", _box2d_ContactListener_get_beginContact, _box2d_ContactListener_set_beginContact); - oluacls_prop(L, "endContact", _box2d_ContactListener_get_endContact, _box2d_ContactListener_set_endContact); - oluacls_prop(L, "postSolve", _box2d_ContactListener_get_postSolve, _box2d_ContactListener_set_postSolve); - oluacls_prop(L, "preSolve", _box2d_ContactListener_get_preSolve, _box2d_ContactListener_set_preSolve); + oluacls_func(L, "new", _olua_fun_box2d_ContactListener_new); + oluacls_prop(L, "beginContact", _olua_fun_box2d_ContactListener_beginContact, _olua_fun_box2d_ContactListener_beginContact); + oluacls_prop(L, "endContact", _olua_fun_box2d_ContactListener_endContact, _olua_fun_box2d_ContactListener_endContact); + oluacls_prop(L, "postSolve", _olua_fun_box2d_ContactListener_postSolve, _olua_fun_box2d_ContactListener_postSolve); + oluacls_prop(L, "preSolve", _olua_fun_box2d_ContactListener_preSolve, _olua_fun_box2d_ContactListener_preSolve); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_b2_ContactListener(lua_State *L) +{ + olua_require(L, "box2d", luaopen_box2d); + if (!olua_getclass(L, "b2.ContactListener")) { + luaL_error(L, "class not found: box2d::ContactListener"); + } return 1; } OLUA_END_DECLS -static int _box2d_QueryCallback_new(lua_State *L) +static int _olua_fun_box2d_QueryCallback_new(lua_State *L) { olua_startinvoke(L); - // QueryCallback() + // box2d::QueryCallback() box2d::QueryCallback *ret = new box2d::QueryCallback(); int num_ret = olua_push_object(L, ret, "b2.QueryCallback"); olua_postnew(L, ret); @@ -3353,7 +3900,7 @@ static int _box2d_QueryCallback_new(lua_State *L) return num_ret; } -static int _box2d_QueryCallback_get_reportFixture(lua_State *L) +static int _olua_fun_box2d_QueryCallback_reportFixture$1(lua_State *L) { olua_startinvoke(L); @@ -3365,7 +3912,7 @@ static int _box2d_QueryCallback_get_reportFixture(lua_State *L) std::string cb_tag = "reportFixture"; olua_getcallback(L, cb_store, cb_tag.c_str(), OLUA_TAG_EQUAL); - // @nullable @localvar std::function reportFixture + // std::function reportFixture std::function ret = self->reportFixture; int num_ret = olua_push_callback(L, &ret, "std.function"); @@ -3374,7 +3921,7 @@ static int _box2d_QueryCallback_get_reportFixture(lua_State *L) return num_ret; } -static int _box2d_QueryCallback_set_reportFixture(lua_State *L) +static int _olua_fun_box2d_QueryCallback_reportFixture$2(lua_State *L) { olua_startinvoke(L); @@ -3390,9 +3937,10 @@ static int _box2d_QueryCallback_set_reportFixture(lua_State *L) std::string cb_tag = "reportFixture"; std::string cb_name; if (olua_isfunction(L, 2)) { - cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](b2Fixture *arg1) { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](b2Fixture *cb_arg1) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); bool ret = false; /** ret */ @@ -3400,7 +3948,7 @@ static int _box2d_QueryCallback_set_reportFixture(lua_State *L) int top = lua_gettop(L); size_t last = olua_push_objpool(L); olua_enable_objpool(L); - olua_push_object(L, arg1, "b2.Fixture"); + olua_push_object(L, cb_arg1, "b2.Fixture"); olua_disable_objpool(L); olua_callback(L, cb_store, cb_name.c_str(), 1); @@ -3420,7 +3968,7 @@ static int _box2d_QueryCallback_set_reportFixture(lua_State *L) arg1 = nullptr; } - // @nullable @localvar std::function reportFixture + // std::function reportFixture self->reportFixture = arg1; olua_endinvoke(L); @@ -3428,22 +3976,52 @@ static int _box2d_QueryCallback_set_reportFixture(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_box2d_QueryCallback(lua_State *L) +static int _olua_fun_box2d_QueryCallback_reportFixture(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // std::function reportFixture + return _olua_fun_box2d_QueryCallback_reportFixture$1(L); + } + + if (num_args == 1) { + // if ((olua_is_callback(L, 2, "std.function") || olua_isnil(L, 2))) { + // std::function reportFixture + return _olua_fun_box2d_QueryCallback_reportFixture$2(L); + // } + } + + luaL_error(L, "method 'box2d::QueryCallback::reportFixture' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_cls_b2_QueryCallback(lua_State *L) { oluacls_class(L, "b2.QueryCallback"); - oluacls_func(L, "new", _box2d_QueryCallback_new); - oluacls_prop(L, "reportFixture", _box2d_QueryCallback_get_reportFixture, _box2d_QueryCallback_set_reportFixture); + oluacls_func(L, "new", _olua_fun_box2d_QueryCallback_new); + oluacls_prop(L, "reportFixture", _olua_fun_box2d_QueryCallback_reportFixture, _olua_fun_box2d_QueryCallback_reportFixture); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_b2_QueryCallback(lua_State *L) +{ + olua_require(L, "box2d", luaopen_box2d); + if (!olua_getclass(L, "b2.QueryCallback")) { + luaL_error(L, "class not found: box2d::QueryCallback"); + } return 1; } OLUA_END_DECLS -static int _box2d_RayCastCallback_new(lua_State *L) +static int _olua_fun_box2d_RayCastCallback_new(lua_State *L) { olua_startinvoke(L); - // RayCastCallback() + // box2d::RayCastCallback() box2d::RayCastCallback *ret = new box2d::RayCastCallback(); int num_ret = olua_push_object(L, ret, "b2.RayCastCallback"); olua_postnew(L, ret); @@ -3453,7 +4031,7 @@ static int _box2d_RayCastCallback_new(lua_State *L) return num_ret; } -static int _box2d_RayCastCallback_get_reportFixture(lua_State *L) +static int _olua_fun_box2d_RayCastCallback_reportFixture$1(lua_State *L) { olua_startinvoke(L); @@ -3465,7 +4043,7 @@ static int _box2d_RayCastCallback_get_reportFixture(lua_State *L) std::string cb_tag = "reportFixture"; olua_getcallback(L, cb_store, cb_tag.c_str(), OLUA_TAG_EQUAL); - // @nullable @localvar std::function reportFixture + // std::function reportFixture std::function ret = self->reportFixture; int num_ret = olua_push_callback(L, &ret, "std.function"); @@ -3474,7 +4052,7 @@ static int _box2d_RayCastCallback_get_reportFixture(lua_State *L) return num_ret; } -static int _box2d_RayCastCallback_set_reportFixture(lua_State *L) +static int _olua_fun_box2d_RayCastCallback_reportFixture$2(lua_State *L) { olua_startinvoke(L); @@ -3490,9 +4068,10 @@ static int _box2d_RayCastCallback_set_reportFixture(lua_State *L) std::string cb_tag = "reportFixture"; std::string cb_name; if (olua_isfunction(L, 2)) { - cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](b2Fixture *arg1, const b2Vec2 &arg2, const b2Vec2 &arg3, float arg4) { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](b2Fixture *cb_arg1, const b2Vec2 &cb_arg2, const b2Vec2 &cb_arg3, float cb_arg4) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); float ret = 0; /** ret */ @@ -3500,10 +4079,10 @@ static int _box2d_RayCastCallback_set_reportFixture(lua_State *L) int top = lua_gettop(L); size_t last = olua_push_objpool(L); olua_enable_objpool(L); - olua_push_object(L, arg1, "b2.Fixture"); - olua_push_object(L, arg2, "b2.Vec2"); - olua_push_object(L, arg3, "b2.Vec2"); - olua_push_number(L, arg4); + olua_push_object(L, cb_arg1, "b2.Fixture"); + olua_push_object(L, cb_arg2, "b2.Vec2"); + olua_push_object(L, cb_arg3, "b2.Vec2"); + olua_push_number(L, cb_arg4); olua_disable_objpool(L); olua_callback(L, cb_store, cb_name.c_str(), 4); @@ -3523,7 +4102,7 @@ static int _box2d_RayCastCallback_set_reportFixture(lua_State *L) arg1 = nullptr; } - // @nullable @localvar std::function reportFixture + // std::function reportFixture self->reportFixture = arg1; olua_endinvoke(L); @@ -3531,19 +4110,48 @@ static int _box2d_RayCastCallback_set_reportFixture(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_box2d_RayCastCallback(lua_State *L) +static int _olua_fun_box2d_RayCastCallback_reportFixture(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // std::function reportFixture + return _olua_fun_box2d_RayCastCallback_reportFixture$1(L); + } + + if (num_args == 1) { + // if ((olua_is_callback(L, 2, "std.function") || olua_isnil(L, 2))) { + // std::function reportFixture + return _olua_fun_box2d_RayCastCallback_reportFixture$2(L); + // } + } + + luaL_error(L, "method 'box2d::RayCastCallback::reportFixture' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_cls_b2_RayCastCallback(lua_State *L) { oluacls_class(L, "b2.RayCastCallback"); - oluacls_func(L, "new", _box2d_RayCastCallback_new); - oluacls_prop(L, "reportFixture", _box2d_RayCastCallback_get_reportFixture, _box2d_RayCastCallback_set_reportFixture); + oluacls_func(L, "new", _olua_fun_box2d_RayCastCallback_new); + oluacls_prop(L, "reportFixture", _olua_fun_box2d_RayCastCallback_reportFixture, _olua_fun_box2d_RayCastCallback_reportFixture); return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_box2d_DebugNode_Flags(lua_State *L) +OLUA_LIB int luaopen_b2_RayCastCallback(lua_State *L) +{ + olua_require(L, "box2d", luaopen_box2d); + if (!olua_getclass(L, "b2.RayCastCallback")) { + luaL_error(L, "class not found: box2d::RayCastCallback"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_b2_DebugNode_Flags(lua_State *L) { oluacls_class(L, "b2.DebugNode.Flags"); oluacls_func(L, "__index", olua_indexerror); @@ -3556,9 +4164,19 @@ OLUA_LIB int luaopen_box2d_DebugNode_Flags(lua_State *L) return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_b2_DebugNode_Flags(lua_State *L) +{ + olua_require(L, "box2d", luaopen_box2d); + if (!olua_getclass(L, "b2.DebugNode.Flags")) { + luaL_error(L, "class not found: box2d::DebugNode::Flags"); + } + return 1; +} OLUA_END_DECLS -static int _box2d_DebugNode_appendFlags(lua_State *L) +static int _olua_fun_box2d_DebugNode_appendFlags(lua_State *L) { olua_startinvoke(L); @@ -3576,7 +4194,7 @@ static int _box2d_DebugNode_appendFlags(lua_State *L) return 0; } -static int _box2d_DebugNode_as(lua_State *L) +static int _olua_fun_box2d_DebugNode_as(lua_State *L) { olua_startinvoke(L); @@ -3604,7 +4222,7 @@ static int _box2d_DebugNode_as(lua_State *L) return 1; } -static int _box2d_DebugNode_clearFlags(lua_State *L) +static int _olua_fun_box2d_DebugNode_clearFlags(lua_State *L) { olua_startinvoke(L); @@ -3622,7 +4240,7 @@ static int _box2d_DebugNode_clearFlags(lua_State *L) return 0; } -static int _box2d_DebugNode_create(lua_State *L) +static int _olua_fun_box2d_DebugNode_create(lua_State *L) { olua_startinvoke(L); @@ -3642,7 +4260,7 @@ static int _box2d_DebugNode_create(lua_State *L) return num_ret; } -static int _box2d_DebugNode_getFlags(lua_State *L) +static int _olua_fun_box2d_DebugNode_getFlags(lua_State *L) { olua_startinvoke(L); @@ -3659,99 +4277,50 @@ static int _box2d_DebugNode_getFlags(lua_State *L) return num_ret; } -static int _box2d_DebugNode_setFlags(lua_State *L) +static int _olua_fun_box2d_DebugNode_setFlags(lua_State *L) { olua_startinvoke(L); box2d::DebugNode *self = nullptr; - uint32 arg1 = 0; /** flags */ - - olua_to_object(L, 1, &self, "b2.DebugNode"); - olua_check_integer(L, 2, &arg1); - - // void setFlags(uint32 flags) - self->setFlags(arg1); - - olua_endinvoke(L); - - return 0; -} - -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_box2d_DebugNode(lua_State *L) -{ - oluacls_class(L, "b2.DebugNode"); - oluacls_func(L, "appendFlags", _box2d_DebugNode_appendFlags); - oluacls_func(L, "as", _box2d_DebugNode_as); - oluacls_func(L, "clearFlags", _box2d_DebugNode_clearFlags); - oluacls_func(L, "create", _box2d_DebugNode_create); - oluacls_func(L, "getFlags", _box2d_DebugNode_getFlags); - oluacls_func(L, "setFlags", _box2d_DebugNode_setFlags); - oluacls_prop(L, "flags", _box2d_DebugNode_getFlags, _box2d_DebugNode_setFlags); - - return 1; -} -OLUA_END_DECLS - -static int _b2MassData___call(lua_State *L) -{ - olua_startinvoke(L); - - b2MassData ret; - - luaL_checktype(L, 2, LUA_TTABLE); - - float arg1 = 0; /** mass */ - b2Vec2 arg2; /** center */ - float arg3 = 0; /** I */ - - olua_getfield(L, 2, "mass"); - olua_check_number(L, -1, &arg1); - ret.mass = arg1; - lua_pop(L, 1); - - olua_getfield(L, 2, "center"); - olua_check_object(L, -1, &arg2, "b2.Vec2"); - ret.center = arg2; - lua_pop(L, 1); - - olua_getfield(L, 2, "I"); - olua_check_number(L, -1, &arg3); - ret.I = arg3; - lua_pop(L, 1); - - olua_pushcopy_object(L, ret, "b2.MassData"); - - olua_endinvoke(L); - - return 1; -} + uint32 arg1 = 0; /** flags */ -static int _b2MassData___gc(lua_State *L) -{ - olua_startinvoke(L); + olua_to_object(L, 1, &self, "b2.DebugNode"); + olua_check_integer(L, 2, &arg1); - auto self = (b2MassData *)olua_toobj(L, 1, "b2.MassData"); - olua_postgc(L, self); + // void setFlags(uint32 flags) + self->setFlags(arg1); olua_endinvoke(L); return 0; } -static int _b2MassData___olua_move(lua_State *L) +static int _olua_cls_b2_DebugNode(lua_State *L) { - olua_startinvoke(L); - - auto self = (b2MassData *)olua_toobj(L, 1, "b2.MassData"); - olua_push_object(L, self, "b2.MassData"); + oluacls_class(L, "b2.DebugNode"); + oluacls_func(L, "appendFlags", _olua_fun_box2d_DebugNode_appendFlags); + oluacls_func(L, "as", _olua_fun_box2d_DebugNode_as); + oluacls_func(L, "clearFlags", _olua_fun_box2d_DebugNode_clearFlags); + oluacls_func(L, "create", _olua_fun_box2d_DebugNode_create); + oluacls_func(L, "getFlags", _olua_fun_box2d_DebugNode_getFlags); + oluacls_func(L, "setFlags", _olua_fun_box2d_DebugNode_setFlags); + oluacls_prop(L, "flags", _olua_fun_box2d_DebugNode_getFlags, _olua_fun_box2d_DebugNode_setFlags); - olua_endinvoke(L); + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_b2_DebugNode(lua_State *L) +{ + olua_require(L, "box2d", luaopen_box2d); + if (!olua_getclass(L, "b2.DebugNode")) { + luaL_error(L, "class not found: box2d::DebugNode"); + } return 1; } +OLUA_END_DECLS -static int _b2MassData_get_I(lua_State *L) +static int _olua_fun_b2MassData_I$1(lua_State *L) { olua_startinvoke(L); @@ -3768,7 +4337,7 @@ static int _b2MassData_get_I(lua_State *L) return num_ret; } -static int _b2MassData_set_I(lua_State *L) +static int _olua_fun_b2MassData_I$2(lua_State *L) { olua_startinvoke(L); @@ -3786,7 +4355,52 @@ static int _b2MassData_set_I(lua_State *L) return 0; } -static int _b2MassData_get_center(lua_State *L) +static int _olua_fun_b2MassData_I(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float I + return _olua_fun_b2MassData_I$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float I + return _olua_fun_b2MassData_I$2(L); + // } + } + + luaL_error(L, "method 'b2MassData::I' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_b2MassData___gc(lua_State *L) +{ + olua_startinvoke(L); + + auto self = (b2MassData *)olua_toobj(L, 1, "b2.MassData"); + olua_postgc(L, self); + + olua_endinvoke(L); + + return 0; +} + +static int _olua_fun_b2MassData___olua_move(lua_State *L) +{ + olua_startinvoke(L); + + auto self = (b2MassData *)olua_toobj(L, 1, "b2.MassData"); + olua_push_object(L, self, "b2.MassData"); + + olua_endinvoke(L); + + return 1; +} + +static int _olua_fun_b2MassData_center$1(lua_State *L) { olua_startinvoke(L); @@ -3796,32 +4410,53 @@ static int _b2MassData_get_center(lua_State *L) // b2Vec2 center b2Vec2 &ret = self->center; - int num_ret = olua_pushcopy_object(L, ret, "b2.Vec2"); + int num_ret = olua_copy_object(L, ret, "b2.Vec2"); olua_endinvoke(L); return num_ret; } -static int _b2MassData_set_center(lua_State *L) +static int _olua_fun_b2MassData_center$2(lua_State *L) { olua_startinvoke(L); b2MassData *self = nullptr; - b2Vec2 arg1; /** center */ + b2Vec2 *arg1; /** center */ olua_to_object(L, 1, &self, "b2.MassData"); olua_check_object(L, 2, &arg1, "b2.Vec2"); // b2Vec2 center - self->center = arg1; + self->center = *arg1; olua_endinvoke(L); return 0; } -static int _b2MassData_get_mass(lua_State *L) +static int _olua_fun_b2MassData_center(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // b2Vec2 center + return _olua_fun_b2MassData_center$1(L); + } + + if (num_args == 1) { + // if ((olua_is_object(L, 2, "b2.Vec2"))) { + // b2Vec2 center + return _olua_fun_b2MassData_center$2(L); + // } + } + + luaL_error(L, "method 'b2MassData::center' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_b2MassData_mass$1(lua_State *L) { olua_startinvoke(L); @@ -3838,7 +4473,7 @@ static int _b2MassData_get_mass(lua_State *L) return num_ret; } -static int _b2MassData_set_mass(lua_State *L) +static int _olua_fun_b2MassData_mass$2(lua_State *L) { olua_startinvoke(L); @@ -3856,50 +4491,51 @@ static int _b2MassData_set_mass(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_b2MassData(lua_State *L) -{ - oluacls_class(L, "b2.MassData"); - oluacls_func(L, "__call", _b2MassData___call); - oluacls_func(L, "__gc", _b2MassData___gc); - oluacls_func(L, "__olua_move", _b2MassData___olua_move); - oluacls_prop(L, "I", _b2MassData_get_I, _b2MassData_set_I); - oluacls_prop(L, "center", _b2MassData_get_center, _b2MassData_set_center); - oluacls_prop(L, "mass", _b2MassData_get_mass, _b2MassData_set_mass); - - return 1; -} -OLUA_END_DECLS - -static int _b2Transform___call(lua_State *L) +static int _olua_fun_b2MassData_mass(lua_State *L) { - olua_startinvoke(L); - - b2Transform ret; + int num_args = lua_gettop(L) - 1; - luaL_checktype(L, 2, LUA_TTABLE); + if (num_args == 0) { + // float mass + return _olua_fun_b2MassData_mass$1(L); + } - b2Vec2 arg1; /** p */ - b2Rot arg2; /** q */ + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float mass + return _olua_fun_b2MassData_mass$2(L); + // } + } - olua_getfield(L, 2, "p"); - olua_check_object(L, -1, &arg1, "b2.Vec2"); - ret.p = arg1; - lua_pop(L, 1); + luaL_error(L, "method 'b2MassData::mass' not support '%d' arguments", num_args); - olua_getfield(L, 2, "q"); - olua_check_object(L, -1, &arg2, "b2.Rot"); - ret.q = arg2; - lua_pop(L, 1); + return 0; +} - olua_pushcopy_object(L, ret, "b2.Transform"); +static int _olua_cls_b2_MassData(lua_State *L) +{ + oluacls_class(L, "b2.MassData"); + oluacls_func(L, "__gc", _olua_fun_b2MassData___gc); + oluacls_func(L, "__olua_move", _olua_fun_b2MassData___olua_move); + oluacls_prop(L, "I", _olua_fun_b2MassData_I, _olua_fun_b2MassData_I); + oluacls_prop(L, "center", _olua_fun_b2MassData_center, _olua_fun_b2MassData_center); + oluacls_prop(L, "mass", _olua_fun_b2MassData_mass, _olua_fun_b2MassData_mass); - olua_endinvoke(L); + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_b2_MassData(lua_State *L) +{ + olua_require(L, "box2d", luaopen_box2d); + if (!olua_getclass(L, "b2.MassData")) { + luaL_error(L, "class not found: b2MassData"); + } return 1; } +OLUA_END_DECLS -static int _b2Transform___gc(lua_State *L) +static int _olua_fun_b2Transform___gc(lua_State *L) { olua_startinvoke(L); @@ -3911,7 +4547,7 @@ static int _b2Transform___gc(lua_State *L) return 0; } -static int _b2Transform___olua_move(lua_State *L) +static int _olua_fun_b2Transform___olua_move(lua_State *L) { olua_startinvoke(L); @@ -3923,7 +4559,7 @@ static int _b2Transform___olua_move(lua_State *L) return 1; } -static int _b2Transform_new$1(lua_State *L) +static int _olua_fun_b2Transform_new$1(lua_State *L) { olua_startinvoke(L); @@ -3937,18 +4573,18 @@ static int _b2Transform_new$1(lua_State *L) return num_ret; } -static int _b2Transform_new$2(lua_State *L) +static int _olua_fun_b2Transform_new$2(lua_State *L) { olua_startinvoke(L); - b2Vec2 arg1; /** position */ - b2Rot arg2; /** rotation */ + b2Vec2 *arg1; /** position */ + b2Rot *arg2; /** rotation */ olua_check_object(L, 1, &arg1, "b2.Vec2"); olua_check_object(L, 2, &arg2, "b2.Rot"); // b2Transform(const b2Vec2 &position, const b2Rot &rotation) - b2Transform *ret = new b2Transform(arg1, arg2); + b2Transform *ret = new b2Transform(*arg1, *arg2); int num_ret = olua_push_object(L, ret, "b2.Transform"); olua_postnew(L, ret); @@ -3957,19 +4593,19 @@ static int _b2Transform_new$2(lua_State *L) return num_ret; } -static int _b2Transform_new(lua_State *L) +static int _olua_fun_b2Transform_new(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 0) { // b2Transform() - return _b2Transform_new$1(L); + return _olua_fun_b2Transform_new$1(L); } if (num_args == 2) { // if ((olua_is_object(L, 1, "b2.Vec2")) && (olua_is_object(L, 2, "b2.Rot"))) { // b2Transform(const b2Vec2 &position, const b2Rot &rotation) - return _b2Transform_new$2(L); + return _olua_fun_b2Transform_new$2(L); // } } @@ -3978,43 +4614,63 @@ static int _b2Transform_new(lua_State *L) return 0; } -static int _b2Transform_Set(lua_State *L) +static int _olua_fun_b2Transform_p$1(lua_State *L) { olua_startinvoke(L); b2Transform *self = nullptr; - b2Vec2 arg1; /** position */ - float arg2 = 0; /** angle */ olua_to_object(L, 1, &self, "b2.Transform"); - olua_check_object(L, 2, &arg1, "b2.Vec2"); - olua_check_number(L, 3, &arg2); - // void Set(const b2Vec2 &position, float angle) - self->Set(arg1, arg2); + // b2Vec2 p + b2Vec2 &ret = self->p; + int num_ret = olua_copy_object(L, ret, "b2.Vec2"); olua_endinvoke(L); - return 0; + return num_ret; } -static int _b2Transform_SetIdentity(lua_State *L) +static int _olua_fun_b2Transform_p$2(lua_State *L) { olua_startinvoke(L); b2Transform *self = nullptr; + b2Vec2 *arg1; /** p */ olua_to_object(L, 1, &self, "b2.Transform"); + olua_check_object(L, 2, &arg1, "b2.Vec2"); - // void SetIdentity() - self->SetIdentity(); + // b2Vec2 p + self->p = *arg1; olua_endinvoke(L); return 0; } -static int _b2Transform_get_p(lua_State *L) +static int _olua_fun_b2Transform_p(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // b2Vec2 p + return _olua_fun_b2Transform_p$1(L); + } + + if (num_args == 1) { + // if ((olua_is_object(L, 2, "b2.Vec2"))) { + // b2Vec2 p + return _olua_fun_b2Transform_p$2(L); + // } + } + + luaL_error(L, "method 'b2Transform::p' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_b2Transform_q$1(lua_State *L) { olua_startinvoke(L); @@ -4022,120 +4678,116 @@ static int _b2Transform_get_p(lua_State *L) olua_to_object(L, 1, &self, "b2.Transform"); - // b2Vec2 p - b2Vec2 &ret = self->p; - int num_ret = olua_pushcopy_object(L, ret, "b2.Vec2"); + // b2Rot q + b2Rot &ret = self->q; + int num_ret = olua_copy_object(L, ret, "b2.Rot"); olua_endinvoke(L); return num_ret; } -static int _b2Transform_set_p(lua_State *L) +static int _olua_fun_b2Transform_q$2(lua_State *L) { olua_startinvoke(L); b2Transform *self = nullptr; - b2Vec2 arg1; /** p */ + b2Rot *arg1; /** q */ olua_to_object(L, 1, &self, "b2.Transform"); - olua_check_object(L, 2, &arg1, "b2.Vec2"); + olua_check_object(L, 2, &arg1, "b2.Rot"); - // b2Vec2 p - self->p = arg1; + // b2Rot q + self->q = *arg1; olua_endinvoke(L); return 0; } -static int _b2Transform_get_q(lua_State *L) +static int _olua_fun_b2Transform_q(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // b2Rot q + return _olua_fun_b2Transform_q$1(L); + } + + if (num_args == 1) { + // if ((olua_is_object(L, 2, "b2.Rot"))) { + // b2Rot q + return _olua_fun_b2Transform_q$2(L); + // } + } + + luaL_error(L, "method 'b2Transform::q' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_b2Transform_set(lua_State *L) { olua_startinvoke(L); b2Transform *self = nullptr; + b2Vec2 *arg1; /** position */ + float arg2 = 0; /** angle */ olua_to_object(L, 1, &self, "b2.Transform"); + olua_check_object(L, 2, &arg1, "b2.Vec2"); + olua_check_number(L, 3, &arg2); - // b2Rot q - b2Rot &ret = self->q; - int num_ret = olua_pushcopy_object(L, ret, "b2.Rot"); + // void Set(const b2Vec2 &position, float angle) + self->Set(*arg1, arg2); olua_endinvoke(L); - return num_ret; + return 0; } -static int _b2Transform_set_q(lua_State *L) +static int _olua_fun_b2Transform_setIdentity(lua_State *L) { olua_startinvoke(L); b2Transform *self = nullptr; - b2Rot arg1; /** q */ olua_to_object(L, 1, &self, "b2.Transform"); - olua_check_object(L, 2, &arg1, "b2.Rot"); - // b2Rot q - self->q = arg1; + // void SetIdentity() + self->SetIdentity(); olua_endinvoke(L); return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_b2Transform(lua_State *L) +static int _olua_cls_b2_Transform(lua_State *L) { oluacls_class(L, "b2.Transform"); - oluacls_func(L, "__call", _b2Transform___call); - oluacls_func(L, "__gc", _b2Transform___gc); - oluacls_func(L, "__olua_move", _b2Transform___olua_move); - oluacls_func(L, "new", _b2Transform_new); - oluacls_func(L, "set", _b2Transform_Set); - oluacls_func(L, "setIdentity", _b2Transform_SetIdentity); - oluacls_prop(L, "p", _b2Transform_get_p, _b2Transform_set_p); - oluacls_prop(L, "q", _b2Transform_get_q, _b2Transform_set_q); + oluacls_func(L, "__gc", _olua_fun_b2Transform___gc); + oluacls_func(L, "__olua_move", _olua_fun_b2Transform___olua_move); + oluacls_func(L, "new", _olua_fun_b2Transform_new); + oluacls_func(L, "set", _olua_fun_b2Transform_set); + oluacls_func(L, "setIdentity", _olua_fun_b2Transform_setIdentity); + oluacls_prop(L, "p", _olua_fun_b2Transform_p, _olua_fun_b2Transform_p); + oluacls_prop(L, "q", _olua_fun_b2Transform_q, _olua_fun_b2Transform_q); return 1; } -OLUA_END_DECLS -static int _b2RayCastInput___call(lua_State *L) +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_b2_Transform(lua_State *L) { - olua_startinvoke(L); - - b2RayCastInput ret; - - luaL_checktype(L, 2, LUA_TTABLE); - - b2Vec2 arg1; /** p1 */ - b2Vec2 arg2; /** p2 */ - float arg3 = 0; /** maxFraction */ - - olua_getfield(L, 2, "p1"); - olua_check_object(L, -1, &arg1, "b2.Vec2"); - ret.p1 = arg1; - lua_pop(L, 1); - - olua_getfield(L, 2, "p2"); - olua_check_object(L, -1, &arg2, "b2.Vec2"); - ret.p2 = arg2; - lua_pop(L, 1); - - olua_getfield(L, 2, "maxFraction"); - olua_check_number(L, -1, &arg3); - ret.maxFraction = arg3; - lua_pop(L, 1); - - olua_pushcopy_object(L, ret, "b2.RayCastInput"); - - olua_endinvoke(L); - + olua_require(L, "box2d", luaopen_box2d); + if (!olua_getclass(L, "b2.Transform")) { + luaL_error(L, "class not found: b2Transform"); + } return 1; } +OLUA_END_DECLS -static int _b2RayCastInput___gc(lua_State *L) +static int _olua_fun_b2RayCastInput___gc(lua_State *L) { olua_startinvoke(L); @@ -4147,7 +4799,7 @@ static int _b2RayCastInput___gc(lua_State *L) return 0; } -static int _b2RayCastInput___olua_move(lua_State *L) +static int _olua_fun_b2RayCastInput___olua_move(lua_State *L) { olua_startinvoke(L); @@ -4159,7 +4811,7 @@ static int _b2RayCastInput___olua_move(lua_State *L) return 1; } -static int _b2RayCastInput_get_maxFraction(lua_State *L) +static int _olua_fun_b2RayCastInput_maxFraction$1(lua_State *L) { olua_startinvoke(L); @@ -4176,7 +4828,7 @@ static int _b2RayCastInput_get_maxFraction(lua_State *L) return num_ret; } -static int _b2RayCastInput_set_maxFraction(lua_State *L) +static int _olua_fun_b2RayCastInput_maxFraction$2(lua_State *L) { olua_startinvoke(L); @@ -4194,7 +4846,28 @@ static int _b2RayCastInput_set_maxFraction(lua_State *L) return 0; } -static int _b2RayCastInput_get_p1(lua_State *L) +static int _olua_fun_b2RayCastInput_maxFraction(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float maxFraction + return _olua_fun_b2RayCastInput_maxFraction$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float maxFraction + return _olua_fun_b2RayCastInput_maxFraction$2(L); + // } + } + + luaL_error(L, "method 'b2RayCastInput::maxFraction' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_b2RayCastInput_p1$1(lua_State *L) { olua_startinvoke(L); @@ -4204,32 +4877,53 @@ static int _b2RayCastInput_get_p1(lua_State *L) // b2Vec2 p1 b2Vec2 &ret = self->p1; - int num_ret = olua_pushcopy_object(L, ret, "b2.Vec2"); + int num_ret = olua_copy_object(L, ret, "b2.Vec2"); olua_endinvoke(L); return num_ret; } -static int _b2RayCastInput_set_p1(lua_State *L) +static int _olua_fun_b2RayCastInput_p1$2(lua_State *L) { olua_startinvoke(L); b2RayCastInput *self = nullptr; - b2Vec2 arg1; /** p1 */ + b2Vec2 *arg1; /** p1 */ olua_to_object(L, 1, &self, "b2.RayCastInput"); olua_check_object(L, 2, &arg1, "b2.Vec2"); // b2Vec2 p1 - self->p1 = arg1; + self->p1 = *arg1; olua_endinvoke(L); return 0; } -static int _b2RayCastInput_get_p2(lua_State *L) +static int _olua_fun_b2RayCastInput_p1(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // b2Vec2 p1 + return _olua_fun_b2RayCastInput_p1$1(L); + } + + if (num_args == 1) { + // if ((olua_is_object(L, 2, "b2.Vec2"))) { + // b2Vec2 p1 + return _olua_fun_b2RayCastInput_p1$2(L); + // } + } + + luaL_error(L, "method 'b2RayCastInput::p1' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_b2RayCastInput_p2$1(lua_State *L) { olua_startinvoke(L); @@ -4239,75 +4933,76 @@ static int _b2RayCastInput_get_p2(lua_State *L) // b2Vec2 p2 b2Vec2 &ret = self->p2; - int num_ret = olua_pushcopy_object(L, ret, "b2.Vec2"); + int num_ret = olua_copy_object(L, ret, "b2.Vec2"); olua_endinvoke(L); return num_ret; } -static int _b2RayCastInput_set_p2(lua_State *L) +static int _olua_fun_b2RayCastInput_p2$2(lua_State *L) { olua_startinvoke(L); b2RayCastInput *self = nullptr; - b2Vec2 arg1; /** p2 */ + b2Vec2 *arg1; /** p2 */ olua_to_object(L, 1, &self, "b2.RayCastInput"); olua_check_object(L, 2, &arg1, "b2.Vec2"); // b2Vec2 p2 - self->p2 = arg1; + self->p2 = *arg1; olua_endinvoke(L); return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_b2RayCastInput(lua_State *L) -{ - oluacls_class(L, "b2.RayCastInput"); - oluacls_func(L, "__call", _b2RayCastInput___call); - oluacls_func(L, "__gc", _b2RayCastInput___gc); - oluacls_func(L, "__olua_move", _b2RayCastInput___olua_move); - oluacls_prop(L, "maxFraction", _b2RayCastInput_get_maxFraction, _b2RayCastInput_set_maxFraction); - oluacls_prop(L, "p1", _b2RayCastInput_get_p1, _b2RayCastInput_set_p1); - oluacls_prop(L, "p2", _b2RayCastInput_get_p2, _b2RayCastInput_set_p2); - - return 1; -} -OLUA_END_DECLS - -static int _b2RayCastOutput___call(lua_State *L) +static int _olua_fun_b2RayCastInput_p2(lua_State *L) { - olua_startinvoke(L); - - b2RayCastOutput ret; + int num_args = lua_gettop(L) - 1; - luaL_checktype(L, 2, LUA_TTABLE); + if (num_args == 0) { + // b2Vec2 p2 + return _olua_fun_b2RayCastInput_p2$1(L); + } - b2Vec2 arg1; /** normal */ - float arg2 = 0; /** fraction */ + if (num_args == 1) { + // if ((olua_is_object(L, 2, "b2.Vec2"))) { + // b2Vec2 p2 + return _olua_fun_b2RayCastInput_p2$2(L); + // } + } - olua_getfield(L, 2, "normal"); - olua_check_object(L, -1, &arg1, "b2.Vec2"); - ret.normal = arg1; - lua_pop(L, 1); + luaL_error(L, "method 'b2RayCastInput::p2' not support '%d' arguments", num_args); - olua_getfield(L, 2, "fraction"); - olua_check_number(L, -1, &arg2); - ret.fraction = arg2; - lua_pop(L, 1); + return 0; +} - olua_pushcopy_object(L, ret, "b2.RayCastOutput"); +static int _olua_cls_b2_RayCastInput(lua_State *L) +{ + oluacls_class(L, "b2.RayCastInput"); + oluacls_func(L, "__gc", _olua_fun_b2RayCastInput___gc); + oluacls_func(L, "__olua_move", _olua_fun_b2RayCastInput___olua_move); + oluacls_prop(L, "maxFraction", _olua_fun_b2RayCastInput_maxFraction, _olua_fun_b2RayCastInput_maxFraction); + oluacls_prop(L, "p1", _olua_fun_b2RayCastInput_p1, _olua_fun_b2RayCastInput_p1); + oluacls_prop(L, "p2", _olua_fun_b2RayCastInput_p2, _olua_fun_b2RayCastInput_p2); - olua_endinvoke(L); + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_b2_RayCastInput(lua_State *L) +{ + olua_require(L, "box2d", luaopen_box2d); + if (!olua_getclass(L, "b2.RayCastInput")) { + luaL_error(L, "class not found: b2RayCastInput"); + } return 1; } +OLUA_END_DECLS -static int _b2RayCastOutput___gc(lua_State *L) +static int _olua_fun_b2RayCastOutput___gc(lua_State *L) { olua_startinvoke(L); @@ -4319,7 +5014,7 @@ static int _b2RayCastOutput___gc(lua_State *L) return 0; } -static int _b2RayCastOutput___olua_move(lua_State *L) +static int _olua_fun_b2RayCastOutput___olua_move(lua_State *L) { olua_startinvoke(L); @@ -4331,7 +5026,7 @@ static int _b2RayCastOutput___olua_move(lua_State *L) return 1; } -static int _b2RayCastOutput_get_fraction(lua_State *L) +static int _olua_fun_b2RayCastOutput_fraction$1(lua_State *L) { olua_startinvoke(L); @@ -4348,7 +5043,7 @@ static int _b2RayCastOutput_get_fraction(lua_State *L) return num_ret; } -static int _b2RayCastOutput_set_fraction(lua_State *L) +static int _olua_fun_b2RayCastOutput_fraction$2(lua_State *L) { olua_startinvoke(L); @@ -4366,7 +5061,28 @@ static int _b2RayCastOutput_set_fraction(lua_State *L) return 0; } -static int _b2RayCastOutput_get_normal(lua_State *L) +static int _olua_fun_b2RayCastOutput_fraction(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float fraction + return _olua_fun_b2RayCastOutput_fraction$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float fraction + return _olua_fun_b2RayCastOutput_fraction$2(L); + // } + } + + luaL_error(L, "method 'b2RayCastOutput::fraction' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_b2RayCastOutput_normal$1(lua_State *L) { olua_startinvoke(L); @@ -4376,47 +5092,75 @@ static int _b2RayCastOutput_get_normal(lua_State *L) // b2Vec2 normal b2Vec2 &ret = self->normal; - int num_ret = olua_pushcopy_object(L, ret, "b2.Vec2"); + int num_ret = olua_copy_object(L, ret, "b2.Vec2"); olua_endinvoke(L); return num_ret; } -static int _b2RayCastOutput_set_normal(lua_State *L) +static int _olua_fun_b2RayCastOutput_normal$2(lua_State *L) { olua_startinvoke(L); b2RayCastOutput *self = nullptr; - b2Vec2 arg1; /** normal */ + b2Vec2 *arg1; /** normal */ olua_to_object(L, 1, &self, "b2.RayCastOutput"); olua_check_object(L, 2, &arg1, "b2.Vec2"); - // b2Vec2 normal - self->normal = arg1; + // b2Vec2 normal + self->normal = *arg1; + + olua_endinvoke(L); + + return 0; +} + +static int _olua_fun_b2RayCastOutput_normal(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // b2Vec2 normal + return _olua_fun_b2RayCastOutput_normal$1(L); + } + + if (num_args == 1) { + // if ((olua_is_object(L, 2, "b2.Vec2"))) { + // b2Vec2 normal + return _olua_fun_b2RayCastOutput_normal$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'b2RayCastOutput::normal' not support '%d' arguments", num_args); return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_b2RayCastOutput(lua_State *L) +static int _olua_cls_b2_RayCastOutput(lua_State *L) { oluacls_class(L, "b2.RayCastOutput"); - oluacls_func(L, "__call", _b2RayCastOutput___call); - oluacls_func(L, "__gc", _b2RayCastOutput___gc); - oluacls_func(L, "__olua_move", _b2RayCastOutput___olua_move); - oluacls_prop(L, "fraction", _b2RayCastOutput_get_fraction, _b2RayCastOutput_set_fraction); - oluacls_prop(L, "normal", _b2RayCastOutput_get_normal, _b2RayCastOutput_set_normal); + oluacls_func(L, "__gc", _olua_fun_b2RayCastOutput___gc); + oluacls_func(L, "__olua_move", _olua_fun_b2RayCastOutput___olua_move); + oluacls_prop(L, "fraction", _olua_fun_b2RayCastOutput_fraction, _olua_fun_b2RayCastOutput_fraction); + oluacls_prop(L, "normal", _olua_fun_b2RayCastOutput_normal, _olua_fun_b2RayCastOutput_normal); return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_b2Shape_Type(lua_State *L) +OLUA_LIB int luaopen_b2_RayCastOutput(lua_State *L) +{ + olua_require(L, "box2d", luaopen_box2d); + if (!olua_getclass(L, "b2.RayCastOutput")) { + luaL_error(L, "class not found: b2RayCastOutput"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_b2_Shape_Type(lua_State *L) { oluacls_class(L, "b2.Shape.Type"); oluacls_func(L, "__index", olua_indexerror); @@ -4429,9 +5173,19 @@ OLUA_LIB int luaopen_b2Shape_Type(lua_State *L) return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_b2_Shape_Type(lua_State *L) +{ + olua_require(L, "box2d", luaopen_box2d); + if (!olua_getclass(L, "b2.Shape.Type")) { + luaL_error(L, "class not found: b2Shape::Type"); + } + return 1; +} OLUA_END_DECLS -static int _b2Shape___gc(lua_State *L) +static int _olua_fun_b2Shape___gc(lua_State *L) { olua_startinvoke(L); @@ -4443,7 +5197,7 @@ static int _b2Shape___gc(lua_State *L) return 0; } -static int _b2Shape___olua_move(lua_State *L) +static int _olua_fun_b2Shape___olua_move(lua_State *L) { olua_startinvoke(L); @@ -4455,13 +5209,13 @@ static int _b2Shape___olua_move(lua_State *L) return 1; } -static int _b2Shape_ComputeAABB(lua_State *L) +static int _olua_fun_b2Shape_computeAABB(lua_State *L) { olua_startinvoke(L); b2Shape *self = nullptr; b2AABB *arg1 = nullptr; /** aabb */ - b2Transform arg2; /** xf */ + b2Transform *arg2; /** xf */ int32 arg3 = 0; /** childIndex */ olua_to_object(L, 1, &self, "b2.Shape"); @@ -4470,14 +5224,14 @@ static int _b2Shape_ComputeAABB(lua_State *L) olua_check_integer(L, 4, &arg3); // void ComputeAABB(b2AABB *aabb, const b2Transform &xf, int32 childIndex) - self->ComputeAABB(arg1, arg2, arg3); + self->ComputeAABB(arg1, *arg2, arg3); olua_endinvoke(L); return 0; } -static int _b2Shape_ComputeMass(lua_State *L) +static int _olua_fun_b2Shape_computeMass(lua_State *L) { olua_startinvoke(L); @@ -4497,7 +5251,7 @@ static int _b2Shape_ComputeMass(lua_State *L) return 0; } -static int _b2Shape_GetChildCount(lua_State *L) +static int _olua_fun_b2Shape_getChildCount(lua_State *L) { olua_startinvoke(L); @@ -4514,7 +5268,7 @@ static int _b2Shape_GetChildCount(lua_State *L) return num_ret; } -static int _b2Shape_GetType(lua_State *L) +static int _olua_fun_b2Shape_getType(lua_State *L) { olua_startinvoke(L); @@ -4531,14 +5285,14 @@ static int _b2Shape_GetType(lua_State *L) return num_ret; } -static int _b2Shape_RayCast(lua_State *L) +static int _olua_fun_b2Shape_rayCast(lua_State *L) { olua_startinvoke(L); b2Shape *self = nullptr; b2RayCastOutput *arg1 = nullptr; /** output */ - b2RayCastInput arg2; /** input */ - b2Transform arg3; /** transform */ + b2RayCastInput *arg2; /** input */ + b2Transform *arg3; /** transform */ int32 arg4 = 0; /** childIndex */ olua_to_object(L, 1, &self, "b2.Shape"); @@ -4548,7 +5302,7 @@ static int _b2Shape_RayCast(lua_State *L) olua_check_integer(L, 5, &arg4); // bool RayCast(b2RayCastOutput *output, const b2RayCastInput &input, const b2Transform &transform, int32 childIndex) - bool ret = self->RayCast(arg1, arg2, arg3, arg4); + bool ret = self->RayCast(arg1, *arg2, *arg3, arg4); int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); @@ -4556,20 +5310,20 @@ static int _b2Shape_RayCast(lua_State *L) return num_ret; } -static int _b2Shape_TestPoint(lua_State *L) +static int _olua_fun_b2Shape_testPoint(lua_State *L) { olua_startinvoke(L); b2Shape *self = nullptr; - b2Transform arg1; /** xf */ - b2Vec2 arg2; /** p */ + b2Transform *arg1; /** xf */ + b2Vec2 *arg2; /** p */ olua_to_object(L, 1, &self, "b2.Shape"); olua_check_object(L, 2, &arg1, "b2.Transform"); olua_check_object(L, 3, &arg2, "b2.Vec2"); // bool TestPoint(const b2Transform &xf, const b2Vec2 &p) - bool ret = self->TestPoint(arg1, arg2); + bool ret = self->TestPoint(*arg1, *arg2); int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); @@ -4577,26 +5331,35 @@ static int _b2Shape_TestPoint(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_b2Shape(lua_State *L) +static int _olua_cls_b2_Shape(lua_State *L) { oluacls_class(L, "b2.Shape"); - oluacls_func(L, "__gc", _b2Shape___gc); - oluacls_func(L, "__olua_move", _b2Shape___olua_move); - oluacls_func(L, "computeAABB", _b2Shape_ComputeAABB); - oluacls_func(L, "computeMass", _b2Shape_ComputeMass); - oluacls_func(L, "getChildCount", _b2Shape_GetChildCount); - oluacls_func(L, "getType", _b2Shape_GetType); - oluacls_func(L, "rayCast", _b2Shape_RayCast); - oluacls_func(L, "testPoint", _b2Shape_TestPoint); - oluacls_prop(L, "childCount", _b2Shape_GetChildCount, nullptr); - oluacls_prop(L, "type", _b2Shape_GetType, nullptr); + oluacls_func(L, "__gc", _olua_fun_b2Shape___gc); + oluacls_func(L, "__olua_move", _olua_fun_b2Shape___olua_move); + oluacls_func(L, "computeAABB", _olua_fun_b2Shape_computeAABB); + oluacls_func(L, "computeMass", _olua_fun_b2Shape_computeMass); + oluacls_func(L, "getChildCount", _olua_fun_b2Shape_getChildCount); + oluacls_func(L, "getType", _olua_fun_b2Shape_getType); + oluacls_func(L, "rayCast", _olua_fun_b2Shape_rayCast); + oluacls_func(L, "testPoint", _olua_fun_b2Shape_testPoint); + oluacls_prop(L, "childCount", _olua_fun_b2Shape_getChildCount, nullptr); + oluacls_prop(L, "type", _olua_fun_b2Shape_getType, nullptr); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_b2_Shape(lua_State *L) +{ + olua_require(L, "box2d", luaopen_box2d); + if (!olua_getclass(L, "b2.Shape")) { + luaL_error(L, "class not found: b2Shape"); + } return 1; } OLUA_END_DECLS -static int _b2PolygonShape_new(lua_State *L) +static int _olua_fun_b2PolygonShape_new(lua_State *L) { olua_startinvoke(L); @@ -4610,7 +5373,7 @@ static int _b2PolygonShape_new(lua_State *L) return num_ret; } -static int _b2PolygonShape_Set(lua_State *L) +static int _olua_fun_b2PolygonShape_set(lua_State *L) { olua_startinvoke(L); @@ -4630,7 +5393,7 @@ static int _b2PolygonShape_Set(lua_State *L) return 0; } -static int _b2PolygonShape_SetAsBox$1(lua_State *L) +static int _olua_fun_b2PolygonShape_setAsBox$1(lua_State *L) { olua_startinvoke(L); @@ -4650,14 +5413,14 @@ static int _b2PolygonShape_SetAsBox$1(lua_State *L) return 0; } -static int _b2PolygonShape_SetAsBox$2(lua_State *L) +static int _olua_fun_b2PolygonShape_setAsBox$2(lua_State *L) { olua_startinvoke(L); b2PolygonShape *self = nullptr; float arg1 = 0; /** hx */ float arg2 = 0; /** hy */ - b2Vec2 arg3; /** center */ + b2Vec2 *arg3; /** center */ float arg4 = 0; /** angle */ olua_to_object(L, 1, &self, "b2.PolygonShape"); @@ -4667,37 +5430,37 @@ static int _b2PolygonShape_SetAsBox$2(lua_State *L) olua_check_number(L, 5, &arg4); // void SetAsBox(float hx, float hy, const b2Vec2 ¢er, float angle) - self->SetAsBox(arg1, arg2, arg3, arg4); + self->SetAsBox(arg1, arg2, *arg3, arg4); olua_endinvoke(L); return 0; } -static int _b2PolygonShape_SetAsBox(lua_State *L) +static int _olua_fun_b2PolygonShape_setAsBox(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 2) { // if ((olua_is_number(L, 2)) && (olua_is_number(L, 3))) { // void SetAsBox(float hx, float hy) - return _b2PolygonShape_SetAsBox$1(L); + return _olua_fun_b2PolygonShape_setAsBox$1(L); // } } if (num_args == 4) { // if ((olua_is_number(L, 2)) && (olua_is_number(L, 3)) && (olua_is_object(L, 4, "b2.Vec2")) && (olua_is_number(L, 5))) { // void SetAsBox(float hx, float hy, const b2Vec2 ¢er, float angle) - return _b2PolygonShape_SetAsBox$2(L); + return _olua_fun_b2PolygonShape_setAsBox$2(L); // } } - luaL_error(L, "method 'b2PolygonShape::SetAsBox' not support '%d' arguments", num_args); + luaL_error(L, "method 'b2PolygonShape::setAsBox' not support '%d' arguments", num_args); return 0; } -static int _b2PolygonShape_Validate(lua_State *L) +static int _olua_fun_b2PolygonShape_validate(lua_State *L) { olua_startinvoke(L); @@ -4714,20 +5477,29 @@ static int _b2PolygonShape_Validate(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_b2PolygonShape(lua_State *L) +static int _olua_cls_b2_PolygonShape(lua_State *L) { oluacls_class(L, "b2.PolygonShape"); - oluacls_func(L, "new", _b2PolygonShape_new); - oluacls_func(L, "set", _b2PolygonShape_Set); - oluacls_func(L, "setAsBox", _b2PolygonShape_SetAsBox); - oluacls_func(L, "validate", _b2PolygonShape_Validate); + oluacls_func(L, "new", _olua_fun_b2PolygonShape_new); + oluacls_func(L, "set", _olua_fun_b2PolygonShape_set); + oluacls_func(L, "setAsBox", _olua_fun_b2PolygonShape_setAsBox); + oluacls_func(L, "validate", _olua_fun_b2PolygonShape_validate); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_b2_PolygonShape(lua_State *L) +{ + olua_require(L, "box2d", luaopen_box2d); + if (!olua_getclass(L, "b2.PolygonShape")) { + luaL_error(L, "class not found: b2PolygonShape"); + } + return 1; +} OLUA_END_DECLS -static int _b2EdgeShape_new(lua_State *L) +static int _olua_fun_b2EdgeShape_new(lua_State *L) { olua_startinvoke(L); @@ -4741,15 +5513,15 @@ static int _b2EdgeShape_new(lua_State *L) return num_ret; } -static int _b2EdgeShape_SetOneSided(lua_State *L) +static int _olua_fun_b2EdgeShape_setOneSided(lua_State *L) { olua_startinvoke(L); b2EdgeShape *self = nullptr; - b2Vec2 arg1; /** v0 */ - b2Vec2 arg2; /** v1 */ - b2Vec2 arg3; /** v2 */ - b2Vec2 arg4; /** v3 */ + b2Vec2 *arg1; /** v0 */ + b2Vec2 *arg2; /** v1 */ + b2Vec2 *arg3; /** v2 */ + b2Vec2 *arg4; /** v3 */ olua_to_object(L, 1, &self, "b2.EdgeShape"); olua_check_object(L, 2, &arg1, "b2.Vec2"); @@ -4758,46 +5530,55 @@ static int _b2EdgeShape_SetOneSided(lua_State *L) olua_check_object(L, 5, &arg4, "b2.Vec2"); // void SetOneSided(const b2Vec2 &v0, const b2Vec2 &v1, const b2Vec2 &v2, const b2Vec2 &v3) - self->SetOneSided(arg1, arg2, arg3, arg4); + self->SetOneSided(*arg1, *arg2, *arg3, *arg4); olua_endinvoke(L); return 0; } -static int _b2EdgeShape_SetTwoSided(lua_State *L) +static int _olua_fun_b2EdgeShape_setTwoSided(lua_State *L) { olua_startinvoke(L); b2EdgeShape *self = nullptr; - b2Vec2 arg1; /** v1 */ - b2Vec2 arg2; /** v2 */ + b2Vec2 *arg1; /** v1 */ + b2Vec2 *arg2; /** v2 */ olua_to_object(L, 1, &self, "b2.EdgeShape"); olua_check_object(L, 2, &arg1, "b2.Vec2"); olua_check_object(L, 3, &arg2, "b2.Vec2"); // void SetTwoSided(const b2Vec2 &v1, const b2Vec2 &v2) - self->SetTwoSided(arg1, arg2); + self->SetTwoSided(*arg1, *arg2); olua_endinvoke(L); return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_b2EdgeShape(lua_State *L) +static int _olua_cls_b2_EdgeShape(lua_State *L) { oluacls_class(L, "b2.EdgeShape"); - oluacls_func(L, "new", _b2EdgeShape_new); - oluacls_func(L, "setOneSided", _b2EdgeShape_SetOneSided); - oluacls_func(L, "setTwoSided", _b2EdgeShape_SetTwoSided); + oluacls_func(L, "new", _olua_fun_b2EdgeShape_new); + oluacls_func(L, "setOneSided", _olua_fun_b2EdgeShape_setOneSided); + oluacls_func(L, "setTwoSided", _olua_fun_b2EdgeShape_setTwoSided); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_b2_EdgeShape(lua_State *L) +{ + olua_require(L, "box2d", luaopen_box2d); + if (!olua_getclass(L, "b2.EdgeShape")) { + luaL_error(L, "class not found: b2EdgeShape"); + } return 1; } OLUA_END_DECLS -static int _b2CircleShape_new(lua_State *L) +static int _olua_fun_b2CircleShape_new(lua_State *L) { olua_startinvoke(L); @@ -4811,17 +5592,26 @@ static int _b2CircleShape_new(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_b2CircleShape(lua_State *L) +static int _olua_cls_b2_CircleShape(lua_State *L) { oluacls_class(L, "b2.CircleShape"); - oluacls_func(L, "new", _b2CircleShape_new); + oluacls_func(L, "new", _olua_fun_b2CircleShape_new); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_b2_CircleShape(lua_State *L) +{ + olua_require(L, "box2d", luaopen_box2d); + if (!olua_getclass(L, "b2.CircleShape")) { + luaL_error(L, "class not found: b2CircleShape"); + } return 1; } OLUA_END_DECLS -static int _b2ChainShape_Clear(lua_State *L) +static int _olua_fun_b2ChainShape_clear(lua_State *L) { olua_startinvoke(L); @@ -4837,15 +5627,15 @@ static int _b2ChainShape_Clear(lua_State *L) return 0; } -static int _b2ChainShape_CreateChain(lua_State *L) +static int _olua_fun_b2ChainShape_createChain(lua_State *L) { olua_startinvoke(L); b2ChainShape *self = nullptr; b2Vec2 *arg1 = nullptr; /** vertices */ int32 arg2 = 0; /** count */ - b2Vec2 arg3; /** prevVertex */ - b2Vec2 arg4; /** nextVertex */ + b2Vec2 *arg3; /** prevVertex */ + b2Vec2 *arg4; /** nextVertex */ olua_to_object(L, 1, &self, "b2.ChainShape"); olua_check_object(L, 2, &arg1, "b2.Vec2"); @@ -4854,14 +5644,14 @@ static int _b2ChainShape_CreateChain(lua_State *L) olua_check_object(L, 5, &arg4, "b2.Vec2"); // void CreateChain(const b2Vec2 *vertices, int32 count, const b2Vec2 &prevVertex, const b2Vec2 &nextVertex) - self->CreateChain(arg1, arg2, arg3, arg4); + self->CreateChain(arg1, arg2, *arg3, *arg4); olua_endinvoke(L); return 0; } -static int _b2ChainShape_CreateLoop(lua_State *L) +static int _olua_fun_b2ChainShape_createLoop(lua_State *L) { olua_startinvoke(L); @@ -4881,7 +5671,7 @@ static int _b2ChainShape_CreateLoop(lua_State *L) return 0; } -static int _b2ChainShape_GetChildEdge(lua_State *L) +static int _olua_fun_b2ChainShape_getChildEdge(lua_State *L) { olua_startinvoke(L); @@ -4901,7 +5691,7 @@ static int _b2ChainShape_GetChildEdge(lua_State *L) return 0; } -static int _b2ChainShape_new(lua_State *L) +static int _olua_fun_b2ChainShape_new(lua_State *L) { olua_startinvoke(L); @@ -4915,121 +5705,30 @@ static int _b2ChainShape_new(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_b2ChainShape(lua_State *L) +static int _olua_cls_b2_ChainShape(lua_State *L) { oluacls_class(L, "b2.ChainShape"); - oluacls_func(L, "clear", _b2ChainShape_Clear); - oluacls_func(L, "createChain", _b2ChainShape_CreateChain); - oluacls_func(L, "createLoop", _b2ChainShape_CreateLoop); - oluacls_func(L, "getChildEdge", _b2ChainShape_GetChildEdge); - oluacls_func(L, "new", _b2ChainShape_new); + oluacls_func(L, "clear", _olua_fun_b2ChainShape_clear); + oluacls_func(L, "createChain", _olua_fun_b2ChainShape_createChain); + oluacls_func(L, "createLoop", _olua_fun_b2ChainShape_createLoop); + oluacls_func(L, "getChildEdge", _olua_fun_b2ChainShape_getChildEdge); + oluacls_func(L, "new", _olua_fun_b2ChainShape_new); return 1; } -OLUA_END_DECLS -static int _b2BodyDef___call(lua_State *L) +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_b2_ChainShape(lua_State *L) { - olua_startinvoke(L); - - b2BodyDef ret; - - luaL_checktype(L, 2, LUA_TTABLE); - - b2BodyType arg1 = (b2BodyType)0; /** type */ - b2Vec2 arg2; /** position */ - float arg3 = 0; /** angle */ - b2Vec2 arg4; /** linearVelocity */ - float arg5 = 0; /** angularVelocity */ - float arg6 = 0; /** linearDamping */ - float arg7 = 0; /** angularDamping */ - bool arg8 = false; /** allowSleep */ - bool arg9 = false; /** awake */ - bool arg10 = false; /** fixedRotation */ - bool arg11 = false; /** bullet */ - bool arg12 = false; /** enabled */ - b2BodyUserData arg13; /** userData */ - float arg14 = 0; /** gravityScale */ - - olua_getfield(L, 2, "type"); - olua_check_enum(L, -1, &arg1); - ret.type = arg1; - lua_pop(L, 1); - - olua_getfield(L, 2, "position"); - olua_check_object(L, -1, &arg2, "b2.Vec2"); - ret.position = arg2; - lua_pop(L, 1); - - olua_getfield(L, 2, "angle"); - olua_check_number(L, -1, &arg3); - ret.angle = arg3; - lua_pop(L, 1); - - olua_getfield(L, 2, "linearVelocity"); - olua_check_object(L, -1, &arg4, "b2.Vec2"); - ret.linearVelocity = arg4; - lua_pop(L, 1); - - olua_getfield(L, 2, "angularVelocity"); - olua_check_number(L, -1, &arg5); - ret.angularVelocity = arg5; - lua_pop(L, 1); - - olua_getfield(L, 2, "linearDamping"); - olua_check_number(L, -1, &arg6); - ret.linearDamping = arg6; - lua_pop(L, 1); - - olua_getfield(L, 2, "angularDamping"); - olua_check_number(L, -1, &arg7); - ret.angularDamping = arg7; - lua_pop(L, 1); - - olua_getfield(L, 2, "allowSleep"); - olua_check_bool(L, -1, &arg8); - ret.allowSleep = arg8; - lua_pop(L, 1); - - olua_getfield(L, 2, "awake"); - olua_check_bool(L, -1, &arg9); - ret.awake = arg9; - lua_pop(L, 1); - - olua_getfield(L, 2, "fixedRotation"); - olua_check_bool(L, -1, &arg10); - ret.fixedRotation = arg10; - lua_pop(L, 1); - - olua_getfield(L, 2, "bullet"); - olua_check_bool(L, -1, &arg11); - ret.bullet = arg11; - lua_pop(L, 1); - - olua_getfield(L, 2, "enabled"); - olua_check_bool(L, -1, &arg12); - ret.enabled = arg12; - lua_pop(L, 1); - - olua_getfield(L, 2, "userData"); - olua_check_object(L, -1, &arg13, "b2.BodyUserData"); - ret.userData = arg13; - lua_pop(L, 1); - - olua_getfield(L, 2, "gravityScale"); - olua_check_number(L, -1, &arg14); - ret.gravityScale = arg14; - lua_pop(L, 1); - - olua_pushcopy_object(L, ret, "b2.BodyDef"); - - olua_endinvoke(L); - + olua_require(L, "box2d", luaopen_box2d); + if (!olua_getclass(L, "b2.ChainShape")) { + luaL_error(L, "class not found: b2ChainShape"); + } return 1; } +OLUA_END_DECLS -static int _b2BodyDef___gc(lua_State *L) +static int _olua_fun_b2BodyDef___gc(lua_State *L) { olua_startinvoke(L); @@ -5041,7 +5740,7 @@ static int _b2BodyDef___gc(lua_State *L) return 0; } -static int _b2BodyDef___olua_move(lua_State *L) +static int _olua_fun_b2BodyDef___olua_move(lua_State *L) { olua_startinvoke(L); @@ -5053,21 +5752,7 @@ static int _b2BodyDef___olua_move(lua_State *L) return 1; } -static int _b2BodyDef_new(lua_State *L) -{ - olua_startinvoke(L); - - // b2BodyDef() - b2BodyDef *ret = new b2BodyDef(); - int num_ret = olua_push_object(L, ret, "b2.BodyDef"); - olua_postnew(L, ret); - - olua_endinvoke(L); - - return num_ret; -} - -static int _b2BodyDef_get_allowSleep(lua_State *L) +static int _olua_fun_b2BodyDef_allowSleep$1(lua_State *L) { olua_startinvoke(L); @@ -5084,7 +5769,7 @@ static int _b2BodyDef_get_allowSleep(lua_State *L) return num_ret; } -static int _b2BodyDef_set_allowSleep(lua_State *L) +static int _olua_fun_b2BodyDef_allowSleep$2(lua_State *L) { olua_startinvoke(L); @@ -5102,7 +5787,28 @@ static int _b2BodyDef_set_allowSleep(lua_State *L) return 0; } -static int _b2BodyDef_get_angle(lua_State *L) +static int _olua_fun_b2BodyDef_allowSleep(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // bool allowSleep + return _olua_fun_b2BodyDef_allowSleep$1(L); + } + + if (num_args == 1) { + // if ((olua_is_bool(L, 2))) { + // bool allowSleep + return _olua_fun_b2BodyDef_allowSleep$2(L); + // } + } + + luaL_error(L, "method 'b2BodyDef::allowSleep' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_b2BodyDef_angle$1(lua_State *L) { olua_startinvoke(L); @@ -5119,7 +5825,7 @@ static int _b2BodyDef_get_angle(lua_State *L) return num_ret; } -static int _b2BodyDef_set_angle(lua_State *L) +static int _olua_fun_b2BodyDef_angle$2(lua_State *L) { olua_startinvoke(L); @@ -5137,7 +5843,28 @@ static int _b2BodyDef_set_angle(lua_State *L) return 0; } -static int _b2BodyDef_get_angularDamping(lua_State *L) +static int _olua_fun_b2BodyDef_angle(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float angle + return _olua_fun_b2BodyDef_angle$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float angle + return _olua_fun_b2BodyDef_angle$2(L); + // } + } + + luaL_error(L, "method 'b2BodyDef::angle' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_b2BodyDef_angularDamping$1(lua_State *L) { olua_startinvoke(L); @@ -5154,7 +5881,7 @@ static int _b2BodyDef_get_angularDamping(lua_State *L) return num_ret; } -static int _b2BodyDef_set_angularDamping(lua_State *L) +static int _olua_fun_b2BodyDef_angularDamping$2(lua_State *L) { olua_startinvoke(L); @@ -5172,7 +5899,28 @@ static int _b2BodyDef_set_angularDamping(lua_State *L) return 0; } -static int _b2BodyDef_get_angularVelocity(lua_State *L) +static int _olua_fun_b2BodyDef_angularDamping(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float angularDamping + return _olua_fun_b2BodyDef_angularDamping$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float angularDamping + return _olua_fun_b2BodyDef_angularDamping$2(L); + // } + } + + luaL_error(L, "method 'b2BodyDef::angularDamping' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_b2BodyDef_angularVelocity$1(lua_State *L) { olua_startinvoke(L); @@ -5189,7 +5937,7 @@ static int _b2BodyDef_get_angularVelocity(lua_State *L) return num_ret; } -static int _b2BodyDef_set_angularVelocity(lua_State *L) +static int _olua_fun_b2BodyDef_angularVelocity$2(lua_State *L) { olua_startinvoke(L); @@ -5207,7 +5955,28 @@ static int _b2BodyDef_set_angularVelocity(lua_State *L) return 0; } -static int _b2BodyDef_get_awake(lua_State *L) +static int _olua_fun_b2BodyDef_angularVelocity(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float angularVelocity + return _olua_fun_b2BodyDef_angularVelocity$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float angularVelocity + return _olua_fun_b2BodyDef_angularVelocity$2(L); + // } + } + + luaL_error(L, "method 'b2BodyDef::angularVelocity' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_b2BodyDef_awake$1(lua_State *L) { olua_startinvoke(L); @@ -5224,7 +5993,7 @@ static int _b2BodyDef_get_awake(lua_State *L) return num_ret; } -static int _b2BodyDef_set_awake(lua_State *L) +static int _olua_fun_b2BodyDef_awake$2(lua_State *L) { olua_startinvoke(L); @@ -5242,7 +6011,28 @@ static int _b2BodyDef_set_awake(lua_State *L) return 0; } -static int _b2BodyDef_get_bullet(lua_State *L) +static int _olua_fun_b2BodyDef_awake(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // bool awake + return _olua_fun_b2BodyDef_awake$1(L); + } + + if (num_args == 1) { + // if ((olua_is_bool(L, 2))) { + // bool awake + return _olua_fun_b2BodyDef_awake$2(L); + // } + } + + luaL_error(L, "method 'b2BodyDef::awake' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_b2BodyDef_bullet$1(lua_State *L) { olua_startinvoke(L); @@ -5259,7 +6049,7 @@ static int _b2BodyDef_get_bullet(lua_State *L) return num_ret; } -static int _b2BodyDef_set_bullet(lua_State *L) +static int _olua_fun_b2BodyDef_bullet$2(lua_State *L) { olua_startinvoke(L); @@ -5277,7 +6067,28 @@ static int _b2BodyDef_set_bullet(lua_State *L) return 0; } -static int _b2BodyDef_get_enabled(lua_State *L) +static int _olua_fun_b2BodyDef_bullet(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // bool bullet + return _olua_fun_b2BodyDef_bullet$1(L); + } + + if (num_args == 1) { + // if ((olua_is_bool(L, 2))) { + // bool bullet + return _olua_fun_b2BodyDef_bullet$2(L); + // } + } + + luaL_error(L, "method 'b2BodyDef::bullet' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_b2BodyDef_enabled$1(lua_State *L) { olua_startinvoke(L); @@ -5294,7 +6105,7 @@ static int _b2BodyDef_get_enabled(lua_State *L) return num_ret; } -static int _b2BodyDef_set_enabled(lua_State *L) +static int _olua_fun_b2BodyDef_enabled$2(lua_State *L) { olua_startinvoke(L); @@ -5312,7 +6123,28 @@ static int _b2BodyDef_set_enabled(lua_State *L) return 0; } -static int _b2BodyDef_get_fixedRotation(lua_State *L) +static int _olua_fun_b2BodyDef_enabled(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // bool enabled + return _olua_fun_b2BodyDef_enabled$1(L); + } + + if (num_args == 1) { + // if ((olua_is_bool(L, 2))) { + // bool enabled + return _olua_fun_b2BodyDef_enabled$2(L); + // } + } + + luaL_error(L, "method 'b2BodyDef::enabled' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_b2BodyDef_fixedRotation$1(lua_State *L) { olua_startinvoke(L); @@ -5329,7 +6161,7 @@ static int _b2BodyDef_get_fixedRotation(lua_State *L) return num_ret; } -static int _b2BodyDef_set_fixedRotation(lua_State *L) +static int _olua_fun_b2BodyDef_fixedRotation$2(lua_State *L) { olua_startinvoke(L); @@ -5347,7 +6179,28 @@ static int _b2BodyDef_set_fixedRotation(lua_State *L) return 0; } -static int _b2BodyDef_get_gravityScale(lua_State *L) +static int _olua_fun_b2BodyDef_fixedRotation(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // bool fixedRotation + return _olua_fun_b2BodyDef_fixedRotation$1(L); + } + + if (num_args == 1) { + // if ((olua_is_bool(L, 2))) { + // bool fixedRotation + return _olua_fun_b2BodyDef_fixedRotation$2(L); + // } + } + + luaL_error(L, "method 'b2BodyDef::fixedRotation' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_b2BodyDef_gravityScale$1(lua_State *L) { olua_startinvoke(L); @@ -5364,7 +6217,7 @@ static int _b2BodyDef_get_gravityScale(lua_State *L) return num_ret; } -static int _b2BodyDef_set_gravityScale(lua_State *L) +static int _olua_fun_b2BodyDef_gravityScale$2(lua_State *L) { olua_startinvoke(L); @@ -5382,7 +6235,28 @@ static int _b2BodyDef_set_gravityScale(lua_State *L) return 0; } -static int _b2BodyDef_get_linearDamping(lua_State *L) +static int _olua_fun_b2BodyDef_gravityScale(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float gravityScale + return _olua_fun_b2BodyDef_gravityScale$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float gravityScale + return _olua_fun_b2BodyDef_gravityScale$2(L); + // } + } + + luaL_error(L, "method 'b2BodyDef::gravityScale' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_b2BodyDef_linearDamping$1(lua_State *L) { olua_startinvoke(L); @@ -5399,7 +6273,7 @@ static int _b2BodyDef_get_linearDamping(lua_State *L) return num_ret; } -static int _b2BodyDef_set_linearDamping(lua_State *L) +static int _olua_fun_b2BodyDef_linearDamping$2(lua_State *L) { olua_startinvoke(L); @@ -5412,82 +6286,159 @@ static int _b2BodyDef_set_linearDamping(lua_State *L) // float linearDamping self->linearDamping = arg1; - olua_endinvoke(L); + olua_endinvoke(L); + + return 0; +} + +static int _olua_fun_b2BodyDef_linearDamping(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float linearDamping + return _olua_fun_b2BodyDef_linearDamping$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float linearDamping + return _olua_fun_b2BodyDef_linearDamping$2(L); + // } + } + + luaL_error(L, "method 'b2BodyDef::linearDamping' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_b2BodyDef_linearVelocity$1(lua_State *L) +{ + olua_startinvoke(L); + + b2BodyDef *self = nullptr; + + olua_to_object(L, 1, &self, "b2.BodyDef"); + + // b2Vec2 linearVelocity + b2Vec2 &ret = self->linearVelocity; + int num_ret = olua_copy_object(L, ret, "b2.Vec2"); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_b2BodyDef_linearVelocity$2(lua_State *L) +{ + olua_startinvoke(L); + + b2BodyDef *self = nullptr; + b2Vec2 *arg1; /** linearVelocity */ + + olua_to_object(L, 1, &self, "b2.BodyDef"); + olua_check_object(L, 2, &arg1, "b2.Vec2"); + + // b2Vec2 linearVelocity + self->linearVelocity = *arg1; + + olua_endinvoke(L); + + return 0; +} + +static int _olua_fun_b2BodyDef_linearVelocity(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // b2Vec2 linearVelocity + return _olua_fun_b2BodyDef_linearVelocity$1(L); + } + + if (num_args == 1) { + // if ((olua_is_object(L, 2, "b2.Vec2"))) { + // b2Vec2 linearVelocity + return _olua_fun_b2BodyDef_linearVelocity$2(L); + // } + } + + luaL_error(L, "method 'b2BodyDef::linearVelocity' not support '%d' arguments", num_args); return 0; } -static int _b2BodyDef_get_linearVelocity(lua_State *L) +static int _olua_fun_b2BodyDef_new(lua_State *L) { olua_startinvoke(L); - b2BodyDef *self = nullptr; - - olua_to_object(L, 1, &self, "b2.BodyDef"); - - // b2Vec2 linearVelocity - b2Vec2 &ret = self->linearVelocity; - int num_ret = olua_pushcopy_object(L, ret, "b2.Vec2"); + // b2BodyDef() + b2BodyDef *ret = new b2BodyDef(); + int num_ret = olua_push_object(L, ret, "b2.BodyDef"); + olua_postnew(L, ret); olua_endinvoke(L); return num_ret; } -static int _b2BodyDef_set_linearVelocity(lua_State *L) +static int _olua_fun_b2BodyDef_position$1(lua_State *L) { olua_startinvoke(L); b2BodyDef *self = nullptr; - b2Vec2 arg1; /** linearVelocity */ olua_to_object(L, 1, &self, "b2.BodyDef"); - olua_check_object(L, 2, &arg1, "b2.Vec2"); - // b2Vec2 linearVelocity - self->linearVelocity = arg1; + // b2Vec2 position + b2Vec2 &ret = self->position; + int num_ret = olua_copy_object(L, ret, "b2.Vec2"); olua_endinvoke(L); - return 0; + return num_ret; } -static int _b2BodyDef_get_position(lua_State *L) +static int _olua_fun_b2BodyDef_position$2(lua_State *L) { olua_startinvoke(L); b2BodyDef *self = nullptr; + b2Vec2 *arg1; /** position */ olua_to_object(L, 1, &self, "b2.BodyDef"); + olua_check_object(L, 2, &arg1, "b2.Vec2"); // b2Vec2 position - b2Vec2 &ret = self->position; - int num_ret = olua_pushcopy_object(L, ret, "b2.Vec2"); + self->position = *arg1; olua_endinvoke(L); - return num_ret; + return 0; } -static int _b2BodyDef_set_position(lua_State *L) +static int _olua_fun_b2BodyDef_position(lua_State *L) { - olua_startinvoke(L); - - b2BodyDef *self = nullptr; - b2Vec2 arg1; /** position */ + int num_args = lua_gettop(L) - 1; - olua_to_object(L, 1, &self, "b2.BodyDef"); - olua_check_object(L, 2, &arg1, "b2.Vec2"); + if (num_args == 0) { + // b2Vec2 position + return _olua_fun_b2BodyDef_position$1(L); + } - // b2Vec2 position - self->position = arg1; + if (num_args == 1) { + // if ((olua_is_object(L, 2, "b2.Vec2"))) { + // b2Vec2 position + return _olua_fun_b2BodyDef_position$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'b2BodyDef::position' not support '%d' arguments", num_args); return 0; } -static int _b2BodyDef_get_type(lua_State *L) +static int _olua_fun_b2BodyDef_type$1(lua_State *L) { olua_startinvoke(L); @@ -5504,7 +6455,7 @@ static int _b2BodyDef_get_type(lua_State *L) return num_ret; } -static int _b2BodyDef_set_type(lua_State *L) +static int _olua_fun_b2BodyDef_type$2(lua_State *L) { olua_startinvoke(L); @@ -5522,7 +6473,28 @@ static int _b2BodyDef_set_type(lua_State *L) return 0; } -static int _b2BodyDef_get_userData(lua_State *L) +static int _olua_fun_b2BodyDef_type(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // b2BodyType type + return _olua_fun_b2BodyDef_type$1(L); + } + + if (num_args == 1) { + // if ((olua_is_enum(L, 2))) { + // b2BodyType type + return _olua_fun_b2BodyDef_type$2(L); + // } + } + + luaL_error(L, "method 'b2BodyDef::type' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_b2BodyDef_userData$1(lua_State *L) { olua_startinvoke(L); @@ -5532,60 +6504,88 @@ static int _b2BodyDef_get_userData(lua_State *L) // b2BodyUserData userData b2BodyUserData &ret = self->userData; - int num_ret = olua_pushcopy_object(L, ret, "b2.BodyUserData"); + int num_ret = olua_copy_object(L, ret, "b2.BodyUserData"); olua_endinvoke(L); return num_ret; } -static int _b2BodyDef_set_userData(lua_State *L) +static int _olua_fun_b2BodyDef_userData$2(lua_State *L) { olua_startinvoke(L); b2BodyDef *self = nullptr; - b2BodyUserData arg1; /** userData */ + b2BodyUserData *arg1; /** userData */ olua_to_object(L, 1, &self, "b2.BodyDef"); olua_check_object(L, 2, &arg1, "b2.BodyUserData"); // b2BodyUserData userData - self->userData = arg1; + self->userData = *arg1; olua_endinvoke(L); return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_b2BodyDef(lua_State *L) +static int _olua_fun_b2BodyDef_userData(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // b2BodyUserData userData + return _olua_fun_b2BodyDef_userData$1(L); + } + + if (num_args == 1) { + // if ((olua_is_object(L, 2, "b2.BodyUserData"))) { + // b2BodyUserData userData + return _olua_fun_b2BodyDef_userData$2(L); + // } + } + + luaL_error(L, "method 'b2BodyDef::userData' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_cls_b2_BodyDef(lua_State *L) { oluacls_class(L, "b2.BodyDef"); - oluacls_func(L, "__call", _b2BodyDef___call); - oluacls_func(L, "__gc", _b2BodyDef___gc); - oluacls_func(L, "__olua_move", _b2BodyDef___olua_move); - oluacls_func(L, "new", _b2BodyDef_new); - oluacls_prop(L, "allowSleep", _b2BodyDef_get_allowSleep, _b2BodyDef_set_allowSleep); - oluacls_prop(L, "angle", _b2BodyDef_get_angle, _b2BodyDef_set_angle); - oluacls_prop(L, "angularDamping", _b2BodyDef_get_angularDamping, _b2BodyDef_set_angularDamping); - oluacls_prop(L, "angularVelocity", _b2BodyDef_get_angularVelocity, _b2BodyDef_set_angularVelocity); - oluacls_prop(L, "awake", _b2BodyDef_get_awake, _b2BodyDef_set_awake); - oluacls_prop(L, "bullet", _b2BodyDef_get_bullet, _b2BodyDef_set_bullet); - oluacls_prop(L, "enabled", _b2BodyDef_get_enabled, _b2BodyDef_set_enabled); - oluacls_prop(L, "fixedRotation", _b2BodyDef_get_fixedRotation, _b2BodyDef_set_fixedRotation); - oluacls_prop(L, "gravityScale", _b2BodyDef_get_gravityScale, _b2BodyDef_set_gravityScale); - oluacls_prop(L, "linearDamping", _b2BodyDef_get_linearDamping, _b2BodyDef_set_linearDamping); - oluacls_prop(L, "linearVelocity", _b2BodyDef_get_linearVelocity, _b2BodyDef_set_linearVelocity); - oluacls_prop(L, "position", _b2BodyDef_get_position, _b2BodyDef_set_position); - oluacls_prop(L, "type", _b2BodyDef_get_type, _b2BodyDef_set_type); - oluacls_prop(L, "userData", _b2BodyDef_get_userData, _b2BodyDef_set_userData); + oluacls_func(L, "__gc", _olua_fun_b2BodyDef___gc); + oluacls_func(L, "__olua_move", _olua_fun_b2BodyDef___olua_move); + oluacls_func(L, "new", _olua_fun_b2BodyDef_new); + oluacls_prop(L, "allowSleep", _olua_fun_b2BodyDef_allowSleep, _olua_fun_b2BodyDef_allowSleep); + oluacls_prop(L, "angle", _olua_fun_b2BodyDef_angle, _olua_fun_b2BodyDef_angle); + oluacls_prop(L, "angularDamping", _olua_fun_b2BodyDef_angularDamping, _olua_fun_b2BodyDef_angularDamping); + oluacls_prop(L, "angularVelocity", _olua_fun_b2BodyDef_angularVelocity, _olua_fun_b2BodyDef_angularVelocity); + oluacls_prop(L, "awake", _olua_fun_b2BodyDef_awake, _olua_fun_b2BodyDef_awake); + oluacls_prop(L, "bullet", _olua_fun_b2BodyDef_bullet, _olua_fun_b2BodyDef_bullet); + oluacls_prop(L, "enabled", _olua_fun_b2BodyDef_enabled, _olua_fun_b2BodyDef_enabled); + oluacls_prop(L, "fixedRotation", _olua_fun_b2BodyDef_fixedRotation, _olua_fun_b2BodyDef_fixedRotation); + oluacls_prop(L, "gravityScale", _olua_fun_b2BodyDef_gravityScale, _olua_fun_b2BodyDef_gravityScale); + oluacls_prop(L, "linearDamping", _olua_fun_b2BodyDef_linearDamping, _olua_fun_b2BodyDef_linearDamping); + oluacls_prop(L, "linearVelocity", _olua_fun_b2BodyDef_linearVelocity, _olua_fun_b2BodyDef_linearVelocity); + oluacls_prop(L, "position", _olua_fun_b2BodyDef_position, _olua_fun_b2BodyDef_position); + oluacls_prop(L, "type", _olua_fun_b2BodyDef_type, _olua_fun_b2BodyDef_type); + oluacls_prop(L, "userData", _olua_fun_b2BodyDef_userData, _olua_fun_b2BodyDef_userData); return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_b2BodyType(lua_State *L) +OLUA_LIB int luaopen_b2_BodyDef(lua_State *L) +{ + olua_require(L, "box2d", luaopen_box2d); + if (!olua_getclass(L, "b2.BodyDef")) { + luaL_error(L, "class not found: b2BodyDef"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_b2_BodyType(lua_State *L) { oluacls_class(L, "b2.BodyType"); oluacls_func(L, "__index", olua_indexerror); @@ -5596,9 +6596,19 @@ OLUA_LIB int luaopen_b2BodyType(lua_State *L) return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_b2_BodyType(lua_State *L) +{ + olua_require(L, "box2d", luaopen_box2d); + if (!olua_getclass(L, "b2.BodyType")) { + luaL_error(L, "class not found: b2BodyType"); + } + return 1; +} OLUA_END_DECLS -static int _b2Body___olua_move(lua_State *L) +static int _olua_fun_b2Body___olua_move(lua_State *L) { olua_startinvoke(L); @@ -5610,7 +6620,7 @@ static int _b2Body___olua_move(lua_State *L) return 1; } -static int _b2Body_ApplyAngularImpulse(lua_State *L) +static int _olua_fun_b2Body_applyAngularImpulse(lua_State *L) { olua_startinvoke(L); @@ -5630,13 +6640,13 @@ static int _b2Body_ApplyAngularImpulse(lua_State *L) return 0; } -static int _b2Body_ApplyForce(lua_State *L) +static int _olua_fun_b2Body_applyForce(lua_State *L) { olua_startinvoke(L); b2Body *self = nullptr; - b2Vec2 arg1; /** force */ - b2Vec2 arg2; /** point */ + b2Vec2 *arg1; /** force */ + b2Vec2 *arg2; /** point */ bool arg3 = false; /** wake */ olua_to_object(L, 1, &self, "b2.Body"); @@ -5645,19 +6655,19 @@ static int _b2Body_ApplyForce(lua_State *L) olua_check_bool(L, 4, &arg3); // void ApplyForce(const b2Vec2 &force, const b2Vec2 &point, bool wake) - self->ApplyForce(arg1, arg2, arg3); + self->ApplyForce(*arg1, *arg2, arg3); olua_endinvoke(L); return 0; } -static int _b2Body_ApplyForceToCenter(lua_State *L) +static int _olua_fun_b2Body_applyForceToCenter(lua_State *L) { olua_startinvoke(L); b2Body *self = nullptr; - b2Vec2 arg1; /** force */ + b2Vec2 *arg1; /** force */ bool arg2 = false; /** wake */ olua_to_object(L, 1, &self, "b2.Body"); @@ -5665,20 +6675,20 @@ static int _b2Body_ApplyForceToCenter(lua_State *L) olua_check_bool(L, 3, &arg2); // void ApplyForceToCenter(const b2Vec2 &force, bool wake) - self->ApplyForceToCenter(arg1, arg2); + self->ApplyForceToCenter(*arg1, arg2); olua_endinvoke(L); return 0; } -static int _b2Body_ApplyLinearImpulse(lua_State *L) +static int _olua_fun_b2Body_applyLinearImpulse(lua_State *L) { olua_startinvoke(L); b2Body *self = nullptr; - b2Vec2 arg1; /** impulse */ - b2Vec2 arg2; /** point */ + b2Vec2 *arg1; /** impulse */ + b2Vec2 *arg2; /** point */ bool arg3 = false; /** wake */ olua_to_object(L, 1, &self, "b2.Body"); @@ -5687,19 +6697,19 @@ static int _b2Body_ApplyLinearImpulse(lua_State *L) olua_check_bool(L, 4, &arg3); // void ApplyLinearImpulse(const b2Vec2 &impulse, const b2Vec2 &point, bool wake) - self->ApplyLinearImpulse(arg1, arg2, arg3); + self->ApplyLinearImpulse(*arg1, *arg2, arg3); olua_endinvoke(L); return 0; } -static int _b2Body_ApplyLinearImpulseToCenter(lua_State *L) +static int _olua_fun_b2Body_applyLinearImpulseToCenter(lua_State *L) { olua_startinvoke(L); b2Body *self = nullptr; - b2Vec2 arg1; /** impulse */ + b2Vec2 *arg1; /** impulse */ bool arg2 = false; /** wake */ olua_to_object(L, 1, &self, "b2.Body"); @@ -5707,14 +6717,14 @@ static int _b2Body_ApplyLinearImpulseToCenter(lua_State *L) olua_check_bool(L, 3, &arg2); // void ApplyLinearImpulseToCenter(const b2Vec2 &impulse, bool wake) - self->ApplyLinearImpulseToCenter(arg1, arg2); + self->ApplyLinearImpulseToCenter(*arg1, arg2); olua_endinvoke(L); return 0; } -static int _b2Body_ApplyTorque(lua_State *L) +static int _olua_fun_b2Body_applyTorque(lua_State *L) { olua_startinvoke(L); @@ -5734,7 +6744,7 @@ static int _b2Body_ApplyTorque(lua_State *L) return 0; } -static int _b2Body_CreateFixture$1(lua_State *L) +static int _olua_fun_b2Body_createFixture$1(lua_State *L) { olua_startinvoke(L); @@ -5753,7 +6763,7 @@ static int _b2Body_CreateFixture$1(lua_State *L) return num_ret; } -static int _b2Body_CreateFixture$2(lua_State *L) +static int _olua_fun_b2Body_createFixture$2(lua_State *L) { olua_startinvoke(L); @@ -5774,30 +6784,30 @@ static int _b2Body_CreateFixture$2(lua_State *L) return num_ret; } -static int _b2Body_CreateFixture(lua_State *L) +static int _olua_fun_b2Body_createFixture(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_object(L, 2, "b2.FixtureDef"))) { // b2Fixture *CreateFixture(const b2FixtureDef *def) - return _b2Body_CreateFixture$1(L); + return _olua_fun_b2Body_createFixture$1(L); // } } if (num_args == 2) { // if ((olua_is_object(L, 2, "b2.Shape")) && (olua_is_number(L, 3))) { // b2Fixture *CreateFixture(const b2Shape *shape, float density) - return _b2Body_CreateFixture$2(L); + return _olua_fun_b2Body_createFixture$2(L); // } } - luaL_error(L, "method 'b2Body::CreateFixture' not support '%d' arguments", num_args); + luaL_error(L, "method 'b2Body::createFixture' not support '%d' arguments", num_args); return 0; } -static int _b2Body_DestroyFixture(lua_State *L) +static int _olua_fun_b2Body_destroyFixture(lua_State *L) { olua_startinvoke(L); @@ -5815,7 +6825,7 @@ static int _b2Body_DestroyFixture(lua_State *L) return 0; } -static int _b2Body_Dump(lua_State *L) +static int _olua_fun_b2Body_dump(lua_State *L) { olua_startinvoke(L); @@ -5831,7 +6841,7 @@ static int _b2Body_Dump(lua_State *L) return 0; } -static int _b2Body_GetAngle(lua_State *L) +static int _olua_fun_b2Body_getAngle(lua_State *L) { olua_startinvoke(L); @@ -5848,7 +6858,7 @@ static int _b2Body_GetAngle(lua_State *L) return num_ret; } -static int _b2Body_GetAngularDamping(lua_State *L) +static int _olua_fun_b2Body_getAngularDamping(lua_State *L) { olua_startinvoke(L); @@ -5865,7 +6875,7 @@ static int _b2Body_GetAngularDamping(lua_State *L) return num_ret; } -static int _b2Body_GetAngularVelocity(lua_State *L) +static int _olua_fun_b2Body_getAngularVelocity(lua_State *L) { olua_startinvoke(L); @@ -5882,7 +6892,7 @@ static int _b2Body_GetAngularVelocity(lua_State *L) return num_ret; } -static int _b2Body_GetContactList(lua_State *L) +static int _olua_fun_b2Body_getContactList(lua_State *L) { olua_startinvoke(L); @@ -5899,7 +6909,7 @@ static int _b2Body_GetContactList(lua_State *L) return num_ret; } -static int _b2Body_GetFixtureList(lua_State *L) +static int _olua_fun_b2Body_getFixtureList(lua_State *L) { olua_startinvoke(L); @@ -5916,7 +6926,7 @@ static int _b2Body_GetFixtureList(lua_State *L) return num_ret; } -static int _b2Body_GetGravityScale(lua_State *L) +static int _olua_fun_b2Body_getGravityScale(lua_State *L) { olua_startinvoke(L); @@ -5933,7 +6943,7 @@ static int _b2Body_GetGravityScale(lua_State *L) return num_ret; } -static int _b2Body_GetInertia(lua_State *L) +static int _olua_fun_b2Body_getInertia(lua_State *L) { olua_startinvoke(L); @@ -5950,7 +6960,7 @@ static int _b2Body_GetInertia(lua_State *L) return num_ret; } -static int _b2Body_GetJointList(lua_State *L) +static int _olua_fun_b2Body_getJointList(lua_State *L) { olua_startinvoke(L); @@ -5967,7 +6977,7 @@ static int _b2Body_GetJointList(lua_State *L) return num_ret; } -static int _b2Body_GetLinearDamping(lua_State *L) +static int _olua_fun_b2Body_getLinearDamping(lua_State *L) { olua_startinvoke(L); @@ -5984,7 +6994,7 @@ static int _b2Body_GetLinearDamping(lua_State *L) return num_ret; } -static int _b2Body_GetLinearVelocity(lua_State *L) +static int _olua_fun_b2Body_getLinearVelocity(lua_State *L) { olua_startinvoke(L); @@ -6001,45 +7011,45 @@ static int _b2Body_GetLinearVelocity(lua_State *L) return num_ret; } -static int _b2Body_GetLinearVelocityFromLocalPoint(lua_State *L) +static int _olua_fun_b2Body_getLinearVelocityFromLocalPoint(lua_State *L) { olua_startinvoke(L); b2Body *self = nullptr; - b2Vec2 arg1; /** localPoint */ + b2Vec2 *arg1; /** localPoint */ olua_to_object(L, 1, &self, "b2.Body"); olua_check_object(L, 2, &arg1, "b2.Vec2"); // b2Vec2 GetLinearVelocityFromLocalPoint(const b2Vec2 &localPoint) - b2Vec2 ret = self->GetLinearVelocityFromLocalPoint(arg1); - int num_ret = olua_pushcopy_object(L, ret, "b2.Vec2"); + b2Vec2 ret = self->GetLinearVelocityFromLocalPoint(*arg1); + int num_ret = olua_copy_object(L, ret, "b2.Vec2"); olua_endinvoke(L); return num_ret; } -static int _b2Body_GetLinearVelocityFromWorldPoint(lua_State *L) +static int _olua_fun_b2Body_getLinearVelocityFromWorldPoint(lua_State *L) { olua_startinvoke(L); b2Body *self = nullptr; - b2Vec2 arg1; /** worldPoint */ + b2Vec2 *arg1; /** worldPoint */ olua_to_object(L, 1, &self, "b2.Body"); olua_check_object(L, 2, &arg1, "b2.Vec2"); // b2Vec2 GetLinearVelocityFromWorldPoint(const b2Vec2 &worldPoint) - b2Vec2 ret = self->GetLinearVelocityFromWorldPoint(arg1); - int num_ret = olua_pushcopy_object(L, ret, "b2.Vec2"); + b2Vec2 ret = self->GetLinearVelocityFromWorldPoint(*arg1); + int num_ret = olua_copy_object(L, ret, "b2.Vec2"); olua_endinvoke(L); return num_ret; } -static int _b2Body_GetLocalCenter(lua_State *L) +static int _olua_fun_b2Body_getLocalCenter(lua_State *L) { olua_startinvoke(L); @@ -6056,45 +7066,45 @@ static int _b2Body_GetLocalCenter(lua_State *L) return num_ret; } -static int _b2Body_GetLocalPoint(lua_State *L) +static int _olua_fun_b2Body_getLocalPoint(lua_State *L) { olua_startinvoke(L); b2Body *self = nullptr; - b2Vec2 arg1; /** worldPoint */ + b2Vec2 *arg1; /** worldPoint */ olua_to_object(L, 1, &self, "b2.Body"); olua_check_object(L, 2, &arg1, "b2.Vec2"); // b2Vec2 GetLocalPoint(const b2Vec2 &worldPoint) - b2Vec2 ret = self->GetLocalPoint(arg1); - int num_ret = olua_pushcopy_object(L, ret, "b2.Vec2"); + b2Vec2 ret = self->GetLocalPoint(*arg1); + int num_ret = olua_copy_object(L, ret, "b2.Vec2"); olua_endinvoke(L); return num_ret; } -static int _b2Body_GetLocalVector(lua_State *L) +static int _olua_fun_b2Body_getLocalVector(lua_State *L) { olua_startinvoke(L); b2Body *self = nullptr; - b2Vec2 arg1; /** worldVector */ + b2Vec2 *arg1; /** worldVector */ olua_to_object(L, 1, &self, "b2.Body"); olua_check_object(L, 2, &arg1, "b2.Vec2"); // b2Vec2 GetLocalVector(const b2Vec2 &worldVector) - b2Vec2 ret = self->GetLocalVector(arg1); - int num_ret = olua_pushcopy_object(L, ret, "b2.Vec2"); + b2Vec2 ret = self->GetLocalVector(*arg1); + int num_ret = olua_copy_object(L, ret, "b2.Vec2"); olua_endinvoke(L); return num_ret; } -static int _b2Body_GetMass(lua_State *L) +static int _olua_fun_b2Body_getMass(lua_State *L) { olua_startinvoke(L); @@ -6111,7 +7121,7 @@ static int _b2Body_GetMass(lua_State *L) return num_ret; } -static int _b2Body_GetMassData(lua_State *L) +static int _olua_fun_b2Body_getMassData(lua_State *L) { olua_startinvoke(L); @@ -6121,14 +7131,14 @@ static int _b2Body_GetMassData(lua_State *L) // b2MassData GetMassData() b2MassData ret = self->GetMassData(); - int num_ret = olua_pushcopy_object(L, ret, "b2.MassData"); + int num_ret = olua_copy_object(L, ret, "b2.MassData"); olua_endinvoke(L); return num_ret; } -static int _b2Body_GetNext(lua_State *L) +static int _olua_fun_b2Body_getNext(lua_State *L) { olua_startinvoke(L); @@ -6145,7 +7155,7 @@ static int _b2Body_GetNext(lua_State *L) return num_ret; } -static int _b2Body_GetPosition(lua_State *L) +static int _olua_fun_b2Body_getPosition(lua_State *L) { olua_startinvoke(L); @@ -6162,7 +7172,7 @@ static int _b2Body_GetPosition(lua_State *L) return num_ret; } -static int _b2Body_GetTransform(lua_State *L) +static int _olua_fun_b2Body_getTransform(lua_State *L) { olua_startinvoke(L); @@ -6179,7 +7189,7 @@ static int _b2Body_GetTransform(lua_State *L) return num_ret; } -static int _b2Body_GetType(lua_State *L) +static int _olua_fun_b2Body_getType(lua_State *L) { olua_startinvoke(L); @@ -6196,7 +7206,7 @@ static int _b2Body_GetType(lua_State *L) return num_ret; } -static int _b2Body_GetUserData(lua_State *L) +static int _olua_fun_b2Body_getUserData(lua_State *L) { olua_startinvoke(L); @@ -6213,7 +7223,7 @@ static int _b2Body_GetUserData(lua_State *L) return num_ret; } -static int _b2Body_GetWorld(lua_State *L) +static int _olua_fun_b2Body_getWorld(lua_State *L) { olua_startinvoke(L); @@ -6230,7 +7240,7 @@ static int _b2Body_GetWorld(lua_State *L) return num_ret; } -static int _b2Body_GetWorldCenter(lua_State *L) +static int _olua_fun_b2Body_getWorldCenter(lua_State *L) { olua_startinvoke(L); @@ -6247,45 +7257,45 @@ static int _b2Body_GetWorldCenter(lua_State *L) return num_ret; } -static int _b2Body_GetWorldPoint(lua_State *L) +static int _olua_fun_b2Body_getWorldPoint(lua_State *L) { olua_startinvoke(L); b2Body *self = nullptr; - b2Vec2 arg1; /** localPoint */ + b2Vec2 *arg1; /** localPoint */ olua_to_object(L, 1, &self, "b2.Body"); olua_check_object(L, 2, &arg1, "b2.Vec2"); // b2Vec2 GetWorldPoint(const b2Vec2 &localPoint) - b2Vec2 ret = self->GetWorldPoint(arg1); - int num_ret = olua_pushcopy_object(L, ret, "b2.Vec2"); + b2Vec2 ret = self->GetWorldPoint(*arg1); + int num_ret = olua_copy_object(L, ret, "b2.Vec2"); olua_endinvoke(L); return num_ret; } -static int _b2Body_GetWorldVector(lua_State *L) +static int _olua_fun_b2Body_getWorldVector(lua_State *L) { olua_startinvoke(L); b2Body *self = nullptr; - b2Vec2 arg1; /** localVector */ + b2Vec2 *arg1; /** localVector */ olua_to_object(L, 1, &self, "b2.Body"); olua_check_object(L, 2, &arg1, "b2.Vec2"); // b2Vec2 GetWorldVector(const b2Vec2 &localVector) - b2Vec2 ret = self->GetWorldVector(arg1); - int num_ret = olua_pushcopy_object(L, ret, "b2.Vec2"); + b2Vec2 ret = self->GetWorldVector(*arg1); + int num_ret = olua_copy_object(L, ret, "b2.Vec2"); olua_endinvoke(L); return num_ret; } -static int _b2Body_IsAwake(lua_State *L) +static int _olua_fun_b2Body_isAwake(lua_State *L) { olua_startinvoke(L); @@ -6302,7 +7312,7 @@ static int _b2Body_IsAwake(lua_State *L) return num_ret; } -static int _b2Body_IsBullet(lua_State *L) +static int _olua_fun_b2Body_isBullet(lua_State *L) { olua_startinvoke(L); @@ -6319,7 +7329,7 @@ static int _b2Body_IsBullet(lua_State *L) return num_ret; } -static int _b2Body_IsEnabled(lua_State *L) +static int _olua_fun_b2Body_isEnabled(lua_State *L) { olua_startinvoke(L); @@ -6336,7 +7346,7 @@ static int _b2Body_IsEnabled(lua_State *L) return num_ret; } -static int _b2Body_IsFixedRotation(lua_State *L) +static int _olua_fun_b2Body_isFixedRotation(lua_State *L) { olua_startinvoke(L); @@ -6353,7 +7363,7 @@ static int _b2Body_IsFixedRotation(lua_State *L) return num_ret; } -static int _b2Body_IsSleepingAllowed(lua_State *L) +static int _olua_fun_b2Body_isSleepingAllowed(lua_State *L) { olua_startinvoke(L); @@ -6370,7 +7380,7 @@ static int _b2Body_IsSleepingAllowed(lua_State *L) return num_ret; } -static int _b2Body_ResetMassData(lua_State *L) +static int _olua_fun_b2Body_resetMassData(lua_State *L) { olua_startinvoke(L); @@ -6386,7 +7396,7 @@ static int _b2Body_ResetMassData(lua_State *L) return 0; } -static int _b2Body_SetAngularDamping(lua_State *L) +static int _olua_fun_b2Body_setAngularDamping(lua_State *L) { olua_startinvoke(L); @@ -6404,7 +7414,7 @@ static int _b2Body_SetAngularDamping(lua_State *L) return 0; } -static int _b2Body_SetAngularVelocity(lua_State *L) +static int _olua_fun_b2Body_setAngularVelocity(lua_State *L) { olua_startinvoke(L); @@ -6422,7 +7432,7 @@ static int _b2Body_SetAngularVelocity(lua_State *L) return 0; } -static int _b2Body_SetAwake(lua_State *L) +static int _olua_fun_b2Body_setAwake(lua_State *L) { olua_startinvoke(L); @@ -6440,7 +7450,7 @@ static int _b2Body_SetAwake(lua_State *L) return 0; } -static int _b2Body_SetBullet(lua_State *L) +static int _olua_fun_b2Body_setBullet(lua_State *L) { olua_startinvoke(L); @@ -6458,7 +7468,7 @@ static int _b2Body_SetBullet(lua_State *L) return 0; } -static int _b2Body_SetEnabled(lua_State *L) +static int _olua_fun_b2Body_setEnabled(lua_State *L) { olua_startinvoke(L); @@ -6476,7 +7486,7 @@ static int _b2Body_SetEnabled(lua_State *L) return 0; } -static int _b2Body_SetFixedRotation(lua_State *L) +static int _olua_fun_b2Body_setFixedRotation(lua_State *L) { olua_startinvoke(L); @@ -6494,7 +7504,7 @@ static int _b2Body_SetFixedRotation(lua_State *L) return 0; } -static int _b2Body_SetGravityScale(lua_State *L) +static int _olua_fun_b2Body_setGravityScale(lua_State *L) { olua_startinvoke(L); @@ -6512,7 +7522,7 @@ static int _b2Body_SetGravityScale(lua_State *L) return 0; } -static int _b2Body_SetLinearDamping(lua_State *L) +static int _olua_fun_b2Body_setLinearDamping(lua_State *L) { olua_startinvoke(L); @@ -6530,25 +7540,25 @@ static int _b2Body_SetLinearDamping(lua_State *L) return 0; } -static int _b2Body_SetLinearVelocity(lua_State *L) +static int _olua_fun_b2Body_setLinearVelocity(lua_State *L) { olua_startinvoke(L); b2Body *self = nullptr; - b2Vec2 arg1; /** v */ + b2Vec2 *arg1; /** v */ olua_to_object(L, 1, &self, "b2.Body"); olua_check_object(L, 2, &arg1, "b2.Vec2"); // void SetLinearVelocity(const b2Vec2 &v) - self->SetLinearVelocity(arg1); + self->SetLinearVelocity(*arg1); olua_endinvoke(L); return 0; } -static int _b2Body_SetMassData(lua_State *L) +static int _olua_fun_b2Body_setMassData(lua_State *L) { olua_startinvoke(L); @@ -6566,7 +7576,7 @@ static int _b2Body_SetMassData(lua_State *L) return 0; } -static int _b2Body_SetSleepingAllowed(lua_State *L) +static int _olua_fun_b2Body_setSleepingAllowed(lua_State *L) { olua_startinvoke(L); @@ -6584,12 +7594,12 @@ static int _b2Body_SetSleepingAllowed(lua_State *L) return 0; } -static int _b2Body_SetTransform(lua_State *L) +static int _olua_fun_b2Body_setTransform(lua_State *L) { olua_startinvoke(L); b2Body *self = nullptr; - b2Vec2 arg1; /** position */ + b2Vec2 *arg1; /** position */ float arg2 = 0; /** angle */ olua_to_object(L, 1, &self, "b2.Body"); @@ -6597,14 +7607,14 @@ static int _b2Body_SetTransform(lua_State *L) olua_check_number(L, 3, &arg2); // void SetTransform(const b2Vec2 &position, float angle) - self->SetTransform(arg1, arg2); + self->SetTransform(*arg1, arg2); olua_endinvoke(L); return 0; } -static int _b2Body_SetType(lua_State *L) +static int _olua_fun_b2Body_setType(lua_State *L) { olua_startinvoke(L); @@ -6622,117 +7632,104 @@ static int _b2Body_SetType(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_b2Body(lua_State *L) +static int _olua_cls_b2_Body(lua_State *L) { oluacls_class(L, "b2.Body"); - oluacls_func(L, "__olua_move", _b2Body___olua_move); - oluacls_func(L, "applyAngularImpulse", _b2Body_ApplyAngularImpulse); - oluacls_func(L, "applyForce", _b2Body_ApplyForce); - oluacls_func(L, "applyForceToCenter", _b2Body_ApplyForceToCenter); - oluacls_func(L, "applyLinearImpulse", _b2Body_ApplyLinearImpulse); - oluacls_func(L, "applyLinearImpulseToCenter", _b2Body_ApplyLinearImpulseToCenter); - oluacls_func(L, "applyTorque", _b2Body_ApplyTorque); - oluacls_func(L, "createFixture", _b2Body_CreateFixture); - oluacls_func(L, "destroyFixture", _b2Body_DestroyFixture); - oluacls_func(L, "dump", _b2Body_Dump); - oluacls_func(L, "getAngle", _b2Body_GetAngle); - oluacls_func(L, "getAngularDamping", _b2Body_GetAngularDamping); - oluacls_func(L, "getAngularVelocity", _b2Body_GetAngularVelocity); - oluacls_func(L, "getContactList", _b2Body_GetContactList); - oluacls_func(L, "getFixtureList", _b2Body_GetFixtureList); - oluacls_func(L, "getGravityScale", _b2Body_GetGravityScale); - oluacls_func(L, "getInertia", _b2Body_GetInertia); - oluacls_func(L, "getJointList", _b2Body_GetJointList); - oluacls_func(L, "getLinearDamping", _b2Body_GetLinearDamping); - oluacls_func(L, "getLinearVelocity", _b2Body_GetLinearVelocity); - oluacls_func(L, "getLinearVelocityFromLocalPoint", _b2Body_GetLinearVelocityFromLocalPoint); - oluacls_func(L, "getLinearVelocityFromWorldPoint", _b2Body_GetLinearVelocityFromWorldPoint); - oluacls_func(L, "getLocalCenter", _b2Body_GetLocalCenter); - oluacls_func(L, "getLocalPoint", _b2Body_GetLocalPoint); - oluacls_func(L, "getLocalVector", _b2Body_GetLocalVector); - oluacls_func(L, "getMass", _b2Body_GetMass); - oluacls_func(L, "getMassData", _b2Body_GetMassData); - oluacls_func(L, "getNext", _b2Body_GetNext); - oluacls_func(L, "getPosition", _b2Body_GetPosition); - oluacls_func(L, "getTransform", _b2Body_GetTransform); - oluacls_func(L, "getType", _b2Body_GetType); - oluacls_func(L, "getUserData", _b2Body_GetUserData); - oluacls_func(L, "getWorld", _b2Body_GetWorld); - oluacls_func(L, "getWorldCenter", _b2Body_GetWorldCenter); - oluacls_func(L, "getWorldPoint", _b2Body_GetWorldPoint); - oluacls_func(L, "getWorldVector", _b2Body_GetWorldVector); - oluacls_func(L, "isAwake", _b2Body_IsAwake); - oluacls_func(L, "isBullet", _b2Body_IsBullet); - oluacls_func(L, "isEnabled", _b2Body_IsEnabled); - oluacls_func(L, "isFixedRotation", _b2Body_IsFixedRotation); - oluacls_func(L, "isSleepingAllowed", _b2Body_IsSleepingAllowed); - oluacls_func(L, "resetMassData", _b2Body_ResetMassData); - oluacls_func(L, "setAngularDamping", _b2Body_SetAngularDamping); - oluacls_func(L, "setAngularVelocity", _b2Body_SetAngularVelocity); - oluacls_func(L, "setAwake", _b2Body_SetAwake); - oluacls_func(L, "setBullet", _b2Body_SetBullet); - oluacls_func(L, "setEnabled", _b2Body_SetEnabled); - oluacls_func(L, "setFixedRotation", _b2Body_SetFixedRotation); - oluacls_func(L, "setGravityScale", _b2Body_SetGravityScale); - oluacls_func(L, "setLinearDamping", _b2Body_SetLinearDamping); - oluacls_func(L, "setLinearVelocity", _b2Body_SetLinearVelocity); - oluacls_func(L, "setMassData", _b2Body_SetMassData); - oluacls_func(L, "setSleepingAllowed", _b2Body_SetSleepingAllowed); - oluacls_func(L, "setTransform", _b2Body_SetTransform); - oluacls_func(L, "setType", _b2Body_SetType); - oluacls_prop(L, "angle", _b2Body_GetAngle, nullptr); - oluacls_prop(L, "angularDamping", _b2Body_GetAngularDamping, _b2Body_SetAngularDamping); - oluacls_prop(L, "angularVelocity", _b2Body_GetAngularVelocity, _b2Body_SetAngularVelocity); - oluacls_prop(L, "awake", _b2Body_IsAwake, _b2Body_SetAwake); - oluacls_prop(L, "bullet", _b2Body_IsBullet, _b2Body_SetBullet); - oluacls_prop(L, "contactList", _b2Body_GetContactList, nullptr); - oluacls_prop(L, "enabled", _b2Body_IsEnabled, _b2Body_SetEnabled); - oluacls_prop(L, "fixedRotation", _b2Body_IsFixedRotation, _b2Body_SetFixedRotation); - oluacls_prop(L, "fixtureList", _b2Body_GetFixtureList, nullptr); - oluacls_prop(L, "gravityScale", _b2Body_GetGravityScale, _b2Body_SetGravityScale); - oluacls_prop(L, "inertia", _b2Body_GetInertia, nullptr); - oluacls_prop(L, "jointList", _b2Body_GetJointList, nullptr); - oluacls_prop(L, "linearDamping", _b2Body_GetLinearDamping, _b2Body_SetLinearDamping); - oluacls_prop(L, "linearVelocity", _b2Body_GetLinearVelocity, _b2Body_SetLinearVelocity); - oluacls_prop(L, "localCenter", _b2Body_GetLocalCenter, nullptr); - oluacls_prop(L, "mass", _b2Body_GetMass, nullptr); - oluacls_prop(L, "massData", _b2Body_GetMassData, _b2Body_SetMassData); - oluacls_prop(L, "next", _b2Body_GetNext, nullptr); - oluacls_prop(L, "position", _b2Body_GetPosition, nullptr); - oluacls_prop(L, "sleepingAllowed", _b2Body_IsSleepingAllowed, _b2Body_SetSleepingAllowed); - oluacls_prop(L, "type", _b2Body_GetType, _b2Body_SetType); - oluacls_prop(L, "userData", _b2Body_GetUserData, nullptr); - oluacls_prop(L, "world", _b2Body_GetWorld, nullptr); - oluacls_prop(L, "worldCenter", _b2Body_GetWorldCenter, nullptr); + oluacls_func(L, "__olua_move", _olua_fun_b2Body___olua_move); + oluacls_func(L, "applyAngularImpulse", _olua_fun_b2Body_applyAngularImpulse); + oluacls_func(L, "applyForce", _olua_fun_b2Body_applyForce); + oluacls_func(L, "applyForceToCenter", _olua_fun_b2Body_applyForceToCenter); + oluacls_func(L, "applyLinearImpulse", _olua_fun_b2Body_applyLinearImpulse); + oluacls_func(L, "applyLinearImpulseToCenter", _olua_fun_b2Body_applyLinearImpulseToCenter); + oluacls_func(L, "applyTorque", _olua_fun_b2Body_applyTorque); + oluacls_func(L, "createFixture", _olua_fun_b2Body_createFixture); + oluacls_func(L, "destroyFixture", _olua_fun_b2Body_destroyFixture); + oluacls_func(L, "dump", _olua_fun_b2Body_dump); + oluacls_func(L, "getAngle", _olua_fun_b2Body_getAngle); + oluacls_func(L, "getAngularDamping", _olua_fun_b2Body_getAngularDamping); + oluacls_func(L, "getAngularVelocity", _olua_fun_b2Body_getAngularVelocity); + oluacls_func(L, "getContactList", _olua_fun_b2Body_getContactList); + oluacls_func(L, "getFixtureList", _olua_fun_b2Body_getFixtureList); + oluacls_func(L, "getGravityScale", _olua_fun_b2Body_getGravityScale); + oluacls_func(L, "getInertia", _olua_fun_b2Body_getInertia); + oluacls_func(L, "getJointList", _olua_fun_b2Body_getJointList); + oluacls_func(L, "getLinearDamping", _olua_fun_b2Body_getLinearDamping); + oluacls_func(L, "getLinearVelocity", _olua_fun_b2Body_getLinearVelocity); + oluacls_func(L, "getLinearVelocityFromLocalPoint", _olua_fun_b2Body_getLinearVelocityFromLocalPoint); + oluacls_func(L, "getLinearVelocityFromWorldPoint", _olua_fun_b2Body_getLinearVelocityFromWorldPoint); + oluacls_func(L, "getLocalCenter", _olua_fun_b2Body_getLocalCenter); + oluacls_func(L, "getLocalPoint", _olua_fun_b2Body_getLocalPoint); + oluacls_func(L, "getLocalVector", _olua_fun_b2Body_getLocalVector); + oluacls_func(L, "getMass", _olua_fun_b2Body_getMass); + oluacls_func(L, "getMassData", _olua_fun_b2Body_getMassData); + oluacls_func(L, "getNext", _olua_fun_b2Body_getNext); + oluacls_func(L, "getPosition", _olua_fun_b2Body_getPosition); + oluacls_func(L, "getTransform", _olua_fun_b2Body_getTransform); + oluacls_func(L, "getType", _olua_fun_b2Body_getType); + oluacls_func(L, "getUserData", _olua_fun_b2Body_getUserData); + oluacls_func(L, "getWorld", _olua_fun_b2Body_getWorld); + oluacls_func(L, "getWorldCenter", _olua_fun_b2Body_getWorldCenter); + oluacls_func(L, "getWorldPoint", _olua_fun_b2Body_getWorldPoint); + oluacls_func(L, "getWorldVector", _olua_fun_b2Body_getWorldVector); + oluacls_func(L, "isAwake", _olua_fun_b2Body_isAwake); + oluacls_func(L, "isBullet", _olua_fun_b2Body_isBullet); + oluacls_func(L, "isEnabled", _olua_fun_b2Body_isEnabled); + oluacls_func(L, "isFixedRotation", _olua_fun_b2Body_isFixedRotation); + oluacls_func(L, "isSleepingAllowed", _olua_fun_b2Body_isSleepingAllowed); + oluacls_func(L, "resetMassData", _olua_fun_b2Body_resetMassData); + oluacls_func(L, "setAngularDamping", _olua_fun_b2Body_setAngularDamping); + oluacls_func(L, "setAngularVelocity", _olua_fun_b2Body_setAngularVelocity); + oluacls_func(L, "setAwake", _olua_fun_b2Body_setAwake); + oluacls_func(L, "setBullet", _olua_fun_b2Body_setBullet); + oluacls_func(L, "setEnabled", _olua_fun_b2Body_setEnabled); + oluacls_func(L, "setFixedRotation", _olua_fun_b2Body_setFixedRotation); + oluacls_func(L, "setGravityScale", _olua_fun_b2Body_setGravityScale); + oluacls_func(L, "setLinearDamping", _olua_fun_b2Body_setLinearDamping); + oluacls_func(L, "setLinearVelocity", _olua_fun_b2Body_setLinearVelocity); + oluacls_func(L, "setMassData", _olua_fun_b2Body_setMassData); + oluacls_func(L, "setSleepingAllowed", _olua_fun_b2Body_setSleepingAllowed); + oluacls_func(L, "setTransform", _olua_fun_b2Body_setTransform); + oluacls_func(L, "setType", _olua_fun_b2Body_setType); + oluacls_prop(L, "angle", _olua_fun_b2Body_getAngle, nullptr); + oluacls_prop(L, "angularDamping", _olua_fun_b2Body_getAngularDamping, _olua_fun_b2Body_setAngularDamping); + oluacls_prop(L, "angularVelocity", _olua_fun_b2Body_getAngularVelocity, _olua_fun_b2Body_setAngularVelocity); + oluacls_prop(L, "awake", _olua_fun_b2Body_isAwake, _olua_fun_b2Body_setAwake); + oluacls_prop(L, "bullet", _olua_fun_b2Body_isBullet, _olua_fun_b2Body_setBullet); + oluacls_prop(L, "contactList", _olua_fun_b2Body_getContactList, nullptr); + oluacls_prop(L, "enabled", _olua_fun_b2Body_isEnabled, _olua_fun_b2Body_setEnabled); + oluacls_prop(L, "fixedRotation", _olua_fun_b2Body_isFixedRotation, _olua_fun_b2Body_setFixedRotation); + oluacls_prop(L, "fixtureList", _olua_fun_b2Body_getFixtureList, nullptr); + oluacls_prop(L, "gravityScale", _olua_fun_b2Body_getGravityScale, _olua_fun_b2Body_setGravityScale); + oluacls_prop(L, "inertia", _olua_fun_b2Body_getInertia, nullptr); + oluacls_prop(L, "jointList", _olua_fun_b2Body_getJointList, nullptr); + oluacls_prop(L, "linearDamping", _olua_fun_b2Body_getLinearDamping, _olua_fun_b2Body_setLinearDamping); + oluacls_prop(L, "linearVelocity", _olua_fun_b2Body_getLinearVelocity, _olua_fun_b2Body_setLinearVelocity); + oluacls_prop(L, "localCenter", _olua_fun_b2Body_getLocalCenter, nullptr); + oluacls_prop(L, "mass", _olua_fun_b2Body_getMass, nullptr); + oluacls_prop(L, "massData", _olua_fun_b2Body_getMassData, _olua_fun_b2Body_setMassData); + oluacls_prop(L, "next", _olua_fun_b2Body_getNext, nullptr); + oluacls_prop(L, "position", _olua_fun_b2Body_getPosition, nullptr); + oluacls_prop(L, "sleepingAllowed", _olua_fun_b2Body_isSleepingAllowed, _olua_fun_b2Body_setSleepingAllowed); + oluacls_prop(L, "type", _olua_fun_b2Body_getType, _olua_fun_b2Body_setType); + oluacls_prop(L, "userData", _olua_fun_b2Body_getUserData, nullptr); + oluacls_prop(L, "world", _olua_fun_b2Body_getWorld, nullptr); + oluacls_prop(L, "worldCenter", _olua_fun_b2Body_getWorldCenter, nullptr); return 1; } -OLUA_END_DECLS -static int _b2BodyUserData___call(lua_State *L) +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_b2_Body(lua_State *L) { - olua_startinvoke(L); - - b2BodyUserData ret; - - luaL_checktype(L, 2, LUA_TTABLE); - - uintptr_t arg1 = 0; /** pointer */ - - olua_getfield(L, 2, "pointer"); - olua_check_integer(L, -1, &arg1); - ret.pointer = arg1; - lua_pop(L, 1); - - olua_pushcopy_object(L, ret, "b2.BodyUserData"); - - olua_endinvoke(L); - + olua_require(L, "box2d", luaopen_box2d); + if (!olua_getclass(L, "b2.Body")) { + luaL_error(L, "class not found: b2Body"); + } return 1; } +OLUA_END_DECLS -static int _b2BodyUserData___gc(lua_State *L) +static int _olua_fun_b2BodyUserData___gc(lua_State *L) { olua_startinvoke(L); @@ -6744,7 +7741,7 @@ static int _b2BodyUserData___gc(lua_State *L) return 0; } -static int _b2BodyUserData___olua_move(lua_State *L) +static int _olua_fun_b2BodyUserData___olua_move(lua_State *L) { olua_startinvoke(L); @@ -6756,7 +7753,7 @@ static int _b2BodyUserData___olua_move(lua_State *L) return 1; } -static int _b2BodyUserData_new(lua_State *L) +static int _olua_fun_b2BodyUserData_new(lua_State *L) { olua_startinvoke(L); @@ -6770,7 +7767,7 @@ static int _b2BodyUserData_new(lua_State *L) return num_ret; } -static int _b2BodyUserData_get_pointer(lua_State *L) +static int _olua_fun_b2BodyUserData_pointer$1(lua_State *L) { olua_startinvoke(L); @@ -6787,7 +7784,7 @@ static int _b2BodyUserData_get_pointer(lua_State *L) return num_ret; } -static int _b2BodyUserData_set_pointer(lua_State *L) +static int _olua_fun_b2BodyUserData_pointer$2(lua_State *L) { olua_startinvoke(L); @@ -6805,85 +7802,50 @@ static int _b2BodyUserData_set_pointer(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_b2BodyUserData(lua_State *L) +static int _olua_fun_b2BodyUserData_pointer(lua_State *L) { - oluacls_class(L, "b2.BodyUserData"); - oluacls_func(L, "__call", _b2BodyUserData___call); - oluacls_func(L, "__gc", _b2BodyUserData___gc); - oluacls_func(L, "__olua_move", _b2BodyUserData___olua_move); - oluacls_func(L, "new", _b2BodyUserData_new); - oluacls_prop(L, "pointer", _b2BodyUserData_get_pointer, _b2BodyUserData_set_pointer); + int num_args = lua_gettop(L) - 1; - return 1; -} -OLUA_END_DECLS + if (num_args == 0) { + // uintptr_t pointer + return _olua_fun_b2BodyUserData_pointer$1(L); + } -static int _b2FixtureDef___call(lua_State *L) -{ - olua_startinvoke(L); + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // uintptr_t pointer + return _olua_fun_b2BodyUserData_pointer$2(L); + // } + } - b2FixtureDef ret; + luaL_error(L, "method 'b2BodyUserData::pointer' not support '%d' arguments", num_args); - luaL_checktype(L, 2, LUA_TTABLE); + return 0; +} - b2Shape *arg1 = nullptr; /** shape */ - b2FixtureUserData arg2; /** userData */ - float arg3 = 0; /** friction */ - float arg4 = 0; /** restitution */ - float arg5 = 0; /** restitutionThreshold */ - float arg6 = 0; /** density */ - bool arg7 = false; /** isSensor */ - b2Filter arg8; /** filter */ - - olua_getfield(L, 2, "shape"); - olua_check_object(L, -1, &arg1, "b2.Shape"); - ret.shape = arg1; - lua_pop(L, 1); - - olua_getfield(L, 2, "userData"); - olua_check_object(L, -1, &arg2, "b2.FixtureUserData"); - ret.userData = arg2; - lua_pop(L, 1); - - olua_getfield(L, 2, "friction"); - olua_check_number(L, -1, &arg3); - ret.friction = arg3; - lua_pop(L, 1); - - olua_getfield(L, 2, "restitution"); - olua_check_number(L, -1, &arg4); - ret.restitution = arg4; - lua_pop(L, 1); - - olua_getfield(L, 2, "restitutionThreshold"); - olua_check_number(L, -1, &arg5); - ret.restitutionThreshold = arg5; - lua_pop(L, 1); - - olua_getfield(L, 2, "density"); - olua_check_number(L, -1, &arg6); - ret.density = arg6; - lua_pop(L, 1); - - olua_getfield(L, 2, "isSensor"); - olua_check_bool(L, -1, &arg7); - ret.isSensor = arg7; - lua_pop(L, 1); - - olua_getfield(L, 2, "filter"); - olua_check_object(L, -1, &arg8, "b2.Filter"); - ret.filter = arg8; - lua_pop(L, 1); - - olua_pushcopy_object(L, ret, "b2.FixtureDef"); +static int _olua_cls_b2_BodyUserData(lua_State *L) +{ + oluacls_class(L, "b2.BodyUserData"); + oluacls_func(L, "__gc", _olua_fun_b2BodyUserData___gc); + oluacls_func(L, "__olua_move", _olua_fun_b2BodyUserData___olua_move); + oluacls_func(L, "new", _olua_fun_b2BodyUserData_new); + oluacls_prop(L, "pointer", _olua_fun_b2BodyUserData_pointer, _olua_fun_b2BodyUserData_pointer); - olua_endinvoke(L); + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_b2_BodyUserData(lua_State *L) +{ + olua_require(L, "box2d", luaopen_box2d); + if (!olua_getclass(L, "b2.BodyUserData")) { + luaL_error(L, "class not found: b2BodyUserData"); + } return 1; } +OLUA_END_DECLS -static int _b2FixtureDef___gc(lua_State *L) +static int _olua_fun_b2FixtureDef___gc(lua_State *L) { olua_startinvoke(L); @@ -6895,7 +7857,7 @@ static int _b2FixtureDef___gc(lua_State *L) return 0; } -static int _b2FixtureDef___olua_move(lua_State *L) +static int _olua_fun_b2FixtureDef___olua_move(lua_State *L) { olua_startinvoke(L); @@ -6907,21 +7869,7 @@ static int _b2FixtureDef___olua_move(lua_State *L) return 1; } -static int _b2FixtureDef_new(lua_State *L) -{ - olua_startinvoke(L); - - // b2FixtureDef() - b2FixtureDef *ret = new b2FixtureDef(); - int num_ret = olua_push_object(L, ret, "b2.FixtureDef"); - olua_postnew(L, ret); - - olua_endinvoke(L); - - return num_ret; -} - -static int _b2FixtureDef_get_density(lua_State *L) +static int _olua_fun_b2FixtureDef_density$1(lua_State *L) { olua_startinvoke(L); @@ -6938,7 +7886,7 @@ static int _b2FixtureDef_get_density(lua_State *L) return num_ret; } -static int _b2FixtureDef_set_density(lua_State *L) +static int _olua_fun_b2FixtureDef_density$2(lua_State *L) { olua_startinvoke(L); @@ -6956,7 +7904,28 @@ static int _b2FixtureDef_set_density(lua_State *L) return 0; } -static int _b2FixtureDef_get_filter(lua_State *L) +static int _olua_fun_b2FixtureDef_density(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float density + return _olua_fun_b2FixtureDef_density$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float density + return _olua_fun_b2FixtureDef_density$2(L); + // } + } + + luaL_error(L, "method 'b2FixtureDef::density' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_b2FixtureDef_filter$1(lua_State *L) { olua_startinvoke(L); @@ -6966,32 +7935,53 @@ static int _b2FixtureDef_get_filter(lua_State *L) // b2Filter filter b2Filter &ret = self->filter; - int num_ret = olua_pushcopy_object(L, ret, "b2.Filter"); + int num_ret = olua_copy_object(L, ret, "b2.Filter"); olua_endinvoke(L); return num_ret; } -static int _b2FixtureDef_set_filter(lua_State *L) +static int _olua_fun_b2FixtureDef_filter$2(lua_State *L) { olua_startinvoke(L); b2FixtureDef *self = nullptr; - b2Filter arg1; /** filter */ + b2Filter *arg1; /** filter */ olua_to_object(L, 1, &self, "b2.FixtureDef"); olua_check_object(L, 2, &arg1, "b2.Filter"); // b2Filter filter - self->filter = arg1; + self->filter = *arg1; olua_endinvoke(L); return 0; } -static int _b2FixtureDef_get_friction(lua_State *L) +static int _olua_fun_b2FixtureDef_filter(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // b2Filter filter + return _olua_fun_b2FixtureDef_filter$1(L); + } + + if (num_args == 1) { + // if ((olua_is_object(L, 2, "b2.Filter"))) { + // b2Filter filter + return _olua_fun_b2FixtureDef_filter$2(L); + // } + } + + luaL_error(L, "method 'b2FixtureDef::filter' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_b2FixtureDef_friction$1(lua_State *L) { olua_startinvoke(L); @@ -7008,7 +7998,7 @@ static int _b2FixtureDef_get_friction(lua_State *L) return num_ret; } -static int _b2FixtureDef_set_friction(lua_State *L) +static int _olua_fun_b2FixtureDef_friction$2(lua_State *L) { olua_startinvoke(L); @@ -7026,7 +8016,28 @@ static int _b2FixtureDef_set_friction(lua_State *L) return 0; } -static int _b2FixtureDef_get_isSensor(lua_State *L) +static int _olua_fun_b2FixtureDef_friction(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float friction + return _olua_fun_b2FixtureDef_friction$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float friction + return _olua_fun_b2FixtureDef_friction$2(L); + // } + } + + luaL_error(L, "method 'b2FixtureDef::friction' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_b2FixtureDef_isSensor$1(lua_State *L) { olua_startinvoke(L); @@ -7043,7 +8054,7 @@ static int _b2FixtureDef_get_isSensor(lua_State *L) return num_ret; } -static int _b2FixtureDef_set_isSensor(lua_State *L) +static int _olua_fun_b2FixtureDef_isSensor$2(lua_State *L) { olua_startinvoke(L); @@ -7061,7 +8072,42 @@ static int _b2FixtureDef_set_isSensor(lua_State *L) return 0; } -static int _b2FixtureDef_get_restitution(lua_State *L) +static int _olua_fun_b2FixtureDef_isSensor(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // bool isSensor + return _olua_fun_b2FixtureDef_isSensor$1(L); + } + + if (num_args == 1) { + // if ((olua_is_bool(L, 2))) { + // bool isSensor + return _olua_fun_b2FixtureDef_isSensor$2(L); + // } + } + + luaL_error(L, "method 'b2FixtureDef::isSensor' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_b2FixtureDef_new(lua_State *L) +{ + olua_startinvoke(L); + + // b2FixtureDef() + b2FixtureDef *ret = new b2FixtureDef(); + int num_ret = olua_push_object(L, ret, "b2.FixtureDef"); + olua_postnew(L, ret); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_b2FixtureDef_restitution$1(lua_State *L) { olua_startinvoke(L); @@ -7078,7 +8124,7 @@ static int _b2FixtureDef_get_restitution(lua_State *L) return num_ret; } -static int _b2FixtureDef_set_restitution(lua_State *L) +static int _olua_fun_b2FixtureDef_restitution$2(lua_State *L) { olua_startinvoke(L); @@ -7096,7 +8142,28 @@ static int _b2FixtureDef_set_restitution(lua_State *L) return 0; } -static int _b2FixtureDef_get_restitutionThreshold(lua_State *L) +static int _olua_fun_b2FixtureDef_restitution(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float restitution + return _olua_fun_b2FixtureDef_restitution$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float restitution + return _olua_fun_b2FixtureDef_restitution$2(L); + // } + } + + luaL_error(L, "method 'b2FixtureDef::restitution' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_b2FixtureDef_restitutionThreshold$1(lua_State *L) { olua_startinvoke(L); @@ -7113,7 +8180,7 @@ static int _b2FixtureDef_get_restitutionThreshold(lua_State *L) return num_ret; } -static int _b2FixtureDef_set_restitutionThreshold(lua_State *L) +static int _olua_fun_b2FixtureDef_restitutionThreshold$2(lua_State *L) { olua_startinvoke(L); @@ -7131,7 +8198,28 @@ static int _b2FixtureDef_set_restitutionThreshold(lua_State *L) return 0; } -static int _b2FixtureDef_get_shape(lua_State *L) +static int _olua_fun_b2FixtureDef_restitutionThreshold(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float restitutionThreshold + return _olua_fun_b2FixtureDef_restitutionThreshold$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float restitutionThreshold + return _olua_fun_b2FixtureDef_restitutionThreshold$2(L); + // } + } + + luaL_error(L, "method 'b2FixtureDef::restitutionThreshold' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_b2FixtureDef_shape$1(lua_State *L) { olua_startinvoke(L); @@ -7148,7 +8236,7 @@ static int _b2FixtureDef_get_shape(lua_State *L) return num_ret; } -static int _b2FixtureDef_set_shape(lua_State *L) +static int _olua_fun_b2FixtureDef_shape$2(lua_State *L) { olua_startinvoke(L); @@ -7166,7 +8254,28 @@ static int _b2FixtureDef_set_shape(lua_State *L) return 0; } -static int _b2FixtureDef_get_userData(lua_State *L) +static int _olua_fun_b2FixtureDef_shape(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // const b2Shape *shape + return _olua_fun_b2FixtureDef_shape$1(L); + } + + if (num_args == 1) { + // if ((olua_is_object(L, 2, "b2.Shape"))) { + // const b2Shape *shape + return _olua_fun_b2FixtureDef_shape$2(L); + // } + } + + luaL_error(L, "method 'b2FixtureDef::shape' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_b2FixtureDef_userData$1(lua_State *L) { olua_startinvoke(L); @@ -7176,53 +8285,82 @@ static int _b2FixtureDef_get_userData(lua_State *L) // b2FixtureUserData userData b2FixtureUserData &ret = self->userData; - int num_ret = olua_pushcopy_object(L, ret, "b2.FixtureUserData"); + int num_ret = olua_copy_object(L, ret, "b2.FixtureUserData"); olua_endinvoke(L); return num_ret; } -static int _b2FixtureDef_set_userData(lua_State *L) +static int _olua_fun_b2FixtureDef_userData$2(lua_State *L) { olua_startinvoke(L); b2FixtureDef *self = nullptr; - b2FixtureUserData arg1; /** userData */ + b2FixtureUserData *arg1; /** userData */ olua_to_object(L, 1, &self, "b2.FixtureDef"); olua_check_object(L, 2, &arg1, "b2.FixtureUserData"); // b2FixtureUserData userData - self->userData = arg1; + self->userData = *arg1; + + olua_endinvoke(L); + + return 0; +} + +static int _olua_fun_b2FixtureDef_userData(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // b2FixtureUserData userData + return _olua_fun_b2FixtureDef_userData$1(L); + } + + if (num_args == 1) { + // if ((olua_is_object(L, 2, "b2.FixtureUserData"))) { + // b2FixtureUserData userData + return _olua_fun_b2FixtureDef_userData$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'b2FixtureDef::userData' not support '%d' arguments", num_args); return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_b2FixtureDef(lua_State *L) +static int _olua_cls_b2_FixtureDef(lua_State *L) { oluacls_class(L, "b2.FixtureDef"); - oluacls_func(L, "__call", _b2FixtureDef___call); - oluacls_func(L, "__gc", _b2FixtureDef___gc); - oluacls_func(L, "__olua_move", _b2FixtureDef___olua_move); - oluacls_func(L, "new", _b2FixtureDef_new); - oluacls_prop(L, "density", _b2FixtureDef_get_density, _b2FixtureDef_set_density); - oluacls_prop(L, "filter", _b2FixtureDef_get_filter, _b2FixtureDef_set_filter); - oluacls_prop(L, "friction", _b2FixtureDef_get_friction, _b2FixtureDef_set_friction); - oluacls_prop(L, "isSensor", _b2FixtureDef_get_isSensor, _b2FixtureDef_set_isSensor); - oluacls_prop(L, "restitution", _b2FixtureDef_get_restitution, _b2FixtureDef_set_restitution); - oluacls_prop(L, "restitutionThreshold", _b2FixtureDef_get_restitutionThreshold, _b2FixtureDef_set_restitutionThreshold); - oluacls_prop(L, "shape", _b2FixtureDef_get_shape, _b2FixtureDef_set_shape); - oluacls_prop(L, "userData", _b2FixtureDef_get_userData, _b2FixtureDef_set_userData); + oluacls_func(L, "__gc", _olua_fun_b2FixtureDef___gc); + oluacls_func(L, "__olua_move", _olua_fun_b2FixtureDef___olua_move); + oluacls_func(L, "new", _olua_fun_b2FixtureDef_new); + oluacls_prop(L, "density", _olua_fun_b2FixtureDef_density, _olua_fun_b2FixtureDef_density); + oluacls_prop(L, "filter", _olua_fun_b2FixtureDef_filter, _olua_fun_b2FixtureDef_filter); + oluacls_prop(L, "friction", _olua_fun_b2FixtureDef_friction, _olua_fun_b2FixtureDef_friction); + oluacls_prop(L, "isSensor", _olua_fun_b2FixtureDef_isSensor, _olua_fun_b2FixtureDef_isSensor); + oluacls_prop(L, "restitution", _olua_fun_b2FixtureDef_restitution, _olua_fun_b2FixtureDef_restitution); + oluacls_prop(L, "restitutionThreshold", _olua_fun_b2FixtureDef_restitutionThreshold, _olua_fun_b2FixtureDef_restitutionThreshold); + oluacls_prop(L, "shape", _olua_fun_b2FixtureDef_shape, _olua_fun_b2FixtureDef_shape); + oluacls_prop(L, "userData", _olua_fun_b2FixtureDef_userData, _olua_fun_b2FixtureDef_userData); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_b2_FixtureDef(lua_State *L) +{ + olua_require(L, "box2d", luaopen_box2d); + if (!olua_getclass(L, "b2.FixtureDef")) { + luaL_error(L, "class not found: b2FixtureDef"); + } return 1; } OLUA_END_DECLS -static int _b2Fixture___gc(lua_State *L) +static int _olua_fun_b2Fixture___gc(lua_State *L) { olua_startinvoke(L); @@ -7234,7 +8372,7 @@ static int _b2Fixture___gc(lua_State *L) return 0; } -static int _b2Fixture___olua_move(lua_State *L) +static int _olua_fun_b2Fixture___olua_move(lua_State *L) { olua_startinvoke(L); @@ -7246,7 +8384,7 @@ static int _b2Fixture___olua_move(lua_State *L) return 1; } -static int _b2Fixture_Dump(lua_State *L) +static int _olua_fun_b2Fixture_dump(lua_State *L) { olua_startinvoke(L); @@ -7264,7 +8402,7 @@ static int _b2Fixture_Dump(lua_State *L) return 0; } -static int _b2Fixture_GetAABB(lua_State *L) +static int _olua_fun_b2Fixture_getAABB(lua_State *L) { olua_startinvoke(L); @@ -7283,7 +8421,7 @@ static int _b2Fixture_GetAABB(lua_State *L) return num_ret; } -static int _b2Fixture_GetBody(lua_State *L) +static int _olua_fun_b2Fixture_getBody(lua_State *L) { olua_startinvoke(L); @@ -7300,7 +8438,7 @@ static int _b2Fixture_GetBody(lua_State *L) return num_ret; } -static int _b2Fixture_GetDensity(lua_State *L) +static int _olua_fun_b2Fixture_getDensity(lua_State *L) { olua_startinvoke(L); @@ -7317,7 +8455,7 @@ static int _b2Fixture_GetDensity(lua_State *L) return num_ret; } -static int _b2Fixture_GetFilterData(lua_State *L) +static int _olua_fun_b2Fixture_getFilterData(lua_State *L) { olua_startinvoke(L); @@ -7334,7 +8472,7 @@ static int _b2Fixture_GetFilterData(lua_State *L) return num_ret; } -static int _b2Fixture_GetFriction(lua_State *L) +static int _olua_fun_b2Fixture_getFriction(lua_State *L) { olua_startinvoke(L); @@ -7351,7 +8489,7 @@ static int _b2Fixture_GetFriction(lua_State *L) return num_ret; } -static int _b2Fixture_GetMassData(lua_State *L) +static int _olua_fun_b2Fixture_getMassData(lua_State *L) { olua_startinvoke(L); @@ -7369,7 +8507,7 @@ static int _b2Fixture_GetMassData(lua_State *L) return 0; } -static int _b2Fixture_GetNext(lua_State *L) +static int _olua_fun_b2Fixture_getNext(lua_State *L) { olua_startinvoke(L); @@ -7386,7 +8524,7 @@ static int _b2Fixture_GetNext(lua_State *L) return num_ret; } -static int _b2Fixture_GetRestitution(lua_State *L) +static int _olua_fun_b2Fixture_getRestitution(lua_State *L) { olua_startinvoke(L); @@ -7403,7 +8541,7 @@ static int _b2Fixture_GetRestitution(lua_State *L) return num_ret; } -static int _b2Fixture_GetRestitutionThreshold(lua_State *L) +static int _olua_fun_b2Fixture_getRestitutionThreshold(lua_State *L) { olua_startinvoke(L); @@ -7420,7 +8558,7 @@ static int _b2Fixture_GetRestitutionThreshold(lua_State *L) return num_ret; } -static int _b2Fixture_GetShape(lua_State *L) +static int _olua_fun_b2Fixture_getShape(lua_State *L) { olua_startinvoke(L); @@ -7437,7 +8575,7 @@ static int _b2Fixture_GetShape(lua_State *L) return num_ret; } -static int _b2Fixture_GetType(lua_State *L) +static int _olua_fun_b2Fixture_getType(lua_State *L) { olua_startinvoke(L); @@ -7454,7 +8592,7 @@ static int _b2Fixture_GetType(lua_State *L) return num_ret; } -static int _b2Fixture_GetUserData(lua_State *L) +static int _olua_fun_b2Fixture_getUserData(lua_State *L) { olua_startinvoke(L); @@ -7471,7 +8609,7 @@ static int _b2Fixture_GetUserData(lua_State *L) return num_ret; } -static int _b2Fixture_IsSensor(lua_State *L) +static int _olua_fun_b2Fixture_isSensor(lua_State *L) { olua_startinvoke(L); @@ -7488,13 +8626,13 @@ static int _b2Fixture_IsSensor(lua_State *L) return num_ret; } -static int _b2Fixture_RayCast(lua_State *L) +static int _olua_fun_b2Fixture_rayCast(lua_State *L) { olua_startinvoke(L); b2Fixture *self = nullptr; b2RayCastOutput *arg1 = nullptr; /** output */ - b2RayCastInput arg2; /** input */ + b2RayCastInput *arg2; /** input */ int32 arg3 = 0; /** childIndex */ olua_to_object(L, 1, &self, "b2.Fixture"); @@ -7503,7 +8641,7 @@ static int _b2Fixture_RayCast(lua_State *L) olua_check_integer(L, 4, &arg3); // bool RayCast(b2RayCastOutput *output, const b2RayCastInput &input, int32 childIndex) - bool ret = self->RayCast(arg1, arg2, arg3); + bool ret = self->RayCast(arg1, *arg2, arg3); int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); @@ -7511,7 +8649,7 @@ static int _b2Fixture_RayCast(lua_State *L) return num_ret; } -static int _b2Fixture_Refilter(lua_State *L) +static int _olua_fun_b2Fixture_refilter(lua_State *L) { olua_startinvoke(L); @@ -7527,7 +8665,7 @@ static int _b2Fixture_Refilter(lua_State *L) return 0; } -static int _b2Fixture_SetDensity(lua_State *L) +static int _olua_fun_b2Fixture_setDensity(lua_State *L) { olua_startinvoke(L); @@ -7545,25 +8683,25 @@ static int _b2Fixture_SetDensity(lua_State *L) return 0; } -static int _b2Fixture_SetFilterData(lua_State *L) +static int _olua_fun_b2Fixture_setFilterData(lua_State *L) { olua_startinvoke(L); b2Fixture *self = nullptr; - b2Filter arg1; /** filter */ + b2Filter *arg1; /** filter */ olua_to_object(L, 1, &self, "b2.Fixture"); olua_check_object(L, 2, &arg1, "b2.Filter"); // void SetFilterData(const b2Filter &filter) - self->SetFilterData(arg1); + self->SetFilterData(*arg1); olua_endinvoke(L); return 0; } -static int _b2Fixture_SetFriction(lua_State *L) +static int _olua_fun_b2Fixture_setFriction(lua_State *L) { olua_startinvoke(L); @@ -7581,7 +8719,7 @@ static int _b2Fixture_SetFriction(lua_State *L) return 0; } -static int _b2Fixture_SetRestitution(lua_State *L) +static int _olua_fun_b2Fixture_setRestitution(lua_State *L) { olua_startinvoke(L); @@ -7599,7 +8737,7 @@ static int _b2Fixture_SetRestitution(lua_State *L) return 0; } -static int _b2Fixture_SetRestitutionThreshold(lua_State *L) +static int _olua_fun_b2Fixture_setRestitutionThreshold(lua_State *L) { olua_startinvoke(L); @@ -7617,7 +8755,7 @@ static int _b2Fixture_SetRestitutionThreshold(lua_State *L) return 0; } -static int _b2Fixture_SetSensor(lua_State *L) +static int _olua_fun_b2Fixture_setSensor(lua_State *L) { olua_startinvoke(L); @@ -7635,18 +8773,18 @@ static int _b2Fixture_SetSensor(lua_State *L) return 0; } -static int _b2Fixture_TestPoint(lua_State *L) +static int _olua_fun_b2Fixture_testPoint(lua_State *L) { olua_startinvoke(L); b2Fixture *self = nullptr; - b2Vec2 arg1; /** p */ + b2Vec2 *arg1; /** p */ olua_to_object(L, 1, &self, "b2.Fixture"); olua_check_object(L, 2, &arg1, "b2.Vec2"); // bool TestPoint(const b2Vec2 &p) - bool ret = self->TestPoint(arg1); + bool ret = self->TestPoint(*arg1); int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); @@ -7654,98 +8792,61 @@ static int _b2Fixture_TestPoint(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_b2Fixture(lua_State *L) +static int _olua_cls_b2_Fixture(lua_State *L) { oluacls_class(L, "b2.Fixture"); - oluacls_func(L, "__gc", _b2Fixture___gc); - oluacls_func(L, "__olua_move", _b2Fixture___olua_move); - oluacls_func(L, "dump", _b2Fixture_Dump); - oluacls_func(L, "getAABB", _b2Fixture_GetAABB); - oluacls_func(L, "getBody", _b2Fixture_GetBody); - oluacls_func(L, "getDensity", _b2Fixture_GetDensity); - oluacls_func(L, "getFilterData", _b2Fixture_GetFilterData); - oluacls_func(L, "getFriction", _b2Fixture_GetFriction); - oluacls_func(L, "getMassData", _b2Fixture_GetMassData); - oluacls_func(L, "getNext", _b2Fixture_GetNext); - oluacls_func(L, "getRestitution", _b2Fixture_GetRestitution); - oluacls_func(L, "getRestitutionThreshold", _b2Fixture_GetRestitutionThreshold); - oluacls_func(L, "getShape", _b2Fixture_GetShape); - oluacls_func(L, "getType", _b2Fixture_GetType); - oluacls_func(L, "getUserData", _b2Fixture_GetUserData); - oluacls_func(L, "isSensor", _b2Fixture_IsSensor); - oluacls_func(L, "rayCast", _b2Fixture_RayCast); - oluacls_func(L, "refilter", _b2Fixture_Refilter); - oluacls_func(L, "setDensity", _b2Fixture_SetDensity); - oluacls_func(L, "setFilterData", _b2Fixture_SetFilterData); - oluacls_func(L, "setFriction", _b2Fixture_SetFriction); - oluacls_func(L, "setRestitution", _b2Fixture_SetRestitution); - oluacls_func(L, "setRestitutionThreshold", _b2Fixture_SetRestitutionThreshold); - oluacls_func(L, "setSensor", _b2Fixture_SetSensor); - oluacls_func(L, "testPoint", _b2Fixture_TestPoint); - oluacls_prop(L, "body", _b2Fixture_GetBody, nullptr); - oluacls_prop(L, "density", _b2Fixture_GetDensity, _b2Fixture_SetDensity); - oluacls_prop(L, "filterData", _b2Fixture_GetFilterData, _b2Fixture_SetFilterData); - oluacls_prop(L, "friction", _b2Fixture_GetFriction, _b2Fixture_SetFriction); - oluacls_prop(L, "next", _b2Fixture_GetNext, nullptr); - oluacls_prop(L, "restitution", _b2Fixture_GetRestitution, _b2Fixture_SetRestitution); - oluacls_prop(L, "restitutionThreshold", _b2Fixture_GetRestitutionThreshold, _b2Fixture_SetRestitutionThreshold); - oluacls_prop(L, "sensor", _b2Fixture_IsSensor, _b2Fixture_SetSensor); - oluacls_prop(L, "shape", _b2Fixture_GetShape, nullptr); - oluacls_prop(L, "type", _b2Fixture_GetType, nullptr); - oluacls_prop(L, "userData", _b2Fixture_GetUserData, nullptr); + oluacls_func(L, "__gc", _olua_fun_b2Fixture___gc); + oluacls_func(L, "__olua_move", _olua_fun_b2Fixture___olua_move); + oluacls_func(L, "dump", _olua_fun_b2Fixture_dump); + oluacls_func(L, "getAABB", _olua_fun_b2Fixture_getAABB); + oluacls_func(L, "getBody", _olua_fun_b2Fixture_getBody); + oluacls_func(L, "getDensity", _olua_fun_b2Fixture_getDensity); + oluacls_func(L, "getFilterData", _olua_fun_b2Fixture_getFilterData); + oluacls_func(L, "getFriction", _olua_fun_b2Fixture_getFriction); + oluacls_func(L, "getMassData", _olua_fun_b2Fixture_getMassData); + oluacls_func(L, "getNext", _olua_fun_b2Fixture_getNext); + oluacls_func(L, "getRestitution", _olua_fun_b2Fixture_getRestitution); + oluacls_func(L, "getRestitutionThreshold", _olua_fun_b2Fixture_getRestitutionThreshold); + oluacls_func(L, "getShape", _olua_fun_b2Fixture_getShape); + oluacls_func(L, "getType", _olua_fun_b2Fixture_getType); + oluacls_func(L, "getUserData", _olua_fun_b2Fixture_getUserData); + oluacls_func(L, "isSensor", _olua_fun_b2Fixture_isSensor); + oluacls_func(L, "rayCast", _olua_fun_b2Fixture_rayCast); + oluacls_func(L, "refilter", _olua_fun_b2Fixture_refilter); + oluacls_func(L, "setDensity", _olua_fun_b2Fixture_setDensity); + oluacls_func(L, "setFilterData", _olua_fun_b2Fixture_setFilterData); + oluacls_func(L, "setFriction", _olua_fun_b2Fixture_setFriction); + oluacls_func(L, "setRestitution", _olua_fun_b2Fixture_setRestitution); + oluacls_func(L, "setRestitutionThreshold", _olua_fun_b2Fixture_setRestitutionThreshold); + oluacls_func(L, "setSensor", _olua_fun_b2Fixture_setSensor); + oluacls_func(L, "testPoint", _olua_fun_b2Fixture_testPoint); + oluacls_prop(L, "body", _olua_fun_b2Fixture_getBody, nullptr); + oluacls_prop(L, "density", _olua_fun_b2Fixture_getDensity, _olua_fun_b2Fixture_setDensity); + oluacls_prop(L, "filterData", _olua_fun_b2Fixture_getFilterData, _olua_fun_b2Fixture_setFilterData); + oluacls_prop(L, "friction", _olua_fun_b2Fixture_getFriction, _olua_fun_b2Fixture_setFriction); + oluacls_prop(L, "next", _olua_fun_b2Fixture_getNext, nullptr); + oluacls_prop(L, "restitution", _olua_fun_b2Fixture_getRestitution, _olua_fun_b2Fixture_setRestitution); + oluacls_prop(L, "restitutionThreshold", _olua_fun_b2Fixture_getRestitutionThreshold, _olua_fun_b2Fixture_setRestitutionThreshold); + oluacls_prop(L, "sensor", _olua_fun_b2Fixture_isSensor, _olua_fun_b2Fixture_setSensor); + oluacls_prop(L, "shape", _olua_fun_b2Fixture_getShape, nullptr); + oluacls_prop(L, "type", _olua_fun_b2Fixture_getType, nullptr); + oluacls_prop(L, "userData", _olua_fun_b2Fixture_getUserData, nullptr); return 1; } -OLUA_END_DECLS -static int _b2JointDef___call(lua_State *L) +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_b2_Fixture(lua_State *L) { - olua_startinvoke(L); - - b2JointDef ret; - - luaL_checktype(L, 2, LUA_TTABLE); - - b2JointType arg1 = (b2JointType)0; /** type */ - b2JointUserData arg2; /** userData */ - b2Body *arg3 = nullptr; /** bodyA */ - b2Body *arg4 = nullptr; /** bodyB */ - bool arg5 = false; /** collideConnected */ - - olua_getfield(L, 2, "type"); - olua_check_enum(L, -1, &arg1); - ret.type = arg1; - lua_pop(L, 1); - - olua_getfield(L, 2, "userData"); - olua_check_object(L, -1, &arg2, "b2.JointUserData"); - ret.userData = arg2; - lua_pop(L, 1); - - olua_getfield(L, 2, "bodyA"); - olua_check_object(L, -1, &arg3, "b2.Body"); - ret.bodyA = arg3; - lua_pop(L, 1); - - olua_getfield(L, 2, "bodyB"); - olua_check_object(L, -1, &arg4, "b2.Body"); - ret.bodyB = arg4; - lua_pop(L, 1); - - olua_getfield(L, 2, "collideConnected"); - olua_check_bool(L, -1, &arg5); - ret.collideConnected = arg5; - lua_pop(L, 1); - - olua_pushcopy_object(L, ret, "b2.JointDef"); - - olua_endinvoke(L); - + olua_require(L, "box2d", luaopen_box2d); + if (!olua_getclass(L, "b2.Fixture")) { + luaL_error(L, "class not found: b2Fixture"); + } return 1; } +OLUA_END_DECLS -static int _b2JointDef___gc(lua_State *L) +static int _olua_fun_b2JointDef___gc(lua_State *L) { olua_startinvoke(L); @@ -7757,7 +8858,7 @@ static int _b2JointDef___gc(lua_State *L) return 0; } -static int _b2JointDef___olua_move(lua_State *L) +static int _olua_fun_b2JointDef___olua_move(lua_State *L) { olua_startinvoke(L); @@ -7769,21 +8870,7 @@ static int _b2JointDef___olua_move(lua_State *L) return 1; } -static int _b2JointDef_new(lua_State *L) -{ - olua_startinvoke(L); - - // b2JointDef() - b2JointDef *ret = new b2JointDef(); - int num_ret = olua_push_object(L, ret, "b2.JointDef"); - olua_postnew(L, ret); - - olua_endinvoke(L); - - return num_ret; -} - -static int _b2JointDef_get_bodyA(lua_State *L) +static int _olua_fun_b2JointDef_bodyA$1(lua_State *L) { olua_startinvoke(L); @@ -7800,7 +8887,7 @@ static int _b2JointDef_get_bodyA(lua_State *L) return num_ret; } -static int _b2JointDef_set_bodyA(lua_State *L) +static int _olua_fun_b2JointDef_bodyA$2(lua_State *L) { olua_startinvoke(L); @@ -7818,7 +8905,28 @@ static int _b2JointDef_set_bodyA(lua_State *L) return 0; } -static int _b2JointDef_get_bodyB(lua_State *L) +static int _olua_fun_b2JointDef_bodyA(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // b2Body *bodyA + return _olua_fun_b2JointDef_bodyA$1(L); + } + + if (num_args == 1) { + // if ((olua_is_object(L, 2, "b2.Body"))) { + // b2Body *bodyA + return _olua_fun_b2JointDef_bodyA$2(L); + // } + } + + luaL_error(L, "method 'b2JointDef::bodyA' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_b2JointDef_bodyB$1(lua_State *L) { olua_startinvoke(L); @@ -7835,7 +8943,7 @@ static int _b2JointDef_get_bodyB(lua_State *L) return num_ret; } -static int _b2JointDef_set_bodyB(lua_State *L) +static int _olua_fun_b2JointDef_bodyB$2(lua_State *L) { olua_startinvoke(L); @@ -7853,7 +8961,28 @@ static int _b2JointDef_set_bodyB(lua_State *L) return 0; } -static int _b2JointDef_get_collideConnected(lua_State *L) +static int _olua_fun_b2JointDef_bodyB(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // b2Body *bodyB + return _olua_fun_b2JointDef_bodyB$1(L); + } + + if (num_args == 1) { + // if ((olua_is_object(L, 2, "b2.Body"))) { + // b2Body *bodyB + return _olua_fun_b2JointDef_bodyB$2(L); + // } + } + + luaL_error(L, "method 'b2JointDef::bodyB' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_b2JointDef_collideConnected$1(lua_State *L) { olua_startinvoke(L); @@ -7870,7 +8999,7 @@ static int _b2JointDef_get_collideConnected(lua_State *L) return num_ret; } -static int _b2JointDef_set_collideConnected(lua_State *L) +static int _olua_fun_b2JointDef_collideConnected$2(lua_State *L) { olua_startinvoke(L); @@ -7888,7 +9017,42 @@ static int _b2JointDef_set_collideConnected(lua_State *L) return 0; } -static int _b2JointDef_get_type(lua_State *L) +static int _olua_fun_b2JointDef_collideConnected(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // bool collideConnected + return _olua_fun_b2JointDef_collideConnected$1(L); + } + + if (num_args == 1) { + // if ((olua_is_bool(L, 2))) { + // bool collideConnected + return _olua_fun_b2JointDef_collideConnected$2(L); + // } + } + + luaL_error(L, "method 'b2JointDef::collideConnected' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_b2JointDef_new(lua_State *L) +{ + olua_startinvoke(L); + + // b2JointDef() + b2JointDef *ret = new b2JointDef(); + int num_ret = olua_push_object(L, ret, "b2.JointDef"); + olua_postnew(L, ret); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_b2JointDef_type$1(lua_State *L) { olua_startinvoke(L); @@ -7905,7 +9069,7 @@ static int _b2JointDef_get_type(lua_State *L) return num_ret; } -static int _b2JointDef_set_type(lua_State *L) +static int _olua_fun_b2JointDef_type$2(lua_State *L) { olua_startinvoke(L); @@ -7923,7 +9087,28 @@ static int _b2JointDef_set_type(lua_State *L) return 0; } -static int _b2JointDef_get_userData(lua_State *L) +static int _olua_fun_b2JointDef_type(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // b2JointType type + return _olua_fun_b2JointDef_type$1(L); + } + + if (num_args == 1) { + // if ((olua_is_enum(L, 2))) { + // b2JointType type + return _olua_fun_b2JointDef_type$2(L); + // } + } + + luaL_error(L, "method 'b2JointDef::type' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_b2JointDef_userData$1(lua_State *L) { olua_startinvoke(L); @@ -7933,51 +9118,79 @@ static int _b2JointDef_get_userData(lua_State *L) // b2JointUserData userData b2JointUserData &ret = self->userData; - int num_ret = olua_pushcopy_object(L, ret, "b2.JointUserData"); + int num_ret = olua_copy_object(L, ret, "b2.JointUserData"); olua_endinvoke(L); return num_ret; } -static int _b2JointDef_set_userData(lua_State *L) +static int _olua_fun_b2JointDef_userData$2(lua_State *L) { olua_startinvoke(L); b2JointDef *self = nullptr; - b2JointUserData arg1; /** userData */ + b2JointUserData *arg1; /** userData */ olua_to_object(L, 1, &self, "b2.JointDef"); olua_check_object(L, 2, &arg1, "b2.JointUserData"); // b2JointUserData userData - self->userData = arg1; + self->userData = *arg1; olua_endinvoke(L); return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_b2JointDef(lua_State *L) +static int _olua_fun_b2JointDef_userData(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // b2JointUserData userData + return _olua_fun_b2JointDef_userData$1(L); + } + + if (num_args == 1) { + // if ((olua_is_object(L, 2, "b2.JointUserData"))) { + // b2JointUserData userData + return _olua_fun_b2JointDef_userData$2(L); + // } + } + + luaL_error(L, "method 'b2JointDef::userData' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_cls_b2_JointDef(lua_State *L) { oluacls_class(L, "b2.JointDef"); - oluacls_func(L, "__call", _b2JointDef___call); - oluacls_func(L, "__gc", _b2JointDef___gc); - oluacls_func(L, "__olua_move", _b2JointDef___olua_move); - oluacls_func(L, "new", _b2JointDef_new); - oluacls_prop(L, "bodyA", _b2JointDef_get_bodyA, _b2JointDef_set_bodyA); - oluacls_prop(L, "bodyB", _b2JointDef_get_bodyB, _b2JointDef_set_bodyB); - oluacls_prop(L, "collideConnected", _b2JointDef_get_collideConnected, _b2JointDef_set_collideConnected); - oluacls_prop(L, "type", _b2JointDef_get_type, _b2JointDef_set_type); - oluacls_prop(L, "userData", _b2JointDef_get_userData, _b2JointDef_set_userData); + oluacls_func(L, "__gc", _olua_fun_b2JointDef___gc); + oluacls_func(L, "__olua_move", _olua_fun_b2JointDef___olua_move); + oluacls_func(L, "new", _olua_fun_b2JointDef_new); + oluacls_prop(L, "bodyA", _olua_fun_b2JointDef_bodyA, _olua_fun_b2JointDef_bodyA); + oluacls_prop(L, "bodyB", _olua_fun_b2JointDef_bodyB, _olua_fun_b2JointDef_bodyB); + oluacls_prop(L, "collideConnected", _olua_fun_b2JointDef_collideConnected, _olua_fun_b2JointDef_collideConnected); + oluacls_prop(L, "type", _olua_fun_b2JointDef_type, _olua_fun_b2JointDef_type); + oluacls_prop(L, "userData", _olua_fun_b2JointDef_userData, _olua_fun_b2JointDef_userData); return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_b2JointType(lua_State *L) +OLUA_LIB int luaopen_b2_JointDef(lua_State *L) +{ + olua_require(L, "box2d", luaopen_box2d); + if (!olua_getclass(L, "b2.JointDef")) { + luaL_error(L, "class not found: b2JointDef"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_b2_JointType(lua_State *L) { oluacls_class(L, "b2.JointType"); oluacls_func(L, "__index", olua_indexerror); @@ -7996,9 +9209,19 @@ OLUA_LIB int luaopen_b2JointType(lua_State *L) return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_b2_JointType(lua_State *L) +{ + olua_require(L, "box2d", luaopen_box2d); + if (!olua_getclass(L, "b2.JointType")) { + luaL_error(L, "class not found: b2JointType"); + } + return 1; +} OLUA_END_DECLS -static int _b2Joint___olua_move(lua_State *L) +static int _olua_fun_b2Joint___olua_move(lua_State *L) { olua_startinvoke(L); @@ -8010,7 +9233,7 @@ static int _b2Joint___olua_move(lua_State *L) return 1; } -static int _b2Joint_Draw(lua_State *L) +static int _olua_fun_b2Joint_draw(lua_State *L) { olua_startinvoke(L); @@ -8028,7 +9251,7 @@ static int _b2Joint_Draw(lua_State *L) return 0; } -static int _b2Joint_Dump(lua_State *L) +static int _olua_fun_b2Joint_dump(lua_State *L) { olua_startinvoke(L); @@ -8044,7 +9267,7 @@ static int _b2Joint_Dump(lua_State *L) return 0; } -static int _b2Joint_GetAnchorA(lua_State *L) +static int _olua_fun_b2Joint_getAnchorA(lua_State *L) { olua_startinvoke(L); @@ -8054,14 +9277,14 @@ static int _b2Joint_GetAnchorA(lua_State *L) // b2Vec2 GetAnchorA() b2Vec2 ret = self->GetAnchorA(); - int num_ret = olua_pushcopy_object(L, ret, "b2.Vec2"); + int num_ret = olua_copy_object(L, ret, "b2.Vec2"); olua_endinvoke(L); return num_ret; } -static int _b2Joint_GetAnchorB(lua_State *L) +static int _olua_fun_b2Joint_getAnchorB(lua_State *L) { olua_startinvoke(L); @@ -8071,14 +9294,14 @@ static int _b2Joint_GetAnchorB(lua_State *L) // b2Vec2 GetAnchorB() b2Vec2 ret = self->GetAnchorB(); - int num_ret = olua_pushcopy_object(L, ret, "b2.Vec2"); + int num_ret = olua_copy_object(L, ret, "b2.Vec2"); olua_endinvoke(L); return num_ret; } -static int _b2Joint_GetBodyA(lua_State *L) +static int _olua_fun_b2Joint_getBodyA(lua_State *L) { olua_startinvoke(L); @@ -8095,7 +9318,7 @@ static int _b2Joint_GetBodyA(lua_State *L) return num_ret; } -static int _b2Joint_GetBodyB(lua_State *L) +static int _olua_fun_b2Joint_getBodyB(lua_State *L) { olua_startinvoke(L); @@ -8112,7 +9335,7 @@ static int _b2Joint_GetBodyB(lua_State *L) return num_ret; } -static int _b2Joint_GetCollideConnected(lua_State *L) +static int _olua_fun_b2Joint_getCollideConnected(lua_State *L) { olua_startinvoke(L); @@ -8129,7 +9352,7 @@ static int _b2Joint_GetCollideConnected(lua_State *L) return num_ret; } -static int _b2Joint_GetNext(lua_State *L) +static int _olua_fun_b2Joint_getNext(lua_State *L) { olua_startinvoke(L); @@ -8146,7 +9369,7 @@ static int _b2Joint_GetNext(lua_State *L) return num_ret; } -static int _b2Joint_GetReactionForce(lua_State *L) +static int _olua_fun_b2Joint_getReactionForce(lua_State *L) { olua_startinvoke(L); @@ -8158,14 +9381,14 @@ static int _b2Joint_GetReactionForce(lua_State *L) // b2Vec2 GetReactionForce(float inv_dt) b2Vec2 ret = self->GetReactionForce(arg1); - int num_ret = olua_pushcopy_object(L, ret, "b2.Vec2"); + int num_ret = olua_copy_object(L, ret, "b2.Vec2"); olua_endinvoke(L); return num_ret; } -static int _b2Joint_GetReactionTorque(lua_State *L) +static int _olua_fun_b2Joint_getReactionTorque(lua_State *L) { olua_startinvoke(L); @@ -8184,7 +9407,7 @@ static int _b2Joint_GetReactionTorque(lua_State *L) return num_ret; } -static int _b2Joint_GetType(lua_State *L) +static int _olua_fun_b2Joint_getType(lua_State *L) { olua_startinvoke(L); @@ -8201,7 +9424,7 @@ static int _b2Joint_GetType(lua_State *L) return num_ret; } -static int _b2Joint_GetUserData(lua_State *L) +static int _olua_fun_b2Joint_getUserData(lua_State *L) { olua_startinvoke(L); @@ -8218,7 +9441,7 @@ static int _b2Joint_GetUserData(lua_State *L) return num_ret; } -static int _b2Joint_IsEnabled(lua_State *L) +static int _olua_fun_b2Joint_isEnabled(lua_State *L) { olua_startinvoke(L); @@ -8235,131 +9458,147 @@ static int _b2Joint_IsEnabled(lua_State *L) return num_ret; } -static int _b2Joint_ShiftOrigin(lua_State *L) +static int _olua_fun_b2Joint_shiftOrigin(lua_State *L) { olua_startinvoke(L); b2Joint *self = nullptr; - b2Vec2 arg1; /** newOrigin */ + b2Vec2 *arg1; /** newOrigin */ olua_to_object(L, 1, &self, "b2.Joint"); olua_check_object(L, 2, &arg1, "b2.Vec2"); // void ShiftOrigin(const b2Vec2 &newOrigin) - self->ShiftOrigin(arg1); + self->ShiftOrigin(*arg1); olua_endinvoke(L); return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_b2Joint(lua_State *L) +static int _olua_cls_b2_Joint(lua_State *L) { oluacls_class(L, "b2.Joint"); - oluacls_func(L, "__olua_move", _b2Joint___olua_move); - oluacls_func(L, "draw", _b2Joint_Draw); - oluacls_func(L, "dump", _b2Joint_Dump); - oluacls_func(L, "getAnchorA", _b2Joint_GetAnchorA); - oluacls_func(L, "getAnchorB", _b2Joint_GetAnchorB); - oluacls_func(L, "getBodyA", _b2Joint_GetBodyA); - oluacls_func(L, "getBodyB", _b2Joint_GetBodyB); - oluacls_func(L, "getCollideConnected", _b2Joint_GetCollideConnected); - oluacls_func(L, "getNext", _b2Joint_GetNext); - oluacls_func(L, "getReactionForce", _b2Joint_GetReactionForce); - oluacls_func(L, "getReactionTorque", _b2Joint_GetReactionTorque); - oluacls_func(L, "getType", _b2Joint_GetType); - oluacls_func(L, "getUserData", _b2Joint_GetUserData); - oluacls_func(L, "isEnabled", _b2Joint_IsEnabled); - oluacls_func(L, "shiftOrigin", _b2Joint_ShiftOrigin); - oluacls_prop(L, "anchorA", _b2Joint_GetAnchorA, nullptr); - oluacls_prop(L, "anchorB", _b2Joint_GetAnchorB, nullptr); - oluacls_prop(L, "bodyA", _b2Joint_GetBodyA, nullptr); - oluacls_prop(L, "bodyB", _b2Joint_GetBodyB, nullptr); - oluacls_prop(L, "collideConnected", _b2Joint_GetCollideConnected, nullptr); - oluacls_prop(L, "enabled", _b2Joint_IsEnabled, nullptr); - oluacls_prop(L, "next", _b2Joint_GetNext, nullptr); - oluacls_prop(L, "type", _b2Joint_GetType, nullptr); - oluacls_prop(L, "userData", _b2Joint_GetUserData, nullptr); + oluacls_func(L, "__olua_move", _olua_fun_b2Joint___olua_move); + oluacls_func(L, "draw", _olua_fun_b2Joint_draw); + oluacls_func(L, "dump", _olua_fun_b2Joint_dump); + oluacls_func(L, "getAnchorA", _olua_fun_b2Joint_getAnchorA); + oluacls_func(L, "getAnchorB", _olua_fun_b2Joint_getAnchorB); + oluacls_func(L, "getBodyA", _olua_fun_b2Joint_getBodyA); + oluacls_func(L, "getBodyB", _olua_fun_b2Joint_getBodyB); + oluacls_func(L, "getCollideConnected", _olua_fun_b2Joint_getCollideConnected); + oluacls_func(L, "getNext", _olua_fun_b2Joint_getNext); + oluacls_func(L, "getReactionForce", _olua_fun_b2Joint_getReactionForce); + oluacls_func(L, "getReactionTorque", _olua_fun_b2Joint_getReactionTorque); + oluacls_func(L, "getType", _olua_fun_b2Joint_getType); + oluacls_func(L, "getUserData", _olua_fun_b2Joint_getUserData); + oluacls_func(L, "isEnabled", _olua_fun_b2Joint_isEnabled); + oluacls_func(L, "shiftOrigin", _olua_fun_b2Joint_shiftOrigin); + oluacls_prop(L, "anchorA", _olua_fun_b2Joint_getAnchorA, nullptr); + oluacls_prop(L, "anchorB", _olua_fun_b2Joint_getAnchorB, nullptr); + oluacls_prop(L, "bodyA", _olua_fun_b2Joint_getBodyA, nullptr); + oluacls_prop(L, "bodyB", _olua_fun_b2Joint_getBodyB, nullptr); + oluacls_prop(L, "collideConnected", _olua_fun_b2Joint_getCollideConnected, nullptr); + oluacls_prop(L, "enabled", _olua_fun_b2Joint_isEnabled, nullptr); + oluacls_prop(L, "next", _olua_fun_b2Joint_getNext, nullptr); + oluacls_prop(L, "type", _olua_fun_b2Joint_getType, nullptr); + oluacls_prop(L, "userData", _olua_fun_b2Joint_getUserData, nullptr); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_b2_Joint(lua_State *L) +{ + olua_require(L, "box2d", luaopen_box2d); + if (!olua_getclass(L, "b2.Joint")) { + luaL_error(L, "class not found: b2Joint"); + } return 1; } OLUA_END_DECLS -static int _b2DistanceJointDef_Initialize(lua_State *L) +static int _olua_fun_b2DistanceJointDef_damping$1(lua_State *L) { olua_startinvoke(L); b2DistanceJointDef *self = nullptr; - b2Body *arg1 = nullptr; /** bodyA */ - b2Body *arg2 = nullptr; /** bodyB */ - b2Vec2 arg3; /** anchorA */ - b2Vec2 arg4; /** anchorB */ olua_to_object(L, 1, &self, "b2.DistanceJointDef"); - olua_check_object(L, 2, &arg1, "b2.Body"); - olua_check_object(L, 3, &arg2, "b2.Body"); - olua_check_object(L, 4, &arg3, "b2.Vec2"); - olua_check_object(L, 5, &arg4, "b2.Vec2"); - // void Initialize(b2Body *bodyA, b2Body *bodyB, const b2Vec2 &anchorA, const b2Vec2 &anchorB) - self->Initialize(arg1, arg2, arg3, arg4); + // float damping + float ret = self->damping; + int num_ret = olua_push_number(L, ret); olua_endinvoke(L); - return 0; + return num_ret; } -static int _b2DistanceJointDef_new(lua_State *L) +static int _olua_fun_b2DistanceJointDef_damping$2(lua_State *L) { olua_startinvoke(L); - // b2DistanceJointDef() - b2DistanceJointDef *ret = new b2DistanceJointDef(); - int num_ret = olua_push_object(L, ret, "b2.DistanceJointDef"); - olua_postnew(L, ret); + b2DistanceJointDef *self = nullptr; + float arg1 = 0; /** damping */ + + olua_to_object(L, 1, &self, "b2.DistanceJointDef"); + olua_check_number(L, 2, &arg1); + + // float damping + self->damping = arg1; olua_endinvoke(L); - return num_ret; + return 0; } -static int _b2DistanceJointDef_get_damping(lua_State *L) +static int _olua_fun_b2DistanceJointDef_damping(lua_State *L) { - olua_startinvoke(L); - - b2DistanceJointDef *self = nullptr; + int num_args = lua_gettop(L) - 1; - olua_to_object(L, 1, &self, "b2.DistanceJointDef"); + if (num_args == 0) { + // float damping + return _olua_fun_b2DistanceJointDef_damping$1(L); + } - // float damping - float ret = self->damping; - int num_ret = olua_push_number(L, ret); + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float damping + return _olua_fun_b2DistanceJointDef_damping$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'b2DistanceJointDef::damping' not support '%d' arguments", num_args); - return num_ret; + return 0; } -static int _b2DistanceJointDef_set_damping(lua_State *L) +static int _olua_fun_b2DistanceJointDef_initialize(lua_State *L) { olua_startinvoke(L); b2DistanceJointDef *self = nullptr; - float arg1 = 0; /** damping */ + b2Body *arg1 = nullptr; /** bodyA */ + b2Body *arg2 = nullptr; /** bodyB */ + b2Vec2 *arg3; /** anchorA */ + b2Vec2 *arg4; /** anchorB */ olua_to_object(L, 1, &self, "b2.DistanceJointDef"); - olua_check_number(L, 2, &arg1); + olua_check_object(L, 2, &arg1, "b2.Body"); + olua_check_object(L, 3, &arg2, "b2.Body"); + olua_check_object(L, 4, &arg3, "b2.Vec2"); + olua_check_object(L, 5, &arg4, "b2.Vec2"); - // float damping - self->damping = arg1; + // void Initialize(b2Body *bodyA, b2Body *bodyB, const b2Vec2 &anchorA, const b2Vec2 &anchorB) + self->Initialize(arg1, arg2, *arg3, *arg4); olua_endinvoke(L); return 0; } -static int _b2DistanceJointDef_get_length(lua_State *L) +static int _olua_fun_b2DistanceJointDef_length$1(lua_State *L) { olua_startinvoke(L); @@ -8376,7 +9615,7 @@ static int _b2DistanceJointDef_get_length(lua_State *L) return num_ret; } -static int _b2DistanceJointDef_set_length(lua_State *L) +static int _olua_fun_b2DistanceJointDef_length$2(lua_State *L) { olua_startinvoke(L); @@ -8394,7 +9633,28 @@ static int _b2DistanceJointDef_set_length(lua_State *L) return 0; } -static int _b2DistanceJointDef_get_localAnchorA(lua_State *L) +static int _olua_fun_b2DistanceJointDef_length(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float length + return _olua_fun_b2DistanceJointDef_length$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float length + return _olua_fun_b2DistanceJointDef_length$2(L); + // } + } + + luaL_error(L, "method 'b2DistanceJointDef::length' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_b2DistanceJointDef_localAnchorA$1(lua_State *L) { olua_startinvoke(L); @@ -8404,32 +9664,53 @@ static int _b2DistanceJointDef_get_localAnchorA(lua_State *L) // b2Vec2 localAnchorA b2Vec2 &ret = self->localAnchorA; - int num_ret = olua_pushcopy_object(L, ret, "b2.Vec2"); + int num_ret = olua_copy_object(L, ret, "b2.Vec2"); olua_endinvoke(L); return num_ret; } -static int _b2DistanceJointDef_set_localAnchorA(lua_State *L) +static int _olua_fun_b2DistanceJointDef_localAnchorA$2(lua_State *L) { olua_startinvoke(L); b2DistanceJointDef *self = nullptr; - b2Vec2 arg1; /** localAnchorA */ + b2Vec2 *arg1; /** localAnchorA */ olua_to_object(L, 1, &self, "b2.DistanceJointDef"); olua_check_object(L, 2, &arg1, "b2.Vec2"); // b2Vec2 localAnchorA - self->localAnchorA = arg1; + self->localAnchorA = *arg1; olua_endinvoke(L); return 0; } -static int _b2DistanceJointDef_get_localAnchorB(lua_State *L) +static int _olua_fun_b2DistanceJointDef_localAnchorA(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // b2Vec2 localAnchorA + return _olua_fun_b2DistanceJointDef_localAnchorA$1(L); + } + + if (num_args == 1) { + // if ((olua_is_object(L, 2, "b2.Vec2"))) { + // b2Vec2 localAnchorA + return _olua_fun_b2DistanceJointDef_localAnchorA$2(L); + // } + } + + luaL_error(L, "method 'b2DistanceJointDef::localAnchorA' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_b2DistanceJointDef_localAnchorB$1(lua_State *L) { olua_startinvoke(L); @@ -8439,32 +9720,53 @@ static int _b2DistanceJointDef_get_localAnchorB(lua_State *L) // b2Vec2 localAnchorB b2Vec2 &ret = self->localAnchorB; - int num_ret = olua_pushcopy_object(L, ret, "b2.Vec2"); + int num_ret = olua_copy_object(L, ret, "b2.Vec2"); olua_endinvoke(L); return num_ret; } -static int _b2DistanceJointDef_set_localAnchorB(lua_State *L) +static int _olua_fun_b2DistanceJointDef_localAnchorB$2(lua_State *L) { olua_startinvoke(L); b2DistanceJointDef *self = nullptr; - b2Vec2 arg1; /** localAnchorB */ + b2Vec2 *arg1; /** localAnchorB */ olua_to_object(L, 1, &self, "b2.DistanceJointDef"); olua_check_object(L, 2, &arg1, "b2.Vec2"); // b2Vec2 localAnchorB - self->localAnchorB = arg1; + self->localAnchorB = *arg1; olua_endinvoke(L); return 0; } -static int _b2DistanceJointDef_get_maxLength(lua_State *L) +static int _olua_fun_b2DistanceJointDef_localAnchorB(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // b2Vec2 localAnchorB + return _olua_fun_b2DistanceJointDef_localAnchorB$1(L); + } + + if (num_args == 1) { + // if ((olua_is_object(L, 2, "b2.Vec2"))) { + // b2Vec2 localAnchorB + return _olua_fun_b2DistanceJointDef_localAnchorB$2(L); + // } + } + + luaL_error(L, "method 'b2DistanceJointDef::localAnchorB' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_b2DistanceJointDef_maxLength$1(lua_State *L) { olua_startinvoke(L); @@ -8481,25 +9783,46 @@ static int _b2DistanceJointDef_get_maxLength(lua_State *L) return num_ret; } -static int _b2DistanceJointDef_set_maxLength(lua_State *L) +static int _olua_fun_b2DistanceJointDef_maxLength$2(lua_State *L) { olua_startinvoke(L); b2DistanceJointDef *self = nullptr; float arg1 = 0; /** maxLength */ - olua_to_object(L, 1, &self, "b2.DistanceJointDef"); - olua_check_number(L, 2, &arg1); + olua_to_object(L, 1, &self, "b2.DistanceJointDef"); + olua_check_number(L, 2, &arg1); + + // float maxLength + self->maxLength = arg1; + + olua_endinvoke(L); + + return 0; +} + +static int _olua_fun_b2DistanceJointDef_maxLength(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float maxLength + return _olua_fun_b2DistanceJointDef_maxLength$1(L); + } - // float maxLength - self->maxLength = arg1; + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float maxLength + return _olua_fun_b2DistanceJointDef_maxLength$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'b2DistanceJointDef::maxLength' not support '%d' arguments", num_args); return 0; } -static int _b2DistanceJointDef_get_minLength(lua_State *L) +static int _olua_fun_b2DistanceJointDef_minLength$1(lua_State *L) { olua_startinvoke(L); @@ -8516,7 +9839,7 @@ static int _b2DistanceJointDef_get_minLength(lua_State *L) return num_ret; } -static int _b2DistanceJointDef_set_minLength(lua_State *L) +static int _olua_fun_b2DistanceJointDef_minLength$2(lua_State *L) { olua_startinvoke(L); @@ -8534,7 +9857,42 @@ static int _b2DistanceJointDef_set_minLength(lua_State *L) return 0; } -static int _b2DistanceJointDef_get_stiffness(lua_State *L) +static int _olua_fun_b2DistanceJointDef_minLength(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float minLength + return _olua_fun_b2DistanceJointDef_minLength$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float minLength + return _olua_fun_b2DistanceJointDef_minLength$2(L); + // } + } + + luaL_error(L, "method 'b2DistanceJointDef::minLength' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_b2DistanceJointDef_new(lua_State *L) +{ + olua_startinvoke(L); + + // b2DistanceJointDef() + b2DistanceJointDef *ret = new b2DistanceJointDef(); + int num_ret = olua_push_object(L, ret, "b2.DistanceJointDef"); + olua_postnew(L, ret); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_b2DistanceJointDef_stiffness$1(lua_State *L) { olua_startinvoke(L); @@ -8551,7 +9909,7 @@ static int _b2DistanceJointDef_get_stiffness(lua_State *L) return num_ret; } -static int _b2DistanceJointDef_set_stiffness(lua_State *L) +static int _olua_fun_b2DistanceJointDef_stiffness$2(lua_State *L) { olua_startinvoke(L); @@ -8569,25 +9927,55 @@ static int _b2DistanceJointDef_set_stiffness(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_b2DistanceJointDef(lua_State *L) +static int _olua_fun_b2DistanceJointDef_stiffness(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float stiffness + return _olua_fun_b2DistanceJointDef_stiffness$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float stiffness + return _olua_fun_b2DistanceJointDef_stiffness$2(L); + // } + } + + luaL_error(L, "method 'b2DistanceJointDef::stiffness' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_cls_b2_DistanceJointDef(lua_State *L) { oluacls_class(L, "b2.DistanceJointDef"); - oluacls_func(L, "initialize", _b2DistanceJointDef_Initialize); - oluacls_func(L, "new", _b2DistanceJointDef_new); - oluacls_prop(L, "damping", _b2DistanceJointDef_get_damping, _b2DistanceJointDef_set_damping); - oluacls_prop(L, "length", _b2DistanceJointDef_get_length, _b2DistanceJointDef_set_length); - oluacls_prop(L, "localAnchorA", _b2DistanceJointDef_get_localAnchorA, _b2DistanceJointDef_set_localAnchorA); - oluacls_prop(L, "localAnchorB", _b2DistanceJointDef_get_localAnchorB, _b2DistanceJointDef_set_localAnchorB); - oluacls_prop(L, "maxLength", _b2DistanceJointDef_get_maxLength, _b2DistanceJointDef_set_maxLength); - oluacls_prop(L, "minLength", _b2DistanceJointDef_get_minLength, _b2DistanceJointDef_set_minLength); - oluacls_prop(L, "stiffness", _b2DistanceJointDef_get_stiffness, _b2DistanceJointDef_set_stiffness); + oluacls_func(L, "initialize", _olua_fun_b2DistanceJointDef_initialize); + oluacls_func(L, "new", _olua_fun_b2DistanceJointDef_new); + oluacls_prop(L, "damping", _olua_fun_b2DistanceJointDef_damping, _olua_fun_b2DistanceJointDef_damping); + oluacls_prop(L, "length", _olua_fun_b2DistanceJointDef_length, _olua_fun_b2DistanceJointDef_length); + oluacls_prop(L, "localAnchorA", _olua_fun_b2DistanceJointDef_localAnchorA, _olua_fun_b2DistanceJointDef_localAnchorA); + oluacls_prop(L, "localAnchorB", _olua_fun_b2DistanceJointDef_localAnchorB, _olua_fun_b2DistanceJointDef_localAnchorB); + oluacls_prop(L, "maxLength", _olua_fun_b2DistanceJointDef_maxLength, _olua_fun_b2DistanceJointDef_maxLength); + oluacls_prop(L, "minLength", _olua_fun_b2DistanceJointDef_minLength, _olua_fun_b2DistanceJointDef_minLength); + oluacls_prop(L, "stiffness", _olua_fun_b2DistanceJointDef_stiffness, _olua_fun_b2DistanceJointDef_stiffness); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_b2_DistanceJointDef(lua_State *L) +{ + olua_require(L, "box2d", luaopen_box2d); + if (!olua_getclass(L, "b2.DistanceJointDef")) { + luaL_error(L, "class not found: b2DistanceJointDef"); + } + return 1; +} OLUA_END_DECLS -static int _b2DistanceJoint___gc(lua_State *L) +static int _olua_fun_b2DistanceJoint___gc(lua_State *L) { olua_startinvoke(L); @@ -8599,7 +9987,7 @@ static int _b2DistanceJoint___gc(lua_State *L) return 0; } -static int _b2DistanceJoint_GetCurrentLength(lua_State *L) +static int _olua_fun_b2DistanceJoint_getCurrentLength(lua_State *L) { olua_startinvoke(L); @@ -8616,7 +10004,7 @@ static int _b2DistanceJoint_GetCurrentLength(lua_State *L) return num_ret; } -static int _b2DistanceJoint_GetDamping(lua_State *L) +static int _olua_fun_b2DistanceJoint_getDamping(lua_State *L) { olua_startinvoke(L); @@ -8633,7 +10021,7 @@ static int _b2DistanceJoint_GetDamping(lua_State *L) return num_ret; } -static int _b2DistanceJoint_GetLength(lua_State *L) +static int _olua_fun_b2DistanceJoint_getLength(lua_State *L) { olua_startinvoke(L); @@ -8650,7 +10038,7 @@ static int _b2DistanceJoint_GetLength(lua_State *L) return num_ret; } -static int _b2DistanceJoint_GetLocalAnchorA(lua_State *L) +static int _olua_fun_b2DistanceJoint_getLocalAnchorA(lua_State *L) { olua_startinvoke(L); @@ -8667,7 +10055,7 @@ static int _b2DistanceJoint_GetLocalAnchorA(lua_State *L) return num_ret; } -static int _b2DistanceJoint_GetLocalAnchorB(lua_State *L) +static int _olua_fun_b2DistanceJoint_getLocalAnchorB(lua_State *L) { olua_startinvoke(L); @@ -8684,7 +10072,7 @@ static int _b2DistanceJoint_GetLocalAnchorB(lua_State *L) return num_ret; } -static int _b2DistanceJoint_GetMaxLength(lua_State *L) +static int _olua_fun_b2DistanceJoint_getMaxLength(lua_State *L) { olua_startinvoke(L); @@ -8701,7 +10089,7 @@ static int _b2DistanceJoint_GetMaxLength(lua_State *L) return num_ret; } -static int _b2DistanceJoint_GetMinLength(lua_State *L) +static int _olua_fun_b2DistanceJoint_getMinLength(lua_State *L) { olua_startinvoke(L); @@ -8718,7 +10106,7 @@ static int _b2DistanceJoint_GetMinLength(lua_State *L) return num_ret; } -static int _b2DistanceJoint_GetStiffness(lua_State *L) +static int _olua_fun_b2DistanceJoint_getStiffness(lua_State *L) { olua_startinvoke(L); @@ -8735,7 +10123,7 @@ static int _b2DistanceJoint_GetStiffness(lua_State *L) return num_ret; } -static int _b2DistanceJoint_SetDamping(lua_State *L) +static int _olua_fun_b2DistanceJoint_setDamping(lua_State *L) { olua_startinvoke(L); @@ -8753,7 +10141,7 @@ static int _b2DistanceJoint_SetDamping(lua_State *L) return 0; } -static int _b2DistanceJoint_SetLength(lua_State *L) +static int _olua_fun_b2DistanceJoint_setLength(lua_State *L) { olua_startinvoke(L); @@ -8772,7 +10160,7 @@ static int _b2DistanceJoint_SetLength(lua_State *L) return num_ret; } -static int _b2DistanceJoint_SetMaxLength(lua_State *L) +static int _olua_fun_b2DistanceJoint_setMaxLength(lua_State *L) { olua_startinvoke(L); @@ -8791,7 +10179,7 @@ static int _b2DistanceJoint_SetMaxLength(lua_State *L) return num_ret; } -static int _b2DistanceJoint_SetMinLength(lua_State *L) +static int _olua_fun_b2DistanceJoint_setMinLength(lua_State *L) { olua_startinvoke(L); @@ -8810,7 +10198,7 @@ static int _b2DistanceJoint_SetMinLength(lua_State *L) return num_ret; } -static int _b2DistanceJoint_SetStiffness(lua_State *L) +static int _olua_fun_b2DistanceJoint_setStiffness(lua_State *L) { olua_startinvoke(L); @@ -8828,45 +10216,54 @@ static int _b2DistanceJoint_SetStiffness(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_b2DistanceJoint(lua_State *L) +static int _olua_cls_b2_DistanceJoint(lua_State *L) { oluacls_class(L, "b2.DistanceJoint"); - oluacls_func(L, "__gc", _b2DistanceJoint___gc); - oluacls_func(L, "getCurrentLength", _b2DistanceJoint_GetCurrentLength); - oluacls_func(L, "getDamping", _b2DistanceJoint_GetDamping); - oluacls_func(L, "getLength", _b2DistanceJoint_GetLength); - oluacls_func(L, "getLocalAnchorA", _b2DistanceJoint_GetLocalAnchorA); - oluacls_func(L, "getLocalAnchorB", _b2DistanceJoint_GetLocalAnchorB); - oluacls_func(L, "getMaxLength", _b2DistanceJoint_GetMaxLength); - oluacls_func(L, "getMinLength", _b2DistanceJoint_GetMinLength); - oluacls_func(L, "getStiffness", _b2DistanceJoint_GetStiffness); - oluacls_func(L, "setDamping", _b2DistanceJoint_SetDamping); - oluacls_func(L, "setLength", _b2DistanceJoint_SetLength); - oluacls_func(L, "setMaxLength", _b2DistanceJoint_SetMaxLength); - oluacls_func(L, "setMinLength", _b2DistanceJoint_SetMinLength); - oluacls_func(L, "setStiffness", _b2DistanceJoint_SetStiffness); - oluacls_prop(L, "currentLength", _b2DistanceJoint_GetCurrentLength, nullptr); - oluacls_prop(L, "damping", _b2DistanceJoint_GetDamping, _b2DistanceJoint_SetDamping); - oluacls_prop(L, "length", _b2DistanceJoint_GetLength, _b2DistanceJoint_SetLength); - oluacls_prop(L, "localAnchorA", _b2DistanceJoint_GetLocalAnchorA, nullptr); - oluacls_prop(L, "localAnchorB", _b2DistanceJoint_GetLocalAnchorB, nullptr); - oluacls_prop(L, "maxLength", _b2DistanceJoint_GetMaxLength, _b2DistanceJoint_SetMaxLength); - oluacls_prop(L, "minLength", _b2DistanceJoint_GetMinLength, _b2DistanceJoint_SetMinLength); - oluacls_prop(L, "stiffness", _b2DistanceJoint_GetStiffness, _b2DistanceJoint_SetStiffness); + oluacls_func(L, "__gc", _olua_fun_b2DistanceJoint___gc); + oluacls_func(L, "getCurrentLength", _olua_fun_b2DistanceJoint_getCurrentLength); + oluacls_func(L, "getDamping", _olua_fun_b2DistanceJoint_getDamping); + oluacls_func(L, "getLength", _olua_fun_b2DistanceJoint_getLength); + oluacls_func(L, "getLocalAnchorA", _olua_fun_b2DistanceJoint_getLocalAnchorA); + oluacls_func(L, "getLocalAnchorB", _olua_fun_b2DistanceJoint_getLocalAnchorB); + oluacls_func(L, "getMaxLength", _olua_fun_b2DistanceJoint_getMaxLength); + oluacls_func(L, "getMinLength", _olua_fun_b2DistanceJoint_getMinLength); + oluacls_func(L, "getStiffness", _olua_fun_b2DistanceJoint_getStiffness); + oluacls_func(L, "setDamping", _olua_fun_b2DistanceJoint_setDamping); + oluacls_func(L, "setLength", _olua_fun_b2DistanceJoint_setLength); + oluacls_func(L, "setMaxLength", _olua_fun_b2DistanceJoint_setMaxLength); + oluacls_func(L, "setMinLength", _olua_fun_b2DistanceJoint_setMinLength); + oluacls_func(L, "setStiffness", _olua_fun_b2DistanceJoint_setStiffness); + oluacls_prop(L, "currentLength", _olua_fun_b2DistanceJoint_getCurrentLength, nullptr); + oluacls_prop(L, "damping", _olua_fun_b2DistanceJoint_getDamping, _olua_fun_b2DistanceJoint_setDamping); + oluacls_prop(L, "length", _olua_fun_b2DistanceJoint_getLength, _olua_fun_b2DistanceJoint_setLength); + oluacls_prop(L, "localAnchorA", _olua_fun_b2DistanceJoint_getLocalAnchorA, nullptr); + oluacls_prop(L, "localAnchorB", _olua_fun_b2DistanceJoint_getLocalAnchorB, nullptr); + oluacls_prop(L, "maxLength", _olua_fun_b2DistanceJoint_getMaxLength, _olua_fun_b2DistanceJoint_setMaxLength); + oluacls_prop(L, "minLength", _olua_fun_b2DistanceJoint_getMinLength, _olua_fun_b2DistanceJoint_setMinLength); + oluacls_prop(L, "stiffness", _olua_fun_b2DistanceJoint_getStiffness, _olua_fun_b2DistanceJoint_setStiffness); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_b2_DistanceJoint(lua_State *L) +{ + olua_require(L, "box2d", luaopen_box2d); + if (!olua_getclass(L, "b2.DistanceJoint")) { + luaL_error(L, "class not found: b2DistanceJoint"); + } return 1; } OLUA_END_DECLS -static int _b2FrictionJointDef_Initialize(lua_State *L) +static int _olua_fun_b2FrictionJointDef_initialize(lua_State *L) { olua_startinvoke(L); b2FrictionJointDef *self = nullptr; b2Body *arg1 = nullptr; /** bodyA */ b2Body *arg2 = nullptr; /** bodyB */ - b2Vec2 arg3; /** anchor */ + b2Vec2 *arg3; /** anchor */ olua_to_object(L, 1, &self, "b2.FrictionJointDef"); olua_check_object(L, 2, &arg1, "b2.Body"); @@ -8874,28 +10271,14 @@ static int _b2FrictionJointDef_Initialize(lua_State *L) olua_check_object(L, 4, &arg3, "b2.Vec2"); // void Initialize(b2Body *bodyA, b2Body *bodyB, const b2Vec2 &anchor) - self->Initialize(arg1, arg2, arg3); + self->Initialize(arg1, arg2, *arg3); olua_endinvoke(L); return 0; } -static int _b2FrictionJointDef_new(lua_State *L) -{ - olua_startinvoke(L); - - // b2FrictionJointDef() - b2FrictionJointDef *ret = new b2FrictionJointDef(); - int num_ret = olua_push_object(L, ret, "b2.FrictionJointDef"); - olua_postnew(L, ret); - - olua_endinvoke(L); - - return num_ret; -} - -static int _b2FrictionJointDef_get_localAnchorA(lua_State *L) +static int _olua_fun_b2FrictionJointDef_localAnchorA$1(lua_State *L) { olua_startinvoke(L); @@ -8905,32 +10288,53 @@ static int _b2FrictionJointDef_get_localAnchorA(lua_State *L) // b2Vec2 localAnchorA b2Vec2 &ret = self->localAnchorA; - int num_ret = olua_pushcopy_object(L, ret, "b2.Vec2"); + int num_ret = olua_copy_object(L, ret, "b2.Vec2"); olua_endinvoke(L); return num_ret; } -static int _b2FrictionJointDef_set_localAnchorA(lua_State *L) +static int _olua_fun_b2FrictionJointDef_localAnchorA$2(lua_State *L) { olua_startinvoke(L); b2FrictionJointDef *self = nullptr; - b2Vec2 arg1; /** localAnchorA */ + b2Vec2 *arg1; /** localAnchorA */ olua_to_object(L, 1, &self, "b2.FrictionJointDef"); olua_check_object(L, 2, &arg1, "b2.Vec2"); // b2Vec2 localAnchorA - self->localAnchorA = arg1; + self->localAnchorA = *arg1; olua_endinvoke(L); return 0; } -static int _b2FrictionJointDef_get_localAnchorB(lua_State *L) +static int _olua_fun_b2FrictionJointDef_localAnchorA(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // b2Vec2 localAnchorA + return _olua_fun_b2FrictionJointDef_localAnchorA$1(L); + } + + if (num_args == 1) { + // if ((olua_is_object(L, 2, "b2.Vec2"))) { + // b2Vec2 localAnchorA + return _olua_fun_b2FrictionJointDef_localAnchorA$2(L); + // } + } + + luaL_error(L, "method 'b2FrictionJointDef::localAnchorA' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_b2FrictionJointDef_localAnchorB$1(lua_State *L) { olua_startinvoke(L); @@ -8940,32 +10344,53 @@ static int _b2FrictionJointDef_get_localAnchorB(lua_State *L) // b2Vec2 localAnchorB b2Vec2 &ret = self->localAnchorB; - int num_ret = olua_pushcopy_object(L, ret, "b2.Vec2"); + int num_ret = olua_copy_object(L, ret, "b2.Vec2"); olua_endinvoke(L); return num_ret; } -static int _b2FrictionJointDef_set_localAnchorB(lua_State *L) +static int _olua_fun_b2FrictionJointDef_localAnchorB$2(lua_State *L) { olua_startinvoke(L); b2FrictionJointDef *self = nullptr; - b2Vec2 arg1; /** localAnchorB */ + b2Vec2 *arg1; /** localAnchorB */ olua_to_object(L, 1, &self, "b2.FrictionJointDef"); olua_check_object(L, 2, &arg1, "b2.Vec2"); // b2Vec2 localAnchorB - self->localAnchorB = arg1; + self->localAnchorB = *arg1; olua_endinvoke(L); return 0; } -static int _b2FrictionJointDef_get_maxForce(lua_State *L) +static int _olua_fun_b2FrictionJointDef_localAnchorB(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // b2Vec2 localAnchorB + return _olua_fun_b2FrictionJointDef_localAnchorB$1(L); + } + + if (num_args == 1) { + // if ((olua_is_object(L, 2, "b2.Vec2"))) { + // b2Vec2 localAnchorB + return _olua_fun_b2FrictionJointDef_localAnchorB$2(L); + // } + } + + luaL_error(L, "method 'b2FrictionJointDef::localAnchorB' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_b2FrictionJointDef_maxForce$1(lua_State *L) { olua_startinvoke(L); @@ -8982,7 +10407,7 @@ static int _b2FrictionJointDef_get_maxForce(lua_State *L) return num_ret; } -static int _b2FrictionJointDef_set_maxForce(lua_State *L) +static int _olua_fun_b2FrictionJointDef_maxForce$2(lua_State *L) { olua_startinvoke(L); @@ -9000,7 +10425,28 @@ static int _b2FrictionJointDef_set_maxForce(lua_State *L) return 0; } -static int _b2FrictionJointDef_get_maxTorque(lua_State *L) +static int _olua_fun_b2FrictionJointDef_maxForce(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float maxForce + return _olua_fun_b2FrictionJointDef_maxForce$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float maxForce + return _olua_fun_b2FrictionJointDef_maxForce$2(L); + // } + } + + luaL_error(L, "method 'b2FrictionJointDef::maxForce' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_b2FrictionJointDef_maxTorque$1(lua_State *L) { olua_startinvoke(L); @@ -9017,7 +10463,7 @@ static int _b2FrictionJointDef_get_maxTorque(lua_State *L) return num_ret; } -static int _b2FrictionJointDef_set_maxTorque(lua_State *L) +static int _olua_fun_b2FrictionJointDef_maxTorque$2(lua_State *L) { olua_startinvoke(L); @@ -9035,22 +10481,66 @@ static int _b2FrictionJointDef_set_maxTorque(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_b2FrictionJointDef(lua_State *L) +static int _olua_fun_b2FrictionJointDef_maxTorque(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float maxTorque + return _olua_fun_b2FrictionJointDef_maxTorque$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float maxTorque + return _olua_fun_b2FrictionJointDef_maxTorque$2(L); + // } + } + + luaL_error(L, "method 'b2FrictionJointDef::maxTorque' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_b2FrictionJointDef_new(lua_State *L) +{ + olua_startinvoke(L); + + // b2FrictionJointDef() + b2FrictionJointDef *ret = new b2FrictionJointDef(); + int num_ret = olua_push_object(L, ret, "b2.FrictionJointDef"); + olua_postnew(L, ret); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_cls_b2_FrictionJointDef(lua_State *L) { oluacls_class(L, "b2.FrictionJointDef"); - oluacls_func(L, "initialize", _b2FrictionJointDef_Initialize); - oluacls_func(L, "new", _b2FrictionJointDef_new); - oluacls_prop(L, "localAnchorA", _b2FrictionJointDef_get_localAnchorA, _b2FrictionJointDef_set_localAnchorA); - oluacls_prop(L, "localAnchorB", _b2FrictionJointDef_get_localAnchorB, _b2FrictionJointDef_set_localAnchorB); - oluacls_prop(L, "maxForce", _b2FrictionJointDef_get_maxForce, _b2FrictionJointDef_set_maxForce); - oluacls_prop(L, "maxTorque", _b2FrictionJointDef_get_maxTorque, _b2FrictionJointDef_set_maxTorque); + oluacls_func(L, "initialize", _olua_fun_b2FrictionJointDef_initialize); + oluacls_func(L, "new", _olua_fun_b2FrictionJointDef_new); + oluacls_prop(L, "localAnchorA", _olua_fun_b2FrictionJointDef_localAnchorA, _olua_fun_b2FrictionJointDef_localAnchorA); + oluacls_prop(L, "localAnchorB", _olua_fun_b2FrictionJointDef_localAnchorB, _olua_fun_b2FrictionJointDef_localAnchorB); + oluacls_prop(L, "maxForce", _olua_fun_b2FrictionJointDef_maxForce, _olua_fun_b2FrictionJointDef_maxForce); + oluacls_prop(L, "maxTorque", _olua_fun_b2FrictionJointDef_maxTorque, _olua_fun_b2FrictionJointDef_maxTorque); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_b2_FrictionJointDef(lua_State *L) +{ + olua_require(L, "box2d", luaopen_box2d); + if (!olua_getclass(L, "b2.FrictionJointDef")) { + luaL_error(L, "class not found: b2FrictionJointDef"); + } + return 1; +} OLUA_END_DECLS -static int _b2FrictionJoint___gc(lua_State *L) +static int _olua_fun_b2FrictionJoint___gc(lua_State *L) { olua_startinvoke(L); @@ -9062,7 +10552,7 @@ static int _b2FrictionJoint___gc(lua_State *L) return 0; } -static int _b2FrictionJoint_GetLocalAnchorA(lua_State *L) +static int _olua_fun_b2FrictionJoint_getLocalAnchorA(lua_State *L) { olua_startinvoke(L); @@ -9079,7 +10569,7 @@ static int _b2FrictionJoint_GetLocalAnchorA(lua_State *L) return num_ret; } -static int _b2FrictionJoint_GetLocalAnchorB(lua_State *L) +static int _olua_fun_b2FrictionJoint_getLocalAnchorB(lua_State *L) { olua_startinvoke(L); @@ -9096,7 +10586,7 @@ static int _b2FrictionJoint_GetLocalAnchorB(lua_State *L) return num_ret; } -static int _b2FrictionJoint_GetMaxForce(lua_State *L) +static int _olua_fun_b2FrictionJoint_getMaxForce(lua_State *L) { olua_startinvoke(L); @@ -9113,7 +10603,7 @@ static int _b2FrictionJoint_GetMaxForce(lua_State *L) return num_ret; } -static int _b2FrictionJoint_GetMaxTorque(lua_State *L) +static int _olua_fun_b2FrictionJoint_getMaxTorque(lua_State *L) { olua_startinvoke(L); @@ -9130,7 +10620,7 @@ static int _b2FrictionJoint_GetMaxTorque(lua_State *L) return num_ret; } -static int _b2FrictionJoint_SetMaxForce(lua_State *L) +static int _olua_fun_b2FrictionJoint_setMaxForce(lua_State *L) { olua_startinvoke(L); @@ -9148,7 +10638,7 @@ static int _b2FrictionJoint_SetMaxForce(lua_State *L) return 0; } -static int _b2FrictionJoint_SetMaxTorque(lua_State *L) +static int _olua_fun_b2FrictionJoint_setMaxTorque(lua_State *L) { olua_startinvoke(L); @@ -9166,41 +10656,36 @@ static int _b2FrictionJoint_SetMaxTorque(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_b2FrictionJoint(lua_State *L) +static int _olua_cls_b2_FrictionJoint(lua_State *L) { oluacls_class(L, "b2.FrictionJoint"); - oluacls_func(L, "__gc", _b2FrictionJoint___gc); - oluacls_func(L, "getLocalAnchorA", _b2FrictionJoint_GetLocalAnchorA); - oluacls_func(L, "getLocalAnchorB", _b2FrictionJoint_GetLocalAnchorB); - oluacls_func(L, "getMaxForce", _b2FrictionJoint_GetMaxForce); - oluacls_func(L, "getMaxTorque", _b2FrictionJoint_GetMaxTorque); - oluacls_func(L, "setMaxForce", _b2FrictionJoint_SetMaxForce); - oluacls_func(L, "setMaxTorque", _b2FrictionJoint_SetMaxTorque); - oluacls_prop(L, "localAnchorA", _b2FrictionJoint_GetLocalAnchorA, nullptr); - oluacls_prop(L, "localAnchorB", _b2FrictionJoint_GetLocalAnchorB, nullptr); - oluacls_prop(L, "maxForce", _b2FrictionJoint_GetMaxForce, _b2FrictionJoint_SetMaxForce); - oluacls_prop(L, "maxTorque", _b2FrictionJoint_GetMaxTorque, _b2FrictionJoint_SetMaxTorque); + oluacls_func(L, "__gc", _olua_fun_b2FrictionJoint___gc); + oluacls_func(L, "getLocalAnchorA", _olua_fun_b2FrictionJoint_getLocalAnchorA); + oluacls_func(L, "getLocalAnchorB", _olua_fun_b2FrictionJoint_getLocalAnchorB); + oluacls_func(L, "getMaxForce", _olua_fun_b2FrictionJoint_getMaxForce); + oluacls_func(L, "getMaxTorque", _olua_fun_b2FrictionJoint_getMaxTorque); + oluacls_func(L, "setMaxForce", _olua_fun_b2FrictionJoint_setMaxForce); + oluacls_func(L, "setMaxTorque", _olua_fun_b2FrictionJoint_setMaxTorque); + oluacls_prop(L, "localAnchorA", _olua_fun_b2FrictionJoint_getLocalAnchorA, nullptr); + oluacls_prop(L, "localAnchorB", _olua_fun_b2FrictionJoint_getLocalAnchorB, nullptr); + oluacls_prop(L, "maxForce", _olua_fun_b2FrictionJoint_getMaxForce, _olua_fun_b2FrictionJoint_setMaxForce); + oluacls_prop(L, "maxTorque", _olua_fun_b2FrictionJoint_getMaxTorque, _olua_fun_b2FrictionJoint_setMaxTorque); return 1; } -OLUA_END_DECLS -static int _b2GearJointDef_new(lua_State *L) +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_b2_FrictionJoint(lua_State *L) { - olua_startinvoke(L); - - // b2GearJointDef() - b2GearJointDef *ret = new b2GearJointDef(); - int num_ret = olua_push_object(L, ret, "b2.GearJointDef"); - olua_postnew(L, ret); - - olua_endinvoke(L); - - return num_ret; + olua_require(L, "box2d", luaopen_box2d); + if (!olua_getclass(L, "b2.FrictionJoint")) { + luaL_error(L, "class not found: b2FrictionJoint"); + } + return 1; } +OLUA_END_DECLS -static int _b2GearJointDef_get_joint1(lua_State *L) +static int _olua_fun_b2GearJointDef_joint1$1(lua_State *L) { olua_startinvoke(L); @@ -9217,7 +10702,7 @@ static int _b2GearJointDef_get_joint1(lua_State *L) return num_ret; } -static int _b2GearJointDef_set_joint1(lua_State *L) +static int _olua_fun_b2GearJointDef_joint1$2(lua_State *L) { olua_startinvoke(L); @@ -9235,7 +10720,28 @@ static int _b2GearJointDef_set_joint1(lua_State *L) return 0; } -static int _b2GearJointDef_get_joint2(lua_State *L) +static int _olua_fun_b2GearJointDef_joint1(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // b2Joint *joint1 + return _olua_fun_b2GearJointDef_joint1$1(L); + } + + if (num_args == 1) { + // if ((olua_is_object(L, 2, "b2.Joint"))) { + // b2Joint *joint1 + return _olua_fun_b2GearJointDef_joint1$2(L); + // } + } + + luaL_error(L, "method 'b2GearJointDef::joint1' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_b2GearJointDef_joint2$1(lua_State *L) { olua_startinvoke(L); @@ -9252,7 +10758,7 @@ static int _b2GearJointDef_get_joint2(lua_State *L) return num_ret; } -static int _b2GearJointDef_set_joint2(lua_State *L) +static int _olua_fun_b2GearJointDef_joint2$2(lua_State *L) { olua_startinvoke(L); @@ -9270,7 +10776,42 @@ static int _b2GearJointDef_set_joint2(lua_State *L) return 0; } -static int _b2GearJointDef_get_ratio(lua_State *L) +static int _olua_fun_b2GearJointDef_joint2(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // b2Joint *joint2 + return _olua_fun_b2GearJointDef_joint2$1(L); + } + + if (num_args == 1) { + // if ((olua_is_object(L, 2, "b2.Joint"))) { + // b2Joint *joint2 + return _olua_fun_b2GearJointDef_joint2$2(L); + // } + } + + luaL_error(L, "method 'b2GearJointDef::joint2' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_b2GearJointDef_new(lua_State *L) +{ + olua_startinvoke(L); + + // b2GearJointDef() + b2GearJointDef *ret = new b2GearJointDef(); + int num_ret = olua_push_object(L, ret, "b2.GearJointDef"); + olua_postnew(L, ret); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_b2GearJointDef_ratio$1(lua_State *L) { olua_startinvoke(L); @@ -9287,7 +10828,7 @@ static int _b2GearJointDef_get_ratio(lua_State *L) return num_ret; } -static int _b2GearJointDef_set_ratio(lua_State *L) +static int _olua_fun_b2GearJointDef_ratio$2(lua_State *L) { olua_startinvoke(L); @@ -9305,20 +10846,50 @@ static int _b2GearJointDef_set_ratio(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_b2GearJointDef(lua_State *L) +static int _olua_fun_b2GearJointDef_ratio(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float ratio + return _olua_fun_b2GearJointDef_ratio$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float ratio + return _olua_fun_b2GearJointDef_ratio$2(L); + // } + } + + luaL_error(L, "method 'b2GearJointDef::ratio' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_cls_b2_GearJointDef(lua_State *L) { oluacls_class(L, "b2.GearJointDef"); - oluacls_func(L, "new", _b2GearJointDef_new); - oluacls_prop(L, "joint1", _b2GearJointDef_get_joint1, _b2GearJointDef_set_joint1); - oluacls_prop(L, "joint2", _b2GearJointDef_get_joint2, _b2GearJointDef_set_joint2); - oluacls_prop(L, "ratio", _b2GearJointDef_get_ratio, _b2GearJointDef_set_ratio); + oluacls_func(L, "new", _olua_fun_b2GearJointDef_new); + oluacls_prop(L, "joint1", _olua_fun_b2GearJointDef_joint1, _olua_fun_b2GearJointDef_joint1); + oluacls_prop(L, "joint2", _olua_fun_b2GearJointDef_joint2, _olua_fun_b2GearJointDef_joint2); + oluacls_prop(L, "ratio", _olua_fun_b2GearJointDef_ratio, _olua_fun_b2GearJointDef_ratio); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_b2_GearJointDef(lua_State *L) +{ + olua_require(L, "box2d", luaopen_box2d); + if (!olua_getclass(L, "b2.GearJointDef")) { + luaL_error(L, "class not found: b2GearJointDef"); + } return 1; } OLUA_END_DECLS -static int _b2GearJoint___gc(lua_State *L) +static int _olua_fun_b2GearJoint___gc(lua_State *L) { olua_startinvoke(L); @@ -9330,7 +10901,7 @@ static int _b2GearJoint___gc(lua_State *L) return 0; } -static int _b2GearJoint_GetJoint1(lua_State *L) +static int _olua_fun_b2GearJoint_getJoint1(lua_State *L) { olua_startinvoke(L); @@ -9347,7 +10918,7 @@ static int _b2GearJoint_GetJoint1(lua_State *L) return num_ret; } -static int _b2GearJoint_GetJoint2(lua_State *L) +static int _olua_fun_b2GearJoint_getJoint2(lua_State *L) { olua_startinvoke(L); @@ -9364,7 +10935,7 @@ static int _b2GearJoint_GetJoint2(lua_State *L) return num_ret; } -static int _b2GearJoint_GetRatio(lua_State *L) +static int _olua_fun_b2GearJoint_getRatio(lua_State *L) { olua_startinvoke(L); @@ -9381,76 +10952,51 @@ static int _b2GearJoint_GetRatio(lua_State *L) return num_ret; } -static int _b2GearJoint_SetRatio(lua_State *L) -{ - olua_startinvoke(L); - - b2GearJoint *self = nullptr; - float arg1 = 0; /** ratio */ - - olua_to_object(L, 1, &self, "b2.GearJoint"); - olua_check_number(L, 2, &arg1); - - // void SetRatio(float ratio) - self->SetRatio(arg1); - - olua_endinvoke(L); - - return 0; -} - -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_b2GearJoint(lua_State *L) -{ - oluacls_class(L, "b2.GearJoint"); - oluacls_func(L, "__gc", _b2GearJoint___gc); - oluacls_func(L, "getJoint1", _b2GearJoint_GetJoint1); - oluacls_func(L, "getJoint2", _b2GearJoint_GetJoint2); - oluacls_func(L, "getRatio", _b2GearJoint_GetRatio); - oluacls_func(L, "setRatio", _b2GearJoint_SetRatio); - oluacls_prop(L, "joint1", _b2GearJoint_GetJoint1, nullptr); - oluacls_prop(L, "joint2", _b2GearJoint_GetJoint2, nullptr); - oluacls_prop(L, "ratio", _b2GearJoint_GetRatio, _b2GearJoint_SetRatio); - - return 1; -} -OLUA_END_DECLS - -static int _b2MotorJointDef_Initialize(lua_State *L) +static int _olua_fun_b2GearJoint_setRatio(lua_State *L) { olua_startinvoke(L); - b2MotorJointDef *self = nullptr; - b2Body *arg1 = nullptr; /** bodyA */ - b2Body *arg2 = nullptr; /** bodyB */ + b2GearJoint *self = nullptr; + float arg1 = 0; /** ratio */ - olua_to_object(L, 1, &self, "b2.MotorJointDef"); - olua_check_object(L, 2, &arg1, "b2.Body"); - olua_check_object(L, 3, &arg2, "b2.Body"); + olua_to_object(L, 1, &self, "b2.GearJoint"); + olua_check_number(L, 2, &arg1); - // void Initialize(b2Body *bodyA, b2Body *bodyB) - self->Initialize(arg1, arg2); + // void SetRatio(float ratio) + self->SetRatio(arg1); olua_endinvoke(L); return 0; } -static int _b2MotorJointDef_new(lua_State *L) +static int _olua_cls_b2_GearJoint(lua_State *L) { - olua_startinvoke(L); - - // b2MotorJointDef() - b2MotorJointDef *ret = new b2MotorJointDef(); - int num_ret = olua_push_object(L, ret, "b2.MotorJointDef"); - olua_postnew(L, ret); + oluacls_class(L, "b2.GearJoint"); + oluacls_func(L, "__gc", _olua_fun_b2GearJoint___gc); + oluacls_func(L, "getJoint1", _olua_fun_b2GearJoint_getJoint1); + oluacls_func(L, "getJoint2", _olua_fun_b2GearJoint_getJoint2); + oluacls_func(L, "getRatio", _olua_fun_b2GearJoint_getRatio); + oluacls_func(L, "setRatio", _olua_fun_b2GearJoint_setRatio); + oluacls_prop(L, "joint1", _olua_fun_b2GearJoint_getJoint1, nullptr); + oluacls_prop(L, "joint2", _olua_fun_b2GearJoint_getJoint2, nullptr); + oluacls_prop(L, "ratio", _olua_fun_b2GearJoint_getRatio, _olua_fun_b2GearJoint_setRatio); - olua_endinvoke(L); + return 1; +} - return num_ret; +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_b2_GearJoint(lua_State *L) +{ + olua_require(L, "box2d", luaopen_box2d); + if (!olua_getclass(L, "b2.GearJoint")) { + luaL_error(L, "class not found: b2GearJoint"); + } + return 1; } +OLUA_END_DECLS -static int _b2MotorJointDef_get_angularOffset(lua_State *L) +static int _olua_fun_b2MotorJointDef_angularOffset$1(lua_State *L) { olua_startinvoke(L); @@ -9467,7 +11013,7 @@ static int _b2MotorJointDef_get_angularOffset(lua_State *L) return num_ret; } -static int _b2MotorJointDef_set_angularOffset(lua_State *L) +static int _olua_fun_b2MotorJointDef_angularOffset$2(lua_State *L) { olua_startinvoke(L); @@ -9485,7 +11031,28 @@ static int _b2MotorJointDef_set_angularOffset(lua_State *L) return 0; } -static int _b2MotorJointDef_get_correctionFactor(lua_State *L) +static int _olua_fun_b2MotorJointDef_angularOffset(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float angularOffset + return _olua_fun_b2MotorJointDef_angularOffset$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float angularOffset + return _olua_fun_b2MotorJointDef_angularOffset$2(L); + // } + } + + luaL_error(L, "method 'b2MotorJointDef::angularOffset' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_b2MotorJointDef_correctionFactor$1(lua_State *L) { olua_startinvoke(L); @@ -9502,7 +11069,7 @@ static int _b2MotorJointDef_get_correctionFactor(lua_State *L) return num_ret; } -static int _b2MotorJointDef_set_correctionFactor(lua_State *L) +static int _olua_fun_b2MotorJointDef_correctionFactor$2(lua_State *L) { olua_startinvoke(L); @@ -9520,7 +11087,48 @@ static int _b2MotorJointDef_set_correctionFactor(lua_State *L) return 0; } -static int _b2MotorJointDef_get_linearOffset(lua_State *L) +static int _olua_fun_b2MotorJointDef_correctionFactor(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float correctionFactor + return _olua_fun_b2MotorJointDef_correctionFactor$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float correctionFactor + return _olua_fun_b2MotorJointDef_correctionFactor$2(L); + // } + } + + luaL_error(L, "method 'b2MotorJointDef::correctionFactor' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_b2MotorJointDef_initialize(lua_State *L) +{ + olua_startinvoke(L); + + b2MotorJointDef *self = nullptr; + b2Body *arg1 = nullptr; /** bodyA */ + b2Body *arg2 = nullptr; /** bodyB */ + + olua_to_object(L, 1, &self, "b2.MotorJointDef"); + olua_check_object(L, 2, &arg1, "b2.Body"); + olua_check_object(L, 3, &arg2, "b2.Body"); + + // void Initialize(b2Body *bodyA, b2Body *bodyB) + self->Initialize(arg1, arg2); + + olua_endinvoke(L); + + return 0; +} + +static int _olua_fun_b2MotorJointDef_linearOffset$1(lua_State *L) { olua_startinvoke(L); @@ -9530,32 +11138,53 @@ static int _b2MotorJointDef_get_linearOffset(lua_State *L) // b2Vec2 linearOffset b2Vec2 &ret = self->linearOffset; - int num_ret = olua_pushcopy_object(L, ret, "b2.Vec2"); + int num_ret = olua_copy_object(L, ret, "b2.Vec2"); olua_endinvoke(L); return num_ret; } -static int _b2MotorJointDef_set_linearOffset(lua_State *L) +static int _olua_fun_b2MotorJointDef_linearOffset$2(lua_State *L) { olua_startinvoke(L); b2MotorJointDef *self = nullptr; - b2Vec2 arg1; /** linearOffset */ + b2Vec2 *arg1; /** linearOffset */ olua_to_object(L, 1, &self, "b2.MotorJointDef"); olua_check_object(L, 2, &arg1, "b2.Vec2"); // b2Vec2 linearOffset - self->linearOffset = arg1; + self->linearOffset = *arg1; olua_endinvoke(L); return 0; } -static int _b2MotorJointDef_get_maxForce(lua_State *L) +static int _olua_fun_b2MotorJointDef_linearOffset(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // b2Vec2 linearOffset + return _olua_fun_b2MotorJointDef_linearOffset$1(L); + } + + if (num_args == 1) { + // if ((olua_is_object(L, 2, "b2.Vec2"))) { + // b2Vec2 linearOffset + return _olua_fun_b2MotorJointDef_linearOffset$2(L); + // } + } + + luaL_error(L, "method 'b2MotorJointDef::linearOffset' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_b2MotorJointDef_maxForce$1(lua_State *L) { olua_startinvoke(L); @@ -9572,7 +11201,7 @@ static int _b2MotorJointDef_get_maxForce(lua_State *L) return num_ret; } -static int _b2MotorJointDef_set_maxForce(lua_State *L) +static int _olua_fun_b2MotorJointDef_maxForce$2(lua_State *L) { olua_startinvoke(L); @@ -9590,7 +11219,28 @@ static int _b2MotorJointDef_set_maxForce(lua_State *L) return 0; } -static int _b2MotorJointDef_get_maxTorque(lua_State *L) +static int _olua_fun_b2MotorJointDef_maxForce(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float maxForce + return _olua_fun_b2MotorJointDef_maxForce$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float maxForce + return _olua_fun_b2MotorJointDef_maxForce$2(L); + // } + } + + luaL_error(L, "method 'b2MotorJointDef::maxForce' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_b2MotorJointDef_maxTorque$1(lua_State *L) { olua_startinvoke(L); @@ -9607,7 +11257,7 @@ static int _b2MotorJointDef_get_maxTorque(lua_State *L) return num_ret; } -static int _b2MotorJointDef_set_maxTorque(lua_State *L) +static int _olua_fun_b2MotorJointDef_maxTorque$2(lua_State *L) { olua_startinvoke(L); @@ -9625,23 +11275,67 @@ static int _b2MotorJointDef_set_maxTorque(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_b2MotorJointDef(lua_State *L) +static int _olua_fun_b2MotorJointDef_maxTorque(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float maxTorque + return _olua_fun_b2MotorJointDef_maxTorque$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float maxTorque + return _olua_fun_b2MotorJointDef_maxTorque$2(L); + // } + } + + luaL_error(L, "method 'b2MotorJointDef::maxTorque' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_b2MotorJointDef_new(lua_State *L) +{ + olua_startinvoke(L); + + // b2MotorJointDef() + b2MotorJointDef *ret = new b2MotorJointDef(); + int num_ret = olua_push_object(L, ret, "b2.MotorJointDef"); + olua_postnew(L, ret); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_cls_b2_MotorJointDef(lua_State *L) { oluacls_class(L, "b2.MotorJointDef"); - oluacls_func(L, "initialize", _b2MotorJointDef_Initialize); - oluacls_func(L, "new", _b2MotorJointDef_new); - oluacls_prop(L, "angularOffset", _b2MotorJointDef_get_angularOffset, _b2MotorJointDef_set_angularOffset); - oluacls_prop(L, "correctionFactor", _b2MotorJointDef_get_correctionFactor, _b2MotorJointDef_set_correctionFactor); - oluacls_prop(L, "linearOffset", _b2MotorJointDef_get_linearOffset, _b2MotorJointDef_set_linearOffset); - oluacls_prop(L, "maxForce", _b2MotorJointDef_get_maxForce, _b2MotorJointDef_set_maxForce); - oluacls_prop(L, "maxTorque", _b2MotorJointDef_get_maxTorque, _b2MotorJointDef_set_maxTorque); + oluacls_func(L, "initialize", _olua_fun_b2MotorJointDef_initialize); + oluacls_func(L, "new", _olua_fun_b2MotorJointDef_new); + oluacls_prop(L, "angularOffset", _olua_fun_b2MotorJointDef_angularOffset, _olua_fun_b2MotorJointDef_angularOffset); + oluacls_prop(L, "correctionFactor", _olua_fun_b2MotorJointDef_correctionFactor, _olua_fun_b2MotorJointDef_correctionFactor); + oluacls_prop(L, "linearOffset", _olua_fun_b2MotorJointDef_linearOffset, _olua_fun_b2MotorJointDef_linearOffset); + oluacls_prop(L, "maxForce", _olua_fun_b2MotorJointDef_maxForce, _olua_fun_b2MotorJointDef_maxForce); + oluacls_prop(L, "maxTorque", _olua_fun_b2MotorJointDef_maxTorque, _olua_fun_b2MotorJointDef_maxTorque); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_b2_MotorJointDef(lua_State *L) +{ + olua_require(L, "box2d", luaopen_box2d); + if (!olua_getclass(L, "b2.MotorJointDef")) { + luaL_error(L, "class not found: b2MotorJointDef"); + } return 1; } OLUA_END_DECLS -static int _b2MotorJoint___gc(lua_State *L) +static int _olua_fun_b2MotorJoint___gc(lua_State *L) { olua_startinvoke(L); @@ -9653,7 +11347,7 @@ static int _b2MotorJoint___gc(lua_State *L) return 0; } -static int _b2MotorJoint_GetAngularOffset(lua_State *L) +static int _olua_fun_b2MotorJoint_getAngularOffset(lua_State *L) { olua_startinvoke(L); @@ -9670,7 +11364,7 @@ static int _b2MotorJoint_GetAngularOffset(lua_State *L) return num_ret; } -static int _b2MotorJoint_GetCorrectionFactor(lua_State *L) +static int _olua_fun_b2MotorJoint_getCorrectionFactor(lua_State *L) { olua_startinvoke(L); @@ -9687,7 +11381,7 @@ static int _b2MotorJoint_GetCorrectionFactor(lua_State *L) return num_ret; } -static int _b2MotorJoint_GetLinearOffset(lua_State *L) +static int _olua_fun_b2MotorJoint_getLinearOffset(lua_State *L) { olua_startinvoke(L); @@ -9704,7 +11398,7 @@ static int _b2MotorJoint_GetLinearOffset(lua_State *L) return num_ret; } -static int _b2MotorJoint_GetMaxForce(lua_State *L) +static int _olua_fun_b2MotorJoint_getMaxForce(lua_State *L) { olua_startinvoke(L); @@ -9721,7 +11415,7 @@ static int _b2MotorJoint_GetMaxForce(lua_State *L) return num_ret; } -static int _b2MotorJoint_GetMaxTorque(lua_State *L) +static int _olua_fun_b2MotorJoint_getMaxTorque(lua_State *L) { olua_startinvoke(L); @@ -9738,7 +11432,7 @@ static int _b2MotorJoint_GetMaxTorque(lua_State *L) return num_ret; } -static int _b2MotorJoint_SetAngularOffset(lua_State *L) +static int _olua_fun_b2MotorJoint_setAngularOffset(lua_State *L) { olua_startinvoke(L); @@ -9756,7 +11450,7 @@ static int _b2MotorJoint_SetAngularOffset(lua_State *L) return 0; } -static int _b2MotorJoint_SetCorrectionFactor(lua_State *L) +static int _olua_fun_b2MotorJoint_setCorrectionFactor(lua_State *L) { olua_startinvoke(L); @@ -9774,25 +11468,25 @@ static int _b2MotorJoint_SetCorrectionFactor(lua_State *L) return 0; } -static int _b2MotorJoint_SetLinearOffset(lua_State *L) +static int _olua_fun_b2MotorJoint_setLinearOffset(lua_State *L) { olua_startinvoke(L); b2MotorJoint *self = nullptr; - b2Vec2 arg1; /** linearOffset */ + b2Vec2 *arg1; /** linearOffset */ olua_to_object(L, 1, &self, "b2.MotorJoint"); olua_check_object(L, 2, &arg1, "b2.Vec2"); // void SetLinearOffset(const b2Vec2 &linearOffset) - self->SetLinearOffset(arg1); + self->SetLinearOffset(*arg1); olua_endinvoke(L); return 0; } -static int _b2MotorJoint_SetMaxForce(lua_State *L) +static int _olua_fun_b2MotorJoint_setMaxForce(lua_State *L) { olua_startinvoke(L); @@ -9810,7 +11504,7 @@ static int _b2MotorJoint_SetMaxForce(lua_State *L) return 0; } -static int _b2MotorJoint_SetMaxTorque(lua_State *L) +static int _olua_fun_b2MotorJoint_setMaxTorque(lua_State *L) { olua_startinvoke(L); @@ -9828,46 +11522,41 @@ static int _b2MotorJoint_SetMaxTorque(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_b2MotorJoint(lua_State *L) +static int _olua_cls_b2_MotorJoint(lua_State *L) { oluacls_class(L, "b2.MotorJoint"); - oluacls_func(L, "__gc", _b2MotorJoint___gc); - oluacls_func(L, "getAngularOffset", _b2MotorJoint_GetAngularOffset); - oluacls_func(L, "getCorrectionFactor", _b2MotorJoint_GetCorrectionFactor); - oluacls_func(L, "getLinearOffset", _b2MotorJoint_GetLinearOffset); - oluacls_func(L, "getMaxForce", _b2MotorJoint_GetMaxForce); - oluacls_func(L, "getMaxTorque", _b2MotorJoint_GetMaxTorque); - oluacls_func(L, "setAngularOffset", _b2MotorJoint_SetAngularOffset); - oluacls_func(L, "setCorrectionFactor", _b2MotorJoint_SetCorrectionFactor); - oluacls_func(L, "setLinearOffset", _b2MotorJoint_SetLinearOffset); - oluacls_func(L, "setMaxForce", _b2MotorJoint_SetMaxForce); - oluacls_func(L, "setMaxTorque", _b2MotorJoint_SetMaxTorque); - oluacls_prop(L, "angularOffset", _b2MotorJoint_GetAngularOffset, _b2MotorJoint_SetAngularOffset); - oluacls_prop(L, "correctionFactor", _b2MotorJoint_GetCorrectionFactor, _b2MotorJoint_SetCorrectionFactor); - oluacls_prop(L, "linearOffset", _b2MotorJoint_GetLinearOffset, _b2MotorJoint_SetLinearOffset); - oluacls_prop(L, "maxForce", _b2MotorJoint_GetMaxForce, _b2MotorJoint_SetMaxForce); - oluacls_prop(L, "maxTorque", _b2MotorJoint_GetMaxTorque, _b2MotorJoint_SetMaxTorque); + oluacls_func(L, "__gc", _olua_fun_b2MotorJoint___gc); + oluacls_func(L, "getAngularOffset", _olua_fun_b2MotorJoint_getAngularOffset); + oluacls_func(L, "getCorrectionFactor", _olua_fun_b2MotorJoint_getCorrectionFactor); + oluacls_func(L, "getLinearOffset", _olua_fun_b2MotorJoint_getLinearOffset); + oluacls_func(L, "getMaxForce", _olua_fun_b2MotorJoint_getMaxForce); + oluacls_func(L, "getMaxTorque", _olua_fun_b2MotorJoint_getMaxTorque); + oluacls_func(L, "setAngularOffset", _olua_fun_b2MotorJoint_setAngularOffset); + oluacls_func(L, "setCorrectionFactor", _olua_fun_b2MotorJoint_setCorrectionFactor); + oluacls_func(L, "setLinearOffset", _olua_fun_b2MotorJoint_setLinearOffset); + oluacls_func(L, "setMaxForce", _olua_fun_b2MotorJoint_setMaxForce); + oluacls_func(L, "setMaxTorque", _olua_fun_b2MotorJoint_setMaxTorque); + oluacls_prop(L, "angularOffset", _olua_fun_b2MotorJoint_getAngularOffset, _olua_fun_b2MotorJoint_setAngularOffset); + oluacls_prop(L, "correctionFactor", _olua_fun_b2MotorJoint_getCorrectionFactor, _olua_fun_b2MotorJoint_setCorrectionFactor); + oluacls_prop(L, "linearOffset", _olua_fun_b2MotorJoint_getLinearOffset, _olua_fun_b2MotorJoint_setLinearOffset); + oluacls_prop(L, "maxForce", _olua_fun_b2MotorJoint_getMaxForce, _olua_fun_b2MotorJoint_setMaxForce); + oluacls_prop(L, "maxTorque", _olua_fun_b2MotorJoint_getMaxTorque, _olua_fun_b2MotorJoint_setMaxTorque); return 1; } -OLUA_END_DECLS -static int _b2MouseJointDef_new(lua_State *L) +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_b2_MotorJoint(lua_State *L) { - olua_startinvoke(L); - - // b2MouseJointDef() - b2MouseJointDef *ret = new b2MouseJointDef(); - int num_ret = olua_push_object(L, ret, "b2.MouseJointDef"); - olua_postnew(L, ret); - - olua_endinvoke(L); - - return num_ret; + olua_require(L, "box2d", luaopen_box2d); + if (!olua_getclass(L, "b2.MotorJoint")) { + luaL_error(L, "class not found: b2MotorJoint"); + } + return 1; } +OLUA_END_DECLS -static int _b2MouseJointDef_get_damping(lua_State *L) +static int _olua_fun_b2MouseJointDef_damping$1(lua_State *L) { olua_startinvoke(L); @@ -9884,7 +11573,7 @@ static int _b2MouseJointDef_get_damping(lua_State *L) return num_ret; } -static int _b2MouseJointDef_set_damping(lua_State *L) +static int _olua_fun_b2MouseJointDef_damping$2(lua_State *L) { olua_startinvoke(L); @@ -9902,7 +11591,28 @@ static int _b2MouseJointDef_set_damping(lua_State *L) return 0; } -static int _b2MouseJointDef_get_maxForce(lua_State *L) +static int _olua_fun_b2MouseJointDef_damping(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float damping + return _olua_fun_b2MouseJointDef_damping$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float damping + return _olua_fun_b2MouseJointDef_damping$2(L); + // } + } + + luaL_error(L, "method 'b2MouseJointDef::damping' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_b2MouseJointDef_maxForce$1(lua_State *L) { olua_startinvoke(L); @@ -9919,7 +11629,7 @@ static int _b2MouseJointDef_get_maxForce(lua_State *L) return num_ret; } -static int _b2MouseJointDef_set_maxForce(lua_State *L) +static int _olua_fun_b2MouseJointDef_maxForce$2(lua_State *L) { olua_startinvoke(L); @@ -9937,7 +11647,42 @@ static int _b2MouseJointDef_set_maxForce(lua_State *L) return 0; } -static int _b2MouseJointDef_get_stiffness(lua_State *L) +static int _olua_fun_b2MouseJointDef_maxForce(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float maxForce + return _olua_fun_b2MouseJointDef_maxForce$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float maxForce + return _olua_fun_b2MouseJointDef_maxForce$2(L); + // } + } + + luaL_error(L, "method 'b2MouseJointDef::maxForce' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_b2MouseJointDef_new(lua_State *L) +{ + olua_startinvoke(L); + + // b2MouseJointDef() + b2MouseJointDef *ret = new b2MouseJointDef(); + int num_ret = olua_push_object(L, ret, "b2.MouseJointDef"); + olua_postnew(L, ret); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_b2MouseJointDef_stiffness$1(lua_State *L) { olua_startinvoke(L); @@ -9954,7 +11699,7 @@ static int _b2MouseJointDef_get_stiffness(lua_State *L) return num_ret; } -static int _b2MouseJointDef_set_stiffness(lua_State *L) +static int _olua_fun_b2MouseJointDef_stiffness$2(lua_State *L) { olua_startinvoke(L); @@ -9972,7 +11717,28 @@ static int _b2MouseJointDef_set_stiffness(lua_State *L) return 0; } -static int _b2MouseJointDef_get_target(lua_State *L) +static int _olua_fun_b2MouseJointDef_stiffness(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float stiffness + return _olua_fun_b2MouseJointDef_stiffness$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float stiffness + return _olua_fun_b2MouseJointDef_stiffness$2(L); + // } + } + + luaL_error(L, "method 'b2MouseJointDef::stiffness' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_b2MouseJointDef_target$1(lua_State *L) { olua_startinvoke(L); @@ -9982,46 +11748,76 @@ static int _b2MouseJointDef_get_target(lua_State *L) // b2Vec2 target b2Vec2 &ret = self->target; - int num_ret = olua_pushcopy_object(L, ret, "b2.Vec2"); + int num_ret = olua_copy_object(L, ret, "b2.Vec2"); olua_endinvoke(L); return num_ret; } -static int _b2MouseJointDef_set_target(lua_State *L) +static int _olua_fun_b2MouseJointDef_target$2(lua_State *L) { olua_startinvoke(L); b2MouseJointDef *self = nullptr; - b2Vec2 arg1; /** target */ + b2Vec2 *arg1; /** target */ olua_to_object(L, 1, &self, "b2.MouseJointDef"); olua_check_object(L, 2, &arg1, "b2.Vec2"); // b2Vec2 target - self->target = arg1; + self->target = *arg1; olua_endinvoke(L); return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_b2MouseJointDef(lua_State *L) +static int _olua_fun_b2MouseJointDef_target(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // b2Vec2 target + return _olua_fun_b2MouseJointDef_target$1(L); + } + + if (num_args == 1) { + // if ((olua_is_object(L, 2, "b2.Vec2"))) { + // b2Vec2 target + return _olua_fun_b2MouseJointDef_target$2(L); + // } + } + + luaL_error(L, "method 'b2MouseJointDef::target' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_cls_b2_MouseJointDef(lua_State *L) { oluacls_class(L, "b2.MouseJointDef"); - oluacls_func(L, "new", _b2MouseJointDef_new); - oluacls_prop(L, "damping", _b2MouseJointDef_get_damping, _b2MouseJointDef_set_damping); - oluacls_prop(L, "maxForce", _b2MouseJointDef_get_maxForce, _b2MouseJointDef_set_maxForce); - oluacls_prop(L, "stiffness", _b2MouseJointDef_get_stiffness, _b2MouseJointDef_set_stiffness); - oluacls_prop(L, "target", _b2MouseJointDef_get_target, _b2MouseJointDef_set_target); + oluacls_func(L, "new", _olua_fun_b2MouseJointDef_new); + oluacls_prop(L, "damping", _olua_fun_b2MouseJointDef_damping, _olua_fun_b2MouseJointDef_damping); + oluacls_prop(L, "maxForce", _olua_fun_b2MouseJointDef_maxForce, _olua_fun_b2MouseJointDef_maxForce); + oluacls_prop(L, "stiffness", _olua_fun_b2MouseJointDef_stiffness, _olua_fun_b2MouseJointDef_stiffness); + oluacls_prop(L, "target", _olua_fun_b2MouseJointDef_target, _olua_fun_b2MouseJointDef_target); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_b2_MouseJointDef(lua_State *L) +{ + olua_require(L, "box2d", luaopen_box2d); + if (!olua_getclass(L, "b2.MouseJointDef")) { + luaL_error(L, "class not found: b2MouseJointDef"); + } return 1; } OLUA_END_DECLS -static int _b2MouseJoint___gc(lua_State *L) +static int _olua_fun_b2MouseJoint___gc(lua_State *L) { olua_startinvoke(L); @@ -10033,7 +11829,7 @@ static int _b2MouseJoint___gc(lua_State *L) return 0; } -static int _b2MouseJoint_GetDamping(lua_State *L) +static int _olua_fun_b2MouseJoint_getDamping(lua_State *L) { olua_startinvoke(L); @@ -10050,7 +11846,7 @@ static int _b2MouseJoint_GetDamping(lua_State *L) return num_ret; } -static int _b2MouseJoint_GetMaxForce(lua_State *L) +static int _olua_fun_b2MouseJoint_getMaxForce(lua_State *L) { olua_startinvoke(L); @@ -10067,7 +11863,7 @@ static int _b2MouseJoint_GetMaxForce(lua_State *L) return num_ret; } -static int _b2MouseJoint_GetStiffness(lua_State *L) +static int _olua_fun_b2MouseJoint_getStiffness(lua_State *L) { olua_startinvoke(L); @@ -10084,7 +11880,7 @@ static int _b2MouseJoint_GetStiffness(lua_State *L) return num_ret; } -static int _b2MouseJoint_GetTarget(lua_State *L) +static int _olua_fun_b2MouseJoint_getTarget(lua_State *L) { olua_startinvoke(L); @@ -10101,7 +11897,7 @@ static int _b2MouseJoint_GetTarget(lua_State *L) return num_ret; } -static int _b2MouseJoint_SetDamping(lua_State *L) +static int _olua_fun_b2MouseJoint_setDamping(lua_State *L) { olua_startinvoke(L); @@ -10119,7 +11915,7 @@ static int _b2MouseJoint_SetDamping(lua_State *L) return 0; } -static int _b2MouseJoint_SetMaxForce(lua_State *L) +static int _olua_fun_b2MouseJoint_setMaxForce(lua_State *L) { olua_startinvoke(L); @@ -10137,7 +11933,7 @@ static int _b2MouseJoint_SetMaxForce(lua_State *L) return 0; } -static int _b2MouseJoint_SetStiffness(lua_State *L) +static int _olua_fun_b2MouseJoint_setStiffness(lua_State *L) { olua_startinvoke(L); @@ -10150,90 +11946,61 @@ static int _b2MouseJoint_SetStiffness(lua_State *L) // void SetStiffness(float stiffness) self->SetStiffness(arg1); - olua_endinvoke(L); - - return 0; -} - -static int _b2MouseJoint_SetTarget(lua_State *L) -{ - olua_startinvoke(L); - - b2MouseJoint *self = nullptr; - b2Vec2 arg1; /** target */ - - olua_to_object(L, 1, &self, "b2.MouseJoint"); - olua_check_object(L, 2, &arg1, "b2.Vec2"); - - // void SetTarget(const b2Vec2 &target) - self->SetTarget(arg1); - - olua_endinvoke(L); - - return 0; -} - -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_b2MouseJoint(lua_State *L) -{ - oluacls_class(L, "b2.MouseJoint"); - oluacls_func(L, "__gc", _b2MouseJoint___gc); - oluacls_func(L, "getDamping", _b2MouseJoint_GetDamping); - oluacls_func(L, "getMaxForce", _b2MouseJoint_GetMaxForce); - oluacls_func(L, "getStiffness", _b2MouseJoint_GetStiffness); - oluacls_func(L, "getTarget", _b2MouseJoint_GetTarget); - oluacls_func(L, "setDamping", _b2MouseJoint_SetDamping); - oluacls_func(L, "setMaxForce", _b2MouseJoint_SetMaxForce); - oluacls_func(L, "setStiffness", _b2MouseJoint_SetStiffness); - oluacls_func(L, "setTarget", _b2MouseJoint_SetTarget); - oluacls_prop(L, "damping", _b2MouseJoint_GetDamping, _b2MouseJoint_SetDamping); - oluacls_prop(L, "maxForce", _b2MouseJoint_GetMaxForce, _b2MouseJoint_SetMaxForce); - oluacls_prop(L, "stiffness", _b2MouseJoint_GetStiffness, _b2MouseJoint_SetStiffness); - oluacls_prop(L, "target", _b2MouseJoint_GetTarget, _b2MouseJoint_SetTarget); - - return 1; + olua_endinvoke(L); + + return 0; } -OLUA_END_DECLS -static int _b2PrismaticJointDef_Initialize(lua_State *L) +static int _olua_fun_b2MouseJoint_setTarget(lua_State *L) { olua_startinvoke(L); - b2PrismaticJointDef *self = nullptr; - b2Body *arg1 = nullptr; /** bodyA */ - b2Body *arg2 = nullptr; /** bodyB */ - b2Vec2 arg3; /** anchor */ - b2Vec2 arg4; /** axis */ + b2MouseJoint *self = nullptr; + b2Vec2 *arg1; /** target */ - olua_to_object(L, 1, &self, "b2.PrismaticJointDef"); - olua_check_object(L, 2, &arg1, "b2.Body"); - olua_check_object(L, 3, &arg2, "b2.Body"); - olua_check_object(L, 4, &arg3, "b2.Vec2"); - olua_check_object(L, 5, &arg4, "b2.Vec2"); + olua_to_object(L, 1, &self, "b2.MouseJoint"); + olua_check_object(L, 2, &arg1, "b2.Vec2"); - // void Initialize(b2Body *bodyA, b2Body *bodyB, const b2Vec2 &anchor, const b2Vec2 &axis) - self->Initialize(arg1, arg2, arg3, arg4); + // void SetTarget(const b2Vec2 &target) + self->SetTarget(*arg1); olua_endinvoke(L); return 0; } -static int _b2PrismaticJointDef_new(lua_State *L) +static int _olua_cls_b2_MouseJoint(lua_State *L) { - olua_startinvoke(L); - - // b2PrismaticJointDef() - b2PrismaticJointDef *ret = new b2PrismaticJointDef(); - int num_ret = olua_push_object(L, ret, "b2.PrismaticJointDef"); - olua_postnew(L, ret); + oluacls_class(L, "b2.MouseJoint"); + oluacls_func(L, "__gc", _olua_fun_b2MouseJoint___gc); + oluacls_func(L, "getDamping", _olua_fun_b2MouseJoint_getDamping); + oluacls_func(L, "getMaxForce", _olua_fun_b2MouseJoint_getMaxForce); + oluacls_func(L, "getStiffness", _olua_fun_b2MouseJoint_getStiffness); + oluacls_func(L, "getTarget", _olua_fun_b2MouseJoint_getTarget); + oluacls_func(L, "setDamping", _olua_fun_b2MouseJoint_setDamping); + oluacls_func(L, "setMaxForce", _olua_fun_b2MouseJoint_setMaxForce); + oluacls_func(L, "setStiffness", _olua_fun_b2MouseJoint_setStiffness); + oluacls_func(L, "setTarget", _olua_fun_b2MouseJoint_setTarget); + oluacls_prop(L, "damping", _olua_fun_b2MouseJoint_getDamping, _olua_fun_b2MouseJoint_setDamping); + oluacls_prop(L, "maxForce", _olua_fun_b2MouseJoint_getMaxForce, _olua_fun_b2MouseJoint_setMaxForce); + oluacls_prop(L, "stiffness", _olua_fun_b2MouseJoint_getStiffness, _olua_fun_b2MouseJoint_setStiffness); + oluacls_prop(L, "target", _olua_fun_b2MouseJoint_getTarget, _olua_fun_b2MouseJoint_setTarget); - olua_endinvoke(L); + return 1; +} - return num_ret; +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_b2_MouseJoint(lua_State *L) +{ + olua_require(L, "box2d", luaopen_box2d); + if (!olua_getclass(L, "b2.MouseJoint")) { + luaL_error(L, "class not found: b2MouseJoint"); + } + return 1; } +OLUA_END_DECLS -static int _b2PrismaticJointDef_get_enableLimit(lua_State *L) +static int _olua_fun_b2PrismaticJointDef_enableLimit$1(lua_State *L) { olua_startinvoke(L); @@ -10250,7 +12017,7 @@ static int _b2PrismaticJointDef_get_enableLimit(lua_State *L) return num_ret; } -static int _b2PrismaticJointDef_set_enableLimit(lua_State *L) +static int _olua_fun_b2PrismaticJointDef_enableLimit$2(lua_State *L) { olua_startinvoke(L); @@ -10268,7 +12035,28 @@ static int _b2PrismaticJointDef_set_enableLimit(lua_State *L) return 0; } -static int _b2PrismaticJointDef_get_enableMotor(lua_State *L) +static int _olua_fun_b2PrismaticJointDef_enableLimit(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // bool enableLimit + return _olua_fun_b2PrismaticJointDef_enableLimit$1(L); + } + + if (num_args == 1) { + // if ((olua_is_bool(L, 2))) { + // bool enableLimit + return _olua_fun_b2PrismaticJointDef_enableLimit$2(L); + // } + } + + luaL_error(L, "method 'b2PrismaticJointDef::enableLimit' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_b2PrismaticJointDef_enableMotor$1(lua_State *L) { olua_startinvoke(L); @@ -10285,7 +12073,7 @@ static int _b2PrismaticJointDef_get_enableMotor(lua_State *L) return num_ret; } -static int _b2PrismaticJointDef_set_enableMotor(lua_State *L) +static int _olua_fun_b2PrismaticJointDef_enableMotor$2(lua_State *L) { olua_startinvoke(L); @@ -10303,7 +12091,52 @@ static int _b2PrismaticJointDef_set_enableMotor(lua_State *L) return 0; } -static int _b2PrismaticJointDef_get_localAnchorA(lua_State *L) +static int _olua_fun_b2PrismaticJointDef_enableMotor(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // bool enableMotor + return _olua_fun_b2PrismaticJointDef_enableMotor$1(L); + } + + if (num_args == 1) { + // if ((olua_is_bool(L, 2))) { + // bool enableMotor + return _olua_fun_b2PrismaticJointDef_enableMotor$2(L); + // } + } + + luaL_error(L, "method 'b2PrismaticJointDef::enableMotor' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_b2PrismaticJointDef_initialize(lua_State *L) +{ + olua_startinvoke(L); + + b2PrismaticJointDef *self = nullptr; + b2Body *arg1 = nullptr; /** bodyA */ + b2Body *arg2 = nullptr; /** bodyB */ + b2Vec2 *arg3; /** anchor */ + b2Vec2 *arg4; /** axis */ + + olua_to_object(L, 1, &self, "b2.PrismaticJointDef"); + olua_check_object(L, 2, &arg1, "b2.Body"); + olua_check_object(L, 3, &arg2, "b2.Body"); + olua_check_object(L, 4, &arg3, "b2.Vec2"); + olua_check_object(L, 5, &arg4, "b2.Vec2"); + + // void Initialize(b2Body *bodyA, b2Body *bodyB, const b2Vec2 &anchor, const b2Vec2 &axis) + self->Initialize(arg1, arg2, *arg3, *arg4); + + olua_endinvoke(L); + + return 0; +} + +static int _olua_fun_b2PrismaticJointDef_localAnchorA$1(lua_State *L) { olua_startinvoke(L); @@ -10313,32 +12146,53 @@ static int _b2PrismaticJointDef_get_localAnchorA(lua_State *L) // b2Vec2 localAnchorA b2Vec2 &ret = self->localAnchorA; - int num_ret = olua_pushcopy_object(L, ret, "b2.Vec2"); + int num_ret = olua_copy_object(L, ret, "b2.Vec2"); olua_endinvoke(L); return num_ret; } -static int _b2PrismaticJointDef_set_localAnchorA(lua_State *L) +static int _olua_fun_b2PrismaticJointDef_localAnchorA$2(lua_State *L) { olua_startinvoke(L); b2PrismaticJointDef *self = nullptr; - b2Vec2 arg1; /** localAnchorA */ + b2Vec2 *arg1; /** localAnchorA */ olua_to_object(L, 1, &self, "b2.PrismaticJointDef"); olua_check_object(L, 2, &arg1, "b2.Vec2"); // b2Vec2 localAnchorA - self->localAnchorA = arg1; + self->localAnchorA = *arg1; olua_endinvoke(L); return 0; } -static int _b2PrismaticJointDef_get_localAnchorB(lua_State *L) +static int _olua_fun_b2PrismaticJointDef_localAnchorA(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // b2Vec2 localAnchorA + return _olua_fun_b2PrismaticJointDef_localAnchorA$1(L); + } + + if (num_args == 1) { + // if ((olua_is_object(L, 2, "b2.Vec2"))) { + // b2Vec2 localAnchorA + return _olua_fun_b2PrismaticJointDef_localAnchorA$2(L); + // } + } + + luaL_error(L, "method 'b2PrismaticJointDef::localAnchorA' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_b2PrismaticJointDef_localAnchorB$1(lua_State *L) { olua_startinvoke(L); @@ -10348,32 +12202,53 @@ static int _b2PrismaticJointDef_get_localAnchorB(lua_State *L) // b2Vec2 localAnchorB b2Vec2 &ret = self->localAnchorB; - int num_ret = olua_pushcopy_object(L, ret, "b2.Vec2"); + int num_ret = olua_copy_object(L, ret, "b2.Vec2"); olua_endinvoke(L); return num_ret; } -static int _b2PrismaticJointDef_set_localAnchorB(lua_State *L) +static int _olua_fun_b2PrismaticJointDef_localAnchorB$2(lua_State *L) { olua_startinvoke(L); b2PrismaticJointDef *self = nullptr; - b2Vec2 arg1; /** localAnchorB */ + b2Vec2 *arg1; /** localAnchorB */ olua_to_object(L, 1, &self, "b2.PrismaticJointDef"); olua_check_object(L, 2, &arg1, "b2.Vec2"); // b2Vec2 localAnchorB - self->localAnchorB = arg1; + self->localAnchorB = *arg1; olua_endinvoke(L); return 0; } -static int _b2PrismaticJointDef_get_localAxisA(lua_State *L) +static int _olua_fun_b2PrismaticJointDef_localAnchorB(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // b2Vec2 localAnchorB + return _olua_fun_b2PrismaticJointDef_localAnchorB$1(L); + } + + if (num_args == 1) { + // if ((olua_is_object(L, 2, "b2.Vec2"))) { + // b2Vec2 localAnchorB + return _olua_fun_b2PrismaticJointDef_localAnchorB$2(L); + // } + } + + luaL_error(L, "method 'b2PrismaticJointDef::localAnchorB' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_b2PrismaticJointDef_localAxisA$1(lua_State *L) { olua_startinvoke(L); @@ -10383,32 +12258,53 @@ static int _b2PrismaticJointDef_get_localAxisA(lua_State *L) // b2Vec2 localAxisA b2Vec2 &ret = self->localAxisA; - int num_ret = olua_pushcopy_object(L, ret, "b2.Vec2"); + int num_ret = olua_copy_object(L, ret, "b2.Vec2"); olua_endinvoke(L); return num_ret; } -static int _b2PrismaticJointDef_set_localAxisA(lua_State *L) +static int _olua_fun_b2PrismaticJointDef_localAxisA$2(lua_State *L) { olua_startinvoke(L); b2PrismaticJointDef *self = nullptr; - b2Vec2 arg1; /** localAxisA */ + b2Vec2 *arg1; /** localAxisA */ olua_to_object(L, 1, &self, "b2.PrismaticJointDef"); olua_check_object(L, 2, &arg1, "b2.Vec2"); // b2Vec2 localAxisA - self->localAxisA = arg1; + self->localAxisA = *arg1; olua_endinvoke(L); return 0; } -static int _b2PrismaticJointDef_get_lowerTranslation(lua_State *L) +static int _olua_fun_b2PrismaticJointDef_localAxisA(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // b2Vec2 localAxisA + return _olua_fun_b2PrismaticJointDef_localAxisA$1(L); + } + + if (num_args == 1) { + // if ((olua_is_object(L, 2, "b2.Vec2"))) { + // b2Vec2 localAxisA + return _olua_fun_b2PrismaticJointDef_localAxisA$2(L); + // } + } + + luaL_error(L, "method 'b2PrismaticJointDef::localAxisA' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_b2PrismaticJointDef_lowerTranslation$1(lua_State *L) { olua_startinvoke(L); @@ -10425,7 +12321,7 @@ static int _b2PrismaticJointDef_get_lowerTranslation(lua_State *L) return num_ret; } -static int _b2PrismaticJointDef_set_lowerTranslation(lua_State *L) +static int _olua_fun_b2PrismaticJointDef_lowerTranslation$2(lua_State *L) { olua_startinvoke(L); @@ -10443,7 +12339,28 @@ static int _b2PrismaticJointDef_set_lowerTranslation(lua_State *L) return 0; } -static int _b2PrismaticJointDef_get_maxMotorForce(lua_State *L) +static int _olua_fun_b2PrismaticJointDef_lowerTranslation(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float lowerTranslation + return _olua_fun_b2PrismaticJointDef_lowerTranslation$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float lowerTranslation + return _olua_fun_b2PrismaticJointDef_lowerTranslation$2(L); + // } + } + + luaL_error(L, "method 'b2PrismaticJointDef::lowerTranslation' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_b2PrismaticJointDef_maxMotorForce$1(lua_State *L) { olua_startinvoke(L); @@ -10460,7 +12377,7 @@ static int _b2PrismaticJointDef_get_maxMotorForce(lua_State *L) return num_ret; } -static int _b2PrismaticJointDef_set_maxMotorForce(lua_State *L) +static int _olua_fun_b2PrismaticJointDef_maxMotorForce$2(lua_State *L) { olua_startinvoke(L); @@ -10478,7 +12395,28 @@ static int _b2PrismaticJointDef_set_maxMotorForce(lua_State *L) return 0; } -static int _b2PrismaticJointDef_get_motorSpeed(lua_State *L) +static int _olua_fun_b2PrismaticJointDef_maxMotorForce(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float maxMotorForce + return _olua_fun_b2PrismaticJointDef_maxMotorForce$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float maxMotorForce + return _olua_fun_b2PrismaticJointDef_maxMotorForce$2(L); + // } + } + + luaL_error(L, "method 'b2PrismaticJointDef::maxMotorForce' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_b2PrismaticJointDef_motorSpeed$1(lua_State *L) { olua_startinvoke(L); @@ -10495,7 +12433,7 @@ static int _b2PrismaticJointDef_get_motorSpeed(lua_State *L) return num_ret; } -static int _b2PrismaticJointDef_set_motorSpeed(lua_State *L) +static int _olua_fun_b2PrismaticJointDef_motorSpeed$2(lua_State *L) { olua_startinvoke(L); @@ -10513,7 +12451,42 @@ static int _b2PrismaticJointDef_set_motorSpeed(lua_State *L) return 0; } -static int _b2PrismaticJointDef_get_referenceAngle(lua_State *L) +static int _olua_fun_b2PrismaticJointDef_motorSpeed(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float motorSpeed + return _olua_fun_b2PrismaticJointDef_motorSpeed$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float motorSpeed + return _olua_fun_b2PrismaticJointDef_motorSpeed$2(L); + // } + } + + luaL_error(L, "method 'b2PrismaticJointDef::motorSpeed' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_b2PrismaticJointDef_new(lua_State *L) +{ + olua_startinvoke(L); + + // b2PrismaticJointDef() + b2PrismaticJointDef *ret = new b2PrismaticJointDef(); + int num_ret = olua_push_object(L, ret, "b2.PrismaticJointDef"); + olua_postnew(L, ret); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_b2PrismaticJointDef_referenceAngle$1(lua_State *L) { olua_startinvoke(L); @@ -10530,7 +12503,7 @@ static int _b2PrismaticJointDef_get_referenceAngle(lua_State *L) return num_ret; } -static int _b2PrismaticJointDef_set_referenceAngle(lua_State *L) +static int _olua_fun_b2PrismaticJointDef_referenceAngle$2(lua_State *L) { olua_startinvoke(L); @@ -10548,7 +12521,28 @@ static int _b2PrismaticJointDef_set_referenceAngle(lua_State *L) return 0; } -static int _b2PrismaticJointDef_get_upperTranslation(lua_State *L) +static int _olua_fun_b2PrismaticJointDef_referenceAngle(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float referenceAngle + return _olua_fun_b2PrismaticJointDef_referenceAngle$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float referenceAngle + return _olua_fun_b2PrismaticJointDef_referenceAngle$2(L); + // } + } + + luaL_error(L, "method 'b2PrismaticJointDef::referenceAngle' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_b2PrismaticJointDef_upperTranslation$1(lua_State *L) { olua_startinvoke(L); @@ -10565,7 +12559,7 @@ static int _b2PrismaticJointDef_get_upperTranslation(lua_State *L) return num_ret; } -static int _b2PrismaticJointDef_set_upperTranslation(lua_State *L) +static int _olua_fun_b2PrismaticJointDef_upperTranslation$2(lua_State *L) { olua_startinvoke(L); @@ -10583,28 +12577,58 @@ static int _b2PrismaticJointDef_set_upperTranslation(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_b2PrismaticJointDef(lua_State *L) +static int _olua_fun_b2PrismaticJointDef_upperTranslation(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float upperTranslation + return _olua_fun_b2PrismaticJointDef_upperTranslation$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float upperTranslation + return _olua_fun_b2PrismaticJointDef_upperTranslation$2(L); + // } + } + + luaL_error(L, "method 'b2PrismaticJointDef::upperTranslation' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_cls_b2_PrismaticJointDef(lua_State *L) { oluacls_class(L, "b2.PrismaticJointDef"); - oluacls_func(L, "initialize", _b2PrismaticJointDef_Initialize); - oluacls_func(L, "new", _b2PrismaticJointDef_new); - oluacls_prop(L, "enableLimit", _b2PrismaticJointDef_get_enableLimit, _b2PrismaticJointDef_set_enableLimit); - oluacls_prop(L, "enableMotor", _b2PrismaticJointDef_get_enableMotor, _b2PrismaticJointDef_set_enableMotor); - oluacls_prop(L, "localAnchorA", _b2PrismaticJointDef_get_localAnchorA, _b2PrismaticJointDef_set_localAnchorA); - oluacls_prop(L, "localAnchorB", _b2PrismaticJointDef_get_localAnchorB, _b2PrismaticJointDef_set_localAnchorB); - oluacls_prop(L, "localAxisA", _b2PrismaticJointDef_get_localAxisA, _b2PrismaticJointDef_set_localAxisA); - oluacls_prop(L, "lowerTranslation", _b2PrismaticJointDef_get_lowerTranslation, _b2PrismaticJointDef_set_lowerTranslation); - oluacls_prop(L, "maxMotorForce", _b2PrismaticJointDef_get_maxMotorForce, _b2PrismaticJointDef_set_maxMotorForce); - oluacls_prop(L, "motorSpeed", _b2PrismaticJointDef_get_motorSpeed, _b2PrismaticJointDef_set_motorSpeed); - oluacls_prop(L, "referenceAngle", _b2PrismaticJointDef_get_referenceAngle, _b2PrismaticJointDef_set_referenceAngle); - oluacls_prop(L, "upperTranslation", _b2PrismaticJointDef_get_upperTranslation, _b2PrismaticJointDef_set_upperTranslation); + oluacls_func(L, "initialize", _olua_fun_b2PrismaticJointDef_initialize); + oluacls_func(L, "new", _olua_fun_b2PrismaticJointDef_new); + oluacls_prop(L, "enableLimit", _olua_fun_b2PrismaticJointDef_enableLimit, _olua_fun_b2PrismaticJointDef_enableLimit); + oluacls_prop(L, "enableMotor", _olua_fun_b2PrismaticJointDef_enableMotor, _olua_fun_b2PrismaticJointDef_enableMotor); + oluacls_prop(L, "localAnchorA", _olua_fun_b2PrismaticJointDef_localAnchorA, _olua_fun_b2PrismaticJointDef_localAnchorA); + oluacls_prop(L, "localAnchorB", _olua_fun_b2PrismaticJointDef_localAnchorB, _olua_fun_b2PrismaticJointDef_localAnchorB); + oluacls_prop(L, "localAxisA", _olua_fun_b2PrismaticJointDef_localAxisA, _olua_fun_b2PrismaticJointDef_localAxisA); + oluacls_prop(L, "lowerTranslation", _olua_fun_b2PrismaticJointDef_lowerTranslation, _olua_fun_b2PrismaticJointDef_lowerTranslation); + oluacls_prop(L, "maxMotorForce", _olua_fun_b2PrismaticJointDef_maxMotorForce, _olua_fun_b2PrismaticJointDef_maxMotorForce); + oluacls_prop(L, "motorSpeed", _olua_fun_b2PrismaticJointDef_motorSpeed, _olua_fun_b2PrismaticJointDef_motorSpeed); + oluacls_prop(L, "referenceAngle", _olua_fun_b2PrismaticJointDef_referenceAngle, _olua_fun_b2PrismaticJointDef_referenceAngle); + oluacls_prop(L, "upperTranslation", _olua_fun_b2PrismaticJointDef_upperTranslation, _olua_fun_b2PrismaticJointDef_upperTranslation); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_b2_PrismaticJointDef(lua_State *L) +{ + olua_require(L, "box2d", luaopen_box2d); + if (!olua_getclass(L, "b2.PrismaticJointDef")) { + luaL_error(L, "class not found: b2PrismaticJointDef"); + } + return 1; +} OLUA_END_DECLS -static int _b2PrismaticJoint___gc(lua_State *L) +static int _olua_fun_b2PrismaticJoint___gc(lua_State *L) { olua_startinvoke(L); @@ -10616,7 +12640,7 @@ static int _b2PrismaticJoint___gc(lua_State *L) return 0; } -static int _b2PrismaticJoint_EnableLimit(lua_State *L) +static int _olua_fun_b2PrismaticJoint_enableLimit(lua_State *L) { olua_startinvoke(L); @@ -10634,7 +12658,7 @@ static int _b2PrismaticJoint_EnableLimit(lua_State *L) return 0; } -static int _b2PrismaticJoint_EnableMotor(lua_State *L) +static int _olua_fun_b2PrismaticJoint_enableMotor(lua_State *L) { olua_startinvoke(L); @@ -10652,7 +12676,7 @@ static int _b2PrismaticJoint_EnableMotor(lua_State *L) return 0; } -static int _b2PrismaticJoint_GetJointSpeed(lua_State *L) +static int _olua_fun_b2PrismaticJoint_getJointSpeed(lua_State *L) { olua_startinvoke(L); @@ -10669,7 +12693,7 @@ static int _b2PrismaticJoint_GetJointSpeed(lua_State *L) return num_ret; } -static int _b2PrismaticJoint_GetJointTranslation(lua_State *L) +static int _olua_fun_b2PrismaticJoint_getJointTranslation(lua_State *L) { olua_startinvoke(L); @@ -10686,7 +12710,7 @@ static int _b2PrismaticJoint_GetJointTranslation(lua_State *L) return num_ret; } -static int _b2PrismaticJoint_GetLocalAnchorA(lua_State *L) +static int _olua_fun_b2PrismaticJoint_getLocalAnchorA(lua_State *L) { olua_startinvoke(L); @@ -10703,7 +12727,7 @@ static int _b2PrismaticJoint_GetLocalAnchorA(lua_State *L) return num_ret; } -static int _b2PrismaticJoint_GetLocalAnchorB(lua_State *L) +static int _olua_fun_b2PrismaticJoint_getLocalAnchorB(lua_State *L) { olua_startinvoke(L); @@ -10720,7 +12744,7 @@ static int _b2PrismaticJoint_GetLocalAnchorB(lua_State *L) return num_ret; } -static int _b2PrismaticJoint_GetLocalAxisA(lua_State *L) +static int _olua_fun_b2PrismaticJoint_getLocalAxisA(lua_State *L) { olua_startinvoke(L); @@ -10737,7 +12761,7 @@ static int _b2PrismaticJoint_GetLocalAxisA(lua_State *L) return num_ret; } -static int _b2PrismaticJoint_GetLowerLimit(lua_State *L) +static int _olua_fun_b2PrismaticJoint_getLowerLimit(lua_State *L) { olua_startinvoke(L); @@ -10754,7 +12778,7 @@ static int _b2PrismaticJoint_GetLowerLimit(lua_State *L) return num_ret; } -static int _b2PrismaticJoint_GetMaxMotorForce(lua_State *L) +static int _olua_fun_b2PrismaticJoint_getMaxMotorForce(lua_State *L) { olua_startinvoke(L); @@ -10771,7 +12795,7 @@ static int _b2PrismaticJoint_GetMaxMotorForce(lua_State *L) return num_ret; } -static int _b2PrismaticJoint_GetMotorForce(lua_State *L) +static int _olua_fun_b2PrismaticJoint_getMotorForce(lua_State *L) { olua_startinvoke(L); @@ -10790,7 +12814,7 @@ static int _b2PrismaticJoint_GetMotorForce(lua_State *L) return num_ret; } -static int _b2PrismaticJoint_GetMotorSpeed(lua_State *L) +static int _olua_fun_b2PrismaticJoint_getMotorSpeed(lua_State *L) { olua_startinvoke(L); @@ -10807,7 +12831,7 @@ static int _b2PrismaticJoint_GetMotorSpeed(lua_State *L) return num_ret; } -static int _b2PrismaticJoint_GetReferenceAngle(lua_State *L) +static int _olua_fun_b2PrismaticJoint_getReferenceAngle(lua_State *L) { olua_startinvoke(L); @@ -10824,7 +12848,7 @@ static int _b2PrismaticJoint_GetReferenceAngle(lua_State *L) return num_ret; } -static int _b2PrismaticJoint_GetUpperLimit(lua_State *L) +static int _olua_fun_b2PrismaticJoint_getUpperLimit(lua_State *L) { olua_startinvoke(L); @@ -10841,7 +12865,7 @@ static int _b2PrismaticJoint_GetUpperLimit(lua_State *L) return num_ret; } -static int _b2PrismaticJoint_IsLimitEnabled(lua_State *L) +static int _olua_fun_b2PrismaticJoint_isLimitEnabled(lua_State *L) { olua_startinvoke(L); @@ -10858,7 +12882,7 @@ static int _b2PrismaticJoint_IsLimitEnabled(lua_State *L) return num_ret; } -static int _b2PrismaticJoint_IsMotorEnabled(lua_State *L) +static int _olua_fun_b2PrismaticJoint_isMotorEnabled(lua_State *L) { olua_startinvoke(L); @@ -10875,7 +12899,7 @@ static int _b2PrismaticJoint_IsMotorEnabled(lua_State *L) return num_ret; } -static int _b2PrismaticJoint_SetLimits(lua_State *L) +static int _olua_fun_b2PrismaticJoint_setLimits(lua_State *L) { olua_startinvoke(L); @@ -10895,7 +12919,7 @@ static int _b2PrismaticJoint_SetLimits(lua_State *L) return 0; } -static int _b2PrismaticJoint_SetMaxMotorForce(lua_State *L) +static int _olua_fun_b2PrismaticJoint_setMaxMotorForce(lua_State *L) { olua_startinvoke(L); @@ -10913,7 +12937,7 @@ static int _b2PrismaticJoint_SetMaxMotorForce(lua_State *L) return 0; } -static int _b2PrismaticJoint_SetMotorSpeed(lua_State *L) +static int _olua_fun_b2PrismaticJoint_setMotorSpeed(lua_State *L) { olua_startinvoke(L); @@ -10931,91 +12955,112 @@ static int _b2PrismaticJoint_SetMotorSpeed(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_b2PrismaticJoint(lua_State *L) +static int _olua_cls_b2_PrismaticJoint(lua_State *L) { oluacls_class(L, "b2.PrismaticJoint"); - oluacls_func(L, "__gc", _b2PrismaticJoint___gc); - oluacls_func(L, "enableLimit", _b2PrismaticJoint_EnableLimit); - oluacls_func(L, "enableMotor", _b2PrismaticJoint_EnableMotor); - oluacls_func(L, "getJointSpeed", _b2PrismaticJoint_GetJointSpeed); - oluacls_func(L, "getJointTranslation", _b2PrismaticJoint_GetJointTranslation); - oluacls_func(L, "getLocalAnchorA", _b2PrismaticJoint_GetLocalAnchorA); - oluacls_func(L, "getLocalAnchorB", _b2PrismaticJoint_GetLocalAnchorB); - oluacls_func(L, "getLocalAxisA", _b2PrismaticJoint_GetLocalAxisA); - oluacls_func(L, "getLowerLimit", _b2PrismaticJoint_GetLowerLimit); - oluacls_func(L, "getMaxMotorForce", _b2PrismaticJoint_GetMaxMotorForce); - oluacls_func(L, "getMotorForce", _b2PrismaticJoint_GetMotorForce); - oluacls_func(L, "getMotorSpeed", _b2PrismaticJoint_GetMotorSpeed); - oluacls_func(L, "getReferenceAngle", _b2PrismaticJoint_GetReferenceAngle); - oluacls_func(L, "getUpperLimit", _b2PrismaticJoint_GetUpperLimit); - oluacls_func(L, "isLimitEnabled", _b2PrismaticJoint_IsLimitEnabled); - oluacls_func(L, "isMotorEnabled", _b2PrismaticJoint_IsMotorEnabled); - oluacls_func(L, "setLimits", _b2PrismaticJoint_SetLimits); - oluacls_func(L, "setMaxMotorForce", _b2PrismaticJoint_SetMaxMotorForce); - oluacls_func(L, "setMotorSpeed", _b2PrismaticJoint_SetMotorSpeed); - oluacls_prop(L, "jointSpeed", _b2PrismaticJoint_GetJointSpeed, nullptr); - oluacls_prop(L, "jointTranslation", _b2PrismaticJoint_GetJointTranslation, nullptr); - oluacls_prop(L, "limitEnabled", _b2PrismaticJoint_IsLimitEnabled, nullptr); - oluacls_prop(L, "localAnchorA", _b2PrismaticJoint_GetLocalAnchorA, nullptr); - oluacls_prop(L, "localAnchorB", _b2PrismaticJoint_GetLocalAnchorB, nullptr); - oluacls_prop(L, "localAxisA", _b2PrismaticJoint_GetLocalAxisA, nullptr); - oluacls_prop(L, "lowerLimit", _b2PrismaticJoint_GetLowerLimit, nullptr); - oluacls_prop(L, "maxMotorForce", _b2PrismaticJoint_GetMaxMotorForce, _b2PrismaticJoint_SetMaxMotorForce); - oluacls_prop(L, "motorEnabled", _b2PrismaticJoint_IsMotorEnabled, nullptr); - oluacls_prop(L, "motorSpeed", _b2PrismaticJoint_GetMotorSpeed, _b2PrismaticJoint_SetMotorSpeed); - oluacls_prop(L, "referenceAngle", _b2PrismaticJoint_GetReferenceAngle, nullptr); - oluacls_prop(L, "upperLimit", _b2PrismaticJoint_GetUpperLimit, nullptr); + oluacls_func(L, "__gc", _olua_fun_b2PrismaticJoint___gc); + oluacls_func(L, "enableLimit", _olua_fun_b2PrismaticJoint_enableLimit); + oluacls_func(L, "enableMotor", _olua_fun_b2PrismaticJoint_enableMotor); + oluacls_func(L, "getJointSpeed", _olua_fun_b2PrismaticJoint_getJointSpeed); + oluacls_func(L, "getJointTranslation", _olua_fun_b2PrismaticJoint_getJointTranslation); + oluacls_func(L, "getLocalAnchorA", _olua_fun_b2PrismaticJoint_getLocalAnchorA); + oluacls_func(L, "getLocalAnchorB", _olua_fun_b2PrismaticJoint_getLocalAnchorB); + oluacls_func(L, "getLocalAxisA", _olua_fun_b2PrismaticJoint_getLocalAxisA); + oluacls_func(L, "getLowerLimit", _olua_fun_b2PrismaticJoint_getLowerLimit); + oluacls_func(L, "getMaxMotorForce", _olua_fun_b2PrismaticJoint_getMaxMotorForce); + oluacls_func(L, "getMotorForce", _olua_fun_b2PrismaticJoint_getMotorForce); + oluacls_func(L, "getMotorSpeed", _olua_fun_b2PrismaticJoint_getMotorSpeed); + oluacls_func(L, "getReferenceAngle", _olua_fun_b2PrismaticJoint_getReferenceAngle); + oluacls_func(L, "getUpperLimit", _olua_fun_b2PrismaticJoint_getUpperLimit); + oluacls_func(L, "isLimitEnabled", _olua_fun_b2PrismaticJoint_isLimitEnabled); + oluacls_func(L, "isMotorEnabled", _olua_fun_b2PrismaticJoint_isMotorEnabled); + oluacls_func(L, "setLimits", _olua_fun_b2PrismaticJoint_setLimits); + oluacls_func(L, "setMaxMotorForce", _olua_fun_b2PrismaticJoint_setMaxMotorForce); + oluacls_func(L, "setMotorSpeed", _olua_fun_b2PrismaticJoint_setMotorSpeed); + oluacls_prop(L, "jointSpeed", _olua_fun_b2PrismaticJoint_getJointSpeed, nullptr); + oluacls_prop(L, "jointTranslation", _olua_fun_b2PrismaticJoint_getJointTranslation, nullptr); + oluacls_prop(L, "limitEnabled", _olua_fun_b2PrismaticJoint_isLimitEnabled, nullptr); + oluacls_prop(L, "localAnchorA", _olua_fun_b2PrismaticJoint_getLocalAnchorA, nullptr); + oluacls_prop(L, "localAnchorB", _olua_fun_b2PrismaticJoint_getLocalAnchorB, nullptr); + oluacls_prop(L, "localAxisA", _olua_fun_b2PrismaticJoint_getLocalAxisA, nullptr); + oluacls_prop(L, "lowerLimit", _olua_fun_b2PrismaticJoint_getLowerLimit, nullptr); + oluacls_prop(L, "maxMotorForce", _olua_fun_b2PrismaticJoint_getMaxMotorForce, _olua_fun_b2PrismaticJoint_setMaxMotorForce); + oluacls_prop(L, "motorEnabled", _olua_fun_b2PrismaticJoint_isMotorEnabled, nullptr); + oluacls_prop(L, "motorSpeed", _olua_fun_b2PrismaticJoint_getMotorSpeed, _olua_fun_b2PrismaticJoint_setMotorSpeed); + oluacls_prop(L, "referenceAngle", _olua_fun_b2PrismaticJoint_getReferenceAngle, nullptr); + oluacls_prop(L, "upperLimit", _olua_fun_b2PrismaticJoint_getUpperLimit, nullptr); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_b2_PrismaticJoint(lua_State *L) +{ + olua_require(L, "box2d", luaopen_box2d); + if (!olua_getclass(L, "b2.PrismaticJoint")) { + luaL_error(L, "class not found: b2PrismaticJoint"); + } return 1; } OLUA_END_DECLS -static int _b2PulleyJointDef_Initialize(lua_State *L) +static int _olua_fun_b2PulleyJointDef_groundAnchorA$1(lua_State *L) { olua_startinvoke(L); b2PulleyJointDef *self = nullptr; - b2Body *arg1 = nullptr; /** bodyA */ - b2Body *arg2 = nullptr; /** bodyB */ - b2Vec2 arg3; /** groundAnchorA */ - b2Vec2 arg4; /** groundAnchorB */ - b2Vec2 arg5; /** anchorA */ - b2Vec2 arg6; /** anchorB */ - float arg7 = 0; /** ratio */ olua_to_object(L, 1, &self, "b2.PulleyJointDef"); - olua_check_object(L, 2, &arg1, "b2.Body"); - olua_check_object(L, 3, &arg2, "b2.Body"); - olua_check_object(L, 4, &arg3, "b2.Vec2"); - olua_check_object(L, 5, &arg4, "b2.Vec2"); - olua_check_object(L, 6, &arg5, "b2.Vec2"); - olua_check_object(L, 7, &arg6, "b2.Vec2"); - olua_check_number(L, 8, &arg7); - // void Initialize(b2Body *bodyA, b2Body *bodyB, const b2Vec2 &groundAnchorA, const b2Vec2 &groundAnchorB, const b2Vec2 &anchorA, const b2Vec2 &anchorB, float ratio) - self->Initialize(arg1, arg2, arg3, arg4, arg5, arg6, arg7); + // b2Vec2 groundAnchorA + b2Vec2 &ret = self->groundAnchorA; + int num_ret = olua_copy_object(L, ret, "b2.Vec2"); olua_endinvoke(L); - return 0; + return num_ret; } -static int _b2PulleyJointDef_new(lua_State *L) +static int _olua_fun_b2PulleyJointDef_groundAnchorA$2(lua_State *L) { olua_startinvoke(L); - // b2PulleyJointDef() - b2PulleyJointDef *ret = new b2PulleyJointDef(); - int num_ret = olua_push_object(L, ret, "b2.PulleyJointDef"); - olua_postnew(L, ret); + b2PulleyJointDef *self = nullptr; + b2Vec2 *arg1; /** groundAnchorA */ + + olua_to_object(L, 1, &self, "b2.PulleyJointDef"); + olua_check_object(L, 2, &arg1, "b2.Vec2"); + + // b2Vec2 groundAnchorA + self->groundAnchorA = *arg1; + + olua_endinvoke(L); + + return 0; +} + +static int _olua_fun_b2PulleyJointDef_groundAnchorA(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // b2Vec2 groundAnchorA + return _olua_fun_b2PulleyJointDef_groundAnchorA$1(L); + } - olua_endinvoke(L); + if (num_args == 1) { + // if ((olua_is_object(L, 2, "b2.Vec2"))) { + // b2Vec2 groundAnchorA + return _olua_fun_b2PulleyJointDef_groundAnchorA$2(L); + // } + } - return num_ret; + luaL_error(L, "method 'b2PulleyJointDef::groundAnchorA' not support '%d' arguments", num_args); + + return 0; } -static int _b2PulleyJointDef_get_groundAnchorA(lua_State *L) +static int _olua_fun_b2PulleyJointDef_groundAnchorB$1(lua_State *L) { olua_startinvoke(L); @@ -11023,69 +13068,85 @@ static int _b2PulleyJointDef_get_groundAnchorA(lua_State *L) olua_to_object(L, 1, &self, "b2.PulleyJointDef"); - // b2Vec2 groundAnchorA - b2Vec2 &ret = self->groundAnchorA; - int num_ret = olua_pushcopy_object(L, ret, "b2.Vec2"); + // b2Vec2 groundAnchorB + b2Vec2 &ret = self->groundAnchorB; + int num_ret = olua_copy_object(L, ret, "b2.Vec2"); olua_endinvoke(L); return num_ret; } -static int _b2PulleyJointDef_set_groundAnchorA(lua_State *L) +static int _olua_fun_b2PulleyJointDef_groundAnchorB$2(lua_State *L) { olua_startinvoke(L); b2PulleyJointDef *self = nullptr; - b2Vec2 arg1; /** groundAnchorA */ + b2Vec2 *arg1; /** groundAnchorB */ olua_to_object(L, 1, &self, "b2.PulleyJointDef"); olua_check_object(L, 2, &arg1, "b2.Vec2"); - // b2Vec2 groundAnchorA - self->groundAnchorA = arg1; + // b2Vec2 groundAnchorB + self->groundAnchorB = *arg1; olua_endinvoke(L); return 0; } -static int _b2PulleyJointDef_get_groundAnchorB(lua_State *L) +static int _olua_fun_b2PulleyJointDef_groundAnchorB(lua_State *L) { - olua_startinvoke(L); - - b2PulleyJointDef *self = nullptr; + int num_args = lua_gettop(L) - 1; - olua_to_object(L, 1, &self, "b2.PulleyJointDef"); + if (num_args == 0) { + // b2Vec2 groundAnchorB + return _olua_fun_b2PulleyJointDef_groundAnchorB$1(L); + } - // b2Vec2 groundAnchorB - b2Vec2 &ret = self->groundAnchorB; - int num_ret = olua_pushcopy_object(L, ret, "b2.Vec2"); + if (num_args == 1) { + // if ((olua_is_object(L, 2, "b2.Vec2"))) { + // b2Vec2 groundAnchorB + return _olua_fun_b2PulleyJointDef_groundAnchorB$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'b2PulleyJointDef::groundAnchorB' not support '%d' arguments", num_args); - return num_ret; + return 0; } -static int _b2PulleyJointDef_set_groundAnchorB(lua_State *L) +static int _olua_fun_b2PulleyJointDef_initialize(lua_State *L) { olua_startinvoke(L); b2PulleyJointDef *self = nullptr; - b2Vec2 arg1; /** groundAnchorB */ + b2Body *arg1 = nullptr; /** bodyA */ + b2Body *arg2 = nullptr; /** bodyB */ + b2Vec2 *arg3; /** groundAnchorA */ + b2Vec2 *arg4; /** groundAnchorB */ + b2Vec2 *arg5; /** anchorA */ + b2Vec2 *arg6; /** anchorB */ + float arg7 = 0; /** ratio */ olua_to_object(L, 1, &self, "b2.PulleyJointDef"); - olua_check_object(L, 2, &arg1, "b2.Vec2"); + olua_check_object(L, 2, &arg1, "b2.Body"); + olua_check_object(L, 3, &arg2, "b2.Body"); + olua_check_object(L, 4, &arg3, "b2.Vec2"); + olua_check_object(L, 5, &arg4, "b2.Vec2"); + olua_check_object(L, 6, &arg5, "b2.Vec2"); + olua_check_object(L, 7, &arg6, "b2.Vec2"); + olua_check_number(L, 8, &arg7); - // b2Vec2 groundAnchorB - self->groundAnchorB = arg1; + // void Initialize(b2Body *bodyA, b2Body *bodyB, const b2Vec2 &groundAnchorA, const b2Vec2 &groundAnchorB, const b2Vec2 &anchorA, const b2Vec2 &anchorB, float ratio) + self->Initialize(arg1, arg2, *arg3, *arg4, *arg5, *arg6, arg7); olua_endinvoke(L); return 0; } -static int _b2PulleyJointDef_get_lengthA(lua_State *L) +static int _olua_fun_b2PulleyJointDef_lengthA$1(lua_State *L) { olua_startinvoke(L); @@ -11102,7 +13163,7 @@ static int _b2PulleyJointDef_get_lengthA(lua_State *L) return num_ret; } -static int _b2PulleyJointDef_set_lengthA(lua_State *L) +static int _olua_fun_b2PulleyJointDef_lengthA$2(lua_State *L) { olua_startinvoke(L); @@ -11120,7 +13181,28 @@ static int _b2PulleyJointDef_set_lengthA(lua_State *L) return 0; } -static int _b2PulleyJointDef_get_lengthB(lua_State *L) +static int _olua_fun_b2PulleyJointDef_lengthA(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float lengthA + return _olua_fun_b2PulleyJointDef_lengthA$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float lengthA + return _olua_fun_b2PulleyJointDef_lengthA$2(L); + // } + } + + luaL_error(L, "method 'b2PulleyJointDef::lengthA' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_b2PulleyJointDef_lengthB$1(lua_State *L) { olua_startinvoke(L); @@ -11137,7 +13219,7 @@ static int _b2PulleyJointDef_get_lengthB(lua_State *L) return num_ret; } -static int _b2PulleyJointDef_set_lengthB(lua_State *L) +static int _olua_fun_b2PulleyJointDef_lengthB$2(lua_State *L) { olua_startinvoke(L); @@ -11155,7 +13237,28 @@ static int _b2PulleyJointDef_set_lengthB(lua_State *L) return 0; } -static int _b2PulleyJointDef_get_localAnchorA(lua_State *L) +static int _olua_fun_b2PulleyJointDef_lengthB(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float lengthB + return _olua_fun_b2PulleyJointDef_lengthB$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float lengthB + return _olua_fun_b2PulleyJointDef_lengthB$2(L); + // } + } + + luaL_error(L, "method 'b2PulleyJointDef::lengthB' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_b2PulleyJointDef_localAnchorA$1(lua_State *L) { olua_startinvoke(L); @@ -11165,32 +13268,53 @@ static int _b2PulleyJointDef_get_localAnchorA(lua_State *L) // b2Vec2 localAnchorA b2Vec2 &ret = self->localAnchorA; - int num_ret = olua_pushcopy_object(L, ret, "b2.Vec2"); + int num_ret = olua_copy_object(L, ret, "b2.Vec2"); olua_endinvoke(L); return num_ret; } -static int _b2PulleyJointDef_set_localAnchorA(lua_State *L) +static int _olua_fun_b2PulleyJointDef_localAnchorA$2(lua_State *L) { olua_startinvoke(L); b2PulleyJointDef *self = nullptr; - b2Vec2 arg1; /** localAnchorA */ + b2Vec2 *arg1; /** localAnchorA */ olua_to_object(L, 1, &self, "b2.PulleyJointDef"); olua_check_object(L, 2, &arg1, "b2.Vec2"); // b2Vec2 localAnchorA - self->localAnchorA = arg1; + self->localAnchorA = *arg1; olua_endinvoke(L); return 0; } -static int _b2PulleyJointDef_get_localAnchorB(lua_State *L) +static int _olua_fun_b2PulleyJointDef_localAnchorA(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // b2Vec2 localAnchorA + return _olua_fun_b2PulleyJointDef_localAnchorA$1(L); + } + + if (num_args == 1) { + // if ((olua_is_object(L, 2, "b2.Vec2"))) { + // b2Vec2 localAnchorA + return _olua_fun_b2PulleyJointDef_localAnchorA$2(L); + // } + } + + luaL_error(L, "method 'b2PulleyJointDef::localAnchorA' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_b2PulleyJointDef_localAnchorB$1(lua_State *L) { olua_startinvoke(L); @@ -11200,32 +13324,67 @@ static int _b2PulleyJointDef_get_localAnchorB(lua_State *L) // b2Vec2 localAnchorB b2Vec2 &ret = self->localAnchorB; - int num_ret = olua_pushcopy_object(L, ret, "b2.Vec2"); + int num_ret = olua_copy_object(L, ret, "b2.Vec2"); olua_endinvoke(L); return num_ret; } -static int _b2PulleyJointDef_set_localAnchorB(lua_State *L) +static int _olua_fun_b2PulleyJointDef_localAnchorB$2(lua_State *L) { olua_startinvoke(L); b2PulleyJointDef *self = nullptr; - b2Vec2 arg1; /** localAnchorB */ + b2Vec2 *arg1; /** localAnchorB */ olua_to_object(L, 1, &self, "b2.PulleyJointDef"); olua_check_object(L, 2, &arg1, "b2.Vec2"); // b2Vec2 localAnchorB - self->localAnchorB = arg1; + self->localAnchorB = *arg1; olua_endinvoke(L); return 0; } -static int _b2PulleyJointDef_get_ratio(lua_State *L) +static int _olua_fun_b2PulleyJointDef_localAnchorB(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // b2Vec2 localAnchorB + return _olua_fun_b2PulleyJointDef_localAnchorB$1(L); + } + + if (num_args == 1) { + // if ((olua_is_object(L, 2, "b2.Vec2"))) { + // b2Vec2 localAnchorB + return _olua_fun_b2PulleyJointDef_localAnchorB$2(L); + // } + } + + luaL_error(L, "method 'b2PulleyJointDef::localAnchorB' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_b2PulleyJointDef_new(lua_State *L) +{ + olua_startinvoke(L); + + // b2PulleyJointDef() + b2PulleyJointDef *ret = new b2PulleyJointDef(); + int num_ret = olua_push_object(L, ret, "b2.PulleyJointDef"); + olua_postnew(L, ret); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_b2PulleyJointDef_ratio$1(lua_State *L) { olua_startinvoke(L); @@ -11242,7 +13401,7 @@ static int _b2PulleyJointDef_get_ratio(lua_State *L) return num_ret; } -static int _b2PulleyJointDef_set_ratio(lua_State *L) +static int _olua_fun_b2PulleyJointDef_ratio$2(lua_State *L) { olua_startinvoke(L); @@ -11260,25 +13419,55 @@ static int _b2PulleyJointDef_set_ratio(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_b2PulleyJointDef(lua_State *L) +static int _olua_fun_b2PulleyJointDef_ratio(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float ratio + return _olua_fun_b2PulleyJointDef_ratio$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float ratio + return _olua_fun_b2PulleyJointDef_ratio$2(L); + // } + } + + luaL_error(L, "method 'b2PulleyJointDef::ratio' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_cls_b2_PulleyJointDef(lua_State *L) { oluacls_class(L, "b2.PulleyJointDef"); - oluacls_func(L, "initialize", _b2PulleyJointDef_Initialize); - oluacls_func(L, "new", _b2PulleyJointDef_new); - oluacls_prop(L, "groundAnchorA", _b2PulleyJointDef_get_groundAnchorA, _b2PulleyJointDef_set_groundAnchorA); - oluacls_prop(L, "groundAnchorB", _b2PulleyJointDef_get_groundAnchorB, _b2PulleyJointDef_set_groundAnchorB); - oluacls_prop(L, "lengthA", _b2PulleyJointDef_get_lengthA, _b2PulleyJointDef_set_lengthA); - oluacls_prop(L, "lengthB", _b2PulleyJointDef_get_lengthB, _b2PulleyJointDef_set_lengthB); - oluacls_prop(L, "localAnchorA", _b2PulleyJointDef_get_localAnchorA, _b2PulleyJointDef_set_localAnchorA); - oluacls_prop(L, "localAnchorB", _b2PulleyJointDef_get_localAnchorB, _b2PulleyJointDef_set_localAnchorB); - oluacls_prop(L, "ratio", _b2PulleyJointDef_get_ratio, _b2PulleyJointDef_set_ratio); + oluacls_func(L, "initialize", _olua_fun_b2PulleyJointDef_initialize); + oluacls_func(L, "new", _olua_fun_b2PulleyJointDef_new); + oluacls_prop(L, "groundAnchorA", _olua_fun_b2PulleyJointDef_groundAnchorA, _olua_fun_b2PulleyJointDef_groundAnchorA); + oluacls_prop(L, "groundAnchorB", _olua_fun_b2PulleyJointDef_groundAnchorB, _olua_fun_b2PulleyJointDef_groundAnchorB); + oluacls_prop(L, "lengthA", _olua_fun_b2PulleyJointDef_lengthA, _olua_fun_b2PulleyJointDef_lengthA); + oluacls_prop(L, "lengthB", _olua_fun_b2PulleyJointDef_lengthB, _olua_fun_b2PulleyJointDef_lengthB); + oluacls_prop(L, "localAnchorA", _olua_fun_b2PulleyJointDef_localAnchorA, _olua_fun_b2PulleyJointDef_localAnchorA); + oluacls_prop(L, "localAnchorB", _olua_fun_b2PulleyJointDef_localAnchorB, _olua_fun_b2PulleyJointDef_localAnchorB); + oluacls_prop(L, "ratio", _olua_fun_b2PulleyJointDef_ratio, _olua_fun_b2PulleyJointDef_ratio); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_b2_PulleyJointDef(lua_State *L) +{ + olua_require(L, "box2d", luaopen_box2d); + if (!olua_getclass(L, "b2.PulleyJointDef")) { + luaL_error(L, "class not found: b2PulleyJointDef"); + } return 1; } OLUA_END_DECLS -static int _b2PulleyJoint___gc(lua_State *L) +static int _olua_fun_b2PulleyJoint___gc(lua_State *L) { olua_startinvoke(L); @@ -11290,7 +13479,7 @@ static int _b2PulleyJoint___gc(lua_State *L) return 0; } -static int _b2PulleyJoint_GetCurrentLengthA(lua_State *L) +static int _olua_fun_b2PulleyJoint_getCurrentLengthA(lua_State *L) { olua_startinvoke(L); @@ -11307,7 +13496,7 @@ static int _b2PulleyJoint_GetCurrentLengthA(lua_State *L) return num_ret; } -static int _b2PulleyJoint_GetCurrentLengthB(lua_State *L) +static int _olua_fun_b2PulleyJoint_getCurrentLengthB(lua_State *L) { olua_startinvoke(L); @@ -11324,7 +13513,7 @@ static int _b2PulleyJoint_GetCurrentLengthB(lua_State *L) return num_ret; } -static int _b2PulleyJoint_GetGroundAnchorA(lua_State *L) +static int _olua_fun_b2PulleyJoint_getGroundAnchorA(lua_State *L) { olua_startinvoke(L); @@ -11334,14 +13523,14 @@ static int _b2PulleyJoint_GetGroundAnchorA(lua_State *L) // b2Vec2 GetGroundAnchorA() b2Vec2 ret = self->GetGroundAnchorA(); - int num_ret = olua_pushcopy_object(L, ret, "b2.Vec2"); + int num_ret = olua_copy_object(L, ret, "b2.Vec2"); olua_endinvoke(L); return num_ret; } -static int _b2PulleyJoint_GetGroundAnchorB(lua_State *L) +static int _olua_fun_b2PulleyJoint_getGroundAnchorB(lua_State *L) { olua_startinvoke(L); @@ -11351,14 +13540,14 @@ static int _b2PulleyJoint_GetGroundAnchorB(lua_State *L) // b2Vec2 GetGroundAnchorB() b2Vec2 ret = self->GetGroundAnchorB(); - int num_ret = olua_pushcopy_object(L, ret, "b2.Vec2"); + int num_ret = olua_copy_object(L, ret, "b2.Vec2"); olua_endinvoke(L); return num_ret; } -static int _b2PulleyJoint_GetLengthA(lua_State *L) +static int _olua_fun_b2PulleyJoint_getLengthA(lua_State *L) { olua_startinvoke(L); @@ -11375,7 +13564,7 @@ static int _b2PulleyJoint_GetLengthA(lua_State *L) return num_ret; } -static int _b2PulleyJoint_GetLengthB(lua_State *L) +static int _olua_fun_b2PulleyJoint_getLengthB(lua_State *L) { olua_startinvoke(L); @@ -11392,7 +13581,7 @@ static int _b2PulleyJoint_GetLengthB(lua_State *L) return num_ret; } -static int _b2PulleyJoint_GetRatio(lua_State *L) +static int _olua_fun_b2PulleyJoint_getRatio(lua_State *L) { olua_startinvoke(L); @@ -11409,67 +13598,40 @@ static int _b2PulleyJoint_GetRatio(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_b2PulleyJoint(lua_State *L) +static int _olua_cls_b2_PulleyJoint(lua_State *L) { oluacls_class(L, "b2.PulleyJoint"); - oluacls_func(L, "__gc", _b2PulleyJoint___gc); - oluacls_func(L, "getCurrentLengthA", _b2PulleyJoint_GetCurrentLengthA); - oluacls_func(L, "getCurrentLengthB", _b2PulleyJoint_GetCurrentLengthB); - oluacls_func(L, "getGroundAnchorA", _b2PulleyJoint_GetGroundAnchorA); - oluacls_func(L, "getGroundAnchorB", _b2PulleyJoint_GetGroundAnchorB); - oluacls_func(L, "getLengthA", _b2PulleyJoint_GetLengthA); - oluacls_func(L, "getLengthB", _b2PulleyJoint_GetLengthB); - oluacls_func(L, "getRatio", _b2PulleyJoint_GetRatio); - oluacls_prop(L, "currentLengthA", _b2PulleyJoint_GetCurrentLengthA, nullptr); - oluacls_prop(L, "currentLengthB", _b2PulleyJoint_GetCurrentLengthB, nullptr); - oluacls_prop(L, "groundAnchorA", _b2PulleyJoint_GetGroundAnchorA, nullptr); - oluacls_prop(L, "groundAnchorB", _b2PulleyJoint_GetGroundAnchorB, nullptr); - oluacls_prop(L, "lengthA", _b2PulleyJoint_GetLengthA, nullptr); - oluacls_prop(L, "lengthB", _b2PulleyJoint_GetLengthB, nullptr); - oluacls_prop(L, "ratio", _b2PulleyJoint_GetRatio, nullptr); + oluacls_func(L, "__gc", _olua_fun_b2PulleyJoint___gc); + oluacls_func(L, "getCurrentLengthA", _olua_fun_b2PulleyJoint_getCurrentLengthA); + oluacls_func(L, "getCurrentLengthB", _olua_fun_b2PulleyJoint_getCurrentLengthB); + oluacls_func(L, "getGroundAnchorA", _olua_fun_b2PulleyJoint_getGroundAnchorA); + oluacls_func(L, "getGroundAnchorB", _olua_fun_b2PulleyJoint_getGroundAnchorB); + oluacls_func(L, "getLengthA", _olua_fun_b2PulleyJoint_getLengthA); + oluacls_func(L, "getLengthB", _olua_fun_b2PulleyJoint_getLengthB); + oluacls_func(L, "getRatio", _olua_fun_b2PulleyJoint_getRatio); + oluacls_prop(L, "currentLengthA", _olua_fun_b2PulleyJoint_getCurrentLengthA, nullptr); + oluacls_prop(L, "currentLengthB", _olua_fun_b2PulleyJoint_getCurrentLengthB, nullptr); + oluacls_prop(L, "groundAnchorA", _olua_fun_b2PulleyJoint_getGroundAnchorA, nullptr); + oluacls_prop(L, "groundAnchorB", _olua_fun_b2PulleyJoint_getGroundAnchorB, nullptr); + oluacls_prop(L, "lengthA", _olua_fun_b2PulleyJoint_getLengthA, nullptr); + oluacls_prop(L, "lengthB", _olua_fun_b2PulleyJoint_getLengthB, nullptr); + oluacls_prop(L, "ratio", _olua_fun_b2PulleyJoint_getRatio, nullptr); return 1; } -OLUA_END_DECLS - -static int _b2RevoluteJointDef_Initialize(lua_State *L) -{ - olua_startinvoke(L); - - b2RevoluteJointDef *self = nullptr; - b2Body *arg1 = nullptr; /** bodyA */ - b2Body *arg2 = nullptr; /** bodyB */ - b2Vec2 arg3; /** anchor */ - - olua_to_object(L, 1, &self, "b2.RevoluteJointDef"); - olua_check_object(L, 2, &arg1, "b2.Body"); - olua_check_object(L, 3, &arg2, "b2.Body"); - olua_check_object(L, 4, &arg3, "b2.Vec2"); - - // void Initialize(b2Body *bodyA, b2Body *bodyB, const b2Vec2 &anchor) - self->Initialize(arg1, arg2, arg3); - - olua_endinvoke(L); - - return 0; -} -static int _b2RevoluteJointDef_new(lua_State *L) +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_b2_PulleyJoint(lua_State *L) { - olua_startinvoke(L); - - // b2RevoluteJointDef() - b2RevoluteJointDef *ret = new b2RevoluteJointDef(); - int num_ret = olua_push_object(L, ret, "b2.RevoluteJointDef"); - olua_postnew(L, ret); - - olua_endinvoke(L); - - return num_ret; + olua_require(L, "box2d", luaopen_box2d); + if (!olua_getclass(L, "b2.PulleyJoint")) { + luaL_error(L, "class not found: b2PulleyJoint"); + } + return 1; } +OLUA_END_DECLS -static int _b2RevoluteJointDef_get_enableLimit(lua_State *L) +static int _olua_fun_b2RevoluteJointDef_enableLimit$1(lua_State *L) { olua_startinvoke(L); @@ -11486,7 +13648,7 @@ static int _b2RevoluteJointDef_get_enableLimit(lua_State *L) return num_ret; } -static int _b2RevoluteJointDef_set_enableLimit(lua_State *L) +static int _olua_fun_b2RevoluteJointDef_enableLimit$2(lua_State *L) { olua_startinvoke(L); @@ -11504,7 +13666,28 @@ static int _b2RevoluteJointDef_set_enableLimit(lua_State *L) return 0; } -static int _b2RevoluteJointDef_get_enableMotor(lua_State *L) +static int _olua_fun_b2RevoluteJointDef_enableLimit(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // bool enableLimit + return _olua_fun_b2RevoluteJointDef_enableLimit$1(L); + } + + if (num_args == 1) { + // if ((olua_is_bool(L, 2))) { + // bool enableLimit + return _olua_fun_b2RevoluteJointDef_enableLimit$2(L); + // } + } + + luaL_error(L, "method 'b2RevoluteJointDef::enableLimit' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_b2RevoluteJointDef_enableMotor$1(lua_State *L) { olua_startinvoke(L); @@ -11521,7 +13704,7 @@ static int _b2RevoluteJointDef_get_enableMotor(lua_State *L) return num_ret; } -static int _b2RevoluteJointDef_set_enableMotor(lua_State *L) +static int _olua_fun_b2RevoluteJointDef_enableMotor$2(lua_State *L) { olua_startinvoke(L); @@ -11539,7 +13722,50 @@ static int _b2RevoluteJointDef_set_enableMotor(lua_State *L) return 0; } -static int _b2RevoluteJointDef_get_localAnchorA(lua_State *L) +static int _olua_fun_b2RevoluteJointDef_enableMotor(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // bool enableMotor + return _olua_fun_b2RevoluteJointDef_enableMotor$1(L); + } + + if (num_args == 1) { + // if ((olua_is_bool(L, 2))) { + // bool enableMotor + return _olua_fun_b2RevoluteJointDef_enableMotor$2(L); + // } + } + + luaL_error(L, "method 'b2RevoluteJointDef::enableMotor' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_b2RevoluteJointDef_initialize(lua_State *L) +{ + olua_startinvoke(L); + + b2RevoluteJointDef *self = nullptr; + b2Body *arg1 = nullptr; /** bodyA */ + b2Body *arg2 = nullptr; /** bodyB */ + b2Vec2 *arg3; /** anchor */ + + olua_to_object(L, 1, &self, "b2.RevoluteJointDef"); + olua_check_object(L, 2, &arg1, "b2.Body"); + olua_check_object(L, 3, &arg2, "b2.Body"); + olua_check_object(L, 4, &arg3, "b2.Vec2"); + + // void Initialize(b2Body *bodyA, b2Body *bodyB, const b2Vec2 &anchor) + self->Initialize(arg1, arg2, *arg3); + + olua_endinvoke(L); + + return 0; +} + +static int _olua_fun_b2RevoluteJointDef_localAnchorA$1(lua_State *L) { olua_startinvoke(L); @@ -11549,32 +13775,53 @@ static int _b2RevoluteJointDef_get_localAnchorA(lua_State *L) // b2Vec2 localAnchorA b2Vec2 &ret = self->localAnchorA; - int num_ret = olua_pushcopy_object(L, ret, "b2.Vec2"); + int num_ret = olua_copy_object(L, ret, "b2.Vec2"); olua_endinvoke(L); return num_ret; } -static int _b2RevoluteJointDef_set_localAnchorA(lua_State *L) +static int _olua_fun_b2RevoluteJointDef_localAnchorA$2(lua_State *L) { olua_startinvoke(L); b2RevoluteJointDef *self = nullptr; - b2Vec2 arg1; /** localAnchorA */ + b2Vec2 *arg1; /** localAnchorA */ olua_to_object(L, 1, &self, "b2.RevoluteJointDef"); olua_check_object(L, 2, &arg1, "b2.Vec2"); // b2Vec2 localAnchorA - self->localAnchorA = arg1; + self->localAnchorA = *arg1; olua_endinvoke(L); return 0; } -static int _b2RevoluteJointDef_get_localAnchorB(lua_State *L) +static int _olua_fun_b2RevoluteJointDef_localAnchorA(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // b2Vec2 localAnchorA + return _olua_fun_b2RevoluteJointDef_localAnchorA$1(L); + } + + if (num_args == 1) { + // if ((olua_is_object(L, 2, "b2.Vec2"))) { + // b2Vec2 localAnchorA + return _olua_fun_b2RevoluteJointDef_localAnchorA$2(L); + // } + } + + luaL_error(L, "method 'b2RevoluteJointDef::localAnchorA' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_b2RevoluteJointDef_localAnchorB$1(lua_State *L) { olua_startinvoke(L); @@ -11584,32 +13831,53 @@ static int _b2RevoluteJointDef_get_localAnchorB(lua_State *L) // b2Vec2 localAnchorB b2Vec2 &ret = self->localAnchorB; - int num_ret = olua_pushcopy_object(L, ret, "b2.Vec2"); + int num_ret = olua_copy_object(L, ret, "b2.Vec2"); olua_endinvoke(L); return num_ret; } -static int _b2RevoluteJointDef_set_localAnchorB(lua_State *L) +static int _olua_fun_b2RevoluteJointDef_localAnchorB$2(lua_State *L) { olua_startinvoke(L); b2RevoluteJointDef *self = nullptr; - b2Vec2 arg1; /** localAnchorB */ + b2Vec2 *arg1; /** localAnchorB */ olua_to_object(L, 1, &self, "b2.RevoluteJointDef"); olua_check_object(L, 2, &arg1, "b2.Vec2"); // b2Vec2 localAnchorB - self->localAnchorB = arg1; + self->localAnchorB = *arg1; olua_endinvoke(L); return 0; } -static int _b2RevoluteJointDef_get_lowerAngle(lua_State *L) +static int _olua_fun_b2RevoluteJointDef_localAnchorB(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // b2Vec2 localAnchorB + return _olua_fun_b2RevoluteJointDef_localAnchorB$1(L); + } + + if (num_args == 1) { + // if ((olua_is_object(L, 2, "b2.Vec2"))) { + // b2Vec2 localAnchorB + return _olua_fun_b2RevoluteJointDef_localAnchorB$2(L); + // } + } + + luaL_error(L, "method 'b2RevoluteJointDef::localAnchorB' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_b2RevoluteJointDef_lowerAngle$1(lua_State *L) { olua_startinvoke(L); @@ -11626,7 +13894,7 @@ static int _b2RevoluteJointDef_get_lowerAngle(lua_State *L) return num_ret; } -static int _b2RevoluteJointDef_set_lowerAngle(lua_State *L) +static int _olua_fun_b2RevoluteJointDef_lowerAngle$2(lua_State *L) { olua_startinvoke(L); @@ -11644,7 +13912,28 @@ static int _b2RevoluteJointDef_set_lowerAngle(lua_State *L) return 0; } -static int _b2RevoluteJointDef_get_maxMotorTorque(lua_State *L) +static int _olua_fun_b2RevoluteJointDef_lowerAngle(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float lowerAngle + return _olua_fun_b2RevoluteJointDef_lowerAngle$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float lowerAngle + return _olua_fun_b2RevoluteJointDef_lowerAngle$2(L); + // } + } + + luaL_error(L, "method 'b2RevoluteJointDef::lowerAngle' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_b2RevoluteJointDef_maxMotorTorque$1(lua_State *L) { olua_startinvoke(L); @@ -11661,7 +13950,7 @@ static int _b2RevoluteJointDef_get_maxMotorTorque(lua_State *L) return num_ret; } -static int _b2RevoluteJointDef_set_maxMotorTorque(lua_State *L) +static int _olua_fun_b2RevoluteJointDef_maxMotorTorque$2(lua_State *L) { olua_startinvoke(L); @@ -11679,7 +13968,28 @@ static int _b2RevoluteJointDef_set_maxMotorTorque(lua_State *L) return 0; } -static int _b2RevoluteJointDef_get_motorSpeed(lua_State *L) +static int _olua_fun_b2RevoluteJointDef_maxMotorTorque(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float maxMotorTorque + return _olua_fun_b2RevoluteJointDef_maxMotorTorque$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float maxMotorTorque + return _olua_fun_b2RevoluteJointDef_maxMotorTorque$2(L); + // } + } + + luaL_error(L, "method 'b2RevoluteJointDef::maxMotorTorque' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_b2RevoluteJointDef_motorSpeed$1(lua_State *L) { olua_startinvoke(L); @@ -11696,7 +14006,7 @@ static int _b2RevoluteJointDef_get_motorSpeed(lua_State *L) return num_ret; } -static int _b2RevoluteJointDef_set_motorSpeed(lua_State *L) +static int _olua_fun_b2RevoluteJointDef_motorSpeed$2(lua_State *L) { olua_startinvoke(L); @@ -11714,7 +14024,42 @@ static int _b2RevoluteJointDef_set_motorSpeed(lua_State *L) return 0; } -static int _b2RevoluteJointDef_get_referenceAngle(lua_State *L) +static int _olua_fun_b2RevoluteJointDef_motorSpeed(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float motorSpeed + return _olua_fun_b2RevoluteJointDef_motorSpeed$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float motorSpeed + return _olua_fun_b2RevoluteJointDef_motorSpeed$2(L); + // } + } + + luaL_error(L, "method 'b2RevoluteJointDef::motorSpeed' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_b2RevoluteJointDef_new(lua_State *L) +{ + olua_startinvoke(L); + + // b2RevoluteJointDef() + b2RevoluteJointDef *ret = new b2RevoluteJointDef(); + int num_ret = olua_push_object(L, ret, "b2.RevoluteJointDef"); + olua_postnew(L, ret); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_b2RevoluteJointDef_referenceAngle$1(lua_State *L) { olua_startinvoke(L); @@ -11731,7 +14076,7 @@ static int _b2RevoluteJointDef_get_referenceAngle(lua_State *L) return num_ret; } -static int _b2RevoluteJointDef_set_referenceAngle(lua_State *L) +static int _olua_fun_b2RevoluteJointDef_referenceAngle$2(lua_State *L) { olua_startinvoke(L); @@ -11749,7 +14094,28 @@ static int _b2RevoluteJointDef_set_referenceAngle(lua_State *L) return 0; } -static int _b2RevoluteJointDef_get_upperAngle(lua_State *L) +static int _olua_fun_b2RevoluteJointDef_referenceAngle(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float referenceAngle + return _olua_fun_b2RevoluteJointDef_referenceAngle$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float referenceAngle + return _olua_fun_b2RevoluteJointDef_referenceAngle$2(L); + // } + } + + luaL_error(L, "method 'b2RevoluteJointDef::referenceAngle' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_b2RevoluteJointDef_upperAngle$1(lua_State *L) { olua_startinvoke(L); @@ -11766,7 +14132,7 @@ static int _b2RevoluteJointDef_get_upperAngle(lua_State *L) return num_ret; } -static int _b2RevoluteJointDef_set_upperAngle(lua_State *L) +static int _olua_fun_b2RevoluteJointDef_upperAngle$2(lua_State *L) { olua_startinvoke(L); @@ -11784,27 +14150,57 @@ static int _b2RevoluteJointDef_set_upperAngle(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_b2RevoluteJointDef(lua_State *L) +static int _olua_fun_b2RevoluteJointDef_upperAngle(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float upperAngle + return _olua_fun_b2RevoluteJointDef_upperAngle$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float upperAngle + return _olua_fun_b2RevoluteJointDef_upperAngle$2(L); + // } + } + + luaL_error(L, "method 'b2RevoluteJointDef::upperAngle' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_cls_b2_RevoluteJointDef(lua_State *L) { oluacls_class(L, "b2.RevoluteJointDef"); - oluacls_func(L, "initialize", _b2RevoluteJointDef_Initialize); - oluacls_func(L, "new", _b2RevoluteJointDef_new); - oluacls_prop(L, "enableLimit", _b2RevoluteJointDef_get_enableLimit, _b2RevoluteJointDef_set_enableLimit); - oluacls_prop(L, "enableMotor", _b2RevoluteJointDef_get_enableMotor, _b2RevoluteJointDef_set_enableMotor); - oluacls_prop(L, "localAnchorA", _b2RevoluteJointDef_get_localAnchorA, _b2RevoluteJointDef_set_localAnchorA); - oluacls_prop(L, "localAnchorB", _b2RevoluteJointDef_get_localAnchorB, _b2RevoluteJointDef_set_localAnchorB); - oluacls_prop(L, "lowerAngle", _b2RevoluteJointDef_get_lowerAngle, _b2RevoluteJointDef_set_lowerAngle); - oluacls_prop(L, "maxMotorTorque", _b2RevoluteJointDef_get_maxMotorTorque, _b2RevoluteJointDef_set_maxMotorTorque); - oluacls_prop(L, "motorSpeed", _b2RevoluteJointDef_get_motorSpeed, _b2RevoluteJointDef_set_motorSpeed); - oluacls_prop(L, "referenceAngle", _b2RevoluteJointDef_get_referenceAngle, _b2RevoluteJointDef_set_referenceAngle); - oluacls_prop(L, "upperAngle", _b2RevoluteJointDef_get_upperAngle, _b2RevoluteJointDef_set_upperAngle); + oluacls_func(L, "initialize", _olua_fun_b2RevoluteJointDef_initialize); + oluacls_func(L, "new", _olua_fun_b2RevoluteJointDef_new); + oluacls_prop(L, "enableLimit", _olua_fun_b2RevoluteJointDef_enableLimit, _olua_fun_b2RevoluteJointDef_enableLimit); + oluacls_prop(L, "enableMotor", _olua_fun_b2RevoluteJointDef_enableMotor, _olua_fun_b2RevoluteJointDef_enableMotor); + oluacls_prop(L, "localAnchorA", _olua_fun_b2RevoluteJointDef_localAnchorA, _olua_fun_b2RevoluteJointDef_localAnchorA); + oluacls_prop(L, "localAnchorB", _olua_fun_b2RevoluteJointDef_localAnchorB, _olua_fun_b2RevoluteJointDef_localAnchorB); + oluacls_prop(L, "lowerAngle", _olua_fun_b2RevoluteJointDef_lowerAngle, _olua_fun_b2RevoluteJointDef_lowerAngle); + oluacls_prop(L, "maxMotorTorque", _olua_fun_b2RevoluteJointDef_maxMotorTorque, _olua_fun_b2RevoluteJointDef_maxMotorTorque); + oluacls_prop(L, "motorSpeed", _olua_fun_b2RevoluteJointDef_motorSpeed, _olua_fun_b2RevoluteJointDef_motorSpeed); + oluacls_prop(L, "referenceAngle", _olua_fun_b2RevoluteJointDef_referenceAngle, _olua_fun_b2RevoluteJointDef_referenceAngle); + oluacls_prop(L, "upperAngle", _olua_fun_b2RevoluteJointDef_upperAngle, _olua_fun_b2RevoluteJointDef_upperAngle); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_b2_RevoluteJointDef(lua_State *L) +{ + olua_require(L, "box2d", luaopen_box2d); + if (!olua_getclass(L, "b2.RevoluteJointDef")) { + luaL_error(L, "class not found: b2RevoluteJointDef"); + } return 1; } OLUA_END_DECLS -static int _b2RevoluteJoint___gc(lua_State *L) +static int _olua_fun_b2RevoluteJoint___gc(lua_State *L) { olua_startinvoke(L); @@ -11816,7 +14212,7 @@ static int _b2RevoluteJoint___gc(lua_State *L) return 0; } -static int _b2RevoluteJoint_EnableLimit(lua_State *L) +static int _olua_fun_b2RevoluteJoint_enableLimit(lua_State *L) { olua_startinvoke(L); @@ -11834,7 +14230,7 @@ static int _b2RevoluteJoint_EnableLimit(lua_State *L) return 0; } -static int _b2RevoluteJoint_EnableMotor(lua_State *L) +static int _olua_fun_b2RevoluteJoint_enableMotor(lua_State *L) { olua_startinvoke(L); @@ -11852,7 +14248,7 @@ static int _b2RevoluteJoint_EnableMotor(lua_State *L) return 0; } -static int _b2RevoluteJoint_GetJointAngle(lua_State *L) +static int _olua_fun_b2RevoluteJoint_getJointAngle(lua_State *L) { olua_startinvoke(L); @@ -11869,7 +14265,7 @@ static int _b2RevoluteJoint_GetJointAngle(lua_State *L) return num_ret; } -static int _b2RevoluteJoint_GetJointSpeed(lua_State *L) +static int _olua_fun_b2RevoluteJoint_getJointSpeed(lua_State *L) { olua_startinvoke(L); @@ -11886,7 +14282,7 @@ static int _b2RevoluteJoint_GetJointSpeed(lua_State *L) return num_ret; } -static int _b2RevoluteJoint_GetLocalAnchorA(lua_State *L) +static int _olua_fun_b2RevoluteJoint_getLocalAnchorA(lua_State *L) { olua_startinvoke(L); @@ -11903,7 +14299,7 @@ static int _b2RevoluteJoint_GetLocalAnchorA(lua_State *L) return num_ret; } -static int _b2RevoluteJoint_GetLocalAnchorB(lua_State *L) +static int _olua_fun_b2RevoluteJoint_getLocalAnchorB(lua_State *L) { olua_startinvoke(L); @@ -11920,7 +14316,7 @@ static int _b2RevoluteJoint_GetLocalAnchorB(lua_State *L) return num_ret; } -static int _b2RevoluteJoint_GetLowerLimit(lua_State *L) +static int _olua_fun_b2RevoluteJoint_getLowerLimit(lua_State *L) { olua_startinvoke(L); @@ -11937,7 +14333,7 @@ static int _b2RevoluteJoint_GetLowerLimit(lua_State *L) return num_ret; } -static int _b2RevoluteJoint_GetMaxMotorTorque(lua_State *L) +static int _olua_fun_b2RevoluteJoint_getMaxMotorTorque(lua_State *L) { olua_startinvoke(L); @@ -11954,7 +14350,7 @@ static int _b2RevoluteJoint_GetMaxMotorTorque(lua_State *L) return num_ret; } -static int _b2RevoluteJoint_GetMotorSpeed(lua_State *L) +static int _olua_fun_b2RevoluteJoint_getMotorSpeed(lua_State *L) { olua_startinvoke(L); @@ -11971,7 +14367,7 @@ static int _b2RevoluteJoint_GetMotorSpeed(lua_State *L) return num_ret; } -static int _b2RevoluteJoint_GetMotorTorque(lua_State *L) +static int _olua_fun_b2RevoluteJoint_getMotorTorque(lua_State *L) { olua_startinvoke(L); @@ -11990,7 +14386,7 @@ static int _b2RevoluteJoint_GetMotorTorque(lua_State *L) return num_ret; } -static int _b2RevoluteJoint_GetReferenceAngle(lua_State *L) +static int _olua_fun_b2RevoluteJoint_getReferenceAngle(lua_State *L) { olua_startinvoke(L); @@ -12007,7 +14403,7 @@ static int _b2RevoluteJoint_GetReferenceAngle(lua_State *L) return num_ret; } -static int _b2RevoluteJoint_GetUpperLimit(lua_State *L) +static int _olua_fun_b2RevoluteJoint_getUpperLimit(lua_State *L) { olua_startinvoke(L); @@ -12024,7 +14420,7 @@ static int _b2RevoluteJoint_GetUpperLimit(lua_State *L) return num_ret; } -static int _b2RevoluteJoint_IsLimitEnabled(lua_State *L) +static int _olua_fun_b2RevoluteJoint_isLimitEnabled(lua_State *L) { olua_startinvoke(L); @@ -12041,7 +14437,7 @@ static int _b2RevoluteJoint_IsLimitEnabled(lua_State *L) return num_ret; } -static int _b2RevoluteJoint_IsMotorEnabled(lua_State *L) +static int _olua_fun_b2RevoluteJoint_isMotorEnabled(lua_State *L) { olua_startinvoke(L); @@ -12058,7 +14454,7 @@ static int _b2RevoluteJoint_IsMotorEnabled(lua_State *L) return num_ret; } -static int _b2RevoluteJoint_SetLimits(lua_State *L) +static int _olua_fun_b2RevoluteJoint_setLimits(lua_State *L) { olua_startinvoke(L); @@ -12078,7 +14474,7 @@ static int _b2RevoluteJoint_SetLimits(lua_State *L) return 0; } -static int _b2RevoluteJoint_SetMaxMotorTorque(lua_State *L) +static int _olua_fun_b2RevoluteJoint_setMaxMotorTorque(lua_State *L) { olua_startinvoke(L); @@ -12096,7 +14492,7 @@ static int _b2RevoluteJoint_SetMaxMotorTorque(lua_State *L) return 0; } -static int _b2RevoluteJoint_SetMotorSpeed(lua_State *L) +static int _olua_fun_b2RevoluteJoint_setMotorSpeed(lua_State *L) { olua_startinvoke(L); @@ -12114,116 +14510,132 @@ static int _b2RevoluteJoint_SetMotorSpeed(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_b2RevoluteJoint(lua_State *L) +static int _olua_cls_b2_RevoluteJoint(lua_State *L) { oluacls_class(L, "b2.RevoluteJoint"); - oluacls_func(L, "__gc", _b2RevoluteJoint___gc); - oluacls_func(L, "enableLimit", _b2RevoluteJoint_EnableLimit); - oluacls_func(L, "enableMotor", _b2RevoluteJoint_EnableMotor); - oluacls_func(L, "getJointAngle", _b2RevoluteJoint_GetJointAngle); - oluacls_func(L, "getJointSpeed", _b2RevoluteJoint_GetJointSpeed); - oluacls_func(L, "getLocalAnchorA", _b2RevoluteJoint_GetLocalAnchorA); - oluacls_func(L, "getLocalAnchorB", _b2RevoluteJoint_GetLocalAnchorB); - oluacls_func(L, "getLowerLimit", _b2RevoluteJoint_GetLowerLimit); - oluacls_func(L, "getMaxMotorTorque", _b2RevoluteJoint_GetMaxMotorTorque); - oluacls_func(L, "getMotorSpeed", _b2RevoluteJoint_GetMotorSpeed); - oluacls_func(L, "getMotorTorque", _b2RevoluteJoint_GetMotorTorque); - oluacls_func(L, "getReferenceAngle", _b2RevoluteJoint_GetReferenceAngle); - oluacls_func(L, "getUpperLimit", _b2RevoluteJoint_GetUpperLimit); - oluacls_func(L, "isLimitEnabled", _b2RevoluteJoint_IsLimitEnabled); - oluacls_func(L, "isMotorEnabled", _b2RevoluteJoint_IsMotorEnabled); - oluacls_func(L, "setLimits", _b2RevoluteJoint_SetLimits); - oluacls_func(L, "setMaxMotorTorque", _b2RevoluteJoint_SetMaxMotorTorque); - oluacls_func(L, "setMotorSpeed", _b2RevoluteJoint_SetMotorSpeed); - oluacls_prop(L, "jointAngle", _b2RevoluteJoint_GetJointAngle, nullptr); - oluacls_prop(L, "jointSpeed", _b2RevoluteJoint_GetJointSpeed, nullptr); - oluacls_prop(L, "limitEnabled", _b2RevoluteJoint_IsLimitEnabled, nullptr); - oluacls_prop(L, "localAnchorA", _b2RevoluteJoint_GetLocalAnchorA, nullptr); - oluacls_prop(L, "localAnchorB", _b2RevoluteJoint_GetLocalAnchorB, nullptr); - oluacls_prop(L, "lowerLimit", _b2RevoluteJoint_GetLowerLimit, nullptr); - oluacls_prop(L, "maxMotorTorque", _b2RevoluteJoint_GetMaxMotorTorque, _b2RevoluteJoint_SetMaxMotorTorque); - oluacls_prop(L, "motorEnabled", _b2RevoluteJoint_IsMotorEnabled, nullptr); - oluacls_prop(L, "motorSpeed", _b2RevoluteJoint_GetMotorSpeed, _b2RevoluteJoint_SetMotorSpeed); - oluacls_prop(L, "referenceAngle", _b2RevoluteJoint_GetReferenceAngle, nullptr); - oluacls_prop(L, "upperLimit", _b2RevoluteJoint_GetUpperLimit, nullptr); + oluacls_func(L, "__gc", _olua_fun_b2RevoluteJoint___gc); + oluacls_func(L, "enableLimit", _olua_fun_b2RevoluteJoint_enableLimit); + oluacls_func(L, "enableMotor", _olua_fun_b2RevoluteJoint_enableMotor); + oluacls_func(L, "getJointAngle", _olua_fun_b2RevoluteJoint_getJointAngle); + oluacls_func(L, "getJointSpeed", _olua_fun_b2RevoluteJoint_getJointSpeed); + oluacls_func(L, "getLocalAnchorA", _olua_fun_b2RevoluteJoint_getLocalAnchorA); + oluacls_func(L, "getLocalAnchorB", _olua_fun_b2RevoluteJoint_getLocalAnchorB); + oluacls_func(L, "getLowerLimit", _olua_fun_b2RevoluteJoint_getLowerLimit); + oluacls_func(L, "getMaxMotorTorque", _olua_fun_b2RevoluteJoint_getMaxMotorTorque); + oluacls_func(L, "getMotorSpeed", _olua_fun_b2RevoluteJoint_getMotorSpeed); + oluacls_func(L, "getMotorTorque", _olua_fun_b2RevoluteJoint_getMotorTorque); + oluacls_func(L, "getReferenceAngle", _olua_fun_b2RevoluteJoint_getReferenceAngle); + oluacls_func(L, "getUpperLimit", _olua_fun_b2RevoluteJoint_getUpperLimit); + oluacls_func(L, "isLimitEnabled", _olua_fun_b2RevoluteJoint_isLimitEnabled); + oluacls_func(L, "isMotorEnabled", _olua_fun_b2RevoluteJoint_isMotorEnabled); + oluacls_func(L, "setLimits", _olua_fun_b2RevoluteJoint_setLimits); + oluacls_func(L, "setMaxMotorTorque", _olua_fun_b2RevoluteJoint_setMaxMotorTorque); + oluacls_func(L, "setMotorSpeed", _olua_fun_b2RevoluteJoint_setMotorSpeed); + oluacls_prop(L, "jointAngle", _olua_fun_b2RevoluteJoint_getJointAngle, nullptr); + oluacls_prop(L, "jointSpeed", _olua_fun_b2RevoluteJoint_getJointSpeed, nullptr); + oluacls_prop(L, "limitEnabled", _olua_fun_b2RevoluteJoint_isLimitEnabled, nullptr); + oluacls_prop(L, "localAnchorA", _olua_fun_b2RevoluteJoint_getLocalAnchorA, nullptr); + oluacls_prop(L, "localAnchorB", _olua_fun_b2RevoluteJoint_getLocalAnchorB, nullptr); + oluacls_prop(L, "lowerLimit", _olua_fun_b2RevoluteJoint_getLowerLimit, nullptr); + oluacls_prop(L, "maxMotorTorque", _olua_fun_b2RevoluteJoint_getMaxMotorTorque, _olua_fun_b2RevoluteJoint_setMaxMotorTorque); + oluacls_prop(L, "motorEnabled", _olua_fun_b2RevoluteJoint_isMotorEnabled, nullptr); + oluacls_prop(L, "motorSpeed", _olua_fun_b2RevoluteJoint_getMotorSpeed, _olua_fun_b2RevoluteJoint_setMotorSpeed); + oluacls_prop(L, "referenceAngle", _olua_fun_b2RevoluteJoint_getReferenceAngle, nullptr); + oluacls_prop(L, "upperLimit", _olua_fun_b2RevoluteJoint_getUpperLimit, nullptr); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_b2_RevoluteJoint(lua_State *L) +{ + olua_require(L, "box2d", luaopen_box2d); + if (!olua_getclass(L, "b2.RevoluteJoint")) { + luaL_error(L, "class not found: b2RevoluteJoint"); + } return 1; } OLUA_END_DECLS -static int _b2WeldJointDef_Initialize(lua_State *L) +static int _olua_fun_b2WeldJointDef_damping$1(lua_State *L) { olua_startinvoke(L); b2WeldJointDef *self = nullptr; - b2Body *arg1 = nullptr; /** bodyA */ - b2Body *arg2 = nullptr; /** bodyB */ - b2Vec2 arg3; /** anchor */ olua_to_object(L, 1, &self, "b2.WeldJointDef"); - olua_check_object(L, 2, &arg1, "b2.Body"); - olua_check_object(L, 3, &arg2, "b2.Body"); - olua_check_object(L, 4, &arg3, "b2.Vec2"); - // void Initialize(b2Body *bodyA, b2Body *bodyB, const b2Vec2 &anchor) - self->Initialize(arg1, arg2, arg3); + // float damping + float ret = self->damping; + int num_ret = olua_push_number(L, ret); olua_endinvoke(L); - return 0; + return num_ret; } -static int _b2WeldJointDef_new(lua_State *L) +static int _olua_fun_b2WeldJointDef_damping$2(lua_State *L) { olua_startinvoke(L); - // b2WeldJointDef() - b2WeldJointDef *ret = new b2WeldJointDef(); - int num_ret = olua_push_object(L, ret, "b2.WeldJointDef"); - olua_postnew(L, ret); + b2WeldJointDef *self = nullptr; + float arg1 = 0; /** damping */ + + olua_to_object(L, 1, &self, "b2.WeldJointDef"); + olua_check_number(L, 2, &arg1); + + // float damping + self->damping = arg1; olua_endinvoke(L); - return num_ret; + return 0; } -static int _b2WeldJointDef_get_damping(lua_State *L) +static int _olua_fun_b2WeldJointDef_damping(lua_State *L) { - olua_startinvoke(L); - - b2WeldJointDef *self = nullptr; + int num_args = lua_gettop(L) - 1; - olua_to_object(L, 1, &self, "b2.WeldJointDef"); + if (num_args == 0) { + // float damping + return _olua_fun_b2WeldJointDef_damping$1(L); + } - // float damping - float ret = self->damping; - int num_ret = olua_push_number(L, ret); + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float damping + return _olua_fun_b2WeldJointDef_damping$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'b2WeldJointDef::damping' not support '%d' arguments", num_args); - return num_ret; + return 0; } -static int _b2WeldJointDef_set_damping(lua_State *L) +static int _olua_fun_b2WeldJointDef_initialize(lua_State *L) { olua_startinvoke(L); b2WeldJointDef *self = nullptr; - float arg1 = 0; /** damping */ + b2Body *arg1 = nullptr; /** bodyA */ + b2Body *arg2 = nullptr; /** bodyB */ + b2Vec2 *arg3; /** anchor */ olua_to_object(L, 1, &self, "b2.WeldJointDef"); - olua_check_number(L, 2, &arg1); + olua_check_object(L, 2, &arg1, "b2.Body"); + olua_check_object(L, 3, &arg2, "b2.Body"); + olua_check_object(L, 4, &arg3, "b2.Vec2"); - // float damping - self->damping = arg1; + // void Initialize(b2Body *bodyA, b2Body *bodyB, const b2Vec2 &anchor) + self->Initialize(arg1, arg2, *arg3); olua_endinvoke(L); return 0; } -static int _b2WeldJointDef_get_localAnchorA(lua_State *L) +static int _olua_fun_b2WeldJointDef_localAnchorA$1(lua_State *L) { olua_startinvoke(L); @@ -12233,32 +14645,53 @@ static int _b2WeldJointDef_get_localAnchorA(lua_State *L) // b2Vec2 localAnchorA b2Vec2 &ret = self->localAnchorA; - int num_ret = olua_pushcopy_object(L, ret, "b2.Vec2"); + int num_ret = olua_copy_object(L, ret, "b2.Vec2"); olua_endinvoke(L); return num_ret; } -static int _b2WeldJointDef_set_localAnchorA(lua_State *L) +static int _olua_fun_b2WeldJointDef_localAnchorA$2(lua_State *L) { olua_startinvoke(L); b2WeldJointDef *self = nullptr; - b2Vec2 arg1; /** localAnchorA */ + b2Vec2 *arg1; /** localAnchorA */ olua_to_object(L, 1, &self, "b2.WeldJointDef"); olua_check_object(L, 2, &arg1, "b2.Vec2"); // b2Vec2 localAnchorA - self->localAnchorA = arg1; + self->localAnchorA = *arg1; olua_endinvoke(L); return 0; } -static int _b2WeldJointDef_get_localAnchorB(lua_State *L) +static int _olua_fun_b2WeldJointDef_localAnchorA(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // b2Vec2 localAnchorA + return _olua_fun_b2WeldJointDef_localAnchorA$1(L); + } + + if (num_args == 1) { + // if ((olua_is_object(L, 2, "b2.Vec2"))) { + // b2Vec2 localAnchorA + return _olua_fun_b2WeldJointDef_localAnchorA$2(L); + // } + } + + luaL_error(L, "method 'b2WeldJointDef::localAnchorA' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_b2WeldJointDef_localAnchorB$1(lua_State *L) { olua_startinvoke(L); @@ -12268,32 +14701,67 @@ static int _b2WeldJointDef_get_localAnchorB(lua_State *L) // b2Vec2 localAnchorB b2Vec2 &ret = self->localAnchorB; - int num_ret = olua_pushcopy_object(L, ret, "b2.Vec2"); + int num_ret = olua_copy_object(L, ret, "b2.Vec2"); olua_endinvoke(L); return num_ret; } -static int _b2WeldJointDef_set_localAnchorB(lua_State *L) +static int _olua_fun_b2WeldJointDef_localAnchorB$2(lua_State *L) { olua_startinvoke(L); b2WeldJointDef *self = nullptr; - b2Vec2 arg1; /** localAnchorB */ + b2Vec2 *arg1; /** localAnchorB */ olua_to_object(L, 1, &self, "b2.WeldJointDef"); olua_check_object(L, 2, &arg1, "b2.Vec2"); // b2Vec2 localAnchorB - self->localAnchorB = arg1; + self->localAnchorB = *arg1; olua_endinvoke(L); return 0; } -static int _b2WeldJointDef_get_referenceAngle(lua_State *L) +static int _olua_fun_b2WeldJointDef_localAnchorB(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // b2Vec2 localAnchorB + return _olua_fun_b2WeldJointDef_localAnchorB$1(L); + } + + if (num_args == 1) { + // if ((olua_is_object(L, 2, "b2.Vec2"))) { + // b2Vec2 localAnchorB + return _olua_fun_b2WeldJointDef_localAnchorB$2(L); + // } + } + + luaL_error(L, "method 'b2WeldJointDef::localAnchorB' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_b2WeldJointDef_new(lua_State *L) +{ + olua_startinvoke(L); + + // b2WeldJointDef() + b2WeldJointDef *ret = new b2WeldJointDef(); + int num_ret = olua_push_object(L, ret, "b2.WeldJointDef"); + olua_postnew(L, ret); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_b2WeldJointDef_referenceAngle$1(lua_State *L) { olua_startinvoke(L); @@ -12310,7 +14778,7 @@ static int _b2WeldJointDef_get_referenceAngle(lua_State *L) return num_ret; } -static int _b2WeldJointDef_set_referenceAngle(lua_State *L) +static int _olua_fun_b2WeldJointDef_referenceAngle$2(lua_State *L) { olua_startinvoke(L); @@ -12328,7 +14796,28 @@ static int _b2WeldJointDef_set_referenceAngle(lua_State *L) return 0; } -static int _b2WeldJointDef_get_stiffness(lua_State *L) +static int _olua_fun_b2WeldJointDef_referenceAngle(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float referenceAngle + return _olua_fun_b2WeldJointDef_referenceAngle$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float referenceAngle + return _olua_fun_b2WeldJointDef_referenceAngle$2(L); + // } + } + + luaL_error(L, "method 'b2WeldJointDef::referenceAngle' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_b2WeldJointDef_stiffness$1(lua_State *L) { olua_startinvoke(L); @@ -12345,7 +14834,7 @@ static int _b2WeldJointDef_get_stiffness(lua_State *L) return num_ret; } -static int _b2WeldJointDef_set_stiffness(lua_State *L) +static int _olua_fun_b2WeldJointDef_stiffness$2(lua_State *L) { olua_startinvoke(L); @@ -12363,23 +14852,53 @@ static int _b2WeldJointDef_set_stiffness(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_b2WeldJointDef(lua_State *L) +static int _olua_fun_b2WeldJointDef_stiffness(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float stiffness + return _olua_fun_b2WeldJointDef_stiffness$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float stiffness + return _olua_fun_b2WeldJointDef_stiffness$2(L); + // } + } + + luaL_error(L, "method 'b2WeldJointDef::stiffness' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_cls_b2_WeldJointDef(lua_State *L) { oluacls_class(L, "b2.WeldJointDef"); - oluacls_func(L, "initialize", _b2WeldJointDef_Initialize); - oluacls_func(L, "new", _b2WeldJointDef_new); - oluacls_prop(L, "damping", _b2WeldJointDef_get_damping, _b2WeldJointDef_set_damping); - oluacls_prop(L, "localAnchorA", _b2WeldJointDef_get_localAnchorA, _b2WeldJointDef_set_localAnchorA); - oluacls_prop(L, "localAnchorB", _b2WeldJointDef_get_localAnchorB, _b2WeldJointDef_set_localAnchorB); - oluacls_prop(L, "referenceAngle", _b2WeldJointDef_get_referenceAngle, _b2WeldJointDef_set_referenceAngle); - oluacls_prop(L, "stiffness", _b2WeldJointDef_get_stiffness, _b2WeldJointDef_set_stiffness); + oluacls_func(L, "initialize", _olua_fun_b2WeldJointDef_initialize); + oluacls_func(L, "new", _olua_fun_b2WeldJointDef_new); + oluacls_prop(L, "damping", _olua_fun_b2WeldJointDef_damping, _olua_fun_b2WeldJointDef_damping); + oluacls_prop(L, "localAnchorA", _olua_fun_b2WeldJointDef_localAnchorA, _olua_fun_b2WeldJointDef_localAnchorA); + oluacls_prop(L, "localAnchorB", _olua_fun_b2WeldJointDef_localAnchorB, _olua_fun_b2WeldJointDef_localAnchorB); + oluacls_prop(L, "referenceAngle", _olua_fun_b2WeldJointDef_referenceAngle, _olua_fun_b2WeldJointDef_referenceAngle); + oluacls_prop(L, "stiffness", _olua_fun_b2WeldJointDef_stiffness, _olua_fun_b2WeldJointDef_stiffness); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_b2_WeldJointDef(lua_State *L) +{ + olua_require(L, "box2d", luaopen_box2d); + if (!olua_getclass(L, "b2.WeldJointDef")) { + luaL_error(L, "class not found: b2WeldJointDef"); + } + return 1; +} OLUA_END_DECLS -static int _b2WeldJoint___gc(lua_State *L) +static int _olua_fun_b2WeldJoint___gc(lua_State *L) { olua_startinvoke(L); @@ -12391,7 +14910,7 @@ static int _b2WeldJoint___gc(lua_State *L) return 0; } -static int _b2WeldJoint_GetDamping(lua_State *L) +static int _olua_fun_b2WeldJoint_getDamping(lua_State *L) { olua_startinvoke(L); @@ -12408,7 +14927,7 @@ static int _b2WeldJoint_GetDamping(lua_State *L) return num_ret; } -static int _b2WeldJoint_GetLocalAnchorA(lua_State *L) +static int _olua_fun_b2WeldJoint_getLocalAnchorA(lua_State *L) { olua_startinvoke(L); @@ -12425,7 +14944,7 @@ static int _b2WeldJoint_GetLocalAnchorA(lua_State *L) return num_ret; } -static int _b2WeldJoint_GetLocalAnchorB(lua_State *L) +static int _olua_fun_b2WeldJoint_getLocalAnchorB(lua_State *L) { olua_startinvoke(L); @@ -12442,7 +14961,7 @@ static int _b2WeldJoint_GetLocalAnchorB(lua_State *L) return num_ret; } -static int _b2WeldJoint_GetReferenceAngle(lua_State *L) +static int _olua_fun_b2WeldJoint_getReferenceAngle(lua_State *L) { olua_startinvoke(L); @@ -12459,7 +14978,7 @@ static int _b2WeldJoint_GetReferenceAngle(lua_State *L) return num_ret; } -static int _b2WeldJoint_GetStiffness(lua_State *L) +static int _olua_fun_b2WeldJoint_getStiffness(lua_State *L) { olua_startinvoke(L); @@ -12476,7 +14995,7 @@ static int _b2WeldJoint_GetStiffness(lua_State *L) return num_ret; } -static int _b2WeldJoint_SetDamping(lua_State *L) +static int _olua_fun_b2WeldJoint_setDamping(lua_State *L) { olua_startinvoke(L); @@ -12486,93 +15005,64 @@ static int _b2WeldJoint_SetDamping(lua_State *L) olua_to_object(L, 1, &self, "b2.WeldJoint"); olua_check_number(L, 2, &arg1); - // void SetDamping(float damping) - self->SetDamping(arg1); - - olua_endinvoke(L); - - return 0; -} - -static int _b2WeldJoint_SetStiffness(lua_State *L) -{ - olua_startinvoke(L); - - b2WeldJoint *self = nullptr; - float arg1 = 0; /** stiffness */ - - olua_to_object(L, 1, &self, "b2.WeldJoint"); - olua_check_number(L, 2, &arg1); - - // void SetStiffness(float stiffness) - self->SetStiffness(arg1); - - olua_endinvoke(L); - - return 0; -} - -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_b2WeldJoint(lua_State *L) -{ - oluacls_class(L, "b2.WeldJoint"); - oluacls_func(L, "__gc", _b2WeldJoint___gc); - oluacls_func(L, "getDamping", _b2WeldJoint_GetDamping); - oluacls_func(L, "getLocalAnchorA", _b2WeldJoint_GetLocalAnchorA); - oluacls_func(L, "getLocalAnchorB", _b2WeldJoint_GetLocalAnchorB); - oluacls_func(L, "getReferenceAngle", _b2WeldJoint_GetReferenceAngle); - oluacls_func(L, "getStiffness", _b2WeldJoint_GetStiffness); - oluacls_func(L, "setDamping", _b2WeldJoint_SetDamping); - oluacls_func(L, "setStiffness", _b2WeldJoint_SetStiffness); - oluacls_prop(L, "damping", _b2WeldJoint_GetDamping, _b2WeldJoint_SetDamping); - oluacls_prop(L, "localAnchorA", _b2WeldJoint_GetLocalAnchorA, nullptr); - oluacls_prop(L, "localAnchorB", _b2WeldJoint_GetLocalAnchorB, nullptr); - oluacls_prop(L, "referenceAngle", _b2WeldJoint_GetReferenceAngle, nullptr); - oluacls_prop(L, "stiffness", _b2WeldJoint_GetStiffness, _b2WeldJoint_SetStiffness); - - return 1; -} -OLUA_END_DECLS - -static int _b2WheelJointDef_Initialize(lua_State *L) -{ - olua_startinvoke(L); - - b2WheelJointDef *self = nullptr; - b2Body *arg1 = nullptr; /** bodyA */ - b2Body *arg2 = nullptr; /** bodyB */ - b2Vec2 arg3; /** anchor */ - b2Vec2 arg4; /** axis */ - - olua_to_object(L, 1, &self, "b2.WheelJointDef"); - olua_check_object(L, 2, &arg1, "b2.Body"); - olua_check_object(L, 3, &arg2, "b2.Body"); - olua_check_object(L, 4, &arg3, "b2.Vec2"); - olua_check_object(L, 5, &arg4, "b2.Vec2"); - - // void Initialize(b2Body *bodyA, b2Body *bodyB, const b2Vec2 &anchor, const b2Vec2 &axis) - self->Initialize(arg1, arg2, arg3, arg4); + // void SetDamping(float damping) + self->SetDamping(arg1); olua_endinvoke(L); return 0; } -static int _b2WheelJointDef_new(lua_State *L) +static int _olua_fun_b2WeldJoint_setStiffness(lua_State *L) { olua_startinvoke(L); - // b2WheelJointDef() - b2WheelJointDef *ret = new b2WheelJointDef(); - int num_ret = olua_push_object(L, ret, "b2.WheelJointDef"); - olua_postnew(L, ret); + b2WeldJoint *self = nullptr; + float arg1 = 0; /** stiffness */ + + olua_to_object(L, 1, &self, "b2.WeldJoint"); + olua_check_number(L, 2, &arg1); + + // void SetStiffness(float stiffness) + self->SetStiffness(arg1); olua_endinvoke(L); - return num_ret; + return 0; +} + +static int _olua_cls_b2_WeldJoint(lua_State *L) +{ + oluacls_class(L, "b2.WeldJoint"); + oluacls_func(L, "__gc", _olua_fun_b2WeldJoint___gc); + oluacls_func(L, "getDamping", _olua_fun_b2WeldJoint_getDamping); + oluacls_func(L, "getLocalAnchorA", _olua_fun_b2WeldJoint_getLocalAnchorA); + oluacls_func(L, "getLocalAnchorB", _olua_fun_b2WeldJoint_getLocalAnchorB); + oluacls_func(L, "getReferenceAngle", _olua_fun_b2WeldJoint_getReferenceAngle); + oluacls_func(L, "getStiffness", _olua_fun_b2WeldJoint_getStiffness); + oluacls_func(L, "setDamping", _olua_fun_b2WeldJoint_setDamping); + oluacls_func(L, "setStiffness", _olua_fun_b2WeldJoint_setStiffness); + oluacls_prop(L, "damping", _olua_fun_b2WeldJoint_getDamping, _olua_fun_b2WeldJoint_setDamping); + oluacls_prop(L, "localAnchorA", _olua_fun_b2WeldJoint_getLocalAnchorA, nullptr); + oluacls_prop(L, "localAnchorB", _olua_fun_b2WeldJoint_getLocalAnchorB, nullptr); + oluacls_prop(L, "referenceAngle", _olua_fun_b2WeldJoint_getReferenceAngle, nullptr); + oluacls_prop(L, "stiffness", _olua_fun_b2WeldJoint_getStiffness, _olua_fun_b2WeldJoint_setStiffness); + + return 1; +} + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_b2_WeldJoint(lua_State *L) +{ + olua_require(L, "box2d", luaopen_box2d); + if (!olua_getclass(L, "b2.WeldJoint")) { + luaL_error(L, "class not found: b2WeldJoint"); + } + return 1; } +OLUA_END_DECLS -static int _b2WheelJointDef_get_damping(lua_State *L) +static int _olua_fun_b2WheelJointDef_damping$1(lua_State *L) { olua_startinvoke(L); @@ -12589,7 +15079,7 @@ static int _b2WheelJointDef_get_damping(lua_State *L) return num_ret; } -static int _b2WheelJointDef_set_damping(lua_State *L) +static int _olua_fun_b2WheelJointDef_damping$2(lua_State *L) { olua_startinvoke(L); @@ -12607,7 +15097,28 @@ static int _b2WheelJointDef_set_damping(lua_State *L) return 0; } -static int _b2WheelJointDef_get_enableLimit(lua_State *L) +static int _olua_fun_b2WheelJointDef_damping(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float damping + return _olua_fun_b2WheelJointDef_damping$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float damping + return _olua_fun_b2WheelJointDef_damping$2(L); + // } + } + + luaL_error(L, "method 'b2WheelJointDef::damping' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_b2WheelJointDef_enableLimit$1(lua_State *L) { olua_startinvoke(L); @@ -12624,7 +15135,7 @@ static int _b2WheelJointDef_get_enableLimit(lua_State *L) return num_ret; } -static int _b2WheelJointDef_set_enableLimit(lua_State *L) +static int _olua_fun_b2WheelJointDef_enableLimit$2(lua_State *L) { olua_startinvoke(L); @@ -12642,7 +15153,28 @@ static int _b2WheelJointDef_set_enableLimit(lua_State *L) return 0; } -static int _b2WheelJointDef_get_enableMotor(lua_State *L) +static int _olua_fun_b2WheelJointDef_enableLimit(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // bool enableLimit + return _olua_fun_b2WheelJointDef_enableLimit$1(L); + } + + if (num_args == 1) { + // if ((olua_is_bool(L, 2))) { + // bool enableLimit + return _olua_fun_b2WheelJointDef_enableLimit$2(L); + // } + } + + luaL_error(L, "method 'b2WheelJointDef::enableLimit' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_b2WheelJointDef_enableMotor$1(lua_State *L) { olua_startinvoke(L); @@ -12659,7 +15191,7 @@ static int _b2WheelJointDef_get_enableMotor(lua_State *L) return num_ret; } -static int _b2WheelJointDef_set_enableMotor(lua_State *L) +static int _olua_fun_b2WheelJointDef_enableMotor$2(lua_State *L) { olua_startinvoke(L); @@ -12677,7 +15209,52 @@ static int _b2WheelJointDef_set_enableMotor(lua_State *L) return 0; } -static int _b2WheelJointDef_get_localAnchorA(lua_State *L) +static int _olua_fun_b2WheelJointDef_enableMotor(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // bool enableMotor + return _olua_fun_b2WheelJointDef_enableMotor$1(L); + } + + if (num_args == 1) { + // if ((olua_is_bool(L, 2))) { + // bool enableMotor + return _olua_fun_b2WheelJointDef_enableMotor$2(L); + // } + } + + luaL_error(L, "method 'b2WheelJointDef::enableMotor' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_b2WheelJointDef_initialize(lua_State *L) +{ + olua_startinvoke(L); + + b2WheelJointDef *self = nullptr; + b2Body *arg1 = nullptr; /** bodyA */ + b2Body *arg2 = nullptr; /** bodyB */ + b2Vec2 *arg3; /** anchor */ + b2Vec2 *arg4; /** axis */ + + olua_to_object(L, 1, &self, "b2.WheelJointDef"); + olua_check_object(L, 2, &arg1, "b2.Body"); + olua_check_object(L, 3, &arg2, "b2.Body"); + olua_check_object(L, 4, &arg3, "b2.Vec2"); + olua_check_object(L, 5, &arg4, "b2.Vec2"); + + // void Initialize(b2Body *bodyA, b2Body *bodyB, const b2Vec2 &anchor, const b2Vec2 &axis) + self->Initialize(arg1, arg2, *arg3, *arg4); + + olua_endinvoke(L); + + return 0; +} + +static int _olua_fun_b2WheelJointDef_localAnchorA$1(lua_State *L) { olua_startinvoke(L); @@ -12687,32 +15264,53 @@ static int _b2WheelJointDef_get_localAnchorA(lua_State *L) // b2Vec2 localAnchorA b2Vec2 &ret = self->localAnchorA; - int num_ret = olua_pushcopy_object(L, ret, "b2.Vec2"); + int num_ret = olua_copy_object(L, ret, "b2.Vec2"); olua_endinvoke(L); return num_ret; } -static int _b2WheelJointDef_set_localAnchorA(lua_State *L) +static int _olua_fun_b2WheelJointDef_localAnchorA$2(lua_State *L) { olua_startinvoke(L); b2WheelJointDef *self = nullptr; - b2Vec2 arg1; /** localAnchorA */ + b2Vec2 *arg1; /** localAnchorA */ olua_to_object(L, 1, &self, "b2.WheelJointDef"); olua_check_object(L, 2, &arg1, "b2.Vec2"); // b2Vec2 localAnchorA - self->localAnchorA = arg1; + self->localAnchorA = *arg1; olua_endinvoke(L); return 0; } -static int _b2WheelJointDef_get_localAnchorB(lua_State *L) +static int _olua_fun_b2WheelJointDef_localAnchorA(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // b2Vec2 localAnchorA + return _olua_fun_b2WheelJointDef_localAnchorA$1(L); + } + + if (num_args == 1) { + // if ((olua_is_object(L, 2, "b2.Vec2"))) { + // b2Vec2 localAnchorA + return _olua_fun_b2WheelJointDef_localAnchorA$2(L); + // } + } + + luaL_error(L, "method 'b2WheelJointDef::localAnchorA' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_b2WheelJointDef_localAnchorB$1(lua_State *L) { olua_startinvoke(L); @@ -12722,32 +15320,53 @@ static int _b2WheelJointDef_get_localAnchorB(lua_State *L) // b2Vec2 localAnchorB b2Vec2 &ret = self->localAnchorB; - int num_ret = olua_pushcopy_object(L, ret, "b2.Vec2"); + int num_ret = olua_copy_object(L, ret, "b2.Vec2"); olua_endinvoke(L); return num_ret; } -static int _b2WheelJointDef_set_localAnchorB(lua_State *L) +static int _olua_fun_b2WheelJointDef_localAnchorB$2(lua_State *L) { olua_startinvoke(L); b2WheelJointDef *self = nullptr; - b2Vec2 arg1; /** localAnchorB */ + b2Vec2 *arg1; /** localAnchorB */ olua_to_object(L, 1, &self, "b2.WheelJointDef"); olua_check_object(L, 2, &arg1, "b2.Vec2"); // b2Vec2 localAnchorB - self->localAnchorB = arg1; + self->localAnchorB = *arg1; olua_endinvoke(L); return 0; } -static int _b2WheelJointDef_get_localAxisA(lua_State *L) +static int _olua_fun_b2WheelJointDef_localAnchorB(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // b2Vec2 localAnchorB + return _olua_fun_b2WheelJointDef_localAnchorB$1(L); + } + + if (num_args == 1) { + // if ((olua_is_object(L, 2, "b2.Vec2"))) { + // b2Vec2 localAnchorB + return _olua_fun_b2WheelJointDef_localAnchorB$2(L); + // } + } + + luaL_error(L, "method 'b2WheelJointDef::localAnchorB' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_b2WheelJointDef_localAxisA$1(lua_State *L) { olua_startinvoke(L); @@ -12757,32 +15376,53 @@ static int _b2WheelJointDef_get_localAxisA(lua_State *L) // b2Vec2 localAxisA b2Vec2 &ret = self->localAxisA; - int num_ret = olua_pushcopy_object(L, ret, "b2.Vec2"); + int num_ret = olua_copy_object(L, ret, "b2.Vec2"); olua_endinvoke(L); return num_ret; } -static int _b2WheelJointDef_set_localAxisA(lua_State *L) +static int _olua_fun_b2WheelJointDef_localAxisA$2(lua_State *L) { olua_startinvoke(L); b2WheelJointDef *self = nullptr; - b2Vec2 arg1; /** localAxisA */ + b2Vec2 *arg1; /** localAxisA */ olua_to_object(L, 1, &self, "b2.WheelJointDef"); olua_check_object(L, 2, &arg1, "b2.Vec2"); // b2Vec2 localAxisA - self->localAxisA = arg1; + self->localAxisA = *arg1; olua_endinvoke(L); return 0; } -static int _b2WheelJointDef_get_lowerTranslation(lua_State *L) +static int _olua_fun_b2WheelJointDef_localAxisA(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // b2Vec2 localAxisA + return _olua_fun_b2WheelJointDef_localAxisA$1(L); + } + + if (num_args == 1) { + // if ((olua_is_object(L, 2, "b2.Vec2"))) { + // b2Vec2 localAxisA + return _olua_fun_b2WheelJointDef_localAxisA$2(L); + // } + } + + luaL_error(L, "method 'b2WheelJointDef::localAxisA' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_b2WheelJointDef_lowerTranslation$1(lua_State *L) { olua_startinvoke(L); @@ -12799,7 +15439,7 @@ static int _b2WheelJointDef_get_lowerTranslation(lua_State *L) return num_ret; } -static int _b2WheelJointDef_set_lowerTranslation(lua_State *L) +static int _olua_fun_b2WheelJointDef_lowerTranslation$2(lua_State *L) { olua_startinvoke(L); @@ -12817,7 +15457,28 @@ static int _b2WheelJointDef_set_lowerTranslation(lua_State *L) return 0; } -static int _b2WheelJointDef_get_maxMotorTorque(lua_State *L) +static int _olua_fun_b2WheelJointDef_lowerTranslation(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float lowerTranslation + return _olua_fun_b2WheelJointDef_lowerTranslation$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float lowerTranslation + return _olua_fun_b2WheelJointDef_lowerTranslation$2(L); + // } + } + + luaL_error(L, "method 'b2WheelJointDef::lowerTranslation' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_b2WheelJointDef_maxMotorTorque$1(lua_State *L) { olua_startinvoke(L); @@ -12834,7 +15495,7 @@ static int _b2WheelJointDef_get_maxMotorTorque(lua_State *L) return num_ret; } -static int _b2WheelJointDef_set_maxMotorTorque(lua_State *L) +static int _olua_fun_b2WheelJointDef_maxMotorTorque$2(lua_State *L) { olua_startinvoke(L); @@ -12852,7 +15513,28 @@ static int _b2WheelJointDef_set_maxMotorTorque(lua_State *L) return 0; } -static int _b2WheelJointDef_get_motorSpeed(lua_State *L) +static int _olua_fun_b2WheelJointDef_maxMotorTorque(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float maxMotorTorque + return _olua_fun_b2WheelJointDef_maxMotorTorque$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float maxMotorTorque + return _olua_fun_b2WheelJointDef_maxMotorTorque$2(L); + // } + } + + luaL_error(L, "method 'b2WheelJointDef::maxMotorTorque' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_b2WheelJointDef_motorSpeed$1(lua_State *L) { olua_startinvoke(L); @@ -12869,7 +15551,7 @@ static int _b2WheelJointDef_get_motorSpeed(lua_State *L) return num_ret; } -static int _b2WheelJointDef_set_motorSpeed(lua_State *L) +static int _olua_fun_b2WheelJointDef_motorSpeed$2(lua_State *L) { olua_startinvoke(L); @@ -12887,7 +15569,42 @@ static int _b2WheelJointDef_set_motorSpeed(lua_State *L) return 0; } -static int _b2WheelJointDef_get_stiffness(lua_State *L) +static int _olua_fun_b2WheelJointDef_motorSpeed(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float motorSpeed + return _olua_fun_b2WheelJointDef_motorSpeed$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float motorSpeed + return _olua_fun_b2WheelJointDef_motorSpeed$2(L); + // } + } + + luaL_error(L, "method 'b2WheelJointDef::motorSpeed' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_b2WheelJointDef_new(lua_State *L) +{ + olua_startinvoke(L); + + // b2WheelJointDef() + b2WheelJointDef *ret = new b2WheelJointDef(); + int num_ret = olua_push_object(L, ret, "b2.WheelJointDef"); + olua_postnew(L, ret); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_b2WheelJointDef_stiffness$1(lua_State *L) { olua_startinvoke(L); @@ -12904,7 +15621,7 @@ static int _b2WheelJointDef_get_stiffness(lua_State *L) return num_ret; } -static int _b2WheelJointDef_set_stiffness(lua_State *L) +static int _olua_fun_b2WheelJointDef_stiffness$2(lua_State *L) { olua_startinvoke(L); @@ -12922,7 +15639,28 @@ static int _b2WheelJointDef_set_stiffness(lua_State *L) return 0; } -static int _b2WheelJointDef_get_upperTranslation(lua_State *L) +static int _olua_fun_b2WheelJointDef_stiffness(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float stiffness + return _olua_fun_b2WheelJointDef_stiffness$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float stiffness + return _olua_fun_b2WheelJointDef_stiffness$2(L); + // } + } + + luaL_error(L, "method 'b2WheelJointDef::stiffness' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_b2WheelJointDef_upperTranslation$1(lua_State *L) { olua_startinvoke(L); @@ -12939,7 +15677,7 @@ static int _b2WheelJointDef_get_upperTranslation(lua_State *L) return num_ret; } -static int _b2WheelJointDef_set_upperTranslation(lua_State *L) +static int _olua_fun_b2WheelJointDef_upperTranslation$2(lua_State *L) { olua_startinvoke(L); @@ -12957,29 +15695,59 @@ static int _b2WheelJointDef_set_upperTranslation(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_b2WheelJointDef(lua_State *L) +static int _olua_fun_b2WheelJointDef_upperTranslation(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float upperTranslation + return _olua_fun_b2WheelJointDef_upperTranslation$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float upperTranslation + return _olua_fun_b2WheelJointDef_upperTranslation$2(L); + // } + } + + luaL_error(L, "method 'b2WheelJointDef::upperTranslation' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_cls_b2_WheelJointDef(lua_State *L) { oluacls_class(L, "b2.WheelJointDef"); - oluacls_func(L, "initialize", _b2WheelJointDef_Initialize); - oluacls_func(L, "new", _b2WheelJointDef_new); - oluacls_prop(L, "damping", _b2WheelJointDef_get_damping, _b2WheelJointDef_set_damping); - oluacls_prop(L, "enableLimit", _b2WheelJointDef_get_enableLimit, _b2WheelJointDef_set_enableLimit); - oluacls_prop(L, "enableMotor", _b2WheelJointDef_get_enableMotor, _b2WheelJointDef_set_enableMotor); - oluacls_prop(L, "localAnchorA", _b2WheelJointDef_get_localAnchorA, _b2WheelJointDef_set_localAnchorA); - oluacls_prop(L, "localAnchorB", _b2WheelJointDef_get_localAnchorB, _b2WheelJointDef_set_localAnchorB); - oluacls_prop(L, "localAxisA", _b2WheelJointDef_get_localAxisA, _b2WheelJointDef_set_localAxisA); - oluacls_prop(L, "lowerTranslation", _b2WheelJointDef_get_lowerTranslation, _b2WheelJointDef_set_lowerTranslation); - oluacls_prop(L, "maxMotorTorque", _b2WheelJointDef_get_maxMotorTorque, _b2WheelJointDef_set_maxMotorTorque); - oluacls_prop(L, "motorSpeed", _b2WheelJointDef_get_motorSpeed, _b2WheelJointDef_set_motorSpeed); - oluacls_prop(L, "stiffness", _b2WheelJointDef_get_stiffness, _b2WheelJointDef_set_stiffness); - oluacls_prop(L, "upperTranslation", _b2WheelJointDef_get_upperTranslation, _b2WheelJointDef_set_upperTranslation); + oluacls_func(L, "initialize", _olua_fun_b2WheelJointDef_initialize); + oluacls_func(L, "new", _olua_fun_b2WheelJointDef_new); + oluacls_prop(L, "damping", _olua_fun_b2WheelJointDef_damping, _olua_fun_b2WheelJointDef_damping); + oluacls_prop(L, "enableLimit", _olua_fun_b2WheelJointDef_enableLimit, _olua_fun_b2WheelJointDef_enableLimit); + oluacls_prop(L, "enableMotor", _olua_fun_b2WheelJointDef_enableMotor, _olua_fun_b2WheelJointDef_enableMotor); + oluacls_prop(L, "localAnchorA", _olua_fun_b2WheelJointDef_localAnchorA, _olua_fun_b2WheelJointDef_localAnchorA); + oluacls_prop(L, "localAnchorB", _olua_fun_b2WheelJointDef_localAnchorB, _olua_fun_b2WheelJointDef_localAnchorB); + oluacls_prop(L, "localAxisA", _olua_fun_b2WheelJointDef_localAxisA, _olua_fun_b2WheelJointDef_localAxisA); + oluacls_prop(L, "lowerTranslation", _olua_fun_b2WheelJointDef_lowerTranslation, _olua_fun_b2WheelJointDef_lowerTranslation); + oluacls_prop(L, "maxMotorTorque", _olua_fun_b2WheelJointDef_maxMotorTorque, _olua_fun_b2WheelJointDef_maxMotorTorque); + oluacls_prop(L, "motorSpeed", _olua_fun_b2WheelJointDef_motorSpeed, _olua_fun_b2WheelJointDef_motorSpeed); + oluacls_prop(L, "stiffness", _olua_fun_b2WheelJointDef_stiffness, _olua_fun_b2WheelJointDef_stiffness); + oluacls_prop(L, "upperTranslation", _olua_fun_b2WheelJointDef_upperTranslation, _olua_fun_b2WheelJointDef_upperTranslation); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_b2_WheelJointDef(lua_State *L) +{ + olua_require(L, "box2d", luaopen_box2d); + if (!olua_getclass(L, "b2.WheelJointDef")) { + luaL_error(L, "class not found: b2WheelJointDef"); + } return 1; } OLUA_END_DECLS -static int _b2WheelJoint___gc(lua_State *L) +static int _olua_fun_b2WheelJoint___gc(lua_State *L) { olua_startinvoke(L); @@ -12991,7 +15759,7 @@ static int _b2WheelJoint___gc(lua_State *L) return 0; } -static int _b2WheelJoint_EnableLimit(lua_State *L) +static int _olua_fun_b2WheelJoint_enableLimit(lua_State *L) { olua_startinvoke(L); @@ -13009,7 +15777,7 @@ static int _b2WheelJoint_EnableLimit(lua_State *L) return 0; } -static int _b2WheelJoint_EnableMotor(lua_State *L) +static int _olua_fun_b2WheelJoint_enableMotor(lua_State *L) { olua_startinvoke(L); @@ -13027,7 +15795,7 @@ static int _b2WheelJoint_EnableMotor(lua_State *L) return 0; } -static int _b2WheelJoint_GetDamping(lua_State *L) +static int _olua_fun_b2WheelJoint_getDamping(lua_State *L) { olua_startinvoke(L); @@ -13044,7 +15812,7 @@ static int _b2WheelJoint_GetDamping(lua_State *L) return num_ret; } -static int _b2WheelJoint_GetJointAngle(lua_State *L) +static int _olua_fun_b2WheelJoint_getJointAngle(lua_State *L) { olua_startinvoke(L); @@ -13061,7 +15829,7 @@ static int _b2WheelJoint_GetJointAngle(lua_State *L) return num_ret; } -static int _b2WheelJoint_GetJointAngularSpeed(lua_State *L) +static int _olua_fun_b2WheelJoint_getJointAngularSpeed(lua_State *L) { olua_startinvoke(L); @@ -13078,7 +15846,7 @@ static int _b2WheelJoint_GetJointAngularSpeed(lua_State *L) return num_ret; } -static int _b2WheelJoint_GetJointLinearSpeed(lua_State *L) +static int _olua_fun_b2WheelJoint_getJointLinearSpeed(lua_State *L) { olua_startinvoke(L); @@ -13095,7 +15863,7 @@ static int _b2WheelJoint_GetJointLinearSpeed(lua_State *L) return num_ret; } -static int _b2WheelJoint_GetJointTranslation(lua_State *L) +static int _olua_fun_b2WheelJoint_getJointTranslation(lua_State *L) { olua_startinvoke(L); @@ -13112,7 +15880,7 @@ static int _b2WheelJoint_GetJointTranslation(lua_State *L) return num_ret; } -static int _b2WheelJoint_GetLocalAnchorA(lua_State *L) +static int _olua_fun_b2WheelJoint_getLocalAnchorA(lua_State *L) { olua_startinvoke(L); @@ -13129,7 +15897,7 @@ static int _b2WheelJoint_GetLocalAnchorA(lua_State *L) return num_ret; } -static int _b2WheelJoint_GetLocalAnchorB(lua_State *L) +static int _olua_fun_b2WheelJoint_getLocalAnchorB(lua_State *L) { olua_startinvoke(L); @@ -13146,7 +15914,7 @@ static int _b2WheelJoint_GetLocalAnchorB(lua_State *L) return num_ret; } -static int _b2WheelJoint_GetLocalAxisA(lua_State *L) +static int _olua_fun_b2WheelJoint_getLocalAxisA(lua_State *L) { olua_startinvoke(L); @@ -13163,7 +15931,7 @@ static int _b2WheelJoint_GetLocalAxisA(lua_State *L) return num_ret; } -static int _b2WheelJoint_GetLowerLimit(lua_State *L) +static int _olua_fun_b2WheelJoint_getLowerLimit(lua_State *L) { olua_startinvoke(L); @@ -13180,7 +15948,7 @@ static int _b2WheelJoint_GetLowerLimit(lua_State *L) return num_ret; } -static int _b2WheelJoint_GetMaxMotorTorque(lua_State *L) +static int _olua_fun_b2WheelJoint_getMaxMotorTorque(lua_State *L) { olua_startinvoke(L); @@ -13197,7 +15965,7 @@ static int _b2WheelJoint_GetMaxMotorTorque(lua_State *L) return num_ret; } -static int _b2WheelJoint_GetMotorSpeed(lua_State *L) +static int _olua_fun_b2WheelJoint_getMotorSpeed(lua_State *L) { olua_startinvoke(L); @@ -13214,7 +15982,7 @@ static int _b2WheelJoint_GetMotorSpeed(lua_State *L) return num_ret; } -static int _b2WheelJoint_GetMotorTorque(lua_State *L) +static int _olua_fun_b2WheelJoint_getMotorTorque(lua_State *L) { olua_startinvoke(L); @@ -13233,7 +16001,7 @@ static int _b2WheelJoint_GetMotorTorque(lua_State *L) return num_ret; } -static int _b2WheelJoint_GetStiffness(lua_State *L) +static int _olua_fun_b2WheelJoint_getStiffness(lua_State *L) { olua_startinvoke(L); @@ -13250,7 +16018,7 @@ static int _b2WheelJoint_GetStiffness(lua_State *L) return num_ret; } -static int _b2WheelJoint_GetUpperLimit(lua_State *L) +static int _olua_fun_b2WheelJoint_getUpperLimit(lua_State *L) { olua_startinvoke(L); @@ -13267,7 +16035,7 @@ static int _b2WheelJoint_GetUpperLimit(lua_State *L) return num_ret; } -static int _b2WheelJoint_IsLimitEnabled(lua_State *L) +static int _olua_fun_b2WheelJoint_isLimitEnabled(lua_State *L) { olua_startinvoke(L); @@ -13284,7 +16052,7 @@ static int _b2WheelJoint_IsLimitEnabled(lua_State *L) return num_ret; } -static int _b2WheelJoint_IsMotorEnabled(lua_State *L) +static int _olua_fun_b2WheelJoint_isMotorEnabled(lua_State *L) { olua_startinvoke(L); @@ -13301,7 +16069,7 @@ static int _b2WheelJoint_IsMotorEnabled(lua_State *L) return num_ret; } -static int _b2WheelJoint_SetDamping(lua_State *L) +static int _olua_fun_b2WheelJoint_setDamping(lua_State *L) { olua_startinvoke(L); @@ -13319,7 +16087,7 @@ static int _b2WheelJoint_SetDamping(lua_State *L) return 0; } -static int _b2WheelJoint_SetLimits(lua_State *L) +static int _olua_fun_b2WheelJoint_setLimits(lua_State *L) { olua_startinvoke(L); @@ -13339,7 +16107,7 @@ static int _b2WheelJoint_SetLimits(lua_State *L) return 0; } -static int _b2WheelJoint_SetMaxMotorTorque(lua_State *L) +static int _olua_fun_b2WheelJoint_setMaxMotorTorque(lua_State *L) { olua_startinvoke(L); @@ -13357,7 +16125,7 @@ static int _b2WheelJoint_SetMaxMotorTorque(lua_State *L) return 0; } -static int _b2WheelJoint_SetMotorSpeed(lua_State *L) +static int _olua_fun_b2WheelJoint_setMotorSpeed(lua_State *L) { olua_startinvoke(L); @@ -13375,7 +16143,7 @@ static int _b2WheelJoint_SetMotorSpeed(lua_State *L) return 0; } -static int _b2WheelJoint_SetStiffness(lua_State *L) +static int _olua_fun_b2WheelJoint_setStiffness(lua_State *L) { olua_startinvoke(L); @@ -13393,95 +16161,64 @@ static int _b2WheelJoint_SetStiffness(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_b2WheelJoint(lua_State *L) +static int _olua_cls_b2_WheelJoint(lua_State *L) { oluacls_class(L, "b2.WheelJoint"); - oluacls_func(L, "__gc", _b2WheelJoint___gc); - oluacls_func(L, "enableLimit", _b2WheelJoint_EnableLimit); - oluacls_func(L, "enableMotor", _b2WheelJoint_EnableMotor); - oluacls_func(L, "getDamping", _b2WheelJoint_GetDamping); - oluacls_func(L, "getJointAngle", _b2WheelJoint_GetJointAngle); - oluacls_func(L, "getJointAngularSpeed", _b2WheelJoint_GetJointAngularSpeed); - oluacls_func(L, "getJointLinearSpeed", _b2WheelJoint_GetJointLinearSpeed); - oluacls_func(L, "getJointTranslation", _b2WheelJoint_GetJointTranslation); - oluacls_func(L, "getLocalAnchorA", _b2WheelJoint_GetLocalAnchorA); - oluacls_func(L, "getLocalAnchorB", _b2WheelJoint_GetLocalAnchorB); - oluacls_func(L, "getLocalAxisA", _b2WheelJoint_GetLocalAxisA); - oluacls_func(L, "getLowerLimit", _b2WheelJoint_GetLowerLimit); - oluacls_func(L, "getMaxMotorTorque", _b2WheelJoint_GetMaxMotorTorque); - oluacls_func(L, "getMotorSpeed", _b2WheelJoint_GetMotorSpeed); - oluacls_func(L, "getMotorTorque", _b2WheelJoint_GetMotorTorque); - oluacls_func(L, "getStiffness", _b2WheelJoint_GetStiffness); - oluacls_func(L, "getUpperLimit", _b2WheelJoint_GetUpperLimit); - oluacls_func(L, "isLimitEnabled", _b2WheelJoint_IsLimitEnabled); - oluacls_func(L, "isMotorEnabled", _b2WheelJoint_IsMotorEnabled); - oluacls_func(L, "setDamping", _b2WheelJoint_SetDamping); - oluacls_func(L, "setLimits", _b2WheelJoint_SetLimits); - oluacls_func(L, "setMaxMotorTorque", _b2WheelJoint_SetMaxMotorTorque); - oluacls_func(L, "setMotorSpeed", _b2WheelJoint_SetMotorSpeed); - oluacls_func(L, "setStiffness", _b2WheelJoint_SetStiffness); - oluacls_prop(L, "damping", _b2WheelJoint_GetDamping, _b2WheelJoint_SetDamping); - oluacls_prop(L, "jointAngle", _b2WheelJoint_GetJointAngle, nullptr); - oluacls_prop(L, "jointAngularSpeed", _b2WheelJoint_GetJointAngularSpeed, nullptr); - oluacls_prop(L, "jointLinearSpeed", _b2WheelJoint_GetJointLinearSpeed, nullptr); - oluacls_prop(L, "jointTranslation", _b2WheelJoint_GetJointTranslation, nullptr); - oluacls_prop(L, "limitEnabled", _b2WheelJoint_IsLimitEnabled, nullptr); - oluacls_prop(L, "localAnchorA", _b2WheelJoint_GetLocalAnchorA, nullptr); - oluacls_prop(L, "localAnchorB", _b2WheelJoint_GetLocalAnchorB, nullptr); - oluacls_prop(L, "localAxisA", _b2WheelJoint_GetLocalAxisA, nullptr); - oluacls_prop(L, "lowerLimit", _b2WheelJoint_GetLowerLimit, nullptr); - oluacls_prop(L, "maxMotorTorque", _b2WheelJoint_GetMaxMotorTorque, _b2WheelJoint_SetMaxMotorTorque); - oluacls_prop(L, "motorEnabled", _b2WheelJoint_IsMotorEnabled, nullptr); - oluacls_prop(L, "motorSpeed", _b2WheelJoint_GetMotorSpeed, _b2WheelJoint_SetMotorSpeed); - oluacls_prop(L, "stiffness", _b2WheelJoint_GetStiffness, _b2WheelJoint_SetStiffness); - oluacls_prop(L, "upperLimit", _b2WheelJoint_GetUpperLimit, nullptr); + oluacls_func(L, "__gc", _olua_fun_b2WheelJoint___gc); + oluacls_func(L, "enableLimit", _olua_fun_b2WheelJoint_enableLimit); + oluacls_func(L, "enableMotor", _olua_fun_b2WheelJoint_enableMotor); + oluacls_func(L, "getDamping", _olua_fun_b2WheelJoint_getDamping); + oluacls_func(L, "getJointAngle", _olua_fun_b2WheelJoint_getJointAngle); + oluacls_func(L, "getJointAngularSpeed", _olua_fun_b2WheelJoint_getJointAngularSpeed); + oluacls_func(L, "getJointLinearSpeed", _olua_fun_b2WheelJoint_getJointLinearSpeed); + oluacls_func(L, "getJointTranslation", _olua_fun_b2WheelJoint_getJointTranslation); + oluacls_func(L, "getLocalAnchorA", _olua_fun_b2WheelJoint_getLocalAnchorA); + oluacls_func(L, "getLocalAnchorB", _olua_fun_b2WheelJoint_getLocalAnchorB); + oluacls_func(L, "getLocalAxisA", _olua_fun_b2WheelJoint_getLocalAxisA); + oluacls_func(L, "getLowerLimit", _olua_fun_b2WheelJoint_getLowerLimit); + oluacls_func(L, "getMaxMotorTorque", _olua_fun_b2WheelJoint_getMaxMotorTorque); + oluacls_func(L, "getMotorSpeed", _olua_fun_b2WheelJoint_getMotorSpeed); + oluacls_func(L, "getMotorTorque", _olua_fun_b2WheelJoint_getMotorTorque); + oluacls_func(L, "getStiffness", _olua_fun_b2WheelJoint_getStiffness); + oluacls_func(L, "getUpperLimit", _olua_fun_b2WheelJoint_getUpperLimit); + oluacls_func(L, "isLimitEnabled", _olua_fun_b2WheelJoint_isLimitEnabled); + oluacls_func(L, "isMotorEnabled", _olua_fun_b2WheelJoint_isMotorEnabled); + oluacls_func(L, "setDamping", _olua_fun_b2WheelJoint_setDamping); + oluacls_func(L, "setLimits", _olua_fun_b2WheelJoint_setLimits); + oluacls_func(L, "setMaxMotorTorque", _olua_fun_b2WheelJoint_setMaxMotorTorque); + oluacls_func(L, "setMotorSpeed", _olua_fun_b2WheelJoint_setMotorSpeed); + oluacls_func(L, "setStiffness", _olua_fun_b2WheelJoint_setStiffness); + oluacls_prop(L, "damping", _olua_fun_b2WheelJoint_getDamping, _olua_fun_b2WheelJoint_setDamping); + oluacls_prop(L, "jointAngle", _olua_fun_b2WheelJoint_getJointAngle, nullptr); + oluacls_prop(L, "jointAngularSpeed", _olua_fun_b2WheelJoint_getJointAngularSpeed, nullptr); + oluacls_prop(L, "jointLinearSpeed", _olua_fun_b2WheelJoint_getJointLinearSpeed, nullptr); + oluacls_prop(L, "jointTranslation", _olua_fun_b2WheelJoint_getJointTranslation, nullptr); + oluacls_prop(L, "limitEnabled", _olua_fun_b2WheelJoint_isLimitEnabled, nullptr); + oluacls_prop(L, "localAnchorA", _olua_fun_b2WheelJoint_getLocalAnchorA, nullptr); + oluacls_prop(L, "localAnchorB", _olua_fun_b2WheelJoint_getLocalAnchorB, nullptr); + oluacls_prop(L, "localAxisA", _olua_fun_b2WheelJoint_getLocalAxisA, nullptr); + oluacls_prop(L, "lowerLimit", _olua_fun_b2WheelJoint_getLowerLimit, nullptr); + oluacls_prop(L, "maxMotorTorque", _olua_fun_b2WheelJoint_getMaxMotorTorque, _olua_fun_b2WheelJoint_setMaxMotorTorque); + oluacls_prop(L, "motorEnabled", _olua_fun_b2WheelJoint_isMotorEnabled, nullptr); + oluacls_prop(L, "motorSpeed", _olua_fun_b2WheelJoint_getMotorSpeed, _olua_fun_b2WheelJoint_setMotorSpeed); + oluacls_prop(L, "stiffness", _olua_fun_b2WheelJoint_getStiffness, _olua_fun_b2WheelJoint_setStiffness); + oluacls_prop(L, "upperLimit", _olua_fun_b2WheelJoint_getUpperLimit, nullptr); return 1; } -OLUA_END_DECLS -static int _b2JointEdge___call(lua_State *L) +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_b2_WheelJoint(lua_State *L) { - olua_startinvoke(L); - - b2JointEdge ret; - - luaL_checktype(L, 2, LUA_TTABLE); - - b2Body *arg1 = nullptr; /** other */ - b2Joint *arg2 = nullptr; /** joint */ - b2JointEdge *arg3 = nullptr; /** prev */ - b2JointEdge *arg4 = nullptr; /** next */ - - olua_getfield(L, 2, "other"); - olua_check_object(L, -1, &arg1, "b2.Body"); - ret.other = arg1; - lua_pop(L, 1); - - olua_getfield(L, 2, "joint"); - olua_check_object(L, -1, &arg2, "b2.Joint"); - ret.joint = arg2; - lua_pop(L, 1); - - olua_getfield(L, 2, "prev"); - olua_check_object(L, -1, &arg3, "b2.JointEdge"); - ret.prev = arg3; - lua_pop(L, 1); - - olua_getfield(L, 2, "next"); - olua_check_object(L, -1, &arg4, "b2.JointEdge"); - ret.next = arg4; - lua_pop(L, 1); - - olua_pushcopy_object(L, ret, "b2.JointEdge"); - - olua_endinvoke(L); - + olua_require(L, "box2d", luaopen_box2d); + if (!olua_getclass(L, "b2.WheelJoint")) { + luaL_error(L, "class not found: b2WheelJoint"); + } return 1; } +OLUA_END_DECLS -static int _b2JointEdge___gc(lua_State *L) +static int _olua_fun_b2JointEdge___gc(lua_State *L) { olua_startinvoke(L); @@ -13493,7 +16230,7 @@ static int _b2JointEdge___gc(lua_State *L) return 0; } -static int _b2JointEdge___olua_move(lua_State *L) +static int _olua_fun_b2JointEdge___olua_move(lua_State *L) { olua_startinvoke(L); @@ -13505,7 +16242,7 @@ static int _b2JointEdge___olua_move(lua_State *L) return 1; } -static int _b2JointEdge_get_joint(lua_State *L) +static int _olua_fun_b2JointEdge_joint$1(lua_State *L) { olua_startinvoke(L); @@ -13522,25 +16259,46 @@ static int _b2JointEdge_get_joint(lua_State *L) return num_ret; } -static int _b2JointEdge_set_joint(lua_State *L) +static int _olua_fun_b2JointEdge_joint$2(lua_State *L) { olua_startinvoke(L); b2JointEdge *self = nullptr; b2Joint *arg1 = nullptr; /** joint */ - olua_to_object(L, 1, &self, "b2.JointEdge"); - olua_check_object(L, 2, &arg1, "b2.Joint"); + olua_to_object(L, 1, &self, "b2.JointEdge"); + olua_check_object(L, 2, &arg1, "b2.Joint"); + + // b2Joint *joint + self->joint = arg1; + + olua_endinvoke(L); + + return 0; +} + +static int _olua_fun_b2JointEdge_joint(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // b2Joint *joint + return _olua_fun_b2JointEdge_joint$1(L); + } - // b2Joint *joint - self->joint = arg1; + if (num_args == 1) { + // if ((olua_is_object(L, 2, "b2.Joint"))) { + // b2Joint *joint + return _olua_fun_b2JointEdge_joint$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'b2JointEdge::joint' not support '%d' arguments", num_args); return 0; } -static int _b2JointEdge_get_next(lua_State *L) +static int _olua_fun_b2JointEdge_next$1(lua_State *L) { olua_startinvoke(L); @@ -13557,7 +16315,7 @@ static int _b2JointEdge_get_next(lua_State *L) return num_ret; } -static int _b2JointEdge_set_next(lua_State *L) +static int _olua_fun_b2JointEdge_next$2(lua_State *L) { olua_startinvoke(L); @@ -13575,7 +16333,28 @@ static int _b2JointEdge_set_next(lua_State *L) return 0; } -static int _b2JointEdge_get_other(lua_State *L) +static int _olua_fun_b2JointEdge_next(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // b2JointEdge *next + return _olua_fun_b2JointEdge_next$1(L); + } + + if (num_args == 1) { + // if ((olua_is_object(L, 2, "b2.JointEdge"))) { + // b2JointEdge *next + return _olua_fun_b2JointEdge_next$2(L); + // } + } + + luaL_error(L, "method 'b2JointEdge::next' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_b2JointEdge_other$1(lua_State *L) { olua_startinvoke(L); @@ -13592,7 +16371,7 @@ static int _b2JointEdge_get_other(lua_State *L) return num_ret; } -static int _b2JointEdge_set_other(lua_State *L) +static int _olua_fun_b2JointEdge_other$2(lua_State *L) { olua_startinvoke(L); @@ -13610,7 +16389,28 @@ static int _b2JointEdge_set_other(lua_State *L) return 0; } -static int _b2JointEdge_get_prev(lua_State *L) +static int _olua_fun_b2JointEdge_other(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // b2Body *other + return _olua_fun_b2JointEdge_other$1(L); + } + + if (num_args == 1) { + // if ((olua_is_object(L, 2, "b2.Body"))) { + // b2Body *other + return _olua_fun_b2JointEdge_other$2(L); + // } + } + + luaL_error(L, "method 'b2JointEdge::other' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_b2JointEdge_prev$1(lua_State *L) { olua_startinvoke(L); @@ -13627,7 +16427,7 @@ static int _b2JointEdge_get_prev(lua_State *L) return num_ret; } -static int _b2JointEdge_set_prev(lua_State *L) +static int _olua_fun_b2JointEdge_prev$2(lua_State *L) { olua_startinvoke(L); @@ -13645,45 +16445,52 @@ static int _b2JointEdge_set_prev(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_b2JointEdge(lua_State *L) -{ - oluacls_class(L, "b2.JointEdge"); - oluacls_func(L, "__call", _b2JointEdge___call); - oluacls_func(L, "__gc", _b2JointEdge___gc); - oluacls_func(L, "__olua_move", _b2JointEdge___olua_move); - oluacls_prop(L, "joint", _b2JointEdge_get_joint, _b2JointEdge_set_joint); - oluacls_prop(L, "next", _b2JointEdge_get_next, _b2JointEdge_set_next); - oluacls_prop(L, "other", _b2JointEdge_get_other, _b2JointEdge_set_other); - oluacls_prop(L, "prev", _b2JointEdge_get_prev, _b2JointEdge_set_prev); - - return 1; -} -OLUA_END_DECLS - -static int _b2JointUserData___call(lua_State *L) +static int _olua_fun_b2JointEdge_prev(lua_State *L) { - olua_startinvoke(L); + int num_args = lua_gettop(L) - 1; - b2JointUserData ret; + if (num_args == 0) { + // b2JointEdge *prev + return _olua_fun_b2JointEdge_prev$1(L); + } - luaL_checktype(L, 2, LUA_TTABLE); + if (num_args == 1) { + // if ((olua_is_object(L, 2, "b2.JointEdge"))) { + // b2JointEdge *prev + return _olua_fun_b2JointEdge_prev$2(L); + // } + } - uintptr_t arg1 = 0; /** pointer */ + luaL_error(L, "method 'b2JointEdge::prev' not support '%d' arguments", num_args); - olua_getfield(L, 2, "pointer"); - olua_check_integer(L, -1, &arg1); - ret.pointer = arg1; - lua_pop(L, 1); + return 0; +} - olua_pushcopy_object(L, ret, "b2.JointUserData"); +static int _olua_cls_b2_JointEdge(lua_State *L) +{ + oluacls_class(L, "b2.JointEdge"); + oluacls_func(L, "__gc", _olua_fun_b2JointEdge___gc); + oluacls_func(L, "__olua_move", _olua_fun_b2JointEdge___olua_move); + oluacls_prop(L, "joint", _olua_fun_b2JointEdge_joint, _olua_fun_b2JointEdge_joint); + oluacls_prop(L, "next", _olua_fun_b2JointEdge_next, _olua_fun_b2JointEdge_next); + oluacls_prop(L, "other", _olua_fun_b2JointEdge_other, _olua_fun_b2JointEdge_other); + oluacls_prop(L, "prev", _olua_fun_b2JointEdge_prev, _olua_fun_b2JointEdge_prev); - olua_endinvoke(L); + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_b2_JointEdge(lua_State *L) +{ + olua_require(L, "box2d", luaopen_box2d); + if (!olua_getclass(L, "b2.JointEdge")) { + luaL_error(L, "class not found: b2JointEdge"); + } return 1; } +OLUA_END_DECLS -static int _b2JointUserData___gc(lua_State *L) +static int _olua_fun_b2JointUserData___gc(lua_State *L) { olua_startinvoke(L); @@ -13695,7 +16502,7 @@ static int _b2JointUserData___gc(lua_State *L) return 0; } -static int _b2JointUserData___olua_move(lua_State *L) +static int _olua_fun_b2JointUserData___olua_move(lua_State *L) { olua_startinvoke(L); @@ -13707,7 +16514,7 @@ static int _b2JointUserData___olua_move(lua_State *L) return 1; } -static int _b2JointUserData_new(lua_State *L) +static int _olua_fun_b2JointUserData_new(lua_State *L) { olua_startinvoke(L); @@ -13721,7 +16528,7 @@ static int _b2JointUserData_new(lua_State *L) return num_ret; } -static int _b2JointUserData_get_pointer(lua_State *L) +static int _olua_fun_b2JointUserData_pointer$1(lua_State *L) { olua_startinvoke(L); @@ -13738,7 +16545,7 @@ static int _b2JointUserData_get_pointer(lua_State *L) return num_ret; } -static int _b2JointUserData_set_pointer(lua_State *L) +static int _olua_fun_b2JointUserData_pointer$2(lua_State *L) { olua_startinvoke(L); @@ -13756,61 +16563,50 @@ static int _b2JointUserData_set_pointer(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_b2JointUserData(lua_State *L) -{ - oluacls_class(L, "b2.JointUserData"); - oluacls_func(L, "__call", _b2JointUserData___call); - oluacls_func(L, "__gc", _b2JointUserData___gc); - oluacls_func(L, "__olua_move", _b2JointUserData___olua_move); - oluacls_func(L, "new", _b2JointUserData_new); - oluacls_prop(L, "pointer", _b2JointUserData_get_pointer, _b2JointUserData_set_pointer); - - return 1; -} -OLUA_END_DECLS - -static int _b2ContactEdge___call(lua_State *L) +static int _olua_fun_b2JointUserData_pointer(lua_State *L) { - olua_startinvoke(L); - - b2ContactEdge ret; - - luaL_checktype(L, 2, LUA_TTABLE); - - b2Body *arg1 = nullptr; /** other */ - b2Contact *arg2 = nullptr; /** contact */ - b2ContactEdge *arg3 = nullptr; /** prev */ - b2ContactEdge *arg4 = nullptr; /** next */ + int num_args = lua_gettop(L) - 1; - olua_getfield(L, 2, "other"); - olua_check_object(L, -1, &arg1, "b2.Body"); - ret.other = arg1; - lua_pop(L, 1); + if (num_args == 0) { + // uintptr_t pointer + return _olua_fun_b2JointUserData_pointer$1(L); + } - olua_getfield(L, 2, "contact"); - olua_check_object(L, -1, &arg2, "b2.Contact"); - ret.contact = arg2; - lua_pop(L, 1); + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // uintptr_t pointer + return _olua_fun_b2JointUserData_pointer$2(L); + // } + } - olua_getfield(L, 2, "prev"); - olua_check_object(L, -1, &arg3, "b2.ContactEdge"); - ret.prev = arg3; - lua_pop(L, 1); + luaL_error(L, "method 'b2JointUserData::pointer' not support '%d' arguments", num_args); - olua_getfield(L, 2, "next"); - olua_check_object(L, -1, &arg4, "b2.ContactEdge"); - ret.next = arg4; - lua_pop(L, 1); + return 0; +} - olua_pushcopy_object(L, ret, "b2.ContactEdge"); +static int _olua_cls_b2_JointUserData(lua_State *L) +{ + oluacls_class(L, "b2.JointUserData"); + oluacls_func(L, "__gc", _olua_fun_b2JointUserData___gc); + oluacls_func(L, "__olua_move", _olua_fun_b2JointUserData___olua_move); + oluacls_func(L, "new", _olua_fun_b2JointUserData_new); + oluacls_prop(L, "pointer", _olua_fun_b2JointUserData_pointer, _olua_fun_b2JointUserData_pointer); - olua_endinvoke(L); + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_b2_JointUserData(lua_State *L) +{ + olua_require(L, "box2d", luaopen_box2d); + if (!olua_getclass(L, "b2.JointUserData")) { + luaL_error(L, "class not found: b2JointUserData"); + } return 1; } +OLUA_END_DECLS -static int _b2ContactEdge___gc(lua_State *L) +static int _olua_fun_b2ContactEdge___gc(lua_State *L) { olua_startinvoke(L); @@ -13822,7 +16618,7 @@ static int _b2ContactEdge___gc(lua_State *L) return 0; } -static int _b2ContactEdge___olua_move(lua_State *L) +static int _olua_fun_b2ContactEdge___olua_move(lua_State *L) { olua_startinvoke(L); @@ -13834,7 +16630,7 @@ static int _b2ContactEdge___olua_move(lua_State *L) return 1; } -static int _b2ContactEdge_get_contact(lua_State *L) +static int _olua_fun_b2ContactEdge_contact$1(lua_State *L) { olua_startinvoke(L); @@ -13851,7 +16647,7 @@ static int _b2ContactEdge_get_contact(lua_State *L) return num_ret; } -static int _b2ContactEdge_set_contact(lua_State *L) +static int _olua_fun_b2ContactEdge_contact$2(lua_State *L) { olua_startinvoke(L); @@ -13869,7 +16665,28 @@ static int _b2ContactEdge_set_contact(lua_State *L) return 0; } -static int _b2ContactEdge_get_next(lua_State *L) +static int _olua_fun_b2ContactEdge_contact(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // b2Contact *contact + return _olua_fun_b2ContactEdge_contact$1(L); + } + + if (num_args == 1) { + // if ((olua_is_object(L, 2, "b2.Contact"))) { + // b2Contact *contact + return _olua_fun_b2ContactEdge_contact$2(L); + // } + } + + luaL_error(L, "method 'b2ContactEdge::contact' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_b2ContactEdge_next$1(lua_State *L) { olua_startinvoke(L); @@ -13886,7 +16703,7 @@ static int _b2ContactEdge_get_next(lua_State *L) return num_ret; } -static int _b2ContactEdge_set_next(lua_State *L) +static int _olua_fun_b2ContactEdge_next$2(lua_State *L) { olua_startinvoke(L); @@ -13904,7 +16721,28 @@ static int _b2ContactEdge_set_next(lua_State *L) return 0; } -static int _b2ContactEdge_get_other(lua_State *L) +static int _olua_fun_b2ContactEdge_next(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // b2ContactEdge *next + return _olua_fun_b2ContactEdge_next$1(L); + } + + if (num_args == 1) { + // if ((olua_is_object(L, 2, "b2.ContactEdge"))) { + // b2ContactEdge *next + return _olua_fun_b2ContactEdge_next$2(L); + // } + } + + luaL_error(L, "method 'b2ContactEdge::next' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_b2ContactEdge_other$1(lua_State *L) { olua_startinvoke(L); @@ -13921,7 +16759,7 @@ static int _b2ContactEdge_get_other(lua_State *L) return num_ret; } -static int _b2ContactEdge_set_other(lua_State *L) +static int _olua_fun_b2ContactEdge_other$2(lua_State *L) { olua_startinvoke(L); @@ -13939,7 +16777,28 @@ static int _b2ContactEdge_set_other(lua_State *L) return 0; } -static int _b2ContactEdge_get_prev(lua_State *L) +static int _olua_fun_b2ContactEdge_other(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // b2Body *other + return _olua_fun_b2ContactEdge_other$1(L); + } + + if (num_args == 1) { + // if ((olua_is_object(L, 2, "b2.Body"))) { + // b2Body *other + return _olua_fun_b2ContactEdge_other$2(L); + // } + } + + luaL_error(L, "method 'b2ContactEdge::other' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_b2ContactEdge_prev$1(lua_State *L) { olua_startinvoke(L); @@ -13956,7 +16815,7 @@ static int _b2ContactEdge_get_prev(lua_State *L) return num_ret; } -static int _b2ContactEdge_set_prev(lua_State *L) +static int _olua_fun_b2ContactEdge_prev$2(lua_State *L) { olua_startinvoke(L); @@ -13974,23 +16833,52 @@ static int _b2ContactEdge_set_prev(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_b2ContactEdge(lua_State *L) +static int _olua_fun_b2ContactEdge_prev(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // b2ContactEdge *prev + return _olua_fun_b2ContactEdge_prev$1(L); + } + + if (num_args == 1) { + // if ((olua_is_object(L, 2, "b2.ContactEdge"))) { + // b2ContactEdge *prev + return _olua_fun_b2ContactEdge_prev$2(L); + // } + } + + luaL_error(L, "method 'b2ContactEdge::prev' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_cls_b2_ContactEdge(lua_State *L) { oluacls_class(L, "b2.ContactEdge"); - oluacls_func(L, "__call", _b2ContactEdge___call); - oluacls_func(L, "__gc", _b2ContactEdge___gc); - oluacls_func(L, "__olua_move", _b2ContactEdge___olua_move); - oluacls_prop(L, "contact", _b2ContactEdge_get_contact, _b2ContactEdge_set_contact); - oluacls_prop(L, "next", _b2ContactEdge_get_next, _b2ContactEdge_set_next); - oluacls_prop(L, "other", _b2ContactEdge_get_other, _b2ContactEdge_set_other); - oluacls_prop(L, "prev", _b2ContactEdge_get_prev, _b2ContactEdge_set_prev); + oluacls_func(L, "__gc", _olua_fun_b2ContactEdge___gc); + oluacls_func(L, "__olua_move", _olua_fun_b2ContactEdge___olua_move); + oluacls_prop(L, "contact", _olua_fun_b2ContactEdge_contact, _olua_fun_b2ContactEdge_contact); + oluacls_prop(L, "next", _olua_fun_b2ContactEdge_next, _olua_fun_b2ContactEdge_next); + oluacls_prop(L, "other", _olua_fun_b2ContactEdge_other, _olua_fun_b2ContactEdge_other); + oluacls_prop(L, "prev", _olua_fun_b2ContactEdge_prev, _olua_fun_b2ContactEdge_prev); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_b2_ContactEdge(lua_State *L) +{ + olua_require(L, "box2d", luaopen_box2d); + if (!olua_getclass(L, "b2.ContactEdge")) { + luaL_error(L, "class not found: b2ContactEdge"); + } return 1; } OLUA_END_DECLS -static int _b2ContactManager___gc(lua_State *L) +static int _olua_fun_b2ContactManager___gc(lua_State *L) { olua_startinvoke(L); @@ -14002,7 +16890,7 @@ static int _b2ContactManager___gc(lua_State *L) return 0; } -static int _b2ContactManager___olua_move(lua_State *L) +static int _olua_fun_b2ContactManager___olua_move(lua_State *L) { olua_startinvoke(L); @@ -14014,7 +16902,7 @@ static int _b2ContactManager___olua_move(lua_State *L) return 1; } -static int _b2ContactManager_AddPair(lua_State *L) +static int _olua_fun_b2ContactManager_addPair(lua_State *L) { olua_startinvoke(L); @@ -14034,7 +16922,7 @@ static int _b2ContactManager_AddPair(lua_State *L) return 0; } -static int _b2ContactManager_Collide(lua_State *L) +static int _olua_fun_b2ContactManager_collide(lua_State *L) { olua_startinvoke(L); @@ -14050,7 +16938,7 @@ static int _b2ContactManager_Collide(lua_State *L) return 0; } -static int _b2ContactManager_Destroy(lua_State *L) +static int _olua_fun_b2ContactManager_destroy(lua_State *L) { olua_startinvoke(L); @@ -14068,7 +16956,7 @@ static int _b2ContactManager_Destroy(lua_State *L) return 0; } -static int _b2ContactManager_FindNewContacts(lua_State *L) +static int _olua_fun_b2ContactManager_findNewContacts(lua_State *L) { olua_startinvoke(L); @@ -14084,7 +16972,7 @@ static int _b2ContactManager_FindNewContacts(lua_State *L) return 0; } -static int _b2ContactManager_new(lua_State *L) +static int _olua_fun_b2ContactManager_new(lua_State *L) { olua_startinvoke(L); @@ -14098,87 +16986,32 @@ static int _b2ContactManager_new(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_b2ContactManager(lua_State *L) +static int _olua_cls_b2_ContactManager(lua_State *L) { oluacls_class(L, "b2.ContactManager"); - oluacls_func(L, "__gc", _b2ContactManager___gc); - oluacls_func(L, "__olua_move", _b2ContactManager___olua_move); - oluacls_func(L, "addPair", _b2ContactManager_AddPair); - oluacls_func(L, "collide", _b2ContactManager_Collide); - oluacls_func(L, "destroy", _b2ContactManager_Destroy); - oluacls_func(L, "findNewContacts", _b2ContactManager_FindNewContacts); - oluacls_func(L, "new", _b2ContactManager_new); + oluacls_func(L, "__gc", _olua_fun_b2ContactManager___gc); + oluacls_func(L, "__olua_move", _olua_fun_b2ContactManager___olua_move); + oluacls_func(L, "addPair", _olua_fun_b2ContactManager_addPair); + oluacls_func(L, "collide", _olua_fun_b2ContactManager_collide); + oluacls_func(L, "destroy", _olua_fun_b2ContactManager_destroy); + oluacls_func(L, "findNewContacts", _olua_fun_b2ContactManager_findNewContacts); + oluacls_func(L, "new", _olua_fun_b2ContactManager_new); return 1; } -OLUA_END_DECLS -static int _b2Profile___call(lua_State *L) +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_b2_ContactManager(lua_State *L) { - olua_startinvoke(L); - - b2Profile ret; - - luaL_checktype(L, 2, LUA_TTABLE); - - float arg1 = 0; /** step */ - float arg2 = 0; /** collide */ - float arg3 = 0; /** solve */ - float arg4 = 0; /** solveInit */ - float arg5 = 0; /** solveVelocity */ - float arg6 = 0; /** solvePosition */ - float arg7 = 0; /** broadphase */ - float arg8 = 0; /** solveTOI */ - - olua_getfield(L, 2, "step"); - olua_check_number(L, -1, &arg1); - ret.step = arg1; - lua_pop(L, 1); - - olua_getfield(L, 2, "collide"); - olua_check_number(L, -1, &arg2); - ret.collide = arg2; - lua_pop(L, 1); - - olua_getfield(L, 2, "solve"); - olua_check_number(L, -1, &arg3); - ret.solve = arg3; - lua_pop(L, 1); - - olua_getfield(L, 2, "solveInit"); - olua_check_number(L, -1, &arg4); - ret.solveInit = arg4; - lua_pop(L, 1); - - olua_getfield(L, 2, "solveVelocity"); - olua_check_number(L, -1, &arg5); - ret.solveVelocity = arg5; - lua_pop(L, 1); - - olua_getfield(L, 2, "solvePosition"); - olua_check_number(L, -1, &arg6); - ret.solvePosition = arg6; - lua_pop(L, 1); - - olua_getfield(L, 2, "broadphase"); - olua_check_number(L, -1, &arg7); - ret.broadphase = arg7; - lua_pop(L, 1); - - olua_getfield(L, 2, "solveTOI"); - olua_check_number(L, -1, &arg8); - ret.solveTOI = arg8; - lua_pop(L, 1); - - olua_pushcopy_object(L, ret, "b2.Profile"); - - olua_endinvoke(L); - + olua_require(L, "box2d", luaopen_box2d); + if (!olua_getclass(L, "b2.ContactManager")) { + luaL_error(L, "class not found: b2ContactManager"); + } return 1; } +OLUA_END_DECLS -static int _b2Profile___gc(lua_State *L) +static int _olua_fun_b2Profile___gc(lua_State *L) { olua_startinvoke(L); @@ -14190,7 +17023,7 @@ static int _b2Profile___gc(lua_State *L) return 0; } -static int _b2Profile___olua_move(lua_State *L) +static int _olua_fun_b2Profile___olua_move(lua_State *L) { olua_startinvoke(L); @@ -14202,7 +17035,7 @@ static int _b2Profile___olua_move(lua_State *L) return 1; } -static int _b2Profile_get_broadphase(lua_State *L) +static int _olua_fun_b2Profile_broadphase$1(lua_State *L) { olua_startinvoke(L); @@ -14219,7 +17052,7 @@ static int _b2Profile_get_broadphase(lua_State *L) return num_ret; } -static int _b2Profile_set_broadphase(lua_State *L) +static int _olua_fun_b2Profile_broadphase$2(lua_State *L) { olua_startinvoke(L); @@ -14237,7 +17070,28 @@ static int _b2Profile_set_broadphase(lua_State *L) return 0; } -static int _b2Profile_get_collide(lua_State *L) +static int _olua_fun_b2Profile_broadphase(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float broadphase + return _olua_fun_b2Profile_broadphase$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float broadphase + return _olua_fun_b2Profile_broadphase$2(L); + // } + } + + luaL_error(L, "method 'b2Profile::broadphase' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_b2Profile_collide$1(lua_State *L) { olua_startinvoke(L); @@ -14254,7 +17108,7 @@ static int _b2Profile_get_collide(lua_State *L) return num_ret; } -static int _b2Profile_set_collide(lua_State *L) +static int _olua_fun_b2Profile_collide$2(lua_State *L) { olua_startinvoke(L); @@ -14272,7 +17126,28 @@ static int _b2Profile_set_collide(lua_State *L) return 0; } -static int _b2Profile_get_solve(lua_State *L) +static int _olua_fun_b2Profile_collide(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float collide + return _olua_fun_b2Profile_collide$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float collide + return _olua_fun_b2Profile_collide$2(L); + // } + } + + luaL_error(L, "method 'b2Profile::collide' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_b2Profile_solve$1(lua_State *L) { olua_startinvoke(L); @@ -14289,7 +17164,7 @@ static int _b2Profile_get_solve(lua_State *L) return num_ret; } -static int _b2Profile_set_solve(lua_State *L) +static int _olua_fun_b2Profile_solve$2(lua_State *L) { olua_startinvoke(L); @@ -14307,7 +17182,28 @@ static int _b2Profile_set_solve(lua_State *L) return 0; } -static int _b2Profile_get_solveInit(lua_State *L) +static int _olua_fun_b2Profile_solve(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float solve + return _olua_fun_b2Profile_solve$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float solve + return _olua_fun_b2Profile_solve$2(L); + // } + } + + luaL_error(L, "method 'b2Profile::solve' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_b2Profile_solveInit$1(lua_State *L) { olua_startinvoke(L); @@ -14324,7 +17220,7 @@ static int _b2Profile_get_solveInit(lua_State *L) return num_ret; } -static int _b2Profile_set_solveInit(lua_State *L) +static int _olua_fun_b2Profile_solveInit$2(lua_State *L) { olua_startinvoke(L); @@ -14342,7 +17238,28 @@ static int _b2Profile_set_solveInit(lua_State *L) return 0; } -static int _b2Profile_get_solvePosition(lua_State *L) +static int _olua_fun_b2Profile_solveInit(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float solveInit + return _olua_fun_b2Profile_solveInit$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float solveInit + return _olua_fun_b2Profile_solveInit$2(L); + // } + } + + luaL_error(L, "method 'b2Profile::solveInit' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_b2Profile_solvePosition$1(lua_State *L) { olua_startinvoke(L); @@ -14359,7 +17276,7 @@ static int _b2Profile_get_solvePosition(lua_State *L) return num_ret; } -static int _b2Profile_set_solvePosition(lua_State *L) +static int _olua_fun_b2Profile_solvePosition$2(lua_State *L) { olua_startinvoke(L); @@ -14377,7 +17294,28 @@ static int _b2Profile_set_solvePosition(lua_State *L) return 0; } -static int _b2Profile_get_solveTOI(lua_State *L) +static int _olua_fun_b2Profile_solvePosition(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float solvePosition + return _olua_fun_b2Profile_solvePosition$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float solvePosition + return _olua_fun_b2Profile_solvePosition$2(L); + // } + } + + luaL_error(L, "method 'b2Profile::solvePosition' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_b2Profile_solveTOI$1(lua_State *L) { olua_startinvoke(L); @@ -14394,7 +17332,7 @@ static int _b2Profile_get_solveTOI(lua_State *L) return num_ret; } -static int _b2Profile_set_solveTOI(lua_State *L) +static int _olua_fun_b2Profile_solveTOI$2(lua_State *L) { olua_startinvoke(L); @@ -14412,7 +17350,28 @@ static int _b2Profile_set_solveTOI(lua_State *L) return 0; } -static int _b2Profile_get_solveVelocity(lua_State *L) +static int _olua_fun_b2Profile_solveTOI(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float solveTOI + return _olua_fun_b2Profile_solveTOI$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float solveTOI + return _olua_fun_b2Profile_solveTOI$2(L); + // } + } + + luaL_error(L, "method 'b2Profile::solveTOI' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_b2Profile_solveVelocity$1(lua_State *L) { olua_startinvoke(L); @@ -14429,7 +17388,7 @@ static int _b2Profile_get_solveVelocity(lua_State *L) return num_ret; } -static int _b2Profile_set_solveVelocity(lua_State *L) +static int _olua_fun_b2Profile_solveVelocity$2(lua_State *L) { olua_startinvoke(L); @@ -14447,7 +17406,28 @@ static int _b2Profile_set_solveVelocity(lua_State *L) return 0; } -static int _b2Profile_get_step(lua_State *L) +static int _olua_fun_b2Profile_solveVelocity(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float solveVelocity + return _olua_fun_b2Profile_solveVelocity$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float solveVelocity + return _olua_fun_b2Profile_solveVelocity$2(L); + // } + } + + luaL_error(L, "method 'b2Profile::solveVelocity' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_b2Profile_step$1(lua_State *L) { olua_startinvoke(L); @@ -14464,7 +17444,7 @@ static int _b2Profile_get_step(lua_State *L) return num_ret; } -static int _b2Profile_set_step(lua_State *L) +static int _olua_fun_b2Profile_step$2(lua_State *L) { olua_startinvoke(L); @@ -14482,27 +17462,56 @@ static int _b2Profile_set_step(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_b2Profile(lua_State *L) +static int _olua_fun_b2Profile_step(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float step + return _olua_fun_b2Profile_step$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float step + return _olua_fun_b2Profile_step$2(L); + // } + } + + luaL_error(L, "method 'b2Profile::step' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_cls_b2_Profile(lua_State *L) { oluacls_class(L, "b2.Profile"); - oluacls_func(L, "__call", _b2Profile___call); - oluacls_func(L, "__gc", _b2Profile___gc); - oluacls_func(L, "__olua_move", _b2Profile___olua_move); - oluacls_prop(L, "broadphase", _b2Profile_get_broadphase, _b2Profile_set_broadphase); - oluacls_prop(L, "collide", _b2Profile_get_collide, _b2Profile_set_collide); - oluacls_prop(L, "solve", _b2Profile_get_solve, _b2Profile_set_solve); - oluacls_prop(L, "solveInit", _b2Profile_get_solveInit, _b2Profile_set_solveInit); - oluacls_prop(L, "solvePosition", _b2Profile_get_solvePosition, _b2Profile_set_solvePosition); - oluacls_prop(L, "solveTOI", _b2Profile_get_solveTOI, _b2Profile_set_solveTOI); - oluacls_prop(L, "solveVelocity", _b2Profile_get_solveVelocity, _b2Profile_set_solveVelocity); - oluacls_prop(L, "step", _b2Profile_get_step, _b2Profile_set_step); + oluacls_func(L, "__gc", _olua_fun_b2Profile___gc); + oluacls_func(L, "__olua_move", _olua_fun_b2Profile___olua_move); + oluacls_prop(L, "broadphase", _olua_fun_b2Profile_broadphase, _olua_fun_b2Profile_broadphase); + oluacls_prop(L, "collide", _olua_fun_b2Profile_collide, _olua_fun_b2Profile_collide); + oluacls_prop(L, "solve", _olua_fun_b2Profile_solve, _olua_fun_b2Profile_solve); + oluacls_prop(L, "solveInit", _olua_fun_b2Profile_solveInit, _olua_fun_b2Profile_solveInit); + oluacls_prop(L, "solvePosition", _olua_fun_b2Profile_solvePosition, _olua_fun_b2Profile_solvePosition); + oluacls_prop(L, "solveTOI", _olua_fun_b2Profile_solveTOI, _olua_fun_b2Profile_solveTOI); + oluacls_prop(L, "solveVelocity", _olua_fun_b2Profile_solveVelocity, _olua_fun_b2Profile_solveVelocity); + oluacls_prop(L, "step", _olua_fun_b2Profile_step, _olua_fun_b2Profile_step); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_b2_Profile(lua_State *L) +{ + olua_require(L, "box2d", luaopen_box2d); + if (!olua_getclass(L, "b2.Profile")) { + luaL_error(L, "class not found: b2Profile"); + } return 1; } OLUA_END_DECLS -static int _b2BroadPhase___gc(lua_State *L) +static int _olua_fun_b2BroadPhase___gc(lua_State *L) { olua_startinvoke(L); @@ -14514,7 +17523,7 @@ static int _b2BroadPhase___gc(lua_State *L) return 0; } -static int _b2BroadPhase___olua_move(lua_State *L) +static int _olua_fun_b2BroadPhase___olua_move(lua_State *L) { olua_startinvoke(L); @@ -14526,12 +17535,12 @@ static int _b2BroadPhase___olua_move(lua_State *L) return 1; } -static int _b2BroadPhase_CreateProxy(lua_State *L) +static int _olua_fun_b2BroadPhase_createProxy(lua_State *L) { olua_startinvoke(L); b2BroadPhase *self = nullptr; - b2AABB arg1; /** aabb */ + b2AABB *arg1; /** aabb */ void *arg2 = nullptr; /** userData */ olua_to_object(L, 1, &self, "b2.BroadPhase"); @@ -14539,7 +17548,7 @@ static int _b2BroadPhase_CreateProxy(lua_State *L) olua_check_object(L, 3, &arg2, "void *"); // int32 CreateProxy(const b2AABB &aabb, void *userData) - int32 ret = self->CreateProxy(arg1, arg2); + int32 ret = self->CreateProxy(*arg1, arg2); int num_ret = olua_push_integer(L, ret); olua_endinvoke(L); @@ -14547,7 +17556,7 @@ static int _b2BroadPhase_CreateProxy(lua_State *L) return num_ret; } -static int _b2BroadPhase_DestroyProxy(lua_State *L) +static int _olua_fun_b2BroadPhase_destroyProxy(lua_State *L) { olua_startinvoke(L); @@ -14565,7 +17574,7 @@ static int _b2BroadPhase_DestroyProxy(lua_State *L) return 0; } -static int _b2BroadPhase_GetFatAABB(lua_State *L) +static int _olua_fun_b2BroadPhase_getFatAABB(lua_State *L) { olua_startinvoke(L); @@ -14584,7 +17593,7 @@ static int _b2BroadPhase_GetFatAABB(lua_State *L) return num_ret; } -static int _b2BroadPhase_GetProxyCount(lua_State *L) +static int _olua_fun_b2BroadPhase_getProxyCount(lua_State *L) { olua_startinvoke(L); @@ -14601,7 +17610,7 @@ static int _b2BroadPhase_GetProxyCount(lua_State *L) return num_ret; } -static int _b2BroadPhase_GetTreeBalance(lua_State *L) +static int _olua_fun_b2BroadPhase_getTreeBalance(lua_State *L) { olua_startinvoke(L); @@ -14618,7 +17627,7 @@ static int _b2BroadPhase_GetTreeBalance(lua_State *L) return num_ret; } -static int _b2BroadPhase_GetTreeHeight(lua_State *L) +static int _olua_fun_b2BroadPhase_getTreeHeight(lua_State *L) { olua_startinvoke(L); @@ -14635,7 +17644,7 @@ static int _b2BroadPhase_GetTreeHeight(lua_State *L) return num_ret; } -static int _b2BroadPhase_GetTreeQuality(lua_State *L) +static int _olua_fun_b2BroadPhase_getTreeQuality(lua_State *L) { olua_startinvoke(L); @@ -14652,7 +17661,7 @@ static int _b2BroadPhase_GetTreeQuality(lua_State *L) return num_ret; } -static int _b2BroadPhase_GetUserData(lua_State *L) +static int _olua_fun_b2BroadPhase_getUserData(lua_State *L) { olua_startinvoke(L); @@ -14671,14 +17680,14 @@ static int _b2BroadPhase_GetUserData(lua_State *L) return num_ret; } -static int _b2BroadPhase_MoveProxy(lua_State *L) +static int _olua_fun_b2BroadPhase_moveProxy(lua_State *L) { olua_startinvoke(L); b2BroadPhase *self = nullptr; int32 arg1 = 0; /** proxyId */ - b2AABB arg2; /** aabb */ - b2Vec2 arg3; /** displacement */ + b2AABB *arg2; /** aabb */ + b2Vec2 *arg3; /** displacement */ olua_to_object(L, 1, &self, "b2.BroadPhase"); olua_check_integer(L, 2, &arg1); @@ -14686,14 +17695,14 @@ static int _b2BroadPhase_MoveProxy(lua_State *L) olua_check_object(L, 4, &arg3, "b2.Vec2"); // void MoveProxy(int32 proxyId, const b2AABB &aabb, const b2Vec2 &displacement) - self->MoveProxy(arg1, arg2, arg3); + self->MoveProxy(arg1, *arg2, *arg3); olua_endinvoke(L); return 0; } -static int _b2BroadPhase_new(lua_State *L) +static int _olua_fun_b2BroadPhase_new(lua_State *L) { olua_startinvoke(L); @@ -14707,25 +17716,25 @@ static int _b2BroadPhase_new(lua_State *L) return num_ret; } -static int _b2BroadPhase_ShiftOrigin(lua_State *L) +static int _olua_fun_b2BroadPhase_shiftOrigin(lua_State *L) { olua_startinvoke(L); b2BroadPhase *self = nullptr; - b2Vec2 arg1; /** newOrigin */ + b2Vec2 *arg1; /** newOrigin */ olua_to_object(L, 1, &self, "b2.BroadPhase"); olua_check_object(L, 2, &arg1, "b2.Vec2"); // void ShiftOrigin(const b2Vec2 &newOrigin) - self->ShiftOrigin(arg1); + self->ShiftOrigin(*arg1); olua_endinvoke(L); return 0; } -static int _b2BroadPhase_TestOverlap(lua_State *L) +static int _olua_fun_b2BroadPhase_testOverlap(lua_State *L) { olua_startinvoke(L); @@ -14746,7 +17755,7 @@ static int _b2BroadPhase_TestOverlap(lua_State *L) return num_ret; } -static int _b2BroadPhase_TouchProxy(lua_State *L) +static int _olua_fun_b2BroadPhase_touchProxy(lua_State *L) { olua_startinvoke(L); @@ -14764,63 +17773,44 @@ static int _b2BroadPhase_TouchProxy(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_b2BroadPhase(lua_State *L) +static int _olua_cls_b2_BroadPhase(lua_State *L) { oluacls_class(L, "b2.BroadPhase"); - oluacls_func(L, "__gc", _b2BroadPhase___gc); - oluacls_func(L, "__olua_move", _b2BroadPhase___olua_move); - oluacls_func(L, "createProxy", _b2BroadPhase_CreateProxy); - oluacls_func(L, "destroyProxy", _b2BroadPhase_DestroyProxy); - oluacls_func(L, "getFatAABB", _b2BroadPhase_GetFatAABB); - oluacls_func(L, "getProxyCount", _b2BroadPhase_GetProxyCount); - oluacls_func(L, "getTreeBalance", _b2BroadPhase_GetTreeBalance); - oluacls_func(L, "getTreeHeight", _b2BroadPhase_GetTreeHeight); - oluacls_func(L, "getTreeQuality", _b2BroadPhase_GetTreeQuality); - oluacls_func(L, "getUserData", _b2BroadPhase_GetUserData); - oluacls_func(L, "moveProxy", _b2BroadPhase_MoveProxy); - oluacls_func(L, "new", _b2BroadPhase_new); - oluacls_func(L, "shiftOrigin", _b2BroadPhase_ShiftOrigin); - oluacls_func(L, "testOverlap", _b2BroadPhase_TestOverlap); - oluacls_func(L, "touchProxy", _b2BroadPhase_TouchProxy); - oluacls_prop(L, "proxyCount", _b2BroadPhase_GetProxyCount, nullptr); - oluacls_prop(L, "treeBalance", _b2BroadPhase_GetTreeBalance, nullptr); - oluacls_prop(L, "treeHeight", _b2BroadPhase_GetTreeHeight, nullptr); - oluacls_prop(L, "treeQuality", _b2BroadPhase_GetTreeQuality, nullptr); + oluacls_func(L, "__gc", _olua_fun_b2BroadPhase___gc); + oluacls_func(L, "__olua_move", _olua_fun_b2BroadPhase___olua_move); + oluacls_func(L, "createProxy", _olua_fun_b2BroadPhase_createProxy); + oluacls_func(L, "destroyProxy", _olua_fun_b2BroadPhase_destroyProxy); + oluacls_func(L, "getFatAABB", _olua_fun_b2BroadPhase_getFatAABB); + oluacls_func(L, "getProxyCount", _olua_fun_b2BroadPhase_getProxyCount); + oluacls_func(L, "getTreeBalance", _olua_fun_b2BroadPhase_getTreeBalance); + oluacls_func(L, "getTreeHeight", _olua_fun_b2BroadPhase_getTreeHeight); + oluacls_func(L, "getTreeQuality", _olua_fun_b2BroadPhase_getTreeQuality); + oluacls_func(L, "getUserData", _olua_fun_b2BroadPhase_getUserData); + oluacls_func(L, "moveProxy", _olua_fun_b2BroadPhase_moveProxy); + oluacls_func(L, "new", _olua_fun_b2BroadPhase_new); + oluacls_func(L, "shiftOrigin", _olua_fun_b2BroadPhase_shiftOrigin); + oluacls_func(L, "testOverlap", _olua_fun_b2BroadPhase_testOverlap); + oluacls_func(L, "touchProxy", _olua_fun_b2BroadPhase_touchProxy); + oluacls_prop(L, "proxyCount", _olua_fun_b2BroadPhase_getProxyCount, nullptr); + oluacls_prop(L, "treeBalance", _olua_fun_b2BroadPhase_getTreeBalance, nullptr); + oluacls_prop(L, "treeHeight", _olua_fun_b2BroadPhase_getTreeHeight, nullptr); + oluacls_prop(L, "treeQuality", _olua_fun_b2BroadPhase_getTreeQuality, nullptr); return 1; } -OLUA_END_DECLS -static int _b2AABB___call(lua_State *L) +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_b2_BroadPhase(lua_State *L) { - olua_startinvoke(L); - - b2AABB ret; - - luaL_checktype(L, 2, LUA_TTABLE); - - b2Vec2 arg1; /** lowerBound */ - b2Vec2 arg2; /** upperBound */ - - olua_getfield(L, 2, "lowerBound"); - olua_check_object(L, -1, &arg1, "b2.Vec2"); - ret.lowerBound = arg1; - lua_pop(L, 1); - - olua_getfield(L, 2, "upperBound"); - olua_check_object(L, -1, &arg2, "b2.Vec2"); - ret.upperBound = arg2; - lua_pop(L, 1); - - olua_pushcopy_object(L, ret, "b2.AABB"); - - olua_endinvoke(L); - + olua_require(L, "box2d", luaopen_box2d); + if (!olua_getclass(L, "b2.BroadPhase")) { + luaL_error(L, "class not found: b2BroadPhase"); + } return 1; } +OLUA_END_DECLS -static int _b2AABB___gc(lua_State *L) +static int _olua_fun_b2AABB___gc(lua_State *L) { olua_startinvoke(L); @@ -14832,7 +17822,7 @@ static int _b2AABB___gc(lua_State *L) return 0; } -static int _b2AABB___olua_move(lua_State *L) +static int _olua_fun_b2AABB___olua_move(lua_State *L) { olua_startinvoke(L); @@ -14844,79 +17834,79 @@ static int _b2AABB___olua_move(lua_State *L) return 1; } -static int _b2AABB_Combine$1(lua_State *L) +static int _olua_fun_b2AABB_combine$1(lua_State *L) { olua_startinvoke(L); b2AABB *self = nullptr; - b2AABB arg1; /** aabb */ + b2AABB *arg1; /** aabb */ olua_to_object(L, 1, &self, "b2.AABB"); olua_check_object(L, 2, &arg1, "b2.AABB"); // void Combine(const b2AABB &aabb) - self->Combine(arg1); + self->Combine(*arg1); olua_endinvoke(L); return 0; } -static int _b2AABB_Combine$2(lua_State *L) +static int _olua_fun_b2AABB_combine$2(lua_State *L) { olua_startinvoke(L); b2AABB *self = nullptr; - b2AABB arg1; /** aabb1 */ - b2AABB arg2; /** aabb2 */ + b2AABB *arg1; /** aabb1 */ + b2AABB *arg2; /** aabb2 */ olua_to_object(L, 1, &self, "b2.AABB"); olua_check_object(L, 2, &arg1, "b2.AABB"); olua_check_object(L, 3, &arg2, "b2.AABB"); // void Combine(const b2AABB &aabb1, const b2AABB &aabb2) - self->Combine(arg1, arg2); + self->Combine(*arg1, *arg2); olua_endinvoke(L); return 0; } -static int _b2AABB_Combine(lua_State *L) +static int _olua_fun_b2AABB_combine(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_object(L, 2, "b2.AABB"))) { // void Combine(const b2AABB &aabb) - return _b2AABB_Combine$1(L); + return _olua_fun_b2AABB_combine$1(L); // } } if (num_args == 2) { // if ((olua_is_object(L, 2, "b2.AABB")) && (olua_is_object(L, 3, "b2.AABB"))) { // void Combine(const b2AABB &aabb1, const b2AABB &aabb2) - return _b2AABB_Combine$2(L); + return _olua_fun_b2AABB_combine$2(L); // } } - luaL_error(L, "method 'b2AABB::Combine' not support '%d' arguments", num_args); + luaL_error(L, "method 'b2AABB::combine' not support '%d' arguments", num_args); return 0; } -static int _b2AABB_Contains(lua_State *L) +static int _olua_fun_b2AABB_contains(lua_State *L) { olua_startinvoke(L); b2AABB *self = nullptr; - b2AABB arg1; /** aabb */ + b2AABB *arg1; /** aabb */ olua_to_object(L, 1, &self, "b2.AABB"); olua_check_object(L, 2, &arg1, "b2.AABB"); // bool Contains(const b2AABB &aabb) - bool ret = self->Contains(arg1); + bool ret = self->Contains(*arg1); int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); @@ -14924,7 +17914,7 @@ static int _b2AABB_Contains(lua_State *L) return num_ret; } -static int _b2AABB_GetCenter(lua_State *L) +static int _olua_fun_b2AABB_getCenter(lua_State *L) { olua_startinvoke(L); @@ -14934,14 +17924,14 @@ static int _b2AABB_GetCenter(lua_State *L) // b2Vec2 GetCenter() b2Vec2 ret = self->GetCenter(); - int num_ret = olua_pushcopy_object(L, ret, "b2.Vec2"); + int num_ret = olua_copy_object(L, ret, "b2.Vec2"); olua_endinvoke(L); return num_ret; } -static int _b2AABB_GetExtents(lua_State *L) +static int _olua_fun_b2AABB_getExtents(lua_State *L) { olua_startinvoke(L); @@ -14951,14 +17941,14 @@ static int _b2AABB_GetExtents(lua_State *L) // b2Vec2 GetExtents() b2Vec2 ret = self->GetExtents(); - int num_ret = olua_pushcopy_object(L, ret, "b2.Vec2"); + int num_ret = olua_copy_object(L, ret, "b2.Vec2"); olua_endinvoke(L); return num_ret; } -static int _b2AABB_GetPerimeter(lua_State *L) +static int _olua_fun_b2AABB_getPerimeter(lua_State *L) { olua_startinvoke(L); @@ -14975,7 +17965,7 @@ static int _b2AABB_GetPerimeter(lua_State *L) return num_ret; } -static int _b2AABB_IsValid(lua_State *L) +static int _olua_fun_b2AABB_isValid(lua_State *L) { olua_startinvoke(L); @@ -14992,63 +17982,84 @@ static int _b2AABB_IsValid(lua_State *L) return num_ret; } -static int _b2AABB_RayCast(lua_State *L) +static int _olua_fun_b2AABB_lowerBound$1(lua_State *L) { olua_startinvoke(L); b2AABB *self = nullptr; - b2RayCastOutput *arg1 = nullptr; /** output */ - b2RayCastInput arg2; /** input */ olua_to_object(L, 1, &self, "b2.AABB"); - olua_check_object(L, 2, &arg1, "b2.RayCastOutput"); - olua_check_object(L, 3, &arg2, "b2.RayCastInput"); - // bool RayCast(b2RayCastOutput *output, const b2RayCastInput &input) - bool ret = self->RayCast(arg1, arg2); - int num_ret = olua_push_bool(L, ret); + // b2Vec2 lowerBound + b2Vec2 &ret = self->lowerBound; + int num_ret = olua_copy_object(L, ret, "b2.Vec2"); olua_endinvoke(L); return num_ret; } -static int _b2AABB_get_lowerBound(lua_State *L) +static int _olua_fun_b2AABB_lowerBound$2(lua_State *L) { olua_startinvoke(L); b2AABB *self = nullptr; + b2Vec2 *arg1; /** lowerBound */ olua_to_object(L, 1, &self, "b2.AABB"); + olua_check_object(L, 2, &arg1, "b2.Vec2"); // b2Vec2 lowerBound - b2Vec2 &ret = self->lowerBound; - int num_ret = olua_pushcopy_object(L, ret, "b2.Vec2"); + self->lowerBound = *arg1; olua_endinvoke(L); - return num_ret; + return 0; +} + +static int _olua_fun_b2AABB_lowerBound(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // b2Vec2 lowerBound + return _olua_fun_b2AABB_lowerBound$1(L); + } + + if (num_args == 1) { + // if ((olua_is_object(L, 2, "b2.Vec2"))) { + // b2Vec2 lowerBound + return _olua_fun_b2AABB_lowerBound$2(L); + // } + } + + luaL_error(L, "method 'b2AABB::lowerBound' not support '%d' arguments", num_args); + + return 0; } -static int _b2AABB_set_lowerBound(lua_State *L) +static int _olua_fun_b2AABB_rayCast(lua_State *L) { olua_startinvoke(L); b2AABB *self = nullptr; - b2Vec2 arg1; /** lowerBound */ + b2RayCastOutput *arg1 = nullptr; /** output */ + b2RayCastInput *arg2; /** input */ olua_to_object(L, 1, &self, "b2.AABB"); - olua_check_object(L, 2, &arg1, "b2.Vec2"); + olua_check_object(L, 2, &arg1, "b2.RayCastOutput"); + olua_check_object(L, 3, &arg2, "b2.RayCastInput"); - // b2Vec2 lowerBound - self->lowerBound = arg1; + // bool RayCast(b2RayCastOutput *output, const b2RayCastInput &input) + bool ret = self->RayCast(arg1, *arg2); + int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); - return 0; + return num_ret; } -static int _b2AABB_get_upperBound(lua_State *L) +static int _olua_fun_b2AABB_upperBound$1(lua_State *L) { olua_startinvoke(L); @@ -15058,57 +18069,86 @@ static int _b2AABB_get_upperBound(lua_State *L) // b2Vec2 upperBound b2Vec2 &ret = self->upperBound; - int num_ret = olua_pushcopy_object(L, ret, "b2.Vec2"); + int num_ret = olua_copy_object(L, ret, "b2.Vec2"); olua_endinvoke(L); return num_ret; } -static int _b2AABB_set_upperBound(lua_State *L) +static int _olua_fun_b2AABB_upperBound$2(lua_State *L) { olua_startinvoke(L); b2AABB *self = nullptr; - b2Vec2 arg1; /** upperBound */ + b2Vec2 *arg1; /** upperBound */ olua_to_object(L, 1, &self, "b2.AABB"); olua_check_object(L, 2, &arg1, "b2.Vec2"); // b2Vec2 upperBound - self->upperBound = arg1; + self->upperBound = *arg1; olua_endinvoke(L); return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_b2AABB(lua_State *L) +static int _olua_fun_b2AABB_upperBound(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // b2Vec2 upperBound + return _olua_fun_b2AABB_upperBound$1(L); + } + + if (num_args == 1) { + // if ((olua_is_object(L, 2, "b2.Vec2"))) { + // b2Vec2 upperBound + return _olua_fun_b2AABB_upperBound$2(L); + // } + } + + luaL_error(L, "method 'b2AABB::upperBound' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_cls_b2_AABB(lua_State *L) { oluacls_class(L, "b2.AABB"); - oluacls_func(L, "__call", _b2AABB___call); - oluacls_func(L, "__gc", _b2AABB___gc); - oluacls_func(L, "__olua_move", _b2AABB___olua_move); - oluacls_func(L, "combine", _b2AABB_Combine); - oluacls_func(L, "contains", _b2AABB_Contains); - oluacls_func(L, "getCenter", _b2AABB_GetCenter); - oluacls_func(L, "getExtents", _b2AABB_GetExtents); - oluacls_func(L, "getPerimeter", _b2AABB_GetPerimeter); - oluacls_func(L, "isValid", _b2AABB_IsValid); - oluacls_func(L, "rayCast", _b2AABB_RayCast); - oluacls_prop(L, "center", _b2AABB_GetCenter, nullptr); - oluacls_prop(L, "extents", _b2AABB_GetExtents, nullptr); - oluacls_prop(L, "perimeter", _b2AABB_GetPerimeter, nullptr); - oluacls_prop(L, "valid", _b2AABB_IsValid, nullptr); - oluacls_prop(L, "lowerBound", _b2AABB_get_lowerBound, _b2AABB_set_lowerBound); - oluacls_prop(L, "upperBound", _b2AABB_get_upperBound, _b2AABB_set_upperBound); + oluacls_func(L, "__gc", _olua_fun_b2AABB___gc); + oluacls_func(L, "__olua_move", _olua_fun_b2AABB___olua_move); + oluacls_func(L, "combine", _olua_fun_b2AABB_combine); + oluacls_func(L, "contains", _olua_fun_b2AABB_contains); + oluacls_func(L, "getCenter", _olua_fun_b2AABB_getCenter); + oluacls_func(L, "getExtents", _olua_fun_b2AABB_getExtents); + oluacls_func(L, "getPerimeter", _olua_fun_b2AABB_getPerimeter); + oluacls_func(L, "isValid", _olua_fun_b2AABB_isValid); + oluacls_func(L, "rayCast", _olua_fun_b2AABB_rayCast); + oluacls_prop(L, "center", _olua_fun_b2AABB_getCenter, nullptr); + oluacls_prop(L, "extents", _olua_fun_b2AABB_getExtents, nullptr); + oluacls_prop(L, "perimeter", _olua_fun_b2AABB_getPerimeter, nullptr); + oluacls_prop(L, "valid", _olua_fun_b2AABB_isValid, nullptr); + oluacls_prop(L, "lowerBound", _olua_fun_b2AABB_lowerBound, _olua_fun_b2AABB_lowerBound); + oluacls_prop(L, "upperBound", _olua_fun_b2AABB_upperBound, _olua_fun_b2AABB_upperBound); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_b2_AABB(lua_State *L) +{ + olua_require(L, "box2d", luaopen_box2d); + if (!olua_getclass(L, "b2.AABB")) { + luaL_error(L, "class not found: b2AABB"); + } return 1; } OLUA_END_DECLS -static int _b2Contact___olua_move(lua_State *L) +static int _olua_fun_b2Contact___olua_move(lua_State *L) { olua_startinvoke(L); @@ -15120,14 +18160,14 @@ static int _b2Contact___olua_move(lua_State *L) return 1; } -static int _b2Contact_Evaluate(lua_State *L) +static int _olua_fun_b2Contact_evaluate(lua_State *L) { olua_startinvoke(L); b2Contact *self = nullptr; b2Manifold *arg1 = nullptr; /** manifold */ - b2Transform arg2; /** xfA */ - b2Transform arg3; /** xfB */ + b2Transform *arg2; /** xfA */ + b2Transform *arg3; /** xfB */ olua_to_object(L, 1, &self, "b2.Contact"); olua_check_object(L, 2, &arg1, "b2.Manifold"); @@ -15135,14 +18175,14 @@ static int _b2Contact_Evaluate(lua_State *L) olua_check_object(L, 4, &arg3, "b2.Transform"); // void Evaluate(b2Manifold *manifold, const b2Transform &xfA, const b2Transform &xfB) - self->Evaluate(arg1, arg2, arg3); + self->Evaluate(arg1, *arg2, *arg3); olua_endinvoke(L); return 0; } -static int _b2Contact_GetChildIndexA(lua_State *L) +static int _olua_fun_b2Contact_getChildIndexA(lua_State *L) { olua_startinvoke(L); @@ -15159,7 +18199,7 @@ static int _b2Contact_GetChildIndexA(lua_State *L) return num_ret; } -static int _b2Contact_GetChildIndexB(lua_State *L) +static int _olua_fun_b2Contact_getChildIndexB(lua_State *L) { olua_startinvoke(L); @@ -15176,7 +18216,7 @@ static int _b2Contact_GetChildIndexB(lua_State *L) return num_ret; } -static int _b2Contact_GetFixtureA(lua_State *L) +static int _olua_fun_b2Contact_getFixtureA(lua_State *L) { olua_startinvoke(L); @@ -15193,7 +18233,7 @@ static int _b2Contact_GetFixtureA(lua_State *L) return num_ret; } -static int _b2Contact_GetFixtureB(lua_State *L) +static int _olua_fun_b2Contact_getFixtureB(lua_State *L) { olua_startinvoke(L); @@ -15210,7 +18250,7 @@ static int _b2Contact_GetFixtureB(lua_State *L) return num_ret; } -static int _b2Contact_GetFriction(lua_State *L) +static int _olua_fun_b2Contact_getFriction(lua_State *L) { olua_startinvoke(L); @@ -15227,7 +18267,7 @@ static int _b2Contact_GetFriction(lua_State *L) return num_ret; } -static int _b2Contact_GetManifold(lua_State *L) +static int _olua_fun_b2Contact_getManifold(lua_State *L) { olua_startinvoke(L); @@ -15244,7 +18284,7 @@ static int _b2Contact_GetManifold(lua_State *L) return num_ret; } -static int _b2Contact_GetNext(lua_State *L) +static int _olua_fun_b2Contact_getNext(lua_State *L) { olua_startinvoke(L); @@ -15261,7 +18301,7 @@ static int _b2Contact_GetNext(lua_State *L) return num_ret; } -static int _b2Contact_GetRestitution(lua_State *L) +static int _olua_fun_b2Contact_getRestitution(lua_State *L) { olua_startinvoke(L); @@ -15278,7 +18318,7 @@ static int _b2Contact_GetRestitution(lua_State *L) return num_ret; } -static int _b2Contact_GetRestitutionThreshold(lua_State *L) +static int _olua_fun_b2Contact_getRestitutionThreshold(lua_State *L) { olua_startinvoke(L); @@ -15295,7 +18335,7 @@ static int _b2Contact_GetRestitutionThreshold(lua_State *L) return num_ret; } -static int _b2Contact_GetTangentSpeed(lua_State *L) +static int _olua_fun_b2Contact_getTangentSpeed(lua_State *L) { olua_startinvoke(L); @@ -15312,7 +18352,7 @@ static int _b2Contact_GetTangentSpeed(lua_State *L) return num_ret; } -static int _b2Contact_GetWorldManifold(lua_State *L) +static int _olua_fun_b2Contact_getWorldManifold(lua_State *L) { olua_startinvoke(L); @@ -15330,7 +18370,7 @@ static int _b2Contact_GetWorldManifold(lua_State *L) return 0; } -static int _b2Contact_IsEnabled(lua_State *L) +static int _olua_fun_b2Contact_isEnabled(lua_State *L) { olua_startinvoke(L); @@ -15347,7 +18387,7 @@ static int _b2Contact_IsEnabled(lua_State *L) return num_ret; } -static int _b2Contact_IsTouching(lua_State *L) +static int _olua_fun_b2Contact_isTouching(lua_State *L) { olua_startinvoke(L); @@ -15364,7 +18404,7 @@ static int _b2Contact_IsTouching(lua_State *L) return num_ret; } -static int _b2Contact_ResetFriction(lua_State *L) +static int _olua_fun_b2Contact_resetFriction(lua_State *L) { olua_startinvoke(L); @@ -15380,7 +18420,7 @@ static int _b2Contact_ResetFriction(lua_State *L) return 0; } -static int _b2Contact_ResetRestitution(lua_State *L) +static int _olua_fun_b2Contact_resetRestitution(lua_State *L) { olua_startinvoke(L); @@ -15396,7 +18436,7 @@ static int _b2Contact_ResetRestitution(lua_State *L) return 0; } -static int _b2Contact_ResetRestitutionThreshold(lua_State *L) +static int _olua_fun_b2Contact_resetRestitutionThreshold(lua_State *L) { olua_startinvoke(L); @@ -15412,7 +18452,7 @@ static int _b2Contact_ResetRestitutionThreshold(lua_State *L) return 0; } -static int _b2Contact_SetEnabled(lua_State *L) +static int _olua_fun_b2Contact_setEnabled(lua_State *L) { olua_startinvoke(L); @@ -15430,7 +18470,7 @@ static int _b2Contact_SetEnabled(lua_State *L) return 0; } -static int _b2Contact_SetFriction(lua_State *L) +static int _olua_fun_b2Contact_setFriction(lua_State *L) { olua_startinvoke(L); @@ -15448,7 +18488,7 @@ static int _b2Contact_SetFriction(lua_State *L) return 0; } -static int _b2Contact_SetRestitution(lua_State *L) +static int _olua_fun_b2Contact_setRestitution(lua_State *L) { olua_startinvoke(L); @@ -15466,7 +18506,7 @@ static int _b2Contact_SetRestitution(lua_State *L) return 0; } -static int _b2Contact_SetRestitutionThreshold(lua_State *L) +static int _olua_fun_b2Contact_setRestitutionThreshold(lua_State *L) { olua_startinvoke(L); @@ -15484,7 +18524,7 @@ static int _b2Contact_SetRestitutionThreshold(lua_State *L) return 0; } -static int _b2Contact_SetTangentSpeed(lua_State *L) +static int _olua_fun_b2Contact_setTangentSpeed(lua_State *L) { olua_startinvoke(L); @@ -15502,73 +18542,60 @@ static int _b2Contact_SetTangentSpeed(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_b2Contact(lua_State *L) +static int _olua_cls_b2_Contact(lua_State *L) { oluacls_class(L, "b2.Contact"); - oluacls_func(L, "__olua_move", _b2Contact___olua_move); - oluacls_func(L, "evaluate", _b2Contact_Evaluate); - oluacls_func(L, "getChildIndexA", _b2Contact_GetChildIndexA); - oluacls_func(L, "getChildIndexB", _b2Contact_GetChildIndexB); - oluacls_func(L, "getFixtureA", _b2Contact_GetFixtureA); - oluacls_func(L, "getFixtureB", _b2Contact_GetFixtureB); - oluacls_func(L, "getFriction", _b2Contact_GetFriction); - oluacls_func(L, "getManifold", _b2Contact_GetManifold); - oluacls_func(L, "getNext", _b2Contact_GetNext); - oluacls_func(L, "getRestitution", _b2Contact_GetRestitution); - oluacls_func(L, "getRestitutionThreshold", _b2Contact_GetRestitutionThreshold); - oluacls_func(L, "getTangentSpeed", _b2Contact_GetTangentSpeed); - oluacls_func(L, "getWorldManifold", _b2Contact_GetWorldManifold); - oluacls_func(L, "isEnabled", _b2Contact_IsEnabled); - oluacls_func(L, "isTouching", _b2Contact_IsTouching); - oluacls_func(L, "resetFriction", _b2Contact_ResetFriction); - oluacls_func(L, "resetRestitution", _b2Contact_ResetRestitution); - oluacls_func(L, "resetRestitutionThreshold", _b2Contact_ResetRestitutionThreshold); - oluacls_func(L, "setEnabled", _b2Contact_SetEnabled); - oluacls_func(L, "setFriction", _b2Contact_SetFriction); - oluacls_func(L, "setRestitution", _b2Contact_SetRestitution); - oluacls_func(L, "setRestitutionThreshold", _b2Contact_SetRestitutionThreshold); - oluacls_func(L, "setTangentSpeed", _b2Contact_SetTangentSpeed); - oluacls_prop(L, "childIndexA", _b2Contact_GetChildIndexA, nullptr); - oluacls_prop(L, "childIndexB", _b2Contact_GetChildIndexB, nullptr); - oluacls_prop(L, "enabled", _b2Contact_IsEnabled, _b2Contact_SetEnabled); - oluacls_prop(L, "fixtureA", _b2Contact_GetFixtureA, nullptr); - oluacls_prop(L, "fixtureB", _b2Contact_GetFixtureB, nullptr); - oluacls_prop(L, "friction", _b2Contact_GetFriction, _b2Contact_SetFriction); - oluacls_prop(L, "manifold", _b2Contact_GetManifold, nullptr); - oluacls_prop(L, "next", _b2Contact_GetNext, nullptr); - oluacls_prop(L, "restitution", _b2Contact_GetRestitution, _b2Contact_SetRestitution); - oluacls_prop(L, "restitutionThreshold", _b2Contact_GetRestitutionThreshold, _b2Contact_SetRestitutionThreshold); - oluacls_prop(L, "tangentSpeed", _b2Contact_GetTangentSpeed, _b2Contact_SetTangentSpeed); - oluacls_prop(L, "touching", _b2Contact_IsTouching, nullptr); + oluacls_func(L, "__olua_move", _olua_fun_b2Contact___olua_move); + oluacls_func(L, "evaluate", _olua_fun_b2Contact_evaluate); + oluacls_func(L, "getChildIndexA", _olua_fun_b2Contact_getChildIndexA); + oluacls_func(L, "getChildIndexB", _olua_fun_b2Contact_getChildIndexB); + oluacls_func(L, "getFixtureA", _olua_fun_b2Contact_getFixtureA); + oluacls_func(L, "getFixtureB", _olua_fun_b2Contact_getFixtureB); + oluacls_func(L, "getFriction", _olua_fun_b2Contact_getFriction); + oluacls_func(L, "getManifold", _olua_fun_b2Contact_getManifold); + oluacls_func(L, "getNext", _olua_fun_b2Contact_getNext); + oluacls_func(L, "getRestitution", _olua_fun_b2Contact_getRestitution); + oluacls_func(L, "getRestitutionThreshold", _olua_fun_b2Contact_getRestitutionThreshold); + oluacls_func(L, "getTangentSpeed", _olua_fun_b2Contact_getTangentSpeed); + oluacls_func(L, "getWorldManifold", _olua_fun_b2Contact_getWorldManifold); + oluacls_func(L, "isEnabled", _olua_fun_b2Contact_isEnabled); + oluacls_func(L, "isTouching", _olua_fun_b2Contact_isTouching); + oluacls_func(L, "resetFriction", _olua_fun_b2Contact_resetFriction); + oluacls_func(L, "resetRestitution", _olua_fun_b2Contact_resetRestitution); + oluacls_func(L, "resetRestitutionThreshold", _olua_fun_b2Contact_resetRestitutionThreshold); + oluacls_func(L, "setEnabled", _olua_fun_b2Contact_setEnabled); + oluacls_func(L, "setFriction", _olua_fun_b2Contact_setFriction); + oluacls_func(L, "setRestitution", _olua_fun_b2Contact_setRestitution); + oluacls_func(L, "setRestitutionThreshold", _olua_fun_b2Contact_setRestitutionThreshold); + oluacls_func(L, "setTangentSpeed", _olua_fun_b2Contact_setTangentSpeed); + oluacls_prop(L, "childIndexA", _olua_fun_b2Contact_getChildIndexA, nullptr); + oluacls_prop(L, "childIndexB", _olua_fun_b2Contact_getChildIndexB, nullptr); + oluacls_prop(L, "enabled", _olua_fun_b2Contact_isEnabled, _olua_fun_b2Contact_setEnabled); + oluacls_prop(L, "fixtureA", _olua_fun_b2Contact_getFixtureA, nullptr); + oluacls_prop(L, "fixtureB", _olua_fun_b2Contact_getFixtureB, nullptr); + oluacls_prop(L, "friction", _olua_fun_b2Contact_getFriction, _olua_fun_b2Contact_setFriction); + oluacls_prop(L, "manifold", _olua_fun_b2Contact_getManifold, nullptr); + oluacls_prop(L, "next", _olua_fun_b2Contact_getNext, nullptr); + oluacls_prop(L, "restitution", _olua_fun_b2Contact_getRestitution, _olua_fun_b2Contact_setRestitution); + oluacls_prop(L, "restitutionThreshold", _olua_fun_b2Contact_getRestitutionThreshold, _olua_fun_b2Contact_setRestitutionThreshold); + oluacls_prop(L, "tangentSpeed", _olua_fun_b2Contact_getTangentSpeed, _olua_fun_b2Contact_setTangentSpeed); + oluacls_prop(L, "touching", _olua_fun_b2Contact_isTouching, nullptr); return 1; } -OLUA_END_DECLS -static int _b2ContactImpulse___call(lua_State *L) +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_b2_Contact(lua_State *L) { - olua_startinvoke(L); - - b2ContactImpulse ret; - - luaL_checktype(L, 2, LUA_TTABLE); - - int32 arg1 = 0; /** count */ - - olua_getfield(L, 2, "count"); - olua_check_integer(L, -1, &arg1); - ret.count = arg1; - lua_pop(L, 1); - - olua_pushcopy_object(L, ret, "b2.ContactImpulse"); - - olua_endinvoke(L); - + olua_require(L, "box2d", luaopen_box2d); + if (!olua_getclass(L, "b2.Contact")) { + luaL_error(L, "class not found: b2Contact"); + } return 1; } +OLUA_END_DECLS -static int _b2ContactImpulse___gc(lua_State *L) +static int _olua_fun_b2ContactImpulse___gc(lua_State *L) { olua_startinvoke(L); @@ -15580,7 +18607,7 @@ static int _b2ContactImpulse___gc(lua_State *L) return 0; } -static int _b2ContactImpulse___olua_move(lua_State *L) +static int _olua_fun_b2ContactImpulse___olua_move(lua_State *L) { olua_startinvoke(L); @@ -15592,7 +18619,7 @@ static int _b2ContactImpulse___olua_move(lua_State *L) return 1; } -static int _b2ContactImpulse_get_count(lua_State *L) +static int _olua_fun_b2ContactImpulse_count$1(lua_State *L) { olua_startinvoke(L); @@ -15609,7 +18636,7 @@ static int _b2ContactImpulse_get_count(lua_State *L) return num_ret; } -static int _b2ContactImpulse_set_count(lua_State *L) +static int _olua_fun_b2ContactImpulse_count$2(lua_State *L) { olua_startinvoke(L); @@ -15627,60 +18654,49 @@ static int _b2ContactImpulse_set_count(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_b2ContactImpulse(lua_State *L) -{ - oluacls_class(L, "b2.ContactImpulse"); - oluacls_func(L, "__call", _b2ContactImpulse___call); - oluacls_func(L, "__gc", _b2ContactImpulse___gc); - oluacls_func(L, "__olua_move", _b2ContactImpulse___olua_move); - oluacls_prop(L, "count", _b2ContactImpulse_get_count, _b2ContactImpulse_set_count); - - return 1; -} -OLUA_END_DECLS - -static int _b2Manifold___call(lua_State *L) +static int _olua_fun_b2ContactImpulse_count(lua_State *L) { - olua_startinvoke(L); - - b2Manifold ret; - - luaL_checktype(L, 2, LUA_TTABLE); - - b2Vec2 arg1; /** localNormal */ - b2Vec2 arg2; /** localPoint */ - b2Manifold::Type arg3 = (b2Manifold::Type)0; /** type */ - int32 arg4 = 0; /** pointCount */ + int num_args = lua_gettop(L) - 1; - olua_getfield(L, 2, "localNormal"); - olua_check_object(L, -1, &arg1, "b2.Vec2"); - ret.localNormal = arg1; - lua_pop(L, 1); + if (num_args == 0) { + // int32 count + return _olua_fun_b2ContactImpulse_count$1(L); + } - olua_getfield(L, 2, "localPoint"); - olua_check_object(L, -1, &arg2, "b2.Vec2"); - ret.localPoint = arg2; - lua_pop(L, 1); + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // int32 count + return _olua_fun_b2ContactImpulse_count$2(L); + // } + } - olua_getfield(L, 2, "type"); - olua_check_enum(L, -1, &arg3); - ret.type = arg3; - lua_pop(L, 1); + luaL_error(L, "method 'b2ContactImpulse::count' not support '%d' arguments", num_args); - olua_getfield(L, 2, "pointCount"); - olua_check_integer(L, -1, &arg4); - ret.pointCount = arg4; - lua_pop(L, 1); + return 0; +} - olua_pushcopy_object(L, ret, "b2.Manifold"); +static int _olua_cls_b2_ContactImpulse(lua_State *L) +{ + oluacls_class(L, "b2.ContactImpulse"); + oluacls_func(L, "__gc", _olua_fun_b2ContactImpulse___gc); + oluacls_func(L, "__olua_move", _olua_fun_b2ContactImpulse___olua_move); + oluacls_prop(L, "count", _olua_fun_b2ContactImpulse_count, _olua_fun_b2ContactImpulse_count); - olua_endinvoke(L); + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_b2_ContactImpulse(lua_State *L) +{ + olua_require(L, "box2d", luaopen_box2d); + if (!olua_getclass(L, "b2.ContactImpulse")) { + luaL_error(L, "class not found: b2ContactImpulse"); + } return 1; } +OLUA_END_DECLS -static int _b2Manifold___gc(lua_State *L) +static int _olua_fun_b2Manifold___gc(lua_State *L) { olua_startinvoke(L); @@ -15692,7 +18708,7 @@ static int _b2Manifold___gc(lua_State *L) return 0; } -static int _b2Manifold___olua_move(lua_State *L) +static int _olua_fun_b2Manifold___olua_move(lua_State *L) { olua_startinvoke(L); @@ -15704,7 +18720,7 @@ static int _b2Manifold___olua_move(lua_State *L) return 1; } -static int _b2Manifold_get_localNormal(lua_State *L) +static int _olua_fun_b2Manifold_localNormal$1(lua_State *L) { olua_startinvoke(L); @@ -15714,32 +18730,53 @@ static int _b2Manifold_get_localNormal(lua_State *L) // b2Vec2 localNormal b2Vec2 &ret = self->localNormal; - int num_ret = olua_pushcopy_object(L, ret, "b2.Vec2"); + int num_ret = olua_copy_object(L, ret, "b2.Vec2"); olua_endinvoke(L); return num_ret; } -static int _b2Manifold_set_localNormal(lua_State *L) +static int _olua_fun_b2Manifold_localNormal$2(lua_State *L) { olua_startinvoke(L); b2Manifold *self = nullptr; - b2Vec2 arg1; /** localNormal */ + b2Vec2 *arg1; /** localNormal */ olua_to_object(L, 1, &self, "b2.Manifold"); olua_check_object(L, 2, &arg1, "b2.Vec2"); // b2Vec2 localNormal - self->localNormal = arg1; + self->localNormal = *arg1; olua_endinvoke(L); return 0; } -static int _b2Manifold_get_localPoint(lua_State *L) +static int _olua_fun_b2Manifold_localNormal(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // b2Vec2 localNormal + return _olua_fun_b2Manifold_localNormal$1(L); + } + + if (num_args == 1) { + // if ((olua_is_object(L, 2, "b2.Vec2"))) { + // b2Vec2 localNormal + return _olua_fun_b2Manifold_localNormal$2(L); + // } + } + + luaL_error(L, "method 'b2Manifold::localNormal' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_b2Manifold_localPoint$1(lua_State *L) { olua_startinvoke(L); @@ -15749,32 +18786,53 @@ static int _b2Manifold_get_localPoint(lua_State *L) // b2Vec2 localPoint b2Vec2 &ret = self->localPoint; - int num_ret = olua_pushcopy_object(L, ret, "b2.Vec2"); + int num_ret = olua_copy_object(L, ret, "b2.Vec2"); olua_endinvoke(L); return num_ret; } -static int _b2Manifold_set_localPoint(lua_State *L) +static int _olua_fun_b2Manifold_localPoint$2(lua_State *L) { olua_startinvoke(L); b2Manifold *self = nullptr; - b2Vec2 arg1; /** localPoint */ + b2Vec2 *arg1; /** localPoint */ olua_to_object(L, 1, &self, "b2.Manifold"); olua_check_object(L, 2, &arg1, "b2.Vec2"); // b2Vec2 localPoint - self->localPoint = arg1; + self->localPoint = *arg1; olua_endinvoke(L); return 0; } -static int _b2Manifold_get_pointCount(lua_State *L) +static int _olua_fun_b2Manifold_localPoint(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // b2Vec2 localPoint + return _olua_fun_b2Manifold_localPoint$1(L); + } + + if (num_args == 1) { + // if ((olua_is_object(L, 2, "b2.Vec2"))) { + // b2Vec2 localPoint + return _olua_fun_b2Manifold_localPoint$2(L); + // } + } + + luaL_error(L, "method 'b2Manifold::localPoint' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_b2Manifold_pointCount$1(lua_State *L) { olua_startinvoke(L); @@ -15791,7 +18849,7 @@ static int _b2Manifold_get_pointCount(lua_State *L) return num_ret; } -static int _b2Manifold_set_pointCount(lua_State *L) +static int _olua_fun_b2Manifold_pointCount$2(lua_State *L) { olua_startinvoke(L); @@ -15809,7 +18867,28 @@ static int _b2Manifold_set_pointCount(lua_State *L) return 0; } -static int _b2Manifold_get_type(lua_State *L) +static int _olua_fun_b2Manifold_pointCount(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // int32 pointCount + return _olua_fun_b2Manifold_pointCount$1(L); + } + + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // int32 pointCount + return _olua_fun_b2Manifold_pointCount$2(L); + // } + } + + luaL_error(L, "method 'b2Manifold::pointCount' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_b2Manifold_type$1(lua_State *L) { olua_startinvoke(L); @@ -15826,7 +18905,7 @@ static int _b2Manifold_get_type(lua_State *L) return num_ret; } -static int _b2Manifold_set_type(lua_State *L) +static int _olua_fun_b2Manifold_type$2(lua_State *L) { olua_startinvoke(L); @@ -15844,24 +18923,52 @@ static int _b2Manifold_set_type(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_b2Manifold(lua_State *L) +static int _olua_fun_b2Manifold_type(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // b2Manifold::Type type + return _olua_fun_b2Manifold_type$1(L); + } + + if (num_args == 1) { + // if ((olua_is_enum(L, 2))) { + // b2Manifold::Type type + return _olua_fun_b2Manifold_type$2(L); + // } + } + + luaL_error(L, "method 'b2Manifold::type' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_cls_b2_Manifold(lua_State *L) { oluacls_class(L, "b2.Manifold"); - oluacls_func(L, "__call", _b2Manifold___call); - oluacls_func(L, "__gc", _b2Manifold___gc); - oluacls_func(L, "__olua_move", _b2Manifold___olua_move); - oluacls_prop(L, "localNormal", _b2Manifold_get_localNormal, _b2Manifold_set_localNormal); - oluacls_prop(L, "localPoint", _b2Manifold_get_localPoint, _b2Manifold_set_localPoint); - oluacls_prop(L, "pointCount", _b2Manifold_get_pointCount, _b2Manifold_set_pointCount); - oluacls_prop(L, "type", _b2Manifold_get_type, _b2Manifold_set_type); + oluacls_func(L, "__gc", _olua_fun_b2Manifold___gc); + oluacls_func(L, "__olua_move", _olua_fun_b2Manifold___olua_move); + oluacls_prop(L, "localNormal", _olua_fun_b2Manifold_localNormal, _olua_fun_b2Manifold_localNormal); + oluacls_prop(L, "localPoint", _olua_fun_b2Manifold_localPoint, _olua_fun_b2Manifold_localPoint); + oluacls_prop(L, "pointCount", _olua_fun_b2Manifold_pointCount, _olua_fun_b2Manifold_pointCount); + oluacls_prop(L, "type", _olua_fun_b2Manifold_type, _olua_fun_b2Manifold_type); return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_b2Manifold_Type(lua_State *L) +OLUA_LIB int luaopen_b2_Manifold(lua_State *L) +{ + olua_require(L, "box2d", luaopen_box2d); + if (!olua_getclass(L, "b2.Manifold")) { + luaL_error(L, "class not found: b2Manifold"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_b2_Manifold_Type(lua_State *L) { oluacls_class(L, "b2.Manifold.Type"); oluacls_func(L, "__index", olua_indexerror); @@ -15872,9 +18979,19 @@ OLUA_LIB int luaopen_b2Manifold_Type(lua_State *L) return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_b2_Manifold_Type(lua_State *L) +{ + olua_require(L, "box2d", luaopen_box2d); + if (!olua_getclass(L, "b2.Manifold.Type")) { + luaL_error(L, "class not found: b2Manifold::Type"); + } + return 1; +} OLUA_END_DECLS -static int _b2World___gc(lua_State *L) +static int _olua_fun_b2World___gc(lua_State *L) { olua_startinvoke(L); @@ -15886,7 +19003,7 @@ static int _b2World___gc(lua_State *L) return 0; } -static int _b2World___olua_move(lua_State *L) +static int _olua_fun_b2World___olua_move(lua_State *L) { olua_startinvoke(L); @@ -15898,7 +19015,7 @@ static int _b2World___olua_move(lua_State *L) return 1; } -static int _b2World_ClearForces(lua_State *L) +static int _olua_fun_b2World_clearForces(lua_State *L) { olua_startinvoke(L); @@ -15914,7 +19031,7 @@ static int _b2World_ClearForces(lua_State *L) return 0; } -static int _b2World_CreateBody(lua_State *L) +static int _olua_fun_b2World_createBody(lua_State *L) { olua_startinvoke(L); @@ -15933,7 +19050,7 @@ static int _b2World_CreateBody(lua_State *L) return num_ret; } -static int _b2World_CreateJoint(lua_State *L) +static int _olua_fun_b2World_createJoint(lua_State *L) { olua_startinvoke(L); @@ -15952,7 +19069,7 @@ static int _b2World_CreateJoint(lua_State *L) return num_ret; } -static int _b2World_DebugDraw(lua_State *L) +static int _olua_fun_b2World_debugDraw(lua_State *L) { olua_startinvoke(L); @@ -15968,7 +19085,7 @@ static int _b2World_DebugDraw(lua_State *L) return 0; } -static int _b2World_DestroyBody(lua_State *L) +static int _olua_fun_b2World_destroyBody(lua_State *L) { olua_startinvoke(L); @@ -15986,7 +19103,7 @@ static int _b2World_DestroyBody(lua_State *L) return 0; } -static int _b2World_DestroyJoint(lua_State *L) +static int _olua_fun_b2World_destroyJoint(lua_State *L) { olua_startinvoke(L); @@ -16004,7 +19121,7 @@ static int _b2World_DestroyJoint(lua_State *L) return 0; } -static int _b2World_Dump(lua_State *L) +static int _olua_fun_b2World_dump(lua_State *L) { olua_startinvoke(L); @@ -16020,7 +19137,7 @@ static int _b2World_Dump(lua_State *L) return 0; } -static int _b2World_GetAllowSleeping(lua_State *L) +static int _olua_fun_b2World_getAllowSleeping(lua_State *L) { olua_startinvoke(L); @@ -16037,7 +19154,7 @@ static int _b2World_GetAllowSleeping(lua_State *L) return num_ret; } -static int _b2World_GetAutoClearForces(lua_State *L) +static int _olua_fun_b2World_getAutoClearForces(lua_State *L) { olua_startinvoke(L); @@ -16054,7 +19171,7 @@ static int _b2World_GetAutoClearForces(lua_State *L) return num_ret; } -static int _b2World_GetBodyCount(lua_State *L) +static int _olua_fun_b2World_getBodyCount(lua_State *L) { olua_startinvoke(L); @@ -16071,7 +19188,7 @@ static int _b2World_GetBodyCount(lua_State *L) return num_ret; } -static int _b2World_GetBodyList(lua_State *L) +static int _olua_fun_b2World_getBodyList(lua_State *L) { olua_startinvoke(L); @@ -16088,7 +19205,7 @@ static int _b2World_GetBodyList(lua_State *L) return num_ret; } -static int _b2World_GetContactCount(lua_State *L) +static int _olua_fun_b2World_getContactCount(lua_State *L) { olua_startinvoke(L); @@ -16105,7 +19222,7 @@ static int _b2World_GetContactCount(lua_State *L) return num_ret; } -static int _b2World_GetContactList(lua_State *L) +static int _olua_fun_b2World_getContactList(lua_State *L) { olua_startinvoke(L); @@ -16122,7 +19239,7 @@ static int _b2World_GetContactList(lua_State *L) return num_ret; } -static int _b2World_GetContactManager(lua_State *L) +static int _olua_fun_b2World_getContactManager(lua_State *L) { olua_startinvoke(L); @@ -16139,7 +19256,7 @@ static int _b2World_GetContactManager(lua_State *L) return num_ret; } -static int _b2World_GetContinuousPhysics(lua_State *L) +static int _olua_fun_b2World_getContinuousPhysics(lua_State *L) { olua_startinvoke(L); @@ -16156,7 +19273,7 @@ static int _b2World_GetContinuousPhysics(lua_State *L) return num_ret; } -static int _b2World_GetGravity(lua_State *L) +static int _olua_fun_b2World_getGravity(lua_State *L) { olua_startinvoke(L); @@ -16166,14 +19283,14 @@ static int _b2World_GetGravity(lua_State *L) // b2Vec2 GetGravity() b2Vec2 ret = self->GetGravity(); - int num_ret = olua_pushcopy_object(L, ret, "b2.Vec2"); + int num_ret = olua_copy_object(L, ret, "b2.Vec2"); olua_endinvoke(L); return num_ret; } -static int _b2World_GetJointCount(lua_State *L) +static int _olua_fun_b2World_getJointCount(lua_State *L) { olua_startinvoke(L); @@ -16190,7 +19307,7 @@ static int _b2World_GetJointCount(lua_State *L) return num_ret; } -static int _b2World_GetJointList(lua_State *L) +static int _olua_fun_b2World_getJointList(lua_State *L) { olua_startinvoke(L); @@ -16207,7 +19324,7 @@ static int _b2World_GetJointList(lua_State *L) return num_ret; } -static int _b2World_GetProfile(lua_State *L) +static int _olua_fun_b2World_getProfile(lua_State *L) { olua_startinvoke(L); @@ -16224,7 +19341,7 @@ static int _b2World_GetProfile(lua_State *L) return num_ret; } -static int _b2World_GetProxyCount(lua_State *L) +static int _olua_fun_b2World_getProxyCount(lua_State *L) { olua_startinvoke(L); @@ -16241,7 +19358,7 @@ static int _b2World_GetProxyCount(lua_State *L) return num_ret; } -static int _b2World_GetSubStepping(lua_State *L) +static int _olua_fun_b2World_getSubStepping(lua_State *L) { olua_startinvoke(L); @@ -16258,7 +19375,7 @@ static int _b2World_GetSubStepping(lua_State *L) return num_ret; } -static int _b2World_GetTreeBalance(lua_State *L) +static int _olua_fun_b2World_getTreeBalance(lua_State *L) { olua_startinvoke(L); @@ -16275,7 +19392,7 @@ static int _b2World_GetTreeBalance(lua_State *L) return num_ret; } -static int _b2World_GetTreeHeight(lua_State *L) +static int _olua_fun_b2World_getTreeHeight(lua_State *L) { olua_startinvoke(L); @@ -16292,7 +19409,7 @@ static int _b2World_GetTreeHeight(lua_State *L) return num_ret; } -static int _b2World_GetTreeQuality(lua_State *L) +static int _olua_fun_b2World_getTreeQuality(lua_State *L) { olua_startinvoke(L); @@ -16309,7 +19426,7 @@ static int _b2World_GetTreeQuality(lua_State *L) return num_ret; } -static int _b2World_GetWarmStarting(lua_State *L) +static int _olua_fun_b2World_getWarmStarting(lua_State *L) { olua_startinvoke(L); @@ -16326,7 +19443,7 @@ static int _b2World_GetWarmStarting(lua_State *L) return num_ret; } -static int _b2World_IsLocked(lua_State *L) +static int _olua_fun_b2World_isLocked(lua_State *L) { olua_startinvoke(L); @@ -16343,16 +19460,16 @@ static int _b2World_IsLocked(lua_State *L) return num_ret; } -static int _b2World_new(lua_State *L) +static int _olua_fun_b2World_new(lua_State *L) { olua_startinvoke(L); - b2Vec2 arg1; /** gravity */ + b2Vec2 *arg1; /** gravity */ olua_check_object(L, 1, &arg1, "b2.Vec2"); // b2World(const b2Vec2 &gravity) - b2World *ret = new b2World(arg1); + b2World *ret = new b2World(*arg1); int num_ret = olua_push_object(L, ret, "b2.World"); olua_postnew(L, ret); @@ -16361,34 +19478,34 @@ static int _b2World_new(lua_State *L) return num_ret; } -static int _b2World_QueryAABB(lua_State *L) +static int _olua_fun_b2World_queryAABB(lua_State *L) { olua_startinvoke(L); b2World *self = nullptr; b2QueryCallback *arg1 = nullptr; /** callback */ - b2AABB arg2; /** aabb */ + b2AABB *arg2; /** aabb */ olua_to_object(L, 1, &self, "b2.World"); olua_check_object(L, 2, &arg1, "b2.interface.QueryCallback"); olua_check_object(L, 3, &arg2, "b2.AABB"); // void QueryAABB(b2QueryCallback *callback, const b2AABB &aabb) - self->QueryAABB(arg1, arg2); + self->QueryAABB(arg1, *arg2); olua_endinvoke(L); return 0; } -static int _b2World_RayCast(lua_State *L) +static int _olua_fun_b2World_rayCast(lua_State *L) { olua_startinvoke(L); b2World *self = nullptr; b2RayCastCallback *arg1 = nullptr; /** callback */ - b2Vec2 arg2; /** point1 */ - b2Vec2 arg3; /** point2 */ + b2Vec2 *arg2; /** point1 */ + b2Vec2 *arg3; /** point2 */ olua_to_object(L, 1, &self, "b2.World"); olua_check_object(L, 2, &arg1, "b2.interface.RayCastCallback"); @@ -16396,14 +19513,14 @@ static int _b2World_RayCast(lua_State *L) olua_check_object(L, 4, &arg3, "b2.Vec2"); // void RayCast(b2RayCastCallback *callback, const b2Vec2 &point1, const b2Vec2 &point2) - self->RayCast(arg1, arg2, arg3); + self->RayCast(arg1, *arg2, *arg3); olua_endinvoke(L); return 0; } -static int _b2World_SetAllowSleeping(lua_State *L) +static int _olua_fun_b2World_setAllowSleeping(lua_State *L) { olua_startinvoke(L); @@ -16421,7 +19538,7 @@ static int _b2World_SetAllowSleeping(lua_State *L) return 0; } -static int _b2World_SetAutoClearForces(lua_State *L) +static int _olua_fun_b2World_setAutoClearForces(lua_State *L) { olua_startinvoke(L); @@ -16439,7 +19556,7 @@ static int _b2World_SetAutoClearForces(lua_State *L) return 0; } -static int _b2World_SetContactFilter(lua_State *L) +static int _olua_fun_b2World_setContactFilter(lua_State *L) { olua_startinvoke(L); @@ -16460,7 +19577,7 @@ static int _b2World_SetContactFilter(lua_State *L) return 0; } -static int _b2World_SetContactListener(lua_State *L) +static int _olua_fun_b2World_setContactListener(lua_State *L) { olua_startinvoke(L); @@ -16481,7 +19598,7 @@ static int _b2World_SetContactListener(lua_State *L) return 0; } -static int _b2World_SetContinuousPhysics(lua_State *L) +static int _olua_fun_b2World_setContinuousPhysics(lua_State *L) { olua_startinvoke(L); @@ -16499,7 +19616,7 @@ static int _b2World_SetContinuousPhysics(lua_State *L) return 0; } -static int _b2World_SetDebugDraw(lua_State *L) +static int _olua_fun_b2World_setDebugDraw(lua_State *L) { olua_startinvoke(L); @@ -16520,7 +19637,7 @@ static int _b2World_SetDebugDraw(lua_State *L) return 0; } -static int _b2World_SetDestructionListener(lua_State *L) +static int _olua_fun_b2World_setDestructionListener(lua_State *L) { olua_startinvoke(L); @@ -16541,25 +19658,25 @@ static int _b2World_SetDestructionListener(lua_State *L) return 0; } -static int _b2World_SetGravity(lua_State *L) +static int _olua_fun_b2World_setGravity(lua_State *L) { olua_startinvoke(L); b2World *self = nullptr; - b2Vec2 arg1; /** gravity */ + b2Vec2 *arg1; /** gravity */ olua_to_object(L, 1, &self, "b2.World"); olua_check_object(L, 2, &arg1, "b2.Vec2"); // void SetGravity(const b2Vec2 &gravity) - self->SetGravity(arg1); + self->SetGravity(*arg1); olua_endinvoke(L); return 0; } -static int _b2World_SetSubStepping(lua_State *L) +static int _olua_fun_b2World_setSubStepping(lua_State *L) { olua_startinvoke(L); @@ -16577,7 +19694,7 @@ static int _b2World_SetSubStepping(lua_State *L) return 0; } -static int _b2World_SetWarmStarting(lua_State *L) +static int _olua_fun_b2World_setWarmStarting(lua_State *L) { olua_startinvoke(L); @@ -16595,25 +19712,25 @@ static int _b2World_SetWarmStarting(lua_State *L) return 0; } -static int _b2World_ShiftOrigin(lua_State *L) +static int _olua_fun_b2World_shiftOrigin(lua_State *L) { olua_startinvoke(L); b2World *self = nullptr; - b2Vec2 arg1; /** newOrigin */ + b2Vec2 *arg1; /** newOrigin */ olua_to_object(L, 1, &self, "b2.World"); olua_check_object(L, 2, &arg1, "b2.Vec2"); // void ShiftOrigin(const b2Vec2 &newOrigin) - self->ShiftOrigin(arg1); + self->ShiftOrigin(*arg1); olua_endinvoke(L); return 0; } -static int _b2World_Step(lua_State *L) +static int _olua_fun_b2World_step(lua_State *L) { olua_startinvoke(L); @@ -16635,100 +19752,87 @@ static int _b2World_Step(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_b2World(lua_State *L) +static int _olua_cls_b2_World(lua_State *L) { oluacls_class(L, "b2.World"); - oluacls_func(L, "__gc", _b2World___gc); - oluacls_func(L, "__olua_move", _b2World___olua_move); - oluacls_func(L, "clearForces", _b2World_ClearForces); - oluacls_func(L, "createBody", _b2World_CreateBody); - oluacls_func(L, "createJoint", _b2World_CreateJoint); - oluacls_func(L, "debugDraw", _b2World_DebugDraw); - oluacls_func(L, "destroyBody", _b2World_DestroyBody); - oluacls_func(L, "destroyJoint", _b2World_DestroyJoint); - oluacls_func(L, "dump", _b2World_Dump); - oluacls_func(L, "getAllowSleeping", _b2World_GetAllowSleeping); - oluacls_func(L, "getAutoClearForces", _b2World_GetAutoClearForces); - oluacls_func(L, "getBodyCount", _b2World_GetBodyCount); - oluacls_func(L, "getBodyList", _b2World_GetBodyList); - oluacls_func(L, "getContactCount", _b2World_GetContactCount); - oluacls_func(L, "getContactList", _b2World_GetContactList); - oluacls_func(L, "getContactManager", _b2World_GetContactManager); - oluacls_func(L, "getContinuousPhysics", _b2World_GetContinuousPhysics); - oluacls_func(L, "getGravity", _b2World_GetGravity); - oluacls_func(L, "getJointCount", _b2World_GetJointCount); - oluacls_func(L, "getJointList", _b2World_GetJointList); - oluacls_func(L, "getProfile", _b2World_GetProfile); - oluacls_func(L, "getProxyCount", _b2World_GetProxyCount); - oluacls_func(L, "getSubStepping", _b2World_GetSubStepping); - oluacls_func(L, "getTreeBalance", _b2World_GetTreeBalance); - oluacls_func(L, "getTreeHeight", _b2World_GetTreeHeight); - oluacls_func(L, "getTreeQuality", _b2World_GetTreeQuality); - oluacls_func(L, "getWarmStarting", _b2World_GetWarmStarting); - oluacls_func(L, "isLocked", _b2World_IsLocked); - oluacls_func(L, "new", _b2World_new); - oluacls_func(L, "queryAABB", _b2World_QueryAABB); - oluacls_func(L, "rayCast", _b2World_RayCast); - oluacls_func(L, "setAllowSleeping", _b2World_SetAllowSleeping); - oluacls_func(L, "setAutoClearForces", _b2World_SetAutoClearForces); - oluacls_func(L, "setContactFilter", _b2World_SetContactFilter); - oluacls_func(L, "setContactListener", _b2World_SetContactListener); - oluacls_func(L, "setContinuousPhysics", _b2World_SetContinuousPhysics); - oluacls_func(L, "setDebugDraw", _b2World_SetDebugDraw); - oluacls_func(L, "setDestructionListener", _b2World_SetDestructionListener); - oluacls_func(L, "setGravity", _b2World_SetGravity); - oluacls_func(L, "setSubStepping", _b2World_SetSubStepping); - oluacls_func(L, "setWarmStarting", _b2World_SetWarmStarting); - oluacls_func(L, "shiftOrigin", _b2World_ShiftOrigin); - oluacls_func(L, "step", _b2World_Step); - oluacls_prop(L, "allowSleeping", _b2World_GetAllowSleeping, _b2World_SetAllowSleeping); - oluacls_prop(L, "autoClearForces", _b2World_GetAutoClearForces, _b2World_SetAutoClearForces); - oluacls_prop(L, "bodyCount", _b2World_GetBodyCount, nullptr); - oluacls_prop(L, "bodyList", _b2World_GetBodyList, nullptr); - oluacls_prop(L, "contactCount", _b2World_GetContactCount, nullptr); - oluacls_prop(L, "contactList", _b2World_GetContactList, nullptr); - oluacls_prop(L, "contactManager", _b2World_GetContactManager, nullptr); - oluacls_prop(L, "continuousPhysics", _b2World_GetContinuousPhysics, _b2World_SetContinuousPhysics); - oluacls_prop(L, "gravity", _b2World_GetGravity, _b2World_SetGravity); - oluacls_prop(L, "jointCount", _b2World_GetJointCount, nullptr); - oluacls_prop(L, "jointList", _b2World_GetJointList, nullptr); - oluacls_prop(L, "locked", _b2World_IsLocked, nullptr); - oluacls_prop(L, "profile", _b2World_GetProfile, nullptr); - oluacls_prop(L, "proxyCount", _b2World_GetProxyCount, nullptr); - oluacls_prop(L, "subStepping", _b2World_GetSubStepping, _b2World_SetSubStepping); - oluacls_prop(L, "treeBalance", _b2World_GetTreeBalance, nullptr); - oluacls_prop(L, "treeHeight", _b2World_GetTreeHeight, nullptr); - oluacls_prop(L, "treeQuality", _b2World_GetTreeQuality, nullptr); - oluacls_prop(L, "warmStarting", _b2World_GetWarmStarting, _b2World_SetWarmStarting); + oluacls_func(L, "__gc", _olua_fun_b2World___gc); + oluacls_func(L, "__olua_move", _olua_fun_b2World___olua_move); + oluacls_func(L, "clearForces", _olua_fun_b2World_clearForces); + oluacls_func(L, "createBody", _olua_fun_b2World_createBody); + oluacls_func(L, "createJoint", _olua_fun_b2World_createJoint); + oluacls_func(L, "debugDraw", _olua_fun_b2World_debugDraw); + oluacls_func(L, "destroyBody", _olua_fun_b2World_destroyBody); + oluacls_func(L, "destroyJoint", _olua_fun_b2World_destroyJoint); + oluacls_func(L, "dump", _olua_fun_b2World_dump); + oluacls_func(L, "getAllowSleeping", _olua_fun_b2World_getAllowSleeping); + oluacls_func(L, "getAutoClearForces", _olua_fun_b2World_getAutoClearForces); + oluacls_func(L, "getBodyCount", _olua_fun_b2World_getBodyCount); + oluacls_func(L, "getBodyList", _olua_fun_b2World_getBodyList); + oluacls_func(L, "getContactCount", _olua_fun_b2World_getContactCount); + oluacls_func(L, "getContactList", _olua_fun_b2World_getContactList); + oluacls_func(L, "getContactManager", _olua_fun_b2World_getContactManager); + oluacls_func(L, "getContinuousPhysics", _olua_fun_b2World_getContinuousPhysics); + oluacls_func(L, "getGravity", _olua_fun_b2World_getGravity); + oluacls_func(L, "getJointCount", _olua_fun_b2World_getJointCount); + oluacls_func(L, "getJointList", _olua_fun_b2World_getJointList); + oluacls_func(L, "getProfile", _olua_fun_b2World_getProfile); + oluacls_func(L, "getProxyCount", _olua_fun_b2World_getProxyCount); + oluacls_func(L, "getSubStepping", _olua_fun_b2World_getSubStepping); + oluacls_func(L, "getTreeBalance", _olua_fun_b2World_getTreeBalance); + oluacls_func(L, "getTreeHeight", _olua_fun_b2World_getTreeHeight); + oluacls_func(L, "getTreeQuality", _olua_fun_b2World_getTreeQuality); + oluacls_func(L, "getWarmStarting", _olua_fun_b2World_getWarmStarting); + oluacls_func(L, "isLocked", _olua_fun_b2World_isLocked); + oluacls_func(L, "new", _olua_fun_b2World_new); + oluacls_func(L, "queryAABB", _olua_fun_b2World_queryAABB); + oluacls_func(L, "rayCast", _olua_fun_b2World_rayCast); + oluacls_func(L, "setAllowSleeping", _olua_fun_b2World_setAllowSleeping); + oluacls_func(L, "setAutoClearForces", _olua_fun_b2World_setAutoClearForces); + oluacls_func(L, "setContactFilter", _olua_fun_b2World_setContactFilter); + oluacls_func(L, "setContactListener", _olua_fun_b2World_setContactListener); + oluacls_func(L, "setContinuousPhysics", _olua_fun_b2World_setContinuousPhysics); + oluacls_func(L, "setDebugDraw", _olua_fun_b2World_setDebugDraw); + oluacls_func(L, "setDestructionListener", _olua_fun_b2World_setDestructionListener); + oluacls_func(L, "setGravity", _olua_fun_b2World_setGravity); + oluacls_func(L, "setSubStepping", _olua_fun_b2World_setSubStepping); + oluacls_func(L, "setWarmStarting", _olua_fun_b2World_setWarmStarting); + oluacls_func(L, "shiftOrigin", _olua_fun_b2World_shiftOrigin); + oluacls_func(L, "step", _olua_fun_b2World_step); + oluacls_prop(L, "allowSleeping", _olua_fun_b2World_getAllowSleeping, _olua_fun_b2World_setAllowSleeping); + oluacls_prop(L, "autoClearForces", _olua_fun_b2World_getAutoClearForces, _olua_fun_b2World_setAutoClearForces); + oluacls_prop(L, "bodyCount", _olua_fun_b2World_getBodyCount, nullptr); + oluacls_prop(L, "bodyList", _olua_fun_b2World_getBodyList, nullptr); + oluacls_prop(L, "contactCount", _olua_fun_b2World_getContactCount, nullptr); + oluacls_prop(L, "contactList", _olua_fun_b2World_getContactList, nullptr); + oluacls_prop(L, "contactManager", _olua_fun_b2World_getContactManager, nullptr); + oluacls_prop(L, "continuousPhysics", _olua_fun_b2World_getContinuousPhysics, _olua_fun_b2World_setContinuousPhysics); + oluacls_prop(L, "gravity", _olua_fun_b2World_getGravity, _olua_fun_b2World_setGravity); + oluacls_prop(L, "jointCount", _olua_fun_b2World_getJointCount, nullptr); + oluacls_prop(L, "jointList", _olua_fun_b2World_getJointList, nullptr); + oluacls_prop(L, "locked", _olua_fun_b2World_isLocked, nullptr); + oluacls_prop(L, "profile", _olua_fun_b2World_getProfile, nullptr); + oluacls_prop(L, "proxyCount", _olua_fun_b2World_getProxyCount, nullptr); + oluacls_prop(L, "subStepping", _olua_fun_b2World_getSubStepping, _olua_fun_b2World_setSubStepping); + oluacls_prop(L, "treeBalance", _olua_fun_b2World_getTreeBalance, nullptr); + oluacls_prop(L, "treeHeight", _olua_fun_b2World_getTreeHeight, nullptr); + oluacls_prop(L, "treeQuality", _olua_fun_b2World_getTreeQuality, nullptr); + oluacls_prop(L, "warmStarting", _olua_fun_b2World_getWarmStarting, _olua_fun_b2World_setWarmStarting); return 1; } -OLUA_END_DECLS -static int _b2WorldManifold___call(lua_State *L) +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_b2_World(lua_State *L) { - olua_startinvoke(L); - - b2WorldManifold ret; - - luaL_checktype(L, 2, LUA_TTABLE); - - b2Vec2 arg1; /** normal */ - - olua_getfield(L, 2, "normal"); - olua_check_object(L, -1, &arg1, "b2.Vec2"); - ret.normal = arg1; - lua_pop(L, 1); - - olua_pushcopy_object(L, ret, "b2.WorldManifold"); - - olua_endinvoke(L); - + olua_require(L, "box2d", luaopen_box2d); + if (!olua_getclass(L, "b2.World")) { + luaL_error(L, "class not found: b2World"); + } return 1; } +OLUA_END_DECLS -static int _b2WorldManifold___gc(lua_State *L) +static int _olua_fun_b2WorldManifold___gc(lua_State *L) { olua_startinvoke(L); @@ -16740,7 +19844,7 @@ static int _b2WorldManifold___gc(lua_State *L) return 0; } -static int _b2WorldManifold___olua_move(lua_State *L) +static int _olua_fun_b2WorldManifold___olua_move(lua_State *L) { olua_startinvoke(L); @@ -16752,15 +19856,15 @@ static int _b2WorldManifold___olua_move(lua_State *L) return 1; } -static int _b2WorldManifold_Initialize(lua_State *L) +static int _olua_fun_b2WorldManifold_initialize(lua_State *L) { olua_startinvoke(L); b2WorldManifold *self = nullptr; b2Manifold *arg1 = nullptr; /** manifold */ - b2Transform arg2; /** xfA */ + b2Transform *arg2; /** xfA */ float arg3 = 0; /** radiusA */ - b2Transform arg4; /** xfB */ + b2Transform *arg4; /** xfB */ float arg5 = 0; /** radiusB */ olua_to_object(L, 1, &self, "b2.WorldManifold"); @@ -16771,14 +19875,14 @@ static int _b2WorldManifold_Initialize(lua_State *L) olua_check_number(L, 6, &arg5); // void Initialize(const b2Manifold *manifold, const b2Transform &xfA, float radiusA, const b2Transform &xfB, float radiusB) - self->Initialize(arg1, arg2, arg3, arg4, arg5); + self->Initialize(arg1, *arg2, arg3, *arg4, arg5); olua_endinvoke(L); return 0; } -static int _b2WorldManifold_get_normal(lua_State *L) +static int _olua_fun_b2WorldManifold_normal$1(lua_State *L) { olua_startinvoke(L); @@ -16788,41 +19892,70 @@ static int _b2WorldManifold_get_normal(lua_State *L) // b2Vec2 normal b2Vec2 &ret = self->normal; - int num_ret = olua_pushcopy_object(L, ret, "b2.Vec2"); + int num_ret = olua_copy_object(L, ret, "b2.Vec2"); olua_endinvoke(L); return num_ret; } -static int _b2WorldManifold_set_normal(lua_State *L) +static int _olua_fun_b2WorldManifold_normal$2(lua_State *L) { olua_startinvoke(L); b2WorldManifold *self = nullptr; - b2Vec2 arg1; /** normal */ + b2Vec2 *arg1; /** normal */ olua_to_object(L, 1, &self, "b2.WorldManifold"); olua_check_object(L, 2, &arg1, "b2.Vec2"); // b2Vec2 normal - self->normal = arg1; + self->normal = *arg1; olua_endinvoke(L); return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_b2WorldManifold(lua_State *L) +static int _olua_fun_b2WorldManifold_normal(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // b2Vec2 normal + return _olua_fun_b2WorldManifold_normal$1(L); + } + + if (num_args == 1) { + // if ((olua_is_object(L, 2, "b2.Vec2"))) { + // b2Vec2 normal + return _olua_fun_b2WorldManifold_normal$2(L); + // } + } + + luaL_error(L, "method 'b2WorldManifold::normal' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_cls_b2_WorldManifold(lua_State *L) { oluacls_class(L, "b2.WorldManifold"); - oluacls_func(L, "__call", _b2WorldManifold___call); - oluacls_func(L, "__gc", _b2WorldManifold___gc); - oluacls_func(L, "__olua_move", _b2WorldManifold___olua_move); - oluacls_func(L, "initialize", _b2WorldManifold_Initialize); - oluacls_prop(L, "normal", _b2WorldManifold_get_normal, _b2WorldManifold_set_normal); + oluacls_func(L, "__gc", _olua_fun_b2WorldManifold___gc); + oluacls_func(L, "__olua_move", _olua_fun_b2WorldManifold___olua_move); + oluacls_func(L, "initialize", _olua_fun_b2WorldManifold_initialize); + oluacls_prop(L, "normal", _olua_fun_b2WorldManifold_normal, _olua_fun_b2WorldManifold_normal); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_b2_WorldManifold(lua_State *L) +{ + olua_require(L, "box2d", luaopen_box2d); + if (!olua_getclass(L, "b2.WorldManifold")) { + luaL_error(L, "class not found: b2WorldManifold"); + } return 1; } OLUA_END_DECLS @@ -16830,81 +19963,81 @@ OLUA_END_DECLS OLUA_BEGIN_DECLS OLUA_LIB int luaopen_box2d(lua_State *L) { - olua_require(L, "b2.Vec2", luaopen_b2Vec2); - olua_require(L, "b2.Vec3", luaopen_b2Vec3); - olua_require(L, "b2.ContactID", luaopen_b2ContactID); - olua_require(L, "b2.ContactFeature", luaopen_b2ContactFeature); - olua_require(L, "b2.Color", luaopen_b2Color); - olua_require(L, "b2.FixtureUserData", luaopen_b2FixtureUserData); - olua_require(L, "b2.Filter", luaopen_b2Filter); - olua_require(L, "b2.ManifoldPoint", luaopen_b2ManifoldPoint); - olua_require(L, "b2.Rot", luaopen_b2Rot); - olua_require(L, "b2.interface.Draw", luaopen_b2Draw); - olua_require(L, "b2.interface.DestructionListener", luaopen_b2DestructionListener); - olua_require(L, "b2.interface.ContactFilter", luaopen_b2ContactFilter); - olua_require(L, "b2.interface.ContactListener", luaopen_b2ContactListener); - olua_require(L, "b2.interface.QueryCallback", luaopen_b2QueryCallback); - olua_require(L, "b2.interface.RayCastCallback", luaopen_b2RayCastCallback); - olua_require(L, "b2.Vec2Array", luaopen_box2d_Vec2Array); - olua_require(L, "b2.DestructionListener", luaopen_box2d_DestructionListener); - olua_require(L, "b2.ContactFilter", luaopen_box2d_ContactFilter); - olua_require(L, "b2.ContactListener", luaopen_box2d_ContactListener); - olua_require(L, "b2.QueryCallback", luaopen_box2d_QueryCallback); - olua_require(L, "b2.RayCastCallback", luaopen_box2d_RayCastCallback); - olua_require(L, "b2.DebugNode.Flags", luaopen_box2d_DebugNode_Flags); - olua_require(L, "b2.DebugNode", luaopen_box2d_DebugNode); - olua_require(L, "b2.MassData", luaopen_b2MassData); - olua_require(L, "b2.Transform", luaopen_b2Transform); - olua_require(L, "b2.RayCastInput", luaopen_b2RayCastInput); - olua_require(L, "b2.RayCastOutput", luaopen_b2RayCastOutput); - olua_require(L, "b2.Shape.Type", luaopen_b2Shape_Type); - olua_require(L, "b2.Shape", luaopen_b2Shape); - olua_require(L, "b2.PolygonShape", luaopen_b2PolygonShape); - olua_require(L, "b2.EdgeShape", luaopen_b2EdgeShape); - olua_require(L, "b2.CircleShape", luaopen_b2CircleShape); - olua_require(L, "b2.ChainShape", luaopen_b2ChainShape); - olua_require(L, "b2.BodyDef", luaopen_b2BodyDef); - olua_require(L, "b2.BodyType", luaopen_b2BodyType); - olua_require(L, "b2.Body", luaopen_b2Body); - olua_require(L, "b2.BodyUserData", luaopen_b2BodyUserData); - olua_require(L, "b2.FixtureDef", luaopen_b2FixtureDef); - olua_require(L, "b2.Fixture", luaopen_b2Fixture); - olua_require(L, "b2.JointDef", luaopen_b2JointDef); - olua_require(L, "b2.JointType", luaopen_b2JointType); - olua_require(L, "b2.Joint", luaopen_b2Joint); - olua_require(L, "b2.DistanceJointDef", luaopen_b2DistanceJointDef); - olua_require(L, "b2.DistanceJoint", luaopen_b2DistanceJoint); - olua_require(L, "b2.FrictionJointDef", luaopen_b2FrictionJointDef); - olua_require(L, "b2.FrictionJoint", luaopen_b2FrictionJoint); - olua_require(L, "b2.GearJointDef", luaopen_b2GearJointDef); - olua_require(L, "b2.GearJoint", luaopen_b2GearJoint); - olua_require(L, "b2.MotorJointDef", luaopen_b2MotorJointDef); - olua_require(L, "b2.MotorJoint", luaopen_b2MotorJoint); - olua_require(L, "b2.MouseJointDef", luaopen_b2MouseJointDef); - olua_require(L, "b2.MouseJoint", luaopen_b2MouseJoint); - olua_require(L, "b2.PrismaticJointDef", luaopen_b2PrismaticJointDef); - olua_require(L, "b2.PrismaticJoint", luaopen_b2PrismaticJoint); - olua_require(L, "b2.PulleyJointDef", luaopen_b2PulleyJointDef); - olua_require(L, "b2.PulleyJoint", luaopen_b2PulleyJoint); - olua_require(L, "b2.RevoluteJointDef", luaopen_b2RevoluteJointDef); - olua_require(L, "b2.RevoluteJoint", luaopen_b2RevoluteJoint); - olua_require(L, "b2.WeldJointDef", luaopen_b2WeldJointDef); - olua_require(L, "b2.WeldJoint", luaopen_b2WeldJoint); - olua_require(L, "b2.WheelJointDef", luaopen_b2WheelJointDef); - olua_require(L, "b2.WheelJoint", luaopen_b2WheelJoint); - olua_require(L, "b2.JointEdge", luaopen_b2JointEdge); - olua_require(L, "b2.JointUserData", luaopen_b2JointUserData); - olua_require(L, "b2.ContactEdge", luaopen_b2ContactEdge); - olua_require(L, "b2.ContactManager", luaopen_b2ContactManager); - olua_require(L, "b2.Profile", luaopen_b2Profile); - olua_require(L, "b2.BroadPhase", luaopen_b2BroadPhase); - olua_require(L, "b2.AABB", luaopen_b2AABB); - olua_require(L, "b2.Contact", luaopen_b2Contact); - olua_require(L, "b2.ContactImpulse", luaopen_b2ContactImpulse); - olua_require(L, "b2.Manifold", luaopen_b2Manifold); - olua_require(L, "b2.Manifold.Type", luaopen_b2Manifold_Type); - olua_require(L, "b2.World", luaopen_b2World); - olua_require(L, "b2.WorldManifold", luaopen_b2WorldManifold); + olua_require(L, "b2.Vec2", _olua_cls_b2_Vec2); + olua_require(L, "b2.Vec3", _olua_cls_b2_Vec3); + olua_require(L, "b2.ContactID", _olua_cls_b2_ContactID); + olua_require(L, "b2.ContactFeature", _olua_cls_b2_ContactFeature); + olua_require(L, "b2.Color", _olua_cls_b2_Color); + olua_require(L, "b2.FixtureUserData", _olua_cls_b2_FixtureUserData); + olua_require(L, "b2.Filter", _olua_cls_b2_Filter); + olua_require(L, "b2.ManifoldPoint", _olua_cls_b2_ManifoldPoint); + olua_require(L, "b2.Rot", _olua_cls_b2_Rot); + olua_require(L, "b2.interface.Draw", _olua_cls_b2_interface_Draw); + olua_require(L, "b2.interface.DestructionListener", _olua_cls_b2_interface_DestructionListener); + olua_require(L, "b2.interface.ContactFilter", _olua_cls_b2_interface_ContactFilter); + olua_require(L, "b2.interface.ContactListener", _olua_cls_b2_interface_ContactListener); + olua_require(L, "b2.interface.QueryCallback", _olua_cls_b2_interface_QueryCallback); + olua_require(L, "b2.interface.RayCastCallback", _olua_cls_b2_interface_RayCastCallback); + olua_require(L, "b2.Vec2Array", _olua_cls_b2_Vec2Array); + olua_require(L, "b2.DestructionListener", _olua_cls_b2_DestructionListener); + olua_require(L, "b2.ContactFilter", _olua_cls_b2_ContactFilter); + olua_require(L, "b2.ContactListener", _olua_cls_b2_ContactListener); + olua_require(L, "b2.QueryCallback", _olua_cls_b2_QueryCallback); + olua_require(L, "b2.RayCastCallback", _olua_cls_b2_RayCastCallback); + olua_require(L, "b2.DebugNode.Flags", _olua_cls_b2_DebugNode_Flags); + olua_require(L, "b2.DebugNode", _olua_cls_b2_DebugNode); + olua_require(L, "b2.MassData", _olua_cls_b2_MassData); + olua_require(L, "b2.Transform", _olua_cls_b2_Transform); + olua_require(L, "b2.RayCastInput", _olua_cls_b2_RayCastInput); + olua_require(L, "b2.RayCastOutput", _olua_cls_b2_RayCastOutput); + olua_require(L, "b2.Shape.Type", _olua_cls_b2_Shape_Type); + olua_require(L, "b2.Shape", _olua_cls_b2_Shape); + olua_require(L, "b2.PolygonShape", _olua_cls_b2_PolygonShape); + olua_require(L, "b2.EdgeShape", _olua_cls_b2_EdgeShape); + olua_require(L, "b2.CircleShape", _olua_cls_b2_CircleShape); + olua_require(L, "b2.ChainShape", _olua_cls_b2_ChainShape); + olua_require(L, "b2.BodyDef", _olua_cls_b2_BodyDef); + olua_require(L, "b2.BodyType", _olua_cls_b2_BodyType); + olua_require(L, "b2.Body", _olua_cls_b2_Body); + olua_require(L, "b2.BodyUserData", _olua_cls_b2_BodyUserData); + olua_require(L, "b2.FixtureDef", _olua_cls_b2_FixtureDef); + olua_require(L, "b2.Fixture", _olua_cls_b2_Fixture); + olua_require(L, "b2.JointDef", _olua_cls_b2_JointDef); + olua_require(L, "b2.JointType", _olua_cls_b2_JointType); + olua_require(L, "b2.Joint", _olua_cls_b2_Joint); + olua_require(L, "b2.DistanceJointDef", _olua_cls_b2_DistanceJointDef); + olua_require(L, "b2.DistanceJoint", _olua_cls_b2_DistanceJoint); + olua_require(L, "b2.FrictionJointDef", _olua_cls_b2_FrictionJointDef); + olua_require(L, "b2.FrictionJoint", _olua_cls_b2_FrictionJoint); + olua_require(L, "b2.GearJointDef", _olua_cls_b2_GearJointDef); + olua_require(L, "b2.GearJoint", _olua_cls_b2_GearJoint); + olua_require(L, "b2.MotorJointDef", _olua_cls_b2_MotorJointDef); + olua_require(L, "b2.MotorJoint", _olua_cls_b2_MotorJoint); + olua_require(L, "b2.MouseJointDef", _olua_cls_b2_MouseJointDef); + olua_require(L, "b2.MouseJoint", _olua_cls_b2_MouseJoint); + olua_require(L, "b2.PrismaticJointDef", _olua_cls_b2_PrismaticJointDef); + olua_require(L, "b2.PrismaticJoint", _olua_cls_b2_PrismaticJoint); + olua_require(L, "b2.PulleyJointDef", _olua_cls_b2_PulleyJointDef); + olua_require(L, "b2.PulleyJoint", _olua_cls_b2_PulleyJoint); + olua_require(L, "b2.RevoluteJointDef", _olua_cls_b2_RevoluteJointDef); + olua_require(L, "b2.RevoluteJoint", _olua_cls_b2_RevoluteJoint); + olua_require(L, "b2.WeldJointDef", _olua_cls_b2_WeldJointDef); + olua_require(L, "b2.WeldJoint", _olua_cls_b2_WeldJoint); + olua_require(L, "b2.WheelJointDef", _olua_cls_b2_WheelJointDef); + olua_require(L, "b2.WheelJoint", _olua_cls_b2_WheelJoint); + olua_require(L, "b2.JointEdge", _olua_cls_b2_JointEdge); + olua_require(L, "b2.JointUserData", _olua_cls_b2_JointUserData); + olua_require(L, "b2.ContactEdge", _olua_cls_b2_ContactEdge); + olua_require(L, "b2.ContactManager", _olua_cls_b2_ContactManager); + olua_require(L, "b2.Profile", _olua_cls_b2_Profile); + olua_require(L, "b2.BroadPhase", _olua_cls_b2_BroadPhase); + olua_require(L, "b2.AABB", _olua_cls_b2_AABB); + olua_require(L, "b2.Contact", _olua_cls_b2_Contact); + olua_require(L, "b2.ContactImpulse", _olua_cls_b2_ContactImpulse); + olua_require(L, "b2.Manifold", _olua_cls_b2_Manifold); + olua_require(L, "b2.Manifold.Type", _olua_cls_b2_Manifold_Type); + olua_require(L, "b2.World", _olua_cls_b2_World); + olua_require(L, "b2.WorldManifold", _olua_cls_b2_WorldManifold); cclua::runtime::registerFeature("box2d", true); diff --git a/frameworks/cclua/src/lua-bindings/lua_box2d.h b/frameworks/cclua/src/lua-bindings/lua_box2d.h index c6a91b7d..d5a999ca 100644 --- a/frameworks/cclua/src/lua-bindings/lua_box2d.h +++ b/frameworks/cclua/src/lua-bindings/lua_box2d.h @@ -1,5 +1,5 @@ // -// AUTO BUILD, DON'T MODIFY! +// AUTO GENERATED, DO NOT MODIFY! // #ifndef __AUTO_GEN_LUA_BOX2D_H__ #define __AUTO_GEN_LUA_BOX2D_H__ diff --git a/frameworks/cclua/src/lua-bindings/lua_cclua.cpp b/frameworks/cclua/src/lua-bindings/lua_cclua.cpp index c7a9b4a2..07e6b666 100644 --- a/frameworks/cclua/src/lua-bindings/lua_cclua.cpp +++ b/frameworks/cclua/src/lua-bindings/lua_cclua.cpp @@ -1,12 +1,12 @@ // -// AUTO BUILD, DON'T MODIFY! +// AUTO GENERATED, DO NOT MODIFY! // #include "lua_cclua.h" #include "lua-bindings/lua_cocos2d_types.h" #include "lua-bindings/lua_conv_manual.h" #include "cclua/cclua.h" -static int _cclua_Callback___call(lua_State *L) +static int _olua_fun_cclua_Callback___call(lua_State *L) { olua_startinvoke(L); @@ -18,18 +18,26 @@ static int _cclua_Callback___call(lua_State *L) return 1; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cclua_Callback(lua_State *L) +static int _olua_cls_cclua_Callback(lua_State *L) { oluacls_class(L, "cclua.Callback"); - oluacls_func(L, "__call", _cclua_Callback___call); + oluacls_func(L, "__call", _olua_fun_cclua_Callback___call); return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cclua_QRCode_ECLevel(lua_State *L) +OLUA_LIB int luaopen_cclua_Callback(lua_State *L) +{ + olua_require(L, "cclua", luaopen_cclua); + if (!olua_getclass(L, "cclua.Callback")) { + luaL_error(L, "class not found: cclua::Callback"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_cclua_QRCode_ECLevel(lua_State *L) { oluacls_class(L, "cclua.QRCode.ECLevel"); oluacls_func(L, "__index", olua_indexerror); @@ -41,10 +49,19 @@ OLUA_LIB int luaopen_cclua_QRCode_ECLevel(lua_State *L) return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cclua_QRCode_EncodeMode(lua_State *L) +OLUA_LIB int luaopen_cclua_QRCode_ECLevel(lua_State *L) +{ + olua_require(L, "cclua", luaopen_cclua); + if (!olua_getclass(L, "cclua.QRCode.ECLevel")) { + luaL_error(L, "class not found: cclua::QRCode::ECLevel"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_cclua_QRCode_EncodeMode(lua_State *L) { oluacls_class(L, "cclua.QRCode.EncodeMode"); oluacls_func(L, "__index", olua_indexerror); @@ -58,9 +75,19 @@ OLUA_LIB int luaopen_cclua_QRCode_EncodeMode(lua_State *L) return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cclua_QRCode_EncodeMode(lua_State *L) +{ + olua_require(L, "cclua", luaopen_cclua); + if (!olua_getclass(L, "cclua.QRCode.EncodeMode")) { + luaL_error(L, "class not found: cclua::QRCode::EncodeMode"); + } + return 1; +} OLUA_END_DECLS -static int _cclua_QRCode_create$1(lua_State *L) +static int _olua_fun_cclua_QRCode_create$1(lua_State *L) { olua_startinvoke(L); @@ -85,7 +112,7 @@ static int _cclua_QRCode_create$1(lua_State *L) return num_ret; } -static int _cclua_QRCode_create$2(lua_State *L) +static int _olua_fun_cclua_QRCode_create$2(lua_State *L) { olua_startinvoke(L); @@ -93,7 +120,7 @@ static int _cclua_QRCode_create$2(lua_State *L) olua_check_string(L, 1, &arg1); - // static cclua::QRCode *create(const std::string &code, @optional int version, @optional cclua::QRCode::ECLevel level, @optional cclua::QRCode::EncodeMode hint, @optional bool casesensitive) + // static cclua::QRCode *create(const std::string &code) cclua::QRCode *ret = cclua::QRCode::create(arg1); int num_ret = olua_push_object(L, ret, "cclua.QRCode"); @@ -102,7 +129,7 @@ static int _cclua_QRCode_create$2(lua_State *L) return num_ret; } -static int _cclua_QRCode_create$3(lua_State *L) +static int _olua_fun_cclua_QRCode_create$3(lua_State *L) { olua_startinvoke(L); @@ -112,7 +139,7 @@ static int _cclua_QRCode_create$3(lua_State *L) olua_check_string(L, 1, &arg1); olua_check_integer(L, 2, &arg2); - // static cclua::QRCode *create(const std::string &code, @optional int version, @optional cclua::QRCode::ECLevel level, @optional cclua::QRCode::EncodeMode hint, @optional bool casesensitive) + // static cclua::QRCode *create(const std::string &code, @optional int version) cclua::QRCode *ret = cclua::QRCode::create(arg1, arg2); int num_ret = olua_push_object(L, ret, "cclua.QRCode"); @@ -121,7 +148,7 @@ static int _cclua_QRCode_create$3(lua_State *L) return num_ret; } -static int _cclua_QRCode_create$4(lua_State *L) +static int _olua_fun_cclua_QRCode_create$4(lua_State *L) { olua_startinvoke(L); @@ -133,7 +160,7 @@ static int _cclua_QRCode_create$4(lua_State *L) olua_check_integer(L, 2, &arg2); olua_check_enum(L, 3, &arg3); - // static cclua::QRCode *create(const std::string &code, @optional int version, @optional cclua::QRCode::ECLevel level, @optional cclua::QRCode::EncodeMode hint, @optional bool casesensitive) + // static cclua::QRCode *create(const std::string &code, @optional int version, @optional cclua::QRCode::ECLevel level) cclua::QRCode *ret = cclua::QRCode::create(arg1, arg2, arg3); int num_ret = olua_push_object(L, ret, "cclua.QRCode"); @@ -142,7 +169,7 @@ static int _cclua_QRCode_create$4(lua_State *L) return num_ret; } -static int _cclua_QRCode_create$5(lua_State *L) +static int _olua_fun_cclua_QRCode_create$5(lua_State *L) { olua_startinvoke(L); @@ -156,7 +183,7 @@ static int _cclua_QRCode_create$5(lua_State *L) olua_check_enum(L, 3, &arg3); olua_check_enum(L, 4, &arg4); - // static cclua::QRCode *create(const std::string &code, @optional int version, @optional cclua::QRCode::ECLevel level, @optional cclua::QRCode::EncodeMode hint, @optional bool casesensitive) + // static cclua::QRCode *create(const std::string &code, @optional int version, @optional cclua::QRCode::ECLevel level, @optional cclua::QRCode::EncodeMode hint) cclua::QRCode *ret = cclua::QRCode::create(arg1, arg2, arg3, arg4); int num_ret = olua_push_object(L, ret, "cclua.QRCode"); @@ -165,42 +192,42 @@ static int _cclua_QRCode_create$5(lua_State *L) return num_ret; } -static int _cclua_QRCode_create(lua_State *L) +static int _olua_fun_cclua_QRCode_create(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 1) { // if ((olua_is_string(L, 1))) { - // static cclua::QRCode *create(const std::string &code, @optional int version, @optional cclua::QRCode::ECLevel level, @optional cclua::QRCode::EncodeMode hint, @optional bool casesensitive) - return _cclua_QRCode_create$2(L); + // static cclua::QRCode *create(const std::string &code) + return _olua_fun_cclua_QRCode_create$2(L); // } } if (num_args == 2) { // if ((olua_is_string(L, 1)) && (olua_is_integer(L, 2))) { - // static cclua::QRCode *create(const std::string &code, @optional int version, @optional cclua::QRCode::ECLevel level, @optional cclua::QRCode::EncodeMode hint, @optional bool casesensitive) - return _cclua_QRCode_create$3(L); + // static cclua::QRCode *create(const std::string &code, @optional int version) + return _olua_fun_cclua_QRCode_create$3(L); // } } if (num_args == 3) { // if ((olua_is_string(L, 1)) && (olua_is_integer(L, 2)) && (olua_is_enum(L, 3))) { - // static cclua::QRCode *create(const std::string &code, @optional int version, @optional cclua::QRCode::ECLevel level, @optional cclua::QRCode::EncodeMode hint, @optional bool casesensitive) - return _cclua_QRCode_create$4(L); + // static cclua::QRCode *create(const std::string &code, @optional int version, @optional cclua::QRCode::ECLevel level) + return _olua_fun_cclua_QRCode_create$4(L); // } } if (num_args == 4) { // if ((olua_is_string(L, 1)) && (olua_is_integer(L, 2)) && (olua_is_enum(L, 3)) && (olua_is_enum(L, 4))) { - // static cclua::QRCode *create(const std::string &code, @optional int version, @optional cclua::QRCode::ECLevel level, @optional cclua::QRCode::EncodeMode hint, @optional bool casesensitive) - return _cclua_QRCode_create$5(L); + // static cclua::QRCode *create(const std::string &code, @optional int version, @optional cclua::QRCode::ECLevel level, @optional cclua::QRCode::EncodeMode hint) + return _olua_fun_cclua_QRCode_create$5(L); // } } if (num_args == 5) { // if ((olua_is_string(L, 1)) && (olua_is_integer(L, 2)) && (olua_is_enum(L, 3)) && (olua_is_enum(L, 4)) && (olua_is_bool(L, 5))) { // static cclua::QRCode *create(const std::string &code, @optional int version, @optional cclua::QRCode::ECLevel level, @optional cclua::QRCode::EncodeMode hint, @optional bool casesensitive) - return _cclua_QRCode_create$1(L); + return _olua_fun_cclua_QRCode_create$1(L); // } } @@ -209,17 +236,26 @@ static int _cclua_QRCode_create(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cclua_QRCode(lua_State *L) +static int _olua_cls_cclua_QRCode(lua_State *L) { oluacls_class(L, "cclua.QRCode"); - oluacls_func(L, "create", _cclua_QRCode_create); + oluacls_func(L, "create", _olua_fun_cclua_QRCode_create); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cclua_QRCode(lua_State *L) +{ + olua_require(L, "cclua", luaopen_cclua); + if (!olua_getclass(L, "cclua.QRCode")) { + luaL_error(L, "class not found: cclua::QRCode"); + } + return 1; +} OLUA_END_DECLS -static int _cclua_SceneNoCamera_create(lua_State *L) +static int _olua_fun_cclua_SceneNoCamera_create(lua_State *L) { olua_startinvoke(L); @@ -233,7 +269,7 @@ static int _cclua_SceneNoCamera_create(lua_State *L) } #if (CC_USE_PHYSICS || (CC_USE_3D_PHYSICS && CC_ENABLE_BULLET_INTEGRATION)) -static int _cclua_SceneNoCamera_createWithPhysics(lua_State *L) +static int _olua_fun_cclua_SceneNoCamera_createWithPhysics(lua_State *L) { olua_startinvoke(L); @@ -247,16 +283,16 @@ static int _cclua_SceneNoCamera_createWithPhysics(lua_State *L) } #endif -static int _cclua_SceneNoCamera_createWithSize(lua_State *L) +static int _olua_fun_cclua_SceneNoCamera_createWithSize(lua_State *L) { olua_startinvoke(L); - cocos2d::Size arg1; /** size */ + cocos2d::Size *arg1; /** size */ olua_check_object(L, 1, &arg1, "cc.Size"); // static cclua::SceneNoCamera *createWithSize(const cocos2d::Size &size) - cclua::SceneNoCamera *ret = cclua::SceneNoCamera::createWithSize(arg1); + cclua::SceneNoCamera *ret = cclua::SceneNoCamera::createWithSize(*arg1); int num_ret = olua_push_object(L, ret, "cclua.SceneNoCamera"); olua_endinvoke(L); @@ -264,11 +300,11 @@ static int _cclua_SceneNoCamera_createWithSize(lua_State *L) return num_ret; } -static int _cclua_SceneNoCamera_new(lua_State *L) +static int _olua_fun_cclua_SceneNoCamera_new(lua_State *L) { olua_startinvoke(L); - // SceneNoCamera() + // cclua::SceneNoCamera() cclua::SceneNoCamera *ret = new cclua::SceneNoCamera(); int num_ret = olua_push_object(L, ret, "cclua.SceneNoCamera"); olua_postnew(L, ret); @@ -278,22 +314,31 @@ static int _cclua_SceneNoCamera_new(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cclua_SceneNoCamera(lua_State *L) +static int _olua_cls_cclua_SceneNoCamera(lua_State *L) { oluacls_class(L, "cclua.SceneNoCamera"); - oluacls_func(L, "create", _cclua_SceneNoCamera_create); + oluacls_func(L, "create", _olua_fun_cclua_SceneNoCamera_create); #if (CC_USE_PHYSICS || (CC_USE_3D_PHYSICS && CC_ENABLE_BULLET_INTEGRATION)) - oluacls_func(L, "createWithPhysics", _cclua_SceneNoCamera_createWithPhysics); + oluacls_func(L, "createWithPhysics", _olua_fun_cclua_SceneNoCamera_createWithPhysics); #endif - oluacls_func(L, "createWithSize", _cclua_SceneNoCamera_createWithSize); - oluacls_func(L, "new", _cclua_SceneNoCamera_new); + oluacls_func(L, "createWithSize", _olua_fun_cclua_SceneNoCamera_createWithSize); + oluacls_func(L, "new", _olua_fun_cclua_SceneNoCamera_new); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cclua_SceneNoCamera(lua_State *L) +{ + olua_require(L, "cclua", luaopen_cclua); + if (!olua_getclass(L, "cclua.SceneNoCamera")) { + luaL_error(L, "class not found: cclua::SceneNoCamera"); + } + return 1; +} OLUA_END_DECLS -static int _cclua_permission_status___gc(lua_State *L) +static int _olua_fun_cclua_permission_status___gc(lua_State *L) { olua_startinvoke(L); @@ -305,7 +350,7 @@ static int _cclua_permission_status___gc(lua_State *L) return 0; } -static int _cclua_permission_status___olua_move(lua_State *L) +static int _olua_fun_cclua_permission_status___olua_move(lua_State *L) { olua_startinvoke(L); @@ -317,14 +362,13 @@ static int _cclua_permission_status___olua_move(lua_State *L) return 1; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cclua_permission_status(lua_State *L) +static int _olua_cls_cclua_permission_status(lua_State *L) { oluacls_class(L, "cclua.permission.status"); oluacls_func(L, "__index", olua_indexerror); oluacls_func(L, "__newindex", olua_newindexerror); - oluacls_func(L, "__gc", _cclua_permission_status___gc); - oluacls_func(L, "__olua_move", _cclua_permission_status___olua_move); + oluacls_func(L, "__gc", _olua_fun_cclua_permission_status___gc); + oluacls_func(L, "__olua_move", _olua_fun_cclua_permission_status___olua_move); oluacls_const(L, "ALWAYS", cclua::permission::status::ALWAYS); oluacls_const(L, "AUTHORIZED", cclua::permission::status::AUTHORIZED); oluacls_const(L, "DENIED", cclua::permission::status::DENIED); @@ -336,9 +380,19 @@ OLUA_LIB int luaopen_cclua_permission_status(lua_State *L) return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cclua_permission_status(lua_State *L) +{ + olua_require(L, "cclua", luaopen_cclua); + if (!olua_getclass(L, "cclua.permission.status")) { + luaL_error(L, "class not found: cclua::permission::status"); + } + return 1; +} OLUA_END_DECLS -static int _cclua_permission_android___gc(lua_State *L) +static int _olua_fun_cclua_permission_android___gc(lua_State *L) { olua_startinvoke(L); @@ -350,7 +404,7 @@ static int _cclua_permission_android___gc(lua_State *L) return 0; } -static int _cclua_permission_android___olua_move(lua_State *L) +static int _olua_fun_cclua_permission_android___olua_move(lua_State *L) { olua_startinvoke(L); @@ -362,14 +416,13 @@ static int _cclua_permission_android___olua_move(lua_State *L) return 1; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cclua_permission_android(lua_State *L) +static int _olua_cls_cclua_permission_android(lua_State *L) { oluacls_class(L, "cclua.permission.android"); oluacls_func(L, "__index", olua_indexerror); oluacls_func(L, "__newindex", olua_newindexerror); - oluacls_func(L, "__gc", _cclua_permission_android___gc); - oluacls_func(L, "__olua_move", _cclua_permission_android___olua_move); + oluacls_func(L, "__gc", _olua_fun_cclua_permission_android___gc); + oluacls_func(L, "__olua_move", _olua_fun_cclua_permission_android___olua_move); oluacls_const(L, "ACCEPT_HANDOVER", cclua::permission::android::ACCEPT_HANDOVER); oluacls_const(L, "ACCESS_CHECKIN_PROPERTIES", cclua::permission::android::ACCESS_CHECKIN_PROPERTIES); oluacls_const(L, "ACCESS_COARSE_LOCATION", cclua::permission::android::ACCESS_COARSE_LOCATION); @@ -524,9 +577,19 @@ OLUA_LIB int luaopen_cclua_permission_android(lua_State *L) return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cclua_permission_android(lua_State *L) +{ + olua_require(L, "cclua", luaopen_cclua); + if (!olua_getclass(L, "cclua.permission.android")) { + luaL_error(L, "class not found: cclua::permission::android"); + } + return 1; +} OLUA_END_DECLS -static int _cclua_permission___gc(lua_State *L) +static int _olua_fun_cclua_permission___gc(lua_State *L) { olua_startinvoke(L); @@ -538,7 +601,7 @@ static int _cclua_permission___gc(lua_State *L) return 0; } -static int _cclua_permission___olua_move(lua_State *L) +static int _olua_fun_cclua_permission___olua_move(lua_State *L) { olua_startinvoke(L); @@ -550,7 +613,7 @@ static int _cclua_permission___olua_move(lua_State *L) return 1; } -static int _cclua_permission_get_android(lua_State *L) +static int _olua_fun_cclua_permission_get_android(lua_State *L) { olua_startinvoke(L); @@ -562,7 +625,7 @@ static int _cclua_permission_get_android(lua_State *L) return 1; } -static int _cclua_permission_get_status(lua_State *L) +static int _olua_fun_cclua_permission_get_status(lua_State *L) { olua_startinvoke(L); @@ -574,16 +637,15 @@ static int _cclua_permission_get_status(lua_State *L) return 1; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cclua_permission(lua_State *L) +static int _olua_cls_cclua_permission(lua_State *L) { oluacls_class(L, "cclua.permission"); oluacls_func(L, "__index", olua_indexerror); oluacls_func(L, "__newindex", olua_newindexerror); - oluacls_func(L, "__gc", _cclua_permission___gc); - oluacls_func(L, "__olua_move", _cclua_permission___olua_move); - oluacls_prop(L, "android", _cclua_permission_get_android, nullptr); - oluacls_prop(L, "status", _cclua_permission_get_status, nullptr); + oluacls_func(L, "__gc", _olua_fun_cclua_permission___gc); + oluacls_func(L, "__olua_move", _olua_fun_cclua_permission___olua_move); + oluacls_prop(L, "android", _olua_fun_cclua_permission_get_android, nullptr); + oluacls_prop(L, "status", _olua_fun_cclua_permission_get_status, nullptr); oluacls_const(L, "CALENDAR", cclua::permission::CALENDAR); oluacls_const(L, "CAMERA", cclua::permission::CAMERA); oluacls_const(L, "CONTACTS", cclua::permission::CONTACTS); @@ -598,9 +660,19 @@ OLUA_LIB int luaopen_cclua_permission(lua_State *L) return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cclua_permission(lua_State *L) +{ + olua_require(L, "cclua", luaopen_cclua); + if (!olua_getclass(L, "cclua.permission")) { + luaL_error(L, "class not found: cclua::permission"); + } + return 1; +} OLUA_END_DECLS -static int _cclua_runtime___gc(lua_State *L) +static int _olua_fun_cclua_runtime___gc(lua_State *L) { olua_startinvoke(L); @@ -612,7 +684,7 @@ static int _cclua_runtime___gc(lua_State *L) return 0; } -static int _cclua_runtime___olua_move(lua_State *L) +static int _olua_fun_cclua_runtime___olua_move(lua_State *L) { olua_startinvoke(L); @@ -624,7 +696,7 @@ static int _cclua_runtime___olua_move(lua_State *L) return 1; } -static int _cclua_runtime_alert(lua_State *L) +static int _olua_fun_cclua_runtime_alert(lua_State *L) { olua_startinvoke(L); @@ -642,15 +714,16 @@ static int _cclua_runtime_alert(lua_State *L) void *cb_store = (void *)olua_pushclassobj(L, "cclua.runtime"); std::string cb_tag = "alert"; - std::string cb_name = olua_setcallback(L, cb_store, 5, cb_tag.c_str(), OLUA_TAG_NEW); + std::string cb_name = olua_setcallback(L, cb_store, 5, cb_tag.c_str(), OLUA_TAG_NEW); olua_Context cb_ctx = olua_context(L); - arg5 = [cb_store, cb_name, cb_ctx](bool arg1) { + // lua_State *ML = olua_mainthread(L); + arg5 = [cb_store, cb_name, cb_ctx /*, ML */](bool cb_arg1) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); if (olua_contextequal(L, cb_ctx)) { int top = lua_gettop(L); - olua_push_bool(L, arg1); + olua_push_bool(L, cb_arg1); olua_callback(L, cb_store, cb_name.c_str(), 1); @@ -660,7 +733,7 @@ static int _cclua_runtime_alert(lua_State *L) } }; - // static void alert(const std::string &title, const std::string &message, const std::string &ok, const std::string &no, @localvar const std::function &callback) + // static void alert(const std::string &title, const std::string &message, const std::string &ok, const std::string &no, const std::function &callback) cclua::runtime::alert(arg1, arg2, arg3, arg4, arg5); olua_endinvoke(L); @@ -668,7 +741,7 @@ static int _cclua_runtime_alert(lua_State *L) return 0; } -static int _cclua_runtime_canOpenURL(lua_State *L) +static int _olua_fun_cclua_runtime_canOpenURL(lua_State *L) { olua_startinvoke(L); @@ -685,7 +758,7 @@ static int _cclua_runtime_canOpenURL(lua_State *L) return num_ret; } -static int _cclua_runtime_capture$1(lua_State *L) +static int _olua_fun_cclua_runtime_capture$1(lua_State *L) { olua_startinvoke(L); @@ -712,7 +785,7 @@ static int _cclua_runtime_capture$1(lua_State *L) return num_ret; } -static int _cclua_runtime_capture$2(lua_State *L) +static int _olua_fun_cclua_runtime_capture$2(lua_State *L) { olua_startinvoke(L); @@ -724,7 +797,7 @@ static int _cclua_runtime_capture$2(lua_State *L) olua_check_number(L, 2, &arg2); olua_check_number(L, 3, &arg3); - // static cocos2d::Sprite *capture(cocos2d::Node *node, float width, float height, @optional float scale, @optional cocos2d::backend::PixelFormat format, @optional cocos2d::backend::PixelFormat depthStencilFormat) + // static cocos2d::Sprite *capture(cocos2d::Node *node, float width, float height) cocos2d::Sprite *ret = cclua::runtime::capture(arg1, arg2, arg3); int num_ret = olua_push_object(L, ret, "cc.Sprite"); @@ -733,7 +806,7 @@ static int _cclua_runtime_capture$2(lua_State *L) return num_ret; } -static int _cclua_runtime_capture$3(lua_State *L) +static int _olua_fun_cclua_runtime_capture$3(lua_State *L) { olua_startinvoke(L); @@ -747,7 +820,7 @@ static int _cclua_runtime_capture$3(lua_State *L) olua_check_number(L, 3, &arg3); olua_check_number(L, 4, &arg4); - // static cocos2d::Sprite *capture(cocos2d::Node *node, float width, float height, @optional float scale, @optional cocos2d::backend::PixelFormat format, @optional cocos2d::backend::PixelFormat depthStencilFormat) + // static cocos2d::Sprite *capture(cocos2d::Node *node, float width, float height, @optional float scale) cocos2d::Sprite *ret = cclua::runtime::capture(arg1, arg2, arg3, arg4); int num_ret = olua_push_object(L, ret, "cc.Sprite"); @@ -756,7 +829,7 @@ static int _cclua_runtime_capture$3(lua_State *L) return num_ret; } -static int _cclua_runtime_capture$4(lua_State *L) +static int _olua_fun_cclua_runtime_capture$4(lua_State *L) { olua_startinvoke(L); @@ -772,7 +845,7 @@ static int _cclua_runtime_capture$4(lua_State *L) olua_check_number(L, 4, &arg4); olua_check_enum(L, 5, &arg5); - // static cocos2d::Sprite *capture(cocos2d::Node *node, float width, float height, @optional float scale, @optional cocos2d::backend::PixelFormat format, @optional cocos2d::backend::PixelFormat depthStencilFormat) + // static cocos2d::Sprite *capture(cocos2d::Node *node, float width, float height, @optional float scale, @optional cocos2d::backend::PixelFormat format) cocos2d::Sprite *ret = cclua::runtime::capture(arg1, arg2, arg3, arg4, arg5); int num_ret = olua_push_object(L, ret, "cc.Sprite"); @@ -781,35 +854,35 @@ static int _cclua_runtime_capture$4(lua_State *L) return num_ret; } -static int _cclua_runtime_capture(lua_State *L) +static int _olua_fun_cclua_runtime_capture(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 3) { // if ((olua_is_object(L, 1, "cc.Node")) && (olua_is_number(L, 2)) && (olua_is_number(L, 3))) { - // static cocos2d::Sprite *capture(cocos2d::Node *node, float width, float height, @optional float scale, @optional cocos2d::backend::PixelFormat format, @optional cocos2d::backend::PixelFormat depthStencilFormat) - return _cclua_runtime_capture$2(L); + // static cocos2d::Sprite *capture(cocos2d::Node *node, float width, float height) + return _olua_fun_cclua_runtime_capture$2(L); // } } if (num_args == 4) { // if ((olua_is_object(L, 1, "cc.Node")) && (olua_is_number(L, 2)) && (olua_is_number(L, 3)) && (olua_is_number(L, 4))) { - // static cocos2d::Sprite *capture(cocos2d::Node *node, float width, float height, @optional float scale, @optional cocos2d::backend::PixelFormat format, @optional cocos2d::backend::PixelFormat depthStencilFormat) - return _cclua_runtime_capture$3(L); + // static cocos2d::Sprite *capture(cocos2d::Node *node, float width, float height, @optional float scale) + return _olua_fun_cclua_runtime_capture$3(L); // } } if (num_args == 5) { // if ((olua_is_object(L, 1, "cc.Node")) && (olua_is_number(L, 2)) && (olua_is_number(L, 3)) && (olua_is_number(L, 4)) && (olua_is_enum(L, 5))) { - // static cocos2d::Sprite *capture(cocos2d::Node *node, float width, float height, @optional float scale, @optional cocos2d::backend::PixelFormat format, @optional cocos2d::backend::PixelFormat depthStencilFormat) - return _cclua_runtime_capture$4(L); + // static cocos2d::Sprite *capture(cocos2d::Node *node, float width, float height, @optional float scale, @optional cocos2d::backend::PixelFormat format) + return _olua_fun_cclua_runtime_capture$4(L); // } } if (num_args == 6) { // if ((olua_is_object(L, 1, "cc.Node")) && (olua_is_number(L, 2)) && (olua_is_number(L, 3)) && (olua_is_number(L, 4)) && (olua_is_enum(L, 5)) && (olua_is_enum(L, 6))) { // static cocos2d::Sprite *capture(cocos2d::Node *node, float width, float height, @optional float scale, @optional cocos2d::backend::PixelFormat format, @optional cocos2d::backend::PixelFormat depthStencilFormat) - return _cclua_runtime_capture$1(L); + return _olua_fun_cclua_runtime_capture$1(L); // } } @@ -818,7 +891,7 @@ static int _cclua_runtime_capture(lua_State *L) return 0; } -static int _cclua_runtime_clearStorage(lua_State *L) +static int _olua_fun_cclua_runtime_clearStorage(lua_State *L) { olua_startinvoke(L); @@ -830,7 +903,7 @@ static int _cclua_runtime_clearStorage(lua_State *L) return 0; } -static int _cclua_runtime_disableReport(lua_State *L) +static int _olua_fun_cclua_runtime_disableReport(lua_State *L) { olua_startinvoke(L); @@ -842,7 +915,7 @@ static int _cclua_runtime_disableReport(lua_State *L) return 0; } -static int _cclua_runtime_exit(lua_State *L) +static int _olua_fun_cclua_runtime_exit(lua_State *L) { olua_startinvoke(L); @@ -854,7 +927,7 @@ static int _cclua_runtime_exit(lua_State *L) return 0; } -static int _cclua_runtime_gc(lua_State *L) +static int _olua_fun_cclua_runtime_gc(lua_State *L) { olua_startinvoke(L); @@ -866,7 +939,7 @@ static int _cclua_runtime_gc(lua_State *L) return 0; } -static int _cclua_runtime_getActionManager(lua_State *L) +static int _olua_fun_cclua_runtime_getActionManager(lua_State *L) { olua_startinvoke(L); @@ -885,7 +958,7 @@ static int _cclua_runtime_getActionManager(lua_State *L) return num_ret; } -static int _cclua_runtime_getAppBuild(lua_State *L) +static int _olua_fun_cclua_runtime_getAppBuild(lua_State *L) { olua_startinvoke(L); @@ -898,7 +971,7 @@ static int _cclua_runtime_getAppBuild(lua_State *L) return num_ret; } -static int _cclua_runtime_getAppName(lua_State *L) +static int _olua_fun_cclua_runtime_getAppName(lua_State *L) { olua_startinvoke(L); @@ -911,7 +984,7 @@ static int _cclua_runtime_getAppName(lua_State *L) return num_ret; } -static int _cclua_runtime_getAppVersion(lua_State *L) +static int _olua_fun_cclua_runtime_getAppVersion(lua_State *L) { olua_startinvoke(L); @@ -924,7 +997,7 @@ static int _cclua_runtime_getAppVersion(lua_State *L) return num_ret; } -static int _cclua_runtime_getArgs(lua_State *L) +static int _olua_fun_cclua_runtime_getArgs(lua_State *L) { olua_startinvoke(L); @@ -939,7 +1012,7 @@ static int _cclua_runtime_getArgs(lua_State *L) return num_ret; } -static int _cclua_runtime_getAudioSessionCatalog(lua_State *L) +static int _olua_fun_cclua_runtime_getAudioSessionCatalog(lua_State *L) { olua_startinvoke(L); @@ -952,7 +1025,7 @@ static int _cclua_runtime_getAudioSessionCatalog(lua_State *L) return num_ret; } -static int _cclua_runtime_getChannel(lua_State *L) +static int _olua_fun_cclua_runtime_getChannel(lua_State *L) { olua_startinvoke(L); @@ -965,7 +1038,7 @@ static int _cclua_runtime_getChannel(lua_State *L) return num_ret; } -static int _cclua_runtime_getCocosVersion(lua_State *L) +static int _olua_fun_cclua_runtime_getCocosVersion(lua_State *L) { olua_startinvoke(L); @@ -978,7 +1051,7 @@ static int _cclua_runtime_getCocosVersion(lua_State *L) return num_ret; } -static int _cclua_runtime_getDeviceInfo(lua_State *L) +static int _olua_fun_cclua_runtime_getDeviceInfo(lua_State *L) { olua_startinvoke(L); @@ -991,7 +1064,7 @@ static int _cclua_runtime_getDeviceInfo(lua_State *L) return num_ret; } -static int _cclua_runtime_getEnv(lua_State *L) +static int _olua_fun_cclua_runtime_getEnv(lua_State *L) { olua_startinvoke(L); @@ -1008,7 +1081,7 @@ static int _cclua_runtime_getEnv(lua_State *L) return num_ret; } -static int _cclua_runtime_getEventDispatcher(lua_State *L) +static int _olua_fun_cclua_runtime_getEventDispatcher(lua_State *L) { olua_startinvoke(L); @@ -1027,7 +1100,7 @@ static int _cclua_runtime_getEventDispatcher(lua_State *L) return num_ret; } -static int _cclua_runtime_getFileUtils(lua_State *L) +static int _olua_fun_cclua_runtime_getFileUtils(lua_State *L) { olua_startinvoke(L); @@ -1046,7 +1119,7 @@ static int _cclua_runtime_getFileUtils(lua_State *L) return num_ret; } -static int _cclua_runtime_getFrameRate(lua_State *L) +static int _olua_fun_cclua_runtime_getFrameRate(lua_State *L) { olua_startinvoke(L); @@ -1059,7 +1132,7 @@ static int _cclua_runtime_getFrameRate(lua_State *L) return num_ret; } -static int _cclua_runtime_getLanguage(lua_State *L) +static int _olua_fun_cclua_runtime_getLanguage(lua_State *L) { olua_startinvoke(L); @@ -1072,7 +1145,7 @@ static int _cclua_runtime_getLanguage(lua_State *L) return num_ret; } -static int _cclua_runtime_getLogPath(lua_State *L) +static int _olua_fun_cclua_runtime_getLogPath(lua_State *L) { olua_startinvoke(L); @@ -1085,7 +1158,7 @@ static int _cclua_runtime_getLogPath(lua_State *L) return num_ret; } -static int _cclua_runtime_getManifestVersion(lua_State *L) +static int _olua_fun_cclua_runtime_getManifestVersion(lua_State *L) { olua_startinvoke(L); @@ -1098,7 +1171,7 @@ static int _cclua_runtime_getManifestVersion(lua_State *L) return num_ret; } -static int _cclua_runtime_getMaxFrameRate(lua_State *L) +static int _olua_fun_cclua_runtime_getMaxFrameRate(lua_State *L) { olua_startinvoke(L); @@ -1111,7 +1184,7 @@ static int _cclua_runtime_getMaxFrameRate(lua_State *L) return num_ret; } -static int _cclua_runtime_getNetworkStatus(lua_State *L) +static int _olua_fun_cclua_runtime_getNetworkStatus(lua_State *L) { olua_startinvoke(L); @@ -1124,7 +1197,7 @@ static int _cclua_runtime_getNetworkStatus(lua_State *L) return num_ret; } -static int _cclua_runtime_getOS(lua_State *L) +static int _olua_fun_cclua_runtime_getOS(lua_State *L) { olua_startinvoke(L); @@ -1137,7 +1210,7 @@ static int _cclua_runtime_getOS(lua_State *L) return num_ret; } -static int _cclua_runtime_getPackageName(lua_State *L) +static int _olua_fun_cclua_runtime_getPackageName(lua_State *L) { olua_startinvoke(L); @@ -1150,7 +1223,7 @@ static int _cclua_runtime_getPackageName(lua_State *L) return num_ret; } -static int _cclua_runtime_getPaste(lua_State *L) +static int _olua_fun_cclua_runtime_getPaste(lua_State *L) { olua_startinvoke(L); @@ -1163,7 +1236,7 @@ static int _cclua_runtime_getPaste(lua_State *L) return num_ret; } -static int _cclua_runtime_getPermission(lua_State *L) +static int _olua_fun_cclua_runtime_getPermission(lua_State *L) { olua_startinvoke(L); @@ -1180,7 +1253,7 @@ static int _cclua_runtime_getPermission(lua_State *L) return num_ret; } -static int _cclua_runtime_getProgramCache(lua_State *L) +static int _olua_fun_cclua_runtime_getProgramCache(lua_State *L) { olua_startinvoke(L); @@ -1199,7 +1272,7 @@ static int _cclua_runtime_getProgramCache(lua_State *L) return num_ret; } -static int _cclua_runtime_getRunningScene(lua_State *L) +static int _olua_fun_cclua_runtime_getRunningScene(lua_State *L) { olua_startinvoke(L); @@ -1218,7 +1291,7 @@ static int _cclua_runtime_getRunningScene(lua_State *L) return num_ret; } -static int _cclua_runtime_getSampleCount(lua_State *L) +static int _olua_fun_cclua_runtime_getSampleCount(lua_State *L) { olua_startinvoke(L); @@ -1231,7 +1304,7 @@ static int _cclua_runtime_getSampleCount(lua_State *L) return num_ret; } -static int _cclua_runtime_getScheduler(lua_State *L) +static int _olua_fun_cclua_runtime_getScheduler(lua_State *L) { olua_startinvoke(L); @@ -1250,7 +1323,7 @@ static int _cclua_runtime_getScheduler(lua_State *L) return num_ret; } -static int _cclua_runtime_getSpriteFrameCache(lua_State *L) +static int _olua_fun_cclua_runtime_getSpriteFrameCache(lua_State *L) { olua_startinvoke(L); @@ -1269,7 +1342,7 @@ static int _cclua_runtime_getSpriteFrameCache(lua_State *L) return num_ret; } -static int _cclua_runtime_getTextureCache(lua_State *L) +static int _olua_fun_cclua_runtime_getTextureCache(lua_State *L) { olua_startinvoke(L); @@ -1288,7 +1361,7 @@ static int _cclua_runtime_getTextureCache(lua_State *L) return num_ret; } -static int _cclua_runtime_getTime(lua_State *L) +static int _olua_fun_cclua_runtime_getTime(lua_State *L) { olua_startinvoke(L); @@ -1301,7 +1374,7 @@ static int _cclua_runtime_getTime(lua_State *L) return num_ret; } -static int _cclua_runtime_getVersion(lua_State *L) +static int _olua_fun_cclua_runtime_getVersion(lua_State *L) { olua_startinvoke(L); @@ -1314,7 +1387,7 @@ static int _cclua_runtime_getVersion(lua_State *L) return num_ret; } -static int _cclua_runtime_hasFeature(lua_State *L) +static int _olua_fun_cclua_runtime_hasFeature(lua_State *L) { olua_startinvoke(L); @@ -1331,7 +1404,7 @@ static int _cclua_runtime_hasFeature(lua_State *L) return num_ret; } -static int _cclua_runtime_installAPK(lua_State *L) +static int _olua_fun_cclua_runtime_installAPK(lua_State *L) { olua_startinvoke(L); @@ -1347,7 +1420,7 @@ static int _cclua_runtime_installAPK(lua_State *L) return 0; } -static int _cclua_runtime_isDebug(lua_State *L) +static int _olua_fun_cclua_runtime_isDebug(lua_State *L) { olua_startinvoke(L); @@ -1360,7 +1433,7 @@ static int _cclua_runtime_isDebug(lua_State *L) return num_ret; } -static int _cclua_runtime_isDisplayStats(lua_State *L) +static int _olua_fun_cclua_runtime_isDisplayStats(lua_State *L) { olua_startinvoke(L); @@ -1373,7 +1446,7 @@ static int _cclua_runtime_isDisplayStats(lua_State *L) return num_ret; } -static int _cclua_runtime_isRestarting(lua_State *L) +static int _olua_fun_cclua_runtime_isRestarting(lua_State *L) { olua_startinvoke(L); @@ -1386,7 +1459,7 @@ static int _cclua_runtime_isRestarting(lua_State *L) return num_ret; } -static int _cclua_runtime_launch(lua_State *L) +static int _olua_fun_cclua_runtime_launch(lua_State *L) { olua_startinvoke(L); @@ -1403,7 +1476,7 @@ static int _cclua_runtime_launch(lua_State *L) return num_ret; } -static int _cclua_runtime_load$1(lua_State *L) +static int _olua_fun_cclua_runtime_load$1(lua_State *L) { olua_startinvoke(L); @@ -1419,7 +1492,7 @@ static int _cclua_runtime_load$1(lua_State *L) return (int)ret; } -static int _cclua_runtime_load$2(lua_State *L) +static int _olua_fun_cclua_runtime_load$2(lua_State *L) { olua_startinvoke(L); @@ -1437,21 +1510,21 @@ static int _cclua_runtime_load$2(lua_State *L) return (int)ret; } -static int _cclua_runtime_load(lua_State *L) +static int _olua_fun_cclua_runtime_load(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 1) { // if ((olua_is_string(L, 1))) { // static olua_Return load(lua_State *L, const std::string &name) - return _cclua_runtime_load$1(L); + return _olua_fun_cclua_runtime_load$1(L); // } } if (num_args == 2) { // if ((olua_is_string(L, 1)) && (olua_is_string(L, 2))) { // static olua_Return load(lua_State *L, const std::string &name, const std::string &feature) - return _cclua_runtime_load$2(L); + return _olua_fun_cclua_runtime_load$2(L); // } } @@ -1460,7 +1533,7 @@ static int _cclua_runtime_load(lua_State *L) return 0; } -static int _cclua_runtime_openURL$1(lua_State *L) +static int _olua_fun_cclua_runtime_openURL$1(lua_State *L) { olua_startinvoke(L); @@ -1474,15 +1547,16 @@ static int _cclua_runtime_openURL$1(lua_State *L) std::string cb_tag = "openURL"; std::string cb_name; if (olua_isfunction(L, 2)) { - cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_NEW); + cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_NEW); olua_Context cb_ctx = olua_context(L); - arg2 = [cb_store, cb_name, cb_ctx](bool arg1) { + // lua_State *ML = olua_mainthread(L); + arg2 = [cb_store, cb_name, cb_ctx /*, ML */](bool cb_arg1) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); if (olua_contextequal(L, cb_ctx)) { int top = lua_gettop(L); - olua_push_bool(L, arg1); + olua_push_bool(L, cb_arg1); olua_callback(L, cb_store, cb_name.c_str(), 1); @@ -1495,7 +1569,7 @@ static int _cclua_runtime_openURL$1(lua_State *L) arg2 = nullptr; } - // static void openURL(const std::string &uri, @localvar @optional const std::function callback) + // static void openURL(const std::string &uri, @optional const std::function callback) cclua::runtime::openURL(arg1, arg2); olua_endinvoke(L); @@ -1503,7 +1577,7 @@ static int _cclua_runtime_openURL$1(lua_State *L) return 0; } -static int _cclua_runtime_openURL$2(lua_State *L) +static int _olua_fun_cclua_runtime_openURL$2(lua_State *L) { olua_startinvoke(L); @@ -1511,7 +1585,7 @@ static int _cclua_runtime_openURL$2(lua_State *L) olua_check_string(L, 1, &arg1); - // static void openURL(const std::string &uri, @localvar @optional const std::function callback) + // static void openURL(const std::string &uri) cclua::runtime::openURL(arg1); olua_endinvoke(L); @@ -1519,21 +1593,21 @@ static int _cclua_runtime_openURL$2(lua_State *L) return 0; } -static int _cclua_runtime_openURL(lua_State *L) +static int _olua_fun_cclua_runtime_openURL(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 1) { // if ((olua_is_string(L, 1))) { - // static void openURL(const std::string &uri, @localvar @optional const std::function callback) - return _cclua_runtime_openURL$2(L); + // static void openURL(const std::string &uri) + return _olua_fun_cclua_runtime_openURL$2(L); // } } if (num_args == 2) { // if ((olua_is_string(L, 1)) && (olua_is_callback(L, 2, "std.function"))) { - // static void openURL(const std::string &uri, @localvar @optional const std::function callback) - return _cclua_runtime_openURL$1(L); + // static void openURL(const std::string &uri, @optional const std::function callback) + return _olua_fun_cclua_runtime_openURL$1(L); // } } @@ -1542,7 +1616,7 @@ static int _cclua_runtime_openURL(lua_State *L) return 0; } -static int _cclua_runtime_popScene(lua_State *L) +static int _olua_fun_cclua_runtime_popScene(lua_State *L) { olua_startinvoke(L); @@ -1561,7 +1635,7 @@ static int _cclua_runtime_popScene(lua_State *L) return 0; } -static int _cclua_runtime_popToRootScene(lua_State *L) +static int _olua_fun_cclua_runtime_popToRootScene(lua_State *L) { olua_startinvoke(L); @@ -1580,7 +1654,7 @@ static int _cclua_runtime_popToRootScene(lua_State *L) return 0; } -static int _cclua_runtime_printFeatures(lua_State *L) +static int _olua_fun_cclua_runtime_printFeatures(lua_State *L) { olua_startinvoke(L); @@ -1592,7 +1666,7 @@ static int _cclua_runtime_printFeatures(lua_State *L) return 0; } -static int _cclua_runtime_purgeCachedData(lua_State *L) +static int _olua_fun_cclua_runtime_purgeCachedData(lua_State *L) { olua_startinvoke(L); @@ -1604,7 +1678,7 @@ static int _cclua_runtime_purgeCachedData(lua_State *L) return 0; } -static int _cclua_runtime_pushScene(lua_State *L) +static int _olua_fun_cclua_runtime_pushScene(lua_State *L) { olua_startinvoke(L); @@ -1626,7 +1700,7 @@ static int _cclua_runtime_pushScene(lua_State *L) return 0; } -static int _cclua_runtime_replaceScene(lua_State *L) +static int _olua_fun_cclua_runtime_replaceScene(lua_State *L) { olua_startinvoke(L); @@ -1650,7 +1724,7 @@ static int _cclua_runtime_replaceScene(lua_State *L) return 0; } -static int _cclua_runtime_requestPermission(lua_State *L) +static int _olua_fun_cclua_runtime_requestPermission(lua_State *L) { olua_startinvoke(L); @@ -1662,15 +1736,16 @@ static int _cclua_runtime_requestPermission(lua_State *L) void *cb_store = (void *)olua_pushclassobj(L, "cclua.runtime"); std::string cb_tag = "requestPermission"; - std::string cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_NEW); + std::string cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_NEW); olua_Context cb_ctx = olua_context(L); - arg2 = [cb_store, cb_name, cb_ctx](const std::string &arg1) { + // lua_State *ML = olua_mainthread(L); + arg2 = [cb_store, cb_name, cb_ctx /*, ML */](const std::string &cb_arg1) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); if (olua_contextequal(L, cb_ctx)) { int top = lua_gettop(L); - olua_push_string(L, arg1); + olua_push_string(L, cb_arg1); olua_callback(L, cb_store, cb_name.c_str(), 1); @@ -1680,7 +1755,7 @@ static int _cclua_runtime_requestPermission(lua_State *L) } }; - // static void requestPermission(const std::string &permission, @localvar const std::function &callback) + // static void requestPermission(const std::string &permission, const std::function &callback) cclua::runtime::requestPermission(arg1, arg2); olua_endinvoke(L); @@ -1688,7 +1763,7 @@ static int _cclua_runtime_requestPermission(lua_State *L) return 0; } -static int _cclua_runtime_restart(lua_State *L) +static int _olua_fun_cclua_runtime_restart(lua_State *L) { olua_startinvoke(L); @@ -1701,7 +1776,7 @@ static int _cclua_runtime_restart(lua_State *L) return num_ret; } -static int _cclua_runtime_setAudioSessionCatalog(lua_State *L) +static int _olua_fun_cclua_runtime_setAudioSessionCatalog(lua_State *L) { olua_startinvoke(L); @@ -1717,7 +1792,7 @@ static int _cclua_runtime_setAudioSessionCatalog(lua_State *L) return 0; } -static int _cclua_runtime_setDispatcher(lua_State *L) +static int _olua_fun_cclua_runtime_setDispatcher(lua_State *L) { olua_startinvoke(L); @@ -1727,9 +1802,10 @@ static int _cclua_runtime_setDispatcher(lua_State *L) void *cb_store = (void *)olua_pushclassobj(L, "cclua.runtime"); std::string cb_tag = "Dispatcher"; - std::string cb_name = olua_setcallback(L, cb_store, 1, cb_tag.c_str(), OLUA_TAG_REPLACE); + std::string cb_name = olua_setcallback(L, cb_store, 1, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](const std::string &arg1, const cocos2d::Value &arg2) { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](const std::string &cb_arg1, const cocos2d::Value &cb_arg2) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); @@ -1737,8 +1813,8 @@ static int _cclua_runtime_setDispatcher(lua_State *L) int top = lua_gettop(L); size_t last = olua_push_objpool(L); olua_enable_objpool(L); - olua_push_string(L, arg1); - olua_push_cocos2d_Value(L, arg2); + olua_push_string(L, cb_arg1); + olua_push_cocos2d_Value(L, cb_arg2); olua_disable_objpool(L); olua_callback(L, cb_store, cb_name.c_str(), 2); @@ -1749,7 +1825,7 @@ static int _cclua_runtime_setDispatcher(lua_State *L) } }; - // static void setDispatcher(@localvar const cclua::Callback &dispatcher) + // static void setDispatcher(const cclua::Callback &dispatcher) cclua::runtime::setDispatcher(arg1); olua_endinvoke(L); @@ -1757,7 +1833,7 @@ static int _cclua_runtime_setDispatcher(lua_State *L) return 0; } -static int _cclua_runtime_setDisplayStats(lua_State *L) +static int _olua_fun_cclua_runtime_setDisplayStats(lua_State *L) { olua_startinvoke(L); @@ -1773,7 +1849,7 @@ static int _cclua_runtime_setDisplayStats(lua_State *L) return 0; } -static int _cclua_runtime_setEnv$1(lua_State *L) +static int _olua_fun_cclua_runtime_setEnv$1(lua_State *L) { olua_startinvoke(L); @@ -1793,7 +1869,7 @@ static int _cclua_runtime_setEnv$1(lua_State *L) return 0; } -static int _cclua_runtime_setEnv$2(lua_State *L) +static int _olua_fun_cclua_runtime_setEnv$2(lua_State *L) { olua_startinvoke(L); @@ -1803,7 +1879,7 @@ static int _cclua_runtime_setEnv$2(lua_State *L) olua_check_string(L, 1, &arg1); olua_check_string(L, 2, &arg2); - // static void setEnv(const std::string &key, const std::string &value, @optional bool save) + // static void setEnv(const std::string &key, const std::string &value) cclua::runtime::setEnv(arg1, arg2); olua_endinvoke(L); @@ -1811,21 +1887,21 @@ static int _cclua_runtime_setEnv$2(lua_State *L) return 0; } -static int _cclua_runtime_setEnv(lua_State *L) +static int _olua_fun_cclua_runtime_setEnv(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 2) { // if ((olua_is_string(L, 1)) && (olua_is_string(L, 2))) { - // static void setEnv(const std::string &key, const std::string &value, @optional bool save) - return _cclua_runtime_setEnv$2(L); + // static void setEnv(const std::string &key, const std::string &value) + return _olua_fun_cclua_runtime_setEnv$2(L); // } } if (num_args == 3) { // if ((olua_is_string(L, 1)) && (olua_is_string(L, 2)) && (olua_is_bool(L, 3))) { // static void setEnv(const std::string &key, const std::string &value, @optional bool save) - return _cclua_runtime_setEnv$1(L); + return _olua_fun_cclua_runtime_setEnv$1(L); // } } @@ -1834,7 +1910,7 @@ static int _cclua_runtime_setEnv(lua_State *L) return 0; } -static int _cclua_runtime_setFrameRate(lua_State *L) +static int _olua_fun_cclua_runtime_setFrameRate(lua_State *L) { olua_startinvoke(L); @@ -1850,7 +1926,7 @@ static int _cclua_runtime_setFrameRate(lua_State *L) return 0; } -static int _cclua_runtime_setLogPath(lua_State *L) +static int _olua_fun_cclua_runtime_setLogPath(lua_State *L) { olua_startinvoke(L); @@ -1866,7 +1942,7 @@ static int _cclua_runtime_setLogPath(lua_State *L) return 0; } -static int _cclua_runtime_setManifestVersion(lua_State *L) +static int _olua_fun_cclua_runtime_setManifestVersion(lua_State *L) { olua_startinvoke(L); @@ -1882,7 +1958,7 @@ static int _cclua_runtime_setManifestVersion(lua_State *L) return 0; } -static int _cclua_runtime_setPaste(lua_State *L) +static int _olua_fun_cclua_runtime_setPaste(lua_State *L) { olua_startinvoke(L); @@ -1898,7 +1974,7 @@ static int _cclua_runtime_setPaste(lua_State *L) return 0; } -static int _cclua_runtime_setSampleCount(lua_State *L) +static int _olua_fun_cclua_runtime_setSampleCount(lua_State *L) { olua_startinvoke(L); @@ -1914,7 +1990,7 @@ static int _cclua_runtime_setSampleCount(lua_State *L) return 0; } -static int _cclua_runtime_showLog(lua_State *L) +static int _olua_fun_cclua_runtime_showLog(lua_State *L) { olua_startinvoke(L); @@ -1926,7 +2002,7 @@ static int _cclua_runtime_showLog(lua_State *L) return 0; } -static int _cclua_runtime_testCrash(lua_State *L) +static int _olua_fun_cclua_runtime_testCrash(lua_State *L) { olua_startinvoke(L); @@ -1938,113 +2014,122 @@ static int _cclua_runtime_testCrash(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cclua_runtime(lua_State *L) +static int _olua_cls_cclua_runtime(lua_State *L) { oluacls_class(L, "cclua.runtime"); - oluacls_func(L, "__gc", _cclua_runtime___gc); - oluacls_func(L, "__olua_move", _cclua_runtime___olua_move); - oluacls_func(L, "alert", _cclua_runtime_alert); - oluacls_func(L, "canOpenURL", _cclua_runtime_canOpenURL); - oluacls_func(L, "capture", _cclua_runtime_capture); - oluacls_func(L, "clearStorage", _cclua_runtime_clearStorage); - oluacls_func(L, "disableReport", _cclua_runtime_disableReport); - oluacls_func(L, "exit", _cclua_runtime_exit); - oluacls_func(L, "gc", _cclua_runtime_gc); - oluacls_func(L, "getActionManager", _cclua_runtime_getActionManager); - oluacls_func(L, "getAppBuild", _cclua_runtime_getAppBuild); - oluacls_func(L, "getAppName", _cclua_runtime_getAppName); - oluacls_func(L, "getAppVersion", _cclua_runtime_getAppVersion); - oluacls_func(L, "getArgs", _cclua_runtime_getArgs); - oluacls_func(L, "getAudioSessionCatalog", _cclua_runtime_getAudioSessionCatalog); - oluacls_func(L, "getChannel", _cclua_runtime_getChannel); - oluacls_func(L, "getCocosVersion", _cclua_runtime_getCocosVersion); - oluacls_func(L, "getDeviceInfo", _cclua_runtime_getDeviceInfo); - oluacls_func(L, "getEnv", _cclua_runtime_getEnv); - oluacls_func(L, "getEventDispatcher", _cclua_runtime_getEventDispatcher); - oluacls_func(L, "getFileUtils", _cclua_runtime_getFileUtils); - oluacls_func(L, "getFrameRate", _cclua_runtime_getFrameRate); - oluacls_func(L, "getLanguage", _cclua_runtime_getLanguage); - oluacls_func(L, "getLogPath", _cclua_runtime_getLogPath); - oluacls_func(L, "getManifestVersion", _cclua_runtime_getManifestVersion); - oluacls_func(L, "getMaxFrameRate", _cclua_runtime_getMaxFrameRate); - oluacls_func(L, "getNetworkStatus", _cclua_runtime_getNetworkStatus); - oluacls_func(L, "getOS", _cclua_runtime_getOS); - oluacls_func(L, "getPackageName", _cclua_runtime_getPackageName); - oluacls_func(L, "getPaste", _cclua_runtime_getPaste); - oluacls_func(L, "getPermission", _cclua_runtime_getPermission); - oluacls_func(L, "getProgramCache", _cclua_runtime_getProgramCache); - oluacls_func(L, "getRunningScene", _cclua_runtime_getRunningScene); - oluacls_func(L, "getSampleCount", _cclua_runtime_getSampleCount); - oluacls_func(L, "getScheduler", _cclua_runtime_getScheduler); - oluacls_func(L, "getSpriteFrameCache", _cclua_runtime_getSpriteFrameCache); - oluacls_func(L, "getTextureCache", _cclua_runtime_getTextureCache); - oluacls_func(L, "getTime", _cclua_runtime_getTime); - oluacls_func(L, "getVersion", _cclua_runtime_getVersion); - oluacls_func(L, "hasFeature", _cclua_runtime_hasFeature); - oluacls_func(L, "installAPK", _cclua_runtime_installAPK); - oluacls_func(L, "isDebug", _cclua_runtime_isDebug); - oluacls_func(L, "isDisplayStats", _cclua_runtime_isDisplayStats); - oluacls_func(L, "isRestarting", _cclua_runtime_isRestarting); - oluacls_func(L, "launch", _cclua_runtime_launch); - oluacls_func(L, "load", _cclua_runtime_load); - oluacls_func(L, "openURL", _cclua_runtime_openURL); - oluacls_func(L, "popScene", _cclua_runtime_popScene); - oluacls_func(L, "popToRootScene", _cclua_runtime_popToRootScene); - oluacls_func(L, "printFeatures", _cclua_runtime_printFeatures); - oluacls_func(L, "purgeCachedData", _cclua_runtime_purgeCachedData); - oluacls_func(L, "pushScene", _cclua_runtime_pushScene); - oluacls_func(L, "replaceScene", _cclua_runtime_replaceScene); - oluacls_func(L, "requestPermission", _cclua_runtime_requestPermission); - oluacls_func(L, "restart", _cclua_runtime_restart); - oluacls_func(L, "setAudioSessionCatalog", _cclua_runtime_setAudioSessionCatalog); - oluacls_func(L, "setDispatcher", _cclua_runtime_setDispatcher); - oluacls_func(L, "setDisplayStats", _cclua_runtime_setDisplayStats); - oluacls_func(L, "setEnv", _cclua_runtime_setEnv); - oluacls_func(L, "setFrameRate", _cclua_runtime_setFrameRate); - oluacls_func(L, "setLogPath", _cclua_runtime_setLogPath); - oluacls_func(L, "setManifestVersion", _cclua_runtime_setManifestVersion); - oluacls_func(L, "setPaste", _cclua_runtime_setPaste); - oluacls_func(L, "setSampleCount", _cclua_runtime_setSampleCount); - oluacls_func(L, "showLog", _cclua_runtime_showLog); - oluacls_func(L, "testCrash", _cclua_runtime_testCrash); - oluacls_prop(L, "actionManager", _cclua_runtime_getActionManager, nullptr); - oluacls_prop(L, "appBuild", _cclua_runtime_getAppBuild, nullptr); - oluacls_prop(L, "appName", _cclua_runtime_getAppName, nullptr); - oluacls_prop(L, "appVersion", _cclua_runtime_getAppVersion, nullptr); - oluacls_prop(L, "args", _cclua_runtime_getArgs, nullptr); - oluacls_prop(L, "audioSessionCatalog", _cclua_runtime_getAudioSessionCatalog, _cclua_runtime_setAudioSessionCatalog); - oluacls_prop(L, "channel", _cclua_runtime_getChannel, nullptr); - oluacls_prop(L, "cocosVersion", _cclua_runtime_getCocosVersion, nullptr); - oluacls_prop(L, "debug", _cclua_runtime_isDebug, nullptr); - oluacls_prop(L, "deviceInfo", _cclua_runtime_getDeviceInfo, nullptr); - oluacls_prop(L, "displayStats", _cclua_runtime_isDisplayStats, _cclua_runtime_setDisplayStats); - oluacls_prop(L, "eventDispatcher", _cclua_runtime_getEventDispatcher, nullptr); - oluacls_prop(L, "fileUtils", _cclua_runtime_getFileUtils, nullptr); - oluacls_prop(L, "frameRate", _cclua_runtime_getFrameRate, _cclua_runtime_setFrameRate); - oluacls_prop(L, "language", _cclua_runtime_getLanguage, nullptr); - oluacls_prop(L, "logPath", _cclua_runtime_getLogPath, _cclua_runtime_setLogPath); - oluacls_prop(L, "manifestVersion", _cclua_runtime_getManifestVersion, _cclua_runtime_setManifestVersion); - oluacls_prop(L, "maxFrameRate", _cclua_runtime_getMaxFrameRate, nullptr); - oluacls_prop(L, "networkStatus", _cclua_runtime_getNetworkStatus, nullptr); - oluacls_prop(L, "os", _cclua_runtime_getOS, nullptr); - oluacls_prop(L, "packageName", _cclua_runtime_getPackageName, nullptr); - oluacls_prop(L, "paste", _cclua_runtime_getPaste, _cclua_runtime_setPaste); - oluacls_prop(L, "programCache", _cclua_runtime_getProgramCache, nullptr); - oluacls_prop(L, "restarting", _cclua_runtime_isRestarting, nullptr); - oluacls_prop(L, "runningScene", _cclua_runtime_getRunningScene, nullptr); - oluacls_prop(L, "sampleCount", _cclua_runtime_getSampleCount, _cclua_runtime_setSampleCount); - oluacls_prop(L, "scheduler", _cclua_runtime_getScheduler, nullptr); - oluacls_prop(L, "spriteFrameCache", _cclua_runtime_getSpriteFrameCache, nullptr); - oluacls_prop(L, "textureCache", _cclua_runtime_getTextureCache, nullptr); - oluacls_prop(L, "time", _cclua_runtime_getTime, nullptr); - oluacls_prop(L, "version", _cclua_runtime_getVersion, nullptr); + oluacls_func(L, "__gc", _olua_fun_cclua_runtime___gc); + oluacls_func(L, "__olua_move", _olua_fun_cclua_runtime___olua_move); + oluacls_func(L, "alert", _olua_fun_cclua_runtime_alert); + oluacls_func(L, "canOpenURL", _olua_fun_cclua_runtime_canOpenURL); + oluacls_func(L, "capture", _olua_fun_cclua_runtime_capture); + oluacls_func(L, "clearStorage", _olua_fun_cclua_runtime_clearStorage); + oluacls_func(L, "disableReport", _olua_fun_cclua_runtime_disableReport); + oluacls_func(L, "exit", _olua_fun_cclua_runtime_exit); + oluacls_func(L, "gc", _olua_fun_cclua_runtime_gc); + oluacls_func(L, "getActionManager", _olua_fun_cclua_runtime_getActionManager); + oluacls_func(L, "getAppBuild", _olua_fun_cclua_runtime_getAppBuild); + oluacls_func(L, "getAppName", _olua_fun_cclua_runtime_getAppName); + oluacls_func(L, "getAppVersion", _olua_fun_cclua_runtime_getAppVersion); + oluacls_func(L, "getArgs", _olua_fun_cclua_runtime_getArgs); + oluacls_func(L, "getAudioSessionCatalog", _olua_fun_cclua_runtime_getAudioSessionCatalog); + oluacls_func(L, "getChannel", _olua_fun_cclua_runtime_getChannel); + oluacls_func(L, "getCocosVersion", _olua_fun_cclua_runtime_getCocosVersion); + oluacls_func(L, "getDeviceInfo", _olua_fun_cclua_runtime_getDeviceInfo); + oluacls_func(L, "getEnv", _olua_fun_cclua_runtime_getEnv); + oluacls_func(L, "getEventDispatcher", _olua_fun_cclua_runtime_getEventDispatcher); + oluacls_func(L, "getFileUtils", _olua_fun_cclua_runtime_getFileUtils); + oluacls_func(L, "getFrameRate", _olua_fun_cclua_runtime_getFrameRate); + oluacls_func(L, "getLanguage", _olua_fun_cclua_runtime_getLanguage); + oluacls_func(L, "getLogPath", _olua_fun_cclua_runtime_getLogPath); + oluacls_func(L, "getManifestVersion", _olua_fun_cclua_runtime_getManifestVersion); + oluacls_func(L, "getMaxFrameRate", _olua_fun_cclua_runtime_getMaxFrameRate); + oluacls_func(L, "getNetworkStatus", _olua_fun_cclua_runtime_getNetworkStatus); + oluacls_func(L, "getOS", _olua_fun_cclua_runtime_getOS); + oluacls_func(L, "getPackageName", _olua_fun_cclua_runtime_getPackageName); + oluacls_func(L, "getPaste", _olua_fun_cclua_runtime_getPaste); + oluacls_func(L, "getPermission", _olua_fun_cclua_runtime_getPermission); + oluacls_func(L, "getProgramCache", _olua_fun_cclua_runtime_getProgramCache); + oluacls_func(L, "getRunningScene", _olua_fun_cclua_runtime_getRunningScene); + oluacls_func(L, "getSampleCount", _olua_fun_cclua_runtime_getSampleCount); + oluacls_func(L, "getScheduler", _olua_fun_cclua_runtime_getScheduler); + oluacls_func(L, "getSpriteFrameCache", _olua_fun_cclua_runtime_getSpriteFrameCache); + oluacls_func(L, "getTextureCache", _olua_fun_cclua_runtime_getTextureCache); + oluacls_func(L, "getTime", _olua_fun_cclua_runtime_getTime); + oluacls_func(L, "getVersion", _olua_fun_cclua_runtime_getVersion); + oluacls_func(L, "hasFeature", _olua_fun_cclua_runtime_hasFeature); + oluacls_func(L, "installAPK", _olua_fun_cclua_runtime_installAPK); + oluacls_func(L, "isDebug", _olua_fun_cclua_runtime_isDebug); + oluacls_func(L, "isDisplayStats", _olua_fun_cclua_runtime_isDisplayStats); + oluacls_func(L, "isRestarting", _olua_fun_cclua_runtime_isRestarting); + oluacls_func(L, "launch", _olua_fun_cclua_runtime_launch); + oluacls_func(L, "load", _olua_fun_cclua_runtime_load); + oluacls_func(L, "openURL", _olua_fun_cclua_runtime_openURL); + oluacls_func(L, "popScene", _olua_fun_cclua_runtime_popScene); + oluacls_func(L, "popToRootScene", _olua_fun_cclua_runtime_popToRootScene); + oluacls_func(L, "printFeatures", _olua_fun_cclua_runtime_printFeatures); + oluacls_func(L, "purgeCachedData", _olua_fun_cclua_runtime_purgeCachedData); + oluacls_func(L, "pushScene", _olua_fun_cclua_runtime_pushScene); + oluacls_func(L, "replaceScene", _olua_fun_cclua_runtime_replaceScene); + oluacls_func(L, "requestPermission", _olua_fun_cclua_runtime_requestPermission); + oluacls_func(L, "restart", _olua_fun_cclua_runtime_restart); + oluacls_func(L, "setAudioSessionCatalog", _olua_fun_cclua_runtime_setAudioSessionCatalog); + oluacls_func(L, "setDispatcher", _olua_fun_cclua_runtime_setDispatcher); + oluacls_func(L, "setDisplayStats", _olua_fun_cclua_runtime_setDisplayStats); + oluacls_func(L, "setEnv", _olua_fun_cclua_runtime_setEnv); + oluacls_func(L, "setFrameRate", _olua_fun_cclua_runtime_setFrameRate); + oluacls_func(L, "setLogPath", _olua_fun_cclua_runtime_setLogPath); + oluacls_func(L, "setManifestVersion", _olua_fun_cclua_runtime_setManifestVersion); + oluacls_func(L, "setPaste", _olua_fun_cclua_runtime_setPaste); + oluacls_func(L, "setSampleCount", _olua_fun_cclua_runtime_setSampleCount); + oluacls_func(L, "showLog", _olua_fun_cclua_runtime_showLog); + oluacls_func(L, "testCrash", _olua_fun_cclua_runtime_testCrash); + oluacls_prop(L, "actionManager", _olua_fun_cclua_runtime_getActionManager, nullptr); + oluacls_prop(L, "appBuild", _olua_fun_cclua_runtime_getAppBuild, nullptr); + oluacls_prop(L, "appName", _olua_fun_cclua_runtime_getAppName, nullptr); + oluacls_prop(L, "appVersion", _olua_fun_cclua_runtime_getAppVersion, nullptr); + oluacls_prop(L, "args", _olua_fun_cclua_runtime_getArgs, nullptr); + oluacls_prop(L, "audioSessionCatalog", _olua_fun_cclua_runtime_getAudioSessionCatalog, _olua_fun_cclua_runtime_setAudioSessionCatalog); + oluacls_prop(L, "channel", _olua_fun_cclua_runtime_getChannel, nullptr); + oluacls_prop(L, "cocosVersion", _olua_fun_cclua_runtime_getCocosVersion, nullptr); + oluacls_prop(L, "debug", _olua_fun_cclua_runtime_isDebug, nullptr); + oluacls_prop(L, "deviceInfo", _olua_fun_cclua_runtime_getDeviceInfo, nullptr); + oluacls_prop(L, "displayStats", _olua_fun_cclua_runtime_isDisplayStats, _olua_fun_cclua_runtime_setDisplayStats); + oluacls_prop(L, "eventDispatcher", _olua_fun_cclua_runtime_getEventDispatcher, nullptr); + oluacls_prop(L, "fileUtils", _olua_fun_cclua_runtime_getFileUtils, nullptr); + oluacls_prop(L, "frameRate", _olua_fun_cclua_runtime_getFrameRate, _olua_fun_cclua_runtime_setFrameRate); + oluacls_prop(L, "language", _olua_fun_cclua_runtime_getLanguage, nullptr); + oluacls_prop(L, "logPath", _olua_fun_cclua_runtime_getLogPath, _olua_fun_cclua_runtime_setLogPath); + oluacls_prop(L, "manifestVersion", _olua_fun_cclua_runtime_getManifestVersion, _olua_fun_cclua_runtime_setManifestVersion); + oluacls_prop(L, "maxFrameRate", _olua_fun_cclua_runtime_getMaxFrameRate, nullptr); + oluacls_prop(L, "networkStatus", _olua_fun_cclua_runtime_getNetworkStatus, nullptr); + oluacls_prop(L, "os", _olua_fun_cclua_runtime_getOS, nullptr); + oluacls_prop(L, "packageName", _olua_fun_cclua_runtime_getPackageName, nullptr); + oluacls_prop(L, "paste", _olua_fun_cclua_runtime_getPaste, _olua_fun_cclua_runtime_setPaste); + oluacls_prop(L, "programCache", _olua_fun_cclua_runtime_getProgramCache, nullptr); + oluacls_prop(L, "restarting", _olua_fun_cclua_runtime_isRestarting, nullptr); + oluacls_prop(L, "runningScene", _olua_fun_cclua_runtime_getRunningScene, nullptr); + oluacls_prop(L, "sampleCount", _olua_fun_cclua_runtime_getSampleCount, _olua_fun_cclua_runtime_setSampleCount); + oluacls_prop(L, "scheduler", _olua_fun_cclua_runtime_getScheduler, nullptr); + oluacls_prop(L, "spriteFrameCache", _olua_fun_cclua_runtime_getSpriteFrameCache, nullptr); + oluacls_prop(L, "textureCache", _olua_fun_cclua_runtime_getTextureCache, nullptr); + oluacls_prop(L, "time", _olua_fun_cclua_runtime_getTime, nullptr); + oluacls_prop(L, "version", _olua_fun_cclua_runtime_getVersion, nullptr); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cclua_runtime(lua_State *L) +{ + olua_require(L, "cclua", luaopen_cclua); + if (!olua_getclass(L, "cclua.runtime")) { + luaL_error(L, "class not found: cclua::runtime"); + } return 1; } OLUA_END_DECLS -static int _cclua_filesystem___gc(lua_State *L) +static int _olua_fun_cclua_filesystem___gc(lua_State *L) { olua_startinvoke(L); @@ -2056,7 +2141,7 @@ static int _cclua_filesystem___gc(lua_State *L) return 0; } -static int _cclua_filesystem___olua_move(lua_State *L) +static int _olua_fun_cclua_filesystem___olua_move(lua_State *L) { olua_startinvoke(L); @@ -2068,7 +2153,7 @@ static int _cclua_filesystem___olua_move(lua_State *L) return 1; } -static int _cclua_filesystem_addSearchPath$1(lua_State *L) +static int _olua_fun_cclua_filesystem_addSearchPath$1(lua_State *L) { olua_startinvoke(L); @@ -2086,7 +2171,7 @@ static int _cclua_filesystem_addSearchPath$1(lua_State *L) return 0; } -static int _cclua_filesystem_addSearchPath$2(lua_State *L) +static int _olua_fun_cclua_filesystem_addSearchPath$2(lua_State *L) { olua_startinvoke(L); @@ -2094,7 +2179,7 @@ static int _cclua_filesystem_addSearchPath$2(lua_State *L) olua_check_string(L, 1, &arg1); - // static void addSearchPath(const std::string &path, @optional bool front) + // static void addSearchPath(const std::string &path) cclua::filesystem::addSearchPath(arg1); olua_endinvoke(L); @@ -2102,21 +2187,21 @@ static int _cclua_filesystem_addSearchPath$2(lua_State *L) return 0; } -static int _cclua_filesystem_addSearchPath(lua_State *L) +static int _olua_fun_cclua_filesystem_addSearchPath(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 1) { // if ((olua_is_string(L, 1))) { - // static void addSearchPath(const std::string &path, @optional bool front) - return _cclua_filesystem_addSearchPath$2(L); + // static void addSearchPath(const std::string &path) + return _olua_fun_cclua_filesystem_addSearchPath$2(L); // } } if (num_args == 2) { // if ((olua_is_string(L, 1)) && (olua_is_bool(L, 2))) { // static void addSearchPath(const std::string &path, @optional bool front) - return _cclua_filesystem_addSearchPath$1(L); + return _olua_fun_cclua_filesystem_addSearchPath$1(L); // } } @@ -2125,7 +2210,7 @@ static int _cclua_filesystem_addSearchPath(lua_State *L) return 0; } -static int _cclua_filesystem_copy(lua_State *L) +static int _olua_fun_cclua_filesystem_copy(lua_State *L) { olua_startinvoke(L); @@ -2144,7 +2229,7 @@ static int _cclua_filesystem_copy(lua_State *L) return num_ret; } -static int _cclua_filesystem_createDirectory$1(lua_State *L) +static int _olua_fun_cclua_filesystem_createDirectory$1(lua_State *L) { olua_startinvoke(L); @@ -2163,7 +2248,7 @@ static int _cclua_filesystem_createDirectory$1(lua_State *L) return num_ret; } -static int _cclua_filesystem_createDirectory$2(lua_State *L) +static int _olua_fun_cclua_filesystem_createDirectory$2(lua_State *L) { olua_startinvoke(L); @@ -2171,7 +2256,7 @@ static int _cclua_filesystem_createDirectory$2(lua_State *L) olua_check_string(L, 1, &arg1); - // static bool createDirectory(const std::string &path, @optional bool isFilePath) + // static bool createDirectory(const std::string &path) bool ret = cclua::filesystem::createDirectory(arg1); int num_ret = olua_push_bool(L, ret); @@ -2180,21 +2265,21 @@ static int _cclua_filesystem_createDirectory$2(lua_State *L) return num_ret; } -static int _cclua_filesystem_createDirectory(lua_State *L) +static int _olua_fun_cclua_filesystem_createDirectory(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 1) { // if ((olua_is_string(L, 1))) { - // static bool createDirectory(const std::string &path, @optional bool isFilePath) - return _cclua_filesystem_createDirectory$2(L); + // static bool createDirectory(const std::string &path) + return _olua_fun_cclua_filesystem_createDirectory$2(L); // } } if (num_args == 2) { // if ((olua_is_string(L, 1)) && (olua_is_bool(L, 2))) { // static bool createDirectory(const std::string &path, @optional bool isFilePath) - return _cclua_filesystem_createDirectory$1(L); + return _olua_fun_cclua_filesystem_createDirectory$1(L); // } } @@ -2203,7 +2288,7 @@ static int _cclua_filesystem_createDirectory(lua_State *L) return 0; } -static int _cclua_filesystem_exist(lua_State *L) +static int _olua_fun_cclua_filesystem_exist(lua_State *L) { olua_startinvoke(L); @@ -2220,7 +2305,7 @@ static int _cclua_filesystem_exist(lua_State *L) return num_ret; } -static int _cclua_filesystem_fullPath(lua_State *L) +static int _olua_fun_cclua_filesystem_fullPath(lua_State *L) { olua_startinvoke(L); @@ -2237,7 +2322,7 @@ static int _cclua_filesystem_fullPath(lua_State *L) return num_ret; } -static int _cclua_filesystem_getBuiltinCacheDirectory(lua_State *L) +static int _olua_fun_cclua_filesystem_getBuiltinCacheDirectory(lua_State *L) { olua_startinvoke(L); @@ -2250,7 +2335,7 @@ static int _cclua_filesystem_getBuiltinCacheDirectory(lua_State *L) return num_ret; } -static int _cclua_filesystem_getCacheDirectory(lua_State *L) +static int _olua_fun_cclua_filesystem_getCacheDirectory(lua_State *L) { olua_startinvoke(L); @@ -2263,7 +2348,7 @@ static int _cclua_filesystem_getCacheDirectory(lua_State *L) return num_ret; } -static int _cclua_filesystem_getDocumentDirectory(lua_State *L) +static int _olua_fun_cclua_filesystem_getDocumentDirectory(lua_State *L) { olua_startinvoke(L); @@ -2276,7 +2361,7 @@ static int _cclua_filesystem_getDocumentDirectory(lua_State *L) return num_ret; } -static int _cclua_filesystem_getSDCardDirectory(lua_State *L) +static int _olua_fun_cclua_filesystem_getSDCardDirectory(lua_State *L) { olua_startinvoke(L); @@ -2289,7 +2374,7 @@ static int _cclua_filesystem_getSDCardDirectory(lua_State *L) return num_ret; } -static int _cclua_filesystem_getTmpDirectory(lua_State *L) +static int _olua_fun_cclua_filesystem_getTmpDirectory(lua_State *L) { olua_startinvoke(L); @@ -2302,7 +2387,7 @@ static int _cclua_filesystem_getTmpDirectory(lua_State *L) return num_ret; } -static int _cclua_filesystem_getWritablePath(lua_State *L) +static int _olua_fun_cclua_filesystem_getWritablePath(lua_State *L) { olua_startinvoke(L); @@ -2315,7 +2400,7 @@ static int _cclua_filesystem_getWritablePath(lua_State *L) return num_ret; } -static int _cclua_filesystem_isAbsolutePath(lua_State *L) +static int _olua_fun_cclua_filesystem_isAbsolutePath(lua_State *L) { olua_startinvoke(L); @@ -2332,7 +2417,7 @@ static int _cclua_filesystem_isAbsolutePath(lua_State *L) return num_ret; } -static int _cclua_filesystem_isDirectory(lua_State *L) +static int _olua_fun_cclua_filesystem_isDirectory(lua_State *L) { olua_startinvoke(L); @@ -2349,7 +2434,7 @@ static int _cclua_filesystem_isDirectory(lua_State *L) return num_ret; } -static int _cclua_filesystem_isFile(lua_State *L) +static int _olua_fun_cclua_filesystem_isFile(lua_State *L) { olua_startinvoke(L); @@ -2366,7 +2451,7 @@ static int _cclua_filesystem_isFile(lua_State *L) return num_ret; } -static int _cclua_filesystem_read(lua_State *L) +static int _olua_fun_cclua_filesystem_read(lua_State *L) { olua_startinvoke(L); @@ -2383,7 +2468,7 @@ static int _cclua_filesystem_read(lua_State *L) return num_ret; } -static int _cclua_filesystem_remove(lua_State *L) +static int _olua_fun_cclua_filesystem_remove(lua_State *L) { olua_startinvoke(L); @@ -2400,7 +2485,7 @@ static int _cclua_filesystem_remove(lua_State *L) return num_ret; } -static int _cclua_filesystem_rename(lua_State *L) +static int _olua_fun_cclua_filesystem_rename(lua_State *L) { olua_startinvoke(L); @@ -2419,7 +2504,7 @@ static int _cclua_filesystem_rename(lua_State *L) return num_ret; } -static int _cclua_filesystem_trimPath$1(lua_State *L) +static int _olua_fun_cclua_filesystem_trimPath$1(lua_State *L) { olua_startinvoke(L); @@ -2438,7 +2523,7 @@ static int _cclua_filesystem_trimPath$1(lua_State *L) return num_ret; } -static int _cclua_filesystem_trimPath$2(lua_State *L) +static int _olua_fun_cclua_filesystem_trimPath$2(lua_State *L) { olua_startinvoke(L); @@ -2446,7 +2531,7 @@ static int _cclua_filesystem_trimPath$2(lua_State *L) olua_check_string(L, 1, &arg1); - // static std::string trimPath(const std::string &path, @optional size_t limit) + // static std::string trimPath(const std::string &path) std::string ret = cclua::filesystem::trimPath(arg1); int num_ret = olua_push_string(L, ret); @@ -2455,21 +2540,21 @@ static int _cclua_filesystem_trimPath$2(lua_State *L) return num_ret; } -static int _cclua_filesystem_trimPath(lua_State *L) +static int _olua_fun_cclua_filesystem_trimPath(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 1) { // if ((olua_is_string(L, 1))) { - // static std::string trimPath(const std::string &path, @optional size_t limit) - return _cclua_filesystem_trimPath$2(L); + // static std::string trimPath(const std::string &path) + return _olua_fun_cclua_filesystem_trimPath$2(L); // } } if (num_args == 2) { // if ((olua_is_string(L, 1)) && (olua_is_integer(L, 2))) { // static std::string trimPath(const std::string &path, @optional size_t limit) - return _cclua_filesystem_trimPath$1(L); + return _olua_fun_cclua_filesystem_trimPath$1(L); // } } @@ -2478,7 +2563,7 @@ static int _cclua_filesystem_trimPath(lua_State *L) return 0; } -static int _cclua_filesystem_unzip(lua_State *L) +static int _olua_fun_cclua_filesystem_unzip(lua_State *L) { olua_startinvoke(L); @@ -2497,7 +2582,7 @@ static int _cclua_filesystem_unzip(lua_State *L) return num_ret; } -static int _cclua_filesystem_write$1(lua_State *L) +static int _olua_fun_cclua_filesystem_write$1(lua_State *L) { olua_startinvoke(L); @@ -2518,7 +2603,7 @@ static int _cclua_filesystem_write$1(lua_State *L) return num_ret; } -static int _cclua_filesystem_write$2(lua_State *L) +static int _olua_fun_cclua_filesystem_write$2(lua_State *L) { olua_startinvoke(L); @@ -2537,21 +2622,21 @@ static int _cclua_filesystem_write$2(lua_State *L) return num_ret; } -static int _cclua_filesystem_write(lua_State *L) +static int _olua_fun_cclua_filesystem_write(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 2) { // if ((olua_is_string(L, 1)) && (olua_is_cocos2d_Data(L, 2))) { // static bool write(const std::string &path, const cocos2d::Data &data) - return _cclua_filesystem_write$2(L); + return _olua_fun_cclua_filesystem_write$2(L); // } } if (num_args == 3) { // if ((olua_is_string(L, 1)) && (olua_is_string(L, 2)) && (olua_is_integer(L, 3))) { // static bool write(const std::string &path, const char *data, size_t len) - return _cclua_filesystem_write$1(L); + return _olua_fun_cclua_filesystem_write$1(L); // } } @@ -2560,44 +2645,53 @@ static int _cclua_filesystem_write(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cclua_filesystem(lua_State *L) +static int _olua_cls_cclua_filesystem(lua_State *L) { oluacls_class(L, "cclua.filesystem"); - oluacls_func(L, "__gc", _cclua_filesystem___gc); - oluacls_func(L, "__olua_move", _cclua_filesystem___olua_move); - oluacls_func(L, "addSearchPath", _cclua_filesystem_addSearchPath); - oluacls_func(L, "copy", _cclua_filesystem_copy); - oluacls_func(L, "createDirectory", _cclua_filesystem_createDirectory); - oluacls_func(L, "exist", _cclua_filesystem_exist); - oluacls_func(L, "fullPath", _cclua_filesystem_fullPath); - oluacls_func(L, "getBuiltinCacheDirectory", _cclua_filesystem_getBuiltinCacheDirectory); - oluacls_func(L, "getCacheDirectory", _cclua_filesystem_getCacheDirectory); - oluacls_func(L, "getDocumentDirectory", _cclua_filesystem_getDocumentDirectory); - oluacls_func(L, "getSDCardDirectory", _cclua_filesystem_getSDCardDirectory); - oluacls_func(L, "getTmpDirectory", _cclua_filesystem_getTmpDirectory); - oluacls_func(L, "getWritablePath", _cclua_filesystem_getWritablePath); - oluacls_func(L, "isAbsolutePath", _cclua_filesystem_isAbsolutePath); - oluacls_func(L, "isDirectory", _cclua_filesystem_isDirectory); - oluacls_func(L, "isFile", _cclua_filesystem_isFile); - oluacls_func(L, "read", _cclua_filesystem_read); - oluacls_func(L, "remove", _cclua_filesystem_remove); - oluacls_func(L, "rename", _cclua_filesystem_rename); - oluacls_func(L, "trimPath", _cclua_filesystem_trimPath); - oluacls_func(L, "unzip", _cclua_filesystem_unzip); - oluacls_func(L, "write", _cclua_filesystem_write); - oluacls_prop(L, "builtinCacheDirectory", _cclua_filesystem_getBuiltinCacheDirectory, nullptr); - oluacls_prop(L, "cacheDirectory", _cclua_filesystem_getCacheDirectory, nullptr); - oluacls_prop(L, "documentDirectory", _cclua_filesystem_getDocumentDirectory, nullptr); - oluacls_prop(L, "sdCardDirectory", _cclua_filesystem_getSDCardDirectory, nullptr); - oluacls_prop(L, "tmpDirectory", _cclua_filesystem_getTmpDirectory, nullptr); - oluacls_prop(L, "writablePath", _cclua_filesystem_getWritablePath, nullptr); + oluacls_func(L, "__gc", _olua_fun_cclua_filesystem___gc); + oluacls_func(L, "__olua_move", _olua_fun_cclua_filesystem___olua_move); + oluacls_func(L, "addSearchPath", _olua_fun_cclua_filesystem_addSearchPath); + oluacls_func(L, "copy", _olua_fun_cclua_filesystem_copy); + oluacls_func(L, "createDirectory", _olua_fun_cclua_filesystem_createDirectory); + oluacls_func(L, "exist", _olua_fun_cclua_filesystem_exist); + oluacls_func(L, "fullPath", _olua_fun_cclua_filesystem_fullPath); + oluacls_func(L, "getBuiltinCacheDirectory", _olua_fun_cclua_filesystem_getBuiltinCacheDirectory); + oluacls_func(L, "getCacheDirectory", _olua_fun_cclua_filesystem_getCacheDirectory); + oluacls_func(L, "getDocumentDirectory", _olua_fun_cclua_filesystem_getDocumentDirectory); + oluacls_func(L, "getSDCardDirectory", _olua_fun_cclua_filesystem_getSDCardDirectory); + oluacls_func(L, "getTmpDirectory", _olua_fun_cclua_filesystem_getTmpDirectory); + oluacls_func(L, "getWritablePath", _olua_fun_cclua_filesystem_getWritablePath); + oluacls_func(L, "isAbsolutePath", _olua_fun_cclua_filesystem_isAbsolutePath); + oluacls_func(L, "isDirectory", _olua_fun_cclua_filesystem_isDirectory); + oluacls_func(L, "isFile", _olua_fun_cclua_filesystem_isFile); + oluacls_func(L, "read", _olua_fun_cclua_filesystem_read); + oluacls_func(L, "remove", _olua_fun_cclua_filesystem_remove); + oluacls_func(L, "rename", _olua_fun_cclua_filesystem_rename); + oluacls_func(L, "trimPath", _olua_fun_cclua_filesystem_trimPath); + oluacls_func(L, "unzip", _olua_fun_cclua_filesystem_unzip); + oluacls_func(L, "write", _olua_fun_cclua_filesystem_write); + oluacls_prop(L, "builtinCacheDirectory", _olua_fun_cclua_filesystem_getBuiltinCacheDirectory, nullptr); + oluacls_prop(L, "cacheDirectory", _olua_fun_cclua_filesystem_getCacheDirectory, nullptr); + oluacls_prop(L, "documentDirectory", _olua_fun_cclua_filesystem_getDocumentDirectory, nullptr); + oluacls_prop(L, "sdCardDirectory", _olua_fun_cclua_filesystem_getSDCardDirectory, nullptr); + oluacls_prop(L, "tmpDirectory", _olua_fun_cclua_filesystem_getTmpDirectory, nullptr); + oluacls_prop(L, "writablePath", _olua_fun_cclua_filesystem_getWritablePath, nullptr); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cclua_filesystem(lua_State *L) +{ + olua_require(L, "cclua", luaopen_cclua); + if (!olua_getclass(L, "cclua.filesystem")) { + luaL_error(L, "class not found: cclua::filesystem"); + } return 1; } OLUA_END_DECLS -static int _cclua_preferences___gc(lua_State *L) +static int _olua_fun_cclua_preferences___gc(lua_State *L) { olua_startinvoke(L); @@ -2609,7 +2703,7 @@ static int _cclua_preferences___gc(lua_State *L) return 0; } -static int _cclua_preferences___olua_move(lua_State *L) +static int _olua_fun_cclua_preferences___olua_move(lua_State *L) { olua_startinvoke(L); @@ -2621,7 +2715,7 @@ static int _cclua_preferences___olua_move(lua_State *L) return 1; } -static int _cclua_preferences_deleteKey(lua_State *L) +static int _olua_fun_cclua_preferences_deleteKey(lua_State *L) { olua_startinvoke(L); @@ -2637,7 +2731,7 @@ static int _cclua_preferences_deleteKey(lua_State *L) return 0; } -static int _cclua_preferences_flush(lua_State *L) +static int _olua_fun_cclua_preferences_flush(lua_State *L) { olua_startinvoke(L); @@ -2649,7 +2743,7 @@ static int _cclua_preferences_flush(lua_State *L) return 0; } -static int _cclua_preferences_getBoolean$1(lua_State *L) +static int _olua_fun_cclua_preferences_getBoolean$1(lua_State *L) { olua_startinvoke(L); @@ -2668,7 +2762,7 @@ static int _cclua_preferences_getBoolean$1(lua_State *L) return num_ret; } -static int _cclua_preferences_getBoolean$2(lua_State *L) +static int _olua_fun_cclua_preferences_getBoolean$2(lua_State *L) { olua_startinvoke(L); @@ -2676,7 +2770,7 @@ static int _cclua_preferences_getBoolean$2(lua_State *L) olua_check_string(L, 1, &arg1); - // static bool getBoolean(const std::string &key, @optional bool defaultValue) + // static bool getBoolean(const std::string &key) bool ret = cclua::preferences::getBoolean(arg1); int num_ret = olua_push_bool(L, ret); @@ -2685,21 +2779,21 @@ static int _cclua_preferences_getBoolean$2(lua_State *L) return num_ret; } -static int _cclua_preferences_getBoolean(lua_State *L) +static int _olua_fun_cclua_preferences_getBoolean(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 1) { // if ((olua_is_string(L, 1))) { - // static bool getBoolean(const std::string &key, @optional bool defaultValue) - return _cclua_preferences_getBoolean$2(L); + // static bool getBoolean(const std::string &key) + return _olua_fun_cclua_preferences_getBoolean$2(L); // } } if (num_args == 2) { // if ((olua_is_string(L, 1)) && (olua_is_bool(L, 2))) { // static bool getBoolean(const std::string &key, @optional bool defaultValue) - return _cclua_preferences_getBoolean$1(L); + return _olua_fun_cclua_preferences_getBoolean$1(L); // } } @@ -2708,7 +2802,7 @@ static int _cclua_preferences_getBoolean(lua_State *L) return 0; } -static int _cclua_preferences_getDouble$1(lua_State *L) +static int _olua_fun_cclua_preferences_getDouble$1(lua_State *L) { olua_startinvoke(L); @@ -2727,7 +2821,7 @@ static int _cclua_preferences_getDouble$1(lua_State *L) return num_ret; } -static int _cclua_preferences_getDouble$2(lua_State *L) +static int _olua_fun_cclua_preferences_getDouble$2(lua_State *L) { olua_startinvoke(L); @@ -2735,7 +2829,7 @@ static int _cclua_preferences_getDouble$2(lua_State *L) olua_check_string(L, 1, &arg1); - // static double getDouble(const std::string &key, @optional double defaultValue) + // static double getDouble(const std::string &key) double ret = cclua::preferences::getDouble(arg1); int num_ret = olua_push_number(L, ret); @@ -2744,21 +2838,21 @@ static int _cclua_preferences_getDouble$2(lua_State *L) return num_ret; } -static int _cclua_preferences_getDouble(lua_State *L) +static int _olua_fun_cclua_preferences_getDouble(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 1) { // if ((olua_is_string(L, 1))) { - // static double getDouble(const std::string &key, @optional double defaultValue) - return _cclua_preferences_getDouble$2(L); + // static double getDouble(const std::string &key) + return _olua_fun_cclua_preferences_getDouble$2(L); // } } if (num_args == 2) { // if ((olua_is_string(L, 1)) && (olua_is_number(L, 2))) { // static double getDouble(const std::string &key, @optional double defaultValue) - return _cclua_preferences_getDouble$1(L); + return _olua_fun_cclua_preferences_getDouble$1(L); // } } @@ -2767,7 +2861,7 @@ static int _cclua_preferences_getDouble(lua_State *L) return 0; } -static int _cclua_preferences_getFloat$1(lua_State *L) +static int _olua_fun_cclua_preferences_getFloat$1(lua_State *L) { olua_startinvoke(L); @@ -2786,7 +2880,7 @@ static int _cclua_preferences_getFloat$1(lua_State *L) return num_ret; } -static int _cclua_preferences_getFloat$2(lua_State *L) +static int _olua_fun_cclua_preferences_getFloat$2(lua_State *L) { olua_startinvoke(L); @@ -2794,7 +2888,7 @@ static int _cclua_preferences_getFloat$2(lua_State *L) olua_check_string(L, 1, &arg1); - // static float getFloat(const std::string &key, @optional float defaultValue) + // static float getFloat(const std::string &key) float ret = cclua::preferences::getFloat(arg1); int num_ret = olua_push_number(L, ret); @@ -2803,21 +2897,21 @@ static int _cclua_preferences_getFloat$2(lua_State *L) return num_ret; } -static int _cclua_preferences_getFloat(lua_State *L) +static int _olua_fun_cclua_preferences_getFloat(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 1) { // if ((olua_is_string(L, 1))) { - // static float getFloat(const std::string &key, @optional float defaultValue) - return _cclua_preferences_getFloat$2(L); + // static float getFloat(const std::string &key) + return _olua_fun_cclua_preferences_getFloat$2(L); // } } if (num_args == 2) { // if ((olua_is_string(L, 1)) && (olua_is_number(L, 2))) { // static float getFloat(const std::string &key, @optional float defaultValue) - return _cclua_preferences_getFloat$1(L); + return _olua_fun_cclua_preferences_getFloat$1(L); // } } @@ -2826,7 +2920,7 @@ static int _cclua_preferences_getFloat(lua_State *L) return 0; } -static int _cclua_preferences_getInteger$1(lua_State *L) +static int _olua_fun_cclua_preferences_getInteger$1(lua_State *L) { olua_startinvoke(L); @@ -2845,7 +2939,7 @@ static int _cclua_preferences_getInteger$1(lua_State *L) return num_ret; } -static int _cclua_preferences_getInteger$2(lua_State *L) +static int _olua_fun_cclua_preferences_getInteger$2(lua_State *L) { olua_startinvoke(L); @@ -2853,7 +2947,7 @@ static int _cclua_preferences_getInteger$2(lua_State *L) olua_check_string(L, 1, &arg1); - // static int getInteger(const std::string &key, @optional int defaultValue) + // static int getInteger(const std::string &key) int ret = cclua::preferences::getInteger(arg1); int num_ret = olua_push_integer(L, ret); @@ -2862,21 +2956,21 @@ static int _cclua_preferences_getInteger$2(lua_State *L) return num_ret; } -static int _cclua_preferences_getInteger(lua_State *L) +static int _olua_fun_cclua_preferences_getInteger(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 1) { // if ((olua_is_string(L, 1))) { - // static int getInteger(const std::string &key, @optional int defaultValue) - return _cclua_preferences_getInteger$2(L); + // static int getInteger(const std::string &key) + return _olua_fun_cclua_preferences_getInteger$2(L); // } } if (num_args == 2) { // if ((olua_is_string(L, 1)) && (olua_is_integer(L, 2))) { // static int getInteger(const std::string &key, @optional int defaultValue) - return _cclua_preferences_getInteger$1(L); + return _olua_fun_cclua_preferences_getInteger$1(L); // } } @@ -2885,7 +2979,7 @@ static int _cclua_preferences_getInteger(lua_State *L) return 0; } -static int _cclua_preferences_getString$1(lua_State *L) +static int _olua_fun_cclua_preferences_getString$1(lua_State *L) { olua_startinvoke(L); @@ -2904,7 +2998,7 @@ static int _cclua_preferences_getString$1(lua_State *L) return num_ret; } -static int _cclua_preferences_getString$2(lua_State *L) +static int _olua_fun_cclua_preferences_getString$2(lua_State *L) { olua_startinvoke(L); @@ -2912,7 +3006,7 @@ static int _cclua_preferences_getString$2(lua_State *L) olua_check_string(L, 1, &arg1); - // static std::string getString(const std::string &key, @optional const std::string &defaultValue) + // static std::string getString(const std::string &key) std::string ret = cclua::preferences::getString(arg1); int num_ret = olua_push_string(L, ret); @@ -2921,21 +3015,21 @@ static int _cclua_preferences_getString$2(lua_State *L) return num_ret; } -static int _cclua_preferences_getString(lua_State *L) +static int _olua_fun_cclua_preferences_getString(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 1) { // if ((olua_is_string(L, 1))) { - // static std::string getString(const std::string &key, @optional const std::string &defaultValue) - return _cclua_preferences_getString$2(L); + // static std::string getString(const std::string &key) + return _olua_fun_cclua_preferences_getString$2(L); // } } if (num_args == 2) { // if ((olua_is_string(L, 1)) && (olua_is_string(L, 2))) { // static std::string getString(const std::string &key, @optional const std::string &defaultValue) - return _cclua_preferences_getString$1(L); + return _olua_fun_cclua_preferences_getString$1(L); // } } @@ -2944,7 +3038,7 @@ static int _cclua_preferences_getString(lua_State *L) return 0; } -static int _cclua_preferences_setBoolean(lua_State *L) +static int _olua_fun_cclua_preferences_setBoolean(lua_State *L) { olua_startinvoke(L); @@ -2962,7 +3056,7 @@ static int _cclua_preferences_setBoolean(lua_State *L) return 0; } -static int _cclua_preferences_setDouble(lua_State *L) +static int _olua_fun_cclua_preferences_setDouble(lua_State *L) { olua_startinvoke(L); @@ -2980,7 +3074,7 @@ static int _cclua_preferences_setDouble(lua_State *L) return 0; } -static int _cclua_preferences_setFloat(lua_State *L) +static int _olua_fun_cclua_preferences_setFloat(lua_State *L) { olua_startinvoke(L); @@ -2998,7 +3092,7 @@ static int _cclua_preferences_setFloat(lua_State *L) return 0; } -static int _cclua_preferences_setInteger(lua_State *L) +static int _olua_fun_cclua_preferences_setInteger(lua_State *L) { olua_startinvoke(L); @@ -3016,7 +3110,7 @@ static int _cclua_preferences_setInteger(lua_State *L) return 0; } -static int _cclua_preferences_setString(lua_State *L) +static int _olua_fun_cclua_preferences_setString(lua_State *L) { olua_startinvoke(L); @@ -3034,30 +3128,39 @@ static int _cclua_preferences_setString(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cclua_preferences(lua_State *L) +static int _olua_cls_cclua_preferences(lua_State *L) { oluacls_class(L, "cclua.preferences"); - oluacls_func(L, "__gc", _cclua_preferences___gc); - oluacls_func(L, "__olua_move", _cclua_preferences___olua_move); - oluacls_func(L, "deleteKey", _cclua_preferences_deleteKey); - oluacls_func(L, "flush", _cclua_preferences_flush); - oluacls_func(L, "getBoolean", _cclua_preferences_getBoolean); - oluacls_func(L, "getDouble", _cclua_preferences_getDouble); - oluacls_func(L, "getFloat", _cclua_preferences_getFloat); - oluacls_func(L, "getInteger", _cclua_preferences_getInteger); - oluacls_func(L, "getString", _cclua_preferences_getString); - oluacls_func(L, "setBoolean", _cclua_preferences_setBoolean); - oluacls_func(L, "setDouble", _cclua_preferences_setDouble); - oluacls_func(L, "setFloat", _cclua_preferences_setFloat); - oluacls_func(L, "setInteger", _cclua_preferences_setInteger); - oluacls_func(L, "setString", _cclua_preferences_setString); + oluacls_func(L, "__gc", _olua_fun_cclua_preferences___gc); + oluacls_func(L, "__olua_move", _olua_fun_cclua_preferences___olua_move); + oluacls_func(L, "deleteKey", _olua_fun_cclua_preferences_deleteKey); + oluacls_func(L, "flush", _olua_fun_cclua_preferences_flush); + oluacls_func(L, "getBoolean", _olua_fun_cclua_preferences_getBoolean); + oluacls_func(L, "getDouble", _olua_fun_cclua_preferences_getDouble); + oluacls_func(L, "getFloat", _olua_fun_cclua_preferences_getFloat); + oluacls_func(L, "getInteger", _olua_fun_cclua_preferences_getInteger); + oluacls_func(L, "getString", _olua_fun_cclua_preferences_getString); + oluacls_func(L, "setBoolean", _olua_fun_cclua_preferences_setBoolean); + oluacls_func(L, "setDouble", _olua_fun_cclua_preferences_setDouble); + oluacls_func(L, "setFloat", _olua_fun_cclua_preferences_setFloat); + oluacls_func(L, "setInteger", _olua_fun_cclua_preferences_setInteger); + oluacls_func(L, "setString", _olua_fun_cclua_preferences_setString); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cclua_preferences(lua_State *L) +{ + olua_require(L, "cclua", luaopen_cclua); + if (!olua_getclass(L, "cclua.preferences")) { + luaL_error(L, "class not found: cclua::preferences"); + } + return 1; +} OLUA_END_DECLS -static int _cclua_timer___gc(lua_State *L) +static int _olua_fun_cclua_timer___gc(lua_State *L) { olua_startinvoke(L); @@ -3069,7 +3172,7 @@ static int _cclua_timer___gc(lua_State *L) return 0; } -static int _cclua_timer___olua_move(lua_State *L) +static int _olua_fun_cclua_timer___olua_move(lua_State *L) { olua_startinvoke(L); @@ -3081,7 +3184,7 @@ static int _cclua_timer___olua_move(lua_State *L) return 1; } -static int _cclua_timer_createTag(lua_State *L) +static int _olua_fun_cclua_timer_createTag(lua_State *L) { olua_startinvoke(L); @@ -3094,7 +3197,7 @@ static int _cclua_timer_createTag(lua_State *L) return num_ret; } -static int _cclua_timer_delay(lua_State *L) +static int _olua_fun_cclua_timer_delay(lua_State *L) { olua_startinvoke(L); @@ -3106,9 +3209,10 @@ static int _cclua_timer_delay(lua_State *L) void *cb_store = (void *)olua_pushclassobj(L, "cclua.timer"); std::string cb_tag = "delay"; - std::string cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_NEW); + std::string cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_NEW); olua_Context cb_ctx = olua_context(L); - arg2 = [cb_store, cb_name, cb_ctx]() { + // lua_State *ML = olua_mainthread(L); + arg2 = [cb_store, cb_name, cb_ctx /*, ML */]() { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); @@ -3123,7 +3227,7 @@ static int _cclua_timer_delay(lua_State *L) } }; - // static void delay(float time, @localvar const std::function callback) + // static void delay(float time, const std::function callback) cclua::timer::delay(arg1, arg2); olua_endinvoke(L); @@ -3131,7 +3235,7 @@ static int _cclua_timer_delay(lua_State *L) return 0; } -static int _cclua_timer_delayWithTag(lua_State *L) +static int _olua_fun_cclua_timer_delayWithTag(lua_State *L) { olua_startinvoke(L); @@ -3145,9 +3249,10 @@ static int _cclua_timer_delayWithTag(lua_State *L) void *cb_store = (void *)olua_pushclassobj(L, "cclua.timer"); std::string cb_tag = (arg2); - std::string cb_name = olua_setcallback(L, cb_store, 3, cb_tag.c_str(), OLUA_TAG_REPLACE); + std::string cb_name = olua_setcallback(L, cb_store, 3, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg3 = [cb_store, cb_name, cb_ctx]() { + // lua_State *ML = olua_mainthread(L); + arg3 = [cb_store, cb_name, cb_ctx /*, ML */]() { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); @@ -3162,7 +3267,7 @@ static int _cclua_timer_delayWithTag(lua_State *L) } }; - // static void delayWithTag(float time, const std::string &tag, @localvar std::function callback) + // static void delayWithTag(float time, const std::string &tag, std::function callback) cclua::timer::delayWithTag(arg1, arg2, arg3); olua_endinvoke(L); @@ -3170,7 +3275,7 @@ static int _cclua_timer_delayWithTag(lua_State *L) return 0; } -static int _cclua_timer_killDelay(lua_State *L) +static int _olua_fun_cclua_timer_killDelay(lua_State *L) { olua_startinvoke(L); @@ -3190,7 +3295,7 @@ static int _cclua_timer_killDelay(lua_State *L) return 0; } -static int _cclua_timer_schedule(lua_State *L) +static int _olua_fun_cclua_timer_schedule(lua_State *L) { olua_startinvoke(L); @@ -3204,15 +3309,16 @@ static int _cclua_timer_schedule(lua_State *L) void *cb_store = (void *)olua_pushclassobj(L, "cclua.timer"); std::string cb_tag = (arg2); - std::string cb_name = olua_setcallback(L, cb_store, 3, cb_tag.c_str(), OLUA_TAG_REPLACE); + std::string cb_name = olua_setcallback(L, cb_store, 3, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg3 = [cb_store, cb_name, cb_ctx](float arg1) { + // lua_State *ML = olua_mainthread(L); + arg3 = [cb_store, cb_name, cb_ctx /*, ML */](float cb_arg1) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); if (olua_contextequal(L, cb_ctx)) { int top = lua_gettop(L); - olua_push_number(L, arg1); + olua_push_number(L, cb_arg1); olua_callback(L, cb_store, cb_name.c_str(), 1); @@ -3220,7 +3326,7 @@ static int _cclua_timer_schedule(lua_State *L) } }; - // static void schedule(float interval, const std::string &tag, @localvar const std::function callback) + // static void schedule(float interval, const std::string &tag, const std::function callback) cclua::timer::schedule(arg1, arg2, arg3); olua_endinvoke(L); @@ -3228,7 +3334,7 @@ static int _cclua_timer_schedule(lua_State *L) return 0; } -static int _cclua_timer_unschedule(lua_State *L) +static int _olua_fun_cclua_timer_unschedule(lua_State *L) { olua_startinvoke(L); @@ -3248,24 +3354,33 @@ static int _cclua_timer_unschedule(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cclua_timer(lua_State *L) +static int _olua_cls_cclua_timer(lua_State *L) { oluacls_class(L, "cclua.timer"); - oluacls_func(L, "__gc", _cclua_timer___gc); - oluacls_func(L, "__olua_move", _cclua_timer___olua_move); - oluacls_func(L, "createTag", _cclua_timer_createTag); - oluacls_func(L, "delay", _cclua_timer_delay); - oluacls_func(L, "delayWithTag", _cclua_timer_delayWithTag); - oluacls_func(L, "killDelay", _cclua_timer_killDelay); - oluacls_func(L, "schedule", _cclua_timer_schedule); - oluacls_func(L, "unschedule", _cclua_timer_unschedule); + oluacls_func(L, "__gc", _olua_fun_cclua_timer___gc); + oluacls_func(L, "__olua_move", _olua_fun_cclua_timer___olua_move); + oluacls_func(L, "createTag", _olua_fun_cclua_timer_createTag); + oluacls_func(L, "delay", _olua_fun_cclua_timer_delay); + oluacls_func(L, "delayWithTag", _olua_fun_cclua_timer_delayWithTag); + oluacls_func(L, "killDelay", _olua_fun_cclua_timer_killDelay); + oluacls_func(L, "schedule", _olua_fun_cclua_timer_schedule); + oluacls_func(L, "unschedule", _olua_fun_cclua_timer_unschedule); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cclua_timer(lua_State *L) +{ + olua_require(L, "cclua", luaopen_cclua); + if (!olua_getclass(L, "cclua.timer")) { + luaL_error(L, "class not found: cclua::timer"); + } return 1; } OLUA_END_DECLS -static int _cclua_window___gc(lua_State *L) +static int _olua_fun_cclua_window___gc(lua_State *L) { olua_startinvoke(L); @@ -3277,7 +3392,7 @@ static int _cclua_window___gc(lua_State *L) return 0; } -static int _cclua_window___olua_move(lua_State *L) +static int _olua_fun_cclua_window___olua_move(lua_State *L) { olua_startinvoke(L); @@ -3289,24 +3404,24 @@ static int _cclua_window___olua_move(lua_State *L) return 1; } -static int _cclua_window_convertToCameraSpace$1(lua_State *L) +static int _olua_fun_cclua_window_convertToCameraSpace$1(lua_State *L) { olua_startinvoke(L); - cocos2d::Vec2 arg1; /** position */ + cocos2d::Vec2 *arg1; /** position */ olua_check_object(L, 1, &arg1, "cc.Vec2"); // static cocos2d::Vec2 convertToCameraSpace(const cocos2d::Vec2 &position) - cocos2d::Vec2 ret = cclua::window::convertToCameraSpace(arg1); - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec2"); + cocos2d::Vec2 ret = cclua::window::convertToCameraSpace(*arg1); + int num_ret = olua_copy_object(L, ret, "cc.Vec2"); olua_endinvoke(L); return num_ret; } -static int _cclua_window_convertToCameraSpace$2(lua_State *L) +static int _olua_fun_cclua_window_convertToCameraSpace$2(lua_State *L) { olua_startinvoke(L); @@ -3314,7 +3429,7 @@ static int _cclua_window_convertToCameraSpace$2(lua_State *L) olua_pack_object(L, 1, &arg1); - // static cocos2d::Vec2 convertToCameraSpace(@pack const cocos2d::Vec2 &position) + // @unpack static cocos2d::Vec2 convertToCameraSpace(@pack const cocos2d::Vec2 &position) cocos2d::Vec2 ret = cclua::window::convertToCameraSpace(arg1); int num_ret = olua_unpack_object(L, &ret); @@ -3323,21 +3438,21 @@ static int _cclua_window_convertToCameraSpace$2(lua_State *L) return num_ret; } -static int _cclua_window_convertToCameraSpace(lua_State *L) +static int _olua_fun_cclua_window_convertToCameraSpace(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 1) { // if ((olua_is_object(L, 1, "cc.Vec2"))) { // static cocos2d::Vec2 convertToCameraSpace(const cocos2d::Vec2 &position) - return _cclua_window_convertToCameraSpace$1(L); + return _olua_fun_cclua_window_convertToCameraSpace$1(L); // } } if (num_args == 2) { // if ((olua_canpack_object(L, 1, (cocos2d::Vec2 *)nullptr))) { - // static cocos2d::Vec2 convertToCameraSpace(@pack const cocos2d::Vec2 &position) - return _cclua_window_convertToCameraSpace$2(L); + // @unpack static cocos2d::Vec2 convertToCameraSpace(@pack const cocos2d::Vec2 &position) + return _olua_fun_cclua_window_convertToCameraSpace$2(L); // } } @@ -3346,7 +3461,7 @@ static int _cclua_window_convertToCameraSpace(lua_State *L) return 0; } -static int _cclua_window_getDesignSize(lua_State *L) +static int _olua_fun_cclua_window_getDesignSize(lua_State *L) { olua_startinvoke(L); @@ -3359,7 +3474,7 @@ static int _cclua_window_getDesignSize(lua_State *L) return num_ret; } -static int _cclua_window_getFrameSize(lua_State *L) +static int _olua_fun_cclua_window_getFrameSize(lua_State *L) { olua_startinvoke(L); @@ -3372,7 +3487,7 @@ static int _cclua_window_getFrameSize(lua_State *L) return num_ret; } -static int _cclua_window_getVisibleBounds(lua_State *L) +static int _olua_fun_cclua_window_getVisibleBounds(lua_State *L) { olua_startinvoke(L); @@ -3385,7 +3500,7 @@ static int _cclua_window_getVisibleBounds(lua_State *L) return num_ret; } -static int _cclua_window_getVisibleSize(lua_State *L) +static int _olua_fun_cclua_window_getVisibleSize(lua_State *L) { olua_startinvoke(L); @@ -3398,25 +3513,25 @@ static int _cclua_window_getVisibleSize(lua_State *L) return num_ret; } -static int _cclua_window_setDesignSize$1(lua_State *L) +static int _olua_fun_cclua_window_setDesignSize$1(lua_State *L) { olua_startinvoke(L); - cocos2d::Size arg1; /** size */ + cocos2d::Size *arg1; /** size */ ResolutionPolicy arg2 = (ResolutionPolicy)0; /** resolutionPolicy */ olua_check_object(L, 1, &arg1, "cc.Size"); olua_check_enum(L, 2, &arg2); // static void setDesignSize(const cocos2d::Size &size, ResolutionPolicy resolutionPolicy) - cclua::window::setDesignSize(arg1, arg2); + cclua::window::setDesignSize(*arg1, arg2); olua_endinvoke(L); return 0; } -static int _cclua_window_setDesignSize$2(lua_State *L) +static int _olua_fun_cclua_window_setDesignSize$2(lua_State *L) { olua_startinvoke(L); @@ -3434,21 +3549,21 @@ static int _cclua_window_setDesignSize$2(lua_State *L) return 0; } -static int _cclua_window_setDesignSize(lua_State *L) +static int _olua_fun_cclua_window_setDesignSize(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 2) { // if ((olua_is_object(L, 1, "cc.Size")) && (olua_is_enum(L, 2))) { // static void setDesignSize(const cocos2d::Size &size, ResolutionPolicy resolutionPolicy) - return _cclua_window_setDesignSize$1(L); + return _olua_fun_cclua_window_setDesignSize$1(L); // } } if (num_args == 3) { // if ((olua_canpack_object(L, 1, (cocos2d::Size *)nullptr)) && (olua_is_enum(L, 3))) { // static void setDesignSize(@pack const cocos2d::Size &size, ResolutionPolicy resolutionPolicy) - return _cclua_window_setDesignSize$2(L); + return _olua_fun_cclua_window_setDesignSize$2(L); // } } @@ -3457,23 +3572,23 @@ static int _cclua_window_setDesignSize(lua_State *L) return 0; } -static int _cclua_window_setFrameSize$1(lua_State *L) +static int _olua_fun_cclua_window_setFrameSize$1(lua_State *L) { olua_startinvoke(L); - cocos2d::Size arg1; /** size */ + cocos2d::Size *arg1; /** size */ olua_check_object(L, 1, &arg1, "cc.Size"); // static void setFrameSize(const cocos2d::Size &size) - cclua::window::setFrameSize(arg1); + cclua::window::setFrameSize(*arg1); olua_endinvoke(L); return 0; } -static int _cclua_window_setFrameSize$2(lua_State *L) +static int _olua_fun_cclua_window_setFrameSize$2(lua_State *L) { olua_startinvoke(L); @@ -3489,21 +3604,21 @@ static int _cclua_window_setFrameSize$2(lua_State *L) return 0; } -static int _cclua_window_setFrameSize(lua_State *L) +static int _olua_fun_cclua_window_setFrameSize(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 1) { // if ((olua_is_object(L, 1, "cc.Size"))) { // static void setFrameSize(const cocos2d::Size &size) - return _cclua_window_setFrameSize$1(L); + return _olua_fun_cclua_window_setFrameSize$1(L); // } } if (num_args == 2) { // if ((olua_canpack_object(L, 1, (cocos2d::Size *)nullptr))) { // static void setFrameSize(@pack const cocos2d::Size &size) - return _cclua_window_setFrameSize$2(L); + return _olua_fun_cclua_window_setFrameSize$2(L); // } } @@ -3512,28 +3627,38 @@ static int _cclua_window_setFrameSize(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cclua_window(lua_State *L) +static int _olua_cls_cclua_window(lua_State *L) { oluacls_class(L, "cclua.window"); - oluacls_func(L, "__gc", _cclua_window___gc); - oluacls_func(L, "__olua_move", _cclua_window___olua_move); - oluacls_func(L, "convertToCameraSpace", _cclua_window_convertToCameraSpace); - oluacls_func(L, "getDesignSize", _cclua_window_getDesignSize); - oluacls_func(L, "getFrameSize", _cclua_window_getFrameSize); - oluacls_func(L, "getVisibleBounds", _cclua_window_getVisibleBounds); - oluacls_func(L, "getVisibleSize", _cclua_window_getVisibleSize); - oluacls_func(L, "setDesignSize", _cclua_window_setDesignSize); - oluacls_func(L, "setFrameSize", _cclua_window_setFrameSize); - oluacls_prop(L, "frameSize", _cclua_window_getFrameSize, _cclua_window_setFrameSize); - oluacls_prop(L, "visibleBounds", _cclua_window_getVisibleBounds, nullptr); - oluacls_prop(L, "visibleSize", _cclua_window_getVisibleSize, nullptr); + oluacls_func(L, "__gc", _olua_fun_cclua_window___gc); + oluacls_func(L, "__olua_move", _olua_fun_cclua_window___olua_move); + oluacls_func(L, "convertToCameraSpace", _olua_fun_cclua_window_convertToCameraSpace); + oluacls_func(L, "getDesignSize", _olua_fun_cclua_window_getDesignSize); + oluacls_func(L, "getFrameSize", _olua_fun_cclua_window_getFrameSize); + oluacls_func(L, "getVisibleBounds", _olua_fun_cclua_window_getVisibleBounds); + oluacls_func(L, "getVisibleSize", _olua_fun_cclua_window_getVisibleSize); + oluacls_func(L, "setDesignSize", _olua_fun_cclua_window_setDesignSize); + oluacls_func(L, "setFrameSize", _olua_fun_cclua_window_setFrameSize); + oluacls_prop(L, "designSize", _olua_fun_cclua_window_getDesignSize, nullptr); + oluacls_prop(L, "frameSize", _olua_fun_cclua_window_getFrameSize, nullptr); + oluacls_prop(L, "visibleBounds", _olua_fun_cclua_window_getVisibleBounds, nullptr); + oluacls_prop(L, "visibleSize", _olua_fun_cclua_window_getVisibleSize, nullptr); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cclua_window(lua_State *L) +{ + olua_require(L, "cclua", luaopen_cclua); + if (!olua_getclass(L, "cclua.window")) { + luaL_error(L, "class not found: cclua::window"); + } return 1; } OLUA_END_DECLS -static int _cclua_downloader___gc(lua_State *L) +static int _olua_fun_cclua_downloader___gc(lua_State *L) { olua_startinvoke(L); @@ -3545,7 +3670,7 @@ static int _cclua_downloader___gc(lua_State *L) return 0; } -static int _cclua_downloader___olua_move(lua_State *L) +static int _olua_fun_cclua_downloader___olua_move(lua_State *L) { olua_startinvoke(L); @@ -3557,7 +3682,7 @@ static int _cclua_downloader___olua_move(lua_State *L) return 1; } -static int _cclua_downloader_end(lua_State *L) +static int _olua_fun_cclua_downloader_end_(lua_State *L) { olua_startinvoke(L); @@ -3569,7 +3694,7 @@ static int _cclua_downloader_end(lua_State *L) return 0; } -static int _cclua_downloader_init(lua_State *L) +static int _olua_fun_cclua_downloader_init(lua_State *L) { olua_startinvoke(L); @@ -3581,7 +3706,7 @@ static int _cclua_downloader_init(lua_State *L) return 0; } -static int _cclua_downloader_load$1(lua_State *L) +static int _olua_fun_cclua_downloader_load$1(lua_State *L) { olua_startinvoke(L); @@ -3601,7 +3726,7 @@ static int _cclua_downloader_load$1(lua_State *L) return 0; } -static int _cclua_downloader_load$2(lua_State *L) +static int _olua_fun_cclua_downloader_load$2(lua_State *L) { olua_startinvoke(L); @@ -3611,7 +3736,7 @@ static int _cclua_downloader_load$2(lua_State *L) olua_check_string(L, 1, &arg1); olua_check_string(L, 2, &arg2); - // static void load(const std::string &uri, const std::string &path, @optional const std::string &md5) + // static void load(const std::string &uri, const std::string &path) cclua::downloader::load(arg1, arg2); olua_endinvoke(L); @@ -3619,21 +3744,21 @@ static int _cclua_downloader_load$2(lua_State *L) return 0; } -static int _cclua_downloader_load(lua_State *L) +static int _olua_fun_cclua_downloader_load(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 2) { // if ((olua_is_string(L, 1)) && (olua_is_string(L, 2))) { - // static void load(const std::string &uri, const std::string &path, @optional const std::string &md5) - return _cclua_downloader_load$2(L); + // static void load(const std::string &uri, const std::string &path) + return _olua_fun_cclua_downloader_load$2(L); // } } if (num_args == 3) { // if ((olua_is_string(L, 1)) && (olua_is_string(L, 2)) && (olua_is_string(L, 3))) { // static void load(const std::string &uri, const std::string &path, @optional const std::string &md5) - return _cclua_downloader_load$1(L); + return _olua_fun_cclua_downloader_load$1(L); // } } @@ -3642,7 +3767,7 @@ static int _cclua_downloader_load(lua_State *L) return 0; } -static int _cclua_downloader_setDispatcher(lua_State *L) +static int _olua_fun_cclua_downloader_setDispatcher(lua_State *L) { olua_startinvoke(L); @@ -3652,9 +3777,10 @@ static int _cclua_downloader_setDispatcher(lua_State *L) void *cb_store = (void *)olua_pushclassobj(L, "cclua.downloader"); std::string cb_tag = "Dispatcher"; - std::string cb_name = olua_setcallback(L, cb_store, 1, cb_tag.c_str(), OLUA_TAG_REPLACE); + std::string cb_name = olua_setcallback(L, cb_store, 1, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](const std::string &arg1, const cocos2d::Value &arg2) { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](const std::string &cb_arg1, const cocos2d::Value &cb_arg2) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); @@ -3662,8 +3788,8 @@ static int _cclua_downloader_setDispatcher(lua_State *L) int top = lua_gettop(L); size_t last = olua_push_objpool(L); olua_enable_objpool(L); - olua_push_string(L, arg1); - olua_push_cocos2d_Value(L, arg2); + olua_push_string(L, cb_arg1); + olua_push_cocos2d_Value(L, cb_arg2); olua_disable_objpool(L); olua_callback(L, cb_store, cb_name.c_str(), 2); @@ -3674,7 +3800,7 @@ static int _cclua_downloader_setDispatcher(lua_State *L) } }; - // static void setDispatcher(@localvar const cclua::Callback &dispatcher) + // static void setDispatcher(const cclua::Callback &dispatcher) cclua::downloader::setDispatcher(arg1); olua_endinvoke(L); @@ -3682,7 +3808,7 @@ static int _cclua_downloader_setDispatcher(lua_State *L) return 0; } -static int _cclua_downloader_setURIResolver(lua_State *L) +static int _olua_fun_cclua_downloader_setURIResolver(lua_State *L) { olua_startinvoke(L); @@ -3692,15 +3818,16 @@ static int _cclua_downloader_setURIResolver(lua_State *L) void *cb_store = (void *)olua_pushclassobj(L, "cclua.downloader"); std::string cb_tag = "URIResolver"; - std::string cb_name = olua_setcallback(L, cb_store, 1, cb_tag.c_str(), OLUA_TAG_REPLACE); + std::string cb_name = olua_setcallback(L, cb_store, 1, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](const std::string &arg1) { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](const std::string &cb_arg1) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); std::string ret; /** ret */ if (olua_contextequal(L, cb_ctx)) { int top = lua_gettop(L); - olua_push_string(L, arg1); + olua_push_string(L, cb_arg1); olua_callback(L, cb_store, cb_name.c_str(), 1); @@ -3713,7 +3840,7 @@ static int _cclua_downloader_setURIResolver(lua_State *L) return ret; }; - // static void setURIResolver(@localvar const std::function &resolver) + // static void setURIResolver(const std::function &resolver) cclua::downloader::setURIResolver(arg1); olua_endinvoke(L); @@ -3721,23 +3848,32 @@ static int _cclua_downloader_setURIResolver(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cclua_downloader(lua_State *L) +static int _olua_cls_cclua_downloader(lua_State *L) { oluacls_class(L, "cclua.downloader"); - oluacls_func(L, "__gc", _cclua_downloader___gc); - oluacls_func(L, "__olua_move", _cclua_downloader___olua_move); - oluacls_func(L, "end", _cclua_downloader_end); - oluacls_func(L, "init", _cclua_downloader_init); - oluacls_func(L, "load", _cclua_downloader_load); - oluacls_func(L, "setDispatcher", _cclua_downloader_setDispatcher); - oluacls_func(L, "setURIResolver", _cclua_downloader_setURIResolver); + oluacls_func(L, "__gc", _olua_fun_cclua_downloader___gc); + oluacls_func(L, "__olua_move", _olua_fun_cclua_downloader___olua_move); + oluacls_func(L, "end_", _olua_fun_cclua_downloader_end_); + oluacls_func(L, "init", _olua_fun_cclua_downloader_init); + oluacls_func(L, "load", _olua_fun_cclua_downloader_load); + oluacls_func(L, "setDispatcher", _olua_fun_cclua_downloader_setDispatcher); + oluacls_func(L, "setURIResolver", _olua_fun_cclua_downloader_setURIResolver); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cclua_downloader(lua_State *L) +{ + olua_require(L, "cclua", luaopen_cclua); + if (!olua_getclass(L, "cclua.downloader")) { + luaL_error(L, "class not found: cclua::downloader"); + } + return 1; +} OLUA_END_DECLS -static int _cclua_Container_create(lua_State *L) +static int _olua_fun_cclua_Container_create(lua_State *L) { olua_startinvoke(L); @@ -3750,7 +3886,7 @@ static int _cclua_Container_create(lua_State *L) return num_ret; } -static int _cclua_Container_getClippingNode(lua_State *L) +static int _olua_fun_cclua_Container_getClippingNode(lua_State *L) { olua_startinvoke(L); @@ -3767,7 +3903,7 @@ static int _cclua_Container_getClippingNode(lua_State *L) return num_ret; } -static int _cclua_Container_getFilter(lua_State *L) +static int _olua_fun_cclua_Container_getFilter(lua_State *L) { olua_startinvoke(L); @@ -3787,11 +3923,11 @@ static int _cclua_Container_getFilter(lua_State *L) return num_ret; } -static int _cclua_Container_new(lua_State *L) +static int _olua_fun_cclua_Container_new(lua_State *L) { olua_startinvoke(L); - // Container() + // cclua::Container() cclua::Container *ret = new cclua::Container(); int num_ret = olua_push_object(L, ret, "cclua.Container"); olua_postnew(L, ret); @@ -3801,7 +3937,7 @@ static int _cclua_Container_new(lua_State *L) return num_ret; } -static int _cclua_Container_setFilter(lua_State *L) +static int _olua_fun_cclua_Container_setFilter(lua_State *L) { olua_startinvoke(L); @@ -3824,24 +3960,32 @@ static int _cclua_Container_setFilter(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cclua_Container(lua_State *L) +static int _olua_cls_cclua_Container(lua_State *L) { oluacls_class(L, "cclua.Container"); - oluacls_func(L, "create", _cclua_Container_create); - oluacls_func(L, "getClippingNode", _cclua_Container_getClippingNode); - oluacls_func(L, "getFilter", _cclua_Container_getFilter); - oluacls_func(L, "new", _cclua_Container_new); - oluacls_func(L, "setFilter", _cclua_Container_setFilter); - oluacls_prop(L, "clippingNode", _cclua_Container_getClippingNode, nullptr); - oluacls_prop(L, "filter", _cclua_Container_getFilter, _cclua_Container_setFilter); + oluacls_func(L, "create", _olua_fun_cclua_Container_create); + oluacls_func(L, "getClippingNode", _olua_fun_cclua_Container_getClippingNode); + oluacls_func(L, "getFilter", _olua_fun_cclua_Container_getFilter); + oluacls_func(L, "new", _olua_fun_cclua_Container_new); + oluacls_func(L, "setFilter", _olua_fun_cclua_Container_setFilter); + oluacls_prop(L, "clippingNode", _olua_fun_cclua_Container_getClippingNode, nullptr); + oluacls_prop(L, "filter", _olua_fun_cclua_Container_getFilter, _olua_fun_cclua_Container_setFilter); return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cclua_XMLHttpRequest_ResponseType(lua_State *L) +OLUA_LIB int luaopen_cclua_Container(lua_State *L) +{ + olua_require(L, "cclua", luaopen_cclua); + if (!olua_getclass(L, "cclua.Container")) { + luaL_error(L, "class not found: cclua::Container"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_cclua_XMLHttpRequest_ResponseType(lua_State *L) { oluacls_class(L, "cclua.XMLHttpRequest.ResponseType"); oluacls_func(L, "__index", olua_indexerror); @@ -3854,9 +3998,19 @@ OLUA_LIB int luaopen_cclua_XMLHttpRequest_ResponseType(lua_State *L) return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cclua_XMLHttpRequest_ResponseType(lua_State *L) +{ + olua_require(L, "cclua", luaopen_cclua); + if (!olua_getclass(L, "cclua.XMLHttpRequest.ResponseType")) { + luaL_error(L, "class not found: cclua::XMLHttpRequest::ResponseType"); + } + return 1; +} OLUA_END_DECLS -static int _cclua_XMLHttpRequest_abort(lua_State *L) +static int _olua_fun_cclua_XMLHttpRequest_abort(lua_State *L) { olua_startinvoke(L); @@ -3872,7 +4026,7 @@ static int _cclua_XMLHttpRequest_abort(lua_State *L) return 0; } -static int _cclua_XMLHttpRequest_getAllResponseHeaders(lua_State *L) +static int _olua_fun_cclua_XMLHttpRequest_getAllResponseHeaders(lua_State *L) { olua_startinvoke(L); @@ -3892,7 +4046,7 @@ static int _cclua_XMLHttpRequest_getAllResponseHeaders(lua_State *L) return num_ret; } -static int _cclua_XMLHttpRequest_getDataSize(lua_State *L) +static int _olua_fun_cclua_XMLHttpRequest_getDataSize(lua_State *L) { olua_startinvoke(L); @@ -3909,7 +4063,7 @@ static int _cclua_XMLHttpRequest_getDataSize(lua_State *L) return num_ret; } -static int _cclua_XMLHttpRequest_getDataStr(lua_State *L) +static int _olua_fun_cclua_XMLHttpRequest_getDataStr(lua_State *L) { olua_startinvoke(L); @@ -3926,7 +4080,7 @@ static int _cclua_XMLHttpRequest_getDataStr(lua_State *L) return num_ret; } -static int _cclua_XMLHttpRequest_getErrorFlag(lua_State *L) +static int _olua_fun_cclua_XMLHttpRequest_getErrorFlag(lua_State *L) { olua_startinvoke(L); @@ -3943,7 +4097,7 @@ static int _cclua_XMLHttpRequest_getErrorFlag(lua_State *L) return num_ret; } -static int _cclua_XMLHttpRequest_getReadyState(lua_State *L) +static int _olua_fun_cclua_XMLHttpRequest_getReadyState(lua_State *L) { olua_startinvoke(L); @@ -3960,7 +4114,7 @@ static int _cclua_XMLHttpRequest_getReadyState(lua_State *L) return num_ret; } -static int _cclua_XMLHttpRequest_getResponse(lua_State *L) +static int _olua_fun_cclua_XMLHttpRequest_getResponse(lua_State *L) { olua_startinvoke(L); @@ -3972,7 +4126,7 @@ static int _cclua_XMLHttpRequest_getResponse(lua_State *L) return (int)ret; } -static int _cclua_XMLHttpRequest_getResponseHeader(lua_State *L) +static int _olua_fun_cclua_XMLHttpRequest_getResponseHeader(lua_State *L) { olua_startinvoke(L); @@ -3991,7 +4145,7 @@ static int _cclua_XMLHttpRequest_getResponseHeader(lua_State *L) return num_ret; } -static int _cclua_XMLHttpRequest_getResponseType(lua_State *L) +static int _olua_fun_cclua_XMLHttpRequest_getResponseType(lua_State *L) { olua_startinvoke(L); @@ -4008,7 +4162,7 @@ static int _cclua_XMLHttpRequest_getResponseType(lua_State *L) return num_ret; } -static int _cclua_XMLHttpRequest_getResponseURL(lua_State *L) +static int _olua_fun_cclua_XMLHttpRequest_getResponseURL(lua_State *L) { olua_startinvoke(L); @@ -4025,7 +4179,7 @@ static int _cclua_XMLHttpRequest_getResponseURL(lua_State *L) return num_ret; } -static int _cclua_XMLHttpRequest_getStatus(lua_State *L) +static int _olua_fun_cclua_XMLHttpRequest_getStatus(lua_State *L) { olua_startinvoke(L); @@ -4042,7 +4196,7 @@ static int _cclua_XMLHttpRequest_getStatus(lua_State *L) return num_ret; } -static int _cclua_XMLHttpRequest_getStatusText(lua_State *L) +static int _olua_fun_cclua_XMLHttpRequest_getStatusText(lua_State *L) { olua_startinvoke(L); @@ -4059,7 +4213,7 @@ static int _cclua_XMLHttpRequest_getStatusText(lua_State *L) return num_ret; } -static int _cclua_XMLHttpRequest_getTimeout(lua_State *L) +static int _olua_fun_cclua_XMLHttpRequest_getTimeout(lua_State *L) { olua_startinvoke(L); @@ -4076,7 +4230,7 @@ static int _cclua_XMLHttpRequest_getTimeout(lua_State *L) return num_ret; } -static int _cclua_XMLHttpRequest_getURL(lua_State *L) +static int _olua_fun_cclua_XMLHttpRequest_getURL(lua_State *L) { olua_startinvoke(L); @@ -4093,7 +4247,7 @@ static int _cclua_XMLHttpRequest_getURL(lua_State *L) return num_ret; } -static int _cclua_XMLHttpRequest_getWithCredentials(lua_State *L) +static int _olua_fun_cclua_XMLHttpRequest_getWithCredentials(lua_State *L) { olua_startinvoke(L); @@ -4110,7 +4264,7 @@ static int _cclua_XMLHttpRequest_getWithCredentials(lua_State *L) return num_ret; } -static int _cclua_XMLHttpRequest_isAborted(lua_State *L) +static int _olua_fun_cclua_XMLHttpRequest_isAborted(lua_State *L) { olua_startinvoke(L); @@ -4127,11 +4281,11 @@ static int _cclua_XMLHttpRequest_isAborted(lua_State *L) return num_ret; } -static int _cclua_XMLHttpRequest_new(lua_State *L) +static int _olua_fun_cclua_XMLHttpRequest_new(lua_State *L) { olua_startinvoke(L); - // XMLHttpRequest() + // cclua::XMLHttpRequest() cclua::XMLHttpRequest *ret = new cclua::XMLHttpRequest(); int num_ret = olua_push_object(L, ret, "cclua.XMLHttpRequest"); olua_postnew(L, ret); @@ -4141,7 +4295,7 @@ static int _cclua_XMLHttpRequest_new(lua_State *L) return num_ret; } -static int _cclua_XMLHttpRequest_open(lua_State *L) +static int _olua_fun_cclua_XMLHttpRequest_open(lua_State *L) { olua_startinvoke(L); @@ -4161,7 +4315,7 @@ static int _cclua_XMLHttpRequest_open(lua_State *L) return 0; } -static int _cclua_XMLHttpRequest_send$1(lua_State *L) +static int _olua_fun_cclua_XMLHttpRequest_send$1(lua_State *L) { olua_startinvoke(L); @@ -4179,7 +4333,7 @@ static int _cclua_XMLHttpRequest_send$1(lua_State *L) return 0; } -static int _cclua_XMLHttpRequest_send$2(lua_State *L) +static int _olua_fun_cclua_XMLHttpRequest_send$2(lua_State *L) { olua_startinvoke(L); @@ -4195,19 +4349,19 @@ static int _cclua_XMLHttpRequest_send$2(lua_State *L) return 0; } -static int _cclua_XMLHttpRequest_send(lua_State *L) +static int _olua_fun_cclua_XMLHttpRequest_send(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 0) { // void send() - return _cclua_XMLHttpRequest_send$2(L); + return _olua_fun_cclua_XMLHttpRequest_send$2(L); } if (num_args == 1) { // if ((olua_is_cocos2d_Data(L, 2))) { // void send(const cocos2d::Data &data) - return _cclua_XMLHttpRequest_send$1(L); + return _olua_fun_cclua_XMLHttpRequest_send$1(L); // } } @@ -4216,7 +4370,7 @@ static int _cclua_XMLHttpRequest_send(lua_State *L) return 0; } -static int _cclua_XMLHttpRequest_setErrorFlag(lua_State *L) +static int _olua_fun_cclua_XMLHttpRequest_setErrorFlag(lua_State *L) { olua_startinvoke(L); @@ -4234,7 +4388,7 @@ static int _cclua_XMLHttpRequest_setErrorFlag(lua_State *L) return 0; } -static int _cclua_XMLHttpRequest_setRequestHeader(lua_State *L) +static int _olua_fun_cclua_XMLHttpRequest_setRequestHeader(lua_State *L) { olua_startinvoke(L); @@ -4254,7 +4408,7 @@ static int _cclua_XMLHttpRequest_setRequestHeader(lua_State *L) return 0; } -static int _cclua_XMLHttpRequest_setResponseCallback(lua_State *L) +static int _olua_fun_cclua_XMLHttpRequest_setResponseCallback(lua_State *L) { olua_startinvoke(L); @@ -4266,15 +4420,16 @@ static int _cclua_XMLHttpRequest_setResponseCallback(lua_State *L) void *cb_store = (void *)self; std::string cb_tag = "ResponseCallback"; - std::string cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + std::string cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](int arg1) { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](int cb_arg1) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); if (olua_contextequal(L, cb_ctx)) { int top = lua_gettop(L); - olua_push_integer(L, arg1); + olua_push_integer(L, cb_arg1); olua_callback(L, cb_store, cb_name.c_str(), 1); @@ -4282,7 +4437,7 @@ static int _cclua_XMLHttpRequest_setResponseCallback(lua_State *L) } }; - // void setResponseCallback(@localvar std::function handler) + // void setResponseCallback(std::function handler) self->setResponseCallback(arg1); olua_endinvoke(L); @@ -4290,7 +4445,7 @@ static int _cclua_XMLHttpRequest_setResponseCallback(lua_State *L) return 0; } -static int _cclua_XMLHttpRequest_setResponseType(lua_State *L) +static int _olua_fun_cclua_XMLHttpRequest_setResponseType(lua_State *L) { olua_startinvoke(L); @@ -4308,7 +4463,7 @@ static int _cclua_XMLHttpRequest_setResponseType(lua_State *L) return 0; } -static int _cclua_XMLHttpRequest_setTimeout(lua_State *L) +static int _olua_fun_cclua_XMLHttpRequest_setTimeout(lua_State *L) { olua_startinvoke(L); @@ -4326,7 +4481,7 @@ static int _cclua_XMLHttpRequest_setTimeout(lua_State *L) return 0; } -static int _cclua_XMLHttpRequest_setWithCredentials(lua_State *L) +static int _olua_fun_cclua_XMLHttpRequest_setWithCredentials(lua_State *L) { olua_startinvoke(L); @@ -4344,49 +4499,48 @@ static int _cclua_XMLHttpRequest_setWithCredentials(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cclua_XMLHttpRequest(lua_State *L) +static int _olua_cls_cclua_XMLHttpRequest(lua_State *L) { oluacls_class(L, "cclua.XMLHttpRequest"); - oluacls_func(L, "abort", _cclua_XMLHttpRequest_abort); - oluacls_func(L, "getAllResponseHeaders", _cclua_XMLHttpRequest_getAllResponseHeaders); - oluacls_func(L, "getDataSize", _cclua_XMLHttpRequest_getDataSize); - oluacls_func(L, "getDataStr", _cclua_XMLHttpRequest_getDataStr); - oluacls_func(L, "getErrorFlag", _cclua_XMLHttpRequest_getErrorFlag); - oluacls_func(L, "getReadyState", _cclua_XMLHttpRequest_getReadyState); - oluacls_func(L, "getResponse", _cclua_XMLHttpRequest_getResponse); - oluacls_func(L, "getResponseHeader", _cclua_XMLHttpRequest_getResponseHeader); - oluacls_func(L, "getResponseType", _cclua_XMLHttpRequest_getResponseType); - oluacls_func(L, "getResponseURL", _cclua_XMLHttpRequest_getResponseURL); - oluacls_func(L, "getStatus", _cclua_XMLHttpRequest_getStatus); - oluacls_func(L, "getStatusText", _cclua_XMLHttpRequest_getStatusText); - oluacls_func(L, "getTimeout", _cclua_XMLHttpRequest_getTimeout); - oluacls_func(L, "getURL", _cclua_XMLHttpRequest_getURL); - oluacls_func(L, "getWithCredentials", _cclua_XMLHttpRequest_getWithCredentials); - oluacls_func(L, "isAborted", _cclua_XMLHttpRequest_isAborted); - oluacls_func(L, "new", _cclua_XMLHttpRequest_new); - oluacls_func(L, "open", _cclua_XMLHttpRequest_open); - oluacls_func(L, "send", _cclua_XMLHttpRequest_send); - oluacls_func(L, "setErrorFlag", _cclua_XMLHttpRequest_setErrorFlag); - oluacls_func(L, "setRequestHeader", _cclua_XMLHttpRequest_setRequestHeader); - oluacls_func(L, "setResponseCallback", _cclua_XMLHttpRequest_setResponseCallback); - oluacls_func(L, "setResponseType", _cclua_XMLHttpRequest_setResponseType); - oluacls_func(L, "setTimeout", _cclua_XMLHttpRequest_setTimeout); - oluacls_func(L, "setWithCredentials", _cclua_XMLHttpRequest_setWithCredentials); - oluacls_prop(L, "aborted", _cclua_XMLHttpRequest_isAborted, nullptr); - oluacls_prop(L, "allResponseHeaders", _cclua_XMLHttpRequest_getAllResponseHeaders, nullptr); - oluacls_prop(L, "dataSize", _cclua_XMLHttpRequest_getDataSize, nullptr); - oluacls_prop(L, "dataStr", _cclua_XMLHttpRequest_getDataStr, nullptr); - oluacls_prop(L, "errorFlag", _cclua_XMLHttpRequest_getErrorFlag, _cclua_XMLHttpRequest_setErrorFlag); - oluacls_prop(L, "readyState", _cclua_XMLHttpRequest_getReadyState, nullptr); - oluacls_prop(L, "response", _cclua_XMLHttpRequest_getResponse, nullptr); - oluacls_prop(L, "responseType", _cclua_XMLHttpRequest_getResponseType, _cclua_XMLHttpRequest_setResponseType); - oluacls_prop(L, "responseURL", _cclua_XMLHttpRequest_getResponseURL, nullptr); - oluacls_prop(L, "status", _cclua_XMLHttpRequest_getStatus, nullptr); - oluacls_prop(L, "statusText", _cclua_XMLHttpRequest_getStatusText, nullptr); - oluacls_prop(L, "timeout", _cclua_XMLHttpRequest_getTimeout, _cclua_XMLHttpRequest_setTimeout); - oluacls_prop(L, "url", _cclua_XMLHttpRequest_getURL, nullptr); - oluacls_prop(L, "withCredentials", _cclua_XMLHttpRequest_getWithCredentials, _cclua_XMLHttpRequest_setWithCredentials); + oluacls_func(L, "abort", _olua_fun_cclua_XMLHttpRequest_abort); + oluacls_func(L, "getAllResponseHeaders", _olua_fun_cclua_XMLHttpRequest_getAllResponseHeaders); + oluacls_func(L, "getDataSize", _olua_fun_cclua_XMLHttpRequest_getDataSize); + oluacls_func(L, "getDataStr", _olua_fun_cclua_XMLHttpRequest_getDataStr); + oluacls_func(L, "getErrorFlag", _olua_fun_cclua_XMLHttpRequest_getErrorFlag); + oluacls_func(L, "getReadyState", _olua_fun_cclua_XMLHttpRequest_getReadyState); + oluacls_func(L, "getResponse", _olua_fun_cclua_XMLHttpRequest_getResponse); + oluacls_func(L, "getResponseHeader", _olua_fun_cclua_XMLHttpRequest_getResponseHeader); + oluacls_func(L, "getResponseType", _olua_fun_cclua_XMLHttpRequest_getResponseType); + oluacls_func(L, "getResponseURL", _olua_fun_cclua_XMLHttpRequest_getResponseURL); + oluacls_func(L, "getStatus", _olua_fun_cclua_XMLHttpRequest_getStatus); + oluacls_func(L, "getStatusText", _olua_fun_cclua_XMLHttpRequest_getStatusText); + oluacls_func(L, "getTimeout", _olua_fun_cclua_XMLHttpRequest_getTimeout); + oluacls_func(L, "getURL", _olua_fun_cclua_XMLHttpRequest_getURL); + oluacls_func(L, "getWithCredentials", _olua_fun_cclua_XMLHttpRequest_getWithCredentials); + oluacls_func(L, "isAborted", _olua_fun_cclua_XMLHttpRequest_isAborted); + oluacls_func(L, "new", _olua_fun_cclua_XMLHttpRequest_new); + oluacls_func(L, "open", _olua_fun_cclua_XMLHttpRequest_open); + oluacls_func(L, "send", _olua_fun_cclua_XMLHttpRequest_send); + oluacls_func(L, "setErrorFlag", _olua_fun_cclua_XMLHttpRequest_setErrorFlag); + oluacls_func(L, "setRequestHeader", _olua_fun_cclua_XMLHttpRequest_setRequestHeader); + oluacls_func(L, "setResponseCallback", _olua_fun_cclua_XMLHttpRequest_setResponseCallback); + oluacls_func(L, "setResponseType", _olua_fun_cclua_XMLHttpRequest_setResponseType); + oluacls_func(L, "setTimeout", _olua_fun_cclua_XMLHttpRequest_setTimeout); + oluacls_func(L, "setWithCredentials", _olua_fun_cclua_XMLHttpRequest_setWithCredentials); + oluacls_prop(L, "aborted", _olua_fun_cclua_XMLHttpRequest_isAborted, nullptr); + oluacls_prop(L, "allResponseHeaders", _olua_fun_cclua_XMLHttpRequest_getAllResponseHeaders, nullptr); + oluacls_prop(L, "dataSize", _olua_fun_cclua_XMLHttpRequest_getDataSize, nullptr); + oluacls_prop(L, "dataStr", _olua_fun_cclua_XMLHttpRequest_getDataStr, nullptr); + oluacls_prop(L, "errorFlag", _olua_fun_cclua_XMLHttpRequest_getErrorFlag, _olua_fun_cclua_XMLHttpRequest_setErrorFlag); + oluacls_prop(L, "readyState", _olua_fun_cclua_XMLHttpRequest_getReadyState, nullptr); + oluacls_prop(L, "response", _olua_fun_cclua_XMLHttpRequest_getResponse, nullptr); + oluacls_prop(L, "responseType", _olua_fun_cclua_XMLHttpRequest_getResponseType, _olua_fun_cclua_XMLHttpRequest_setResponseType); + oluacls_prop(L, "responseURL", _olua_fun_cclua_XMLHttpRequest_getResponseURL, nullptr); + oluacls_prop(L, "status", _olua_fun_cclua_XMLHttpRequest_getStatus, nullptr); + oluacls_prop(L, "statusText", _olua_fun_cclua_XMLHttpRequest_getStatusText, nullptr); + oluacls_prop(L, "timeout", _olua_fun_cclua_XMLHttpRequest_getTimeout, _olua_fun_cclua_XMLHttpRequest_setTimeout); + oluacls_prop(L, "url", _olua_fun_cclua_XMLHttpRequest_getURL, nullptr); + oluacls_prop(L, "withCredentials", _olua_fun_cclua_XMLHttpRequest_getWithCredentials, _olua_fun_cclua_XMLHttpRequest_setWithCredentials); oluacls_const(L, "DONE", cclua::XMLHttpRequest::DONE); oluacls_const(L, "HEADERS_RECEIVED", cclua::XMLHttpRequest::HEADERS_RECEIVED); oluacls_const(L, "LOADING", cclua::XMLHttpRequest::LOADING); @@ -4395,11 +4549,20 @@ OLUA_LIB int luaopen_cclua_XMLHttpRequest(lua_State *L) return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cclua_XMLHttpRequest(lua_State *L) +{ + olua_require(L, "cclua", luaopen_cclua); + if (!olua_getclass(L, "cclua.XMLHttpRequest")) { + luaL_error(L, "class not found: cclua::XMLHttpRequest"); + } + return 1; +} OLUA_END_DECLS #if defined(CCLUA_OS_IOS) || defined(CCLUA_OS_ANDROID) -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cclua_MP3Encoder_VBRMode(lua_State *L) +static int _olua_cls_cclua_MP3Encoder_VBRMode(lua_State *L) { oluacls_class(L, "cclua.MP3Encoder.VBRMode"); oluacls_func(L, "__index", olua_indexerror); @@ -4414,12 +4577,21 @@ OLUA_LIB int luaopen_cclua_MP3Encoder_VBRMode(lua_State *L) return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cclua_MP3Encoder_VBRMode(lua_State *L) +{ + olua_require(L, "cclua", luaopen_cclua); + if (!olua_getclass(L, "cclua.MP3Encoder.VBRMode")) { + luaL_error(L, "class not found: cclua::MP3Encoder::VBRMode"); + } + return 1; +} OLUA_END_DECLS #endif #if defined(CCLUA_OS_IOS) || defined(CCLUA_OS_ANDROID) -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cclua_MP3Encoder_MPEGMode(lua_State *L) +static int _olua_cls_cclua_MP3Encoder_MPEGMode(lua_State *L) { oluacls_class(L, "cclua.MP3Encoder.MPEGMode"); oluacls_func(L, "__index", olua_indexerror); @@ -4433,11 +4605,21 @@ OLUA_LIB int luaopen_cclua_MP3Encoder_MPEGMode(lua_State *L) return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cclua_MP3Encoder_MPEGMode(lua_State *L) +{ + olua_require(L, "cclua", luaopen_cclua); + if (!olua_getclass(L, "cclua.MP3Encoder.MPEGMode")) { + luaL_error(L, "class not found: cclua::MP3Encoder::MPEGMode"); + } + return 1; +} OLUA_END_DECLS #endif #if defined(CCLUA_OS_IOS) || defined(CCLUA_OS_ANDROID) -static int _cclua_MP3Encoder_getATHlower(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_getATHlower(lua_State *L) { olua_startinvoke(L); @@ -4454,7 +4636,7 @@ static int _cclua_MP3Encoder_getATHlower(lua_State *L) return num_ret; } -static int _cclua_MP3Encoder_getATHonly(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_getATHonly(lua_State *L) { olua_startinvoke(L); @@ -4471,7 +4653,7 @@ static int _cclua_MP3Encoder_getATHonly(lua_State *L) return num_ret; } -static int _cclua_MP3Encoder_getATHshort(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_getATHshort(lua_State *L) { olua_startinvoke(L); @@ -4488,7 +4670,7 @@ static int _cclua_MP3Encoder_getATHshort(lua_State *L) return num_ret; } -static int _cclua_MP3Encoder_getATHtype(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_getATHtype(lua_State *L) { olua_startinvoke(L); @@ -4505,7 +4687,7 @@ static int _cclua_MP3Encoder_getATHtype(lua_State *L) return num_ret; } -static int _cclua_MP3Encoder_getAllowDiffShort(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_getAllowDiffShort(lua_State *L) { olua_startinvoke(L); @@ -4522,7 +4704,7 @@ static int _cclua_MP3Encoder_getAllowDiffShort(lua_State *L) return num_ret; } -static int _cclua_MP3Encoder_getAnalysis(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_getAnalysis(lua_State *L) { olua_startinvoke(L); @@ -4539,7 +4721,7 @@ static int _cclua_MP3Encoder_getAnalysis(lua_State *L) return num_ret; } -static int _cclua_MP3Encoder_getAthaaSensitivity(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_getAthaaSensitivity(lua_State *L) { olua_startinvoke(L); @@ -4556,7 +4738,7 @@ static int _cclua_MP3Encoder_getAthaaSensitivity(lua_State *L) return num_ret; } -static int _cclua_MP3Encoder_getAthaaType(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_getAthaaType(lua_State *L) { olua_startinvoke(L); @@ -4573,7 +4755,7 @@ static int _cclua_MP3Encoder_getAthaaType(lua_State *L) return num_ret; } -static int _cclua_MP3Encoder_getAudiophileGain(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_getAudiophileGain(lua_State *L) { olua_startinvoke(L); @@ -4590,7 +4772,7 @@ static int _cclua_MP3Encoder_getAudiophileGain(lua_State *L) return num_ret; } -static int _cclua_MP3Encoder_getBWriteVbrTag(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_getBWriteVbrTag(lua_State *L) { olua_startinvoke(L); @@ -4607,7 +4789,7 @@ static int _cclua_MP3Encoder_getBWriteVbrTag(lua_State *L) return num_ret; } -static int _cclua_MP3Encoder_getBrate(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_getBrate(lua_State *L) { olua_startinvoke(L); @@ -4624,7 +4806,7 @@ static int _cclua_MP3Encoder_getBrate(lua_State *L) return num_ret; } -static int _cclua_MP3Encoder_getCompressionRatio(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_getCompressionRatio(lua_State *L) { olua_startinvoke(L); @@ -4641,7 +4823,7 @@ static int _cclua_MP3Encoder_getCompressionRatio(lua_State *L) return num_ret; } -static int _cclua_MP3Encoder_getCopyright(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_getCopyright(lua_State *L) { olua_startinvoke(L); @@ -4658,7 +4840,7 @@ static int _cclua_MP3Encoder_getCopyright(lua_State *L) return num_ret; } -static int _cclua_MP3Encoder_getDecodeOnTheFly(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_getDecodeOnTheFly(lua_State *L) { olua_startinvoke(L); @@ -4675,7 +4857,7 @@ static int _cclua_MP3Encoder_getDecodeOnTheFly(lua_State *L) return num_ret; } -static int _cclua_MP3Encoder_getDecodeOnly(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_getDecodeOnly(lua_State *L) { olua_startinvoke(L); @@ -4692,7 +4874,7 @@ static int _cclua_MP3Encoder_getDecodeOnly(lua_State *L) return num_ret; } -static int _cclua_MP3Encoder_getDisableReservoir(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_getDisableReservoir(lua_State *L) { olua_startinvoke(L); @@ -4709,7 +4891,7 @@ static int _cclua_MP3Encoder_getDisableReservoir(lua_State *L) return num_ret; } -static int _cclua_MP3Encoder_getEmphasis(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_getEmphasis(lua_State *L) { olua_startinvoke(L); @@ -4726,7 +4908,7 @@ static int _cclua_MP3Encoder_getEmphasis(lua_State *L) return num_ret; } -static int _cclua_MP3Encoder_getEncoderDelay(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_getEncoderDelay(lua_State *L) { olua_startinvoke(L); @@ -4743,7 +4925,7 @@ static int _cclua_MP3Encoder_getEncoderDelay(lua_State *L) return num_ret; } -static int _cclua_MP3Encoder_getEncoderPadding(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_getEncoderPadding(lua_State *L) { olua_startinvoke(L); @@ -4760,7 +4942,7 @@ static int _cclua_MP3Encoder_getEncoderPadding(lua_State *L) return num_ret; } -static int _cclua_MP3Encoder_getErrorProtection(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_getErrorProtection(lua_State *L) { olua_startinvoke(L); @@ -4777,7 +4959,7 @@ static int _cclua_MP3Encoder_getErrorProtection(lua_State *L) return num_ret; } -static int _cclua_MP3Encoder_getExpNspsytune(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_getExpNspsytune(lua_State *L) { olua_startinvoke(L); @@ -4794,7 +4976,7 @@ static int _cclua_MP3Encoder_getExpNspsytune(lua_State *L) return num_ret; } -static int _cclua_MP3Encoder_getExperimentalX(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_getExperimentalX(lua_State *L) { olua_startinvoke(L); @@ -4811,7 +4993,7 @@ static int _cclua_MP3Encoder_getExperimentalX(lua_State *L) return num_ret; } -static int _cclua_MP3Encoder_getExperimentalY(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_getExperimentalY(lua_State *L) { olua_startinvoke(L); @@ -4828,7 +5010,7 @@ static int _cclua_MP3Encoder_getExperimentalY(lua_State *L) return num_ret; } -static int _cclua_MP3Encoder_getExperimentalZ(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_getExperimentalZ(lua_State *L) { olua_startinvoke(L); @@ -4845,7 +5027,7 @@ static int _cclua_MP3Encoder_getExperimentalZ(lua_State *L) return num_ret; } -static int _cclua_MP3Encoder_getExtension(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_getExtension(lua_State *L) { olua_startinvoke(L); @@ -4862,7 +5044,7 @@ static int _cclua_MP3Encoder_getExtension(lua_State *L) return num_ret; } -static int _cclua_MP3Encoder_getFindReplayGain(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_getFindReplayGain(lua_State *L) { olua_startinvoke(L); @@ -4879,7 +5061,7 @@ static int _cclua_MP3Encoder_getFindReplayGain(lua_State *L) return num_ret; } -static int _cclua_MP3Encoder_getForceMs(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_getForceMs(lua_State *L) { olua_startinvoke(L); @@ -4896,7 +5078,7 @@ static int _cclua_MP3Encoder_getForceMs(lua_State *L) return num_ret; } -static int _cclua_MP3Encoder_getForceShortBlocks(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_getForceShortBlocks(lua_State *L) { olua_startinvoke(L); @@ -4913,7 +5095,7 @@ static int _cclua_MP3Encoder_getForceShortBlocks(lua_State *L) return num_ret; } -static int _cclua_MP3Encoder_getFrameNum(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_getFrameNum(lua_State *L) { olua_startinvoke(L); @@ -4930,7 +5112,7 @@ static int _cclua_MP3Encoder_getFrameNum(lua_State *L) return num_ret; } -static int _cclua_MP3Encoder_getFramesize(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_getFramesize(lua_State *L) { olua_startinvoke(L); @@ -4947,7 +5129,7 @@ static int _cclua_MP3Encoder_getFramesize(lua_State *L) return num_ret; } -static int _cclua_MP3Encoder_getFreeFormat(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_getFreeFormat(lua_State *L) { olua_startinvoke(L); @@ -4964,7 +5146,7 @@ static int _cclua_MP3Encoder_getFreeFormat(lua_State *L) return num_ret; } -static int _cclua_MP3Encoder_getHighpassfreq(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_getHighpassfreq(lua_State *L) { olua_startinvoke(L); @@ -4981,7 +5163,7 @@ static int _cclua_MP3Encoder_getHighpassfreq(lua_State *L) return num_ret; } -static int _cclua_MP3Encoder_getHighpasswidth(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_getHighpasswidth(lua_State *L) { olua_startinvoke(L); @@ -4998,7 +5180,7 @@ static int _cclua_MP3Encoder_getHighpasswidth(lua_State *L) return num_ret; } -static int _cclua_MP3Encoder_getInSamplerate(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_getInSamplerate(lua_State *L) { olua_startinvoke(L); @@ -5015,7 +5197,7 @@ static int _cclua_MP3Encoder_getInSamplerate(lua_State *L) return num_ret; } -static int _cclua_MP3Encoder_getInterChRatio(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_getInterChRatio(lua_State *L) { olua_startinvoke(L); @@ -5032,7 +5214,7 @@ static int _cclua_MP3Encoder_getInterChRatio(lua_State *L) return num_ret; } -static int _cclua_MP3Encoder_getLameOsBitness(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_getLameOsBitness(lua_State *L) { olua_startinvoke(L); @@ -5049,7 +5231,7 @@ static int _cclua_MP3Encoder_getLameOsBitness(lua_State *L) return num_ret; } -static int _cclua_MP3Encoder_getLameShortVersion(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_getLameShortVersion(lua_State *L) { olua_startinvoke(L); @@ -5066,7 +5248,7 @@ static int _cclua_MP3Encoder_getLameShortVersion(lua_State *L) return num_ret; } -static int _cclua_MP3Encoder_getLameUrl(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_getLameUrl(lua_State *L) { olua_startinvoke(L); @@ -5083,7 +5265,7 @@ static int _cclua_MP3Encoder_getLameUrl(lua_State *L) return num_ret; } -static int _cclua_MP3Encoder_getLameVersion(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_getLameVersion(lua_State *L) { olua_startinvoke(L); @@ -5100,7 +5282,7 @@ static int _cclua_MP3Encoder_getLameVersion(lua_State *L) return num_ret; } -static int _cclua_MP3Encoder_getLameVeryShortVersion(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_getLameVeryShortVersion(lua_State *L) { olua_startinvoke(L); @@ -5117,7 +5299,7 @@ static int _cclua_MP3Encoder_getLameVeryShortVersion(lua_State *L) return num_ret; } -static int _cclua_MP3Encoder_getLowpassfreq(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_getLowpassfreq(lua_State *L) { olua_startinvoke(L); @@ -5134,7 +5316,7 @@ static int _cclua_MP3Encoder_getLowpassfreq(lua_State *L) return num_ret; } -static int _cclua_MP3Encoder_getLowpasswidth(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_getLowpasswidth(lua_State *L) { olua_startinvoke(L); @@ -5151,7 +5333,7 @@ static int _cclua_MP3Encoder_getLowpasswidth(lua_State *L) return num_ret; } -static int _cclua_MP3Encoder_getMfSamplesToEncode(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_getMfSamplesToEncode(lua_State *L) { olua_startinvoke(L); @@ -5168,7 +5350,7 @@ static int _cclua_MP3Encoder_getMfSamplesToEncode(lua_State *L) return num_ret; } -static int _cclua_MP3Encoder_getMode(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_getMode(lua_State *L) { olua_startinvoke(L); @@ -5185,7 +5367,7 @@ static int _cclua_MP3Encoder_getMode(lua_State *L) return num_ret; } -static int _cclua_MP3Encoder_getMsfix(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_getMsfix(lua_State *L) { olua_startinvoke(L); @@ -5202,7 +5384,7 @@ static int _cclua_MP3Encoder_getMsfix(lua_State *L) return num_ret; } -static int _cclua_MP3Encoder_getNoATH(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_getNoATH(lua_State *L) { olua_startinvoke(L); @@ -5219,7 +5401,7 @@ static int _cclua_MP3Encoder_getNoATH(lua_State *L) return num_ret; } -static int _cclua_MP3Encoder_getNoShortBlocks(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_getNoShortBlocks(lua_State *L) { olua_startinvoke(L); @@ -5236,7 +5418,7 @@ static int _cclua_MP3Encoder_getNoShortBlocks(lua_State *L) return num_ret; } -static int _cclua_MP3Encoder_getNoclipGainChange(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_getNoclipGainChange(lua_State *L) { olua_startinvoke(L); @@ -5253,7 +5435,7 @@ static int _cclua_MP3Encoder_getNoclipGainChange(lua_State *L) return num_ret; } -static int _cclua_MP3Encoder_getNoclipScale(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_getNoclipScale(lua_State *L) { olua_startinvoke(L); @@ -5270,7 +5452,7 @@ static int _cclua_MP3Encoder_getNoclipScale(lua_State *L) return num_ret; } -static int _cclua_MP3Encoder_getNogapCurrentindex(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_getNogapCurrentindex(lua_State *L) { olua_startinvoke(L); @@ -5287,7 +5469,7 @@ static int _cclua_MP3Encoder_getNogapCurrentindex(lua_State *L) return num_ret; } -static int _cclua_MP3Encoder_getNogapTotal(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_getNogapTotal(lua_State *L) { olua_startinvoke(L); @@ -5304,7 +5486,7 @@ static int _cclua_MP3Encoder_getNogapTotal(lua_State *L) return num_ret; } -static int _cclua_MP3Encoder_getNumChannels(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_getNumChannels(lua_State *L) { olua_startinvoke(L); @@ -5321,7 +5503,7 @@ static int _cclua_MP3Encoder_getNumChannels(lua_State *L) return num_ret; } -static int _cclua_MP3Encoder_getNumSamples(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_getNumSamples(lua_State *L) { olua_startinvoke(L); @@ -5338,7 +5520,7 @@ static int _cclua_MP3Encoder_getNumSamples(lua_State *L) return num_ret; } -static int _cclua_MP3Encoder_getOriginal(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_getOriginal(lua_State *L) { olua_startinvoke(L); @@ -5355,7 +5537,7 @@ static int _cclua_MP3Encoder_getOriginal(lua_State *L) return num_ret; } -static int _cclua_MP3Encoder_getOutSamplerate(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_getOutSamplerate(lua_State *L) { olua_startinvoke(L); @@ -5372,7 +5554,7 @@ static int _cclua_MP3Encoder_getOutSamplerate(lua_State *L) return num_ret; } -static int _cclua_MP3Encoder_getPeakSample(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_getPeakSample(lua_State *L) { olua_startinvoke(L); @@ -5389,7 +5571,7 @@ static int _cclua_MP3Encoder_getPeakSample(lua_State *L) return num_ret; } -static int _cclua_MP3Encoder_getPsyVersion(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_getPsyVersion(lua_State *L) { olua_startinvoke(L); @@ -5406,7 +5588,7 @@ static int _cclua_MP3Encoder_getPsyVersion(lua_State *L) return num_ret; } -static int _cclua_MP3Encoder_getQuality(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_getQuality(lua_State *L) { olua_startinvoke(L); @@ -5423,7 +5605,7 @@ static int _cclua_MP3Encoder_getQuality(lua_State *L) return num_ret; } -static int _cclua_MP3Encoder_getQuantComp(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_getQuantComp(lua_State *L) { olua_startinvoke(L); @@ -5440,7 +5622,7 @@ static int _cclua_MP3Encoder_getQuantComp(lua_State *L) return num_ret; } -static int _cclua_MP3Encoder_getQuantCompShort(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_getQuantCompShort(lua_State *L) { olua_startinvoke(L); @@ -5457,7 +5639,7 @@ static int _cclua_MP3Encoder_getQuantCompShort(lua_State *L) return num_ret; } -static int _cclua_MP3Encoder_getRadioGain(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_getRadioGain(lua_State *L) { olua_startinvoke(L); @@ -5474,7 +5656,7 @@ static int _cclua_MP3Encoder_getRadioGain(lua_State *L) return num_ret; } -static int _cclua_MP3Encoder_getScale(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_getScale(lua_State *L) { olua_startinvoke(L); @@ -5491,7 +5673,7 @@ static int _cclua_MP3Encoder_getScale(lua_State *L) return num_ret; } -static int _cclua_MP3Encoder_getScaleLeft(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_getScaleLeft(lua_State *L) { olua_startinvoke(L); @@ -5508,7 +5690,7 @@ static int _cclua_MP3Encoder_getScaleLeft(lua_State *L) return num_ret; } -static int _cclua_MP3Encoder_getScaleRight(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_getScaleRight(lua_State *L) { olua_startinvoke(L); @@ -5525,7 +5707,7 @@ static int _cclua_MP3Encoder_getScaleRight(lua_State *L) return num_ret; } -static int _cclua_MP3Encoder_getSizeMp3buffer(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_getSizeMp3buffer(lua_State *L) { olua_startinvoke(L); @@ -5542,7 +5724,7 @@ static int _cclua_MP3Encoder_getSizeMp3buffer(lua_State *L) return num_ret; } -static int _cclua_MP3Encoder_getStrictISO(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_getStrictISO(lua_State *L) { olua_startinvoke(L); @@ -5559,7 +5741,7 @@ static int _cclua_MP3Encoder_getStrictISO(lua_State *L) return num_ret; } -static int _cclua_MP3Encoder_getTotalframes(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_getTotalframes(lua_State *L) { olua_startinvoke(L); @@ -5576,7 +5758,7 @@ static int _cclua_MP3Encoder_getTotalframes(lua_State *L) return num_ret; } -static int _cclua_MP3Encoder_getUseTemporal(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_getUseTemporal(lua_State *L) { olua_startinvoke(L); @@ -5593,7 +5775,7 @@ static int _cclua_MP3Encoder_getUseTemporal(lua_State *L) return num_ret; } -static int _cclua_MP3Encoder_getVBR(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_getVBR(lua_State *L) { olua_startinvoke(L); @@ -5610,7 +5792,7 @@ static int _cclua_MP3Encoder_getVBR(lua_State *L) return num_ret; } -static int _cclua_MP3Encoder_getVBRHardMin(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_getVBRHardMin(lua_State *L) { olua_startinvoke(L); @@ -5627,7 +5809,7 @@ static int _cclua_MP3Encoder_getVBRHardMin(lua_State *L) return num_ret; } -static int _cclua_MP3Encoder_getVBRMaxBitrateKbps(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_getVBRMaxBitrateKbps(lua_State *L) { olua_startinvoke(L); @@ -5644,7 +5826,7 @@ static int _cclua_MP3Encoder_getVBRMaxBitrateKbps(lua_State *L) return num_ret; } -static int _cclua_MP3Encoder_getVBRMeanBitrateKbps(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_getVBRMeanBitrateKbps(lua_State *L) { olua_startinvoke(L); @@ -5661,7 +5843,7 @@ static int _cclua_MP3Encoder_getVBRMeanBitrateKbps(lua_State *L) return num_ret; } -static int _cclua_MP3Encoder_getVBRMinBitrateKbps(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_getVBRMinBitrateKbps(lua_State *L) { olua_startinvoke(L); @@ -5678,7 +5860,7 @@ static int _cclua_MP3Encoder_getVBRMinBitrateKbps(lua_State *L) return num_ret; } -static int _cclua_MP3Encoder_getVBRQ(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_getVBRQ(lua_State *L) { olua_startinvoke(L); @@ -5695,7 +5877,7 @@ static int _cclua_MP3Encoder_getVBRQ(lua_State *L) return num_ret; } -static int _cclua_MP3Encoder_getVBRQuality(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_getVBRQuality(lua_State *L) { olua_startinvoke(L); @@ -5712,7 +5894,7 @@ static int _cclua_MP3Encoder_getVBRQuality(lua_State *L) return num_ret; } -static int _cclua_MP3Encoder_getVersion(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_getVersion(lua_State *L) { olua_startinvoke(L); @@ -5729,7 +5911,7 @@ static int _cclua_MP3Encoder_getVersion(lua_State *L) return num_ret; } -static int _cclua_MP3Encoder_initParams(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_initParams(lua_State *L) { olua_startinvoke(L); @@ -5745,11 +5927,11 @@ static int _cclua_MP3Encoder_initParams(lua_State *L) return 0; } -static int _cclua_MP3Encoder_new(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_new(lua_State *L) { olua_startinvoke(L); - // MP3Encoder() + // cclua::MP3Encoder() cclua::MP3Encoder *ret = new cclua::MP3Encoder(); int num_ret = olua_push_object(L, ret, "cclua.MP3Encoder"); olua_postnew(L, ret); @@ -5759,7 +5941,7 @@ static int _cclua_MP3Encoder_new(lua_State *L) return num_ret; } -static int _cclua_MP3Encoder_printConfig(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_printConfig(lua_State *L) { olua_startinvoke(L); @@ -5775,7 +5957,7 @@ static int _cclua_MP3Encoder_printConfig(lua_State *L) return 0; } -static int _cclua_MP3Encoder_printInternals(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_printInternals(lua_State *L) { olua_startinvoke(L); @@ -5791,7 +5973,7 @@ static int _cclua_MP3Encoder_printInternals(lua_State *L) return 0; } -static int _cclua_MP3Encoder_setATHlower(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_setATHlower(lua_State *L) { olua_startinvoke(L); @@ -5809,7 +5991,7 @@ static int _cclua_MP3Encoder_setATHlower(lua_State *L) return 0; } -static int _cclua_MP3Encoder_setATHonly(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_setATHonly(lua_State *L) { olua_startinvoke(L); @@ -5827,7 +6009,7 @@ static int _cclua_MP3Encoder_setATHonly(lua_State *L) return 0; } -static int _cclua_MP3Encoder_setATHshort(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_setATHshort(lua_State *L) { olua_startinvoke(L); @@ -5845,7 +6027,7 @@ static int _cclua_MP3Encoder_setATHshort(lua_State *L) return 0; } -static int _cclua_MP3Encoder_setATHtype(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_setATHtype(lua_State *L) { olua_startinvoke(L); @@ -5863,7 +6045,7 @@ static int _cclua_MP3Encoder_setATHtype(lua_State *L) return 0; } -static int _cclua_MP3Encoder_setAllowDiffShort(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_setAllowDiffShort(lua_State *L) { olua_startinvoke(L); @@ -5881,7 +6063,7 @@ static int _cclua_MP3Encoder_setAllowDiffShort(lua_State *L) return 0; } -static int _cclua_MP3Encoder_setAnalysis(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_setAnalysis(lua_State *L) { olua_startinvoke(L); @@ -5899,7 +6081,7 @@ static int _cclua_MP3Encoder_setAnalysis(lua_State *L) return 0; } -static int _cclua_MP3Encoder_setAsmOptimizations(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_setAsmOptimizations(lua_State *L) { olua_startinvoke(L); @@ -5919,7 +6101,7 @@ static int _cclua_MP3Encoder_setAsmOptimizations(lua_State *L) return 0; } -static int _cclua_MP3Encoder_setAthaaSensitivity(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_setAthaaSensitivity(lua_State *L) { olua_startinvoke(L); @@ -5937,7 +6119,7 @@ static int _cclua_MP3Encoder_setAthaaSensitivity(lua_State *L) return 0; } -static int _cclua_MP3Encoder_setAthaaType(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_setAthaaType(lua_State *L) { olua_startinvoke(L); @@ -5955,7 +6137,7 @@ static int _cclua_MP3Encoder_setAthaaType(lua_State *L) return 0; } -static int _cclua_MP3Encoder_setBWriteVbrTag(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_setBWriteVbrTag(lua_State *L) { olua_startinvoke(L); @@ -5973,7 +6155,7 @@ static int _cclua_MP3Encoder_setBWriteVbrTag(lua_State *L) return 0; } -static int _cclua_MP3Encoder_setBrate(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_setBrate(lua_State *L) { olua_startinvoke(L); @@ -5991,7 +6173,7 @@ static int _cclua_MP3Encoder_setBrate(lua_State *L) return 0; } -static int _cclua_MP3Encoder_setCompressionRatio(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_setCompressionRatio(lua_State *L) { olua_startinvoke(L); @@ -6009,7 +6191,7 @@ static int _cclua_MP3Encoder_setCompressionRatio(lua_State *L) return 0; } -static int _cclua_MP3Encoder_setCopyright(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_setCopyright(lua_State *L) { olua_startinvoke(L); @@ -6027,7 +6209,7 @@ static int _cclua_MP3Encoder_setCopyright(lua_State *L) return 0; } -static int _cclua_MP3Encoder_setDecodeOnTheFly(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_setDecodeOnTheFly(lua_State *L) { olua_startinvoke(L); @@ -6045,7 +6227,7 @@ static int _cclua_MP3Encoder_setDecodeOnTheFly(lua_State *L) return 0; } -static int _cclua_MP3Encoder_setDecodeOnly(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_setDecodeOnly(lua_State *L) { olua_startinvoke(L); @@ -6063,7 +6245,7 @@ static int _cclua_MP3Encoder_setDecodeOnly(lua_State *L) return 0; } -static int _cclua_MP3Encoder_setDisableReservoir(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_setDisableReservoir(lua_State *L) { olua_startinvoke(L); @@ -6081,7 +6263,7 @@ static int _cclua_MP3Encoder_setDisableReservoir(lua_State *L) return 0; } -static int _cclua_MP3Encoder_setEmphasis(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_setEmphasis(lua_State *L) { olua_startinvoke(L); @@ -6099,7 +6281,7 @@ static int _cclua_MP3Encoder_setEmphasis(lua_State *L) return 0; } -static int _cclua_MP3Encoder_setErrorProtection(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_setErrorProtection(lua_State *L) { olua_startinvoke(L); @@ -6117,7 +6299,7 @@ static int _cclua_MP3Encoder_setErrorProtection(lua_State *L) return 0; } -static int _cclua_MP3Encoder_setExpNspsytune(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_setExpNspsytune(lua_State *L) { olua_startinvoke(L); @@ -6135,7 +6317,7 @@ static int _cclua_MP3Encoder_setExpNspsytune(lua_State *L) return 0; } -static int _cclua_MP3Encoder_setExperimentalX(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_setExperimentalX(lua_State *L) { olua_startinvoke(L); @@ -6153,7 +6335,7 @@ static int _cclua_MP3Encoder_setExperimentalX(lua_State *L) return 0; } -static int _cclua_MP3Encoder_setExperimentalY(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_setExperimentalY(lua_State *L) { olua_startinvoke(L); @@ -6171,7 +6353,7 @@ static int _cclua_MP3Encoder_setExperimentalY(lua_State *L) return 0; } -static int _cclua_MP3Encoder_setExperimentalZ(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_setExperimentalZ(lua_State *L) { olua_startinvoke(L); @@ -6189,7 +6371,7 @@ static int _cclua_MP3Encoder_setExperimentalZ(lua_State *L) return 0; } -static int _cclua_MP3Encoder_setExtension(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_setExtension(lua_State *L) { olua_startinvoke(L); @@ -6207,7 +6389,7 @@ static int _cclua_MP3Encoder_setExtension(lua_State *L) return 0; } -static int _cclua_MP3Encoder_setFindReplayGain(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_setFindReplayGain(lua_State *L) { olua_startinvoke(L); @@ -6225,7 +6407,7 @@ static int _cclua_MP3Encoder_setFindReplayGain(lua_State *L) return 0; } -static int _cclua_MP3Encoder_setForceMs(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_setForceMs(lua_State *L) { olua_startinvoke(L); @@ -6243,7 +6425,7 @@ static int _cclua_MP3Encoder_setForceMs(lua_State *L) return 0; } -static int _cclua_MP3Encoder_setForceShortBlocks(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_setForceShortBlocks(lua_State *L) { olua_startinvoke(L); @@ -6261,7 +6443,7 @@ static int _cclua_MP3Encoder_setForceShortBlocks(lua_State *L) return 0; } -static int _cclua_MP3Encoder_setFreeFormat(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_setFreeFormat(lua_State *L) { olua_startinvoke(L); @@ -6279,7 +6461,7 @@ static int _cclua_MP3Encoder_setFreeFormat(lua_State *L) return 0; } -static int _cclua_MP3Encoder_setHighpassfreq(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_setHighpassfreq(lua_State *L) { olua_startinvoke(L); @@ -6297,7 +6479,7 @@ static int _cclua_MP3Encoder_setHighpassfreq(lua_State *L) return 0; } -static int _cclua_MP3Encoder_setHighpasswidth(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_setHighpasswidth(lua_State *L) { olua_startinvoke(L); @@ -6315,7 +6497,7 @@ static int _cclua_MP3Encoder_setHighpasswidth(lua_State *L) return 0; } -static int _cclua_MP3Encoder_setInSamplerate(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_setInSamplerate(lua_State *L) { olua_startinvoke(L); @@ -6333,7 +6515,7 @@ static int _cclua_MP3Encoder_setInSamplerate(lua_State *L) return 0; } -static int _cclua_MP3Encoder_setInterChRatio(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_setInterChRatio(lua_State *L) { olua_startinvoke(L); @@ -6351,7 +6533,7 @@ static int _cclua_MP3Encoder_setInterChRatio(lua_State *L) return 0; } -static int _cclua_MP3Encoder_setLowpassfreq(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_setLowpassfreq(lua_State *L) { olua_startinvoke(L); @@ -6369,7 +6551,7 @@ static int _cclua_MP3Encoder_setLowpassfreq(lua_State *L) return 0; } -static int _cclua_MP3Encoder_setLowpasswidth(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_setLowpasswidth(lua_State *L) { olua_startinvoke(L); @@ -6387,7 +6569,7 @@ static int _cclua_MP3Encoder_setLowpasswidth(lua_State *L) return 0; } -static int _cclua_MP3Encoder_setMode(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_setMode(lua_State *L) { olua_startinvoke(L); @@ -6405,7 +6587,7 @@ static int _cclua_MP3Encoder_setMode(lua_State *L) return 0; } -static int _cclua_MP3Encoder_setMsfix(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_setMsfix(lua_State *L) { olua_startinvoke(L); @@ -6423,7 +6605,7 @@ static int _cclua_MP3Encoder_setMsfix(lua_State *L) return 0; } -static int _cclua_MP3Encoder_setNoATH(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_setNoATH(lua_State *L) { olua_startinvoke(L); @@ -6441,7 +6623,7 @@ static int _cclua_MP3Encoder_setNoATH(lua_State *L) return 0; } -static int _cclua_MP3Encoder_setNoShortBlocks(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_setNoShortBlocks(lua_State *L) { olua_startinvoke(L); @@ -6459,7 +6641,7 @@ static int _cclua_MP3Encoder_setNoShortBlocks(lua_State *L) return 0; } -static int _cclua_MP3Encoder_setNogapCurrentindex(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_setNogapCurrentindex(lua_State *L) { olua_startinvoke(L); @@ -6477,7 +6659,7 @@ static int _cclua_MP3Encoder_setNogapCurrentindex(lua_State *L) return 0; } -static int _cclua_MP3Encoder_setNogapTotal(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_setNogapTotal(lua_State *L) { olua_startinvoke(L); @@ -6495,7 +6677,7 @@ static int _cclua_MP3Encoder_setNogapTotal(lua_State *L) return 0; } -static int _cclua_MP3Encoder_setNumChannels(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_setNumChannels(lua_State *L) { olua_startinvoke(L); @@ -6513,7 +6695,7 @@ static int _cclua_MP3Encoder_setNumChannels(lua_State *L) return 0; } -static int _cclua_MP3Encoder_setNumSamples(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_setNumSamples(lua_State *L) { olua_startinvoke(L); @@ -6531,7 +6713,7 @@ static int _cclua_MP3Encoder_setNumSamples(lua_State *L) return 0; } -static int _cclua_MP3Encoder_setOriginal(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_setOriginal(lua_State *L) { olua_startinvoke(L); @@ -6549,7 +6731,7 @@ static int _cclua_MP3Encoder_setOriginal(lua_State *L) return 0; } -static int _cclua_MP3Encoder_setOutSamplerate(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_setOutSamplerate(lua_State *L) { olua_startinvoke(L); @@ -6567,7 +6749,7 @@ static int _cclua_MP3Encoder_setOutSamplerate(lua_State *L) return 0; } -static int _cclua_MP3Encoder_setPreset(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_setPreset(lua_State *L) { olua_startinvoke(L); @@ -6585,7 +6767,7 @@ static int _cclua_MP3Encoder_setPreset(lua_State *L) return 0; } -static int _cclua_MP3Encoder_setQuality(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_setQuality(lua_State *L) { olua_startinvoke(L); @@ -6603,7 +6785,7 @@ static int _cclua_MP3Encoder_setQuality(lua_State *L) return 0; } -static int _cclua_MP3Encoder_setQuantComp(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_setQuantComp(lua_State *L) { olua_startinvoke(L); @@ -6621,7 +6803,7 @@ static int _cclua_MP3Encoder_setQuantComp(lua_State *L) return 0; } -static int _cclua_MP3Encoder_setQuantCompShort(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_setQuantCompShort(lua_State *L) { olua_startinvoke(L); @@ -6639,7 +6821,7 @@ static int _cclua_MP3Encoder_setQuantCompShort(lua_State *L) return 0; } -static int _cclua_MP3Encoder_setScale(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_setScale(lua_State *L) { olua_startinvoke(L); @@ -6657,7 +6839,7 @@ static int _cclua_MP3Encoder_setScale(lua_State *L) return 0; } -static int _cclua_MP3Encoder_setScaleLeft(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_setScaleLeft(lua_State *L) { olua_startinvoke(L); @@ -6675,7 +6857,7 @@ static int _cclua_MP3Encoder_setScaleLeft(lua_State *L) return 0; } -static int _cclua_MP3Encoder_setScaleRight(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_setScaleRight(lua_State *L) { olua_startinvoke(L); @@ -6693,7 +6875,7 @@ static int _cclua_MP3Encoder_setScaleRight(lua_State *L) return 0; } -static int _cclua_MP3Encoder_setStrictISO(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_setStrictISO(lua_State *L) { olua_startinvoke(L); @@ -6711,7 +6893,7 @@ static int _cclua_MP3Encoder_setStrictISO(lua_State *L) return 0; } -static int _cclua_MP3Encoder_setUseTemporal(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_setUseTemporal(lua_State *L) { olua_startinvoke(L); @@ -6729,7 +6911,7 @@ static int _cclua_MP3Encoder_setUseTemporal(lua_State *L) return 0; } -static int _cclua_MP3Encoder_setVBR(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_setVBR(lua_State *L) { olua_startinvoke(L); @@ -6747,7 +6929,7 @@ static int _cclua_MP3Encoder_setVBR(lua_State *L) return 0; } -static int _cclua_MP3Encoder_setVBRHardMin(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_setVBRHardMin(lua_State *L) { olua_startinvoke(L); @@ -6765,7 +6947,7 @@ static int _cclua_MP3Encoder_setVBRHardMin(lua_State *L) return 0; } -static int _cclua_MP3Encoder_setVBRMaxBitrateKbps(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_setVBRMaxBitrateKbps(lua_State *L) { olua_startinvoke(L); @@ -6783,7 +6965,7 @@ static int _cclua_MP3Encoder_setVBRMaxBitrateKbps(lua_State *L) return 0; } -static int _cclua_MP3Encoder_setVBRMeanBitrateKbps(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_setVBRMeanBitrateKbps(lua_State *L) { olua_startinvoke(L); @@ -6801,7 +6983,7 @@ static int _cclua_MP3Encoder_setVBRMeanBitrateKbps(lua_State *L) return 0; } -static int _cclua_MP3Encoder_setVBRMinBitrateKbps(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_setVBRMinBitrateKbps(lua_State *L) { olua_startinvoke(L); @@ -6819,7 +7001,7 @@ static int _cclua_MP3Encoder_setVBRMinBitrateKbps(lua_State *L) return 0; } -static int _cclua_MP3Encoder_setVBRQ(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_setVBRQ(lua_State *L) { olua_startinvoke(L); @@ -6837,7 +7019,7 @@ static int _cclua_MP3Encoder_setVBRQ(lua_State *L) return 0; } -static int _cclua_MP3Encoder_setVBRQuality(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_setVBRQuality(lua_State *L) { olua_startinvoke(L); @@ -6855,7 +7037,7 @@ static int _cclua_MP3Encoder_setVBRQuality(lua_State *L) return 0; } -static int _cclua_MP3Encoder_start(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_start(lua_State *L) { olua_startinvoke(L); @@ -6875,7 +7057,7 @@ static int _cclua_MP3Encoder_start(lua_State *L) return 0; } -static int _cclua_MP3Encoder_stop(lua_State *L) +static int _olua_fun_cclua_MP3Encoder_stop(lua_State *L) { olua_startinvoke(L); @@ -6891,235 +7073,244 @@ static int _cclua_MP3Encoder_stop(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cclua_MP3Encoder(lua_State *L) +static int _olua_cls_cclua_MP3Encoder(lua_State *L) { oluacls_class(L, "cclua.MP3Encoder"); - oluacls_func(L, "getATHlower", _cclua_MP3Encoder_getATHlower); - oluacls_func(L, "getATHonly", _cclua_MP3Encoder_getATHonly); - oluacls_func(L, "getATHshort", _cclua_MP3Encoder_getATHshort); - oluacls_func(L, "getATHtype", _cclua_MP3Encoder_getATHtype); - oluacls_func(L, "getAllowDiffShort", _cclua_MP3Encoder_getAllowDiffShort); - oluacls_func(L, "getAnalysis", _cclua_MP3Encoder_getAnalysis); - oluacls_func(L, "getAthaaSensitivity", _cclua_MP3Encoder_getAthaaSensitivity); - oluacls_func(L, "getAthaaType", _cclua_MP3Encoder_getAthaaType); - oluacls_func(L, "getAudiophileGain", _cclua_MP3Encoder_getAudiophileGain); - oluacls_func(L, "getBWriteVbrTag", _cclua_MP3Encoder_getBWriteVbrTag); - oluacls_func(L, "getBrate", _cclua_MP3Encoder_getBrate); - oluacls_func(L, "getCompressionRatio", _cclua_MP3Encoder_getCompressionRatio); - oluacls_func(L, "getCopyright", _cclua_MP3Encoder_getCopyright); - oluacls_func(L, "getDecodeOnTheFly", _cclua_MP3Encoder_getDecodeOnTheFly); - oluacls_func(L, "getDecodeOnly", _cclua_MP3Encoder_getDecodeOnly); - oluacls_func(L, "getDisableReservoir", _cclua_MP3Encoder_getDisableReservoir); - oluacls_func(L, "getEmphasis", _cclua_MP3Encoder_getEmphasis); - oluacls_func(L, "getEncoderDelay", _cclua_MP3Encoder_getEncoderDelay); - oluacls_func(L, "getEncoderPadding", _cclua_MP3Encoder_getEncoderPadding); - oluacls_func(L, "getErrorProtection", _cclua_MP3Encoder_getErrorProtection); - oluacls_func(L, "getExpNspsytune", _cclua_MP3Encoder_getExpNspsytune); - oluacls_func(L, "getExperimentalX", _cclua_MP3Encoder_getExperimentalX); - oluacls_func(L, "getExperimentalY", _cclua_MP3Encoder_getExperimentalY); - oluacls_func(L, "getExperimentalZ", _cclua_MP3Encoder_getExperimentalZ); - oluacls_func(L, "getExtension", _cclua_MP3Encoder_getExtension); - oluacls_func(L, "getFindReplayGain", _cclua_MP3Encoder_getFindReplayGain); - oluacls_func(L, "getForceMs", _cclua_MP3Encoder_getForceMs); - oluacls_func(L, "getForceShortBlocks", _cclua_MP3Encoder_getForceShortBlocks); - oluacls_func(L, "getFrameNum", _cclua_MP3Encoder_getFrameNum); - oluacls_func(L, "getFramesize", _cclua_MP3Encoder_getFramesize); - oluacls_func(L, "getFreeFormat", _cclua_MP3Encoder_getFreeFormat); - oluacls_func(L, "getHighpassfreq", _cclua_MP3Encoder_getHighpassfreq); - oluacls_func(L, "getHighpasswidth", _cclua_MP3Encoder_getHighpasswidth); - oluacls_func(L, "getInSamplerate", _cclua_MP3Encoder_getInSamplerate); - oluacls_func(L, "getInterChRatio", _cclua_MP3Encoder_getInterChRatio); - oluacls_func(L, "getLameOsBitness", _cclua_MP3Encoder_getLameOsBitness); - oluacls_func(L, "getLameShortVersion", _cclua_MP3Encoder_getLameShortVersion); - oluacls_func(L, "getLameUrl", _cclua_MP3Encoder_getLameUrl); - oluacls_func(L, "getLameVersion", _cclua_MP3Encoder_getLameVersion); - oluacls_func(L, "getLameVeryShortVersion", _cclua_MP3Encoder_getLameVeryShortVersion); - oluacls_func(L, "getLowpassfreq", _cclua_MP3Encoder_getLowpassfreq); - oluacls_func(L, "getLowpasswidth", _cclua_MP3Encoder_getLowpasswidth); - oluacls_func(L, "getMfSamplesToEncode", _cclua_MP3Encoder_getMfSamplesToEncode); - oluacls_func(L, "getMode", _cclua_MP3Encoder_getMode); - oluacls_func(L, "getMsfix", _cclua_MP3Encoder_getMsfix); - oluacls_func(L, "getNoATH", _cclua_MP3Encoder_getNoATH); - oluacls_func(L, "getNoShortBlocks", _cclua_MP3Encoder_getNoShortBlocks); - oluacls_func(L, "getNoclipGainChange", _cclua_MP3Encoder_getNoclipGainChange); - oluacls_func(L, "getNoclipScale", _cclua_MP3Encoder_getNoclipScale); - oluacls_func(L, "getNogapCurrentindex", _cclua_MP3Encoder_getNogapCurrentindex); - oluacls_func(L, "getNogapTotal", _cclua_MP3Encoder_getNogapTotal); - oluacls_func(L, "getNumChannels", _cclua_MP3Encoder_getNumChannels); - oluacls_func(L, "getNumSamples", _cclua_MP3Encoder_getNumSamples); - oluacls_func(L, "getOriginal", _cclua_MP3Encoder_getOriginal); - oluacls_func(L, "getOutSamplerate", _cclua_MP3Encoder_getOutSamplerate); - oluacls_func(L, "getPeakSample", _cclua_MP3Encoder_getPeakSample); - oluacls_func(L, "getPsyVersion", _cclua_MP3Encoder_getPsyVersion); - oluacls_func(L, "getQuality", _cclua_MP3Encoder_getQuality); - oluacls_func(L, "getQuantComp", _cclua_MP3Encoder_getQuantComp); - oluacls_func(L, "getQuantCompShort", _cclua_MP3Encoder_getQuantCompShort); - oluacls_func(L, "getRadioGain", _cclua_MP3Encoder_getRadioGain); - oluacls_func(L, "getScale", _cclua_MP3Encoder_getScale); - oluacls_func(L, "getScaleLeft", _cclua_MP3Encoder_getScaleLeft); - oluacls_func(L, "getScaleRight", _cclua_MP3Encoder_getScaleRight); - oluacls_func(L, "getSizeMp3buffer", _cclua_MP3Encoder_getSizeMp3buffer); - oluacls_func(L, "getStrictISO", _cclua_MP3Encoder_getStrictISO); - oluacls_func(L, "getTotalframes", _cclua_MP3Encoder_getTotalframes); - oluacls_func(L, "getUseTemporal", _cclua_MP3Encoder_getUseTemporal); - oluacls_func(L, "getVBR", _cclua_MP3Encoder_getVBR); - oluacls_func(L, "getVBRHardMin", _cclua_MP3Encoder_getVBRHardMin); - oluacls_func(L, "getVBRMaxBitrateKbps", _cclua_MP3Encoder_getVBRMaxBitrateKbps); - oluacls_func(L, "getVBRMeanBitrateKbps", _cclua_MP3Encoder_getVBRMeanBitrateKbps); - oluacls_func(L, "getVBRMinBitrateKbps", _cclua_MP3Encoder_getVBRMinBitrateKbps); - oluacls_func(L, "getVBRQ", _cclua_MP3Encoder_getVBRQ); - oluacls_func(L, "getVBRQuality", _cclua_MP3Encoder_getVBRQuality); - oluacls_func(L, "getVersion", _cclua_MP3Encoder_getVersion); - oluacls_func(L, "initParams", _cclua_MP3Encoder_initParams); - oluacls_func(L, "new", _cclua_MP3Encoder_new); - oluacls_func(L, "printConfig", _cclua_MP3Encoder_printConfig); - oluacls_func(L, "printInternals", _cclua_MP3Encoder_printInternals); - oluacls_func(L, "setATHlower", _cclua_MP3Encoder_setATHlower); - oluacls_func(L, "setATHonly", _cclua_MP3Encoder_setATHonly); - oluacls_func(L, "setATHshort", _cclua_MP3Encoder_setATHshort); - oluacls_func(L, "setATHtype", _cclua_MP3Encoder_setATHtype); - oluacls_func(L, "setAllowDiffShort", _cclua_MP3Encoder_setAllowDiffShort); - oluacls_func(L, "setAnalysis", _cclua_MP3Encoder_setAnalysis); - oluacls_func(L, "setAsmOptimizations", _cclua_MP3Encoder_setAsmOptimizations); - oluacls_func(L, "setAthaaSensitivity", _cclua_MP3Encoder_setAthaaSensitivity); - oluacls_func(L, "setAthaaType", _cclua_MP3Encoder_setAthaaType); - oluacls_func(L, "setBWriteVbrTag", _cclua_MP3Encoder_setBWriteVbrTag); - oluacls_func(L, "setBrate", _cclua_MP3Encoder_setBrate); - oluacls_func(L, "setCompressionRatio", _cclua_MP3Encoder_setCompressionRatio); - oluacls_func(L, "setCopyright", _cclua_MP3Encoder_setCopyright); - oluacls_func(L, "setDecodeOnTheFly", _cclua_MP3Encoder_setDecodeOnTheFly); - oluacls_func(L, "setDecodeOnly", _cclua_MP3Encoder_setDecodeOnly); - oluacls_func(L, "setDisableReservoir", _cclua_MP3Encoder_setDisableReservoir); - oluacls_func(L, "setEmphasis", _cclua_MP3Encoder_setEmphasis); - oluacls_func(L, "setErrorProtection", _cclua_MP3Encoder_setErrorProtection); - oluacls_func(L, "setExpNspsytune", _cclua_MP3Encoder_setExpNspsytune); - oluacls_func(L, "setExperimentalX", _cclua_MP3Encoder_setExperimentalX); - oluacls_func(L, "setExperimentalY", _cclua_MP3Encoder_setExperimentalY); - oluacls_func(L, "setExperimentalZ", _cclua_MP3Encoder_setExperimentalZ); - oluacls_func(L, "setExtension", _cclua_MP3Encoder_setExtension); - oluacls_func(L, "setFindReplayGain", _cclua_MP3Encoder_setFindReplayGain); - oluacls_func(L, "setForceMs", _cclua_MP3Encoder_setForceMs); - oluacls_func(L, "setForceShortBlocks", _cclua_MP3Encoder_setForceShortBlocks); - oluacls_func(L, "setFreeFormat", _cclua_MP3Encoder_setFreeFormat); - oluacls_func(L, "setHighpassfreq", _cclua_MP3Encoder_setHighpassfreq); - oluacls_func(L, "setHighpasswidth", _cclua_MP3Encoder_setHighpasswidth); - oluacls_func(L, "setInSamplerate", _cclua_MP3Encoder_setInSamplerate); - oluacls_func(L, "setInterChRatio", _cclua_MP3Encoder_setInterChRatio); - oluacls_func(L, "setLowpassfreq", _cclua_MP3Encoder_setLowpassfreq); - oluacls_func(L, "setLowpasswidth", _cclua_MP3Encoder_setLowpasswidth); - oluacls_func(L, "setMode", _cclua_MP3Encoder_setMode); - oluacls_func(L, "setMsfix", _cclua_MP3Encoder_setMsfix); - oluacls_func(L, "setNoATH", _cclua_MP3Encoder_setNoATH); - oluacls_func(L, "setNoShortBlocks", _cclua_MP3Encoder_setNoShortBlocks); - oluacls_func(L, "setNogapCurrentindex", _cclua_MP3Encoder_setNogapCurrentindex); - oluacls_func(L, "setNogapTotal", _cclua_MP3Encoder_setNogapTotal); - oluacls_func(L, "setNumChannels", _cclua_MP3Encoder_setNumChannels); - oluacls_func(L, "setNumSamples", _cclua_MP3Encoder_setNumSamples); - oluacls_func(L, "setOriginal", _cclua_MP3Encoder_setOriginal); - oluacls_func(L, "setOutSamplerate", _cclua_MP3Encoder_setOutSamplerate); - oluacls_func(L, "setPreset", _cclua_MP3Encoder_setPreset); - oluacls_func(L, "setQuality", _cclua_MP3Encoder_setQuality); - oluacls_func(L, "setQuantComp", _cclua_MP3Encoder_setQuantComp); - oluacls_func(L, "setQuantCompShort", _cclua_MP3Encoder_setQuantCompShort); - oluacls_func(L, "setScale", _cclua_MP3Encoder_setScale); - oluacls_func(L, "setScaleLeft", _cclua_MP3Encoder_setScaleLeft); - oluacls_func(L, "setScaleRight", _cclua_MP3Encoder_setScaleRight); - oluacls_func(L, "setStrictISO", _cclua_MP3Encoder_setStrictISO); - oluacls_func(L, "setUseTemporal", _cclua_MP3Encoder_setUseTemporal); - oluacls_func(L, "setVBR", _cclua_MP3Encoder_setVBR); - oluacls_func(L, "setVBRHardMin", _cclua_MP3Encoder_setVBRHardMin); - oluacls_func(L, "setVBRMaxBitrateKbps", _cclua_MP3Encoder_setVBRMaxBitrateKbps); - oluacls_func(L, "setVBRMeanBitrateKbps", _cclua_MP3Encoder_setVBRMeanBitrateKbps); - oluacls_func(L, "setVBRMinBitrateKbps", _cclua_MP3Encoder_setVBRMinBitrateKbps); - oluacls_func(L, "setVBRQ", _cclua_MP3Encoder_setVBRQ); - oluacls_func(L, "setVBRQuality", _cclua_MP3Encoder_setVBRQuality); - oluacls_func(L, "start", _cclua_MP3Encoder_start); - oluacls_func(L, "stop", _cclua_MP3Encoder_stop); - oluacls_prop(L, "allowDiffShort", _cclua_MP3Encoder_getAllowDiffShort, _cclua_MP3Encoder_setAllowDiffShort); - oluacls_prop(L, "analysis", _cclua_MP3Encoder_getAnalysis, _cclua_MP3Encoder_setAnalysis); - oluacls_prop(L, "atHlower", _cclua_MP3Encoder_getATHlower, _cclua_MP3Encoder_setATHlower); - oluacls_prop(L, "atHonly", _cclua_MP3Encoder_getATHonly, _cclua_MP3Encoder_setATHonly); - oluacls_prop(L, "atHshort", _cclua_MP3Encoder_getATHshort, _cclua_MP3Encoder_setATHshort); - oluacls_prop(L, "atHtype", _cclua_MP3Encoder_getATHtype, _cclua_MP3Encoder_setATHtype); - oluacls_prop(L, "athaaSensitivity", _cclua_MP3Encoder_getAthaaSensitivity, _cclua_MP3Encoder_setAthaaSensitivity); - oluacls_prop(L, "athaaType", _cclua_MP3Encoder_getAthaaType, _cclua_MP3Encoder_setAthaaType); - oluacls_prop(L, "audiophileGain", _cclua_MP3Encoder_getAudiophileGain, nullptr); - oluacls_prop(L, "bWriteVbrTag", _cclua_MP3Encoder_getBWriteVbrTag, _cclua_MP3Encoder_setBWriteVbrTag); - oluacls_prop(L, "brate", _cclua_MP3Encoder_getBrate, _cclua_MP3Encoder_setBrate); - oluacls_prop(L, "compressionRatio", _cclua_MP3Encoder_getCompressionRatio, _cclua_MP3Encoder_setCompressionRatio); - oluacls_prop(L, "copyright", _cclua_MP3Encoder_getCopyright, _cclua_MP3Encoder_setCopyright); - oluacls_prop(L, "decodeOnTheFly", _cclua_MP3Encoder_getDecodeOnTheFly, _cclua_MP3Encoder_setDecodeOnTheFly); - oluacls_prop(L, "decodeOnly", _cclua_MP3Encoder_getDecodeOnly, _cclua_MP3Encoder_setDecodeOnly); - oluacls_prop(L, "disableReservoir", _cclua_MP3Encoder_getDisableReservoir, _cclua_MP3Encoder_setDisableReservoir); - oluacls_prop(L, "emphasis", _cclua_MP3Encoder_getEmphasis, _cclua_MP3Encoder_setEmphasis); - oluacls_prop(L, "encoderDelay", _cclua_MP3Encoder_getEncoderDelay, nullptr); - oluacls_prop(L, "encoderPadding", _cclua_MP3Encoder_getEncoderPadding, nullptr); - oluacls_prop(L, "errorProtection", _cclua_MP3Encoder_getErrorProtection, _cclua_MP3Encoder_setErrorProtection); - oluacls_prop(L, "expNspsytune", _cclua_MP3Encoder_getExpNspsytune, _cclua_MP3Encoder_setExpNspsytune); - oluacls_prop(L, "experimentalX", _cclua_MP3Encoder_getExperimentalX, _cclua_MP3Encoder_setExperimentalX); - oluacls_prop(L, "experimentalY", _cclua_MP3Encoder_getExperimentalY, _cclua_MP3Encoder_setExperimentalY); - oluacls_prop(L, "experimentalZ", _cclua_MP3Encoder_getExperimentalZ, _cclua_MP3Encoder_setExperimentalZ); - oluacls_prop(L, "extension", _cclua_MP3Encoder_getExtension, _cclua_MP3Encoder_setExtension); - oluacls_prop(L, "findReplayGain", _cclua_MP3Encoder_getFindReplayGain, _cclua_MP3Encoder_setFindReplayGain); - oluacls_prop(L, "forceMs", _cclua_MP3Encoder_getForceMs, _cclua_MP3Encoder_setForceMs); - oluacls_prop(L, "forceShortBlocks", _cclua_MP3Encoder_getForceShortBlocks, _cclua_MP3Encoder_setForceShortBlocks); - oluacls_prop(L, "frameNum", _cclua_MP3Encoder_getFrameNum, nullptr); - oluacls_prop(L, "framesize", _cclua_MP3Encoder_getFramesize, nullptr); - oluacls_prop(L, "freeFormat", _cclua_MP3Encoder_getFreeFormat, _cclua_MP3Encoder_setFreeFormat); - oluacls_prop(L, "highpassfreq", _cclua_MP3Encoder_getHighpassfreq, _cclua_MP3Encoder_setHighpassfreq); - oluacls_prop(L, "highpasswidth", _cclua_MP3Encoder_getHighpasswidth, _cclua_MP3Encoder_setHighpasswidth); - oluacls_prop(L, "inSamplerate", _cclua_MP3Encoder_getInSamplerate, _cclua_MP3Encoder_setInSamplerate); - oluacls_prop(L, "interChRatio", _cclua_MP3Encoder_getInterChRatio, _cclua_MP3Encoder_setInterChRatio); - oluacls_prop(L, "lameOsBitness", _cclua_MP3Encoder_getLameOsBitness, nullptr); - oluacls_prop(L, "lameShortVersion", _cclua_MP3Encoder_getLameShortVersion, nullptr); - oluacls_prop(L, "lameUrl", _cclua_MP3Encoder_getLameUrl, nullptr); - oluacls_prop(L, "lameVersion", _cclua_MP3Encoder_getLameVersion, nullptr); - oluacls_prop(L, "lameVeryShortVersion", _cclua_MP3Encoder_getLameVeryShortVersion, nullptr); - oluacls_prop(L, "lowpassfreq", _cclua_MP3Encoder_getLowpassfreq, _cclua_MP3Encoder_setLowpassfreq); - oluacls_prop(L, "lowpasswidth", _cclua_MP3Encoder_getLowpasswidth, _cclua_MP3Encoder_setLowpasswidth); - oluacls_prop(L, "mfSamplesToEncode", _cclua_MP3Encoder_getMfSamplesToEncode, nullptr); - oluacls_prop(L, "mode", _cclua_MP3Encoder_getMode, _cclua_MP3Encoder_setMode); - oluacls_prop(L, "msfix", _cclua_MP3Encoder_getMsfix, _cclua_MP3Encoder_setMsfix); - oluacls_prop(L, "noATH", _cclua_MP3Encoder_getNoATH, _cclua_MP3Encoder_setNoATH); - oluacls_prop(L, "noShortBlocks", _cclua_MP3Encoder_getNoShortBlocks, _cclua_MP3Encoder_setNoShortBlocks); - oluacls_prop(L, "noclipGainChange", _cclua_MP3Encoder_getNoclipGainChange, nullptr); - oluacls_prop(L, "noclipScale", _cclua_MP3Encoder_getNoclipScale, nullptr); - oluacls_prop(L, "nogapCurrentindex", _cclua_MP3Encoder_getNogapCurrentindex, _cclua_MP3Encoder_setNogapCurrentindex); - oluacls_prop(L, "nogapTotal", _cclua_MP3Encoder_getNogapTotal, _cclua_MP3Encoder_setNogapTotal); - oluacls_prop(L, "numChannels", _cclua_MP3Encoder_getNumChannels, _cclua_MP3Encoder_setNumChannels); - oluacls_prop(L, "numSamples", _cclua_MP3Encoder_getNumSamples, _cclua_MP3Encoder_setNumSamples); - oluacls_prop(L, "original", _cclua_MP3Encoder_getOriginal, _cclua_MP3Encoder_setOriginal); - oluacls_prop(L, "outSamplerate", _cclua_MP3Encoder_getOutSamplerate, _cclua_MP3Encoder_setOutSamplerate); - oluacls_prop(L, "peakSample", _cclua_MP3Encoder_getPeakSample, nullptr); - oluacls_prop(L, "psyVersion", _cclua_MP3Encoder_getPsyVersion, nullptr); - oluacls_prop(L, "quality", _cclua_MP3Encoder_getQuality, _cclua_MP3Encoder_setQuality); - oluacls_prop(L, "quantComp", _cclua_MP3Encoder_getQuantComp, _cclua_MP3Encoder_setQuantComp); - oluacls_prop(L, "quantCompShort", _cclua_MP3Encoder_getQuantCompShort, _cclua_MP3Encoder_setQuantCompShort); - oluacls_prop(L, "radioGain", _cclua_MP3Encoder_getRadioGain, nullptr); - oluacls_prop(L, "scale", _cclua_MP3Encoder_getScale, _cclua_MP3Encoder_setScale); - oluacls_prop(L, "scaleLeft", _cclua_MP3Encoder_getScaleLeft, _cclua_MP3Encoder_setScaleLeft); - oluacls_prop(L, "scaleRight", _cclua_MP3Encoder_getScaleRight, _cclua_MP3Encoder_setScaleRight); - oluacls_prop(L, "sizeMp3buffer", _cclua_MP3Encoder_getSizeMp3buffer, nullptr); - oluacls_prop(L, "strictISO", _cclua_MP3Encoder_getStrictISO, _cclua_MP3Encoder_setStrictISO); - oluacls_prop(L, "totalframes", _cclua_MP3Encoder_getTotalframes, nullptr); - oluacls_prop(L, "useTemporal", _cclua_MP3Encoder_getUseTemporal, _cclua_MP3Encoder_setUseTemporal); - oluacls_prop(L, "vbr", _cclua_MP3Encoder_getVBR, _cclua_MP3Encoder_setVBR); - oluacls_prop(L, "vbrHardMin", _cclua_MP3Encoder_getVBRHardMin, _cclua_MP3Encoder_setVBRHardMin); - oluacls_prop(L, "vbrMaxBitrateKbps", _cclua_MP3Encoder_getVBRMaxBitrateKbps, _cclua_MP3Encoder_setVBRMaxBitrateKbps); - oluacls_prop(L, "vbrMeanBitrateKbps", _cclua_MP3Encoder_getVBRMeanBitrateKbps, _cclua_MP3Encoder_setVBRMeanBitrateKbps); - oluacls_prop(L, "vbrMinBitrateKbps", _cclua_MP3Encoder_getVBRMinBitrateKbps, _cclua_MP3Encoder_setVBRMinBitrateKbps); - oluacls_prop(L, "vbrQuality", _cclua_MP3Encoder_getVBRQuality, _cclua_MP3Encoder_setVBRQuality); - oluacls_prop(L, "vbrq", _cclua_MP3Encoder_getVBRQ, _cclua_MP3Encoder_setVBRQ); - oluacls_prop(L, "version", _cclua_MP3Encoder_getVersion, nullptr); + oluacls_func(L, "getATHlower", _olua_fun_cclua_MP3Encoder_getATHlower); + oluacls_func(L, "getATHonly", _olua_fun_cclua_MP3Encoder_getATHonly); + oluacls_func(L, "getATHshort", _olua_fun_cclua_MP3Encoder_getATHshort); + oluacls_func(L, "getATHtype", _olua_fun_cclua_MP3Encoder_getATHtype); + oluacls_func(L, "getAllowDiffShort", _olua_fun_cclua_MP3Encoder_getAllowDiffShort); + oluacls_func(L, "getAnalysis", _olua_fun_cclua_MP3Encoder_getAnalysis); + oluacls_func(L, "getAthaaSensitivity", _olua_fun_cclua_MP3Encoder_getAthaaSensitivity); + oluacls_func(L, "getAthaaType", _olua_fun_cclua_MP3Encoder_getAthaaType); + oluacls_func(L, "getAudiophileGain", _olua_fun_cclua_MP3Encoder_getAudiophileGain); + oluacls_func(L, "getBWriteVbrTag", _olua_fun_cclua_MP3Encoder_getBWriteVbrTag); + oluacls_func(L, "getBrate", _olua_fun_cclua_MP3Encoder_getBrate); + oluacls_func(L, "getCompressionRatio", _olua_fun_cclua_MP3Encoder_getCompressionRatio); + oluacls_func(L, "getCopyright", _olua_fun_cclua_MP3Encoder_getCopyright); + oluacls_func(L, "getDecodeOnTheFly", _olua_fun_cclua_MP3Encoder_getDecodeOnTheFly); + oluacls_func(L, "getDecodeOnly", _olua_fun_cclua_MP3Encoder_getDecodeOnly); + oluacls_func(L, "getDisableReservoir", _olua_fun_cclua_MP3Encoder_getDisableReservoir); + oluacls_func(L, "getEmphasis", _olua_fun_cclua_MP3Encoder_getEmphasis); + oluacls_func(L, "getEncoderDelay", _olua_fun_cclua_MP3Encoder_getEncoderDelay); + oluacls_func(L, "getEncoderPadding", _olua_fun_cclua_MP3Encoder_getEncoderPadding); + oluacls_func(L, "getErrorProtection", _olua_fun_cclua_MP3Encoder_getErrorProtection); + oluacls_func(L, "getExpNspsytune", _olua_fun_cclua_MP3Encoder_getExpNspsytune); + oluacls_func(L, "getExperimentalX", _olua_fun_cclua_MP3Encoder_getExperimentalX); + oluacls_func(L, "getExperimentalY", _olua_fun_cclua_MP3Encoder_getExperimentalY); + oluacls_func(L, "getExperimentalZ", _olua_fun_cclua_MP3Encoder_getExperimentalZ); + oluacls_func(L, "getExtension", _olua_fun_cclua_MP3Encoder_getExtension); + oluacls_func(L, "getFindReplayGain", _olua_fun_cclua_MP3Encoder_getFindReplayGain); + oluacls_func(L, "getForceMs", _olua_fun_cclua_MP3Encoder_getForceMs); + oluacls_func(L, "getForceShortBlocks", _olua_fun_cclua_MP3Encoder_getForceShortBlocks); + oluacls_func(L, "getFrameNum", _olua_fun_cclua_MP3Encoder_getFrameNum); + oluacls_func(L, "getFramesize", _olua_fun_cclua_MP3Encoder_getFramesize); + oluacls_func(L, "getFreeFormat", _olua_fun_cclua_MP3Encoder_getFreeFormat); + oluacls_func(L, "getHighpassfreq", _olua_fun_cclua_MP3Encoder_getHighpassfreq); + oluacls_func(L, "getHighpasswidth", _olua_fun_cclua_MP3Encoder_getHighpasswidth); + oluacls_func(L, "getInSamplerate", _olua_fun_cclua_MP3Encoder_getInSamplerate); + oluacls_func(L, "getInterChRatio", _olua_fun_cclua_MP3Encoder_getInterChRatio); + oluacls_func(L, "getLameOsBitness", _olua_fun_cclua_MP3Encoder_getLameOsBitness); + oluacls_func(L, "getLameShortVersion", _olua_fun_cclua_MP3Encoder_getLameShortVersion); + oluacls_func(L, "getLameUrl", _olua_fun_cclua_MP3Encoder_getLameUrl); + oluacls_func(L, "getLameVersion", _olua_fun_cclua_MP3Encoder_getLameVersion); + oluacls_func(L, "getLameVeryShortVersion", _olua_fun_cclua_MP3Encoder_getLameVeryShortVersion); + oluacls_func(L, "getLowpassfreq", _olua_fun_cclua_MP3Encoder_getLowpassfreq); + oluacls_func(L, "getLowpasswidth", _olua_fun_cclua_MP3Encoder_getLowpasswidth); + oluacls_func(L, "getMfSamplesToEncode", _olua_fun_cclua_MP3Encoder_getMfSamplesToEncode); + oluacls_func(L, "getMode", _olua_fun_cclua_MP3Encoder_getMode); + oluacls_func(L, "getMsfix", _olua_fun_cclua_MP3Encoder_getMsfix); + oluacls_func(L, "getNoATH", _olua_fun_cclua_MP3Encoder_getNoATH); + oluacls_func(L, "getNoShortBlocks", _olua_fun_cclua_MP3Encoder_getNoShortBlocks); + oluacls_func(L, "getNoclipGainChange", _olua_fun_cclua_MP3Encoder_getNoclipGainChange); + oluacls_func(L, "getNoclipScale", _olua_fun_cclua_MP3Encoder_getNoclipScale); + oluacls_func(L, "getNogapCurrentindex", _olua_fun_cclua_MP3Encoder_getNogapCurrentindex); + oluacls_func(L, "getNogapTotal", _olua_fun_cclua_MP3Encoder_getNogapTotal); + oluacls_func(L, "getNumChannels", _olua_fun_cclua_MP3Encoder_getNumChannels); + oluacls_func(L, "getNumSamples", _olua_fun_cclua_MP3Encoder_getNumSamples); + oluacls_func(L, "getOriginal", _olua_fun_cclua_MP3Encoder_getOriginal); + oluacls_func(L, "getOutSamplerate", _olua_fun_cclua_MP3Encoder_getOutSamplerate); + oluacls_func(L, "getPeakSample", _olua_fun_cclua_MP3Encoder_getPeakSample); + oluacls_func(L, "getPsyVersion", _olua_fun_cclua_MP3Encoder_getPsyVersion); + oluacls_func(L, "getQuality", _olua_fun_cclua_MP3Encoder_getQuality); + oluacls_func(L, "getQuantComp", _olua_fun_cclua_MP3Encoder_getQuantComp); + oluacls_func(L, "getQuantCompShort", _olua_fun_cclua_MP3Encoder_getQuantCompShort); + oluacls_func(L, "getRadioGain", _olua_fun_cclua_MP3Encoder_getRadioGain); + oluacls_func(L, "getScale", _olua_fun_cclua_MP3Encoder_getScale); + oluacls_func(L, "getScaleLeft", _olua_fun_cclua_MP3Encoder_getScaleLeft); + oluacls_func(L, "getScaleRight", _olua_fun_cclua_MP3Encoder_getScaleRight); + oluacls_func(L, "getSizeMp3buffer", _olua_fun_cclua_MP3Encoder_getSizeMp3buffer); + oluacls_func(L, "getStrictISO", _olua_fun_cclua_MP3Encoder_getStrictISO); + oluacls_func(L, "getTotalframes", _olua_fun_cclua_MP3Encoder_getTotalframes); + oluacls_func(L, "getUseTemporal", _olua_fun_cclua_MP3Encoder_getUseTemporal); + oluacls_func(L, "getVBR", _olua_fun_cclua_MP3Encoder_getVBR); + oluacls_func(L, "getVBRHardMin", _olua_fun_cclua_MP3Encoder_getVBRHardMin); + oluacls_func(L, "getVBRMaxBitrateKbps", _olua_fun_cclua_MP3Encoder_getVBRMaxBitrateKbps); + oluacls_func(L, "getVBRMeanBitrateKbps", _olua_fun_cclua_MP3Encoder_getVBRMeanBitrateKbps); + oluacls_func(L, "getVBRMinBitrateKbps", _olua_fun_cclua_MP3Encoder_getVBRMinBitrateKbps); + oluacls_func(L, "getVBRQ", _olua_fun_cclua_MP3Encoder_getVBRQ); + oluacls_func(L, "getVBRQuality", _olua_fun_cclua_MP3Encoder_getVBRQuality); + oluacls_func(L, "getVersion", _olua_fun_cclua_MP3Encoder_getVersion); + oluacls_func(L, "initParams", _olua_fun_cclua_MP3Encoder_initParams); + oluacls_func(L, "new", _olua_fun_cclua_MP3Encoder_new); + oluacls_func(L, "printConfig", _olua_fun_cclua_MP3Encoder_printConfig); + oluacls_func(L, "printInternals", _olua_fun_cclua_MP3Encoder_printInternals); + oluacls_func(L, "setATHlower", _olua_fun_cclua_MP3Encoder_setATHlower); + oluacls_func(L, "setATHonly", _olua_fun_cclua_MP3Encoder_setATHonly); + oluacls_func(L, "setATHshort", _olua_fun_cclua_MP3Encoder_setATHshort); + oluacls_func(L, "setATHtype", _olua_fun_cclua_MP3Encoder_setATHtype); + oluacls_func(L, "setAllowDiffShort", _olua_fun_cclua_MP3Encoder_setAllowDiffShort); + oluacls_func(L, "setAnalysis", _olua_fun_cclua_MP3Encoder_setAnalysis); + oluacls_func(L, "setAsmOptimizations", _olua_fun_cclua_MP3Encoder_setAsmOptimizations); + oluacls_func(L, "setAthaaSensitivity", _olua_fun_cclua_MP3Encoder_setAthaaSensitivity); + oluacls_func(L, "setAthaaType", _olua_fun_cclua_MP3Encoder_setAthaaType); + oluacls_func(L, "setBWriteVbrTag", _olua_fun_cclua_MP3Encoder_setBWriteVbrTag); + oluacls_func(L, "setBrate", _olua_fun_cclua_MP3Encoder_setBrate); + oluacls_func(L, "setCompressionRatio", _olua_fun_cclua_MP3Encoder_setCompressionRatio); + oluacls_func(L, "setCopyright", _olua_fun_cclua_MP3Encoder_setCopyright); + oluacls_func(L, "setDecodeOnTheFly", _olua_fun_cclua_MP3Encoder_setDecodeOnTheFly); + oluacls_func(L, "setDecodeOnly", _olua_fun_cclua_MP3Encoder_setDecodeOnly); + oluacls_func(L, "setDisableReservoir", _olua_fun_cclua_MP3Encoder_setDisableReservoir); + oluacls_func(L, "setEmphasis", _olua_fun_cclua_MP3Encoder_setEmphasis); + oluacls_func(L, "setErrorProtection", _olua_fun_cclua_MP3Encoder_setErrorProtection); + oluacls_func(L, "setExpNspsytune", _olua_fun_cclua_MP3Encoder_setExpNspsytune); + oluacls_func(L, "setExperimentalX", _olua_fun_cclua_MP3Encoder_setExperimentalX); + oluacls_func(L, "setExperimentalY", _olua_fun_cclua_MP3Encoder_setExperimentalY); + oluacls_func(L, "setExperimentalZ", _olua_fun_cclua_MP3Encoder_setExperimentalZ); + oluacls_func(L, "setExtension", _olua_fun_cclua_MP3Encoder_setExtension); + oluacls_func(L, "setFindReplayGain", _olua_fun_cclua_MP3Encoder_setFindReplayGain); + oluacls_func(L, "setForceMs", _olua_fun_cclua_MP3Encoder_setForceMs); + oluacls_func(L, "setForceShortBlocks", _olua_fun_cclua_MP3Encoder_setForceShortBlocks); + oluacls_func(L, "setFreeFormat", _olua_fun_cclua_MP3Encoder_setFreeFormat); + oluacls_func(L, "setHighpassfreq", _olua_fun_cclua_MP3Encoder_setHighpassfreq); + oluacls_func(L, "setHighpasswidth", _olua_fun_cclua_MP3Encoder_setHighpasswidth); + oluacls_func(L, "setInSamplerate", _olua_fun_cclua_MP3Encoder_setInSamplerate); + oluacls_func(L, "setInterChRatio", _olua_fun_cclua_MP3Encoder_setInterChRatio); + oluacls_func(L, "setLowpassfreq", _olua_fun_cclua_MP3Encoder_setLowpassfreq); + oluacls_func(L, "setLowpasswidth", _olua_fun_cclua_MP3Encoder_setLowpasswidth); + oluacls_func(L, "setMode", _olua_fun_cclua_MP3Encoder_setMode); + oluacls_func(L, "setMsfix", _olua_fun_cclua_MP3Encoder_setMsfix); + oluacls_func(L, "setNoATH", _olua_fun_cclua_MP3Encoder_setNoATH); + oluacls_func(L, "setNoShortBlocks", _olua_fun_cclua_MP3Encoder_setNoShortBlocks); + oluacls_func(L, "setNogapCurrentindex", _olua_fun_cclua_MP3Encoder_setNogapCurrentindex); + oluacls_func(L, "setNogapTotal", _olua_fun_cclua_MP3Encoder_setNogapTotal); + oluacls_func(L, "setNumChannels", _olua_fun_cclua_MP3Encoder_setNumChannels); + oluacls_func(L, "setNumSamples", _olua_fun_cclua_MP3Encoder_setNumSamples); + oluacls_func(L, "setOriginal", _olua_fun_cclua_MP3Encoder_setOriginal); + oluacls_func(L, "setOutSamplerate", _olua_fun_cclua_MP3Encoder_setOutSamplerate); + oluacls_func(L, "setPreset", _olua_fun_cclua_MP3Encoder_setPreset); + oluacls_func(L, "setQuality", _olua_fun_cclua_MP3Encoder_setQuality); + oluacls_func(L, "setQuantComp", _olua_fun_cclua_MP3Encoder_setQuantComp); + oluacls_func(L, "setQuantCompShort", _olua_fun_cclua_MP3Encoder_setQuantCompShort); + oluacls_func(L, "setScale", _olua_fun_cclua_MP3Encoder_setScale); + oluacls_func(L, "setScaleLeft", _olua_fun_cclua_MP3Encoder_setScaleLeft); + oluacls_func(L, "setScaleRight", _olua_fun_cclua_MP3Encoder_setScaleRight); + oluacls_func(L, "setStrictISO", _olua_fun_cclua_MP3Encoder_setStrictISO); + oluacls_func(L, "setUseTemporal", _olua_fun_cclua_MP3Encoder_setUseTemporal); + oluacls_func(L, "setVBR", _olua_fun_cclua_MP3Encoder_setVBR); + oluacls_func(L, "setVBRHardMin", _olua_fun_cclua_MP3Encoder_setVBRHardMin); + oluacls_func(L, "setVBRMaxBitrateKbps", _olua_fun_cclua_MP3Encoder_setVBRMaxBitrateKbps); + oluacls_func(L, "setVBRMeanBitrateKbps", _olua_fun_cclua_MP3Encoder_setVBRMeanBitrateKbps); + oluacls_func(L, "setVBRMinBitrateKbps", _olua_fun_cclua_MP3Encoder_setVBRMinBitrateKbps); + oluacls_func(L, "setVBRQ", _olua_fun_cclua_MP3Encoder_setVBRQ); + oluacls_func(L, "setVBRQuality", _olua_fun_cclua_MP3Encoder_setVBRQuality); + oluacls_func(L, "start", _olua_fun_cclua_MP3Encoder_start); + oluacls_func(L, "stop", _olua_fun_cclua_MP3Encoder_stop); + oluacls_prop(L, "allowDiffShort", _olua_fun_cclua_MP3Encoder_getAllowDiffShort, _olua_fun_cclua_MP3Encoder_setAllowDiffShort); + oluacls_prop(L, "analysis", _olua_fun_cclua_MP3Encoder_getAnalysis, _olua_fun_cclua_MP3Encoder_setAnalysis); + oluacls_prop(L, "atHlower", _olua_fun_cclua_MP3Encoder_getATHlower, _olua_fun_cclua_MP3Encoder_setATHlower); + oluacls_prop(L, "atHonly", _olua_fun_cclua_MP3Encoder_getATHonly, _olua_fun_cclua_MP3Encoder_setATHonly); + oluacls_prop(L, "atHshort", _olua_fun_cclua_MP3Encoder_getATHshort, _olua_fun_cclua_MP3Encoder_setATHshort); + oluacls_prop(L, "atHtype", _olua_fun_cclua_MP3Encoder_getATHtype, _olua_fun_cclua_MP3Encoder_setATHtype); + oluacls_prop(L, "athaaSensitivity", _olua_fun_cclua_MP3Encoder_getAthaaSensitivity, _olua_fun_cclua_MP3Encoder_setAthaaSensitivity); + oluacls_prop(L, "athaaType", _olua_fun_cclua_MP3Encoder_getAthaaType, _olua_fun_cclua_MP3Encoder_setAthaaType); + oluacls_prop(L, "audiophileGain", _olua_fun_cclua_MP3Encoder_getAudiophileGain, nullptr); + oluacls_prop(L, "bWriteVbrTag", _olua_fun_cclua_MP3Encoder_getBWriteVbrTag, _olua_fun_cclua_MP3Encoder_setBWriteVbrTag); + oluacls_prop(L, "brate", _olua_fun_cclua_MP3Encoder_getBrate, _olua_fun_cclua_MP3Encoder_setBrate); + oluacls_prop(L, "compressionRatio", _olua_fun_cclua_MP3Encoder_getCompressionRatio, _olua_fun_cclua_MP3Encoder_setCompressionRatio); + oluacls_prop(L, "copyright", _olua_fun_cclua_MP3Encoder_getCopyright, _olua_fun_cclua_MP3Encoder_setCopyright); + oluacls_prop(L, "decodeOnTheFly", _olua_fun_cclua_MP3Encoder_getDecodeOnTheFly, _olua_fun_cclua_MP3Encoder_setDecodeOnTheFly); + oluacls_prop(L, "decodeOnly", _olua_fun_cclua_MP3Encoder_getDecodeOnly, _olua_fun_cclua_MP3Encoder_setDecodeOnly); + oluacls_prop(L, "disableReservoir", _olua_fun_cclua_MP3Encoder_getDisableReservoir, _olua_fun_cclua_MP3Encoder_setDisableReservoir); + oluacls_prop(L, "emphasis", _olua_fun_cclua_MP3Encoder_getEmphasis, _olua_fun_cclua_MP3Encoder_setEmphasis); + oluacls_prop(L, "encoderDelay", _olua_fun_cclua_MP3Encoder_getEncoderDelay, nullptr); + oluacls_prop(L, "encoderPadding", _olua_fun_cclua_MP3Encoder_getEncoderPadding, nullptr); + oluacls_prop(L, "errorProtection", _olua_fun_cclua_MP3Encoder_getErrorProtection, _olua_fun_cclua_MP3Encoder_setErrorProtection); + oluacls_prop(L, "expNspsytune", _olua_fun_cclua_MP3Encoder_getExpNspsytune, _olua_fun_cclua_MP3Encoder_setExpNspsytune); + oluacls_prop(L, "experimentalX", _olua_fun_cclua_MP3Encoder_getExperimentalX, _olua_fun_cclua_MP3Encoder_setExperimentalX); + oluacls_prop(L, "experimentalY", _olua_fun_cclua_MP3Encoder_getExperimentalY, _olua_fun_cclua_MP3Encoder_setExperimentalY); + oluacls_prop(L, "experimentalZ", _olua_fun_cclua_MP3Encoder_getExperimentalZ, _olua_fun_cclua_MP3Encoder_setExperimentalZ); + oluacls_prop(L, "extension", _olua_fun_cclua_MP3Encoder_getExtension, _olua_fun_cclua_MP3Encoder_setExtension); + oluacls_prop(L, "findReplayGain", _olua_fun_cclua_MP3Encoder_getFindReplayGain, _olua_fun_cclua_MP3Encoder_setFindReplayGain); + oluacls_prop(L, "forceMs", _olua_fun_cclua_MP3Encoder_getForceMs, _olua_fun_cclua_MP3Encoder_setForceMs); + oluacls_prop(L, "forceShortBlocks", _olua_fun_cclua_MP3Encoder_getForceShortBlocks, _olua_fun_cclua_MP3Encoder_setForceShortBlocks); + oluacls_prop(L, "frameNum", _olua_fun_cclua_MP3Encoder_getFrameNum, nullptr); + oluacls_prop(L, "framesize", _olua_fun_cclua_MP3Encoder_getFramesize, nullptr); + oluacls_prop(L, "freeFormat", _olua_fun_cclua_MP3Encoder_getFreeFormat, _olua_fun_cclua_MP3Encoder_setFreeFormat); + oluacls_prop(L, "highpassfreq", _olua_fun_cclua_MP3Encoder_getHighpassfreq, _olua_fun_cclua_MP3Encoder_setHighpassfreq); + oluacls_prop(L, "highpasswidth", _olua_fun_cclua_MP3Encoder_getHighpasswidth, _olua_fun_cclua_MP3Encoder_setHighpasswidth); + oluacls_prop(L, "inSamplerate", _olua_fun_cclua_MP3Encoder_getInSamplerate, _olua_fun_cclua_MP3Encoder_setInSamplerate); + oluacls_prop(L, "interChRatio", _olua_fun_cclua_MP3Encoder_getInterChRatio, _olua_fun_cclua_MP3Encoder_setInterChRatio); + oluacls_prop(L, "lameOsBitness", _olua_fun_cclua_MP3Encoder_getLameOsBitness, nullptr); + oluacls_prop(L, "lameShortVersion", _olua_fun_cclua_MP3Encoder_getLameShortVersion, nullptr); + oluacls_prop(L, "lameUrl", _olua_fun_cclua_MP3Encoder_getLameUrl, nullptr); + oluacls_prop(L, "lameVersion", _olua_fun_cclua_MP3Encoder_getLameVersion, nullptr); + oluacls_prop(L, "lameVeryShortVersion", _olua_fun_cclua_MP3Encoder_getLameVeryShortVersion, nullptr); + oluacls_prop(L, "lowpassfreq", _olua_fun_cclua_MP3Encoder_getLowpassfreq, _olua_fun_cclua_MP3Encoder_setLowpassfreq); + oluacls_prop(L, "lowpasswidth", _olua_fun_cclua_MP3Encoder_getLowpasswidth, _olua_fun_cclua_MP3Encoder_setLowpasswidth); + oluacls_prop(L, "mfSamplesToEncode", _olua_fun_cclua_MP3Encoder_getMfSamplesToEncode, nullptr); + oluacls_prop(L, "mode", _olua_fun_cclua_MP3Encoder_getMode, _olua_fun_cclua_MP3Encoder_setMode); + oluacls_prop(L, "msfix", _olua_fun_cclua_MP3Encoder_getMsfix, _olua_fun_cclua_MP3Encoder_setMsfix); + oluacls_prop(L, "noATH", _olua_fun_cclua_MP3Encoder_getNoATH, _olua_fun_cclua_MP3Encoder_setNoATH); + oluacls_prop(L, "noShortBlocks", _olua_fun_cclua_MP3Encoder_getNoShortBlocks, _olua_fun_cclua_MP3Encoder_setNoShortBlocks); + oluacls_prop(L, "noclipGainChange", _olua_fun_cclua_MP3Encoder_getNoclipGainChange, nullptr); + oluacls_prop(L, "noclipScale", _olua_fun_cclua_MP3Encoder_getNoclipScale, nullptr); + oluacls_prop(L, "nogapCurrentindex", _olua_fun_cclua_MP3Encoder_getNogapCurrentindex, _olua_fun_cclua_MP3Encoder_setNogapCurrentindex); + oluacls_prop(L, "nogapTotal", _olua_fun_cclua_MP3Encoder_getNogapTotal, _olua_fun_cclua_MP3Encoder_setNogapTotal); + oluacls_prop(L, "numChannels", _olua_fun_cclua_MP3Encoder_getNumChannels, _olua_fun_cclua_MP3Encoder_setNumChannels); + oluacls_prop(L, "numSamples", _olua_fun_cclua_MP3Encoder_getNumSamples, _olua_fun_cclua_MP3Encoder_setNumSamples); + oluacls_prop(L, "original", _olua_fun_cclua_MP3Encoder_getOriginal, _olua_fun_cclua_MP3Encoder_setOriginal); + oluacls_prop(L, "outSamplerate", _olua_fun_cclua_MP3Encoder_getOutSamplerate, _olua_fun_cclua_MP3Encoder_setOutSamplerate); + oluacls_prop(L, "peakSample", _olua_fun_cclua_MP3Encoder_getPeakSample, nullptr); + oluacls_prop(L, "psyVersion", _olua_fun_cclua_MP3Encoder_getPsyVersion, nullptr); + oluacls_prop(L, "quality", _olua_fun_cclua_MP3Encoder_getQuality, _olua_fun_cclua_MP3Encoder_setQuality); + oluacls_prop(L, "quantComp", _olua_fun_cclua_MP3Encoder_getQuantComp, _olua_fun_cclua_MP3Encoder_setQuantComp); + oluacls_prop(L, "quantCompShort", _olua_fun_cclua_MP3Encoder_getQuantCompShort, _olua_fun_cclua_MP3Encoder_setQuantCompShort); + oluacls_prop(L, "radioGain", _olua_fun_cclua_MP3Encoder_getRadioGain, nullptr); + oluacls_prop(L, "scale", _olua_fun_cclua_MP3Encoder_getScale, _olua_fun_cclua_MP3Encoder_setScale); + oluacls_prop(L, "scaleLeft", _olua_fun_cclua_MP3Encoder_getScaleLeft, _olua_fun_cclua_MP3Encoder_setScaleLeft); + oluacls_prop(L, "scaleRight", _olua_fun_cclua_MP3Encoder_getScaleRight, _olua_fun_cclua_MP3Encoder_setScaleRight); + oluacls_prop(L, "sizeMp3buffer", _olua_fun_cclua_MP3Encoder_getSizeMp3buffer, nullptr); + oluacls_prop(L, "strictISO", _olua_fun_cclua_MP3Encoder_getStrictISO, _olua_fun_cclua_MP3Encoder_setStrictISO); + oluacls_prop(L, "totalframes", _olua_fun_cclua_MP3Encoder_getTotalframes, nullptr); + oluacls_prop(L, "useTemporal", _olua_fun_cclua_MP3Encoder_getUseTemporal, _olua_fun_cclua_MP3Encoder_setUseTemporal); + oluacls_prop(L, "vbr", _olua_fun_cclua_MP3Encoder_getVBR, _olua_fun_cclua_MP3Encoder_setVBR); + oluacls_prop(L, "vbrHardMin", _olua_fun_cclua_MP3Encoder_getVBRHardMin, _olua_fun_cclua_MP3Encoder_setVBRHardMin); + oluacls_prop(L, "vbrMaxBitrateKbps", _olua_fun_cclua_MP3Encoder_getVBRMaxBitrateKbps, _olua_fun_cclua_MP3Encoder_setVBRMaxBitrateKbps); + oluacls_prop(L, "vbrMeanBitrateKbps", _olua_fun_cclua_MP3Encoder_getVBRMeanBitrateKbps, _olua_fun_cclua_MP3Encoder_setVBRMeanBitrateKbps); + oluacls_prop(L, "vbrMinBitrateKbps", _olua_fun_cclua_MP3Encoder_getVBRMinBitrateKbps, _olua_fun_cclua_MP3Encoder_setVBRMinBitrateKbps); + oluacls_prop(L, "vbrQuality", _olua_fun_cclua_MP3Encoder_getVBRQuality, _olua_fun_cclua_MP3Encoder_setVBRQuality); + oluacls_prop(L, "vbrq", _olua_fun_cclua_MP3Encoder_getVBRQ, _olua_fun_cclua_MP3Encoder_setVBRQ); + oluacls_prop(L, "version", _olua_fun_cclua_MP3Encoder_getVersion, nullptr); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cclua_MP3Encoder(lua_State *L) +{ + olua_require(L, "cclua", luaopen_cclua); + if (!olua_getclass(L, "cclua.MP3Encoder")) { + luaL_error(L, "class not found: cclua::MP3Encoder"); + } + return 1; +} OLUA_END_DECLS #endif #if defined(CCLUA_OS_IOS) || defined(CCLUA_OS_ANDROID) -static int _cclua_microphone___gc(lua_State *L) +static int _olua_fun_cclua_microphone___gc(lua_State *L) { olua_startinvoke(L); @@ -7131,7 +7322,7 @@ static int _cclua_microphone___gc(lua_State *L) return 0; } -static int _cclua_microphone___olua_move(lua_State *L) +static int _olua_fun_cclua_microphone___olua_move(lua_State *L) { olua_startinvoke(L); @@ -7143,7 +7334,7 @@ static int _cclua_microphone___olua_move(lua_State *L) return 1; } -static int _cclua_microphone_dispatch(lua_State *L) +static int _olua_fun_cclua_microphone_dispatch(lua_State *L) { olua_startinvoke(L); @@ -7161,7 +7352,7 @@ static int _cclua_microphone_dispatch(lua_State *L) return 0; } -static int _cclua_microphone_isRunning(lua_State *L) +static int _olua_fun_cclua_microphone_isRunning(lua_State *L) { olua_startinvoke(L); @@ -7174,7 +7365,7 @@ static int _cclua_microphone_isRunning(lua_State *L) return num_ret; } -static int _cclua_microphone_setDispatcher(lua_State *L) +static int _olua_fun_cclua_microphone_setDispatcher(lua_State *L) { olua_startinvoke(L); @@ -7184,9 +7375,10 @@ static int _cclua_microphone_setDispatcher(lua_State *L) void *cb_store = (void *)olua_pushclassobj(L, "cclua.microphone"); std::string cb_tag = "Dispatcher"; - std::string cb_name = olua_setcallback(L, cb_store, 1, cb_tag.c_str(), OLUA_TAG_REPLACE); + std::string cb_name = olua_setcallback(L, cb_store, 1, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](const std::string &arg1, const cocos2d::Value &arg2) { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](const std::string &cb_arg1, const cocos2d::Value &cb_arg2) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); @@ -7194,8 +7386,8 @@ static int _cclua_microphone_setDispatcher(lua_State *L) int top = lua_gettop(L); size_t last = olua_push_objpool(L); olua_enable_objpool(L); - olua_push_string(L, arg1); - olua_push_cocos2d_Value(L, arg2); + olua_push_string(L, cb_arg1); + olua_push_cocos2d_Value(L, cb_arg2); olua_disable_objpool(L); olua_callback(L, cb_store, cb_name.c_str(), 2); @@ -7206,7 +7398,7 @@ static int _cclua_microphone_setDispatcher(lua_State *L) } }; - // static void setDispatcher(@localvar const cclua::Callback &dispatcher) + // static void setDispatcher(const cclua::Callback &dispatcher) cclua::microphone::setDispatcher(arg1); olua_endinvoke(L); @@ -7214,7 +7406,7 @@ static int _cclua_microphone_setDispatcher(lua_State *L) return 0; } -static int _cclua_microphone_start(lua_State *L) +static int _olua_fun_cclua_microphone_start(lua_State *L) { olua_startinvoke(L); @@ -7230,7 +7422,7 @@ static int _cclua_microphone_start(lua_State *L) return 0; } -static int _cclua_microphone_stop(lua_State *L) +static int _olua_fun_cclua_microphone_stop(lua_State *L) { olua_startinvoke(L); @@ -7242,28 +7434,37 @@ static int _cclua_microphone_stop(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cclua_microphone(lua_State *L) +static int _olua_cls_cclua_microphone(lua_State *L) { oluacls_class(L, "cclua.microphone"); - oluacls_func(L, "__gc", _cclua_microphone___gc); - oluacls_func(L, "__olua_move", _cclua_microphone___olua_move); - oluacls_func(L, "dispatch", _cclua_microphone_dispatch); - oluacls_func(L, "isRunning", _cclua_microphone_isRunning); - oluacls_func(L, "setDispatcher", _cclua_microphone_setDispatcher); - oluacls_func(L, "start", _cclua_microphone_start); - oluacls_func(L, "stop", _cclua_microphone_stop); - oluacls_prop(L, "running", _cclua_microphone_isRunning, nullptr); + oluacls_func(L, "__gc", _olua_fun_cclua_microphone___gc); + oluacls_func(L, "__olua_move", _olua_fun_cclua_microphone___olua_move); + oluacls_func(L, "dispatch", _olua_fun_cclua_microphone_dispatch); + oluacls_func(L, "isRunning", _olua_fun_cclua_microphone_isRunning); + oluacls_func(L, "setDispatcher", _olua_fun_cclua_microphone_setDispatcher); + oluacls_func(L, "start", _olua_fun_cclua_microphone_start); + oluacls_func(L, "stop", _olua_fun_cclua_microphone_stop); + oluacls_prop(L, "running", _olua_fun_cclua_microphone_isRunning, nullptr); cclua::runtime::registerFeature("cclua.microphone", true); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cclua_microphone(lua_State *L) +{ + olua_require(L, "cclua", luaopen_cclua); + if (!olua_getclass(L, "cclua.microphone")) { + luaL_error(L, "class not found: cclua::microphone"); + } + return 1; +} OLUA_END_DECLS #endif #if defined(CCLUA_OS_IOS) || defined(CCLUA_OS_ANDROID) -static int _cclua_photo___gc(lua_State *L) +static int _olua_fun_cclua_photo___gc(lua_State *L) { olua_startinvoke(L); @@ -7275,7 +7476,7 @@ static int _cclua_photo___gc(lua_State *L) return 0; } -static int _cclua_photo___olua_move(lua_State *L) +static int _olua_fun_cclua_photo___olua_move(lua_State *L) { olua_startinvoke(L); @@ -7287,7 +7488,7 @@ static int _cclua_photo___olua_move(lua_State *L) return 1; } -static int _cclua_photo_dispatch(lua_State *L) +static int _olua_fun_cclua_photo_dispatch(lua_State *L) { olua_startinvoke(L); @@ -7305,7 +7506,7 @@ static int _cclua_photo_dispatch(lua_State *L) return 0; } -static int _cclua_photo_select(lua_State *L) +static int _olua_fun_cclua_photo_select(lua_State *L) { olua_startinvoke(L); @@ -7321,7 +7522,7 @@ static int _cclua_photo_select(lua_State *L) return 0; } -static int _cclua_photo_selectAvatar(lua_State *L) +static int _olua_fun_cclua_photo_selectAvatar(lua_State *L) { olua_startinvoke(L); @@ -7341,7 +7542,7 @@ static int _cclua_photo_selectAvatar(lua_State *L) return 0; } -static int _cclua_photo_setDispatcher(lua_State *L) +static int _olua_fun_cclua_photo_setDispatcher(lua_State *L) { olua_startinvoke(L); @@ -7351,9 +7552,10 @@ static int _cclua_photo_setDispatcher(lua_State *L) void *cb_store = (void *)olua_pushclassobj(L, "cclua.photo"); std::string cb_tag = "Dispatcher"; - std::string cb_name = olua_setcallback(L, cb_store, 1, cb_tag.c_str(), OLUA_TAG_REPLACE); + std::string cb_name = olua_setcallback(L, cb_store, 1, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](const std::string &arg1, const cocos2d::Value &arg2) { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](const std::string &cb_arg1, const cocos2d::Value &cb_arg2) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); @@ -7361,8 +7563,8 @@ static int _cclua_photo_setDispatcher(lua_State *L) int top = lua_gettop(L); size_t last = olua_push_objpool(L); olua_enable_objpool(L); - olua_push_string(L, arg1); - olua_push_cocos2d_Value(L, arg2); + olua_push_string(L, cb_arg1); + olua_push_cocos2d_Value(L, cb_arg2); olua_disable_objpool(L); olua_callback(L, cb_store, cb_name.c_str(), 2); @@ -7373,7 +7575,7 @@ static int _cclua_photo_setDispatcher(lua_State *L) } }; - // static void setDispatcher(@localvar const cclua::Callback &dispatcher) + // static void setDispatcher(const cclua::Callback &dispatcher) cclua::photo::setDispatcher(arg1); olua_endinvoke(L); @@ -7381,7 +7583,7 @@ static int _cclua_photo_setDispatcher(lua_State *L) return 0; } -static int _cclua_photo_takeAvatar(lua_State *L) +static int _olua_fun_cclua_photo_takeAvatar(lua_State *L) { olua_startinvoke(L); @@ -7401,51 +7603,60 @@ static int _cclua_photo_takeAvatar(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cclua_photo(lua_State *L) +static int _olua_cls_cclua_photo(lua_State *L) { oluacls_class(L, "cclua.photo"); - oluacls_func(L, "__gc", _cclua_photo___gc); - oluacls_func(L, "__olua_move", _cclua_photo___olua_move); - oluacls_func(L, "dispatch", _cclua_photo_dispatch); - oluacls_func(L, "select", _cclua_photo_select); - oluacls_func(L, "selectAvatar", _cclua_photo_selectAvatar); - oluacls_func(L, "setDispatcher", _cclua_photo_setDispatcher); - oluacls_func(L, "takeAvatar", _cclua_photo_takeAvatar); + oluacls_func(L, "__gc", _olua_fun_cclua_photo___gc); + oluacls_func(L, "__olua_move", _olua_fun_cclua_photo___olua_move); + oluacls_func(L, "dispatch", _olua_fun_cclua_photo_dispatch); + oluacls_func(L, "select", _olua_fun_cclua_photo_select); + oluacls_func(L, "selectAvatar", _olua_fun_cclua_photo_selectAvatar); + oluacls_func(L, "setDispatcher", _olua_fun_cclua_photo_setDispatcher); + oluacls_func(L, "takeAvatar", _olua_fun_cclua_photo_takeAvatar); cclua::runtime::registerFeature("cclua.photo", true); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cclua_photo(lua_State *L) +{ + olua_require(L, "cclua", luaopen_cclua); + if (!olua_getclass(L, "cclua.photo")) { + luaL_error(L, "class not found: cclua::photo"); + } + return 1; +} OLUA_END_DECLS #endif OLUA_BEGIN_DECLS OLUA_LIB int luaopen_cclua(lua_State *L) { - olua_require(L, "cclua.Callback", luaopen_cclua_Callback); - olua_require(L, "cclua.QRCode.ECLevel", luaopen_cclua_QRCode_ECLevel); - olua_require(L, "cclua.QRCode.EncodeMode", luaopen_cclua_QRCode_EncodeMode); - olua_require(L, "cclua.QRCode", luaopen_cclua_QRCode); - olua_require(L, "cclua.SceneNoCamera", luaopen_cclua_SceneNoCamera); - olua_require(L, "cclua.permission.status", luaopen_cclua_permission_status); - olua_require(L, "cclua.permission.android", luaopen_cclua_permission_android); - olua_require(L, "cclua.permission", luaopen_cclua_permission); - olua_require(L, "cclua.runtime", luaopen_cclua_runtime); - olua_require(L, "cclua.filesystem", luaopen_cclua_filesystem); - olua_require(L, "cclua.preferences", luaopen_cclua_preferences); - olua_require(L, "cclua.timer", luaopen_cclua_timer); - olua_require(L, "cclua.window", luaopen_cclua_window); - olua_require(L, "cclua.downloader", luaopen_cclua_downloader); - olua_require(L, "cclua.Container", luaopen_cclua_Container); - olua_require(L, "cclua.XMLHttpRequest.ResponseType", luaopen_cclua_XMLHttpRequest_ResponseType); - olua_require(L, "cclua.XMLHttpRequest", luaopen_cclua_XMLHttpRequest); + olua_require(L, "cclua.Callback", _olua_cls_cclua_Callback); + olua_require(L, "cclua.QRCode.ECLevel", _olua_cls_cclua_QRCode_ECLevel); + olua_require(L, "cclua.QRCode.EncodeMode", _olua_cls_cclua_QRCode_EncodeMode); + olua_require(L, "cclua.QRCode", _olua_cls_cclua_QRCode); + olua_require(L, "cclua.SceneNoCamera", _olua_cls_cclua_SceneNoCamera); + olua_require(L, "cclua.permission.status", _olua_cls_cclua_permission_status); + olua_require(L, "cclua.permission.android", _olua_cls_cclua_permission_android); + olua_require(L, "cclua.permission", _olua_cls_cclua_permission); + olua_require(L, "cclua.runtime", _olua_cls_cclua_runtime); + olua_require(L, "cclua.filesystem", _olua_cls_cclua_filesystem); + olua_require(L, "cclua.preferences", _olua_cls_cclua_preferences); + olua_require(L, "cclua.timer", _olua_cls_cclua_timer); + olua_require(L, "cclua.window", _olua_cls_cclua_window); + olua_require(L, "cclua.downloader", _olua_cls_cclua_downloader); + olua_require(L, "cclua.Container", _olua_cls_cclua_Container); + olua_require(L, "cclua.XMLHttpRequest.ResponseType", _olua_cls_cclua_XMLHttpRequest_ResponseType); + olua_require(L, "cclua.XMLHttpRequest", _olua_cls_cclua_XMLHttpRequest); #if defined(CCLUA_OS_IOS) || defined(CCLUA_OS_ANDROID) - olua_require(L, "cclua.MP3Encoder.VBRMode", luaopen_cclua_MP3Encoder_VBRMode); - olua_require(L, "cclua.MP3Encoder.MPEGMode", luaopen_cclua_MP3Encoder_MPEGMode); - olua_require(L, "cclua.MP3Encoder", luaopen_cclua_MP3Encoder); - olua_require(L, "cclua.microphone", luaopen_cclua_microphone); - olua_require(L, "cclua.photo", luaopen_cclua_photo); + olua_require(L, "cclua.MP3Encoder.VBRMode", _olua_cls_cclua_MP3Encoder_VBRMode); + olua_require(L, "cclua.MP3Encoder.MPEGMode", _olua_cls_cclua_MP3Encoder_MPEGMode); + olua_require(L, "cclua.MP3Encoder", _olua_cls_cclua_MP3Encoder); + olua_require(L, "cclua.microphone", _olua_cls_cclua_microphone); + olua_require(L, "cclua.photo", _olua_cls_cclua_photo); #endif return 0; diff --git a/frameworks/cclua/src/lua-bindings/lua_cclua.h b/frameworks/cclua/src/lua-bindings/lua_cclua.h index aecded45..b9a9f94e 100644 --- a/frameworks/cclua/src/lua-bindings/lua_cclua.h +++ b/frameworks/cclua/src/lua-bindings/lua_cclua.h @@ -1,5 +1,5 @@ // -// AUTO BUILD, DON'T MODIFY! +// AUTO GENERATED, DO NOT MODIFY! // #ifndef __AUTO_GEN_LUA_CCLUA_H__ #define __AUTO_GEN_LUA_CCLUA_H__ diff --git a/frameworks/cclua/src/lua-bindings/lua_cocos2d.cpp b/frameworks/cclua/src/lua-bindings/lua_cocos2d.cpp index 0a6dc4a7..46356769 100644 --- a/frameworks/cclua/src/lua-bindings/lua_cocos2d.cpp +++ b/frameworks/cclua/src/lua-bindings/lua_cocos2d.cpp @@ -1,5 +1,5 @@ // -// AUTO BUILD, DON'T MODIFY! +// AUTO GENERATED, DO NOT MODIFY! // #include "lua_cocos2d.h" #include "lua-bindings/lua_cocos2d_types.h" @@ -15,8 +15,7 @@ static const std::string makeScheduleCallbackTag(const std::string &key) return "schedule." + key; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_RenderTargetFlag(lua_State *L) +static int _olua_cls_cc_RenderTargetFlag(lua_State *L) { oluacls_class(L, "cc.RenderTargetFlag"); oluacls_func(L, "__index", olua_indexerror); @@ -28,10 +27,19 @@ OLUA_LIB int luaopen_cocos2d_RenderTargetFlag(lua_State *L) return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ClearFlag(lua_State *L) +OLUA_LIB int luaopen_cc_RenderTargetFlag(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.RenderTargetFlag")) { + luaL_error(L, "class not found: cocos2d::RenderTargetFlag"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_cc_ClearFlag(lua_State *L) { oluacls_class(L, "cc.ClearFlag"); oluacls_func(L, "__index", olua_indexerror); @@ -44,10 +52,19 @@ OLUA_LIB int luaopen_cocos2d_ClearFlag(lua_State *L) return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_MATRIX_STACK_TYPE(lua_State *L) +OLUA_LIB int luaopen_cc_ClearFlag(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.ClearFlag")) { + luaL_error(L, "class not found: cocos2d::ClearFlag"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_cc_MATRIX_STACK_TYPE(lua_State *L) { oluacls_class(L, "cc.MATRIX_STACK_TYPE"); oluacls_func(L, "__index", olua_indexerror); @@ -58,10 +75,19 @@ OLUA_LIB int luaopen_cocos2d_MATRIX_STACK_TYPE(lua_State *L) return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_Director_Projection(lua_State *L) +OLUA_LIB int luaopen_cc_MATRIX_STACK_TYPE(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.MATRIX_STACK_TYPE")) { + luaL_error(L, "class not found: cocos2d::MATRIX_STACK_TYPE"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_cc_Director_Projection(lua_State *L) { oluacls_class(L, "cc.Director.Projection"); oluacls_func(L, "__index", olua_indexerror); @@ -73,9 +99,19 @@ OLUA_LIB int luaopen_cocos2d_Director_Projection(lua_State *L) return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_Director_Projection(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.Director.Projection")) { + luaL_error(L, "class not found: cocos2d::Director::Projection"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_UserDefault___olua_move(lua_State *L) +static int _olua_fun_cocos2d_UserDefault___olua_move(lua_State *L) { olua_startinvoke(L); @@ -87,7 +123,7 @@ static int _cocos2d_UserDefault___olua_move(lua_State *L) return 1; } -static int _cocos2d_UserDefault_deleteValueForKey(lua_State *L) +static int _olua_fun_cocos2d_UserDefault_deleteValueForKey(lua_State *L) { olua_startinvoke(L); @@ -105,7 +141,7 @@ static int _cocos2d_UserDefault_deleteValueForKey(lua_State *L) return 0; } -static int _cocos2d_UserDefault_destroyInstance(lua_State *L) +static int _olua_fun_cocos2d_UserDefault_destroyInstance(lua_State *L) { olua_startinvoke(L); @@ -117,7 +153,7 @@ static int _cocos2d_UserDefault_destroyInstance(lua_State *L) return 0; } -static int _cocos2d_UserDefault_flush(lua_State *L) +static int _olua_fun_cocos2d_UserDefault_flush(lua_State *L) { olua_startinvoke(L); @@ -133,7 +169,7 @@ static int _cocos2d_UserDefault_flush(lua_State *L) return 0; } -static int _cocos2d_UserDefault_getBoolForKey$1(lua_State *L) +static int _olua_fun_cocos2d_UserDefault_getBoolForKey$1(lua_State *L) { olua_startinvoke(L); @@ -152,7 +188,7 @@ static int _cocos2d_UserDefault_getBoolForKey$1(lua_State *L) return num_ret; } -static int _cocos2d_UserDefault_getBoolForKey$2(lua_State *L) +static int _olua_fun_cocos2d_UserDefault_getBoolForKey$2(lua_State *L) { olua_startinvoke(L); @@ -173,21 +209,21 @@ static int _cocos2d_UserDefault_getBoolForKey$2(lua_State *L) return num_ret; } -static int _cocos2d_UserDefault_getBoolForKey(lua_State *L) +static int _olua_fun_cocos2d_UserDefault_getBoolForKey(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_string(L, 2))) { // bool getBoolForKey(const char *key) - return _cocos2d_UserDefault_getBoolForKey$1(L); + return _olua_fun_cocos2d_UserDefault_getBoolForKey$1(L); // } } if (num_args == 2) { // if ((olua_is_string(L, 2)) && (olua_is_bool(L, 3))) { // bool getBoolForKey(const char *key, bool defaultValue) - return _cocos2d_UserDefault_getBoolForKey$2(L); + return _olua_fun_cocos2d_UserDefault_getBoolForKey$2(L); // } } @@ -196,7 +232,7 @@ static int _cocos2d_UserDefault_getBoolForKey(lua_State *L) return 0; } -static int _cocos2d_UserDefault_getDataForKey$1(lua_State *L) +static int _olua_fun_cocos2d_UserDefault_getDataForKey$1(lua_State *L) { olua_startinvoke(L); @@ -215,7 +251,7 @@ static int _cocos2d_UserDefault_getDataForKey$1(lua_State *L) return num_ret; } -static int _cocos2d_UserDefault_getDataForKey$2(lua_State *L) +static int _olua_fun_cocos2d_UserDefault_getDataForKey$2(lua_State *L) { olua_startinvoke(L); @@ -236,21 +272,21 @@ static int _cocos2d_UserDefault_getDataForKey$2(lua_State *L) return num_ret; } -static int _cocos2d_UserDefault_getDataForKey(lua_State *L) +static int _olua_fun_cocos2d_UserDefault_getDataForKey(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_string(L, 2))) { // cocos2d::Data getDataForKey(const char *key) - return _cocos2d_UserDefault_getDataForKey$1(L); + return _olua_fun_cocos2d_UserDefault_getDataForKey$1(L); // } } if (num_args == 2) { // if ((olua_is_string(L, 2)) && (olua_is_cocos2d_Data(L, 3))) { // cocos2d::Data getDataForKey(const char *key, const cocos2d::Data &defaultValue) - return _cocos2d_UserDefault_getDataForKey$2(L); + return _olua_fun_cocos2d_UserDefault_getDataForKey$2(L); // } } @@ -259,7 +295,7 @@ static int _cocos2d_UserDefault_getDataForKey(lua_State *L) return 0; } -static int _cocos2d_UserDefault_getDoubleForKey$1(lua_State *L) +static int _olua_fun_cocos2d_UserDefault_getDoubleForKey$1(lua_State *L) { olua_startinvoke(L); @@ -278,7 +314,7 @@ static int _cocos2d_UserDefault_getDoubleForKey$1(lua_State *L) return num_ret; } -static int _cocos2d_UserDefault_getDoubleForKey$2(lua_State *L) +static int _olua_fun_cocos2d_UserDefault_getDoubleForKey$2(lua_State *L) { olua_startinvoke(L); @@ -299,21 +335,21 @@ static int _cocos2d_UserDefault_getDoubleForKey$2(lua_State *L) return num_ret; } -static int _cocos2d_UserDefault_getDoubleForKey(lua_State *L) +static int _olua_fun_cocos2d_UserDefault_getDoubleForKey(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_string(L, 2))) { // double getDoubleForKey(const char *key) - return _cocos2d_UserDefault_getDoubleForKey$1(L); + return _olua_fun_cocos2d_UserDefault_getDoubleForKey$1(L); // } } if (num_args == 2) { // if ((olua_is_string(L, 2)) && (olua_is_number(L, 3))) { // double getDoubleForKey(const char *key, double defaultValue) - return _cocos2d_UserDefault_getDoubleForKey$2(L); + return _olua_fun_cocos2d_UserDefault_getDoubleForKey$2(L); // } } @@ -322,7 +358,7 @@ static int _cocos2d_UserDefault_getDoubleForKey(lua_State *L) return 0; } -static int _cocos2d_UserDefault_getFloatForKey$1(lua_State *L) +static int _olua_fun_cocos2d_UserDefault_getFloatForKey$1(lua_State *L) { olua_startinvoke(L); @@ -341,7 +377,7 @@ static int _cocos2d_UserDefault_getFloatForKey$1(lua_State *L) return num_ret; } -static int _cocos2d_UserDefault_getFloatForKey$2(lua_State *L) +static int _olua_fun_cocos2d_UserDefault_getFloatForKey$2(lua_State *L) { olua_startinvoke(L); @@ -362,21 +398,21 @@ static int _cocos2d_UserDefault_getFloatForKey$2(lua_State *L) return num_ret; } -static int _cocos2d_UserDefault_getFloatForKey(lua_State *L) +static int _olua_fun_cocos2d_UserDefault_getFloatForKey(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_string(L, 2))) { // float getFloatForKey(const char *key) - return _cocos2d_UserDefault_getFloatForKey$1(L); + return _olua_fun_cocos2d_UserDefault_getFloatForKey$1(L); // } } if (num_args == 2) { // if ((olua_is_string(L, 2)) && (olua_is_number(L, 3))) { // float getFloatForKey(const char *key, float defaultValue) - return _cocos2d_UserDefault_getFloatForKey$2(L); + return _olua_fun_cocos2d_UserDefault_getFloatForKey$2(L); // } } @@ -385,7 +421,7 @@ static int _cocos2d_UserDefault_getFloatForKey(lua_State *L) return 0; } -static int _cocos2d_UserDefault_getInstance(lua_State *L) +static int _olua_fun_cocos2d_UserDefault_getInstance(lua_State *L) { olua_startinvoke(L); @@ -398,7 +434,7 @@ static int _cocos2d_UserDefault_getInstance(lua_State *L) return num_ret; } -static int _cocos2d_UserDefault_getIntegerForKey$1(lua_State *L) +static int _olua_fun_cocos2d_UserDefault_getIntegerForKey$1(lua_State *L) { olua_startinvoke(L); @@ -417,7 +453,7 @@ static int _cocos2d_UserDefault_getIntegerForKey$1(lua_State *L) return num_ret; } -static int _cocos2d_UserDefault_getIntegerForKey$2(lua_State *L) +static int _olua_fun_cocos2d_UserDefault_getIntegerForKey$2(lua_State *L) { olua_startinvoke(L); @@ -438,21 +474,21 @@ static int _cocos2d_UserDefault_getIntegerForKey$2(lua_State *L) return num_ret; } -static int _cocos2d_UserDefault_getIntegerForKey(lua_State *L) +static int _olua_fun_cocos2d_UserDefault_getIntegerForKey(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_string(L, 2))) { // int getIntegerForKey(const char *key) - return _cocos2d_UserDefault_getIntegerForKey$1(L); + return _olua_fun_cocos2d_UserDefault_getIntegerForKey$1(L); // } } if (num_args == 2) { // if ((olua_is_string(L, 2)) && (olua_is_integer(L, 3))) { // int getIntegerForKey(const char *key, int defaultValue) - return _cocos2d_UserDefault_getIntegerForKey$2(L); + return _olua_fun_cocos2d_UserDefault_getIntegerForKey$2(L); // } } @@ -461,7 +497,7 @@ static int _cocos2d_UserDefault_getIntegerForKey(lua_State *L) return 0; } -static int _cocos2d_UserDefault_getStringForKey$1(lua_State *L) +static int _olua_fun_cocos2d_UserDefault_getStringForKey$1(lua_State *L) { olua_startinvoke(L); @@ -480,7 +516,7 @@ static int _cocos2d_UserDefault_getStringForKey$1(lua_State *L) return num_ret; } -static int _cocos2d_UserDefault_getStringForKey$2(lua_State *L) +static int _olua_fun_cocos2d_UserDefault_getStringForKey$2(lua_State *L) { olua_startinvoke(L); @@ -501,21 +537,21 @@ static int _cocos2d_UserDefault_getStringForKey$2(lua_State *L) return num_ret; } -static int _cocos2d_UserDefault_getStringForKey(lua_State *L) +static int _olua_fun_cocos2d_UserDefault_getStringForKey(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_string(L, 2))) { // std::string getStringForKey(const char *key) - return _cocos2d_UserDefault_getStringForKey$1(L); + return _olua_fun_cocos2d_UserDefault_getStringForKey$1(L); // } } if (num_args == 2) { // if ((olua_is_string(L, 2)) && (olua_is_string(L, 3))) { // std::string getStringForKey(const char *key, const std::string &defaultValue) - return _cocos2d_UserDefault_getStringForKey$2(L); + return _olua_fun_cocos2d_UserDefault_getStringForKey$2(L); // } } @@ -524,7 +560,7 @@ static int _cocos2d_UserDefault_getStringForKey(lua_State *L) return 0; } -static int _cocos2d_UserDefault_getXMLFilePath(lua_State *L) +static int _olua_fun_cocos2d_UserDefault_getXMLFilePath(lua_State *L) { olua_startinvoke(L); @@ -537,7 +573,7 @@ static int _cocos2d_UserDefault_getXMLFilePath(lua_State *L) return num_ret; } -static int _cocos2d_UserDefault_isXMLFileExist(lua_State *L) +static int _olua_fun_cocos2d_UserDefault_isXMLFileExist(lua_State *L) { olua_startinvoke(L); @@ -550,7 +586,7 @@ static int _cocos2d_UserDefault_isXMLFileExist(lua_State *L) return num_ret; } -static int _cocos2d_UserDefault_setBoolForKey(lua_State *L) +static int _olua_fun_cocos2d_UserDefault_setBoolForKey(lua_State *L) { olua_startinvoke(L); @@ -570,7 +606,7 @@ static int _cocos2d_UserDefault_setBoolForKey(lua_State *L) return 0; } -static int _cocos2d_UserDefault_setDataForKey(lua_State *L) +static int _olua_fun_cocos2d_UserDefault_setDataForKey(lua_State *L) { olua_startinvoke(L); @@ -590,7 +626,7 @@ static int _cocos2d_UserDefault_setDataForKey(lua_State *L) return 0; } -static int _cocos2d_UserDefault_setDoubleForKey(lua_State *L) +static int _olua_fun_cocos2d_UserDefault_setDoubleForKey(lua_State *L) { olua_startinvoke(L); @@ -610,7 +646,7 @@ static int _cocos2d_UserDefault_setDoubleForKey(lua_State *L) return 0; } -static int _cocos2d_UserDefault_setFloatForKey(lua_State *L) +static int _olua_fun_cocos2d_UserDefault_setFloatForKey(lua_State *L) { olua_startinvoke(L); @@ -630,7 +666,7 @@ static int _cocos2d_UserDefault_setFloatForKey(lua_State *L) return 0; } -static int _cocos2d_UserDefault_setIntegerForKey(lua_State *L) +static int _olua_fun_cocos2d_UserDefault_setIntegerForKey(lua_State *L) { olua_startinvoke(L); @@ -650,7 +686,7 @@ static int _cocos2d_UserDefault_setIntegerForKey(lua_State *L) return 0; } -static int _cocos2d_UserDefault_setStringForKey(lua_State *L) +static int _olua_fun_cocos2d_UserDefault_setStringForKey(lua_State *L) { olua_startinvoke(L); @@ -670,38 +706,47 @@ static int _cocos2d_UserDefault_setStringForKey(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_UserDefault(lua_State *L) +static int _olua_cls_cc_UserDefault(lua_State *L) { oluacls_class(L, "cc.UserDefault"); - oluacls_func(L, "__olua_move", _cocos2d_UserDefault___olua_move); - oluacls_func(L, "deleteValueForKey", _cocos2d_UserDefault_deleteValueForKey); - oluacls_func(L, "destroyInstance", _cocos2d_UserDefault_destroyInstance); - oluacls_func(L, "flush", _cocos2d_UserDefault_flush); - oluacls_func(L, "getBoolForKey", _cocos2d_UserDefault_getBoolForKey); - oluacls_func(L, "getDataForKey", _cocos2d_UserDefault_getDataForKey); - oluacls_func(L, "getDoubleForKey", _cocos2d_UserDefault_getDoubleForKey); - oluacls_func(L, "getFloatForKey", _cocos2d_UserDefault_getFloatForKey); - oluacls_func(L, "getInstance", _cocos2d_UserDefault_getInstance); - oluacls_func(L, "getIntegerForKey", _cocos2d_UserDefault_getIntegerForKey); - oluacls_func(L, "getStringForKey", _cocos2d_UserDefault_getStringForKey); - oluacls_func(L, "getXMLFilePath", _cocos2d_UserDefault_getXMLFilePath); - oluacls_func(L, "isXMLFileExist", _cocos2d_UserDefault_isXMLFileExist); - oluacls_func(L, "setBoolForKey", _cocos2d_UserDefault_setBoolForKey); - oluacls_func(L, "setDataForKey", _cocos2d_UserDefault_setDataForKey); - oluacls_func(L, "setDoubleForKey", _cocos2d_UserDefault_setDoubleForKey); - oluacls_func(L, "setFloatForKey", _cocos2d_UserDefault_setFloatForKey); - oluacls_func(L, "setIntegerForKey", _cocos2d_UserDefault_setIntegerForKey); - oluacls_func(L, "setStringForKey", _cocos2d_UserDefault_setStringForKey); - oluacls_prop(L, "instance", _cocos2d_UserDefault_getInstance, nullptr); - oluacls_prop(L, "xmlFileExist", _cocos2d_UserDefault_isXMLFileExist, nullptr); - oluacls_prop(L, "xmlFilePath", _cocos2d_UserDefault_getXMLFilePath, nullptr); + oluacls_func(L, "__olua_move", _olua_fun_cocos2d_UserDefault___olua_move); + oluacls_func(L, "deleteValueForKey", _olua_fun_cocos2d_UserDefault_deleteValueForKey); + oluacls_func(L, "destroyInstance", _olua_fun_cocos2d_UserDefault_destroyInstance); + oluacls_func(L, "flush", _olua_fun_cocos2d_UserDefault_flush); + oluacls_func(L, "getBoolForKey", _olua_fun_cocos2d_UserDefault_getBoolForKey); + oluacls_func(L, "getDataForKey", _olua_fun_cocos2d_UserDefault_getDataForKey); + oluacls_func(L, "getDoubleForKey", _olua_fun_cocos2d_UserDefault_getDoubleForKey); + oluacls_func(L, "getFloatForKey", _olua_fun_cocos2d_UserDefault_getFloatForKey); + oluacls_func(L, "getInstance", _olua_fun_cocos2d_UserDefault_getInstance); + oluacls_func(L, "getIntegerForKey", _olua_fun_cocos2d_UserDefault_getIntegerForKey); + oluacls_func(L, "getStringForKey", _olua_fun_cocos2d_UserDefault_getStringForKey); + oluacls_func(L, "getXMLFilePath", _olua_fun_cocos2d_UserDefault_getXMLFilePath); + oluacls_func(L, "isXMLFileExist", _olua_fun_cocos2d_UserDefault_isXMLFileExist); + oluacls_func(L, "setBoolForKey", _olua_fun_cocos2d_UserDefault_setBoolForKey); + oluacls_func(L, "setDataForKey", _olua_fun_cocos2d_UserDefault_setDataForKey); + oluacls_func(L, "setDoubleForKey", _olua_fun_cocos2d_UserDefault_setDoubleForKey); + oluacls_func(L, "setFloatForKey", _olua_fun_cocos2d_UserDefault_setFloatForKey); + oluacls_func(L, "setIntegerForKey", _olua_fun_cocos2d_UserDefault_setIntegerForKey); + oluacls_func(L, "setStringForKey", _olua_fun_cocos2d_UserDefault_setStringForKey); + oluacls_prop(L, "instance", _olua_fun_cocos2d_UserDefault_getInstance, nullptr); + oluacls_prop(L, "xmlFileExist", _olua_fun_cocos2d_UserDefault_isXMLFileExist, nullptr); + oluacls_prop(L, "xmlFilePath", _olua_fun_cocos2d_UserDefault_getXMLFilePath, nullptr); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_UserDefault(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.UserDefault")) { + luaL_error(L, "class not found: cocos2d::UserDefault"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_Ref___gc(lua_State *L) +static int _olua_fun_cocos2d_Ref___gc(lua_State *L) { olua_startinvoke(L); @@ -710,7 +755,7 @@ static int _cocos2d_Ref___gc(lua_State *L) return cclua_ccobjgc(L); } -static int _cocos2d_Ref___olua_move(lua_State *L) +static int _olua_fun_cocos2d_Ref___olua_move(lua_State *L) { olua_startinvoke(L); @@ -722,7 +767,7 @@ static int _cocos2d_Ref___olua_move(lua_State *L) return 1; } -static int _cocos2d_Ref_getReferenceCount(lua_State *L) +static int _olua_fun_cocos2d_Ref_getReferenceCount(lua_State *L) { olua_startinvoke(L); @@ -739,20 +784,29 @@ static int _cocos2d_Ref_getReferenceCount(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_Ref(lua_State *L) +static int _olua_cls_cc_Ref(lua_State *L) { oluacls_class(L, "cc.Ref"); - oluacls_func(L, "__gc", _cocos2d_Ref___gc); - oluacls_func(L, "__olua_move", _cocos2d_Ref___olua_move); - oluacls_func(L, "getReferenceCount", _cocos2d_Ref_getReferenceCount); - oluacls_prop(L, "referenceCount", _cocos2d_Ref_getReferenceCount, nullptr); + oluacls_func(L, "__gc", _olua_fun_cocos2d_Ref___gc); + oluacls_func(L, "__olua_move", _olua_fun_cocos2d_Ref___olua_move); + oluacls_func(L, "getReferenceCount", _olua_fun_cocos2d_Ref_getReferenceCount); + oluacls_prop(L, "referenceCount", _olua_fun_cocos2d_Ref_getReferenceCount, nullptr); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_Ref(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.Ref")) { + luaL_error(L, "class not found: cocos2d::Ref"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_Clonable___gc(lua_State *L) +static int _olua_fun_cocos2d_Clonable___gc(lua_State *L) { olua_startinvoke(L); @@ -764,7 +818,7 @@ static int _cocos2d_Clonable___gc(lua_State *L) return 0; } -static int _cocos2d_Clonable___olua_move(lua_State *L) +static int _olua_fun_cocos2d_Clonable___olua_move(lua_State *L) { olua_startinvoke(L); @@ -776,7 +830,7 @@ static int _cocos2d_Clonable___olua_move(lua_State *L) return 1; } -static int _cocos2d_Clonable_clone(lua_State *L) +static int _olua_fun_cocos2d_Clonable_clone(lua_State *L) { olua_startinvoke(L); @@ -793,19 +847,28 @@ static int _cocos2d_Clonable_clone(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_Clonable(lua_State *L) +static int _olua_cls_cc_Clonable(lua_State *L) { oluacls_class(L, "cc.Clonable"); - oluacls_func(L, "__gc", _cocos2d_Clonable___gc); - oluacls_func(L, "__olua_move", _cocos2d_Clonable___olua_move); - oluacls_func(L, "clone", _cocos2d_Clonable_clone); + oluacls_func(L, "__gc", _olua_fun_cocos2d_Clonable___gc); + oluacls_func(L, "__olua_move", _olua_fun_cocos2d_Clonable___olua_move); + oluacls_func(L, "clone", _olua_fun_cocos2d_Clonable_clone); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_Clonable(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.Clonable")) { + luaL_error(L, "class not found: cocos2d::Clonable"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_Console_delCommand(lua_State *L) +static int _olua_fun_cocos2d_Console_delCommand(lua_State *L) { olua_startinvoke(L); @@ -823,7 +886,7 @@ static int _cocos2d_Console_delCommand(lua_State *L) return 0; } -static int _cocos2d_Console_delSubCommand(lua_State *L) +static int _olua_fun_cocos2d_Console_delSubCommand(lua_State *L) { olua_startinvoke(L); @@ -843,7 +906,7 @@ static int _cocos2d_Console_delSubCommand(lua_State *L) return 0; } -static int _cocos2d_Console_getCommandSeparator(lua_State *L) +static int _olua_fun_cocos2d_Console_getCommandSeparator(lua_State *L) { olua_startinvoke(L); @@ -860,7 +923,7 @@ static int _cocos2d_Console_getCommandSeparator(lua_State *L) return num_ret; } -static int _cocos2d_Console_isIpv6Server(lua_State *L) +static int _olua_fun_cocos2d_Console_isIpv6Server(lua_State *L) { olua_startinvoke(L); @@ -877,7 +940,7 @@ static int _cocos2d_Console_isIpv6Server(lua_State *L) return num_ret; } -static int _cocos2d_Console_listenOnFileDescriptor(lua_State *L) +static int _olua_fun_cocos2d_Console_listenOnFileDescriptor(lua_State *L) { olua_startinvoke(L); @@ -896,7 +959,7 @@ static int _cocos2d_Console_listenOnFileDescriptor(lua_State *L) return num_ret; } -static int _cocos2d_Console_listenOnTCP(lua_State *L) +static int _olua_fun_cocos2d_Console_listenOnTCP(lua_State *L) { olua_startinvoke(L); @@ -915,7 +978,7 @@ static int _cocos2d_Console_listenOnTCP(lua_State *L) return num_ret; } -static int _cocos2d_Console_log(lua_State *L) +static int _olua_fun_cocos2d_Console_log(lua_State *L) { olua_startinvoke(L); @@ -933,11 +996,11 @@ static int _cocos2d_Console_log(lua_State *L) return 0; } -static int _cocos2d_Console_new(lua_State *L) +static int _olua_fun_cocos2d_Console_new(lua_State *L) { olua_startinvoke(L); - // Console() + // cocos2d::Console() cocos2d::Console *ret = new cocos2d::Console(); int num_ret = olua_push_object(L, ret, "cc.Console"); olua_postnew(L, ret); @@ -947,7 +1010,7 @@ static int _cocos2d_Console_new(lua_State *L) return num_ret; } -static int _cocos2d_Console_setBindAddress(lua_State *L) +static int _olua_fun_cocos2d_Console_setBindAddress(lua_State *L) { olua_startinvoke(L); @@ -965,7 +1028,7 @@ static int _cocos2d_Console_setBindAddress(lua_State *L) return 0; } -static int _cocos2d_Console_setCommandSeparator(lua_State *L) +static int _olua_fun_cocos2d_Console_setCommandSeparator(lua_State *L) { olua_startinvoke(L); @@ -983,7 +1046,7 @@ static int _cocos2d_Console_setCommandSeparator(lua_State *L) return 0; } -static int _cocos2d_Console_stop(lua_State *L) +static int _olua_fun_cocos2d_Console_stop(lua_State *L) { olua_startinvoke(L); @@ -999,29 +1062,38 @@ static int _cocos2d_Console_stop(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_Console(lua_State *L) +static int _olua_cls_cc_Console(lua_State *L) { oluacls_class(L, "cc.Console"); - oluacls_func(L, "delCommand", _cocos2d_Console_delCommand); - oluacls_func(L, "delSubCommand", _cocos2d_Console_delSubCommand); - oluacls_func(L, "getCommandSeparator", _cocos2d_Console_getCommandSeparator); - oluacls_func(L, "isIpv6Server", _cocos2d_Console_isIpv6Server); - oluacls_func(L, "listenOnFileDescriptor", _cocos2d_Console_listenOnFileDescriptor); - oluacls_func(L, "listenOnTCP", _cocos2d_Console_listenOnTCP); - oluacls_func(L, "log", _cocos2d_Console_log); - oluacls_func(L, "new", _cocos2d_Console_new); - oluacls_func(L, "setBindAddress", _cocos2d_Console_setBindAddress); - oluacls_func(L, "setCommandSeparator", _cocos2d_Console_setCommandSeparator); - oluacls_func(L, "stop", _cocos2d_Console_stop); - oluacls_prop(L, "commandSeparator", _cocos2d_Console_getCommandSeparator, _cocos2d_Console_setCommandSeparator); - oluacls_prop(L, "ipv6Server", _cocos2d_Console_isIpv6Server, nullptr); + oluacls_func(L, "delCommand", _olua_fun_cocos2d_Console_delCommand); + oluacls_func(L, "delSubCommand", _olua_fun_cocos2d_Console_delSubCommand); + oluacls_func(L, "getCommandSeparator", _olua_fun_cocos2d_Console_getCommandSeparator); + oluacls_func(L, "isIpv6Server", _olua_fun_cocos2d_Console_isIpv6Server); + oluacls_func(L, "listenOnFileDescriptor", _olua_fun_cocos2d_Console_listenOnFileDescriptor); + oluacls_func(L, "listenOnTCP", _olua_fun_cocos2d_Console_listenOnTCP); + oluacls_func(L, "log", _olua_fun_cocos2d_Console_log); + oluacls_func(L, "new", _olua_fun_cocos2d_Console_new); + oluacls_func(L, "setBindAddress", _olua_fun_cocos2d_Console_setBindAddress); + oluacls_func(L, "setCommandSeparator", _olua_fun_cocos2d_Console_setCommandSeparator); + oluacls_func(L, "stop", _olua_fun_cocos2d_Console_stop); + oluacls_prop(L, "commandSeparator", _olua_fun_cocos2d_Console_getCommandSeparator, _olua_fun_cocos2d_Console_setCommandSeparator); + oluacls_prop(L, "ipv6Server", _olua_fun_cocos2d_Console_isIpv6Server, nullptr); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_Console(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.Console")) { + luaL_error(L, "class not found: cocos2d::Console"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_Acceleration_get_timestamp(lua_State *L) +static int _olua_fun_cocos2d_Acceleration_timestamp$1(lua_State *L) { olua_startinvoke(L); @@ -1029,7 +1101,7 @@ static int _cocos2d_Acceleration_get_timestamp(lua_State *L) olua_to_object(L, 1, &self, "cc.Acceleration"); - // @optional double timestamp + // double timestamp double ret = self->timestamp; int num_ret = olua_push_number(L, ret); @@ -1038,7 +1110,7 @@ static int _cocos2d_Acceleration_get_timestamp(lua_State *L) return num_ret; } -static int _cocos2d_Acceleration_set_timestamp(lua_State *L) +static int _olua_fun_cocos2d_Acceleration_timestamp$2(lua_State *L) { olua_startinvoke(L); @@ -1048,7 +1120,7 @@ static int _cocos2d_Acceleration_set_timestamp(lua_State *L) olua_to_object(L, 1, &self, "cc.Acceleration"); olua_check_number(L, 2, &arg1); - // @optional double timestamp + // double timestamp self->timestamp = arg1; olua_endinvoke(L); @@ -1056,7 +1128,28 @@ static int _cocos2d_Acceleration_set_timestamp(lua_State *L) return 0; } -static int _cocos2d_Acceleration_get_x(lua_State *L) +static int _olua_fun_cocos2d_Acceleration_timestamp(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // double timestamp + return _olua_fun_cocos2d_Acceleration_timestamp$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // double timestamp + return _olua_fun_cocos2d_Acceleration_timestamp$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::Acceleration::timestamp' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_Acceleration_x$1(lua_State *L) { olua_startinvoke(L); @@ -1064,7 +1157,7 @@ static int _cocos2d_Acceleration_get_x(lua_State *L) olua_to_object(L, 1, &self, "cc.Acceleration"); - // @optional double x + // double x double ret = self->x; int num_ret = olua_push_number(L, ret); @@ -1073,7 +1166,7 @@ static int _cocos2d_Acceleration_get_x(lua_State *L) return num_ret; } -static int _cocos2d_Acceleration_set_x(lua_State *L) +static int _olua_fun_cocos2d_Acceleration_x$2(lua_State *L) { olua_startinvoke(L); @@ -1083,7 +1176,7 @@ static int _cocos2d_Acceleration_set_x(lua_State *L) olua_to_object(L, 1, &self, "cc.Acceleration"); olua_check_number(L, 2, &arg1); - // @optional double x + // double x self->x = arg1; olua_endinvoke(L); @@ -1091,7 +1184,28 @@ static int _cocos2d_Acceleration_set_x(lua_State *L) return 0; } -static int _cocos2d_Acceleration_get_y(lua_State *L) +static int _olua_fun_cocos2d_Acceleration_x(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // double x + return _olua_fun_cocos2d_Acceleration_x$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // double x + return _olua_fun_cocos2d_Acceleration_x$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::Acceleration::x' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_Acceleration_y$1(lua_State *L) { olua_startinvoke(L); @@ -1099,7 +1213,7 @@ static int _cocos2d_Acceleration_get_y(lua_State *L) olua_to_object(L, 1, &self, "cc.Acceleration"); - // @optional double y + // double y double ret = self->y; int num_ret = olua_push_number(L, ret); @@ -1108,7 +1222,7 @@ static int _cocos2d_Acceleration_get_y(lua_State *L) return num_ret; } -static int _cocos2d_Acceleration_set_y(lua_State *L) +static int _olua_fun_cocos2d_Acceleration_y$2(lua_State *L) { olua_startinvoke(L); @@ -1118,7 +1232,7 @@ static int _cocos2d_Acceleration_set_y(lua_State *L) olua_to_object(L, 1, &self, "cc.Acceleration"); olua_check_number(L, 2, &arg1); - // @optional double y + // double y self->y = arg1; olua_endinvoke(L); @@ -1126,7 +1240,28 @@ static int _cocos2d_Acceleration_set_y(lua_State *L) return 0; } -static int _cocos2d_Acceleration_get_z(lua_State *L) +static int _olua_fun_cocos2d_Acceleration_y(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // double y + return _olua_fun_cocos2d_Acceleration_y$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // double y + return _olua_fun_cocos2d_Acceleration_y$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::Acceleration::y' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_Acceleration_z$1(lua_State *L) { olua_startinvoke(L); @@ -1134,7 +1269,7 @@ static int _cocos2d_Acceleration_get_z(lua_State *L) olua_to_object(L, 1, &self, "cc.Acceleration"); - // @optional double z + // double z double ret = self->z; int num_ret = olua_push_number(L, ret); @@ -1143,7 +1278,7 @@ static int _cocos2d_Acceleration_get_z(lua_State *L) return num_ret; } -static int _cocos2d_Acceleration_set_z(lua_State *L) +static int _olua_fun_cocos2d_Acceleration_z$2(lua_State *L) { olua_startinvoke(L); @@ -1153,7 +1288,7 @@ static int _cocos2d_Acceleration_set_z(lua_State *L) olua_to_object(L, 1, &self, "cc.Acceleration"); olua_check_number(L, 2, &arg1); - // @optional double z + // double z self->z = arg1; olua_endinvoke(L); @@ -1161,39 +1296,519 @@ static int _cocos2d_Acceleration_set_z(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_Acceleration(lua_State *L) +static int _olua_fun_cocos2d_Acceleration_z(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // double z + return _olua_fun_cocos2d_Acceleration_z$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // double z + return _olua_fun_cocos2d_Acceleration_z$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::Acceleration::z' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_cls_cc_Acceleration(lua_State *L) { oluacls_class(L, "cc.Acceleration"); - oluacls_prop(L, "timestamp", _cocos2d_Acceleration_get_timestamp, _cocos2d_Acceleration_set_timestamp); - oluacls_prop(L, "x", _cocos2d_Acceleration_get_x, _cocos2d_Acceleration_set_x); - oluacls_prop(L, "y", _cocos2d_Acceleration_get_y, _cocos2d_Acceleration_set_y); - oluacls_prop(L, "z", _cocos2d_Acceleration_get_z, _cocos2d_Acceleration_set_z); + oluacls_prop(L, "timestamp", _olua_fun_cocos2d_Acceleration_timestamp, _olua_fun_cocos2d_Acceleration_timestamp); + oluacls_prop(L, "x", _olua_fun_cocos2d_Acceleration_x, _olua_fun_cocos2d_Acceleration_x); + oluacls_prop(L, "y", _olua_fun_cocos2d_Acceleration_y, _olua_fun_cocos2d_Acceleration_y); + oluacls_prop(L, "z", _olua_fun_cocos2d_Acceleration_z, _olua_fun_cocos2d_Acceleration_z); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_Acceleration(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.Acceleration")) { + luaL_error(L, "class not found: cocos2d::Acceleration"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_Director_convertToGL$1(lua_State *L) +static int _olua_fun_cocos2d_Director_EVENT_AFTER_DRAW$1(lua_State *L) +{ + olua_startinvoke(L); + + // static const char *EVENT_AFTER_DRAW + const char *ret = cocos2d::Director::EVENT_AFTER_DRAW; + int num_ret = olua_push_string(L, ret); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_cocos2d_Director_EVENT_AFTER_DRAW$2(lua_State *L) +{ + olua_startinvoke(L); + + const char *arg1 = nullptr; /** EVENT_AFTER_DRAW */ + + olua_check_string(L, 1, &arg1); + + // static const char *EVENT_AFTER_DRAW + cocos2d::Director::EVENT_AFTER_DRAW = arg1; + + olua_endinvoke(L); + + return 0; +} + +static int _olua_fun_cocos2d_Director_EVENT_AFTER_DRAW(lua_State *L) +{ + int num_args = lua_gettop(L); + + if (num_args == 0) { + // static const char *EVENT_AFTER_DRAW + return _olua_fun_cocos2d_Director_EVENT_AFTER_DRAW$1(L); + } + + if (num_args == 1) { + // if ((olua_is_string(L, 1))) { + // static const char *EVENT_AFTER_DRAW + return _olua_fun_cocos2d_Director_EVENT_AFTER_DRAW$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::Director::EVENT_AFTER_DRAW' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_Director_EVENT_AFTER_SET_NEXT_SCENE$1(lua_State *L) +{ + olua_startinvoke(L); + + // static const char *EVENT_AFTER_SET_NEXT_SCENE + const char *ret = cocos2d::Director::EVENT_AFTER_SET_NEXT_SCENE; + int num_ret = olua_push_string(L, ret); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_cocos2d_Director_EVENT_AFTER_SET_NEXT_SCENE$2(lua_State *L) +{ + olua_startinvoke(L); + + const char *arg1 = nullptr; /** EVENT_AFTER_SET_NEXT_SCENE */ + + olua_check_string(L, 1, &arg1); + + // static const char *EVENT_AFTER_SET_NEXT_SCENE + cocos2d::Director::EVENT_AFTER_SET_NEXT_SCENE = arg1; + + olua_endinvoke(L); + + return 0; +} + +static int _olua_fun_cocos2d_Director_EVENT_AFTER_SET_NEXT_SCENE(lua_State *L) +{ + int num_args = lua_gettop(L); + + if (num_args == 0) { + // static const char *EVENT_AFTER_SET_NEXT_SCENE + return _olua_fun_cocos2d_Director_EVENT_AFTER_SET_NEXT_SCENE$1(L); + } + + if (num_args == 1) { + // if ((olua_is_string(L, 1))) { + // static const char *EVENT_AFTER_SET_NEXT_SCENE + return _olua_fun_cocos2d_Director_EVENT_AFTER_SET_NEXT_SCENE$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::Director::EVENT_AFTER_SET_NEXT_SCENE' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_Director_EVENT_AFTER_UPDATE$1(lua_State *L) +{ + olua_startinvoke(L); + + // static const char *EVENT_AFTER_UPDATE + const char *ret = cocos2d::Director::EVENT_AFTER_UPDATE; + int num_ret = olua_push_string(L, ret); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_cocos2d_Director_EVENT_AFTER_UPDATE$2(lua_State *L) +{ + olua_startinvoke(L); + + const char *arg1 = nullptr; /** EVENT_AFTER_UPDATE */ + + olua_check_string(L, 1, &arg1); + + // static const char *EVENT_AFTER_UPDATE + cocos2d::Director::EVENT_AFTER_UPDATE = arg1; + + olua_endinvoke(L); + + return 0; +} + +static int _olua_fun_cocos2d_Director_EVENT_AFTER_UPDATE(lua_State *L) +{ + int num_args = lua_gettop(L); + + if (num_args == 0) { + // static const char *EVENT_AFTER_UPDATE + return _olua_fun_cocos2d_Director_EVENT_AFTER_UPDATE$1(L); + } + + if (num_args == 1) { + // if ((olua_is_string(L, 1))) { + // static const char *EVENT_AFTER_UPDATE + return _olua_fun_cocos2d_Director_EVENT_AFTER_UPDATE$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::Director::EVENT_AFTER_UPDATE' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_Director_EVENT_AFTER_VISIT$1(lua_State *L) +{ + olua_startinvoke(L); + + // static const char *EVENT_AFTER_VISIT + const char *ret = cocos2d::Director::EVENT_AFTER_VISIT; + int num_ret = olua_push_string(L, ret); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_cocos2d_Director_EVENT_AFTER_VISIT$2(lua_State *L) +{ + olua_startinvoke(L); + + const char *arg1 = nullptr; /** EVENT_AFTER_VISIT */ + + olua_check_string(L, 1, &arg1); + + // static const char *EVENT_AFTER_VISIT + cocos2d::Director::EVENT_AFTER_VISIT = arg1; + + olua_endinvoke(L); + + return 0; +} + +static int _olua_fun_cocos2d_Director_EVENT_AFTER_VISIT(lua_State *L) +{ + int num_args = lua_gettop(L); + + if (num_args == 0) { + // static const char *EVENT_AFTER_VISIT + return _olua_fun_cocos2d_Director_EVENT_AFTER_VISIT$1(L); + } + + if (num_args == 1) { + // if ((olua_is_string(L, 1))) { + // static const char *EVENT_AFTER_VISIT + return _olua_fun_cocos2d_Director_EVENT_AFTER_VISIT$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::Director::EVENT_AFTER_VISIT' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_Director_EVENT_BEFORE_DRAW$1(lua_State *L) +{ + olua_startinvoke(L); + + // static const char *EVENT_BEFORE_DRAW + const char *ret = cocos2d::Director::EVENT_BEFORE_DRAW; + int num_ret = olua_push_string(L, ret); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_cocos2d_Director_EVENT_BEFORE_DRAW$2(lua_State *L) +{ + olua_startinvoke(L); + + const char *arg1 = nullptr; /** EVENT_BEFORE_DRAW */ + + olua_check_string(L, 1, &arg1); + + // static const char *EVENT_BEFORE_DRAW + cocos2d::Director::EVENT_BEFORE_DRAW = arg1; + + olua_endinvoke(L); + + return 0; +} + +static int _olua_fun_cocos2d_Director_EVENT_BEFORE_DRAW(lua_State *L) +{ + int num_args = lua_gettop(L); + + if (num_args == 0) { + // static const char *EVENT_BEFORE_DRAW + return _olua_fun_cocos2d_Director_EVENT_BEFORE_DRAW$1(L); + } + + if (num_args == 1) { + // if ((olua_is_string(L, 1))) { + // static const char *EVENT_BEFORE_DRAW + return _olua_fun_cocos2d_Director_EVENT_BEFORE_DRAW$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::Director::EVENT_BEFORE_DRAW' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_Director_EVENT_BEFORE_SET_NEXT_SCENE$1(lua_State *L) +{ + olua_startinvoke(L); + + // static const char *EVENT_BEFORE_SET_NEXT_SCENE + const char *ret = cocos2d::Director::EVENT_BEFORE_SET_NEXT_SCENE; + int num_ret = olua_push_string(L, ret); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_cocos2d_Director_EVENT_BEFORE_SET_NEXT_SCENE$2(lua_State *L) +{ + olua_startinvoke(L); + + const char *arg1 = nullptr; /** EVENT_BEFORE_SET_NEXT_SCENE */ + + olua_check_string(L, 1, &arg1); + + // static const char *EVENT_BEFORE_SET_NEXT_SCENE + cocos2d::Director::EVENT_BEFORE_SET_NEXT_SCENE = arg1; + + olua_endinvoke(L); + + return 0; +} + +static int _olua_fun_cocos2d_Director_EVENT_BEFORE_SET_NEXT_SCENE(lua_State *L) +{ + int num_args = lua_gettop(L); + + if (num_args == 0) { + // static const char *EVENT_BEFORE_SET_NEXT_SCENE + return _olua_fun_cocos2d_Director_EVENT_BEFORE_SET_NEXT_SCENE$1(L); + } + + if (num_args == 1) { + // if ((olua_is_string(L, 1))) { + // static const char *EVENT_BEFORE_SET_NEXT_SCENE + return _olua_fun_cocos2d_Director_EVENT_BEFORE_SET_NEXT_SCENE$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::Director::EVENT_BEFORE_SET_NEXT_SCENE' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_Director_EVENT_BEFORE_UPDATE$1(lua_State *L) +{ + olua_startinvoke(L); + + // static const char *EVENT_BEFORE_UPDATE + const char *ret = cocos2d::Director::EVENT_BEFORE_UPDATE; + int num_ret = olua_push_string(L, ret); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_cocos2d_Director_EVENT_BEFORE_UPDATE$2(lua_State *L) +{ + olua_startinvoke(L); + + const char *arg1 = nullptr; /** EVENT_BEFORE_UPDATE */ + + olua_check_string(L, 1, &arg1); + + // static const char *EVENT_BEFORE_UPDATE + cocos2d::Director::EVENT_BEFORE_UPDATE = arg1; + + olua_endinvoke(L); + + return 0; +} + +static int _olua_fun_cocos2d_Director_EVENT_BEFORE_UPDATE(lua_State *L) +{ + int num_args = lua_gettop(L); + + if (num_args == 0) { + // static const char *EVENT_BEFORE_UPDATE + return _olua_fun_cocos2d_Director_EVENT_BEFORE_UPDATE$1(L); + } + + if (num_args == 1) { + // if ((olua_is_string(L, 1))) { + // static const char *EVENT_BEFORE_UPDATE + return _olua_fun_cocos2d_Director_EVENT_BEFORE_UPDATE$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::Director::EVENT_BEFORE_UPDATE' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_Director_EVENT_PROJECTION_CHANGED$1(lua_State *L) +{ + olua_startinvoke(L); + + // static const char *EVENT_PROJECTION_CHANGED + const char *ret = cocos2d::Director::EVENT_PROJECTION_CHANGED; + int num_ret = olua_push_string(L, ret); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_cocos2d_Director_EVENT_PROJECTION_CHANGED$2(lua_State *L) +{ + olua_startinvoke(L); + + const char *arg1 = nullptr; /** EVENT_PROJECTION_CHANGED */ + + olua_check_string(L, 1, &arg1); + + // static const char *EVENT_PROJECTION_CHANGED + cocos2d::Director::EVENT_PROJECTION_CHANGED = arg1; + + olua_endinvoke(L); + + return 0; +} + +static int _olua_fun_cocos2d_Director_EVENT_PROJECTION_CHANGED(lua_State *L) +{ + int num_args = lua_gettop(L); + + if (num_args == 0) { + // static const char *EVENT_PROJECTION_CHANGED + return _olua_fun_cocos2d_Director_EVENT_PROJECTION_CHANGED$1(L); + } + + if (num_args == 1) { + // if ((olua_is_string(L, 1))) { + // static const char *EVENT_PROJECTION_CHANGED + return _olua_fun_cocos2d_Director_EVENT_PROJECTION_CHANGED$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::Director::EVENT_PROJECTION_CHANGED' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_Director_EVENT_RESET$1(lua_State *L) +{ + olua_startinvoke(L); + + // static const char *EVENT_RESET + const char *ret = cocos2d::Director::EVENT_RESET; + int num_ret = olua_push_string(L, ret); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_cocos2d_Director_EVENT_RESET$2(lua_State *L) +{ + olua_startinvoke(L); + + const char *arg1 = nullptr; /** EVENT_RESET */ + + olua_check_string(L, 1, &arg1); + + // static const char *EVENT_RESET + cocos2d::Director::EVENT_RESET = arg1; + + olua_endinvoke(L); + + return 0; +} + +static int _olua_fun_cocos2d_Director_EVENT_RESET(lua_State *L) +{ + int num_args = lua_gettop(L); + + if (num_args == 0) { + // static const char *EVENT_RESET + return _olua_fun_cocos2d_Director_EVENT_RESET$1(L); + } + + if (num_args == 1) { + // if ((olua_is_string(L, 1))) { + // static const char *EVENT_RESET + return _olua_fun_cocos2d_Director_EVENT_RESET$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::Director::EVENT_RESET' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_Director_convertToGL$1(lua_State *L) { olua_startinvoke(L); cocos2d::Director *self = nullptr; - cocos2d::Vec2 arg1; /** point */ + cocos2d::Vec2 *arg1; /** point */ olua_to_object(L, 1, &self, "cc.Director"); olua_check_object(L, 2, &arg1, "cc.Vec2"); // cocos2d::Vec2 convertToGL(const cocos2d::Vec2 &point) - cocos2d::Vec2 ret = self->convertToGL(arg1); - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec2"); + cocos2d::Vec2 ret = self->convertToGL(*arg1); + int num_ret = olua_copy_object(L, ret, "cc.Vec2"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_Director_convertToGL$2(lua_State *L) +static int _olua_fun_cocos2d_Director_convertToGL$2(lua_State *L) { olua_startinvoke(L); @@ -1203,7 +1818,7 @@ static int _cocos2d_Director_convertToGL$2(lua_State *L) olua_to_object(L, 1, &self, "cc.Director"); olua_pack_object(L, 2, &arg1); - // cocos2d::Vec2 convertToGL(@pack const cocos2d::Vec2 &point) + // @unpack cocos2d::Vec2 convertToGL(@pack const cocos2d::Vec2 &point) cocos2d::Vec2 ret = self->convertToGL(arg1); int num_ret = olua_unpack_object(L, &ret); @@ -1212,21 +1827,21 @@ static int _cocos2d_Director_convertToGL$2(lua_State *L) return num_ret; } -static int _cocos2d_Director_convertToGL(lua_State *L) +static int _olua_fun_cocos2d_Director_convertToGL(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_object(L, 2, "cc.Vec2"))) { // cocos2d::Vec2 convertToGL(const cocos2d::Vec2 &point) - return _cocos2d_Director_convertToGL$1(L); + return _olua_fun_cocos2d_Director_convertToGL$1(L); // } } if (num_args == 2) { // if ((olua_canpack_object(L, 2, (cocos2d::Vec2 *)nullptr))) { - // cocos2d::Vec2 convertToGL(@pack const cocos2d::Vec2 &point) - return _cocos2d_Director_convertToGL$2(L); + // @unpack cocos2d::Vec2 convertToGL(@pack const cocos2d::Vec2 &point) + return _olua_fun_cocos2d_Director_convertToGL$2(L); // } } @@ -1235,26 +1850,26 @@ static int _cocos2d_Director_convertToGL(lua_State *L) return 0; } -static int _cocos2d_Director_convertToUI$1(lua_State *L) +static int _olua_fun_cocos2d_Director_convertToUI$1(lua_State *L) { olua_startinvoke(L); cocos2d::Director *self = nullptr; - cocos2d::Vec2 arg1; /** point */ + cocos2d::Vec2 *arg1; /** point */ olua_to_object(L, 1, &self, "cc.Director"); olua_check_object(L, 2, &arg1, "cc.Vec2"); // cocos2d::Vec2 convertToUI(const cocos2d::Vec2 &point) - cocos2d::Vec2 ret = self->convertToUI(arg1); - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec2"); + cocos2d::Vec2 ret = self->convertToUI(*arg1); + int num_ret = olua_copy_object(L, ret, "cc.Vec2"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_Director_convertToUI$2(lua_State *L) +static int _olua_fun_cocos2d_Director_convertToUI$2(lua_State *L) { olua_startinvoke(L); @@ -1264,7 +1879,7 @@ static int _cocos2d_Director_convertToUI$2(lua_State *L) olua_to_object(L, 1, &self, "cc.Director"); olua_pack_object(L, 2, &arg1); - // cocos2d::Vec2 convertToUI(@pack const cocos2d::Vec2 &point) + // @unpack cocos2d::Vec2 convertToUI(@pack const cocos2d::Vec2 &point) cocos2d::Vec2 ret = self->convertToUI(arg1); int num_ret = olua_unpack_object(L, &ret); @@ -1273,21 +1888,21 @@ static int _cocos2d_Director_convertToUI$2(lua_State *L) return num_ret; } -static int _cocos2d_Director_convertToUI(lua_State *L) +static int _olua_fun_cocos2d_Director_convertToUI(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_object(L, 2, "cc.Vec2"))) { // cocos2d::Vec2 convertToUI(const cocos2d::Vec2 &point) - return _cocos2d_Director_convertToUI$1(L); + return _olua_fun_cocos2d_Director_convertToUI$1(L); // } } if (num_args == 2) { // if ((olua_canpack_object(L, 2, (cocos2d::Vec2 *)nullptr))) { - // cocos2d::Vec2 convertToUI(@pack const cocos2d::Vec2 &point) - return _cocos2d_Director_convertToUI$2(L); + // @unpack cocos2d::Vec2 convertToUI(@pack const cocos2d::Vec2 &point) + return _olua_fun_cocos2d_Director_convertToUI$2(L); // } } @@ -1296,7 +1911,7 @@ static int _cocos2d_Director_convertToUI(lua_State *L) return 0; } -static int _cocos2d_Director_drawScene(lua_State *L) +static int _olua_fun_cocos2d_Director_drawScene(lua_State *L) { olua_startinvoke(L); @@ -1312,7 +1927,7 @@ static int _cocos2d_Director_drawScene(lua_State *L) return 0; } -static int _cocos2d_Director_end(lua_State *L) +static int _olua_fun_cocos2d_Director_end_(lua_State *L) { olua_startinvoke(L); @@ -1328,7 +1943,7 @@ static int _cocos2d_Director_end(lua_State *L) return 0; } -static int _cocos2d_Director_getActionManager(lua_State *L) +static int _olua_fun_cocos2d_Director_getActionManager(lua_State *L) { olua_startinvoke(L); @@ -1348,7 +1963,7 @@ static int _cocos2d_Director_getActionManager(lua_State *L) return num_ret; } -static int _cocos2d_Director_getAnimationInterval(lua_State *L) +static int _olua_fun_cocos2d_Director_getAnimationInterval(lua_State *L) { olua_startinvoke(L); @@ -1365,7 +1980,7 @@ static int _cocos2d_Director_getAnimationInterval(lua_State *L) return num_ret; } -static int _cocos2d_Director_getConsole(lua_State *L) +static int _olua_fun_cocos2d_Director_getConsole(lua_State *L) { olua_startinvoke(L); @@ -1382,7 +1997,7 @@ static int _cocos2d_Director_getConsole(lua_State *L) return num_ret; } -static int _cocos2d_Director_getContentScaleFactor(lua_State *L) +static int _olua_fun_cocos2d_Director_getContentScaleFactor(lua_State *L) { olua_startinvoke(L); @@ -1399,7 +2014,7 @@ static int _cocos2d_Director_getContentScaleFactor(lua_State *L) return num_ret; } -static int _cocos2d_Director_getDeltaTime(lua_State *L) +static int _olua_fun_cocos2d_Director_getDeltaTime(lua_State *L) { olua_startinvoke(L); @@ -1416,7 +2031,7 @@ static int _cocos2d_Director_getDeltaTime(lua_State *L) return num_ret; } -static int _cocos2d_Director_getEventDispatcher(lua_State *L) +static int _olua_fun_cocos2d_Director_getEventDispatcher(lua_State *L) { olua_startinvoke(L); @@ -1436,7 +2051,7 @@ static int _cocos2d_Director_getEventDispatcher(lua_State *L) return num_ret; } -static int _cocos2d_Director_getFrameRate(lua_State *L) +static int _olua_fun_cocos2d_Director_getFrameRate(lua_State *L) { olua_startinvoke(L); @@ -1453,7 +2068,7 @@ static int _cocos2d_Director_getFrameRate(lua_State *L) return num_ret; } -static int _cocos2d_Director_getInstance(lua_State *L) +static int _olua_fun_cocos2d_Director_getInstance(lua_State *L) { olua_startinvoke(L); @@ -1466,7 +2081,7 @@ static int _cocos2d_Director_getInstance(lua_State *L) return num_ret; } -static int _cocos2d_Director_getMatrix(lua_State *L) +static int _olua_fun_cocos2d_Director_getMatrix(lua_State *L) { olua_startinvoke(L); @@ -1485,7 +2100,7 @@ static int _cocos2d_Director_getMatrix(lua_State *L) return num_ret; } -static int _cocos2d_Director_getNotificationNode(lua_State *L) +static int _olua_fun_cocos2d_Director_getNotificationNode(lua_State *L) { olua_startinvoke(L); @@ -1505,7 +2120,7 @@ static int _cocos2d_Director_getNotificationNode(lua_State *L) return num_ret; } -static int _cocos2d_Director_getOpenGLView(lua_State *L) +static int _olua_fun_cocos2d_Director_getOpenGLView(lua_State *L) { olua_startinvoke(L); @@ -1525,7 +2140,7 @@ static int _cocos2d_Director_getOpenGLView(lua_State *L) return num_ret; } -static int _cocos2d_Director_getProjection(lua_State *L) +static int _olua_fun_cocos2d_Director_getProjection(lua_State *L) { olua_startinvoke(L); @@ -1542,7 +2157,7 @@ static int _cocos2d_Director_getProjection(lua_State *L) return num_ret; } -static int _cocos2d_Director_getRenderer(lua_State *L) +static int _olua_fun_cocos2d_Director_getRenderer(lua_State *L) { olua_startinvoke(L); @@ -1562,7 +2177,7 @@ static int _cocos2d_Director_getRenderer(lua_State *L) return num_ret; } -static int _cocos2d_Director_getRunningScene(lua_State *L) +static int _olua_fun_cocos2d_Director_getRunningScene(lua_State *L) { olua_startinvoke(L); @@ -1582,7 +2197,7 @@ static int _cocos2d_Director_getRunningScene(lua_State *L) return num_ret; } -static int _cocos2d_Director_getSafeAreaRect(lua_State *L) +static int _olua_fun_cocos2d_Director_getSafeAreaRect(lua_State *L) { olua_startinvoke(L); @@ -1592,14 +2207,14 @@ static int _cocos2d_Director_getSafeAreaRect(lua_State *L) // cocos2d::Rect getSafeAreaRect() cocos2d::Rect ret = self->getSafeAreaRect(); - int num_ret = olua_pushcopy_object(L, ret, "cc.Rect"); + int num_ret = olua_copy_object(L, ret, "cc.Rect"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_Director_getScheduler(lua_State *L) +static int _olua_fun_cocos2d_Director_getScheduler(lua_State *L) { olua_startinvoke(L); @@ -1619,7 +2234,7 @@ static int _cocos2d_Director_getScheduler(lua_State *L) return num_ret; } -static int _cocos2d_Director_getSecondsPerFrame(lua_State *L) +static int _olua_fun_cocos2d_Director_getSecondsPerFrame(lua_State *L) { olua_startinvoke(L); @@ -1636,7 +2251,7 @@ static int _cocos2d_Director_getSecondsPerFrame(lua_State *L) return num_ret; } -static int _cocos2d_Director_getTextureCache(lua_State *L) +static int _olua_fun_cocos2d_Director_getTextureCache(lua_State *L) { olua_startinvoke(L); @@ -1656,7 +2271,7 @@ static int _cocos2d_Director_getTextureCache(lua_State *L) return num_ret; } -static int _cocos2d_Director_getTotalFrames(lua_State *L) +static int _olua_fun_cocos2d_Director_getTotalFrames(lua_State *L) { olua_startinvoke(L); @@ -1673,7 +2288,7 @@ static int _cocos2d_Director_getTotalFrames(lua_State *L) return num_ret; } -static int _cocos2d_Director_getVisibleOrigin(lua_State *L) +static int _olua_fun_cocos2d_Director_getVisibleOrigin(lua_State *L) { olua_startinvoke(L); @@ -1683,14 +2298,14 @@ static int _cocos2d_Director_getVisibleOrigin(lua_State *L) // cocos2d::Vec2 getVisibleOrigin() cocos2d::Vec2 ret = self->getVisibleOrigin(); - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec2"); + int num_ret = olua_copy_object(L, ret, "cc.Vec2"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_Director_getVisibleSize(lua_State *L) +static int _olua_fun_cocos2d_Director_getVisibleSize(lua_State *L) { olua_startinvoke(L); @@ -1700,14 +2315,14 @@ static int _cocos2d_Director_getVisibleSize(lua_State *L) // cocos2d::Size getVisibleSize() cocos2d::Size ret = self->getVisibleSize(); - int num_ret = olua_pushcopy_object(L, ret, "cc.Size"); + int num_ret = olua_copy_object(L, ret, "cc.Size"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_Director_getWinSize(lua_State *L) +static int _olua_fun_cocos2d_Director_getWinSize(lua_State *L) { olua_startinvoke(L); @@ -1724,7 +2339,7 @@ static int _cocos2d_Director_getWinSize(lua_State *L) return num_ret; } -static int _cocos2d_Director_getWinSizeInPixels(lua_State *L) +static int _olua_fun_cocos2d_Director_getWinSizeInPixels(lua_State *L) { olua_startinvoke(L); @@ -1734,14 +2349,14 @@ static int _cocos2d_Director_getWinSizeInPixels(lua_State *L) // cocos2d::Size getWinSizeInPixels() cocos2d::Size ret = self->getWinSizeInPixels(); - int num_ret = olua_pushcopy_object(L, ret, "cc.Size"); + int num_ret = olua_copy_object(L, ret, "cc.Size"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_Director_getZEye(lua_State *L) +static int _olua_fun_cocos2d_Director_getZEye(lua_State *L) { olua_startinvoke(L); @@ -1758,7 +2373,7 @@ static int _cocos2d_Director_getZEye(lua_State *L) return num_ret; } -static int _cocos2d_Director_init(lua_State *L) +static int _olua_fun_cocos2d_Director_init(lua_State *L) { olua_startinvoke(L); @@ -1775,7 +2390,7 @@ static int _cocos2d_Director_init(lua_State *L) return num_ret; } -static int _cocos2d_Director_isDisplayStats(lua_State *L) +static int _olua_fun_cocos2d_Director_isDisplayStats(lua_State *L) { olua_startinvoke(L); @@ -1792,7 +2407,7 @@ static int _cocos2d_Director_isDisplayStats(lua_State *L) return num_ret; } -static int _cocos2d_Director_isNextDeltaTimeZero(lua_State *L) +static int _olua_fun_cocos2d_Director_isNextDeltaTimeZero(lua_State *L) { olua_startinvoke(L); @@ -1809,7 +2424,7 @@ static int _cocos2d_Director_isNextDeltaTimeZero(lua_State *L) return num_ret; } -static int _cocos2d_Director_isPaused(lua_State *L) +static int _olua_fun_cocos2d_Director_isPaused(lua_State *L) { olua_startinvoke(L); @@ -1826,7 +2441,7 @@ static int _cocos2d_Director_isPaused(lua_State *L) return num_ret; } -static int _cocos2d_Director_isSendCleanupToScene(lua_State *L) +static int _olua_fun_cocos2d_Director_isSendCleanupToScene(lua_State *L) { olua_startinvoke(L); @@ -1843,7 +2458,7 @@ static int _cocos2d_Director_isSendCleanupToScene(lua_State *L) return num_ret; } -static int _cocos2d_Director_isValid(lua_State *L) +static int _olua_fun_cocos2d_Director_isValid(lua_State *L) { olua_startinvoke(L); @@ -1860,7 +2475,7 @@ static int _cocos2d_Director_isValid(lua_State *L) return num_ret; } -static int _cocos2d_Director_loadIdentityMatrix(lua_State *L) +static int _olua_fun_cocos2d_Director_loadIdentityMatrix(lua_State *L) { olua_startinvoke(L); @@ -1878,27 +2493,27 @@ static int _cocos2d_Director_loadIdentityMatrix(lua_State *L) return 0; } -static int _cocos2d_Director_loadMatrix(lua_State *L) +static int _olua_fun_cocos2d_Director_loadMatrix(lua_State *L) { olua_startinvoke(L); cocos2d::Director *self = nullptr; cocos2d::MATRIX_STACK_TYPE arg1 = (cocos2d::MATRIX_STACK_TYPE)0; /** type */ - cocos2d::Mat4 arg2; /** mat */ + cocos2d::Mat4 *arg2; /** mat */ olua_to_object(L, 1, &self, "cc.Director"); olua_check_enum(L, 2, &arg1); olua_check_object(L, 3, &arg2, "cc.Mat4"); // void loadMatrix(cocos2d::MATRIX_STACK_TYPE type, const cocos2d::Mat4 &mat) - self->loadMatrix(arg1, arg2); + self->loadMatrix(arg1, *arg2); olua_endinvoke(L); return 0; } -static int _cocos2d_Director_mainLoop$1(lua_State *L) +static int _olua_fun_cocos2d_Director_mainLoop$1(lua_State *L) { olua_startinvoke(L); @@ -1914,7 +2529,7 @@ static int _cocos2d_Director_mainLoop$1(lua_State *L) return 0; } -static int _cocos2d_Director_mainLoop$2(lua_State *L) +static int _olua_fun_cocos2d_Director_mainLoop$2(lua_State *L) { olua_startinvoke(L); @@ -1932,19 +2547,19 @@ static int _cocos2d_Director_mainLoop$2(lua_State *L) return 0; } -static int _cocos2d_Director_mainLoop(lua_State *L) +static int _olua_fun_cocos2d_Director_mainLoop(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 0) { // void mainLoop() - return _cocos2d_Director_mainLoop$1(L); + return _olua_fun_cocos2d_Director_mainLoop$1(L); } if (num_args == 1) { // if ((olua_is_number(L, 2))) { // void mainLoop(float dt) - return _cocos2d_Director_mainLoop$2(L); + return _olua_fun_cocos2d_Director_mainLoop$2(L); // } } @@ -1953,31 +2568,31 @@ static int _cocos2d_Director_mainLoop(lua_State *L) return 0; } -static int _cocos2d_Director_multiplyMatrix(lua_State *L) +static int _olua_fun_cocos2d_Director_multiplyMatrix(lua_State *L) { olua_startinvoke(L); cocos2d::Director *self = nullptr; cocos2d::MATRIX_STACK_TYPE arg1 = (cocos2d::MATRIX_STACK_TYPE)0; /** type */ - cocos2d::Mat4 arg2; /** mat */ + cocos2d::Mat4 *arg2; /** mat */ olua_to_object(L, 1, &self, "cc.Director"); olua_check_enum(L, 2, &arg1); olua_check_object(L, 3, &arg2, "cc.Mat4"); // void multiplyMatrix(cocos2d::MATRIX_STACK_TYPE type, const cocos2d::Mat4 &mat) - self->multiplyMatrix(arg1, arg2); + self->multiplyMatrix(arg1, *arg2); olua_endinvoke(L); return 0; } -static int _cocos2d_Director_new(lua_State *L) +static int _olua_fun_cocos2d_Director_new(lua_State *L) { olua_startinvoke(L); - // Director() + // cocos2d::Director() cocos2d::Director *ret = new cocos2d::Director(); int num_ret = olua_push_object(L, ret, "cc.Director"); olua_postnew(L, ret); @@ -1987,7 +2602,7 @@ static int _cocos2d_Director_new(lua_State *L) return num_ret; } -static int _cocos2d_Director_pause(lua_State *L) +static int _olua_fun_cocos2d_Director_pause(lua_State *L) { olua_startinvoke(L); @@ -2003,7 +2618,7 @@ static int _cocos2d_Director_pause(lua_State *L) return 0; } -static int _cocos2d_Director_popMatrix(lua_State *L) +static int _olua_fun_cocos2d_Director_popMatrix(lua_State *L) { olua_startinvoke(L); @@ -2021,7 +2636,7 @@ static int _cocos2d_Director_popMatrix(lua_State *L) return 0; } -static int _cocos2d_Director_popScene(lua_State *L) +static int _olua_fun_cocos2d_Director_popScene(lua_State *L) { olua_startinvoke(L); @@ -2043,7 +2658,7 @@ static int _cocos2d_Director_popScene(lua_State *L) return 0; } -static int _cocos2d_Director_popToRootScene(lua_State *L) +static int _olua_fun_cocos2d_Director_popToRootScene(lua_State *L) { olua_startinvoke(L); @@ -2065,7 +2680,7 @@ static int _cocos2d_Director_popToRootScene(lua_State *L) return 0; } -static int _cocos2d_Director_popToSceneStackLevel(lua_State *L) +static int _olua_fun_cocos2d_Director_popToSceneStackLevel(lua_State *L) { olua_startinvoke(L); @@ -2089,7 +2704,7 @@ static int _cocos2d_Director_popToSceneStackLevel(lua_State *L) return 0; } -static int _cocos2d_Director_purgeCachedData(lua_State *L) +static int _olua_fun_cocos2d_Director_purgeCachedData(lua_State *L) { olua_startinvoke(L); @@ -2105,7 +2720,7 @@ static int _cocos2d_Director_purgeCachedData(lua_State *L) return 0; } -static int _cocos2d_Director_pushMatrix(lua_State *L) +static int _olua_fun_cocos2d_Director_pushMatrix(lua_State *L) { olua_startinvoke(L); @@ -2123,7 +2738,7 @@ static int _cocos2d_Director_pushMatrix(lua_State *L) return 0; } -static int _cocos2d_Director_pushScene(lua_State *L) +static int _olua_fun_cocos2d_Director_pushScene(lua_State *L) { olua_startinvoke(L); @@ -2144,7 +2759,7 @@ static int _cocos2d_Director_pushScene(lua_State *L) return 0; } -static int _cocos2d_Director_replaceScene(lua_State *L) +static int _olua_fun_cocos2d_Director_replaceScene(lua_State *L) { olua_startinvoke(L); @@ -2169,7 +2784,7 @@ static int _cocos2d_Director_replaceScene(lua_State *L) return 0; } -static int _cocos2d_Director_resetMatrixStack(lua_State *L) +static int _olua_fun_cocos2d_Director_resetMatrixStack(lua_State *L) { olua_startinvoke(L); @@ -2185,7 +2800,7 @@ static int _cocos2d_Director_resetMatrixStack(lua_State *L) return 0; } -static int _cocos2d_Director_restart(lua_State *L) +static int _olua_fun_cocos2d_Director_restart(lua_State *L) { olua_startinvoke(L); @@ -2201,7 +2816,7 @@ static int _cocos2d_Director_restart(lua_State *L) return 0; } -static int _cocos2d_Director_resume(lua_State *L) +static int _olua_fun_cocos2d_Director_resume(lua_State *L) { olua_startinvoke(L); @@ -2217,7 +2832,7 @@ static int _cocos2d_Director_resume(lua_State *L) return 0; } -static int _cocos2d_Director_runWithScene(lua_State *L) +static int _olua_fun_cocos2d_Director_runWithScene(lua_State *L) { olua_startinvoke(L); @@ -2238,7 +2853,7 @@ static int _cocos2d_Director_runWithScene(lua_State *L) return 0; } -static int _cocos2d_Director_setActionManager(lua_State *L) +static int _olua_fun_cocos2d_Director_setActionManager(lua_State *L) { olua_startinvoke(L); @@ -2259,7 +2874,7 @@ static int _cocos2d_Director_setActionManager(lua_State *L) return 0; } -static int _cocos2d_Director_setAnimationInterval(lua_State *L) +static int _olua_fun_cocos2d_Director_setAnimationInterval(lua_State *L) { olua_startinvoke(L); @@ -2277,7 +2892,7 @@ static int _cocos2d_Director_setAnimationInterval(lua_State *L) return 0; } -static int _cocos2d_Director_setClearColor(lua_State *L) +static int _olua_fun_cocos2d_Director_setClearColor(lua_State *L) { olua_startinvoke(L); @@ -2295,7 +2910,7 @@ static int _cocos2d_Director_setClearColor(lua_State *L) return 0; } -static int _cocos2d_Director_setContentScaleFactor(lua_State *L) +static int _olua_fun_cocos2d_Director_setContentScaleFactor(lua_State *L) { olua_startinvoke(L); @@ -2313,7 +2928,7 @@ static int _cocos2d_Director_setContentScaleFactor(lua_State *L) return 0; } -static int _cocos2d_Director_setDefaultValues(lua_State *L) +static int _olua_fun_cocos2d_Director_setDefaultValues(lua_State *L) { olua_startinvoke(L); @@ -2329,7 +2944,7 @@ static int _cocos2d_Director_setDefaultValues(lua_State *L) return 0; } -static int _cocos2d_Director_setDisplayStats(lua_State *L) +static int _olua_fun_cocos2d_Director_setDisplayStats(lua_State *L) { olua_startinvoke(L); @@ -2347,7 +2962,7 @@ static int _cocos2d_Director_setDisplayStats(lua_State *L) return 0; } -static int _cocos2d_Director_setEventDispatcher(lua_State *L) +static int _olua_fun_cocos2d_Director_setEventDispatcher(lua_State *L) { olua_startinvoke(L); @@ -2368,7 +2983,7 @@ static int _cocos2d_Director_setEventDispatcher(lua_State *L) return 0; } -static int _cocos2d_Director_setGLDefaultValues(lua_State *L) +static int _olua_fun_cocos2d_Director_setGLDefaultValues(lua_State *L) { olua_startinvoke(L); @@ -2384,7 +2999,7 @@ static int _cocos2d_Director_setGLDefaultValues(lua_State *L) return 0; } -static int _cocos2d_Director_setNextDeltaTimeZero(lua_State *L) +static int _olua_fun_cocos2d_Director_setNextDeltaTimeZero(lua_State *L) { olua_startinvoke(L); @@ -2402,7 +3017,7 @@ static int _cocos2d_Director_setNextDeltaTimeZero(lua_State *L) return 0; } -static int _cocos2d_Director_setNotificationNode(lua_State *L) +static int _olua_fun_cocos2d_Director_setNotificationNode(lua_State *L) { olua_startinvoke(L); @@ -2423,7 +3038,7 @@ static int _cocos2d_Director_setNotificationNode(lua_State *L) return 0; } -static int _cocos2d_Director_setOpenGLView(lua_State *L) +static int _olua_fun_cocos2d_Director_setOpenGLView(lua_State *L) { olua_startinvoke(L); @@ -2444,7 +3059,7 @@ static int _cocos2d_Director_setOpenGLView(lua_State *L) return 0; } -static int _cocos2d_Director_setProjection(lua_State *L) +static int _olua_fun_cocos2d_Director_setProjection(lua_State *L) { olua_startinvoke(L); @@ -2462,7 +3077,7 @@ static int _cocos2d_Director_setProjection(lua_State *L) return 0; } -static int _cocos2d_Director_setScheduler(lua_State *L) +static int _olua_fun_cocos2d_Director_setScheduler(lua_State *L) { olua_startinvoke(L); @@ -2483,7 +3098,7 @@ static int _cocos2d_Director_setScheduler(lua_State *L) return 0; } -static int _cocos2d_Director_setViewport(lua_State *L) +static int _olua_fun_cocos2d_Director_setViewport(lua_State *L) { olua_startinvoke(L); @@ -2499,7 +3114,7 @@ static int _cocos2d_Director_setViewport(lua_State *L) return 0; } -static int _cocos2d_Director_startAnimation(lua_State *L) +static int _olua_fun_cocos2d_Director_startAnimation(lua_State *L) { olua_startinvoke(L); @@ -2515,7 +3130,7 @@ static int _cocos2d_Director_startAnimation(lua_State *L) return 0; } -static int _cocos2d_Director_stopAnimation(lua_State *L) +static int _olua_fun_cocos2d_Director_stopAnimation(lua_State *L) { olua_startinvoke(L); @@ -2531,383 +3146,130 @@ static int _cocos2d_Director_stopAnimation(lua_State *L) return 0; } -static int _cocos2d_Director_get_EVENT_AFTER_DRAW(lua_State *L) +static int _olua_cls_cc_Director(lua_State *L) { - olua_startinvoke(L); - - // static const char *EVENT_AFTER_DRAW - const char *ret = cocos2d::Director::EVENT_AFTER_DRAW; - int num_ret = olua_push_string(L, ret); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_Director_set_EVENT_AFTER_DRAW(lua_State *L) -{ - olua_startinvoke(L); - - const char *arg1 = nullptr; /** EVENT_AFTER_DRAW */ - - olua_check_string(L, 1, &arg1); - - // static const char *EVENT_AFTER_DRAW - cocos2d::Director::EVENT_AFTER_DRAW = arg1; - - olua_endinvoke(L); - - return 0; -} - -static int _cocos2d_Director_get_EVENT_AFTER_SET_NEXT_SCENE(lua_State *L) -{ - olua_startinvoke(L); - - // static const char *EVENT_AFTER_SET_NEXT_SCENE - const char *ret = cocos2d::Director::EVENT_AFTER_SET_NEXT_SCENE; - int num_ret = olua_push_string(L, ret); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_Director_set_EVENT_AFTER_SET_NEXT_SCENE(lua_State *L) -{ - olua_startinvoke(L); - - const char *arg1 = nullptr; /** EVENT_AFTER_SET_NEXT_SCENE */ - - olua_check_string(L, 1, &arg1); - - // static const char *EVENT_AFTER_SET_NEXT_SCENE - cocos2d::Director::EVENT_AFTER_SET_NEXT_SCENE = arg1; - - olua_endinvoke(L); - - return 0; -} - -static int _cocos2d_Director_get_EVENT_AFTER_UPDATE(lua_State *L) -{ - olua_startinvoke(L); - - // static const char *EVENT_AFTER_UPDATE - const char *ret = cocos2d::Director::EVENT_AFTER_UPDATE; - int num_ret = olua_push_string(L, ret); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_Director_set_EVENT_AFTER_UPDATE(lua_State *L) -{ - olua_startinvoke(L); - - const char *arg1 = nullptr; /** EVENT_AFTER_UPDATE */ - - olua_check_string(L, 1, &arg1); - - // static const char *EVENT_AFTER_UPDATE - cocos2d::Director::EVENT_AFTER_UPDATE = arg1; - - olua_endinvoke(L); - - return 0; -} - -static int _cocos2d_Director_get_EVENT_AFTER_VISIT(lua_State *L) -{ - olua_startinvoke(L); - - // static const char *EVENT_AFTER_VISIT - const char *ret = cocos2d::Director::EVENT_AFTER_VISIT; - int num_ret = olua_push_string(L, ret); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_Director_set_EVENT_AFTER_VISIT(lua_State *L) -{ - olua_startinvoke(L); - - const char *arg1 = nullptr; /** EVENT_AFTER_VISIT */ - - olua_check_string(L, 1, &arg1); - - // static const char *EVENT_AFTER_VISIT - cocos2d::Director::EVENT_AFTER_VISIT = arg1; - - olua_endinvoke(L); - - return 0; -} - -static int _cocos2d_Director_get_EVENT_BEFORE_DRAW(lua_State *L) -{ - olua_startinvoke(L); - - // static const char *EVENT_BEFORE_DRAW - const char *ret = cocos2d::Director::EVENT_BEFORE_DRAW; - int num_ret = olua_push_string(L, ret); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_Director_set_EVENT_BEFORE_DRAW(lua_State *L) -{ - olua_startinvoke(L); - - const char *arg1 = nullptr; /** EVENT_BEFORE_DRAW */ - - olua_check_string(L, 1, &arg1); - - // static const char *EVENT_BEFORE_DRAW - cocos2d::Director::EVENT_BEFORE_DRAW = arg1; - - olua_endinvoke(L); - - return 0; -} - -static int _cocos2d_Director_get_EVENT_BEFORE_SET_NEXT_SCENE(lua_State *L) -{ - olua_startinvoke(L); - - // static const char *EVENT_BEFORE_SET_NEXT_SCENE - const char *ret = cocos2d::Director::EVENT_BEFORE_SET_NEXT_SCENE; - int num_ret = olua_push_string(L, ret); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_Director_set_EVENT_BEFORE_SET_NEXT_SCENE(lua_State *L) -{ - olua_startinvoke(L); - - const char *arg1 = nullptr; /** EVENT_BEFORE_SET_NEXT_SCENE */ - - olua_check_string(L, 1, &arg1); - - // static const char *EVENT_BEFORE_SET_NEXT_SCENE - cocos2d::Director::EVENT_BEFORE_SET_NEXT_SCENE = arg1; - - olua_endinvoke(L); - - return 0; -} - -static int _cocos2d_Director_get_EVENT_BEFORE_UPDATE(lua_State *L) -{ - olua_startinvoke(L); - - // static const char *EVENT_BEFORE_UPDATE - const char *ret = cocos2d::Director::EVENT_BEFORE_UPDATE; - int num_ret = olua_push_string(L, ret); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_Director_set_EVENT_BEFORE_UPDATE(lua_State *L) -{ - olua_startinvoke(L); - - const char *arg1 = nullptr; /** EVENT_BEFORE_UPDATE */ - - olua_check_string(L, 1, &arg1); - - // static const char *EVENT_BEFORE_UPDATE - cocos2d::Director::EVENT_BEFORE_UPDATE = arg1; - - olua_endinvoke(L); - - return 0; -} - -static int _cocos2d_Director_get_EVENT_PROJECTION_CHANGED(lua_State *L) -{ - olua_startinvoke(L); - - // static const char *EVENT_PROJECTION_CHANGED - const char *ret = cocos2d::Director::EVENT_PROJECTION_CHANGED; - int num_ret = olua_push_string(L, ret); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_Director_set_EVENT_PROJECTION_CHANGED(lua_State *L) -{ - olua_startinvoke(L); - - const char *arg1 = nullptr; /** EVENT_PROJECTION_CHANGED */ - - olua_check_string(L, 1, &arg1); - - // static const char *EVENT_PROJECTION_CHANGED - cocos2d::Director::EVENT_PROJECTION_CHANGED = arg1; - - olua_endinvoke(L); - - return 0; -} - -static int _cocos2d_Director_get_EVENT_RESET(lua_State *L) -{ - olua_startinvoke(L); - - // static const char *EVENT_RESET - const char *ret = cocos2d::Director::EVENT_RESET; - int num_ret = olua_push_string(L, ret); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_Director_set_EVENT_RESET(lua_State *L) -{ - olua_startinvoke(L); - - const char *arg1 = nullptr; /** EVENT_RESET */ - - olua_check_string(L, 1, &arg1); - - // static const char *EVENT_RESET - cocos2d::Director::EVENT_RESET = arg1; - - olua_endinvoke(L); + oluacls_class(L, "cc.Director"); + oluacls_func(L, "convertToGL", _olua_fun_cocos2d_Director_convertToGL); + oluacls_func(L, "convertToUI", _olua_fun_cocos2d_Director_convertToUI); + oluacls_func(L, "drawScene", _olua_fun_cocos2d_Director_drawScene); + oluacls_func(L, "end_", _olua_fun_cocos2d_Director_end_); + oluacls_func(L, "getActionManager", _olua_fun_cocos2d_Director_getActionManager); + oluacls_func(L, "getAnimationInterval", _olua_fun_cocos2d_Director_getAnimationInterval); + oluacls_func(L, "getConsole", _olua_fun_cocos2d_Director_getConsole); + oluacls_func(L, "getContentScaleFactor", _olua_fun_cocos2d_Director_getContentScaleFactor); + oluacls_func(L, "getDeltaTime", _olua_fun_cocos2d_Director_getDeltaTime); + oluacls_func(L, "getEventDispatcher", _olua_fun_cocos2d_Director_getEventDispatcher); + oluacls_func(L, "getFrameRate", _olua_fun_cocos2d_Director_getFrameRate); + oluacls_func(L, "getInstance", _olua_fun_cocos2d_Director_getInstance); + oluacls_func(L, "getMatrix", _olua_fun_cocos2d_Director_getMatrix); + oluacls_func(L, "getNotificationNode", _olua_fun_cocos2d_Director_getNotificationNode); + oluacls_func(L, "getOpenGLView", _olua_fun_cocos2d_Director_getOpenGLView); + oluacls_func(L, "getProjection", _olua_fun_cocos2d_Director_getProjection); + oluacls_func(L, "getRenderer", _olua_fun_cocos2d_Director_getRenderer); + oluacls_func(L, "getRunningScene", _olua_fun_cocos2d_Director_getRunningScene); + oluacls_func(L, "getSafeAreaRect", _olua_fun_cocos2d_Director_getSafeAreaRect); + oluacls_func(L, "getScheduler", _olua_fun_cocos2d_Director_getScheduler); + oluacls_func(L, "getSecondsPerFrame", _olua_fun_cocos2d_Director_getSecondsPerFrame); + oluacls_func(L, "getTextureCache", _olua_fun_cocos2d_Director_getTextureCache); + oluacls_func(L, "getTotalFrames", _olua_fun_cocos2d_Director_getTotalFrames); + oluacls_func(L, "getVisibleOrigin", _olua_fun_cocos2d_Director_getVisibleOrigin); + oluacls_func(L, "getVisibleSize", _olua_fun_cocos2d_Director_getVisibleSize); + oluacls_func(L, "getWinSize", _olua_fun_cocos2d_Director_getWinSize); + oluacls_func(L, "getWinSizeInPixels", _olua_fun_cocos2d_Director_getWinSizeInPixels); + oluacls_func(L, "getZEye", _olua_fun_cocos2d_Director_getZEye); + oluacls_func(L, "init", _olua_fun_cocos2d_Director_init); + oluacls_func(L, "isDisplayStats", _olua_fun_cocos2d_Director_isDisplayStats); + oluacls_func(L, "isNextDeltaTimeZero", _olua_fun_cocos2d_Director_isNextDeltaTimeZero); + oluacls_func(L, "isPaused", _olua_fun_cocos2d_Director_isPaused); + oluacls_func(L, "isSendCleanupToScene", _olua_fun_cocos2d_Director_isSendCleanupToScene); + oluacls_func(L, "isValid", _olua_fun_cocos2d_Director_isValid); + oluacls_func(L, "loadIdentityMatrix", _olua_fun_cocos2d_Director_loadIdentityMatrix); + oluacls_func(L, "loadMatrix", _olua_fun_cocos2d_Director_loadMatrix); + oluacls_func(L, "mainLoop", _olua_fun_cocos2d_Director_mainLoop); + oluacls_func(L, "multiplyMatrix", _olua_fun_cocos2d_Director_multiplyMatrix); + oluacls_func(L, "new", _olua_fun_cocos2d_Director_new); + oluacls_func(L, "pause", _olua_fun_cocos2d_Director_pause); + oluacls_func(L, "popMatrix", _olua_fun_cocos2d_Director_popMatrix); + oluacls_func(L, "popScene", _olua_fun_cocos2d_Director_popScene); + oluacls_func(L, "popToRootScene", _olua_fun_cocos2d_Director_popToRootScene); + oluacls_func(L, "popToSceneStackLevel", _olua_fun_cocos2d_Director_popToSceneStackLevel); + oluacls_func(L, "purgeCachedData", _olua_fun_cocos2d_Director_purgeCachedData); + oluacls_func(L, "pushMatrix", _olua_fun_cocos2d_Director_pushMatrix); + oluacls_func(L, "pushScene", _olua_fun_cocos2d_Director_pushScene); + oluacls_func(L, "replaceScene", _olua_fun_cocos2d_Director_replaceScene); + oluacls_func(L, "resetMatrixStack", _olua_fun_cocos2d_Director_resetMatrixStack); + oluacls_func(L, "restart", _olua_fun_cocos2d_Director_restart); + oluacls_func(L, "resume", _olua_fun_cocos2d_Director_resume); + oluacls_func(L, "runWithScene", _olua_fun_cocos2d_Director_runWithScene); + oluacls_func(L, "setActionManager", _olua_fun_cocos2d_Director_setActionManager); + oluacls_func(L, "setAnimationInterval", _olua_fun_cocos2d_Director_setAnimationInterval); + oluacls_func(L, "setClearColor", _olua_fun_cocos2d_Director_setClearColor); + oluacls_func(L, "setContentScaleFactor", _olua_fun_cocos2d_Director_setContentScaleFactor); + oluacls_func(L, "setDefaultValues", _olua_fun_cocos2d_Director_setDefaultValues); + oluacls_func(L, "setDisplayStats", _olua_fun_cocos2d_Director_setDisplayStats); + oluacls_func(L, "setEventDispatcher", _olua_fun_cocos2d_Director_setEventDispatcher); + oluacls_func(L, "setGLDefaultValues", _olua_fun_cocos2d_Director_setGLDefaultValues); + oluacls_func(L, "setNextDeltaTimeZero", _olua_fun_cocos2d_Director_setNextDeltaTimeZero); + oluacls_func(L, "setNotificationNode", _olua_fun_cocos2d_Director_setNotificationNode); + oluacls_func(L, "setOpenGLView", _olua_fun_cocos2d_Director_setOpenGLView); + oluacls_func(L, "setProjection", _olua_fun_cocos2d_Director_setProjection); + oluacls_func(L, "setScheduler", _olua_fun_cocos2d_Director_setScheduler); + oluacls_func(L, "setViewport", _olua_fun_cocos2d_Director_setViewport); + oluacls_func(L, "startAnimation", _olua_fun_cocos2d_Director_startAnimation); + oluacls_func(L, "stopAnimation", _olua_fun_cocos2d_Director_stopAnimation); + oluacls_prop(L, "actionManager", _olua_fun_cocos2d_Director_getActionManager, _olua_fun_cocos2d_Director_setActionManager); + oluacls_prop(L, "animationInterval", _olua_fun_cocos2d_Director_getAnimationInterval, _olua_fun_cocos2d_Director_setAnimationInterval); + oluacls_prop(L, "console", _olua_fun_cocos2d_Director_getConsole, nullptr); + oluacls_prop(L, "contentScaleFactor", _olua_fun_cocos2d_Director_getContentScaleFactor, _olua_fun_cocos2d_Director_setContentScaleFactor); + oluacls_prop(L, "deltaTime", _olua_fun_cocos2d_Director_getDeltaTime, nullptr); + oluacls_prop(L, "displayStats", _olua_fun_cocos2d_Director_isDisplayStats, _olua_fun_cocos2d_Director_setDisplayStats); + oluacls_prop(L, "eventDispatcher", _olua_fun_cocos2d_Director_getEventDispatcher, _olua_fun_cocos2d_Director_setEventDispatcher); + oluacls_prop(L, "frameRate", _olua_fun_cocos2d_Director_getFrameRate, nullptr); + oluacls_prop(L, "instance", _olua_fun_cocos2d_Director_getInstance, nullptr); + oluacls_prop(L, "nextDeltaTimeZero", _olua_fun_cocos2d_Director_isNextDeltaTimeZero, _olua_fun_cocos2d_Director_setNextDeltaTimeZero); + oluacls_prop(L, "notificationNode", _olua_fun_cocos2d_Director_getNotificationNode, _olua_fun_cocos2d_Director_setNotificationNode); + oluacls_prop(L, "openGLView", _olua_fun_cocos2d_Director_getOpenGLView, _olua_fun_cocos2d_Director_setOpenGLView); + oluacls_prop(L, "paused", _olua_fun_cocos2d_Director_isPaused, nullptr); + oluacls_prop(L, "projection", _olua_fun_cocos2d_Director_getProjection, _olua_fun_cocos2d_Director_setProjection); + oluacls_prop(L, "renderer", _olua_fun_cocos2d_Director_getRenderer, nullptr); + oluacls_prop(L, "runningScene", _olua_fun_cocos2d_Director_getRunningScene, nullptr); + oluacls_prop(L, "safeAreaRect", _olua_fun_cocos2d_Director_getSafeAreaRect, nullptr); + oluacls_prop(L, "scheduler", _olua_fun_cocos2d_Director_getScheduler, _olua_fun_cocos2d_Director_setScheduler); + oluacls_prop(L, "secondsPerFrame", _olua_fun_cocos2d_Director_getSecondsPerFrame, nullptr); + oluacls_prop(L, "sendCleanupToScene", _olua_fun_cocos2d_Director_isSendCleanupToScene, nullptr); + oluacls_prop(L, "textureCache", _olua_fun_cocos2d_Director_getTextureCache, nullptr); + oluacls_prop(L, "totalFrames", _olua_fun_cocos2d_Director_getTotalFrames, nullptr); + oluacls_prop(L, "valid", _olua_fun_cocos2d_Director_isValid, nullptr); + oluacls_prop(L, "visibleOrigin", _olua_fun_cocos2d_Director_getVisibleOrigin, nullptr); + oluacls_prop(L, "visibleSize", _olua_fun_cocos2d_Director_getVisibleSize, nullptr); + oluacls_prop(L, "winSize", _olua_fun_cocos2d_Director_getWinSize, nullptr); + oluacls_prop(L, "winSizeInPixels", _olua_fun_cocos2d_Director_getWinSizeInPixels, nullptr); + oluacls_prop(L, "zEye", _olua_fun_cocos2d_Director_getZEye, nullptr); + oluacls_prop(L, "EVENT_AFTER_DRAW", _olua_fun_cocos2d_Director_EVENT_AFTER_DRAW, _olua_fun_cocos2d_Director_EVENT_AFTER_DRAW); + oluacls_prop(L, "EVENT_AFTER_SET_NEXT_SCENE", _olua_fun_cocos2d_Director_EVENT_AFTER_SET_NEXT_SCENE, _olua_fun_cocos2d_Director_EVENT_AFTER_SET_NEXT_SCENE); + oluacls_prop(L, "EVENT_AFTER_UPDATE", _olua_fun_cocos2d_Director_EVENT_AFTER_UPDATE, _olua_fun_cocos2d_Director_EVENT_AFTER_UPDATE); + oluacls_prop(L, "EVENT_AFTER_VISIT", _olua_fun_cocos2d_Director_EVENT_AFTER_VISIT, _olua_fun_cocos2d_Director_EVENT_AFTER_VISIT); + oluacls_prop(L, "EVENT_BEFORE_DRAW", _olua_fun_cocos2d_Director_EVENT_BEFORE_DRAW, _olua_fun_cocos2d_Director_EVENT_BEFORE_DRAW); + oluacls_prop(L, "EVENT_BEFORE_SET_NEXT_SCENE", _olua_fun_cocos2d_Director_EVENT_BEFORE_SET_NEXT_SCENE, _olua_fun_cocos2d_Director_EVENT_BEFORE_SET_NEXT_SCENE); + oluacls_prop(L, "EVENT_BEFORE_UPDATE", _olua_fun_cocos2d_Director_EVENT_BEFORE_UPDATE, _olua_fun_cocos2d_Director_EVENT_BEFORE_UPDATE); + oluacls_prop(L, "EVENT_PROJECTION_CHANGED", _olua_fun_cocos2d_Director_EVENT_PROJECTION_CHANGED, _olua_fun_cocos2d_Director_EVENT_PROJECTION_CHANGED); + oluacls_prop(L, "EVENT_RESET", _olua_fun_cocos2d_Director_EVENT_RESET, _olua_fun_cocos2d_Director_EVENT_RESET); - return 0; + return 1; } OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_Director(lua_State *L) +OLUA_LIB int luaopen_cc_Director(lua_State *L) { - oluacls_class(L, "cc.Director"); - oluacls_func(L, "convertToGL", _cocos2d_Director_convertToGL); - oluacls_func(L, "convertToUI", _cocos2d_Director_convertToUI); - oluacls_func(L, "drawScene", _cocos2d_Director_drawScene); - oluacls_func(L, "end", _cocos2d_Director_end); - oluacls_func(L, "exit", _cocos2d_Director_end); - oluacls_func(L, "getActionManager", _cocos2d_Director_getActionManager); - oluacls_func(L, "getAnimationInterval", _cocos2d_Director_getAnimationInterval); - oluacls_func(L, "getConsole", _cocos2d_Director_getConsole); - oluacls_func(L, "getContentScaleFactor", _cocos2d_Director_getContentScaleFactor); - oluacls_func(L, "getDeltaTime", _cocos2d_Director_getDeltaTime); - oluacls_func(L, "getEventDispatcher", _cocos2d_Director_getEventDispatcher); - oluacls_func(L, "getFrameRate", _cocos2d_Director_getFrameRate); - oluacls_func(L, "getInstance", _cocos2d_Director_getInstance); - oluacls_func(L, "getMatrix", _cocos2d_Director_getMatrix); - oluacls_func(L, "getNotificationNode", _cocos2d_Director_getNotificationNode); - oluacls_func(L, "getOpenGLView", _cocos2d_Director_getOpenGLView); - oluacls_func(L, "getProjection", _cocos2d_Director_getProjection); - oluacls_func(L, "getRenderer", _cocos2d_Director_getRenderer); - oluacls_func(L, "getRunningScene", _cocos2d_Director_getRunningScene); - oluacls_func(L, "getSafeAreaRect", _cocos2d_Director_getSafeAreaRect); - oluacls_func(L, "getScheduler", _cocos2d_Director_getScheduler); - oluacls_func(L, "getSecondsPerFrame", _cocos2d_Director_getSecondsPerFrame); - oluacls_func(L, "getTextureCache", _cocos2d_Director_getTextureCache); - oluacls_func(L, "getTotalFrames", _cocos2d_Director_getTotalFrames); - oluacls_func(L, "getVisibleOrigin", _cocos2d_Director_getVisibleOrigin); - oluacls_func(L, "getVisibleSize", _cocos2d_Director_getVisibleSize); - oluacls_func(L, "getWinSize", _cocos2d_Director_getWinSize); - oluacls_func(L, "getWinSizeInPixels", _cocos2d_Director_getWinSizeInPixels); - oluacls_func(L, "getZEye", _cocos2d_Director_getZEye); - oluacls_func(L, "init", _cocos2d_Director_init); - oluacls_func(L, "isDisplayStats", _cocos2d_Director_isDisplayStats); - oluacls_func(L, "isNextDeltaTimeZero", _cocos2d_Director_isNextDeltaTimeZero); - oluacls_func(L, "isPaused", _cocos2d_Director_isPaused); - oluacls_func(L, "isSendCleanupToScene", _cocos2d_Director_isSendCleanupToScene); - oluacls_func(L, "isValid", _cocos2d_Director_isValid); - oluacls_func(L, "loadIdentityMatrix", _cocos2d_Director_loadIdentityMatrix); - oluacls_func(L, "loadMatrix", _cocos2d_Director_loadMatrix); - oluacls_func(L, "mainLoop", _cocos2d_Director_mainLoop); - oluacls_func(L, "multiplyMatrix", _cocos2d_Director_multiplyMatrix); - oluacls_func(L, "new", _cocos2d_Director_new); - oluacls_func(L, "pause", _cocos2d_Director_pause); - oluacls_func(L, "popMatrix", _cocos2d_Director_popMatrix); - oluacls_func(L, "popScene", _cocos2d_Director_popScene); - oluacls_func(L, "popToRootScene", _cocos2d_Director_popToRootScene); - oluacls_func(L, "popToSceneStackLevel", _cocos2d_Director_popToSceneStackLevel); - oluacls_func(L, "purgeCachedData", _cocos2d_Director_purgeCachedData); - oluacls_func(L, "pushMatrix", _cocos2d_Director_pushMatrix); - oluacls_func(L, "pushScene", _cocos2d_Director_pushScene); - oluacls_func(L, "replaceScene", _cocos2d_Director_replaceScene); - oluacls_func(L, "resetMatrixStack", _cocos2d_Director_resetMatrixStack); - oluacls_func(L, "restart", _cocos2d_Director_restart); - oluacls_func(L, "resume", _cocos2d_Director_resume); - oluacls_func(L, "runWithScene", _cocos2d_Director_runWithScene); - oluacls_func(L, "setActionManager", _cocos2d_Director_setActionManager); - oluacls_func(L, "setAnimationInterval", _cocos2d_Director_setAnimationInterval); - oluacls_func(L, "setClearColor", _cocos2d_Director_setClearColor); - oluacls_func(L, "setContentScaleFactor", _cocos2d_Director_setContentScaleFactor); - oluacls_func(L, "setDefaultValues", _cocos2d_Director_setDefaultValues); - oluacls_func(L, "setDisplayStats", _cocos2d_Director_setDisplayStats); - oluacls_func(L, "setEventDispatcher", _cocos2d_Director_setEventDispatcher); - oluacls_func(L, "setGLDefaultValues", _cocos2d_Director_setGLDefaultValues); - oluacls_func(L, "setNextDeltaTimeZero", _cocos2d_Director_setNextDeltaTimeZero); - oluacls_func(L, "setNotificationNode", _cocos2d_Director_setNotificationNode); - oluacls_func(L, "setOpenGLView", _cocos2d_Director_setOpenGLView); - oluacls_func(L, "setProjection", _cocos2d_Director_setProjection); - oluacls_func(L, "setScheduler", _cocos2d_Director_setScheduler); - oluacls_func(L, "setViewport", _cocos2d_Director_setViewport); - oluacls_func(L, "startAnimation", _cocos2d_Director_startAnimation); - oluacls_func(L, "stopAnimation", _cocos2d_Director_stopAnimation); - oluacls_prop(L, "actionManager", _cocos2d_Director_getActionManager, _cocos2d_Director_setActionManager); - oluacls_prop(L, "animationInterval", _cocos2d_Director_getAnimationInterval, _cocos2d_Director_setAnimationInterval); - oluacls_prop(L, "console", _cocos2d_Director_getConsole, nullptr); - oluacls_prop(L, "contentScaleFactor", _cocos2d_Director_getContentScaleFactor, _cocos2d_Director_setContentScaleFactor); - oluacls_prop(L, "deltaTime", _cocos2d_Director_getDeltaTime, nullptr); - oluacls_prop(L, "displayStats", _cocos2d_Director_isDisplayStats, _cocos2d_Director_setDisplayStats); - oluacls_prop(L, "eventDispatcher", _cocos2d_Director_getEventDispatcher, _cocos2d_Director_setEventDispatcher); - oluacls_prop(L, "frameRate", _cocos2d_Director_getFrameRate, nullptr); - oluacls_prop(L, "instance", _cocos2d_Director_getInstance, nullptr); - oluacls_prop(L, "nextDeltaTimeZero", _cocos2d_Director_isNextDeltaTimeZero, _cocos2d_Director_setNextDeltaTimeZero); - oluacls_prop(L, "notificationNode", _cocos2d_Director_getNotificationNode, _cocos2d_Director_setNotificationNode); - oluacls_prop(L, "openGLView", _cocos2d_Director_getOpenGLView, _cocos2d_Director_setOpenGLView); - oluacls_prop(L, "paused", _cocos2d_Director_isPaused, nullptr); - oluacls_prop(L, "projection", _cocos2d_Director_getProjection, _cocos2d_Director_setProjection); - oluacls_prop(L, "renderer", _cocos2d_Director_getRenderer, nullptr); - oluacls_prop(L, "runningScene", _cocos2d_Director_getRunningScene, nullptr); - oluacls_prop(L, "safeAreaRect", _cocos2d_Director_getSafeAreaRect, nullptr); - oluacls_prop(L, "scheduler", _cocos2d_Director_getScheduler, _cocos2d_Director_setScheduler); - oluacls_prop(L, "secondsPerFrame", _cocos2d_Director_getSecondsPerFrame, nullptr); - oluacls_prop(L, "sendCleanupToScene", _cocos2d_Director_isSendCleanupToScene, nullptr); - oluacls_prop(L, "textureCache", _cocos2d_Director_getTextureCache, nullptr); - oluacls_prop(L, "totalFrames", _cocos2d_Director_getTotalFrames, nullptr); - oluacls_prop(L, "valid", _cocos2d_Director_isValid, nullptr); - oluacls_prop(L, "visibleOrigin", _cocos2d_Director_getVisibleOrigin, nullptr); - oluacls_prop(L, "visibleSize", _cocos2d_Director_getVisibleSize, nullptr); - oluacls_prop(L, "winSize", _cocos2d_Director_getWinSize, nullptr); - oluacls_prop(L, "winSizeInPixels", _cocos2d_Director_getWinSizeInPixels, nullptr); - oluacls_prop(L, "zEye", _cocos2d_Director_getZEye, nullptr); - oluacls_prop(L, "EVENT_AFTER_DRAW", _cocos2d_Director_get_EVENT_AFTER_DRAW, _cocos2d_Director_set_EVENT_AFTER_DRAW); - oluacls_prop(L, "EVENT_AFTER_SET_NEXT_SCENE", _cocos2d_Director_get_EVENT_AFTER_SET_NEXT_SCENE, _cocos2d_Director_set_EVENT_AFTER_SET_NEXT_SCENE); - oluacls_prop(L, "EVENT_AFTER_UPDATE", _cocos2d_Director_get_EVENT_AFTER_UPDATE, _cocos2d_Director_set_EVENT_AFTER_UPDATE); - oluacls_prop(L, "EVENT_AFTER_VISIT", _cocos2d_Director_get_EVENT_AFTER_VISIT, _cocos2d_Director_set_EVENT_AFTER_VISIT); - oluacls_prop(L, "EVENT_BEFORE_DRAW", _cocos2d_Director_get_EVENT_BEFORE_DRAW, _cocos2d_Director_set_EVENT_BEFORE_DRAW); - oluacls_prop(L, "EVENT_BEFORE_SET_NEXT_SCENE", _cocos2d_Director_get_EVENT_BEFORE_SET_NEXT_SCENE, _cocos2d_Director_set_EVENT_BEFORE_SET_NEXT_SCENE); - oluacls_prop(L, "EVENT_BEFORE_UPDATE", _cocos2d_Director_get_EVENT_BEFORE_UPDATE, _cocos2d_Director_set_EVENT_BEFORE_UPDATE); - oluacls_prop(L, "EVENT_PROJECTION_CHANGED", _cocos2d_Director_get_EVENT_PROJECTION_CHANGED, _cocos2d_Director_set_EVENT_PROJECTION_CHANGED); - oluacls_prop(L, "EVENT_RESET", _cocos2d_Director_get_EVENT_RESET, _cocos2d_Director_set_EVENT_RESET); - + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.Director")) { + luaL_error(L, "class not found: cocos2d::Director"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_ccSchedulerFunc___call(lua_State *L) +static int _olua_fun_cocos2d_ccSchedulerFunc___call(lua_State *L) { olua_startinvoke(L); @@ -2919,12 +3281,21 @@ static int _cocos2d_ccSchedulerFunc___call(lua_State *L) return 1; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ccSchedulerFunc(lua_State *L) +static int _olua_cls_cc_ccSchedulerFunc(lua_State *L) { oluacls_class(L, "cc.ccSchedulerFunc"); - oluacls_func(L, "__call", _cocos2d_ccSchedulerFunc___call); + oluacls_func(L, "__call", _olua_fun_cocos2d_ccSchedulerFunc___call); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_ccSchedulerFunc(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.ccSchedulerFunc")) { + luaL_error(L, "class not found: cocos2d::ccSchedulerFunc"); + } return 1; } OLUA_END_DECLS @@ -2943,7 +3314,7 @@ template bool doScheduleUpdate(lua_State *L) return false; } -static int _cocos2d_Scheduler_getTimeScale(lua_State *L) +static int _olua_fun_cocos2d_Scheduler_getTimeScale(lua_State *L) { olua_startinvoke(L); @@ -2960,7 +3331,7 @@ static int _cocos2d_Scheduler_getTimeScale(lua_State *L) return num_ret; } -static int _cocos2d_Scheduler_isScheduled(lua_State *L) +static int _olua_fun_cocos2d_Scheduler_isScheduled(lua_State *L) { olua_startinvoke(L); @@ -2981,7 +3352,7 @@ static int _cocos2d_Scheduler_isScheduled(lua_State *L) return num_ret; } -static int _cocos2d_Scheduler_isTargetPaused(lua_State *L) +static int _olua_fun_cocos2d_Scheduler_isTargetPaused(lua_State *L) { olua_startinvoke(L); @@ -3000,11 +3371,11 @@ static int _cocos2d_Scheduler_isTargetPaused(lua_State *L) return num_ret; } -static int _cocos2d_Scheduler_new(lua_State *L) +static int _olua_fun_cocos2d_Scheduler_new(lua_State *L) { olua_startinvoke(L); - // Scheduler() + // cocos2d::Scheduler() cocos2d::Scheduler *ret = new cocos2d::Scheduler(); int num_ret = olua_push_object(L, ret, "cc.Scheduler"); olua_postnew(L, ret); @@ -3014,7 +3385,7 @@ static int _cocos2d_Scheduler_new(lua_State *L) return num_ret; } -static int _cocos2d_Scheduler_pauseAllTargets(lua_State *L) +static int _olua_fun_cocos2d_Scheduler_pauseAllTargets(lua_State *L) { olua_startinvoke(L); @@ -3033,7 +3404,7 @@ static int _cocos2d_Scheduler_pauseAllTargets(lua_State *L) return num_ret; } -static int _cocos2d_Scheduler_pauseAllTargetsWithMinPriority(lua_State *L) +static int _olua_fun_cocos2d_Scheduler_pauseAllTargetsWithMinPriority(lua_State *L) { olua_startinvoke(L); @@ -3054,7 +3425,7 @@ static int _cocos2d_Scheduler_pauseAllTargetsWithMinPriority(lua_State *L) return num_ret; } -static int _cocos2d_Scheduler_pauseTarget(lua_State *L) +static int _olua_fun_cocos2d_Scheduler_pauseTarget(lua_State *L) { olua_startinvoke(L); @@ -3072,7 +3443,7 @@ static int _cocos2d_Scheduler_pauseTarget(lua_State *L) return 0; } -static int _cocos2d_Scheduler_removeAllFunctionsToBePerformedInCocosThread(lua_State *L) +static int _olua_fun_cocos2d_Scheduler_removeAllFunctionsToBePerformedInCocosThread(lua_State *L) { olua_startinvoke(L); @@ -3088,7 +3459,7 @@ static int _cocos2d_Scheduler_removeAllFunctionsToBePerformedInCocosThread(lua_S return 0; } -static int _cocos2d_Scheduler_resumeTarget(lua_State *L) +static int _olua_fun_cocos2d_Scheduler_resumeTarget(lua_State *L) { olua_startinvoke(L); @@ -3106,7 +3477,7 @@ static int _cocos2d_Scheduler_resumeTarget(lua_State *L) return 0; } -static int _cocos2d_Scheduler_resumeTargets(lua_State *L) +static int _olua_fun_cocos2d_Scheduler_resumeTargets(lua_State *L) { olua_startinvoke(L); @@ -3126,7 +3497,7 @@ static int _cocos2d_Scheduler_resumeTargets(lua_State *L) return 0; } -static int _cocos2d_Scheduler_schedule$1(lua_State *L) +static int _olua_fun_cocos2d_Scheduler_schedule$1(lua_State *L) { olua_startinvoke(L); @@ -3134,7 +3505,7 @@ static int _cocos2d_Scheduler_schedule$1(lua_State *L) cocos2d::ccSchedulerFunc arg1; /** callback */ void *arg2 = nullptr; /** target */ float arg3 = 0; /** interval */ - unsigned int arg4 = 0; /** repeat */ + unsigned int arg4 = 0; /** repeat_ */ float arg5 = 0; /** delay */ bool arg6 = false; /** paused */ std::string arg7; /** key */ @@ -3150,15 +3521,16 @@ static int _cocos2d_Scheduler_schedule$1(lua_State *L) void *cb_store = (void *)arg2; std::string cb_tag = makeScheduleCallbackTag(arg7); - std::string cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + std::string cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](float arg1) { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](float cb_arg1) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); if (olua_contextequal(L, cb_ctx)) { int top = lua_gettop(L); - olua_push_number(L, arg1); + olua_push_number(L, cb_arg1); olua_callback(L, cb_store, cb_name.c_str(), 1); @@ -3166,7 +3538,7 @@ static int _cocos2d_Scheduler_schedule$1(lua_State *L) } }; - // void schedule(@localvar const cocos2d::ccSchedulerFunc &callback, void *target, float interval, unsigned int repeat, float delay, bool paused, const std::string &key) + // void schedule(const cocos2d::ccSchedulerFunc &callback, void *target, float interval, unsigned int repeat_, float delay, bool paused, const std::string &key) self->schedule(arg1, arg2, arg3, arg4, arg5, arg6, arg7); olua_endinvoke(L); @@ -3174,7 +3546,7 @@ static int _cocos2d_Scheduler_schedule$1(lua_State *L) return 0; } -static int _cocos2d_Scheduler_schedule$2(lua_State *L) +static int _olua_fun_cocos2d_Scheduler_schedule$2(lua_State *L) { olua_startinvoke(L); @@ -3194,15 +3566,16 @@ static int _cocos2d_Scheduler_schedule$2(lua_State *L) void *cb_store = (void *)arg2; std::string cb_tag = makeScheduleCallbackTag(arg5); - std::string cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + std::string cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](float arg1) { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](float cb_arg1) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); if (olua_contextequal(L, cb_ctx)) { int top = lua_gettop(L); - olua_push_number(L, arg1); + olua_push_number(L, cb_arg1); olua_callback(L, cb_store, cb_name.c_str(), 1); @@ -3210,7 +3583,7 @@ static int _cocos2d_Scheduler_schedule$2(lua_State *L) } }; - // void schedule(@localvar const cocos2d::ccSchedulerFunc &callback, void *target, float interval, bool paused, const std::string &key) + // void schedule(const cocos2d::ccSchedulerFunc &callback, void *target, float interval, bool paused, const std::string &key) self->schedule(arg1, arg2, arg3, arg4, arg5); olua_endinvoke(L); @@ -3218,21 +3591,21 @@ static int _cocos2d_Scheduler_schedule$2(lua_State *L) return 0; } -static int _cocos2d_Scheduler_schedule(lua_State *L) +static int _olua_fun_cocos2d_Scheduler_schedule(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 5) { // if ((olua_is_callback(L, 2, "cc.ccSchedulerFunc")) && (olua_is_object(L, 3, "void *")) && (olua_is_number(L, 4)) && (olua_is_bool(L, 5)) && (olua_is_string(L, 6))) { - // void schedule(@localvar const cocos2d::ccSchedulerFunc &callback, void *target, float interval, bool paused, const std::string &key) - return _cocos2d_Scheduler_schedule$2(L); + // void schedule(const cocos2d::ccSchedulerFunc &callback, void *target, float interval, bool paused, const std::string &key) + return _olua_fun_cocos2d_Scheduler_schedule$2(L); // } } if (num_args == 7) { // if ((olua_is_callback(L, 2, "cc.ccSchedulerFunc")) && (olua_is_object(L, 3, "void *")) && (olua_is_number(L, 4)) && (olua_is_integer(L, 5)) && (olua_is_number(L, 6)) && (olua_is_bool(L, 7)) && (olua_is_string(L, 8))) { - // void schedule(@localvar const cocos2d::ccSchedulerFunc &callback, void *target, float interval, unsigned int repeat, float delay, bool paused, const std::string &key) - return _cocos2d_Scheduler_schedule$1(L); + // void schedule(const cocos2d::ccSchedulerFunc &callback, void *target, float interval, unsigned int repeat_, float delay, bool paused, const std::string &key) + return _olua_fun_cocos2d_Scheduler_schedule$1(L); // } } @@ -3241,7 +3614,7 @@ static int _cocos2d_Scheduler_schedule(lua_State *L) return 0; } -static int _cocos2d_Scheduler_scheduleUpdate(lua_State *L) +static int _olua_fun_cocos2d_Scheduler_scheduleUpdate(lua_State *L) { olua_startinvoke(L); @@ -3263,7 +3636,7 @@ static int _cocos2d_Scheduler_scheduleUpdate(lua_State *L) return 0; } -static int _cocos2d_Scheduler_setTimeScale(lua_State *L) +static int _olua_fun_cocos2d_Scheduler_setTimeScale(lua_State *L) { olua_startinvoke(L); @@ -3281,7 +3654,7 @@ static int _cocos2d_Scheduler_setTimeScale(lua_State *L) return 0; } -static int _cocos2d_Scheduler_unschedule(lua_State *L) +static int _olua_fun_cocos2d_Scheduler_unschedule(lua_State *L) { olua_startinvoke(L); @@ -3305,7 +3678,7 @@ static int _cocos2d_Scheduler_unschedule(lua_State *L) return 0; } -static int _cocos2d_Scheduler_unscheduleAll(lua_State *L) +static int _olua_fun_cocos2d_Scheduler_unscheduleAll(lua_State *L) { olua_startinvoke(L); @@ -3325,7 +3698,7 @@ static int _cocos2d_Scheduler_unscheduleAll(lua_State *L) return 0; } -static int _cocos2d_Scheduler_unscheduleAllForTarget(lua_State *L) +static int _olua_fun_cocos2d_Scheduler_unscheduleAllForTarget(lua_State *L) { olua_startinvoke(L); @@ -3347,7 +3720,7 @@ static int _cocos2d_Scheduler_unscheduleAllForTarget(lua_State *L) return 0; } -static int _cocos2d_Scheduler_unscheduleAllWithMinPriority(lua_State *L) +static int _olua_fun_cocos2d_Scheduler_unscheduleAllWithMinPriority(lua_State *L) { olua_startinvoke(L); @@ -3365,7 +3738,7 @@ static int _cocos2d_Scheduler_unscheduleAllWithMinPriority(lua_State *L) return 0; } -static int _cocos2d_Scheduler_unscheduleUpdate(lua_State *L) +static int _olua_fun_cocos2d_Scheduler_unscheduleUpdate(lua_State *L) { olua_startinvoke(L); @@ -3383,7 +3756,7 @@ static int _cocos2d_Scheduler_unscheduleUpdate(lua_State *L) return 0; } -static int _cocos2d_Scheduler_update(lua_State *L) +static int _olua_fun_cocos2d_Scheduler_update(lua_State *L) { olua_startinvoke(L); @@ -3401,38 +3774,47 @@ static int _cocos2d_Scheduler_update(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_Scheduler(lua_State *L) +static int _olua_cls_cc_Scheduler(lua_State *L) { oluacls_class(L, "cc.Scheduler"); - oluacls_func(L, "getTimeScale", _cocos2d_Scheduler_getTimeScale); - oluacls_func(L, "isScheduled", _cocos2d_Scheduler_isScheduled); - oluacls_func(L, "isTargetPaused", _cocos2d_Scheduler_isTargetPaused); - oluacls_func(L, "new", _cocos2d_Scheduler_new); - oluacls_func(L, "pauseAllTargets", _cocos2d_Scheduler_pauseAllTargets); - oluacls_func(L, "pauseAllTargetsWithMinPriority", _cocos2d_Scheduler_pauseAllTargetsWithMinPriority); - oluacls_func(L, "pauseTarget", _cocos2d_Scheduler_pauseTarget); - oluacls_func(L, "removeAllFunctionsToBePerformedInCocosThread", _cocos2d_Scheduler_removeAllFunctionsToBePerformedInCocosThread); - oluacls_func(L, "resumeTarget", _cocos2d_Scheduler_resumeTarget); - oluacls_func(L, "resumeTargets", _cocos2d_Scheduler_resumeTargets); - oluacls_func(L, "schedule", _cocos2d_Scheduler_schedule); - oluacls_func(L, "scheduleUpdate", _cocos2d_Scheduler_scheduleUpdate); - oluacls_func(L, "setTimeScale", _cocos2d_Scheduler_setTimeScale); - oluacls_func(L, "unschedule", _cocos2d_Scheduler_unschedule); - oluacls_func(L, "unscheduleAll", _cocos2d_Scheduler_unscheduleAll); - oluacls_func(L, "unscheduleAllForTarget", _cocos2d_Scheduler_unscheduleAllForTarget); - oluacls_func(L, "unscheduleAllWithMinPriority", _cocos2d_Scheduler_unscheduleAllWithMinPriority); - oluacls_func(L, "unscheduleUpdate", _cocos2d_Scheduler_unscheduleUpdate); - oluacls_func(L, "update", _cocos2d_Scheduler_update); - oluacls_prop(L, "timeScale", _cocos2d_Scheduler_getTimeScale, _cocos2d_Scheduler_setTimeScale); + oluacls_func(L, "getTimeScale", _olua_fun_cocos2d_Scheduler_getTimeScale); + oluacls_func(L, "isScheduled", _olua_fun_cocos2d_Scheduler_isScheduled); + oluacls_func(L, "isTargetPaused", _olua_fun_cocos2d_Scheduler_isTargetPaused); + oluacls_func(L, "new", _olua_fun_cocos2d_Scheduler_new); + oluacls_func(L, "pauseAllTargets", _olua_fun_cocos2d_Scheduler_pauseAllTargets); + oluacls_func(L, "pauseAllTargetsWithMinPriority", _olua_fun_cocos2d_Scheduler_pauseAllTargetsWithMinPriority); + oluacls_func(L, "pauseTarget", _olua_fun_cocos2d_Scheduler_pauseTarget); + oluacls_func(L, "removeAllFunctionsToBePerformedInCocosThread", _olua_fun_cocos2d_Scheduler_removeAllFunctionsToBePerformedInCocosThread); + oluacls_func(L, "resumeTarget", _olua_fun_cocos2d_Scheduler_resumeTarget); + oluacls_func(L, "resumeTargets", _olua_fun_cocos2d_Scheduler_resumeTargets); + oluacls_func(L, "schedule", _olua_fun_cocos2d_Scheduler_schedule); + oluacls_func(L, "scheduleUpdate", _olua_fun_cocos2d_Scheduler_scheduleUpdate); + oluacls_func(L, "setTimeScale", _olua_fun_cocos2d_Scheduler_setTimeScale); + oluacls_func(L, "unschedule", _olua_fun_cocos2d_Scheduler_unschedule); + oluacls_func(L, "unscheduleAll", _olua_fun_cocos2d_Scheduler_unscheduleAll); + oluacls_func(L, "unscheduleAllForTarget", _olua_fun_cocos2d_Scheduler_unscheduleAllForTarget); + oluacls_func(L, "unscheduleAllWithMinPriority", _olua_fun_cocos2d_Scheduler_unscheduleAllWithMinPriority); + oluacls_func(L, "unscheduleUpdate", _olua_fun_cocos2d_Scheduler_unscheduleUpdate); + oluacls_func(L, "update", _olua_fun_cocos2d_Scheduler_update); + oluacls_prop(L, "timeScale", _olua_fun_cocos2d_Scheduler_getTimeScale, _olua_fun_cocos2d_Scheduler_setTimeScale); oluacls_const(L, "PRIORITY_NON_SYSTEM_MIN", cocos2d::Scheduler::PRIORITY_NON_SYSTEM_MIN); oluacls_const(L, "PRIORITY_SYSTEM", cocos2d::Scheduler::PRIORITY_SYSTEM); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_Scheduler(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.Scheduler")) { + luaL_error(L, "class not found: cocos2d::Scheduler"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_EventDispatcher_addEventListenerWithFixedPriority(lua_State *L); +static int _olua_fun_cocos2d_EventDispatcher_addEventListenerWithFixedPriority(lua_State *L); static void doRemoveEventListenersForTarget(lua_State *L, cocos2d::Node *target, bool recursive, const char *refname) { @@ -3449,7 +3831,7 @@ static void doRemoveEventListenersForTarget(lua_State *L, cocos2d::Node *target, } } -static int _cocos2d_EventDispatcher_addCustomEventListener(lua_State *L) +static int _olua_fun_cocos2d_EventDispatcher_addCustomEventListener(lua_State *L) { olua_startinvoke(L); @@ -3463,9 +3845,10 @@ static int _cocos2d_EventDispatcher_addCustomEventListener(lua_State *L) void *cb_store = (void *)olua_newobjstub(L, "cc.EventListenerCustom"); std::string cb_tag = (arg1); - std::string cb_name = olua_setcallback(L, cb_store, 3, cb_tag.c_str(), OLUA_TAG_NEW); + std::string cb_name = olua_setcallback(L, cb_store, 3, cb_tag.c_str(), OLUA_TAG_NEW); olua_Context cb_ctx = olua_context(L); - arg2 = [cb_store, cb_name, cb_ctx](cocos2d::EventCustom *arg1) { + // lua_State *ML = olua_mainthread(L); + arg2 = [cb_store, cb_name, cb_ctx /*, ML */](cocos2d::EventCustom *cb_arg1) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); @@ -3473,7 +3856,7 @@ static int _cocos2d_EventDispatcher_addCustomEventListener(lua_State *L) int top = lua_gettop(L); size_t last = olua_push_objpool(L); olua_enable_objpool(L); - olua_push_object(L, arg1, "cc.EventCustom"); + olua_push_object(L, cb_arg1, "cc.EventCustom"); olua_disable_objpool(L); olua_callback(L, cb_store, cb_name.c_str(), 1); @@ -3484,7 +3867,7 @@ static int _cocos2d_EventDispatcher_addCustomEventListener(lua_State *L) } }; - // @addref(listeners |) cocos2d::EventListenerCustom *addCustomEventListener(const std::string &eventName, @localvar const std::function &callback) + // @addref(listeners |) cocos2d::EventListenerCustom *addCustomEventListener(const std::string &eventName, const std::function &callback) cocos2d::EventListenerCustom *ret = self->addCustomEventListener(arg1, arg2); if (olua_pushobjstub(L, ret, cb_store, "cc.EventListenerCustom") == OLUA_OBJ_EXIST) { lua_pushstring(L, cb_name.c_str()); @@ -3502,7 +3885,7 @@ static int _cocos2d_EventDispatcher_addCustomEventListener(lua_State *L) return 1; } -static int _cocos2d_EventDispatcher_addEventListener(lua_State *L) +static int _olua_fun_cocos2d_EventDispatcher_addEventListener(lua_State *L) { olua_startinvoke(L); @@ -3511,10 +3894,10 @@ static int _cocos2d_EventDispatcher_addEventListener(lua_State *L) olua_endinvoke(L); - return _cocos2d_EventDispatcher_addEventListenerWithFixedPriority(L); + return _olua_fun_cocos2d_EventDispatcher_addEventListenerWithFixedPriority(L); } -static int _cocos2d_EventDispatcher_addEventListenerWithFixedPriority(lua_State *L) +static int _olua_fun_cocos2d_EventDispatcher_addEventListenerWithFixedPriority(lua_State *L) { olua_startinvoke(L); @@ -3537,7 +3920,7 @@ static int _cocos2d_EventDispatcher_addEventListenerWithFixedPriority(lua_State return 0; } -static int _cocos2d_EventDispatcher_addEventListenerWithSceneGraphPriority(lua_State *L) +static int _olua_fun_cocos2d_EventDispatcher_addEventListenerWithSceneGraphPriority(lua_State *L) { olua_startinvoke(L); @@ -3560,7 +3943,7 @@ static int _cocos2d_EventDispatcher_addEventListenerWithSceneGraphPriority(lua_S return 0; } -static int _cocos2d_EventDispatcher_dispatchCustomEvent$1(lua_State *L) +static int _olua_fun_cocos2d_EventDispatcher_dispatchCustomEvent$1(lua_State *L) { olua_startinvoke(L); @@ -3580,7 +3963,7 @@ static int _cocos2d_EventDispatcher_dispatchCustomEvent$1(lua_State *L) return 0; } -static int _cocos2d_EventDispatcher_dispatchCustomEvent$2(lua_State *L) +static int _olua_fun_cocos2d_EventDispatcher_dispatchCustomEvent$2(lua_State *L) { olua_startinvoke(L); @@ -3590,7 +3973,7 @@ static int _cocos2d_EventDispatcher_dispatchCustomEvent$2(lua_State *L) olua_to_object(L, 1, &self, "cc.EventDispatcher"); olua_check_string(L, 2, &arg1); - // void dispatchCustomEvent(const std::string &eventName, @optional void *optionalUserData) + // void dispatchCustomEvent(const std::string &eventName) self->dispatchCustomEvent(arg1); olua_endinvoke(L); @@ -3598,21 +3981,21 @@ static int _cocos2d_EventDispatcher_dispatchCustomEvent$2(lua_State *L) return 0; } -static int _cocos2d_EventDispatcher_dispatchCustomEvent(lua_State *L) +static int _olua_fun_cocos2d_EventDispatcher_dispatchCustomEvent(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_string(L, 2))) { - // void dispatchCustomEvent(const std::string &eventName, @optional void *optionalUserData) - return _cocos2d_EventDispatcher_dispatchCustomEvent$2(L); + // void dispatchCustomEvent(const std::string &eventName) + return _olua_fun_cocos2d_EventDispatcher_dispatchCustomEvent$2(L); // } } if (num_args == 2) { // if ((olua_is_string(L, 2)) && (olua_is_object(L, 3, "void *"))) { // void dispatchCustomEvent(const std::string &eventName, @optional void *optionalUserData) - return _cocos2d_EventDispatcher_dispatchCustomEvent$1(L); + return _olua_fun_cocos2d_EventDispatcher_dispatchCustomEvent$1(L); // } } @@ -3621,7 +4004,7 @@ static int _cocos2d_EventDispatcher_dispatchCustomEvent(lua_State *L) return 0; } -static int _cocos2d_EventDispatcher_dispatchEvent(lua_State *L) +static int _olua_fun_cocos2d_EventDispatcher_dispatchEvent(lua_State *L) { olua_startinvoke(L); @@ -3639,7 +4022,7 @@ static int _cocos2d_EventDispatcher_dispatchEvent(lua_State *L) return 0; } -static int _cocos2d_EventDispatcher_hasEventListener(lua_State *L) +static int _olua_fun_cocos2d_EventDispatcher_hasEventListener(lua_State *L) { olua_startinvoke(L); @@ -3658,7 +4041,7 @@ static int _cocos2d_EventDispatcher_hasEventListener(lua_State *L) return num_ret; } -static int _cocos2d_EventDispatcher_isEnabled(lua_State *L) +static int _olua_fun_cocos2d_EventDispatcher_isEnabled(lua_State *L) { olua_startinvoke(L); @@ -3675,11 +4058,11 @@ static int _cocos2d_EventDispatcher_isEnabled(lua_State *L) return num_ret; } -static int _cocos2d_EventDispatcher_new(lua_State *L) +static int _olua_fun_cocos2d_EventDispatcher_new(lua_State *L) { olua_startinvoke(L); - // EventDispatcher() + // cocos2d::EventDispatcher() cocos2d::EventDispatcher *ret = new cocos2d::EventDispatcher(); int num_ret = olua_push_object(L, ret, "cc.EventDispatcher"); olua_postnew(L, ret); @@ -3689,7 +4072,7 @@ static int _cocos2d_EventDispatcher_new(lua_State *L) return num_ret; } -static int _cocos2d_EventDispatcher_pauseEventListenersForTarget$1(lua_State *L) +static int _olua_fun_cocos2d_EventDispatcher_pauseEventListenersForTarget$1(lua_State *L) { olua_startinvoke(L); @@ -3709,7 +4092,7 @@ static int _cocos2d_EventDispatcher_pauseEventListenersForTarget$1(lua_State *L) return 0; } -static int _cocos2d_EventDispatcher_pauseEventListenersForTarget$2(lua_State *L) +static int _olua_fun_cocos2d_EventDispatcher_pauseEventListenersForTarget$2(lua_State *L) { olua_startinvoke(L); @@ -3719,7 +4102,7 @@ static int _cocos2d_EventDispatcher_pauseEventListenersForTarget$2(lua_State *L) olua_to_object(L, 1, &self, "cc.EventDispatcher"); olua_check_object(L, 2, &arg1, "cc.Node"); - // void pauseEventListenersForTarget(cocos2d::Node *target, @optional bool recursive) + // void pauseEventListenersForTarget(cocos2d::Node *target) self->pauseEventListenersForTarget(arg1); olua_endinvoke(L); @@ -3727,21 +4110,21 @@ static int _cocos2d_EventDispatcher_pauseEventListenersForTarget$2(lua_State *L) return 0; } -static int _cocos2d_EventDispatcher_pauseEventListenersForTarget(lua_State *L) +static int _olua_fun_cocos2d_EventDispatcher_pauseEventListenersForTarget(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_object(L, 2, "cc.Node"))) { - // void pauseEventListenersForTarget(cocos2d::Node *target, @optional bool recursive) - return _cocos2d_EventDispatcher_pauseEventListenersForTarget$2(L); + // void pauseEventListenersForTarget(cocos2d::Node *target) + return _olua_fun_cocos2d_EventDispatcher_pauseEventListenersForTarget$2(L); // } } if (num_args == 2) { // if ((olua_is_object(L, 2, "cc.Node")) && (olua_is_bool(L, 3))) { // void pauseEventListenersForTarget(cocos2d::Node *target, @optional bool recursive) - return _cocos2d_EventDispatcher_pauseEventListenersForTarget$1(L); + return _olua_fun_cocos2d_EventDispatcher_pauseEventListenersForTarget$1(L); // } } @@ -3750,7 +4133,7 @@ static int _cocos2d_EventDispatcher_pauseEventListenersForTarget(lua_State *L) return 0; } -static int _cocos2d_EventDispatcher_removeAllEventListeners(lua_State *L) +static int _olua_fun_cocos2d_EventDispatcher_removeAllEventListeners(lua_State *L) { olua_startinvoke(L); @@ -3772,7 +4155,7 @@ static int _cocos2d_EventDispatcher_removeAllEventListeners(lua_State *L) return 0; } -static int _cocos2d_EventDispatcher_removeCustomEventListeners(lua_State *L) +static int _olua_fun_cocos2d_EventDispatcher_removeCustomEventListeners(lua_State *L) { olua_startinvoke(L); @@ -3796,7 +4179,7 @@ static int _cocos2d_EventDispatcher_removeCustomEventListeners(lua_State *L) return 0; } -static int _cocos2d_EventDispatcher_removeEventListener(lua_State *L) +static int _olua_fun_cocos2d_EventDispatcher_removeEventListener(lua_State *L) { olua_startinvoke(L); @@ -3821,7 +4204,7 @@ static int _cocos2d_EventDispatcher_removeEventListener(lua_State *L) return 0; } -static int _cocos2d_EventDispatcher_removeEventListenersForTarget$1(lua_State *L) +static int _olua_fun_cocos2d_EventDispatcher_removeEventListenersForTarget$1(lua_State *L) { olua_startinvoke(L); @@ -3849,7 +4232,7 @@ static int _cocos2d_EventDispatcher_removeEventListenersForTarget$1(lua_State *L return 0; } -static int _cocos2d_EventDispatcher_removeEventListenersForTarget$2(lua_State *L) +static int _olua_fun_cocos2d_EventDispatcher_removeEventListenersForTarget$2(lua_State *L) { olua_startinvoke(L); @@ -3867,7 +4250,7 @@ static int _cocos2d_EventDispatcher_removeEventListenersForTarget$2(lua_State *L } doRemoveEventListenersForTarget(L, node, recursive, "listeners"); - // void removeEventListenersForTarget(cocos2d::Node *target, @optional bool recursive) + // void removeEventListenersForTarget(cocos2d::Node *target) self->removeEventListenersForTarget(arg1); olua_endinvoke(L); @@ -3875,21 +4258,21 @@ static int _cocos2d_EventDispatcher_removeEventListenersForTarget$2(lua_State *L return 0; } -static int _cocos2d_EventDispatcher_removeEventListenersForTarget(lua_State *L) +static int _olua_fun_cocos2d_EventDispatcher_removeEventListenersForTarget(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_object(L, 2, "cc.Node"))) { - // void removeEventListenersForTarget(cocos2d::Node *target, @optional bool recursive) - return _cocos2d_EventDispatcher_removeEventListenersForTarget$2(L); + // void removeEventListenersForTarget(cocos2d::Node *target) + return _olua_fun_cocos2d_EventDispatcher_removeEventListenersForTarget$2(L); // } } if (num_args == 2) { // if ((olua_is_object(L, 2, "cc.Node")) && (olua_is_bool(L, 3))) { // void removeEventListenersForTarget(cocos2d::Node *target, @optional bool recursive) - return _cocos2d_EventDispatcher_removeEventListenersForTarget$1(L); + return _olua_fun_cocos2d_EventDispatcher_removeEventListenersForTarget$1(L); // } } @@ -3898,7 +4281,7 @@ static int _cocos2d_EventDispatcher_removeEventListenersForTarget(lua_State *L) return 0; } -static int _cocos2d_EventDispatcher_removeEventListenersForType(lua_State *L) +static int _olua_fun_cocos2d_EventDispatcher_removeEventListenersForType(lua_State *L) { olua_startinvoke(L); @@ -3922,7 +4305,7 @@ static int _cocos2d_EventDispatcher_removeEventListenersForType(lua_State *L) return 0; } -static int _cocos2d_EventDispatcher_resumeEventListenersForTarget$1(lua_State *L) +static int _olua_fun_cocos2d_EventDispatcher_resumeEventListenersForTarget$1(lua_State *L) { olua_startinvoke(L); @@ -3942,7 +4325,7 @@ static int _cocos2d_EventDispatcher_resumeEventListenersForTarget$1(lua_State *L return 0; } -static int _cocos2d_EventDispatcher_resumeEventListenersForTarget$2(lua_State *L) +static int _olua_fun_cocos2d_EventDispatcher_resumeEventListenersForTarget$2(lua_State *L) { olua_startinvoke(L); @@ -3952,7 +4335,7 @@ static int _cocos2d_EventDispatcher_resumeEventListenersForTarget$2(lua_State *L olua_to_object(L, 1, &self, "cc.EventDispatcher"); olua_check_object(L, 2, &arg1, "cc.Node"); - // void resumeEventListenersForTarget(cocos2d::Node *target, @optional bool recursive) + // void resumeEventListenersForTarget(cocos2d::Node *target) self->resumeEventListenersForTarget(arg1); olua_endinvoke(L); @@ -3960,21 +4343,21 @@ static int _cocos2d_EventDispatcher_resumeEventListenersForTarget$2(lua_State *L return 0; } -static int _cocos2d_EventDispatcher_resumeEventListenersForTarget(lua_State *L) +static int _olua_fun_cocos2d_EventDispatcher_resumeEventListenersForTarget(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_object(L, 2, "cc.Node"))) { - // void resumeEventListenersForTarget(cocos2d::Node *target, @optional bool recursive) - return _cocos2d_EventDispatcher_resumeEventListenersForTarget$2(L); + // void resumeEventListenersForTarget(cocos2d::Node *target) + return _olua_fun_cocos2d_EventDispatcher_resumeEventListenersForTarget$2(L); // } } if (num_args == 2) { // if ((olua_is_object(L, 2, "cc.Node")) && (olua_is_bool(L, 3))) { // void resumeEventListenersForTarget(cocos2d::Node *target, @optional bool recursive) - return _cocos2d_EventDispatcher_resumeEventListenersForTarget$1(L); + return _olua_fun_cocos2d_EventDispatcher_resumeEventListenersForTarget$1(L); // } } @@ -3983,7 +4366,7 @@ static int _cocos2d_EventDispatcher_resumeEventListenersForTarget(lua_State *L) return 0; } -static int _cocos2d_EventDispatcher_setEnabled(lua_State *L) +static int _olua_fun_cocos2d_EventDispatcher_setEnabled(lua_State *L) { olua_startinvoke(L); @@ -4001,7 +4384,7 @@ static int _cocos2d_EventDispatcher_setEnabled(lua_State *L) return 0; } -static int _cocos2d_EventDispatcher_setPriority(lua_State *L) +static int _olua_fun_cocos2d_EventDispatcher_setPriority(lua_State *L) { olua_startinvoke(L); @@ -4021,36 +4404,44 @@ static int _cocos2d_EventDispatcher_setPriority(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_EventDispatcher(lua_State *L) +static int _olua_cls_cc_EventDispatcher(lua_State *L) { oluacls_class(L, "cc.EventDispatcher"); - oluacls_func(L, "addCustomEventListener", _cocos2d_EventDispatcher_addCustomEventListener); - oluacls_func(L, "addEventListener", _cocos2d_EventDispatcher_addEventListener); - oluacls_func(L, "addEventListenerWithFixedPriority", _cocos2d_EventDispatcher_addEventListenerWithFixedPriority); - oluacls_func(L, "addEventListenerWithSceneGraphPriority", _cocos2d_EventDispatcher_addEventListenerWithSceneGraphPriority); - oluacls_func(L, "dispatchCustomEvent", _cocos2d_EventDispatcher_dispatchCustomEvent); - oluacls_func(L, "dispatchEvent", _cocos2d_EventDispatcher_dispatchEvent); - oluacls_func(L, "hasEventListener", _cocos2d_EventDispatcher_hasEventListener); - oluacls_func(L, "isEnabled", _cocos2d_EventDispatcher_isEnabled); - oluacls_func(L, "new", _cocos2d_EventDispatcher_new); - oluacls_func(L, "pauseEventListenersForTarget", _cocos2d_EventDispatcher_pauseEventListenersForTarget); - oluacls_func(L, "removeAllEventListeners", _cocos2d_EventDispatcher_removeAllEventListeners); - oluacls_func(L, "removeCustomEventListeners", _cocos2d_EventDispatcher_removeCustomEventListeners); - oluacls_func(L, "removeEventListener", _cocos2d_EventDispatcher_removeEventListener); - oluacls_func(L, "removeEventListenersForTarget", _cocos2d_EventDispatcher_removeEventListenersForTarget); - oluacls_func(L, "removeEventListenersForType", _cocos2d_EventDispatcher_removeEventListenersForType); - oluacls_func(L, "resumeEventListenersForTarget", _cocos2d_EventDispatcher_resumeEventListenersForTarget); - oluacls_func(L, "setEnabled", _cocos2d_EventDispatcher_setEnabled); - oluacls_func(L, "setPriority", _cocos2d_EventDispatcher_setPriority); - oluacls_prop(L, "enabled", _cocos2d_EventDispatcher_isEnabled, _cocos2d_EventDispatcher_setEnabled); + oluacls_func(L, "addCustomEventListener", _olua_fun_cocos2d_EventDispatcher_addCustomEventListener); + oluacls_func(L, "addEventListener", _olua_fun_cocos2d_EventDispatcher_addEventListener); + oluacls_func(L, "addEventListenerWithFixedPriority", _olua_fun_cocos2d_EventDispatcher_addEventListenerWithFixedPriority); + oluacls_func(L, "addEventListenerWithSceneGraphPriority", _olua_fun_cocos2d_EventDispatcher_addEventListenerWithSceneGraphPriority); + oluacls_func(L, "dispatchCustomEvent", _olua_fun_cocos2d_EventDispatcher_dispatchCustomEvent); + oluacls_func(L, "dispatchEvent", _olua_fun_cocos2d_EventDispatcher_dispatchEvent); + oluacls_func(L, "hasEventListener", _olua_fun_cocos2d_EventDispatcher_hasEventListener); + oluacls_func(L, "isEnabled", _olua_fun_cocos2d_EventDispatcher_isEnabled); + oluacls_func(L, "new", _olua_fun_cocos2d_EventDispatcher_new); + oluacls_func(L, "pauseEventListenersForTarget", _olua_fun_cocos2d_EventDispatcher_pauseEventListenersForTarget); + oluacls_func(L, "removeAllEventListeners", _olua_fun_cocos2d_EventDispatcher_removeAllEventListeners); + oluacls_func(L, "removeCustomEventListeners", _olua_fun_cocos2d_EventDispatcher_removeCustomEventListeners); + oluacls_func(L, "removeEventListener", _olua_fun_cocos2d_EventDispatcher_removeEventListener); + oluacls_func(L, "removeEventListenersForTarget", _olua_fun_cocos2d_EventDispatcher_removeEventListenersForTarget); + oluacls_func(L, "removeEventListenersForType", _olua_fun_cocos2d_EventDispatcher_removeEventListenersForType); + oluacls_func(L, "resumeEventListenersForTarget", _olua_fun_cocos2d_EventDispatcher_resumeEventListenersForTarget); + oluacls_func(L, "setEnabled", _olua_fun_cocos2d_EventDispatcher_setEnabled); + oluacls_func(L, "setPriority", _olua_fun_cocos2d_EventDispatcher_setPriority); + oluacls_prop(L, "enabled", _olua_fun_cocos2d_EventDispatcher_isEnabled, _olua_fun_cocos2d_EventDispatcher_setEnabled); return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_EventListener_Type(lua_State *L) +OLUA_LIB int luaopen_cc_EventDispatcher(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.EventDispatcher")) { + luaL_error(L, "class not found: cocos2d::EventDispatcher"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_cc_EventListener_Type(lua_State *L) { oluacls_class(L, "cc.EventListener.Type"); oluacls_func(L, "__index", olua_indexerror); @@ -4067,9 +4458,19 @@ OLUA_LIB int luaopen_cocos2d_EventListener_Type(lua_State *L) return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_EventListener_Type(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.EventListener.Type")) { + luaL_error(L, "class not found: cocos2d::EventListener::Type"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_EventListener_checkAvailable(lua_State *L) +static int _olua_fun_cocos2d_EventListener_checkAvailable(lua_State *L) { olua_startinvoke(L); @@ -4086,7 +4487,7 @@ static int _cocos2d_EventListener_checkAvailable(lua_State *L) return num_ret; } -static int _cocos2d_EventListener_clone(lua_State *L) +static int _olua_fun_cocos2d_EventListener_clone(lua_State *L) { olua_startinvoke(L); @@ -4103,7 +4504,7 @@ static int _cocos2d_EventListener_clone(lua_State *L) return num_ret; } -static int _cocos2d_EventListener_isEnabled(lua_State *L) +static int _olua_fun_cocos2d_EventListener_isEnabled(lua_State *L) { olua_startinvoke(L); @@ -4120,7 +4521,7 @@ static int _cocos2d_EventListener_isEnabled(lua_State *L) return num_ret; } -static int _cocos2d_EventListener_setEnabled(lua_State *L) +static int _olua_fun_cocos2d_EventListener_setEnabled(lua_State *L) { olua_startinvoke(L); @@ -4138,22 +4539,31 @@ static int _cocos2d_EventListener_setEnabled(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_EventListener(lua_State *L) +static int _olua_cls_cc_EventListener(lua_State *L) { oluacls_class(L, "cc.EventListener"); - oluacls_func(L, "checkAvailable", _cocos2d_EventListener_checkAvailable); - oluacls_func(L, "clone", _cocos2d_EventListener_clone); - oluacls_func(L, "isEnabled", _cocos2d_EventListener_isEnabled); - oluacls_func(L, "setEnabled", _cocos2d_EventListener_setEnabled); - oluacls_prop(L, "available", _cocos2d_EventListener_checkAvailable, nullptr); - oluacls_prop(L, "enabled", _cocos2d_EventListener_isEnabled, _cocos2d_EventListener_setEnabled); + oluacls_func(L, "checkAvailable", _olua_fun_cocos2d_EventListener_checkAvailable); + oluacls_func(L, "clone", _olua_fun_cocos2d_EventListener_clone); + oluacls_func(L, "isEnabled", _olua_fun_cocos2d_EventListener_isEnabled); + oluacls_func(L, "setEnabled", _olua_fun_cocos2d_EventListener_setEnabled); + oluacls_prop(L, "available", _olua_fun_cocos2d_EventListener_checkAvailable, nullptr); + oluacls_prop(L, "enabled", _olua_fun_cocos2d_EventListener_isEnabled, _olua_fun_cocos2d_EventListener_setEnabled); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_EventListener(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.EventListener")) { + luaL_error(L, "class not found: cocos2d::EventListener"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_EventListenerTouchOneByOne_ccTouchBeganCallback___call(lua_State *L) +static int _olua_fun_cocos2d_EventListenerTouchOneByOne_ccTouchBeganCallback___call(lua_State *L) { olua_startinvoke(L); @@ -4165,17 +4575,26 @@ static int _cocos2d_EventListenerTouchOneByOne_ccTouchBeganCallback___call(lua_S return 1; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_EventListenerTouchOneByOne_ccTouchBeganCallback(lua_State *L) +static int _olua_cls_cc_EventListenerTouchOneByOne_ccTouchBeganCallback(lua_State *L) { oluacls_class(L, "cc.EventListenerTouchOneByOne.ccTouchBeganCallback"); - oluacls_func(L, "__call", _cocos2d_EventListenerTouchOneByOne_ccTouchBeganCallback___call); + oluacls_func(L, "__call", _olua_fun_cocos2d_EventListenerTouchOneByOne_ccTouchBeganCallback___call); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_EventListenerTouchOneByOne_ccTouchBeganCallback(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.EventListenerTouchOneByOne.ccTouchBeganCallback")) { + luaL_error(L, "class not found: cocos2d::EventListenerTouchOneByOne::ccTouchBeganCallback"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_EventListenerTouchOneByOne_ccTouchCallback___call(lua_State *L) +static int _olua_fun_cocos2d_EventListenerTouchOneByOne_ccTouchCallback___call(lua_State *L) { olua_startinvoke(L); @@ -4187,34 +4606,26 @@ static int _cocos2d_EventListenerTouchOneByOne_ccTouchCallback___call(lua_State return 1; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_EventListenerTouchOneByOne_ccTouchCallback(lua_State *L) +static int _olua_cls_cc_EventListenerTouchOneByOne_ccTouchCallback(lua_State *L) { oluacls_class(L, "cc.EventListenerTouchOneByOne.ccTouchCallback"); - oluacls_func(L, "__call", _cocos2d_EventListenerTouchOneByOne_ccTouchCallback___call); + oluacls_func(L, "__call", _olua_fun_cocos2d_EventListenerTouchOneByOne_ccTouchCallback___call); return 1; } -OLUA_END_DECLS -static int _cocos2d_EventListenerTouchOneByOne_clone(lua_State *L) +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_EventListenerTouchOneByOne_ccTouchCallback(lua_State *L) { - olua_startinvoke(L); - - cocos2d::EventListenerTouchOneByOne *self = nullptr; - - olua_to_object(L, 1, &self, "cc.EventListenerTouchOneByOne"); - - // cocos2d::EventListenerTouchOneByOne *clone() - cocos2d::EventListenerTouchOneByOne *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.EventListenerTouchOneByOne"); - - olua_endinvoke(L); - - return num_ret; + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.EventListenerTouchOneByOne.ccTouchCallback")) { + luaL_error(L, "class not found: cocos2d::EventListenerTouchOneByOne::ccTouchCallback"); + } + return 1; } +OLUA_END_DECLS -static int _cocos2d_EventListenerTouchOneByOne_create(lua_State *L) +static int _olua_fun_cocos2d_EventListenerTouchOneByOne_create(lua_State *L) { olua_startinvoke(L); @@ -4227,7 +4638,7 @@ static int _cocos2d_EventListenerTouchOneByOne_create(lua_State *L) return num_ret; } -static int _cocos2d_EventListenerTouchOneByOne_isSwallowTouches(lua_State *L) +static int _olua_fun_cocos2d_EventListenerTouchOneByOne_isSwallowTouches(lua_State *L) { olua_startinvoke(L); @@ -4244,11 +4655,11 @@ static int _cocos2d_EventListenerTouchOneByOne_isSwallowTouches(lua_State *L) return num_ret; } -static int _cocos2d_EventListenerTouchOneByOne_new(lua_State *L) +static int _olua_fun_cocos2d_EventListenerTouchOneByOne_new(lua_State *L) { olua_startinvoke(L); - // EventListenerTouchOneByOne() + // cocos2d::EventListenerTouchOneByOne() cocos2d::EventListenerTouchOneByOne *ret = new cocos2d::EventListenerTouchOneByOne(); int num_ret = olua_push_object(L, ret, "cc.EventListenerTouchOneByOne"); olua_postnew(L, ret); @@ -4258,25 +4669,7 @@ static int _cocos2d_EventListenerTouchOneByOne_new(lua_State *L) return num_ret; } -static int _cocos2d_EventListenerTouchOneByOne_setSwallowTouches(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::EventListenerTouchOneByOne *self = nullptr; - bool arg1 = false; /** needSwallow */ - - olua_to_object(L, 1, &self, "cc.EventListenerTouchOneByOne"); - olua_check_bool(L, 2, &arg1); - - // void setSwallowTouches(bool needSwallow) - self->setSwallowTouches(arg1); - - olua_endinvoke(L); - - return 0; -} - -static int _cocos2d_EventListenerTouchOneByOne_get_onTouchBegan(lua_State *L) +static int _olua_fun_cocos2d_EventListenerTouchOneByOne_onTouchBegan$1(lua_State *L) { olua_startinvoke(L); @@ -4288,7 +4681,7 @@ static int _cocos2d_EventListenerTouchOneByOne_get_onTouchBegan(lua_State *L) std::string cb_tag = "onTouchBegan"; olua_getcallback(L, cb_store, cb_tag.c_str(), OLUA_TAG_EQUAL); - // @nullable @localvar cocos2d::EventListenerTouchOneByOne::ccTouchBeganCallback onTouchBegan + // cocos2d::EventListenerTouchOneByOne::ccTouchBeganCallback onTouchBegan cocos2d::EventListenerTouchOneByOne::ccTouchBeganCallback ret = self->onTouchBegan; int num_ret = olua_push_callback(L, &ret, "cc.EventListenerTouchOneByOne.ccTouchBeganCallback"); @@ -4297,7 +4690,7 @@ static int _cocos2d_EventListenerTouchOneByOne_get_onTouchBegan(lua_State *L) return num_ret; } -static int _cocos2d_EventListenerTouchOneByOne_set_onTouchBegan(lua_State *L) +static int _olua_fun_cocos2d_EventListenerTouchOneByOne_onTouchBegan$2(lua_State *L) { olua_startinvoke(L); @@ -4313,9 +4706,10 @@ static int _cocos2d_EventListenerTouchOneByOne_set_onTouchBegan(lua_State *L) std::string cb_tag = "onTouchBegan"; std::string cb_name; if (olua_isfunction(L, 2)) { - cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](cocos2d::Touch *arg1, cocos2d::Event *arg2) { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](cocos2d::Touch *cb_arg1, cocos2d::Event *cb_arg2) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); bool ret = false; /** ret */ @@ -4323,8 +4717,8 @@ static int _cocos2d_EventListenerTouchOneByOne_set_onTouchBegan(lua_State *L) int top = lua_gettop(L); size_t last = olua_push_objpool(L); olua_enable_objpool(L); - olua_push_object(L, arg1, "cc.Touch"); - olua_push_object(L, arg2, "cc.Event"); + olua_push_object(L, cb_arg1, "cc.Touch"); + olua_push_object(L, cb_arg2, "cc.Event"); olua_disable_objpool(L); olua_callback(L, cb_store, cb_name.c_str(), 2); @@ -4344,7 +4738,7 @@ static int _cocos2d_EventListenerTouchOneByOne_set_onTouchBegan(lua_State *L) arg1 = nullptr; } - // @nullable @localvar cocos2d::EventListenerTouchOneByOne::ccTouchBeganCallback onTouchBegan + // cocos2d::EventListenerTouchOneByOne::ccTouchBeganCallback onTouchBegan self->onTouchBegan = arg1; olua_endinvoke(L); @@ -4352,7 +4746,28 @@ static int _cocos2d_EventListenerTouchOneByOne_set_onTouchBegan(lua_State *L) return 0; } -static int _cocos2d_EventListenerTouchOneByOne_get_onTouchCancelled(lua_State *L) +static int _olua_fun_cocos2d_EventListenerTouchOneByOne_onTouchBegan(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // cocos2d::EventListenerTouchOneByOne::ccTouchBeganCallback onTouchBegan + return _olua_fun_cocos2d_EventListenerTouchOneByOne_onTouchBegan$1(L); + } + + if (num_args == 1) { + // if ((olua_is_callback(L, 2, "cc.EventListenerTouchOneByOne.ccTouchBeganCallback") || olua_isnil(L, 2))) { + // cocos2d::EventListenerTouchOneByOne::ccTouchBeganCallback onTouchBegan + return _olua_fun_cocos2d_EventListenerTouchOneByOne_onTouchBegan$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::EventListenerTouchOneByOne::onTouchBegan' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_EventListenerTouchOneByOne_onTouchCancelled$1(lua_State *L) { olua_startinvoke(L); @@ -4364,7 +4779,7 @@ static int _cocos2d_EventListenerTouchOneByOne_get_onTouchCancelled(lua_State *L std::string cb_tag = "onTouchCancelled"; olua_getcallback(L, cb_store, cb_tag.c_str(), OLUA_TAG_EQUAL); - // @nullable @localvar cocos2d::EventListenerTouchOneByOne::ccTouchCallback onTouchCancelled + // cocos2d::EventListenerTouchOneByOne::ccTouchCallback onTouchCancelled cocos2d::EventListenerTouchOneByOne::ccTouchCallback ret = self->onTouchCancelled; int num_ret = olua_push_callback(L, &ret, "cc.EventListenerTouchOneByOne.ccTouchCallback"); @@ -4373,7 +4788,7 @@ static int _cocos2d_EventListenerTouchOneByOne_get_onTouchCancelled(lua_State *L return num_ret; } -static int _cocos2d_EventListenerTouchOneByOne_set_onTouchCancelled(lua_State *L) +static int _olua_fun_cocos2d_EventListenerTouchOneByOne_onTouchCancelled$2(lua_State *L) { olua_startinvoke(L); @@ -4389,9 +4804,10 @@ static int _cocos2d_EventListenerTouchOneByOne_set_onTouchCancelled(lua_State *L std::string cb_tag = "onTouchCancelled"; std::string cb_name; if (olua_isfunction(L, 2)) { - cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](cocos2d::Touch *arg1, cocos2d::Event *arg2) { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](cocos2d::Touch *cb_arg1, cocos2d::Event *cb_arg2) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); @@ -4399,8 +4815,8 @@ static int _cocos2d_EventListenerTouchOneByOne_set_onTouchCancelled(lua_State *L int top = lua_gettop(L); size_t last = olua_push_objpool(L); olua_enable_objpool(L); - olua_push_object(L, arg1, "cc.Touch"); - olua_push_object(L, arg2, "cc.Event"); + olua_push_object(L, cb_arg1, "cc.Touch"); + olua_push_object(L, cb_arg2, "cc.Event"); olua_disable_objpool(L); olua_callback(L, cb_store, cb_name.c_str(), 2); @@ -4415,7 +4831,7 @@ static int _cocos2d_EventListenerTouchOneByOne_set_onTouchCancelled(lua_State *L arg1 = nullptr; } - // @nullable @localvar cocos2d::EventListenerTouchOneByOne::ccTouchCallback onTouchCancelled + // cocos2d::EventListenerTouchOneByOne::ccTouchCallback onTouchCancelled self->onTouchCancelled = arg1; olua_endinvoke(L); @@ -4423,7 +4839,28 @@ static int _cocos2d_EventListenerTouchOneByOne_set_onTouchCancelled(lua_State *L return 0; } -static int _cocos2d_EventListenerTouchOneByOne_get_onTouchEnded(lua_State *L) +static int _olua_fun_cocos2d_EventListenerTouchOneByOne_onTouchCancelled(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // cocos2d::EventListenerTouchOneByOne::ccTouchCallback onTouchCancelled + return _olua_fun_cocos2d_EventListenerTouchOneByOne_onTouchCancelled$1(L); + } + + if (num_args == 1) { + // if ((olua_is_callback(L, 2, "cc.EventListenerTouchOneByOne.ccTouchCallback") || olua_isnil(L, 2))) { + // cocos2d::EventListenerTouchOneByOne::ccTouchCallback onTouchCancelled + return _olua_fun_cocos2d_EventListenerTouchOneByOne_onTouchCancelled$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::EventListenerTouchOneByOne::onTouchCancelled' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_EventListenerTouchOneByOne_onTouchEnded$1(lua_State *L) { olua_startinvoke(L); @@ -4435,7 +4872,7 @@ static int _cocos2d_EventListenerTouchOneByOne_get_onTouchEnded(lua_State *L) std::string cb_tag = "onTouchEnded"; olua_getcallback(L, cb_store, cb_tag.c_str(), OLUA_TAG_EQUAL); - // @nullable @localvar cocos2d::EventListenerTouchOneByOne::ccTouchCallback onTouchEnded + // cocos2d::EventListenerTouchOneByOne::ccTouchCallback onTouchEnded cocos2d::EventListenerTouchOneByOne::ccTouchCallback ret = self->onTouchEnded; int num_ret = olua_push_callback(L, &ret, "cc.EventListenerTouchOneByOne.ccTouchCallback"); @@ -4444,7 +4881,7 @@ static int _cocos2d_EventListenerTouchOneByOne_get_onTouchEnded(lua_State *L) return num_ret; } -static int _cocos2d_EventListenerTouchOneByOne_set_onTouchEnded(lua_State *L) +static int _olua_fun_cocos2d_EventListenerTouchOneByOne_onTouchEnded$2(lua_State *L) { olua_startinvoke(L); @@ -4460,9 +4897,10 @@ static int _cocos2d_EventListenerTouchOneByOne_set_onTouchEnded(lua_State *L) std::string cb_tag = "onTouchEnded"; std::string cb_name; if (olua_isfunction(L, 2)) { - cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](cocos2d::Touch *arg1, cocos2d::Event *arg2) { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](cocos2d::Touch *cb_arg1, cocos2d::Event *cb_arg2) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); @@ -4470,8 +4908,8 @@ static int _cocos2d_EventListenerTouchOneByOne_set_onTouchEnded(lua_State *L) int top = lua_gettop(L); size_t last = olua_push_objpool(L); olua_enable_objpool(L); - olua_push_object(L, arg1, "cc.Touch"); - olua_push_object(L, arg2, "cc.Event"); + olua_push_object(L, cb_arg1, "cc.Touch"); + olua_push_object(L, cb_arg2, "cc.Event"); olua_disable_objpool(L); olua_callback(L, cb_store, cb_name.c_str(), 2); @@ -4486,7 +4924,7 @@ static int _cocos2d_EventListenerTouchOneByOne_set_onTouchEnded(lua_State *L) arg1 = nullptr; } - // @nullable @localvar cocos2d::EventListenerTouchOneByOne::ccTouchCallback onTouchEnded + // cocos2d::EventListenerTouchOneByOne::ccTouchCallback onTouchEnded self->onTouchEnded = arg1; olua_endinvoke(L); @@ -4494,7 +4932,28 @@ static int _cocos2d_EventListenerTouchOneByOne_set_onTouchEnded(lua_State *L) return 0; } -static int _cocos2d_EventListenerTouchOneByOne_get_onTouchMoved(lua_State *L) +static int _olua_fun_cocos2d_EventListenerTouchOneByOne_onTouchEnded(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // cocos2d::EventListenerTouchOneByOne::ccTouchCallback onTouchEnded + return _olua_fun_cocos2d_EventListenerTouchOneByOne_onTouchEnded$1(L); + } + + if (num_args == 1) { + // if ((olua_is_callback(L, 2, "cc.EventListenerTouchOneByOne.ccTouchCallback") || olua_isnil(L, 2))) { + // cocos2d::EventListenerTouchOneByOne::ccTouchCallback onTouchEnded + return _olua_fun_cocos2d_EventListenerTouchOneByOne_onTouchEnded$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::EventListenerTouchOneByOne::onTouchEnded' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_EventListenerTouchOneByOne_onTouchMoved$1(lua_State *L) { olua_startinvoke(L); @@ -4506,7 +4965,7 @@ static int _cocos2d_EventListenerTouchOneByOne_get_onTouchMoved(lua_State *L) std::string cb_tag = "onTouchMoved"; olua_getcallback(L, cb_store, cb_tag.c_str(), OLUA_TAG_EQUAL); - // @nullable @localvar cocos2d::EventListenerTouchOneByOne::ccTouchCallback onTouchMoved + // cocos2d::EventListenerTouchOneByOne::ccTouchCallback onTouchMoved cocos2d::EventListenerTouchOneByOne::ccTouchCallback ret = self->onTouchMoved; int num_ret = olua_push_callback(L, &ret, "cc.EventListenerTouchOneByOne.ccTouchCallback"); @@ -4515,7 +4974,7 @@ static int _cocos2d_EventListenerTouchOneByOne_get_onTouchMoved(lua_State *L) return num_ret; } -static int _cocos2d_EventListenerTouchOneByOne_set_onTouchMoved(lua_State *L) +static int _olua_fun_cocos2d_EventListenerTouchOneByOne_onTouchMoved$2(lua_State *L) { olua_startinvoke(L); @@ -4531,9 +4990,10 @@ static int _cocos2d_EventListenerTouchOneByOne_set_onTouchMoved(lua_State *L) std::string cb_tag = "onTouchMoved"; std::string cb_name; if (olua_isfunction(L, 2)) { - cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](cocos2d::Touch *arg1, cocos2d::Event *arg2) { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](cocos2d::Touch *cb_arg1, cocos2d::Event *cb_arg2) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); @@ -4541,8 +5001,8 @@ static int _cocos2d_EventListenerTouchOneByOne_set_onTouchMoved(lua_State *L) int top = lua_gettop(L); size_t last = olua_push_objpool(L); olua_enable_objpool(L); - olua_push_object(L, arg1, "cc.Touch"); - olua_push_object(L, arg2, "cc.Event"); + olua_push_object(L, cb_arg1, "cc.Touch"); + olua_push_object(L, cb_arg2, "cc.Event"); olua_disable_objpool(L); olua_callback(L, cb_store, cb_name.c_str(), 2); @@ -4557,7 +5017,7 @@ static int _cocos2d_EventListenerTouchOneByOne_set_onTouchMoved(lua_State *L) arg1 = nullptr; } - // @nullable @localvar cocos2d::EventListenerTouchOneByOne::ccTouchCallback onTouchMoved + // cocos2d::EventListenerTouchOneByOne::ccTouchCallback onTouchMoved self->onTouchMoved = arg1; olua_endinvoke(L); @@ -4565,66 +5025,105 @@ static int _cocos2d_EventListenerTouchOneByOne_set_onTouchMoved(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_EventListenerTouchOneByOne(lua_State *L) +static int _olua_fun_cocos2d_EventListenerTouchOneByOne_onTouchMoved(lua_State *L) { - oluacls_class(L, "cc.EventListenerTouchOneByOne"); - oluacls_func(L, "clone", _cocos2d_EventListenerTouchOneByOne_clone); - oluacls_func(L, "create", _cocos2d_EventListenerTouchOneByOne_create); - oluacls_func(L, "isSwallowTouches", _cocos2d_EventListenerTouchOneByOne_isSwallowTouches); - oluacls_func(L, "new", _cocos2d_EventListenerTouchOneByOne_new); - oluacls_func(L, "setSwallowTouches", _cocos2d_EventListenerTouchOneByOne_setSwallowTouches); - oluacls_prop(L, "swallowTouches", _cocos2d_EventListenerTouchOneByOne_isSwallowTouches, _cocos2d_EventListenerTouchOneByOne_setSwallowTouches); - oluacls_prop(L, "onTouchBegan", _cocos2d_EventListenerTouchOneByOne_get_onTouchBegan, _cocos2d_EventListenerTouchOneByOne_set_onTouchBegan); - oluacls_prop(L, "onTouchCancelled", _cocos2d_EventListenerTouchOneByOne_get_onTouchCancelled, _cocos2d_EventListenerTouchOneByOne_set_onTouchCancelled); - oluacls_prop(L, "onTouchEnded", _cocos2d_EventListenerTouchOneByOne_get_onTouchEnded, _cocos2d_EventListenerTouchOneByOne_set_onTouchEnded); - oluacls_prop(L, "onTouchMoved", _cocos2d_EventListenerTouchOneByOne_get_onTouchMoved, _cocos2d_EventListenerTouchOneByOne_set_onTouchMoved); - oluacls_const(L, "LISTENER_ID", cocos2d::EventListenerTouchOneByOne::LISTENER_ID); + int num_args = lua_gettop(L) - 1; - return 1; + if (num_args == 0) { + // cocos2d::EventListenerTouchOneByOne::ccTouchCallback onTouchMoved + return _olua_fun_cocos2d_EventListenerTouchOneByOne_onTouchMoved$1(L); + } + + if (num_args == 1) { + // if ((olua_is_callback(L, 2, "cc.EventListenerTouchOneByOne.ccTouchCallback") || olua_isnil(L, 2))) { + // cocos2d::EventListenerTouchOneByOne::ccTouchCallback onTouchMoved + return _olua_fun_cocos2d_EventListenerTouchOneByOne_onTouchMoved$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::EventListenerTouchOneByOne::onTouchMoved' not support '%d' arguments", num_args); + + return 0; } -OLUA_END_DECLS -static int _cocos2d_EventListenerTouchAllAtOnce_ccTouchesCallback___call(lua_State *L) +static int _olua_fun_cocos2d_EventListenerTouchOneByOne_setSwallowTouches(lua_State *L) { olua_startinvoke(L); - luaL_checktype(L, -1, LUA_TFUNCTION); - olua_push_callback(L, (cocos2d::EventListenerTouchAllAtOnce::ccTouchesCallback *)nullptr, "cc.EventListenerTouchAllAtOnce.ccTouchesCallback"); + cocos2d::EventListenerTouchOneByOne *self = nullptr; + bool arg1 = false; /** needSwallow */ + + olua_to_object(L, 1, &self, "cc.EventListenerTouchOneByOne"); + olua_check_bool(L, 2, &arg1); + + // void setSwallowTouches(bool needSwallow) + self->setSwallowTouches(arg1); olua_endinvoke(L); + return 0; +} + +static int _olua_cls_cc_EventListenerTouchOneByOne(lua_State *L) +{ + oluacls_class(L, "cc.EventListenerTouchOneByOne"); + oluacls_func(L, "create", _olua_fun_cocos2d_EventListenerTouchOneByOne_create); + oluacls_func(L, "isSwallowTouches", _olua_fun_cocos2d_EventListenerTouchOneByOne_isSwallowTouches); + oluacls_func(L, "new", _olua_fun_cocos2d_EventListenerTouchOneByOne_new); + oluacls_func(L, "setSwallowTouches", _olua_fun_cocos2d_EventListenerTouchOneByOne_setSwallowTouches); + oluacls_prop(L, "swallowTouches", _olua_fun_cocos2d_EventListenerTouchOneByOne_isSwallowTouches, _olua_fun_cocos2d_EventListenerTouchOneByOne_setSwallowTouches); + oluacls_prop(L, "onTouchBegan", _olua_fun_cocos2d_EventListenerTouchOneByOne_onTouchBegan, _olua_fun_cocos2d_EventListenerTouchOneByOne_onTouchBegan); + oluacls_prop(L, "onTouchCancelled", _olua_fun_cocos2d_EventListenerTouchOneByOne_onTouchCancelled, _olua_fun_cocos2d_EventListenerTouchOneByOne_onTouchCancelled); + oluacls_prop(L, "onTouchEnded", _olua_fun_cocos2d_EventListenerTouchOneByOne_onTouchEnded, _olua_fun_cocos2d_EventListenerTouchOneByOne_onTouchEnded); + oluacls_prop(L, "onTouchMoved", _olua_fun_cocos2d_EventListenerTouchOneByOne_onTouchMoved, _olua_fun_cocos2d_EventListenerTouchOneByOne_onTouchMoved); + oluacls_const(L, "LISTENER_ID", cocos2d::EventListenerTouchOneByOne::LISTENER_ID); + return 1; } OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_EventListenerTouchAllAtOnce_ccTouchesCallback(lua_State *L) +OLUA_LIB int luaopen_cc_EventListenerTouchOneByOne(lua_State *L) { - oluacls_class(L, "cc.EventListenerTouchAllAtOnce.ccTouchesCallback"); - oluacls_func(L, "__call", _cocos2d_EventListenerTouchAllAtOnce_ccTouchesCallback___call); - + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.EventListenerTouchOneByOne")) { + luaL_error(L, "class not found: cocos2d::EventListenerTouchOneByOne"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_EventListenerTouchAllAtOnce_clone(lua_State *L) +static int _olua_fun_cocos2d_EventListenerTouchAllAtOnce_ccTouchesCallback___call(lua_State *L) { olua_startinvoke(L); - cocos2d::EventListenerTouchAllAtOnce *self = nullptr; + luaL_checktype(L, -1, LUA_TFUNCTION); + olua_push_callback(L, (cocos2d::EventListenerTouchAllAtOnce::ccTouchesCallback *)nullptr, "cc.EventListenerTouchAllAtOnce.ccTouchesCallback"); - olua_to_object(L, 1, &self, "cc.EventListenerTouchAllAtOnce"); + olua_endinvoke(L); - // cocos2d::EventListenerTouchAllAtOnce *clone() - cocos2d::EventListenerTouchAllAtOnce *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.EventListenerTouchAllAtOnce"); + return 1; +} - olua_endinvoke(L); +static int _olua_cls_cc_EventListenerTouchAllAtOnce_ccTouchesCallback(lua_State *L) +{ + oluacls_class(L, "cc.EventListenerTouchAllAtOnce.ccTouchesCallback"); + oluacls_func(L, "__call", _olua_fun_cocos2d_EventListenerTouchAllAtOnce_ccTouchesCallback___call); - return num_ret; + return 1; } -static int _cocos2d_EventListenerTouchAllAtOnce_create(lua_State *L) +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_EventListenerTouchAllAtOnce_ccTouchesCallback(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.EventListenerTouchAllAtOnce.ccTouchesCallback")) { + luaL_error(L, "class not found: cocos2d::EventListenerTouchAllAtOnce::ccTouchesCallback"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_fun_cocos2d_EventListenerTouchAllAtOnce_create(lua_State *L) { olua_startinvoke(L); @@ -4637,11 +5136,11 @@ static int _cocos2d_EventListenerTouchAllAtOnce_create(lua_State *L) return num_ret; } -static int _cocos2d_EventListenerTouchAllAtOnce_new(lua_State *L) +static int _olua_fun_cocos2d_EventListenerTouchAllAtOnce_new(lua_State *L) { olua_startinvoke(L); - // EventListenerTouchAllAtOnce() + // cocos2d::EventListenerTouchAllAtOnce() cocos2d::EventListenerTouchAllAtOnce *ret = new cocos2d::EventListenerTouchAllAtOnce(); int num_ret = olua_push_object(L, ret, "cc.EventListenerTouchAllAtOnce"); olua_postnew(L, ret); @@ -4651,7 +5150,7 @@ static int _cocos2d_EventListenerTouchAllAtOnce_new(lua_State *L) return num_ret; } -static int _cocos2d_EventListenerTouchAllAtOnce_get_onTouchesBegan(lua_State *L) +static int _olua_fun_cocos2d_EventListenerTouchAllAtOnce_onTouchesBegan$1(lua_State *L) { olua_startinvoke(L); @@ -4663,7 +5162,7 @@ static int _cocos2d_EventListenerTouchAllAtOnce_get_onTouchesBegan(lua_State *L) std::string cb_tag = "onTouchesBegan"; olua_getcallback(L, cb_store, cb_tag.c_str(), OLUA_TAG_EQUAL); - // @nullable @localvar cocos2d::EventListenerTouchAllAtOnce::ccTouchesCallback onTouchesBegan + // cocos2d::EventListenerTouchAllAtOnce::ccTouchesCallback onTouchesBegan cocos2d::EventListenerTouchAllAtOnce::ccTouchesCallback ret = self->onTouchesBegan; int num_ret = olua_push_callback(L, &ret, "cc.EventListenerTouchAllAtOnce.ccTouchesCallback"); @@ -4672,7 +5171,7 @@ static int _cocos2d_EventListenerTouchAllAtOnce_get_onTouchesBegan(lua_State *L) return num_ret; } -static int _cocos2d_EventListenerTouchAllAtOnce_set_onTouchesBegan(lua_State *L) +static int _olua_fun_cocos2d_EventListenerTouchAllAtOnce_onTouchesBegan$2(lua_State *L) { olua_startinvoke(L); @@ -4688,9 +5187,10 @@ static int _cocos2d_EventListenerTouchAllAtOnce_set_onTouchesBegan(lua_State *L) std::string cb_tag = "onTouchesBegan"; std::string cb_name; if (olua_isfunction(L, 2)) { - cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](const std::vector &arg1, cocos2d::Event *arg2) { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](const std::vector &cb_arg1, cocos2d::Event *cb_arg2) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); @@ -4698,10 +5198,10 @@ static int _cocos2d_EventListenerTouchAllAtOnce_set_onTouchesBegan(lua_State *L) int top = lua_gettop(L); size_t last = olua_push_objpool(L); olua_enable_objpool(L); - olua_push_array(L, arg1, [L](cocos2d::Touch *arg1) { + olua_push_array(L, cb_arg1, [L](cocos2d::Touch *arg1) { olua_push_object(L, arg1, "cc.Touch"); }); - olua_push_object(L, arg2, "cc.Event"); + olua_push_object(L, cb_arg2, "cc.Event"); olua_disable_objpool(L); olua_callback(L, cb_store, cb_name.c_str(), 2); @@ -4716,7 +5216,7 @@ static int _cocos2d_EventListenerTouchAllAtOnce_set_onTouchesBegan(lua_State *L) arg1 = nullptr; } - // @nullable @localvar cocos2d::EventListenerTouchAllAtOnce::ccTouchesCallback onTouchesBegan + // cocos2d::EventListenerTouchAllAtOnce::ccTouchesCallback onTouchesBegan self->onTouchesBegan = arg1; olua_endinvoke(L); @@ -4724,7 +5224,28 @@ static int _cocos2d_EventListenerTouchAllAtOnce_set_onTouchesBegan(lua_State *L) return 0; } -static int _cocos2d_EventListenerTouchAllAtOnce_get_onTouchesCancelled(lua_State *L) +static int _olua_fun_cocos2d_EventListenerTouchAllAtOnce_onTouchesBegan(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // cocos2d::EventListenerTouchAllAtOnce::ccTouchesCallback onTouchesBegan + return _olua_fun_cocos2d_EventListenerTouchAllAtOnce_onTouchesBegan$1(L); + } + + if (num_args == 1) { + // if ((olua_is_callback(L, 2, "cc.EventListenerTouchAllAtOnce.ccTouchesCallback") || olua_isnil(L, 2))) { + // cocos2d::EventListenerTouchAllAtOnce::ccTouchesCallback onTouchesBegan + return _olua_fun_cocos2d_EventListenerTouchAllAtOnce_onTouchesBegan$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::EventListenerTouchAllAtOnce::onTouchesBegan' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_EventListenerTouchAllAtOnce_onTouchesCancelled$1(lua_State *L) { olua_startinvoke(L); @@ -4736,7 +5257,7 @@ static int _cocos2d_EventListenerTouchAllAtOnce_get_onTouchesCancelled(lua_State std::string cb_tag = "onTouchesCancelled"; olua_getcallback(L, cb_store, cb_tag.c_str(), OLUA_TAG_EQUAL); - // @nullable @localvar cocos2d::EventListenerTouchAllAtOnce::ccTouchesCallback onTouchesCancelled + // cocos2d::EventListenerTouchAllAtOnce::ccTouchesCallback onTouchesCancelled cocos2d::EventListenerTouchAllAtOnce::ccTouchesCallback ret = self->onTouchesCancelled; int num_ret = olua_push_callback(L, &ret, "cc.EventListenerTouchAllAtOnce.ccTouchesCallback"); @@ -4745,7 +5266,7 @@ static int _cocos2d_EventListenerTouchAllAtOnce_get_onTouchesCancelled(lua_State return num_ret; } -static int _cocos2d_EventListenerTouchAllAtOnce_set_onTouchesCancelled(lua_State *L) +static int _olua_fun_cocos2d_EventListenerTouchAllAtOnce_onTouchesCancelled$2(lua_State *L) { olua_startinvoke(L); @@ -4761,9 +5282,105 @@ static int _cocos2d_EventListenerTouchAllAtOnce_set_onTouchesCancelled(lua_State std::string cb_tag = "onTouchesCancelled"; std::string cb_name; if (olua_isfunction(L, 2)) { - cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + olua_Context cb_ctx = olua_context(L); + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](const std::vector &cb_arg1, cocos2d::Event *cb_arg2) { + lua_State *L = olua_mainthread(NULL); + olua_checkhostthread(); + + if (olua_contextequal(L, cb_ctx)) { + int top = lua_gettop(L); + size_t last = olua_push_objpool(L); + olua_enable_objpool(L); + olua_push_array(L, cb_arg1, [L](cocos2d::Touch *arg1) { + olua_push_object(L, arg1, "cc.Touch"); + }); + olua_push_object(L, cb_arg2, "cc.Event"); + olua_disable_objpool(L); + + olua_callback(L, cb_store, cb_name.c_str(), 2); + + //pop stack value + olua_pop_objpool(L, last); + lua_settop(L, top); + } + }; + } else { + olua_removecallback(L, cb_store, cb_tag.c_str(), OLUA_TAG_EQUAL); + arg1 = nullptr; + } + + // cocos2d::EventListenerTouchAllAtOnce::ccTouchesCallback onTouchesCancelled + self->onTouchesCancelled = arg1; + + olua_endinvoke(L); + + return 0; +} + +static int _olua_fun_cocos2d_EventListenerTouchAllAtOnce_onTouchesCancelled(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // cocos2d::EventListenerTouchAllAtOnce::ccTouchesCallback onTouchesCancelled + return _olua_fun_cocos2d_EventListenerTouchAllAtOnce_onTouchesCancelled$1(L); + } + + if (num_args == 1) { + // if ((olua_is_callback(L, 2, "cc.EventListenerTouchAllAtOnce.ccTouchesCallback") || olua_isnil(L, 2))) { + // cocos2d::EventListenerTouchAllAtOnce::ccTouchesCallback onTouchesCancelled + return _olua_fun_cocos2d_EventListenerTouchAllAtOnce_onTouchesCancelled$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::EventListenerTouchAllAtOnce::onTouchesCancelled' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_EventListenerTouchAllAtOnce_onTouchesEnded$1(lua_State *L) +{ + olua_startinvoke(L); + + cocos2d::EventListenerTouchAllAtOnce *self = nullptr; + + olua_to_object(L, 1, &self, "cc.EventListenerTouchAllAtOnce"); + + void *cb_store = (void *)self; + std::string cb_tag = "onTouchesEnded"; + olua_getcallback(L, cb_store, cb_tag.c_str(), OLUA_TAG_EQUAL); + + // cocos2d::EventListenerTouchAllAtOnce::ccTouchesCallback onTouchesEnded + cocos2d::EventListenerTouchAllAtOnce::ccTouchesCallback ret = self->onTouchesEnded; + int num_ret = olua_push_callback(L, &ret, "cc.EventListenerTouchAllAtOnce.ccTouchesCallback"); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_cocos2d_EventListenerTouchAllAtOnce_onTouchesEnded$2(lua_State *L) +{ + olua_startinvoke(L); + + cocos2d::EventListenerTouchAllAtOnce *self = nullptr; + cocos2d::EventListenerTouchAllAtOnce::ccTouchesCallback arg1; /** onTouchesEnded */ + + olua_to_object(L, 1, &self, "cc.EventListenerTouchAllAtOnce"); + if (!olua_isnoneornil(L, 2)) { + olua_check_callback(L, 2, &arg1, "cc.EventListenerTouchAllAtOnce.ccTouchesCallback"); + } + + void *cb_store = (void *)self; + std::string cb_tag = "onTouchesEnded"; + std::string cb_name; + if (olua_isfunction(L, 2)) { + cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](const std::vector &arg1, cocos2d::Event *arg2) { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](const std::vector &cb_arg1, cocos2d::Event *cb_arg2) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); @@ -4771,10 +5388,10 @@ static int _cocos2d_EventListenerTouchAllAtOnce_set_onTouchesCancelled(lua_State int top = lua_gettop(L); size_t last = olua_push_objpool(L); olua_enable_objpool(L); - olua_push_array(L, arg1, [L](cocos2d::Touch *arg1) { + olua_push_array(L, cb_arg1, [L](cocos2d::Touch *arg1) { olua_push_object(L, arg1, "cc.Touch"); }); - olua_push_object(L, arg2, "cc.Event"); + olua_push_object(L, cb_arg2, "cc.Event"); olua_disable_objpool(L); olua_callback(L, cb_store, cb_name.c_str(), 2); @@ -4789,88 +5406,36 @@ static int _cocos2d_EventListenerTouchAllAtOnce_set_onTouchesCancelled(lua_State arg1 = nullptr; } - // @nullable @localvar cocos2d::EventListenerTouchAllAtOnce::ccTouchesCallback onTouchesCancelled - self->onTouchesCancelled = arg1; + // cocos2d::EventListenerTouchAllAtOnce::ccTouchesCallback onTouchesEnded + self->onTouchesEnded = arg1; olua_endinvoke(L); return 0; } -static int _cocos2d_EventListenerTouchAllAtOnce_get_onTouchesEnded(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::EventListenerTouchAllAtOnce *self = nullptr; - - olua_to_object(L, 1, &self, "cc.EventListenerTouchAllAtOnce"); - - void *cb_store = (void *)self; - std::string cb_tag = "onTouchesEnded"; - olua_getcallback(L, cb_store, cb_tag.c_str(), OLUA_TAG_EQUAL); - - // @nullable @localvar cocos2d::EventListenerTouchAllAtOnce::ccTouchesCallback onTouchesEnded - cocos2d::EventListenerTouchAllAtOnce::ccTouchesCallback ret = self->onTouchesEnded; - int num_ret = olua_push_callback(L, &ret, "cc.EventListenerTouchAllAtOnce.ccTouchesCallback"); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_EventListenerTouchAllAtOnce_set_onTouchesEnded(lua_State *L) +static int _olua_fun_cocos2d_EventListenerTouchAllAtOnce_onTouchesEnded(lua_State *L) { - olua_startinvoke(L); - - cocos2d::EventListenerTouchAllAtOnce *self = nullptr; - cocos2d::EventListenerTouchAllAtOnce::ccTouchesCallback arg1; /** onTouchesEnded */ + int num_args = lua_gettop(L) - 1; - olua_to_object(L, 1, &self, "cc.EventListenerTouchAllAtOnce"); - if (!olua_isnoneornil(L, 2)) { - olua_check_callback(L, 2, &arg1, "cc.EventListenerTouchAllAtOnce.ccTouchesCallback"); + if (num_args == 0) { + // cocos2d::EventListenerTouchAllAtOnce::ccTouchesCallback onTouchesEnded + return _olua_fun_cocos2d_EventListenerTouchAllAtOnce_onTouchesEnded$1(L); } - void *cb_store = (void *)self; - std::string cb_tag = "onTouchesEnded"; - std::string cb_name; - if (olua_isfunction(L, 2)) { - cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); - olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](const std::vector &arg1, cocos2d::Event *arg2) { - lua_State *L = olua_mainthread(NULL); - olua_checkhostthread(); - - if (olua_contextequal(L, cb_ctx)) { - int top = lua_gettop(L); - size_t last = olua_push_objpool(L); - olua_enable_objpool(L); - olua_push_array(L, arg1, [L](cocos2d::Touch *arg1) { - olua_push_object(L, arg1, "cc.Touch"); - }); - olua_push_object(L, arg2, "cc.Event"); - olua_disable_objpool(L); - - olua_callback(L, cb_store, cb_name.c_str(), 2); - - //pop stack value - olua_pop_objpool(L, last); - lua_settop(L, top); - } - }; - } else { - olua_removecallback(L, cb_store, cb_tag.c_str(), OLUA_TAG_EQUAL); - arg1 = nullptr; + if (num_args == 1) { + // if ((olua_is_callback(L, 2, "cc.EventListenerTouchAllAtOnce.ccTouchesCallback") || olua_isnil(L, 2))) { + // cocos2d::EventListenerTouchAllAtOnce::ccTouchesCallback onTouchesEnded + return _olua_fun_cocos2d_EventListenerTouchAllAtOnce_onTouchesEnded$2(L); + // } } - // @nullable @localvar cocos2d::EventListenerTouchAllAtOnce::ccTouchesCallback onTouchesEnded - self->onTouchesEnded = arg1; - - olua_endinvoke(L); + luaL_error(L, "method 'cocos2d::EventListenerTouchAllAtOnce::onTouchesEnded' not support '%d' arguments", num_args); return 0; } -static int _cocos2d_EventListenerTouchAllAtOnce_get_onTouchesMoved(lua_State *L) +static int _olua_fun_cocos2d_EventListenerTouchAllAtOnce_onTouchesMoved$1(lua_State *L) { olua_startinvoke(L); @@ -4882,7 +5447,7 @@ static int _cocos2d_EventListenerTouchAllAtOnce_get_onTouchesMoved(lua_State *L) std::string cb_tag = "onTouchesMoved"; olua_getcallback(L, cb_store, cb_tag.c_str(), OLUA_TAG_EQUAL); - // @nullable @localvar cocos2d::EventListenerTouchAllAtOnce::ccTouchesCallback onTouchesMoved + // cocos2d::EventListenerTouchAllAtOnce::ccTouchesCallback onTouchesMoved cocos2d::EventListenerTouchAllAtOnce::ccTouchesCallback ret = self->onTouchesMoved; int num_ret = olua_push_callback(L, &ret, "cc.EventListenerTouchAllAtOnce.ccTouchesCallback"); @@ -4891,7 +5456,7 @@ static int _cocos2d_EventListenerTouchAllAtOnce_get_onTouchesMoved(lua_State *L) return num_ret; } -static int _cocos2d_EventListenerTouchAllAtOnce_set_onTouchesMoved(lua_State *L) +static int _olua_fun_cocos2d_EventListenerTouchAllAtOnce_onTouchesMoved$2(lua_State *L) { olua_startinvoke(L); @@ -4907,9 +5472,10 @@ static int _cocos2d_EventListenerTouchAllAtOnce_set_onTouchesMoved(lua_State *L) std::string cb_tag = "onTouchesMoved"; std::string cb_name; if (olua_isfunction(L, 2)) { - cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](const std::vector &arg1, cocos2d::Event *arg2) { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](const std::vector &cb_arg1, cocos2d::Event *cb_arg2) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); @@ -4917,10 +5483,10 @@ static int _cocos2d_EventListenerTouchAllAtOnce_set_onTouchesMoved(lua_State *L) int top = lua_gettop(L); size_t last = olua_push_objpool(L); olua_enable_objpool(L); - olua_push_array(L, arg1, [L](cocos2d::Touch *arg1) { + olua_push_array(L, cb_arg1, [L](cocos2d::Touch *arg1) { olua_push_object(L, arg1, "cc.Touch"); }); - olua_push_object(L, arg2, "cc.Event"); + olua_push_object(L, cb_arg2, "cc.Event"); olua_disable_objpool(L); olua_callback(L, cb_store, cb_name.c_str(), 2); @@ -4935,7 +5501,7 @@ static int _cocos2d_EventListenerTouchAllAtOnce_set_onTouchesMoved(lua_State *L) arg1 = nullptr; } - // @nullable @localvar cocos2d::EventListenerTouchAllAtOnce::ccTouchesCallback onTouchesMoved + // cocos2d::EventListenerTouchAllAtOnce::ccTouchesCallback onTouchesMoved self->onTouchesMoved = arg1; olua_endinvoke(L); @@ -4943,41 +5509,53 @@ static int _cocos2d_EventListenerTouchAllAtOnce_set_onTouchesMoved(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_EventListenerTouchAllAtOnce(lua_State *L) +static int _olua_fun_cocos2d_EventListenerTouchAllAtOnce_onTouchesMoved(lua_State *L) { - oluacls_class(L, "cc.EventListenerTouchAllAtOnce"); - oluacls_func(L, "clone", _cocos2d_EventListenerTouchAllAtOnce_clone); - oluacls_func(L, "create", _cocos2d_EventListenerTouchAllAtOnce_create); - oluacls_func(L, "new", _cocos2d_EventListenerTouchAllAtOnce_new); - oluacls_prop(L, "onTouchesBegan", _cocos2d_EventListenerTouchAllAtOnce_get_onTouchesBegan, _cocos2d_EventListenerTouchAllAtOnce_set_onTouchesBegan); - oluacls_prop(L, "onTouchesCancelled", _cocos2d_EventListenerTouchAllAtOnce_get_onTouchesCancelled, _cocos2d_EventListenerTouchAllAtOnce_set_onTouchesCancelled); - oluacls_prop(L, "onTouchesEnded", _cocos2d_EventListenerTouchAllAtOnce_get_onTouchesEnded, _cocos2d_EventListenerTouchAllAtOnce_set_onTouchesEnded); - oluacls_prop(L, "onTouchesMoved", _cocos2d_EventListenerTouchAllAtOnce_get_onTouchesMoved, _cocos2d_EventListenerTouchAllAtOnce_set_onTouchesMoved); - oluacls_const(L, "LISTENER_ID", cocos2d::EventListenerTouchAllAtOnce::LISTENER_ID); + int num_args = lua_gettop(L) - 1; - return 1; -} -OLUA_END_DECLS + if (num_args == 0) { + // cocos2d::EventListenerTouchAllAtOnce::ccTouchesCallback onTouchesMoved + return _olua_fun_cocos2d_EventListenerTouchAllAtOnce_onTouchesMoved$1(L); + } -static int _cocos2d_EventListenerCustom_clone(lua_State *L) -{ - olua_startinvoke(L); + if (num_args == 1) { + // if ((olua_is_callback(L, 2, "cc.EventListenerTouchAllAtOnce.ccTouchesCallback") || olua_isnil(L, 2))) { + // cocos2d::EventListenerTouchAllAtOnce::ccTouchesCallback onTouchesMoved + return _olua_fun_cocos2d_EventListenerTouchAllAtOnce_onTouchesMoved$2(L); + // } + } - cocos2d::EventListenerCustom *self = nullptr; + luaL_error(L, "method 'cocos2d::EventListenerTouchAllAtOnce::onTouchesMoved' not support '%d' arguments", num_args); - olua_to_object(L, 1, &self, "cc.EventListenerCustom"); + return 0; +} - // cocos2d::EventListenerCustom *clone() - cocos2d::EventListenerCustom *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.EventListenerCustom"); +static int _olua_cls_cc_EventListenerTouchAllAtOnce(lua_State *L) +{ + oluacls_class(L, "cc.EventListenerTouchAllAtOnce"); + oluacls_func(L, "create", _olua_fun_cocos2d_EventListenerTouchAllAtOnce_create); + oluacls_func(L, "new", _olua_fun_cocos2d_EventListenerTouchAllAtOnce_new); + oluacls_prop(L, "onTouchesBegan", _olua_fun_cocos2d_EventListenerTouchAllAtOnce_onTouchesBegan, _olua_fun_cocos2d_EventListenerTouchAllAtOnce_onTouchesBegan); + oluacls_prop(L, "onTouchesCancelled", _olua_fun_cocos2d_EventListenerTouchAllAtOnce_onTouchesCancelled, _olua_fun_cocos2d_EventListenerTouchAllAtOnce_onTouchesCancelled); + oluacls_prop(L, "onTouchesEnded", _olua_fun_cocos2d_EventListenerTouchAllAtOnce_onTouchesEnded, _olua_fun_cocos2d_EventListenerTouchAllAtOnce_onTouchesEnded); + oluacls_prop(L, "onTouchesMoved", _olua_fun_cocos2d_EventListenerTouchAllAtOnce_onTouchesMoved, _olua_fun_cocos2d_EventListenerTouchAllAtOnce_onTouchesMoved); + oluacls_const(L, "LISTENER_ID", cocos2d::EventListenerTouchAllAtOnce::LISTENER_ID); - olua_endinvoke(L); + return 1; +} - return num_ret; +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_EventListenerTouchAllAtOnce(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.EventListenerTouchAllAtOnce")) { + luaL_error(L, "class not found: cocos2d::EventListenerTouchAllAtOnce"); + } + return 1; } +OLUA_END_DECLS -static int _cocos2d_EventListenerCustom_create(lua_State *L) +static int _olua_fun_cocos2d_EventListenerCustom_create(lua_State *L) { olua_startinvoke(L); @@ -4989,9 +5567,10 @@ static int _cocos2d_EventListenerCustom_create(lua_State *L) void *cb_store = (void *)olua_newobjstub(L, "cc.EventListenerCustom"); std::string cb_tag = "listener"; - std::string cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + std::string cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg2 = [cb_store, cb_name, cb_ctx](cocos2d::EventCustom *arg1) { + // lua_State *ML = olua_mainthread(L); + arg2 = [cb_store, cb_name, cb_ctx /*, ML */](cocos2d::EventCustom *cb_arg1) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); @@ -4999,7 +5578,7 @@ static int _cocos2d_EventListenerCustom_create(lua_State *L) int top = lua_gettop(L); size_t last = olua_push_objpool(L); olua_enable_objpool(L); - olua_push_object(L, arg1, "cc.EventCustom"); + olua_push_object(L, cb_arg1, "cc.EventCustom"); olua_disable_objpool(L); olua_callback(L, cb_store, cb_name.c_str(), 1); @@ -5010,7 +5589,7 @@ static int _cocos2d_EventListenerCustom_create(lua_State *L) } }; - // static cocos2d::EventListenerCustom *create(const std::string &eventName, @localvar const std::function &callback) + // static cocos2d::EventListenerCustom *create(const std::string &eventName, const std::function &callback) cocos2d::EventListenerCustom *ret = cocos2d::EventListenerCustom::create(arg1, arg2); if (olua_pushobjstub(L, ret, cb_store, "cc.EventListenerCustom") == OLUA_OBJ_EXIST) { olua_removecallback(L, cb_store, cb_tag.c_str(), OLUA_TAG_EQUAL); @@ -5026,11 +5605,11 @@ static int _cocos2d_EventListenerCustom_create(lua_State *L) return 1; } -static int _cocos2d_EventListenerCustom_new(lua_State *L) +static int _olua_fun_cocos2d_EventListenerCustom_new(lua_State *L) { olua_startinvoke(L); - // EventListenerCustom() + // cocos2d::EventListenerCustom() cocos2d::EventListenerCustom *ret = new cocos2d::EventListenerCustom(); int num_ret = olua_push_object(L, ret, "cc.EventListenerCustom"); olua_postnew(L, ret); @@ -5040,36 +5619,27 @@ static int _cocos2d_EventListenerCustom_new(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_EventListenerCustom(lua_State *L) +static int _olua_cls_cc_EventListenerCustom(lua_State *L) { oluacls_class(L, "cc.EventListenerCustom"); - oluacls_func(L, "clone", _cocos2d_EventListenerCustom_clone); - oluacls_func(L, "create", _cocos2d_EventListenerCustom_create); - oluacls_func(L, "new", _cocos2d_EventListenerCustom_new); + oluacls_func(L, "create", _olua_fun_cocos2d_EventListenerCustom_create); + oluacls_func(L, "new", _olua_fun_cocos2d_EventListenerCustom_new); return 1; } -OLUA_END_DECLS -static int _cocos2d_EventListenerKeyboard_clone(lua_State *L) +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_EventListenerCustom(lua_State *L) { - olua_startinvoke(L); - - cocos2d::EventListenerKeyboard *self = nullptr; - - olua_to_object(L, 1, &self, "cc.EventListenerKeyboard"); - - // cocos2d::EventListenerKeyboard *clone() - cocos2d::EventListenerKeyboard *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.EventListenerKeyboard"); - - olua_endinvoke(L); - - return num_ret; + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.EventListenerCustom")) { + luaL_error(L, "class not found: cocos2d::EventListenerCustom"); + } + return 1; } +OLUA_END_DECLS -static int _cocos2d_EventListenerKeyboard_create(lua_State *L) +static int _olua_fun_cocos2d_EventListenerKeyboard_create(lua_State *L) { olua_startinvoke(L); @@ -5082,11 +5652,11 @@ static int _cocos2d_EventListenerKeyboard_create(lua_State *L) return num_ret; } -static int _cocos2d_EventListenerKeyboard_new(lua_State *L) +static int _olua_fun_cocos2d_EventListenerKeyboard_new(lua_State *L) { olua_startinvoke(L); - // EventListenerKeyboard() + // cocos2d::EventListenerKeyboard() cocos2d::EventListenerKeyboard *ret = new cocos2d::EventListenerKeyboard(); int num_ret = olua_push_object(L, ret, "cc.EventListenerKeyboard"); olua_postnew(L, ret); @@ -5096,7 +5666,7 @@ static int _cocos2d_EventListenerKeyboard_new(lua_State *L) return num_ret; } -static int _cocos2d_EventListenerKeyboard_get_onKeyPressed(lua_State *L) +static int _olua_fun_cocos2d_EventListenerKeyboard_onKeyPressed$1(lua_State *L) { olua_startinvoke(L); @@ -5108,7 +5678,7 @@ static int _cocos2d_EventListenerKeyboard_get_onKeyPressed(lua_State *L) std::string cb_tag = "onKeyPressed"; olua_getcallback(L, cb_store, cb_tag.c_str(), OLUA_TAG_EQUAL); - // @nullable @localvar std::function onKeyPressed + // std::function onKeyPressed std::function ret = self->onKeyPressed; int num_ret = olua_push_callback(L, &ret, "std.function"); @@ -5117,7 +5687,7 @@ static int _cocos2d_EventListenerKeyboard_get_onKeyPressed(lua_State *L) return num_ret; } -static int _cocos2d_EventListenerKeyboard_set_onKeyPressed(lua_State *L) +static int _olua_fun_cocos2d_EventListenerKeyboard_onKeyPressed$2(lua_State *L) { olua_startinvoke(L); @@ -5133,9 +5703,10 @@ static int _cocos2d_EventListenerKeyboard_set_onKeyPressed(lua_State *L) std::string cb_tag = "onKeyPressed"; std::string cb_name; if (olua_isfunction(L, 2)) { - cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](cocos2d::EventKeyboard::KeyCode arg1, cocos2d::Event *arg2) { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](cocos2d::EventKeyboard::KeyCode cb_arg1, cocos2d::Event *cb_arg2) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); @@ -5143,8 +5714,8 @@ static int _cocos2d_EventListenerKeyboard_set_onKeyPressed(lua_State *L) int top = lua_gettop(L); size_t last = olua_push_objpool(L); olua_enable_objpool(L); - olua_push_enum(L, arg1); - olua_push_object(L, arg2, "cc.Event"); + olua_push_enum(L, cb_arg1); + olua_push_object(L, cb_arg2, "cc.Event"); olua_disable_objpool(L); olua_callback(L, cb_store, cb_name.c_str(), 2); @@ -5159,7 +5730,7 @@ static int _cocos2d_EventListenerKeyboard_set_onKeyPressed(lua_State *L) arg1 = nullptr; } - // @nullable @localvar std::function onKeyPressed + // std::function onKeyPressed self->onKeyPressed = arg1; olua_endinvoke(L); @@ -5167,7 +5738,28 @@ static int _cocos2d_EventListenerKeyboard_set_onKeyPressed(lua_State *L) return 0; } -static int _cocos2d_EventListenerKeyboard_get_onKeyReleased(lua_State *L) +static int _olua_fun_cocos2d_EventListenerKeyboard_onKeyPressed(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // std::function onKeyPressed + return _olua_fun_cocos2d_EventListenerKeyboard_onKeyPressed$1(L); + } + + if (num_args == 1) { + // if ((olua_is_callback(L, 2, "std.function") || olua_isnil(L, 2))) { + // std::function onKeyPressed + return _olua_fun_cocos2d_EventListenerKeyboard_onKeyPressed$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::EventListenerKeyboard::onKeyPressed' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_EventListenerKeyboard_onKeyReleased$1(lua_State *L) { olua_startinvoke(L); @@ -5179,7 +5771,7 @@ static int _cocos2d_EventListenerKeyboard_get_onKeyReleased(lua_State *L) std::string cb_tag = "onKeyReleased"; olua_getcallback(L, cb_store, cb_tag.c_str(), OLUA_TAG_EQUAL); - // @nullable @localvar std::function onKeyReleased + // std::function onKeyReleased std::function ret = self->onKeyReleased; int num_ret = olua_push_callback(L, &ret, "std.function"); @@ -5188,7 +5780,7 @@ static int _cocos2d_EventListenerKeyboard_get_onKeyReleased(lua_State *L) return num_ret; } -static int _cocos2d_EventListenerKeyboard_set_onKeyReleased(lua_State *L) +static int _olua_fun_cocos2d_EventListenerKeyboard_onKeyReleased$2(lua_State *L) { olua_startinvoke(L); @@ -5204,9 +5796,10 @@ static int _cocos2d_EventListenerKeyboard_set_onKeyReleased(lua_State *L) std::string cb_tag = "onKeyReleased"; std::string cb_name; if (olua_isfunction(L, 2)) { - cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](cocos2d::EventKeyboard::KeyCode arg1, cocos2d::Event *arg2) { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](cocos2d::EventKeyboard::KeyCode cb_arg1, cocos2d::Event *cb_arg2) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); @@ -5214,8 +5807,8 @@ static int _cocos2d_EventListenerKeyboard_set_onKeyReleased(lua_State *L) int top = lua_gettop(L); size_t last = olua_push_objpool(L); olua_enable_objpool(L); - olua_push_enum(L, arg1); - olua_push_object(L, arg2, "cc.Event"); + olua_push_enum(L, cb_arg1); + olua_push_object(L, cb_arg2, "cc.Event"); olua_disable_objpool(L); olua_callback(L, cb_store, cb_name.c_str(), 2); @@ -5230,7 +5823,7 @@ static int _cocos2d_EventListenerKeyboard_set_onKeyReleased(lua_State *L) arg1 = nullptr; } - // @nullable @localvar std::function onKeyReleased + // std::function onKeyReleased self->onKeyReleased = arg1; olua_endinvoke(L); @@ -5238,39 +5831,51 @@ static int _cocos2d_EventListenerKeyboard_set_onKeyReleased(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_EventListenerKeyboard(lua_State *L) +static int _olua_fun_cocos2d_EventListenerKeyboard_onKeyReleased(lua_State *L) { - oluacls_class(L, "cc.EventListenerKeyboard"); - oluacls_func(L, "clone", _cocos2d_EventListenerKeyboard_clone); - oluacls_func(L, "create", _cocos2d_EventListenerKeyboard_create); - oluacls_func(L, "new", _cocos2d_EventListenerKeyboard_new); - oluacls_prop(L, "onKeyPressed", _cocos2d_EventListenerKeyboard_get_onKeyPressed, _cocos2d_EventListenerKeyboard_set_onKeyPressed); - oluacls_prop(L, "onKeyReleased", _cocos2d_EventListenerKeyboard_get_onKeyReleased, _cocos2d_EventListenerKeyboard_set_onKeyReleased); - oluacls_const(L, "LISTENER_ID", cocos2d::EventListenerKeyboard::LISTENER_ID); + int num_args = lua_gettop(L) - 1; - return 1; -} -OLUA_END_DECLS + if (num_args == 0) { + // std::function onKeyReleased + return _olua_fun_cocos2d_EventListenerKeyboard_onKeyReleased$1(L); + } -static int _cocos2d_EventListenerAcceleration_clone(lua_State *L) -{ - olua_startinvoke(L); + if (num_args == 1) { + // if ((olua_is_callback(L, 2, "std.function") || olua_isnil(L, 2))) { + // std::function onKeyReleased + return _olua_fun_cocos2d_EventListenerKeyboard_onKeyReleased$2(L); + // } + } - cocos2d::EventListenerAcceleration *self = nullptr; + luaL_error(L, "method 'cocos2d::EventListenerKeyboard::onKeyReleased' not support '%d' arguments", num_args); - olua_to_object(L, 1, &self, "cc.EventListenerAcceleration"); + return 0; +} - // cocos2d::EventListenerAcceleration *clone() - cocos2d::EventListenerAcceleration *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.EventListenerAcceleration"); +static int _olua_cls_cc_EventListenerKeyboard(lua_State *L) +{ + oluacls_class(L, "cc.EventListenerKeyboard"); + oluacls_func(L, "create", _olua_fun_cocos2d_EventListenerKeyboard_create); + oluacls_func(L, "new", _olua_fun_cocos2d_EventListenerKeyboard_new); + oluacls_prop(L, "onKeyPressed", _olua_fun_cocos2d_EventListenerKeyboard_onKeyPressed, _olua_fun_cocos2d_EventListenerKeyboard_onKeyPressed); + oluacls_prop(L, "onKeyReleased", _olua_fun_cocos2d_EventListenerKeyboard_onKeyReleased, _olua_fun_cocos2d_EventListenerKeyboard_onKeyReleased); + oluacls_const(L, "LISTENER_ID", cocos2d::EventListenerKeyboard::LISTENER_ID); - olua_endinvoke(L); + return 1; +} - return num_ret; +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_EventListenerKeyboard(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.EventListenerKeyboard")) { + luaL_error(L, "class not found: cocos2d::EventListenerKeyboard"); + } + return 1; } +OLUA_END_DECLS -static int _cocos2d_EventListenerAcceleration_create(lua_State *L) +static int _olua_fun_cocos2d_EventListenerAcceleration_create(lua_State *L) { olua_startinvoke(L); @@ -5280,9 +5885,10 @@ static int _cocos2d_EventListenerAcceleration_create(lua_State *L) void *cb_store = (void *)olua_newobjstub(L, "cc.EventListenerAcceleration"); std::string cb_tag = "listener"; - std::string cb_name = olua_setcallback(L, cb_store, 1, cb_tag.c_str(), OLUA_TAG_REPLACE); + std::string cb_name = olua_setcallback(L, cb_store, 1, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](cocos2d::Acceleration *arg1, cocos2d::Event *arg2) { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](cocos2d::Acceleration *cb_arg1, cocos2d::Event *cb_arg2) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); @@ -5290,8 +5896,8 @@ static int _cocos2d_EventListenerAcceleration_create(lua_State *L) int top = lua_gettop(L); size_t last = olua_push_objpool(L); olua_enable_objpool(L); - olua_push_object(L, arg1, "cc.Acceleration"); - olua_push_object(L, arg2, "cc.Event"); + olua_push_object(L, cb_arg1, "cc.Acceleration"); + olua_push_object(L, cb_arg2, "cc.Event"); olua_disable_objpool(L); olua_callback(L, cb_store, cb_name.c_str(), 2); @@ -5302,7 +5908,7 @@ static int _cocos2d_EventListenerAcceleration_create(lua_State *L) } }; - // static cocos2d::EventListenerAcceleration *create(@localvar const std::function &callback) + // static cocos2d::EventListenerAcceleration *create(const std::function &callback) cocos2d::EventListenerAcceleration *ret = cocos2d::EventListenerAcceleration::create(arg1); if (olua_pushobjstub(L, ret, cb_store, "cc.EventListenerAcceleration") == OLUA_OBJ_EXIST) { olua_removecallback(L, cb_store, cb_tag.c_str(), OLUA_TAG_EQUAL); @@ -5318,11 +5924,11 @@ static int _cocos2d_EventListenerAcceleration_create(lua_State *L) return 1; } -static int _cocos2d_EventListenerAcceleration_new(lua_State *L) +static int _olua_fun_cocos2d_EventListenerAcceleration_new(lua_State *L) { olua_startinvoke(L); - // EventListenerAcceleration() + // cocos2d::EventListenerAcceleration() cocos2d::EventListenerAcceleration *ret = new cocos2d::EventListenerAcceleration(); int num_ret = olua_push_object(L, ret, "cc.EventListenerAcceleration"); olua_postnew(L, ret); @@ -5332,37 +5938,28 @@ static int _cocos2d_EventListenerAcceleration_new(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_EventListenerAcceleration(lua_State *L) +static int _olua_cls_cc_EventListenerAcceleration(lua_State *L) { oluacls_class(L, "cc.EventListenerAcceleration"); - oluacls_func(L, "clone", _cocos2d_EventListenerAcceleration_clone); - oluacls_func(L, "create", _cocos2d_EventListenerAcceleration_create); - oluacls_func(L, "new", _cocos2d_EventListenerAcceleration_new); + oluacls_func(L, "create", _olua_fun_cocos2d_EventListenerAcceleration_create); + oluacls_func(L, "new", _olua_fun_cocos2d_EventListenerAcceleration_new); oluacls_const(L, "LISTENER_ID", cocos2d::EventListenerAcceleration::LISTENER_ID); return 1; } -OLUA_END_DECLS -static int _cocos2d_EventListenerFocus_clone(lua_State *L) +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_EventListenerAcceleration(lua_State *L) { - olua_startinvoke(L); - - cocos2d::EventListenerFocus *self = nullptr; - - olua_to_object(L, 1, &self, "cc.EventListenerFocus"); - - // cocos2d::EventListenerFocus *clone() - cocos2d::EventListenerFocus *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.EventListenerFocus"); - - olua_endinvoke(L); - - return num_ret; + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.EventListenerAcceleration")) { + luaL_error(L, "class not found: cocos2d::EventListenerAcceleration"); + } + return 1; } +OLUA_END_DECLS -static int _cocos2d_EventListenerFocus_create(lua_State *L) +static int _olua_fun_cocos2d_EventListenerFocus_create(lua_State *L) { olua_startinvoke(L); @@ -5375,11 +5972,11 @@ static int _cocos2d_EventListenerFocus_create(lua_State *L) return num_ret; } -static int _cocos2d_EventListenerFocus_new(lua_State *L) +static int _olua_fun_cocos2d_EventListenerFocus_new(lua_State *L) { olua_startinvoke(L); - // EventListenerFocus() + // cocos2d::EventListenerFocus() cocos2d::EventListenerFocus *ret = new cocos2d::EventListenerFocus(); int num_ret = olua_push_object(L, ret, "cc.EventListenerFocus"); olua_postnew(L, ret); @@ -5389,7 +5986,7 @@ static int _cocos2d_EventListenerFocus_new(lua_State *L) return num_ret; } -static int _cocos2d_EventListenerFocus_get_onFocusChanged(lua_State *L) +static int _olua_fun_cocos2d_EventListenerFocus_onFocusChanged$1(lua_State *L) { olua_startinvoke(L); @@ -5401,7 +5998,7 @@ static int _cocos2d_EventListenerFocus_get_onFocusChanged(lua_State *L) std::string cb_tag = "onFocusChanged"; olua_getcallback(L, cb_store, cb_tag.c_str(), OLUA_TAG_EQUAL); - // @nullable @localvar std::function onFocusChanged + // std::function onFocusChanged std::function ret = self->onFocusChanged; int num_ret = olua_push_callback(L, &ret, "std.function"); @@ -5410,7 +6007,7 @@ static int _cocos2d_EventListenerFocus_get_onFocusChanged(lua_State *L) return num_ret; } -static int _cocos2d_EventListenerFocus_set_onFocusChanged(lua_State *L) +static int _olua_fun_cocos2d_EventListenerFocus_onFocusChanged$2(lua_State *L) { olua_startinvoke(L); @@ -5426,9 +6023,10 @@ static int _cocos2d_EventListenerFocus_set_onFocusChanged(lua_State *L) std::string cb_tag = "onFocusChanged"; std::string cb_name; if (olua_isfunction(L, 2)) { - cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](cocos2d::ui::Widget *arg1, cocos2d::ui::Widget *arg2) { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](cocos2d::ui::Widget *cb_arg1, cocos2d::ui::Widget *cb_arg2) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); @@ -5436,8 +6034,8 @@ static int _cocos2d_EventListenerFocus_set_onFocusChanged(lua_State *L) int top = lua_gettop(L); size_t last = olua_push_objpool(L); olua_enable_objpool(L); - olua_push_object(L, arg1, "ccui.Widget"); - olua_push_object(L, arg2, "ccui.Widget"); + olua_push_object(L, cb_arg1, "ccui.Widget"); + olua_push_object(L, cb_arg2, "ccui.Widget"); olua_disable_objpool(L); olua_callback(L, cb_store, cb_name.c_str(), 2); @@ -5452,7 +6050,7 @@ static int _cocos2d_EventListenerFocus_set_onFocusChanged(lua_State *L) arg1 = nullptr; } - // @nullable @localvar std::function onFocusChanged + // std::function onFocusChanged self->onFocusChanged = arg1; olua_endinvoke(L); @@ -5460,38 +6058,50 @@ static int _cocos2d_EventListenerFocus_set_onFocusChanged(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_EventListenerFocus(lua_State *L) +static int _olua_fun_cocos2d_EventListenerFocus_onFocusChanged(lua_State *L) { - oluacls_class(L, "cc.EventListenerFocus"); - oluacls_func(L, "clone", _cocos2d_EventListenerFocus_clone); - oluacls_func(L, "create", _cocos2d_EventListenerFocus_create); - oluacls_func(L, "new", _cocos2d_EventListenerFocus_new); - oluacls_prop(L, "onFocusChanged", _cocos2d_EventListenerFocus_get_onFocusChanged, _cocos2d_EventListenerFocus_set_onFocusChanged); - oluacls_const(L, "LISTENER_ID", cocos2d::EventListenerFocus::LISTENER_ID); + int num_args = lua_gettop(L) - 1; - return 1; -} -OLUA_END_DECLS + if (num_args == 0) { + // std::function onFocusChanged + return _olua_fun_cocos2d_EventListenerFocus_onFocusChanged$1(L); + } -static int _cocos2d_EventListenerMouse_clone(lua_State *L) -{ - olua_startinvoke(L); + if (num_args == 1) { + // if ((olua_is_callback(L, 2, "std.function") || olua_isnil(L, 2))) { + // std::function onFocusChanged + return _olua_fun_cocos2d_EventListenerFocus_onFocusChanged$2(L); + // } + } - cocos2d::EventListenerMouse *self = nullptr; + luaL_error(L, "method 'cocos2d::EventListenerFocus::onFocusChanged' not support '%d' arguments", num_args); - olua_to_object(L, 1, &self, "cc.EventListenerMouse"); + return 0; +} - // cocos2d::EventListenerMouse *clone() - cocos2d::EventListenerMouse *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.EventListenerMouse"); +static int _olua_cls_cc_EventListenerFocus(lua_State *L) +{ + oluacls_class(L, "cc.EventListenerFocus"); + oluacls_func(L, "create", _olua_fun_cocos2d_EventListenerFocus_create); + oluacls_func(L, "new", _olua_fun_cocos2d_EventListenerFocus_new); + oluacls_prop(L, "onFocusChanged", _olua_fun_cocos2d_EventListenerFocus_onFocusChanged, _olua_fun_cocos2d_EventListenerFocus_onFocusChanged); + oluacls_const(L, "LISTENER_ID", cocos2d::EventListenerFocus::LISTENER_ID); - olua_endinvoke(L); + return 1; +} - return num_ret; +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_EventListenerFocus(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.EventListenerFocus")) { + luaL_error(L, "class not found: cocos2d::EventListenerFocus"); + } + return 1; } +OLUA_END_DECLS -static int _cocos2d_EventListenerMouse_create(lua_State *L) +static int _olua_fun_cocos2d_EventListenerMouse_create(lua_State *L) { olua_startinvoke(L); @@ -5504,11 +6114,11 @@ static int _cocos2d_EventListenerMouse_create(lua_State *L) return num_ret; } -static int _cocos2d_EventListenerMouse_new(lua_State *L) +static int _olua_fun_cocos2d_EventListenerMouse_new(lua_State *L) { olua_startinvoke(L); - // EventListenerMouse() + // cocos2d::EventListenerMouse() cocos2d::EventListenerMouse *ret = new cocos2d::EventListenerMouse(); int num_ret = olua_push_object(L, ret, "cc.EventListenerMouse"); olua_postnew(L, ret); @@ -5518,7 +6128,7 @@ static int _cocos2d_EventListenerMouse_new(lua_State *L) return num_ret; } -static int _cocos2d_EventListenerMouse_get_onMouseDown(lua_State *L) +static int _olua_fun_cocos2d_EventListenerMouse_onMouseDown$1(lua_State *L) { olua_startinvoke(L); @@ -5530,7 +6140,7 @@ static int _cocos2d_EventListenerMouse_get_onMouseDown(lua_State *L) std::string cb_tag = "onMouseDown"; olua_getcallback(L, cb_store, cb_tag.c_str(), OLUA_TAG_EQUAL); - // @nullable @localvar std::function onMouseDown + // std::function onMouseDown std::function ret = self->onMouseDown; int num_ret = olua_push_callback(L, &ret, "std.function"); @@ -5539,7 +6149,7 @@ static int _cocos2d_EventListenerMouse_get_onMouseDown(lua_State *L) return num_ret; } -static int _cocos2d_EventListenerMouse_set_onMouseDown(lua_State *L) +static int _olua_fun_cocos2d_EventListenerMouse_onMouseDown$2(lua_State *L) { olua_startinvoke(L); @@ -5555,9 +6165,10 @@ static int _cocos2d_EventListenerMouse_set_onMouseDown(lua_State *L) std::string cb_tag = "onMouseDown"; std::string cb_name; if (olua_isfunction(L, 2)) { - cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](cocos2d::EventMouse *arg1) { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](cocos2d::EventMouse *cb_arg1) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); @@ -5565,7 +6176,7 @@ static int _cocos2d_EventListenerMouse_set_onMouseDown(lua_State *L) int top = lua_gettop(L); size_t last = olua_push_objpool(L); olua_enable_objpool(L); - olua_push_object(L, arg1, "cc.EventMouse"); + olua_push_object(L, cb_arg1, "cc.EventMouse"); olua_disable_objpool(L); olua_callback(L, cb_store, cb_name.c_str(), 1); @@ -5580,7 +6191,7 @@ static int _cocos2d_EventListenerMouse_set_onMouseDown(lua_State *L) arg1 = nullptr; } - // @nullable @localvar std::function onMouseDown + // std::function onMouseDown self->onMouseDown = arg1; olua_endinvoke(L); @@ -5588,7 +6199,28 @@ static int _cocos2d_EventListenerMouse_set_onMouseDown(lua_State *L) return 0; } -static int _cocos2d_EventListenerMouse_get_onMouseMove(lua_State *L) +static int _olua_fun_cocos2d_EventListenerMouse_onMouseDown(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // std::function onMouseDown + return _olua_fun_cocos2d_EventListenerMouse_onMouseDown$1(L); + } + + if (num_args == 1) { + // if ((olua_is_callback(L, 2, "std.function") || olua_isnil(L, 2))) { + // std::function onMouseDown + return _olua_fun_cocos2d_EventListenerMouse_onMouseDown$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::EventListenerMouse::onMouseDown' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_EventListenerMouse_onMouseMove$1(lua_State *L) { olua_startinvoke(L); @@ -5600,7 +6232,7 @@ static int _cocos2d_EventListenerMouse_get_onMouseMove(lua_State *L) std::string cb_tag = "onMouseMove"; olua_getcallback(L, cb_store, cb_tag.c_str(), OLUA_TAG_EQUAL); - // @nullable @localvar std::function onMouseMove + // std::function onMouseMove std::function ret = self->onMouseMove; int num_ret = olua_push_callback(L, &ret, "std.function"); @@ -5609,7 +6241,7 @@ static int _cocos2d_EventListenerMouse_get_onMouseMove(lua_State *L) return num_ret; } -static int _cocos2d_EventListenerMouse_set_onMouseMove(lua_State *L) +static int _olua_fun_cocos2d_EventListenerMouse_onMouseMove$2(lua_State *L) { olua_startinvoke(L); @@ -5625,9 +6257,10 @@ static int _cocos2d_EventListenerMouse_set_onMouseMove(lua_State *L) std::string cb_tag = "onMouseMove"; std::string cb_name; if (olua_isfunction(L, 2)) { - cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](cocos2d::EventMouse *arg1) { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](cocos2d::EventMouse *cb_arg1) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); @@ -5635,7 +6268,7 @@ static int _cocos2d_EventListenerMouse_set_onMouseMove(lua_State *L) int top = lua_gettop(L); size_t last = olua_push_objpool(L); olua_enable_objpool(L); - olua_push_object(L, arg1, "cc.EventMouse"); + olua_push_object(L, cb_arg1, "cc.EventMouse"); olua_disable_objpool(L); olua_callback(L, cb_store, cb_name.c_str(), 1); @@ -5650,7 +6283,7 @@ static int _cocos2d_EventListenerMouse_set_onMouseMove(lua_State *L) arg1 = nullptr; } - // @nullable @localvar std::function onMouseMove + // std::function onMouseMove self->onMouseMove = arg1; olua_endinvoke(L); @@ -5658,7 +6291,28 @@ static int _cocos2d_EventListenerMouse_set_onMouseMove(lua_State *L) return 0; } -static int _cocos2d_EventListenerMouse_get_onMouseScroll(lua_State *L) +static int _olua_fun_cocos2d_EventListenerMouse_onMouseMove(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // std::function onMouseMove + return _olua_fun_cocos2d_EventListenerMouse_onMouseMove$1(L); + } + + if (num_args == 1) { + // if ((olua_is_callback(L, 2, "std.function") || olua_isnil(L, 2))) { + // std::function onMouseMove + return _olua_fun_cocos2d_EventListenerMouse_onMouseMove$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::EventListenerMouse::onMouseMove' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_EventListenerMouse_onMouseScroll$1(lua_State *L) { olua_startinvoke(L); @@ -5670,7 +6324,7 @@ static int _cocos2d_EventListenerMouse_get_onMouseScroll(lua_State *L) std::string cb_tag = "onMouseScroll"; olua_getcallback(L, cb_store, cb_tag.c_str(), OLUA_TAG_EQUAL); - // @nullable @localvar std::function onMouseScroll + // std::function onMouseScroll std::function ret = self->onMouseScroll; int num_ret = olua_push_callback(L, &ret, "std.function"); @@ -5679,7 +6333,7 @@ static int _cocos2d_EventListenerMouse_get_onMouseScroll(lua_State *L) return num_ret; } -static int _cocos2d_EventListenerMouse_set_onMouseScroll(lua_State *L) +static int _olua_fun_cocos2d_EventListenerMouse_onMouseScroll$2(lua_State *L) { olua_startinvoke(L); @@ -5695,9 +6349,10 @@ static int _cocos2d_EventListenerMouse_set_onMouseScroll(lua_State *L) std::string cb_tag = "onMouseScroll"; std::string cb_name; if (olua_isfunction(L, 2)) { - cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](cocos2d::EventMouse *arg1) { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](cocos2d::EventMouse *cb_arg1) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); @@ -5705,7 +6360,7 @@ static int _cocos2d_EventListenerMouse_set_onMouseScroll(lua_State *L) int top = lua_gettop(L); size_t last = olua_push_objpool(L); olua_enable_objpool(L); - olua_push_object(L, arg1, "cc.EventMouse"); + olua_push_object(L, cb_arg1, "cc.EventMouse"); olua_disable_objpool(L); olua_callback(L, cb_store, cb_name.c_str(), 1); @@ -5720,7 +6375,7 @@ static int _cocos2d_EventListenerMouse_set_onMouseScroll(lua_State *L) arg1 = nullptr; } - // @nullable @localvar std::function onMouseScroll + // std::function onMouseScroll self->onMouseScroll = arg1; olua_endinvoke(L); @@ -5728,7 +6383,28 @@ static int _cocos2d_EventListenerMouse_set_onMouseScroll(lua_State *L) return 0; } -static int _cocos2d_EventListenerMouse_get_onMouseUp(lua_State *L) +static int _olua_fun_cocos2d_EventListenerMouse_onMouseScroll(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // std::function onMouseScroll + return _olua_fun_cocos2d_EventListenerMouse_onMouseScroll$1(L); + } + + if (num_args == 1) { + // if ((olua_is_callback(L, 2, "std.function") || olua_isnil(L, 2))) { + // std::function onMouseScroll + return _olua_fun_cocos2d_EventListenerMouse_onMouseScroll$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::EventListenerMouse::onMouseScroll' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_EventListenerMouse_onMouseUp$1(lua_State *L) { olua_startinvoke(L); @@ -5740,7 +6416,7 @@ static int _cocos2d_EventListenerMouse_get_onMouseUp(lua_State *L) std::string cb_tag = "onMouseUp"; olua_getcallback(L, cb_store, cb_tag.c_str(), OLUA_TAG_EQUAL); - // @nullable @localvar std::function onMouseUp + // std::function onMouseUp std::function ret = self->onMouseUp; int num_ret = olua_push_callback(L, &ret, "std.function"); @@ -5749,7 +6425,7 @@ static int _cocos2d_EventListenerMouse_get_onMouseUp(lua_State *L) return num_ret; } -static int _cocos2d_EventListenerMouse_set_onMouseUp(lua_State *L) +static int _olua_fun_cocos2d_EventListenerMouse_onMouseUp$2(lua_State *L) { olua_startinvoke(L); @@ -5765,9 +6441,10 @@ static int _cocos2d_EventListenerMouse_set_onMouseUp(lua_State *L) std::string cb_tag = "onMouseUp"; std::string cb_name; if (olua_isfunction(L, 2)) { - cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](cocos2d::EventMouse *arg1) { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](cocos2d::EventMouse *cb_arg1) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); @@ -5775,7 +6452,7 @@ static int _cocos2d_EventListenerMouse_set_onMouseUp(lua_State *L) int top = lua_gettop(L); size_t last = olua_push_objpool(L); olua_enable_objpool(L); - olua_push_object(L, arg1, "cc.EventMouse"); + olua_push_object(L, cb_arg1, "cc.EventMouse"); olua_disable_objpool(L); olua_callback(L, cb_store, cb_name.c_str(), 1); @@ -5790,7 +6467,7 @@ static int _cocos2d_EventListenerMouse_set_onMouseUp(lua_State *L) arg1 = nullptr; } - // @nullable @localvar std::function onMouseUp + // std::function onMouseUp self->onMouseUp = arg1; olua_endinvoke(L); @@ -5798,25 +6475,53 @@ static int _cocos2d_EventListenerMouse_set_onMouseUp(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_EventListenerMouse(lua_State *L) +static int _olua_fun_cocos2d_EventListenerMouse_onMouseUp(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // std::function onMouseUp + return _olua_fun_cocos2d_EventListenerMouse_onMouseUp$1(L); + } + + if (num_args == 1) { + // if ((olua_is_callback(L, 2, "std.function") || olua_isnil(L, 2))) { + // std::function onMouseUp + return _olua_fun_cocos2d_EventListenerMouse_onMouseUp$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::EventListenerMouse::onMouseUp' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_cls_cc_EventListenerMouse(lua_State *L) { oluacls_class(L, "cc.EventListenerMouse"); - oluacls_func(L, "clone", _cocos2d_EventListenerMouse_clone); - oluacls_func(L, "create", _cocos2d_EventListenerMouse_create); - oluacls_func(L, "new", _cocos2d_EventListenerMouse_new); - oluacls_prop(L, "onMouseDown", _cocos2d_EventListenerMouse_get_onMouseDown, _cocos2d_EventListenerMouse_set_onMouseDown); - oluacls_prop(L, "onMouseMove", _cocos2d_EventListenerMouse_get_onMouseMove, _cocos2d_EventListenerMouse_set_onMouseMove); - oluacls_prop(L, "onMouseScroll", _cocos2d_EventListenerMouse_get_onMouseScroll, _cocos2d_EventListenerMouse_set_onMouseScroll); - oluacls_prop(L, "onMouseUp", _cocos2d_EventListenerMouse_get_onMouseUp, _cocos2d_EventListenerMouse_set_onMouseUp); + oluacls_func(L, "create", _olua_fun_cocos2d_EventListenerMouse_create); + oluacls_func(L, "new", _olua_fun_cocos2d_EventListenerMouse_new); + oluacls_prop(L, "onMouseDown", _olua_fun_cocos2d_EventListenerMouse_onMouseDown, _olua_fun_cocos2d_EventListenerMouse_onMouseDown); + oluacls_prop(L, "onMouseMove", _olua_fun_cocos2d_EventListenerMouse_onMouseMove, _olua_fun_cocos2d_EventListenerMouse_onMouseMove); + oluacls_prop(L, "onMouseScroll", _olua_fun_cocos2d_EventListenerMouse_onMouseScroll, _olua_fun_cocos2d_EventListenerMouse_onMouseScroll); + oluacls_prop(L, "onMouseUp", _olua_fun_cocos2d_EventListenerMouse_onMouseUp, _olua_fun_cocos2d_EventListenerMouse_onMouseUp); oluacls_const(L, "LISTENER_ID", cocos2d::EventListenerMouse::LISTENER_ID); return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_Event_Type(lua_State *L) +OLUA_LIB int luaopen_cc_EventListenerMouse(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.EventListenerMouse")) { + luaL_error(L, "class not found: cocos2d::EventListenerMouse"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_cc_Event_Type(lua_State *L) { oluacls_class(L, "cc.Event.Type"); oluacls_func(L, "__index", olua_indexerror); @@ -5831,9 +6536,19 @@ OLUA_LIB int luaopen_cocos2d_Event_Type(lua_State *L) return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_Event_Type(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.Event.Type")) { + luaL_error(L, "class not found: cocos2d::Event::Type"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_Event_getCurrentTarget(lua_State *L) +static int _olua_fun_cocos2d_Event_getCurrentTarget(lua_State *L) { olua_startinvoke(L); @@ -5850,7 +6565,7 @@ static int _cocos2d_Event_getCurrentTarget(lua_State *L) return num_ret; } -static int _cocos2d_Event_getType(lua_State *L) +static int _olua_fun_cocos2d_Event_getType(lua_State *L) { olua_startinvoke(L); @@ -5867,7 +6582,7 @@ static int _cocos2d_Event_getType(lua_State *L) return num_ret; } -static int _cocos2d_Event_isStopped(lua_State *L) +static int _olua_fun_cocos2d_Event_isStopped(lua_State *L) { olua_startinvoke(L); @@ -5884,7 +6599,7 @@ static int _cocos2d_Event_isStopped(lua_State *L) return num_ret; } -static int _cocos2d_Event_new(lua_State *L) +static int _olua_fun_cocos2d_Event_new(lua_State *L) { olua_startinvoke(L); @@ -5892,7 +6607,7 @@ static int _cocos2d_Event_new(lua_State *L) olua_check_enum(L, 1, &arg1); - // Event(cocos2d::Event::Type type) + // cocos2d::Event(cocos2d::Event::Type type) cocos2d::Event *ret = new cocos2d::Event(arg1); int num_ret = olua_push_object(L, ret, "cc.Event"); olua_postnew(L, ret); @@ -5902,7 +6617,7 @@ static int _cocos2d_Event_new(lua_State *L) return num_ret; } -static int _cocos2d_Event_stopPropagation(lua_State *L) +static int _olua_fun_cocos2d_Event_stopPropagation(lua_State *L) { olua_startinvoke(L); @@ -5918,24 +6633,33 @@ static int _cocos2d_Event_stopPropagation(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_Event(lua_State *L) +static int _olua_cls_cc_Event(lua_State *L) { oluacls_class(L, "cc.Event"); - oluacls_func(L, "getCurrentTarget", _cocos2d_Event_getCurrentTarget); - oluacls_func(L, "getType", _cocos2d_Event_getType); - oluacls_func(L, "isStopped", _cocos2d_Event_isStopped); - oluacls_func(L, "new", _cocos2d_Event_new); - oluacls_func(L, "stopPropagation", _cocos2d_Event_stopPropagation); - oluacls_prop(L, "currentTarget", _cocos2d_Event_getCurrentTarget, nullptr); - oluacls_prop(L, "stopped", _cocos2d_Event_isStopped, nullptr); - oluacls_prop(L, "type", _cocos2d_Event_getType, nullptr); + oluacls_func(L, "getCurrentTarget", _olua_fun_cocos2d_Event_getCurrentTarget); + oluacls_func(L, "getType", _olua_fun_cocos2d_Event_getType); + oluacls_func(L, "isStopped", _olua_fun_cocos2d_Event_isStopped); + oluacls_func(L, "new", _olua_fun_cocos2d_Event_new); + oluacls_func(L, "stopPropagation", _olua_fun_cocos2d_Event_stopPropagation); + oluacls_prop(L, "currentTarget", _olua_fun_cocos2d_Event_getCurrentTarget, nullptr); + oluacls_prop(L, "stopped", _olua_fun_cocos2d_Event_isStopped, nullptr); + oluacls_prop(L, "type", _olua_fun_cocos2d_Event_getType, nullptr); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_Event(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.Event")) { + luaL_error(L, "class not found: cocos2d::Event"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_EventCustom_getEventName(lua_State *L) +static int _olua_fun_cocos2d_EventCustom_getEventName(lua_State *L) { olua_startinvoke(L); @@ -5952,7 +6676,7 @@ static int _cocos2d_EventCustom_getEventName(lua_State *L) return num_ret; } -static int _cocos2d_EventCustom_getUserData(lua_State *L) +static int _olua_fun_cocos2d_EventCustom_getUserData(lua_State *L) { olua_startinvoke(L); @@ -5969,7 +6693,7 @@ static int _cocos2d_EventCustom_getUserData(lua_State *L) return num_ret; } -static int _cocos2d_EventCustom_new(lua_State *L) +static int _olua_fun_cocos2d_EventCustom_new(lua_State *L) { olua_startinvoke(L); @@ -5977,7 +6701,7 @@ static int _cocos2d_EventCustom_new(lua_State *L) olua_check_string(L, 1, &arg1); - // EventCustom(const std::string &eventName) + // cocos2d::EventCustom(const std::string &eventName) cocos2d::EventCustom *ret = new cocos2d::EventCustom(arg1); int num_ret = olua_push_object(L, ret, "cc.EventCustom"); olua_postnew(L, ret); @@ -5987,7 +6711,7 @@ static int _cocos2d_EventCustom_new(lua_State *L) return num_ret; } -static int _cocos2d_EventCustom_setUserData(lua_State *L) +static int _olua_fun_cocos2d_EventCustom_setUserData(lua_State *L) { olua_startinvoke(L); @@ -6005,39 +6729,31 @@ static int _cocos2d_EventCustom_setUserData(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_EventCustom(lua_State *L) +static int _olua_cls_cc_EventCustom(lua_State *L) { oluacls_class(L, "cc.EventCustom"); - oluacls_func(L, "getEventName", _cocos2d_EventCustom_getEventName); - oluacls_func(L, "getUserData", _cocos2d_EventCustom_getUserData); - oluacls_func(L, "new", _cocos2d_EventCustom_new); - oluacls_func(L, "setUserData", _cocos2d_EventCustom_setUserData); - oluacls_prop(L, "eventName", _cocos2d_EventCustom_getEventName, nullptr); - oluacls_prop(L, "userData", _cocos2d_EventCustom_getUserData, _cocos2d_EventCustom_setUserData); + oluacls_func(L, "getEventName", _olua_fun_cocos2d_EventCustom_getEventName); + oluacls_func(L, "getUserData", _olua_fun_cocos2d_EventCustom_getUserData); + oluacls_func(L, "new", _olua_fun_cocos2d_EventCustom_new); + oluacls_func(L, "setUserData", _olua_fun_cocos2d_EventCustom_setUserData); + oluacls_prop(L, "eventName", _olua_fun_cocos2d_EventCustom_getEventName, nullptr); + oluacls_prop(L, "userData", _olua_fun_cocos2d_EventCustom_getUserData, _olua_fun_cocos2d_EventCustom_setUserData); return 1; } -OLUA_END_DECLS -static int _cocos2d_EventListenerController_clone(lua_State *L) +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_EventCustom(lua_State *L) { - olua_startinvoke(L); - - cocos2d::EventListenerController *self = nullptr; - - olua_to_object(L, 1, &self, "cc.EventListenerController"); - - // cocos2d::EventListenerController *clone() - cocos2d::EventListenerController *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.EventListenerController"); - - olua_endinvoke(L); - - return num_ret; + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.EventCustom")) { + luaL_error(L, "class not found: cocos2d::EventCustom"); + } + return 1; } +OLUA_END_DECLS -static int _cocos2d_EventListenerController_create(lua_State *L) +static int _olua_fun_cocos2d_EventListenerController_create(lua_State *L) { olua_startinvoke(L); @@ -6050,7 +6766,7 @@ static int _cocos2d_EventListenerController_create(lua_State *L) return num_ret; } -static int _cocos2d_EventListenerController_get_onAxisEvent(lua_State *L) +static int _olua_fun_cocos2d_EventListenerController_onAxisEvent$1(lua_State *L) { olua_startinvoke(L); @@ -6062,7 +6778,7 @@ static int _cocos2d_EventListenerController_get_onAxisEvent(lua_State *L) std::string cb_tag = "onAxisEvent"; olua_getcallback(L, cb_store, cb_tag.c_str(), OLUA_TAG_EQUAL); - // @nullable @localvar std::function onAxisEvent + // std::function onAxisEvent std::function ret = self->onAxisEvent; int num_ret = olua_push_callback(L, &ret, "std.function"); @@ -6071,7 +6787,7 @@ static int _cocos2d_EventListenerController_get_onAxisEvent(lua_State *L) return num_ret; } -static int _cocos2d_EventListenerController_set_onAxisEvent(lua_State *L) +static int _olua_fun_cocos2d_EventListenerController_onAxisEvent$2(lua_State *L) { olua_startinvoke(L); @@ -6087,9 +6803,10 @@ static int _cocos2d_EventListenerController_set_onAxisEvent(lua_State *L) std::string cb_tag = "onAxisEvent"; std::string cb_name; if (olua_isfunction(L, 2)) { - cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](cocos2d::Controller *arg1, int arg2, cocos2d::Event *arg3) { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](cocos2d::Controller *cb_arg1, int cb_arg2, cocos2d::Event *cb_arg3) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); @@ -6097,9 +6814,9 @@ static int _cocos2d_EventListenerController_set_onAxisEvent(lua_State *L) int top = lua_gettop(L); size_t last = olua_push_objpool(L); olua_enable_objpool(L); - olua_push_object(L, arg1, "cc.Controller"); - olua_push_integer(L, arg2); - olua_push_object(L, arg3, "cc.Event"); + olua_push_object(L, cb_arg1, "cc.Controller"); + olua_push_integer(L, cb_arg2); + olua_push_object(L, cb_arg3, "cc.Event"); olua_disable_objpool(L); olua_callback(L, cb_store, cb_name.c_str(), 3); @@ -6114,7 +6831,7 @@ static int _cocos2d_EventListenerController_set_onAxisEvent(lua_State *L) arg1 = nullptr; } - // @nullable @localvar std::function onAxisEvent + // std::function onAxisEvent self->onAxisEvent = arg1; olua_endinvoke(L); @@ -6122,7 +6839,28 @@ static int _cocos2d_EventListenerController_set_onAxisEvent(lua_State *L) return 0; } -static int _cocos2d_EventListenerController_get_onConnected(lua_State *L) +static int _olua_fun_cocos2d_EventListenerController_onAxisEvent(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // std::function onAxisEvent + return _olua_fun_cocos2d_EventListenerController_onAxisEvent$1(L); + } + + if (num_args == 1) { + // if ((olua_is_callback(L, 2, "std.function") || olua_isnil(L, 2))) { + // std::function onAxisEvent + return _olua_fun_cocos2d_EventListenerController_onAxisEvent$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::EventListenerController::onAxisEvent' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_EventListenerController_onConnected$1(lua_State *L) { olua_startinvoke(L); @@ -6134,7 +6872,7 @@ static int _cocos2d_EventListenerController_get_onConnected(lua_State *L) std::string cb_tag = "onConnected"; olua_getcallback(L, cb_store, cb_tag.c_str(), OLUA_TAG_EQUAL); - // @nullable @localvar std::function onConnected + // std::function onConnected std::function ret = self->onConnected; int num_ret = olua_push_callback(L, &ret, "std.function"); @@ -6143,7 +6881,7 @@ static int _cocos2d_EventListenerController_get_onConnected(lua_State *L) return num_ret; } -static int _cocos2d_EventListenerController_set_onConnected(lua_State *L) +static int _olua_fun_cocos2d_EventListenerController_onConnected$2(lua_State *L) { olua_startinvoke(L); @@ -6159,9 +6897,10 @@ static int _cocos2d_EventListenerController_set_onConnected(lua_State *L) std::string cb_tag = "onConnected"; std::string cb_name; if (olua_isfunction(L, 2)) { - cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](cocos2d::Controller *arg1, cocos2d::Event *arg2) { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](cocos2d::Controller *cb_arg1, cocos2d::Event *cb_arg2) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); @@ -6169,8 +6908,8 @@ static int _cocos2d_EventListenerController_set_onConnected(lua_State *L) int top = lua_gettop(L); size_t last = olua_push_objpool(L); olua_enable_objpool(L); - olua_push_object(L, arg1, "cc.Controller"); - olua_push_object(L, arg2, "cc.Event"); + olua_push_object(L, cb_arg1, "cc.Controller"); + olua_push_object(L, cb_arg2, "cc.Event"); olua_disable_objpool(L); olua_callback(L, cb_store, cb_name.c_str(), 2); @@ -6185,7 +6924,7 @@ static int _cocos2d_EventListenerController_set_onConnected(lua_State *L) arg1 = nullptr; } - // @nullable @localvar std::function onConnected + // std::function onConnected self->onConnected = arg1; olua_endinvoke(L); @@ -6193,7 +6932,28 @@ static int _cocos2d_EventListenerController_set_onConnected(lua_State *L) return 0; } -static int _cocos2d_EventListenerController_get_onDisconnected(lua_State *L) +static int _olua_fun_cocos2d_EventListenerController_onConnected(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // std::function onConnected + return _olua_fun_cocos2d_EventListenerController_onConnected$1(L); + } + + if (num_args == 1) { + // if ((olua_is_callback(L, 2, "std.function") || olua_isnil(L, 2))) { + // std::function onConnected + return _olua_fun_cocos2d_EventListenerController_onConnected$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::EventListenerController::onConnected' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_EventListenerController_onDisconnected$1(lua_State *L) { olua_startinvoke(L); @@ -6205,7 +6965,7 @@ static int _cocos2d_EventListenerController_get_onDisconnected(lua_State *L) std::string cb_tag = "onDisconnected"; olua_getcallback(L, cb_store, cb_tag.c_str(), OLUA_TAG_EQUAL); - // @nullable @localvar std::function onDisconnected + // std::function onDisconnected std::function ret = self->onDisconnected; int num_ret = olua_push_callback(L, &ret, "std.function"); @@ -6214,7 +6974,7 @@ static int _cocos2d_EventListenerController_get_onDisconnected(lua_State *L) return num_ret; } -static int _cocos2d_EventListenerController_set_onDisconnected(lua_State *L) +static int _olua_fun_cocos2d_EventListenerController_onDisconnected$2(lua_State *L) { olua_startinvoke(L); @@ -6230,9 +6990,10 @@ static int _cocos2d_EventListenerController_set_onDisconnected(lua_State *L) std::string cb_tag = "onDisconnected"; std::string cb_name; if (olua_isfunction(L, 2)) { - cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](cocos2d::Controller *arg1, cocos2d::Event *arg2) { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](cocos2d::Controller *cb_arg1, cocos2d::Event *cb_arg2) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); @@ -6240,8 +7001,8 @@ static int _cocos2d_EventListenerController_set_onDisconnected(lua_State *L) int top = lua_gettop(L); size_t last = olua_push_objpool(L); olua_enable_objpool(L); - olua_push_object(L, arg1, "cc.Controller"); - olua_push_object(L, arg2, "cc.Event"); + olua_push_object(L, cb_arg1, "cc.Controller"); + olua_push_object(L, cb_arg2, "cc.Event"); olua_disable_objpool(L); olua_callback(L, cb_store, cb_name.c_str(), 2); @@ -6256,7 +7017,7 @@ static int _cocos2d_EventListenerController_set_onDisconnected(lua_State *L) arg1 = nullptr; } - // @nullable @localvar std::function onDisconnected + // std::function onDisconnected self->onDisconnected = arg1; olua_endinvoke(L); @@ -6264,7 +7025,28 @@ static int _cocos2d_EventListenerController_set_onDisconnected(lua_State *L) return 0; } -static int _cocos2d_EventListenerController_get_onKeyDown(lua_State *L) +static int _olua_fun_cocos2d_EventListenerController_onDisconnected(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // std::function onDisconnected + return _olua_fun_cocos2d_EventListenerController_onDisconnected$1(L); + } + + if (num_args == 1) { + // if ((olua_is_callback(L, 2, "std.function") || olua_isnil(L, 2))) { + // std::function onDisconnected + return _olua_fun_cocos2d_EventListenerController_onDisconnected$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::EventListenerController::onDisconnected' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_EventListenerController_onKeyDown$1(lua_State *L) { olua_startinvoke(L); @@ -6276,7 +7058,7 @@ static int _cocos2d_EventListenerController_get_onKeyDown(lua_State *L) std::string cb_tag = "onKeyDown"; olua_getcallback(L, cb_store, cb_tag.c_str(), OLUA_TAG_EQUAL); - // @nullable @localvar std::function onKeyDown + // std::function onKeyDown std::function ret = self->onKeyDown; int num_ret = olua_push_callback(L, &ret, "std.function"); @@ -6285,7 +7067,7 @@ static int _cocos2d_EventListenerController_get_onKeyDown(lua_State *L) return num_ret; } -static int _cocos2d_EventListenerController_set_onKeyDown(lua_State *L) +static int _olua_fun_cocos2d_EventListenerController_onKeyDown$2(lua_State *L) { olua_startinvoke(L); @@ -6301,9 +7083,10 @@ static int _cocos2d_EventListenerController_set_onKeyDown(lua_State *L) std::string cb_tag = "onKeyDown"; std::string cb_name; if (olua_isfunction(L, 2)) { - cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](cocos2d::Controller *arg1, int arg2, cocos2d::Event *arg3) { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](cocos2d::Controller *cb_arg1, int cb_arg2, cocos2d::Event *cb_arg3) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); @@ -6311,9 +7094,9 @@ static int _cocos2d_EventListenerController_set_onKeyDown(lua_State *L) int top = lua_gettop(L); size_t last = olua_push_objpool(L); olua_enable_objpool(L); - olua_push_object(L, arg1, "cc.Controller"); - olua_push_integer(L, arg2); - olua_push_object(L, arg3, "cc.Event"); + olua_push_object(L, cb_arg1, "cc.Controller"); + olua_push_integer(L, cb_arg2); + olua_push_object(L, cb_arg3, "cc.Event"); olua_disable_objpool(L); olua_callback(L, cb_store, cb_name.c_str(), 3); @@ -6328,7 +7111,7 @@ static int _cocos2d_EventListenerController_set_onKeyDown(lua_State *L) arg1 = nullptr; } - // @nullable @localvar std::function onKeyDown + // std::function onKeyDown self->onKeyDown = arg1; olua_endinvoke(L); @@ -6336,7 +7119,28 @@ static int _cocos2d_EventListenerController_set_onKeyDown(lua_State *L) return 0; } -static int _cocos2d_EventListenerController_get_onKeyRepeat(lua_State *L) +static int _olua_fun_cocos2d_EventListenerController_onKeyDown(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // std::function onKeyDown + return _olua_fun_cocos2d_EventListenerController_onKeyDown$1(L); + } + + if (num_args == 1) { + // if ((olua_is_callback(L, 2, "std.function") || olua_isnil(L, 2))) { + // std::function onKeyDown + return _olua_fun_cocos2d_EventListenerController_onKeyDown$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::EventListenerController::onKeyDown' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_EventListenerController_onKeyRepeat$1(lua_State *L) { olua_startinvoke(L); @@ -6348,7 +7152,7 @@ static int _cocos2d_EventListenerController_get_onKeyRepeat(lua_State *L) std::string cb_tag = "onKeyRepeat"; olua_getcallback(L, cb_store, cb_tag.c_str(), OLUA_TAG_EQUAL); - // @nullable @localvar std::function onKeyRepeat + // std::function onKeyRepeat std::function ret = self->onKeyRepeat; int num_ret = olua_push_callback(L, &ret, "std.function"); @@ -6357,7 +7161,7 @@ static int _cocos2d_EventListenerController_get_onKeyRepeat(lua_State *L) return num_ret; } -static int _cocos2d_EventListenerController_set_onKeyRepeat(lua_State *L) +static int _olua_fun_cocos2d_EventListenerController_onKeyRepeat$2(lua_State *L) { olua_startinvoke(L); @@ -6373,9 +7177,10 @@ static int _cocos2d_EventListenerController_set_onKeyRepeat(lua_State *L) std::string cb_tag = "onKeyRepeat"; std::string cb_name; if (olua_isfunction(L, 2)) { - cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](cocos2d::Controller *arg1, int arg2, cocos2d::Event *arg3) { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](cocos2d::Controller *cb_arg1, int cb_arg2, cocos2d::Event *cb_arg3) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); @@ -6383,9 +7188,9 @@ static int _cocos2d_EventListenerController_set_onKeyRepeat(lua_State *L) int top = lua_gettop(L); size_t last = olua_push_objpool(L); olua_enable_objpool(L); - olua_push_object(L, arg1, "cc.Controller"); - olua_push_integer(L, arg2); - olua_push_object(L, arg3, "cc.Event"); + olua_push_object(L, cb_arg1, "cc.Controller"); + olua_push_integer(L, cb_arg2); + olua_push_object(L, cb_arg3, "cc.Event"); olua_disable_objpool(L); olua_callback(L, cb_store, cb_name.c_str(), 3); @@ -6400,7 +7205,7 @@ static int _cocos2d_EventListenerController_set_onKeyRepeat(lua_State *L) arg1 = nullptr; } - // @nullable @localvar std::function onKeyRepeat + // std::function onKeyRepeat self->onKeyRepeat = arg1; olua_endinvoke(L); @@ -6408,7 +7213,28 @@ static int _cocos2d_EventListenerController_set_onKeyRepeat(lua_State *L) return 0; } -static int _cocos2d_EventListenerController_get_onKeyUp(lua_State *L) +static int _olua_fun_cocos2d_EventListenerController_onKeyRepeat(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // std::function onKeyRepeat + return _olua_fun_cocos2d_EventListenerController_onKeyRepeat$1(L); + } + + if (num_args == 1) { + // if ((olua_is_callback(L, 2, "std.function") || olua_isnil(L, 2))) { + // std::function onKeyRepeat + return _olua_fun_cocos2d_EventListenerController_onKeyRepeat$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::EventListenerController::onKeyRepeat' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_EventListenerController_onKeyUp$1(lua_State *L) { olua_startinvoke(L); @@ -6420,7 +7246,7 @@ static int _cocos2d_EventListenerController_get_onKeyUp(lua_State *L) std::string cb_tag = "onKeyUp"; olua_getcallback(L, cb_store, cb_tag.c_str(), OLUA_TAG_EQUAL); - // @nullable @localvar std::function onKeyUp + // std::function onKeyUp std::function ret = self->onKeyUp; int num_ret = olua_push_callback(L, &ret, "std.function"); @@ -6429,7 +7255,7 @@ static int _cocos2d_EventListenerController_get_onKeyUp(lua_State *L) return num_ret; } -static int _cocos2d_EventListenerController_set_onKeyUp(lua_State *L) +static int _olua_fun_cocos2d_EventListenerController_onKeyUp$2(lua_State *L) { olua_startinvoke(L); @@ -6445,9 +7271,10 @@ static int _cocos2d_EventListenerController_set_onKeyUp(lua_State *L) std::string cb_tag = "onKeyUp"; std::string cb_name; if (olua_isfunction(L, 2)) { - cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](cocos2d::Controller *arg1, int arg2, cocos2d::Event *arg3) { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](cocos2d::Controller *cb_arg1, int cb_arg2, cocos2d::Event *cb_arg3) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); @@ -6455,9 +7282,9 @@ static int _cocos2d_EventListenerController_set_onKeyUp(lua_State *L) int top = lua_gettop(L); size_t last = olua_push_objpool(L); olua_enable_objpool(L); - olua_push_object(L, arg1, "cc.Controller"); - olua_push_integer(L, arg2); - olua_push_object(L, arg3, "cc.Event"); + olua_push_object(L, cb_arg1, "cc.Controller"); + olua_push_integer(L, cb_arg2); + olua_push_object(L, cb_arg3, "cc.Event"); olua_disable_objpool(L); olua_callback(L, cb_store, cb_name.c_str(), 3); @@ -6472,7 +7299,7 @@ static int _cocos2d_EventListenerController_set_onKeyUp(lua_State *L) arg1 = nullptr; } - // @nullable @localvar std::function onKeyUp + // std::function onKeyUp self->onKeyUp = arg1; olua_endinvoke(L); @@ -6480,26 +7307,54 @@ static int _cocos2d_EventListenerController_set_onKeyUp(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_EventListenerController(lua_State *L) +static int _olua_fun_cocos2d_EventListenerController_onKeyUp(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // std::function onKeyUp + return _olua_fun_cocos2d_EventListenerController_onKeyUp$1(L); + } + + if (num_args == 1) { + // if ((olua_is_callback(L, 2, "std.function") || olua_isnil(L, 2))) { + // std::function onKeyUp + return _olua_fun_cocos2d_EventListenerController_onKeyUp$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::EventListenerController::onKeyUp' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_cls_cc_EventListenerController(lua_State *L) { oluacls_class(L, "cc.EventListenerController"); - oluacls_func(L, "clone", _cocos2d_EventListenerController_clone); - oluacls_func(L, "create", _cocos2d_EventListenerController_create); - oluacls_prop(L, "onAxisEvent", _cocos2d_EventListenerController_get_onAxisEvent, _cocos2d_EventListenerController_set_onAxisEvent); - oluacls_prop(L, "onConnected", _cocos2d_EventListenerController_get_onConnected, _cocos2d_EventListenerController_set_onConnected); - oluacls_prop(L, "onDisconnected", _cocos2d_EventListenerController_get_onDisconnected, _cocos2d_EventListenerController_set_onDisconnected); - oluacls_prop(L, "onKeyDown", _cocos2d_EventListenerController_get_onKeyDown, _cocos2d_EventListenerController_set_onKeyDown); - oluacls_prop(L, "onKeyRepeat", _cocos2d_EventListenerController_get_onKeyRepeat, _cocos2d_EventListenerController_set_onKeyRepeat); - oluacls_prop(L, "onKeyUp", _cocos2d_EventListenerController_get_onKeyUp, _cocos2d_EventListenerController_set_onKeyUp); + oluacls_func(L, "create", _olua_fun_cocos2d_EventListenerController_create); + oluacls_prop(L, "onAxisEvent", _olua_fun_cocos2d_EventListenerController_onAxisEvent, _olua_fun_cocos2d_EventListenerController_onAxisEvent); + oluacls_prop(L, "onConnected", _olua_fun_cocos2d_EventListenerController_onConnected, _olua_fun_cocos2d_EventListenerController_onConnected); + oluacls_prop(L, "onDisconnected", _olua_fun_cocos2d_EventListenerController_onDisconnected, _olua_fun_cocos2d_EventListenerController_onDisconnected); + oluacls_prop(L, "onKeyDown", _olua_fun_cocos2d_EventListenerController_onKeyDown, _olua_fun_cocos2d_EventListenerController_onKeyDown); + oluacls_prop(L, "onKeyRepeat", _olua_fun_cocos2d_EventListenerController_onKeyRepeat, _olua_fun_cocos2d_EventListenerController_onKeyRepeat); + oluacls_prop(L, "onKeyUp", _olua_fun_cocos2d_EventListenerController_onKeyUp, _olua_fun_cocos2d_EventListenerController_onKeyUp); oluacls_const(L, "LISTENER_ID", cocos2d::EventListenerController::LISTENER_ID); return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_EventTouch_EventCode(lua_State *L) +OLUA_LIB int luaopen_cc_EventListenerController(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.EventListenerController")) { + luaL_error(L, "class not found: cocos2d::EventListenerController"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_cc_EventTouch_EventCode(lua_State *L) { oluacls_class(L, "cc.EventTouch.EventCode"); oluacls_func(L, "__index", olua_indexerror); @@ -6511,9 +7366,19 @@ OLUA_LIB int luaopen_cocos2d_EventTouch_EventCode(lua_State *L) return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_EventTouch_EventCode(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.EventTouch.EventCode")) { + luaL_error(L, "class not found: cocos2d::EventTouch::EventCode"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_EventTouch_getEventCode(lua_State *L) +static int _olua_fun_cocos2d_EventTouch_getEventCode(lua_State *L) { olua_startinvoke(L); @@ -6530,7 +7395,7 @@ static int _cocos2d_EventTouch_getEventCode(lua_State *L) return num_ret; } -static int _cocos2d_EventTouch_getTouches(lua_State *L) +static int _olua_fun_cocos2d_EventTouch_getTouches(lua_State *L) { olua_startinvoke(L); @@ -6549,11 +7414,11 @@ static int _cocos2d_EventTouch_getTouches(lua_State *L) return num_ret; } -static int _cocos2d_EventTouch_new(lua_State *L) +static int _olua_fun_cocos2d_EventTouch_new(lua_State *L) { olua_startinvoke(L); - // EventTouch() + // cocos2d::EventTouch() cocos2d::EventTouch *ret = new cocos2d::EventTouch(); int num_ret = olua_push_object(L, ret, "cc.EventTouch"); olua_postnew(L, ret); @@ -6563,7 +7428,7 @@ static int _cocos2d_EventTouch_new(lua_State *L) return num_ret; } -static int _cocos2d_EventTouch_setEventCode(lua_State *L) +static int _olua_fun_cocos2d_EventTouch_setEventCode(lua_State *L) { olua_startinvoke(L); @@ -6581,7 +7446,7 @@ static int _cocos2d_EventTouch_setEventCode(lua_State *L) return 0; } -static int _cocos2d_EventTouch_setTouches(lua_State *L) +static int _olua_fun_cocos2d_EventTouch_setTouches(lua_State *L) { olua_startinvoke(L); @@ -6601,24 +7466,33 @@ static int _cocos2d_EventTouch_setTouches(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_EventTouch(lua_State *L) +static int _olua_cls_cc_EventTouch(lua_State *L) { oluacls_class(L, "cc.EventTouch"); - oluacls_func(L, "getEventCode", _cocos2d_EventTouch_getEventCode); - oluacls_func(L, "getTouches", _cocos2d_EventTouch_getTouches); - oluacls_func(L, "new", _cocos2d_EventTouch_new); - oluacls_func(L, "setEventCode", _cocos2d_EventTouch_setEventCode); - oluacls_func(L, "setTouches", _cocos2d_EventTouch_setTouches); - oluacls_prop(L, "eventCode", _cocos2d_EventTouch_getEventCode, _cocos2d_EventTouch_setEventCode); - oluacls_prop(L, "touches", _cocos2d_EventTouch_getTouches, _cocos2d_EventTouch_setTouches); + oluacls_func(L, "getEventCode", _olua_fun_cocos2d_EventTouch_getEventCode); + oluacls_func(L, "getTouches", _olua_fun_cocos2d_EventTouch_getTouches); + oluacls_func(L, "new", _olua_fun_cocos2d_EventTouch_new); + oluacls_func(L, "setEventCode", _olua_fun_cocos2d_EventTouch_setEventCode); + oluacls_func(L, "setTouches", _olua_fun_cocos2d_EventTouch_setTouches); + oluacls_prop(L, "eventCode", _olua_fun_cocos2d_EventTouch_getEventCode, _olua_fun_cocos2d_EventTouch_setEventCode); + oluacls_prop(L, "touches", _olua_fun_cocos2d_EventTouch_getTouches, _olua_fun_cocos2d_EventTouch_setTouches); oluacls_const(L, "MAX_TOUCHES", cocos2d::EventTouch::MAX_TOUCHES); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_EventTouch(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.EventTouch")) { + luaL_error(L, "class not found: cocos2d::EventTouch"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_EventKeyboard_new(lua_State *L) +static int _olua_fun_cocos2d_EventKeyboard_new(lua_State *L) { olua_startinvoke(L); @@ -6628,7 +7502,7 @@ static int _cocos2d_EventKeyboard_new(lua_State *L) olua_check_enum(L, 1, &arg1); olua_check_bool(L, 2, &arg2); - // EventKeyboard(cocos2d::EventKeyboard::KeyCode keyCode, bool isPressed) + // cocos2d::EventKeyboard(cocos2d::EventKeyboard::KeyCode keyCode, bool isPressed) cocos2d::EventKeyboard *ret = new cocos2d::EventKeyboard(arg1, arg2); int num_ret = olua_push_object(L, ret, "cc.EventKeyboard"); olua_postnew(L, ret); @@ -6638,26 +7512,35 @@ static int _cocos2d_EventKeyboard_new(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_EventKeyboard(lua_State *L) +static int _olua_cls_cc_EventKeyboard(lua_State *L) { oluacls_class(L, "cc.EventKeyboard"); - oluacls_func(L, "new", _cocos2d_EventKeyboard_new); + oluacls_func(L, "new", _olua_fun_cocos2d_EventKeyboard_new); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_EventKeyboard(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.EventKeyboard")) { + luaL_error(L, "class not found: cocos2d::EventKeyboard"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_EventAcceleration_new(lua_State *L) +static int _olua_fun_cocos2d_EventAcceleration_new(lua_State *L) { olua_startinvoke(L); - cocos2d::Acceleration arg1; /** acc */ + cocos2d::Acceleration *arg1; /** acc */ olua_check_object(L, 1, &arg1, "cc.Acceleration"); - // EventAcceleration(const cocos2d::Acceleration &acc) - cocos2d::EventAcceleration *ret = new cocos2d::EventAcceleration(arg1); + // cocos2d::EventAcceleration(const cocos2d::Acceleration &acc) + cocos2d::EventAcceleration *ret = new cocos2d::EventAcceleration(*arg1); int num_ret = olua_push_object(L, ret, "cc.EventAcceleration"); olua_postnew(L, ret); @@ -6666,17 +7549,26 @@ static int _cocos2d_EventAcceleration_new(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_EventAcceleration(lua_State *L) +static int _olua_cls_cc_EventAcceleration(lua_State *L) { oluacls_class(L, "cc.EventAcceleration"); - oluacls_func(L, "new", _cocos2d_EventAcceleration_new); + oluacls_func(L, "new", _olua_fun_cocos2d_EventAcceleration_new); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_EventAcceleration(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.EventAcceleration")) { + luaL_error(L, "class not found: cocos2d::EventAcceleration"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_EventFocus_new(lua_State *L) +static int _olua_fun_cocos2d_EventFocus_new(lua_State *L) { olua_startinvoke(L); @@ -6686,7 +7578,7 @@ static int _cocos2d_EventFocus_new(lua_State *L) olua_check_object(L, 1, &arg1, "ccui.Widget"); olua_check_object(L, 2, &arg2, "ccui.Widget"); - // EventFocus(cocos2d::ui::Widget *widgetLoseFocus, cocos2d::ui::Widget *widgetGetFocus) + // cocos2d::EventFocus(cocos2d::ui::Widget *widgetLoseFocus, cocos2d::ui::Widget *widgetGetFocus) cocos2d::EventFocus *ret = new cocos2d::EventFocus(arg1, arg2); int num_ret = olua_push_object(L, ret, "cc.EventFocus"); olua_postnew(L, ret); @@ -6696,18 +7588,26 @@ static int _cocos2d_EventFocus_new(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_EventFocus(lua_State *L) +static int _olua_cls_cc_EventFocus(lua_State *L) { oluacls_class(L, "cc.EventFocus"); - oluacls_func(L, "new", _cocos2d_EventFocus_new); + oluacls_func(L, "new", _olua_fun_cocos2d_EventFocus_new); return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_EventMouse_MouseEventType(lua_State *L) +OLUA_LIB int luaopen_cc_EventFocus(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.EventFocus")) { + luaL_error(L, "class not found: cocos2d::EventFocus"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_cc_EventMouse_MouseEventType(lua_State *L) { oluacls_class(L, "cc.EventMouse.MouseEventType"); oluacls_func(L, "__index", olua_indexerror); @@ -6720,10 +7620,19 @@ OLUA_LIB int luaopen_cocos2d_EventMouse_MouseEventType(lua_State *L) return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_EventMouse_MouseButton(lua_State *L) +OLUA_LIB int luaopen_cc_EventMouse_MouseEventType(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.EventMouse.MouseEventType")) { + luaL_error(L, "class not found: cocos2d::EventMouse::MouseEventType"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_cc_EventMouse_MouseButton(lua_State *L) { oluacls_class(L, "cc.EventMouse.MouseButton"); oluacls_func(L, "__index", olua_indexerror); @@ -6740,9 +7649,19 @@ OLUA_LIB int luaopen_cocos2d_EventMouse_MouseButton(lua_State *L) return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_EventMouse_MouseButton(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.EventMouse.MouseButton")) { + luaL_error(L, "class not found: cocos2d::EventMouse::MouseButton"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_EventMouse_getCursorX(lua_State *L) +static int _olua_fun_cocos2d_EventMouse_getCursorX(lua_State *L) { olua_startinvoke(L); @@ -6759,7 +7678,7 @@ static int _cocos2d_EventMouse_getCursorX(lua_State *L) return num_ret; } -static int _cocos2d_EventMouse_getCursorY(lua_State *L) +static int _olua_fun_cocos2d_EventMouse_getCursorY(lua_State *L) { olua_startinvoke(L); @@ -6776,7 +7695,7 @@ static int _cocos2d_EventMouse_getCursorY(lua_State *L) return num_ret; } -static int _cocos2d_EventMouse_getDelta(lua_State *L) +static int _olua_fun_cocos2d_EventMouse_getDelta(lua_State *L) { olua_startinvoke(L); @@ -6786,14 +7705,14 @@ static int _cocos2d_EventMouse_getDelta(lua_State *L) // cocos2d::Vec2 getDelta() cocos2d::Vec2 ret = self->getDelta(); - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec2"); + int num_ret = olua_copy_object(L, ret, "cc.Vec2"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_EventMouse_getLocation(lua_State *L) +static int _olua_fun_cocos2d_EventMouse_getLocation(lua_State *L) { olua_startinvoke(L); @@ -6803,14 +7722,14 @@ static int _cocos2d_EventMouse_getLocation(lua_State *L) // cocos2d::Vec2 getLocation() cocos2d::Vec2 ret = self->getLocation(); - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec2"); + int num_ret = olua_copy_object(L, ret, "cc.Vec2"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_EventMouse_getLocationInView(lua_State *L) +static int _olua_fun_cocos2d_EventMouse_getLocationInView(lua_State *L) { olua_startinvoke(L); @@ -6820,14 +7739,14 @@ static int _cocos2d_EventMouse_getLocationInView(lua_State *L) // cocos2d::Vec2 getLocationInView() cocos2d::Vec2 ret = self->getLocationInView(); - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec2"); + int num_ret = olua_copy_object(L, ret, "cc.Vec2"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_EventMouse_getMouseButton(lua_State *L) +static int _olua_fun_cocos2d_EventMouse_getMouseButton(lua_State *L) { olua_startinvoke(L); @@ -6844,7 +7763,7 @@ static int _cocos2d_EventMouse_getMouseButton(lua_State *L) return num_ret; } -static int _cocos2d_EventMouse_getPreviousLocation(lua_State *L) +static int _olua_fun_cocos2d_EventMouse_getPreviousLocation(lua_State *L) { olua_startinvoke(L); @@ -6854,14 +7773,14 @@ static int _cocos2d_EventMouse_getPreviousLocation(lua_State *L) // cocos2d::Vec2 getPreviousLocation() cocos2d::Vec2 ret = self->getPreviousLocation(); - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec2"); + int num_ret = olua_copy_object(L, ret, "cc.Vec2"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_EventMouse_getPreviousLocationInView(lua_State *L) +static int _olua_fun_cocos2d_EventMouse_getPreviousLocationInView(lua_State *L) { olua_startinvoke(L); @@ -6871,14 +7790,14 @@ static int _cocos2d_EventMouse_getPreviousLocationInView(lua_State *L) // cocos2d::Vec2 getPreviousLocationInView() cocos2d::Vec2 ret = self->getPreviousLocationInView(); - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec2"); + int num_ret = olua_copy_object(L, ret, "cc.Vec2"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_EventMouse_getScrollX(lua_State *L) +static int _olua_fun_cocos2d_EventMouse_getScrollX(lua_State *L) { olua_startinvoke(L); @@ -6895,7 +7814,7 @@ static int _cocos2d_EventMouse_getScrollX(lua_State *L) return num_ret; } -static int _cocos2d_EventMouse_getScrollY(lua_State *L) +static int _olua_fun_cocos2d_EventMouse_getScrollY(lua_State *L) { olua_startinvoke(L); @@ -6912,7 +7831,7 @@ static int _cocos2d_EventMouse_getScrollY(lua_State *L) return num_ret; } -static int _cocos2d_EventMouse_getStartLocation(lua_State *L) +static int _olua_fun_cocos2d_EventMouse_getStartLocation(lua_State *L) { olua_startinvoke(L); @@ -6922,14 +7841,14 @@ static int _cocos2d_EventMouse_getStartLocation(lua_State *L) // cocos2d::Vec2 getStartLocation() cocos2d::Vec2 ret = self->getStartLocation(); - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec2"); + int num_ret = olua_copy_object(L, ret, "cc.Vec2"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_EventMouse_getStartLocationInView(lua_State *L) +static int _olua_fun_cocos2d_EventMouse_getStartLocationInView(lua_State *L) { olua_startinvoke(L); @@ -6939,14 +7858,14 @@ static int _cocos2d_EventMouse_getStartLocationInView(lua_State *L) // cocos2d::Vec2 getStartLocationInView() cocos2d::Vec2 ret = self->getStartLocationInView(); - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec2"); + int num_ret = olua_copy_object(L, ret, "cc.Vec2"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_EventMouse_new(lua_State *L) +static int _olua_fun_cocos2d_EventMouse_new(lua_State *L) { olua_startinvoke(L); @@ -6954,7 +7873,7 @@ static int _cocos2d_EventMouse_new(lua_State *L) olua_check_enum(L, 1, &arg1); - // EventMouse(cocos2d::EventMouse::MouseEventType mouseEventCode) + // cocos2d::EventMouse(cocos2d::EventMouse::MouseEventType mouseEventCode) cocos2d::EventMouse *ret = new cocos2d::EventMouse(arg1); int num_ret = olua_push_object(L, ret, "cc.EventMouse"); olua_postnew(L, ret); @@ -6964,7 +7883,7 @@ static int _cocos2d_EventMouse_new(lua_State *L) return num_ret; } -static int _cocos2d_EventMouse_setCursorPosition(lua_State *L) +static int _olua_fun_cocos2d_EventMouse_setCursorPosition(lua_State *L) { olua_startinvoke(L); @@ -6984,7 +7903,7 @@ static int _cocos2d_EventMouse_setCursorPosition(lua_State *L) return 0; } -static int _cocos2d_EventMouse_setMouseButton(lua_State *L) +static int _olua_fun_cocos2d_EventMouse_setMouseButton(lua_State *L) { olua_startinvoke(L); @@ -7002,7 +7921,7 @@ static int _cocos2d_EventMouse_setMouseButton(lua_State *L) return 0; } -static int _cocos2d_EventMouse_setScrollData(lua_State *L) +static int _olua_fun_cocos2d_EventMouse_setScrollData(lua_State *L) { olua_startinvoke(L); @@ -7022,45 +7941,53 @@ static int _cocos2d_EventMouse_setScrollData(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_EventMouse(lua_State *L) +static int _olua_cls_cc_EventMouse(lua_State *L) { oluacls_class(L, "cc.EventMouse"); - oluacls_func(L, "getCursorX", _cocos2d_EventMouse_getCursorX); - oluacls_func(L, "getCursorY", _cocos2d_EventMouse_getCursorY); - oluacls_func(L, "getDelta", _cocos2d_EventMouse_getDelta); - oluacls_func(L, "getLocation", _cocos2d_EventMouse_getLocation); - oluacls_func(L, "getLocationInView", _cocos2d_EventMouse_getLocationInView); - oluacls_func(L, "getMouseButton", _cocos2d_EventMouse_getMouseButton); - oluacls_func(L, "getPreviousLocation", _cocos2d_EventMouse_getPreviousLocation); - oluacls_func(L, "getPreviousLocationInView", _cocos2d_EventMouse_getPreviousLocationInView); - oluacls_func(L, "getScrollX", _cocos2d_EventMouse_getScrollX); - oluacls_func(L, "getScrollY", _cocos2d_EventMouse_getScrollY); - oluacls_func(L, "getStartLocation", _cocos2d_EventMouse_getStartLocation); - oluacls_func(L, "getStartLocationInView", _cocos2d_EventMouse_getStartLocationInView); - oluacls_func(L, "new", _cocos2d_EventMouse_new); - oluacls_func(L, "setCursorPosition", _cocos2d_EventMouse_setCursorPosition); - oluacls_func(L, "setMouseButton", _cocos2d_EventMouse_setMouseButton); - oluacls_func(L, "setScrollData", _cocos2d_EventMouse_setScrollData); - oluacls_prop(L, "cursorX", _cocos2d_EventMouse_getCursorX, nullptr); - oluacls_prop(L, "cursorY", _cocos2d_EventMouse_getCursorY, nullptr); - oluacls_prop(L, "delta", _cocos2d_EventMouse_getDelta, nullptr); - oluacls_prop(L, "location", _cocos2d_EventMouse_getLocation, nullptr); - oluacls_prop(L, "locationInView", _cocos2d_EventMouse_getLocationInView, nullptr); - oluacls_prop(L, "mouseButton", _cocos2d_EventMouse_getMouseButton, _cocos2d_EventMouse_setMouseButton); - oluacls_prop(L, "previousLocation", _cocos2d_EventMouse_getPreviousLocation, nullptr); - oluacls_prop(L, "previousLocationInView", _cocos2d_EventMouse_getPreviousLocationInView, nullptr); - oluacls_prop(L, "scrollX", _cocos2d_EventMouse_getScrollX, nullptr); - oluacls_prop(L, "scrollY", _cocos2d_EventMouse_getScrollY, nullptr); - oluacls_prop(L, "startLocation", _cocos2d_EventMouse_getStartLocation, nullptr); - oluacls_prop(L, "startLocationInView", _cocos2d_EventMouse_getStartLocationInView, nullptr); + oluacls_func(L, "getCursorX", _olua_fun_cocos2d_EventMouse_getCursorX); + oluacls_func(L, "getCursorY", _olua_fun_cocos2d_EventMouse_getCursorY); + oluacls_func(L, "getDelta", _olua_fun_cocos2d_EventMouse_getDelta); + oluacls_func(L, "getLocation", _olua_fun_cocos2d_EventMouse_getLocation); + oluacls_func(L, "getLocationInView", _olua_fun_cocos2d_EventMouse_getLocationInView); + oluacls_func(L, "getMouseButton", _olua_fun_cocos2d_EventMouse_getMouseButton); + oluacls_func(L, "getPreviousLocation", _olua_fun_cocos2d_EventMouse_getPreviousLocation); + oluacls_func(L, "getPreviousLocationInView", _olua_fun_cocos2d_EventMouse_getPreviousLocationInView); + oluacls_func(L, "getScrollX", _olua_fun_cocos2d_EventMouse_getScrollX); + oluacls_func(L, "getScrollY", _olua_fun_cocos2d_EventMouse_getScrollY); + oluacls_func(L, "getStartLocation", _olua_fun_cocos2d_EventMouse_getStartLocation); + oluacls_func(L, "getStartLocationInView", _olua_fun_cocos2d_EventMouse_getStartLocationInView); + oluacls_func(L, "new", _olua_fun_cocos2d_EventMouse_new); + oluacls_func(L, "setCursorPosition", _olua_fun_cocos2d_EventMouse_setCursorPosition); + oluacls_func(L, "setMouseButton", _olua_fun_cocos2d_EventMouse_setMouseButton); + oluacls_func(L, "setScrollData", _olua_fun_cocos2d_EventMouse_setScrollData); + oluacls_prop(L, "cursorX", _olua_fun_cocos2d_EventMouse_getCursorX, nullptr); + oluacls_prop(L, "cursorY", _olua_fun_cocos2d_EventMouse_getCursorY, nullptr); + oluacls_prop(L, "delta", _olua_fun_cocos2d_EventMouse_getDelta, nullptr); + oluacls_prop(L, "location", _olua_fun_cocos2d_EventMouse_getLocation, nullptr); + oluacls_prop(L, "locationInView", _olua_fun_cocos2d_EventMouse_getLocationInView, nullptr); + oluacls_prop(L, "mouseButton", _olua_fun_cocos2d_EventMouse_getMouseButton, _olua_fun_cocos2d_EventMouse_setMouseButton); + oluacls_prop(L, "previousLocation", _olua_fun_cocos2d_EventMouse_getPreviousLocation, nullptr); + oluacls_prop(L, "previousLocationInView", _olua_fun_cocos2d_EventMouse_getPreviousLocationInView, nullptr); + oluacls_prop(L, "scrollX", _olua_fun_cocos2d_EventMouse_getScrollX, nullptr); + oluacls_prop(L, "scrollY", _olua_fun_cocos2d_EventMouse_getScrollY, nullptr); + oluacls_prop(L, "startLocation", _olua_fun_cocos2d_EventMouse_getStartLocation, nullptr); + oluacls_prop(L, "startLocationInView", _olua_fun_cocos2d_EventMouse_getStartLocationInView, nullptr); return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_EventKeyboard_KeyCode(lua_State *L) +OLUA_LIB int luaopen_cc_EventMouse(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.EventMouse")) { + luaL_error(L, "class not found: cocos2d::EventMouse"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_cc_EventKeyboard_KeyCode(lua_State *L) { oluacls_class(L, "cc.EventKeyboard.KeyCode"); oluacls_func(L, "__index", olua_indexerror); @@ -7238,10 +8165,19 @@ OLUA_LIB int luaopen_cocos2d_EventKeyboard_KeyCode(lua_State *L) return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_Touch_DispatchMode(lua_State *L) +OLUA_LIB int luaopen_cc_EventKeyboard_KeyCode(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.EventKeyboard.KeyCode")) { + luaL_error(L, "class not found: cocos2d::EventKeyboard::KeyCode"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_cc_Touch_DispatchMode(lua_State *L) { oluacls_class(L, "cc.Touch.DispatchMode"); oluacls_func(L, "__index", olua_indexerror); @@ -7251,10 +8187,19 @@ OLUA_LIB int luaopen_cocos2d_Touch_DispatchMode(lua_State *L) return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_EventController_ControllerEventType(lua_State *L) +OLUA_LIB int luaopen_cc_Touch_DispatchMode(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.Touch.DispatchMode")) { + luaL_error(L, "class not found: cocos2d::Touch::DispatchMode"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_cc_EventController_ControllerEventType(lua_State *L) { oluacls_class(L, "cc.EventController.ControllerEventType"); oluacls_func(L, "__index", olua_indexerror); @@ -7265,9 +8210,19 @@ OLUA_LIB int luaopen_cocos2d_EventController_ControllerEventType(lua_State *L) return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_EventController_ControllerEventType(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.EventController.ControllerEventType")) { + luaL_error(L, "class not found: cocos2d::EventController::ControllerEventType"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_EventController_getController(lua_State *L) +static int _olua_fun_cocos2d_EventController_getController(lua_State *L) { olua_startinvoke(L); @@ -7284,7 +8239,7 @@ static int _cocos2d_EventController_getController(lua_State *L) return num_ret; } -static int _cocos2d_EventController_getControllerEventType(lua_State *L) +static int _olua_fun_cocos2d_EventController_getControllerEventType(lua_State *L) { olua_startinvoke(L); @@ -7301,7 +8256,7 @@ static int _cocos2d_EventController_getControllerEventType(lua_State *L) return num_ret; } -static int _cocos2d_EventController_getKeyCode(lua_State *L) +static int _olua_fun_cocos2d_EventController_getKeyCode(lua_State *L) { olua_startinvoke(L); @@ -7318,7 +8273,7 @@ static int _cocos2d_EventController_getKeyCode(lua_State *L) return num_ret; } -static int _cocos2d_EventController_isConnected(lua_State *L) +static int _olua_fun_cocos2d_EventController_isConnected(lua_State *L) { olua_startinvoke(L); @@ -7335,7 +8290,7 @@ static int _cocos2d_EventController_isConnected(lua_State *L) return num_ret; } -static int _cocos2d_EventController_new$1(lua_State *L) +static int _olua_fun_cocos2d_EventController_new$1(lua_State *L) { olua_startinvoke(L); @@ -7347,7 +8302,7 @@ static int _cocos2d_EventController_new$1(lua_State *L) olua_check_object(L, 2, &arg2, "cc.Controller"); olua_check_integer(L, 3, &arg3); - // EventController(cocos2d::EventController::ControllerEventType type, cocos2d::Controller *controller, int keyCode) + // cocos2d::EventController(cocos2d::EventController::ControllerEventType type, cocos2d::Controller *controller, int keyCode) cocos2d::EventController *ret = new cocos2d::EventController(arg1, arg2, arg3); int num_ret = olua_push_object(L, ret, "cc.EventController"); olua_postnew(L, ret); @@ -7357,7 +8312,7 @@ static int _cocos2d_EventController_new$1(lua_State *L) return num_ret; } -static int _cocos2d_EventController_new$2(lua_State *L) +static int _olua_fun_cocos2d_EventController_new$2(lua_State *L) { olua_startinvoke(L); @@ -7369,7 +8324,7 @@ static int _cocos2d_EventController_new$2(lua_State *L) olua_check_object(L, 2, &arg2, "cc.Controller"); olua_check_bool(L, 3, &arg3); - // EventController(cocos2d::EventController::ControllerEventType type, cocos2d::Controller *controller, bool isConnected) + // cocos2d::EventController(cocos2d::EventController::ControllerEventType type, cocos2d::Controller *controller, bool isConnected) cocos2d::EventController *ret = new cocos2d::EventController(arg1, arg2, arg3); int num_ret = olua_push_object(L, ret, "cc.EventController"); olua_postnew(L, ret); @@ -7379,19 +8334,19 @@ static int _cocos2d_EventController_new$2(lua_State *L) return num_ret; } -static int _cocos2d_EventController_new(lua_State *L) +static int _olua_fun_cocos2d_EventController_new(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 3) { if ((olua_is_enum(L, 1)) && (olua_is_object(L, 2, "cc.Controller")) && (olua_is_integer(L, 3))) { - // EventController(cocos2d::EventController::ControllerEventType type, cocos2d::Controller *controller, int keyCode) - return _cocos2d_EventController_new$1(L); + // cocos2d::EventController(cocos2d::EventController::ControllerEventType type, cocos2d::Controller *controller, int keyCode) + return _olua_fun_cocos2d_EventController_new$1(L); } // if ((olua_is_enum(L, 1)) && (olua_is_object(L, 2, "cc.Controller")) && (olua_is_bool(L, 3))) { - // EventController(cocos2d::EventController::ControllerEventType type, cocos2d::Controller *controller, bool isConnected) - return _cocos2d_EventController_new$2(L); + // cocos2d::EventController(cocos2d::EventController::ControllerEventType type, cocos2d::Controller *controller, bool isConnected) + return _olua_fun_cocos2d_EventController_new$2(L); // } } @@ -7400,7 +8355,7 @@ static int _cocos2d_EventController_new(lua_State *L) return 0; } -static int _cocos2d_EventController_setConnectStatus(lua_State *L) +static int _olua_fun_cocos2d_EventController_setConnectStatus(lua_State *L) { olua_startinvoke(L); @@ -7418,7 +8373,7 @@ static int _cocos2d_EventController_setConnectStatus(lua_State *L) return 0; } -static int _cocos2d_EventController_setKeyCode(lua_State *L) +static int _olua_fun_cocos2d_EventController_setKeyCode(lua_State *L) { olua_startinvoke(L); @@ -7436,27 +8391,36 @@ static int _cocos2d_EventController_setKeyCode(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_EventController(lua_State *L) +static int _olua_cls_cc_EventController(lua_State *L) { oluacls_class(L, "cc.EventController"); - oluacls_func(L, "getController", _cocos2d_EventController_getController); - oluacls_func(L, "getControllerEventType", _cocos2d_EventController_getControllerEventType); - oluacls_func(L, "getKeyCode", _cocos2d_EventController_getKeyCode); - oluacls_func(L, "isConnected", _cocos2d_EventController_isConnected); - oluacls_func(L, "new", _cocos2d_EventController_new); - oluacls_func(L, "setConnectStatus", _cocos2d_EventController_setConnectStatus); - oluacls_func(L, "setKeyCode", _cocos2d_EventController_setKeyCode); - oluacls_prop(L, "connected", _cocos2d_EventController_isConnected, nullptr); - oluacls_prop(L, "controller", _cocos2d_EventController_getController, nullptr); - oluacls_prop(L, "controllerEventType", _cocos2d_EventController_getControllerEventType, nullptr); - oluacls_prop(L, "keyCode", _cocos2d_EventController_getKeyCode, _cocos2d_EventController_setKeyCode); + oluacls_func(L, "getController", _olua_fun_cocos2d_EventController_getController); + oluacls_func(L, "getControllerEventType", _olua_fun_cocos2d_EventController_getControllerEventType); + oluacls_func(L, "getKeyCode", _olua_fun_cocos2d_EventController_getKeyCode); + oluacls_func(L, "isConnected", _olua_fun_cocos2d_EventController_isConnected); + oluacls_func(L, "new", _olua_fun_cocos2d_EventController_new); + oluacls_func(L, "setConnectStatus", _olua_fun_cocos2d_EventController_setConnectStatus); + oluacls_func(L, "setKeyCode", _olua_fun_cocos2d_EventController_setKeyCode); + oluacls_prop(L, "connected", _olua_fun_cocos2d_EventController_isConnected, nullptr); + oluacls_prop(L, "controller", _olua_fun_cocos2d_EventController_getController, nullptr); + oluacls_prop(L, "controllerEventType", _olua_fun_cocos2d_EventController_getControllerEventType, nullptr); + oluacls_prop(L, "keyCode", _olua_fun_cocos2d_EventController_getKeyCode, _olua_fun_cocos2d_EventController_setKeyCode); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_EventController(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.EventController")) { + luaL_error(L, "class not found: cocos2d::EventController"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_Touch_getCurrentForce(lua_State *L) +static int _olua_fun_cocos2d_Touch_getCurrentForce(lua_State *L) { olua_startinvoke(L); @@ -7473,7 +8437,7 @@ static int _cocos2d_Touch_getCurrentForce(lua_State *L) return num_ret; } -static int _cocos2d_Touch_getDelta(lua_State *L) +static int _olua_fun_cocos2d_Touch_getDelta(lua_State *L) { olua_startinvoke(L); @@ -7483,14 +8447,14 @@ static int _cocos2d_Touch_getDelta(lua_State *L) // cocos2d::Vec2 getDelta() cocos2d::Vec2 ret = self->getDelta(); - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec2"); + int num_ret = olua_copy_object(L, ret, "cc.Vec2"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_Touch_getID(lua_State *L) +static int _olua_fun_cocos2d_Touch_getID(lua_State *L) { olua_startinvoke(L); @@ -7507,7 +8471,7 @@ static int _cocos2d_Touch_getID(lua_State *L) return num_ret; } -static int _cocos2d_Touch_getLocation(lua_State *L) +static int _olua_fun_cocos2d_Touch_getLocation(lua_State *L) { olua_startinvoke(L); @@ -7517,14 +8481,14 @@ static int _cocos2d_Touch_getLocation(lua_State *L) // cocos2d::Vec2 getLocation() cocos2d::Vec2 ret = self->getLocation(); - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec2"); + int num_ret = olua_copy_object(L, ret, "cc.Vec2"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_Touch_getLocationInView(lua_State *L) +static int _olua_fun_cocos2d_Touch_getLocationInView(lua_State *L) { olua_startinvoke(L); @@ -7534,14 +8498,14 @@ static int _cocos2d_Touch_getLocationInView(lua_State *L) // cocos2d::Vec2 getLocationInView() cocos2d::Vec2 ret = self->getLocationInView(); - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec2"); + int num_ret = olua_copy_object(L, ret, "cc.Vec2"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_Touch_getMaxForce(lua_State *L) +static int _olua_fun_cocos2d_Touch_getMaxForce(lua_State *L) { olua_startinvoke(L); @@ -7558,7 +8522,7 @@ static int _cocos2d_Touch_getMaxForce(lua_State *L) return num_ret; } -static int _cocos2d_Touch_getPreviousLocation(lua_State *L) +static int _olua_fun_cocos2d_Touch_getPreviousLocation(lua_State *L) { olua_startinvoke(L); @@ -7568,14 +8532,14 @@ static int _cocos2d_Touch_getPreviousLocation(lua_State *L) // cocos2d::Vec2 getPreviousLocation() cocos2d::Vec2 ret = self->getPreviousLocation(); - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec2"); + int num_ret = olua_copy_object(L, ret, "cc.Vec2"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_Touch_getPreviousLocationInView(lua_State *L) +static int _olua_fun_cocos2d_Touch_getPreviousLocationInView(lua_State *L) { olua_startinvoke(L); @@ -7585,14 +8549,14 @@ static int _cocos2d_Touch_getPreviousLocationInView(lua_State *L) // cocos2d::Vec2 getPreviousLocationInView() cocos2d::Vec2 ret = self->getPreviousLocationInView(); - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec2"); + int num_ret = olua_copy_object(L, ret, "cc.Vec2"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_Touch_getStartLocation(lua_State *L) +static int _olua_fun_cocos2d_Touch_getStartLocation(lua_State *L) { olua_startinvoke(L); @@ -7602,14 +8566,14 @@ static int _cocos2d_Touch_getStartLocation(lua_State *L) // cocos2d::Vec2 getStartLocation() cocos2d::Vec2 ret = self->getStartLocation(); - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec2"); + int num_ret = olua_copy_object(L, ret, "cc.Vec2"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_Touch_getStartLocationInView(lua_State *L) +static int _olua_fun_cocos2d_Touch_getStartLocationInView(lua_State *L) { olua_startinvoke(L); @@ -7619,18 +8583,18 @@ static int _cocos2d_Touch_getStartLocationInView(lua_State *L) // cocos2d::Vec2 getStartLocationInView() cocos2d::Vec2 ret = self->getStartLocationInView(); - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec2"); + int num_ret = olua_copy_object(L, ret, "cc.Vec2"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_Touch_new(lua_State *L) +static int _olua_fun_cocos2d_Touch_new(lua_State *L) { olua_startinvoke(L); - // Touch() + // cocos2d::Touch() cocos2d::Touch *ret = new cocos2d::Touch(); int num_ret = olua_push_object(L, ret, "cc.Touch"); olua_postnew(L, ret); @@ -7640,7 +8604,7 @@ static int _cocos2d_Touch_new(lua_State *L) return num_ret; } -static int _cocos2d_Touch_setTouchInfo$1(lua_State *L) +static int _olua_fun_cocos2d_Touch_setTouchInfo$1(lua_State *L) { olua_startinvoke(L); @@ -7662,7 +8626,7 @@ static int _cocos2d_Touch_setTouchInfo$1(lua_State *L) return 0; } -static int _cocos2d_Touch_setTouchInfo$2(lua_State *L) +static int _olua_fun_cocos2d_Touch_setTouchInfo$2(lua_State *L) { olua_startinvoke(L); @@ -7688,21 +8652,21 @@ static int _cocos2d_Touch_setTouchInfo$2(lua_State *L) return 0; } -static int _cocos2d_Touch_setTouchInfo(lua_State *L) +static int _olua_fun_cocos2d_Touch_setTouchInfo(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 3) { // if ((olua_is_integer(L, 2)) && (olua_is_number(L, 3)) && (olua_is_number(L, 4))) { // void setTouchInfo(int id, float x, float y) - return _cocos2d_Touch_setTouchInfo$1(L); + return _olua_fun_cocos2d_Touch_setTouchInfo$1(L); // } } if (num_args == 5) { // if ((olua_is_integer(L, 2)) && (olua_is_number(L, 3)) && (olua_is_number(L, 4)) && (olua_is_number(L, 5)) && (olua_is_number(L, 6))) { // void setTouchInfo(int id, float x, float y, float force, float maxForce) - return _cocos2d_Touch_setTouchInfo$2(L); + return _olua_fun_cocos2d_Touch_setTouchInfo$2(L); // } } @@ -7711,39 +8675,47 @@ static int _cocos2d_Touch_setTouchInfo(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_Touch(lua_State *L) +static int _olua_cls_cc_Touch(lua_State *L) { oluacls_class(L, "cc.Touch"); - oluacls_func(L, "getCurrentForce", _cocos2d_Touch_getCurrentForce); - oluacls_func(L, "getDelta", _cocos2d_Touch_getDelta); - oluacls_func(L, "getID", _cocos2d_Touch_getID); - oluacls_func(L, "getLocation", _cocos2d_Touch_getLocation); - oluacls_func(L, "getLocationInView", _cocos2d_Touch_getLocationInView); - oluacls_func(L, "getMaxForce", _cocos2d_Touch_getMaxForce); - oluacls_func(L, "getPreviousLocation", _cocos2d_Touch_getPreviousLocation); - oluacls_func(L, "getPreviousLocationInView", _cocos2d_Touch_getPreviousLocationInView); - oluacls_func(L, "getStartLocation", _cocos2d_Touch_getStartLocation); - oluacls_func(L, "getStartLocationInView", _cocos2d_Touch_getStartLocationInView); - oluacls_func(L, "new", _cocos2d_Touch_new); - oluacls_func(L, "setTouchInfo", _cocos2d_Touch_setTouchInfo); - oluacls_prop(L, "currentForce", _cocos2d_Touch_getCurrentForce, nullptr); - oluacls_prop(L, "delta", _cocos2d_Touch_getDelta, nullptr); - oluacls_prop(L, "id", _cocos2d_Touch_getID, nullptr); - oluacls_prop(L, "location", _cocos2d_Touch_getLocation, nullptr); - oluacls_prop(L, "locationInView", _cocos2d_Touch_getLocationInView, nullptr); - oluacls_prop(L, "maxForce", _cocos2d_Touch_getMaxForce, nullptr); - oluacls_prop(L, "previousLocation", _cocos2d_Touch_getPreviousLocation, nullptr); - oluacls_prop(L, "previousLocationInView", _cocos2d_Touch_getPreviousLocationInView, nullptr); - oluacls_prop(L, "startLocation", _cocos2d_Touch_getStartLocation, nullptr); - oluacls_prop(L, "startLocationInView", _cocos2d_Touch_getStartLocationInView, nullptr); + oluacls_func(L, "getCurrentForce", _olua_fun_cocos2d_Touch_getCurrentForce); + oluacls_func(L, "getDelta", _olua_fun_cocos2d_Touch_getDelta); + oluacls_func(L, "getID", _olua_fun_cocos2d_Touch_getID); + oluacls_func(L, "getLocation", _olua_fun_cocos2d_Touch_getLocation); + oluacls_func(L, "getLocationInView", _olua_fun_cocos2d_Touch_getLocationInView); + oluacls_func(L, "getMaxForce", _olua_fun_cocos2d_Touch_getMaxForce); + oluacls_func(L, "getPreviousLocation", _olua_fun_cocos2d_Touch_getPreviousLocation); + oluacls_func(L, "getPreviousLocationInView", _olua_fun_cocos2d_Touch_getPreviousLocationInView); + oluacls_func(L, "getStartLocation", _olua_fun_cocos2d_Touch_getStartLocation); + oluacls_func(L, "getStartLocationInView", _olua_fun_cocos2d_Touch_getStartLocationInView); + oluacls_func(L, "new", _olua_fun_cocos2d_Touch_new); + oluacls_func(L, "setTouchInfo", _olua_fun_cocos2d_Touch_setTouchInfo); + oluacls_prop(L, "currentForce", _olua_fun_cocos2d_Touch_getCurrentForce, nullptr); + oluacls_prop(L, "delta", _olua_fun_cocos2d_Touch_getDelta, nullptr); + oluacls_prop(L, "id", _olua_fun_cocos2d_Touch_getID, nullptr); + oluacls_prop(L, "location", _olua_fun_cocos2d_Touch_getLocation, nullptr); + oluacls_prop(L, "locationInView", _olua_fun_cocos2d_Touch_getLocationInView, nullptr); + oluacls_prop(L, "maxForce", _olua_fun_cocos2d_Touch_getMaxForce, nullptr); + oluacls_prop(L, "previousLocation", _olua_fun_cocos2d_Touch_getPreviousLocation, nullptr); + oluacls_prop(L, "previousLocationInView", _olua_fun_cocos2d_Touch_getPreviousLocationInView, nullptr); + oluacls_prop(L, "startLocation", _olua_fun_cocos2d_Touch_getStartLocation, nullptr); + oluacls_prop(L, "startLocationInView", _olua_fun_cocos2d_Touch_getStartLocationInView, nullptr); return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_Controller_Key(lua_State *L) +OLUA_LIB int luaopen_cc_Touch(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.Touch")) { + luaL_error(L, "class not found: cocos2d::Touch"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_cc_Controller_Key(lua_State *L) { oluacls_class(L, "cc.Controller.Key"); oluacls_func(L, "__index", olua_indexerror); @@ -7777,9 +8749,19 @@ OLUA_LIB int luaopen_cocos2d_Controller_Key(lua_State *L) return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_Controller_Key(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.Controller.Key")) { + luaL_error(L, "class not found: cocos2d::Controller::Key"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_Controller___olua_move(lua_State *L) +static int _olua_fun_cocos2d_Controller___olua_move(lua_State *L) { olua_startinvoke(L); @@ -7791,7 +8773,7 @@ static int _cocos2d_Controller___olua_move(lua_State *L) return 1; } -static int _cocos2d_Controller_getAllController(lua_State *L) +static int _olua_fun_cocos2d_Controller_getAllController(lua_State *L) { olua_startinvoke(L); @@ -7806,7 +8788,7 @@ static int _cocos2d_Controller_getAllController(lua_State *L) return num_ret; } -static int _cocos2d_Controller_getControllerByDeviceId(lua_State *L) +static int _olua_fun_cocos2d_Controller_getControllerByDeviceId(lua_State *L) { olua_startinvoke(L); @@ -7823,7 +8805,7 @@ static int _cocos2d_Controller_getControllerByDeviceId(lua_State *L) return num_ret; } -static int _cocos2d_Controller_getControllerByTag(lua_State *L) +static int _olua_fun_cocos2d_Controller_getControllerByTag(lua_State *L) { olua_startinvoke(L); @@ -7840,7 +8822,7 @@ static int _cocos2d_Controller_getControllerByTag(lua_State *L) return num_ret; } -static int _cocos2d_Controller_getDeviceId(lua_State *L) +static int _olua_fun_cocos2d_Controller_getDeviceId(lua_State *L) { olua_startinvoke(L); @@ -7857,7 +8839,7 @@ static int _cocos2d_Controller_getDeviceId(lua_State *L) return num_ret; } -static int _cocos2d_Controller_getDeviceName(lua_State *L) +static int _olua_fun_cocos2d_Controller_getDeviceName(lua_State *L) { olua_startinvoke(L); @@ -7874,7 +8856,7 @@ static int _cocos2d_Controller_getDeviceName(lua_State *L) return num_ret; } -static int _cocos2d_Controller_getKeyStatus(lua_State *L) +static int _olua_fun_cocos2d_Controller_getKeyStatus(lua_State *L) { olua_startinvoke(L); @@ -7893,7 +8875,7 @@ static int _cocos2d_Controller_getKeyStatus(lua_State *L) return num_ret; } -static int _cocos2d_Controller_getTag(lua_State *L) +static int _olua_fun_cocos2d_Controller_getTag(lua_State *L) { olua_startinvoke(L); @@ -7910,7 +8892,7 @@ static int _cocos2d_Controller_getTag(lua_State *L) return num_ret; } -static int _cocos2d_Controller_isConnected(lua_State *L) +static int _olua_fun_cocos2d_Controller_isConnected(lua_State *L) { olua_startinvoke(L); @@ -7927,7 +8909,7 @@ static int _cocos2d_Controller_isConnected(lua_State *L) return num_ret; } -static int _cocos2d_Controller_setTag(lua_State *L) +static int _olua_fun_cocos2d_Controller_setTag(lua_State *L) { olua_startinvoke(L); @@ -7945,7 +8927,7 @@ static int _cocos2d_Controller_setTag(lua_State *L) return 0; } -static int _cocos2d_Controller_startDiscoveryController(lua_State *L) +static int _olua_fun_cocos2d_Controller_startDiscoveryController(lua_State *L) { olua_startinvoke(L); @@ -7957,7 +8939,7 @@ static int _cocos2d_Controller_startDiscoveryController(lua_State *L) return 0; } -static int _cocos2d_Controller_stopDiscoveryController(lua_State *L) +static int _olua_fun_cocos2d_Controller_stopDiscoveryController(lua_State *L) { olua_startinvoke(L); @@ -7969,68 +8951,43 @@ static int _cocos2d_Controller_stopDiscoveryController(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_Controller(lua_State *L) +static int _olua_cls_cc_Controller(lua_State *L) { oluacls_class(L, "cc.Controller"); - oluacls_func(L, "__olua_move", _cocos2d_Controller___olua_move); - oluacls_func(L, "getAllController", _cocos2d_Controller_getAllController); - oluacls_func(L, "getControllerByDeviceId", _cocos2d_Controller_getControllerByDeviceId); - oluacls_func(L, "getControllerByTag", _cocos2d_Controller_getControllerByTag); - oluacls_func(L, "getDeviceId", _cocos2d_Controller_getDeviceId); - oluacls_func(L, "getDeviceName", _cocos2d_Controller_getDeviceName); - oluacls_func(L, "getKeyStatus", _cocos2d_Controller_getKeyStatus); - oluacls_func(L, "getTag", _cocos2d_Controller_getTag); - oluacls_func(L, "isConnected", _cocos2d_Controller_isConnected); - oluacls_func(L, "setTag", _cocos2d_Controller_setTag); - oluacls_func(L, "startDiscoveryController", _cocos2d_Controller_startDiscoveryController); - oluacls_func(L, "stopDiscoveryController", _cocos2d_Controller_stopDiscoveryController); - oluacls_prop(L, "allController", _cocos2d_Controller_getAllController, nullptr); - oluacls_prop(L, "connected", _cocos2d_Controller_isConnected, nullptr); - oluacls_prop(L, "deviceId", _cocos2d_Controller_getDeviceId, nullptr); - oluacls_prop(L, "deviceName", _cocos2d_Controller_getDeviceName, nullptr); - oluacls_prop(L, "tag", _cocos2d_Controller_getTag, _cocos2d_Controller_setTag); + oluacls_func(L, "__olua_move", _olua_fun_cocos2d_Controller___olua_move); + oluacls_func(L, "getAllController", _olua_fun_cocos2d_Controller_getAllController); + oluacls_func(L, "getControllerByDeviceId", _olua_fun_cocos2d_Controller_getControllerByDeviceId); + oluacls_func(L, "getControllerByTag", _olua_fun_cocos2d_Controller_getControllerByTag); + oluacls_func(L, "getDeviceId", _olua_fun_cocos2d_Controller_getDeviceId); + oluacls_func(L, "getDeviceName", _olua_fun_cocos2d_Controller_getDeviceName); + oluacls_func(L, "getKeyStatus", _olua_fun_cocos2d_Controller_getKeyStatus); + oluacls_func(L, "getTag", _olua_fun_cocos2d_Controller_getTag); + oluacls_func(L, "isConnected", _olua_fun_cocos2d_Controller_isConnected); + oluacls_func(L, "setTag", _olua_fun_cocos2d_Controller_setTag); + oluacls_func(L, "startDiscoveryController", _olua_fun_cocos2d_Controller_startDiscoveryController); + oluacls_func(L, "stopDiscoveryController", _olua_fun_cocos2d_Controller_stopDiscoveryController); + oluacls_prop(L, "allController", _olua_fun_cocos2d_Controller_getAllController, nullptr); + oluacls_prop(L, "connected", _olua_fun_cocos2d_Controller_isConnected, nullptr); + oluacls_prop(L, "deviceId", _olua_fun_cocos2d_Controller_getDeviceId, nullptr); + oluacls_prop(L, "deviceName", _olua_fun_cocos2d_Controller_getDeviceName, nullptr); + oluacls_prop(L, "tag", _olua_fun_cocos2d_Controller_getTag, _olua_fun_cocos2d_Controller_setTag); oluacls_const(L, "TAG_UNSET", cocos2d::Controller::TAG_UNSET); return 1; } -OLUA_END_DECLS -static int _cocos2d_AudioProfile___call(lua_State *L) +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_Controller(lua_State *L) { - olua_startinvoke(L); - - cocos2d::AudioProfile ret; - - luaL_checktype(L, 2, LUA_TTABLE); - - std::string arg1; /** name */ - unsigned int arg2 = 0; /** maxInstances */ - double arg3 = 0; /** minDelay */ - - olua_getfield(L, 2, "name"); - olua_check_string(L, -1, &arg1); - ret.name = arg1; - lua_pop(L, 1); - - olua_getfield(L, 2, "maxInstances"); - olua_check_integer(L, -1, &arg2); - ret.maxInstances = arg2; - lua_pop(L, 1); - - olua_getfield(L, 2, "minDelay"); - olua_check_number(L, -1, &arg3); - ret.minDelay = arg3; - lua_pop(L, 1); - - olua_pushcopy_object(L, ret, "cc.AudioProfile"); - - olua_endinvoke(L); - + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.Controller")) { + luaL_error(L, "class not found: cocos2d::Controller"); + } return 1; } +OLUA_END_DECLS -static int _cocos2d_AudioProfile___gc(lua_State *L) +static int _olua_fun_cocos2d_AudioProfile___gc(lua_State *L) { olua_startinvoke(L); @@ -8042,7 +8999,7 @@ static int _cocos2d_AudioProfile___gc(lua_State *L) return 0; } -static int _cocos2d_AudioProfile___olua_move(lua_State *L) +static int _olua_fun_cocos2d_AudioProfile___olua_move(lua_State *L) { olua_startinvoke(L); @@ -8054,21 +9011,7 @@ static int _cocos2d_AudioProfile___olua_move(lua_State *L) return 1; } -static int _cocos2d_AudioProfile_new(lua_State *L) -{ - olua_startinvoke(L); - - // AudioProfile() - cocos2d::AudioProfile *ret = new cocos2d::AudioProfile(); - int num_ret = olua_push_object(L, ret, "cc.AudioProfile"); - olua_postnew(L, ret); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_AudioProfile_get_maxInstances(lua_State *L) +static int _olua_fun_cocos2d_AudioProfile_maxInstances$1(lua_State *L) { olua_startinvoke(L); @@ -8085,7 +9028,7 @@ static int _cocos2d_AudioProfile_get_maxInstances(lua_State *L) return num_ret; } -static int _cocos2d_AudioProfile_set_maxInstances(lua_State *L) +static int _olua_fun_cocos2d_AudioProfile_maxInstances$2(lua_State *L) { olua_startinvoke(L); @@ -8103,7 +9046,28 @@ static int _cocos2d_AudioProfile_set_maxInstances(lua_State *L) return 0; } -static int _cocos2d_AudioProfile_get_minDelay(lua_State *L) +static int _olua_fun_cocos2d_AudioProfile_maxInstances(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // unsigned int maxInstances + return _olua_fun_cocos2d_AudioProfile_maxInstances$1(L); + } + + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // unsigned int maxInstances + return _olua_fun_cocos2d_AudioProfile_maxInstances$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::AudioProfile::maxInstances' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_AudioProfile_minDelay$1(lua_State *L) { olua_startinvoke(L); @@ -8120,7 +9084,7 @@ static int _cocos2d_AudioProfile_get_minDelay(lua_State *L) return num_ret; } -static int _cocos2d_AudioProfile_set_minDelay(lua_State *L) +static int _olua_fun_cocos2d_AudioProfile_minDelay$2(lua_State *L) { olua_startinvoke(L); @@ -8138,7 +9102,28 @@ static int _cocos2d_AudioProfile_set_minDelay(lua_State *L) return 0; } -static int _cocos2d_AudioProfile_get_name(lua_State *L) +static int _olua_fun_cocos2d_AudioProfile_minDelay(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // double minDelay + return _olua_fun_cocos2d_AudioProfile_minDelay$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // double minDelay + return _olua_fun_cocos2d_AudioProfile_minDelay$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::AudioProfile::minDelay' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_AudioProfile_name$1(lua_State *L) { olua_startinvoke(L); @@ -8155,7 +9140,7 @@ static int _cocos2d_AudioProfile_get_name(lua_State *L) return num_ret; } -static int _cocos2d_AudioProfile_set_name(lua_State *L) +static int _olua_fun_cocos2d_AudioProfile_name$2(lua_State *L) { olua_startinvoke(L); @@ -8173,24 +9158,66 @@ static int _cocos2d_AudioProfile_set_name(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_AudioProfile(lua_State *L) +static int _olua_fun_cocos2d_AudioProfile_name(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // std::string name + return _olua_fun_cocos2d_AudioProfile_name$1(L); + } + + if (num_args == 1) { + // if ((olua_is_string(L, 2))) { + // std::string name + return _olua_fun_cocos2d_AudioProfile_name$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::AudioProfile::name' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_AudioProfile_new(lua_State *L) +{ + olua_startinvoke(L); + + // cocos2d::AudioProfile() + cocos2d::AudioProfile *ret = new cocos2d::AudioProfile(); + int num_ret = olua_push_object(L, ret, "cc.AudioProfile"); + olua_postnew(L, ret); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_cls_cc_AudioProfile(lua_State *L) { oluacls_class(L, "cc.AudioProfile"); - oluacls_func(L, "__call", _cocos2d_AudioProfile___call); - oluacls_func(L, "__gc", _cocos2d_AudioProfile___gc); - oluacls_func(L, "__olua_move", _cocos2d_AudioProfile___olua_move); - oluacls_func(L, "new", _cocos2d_AudioProfile_new); - oluacls_prop(L, "maxInstances", _cocos2d_AudioProfile_get_maxInstances, _cocos2d_AudioProfile_set_maxInstances); - oluacls_prop(L, "minDelay", _cocos2d_AudioProfile_get_minDelay, _cocos2d_AudioProfile_set_minDelay); - oluacls_prop(L, "name", _cocos2d_AudioProfile_get_name, _cocos2d_AudioProfile_set_name); + oluacls_func(L, "__gc", _olua_fun_cocos2d_AudioProfile___gc); + oluacls_func(L, "__olua_move", _olua_fun_cocos2d_AudioProfile___olua_move); + oluacls_func(L, "new", _olua_fun_cocos2d_AudioProfile_new); + oluacls_prop(L, "maxInstances", _olua_fun_cocos2d_AudioProfile_maxInstances, _olua_fun_cocos2d_AudioProfile_maxInstances); + oluacls_prop(L, "minDelay", _olua_fun_cocos2d_AudioProfile_minDelay, _olua_fun_cocos2d_AudioProfile_minDelay); + oluacls_prop(L, "name", _olua_fun_cocos2d_AudioProfile_name, _olua_fun_cocos2d_AudioProfile_name); return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_AudioEngine_AudioState(lua_State *L) +OLUA_LIB int luaopen_cc_AudioProfile(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.AudioProfile")) { + luaL_error(L, "class not found: cocos2d::AudioProfile"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_cc_AudioEngine_AudioState(lua_State *L) { oluacls_class(L, "cc.AudioEngine.AudioState"); oluacls_func(L, "__index", olua_indexerror); @@ -8202,6 +9229,16 @@ OLUA_LIB int luaopen_cocos2d_AudioEngine_AudioState(lua_State *L) return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_AudioEngine_AudioState(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.AudioEngine.AudioState")) { + luaL_error(L, "class not found: cocos2d::AudioEngine::AudioState"); + } + return 1; +} OLUA_END_DECLS NS_CC_BEGIN @@ -8231,7 +9268,7 @@ static const std::string makeAudioEngineFinishCallbackTag(lua_Integer id) } } -static int _cocos2d_AudioEngine___gc(lua_State *L) +static int _olua_fun_cocos2d_AudioEngine___gc(lua_State *L) { olua_startinvoke(L); @@ -8243,7 +9280,7 @@ static int _cocos2d_AudioEngine___gc(lua_State *L) return 0; } -static int _cocos2d_AudioEngine___olua_move(lua_State *L) +static int _olua_fun_cocos2d_AudioEngine___olua_move(lua_State *L) { olua_startinvoke(L); @@ -8255,7 +9292,7 @@ static int _cocos2d_AudioEngine___olua_move(lua_State *L) return 1; } -static int _cocos2d_AudioEngine_end(lua_State *L) +static int _olua_fun_cocos2d_AudioEngine_end_(lua_State *L) { olua_startinvoke(L); @@ -8267,7 +9304,7 @@ static int _cocos2d_AudioEngine_end(lua_State *L) return 0; } -static int _cocos2d_AudioEngine_getCurrentTime(lua_State *L) +static int _olua_fun_cocos2d_AudioEngine_getCurrentTime(lua_State *L) { olua_startinvoke(L); @@ -8284,7 +9321,7 @@ static int _cocos2d_AudioEngine_getCurrentTime(lua_State *L) return num_ret; } -static int _cocos2d_AudioEngine_getDefaultProfile(lua_State *L) +static int _olua_fun_cocos2d_AudioEngine_getDefaultProfile(lua_State *L) { olua_startinvoke(L); @@ -8297,7 +9334,7 @@ static int _cocos2d_AudioEngine_getDefaultProfile(lua_State *L) return num_ret; } -static int _cocos2d_AudioEngine_getDuration(lua_State *L) +static int _olua_fun_cocos2d_AudioEngine_getDuration(lua_State *L) { olua_startinvoke(L); @@ -8314,7 +9351,7 @@ static int _cocos2d_AudioEngine_getDuration(lua_State *L) return num_ret; } -static int _cocos2d_AudioEngine_getMaxAudioInstance(lua_State *L) +static int _olua_fun_cocos2d_AudioEngine_getMaxAudioInstance(lua_State *L) { olua_startinvoke(L); @@ -8327,7 +9364,7 @@ static int _cocos2d_AudioEngine_getMaxAudioInstance(lua_State *L) return num_ret; } -static int _cocos2d_AudioEngine_getPlayingAudioCount(lua_State *L) +static int _olua_fun_cocos2d_AudioEngine_getPlayingAudioCount(lua_State *L) { olua_startinvoke(L); @@ -8340,7 +9377,7 @@ static int _cocos2d_AudioEngine_getPlayingAudioCount(lua_State *L) return num_ret; } -static int _cocos2d_AudioEngine_getProfile$1(lua_State *L) +static int _olua_fun_cocos2d_AudioEngine_getProfile$1(lua_State *L) { olua_startinvoke(L); @@ -8357,7 +9394,7 @@ static int _cocos2d_AudioEngine_getProfile$1(lua_State *L) return num_ret; } -static int _cocos2d_AudioEngine_getProfile$2(lua_State *L) +static int _olua_fun_cocos2d_AudioEngine_getProfile$2(lua_State *L) { olua_startinvoke(L); @@ -8374,19 +9411,19 @@ static int _cocos2d_AudioEngine_getProfile$2(lua_State *L) return num_ret; } -static int _cocos2d_AudioEngine_getProfile(lua_State *L) +static int _olua_fun_cocos2d_AudioEngine_getProfile(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 1) { if ((olua_is_integer(L, 1))) { // static cocos2d::AudioProfile *getProfile(int audioID) - return _cocos2d_AudioEngine_getProfile$1(L); + return _olua_fun_cocos2d_AudioEngine_getProfile$1(L); } // if ((olua_is_string(L, 1))) { // static cocos2d::AudioProfile *getProfile(const std::string &profileName) - return _cocos2d_AudioEngine_getProfile$2(L); + return _olua_fun_cocos2d_AudioEngine_getProfile$2(L); // } } @@ -8395,7 +9432,7 @@ static int _cocos2d_AudioEngine_getProfile(lua_State *L) return 0; } -static int _cocos2d_AudioEngine_getState(lua_State *L) +static int _olua_fun_cocos2d_AudioEngine_getState(lua_State *L) { olua_startinvoke(L); @@ -8412,7 +9449,7 @@ static int _cocos2d_AudioEngine_getState(lua_State *L) return num_ret; } -static int _cocos2d_AudioEngine_getVolume(lua_State *L) +static int _olua_fun_cocos2d_AudioEngine_getVolume(lua_State *L) { olua_startinvoke(L); @@ -8429,7 +9466,7 @@ static int _cocos2d_AudioEngine_getVolume(lua_State *L) return num_ret; } -static int _cocos2d_AudioEngine_isEnabled(lua_State *L) +static int _olua_fun_cocos2d_AudioEngine_isEnabled(lua_State *L) { olua_startinvoke(L); @@ -8442,7 +9479,7 @@ static int _cocos2d_AudioEngine_isEnabled(lua_State *L) return num_ret; } -static int _cocos2d_AudioEngine_isLoop(lua_State *L) +static int _olua_fun_cocos2d_AudioEngine_isLoop(lua_State *L) { olua_startinvoke(L); @@ -8459,7 +9496,7 @@ static int _cocos2d_AudioEngine_isLoop(lua_State *L) return num_ret; } -static int _cocos2d_AudioEngine_lazyInit(lua_State *L) +static int _olua_fun_cocos2d_AudioEngine_lazyInit(lua_State *L) { olua_startinvoke(L); @@ -8472,7 +9509,7 @@ static int _cocos2d_AudioEngine_lazyInit(lua_State *L) return num_ret; } -static int _cocos2d_AudioEngine_pause(lua_State *L) +static int _olua_fun_cocos2d_AudioEngine_pause(lua_State *L) { olua_startinvoke(L); @@ -8488,7 +9525,7 @@ static int _cocos2d_AudioEngine_pause(lua_State *L) return 0; } -static int _cocos2d_AudioEngine_pauseAll(lua_State *L) +static int _olua_fun_cocos2d_AudioEngine_pauseAll(lua_State *L) { olua_startinvoke(L); @@ -8500,7 +9537,7 @@ static int _cocos2d_AudioEngine_pauseAll(lua_State *L) return 0; } -static int _cocos2d_AudioEngine_play2d$1(lua_State *L) +static int _olua_fun_cocos2d_AudioEngine_play2d$1(lua_State *L) { olua_startinvoke(L); @@ -8525,7 +9562,7 @@ static int _cocos2d_AudioEngine_play2d$1(lua_State *L) return num_ret; } -static int _cocos2d_AudioEngine_play2d$2(lua_State *L) +static int _olua_fun_cocos2d_AudioEngine_play2d$2(lua_State *L) { olua_startinvoke(L); @@ -8533,7 +9570,7 @@ static int _cocos2d_AudioEngine_play2d$2(lua_State *L) olua_check_string(L, 1, &arg1); - // static int play2d(const std::string &filePath, @optional bool loop, @optional float volume, @optional float position, @optional const cocos2d::AudioProfile *profile) + // static int play2d(const std::string &filePath) int ret = cocos2d::AudioEngine::play2d(arg1); int num_ret = olua_push_integer(L, ret); @@ -8542,7 +9579,7 @@ static int _cocos2d_AudioEngine_play2d$2(lua_State *L) return num_ret; } -static int _cocos2d_AudioEngine_play2d$3(lua_State *L) +static int _olua_fun_cocos2d_AudioEngine_play2d$3(lua_State *L) { olua_startinvoke(L); @@ -8552,7 +9589,7 @@ static int _cocos2d_AudioEngine_play2d$3(lua_State *L) olua_check_string(L, 1, &arg1); olua_check_bool(L, 2, &arg2); - // static int play2d(const std::string &filePath, @optional bool loop, @optional float volume, @optional float position, @optional const cocos2d::AudioProfile *profile) + // static int play2d(const std::string &filePath, @optional bool loop) int ret = cocos2d::AudioEngine::play2d(arg1, arg2); int num_ret = olua_push_integer(L, ret); @@ -8561,7 +9598,7 @@ static int _cocos2d_AudioEngine_play2d$3(lua_State *L) return num_ret; } -static int _cocos2d_AudioEngine_play2d$4(lua_State *L) +static int _olua_fun_cocos2d_AudioEngine_play2d$4(lua_State *L) { olua_startinvoke(L); @@ -8573,7 +9610,7 @@ static int _cocos2d_AudioEngine_play2d$4(lua_State *L) olua_check_bool(L, 2, &arg2); olua_check_number(L, 3, &arg3); - // static int play2d(const std::string &filePath, @optional bool loop, @optional float volume, @optional float position, @optional const cocos2d::AudioProfile *profile) + // static int play2d(const std::string &filePath, @optional bool loop, @optional float volume) int ret = cocos2d::AudioEngine::play2d(arg1, arg2, arg3); int num_ret = olua_push_integer(L, ret); @@ -8582,7 +9619,7 @@ static int _cocos2d_AudioEngine_play2d$4(lua_State *L) return num_ret; } -static int _cocos2d_AudioEngine_play2d$5(lua_State *L) +static int _olua_fun_cocos2d_AudioEngine_play2d$5(lua_State *L) { olua_startinvoke(L); @@ -8596,7 +9633,7 @@ static int _cocos2d_AudioEngine_play2d$5(lua_State *L) olua_check_number(L, 3, &arg3); olua_check_number(L, 4, &arg4); - // static int play2d(const std::string &filePath, @optional bool loop, @optional float volume, @optional float position, @optional const cocos2d::AudioProfile *profile) + // static int play2d(const std::string &filePath, @optional bool loop, @optional float volume, @optional float position) int ret = cocos2d::AudioEngine::play2d(arg1, arg2, arg3, arg4); int num_ret = olua_push_integer(L, ret); @@ -8605,42 +9642,42 @@ static int _cocos2d_AudioEngine_play2d$5(lua_State *L) return num_ret; } -static int _cocos2d_AudioEngine_play2d(lua_State *L) +static int _olua_fun_cocos2d_AudioEngine_play2d(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 1) { // if ((olua_is_string(L, 1))) { - // static int play2d(const std::string &filePath, @optional bool loop, @optional float volume, @optional float position, @optional const cocos2d::AudioProfile *profile) - return _cocos2d_AudioEngine_play2d$2(L); + // static int play2d(const std::string &filePath) + return _olua_fun_cocos2d_AudioEngine_play2d$2(L); // } } if (num_args == 2) { // if ((olua_is_string(L, 1)) && (olua_is_bool(L, 2))) { - // static int play2d(const std::string &filePath, @optional bool loop, @optional float volume, @optional float position, @optional const cocos2d::AudioProfile *profile) - return _cocos2d_AudioEngine_play2d$3(L); + // static int play2d(const std::string &filePath, @optional bool loop) + return _olua_fun_cocos2d_AudioEngine_play2d$3(L); // } } if (num_args == 3) { // if ((olua_is_string(L, 1)) && (olua_is_bool(L, 2)) && (olua_is_number(L, 3))) { - // static int play2d(const std::string &filePath, @optional bool loop, @optional float volume, @optional float position, @optional const cocos2d::AudioProfile *profile) - return _cocos2d_AudioEngine_play2d$4(L); + // static int play2d(const std::string &filePath, @optional bool loop, @optional float volume) + return _olua_fun_cocos2d_AudioEngine_play2d$4(L); // } } if (num_args == 4) { // if ((olua_is_string(L, 1)) && (olua_is_bool(L, 2)) && (olua_is_number(L, 3)) && (olua_is_number(L, 4))) { - // static int play2d(const std::string &filePath, @optional bool loop, @optional float volume, @optional float position, @optional const cocos2d::AudioProfile *profile) - return _cocos2d_AudioEngine_play2d$5(L); + // static int play2d(const std::string &filePath, @optional bool loop, @optional float volume, @optional float position) + return _olua_fun_cocos2d_AudioEngine_play2d$5(L); // } } if (num_args == 5) { // if ((olua_is_string(L, 1)) && (olua_is_bool(L, 2)) && (olua_is_number(L, 3)) && (olua_is_number(L, 4)) && (olua_is_object(L, 5, "cc.AudioProfile"))) { // static int play2d(const std::string &filePath, @optional bool loop, @optional float volume, @optional float position, @optional const cocos2d::AudioProfile *profile) - return _cocos2d_AudioEngine_play2d$1(L); + return _olua_fun_cocos2d_AudioEngine_play2d$1(L); // } } @@ -8649,7 +9686,7 @@ static int _cocos2d_AudioEngine_play2d(lua_State *L) return 0; } -static int _cocos2d_AudioEngine_preload$1(lua_State *L) +static int _olua_fun_cocos2d_AudioEngine_preload$1(lua_State *L) { olua_startinvoke(L); @@ -8665,7 +9702,7 @@ static int _cocos2d_AudioEngine_preload$1(lua_State *L) return 0; } -static int _cocos2d_AudioEngine_preload$2(lua_State *L) +static int _olua_fun_cocos2d_AudioEngine_preload$2(lua_State *L) { olua_startinvoke(L); @@ -8677,15 +9714,16 @@ static int _cocos2d_AudioEngine_preload$2(lua_State *L) void *cb_store = (void *)olua_pushclassobj(L, "cc.AudioEngine"); std::string cb_tag = "preload"; - std::string cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + std::string cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg2 = [cb_store, cb_name, cb_ctx](bool arg1) { + // lua_State *ML = olua_mainthread(L); + arg2 = [cb_store, cb_name, cb_ctx /*, ML */](bool cb_arg1) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); if (olua_contextequal(L, cb_ctx)) { int top = lua_gettop(L); - olua_push_bool(L, arg1); + olua_push_bool(L, cb_arg1); olua_callback(L, cb_store, cb_name.c_str(), 1); @@ -8695,7 +9733,7 @@ static int _cocos2d_AudioEngine_preload$2(lua_State *L) } }; - // static void preload(const std::string &filePath, @localvar std::function callback) + // static void preload(const std::string &filePath, std::function callback) cocos2d::AudioEngine::preload(arg1, arg2); olua_endinvoke(L); @@ -8703,21 +9741,21 @@ static int _cocos2d_AudioEngine_preload$2(lua_State *L) return 0; } -static int _cocos2d_AudioEngine_preload(lua_State *L) +static int _olua_fun_cocos2d_AudioEngine_preload(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 1) { // if ((olua_is_string(L, 1))) { // static void preload(const std::string &filePath) - return _cocos2d_AudioEngine_preload$1(L); + return _olua_fun_cocos2d_AudioEngine_preload$1(L); // } } if (num_args == 2) { // if ((olua_is_string(L, 1)) && (olua_is_callback(L, 2, "std.function"))) { - // static void preload(const std::string &filePath, @localvar std::function callback) - return _cocos2d_AudioEngine_preload$2(L); + // static void preload(const std::string &filePath, std::function callback) + return _olua_fun_cocos2d_AudioEngine_preload$2(L); // } } @@ -8726,7 +9764,7 @@ static int _cocos2d_AudioEngine_preload(lua_State *L) return 0; } -static int _cocos2d_AudioEngine_resume(lua_State *L) +static int _olua_fun_cocos2d_AudioEngine_resume(lua_State *L) { olua_startinvoke(L); @@ -8742,7 +9780,7 @@ static int _cocos2d_AudioEngine_resume(lua_State *L) return 0; } -static int _cocos2d_AudioEngine_resumeAll(lua_State *L) +static int _olua_fun_cocos2d_AudioEngine_resumeAll(lua_State *L) { olua_startinvoke(L); @@ -8754,7 +9792,7 @@ static int _cocos2d_AudioEngine_resumeAll(lua_State *L) return 0; } -static int _cocos2d_AudioEngine_setCurrentTime(lua_State *L) +static int _olua_fun_cocos2d_AudioEngine_setCurrentTime(lua_State *L) { olua_startinvoke(L); @@ -8773,7 +9811,7 @@ static int _cocos2d_AudioEngine_setCurrentTime(lua_State *L) return num_ret; } -static int _cocos2d_AudioEngine_setEnabled(lua_State *L) +static int _olua_fun_cocos2d_AudioEngine_setEnabled(lua_State *L) { olua_startinvoke(L); @@ -8789,7 +9827,7 @@ static int _cocos2d_AudioEngine_setEnabled(lua_State *L) return 0; } -static int _cocos2d_AudioEngine_setFinishCallback(lua_State *L) +static int _olua_fun_cocos2d_AudioEngine_setFinishCallback(lua_State *L) { olua_startinvoke(L); @@ -8805,16 +9843,17 @@ static int _cocos2d_AudioEngine_setFinishCallback(lua_State *L) std::string cb_tag = makeAudioEngineFinishCallbackTag(arg1); std::string cb_name; if (olua_isfunction(L, 2)) { - cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg2 = [cb_store, cb_name, cb_ctx](int arg1, const std::string &arg2) { + // lua_State *ML = olua_mainthread(L); + arg2 = [cb_store, cb_name, cb_ctx /*, ML */](int cb_arg1, const std::string &cb_arg2) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); if (olua_contextequal(L, cb_ctx)) { int top = lua_gettop(L); - olua_push_integer(L, arg1); - olua_push_string(L, arg2); + olua_push_integer(L, cb_arg1); + olua_push_string(L, cb_arg2); olua_callback(L, cb_store, cb_name.c_str(), 2); @@ -8828,7 +9867,7 @@ static int _cocos2d_AudioEngine_setFinishCallback(lua_State *L) arg2 = nullptr; } - // static void setFinishCallback(int audioID, @localvar @nullable const std::function &callback) + // static void setFinishCallback(int audioID, @nullable const std::function &callback) cocos2d::AudioEngine::setFinishCallback(arg1, arg2); olua_endinvoke(L); @@ -8836,7 +9875,7 @@ static int _cocos2d_AudioEngine_setFinishCallback(lua_State *L) return 0; } -static int _cocos2d_AudioEngine_setLoop(lua_State *L) +static int _olua_fun_cocos2d_AudioEngine_setLoop(lua_State *L) { olua_startinvoke(L); @@ -8854,7 +9893,7 @@ static int _cocos2d_AudioEngine_setLoop(lua_State *L) return 0; } -static int _cocos2d_AudioEngine_setMaxAudioInstance(lua_State *L) +static int _olua_fun_cocos2d_AudioEngine_setMaxAudioInstance(lua_State *L) { olua_startinvoke(L); @@ -8871,7 +9910,7 @@ static int _cocos2d_AudioEngine_setMaxAudioInstance(lua_State *L) return num_ret; } -static int _cocos2d_AudioEngine_setVolume(lua_State *L) +static int _olua_fun_cocos2d_AudioEngine_setVolume(lua_State *L) { olua_startinvoke(L); @@ -8889,7 +9928,7 @@ static int _cocos2d_AudioEngine_setVolume(lua_State *L) return 0; } -static int _cocos2d_AudioEngine_stop(lua_State *L) +static int _olua_fun_cocos2d_AudioEngine_stop(lua_State *L) { olua_startinvoke(L); @@ -8909,7 +9948,7 @@ static int _cocos2d_AudioEngine_stop(lua_State *L) return 0; } -static int _cocos2d_AudioEngine_stopAll(lua_State *L) +static int _olua_fun_cocos2d_AudioEngine_stopAll(lua_State *L) { olua_startinvoke(L); @@ -8925,7 +9964,7 @@ static int _cocos2d_AudioEngine_stopAll(lua_State *L) return 0; } -static int _cocos2d_AudioEngine_uncache(lua_State *L) +static int _olua_fun_cocos2d_AudioEngine_uncache(lua_State *L) { olua_startinvoke(L); @@ -8950,7 +9989,7 @@ static int _cocos2d_AudioEngine_uncache(lua_State *L) return 0; } -static int _cocos2d_AudioEngine_uncacheAll(lua_State *L) +static int _olua_fun_cocos2d_AudioEngine_uncacheAll(lua_State *L) { olua_startinvoke(L); @@ -8966,53 +10005,61 @@ static int _cocos2d_AudioEngine_uncacheAll(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_AudioEngine(lua_State *L) +static int _olua_cls_cc_AudioEngine(lua_State *L) { oluacls_class(L, "cc.AudioEngine"); - oluacls_func(L, "__gc", _cocos2d_AudioEngine___gc); - oluacls_func(L, "__olua_move", _cocos2d_AudioEngine___olua_move); - oluacls_func(L, "end", _cocos2d_AudioEngine_end); - oluacls_func(L, "getCurrentTime", _cocos2d_AudioEngine_getCurrentTime); - oluacls_func(L, "getDefaultProfile", _cocos2d_AudioEngine_getDefaultProfile); - oluacls_func(L, "getDuration", _cocos2d_AudioEngine_getDuration); - oluacls_func(L, "getMaxAudioInstance", _cocos2d_AudioEngine_getMaxAudioInstance); - oluacls_func(L, "getPlayingAudioCount", _cocos2d_AudioEngine_getPlayingAudioCount); - oluacls_func(L, "getProfile", _cocos2d_AudioEngine_getProfile); - oluacls_func(L, "getState", _cocos2d_AudioEngine_getState); - oluacls_func(L, "getVolume", _cocos2d_AudioEngine_getVolume); - oluacls_func(L, "isEnabled", _cocos2d_AudioEngine_isEnabled); - oluacls_func(L, "isLoop", _cocos2d_AudioEngine_isLoop); - oluacls_func(L, "lazyInit", _cocos2d_AudioEngine_lazyInit); - oluacls_func(L, "pause", _cocos2d_AudioEngine_pause); - oluacls_func(L, "pauseAll", _cocos2d_AudioEngine_pauseAll); - oluacls_func(L, "play2d", _cocos2d_AudioEngine_play2d); - oluacls_func(L, "preload", _cocos2d_AudioEngine_preload); - oluacls_func(L, "resume", _cocos2d_AudioEngine_resume); - oluacls_func(L, "resumeAll", _cocos2d_AudioEngine_resumeAll); - oluacls_func(L, "setCurrentTime", _cocos2d_AudioEngine_setCurrentTime); - oluacls_func(L, "setEnabled", _cocos2d_AudioEngine_setEnabled); - oluacls_func(L, "setFinishCallback", _cocos2d_AudioEngine_setFinishCallback); - oluacls_func(L, "setLoop", _cocos2d_AudioEngine_setLoop); - oluacls_func(L, "setMaxAudioInstance", _cocos2d_AudioEngine_setMaxAudioInstance); - oluacls_func(L, "setVolume", _cocos2d_AudioEngine_setVolume); - oluacls_func(L, "stop", _cocos2d_AudioEngine_stop); - oluacls_func(L, "stopAll", _cocos2d_AudioEngine_stopAll); - oluacls_func(L, "uncache", _cocos2d_AudioEngine_uncache); - oluacls_func(L, "uncacheAll", _cocos2d_AudioEngine_uncacheAll); - oluacls_prop(L, "defaultProfile", _cocos2d_AudioEngine_getDefaultProfile, nullptr); - oluacls_prop(L, "enabled", _cocos2d_AudioEngine_isEnabled, _cocos2d_AudioEngine_setEnabled); - oluacls_prop(L, "maxAudioInstance", _cocos2d_AudioEngine_getMaxAudioInstance, _cocos2d_AudioEngine_setMaxAudioInstance); - oluacls_prop(L, "playingAudioCount", _cocos2d_AudioEngine_getPlayingAudioCount, nullptr); + oluacls_func(L, "__gc", _olua_fun_cocos2d_AudioEngine___gc); + oluacls_func(L, "__olua_move", _olua_fun_cocos2d_AudioEngine___olua_move); + oluacls_func(L, "end_", _olua_fun_cocos2d_AudioEngine_end_); + oluacls_func(L, "getCurrentTime", _olua_fun_cocos2d_AudioEngine_getCurrentTime); + oluacls_func(L, "getDefaultProfile", _olua_fun_cocos2d_AudioEngine_getDefaultProfile); + oluacls_func(L, "getDuration", _olua_fun_cocos2d_AudioEngine_getDuration); + oluacls_func(L, "getMaxAudioInstance", _olua_fun_cocos2d_AudioEngine_getMaxAudioInstance); + oluacls_func(L, "getPlayingAudioCount", _olua_fun_cocos2d_AudioEngine_getPlayingAudioCount); + oluacls_func(L, "getProfile", _olua_fun_cocos2d_AudioEngine_getProfile); + oluacls_func(L, "getState", _olua_fun_cocos2d_AudioEngine_getState); + oluacls_func(L, "getVolume", _olua_fun_cocos2d_AudioEngine_getVolume); + oluacls_func(L, "isEnabled", _olua_fun_cocos2d_AudioEngine_isEnabled); + oluacls_func(L, "isLoop", _olua_fun_cocos2d_AudioEngine_isLoop); + oluacls_func(L, "lazyInit", _olua_fun_cocos2d_AudioEngine_lazyInit); + oluacls_func(L, "pause", _olua_fun_cocos2d_AudioEngine_pause); + oluacls_func(L, "pauseAll", _olua_fun_cocos2d_AudioEngine_pauseAll); + oluacls_func(L, "play2d", _olua_fun_cocos2d_AudioEngine_play2d); + oluacls_func(L, "preload", _olua_fun_cocos2d_AudioEngine_preload); + oluacls_func(L, "resume", _olua_fun_cocos2d_AudioEngine_resume); + oluacls_func(L, "resumeAll", _olua_fun_cocos2d_AudioEngine_resumeAll); + oluacls_func(L, "setCurrentTime", _olua_fun_cocos2d_AudioEngine_setCurrentTime); + oluacls_func(L, "setEnabled", _olua_fun_cocos2d_AudioEngine_setEnabled); + oluacls_func(L, "setFinishCallback", _olua_fun_cocos2d_AudioEngine_setFinishCallback); + oluacls_func(L, "setLoop", _olua_fun_cocos2d_AudioEngine_setLoop); + oluacls_func(L, "setMaxAudioInstance", _olua_fun_cocos2d_AudioEngine_setMaxAudioInstance); + oluacls_func(L, "setVolume", _olua_fun_cocos2d_AudioEngine_setVolume); + oluacls_func(L, "stop", _olua_fun_cocos2d_AudioEngine_stop); + oluacls_func(L, "stopAll", _olua_fun_cocos2d_AudioEngine_stopAll); + oluacls_func(L, "uncache", _olua_fun_cocos2d_AudioEngine_uncache); + oluacls_func(L, "uncacheAll", _olua_fun_cocos2d_AudioEngine_uncacheAll); + oluacls_prop(L, "defaultProfile", _olua_fun_cocos2d_AudioEngine_getDefaultProfile, nullptr); + oluacls_prop(L, "enabled", _olua_fun_cocos2d_AudioEngine_isEnabled, _olua_fun_cocos2d_AudioEngine_setEnabled); + oluacls_prop(L, "maxAudioInstance", _olua_fun_cocos2d_AudioEngine_getMaxAudioInstance, _olua_fun_cocos2d_AudioEngine_setMaxAudioInstance); + oluacls_prop(L, "playingAudioCount", _olua_fun_cocos2d_AudioEngine_getPlayingAudioCount, nullptr); oluacls_const(L, "INVALID_AUDIO_ID", cocos2d::AudioEngine::INVALID_AUDIO_ID); oluacls_const(L, "TIME_UNKNOWN", cocos2d::AudioEngine::TIME_UNKNOWN); return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ApplicationProtocol_Platform(lua_State *L) +OLUA_LIB int luaopen_cc_AudioEngine(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.AudioEngine")) { + luaL_error(L, "class not found: cocos2d::AudioEngine"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_cc_ApplicationProtocol_Platform(lua_State *L) { oluacls_class(L, "cc.ApplicationProtocol.Platform"); oluacls_func(L, "__index", olua_indexerror); @@ -9026,10 +10073,19 @@ OLUA_LIB int luaopen_cocos2d_ApplicationProtocol_Platform(lua_State *L) return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_LanguageType(lua_State *L) +OLUA_LIB int luaopen_cc_ApplicationProtocol_Platform(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.ApplicationProtocol.Platform")) { + luaL_error(L, "class not found: cocos2d::ApplicationProtocol::Platform"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_cc_LanguageType(lua_State *L) { oluacls_class(L, "cc.LanguageType"); oluacls_func(L, "__index", olua_indexerror); @@ -9057,9 +10113,19 @@ OLUA_LIB int luaopen_cocos2d_LanguageType(lua_State *L) return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_LanguageType(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.LanguageType")) { + luaL_error(L, "class not found: cocos2d::LanguageType"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_ApplicationProtocol___gc(lua_State *L) +static int _olua_fun_cocos2d_ApplicationProtocol___gc(lua_State *L) { olua_startinvoke(L); @@ -9071,7 +10137,7 @@ static int _cocos2d_ApplicationProtocol___gc(lua_State *L) return 0; } -static int _cocos2d_ApplicationProtocol___olua_move(lua_State *L) +static int _olua_fun_cocos2d_ApplicationProtocol___olua_move(lua_State *L) { olua_startinvoke(L); @@ -9083,7 +10149,7 @@ static int _cocos2d_ApplicationProtocol___olua_move(lua_State *L) return 1; } -static int _cocos2d_ApplicationProtocol_applicationDidEnterBackground(lua_State *L) +static int _olua_fun_cocos2d_ApplicationProtocol_applicationDidEnterBackground(lua_State *L) { olua_startinvoke(L); @@ -9099,7 +10165,7 @@ static int _cocos2d_ApplicationProtocol_applicationDidEnterBackground(lua_State return 0; } -static int _cocos2d_ApplicationProtocol_applicationDidFinishLaunching(lua_State *L) +static int _olua_fun_cocos2d_ApplicationProtocol_applicationDidFinishLaunching(lua_State *L) { olua_startinvoke(L); @@ -9116,7 +10182,7 @@ static int _cocos2d_ApplicationProtocol_applicationDidFinishLaunching(lua_State return num_ret; } -static int _cocos2d_ApplicationProtocol_applicationWillEnterForeground(lua_State *L) +static int _olua_fun_cocos2d_ApplicationProtocol_applicationWillEnterForeground(lua_State *L) { olua_startinvoke(L); @@ -9132,7 +10198,7 @@ static int _cocos2d_ApplicationProtocol_applicationWillEnterForeground(lua_State return 0; } -static int _cocos2d_ApplicationProtocol_getCurrentLanguage(lua_State *L) +static int _olua_fun_cocos2d_ApplicationProtocol_getCurrentLanguage(lua_State *L) { olua_startinvoke(L); @@ -9149,7 +10215,7 @@ static int _cocos2d_ApplicationProtocol_getCurrentLanguage(lua_State *L) return num_ret; } -static int _cocos2d_ApplicationProtocol_getCurrentLanguageCode(lua_State *L) +static int _olua_fun_cocos2d_ApplicationProtocol_getCurrentLanguageCode(lua_State *L) { olua_startinvoke(L); @@ -9166,7 +10232,7 @@ static int _cocos2d_ApplicationProtocol_getCurrentLanguageCode(lua_State *L) return num_ret; } -static int _cocos2d_ApplicationProtocol_getTargetPlatform(lua_State *L) +static int _olua_fun_cocos2d_ApplicationProtocol_getTargetPlatform(lua_State *L) { olua_startinvoke(L); @@ -9183,7 +10249,7 @@ static int _cocos2d_ApplicationProtocol_getTargetPlatform(lua_State *L) return num_ret; } -static int _cocos2d_ApplicationProtocol_getVersion(lua_State *L) +static int _olua_fun_cocos2d_ApplicationProtocol_getVersion(lua_State *L) { olua_startinvoke(L); @@ -9200,7 +10266,7 @@ static int _cocos2d_ApplicationProtocol_getVersion(lua_State *L) return num_ret; } -static int _cocos2d_ApplicationProtocol_initGLContextAttrs(lua_State *L) +static int _olua_fun_cocos2d_ApplicationProtocol_initGLContextAttrs(lua_State *L) { olua_startinvoke(L); @@ -9216,7 +10282,7 @@ static int _cocos2d_ApplicationProtocol_initGLContextAttrs(lua_State *L) return 0; } -static int _cocos2d_ApplicationProtocol_openURL(lua_State *L) +static int _olua_fun_cocos2d_ApplicationProtocol_openURL(lua_State *L) { olua_startinvoke(L); @@ -9235,7 +10301,7 @@ static int _cocos2d_ApplicationProtocol_openURL(lua_State *L) return num_ret; } -static int _cocos2d_ApplicationProtocol_setAnimationInterval(lua_State *L) +static int _olua_fun_cocos2d_ApplicationProtocol_setAnimationInterval(lua_State *L) { olua_startinvoke(L); @@ -9253,32 +10319,41 @@ static int _cocos2d_ApplicationProtocol_setAnimationInterval(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ApplicationProtocol(lua_State *L) +static int _olua_cls_cc_ApplicationProtocol(lua_State *L) { oluacls_class(L, "cc.ApplicationProtocol"); - oluacls_func(L, "__gc", _cocos2d_ApplicationProtocol___gc); - oluacls_func(L, "__olua_move", _cocos2d_ApplicationProtocol___olua_move); - oluacls_func(L, "applicationDidEnterBackground", _cocos2d_ApplicationProtocol_applicationDidEnterBackground); - oluacls_func(L, "applicationDidFinishLaunching", _cocos2d_ApplicationProtocol_applicationDidFinishLaunching); - oluacls_func(L, "applicationWillEnterForeground", _cocos2d_ApplicationProtocol_applicationWillEnterForeground); - oluacls_func(L, "getCurrentLanguage", _cocos2d_ApplicationProtocol_getCurrentLanguage); - oluacls_func(L, "getCurrentLanguageCode", _cocos2d_ApplicationProtocol_getCurrentLanguageCode); - oluacls_func(L, "getTargetPlatform", _cocos2d_ApplicationProtocol_getTargetPlatform); - oluacls_func(L, "getVersion", _cocos2d_ApplicationProtocol_getVersion); - oluacls_func(L, "initGLContextAttrs", _cocos2d_ApplicationProtocol_initGLContextAttrs); - oluacls_func(L, "openURL", _cocos2d_ApplicationProtocol_openURL); - oluacls_func(L, "setAnimationInterval", _cocos2d_ApplicationProtocol_setAnimationInterval); - oluacls_prop(L, "currentLanguage", _cocos2d_ApplicationProtocol_getCurrentLanguage, nullptr); - oluacls_prop(L, "currentLanguageCode", _cocos2d_ApplicationProtocol_getCurrentLanguageCode, nullptr); - oluacls_prop(L, "targetPlatform", _cocos2d_ApplicationProtocol_getTargetPlatform, nullptr); - oluacls_prop(L, "version", _cocos2d_ApplicationProtocol_getVersion, nullptr); + oluacls_func(L, "__gc", _olua_fun_cocos2d_ApplicationProtocol___gc); + oluacls_func(L, "__olua_move", _olua_fun_cocos2d_ApplicationProtocol___olua_move); + oluacls_func(L, "applicationDidEnterBackground", _olua_fun_cocos2d_ApplicationProtocol_applicationDidEnterBackground); + oluacls_func(L, "applicationDidFinishLaunching", _olua_fun_cocos2d_ApplicationProtocol_applicationDidFinishLaunching); + oluacls_func(L, "applicationWillEnterForeground", _olua_fun_cocos2d_ApplicationProtocol_applicationWillEnterForeground); + oluacls_func(L, "getCurrentLanguage", _olua_fun_cocos2d_ApplicationProtocol_getCurrentLanguage); + oluacls_func(L, "getCurrentLanguageCode", _olua_fun_cocos2d_ApplicationProtocol_getCurrentLanguageCode); + oluacls_func(L, "getTargetPlatform", _olua_fun_cocos2d_ApplicationProtocol_getTargetPlatform); + oluacls_func(L, "getVersion", _olua_fun_cocos2d_ApplicationProtocol_getVersion); + oluacls_func(L, "initGLContextAttrs", _olua_fun_cocos2d_ApplicationProtocol_initGLContextAttrs); + oluacls_func(L, "openURL", _olua_fun_cocos2d_ApplicationProtocol_openURL); + oluacls_func(L, "setAnimationInterval", _olua_fun_cocos2d_ApplicationProtocol_setAnimationInterval); + oluacls_prop(L, "currentLanguage", _olua_fun_cocos2d_ApplicationProtocol_getCurrentLanguage, nullptr); + oluacls_prop(L, "currentLanguageCode", _olua_fun_cocos2d_ApplicationProtocol_getCurrentLanguageCode, nullptr); + oluacls_prop(L, "targetPlatform", _olua_fun_cocos2d_ApplicationProtocol_getTargetPlatform, nullptr); + oluacls_prop(L, "version", _olua_fun_cocos2d_ApplicationProtocol_getVersion, nullptr); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_ApplicationProtocol(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.ApplicationProtocol")) { + luaL_error(L, "class not found: cocos2d::ApplicationProtocol"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_Application_getInstance(lua_State *L) +static int _olua_fun_cocos2d_Application_getInstance(lua_State *L) { olua_startinvoke(L); @@ -9291,7 +10366,7 @@ static int _cocos2d_Application_getInstance(lua_State *L) return num_ret; } -static int _cocos2d_Application_run(lua_State *L) +static int _olua_fun_cocos2d_Application_run(lua_State *L) { olua_startinvoke(L); @@ -9308,19 +10383,28 @@ static int _cocos2d_Application_run(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_Application(lua_State *L) +static int _olua_cls_cc_Application(lua_State *L) { oluacls_class(L, "cc.Application"); - oluacls_func(L, "getInstance", _cocos2d_Application_getInstance); - oluacls_func(L, "run", _cocos2d_Application_run); - oluacls_prop(L, "instance", _cocos2d_Application_getInstance, nullptr); + oluacls_func(L, "getInstance", _olua_fun_cocos2d_Application_getInstance); + oluacls_func(L, "run", _olua_fun_cocos2d_Application_run); + oluacls_prop(L, "instance", _olua_fun_cocos2d_Application_getInstance, nullptr); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_Application(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.Application")) { + luaL_error(L, "class not found: cocos2d::Application"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_Device___gc(lua_State *L) +static int _olua_fun_cocos2d_Device___gc(lua_State *L) { olua_startinvoke(L); @@ -9332,7 +10416,7 @@ static int _cocos2d_Device___gc(lua_State *L) return 0; } -static int _cocos2d_Device___olua_move(lua_State *L) +static int _olua_fun_cocos2d_Device___olua_move(lua_State *L) { olua_startinvoke(L); @@ -9344,7 +10428,7 @@ static int _cocos2d_Device___olua_move(lua_State *L) return 1; } -static int _cocos2d_Device_getDPI(lua_State *L) +static int _olua_fun_cocos2d_Device_getDPI(lua_State *L) { olua_startinvoke(L); @@ -9357,7 +10441,7 @@ static int _cocos2d_Device_getDPI(lua_State *L) return num_ret; } -static int _cocos2d_Device_setAccelerometerEnabled(lua_State *L) +static int _olua_fun_cocos2d_Device_setAccelerometerEnabled(lua_State *L) { olua_startinvoke(L); @@ -9373,7 +10457,7 @@ static int _cocos2d_Device_setAccelerometerEnabled(lua_State *L) return 0; } -static int _cocos2d_Device_setAccelerometerInterval(lua_State *L) +static int _olua_fun_cocos2d_Device_setAccelerometerInterval(lua_State *L) { olua_startinvoke(L); @@ -9389,7 +10473,7 @@ static int _cocos2d_Device_setAccelerometerInterval(lua_State *L) return 0; } -static int _cocos2d_Device_setKeepScreenOn(lua_State *L) +static int _olua_fun_cocos2d_Device_setKeepScreenOn(lua_State *L) { olua_startinvoke(L); @@ -9405,7 +10489,7 @@ static int _cocos2d_Device_setKeepScreenOn(lua_State *L) return 0; } -static int _cocos2d_Device_vibrate(lua_State *L) +static int _olua_fun_cocos2d_Device_vibrate(lua_State *L) { olua_startinvoke(L); @@ -9421,24 +10505,33 @@ static int _cocos2d_Device_vibrate(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_Device(lua_State *L) +static int _olua_cls_cc_Device(lua_State *L) { oluacls_class(L, "cc.Device"); - oluacls_func(L, "__gc", _cocos2d_Device___gc); - oluacls_func(L, "__olua_move", _cocos2d_Device___olua_move); - oluacls_func(L, "getDPI", _cocos2d_Device_getDPI); - oluacls_func(L, "setAccelerometerEnabled", _cocos2d_Device_setAccelerometerEnabled); - oluacls_func(L, "setAccelerometerInterval", _cocos2d_Device_setAccelerometerInterval); - oluacls_func(L, "setKeepScreenOn", _cocos2d_Device_setKeepScreenOn); - oluacls_func(L, "vibrate", _cocos2d_Device_vibrate); - oluacls_prop(L, "dpi", _cocos2d_Device_getDPI, nullptr); + oluacls_func(L, "__gc", _olua_fun_cocos2d_Device___gc); + oluacls_func(L, "__olua_move", _olua_fun_cocos2d_Device___olua_move); + oluacls_func(L, "getDPI", _olua_fun_cocos2d_Device_getDPI); + oluacls_func(L, "setAccelerometerEnabled", _olua_fun_cocos2d_Device_setAccelerometerEnabled); + oluacls_func(L, "setAccelerometerInterval", _olua_fun_cocos2d_Device_setAccelerometerInterval); + oluacls_func(L, "setKeepScreenOn", _olua_fun_cocos2d_Device_setKeepScreenOn); + oluacls_func(L, "vibrate", _olua_fun_cocos2d_Device_vibrate); + oluacls_prop(L, "dpi", _olua_fun_cocos2d_Device_getDPI, nullptr); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_Device(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.Device")) { + luaL_error(L, "class not found: cocos2d::Device"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_ResizableBuffer___gc(lua_State *L) +static int _olua_fun_cocos2d_ResizableBuffer___gc(lua_State *L) { olua_startinvoke(L); @@ -9450,7 +10543,7 @@ static int _cocos2d_ResizableBuffer___gc(lua_State *L) return 0; } -static int _cocos2d_ResizableBuffer___olua_move(lua_State *L) +static int _olua_fun_cocos2d_ResizableBuffer___olua_move(lua_State *L) { olua_startinvoke(L); @@ -9462,7 +10555,7 @@ static int _cocos2d_ResizableBuffer___olua_move(lua_State *L) return 1; } -static int _cocos2d_ResizableBuffer_buffer(lua_State *L) +static int _olua_fun_cocos2d_ResizableBuffer_buffer(lua_State *L) { olua_startinvoke(L); @@ -9479,7 +10572,7 @@ static int _cocos2d_ResizableBuffer_buffer(lua_State *L) return num_ret; } -static int _cocos2d_ResizableBuffer_resize(lua_State *L) +static int _olua_fun_cocos2d_ResizableBuffer_resize(lua_State *L) { olua_startinvoke(L); @@ -9497,21 +10590,29 @@ static int _cocos2d_ResizableBuffer_resize(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ResizableBuffer(lua_State *L) +static int _olua_cls_cc_ResizableBuffer(lua_State *L) { oluacls_class(L, "cc.ResizableBuffer"); - oluacls_func(L, "__gc", _cocos2d_ResizableBuffer___gc); - oluacls_func(L, "__olua_move", _cocos2d_ResizableBuffer___olua_move); - oluacls_func(L, "buffer", _cocos2d_ResizableBuffer_buffer); - oluacls_func(L, "resize", _cocos2d_ResizableBuffer_resize); + oluacls_func(L, "__gc", _olua_fun_cocos2d_ResizableBuffer___gc); + oluacls_func(L, "__olua_move", _olua_fun_cocos2d_ResizableBuffer___olua_move); + oluacls_func(L, "buffer", _olua_fun_cocos2d_ResizableBuffer_buffer); + oluacls_func(L, "resize", _olua_fun_cocos2d_ResizableBuffer_resize); return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_FileUtils_Status(lua_State *L) +OLUA_LIB int luaopen_cc_ResizableBuffer(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.ResizableBuffer")) { + luaL_error(L, "class not found: cocos2d::ResizableBuffer"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_cc_FileUtils_Status(lua_State *L) { oluacls_class(L, "cc.FileUtils.Status"); oluacls_func(L, "__index", olua_indexerror); @@ -9527,9 +10628,19 @@ OLUA_LIB int luaopen_cocos2d_FileUtils_Status(lua_State *L) return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_FileUtils_Status(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.FileUtils.Status")) { + luaL_error(L, "class not found: cocos2d::FileUtils::Status"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_FileUtils___gc(lua_State *L) +static int _olua_fun_cocos2d_FileUtils___gc(lua_State *L) { olua_startinvoke(L); @@ -9541,7 +10652,7 @@ static int _cocos2d_FileUtils___gc(lua_State *L) return 0; } -static int _cocos2d_FileUtils___olua_move(lua_State *L) +static int _olua_fun_cocos2d_FileUtils___olua_move(lua_State *L) { olua_startinvoke(L); @@ -9553,7 +10664,7 @@ static int _cocos2d_FileUtils___olua_move(lua_State *L) return 1; } -static int _cocos2d_FileUtils_addSearchPath$1(lua_State *L) +static int _olua_fun_cocos2d_FileUtils_addSearchPath$1(lua_State *L) { olua_startinvoke(L); @@ -9573,7 +10684,7 @@ static int _cocos2d_FileUtils_addSearchPath$1(lua_State *L) return 0; } -static int _cocos2d_FileUtils_addSearchPath$2(lua_State *L) +static int _olua_fun_cocos2d_FileUtils_addSearchPath$2(lua_State *L) { olua_startinvoke(L); @@ -9583,7 +10694,7 @@ static int _cocos2d_FileUtils_addSearchPath$2(lua_State *L) olua_to_object(L, 1, &self, "cc.FileUtils"); olua_check_string(L, 2, &arg1); - // void addSearchPath(const std::string &path, @optional const bool front) + // void addSearchPath(const std::string &path) self->addSearchPath(arg1); olua_endinvoke(L); @@ -9591,21 +10702,21 @@ static int _cocos2d_FileUtils_addSearchPath$2(lua_State *L) return 0; } -static int _cocos2d_FileUtils_addSearchPath(lua_State *L) +static int _olua_fun_cocos2d_FileUtils_addSearchPath(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_string(L, 2))) { - // void addSearchPath(const std::string &path, @optional const bool front) - return _cocos2d_FileUtils_addSearchPath$2(L); + // void addSearchPath(const std::string &path) + return _olua_fun_cocos2d_FileUtils_addSearchPath$2(L); // } } if (num_args == 2) { // if ((olua_is_string(L, 2)) && (olua_is_bool(L, 3))) { // void addSearchPath(const std::string &path, @optional const bool front) - return _cocos2d_FileUtils_addSearchPath$1(L); + return _olua_fun_cocos2d_FileUtils_addSearchPath$1(L); // } } @@ -9614,7 +10725,7 @@ static int _cocos2d_FileUtils_addSearchPath(lua_State *L) return 0; } -static int _cocos2d_FileUtils_addSearchResolutionsOrder$1(lua_State *L) +static int _olua_fun_cocos2d_FileUtils_addSearchResolutionsOrder$1(lua_State *L) { olua_startinvoke(L); @@ -9634,7 +10745,7 @@ static int _cocos2d_FileUtils_addSearchResolutionsOrder$1(lua_State *L) return 0; } -static int _cocos2d_FileUtils_addSearchResolutionsOrder$2(lua_State *L) +static int _olua_fun_cocos2d_FileUtils_addSearchResolutionsOrder$2(lua_State *L) { olua_startinvoke(L); @@ -9644,7 +10755,7 @@ static int _cocos2d_FileUtils_addSearchResolutionsOrder$2(lua_State *L) olua_to_object(L, 1, &self, "cc.FileUtils"); olua_check_string(L, 2, &arg1); - // void addSearchResolutionsOrder(const std::string &order, @optional const bool front) + // void addSearchResolutionsOrder(const std::string &order) self->addSearchResolutionsOrder(arg1); olua_endinvoke(L); @@ -9652,21 +10763,21 @@ static int _cocos2d_FileUtils_addSearchResolutionsOrder$2(lua_State *L) return 0; } -static int _cocos2d_FileUtils_addSearchResolutionsOrder(lua_State *L) +static int _olua_fun_cocos2d_FileUtils_addSearchResolutionsOrder(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_string(L, 2))) { - // void addSearchResolutionsOrder(const std::string &order, @optional const bool front) - return _cocos2d_FileUtils_addSearchResolutionsOrder$2(L); + // void addSearchResolutionsOrder(const std::string &order) + return _olua_fun_cocos2d_FileUtils_addSearchResolutionsOrder$2(L); // } } if (num_args == 2) { // if ((olua_is_string(L, 2)) && (olua_is_bool(L, 3))) { // void addSearchResolutionsOrder(const std::string &order, @optional const bool front) - return _cocos2d_FileUtils_addSearchResolutionsOrder$1(L); + return _olua_fun_cocos2d_FileUtils_addSearchResolutionsOrder$1(L); // } } @@ -9675,7 +10786,7 @@ static int _cocos2d_FileUtils_addSearchResolutionsOrder(lua_State *L) return 0; } -static int _cocos2d_FileUtils_createDirectory$1(lua_State *L) +static int _olua_fun_cocos2d_FileUtils_createDirectory$1(lua_State *L) { olua_startinvoke(L); @@ -9694,7 +10805,7 @@ static int _cocos2d_FileUtils_createDirectory$1(lua_State *L) return num_ret; } -static int _cocos2d_FileUtils_createDirectory$2(lua_State *L) +static int _olua_fun_cocos2d_FileUtils_createDirectory$2(lua_State *L) { olua_startinvoke(L); @@ -9708,15 +10819,16 @@ static int _cocos2d_FileUtils_createDirectory$2(lua_State *L) void *cb_store = (void *)self; std::string cb_tag = "createDirectory"; - std::string cb_name = olua_setcallback(L, cb_store, 3, cb_tag.c_str(), OLUA_TAG_NEW); + std::string cb_name = olua_setcallback(L, cb_store, 3, cb_tag.c_str(), OLUA_TAG_NEW); olua_Context cb_ctx = olua_context(L); - arg2 = [cb_store, cb_name, cb_ctx](bool arg1) { + // lua_State *ML = olua_mainthread(L); + arg2 = [cb_store, cb_name, cb_ctx /*, ML */](bool cb_arg1) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); if (olua_contextequal(L, cb_ctx)) { int top = lua_gettop(L); - olua_push_bool(L, arg1); + olua_push_bool(L, cb_arg1); olua_callback(L, cb_store, cb_name.c_str(), 1); @@ -9726,7 +10838,7 @@ static int _cocos2d_FileUtils_createDirectory$2(lua_State *L) } }; - // void createDirectory(const std::string &dirPath, @localvar std::function callback) + // void createDirectory(const std::string &dirPath, std::function callback) self->createDirectory(arg1, arg2); olua_endinvoke(L); @@ -9734,21 +10846,21 @@ static int _cocos2d_FileUtils_createDirectory$2(lua_State *L) return 0; } -static int _cocos2d_FileUtils_createDirectory(lua_State *L) +static int _olua_fun_cocos2d_FileUtils_createDirectory(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_string(L, 2))) { // bool createDirectory(const std::string &dirPath) - return _cocos2d_FileUtils_createDirectory$1(L); + return _olua_fun_cocos2d_FileUtils_createDirectory$1(L); // } } if (num_args == 2) { // if ((olua_is_string(L, 2)) && (olua_is_callback(L, 3, "std.function"))) { - // void createDirectory(const std::string &dirPath, @localvar std::function callback) - return _cocos2d_FileUtils_createDirectory$2(L); + // void createDirectory(const std::string &dirPath, std::function callback) + return _olua_fun_cocos2d_FileUtils_createDirectory$2(L); // } } @@ -9757,7 +10869,7 @@ static int _cocos2d_FileUtils_createDirectory(lua_State *L) return 0; } -static int _cocos2d_FileUtils_destroyInstance(lua_State *L) +static int _olua_fun_cocos2d_FileUtils_destroyInstance(lua_State *L) { olua_startinvoke(L); @@ -9769,7 +10881,7 @@ static int _cocos2d_FileUtils_destroyInstance(lua_State *L) return 0; } -static int _cocos2d_FileUtils_fullPathForFilename(lua_State *L) +static int _olua_fun_cocos2d_FileUtils_fullPathForFilename(lua_State *L) { olua_startinvoke(L); @@ -9788,7 +10900,7 @@ static int _cocos2d_FileUtils_fullPathForFilename(lua_State *L) return num_ret; } -static int _cocos2d_FileUtils_fullPathFromRelativeFile(lua_State *L) +static int _olua_fun_cocos2d_FileUtils_fullPathFromRelativeFile(lua_State *L) { olua_startinvoke(L); @@ -9809,7 +10921,7 @@ static int _cocos2d_FileUtils_fullPathFromRelativeFile(lua_State *L) return num_ret; } -static int _cocos2d_FileUtils_getContents(lua_State *L) +static int _olua_fun_cocos2d_FileUtils_getContents(lua_State *L) { olua_startinvoke(L); @@ -9830,7 +10942,7 @@ static int _cocos2d_FileUtils_getContents(lua_State *L) return num_ret; } -static int _cocos2d_FileUtils_getDataFromFile$1(lua_State *L) +static int _olua_fun_cocos2d_FileUtils_getDataFromFile$1(lua_State *L) { olua_startinvoke(L); @@ -9849,7 +10961,7 @@ static int _cocos2d_FileUtils_getDataFromFile$1(lua_State *L) return num_ret; } -static int _cocos2d_FileUtils_getDataFromFile$2(lua_State *L) +static int _olua_fun_cocos2d_FileUtils_getDataFromFile$2(lua_State *L) { olua_startinvoke(L); @@ -9863,9 +10975,10 @@ static int _cocos2d_FileUtils_getDataFromFile$2(lua_State *L) void *cb_store = (void *)self; std::string cb_tag = "DataFromFile"; - std::string cb_name = olua_setcallback(L, cb_store, 3, cb_tag.c_str(), OLUA_TAG_NEW); + std::string cb_name = olua_setcallback(L, cb_store, 3, cb_tag.c_str(), OLUA_TAG_NEW); olua_Context cb_ctx = olua_context(L); - arg2 = [cb_store, cb_name, cb_ctx](cocos2d::Data arg1) { + // lua_State *ML = olua_mainthread(L); + arg2 = [cb_store, cb_name, cb_ctx /*, ML */](cocos2d::Data cb_arg1) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); @@ -9873,7 +10986,7 @@ static int _cocos2d_FileUtils_getDataFromFile$2(lua_State *L) int top = lua_gettop(L); size_t last = olua_push_objpool(L); olua_enable_objpool(L); - olua_push_cocos2d_Data(L, arg1); + olua_push_cocos2d_Data(L, cb_arg1); olua_disable_objpool(L); olua_callback(L, cb_store, cb_name.c_str(), 1); @@ -9886,7 +10999,7 @@ static int _cocos2d_FileUtils_getDataFromFile$2(lua_State *L) } }; - // void getDataFromFile(const std::string &filename, @localvar std::function callback) + // void getDataFromFile(const std::string &filename, std::function callback) self->getDataFromFile(arg1, arg2); olua_endinvoke(L); @@ -9894,21 +11007,21 @@ static int _cocos2d_FileUtils_getDataFromFile$2(lua_State *L) return 0; } -static int _cocos2d_FileUtils_getDataFromFile(lua_State *L) +static int _olua_fun_cocos2d_FileUtils_getDataFromFile(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_string(L, 2))) { // cocos2d::Data getDataFromFile(const std::string &filename) - return _cocos2d_FileUtils_getDataFromFile$1(L); + return _olua_fun_cocos2d_FileUtils_getDataFromFile$1(L); // } } if (num_args == 2) { // if ((olua_is_string(L, 2)) && (olua_is_callback(L, 3, "std.function"))) { - // void getDataFromFile(const std::string &filename, @localvar std::function callback) - return _cocos2d_FileUtils_getDataFromFile$2(L); + // void getDataFromFile(const std::string &filename, std::function callback) + return _olua_fun_cocos2d_FileUtils_getDataFromFile$2(L); // } } @@ -9917,7 +11030,7 @@ static int _cocos2d_FileUtils_getDataFromFile(lua_State *L) return 0; } -static int _cocos2d_FileUtils_getDefaultResourceRootPath(lua_State *L) +static int _olua_fun_cocos2d_FileUtils_getDefaultResourceRootPath(lua_State *L) { olua_startinvoke(L); @@ -9934,7 +11047,7 @@ static int _cocos2d_FileUtils_getDefaultResourceRootPath(lua_State *L) return num_ret; } -static int _cocos2d_FileUtils_getFileDataFromZip$1(lua_State *L) +static int _olua_fun_cocos2d_FileUtils_getFileDataFromZip$1(lua_State *L) { olua_startinvoke(L); @@ -9946,7 +11059,7 @@ static int _cocos2d_FileUtils_getFileDataFromZip$1(lua_State *L) olua_to_object(L, 1, &self, "cc.FileUtils"); olua_check_string(L, 2, &arg1); olua_check_string(L, 3, &arg2); - olua_check_pointer(L, 4, &arg3, "olua.ssize_t"); + olua_check_valueptr(L, 4, &arg3, "olua.ssize_t"); // unsigned char *getFileDataFromZip(const std::string &zipFilePath, const std::string &filename, ssize_t *size) unsigned char *ret = self->getFileDataFromZip(arg1, arg2, arg3); @@ -9957,7 +11070,7 @@ static int _cocos2d_FileUtils_getFileDataFromZip$1(lua_State *L) return num_ret; } -static int _cocos2d_FileUtils_getFileDataFromZip$2(lua_State *L) +static int _olua_fun_cocos2d_FileUtils_getFileDataFromZip$2(lua_State *L) { olua_startinvoke(L); @@ -9978,19 +11091,21 @@ static int _cocos2d_FileUtils_getFileDataFromZip$2(lua_State *L) return num_ret; } -static int _cocos2d_FileUtils_getFileDataFromZip(lua_State *L) +static int _olua_fun_cocos2d_FileUtils_getFileDataFromZip(lua_State *L) { int num_args = lua_gettop(L) - 1; - if (num_args == 3) { - if ((olua_is_string(L, 2)) && (olua_is_string(L, 3)) && (olua_is_pointer(L, 4, "olua.ssize_t"))) { - // unsigned char *getFileDataFromZip(const std::string &zipFilePath, const std::string &filename, ssize_t *size) - return _cocos2d_FileUtils_getFileDataFromZip$1(L); - } - + if (num_args == 2) { // if ((olua_is_object(L, 1, "cc.FileUtils")) && (olua_is_string(L, 2)) && (olua_is_string(L, 3))) { // @extend(cocos2d::FileUtilsExtend) static cocos2d::Data getFileDataFromZip(cocos2d::FileUtils *obj, const std::string &zipPath, const std::string &name) - return _cocos2d_FileUtils_getFileDataFromZip$2(L); + return _olua_fun_cocos2d_FileUtils_getFileDataFromZip$2(L); + // } + } + + if (num_args == 3) { + // if ((olua_is_string(L, 2)) && (olua_is_string(L, 3)) && (olua_is_valueptr(L, 4, "olua.ssize_t"))) { + // unsigned char *getFileDataFromZip(const std::string &zipFilePath, const std::string &filename, ssize_t *size) + return _olua_fun_cocos2d_FileUtils_getFileDataFromZip$1(L); // } } @@ -9999,7 +11114,7 @@ static int _cocos2d_FileUtils_getFileDataFromZip(lua_State *L) return 0; } -static int _cocos2d_FileUtils_getFileExtension(lua_State *L) +static int _olua_fun_cocos2d_FileUtils_getFileExtension(lua_State *L) { olua_startinvoke(L); @@ -10018,7 +11133,7 @@ static int _cocos2d_FileUtils_getFileExtension(lua_State *L) return num_ret; } -static int _cocos2d_FileUtils_getFileSize$1(lua_State *L) +static int _olua_fun_cocos2d_FileUtils_getFileSize$1(lua_State *L) { olua_startinvoke(L); @@ -10037,7 +11152,7 @@ static int _cocos2d_FileUtils_getFileSize$1(lua_State *L) return num_ret; } -static int _cocos2d_FileUtils_getFileSize$2(lua_State *L) +static int _olua_fun_cocos2d_FileUtils_getFileSize$2(lua_State *L) { olua_startinvoke(L); @@ -10051,15 +11166,16 @@ static int _cocos2d_FileUtils_getFileSize$2(lua_State *L) void *cb_store = (void *)self; std::string cb_tag = "FileSize"; - std::string cb_name = olua_setcallback(L, cb_store, 3, cb_tag.c_str(), OLUA_TAG_NEW); + std::string cb_name = olua_setcallback(L, cb_store, 3, cb_tag.c_str(), OLUA_TAG_NEW); olua_Context cb_ctx = olua_context(L); - arg2 = [cb_store, cb_name, cb_ctx](long arg1) { + // lua_State *ML = olua_mainthread(L); + arg2 = [cb_store, cb_name, cb_ctx /*, ML */](long cb_arg1) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); if (olua_contextequal(L, cb_ctx)) { int top = lua_gettop(L); - olua_push_integer(L, arg1); + olua_push_integer(L, cb_arg1); olua_callback(L, cb_store, cb_name.c_str(), 1); @@ -10069,7 +11185,7 @@ static int _cocos2d_FileUtils_getFileSize$2(lua_State *L) } }; - // void getFileSize(const std::string &filepath, @localvar std::function callback) + // void getFileSize(const std::string &filepath, std::function callback) self->getFileSize(arg1, arg2); olua_endinvoke(L); @@ -10077,21 +11193,21 @@ static int _cocos2d_FileUtils_getFileSize$2(lua_State *L) return 0; } -static int _cocos2d_FileUtils_getFileSize(lua_State *L) +static int _olua_fun_cocos2d_FileUtils_getFileSize(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_string(L, 2))) { // long getFileSize(const std::string &filepath) - return _cocos2d_FileUtils_getFileSize$1(L); + return _olua_fun_cocos2d_FileUtils_getFileSize$1(L); // } } if (num_args == 2) { // if ((olua_is_string(L, 2)) && (olua_is_callback(L, 3, "std.function"))) { - // void getFileSize(const std::string &filepath, @localvar std::function callback) - return _cocos2d_FileUtils_getFileSize$2(L); + // void getFileSize(const std::string &filepath, std::function callback) + return _olua_fun_cocos2d_FileUtils_getFileSize$2(L); // } } @@ -10100,7 +11216,7 @@ static int _cocos2d_FileUtils_getFileSize(lua_State *L) return 0; } -static int _cocos2d_FileUtils_getFullPathCache(lua_State *L) +static int _olua_fun_cocos2d_FileUtils_getFullPathCache(lua_State *L) { olua_startinvoke(L); @@ -10120,7 +11236,7 @@ static int _cocos2d_FileUtils_getFullPathCache(lua_State *L) return num_ret; } -static int _cocos2d_FileUtils_getInstance(lua_State *L) +static int _olua_fun_cocos2d_FileUtils_getInstance(lua_State *L) { olua_startinvoke(L); @@ -10133,7 +11249,7 @@ static int _cocos2d_FileUtils_getInstance(lua_State *L) return num_ret; } -static int _cocos2d_FileUtils_getNewFilename(lua_State *L) +static int _olua_fun_cocos2d_FileUtils_getNewFilename(lua_State *L) { olua_startinvoke(L); @@ -10152,7 +11268,7 @@ static int _cocos2d_FileUtils_getNewFilename(lua_State *L) return num_ret; } -static int _cocos2d_FileUtils_getOriginalSearchPaths(lua_State *L) +static int _olua_fun_cocos2d_FileUtils_getOriginalSearchPaths(lua_State *L) { olua_startinvoke(L); @@ -10171,7 +11287,7 @@ static int _cocos2d_FileUtils_getOriginalSearchPaths(lua_State *L) return num_ret; } -static int _cocos2d_FileUtils_getSearchPaths(lua_State *L) +static int _olua_fun_cocos2d_FileUtils_getSearchPaths(lua_State *L) { olua_startinvoke(L); @@ -10190,7 +11306,7 @@ static int _cocos2d_FileUtils_getSearchPaths(lua_State *L) return num_ret; } -static int _cocos2d_FileUtils_getSearchResolutionsOrder(lua_State *L) +static int _olua_fun_cocos2d_FileUtils_getSearchResolutionsOrder(lua_State *L) { olua_startinvoke(L); @@ -10209,7 +11325,7 @@ static int _cocos2d_FileUtils_getSearchResolutionsOrder(lua_State *L) return num_ret; } -static int _cocos2d_FileUtils_getStringFromFile$1(lua_State *L) +static int _olua_fun_cocos2d_FileUtils_getStringFromFile$1(lua_State *L) { olua_startinvoke(L); @@ -10228,7 +11344,7 @@ static int _cocos2d_FileUtils_getStringFromFile$1(lua_State *L) return num_ret; } -static int _cocos2d_FileUtils_getStringFromFile$2(lua_State *L) +static int _olua_fun_cocos2d_FileUtils_getStringFromFile$2(lua_State *L) { olua_startinvoke(L); @@ -10242,15 +11358,16 @@ static int _cocos2d_FileUtils_getStringFromFile$2(lua_State *L) void *cb_store = (void *)self; std::string cb_tag = "StringFromFile"; - std::string cb_name = olua_setcallback(L, cb_store, 3, cb_tag.c_str(), OLUA_TAG_NEW); + std::string cb_name = olua_setcallback(L, cb_store, 3, cb_tag.c_str(), OLUA_TAG_NEW); olua_Context cb_ctx = olua_context(L); - arg2 = [cb_store, cb_name, cb_ctx](std::string arg1) { + // lua_State *ML = olua_mainthread(L); + arg2 = [cb_store, cb_name, cb_ctx /*, ML */](std::string cb_arg1) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); if (olua_contextequal(L, cb_ctx)) { int top = lua_gettop(L); - olua_push_string(L, arg1); + olua_push_string(L, cb_arg1); olua_callback(L, cb_store, cb_name.c_str(), 1); @@ -10260,7 +11377,7 @@ static int _cocos2d_FileUtils_getStringFromFile$2(lua_State *L) } }; - // void getStringFromFile(const std::string &path, @localvar std::function callback) + // void getStringFromFile(const std::string &path, std::function callback) self->getStringFromFile(arg1, arg2); olua_endinvoke(L); @@ -10268,21 +11385,21 @@ static int _cocos2d_FileUtils_getStringFromFile$2(lua_State *L) return 0; } -static int _cocos2d_FileUtils_getStringFromFile(lua_State *L) +static int _olua_fun_cocos2d_FileUtils_getStringFromFile(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_string(L, 2))) { // std::string getStringFromFile(const std::string &filename) - return _cocos2d_FileUtils_getStringFromFile$1(L); + return _olua_fun_cocos2d_FileUtils_getStringFromFile$1(L); // } } if (num_args == 2) { // if ((olua_is_string(L, 2)) && (olua_is_callback(L, 3, "std.function"))) { - // void getStringFromFile(const std::string &path, @localvar std::function callback) - return _cocos2d_FileUtils_getStringFromFile$2(L); + // void getStringFromFile(const std::string &path, std::function callback) + return _olua_fun_cocos2d_FileUtils_getStringFromFile$2(L); // } } @@ -10291,7 +11408,7 @@ static int _cocos2d_FileUtils_getStringFromFile(lua_State *L) return 0; } -static int _cocos2d_FileUtils_getSuitableFOpen(lua_State *L) +static int _olua_fun_cocos2d_FileUtils_getSuitableFOpen(lua_State *L) { olua_startinvoke(L); @@ -10310,7 +11427,7 @@ static int _cocos2d_FileUtils_getSuitableFOpen(lua_State *L) return num_ret; } -static int _cocos2d_FileUtils_getValueMapFromData(lua_State *L) +static int _olua_fun_cocos2d_FileUtils_getValueMapFromData(lua_State *L) { olua_startinvoke(L); @@ -10331,7 +11448,7 @@ static int _cocos2d_FileUtils_getValueMapFromData(lua_State *L) return num_ret; } -static int _cocos2d_FileUtils_getValueMapFromFile(lua_State *L) +static int _olua_fun_cocos2d_FileUtils_getValueMapFromFile(lua_State *L) { olua_startinvoke(L); @@ -10350,7 +11467,7 @@ static int _cocos2d_FileUtils_getValueMapFromFile(lua_State *L) return num_ret; } -static int _cocos2d_FileUtils_getValueVectorFromFile(lua_State *L) +static int _olua_fun_cocos2d_FileUtils_getValueVectorFromFile(lua_State *L) { olua_startinvoke(L); @@ -10369,7 +11486,7 @@ static int _cocos2d_FileUtils_getValueVectorFromFile(lua_State *L) return num_ret; } -static int _cocos2d_FileUtils_getWritablePath(lua_State *L) +static int _olua_fun_cocos2d_FileUtils_getWritablePath(lua_State *L) { olua_startinvoke(L); @@ -10386,7 +11503,7 @@ static int _cocos2d_FileUtils_getWritablePath(lua_State *L) return num_ret; } -static int _cocos2d_FileUtils_isAbsolutePath(lua_State *L) +static int _olua_fun_cocos2d_FileUtils_isAbsolutePath(lua_State *L) { olua_startinvoke(L); @@ -10405,7 +11522,7 @@ static int _cocos2d_FileUtils_isAbsolutePath(lua_State *L) return num_ret; } -static int _cocos2d_FileUtils_isDirectoryExist$1(lua_State *L) +static int _olua_fun_cocos2d_FileUtils_isDirectoryExist$1(lua_State *L) { olua_startinvoke(L); @@ -10424,7 +11541,7 @@ static int _cocos2d_FileUtils_isDirectoryExist$1(lua_State *L) return num_ret; } -static int _cocos2d_FileUtils_isDirectoryExist$2(lua_State *L) +static int _olua_fun_cocos2d_FileUtils_isDirectoryExist$2(lua_State *L) { olua_startinvoke(L); @@ -10438,15 +11555,16 @@ static int _cocos2d_FileUtils_isDirectoryExist$2(lua_State *L) void *cb_store = (void *)self; std::string cb_tag = "isDirectoryExist"; - std::string cb_name = olua_setcallback(L, cb_store, 3, cb_tag.c_str(), OLUA_TAG_NEW); + std::string cb_name = olua_setcallback(L, cb_store, 3, cb_tag.c_str(), OLUA_TAG_NEW); olua_Context cb_ctx = olua_context(L); - arg2 = [cb_store, cb_name, cb_ctx](bool arg1) { + // lua_State *ML = olua_mainthread(L); + arg2 = [cb_store, cb_name, cb_ctx /*, ML */](bool cb_arg1) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); if (olua_contextequal(L, cb_ctx)) { int top = lua_gettop(L); - olua_push_bool(L, arg1); + olua_push_bool(L, cb_arg1); olua_callback(L, cb_store, cb_name.c_str(), 1); @@ -10456,7 +11574,7 @@ static int _cocos2d_FileUtils_isDirectoryExist$2(lua_State *L) } }; - // void isDirectoryExist(const std::string &fullPath, @localvar std::function callback) + // void isDirectoryExist(const std::string &fullPath, std::function callback) self->isDirectoryExist(arg1, arg2); olua_endinvoke(L); @@ -10464,21 +11582,21 @@ static int _cocos2d_FileUtils_isDirectoryExist$2(lua_State *L) return 0; } -static int _cocos2d_FileUtils_isDirectoryExist(lua_State *L) +static int _olua_fun_cocos2d_FileUtils_isDirectoryExist(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_string(L, 2))) { // bool isDirectoryExist(const std::string &dirPath) - return _cocos2d_FileUtils_isDirectoryExist$1(L); + return _olua_fun_cocos2d_FileUtils_isDirectoryExist$1(L); // } } if (num_args == 2) { // if ((olua_is_string(L, 2)) && (olua_is_callback(L, 3, "std.function"))) { - // void isDirectoryExist(const std::string &fullPath, @localvar std::function callback) - return _cocos2d_FileUtils_isDirectoryExist$2(L); + // void isDirectoryExist(const std::string &fullPath, std::function callback) + return _olua_fun_cocos2d_FileUtils_isDirectoryExist$2(L); // } } @@ -10487,7 +11605,7 @@ static int _cocos2d_FileUtils_isDirectoryExist(lua_State *L) return 0; } -static int _cocos2d_FileUtils_isFileExist$1(lua_State *L) +static int _olua_fun_cocos2d_FileUtils_isFileExist$1(lua_State *L) { olua_startinvoke(L); @@ -10506,7 +11624,7 @@ static int _cocos2d_FileUtils_isFileExist$1(lua_State *L) return num_ret; } -static int _cocos2d_FileUtils_isFileExist$2(lua_State *L) +static int _olua_fun_cocos2d_FileUtils_isFileExist$2(lua_State *L) { olua_startinvoke(L); @@ -10520,15 +11638,16 @@ static int _cocos2d_FileUtils_isFileExist$2(lua_State *L) void *cb_store = (void *)self; std::string cb_tag = "isFileExist"; - std::string cb_name = olua_setcallback(L, cb_store, 3, cb_tag.c_str(), OLUA_TAG_NEW); + std::string cb_name = olua_setcallback(L, cb_store, 3, cb_tag.c_str(), OLUA_TAG_NEW); olua_Context cb_ctx = olua_context(L); - arg2 = [cb_store, cb_name, cb_ctx](bool arg1) { + // lua_State *ML = olua_mainthread(L); + arg2 = [cb_store, cb_name, cb_ctx /*, ML */](bool cb_arg1) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); if (olua_contextequal(L, cb_ctx)) { int top = lua_gettop(L); - olua_push_bool(L, arg1); + olua_push_bool(L, cb_arg1); olua_callback(L, cb_store, cb_name.c_str(), 1); @@ -10538,7 +11657,7 @@ static int _cocos2d_FileUtils_isFileExist$2(lua_State *L) } }; - // void isFileExist(const std::string &filename, @localvar std::function callback) + // void isFileExist(const std::string &filename, std::function callback) self->isFileExist(arg1, arg2); olua_endinvoke(L); @@ -10546,21 +11665,21 @@ static int _cocos2d_FileUtils_isFileExist$2(lua_State *L) return 0; } -static int _cocos2d_FileUtils_isFileExist(lua_State *L) +static int _olua_fun_cocos2d_FileUtils_isFileExist(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_string(L, 2))) { // bool isFileExist(const std::string &filename) - return _cocos2d_FileUtils_isFileExist$1(L); + return _olua_fun_cocos2d_FileUtils_isFileExist$1(L); // } } if (num_args == 2) { // if ((olua_is_string(L, 2)) && (olua_is_callback(L, 3, "std.function"))) { - // void isFileExist(const std::string &filename, @localvar std::function callback) - return _cocos2d_FileUtils_isFileExist$2(L); + // void isFileExist(const std::string &filename, std::function callback) + return _olua_fun_cocos2d_FileUtils_isFileExist$2(L); // } } @@ -10569,7 +11688,7 @@ static int _cocos2d_FileUtils_isFileExist(lua_State *L) return 0; } -static int _cocos2d_FileUtils_isPopupNotify(lua_State *L) +static int _olua_fun_cocos2d_FileUtils_isPopupNotify(lua_State *L) { olua_startinvoke(L); @@ -10586,7 +11705,7 @@ static int _cocos2d_FileUtils_isPopupNotify(lua_State *L) return num_ret; } -static int _cocos2d_FileUtils_listFiles(lua_State *L) +static int _olua_fun_cocos2d_FileUtils_listFiles(lua_State *L) { olua_startinvoke(L); @@ -10607,7 +11726,7 @@ static int _cocos2d_FileUtils_listFiles(lua_State *L) return num_ret; } -static int _cocos2d_FileUtils_listFilesAsync(lua_State *L) +static int _olua_fun_cocos2d_FileUtils_listFilesAsync(lua_State *L) { olua_startinvoke(L); @@ -10621,9 +11740,10 @@ static int _cocos2d_FileUtils_listFilesAsync(lua_State *L) void *cb_store = (void *)self; std::string cb_tag = "listFilesAsync"; - std::string cb_name = olua_setcallback(L, cb_store, 3, cb_tag.c_str(), OLUA_TAG_NEW); + std::string cb_name = olua_setcallback(L, cb_store, 3, cb_tag.c_str(), OLUA_TAG_NEW); olua_Context cb_ctx = olua_context(L); - arg2 = [cb_store, cb_name, cb_ctx](std::vector arg1) { + // lua_State *ML = olua_mainthread(L); + arg2 = [cb_store, cb_name, cb_ctx /*, ML */](std::vector cb_arg1) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); @@ -10631,7 +11751,7 @@ static int _cocos2d_FileUtils_listFilesAsync(lua_State *L) int top = lua_gettop(L); size_t last = olua_push_objpool(L); olua_enable_objpool(L); - olua_push_array(L, arg1, [L](std::string &arg1) { + olua_push_array(L, cb_arg1, [L](std::string &arg1) { olua_push_string(L, arg1); }); olua_disable_objpool(L); @@ -10646,7 +11766,7 @@ static int _cocos2d_FileUtils_listFilesAsync(lua_State *L) } }; - // void listFilesAsync(const std::string &dirPath, @localvar std::function)> callback) + // void listFilesAsync(const std::string &dirPath, std::function)> callback) self->listFilesAsync(arg1, arg2); olua_endinvoke(L); @@ -10654,7 +11774,7 @@ static int _cocos2d_FileUtils_listFilesAsync(lua_State *L) return 0; } -static int _cocos2d_FileUtils_listFilesRecursively(lua_State *L) +static int _olua_fun_cocos2d_FileUtils_listFilesRecursively(lua_State *L) { olua_startinvoke(L); @@ -10664,7 +11784,7 @@ static int _cocos2d_FileUtils_listFilesRecursively(lua_State *L) olua_to_object(L, 1, &self, "cc.FileUtils"); olua_check_string(L, 2, &arg1); - olua_check_pointer(L, 3, &arg2, "cc.VectorString"); + olua_check_valueptr(L, 3, &arg2, "cc.types.VectorString"); // void listFilesRecursively(const std::string &dirPath, std::vector *files) self->listFilesRecursively(arg1, arg2); @@ -10674,7 +11794,7 @@ static int _cocos2d_FileUtils_listFilesRecursively(lua_State *L) return 0; } -static int _cocos2d_FileUtils_listFilesRecursivelyAsync(lua_State *L) +static int _olua_fun_cocos2d_FileUtils_listFilesRecursivelyAsync(lua_State *L) { olua_startinvoke(L); @@ -10688,9 +11808,10 @@ static int _cocos2d_FileUtils_listFilesRecursivelyAsync(lua_State *L) void *cb_store = (void *)self; std::string cb_tag = "listFilesRecursivelyAsync"; - std::string cb_name = olua_setcallback(L, cb_store, 3, cb_tag.c_str(), OLUA_TAG_NEW); + std::string cb_name = olua_setcallback(L, cb_store, 3, cb_tag.c_str(), OLUA_TAG_NEW); olua_Context cb_ctx = olua_context(L); - arg2 = [cb_store, cb_name, cb_ctx](std::vector arg1) { + // lua_State *ML = olua_mainthread(L); + arg2 = [cb_store, cb_name, cb_ctx /*, ML */](std::vector cb_arg1) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); @@ -10698,7 +11819,7 @@ static int _cocos2d_FileUtils_listFilesRecursivelyAsync(lua_State *L) int top = lua_gettop(L); size_t last = olua_push_objpool(L); olua_enable_objpool(L); - olua_push_array(L, arg1, [L](std::string &arg1) { + olua_push_array(L, cb_arg1, [L](std::string &arg1) { olua_push_string(L, arg1); }); olua_disable_objpool(L); @@ -10713,7 +11834,7 @@ static int _cocos2d_FileUtils_listFilesRecursivelyAsync(lua_State *L) } }; - // void listFilesRecursivelyAsync(const std::string &dirPath, @localvar std::function)> callback) + // void listFilesRecursivelyAsync(const std::string &dirPath, std::function)> callback) self->listFilesRecursivelyAsync(arg1, arg2); olua_endinvoke(L); @@ -10721,7 +11842,7 @@ static int _cocos2d_FileUtils_listFilesRecursivelyAsync(lua_State *L) return 0; } -static int _cocos2d_FileUtils_loadFilenameLookupDictionaryFromFile(lua_State *L) +static int _olua_fun_cocos2d_FileUtils_loadFilenameLookupDictionaryFromFile(lua_State *L) { olua_startinvoke(L); @@ -10739,7 +11860,7 @@ static int _cocos2d_FileUtils_loadFilenameLookupDictionaryFromFile(lua_State *L) return 0; } -static int _cocos2d_FileUtils_purgeCachedEntries(lua_State *L) +static int _olua_fun_cocos2d_FileUtils_purgeCachedEntries(lua_State *L) { olua_startinvoke(L); @@ -10755,7 +11876,7 @@ static int _cocos2d_FileUtils_purgeCachedEntries(lua_State *L) return 0; } -static int _cocos2d_FileUtils_removeDirectory$1(lua_State *L) +static int _olua_fun_cocos2d_FileUtils_removeDirectory$1(lua_State *L) { olua_startinvoke(L); @@ -10774,7 +11895,7 @@ static int _cocos2d_FileUtils_removeDirectory$1(lua_State *L) return num_ret; } -static int _cocos2d_FileUtils_removeDirectory$2(lua_State *L) +static int _olua_fun_cocos2d_FileUtils_removeDirectory$2(lua_State *L) { olua_startinvoke(L); @@ -10788,15 +11909,16 @@ static int _cocos2d_FileUtils_removeDirectory$2(lua_State *L) void *cb_store = (void *)self; std::string cb_tag = "removeDirectory"; - std::string cb_name = olua_setcallback(L, cb_store, 3, cb_tag.c_str(), OLUA_TAG_NEW); + std::string cb_name = olua_setcallback(L, cb_store, 3, cb_tag.c_str(), OLUA_TAG_NEW); olua_Context cb_ctx = olua_context(L); - arg2 = [cb_store, cb_name, cb_ctx](bool arg1) { + // lua_State *ML = olua_mainthread(L); + arg2 = [cb_store, cb_name, cb_ctx /*, ML */](bool cb_arg1) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); if (olua_contextequal(L, cb_ctx)) { int top = lua_gettop(L); - olua_push_bool(L, arg1); + olua_push_bool(L, cb_arg1); olua_callback(L, cb_store, cb_name.c_str(), 1); @@ -10806,7 +11928,7 @@ static int _cocos2d_FileUtils_removeDirectory$2(lua_State *L) } }; - // void removeDirectory(const std::string &dirPath, @localvar std::function callback) + // void removeDirectory(const std::string &dirPath, std::function callback) self->removeDirectory(arg1, arg2); olua_endinvoke(L); @@ -10814,21 +11936,21 @@ static int _cocos2d_FileUtils_removeDirectory$2(lua_State *L) return 0; } -static int _cocos2d_FileUtils_removeDirectory(lua_State *L) +static int _olua_fun_cocos2d_FileUtils_removeDirectory(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_string(L, 2))) { // bool removeDirectory(const std::string &dirPath) - return _cocos2d_FileUtils_removeDirectory$1(L); + return _olua_fun_cocos2d_FileUtils_removeDirectory$1(L); // } } if (num_args == 2) { // if ((olua_is_string(L, 2)) && (olua_is_callback(L, 3, "std.function"))) { - // void removeDirectory(const std::string &dirPath, @localvar std::function callback) - return _cocos2d_FileUtils_removeDirectory$2(L); + // void removeDirectory(const std::string &dirPath, std::function callback) + return _olua_fun_cocos2d_FileUtils_removeDirectory$2(L); // } } @@ -10837,7 +11959,7 @@ static int _cocos2d_FileUtils_removeDirectory(lua_State *L) return 0; } -static int _cocos2d_FileUtils_removeFile$1(lua_State *L) +static int _olua_fun_cocos2d_FileUtils_removeFile$1(lua_State *L) { olua_startinvoke(L); @@ -10856,7 +11978,7 @@ static int _cocos2d_FileUtils_removeFile$1(lua_State *L) return num_ret; } -static int _cocos2d_FileUtils_removeFile$2(lua_State *L) +static int _olua_fun_cocos2d_FileUtils_removeFile$2(lua_State *L) { olua_startinvoke(L); @@ -10870,15 +11992,16 @@ static int _cocos2d_FileUtils_removeFile$2(lua_State *L) void *cb_store = (void *)self; std::string cb_tag = "removeFile"; - std::string cb_name = olua_setcallback(L, cb_store, 3, cb_tag.c_str(), OLUA_TAG_NEW); + std::string cb_name = olua_setcallback(L, cb_store, 3, cb_tag.c_str(), OLUA_TAG_NEW); olua_Context cb_ctx = olua_context(L); - arg2 = [cb_store, cb_name, cb_ctx](bool arg1) { + // lua_State *ML = olua_mainthread(L); + arg2 = [cb_store, cb_name, cb_ctx /*, ML */](bool cb_arg1) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); if (olua_contextequal(L, cb_ctx)) { int top = lua_gettop(L); - olua_push_bool(L, arg1); + olua_push_bool(L, cb_arg1); olua_callback(L, cb_store, cb_name.c_str(), 1); @@ -10888,7 +12011,7 @@ static int _cocos2d_FileUtils_removeFile$2(lua_State *L) } }; - // void removeFile(const std::string &filepath, @localvar std::function callback) + // void removeFile(const std::string &filepath, std::function callback) self->removeFile(arg1, arg2); olua_endinvoke(L); @@ -10896,21 +12019,21 @@ static int _cocos2d_FileUtils_removeFile$2(lua_State *L) return 0; } -static int _cocos2d_FileUtils_removeFile(lua_State *L) +static int _olua_fun_cocos2d_FileUtils_removeFile(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_string(L, 2))) { // bool removeFile(const std::string &filepath) - return _cocos2d_FileUtils_removeFile$1(L); + return _olua_fun_cocos2d_FileUtils_removeFile$1(L); // } } if (num_args == 2) { // if ((olua_is_string(L, 2)) && (olua_is_callback(L, 3, "std.function"))) { - // void removeFile(const std::string &filepath, @localvar std::function callback) - return _cocos2d_FileUtils_removeFile$2(L); + // void removeFile(const std::string &filepath, std::function callback) + return _olua_fun_cocos2d_FileUtils_removeFile$2(L); // } } @@ -10919,7 +12042,7 @@ static int _cocos2d_FileUtils_removeFile(lua_State *L) return 0; } -static int _cocos2d_FileUtils_renameFile$1(lua_State *L) +static int _olua_fun_cocos2d_FileUtils_renameFile$1(lua_State *L) { olua_startinvoke(L); @@ -10942,7 +12065,7 @@ static int _cocos2d_FileUtils_renameFile$1(lua_State *L) return num_ret; } -static int _cocos2d_FileUtils_renameFile$2(lua_State *L) +static int _olua_fun_cocos2d_FileUtils_renameFile$2(lua_State *L) { olua_startinvoke(L); @@ -10960,15 +12083,16 @@ static int _cocos2d_FileUtils_renameFile$2(lua_State *L) void *cb_store = (void *)self; std::string cb_tag = "renameFile"; - std::string cb_name = olua_setcallback(L, cb_store, 5, cb_tag.c_str(), OLUA_TAG_NEW); + std::string cb_name = olua_setcallback(L, cb_store, 5, cb_tag.c_str(), OLUA_TAG_NEW); olua_Context cb_ctx = olua_context(L); - arg4 = [cb_store, cb_name, cb_ctx](bool arg1) { + // lua_State *ML = olua_mainthread(L); + arg4 = [cb_store, cb_name, cb_ctx /*, ML */](bool cb_arg1) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); if (olua_contextequal(L, cb_ctx)) { int top = lua_gettop(L); - olua_push_bool(L, arg1); + olua_push_bool(L, cb_arg1); olua_callback(L, cb_store, cb_name.c_str(), 1); @@ -10978,7 +12102,7 @@ static int _cocos2d_FileUtils_renameFile$2(lua_State *L) } }; - // void renameFile(const std::string &path, const std::string &oldname, const std::string &name, @localvar std::function callback) + // void renameFile(const std::string &path, const std::string &oldname, const std::string &name, std::function callback) self->renameFile(arg1, arg2, arg3, arg4); olua_endinvoke(L); @@ -10986,7 +12110,7 @@ static int _cocos2d_FileUtils_renameFile$2(lua_State *L) return 0; } -static int _cocos2d_FileUtils_renameFile$3(lua_State *L) +static int _olua_fun_cocos2d_FileUtils_renameFile$3(lua_State *L) { olua_startinvoke(L); @@ -11007,7 +12131,7 @@ static int _cocos2d_FileUtils_renameFile$3(lua_State *L) return num_ret; } -static int _cocos2d_FileUtils_renameFile$4(lua_State *L) +static int _olua_fun_cocos2d_FileUtils_renameFile$4(lua_State *L) { olua_startinvoke(L); @@ -11023,15 +12147,16 @@ static int _cocos2d_FileUtils_renameFile$4(lua_State *L) void *cb_store = (void *)self; std::string cb_tag = "renameFile"; - std::string cb_name = olua_setcallback(L, cb_store, 4, cb_tag.c_str(), OLUA_TAG_NEW); + std::string cb_name = olua_setcallback(L, cb_store, 4, cb_tag.c_str(), OLUA_TAG_NEW); olua_Context cb_ctx = olua_context(L); - arg3 = [cb_store, cb_name, cb_ctx](bool arg1) { + // lua_State *ML = olua_mainthread(L); + arg3 = [cb_store, cb_name, cb_ctx /*, ML */](bool cb_arg1) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); if (olua_contextequal(L, cb_ctx)) { int top = lua_gettop(L); - olua_push_bool(L, arg1); + olua_push_bool(L, cb_arg1); olua_callback(L, cb_store, cb_name.c_str(), 1); @@ -11041,7 +12166,7 @@ static int _cocos2d_FileUtils_renameFile$4(lua_State *L) } }; - // void renameFile(const std::string &oldfullpath, const std::string &newfullpath, @localvar std::function callback) + // void renameFile(const std::string &oldfullpath, const std::string &newfullpath, std::function callback) self->renameFile(arg1, arg2, arg3); olua_endinvoke(L); @@ -11049,33 +12174,33 @@ static int _cocos2d_FileUtils_renameFile$4(lua_State *L) return 0; } -static int _cocos2d_FileUtils_renameFile(lua_State *L) +static int _olua_fun_cocos2d_FileUtils_renameFile(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 2) { // if ((olua_is_string(L, 2)) && (olua_is_string(L, 3))) { // bool renameFile(const std::string &oldfullpath, const std::string &newfullpath) - return _cocos2d_FileUtils_renameFile$3(L); + return _olua_fun_cocos2d_FileUtils_renameFile$3(L); // } } if (num_args == 3) { if ((olua_is_string(L, 2)) && (olua_is_string(L, 3)) && (olua_is_string(L, 4))) { // bool renameFile(const std::string &path, const std::string &oldname, const std::string &name) - return _cocos2d_FileUtils_renameFile$1(L); + return _olua_fun_cocos2d_FileUtils_renameFile$1(L); } // if ((olua_is_string(L, 2)) && (olua_is_string(L, 3)) && (olua_is_callback(L, 4, "std.function"))) { - // void renameFile(const std::string &oldfullpath, const std::string &newfullpath, @localvar std::function callback) - return _cocos2d_FileUtils_renameFile$4(L); + // void renameFile(const std::string &oldfullpath, const std::string &newfullpath, std::function callback) + return _olua_fun_cocos2d_FileUtils_renameFile$4(L); // } } if (num_args == 4) { // if ((olua_is_string(L, 2)) && (olua_is_string(L, 3)) && (olua_is_string(L, 4)) && (olua_is_callback(L, 5, "std.function"))) { - // void renameFile(const std::string &path, const std::string &oldname, const std::string &name, @localvar std::function callback) - return _cocos2d_FileUtils_renameFile$2(L); + // void renameFile(const std::string &path, const std::string &oldname, const std::string &name, std::function callback) + return _olua_fun_cocos2d_FileUtils_renameFile$2(L); // } } @@ -11084,7 +12209,7 @@ static int _cocos2d_FileUtils_renameFile(lua_State *L) return 0; } -static int _cocos2d_FileUtils_setDefaultResourceRootPath(lua_State *L) +static int _olua_fun_cocos2d_FileUtils_setDefaultResourceRootPath(lua_State *L) { olua_startinvoke(L); @@ -11102,7 +12227,7 @@ static int _cocos2d_FileUtils_setDefaultResourceRootPath(lua_State *L) return 0; } -static int _cocos2d_FileUtils_setDelegate(lua_State *L) +static int _olua_fun_cocos2d_FileUtils_setDelegate(lua_State *L) { olua_startinvoke(L); @@ -11118,7 +12243,7 @@ static int _cocos2d_FileUtils_setDelegate(lua_State *L) return 0; } -static int _cocos2d_FileUtils_setFilenameLookupDictionary(lua_State *L) +static int _olua_fun_cocos2d_FileUtils_setFilenameLookupDictionary(lua_State *L) { olua_startinvoke(L); @@ -11136,7 +12261,7 @@ static int _cocos2d_FileUtils_setFilenameLookupDictionary(lua_State *L) return 0; } -static int _cocos2d_FileUtils_setPopupNotify(lua_State *L) +static int _olua_fun_cocos2d_FileUtils_setPopupNotify(lua_State *L) { olua_startinvoke(L); @@ -11154,7 +12279,7 @@ static int _cocos2d_FileUtils_setPopupNotify(lua_State *L) return 0; } -static int _cocos2d_FileUtils_setSearchPaths(lua_State *L) +static int _olua_fun_cocos2d_FileUtils_setSearchPaths(lua_State *L) { olua_startinvoke(L); @@ -11174,7 +12299,7 @@ static int _cocos2d_FileUtils_setSearchPaths(lua_State *L) return 0; } -static int _cocos2d_FileUtils_setSearchResolutionsOrder(lua_State *L) +static int _olua_fun_cocos2d_FileUtils_setSearchResolutionsOrder(lua_State *L) { olua_startinvoke(L); @@ -11194,7 +12319,7 @@ static int _cocos2d_FileUtils_setSearchResolutionsOrder(lua_State *L) return 0; } -static int _cocos2d_FileUtils_setWritablePath(lua_State *L) +static int _olua_fun_cocos2d_FileUtils_setWritablePath(lua_State *L) { olua_startinvoke(L); @@ -11212,7 +12337,7 @@ static int _cocos2d_FileUtils_setWritablePath(lua_State *L) return 0; } -static int _cocos2d_FileUtils_writeDataToFile$1(lua_State *L) +static int _olua_fun_cocos2d_FileUtils_writeDataToFile$1(lua_State *L) { olua_startinvoke(L); @@ -11233,7 +12358,7 @@ static int _cocos2d_FileUtils_writeDataToFile$1(lua_State *L) return num_ret; } -static int _cocos2d_FileUtils_writeDataToFile$2(lua_State *L) +static int _olua_fun_cocos2d_FileUtils_writeDataToFile$2(lua_State *L) { olua_startinvoke(L); @@ -11249,15 +12374,16 @@ static int _cocos2d_FileUtils_writeDataToFile$2(lua_State *L) void *cb_store = (void *)self; std::string cb_tag = "writeDataToFile"; - std::string cb_name = olua_setcallback(L, cb_store, 4, cb_tag.c_str(), OLUA_TAG_NEW); + std::string cb_name = olua_setcallback(L, cb_store, 4, cb_tag.c_str(), OLUA_TAG_NEW); olua_Context cb_ctx = olua_context(L); - arg3 = [cb_store, cb_name, cb_ctx](bool arg1) { + // lua_State *ML = olua_mainthread(L); + arg3 = [cb_store, cb_name, cb_ctx /*, ML */](bool cb_arg1) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); if (olua_contextequal(L, cb_ctx)) { int top = lua_gettop(L); - olua_push_bool(L, arg1); + olua_push_bool(L, cb_arg1); olua_callback(L, cb_store, cb_name.c_str(), 1); @@ -11267,7 +12393,7 @@ static int _cocos2d_FileUtils_writeDataToFile$2(lua_State *L) } }; - // void writeDataToFile(cocos2d::Data data, const std::string &fullPath, @localvar std::function callback) + // void writeDataToFile(cocos2d::Data data, const std::string &fullPath, std::function callback) self->writeDataToFile(arg1, arg2, arg3); olua_endinvoke(L); @@ -11275,21 +12401,21 @@ static int _cocos2d_FileUtils_writeDataToFile$2(lua_State *L) return 0; } -static int _cocos2d_FileUtils_writeDataToFile(lua_State *L) +static int _olua_fun_cocos2d_FileUtils_writeDataToFile(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 2) { // if ((olua_is_cocos2d_Data(L, 2)) && (olua_is_string(L, 3))) { // bool writeDataToFile(const cocos2d::Data &data, const std::string &fullPath) - return _cocos2d_FileUtils_writeDataToFile$1(L); + return _olua_fun_cocos2d_FileUtils_writeDataToFile$1(L); // } } if (num_args == 3) { // if ((olua_is_cocos2d_Data(L, 2)) && (olua_is_string(L, 3)) && (olua_is_callback(L, 4, "std.function"))) { - // void writeDataToFile(cocos2d::Data data, const std::string &fullPath, @localvar std::function callback) - return _cocos2d_FileUtils_writeDataToFile$2(L); + // void writeDataToFile(cocos2d::Data data, const std::string &fullPath, std::function callback) + return _olua_fun_cocos2d_FileUtils_writeDataToFile$2(L); // } } @@ -11298,7 +12424,7 @@ static int _cocos2d_FileUtils_writeDataToFile(lua_State *L) return 0; } -static int _cocos2d_FileUtils_writeStringToFile$1(lua_State *L) +static int _olua_fun_cocos2d_FileUtils_writeStringToFile$1(lua_State *L) { olua_startinvoke(L); @@ -11319,7 +12445,7 @@ static int _cocos2d_FileUtils_writeStringToFile$1(lua_State *L) return num_ret; } -static int _cocos2d_FileUtils_writeStringToFile$2(lua_State *L) +static int _olua_fun_cocos2d_FileUtils_writeStringToFile$2(lua_State *L) { olua_startinvoke(L); @@ -11335,15 +12461,16 @@ static int _cocos2d_FileUtils_writeStringToFile$2(lua_State *L) void *cb_store = (void *)self; std::string cb_tag = "writeStringToFile"; - std::string cb_name = olua_setcallback(L, cb_store, 4, cb_tag.c_str(), OLUA_TAG_NEW); + std::string cb_name = olua_setcallback(L, cb_store, 4, cb_tag.c_str(), OLUA_TAG_NEW); olua_Context cb_ctx = olua_context(L); - arg3 = [cb_store, cb_name, cb_ctx](bool arg1) { + // lua_State *ML = olua_mainthread(L); + arg3 = [cb_store, cb_name, cb_ctx /*, ML */](bool cb_arg1) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); if (olua_contextequal(L, cb_ctx)) { int top = lua_gettop(L); - olua_push_bool(L, arg1); + olua_push_bool(L, cb_arg1); olua_callback(L, cb_store, cb_name.c_str(), 1); @@ -11353,7 +12480,7 @@ static int _cocos2d_FileUtils_writeStringToFile$2(lua_State *L) } }; - // void writeStringToFile(std::string dataStr, const std::string &fullPath, @localvar std::function callback) + // void writeStringToFile(std::string dataStr, const std::string &fullPath, std::function callback) self->writeStringToFile(arg1, arg2, arg3); olua_endinvoke(L); @@ -11361,21 +12488,21 @@ static int _cocos2d_FileUtils_writeStringToFile$2(lua_State *L) return 0; } -static int _cocos2d_FileUtils_writeStringToFile(lua_State *L) +static int _olua_fun_cocos2d_FileUtils_writeStringToFile(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 2) { // if ((olua_is_string(L, 2)) && (olua_is_string(L, 3))) { // bool writeStringToFile(const std::string &dataStr, const std::string &fullPath) - return _cocos2d_FileUtils_writeStringToFile$1(L); + return _olua_fun_cocos2d_FileUtils_writeStringToFile$1(L); // } } if (num_args == 3) { // if ((olua_is_string(L, 2)) && (olua_is_string(L, 3)) && (olua_is_callback(L, 4, "std.function"))) { - // void writeStringToFile(std::string dataStr, const std::string &fullPath, @localvar std::function callback) - return _cocos2d_FileUtils_writeStringToFile$2(L); + // void writeStringToFile(std::string dataStr, const std::string &fullPath, std::function callback) + return _olua_fun_cocos2d_FileUtils_writeStringToFile$2(L); // } } @@ -11384,7 +12511,7 @@ static int _cocos2d_FileUtils_writeStringToFile(lua_State *L) return 0; } -static int _cocos2d_FileUtils_writeToFile(lua_State *L) +static int _olua_fun_cocos2d_FileUtils_writeToFile(lua_State *L) { olua_startinvoke(L); @@ -11405,7 +12532,7 @@ static int _cocos2d_FileUtils_writeToFile(lua_State *L) return num_ret; } -static int _cocos2d_FileUtils_writeValueMapToFile$1(lua_State *L) +static int _olua_fun_cocos2d_FileUtils_writeValueMapToFile$1(lua_State *L) { olua_startinvoke(L); @@ -11426,7 +12553,7 @@ static int _cocos2d_FileUtils_writeValueMapToFile$1(lua_State *L) return num_ret; } -static int _cocos2d_FileUtils_writeValueMapToFile$2(lua_State *L) +static int _olua_fun_cocos2d_FileUtils_writeValueMapToFile$2(lua_State *L) { olua_startinvoke(L); @@ -11442,15 +12569,16 @@ static int _cocos2d_FileUtils_writeValueMapToFile$2(lua_State *L) void *cb_store = (void *)self; std::string cb_tag = "writeValueMapToFile"; - std::string cb_name = olua_setcallback(L, cb_store, 4, cb_tag.c_str(), OLUA_TAG_NEW); + std::string cb_name = olua_setcallback(L, cb_store, 4, cb_tag.c_str(), OLUA_TAG_NEW); olua_Context cb_ctx = olua_context(L); - arg3 = [cb_store, cb_name, cb_ctx](bool arg1) { + // lua_State *ML = olua_mainthread(L); + arg3 = [cb_store, cb_name, cb_ctx /*, ML */](bool cb_arg1) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); if (olua_contextequal(L, cb_ctx)) { int top = lua_gettop(L); - olua_push_bool(L, arg1); + olua_push_bool(L, cb_arg1); olua_callback(L, cb_store, cb_name.c_str(), 1); @@ -11460,7 +12588,7 @@ static int _cocos2d_FileUtils_writeValueMapToFile$2(lua_State *L) } }; - // void writeValueMapToFile(cocos2d::ValueMap dict, const std::string &fullPath, @localvar std::function callback) + // void writeValueMapToFile(cocos2d::ValueMap dict, const std::string &fullPath, std::function callback) self->writeValueMapToFile(arg1, arg2, arg3); olua_endinvoke(L); @@ -11468,21 +12596,21 @@ static int _cocos2d_FileUtils_writeValueMapToFile$2(lua_State *L) return 0; } -static int _cocos2d_FileUtils_writeValueMapToFile(lua_State *L) +static int _olua_fun_cocos2d_FileUtils_writeValueMapToFile(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 2) { // if ((olua_is_cocos2d_ValueMap(L, 2)) && (olua_is_string(L, 3))) { // bool writeValueMapToFile(const cocos2d::ValueMap &dict, const std::string &fullPath) - return _cocos2d_FileUtils_writeValueMapToFile$1(L); + return _olua_fun_cocos2d_FileUtils_writeValueMapToFile$1(L); // } } if (num_args == 3) { // if ((olua_is_cocos2d_ValueMap(L, 2)) && (olua_is_string(L, 3)) && (olua_is_callback(L, 4, "std.function"))) { - // void writeValueMapToFile(cocos2d::ValueMap dict, const std::string &fullPath, @localvar std::function callback) - return _cocos2d_FileUtils_writeValueMapToFile$2(L); + // void writeValueMapToFile(cocos2d::ValueMap dict, const std::string &fullPath, std::function callback) + return _olua_fun_cocos2d_FileUtils_writeValueMapToFile$2(L); // } } @@ -11491,7 +12619,7 @@ static int _cocos2d_FileUtils_writeValueMapToFile(lua_State *L) return 0; } -static int _cocos2d_FileUtils_writeValueVectorToFile$1(lua_State *L) +static int _olua_fun_cocos2d_FileUtils_writeValueVectorToFile$1(lua_State *L) { olua_startinvoke(L); @@ -11512,7 +12640,7 @@ static int _cocos2d_FileUtils_writeValueVectorToFile$1(lua_State *L) return num_ret; } -static int _cocos2d_FileUtils_writeValueVectorToFile$2(lua_State *L) +static int _olua_fun_cocos2d_FileUtils_writeValueVectorToFile$2(lua_State *L) { olua_startinvoke(L); @@ -11528,15 +12656,16 @@ static int _cocos2d_FileUtils_writeValueVectorToFile$2(lua_State *L) void *cb_store = (void *)self; std::string cb_tag = "writeValueVectorToFile"; - std::string cb_name = olua_setcallback(L, cb_store, 4, cb_tag.c_str(), OLUA_TAG_NEW); + std::string cb_name = olua_setcallback(L, cb_store, 4, cb_tag.c_str(), OLUA_TAG_NEW); olua_Context cb_ctx = olua_context(L); - arg3 = [cb_store, cb_name, cb_ctx](bool arg1) { + // lua_State *ML = olua_mainthread(L); + arg3 = [cb_store, cb_name, cb_ctx /*, ML */](bool cb_arg1) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); if (olua_contextequal(L, cb_ctx)) { int top = lua_gettop(L); - olua_push_bool(L, arg1); + olua_push_bool(L, cb_arg1); olua_callback(L, cb_store, cb_name.c_str(), 1); @@ -11546,7 +12675,7 @@ static int _cocos2d_FileUtils_writeValueVectorToFile$2(lua_State *L) } }; - // void writeValueVectorToFile(cocos2d::ValueVector vecData, const std::string &fullPath, @localvar std::function callback) + // void writeValueVectorToFile(cocos2d::ValueVector vecData, const std::string &fullPath, std::function callback) self->writeValueVectorToFile(arg1, arg2, arg3); olua_endinvoke(L); @@ -11554,21 +12683,21 @@ static int _cocos2d_FileUtils_writeValueVectorToFile$2(lua_State *L) return 0; } -static int _cocos2d_FileUtils_writeValueVectorToFile(lua_State *L) +static int _olua_fun_cocos2d_FileUtils_writeValueVectorToFile(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 2) { // if ((olua_is_cocos2d_ValueVector(L, 2)) && (olua_is_string(L, 3))) { // bool writeValueVectorToFile(const cocos2d::ValueVector &vecData, const std::string &fullPath) - return _cocos2d_FileUtils_writeValueVectorToFile$1(L); + return _olua_fun_cocos2d_FileUtils_writeValueVectorToFile$1(L); // } } if (num_args == 3) { // if ((olua_is_cocos2d_ValueVector(L, 2)) && (olua_is_string(L, 3)) && (olua_is_callback(L, 4, "std.function"))) { - // void writeValueVectorToFile(cocos2d::ValueVector vecData, const std::string &fullPath, @localvar std::function callback) - return _cocos2d_FileUtils_writeValueVectorToFile$2(L); + // void writeValueVectorToFile(cocos2d::ValueVector vecData, const std::string &fullPath, std::function callback) + return _olua_fun_cocos2d_FileUtils_writeValueVectorToFile$2(L); // } } @@ -11577,76 +12706,84 @@ static int _cocos2d_FileUtils_writeValueVectorToFile(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_FileUtils(lua_State *L) +static int _olua_cls_cc_FileUtils(lua_State *L) { oluacls_class(L, "cc.FileUtils"); - oluacls_func(L, "__gc", _cocos2d_FileUtils___gc); - oluacls_func(L, "__olua_move", _cocos2d_FileUtils___olua_move); - oluacls_func(L, "addSearchPath", _cocos2d_FileUtils_addSearchPath); - oluacls_func(L, "addSearchResolutionsOrder", _cocos2d_FileUtils_addSearchResolutionsOrder); - oluacls_func(L, "createDirectory", _cocos2d_FileUtils_createDirectory); - oluacls_func(L, "destroyInstance", _cocos2d_FileUtils_destroyInstance); - oluacls_func(L, "fullPathForFilename", _cocos2d_FileUtils_fullPathForFilename); - oluacls_func(L, "fullPathFromRelativeFile", _cocos2d_FileUtils_fullPathFromRelativeFile); - oluacls_func(L, "getContents", _cocos2d_FileUtils_getContents); - oluacls_func(L, "getDataFromFile", _cocos2d_FileUtils_getDataFromFile); - oluacls_func(L, "getDefaultResourceRootPath", _cocos2d_FileUtils_getDefaultResourceRootPath); - oluacls_func(L, "getFileDataFromZip", _cocos2d_FileUtils_getFileDataFromZip); - oluacls_func(L, "getFileExtension", _cocos2d_FileUtils_getFileExtension); - oluacls_func(L, "getFileSize", _cocos2d_FileUtils_getFileSize); - oluacls_func(L, "getFullPathCache", _cocos2d_FileUtils_getFullPathCache); - oluacls_func(L, "getInstance", _cocos2d_FileUtils_getInstance); - oluacls_func(L, "getNewFilename", _cocos2d_FileUtils_getNewFilename); - oluacls_func(L, "getOriginalSearchPaths", _cocos2d_FileUtils_getOriginalSearchPaths); - oluacls_func(L, "getSearchPaths", _cocos2d_FileUtils_getSearchPaths); - oluacls_func(L, "getSearchResolutionsOrder", _cocos2d_FileUtils_getSearchResolutionsOrder); - oluacls_func(L, "getStringFromFile", _cocos2d_FileUtils_getStringFromFile); - oluacls_func(L, "getSuitableFOpen", _cocos2d_FileUtils_getSuitableFOpen); - oluacls_func(L, "getValueMapFromData", _cocos2d_FileUtils_getValueMapFromData); - oluacls_func(L, "getValueMapFromFile", _cocos2d_FileUtils_getValueMapFromFile); - oluacls_func(L, "getValueVectorFromFile", _cocos2d_FileUtils_getValueVectorFromFile); - oluacls_func(L, "getWritablePath", _cocos2d_FileUtils_getWritablePath); - oluacls_func(L, "isAbsolutePath", _cocos2d_FileUtils_isAbsolutePath); - oluacls_func(L, "isDirectoryExist", _cocos2d_FileUtils_isDirectoryExist); - oluacls_func(L, "isFileExist", _cocos2d_FileUtils_isFileExist); - oluacls_func(L, "isPopupNotify", _cocos2d_FileUtils_isPopupNotify); - oluacls_func(L, "listFiles", _cocos2d_FileUtils_listFiles); - oluacls_func(L, "listFilesAsync", _cocos2d_FileUtils_listFilesAsync); - oluacls_func(L, "listFilesRecursively", _cocos2d_FileUtils_listFilesRecursively); - oluacls_func(L, "listFilesRecursivelyAsync", _cocos2d_FileUtils_listFilesRecursivelyAsync); - oluacls_func(L, "loadFilenameLookupDictionaryFromFile", _cocos2d_FileUtils_loadFilenameLookupDictionaryFromFile); - oluacls_func(L, "purgeCachedEntries", _cocos2d_FileUtils_purgeCachedEntries); - oluacls_func(L, "removeDirectory", _cocos2d_FileUtils_removeDirectory); - oluacls_func(L, "removeFile", _cocos2d_FileUtils_removeFile); - oluacls_func(L, "renameFile", _cocos2d_FileUtils_renameFile); - oluacls_func(L, "setDefaultResourceRootPath", _cocos2d_FileUtils_setDefaultResourceRootPath); - oluacls_func(L, "setDelegate", _cocos2d_FileUtils_setDelegate); - oluacls_func(L, "setFilenameLookupDictionary", _cocos2d_FileUtils_setFilenameLookupDictionary); - oluacls_func(L, "setPopupNotify", _cocos2d_FileUtils_setPopupNotify); - oluacls_func(L, "setSearchPaths", _cocos2d_FileUtils_setSearchPaths); - oluacls_func(L, "setSearchResolutionsOrder", _cocos2d_FileUtils_setSearchResolutionsOrder); - oluacls_func(L, "setWritablePath", _cocos2d_FileUtils_setWritablePath); - oluacls_func(L, "writeDataToFile", _cocos2d_FileUtils_writeDataToFile); - oluacls_func(L, "writeStringToFile", _cocos2d_FileUtils_writeStringToFile); - oluacls_func(L, "writeToFile", _cocos2d_FileUtils_writeToFile); - oluacls_func(L, "writeValueMapToFile", _cocos2d_FileUtils_writeValueMapToFile); - oluacls_func(L, "writeValueVectorToFile", _cocos2d_FileUtils_writeValueVectorToFile); - oluacls_prop(L, "defaultResourceRootPath", _cocos2d_FileUtils_getDefaultResourceRootPath, _cocos2d_FileUtils_setDefaultResourceRootPath); - oluacls_prop(L, "fullPathCache", _cocos2d_FileUtils_getFullPathCache, nullptr); - oluacls_prop(L, "instance", _cocos2d_FileUtils_getInstance, nullptr); - oluacls_prop(L, "originalSearchPaths", _cocos2d_FileUtils_getOriginalSearchPaths, nullptr); - oluacls_prop(L, "popupNotify", _cocos2d_FileUtils_isPopupNotify, _cocos2d_FileUtils_setPopupNotify); - oluacls_prop(L, "searchPaths", _cocos2d_FileUtils_getSearchPaths, _cocos2d_FileUtils_setSearchPaths); - oluacls_prop(L, "searchResolutionsOrder", _cocos2d_FileUtils_getSearchResolutionsOrder, _cocos2d_FileUtils_setSearchResolutionsOrder); - oluacls_prop(L, "writablePath", _cocos2d_FileUtils_getWritablePath, _cocos2d_FileUtils_setWritablePath); + oluacls_func(L, "__gc", _olua_fun_cocos2d_FileUtils___gc); + oluacls_func(L, "__olua_move", _olua_fun_cocos2d_FileUtils___olua_move); + oluacls_func(L, "addSearchPath", _olua_fun_cocos2d_FileUtils_addSearchPath); + oluacls_func(L, "addSearchResolutionsOrder", _olua_fun_cocos2d_FileUtils_addSearchResolutionsOrder); + oluacls_func(L, "createDirectory", _olua_fun_cocos2d_FileUtils_createDirectory); + oluacls_func(L, "destroyInstance", _olua_fun_cocos2d_FileUtils_destroyInstance); + oluacls_func(L, "fullPathForFilename", _olua_fun_cocos2d_FileUtils_fullPathForFilename); + oluacls_func(L, "fullPathFromRelativeFile", _olua_fun_cocos2d_FileUtils_fullPathFromRelativeFile); + oluacls_func(L, "getContents", _olua_fun_cocos2d_FileUtils_getContents); + oluacls_func(L, "getDataFromFile", _olua_fun_cocos2d_FileUtils_getDataFromFile); + oluacls_func(L, "getDefaultResourceRootPath", _olua_fun_cocos2d_FileUtils_getDefaultResourceRootPath); + oluacls_func(L, "getFileDataFromZip", _olua_fun_cocos2d_FileUtils_getFileDataFromZip); + oluacls_func(L, "getFileExtension", _olua_fun_cocos2d_FileUtils_getFileExtension); + oluacls_func(L, "getFileSize", _olua_fun_cocos2d_FileUtils_getFileSize); + oluacls_func(L, "getFullPathCache", _olua_fun_cocos2d_FileUtils_getFullPathCache); + oluacls_func(L, "getInstance", _olua_fun_cocos2d_FileUtils_getInstance); + oluacls_func(L, "getNewFilename", _olua_fun_cocos2d_FileUtils_getNewFilename); + oluacls_func(L, "getOriginalSearchPaths", _olua_fun_cocos2d_FileUtils_getOriginalSearchPaths); + oluacls_func(L, "getSearchPaths", _olua_fun_cocos2d_FileUtils_getSearchPaths); + oluacls_func(L, "getSearchResolutionsOrder", _olua_fun_cocos2d_FileUtils_getSearchResolutionsOrder); + oluacls_func(L, "getStringFromFile", _olua_fun_cocos2d_FileUtils_getStringFromFile); + oluacls_func(L, "getSuitableFOpen", _olua_fun_cocos2d_FileUtils_getSuitableFOpen); + oluacls_func(L, "getValueMapFromData", _olua_fun_cocos2d_FileUtils_getValueMapFromData); + oluacls_func(L, "getValueMapFromFile", _olua_fun_cocos2d_FileUtils_getValueMapFromFile); + oluacls_func(L, "getValueVectorFromFile", _olua_fun_cocos2d_FileUtils_getValueVectorFromFile); + oluacls_func(L, "getWritablePath", _olua_fun_cocos2d_FileUtils_getWritablePath); + oluacls_func(L, "isAbsolutePath", _olua_fun_cocos2d_FileUtils_isAbsolutePath); + oluacls_func(L, "isDirectoryExist", _olua_fun_cocos2d_FileUtils_isDirectoryExist); + oluacls_func(L, "isFileExist", _olua_fun_cocos2d_FileUtils_isFileExist); + oluacls_func(L, "isPopupNotify", _olua_fun_cocos2d_FileUtils_isPopupNotify); + oluacls_func(L, "listFiles", _olua_fun_cocos2d_FileUtils_listFiles); + oluacls_func(L, "listFilesAsync", _olua_fun_cocos2d_FileUtils_listFilesAsync); + oluacls_func(L, "listFilesRecursively", _olua_fun_cocos2d_FileUtils_listFilesRecursively); + oluacls_func(L, "listFilesRecursivelyAsync", _olua_fun_cocos2d_FileUtils_listFilesRecursivelyAsync); + oluacls_func(L, "loadFilenameLookupDictionaryFromFile", _olua_fun_cocos2d_FileUtils_loadFilenameLookupDictionaryFromFile); + oluacls_func(L, "purgeCachedEntries", _olua_fun_cocos2d_FileUtils_purgeCachedEntries); + oluacls_func(L, "removeDirectory", _olua_fun_cocos2d_FileUtils_removeDirectory); + oluacls_func(L, "removeFile", _olua_fun_cocos2d_FileUtils_removeFile); + oluacls_func(L, "renameFile", _olua_fun_cocos2d_FileUtils_renameFile); + oluacls_func(L, "setDefaultResourceRootPath", _olua_fun_cocos2d_FileUtils_setDefaultResourceRootPath); + oluacls_func(L, "setDelegate", _olua_fun_cocos2d_FileUtils_setDelegate); + oluacls_func(L, "setFilenameLookupDictionary", _olua_fun_cocos2d_FileUtils_setFilenameLookupDictionary); + oluacls_func(L, "setPopupNotify", _olua_fun_cocos2d_FileUtils_setPopupNotify); + oluacls_func(L, "setSearchPaths", _olua_fun_cocos2d_FileUtils_setSearchPaths); + oluacls_func(L, "setSearchResolutionsOrder", _olua_fun_cocos2d_FileUtils_setSearchResolutionsOrder); + oluacls_func(L, "setWritablePath", _olua_fun_cocos2d_FileUtils_setWritablePath); + oluacls_func(L, "writeDataToFile", _olua_fun_cocos2d_FileUtils_writeDataToFile); + oluacls_func(L, "writeStringToFile", _olua_fun_cocos2d_FileUtils_writeStringToFile); + oluacls_func(L, "writeToFile", _olua_fun_cocos2d_FileUtils_writeToFile); + oluacls_func(L, "writeValueMapToFile", _olua_fun_cocos2d_FileUtils_writeValueMapToFile); + oluacls_func(L, "writeValueVectorToFile", _olua_fun_cocos2d_FileUtils_writeValueVectorToFile); + oluacls_prop(L, "defaultResourceRootPath", _olua_fun_cocos2d_FileUtils_getDefaultResourceRootPath, _olua_fun_cocos2d_FileUtils_setDefaultResourceRootPath); + oluacls_prop(L, "fullPathCache", _olua_fun_cocos2d_FileUtils_getFullPathCache, nullptr); + oluacls_prop(L, "instance", _olua_fun_cocos2d_FileUtils_getInstance, nullptr); + oluacls_prop(L, "originalSearchPaths", _olua_fun_cocos2d_FileUtils_getOriginalSearchPaths, nullptr); + oluacls_prop(L, "popupNotify", _olua_fun_cocos2d_FileUtils_isPopupNotify, _olua_fun_cocos2d_FileUtils_setPopupNotify); + oluacls_prop(L, "searchPaths", _olua_fun_cocos2d_FileUtils_getSearchPaths, _olua_fun_cocos2d_FileUtils_setSearchPaths); + oluacls_prop(L, "searchResolutionsOrder", _olua_fun_cocos2d_FileUtils_getSearchResolutionsOrder, _olua_fun_cocos2d_FileUtils_setSearchResolutionsOrder); + oluacls_prop(L, "writablePath", _olua_fun_cocos2d_FileUtils_getWritablePath, _olua_fun_cocos2d_FileUtils_setWritablePath); return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_ResolutionPolicy(lua_State *L) +OLUA_LIB int luaopen_cc_FileUtils(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.FileUtils")) { + luaL_error(L, "class not found: cocos2d::FileUtils"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_cc_ResolutionPolicy(lua_State *L) { oluacls_class(L, "cc.ResolutionPolicy"); oluacls_func(L, "__index", olua_indexerror); @@ -11660,9 +12797,19 @@ OLUA_LIB int luaopen_ResolutionPolicy(lua_State *L) return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_ResolutionPolicy(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.ResolutionPolicy")) { + luaL_error(L, "class not found: ResolutionPolicy"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_GLView_end(lua_State *L) +static int _olua_fun_cocos2d_GLView_end_(lua_State *L) { olua_startinvoke(L); @@ -11678,7 +12825,7 @@ static int _cocos2d_GLView_end(lua_State *L) return 0; } -static int _cocos2d_GLView_getAllTouches(lua_State *L) +static int _olua_fun_cocos2d_GLView_getAllTouches(lua_State *L) { olua_startinvoke(L); @@ -11697,7 +12844,7 @@ static int _cocos2d_GLView_getAllTouches(lua_State *L) return num_ret; } -static int _cocos2d_GLView_getContentScaleFactor(lua_State *L) +static int _olua_fun_cocos2d_GLView_getContentScaleFactor(lua_State *L) { olua_startinvoke(L); @@ -11714,7 +12861,7 @@ static int _cocos2d_GLView_getContentScaleFactor(lua_State *L) return num_ret; } -static int _cocos2d_GLView_getDesignResolutionSize(lua_State *L) +static int _olua_fun_cocos2d_GLView_getDesignResolutionSize(lua_State *L) { olua_startinvoke(L); @@ -11731,7 +12878,7 @@ static int _cocos2d_GLView_getDesignResolutionSize(lua_State *L) return num_ret; } -static int _cocos2d_GLView_getFrameSize(lua_State *L) +static int _olua_fun_cocos2d_GLView_getFrameSize(lua_State *L) { olua_startinvoke(L); @@ -11741,14 +12888,14 @@ static int _cocos2d_GLView_getFrameSize(lua_State *L) // cocos2d::Size getFrameSize() cocos2d::Size ret = self->getFrameSize(); - int num_ret = olua_pushcopy_object(L, ret, "cc.Size"); + int num_ret = olua_copy_object(L, ret, "cc.Size"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_GLView_getFrameZoomFactor(lua_State *L) +static int _olua_fun_cocos2d_GLView_getFrameZoomFactor(lua_State *L) { olua_startinvoke(L); @@ -11765,20 +12912,20 @@ static int _cocos2d_GLView_getFrameZoomFactor(lua_State *L) return num_ret; } -static int _cocos2d_GLView_getGLContextAttrs(lua_State *L) +static int _olua_fun_cocos2d_GLView_getGLContextAttrs(lua_State *L) { olua_startinvoke(L); // static GLContextAttrs getGLContextAttrs() GLContextAttrs ret = cocos2d::GLView::getGLContextAttrs(); - int num_ret = olua_pushcopy_object(L, ret, "cc.GLContextAttrs"); + int num_ret = olua_copy_object(L, ret, "cc.GLContextAttrs"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_GLView_getResolutionPolicy(lua_State *L) +static int _olua_fun_cocos2d_GLView_getResolutionPolicy(lua_State *L) { olua_startinvoke(L); @@ -11795,7 +12942,7 @@ static int _cocos2d_GLView_getResolutionPolicy(lua_State *L) return num_ret; } -static int _cocos2d_GLView_getRetinaFactor(lua_State *L) +static int _olua_fun_cocos2d_GLView_getRetinaFactor(lua_State *L) { olua_startinvoke(L); @@ -11812,7 +12959,7 @@ static int _cocos2d_GLView_getRetinaFactor(lua_State *L) return num_ret; } -static int _cocos2d_GLView_getSafeAreaRect(lua_State *L) +static int _olua_fun_cocos2d_GLView_getSafeAreaRect(lua_State *L) { olua_startinvoke(L); @@ -11822,14 +12969,14 @@ static int _cocos2d_GLView_getSafeAreaRect(lua_State *L) // cocos2d::Rect getSafeAreaRect() cocos2d::Rect ret = self->getSafeAreaRect(); - int num_ret = olua_pushcopy_object(L, ret, "cc.Rect"); + int num_ret = olua_copy_object(L, ret, "cc.Rect"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_GLView_getScaleX(lua_State *L) +static int _olua_fun_cocos2d_GLView_getScaleX(lua_State *L) { olua_startinvoke(L); @@ -11846,7 +12993,7 @@ static int _cocos2d_GLView_getScaleX(lua_State *L) return num_ret; } -static int _cocos2d_GLView_getScaleY(lua_State *L) +static int _olua_fun_cocos2d_GLView_getScaleY(lua_State *L) { olua_startinvoke(L); @@ -11863,7 +13010,7 @@ static int _cocos2d_GLView_getScaleY(lua_State *L) return num_ret; } -static int _cocos2d_GLView_getScissorRect(lua_State *L) +static int _olua_fun_cocos2d_GLView_getScissorRect(lua_State *L) { olua_startinvoke(L); @@ -11873,14 +13020,14 @@ static int _cocos2d_GLView_getScissorRect(lua_State *L) // cocos2d::Rect getScissorRect() cocos2d::Rect ret = self->getScissorRect(); - int num_ret = olua_pushcopy_object(L, ret, "cc.Rect"); + int num_ret = olua_copy_object(L, ret, "cc.Rect"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_GLView_getViewName(lua_State *L) +static int _olua_fun_cocos2d_GLView_getViewName(lua_State *L) { olua_startinvoke(L); @@ -11897,7 +13044,7 @@ static int _cocos2d_GLView_getViewName(lua_State *L) return num_ret; } -static int _cocos2d_GLView_getViewPortRect(lua_State *L) +static int _olua_fun_cocos2d_GLView_getViewPortRect(lua_State *L) { olua_startinvoke(L); @@ -11914,7 +13061,7 @@ static int _cocos2d_GLView_getViewPortRect(lua_State *L) return num_ret; } -static int _cocos2d_GLView_getVisibleOrigin(lua_State *L) +static int _olua_fun_cocos2d_GLView_getVisibleOrigin(lua_State *L) { olua_startinvoke(L); @@ -11924,14 +13071,14 @@ static int _cocos2d_GLView_getVisibleOrigin(lua_State *L) // cocos2d::Vec2 getVisibleOrigin() cocos2d::Vec2 ret = self->getVisibleOrigin(); - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec2"); + int num_ret = olua_copy_object(L, ret, "cc.Vec2"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_GLView_getVisibleRect(lua_State *L) +static int _olua_fun_cocos2d_GLView_getVisibleRect(lua_State *L) { olua_startinvoke(L); @@ -11941,14 +13088,14 @@ static int _cocos2d_GLView_getVisibleRect(lua_State *L) // cocos2d::Rect getVisibleRect() cocos2d::Rect ret = self->getVisibleRect(); - int num_ret = olua_pushcopy_object(L, ret, "cc.Rect"); + int num_ret = olua_copy_object(L, ret, "cc.Rect"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_GLView_getVisibleSize(lua_State *L) +static int _olua_fun_cocos2d_GLView_getVisibleSize(lua_State *L) { olua_startinvoke(L); @@ -11958,14 +13105,14 @@ static int _cocos2d_GLView_getVisibleSize(lua_State *L) // cocos2d::Size getVisibleSize() cocos2d::Size ret = self->getVisibleSize(); - int num_ret = olua_pushcopy_object(L, ret, "cc.Size"); + int num_ret = olua_copy_object(L, ret, "cc.Size"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_GLView_isOpenGLReady(lua_State *L) +static int _olua_fun_cocos2d_GLView_isOpenGLReady(lua_State *L) { olua_startinvoke(L); @@ -11982,7 +13129,7 @@ static int _cocos2d_GLView_isOpenGLReady(lua_State *L) return num_ret; } -static int _cocos2d_GLView_isRetinaDisplay(lua_State *L) +static int _olua_fun_cocos2d_GLView_isRetinaDisplay(lua_State *L) { olua_startinvoke(L); @@ -11999,7 +13146,7 @@ static int _cocos2d_GLView_isRetinaDisplay(lua_State *L) return num_ret; } -static int _cocos2d_GLView_isScissorEnabled(lua_State *L) +static int _olua_fun_cocos2d_GLView_isScissorEnabled(lua_State *L) { olua_startinvoke(L); @@ -12016,7 +13163,7 @@ static int _cocos2d_GLView_isScissorEnabled(lua_State *L) return num_ret; } -static int _cocos2d_GLView_pollEvents(lua_State *L) +static int _olua_fun_cocos2d_GLView_pollEvents(lua_State *L) { olua_startinvoke(L); @@ -12032,7 +13179,7 @@ static int _cocos2d_GLView_pollEvents(lua_State *L) return 0; } -static int _cocos2d_GLView_renderScene(lua_State *L) +static int _olua_fun_cocos2d_GLView_renderScene(lua_State *L) { olua_startinvoke(L); @@ -12052,17 +13199,17 @@ static int _cocos2d_GLView_renderScene(lua_State *L) return 0; } -static int _cocos2d_GLView_setContentScaleFactor(lua_State *L) +static int _olua_fun_cocos2d_GLView_setContentScaleFactor(lua_State *L) { olua_startinvoke(L); cocos2d::GLView *self = nullptr; - float arg1 = 0; /** */ + float arg1 = 0; /** arg1 */ olua_to_object(L, 1, &self, "cc.GLView"); olua_check_number(L, 2, &arg1); - // bool setContentScaleFactor(float ) + // bool setContentScaleFactor(float arg1) bool ret = self->setContentScaleFactor(arg1); int num_ret = olua_push_bool(L, ret); @@ -12071,17 +13218,17 @@ static int _cocos2d_GLView_setContentScaleFactor(lua_State *L) return num_ret; } -static int _cocos2d_GLView_setCursorVisible(lua_State *L) +static int _olua_fun_cocos2d_GLView_setCursorVisible(lua_State *L) { olua_startinvoke(L); cocos2d::GLView *self = nullptr; - bool arg1 = false; /** */ + bool arg1 = false; /** arg1 */ olua_to_object(L, 1, &self, "cc.GLView"); olua_check_bool(L, 2, &arg1); - // void setCursorVisible(bool ) + // void setCursorVisible(bool arg1) self->setCursorVisible(arg1); olua_endinvoke(L); @@ -12089,7 +13236,7 @@ static int _cocos2d_GLView_setCursorVisible(lua_State *L) return 0; } -static int _cocos2d_GLView_setDefaultIcon(lua_State *L) +static int _olua_fun_cocos2d_GLView_setDefaultIcon(lua_State *L) { olua_startinvoke(L); @@ -12105,7 +13252,7 @@ static int _cocos2d_GLView_setDefaultIcon(lua_State *L) return 0; } -static int _cocos2d_GLView_setDesignResolutionSize(lua_State *L) +static int _olua_fun_cocos2d_GLView_setDesignResolutionSize(lua_State *L) { olua_startinvoke(L); @@ -12127,7 +13274,7 @@ static int _cocos2d_GLView_setDesignResolutionSize(lua_State *L) return 0; } -static int _cocos2d_GLView_setFrameSize(lua_State *L) +static int _olua_fun_cocos2d_GLView_setFrameSize(lua_State *L) { olua_startinvoke(L); @@ -12147,17 +13294,17 @@ static int _cocos2d_GLView_setFrameSize(lua_State *L) return 0; } -static int _cocos2d_GLView_setFrameZoomFactor(lua_State *L) +static int _olua_fun_cocos2d_GLView_setFrameZoomFactor(lua_State *L) { olua_startinvoke(L); cocos2d::GLView *self = nullptr; - float arg1 = 0; /** */ + float arg1 = 0; /** arg1 */ olua_to_object(L, 1, &self, "cc.GLView"); olua_check_number(L, 2, &arg1); - // void setFrameZoomFactor(float ) + // void setFrameZoomFactor(float arg1) self->setFrameZoomFactor(arg1); olua_endinvoke(L); @@ -12165,7 +13312,7 @@ static int _cocos2d_GLView_setFrameZoomFactor(lua_State *L) return 0; } -static int _cocos2d_GLView_setGLContextAttrs(lua_State *L) +static int _olua_fun_cocos2d_GLView_setGLContextAttrs(lua_State *L) { olua_startinvoke(L); @@ -12181,7 +13328,7 @@ static int _cocos2d_GLView_setGLContextAttrs(lua_State *L) return 0; } -static int _cocos2d_GLView_setIMEKeyboardState(lua_State *L) +static int _olua_fun_cocos2d_GLView_setIMEKeyboardState(lua_State *L) { olua_startinvoke(L); @@ -12199,7 +13346,7 @@ static int _cocos2d_GLView_setIMEKeyboardState(lua_State *L) return 0; } -static int _cocos2d_GLView_setIcon$1(lua_State *L) +static int _olua_fun_cocos2d_GLView_setIcon$1(lua_State *L) { olua_startinvoke(L); @@ -12217,7 +13364,7 @@ static int _cocos2d_GLView_setIcon$1(lua_State *L) return 0; } -static int _cocos2d_GLView_setIcon$2(lua_State *L) +static int _olua_fun_cocos2d_GLView_setIcon$2(lua_State *L) { olua_startinvoke(L); @@ -12237,19 +13384,19 @@ static int _cocos2d_GLView_setIcon$2(lua_State *L) return 0; } -static int _cocos2d_GLView_setIcon(lua_State *L) +static int _olua_fun_cocos2d_GLView_setIcon(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { if ((olua_is_string(L, 2))) { // void setIcon(const std::string &filename) - return _cocos2d_GLView_setIcon$1(L); + return _olua_fun_cocos2d_GLView_setIcon$1(L); } // if ((olua_is_array(L, 2))) { // void setIcon(const std::vector &filelist) - return _cocos2d_GLView_setIcon$2(L); + return _olua_fun_cocos2d_GLView_setIcon$2(L); // } } @@ -12258,7 +13405,7 @@ static int _cocos2d_GLView_setIcon(lua_State *L) return 0; } -static int _cocos2d_GLView_setScissorInPoints(lua_State *L) +static int _olua_fun_cocos2d_GLView_setScissorInPoints(lua_State *L) { olua_startinvoke(L); @@ -12282,7 +13429,7 @@ static int _cocos2d_GLView_setScissorInPoints(lua_State *L) return 0; } -static int _cocos2d_GLView_setViewName(lua_State *L) +static int _olua_fun_cocos2d_GLView_setViewName(lua_State *L) { olua_startinvoke(L); @@ -12300,7 +13447,7 @@ static int _cocos2d_GLView_setViewName(lua_State *L) return 0; } -static int _cocos2d_GLView_setViewPortInPoints(lua_State *L) +static int _olua_fun_cocos2d_GLView_setViewPortInPoints(lua_State *L) { olua_startinvoke(L); @@ -12324,7 +13471,7 @@ static int _cocos2d_GLView_setViewPortInPoints(lua_State *L) return 0; } -static int _cocos2d_GLView_swapBuffers(lua_State *L) +static int _olua_fun_cocos2d_GLView_swapBuffers(lua_State *L) { olua_startinvoke(L); @@ -12340,7 +13487,7 @@ static int _cocos2d_GLView_swapBuffers(lua_State *L) return 0; } -static int _cocos2d_GLView_windowShouldClose(lua_State *L) +static int _olua_fun_cocos2d_GLView_windowShouldClose(lua_State *L) { olua_startinvoke(L); @@ -12357,81 +13504,98 @@ static int _cocos2d_GLView_windowShouldClose(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_GLView(lua_State *L) +static int _olua_cls_cc_GLView(lua_State *L) { oluacls_class(L, "cc.GLView"); - oluacls_func(L, "end", _cocos2d_GLView_end); - oluacls_func(L, "getAllTouches", _cocos2d_GLView_getAllTouches); - oluacls_func(L, "getContentScaleFactor", _cocos2d_GLView_getContentScaleFactor); - oluacls_func(L, "getDesignResolutionSize", _cocos2d_GLView_getDesignResolutionSize); - oluacls_func(L, "getFrameSize", _cocos2d_GLView_getFrameSize); - oluacls_func(L, "getFrameZoomFactor", _cocos2d_GLView_getFrameZoomFactor); - oluacls_func(L, "getGLContextAttrs", _cocos2d_GLView_getGLContextAttrs); - oluacls_func(L, "getResolutionPolicy", _cocos2d_GLView_getResolutionPolicy); - oluacls_func(L, "getRetinaFactor", _cocos2d_GLView_getRetinaFactor); - oluacls_func(L, "getSafeAreaRect", _cocos2d_GLView_getSafeAreaRect); - oluacls_func(L, "getScaleX", _cocos2d_GLView_getScaleX); - oluacls_func(L, "getScaleY", _cocos2d_GLView_getScaleY); - oluacls_func(L, "getScissorRect", _cocos2d_GLView_getScissorRect); - oluacls_func(L, "getViewName", _cocos2d_GLView_getViewName); - oluacls_func(L, "getViewPortRect", _cocos2d_GLView_getViewPortRect); - oluacls_func(L, "getVisibleOrigin", _cocos2d_GLView_getVisibleOrigin); - oluacls_func(L, "getVisibleRect", _cocos2d_GLView_getVisibleRect); - oluacls_func(L, "getVisibleSize", _cocos2d_GLView_getVisibleSize); - oluacls_func(L, "isOpenGLReady", _cocos2d_GLView_isOpenGLReady); - oluacls_func(L, "isRetinaDisplay", _cocos2d_GLView_isRetinaDisplay); - oluacls_func(L, "isScissorEnabled", _cocos2d_GLView_isScissorEnabled); - oluacls_func(L, "pollEvents", _cocos2d_GLView_pollEvents); - oluacls_func(L, "renderScene", _cocos2d_GLView_renderScene); - oluacls_func(L, "setContentScaleFactor", _cocos2d_GLView_setContentScaleFactor); - oluacls_func(L, "setCursorVisible", _cocos2d_GLView_setCursorVisible); - oluacls_func(L, "setDefaultIcon", _cocos2d_GLView_setDefaultIcon); - oluacls_func(L, "setDesignResolutionSize", _cocos2d_GLView_setDesignResolutionSize); - oluacls_func(L, "setFrameSize", _cocos2d_GLView_setFrameSize); - oluacls_func(L, "setFrameZoomFactor", _cocos2d_GLView_setFrameZoomFactor); - oluacls_func(L, "setGLContextAttrs", _cocos2d_GLView_setGLContextAttrs); - oluacls_func(L, "setIMEKeyboardState", _cocos2d_GLView_setIMEKeyboardState); - oluacls_func(L, "setIcon", _cocos2d_GLView_setIcon); - oluacls_func(L, "setScissorInPoints", _cocos2d_GLView_setScissorInPoints); - oluacls_func(L, "setViewName", _cocos2d_GLView_setViewName); - oluacls_func(L, "setViewPortInPoints", _cocos2d_GLView_setViewPortInPoints); - oluacls_func(L, "swapBuffers", _cocos2d_GLView_swapBuffers); - oluacls_func(L, "windowShouldClose", _cocos2d_GLView_windowShouldClose); - oluacls_prop(L, "allTouches", _cocos2d_GLView_getAllTouches, nullptr); - oluacls_prop(L, "contentScaleFactor", _cocos2d_GLView_getContentScaleFactor, _cocos2d_GLView_setContentScaleFactor); - oluacls_prop(L, "frameZoomFactor", _cocos2d_GLView_getFrameZoomFactor, _cocos2d_GLView_setFrameZoomFactor); - oluacls_prop(L, "glContextAttrs", _cocos2d_GLView_getGLContextAttrs, _cocos2d_GLView_setGLContextAttrs); - oluacls_prop(L, "openGLReady", _cocos2d_GLView_isOpenGLReady, nullptr); - oluacls_prop(L, "resolutionPolicy", _cocos2d_GLView_getResolutionPolicy, nullptr); - oluacls_prop(L, "retinaDisplay", _cocos2d_GLView_isRetinaDisplay, nullptr); - oluacls_prop(L, "retinaFactor", _cocos2d_GLView_getRetinaFactor, nullptr); - oluacls_prop(L, "safeAreaRect", _cocos2d_GLView_getSafeAreaRect, nullptr); - oluacls_prop(L, "scaleX", _cocos2d_GLView_getScaleX, nullptr); - oluacls_prop(L, "scaleY", _cocos2d_GLView_getScaleY, nullptr); - oluacls_prop(L, "scissorEnabled", _cocos2d_GLView_isScissorEnabled, nullptr); - oluacls_prop(L, "scissorRect", _cocos2d_GLView_getScissorRect, nullptr); - oluacls_prop(L, "viewName", _cocos2d_GLView_getViewName, _cocos2d_GLView_setViewName); - oluacls_prop(L, "viewPortRect", _cocos2d_GLView_getViewPortRect, nullptr); - oluacls_prop(L, "visibleOrigin", _cocos2d_GLView_getVisibleOrigin, nullptr); - oluacls_prop(L, "visibleRect", _cocos2d_GLView_getVisibleRect, nullptr); - oluacls_prop(L, "visibleSize", _cocos2d_GLView_getVisibleSize, nullptr); + oluacls_func(L, "end_", _olua_fun_cocos2d_GLView_end_); + oluacls_func(L, "getAllTouches", _olua_fun_cocos2d_GLView_getAllTouches); + oluacls_func(L, "getContentScaleFactor", _olua_fun_cocos2d_GLView_getContentScaleFactor); + oluacls_func(L, "getDesignResolutionSize", _olua_fun_cocos2d_GLView_getDesignResolutionSize); + oluacls_func(L, "getFrameSize", _olua_fun_cocos2d_GLView_getFrameSize); + oluacls_func(L, "getFrameZoomFactor", _olua_fun_cocos2d_GLView_getFrameZoomFactor); + oluacls_func(L, "getGLContextAttrs", _olua_fun_cocos2d_GLView_getGLContextAttrs); + oluacls_func(L, "getResolutionPolicy", _olua_fun_cocos2d_GLView_getResolutionPolicy); + oluacls_func(L, "getRetinaFactor", _olua_fun_cocos2d_GLView_getRetinaFactor); + oluacls_func(L, "getSafeAreaRect", _olua_fun_cocos2d_GLView_getSafeAreaRect); + oluacls_func(L, "getScaleX", _olua_fun_cocos2d_GLView_getScaleX); + oluacls_func(L, "getScaleY", _olua_fun_cocos2d_GLView_getScaleY); + oluacls_func(L, "getScissorRect", _olua_fun_cocos2d_GLView_getScissorRect); + oluacls_func(L, "getViewName", _olua_fun_cocos2d_GLView_getViewName); + oluacls_func(L, "getViewPortRect", _olua_fun_cocos2d_GLView_getViewPortRect); + oluacls_func(L, "getVisibleOrigin", _olua_fun_cocos2d_GLView_getVisibleOrigin); + oluacls_func(L, "getVisibleRect", _olua_fun_cocos2d_GLView_getVisibleRect); + oluacls_func(L, "getVisibleSize", _olua_fun_cocos2d_GLView_getVisibleSize); + oluacls_func(L, "isOpenGLReady", _olua_fun_cocos2d_GLView_isOpenGLReady); + oluacls_func(L, "isRetinaDisplay", _olua_fun_cocos2d_GLView_isRetinaDisplay); + oluacls_func(L, "isScissorEnabled", _olua_fun_cocos2d_GLView_isScissorEnabled); + oluacls_func(L, "pollEvents", _olua_fun_cocos2d_GLView_pollEvents); + oluacls_func(L, "renderScene", _olua_fun_cocos2d_GLView_renderScene); + oluacls_func(L, "setContentScaleFactor", _olua_fun_cocos2d_GLView_setContentScaleFactor); + oluacls_func(L, "setCursorVisible", _olua_fun_cocos2d_GLView_setCursorVisible); + oluacls_func(L, "setDefaultIcon", _olua_fun_cocos2d_GLView_setDefaultIcon); + oluacls_func(L, "setDesignResolutionSize", _olua_fun_cocos2d_GLView_setDesignResolutionSize); + oluacls_func(L, "setFrameSize", _olua_fun_cocos2d_GLView_setFrameSize); + oluacls_func(L, "setFrameZoomFactor", _olua_fun_cocos2d_GLView_setFrameZoomFactor); + oluacls_func(L, "setGLContextAttrs", _olua_fun_cocos2d_GLView_setGLContextAttrs); + oluacls_func(L, "setIMEKeyboardState", _olua_fun_cocos2d_GLView_setIMEKeyboardState); + oluacls_func(L, "setIcon", _olua_fun_cocos2d_GLView_setIcon); + oluacls_func(L, "setScissorInPoints", _olua_fun_cocos2d_GLView_setScissorInPoints); + oluacls_func(L, "setViewName", _olua_fun_cocos2d_GLView_setViewName); + oluacls_func(L, "setViewPortInPoints", _olua_fun_cocos2d_GLView_setViewPortInPoints); + oluacls_func(L, "swapBuffers", _olua_fun_cocos2d_GLView_swapBuffers); + oluacls_func(L, "windowShouldClose", _olua_fun_cocos2d_GLView_windowShouldClose); + oluacls_prop(L, "allTouches", _olua_fun_cocos2d_GLView_getAllTouches, nullptr); + oluacls_prop(L, "contentScaleFactor", _olua_fun_cocos2d_GLView_getContentScaleFactor, _olua_fun_cocos2d_GLView_setContentScaleFactor); + oluacls_prop(L, "frameZoomFactor", _olua_fun_cocos2d_GLView_getFrameZoomFactor, _olua_fun_cocos2d_GLView_setFrameZoomFactor); + oluacls_prop(L, "glContextAttrs", _olua_fun_cocos2d_GLView_getGLContextAttrs, _olua_fun_cocos2d_GLView_setGLContextAttrs); + oluacls_prop(L, "openGLReady", _olua_fun_cocos2d_GLView_isOpenGLReady, nullptr); + oluacls_prop(L, "resolutionPolicy", _olua_fun_cocos2d_GLView_getResolutionPolicy, nullptr); + oluacls_prop(L, "retinaDisplay", _olua_fun_cocos2d_GLView_isRetinaDisplay, nullptr); + oluacls_prop(L, "retinaFactor", _olua_fun_cocos2d_GLView_getRetinaFactor, nullptr); + oluacls_prop(L, "safeAreaRect", _olua_fun_cocos2d_GLView_getSafeAreaRect, nullptr); + oluacls_prop(L, "scaleX", _olua_fun_cocos2d_GLView_getScaleX, nullptr); + oluacls_prop(L, "scaleY", _olua_fun_cocos2d_GLView_getScaleY, nullptr); + oluacls_prop(L, "scissorEnabled", _olua_fun_cocos2d_GLView_isScissorEnabled, nullptr); + oluacls_prop(L, "scissorRect", _olua_fun_cocos2d_GLView_getScissorRect, nullptr); + oluacls_prop(L, "viewName", _olua_fun_cocos2d_GLView_getViewName, _olua_fun_cocos2d_GLView_setViewName); + oluacls_prop(L, "viewPortRect", _olua_fun_cocos2d_GLView_getViewPortRect, nullptr); + oluacls_prop(L, "visibleOrigin", _olua_fun_cocos2d_GLView_getVisibleOrigin, nullptr); + oluacls_prop(L, "visibleRect", _olua_fun_cocos2d_GLView_getVisibleRect, nullptr); + oluacls_prop(L, "visibleSize", _olua_fun_cocos2d_GLView_getVisibleSize, nullptr); return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_GLViewImpl(lua_State *L) +OLUA_LIB int luaopen_cc_GLView(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.GLView")) { + luaL_error(L, "class not found: cocos2d::GLView"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_cc_GLViewImpl(lua_State *L) { oluacls_class(L, "cc.GLViewImpl"); return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_Image_Format(lua_State *L) +OLUA_LIB int luaopen_cc_GLViewImpl(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.GLViewImpl")) { + luaL_error(L, "class not found: cocos2d::GLViewImpl"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_cc_Image_Format(lua_State *L) { oluacls_class(L, "cc.Image.Format"); oluacls_func(L, "__index", olua_indexerror); @@ -12449,9 +13613,19 @@ OLUA_LIB int luaopen_cocos2d_Image_Format(lua_State *L) return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_Image_Format(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.Image.Format")) { + luaL_error(L, "class not found: cocos2d::Image::Format"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_Image_getBitPerPixel(lua_State *L) +static int _olua_fun_cocos2d_Image_getBitPerPixel(lua_State *L) { olua_startinvoke(L); @@ -12468,7 +13642,7 @@ static int _cocos2d_Image_getBitPerPixel(lua_State *L) return num_ret; } -static int _cocos2d_Image_getData(lua_State *L) +static int _olua_fun_cocos2d_Image_getData(lua_State *L) { olua_startinvoke(L); @@ -12485,7 +13659,7 @@ static int _cocos2d_Image_getData(lua_State *L) return num_ret; } -static int _cocos2d_Image_getDataLen(lua_State *L) +static int _olua_fun_cocos2d_Image_getDataLen(lua_State *L) { olua_startinvoke(L); @@ -12502,7 +13676,7 @@ static int _cocos2d_Image_getDataLen(lua_State *L) return num_ret; } -static int _cocos2d_Image_getFilePath(lua_State *L) +static int _olua_fun_cocos2d_Image_getFilePath(lua_State *L) { olua_startinvoke(L); @@ -12519,7 +13693,7 @@ static int _cocos2d_Image_getFilePath(lua_State *L) return num_ret; } -static int _cocos2d_Image_getFileType(lua_State *L) +static int _olua_fun_cocos2d_Image_getFileType(lua_State *L) { olua_startinvoke(L); @@ -12536,7 +13710,7 @@ static int _cocos2d_Image_getFileType(lua_State *L) return num_ret; } -static int _cocos2d_Image_getHeight(lua_State *L) +static int _olua_fun_cocos2d_Image_getHeight(lua_State *L) { olua_startinvoke(L); @@ -12553,7 +13727,7 @@ static int _cocos2d_Image_getHeight(lua_State *L) return num_ret; } -static int _cocos2d_Image_getNumberOfMipmaps(lua_State *L) +static int _olua_fun_cocos2d_Image_getNumberOfMipmaps(lua_State *L) { olua_startinvoke(L); @@ -12570,7 +13744,7 @@ static int _cocos2d_Image_getNumberOfMipmaps(lua_State *L) return num_ret; } -static int _cocos2d_Image_getPNGPremultipliedAlphaEnabled(lua_State *L) +static int _olua_fun_cocos2d_Image_getPNGPremultipliedAlphaEnabled(lua_State *L) { olua_startinvoke(L); @@ -12583,7 +13757,7 @@ static int _cocos2d_Image_getPNGPremultipliedAlphaEnabled(lua_State *L) return num_ret; } -static int _cocos2d_Image_getPixelFormat(lua_State *L) +static int _olua_fun_cocos2d_Image_getPixelFormat(lua_State *L) { olua_startinvoke(L); @@ -12600,7 +13774,7 @@ static int _cocos2d_Image_getPixelFormat(lua_State *L) return num_ret; } -static int _cocos2d_Image_getWidth(lua_State *L) +static int _olua_fun_cocos2d_Image_getWidth(lua_State *L) { olua_startinvoke(L); @@ -12617,7 +13791,7 @@ static int _cocos2d_Image_getWidth(lua_State *L) return num_ret; } -static int _cocos2d_Image_hasAlpha(lua_State *L) +static int _olua_fun_cocos2d_Image_hasAlpha(lua_State *L) { olua_startinvoke(L); @@ -12634,7 +13808,7 @@ static int _cocos2d_Image_hasAlpha(lua_State *L) return num_ret; } -static int _cocos2d_Image_hasPremultipliedAlpha(lua_State *L) +static int _olua_fun_cocos2d_Image_hasPremultipliedAlpha(lua_State *L) { olua_startinvoke(L); @@ -12651,7 +13825,7 @@ static int _cocos2d_Image_hasPremultipliedAlpha(lua_State *L) return num_ret; } -static int _cocos2d_Image_initWithImageData(lua_State *L) +static int _olua_fun_cocos2d_Image_initWithImageData(lua_State *L) { olua_startinvoke(L); @@ -12672,7 +13846,7 @@ static int _cocos2d_Image_initWithImageData(lua_State *L) return num_ret; } -static int _cocos2d_Image_initWithImageFile(lua_State *L) +static int _olua_fun_cocos2d_Image_initWithImageFile(lua_State *L) { olua_startinvoke(L); @@ -12691,7 +13865,7 @@ static int _cocos2d_Image_initWithImageFile(lua_State *L) return num_ret; } -static int _cocos2d_Image_initWithRawData$1(lua_State *L) +static int _olua_fun_cocos2d_Image_initWithRawData$1(lua_State *L) { olua_startinvoke(L); @@ -12720,7 +13894,7 @@ static int _cocos2d_Image_initWithRawData$1(lua_State *L) return num_ret; } -static int _cocos2d_Image_initWithRawData$2(lua_State *L) +static int _olua_fun_cocos2d_Image_initWithRawData$2(lua_State *L) { olua_startinvoke(L); @@ -12738,7 +13912,7 @@ static int _cocos2d_Image_initWithRawData$2(lua_State *L) olua_check_integer(L, 5, &arg4); olua_check_integer(L, 6, &arg5); - // bool initWithRawData(const unsigned char *data, ssize_t dataLen, int width, int height, int bitsPerComponent, @optional bool preMulti) + // bool initWithRawData(const unsigned char *data, ssize_t dataLen, int width, int height, int bitsPerComponent) bool ret = self->initWithRawData(arg1, arg2, arg3, arg4, arg5); int num_ret = olua_push_bool(L, ret); @@ -12747,21 +13921,21 @@ static int _cocos2d_Image_initWithRawData$2(lua_State *L) return num_ret; } -static int _cocos2d_Image_initWithRawData(lua_State *L) +static int _olua_fun_cocos2d_Image_initWithRawData(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 5) { // if ((olua_is_string(L, 2)) && (olua_is_integer(L, 3)) && (olua_is_integer(L, 4)) && (olua_is_integer(L, 5)) && (olua_is_integer(L, 6))) { - // bool initWithRawData(const unsigned char *data, ssize_t dataLen, int width, int height, int bitsPerComponent, @optional bool preMulti) - return _cocos2d_Image_initWithRawData$2(L); + // bool initWithRawData(const unsigned char *data, ssize_t dataLen, int width, int height, int bitsPerComponent) + return _olua_fun_cocos2d_Image_initWithRawData$2(L); // } } if (num_args == 6) { // if ((olua_is_string(L, 2)) && (olua_is_integer(L, 3)) && (olua_is_integer(L, 4)) && (olua_is_integer(L, 5)) && (olua_is_integer(L, 6)) && (olua_is_bool(L, 7))) { // bool initWithRawData(const unsigned char *data, ssize_t dataLen, int width, int height, int bitsPerComponent, @optional bool preMulti) - return _cocos2d_Image_initWithRawData$1(L); + return _olua_fun_cocos2d_Image_initWithRawData$1(L); // } } @@ -12770,7 +13944,7 @@ static int _cocos2d_Image_initWithRawData(lua_State *L) return 0; } -static int _cocos2d_Image_isCompressed(lua_State *L) +static int _olua_fun_cocos2d_Image_isCompressed(lua_State *L) { olua_startinvoke(L); @@ -12787,11 +13961,11 @@ static int _cocos2d_Image_isCompressed(lua_State *L) return num_ret; } -static int _cocos2d_Image_new(lua_State *L) +static int _olua_fun_cocos2d_Image_new(lua_State *L) { olua_startinvoke(L); - // Image() + // cocos2d::Image() cocos2d::Image *ret = new cocos2d::Image(); int num_ret = olua_push_object(L, ret, "cc.Image"); olua_postnew(L, ret); @@ -12801,7 +13975,7 @@ static int _cocos2d_Image_new(lua_State *L) return num_ret; } -static int _cocos2d_Image_premultiplyAlpha(lua_State *L) +static int _olua_fun_cocos2d_Image_premultiplyAlpha(lua_State *L) { olua_startinvoke(L); @@ -12817,7 +13991,7 @@ static int _cocos2d_Image_premultiplyAlpha(lua_State *L) return 0; } -static int _cocos2d_Image_reversePremultipliedAlpha(lua_State *L) +static int _olua_fun_cocos2d_Image_reversePremultipliedAlpha(lua_State *L) { olua_startinvoke(L); @@ -12833,7 +14007,7 @@ static int _cocos2d_Image_reversePremultipliedAlpha(lua_State *L) return 0; } -static int _cocos2d_Image_saveToFile$1(lua_State *L) +static int _olua_fun_cocos2d_Image_saveToFile$1(lua_State *L) { olua_startinvoke(L); @@ -12854,7 +14028,7 @@ static int _cocos2d_Image_saveToFile$1(lua_State *L) return num_ret; } -static int _cocos2d_Image_saveToFile$2(lua_State *L) +static int _olua_fun_cocos2d_Image_saveToFile$2(lua_State *L) { olua_startinvoke(L); @@ -12864,7 +14038,7 @@ static int _cocos2d_Image_saveToFile$2(lua_State *L) olua_to_object(L, 1, &self, "cc.Image"); olua_check_string(L, 2, &arg1); - // bool saveToFile(const std::string &filename, @optional bool isToRGB) + // bool saveToFile(const std::string &filename) bool ret = self->saveToFile(arg1); int num_ret = olua_push_bool(L, ret); @@ -12873,21 +14047,21 @@ static int _cocos2d_Image_saveToFile$2(lua_State *L) return num_ret; } -static int _cocos2d_Image_saveToFile(lua_State *L) +static int _olua_fun_cocos2d_Image_saveToFile(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_string(L, 2))) { - // bool saveToFile(const std::string &filename, @optional bool isToRGB) - return _cocos2d_Image_saveToFile$2(L); + // bool saveToFile(const std::string &filename) + return _olua_fun_cocos2d_Image_saveToFile$2(L); // } } if (num_args == 2) { // if ((olua_is_string(L, 2)) && (olua_is_bool(L, 3))) { // bool saveToFile(const std::string &filename, @optional bool isToRGB) - return _cocos2d_Image_saveToFile$1(L); + return _olua_fun_cocos2d_Image_saveToFile$1(L); // } } @@ -12896,7 +14070,7 @@ static int _cocos2d_Image_saveToFile(lua_State *L) return 0; } -static int _cocos2d_Image_setPNGPremultipliedAlphaEnabled(lua_State *L) +static int _olua_fun_cocos2d_Image_setPNGPremultipliedAlphaEnabled(lua_State *L) { olua_startinvoke(L); @@ -12912,7 +14086,7 @@ static int _cocos2d_Image_setPNGPremultipliedAlphaEnabled(lua_State *L) return 0; } -static int _cocos2d_Image_setPVRImagesHavePremultipliedAlpha(lua_State *L) +static int _olua_fun_cocos2d_Image_setPVRImagesHavePremultipliedAlpha(lua_State *L) { olua_startinvoke(L); @@ -12928,50 +14102,58 @@ static int _cocos2d_Image_setPVRImagesHavePremultipliedAlpha(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_Image(lua_State *L) +static int _olua_cls_cc_Image(lua_State *L) { oluacls_class(L, "cc.Image"); - oluacls_func(L, "getBitPerPixel", _cocos2d_Image_getBitPerPixel); - oluacls_func(L, "getData", _cocos2d_Image_getData); - oluacls_func(L, "getDataLen", _cocos2d_Image_getDataLen); - oluacls_func(L, "getFilePath", _cocos2d_Image_getFilePath); - oluacls_func(L, "getFileType", _cocos2d_Image_getFileType); - oluacls_func(L, "getHeight", _cocos2d_Image_getHeight); - oluacls_func(L, "getNumberOfMipmaps", _cocos2d_Image_getNumberOfMipmaps); - oluacls_func(L, "getPNGPremultipliedAlphaEnabled", _cocos2d_Image_getPNGPremultipliedAlphaEnabled); - oluacls_func(L, "getPixelFormat", _cocos2d_Image_getPixelFormat); - oluacls_func(L, "getWidth", _cocos2d_Image_getWidth); - oluacls_func(L, "hasAlpha", _cocos2d_Image_hasAlpha); - oluacls_func(L, "hasPremultipliedAlpha", _cocos2d_Image_hasPremultipliedAlpha); - oluacls_func(L, "initWithImageData", _cocos2d_Image_initWithImageData); - oluacls_func(L, "initWithImageFile", _cocos2d_Image_initWithImageFile); - oluacls_func(L, "initWithRawData", _cocos2d_Image_initWithRawData); - oluacls_func(L, "isCompressed", _cocos2d_Image_isCompressed); - oluacls_func(L, "new", _cocos2d_Image_new); - oluacls_func(L, "premultiplyAlpha", _cocos2d_Image_premultiplyAlpha); - oluacls_func(L, "reversePremultipliedAlpha", _cocos2d_Image_reversePremultipliedAlpha); - oluacls_func(L, "saveToFile", _cocos2d_Image_saveToFile); - oluacls_func(L, "setPNGPremultipliedAlphaEnabled", _cocos2d_Image_setPNGPremultipliedAlphaEnabled); - oluacls_func(L, "setPVRImagesHavePremultipliedAlpha", _cocos2d_Image_setPVRImagesHavePremultipliedAlpha); - oluacls_prop(L, "bitPerPixel", _cocos2d_Image_getBitPerPixel, nullptr); - oluacls_prop(L, "compressed", _cocos2d_Image_isCompressed, nullptr); - oluacls_prop(L, "data", _cocos2d_Image_getData, nullptr); - oluacls_prop(L, "dataLen", _cocos2d_Image_getDataLen, nullptr); - oluacls_prop(L, "filePath", _cocos2d_Image_getFilePath, nullptr); - oluacls_prop(L, "fileType", _cocos2d_Image_getFileType, nullptr); - oluacls_prop(L, "height", _cocos2d_Image_getHeight, nullptr); - oluacls_prop(L, "numberOfMipmaps", _cocos2d_Image_getNumberOfMipmaps, nullptr); - oluacls_prop(L, "pixelFormat", _cocos2d_Image_getPixelFormat, nullptr); - oluacls_prop(L, "pngPremultipliedAlphaEnabled", _cocos2d_Image_getPNGPremultipliedAlphaEnabled, _cocos2d_Image_setPNGPremultipliedAlphaEnabled); - oluacls_prop(L, "width", _cocos2d_Image_getWidth, nullptr); + oluacls_func(L, "getBitPerPixel", _olua_fun_cocos2d_Image_getBitPerPixel); + oluacls_func(L, "getData", _olua_fun_cocos2d_Image_getData); + oluacls_func(L, "getDataLen", _olua_fun_cocos2d_Image_getDataLen); + oluacls_func(L, "getFilePath", _olua_fun_cocos2d_Image_getFilePath); + oluacls_func(L, "getFileType", _olua_fun_cocos2d_Image_getFileType); + oluacls_func(L, "getHeight", _olua_fun_cocos2d_Image_getHeight); + oluacls_func(L, "getNumberOfMipmaps", _olua_fun_cocos2d_Image_getNumberOfMipmaps); + oluacls_func(L, "getPNGPremultipliedAlphaEnabled", _olua_fun_cocos2d_Image_getPNGPremultipliedAlphaEnabled); + oluacls_func(L, "getPixelFormat", _olua_fun_cocos2d_Image_getPixelFormat); + oluacls_func(L, "getWidth", _olua_fun_cocos2d_Image_getWidth); + oluacls_func(L, "hasAlpha", _olua_fun_cocos2d_Image_hasAlpha); + oluacls_func(L, "hasPremultipliedAlpha", _olua_fun_cocos2d_Image_hasPremultipliedAlpha); + oluacls_func(L, "initWithImageData", _olua_fun_cocos2d_Image_initWithImageData); + oluacls_func(L, "initWithImageFile", _olua_fun_cocos2d_Image_initWithImageFile); + oluacls_func(L, "initWithRawData", _olua_fun_cocos2d_Image_initWithRawData); + oluacls_func(L, "isCompressed", _olua_fun_cocos2d_Image_isCompressed); + oluacls_func(L, "new", _olua_fun_cocos2d_Image_new); + oluacls_func(L, "premultiplyAlpha", _olua_fun_cocos2d_Image_premultiplyAlpha); + oluacls_func(L, "reversePremultipliedAlpha", _olua_fun_cocos2d_Image_reversePremultipliedAlpha); + oluacls_func(L, "saveToFile", _olua_fun_cocos2d_Image_saveToFile); + oluacls_func(L, "setPNGPremultipliedAlphaEnabled", _olua_fun_cocos2d_Image_setPNGPremultipliedAlphaEnabled); + oluacls_func(L, "setPVRImagesHavePremultipliedAlpha", _olua_fun_cocos2d_Image_setPVRImagesHavePremultipliedAlpha); + oluacls_prop(L, "bitPerPixel", _olua_fun_cocos2d_Image_getBitPerPixel, nullptr); + oluacls_prop(L, "compressed", _olua_fun_cocos2d_Image_isCompressed, nullptr); + oluacls_prop(L, "data", _olua_fun_cocos2d_Image_getData, nullptr); + oluacls_prop(L, "dataLen", _olua_fun_cocos2d_Image_getDataLen, nullptr); + oluacls_prop(L, "filePath", _olua_fun_cocos2d_Image_getFilePath, nullptr); + oluacls_prop(L, "fileType", _olua_fun_cocos2d_Image_getFileType, nullptr); + oluacls_prop(L, "height", _olua_fun_cocos2d_Image_getHeight, nullptr); + oluacls_prop(L, "numberOfMipmaps", _olua_fun_cocos2d_Image_getNumberOfMipmaps, nullptr); + oluacls_prop(L, "pixelFormat", _olua_fun_cocos2d_Image_getPixelFormat, nullptr); + oluacls_prop(L, "pngPremultipliedAlphaEnabled", _olua_fun_cocos2d_Image_getPNGPremultipliedAlphaEnabled, _olua_fun_cocos2d_Image_setPNGPremultipliedAlphaEnabled); + oluacls_prop(L, "width", _olua_fun_cocos2d_Image_getWidth, nullptr); return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_Properties_Type(lua_State *L) +OLUA_LIB int luaopen_cc_Image(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.Image")) { + luaL_error(L, "class not found: cocos2d::Image"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_cc_Properties_Type(lua_State *L) { oluacls_class(L, "cc.Properties.Type"); oluacls_func(L, "__index", olua_indexerror); @@ -12986,9 +14168,19 @@ OLUA_LIB int luaopen_cocos2d_Properties_Type(lua_State *L) return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_Properties_Type(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.Properties.Type")) { + luaL_error(L, "class not found: cocos2d::Properties::Type"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_Properties___gc(lua_State *L) +static int _olua_fun_cocos2d_Properties___gc(lua_State *L) { olua_startinvoke(L); @@ -13000,7 +14192,7 @@ static int _cocos2d_Properties___gc(lua_State *L) return 0; } -static int _cocos2d_Properties___olua_move(lua_State *L) +static int _olua_fun_cocos2d_Properties___olua_move(lua_State *L) { olua_startinvoke(L); @@ -13012,7 +14204,7 @@ static int _cocos2d_Properties___olua_move(lua_State *L) return 1; } -static int _cocos2d_Properties_createNonRefCounted(lua_State *L) +static int _olua_fun_cocos2d_Properties_createNonRefCounted(lua_State *L) { olua_startinvoke(L); @@ -13029,7 +14221,7 @@ static int _cocos2d_Properties_createNonRefCounted(lua_State *L) return num_ret; } -static int _cocos2d_Properties_exists(lua_State *L) +static int _olua_fun_cocos2d_Properties_exists(lua_State *L) { olua_startinvoke(L); @@ -13048,7 +14240,7 @@ static int _cocos2d_Properties_exists(lua_State *L) return num_ret; } -static int _cocos2d_Properties_getBool$1(lua_State *L) +static int _olua_fun_cocos2d_Properties_getBool$1(lua_State *L) { olua_startinvoke(L); @@ -13069,7 +14261,7 @@ static int _cocos2d_Properties_getBool$1(lua_State *L) return num_ret; } -static int _cocos2d_Properties_getBool$2(lua_State *L) +static int _olua_fun_cocos2d_Properties_getBool$2(lua_State *L) { olua_startinvoke(L); @@ -13077,7 +14269,7 @@ static int _cocos2d_Properties_getBool$2(lua_State *L) olua_to_object(L, 1, &self, "cc.Properties"); - // bool getBool(@optional const char *name, @optional bool defaultValue) + // bool getBool() bool ret = self->getBool(); int num_ret = olua_push_bool(L, ret); @@ -13086,7 +14278,7 @@ static int _cocos2d_Properties_getBool$2(lua_State *L) return num_ret; } -static int _cocos2d_Properties_getBool$3(lua_State *L) +static int _olua_fun_cocos2d_Properties_getBool$3(lua_State *L) { olua_startinvoke(L); @@ -13096,7 +14288,7 @@ static int _cocos2d_Properties_getBool$3(lua_State *L) olua_to_object(L, 1, &self, "cc.Properties"); olua_check_string(L, 2, &arg1); - // bool getBool(@optional const char *name, @optional bool defaultValue) + // bool getBool(@optional const char *name) bool ret = self->getBool(arg1); int num_ret = olua_push_bool(L, ret); @@ -13105,26 +14297,26 @@ static int _cocos2d_Properties_getBool$3(lua_State *L) return num_ret; } -static int _cocos2d_Properties_getBool(lua_State *L) +static int _olua_fun_cocos2d_Properties_getBool(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 0) { - // bool getBool(@optional const char *name, @optional bool defaultValue) - return _cocos2d_Properties_getBool$2(L); + // bool getBool() + return _olua_fun_cocos2d_Properties_getBool$2(L); } if (num_args == 1) { // if ((olua_is_string(L, 2))) { - // bool getBool(@optional const char *name, @optional bool defaultValue) - return _cocos2d_Properties_getBool$3(L); + // bool getBool(@optional const char *name) + return _olua_fun_cocos2d_Properties_getBool$3(L); // } } if (num_args == 2) { // if ((olua_is_string(L, 2)) && (olua_is_bool(L, 3))) { // bool getBool(@optional const char *name, @optional bool defaultValue) - return _cocos2d_Properties_getBool$1(L); + return _olua_fun_cocos2d_Properties_getBool$1(L); // } } @@ -13133,7 +14325,7 @@ static int _cocos2d_Properties_getBool(lua_State *L) return 0; } -static int _cocos2d_Properties_getColor$1(lua_State *L) +static int _olua_fun_cocos2d_Properties_getColor$1(lua_State *L) { olua_startinvoke(L); @@ -13154,7 +14346,7 @@ static int _cocos2d_Properties_getColor$1(lua_State *L) return num_ret; } -static int _cocos2d_Properties_getColor$2(lua_State *L) +static int _olua_fun_cocos2d_Properties_getColor$2(lua_State *L) { olua_startinvoke(L); @@ -13175,19 +14367,19 @@ static int _cocos2d_Properties_getColor$2(lua_State *L) return num_ret; } -static int _cocos2d_Properties_getColor(lua_State *L) +static int _olua_fun_cocos2d_Properties_getColor(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 2) { if ((olua_is_string(L, 2)) && (olua_is_object(L, 3, "cc.Vec4"))) { // bool getColor(const char *name, cocos2d::Vec4 *out) - return _cocos2d_Properties_getColor$2(L); + return _olua_fun_cocos2d_Properties_getColor$2(L); } // if ((olua_is_string(L, 2)) && (olua_is_object(L, 3, "cc.Vec3"))) { // bool getColor(const char *name, cocos2d::Vec3 *out) - return _cocos2d_Properties_getColor$1(L); + return _olua_fun_cocos2d_Properties_getColor$1(L); // } } @@ -13196,7 +14388,7 @@ static int _cocos2d_Properties_getColor(lua_State *L) return 0; } -static int _cocos2d_Properties_getFloat$1(lua_State *L) +static int _olua_fun_cocos2d_Properties_getFloat$1(lua_State *L) { olua_startinvoke(L); @@ -13215,7 +14407,7 @@ static int _cocos2d_Properties_getFloat$1(lua_State *L) return num_ret; } -static int _cocos2d_Properties_getFloat$2(lua_State *L) +static int _olua_fun_cocos2d_Properties_getFloat$2(lua_State *L) { olua_startinvoke(L); @@ -13223,7 +14415,7 @@ static int _cocos2d_Properties_getFloat$2(lua_State *L) olua_to_object(L, 1, &self, "cc.Properties"); - // float getFloat(@optional const char *name) + // float getFloat() float ret = self->getFloat(); int num_ret = olua_push_number(L, ret); @@ -13232,19 +14424,19 @@ static int _cocos2d_Properties_getFloat$2(lua_State *L) return num_ret; } -static int _cocos2d_Properties_getFloat(lua_State *L) +static int _olua_fun_cocos2d_Properties_getFloat(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 0) { - // float getFloat(@optional const char *name) - return _cocos2d_Properties_getFloat$2(L); + // float getFloat() + return _olua_fun_cocos2d_Properties_getFloat$2(L); } if (num_args == 1) { // if ((olua_is_string(L, 2))) { // float getFloat(@optional const char *name) - return _cocos2d_Properties_getFloat$1(L); + return _olua_fun_cocos2d_Properties_getFloat$1(L); // } } @@ -13253,7 +14445,7 @@ static int _cocos2d_Properties_getFloat(lua_State *L) return 0; } -static int _cocos2d_Properties_getId(lua_State *L) +static int _olua_fun_cocos2d_Properties_getId(lua_State *L) { olua_startinvoke(L); @@ -13270,7 +14462,7 @@ static int _cocos2d_Properties_getId(lua_State *L) return num_ret; } -static int _cocos2d_Properties_getInt$1(lua_State *L) +static int _olua_fun_cocos2d_Properties_getInt$1(lua_State *L) { olua_startinvoke(L); @@ -13289,7 +14481,7 @@ static int _cocos2d_Properties_getInt$1(lua_State *L) return num_ret; } -static int _cocos2d_Properties_getInt$2(lua_State *L) +static int _olua_fun_cocos2d_Properties_getInt$2(lua_State *L) { olua_startinvoke(L); @@ -13297,7 +14489,7 @@ static int _cocos2d_Properties_getInt$2(lua_State *L) olua_to_object(L, 1, &self, "cc.Properties"); - // int getInt(@optional const char *name) + // int getInt() int ret = self->getInt(); int num_ret = olua_push_integer(L, ret); @@ -13306,19 +14498,19 @@ static int _cocos2d_Properties_getInt$2(lua_State *L) return num_ret; } -static int _cocos2d_Properties_getInt(lua_State *L) +static int _olua_fun_cocos2d_Properties_getInt(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 0) { - // int getInt(@optional const char *name) - return _cocos2d_Properties_getInt$2(L); + // int getInt() + return _olua_fun_cocos2d_Properties_getInt$2(L); } if (num_args == 1) { // if ((olua_is_string(L, 2))) { // int getInt(@optional const char *name) - return _cocos2d_Properties_getInt$1(L); + return _olua_fun_cocos2d_Properties_getInt$1(L); // } } @@ -13327,7 +14519,7 @@ static int _cocos2d_Properties_getInt(lua_State *L) return 0; } -static int _cocos2d_Properties_getLong$1(lua_State *L) +static int _olua_fun_cocos2d_Properties_getLong$1(lua_State *L) { olua_startinvoke(L); @@ -13346,7 +14538,7 @@ static int _cocos2d_Properties_getLong$1(lua_State *L) return num_ret; } -static int _cocos2d_Properties_getLong$2(lua_State *L) +static int _olua_fun_cocos2d_Properties_getLong$2(lua_State *L) { olua_startinvoke(L); @@ -13354,7 +14546,7 @@ static int _cocos2d_Properties_getLong$2(lua_State *L) olua_to_object(L, 1, &self, "cc.Properties"); - // long getLong(@optional const char *name) + // long getLong() long ret = self->getLong(); int num_ret = olua_push_integer(L, ret); @@ -13363,19 +14555,19 @@ static int _cocos2d_Properties_getLong$2(lua_State *L) return num_ret; } -static int _cocos2d_Properties_getLong(lua_State *L) +static int _olua_fun_cocos2d_Properties_getLong(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 0) { - // long getLong(@optional const char *name) - return _cocos2d_Properties_getLong$2(L); + // long getLong() + return _olua_fun_cocos2d_Properties_getLong$2(L); } if (num_args == 1) { // if ((olua_is_string(L, 2))) { // long getLong(@optional const char *name) - return _cocos2d_Properties_getLong$1(L); + return _olua_fun_cocos2d_Properties_getLong$1(L); // } } @@ -13384,7 +14576,7 @@ static int _cocos2d_Properties_getLong(lua_State *L) return 0; } -static int _cocos2d_Properties_getMat4(lua_State *L) +static int _olua_fun_cocos2d_Properties_getMat4(lua_State *L) { olua_startinvoke(L); @@ -13405,7 +14597,7 @@ static int _cocos2d_Properties_getMat4(lua_State *L) return num_ret; } -static int _cocos2d_Properties_getNamespace$1(lua_State *L) +static int _olua_fun_cocos2d_Properties_getNamespace$1(lua_State *L) { olua_startinvoke(L); @@ -13428,35 +14620,39 @@ static int _cocos2d_Properties_getNamespace$1(lua_State *L) return num_ret; } -static int _cocos2d_Properties_getNamespace$2(lua_State *L) +static int _olua_fun_cocos2d_Properties_getNamespace$2(lua_State *L) { olua_startinvoke(L); cocos2d::Properties *self = nullptr; + const char *arg1 = nullptr; /** id */ olua_to_object(L, 1, &self, "cc.Properties"); + olua_check_string(L, 2, &arg1); - // const char *getNamespace() - const char *ret = self->getNamespace(); - int num_ret = olua_push_string(L, ret); + // cocos2d::Properties *getNamespace(const char *id) + cocos2d::Properties *ret = self->getNamespace(arg1); + int num_ret = olua_push_object(L, ret, "cc.Properties"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_Properties_getNamespace$3(lua_State *L) +static int _olua_fun_cocos2d_Properties_getNamespace$3(lua_State *L) { olua_startinvoke(L); cocos2d::Properties *self = nullptr; const char *arg1 = nullptr; /** id */ + bool arg2 = false; /** searchNames */ olua_to_object(L, 1, &self, "cc.Properties"); olua_check_string(L, 2, &arg1); + olua_check_bool(L, 3, &arg2); - // cocos2d::Properties *getNamespace(const char *id, @optional bool searchNames, @optional bool recurse) - cocos2d::Properties *ret = self->getNamespace(arg1); + // cocos2d::Properties *getNamespace(const char *id, @optional bool searchNames) + cocos2d::Properties *ret = self->getNamespace(arg1, arg2); int num_ret = olua_push_object(L, ret, "cc.Properties"); olua_endinvoke(L); @@ -13464,54 +14660,50 @@ static int _cocos2d_Properties_getNamespace$3(lua_State *L) return num_ret; } -static int _cocos2d_Properties_getNamespace$4(lua_State *L) +static int _olua_fun_cocos2d_Properties_getNamespace$4(lua_State *L) { olua_startinvoke(L); cocos2d::Properties *self = nullptr; - const char *arg1 = nullptr; /** id */ - bool arg2 = false; /** searchNames */ olua_to_object(L, 1, &self, "cc.Properties"); - olua_check_string(L, 2, &arg1); - olua_check_bool(L, 3, &arg2); - // cocos2d::Properties *getNamespace(const char *id, @optional bool searchNames, @optional bool recurse) - cocos2d::Properties *ret = self->getNamespace(arg1, arg2); - int num_ret = olua_push_object(L, ret, "cc.Properties"); + // const char *getNamespace() + const char *ret = self->getNamespace(); + int num_ret = olua_push_string(L, ret); olua_endinvoke(L); return num_ret; } -static int _cocos2d_Properties_getNamespace(lua_State *L) +static int _olua_fun_cocos2d_Properties_getNamespace(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 0) { // const char *getNamespace() - return _cocos2d_Properties_getNamespace$2(L); + return _olua_fun_cocos2d_Properties_getNamespace$4(L); } if (num_args == 1) { // if ((olua_is_string(L, 2))) { - // cocos2d::Properties *getNamespace(const char *id, @optional bool searchNames, @optional bool recurse) - return _cocos2d_Properties_getNamespace$3(L); + // cocos2d::Properties *getNamespace(const char *id) + return _olua_fun_cocos2d_Properties_getNamespace$2(L); // } } if (num_args == 2) { // if ((olua_is_string(L, 2)) && (olua_is_bool(L, 3))) { - // cocos2d::Properties *getNamespace(const char *id, @optional bool searchNames, @optional bool recurse) - return _cocos2d_Properties_getNamespace$4(L); + // cocos2d::Properties *getNamespace(const char *id, @optional bool searchNames) + return _olua_fun_cocos2d_Properties_getNamespace$3(L); // } } if (num_args == 3) { // if ((olua_is_string(L, 2)) && (olua_is_bool(L, 3)) && (olua_is_bool(L, 4))) { // cocos2d::Properties *getNamespace(const char *id, @optional bool searchNames, @optional bool recurse) - return _cocos2d_Properties_getNamespace$1(L); + return _olua_fun_cocos2d_Properties_getNamespace$1(L); // } } @@ -13520,7 +14712,7 @@ static int _cocos2d_Properties_getNamespace(lua_State *L) return 0; } -static int _cocos2d_Properties_getNextNamespace(lua_State *L) +static int _olua_fun_cocos2d_Properties_getNextNamespace(lua_State *L) { olua_startinvoke(L); @@ -13537,7 +14729,7 @@ static int _cocos2d_Properties_getNextNamespace(lua_State *L) return num_ret; } -static int _cocos2d_Properties_getNextProperty(lua_State *L) +static int _olua_fun_cocos2d_Properties_getNextProperty(lua_State *L) { olua_startinvoke(L); @@ -13554,7 +14746,7 @@ static int _cocos2d_Properties_getNextProperty(lua_State *L) return num_ret; } -static int _cocos2d_Properties_getPath(lua_State *L) +static int _olua_fun_cocos2d_Properties_getPath(lua_State *L) { olua_startinvoke(L); @@ -13564,7 +14756,7 @@ static int _cocos2d_Properties_getPath(lua_State *L) olua_to_object(L, 1, &self, "cc.Properties"); olua_check_string(L, 2, &arg1); - olua_check_pointer(L, 3, &arg2, "olua.string"); + olua_check_valueptr(L, 3, &arg2, "olua.string"); // bool getPath(const char *name, std::string *path) bool ret = self->getPath(arg1, arg2); @@ -13575,7 +14767,7 @@ static int _cocos2d_Properties_getPath(lua_State *L) return num_ret; } -static int _cocos2d_Properties_getQuaternionFromAxisAngle(lua_State *L) +static int _olua_fun_cocos2d_Properties_getQuaternionFromAxisAngle(lua_State *L) { olua_startinvoke(L); @@ -13596,7 +14788,7 @@ static int _cocos2d_Properties_getQuaternionFromAxisAngle(lua_State *L) return num_ret; } -static int _cocos2d_Properties_getString$1(lua_State *L) +static int _olua_fun_cocos2d_Properties_getString$1(lua_State *L) { olua_startinvoke(L); @@ -13617,7 +14809,7 @@ static int _cocos2d_Properties_getString$1(lua_State *L) return num_ret; } -static int _cocos2d_Properties_getString$2(lua_State *L) +static int _olua_fun_cocos2d_Properties_getString$2(lua_State *L) { olua_startinvoke(L); @@ -13625,7 +14817,7 @@ static int _cocos2d_Properties_getString$2(lua_State *L) olua_to_object(L, 1, &self, "cc.Properties"); - // const char *getString(@optional const char *name, @optional const char *defaultValue) + // const char *getString() const char *ret = self->getString(); int num_ret = olua_push_string(L, ret); @@ -13634,7 +14826,7 @@ static int _cocos2d_Properties_getString$2(lua_State *L) return num_ret; } -static int _cocos2d_Properties_getString$3(lua_State *L) +static int _olua_fun_cocos2d_Properties_getString$3(lua_State *L) { olua_startinvoke(L); @@ -13644,7 +14836,7 @@ static int _cocos2d_Properties_getString$3(lua_State *L) olua_to_object(L, 1, &self, "cc.Properties"); olua_check_string(L, 2, &arg1); - // const char *getString(@optional const char *name, @optional const char *defaultValue) + // const char *getString(@optional const char *name) const char *ret = self->getString(arg1); int num_ret = olua_push_string(L, ret); @@ -13653,26 +14845,26 @@ static int _cocos2d_Properties_getString$3(lua_State *L) return num_ret; } -static int _cocos2d_Properties_getString(lua_State *L) +static int _olua_fun_cocos2d_Properties_getString(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 0) { - // const char *getString(@optional const char *name, @optional const char *defaultValue) - return _cocos2d_Properties_getString$2(L); + // const char *getString() + return _olua_fun_cocos2d_Properties_getString$2(L); } if (num_args == 1) { // if ((olua_is_string(L, 2))) { - // const char *getString(@optional const char *name, @optional const char *defaultValue) - return _cocos2d_Properties_getString$3(L); + // const char *getString(@optional const char *name) + return _olua_fun_cocos2d_Properties_getString$3(L); // } } if (num_args == 2) { // if ((olua_is_string(L, 2)) && (olua_is_string(L, 3))) { // const char *getString(@optional const char *name, @optional const char *defaultValue) - return _cocos2d_Properties_getString$1(L); + return _olua_fun_cocos2d_Properties_getString$1(L); // } } @@ -13681,7 +14873,7 @@ static int _cocos2d_Properties_getString(lua_State *L) return 0; } -static int _cocos2d_Properties_getType$1(lua_State *L) +static int _olua_fun_cocos2d_Properties_getType$1(lua_State *L) { olua_startinvoke(L); @@ -13700,7 +14892,7 @@ static int _cocos2d_Properties_getType$1(lua_State *L) return num_ret; } -static int _cocos2d_Properties_getType$2(lua_State *L) +static int _olua_fun_cocos2d_Properties_getType$2(lua_State *L) { olua_startinvoke(L); @@ -13708,7 +14900,7 @@ static int _cocos2d_Properties_getType$2(lua_State *L) olua_to_object(L, 1, &self, "cc.Properties"); - // cocos2d::Properties::Type getType(@optional const char *name) + // cocos2d::Properties::Type getType() cocos2d::Properties::Type ret = self->getType(); int num_ret = olua_push_enum(L, ret); @@ -13717,19 +14909,19 @@ static int _cocos2d_Properties_getType$2(lua_State *L) return num_ret; } -static int _cocos2d_Properties_getType(lua_State *L) +static int _olua_fun_cocos2d_Properties_getType(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 0) { - // cocos2d::Properties::Type getType(@optional const char *name) - return _cocos2d_Properties_getType$2(L); + // cocos2d::Properties::Type getType() + return _olua_fun_cocos2d_Properties_getType$2(L); } if (num_args == 1) { // if ((olua_is_string(L, 2))) { // cocos2d::Properties::Type getType(@optional const char *name) - return _cocos2d_Properties_getType$1(L); + return _olua_fun_cocos2d_Properties_getType$1(L); // } } @@ -13738,7 +14930,7 @@ static int _cocos2d_Properties_getType(lua_State *L) return 0; } -static int _cocos2d_Properties_getVariable$1(lua_State *L) +static int _olua_fun_cocos2d_Properties_getVariable$1(lua_State *L) { olua_startinvoke(L); @@ -13759,7 +14951,7 @@ static int _cocos2d_Properties_getVariable$1(lua_State *L) return num_ret; } -static int _cocos2d_Properties_getVariable$2(lua_State *L) +static int _olua_fun_cocos2d_Properties_getVariable$2(lua_State *L) { olua_startinvoke(L); @@ -13769,7 +14961,7 @@ static int _cocos2d_Properties_getVariable$2(lua_State *L) olua_to_object(L, 1, &self, "cc.Properties"); olua_check_string(L, 2, &arg1); - // const char *getVariable(const char *name, @optional const char *defaultValue) + // const char *getVariable(const char *name) const char *ret = self->getVariable(arg1); int num_ret = olua_push_string(L, ret); @@ -13778,21 +14970,21 @@ static int _cocos2d_Properties_getVariable$2(lua_State *L) return num_ret; } -static int _cocos2d_Properties_getVariable(lua_State *L) +static int _olua_fun_cocos2d_Properties_getVariable(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_string(L, 2))) { - // const char *getVariable(const char *name, @optional const char *defaultValue) - return _cocos2d_Properties_getVariable$2(L); + // const char *getVariable(const char *name) + return _olua_fun_cocos2d_Properties_getVariable$2(L); // } } if (num_args == 2) { // if ((olua_is_string(L, 2)) && (olua_is_string(L, 3))) { // const char *getVariable(const char *name, @optional const char *defaultValue) - return _cocos2d_Properties_getVariable$1(L); + return _olua_fun_cocos2d_Properties_getVariable$1(L); // } } @@ -13801,7 +14993,7 @@ static int _cocos2d_Properties_getVariable(lua_State *L) return 0; } -static int _cocos2d_Properties_getVec2(lua_State *L) +static int _olua_fun_cocos2d_Properties_getVec2(lua_State *L) { olua_startinvoke(L); @@ -13822,7 +15014,7 @@ static int _cocos2d_Properties_getVec2(lua_State *L) return num_ret; } -static int _cocos2d_Properties_getVec3(lua_State *L) +static int _olua_fun_cocos2d_Properties_getVec3(lua_State *L) { olua_startinvoke(L); @@ -13843,7 +15035,7 @@ static int _cocos2d_Properties_getVec3(lua_State *L) return num_ret; } -static int _cocos2d_Properties_getVec4(lua_State *L) +static int _olua_fun_cocos2d_Properties_getVec4(lua_State *L) { olua_startinvoke(L); @@ -13864,7 +15056,7 @@ static int _cocos2d_Properties_getVec4(lua_State *L) return num_ret; } -static int _cocos2d_Properties_parseAxisAngle(lua_State *L) +static int _olua_fun_cocos2d_Properties_parseAxisAngle(lua_State *L) { olua_startinvoke(L); @@ -13883,7 +15075,7 @@ static int _cocos2d_Properties_parseAxisAngle(lua_State *L) return num_ret; } -static int _cocos2d_Properties_parseColor$1(lua_State *L) +static int _olua_fun_cocos2d_Properties_parseColor$1(lua_State *L) { olua_startinvoke(L); @@ -13902,7 +15094,7 @@ static int _cocos2d_Properties_parseColor$1(lua_State *L) return num_ret; } -static int _cocos2d_Properties_parseColor$2(lua_State *L) +static int _olua_fun_cocos2d_Properties_parseColor$2(lua_State *L) { olua_startinvoke(L); @@ -13921,19 +15113,19 @@ static int _cocos2d_Properties_parseColor$2(lua_State *L) return num_ret; } -static int _cocos2d_Properties_parseColor(lua_State *L) +static int _olua_fun_cocos2d_Properties_parseColor(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 2) { if ((olua_is_string(L, 1)) && (olua_is_object(L, 2, "cc.Vec4"))) { // static bool parseColor(const char *str, cocos2d::Vec4 *out) - return _cocos2d_Properties_parseColor$2(L); + return _olua_fun_cocos2d_Properties_parseColor$2(L); } // if ((olua_is_string(L, 1)) && (olua_is_object(L, 2, "cc.Vec3"))) { // static bool parseColor(const char *str, cocos2d::Vec3 *out) - return _cocos2d_Properties_parseColor$1(L); + return _olua_fun_cocos2d_Properties_parseColor$1(L); // } } @@ -13942,7 +15134,7 @@ static int _cocos2d_Properties_parseColor(lua_State *L) return 0; } -static int _cocos2d_Properties_parseVec2(lua_State *L) +static int _olua_fun_cocos2d_Properties_parseVec2(lua_State *L) { olua_startinvoke(L); @@ -13961,7 +15153,7 @@ static int _cocos2d_Properties_parseVec2(lua_State *L) return num_ret; } -static int _cocos2d_Properties_parseVec3(lua_State *L) +static int _olua_fun_cocos2d_Properties_parseVec3(lua_State *L) { olua_startinvoke(L); @@ -13980,7 +15172,7 @@ static int _cocos2d_Properties_parseVec3(lua_State *L) return num_ret; } -static int _cocos2d_Properties_parseVec4(lua_State *L) +static int _olua_fun_cocos2d_Properties_parseVec4(lua_State *L) { olua_startinvoke(L); @@ -13999,7 +15191,7 @@ static int _cocos2d_Properties_parseVec4(lua_State *L) return num_ret; } -static int _cocos2d_Properties_rewind(lua_State *L) +static int _olua_fun_cocos2d_Properties_rewind(lua_State *L) { olua_startinvoke(L); @@ -14015,7 +15207,7 @@ static int _cocos2d_Properties_rewind(lua_State *L) return 0; } -static int _cocos2d_Properties_setString(lua_State *L) +static int _olua_fun_cocos2d_Properties_setString(lua_State *L) { olua_startinvoke(L); @@ -14036,7 +15228,7 @@ static int _cocos2d_Properties_setString(lua_State *L) return num_ret; } -static int _cocos2d_Properties_setVariable(lua_State *L) +static int _olua_fun_cocos2d_Properties_setVariable(lua_State *L) { olua_startinvoke(L); @@ -14056,49 +15248,58 @@ static int _cocos2d_Properties_setVariable(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_Properties(lua_State *L) +static int _olua_cls_cc_Properties(lua_State *L) { oluacls_class(L, "cc.Properties"); - oluacls_func(L, "__gc", _cocos2d_Properties___gc); - oluacls_func(L, "__olua_move", _cocos2d_Properties___olua_move); - oluacls_func(L, "createNonRefCounted", _cocos2d_Properties_createNonRefCounted); - oluacls_func(L, "exists", _cocos2d_Properties_exists); - oluacls_func(L, "getBool", _cocos2d_Properties_getBool); - oluacls_func(L, "getColor", _cocos2d_Properties_getColor); - oluacls_func(L, "getFloat", _cocos2d_Properties_getFloat); - oluacls_func(L, "getId", _cocos2d_Properties_getId); - oluacls_func(L, "getInt", _cocos2d_Properties_getInt); - oluacls_func(L, "getLong", _cocos2d_Properties_getLong); - oluacls_func(L, "getMat4", _cocos2d_Properties_getMat4); - oluacls_func(L, "getNamespace", _cocos2d_Properties_getNamespace); - oluacls_func(L, "getNextNamespace", _cocos2d_Properties_getNextNamespace); - oluacls_func(L, "getNextProperty", _cocos2d_Properties_getNextProperty); - oluacls_func(L, "getPath", _cocos2d_Properties_getPath); - oluacls_func(L, "getQuaternionFromAxisAngle", _cocos2d_Properties_getQuaternionFromAxisAngle); - oluacls_func(L, "getString", _cocos2d_Properties_getString); - oluacls_func(L, "getType", _cocos2d_Properties_getType); - oluacls_func(L, "getVariable", _cocos2d_Properties_getVariable); - oluacls_func(L, "getVec2", _cocos2d_Properties_getVec2); - oluacls_func(L, "getVec3", _cocos2d_Properties_getVec3); - oluacls_func(L, "getVec4", _cocos2d_Properties_getVec4); - oluacls_func(L, "parseAxisAngle", _cocos2d_Properties_parseAxisAngle); - oluacls_func(L, "parseColor", _cocos2d_Properties_parseColor); - oluacls_func(L, "parseVec2", _cocos2d_Properties_parseVec2); - oluacls_func(L, "parseVec3", _cocos2d_Properties_parseVec3); - oluacls_func(L, "parseVec4", _cocos2d_Properties_parseVec4); - oluacls_func(L, "rewind", _cocos2d_Properties_rewind); - oluacls_func(L, "setString", _cocos2d_Properties_setString); - oluacls_func(L, "setVariable", _cocos2d_Properties_setVariable); - oluacls_prop(L, "id", _cocos2d_Properties_getId, nullptr); - oluacls_prop(L, "nextNamespace", _cocos2d_Properties_getNextNamespace, nullptr); - oluacls_prop(L, "nextProperty", _cocos2d_Properties_getNextProperty, nullptr); + oluacls_func(L, "__gc", _olua_fun_cocos2d_Properties___gc); + oluacls_func(L, "__olua_move", _olua_fun_cocos2d_Properties___olua_move); + oluacls_func(L, "createNonRefCounted", _olua_fun_cocos2d_Properties_createNonRefCounted); + oluacls_func(L, "exists", _olua_fun_cocos2d_Properties_exists); + oluacls_func(L, "getBool", _olua_fun_cocos2d_Properties_getBool); + oluacls_func(L, "getColor", _olua_fun_cocos2d_Properties_getColor); + oluacls_func(L, "getFloat", _olua_fun_cocos2d_Properties_getFloat); + oluacls_func(L, "getId", _olua_fun_cocos2d_Properties_getId); + oluacls_func(L, "getInt", _olua_fun_cocos2d_Properties_getInt); + oluacls_func(L, "getLong", _olua_fun_cocos2d_Properties_getLong); + oluacls_func(L, "getMat4", _olua_fun_cocos2d_Properties_getMat4); + oluacls_func(L, "getNamespace", _olua_fun_cocos2d_Properties_getNamespace); + oluacls_func(L, "getNextNamespace", _olua_fun_cocos2d_Properties_getNextNamespace); + oluacls_func(L, "getNextProperty", _olua_fun_cocos2d_Properties_getNextProperty); + oluacls_func(L, "getPath", _olua_fun_cocos2d_Properties_getPath); + oluacls_func(L, "getQuaternionFromAxisAngle", _olua_fun_cocos2d_Properties_getQuaternionFromAxisAngle); + oluacls_func(L, "getString", _olua_fun_cocos2d_Properties_getString); + oluacls_func(L, "getType", _olua_fun_cocos2d_Properties_getType); + oluacls_func(L, "getVariable", _olua_fun_cocos2d_Properties_getVariable); + oluacls_func(L, "getVec2", _olua_fun_cocos2d_Properties_getVec2); + oluacls_func(L, "getVec3", _olua_fun_cocos2d_Properties_getVec3); + oluacls_func(L, "getVec4", _olua_fun_cocos2d_Properties_getVec4); + oluacls_func(L, "parseAxisAngle", _olua_fun_cocos2d_Properties_parseAxisAngle); + oluacls_func(L, "parseColor", _olua_fun_cocos2d_Properties_parseColor); + oluacls_func(L, "parseVec2", _olua_fun_cocos2d_Properties_parseVec2); + oluacls_func(L, "parseVec3", _olua_fun_cocos2d_Properties_parseVec3); + oluacls_func(L, "parseVec4", _olua_fun_cocos2d_Properties_parseVec4); + oluacls_func(L, "rewind", _olua_fun_cocos2d_Properties_rewind); + oluacls_func(L, "setString", _olua_fun_cocos2d_Properties_setString); + oluacls_func(L, "setVariable", _olua_fun_cocos2d_Properties_setVariable); + oluacls_prop(L, "id", _olua_fun_cocos2d_Properties_getId, nullptr); + oluacls_prop(L, "nextNamespace", _olua_fun_cocos2d_Properties_getNextNamespace, nullptr); + oluacls_prop(L, "nextProperty", _olua_fun_cocos2d_Properties_getNextProperty, nullptr); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_Properties(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.Properties")) { + luaL_error(L, "class not found: cocos2d::Properties"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_Material_addTechnique(lua_State *L) +static int _olua_fun_cocos2d_Material_addTechnique(lua_State *L) { olua_startinvoke(L); @@ -14116,7 +15317,7 @@ static int _cocos2d_Material_addTechnique(lua_State *L) return 0; } -static int _cocos2d_Material_clone(lua_State *L) +static int _olua_fun_cocos2d_Material_clone(lua_State *L) { olua_startinvoke(L); @@ -14133,7 +15334,7 @@ static int _cocos2d_Material_clone(lua_State *L) return num_ret; } -static int _cocos2d_Material_createWithFilename(lua_State *L) +static int _olua_fun_cocos2d_Material_createWithFilename(lua_State *L) { olua_startinvoke(L); @@ -14150,7 +15351,7 @@ static int _cocos2d_Material_createWithFilename(lua_State *L) return num_ret; } -static int _cocos2d_Material_createWithProgramState(lua_State *L) +static int _olua_fun_cocos2d_Material_createWithProgramState(lua_State *L) { olua_startinvoke(L); @@ -14167,7 +15368,7 @@ static int _cocos2d_Material_createWithProgramState(lua_State *L) return num_ret; } -static int _cocos2d_Material_createWithProperties(lua_State *L) +static int _olua_fun_cocos2d_Material_createWithProperties(lua_State *L) { olua_startinvoke(L); @@ -14184,7 +15385,7 @@ static int _cocos2d_Material_createWithProperties(lua_State *L) return num_ret; } -static int _cocos2d_Material_draw(lua_State *L) +static int _olua_fun_cocos2d_Material_draw(lua_State *L) { olua_startinvoke(L); @@ -14196,7 +15397,7 @@ static int _cocos2d_Material_draw(lua_State *L) cocos2d::CustomCommand::PrimitiveType arg5 = (cocos2d::CustomCommand::PrimitiveType)0; /** primitive */ cocos2d::CustomCommand::IndexFormat arg6 = (cocos2d::CustomCommand::IndexFormat)0; /** indexFormat */ unsigned int arg7 = 0; /** indexCount */ - cocos2d::Mat4 arg8; /** modelView */ + cocos2d::Mat4 *arg8; /** modelView */ olua_to_object(L, 1, &self, "cc.Material"); olua_check_object(L, 2, &arg1, "cc.MeshCommand"); @@ -14209,14 +15410,14 @@ static int _cocos2d_Material_draw(lua_State *L) olua_check_object(L, 9, &arg8, "cc.Mat4"); // void draw(cocos2d::MeshCommand *meshCommand, float globalZOrder, cocos2d::backend::Buffer *vertexBuffer, cocos2d::backend::Buffer *indexBuffer, cocos2d::CustomCommand::PrimitiveType primitive, cocos2d::CustomCommand::IndexFormat indexFormat, unsigned int indexCount, const cocos2d::Mat4 &modelView) - self->draw(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8); + self->draw(arg1, arg2, arg3, arg4, arg5, arg6, arg7, *arg8); olua_endinvoke(L); return 0; } -static int _cocos2d_Material_getName(lua_State *L) +static int _olua_fun_cocos2d_Material_getName(lua_State *L) { olua_startinvoke(L); @@ -14233,7 +15434,7 @@ static int _cocos2d_Material_getName(lua_State *L) return num_ret; } -static int _cocos2d_Material_getRenderState(lua_State *L) +static int _olua_fun_cocos2d_Material_getRenderState(lua_State *L) { olua_startinvoke(L); @@ -14250,7 +15451,7 @@ static int _cocos2d_Material_getRenderState(lua_State *L) return num_ret; } -static int _cocos2d_Material_getTechnique(lua_State *L) +static int _olua_fun_cocos2d_Material_getTechnique(lua_State *L) { olua_startinvoke(L); @@ -14267,7 +15468,7 @@ static int _cocos2d_Material_getTechnique(lua_State *L) return num_ret; } -static int _cocos2d_Material_getTechniqueByIndex(lua_State *L) +static int _olua_fun_cocos2d_Material_getTechniqueByIndex(lua_State *L) { olua_startinvoke(L); @@ -14286,7 +15487,7 @@ static int _cocos2d_Material_getTechniqueByIndex(lua_State *L) return num_ret; } -static int _cocos2d_Material_getTechniqueByName(lua_State *L) +static int _olua_fun_cocos2d_Material_getTechniqueByName(lua_State *L) { olua_startinvoke(L); @@ -14305,7 +15506,7 @@ static int _cocos2d_Material_getTechniqueByName(lua_State *L) return num_ret; } -static int _cocos2d_Material_getTechniqueCount(lua_State *L) +static int _olua_fun_cocos2d_Material_getTechniqueCount(lua_State *L) { olua_startinvoke(L); @@ -14322,7 +15523,7 @@ static int _cocos2d_Material_getTechniqueCount(lua_State *L) return num_ret; } -static int _cocos2d_Material_getTechniques(lua_State *L) +static int _olua_fun_cocos2d_Material_getTechniques(lua_State *L) { olua_startinvoke(L); @@ -14341,7 +15542,7 @@ static int _cocos2d_Material_getTechniques(lua_State *L) return num_ret; } -static int _cocos2d_Material_setName(lua_State *L) +static int _olua_fun_cocos2d_Material_setName(lua_State *L) { olua_startinvoke(L); @@ -14359,7 +15560,7 @@ static int _cocos2d_Material_setName(lua_State *L) return 0; } -static int _cocos2d_Material_setTechnique(lua_State *L) +static int _olua_fun_cocos2d_Material_setTechnique(lua_State *L) { olua_startinvoke(L); @@ -14377,36 +15578,45 @@ static int _cocos2d_Material_setTechnique(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_Material(lua_State *L) +static int _olua_cls_cc_Material(lua_State *L) { oluacls_class(L, "cc.Material"); - oluacls_func(L, "addTechnique", _cocos2d_Material_addTechnique); - oluacls_func(L, "clone", _cocos2d_Material_clone); - oluacls_func(L, "createWithFilename", _cocos2d_Material_createWithFilename); - oluacls_func(L, "createWithProgramState", _cocos2d_Material_createWithProgramState); - oluacls_func(L, "createWithProperties", _cocos2d_Material_createWithProperties); - oluacls_func(L, "draw", _cocos2d_Material_draw); - oluacls_func(L, "getName", _cocos2d_Material_getName); - oluacls_func(L, "getRenderState", _cocos2d_Material_getRenderState); - oluacls_func(L, "getTechnique", _cocos2d_Material_getTechnique); - oluacls_func(L, "getTechniqueByIndex", _cocos2d_Material_getTechniqueByIndex); - oluacls_func(L, "getTechniqueByName", _cocos2d_Material_getTechniqueByName); - oluacls_func(L, "getTechniqueCount", _cocos2d_Material_getTechniqueCount); - oluacls_func(L, "getTechniques", _cocos2d_Material_getTechniques); - oluacls_func(L, "setName", _cocos2d_Material_setName); - oluacls_func(L, "setTechnique", _cocos2d_Material_setTechnique); - oluacls_prop(L, "name", _cocos2d_Material_getName, _cocos2d_Material_setName); - oluacls_prop(L, "renderState", _cocos2d_Material_getRenderState, nullptr); - oluacls_prop(L, "technique", _cocos2d_Material_getTechnique, _cocos2d_Material_setTechnique); - oluacls_prop(L, "techniqueCount", _cocos2d_Material_getTechniqueCount, nullptr); - oluacls_prop(L, "techniques", _cocos2d_Material_getTechniques, nullptr); + oluacls_func(L, "addTechnique", _olua_fun_cocos2d_Material_addTechnique); + oluacls_func(L, "clone", _olua_fun_cocos2d_Material_clone); + oluacls_func(L, "createWithFilename", _olua_fun_cocos2d_Material_createWithFilename); + oluacls_func(L, "createWithProgramState", _olua_fun_cocos2d_Material_createWithProgramState); + oluacls_func(L, "createWithProperties", _olua_fun_cocos2d_Material_createWithProperties); + oluacls_func(L, "draw", _olua_fun_cocos2d_Material_draw); + oluacls_func(L, "getName", _olua_fun_cocos2d_Material_getName); + oluacls_func(L, "getRenderState", _olua_fun_cocos2d_Material_getRenderState); + oluacls_func(L, "getTechnique", _olua_fun_cocos2d_Material_getTechnique); + oluacls_func(L, "getTechniqueByIndex", _olua_fun_cocos2d_Material_getTechniqueByIndex); + oluacls_func(L, "getTechniqueByName", _olua_fun_cocos2d_Material_getTechniqueByName); + oluacls_func(L, "getTechniqueCount", _olua_fun_cocos2d_Material_getTechniqueCount); + oluacls_func(L, "getTechniques", _olua_fun_cocos2d_Material_getTechniques); + oluacls_func(L, "setName", _olua_fun_cocos2d_Material_setName); + oluacls_func(L, "setTechnique", _olua_fun_cocos2d_Material_setTechnique); + oluacls_prop(L, "name", _olua_fun_cocos2d_Material_getName, _olua_fun_cocos2d_Material_setName); + oluacls_prop(L, "renderState", _olua_fun_cocos2d_Material_getRenderState, nullptr); + oluacls_prop(L, "technique", _olua_fun_cocos2d_Material_getTechnique, _olua_fun_cocos2d_Material_setTechnique); + oluacls_prop(L, "techniqueCount", _olua_fun_cocos2d_Material_getTechniqueCount, nullptr); + oluacls_prop(L, "techniques", _olua_fun_cocos2d_Material_getTechniques, nullptr); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_Material(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.Material")) { + luaL_error(L, "class not found: cocos2d::Material"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_Renderer___gc(lua_State *L) +static int _olua_fun_cocos2d_Renderer___gc(lua_State *L) { olua_startinvoke(L); @@ -14418,7 +15628,7 @@ static int _cocos2d_Renderer___gc(lua_State *L) return 0; } -static int _cocos2d_Renderer___olua_move(lua_State *L) +static int _olua_fun_cocos2d_Renderer___olua_move(lua_State *L) { olua_startinvoke(L); @@ -14430,7 +15640,7 @@ static int _cocos2d_Renderer___olua_move(lua_State *L) return 1; } -static int _cocos2d_Renderer_addCommand$1(lua_State *L) +static int _olua_fun_cocos2d_Renderer_addCommand$1(lua_State *L) { olua_startinvoke(L); @@ -14448,7 +15658,7 @@ static int _cocos2d_Renderer_addCommand$1(lua_State *L) return 0; } -static int _cocos2d_Renderer_addCommand$2(lua_State *L) +static int _olua_fun_cocos2d_Renderer_addCommand$2(lua_State *L) { olua_startinvoke(L); @@ -14468,21 +15678,21 @@ static int _cocos2d_Renderer_addCommand$2(lua_State *L) return 0; } -static int _cocos2d_Renderer_addCommand(lua_State *L) +static int _olua_fun_cocos2d_Renderer_addCommand(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_object(L, 2, "cc.RenderCommand"))) { // void addCommand(cocos2d::RenderCommand *command) - return _cocos2d_Renderer_addCommand$1(L); + return _olua_fun_cocos2d_Renderer_addCommand$1(L); // } } if (num_args == 2) { // if ((olua_is_object(L, 2, "cc.RenderCommand")) && (olua_is_integer(L, 3))) { // void addCommand(cocos2d::RenderCommand *command, int renderQueueID) - return _cocos2d_Renderer_addCommand$2(L); + return _olua_fun_cocos2d_Renderer_addCommand$2(L); // } } @@ -14491,7 +15701,7 @@ static int _cocos2d_Renderer_addCommand(lua_State *L) return 0; } -static int _cocos2d_Renderer_addDrawnBatches(lua_State *L) +static int _olua_fun_cocos2d_Renderer_addDrawnBatches(lua_State *L) { olua_startinvoke(L); @@ -14509,7 +15719,7 @@ static int _cocos2d_Renderer_addDrawnBatches(lua_State *L) return 0; } -static int _cocos2d_Renderer_addDrawnVertices(lua_State *L) +static int _olua_fun_cocos2d_Renderer_addDrawnVertices(lua_State *L) { olua_startinvoke(L); @@ -14527,20 +15737,20 @@ static int _cocos2d_Renderer_addDrawnVertices(lua_State *L) return 0; } -static int _cocos2d_Renderer_checkVisibility(lua_State *L) +static int _olua_fun_cocos2d_Renderer_checkVisibility(lua_State *L) { olua_startinvoke(L); cocos2d::Renderer *self = nullptr; - cocos2d::Mat4 arg1; /** transform */ - cocos2d::Size arg2; /** size */ + cocos2d::Mat4 *arg1; /** transform */ + cocos2d::Size *arg2; /** size */ olua_to_object(L, 1, &self, "cc.Renderer"); olua_check_object(L, 2, &arg1, "cc.Mat4"); olua_check_object(L, 3, &arg2, "cc.Size"); // bool checkVisibility(const cocos2d::Mat4 &transform, const cocos2d::Size &size) - bool ret = self->checkVisibility(arg1, arg2); + bool ret = self->checkVisibility(*arg1, *arg2); int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); @@ -14548,7 +15758,7 @@ static int _cocos2d_Renderer_checkVisibility(lua_State *L) return num_ret; } -static int _cocos2d_Renderer_clean(lua_State *L) +static int _olua_fun_cocos2d_Renderer_clean(lua_State *L) { olua_startinvoke(L); @@ -14564,7 +15774,7 @@ static int _cocos2d_Renderer_clean(lua_State *L) return 0; } -static int _cocos2d_Renderer_clear(lua_State *L) +static int _olua_fun_cocos2d_Renderer_clear(lua_State *L) { olua_startinvoke(L); @@ -14590,7 +15800,7 @@ static int _cocos2d_Renderer_clear(lua_State *L) return 0; } -static int _cocos2d_Renderer_clearDrawStats(lua_State *L) +static int _olua_fun_cocos2d_Renderer_clearDrawStats(lua_State *L) { olua_startinvoke(L); @@ -14606,7 +15816,7 @@ static int _cocos2d_Renderer_clearDrawStats(lua_State *L) return 0; } -static int _cocos2d_Renderer_createRenderQueue(lua_State *L) +static int _olua_fun_cocos2d_Renderer_createRenderQueue(lua_State *L) { olua_startinvoke(L); @@ -14623,7 +15833,7 @@ static int _cocos2d_Renderer_createRenderQueue(lua_State *L) return num_ret; } -static int _cocos2d_Renderer_drawCommand(lua_State *L) +static int _olua_fun_cocos2d_Renderer_drawCommand(lua_State *L) { olua_startinvoke(L); @@ -14641,7 +15851,7 @@ static int _cocos2d_Renderer_drawCommand(lua_State *L) return 0; } -static int _cocos2d_Renderer_getClearColor(lua_State *L) +static int _olua_fun_cocos2d_Renderer_getClearColor(lua_State *L) { olua_startinvoke(L); @@ -14658,7 +15868,7 @@ static int _cocos2d_Renderer_getClearColor(lua_State *L) return num_ret; } -static int _cocos2d_Renderer_getClearDepth(lua_State *L) +static int _olua_fun_cocos2d_Renderer_getClearDepth(lua_State *L) { olua_startinvoke(L); @@ -14675,7 +15885,7 @@ static int _cocos2d_Renderer_getClearDepth(lua_State *L) return num_ret; } -static int _cocos2d_Renderer_getClearFlag(lua_State *L) +static int _olua_fun_cocos2d_Renderer_getClearFlag(lua_State *L) { olua_startinvoke(L); @@ -14692,7 +15902,7 @@ static int _cocos2d_Renderer_getClearFlag(lua_State *L) return num_ret; } -static int _cocos2d_Renderer_getClearStencil(lua_State *L) +static int _olua_fun_cocos2d_Renderer_getClearStencil(lua_State *L) { olua_startinvoke(L); @@ -14709,7 +15919,7 @@ static int _cocos2d_Renderer_getClearStencil(lua_State *L) return num_ret; } -static int _cocos2d_Renderer_getColorAttachment(lua_State *L) +static int _olua_fun_cocos2d_Renderer_getColorAttachment(lua_State *L) { olua_startinvoke(L); @@ -14726,7 +15936,7 @@ static int _cocos2d_Renderer_getColorAttachment(lua_State *L) return num_ret; } -static int _cocos2d_Renderer_getCullMode(lua_State *L) +static int _olua_fun_cocos2d_Renderer_getCullMode(lua_State *L) { olua_startinvoke(L); @@ -14743,7 +15953,7 @@ static int _cocos2d_Renderer_getCullMode(lua_State *L) return num_ret; } -static int _cocos2d_Renderer_getDepthAttachment(lua_State *L) +static int _olua_fun_cocos2d_Renderer_getDepthAttachment(lua_State *L) { olua_startinvoke(L); @@ -14760,7 +15970,7 @@ static int _cocos2d_Renderer_getDepthAttachment(lua_State *L) return num_ret; } -static int _cocos2d_Renderer_getDepthCompareFunction(lua_State *L) +static int _olua_fun_cocos2d_Renderer_getDepthCompareFunction(lua_State *L) { olua_startinvoke(L); @@ -14777,7 +15987,7 @@ static int _cocos2d_Renderer_getDepthCompareFunction(lua_State *L) return num_ret; } -static int _cocos2d_Renderer_getDepthTest(lua_State *L) +static int _olua_fun_cocos2d_Renderer_getDepthTest(lua_State *L) { olua_startinvoke(L); @@ -14794,7 +16004,7 @@ static int _cocos2d_Renderer_getDepthTest(lua_State *L) return num_ret; } -static int _cocos2d_Renderer_getDepthWrite(lua_State *L) +static int _olua_fun_cocos2d_Renderer_getDepthWrite(lua_State *L) { olua_startinvoke(L); @@ -14811,7 +16021,7 @@ static int _cocos2d_Renderer_getDepthWrite(lua_State *L) return num_ret; } -static int _cocos2d_Renderer_getDrawnBatches(lua_State *L) +static int _olua_fun_cocos2d_Renderer_getDrawnBatches(lua_State *L) { olua_startinvoke(L); @@ -14828,7 +16038,7 @@ static int _cocos2d_Renderer_getDrawnBatches(lua_State *L) return num_ret; } -static int _cocos2d_Renderer_getDrawnVertices(lua_State *L) +static int _olua_fun_cocos2d_Renderer_getDrawnVertices(lua_State *L) { olua_startinvoke(L); @@ -14845,7 +16055,7 @@ static int _cocos2d_Renderer_getDrawnVertices(lua_State *L) return num_ret; } -static int _cocos2d_Renderer_getRenderTargetFlag(lua_State *L) +static int _olua_fun_cocos2d_Renderer_getRenderTargetFlag(lua_State *L) { olua_startinvoke(L); @@ -14862,7 +16072,7 @@ static int _cocos2d_Renderer_getRenderTargetFlag(lua_State *L) return num_ret; } -static int _cocos2d_Renderer_getScissorRect(lua_State *L) +static int _olua_fun_cocos2d_Renderer_getScissorRect(lua_State *L) { olua_startinvoke(L); @@ -14879,7 +16089,7 @@ static int _cocos2d_Renderer_getScissorRect(lua_State *L) return num_ret; } -static int _cocos2d_Renderer_getScissorTest(lua_State *L) +static int _olua_fun_cocos2d_Renderer_getScissorTest(lua_State *L) { olua_startinvoke(L); @@ -14896,7 +16106,7 @@ static int _cocos2d_Renderer_getScissorTest(lua_State *L) return num_ret; } -static int _cocos2d_Renderer_getStencilAttachment(lua_State *L) +static int _olua_fun_cocos2d_Renderer_getStencilAttachment(lua_State *L) { olua_startinvoke(L); @@ -14913,7 +16123,7 @@ static int _cocos2d_Renderer_getStencilAttachment(lua_State *L) return num_ret; } -static int _cocos2d_Renderer_getStencilCompareFunction(lua_State *L) +static int _olua_fun_cocos2d_Renderer_getStencilCompareFunction(lua_State *L) { olua_startinvoke(L); @@ -14930,7 +16140,7 @@ static int _cocos2d_Renderer_getStencilCompareFunction(lua_State *L) return num_ret; } -static int _cocos2d_Renderer_getStencilDepthPassOperation(lua_State *L) +static int _olua_fun_cocos2d_Renderer_getStencilDepthPassOperation(lua_State *L) { olua_startinvoke(L); @@ -14947,7 +16157,7 @@ static int _cocos2d_Renderer_getStencilDepthPassOperation(lua_State *L) return num_ret; } -static int _cocos2d_Renderer_getStencilFailureOperation(lua_State *L) +static int _olua_fun_cocos2d_Renderer_getStencilFailureOperation(lua_State *L) { olua_startinvoke(L); @@ -14964,7 +16174,7 @@ static int _cocos2d_Renderer_getStencilFailureOperation(lua_State *L) return num_ret; } -static int _cocos2d_Renderer_getStencilPassDepthFailureOperation(lua_State *L) +static int _olua_fun_cocos2d_Renderer_getStencilPassDepthFailureOperation(lua_State *L) { olua_startinvoke(L); @@ -14981,7 +16191,7 @@ static int _cocos2d_Renderer_getStencilPassDepthFailureOperation(lua_State *L) return num_ret; } -static int _cocos2d_Renderer_getStencilReadMask(lua_State *L) +static int _olua_fun_cocos2d_Renderer_getStencilReadMask(lua_State *L) { olua_startinvoke(L); @@ -14998,7 +16208,7 @@ static int _cocos2d_Renderer_getStencilReadMask(lua_State *L) return num_ret; } -static int _cocos2d_Renderer_getStencilReferenceValue(lua_State *L) +static int _olua_fun_cocos2d_Renderer_getStencilReferenceValue(lua_State *L) { olua_startinvoke(L); @@ -15015,7 +16225,7 @@ static int _cocos2d_Renderer_getStencilReferenceValue(lua_State *L) return num_ret; } -static int _cocos2d_Renderer_getStencilTest(lua_State *L) +static int _olua_fun_cocos2d_Renderer_getStencilTest(lua_State *L) { olua_startinvoke(L); @@ -15032,7 +16242,7 @@ static int _cocos2d_Renderer_getStencilTest(lua_State *L) return num_ret; } -static int _cocos2d_Renderer_getStencilWriteMask(lua_State *L) +static int _olua_fun_cocos2d_Renderer_getStencilWriteMask(lua_State *L) { olua_startinvoke(L); @@ -15049,7 +16259,7 @@ static int _cocos2d_Renderer_getStencilWriteMask(lua_State *L) return num_ret; } -static int _cocos2d_Renderer_getViewport(lua_State *L) +static int _olua_fun_cocos2d_Renderer_getViewport(lua_State *L) { olua_startinvoke(L); @@ -15066,7 +16276,7 @@ static int _cocos2d_Renderer_getViewport(lua_State *L) return num_ret; } -static int _cocos2d_Renderer_getWinding(lua_State *L) +static int _olua_fun_cocos2d_Renderer_getWinding(lua_State *L) { olua_startinvoke(L); @@ -15083,7 +16293,7 @@ static int _cocos2d_Renderer_getWinding(lua_State *L) return num_ret; } -static int _cocos2d_Renderer_init(lua_State *L) +static int _olua_fun_cocos2d_Renderer_init(lua_State *L) { olua_startinvoke(L); @@ -15099,11 +16309,11 @@ static int _cocos2d_Renderer_init(lua_State *L) return 0; } -static int _cocos2d_Renderer_new(lua_State *L) +static int _olua_fun_cocos2d_Renderer_new(lua_State *L) { olua_startinvoke(L); - // Renderer() + // cocos2d::Renderer() cocos2d::Renderer *ret = new cocos2d::Renderer(); int num_ret = olua_push_object(L, ret, "cc.Renderer"); olua_postnew(L, ret); @@ -15113,7 +16323,7 @@ static int _cocos2d_Renderer_new(lua_State *L) return num_ret; } -static int _cocos2d_Renderer_popGroup(lua_State *L) +static int _olua_fun_cocos2d_Renderer_popGroup(lua_State *L) { olua_startinvoke(L); @@ -15129,7 +16339,7 @@ static int _cocos2d_Renderer_popGroup(lua_State *L) return 0; } -static int _cocos2d_Renderer_pushGroup(lua_State *L) +static int _olua_fun_cocos2d_Renderer_pushGroup(lua_State *L) { olua_startinvoke(L); @@ -15147,7 +16357,7 @@ static int _cocos2d_Renderer_pushGroup(lua_State *L) return 0; } -static int _cocos2d_Renderer_render(lua_State *L) +static int _olua_fun_cocos2d_Renderer_render(lua_State *L) { olua_startinvoke(L); @@ -15163,7 +16373,7 @@ static int _cocos2d_Renderer_render(lua_State *L) return 0; } -static int _cocos2d_Renderer_setCullMode(lua_State *L) +static int _olua_fun_cocos2d_Renderer_setCullMode(lua_State *L) { olua_startinvoke(L); @@ -15181,7 +16391,7 @@ static int _cocos2d_Renderer_setCullMode(lua_State *L) return 0; } -static int _cocos2d_Renderer_setDepthCompareFunction(lua_State *L) +static int _olua_fun_cocos2d_Renderer_setDepthCompareFunction(lua_State *L) { olua_startinvoke(L); @@ -15199,7 +16409,7 @@ static int _cocos2d_Renderer_setDepthCompareFunction(lua_State *L) return 0; } -static int _cocos2d_Renderer_setDepthTest(lua_State *L) +static int _olua_fun_cocos2d_Renderer_setDepthTest(lua_State *L) { olua_startinvoke(L); @@ -15217,7 +16427,7 @@ static int _cocos2d_Renderer_setDepthTest(lua_State *L) return 0; } -static int _cocos2d_Renderer_setDepthWrite(lua_State *L) +static int _olua_fun_cocos2d_Renderer_setDepthWrite(lua_State *L) { olua_startinvoke(L); @@ -15235,7 +16445,7 @@ static int _cocos2d_Renderer_setDepthWrite(lua_State *L) return 0; } -static int _cocos2d_Renderer_setRenderTarget(lua_State *L) +static int _olua_fun_cocos2d_Renderer_setRenderTarget(lua_State *L) { olua_startinvoke(L); @@ -15259,7 +16469,7 @@ static int _cocos2d_Renderer_setRenderTarget(lua_State *L) return 0; } -static int _cocos2d_Renderer_setScissorRect(lua_State *L) +static int _olua_fun_cocos2d_Renderer_setScissorRect(lua_State *L) { olua_startinvoke(L); @@ -15283,7 +16493,7 @@ static int _cocos2d_Renderer_setScissorRect(lua_State *L) return 0; } -static int _cocos2d_Renderer_setScissorTest(lua_State *L) +static int _olua_fun_cocos2d_Renderer_setScissorTest(lua_State *L) { olua_startinvoke(L); @@ -15301,7 +16511,7 @@ static int _cocos2d_Renderer_setScissorTest(lua_State *L) return 0; } -static int _cocos2d_Renderer_setStencilCompareFunction(lua_State *L) +static int _olua_fun_cocos2d_Renderer_setStencilCompareFunction(lua_State *L) { olua_startinvoke(L); @@ -15323,7 +16533,7 @@ static int _cocos2d_Renderer_setStencilCompareFunction(lua_State *L) return 0; } -static int _cocos2d_Renderer_setStencilOperation(lua_State *L) +static int _olua_fun_cocos2d_Renderer_setStencilOperation(lua_State *L) { olua_startinvoke(L); @@ -15345,7 +16555,7 @@ static int _cocos2d_Renderer_setStencilOperation(lua_State *L) return 0; } -static int _cocos2d_Renderer_setStencilTest(lua_State *L) +static int _olua_fun_cocos2d_Renderer_setStencilTest(lua_State *L) { olua_startinvoke(L); @@ -15363,7 +16573,7 @@ static int _cocos2d_Renderer_setStencilTest(lua_State *L) return 0; } -static int _cocos2d_Renderer_setStencilWriteMask(lua_State *L) +static int _olua_fun_cocos2d_Renderer_setStencilWriteMask(lua_State *L) { olua_startinvoke(L); @@ -15381,7 +16591,7 @@ static int _cocos2d_Renderer_setStencilWriteMask(lua_State *L) return 0; } -static int _cocos2d_Renderer_setViewPort(lua_State *L) +static int _olua_fun_cocos2d_Renderer_setViewPort(lua_State *L) { olua_startinvoke(L); @@ -15405,7 +16615,7 @@ static int _cocos2d_Renderer_setViewPort(lua_State *L) return 0; } -static int _cocos2d_Renderer_setWinding(lua_State *L) +static int _olua_fun_cocos2d_Renderer_setWinding(lua_State *L) { olua_startinvoke(L); @@ -15423,88 +16633,87 @@ static int _cocos2d_Renderer_setWinding(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_Renderer(lua_State *L) +static int _olua_cls_cc_Renderer(lua_State *L) { oluacls_class(L, "cc.Renderer"); - oluacls_func(L, "__gc", _cocos2d_Renderer___gc); - oluacls_func(L, "__olua_move", _cocos2d_Renderer___olua_move); - oluacls_func(L, "addCommand", _cocos2d_Renderer_addCommand); - oluacls_func(L, "addDrawnBatches", _cocos2d_Renderer_addDrawnBatches); - oluacls_func(L, "addDrawnVertices", _cocos2d_Renderer_addDrawnVertices); - oluacls_func(L, "checkVisibility", _cocos2d_Renderer_checkVisibility); - oluacls_func(L, "clean", _cocos2d_Renderer_clean); - oluacls_func(L, "clear", _cocos2d_Renderer_clear); - oluacls_func(L, "clearDrawStats", _cocos2d_Renderer_clearDrawStats); - oluacls_func(L, "createRenderQueue", _cocos2d_Renderer_createRenderQueue); - oluacls_func(L, "drawCommand", _cocos2d_Renderer_drawCommand); - oluacls_func(L, "getClearColor", _cocos2d_Renderer_getClearColor); - oluacls_func(L, "getClearDepth", _cocos2d_Renderer_getClearDepth); - oluacls_func(L, "getClearFlag", _cocos2d_Renderer_getClearFlag); - oluacls_func(L, "getClearStencil", _cocos2d_Renderer_getClearStencil); - oluacls_func(L, "getColorAttachment", _cocos2d_Renderer_getColorAttachment); - oluacls_func(L, "getCullMode", _cocos2d_Renderer_getCullMode); - oluacls_func(L, "getDepthAttachment", _cocos2d_Renderer_getDepthAttachment); - oluacls_func(L, "getDepthCompareFunction", _cocos2d_Renderer_getDepthCompareFunction); - oluacls_func(L, "getDepthTest", _cocos2d_Renderer_getDepthTest); - oluacls_func(L, "getDepthWrite", _cocos2d_Renderer_getDepthWrite); - oluacls_func(L, "getDrawnBatches", _cocos2d_Renderer_getDrawnBatches); - oluacls_func(L, "getDrawnVertices", _cocos2d_Renderer_getDrawnVertices); - oluacls_func(L, "getRenderTargetFlag", _cocos2d_Renderer_getRenderTargetFlag); - oluacls_func(L, "getScissorRect", _cocos2d_Renderer_getScissorRect); - oluacls_func(L, "getScissorTest", _cocos2d_Renderer_getScissorTest); - oluacls_func(L, "getStencilAttachment", _cocos2d_Renderer_getStencilAttachment); - oluacls_func(L, "getStencilCompareFunction", _cocos2d_Renderer_getStencilCompareFunction); - oluacls_func(L, "getStencilDepthPassOperation", _cocos2d_Renderer_getStencilDepthPassOperation); - oluacls_func(L, "getStencilFailureOperation", _cocos2d_Renderer_getStencilFailureOperation); - oluacls_func(L, "getStencilPassDepthFailureOperation", _cocos2d_Renderer_getStencilPassDepthFailureOperation); - oluacls_func(L, "getStencilReadMask", _cocos2d_Renderer_getStencilReadMask); - oluacls_func(L, "getStencilReferenceValue", _cocos2d_Renderer_getStencilReferenceValue); - oluacls_func(L, "getStencilTest", _cocos2d_Renderer_getStencilTest); - oluacls_func(L, "getStencilWriteMask", _cocos2d_Renderer_getStencilWriteMask); - oluacls_func(L, "getViewport", _cocos2d_Renderer_getViewport); - oluacls_func(L, "getWinding", _cocos2d_Renderer_getWinding); - oluacls_func(L, "init", _cocos2d_Renderer_init); - oluacls_func(L, "new", _cocos2d_Renderer_new); - oluacls_func(L, "popGroup", _cocos2d_Renderer_popGroup); - oluacls_func(L, "pushGroup", _cocos2d_Renderer_pushGroup); - oluacls_func(L, "render", _cocos2d_Renderer_render); - oluacls_func(L, "setCullMode", _cocos2d_Renderer_setCullMode); - oluacls_func(L, "setDepthCompareFunction", _cocos2d_Renderer_setDepthCompareFunction); - oluacls_func(L, "setDepthTest", _cocos2d_Renderer_setDepthTest); - oluacls_func(L, "setDepthWrite", _cocos2d_Renderer_setDepthWrite); - oluacls_func(L, "setRenderTarget", _cocos2d_Renderer_setRenderTarget); - oluacls_func(L, "setScissorRect", _cocos2d_Renderer_setScissorRect); - oluacls_func(L, "setScissorTest", _cocos2d_Renderer_setScissorTest); - oluacls_func(L, "setStencilCompareFunction", _cocos2d_Renderer_setStencilCompareFunction); - oluacls_func(L, "setStencilOperation", _cocos2d_Renderer_setStencilOperation); - oluacls_func(L, "setStencilTest", _cocos2d_Renderer_setStencilTest); - oluacls_func(L, "setStencilWriteMask", _cocos2d_Renderer_setStencilWriteMask); - oluacls_func(L, "setViewPort", _cocos2d_Renderer_setViewPort); - oluacls_func(L, "setWinding", _cocos2d_Renderer_setWinding); - oluacls_prop(L, "clearColor", _cocos2d_Renderer_getClearColor, nullptr); - oluacls_prop(L, "clearDepth", _cocos2d_Renderer_getClearDepth, nullptr); - oluacls_prop(L, "clearFlag", _cocos2d_Renderer_getClearFlag, nullptr); - oluacls_prop(L, "clearStencil", _cocos2d_Renderer_getClearStencil, nullptr); - oluacls_prop(L, "colorAttachment", _cocos2d_Renderer_getColorAttachment, nullptr); - oluacls_prop(L, "cullMode", _cocos2d_Renderer_getCullMode, _cocos2d_Renderer_setCullMode); - oluacls_prop(L, "depthAttachment", _cocos2d_Renderer_getDepthAttachment, nullptr); - oluacls_prop(L, "depthCompareFunction", _cocos2d_Renderer_getDepthCompareFunction, _cocos2d_Renderer_setDepthCompareFunction); - oluacls_prop(L, "depthTest", _cocos2d_Renderer_getDepthTest, _cocos2d_Renderer_setDepthTest); - oluacls_prop(L, "depthWrite", _cocos2d_Renderer_getDepthWrite, _cocos2d_Renderer_setDepthWrite); - oluacls_prop(L, "drawnBatches", _cocos2d_Renderer_getDrawnBatches, nullptr); - oluacls_prop(L, "drawnVertices", _cocos2d_Renderer_getDrawnVertices, nullptr); - oluacls_prop(L, "renderTargetFlag", _cocos2d_Renderer_getRenderTargetFlag, nullptr); - oluacls_prop(L, "scissorTest", _cocos2d_Renderer_getScissorTest, _cocos2d_Renderer_setScissorTest); - oluacls_prop(L, "stencilAttachment", _cocos2d_Renderer_getStencilAttachment, nullptr); - oluacls_prop(L, "stencilDepthPassOperation", _cocos2d_Renderer_getStencilDepthPassOperation, nullptr); - oluacls_prop(L, "stencilFailureOperation", _cocos2d_Renderer_getStencilFailureOperation, nullptr); - oluacls_prop(L, "stencilPassDepthFailureOperation", _cocos2d_Renderer_getStencilPassDepthFailureOperation, nullptr); - oluacls_prop(L, "stencilReadMask", _cocos2d_Renderer_getStencilReadMask, nullptr); - oluacls_prop(L, "stencilReferenceValue", _cocos2d_Renderer_getStencilReferenceValue, nullptr); - oluacls_prop(L, "stencilTest", _cocos2d_Renderer_getStencilTest, _cocos2d_Renderer_setStencilTest); - oluacls_prop(L, "stencilWriteMask", _cocos2d_Renderer_getStencilWriteMask, _cocos2d_Renderer_setStencilWriteMask); - oluacls_prop(L, "winding", _cocos2d_Renderer_getWinding, _cocos2d_Renderer_setWinding); + oluacls_func(L, "__gc", _olua_fun_cocos2d_Renderer___gc); + oluacls_func(L, "__olua_move", _olua_fun_cocos2d_Renderer___olua_move); + oluacls_func(L, "addCommand", _olua_fun_cocos2d_Renderer_addCommand); + oluacls_func(L, "addDrawnBatches", _olua_fun_cocos2d_Renderer_addDrawnBatches); + oluacls_func(L, "addDrawnVertices", _olua_fun_cocos2d_Renderer_addDrawnVertices); + oluacls_func(L, "checkVisibility", _olua_fun_cocos2d_Renderer_checkVisibility); + oluacls_func(L, "clean", _olua_fun_cocos2d_Renderer_clean); + oluacls_func(L, "clear", _olua_fun_cocos2d_Renderer_clear); + oluacls_func(L, "clearDrawStats", _olua_fun_cocos2d_Renderer_clearDrawStats); + oluacls_func(L, "createRenderQueue", _olua_fun_cocos2d_Renderer_createRenderQueue); + oluacls_func(L, "drawCommand", _olua_fun_cocos2d_Renderer_drawCommand); + oluacls_func(L, "getClearColor", _olua_fun_cocos2d_Renderer_getClearColor); + oluacls_func(L, "getClearDepth", _olua_fun_cocos2d_Renderer_getClearDepth); + oluacls_func(L, "getClearFlag", _olua_fun_cocos2d_Renderer_getClearFlag); + oluacls_func(L, "getClearStencil", _olua_fun_cocos2d_Renderer_getClearStencil); + oluacls_func(L, "getColorAttachment", _olua_fun_cocos2d_Renderer_getColorAttachment); + oluacls_func(L, "getCullMode", _olua_fun_cocos2d_Renderer_getCullMode); + oluacls_func(L, "getDepthAttachment", _olua_fun_cocos2d_Renderer_getDepthAttachment); + oluacls_func(L, "getDepthCompareFunction", _olua_fun_cocos2d_Renderer_getDepthCompareFunction); + oluacls_func(L, "getDepthTest", _olua_fun_cocos2d_Renderer_getDepthTest); + oluacls_func(L, "getDepthWrite", _olua_fun_cocos2d_Renderer_getDepthWrite); + oluacls_func(L, "getDrawnBatches", _olua_fun_cocos2d_Renderer_getDrawnBatches); + oluacls_func(L, "getDrawnVertices", _olua_fun_cocos2d_Renderer_getDrawnVertices); + oluacls_func(L, "getRenderTargetFlag", _olua_fun_cocos2d_Renderer_getRenderTargetFlag); + oluacls_func(L, "getScissorRect", _olua_fun_cocos2d_Renderer_getScissorRect); + oluacls_func(L, "getScissorTest", _olua_fun_cocos2d_Renderer_getScissorTest); + oluacls_func(L, "getStencilAttachment", _olua_fun_cocos2d_Renderer_getStencilAttachment); + oluacls_func(L, "getStencilCompareFunction", _olua_fun_cocos2d_Renderer_getStencilCompareFunction); + oluacls_func(L, "getStencilDepthPassOperation", _olua_fun_cocos2d_Renderer_getStencilDepthPassOperation); + oluacls_func(L, "getStencilFailureOperation", _olua_fun_cocos2d_Renderer_getStencilFailureOperation); + oluacls_func(L, "getStencilPassDepthFailureOperation", _olua_fun_cocos2d_Renderer_getStencilPassDepthFailureOperation); + oluacls_func(L, "getStencilReadMask", _olua_fun_cocos2d_Renderer_getStencilReadMask); + oluacls_func(L, "getStencilReferenceValue", _olua_fun_cocos2d_Renderer_getStencilReferenceValue); + oluacls_func(L, "getStencilTest", _olua_fun_cocos2d_Renderer_getStencilTest); + oluacls_func(L, "getStencilWriteMask", _olua_fun_cocos2d_Renderer_getStencilWriteMask); + oluacls_func(L, "getViewport", _olua_fun_cocos2d_Renderer_getViewport); + oluacls_func(L, "getWinding", _olua_fun_cocos2d_Renderer_getWinding); + oluacls_func(L, "init", _olua_fun_cocos2d_Renderer_init); + oluacls_func(L, "new", _olua_fun_cocos2d_Renderer_new); + oluacls_func(L, "popGroup", _olua_fun_cocos2d_Renderer_popGroup); + oluacls_func(L, "pushGroup", _olua_fun_cocos2d_Renderer_pushGroup); + oluacls_func(L, "render", _olua_fun_cocos2d_Renderer_render); + oluacls_func(L, "setCullMode", _olua_fun_cocos2d_Renderer_setCullMode); + oluacls_func(L, "setDepthCompareFunction", _olua_fun_cocos2d_Renderer_setDepthCompareFunction); + oluacls_func(L, "setDepthTest", _olua_fun_cocos2d_Renderer_setDepthTest); + oluacls_func(L, "setDepthWrite", _olua_fun_cocos2d_Renderer_setDepthWrite); + oluacls_func(L, "setRenderTarget", _olua_fun_cocos2d_Renderer_setRenderTarget); + oluacls_func(L, "setScissorRect", _olua_fun_cocos2d_Renderer_setScissorRect); + oluacls_func(L, "setScissorTest", _olua_fun_cocos2d_Renderer_setScissorTest); + oluacls_func(L, "setStencilCompareFunction", _olua_fun_cocos2d_Renderer_setStencilCompareFunction); + oluacls_func(L, "setStencilOperation", _olua_fun_cocos2d_Renderer_setStencilOperation); + oluacls_func(L, "setStencilTest", _olua_fun_cocos2d_Renderer_setStencilTest); + oluacls_func(L, "setStencilWriteMask", _olua_fun_cocos2d_Renderer_setStencilWriteMask); + oluacls_func(L, "setViewPort", _olua_fun_cocos2d_Renderer_setViewPort); + oluacls_func(L, "setWinding", _olua_fun_cocos2d_Renderer_setWinding); + oluacls_prop(L, "clearColor", _olua_fun_cocos2d_Renderer_getClearColor, nullptr); + oluacls_prop(L, "clearDepth", _olua_fun_cocos2d_Renderer_getClearDepth, nullptr); + oluacls_prop(L, "clearFlag", _olua_fun_cocos2d_Renderer_getClearFlag, nullptr); + oluacls_prop(L, "clearStencil", _olua_fun_cocos2d_Renderer_getClearStencil, nullptr); + oluacls_prop(L, "colorAttachment", _olua_fun_cocos2d_Renderer_getColorAttachment, nullptr); + oluacls_prop(L, "cullMode", _olua_fun_cocos2d_Renderer_getCullMode, _olua_fun_cocos2d_Renderer_setCullMode); + oluacls_prop(L, "depthAttachment", _olua_fun_cocos2d_Renderer_getDepthAttachment, nullptr); + oluacls_prop(L, "depthCompareFunction", _olua_fun_cocos2d_Renderer_getDepthCompareFunction, _olua_fun_cocos2d_Renderer_setDepthCompareFunction); + oluacls_prop(L, "depthTest", _olua_fun_cocos2d_Renderer_getDepthTest, _olua_fun_cocos2d_Renderer_setDepthTest); + oluacls_prop(L, "depthWrite", _olua_fun_cocos2d_Renderer_getDepthWrite, _olua_fun_cocos2d_Renderer_setDepthWrite); + oluacls_prop(L, "drawnBatches", _olua_fun_cocos2d_Renderer_getDrawnBatches, nullptr); + oluacls_prop(L, "drawnVertices", _olua_fun_cocos2d_Renderer_getDrawnVertices, nullptr); + oluacls_prop(L, "renderTargetFlag", _olua_fun_cocos2d_Renderer_getRenderTargetFlag, nullptr); + oluacls_prop(L, "scissorTest", _olua_fun_cocos2d_Renderer_getScissorTest, _olua_fun_cocos2d_Renderer_setScissorTest); + oluacls_prop(L, "stencilAttachment", _olua_fun_cocos2d_Renderer_getStencilAttachment, nullptr); + oluacls_prop(L, "stencilDepthPassOperation", _olua_fun_cocos2d_Renderer_getStencilDepthPassOperation, nullptr); + oluacls_prop(L, "stencilFailureOperation", _olua_fun_cocos2d_Renderer_getStencilFailureOperation, nullptr); + oluacls_prop(L, "stencilPassDepthFailureOperation", _olua_fun_cocos2d_Renderer_getStencilPassDepthFailureOperation, nullptr); + oluacls_prop(L, "stencilReadMask", _olua_fun_cocos2d_Renderer_getStencilReadMask, nullptr); + oluacls_prop(L, "stencilReferenceValue", _olua_fun_cocos2d_Renderer_getStencilReferenceValue, nullptr); + oluacls_prop(L, "stencilTest", _olua_fun_cocos2d_Renderer_getStencilTest, _olua_fun_cocos2d_Renderer_setStencilTest); + oluacls_prop(L, "stencilWriteMask", _olua_fun_cocos2d_Renderer_getStencilWriteMask, _olua_fun_cocos2d_Renderer_setStencilWriteMask); + oluacls_prop(L, "winding", _olua_fun_cocos2d_Renderer_getWinding, _olua_fun_cocos2d_Renderer_setWinding); oluacls_const(L, "BATCH_TRIAGCOMMAND_RESERVED_SIZE", cocos2d::Renderer::BATCH_TRIAGCOMMAND_RESERVED_SIZE); oluacls_const(L, "INDEX_VBO_SIZE", cocos2d::Renderer::INDEX_VBO_SIZE); oluacls_const(L, "MATERIAL_ID_DO_NOT_BATCH", cocos2d::Renderer::MATERIAL_ID_DO_NOT_BATCH); @@ -15512,10 +16721,19 @@ OLUA_LIB int luaopen_cocos2d_Renderer(lua_State *L) return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_RenderCommand_Type(lua_State *L) +OLUA_LIB int luaopen_cc_Renderer(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.Renderer")) { + luaL_error(L, "class not found: cocos2d::Renderer"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_cc_RenderCommand_Type(lua_State *L) { oluacls_class(L, "cc.RenderCommand.Type"); oluacls_func(L, "__index", olua_indexerror); @@ -15531,10 +16749,19 @@ OLUA_LIB int luaopen_cocos2d_RenderCommand_Type(lua_State *L) return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_CustomCommand_DrawType(lua_State *L) +OLUA_LIB int luaopen_cc_RenderCommand_Type(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.RenderCommand.Type")) { + luaL_error(L, "class not found: cocos2d::RenderCommand::Type"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_cc_CustomCommand_DrawType(lua_State *L) { oluacls_class(L, "cc.CustomCommand.DrawType"); oluacls_func(L, "__index", olua_indexerror); @@ -15544,39 +16771,19 @@ OLUA_LIB int luaopen_cocos2d_CustomCommand_DrawType(lua_State *L) return 1; } -OLUA_END_DECLS -static int _cocos2d_PipelineDescriptor___call(lua_State *L) +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_CustomCommand_DrawType(lua_State *L) { - olua_startinvoke(L); - - cocos2d::PipelineDescriptor ret; - - luaL_checktype(L, 2, LUA_TTABLE); - - cocos2d::backend::ProgramState *arg1 = nullptr; /** programState */ - cocos2d::backend::BlendDescriptor arg2; /** blendDescriptor */ - - olua_getfield(L, 2, "programState"); - if (!olua_isnoneornil(L, -1)) { - olua_check_object(L, -1, &arg1, "ccb.ProgramState"); - ret.programState = arg1; + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.CustomCommand.DrawType")) { + luaL_error(L, "class not found: cocos2d::CustomCommand::DrawType"); } - lua_pop(L, 1); - - olua_getfield(L, 2, "blendDescriptor"); - olua_check_object(L, -1, &arg2, "ccb.BlendDescriptor"); - ret.blendDescriptor = arg2; - lua_pop(L, 1); - - olua_pushcopy_object(L, ret, "cc.PipelineDescriptor"); - - olua_endinvoke(L); - return 1; } +OLUA_END_DECLS -static int _cocos2d_PipelineDescriptor___gc(lua_State *L) +static int _olua_fun_cocos2d_PipelineDescriptor___gc(lua_State *L) { olua_startinvoke(L); @@ -15588,7 +16795,7 @@ static int _cocos2d_PipelineDescriptor___gc(lua_State *L) return 0; } -static int _cocos2d_PipelineDescriptor___olua_move(lua_State *L) +static int _olua_fun_cocos2d_PipelineDescriptor___olua_move(lua_State *L) { olua_startinvoke(L); @@ -15600,7 +16807,7 @@ static int _cocos2d_PipelineDescriptor___olua_move(lua_State *L) return 1; } -static int _cocos2d_PipelineDescriptor_get_blendDescriptor(lua_State *L) +static int _olua_fun_cocos2d_PipelineDescriptor_blendDescriptor$1(lua_State *L) { olua_startinvoke(L); @@ -15610,32 +16817,53 @@ static int _cocos2d_PipelineDescriptor_get_blendDescriptor(lua_State *L) // cocos2d::backend::BlendDescriptor blendDescriptor cocos2d::backend::BlendDescriptor &ret = self->blendDescriptor; - int num_ret = olua_pushcopy_object(L, ret, "ccb.BlendDescriptor"); + int num_ret = olua_copy_object(L, ret, "ccb.BlendDescriptor"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_PipelineDescriptor_set_blendDescriptor(lua_State *L) +static int _olua_fun_cocos2d_PipelineDescriptor_blendDescriptor$2(lua_State *L) { olua_startinvoke(L); cocos2d::PipelineDescriptor *self = nullptr; - cocos2d::backend::BlendDescriptor arg1; /** blendDescriptor */ + cocos2d::backend::BlendDescriptor *arg1; /** blendDescriptor */ olua_to_object(L, 1, &self, "cc.PipelineDescriptor"); olua_check_object(L, 2, &arg1, "ccb.BlendDescriptor"); // cocos2d::backend::BlendDescriptor blendDescriptor - self->blendDescriptor = arg1; + self->blendDescriptor = *arg1; olua_endinvoke(L); return 0; } -static int _cocos2d_PipelineDescriptor_get_programState(lua_State *L) +static int _olua_fun_cocos2d_PipelineDescriptor_blendDescriptor(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // cocos2d::backend::BlendDescriptor blendDescriptor + return _olua_fun_cocos2d_PipelineDescriptor_blendDescriptor$1(L); + } + + if (num_args == 1) { + // if ((olua_is_object(L, 2, "ccb.BlendDescriptor"))) { + // cocos2d::backend::BlendDescriptor blendDescriptor + return _olua_fun_cocos2d_PipelineDescriptor_blendDescriptor$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::PipelineDescriptor::blendDescriptor' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_PipelineDescriptor_programState$1(lua_State *L) { olua_startinvoke(L); @@ -15643,7 +16871,7 @@ static int _cocos2d_PipelineDescriptor_get_programState(lua_State *L) olua_to_object(L, 1, &self, "cc.PipelineDescriptor"); - // @optional cocos2d::backend::ProgramState *programState + // cocos2d::backend::ProgramState *programState cocos2d::backend::ProgramState *ret = self->programState; int num_ret = olua_push_object(L, ret, "ccb.ProgramState"); @@ -15652,7 +16880,7 @@ static int _cocos2d_PipelineDescriptor_get_programState(lua_State *L) return num_ret; } -static int _cocos2d_PipelineDescriptor_set_programState(lua_State *L) +static int _olua_fun_cocos2d_PipelineDescriptor_programState$2(lua_State *L) { olua_startinvoke(L); @@ -15662,7 +16890,7 @@ static int _cocos2d_PipelineDescriptor_set_programState(lua_State *L) olua_to_object(L, 1, &self, "cc.PipelineDescriptor"); olua_check_object(L, 2, &arg1, "ccb.ProgramState"); - // @optional cocos2d::backend::ProgramState *programState + // cocos2d::backend::ProgramState *programState self->programState = arg1; olua_endinvoke(L); @@ -15670,48 +16898,104 @@ static int _cocos2d_PipelineDescriptor_set_programState(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_PipelineDescriptor(lua_State *L) +static int _olua_fun_cocos2d_PipelineDescriptor_programState(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // cocos2d::backend::ProgramState *programState + return _olua_fun_cocos2d_PipelineDescriptor_programState$1(L); + } + + if (num_args == 1) { + // if ((olua_is_object(L, 2, "ccb.ProgramState"))) { + // cocos2d::backend::ProgramState *programState + return _olua_fun_cocos2d_PipelineDescriptor_programState$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::PipelineDescriptor::programState' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_cls_cc_PipelineDescriptor(lua_State *L) { oluacls_class(L, "cc.PipelineDescriptor"); - oluacls_func(L, "__call", _cocos2d_PipelineDescriptor___call); - oluacls_func(L, "__gc", _cocos2d_PipelineDescriptor___gc); - oluacls_func(L, "__olua_move", _cocos2d_PipelineDescriptor___olua_move); - oluacls_prop(L, "blendDescriptor", _cocos2d_PipelineDescriptor_get_blendDescriptor, _cocos2d_PipelineDescriptor_set_blendDescriptor); - oluacls_prop(L, "programState", _cocos2d_PipelineDescriptor_get_programState, _cocos2d_PipelineDescriptor_set_programState); + oluacls_func(L, "__gc", _olua_fun_cocos2d_PipelineDescriptor___gc); + oluacls_func(L, "__olua_move", _olua_fun_cocos2d_PipelineDescriptor___olua_move); + oluacls_prop(L, "blendDescriptor", _olua_fun_cocos2d_PipelineDescriptor_blendDescriptor, _olua_fun_cocos2d_PipelineDescriptor_blendDescriptor); + oluacls_prop(L, "programState", _olua_fun_cocos2d_PipelineDescriptor_programState, _olua_fun_cocos2d_PipelineDescriptor_programState); return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_Technique(lua_State *L) +OLUA_LIB int luaopen_cc_PipelineDescriptor(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.PipelineDescriptor")) { + luaL_error(L, "class not found: cocos2d::PipelineDescriptor"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_cc_Technique(lua_State *L) { oluacls_class(L, "cc.Technique"); return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_Pass(lua_State *L) +OLUA_LIB int luaopen_cc_Technique(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.Technique")) { + luaL_error(L, "class not found: cocos2d::Technique"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_cc_Pass(lua_State *L) { oluacls_class(L, "cc.Pass"); return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_RenderState(lua_State *L) +OLUA_LIB int luaopen_cc_Pass(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.Pass")) { + luaL_error(L, "class not found: cocos2d::Pass"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_cc_RenderState(lua_State *L) { oluacls_class(L, "cc.RenderState"); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_RenderState(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.RenderState")) { + luaL_error(L, "class not found: cocos2d::RenderState"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_RenderCommand___olua_move(lua_State *L) +static int _olua_fun_cocos2d_RenderCommand___olua_move(lua_State *L) { olua_startinvoke(L); @@ -15723,7 +17007,7 @@ static int _cocos2d_RenderCommand___olua_move(lua_State *L) return 1; } -static int _cocos2d_RenderCommand_getDepth(lua_State *L) +static int _olua_fun_cocos2d_RenderCommand_getDepth(lua_State *L) { olua_startinvoke(L); @@ -15740,7 +17024,7 @@ static int _cocos2d_RenderCommand_getDepth(lua_State *L) return num_ret; } -static int _cocos2d_RenderCommand_getGlobalOrder(lua_State *L) +static int _olua_fun_cocos2d_RenderCommand_getGlobalOrder(lua_State *L) { olua_startinvoke(L); @@ -15757,7 +17041,7 @@ static int _cocos2d_RenderCommand_getGlobalOrder(lua_State *L) return num_ret; } -static int _cocos2d_RenderCommand_getMV(lua_State *L) +static int _olua_fun_cocos2d_RenderCommand_getMV(lua_State *L) { olua_startinvoke(L); @@ -15774,7 +17058,7 @@ static int _cocos2d_RenderCommand_getMV(lua_State *L) return num_ret; } -static int _cocos2d_RenderCommand_getPipelineDescriptor(lua_State *L) +static int _olua_fun_cocos2d_RenderCommand_getPipelineDescriptor(lua_State *L) { olua_startinvoke(L); @@ -15791,7 +17075,7 @@ static int _cocos2d_RenderCommand_getPipelineDescriptor(lua_State *L) return num_ret; } -static int _cocos2d_RenderCommand_getType(lua_State *L) +static int _olua_fun_cocos2d_RenderCommand_getType(lua_State *L) { olua_startinvoke(L); @@ -15808,13 +17092,13 @@ static int _cocos2d_RenderCommand_getType(lua_State *L) return num_ret; } -static int _cocos2d_RenderCommand_init(lua_State *L) +static int _olua_fun_cocos2d_RenderCommand_init(lua_State *L) { olua_startinvoke(L); cocos2d::RenderCommand *self = nullptr; float arg1 = 0; /** globalZOrder */ - cocos2d::Mat4 arg2; /** modelViewTransform */ + cocos2d::Mat4 *arg2; /** modelViewTransform */ unsigned int arg3 = 0; /** flags */ olua_to_object(L, 1, &self, "cc.RenderCommand"); @@ -15823,14 +17107,14 @@ static int _cocos2d_RenderCommand_init(lua_State *L) olua_check_integer(L, 4, &arg3); // void init(float globalZOrder, const cocos2d::Mat4 &modelViewTransform, unsigned int flags) - self->init(arg1, arg2, arg3); + self->init(arg1, *arg2, arg3); olua_endinvoke(L); return 0; } -static int _cocos2d_RenderCommand_is3D(lua_State *L) +static int _olua_fun_cocos2d_RenderCommand_is3D(lua_State *L) { olua_startinvoke(L); @@ -15847,7 +17131,7 @@ static int _cocos2d_RenderCommand_is3D(lua_State *L) return num_ret; } -static int _cocos2d_RenderCommand_isSkipBatching(lua_State *L) +static int _olua_fun_cocos2d_RenderCommand_isSkipBatching(lua_State *L) { olua_startinvoke(L); @@ -15864,7 +17148,7 @@ static int _cocos2d_RenderCommand_isSkipBatching(lua_State *L) return num_ret; } -static int _cocos2d_RenderCommand_isTransparent(lua_State *L) +static int _olua_fun_cocos2d_RenderCommand_isTransparent(lua_State *L) { olua_startinvoke(L); @@ -15881,7 +17165,7 @@ static int _cocos2d_RenderCommand_isTransparent(lua_State *L) return num_ret; } -static int _cocos2d_RenderCommand_set3D(lua_State *L) +static int _olua_fun_cocos2d_RenderCommand_set3D(lua_State *L) { olua_startinvoke(L); @@ -15899,7 +17183,7 @@ static int _cocos2d_RenderCommand_set3D(lua_State *L) return 0; } -static int _cocos2d_RenderCommand_setSkipBatching(lua_State *L) +static int _olua_fun_cocos2d_RenderCommand_setSkipBatching(lua_State *L) { olua_startinvoke(L); @@ -15917,7 +17201,7 @@ static int _cocos2d_RenderCommand_setSkipBatching(lua_State *L) return 0; } -static int _cocos2d_RenderCommand_setTransparent(lua_State *L) +static int _olua_fun_cocos2d_RenderCommand_setTransparent(lua_State *L) { olua_startinvoke(L); @@ -15935,37 +17219,45 @@ static int _cocos2d_RenderCommand_setTransparent(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_RenderCommand(lua_State *L) +static int _olua_cls_cc_RenderCommand(lua_State *L) { oluacls_class(L, "cc.RenderCommand"); - oluacls_func(L, "__olua_move", _cocos2d_RenderCommand___olua_move); - oluacls_func(L, "getDepth", _cocos2d_RenderCommand_getDepth); - oluacls_func(L, "getGlobalOrder", _cocos2d_RenderCommand_getGlobalOrder); - oluacls_func(L, "getMV", _cocos2d_RenderCommand_getMV); - oluacls_func(L, "getPipelineDescriptor", _cocos2d_RenderCommand_getPipelineDescriptor); - oluacls_func(L, "getType", _cocos2d_RenderCommand_getType); - oluacls_func(L, "init", _cocos2d_RenderCommand_init); - oluacls_func(L, "is3D", _cocos2d_RenderCommand_is3D); - oluacls_func(L, "isSkipBatching", _cocos2d_RenderCommand_isSkipBatching); - oluacls_func(L, "isTransparent", _cocos2d_RenderCommand_isTransparent); - oluacls_func(L, "set3D", _cocos2d_RenderCommand_set3D); - oluacls_func(L, "setSkipBatching", _cocos2d_RenderCommand_setSkipBatching); - oluacls_func(L, "setTransparent", _cocos2d_RenderCommand_setTransparent); - oluacls_prop(L, "3D", _cocos2d_RenderCommand_is3D, _cocos2d_RenderCommand_set3D); - oluacls_prop(L, "depth", _cocos2d_RenderCommand_getDepth, nullptr); - oluacls_prop(L, "globalOrder", _cocos2d_RenderCommand_getGlobalOrder, nullptr); - oluacls_prop(L, "mv", _cocos2d_RenderCommand_getMV, nullptr); - oluacls_prop(L, "pipelineDescriptor", _cocos2d_RenderCommand_getPipelineDescriptor, nullptr); - oluacls_prop(L, "skipBatching", _cocos2d_RenderCommand_isSkipBatching, _cocos2d_RenderCommand_setSkipBatching); - oluacls_prop(L, "transparent", _cocos2d_RenderCommand_isTransparent, _cocos2d_RenderCommand_setTransparent); - oluacls_prop(L, "type", _cocos2d_RenderCommand_getType, nullptr); + oluacls_func(L, "__olua_move", _olua_fun_cocos2d_RenderCommand___olua_move); + oluacls_func(L, "getDepth", _olua_fun_cocos2d_RenderCommand_getDepth); + oluacls_func(L, "getGlobalOrder", _olua_fun_cocos2d_RenderCommand_getGlobalOrder); + oluacls_func(L, "getMV", _olua_fun_cocos2d_RenderCommand_getMV); + oluacls_func(L, "getPipelineDescriptor", _olua_fun_cocos2d_RenderCommand_getPipelineDescriptor); + oluacls_func(L, "getType", _olua_fun_cocos2d_RenderCommand_getType); + oluacls_func(L, "init", _olua_fun_cocos2d_RenderCommand_init); + oluacls_func(L, "is3D", _olua_fun_cocos2d_RenderCommand_is3D); + oluacls_func(L, "isSkipBatching", _olua_fun_cocos2d_RenderCommand_isSkipBatching); + oluacls_func(L, "isTransparent", _olua_fun_cocos2d_RenderCommand_isTransparent); + oluacls_func(L, "set3D", _olua_fun_cocos2d_RenderCommand_set3D); + oluacls_func(L, "setSkipBatching", _olua_fun_cocos2d_RenderCommand_setSkipBatching); + oluacls_func(L, "setTransparent", _olua_fun_cocos2d_RenderCommand_setTransparent); + oluacls_prop(L, "depth", _olua_fun_cocos2d_RenderCommand_getDepth, nullptr); + oluacls_prop(L, "globalOrder", _olua_fun_cocos2d_RenderCommand_getGlobalOrder, nullptr); + oluacls_prop(L, "mv", _olua_fun_cocos2d_RenderCommand_getMV, nullptr); + oluacls_prop(L, "pipelineDescriptor", _olua_fun_cocos2d_RenderCommand_getPipelineDescriptor, nullptr); + oluacls_prop(L, "skipBatching", _olua_fun_cocos2d_RenderCommand_isSkipBatching, _olua_fun_cocos2d_RenderCommand_setSkipBatching); + oluacls_prop(L, "transparent", _olua_fun_cocos2d_RenderCommand_isTransparent, _olua_fun_cocos2d_RenderCommand_setTransparent); + oluacls_prop(L, "type", _olua_fun_cocos2d_RenderCommand_getType, nullptr); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_RenderCommand(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.RenderCommand")) { + luaL_error(L, "class not found: cocos2d::RenderCommand"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_CustomCommand___gc(lua_State *L) +static int _olua_fun_cocos2d_CustomCommand___gc(lua_State *L) { olua_startinvoke(L); @@ -15977,7 +17269,7 @@ static int _cocos2d_CustomCommand___gc(lua_State *L) return 0; } -static int _cocos2d_CustomCommand_createIndexBuffer(lua_State *L) +static int _olua_fun_cocos2d_CustomCommand_createIndexBuffer(lua_State *L) { olua_startinvoke(L); @@ -15999,7 +17291,7 @@ static int _cocos2d_CustomCommand_createIndexBuffer(lua_State *L) return 0; } -static int _cocos2d_CustomCommand_createVertexBuffer(lua_State *L) +static int _olua_fun_cocos2d_CustomCommand_createVertexBuffer(lua_State *L) { olua_startinvoke(L); @@ -16021,7 +17313,93 @@ static int _cocos2d_CustomCommand_createVertexBuffer(lua_State *L) return 0; } -static int _cocos2d_CustomCommand_getAfterCallback(lua_State *L) +static int _olua_fun_cocos2d_CustomCommand_func$1(lua_State *L) +{ + olua_startinvoke(L); + + cocos2d::CustomCommand *self = nullptr; + + olua_to_object(L, 1, &self, "cc.CustomCommand"); + + void *cb_store = (void *)self; + std::string cb_tag = "func"; + olua_getcallback(L, cb_store, cb_tag.c_str(), OLUA_TAG_EQUAL); + + // std::function func + std::function ret = self->func; + int num_ret = olua_push_callback(L, &ret, "std.function"); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_cocos2d_CustomCommand_func$2(lua_State *L) +{ + olua_startinvoke(L); + + cocos2d::CustomCommand *self = nullptr; + std::function arg1; /** func */ + + olua_to_object(L, 1, &self, "cc.CustomCommand"); + if (!olua_isnoneornil(L, 2)) { + olua_check_callback(L, 2, &arg1, "std.function"); + } + + void *cb_store = (void *)self; + std::string cb_tag = "func"; + std::string cb_name; + if (olua_isfunction(L, 2)) { + cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + olua_Context cb_ctx = olua_context(L); + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */]() { + lua_State *L = olua_mainthread(NULL); + olua_checkhostthread(); + + if (olua_contextequal(L, cb_ctx)) { + int top = lua_gettop(L); + + olua_callback(L, cb_store, cb_name.c_str(), 0); + + lua_settop(L, top); + } + }; + } else { + olua_removecallback(L, cb_store, cb_tag.c_str(), OLUA_TAG_EQUAL); + arg1 = nullptr; + } + + // std::function func + self->func = arg1; + + olua_endinvoke(L); + + return 0; +} + +static int _olua_fun_cocos2d_CustomCommand_func(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // std::function func + return _olua_fun_cocos2d_CustomCommand_func$1(L); + } + + if (num_args == 1) { + // if ((olua_is_callback(L, 2, "std.function") || olua_isnil(L, 2))) { + // std::function func + return _olua_fun_cocos2d_CustomCommand_func$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::CustomCommand::func' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_CustomCommand_getAfterCallback(lua_State *L) { olua_startinvoke(L); @@ -16033,7 +17411,7 @@ static int _cocos2d_CustomCommand_getAfterCallback(lua_State *L) std::string cb_tag = "AfterCallback"; olua_getcallback(L, cb_store, cb_tag.c_str(), OLUA_TAG_EQUAL); - // @localvar const std::function &getAfterCallback() + // const std::function &getAfterCallback() std::function ret = self->getAfterCallback(); int num_ret = olua_push_callback(L, &ret, "std.function"); @@ -16042,7 +17420,7 @@ static int _cocos2d_CustomCommand_getAfterCallback(lua_State *L) return num_ret; } -static int _cocos2d_CustomCommand_getBeforeCallback(lua_State *L) +static int _olua_fun_cocos2d_CustomCommand_getBeforeCallback(lua_State *L) { olua_startinvoke(L); @@ -16054,7 +17432,7 @@ static int _cocos2d_CustomCommand_getBeforeCallback(lua_State *L) std::string cb_tag = "BeforeCallback"; olua_getcallback(L, cb_store, cb_tag.c_str(), OLUA_TAG_EQUAL); - // @localvar const std::function &getBeforeCallback() + // const std::function &getBeforeCallback() std::function ret = self->getBeforeCallback(); int num_ret = olua_push_callback(L, &ret, "std.function"); @@ -16063,7 +17441,7 @@ static int _cocos2d_CustomCommand_getBeforeCallback(lua_State *L) return num_ret; } -static int _cocos2d_CustomCommand_getDrawType(lua_State *L) +static int _olua_fun_cocos2d_CustomCommand_getDrawType(lua_State *L) { olua_startinvoke(L); @@ -16080,7 +17458,7 @@ static int _cocos2d_CustomCommand_getDrawType(lua_State *L) return num_ret; } -static int _cocos2d_CustomCommand_getIndexBuffer(lua_State *L) +static int _olua_fun_cocos2d_CustomCommand_getIndexBuffer(lua_State *L) { olua_startinvoke(L); @@ -16097,7 +17475,7 @@ static int _cocos2d_CustomCommand_getIndexBuffer(lua_State *L) return num_ret; } -static int _cocos2d_CustomCommand_getIndexCapacity(lua_State *L) +static int _olua_fun_cocos2d_CustomCommand_getIndexCapacity(lua_State *L) { olua_startinvoke(L); @@ -16114,7 +17492,7 @@ static int _cocos2d_CustomCommand_getIndexCapacity(lua_State *L) return num_ret; } -static int _cocos2d_CustomCommand_getIndexDrawCount(lua_State *L) +static int _olua_fun_cocos2d_CustomCommand_getIndexDrawCount(lua_State *L) { olua_startinvoke(L); @@ -16131,7 +17509,7 @@ static int _cocos2d_CustomCommand_getIndexDrawCount(lua_State *L) return num_ret; } -static int _cocos2d_CustomCommand_getIndexDrawOffset(lua_State *L) +static int _olua_fun_cocos2d_CustomCommand_getIndexDrawOffset(lua_State *L) { olua_startinvoke(L); @@ -16148,7 +17526,7 @@ static int _cocos2d_CustomCommand_getIndexDrawOffset(lua_State *L) return num_ret; } -static int _cocos2d_CustomCommand_getIndexFormat(lua_State *L) +static int _olua_fun_cocos2d_CustomCommand_getIndexFormat(lua_State *L) { olua_startinvoke(L); @@ -16165,7 +17543,7 @@ static int _cocos2d_CustomCommand_getIndexFormat(lua_State *L) return num_ret; } -static int _cocos2d_CustomCommand_getLineWidth(lua_State *L) +static int _olua_fun_cocos2d_CustomCommand_getLineWidth(lua_State *L) { olua_startinvoke(L); @@ -16182,7 +17560,7 @@ static int _cocos2d_CustomCommand_getLineWidth(lua_State *L) return num_ret; } -static int _cocos2d_CustomCommand_getPrimitiveType(lua_State *L) +static int _olua_fun_cocos2d_CustomCommand_getPrimitiveType(lua_State *L) { olua_startinvoke(L); @@ -16199,7 +17577,7 @@ static int _cocos2d_CustomCommand_getPrimitiveType(lua_State *L) return num_ret; } -static int _cocos2d_CustomCommand_getVertexBuffer(lua_State *L) +static int _olua_fun_cocos2d_CustomCommand_getVertexBuffer(lua_State *L) { olua_startinvoke(L); @@ -16216,7 +17594,7 @@ static int _cocos2d_CustomCommand_getVertexBuffer(lua_State *L) return num_ret; } -static int _cocos2d_CustomCommand_getVertexCapacity(lua_State *L) +static int _olua_fun_cocos2d_CustomCommand_getVertexCapacity(lua_State *L) { olua_startinvoke(L); @@ -16233,7 +17611,7 @@ static int _cocos2d_CustomCommand_getVertexCapacity(lua_State *L) return num_ret; } -static int _cocos2d_CustomCommand_getVertexDrawCount(lua_State *L) +static int _olua_fun_cocos2d_CustomCommand_getVertexDrawCount(lua_State *L) { olua_startinvoke(L); @@ -16250,7 +17628,7 @@ static int _cocos2d_CustomCommand_getVertexDrawCount(lua_State *L) return num_ret; } -static int _cocos2d_CustomCommand_getVertexDrawStart(lua_State *L) +static int _olua_fun_cocos2d_CustomCommand_getVertexDrawStart(lua_State *L) { olua_startinvoke(L); @@ -16267,13 +17645,13 @@ static int _cocos2d_CustomCommand_getVertexDrawStart(lua_State *L) return num_ret; } -static int _cocos2d_CustomCommand_init$1(lua_State *L) +static int _olua_fun_cocos2d_CustomCommand_init$1(lua_State *L) { olua_startinvoke(L); cocos2d::CustomCommand *self = nullptr; float arg1 = 0; /** globalZOrder */ - cocos2d::Mat4 arg2; /** modelViewTransform */ + cocos2d::Mat4 *arg2; /** modelViewTransform */ unsigned int arg3 = 0; /** flags */ olua_to_object(L, 1, &self, "cc.CustomCommand"); @@ -16282,14 +17660,14 @@ static int _cocos2d_CustomCommand_init$1(lua_State *L) olua_check_integer(L, 4, &arg3); // @using void init(float globalZOrder, const cocos2d::Mat4 &modelViewTransform, unsigned int flags) - self->init(arg1, arg2, arg3); + self->init(arg1, *arg2, arg3); olua_endinvoke(L); return 0; } -static int _cocos2d_CustomCommand_init$2(lua_State *L) +static int _olua_fun_cocos2d_CustomCommand_init$2(lua_State *L) { olua_startinvoke(L); @@ -16307,48 +17685,48 @@ static int _cocos2d_CustomCommand_init$2(lua_State *L) return 0; } -static int _cocos2d_CustomCommand_init$3(lua_State *L) +static int _olua_fun_cocos2d_CustomCommand_init$3(lua_State *L) { olua_startinvoke(L); cocos2d::CustomCommand *self = nullptr; float arg1 = 0; /** globalZOrder */ - cocos2d::BlendFunc arg2; /** blendFunc */ + cocos2d::BlendFunc *arg2; /** blendFunc */ olua_to_object(L, 1, &self, "cc.CustomCommand"); olua_check_number(L, 2, &arg1); olua_check_object(L, 3, &arg2, "cc.BlendFunc"); // void init(float globalZOrder, const cocos2d::BlendFunc &blendFunc) - self->init(arg1, arg2); + self->init(arg1, *arg2); olua_endinvoke(L); return 0; } -static int _cocos2d_CustomCommand_init(lua_State *L) +static int _olua_fun_cocos2d_CustomCommand_init(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_number(L, 2))) { // void init(float globalZOrder) - return _cocos2d_CustomCommand_init$2(L); + return _olua_fun_cocos2d_CustomCommand_init$2(L); // } } if (num_args == 2) { // if ((olua_is_number(L, 2)) && (olua_is_object(L, 3, "cc.BlendFunc"))) { // void init(float globalZOrder, const cocos2d::BlendFunc &blendFunc) - return _cocos2d_CustomCommand_init$3(L); + return _olua_fun_cocos2d_CustomCommand_init$3(L); // } } if (num_args == 3) { // if ((olua_is_number(L, 2)) && (olua_is_object(L, 3, "cc.Mat4")) && (olua_is_integer(L, 4))) { // @using void init(float globalZOrder, const cocos2d::Mat4 &modelViewTransform, unsigned int flags) - return _cocos2d_CustomCommand_init$1(L); + return _olua_fun_cocos2d_CustomCommand_init$1(L); // } } @@ -16357,11 +17735,11 @@ static int _cocos2d_CustomCommand_init(lua_State *L) return 0; } -static int _cocos2d_CustomCommand_new(lua_State *L) +static int _olua_fun_cocos2d_CustomCommand_new(lua_State *L) { olua_startinvoke(L); - // CustomCommand() + // cocos2d::CustomCommand() cocos2d::CustomCommand *ret = new cocos2d::CustomCommand(); int num_ret = olua_push_object(L, ret, "cc.CustomCommand"); olua_postnew(L, ret); @@ -16371,7 +17749,7 @@ static int _cocos2d_CustomCommand_new(lua_State *L) return num_ret; } -static int _cocos2d_CustomCommand_setAfterCallback(lua_State *L) +static int _olua_fun_cocos2d_CustomCommand_setAfterCallback(lua_State *L) { olua_startinvoke(L); @@ -16383,9 +17761,10 @@ static int _cocos2d_CustomCommand_setAfterCallback(lua_State *L) void *cb_store = (void *)self; std::string cb_tag = "AfterCallback"; - std::string cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + std::string cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx]() { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */]() { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); @@ -16398,7 +17777,7 @@ static int _cocos2d_CustomCommand_setAfterCallback(lua_State *L) } }; - // void setAfterCallback(@localvar const std::function &after) + // void setAfterCallback(const std::function &after) self->setAfterCallback(arg1); olua_endinvoke(L); @@ -16406,7 +17785,7 @@ static int _cocos2d_CustomCommand_setAfterCallback(lua_State *L) return 0; } -static int _cocos2d_CustomCommand_setBeforeCallback(lua_State *L) +static int _olua_fun_cocos2d_CustomCommand_setBeforeCallback(lua_State *L) { olua_startinvoke(L); @@ -16418,9 +17797,10 @@ static int _cocos2d_CustomCommand_setBeforeCallback(lua_State *L) void *cb_store = (void *)self; std::string cb_tag = "BeforeCallback"; - std::string cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + std::string cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx]() { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */]() { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); @@ -16433,7 +17813,7 @@ static int _cocos2d_CustomCommand_setBeforeCallback(lua_State *L) } }; - // void setBeforeCallback(@localvar const std::function &before) + // void setBeforeCallback(const std::function &before) self->setBeforeCallback(arg1); olua_endinvoke(L); @@ -16441,7 +17821,7 @@ static int _cocos2d_CustomCommand_setBeforeCallback(lua_State *L) return 0; } -static int _cocos2d_CustomCommand_setDrawType(lua_State *L) +static int _olua_fun_cocos2d_CustomCommand_setDrawType(lua_State *L) { olua_startinvoke(L); @@ -16459,7 +17839,7 @@ static int _cocos2d_CustomCommand_setDrawType(lua_State *L) return 0; } -static int _cocos2d_CustomCommand_setIndexBuffer(lua_State *L) +static int _olua_fun_cocos2d_CustomCommand_setIndexBuffer(lua_State *L) { olua_startinvoke(L); @@ -16479,7 +17859,7 @@ static int _cocos2d_CustomCommand_setIndexBuffer(lua_State *L) return 0; } -static int _cocos2d_CustomCommand_setIndexDrawInfo(lua_State *L) +static int _olua_fun_cocos2d_CustomCommand_setIndexDrawInfo(lua_State *L) { olua_startinvoke(L); @@ -16499,7 +17879,7 @@ static int _cocos2d_CustomCommand_setIndexDrawInfo(lua_State *L) return 0; } -static int _cocos2d_CustomCommand_setLineWidth(lua_State *L) +static int _olua_fun_cocos2d_CustomCommand_setLineWidth(lua_State *L) { olua_startinvoke(L); @@ -16517,7 +17897,7 @@ static int _cocos2d_CustomCommand_setLineWidth(lua_State *L) return 0; } -static int _cocos2d_CustomCommand_setPrimitiveType(lua_State *L) +static int _olua_fun_cocos2d_CustomCommand_setPrimitiveType(lua_State *L) { olua_startinvoke(L); @@ -16535,7 +17915,7 @@ static int _cocos2d_CustomCommand_setPrimitiveType(lua_State *L) return 0; } -static int _cocos2d_CustomCommand_setVertexBuffer(lua_State *L) +static int _olua_fun_cocos2d_CustomCommand_setVertexBuffer(lua_State *L) { olua_startinvoke(L); @@ -16553,7 +17933,7 @@ static int _cocos2d_CustomCommand_setVertexBuffer(lua_State *L) return 0; } -static int _cocos2d_CustomCommand_setVertexDrawInfo(lua_State *L) +static int _olua_fun_cocos2d_CustomCommand_setVertexDrawInfo(lua_State *L) { olua_startinvoke(L); @@ -16573,7 +17953,7 @@ static int _cocos2d_CustomCommand_setVertexDrawInfo(lua_State *L) return 0; } -static int _cocos2d_CustomCommand_updateIndexBuffer$1(lua_State *L) +static int _olua_fun_cocos2d_CustomCommand_updateIndexBuffer$1(lua_State *L) { olua_startinvoke(L); @@ -16593,7 +17973,7 @@ static int _cocos2d_CustomCommand_updateIndexBuffer$1(lua_State *L) return 0; } -static int _cocos2d_CustomCommand_updateIndexBuffer$2(lua_State *L) +static int _olua_fun_cocos2d_CustomCommand_updateIndexBuffer$2(lua_State *L) { olua_startinvoke(L); @@ -16615,21 +17995,21 @@ static int _cocos2d_CustomCommand_updateIndexBuffer$2(lua_State *L) return 0; } -static int _cocos2d_CustomCommand_updateIndexBuffer(lua_State *L) +static int _olua_fun_cocos2d_CustomCommand_updateIndexBuffer(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 2) { // if ((olua_is_object(L, 2, "void *")) && (olua_is_integer(L, 3))) { // void updateIndexBuffer(void *data, std::size_t length) - return _cocos2d_CustomCommand_updateIndexBuffer$1(L); + return _olua_fun_cocos2d_CustomCommand_updateIndexBuffer$1(L); // } } if (num_args == 3) { // if ((olua_is_object(L, 2, "void *")) && (olua_is_integer(L, 3)) && (olua_is_integer(L, 4))) { // void updateIndexBuffer(void *data, std::size_t offset, std::size_t length) - return _cocos2d_CustomCommand_updateIndexBuffer$2(L); + return _olua_fun_cocos2d_CustomCommand_updateIndexBuffer$2(L); // } } @@ -16638,7 +18018,7 @@ static int _cocos2d_CustomCommand_updateIndexBuffer(lua_State *L) return 0; } -static int _cocos2d_CustomCommand_updateVertexBuffer$1(lua_State *L) +static int _olua_fun_cocos2d_CustomCommand_updateVertexBuffer$1(lua_State *L) { olua_startinvoke(L); @@ -16658,7 +18038,7 @@ static int _cocos2d_CustomCommand_updateVertexBuffer$1(lua_State *L) return 0; } -static int _cocos2d_CustomCommand_updateVertexBuffer$2(lua_State *L) +static int _olua_fun_cocos2d_CustomCommand_updateVertexBuffer$2(lua_State *L) { olua_startinvoke(L); @@ -16680,21 +18060,21 @@ static int _cocos2d_CustomCommand_updateVertexBuffer$2(lua_State *L) return 0; } -static int _cocos2d_CustomCommand_updateVertexBuffer(lua_State *L) +static int _olua_fun_cocos2d_CustomCommand_updateVertexBuffer(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 2) { // if ((olua_is_object(L, 2, "void *")) && (olua_is_integer(L, 3))) { // void updateVertexBuffer(void *data, std::size_t length) - return _cocos2d_CustomCommand_updateVertexBuffer$1(L); + return _olua_fun_cocos2d_CustomCommand_updateVertexBuffer$1(L); // } } if (num_args == 3) { // if ((olua_is_object(L, 2, "void *")) && (olua_is_integer(L, 3)) && (olua_is_integer(L, 4))) { // void updateVertexBuffer(void *data, std::size_t offset, std::size_t length) - return _cocos2d_CustomCommand_updateVertexBuffer$2(L); + return _olua_fun_cocos2d_CustomCommand_updateVertexBuffer$2(L); // } } @@ -16703,124 +18083,69 @@ static int _cocos2d_CustomCommand_updateVertexBuffer(lua_State *L) return 0; } -static int _cocos2d_CustomCommand_get_func(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::CustomCommand *self = nullptr; - - olua_to_object(L, 1, &self, "cc.CustomCommand"); - - void *cb_store = (void *)self; - std::string cb_tag = "func"; - olua_getcallback(L, cb_store, cb_tag.c_str(), OLUA_TAG_EQUAL); - - // @nullable @localvar std::function func - std::function ret = self->func; - int num_ret = olua_push_callback(L, &ret, "std.function"); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_CustomCommand_set_func(lua_State *L) +static int _olua_cls_cc_CustomCommand(lua_State *L) { - olua_startinvoke(L); - - cocos2d::CustomCommand *self = nullptr; - std::function arg1; /** func */ - - olua_to_object(L, 1, &self, "cc.CustomCommand"); - if (!olua_isnoneornil(L, 2)) { - olua_check_callback(L, 2, &arg1, "std.function"); - } - - void *cb_store = (void *)self; - std::string cb_tag = "func"; - std::string cb_name; - if (olua_isfunction(L, 2)) { - cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); - olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx]() { - lua_State *L = olua_mainthread(NULL); - olua_checkhostthread(); - - if (olua_contextequal(L, cb_ctx)) { - int top = lua_gettop(L); - - olua_callback(L, cb_store, cb_name.c_str(), 0); - - lua_settop(L, top); - } - }; - } else { - olua_removecallback(L, cb_store, cb_tag.c_str(), OLUA_TAG_EQUAL); - arg1 = nullptr; - } - - // @nullable @localvar std::function func - self->func = arg1; - - olua_endinvoke(L); + oluacls_class(L, "cc.CustomCommand"); + oluacls_func(L, "__gc", _olua_fun_cocos2d_CustomCommand___gc); + oluacls_func(L, "createIndexBuffer", _olua_fun_cocos2d_CustomCommand_createIndexBuffer); + oluacls_func(L, "createVertexBuffer", _olua_fun_cocos2d_CustomCommand_createVertexBuffer); + oluacls_func(L, "getAfterCallback", _olua_fun_cocos2d_CustomCommand_getAfterCallback); + oluacls_func(L, "getBeforeCallback", _olua_fun_cocos2d_CustomCommand_getBeforeCallback); + oluacls_func(L, "getDrawType", _olua_fun_cocos2d_CustomCommand_getDrawType); + oluacls_func(L, "getIndexBuffer", _olua_fun_cocos2d_CustomCommand_getIndexBuffer); + oluacls_func(L, "getIndexCapacity", _olua_fun_cocos2d_CustomCommand_getIndexCapacity); + oluacls_func(L, "getIndexDrawCount", _olua_fun_cocos2d_CustomCommand_getIndexDrawCount); + oluacls_func(L, "getIndexDrawOffset", _olua_fun_cocos2d_CustomCommand_getIndexDrawOffset); + oluacls_func(L, "getIndexFormat", _olua_fun_cocos2d_CustomCommand_getIndexFormat); + oluacls_func(L, "getLineWidth", _olua_fun_cocos2d_CustomCommand_getLineWidth); + oluacls_func(L, "getPrimitiveType", _olua_fun_cocos2d_CustomCommand_getPrimitiveType); + oluacls_func(L, "getVertexBuffer", _olua_fun_cocos2d_CustomCommand_getVertexBuffer); + oluacls_func(L, "getVertexCapacity", _olua_fun_cocos2d_CustomCommand_getVertexCapacity); + oluacls_func(L, "getVertexDrawCount", _olua_fun_cocos2d_CustomCommand_getVertexDrawCount); + oluacls_func(L, "getVertexDrawStart", _olua_fun_cocos2d_CustomCommand_getVertexDrawStart); + oluacls_func(L, "init", _olua_fun_cocos2d_CustomCommand_init); + oluacls_func(L, "new", _olua_fun_cocos2d_CustomCommand_new); + oluacls_func(L, "setAfterCallback", _olua_fun_cocos2d_CustomCommand_setAfterCallback); + oluacls_func(L, "setBeforeCallback", _olua_fun_cocos2d_CustomCommand_setBeforeCallback); + oluacls_func(L, "setDrawType", _olua_fun_cocos2d_CustomCommand_setDrawType); + oluacls_func(L, "setIndexBuffer", _olua_fun_cocos2d_CustomCommand_setIndexBuffer); + oluacls_func(L, "setIndexDrawInfo", _olua_fun_cocos2d_CustomCommand_setIndexDrawInfo); + oluacls_func(L, "setLineWidth", _olua_fun_cocos2d_CustomCommand_setLineWidth); + oluacls_func(L, "setPrimitiveType", _olua_fun_cocos2d_CustomCommand_setPrimitiveType); + oluacls_func(L, "setVertexBuffer", _olua_fun_cocos2d_CustomCommand_setVertexBuffer); + oluacls_func(L, "setVertexDrawInfo", _olua_fun_cocos2d_CustomCommand_setVertexDrawInfo); + oluacls_func(L, "updateIndexBuffer", _olua_fun_cocos2d_CustomCommand_updateIndexBuffer); + oluacls_func(L, "updateVertexBuffer", _olua_fun_cocos2d_CustomCommand_updateVertexBuffer); + oluacls_prop(L, "afterCallback", _olua_fun_cocos2d_CustomCommand_getAfterCallback, _olua_fun_cocos2d_CustomCommand_setAfterCallback); + oluacls_prop(L, "beforeCallback", _olua_fun_cocos2d_CustomCommand_getBeforeCallback, _olua_fun_cocos2d_CustomCommand_setBeforeCallback); + oluacls_prop(L, "drawType", _olua_fun_cocos2d_CustomCommand_getDrawType, _olua_fun_cocos2d_CustomCommand_setDrawType); + oluacls_prop(L, "indexCapacity", _olua_fun_cocos2d_CustomCommand_getIndexCapacity, nullptr); + oluacls_prop(L, "indexDrawCount", _olua_fun_cocos2d_CustomCommand_getIndexDrawCount, nullptr); + oluacls_prop(L, "indexDrawOffset", _olua_fun_cocos2d_CustomCommand_getIndexDrawOffset, nullptr); + oluacls_prop(L, "indexFormat", _olua_fun_cocos2d_CustomCommand_getIndexFormat, nullptr); + oluacls_prop(L, "lineWidth", _olua_fun_cocos2d_CustomCommand_getLineWidth, _olua_fun_cocos2d_CustomCommand_setLineWidth); + oluacls_prop(L, "primitiveType", _olua_fun_cocos2d_CustomCommand_getPrimitiveType, _olua_fun_cocos2d_CustomCommand_setPrimitiveType); + oluacls_prop(L, "vertexBuffer", _olua_fun_cocos2d_CustomCommand_getVertexBuffer, _olua_fun_cocos2d_CustomCommand_setVertexBuffer); + oluacls_prop(L, "vertexCapacity", _olua_fun_cocos2d_CustomCommand_getVertexCapacity, nullptr); + oluacls_prop(L, "vertexDrawCount", _olua_fun_cocos2d_CustomCommand_getVertexDrawCount, nullptr); + oluacls_prop(L, "vertexDrawStart", _olua_fun_cocos2d_CustomCommand_getVertexDrawStart, nullptr); + oluacls_prop(L, "func", _olua_fun_cocos2d_CustomCommand_func, _olua_fun_cocos2d_CustomCommand_func); - return 0; + return 1; } OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_CustomCommand(lua_State *L) +OLUA_LIB int luaopen_cc_CustomCommand(lua_State *L) { - oluacls_class(L, "cc.CustomCommand"); - oluacls_func(L, "__gc", _cocos2d_CustomCommand___gc); - oluacls_func(L, "createIndexBuffer", _cocos2d_CustomCommand_createIndexBuffer); - oluacls_func(L, "createVertexBuffer", _cocos2d_CustomCommand_createVertexBuffer); - oluacls_func(L, "getAfterCallback", _cocos2d_CustomCommand_getAfterCallback); - oluacls_func(L, "getBeforeCallback", _cocos2d_CustomCommand_getBeforeCallback); - oluacls_func(L, "getDrawType", _cocos2d_CustomCommand_getDrawType); - oluacls_func(L, "getIndexBuffer", _cocos2d_CustomCommand_getIndexBuffer); - oluacls_func(L, "getIndexCapacity", _cocos2d_CustomCommand_getIndexCapacity); - oluacls_func(L, "getIndexDrawCount", _cocos2d_CustomCommand_getIndexDrawCount); - oluacls_func(L, "getIndexDrawOffset", _cocos2d_CustomCommand_getIndexDrawOffset); - oluacls_func(L, "getIndexFormat", _cocos2d_CustomCommand_getIndexFormat); - oluacls_func(L, "getLineWidth", _cocos2d_CustomCommand_getLineWidth); - oluacls_func(L, "getPrimitiveType", _cocos2d_CustomCommand_getPrimitiveType); - oluacls_func(L, "getVertexBuffer", _cocos2d_CustomCommand_getVertexBuffer); - oluacls_func(L, "getVertexCapacity", _cocos2d_CustomCommand_getVertexCapacity); - oluacls_func(L, "getVertexDrawCount", _cocos2d_CustomCommand_getVertexDrawCount); - oluacls_func(L, "getVertexDrawStart", _cocos2d_CustomCommand_getVertexDrawStart); - oluacls_func(L, "init", _cocos2d_CustomCommand_init); - oluacls_func(L, "new", _cocos2d_CustomCommand_new); - oluacls_func(L, "setAfterCallback", _cocos2d_CustomCommand_setAfterCallback); - oluacls_func(L, "setBeforeCallback", _cocos2d_CustomCommand_setBeforeCallback); - oluacls_func(L, "setDrawType", _cocos2d_CustomCommand_setDrawType); - oluacls_func(L, "setIndexBuffer", _cocos2d_CustomCommand_setIndexBuffer); - oluacls_func(L, "setIndexDrawInfo", _cocos2d_CustomCommand_setIndexDrawInfo); - oluacls_func(L, "setLineWidth", _cocos2d_CustomCommand_setLineWidth); - oluacls_func(L, "setPrimitiveType", _cocos2d_CustomCommand_setPrimitiveType); - oluacls_func(L, "setVertexBuffer", _cocos2d_CustomCommand_setVertexBuffer); - oluacls_func(L, "setVertexDrawInfo", _cocos2d_CustomCommand_setVertexDrawInfo); - oluacls_func(L, "updateIndexBuffer", _cocos2d_CustomCommand_updateIndexBuffer); - oluacls_func(L, "updateVertexBuffer", _cocos2d_CustomCommand_updateVertexBuffer); - oluacls_prop(L, "afterCallback", _cocos2d_CustomCommand_getAfterCallback, _cocos2d_CustomCommand_setAfterCallback); - oluacls_prop(L, "beforeCallback", _cocos2d_CustomCommand_getBeforeCallback, _cocos2d_CustomCommand_setBeforeCallback); - oluacls_prop(L, "drawType", _cocos2d_CustomCommand_getDrawType, _cocos2d_CustomCommand_setDrawType); - oluacls_prop(L, "indexCapacity", _cocos2d_CustomCommand_getIndexCapacity, nullptr); - oluacls_prop(L, "indexDrawCount", _cocos2d_CustomCommand_getIndexDrawCount, nullptr); - oluacls_prop(L, "indexDrawOffset", _cocos2d_CustomCommand_getIndexDrawOffset, nullptr); - oluacls_prop(L, "indexFormat", _cocos2d_CustomCommand_getIndexFormat, nullptr); - oluacls_prop(L, "lineWidth", _cocos2d_CustomCommand_getLineWidth, _cocos2d_CustomCommand_setLineWidth); - oluacls_prop(L, "primitiveType", _cocos2d_CustomCommand_getPrimitiveType, _cocos2d_CustomCommand_setPrimitiveType); - oluacls_prop(L, "vertexBuffer", _cocos2d_CustomCommand_getVertexBuffer, _cocos2d_CustomCommand_setVertexBuffer); - oluacls_prop(L, "vertexCapacity", _cocos2d_CustomCommand_getVertexCapacity, nullptr); - oluacls_prop(L, "vertexDrawCount", _cocos2d_CustomCommand_getVertexDrawCount, nullptr); - oluacls_prop(L, "vertexDrawStart", _cocos2d_CustomCommand_getVertexDrawStart, nullptr); - oluacls_prop(L, "func", _cocos2d_CustomCommand_get_func, _cocos2d_CustomCommand_set_func); - + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.CustomCommand")) { + luaL_error(L, "class not found: cocos2d::CustomCommand"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_MeshCommand_init$1(lua_State *L) +static int _olua_fun_cocos2d_MeshCommand_init$1(lua_State *L) { olua_startinvoke(L); @@ -16838,41 +18163,41 @@ static int _cocos2d_MeshCommand_init$1(lua_State *L) return 0; } -static int _cocos2d_MeshCommand_init$2(lua_State *L) +static int _olua_fun_cocos2d_MeshCommand_init$2(lua_State *L) { olua_startinvoke(L); cocos2d::MeshCommand *self = nullptr; float arg1 = 0; /** globalZOrder */ - cocos2d::Mat4 arg2; /** transform */ + cocos2d::Mat4 *arg2; /** transform */ olua_to_object(L, 1, &self, "cc.MeshCommand"); olua_check_number(L, 2, &arg1); olua_check_object(L, 3, &arg2, "cc.Mat4"); // void init(float globalZOrder, const cocos2d::Mat4 &transform) - self->init(arg1, arg2); + self->init(arg1, *arg2); olua_endinvoke(L); return 0; } -static int _cocos2d_MeshCommand_init(lua_State *L) +static int _olua_fun_cocos2d_MeshCommand_init(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_number(L, 2))) { // @using void init(float globalZOrder) - return _cocos2d_MeshCommand_init$1(L); + return _olua_fun_cocos2d_MeshCommand_init$1(L); // } } if (num_args == 2) { // if ((olua_is_number(L, 2)) && (olua_is_object(L, 3, "cc.Mat4"))) { // void init(float globalZOrder, const cocos2d::Mat4 &transform) - return _cocos2d_MeshCommand_init$2(L); + return _olua_fun_cocos2d_MeshCommand_init$2(L); // } } @@ -16881,11 +18206,11 @@ static int _cocos2d_MeshCommand_init(lua_State *L) return 0; } -static int _cocos2d_MeshCommand_new$1(lua_State *L) +static int _olua_fun_cocos2d_MeshCommand_new(lua_State *L) { olua_startinvoke(L); - // MeshCommand() + // cocos2d::MeshCommand() cocos2d::MeshCommand *ret = new cocos2d::MeshCommand(); int num_ret = olua_push_object(L, ret, "cc.MeshCommand"); olua_postnew(L, ret); @@ -16895,52 +18220,22 @@ static int _cocos2d_MeshCommand_new$1(lua_State *L) return num_ret; } -static int _cocos2d_MeshCommand_new$2(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::MeshCommand arg1; /** */ - - olua_check_object(L, 1, &arg1, "cc.MeshCommand"); - - // MeshCommand(const cocos2d::MeshCommand &) - cocos2d::MeshCommand *ret = new cocos2d::MeshCommand(arg1); - int num_ret = olua_push_object(L, ret, "cc.MeshCommand"); - olua_postnew(L, ret); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_MeshCommand_new(lua_State *L) +static int _olua_cls_cc_MeshCommand(lua_State *L) { - int num_args = lua_gettop(L); - - if (num_args == 0) { - // MeshCommand() - return _cocos2d_MeshCommand_new$1(L); - } - - if (num_args == 1) { - // if ((olua_is_object(L, 1, "cc.MeshCommand"))) { - // MeshCommand(const cocos2d::MeshCommand &) - return _cocos2d_MeshCommand_new$2(L); - // } - } - - luaL_error(L, "method 'cocos2d::MeshCommand::new' not support '%d' arguments", num_args); + oluacls_class(L, "cc.MeshCommand"); + oluacls_func(L, "init", _olua_fun_cocos2d_MeshCommand_init); + oluacls_func(L, "new", _olua_fun_cocos2d_MeshCommand_new); - return 0; + return 1; } OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_MeshCommand(lua_State *L) +OLUA_LIB int luaopen_cc_MeshCommand(lua_State *L) { - oluacls_class(L, "cc.MeshCommand"); - oluacls_func(L, "init", _cocos2d_MeshCommand_init); - oluacls_func(L, "new", _cocos2d_MeshCommand_new); - + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.MeshCommand")) { + luaL_error(L, "class not found: cocos2d::MeshCommand"); + } return 1; } OLUA_END_DECLS @@ -16950,7 +18245,7 @@ static const std::string makeTextureCacheCallbackTag(const std::string &key) return "addImageAsync." + key; } -static int _cocos2d_TextureCache_addImage$1(lua_State *L) +static int _olua_fun_cocos2d_TextureCache_addImage$1(lua_State *L) { olua_startinvoke(L); @@ -16969,7 +18264,7 @@ static int _cocos2d_TextureCache_addImage$1(lua_State *L) return num_ret; } -static int _cocos2d_TextureCache_addImage$2(lua_State *L) +static int _olua_fun_cocos2d_TextureCache_addImage$2(lua_State *L) { olua_startinvoke(L); @@ -16990,21 +18285,21 @@ static int _cocos2d_TextureCache_addImage$2(lua_State *L) return num_ret; } -static int _cocos2d_TextureCache_addImage(lua_State *L) +static int _olua_fun_cocos2d_TextureCache_addImage(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_string(L, 2))) { // cocos2d::Texture2D *addImage(const std::string &filepath) - return _cocos2d_TextureCache_addImage$1(L); + return _olua_fun_cocos2d_TextureCache_addImage$1(L); // } } if (num_args == 2) { // if ((olua_is_object(L, 2, "cc.Image")) && (olua_is_string(L, 3))) { // cocos2d::Texture2D *addImage(cocos2d::Image *image, const std::string &key) - return _cocos2d_TextureCache_addImage$2(L); + return _olua_fun_cocos2d_TextureCache_addImage$2(L); // } } @@ -17013,7 +18308,7 @@ static int _cocos2d_TextureCache_addImage(lua_State *L) return 0; } -static int _cocos2d_TextureCache_addImageAsync$1(lua_State *L) +static int _olua_fun_cocos2d_TextureCache_addImageAsync$1(lua_State *L) { olua_startinvoke(L); @@ -17027,15 +18322,16 @@ static int _cocos2d_TextureCache_addImageAsync$1(lua_State *L) void *cb_store = (void *)self; std::string cb_tag = makeTextureCacheCallbackTag(arg1); - std::string cb_name = olua_setcallback(L, cb_store, 3, cb_tag.c_str(), OLUA_TAG_REPLACE); + std::string cb_name = olua_setcallback(L, cb_store, 3, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg2 = [cb_store, cb_name, cb_ctx](cocos2d::Texture2D *arg1) { + // lua_State *ML = olua_mainthread(L); + arg2 = [cb_store, cb_name, cb_ctx /*, ML */](cocos2d::Texture2D *cb_arg1) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); if (olua_contextequal(L, cb_ctx)) { int top = lua_gettop(L); - olua_push_object(L, arg1, "cc.Texture2D"); + olua_push_object(L, cb_arg1, "cc.Texture2D"); olua_callback(L, cb_store, cb_name.c_str(), 1); @@ -17053,7 +18349,7 @@ static int _cocos2d_TextureCache_addImageAsync$1(lua_State *L) return 0; } -static int _cocos2d_TextureCache_addImageAsync$2(lua_State *L) +static int _olua_fun_cocos2d_TextureCache_addImageAsync$2(lua_State *L) { olua_startinvoke(L); @@ -17069,15 +18365,16 @@ static int _cocos2d_TextureCache_addImageAsync$2(lua_State *L) void *cb_store = (void *)self; std::string cb_tag = makeTextureCacheCallbackTag(arg3); - std::string cb_name = olua_setcallback(L, cb_store, 3, cb_tag.c_str(), OLUA_TAG_REPLACE); + std::string cb_name = olua_setcallback(L, cb_store, 3, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg2 = [cb_store, cb_name, cb_ctx](cocos2d::Texture2D *arg1) { + // lua_State *ML = olua_mainthread(L); + arg2 = [cb_store, cb_name, cb_ctx /*, ML */](cocos2d::Texture2D *cb_arg1) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); if (olua_contextequal(L, cb_ctx)) { int top = lua_gettop(L); - olua_push_object(L, arg1, "cc.Texture2D"); + olua_push_object(L, cb_arg1, "cc.Texture2D"); olua_callback(L, cb_store, cb_name.c_str(), 1); @@ -17095,21 +18392,21 @@ static int _cocos2d_TextureCache_addImageAsync$2(lua_State *L) return 0; } -static int _cocos2d_TextureCache_addImageAsync(lua_State *L) +static int _olua_fun_cocos2d_TextureCache_addImageAsync(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 2) { // if ((olua_is_string(L, 2)) && (olua_is_callback(L, 3, "std.function"))) { // void addImageAsync(const std::string &filepath, const std::function &callback) - return _cocos2d_TextureCache_addImageAsync$1(L); + return _olua_fun_cocos2d_TextureCache_addImageAsync$1(L); // } } if (num_args == 3) { // if ((olua_is_string(L, 2)) && (olua_is_callback(L, 3, "std.function")) && (olua_is_string(L, 4))) { // void addImageAsync(const std::string &path, const std::function &callback, const std::string &callbackKey) - return _cocos2d_TextureCache_addImageAsync$2(L); + return _olua_fun_cocos2d_TextureCache_addImageAsync$2(L); // } } @@ -17118,7 +18415,7 @@ static int _cocos2d_TextureCache_addImageAsync(lua_State *L) return 0; } -static int _cocos2d_TextureCache_getCachedTextureInfo(lua_State *L) +static int _olua_fun_cocos2d_TextureCache_getCachedTextureInfo(lua_State *L) { olua_startinvoke(L); @@ -17135,7 +18432,7 @@ static int _cocos2d_TextureCache_getCachedTextureInfo(lua_State *L) return num_ret; } -static int _cocos2d_TextureCache_getDescription(lua_State *L) +static int _olua_fun_cocos2d_TextureCache_getDescription(lua_State *L) { olua_startinvoke(L); @@ -17152,7 +18449,7 @@ static int _cocos2d_TextureCache_getDescription(lua_State *L) return num_ret; } -static int _cocos2d_TextureCache_getETC1AlphaFileSuffix(lua_State *L) +static int _olua_fun_cocos2d_TextureCache_getETC1AlphaFileSuffix(lua_State *L) { olua_startinvoke(L); @@ -17165,7 +18462,7 @@ static int _cocos2d_TextureCache_getETC1AlphaFileSuffix(lua_State *L) return num_ret; } -static int _cocos2d_TextureCache_getTextureFilePath(lua_State *L) +static int _olua_fun_cocos2d_TextureCache_getTextureFilePath(lua_State *L) { olua_startinvoke(L); @@ -17184,7 +18481,7 @@ static int _cocos2d_TextureCache_getTextureFilePath(lua_State *L) return num_ret; } -static int _cocos2d_TextureCache_getTextureForKey(lua_State *L) +static int _olua_fun_cocos2d_TextureCache_getTextureForKey(lua_State *L) { olua_startinvoke(L); @@ -17203,11 +18500,11 @@ static int _cocos2d_TextureCache_getTextureForKey(lua_State *L) return num_ret; } -static int _cocos2d_TextureCache_new(lua_State *L) +static int _olua_fun_cocos2d_TextureCache_new(lua_State *L) { olua_startinvoke(L); - // TextureCache() + // cocos2d::TextureCache() cocos2d::TextureCache *ret = new cocos2d::TextureCache(); int num_ret = olua_push_object(L, ret, "cc.TextureCache"); olua_postnew(L, ret); @@ -17217,7 +18514,7 @@ static int _cocos2d_TextureCache_new(lua_State *L) return num_ret; } -static int _cocos2d_TextureCache_reloadTexture(lua_State *L) +static int _olua_fun_cocos2d_TextureCache_reloadTexture(lua_State *L) { olua_startinvoke(L); @@ -17236,7 +18533,7 @@ static int _cocos2d_TextureCache_reloadTexture(lua_State *L) return num_ret; } -static int _cocos2d_TextureCache_removeAllTextures(lua_State *L) +static int _olua_fun_cocos2d_TextureCache_removeAllTextures(lua_State *L) { olua_startinvoke(L); @@ -17252,7 +18549,7 @@ static int _cocos2d_TextureCache_removeAllTextures(lua_State *L) return 0; } -static int _cocos2d_TextureCache_removeTexture(lua_State *L) +static int _olua_fun_cocos2d_TextureCache_removeTexture(lua_State *L) { olua_startinvoke(L); @@ -17270,7 +18567,7 @@ static int _cocos2d_TextureCache_removeTexture(lua_State *L) return 0; } -static int _cocos2d_TextureCache_removeTextureForKey(lua_State *L) +static int _olua_fun_cocos2d_TextureCache_removeTextureForKey(lua_State *L) { olua_startinvoke(L); @@ -17288,7 +18585,7 @@ static int _cocos2d_TextureCache_removeTextureForKey(lua_State *L) return 0; } -static int _cocos2d_TextureCache_removeUnusedTextures(lua_State *L) +static int _olua_fun_cocos2d_TextureCache_removeUnusedTextures(lua_State *L) { olua_startinvoke(L); @@ -17304,7 +18601,7 @@ static int _cocos2d_TextureCache_removeUnusedTextures(lua_State *L) return 0; } -static int _cocos2d_TextureCache_renameTextureWithKey(lua_State *L) +static int _olua_fun_cocos2d_TextureCache_renameTextureWithKey(lua_State *L) { olua_startinvoke(L); @@ -17324,7 +18621,7 @@ static int _cocos2d_TextureCache_renameTextureWithKey(lua_State *L) return 0; } -static int _cocos2d_TextureCache_setETC1AlphaFileSuffix(lua_State *L) +static int _olua_fun_cocos2d_TextureCache_setETC1AlphaFileSuffix(lua_State *L) { olua_startinvoke(L); @@ -17340,7 +18637,7 @@ static int _cocos2d_TextureCache_setETC1AlphaFileSuffix(lua_State *L) return 0; } -static int _cocos2d_TextureCache_unbindAllImageAsync(lua_State *L) +static int _olua_fun_cocos2d_TextureCache_unbindAllImageAsync(lua_State *L) { olua_startinvoke(L); @@ -17360,7 +18657,7 @@ static int _cocos2d_TextureCache_unbindAllImageAsync(lua_State *L) return 0; } -static int _cocos2d_TextureCache_unbindImageAsync(lua_State *L) +static int _olua_fun_cocos2d_TextureCache_unbindImageAsync(lua_State *L) { olua_startinvoke(L); @@ -17382,7 +18679,7 @@ static int _cocos2d_TextureCache_unbindImageAsync(lua_State *L) return 0; } -static int _cocos2d_TextureCache_waitForQuit(lua_State *L) +static int _olua_fun_cocos2d_TextureCache_waitForQuit(lua_State *L) { olua_startinvoke(L); @@ -17398,42 +18695,51 @@ static int _cocos2d_TextureCache_waitForQuit(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_TextureCache(lua_State *L) +static int _olua_cls_cc_TextureCache(lua_State *L) { oluacls_class(L, "cc.TextureCache"); - oluacls_func(L, "addImage", _cocos2d_TextureCache_addImage); - oluacls_func(L, "addImageAsync", _cocos2d_TextureCache_addImageAsync); - oluacls_func(L, "getCachedTextureInfo", _cocos2d_TextureCache_getCachedTextureInfo); - oluacls_func(L, "getDescription", _cocos2d_TextureCache_getDescription); - oluacls_func(L, "getETC1AlphaFileSuffix", _cocos2d_TextureCache_getETC1AlphaFileSuffix); - oluacls_func(L, "getTextureFilePath", _cocos2d_TextureCache_getTextureFilePath); - oluacls_func(L, "getTextureForKey", _cocos2d_TextureCache_getTextureForKey); - oluacls_func(L, "new", _cocos2d_TextureCache_new); - oluacls_func(L, "reloadTexture", _cocos2d_TextureCache_reloadTexture); - oluacls_func(L, "removeAllTextures", _cocos2d_TextureCache_removeAllTextures); - oluacls_func(L, "removeTexture", _cocos2d_TextureCache_removeTexture); - oluacls_func(L, "removeTextureForKey", _cocos2d_TextureCache_removeTextureForKey); - oluacls_func(L, "removeUnusedTextures", _cocos2d_TextureCache_removeUnusedTextures); - oluacls_func(L, "renameTextureWithKey", _cocos2d_TextureCache_renameTextureWithKey); - oluacls_func(L, "setETC1AlphaFileSuffix", _cocos2d_TextureCache_setETC1AlphaFileSuffix); - oluacls_func(L, "unbindAllImageAsync", _cocos2d_TextureCache_unbindAllImageAsync); - oluacls_func(L, "unbindImageAsync", _cocos2d_TextureCache_unbindImageAsync); - oluacls_func(L, "waitForQuit", _cocos2d_TextureCache_waitForQuit); - oluacls_prop(L, "cachedTextureInfo", _cocos2d_TextureCache_getCachedTextureInfo, nullptr); - oluacls_prop(L, "description", _cocos2d_TextureCache_getDescription, nullptr); - oluacls_prop(L, "etC1AlphaFileSuffix", _cocos2d_TextureCache_getETC1AlphaFileSuffix, _cocos2d_TextureCache_setETC1AlphaFileSuffix); + oluacls_func(L, "addImage", _olua_fun_cocos2d_TextureCache_addImage); + oluacls_func(L, "addImageAsync", _olua_fun_cocos2d_TextureCache_addImageAsync); + oluacls_func(L, "getCachedTextureInfo", _olua_fun_cocos2d_TextureCache_getCachedTextureInfo); + oluacls_func(L, "getDescription", _olua_fun_cocos2d_TextureCache_getDescription); + oluacls_func(L, "getETC1AlphaFileSuffix", _olua_fun_cocos2d_TextureCache_getETC1AlphaFileSuffix); + oluacls_func(L, "getTextureFilePath", _olua_fun_cocos2d_TextureCache_getTextureFilePath); + oluacls_func(L, "getTextureForKey", _olua_fun_cocos2d_TextureCache_getTextureForKey); + oluacls_func(L, "new", _olua_fun_cocos2d_TextureCache_new); + oluacls_func(L, "reloadTexture", _olua_fun_cocos2d_TextureCache_reloadTexture); + oluacls_func(L, "removeAllTextures", _olua_fun_cocos2d_TextureCache_removeAllTextures); + oluacls_func(L, "removeTexture", _olua_fun_cocos2d_TextureCache_removeTexture); + oluacls_func(L, "removeTextureForKey", _olua_fun_cocos2d_TextureCache_removeTextureForKey); + oluacls_func(L, "removeUnusedTextures", _olua_fun_cocos2d_TextureCache_removeUnusedTextures); + oluacls_func(L, "renameTextureWithKey", _olua_fun_cocos2d_TextureCache_renameTextureWithKey); + oluacls_func(L, "setETC1AlphaFileSuffix", _olua_fun_cocos2d_TextureCache_setETC1AlphaFileSuffix); + oluacls_func(L, "unbindAllImageAsync", _olua_fun_cocos2d_TextureCache_unbindAllImageAsync); + oluacls_func(L, "unbindImageAsync", _olua_fun_cocos2d_TextureCache_unbindImageAsync); + oluacls_func(L, "waitForQuit", _olua_fun_cocos2d_TextureCache_waitForQuit); + oluacls_prop(L, "cachedTextureInfo", _olua_fun_cocos2d_TextureCache_getCachedTextureInfo, nullptr); + oluacls_prop(L, "description", _olua_fun_cocos2d_TextureCache_getDescription, nullptr); + oluacls_prop(L, "etC1AlphaFileSuffix", _olua_fun_cocos2d_TextureCache_getETC1AlphaFileSuffix, _olua_fun_cocos2d_TextureCache_setETC1AlphaFileSuffix); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_TextureCache(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.TextureCache")) { + luaL_error(L, "class not found: cocos2d::TextureCache"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_Texture2D_drawAtPoint(lua_State *L) +static int _olua_fun_cocos2d_Texture2D_drawAtPoint(lua_State *L) { olua_startinvoke(L); cocos2d::Texture2D *self = nullptr; - cocos2d::Vec2 arg1; /** point */ + cocos2d::Vec2 *arg1; /** point */ float arg2 = 0; /** globalZOrder */ olua_to_object(L, 1, &self, "cc.Texture2D"); @@ -17441,19 +18747,19 @@ static int _cocos2d_Texture2D_drawAtPoint(lua_State *L) olua_check_number(L, 3, &arg2); // void drawAtPoint(const cocos2d::Vec2 &point, float globalZOrder) - self->drawAtPoint(arg1, arg2); + self->drawAtPoint(*arg1, arg2); olua_endinvoke(L); return 0; } -static int _cocos2d_Texture2D_drawInRect(lua_State *L) +static int _olua_fun_cocos2d_Texture2D_drawInRect(lua_State *L) { olua_startinvoke(L); cocos2d::Texture2D *self = nullptr; - cocos2d::Rect arg1; /** rect */ + cocos2d::Rect *arg1; /** rect */ float arg2 = 0; /** globalZOrder */ olua_to_object(L, 1, &self, "cc.Texture2D"); @@ -17461,14 +18767,14 @@ static int _cocos2d_Texture2D_drawInRect(lua_State *L) olua_check_number(L, 3, &arg2); // void drawInRect(const cocos2d::Rect &rect, float globalZOrder) - self->drawInRect(arg1, arg2); + self->drawInRect(*arg1, arg2); olua_endinvoke(L); return 0; } -static int _cocos2d_Texture2D_generateMipmap(lua_State *L) +static int _olua_fun_cocos2d_Texture2D_generateMipmap(lua_State *L) { olua_startinvoke(L); @@ -17484,7 +18790,7 @@ static int _cocos2d_Texture2D_generateMipmap(lua_State *L) return 0; } -static int _cocos2d_Texture2D_getAlphaTexture(lua_State *L) +static int _olua_fun_cocos2d_Texture2D_getAlphaTexture(lua_State *L) { olua_startinvoke(L); @@ -17501,7 +18807,7 @@ static int _cocos2d_Texture2D_getAlphaTexture(lua_State *L) return num_ret; } -static int _cocos2d_Texture2D_getAlphaTextureName(lua_State *L) +static int _olua_fun_cocos2d_Texture2D_getAlphaTextureName(lua_State *L) { olua_startinvoke(L); @@ -17518,7 +18824,7 @@ static int _cocos2d_Texture2D_getAlphaTextureName(lua_State *L) return num_ret; } -static int _cocos2d_Texture2D_getBackendTexture(lua_State *L) +static int _olua_fun_cocos2d_Texture2D_getBackendTexture(lua_State *L) { olua_startinvoke(L); @@ -17535,7 +18841,7 @@ static int _cocos2d_Texture2D_getBackendTexture(lua_State *L) return num_ret; } -static int _cocos2d_Texture2D_getBitsPerPixelForFormat$1(lua_State *L) +static int _olua_fun_cocos2d_Texture2D_getBitsPerPixelForFormat$1(lua_State *L) { olua_startinvoke(L); @@ -17552,7 +18858,7 @@ static int _cocos2d_Texture2D_getBitsPerPixelForFormat$1(lua_State *L) return num_ret; } -static int _cocos2d_Texture2D_getBitsPerPixelForFormat$2(lua_State *L) +static int _olua_fun_cocos2d_Texture2D_getBitsPerPixelForFormat$2(lua_State *L) { olua_startinvoke(L); @@ -17571,19 +18877,19 @@ static int _cocos2d_Texture2D_getBitsPerPixelForFormat$2(lua_State *L) return num_ret; } -static int _cocos2d_Texture2D_getBitsPerPixelForFormat(lua_State *L) +static int _olua_fun_cocos2d_Texture2D_getBitsPerPixelForFormat(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 0) { // unsigned int getBitsPerPixelForFormat() - return _cocos2d_Texture2D_getBitsPerPixelForFormat$1(L); + return _olua_fun_cocos2d_Texture2D_getBitsPerPixelForFormat$1(L); } if (num_args == 1) { // if ((olua_is_enum(L, 2))) { // unsigned int getBitsPerPixelForFormat(cocos2d::backend::PixelFormat format) - return _cocos2d_Texture2D_getBitsPerPixelForFormat$2(L); + return _olua_fun_cocos2d_Texture2D_getBitsPerPixelForFormat$2(L); // } } @@ -17592,7 +18898,7 @@ static int _cocos2d_Texture2D_getBitsPerPixelForFormat(lua_State *L) return 0; } -static int _cocos2d_Texture2D_getContentSize(lua_State *L) +static int _olua_fun_cocos2d_Texture2D_getContentSize(lua_State *L) { olua_startinvoke(L); @@ -17602,14 +18908,14 @@ static int _cocos2d_Texture2D_getContentSize(lua_State *L) // cocos2d::Size getContentSize() cocos2d::Size ret = self->getContentSize(); - int num_ret = olua_pushcopy_object(L, ret, "cc.Size"); + int num_ret = olua_copy_object(L, ret, "cc.Size"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_Texture2D_getContentSizeInPixels(lua_State *L) +static int _olua_fun_cocos2d_Texture2D_getContentSizeInPixels(lua_State *L) { olua_startinvoke(L); @@ -17626,7 +18932,7 @@ static int _cocos2d_Texture2D_getContentSizeInPixels(lua_State *L) return num_ret; } -static int _cocos2d_Texture2D_getDefaultAlphaPixelFormat(lua_State *L) +static int _olua_fun_cocos2d_Texture2D_getDefaultAlphaPixelFormat(lua_State *L) { olua_startinvoke(L); @@ -17639,7 +18945,7 @@ static int _cocos2d_Texture2D_getDefaultAlphaPixelFormat(lua_State *L) return num_ret; } -static int _cocos2d_Texture2D_getMaxS(lua_State *L) +static int _olua_fun_cocos2d_Texture2D_getMaxS(lua_State *L) { olua_startinvoke(L); @@ -17656,7 +18962,7 @@ static int _cocos2d_Texture2D_getMaxS(lua_State *L) return num_ret; } -static int _cocos2d_Texture2D_getMaxT(lua_State *L) +static int _olua_fun_cocos2d_Texture2D_getMaxT(lua_State *L) { olua_startinvoke(L); @@ -17673,7 +18979,7 @@ static int _cocos2d_Texture2D_getMaxT(lua_State *L) return num_ret; } -static int _cocos2d_Texture2D_getPath(lua_State *L) +static int _olua_fun_cocos2d_Texture2D_getPath(lua_State *L) { olua_startinvoke(L); @@ -17690,7 +18996,7 @@ static int _cocos2d_Texture2D_getPath(lua_State *L) return num_ret; } -static int _cocos2d_Texture2D_getPixelFormat(lua_State *L) +static int _olua_fun_cocos2d_Texture2D_getPixelFormat(lua_State *L) { olua_startinvoke(L); @@ -17707,7 +19013,7 @@ static int _cocos2d_Texture2D_getPixelFormat(lua_State *L) return num_ret; } -static int _cocos2d_Texture2D_getPixelFormatInfoMap(lua_State *L) +static int _olua_fun_cocos2d_Texture2D_getPixelFormatInfoMap(lua_State *L) { olua_startinvoke(L); @@ -17715,7 +19021,7 @@ static int _cocos2d_Texture2D_getPixelFormatInfoMap(lua_State *L) const std::map &ret = cocos2d::Texture2D::getPixelFormatInfoMap(); int num_ret = olua_push_map(L, ret, [L](cocos2d::backend::PixelFormat &arg1, const cocos2d::Texture2D::PixelFormatInfo &arg2) { olua_push_enum(L, arg1); - olua_pushcopy_object(L, arg2, "cc.Texture2D.PixelFormatInfo"); + olua_copy_object(L, arg2, "cc.Texture2D.PixelFormatInfo"); }); olua_endinvoke(L); @@ -17723,7 +19029,7 @@ static int _cocos2d_Texture2D_getPixelFormatInfoMap(lua_State *L) return num_ret; } -static int _cocos2d_Texture2D_getPixelsHigh(lua_State *L) +static int _olua_fun_cocos2d_Texture2D_getPixelsHigh(lua_State *L) { olua_startinvoke(L); @@ -17740,7 +19046,7 @@ static int _cocos2d_Texture2D_getPixelsHigh(lua_State *L) return num_ret; } -static int _cocos2d_Texture2D_getPixelsWide(lua_State *L) +static int _olua_fun_cocos2d_Texture2D_getPixelsWide(lua_State *L) { olua_startinvoke(L); @@ -17757,7 +19063,7 @@ static int _cocos2d_Texture2D_getPixelsWide(lua_State *L) return num_ret; } -static int _cocos2d_Texture2D_getStringForFormat(lua_State *L) +static int _olua_fun_cocos2d_Texture2D_getStringForFormat(lua_State *L) { olua_startinvoke(L); @@ -17774,7 +19080,7 @@ static int _cocos2d_Texture2D_getStringForFormat(lua_State *L) return num_ret; } -static int _cocos2d_Texture2D_hasMipmaps(lua_State *L) +static int _olua_fun_cocos2d_Texture2D_hasMipmaps(lua_State *L) { olua_startinvoke(L); @@ -17791,7 +19097,7 @@ static int _cocos2d_Texture2D_hasMipmaps(lua_State *L) return num_ret; } -static int _cocos2d_Texture2D_hasPremultipliedAlpha(lua_State *L) +static int _olua_fun_cocos2d_Texture2D_hasPremultipliedAlpha(lua_State *L) { olua_startinvoke(L); @@ -17808,7 +19114,7 @@ static int _cocos2d_Texture2D_hasPremultipliedAlpha(lua_State *L) return num_ret; } -static int _cocos2d_Texture2D_initWithBackendTexture$1(lua_State *L) +static int _olua_fun_cocos2d_Texture2D_initWithBackendTexture$1(lua_State *L) { olua_startinvoke(L); @@ -17829,7 +19135,7 @@ static int _cocos2d_Texture2D_initWithBackendTexture$1(lua_State *L) return num_ret; } -static int _cocos2d_Texture2D_initWithBackendTexture$2(lua_State *L) +static int _olua_fun_cocos2d_Texture2D_initWithBackendTexture$2(lua_State *L) { olua_startinvoke(L); @@ -17839,7 +19145,7 @@ static int _cocos2d_Texture2D_initWithBackendTexture$2(lua_State *L) olua_to_object(L, 1, &self, "cc.Texture2D"); olua_check_object(L, 2, &arg1, "ccb.TextureBackend"); - // bool initWithBackendTexture(cocos2d::backend::TextureBackend *texture, @optional bool preMultipliedAlpha) + // bool initWithBackendTexture(cocos2d::backend::TextureBackend *texture) bool ret = self->initWithBackendTexture(arg1); int num_ret = olua_push_bool(L, ret); @@ -17848,21 +19154,21 @@ static int _cocos2d_Texture2D_initWithBackendTexture$2(lua_State *L) return num_ret; } -static int _cocos2d_Texture2D_initWithBackendTexture(lua_State *L) +static int _olua_fun_cocos2d_Texture2D_initWithBackendTexture(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_object(L, 2, "ccb.TextureBackend"))) { - // bool initWithBackendTexture(cocos2d::backend::TextureBackend *texture, @optional bool preMultipliedAlpha) - return _cocos2d_Texture2D_initWithBackendTexture$2(L); + // bool initWithBackendTexture(cocos2d::backend::TextureBackend *texture) + return _olua_fun_cocos2d_Texture2D_initWithBackendTexture$2(L); // } } if (num_args == 2) { // if ((olua_is_object(L, 2, "ccb.TextureBackend")) && (olua_is_bool(L, 3))) { // bool initWithBackendTexture(cocos2d::backend::TextureBackend *texture, @optional bool preMultipliedAlpha) - return _cocos2d_Texture2D_initWithBackendTexture$1(L); + return _olua_fun_cocos2d_Texture2D_initWithBackendTexture$1(L); // } } @@ -17871,7 +19177,7 @@ static int _cocos2d_Texture2D_initWithBackendTexture(lua_State *L) return 0; } -static int _cocos2d_Texture2D_initWithData$1(lua_State *L) +static int _olua_fun_cocos2d_Texture2D_initWithData$1(lua_State *L) { olua_startinvoke(L); @@ -17881,7 +19187,7 @@ static int _cocos2d_Texture2D_initWithData$1(lua_State *L) cocos2d::backend::PixelFormat arg3 = (cocos2d::backend::PixelFormat)0; /** pixelFormat */ int arg4 = 0; /** pixelsWide */ int arg5 = 0; /** pixelsHigh */ - cocos2d::Size arg6; /** contentSize */ + cocos2d::Size *arg6; /** contentSize */ bool arg7 = false; /** preMultipliedAlpha */ olua_to_object(L, 1, &self, "cc.Texture2D"); @@ -17894,7 +19200,36 @@ static int _cocos2d_Texture2D_initWithData$1(lua_State *L) olua_check_bool(L, 8, &arg7); // bool initWithData(const void *data, ssize_t dataLen, cocos2d::backend::PixelFormat pixelFormat, int pixelsWide, int pixelsHigh, const cocos2d::Size &contentSize, @optional bool preMultipliedAlpha) - bool ret = self->initWithData(arg1, arg2, arg3, arg4, arg5, arg6, arg7); + bool ret = self->initWithData(arg1, arg2, arg3, arg4, arg5, *arg6, arg7); + int num_ret = olua_push_bool(L, ret); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_cocos2d_Texture2D_initWithData$2(lua_State *L) +{ + olua_startinvoke(L); + + cocos2d::Texture2D *self = nullptr; + void *arg1 = nullptr; /** data */ + ssize_t arg2 = 0; /** dataLen */ + cocos2d::backend::PixelFormat arg3 = (cocos2d::backend::PixelFormat)0; /** pixelFormat */ + int arg4 = 0; /** pixelsWide */ + int arg5 = 0; /** pixelsHigh */ + cocos2d::Size *arg6; /** contentSize */ + + olua_to_object(L, 1, &self, "cc.Texture2D"); + olua_check_object(L, 2, &arg1, "void *"); + olua_check_integer(L, 3, &arg2); + olua_check_enum(L, 4, &arg3); + olua_check_integer(L, 5, &arg4); + olua_check_integer(L, 6, &arg5); + olua_check_object(L, 7, &arg6, "cc.Size"); + + // bool initWithData(const void *data, ssize_t dataLen, cocos2d::backend::PixelFormat pixelFormat, int pixelsWide, int pixelsHigh, const cocos2d::Size &contentSize) + bool ret = self->initWithData(arg1, arg2, arg3, arg4, arg5, *arg6); int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); @@ -17902,7 +19237,7 @@ static int _cocos2d_Texture2D_initWithData$1(lua_State *L) return num_ret; } -static int _cocos2d_Texture2D_initWithData$2(lua_State *L) +static int _olua_fun_cocos2d_Texture2D_initWithData$3(lua_State *L) { olua_startinvoke(L); @@ -17913,7 +19248,7 @@ static int _cocos2d_Texture2D_initWithData$2(lua_State *L) cocos2d::backend::PixelFormat arg4 = (cocos2d::backend::PixelFormat)0; /** renderFormat */ int arg5 = 0; /** pixelsWide */ int arg6 = 0; /** pixelsHigh */ - cocos2d::Size arg7; /** contentSize */ + cocos2d::Size *arg7; /** contentSize */ bool arg8 = false; /** preMultipliedAlpha */ olua_to_object(L, 1, &self, "cc.Texture2D"); @@ -17927,7 +19262,7 @@ static int _cocos2d_Texture2D_initWithData$2(lua_State *L) olua_check_bool(L, 9, &arg8); // bool initWithData(const void *data, ssize_t dataLen, cocos2d::backend::PixelFormat pixelFormat, cocos2d::backend::PixelFormat renderFormat, int pixelsWide, int pixelsHigh, const cocos2d::Size &contentSize, @optional bool preMultipliedAlpha) - bool ret = self->initWithData(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8); + bool ret = self->initWithData(arg1, arg2, arg3, arg4, arg5, arg6, *arg7, arg8); int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); @@ -17935,36 +19270,7 @@ static int _cocos2d_Texture2D_initWithData$2(lua_State *L) return num_ret; } -static int _cocos2d_Texture2D_initWithData$3(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::Texture2D *self = nullptr; - void *arg1 = nullptr; /** data */ - ssize_t arg2 = 0; /** dataLen */ - cocos2d::backend::PixelFormat arg3 = (cocos2d::backend::PixelFormat)0; /** pixelFormat */ - int arg4 = 0; /** pixelsWide */ - int arg5 = 0; /** pixelsHigh */ - cocos2d::Size arg6; /** contentSize */ - - olua_to_object(L, 1, &self, "cc.Texture2D"); - olua_check_object(L, 2, &arg1, "void *"); - olua_check_integer(L, 3, &arg2); - olua_check_enum(L, 4, &arg3); - olua_check_integer(L, 5, &arg4); - olua_check_integer(L, 6, &arg5); - olua_check_object(L, 7, &arg6, "cc.Size"); - - // bool initWithData(const void *data, ssize_t dataLen, cocos2d::backend::PixelFormat pixelFormat, int pixelsWide, int pixelsHigh, const cocos2d::Size &contentSize, @optional bool preMultipliedAlpha) - bool ret = self->initWithData(arg1, arg2, arg3, arg4, arg5, arg6); - int num_ret = olua_push_bool(L, ret); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_Texture2D_initWithData$4(lua_State *L) +static int _olua_fun_cocos2d_Texture2D_initWithData$4(lua_State *L) { olua_startinvoke(L); @@ -17975,7 +19281,7 @@ static int _cocos2d_Texture2D_initWithData$4(lua_State *L) cocos2d::backend::PixelFormat arg4 = (cocos2d::backend::PixelFormat)0; /** renderFormat */ int arg5 = 0; /** pixelsWide */ int arg6 = 0; /** pixelsHigh */ - cocos2d::Size arg7; /** contentSize */ + cocos2d::Size *arg7; /** contentSize */ olua_to_object(L, 1, &self, "cc.Texture2D"); olua_check_object(L, 2, &arg1, "void *"); @@ -17986,8 +19292,8 @@ static int _cocos2d_Texture2D_initWithData$4(lua_State *L) olua_check_integer(L, 7, &arg6); olua_check_object(L, 8, &arg7, "cc.Size"); - // bool initWithData(const void *data, ssize_t dataLen, cocos2d::backend::PixelFormat pixelFormat, cocos2d::backend::PixelFormat renderFormat, int pixelsWide, int pixelsHigh, const cocos2d::Size &contentSize, @optional bool preMultipliedAlpha) - bool ret = self->initWithData(arg1, arg2, arg3, arg4, arg5, arg6, arg7); + // bool initWithData(const void *data, ssize_t dataLen, cocos2d::backend::PixelFormat pixelFormat, cocos2d::backend::PixelFormat renderFormat, int pixelsWide, int pixelsHigh, const cocos2d::Size &contentSize) + bool ret = self->initWithData(arg1, arg2, arg3, arg4, arg5, arg6, *arg7); int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); @@ -17995,33 +19301,33 @@ static int _cocos2d_Texture2D_initWithData$4(lua_State *L) return num_ret; } -static int _cocos2d_Texture2D_initWithData(lua_State *L) +static int _olua_fun_cocos2d_Texture2D_initWithData(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 6) { // if ((olua_is_object(L, 2, "void *")) && (olua_is_integer(L, 3)) && (olua_is_enum(L, 4)) && (olua_is_integer(L, 5)) && (olua_is_integer(L, 6)) && (olua_is_object(L, 7, "cc.Size"))) { - // bool initWithData(const void *data, ssize_t dataLen, cocos2d::backend::PixelFormat pixelFormat, int pixelsWide, int pixelsHigh, const cocos2d::Size &contentSize, @optional bool preMultipliedAlpha) - return _cocos2d_Texture2D_initWithData$3(L); + // bool initWithData(const void *data, ssize_t dataLen, cocos2d::backend::PixelFormat pixelFormat, int pixelsWide, int pixelsHigh, const cocos2d::Size &contentSize) + return _olua_fun_cocos2d_Texture2D_initWithData$2(L); // } } if (num_args == 7) { if ((olua_is_object(L, 2, "void *")) && (olua_is_integer(L, 3)) && (olua_is_enum(L, 4)) && (olua_is_integer(L, 5)) && (olua_is_integer(L, 6)) && (olua_is_object(L, 7, "cc.Size")) && (olua_is_bool(L, 8))) { // bool initWithData(const void *data, ssize_t dataLen, cocos2d::backend::PixelFormat pixelFormat, int pixelsWide, int pixelsHigh, const cocos2d::Size &contentSize, @optional bool preMultipliedAlpha) - return _cocos2d_Texture2D_initWithData$1(L); + return _olua_fun_cocos2d_Texture2D_initWithData$1(L); } // if ((olua_is_object(L, 2, "void *")) && (olua_is_integer(L, 3)) && (olua_is_enum(L, 4)) && (olua_is_enum(L, 5)) && (olua_is_integer(L, 6)) && (olua_is_integer(L, 7)) && (olua_is_object(L, 8, "cc.Size"))) { - // bool initWithData(const void *data, ssize_t dataLen, cocos2d::backend::PixelFormat pixelFormat, cocos2d::backend::PixelFormat renderFormat, int pixelsWide, int pixelsHigh, const cocos2d::Size &contentSize, @optional bool preMultipliedAlpha) - return _cocos2d_Texture2D_initWithData$4(L); + // bool initWithData(const void *data, ssize_t dataLen, cocos2d::backend::PixelFormat pixelFormat, cocos2d::backend::PixelFormat renderFormat, int pixelsWide, int pixelsHigh, const cocos2d::Size &contentSize) + return _olua_fun_cocos2d_Texture2D_initWithData$4(L); // } } if (num_args == 8) { // if ((olua_is_object(L, 2, "void *")) && (olua_is_integer(L, 3)) && (olua_is_enum(L, 4)) && (olua_is_enum(L, 5)) && (olua_is_integer(L, 6)) && (olua_is_integer(L, 7)) && (olua_is_object(L, 8, "cc.Size")) && (olua_is_bool(L, 9))) { // bool initWithData(const void *data, ssize_t dataLen, cocos2d::backend::PixelFormat pixelFormat, cocos2d::backend::PixelFormat renderFormat, int pixelsWide, int pixelsHigh, const cocos2d::Size &contentSize, @optional bool preMultipliedAlpha) - return _cocos2d_Texture2D_initWithData$2(L); + return _olua_fun_cocos2d_Texture2D_initWithData$3(L); // } } @@ -18030,7 +19336,7 @@ static int _cocos2d_Texture2D_initWithData(lua_State *L) return 0; } -static int _cocos2d_Texture2D_initWithImage$1(lua_State *L) +static int _olua_fun_cocos2d_Texture2D_initWithImage$1(lua_State *L) { olua_startinvoke(L); @@ -18049,7 +19355,7 @@ static int _cocos2d_Texture2D_initWithImage$1(lua_State *L) return num_ret; } -static int _cocos2d_Texture2D_initWithImage$2(lua_State *L) +static int _olua_fun_cocos2d_Texture2D_initWithImage$2(lua_State *L) { olua_startinvoke(L); @@ -18070,21 +19376,21 @@ static int _cocos2d_Texture2D_initWithImage$2(lua_State *L) return num_ret; } -static int _cocos2d_Texture2D_initWithImage(lua_State *L) +static int _olua_fun_cocos2d_Texture2D_initWithImage(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_object(L, 2, "cc.Image"))) { // bool initWithImage(cocos2d::Image *image) - return _cocos2d_Texture2D_initWithImage$1(L); + return _olua_fun_cocos2d_Texture2D_initWithImage$1(L); // } } if (num_args == 2) { // if ((olua_is_object(L, 2, "cc.Image")) && (olua_is_enum(L, 3))) { // bool initWithImage(cocos2d::Image *image, cocos2d::backend::PixelFormat format) - return _cocos2d_Texture2D_initWithImage$2(L); + return _olua_fun_cocos2d_Texture2D_initWithImage$2(L); // } } @@ -18093,7 +19399,7 @@ static int _cocos2d_Texture2D_initWithImage(lua_State *L) return 0; } -static int _cocos2d_Texture2D_initWithString$1(lua_State *L) +static int _olua_fun_cocos2d_Texture2D_initWithString$1(lua_State *L) { olua_startinvoke(L); @@ -18101,7 +19407,7 @@ static int _cocos2d_Texture2D_initWithString$1(lua_State *L) const char *arg1 = nullptr; /** text */ std::string arg2; /** fontName */ float arg3 = 0; /** fontSize */ - cocos2d::Size arg4; /** dimensions */ + cocos2d::Size *arg4; /** dimensions */ cocos2d::TextHAlignment arg5 = (cocos2d::TextHAlignment)0; /** hAlignment */ cocos2d::TextVAlignment arg6 = (cocos2d::TextVAlignment)0; /** vAlignment */ bool arg7 = false; /** enableWrap */ @@ -18118,7 +19424,7 @@ static int _cocos2d_Texture2D_initWithString$1(lua_State *L) olua_check_integer(L, 9, &arg8); // bool initWithString(const char *text, const std::string &fontName, float fontSize, @optional const cocos2d::Size &dimensions, @optional cocos2d::TextHAlignment hAlignment, @optional cocos2d::TextVAlignment vAlignment, @optional bool enableWrap, @optional int overflow) - bool ret = self->initWithString(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8); + bool ret = self->initWithString(arg1, arg2, arg3, *arg4, arg5, arg6, arg7, arg8); int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); @@ -18126,7 +19432,7 @@ static int _cocos2d_Texture2D_initWithString$1(lua_State *L) return num_ret; } -static int _cocos2d_Texture2D_initWithString$2(lua_State *L) +static int _olua_fun_cocos2d_Texture2D_initWithString$2(lua_State *L) { olua_startinvoke(L); @@ -18140,7 +19446,7 @@ static int _cocos2d_Texture2D_initWithString$2(lua_State *L) olua_check_string(L, 3, &arg2); olua_check_number(L, 4, &arg3); - // bool initWithString(const char *text, const std::string &fontName, float fontSize, @optional const cocos2d::Size &dimensions, @optional cocos2d::TextHAlignment hAlignment, @optional cocos2d::TextVAlignment vAlignment, @optional bool enableWrap, @optional int overflow) + // bool initWithString(const char *text, const std::string &fontName, float fontSize) bool ret = self->initWithString(arg1, arg2, arg3); int num_ret = olua_push_bool(L, ret); @@ -18149,7 +19455,7 @@ static int _cocos2d_Texture2D_initWithString$2(lua_State *L) return num_ret; } -static int _cocos2d_Texture2D_initWithString$3(lua_State *L) +static int _olua_fun_cocos2d_Texture2D_initWithString$3(lua_State *L) { olua_startinvoke(L); @@ -18157,7 +19463,7 @@ static int _cocos2d_Texture2D_initWithString$3(lua_State *L) const char *arg1 = nullptr; /** text */ std::string arg2; /** fontName */ float arg3 = 0; /** fontSize */ - cocos2d::Size arg4; /** dimensions */ + cocos2d::Size *arg4; /** dimensions */ olua_to_object(L, 1, &self, "cc.Texture2D"); olua_check_string(L, 2, &arg1); @@ -18165,8 +19471,8 @@ static int _cocos2d_Texture2D_initWithString$3(lua_State *L) olua_check_number(L, 4, &arg3); olua_check_object(L, 5, &arg4, "cc.Size"); - // bool initWithString(const char *text, const std::string &fontName, float fontSize, @optional const cocos2d::Size &dimensions, @optional cocos2d::TextHAlignment hAlignment, @optional cocos2d::TextVAlignment vAlignment, @optional bool enableWrap, @optional int overflow) - bool ret = self->initWithString(arg1, arg2, arg3, arg4); + // bool initWithString(const char *text, const std::string &fontName, float fontSize, @optional const cocos2d::Size &dimensions) + bool ret = self->initWithString(arg1, arg2, arg3, *arg4); int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); @@ -18174,7 +19480,7 @@ static int _cocos2d_Texture2D_initWithString$3(lua_State *L) return num_ret; } -static int _cocos2d_Texture2D_initWithString$4(lua_State *L) +static int _olua_fun_cocos2d_Texture2D_initWithString$4(lua_State *L) { olua_startinvoke(L); @@ -18182,7 +19488,7 @@ static int _cocos2d_Texture2D_initWithString$4(lua_State *L) const char *arg1 = nullptr; /** text */ std::string arg2; /** fontName */ float arg3 = 0; /** fontSize */ - cocos2d::Size arg4; /** dimensions */ + cocos2d::Size *arg4; /** dimensions */ cocos2d::TextHAlignment arg5 = (cocos2d::TextHAlignment)0; /** hAlignment */ olua_to_object(L, 1, &self, "cc.Texture2D"); @@ -18192,8 +19498,8 @@ static int _cocos2d_Texture2D_initWithString$4(lua_State *L) olua_check_object(L, 5, &arg4, "cc.Size"); olua_check_enum(L, 6, &arg5); - // bool initWithString(const char *text, const std::string &fontName, float fontSize, @optional const cocos2d::Size &dimensions, @optional cocos2d::TextHAlignment hAlignment, @optional cocos2d::TextVAlignment vAlignment, @optional bool enableWrap, @optional int overflow) - bool ret = self->initWithString(arg1, arg2, arg3, arg4, arg5); + // bool initWithString(const char *text, const std::string &fontName, float fontSize, @optional const cocos2d::Size &dimensions, @optional cocos2d::TextHAlignment hAlignment) + bool ret = self->initWithString(arg1, arg2, arg3, *arg4, arg5); int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); @@ -18201,7 +19507,7 @@ static int _cocos2d_Texture2D_initWithString$4(lua_State *L) return num_ret; } -static int _cocos2d_Texture2D_initWithString$5(lua_State *L) +static int _olua_fun_cocos2d_Texture2D_initWithString$5(lua_State *L) { olua_startinvoke(L); @@ -18209,7 +19515,7 @@ static int _cocos2d_Texture2D_initWithString$5(lua_State *L) const char *arg1 = nullptr; /** text */ std::string arg2; /** fontName */ float arg3 = 0; /** fontSize */ - cocos2d::Size arg4; /** dimensions */ + cocos2d::Size *arg4; /** dimensions */ cocos2d::TextHAlignment arg5 = (cocos2d::TextHAlignment)0; /** hAlignment */ cocos2d::TextVAlignment arg6 = (cocos2d::TextVAlignment)0; /** vAlignment */ @@ -18221,8 +19527,8 @@ static int _cocos2d_Texture2D_initWithString$5(lua_State *L) olua_check_enum(L, 6, &arg5); olua_check_enum(L, 7, &arg6); - // bool initWithString(const char *text, const std::string &fontName, float fontSize, @optional const cocos2d::Size &dimensions, @optional cocos2d::TextHAlignment hAlignment, @optional cocos2d::TextVAlignment vAlignment, @optional bool enableWrap, @optional int overflow) - bool ret = self->initWithString(arg1, arg2, arg3, arg4, arg5, arg6); + // bool initWithString(const char *text, const std::string &fontName, float fontSize, @optional const cocos2d::Size &dimensions, @optional cocos2d::TextHAlignment hAlignment, @optional cocos2d::TextVAlignment vAlignment) + bool ret = self->initWithString(arg1, arg2, arg3, *arg4, arg5, arg6); int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); @@ -18230,7 +19536,7 @@ static int _cocos2d_Texture2D_initWithString$5(lua_State *L) return num_ret; } -static int _cocos2d_Texture2D_initWithString$6(lua_State *L) +static int _olua_fun_cocos2d_Texture2D_initWithString$6(lua_State *L) { olua_startinvoke(L); @@ -18238,7 +19544,7 @@ static int _cocos2d_Texture2D_initWithString$6(lua_State *L) const char *arg1 = nullptr; /** text */ std::string arg2; /** fontName */ float arg3 = 0; /** fontSize */ - cocos2d::Size arg4; /** dimensions */ + cocos2d::Size *arg4; /** dimensions */ cocos2d::TextHAlignment arg5 = (cocos2d::TextHAlignment)0; /** hAlignment */ cocos2d::TextVAlignment arg6 = (cocos2d::TextVAlignment)0; /** vAlignment */ bool arg7 = false; /** enableWrap */ @@ -18252,8 +19558,8 @@ static int _cocos2d_Texture2D_initWithString$6(lua_State *L) olua_check_enum(L, 7, &arg6); olua_check_bool(L, 8, &arg7); - // bool initWithString(const char *text, const std::string &fontName, float fontSize, @optional const cocos2d::Size &dimensions, @optional cocos2d::TextHAlignment hAlignment, @optional cocos2d::TextVAlignment vAlignment, @optional bool enableWrap, @optional int overflow) - bool ret = self->initWithString(arg1, arg2, arg3, arg4, arg5, arg6, arg7); + // bool initWithString(const char *text, const std::string &fontName, float fontSize, @optional const cocos2d::Size &dimensions, @optional cocos2d::TextHAlignment hAlignment, @optional cocos2d::TextVAlignment vAlignment, @optional bool enableWrap) + bool ret = self->initWithString(arg1, arg2, arg3, *arg4, arg5, arg6, arg7); int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); @@ -18261,49 +19567,49 @@ static int _cocos2d_Texture2D_initWithString$6(lua_State *L) return num_ret; } -static int _cocos2d_Texture2D_initWithString(lua_State *L) +static int _olua_fun_cocos2d_Texture2D_initWithString(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 3) { // if ((olua_is_string(L, 2)) && (olua_is_string(L, 3)) && (olua_is_number(L, 4))) { - // bool initWithString(const char *text, const std::string &fontName, float fontSize, @optional const cocos2d::Size &dimensions, @optional cocos2d::TextHAlignment hAlignment, @optional cocos2d::TextVAlignment vAlignment, @optional bool enableWrap, @optional int overflow) - return _cocos2d_Texture2D_initWithString$2(L); + // bool initWithString(const char *text, const std::string &fontName, float fontSize) + return _olua_fun_cocos2d_Texture2D_initWithString$2(L); // } } if (num_args == 4) { // if ((olua_is_string(L, 2)) && (olua_is_string(L, 3)) && (olua_is_number(L, 4)) && (olua_is_object(L, 5, "cc.Size"))) { - // bool initWithString(const char *text, const std::string &fontName, float fontSize, @optional const cocos2d::Size &dimensions, @optional cocos2d::TextHAlignment hAlignment, @optional cocos2d::TextVAlignment vAlignment, @optional bool enableWrap, @optional int overflow) - return _cocos2d_Texture2D_initWithString$3(L); + // bool initWithString(const char *text, const std::string &fontName, float fontSize, @optional const cocos2d::Size &dimensions) + return _olua_fun_cocos2d_Texture2D_initWithString$3(L); // } } if (num_args == 5) { // if ((olua_is_string(L, 2)) && (olua_is_string(L, 3)) && (olua_is_number(L, 4)) && (olua_is_object(L, 5, "cc.Size")) && (olua_is_enum(L, 6))) { - // bool initWithString(const char *text, const std::string &fontName, float fontSize, @optional const cocos2d::Size &dimensions, @optional cocos2d::TextHAlignment hAlignment, @optional cocos2d::TextVAlignment vAlignment, @optional bool enableWrap, @optional int overflow) - return _cocos2d_Texture2D_initWithString$4(L); + // bool initWithString(const char *text, const std::string &fontName, float fontSize, @optional const cocos2d::Size &dimensions, @optional cocos2d::TextHAlignment hAlignment) + return _olua_fun_cocos2d_Texture2D_initWithString$4(L); // } } if (num_args == 6) { // if ((olua_is_string(L, 2)) && (olua_is_string(L, 3)) && (olua_is_number(L, 4)) && (olua_is_object(L, 5, "cc.Size")) && (olua_is_enum(L, 6)) && (olua_is_enum(L, 7))) { - // bool initWithString(const char *text, const std::string &fontName, float fontSize, @optional const cocos2d::Size &dimensions, @optional cocos2d::TextHAlignment hAlignment, @optional cocos2d::TextVAlignment vAlignment, @optional bool enableWrap, @optional int overflow) - return _cocos2d_Texture2D_initWithString$5(L); + // bool initWithString(const char *text, const std::string &fontName, float fontSize, @optional const cocos2d::Size &dimensions, @optional cocos2d::TextHAlignment hAlignment, @optional cocos2d::TextVAlignment vAlignment) + return _olua_fun_cocos2d_Texture2D_initWithString$5(L); // } } if (num_args == 7) { // if ((olua_is_string(L, 2)) && (olua_is_string(L, 3)) && (olua_is_number(L, 4)) && (olua_is_object(L, 5, "cc.Size")) && (olua_is_enum(L, 6)) && (olua_is_enum(L, 7)) && (olua_is_bool(L, 8))) { - // bool initWithString(const char *text, const std::string &fontName, float fontSize, @optional const cocos2d::Size &dimensions, @optional cocos2d::TextHAlignment hAlignment, @optional cocos2d::TextVAlignment vAlignment, @optional bool enableWrap, @optional int overflow) - return _cocos2d_Texture2D_initWithString$6(L); + // bool initWithString(const char *text, const std::string &fontName, float fontSize, @optional const cocos2d::Size &dimensions, @optional cocos2d::TextHAlignment hAlignment, @optional cocos2d::TextVAlignment vAlignment, @optional bool enableWrap) + return _olua_fun_cocos2d_Texture2D_initWithString$6(L); // } } if (num_args == 8) { // if ((olua_is_string(L, 2)) && (olua_is_string(L, 3)) && (olua_is_number(L, 4)) && (olua_is_object(L, 5, "cc.Size")) && (olua_is_enum(L, 6)) && (olua_is_enum(L, 7)) && (olua_is_bool(L, 8)) && (olua_is_integer(L, 9))) { // bool initWithString(const char *text, const std::string &fontName, float fontSize, @optional const cocos2d::Size &dimensions, @optional cocos2d::TextHAlignment hAlignment, @optional cocos2d::TextVAlignment vAlignment, @optional bool enableWrap, @optional int overflow) - return _cocos2d_Texture2D_initWithString$1(L); + return _olua_fun_cocos2d_Texture2D_initWithString$1(L); // } } @@ -18312,7 +19618,7 @@ static int _cocos2d_Texture2D_initWithString(lua_State *L) return 0; } -static int _cocos2d_Texture2D_isRenderTarget(lua_State *L) +static int _olua_fun_cocos2d_Texture2D_isRenderTarget(lua_State *L) { olua_startinvoke(L); @@ -18329,11 +19635,11 @@ static int _cocos2d_Texture2D_isRenderTarget(lua_State *L) return num_ret; } -static int _cocos2d_Texture2D_new(lua_State *L) +static int _olua_fun_cocos2d_Texture2D_new(lua_State *L) { olua_startinvoke(L); - // Texture2D() + // cocos2d::Texture2D() cocos2d::Texture2D *ret = new cocos2d::Texture2D(); int num_ret = olua_push_object(L, ret, "cc.Texture2D"); olua_postnew(L, ret); @@ -18343,7 +19649,7 @@ static int _cocos2d_Texture2D_new(lua_State *L) return num_ret; } -static int _cocos2d_Texture2D_setAliasTexParameters(lua_State *L) +static int _olua_fun_cocos2d_Texture2D_setAliasTexParameters(lua_State *L) { olua_startinvoke(L); @@ -18359,7 +19665,7 @@ static int _cocos2d_Texture2D_setAliasTexParameters(lua_State *L) return 0; } -static int _cocos2d_Texture2D_setAlphaTexture(lua_State *L) +static int _olua_fun_cocos2d_Texture2D_setAlphaTexture(lua_State *L) { olua_startinvoke(L); @@ -18377,7 +19683,7 @@ static int _cocos2d_Texture2D_setAlphaTexture(lua_State *L) return 0; } -static int _cocos2d_Texture2D_setAntiAliasTexParameters(lua_State *L) +static int _olua_fun_cocos2d_Texture2D_setAntiAliasTexParameters(lua_State *L) { olua_startinvoke(L); @@ -18393,7 +19699,7 @@ static int _cocos2d_Texture2D_setAntiAliasTexParameters(lua_State *L) return 0; } -static int _cocos2d_Texture2D_setDefaultAlphaPixelFormat(lua_State *L) +static int _olua_fun_cocos2d_Texture2D_setDefaultAlphaPixelFormat(lua_State *L) { olua_startinvoke(L); @@ -18409,7 +19715,7 @@ static int _cocos2d_Texture2D_setDefaultAlphaPixelFormat(lua_State *L) return 0; } -static int _cocos2d_Texture2D_setMaxS(lua_State *L) +static int _olua_fun_cocos2d_Texture2D_setMaxS(lua_State *L) { olua_startinvoke(L); @@ -18427,7 +19733,7 @@ static int _cocos2d_Texture2D_setMaxS(lua_State *L) return 0; } -static int _cocos2d_Texture2D_setMaxT(lua_State *L) +static int _olua_fun_cocos2d_Texture2D_setMaxT(lua_State *L) { olua_startinvoke(L); @@ -18445,7 +19751,7 @@ static int _cocos2d_Texture2D_setMaxT(lua_State *L) return 0; } -static int _cocos2d_Texture2D_setRenderTarget(lua_State *L) +static int _olua_fun_cocos2d_Texture2D_setRenderTarget(lua_State *L) { olua_startinvoke(L); @@ -18463,25 +19769,25 @@ static int _cocos2d_Texture2D_setRenderTarget(lua_State *L) return 0; } -static int _cocos2d_Texture2D_setTexParameters(lua_State *L) +static int _olua_fun_cocos2d_Texture2D_setTexParameters(lua_State *L) { olua_startinvoke(L); cocos2d::Texture2D *self = nullptr; - cocos2d::Texture2D::TexParams arg1; /** params */ + cocos2d::Texture2D::TexParams *arg1; /** params */ olua_to_object(L, 1, &self, "cc.Texture2D"); olua_check_object(L, 2, &arg1, "ccb.SamplerDescriptor"); // void setTexParameters(const cocos2d::Texture2D::TexParams ¶ms) - self->setTexParameters(arg1); + self->setTexParameters(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_Texture2D_updateWithData(lua_State *L) +static int _olua_fun_cocos2d_Texture2D_updateWithData(lua_State *L) { olua_startinvoke(L); @@ -18508,66 +19814,75 @@ static int _cocos2d_Texture2D_updateWithData(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_Texture2D(lua_State *L) +static int _olua_cls_cc_Texture2D(lua_State *L) { oluacls_class(L, "cc.Texture2D"); - oluacls_func(L, "drawAtPoint", _cocos2d_Texture2D_drawAtPoint); - oluacls_func(L, "drawInRect", _cocos2d_Texture2D_drawInRect); - oluacls_func(L, "generateMipmap", _cocos2d_Texture2D_generateMipmap); - oluacls_func(L, "getAlphaTexture", _cocos2d_Texture2D_getAlphaTexture); - oluacls_func(L, "getAlphaTextureName", _cocos2d_Texture2D_getAlphaTextureName); - oluacls_func(L, "getBackendTexture", _cocos2d_Texture2D_getBackendTexture); - oluacls_func(L, "getBitsPerPixelForFormat", _cocos2d_Texture2D_getBitsPerPixelForFormat); - oluacls_func(L, "getContentSize", _cocos2d_Texture2D_getContentSize); - oluacls_func(L, "getContentSizeInPixels", _cocos2d_Texture2D_getContentSizeInPixels); - oluacls_func(L, "getDefaultAlphaPixelFormat", _cocos2d_Texture2D_getDefaultAlphaPixelFormat); - oluacls_func(L, "getMaxS", _cocos2d_Texture2D_getMaxS); - oluacls_func(L, "getMaxT", _cocos2d_Texture2D_getMaxT); - oluacls_func(L, "getPath", _cocos2d_Texture2D_getPath); - oluacls_func(L, "getPixelFormat", _cocos2d_Texture2D_getPixelFormat); - oluacls_func(L, "getPixelFormatInfoMap", _cocos2d_Texture2D_getPixelFormatInfoMap); - oluacls_func(L, "getPixelsHigh", _cocos2d_Texture2D_getPixelsHigh); - oluacls_func(L, "getPixelsWide", _cocos2d_Texture2D_getPixelsWide); - oluacls_func(L, "getStringForFormat", _cocos2d_Texture2D_getStringForFormat); - oluacls_func(L, "hasMipmaps", _cocos2d_Texture2D_hasMipmaps); - oluacls_func(L, "hasPremultipliedAlpha", _cocos2d_Texture2D_hasPremultipliedAlpha); - oluacls_func(L, "initWithBackendTexture", _cocos2d_Texture2D_initWithBackendTexture); - oluacls_func(L, "initWithData", _cocos2d_Texture2D_initWithData); - oluacls_func(L, "initWithImage", _cocos2d_Texture2D_initWithImage); - oluacls_func(L, "initWithString", _cocos2d_Texture2D_initWithString); - oluacls_func(L, "isRenderTarget", _cocos2d_Texture2D_isRenderTarget); - oluacls_func(L, "new", _cocos2d_Texture2D_new); - oluacls_func(L, "setAliasTexParameters", _cocos2d_Texture2D_setAliasTexParameters); - oluacls_func(L, "setAlphaTexture", _cocos2d_Texture2D_setAlphaTexture); - oluacls_func(L, "setAntiAliasTexParameters", _cocos2d_Texture2D_setAntiAliasTexParameters); - oluacls_func(L, "setDefaultAlphaPixelFormat", _cocos2d_Texture2D_setDefaultAlphaPixelFormat); - oluacls_func(L, "setMaxS", _cocos2d_Texture2D_setMaxS); - oluacls_func(L, "setMaxT", _cocos2d_Texture2D_setMaxT); - oluacls_func(L, "setRenderTarget", _cocos2d_Texture2D_setRenderTarget); - oluacls_func(L, "setTexParameters", _cocos2d_Texture2D_setTexParameters); - oluacls_func(L, "updateWithData", _cocos2d_Texture2D_updateWithData); - oluacls_prop(L, "alphaTexture", _cocos2d_Texture2D_getAlphaTexture, _cocos2d_Texture2D_setAlphaTexture); - oluacls_prop(L, "alphaTextureName", _cocos2d_Texture2D_getAlphaTextureName, nullptr); - oluacls_prop(L, "backendTexture", _cocos2d_Texture2D_getBackendTexture, nullptr); - oluacls_prop(L, "contentSize", _cocos2d_Texture2D_getContentSize, nullptr); - oluacls_prop(L, "contentSizeInPixels", _cocos2d_Texture2D_getContentSizeInPixels, nullptr); - oluacls_prop(L, "defaultAlphaPixelFormat", _cocos2d_Texture2D_getDefaultAlphaPixelFormat, _cocos2d_Texture2D_setDefaultAlphaPixelFormat); - oluacls_prop(L, "maxS", _cocos2d_Texture2D_getMaxS, _cocos2d_Texture2D_setMaxS); - oluacls_prop(L, "maxT", _cocos2d_Texture2D_getMaxT, _cocos2d_Texture2D_setMaxT); - oluacls_prop(L, "path", _cocos2d_Texture2D_getPath, nullptr); - oluacls_prop(L, "pixelFormat", _cocos2d_Texture2D_getPixelFormat, nullptr); - oluacls_prop(L, "pixelFormatInfoMap", _cocos2d_Texture2D_getPixelFormatInfoMap, nullptr); - oluacls_prop(L, "pixelsHigh", _cocos2d_Texture2D_getPixelsHigh, nullptr); - oluacls_prop(L, "pixelsWide", _cocos2d_Texture2D_getPixelsWide, nullptr); - oluacls_prop(L, "renderTarget", _cocos2d_Texture2D_isRenderTarget, _cocos2d_Texture2D_setRenderTarget); - oluacls_prop(L, "stringForFormat", _cocos2d_Texture2D_getStringForFormat, nullptr); + oluacls_func(L, "drawAtPoint", _olua_fun_cocos2d_Texture2D_drawAtPoint); + oluacls_func(L, "drawInRect", _olua_fun_cocos2d_Texture2D_drawInRect); + oluacls_func(L, "generateMipmap", _olua_fun_cocos2d_Texture2D_generateMipmap); + oluacls_func(L, "getAlphaTexture", _olua_fun_cocos2d_Texture2D_getAlphaTexture); + oluacls_func(L, "getAlphaTextureName", _olua_fun_cocos2d_Texture2D_getAlphaTextureName); + oluacls_func(L, "getBackendTexture", _olua_fun_cocos2d_Texture2D_getBackendTexture); + oluacls_func(L, "getBitsPerPixelForFormat", _olua_fun_cocos2d_Texture2D_getBitsPerPixelForFormat); + oluacls_func(L, "getContentSize", _olua_fun_cocos2d_Texture2D_getContentSize); + oluacls_func(L, "getContentSizeInPixels", _olua_fun_cocos2d_Texture2D_getContentSizeInPixels); + oluacls_func(L, "getDefaultAlphaPixelFormat", _olua_fun_cocos2d_Texture2D_getDefaultAlphaPixelFormat); + oluacls_func(L, "getMaxS", _olua_fun_cocos2d_Texture2D_getMaxS); + oluacls_func(L, "getMaxT", _olua_fun_cocos2d_Texture2D_getMaxT); + oluacls_func(L, "getPath", _olua_fun_cocos2d_Texture2D_getPath); + oluacls_func(L, "getPixelFormat", _olua_fun_cocos2d_Texture2D_getPixelFormat); + oluacls_func(L, "getPixelFormatInfoMap", _olua_fun_cocos2d_Texture2D_getPixelFormatInfoMap); + oluacls_func(L, "getPixelsHigh", _olua_fun_cocos2d_Texture2D_getPixelsHigh); + oluacls_func(L, "getPixelsWide", _olua_fun_cocos2d_Texture2D_getPixelsWide); + oluacls_func(L, "getStringForFormat", _olua_fun_cocos2d_Texture2D_getStringForFormat); + oluacls_func(L, "hasMipmaps", _olua_fun_cocos2d_Texture2D_hasMipmaps); + oluacls_func(L, "hasPremultipliedAlpha", _olua_fun_cocos2d_Texture2D_hasPremultipliedAlpha); + oluacls_func(L, "initWithBackendTexture", _olua_fun_cocos2d_Texture2D_initWithBackendTexture); + oluacls_func(L, "initWithData", _olua_fun_cocos2d_Texture2D_initWithData); + oluacls_func(L, "initWithImage", _olua_fun_cocos2d_Texture2D_initWithImage); + oluacls_func(L, "initWithString", _olua_fun_cocos2d_Texture2D_initWithString); + oluacls_func(L, "isRenderTarget", _olua_fun_cocos2d_Texture2D_isRenderTarget); + oluacls_func(L, "new", _olua_fun_cocos2d_Texture2D_new); + oluacls_func(L, "setAliasTexParameters", _olua_fun_cocos2d_Texture2D_setAliasTexParameters); + oluacls_func(L, "setAlphaTexture", _olua_fun_cocos2d_Texture2D_setAlphaTexture); + oluacls_func(L, "setAntiAliasTexParameters", _olua_fun_cocos2d_Texture2D_setAntiAliasTexParameters); + oluacls_func(L, "setDefaultAlphaPixelFormat", _olua_fun_cocos2d_Texture2D_setDefaultAlphaPixelFormat); + oluacls_func(L, "setMaxS", _olua_fun_cocos2d_Texture2D_setMaxS); + oluacls_func(L, "setMaxT", _olua_fun_cocos2d_Texture2D_setMaxT); + oluacls_func(L, "setRenderTarget", _olua_fun_cocos2d_Texture2D_setRenderTarget); + oluacls_func(L, "setTexParameters", _olua_fun_cocos2d_Texture2D_setTexParameters); + oluacls_func(L, "updateWithData", _olua_fun_cocos2d_Texture2D_updateWithData); + oluacls_prop(L, "alphaTexture", _olua_fun_cocos2d_Texture2D_getAlphaTexture, _olua_fun_cocos2d_Texture2D_setAlphaTexture); + oluacls_prop(L, "alphaTextureName", _olua_fun_cocos2d_Texture2D_getAlphaTextureName, nullptr); + oluacls_prop(L, "backendTexture", _olua_fun_cocos2d_Texture2D_getBackendTexture, nullptr); + oluacls_prop(L, "contentSize", _olua_fun_cocos2d_Texture2D_getContentSize, nullptr); + oluacls_prop(L, "contentSizeInPixels", _olua_fun_cocos2d_Texture2D_getContentSizeInPixels, nullptr); + oluacls_prop(L, "defaultAlphaPixelFormat", _olua_fun_cocos2d_Texture2D_getDefaultAlphaPixelFormat, _olua_fun_cocos2d_Texture2D_setDefaultAlphaPixelFormat); + oluacls_prop(L, "maxS", _olua_fun_cocos2d_Texture2D_getMaxS, _olua_fun_cocos2d_Texture2D_setMaxS); + oluacls_prop(L, "maxT", _olua_fun_cocos2d_Texture2D_getMaxT, _olua_fun_cocos2d_Texture2D_setMaxT); + oluacls_prop(L, "path", _olua_fun_cocos2d_Texture2D_getPath, nullptr); + oluacls_prop(L, "pixelFormat", _olua_fun_cocos2d_Texture2D_getPixelFormat, nullptr); + oluacls_prop(L, "pixelFormatInfoMap", _olua_fun_cocos2d_Texture2D_getPixelFormatInfoMap, nullptr); + oluacls_prop(L, "pixelsHigh", _olua_fun_cocos2d_Texture2D_getPixelsHigh, nullptr); + oluacls_prop(L, "pixelsWide", _olua_fun_cocos2d_Texture2D_getPixelsWide, nullptr); + oluacls_prop(L, "renderTarget", _olua_fun_cocos2d_Texture2D_isRenderTarget, _olua_fun_cocos2d_Texture2D_setRenderTarget); + oluacls_prop(L, "stringForFormat", _olua_fun_cocos2d_Texture2D_getStringForFormat, nullptr); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_Texture2D(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.Texture2D")) { + luaL_error(L, "class not found: cocos2d::Texture2D"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_TextureCube_create(lua_State *L) +static int _olua_fun_cocos2d_TextureCube_create(lua_State *L) { olua_startinvoke(L); @@ -18594,7 +19909,7 @@ static int _cocos2d_TextureCube_create(lua_State *L) return num_ret; } -static int _cocos2d_TextureCube_getBackendTexture(lua_State *L) +static int _olua_fun_cocos2d_TextureCube_getBackendTexture(lua_State *L) { olua_startinvoke(L); @@ -18611,11 +19926,11 @@ static int _cocos2d_TextureCube_getBackendTexture(lua_State *L) return num_ret; } -static int _cocos2d_TextureCube_new(lua_State *L) +static int _olua_fun_cocos2d_TextureCube_new(lua_State *L) { olua_startinvoke(L); - // TextureCube() + // cocos2d::TextureCube() cocos2d::TextureCube *ret = new cocos2d::TextureCube(); int num_ret = olua_push_object(L, ret, "cc.TextureCube"); olua_postnew(L, ret); @@ -18625,7 +19940,7 @@ static int _cocos2d_TextureCube_new(lua_State *L) return num_ret; } -static int _cocos2d_TextureCube_reloadTexture(lua_State *L) +static int _olua_fun_cocos2d_TextureCube_reloadTexture(lua_State *L) { olua_startinvoke(L); @@ -18642,40 +19957,49 @@ static int _cocos2d_TextureCube_reloadTexture(lua_State *L) return num_ret; } -static int _cocos2d_TextureCube_setTexParameters(lua_State *L) +static int _olua_fun_cocos2d_TextureCube_setTexParameters(lua_State *L) { olua_startinvoke(L); cocos2d::TextureCube *self = nullptr; - cocos2d::Texture2D::TexParams arg1; /** */ + cocos2d::Texture2D::TexParams *arg1; /** arg1 */ olua_to_object(L, 1, &self, "cc.TextureCube"); olua_check_object(L, 2, &arg1, "ccb.SamplerDescriptor"); - // void setTexParameters(const cocos2d::Texture2D::TexParams &) - self->setTexParameters(arg1); + // void setTexParameters(const cocos2d::Texture2D::TexParams &arg1) + self->setTexParameters(*arg1); olua_endinvoke(L); return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_TextureCube(lua_State *L) +static int _olua_cls_cc_TextureCube(lua_State *L) { oluacls_class(L, "cc.TextureCube"); - oluacls_func(L, "create", _cocos2d_TextureCube_create); - oluacls_func(L, "getBackendTexture", _cocos2d_TextureCube_getBackendTexture); - oluacls_func(L, "new", _cocos2d_TextureCube_new); - oluacls_func(L, "reloadTexture", _cocos2d_TextureCube_reloadTexture); - oluacls_func(L, "setTexParameters", _cocos2d_TextureCube_setTexParameters); - oluacls_prop(L, "backendTexture", _cocos2d_TextureCube_getBackendTexture, nullptr); + oluacls_func(L, "create", _olua_fun_cocos2d_TextureCube_create); + oluacls_func(L, "getBackendTexture", _olua_fun_cocos2d_TextureCube_getBackendTexture); + oluacls_func(L, "new", _olua_fun_cocos2d_TextureCube_new); + oluacls_func(L, "reloadTexture", _olua_fun_cocos2d_TextureCube_reloadTexture); + oluacls_func(L, "setTexParameters", _olua_fun_cocos2d_TextureCube_setTexParameters); + oluacls_prop(L, "backendTexture", _olua_fun_cocos2d_TextureCube_getBackendTexture, nullptr); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_TextureCube(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.TextureCube")) { + luaL_error(L, "class not found: cocos2d::TextureCube"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_TextureAtlas_create(lua_State *L) +static int _olua_fun_cocos2d_TextureAtlas_create(lua_State *L) { olua_startinvoke(L); @@ -18694,7 +20018,7 @@ static int _cocos2d_TextureAtlas_create(lua_State *L) return num_ret; } -static int _cocos2d_TextureAtlas_createWithTexture(lua_State *L) +static int _olua_fun_cocos2d_TextureAtlas_createWithTexture(lua_State *L) { olua_startinvoke(L); @@ -18713,7 +20037,7 @@ static int _cocos2d_TextureAtlas_createWithTexture(lua_State *L) return num_ret; } -static int _cocos2d_TextureAtlas_fillWithEmptyQuadsFromIndex(lua_State *L) +static int _olua_fun_cocos2d_TextureAtlas_fillWithEmptyQuadsFromIndex(lua_State *L) { olua_startinvoke(L); @@ -18733,7 +20057,7 @@ static int _cocos2d_TextureAtlas_fillWithEmptyQuadsFromIndex(lua_State *L) return 0; } -static int _cocos2d_TextureAtlas_getCapacity(lua_State *L) +static int _olua_fun_cocos2d_TextureAtlas_getCapacity(lua_State *L) { olua_startinvoke(L); @@ -18750,7 +20074,7 @@ static int _cocos2d_TextureAtlas_getCapacity(lua_State *L) return num_ret; } -static int _cocos2d_TextureAtlas_getDescription(lua_State *L) +static int _olua_fun_cocos2d_TextureAtlas_getDescription(lua_State *L) { olua_startinvoke(L); @@ -18767,7 +20091,7 @@ static int _cocos2d_TextureAtlas_getDescription(lua_State *L) return num_ret; } -static int _cocos2d_TextureAtlas_getIndices(lua_State *L) +static int _olua_fun_cocos2d_TextureAtlas_getIndices(lua_State *L) { olua_startinvoke(L); @@ -18777,14 +20101,14 @@ static int _cocos2d_TextureAtlas_getIndices(lua_State *L) // unsigned short *getIndices() unsigned short *ret = self->getIndices(); - int num_ret = olua_push_pointer(L, ret, "olua.ushort"); + int num_ret = olua_push_valueptr(L, ret, "olua.ushort"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_TextureAtlas_getTexture(lua_State *L) +static int _olua_fun_cocos2d_TextureAtlas_getTexture(lua_State *L) { olua_startinvoke(L); @@ -18801,7 +20125,7 @@ static int _cocos2d_TextureAtlas_getTexture(lua_State *L) return num_ret; } -static int _cocos2d_TextureAtlas_getTotalQuads(lua_State *L) +static int _olua_fun_cocos2d_TextureAtlas_getTotalQuads(lua_State *L) { olua_startinvoke(L); @@ -18818,7 +20142,7 @@ static int _cocos2d_TextureAtlas_getTotalQuads(lua_State *L) return num_ret; } -static int _cocos2d_TextureAtlas_increaseTotalQuadsWith(lua_State *L) +static int _olua_fun_cocos2d_TextureAtlas_increaseTotalQuadsWith(lua_State *L) { olua_startinvoke(L); @@ -18836,7 +20160,7 @@ static int _cocos2d_TextureAtlas_increaseTotalQuadsWith(lua_State *L) return 0; } -static int _cocos2d_TextureAtlas_initWithFile(lua_State *L) +static int _olua_fun_cocos2d_TextureAtlas_initWithFile(lua_State *L) { olua_startinvoke(L); @@ -18857,7 +20181,7 @@ static int _cocos2d_TextureAtlas_initWithFile(lua_State *L) return num_ret; } -static int _cocos2d_TextureAtlas_initWithTexture(lua_State *L) +static int _olua_fun_cocos2d_TextureAtlas_initWithTexture(lua_State *L) { olua_startinvoke(L); @@ -18878,7 +20202,7 @@ static int _cocos2d_TextureAtlas_initWithTexture(lua_State *L) return num_ret; } -static int _cocos2d_TextureAtlas_insertQuadFromIndex(lua_State *L) +static int _olua_fun_cocos2d_TextureAtlas_insertQuadFromIndex(lua_State *L) { olua_startinvoke(L); @@ -18898,7 +20222,7 @@ static int _cocos2d_TextureAtlas_insertQuadFromIndex(lua_State *L) return 0; } -static int _cocos2d_TextureAtlas_isDirty(lua_State *L) +static int _olua_fun_cocos2d_TextureAtlas_isDirty(lua_State *L) { olua_startinvoke(L); @@ -18915,7 +20239,7 @@ static int _cocos2d_TextureAtlas_isDirty(lua_State *L) return num_ret; } -static int _cocos2d_TextureAtlas_moveQuadsFromIndex$1(lua_State *L) +static int _olua_fun_cocos2d_TextureAtlas_moveQuadsFromIndex$1(lua_State *L) { olua_startinvoke(L); @@ -18937,7 +20261,7 @@ static int _cocos2d_TextureAtlas_moveQuadsFromIndex$1(lua_State *L) return 0; } -static int _cocos2d_TextureAtlas_moveQuadsFromIndex$2(lua_State *L) +static int _olua_fun_cocos2d_TextureAtlas_moveQuadsFromIndex$2(lua_State *L) { olua_startinvoke(L); @@ -18957,21 +20281,21 @@ static int _cocos2d_TextureAtlas_moveQuadsFromIndex$2(lua_State *L) return 0; } -static int _cocos2d_TextureAtlas_moveQuadsFromIndex(lua_State *L) +static int _olua_fun_cocos2d_TextureAtlas_moveQuadsFromIndex(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 2) { // if ((olua_is_integer(L, 2)) && (olua_is_integer(L, 3))) { // void moveQuadsFromIndex(ssize_t index, ssize_t newIndex) - return _cocos2d_TextureAtlas_moveQuadsFromIndex$2(L); + return _olua_fun_cocos2d_TextureAtlas_moveQuadsFromIndex$2(L); // } } if (num_args == 3) { // if ((olua_is_integer(L, 2)) && (olua_is_integer(L, 3)) && (olua_is_integer(L, 4))) { // void moveQuadsFromIndex(ssize_t oldIndex, ssize_t amount, ssize_t newIndex) - return _cocos2d_TextureAtlas_moveQuadsFromIndex$1(L); + return _olua_fun_cocos2d_TextureAtlas_moveQuadsFromIndex$1(L); // } } @@ -18980,11 +20304,11 @@ static int _cocos2d_TextureAtlas_moveQuadsFromIndex(lua_State *L) return 0; } -static int _cocos2d_TextureAtlas_new(lua_State *L) +static int _olua_fun_cocos2d_TextureAtlas_new(lua_State *L) { olua_startinvoke(L); - // TextureAtlas() + // cocos2d::TextureAtlas() cocos2d::TextureAtlas *ret = new cocos2d::TextureAtlas(); int num_ret = olua_push_object(L, ret, "cc.TextureAtlas"); olua_postnew(L, ret); @@ -18994,7 +20318,7 @@ static int _cocos2d_TextureAtlas_new(lua_State *L) return num_ret; } -static int _cocos2d_TextureAtlas_removeAllQuads(lua_State *L) +static int _olua_fun_cocos2d_TextureAtlas_removeAllQuads(lua_State *L) { olua_startinvoke(L); @@ -19010,7 +20334,7 @@ static int _cocos2d_TextureAtlas_removeAllQuads(lua_State *L) return 0; } -static int _cocos2d_TextureAtlas_removeQuadAtIndex(lua_State *L) +static int _olua_fun_cocos2d_TextureAtlas_removeQuadAtIndex(lua_State *L) { olua_startinvoke(L); @@ -19028,7 +20352,7 @@ static int _cocos2d_TextureAtlas_removeQuadAtIndex(lua_State *L) return 0; } -static int _cocos2d_TextureAtlas_removeQuadsAtIndex(lua_State *L) +static int _olua_fun_cocos2d_TextureAtlas_removeQuadsAtIndex(lua_State *L) { olua_startinvoke(L); @@ -19048,7 +20372,7 @@ static int _cocos2d_TextureAtlas_removeQuadsAtIndex(lua_State *L) return 0; } -static int _cocos2d_TextureAtlas_resizeCapacity(lua_State *L) +static int _olua_fun_cocos2d_TextureAtlas_resizeCapacity(lua_State *L) { olua_startinvoke(L); @@ -19067,7 +20391,7 @@ static int _cocos2d_TextureAtlas_resizeCapacity(lua_State *L) return num_ret; } -static int _cocos2d_TextureAtlas_setDirty(lua_State *L) +static int _olua_fun_cocos2d_TextureAtlas_setDirty(lua_State *L) { olua_startinvoke(L); @@ -19085,7 +20409,7 @@ static int _cocos2d_TextureAtlas_setDirty(lua_State *L) return 0; } -static int _cocos2d_TextureAtlas_setTexture(lua_State *L) +static int _olua_fun_cocos2d_TextureAtlas_setTexture(lua_State *L) { olua_startinvoke(L); @@ -19103,44 +20427,52 @@ static int _cocos2d_TextureAtlas_setTexture(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_TextureAtlas(lua_State *L) +static int _olua_cls_cc_TextureAtlas(lua_State *L) { oluacls_class(L, "cc.TextureAtlas"); - oluacls_func(L, "create", _cocos2d_TextureAtlas_create); - oluacls_func(L, "createWithTexture", _cocos2d_TextureAtlas_createWithTexture); - oluacls_func(L, "fillWithEmptyQuadsFromIndex", _cocos2d_TextureAtlas_fillWithEmptyQuadsFromIndex); - oluacls_func(L, "getCapacity", _cocos2d_TextureAtlas_getCapacity); - oluacls_func(L, "getDescription", _cocos2d_TextureAtlas_getDescription); - oluacls_func(L, "getIndices", _cocos2d_TextureAtlas_getIndices); - oluacls_func(L, "getTexture", _cocos2d_TextureAtlas_getTexture); - oluacls_func(L, "getTotalQuads", _cocos2d_TextureAtlas_getTotalQuads); - oluacls_func(L, "increaseTotalQuadsWith", _cocos2d_TextureAtlas_increaseTotalQuadsWith); - oluacls_func(L, "initWithFile", _cocos2d_TextureAtlas_initWithFile); - oluacls_func(L, "initWithTexture", _cocos2d_TextureAtlas_initWithTexture); - oluacls_func(L, "insertQuadFromIndex", _cocos2d_TextureAtlas_insertQuadFromIndex); - oluacls_func(L, "isDirty", _cocos2d_TextureAtlas_isDirty); - oluacls_func(L, "moveQuadsFromIndex", _cocos2d_TextureAtlas_moveQuadsFromIndex); - oluacls_func(L, "new", _cocos2d_TextureAtlas_new); - oluacls_func(L, "removeAllQuads", _cocos2d_TextureAtlas_removeAllQuads); - oluacls_func(L, "removeQuadAtIndex", _cocos2d_TextureAtlas_removeQuadAtIndex); - oluacls_func(L, "removeQuadsAtIndex", _cocos2d_TextureAtlas_removeQuadsAtIndex); - oluacls_func(L, "resizeCapacity", _cocos2d_TextureAtlas_resizeCapacity); - oluacls_func(L, "setDirty", _cocos2d_TextureAtlas_setDirty); - oluacls_func(L, "setTexture", _cocos2d_TextureAtlas_setTexture); - oluacls_prop(L, "capacity", _cocos2d_TextureAtlas_getCapacity, nullptr); - oluacls_prop(L, "description", _cocos2d_TextureAtlas_getDescription, nullptr); - oluacls_prop(L, "dirty", _cocos2d_TextureAtlas_isDirty, _cocos2d_TextureAtlas_setDirty); - oluacls_prop(L, "indices", _cocos2d_TextureAtlas_getIndices, nullptr); - oluacls_prop(L, "texture", _cocos2d_TextureAtlas_getTexture, _cocos2d_TextureAtlas_setTexture); - oluacls_prop(L, "totalQuads", _cocos2d_TextureAtlas_getTotalQuads, nullptr); + oluacls_func(L, "create", _olua_fun_cocos2d_TextureAtlas_create); + oluacls_func(L, "createWithTexture", _olua_fun_cocos2d_TextureAtlas_createWithTexture); + oluacls_func(L, "fillWithEmptyQuadsFromIndex", _olua_fun_cocos2d_TextureAtlas_fillWithEmptyQuadsFromIndex); + oluacls_func(L, "getCapacity", _olua_fun_cocos2d_TextureAtlas_getCapacity); + oluacls_func(L, "getDescription", _olua_fun_cocos2d_TextureAtlas_getDescription); + oluacls_func(L, "getIndices", _olua_fun_cocos2d_TextureAtlas_getIndices); + oluacls_func(L, "getTexture", _olua_fun_cocos2d_TextureAtlas_getTexture); + oluacls_func(L, "getTotalQuads", _olua_fun_cocos2d_TextureAtlas_getTotalQuads); + oluacls_func(L, "increaseTotalQuadsWith", _olua_fun_cocos2d_TextureAtlas_increaseTotalQuadsWith); + oluacls_func(L, "initWithFile", _olua_fun_cocos2d_TextureAtlas_initWithFile); + oluacls_func(L, "initWithTexture", _olua_fun_cocos2d_TextureAtlas_initWithTexture); + oluacls_func(L, "insertQuadFromIndex", _olua_fun_cocos2d_TextureAtlas_insertQuadFromIndex); + oluacls_func(L, "isDirty", _olua_fun_cocos2d_TextureAtlas_isDirty); + oluacls_func(L, "moveQuadsFromIndex", _olua_fun_cocos2d_TextureAtlas_moveQuadsFromIndex); + oluacls_func(L, "new", _olua_fun_cocos2d_TextureAtlas_new); + oluacls_func(L, "removeAllQuads", _olua_fun_cocos2d_TextureAtlas_removeAllQuads); + oluacls_func(L, "removeQuadAtIndex", _olua_fun_cocos2d_TextureAtlas_removeQuadAtIndex); + oluacls_func(L, "removeQuadsAtIndex", _olua_fun_cocos2d_TextureAtlas_removeQuadsAtIndex); + oluacls_func(L, "resizeCapacity", _olua_fun_cocos2d_TextureAtlas_resizeCapacity); + oluacls_func(L, "setDirty", _olua_fun_cocos2d_TextureAtlas_setDirty); + oluacls_func(L, "setTexture", _olua_fun_cocos2d_TextureAtlas_setTexture); + oluacls_prop(L, "capacity", _olua_fun_cocos2d_TextureAtlas_getCapacity, nullptr); + oluacls_prop(L, "description", _olua_fun_cocos2d_TextureAtlas_getDescription, nullptr); + oluacls_prop(L, "dirty", _olua_fun_cocos2d_TextureAtlas_isDirty, _olua_fun_cocos2d_TextureAtlas_setDirty); + oluacls_prop(L, "indices", _olua_fun_cocos2d_TextureAtlas_getIndices, nullptr); + oluacls_prop(L, "texture", _olua_fun_cocos2d_TextureAtlas_getTexture, _olua_fun_cocos2d_TextureAtlas_setTexture); + oluacls_prop(L, "totalQuads", _olua_fun_cocos2d_TextureAtlas_getTotalQuads, nullptr); return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_network_WebSocket_ErrorCode(lua_State *L) +OLUA_LIB int luaopen_cc_TextureAtlas(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.TextureAtlas")) { + luaL_error(L, "class not found: cocos2d::TextureAtlas"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_cc_WebSocket_ErrorCode(lua_State *L) { oluacls_class(L, "cc.WebSocket.ErrorCode"); oluacls_func(L, "__index", olua_indexerror); @@ -19151,10 +20483,19 @@ OLUA_LIB int luaopen_cocos2d_network_WebSocket_ErrorCode(lua_State *L) return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_network_WebSocket_State(lua_State *L) +OLUA_LIB int luaopen_cc_WebSocket_ErrorCode(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.WebSocket.ErrorCode")) { + luaL_error(L, "class not found: cocos2d::network::WebSocket::ErrorCode"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_cc_WebSocket_State(lua_State *L) { oluacls_class(L, "cc.WebSocket.State"); oluacls_func(L, "__index", olua_indexerror); @@ -19166,9 +20507,19 @@ OLUA_LIB int luaopen_cocos2d_network_WebSocket_State(lua_State *L) return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_WebSocket_State(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.WebSocket.State")) { + luaL_error(L, "class not found: cocos2d::network::WebSocket::State"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_network_WebSocket_Delegate___gc(lua_State *L) +static int _olua_fun_cocos2d_network_WebSocket_Delegate___gc(lua_State *L) { olua_startinvoke(L); @@ -19180,7 +20531,7 @@ static int _cocos2d_network_WebSocket_Delegate___gc(lua_State *L) return 0; } -static int _cocos2d_network_WebSocket_Delegate___olua_move(lua_State *L) +static int _olua_fun_cocos2d_network_WebSocket_Delegate___olua_move(lua_State *L) { olua_startinvoke(L); @@ -19192,7 +20543,7 @@ static int _cocos2d_network_WebSocket_Delegate___olua_move(lua_State *L) return 1; } -static int _cocos2d_network_WebSocket_Delegate_onClose(lua_State *L) +static int _olua_fun_cocos2d_network_WebSocket_Delegate_onClose(lua_State *L) { olua_startinvoke(L); @@ -19210,7 +20561,7 @@ static int _cocos2d_network_WebSocket_Delegate_onClose(lua_State *L) return 0; } -static int _cocos2d_network_WebSocket_Delegate_onError(lua_State *L) +static int _olua_fun_cocos2d_network_WebSocket_Delegate_onError(lua_State *L) { olua_startinvoke(L); @@ -19230,7 +20581,7 @@ static int _cocos2d_network_WebSocket_Delegate_onError(lua_State *L) return 0; } -static int _cocos2d_network_WebSocket_Delegate_onMessage(lua_State *L) +static int _olua_fun_cocos2d_network_WebSocket_Delegate_onMessage(lua_State *L) { olua_startinvoke(L); @@ -19250,7 +20601,7 @@ static int _cocos2d_network_WebSocket_Delegate_onMessage(lua_State *L) return 0; } -static int _cocos2d_network_WebSocket_Delegate_onOpen(lua_State *L) +static int _olua_fun_cocos2d_network_WebSocket_Delegate_onOpen(lua_State *L) { olua_startinvoke(L); @@ -19268,22 +20619,31 @@ static int _cocos2d_network_WebSocket_Delegate_onOpen(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_network_WebSocket_Delegate(lua_State *L) +static int _olua_cls_cc_WebSocket_Delegate(lua_State *L) { oluacls_class(L, "cc.WebSocket.Delegate"); - oluacls_func(L, "__gc", _cocos2d_network_WebSocket_Delegate___gc); - oluacls_func(L, "__olua_move", _cocos2d_network_WebSocket_Delegate___olua_move); - oluacls_func(L, "onClose", _cocos2d_network_WebSocket_Delegate_onClose); - oluacls_func(L, "onError", _cocos2d_network_WebSocket_Delegate_onError); - oluacls_func(L, "onMessage", _cocos2d_network_WebSocket_Delegate_onMessage); - oluacls_func(L, "onOpen", _cocos2d_network_WebSocket_Delegate_onOpen); + oluacls_func(L, "__gc", _olua_fun_cocos2d_network_WebSocket_Delegate___gc); + oluacls_func(L, "__olua_move", _olua_fun_cocos2d_network_WebSocket_Delegate___olua_move); + oluacls_func(L, "onClose", _olua_fun_cocos2d_network_WebSocket_Delegate_onClose); + oluacls_func(L, "onError", _olua_fun_cocos2d_network_WebSocket_Delegate_onError); + oluacls_func(L, "onMessage", _olua_fun_cocos2d_network_WebSocket_Delegate_onMessage); + oluacls_func(L, "onOpen", _olua_fun_cocos2d_network_WebSocket_Delegate_onOpen); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_WebSocket_Delegate(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.WebSocket.Delegate")) { + luaL_error(L, "class not found: cocos2d::network::WebSocket::Delegate"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_network_WebSocket___gc(lua_State *L) +static int _olua_fun_cocos2d_network_WebSocket___gc(lua_State *L) { olua_startinvoke(L); @@ -19295,7 +20655,7 @@ static int _cocos2d_network_WebSocket___gc(lua_State *L) return 0; } -static int _cocos2d_network_WebSocket___olua_move(lua_State *L) +static int _olua_fun_cocos2d_network_WebSocket___olua_move(lua_State *L) { olua_startinvoke(L); @@ -19307,7 +20667,7 @@ static int _cocos2d_network_WebSocket___olua_move(lua_State *L) return 1; } -static int _cocos2d_network_WebSocket_close(lua_State *L) +static int _olua_fun_cocos2d_network_WebSocket_close(lua_State *L) { olua_startinvoke(L); @@ -19323,7 +20683,7 @@ static int _cocos2d_network_WebSocket_close(lua_State *L) return 0; } -static int _cocos2d_network_WebSocket_closeAllConnections(lua_State *L) +static int _olua_fun_cocos2d_network_WebSocket_closeAllConnections(lua_State *L) { olua_startinvoke(L); @@ -19335,7 +20695,7 @@ static int _cocos2d_network_WebSocket_closeAllConnections(lua_State *L) return 0; } -static int _cocos2d_network_WebSocket_closeAsync(lua_State *L) +static int _olua_fun_cocos2d_network_WebSocket_closeAsync(lua_State *L) { olua_startinvoke(L); @@ -19351,7 +20711,7 @@ static int _cocos2d_network_WebSocket_closeAsync(lua_State *L) return 0; } -static int _cocos2d_network_WebSocket_getProtocol(lua_State *L) +static int _olua_fun_cocos2d_network_WebSocket_getProtocol(lua_State *L) { olua_startinvoke(L); @@ -19368,7 +20728,7 @@ static int _cocos2d_network_WebSocket_getProtocol(lua_State *L) return num_ret; } -static int _cocos2d_network_WebSocket_getReadyState(lua_State *L) +static int _olua_fun_cocos2d_network_WebSocket_getReadyState(lua_State *L) { olua_startinvoke(L); @@ -19385,7 +20745,7 @@ static int _cocos2d_network_WebSocket_getReadyState(lua_State *L) return num_ret; } -static int _cocos2d_network_WebSocket_getUrl(lua_State *L) +static int _olua_fun_cocos2d_network_WebSocket_getUrl(lua_State *L) { olua_startinvoke(L); @@ -19402,7 +20762,7 @@ static int _cocos2d_network_WebSocket_getUrl(lua_State *L) return num_ret; } -static int _cocos2d_network_WebSocket_init(lua_State *L) +static int _olua_fun_cocos2d_network_WebSocket_init(lua_State *L) { olua_startinvoke(L); @@ -19431,11 +20791,11 @@ static int _cocos2d_network_WebSocket_init(lua_State *L) return 0; } -static int _cocos2d_network_WebSocket_new(lua_State *L) +static int _olua_fun_cocos2d_network_WebSocket_new(lua_State *L) { olua_startinvoke(L); - // WebSocket() + // cocos2d::network::WebSocket() cocos2d::network::WebSocket *ret = new cocos2d::network::WebSocket(); int num_ret = olua_push_object(L, ret, "cc.WebSocket"); olua_postnew(L, ret); @@ -19445,7 +20805,7 @@ static int _cocos2d_network_WebSocket_new(lua_State *L) return num_ret; } -static int _cocos2d_network_WebSocket_send$1(lua_State *L) +static int _olua_fun_cocos2d_network_WebSocket_send$1(lua_State *L) { olua_startinvoke(L); @@ -19463,7 +20823,7 @@ static int _cocos2d_network_WebSocket_send$1(lua_State *L) return 0; } -static int _cocos2d_network_WebSocket_send$2(lua_State *L) +static int _olua_fun_cocos2d_network_WebSocket_send$2(lua_State *L) { olua_startinvoke(L); @@ -19483,21 +20843,21 @@ static int _cocos2d_network_WebSocket_send$2(lua_State *L) return 0; } -static int _cocos2d_network_WebSocket_send(lua_State *L) +static int _olua_fun_cocos2d_network_WebSocket_send(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_string(L, 2))) { // void send(const std::string &message) - return _cocos2d_network_WebSocket_send$1(L); + return _olua_fun_cocos2d_network_WebSocket_send$1(L); // } } if (num_args == 2) { // if ((olua_is_string(L, 2)) && (olua_is_integer(L, 3))) { // void send(const unsigned char *binaryMsg, unsigned int len) - return _cocos2d_network_WebSocket_send$2(L); + return _olua_fun_cocos2d_network_WebSocket_send$2(L); // } } @@ -19506,34 +20866,43 @@ static int _cocos2d_network_WebSocket_send(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_network_WebSocket(lua_State *L) +static int _olua_cls_cc_WebSocket(lua_State *L) { oluacls_class(L, "cc.WebSocket"); - oluacls_func(L, "__gc", _cocos2d_network_WebSocket___gc); - oluacls_func(L, "__olua_move", _cocos2d_network_WebSocket___olua_move); - oluacls_func(L, "close", _cocos2d_network_WebSocket_close); - oluacls_func(L, "closeAllConnections", _cocos2d_network_WebSocket_closeAllConnections); - oluacls_func(L, "closeAsync", _cocos2d_network_WebSocket_closeAsync); - oluacls_func(L, "getProtocol", _cocos2d_network_WebSocket_getProtocol); - oluacls_func(L, "getReadyState", _cocos2d_network_WebSocket_getReadyState); - oluacls_func(L, "getUrl", _cocos2d_network_WebSocket_getUrl); - oluacls_func(L, "init", _cocos2d_network_WebSocket_init); - oluacls_func(L, "new", _cocos2d_network_WebSocket_new); - oluacls_func(L, "send", _cocos2d_network_WebSocket_send); - oluacls_prop(L, "protocol", _cocos2d_network_WebSocket_getProtocol, nullptr); - oluacls_prop(L, "readyState", _cocos2d_network_WebSocket_getReadyState, nullptr); - oluacls_prop(L, "url", _cocos2d_network_WebSocket_getUrl, nullptr); + oluacls_func(L, "__gc", _olua_fun_cocos2d_network_WebSocket___gc); + oluacls_func(L, "__olua_move", _olua_fun_cocos2d_network_WebSocket___olua_move); + oluacls_func(L, "close", _olua_fun_cocos2d_network_WebSocket_close); + oluacls_func(L, "closeAllConnections", _olua_fun_cocos2d_network_WebSocket_closeAllConnections); + oluacls_func(L, "closeAsync", _olua_fun_cocos2d_network_WebSocket_closeAsync); + oluacls_func(L, "getProtocol", _olua_fun_cocos2d_network_WebSocket_getProtocol); + oluacls_func(L, "getReadyState", _olua_fun_cocos2d_network_WebSocket_getReadyState); + oluacls_func(L, "getUrl", _olua_fun_cocos2d_network_WebSocket_getUrl); + oluacls_func(L, "init", _olua_fun_cocos2d_network_WebSocket_init); + oluacls_func(L, "new", _olua_fun_cocos2d_network_WebSocket_new); + oluacls_func(L, "send", _olua_fun_cocos2d_network_WebSocket_send); + oluacls_prop(L, "protocol", _olua_fun_cocos2d_network_WebSocket_getProtocol, nullptr); + oluacls_prop(L, "readyState", _olua_fun_cocos2d_network_WebSocket_getReadyState, nullptr); + oluacls_prop(L, "url", _olua_fun_cocos2d_network_WebSocket_getUrl, nullptr); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_WebSocket(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.WebSocket")) { + luaL_error(L, "class not found: cocos2d::network::WebSocket"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_LuaWebSocketDelegate_new(lua_State *L) +static int _olua_fun_cocos2d_LuaWebSocketDelegate_new(lua_State *L) { olua_startinvoke(L); - // LuaWebSocketDelegate() + // cocos2d::LuaWebSocketDelegate() cocos2d::LuaWebSocketDelegate *ret = new cocos2d::LuaWebSocketDelegate(); int num_ret = olua_push_object(L, ret, "cc.LuaWebSocketDelegate"); olua_postnew(L, ret); @@ -19543,7 +20912,7 @@ static int _cocos2d_LuaWebSocketDelegate_new(lua_State *L) return num_ret; } -static int _cocos2d_LuaWebSocketDelegate_get_onCloseCallback(lua_State *L) +static int _olua_fun_cocos2d_LuaWebSocketDelegate_onClose$1(lua_State *L) { olua_startinvoke(L); @@ -19552,10 +20921,10 @@ static int _cocos2d_LuaWebSocketDelegate_get_onCloseCallback(lua_State *L) olua_to_object(L, 1, &self, "cc.LuaWebSocketDelegate"); void *cb_store = (void *)self; - std::string cb_tag = "onClose"; + std::string cb_tag = "onCloseCallback"; olua_getcallback(L, cb_store, cb_tag.c_str(), OLUA_TAG_EQUAL); - // @nullable @localvar std::function onCloseCallback + // std::function onCloseCallback std::function ret = self->onCloseCallback; int num_ret = olua_push_callback(L, &ret, "std.function"); @@ -19564,7 +20933,7 @@ static int _cocos2d_LuaWebSocketDelegate_get_onCloseCallback(lua_State *L) return num_ret; } -static int _cocos2d_LuaWebSocketDelegate_set_onCloseCallback(lua_State *L) +static int _olua_fun_cocos2d_LuaWebSocketDelegate_onClose$2(lua_State *L) { olua_startinvoke(L); @@ -19577,12 +20946,13 @@ static int _cocos2d_LuaWebSocketDelegate_set_onCloseCallback(lua_State *L) } void *cb_store = (void *)self; - std::string cb_tag = "onClose"; + std::string cb_tag = "onCloseCallback"; std::string cb_name; if (olua_isfunction(L, 2)) { - cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](cocos2d::network::WebSocket *arg1) { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](cocos2d::network::WebSocket *cb_arg1) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); @@ -19590,7 +20960,7 @@ static int _cocos2d_LuaWebSocketDelegate_set_onCloseCallback(lua_State *L) int top = lua_gettop(L); size_t last = olua_push_objpool(L); olua_enable_objpool(L); - olua_push_object(L, arg1, "cc.WebSocket"); + olua_push_object(L, cb_arg1, "cc.WebSocket"); olua_disable_objpool(L); olua_callback(L, cb_store, cb_name.c_str(), 1); @@ -19605,7 +20975,7 @@ static int _cocos2d_LuaWebSocketDelegate_set_onCloseCallback(lua_State *L) arg1 = nullptr; } - // @nullable @localvar std::function onCloseCallback + // std::function onCloseCallback self->onCloseCallback = arg1; olua_endinvoke(L); @@ -19613,7 +20983,28 @@ static int _cocos2d_LuaWebSocketDelegate_set_onCloseCallback(lua_State *L) return 0; } -static int _cocos2d_LuaWebSocketDelegate_get_onErrorCallback(lua_State *L) +static int _olua_fun_cocos2d_LuaWebSocketDelegate_onClose(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // std::function onCloseCallback + return _olua_fun_cocos2d_LuaWebSocketDelegate_onClose$1(L); + } + + if (num_args == 1) { + // if ((olua_is_callback(L, 2, "std.function") || olua_isnil(L, 2))) { + // std::function onCloseCallback + return _olua_fun_cocos2d_LuaWebSocketDelegate_onClose$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::LuaWebSocketDelegate::onClose' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_LuaWebSocketDelegate_onError$1(lua_State *L) { olua_startinvoke(L); @@ -19622,10 +21013,10 @@ static int _cocos2d_LuaWebSocketDelegate_get_onErrorCallback(lua_State *L) olua_to_object(L, 1, &self, "cc.LuaWebSocketDelegate"); void *cb_store = (void *)self; - std::string cb_tag = "onError"; + std::string cb_tag = "onErrorCallback"; olua_getcallback(L, cb_store, cb_tag.c_str(), OLUA_TAG_EQUAL); - // @nullable @localvar std::function onErrorCallback + // std::function onErrorCallback std::function ret = self->onErrorCallback; int num_ret = olua_push_callback(L, &ret, "std.function"); @@ -19634,7 +21025,7 @@ static int _cocos2d_LuaWebSocketDelegate_get_onErrorCallback(lua_State *L) return num_ret; } -static int _cocos2d_LuaWebSocketDelegate_set_onErrorCallback(lua_State *L) +static int _olua_fun_cocos2d_LuaWebSocketDelegate_onError$2(lua_State *L) { olua_startinvoke(L); @@ -19647,12 +21038,13 @@ static int _cocos2d_LuaWebSocketDelegate_set_onErrorCallback(lua_State *L) } void *cb_store = (void *)self; - std::string cb_tag = "onError"; + std::string cb_tag = "onErrorCallback"; std::string cb_name; if (olua_isfunction(L, 2)) { - cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](cocos2d::network::WebSocket *arg1, const cocos2d::network::WebSocket::ErrorCode &arg2) { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](cocos2d::network::WebSocket *cb_arg1, const cocos2d::network::WebSocket::ErrorCode &cb_arg2) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); @@ -19660,8 +21052,8 @@ static int _cocos2d_LuaWebSocketDelegate_set_onErrorCallback(lua_State *L) int top = lua_gettop(L); size_t last = olua_push_objpool(L); olua_enable_objpool(L); - olua_push_object(L, arg1, "cc.WebSocket"); - olua_push_enum(L, arg2); + olua_push_object(L, cb_arg1, "cc.WebSocket"); + olua_push_enum(L, cb_arg2); olua_disable_objpool(L); olua_callback(L, cb_store, cb_name.c_str(), 2); @@ -19676,7 +21068,7 @@ static int _cocos2d_LuaWebSocketDelegate_set_onErrorCallback(lua_State *L) arg1 = nullptr; } - // @nullable @localvar std::function onErrorCallback + // std::function onErrorCallback self->onErrorCallback = arg1; olua_endinvoke(L); @@ -19684,7 +21076,28 @@ static int _cocos2d_LuaWebSocketDelegate_set_onErrorCallback(lua_State *L) return 0; } -static int _cocos2d_LuaWebSocketDelegate_get_onMessageCallback(lua_State *L) +static int _olua_fun_cocos2d_LuaWebSocketDelegate_onError(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // std::function onErrorCallback + return _olua_fun_cocos2d_LuaWebSocketDelegate_onError$1(L); + } + + if (num_args == 1) { + // if ((olua_is_callback(L, 2, "std.function") || olua_isnil(L, 2))) { + // std::function onErrorCallback + return _olua_fun_cocos2d_LuaWebSocketDelegate_onError$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::LuaWebSocketDelegate::onError' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_LuaWebSocketDelegate_onMessage$1(lua_State *L) { olua_startinvoke(L); @@ -19693,10 +21106,10 @@ static int _cocos2d_LuaWebSocketDelegate_get_onMessageCallback(lua_State *L) olua_to_object(L, 1, &self, "cc.LuaWebSocketDelegate"); void *cb_store = (void *)self; - std::string cb_tag = "onMessage"; + std::string cb_tag = "onMessageCallback"; olua_getcallback(L, cb_store, cb_tag.c_str(), OLUA_TAG_EQUAL); - // @nullable @localvar std::function onMessageCallback + // std::function onMessageCallback std::function ret = self->onMessageCallback; int num_ret = olua_push_callback(L, &ret, "std.function"); @@ -19705,7 +21118,7 @@ static int _cocos2d_LuaWebSocketDelegate_get_onMessageCallback(lua_State *L) return num_ret; } -static int _cocos2d_LuaWebSocketDelegate_set_onMessageCallback(lua_State *L) +static int _olua_fun_cocos2d_LuaWebSocketDelegate_onMessage$2(lua_State *L) { olua_startinvoke(L); @@ -19718,12 +21131,13 @@ static int _cocos2d_LuaWebSocketDelegate_set_onMessageCallback(lua_State *L) } void *cb_store = (void *)self; - std::string cb_tag = "onMessage"; + std::string cb_tag = "onMessageCallback"; std::string cb_name; if (olua_isfunction(L, 2)) { - cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](cocos2d::network::WebSocket *arg1, const cocos2d::network::WebSocket::Data &arg2) { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](cocos2d::network::WebSocket *cb_arg1, const cocos2d::network::WebSocket::Data &cb_arg2) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); @@ -19731,8 +21145,8 @@ static int _cocos2d_LuaWebSocketDelegate_set_onMessageCallback(lua_State *L) int top = lua_gettop(L); size_t last = olua_push_objpool(L); olua_enable_objpool(L); - olua_push_object(L, arg1, "cc.WebSocket"); - olua_push_cocos2d_network_WebSocket_Data(L, arg2); + olua_push_object(L, cb_arg1, "cc.WebSocket"); + olua_push_cocos2d_network_WebSocket_Data(L, cb_arg2); olua_disable_objpool(L); olua_callback(L, cb_store, cb_name.c_str(), 2); @@ -19747,7 +21161,7 @@ static int _cocos2d_LuaWebSocketDelegate_set_onMessageCallback(lua_State *L) arg1 = nullptr; } - // @nullable @localvar std::function onMessageCallback + // std::function onMessageCallback self->onMessageCallback = arg1; olua_endinvoke(L); @@ -19755,7 +21169,28 @@ static int _cocos2d_LuaWebSocketDelegate_set_onMessageCallback(lua_State *L) return 0; } -static int _cocos2d_LuaWebSocketDelegate_get_onOpenCallback(lua_State *L) +static int _olua_fun_cocos2d_LuaWebSocketDelegate_onMessage(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // std::function onMessageCallback + return _olua_fun_cocos2d_LuaWebSocketDelegate_onMessage$1(L); + } + + if (num_args == 1) { + // if ((olua_is_callback(L, 2, "std.function") || olua_isnil(L, 2))) { + // std::function onMessageCallback + return _olua_fun_cocos2d_LuaWebSocketDelegate_onMessage$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::LuaWebSocketDelegate::onMessage' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_LuaWebSocketDelegate_onOpen$1(lua_State *L) { olua_startinvoke(L); @@ -19764,10 +21199,10 @@ static int _cocos2d_LuaWebSocketDelegate_get_onOpenCallback(lua_State *L) olua_to_object(L, 1, &self, "cc.LuaWebSocketDelegate"); void *cb_store = (void *)self; - std::string cb_tag = "onOpen"; + std::string cb_tag = "onOpenCallback"; olua_getcallback(L, cb_store, cb_tag.c_str(), OLUA_TAG_EQUAL); - // @nullable @localvar std::function onOpenCallback + // std::function onOpenCallback std::function ret = self->onOpenCallback; int num_ret = olua_push_callback(L, &ret, "std.function"); @@ -19776,7 +21211,7 @@ static int _cocos2d_LuaWebSocketDelegate_get_onOpenCallback(lua_State *L) return num_ret; } -static int _cocos2d_LuaWebSocketDelegate_set_onOpenCallback(lua_State *L) +static int _olua_fun_cocos2d_LuaWebSocketDelegate_onOpen$2(lua_State *L) { olua_startinvoke(L); @@ -19789,12 +21224,13 @@ static int _cocos2d_LuaWebSocketDelegate_set_onOpenCallback(lua_State *L) } void *cb_store = (void *)self; - std::string cb_tag = "onOpen"; + std::string cb_tag = "onOpenCallback"; std::string cb_name; if (olua_isfunction(L, 2)) { - cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](cocos2d::network::WebSocket *arg1) { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](cocos2d::network::WebSocket *cb_arg1) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); @@ -19802,7 +21238,7 @@ static int _cocos2d_LuaWebSocketDelegate_set_onOpenCallback(lua_State *L) int top = lua_gettop(L); size_t last = olua_push_objpool(L); olua_enable_objpool(L); - olua_push_object(L, arg1, "cc.WebSocket"); + olua_push_object(L, cb_arg1, "cc.WebSocket"); olua_disable_objpool(L); olua_callback(L, cb_store, cb_name.c_str(), 1); @@ -19817,7 +21253,7 @@ static int _cocos2d_LuaWebSocketDelegate_set_onOpenCallback(lua_State *L) arg1 = nullptr; } - // @nullable @localvar std::function onOpenCallback + // std::function onOpenCallback self->onOpenCallback = arg1; olua_endinvoke(L); @@ -19825,21 +21261,51 @@ static int _cocos2d_LuaWebSocketDelegate_set_onOpenCallback(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_LuaWebSocketDelegate(lua_State *L) +static int _olua_fun_cocos2d_LuaWebSocketDelegate_onOpen(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // std::function onOpenCallback + return _olua_fun_cocos2d_LuaWebSocketDelegate_onOpen$1(L); + } + + if (num_args == 1) { + // if ((olua_is_callback(L, 2, "std.function") || olua_isnil(L, 2))) { + // std::function onOpenCallback + return _olua_fun_cocos2d_LuaWebSocketDelegate_onOpen$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::LuaWebSocketDelegate::onOpen' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_cls_cc_LuaWebSocketDelegate(lua_State *L) { oluacls_class(L, "cc.LuaWebSocketDelegate"); - oluacls_func(L, "new", _cocos2d_LuaWebSocketDelegate_new); - oluacls_prop(L, "onClose", _cocos2d_LuaWebSocketDelegate_get_onCloseCallback, _cocos2d_LuaWebSocketDelegate_set_onCloseCallback); - oluacls_prop(L, "onError", _cocos2d_LuaWebSocketDelegate_get_onErrorCallback, _cocos2d_LuaWebSocketDelegate_set_onErrorCallback); - oluacls_prop(L, "onMessage", _cocos2d_LuaWebSocketDelegate_get_onMessageCallback, _cocos2d_LuaWebSocketDelegate_set_onMessageCallback); - oluacls_prop(L, "onOpen", _cocos2d_LuaWebSocketDelegate_get_onOpenCallback, _cocos2d_LuaWebSocketDelegate_set_onOpenCallback); + oluacls_func(L, "new", _olua_fun_cocos2d_LuaWebSocketDelegate_new); + oluacls_prop(L, "onClose", _olua_fun_cocos2d_LuaWebSocketDelegate_onClose, _olua_fun_cocos2d_LuaWebSocketDelegate_onClose); + oluacls_prop(L, "onError", _olua_fun_cocos2d_LuaWebSocketDelegate_onError, _olua_fun_cocos2d_LuaWebSocketDelegate_onError); + oluacls_prop(L, "onMessage", _olua_fun_cocos2d_LuaWebSocketDelegate_onMessage, _olua_fun_cocos2d_LuaWebSocketDelegate_onMessage); + oluacls_prop(L, "onOpen", _olua_fun_cocos2d_LuaWebSocketDelegate_onOpen, _olua_fun_cocos2d_LuaWebSocketDelegate_onOpen); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_LuaWebSocketDelegate(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.LuaWebSocketDelegate")) { + luaL_error(L, "class not found: cocos2d::LuaWebSocketDelegate"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_ActionManager_addAction(lua_State *L) +static int _olua_fun_cocos2d_ActionManager_addAction(lua_State *L) { olua_startinvoke(L); @@ -19861,7 +21327,7 @@ static int _cocos2d_ActionManager_addAction(lua_State *L) return 0; } -static int _cocos2d_ActionManager_getActionByTag(lua_State *L) +static int _olua_fun_cocos2d_ActionManager_getActionByTag(lua_State *L) { olua_startinvoke(L); @@ -19882,7 +21348,7 @@ static int _cocos2d_ActionManager_getActionByTag(lua_State *L) return num_ret; } -static int _cocos2d_ActionManager_getNumberOfRunningActions(lua_State *L) +static int _olua_fun_cocos2d_ActionManager_getNumberOfRunningActions(lua_State *L) { olua_startinvoke(L); @@ -19899,7 +21365,7 @@ static int _cocos2d_ActionManager_getNumberOfRunningActions(lua_State *L) return num_ret; } -static int _cocos2d_ActionManager_getNumberOfRunningActionsInTarget(lua_State *L) +static int _olua_fun_cocos2d_ActionManager_getNumberOfRunningActionsInTarget(lua_State *L) { olua_startinvoke(L); @@ -19918,7 +21384,7 @@ static int _cocos2d_ActionManager_getNumberOfRunningActionsInTarget(lua_State *L return num_ret; } -static int _cocos2d_ActionManager_getNumberOfRunningActionsInTargetByTag(lua_State *L) +static int _olua_fun_cocos2d_ActionManager_getNumberOfRunningActionsInTargetByTag(lua_State *L) { olua_startinvoke(L); @@ -19939,11 +21405,11 @@ static int _cocos2d_ActionManager_getNumberOfRunningActionsInTargetByTag(lua_Sta return num_ret; } -static int _cocos2d_ActionManager_new(lua_State *L) +static int _olua_fun_cocos2d_ActionManager_new(lua_State *L) { olua_startinvoke(L); - // ActionManager() + // cocos2d::ActionManager() cocos2d::ActionManager *ret = new cocos2d::ActionManager(); int num_ret = olua_push_object(L, ret, "cc.ActionManager"); olua_postnew(L, ret); @@ -19953,7 +21419,7 @@ static int _cocos2d_ActionManager_new(lua_State *L) return num_ret; } -static int _cocos2d_ActionManager_pauseAllRunningActions(lua_State *L) +static int _olua_fun_cocos2d_ActionManager_pauseAllRunningActions(lua_State *L) { olua_startinvoke(L); @@ -19972,7 +21438,7 @@ static int _cocos2d_ActionManager_pauseAllRunningActions(lua_State *L) return num_ret; } -static int _cocos2d_ActionManager_pauseTarget(lua_State *L) +static int _olua_fun_cocos2d_ActionManager_pauseTarget(lua_State *L) { olua_startinvoke(L); @@ -19990,7 +21456,7 @@ static int _cocos2d_ActionManager_pauseTarget(lua_State *L) return 0; } -static int _cocos2d_ActionManager_removeAction(lua_State *L) +static int _olua_fun_cocos2d_ActionManager_removeAction(lua_State *L) { olua_startinvoke(L); @@ -20008,7 +21474,7 @@ static int _cocos2d_ActionManager_removeAction(lua_State *L) return 0; } -static int _cocos2d_ActionManager_removeActionByTag(lua_State *L) +static int _olua_fun_cocos2d_ActionManager_removeActionByTag(lua_State *L) { olua_startinvoke(L); @@ -20028,7 +21494,7 @@ static int _cocos2d_ActionManager_removeActionByTag(lua_State *L) return 0; } -static int _cocos2d_ActionManager_removeActionsByFlags(lua_State *L) +static int _olua_fun_cocos2d_ActionManager_removeActionsByFlags(lua_State *L) { olua_startinvoke(L); @@ -20048,7 +21514,7 @@ static int _cocos2d_ActionManager_removeActionsByFlags(lua_State *L) return 0; } -static int _cocos2d_ActionManager_removeAllActions(lua_State *L) +static int _olua_fun_cocos2d_ActionManager_removeAllActions(lua_State *L) { olua_startinvoke(L); @@ -20064,7 +21530,7 @@ static int _cocos2d_ActionManager_removeAllActions(lua_State *L) return 0; } -static int _cocos2d_ActionManager_removeAllActionsByTag(lua_State *L) +static int _olua_fun_cocos2d_ActionManager_removeAllActionsByTag(lua_State *L) { olua_startinvoke(L); @@ -20084,7 +21550,7 @@ static int _cocos2d_ActionManager_removeAllActionsByTag(lua_State *L) return 0; } -static int _cocos2d_ActionManager_removeAllActionsFromTarget(lua_State *L) +static int _olua_fun_cocos2d_ActionManager_removeAllActionsFromTarget(lua_State *L) { olua_startinvoke(L); @@ -20102,7 +21568,7 @@ static int _cocos2d_ActionManager_removeAllActionsFromTarget(lua_State *L) return 0; } -static int _cocos2d_ActionManager_resumeTarget(lua_State *L) +static int _olua_fun_cocos2d_ActionManager_resumeTarget(lua_State *L) { olua_startinvoke(L); @@ -20120,7 +21586,7 @@ static int _cocos2d_ActionManager_resumeTarget(lua_State *L) return 0; } -static int _cocos2d_ActionManager_resumeTargets(lua_State *L) +static int _olua_fun_cocos2d_ActionManager_resumeTargets(lua_State *L) { olua_startinvoke(L); @@ -20140,7 +21606,7 @@ static int _cocos2d_ActionManager_resumeTargets(lua_State *L) return 0; } -static int _cocos2d_ActionManager_update(lua_State *L) +static int _olua_fun_cocos2d_ActionManager_update(lua_State *L) { olua_startinvoke(L); @@ -20158,34 +21624,43 @@ static int _cocos2d_ActionManager_update(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ActionManager(lua_State *L) +static int _olua_cls_cc_ActionManager(lua_State *L) { oluacls_class(L, "cc.ActionManager"); - oluacls_func(L, "addAction", _cocos2d_ActionManager_addAction); - oluacls_func(L, "getActionByTag", _cocos2d_ActionManager_getActionByTag); - oluacls_func(L, "getNumberOfRunningActions", _cocos2d_ActionManager_getNumberOfRunningActions); - oluacls_func(L, "getNumberOfRunningActionsInTarget", _cocos2d_ActionManager_getNumberOfRunningActionsInTarget); - oluacls_func(L, "getNumberOfRunningActionsInTargetByTag", _cocos2d_ActionManager_getNumberOfRunningActionsInTargetByTag); - oluacls_func(L, "new", _cocos2d_ActionManager_new); - oluacls_func(L, "pauseAllRunningActions", _cocos2d_ActionManager_pauseAllRunningActions); - oluacls_func(L, "pauseTarget", _cocos2d_ActionManager_pauseTarget); - oluacls_func(L, "removeAction", _cocos2d_ActionManager_removeAction); - oluacls_func(L, "removeActionByTag", _cocos2d_ActionManager_removeActionByTag); - oluacls_func(L, "removeActionsByFlags", _cocos2d_ActionManager_removeActionsByFlags); - oluacls_func(L, "removeAllActions", _cocos2d_ActionManager_removeAllActions); - oluacls_func(L, "removeAllActionsByTag", _cocos2d_ActionManager_removeAllActionsByTag); - oluacls_func(L, "removeAllActionsFromTarget", _cocos2d_ActionManager_removeAllActionsFromTarget); - oluacls_func(L, "resumeTarget", _cocos2d_ActionManager_resumeTarget); - oluacls_func(L, "resumeTargets", _cocos2d_ActionManager_resumeTargets); - oluacls_func(L, "update", _cocos2d_ActionManager_update); - oluacls_prop(L, "numberOfRunningActions", _cocos2d_ActionManager_getNumberOfRunningActions, nullptr); + oluacls_func(L, "addAction", _olua_fun_cocos2d_ActionManager_addAction); + oluacls_func(L, "getActionByTag", _olua_fun_cocos2d_ActionManager_getActionByTag); + oluacls_func(L, "getNumberOfRunningActions", _olua_fun_cocos2d_ActionManager_getNumberOfRunningActions); + oluacls_func(L, "getNumberOfRunningActionsInTarget", _olua_fun_cocos2d_ActionManager_getNumberOfRunningActionsInTarget); + oluacls_func(L, "getNumberOfRunningActionsInTargetByTag", _olua_fun_cocos2d_ActionManager_getNumberOfRunningActionsInTargetByTag); + oluacls_func(L, "new", _olua_fun_cocos2d_ActionManager_new); + oluacls_func(L, "pauseAllRunningActions", _olua_fun_cocos2d_ActionManager_pauseAllRunningActions); + oluacls_func(L, "pauseTarget", _olua_fun_cocos2d_ActionManager_pauseTarget); + oluacls_func(L, "removeAction", _olua_fun_cocos2d_ActionManager_removeAction); + oluacls_func(L, "removeActionByTag", _olua_fun_cocos2d_ActionManager_removeActionByTag); + oluacls_func(L, "removeActionsByFlags", _olua_fun_cocos2d_ActionManager_removeActionsByFlags); + oluacls_func(L, "removeAllActions", _olua_fun_cocos2d_ActionManager_removeAllActions); + oluacls_func(L, "removeAllActionsByTag", _olua_fun_cocos2d_ActionManager_removeAllActionsByTag); + oluacls_func(L, "removeAllActionsFromTarget", _olua_fun_cocos2d_ActionManager_removeAllActionsFromTarget); + oluacls_func(L, "resumeTarget", _olua_fun_cocos2d_ActionManager_resumeTarget); + oluacls_func(L, "resumeTargets", _olua_fun_cocos2d_ActionManager_resumeTargets); + oluacls_func(L, "update", _olua_fun_cocos2d_ActionManager_update); + oluacls_prop(L, "numberOfRunningActions", _olua_fun_cocos2d_ActionManager_getNumberOfRunningActions, nullptr); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_ActionManager(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.ActionManager")) { + luaL_error(L, "class not found: cocos2d::ActionManager"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_Component_create(lua_State *L) +static int _olua_fun_cocos2d_Component_create(lua_State *L) { olua_startinvoke(L); @@ -20198,7 +21673,7 @@ static int _cocos2d_Component_create(lua_State *L) return num_ret; } -static int _cocos2d_Component_getName(lua_State *L) +static int _olua_fun_cocos2d_Component_getName(lua_State *L) { olua_startinvoke(L); @@ -20215,7 +21690,7 @@ static int _cocos2d_Component_getName(lua_State *L) return num_ret; } -static int _cocos2d_Component_getOwner(lua_State *L) +static int _olua_fun_cocos2d_Component_getOwner(lua_State *L) { olua_startinvoke(L); @@ -20232,7 +21707,7 @@ static int _cocos2d_Component_getOwner(lua_State *L) return num_ret; } -static int _cocos2d_Component_init(lua_State *L) +static int _olua_fun_cocos2d_Component_init(lua_State *L) { olua_startinvoke(L); @@ -20249,7 +21724,7 @@ static int _cocos2d_Component_init(lua_State *L) return num_ret; } -static int _cocos2d_Component_isEnabled(lua_State *L) +static int _olua_fun_cocos2d_Component_isEnabled(lua_State *L) { olua_startinvoke(L); @@ -20266,11 +21741,11 @@ static int _cocos2d_Component_isEnabled(lua_State *L) return num_ret; } -static int _cocos2d_Component_new(lua_State *L) +static int _olua_fun_cocos2d_Component_new(lua_State *L) { olua_startinvoke(L); - // Component() + // cocos2d::Component() cocos2d::Component *ret = new cocos2d::Component(); int num_ret = olua_push_object(L, ret, "cc.Component"); olua_postnew(L, ret); @@ -20280,7 +21755,7 @@ static int _cocos2d_Component_new(lua_State *L) return num_ret; } -static int _cocos2d_Component_onAdd(lua_State *L) +static int _olua_fun_cocos2d_Component_onAdd(lua_State *L) { olua_startinvoke(L); @@ -20296,7 +21771,7 @@ static int _cocos2d_Component_onAdd(lua_State *L) return 0; } -static int _cocos2d_Component_onEnter(lua_State *L) +static int _olua_fun_cocos2d_Component_onEnter(lua_State *L) { olua_startinvoke(L); @@ -20312,7 +21787,7 @@ static int _cocos2d_Component_onEnter(lua_State *L) return 0; } -static int _cocos2d_Component_onExit(lua_State *L) +static int _olua_fun_cocos2d_Component_onExit(lua_State *L) { olua_startinvoke(L); @@ -20328,7 +21803,7 @@ static int _cocos2d_Component_onExit(lua_State *L) return 0; } -static int _cocos2d_Component_onRemove(lua_State *L) +static int _olua_fun_cocos2d_Component_onRemove(lua_State *L) { olua_startinvoke(L); @@ -20344,7 +21819,7 @@ static int _cocos2d_Component_onRemove(lua_State *L) return 0; } -static int _cocos2d_Component_serialize(lua_State *L) +static int _olua_fun_cocos2d_Component_serialize(lua_State *L) { olua_startinvoke(L); @@ -20363,7 +21838,7 @@ static int _cocos2d_Component_serialize(lua_State *L) return num_ret; } -static int _cocos2d_Component_setEnabled(lua_State *L) +static int _olua_fun_cocos2d_Component_setEnabled(lua_State *L) { olua_startinvoke(L); @@ -20381,7 +21856,7 @@ static int _cocos2d_Component_setEnabled(lua_State *L) return 0; } -static int _cocos2d_Component_setName(lua_State *L) +static int _olua_fun_cocos2d_Component_setName(lua_State *L) { olua_startinvoke(L); @@ -20399,7 +21874,7 @@ static int _cocos2d_Component_setName(lua_State *L) return 0; } -static int _cocos2d_Component_setOwner(lua_State *L) +static int _olua_fun_cocos2d_Component_setOwner(lua_State *L) { olua_startinvoke(L); @@ -20417,7 +21892,7 @@ static int _cocos2d_Component_setOwner(lua_State *L) return 0; } -static int _cocos2d_Component_update(lua_State *L) +static int _olua_fun_cocos2d_Component_update(lua_State *L) { olua_startinvoke(L); @@ -20435,34 +21910,43 @@ static int _cocos2d_Component_update(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_Component(lua_State *L) +static int _olua_cls_cc_Component(lua_State *L) { oluacls_class(L, "cc.Component"); - oluacls_func(L, "create", _cocos2d_Component_create); - oluacls_func(L, "getName", _cocos2d_Component_getName); - oluacls_func(L, "getOwner", _cocos2d_Component_getOwner); - oluacls_func(L, "init", _cocos2d_Component_init); - oluacls_func(L, "isEnabled", _cocos2d_Component_isEnabled); - oluacls_func(L, "new", _cocos2d_Component_new); - oluacls_func(L, "onAdd", _cocos2d_Component_onAdd); - oluacls_func(L, "onEnter", _cocos2d_Component_onEnter); - oluacls_func(L, "onExit", _cocos2d_Component_onExit); - oluacls_func(L, "onRemove", _cocos2d_Component_onRemove); - oluacls_func(L, "serialize", _cocos2d_Component_serialize); - oluacls_func(L, "setEnabled", _cocos2d_Component_setEnabled); - oluacls_func(L, "setName", _cocos2d_Component_setName); - oluacls_func(L, "setOwner", _cocos2d_Component_setOwner); - oluacls_func(L, "update", _cocos2d_Component_update); - oluacls_prop(L, "enabled", _cocos2d_Component_isEnabled, _cocos2d_Component_setEnabled); - oluacls_prop(L, "name", _cocos2d_Component_getName, _cocos2d_Component_setName); - oluacls_prop(L, "owner", _cocos2d_Component_getOwner, _cocos2d_Component_setOwner); + oluacls_func(L, "create", _olua_fun_cocos2d_Component_create); + oluacls_func(L, "getName", _olua_fun_cocos2d_Component_getName); + oluacls_func(L, "getOwner", _olua_fun_cocos2d_Component_getOwner); + oluacls_func(L, "init", _olua_fun_cocos2d_Component_init); + oluacls_func(L, "isEnabled", _olua_fun_cocos2d_Component_isEnabled); + oluacls_func(L, "new", _olua_fun_cocos2d_Component_new); + oluacls_func(L, "onAdd", _olua_fun_cocos2d_Component_onAdd); + oluacls_func(L, "onEnter", _olua_fun_cocos2d_Component_onEnter); + oluacls_func(L, "onExit", _olua_fun_cocos2d_Component_onExit); + oluacls_func(L, "onRemove", _olua_fun_cocos2d_Component_onRemove); + oluacls_func(L, "serialize", _olua_fun_cocos2d_Component_serialize); + oluacls_func(L, "setEnabled", _olua_fun_cocos2d_Component_setEnabled); + oluacls_func(L, "setName", _olua_fun_cocos2d_Component_setName); + oluacls_func(L, "setOwner", _olua_fun_cocos2d_Component_setOwner); + oluacls_func(L, "update", _olua_fun_cocos2d_Component_update); + oluacls_prop(L, "enabled", _olua_fun_cocos2d_Component_isEnabled, _olua_fun_cocos2d_Component_setEnabled); + oluacls_prop(L, "name", _olua_fun_cocos2d_Component_getName, _olua_fun_cocos2d_Component_setName); + oluacls_prop(L, "owner", _olua_fun_cocos2d_Component_getOwner, _olua_fun_cocos2d_Component_setOwner); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_Component(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.Component")) { + luaL_error(L, "class not found: cocos2d::Component"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_LuaComponent_create(lua_State *L) +static int _olua_fun_cocos2d_LuaComponent_create(lua_State *L) { olua_startinvoke(L); @@ -20475,11 +21959,11 @@ static int _cocos2d_LuaComponent_create(lua_State *L) return num_ret; } -static int _cocos2d_LuaComponent_new(lua_State *L) +static int _olua_fun_cocos2d_LuaComponent_new(lua_State *L) { olua_startinvoke(L); - // LuaComponent() + // cocos2d::LuaComponent() cocos2d::LuaComponent *ret = new cocos2d::LuaComponent(); int num_ret = olua_push_object(L, ret, "cc.LuaComponent"); olua_postnew(L, ret); @@ -20489,7 +21973,7 @@ static int _cocos2d_LuaComponent_new(lua_State *L) return num_ret; } -static int _cocos2d_LuaComponent_get_onAddCallback(lua_State *L) +static int _olua_fun_cocos2d_LuaComponent_onAdd$1(lua_State *L) { olua_startinvoke(L); @@ -20498,10 +21982,10 @@ static int _cocos2d_LuaComponent_get_onAddCallback(lua_State *L) olua_to_object(L, 1, &self, "cc.LuaComponent"); void *cb_store = (void *)self; - std::string cb_tag = "onAdd"; + std::string cb_tag = "onAddCallback"; olua_getcallback(L, cb_store, cb_tag.c_str(), OLUA_TAG_EQUAL); - // @nullable @localvar std::function onAddCallback + // std::function onAddCallback std::function ret = self->onAddCallback; int num_ret = olua_push_callback(L, &ret, "std.function"); @@ -20510,7 +21994,7 @@ static int _cocos2d_LuaComponent_get_onAddCallback(lua_State *L) return num_ret; } -static int _cocos2d_LuaComponent_set_onAddCallback(lua_State *L) +static int _olua_fun_cocos2d_LuaComponent_onAdd$2(lua_State *L) { olua_startinvoke(L); @@ -20523,12 +22007,13 @@ static int _cocos2d_LuaComponent_set_onAddCallback(lua_State *L) } void *cb_store = (void *)self; - std::string cb_tag = "onAdd"; + std::string cb_tag = "onAddCallback"; std::string cb_name; if (olua_isfunction(L, 2)) { - cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx]() { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */]() { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); @@ -20545,7 +22030,7 @@ static int _cocos2d_LuaComponent_set_onAddCallback(lua_State *L) arg1 = nullptr; } - // @nullable @localvar std::function onAddCallback + // std::function onAddCallback self->onAddCallback = arg1; olua_endinvoke(L); @@ -20553,7 +22038,28 @@ static int _cocos2d_LuaComponent_set_onAddCallback(lua_State *L) return 0; } -static int _cocos2d_LuaComponent_get_onEnterCallback(lua_State *L) +static int _olua_fun_cocos2d_LuaComponent_onAdd(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // std::function onAddCallback + return _olua_fun_cocos2d_LuaComponent_onAdd$1(L); + } + + if (num_args == 1) { + // if ((olua_is_callback(L, 2, "std.function") || olua_isnil(L, 2))) { + // std::function onAddCallback + return _olua_fun_cocos2d_LuaComponent_onAdd$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::LuaComponent::onAdd' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_LuaComponent_onEnter$1(lua_State *L) { olua_startinvoke(L); @@ -20562,10 +22068,10 @@ static int _cocos2d_LuaComponent_get_onEnterCallback(lua_State *L) olua_to_object(L, 1, &self, "cc.LuaComponent"); void *cb_store = (void *)self; - std::string cb_tag = "onEnter"; + std::string cb_tag = "onEnterCallback"; olua_getcallback(L, cb_store, cb_tag.c_str(), OLUA_TAG_EQUAL); - // @nullable @localvar std::function onEnterCallback + // std::function onEnterCallback std::function ret = self->onEnterCallback; int num_ret = olua_push_callback(L, &ret, "std.function"); @@ -20574,7 +22080,7 @@ static int _cocos2d_LuaComponent_get_onEnterCallback(lua_State *L) return num_ret; } -static int _cocos2d_LuaComponent_set_onEnterCallback(lua_State *L) +static int _olua_fun_cocos2d_LuaComponent_onEnter$2(lua_State *L) { olua_startinvoke(L); @@ -20587,12 +22093,13 @@ static int _cocos2d_LuaComponent_set_onEnterCallback(lua_State *L) } void *cb_store = (void *)self; - std::string cb_tag = "onEnter"; + std::string cb_tag = "onEnterCallback"; std::string cb_name; if (olua_isfunction(L, 2)) { - cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx]() { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */]() { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); @@ -20609,7 +22116,7 @@ static int _cocos2d_LuaComponent_set_onEnterCallback(lua_State *L) arg1 = nullptr; } - // @nullable @localvar std::function onEnterCallback + // std::function onEnterCallback self->onEnterCallback = arg1; olua_endinvoke(L); @@ -20617,7 +22124,28 @@ static int _cocos2d_LuaComponent_set_onEnterCallback(lua_State *L) return 0; } -static int _cocos2d_LuaComponent_get_onExitCallback(lua_State *L) +static int _olua_fun_cocos2d_LuaComponent_onEnter(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // std::function onEnterCallback + return _olua_fun_cocos2d_LuaComponent_onEnter$1(L); + } + + if (num_args == 1) { + // if ((olua_is_callback(L, 2, "std.function") || olua_isnil(L, 2))) { + // std::function onEnterCallback + return _olua_fun_cocos2d_LuaComponent_onEnter$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::LuaComponent::onEnter' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_LuaComponent_onExit$1(lua_State *L) { olua_startinvoke(L); @@ -20626,10 +22154,10 @@ static int _cocos2d_LuaComponent_get_onExitCallback(lua_State *L) olua_to_object(L, 1, &self, "cc.LuaComponent"); void *cb_store = (void *)self; - std::string cb_tag = "onExit"; + std::string cb_tag = "onExitCallback"; olua_getcallback(L, cb_store, cb_tag.c_str(), OLUA_TAG_EQUAL); - // @nullable @localvar std::function onExitCallback + // std::function onExitCallback std::function ret = self->onExitCallback; int num_ret = olua_push_callback(L, &ret, "std.function"); @@ -20638,7 +22166,7 @@ static int _cocos2d_LuaComponent_get_onExitCallback(lua_State *L) return num_ret; } -static int _cocos2d_LuaComponent_set_onExitCallback(lua_State *L) +static int _olua_fun_cocos2d_LuaComponent_onExit$2(lua_State *L) { olua_startinvoke(L); @@ -20651,12 +22179,13 @@ static int _cocos2d_LuaComponent_set_onExitCallback(lua_State *L) } void *cb_store = (void *)self; - std::string cb_tag = "onExit"; + std::string cb_tag = "onExitCallback"; std::string cb_name; if (olua_isfunction(L, 2)) { - cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx]() { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */]() { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); @@ -20673,7 +22202,7 @@ static int _cocos2d_LuaComponent_set_onExitCallback(lua_State *L) arg1 = nullptr; } - // @nullable @localvar std::function onExitCallback + // std::function onExitCallback self->onExitCallback = arg1; olua_endinvoke(L); @@ -20681,7 +22210,28 @@ static int _cocos2d_LuaComponent_set_onExitCallback(lua_State *L) return 0; } -static int _cocos2d_LuaComponent_get_onRemoveCallback(lua_State *L) +static int _olua_fun_cocos2d_LuaComponent_onExit(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // std::function onExitCallback + return _olua_fun_cocos2d_LuaComponent_onExit$1(L); + } + + if (num_args == 1) { + // if ((olua_is_callback(L, 2, "std.function") || olua_isnil(L, 2))) { + // std::function onExitCallback + return _olua_fun_cocos2d_LuaComponent_onExit$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::LuaComponent::onExit' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_LuaComponent_onRemove$1(lua_State *L) { olua_startinvoke(L); @@ -20690,10 +22240,10 @@ static int _cocos2d_LuaComponent_get_onRemoveCallback(lua_State *L) olua_to_object(L, 1, &self, "cc.LuaComponent"); void *cb_store = (void *)self; - std::string cb_tag = "onRemove"; + std::string cb_tag = "onRemoveCallback"; olua_getcallback(L, cb_store, cb_tag.c_str(), OLUA_TAG_EQUAL); - // @nullable @localvar std::function onRemoveCallback + // std::function onRemoveCallback std::function ret = self->onRemoveCallback; int num_ret = olua_push_callback(L, &ret, "std.function"); @@ -20702,7 +22252,7 @@ static int _cocos2d_LuaComponent_get_onRemoveCallback(lua_State *L) return num_ret; } -static int _cocos2d_LuaComponent_set_onRemoveCallback(lua_State *L) +static int _olua_fun_cocos2d_LuaComponent_onRemove$2(lua_State *L) { olua_startinvoke(L); @@ -20715,12 +22265,13 @@ static int _cocos2d_LuaComponent_set_onRemoveCallback(lua_State *L) } void *cb_store = (void *)self; - std::string cb_tag = "onRemove"; + std::string cb_tag = "onRemoveCallback"; std::string cb_name; if (olua_isfunction(L, 2)) { - cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx]() { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */]() { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); @@ -20737,7 +22288,7 @@ static int _cocos2d_LuaComponent_set_onRemoveCallback(lua_State *L) arg1 = nullptr; } - // @nullable @localvar std::function onRemoveCallback + // std::function onRemoveCallback self->onRemoveCallback = arg1; olua_endinvoke(L); @@ -20745,7 +22296,28 @@ static int _cocos2d_LuaComponent_set_onRemoveCallback(lua_State *L) return 0; } -static int _cocos2d_LuaComponent_get_onUpdateCallback(lua_State *L) +static int _olua_fun_cocos2d_LuaComponent_onRemove(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // std::function onRemoveCallback + return _olua_fun_cocos2d_LuaComponent_onRemove$1(L); + } + + if (num_args == 1) { + // if ((olua_is_callback(L, 2, "std.function") || olua_isnil(L, 2))) { + // std::function onRemoveCallback + return _olua_fun_cocos2d_LuaComponent_onRemove$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::LuaComponent::onRemove' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_LuaComponent_onUpdate$1(lua_State *L) { olua_startinvoke(L); @@ -20754,10 +22326,10 @@ static int _cocos2d_LuaComponent_get_onUpdateCallback(lua_State *L) olua_to_object(L, 1, &self, "cc.LuaComponent"); void *cb_store = (void *)self; - std::string cb_tag = "onUpdate"; + std::string cb_tag = "onUpdateCallback"; olua_getcallback(L, cb_store, cb_tag.c_str(), OLUA_TAG_EQUAL); - // @nullable @localvar std::function onUpdateCallback + // std::function onUpdateCallback std::function ret = self->onUpdateCallback; int num_ret = olua_push_callback(L, &ret, "std.function"); @@ -20766,7 +22338,7 @@ static int _cocos2d_LuaComponent_get_onUpdateCallback(lua_State *L) return num_ret; } -static int _cocos2d_LuaComponent_set_onUpdateCallback(lua_State *L) +static int _olua_fun_cocos2d_LuaComponent_onUpdate$2(lua_State *L) { olua_startinvoke(L); @@ -20779,18 +22351,19 @@ static int _cocos2d_LuaComponent_set_onUpdateCallback(lua_State *L) } void *cb_store = (void *)self; - std::string cb_tag = "onUpdate"; + std::string cb_tag = "onUpdateCallback"; std::string cb_name; if (olua_isfunction(L, 2)) { - cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](float arg1) { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](float cb_arg1) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); if (olua_contextequal(L, cb_ctx)) { int top = lua_gettop(L); - olua_push_number(L, arg1); + olua_push_number(L, cb_arg1); olua_callback(L, cb_store, cb_name.c_str(), 1); @@ -20802,7 +22375,7 @@ static int _cocos2d_LuaComponent_set_onUpdateCallback(lua_State *L) arg1 = nullptr; } - // @nullable @localvar std::function onUpdateCallback + // std::function onUpdateCallback self->onUpdateCallback = arg1; olua_endinvoke(L); @@ -20810,23 +22383,53 @@ static int _cocos2d_LuaComponent_set_onUpdateCallback(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_LuaComponent(lua_State *L) +static int _olua_fun_cocos2d_LuaComponent_onUpdate(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // std::function onUpdateCallback + return _olua_fun_cocos2d_LuaComponent_onUpdate$1(L); + } + + if (num_args == 1) { + // if ((olua_is_callback(L, 2, "std.function") || olua_isnil(L, 2))) { + // std::function onUpdateCallback + return _olua_fun_cocos2d_LuaComponent_onUpdate$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::LuaComponent::onUpdate' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_cls_cc_LuaComponent(lua_State *L) { oluacls_class(L, "cc.LuaComponent"); - oluacls_func(L, "create", _cocos2d_LuaComponent_create); - oluacls_func(L, "new", _cocos2d_LuaComponent_new); - oluacls_prop(L, "onAdd", _cocos2d_LuaComponent_get_onAddCallback, _cocos2d_LuaComponent_set_onAddCallback); - oluacls_prop(L, "onEnter", _cocos2d_LuaComponent_get_onEnterCallback, _cocos2d_LuaComponent_set_onEnterCallback); - oluacls_prop(L, "onExit", _cocos2d_LuaComponent_get_onExitCallback, _cocos2d_LuaComponent_set_onExitCallback); - oluacls_prop(L, "onRemove", _cocos2d_LuaComponent_get_onRemoveCallback, _cocos2d_LuaComponent_set_onRemoveCallback); - oluacls_prop(L, "onUpdate", _cocos2d_LuaComponent_get_onUpdateCallback, _cocos2d_LuaComponent_set_onUpdateCallback); + oluacls_func(L, "create", _olua_fun_cocos2d_LuaComponent_create); + oluacls_func(L, "new", _olua_fun_cocos2d_LuaComponent_new); + oluacls_prop(L, "onAdd", _olua_fun_cocos2d_LuaComponent_onAdd, _olua_fun_cocos2d_LuaComponent_onAdd); + oluacls_prop(L, "onEnter", _olua_fun_cocos2d_LuaComponent_onEnter, _olua_fun_cocos2d_LuaComponent_onEnter); + oluacls_prop(L, "onExit", _olua_fun_cocos2d_LuaComponent_onExit, _olua_fun_cocos2d_LuaComponent_onExit); + oluacls_prop(L, "onRemove", _olua_fun_cocos2d_LuaComponent_onRemove, _olua_fun_cocos2d_LuaComponent_onRemove); + oluacls_prop(L, "onUpdate", _olua_fun_cocos2d_LuaComponent_onUpdate, _olua_fun_cocos2d_LuaComponent_onUpdate); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_LuaComponent(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.LuaComponent")) { + luaL_error(L, "class not found: cocos2d::LuaComponent"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_Node___index(lua_State *L) +static int _olua_fun_cocos2d_Node___index(lua_State *L) { olua_startinvoke(L); @@ -20838,7 +22441,7 @@ static int _cocos2d_Node___index(lua_State *L) return (int)ret; } -static int _cocos2d_Node_addChild$1(lua_State *L) +static int _olua_fun_cocos2d_Node_addChild$1(lua_State *L) { olua_startinvoke(L); @@ -20859,7 +22462,7 @@ static int _cocos2d_Node_addChild$1(lua_State *L) return 0; } -static int _cocos2d_Node_addChild$2(lua_State *L) +static int _olua_fun_cocos2d_Node_addChild$2(lua_State *L) { olua_startinvoke(L); @@ -20882,7 +22485,7 @@ static int _cocos2d_Node_addChild$2(lua_State *L) return 0; } -static int _cocos2d_Node_addChild$3(lua_State *L) +static int _olua_fun_cocos2d_Node_addChild$3(lua_State *L) { olua_startinvoke(L); @@ -20907,7 +22510,7 @@ static int _cocos2d_Node_addChild$3(lua_State *L) return 0; } -static int _cocos2d_Node_addChild$4(lua_State *L) +static int _olua_fun_cocos2d_Node_addChild$4(lua_State *L) { olua_startinvoke(L); @@ -20932,33 +22535,33 @@ static int _cocos2d_Node_addChild$4(lua_State *L) return 0; } -static int _cocos2d_Node_addChild(lua_State *L) +static int _olua_fun_cocos2d_Node_addChild(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_object(L, 2, "cc.Node"))) { // void addChild(@addref(children |) cocos2d::Node *child) - return _cocos2d_Node_addChild$1(L); + return _olua_fun_cocos2d_Node_addChild$1(L); // } } if (num_args == 2) { // if ((olua_is_object(L, 2, "cc.Node")) && (olua_is_integer(L, 3))) { // void addChild(@addref(children |) cocos2d::Node *child, int localZOrder) - return _cocos2d_Node_addChild$2(L); + return _olua_fun_cocos2d_Node_addChild$2(L); // } } if (num_args == 3) { if ((olua_is_object(L, 2, "cc.Node")) && (olua_is_integer(L, 3)) && (olua_is_integer(L, 4))) { // void addChild(@addref(children |) cocos2d::Node *child, int localZOrder, int tag) - return _cocos2d_Node_addChild$3(L); + return _olua_fun_cocos2d_Node_addChild$3(L); } // if ((olua_is_object(L, 2, "cc.Node")) && (olua_is_integer(L, 3)) && (olua_is_string(L, 4))) { // void addChild(@addref(children |) cocos2d::Node *child, int localZOrder, const std::string &name) - return _cocos2d_Node_addChild$4(L); + return _olua_fun_cocos2d_Node_addChild$4(L); // } } @@ -20967,7 +22570,7 @@ static int _cocos2d_Node_addChild(lua_State *L) return 0; } -static int _cocos2d_Node_addComponent(lua_State *L) +static int _olua_fun_cocos2d_Node_addComponent(lua_State *L) { olua_startinvoke(L); @@ -20989,7 +22592,7 @@ static int _cocos2d_Node_addComponent(lua_State *L) return num_ret; } -static int _cocos2d_Node_cleanup(lua_State *L) +static int _olua_fun_cocos2d_Node_cleanup(lua_State *L) { olua_startinvoke(L); @@ -21005,26 +22608,26 @@ static int _cocos2d_Node_cleanup(lua_State *L) return 0; } -static int _cocos2d_Node_convertToNodeSpace$1(lua_State *L) +static int _olua_fun_cocos2d_Node_convertToNodeSpace$1(lua_State *L) { olua_startinvoke(L); cocos2d::Node *self = nullptr; - cocos2d::Vec2 arg1; /** worldPoint */ + cocos2d::Vec2 *arg1; /** worldPoint */ olua_to_object(L, 1, &self, "cc.Node"); olua_check_object(L, 2, &arg1, "cc.Vec2"); // cocos2d::Vec2 convertToNodeSpace(const cocos2d::Vec2 &worldPoint) - cocos2d::Vec2 ret = self->convertToNodeSpace(arg1); - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec2"); + cocos2d::Vec2 ret = self->convertToNodeSpace(*arg1); + int num_ret = olua_copy_object(L, ret, "cc.Vec2"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_Node_convertToNodeSpace$2(lua_State *L) +static int _olua_fun_cocos2d_Node_convertToNodeSpace$2(lua_State *L) { olua_startinvoke(L); @@ -21034,7 +22637,7 @@ static int _cocos2d_Node_convertToNodeSpace$2(lua_State *L) olua_to_object(L, 1, &self, "cc.Node"); olua_pack_object(L, 2, &arg1); - // cocos2d::Vec2 convertToNodeSpace(@pack const cocos2d::Vec2 &worldPoint) + // @unpack cocos2d::Vec2 convertToNodeSpace(@pack const cocos2d::Vec2 &worldPoint) cocos2d::Vec2 ret = self->convertToNodeSpace(arg1); int num_ret = olua_unpack_object(L, &ret); @@ -21043,21 +22646,21 @@ static int _cocos2d_Node_convertToNodeSpace$2(lua_State *L) return num_ret; } -static int _cocos2d_Node_convertToNodeSpace(lua_State *L) +static int _olua_fun_cocos2d_Node_convertToNodeSpace(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_object(L, 2, "cc.Vec2"))) { // cocos2d::Vec2 convertToNodeSpace(const cocos2d::Vec2 &worldPoint) - return _cocos2d_Node_convertToNodeSpace$1(L); + return _olua_fun_cocos2d_Node_convertToNodeSpace$1(L); // } } if (num_args == 2) { // if ((olua_canpack_object(L, 2, (cocos2d::Vec2 *)nullptr))) { - // cocos2d::Vec2 convertToNodeSpace(@pack const cocos2d::Vec2 &worldPoint) - return _cocos2d_Node_convertToNodeSpace$2(L); + // @unpack cocos2d::Vec2 convertToNodeSpace(@pack const cocos2d::Vec2 &worldPoint) + return _olua_fun_cocos2d_Node_convertToNodeSpace$2(L); // } } @@ -21066,26 +22669,26 @@ static int _cocos2d_Node_convertToNodeSpace(lua_State *L) return 0; } -static int _cocos2d_Node_convertToNodeSpaceAR$1(lua_State *L) +static int _olua_fun_cocos2d_Node_convertToNodeSpaceAR$1(lua_State *L) { olua_startinvoke(L); cocos2d::Node *self = nullptr; - cocos2d::Vec2 arg1; /** worldPoint */ + cocos2d::Vec2 *arg1; /** worldPoint */ olua_to_object(L, 1, &self, "cc.Node"); olua_check_object(L, 2, &arg1, "cc.Vec2"); // cocos2d::Vec2 convertToNodeSpaceAR(const cocos2d::Vec2 &worldPoint) - cocos2d::Vec2 ret = self->convertToNodeSpaceAR(arg1); - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec2"); + cocos2d::Vec2 ret = self->convertToNodeSpaceAR(*arg1); + int num_ret = olua_copy_object(L, ret, "cc.Vec2"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_Node_convertToNodeSpaceAR$2(lua_State *L) +static int _olua_fun_cocos2d_Node_convertToNodeSpaceAR$2(lua_State *L) { olua_startinvoke(L); @@ -21095,7 +22698,7 @@ static int _cocos2d_Node_convertToNodeSpaceAR$2(lua_State *L) olua_to_object(L, 1, &self, "cc.Node"); olua_pack_object(L, 2, &arg1); - // cocos2d::Vec2 convertToNodeSpaceAR(@pack const cocos2d::Vec2 &worldPoint) + // @unpack cocos2d::Vec2 convertToNodeSpaceAR(@pack const cocos2d::Vec2 &worldPoint) cocos2d::Vec2 ret = self->convertToNodeSpaceAR(arg1); int num_ret = olua_unpack_object(L, &ret); @@ -21104,21 +22707,21 @@ static int _cocos2d_Node_convertToNodeSpaceAR$2(lua_State *L) return num_ret; } -static int _cocos2d_Node_convertToNodeSpaceAR(lua_State *L) +static int _olua_fun_cocos2d_Node_convertToNodeSpaceAR(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_object(L, 2, "cc.Vec2"))) { // cocos2d::Vec2 convertToNodeSpaceAR(const cocos2d::Vec2 &worldPoint) - return _cocos2d_Node_convertToNodeSpaceAR$1(L); + return _olua_fun_cocos2d_Node_convertToNodeSpaceAR$1(L); // } } if (num_args == 2) { // if ((olua_canpack_object(L, 2, (cocos2d::Vec2 *)nullptr))) { - // cocos2d::Vec2 convertToNodeSpaceAR(@pack const cocos2d::Vec2 &worldPoint) - return _cocos2d_Node_convertToNodeSpaceAR$2(L); + // @unpack cocos2d::Vec2 convertToNodeSpaceAR(@pack const cocos2d::Vec2 &worldPoint) + return _olua_fun_cocos2d_Node_convertToNodeSpaceAR$2(L); // } } @@ -21127,26 +22730,26 @@ static int _cocos2d_Node_convertToNodeSpaceAR(lua_State *L) return 0; } -static int _cocos2d_Node_convertToWorldSpace$1(lua_State *L) +static int _olua_fun_cocos2d_Node_convertToWorldSpace$1(lua_State *L) { olua_startinvoke(L); cocos2d::Node *self = nullptr; - cocos2d::Vec2 arg1; /** nodePoint */ + cocos2d::Vec2 *arg1; /** nodePoint */ olua_to_object(L, 1, &self, "cc.Node"); olua_check_object(L, 2, &arg1, "cc.Vec2"); // cocos2d::Vec2 convertToWorldSpace(const cocos2d::Vec2 &nodePoint) - cocos2d::Vec2 ret = self->convertToWorldSpace(arg1); - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec2"); + cocos2d::Vec2 ret = self->convertToWorldSpace(*arg1); + int num_ret = olua_copy_object(L, ret, "cc.Vec2"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_Node_convertToWorldSpace$2(lua_State *L) +static int _olua_fun_cocos2d_Node_convertToWorldSpace$2(lua_State *L) { olua_startinvoke(L); @@ -21156,7 +22759,7 @@ static int _cocos2d_Node_convertToWorldSpace$2(lua_State *L) olua_to_object(L, 1, &self, "cc.Node"); olua_pack_object(L, 2, &arg1); - // cocos2d::Vec2 convertToWorldSpace(@pack const cocos2d::Vec2 &nodePoint) + // @unpack cocos2d::Vec2 convertToWorldSpace(@pack const cocos2d::Vec2 &nodePoint) cocos2d::Vec2 ret = self->convertToWorldSpace(arg1); int num_ret = olua_unpack_object(L, &ret); @@ -21165,21 +22768,21 @@ static int _cocos2d_Node_convertToWorldSpace$2(lua_State *L) return num_ret; } -static int _cocos2d_Node_convertToWorldSpace(lua_State *L) +static int _olua_fun_cocos2d_Node_convertToWorldSpace(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_object(L, 2, "cc.Vec2"))) { // cocos2d::Vec2 convertToWorldSpace(const cocos2d::Vec2 &nodePoint) - return _cocos2d_Node_convertToWorldSpace$1(L); + return _olua_fun_cocos2d_Node_convertToWorldSpace$1(L); // } } if (num_args == 2) { // if ((olua_canpack_object(L, 2, (cocos2d::Vec2 *)nullptr))) { - // cocos2d::Vec2 convertToWorldSpace(@pack const cocos2d::Vec2 &nodePoint) - return _cocos2d_Node_convertToWorldSpace$2(L); + // @unpack cocos2d::Vec2 convertToWorldSpace(@pack const cocos2d::Vec2 &nodePoint) + return _olua_fun_cocos2d_Node_convertToWorldSpace$2(L); // } } @@ -21188,26 +22791,26 @@ static int _cocos2d_Node_convertToWorldSpace(lua_State *L) return 0; } -static int _cocos2d_Node_convertToWorldSpaceAR$1(lua_State *L) +static int _olua_fun_cocos2d_Node_convertToWorldSpaceAR$1(lua_State *L) { olua_startinvoke(L); cocos2d::Node *self = nullptr; - cocos2d::Vec2 arg1; /** nodePoint */ + cocos2d::Vec2 *arg1; /** nodePoint */ olua_to_object(L, 1, &self, "cc.Node"); olua_check_object(L, 2, &arg1, "cc.Vec2"); // cocos2d::Vec2 convertToWorldSpaceAR(const cocos2d::Vec2 &nodePoint) - cocos2d::Vec2 ret = self->convertToWorldSpaceAR(arg1); - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec2"); + cocos2d::Vec2 ret = self->convertToWorldSpaceAR(*arg1); + int num_ret = olua_copy_object(L, ret, "cc.Vec2"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_Node_convertToWorldSpaceAR$2(lua_State *L) +static int _olua_fun_cocos2d_Node_convertToWorldSpaceAR$2(lua_State *L) { olua_startinvoke(L); @@ -21217,7 +22820,7 @@ static int _cocos2d_Node_convertToWorldSpaceAR$2(lua_State *L) olua_to_object(L, 1, &self, "cc.Node"); olua_pack_object(L, 2, &arg1); - // cocos2d::Vec2 convertToWorldSpaceAR(@pack const cocos2d::Vec2 &nodePoint) + // @unpack cocos2d::Vec2 convertToWorldSpaceAR(@pack const cocos2d::Vec2 &nodePoint) cocos2d::Vec2 ret = self->convertToWorldSpaceAR(arg1); int num_ret = olua_unpack_object(L, &ret); @@ -21226,21 +22829,21 @@ static int _cocos2d_Node_convertToWorldSpaceAR$2(lua_State *L) return num_ret; } -static int _cocos2d_Node_convertToWorldSpaceAR(lua_State *L) +static int _olua_fun_cocos2d_Node_convertToWorldSpaceAR(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_object(L, 2, "cc.Vec2"))) { // cocos2d::Vec2 convertToWorldSpaceAR(const cocos2d::Vec2 &nodePoint) - return _cocos2d_Node_convertToWorldSpaceAR$1(L); + return _olua_fun_cocos2d_Node_convertToWorldSpaceAR$1(L); // } } if (num_args == 2) { // if ((olua_canpack_object(L, 2, (cocos2d::Vec2 *)nullptr))) { - // cocos2d::Vec2 convertToWorldSpaceAR(@pack const cocos2d::Vec2 &nodePoint) - return _cocos2d_Node_convertToWorldSpaceAR$2(L); + // @unpack cocos2d::Vec2 convertToWorldSpaceAR(@pack const cocos2d::Vec2 &nodePoint) + return _olua_fun_cocos2d_Node_convertToWorldSpaceAR$2(L); // } } @@ -21249,7 +22852,7 @@ static int _cocos2d_Node_convertToWorldSpaceAR(lua_State *L) return 0; } -static int _cocos2d_Node_convertTouchToNodeSpace(lua_State *L) +static int _olua_fun_cocos2d_Node_convertTouchToNodeSpace(lua_State *L) { olua_startinvoke(L); @@ -21261,14 +22864,14 @@ static int _cocos2d_Node_convertTouchToNodeSpace(lua_State *L) // cocos2d::Vec2 convertTouchToNodeSpace(cocos2d::Touch *touch) cocos2d::Vec2 ret = self->convertTouchToNodeSpace(arg1); - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec2"); + int num_ret = olua_copy_object(L, ret, "cc.Vec2"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_Node_convertTouchToNodeSpaceAR(lua_State *L) +static int _olua_fun_cocos2d_Node_convertTouchToNodeSpaceAR(lua_State *L) { olua_startinvoke(L); @@ -21280,14 +22883,14 @@ static int _cocos2d_Node_convertTouchToNodeSpaceAR(lua_State *L) // cocos2d::Vec2 convertTouchToNodeSpaceAR(cocos2d::Touch *touch) cocos2d::Vec2 ret = self->convertTouchToNodeSpaceAR(arg1); - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec2"); + int num_ret = olua_copy_object(L, ret, "cc.Vec2"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_Node_create(lua_State *L) +static int _olua_fun_cocos2d_Node_create(lua_State *L) { olua_startinvoke(L); @@ -21300,13 +22903,13 @@ static int _cocos2d_Node_create(lua_State *L) return num_ret; } -static int _cocos2d_Node_draw$1(lua_State *L) +static int _olua_fun_cocos2d_Node_draw$1(lua_State *L) { olua_startinvoke(L); cocos2d::Node *self = nullptr; cocos2d::Renderer *arg1 = nullptr; /** renderer */ - cocos2d::Mat4 arg2; /** transform */ + cocos2d::Mat4 *arg2; /** transform */ uint32_t arg3 = 0; /** flags */ olua_to_object(L, 1, &self, "cc.Node"); @@ -21315,14 +22918,14 @@ static int _cocos2d_Node_draw$1(lua_State *L) olua_check_integer(L, 4, &arg3); // void draw(cocos2d::Renderer *renderer, const cocos2d::Mat4 &transform, uint32_t flags) - self->draw(arg1, arg2, arg3); + self->draw(arg1, *arg2, arg3); olua_endinvoke(L); return 0; } -static int _cocos2d_Node_draw$2(lua_State *L) +static int _olua_fun_cocos2d_Node_draw$2(lua_State *L) { olua_startinvoke(L); @@ -21338,19 +22941,19 @@ static int _cocos2d_Node_draw$2(lua_State *L) return 0; } -static int _cocos2d_Node_draw(lua_State *L) +static int _olua_fun_cocos2d_Node_draw(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 0) { // void draw() - return _cocos2d_Node_draw$2(L); + return _olua_fun_cocos2d_Node_draw$2(L); } if (num_args == 3) { // if ((olua_is_object(L, 2, "cc.Renderer")) && (olua_is_object(L, 3, "cc.Mat4")) && (olua_is_integer(L, 4))) { // void draw(cocos2d::Renderer *renderer, const cocos2d::Mat4 &transform, uint32_t flags) - return _cocos2d_Node_draw$1(L); + return _olua_fun_cocos2d_Node_draw$1(L); // } } @@ -21359,7 +22962,7 @@ static int _cocos2d_Node_draw(lua_State *L) return 0; } -static int _cocos2d_Node_enumerateChildren(lua_State *L) +static int _olua_fun_cocos2d_Node_enumerateChildren(lua_State *L) { olua_startinvoke(L); @@ -21373,9 +22976,10 @@ static int _cocos2d_Node_enumerateChildren(lua_State *L) void *cb_store = (void *)self; std::string cb_tag = "enumerateChildren"; - std::string cb_name = olua_setcallback(L, cb_store, 3, cb_tag.c_str(), OLUA_TAG_NEW); + std::string cb_name = olua_setcallback(L, cb_store, 3, cb_tag.c_str(), OLUA_TAG_NEW); olua_Context cb_ctx = olua_context(L); - arg2 = [cb_store, cb_name, cb_ctx](cocos2d::Node *arg1) { + // lua_State *ML = olua_mainthread(L); + arg2 = [cb_store, cb_name, cb_ctx /*, ML */](cocos2d::Node *cb_arg1) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); bool ret = false; /** ret */ @@ -21383,7 +22987,7 @@ static int _cocos2d_Node_enumerateChildren(lua_State *L) int top = lua_gettop(L); size_t last = olua_push_objpool(L); olua_enable_objpool(L); - olua_push_object(L, arg1, "cc.Node"); + olua_push_object(L, cb_arg1, "cc.Node"); olua_disable_objpool(L); olua_callback(L, cb_store, cb_name.c_str(), 1); @@ -21399,7 +23003,7 @@ static int _cocos2d_Node_enumerateChildren(lua_State *L) return ret; }; - // void enumerateChildren(const std::string &name, @localvar std::function callback) + // void enumerateChildren(const std::string &name, std::function callback) self->enumerateChildren(arg1, arg2); olua_removecallback(L, cb_store, cb_name.c_str(), OLUA_TAG_WHOLE); @@ -21409,7 +23013,7 @@ static int _cocos2d_Node_enumerateChildren(lua_State *L) return 0; } -static int _cocos2d_Node_getActionByTag(lua_State *L) +static int _olua_fun_cocos2d_Node_getActionByTag(lua_State *L) { olua_startinvoke(L); @@ -21431,7 +23035,7 @@ static int _cocos2d_Node_getActionByTag(lua_State *L) return num_ret; } -static int _cocos2d_Node_getActionManager(lua_State *L) +static int _olua_fun_cocos2d_Node_getActionManager(lua_State *L) { olua_startinvoke(L); @@ -21451,7 +23055,7 @@ static int _cocos2d_Node_getActionManager(lua_State *L) return num_ret; } -static int _cocos2d_Node_getAlpha(lua_State *L) +static int _olua_fun_cocos2d_Node_getAlpha(lua_State *L) { olua_startinvoke(L); @@ -21468,7 +23072,7 @@ static int _cocos2d_Node_getAlpha(lua_State *L) return num_ret; } -static int _cocos2d_Node_getAnchorPoint(lua_State *L) +static int _olua_fun_cocos2d_Node_getAnchorPoint(lua_State *L) { olua_startinvoke(L); @@ -21485,7 +23089,7 @@ static int _cocos2d_Node_getAnchorPoint(lua_State *L) return num_ret; } -static int _cocos2d_Node_getAnchorPointInPoints(lua_State *L) +static int _olua_fun_cocos2d_Node_getAnchorPointInPoints(lua_State *L) { olua_startinvoke(L); @@ -21502,7 +23106,7 @@ static int _cocos2d_Node_getAnchorPointInPoints(lua_State *L) return num_ret; } -static int _cocos2d_Node_getAnchorX(lua_State *L) +static int _olua_fun_cocos2d_Node_getAnchorX(lua_State *L) { olua_startinvoke(L); @@ -21519,7 +23123,7 @@ static int _cocos2d_Node_getAnchorX(lua_State *L) return num_ret; } -static int _cocos2d_Node_getAnchorY(lua_State *L) +static int _olua_fun_cocos2d_Node_getAnchorY(lua_State *L) { olua_startinvoke(L); @@ -21536,7 +23140,7 @@ static int _cocos2d_Node_getAnchorY(lua_State *L) return num_ret; } -static int _cocos2d_Node_getAttachedNodeCount(lua_State *L) +static int _olua_fun_cocos2d_Node_getAttachedNodeCount(lua_State *L) { olua_startinvoke(L); @@ -21549,7 +23153,7 @@ static int _cocos2d_Node_getAttachedNodeCount(lua_State *L) return num_ret; } -static int _cocos2d_Node_getBoundingBox(lua_State *L) +static int _olua_fun_cocos2d_Node_getBoundingBox(lua_State *L) { olua_startinvoke(L); @@ -21559,14 +23163,14 @@ static int _cocos2d_Node_getBoundingBox(lua_State *L) // cocos2d::Rect getBoundingBox() cocos2d::Rect ret = self->getBoundingBox(); - int num_ret = olua_pushcopy_object(L, ret, "cc.Rect"); + int num_ret = olua_copy_object(L, ret, "cc.Rect"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_Node_getBounds(lua_State *L) +static int _olua_fun_cocos2d_Node_getBounds(lua_State *L) { olua_startinvoke(L); @@ -21584,7 +23188,7 @@ static int _cocos2d_Node_getBounds(lua_State *L) olua_check_number(L, 5, &arg5); olua_check_number(L, 6, &arg6); - // @extend(cocos2d::NodeExtend) @unpack static cocos2d::Bounds getBounds(cocos2d::Node *obj, cocos2d::Node *target, float left, float right, float top, float bottom) + // @unpack @extend(cocos2d::NodeExtend) static cocos2d::Bounds getBounds(cocos2d::Node *obj, cocos2d::Node *target, float left, float right, float top, float bottom) cocos2d::Bounds ret = cocos2d::NodeExtend::getBounds(arg1, arg2, arg3, arg4, arg5, arg6); int num_ret = olua_unpack_object(L, &ret); @@ -21593,7 +23197,7 @@ static int _cocos2d_Node_getBounds(lua_State *L) return num_ret; } -static int _cocos2d_Node_getCameraMask(lua_State *L) +static int _olua_fun_cocos2d_Node_getCameraMask(lua_State *L) { olua_startinvoke(L); @@ -21610,7 +23214,7 @@ static int _cocos2d_Node_getCameraMask(lua_State *L) return num_ret; } -static int _cocos2d_Node_getChildByName(lua_State *L) +static int _olua_fun_cocos2d_Node_getChildByName(lua_State *L) { olua_startinvoke(L); @@ -21632,7 +23236,7 @@ static int _cocos2d_Node_getChildByName(lua_State *L) return num_ret; } -static int _cocos2d_Node_getChildByTag(lua_State *L) +static int _olua_fun_cocos2d_Node_getChildByTag(lua_State *L) { olua_startinvoke(L); @@ -21654,7 +23258,7 @@ static int _cocos2d_Node_getChildByTag(lua_State *L) return num_ret; } -static int _cocos2d_Node_getChildren(lua_State *L) +static int _olua_fun_cocos2d_Node_getChildren(lua_State *L) { olua_startinvoke(L); @@ -21676,7 +23280,7 @@ static int _cocos2d_Node_getChildren(lua_State *L) return num_ret; } -static int _cocos2d_Node_getChildrenCount(lua_State *L) +static int _olua_fun_cocos2d_Node_getChildrenCount(lua_State *L) { olua_startinvoke(L); @@ -21693,7 +23297,7 @@ static int _cocos2d_Node_getChildrenCount(lua_State *L) return num_ret; } -static int _cocos2d_Node_getColor(lua_State *L) +static int _olua_fun_cocos2d_Node_getColor(lua_State *L) { olua_startinvoke(L); @@ -21710,7 +23314,7 @@ static int _cocos2d_Node_getColor(lua_State *L) return num_ret; } -static int _cocos2d_Node_getComponent(lua_State *L) +static int _olua_fun_cocos2d_Node_getComponent(lua_State *L) { olua_startinvoke(L); @@ -21732,7 +23336,7 @@ static int _cocos2d_Node_getComponent(lua_State *L) return num_ret; } -static int _cocos2d_Node_getContentSize(lua_State *L) +static int _olua_fun_cocos2d_Node_getContentSize(lua_State *L) { olua_startinvoke(L); @@ -21749,7 +23353,7 @@ static int _cocos2d_Node_getContentSize(lua_State *L) return num_ret; } -static int _cocos2d_Node_getDescription(lua_State *L) +static int _olua_fun_cocos2d_Node_getDescription(lua_State *L) { olua_startinvoke(L); @@ -21766,7 +23370,7 @@ static int _cocos2d_Node_getDescription(lua_State *L) return num_ret; } -static int _cocos2d_Node_getDisplayedColor(lua_State *L) +static int _olua_fun_cocos2d_Node_getDisplayedColor(lua_State *L) { olua_startinvoke(L); @@ -21783,7 +23387,7 @@ static int _cocos2d_Node_getDisplayedColor(lua_State *L) return num_ret; } -static int _cocos2d_Node_getDisplayedOpacity(lua_State *L) +static int _olua_fun_cocos2d_Node_getDisplayedOpacity(lua_State *L) { olua_startinvoke(L); @@ -21800,7 +23404,7 @@ static int _cocos2d_Node_getDisplayedOpacity(lua_State *L) return num_ret; } -static int _cocos2d_Node_getEventDispatcher(lua_State *L) +static int _olua_fun_cocos2d_Node_getEventDispatcher(lua_State *L) { olua_startinvoke(L); @@ -21820,7 +23424,7 @@ static int _cocos2d_Node_getEventDispatcher(lua_State *L) return num_ret; } -static int _cocos2d_Node_getGlobalZOrder(lua_State *L) +static int _olua_fun_cocos2d_Node_getGlobalZOrder(lua_State *L) { olua_startinvoke(L); @@ -21837,7 +23441,7 @@ static int _cocos2d_Node_getGlobalZOrder(lua_State *L) return num_ret; } -static int _cocos2d_Node_getHeight(lua_State *L) +static int _olua_fun_cocos2d_Node_getHeight(lua_State *L) { olua_startinvoke(L); @@ -21854,7 +23458,7 @@ static int _cocos2d_Node_getHeight(lua_State *L) return num_ret; } -static int _cocos2d_Node_getLocalZOrder(lua_State *L) +static int _olua_fun_cocos2d_Node_getLocalZOrder(lua_State *L) { olua_startinvoke(L); @@ -21871,7 +23475,7 @@ static int _cocos2d_Node_getLocalZOrder(lua_State *L) return num_ret; } -static int _cocos2d_Node_getName(lua_State *L) +static int _olua_fun_cocos2d_Node_getName(lua_State *L) { olua_startinvoke(L); @@ -21888,7 +23492,7 @@ static int _cocos2d_Node_getName(lua_State *L) return num_ret; } -static int _cocos2d_Node_getNodeToParentAffineTransform$1(lua_State *L) +static int _olua_fun_cocos2d_Node_getNodeToParentAffineTransform$1(lua_State *L) { olua_startinvoke(L); @@ -21898,14 +23502,14 @@ static int _cocos2d_Node_getNodeToParentAffineTransform$1(lua_State *L) // cocos2d::AffineTransform getNodeToParentAffineTransform() cocos2d::AffineTransform ret = self->getNodeToParentAffineTransform(); - int num_ret = olua_pushcopy_object(L, ret, "cc.AffineTransform"); + int num_ret = olua_copy_object(L, ret, "cc.AffineTransform"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_Node_getNodeToParentAffineTransform$2(lua_State *L) +static int _olua_fun_cocos2d_Node_getNodeToParentAffineTransform$2(lua_State *L) { olua_startinvoke(L); @@ -21917,26 +23521,26 @@ static int _cocos2d_Node_getNodeToParentAffineTransform$2(lua_State *L) // cocos2d::AffineTransform getNodeToParentAffineTransform(cocos2d::Node *ancestor) cocos2d::AffineTransform ret = self->getNodeToParentAffineTransform(arg1); - int num_ret = olua_pushcopy_object(L, ret, "cc.AffineTransform"); + int num_ret = olua_copy_object(L, ret, "cc.AffineTransform"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_Node_getNodeToParentAffineTransform(lua_State *L) +static int _olua_fun_cocos2d_Node_getNodeToParentAffineTransform(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 0) { // cocos2d::AffineTransform getNodeToParentAffineTransform() - return _cocos2d_Node_getNodeToParentAffineTransform$1(L); + return _olua_fun_cocos2d_Node_getNodeToParentAffineTransform$1(L); } if (num_args == 1) { // if ((olua_is_object(L, 2, "cc.Node"))) { // cocos2d::AffineTransform getNodeToParentAffineTransform(cocos2d::Node *ancestor) - return _cocos2d_Node_getNodeToParentAffineTransform$2(L); + return _olua_fun_cocos2d_Node_getNodeToParentAffineTransform$2(L); // } } @@ -21945,7 +23549,7 @@ static int _cocos2d_Node_getNodeToParentAffineTransform(lua_State *L) return 0; } -static int _cocos2d_Node_getNodeToParentTransform$1(lua_State *L) +static int _olua_fun_cocos2d_Node_getNodeToParentTransform$1(lua_State *L) { olua_startinvoke(L); @@ -21962,7 +23566,7 @@ static int _cocos2d_Node_getNodeToParentTransform$1(lua_State *L) return num_ret; } -static int _cocos2d_Node_getNodeToParentTransform$2(lua_State *L) +static int _olua_fun_cocos2d_Node_getNodeToParentTransform$2(lua_State *L) { olua_startinvoke(L); @@ -21974,26 +23578,26 @@ static int _cocos2d_Node_getNodeToParentTransform$2(lua_State *L) // cocos2d::Mat4 getNodeToParentTransform(cocos2d::Node *ancestor) cocos2d::Mat4 ret = self->getNodeToParentTransform(arg1); - int num_ret = olua_pushcopy_object(L, ret, "cc.Mat4"); + int num_ret = olua_copy_object(L, ret, "cc.Mat4"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_Node_getNodeToParentTransform(lua_State *L) +static int _olua_fun_cocos2d_Node_getNodeToParentTransform(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 0) { // const cocos2d::Mat4 &getNodeToParentTransform() - return _cocos2d_Node_getNodeToParentTransform$1(L); + return _olua_fun_cocos2d_Node_getNodeToParentTransform$1(L); } if (num_args == 1) { // if ((olua_is_object(L, 2, "cc.Node"))) { // cocos2d::Mat4 getNodeToParentTransform(cocos2d::Node *ancestor) - return _cocos2d_Node_getNodeToParentTransform$2(L); + return _olua_fun_cocos2d_Node_getNodeToParentTransform$2(L); // } } @@ -22002,7 +23606,7 @@ static int _cocos2d_Node_getNodeToParentTransform(lua_State *L) return 0; } -static int _cocos2d_Node_getNodeToWorldAffineTransform(lua_State *L) +static int _olua_fun_cocos2d_Node_getNodeToWorldAffineTransform(lua_State *L) { olua_startinvoke(L); @@ -22012,14 +23616,14 @@ static int _cocos2d_Node_getNodeToWorldAffineTransform(lua_State *L) // cocos2d::AffineTransform getNodeToWorldAffineTransform() cocos2d::AffineTransform ret = self->getNodeToWorldAffineTransform(); - int num_ret = olua_pushcopy_object(L, ret, "cc.AffineTransform"); + int num_ret = olua_copy_object(L, ret, "cc.AffineTransform"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_Node_getNodeToWorldTransform(lua_State *L) +static int _olua_fun_cocos2d_Node_getNodeToWorldTransform(lua_State *L) { olua_startinvoke(L); @@ -22029,14 +23633,14 @@ static int _cocos2d_Node_getNodeToWorldTransform(lua_State *L) // cocos2d::Mat4 getNodeToWorldTransform() cocos2d::Mat4 ret = self->getNodeToWorldTransform(); - int num_ret = olua_pushcopy_object(L, ret, "cc.Mat4"); + int num_ret = olua_copy_object(L, ret, "cc.Mat4"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_Node_getNormalizedPosition(lua_State *L) +static int _olua_fun_cocos2d_Node_getNormalizedPosition(lua_State *L) { olua_startinvoke(L); @@ -22053,7 +23657,7 @@ static int _cocos2d_Node_getNormalizedPosition(lua_State *L) return num_ret; } -static int _cocos2d_Node_getNumberOfRunningActions(lua_State *L) +static int _olua_fun_cocos2d_Node_getNumberOfRunningActions(lua_State *L) { olua_startinvoke(L); @@ -22070,7 +23674,7 @@ static int _cocos2d_Node_getNumberOfRunningActions(lua_State *L) return num_ret; } -static int _cocos2d_Node_getNumberOfRunningActionsByTag(lua_State *L) +static int _olua_fun_cocos2d_Node_getNumberOfRunningActionsByTag(lua_State *L) { olua_startinvoke(L); @@ -22089,7 +23693,7 @@ static int _cocos2d_Node_getNumberOfRunningActionsByTag(lua_State *L) return num_ret; } -static int _cocos2d_Node_getOnEnterCallback(lua_State *L) +static int _olua_fun_cocos2d_Node_getOnEnterCallback(lua_State *L) { olua_startinvoke(L); @@ -22101,7 +23705,7 @@ static int _cocos2d_Node_getOnEnterCallback(lua_State *L) std::string cb_tag = "OnEnterCallback"; olua_getcallback(L, cb_store, cb_tag.c_str(), OLUA_TAG_EQUAL); - // @nullable @localvar const std::function &getOnEnterCallback() + // @nullable const std::function &getOnEnterCallback() std::function ret = self->getOnEnterCallback(); int num_ret = olua_push_callback(L, &ret, "std.function"); @@ -22110,7 +23714,7 @@ static int _cocos2d_Node_getOnEnterCallback(lua_State *L) return num_ret; } -static int _cocos2d_Node_getOnEnterTransitionDidFinishCallback(lua_State *L) +static int _olua_fun_cocos2d_Node_getOnEnterTransitionDidFinishCallback(lua_State *L) { olua_startinvoke(L); @@ -22122,7 +23726,7 @@ static int _cocos2d_Node_getOnEnterTransitionDidFinishCallback(lua_State *L) std::string cb_tag = "OnEnterTransitionDidFinishCallback"; olua_getcallback(L, cb_store, cb_tag.c_str(), OLUA_TAG_EQUAL); - // @nullable @localvar const std::function &getOnEnterTransitionDidFinishCallback() + // @nullable const std::function &getOnEnterTransitionDidFinishCallback() std::function ret = self->getOnEnterTransitionDidFinishCallback(); int num_ret = olua_push_callback(L, &ret, "std.function"); @@ -22131,7 +23735,7 @@ static int _cocos2d_Node_getOnEnterTransitionDidFinishCallback(lua_State *L) return num_ret; } -static int _cocos2d_Node_getOnExitCallback(lua_State *L) +static int _olua_fun_cocos2d_Node_getOnExitCallback(lua_State *L) { olua_startinvoke(L); @@ -22143,7 +23747,7 @@ static int _cocos2d_Node_getOnExitCallback(lua_State *L) std::string cb_tag = "OnExitCallback"; olua_getcallback(L, cb_store, cb_tag.c_str(), OLUA_TAG_EQUAL); - // @nullable @localvar const std::function &getOnExitCallback() + // @nullable const std::function &getOnExitCallback() std::function ret = self->getOnExitCallback(); int num_ret = olua_push_callback(L, &ret, "std.function"); @@ -22152,7 +23756,7 @@ static int _cocos2d_Node_getOnExitCallback(lua_State *L) return num_ret; } -static int _cocos2d_Node_getOnExitTransitionDidStartCallback(lua_State *L) +static int _olua_fun_cocos2d_Node_getOnExitTransitionDidStartCallback(lua_State *L) { olua_startinvoke(L); @@ -22164,7 +23768,7 @@ static int _cocos2d_Node_getOnExitTransitionDidStartCallback(lua_State *L) std::string cb_tag = "OnExitTransitionDidStartCallback"; olua_getcallback(L, cb_store, cb_tag.c_str(), OLUA_TAG_EQUAL); - // @nullable @localvar const std::function &getOnExitTransitionDidStartCallback() + // @nullable const std::function &getOnExitTransitionDidStartCallback() std::function ret = self->getOnExitTransitionDidStartCallback(); int num_ret = olua_push_callback(L, &ret, "std.function"); @@ -22173,7 +23777,7 @@ static int _cocos2d_Node_getOnExitTransitionDidStartCallback(lua_State *L) return num_ret; } -static int _cocos2d_Node_getOpacity(lua_State *L) +static int _olua_fun_cocos2d_Node_getOpacity(lua_State *L) { olua_startinvoke(L); @@ -22190,7 +23794,7 @@ static int _cocos2d_Node_getOpacity(lua_State *L) return num_ret; } -static int _cocos2d_Node_getParent(lua_State *L) +static int _olua_fun_cocos2d_Node_getParent(lua_State *L) { olua_startinvoke(L); @@ -22207,7 +23811,7 @@ static int _cocos2d_Node_getParent(lua_State *L) return num_ret; } -static int _cocos2d_Node_getParentToNodeAffineTransform(lua_State *L) +static int _olua_fun_cocos2d_Node_getParentToNodeAffineTransform(lua_State *L) { olua_startinvoke(L); @@ -22217,14 +23821,14 @@ static int _cocos2d_Node_getParentToNodeAffineTransform(lua_State *L) // cocos2d::AffineTransform getParentToNodeAffineTransform() cocos2d::AffineTransform ret = self->getParentToNodeAffineTransform(); - int num_ret = olua_pushcopy_object(L, ret, "cc.AffineTransform"); + int num_ret = olua_copy_object(L, ret, "cc.AffineTransform"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_Node_getParentToNodeTransform(lua_State *L) +static int _olua_fun_cocos2d_Node_getParentToNodeTransform(lua_State *L) { olua_startinvoke(L); @@ -22242,7 +23846,7 @@ static int _cocos2d_Node_getParentToNodeTransform(lua_State *L) } #if CC_USE_PHYSICS -static int _cocos2d_Node_getPhysicsBody(lua_State *L) +static int _olua_fun_cocos2d_Node_getPhysicsBody(lua_State *L) { olua_startinvoke(L); @@ -22263,7 +23867,7 @@ static int _cocos2d_Node_getPhysicsBody(lua_State *L) } #endif -static int _cocos2d_Node_getPosition$1(lua_State *L) +static int _olua_fun_cocos2d_Node_getPosition$1(lua_State *L) { olua_startinvoke(L); @@ -22280,7 +23884,7 @@ static int _cocos2d_Node_getPosition$1(lua_State *L) return num_ret; } -static int _cocos2d_Node_getPosition$2(lua_State *L) +static int _olua_fun_cocos2d_Node_getPosition$2(lua_State *L) { olua_startinvoke(L); @@ -22289,8 +23893,8 @@ static int _cocos2d_Node_getPosition$2(lua_State *L) float *arg2 = nullptr; /** y */ olua_to_object(L, 1, &self, "cc.Node"); - olua_check_pointer(L, 2, &arg1, "olua.float"); - olua_check_pointer(L, 3, &arg2, "olua.float"); + olua_check_valueptr(L, 2, &arg1, "olua.float"); + olua_check_valueptr(L, 3, &arg2, "olua.float"); // void getPosition(float *x, float *y) self->getPosition(arg1, arg2); @@ -22300,19 +23904,19 @@ static int _cocos2d_Node_getPosition$2(lua_State *L) return 0; } -static int _cocos2d_Node_getPosition(lua_State *L) +static int _olua_fun_cocos2d_Node_getPosition(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 0) { // const cocos2d::Vec2 &getPosition() - return _cocos2d_Node_getPosition$1(L); + return _olua_fun_cocos2d_Node_getPosition$1(L); } if (num_args == 2) { - // if ((olua_is_pointer(L, 2, "olua.float")) && (olua_is_pointer(L, 3, "olua.float"))) { + // if ((olua_is_valueptr(L, 2, "olua.float")) && (olua_is_valueptr(L, 3, "olua.float"))) { // void getPosition(float *x, float *y) - return _cocos2d_Node_getPosition$2(L); + return _olua_fun_cocos2d_Node_getPosition$2(L); // } } @@ -22321,7 +23925,7 @@ static int _cocos2d_Node_getPosition(lua_State *L) return 0; } -static int _cocos2d_Node_getPosition3D(lua_State *L) +static int _olua_fun_cocos2d_Node_getPosition3D(lua_State *L) { olua_startinvoke(L); @@ -22331,14 +23935,14 @@ static int _cocos2d_Node_getPosition3D(lua_State *L) // cocos2d::Vec3 getPosition3D() cocos2d::Vec3 ret = self->getPosition3D(); - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec3"); + int num_ret = olua_copy_object(L, ret, "cc.Vec3"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_Node_getPositionNormalized(lua_State *L) +static int _olua_fun_cocos2d_Node_getPositionNormalized(lua_State *L) { olua_startinvoke(L); @@ -22355,7 +23959,7 @@ static int _cocos2d_Node_getPositionNormalized(lua_State *L) return num_ret; } -static int _cocos2d_Node_getPositionX(lua_State *L) +static int _olua_fun_cocos2d_Node_getPositionX(lua_State *L) { olua_startinvoke(L); @@ -22372,7 +23976,7 @@ static int _cocos2d_Node_getPositionX(lua_State *L) return num_ret; } -static int _cocos2d_Node_getPositionY(lua_State *L) +static int _olua_fun_cocos2d_Node_getPositionY(lua_State *L) { olua_startinvoke(L); @@ -22389,7 +23993,7 @@ static int _cocos2d_Node_getPositionY(lua_State *L) return num_ret; } -static int _cocos2d_Node_getPositionZ(lua_State *L) +static int _olua_fun_cocos2d_Node_getPositionZ(lua_State *L) { olua_startinvoke(L); @@ -22406,7 +24010,7 @@ static int _cocos2d_Node_getPositionZ(lua_State *L) return num_ret; } -static int _cocos2d_Node_getProgramState(lua_State *L) +static int _olua_fun_cocos2d_Node_getProgramState(lua_State *L) { olua_startinvoke(L); @@ -22426,7 +24030,7 @@ static int _cocos2d_Node_getProgramState(lua_State *L) return num_ret; } -static int _cocos2d_Node_getRotation(lua_State *L) +static int _olua_fun_cocos2d_Node_getRotation(lua_State *L) { olua_startinvoke(L); @@ -22443,7 +24047,7 @@ static int _cocos2d_Node_getRotation(lua_State *L) return num_ret; } -static int _cocos2d_Node_getRotation3D(lua_State *L) +static int _olua_fun_cocos2d_Node_getRotation3D(lua_State *L) { olua_startinvoke(L); @@ -22453,14 +24057,14 @@ static int _cocos2d_Node_getRotation3D(lua_State *L) // cocos2d::Vec3 getRotation3D() cocos2d::Vec3 ret = self->getRotation3D(); - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec3"); + int num_ret = olua_copy_object(L, ret, "cc.Vec3"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_Node_getRotationQuat(lua_State *L) +static int _olua_fun_cocos2d_Node_getRotationQuat(lua_State *L) { olua_startinvoke(L); @@ -22470,14 +24074,14 @@ static int _cocos2d_Node_getRotationQuat(lua_State *L) // cocos2d::Quaternion getRotationQuat() cocos2d::Quaternion ret = self->getRotationQuat(); - int num_ret = olua_pushcopy_object(L, ret, "cc.Quaternion"); + int num_ret = olua_copy_object(L, ret, "cc.Quaternion"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_Node_getRotationSkewX(lua_State *L) +static int _olua_fun_cocos2d_Node_getRotationSkewX(lua_State *L) { olua_startinvoke(L); @@ -22494,7 +24098,7 @@ static int _cocos2d_Node_getRotationSkewX(lua_State *L) return num_ret; } -static int _cocos2d_Node_getRotationSkewY(lua_State *L) +static int _olua_fun_cocos2d_Node_getRotationSkewY(lua_State *L) { olua_startinvoke(L); @@ -22511,7 +24115,7 @@ static int _cocos2d_Node_getRotationSkewY(lua_State *L) return num_ret; } -static int _cocos2d_Node_getScale(lua_State *L) +static int _olua_fun_cocos2d_Node_getScale(lua_State *L) { olua_startinvoke(L); @@ -22528,7 +24132,7 @@ static int _cocos2d_Node_getScale(lua_State *L) return num_ret; } -static int _cocos2d_Node_getScaleX(lua_State *L) +static int _olua_fun_cocos2d_Node_getScaleX(lua_State *L) { olua_startinvoke(L); @@ -22545,7 +24149,7 @@ static int _cocos2d_Node_getScaleX(lua_State *L) return num_ret; } -static int _cocos2d_Node_getScaleY(lua_State *L) +static int _olua_fun_cocos2d_Node_getScaleY(lua_State *L) { olua_startinvoke(L); @@ -22562,7 +24166,7 @@ static int _cocos2d_Node_getScaleY(lua_State *L) return num_ret; } -static int _cocos2d_Node_getScaleZ(lua_State *L) +static int _olua_fun_cocos2d_Node_getScaleZ(lua_State *L) { olua_startinvoke(L); @@ -22579,7 +24183,7 @@ static int _cocos2d_Node_getScaleZ(lua_State *L) return num_ret; } -static int _cocos2d_Node_getScene(lua_State *L) +static int _olua_fun_cocos2d_Node_getScene(lua_State *L) { olua_startinvoke(L); @@ -22596,7 +24200,7 @@ static int _cocos2d_Node_getScene(lua_State *L) return num_ret; } -static int _cocos2d_Node_getScheduler(lua_State *L) +static int _olua_fun_cocos2d_Node_getScheduler(lua_State *L) { olua_startinvoke(L); @@ -22616,7 +24220,7 @@ static int _cocos2d_Node_getScheduler(lua_State *L) return num_ret; } -static int _cocos2d_Node_getSkewX(lua_State *L) +static int _olua_fun_cocos2d_Node_getSkewX(lua_State *L) { olua_startinvoke(L); @@ -22633,7 +24237,7 @@ static int _cocos2d_Node_getSkewX(lua_State *L) return num_ret; } -static int _cocos2d_Node_getSkewY(lua_State *L) +static int _olua_fun_cocos2d_Node_getSkewY(lua_State *L) { olua_startinvoke(L); @@ -22650,7 +24254,7 @@ static int _cocos2d_Node_getSkewY(lua_State *L) return num_ret; } -static int _cocos2d_Node_getTag(lua_State *L) +static int _olua_fun_cocos2d_Node_getTag(lua_State *L) { olua_startinvoke(L); @@ -22667,7 +24271,7 @@ static int _cocos2d_Node_getTag(lua_State *L) return num_ret; } -static int _cocos2d_Node_getUserData(lua_State *L) +static int _olua_fun_cocos2d_Node_getUserData(lua_State *L) { olua_startinvoke(L); @@ -22684,7 +24288,7 @@ static int _cocos2d_Node_getUserData(lua_State *L) return num_ret; } -static int _cocos2d_Node_getUserObject(lua_State *L) +static int _olua_fun_cocos2d_Node_getUserObject(lua_State *L) { olua_startinvoke(L); @@ -22701,7 +24305,7 @@ static int _cocos2d_Node_getUserObject(lua_State *L) return num_ret; } -static int _cocos2d_Node_getWidth(lua_State *L) +static int _olua_fun_cocos2d_Node_getWidth(lua_State *L) { olua_startinvoke(L); @@ -22718,7 +24322,7 @@ static int _cocos2d_Node_getWidth(lua_State *L) return num_ret; } -static int _cocos2d_Node_getWorldToNodeAffineTransform(lua_State *L) +static int _olua_fun_cocos2d_Node_getWorldToNodeAffineTransform(lua_State *L) { olua_startinvoke(L); @@ -22728,14 +24332,14 @@ static int _cocos2d_Node_getWorldToNodeAffineTransform(lua_State *L) // cocos2d::AffineTransform getWorldToNodeAffineTransform() cocos2d::AffineTransform ret = self->getWorldToNodeAffineTransform(); - int num_ret = olua_pushcopy_object(L, ret, "cc.AffineTransform"); + int num_ret = olua_copy_object(L, ret, "cc.AffineTransform"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_Node_getWorldToNodeTransform(lua_State *L) +static int _olua_fun_cocos2d_Node_getWorldToNodeTransform(lua_State *L) { olua_startinvoke(L); @@ -22745,14 +24349,14 @@ static int _cocos2d_Node_getWorldToNodeTransform(lua_State *L) // cocos2d::Mat4 getWorldToNodeTransform() cocos2d::Mat4 ret = self->getWorldToNodeTransform(); - int num_ret = olua_pushcopy_object(L, ret, "cc.Mat4"); + int num_ret = olua_copy_object(L, ret, "cc.Mat4"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_Node_init(lua_State *L) +static int _olua_fun_cocos2d_Node_init(lua_State *L) { olua_startinvoke(L); @@ -22769,7 +24373,7 @@ static int _cocos2d_Node_init(lua_State *L) return num_ret; } -static int _cocos2d_Node_isCascadeColorEnabled(lua_State *L) +static int _olua_fun_cocos2d_Node_isCascadeColorEnabled(lua_State *L) { olua_startinvoke(L); @@ -22786,7 +24390,7 @@ static int _cocos2d_Node_isCascadeColorEnabled(lua_State *L) return num_ret; } -static int _cocos2d_Node_isCascadeOpacityEnabled(lua_State *L) +static int _olua_fun_cocos2d_Node_isCascadeOpacityEnabled(lua_State *L) { olua_startinvoke(L); @@ -22803,7 +24407,7 @@ static int _cocos2d_Node_isCascadeOpacityEnabled(lua_State *L) return num_ret; } -static int _cocos2d_Node_isIgnoreAnchorPointForPosition(lua_State *L) +static int _olua_fun_cocos2d_Node_isIgnoreAnchorPointForPosition(lua_State *L) { olua_startinvoke(L); @@ -22820,7 +24424,7 @@ static int _cocos2d_Node_isIgnoreAnchorPointForPosition(lua_State *L) return num_ret; } -static int _cocos2d_Node_isOpacityModifyRGB(lua_State *L) +static int _olua_fun_cocos2d_Node_isOpacityModifyRGB(lua_State *L) { olua_startinvoke(L); @@ -22837,7 +24441,7 @@ static int _cocos2d_Node_isOpacityModifyRGB(lua_State *L) return num_ret; } -static int _cocos2d_Node_isRunning(lua_State *L) +static int _olua_fun_cocos2d_Node_isRunning(lua_State *L) { olua_startinvoke(L); @@ -22854,7 +24458,7 @@ static int _cocos2d_Node_isRunning(lua_State *L) return num_ret; } -static int _cocos2d_Node_isScheduled(lua_State *L) +static int _olua_fun_cocos2d_Node_isScheduled(lua_State *L) { olua_startinvoke(L); @@ -22873,7 +24477,7 @@ static int _cocos2d_Node_isScheduled(lua_State *L) return num_ret; } -static int _cocos2d_Node_isVisible(lua_State *L) +static int _olua_fun_cocos2d_Node_isVisible(lua_State *L) { olua_startinvoke(L); @@ -22890,11 +24494,11 @@ static int _cocos2d_Node_isVisible(lua_State *L) return num_ret; } -static int _cocos2d_Node_new(lua_State *L) +static int _olua_fun_cocos2d_Node_new(lua_State *L) { olua_startinvoke(L); - // Node() + // cocos2d::Node() cocos2d::Node *ret = new cocos2d::Node(); int num_ret = olua_push_object(L, ret, "cc.Node"); olua_postnew(L, ret); @@ -22904,7 +24508,7 @@ static int _cocos2d_Node_new(lua_State *L) return num_ret; } -static int _cocos2d_Node_onEnter(lua_State *L) +static int _olua_fun_cocos2d_Node_onEnter(lua_State *L) { olua_startinvoke(L); @@ -22925,7 +24529,7 @@ static int _cocos2d_Node_onEnter(lua_State *L) return 0; } -static int _cocos2d_Node_onEnterTransitionDidFinish(lua_State *L) +static int _olua_fun_cocos2d_Node_onEnterTransitionDidFinish(lua_State *L) { olua_startinvoke(L); @@ -22941,7 +24545,7 @@ static int _cocos2d_Node_onEnterTransitionDidFinish(lua_State *L) return 0; } -static int _cocos2d_Node_onExit(lua_State *L) +static int _olua_fun_cocos2d_Node_onExit(lua_State *L) { olua_startinvoke(L); @@ -22962,7 +24566,7 @@ static int _cocos2d_Node_onExit(lua_State *L) return 0; } -static int _cocos2d_Node_onExitTransitionDidStart(lua_State *L) +static int _olua_fun_cocos2d_Node_onExitTransitionDidStart(lua_State *L) { olua_startinvoke(L); @@ -22978,7 +24582,7 @@ static int _cocos2d_Node_onExitTransitionDidStart(lua_State *L) return 0; } -static int _cocos2d_Node_pause(lua_State *L) +static int _olua_fun_cocos2d_Node_pause(lua_State *L) { olua_startinvoke(L); @@ -22994,7 +24598,7 @@ static int _cocos2d_Node_pause(lua_State *L) return 0; } -static int _cocos2d_Node_removeAllChildren(lua_State *L) +static int _olua_fun_cocos2d_Node_removeAllChildren(lua_State *L) { olua_startinvoke(L); @@ -23013,7 +24617,7 @@ static int _cocos2d_Node_removeAllChildren(lua_State *L) return 0; } -static int _cocos2d_Node_removeAllChildrenWithCleanup(lua_State *L) +static int _olua_fun_cocos2d_Node_removeAllChildrenWithCleanup(lua_State *L) { olua_startinvoke(L); @@ -23034,7 +24638,7 @@ static int _cocos2d_Node_removeAllChildrenWithCleanup(lua_State *L) return 0; } -static int _cocos2d_Node_removeAllComponents(lua_State *L) +static int _olua_fun_cocos2d_Node_removeAllComponents(lua_State *L) { olua_startinvoke(L); @@ -23053,7 +24657,7 @@ static int _cocos2d_Node_removeAllComponents(lua_State *L) return 0; } -static int _cocos2d_Node_removeChild$1(lua_State *L) +static int _olua_fun_cocos2d_Node_removeChild$1(lua_State *L) { olua_startinvoke(L); @@ -23076,7 +24680,7 @@ static int _cocos2d_Node_removeChild$1(lua_State *L) return 0; } -static int _cocos2d_Node_removeChild$2(lua_State *L) +static int _olua_fun_cocos2d_Node_removeChild$2(lua_State *L) { olua_startinvoke(L); @@ -23086,7 +24690,7 @@ static int _cocos2d_Node_removeChild$2(lua_State *L) olua_to_object(L, 1, &self, "cc.Node"); olua_check_object(L, 2, &arg1, "cc.Node"); - // void removeChild(@delref(children |) cocos2d::Node *child, @optional bool cleanup) + // void removeChild(@delref(children |) cocos2d::Node *child) self->removeChild(arg1); // insert code after call @@ -23097,21 +24701,21 @@ static int _cocos2d_Node_removeChild$2(lua_State *L) return 0; } -static int _cocos2d_Node_removeChild(lua_State *L) +static int _olua_fun_cocos2d_Node_removeChild(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_object(L, 2, "cc.Node"))) { - // void removeChild(@delref(children |) cocos2d::Node *child, @optional bool cleanup) - return _cocos2d_Node_removeChild$2(L); + // void removeChild(@delref(children |) cocos2d::Node *child) + return _olua_fun_cocos2d_Node_removeChild$2(L); // } } if (num_args == 2) { // if ((olua_is_object(L, 2, "cc.Node")) && (olua_is_bool(L, 3))) { // void removeChild(@delref(children |) cocos2d::Node *child, @optional bool cleanup) - return _cocos2d_Node_removeChild$1(L); + return _olua_fun_cocos2d_Node_removeChild$1(L); // } } @@ -23120,7 +24724,7 @@ static int _cocos2d_Node_removeChild(lua_State *L) return 0; } -static int _cocos2d_Node_removeChildByName$1(lua_State *L) +static int _olua_fun_cocos2d_Node_removeChildByName$1(lua_State *L) { olua_startinvoke(L); @@ -23146,7 +24750,7 @@ static int _cocos2d_Node_removeChildByName$1(lua_State *L) return 0; } -static int _cocos2d_Node_removeChildByName$2(lua_State *L) +static int _olua_fun_cocos2d_Node_removeChildByName$2(lua_State *L) { olua_startinvoke(L); @@ -23159,7 +24763,7 @@ static int _cocos2d_Node_removeChildByName$2(lua_State *L) // insert code before call olua_startcmpref(L, 1, "children"); - // @delref(children ~) void removeChildByName(const std::string &name, @optional bool cleanup) + // @delref(children ~) void removeChildByName(const std::string &name) self->removeChildByName(arg1); // insert code after call @@ -23170,21 +24774,21 @@ static int _cocos2d_Node_removeChildByName$2(lua_State *L) return 0; } -static int _cocos2d_Node_removeChildByName(lua_State *L) +static int _olua_fun_cocos2d_Node_removeChildByName(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_string(L, 2))) { - // @delref(children ~) void removeChildByName(const std::string &name, @optional bool cleanup) - return _cocos2d_Node_removeChildByName$2(L); + // @delref(children ~) void removeChildByName(const std::string &name) + return _olua_fun_cocos2d_Node_removeChildByName$2(L); // } } if (num_args == 2) { // if ((olua_is_string(L, 2)) && (olua_is_bool(L, 3))) { // @delref(children ~) void removeChildByName(const std::string &name, @optional bool cleanup) - return _cocos2d_Node_removeChildByName$1(L); + return _olua_fun_cocos2d_Node_removeChildByName$1(L); // } } @@ -23193,7 +24797,7 @@ static int _cocos2d_Node_removeChildByName(lua_State *L) return 0; } -static int _cocos2d_Node_removeChildByTag$1(lua_State *L) +static int _olua_fun_cocos2d_Node_removeChildByTag$1(lua_State *L) { olua_startinvoke(L); @@ -23219,7 +24823,7 @@ static int _cocos2d_Node_removeChildByTag$1(lua_State *L) return 0; } -static int _cocos2d_Node_removeChildByTag$2(lua_State *L) +static int _olua_fun_cocos2d_Node_removeChildByTag$2(lua_State *L) { olua_startinvoke(L); @@ -23232,7 +24836,7 @@ static int _cocos2d_Node_removeChildByTag$2(lua_State *L) // insert code before call olua_startcmpref(L, 1, "children"); - // @delref(children ~) void removeChildByTag(int tag, @optional bool cleanup) + // @delref(children ~) void removeChildByTag(int tag) self->removeChildByTag(arg1); // insert code after call @@ -23243,21 +24847,21 @@ static int _cocos2d_Node_removeChildByTag$2(lua_State *L) return 0; } -static int _cocos2d_Node_removeChildByTag(lua_State *L) +static int _olua_fun_cocos2d_Node_removeChildByTag(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_integer(L, 2))) { - // @delref(children ~) void removeChildByTag(int tag, @optional bool cleanup) - return _cocos2d_Node_removeChildByTag$2(L); + // @delref(children ~) void removeChildByTag(int tag) + return _olua_fun_cocos2d_Node_removeChildByTag$2(L); // } } if (num_args == 2) { // if ((olua_is_integer(L, 2)) && (olua_is_bool(L, 3))) { // @delref(children ~) void removeChildByTag(int tag, @optional bool cleanup) - return _cocos2d_Node_removeChildByTag$1(L); + return _olua_fun_cocos2d_Node_removeChildByTag$1(L); // } } @@ -23266,7 +24870,7 @@ static int _cocos2d_Node_removeChildByTag(lua_State *L) return 0; } -static int _cocos2d_Node_removeComponent$1(lua_State *L) +static int _olua_fun_cocos2d_Node_removeComponent$1(lua_State *L) { olua_startinvoke(L); @@ -23291,7 +24895,7 @@ static int _cocos2d_Node_removeComponent$1(lua_State *L) return num_ret; } -static int _cocos2d_Node_removeComponent$2(lua_State *L) +static int _olua_fun_cocos2d_Node_removeComponent$2(lua_State *L) { olua_startinvoke(L); @@ -23316,19 +24920,19 @@ static int _cocos2d_Node_removeComponent$2(lua_State *L) return num_ret; } -static int _cocos2d_Node_removeComponent(lua_State *L) +static int _olua_fun_cocos2d_Node_removeComponent(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { if ((olua_is_string(L, 2))) { // @delref(components ~) bool removeComponent(const std::string &name) - return _cocos2d_Node_removeComponent$1(L); + return _olua_fun_cocos2d_Node_removeComponent$1(L); } // if ((olua_is_object(L, 2, "cc.Component"))) { // @delref(components ~) bool removeComponent(cocos2d::Component *component) - return _cocos2d_Node_removeComponent$2(L); + return _olua_fun_cocos2d_Node_removeComponent$2(L); // } } @@ -23337,7 +24941,7 @@ static int _cocos2d_Node_removeComponent(lua_State *L) return 0; } -static int _cocos2d_Node_removeFromParent(lua_State *L) +static int _olua_fun_cocos2d_Node_removeFromParent(lua_State *L) { olua_startinvoke(L); @@ -23363,7 +24967,7 @@ static int _cocos2d_Node_removeFromParent(lua_State *L) return 0; } -static int _cocos2d_Node_removeFromParentAndCleanup(lua_State *L) +static int _olua_fun_cocos2d_Node_removeFromParentAndCleanup(lua_State *L) { olua_startinvoke(L); @@ -23391,7 +24995,7 @@ static int _cocos2d_Node_removeFromParentAndCleanup(lua_State *L) return 0; } -static int _cocos2d_Node_reorderChild(lua_State *L) +static int _olua_fun_cocos2d_Node_reorderChild(lua_State *L) { olua_startinvoke(L); @@ -23411,7 +25015,7 @@ static int _cocos2d_Node_reorderChild(lua_State *L) return 0; } -static int _cocos2d_Node_resume(lua_State *L) +static int _olua_fun_cocos2d_Node_resume(lua_State *L) { olua_startinvoke(L); @@ -23427,7 +25031,7 @@ static int _cocos2d_Node_resume(lua_State *L) return 0; } -static int _cocos2d_Node_runAction(lua_State *L) +static int _olua_fun_cocos2d_Node_runAction(lua_State *L) { olua_startinvoke(L); @@ -23453,7 +25057,7 @@ static int _cocos2d_Node_runAction(lua_State *L) return num_ret; } -static int _cocos2d_Node_schedule$1(lua_State *L) +static int _olua_fun_cocos2d_Node_schedule$1(lua_State *L) { olua_startinvoke(L); @@ -23467,15 +25071,16 @@ static int _cocos2d_Node_schedule$1(lua_State *L) void *cb_store = (void *)self; std::string cb_tag = makeScheduleCallbackTag(arg2); - std::string cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + std::string cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](float arg1) { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](float cb_arg1) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); if (olua_contextequal(L, cb_ctx)) { int top = lua_gettop(L); - olua_push_number(L, arg1); + olua_push_number(L, cb_arg1); olua_callback(L, cb_store, cb_name.c_str(), 1); @@ -23483,7 +25088,7 @@ static int _cocos2d_Node_schedule$1(lua_State *L) } }; - // void schedule(@localvar const std::function &callback, const std::string &key) + // void schedule(const std::function &callback, const std::string &key) self->schedule(arg1, arg2); olua_endinvoke(L); @@ -23491,7 +25096,7 @@ static int _cocos2d_Node_schedule$1(lua_State *L) return 0; } -static int _cocos2d_Node_schedule$2(lua_State *L) +static int _olua_fun_cocos2d_Node_schedule$2(lua_State *L) { olua_startinvoke(L); @@ -23507,15 +25112,16 @@ static int _cocos2d_Node_schedule$2(lua_State *L) void *cb_store = (void *)self; std::string cb_tag = makeScheduleCallbackTag(arg3); - std::string cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + std::string cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](float arg1) { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](float cb_arg1) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); if (olua_contextequal(L, cb_ctx)) { int top = lua_gettop(L); - olua_push_number(L, arg1); + olua_push_number(L, cb_arg1); olua_callback(L, cb_store, cb_name.c_str(), 1); @@ -23523,7 +25129,7 @@ static int _cocos2d_Node_schedule$2(lua_State *L) } }; - // void schedule(@localvar const std::function &callback, float interval, const std::string &key) + // void schedule(const std::function &callback, float interval, const std::string &key) self->schedule(arg1, arg2, arg3); olua_endinvoke(L); @@ -23531,14 +25137,14 @@ static int _cocos2d_Node_schedule$2(lua_State *L) return 0; } -static int _cocos2d_Node_schedule$3(lua_State *L) +static int _olua_fun_cocos2d_Node_schedule$3(lua_State *L) { olua_startinvoke(L); cocos2d::Node *self = nullptr; std::function arg1; /** callback */ float arg2 = 0; /** interval */ - unsigned int arg3 = 0; /** repeat */ + unsigned int arg3 = 0; /** repeat_ */ float arg4 = 0; /** delay */ std::string arg5; /** key */ @@ -23551,15 +25157,16 @@ static int _cocos2d_Node_schedule$3(lua_State *L) void *cb_store = (void *)self; std::string cb_tag = makeScheduleCallbackTag(arg5); - std::string cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + std::string cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](float arg1) { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](float cb_arg1) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); if (olua_contextequal(L, cb_ctx)) { int top = lua_gettop(L); - olua_push_number(L, arg1); + olua_push_number(L, cb_arg1); olua_callback(L, cb_store, cb_name.c_str(), 1); @@ -23567,7 +25174,7 @@ static int _cocos2d_Node_schedule$3(lua_State *L) } }; - // void schedule(@localvar const std::function &callback, float interval, unsigned int repeat, float delay, const std::string &key) + // void schedule(const std::function &callback, float interval, unsigned int repeat_, float delay, const std::string &key) self->schedule(arg1, arg2, arg3, arg4, arg5); olua_endinvoke(L); @@ -23575,28 +25182,28 @@ static int _cocos2d_Node_schedule$3(lua_State *L) return 0; } -static int _cocos2d_Node_schedule(lua_State *L) +static int _olua_fun_cocos2d_Node_schedule(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 2) { // if ((olua_is_callback(L, 2, "std.function")) && (olua_is_string(L, 3))) { - // void schedule(@localvar const std::function &callback, const std::string &key) - return _cocos2d_Node_schedule$1(L); + // void schedule(const std::function &callback, const std::string &key) + return _olua_fun_cocos2d_Node_schedule$1(L); // } } if (num_args == 3) { // if ((olua_is_callback(L, 2, "std.function")) && (olua_is_number(L, 3)) && (olua_is_string(L, 4))) { - // void schedule(@localvar const std::function &callback, float interval, const std::string &key) - return _cocos2d_Node_schedule$2(L); + // void schedule(const std::function &callback, float interval, const std::string &key) + return _olua_fun_cocos2d_Node_schedule$2(L); // } } if (num_args == 5) { // if ((olua_is_callback(L, 2, "std.function")) && (olua_is_number(L, 3)) && (olua_is_integer(L, 4)) && (olua_is_number(L, 5)) && (olua_is_string(L, 6))) { - // void schedule(@localvar const std::function &callback, float interval, unsigned int repeat, float delay, const std::string &key) - return _cocos2d_Node_schedule$3(L); + // void schedule(const std::function &callback, float interval, unsigned int repeat_, float delay, const std::string &key) + return _olua_fun_cocos2d_Node_schedule$3(L); // } } @@ -23605,7 +25212,7 @@ static int _cocos2d_Node_schedule(lua_State *L) return 0; } -static int _cocos2d_Node_scheduleOnce(lua_State *L) +static int _olua_fun_cocos2d_Node_scheduleOnce(lua_State *L) { olua_startinvoke(L); @@ -23621,15 +25228,16 @@ static int _cocos2d_Node_scheduleOnce(lua_State *L) void *cb_store = (void *)self; std::string cb_tag = makeScheduleCallbackTag(arg3); - std::string cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + std::string cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](float arg1) { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](float cb_arg1) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); if (olua_contextequal(L, cb_ctx)) { int top = lua_gettop(L); - olua_push_number(L, arg1); + olua_push_number(L, cb_arg1); olua_callback(L, cb_store, cb_name.c_str(), 1); @@ -23639,7 +25247,7 @@ static int _cocos2d_Node_scheduleOnce(lua_State *L) } }; - // void scheduleOnce(@localvar const std::function &callback, float delay, const std::string &key) + // void scheduleOnce(const std::function &callback, float delay, const std::string &key) self->scheduleOnce(arg1, arg2, arg3); olua_endinvoke(L); @@ -23647,7 +25255,7 @@ static int _cocos2d_Node_scheduleOnce(lua_State *L) return 0; } -static int _cocos2d_Node_scheduleUpdate(lua_State *L) +static int _olua_fun_cocos2d_Node_scheduleUpdate(lua_State *L) { olua_startinvoke(L); @@ -23663,7 +25271,7 @@ static int _cocos2d_Node_scheduleUpdate(lua_State *L) return 0; } -static int _cocos2d_Node_scheduleUpdateWithPriority(lua_State *L) +static int _olua_fun_cocos2d_Node_scheduleUpdateWithPriority(lua_State *L) { olua_startinvoke(L); @@ -23681,7 +25289,7 @@ static int _cocos2d_Node_scheduleUpdateWithPriority(lua_State *L) return 0; } -static int _cocos2d_Node_setActionManager(lua_State *L) +static int _olua_fun_cocos2d_Node_setActionManager(lua_State *L) { olua_startinvoke(L); @@ -23702,7 +25310,7 @@ static int _cocos2d_Node_setActionManager(lua_State *L) return 0; } -static int _cocos2d_Node_setAdditionalTransform$1(lua_State *L) +static int _olua_fun_cocos2d_Node_setAdditionalTransform$1(lua_State *L) { olua_startinvoke(L); @@ -23720,60 +25328,60 @@ static int _cocos2d_Node_setAdditionalTransform$1(lua_State *L) return 0; } -static int _cocos2d_Node_setAdditionalTransform$2(lua_State *L) +static int _olua_fun_cocos2d_Node_setAdditionalTransform$2(lua_State *L) { olua_startinvoke(L); cocos2d::Node *self = nullptr; - cocos2d::Mat4 arg1; /** additionalTransform */ + cocos2d::Mat4 *arg1; /** additionalTransform */ olua_to_object(L, 1, &self, "cc.Node"); olua_check_object(L, 2, &arg1, "cc.Mat4"); // void setAdditionalTransform(const cocos2d::Mat4 &additionalTransform) - self->setAdditionalTransform(arg1); + self->setAdditionalTransform(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_Node_setAdditionalTransform$3(lua_State *L) +static int _olua_fun_cocos2d_Node_setAdditionalTransform$3(lua_State *L) { olua_startinvoke(L); cocos2d::Node *self = nullptr; - cocos2d::AffineTransform arg1; /** additionalTransform */ + cocos2d::AffineTransform *arg1; /** additionalTransform */ olua_to_object(L, 1, &self, "cc.Node"); olua_check_object(L, 2, &arg1, "cc.AffineTransform"); // void setAdditionalTransform(const cocos2d::AffineTransform &additionalTransform) - self->setAdditionalTransform(arg1); + self->setAdditionalTransform(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_Node_setAdditionalTransform(lua_State *L) +static int _olua_fun_cocos2d_Node_setAdditionalTransform(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { if ((olua_is_object(L, 2, "cc.Mat4"))) { // void setAdditionalTransform(const cocos2d::Mat4 *additionalTransform) - return _cocos2d_Node_setAdditionalTransform$1(L); + return _olua_fun_cocos2d_Node_setAdditionalTransform$1(L); } if ((olua_is_object(L, 2, "cc.Mat4"))) { // void setAdditionalTransform(const cocos2d::Mat4 &additionalTransform) - return _cocos2d_Node_setAdditionalTransform$2(L); + return _olua_fun_cocos2d_Node_setAdditionalTransform$2(L); } // if ((olua_is_object(L, 2, "cc.AffineTransform"))) { // void setAdditionalTransform(const cocos2d::AffineTransform &additionalTransform) - return _cocos2d_Node_setAdditionalTransform$3(L); + return _olua_fun_cocos2d_Node_setAdditionalTransform$3(L); // } } @@ -23782,7 +25390,7 @@ static int _cocos2d_Node_setAdditionalTransform(lua_State *L) return 0; } -static int _cocos2d_Node_setAlpha(lua_State *L) +static int _olua_fun_cocos2d_Node_setAlpha(lua_State *L) { olua_startinvoke(L); @@ -23800,25 +25408,25 @@ static int _cocos2d_Node_setAlpha(lua_State *L) return 0; } -static int _cocos2d_Node_setAnchorPoint(lua_State *L) +static int _olua_fun_cocos2d_Node_setAnchorPoint(lua_State *L) { olua_startinvoke(L); cocos2d::Node *self = nullptr; - cocos2d::Vec2 arg1; /** anchorPoint */ + cocos2d::Vec2 *arg1; /** anchorPoint */ olua_to_object(L, 1, &self, "cc.Node"); olua_check_object(L, 2, &arg1, "cc.Vec2"); // void setAnchorPoint(const cocos2d::Vec2 &anchorPoint) - self->setAnchorPoint(arg1); + self->setAnchorPoint(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_Node_setAnchorX(lua_State *L) +static int _olua_fun_cocos2d_Node_setAnchorX(lua_State *L) { olua_startinvoke(L); @@ -23836,7 +25444,7 @@ static int _cocos2d_Node_setAnchorX(lua_State *L) return 0; } -static int _cocos2d_Node_setAnchorY(lua_State *L) +static int _olua_fun_cocos2d_Node_setAnchorY(lua_State *L) { olua_startinvoke(L); @@ -23854,7 +25462,7 @@ static int _cocos2d_Node_setAnchorY(lua_State *L) return 0; } -static int _cocos2d_Node_setCameraMask$1(lua_State *L) +static int _olua_fun_cocos2d_Node_setCameraMask$1(lua_State *L) { olua_startinvoke(L); @@ -23874,7 +25482,7 @@ static int _cocos2d_Node_setCameraMask$1(lua_State *L) return 0; } -static int _cocos2d_Node_setCameraMask$2(lua_State *L) +static int _olua_fun_cocos2d_Node_setCameraMask$2(lua_State *L) { olua_startinvoke(L); @@ -23884,7 +25492,7 @@ static int _cocos2d_Node_setCameraMask$2(lua_State *L) olua_to_object(L, 1, &self, "cc.Node"); olua_check_integer(L, 2, &arg1); - // void setCameraMask(unsigned short mask, @optional bool applyChildren) + // void setCameraMask(unsigned short mask) self->setCameraMask(arg1); olua_endinvoke(L); @@ -23892,21 +25500,21 @@ static int _cocos2d_Node_setCameraMask$2(lua_State *L) return 0; } -static int _cocos2d_Node_setCameraMask(lua_State *L) +static int _olua_fun_cocos2d_Node_setCameraMask(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_integer(L, 2))) { - // void setCameraMask(unsigned short mask, @optional bool applyChildren) - return _cocos2d_Node_setCameraMask$2(L); + // void setCameraMask(unsigned short mask) + return _olua_fun_cocos2d_Node_setCameraMask$2(L); // } } if (num_args == 2) { // if ((olua_is_integer(L, 2)) && (olua_is_bool(L, 3))) { // void setCameraMask(unsigned short mask, @optional bool applyChildren) - return _cocos2d_Node_setCameraMask$1(L); + return _olua_fun_cocos2d_Node_setCameraMask$1(L); // } } @@ -23915,7 +25523,7 @@ static int _cocos2d_Node_setCameraMask(lua_State *L) return 0; } -static int _cocos2d_Node_setCascadeColorEnabled(lua_State *L) +static int _olua_fun_cocos2d_Node_setCascadeColorEnabled(lua_State *L) { olua_startinvoke(L); @@ -23933,7 +25541,7 @@ static int _cocos2d_Node_setCascadeColorEnabled(lua_State *L) return 0; } -static int _cocos2d_Node_setCascadeOpacityEnabled(lua_State *L) +static int _olua_fun_cocos2d_Node_setCascadeOpacityEnabled(lua_State *L) { olua_startinvoke(L); @@ -23951,7 +25559,7 @@ static int _cocos2d_Node_setCascadeOpacityEnabled(lua_State *L) return 0; } -static int _cocos2d_Node_setColor(lua_State *L) +static int _olua_fun_cocos2d_Node_setColor(lua_State *L) { olua_startinvoke(L); @@ -23969,25 +25577,25 @@ static int _cocos2d_Node_setColor(lua_State *L) return 0; } -static int _cocos2d_Node_setContentSize(lua_State *L) +static int _olua_fun_cocos2d_Node_setContentSize(lua_State *L) { olua_startinvoke(L); cocos2d::Node *self = nullptr; - cocos2d::Size arg1; /** contentSize */ + cocos2d::Size *arg1; /** contentSize */ olua_to_object(L, 1, &self, "cc.Node"); olua_check_object(L, 2, &arg1, "cc.Size"); // void setContentSize(const cocos2d::Size &contentSize) - self->setContentSize(arg1); + self->setContentSize(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_Node_setEventDispatcher(lua_State *L) +static int _olua_fun_cocos2d_Node_setEventDispatcher(lua_State *L) { olua_startinvoke(L); @@ -24008,7 +25616,7 @@ static int _cocos2d_Node_setEventDispatcher(lua_State *L) return 0; } -static int _cocos2d_Node_setGlobalZOrder(lua_State *L) +static int _olua_fun_cocos2d_Node_setGlobalZOrder(lua_State *L) { olua_startinvoke(L); @@ -24026,7 +25634,7 @@ static int _cocos2d_Node_setGlobalZOrder(lua_State *L) return 0; } -static int _cocos2d_Node_setHeight(lua_State *L) +static int _olua_fun_cocos2d_Node_setHeight(lua_State *L) { olua_startinvoke(L); @@ -24044,7 +25652,7 @@ static int _cocos2d_Node_setHeight(lua_State *L) return 0; } -static int _cocos2d_Node_setIgnoreAnchorPointForPosition(lua_State *L) +static int _olua_fun_cocos2d_Node_setIgnoreAnchorPointForPosition(lua_State *L) { olua_startinvoke(L); @@ -24062,7 +25670,7 @@ static int _cocos2d_Node_setIgnoreAnchorPointForPosition(lua_State *L) return 0; } -static int _cocos2d_Node_setLocalZOrder(lua_State *L) +static int _olua_fun_cocos2d_Node_setLocalZOrder(lua_State *L) { olua_startinvoke(L); @@ -24080,7 +25688,7 @@ static int _cocos2d_Node_setLocalZOrder(lua_State *L) return 0; } -static int _cocos2d_Node_setName(lua_State *L) +static int _olua_fun_cocos2d_Node_setName(lua_State *L) { olua_startinvoke(L); @@ -24098,43 +25706,43 @@ static int _cocos2d_Node_setName(lua_State *L) return 0; } -static int _cocos2d_Node_setNodeToParentTransform(lua_State *L) +static int _olua_fun_cocos2d_Node_setNodeToParentTransform(lua_State *L) { olua_startinvoke(L); cocos2d::Node *self = nullptr; - cocos2d::Mat4 arg1; /** transform */ + cocos2d::Mat4 *arg1; /** transform */ olua_to_object(L, 1, &self, "cc.Node"); olua_check_object(L, 2, &arg1, "cc.Mat4"); // void setNodeToParentTransform(const cocos2d::Mat4 &transform) - self->setNodeToParentTransform(arg1); + self->setNodeToParentTransform(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_Node_setNormalizedPosition(lua_State *L) +static int _olua_fun_cocos2d_Node_setNormalizedPosition(lua_State *L) { olua_startinvoke(L); cocos2d::Node *self = nullptr; - cocos2d::Vec2 arg1; /** position */ + cocos2d::Vec2 *arg1; /** position */ olua_to_object(L, 1, &self, "cc.Node"); olua_check_object(L, 2, &arg1, "cc.Vec2"); // void setNormalizedPosition(const cocos2d::Vec2 &position) - self->setNormalizedPosition(arg1); + self->setNormalizedPosition(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_Node_setOnEnterCallback(lua_State *L) +static int _olua_fun_cocos2d_Node_setOnEnterCallback(lua_State *L) { olua_startinvoke(L); @@ -24150,9 +25758,10 @@ static int _cocos2d_Node_setOnEnterCallback(lua_State *L) std::string cb_tag = "OnEnterCallback"; std::string cb_name; if (olua_isfunction(L, 2)) { - cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx]() { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */]() { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); @@ -24169,7 +25778,7 @@ static int _cocos2d_Node_setOnEnterCallback(lua_State *L) arg1 = nullptr; } - // void setOnEnterCallback(@localvar @nullable const std::function &callback) + // void setOnEnterCallback(@nullable const std::function &callback) self->setOnEnterCallback(arg1); olua_endinvoke(L); @@ -24177,7 +25786,7 @@ static int _cocos2d_Node_setOnEnterCallback(lua_State *L) return 0; } -static int _cocos2d_Node_setOnEnterTransitionDidFinishCallback(lua_State *L) +static int _olua_fun_cocos2d_Node_setOnEnterTransitionDidFinishCallback(lua_State *L) { olua_startinvoke(L); @@ -24193,9 +25802,10 @@ static int _cocos2d_Node_setOnEnterTransitionDidFinishCallback(lua_State *L) std::string cb_tag = "OnEnterTransitionDidFinishCallback"; std::string cb_name; if (olua_isfunction(L, 2)) { - cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx]() { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */]() { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); @@ -24212,7 +25822,7 @@ static int _cocos2d_Node_setOnEnterTransitionDidFinishCallback(lua_State *L) arg1 = nullptr; } - // void setOnEnterTransitionDidFinishCallback(@localvar @nullable const std::function &callback) + // void setOnEnterTransitionDidFinishCallback(@nullable const std::function &callback) self->setOnEnterTransitionDidFinishCallback(arg1); olua_endinvoke(L); @@ -24220,7 +25830,7 @@ static int _cocos2d_Node_setOnEnterTransitionDidFinishCallback(lua_State *L) return 0; } -static int _cocos2d_Node_setOnExitCallback(lua_State *L) +static int _olua_fun_cocos2d_Node_setOnExitCallback(lua_State *L) { olua_startinvoke(L); @@ -24236,9 +25846,10 @@ static int _cocos2d_Node_setOnExitCallback(lua_State *L) std::string cb_tag = "OnExitCallback"; std::string cb_name; if (olua_isfunction(L, 2)) { - cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx]() { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */]() { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); @@ -24255,7 +25866,7 @@ static int _cocos2d_Node_setOnExitCallback(lua_State *L) arg1 = nullptr; } - // void setOnExitCallback(@localvar @nullable const std::function &callback) + // void setOnExitCallback(@nullable const std::function &callback) self->setOnExitCallback(arg1); olua_endinvoke(L); @@ -24263,7 +25874,7 @@ static int _cocos2d_Node_setOnExitCallback(lua_State *L) return 0; } -static int _cocos2d_Node_setOnExitTransitionDidStartCallback(lua_State *L) +static int _olua_fun_cocos2d_Node_setOnExitTransitionDidStartCallback(lua_State *L) { olua_startinvoke(L); @@ -24279,9 +25890,10 @@ static int _cocos2d_Node_setOnExitTransitionDidStartCallback(lua_State *L) std::string cb_tag = "OnExitTransitionDidStartCallback"; std::string cb_name; if (olua_isfunction(L, 2)) { - cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx]() { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */]() { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); @@ -24298,7 +25910,7 @@ static int _cocos2d_Node_setOnExitTransitionDidStartCallback(lua_State *L) arg1 = nullptr; } - // void setOnExitTransitionDidStartCallback(@localvar @nullable const std::function &callback) + // void setOnExitTransitionDidStartCallback(@nullable const std::function &callback) self->setOnExitTransitionDidStartCallback(arg1); olua_endinvoke(L); @@ -24306,7 +25918,7 @@ static int _cocos2d_Node_setOnExitTransitionDidStartCallback(lua_State *L) return 0; } -static int _cocos2d_Node_setOpacity(lua_State *L) +static int _olua_fun_cocos2d_Node_setOpacity(lua_State *L) { olua_startinvoke(L); @@ -24324,7 +25936,7 @@ static int _cocos2d_Node_setOpacity(lua_State *L) return 0; } -static int _cocos2d_Node_setOpacityModifyRGB(lua_State *L) +static int _olua_fun_cocos2d_Node_setOpacityModifyRGB(lua_State *L) { olua_startinvoke(L); @@ -24342,7 +25954,7 @@ static int _cocos2d_Node_setOpacityModifyRGB(lua_State *L) return 0; } -static int _cocos2d_Node_setParent(lua_State *L) +static int _olua_fun_cocos2d_Node_setParent(lua_State *L) { olua_startinvoke(L); @@ -24361,7 +25973,7 @@ static int _cocos2d_Node_setParent(lua_State *L) } #if CC_USE_PHYSICS -static int _cocos2d_Node_setPhysicsBody(lua_State *L) +static int _olua_fun_cocos2d_Node_setPhysicsBody(lua_State *L) { olua_startinvoke(L); @@ -24383,25 +25995,25 @@ static int _cocos2d_Node_setPhysicsBody(lua_State *L) } #endif -static int _cocos2d_Node_setPosition$1(lua_State *L) +static int _olua_fun_cocos2d_Node_setPosition$1(lua_State *L) { olua_startinvoke(L); cocos2d::Node *self = nullptr; - cocos2d::Vec2 arg1; /** position */ + cocos2d::Vec2 *arg1; /** position */ olua_to_object(L, 1, &self, "cc.Node"); olua_check_object(L, 2, &arg1, "cc.Vec2"); // void setPosition(const cocos2d::Vec2 &position) - self->setPosition(arg1); + self->setPosition(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_Node_setPosition$2(lua_State *L) +static int _olua_fun_cocos2d_Node_setPosition$2(lua_State *L) { olua_startinvoke(L); @@ -24421,21 +26033,21 @@ static int _cocos2d_Node_setPosition$2(lua_State *L) return 0; } -static int _cocos2d_Node_setPosition(lua_State *L) +static int _olua_fun_cocos2d_Node_setPosition(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_object(L, 2, "cc.Vec2"))) { // void setPosition(const cocos2d::Vec2 &position) - return _cocos2d_Node_setPosition$1(L); + return _olua_fun_cocos2d_Node_setPosition$1(L); // } } if (num_args == 2) { // if ((olua_is_number(L, 2)) && (olua_is_number(L, 3))) { // void setPosition(float x, float y) - return _cocos2d_Node_setPosition$2(L); + return _olua_fun_cocos2d_Node_setPosition$2(L); // } } @@ -24444,43 +26056,43 @@ static int _cocos2d_Node_setPosition(lua_State *L) return 0; } -static int _cocos2d_Node_setPosition3D(lua_State *L) +static int _olua_fun_cocos2d_Node_setPosition3D(lua_State *L) { olua_startinvoke(L); cocos2d::Node *self = nullptr; - cocos2d::Vec3 arg1; /** position */ + cocos2d::Vec3 *arg1; /** position */ olua_to_object(L, 1, &self, "cc.Node"); olua_check_object(L, 2, &arg1, "cc.Vec3"); // void setPosition3D(const cocos2d::Vec3 &position) - self->setPosition3D(arg1); + self->setPosition3D(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_Node_setPositionNormalized(lua_State *L) +static int _olua_fun_cocos2d_Node_setPositionNormalized(lua_State *L) { olua_startinvoke(L); cocos2d::Node *self = nullptr; - cocos2d::Vec2 arg1; /** position */ + cocos2d::Vec2 *arg1; /** position */ olua_to_object(L, 1, &self, "cc.Node"); olua_check_object(L, 2, &arg1, "cc.Vec2"); // void setPositionNormalized(const cocos2d::Vec2 &position) - self->setPositionNormalized(arg1); + self->setPositionNormalized(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_Node_setPositionX(lua_State *L) +static int _olua_fun_cocos2d_Node_setPositionX(lua_State *L) { olua_startinvoke(L); @@ -24498,7 +26110,7 @@ static int _cocos2d_Node_setPositionX(lua_State *L) return 0; } -static int _cocos2d_Node_setPositionY(lua_State *L) +static int _olua_fun_cocos2d_Node_setPositionY(lua_State *L) { olua_startinvoke(L); @@ -24516,7 +26128,7 @@ static int _cocos2d_Node_setPositionY(lua_State *L) return 0; } -static int _cocos2d_Node_setPositionZ(lua_State *L) +static int _olua_fun_cocos2d_Node_setPositionZ(lua_State *L) { olua_startinvoke(L); @@ -24534,7 +26146,7 @@ static int _cocos2d_Node_setPositionZ(lua_State *L) return 0; } -static int _cocos2d_Node_setProgramState(lua_State *L) +static int _olua_fun_cocos2d_Node_setProgramState(lua_State *L) { olua_startinvoke(L); @@ -24555,7 +26167,7 @@ static int _cocos2d_Node_setProgramState(lua_State *L) return 0; } -static int _cocos2d_Node_setRotation(lua_State *L) +static int _olua_fun_cocos2d_Node_setRotation(lua_State *L) { olua_startinvoke(L); @@ -24573,43 +26185,43 @@ static int _cocos2d_Node_setRotation(lua_State *L) return 0; } -static int _cocos2d_Node_setRotation3D(lua_State *L) +static int _olua_fun_cocos2d_Node_setRotation3D(lua_State *L) { olua_startinvoke(L); cocos2d::Node *self = nullptr; - cocos2d::Vec3 arg1; /** rotation */ + cocos2d::Vec3 *arg1; /** rotation */ olua_to_object(L, 1, &self, "cc.Node"); olua_check_object(L, 2, &arg1, "cc.Vec3"); // void setRotation3D(const cocos2d::Vec3 &rotation) - self->setRotation3D(arg1); + self->setRotation3D(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_Node_setRotationQuat(lua_State *L) +static int _olua_fun_cocos2d_Node_setRotationQuat(lua_State *L) { olua_startinvoke(L); cocos2d::Node *self = nullptr; - cocos2d::Quaternion arg1; /** quat */ + cocos2d::Quaternion *arg1; /** quat */ olua_to_object(L, 1, &self, "cc.Node"); olua_check_object(L, 2, &arg1, "cc.Quaternion"); // void setRotationQuat(const cocos2d::Quaternion &quat) - self->setRotationQuat(arg1); + self->setRotationQuat(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_Node_setRotationSkewX(lua_State *L) +static int _olua_fun_cocos2d_Node_setRotationSkewX(lua_State *L) { olua_startinvoke(L); @@ -24627,7 +26239,7 @@ static int _cocos2d_Node_setRotationSkewX(lua_State *L) return 0; } -static int _cocos2d_Node_setRotationSkewY(lua_State *L) +static int _olua_fun_cocos2d_Node_setRotationSkewY(lua_State *L) { olua_startinvoke(L); @@ -24645,7 +26257,7 @@ static int _cocos2d_Node_setRotationSkewY(lua_State *L) return 0; } -static int _cocos2d_Node_setScale$1(lua_State *L) +static int _olua_fun_cocos2d_Node_setScale$1(lua_State *L) { olua_startinvoke(L); @@ -24663,7 +26275,7 @@ static int _cocos2d_Node_setScale$1(lua_State *L) return 0; } -static int _cocos2d_Node_setScale$2(lua_State *L) +static int _olua_fun_cocos2d_Node_setScale$2(lua_State *L) { olua_startinvoke(L); @@ -24683,21 +26295,21 @@ static int _cocos2d_Node_setScale$2(lua_State *L) return 0; } -static int _cocos2d_Node_setScale(lua_State *L) +static int _olua_fun_cocos2d_Node_setScale(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_number(L, 2))) { // void setScale(float scale) - return _cocos2d_Node_setScale$1(L); + return _olua_fun_cocos2d_Node_setScale$1(L); // } } if (num_args == 2) { // if ((olua_is_number(L, 2)) && (olua_is_number(L, 3))) { // void setScale(float scaleX, float scaleY) - return _cocos2d_Node_setScale$2(L); + return _olua_fun_cocos2d_Node_setScale$2(L); // } } @@ -24706,7 +26318,7 @@ static int _cocos2d_Node_setScale(lua_State *L) return 0; } -static int _cocos2d_Node_setScaleX(lua_State *L) +static int _olua_fun_cocos2d_Node_setScaleX(lua_State *L) { olua_startinvoke(L); @@ -24724,7 +26336,7 @@ static int _cocos2d_Node_setScaleX(lua_State *L) return 0; } -static int _cocos2d_Node_setScaleY(lua_State *L) +static int _olua_fun_cocos2d_Node_setScaleY(lua_State *L) { olua_startinvoke(L); @@ -24742,7 +26354,7 @@ static int _cocos2d_Node_setScaleY(lua_State *L) return 0; } -static int _cocos2d_Node_setScaleZ(lua_State *L) +static int _olua_fun_cocos2d_Node_setScaleZ(lua_State *L) { olua_startinvoke(L); @@ -24760,7 +26372,7 @@ static int _cocos2d_Node_setScaleZ(lua_State *L) return 0; } -static int _cocos2d_Node_setScheduler(lua_State *L) +static int _olua_fun_cocos2d_Node_setScheduler(lua_State *L) { olua_startinvoke(L); @@ -24781,7 +26393,7 @@ static int _cocos2d_Node_setScheduler(lua_State *L) return 0; } -static int _cocos2d_Node_setSkewX(lua_State *L) +static int _olua_fun_cocos2d_Node_setSkewX(lua_State *L) { olua_startinvoke(L); @@ -24799,7 +26411,7 @@ static int _cocos2d_Node_setSkewX(lua_State *L) return 0; } -static int _cocos2d_Node_setSkewY(lua_State *L) +static int _olua_fun_cocos2d_Node_setSkewY(lua_State *L) { olua_startinvoke(L); @@ -24817,7 +26429,7 @@ static int _cocos2d_Node_setSkewY(lua_State *L) return 0; } -static int _cocos2d_Node_setTag(lua_State *L) +static int _olua_fun_cocos2d_Node_setTag(lua_State *L) { olua_startinvoke(L); @@ -24835,7 +26447,7 @@ static int _cocos2d_Node_setTag(lua_State *L) return 0; } -static int _cocos2d_Node_setUserData(lua_State *L) +static int _olua_fun_cocos2d_Node_setUserData(lua_State *L) { olua_startinvoke(L); @@ -24853,7 +26465,7 @@ static int _cocos2d_Node_setUserData(lua_State *L) return 0; } -static int _cocos2d_Node_setUserObject(lua_State *L) +static int _olua_fun_cocos2d_Node_setUserObject(lua_State *L) { olua_startinvoke(L); @@ -24871,7 +26483,7 @@ static int _cocos2d_Node_setUserObject(lua_State *L) return 0; } -static int _cocos2d_Node_setVisible(lua_State *L) +static int _olua_fun_cocos2d_Node_setVisible(lua_State *L) { olua_startinvoke(L); @@ -24889,7 +26501,7 @@ static int _cocos2d_Node_setVisible(lua_State *L) return 0; } -static int _cocos2d_Node_setWidth(lua_State *L) +static int _olua_fun_cocos2d_Node_setWidth(lua_State *L) { olua_startinvoke(L); @@ -24907,7 +26519,7 @@ static int _cocos2d_Node_setWidth(lua_State *L) return 0; } -static int _cocos2d_Node_sortAllChildren(lua_State *L) +static int _olua_fun_cocos2d_Node_sortAllChildren(lua_State *L) { olua_startinvoke(L); @@ -24923,7 +26535,7 @@ static int _cocos2d_Node_sortAllChildren(lua_State *L) return 0; } -static int _cocos2d_Node_stopAction(lua_State *L) +static int _olua_fun_cocos2d_Node_stopAction(lua_State *L) { olua_startinvoke(L); @@ -24947,7 +26559,7 @@ static int _cocos2d_Node_stopAction(lua_State *L) return 0; } -static int _cocos2d_Node_stopActionByTag(lua_State *L) +static int _olua_fun_cocos2d_Node_stopActionByTag(lua_State *L) { olua_startinvoke(L); @@ -24971,7 +26583,7 @@ static int _cocos2d_Node_stopActionByTag(lua_State *L) return 0; } -static int _cocos2d_Node_stopActionsByFlags(lua_State *L) +static int _olua_fun_cocos2d_Node_stopActionsByFlags(lua_State *L) { olua_startinvoke(L); @@ -24995,7 +26607,7 @@ static int _cocos2d_Node_stopActionsByFlags(lua_State *L) return 0; } -static int _cocos2d_Node_stopAllActions(lua_State *L) +static int _olua_fun_cocos2d_Node_stopAllActions(lua_State *L) { olua_startinvoke(L); @@ -25017,7 +26629,7 @@ static int _cocos2d_Node_stopAllActions(lua_State *L) return 0; } -static int _cocos2d_Node_stopAllActionsByTag(lua_State *L) +static int _olua_fun_cocos2d_Node_stopAllActionsByTag(lua_State *L) { olua_startinvoke(L); @@ -25041,7 +26653,7 @@ static int _cocos2d_Node_stopAllActionsByTag(lua_State *L) return 0; } -static int _cocos2d_Node_unschedule(lua_State *L) +static int _olua_fun_cocos2d_Node_unschedule(lua_State *L) { olua_startinvoke(L); @@ -25063,7 +26675,7 @@ static int _cocos2d_Node_unschedule(lua_State *L) return 0; } -static int _cocos2d_Node_unscheduleAllCallbacks(lua_State *L) +static int _olua_fun_cocos2d_Node_unscheduleAllCallbacks(lua_State *L) { olua_startinvoke(L); @@ -25083,7 +26695,7 @@ static int _cocos2d_Node_unscheduleAllCallbacks(lua_State *L) return 0; } -static int _cocos2d_Node_unscheduleUpdate(lua_State *L) +static int _olua_fun_cocos2d_Node_unscheduleUpdate(lua_State *L) { olua_startinvoke(L); @@ -25099,7 +26711,7 @@ static int _cocos2d_Node_unscheduleUpdate(lua_State *L) return 0; } -static int _cocos2d_Node_update(lua_State *L) +static int _olua_fun_cocos2d_Node_update(lua_State *L) { olua_startinvoke(L); @@ -25117,7 +26729,7 @@ static int _cocos2d_Node_update(lua_State *L) return 0; } -static int _cocos2d_Node_updateDisplayedColor(lua_State *L) +static int _olua_fun_cocos2d_Node_updateDisplayedColor(lua_State *L) { olua_startinvoke(L); @@ -25135,7 +26747,7 @@ static int _cocos2d_Node_updateDisplayedColor(lua_State *L) return 0; } -static int _cocos2d_Node_updateDisplayedOpacity(lua_State *L) +static int _olua_fun_cocos2d_Node_updateDisplayedOpacity(lua_State *L) { olua_startinvoke(L); @@ -25153,7 +26765,7 @@ static int _cocos2d_Node_updateDisplayedOpacity(lua_State *L) return 0; } -static int _cocos2d_Node_updateOrderOfArrival(lua_State *L) +static int _olua_fun_cocos2d_Node_updateOrderOfArrival(lua_State *L) { olua_startinvoke(L); @@ -25169,7 +26781,7 @@ static int _cocos2d_Node_updateOrderOfArrival(lua_State *L) return 0; } -static int _cocos2d_Node_updateTransform(lua_State *L) +static int _olua_fun_cocos2d_Node_updateTransform(lua_State *L) { olua_startinvoke(L); @@ -25185,13 +26797,13 @@ static int _cocos2d_Node_updateTransform(lua_State *L) return 0; } -static int _cocos2d_Node_visit$1(lua_State *L) +static int _olua_fun_cocos2d_Node_visit$1(lua_State *L) { olua_startinvoke(L); cocos2d::Node *self = nullptr; cocos2d::Renderer *arg1 = nullptr; /** renderer */ - cocos2d::Mat4 arg2; /** parentTransform */ + cocos2d::Mat4 *arg2; /** parentTransform */ uint32_t arg3 = 0; /** parentFlags */ olua_to_object(L, 1, &self, "cc.Node"); @@ -25200,14 +26812,14 @@ static int _cocos2d_Node_visit$1(lua_State *L) olua_check_integer(L, 4, &arg3); // void visit(cocos2d::Renderer *renderer, const cocos2d::Mat4 &parentTransform, uint32_t parentFlags) - self->visit(arg1, arg2, arg3); + self->visit(arg1, *arg2, arg3); olua_endinvoke(L); return 0; } -static int _cocos2d_Node_visit$2(lua_State *L) +static int _olua_fun_cocos2d_Node_visit$2(lua_State *L) { olua_startinvoke(L); @@ -25223,19 +26835,19 @@ static int _cocos2d_Node_visit$2(lua_State *L) return 0; } -static int _cocos2d_Node_visit(lua_State *L) +static int _olua_fun_cocos2d_Node_visit(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 0) { // void visit() - return _cocos2d_Node_visit$2(L); + return _olua_fun_cocos2d_Node_visit$2(L); } if (num_args == 3) { // if ((olua_is_object(L, 2, "cc.Renderer")) && (olua_is_object(L, 3, "cc.Mat4")) && (olua_is_integer(L, 4))) { // void visit(cocos2d::Renderer *renderer, const cocos2d::Mat4 &parentTransform, uint32_t parentFlags) - return _cocos2d_Node_visit$1(L); + return _olua_fun_cocos2d_Node_visit$1(L); // } } @@ -25244,268 +26856,277 @@ static int _cocos2d_Node_visit(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_Node(lua_State *L) +static int _olua_cls_cc_Node(lua_State *L) { oluacls_class(L, "cc.Node"); - oluacls_func(L, "__index", _cocos2d_Node___index); - oluacls_func(L, "addChild", _cocos2d_Node_addChild); - oluacls_func(L, "addComponent", _cocos2d_Node_addComponent); - oluacls_func(L, "cleanup", _cocos2d_Node_cleanup); - oluacls_func(L, "convertToNodeSpace", _cocos2d_Node_convertToNodeSpace); - oluacls_func(L, "convertToNodeSpaceAR", _cocos2d_Node_convertToNodeSpaceAR); - oluacls_func(L, "convertToWorldSpace", _cocos2d_Node_convertToWorldSpace); - oluacls_func(L, "convertToWorldSpaceAR", _cocos2d_Node_convertToWorldSpaceAR); - oluacls_func(L, "convertTouchToNodeSpace", _cocos2d_Node_convertTouchToNodeSpace); - oluacls_func(L, "convertTouchToNodeSpaceAR", _cocos2d_Node_convertTouchToNodeSpaceAR); - oluacls_func(L, "create", _cocos2d_Node_create); - oluacls_func(L, "draw", _cocos2d_Node_draw); - oluacls_func(L, "enumerateChildren", _cocos2d_Node_enumerateChildren); - oluacls_func(L, "getActionByTag", _cocos2d_Node_getActionByTag); - oluacls_func(L, "getActionManager", _cocos2d_Node_getActionManager); - oluacls_func(L, "getAlpha", _cocos2d_Node_getAlpha); - oluacls_func(L, "getAnchorPoint", _cocos2d_Node_getAnchorPoint); - oluacls_func(L, "getAnchorPointInPoints", _cocos2d_Node_getAnchorPointInPoints); - oluacls_func(L, "getAnchorX", _cocos2d_Node_getAnchorX); - oluacls_func(L, "getAnchorY", _cocos2d_Node_getAnchorY); - oluacls_func(L, "getAttachedNodeCount", _cocos2d_Node_getAttachedNodeCount); - oluacls_func(L, "getBoundingBox", _cocos2d_Node_getBoundingBox); - oluacls_func(L, "getBounds", _cocos2d_Node_getBounds); - oluacls_func(L, "getCameraMask", _cocos2d_Node_getCameraMask); - oluacls_func(L, "getChildByName", _cocos2d_Node_getChildByName); - oluacls_func(L, "getChildByTag", _cocos2d_Node_getChildByTag); - oluacls_func(L, "getChildren", _cocos2d_Node_getChildren); - oluacls_func(L, "getChildrenCount", _cocos2d_Node_getChildrenCount); - oluacls_func(L, "getColor", _cocos2d_Node_getColor); - oluacls_func(L, "getComponent", _cocos2d_Node_getComponent); - oluacls_func(L, "getContentSize", _cocos2d_Node_getContentSize); - oluacls_func(L, "getDescription", _cocos2d_Node_getDescription); - oluacls_func(L, "getDisplayedColor", _cocos2d_Node_getDisplayedColor); - oluacls_func(L, "getDisplayedOpacity", _cocos2d_Node_getDisplayedOpacity); - oluacls_func(L, "getEventDispatcher", _cocos2d_Node_getEventDispatcher); - oluacls_func(L, "getGlobalZOrder", _cocos2d_Node_getGlobalZOrder); - oluacls_func(L, "getHeight", _cocos2d_Node_getHeight); - oluacls_func(L, "getLocalZOrder", _cocos2d_Node_getLocalZOrder); - oluacls_func(L, "getName", _cocos2d_Node_getName); - oluacls_func(L, "getNodeToParentAffineTransform", _cocos2d_Node_getNodeToParentAffineTransform); - oluacls_func(L, "getNodeToParentTransform", _cocos2d_Node_getNodeToParentTransform); - oluacls_func(L, "getNodeToWorldAffineTransform", _cocos2d_Node_getNodeToWorldAffineTransform); - oluacls_func(L, "getNodeToWorldTransform", _cocos2d_Node_getNodeToWorldTransform); - oluacls_func(L, "getNormalizedPosition", _cocos2d_Node_getNormalizedPosition); - oluacls_func(L, "getNumberOfRunningActions", _cocos2d_Node_getNumberOfRunningActions); - oluacls_func(L, "getNumberOfRunningActionsByTag", _cocos2d_Node_getNumberOfRunningActionsByTag); - oluacls_func(L, "getOnEnterCallback", _cocos2d_Node_getOnEnterCallback); - oluacls_func(L, "getOnEnterTransitionDidFinishCallback", _cocos2d_Node_getOnEnterTransitionDidFinishCallback); - oluacls_func(L, "getOnExitCallback", _cocos2d_Node_getOnExitCallback); - oluacls_func(L, "getOnExitTransitionDidStartCallback", _cocos2d_Node_getOnExitTransitionDidStartCallback); - oluacls_func(L, "getOpacity", _cocos2d_Node_getOpacity); - oluacls_func(L, "getParent", _cocos2d_Node_getParent); - oluacls_func(L, "getParentToNodeAffineTransform", _cocos2d_Node_getParentToNodeAffineTransform); - oluacls_func(L, "getParentToNodeTransform", _cocos2d_Node_getParentToNodeTransform); + oluacls_func(L, "__index", _olua_fun_cocos2d_Node___index); + oluacls_func(L, "addChild", _olua_fun_cocos2d_Node_addChild); + oluacls_func(L, "addComponent", _olua_fun_cocos2d_Node_addComponent); + oluacls_func(L, "cleanup", _olua_fun_cocos2d_Node_cleanup); + oluacls_func(L, "convertToNodeSpace", _olua_fun_cocos2d_Node_convertToNodeSpace); + oluacls_func(L, "convertToNodeSpaceAR", _olua_fun_cocos2d_Node_convertToNodeSpaceAR); + oluacls_func(L, "convertToWorldSpace", _olua_fun_cocos2d_Node_convertToWorldSpace); + oluacls_func(L, "convertToWorldSpaceAR", _olua_fun_cocos2d_Node_convertToWorldSpaceAR); + oluacls_func(L, "convertTouchToNodeSpace", _olua_fun_cocos2d_Node_convertTouchToNodeSpace); + oluacls_func(L, "convertTouchToNodeSpaceAR", _olua_fun_cocos2d_Node_convertTouchToNodeSpaceAR); + oluacls_func(L, "create", _olua_fun_cocos2d_Node_create); + oluacls_func(L, "draw", _olua_fun_cocos2d_Node_draw); + oluacls_func(L, "enumerateChildren", _olua_fun_cocos2d_Node_enumerateChildren); + oluacls_func(L, "getActionByTag", _olua_fun_cocos2d_Node_getActionByTag); + oluacls_func(L, "getActionManager", _olua_fun_cocos2d_Node_getActionManager); + oluacls_func(L, "getAlpha", _olua_fun_cocos2d_Node_getAlpha); + oluacls_func(L, "getAnchorPoint", _olua_fun_cocos2d_Node_getAnchorPoint); + oluacls_func(L, "getAnchorPointInPoints", _olua_fun_cocos2d_Node_getAnchorPointInPoints); + oluacls_func(L, "getAnchorX", _olua_fun_cocos2d_Node_getAnchorX); + oluacls_func(L, "getAnchorY", _olua_fun_cocos2d_Node_getAnchorY); + oluacls_func(L, "getAttachedNodeCount", _olua_fun_cocos2d_Node_getAttachedNodeCount); + oluacls_func(L, "getBoundingBox", _olua_fun_cocos2d_Node_getBoundingBox); + oluacls_func(L, "getBounds", _olua_fun_cocos2d_Node_getBounds); + oluacls_func(L, "getCameraMask", _olua_fun_cocos2d_Node_getCameraMask); + oluacls_func(L, "getChildByName", _olua_fun_cocos2d_Node_getChildByName); + oluacls_func(L, "getChildByTag", _olua_fun_cocos2d_Node_getChildByTag); + oluacls_func(L, "getChildren", _olua_fun_cocos2d_Node_getChildren); + oluacls_func(L, "getChildrenCount", _olua_fun_cocos2d_Node_getChildrenCount); + oluacls_func(L, "getColor", _olua_fun_cocos2d_Node_getColor); + oluacls_func(L, "getComponent", _olua_fun_cocos2d_Node_getComponent); + oluacls_func(L, "getContentSize", _olua_fun_cocos2d_Node_getContentSize); + oluacls_func(L, "getDescription", _olua_fun_cocos2d_Node_getDescription); + oluacls_func(L, "getDisplayedColor", _olua_fun_cocos2d_Node_getDisplayedColor); + oluacls_func(L, "getDisplayedOpacity", _olua_fun_cocos2d_Node_getDisplayedOpacity); + oluacls_func(L, "getEventDispatcher", _olua_fun_cocos2d_Node_getEventDispatcher); + oluacls_func(L, "getGlobalZOrder", _olua_fun_cocos2d_Node_getGlobalZOrder); + oluacls_func(L, "getHeight", _olua_fun_cocos2d_Node_getHeight); + oluacls_func(L, "getLocalZOrder", _olua_fun_cocos2d_Node_getLocalZOrder); + oluacls_func(L, "getName", _olua_fun_cocos2d_Node_getName); + oluacls_func(L, "getNodeToParentAffineTransform", _olua_fun_cocos2d_Node_getNodeToParentAffineTransform); + oluacls_func(L, "getNodeToParentTransform", _olua_fun_cocos2d_Node_getNodeToParentTransform); + oluacls_func(L, "getNodeToWorldAffineTransform", _olua_fun_cocos2d_Node_getNodeToWorldAffineTransform); + oluacls_func(L, "getNodeToWorldTransform", _olua_fun_cocos2d_Node_getNodeToWorldTransform); + oluacls_func(L, "getNormalizedPosition", _olua_fun_cocos2d_Node_getNormalizedPosition); + oluacls_func(L, "getNumberOfRunningActions", _olua_fun_cocos2d_Node_getNumberOfRunningActions); + oluacls_func(L, "getNumberOfRunningActionsByTag", _olua_fun_cocos2d_Node_getNumberOfRunningActionsByTag); + oluacls_func(L, "getOnEnterCallback", _olua_fun_cocos2d_Node_getOnEnterCallback); + oluacls_func(L, "getOnEnterTransitionDidFinishCallback", _olua_fun_cocos2d_Node_getOnEnterTransitionDidFinishCallback); + oluacls_func(L, "getOnExitCallback", _olua_fun_cocos2d_Node_getOnExitCallback); + oluacls_func(L, "getOnExitTransitionDidStartCallback", _olua_fun_cocos2d_Node_getOnExitTransitionDidStartCallback); + oluacls_func(L, "getOpacity", _olua_fun_cocos2d_Node_getOpacity); + oluacls_func(L, "getParent", _olua_fun_cocos2d_Node_getParent); + oluacls_func(L, "getParentToNodeAffineTransform", _olua_fun_cocos2d_Node_getParentToNodeAffineTransform); + oluacls_func(L, "getParentToNodeTransform", _olua_fun_cocos2d_Node_getParentToNodeTransform); #if CC_USE_PHYSICS - oluacls_func(L, "getPhysicsBody", _cocos2d_Node_getPhysicsBody); + oluacls_func(L, "getPhysicsBody", _olua_fun_cocos2d_Node_getPhysicsBody); #endif - oluacls_func(L, "getPosition", _cocos2d_Node_getPosition); - oluacls_func(L, "getPosition3D", _cocos2d_Node_getPosition3D); - oluacls_func(L, "getPositionNormalized", _cocos2d_Node_getPositionNormalized); - oluacls_func(L, "getPositionX", _cocos2d_Node_getPositionX); - oluacls_func(L, "getPositionY", _cocos2d_Node_getPositionY); - oluacls_func(L, "getPositionZ", _cocos2d_Node_getPositionZ); - oluacls_func(L, "getProgramState", _cocos2d_Node_getProgramState); - oluacls_func(L, "getRotation", _cocos2d_Node_getRotation); - oluacls_func(L, "getRotation3D", _cocos2d_Node_getRotation3D); - oluacls_func(L, "getRotationQuat", _cocos2d_Node_getRotationQuat); - oluacls_func(L, "getRotationSkewX", _cocos2d_Node_getRotationSkewX); - oluacls_func(L, "getRotationSkewY", _cocos2d_Node_getRotationSkewY); - oluacls_func(L, "getScale", _cocos2d_Node_getScale); - oluacls_func(L, "getScaleX", _cocos2d_Node_getScaleX); - oluacls_func(L, "getScaleY", _cocos2d_Node_getScaleY); - oluacls_func(L, "getScaleZ", _cocos2d_Node_getScaleZ); - oluacls_func(L, "getScene", _cocos2d_Node_getScene); - oluacls_func(L, "getScheduler", _cocos2d_Node_getScheduler); - oluacls_func(L, "getSkewX", _cocos2d_Node_getSkewX); - oluacls_func(L, "getSkewY", _cocos2d_Node_getSkewY); - oluacls_func(L, "getTag", _cocos2d_Node_getTag); - oluacls_func(L, "getUserData", _cocos2d_Node_getUserData); - oluacls_func(L, "getUserObject", _cocos2d_Node_getUserObject); - oluacls_func(L, "getWidth", _cocos2d_Node_getWidth); - oluacls_func(L, "getWorldToNodeAffineTransform", _cocos2d_Node_getWorldToNodeAffineTransform); - oluacls_func(L, "getWorldToNodeTransform", _cocos2d_Node_getWorldToNodeTransform); - oluacls_func(L, "init", _cocos2d_Node_init); - oluacls_func(L, "isCascadeColorEnabled", _cocos2d_Node_isCascadeColorEnabled); - oluacls_func(L, "isCascadeOpacityEnabled", _cocos2d_Node_isCascadeOpacityEnabled); - oluacls_func(L, "isIgnoreAnchorPointForPosition", _cocos2d_Node_isIgnoreAnchorPointForPosition); - oluacls_func(L, "isOpacityModifyRGB", _cocos2d_Node_isOpacityModifyRGB); - oluacls_func(L, "isRunning", _cocos2d_Node_isRunning); - oluacls_func(L, "isScheduled", _cocos2d_Node_isScheduled); - oluacls_func(L, "isVisible", _cocos2d_Node_isVisible); - oluacls_func(L, "new", _cocos2d_Node_new); - oluacls_func(L, "onEnter", _cocos2d_Node_onEnter); - oluacls_func(L, "onEnterTransitionDidFinish", _cocos2d_Node_onEnterTransitionDidFinish); - oluacls_func(L, "onExit", _cocos2d_Node_onExit); - oluacls_func(L, "onExitTransitionDidStart", _cocos2d_Node_onExitTransitionDidStart); - oluacls_func(L, "pause", _cocos2d_Node_pause); - oluacls_func(L, "removeAllChildren", _cocos2d_Node_removeAllChildren); - oluacls_func(L, "removeAllChildrenWithCleanup", _cocos2d_Node_removeAllChildrenWithCleanup); - oluacls_func(L, "removeAllComponents", _cocos2d_Node_removeAllComponents); - oluacls_func(L, "removeChild", _cocos2d_Node_removeChild); - oluacls_func(L, "removeChildByName", _cocos2d_Node_removeChildByName); - oluacls_func(L, "removeChildByTag", _cocos2d_Node_removeChildByTag); - oluacls_func(L, "removeComponent", _cocos2d_Node_removeComponent); - oluacls_func(L, "removeFromParent", _cocos2d_Node_removeFromParent); - oluacls_func(L, "removeFromParentAndCleanup", _cocos2d_Node_removeFromParentAndCleanup); - oluacls_func(L, "reorderChild", _cocos2d_Node_reorderChild); - oluacls_func(L, "resume", _cocos2d_Node_resume); - oluacls_func(L, "runAction", _cocos2d_Node_runAction); - oluacls_func(L, "schedule", _cocos2d_Node_schedule); - oluacls_func(L, "scheduleOnce", _cocos2d_Node_scheduleOnce); - oluacls_func(L, "scheduleUpdate", _cocos2d_Node_scheduleUpdate); - oluacls_func(L, "scheduleUpdateWithPriority", _cocos2d_Node_scheduleUpdateWithPriority); - oluacls_func(L, "setActionManager", _cocos2d_Node_setActionManager); - oluacls_func(L, "setAdditionalTransform", _cocos2d_Node_setAdditionalTransform); - oluacls_func(L, "setAlpha", _cocos2d_Node_setAlpha); - oluacls_func(L, "setAnchorPoint", _cocos2d_Node_setAnchorPoint); - oluacls_func(L, "setAnchorX", _cocos2d_Node_setAnchorX); - oluacls_func(L, "setAnchorY", _cocos2d_Node_setAnchorY); - oluacls_func(L, "setCameraMask", _cocos2d_Node_setCameraMask); - oluacls_func(L, "setCascadeColorEnabled", _cocos2d_Node_setCascadeColorEnabled); - oluacls_func(L, "setCascadeOpacityEnabled", _cocos2d_Node_setCascadeOpacityEnabled); - oluacls_func(L, "setColor", _cocos2d_Node_setColor); - oluacls_func(L, "setContentSize", _cocos2d_Node_setContentSize); - oluacls_func(L, "setEventDispatcher", _cocos2d_Node_setEventDispatcher); - oluacls_func(L, "setGlobalZOrder", _cocos2d_Node_setGlobalZOrder); - oluacls_func(L, "setHeight", _cocos2d_Node_setHeight); - oluacls_func(L, "setIgnoreAnchorPointForPosition", _cocos2d_Node_setIgnoreAnchorPointForPosition); - oluacls_func(L, "setLocalZOrder", _cocos2d_Node_setLocalZOrder); - oluacls_func(L, "setName", _cocos2d_Node_setName); - oluacls_func(L, "setNodeToParentTransform", _cocos2d_Node_setNodeToParentTransform); - oluacls_func(L, "setNormalizedPosition", _cocos2d_Node_setNormalizedPosition); - oluacls_func(L, "setOnEnterCallback", _cocos2d_Node_setOnEnterCallback); - oluacls_func(L, "setOnEnterTransitionDidFinishCallback", _cocos2d_Node_setOnEnterTransitionDidFinishCallback); - oluacls_func(L, "setOnExitCallback", _cocos2d_Node_setOnExitCallback); - oluacls_func(L, "setOnExitTransitionDidStartCallback", _cocos2d_Node_setOnExitTransitionDidStartCallback); - oluacls_func(L, "setOpacity", _cocos2d_Node_setOpacity); - oluacls_func(L, "setOpacityModifyRGB", _cocos2d_Node_setOpacityModifyRGB); - oluacls_func(L, "setParent", _cocos2d_Node_setParent); + oluacls_func(L, "getPosition", _olua_fun_cocos2d_Node_getPosition); + oluacls_func(L, "getPosition3D", _olua_fun_cocos2d_Node_getPosition3D); + oluacls_func(L, "getPositionNormalized", _olua_fun_cocos2d_Node_getPositionNormalized); + oluacls_func(L, "getPositionX", _olua_fun_cocos2d_Node_getPositionX); + oluacls_func(L, "getPositionY", _olua_fun_cocos2d_Node_getPositionY); + oluacls_func(L, "getPositionZ", _olua_fun_cocos2d_Node_getPositionZ); + oluacls_func(L, "getProgramState", _olua_fun_cocos2d_Node_getProgramState); + oluacls_func(L, "getRotation", _olua_fun_cocos2d_Node_getRotation); + oluacls_func(L, "getRotation3D", _olua_fun_cocos2d_Node_getRotation3D); + oluacls_func(L, "getRotationQuat", _olua_fun_cocos2d_Node_getRotationQuat); + oluacls_func(L, "getRotationSkewX", _olua_fun_cocos2d_Node_getRotationSkewX); + oluacls_func(L, "getRotationSkewY", _olua_fun_cocos2d_Node_getRotationSkewY); + oluacls_func(L, "getScale", _olua_fun_cocos2d_Node_getScale); + oluacls_func(L, "getScaleX", _olua_fun_cocos2d_Node_getScaleX); + oluacls_func(L, "getScaleY", _olua_fun_cocos2d_Node_getScaleY); + oluacls_func(L, "getScaleZ", _olua_fun_cocos2d_Node_getScaleZ); + oluacls_func(L, "getScene", _olua_fun_cocos2d_Node_getScene); + oluacls_func(L, "getScheduler", _olua_fun_cocos2d_Node_getScheduler); + oluacls_func(L, "getSkewX", _olua_fun_cocos2d_Node_getSkewX); + oluacls_func(L, "getSkewY", _olua_fun_cocos2d_Node_getSkewY); + oluacls_func(L, "getTag", _olua_fun_cocos2d_Node_getTag); + oluacls_func(L, "getUserData", _olua_fun_cocos2d_Node_getUserData); + oluacls_func(L, "getUserObject", _olua_fun_cocos2d_Node_getUserObject); + oluacls_func(L, "getWidth", _olua_fun_cocos2d_Node_getWidth); + oluacls_func(L, "getWorldToNodeAffineTransform", _olua_fun_cocos2d_Node_getWorldToNodeAffineTransform); + oluacls_func(L, "getWorldToNodeTransform", _olua_fun_cocos2d_Node_getWorldToNodeTransform); + oluacls_func(L, "init", _olua_fun_cocos2d_Node_init); + oluacls_func(L, "isCascadeColorEnabled", _olua_fun_cocos2d_Node_isCascadeColorEnabled); + oluacls_func(L, "isCascadeOpacityEnabled", _olua_fun_cocos2d_Node_isCascadeOpacityEnabled); + oluacls_func(L, "isIgnoreAnchorPointForPosition", _olua_fun_cocos2d_Node_isIgnoreAnchorPointForPosition); + oluacls_func(L, "isOpacityModifyRGB", _olua_fun_cocos2d_Node_isOpacityModifyRGB); + oluacls_func(L, "isRunning", _olua_fun_cocos2d_Node_isRunning); + oluacls_func(L, "isScheduled", _olua_fun_cocos2d_Node_isScheduled); + oluacls_func(L, "isVisible", _olua_fun_cocos2d_Node_isVisible); + oluacls_func(L, "new", _olua_fun_cocos2d_Node_new); + oluacls_func(L, "onEnter", _olua_fun_cocos2d_Node_onEnter); + oluacls_func(L, "onEnterTransitionDidFinish", _olua_fun_cocos2d_Node_onEnterTransitionDidFinish); + oluacls_func(L, "onExit", _olua_fun_cocos2d_Node_onExit); + oluacls_func(L, "onExitTransitionDidStart", _olua_fun_cocos2d_Node_onExitTransitionDidStart); + oluacls_func(L, "pause", _olua_fun_cocos2d_Node_pause); + oluacls_func(L, "removeAllChildren", _olua_fun_cocos2d_Node_removeAllChildren); + oluacls_func(L, "removeAllChildrenWithCleanup", _olua_fun_cocos2d_Node_removeAllChildrenWithCleanup); + oluacls_func(L, "removeAllComponents", _olua_fun_cocos2d_Node_removeAllComponents); + oluacls_func(L, "removeChild", _olua_fun_cocos2d_Node_removeChild); + oluacls_func(L, "removeChildByName", _olua_fun_cocos2d_Node_removeChildByName); + oluacls_func(L, "removeChildByTag", _olua_fun_cocos2d_Node_removeChildByTag); + oluacls_func(L, "removeComponent", _olua_fun_cocos2d_Node_removeComponent); + oluacls_func(L, "removeFromParent", _olua_fun_cocos2d_Node_removeFromParent); + oluacls_func(L, "removeFromParentAndCleanup", _olua_fun_cocos2d_Node_removeFromParentAndCleanup); + oluacls_func(L, "reorderChild", _olua_fun_cocos2d_Node_reorderChild); + oluacls_func(L, "resume", _olua_fun_cocos2d_Node_resume); + oluacls_func(L, "runAction", _olua_fun_cocos2d_Node_runAction); + oluacls_func(L, "schedule", _olua_fun_cocos2d_Node_schedule); + oluacls_func(L, "scheduleOnce", _olua_fun_cocos2d_Node_scheduleOnce); + oluacls_func(L, "scheduleUpdate", _olua_fun_cocos2d_Node_scheduleUpdate); + oluacls_func(L, "scheduleUpdateWithPriority", _olua_fun_cocos2d_Node_scheduleUpdateWithPriority); + oluacls_func(L, "setActionManager", _olua_fun_cocos2d_Node_setActionManager); + oluacls_func(L, "setAdditionalTransform", _olua_fun_cocos2d_Node_setAdditionalTransform); + oluacls_func(L, "setAlpha", _olua_fun_cocos2d_Node_setAlpha); + oluacls_func(L, "setAnchorPoint", _olua_fun_cocos2d_Node_setAnchorPoint); + oluacls_func(L, "setAnchorX", _olua_fun_cocos2d_Node_setAnchorX); + oluacls_func(L, "setAnchorY", _olua_fun_cocos2d_Node_setAnchorY); + oluacls_func(L, "setCameraMask", _olua_fun_cocos2d_Node_setCameraMask); + oluacls_func(L, "setCascadeColorEnabled", _olua_fun_cocos2d_Node_setCascadeColorEnabled); + oluacls_func(L, "setCascadeOpacityEnabled", _olua_fun_cocos2d_Node_setCascadeOpacityEnabled); + oluacls_func(L, "setColor", _olua_fun_cocos2d_Node_setColor); + oluacls_func(L, "setContentSize", _olua_fun_cocos2d_Node_setContentSize); + oluacls_func(L, "setEventDispatcher", _olua_fun_cocos2d_Node_setEventDispatcher); + oluacls_func(L, "setGlobalZOrder", _olua_fun_cocos2d_Node_setGlobalZOrder); + oluacls_func(L, "setHeight", _olua_fun_cocos2d_Node_setHeight); + oluacls_func(L, "setIgnoreAnchorPointForPosition", _olua_fun_cocos2d_Node_setIgnoreAnchorPointForPosition); + oluacls_func(L, "setLocalZOrder", _olua_fun_cocos2d_Node_setLocalZOrder); + oluacls_func(L, "setName", _olua_fun_cocos2d_Node_setName); + oluacls_func(L, "setNodeToParentTransform", _olua_fun_cocos2d_Node_setNodeToParentTransform); + oluacls_func(L, "setNormalizedPosition", _olua_fun_cocos2d_Node_setNormalizedPosition); + oluacls_func(L, "setOnEnterCallback", _olua_fun_cocos2d_Node_setOnEnterCallback); + oluacls_func(L, "setOnEnterTransitionDidFinishCallback", _olua_fun_cocos2d_Node_setOnEnterTransitionDidFinishCallback); + oluacls_func(L, "setOnExitCallback", _olua_fun_cocos2d_Node_setOnExitCallback); + oluacls_func(L, "setOnExitTransitionDidStartCallback", _olua_fun_cocos2d_Node_setOnExitTransitionDidStartCallback); + oluacls_func(L, "setOpacity", _olua_fun_cocos2d_Node_setOpacity); + oluacls_func(L, "setOpacityModifyRGB", _olua_fun_cocos2d_Node_setOpacityModifyRGB); + oluacls_func(L, "setParent", _olua_fun_cocos2d_Node_setParent); #if CC_USE_PHYSICS - oluacls_func(L, "setPhysicsBody", _cocos2d_Node_setPhysicsBody); + oluacls_func(L, "setPhysicsBody", _olua_fun_cocos2d_Node_setPhysicsBody); #endif - oluacls_func(L, "setPosition", _cocos2d_Node_setPosition); - oluacls_func(L, "setPosition3D", _cocos2d_Node_setPosition3D); - oluacls_func(L, "setPositionNormalized", _cocos2d_Node_setPositionNormalized); - oluacls_func(L, "setPositionX", _cocos2d_Node_setPositionX); - oluacls_func(L, "setPositionY", _cocos2d_Node_setPositionY); - oluacls_func(L, "setPositionZ", _cocos2d_Node_setPositionZ); - oluacls_func(L, "setProgramState", _cocos2d_Node_setProgramState); - oluacls_func(L, "setRotation", _cocos2d_Node_setRotation); - oluacls_func(L, "setRotation3D", _cocos2d_Node_setRotation3D); - oluacls_func(L, "setRotationQuat", _cocos2d_Node_setRotationQuat); - oluacls_func(L, "setRotationSkewX", _cocos2d_Node_setRotationSkewX); - oluacls_func(L, "setRotationSkewY", _cocos2d_Node_setRotationSkewY); - oluacls_func(L, "setScale", _cocos2d_Node_setScale); - oluacls_func(L, "setScaleX", _cocos2d_Node_setScaleX); - oluacls_func(L, "setScaleY", _cocos2d_Node_setScaleY); - oluacls_func(L, "setScaleZ", _cocos2d_Node_setScaleZ); - oluacls_func(L, "setScheduler", _cocos2d_Node_setScheduler); - oluacls_func(L, "setSkewX", _cocos2d_Node_setSkewX); - oluacls_func(L, "setSkewY", _cocos2d_Node_setSkewY); - oluacls_func(L, "setTag", _cocos2d_Node_setTag); - oluacls_func(L, "setUserData", _cocos2d_Node_setUserData); - oluacls_func(L, "setUserObject", _cocos2d_Node_setUserObject); - oluacls_func(L, "setVisible", _cocos2d_Node_setVisible); - oluacls_func(L, "setWidth", _cocos2d_Node_setWidth); - oluacls_func(L, "sortAllChildren", _cocos2d_Node_sortAllChildren); - oluacls_func(L, "stopAction", _cocos2d_Node_stopAction); - oluacls_func(L, "stopActionByTag", _cocos2d_Node_stopActionByTag); - oluacls_func(L, "stopActionsByFlags", _cocos2d_Node_stopActionsByFlags); - oluacls_func(L, "stopAllActions", _cocos2d_Node_stopAllActions); - oluacls_func(L, "stopAllActionsByTag", _cocos2d_Node_stopAllActionsByTag); - oluacls_func(L, "unschedule", _cocos2d_Node_unschedule); - oluacls_func(L, "unscheduleAllCallbacks", _cocos2d_Node_unscheduleAllCallbacks); - oluacls_func(L, "unscheduleUpdate", _cocos2d_Node_unscheduleUpdate); - oluacls_func(L, "update", _cocos2d_Node_update); - oluacls_func(L, "updateDisplayedColor", _cocos2d_Node_updateDisplayedColor); - oluacls_func(L, "updateDisplayedOpacity", _cocos2d_Node_updateDisplayedOpacity); - oluacls_func(L, "updateOrderOfArrival", _cocos2d_Node_updateOrderOfArrival); - oluacls_func(L, "updateTransform", _cocos2d_Node_updateTransform); - oluacls_func(L, "visit", _cocos2d_Node_visit); - oluacls_prop(L, "actionManager", _cocos2d_Node_getActionManager, _cocos2d_Node_setActionManager); - oluacls_prop(L, "alpha", _cocos2d_Node_getAlpha, _cocos2d_Node_setAlpha); - oluacls_prop(L, "anchorPoint", _cocos2d_Node_getAnchorPoint, _cocos2d_Node_setAnchorPoint); - oluacls_prop(L, "anchorPointInPoints", _cocos2d_Node_getAnchorPointInPoints, nullptr); - oluacls_prop(L, "anchorX", _cocos2d_Node_getAnchorX, _cocos2d_Node_setAnchorX); - oluacls_prop(L, "anchorY", _cocos2d_Node_getAnchorY, _cocos2d_Node_setAnchorY); - oluacls_prop(L, "attachedNodeCount", _cocos2d_Node_getAttachedNodeCount, nullptr); - oluacls_prop(L, "boundingBox", _cocos2d_Node_getBoundingBox, nullptr); - oluacls_prop(L, "cameraMask", _cocos2d_Node_getCameraMask, _cocos2d_Node_setCameraMask); - oluacls_prop(L, "cascadeColorEnabled", _cocos2d_Node_isCascadeColorEnabled, _cocos2d_Node_setCascadeColorEnabled); - oluacls_prop(L, "cascadeOpacityEnabled", _cocos2d_Node_isCascadeOpacityEnabled, _cocos2d_Node_setCascadeOpacityEnabled); - oluacls_prop(L, "children", _cocos2d_Node_getChildren, nullptr); - oluacls_prop(L, "childrenCount", _cocos2d_Node_getChildrenCount, nullptr); - oluacls_prop(L, "color", _cocos2d_Node_getColor, _cocos2d_Node_setColor); - oluacls_prop(L, "contentSize", _cocos2d_Node_getContentSize, _cocos2d_Node_setContentSize); - oluacls_prop(L, "description", _cocos2d_Node_getDescription, nullptr); - oluacls_prop(L, "displayedColor", _cocos2d_Node_getDisplayedColor, nullptr); - oluacls_prop(L, "displayedOpacity", _cocos2d_Node_getDisplayedOpacity, nullptr); - oluacls_prop(L, "eventDispatcher", _cocos2d_Node_getEventDispatcher, _cocos2d_Node_setEventDispatcher); - oluacls_prop(L, "globalZOrder", _cocos2d_Node_getGlobalZOrder, _cocos2d_Node_setGlobalZOrder); - oluacls_prop(L, "height", _cocos2d_Node_getHeight, _cocos2d_Node_setHeight); - oluacls_prop(L, "ignoreAnchorPointForPosition", _cocos2d_Node_isIgnoreAnchorPointForPosition, _cocos2d_Node_setIgnoreAnchorPointForPosition); - oluacls_prop(L, "localZOrder", _cocos2d_Node_getLocalZOrder, _cocos2d_Node_setLocalZOrder); - oluacls_prop(L, "name", _cocos2d_Node_getName, _cocos2d_Node_setName); - oluacls_prop(L, "nodeToWorldAffineTransform", _cocos2d_Node_getNodeToWorldAffineTransform, nullptr); - oluacls_prop(L, "nodeToWorldTransform", _cocos2d_Node_getNodeToWorldTransform, nullptr); - oluacls_prop(L, "normalizedPosition", _cocos2d_Node_getNormalizedPosition, _cocos2d_Node_setNormalizedPosition); - oluacls_prop(L, "numberOfRunningActions", _cocos2d_Node_getNumberOfRunningActions, nullptr); - oluacls_prop(L, "onEnterCallback", _cocos2d_Node_getOnEnterCallback, _cocos2d_Node_setOnEnterCallback); - oluacls_prop(L, "onEnterTransitionDidFinishCallback", _cocos2d_Node_getOnEnterTransitionDidFinishCallback, _cocos2d_Node_setOnEnterTransitionDidFinishCallback); - oluacls_prop(L, "onExitCallback", _cocos2d_Node_getOnExitCallback, _cocos2d_Node_setOnExitCallback); - oluacls_prop(L, "onExitTransitionDidStartCallback", _cocos2d_Node_getOnExitTransitionDidStartCallback, _cocos2d_Node_setOnExitTransitionDidStartCallback); - oluacls_prop(L, "opacity", _cocos2d_Node_getOpacity, _cocos2d_Node_setOpacity); - oluacls_prop(L, "opacityModifyRGB", _cocos2d_Node_isOpacityModifyRGB, _cocos2d_Node_setOpacityModifyRGB); - oluacls_prop(L, "parent", _cocos2d_Node_getParent, _cocos2d_Node_setParent); - oluacls_prop(L, "parentToNodeAffineTransform", _cocos2d_Node_getParentToNodeAffineTransform, nullptr); - oluacls_prop(L, "parentToNodeTransform", _cocos2d_Node_getParentToNodeTransform, nullptr); + oluacls_func(L, "setPosition", _olua_fun_cocos2d_Node_setPosition); + oluacls_func(L, "setPosition3D", _olua_fun_cocos2d_Node_setPosition3D); + oluacls_func(L, "setPositionNormalized", _olua_fun_cocos2d_Node_setPositionNormalized); + oluacls_func(L, "setPositionX", _olua_fun_cocos2d_Node_setPositionX); + oluacls_func(L, "setPositionY", _olua_fun_cocos2d_Node_setPositionY); + oluacls_func(L, "setPositionZ", _olua_fun_cocos2d_Node_setPositionZ); + oluacls_func(L, "setProgramState", _olua_fun_cocos2d_Node_setProgramState); + oluacls_func(L, "setRotation", _olua_fun_cocos2d_Node_setRotation); + oluacls_func(L, "setRotation3D", _olua_fun_cocos2d_Node_setRotation3D); + oluacls_func(L, "setRotationQuat", _olua_fun_cocos2d_Node_setRotationQuat); + oluacls_func(L, "setRotationSkewX", _olua_fun_cocos2d_Node_setRotationSkewX); + oluacls_func(L, "setRotationSkewY", _olua_fun_cocos2d_Node_setRotationSkewY); + oluacls_func(L, "setScale", _olua_fun_cocos2d_Node_setScale); + oluacls_func(L, "setScaleX", _olua_fun_cocos2d_Node_setScaleX); + oluacls_func(L, "setScaleY", _olua_fun_cocos2d_Node_setScaleY); + oluacls_func(L, "setScaleZ", _olua_fun_cocos2d_Node_setScaleZ); + oluacls_func(L, "setScheduler", _olua_fun_cocos2d_Node_setScheduler); + oluacls_func(L, "setSkewX", _olua_fun_cocos2d_Node_setSkewX); + oluacls_func(L, "setSkewY", _olua_fun_cocos2d_Node_setSkewY); + oluacls_func(L, "setTag", _olua_fun_cocos2d_Node_setTag); + oluacls_func(L, "setUserData", _olua_fun_cocos2d_Node_setUserData); + oluacls_func(L, "setUserObject", _olua_fun_cocos2d_Node_setUserObject); + oluacls_func(L, "setVisible", _olua_fun_cocos2d_Node_setVisible); + oluacls_func(L, "setWidth", _olua_fun_cocos2d_Node_setWidth); + oluacls_func(L, "sortAllChildren", _olua_fun_cocos2d_Node_sortAllChildren); + oluacls_func(L, "stopAction", _olua_fun_cocos2d_Node_stopAction); + oluacls_func(L, "stopActionByTag", _olua_fun_cocos2d_Node_stopActionByTag); + oluacls_func(L, "stopActionsByFlags", _olua_fun_cocos2d_Node_stopActionsByFlags); + oluacls_func(L, "stopAllActions", _olua_fun_cocos2d_Node_stopAllActions); + oluacls_func(L, "stopAllActionsByTag", _olua_fun_cocos2d_Node_stopAllActionsByTag); + oluacls_func(L, "unschedule", _olua_fun_cocos2d_Node_unschedule); + oluacls_func(L, "unscheduleAllCallbacks", _olua_fun_cocos2d_Node_unscheduleAllCallbacks); + oluacls_func(L, "unscheduleUpdate", _olua_fun_cocos2d_Node_unscheduleUpdate); + oluacls_func(L, "update", _olua_fun_cocos2d_Node_update); + oluacls_func(L, "updateDisplayedColor", _olua_fun_cocos2d_Node_updateDisplayedColor); + oluacls_func(L, "updateDisplayedOpacity", _olua_fun_cocos2d_Node_updateDisplayedOpacity); + oluacls_func(L, "updateOrderOfArrival", _olua_fun_cocos2d_Node_updateOrderOfArrival); + oluacls_func(L, "updateTransform", _olua_fun_cocos2d_Node_updateTransform); + oluacls_func(L, "visit", _olua_fun_cocos2d_Node_visit); + oluacls_prop(L, "actionManager", _olua_fun_cocos2d_Node_getActionManager, _olua_fun_cocos2d_Node_setActionManager); + oluacls_prop(L, "alpha", _olua_fun_cocos2d_Node_getAlpha, _olua_fun_cocos2d_Node_setAlpha); + oluacls_prop(L, "anchorPoint", _olua_fun_cocos2d_Node_getAnchorPoint, _olua_fun_cocos2d_Node_setAnchorPoint); + oluacls_prop(L, "anchorPointInPoints", _olua_fun_cocos2d_Node_getAnchorPointInPoints, nullptr); + oluacls_prop(L, "anchorX", _olua_fun_cocos2d_Node_getAnchorX, _olua_fun_cocos2d_Node_setAnchorX); + oluacls_prop(L, "anchorY", _olua_fun_cocos2d_Node_getAnchorY, _olua_fun_cocos2d_Node_setAnchorY); + oluacls_prop(L, "attachedNodeCount", _olua_fun_cocos2d_Node_getAttachedNodeCount, nullptr); + oluacls_prop(L, "boundingBox", _olua_fun_cocos2d_Node_getBoundingBox, nullptr); + oluacls_prop(L, "cameraMask", _olua_fun_cocos2d_Node_getCameraMask, nullptr); + oluacls_prop(L, "cascadeColorEnabled", _olua_fun_cocos2d_Node_isCascadeColorEnabled, _olua_fun_cocos2d_Node_setCascadeColorEnabled); + oluacls_prop(L, "cascadeOpacityEnabled", _olua_fun_cocos2d_Node_isCascadeOpacityEnabled, _olua_fun_cocos2d_Node_setCascadeOpacityEnabled); + oluacls_prop(L, "children", _olua_fun_cocos2d_Node_getChildren, nullptr); + oluacls_prop(L, "childrenCount", _olua_fun_cocos2d_Node_getChildrenCount, nullptr); + oluacls_prop(L, "color", _olua_fun_cocos2d_Node_getColor, _olua_fun_cocos2d_Node_setColor); + oluacls_prop(L, "contentSize", _olua_fun_cocos2d_Node_getContentSize, _olua_fun_cocos2d_Node_setContentSize); + oluacls_prop(L, "description", _olua_fun_cocos2d_Node_getDescription, nullptr); + oluacls_prop(L, "displayedColor", _olua_fun_cocos2d_Node_getDisplayedColor, nullptr); + oluacls_prop(L, "displayedOpacity", _olua_fun_cocos2d_Node_getDisplayedOpacity, nullptr); + oluacls_prop(L, "eventDispatcher", _olua_fun_cocos2d_Node_getEventDispatcher, _olua_fun_cocos2d_Node_setEventDispatcher); + oluacls_prop(L, "globalZOrder", _olua_fun_cocos2d_Node_getGlobalZOrder, _olua_fun_cocos2d_Node_setGlobalZOrder); + oluacls_prop(L, "height", _olua_fun_cocos2d_Node_getHeight, _olua_fun_cocos2d_Node_setHeight); + oluacls_prop(L, "ignoreAnchorPointForPosition", _olua_fun_cocos2d_Node_isIgnoreAnchorPointForPosition, _olua_fun_cocos2d_Node_setIgnoreAnchorPointForPosition); + oluacls_prop(L, "localZOrder", _olua_fun_cocos2d_Node_getLocalZOrder, _olua_fun_cocos2d_Node_setLocalZOrder); + oluacls_prop(L, "name", _olua_fun_cocos2d_Node_getName, _olua_fun_cocos2d_Node_setName); + oluacls_prop(L, "nodeToWorldAffineTransform", _olua_fun_cocos2d_Node_getNodeToWorldAffineTransform, nullptr); + oluacls_prop(L, "nodeToWorldTransform", _olua_fun_cocos2d_Node_getNodeToWorldTransform, nullptr); + oluacls_prop(L, "normalizedPosition", _olua_fun_cocos2d_Node_getNormalizedPosition, _olua_fun_cocos2d_Node_setNormalizedPosition); + oluacls_prop(L, "numberOfRunningActions", _olua_fun_cocos2d_Node_getNumberOfRunningActions, nullptr); + oluacls_prop(L, "onEnterCallback", _olua_fun_cocos2d_Node_getOnEnterCallback, _olua_fun_cocos2d_Node_setOnEnterCallback); + oluacls_prop(L, "onEnterTransitionDidFinishCallback", _olua_fun_cocos2d_Node_getOnEnterTransitionDidFinishCallback, _olua_fun_cocos2d_Node_setOnEnterTransitionDidFinishCallback); + oluacls_prop(L, "onExitCallback", _olua_fun_cocos2d_Node_getOnExitCallback, _olua_fun_cocos2d_Node_setOnExitCallback); + oluacls_prop(L, "onExitTransitionDidStartCallback", _olua_fun_cocos2d_Node_getOnExitTransitionDidStartCallback, _olua_fun_cocos2d_Node_setOnExitTransitionDidStartCallback); + oluacls_prop(L, "opacity", _olua_fun_cocos2d_Node_getOpacity, _olua_fun_cocos2d_Node_setOpacity); + oluacls_prop(L, "opacityModifyRGB", _olua_fun_cocos2d_Node_isOpacityModifyRGB, _olua_fun_cocos2d_Node_setOpacityModifyRGB); + oluacls_prop(L, "parent", _olua_fun_cocos2d_Node_getParent, _olua_fun_cocos2d_Node_setParent); + oluacls_prop(L, "parentToNodeAffineTransform", _olua_fun_cocos2d_Node_getParentToNodeAffineTransform, nullptr); + oluacls_prop(L, "parentToNodeTransform", _olua_fun_cocos2d_Node_getParentToNodeTransform, nullptr); #if CC_USE_PHYSICS - oluacls_prop(L, "physicsBody", _cocos2d_Node_getPhysicsBody, _cocos2d_Node_setPhysicsBody); + oluacls_prop(L, "physicsBody", _olua_fun_cocos2d_Node_getPhysicsBody, _olua_fun_cocos2d_Node_setPhysicsBody); #endif - oluacls_prop(L, "position3D", _cocos2d_Node_getPosition3D, _cocos2d_Node_setPosition3D); - oluacls_prop(L, "positionNormalized", _cocos2d_Node_getPositionNormalized, _cocos2d_Node_setPositionNormalized); - oluacls_prop(L, "positionX", _cocos2d_Node_getPositionX, _cocos2d_Node_setPositionX); - oluacls_prop(L, "positionY", _cocos2d_Node_getPositionY, _cocos2d_Node_setPositionY); - oluacls_prop(L, "positionZ", _cocos2d_Node_getPositionZ, _cocos2d_Node_setPositionZ); - oluacls_prop(L, "programState", _cocos2d_Node_getProgramState, _cocos2d_Node_setProgramState); - oluacls_prop(L, "rotation", _cocos2d_Node_getRotation, _cocos2d_Node_setRotation); - oluacls_prop(L, "rotation3D", _cocos2d_Node_getRotation3D, _cocos2d_Node_setRotation3D); - oluacls_prop(L, "rotationQuat", _cocos2d_Node_getRotationQuat, _cocos2d_Node_setRotationQuat); - oluacls_prop(L, "rotationSkewX", _cocos2d_Node_getRotationSkewX, _cocos2d_Node_setRotationSkewX); - oluacls_prop(L, "rotationSkewY", _cocos2d_Node_getRotationSkewY, _cocos2d_Node_setRotationSkewY); - oluacls_prop(L, "running", _cocos2d_Node_isRunning, nullptr); - oluacls_prop(L, "scale", _cocos2d_Node_getScale, _cocos2d_Node_setScale); - oluacls_prop(L, "scaleX", _cocos2d_Node_getScaleX, _cocos2d_Node_setScaleX); - oluacls_prop(L, "scaleY", _cocos2d_Node_getScaleY, _cocos2d_Node_setScaleY); - oluacls_prop(L, "scaleZ", _cocos2d_Node_getScaleZ, _cocos2d_Node_setScaleZ); - oluacls_prop(L, "scene", _cocos2d_Node_getScene, nullptr); - oluacls_prop(L, "scheduler", _cocos2d_Node_getScheduler, _cocos2d_Node_setScheduler); - oluacls_prop(L, "skewX", _cocos2d_Node_getSkewX, _cocos2d_Node_setSkewX); - oluacls_prop(L, "skewY", _cocos2d_Node_getSkewY, _cocos2d_Node_setSkewY); - oluacls_prop(L, "tag", _cocos2d_Node_getTag, _cocos2d_Node_setTag); - oluacls_prop(L, "userData", _cocos2d_Node_getUserData, _cocos2d_Node_setUserData); - oluacls_prop(L, "userObject", _cocos2d_Node_getUserObject, _cocos2d_Node_setUserObject); - oluacls_prop(L, "visible", _cocos2d_Node_isVisible, _cocos2d_Node_setVisible); - oluacls_prop(L, "width", _cocos2d_Node_getWidth, _cocos2d_Node_setWidth); - oluacls_prop(L, "worldToNodeAffineTransform", _cocos2d_Node_getWorldToNodeAffineTransform, nullptr); - oluacls_prop(L, "worldToNodeTransform", _cocos2d_Node_getWorldToNodeTransform, nullptr); - oluacls_prop(L, "x", _cocos2d_Node_getPositionX, _cocos2d_Node_setPositionX); - oluacls_prop(L, "y", _cocos2d_Node_getPositionY, _cocos2d_Node_setPositionY); - oluacls_prop(L, "z", _cocos2d_Node_getPositionZ, _cocos2d_Node_setPositionZ); + oluacls_prop(L, "position3D", _olua_fun_cocos2d_Node_getPosition3D, _olua_fun_cocos2d_Node_setPosition3D); + oluacls_prop(L, "positionNormalized", _olua_fun_cocos2d_Node_getPositionNormalized, _olua_fun_cocos2d_Node_setPositionNormalized); + oluacls_prop(L, "positionX", _olua_fun_cocos2d_Node_getPositionX, _olua_fun_cocos2d_Node_setPositionX); + oluacls_prop(L, "positionY", _olua_fun_cocos2d_Node_getPositionY, _olua_fun_cocos2d_Node_setPositionY); + oluacls_prop(L, "positionZ", _olua_fun_cocos2d_Node_getPositionZ, _olua_fun_cocos2d_Node_setPositionZ); + oluacls_prop(L, "programState", _olua_fun_cocos2d_Node_getProgramState, _olua_fun_cocos2d_Node_setProgramState); + oluacls_prop(L, "rotation", _olua_fun_cocos2d_Node_getRotation, _olua_fun_cocos2d_Node_setRotation); + oluacls_prop(L, "rotation3D", _olua_fun_cocos2d_Node_getRotation3D, _olua_fun_cocos2d_Node_setRotation3D); + oluacls_prop(L, "rotationQuat", _olua_fun_cocos2d_Node_getRotationQuat, _olua_fun_cocos2d_Node_setRotationQuat); + oluacls_prop(L, "rotationSkewX", _olua_fun_cocos2d_Node_getRotationSkewX, _olua_fun_cocos2d_Node_setRotationSkewX); + oluacls_prop(L, "rotationSkewY", _olua_fun_cocos2d_Node_getRotationSkewY, _olua_fun_cocos2d_Node_setRotationSkewY); + oluacls_prop(L, "running", _olua_fun_cocos2d_Node_isRunning, nullptr); + oluacls_prop(L, "scale", _olua_fun_cocos2d_Node_getScale, nullptr); + oluacls_prop(L, "scaleX", _olua_fun_cocos2d_Node_getScaleX, _olua_fun_cocos2d_Node_setScaleX); + oluacls_prop(L, "scaleY", _olua_fun_cocos2d_Node_getScaleY, _olua_fun_cocos2d_Node_setScaleY); + oluacls_prop(L, "scaleZ", _olua_fun_cocos2d_Node_getScaleZ, _olua_fun_cocos2d_Node_setScaleZ); + oluacls_prop(L, "scene", _olua_fun_cocos2d_Node_getScene, nullptr); + oluacls_prop(L, "scheduler", _olua_fun_cocos2d_Node_getScheduler, _olua_fun_cocos2d_Node_setScheduler); + oluacls_prop(L, "skewX", _olua_fun_cocos2d_Node_getSkewX, _olua_fun_cocos2d_Node_setSkewX); + oluacls_prop(L, "skewY", _olua_fun_cocos2d_Node_getSkewY, _olua_fun_cocos2d_Node_setSkewY); + oluacls_prop(L, "tag", _olua_fun_cocos2d_Node_getTag, _olua_fun_cocos2d_Node_setTag); + oluacls_prop(L, "userData", _olua_fun_cocos2d_Node_getUserData, _olua_fun_cocos2d_Node_setUserData); + oluacls_prop(L, "userObject", _olua_fun_cocos2d_Node_getUserObject, _olua_fun_cocos2d_Node_setUserObject); + oluacls_prop(L, "visible", _olua_fun_cocos2d_Node_isVisible, _olua_fun_cocos2d_Node_setVisible); + oluacls_prop(L, "width", _olua_fun_cocos2d_Node_getWidth, _olua_fun_cocos2d_Node_setWidth); + oluacls_prop(L, "worldToNodeAffineTransform", _olua_fun_cocos2d_Node_getWorldToNodeAffineTransform, nullptr); + oluacls_prop(L, "worldToNodeTransform", _olua_fun_cocos2d_Node_getWorldToNodeTransform, nullptr); + oluacls_prop(L, "x", _olua_fun_cocos2d_Node_getPositionX, _olua_fun_cocos2d_Node_setPositionX); + oluacls_prop(L, "y", _olua_fun_cocos2d_Node_getPositionY, _olua_fun_cocos2d_Node_setPositionY); + oluacls_prop(L, "z", _olua_fun_cocos2d_Node_getPositionZ, _olua_fun_cocos2d_Node_setPositionZ); oluacls_const(L, "INVALID_TAG", cocos2d::Node::INVALID_TAG); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_Node(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.Node")) { + luaL_error(L, "class not found: cocos2d::Node"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_BlendProtocol___gc(lua_State *L) +static int _olua_fun_cocos2d_BlendProtocol___gc(lua_State *L) { olua_startinvoke(L); @@ -25517,7 +27138,7 @@ static int _cocos2d_BlendProtocol___gc(lua_State *L) return 0; } -static int _cocos2d_BlendProtocol___olua_move(lua_State *L) +static int _olua_fun_cocos2d_BlendProtocol___olua_move(lua_State *L) { olua_startinvoke(L); @@ -25529,7 +27150,7 @@ static int _cocos2d_BlendProtocol___olua_move(lua_State *L) return 1; } -static int _cocos2d_BlendProtocol_getBlendFunc(lua_State *L) +static int _olua_fun_cocos2d_BlendProtocol_getBlendFunc(lua_State *L) { olua_startinvoke(L); @@ -25546,39 +27167,48 @@ static int _cocos2d_BlendProtocol_getBlendFunc(lua_State *L) return num_ret; } -static int _cocos2d_BlendProtocol_setBlendFunc(lua_State *L) +static int _olua_fun_cocos2d_BlendProtocol_setBlendFunc(lua_State *L) { olua_startinvoke(L); cocos2d::BlendProtocol *self = nullptr; - cocos2d::BlendFunc arg1; /** blendFunc */ + cocos2d::BlendFunc *arg1; /** blendFunc */ olua_to_object(L, 1, &self, "cc.BlendProtocol"); olua_check_object(L, 2, &arg1, "cc.BlendFunc"); // void setBlendFunc(const cocos2d::BlendFunc &blendFunc) - self->setBlendFunc(arg1); + self->setBlendFunc(*arg1); olua_endinvoke(L); return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_BlendProtocol(lua_State *L) +static int _olua_cls_cc_BlendProtocol(lua_State *L) { oluacls_class(L, "cc.BlendProtocol"); - oluacls_func(L, "__gc", _cocos2d_BlendProtocol___gc); - oluacls_func(L, "__olua_move", _cocos2d_BlendProtocol___olua_move); - oluacls_func(L, "getBlendFunc", _cocos2d_BlendProtocol_getBlendFunc); - oluacls_func(L, "setBlendFunc", _cocos2d_BlendProtocol_setBlendFunc); - oluacls_prop(L, "blendFunc", _cocos2d_BlendProtocol_getBlendFunc, _cocos2d_BlendProtocol_setBlendFunc); + oluacls_func(L, "__gc", _olua_fun_cocos2d_BlendProtocol___gc); + oluacls_func(L, "__olua_move", _olua_fun_cocos2d_BlendProtocol___olua_move); + oluacls_func(L, "getBlendFunc", _olua_fun_cocos2d_BlendProtocol_getBlendFunc); + oluacls_func(L, "setBlendFunc", _olua_fun_cocos2d_BlendProtocol_setBlendFunc); + oluacls_prop(L, "blendFunc", _olua_fun_cocos2d_BlendProtocol_getBlendFunc, _olua_fun_cocos2d_BlendProtocol_setBlendFunc); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_BlendProtocol(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.BlendProtocol")) { + luaL_error(L, "class not found: cocos2d::BlendProtocol"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_TextureProtocol_getTexture(lua_State *L) +static int _olua_fun_cocos2d_TextureProtocol_getTexture(lua_State *L) { olua_startinvoke(L); @@ -25595,7 +27225,7 @@ static int _cocos2d_TextureProtocol_getTexture(lua_State *L) return num_ret; } -static int _cocos2d_TextureProtocol_setTexture(lua_State *L) +static int _olua_fun_cocos2d_TextureProtocol_setTexture(lua_State *L) { olua_startinvoke(L); @@ -25613,19 +27243,28 @@ static int _cocos2d_TextureProtocol_setTexture(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_TextureProtocol(lua_State *L) +static int _olua_cls_cc_TextureProtocol(lua_State *L) { oluacls_class(L, "cc.TextureProtocol"); - oluacls_func(L, "getTexture", _cocos2d_TextureProtocol_getTexture); - oluacls_func(L, "setTexture", _cocos2d_TextureProtocol_setTexture); - oluacls_prop(L, "texture", _cocos2d_TextureProtocol_getTexture, _cocos2d_TextureProtocol_setTexture); + oluacls_func(L, "getTexture", _olua_fun_cocos2d_TextureProtocol_getTexture); + oluacls_func(L, "setTexture", _olua_fun_cocos2d_TextureProtocol_setTexture); + oluacls_prop(L, "texture", _olua_fun_cocos2d_TextureProtocol_getTexture, _olua_fun_cocos2d_TextureProtocol_setTexture); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_TextureProtocol(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.TextureProtocol")) { + luaL_error(L, "class not found: cocos2d::TextureProtocol"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_AtlasNode_as(lua_State *L) +static int _olua_fun_cocos2d_AtlasNode_as(lua_State *L) { olua_startinvoke(L); @@ -25657,7 +27296,7 @@ static int _cocos2d_AtlasNode_as(lua_State *L) return 1; } -static int _cocos2d_AtlasNode_create(lua_State *L) +static int _olua_fun_cocos2d_AtlasNode_create(lua_State *L) { olua_startinvoke(L); @@ -25680,7 +27319,7 @@ static int _cocos2d_AtlasNode_create(lua_State *L) return num_ret; } -static int _cocos2d_AtlasNode_getBlendFunc(lua_State *L) +static int _olua_fun_cocos2d_AtlasNode_getBlendFunc(lua_State *L) { olua_startinvoke(L); @@ -25697,7 +27336,7 @@ static int _cocos2d_AtlasNode_getBlendFunc(lua_State *L) return num_ret; } -static int _cocos2d_AtlasNode_getQuadsToDraw(lua_State *L) +static int _olua_fun_cocos2d_AtlasNode_getQuadsToDraw(lua_State *L) { olua_startinvoke(L); @@ -25714,7 +27353,7 @@ static int _cocos2d_AtlasNode_getQuadsToDraw(lua_State *L) return num_ret; } -static int _cocos2d_AtlasNode_getTexture(lua_State *L) +static int _olua_fun_cocos2d_AtlasNode_getTexture(lua_State *L) { olua_startinvoke(L); @@ -25731,7 +27370,7 @@ static int _cocos2d_AtlasNode_getTexture(lua_State *L) return num_ret; } -static int _cocos2d_AtlasNode_getTextureAtlas(lua_State *L) +static int _olua_fun_cocos2d_AtlasNode_getTextureAtlas(lua_State *L) { olua_startinvoke(L); @@ -25748,7 +27387,7 @@ static int _cocos2d_AtlasNode_getTextureAtlas(lua_State *L) return num_ret; } -static int _cocos2d_AtlasNode_initWithTexture(lua_State *L) +static int _olua_fun_cocos2d_AtlasNode_initWithTexture(lua_State *L) { olua_startinvoke(L); @@ -25773,7 +27412,7 @@ static int _cocos2d_AtlasNode_initWithTexture(lua_State *L) return num_ret; } -static int _cocos2d_AtlasNode_initWithTileFile(lua_State *L) +static int _olua_fun_cocos2d_AtlasNode_initWithTileFile(lua_State *L) { olua_startinvoke(L); @@ -25798,11 +27437,11 @@ static int _cocos2d_AtlasNode_initWithTileFile(lua_State *L) return num_ret; } -static int _cocos2d_AtlasNode_new(lua_State *L) +static int _olua_fun_cocos2d_AtlasNode_new(lua_State *L) { olua_startinvoke(L); - // AtlasNode() + // cocos2d::AtlasNode() cocos2d::AtlasNode *ret = new cocos2d::AtlasNode(); int num_ret = olua_push_object(L, ret, "cc.AtlasNode"); olua_postnew(L, ret); @@ -25812,25 +27451,25 @@ static int _cocos2d_AtlasNode_new(lua_State *L) return num_ret; } -static int _cocos2d_AtlasNode_setBlendFunc(lua_State *L) +static int _olua_fun_cocos2d_AtlasNode_setBlendFunc(lua_State *L) { olua_startinvoke(L); cocos2d::AtlasNode *self = nullptr; - cocos2d::BlendFunc arg1; /** blendFunc */ + cocos2d::BlendFunc *arg1; /** blendFunc */ olua_to_object(L, 1, &self, "cc.AtlasNode"); olua_check_object(L, 2, &arg1, "cc.BlendFunc"); // void setBlendFunc(const cocos2d::BlendFunc &blendFunc) - self->setBlendFunc(arg1); + self->setBlendFunc(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_AtlasNode_setQuadsToDraw(lua_State *L) +static int _olua_fun_cocos2d_AtlasNode_setQuadsToDraw(lua_State *L) { olua_startinvoke(L); @@ -25848,7 +27487,7 @@ static int _cocos2d_AtlasNode_setQuadsToDraw(lua_State *L) return 0; } -static int _cocos2d_AtlasNode_setTexture(lua_State *L) +static int _olua_fun_cocos2d_AtlasNode_setTexture(lua_State *L) { olua_startinvoke(L); @@ -25866,7 +27505,7 @@ static int _cocos2d_AtlasNode_setTexture(lua_State *L) return 0; } -static int _cocos2d_AtlasNode_setTextureAtlas(lua_State *L) +static int _olua_fun_cocos2d_AtlasNode_setTextureAtlas(lua_State *L) { olua_startinvoke(L); @@ -25884,7 +27523,7 @@ static int _cocos2d_AtlasNode_setTextureAtlas(lua_State *L) return 0; } -static int _cocos2d_AtlasNode_updateAtlasValues(lua_State *L) +static int _olua_fun_cocos2d_AtlasNode_updateAtlasValues(lua_State *L) { olua_startinvoke(L); @@ -25900,92 +27539,43 @@ static int _cocos2d_AtlasNode_updateAtlasValues(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_AtlasNode(lua_State *L) +static int _olua_cls_cc_AtlasNode(lua_State *L) { oluacls_class(L, "cc.AtlasNode"); - oluacls_func(L, "as", _cocos2d_AtlasNode_as); - oluacls_func(L, "create", _cocos2d_AtlasNode_create); - oluacls_func(L, "getBlendFunc", _cocos2d_AtlasNode_getBlendFunc); - oluacls_func(L, "getQuadsToDraw", _cocos2d_AtlasNode_getQuadsToDraw); - oluacls_func(L, "getTexture", _cocos2d_AtlasNode_getTexture); - oluacls_func(L, "getTextureAtlas", _cocos2d_AtlasNode_getTextureAtlas); - oluacls_func(L, "initWithTexture", _cocos2d_AtlasNode_initWithTexture); - oluacls_func(L, "initWithTileFile", _cocos2d_AtlasNode_initWithTileFile); - oluacls_func(L, "new", _cocos2d_AtlasNode_new); - oluacls_func(L, "setBlendFunc", _cocos2d_AtlasNode_setBlendFunc); - oluacls_func(L, "setQuadsToDraw", _cocos2d_AtlasNode_setQuadsToDraw); - oluacls_func(L, "setTexture", _cocos2d_AtlasNode_setTexture); - oluacls_func(L, "setTextureAtlas", _cocos2d_AtlasNode_setTextureAtlas); - oluacls_func(L, "updateAtlasValues", _cocos2d_AtlasNode_updateAtlasValues); - oluacls_prop(L, "blendFunc", _cocos2d_AtlasNode_getBlendFunc, _cocos2d_AtlasNode_setBlendFunc); - oluacls_prop(L, "quadsToDraw", _cocos2d_AtlasNode_getQuadsToDraw, _cocos2d_AtlasNode_setQuadsToDraw); - oluacls_prop(L, "texture", _cocos2d_AtlasNode_getTexture, _cocos2d_AtlasNode_setTexture); - oluacls_prop(L, "textureAtlas", _cocos2d_AtlasNode_getTextureAtlas, _cocos2d_AtlasNode_setTextureAtlas); + oluacls_func(L, "as", _olua_fun_cocos2d_AtlasNode_as); + oluacls_func(L, "create", _olua_fun_cocos2d_AtlasNode_create); + oluacls_func(L, "getBlendFunc", _olua_fun_cocos2d_AtlasNode_getBlendFunc); + oluacls_func(L, "getQuadsToDraw", _olua_fun_cocos2d_AtlasNode_getQuadsToDraw); + oluacls_func(L, "getTexture", _olua_fun_cocos2d_AtlasNode_getTexture); + oluacls_func(L, "getTextureAtlas", _olua_fun_cocos2d_AtlasNode_getTextureAtlas); + oluacls_func(L, "initWithTexture", _olua_fun_cocos2d_AtlasNode_initWithTexture); + oluacls_func(L, "initWithTileFile", _olua_fun_cocos2d_AtlasNode_initWithTileFile); + oluacls_func(L, "new", _olua_fun_cocos2d_AtlasNode_new); + oluacls_func(L, "setBlendFunc", _olua_fun_cocos2d_AtlasNode_setBlendFunc); + oluacls_func(L, "setQuadsToDraw", _olua_fun_cocos2d_AtlasNode_setQuadsToDraw); + oluacls_func(L, "setTexture", _olua_fun_cocos2d_AtlasNode_setTexture); + oluacls_func(L, "setTextureAtlas", _olua_fun_cocos2d_AtlasNode_setTextureAtlas); + oluacls_func(L, "updateAtlasValues", _olua_fun_cocos2d_AtlasNode_updateAtlasValues); + oluacls_prop(L, "blendFunc", _olua_fun_cocos2d_AtlasNode_getBlendFunc, _olua_fun_cocos2d_AtlasNode_setBlendFunc); + oluacls_prop(L, "quadsToDraw", _olua_fun_cocos2d_AtlasNode_getQuadsToDraw, _olua_fun_cocos2d_AtlasNode_setQuadsToDraw); + oluacls_prop(L, "texture", _olua_fun_cocos2d_AtlasNode_getTexture, _olua_fun_cocos2d_AtlasNode_setTexture); + oluacls_prop(L, "textureAtlas", _olua_fun_cocos2d_AtlasNode_getTextureAtlas, _olua_fun_cocos2d_AtlasNode_setTextureAtlas); return 1; } -OLUA_END_DECLS -static int _cocos2d_sImageTGA___call(lua_State *L) +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_AtlasNode(lua_State *L) { - olua_startinvoke(L); - - cocos2d::sImageTGA ret; - - luaL_checktype(L, 2, LUA_TTABLE); - - int arg1 = 0; /** status */ - unsigned char arg2 = 0; /** type */ - unsigned char arg3 = 0; /** pixelDepth */ - short arg4 = 0; /** width */ - short arg5 = 0; /** height */ - unsigned char *arg6 = nullptr; /** imageData */ - int arg7 = 0; /** flipped */ - - olua_getfield(L, 2, "status"); - olua_check_integer(L, -1, &arg1); - ret.status = arg1; - lua_pop(L, 1); - - olua_getfield(L, 2, "type"); - olua_check_integer(L, -1, &arg2); - ret.type = arg2; - lua_pop(L, 1); - - olua_getfield(L, 2, "pixelDepth"); - olua_check_integer(L, -1, &arg3); - ret.pixelDepth = arg3; - lua_pop(L, 1); - - olua_getfield(L, 2, "width"); - olua_check_integer(L, -1, &arg4); - ret.width = arg4; - lua_pop(L, 1); - - olua_getfield(L, 2, "height"); - olua_check_integer(L, -1, &arg5); - ret.height = arg5; - lua_pop(L, 1); - - olua_getfield(L, 2, "imageData"); - olua_check_string(L, -1, &arg6); - ret.imageData = arg6; - lua_pop(L, 1); - - olua_getfield(L, 2, "flipped"); - olua_check_integer(L, -1, &arg7); - ret.flipped = arg7; - lua_pop(L, 1); - - olua_pushcopy_object(L, ret, "cc.sImageTGA"); - - olua_endinvoke(L); - + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.AtlasNode")) { + luaL_error(L, "class not found: cocos2d::AtlasNode"); + } return 1; } +OLUA_END_DECLS -static int _cocos2d_sImageTGA___gc(lua_State *L) +static int _olua_fun_cocos2d_sImageTGA___gc(lua_State *L) { olua_startinvoke(L); @@ -25997,7 +27587,7 @@ static int _cocos2d_sImageTGA___gc(lua_State *L) return 0; } -static int _cocos2d_sImageTGA___olua_move(lua_State *L) +static int _olua_fun_cocos2d_sImageTGA___olua_move(lua_State *L) { olua_startinvoke(L); @@ -26009,7 +27599,7 @@ static int _cocos2d_sImageTGA___olua_move(lua_State *L) return 1; } -static int _cocos2d_sImageTGA_get_flipped(lua_State *L) +static int _olua_fun_cocos2d_sImageTGA_flipped$1(lua_State *L) { olua_startinvoke(L); @@ -26026,7 +27616,7 @@ static int _cocos2d_sImageTGA_get_flipped(lua_State *L) return num_ret; } -static int _cocos2d_sImageTGA_set_flipped(lua_State *L) +static int _olua_fun_cocos2d_sImageTGA_flipped$2(lua_State *L) { olua_startinvoke(L); @@ -26044,7 +27634,28 @@ static int _cocos2d_sImageTGA_set_flipped(lua_State *L) return 0; } -static int _cocos2d_sImageTGA_get_height(lua_State *L) +static int _olua_fun_cocos2d_sImageTGA_flipped(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // int flipped + return _olua_fun_cocos2d_sImageTGA_flipped$1(L); + } + + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // int flipped + return _olua_fun_cocos2d_sImageTGA_flipped$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::sImageTGA::flipped' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_sImageTGA_height$1(lua_State *L) { olua_startinvoke(L); @@ -26061,7 +27672,7 @@ static int _cocos2d_sImageTGA_get_height(lua_State *L) return num_ret; } -static int _cocos2d_sImageTGA_set_height(lua_State *L) +static int _olua_fun_cocos2d_sImageTGA_height$2(lua_State *L) { olua_startinvoke(L); @@ -26079,7 +27690,28 @@ static int _cocos2d_sImageTGA_set_height(lua_State *L) return 0; } -static int _cocos2d_sImageTGA_get_imageData(lua_State *L) +static int _olua_fun_cocos2d_sImageTGA_height(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // short height + return _olua_fun_cocos2d_sImageTGA_height$1(L); + } + + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // short height + return _olua_fun_cocos2d_sImageTGA_height$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::sImageTGA::height' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_sImageTGA_imageData$1(lua_State *L) { olua_startinvoke(L); @@ -26096,7 +27728,7 @@ static int _cocos2d_sImageTGA_get_imageData(lua_State *L) return num_ret; } -static int _cocos2d_sImageTGA_set_imageData(lua_State *L) +static int _olua_fun_cocos2d_sImageTGA_imageData$2(lua_State *L) { olua_startinvoke(L); @@ -26114,7 +27746,28 @@ static int _cocos2d_sImageTGA_set_imageData(lua_State *L) return 0; } -static int _cocos2d_sImageTGA_get_pixelDepth(lua_State *L) +static int _olua_fun_cocos2d_sImageTGA_imageData(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // unsigned char *imageData + return _olua_fun_cocos2d_sImageTGA_imageData$1(L); + } + + if (num_args == 1) { + // if ((olua_is_string(L, 2))) { + // unsigned char *imageData + return _olua_fun_cocos2d_sImageTGA_imageData$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::sImageTGA::imageData' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_sImageTGA_pixelDepth$1(lua_State *L) { olua_startinvoke(L); @@ -26131,7 +27784,7 @@ static int _cocos2d_sImageTGA_get_pixelDepth(lua_State *L) return num_ret; } -static int _cocos2d_sImageTGA_set_pixelDepth(lua_State *L) +static int _olua_fun_cocos2d_sImageTGA_pixelDepth$2(lua_State *L) { olua_startinvoke(L); @@ -26149,7 +27802,28 @@ static int _cocos2d_sImageTGA_set_pixelDepth(lua_State *L) return 0; } -static int _cocos2d_sImageTGA_get_status(lua_State *L) +static int _olua_fun_cocos2d_sImageTGA_pixelDepth(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // unsigned char pixelDepth + return _olua_fun_cocos2d_sImageTGA_pixelDepth$1(L); + } + + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // unsigned char pixelDepth + return _olua_fun_cocos2d_sImageTGA_pixelDepth$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::sImageTGA::pixelDepth' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_sImageTGA_status$1(lua_State *L) { olua_startinvoke(L); @@ -26166,7 +27840,7 @@ static int _cocos2d_sImageTGA_get_status(lua_State *L) return num_ret; } -static int _cocos2d_sImageTGA_set_status(lua_State *L) +static int _olua_fun_cocos2d_sImageTGA_status$2(lua_State *L) { olua_startinvoke(L); @@ -26184,7 +27858,28 @@ static int _cocos2d_sImageTGA_set_status(lua_State *L) return 0; } -static int _cocos2d_sImageTGA_get_type(lua_State *L) +static int _olua_fun_cocos2d_sImageTGA_status(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // int status + return _olua_fun_cocos2d_sImageTGA_status$1(L); + } + + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // int status + return _olua_fun_cocos2d_sImageTGA_status$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::sImageTGA::status' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_sImageTGA_type$1(lua_State *L) { olua_startinvoke(L); @@ -26201,7 +27896,7 @@ static int _cocos2d_sImageTGA_get_type(lua_State *L) return num_ret; } -static int _cocos2d_sImageTGA_set_type(lua_State *L) +static int _olua_fun_cocos2d_sImageTGA_type$2(lua_State *L) { olua_startinvoke(L); @@ -26219,7 +27914,28 @@ static int _cocos2d_sImageTGA_set_type(lua_State *L) return 0; } -static int _cocos2d_sImageTGA_get_width(lua_State *L) +static int _olua_fun_cocos2d_sImageTGA_type(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // unsigned char type + return _olua_fun_cocos2d_sImageTGA_type$1(L); + } + + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // unsigned char type + return _olua_fun_cocos2d_sImageTGA_type$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::sImageTGA::type' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_sImageTGA_width$1(lua_State *L) { olua_startinvoke(L); @@ -26236,7 +27952,7 @@ static int _cocos2d_sImageTGA_get_width(lua_State *L) return num_ret; } -static int _cocos2d_sImageTGA_set_width(lua_State *L) +static int _olua_fun_cocos2d_sImageTGA_width$2(lua_State *L) { olua_startinvoke(L); @@ -26254,26 +27970,55 @@ static int _cocos2d_sImageTGA_set_width(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_sImageTGA(lua_State *L) +static int _olua_fun_cocos2d_sImageTGA_width(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // short width + return _olua_fun_cocos2d_sImageTGA_width$1(L); + } + + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // short width + return _olua_fun_cocos2d_sImageTGA_width$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::sImageTGA::width' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_cls_cc_sImageTGA(lua_State *L) { oluacls_class(L, "cc.sImageTGA"); - oluacls_func(L, "__call", _cocos2d_sImageTGA___call); - oluacls_func(L, "__gc", _cocos2d_sImageTGA___gc); - oluacls_func(L, "__olua_move", _cocos2d_sImageTGA___olua_move); - oluacls_prop(L, "flipped", _cocos2d_sImageTGA_get_flipped, _cocos2d_sImageTGA_set_flipped); - oluacls_prop(L, "height", _cocos2d_sImageTGA_get_height, _cocos2d_sImageTGA_set_height); - oluacls_prop(L, "imageData", _cocos2d_sImageTGA_get_imageData, _cocos2d_sImageTGA_set_imageData); - oluacls_prop(L, "pixelDepth", _cocos2d_sImageTGA_get_pixelDepth, _cocos2d_sImageTGA_set_pixelDepth); - oluacls_prop(L, "status", _cocos2d_sImageTGA_get_status, _cocos2d_sImageTGA_set_status); - oluacls_prop(L, "type", _cocos2d_sImageTGA_get_type, _cocos2d_sImageTGA_set_type); - oluacls_prop(L, "width", _cocos2d_sImageTGA_get_width, _cocos2d_sImageTGA_set_width); + oluacls_func(L, "__gc", _olua_fun_cocos2d_sImageTGA___gc); + oluacls_func(L, "__olua_move", _olua_fun_cocos2d_sImageTGA___olua_move); + oluacls_prop(L, "flipped", _olua_fun_cocos2d_sImageTGA_flipped, _olua_fun_cocos2d_sImageTGA_flipped); + oluacls_prop(L, "height", _olua_fun_cocos2d_sImageTGA_height, _olua_fun_cocos2d_sImageTGA_height); + oluacls_prop(L, "imageData", _olua_fun_cocos2d_sImageTGA_imageData, _olua_fun_cocos2d_sImageTGA_imageData); + oluacls_prop(L, "pixelDepth", _olua_fun_cocos2d_sImageTGA_pixelDepth, _olua_fun_cocos2d_sImageTGA_pixelDepth); + oluacls_prop(L, "status", _olua_fun_cocos2d_sImageTGA_status, _olua_fun_cocos2d_sImageTGA_status); + oluacls_prop(L, "type", _olua_fun_cocos2d_sImageTGA_type, _olua_fun_cocos2d_sImageTGA_type); + oluacls_prop(L, "width", _olua_fun_cocos2d_sImageTGA_width, _olua_fun_cocos2d_sImageTGA_width); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_sImageTGA(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.sImageTGA")) { + luaL_error(L, "class not found: cocos2d::sImageTGA"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_TileMapAtlas_create(lua_State *L) +static int _olua_fun_cocos2d_TileMapAtlas_create(lua_State *L) { olua_startinvoke(L); @@ -26296,7 +28041,7 @@ static int _cocos2d_TileMapAtlas_create(lua_State *L) return num_ret; } -static int _cocos2d_TileMapAtlas_getTGAInfo(lua_State *L) +static int _olua_fun_cocos2d_TileMapAtlas_getTGAInfo(lua_State *L) { olua_startinvoke(L); @@ -26313,18 +28058,18 @@ static int _cocos2d_TileMapAtlas_getTGAInfo(lua_State *L) return num_ret; } -static int _cocos2d_TileMapAtlas_getTileAt(lua_State *L) +static int _olua_fun_cocos2d_TileMapAtlas_getTileAt(lua_State *L) { olua_startinvoke(L); cocos2d::TileMapAtlas *self = nullptr; - cocos2d::Vec2 arg1; /** position */ + cocos2d::Vec2 *arg1; /** position */ olua_to_object(L, 1, &self, "cc.TileMapAtlas"); olua_check_object(L, 2, &arg1, "cc.Vec2"); // cocos2d::Color3B getTileAt(const cocos2d::Vec2 &position) - cocos2d::Color3B ret = self->getTileAt(arg1); + cocos2d::Color3B ret = self->getTileAt(*arg1); int num_ret = olua_push_cocos2d_Color3B(L, ret); olua_endinvoke(L); @@ -26332,7 +28077,7 @@ static int _cocos2d_TileMapAtlas_getTileAt(lua_State *L) return num_ret; } -static int _cocos2d_TileMapAtlas_initWithTileFile(lua_State *L) +static int _olua_fun_cocos2d_TileMapAtlas_initWithTileFile(lua_State *L) { olua_startinvoke(L); @@ -26357,11 +28102,11 @@ static int _cocos2d_TileMapAtlas_initWithTileFile(lua_State *L) return num_ret; } -static int _cocos2d_TileMapAtlas_new(lua_State *L) +static int _olua_fun_cocos2d_TileMapAtlas_new(lua_State *L) { olua_startinvoke(L); - // TileMapAtlas() + // cocos2d::TileMapAtlas() cocos2d::TileMapAtlas *ret = new cocos2d::TileMapAtlas(); int num_ret = olua_push_object(L, ret, "cc.TileMapAtlas"); olua_postnew(L, ret); @@ -26371,7 +28116,7 @@ static int _cocos2d_TileMapAtlas_new(lua_State *L) return num_ret; } -static int _cocos2d_TileMapAtlas_releaseMap(lua_State *L) +static int _olua_fun_cocos2d_TileMapAtlas_releaseMap(lua_State *L) { olua_startinvoke(L); @@ -26387,7 +28132,7 @@ static int _cocos2d_TileMapAtlas_releaseMap(lua_State *L) return 0; } -static int _cocos2d_TileMapAtlas_setTGAInfo(lua_State *L) +static int _olua_fun_cocos2d_TileMapAtlas_setTGAInfo(lua_State *L) { olua_startinvoke(L); @@ -26405,45 +28150,54 @@ static int _cocos2d_TileMapAtlas_setTGAInfo(lua_State *L) return 0; } -static int _cocos2d_TileMapAtlas_setTile(lua_State *L) +static int _olua_fun_cocos2d_TileMapAtlas_setTile(lua_State *L) { olua_startinvoke(L); cocos2d::TileMapAtlas *self = nullptr; cocos2d::Color3B arg1; /** tile */ - cocos2d::Vec2 arg2; /** position */ + cocos2d::Vec2 *arg2; /** position */ olua_to_object(L, 1, &self, "cc.TileMapAtlas"); olua_check_cocos2d_Color3B(L, 2, &arg1); olua_check_object(L, 3, &arg2, "cc.Vec2"); // void setTile(const cocos2d::Color3B &tile, const cocos2d::Vec2 &position) - self->setTile(arg1, arg2); + self->setTile(arg1, *arg2); olua_endinvoke(L); return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_TileMapAtlas(lua_State *L) +static int _olua_cls_cc_TileMapAtlas(lua_State *L) { oluacls_class(L, "cc.TileMapAtlas"); - oluacls_func(L, "create", _cocos2d_TileMapAtlas_create); - oluacls_func(L, "getTGAInfo", _cocos2d_TileMapAtlas_getTGAInfo); - oluacls_func(L, "getTileAt", _cocos2d_TileMapAtlas_getTileAt); - oluacls_func(L, "initWithTileFile", _cocos2d_TileMapAtlas_initWithTileFile); - oluacls_func(L, "new", _cocos2d_TileMapAtlas_new); - oluacls_func(L, "releaseMap", _cocos2d_TileMapAtlas_releaseMap); - oluacls_func(L, "setTGAInfo", _cocos2d_TileMapAtlas_setTGAInfo); - oluacls_func(L, "setTile", _cocos2d_TileMapAtlas_setTile); - oluacls_prop(L, "tgaInfo", _cocos2d_TileMapAtlas_getTGAInfo, _cocos2d_TileMapAtlas_setTGAInfo); + oluacls_func(L, "create", _olua_fun_cocos2d_TileMapAtlas_create); + oluacls_func(L, "getTGAInfo", _olua_fun_cocos2d_TileMapAtlas_getTGAInfo); + oluacls_func(L, "getTileAt", _olua_fun_cocos2d_TileMapAtlas_getTileAt); + oluacls_func(L, "initWithTileFile", _olua_fun_cocos2d_TileMapAtlas_initWithTileFile); + oluacls_func(L, "new", _olua_fun_cocos2d_TileMapAtlas_new); + oluacls_func(L, "releaseMap", _olua_fun_cocos2d_TileMapAtlas_releaseMap); + oluacls_func(L, "setTGAInfo", _olua_fun_cocos2d_TileMapAtlas_setTGAInfo); + oluacls_func(L, "setTile", _olua_fun_cocos2d_TileMapAtlas_setTile); + oluacls_prop(L, "tgaInfo", _olua_fun_cocos2d_TileMapAtlas_getTGAInfo, _olua_fun_cocos2d_TileMapAtlas_setTGAInfo); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_TileMapAtlas(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.TileMapAtlas")) { + luaL_error(L, "class not found: cocos2d::TileMapAtlas"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_ClippingNode_create$1(lua_State *L) +static int _olua_fun_cocos2d_ClippingNode_create$1(lua_State *L) { olua_startinvoke(L); @@ -26456,7 +28210,7 @@ static int _cocos2d_ClippingNode_create$1(lua_State *L) return num_ret; } -static int _cocos2d_ClippingNode_create$2(lua_State *L) +static int _olua_fun_cocos2d_ClippingNode_create$2(lua_State *L) { olua_startinvoke(L); @@ -26473,19 +28227,19 @@ static int _cocos2d_ClippingNode_create$2(lua_State *L) return num_ret; } -static int _cocos2d_ClippingNode_create(lua_State *L) +static int _olua_fun_cocos2d_ClippingNode_create(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 0) { // static cocos2d::ClippingNode *create() - return _cocos2d_ClippingNode_create$1(L); + return _olua_fun_cocos2d_ClippingNode_create$1(L); } if (num_args == 1) { // if ((olua_is_object(L, 1, "cc.Node"))) { // static cocos2d::ClippingNode *create(cocos2d::Node *stencil) - return _cocos2d_ClippingNode_create$2(L); + return _olua_fun_cocos2d_ClippingNode_create$2(L); // } } @@ -26494,7 +28248,7 @@ static int _cocos2d_ClippingNode_create(lua_State *L) return 0; } -static int _cocos2d_ClippingNode_getAlphaThreshold(lua_State *L) +static int _olua_fun_cocos2d_ClippingNode_getAlphaThreshold(lua_State *L) { olua_startinvoke(L); @@ -26511,7 +28265,7 @@ static int _cocos2d_ClippingNode_getAlphaThreshold(lua_State *L) return num_ret; } -static int _cocos2d_ClippingNode_getStencil(lua_State *L) +static int _olua_fun_cocos2d_ClippingNode_getStencil(lua_State *L) { olua_startinvoke(L); @@ -26528,7 +28282,7 @@ static int _cocos2d_ClippingNode_getStencil(lua_State *L) return num_ret; } -static int _cocos2d_ClippingNode_hasContent(lua_State *L) +static int _olua_fun_cocos2d_ClippingNode_hasContent(lua_State *L) { olua_startinvoke(L); @@ -26545,7 +28299,7 @@ static int _cocos2d_ClippingNode_hasContent(lua_State *L) return num_ret; } -static int _cocos2d_ClippingNode_init$1(lua_State *L) +static int _olua_fun_cocos2d_ClippingNode_init$1(lua_State *L) { olua_startinvoke(L); @@ -26562,7 +28316,7 @@ static int _cocos2d_ClippingNode_init$1(lua_State *L) return num_ret; } -static int _cocos2d_ClippingNode_init$2(lua_State *L) +static int _olua_fun_cocos2d_ClippingNode_init$2(lua_State *L) { olua_startinvoke(L); @@ -26581,19 +28335,19 @@ static int _cocos2d_ClippingNode_init$2(lua_State *L) return num_ret; } -static int _cocos2d_ClippingNode_init(lua_State *L) +static int _olua_fun_cocos2d_ClippingNode_init(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 0) { // @using bool init() - return _cocos2d_ClippingNode_init$1(L); + return _olua_fun_cocos2d_ClippingNode_init$1(L); } if (num_args == 1) { // if ((olua_is_object(L, 2, "cc.Node"))) { // bool init(cocos2d::Node *stencil) - return _cocos2d_ClippingNode_init$2(L); + return _olua_fun_cocos2d_ClippingNode_init$2(L); // } } @@ -26602,7 +28356,7 @@ static int _cocos2d_ClippingNode_init(lua_State *L) return 0; } -static int _cocos2d_ClippingNode_isInverted(lua_State *L) +static int _olua_fun_cocos2d_ClippingNode_isInverted(lua_State *L) { olua_startinvoke(L); @@ -26619,11 +28373,11 @@ static int _cocos2d_ClippingNode_isInverted(lua_State *L) return num_ret; } -static int _cocos2d_ClippingNode_new(lua_State *L) +static int _olua_fun_cocos2d_ClippingNode_new(lua_State *L) { olua_startinvoke(L); - // ClippingNode() + // cocos2d::ClippingNode() cocos2d::ClippingNode *ret = new cocos2d::ClippingNode(); int num_ret = olua_push_object(L, ret, "cc.ClippingNode"); olua_postnew(L, ret); @@ -26633,7 +28387,7 @@ static int _cocos2d_ClippingNode_new(lua_State *L) return num_ret; } -static int _cocos2d_ClippingNode_setAlphaThreshold(lua_State *L) +static int _olua_fun_cocos2d_ClippingNode_setAlphaThreshold(lua_State *L) { olua_startinvoke(L); @@ -26651,7 +28405,7 @@ static int _cocos2d_ClippingNode_setAlphaThreshold(lua_State *L) return 0; } -static int _cocos2d_ClippingNode_setInverted(lua_State *L) +static int _olua_fun_cocos2d_ClippingNode_setInverted(lua_State *L) { olua_startinvoke(L); @@ -26669,7 +28423,7 @@ static int _cocos2d_ClippingNode_setInverted(lua_State *L) return 0; } -static int _cocos2d_ClippingNode_setStencil(lua_State *L) +static int _olua_fun_cocos2d_ClippingNode_setStencil(lua_State *L) { olua_startinvoke(L); @@ -26687,29 +28441,38 @@ static int _cocos2d_ClippingNode_setStencil(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ClippingNode(lua_State *L) +static int _olua_cls_cc_ClippingNode(lua_State *L) { oluacls_class(L, "cc.ClippingNode"); - oluacls_func(L, "create", _cocos2d_ClippingNode_create); - oluacls_func(L, "getAlphaThreshold", _cocos2d_ClippingNode_getAlphaThreshold); - oluacls_func(L, "getStencil", _cocos2d_ClippingNode_getStencil); - oluacls_func(L, "hasContent", _cocos2d_ClippingNode_hasContent); - oluacls_func(L, "init", _cocos2d_ClippingNode_init); - oluacls_func(L, "isInverted", _cocos2d_ClippingNode_isInverted); - oluacls_func(L, "new", _cocos2d_ClippingNode_new); - oluacls_func(L, "setAlphaThreshold", _cocos2d_ClippingNode_setAlphaThreshold); - oluacls_func(L, "setInverted", _cocos2d_ClippingNode_setInverted); - oluacls_func(L, "setStencil", _cocos2d_ClippingNode_setStencil); - oluacls_prop(L, "alphaThreshold", _cocos2d_ClippingNode_getAlphaThreshold, _cocos2d_ClippingNode_setAlphaThreshold); - oluacls_prop(L, "inverted", _cocos2d_ClippingNode_isInverted, _cocos2d_ClippingNode_setInverted); - oluacls_prop(L, "stencil", _cocos2d_ClippingNode_getStencil, _cocos2d_ClippingNode_setStencil); + oluacls_func(L, "create", _olua_fun_cocos2d_ClippingNode_create); + oluacls_func(L, "getAlphaThreshold", _olua_fun_cocos2d_ClippingNode_getAlphaThreshold); + oluacls_func(L, "getStencil", _olua_fun_cocos2d_ClippingNode_getStencil); + oluacls_func(L, "hasContent", _olua_fun_cocos2d_ClippingNode_hasContent); + oluacls_func(L, "init", _olua_fun_cocos2d_ClippingNode_init); + oluacls_func(L, "isInverted", _olua_fun_cocos2d_ClippingNode_isInverted); + oluacls_func(L, "new", _olua_fun_cocos2d_ClippingNode_new); + oluacls_func(L, "setAlphaThreshold", _olua_fun_cocos2d_ClippingNode_setAlphaThreshold); + oluacls_func(L, "setInverted", _olua_fun_cocos2d_ClippingNode_setInverted); + oluacls_func(L, "setStencil", _olua_fun_cocos2d_ClippingNode_setStencil); + oluacls_prop(L, "alphaThreshold", _olua_fun_cocos2d_ClippingNode_getAlphaThreshold, _olua_fun_cocos2d_ClippingNode_setAlphaThreshold); + oluacls_prop(L, "inverted", _olua_fun_cocos2d_ClippingNode_isInverted, _olua_fun_cocos2d_ClippingNode_setInverted); + oluacls_prop(L, "stencil", _olua_fun_cocos2d_ClippingNode_getStencil, _olua_fun_cocos2d_ClippingNode_setStencil); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_ClippingNode(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.ClippingNode")) { + luaL_error(L, "class not found: cocos2d::ClippingNode"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_MotionStreak_as(lua_State *L) +static int _olua_fun_cocos2d_MotionStreak_as(lua_State *L) { olua_startinvoke(L); @@ -26741,7 +28504,7 @@ static int _cocos2d_MotionStreak_as(lua_State *L) return 1; } -static int _cocos2d_MotionStreak_create$1(lua_State *L) +static int _olua_fun_cocos2d_MotionStreak_create$1(lua_State *L) { olua_startinvoke(L); @@ -26766,7 +28529,7 @@ static int _cocos2d_MotionStreak_create$1(lua_State *L) return num_ret; } -static int _cocos2d_MotionStreak_create$2(lua_State *L) +static int _olua_fun_cocos2d_MotionStreak_create$2(lua_State *L) { olua_startinvoke(L); @@ -26791,19 +28554,19 @@ static int _cocos2d_MotionStreak_create$2(lua_State *L) return num_ret; } -static int _cocos2d_MotionStreak_create(lua_State *L) +static int _olua_fun_cocos2d_MotionStreak_create(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 5) { if ((olua_is_number(L, 1)) && (olua_is_number(L, 2)) && (olua_is_number(L, 3)) && (olua_is_cocos2d_Color3B(L, 4)) && (olua_is_string(L, 5))) { // static cocos2d::MotionStreak *create(float timeToFade, float minSeg, float strokeWidth, const cocos2d::Color3B &strokeColor, const std::string &imagePath) - return _cocos2d_MotionStreak_create$1(L); + return _olua_fun_cocos2d_MotionStreak_create$1(L); } // if ((olua_is_number(L, 1)) && (olua_is_number(L, 2)) && (olua_is_number(L, 3)) && (olua_is_cocos2d_Color3B(L, 4)) && (olua_is_object(L, 5, "cc.Texture2D"))) { // static cocos2d::MotionStreak *create(float timeToFade, float minSeg, float strokeWidth, const cocos2d::Color3B &strokeColor, cocos2d::Texture2D *texture) - return _cocos2d_MotionStreak_create$2(L); + return _olua_fun_cocos2d_MotionStreak_create$2(L); // } } @@ -26812,7 +28575,7 @@ static int _cocos2d_MotionStreak_create(lua_State *L) return 0; } -static int _cocos2d_MotionStreak_getBlendFunc(lua_State *L) +static int _olua_fun_cocos2d_MotionStreak_getBlendFunc(lua_State *L) { olua_startinvoke(L); @@ -26829,7 +28592,7 @@ static int _cocos2d_MotionStreak_getBlendFunc(lua_State *L) return num_ret; } -static int _cocos2d_MotionStreak_getStroke(lua_State *L) +static int _olua_fun_cocos2d_MotionStreak_getStroke(lua_State *L) { olua_startinvoke(L); @@ -26846,7 +28609,7 @@ static int _cocos2d_MotionStreak_getStroke(lua_State *L) return num_ret; } -static int _cocos2d_MotionStreak_getTexture(lua_State *L) +static int _olua_fun_cocos2d_MotionStreak_getTexture(lua_State *L) { olua_startinvoke(L); @@ -26863,7 +28626,7 @@ static int _cocos2d_MotionStreak_getTexture(lua_State *L) return num_ret; } -static int _cocos2d_MotionStreak_initWithFade$1(lua_State *L) +static int _olua_fun_cocos2d_MotionStreak_initWithFade$1(lua_State *L) { olua_startinvoke(L); @@ -26890,7 +28653,7 @@ static int _cocos2d_MotionStreak_initWithFade$1(lua_State *L) return num_ret; } -static int _cocos2d_MotionStreak_initWithFade$2(lua_State *L) +static int _olua_fun_cocos2d_MotionStreak_initWithFade$2(lua_State *L) { olua_startinvoke(L); @@ -26917,19 +28680,19 @@ static int _cocos2d_MotionStreak_initWithFade$2(lua_State *L) return num_ret; } -static int _cocos2d_MotionStreak_initWithFade(lua_State *L) +static int _olua_fun_cocos2d_MotionStreak_initWithFade(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 5) { if ((olua_is_number(L, 2)) && (olua_is_number(L, 3)) && (olua_is_number(L, 4)) && (olua_is_cocos2d_Color3B(L, 5)) && (olua_is_string(L, 6))) { // bool initWithFade(float fade, float minSeg, float stroke, const cocos2d::Color3B &color, const std::string &path) - return _cocos2d_MotionStreak_initWithFade$1(L); + return _olua_fun_cocos2d_MotionStreak_initWithFade$1(L); } // if ((olua_is_number(L, 2)) && (olua_is_number(L, 3)) && (olua_is_number(L, 4)) && (olua_is_cocos2d_Color3B(L, 5)) && (olua_is_object(L, 6, "cc.Texture2D"))) { // bool initWithFade(float fade, float minSeg, float stroke, const cocos2d::Color3B &color, cocos2d::Texture2D *texture) - return _cocos2d_MotionStreak_initWithFade$2(L); + return _olua_fun_cocos2d_MotionStreak_initWithFade$2(L); // } } @@ -26938,7 +28701,7 @@ static int _cocos2d_MotionStreak_initWithFade(lua_State *L) return 0; } -static int _cocos2d_MotionStreak_isFastMode(lua_State *L) +static int _olua_fun_cocos2d_MotionStreak_isFastMode(lua_State *L) { olua_startinvoke(L); @@ -26955,7 +28718,7 @@ static int _cocos2d_MotionStreak_isFastMode(lua_State *L) return num_ret; } -static int _cocos2d_MotionStreak_isStartingPositionInitialized(lua_State *L) +static int _olua_fun_cocos2d_MotionStreak_isStartingPositionInitialized(lua_State *L) { olua_startinvoke(L); @@ -26972,11 +28735,11 @@ static int _cocos2d_MotionStreak_isStartingPositionInitialized(lua_State *L) return num_ret; } -static int _cocos2d_MotionStreak_new(lua_State *L) +static int _olua_fun_cocos2d_MotionStreak_new(lua_State *L) { olua_startinvoke(L); - // MotionStreak() + // cocos2d::MotionStreak() cocos2d::MotionStreak *ret = new cocos2d::MotionStreak(); int num_ret = olua_push_object(L, ret, "cc.MotionStreak"); olua_postnew(L, ret); @@ -26986,7 +28749,7 @@ static int _cocos2d_MotionStreak_new(lua_State *L) return num_ret; } -static int _cocos2d_MotionStreak_reset(lua_State *L) +static int _olua_fun_cocos2d_MotionStreak_reset(lua_State *L) { olua_startinvoke(L); @@ -27002,25 +28765,25 @@ static int _cocos2d_MotionStreak_reset(lua_State *L) return 0; } -static int _cocos2d_MotionStreak_setBlendFunc(lua_State *L) +static int _olua_fun_cocos2d_MotionStreak_setBlendFunc(lua_State *L) { olua_startinvoke(L); cocos2d::MotionStreak *self = nullptr; - cocos2d::BlendFunc arg1; /** blendFunc */ + cocos2d::BlendFunc *arg1; /** blendFunc */ olua_to_object(L, 1, &self, "cc.MotionStreak"); olua_check_object(L, 2, &arg1, "cc.BlendFunc"); // void setBlendFunc(const cocos2d::BlendFunc &blendFunc) - self->setBlendFunc(arg1); + self->setBlendFunc(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_MotionStreak_setFastMode(lua_State *L) +static int _olua_fun_cocos2d_MotionStreak_setFastMode(lua_State *L) { olua_startinvoke(L); @@ -27038,7 +28801,7 @@ static int _cocos2d_MotionStreak_setFastMode(lua_State *L) return 0; } -static int _cocos2d_MotionStreak_setStartingPositionInitialized(lua_State *L) +static int _olua_fun_cocos2d_MotionStreak_setStartingPositionInitialized(lua_State *L) { olua_startinvoke(L); @@ -27056,7 +28819,7 @@ static int _cocos2d_MotionStreak_setStartingPositionInitialized(lua_State *L) return 0; } -static int _cocos2d_MotionStreak_setStroke(lua_State *L) +static int _olua_fun_cocos2d_MotionStreak_setStroke(lua_State *L) { olua_startinvoke(L); @@ -27074,7 +28837,7 @@ static int _cocos2d_MotionStreak_setStroke(lua_State *L) return 0; } -static int _cocos2d_MotionStreak_setTexture(lua_State *L) +static int _olua_fun_cocos2d_MotionStreak_setTexture(lua_State *L) { olua_startinvoke(L); @@ -27092,7 +28855,7 @@ static int _cocos2d_MotionStreak_setTexture(lua_State *L) return 0; } -static int _cocos2d_MotionStreak_tintWithColor(lua_State *L) +static int _olua_fun_cocos2d_MotionStreak_tintWithColor(lua_State *L) { olua_startinvoke(L); @@ -27110,37 +28873,46 @@ static int _cocos2d_MotionStreak_tintWithColor(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_MotionStreak(lua_State *L) +static int _olua_cls_cc_MotionStreak(lua_State *L) { oluacls_class(L, "cc.MotionStreak"); - oluacls_func(L, "as", _cocos2d_MotionStreak_as); - oluacls_func(L, "create", _cocos2d_MotionStreak_create); - oluacls_func(L, "getBlendFunc", _cocos2d_MotionStreak_getBlendFunc); - oluacls_func(L, "getStroke", _cocos2d_MotionStreak_getStroke); - oluacls_func(L, "getTexture", _cocos2d_MotionStreak_getTexture); - oluacls_func(L, "initWithFade", _cocos2d_MotionStreak_initWithFade); - oluacls_func(L, "isFastMode", _cocos2d_MotionStreak_isFastMode); - oluacls_func(L, "isStartingPositionInitialized", _cocos2d_MotionStreak_isStartingPositionInitialized); - oluacls_func(L, "new", _cocos2d_MotionStreak_new); - oluacls_func(L, "reset", _cocos2d_MotionStreak_reset); - oluacls_func(L, "setBlendFunc", _cocos2d_MotionStreak_setBlendFunc); - oluacls_func(L, "setFastMode", _cocos2d_MotionStreak_setFastMode); - oluacls_func(L, "setStartingPositionInitialized", _cocos2d_MotionStreak_setStartingPositionInitialized); - oluacls_func(L, "setStroke", _cocos2d_MotionStreak_setStroke); - oluacls_func(L, "setTexture", _cocos2d_MotionStreak_setTexture); - oluacls_func(L, "tintWithColor", _cocos2d_MotionStreak_tintWithColor); - oluacls_prop(L, "blendFunc", _cocos2d_MotionStreak_getBlendFunc, _cocos2d_MotionStreak_setBlendFunc); - oluacls_prop(L, "fastMode", _cocos2d_MotionStreak_isFastMode, _cocos2d_MotionStreak_setFastMode); - oluacls_prop(L, "startingPositionInitialized", _cocos2d_MotionStreak_isStartingPositionInitialized, _cocos2d_MotionStreak_setStartingPositionInitialized); - oluacls_prop(L, "stroke", _cocos2d_MotionStreak_getStroke, _cocos2d_MotionStreak_setStroke); - oluacls_prop(L, "texture", _cocos2d_MotionStreak_getTexture, _cocos2d_MotionStreak_setTexture); + oluacls_func(L, "as", _olua_fun_cocos2d_MotionStreak_as); + oluacls_func(L, "create", _olua_fun_cocos2d_MotionStreak_create); + oluacls_func(L, "getBlendFunc", _olua_fun_cocos2d_MotionStreak_getBlendFunc); + oluacls_func(L, "getStroke", _olua_fun_cocos2d_MotionStreak_getStroke); + oluacls_func(L, "getTexture", _olua_fun_cocos2d_MotionStreak_getTexture); + oluacls_func(L, "initWithFade", _olua_fun_cocos2d_MotionStreak_initWithFade); + oluacls_func(L, "isFastMode", _olua_fun_cocos2d_MotionStreak_isFastMode); + oluacls_func(L, "isStartingPositionInitialized", _olua_fun_cocos2d_MotionStreak_isStartingPositionInitialized); + oluacls_func(L, "new", _olua_fun_cocos2d_MotionStreak_new); + oluacls_func(L, "reset", _olua_fun_cocos2d_MotionStreak_reset); + oluacls_func(L, "setBlendFunc", _olua_fun_cocos2d_MotionStreak_setBlendFunc); + oluacls_func(L, "setFastMode", _olua_fun_cocos2d_MotionStreak_setFastMode); + oluacls_func(L, "setStartingPositionInitialized", _olua_fun_cocos2d_MotionStreak_setStartingPositionInitialized); + oluacls_func(L, "setStroke", _olua_fun_cocos2d_MotionStreak_setStroke); + oluacls_func(L, "setTexture", _olua_fun_cocos2d_MotionStreak_setTexture); + oluacls_func(L, "tintWithColor", _olua_fun_cocos2d_MotionStreak_tintWithColor); + oluacls_prop(L, "blendFunc", _olua_fun_cocos2d_MotionStreak_getBlendFunc, _olua_fun_cocos2d_MotionStreak_setBlendFunc); + oluacls_prop(L, "fastMode", _olua_fun_cocos2d_MotionStreak_isFastMode, _olua_fun_cocos2d_MotionStreak_setFastMode); + oluacls_prop(L, "startingPositionInitialized", _olua_fun_cocos2d_MotionStreak_isStartingPositionInitialized, _olua_fun_cocos2d_MotionStreak_setStartingPositionInitialized); + oluacls_prop(L, "stroke", _olua_fun_cocos2d_MotionStreak_getStroke, _olua_fun_cocos2d_MotionStreak_setStroke); + oluacls_prop(L, "texture", _olua_fun_cocos2d_MotionStreak_getTexture, _olua_fun_cocos2d_MotionStreak_setTexture); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_MotionStreak(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.MotionStreak")) { + luaL_error(L, "class not found: cocos2d::MotionStreak"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_ProtectedNode_addProtectedChild$1(lua_State *L) +static int _olua_fun_cocos2d_ProtectedNode_addProtectedChild$1(lua_State *L) { olua_startinvoke(L); @@ -27161,7 +28933,7 @@ static int _cocos2d_ProtectedNode_addProtectedChild$1(lua_State *L) return 0; } -static int _cocos2d_ProtectedNode_addProtectedChild$2(lua_State *L) +static int _olua_fun_cocos2d_ProtectedNode_addProtectedChild$2(lua_State *L) { olua_startinvoke(L); @@ -27184,7 +28956,7 @@ static int _cocos2d_ProtectedNode_addProtectedChild$2(lua_State *L) return 0; } -static int _cocos2d_ProtectedNode_addProtectedChild$3(lua_State *L) +static int _olua_fun_cocos2d_ProtectedNode_addProtectedChild$3(lua_State *L) { olua_startinvoke(L); @@ -27209,28 +28981,28 @@ static int _cocos2d_ProtectedNode_addProtectedChild$3(lua_State *L) return 0; } -static int _cocos2d_ProtectedNode_addProtectedChild(lua_State *L) +static int _olua_fun_cocos2d_ProtectedNode_addProtectedChild(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_object(L, 2, "cc.Node"))) { // void addProtectedChild(@addref(protectedChildren |) cocos2d::Node *child) - return _cocos2d_ProtectedNode_addProtectedChild$1(L); + return _olua_fun_cocos2d_ProtectedNode_addProtectedChild$1(L); // } } if (num_args == 2) { // if ((olua_is_object(L, 2, "cc.Node")) && (olua_is_integer(L, 3))) { // void addProtectedChild(@addref(protectedChildren |) cocos2d::Node *child, int localZOrder) - return _cocos2d_ProtectedNode_addProtectedChild$2(L); + return _olua_fun_cocos2d_ProtectedNode_addProtectedChild$2(L); // } } if (num_args == 3) { // if ((olua_is_object(L, 2, "cc.Node")) && (olua_is_integer(L, 3)) && (olua_is_integer(L, 4))) { // void addProtectedChild(@addref(protectedChildren |) cocos2d::Node *child, int localZOrder, int tag) - return _cocos2d_ProtectedNode_addProtectedChild$3(L); + return _olua_fun_cocos2d_ProtectedNode_addProtectedChild$3(L); // } } @@ -27239,7 +29011,7 @@ static int _cocos2d_ProtectedNode_addProtectedChild(lua_State *L) return 0; } -static int _cocos2d_ProtectedNode_create(lua_State *L) +static int _olua_fun_cocos2d_ProtectedNode_create(lua_State *L) { olua_startinvoke(L); @@ -27252,7 +29024,7 @@ static int _cocos2d_ProtectedNode_create(lua_State *L) return num_ret; } -static int _cocos2d_ProtectedNode_disableCascadeColor(lua_State *L) +static int _olua_fun_cocos2d_ProtectedNode_disableCascadeColor(lua_State *L) { olua_startinvoke(L); @@ -27268,7 +29040,7 @@ static int _cocos2d_ProtectedNode_disableCascadeColor(lua_State *L) return 0; } -static int _cocos2d_ProtectedNode_disableCascadeOpacity(lua_State *L) +static int _olua_fun_cocos2d_ProtectedNode_disableCascadeOpacity(lua_State *L) { olua_startinvoke(L); @@ -27284,7 +29056,7 @@ static int _cocos2d_ProtectedNode_disableCascadeOpacity(lua_State *L) return 0; } -static int _cocos2d_ProtectedNode_getProtectedChildByTag(lua_State *L) +static int _olua_fun_cocos2d_ProtectedNode_getProtectedChildByTag(lua_State *L) { olua_startinvoke(L); @@ -27306,11 +29078,11 @@ static int _cocos2d_ProtectedNode_getProtectedChildByTag(lua_State *L) return num_ret; } -static int _cocos2d_ProtectedNode_new(lua_State *L) +static int _olua_fun_cocos2d_ProtectedNode_new(lua_State *L) { olua_startinvoke(L); - // ProtectedNode() + // cocos2d::ProtectedNode() cocos2d::ProtectedNode *ret = new cocos2d::ProtectedNode(); int num_ret = olua_push_object(L, ret, "cc.ProtectedNode"); olua_postnew(L, ret); @@ -27320,7 +29092,7 @@ static int _cocos2d_ProtectedNode_new(lua_State *L) return num_ret; } -static int _cocos2d_ProtectedNode_removeAllProtectedChildren(lua_State *L) +static int _olua_fun_cocos2d_ProtectedNode_removeAllProtectedChildren(lua_State *L) { olua_startinvoke(L); @@ -27339,7 +29111,7 @@ static int _cocos2d_ProtectedNode_removeAllProtectedChildren(lua_State *L) return 0; } -static int _cocos2d_ProtectedNode_removeAllProtectedChildrenWithCleanup(lua_State *L) +static int _olua_fun_cocos2d_ProtectedNode_removeAllProtectedChildrenWithCleanup(lua_State *L) { olua_startinvoke(L); @@ -27360,7 +29132,7 @@ static int _cocos2d_ProtectedNode_removeAllProtectedChildrenWithCleanup(lua_Stat return 0; } -static int _cocos2d_ProtectedNode_removeProtectedChild$1(lua_State *L) +static int _olua_fun_cocos2d_ProtectedNode_removeProtectedChild$1(lua_State *L) { olua_startinvoke(L); @@ -27383,7 +29155,7 @@ static int _cocos2d_ProtectedNode_removeProtectedChild$1(lua_State *L) return 0; } -static int _cocos2d_ProtectedNode_removeProtectedChild$2(lua_State *L) +static int _olua_fun_cocos2d_ProtectedNode_removeProtectedChild$2(lua_State *L) { olua_startinvoke(L); @@ -27393,7 +29165,7 @@ static int _cocos2d_ProtectedNode_removeProtectedChild$2(lua_State *L) olua_to_object(L, 1, &self, "cc.ProtectedNode"); olua_check_object(L, 2, &arg1, "cc.Node"); - // void removeProtectedChild(@delref(protectedChildren |) cocos2d::Node *child, @optional bool cleanup) + // void removeProtectedChild(@delref(protectedChildren |) cocos2d::Node *child) self->removeProtectedChild(arg1); // insert code after call @@ -27404,21 +29176,21 @@ static int _cocos2d_ProtectedNode_removeProtectedChild$2(lua_State *L) return 0; } -static int _cocos2d_ProtectedNode_removeProtectedChild(lua_State *L) +static int _olua_fun_cocos2d_ProtectedNode_removeProtectedChild(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_object(L, 2, "cc.Node"))) { - // void removeProtectedChild(@delref(protectedChildren |) cocos2d::Node *child, @optional bool cleanup) - return _cocos2d_ProtectedNode_removeProtectedChild$2(L); + // void removeProtectedChild(@delref(protectedChildren |) cocos2d::Node *child) + return _olua_fun_cocos2d_ProtectedNode_removeProtectedChild$2(L); // } } if (num_args == 2) { // if ((olua_is_object(L, 2, "cc.Node")) && (olua_is_bool(L, 3))) { // void removeProtectedChild(@delref(protectedChildren |) cocos2d::Node *child, @optional bool cleanup) - return _cocos2d_ProtectedNode_removeProtectedChild$1(L); + return _olua_fun_cocos2d_ProtectedNode_removeProtectedChild$1(L); // } } @@ -27427,7 +29199,7 @@ static int _cocos2d_ProtectedNode_removeProtectedChild(lua_State *L) return 0; } -static int _cocos2d_ProtectedNode_removeProtectedChildByTag$1(lua_State *L) +static int _olua_fun_cocos2d_ProtectedNode_removeProtectedChildByTag$1(lua_State *L) { olua_startinvoke(L); @@ -27453,7 +29225,7 @@ static int _cocos2d_ProtectedNode_removeProtectedChildByTag$1(lua_State *L) return 0; } -static int _cocos2d_ProtectedNode_removeProtectedChildByTag$2(lua_State *L) +static int _olua_fun_cocos2d_ProtectedNode_removeProtectedChildByTag$2(lua_State *L) { olua_startinvoke(L); @@ -27466,7 +29238,7 @@ static int _cocos2d_ProtectedNode_removeProtectedChildByTag$2(lua_State *L) // insert code before call olua_startcmpref(L, 1, "protectedChildren"); - // @delref(protectedChildren ~) void removeProtectedChildByTag(int tag, @optional bool cleanup) + // @delref(protectedChildren ~) void removeProtectedChildByTag(int tag) self->removeProtectedChildByTag(arg1); // insert code after call @@ -27477,21 +29249,21 @@ static int _cocos2d_ProtectedNode_removeProtectedChildByTag$2(lua_State *L) return 0; } -static int _cocos2d_ProtectedNode_removeProtectedChildByTag(lua_State *L) +static int _olua_fun_cocos2d_ProtectedNode_removeProtectedChildByTag(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_integer(L, 2))) { - // @delref(protectedChildren ~) void removeProtectedChildByTag(int tag, @optional bool cleanup) - return _cocos2d_ProtectedNode_removeProtectedChildByTag$2(L); + // @delref(protectedChildren ~) void removeProtectedChildByTag(int tag) + return _olua_fun_cocos2d_ProtectedNode_removeProtectedChildByTag$2(L); // } } if (num_args == 2) { // if ((olua_is_integer(L, 2)) && (olua_is_bool(L, 3))) { // @delref(protectedChildren ~) void removeProtectedChildByTag(int tag, @optional bool cleanup) - return _cocos2d_ProtectedNode_removeProtectedChildByTag$1(L); + return _olua_fun_cocos2d_ProtectedNode_removeProtectedChildByTag$1(L); // } } @@ -27500,7 +29272,7 @@ static int _cocos2d_ProtectedNode_removeProtectedChildByTag(lua_State *L) return 0; } -static int _cocos2d_ProtectedNode_reorderProtectedChild(lua_State *L) +static int _olua_fun_cocos2d_ProtectedNode_reorderProtectedChild(lua_State *L) { olua_startinvoke(L); @@ -27520,7 +29292,7 @@ static int _cocos2d_ProtectedNode_reorderProtectedChild(lua_State *L) return 0; } -static int _cocos2d_ProtectedNode_sortAllProtectedChildren(lua_State *L) +static int _olua_fun_cocos2d_ProtectedNode_sortAllProtectedChildren(lua_State *L) { olua_startinvoke(L); @@ -27536,28 +29308,37 @@ static int _cocos2d_ProtectedNode_sortAllProtectedChildren(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ProtectedNode(lua_State *L) +static int _olua_cls_cc_ProtectedNode(lua_State *L) { oluacls_class(L, "cc.ProtectedNode"); - oluacls_func(L, "addProtectedChild", _cocos2d_ProtectedNode_addProtectedChild); - oluacls_func(L, "create", _cocos2d_ProtectedNode_create); - oluacls_func(L, "disableCascadeColor", _cocos2d_ProtectedNode_disableCascadeColor); - oluacls_func(L, "disableCascadeOpacity", _cocos2d_ProtectedNode_disableCascadeOpacity); - oluacls_func(L, "getProtectedChildByTag", _cocos2d_ProtectedNode_getProtectedChildByTag); - oluacls_func(L, "new", _cocos2d_ProtectedNode_new); - oluacls_func(L, "removeAllProtectedChildren", _cocos2d_ProtectedNode_removeAllProtectedChildren); - oluacls_func(L, "removeAllProtectedChildrenWithCleanup", _cocos2d_ProtectedNode_removeAllProtectedChildrenWithCleanup); - oluacls_func(L, "removeProtectedChild", _cocos2d_ProtectedNode_removeProtectedChild); - oluacls_func(L, "removeProtectedChildByTag", _cocos2d_ProtectedNode_removeProtectedChildByTag); - oluacls_func(L, "reorderProtectedChild", _cocos2d_ProtectedNode_reorderProtectedChild); - oluacls_func(L, "sortAllProtectedChildren", _cocos2d_ProtectedNode_sortAllProtectedChildren); + oluacls_func(L, "addProtectedChild", _olua_fun_cocos2d_ProtectedNode_addProtectedChild); + oluacls_func(L, "create", _olua_fun_cocos2d_ProtectedNode_create); + oluacls_func(L, "disableCascadeColor", _olua_fun_cocos2d_ProtectedNode_disableCascadeColor); + oluacls_func(L, "disableCascadeOpacity", _olua_fun_cocos2d_ProtectedNode_disableCascadeOpacity); + oluacls_func(L, "getProtectedChildByTag", _olua_fun_cocos2d_ProtectedNode_getProtectedChildByTag); + oluacls_func(L, "new", _olua_fun_cocos2d_ProtectedNode_new); + oluacls_func(L, "removeAllProtectedChildren", _olua_fun_cocos2d_ProtectedNode_removeAllProtectedChildren); + oluacls_func(L, "removeAllProtectedChildrenWithCleanup", _olua_fun_cocos2d_ProtectedNode_removeAllProtectedChildrenWithCleanup); + oluacls_func(L, "removeProtectedChild", _olua_fun_cocos2d_ProtectedNode_removeProtectedChild); + oluacls_func(L, "removeProtectedChildByTag", _olua_fun_cocos2d_ProtectedNode_removeProtectedChildByTag); + oluacls_func(L, "reorderProtectedChild", _olua_fun_cocos2d_ProtectedNode_reorderProtectedChild); + oluacls_func(L, "sortAllProtectedChildren", _olua_fun_cocos2d_ProtectedNode_sortAllProtectedChildren); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_ProtectedNode(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.ProtectedNode")) { + luaL_error(L, "class not found: cocos2d::ProtectedNode"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_DrawNode_clear(lua_State *L) +static int _olua_fun_cocos2d_DrawNode_clear(lua_State *L) { olua_startinvoke(L); @@ -27573,7 +29354,7 @@ static int _cocos2d_DrawNode_clear(lua_State *L) return 0; } -static int _cocos2d_DrawNode_create$1(lua_State *L) +static int _olua_fun_cocos2d_DrawNode_create$1(lua_State *L) { olua_startinvoke(L); @@ -27590,11 +29371,11 @@ static int _cocos2d_DrawNode_create$1(lua_State *L) return num_ret; } -static int _cocos2d_DrawNode_create$2(lua_State *L) +static int _olua_fun_cocos2d_DrawNode_create$2(lua_State *L) { olua_startinvoke(L); - // static cocos2d::DrawNode *create(@optional float defaultLineWidth) + // static cocos2d::DrawNode *create() cocos2d::DrawNode *ret = cocos2d::DrawNode::create(); int num_ret = olua_push_object(L, ret, "cc.DrawNode"); @@ -27603,19 +29384,19 @@ static int _cocos2d_DrawNode_create$2(lua_State *L) return num_ret; } -static int _cocos2d_DrawNode_create(lua_State *L) +static int _olua_fun_cocos2d_DrawNode_create(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 0) { - // static cocos2d::DrawNode *create(@optional float defaultLineWidth) - return _cocos2d_DrawNode_create$2(L); + // static cocos2d::DrawNode *create() + return _olua_fun_cocos2d_DrawNode_create$2(L); } if (num_args == 1) { // if ((olua_is_number(L, 1))) { // static cocos2d::DrawNode *create(@optional float defaultLineWidth) - return _cocos2d_DrawNode_create$1(L); + return _olua_fun_cocos2d_DrawNode_create$1(L); // } } @@ -27624,7 +29405,7 @@ static int _cocos2d_DrawNode_create(lua_State *L) return 0; } -static int _cocos2d_DrawNode_drawCardinalSpline(lua_State *L) +static int _olua_fun_cocos2d_DrawNode_drawCardinalSpline(lua_State *L) { olua_startinvoke(L); @@ -27648,7 +29429,7 @@ static int _cocos2d_DrawNode_drawCardinalSpline(lua_State *L) return 0; } -static int _cocos2d_DrawNode_drawCatmullRom(lua_State *L) +static int _olua_fun_cocos2d_DrawNode_drawCatmullRom(lua_State *L) { olua_startinvoke(L); @@ -27670,12 +29451,12 @@ static int _cocos2d_DrawNode_drawCatmullRom(lua_State *L) return 0; } -static int _cocos2d_DrawNode_drawCircle$1(lua_State *L) +static int _olua_fun_cocos2d_DrawNode_drawCircle$1(lua_State *L) { olua_startinvoke(L); cocos2d::DrawNode *self = nullptr; - cocos2d::Vec2 arg1; /** center */ + cocos2d::Vec2 *arg1; /** center */ float arg2 = 0; /** radius */ float arg3 = 0; /** angle */ unsigned int arg4 = 0; /** segments */ @@ -27695,19 +29476,19 @@ static int _cocos2d_DrawNode_drawCircle$1(lua_State *L) olua_check_cocos2d_Color4F(L, 9, &arg8); // void drawCircle(const cocos2d::Vec2 ¢er, float radius, float angle, unsigned int segments, bool drawLineToCenter, float scaleX, float scaleY, const cocos2d::Color4F &color) - self->drawCircle(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8); + self->drawCircle(*arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8); olua_endinvoke(L); return 0; } -static int _cocos2d_DrawNode_drawCircle$2(lua_State *L) +static int _olua_fun_cocos2d_DrawNode_drawCircle$2(lua_State *L) { olua_startinvoke(L); cocos2d::DrawNode *self = nullptr; - cocos2d::Vec2 arg1; /** center */ + cocos2d::Vec2 *arg1; /** center */ float arg2 = 0; /** radius */ float arg3 = 0; /** angle */ unsigned int arg4 = 0; /** segments */ @@ -27723,28 +29504,28 @@ static int _cocos2d_DrawNode_drawCircle$2(lua_State *L) olua_check_cocos2d_Color4F(L, 7, &arg6); // void drawCircle(const cocos2d::Vec2 ¢er, float radius, float angle, unsigned int segments, bool drawLineToCenter, const cocos2d::Color4F &color) - self->drawCircle(arg1, arg2, arg3, arg4, arg5, arg6); + self->drawCircle(*arg1, arg2, arg3, arg4, arg5, arg6); olua_endinvoke(L); return 0; } -static int _cocos2d_DrawNode_drawCircle(lua_State *L) +static int _olua_fun_cocos2d_DrawNode_drawCircle(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 6) { // if ((olua_is_object(L, 2, "cc.Vec2")) && (olua_is_number(L, 3)) && (olua_is_number(L, 4)) && (olua_is_integer(L, 5)) && (olua_is_bool(L, 6)) && (olua_is_cocos2d_Color4F(L, 7))) { // void drawCircle(const cocos2d::Vec2 ¢er, float radius, float angle, unsigned int segments, bool drawLineToCenter, const cocos2d::Color4F &color) - return _cocos2d_DrawNode_drawCircle$2(L); + return _olua_fun_cocos2d_DrawNode_drawCircle$2(L); // } } if (num_args == 8) { // if ((olua_is_object(L, 2, "cc.Vec2")) && (olua_is_number(L, 3)) && (olua_is_number(L, 4)) && (olua_is_integer(L, 5)) && (olua_is_bool(L, 6)) && (olua_is_number(L, 7)) && (olua_is_number(L, 8)) && (olua_is_cocos2d_Color4F(L, 9))) { // void drawCircle(const cocos2d::Vec2 ¢er, float radius, float angle, unsigned int segments, bool drawLineToCenter, float scaleX, float scaleY, const cocos2d::Color4F &color) - return _cocos2d_DrawNode_drawCircle$1(L); + return _olua_fun_cocos2d_DrawNode_drawCircle$1(L); // } } @@ -27753,15 +29534,15 @@ static int _cocos2d_DrawNode_drawCircle(lua_State *L) return 0; } -static int _cocos2d_DrawNode_drawCubicBezier(lua_State *L) +static int _olua_fun_cocos2d_DrawNode_drawCubicBezier(lua_State *L) { olua_startinvoke(L); cocos2d::DrawNode *self = nullptr; - cocos2d::Vec2 arg1; /** origin */ - cocos2d::Vec2 arg2; /** control1 */ - cocos2d::Vec2 arg3; /** control2 */ - cocos2d::Vec2 arg4; /** destination */ + cocos2d::Vec2 *arg1; /** origin */ + cocos2d::Vec2 *arg2; /** control1 */ + cocos2d::Vec2 *arg3; /** control2 */ + cocos2d::Vec2 *arg4; /** destination */ unsigned int arg5 = 0; /** segments */ cocos2d::Color4F arg6; /** color */ @@ -27774,19 +29555,19 @@ static int _cocos2d_DrawNode_drawCubicBezier(lua_State *L) olua_check_cocos2d_Color4F(L, 7, &arg6); // void drawCubicBezier(const cocos2d::Vec2 &origin, const cocos2d::Vec2 &control1, const cocos2d::Vec2 &control2, const cocos2d::Vec2 &destination, unsigned int segments, const cocos2d::Color4F &color) - self->drawCubicBezier(arg1, arg2, arg3, arg4, arg5, arg6); + self->drawCubicBezier(*arg1, *arg2, *arg3, *arg4, arg5, arg6); olua_endinvoke(L); return 0; } -static int _cocos2d_DrawNode_drawDot(lua_State *L) +static int _olua_fun_cocos2d_DrawNode_drawDot(lua_State *L) { olua_startinvoke(L); cocos2d::DrawNode *self = nullptr; - cocos2d::Vec2 arg1; /** pos */ + cocos2d::Vec2 *arg1; /** pos */ float arg2 = 0; /** radius */ cocos2d::Color4F arg3; /** color */ @@ -27796,20 +29577,20 @@ static int _cocos2d_DrawNode_drawDot(lua_State *L) olua_check_cocos2d_Color4F(L, 4, &arg3); // void drawDot(const cocos2d::Vec2 &pos, float radius, const cocos2d::Color4F &color) - self->drawDot(arg1, arg2, arg3); + self->drawDot(*arg1, arg2, arg3); olua_endinvoke(L); return 0; } -static int _cocos2d_DrawNode_drawLine(lua_State *L) +static int _olua_fun_cocos2d_DrawNode_drawLine(lua_State *L) { olua_startinvoke(L); cocos2d::DrawNode *self = nullptr; - cocos2d::Vec2 arg1; /** origin */ - cocos2d::Vec2 arg2; /** destination */ + cocos2d::Vec2 *arg1; /** origin */ + cocos2d::Vec2 *arg2; /** destination */ cocos2d::Color4F arg3; /** color */ olua_to_object(L, 1, &self, "cc.DrawNode"); @@ -27818,19 +29599,19 @@ static int _cocos2d_DrawNode_drawLine(lua_State *L) olua_check_cocos2d_Color4F(L, 4, &arg3); // void drawLine(const cocos2d::Vec2 &origin, const cocos2d::Vec2 &destination, const cocos2d::Color4F &color) - self->drawLine(arg1, arg2, arg3); + self->drawLine(*arg1, *arg2, arg3); olua_endinvoke(L); return 0; } -static int _cocos2d_DrawNode_drawPoint(lua_State *L) +static int _olua_fun_cocos2d_DrawNode_drawPoint(lua_State *L) { olua_startinvoke(L); cocos2d::DrawNode *self = nullptr; - cocos2d::Vec2 arg1; /** point */ + cocos2d::Vec2 *arg1; /** point */ float arg2 = 0; /** pointSize */ cocos2d::Color4F arg3; /** color */ @@ -27840,14 +29621,14 @@ static int _cocos2d_DrawNode_drawPoint(lua_State *L) olua_check_cocos2d_Color4F(L, 4, &arg3); // void drawPoint(const cocos2d::Vec2 &point, const float pointSize, const cocos2d::Color4F &color) - self->drawPoint(arg1, arg2, arg3); + self->drawPoint(*arg1, arg2, arg3); olua_endinvoke(L); return 0; } -static int _cocos2d_DrawNode_drawPoints$1(lua_State *L) +static int _olua_fun_cocos2d_DrawNode_drawPoints$1(lua_State *L) { olua_startinvoke(L); @@ -27869,7 +29650,7 @@ static int _cocos2d_DrawNode_drawPoints$1(lua_State *L) return 0; } -static int _cocos2d_DrawNode_drawPoints$2(lua_State *L) +static int _olua_fun_cocos2d_DrawNode_drawPoints$2(lua_State *L) { olua_startinvoke(L); @@ -27893,21 +29674,21 @@ static int _cocos2d_DrawNode_drawPoints$2(lua_State *L) return 0; } -static int _cocos2d_DrawNode_drawPoints(lua_State *L) +static int _olua_fun_cocos2d_DrawNode_drawPoints(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 3) { // if ((olua_is_object(L, 2, "cc.Vec2")) && (olua_is_integer(L, 3)) && (olua_is_cocos2d_Color4F(L, 4))) { // void drawPoints(const cocos2d::Vec2 *position, unsigned int numberOfPoints, const cocos2d::Color4F &color) - return _cocos2d_DrawNode_drawPoints$1(L); + return _olua_fun_cocos2d_DrawNode_drawPoints$1(L); // } } if (num_args == 4) { // if ((olua_is_object(L, 2, "cc.Vec2")) && (olua_is_integer(L, 3)) && (olua_is_number(L, 4)) && (olua_is_cocos2d_Color4F(L, 5))) { // void drawPoints(const cocos2d::Vec2 *position, unsigned int numberOfPoints, const float pointSize, const cocos2d::Color4F &color) - return _cocos2d_DrawNode_drawPoints$2(L); + return _olua_fun_cocos2d_DrawNode_drawPoints$2(L); // } } @@ -27916,7 +29697,7 @@ static int _cocos2d_DrawNode_drawPoints(lua_State *L) return 0; } -static int _cocos2d_DrawNode_drawPoly(lua_State *L) +static int _olua_fun_cocos2d_DrawNode_drawPoly(lua_State *L) { olua_startinvoke(L); @@ -27940,7 +29721,7 @@ static int _cocos2d_DrawNode_drawPoly(lua_State *L) return 0; } -static int _cocos2d_DrawNode_drawPolygon(lua_State *L) +static int _olua_fun_cocos2d_DrawNode_drawPolygon(lua_State *L) { olua_startinvoke(L); @@ -27966,14 +29747,14 @@ static int _cocos2d_DrawNode_drawPolygon(lua_State *L) return 0; } -static int _cocos2d_DrawNode_drawQuadBezier(lua_State *L) +static int _olua_fun_cocos2d_DrawNode_drawQuadBezier(lua_State *L) { olua_startinvoke(L); cocos2d::DrawNode *self = nullptr; - cocos2d::Vec2 arg1; /** origin */ - cocos2d::Vec2 arg2; /** control */ - cocos2d::Vec2 arg3; /** destination */ + cocos2d::Vec2 *arg1; /** origin */ + cocos2d::Vec2 *arg2; /** control */ + cocos2d::Vec2 *arg3; /** destination */ unsigned int arg4 = 0; /** segments */ cocos2d::Color4F arg5; /** color */ @@ -27985,20 +29766,20 @@ static int _cocos2d_DrawNode_drawQuadBezier(lua_State *L) olua_check_cocos2d_Color4F(L, 6, &arg5); // void drawQuadBezier(const cocos2d::Vec2 &origin, const cocos2d::Vec2 &control, const cocos2d::Vec2 &destination, unsigned int segments, const cocos2d::Color4F &color) - self->drawQuadBezier(arg1, arg2, arg3, arg4, arg5); + self->drawQuadBezier(*arg1, *arg2, *arg3, arg4, arg5); olua_endinvoke(L); return 0; } -static int _cocos2d_DrawNode_drawRect$1(lua_State *L) +static int _olua_fun_cocos2d_DrawNode_drawRect$1(lua_State *L) { olua_startinvoke(L); cocos2d::DrawNode *self = nullptr; - cocos2d::Vec2 arg1; /** origin */ - cocos2d::Vec2 arg2; /** destination */ + cocos2d::Vec2 *arg1; /** origin */ + cocos2d::Vec2 *arg2; /** destination */ cocos2d::Color4F arg3; /** color */ olua_to_object(L, 1, &self, "cc.DrawNode"); @@ -28007,22 +29788,22 @@ static int _cocos2d_DrawNode_drawRect$1(lua_State *L) olua_check_cocos2d_Color4F(L, 4, &arg3); // void drawRect(const cocos2d::Vec2 &origin, const cocos2d::Vec2 &destination, const cocos2d::Color4F &color) - self->drawRect(arg1, arg2, arg3); + self->drawRect(*arg1, *arg2, arg3); olua_endinvoke(L); return 0; } -static int _cocos2d_DrawNode_drawRect$2(lua_State *L) +static int _olua_fun_cocos2d_DrawNode_drawRect$2(lua_State *L) { olua_startinvoke(L); cocos2d::DrawNode *self = nullptr; - cocos2d::Vec2 arg1; /** p1 */ - cocos2d::Vec2 arg2; /** p2 */ - cocos2d::Vec2 arg3; /** p3 */ - cocos2d::Vec2 arg4; /** p4 */ + cocos2d::Vec2 *arg1; /** p1 */ + cocos2d::Vec2 *arg2; /** p2 */ + cocos2d::Vec2 *arg3; /** p3 */ + cocos2d::Vec2 *arg4; /** p4 */ cocos2d::Color4F arg5; /** color */ olua_to_object(L, 1, &self, "cc.DrawNode"); @@ -28033,28 +29814,28 @@ static int _cocos2d_DrawNode_drawRect$2(lua_State *L) olua_check_cocos2d_Color4F(L, 6, &arg5); // void drawRect(const cocos2d::Vec2 &p1, const cocos2d::Vec2 &p2, const cocos2d::Vec2 &p3, const cocos2d::Vec2 &p4, const cocos2d::Color4F &color) - self->drawRect(arg1, arg2, arg3, arg4, arg5); + self->drawRect(*arg1, *arg2, *arg3, *arg4, arg5); olua_endinvoke(L); return 0; } -static int _cocos2d_DrawNode_drawRect(lua_State *L) +static int _olua_fun_cocos2d_DrawNode_drawRect(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 3) { // if ((olua_is_object(L, 2, "cc.Vec2")) && (olua_is_object(L, 3, "cc.Vec2")) && (olua_is_cocos2d_Color4F(L, 4))) { // void drawRect(const cocos2d::Vec2 &origin, const cocos2d::Vec2 &destination, const cocos2d::Color4F &color) - return _cocos2d_DrawNode_drawRect$1(L); + return _olua_fun_cocos2d_DrawNode_drawRect$1(L); // } } if (num_args == 5) { // if ((olua_is_object(L, 2, "cc.Vec2")) && (olua_is_object(L, 3, "cc.Vec2")) && (olua_is_object(L, 4, "cc.Vec2")) && (olua_is_object(L, 5, "cc.Vec2")) && (olua_is_cocos2d_Color4F(L, 6))) { // void drawRect(const cocos2d::Vec2 &p1, const cocos2d::Vec2 &p2, const cocos2d::Vec2 &p3, const cocos2d::Vec2 &p4, const cocos2d::Color4F &color) - return _cocos2d_DrawNode_drawRect$2(L); + return _olua_fun_cocos2d_DrawNode_drawRect$2(L); // } } @@ -28063,13 +29844,13 @@ static int _cocos2d_DrawNode_drawRect(lua_State *L) return 0; } -static int _cocos2d_DrawNode_drawSegment(lua_State *L) +static int _olua_fun_cocos2d_DrawNode_drawSegment(lua_State *L) { olua_startinvoke(L); cocos2d::DrawNode *self = nullptr; - cocos2d::Vec2 arg1; /** from */ - cocos2d::Vec2 arg2; /** to */ + cocos2d::Vec2 *arg1; /** from */ + cocos2d::Vec2 *arg2; /** to */ float arg3 = 0; /** radius */ cocos2d::Color4F arg4; /** color */ @@ -28080,19 +29861,19 @@ static int _cocos2d_DrawNode_drawSegment(lua_State *L) olua_check_cocos2d_Color4F(L, 5, &arg4); // void drawSegment(const cocos2d::Vec2 &from, const cocos2d::Vec2 &to, float radius, const cocos2d::Color4F &color) - self->drawSegment(arg1, arg2, arg3, arg4); + self->drawSegment(*arg1, *arg2, arg3, arg4); olua_endinvoke(L); return 0; } -static int _cocos2d_DrawNode_drawSolidCircle$1(lua_State *L) +static int _olua_fun_cocos2d_DrawNode_drawSolidCircle$1(lua_State *L) { olua_startinvoke(L); cocos2d::DrawNode *self = nullptr; - cocos2d::Vec2 arg1; /** center */ + cocos2d::Vec2 *arg1; /** center */ float arg2 = 0; /** radius */ float arg3 = 0; /** angle */ unsigned int arg4 = 0; /** segments */ @@ -28110,19 +29891,19 @@ static int _cocos2d_DrawNode_drawSolidCircle$1(lua_State *L) olua_check_cocos2d_Color4F(L, 8, &arg7); // void drawSolidCircle(const cocos2d::Vec2 ¢er, float radius, float angle, unsigned int segments, float scaleX, float scaleY, const cocos2d::Color4F &color) - self->drawSolidCircle(arg1, arg2, arg3, arg4, arg5, arg6, arg7); + self->drawSolidCircle(*arg1, arg2, arg3, arg4, arg5, arg6, arg7); olua_endinvoke(L); return 0; } -static int _cocos2d_DrawNode_drawSolidCircle$2(lua_State *L) +static int _olua_fun_cocos2d_DrawNode_drawSolidCircle$2(lua_State *L) { olua_startinvoke(L); cocos2d::DrawNode *self = nullptr; - cocos2d::Vec2 arg1; /** center */ + cocos2d::Vec2 *arg1; /** center */ float arg2 = 0; /** radius */ float arg3 = 0; /** angle */ unsigned int arg4 = 0; /** segments */ @@ -28136,28 +29917,28 @@ static int _cocos2d_DrawNode_drawSolidCircle$2(lua_State *L) olua_check_cocos2d_Color4F(L, 6, &arg5); // void drawSolidCircle(const cocos2d::Vec2 ¢er, float radius, float angle, unsigned int segments, const cocos2d::Color4F &color) - self->drawSolidCircle(arg1, arg2, arg3, arg4, arg5); + self->drawSolidCircle(*arg1, arg2, arg3, arg4, arg5); olua_endinvoke(L); return 0; } -static int _cocos2d_DrawNode_drawSolidCircle(lua_State *L) +static int _olua_fun_cocos2d_DrawNode_drawSolidCircle(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 5) { // if ((olua_is_object(L, 2, "cc.Vec2")) && (olua_is_number(L, 3)) && (olua_is_number(L, 4)) && (olua_is_integer(L, 5)) && (olua_is_cocos2d_Color4F(L, 6))) { // void drawSolidCircle(const cocos2d::Vec2 ¢er, float radius, float angle, unsigned int segments, const cocos2d::Color4F &color) - return _cocos2d_DrawNode_drawSolidCircle$2(L); + return _olua_fun_cocos2d_DrawNode_drawSolidCircle$2(L); // } } if (num_args == 7) { // if ((olua_is_object(L, 2, "cc.Vec2")) && (olua_is_number(L, 3)) && (olua_is_number(L, 4)) && (olua_is_integer(L, 5)) && (olua_is_number(L, 6)) && (olua_is_number(L, 7)) && (olua_is_cocos2d_Color4F(L, 8))) { // void drawSolidCircle(const cocos2d::Vec2 ¢er, float radius, float angle, unsigned int segments, float scaleX, float scaleY, const cocos2d::Color4F &color) - return _cocos2d_DrawNode_drawSolidCircle$1(L); + return _olua_fun_cocos2d_DrawNode_drawSolidCircle$1(L); // } } @@ -28166,7 +29947,7 @@ static int _cocos2d_DrawNode_drawSolidCircle(lua_State *L) return 0; } -static int _cocos2d_DrawNode_drawSolidPoly(lua_State *L) +static int _olua_fun_cocos2d_DrawNode_drawSolidPoly(lua_State *L) { olua_startinvoke(L); @@ -28188,13 +29969,13 @@ static int _cocos2d_DrawNode_drawSolidPoly(lua_State *L) return 0; } -static int _cocos2d_DrawNode_drawSolidRect(lua_State *L) +static int _olua_fun_cocos2d_DrawNode_drawSolidRect(lua_State *L) { olua_startinvoke(L); cocos2d::DrawNode *self = nullptr; - cocos2d::Vec2 arg1; /** origin */ - cocos2d::Vec2 arg2; /** destination */ + cocos2d::Vec2 *arg1; /** origin */ + cocos2d::Vec2 *arg2; /** destination */ cocos2d::Color4F arg3; /** color */ olua_to_object(L, 1, &self, "cc.DrawNode"); @@ -28203,21 +29984,21 @@ static int _cocos2d_DrawNode_drawSolidRect(lua_State *L) olua_check_cocos2d_Color4F(L, 4, &arg3); // void drawSolidRect(const cocos2d::Vec2 &origin, const cocos2d::Vec2 &destination, const cocos2d::Color4F &color) - self->drawSolidRect(arg1, arg2, arg3); + self->drawSolidRect(*arg1, *arg2, arg3); olua_endinvoke(L); return 0; } -static int _cocos2d_DrawNode_drawTriangle(lua_State *L) +static int _olua_fun_cocos2d_DrawNode_drawTriangle(lua_State *L) { olua_startinvoke(L); cocos2d::DrawNode *self = nullptr; - cocos2d::Vec2 arg1; /** p1 */ - cocos2d::Vec2 arg2; /** p2 */ - cocos2d::Vec2 arg3; /** p3 */ + cocos2d::Vec2 *arg1; /** p1 */ + cocos2d::Vec2 *arg2; /** p2 */ + cocos2d::Vec2 *arg3; /** p3 */ cocos2d::Color4F arg4; /** color */ olua_to_object(L, 1, &self, "cc.DrawNode"); @@ -28227,14 +30008,14 @@ static int _cocos2d_DrawNode_drawTriangle(lua_State *L) olua_check_cocos2d_Color4F(L, 5, &arg4); // void drawTriangle(const cocos2d::Vec2 &p1, const cocos2d::Vec2 &p2, const cocos2d::Vec2 &p3, const cocos2d::Color4F &color) - self->drawTriangle(arg1, arg2, arg3, arg4); + self->drawTriangle(*arg1, *arg2, *arg3, arg4); olua_endinvoke(L); return 0; } -static int _cocos2d_DrawNode_getBlendFunc(lua_State *L) +static int _olua_fun_cocos2d_DrawNode_getBlendFunc(lua_State *L) { olua_startinvoke(L); @@ -28251,7 +30032,7 @@ static int _cocos2d_DrawNode_getBlendFunc(lua_State *L) return num_ret; } -static int _cocos2d_DrawNode_getLineWidth(lua_State *L) +static int _olua_fun_cocos2d_DrawNode_getLineWidth(lua_State *L) { olua_startinvoke(L); @@ -28268,7 +30049,7 @@ static int _cocos2d_DrawNode_getLineWidth(lua_State *L) return num_ret; } -static int _cocos2d_DrawNode_isIsolated(lua_State *L) +static int _olua_fun_cocos2d_DrawNode_isIsolated(lua_State *L) { olua_startinvoke(L); @@ -28285,7 +30066,7 @@ static int _cocos2d_DrawNode_isIsolated(lua_State *L) return num_ret; } -static int _cocos2d_DrawNode_new$1(lua_State *L) +static int _olua_fun_cocos2d_DrawNode_new$1(lua_State *L) { olua_startinvoke(L); @@ -28293,7 +30074,7 @@ static int _cocos2d_DrawNode_new$1(lua_State *L) olua_check_number(L, 1, &arg1); - // DrawNode(@optional float lineWidth) + // cocos2d::DrawNode(@optional float lineWidth) cocos2d::DrawNode *ret = new cocos2d::DrawNode(arg1); int num_ret = olua_push_object(L, ret, "cc.DrawNode"); olua_postnew(L, ret); @@ -28303,11 +30084,11 @@ static int _cocos2d_DrawNode_new$1(lua_State *L) return num_ret; } -static int _cocos2d_DrawNode_new$2(lua_State *L) +static int _olua_fun_cocos2d_DrawNode_new$2(lua_State *L) { olua_startinvoke(L); - // DrawNode(@optional float lineWidth) + // cocos2d::DrawNode() cocos2d::DrawNode *ret = new cocos2d::DrawNode(); int num_ret = olua_push_object(L, ret, "cc.DrawNode"); olua_postnew(L, ret); @@ -28317,19 +30098,19 @@ static int _cocos2d_DrawNode_new$2(lua_State *L) return num_ret; } -static int _cocos2d_DrawNode_new(lua_State *L) +static int _olua_fun_cocos2d_DrawNode_new(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 0) { - // DrawNode(@optional float lineWidth) - return _cocos2d_DrawNode_new$2(L); + // cocos2d::DrawNode() + return _olua_fun_cocos2d_DrawNode_new$2(L); } if (num_args == 1) { // if ((olua_is_number(L, 1))) { - // DrawNode(@optional float lineWidth) - return _cocos2d_DrawNode_new$1(L); + // cocos2d::DrawNode(@optional float lineWidth) + return _olua_fun_cocos2d_DrawNode_new$1(L); // } } @@ -28338,25 +30119,25 @@ static int _cocos2d_DrawNode_new(lua_State *L) return 0; } -static int _cocos2d_DrawNode_setBlendFunc(lua_State *L) +static int _olua_fun_cocos2d_DrawNode_setBlendFunc(lua_State *L) { olua_startinvoke(L); cocos2d::DrawNode *self = nullptr; - cocos2d::BlendFunc arg1; /** blendFunc */ + cocos2d::BlendFunc *arg1; /** blendFunc */ olua_to_object(L, 1, &self, "cc.DrawNode"); olua_check_object(L, 2, &arg1, "cc.BlendFunc"); // void setBlendFunc(const cocos2d::BlendFunc &blendFunc) - self->setBlendFunc(arg1); + self->setBlendFunc(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_DrawNode_setIsolated(lua_State *L) +static int _olua_fun_cocos2d_DrawNode_setIsolated(lua_State *L) { olua_startinvoke(L); @@ -28374,7 +30155,7 @@ static int _cocos2d_DrawNode_setIsolated(lua_State *L) return 0; } -static int _cocos2d_DrawNode_setLineWidth(lua_State *L) +static int _olua_fun_cocos2d_DrawNode_setLineWidth(lua_State *L) { olua_startinvoke(L); @@ -28392,53 +30173,62 @@ static int _cocos2d_DrawNode_setLineWidth(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_DrawNode(lua_State *L) +static int _olua_cls_cc_DrawNode(lua_State *L) { oluacls_class(L, "cc.DrawNode"); - oluacls_func(L, "clear", _cocos2d_DrawNode_clear); - oluacls_func(L, "create", _cocos2d_DrawNode_create); - oluacls_func(L, "drawCardinalSpline", _cocos2d_DrawNode_drawCardinalSpline); - oluacls_func(L, "drawCatmullRom", _cocos2d_DrawNode_drawCatmullRom); - oluacls_func(L, "drawCircle", _cocos2d_DrawNode_drawCircle); - oluacls_func(L, "drawCubicBezier", _cocos2d_DrawNode_drawCubicBezier); - oluacls_func(L, "drawDot", _cocos2d_DrawNode_drawDot); - oluacls_func(L, "drawLine", _cocos2d_DrawNode_drawLine); - oluacls_func(L, "drawPoint", _cocos2d_DrawNode_drawPoint); - oluacls_func(L, "drawPoints", _cocos2d_DrawNode_drawPoints); - oluacls_func(L, "drawPoly", _cocos2d_DrawNode_drawPoly); - oluacls_func(L, "drawPolygon", _cocos2d_DrawNode_drawPolygon); - oluacls_func(L, "drawQuadBezier", _cocos2d_DrawNode_drawQuadBezier); - oluacls_func(L, "drawRect", _cocos2d_DrawNode_drawRect); - oluacls_func(L, "drawSegment", _cocos2d_DrawNode_drawSegment); - oluacls_func(L, "drawSolidCircle", _cocos2d_DrawNode_drawSolidCircle); - oluacls_func(L, "drawSolidPoly", _cocos2d_DrawNode_drawSolidPoly); - oluacls_func(L, "drawSolidRect", _cocos2d_DrawNode_drawSolidRect); - oluacls_func(L, "drawTriangle", _cocos2d_DrawNode_drawTriangle); - oluacls_func(L, "getBlendFunc", _cocos2d_DrawNode_getBlendFunc); - oluacls_func(L, "getLineWidth", _cocos2d_DrawNode_getLineWidth); - oluacls_func(L, "isIsolated", _cocos2d_DrawNode_isIsolated); - oluacls_func(L, "new", _cocos2d_DrawNode_new); - oluacls_func(L, "setBlendFunc", _cocos2d_DrawNode_setBlendFunc); - oluacls_func(L, "setIsolated", _cocos2d_DrawNode_setIsolated); - oluacls_func(L, "setLineWidth", _cocos2d_DrawNode_setLineWidth); - oluacls_prop(L, "blendFunc", _cocos2d_DrawNode_getBlendFunc, _cocos2d_DrawNode_setBlendFunc); - oluacls_prop(L, "isolated", _cocos2d_DrawNode_isIsolated, _cocos2d_DrawNode_setIsolated); - oluacls_prop(L, "lineWidth", _cocos2d_DrawNode_getLineWidth, _cocos2d_DrawNode_setLineWidth); + oluacls_func(L, "clear", _olua_fun_cocos2d_DrawNode_clear); + oluacls_func(L, "create", _olua_fun_cocos2d_DrawNode_create); + oluacls_func(L, "drawCardinalSpline", _olua_fun_cocos2d_DrawNode_drawCardinalSpline); + oluacls_func(L, "drawCatmullRom", _olua_fun_cocos2d_DrawNode_drawCatmullRom); + oluacls_func(L, "drawCircle", _olua_fun_cocos2d_DrawNode_drawCircle); + oluacls_func(L, "drawCubicBezier", _olua_fun_cocos2d_DrawNode_drawCubicBezier); + oluacls_func(L, "drawDot", _olua_fun_cocos2d_DrawNode_drawDot); + oluacls_func(L, "drawLine", _olua_fun_cocos2d_DrawNode_drawLine); + oluacls_func(L, "drawPoint", _olua_fun_cocos2d_DrawNode_drawPoint); + oluacls_func(L, "drawPoints", _olua_fun_cocos2d_DrawNode_drawPoints); + oluacls_func(L, "drawPoly", _olua_fun_cocos2d_DrawNode_drawPoly); + oluacls_func(L, "drawPolygon", _olua_fun_cocos2d_DrawNode_drawPolygon); + oluacls_func(L, "drawQuadBezier", _olua_fun_cocos2d_DrawNode_drawQuadBezier); + oluacls_func(L, "drawRect", _olua_fun_cocos2d_DrawNode_drawRect); + oluacls_func(L, "drawSegment", _olua_fun_cocos2d_DrawNode_drawSegment); + oluacls_func(L, "drawSolidCircle", _olua_fun_cocos2d_DrawNode_drawSolidCircle); + oluacls_func(L, "drawSolidPoly", _olua_fun_cocos2d_DrawNode_drawSolidPoly); + oluacls_func(L, "drawSolidRect", _olua_fun_cocos2d_DrawNode_drawSolidRect); + oluacls_func(L, "drawTriangle", _olua_fun_cocos2d_DrawNode_drawTriangle); + oluacls_func(L, "getBlendFunc", _olua_fun_cocos2d_DrawNode_getBlendFunc); + oluacls_func(L, "getLineWidth", _olua_fun_cocos2d_DrawNode_getLineWidth); + oluacls_func(L, "isIsolated", _olua_fun_cocos2d_DrawNode_isIsolated); + oluacls_func(L, "new", _olua_fun_cocos2d_DrawNode_new); + oluacls_func(L, "setBlendFunc", _olua_fun_cocos2d_DrawNode_setBlendFunc); + oluacls_func(L, "setIsolated", _olua_fun_cocos2d_DrawNode_setIsolated); + oluacls_func(L, "setLineWidth", _olua_fun_cocos2d_DrawNode_setLineWidth); + oluacls_prop(L, "blendFunc", _olua_fun_cocos2d_DrawNode_getBlendFunc, _olua_fun_cocos2d_DrawNode_setBlendFunc); + oluacls_prop(L, "isolated", _olua_fun_cocos2d_DrawNode_isIsolated, _olua_fun_cocos2d_DrawNode_setIsolated); + oluacls_prop(L, "lineWidth", _olua_fun_cocos2d_DrawNode_getLineWidth, _olua_fun_cocos2d_DrawNode_setLineWidth); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_DrawNode(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.DrawNode")) { + luaL_error(L, "class not found: cocos2d::DrawNode"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_ParallaxNode_addChild$1(lua_State *L) +static int _olua_fun_cocos2d_ParallaxNode_addChild$1(lua_State *L) { olua_startinvoke(L); cocos2d::ParallaxNode *self = nullptr; cocos2d::Node *arg1 = nullptr; /** child */ int arg2 = 0; /** z */ - cocos2d::Vec2 arg3; /** parallaxRatio */ - cocos2d::Vec2 arg4; /** positionOffset */ + cocos2d::Vec2 *arg3; /** parallaxRatio */ + cocos2d::Vec2 *arg4; /** positionOffset */ olua_to_object(L, 1, &self, "cc.ParallaxNode"); olua_check_object(L, 2, &arg1, "cc.Node"); @@ -28446,18 +30236,18 @@ static int _cocos2d_ParallaxNode_addChild$1(lua_State *L) olua_check_object(L, 4, &arg3, "cc.Vec2"); olua_check_object(L, 5, &arg4, "cc.Vec2"); - // void addChild(@addref(chilren |) cocos2d::Node *child, int z, const cocos2d::Vec2 ¶llaxRatio, const cocos2d::Vec2 &positionOffset) - self->addChild(arg1, arg2, arg3, arg4); + // void addChild(@addref(children |) cocos2d::Node *child, int z, const cocos2d::Vec2 ¶llaxRatio, const cocos2d::Vec2 &positionOffset) + self->addChild(arg1, arg2, *arg3, *arg4); // insert code after call - olua_addref(L, 1, "chilren", 2, OLUA_REF_MULTI); + olua_addref(L, 1, "children", 2, OLUA_REF_MULTI); olua_endinvoke(L); return 0; } -static int _cocos2d_ParallaxNode_addChild$2(lua_State *L) +static int _olua_fun_cocos2d_ParallaxNode_addChild$2(lua_State *L) { olua_startinvoke(L); @@ -28471,18 +30261,18 @@ static int _cocos2d_ParallaxNode_addChild$2(lua_State *L) olua_check_integer(L, 3, &arg2); olua_check_integer(L, 4, &arg3); - // @using void addChild(@addref(chilren |) cocos2d::Node *child, int zOrder, int tag) + // @using void addChild(@addref(children |) cocos2d::Node *child, int zOrder, int tag) self->addChild(arg1, arg2, arg3); // insert code after call - olua_addref(L, 1, "chilren", 2, OLUA_REF_MULTI); + olua_addref(L, 1, "children", 2, OLUA_REF_MULTI); olua_endinvoke(L); return 0; } -static int _cocos2d_ParallaxNode_addChild$3(lua_State *L) +static int _olua_fun_cocos2d_ParallaxNode_addChild$3(lua_State *L) { olua_startinvoke(L); @@ -28496,18 +30286,18 @@ static int _cocos2d_ParallaxNode_addChild$3(lua_State *L) olua_check_integer(L, 3, &arg2); olua_check_string(L, 4, &arg3); - // @using void addChild(@addref(chilren |) cocos2d::Node *child, int zOrder, const std::string &name) + // @using void addChild(@addref(children |) cocos2d::Node *child, int zOrder, const std::string &name) self->addChild(arg1, arg2, arg3); // insert code after call - olua_addref(L, 1, "chilren", 2, OLUA_REF_MULTI); + olua_addref(L, 1, "children", 2, OLUA_REF_MULTI); olua_endinvoke(L); return 0; } -static int _cocos2d_ParallaxNode_addChild$4(lua_State *L) +static int _olua_fun_cocos2d_ParallaxNode_addChild$4(lua_State *L) { olua_startinvoke(L); @@ -28528,7 +30318,7 @@ static int _cocos2d_ParallaxNode_addChild$4(lua_State *L) return 0; } -static int _cocos2d_ParallaxNode_addChild$5(lua_State *L) +static int _olua_fun_cocos2d_ParallaxNode_addChild$5(lua_State *L) { olua_startinvoke(L); @@ -28551,40 +30341,40 @@ static int _cocos2d_ParallaxNode_addChild$5(lua_State *L) return 0; } -static int _cocos2d_ParallaxNode_addChild(lua_State *L) +static int _olua_fun_cocos2d_ParallaxNode_addChild(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_object(L, 2, "cc.Node"))) { // @using void addChild(@addref(children |) cocos2d::Node *child) - return _cocos2d_ParallaxNode_addChild$4(L); + return _olua_fun_cocos2d_ParallaxNode_addChild$4(L); // } } if (num_args == 2) { // if ((olua_is_object(L, 2, "cc.Node")) && (olua_is_integer(L, 3))) { // @using void addChild(@addref(children |) cocos2d::Node *child, int localZOrder) - return _cocos2d_ParallaxNode_addChild$5(L); + return _olua_fun_cocos2d_ParallaxNode_addChild$5(L); // } } if (num_args == 3) { if ((olua_is_object(L, 2, "cc.Node")) && (olua_is_integer(L, 3)) && (olua_is_integer(L, 4))) { - // @using void addChild(@addref(chilren |) cocos2d::Node *child, int zOrder, int tag) - return _cocos2d_ParallaxNode_addChild$2(L); + // @using void addChild(@addref(children |) cocos2d::Node *child, int zOrder, int tag) + return _olua_fun_cocos2d_ParallaxNode_addChild$2(L); } // if ((olua_is_object(L, 2, "cc.Node")) && (olua_is_integer(L, 3)) && (olua_is_string(L, 4))) { - // @using void addChild(@addref(chilren |) cocos2d::Node *child, int zOrder, const std::string &name) - return _cocos2d_ParallaxNode_addChild$3(L); + // @using void addChild(@addref(children |) cocos2d::Node *child, int zOrder, const std::string &name) + return _olua_fun_cocos2d_ParallaxNode_addChild$3(L); // } } if (num_args == 4) { // if ((olua_is_object(L, 2, "cc.Node")) && (olua_is_integer(L, 3)) && (olua_is_object(L, 4, "cc.Vec2")) && (olua_is_object(L, 5, "cc.Vec2"))) { - // void addChild(@addref(chilren |) cocos2d::Node *child, int z, const cocos2d::Vec2 ¶llaxRatio, const cocos2d::Vec2 &positionOffset) - return _cocos2d_ParallaxNode_addChild$1(L); + // void addChild(@addref(children |) cocos2d::Node *child, int z, const cocos2d::Vec2 ¶llaxRatio, const cocos2d::Vec2 &positionOffset) + return _olua_fun_cocos2d_ParallaxNode_addChild$1(L); // } } @@ -28593,7 +30383,7 @@ static int _cocos2d_ParallaxNode_addChild(lua_State *L) return 0; } -static int _cocos2d_ParallaxNode_create(lua_State *L) +static int _olua_fun_cocos2d_ParallaxNode_create(lua_State *L) { olua_startinvoke(L); @@ -28606,11 +30396,11 @@ static int _cocos2d_ParallaxNode_create(lua_State *L) return num_ret; } -static int _cocos2d_ParallaxNode_new(lua_State *L) +static int _olua_fun_cocos2d_ParallaxNode_new(lua_State *L) { olua_startinvoke(L); - // ParallaxNode() + // cocos2d::ParallaxNode() cocos2d::ParallaxNode *ret = new cocos2d::ParallaxNode(); int num_ret = olua_push_object(L, ret, "cc.ParallaxNode"); olua_postnew(L, ret); @@ -28620,20 +30410,28 @@ static int _cocos2d_ParallaxNode_new(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ParallaxNode(lua_State *L) +static int _olua_cls_cc_ParallaxNode(lua_State *L) { oluacls_class(L, "cc.ParallaxNode"); - oluacls_func(L, "addChild", _cocos2d_ParallaxNode_addChild); - oluacls_func(L, "create", _cocos2d_ParallaxNode_create); - oluacls_func(L, "new", _cocos2d_ParallaxNode_new); + oluacls_func(L, "addChild", _olua_fun_cocos2d_ParallaxNode_addChild); + oluacls_func(L, "create", _olua_fun_cocos2d_ParallaxNode_create); + oluacls_func(L, "new", _olua_fun_cocos2d_ParallaxNode_new); return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_TextHAlignment(lua_State *L) +OLUA_LIB int luaopen_cc_ParallaxNode(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.ParallaxNode")) { + luaL_error(L, "class not found: cocos2d::ParallaxNode"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_cc_TextHAlignment(lua_State *L) { oluacls_class(L, "cc.TextHAlignment"); oluacls_func(L, "__index", olua_indexerror); @@ -28644,10 +30442,19 @@ OLUA_LIB int luaopen_cocos2d_TextHAlignment(lua_State *L) return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_TextVAlignment(lua_State *L) +OLUA_LIB int luaopen_cc_TextHAlignment(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.TextHAlignment")) { + luaL_error(L, "class not found: cocos2d::TextHAlignment"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_cc_TextVAlignment(lua_State *L) { oluacls_class(L, "cc.TextVAlignment"); oluacls_func(L, "__index", olua_indexerror); @@ -28658,10 +30465,19 @@ OLUA_LIB int luaopen_cocos2d_TextVAlignment(lua_State *L) return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_GlyphCollection(lua_State *L) +OLUA_LIB int luaopen_cc_TextVAlignment(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.TextVAlignment")) { + luaL_error(L, "class not found: cocos2d::TextVAlignment"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_cc_GlyphCollection(lua_State *L) { oluacls_class(L, "cc.GlyphCollection"); oluacls_func(L, "__index", olua_indexerror); @@ -28673,10 +30489,19 @@ OLUA_LIB int luaopen_cocos2d_GlyphCollection(lua_State *L) return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_LabelEffect(lua_State *L) +OLUA_LIB int luaopen_cc_GlyphCollection(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.GlyphCollection")) { + luaL_error(L, "class not found: cocos2d::GlyphCollection"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_cc_LabelEffect(lua_State *L) { oluacls_class(L, "cc.LabelEffect"); oluacls_func(L, "__index", olua_indexerror); @@ -28693,10 +30518,19 @@ OLUA_LIB int luaopen_cocos2d_LabelEffect(lua_State *L) return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_Label_LabelType(lua_State *L) +OLUA_LIB int luaopen_cc_LabelEffect(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.LabelEffect")) { + luaL_error(L, "class not found: cocos2d::LabelEffect"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_cc_Label_LabelType(lua_State *L) { oluacls_class(L, "cc.Label.LabelType"); oluacls_func(L, "__index", olua_indexerror); @@ -28708,10 +30542,19 @@ OLUA_LIB int luaopen_cocos2d_Label_LabelType(lua_State *L) return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_Label_Overflow(lua_State *L) +OLUA_LIB int luaopen_cc_Label_LabelType(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.Label.LabelType")) { + luaL_error(L, "class not found: cocos2d::Label::LabelType"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_cc_Label_Overflow(lua_State *L) { oluacls_class(L, "cc.Label.Overflow"); oluacls_func(L, "__index", olua_indexerror); @@ -28723,9 +30566,19 @@ OLUA_LIB int luaopen_cocos2d_Label_Overflow(lua_State *L) return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_Label_Overflow(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.Label.Overflow")) { + luaL_error(L, "class not found: cocos2d::Label::Overflow"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_LabelProtocol___gc(lua_State *L) +static int _olua_fun_cocos2d_LabelProtocol___gc(lua_State *L) { olua_startinvoke(L); @@ -28737,7 +30590,7 @@ static int _cocos2d_LabelProtocol___gc(lua_State *L) return 0; } -static int _cocos2d_LabelProtocol___olua_move(lua_State *L) +static int _olua_fun_cocos2d_LabelProtocol___olua_move(lua_State *L) { olua_startinvoke(L); @@ -28749,7 +30602,7 @@ static int _cocos2d_LabelProtocol___olua_move(lua_State *L) return 1; } -static int _cocos2d_LabelProtocol_getString(lua_State *L) +static int _olua_fun_cocos2d_LabelProtocol_getString(lua_State *L) { olua_startinvoke(L); @@ -28766,7 +30619,7 @@ static int _cocos2d_LabelProtocol_getString(lua_State *L) return num_ret; } -static int _cocos2d_LabelProtocol_setString(lua_State *L) +static int _olua_fun_cocos2d_LabelProtocol_setString(lua_State *L) { olua_startinvoke(L); @@ -28784,21 +30637,30 @@ static int _cocos2d_LabelProtocol_setString(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_LabelProtocol(lua_State *L) +static int _olua_cls_cc_LabelProtocol(lua_State *L) { oluacls_class(L, "cc.LabelProtocol"); - oluacls_func(L, "__gc", _cocos2d_LabelProtocol___gc); - oluacls_func(L, "__olua_move", _cocos2d_LabelProtocol___olua_move); - oluacls_func(L, "getString", _cocos2d_LabelProtocol_getString); - oluacls_func(L, "setString", _cocos2d_LabelProtocol_setString); - oluacls_prop(L, "string", _cocos2d_LabelProtocol_getString, _cocos2d_LabelProtocol_setString); + oluacls_func(L, "__gc", _olua_fun_cocos2d_LabelProtocol___gc); + oluacls_func(L, "__olua_move", _olua_fun_cocos2d_LabelProtocol___olua_move); + oluacls_func(L, "getString", _olua_fun_cocos2d_LabelProtocol_getString); + oluacls_func(L, "setString", _olua_fun_cocos2d_LabelProtocol_setString); + oluacls_prop(L, "string", _olua_fun_cocos2d_LabelProtocol_getString, _olua_fun_cocos2d_LabelProtocol_setString); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_LabelProtocol(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.LabelProtocol")) { + luaL_error(L, "class not found: cocos2d::LabelProtocol"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_Label_as(lua_State *L) +static int _olua_fun_cocos2d_Label_as(lua_State *L) { olua_startinvoke(L); @@ -28830,7 +30692,7 @@ static int _cocos2d_Label_as(lua_State *L) return 1; } -static int _cocos2d_Label_create(lua_State *L) +static int _olua_fun_cocos2d_Label_create(lua_State *L) { olua_startinvoke(L); @@ -28843,7 +30705,7 @@ static int _cocos2d_Label_create(lua_State *L) return num_ret; } -static int _cocos2d_Label_createWithBMFont$1(lua_State *L) +static int _olua_fun_cocos2d_Label_createWithBMFont$1(lua_State *L) { olua_startinvoke(L); @@ -28866,26 +30728,18 @@ static int _cocos2d_Label_createWithBMFont$1(lua_State *L) return num_ret; } -static int _cocos2d_Label_createWithBMFont$2(lua_State *L) +static int _olua_fun_cocos2d_Label_createWithBMFont$2(lua_State *L) { olua_startinvoke(L); std::string arg1; /** bmfontPath */ std::string arg2; /** text */ - cocos2d::TextHAlignment arg3 = (cocos2d::TextHAlignment)0; /** hAlignment */ - int arg4 = 0; /** maxLineWidth */ - cocos2d::Rect arg5; /** imageRect */ - bool arg6 = false; /** imageRotated */ olua_check_string(L, 1, &arg1); olua_check_string(L, 2, &arg2); - olua_check_enum(L, 3, &arg3); - olua_check_integer(L, 4, &arg4); - olua_check_object(L, 5, &arg5, "cc.Rect"); - olua_check_bool(L, 6, &arg6); - // static cocos2d::Label *createWithBMFont(const std::string &bmfontPath, const std::string &text, const cocos2d::TextHAlignment &hAlignment, int maxLineWidth, const cocos2d::Rect &imageRect, bool imageRotated) - cocos2d::Label *ret = cocos2d::Label::createWithBMFont(arg1, arg2, arg3, arg4, arg5, arg6); + // static cocos2d::Label *createWithBMFont(const std::string &bmfontPath, const std::string &text) + cocos2d::Label *ret = cocos2d::Label::createWithBMFont(arg1, arg2); int num_ret = olua_push_object(L, ret, "cc.Label"); olua_endinvoke(L); @@ -28893,24 +30747,20 @@ static int _cocos2d_Label_createWithBMFont$2(lua_State *L) return num_ret; } -static int _cocos2d_Label_createWithBMFont$3(lua_State *L) +static int _olua_fun_cocos2d_Label_createWithBMFont$3(lua_State *L) { olua_startinvoke(L); std::string arg1; /** bmfontPath */ std::string arg2; /** text */ cocos2d::TextHAlignment arg3 = (cocos2d::TextHAlignment)0; /** hAlignment */ - int arg4 = 0; /** maxLineWidth */ - std::string arg5; /** subTextureKey */ olua_check_string(L, 1, &arg1); olua_check_string(L, 2, &arg2); olua_check_enum(L, 3, &arg3); - olua_check_integer(L, 4, &arg4); - olua_check_string(L, 5, &arg5); - // static cocos2d::Label *createWithBMFont(const std::string &bmfontPath, const std::string &text, const cocos2d::TextHAlignment &hAlignment, int maxLineWidth, const std::string &subTextureKey) - cocos2d::Label *ret = cocos2d::Label::createWithBMFont(arg1, arg2, arg3, arg4, arg5); + // static cocos2d::Label *createWithBMFont(const std::string &bmfontPath, const std::string &text, @optional const cocos2d::TextHAlignment &hAlignment) + cocos2d::Label *ret = cocos2d::Label::createWithBMFont(arg1, arg2, arg3); int num_ret = olua_push_object(L, ret, "cc.Label"); olua_endinvoke(L); @@ -28918,18 +30768,26 @@ static int _cocos2d_Label_createWithBMFont$3(lua_State *L) return num_ret; } -static int _cocos2d_Label_createWithBMFont$4(lua_State *L) +static int _olua_fun_cocos2d_Label_createWithBMFont$4(lua_State *L) { olua_startinvoke(L); std::string arg1; /** bmfontPath */ std::string arg2; /** text */ + cocos2d::TextHAlignment arg3 = (cocos2d::TextHAlignment)0; /** hAlignment */ + int arg4 = 0; /** maxLineWidth */ + cocos2d::Rect *arg5; /** imageRect */ + bool arg6 = false; /** imageRotated */ olua_check_string(L, 1, &arg1); olua_check_string(L, 2, &arg2); + olua_check_enum(L, 3, &arg3); + olua_check_integer(L, 4, &arg4); + olua_check_object(L, 5, &arg5, "cc.Rect"); + olua_check_bool(L, 6, &arg6); - // static cocos2d::Label *createWithBMFont(const std::string &bmfontPath, const std::string &text, @optional const cocos2d::TextHAlignment &hAlignment, @optional int maxLineWidth) - cocos2d::Label *ret = cocos2d::Label::createWithBMFont(arg1, arg2); + // static cocos2d::Label *createWithBMFont(const std::string &bmfontPath, const std::string &text, const cocos2d::TextHAlignment &hAlignment, int maxLineWidth, const cocos2d::Rect &imageRect, bool imageRotated) + cocos2d::Label *ret = cocos2d::Label::createWithBMFont(arg1, arg2, arg3, arg4, *arg5, arg6); int num_ret = olua_push_object(L, ret, "cc.Label"); olua_endinvoke(L); @@ -28937,20 +30795,24 @@ static int _cocos2d_Label_createWithBMFont$4(lua_State *L) return num_ret; } -static int _cocos2d_Label_createWithBMFont$5(lua_State *L) +static int _olua_fun_cocos2d_Label_createWithBMFont$5(lua_State *L) { olua_startinvoke(L); std::string arg1; /** bmfontPath */ std::string arg2; /** text */ cocos2d::TextHAlignment arg3 = (cocos2d::TextHAlignment)0; /** hAlignment */ + int arg4 = 0; /** maxLineWidth */ + std::string arg5; /** subTextureKey */ olua_check_string(L, 1, &arg1); olua_check_string(L, 2, &arg2); olua_check_enum(L, 3, &arg3); + olua_check_integer(L, 4, &arg4); + olua_check_string(L, 5, &arg5); - // static cocos2d::Label *createWithBMFont(const std::string &bmfontPath, const std::string &text, @optional const cocos2d::TextHAlignment &hAlignment, @optional int maxLineWidth) - cocos2d::Label *ret = cocos2d::Label::createWithBMFont(arg1, arg2, arg3); + // static cocos2d::Label *createWithBMFont(const std::string &bmfontPath, const std::string &text, const cocos2d::TextHAlignment &hAlignment, int maxLineWidth, const std::string &subTextureKey) + cocos2d::Label *ret = cocos2d::Label::createWithBMFont(arg1, arg2, arg3, arg4, arg5); int num_ret = olua_push_object(L, ret, "cc.Label"); olua_endinvoke(L); @@ -28958,42 +30820,42 @@ static int _cocos2d_Label_createWithBMFont$5(lua_State *L) return num_ret; } -static int _cocos2d_Label_createWithBMFont(lua_State *L) +static int _olua_fun_cocos2d_Label_createWithBMFont(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 2) { // if ((olua_is_string(L, 1)) && (olua_is_string(L, 2))) { - // static cocos2d::Label *createWithBMFont(const std::string &bmfontPath, const std::string &text, @optional const cocos2d::TextHAlignment &hAlignment, @optional int maxLineWidth) - return _cocos2d_Label_createWithBMFont$4(L); + // static cocos2d::Label *createWithBMFont(const std::string &bmfontPath, const std::string &text) + return _olua_fun_cocos2d_Label_createWithBMFont$2(L); // } } if (num_args == 3) { // if ((olua_is_string(L, 1)) && (olua_is_string(L, 2)) && (olua_is_enum(L, 3))) { - // static cocos2d::Label *createWithBMFont(const std::string &bmfontPath, const std::string &text, @optional const cocos2d::TextHAlignment &hAlignment, @optional int maxLineWidth) - return _cocos2d_Label_createWithBMFont$5(L); + // static cocos2d::Label *createWithBMFont(const std::string &bmfontPath, const std::string &text, @optional const cocos2d::TextHAlignment &hAlignment) + return _olua_fun_cocos2d_Label_createWithBMFont$3(L); // } } if (num_args == 4) { // if ((olua_is_string(L, 1)) && (olua_is_string(L, 2)) && (olua_is_enum(L, 3)) && (olua_is_integer(L, 4))) { // static cocos2d::Label *createWithBMFont(const std::string &bmfontPath, const std::string &text, @optional const cocos2d::TextHAlignment &hAlignment, @optional int maxLineWidth) - return _cocos2d_Label_createWithBMFont$1(L); + return _olua_fun_cocos2d_Label_createWithBMFont$1(L); // } } if (num_args == 5) { // if ((olua_is_string(L, 1)) && (olua_is_string(L, 2)) && (olua_is_enum(L, 3)) && (olua_is_integer(L, 4)) && (olua_is_string(L, 5))) { // static cocos2d::Label *createWithBMFont(const std::string &bmfontPath, const std::string &text, const cocos2d::TextHAlignment &hAlignment, int maxLineWidth, const std::string &subTextureKey) - return _cocos2d_Label_createWithBMFont$3(L); + return _olua_fun_cocos2d_Label_createWithBMFont$5(L); // } } if (num_args == 6) { // if ((olua_is_string(L, 1)) && (olua_is_string(L, 2)) && (olua_is_enum(L, 3)) && (olua_is_integer(L, 4)) && (olua_is_object(L, 5, "cc.Rect")) && (olua_is_bool(L, 6))) { // static cocos2d::Label *createWithBMFont(const std::string &bmfontPath, const std::string &text, const cocos2d::TextHAlignment &hAlignment, int maxLineWidth, const cocos2d::Rect &imageRect, bool imageRotated) - return _cocos2d_Label_createWithBMFont$2(L); + return _olua_fun_cocos2d_Label_createWithBMFont$4(L); // } } @@ -29002,7 +30864,7 @@ static int _cocos2d_Label_createWithBMFont(lua_State *L) return 0; } -static int _cocos2d_Label_createWithCharMap$1(lua_State *L) +static int _olua_fun_cocos2d_Label_createWithCharMap$1(lua_State *L) { olua_startinvoke(L); @@ -29025,7 +30887,7 @@ static int _cocos2d_Label_createWithCharMap$1(lua_State *L) return num_ret; } -static int _cocos2d_Label_createWithCharMap$2(lua_State *L) +static int _olua_fun_cocos2d_Label_createWithCharMap$2(lua_State *L) { olua_startinvoke(L); @@ -29048,7 +30910,7 @@ static int _cocos2d_Label_createWithCharMap$2(lua_State *L) return num_ret; } -static int _cocos2d_Label_createWithCharMap$3(lua_State *L) +static int _olua_fun_cocos2d_Label_createWithCharMap$3(lua_State *L) { olua_startinvoke(L); @@ -29065,26 +30927,26 @@ static int _cocos2d_Label_createWithCharMap$3(lua_State *L) return num_ret; } -static int _cocos2d_Label_createWithCharMap(lua_State *L) +static int _olua_fun_cocos2d_Label_createWithCharMap(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 1) { // if ((olua_is_string(L, 1))) { // static cocos2d::Label *createWithCharMap(const std::string &plistFile) - return _cocos2d_Label_createWithCharMap$3(L); + return _olua_fun_cocos2d_Label_createWithCharMap$3(L); // } } if (num_args == 4) { if ((olua_is_string(L, 1)) && (olua_is_integer(L, 2)) && (olua_is_integer(L, 3)) && (olua_is_integer(L, 4))) { // static cocos2d::Label *createWithCharMap(const std::string &charMapFile, int itemWidth, int itemHeight, int startCharMap) - return _cocos2d_Label_createWithCharMap$1(L); + return _olua_fun_cocos2d_Label_createWithCharMap$1(L); } // if ((olua_is_object(L, 1, "cc.Texture2D")) && (olua_is_integer(L, 2)) && (olua_is_integer(L, 3)) && (olua_is_integer(L, 4))) { // static cocos2d::Label *createWithCharMap(cocos2d::Texture2D *texture, int itemWidth, int itemHeight, int startCharMap) - return _cocos2d_Label_createWithCharMap$2(L); + return _olua_fun_cocos2d_Label_createWithCharMap$2(L); // } } @@ -29093,14 +30955,14 @@ static int _cocos2d_Label_createWithCharMap(lua_State *L) return 0; } -static int _cocos2d_Label_createWithSystemFont$1(lua_State *L) +static int _olua_fun_cocos2d_Label_createWithSystemFont$1(lua_State *L) { olua_startinvoke(L); std::string arg1; /** text */ std::string arg2; /** font */ float arg3 = 0; /** fontSize */ - cocos2d::Size arg4; /** dimensions */ + cocos2d::Size *arg4; /** dimensions */ cocos2d::TextHAlignment arg5 = (cocos2d::TextHAlignment)0; /** hAlignment */ cocos2d::TextVAlignment arg6 = (cocos2d::TextVAlignment)0; /** vAlignment */ @@ -29112,7 +30974,7 @@ static int _cocos2d_Label_createWithSystemFont$1(lua_State *L) olua_check_enum(L, 6, &arg6); // static cocos2d::Label *createWithSystemFont(const std::string &text, const std::string &font, float fontSize, @optional const cocos2d::Size &dimensions, @optional cocos2d::TextHAlignment hAlignment, @optional cocos2d::TextVAlignment vAlignment) - cocos2d::Label *ret = cocos2d::Label::createWithSystemFont(arg1, arg2, arg3, arg4, arg5, arg6); + cocos2d::Label *ret = cocos2d::Label::createWithSystemFont(arg1, arg2, arg3, *arg4, arg5, arg6); int num_ret = olua_push_object(L, ret, "cc.Label"); olua_endinvoke(L); @@ -29120,7 +30982,7 @@ static int _cocos2d_Label_createWithSystemFont$1(lua_State *L) return num_ret; } -static int _cocos2d_Label_createWithSystemFont$2(lua_State *L) +static int _olua_fun_cocos2d_Label_createWithSystemFont$2(lua_State *L) { olua_startinvoke(L); @@ -29132,7 +30994,7 @@ static int _cocos2d_Label_createWithSystemFont$2(lua_State *L) olua_check_string(L, 2, &arg2); olua_check_number(L, 3, &arg3); - // static cocos2d::Label *createWithSystemFont(const std::string &text, const std::string &font, float fontSize, @optional const cocos2d::Size &dimensions, @optional cocos2d::TextHAlignment hAlignment, @optional cocos2d::TextVAlignment vAlignment) + // static cocos2d::Label *createWithSystemFont(const std::string &text, const std::string &font, float fontSize) cocos2d::Label *ret = cocos2d::Label::createWithSystemFont(arg1, arg2, arg3); int num_ret = olua_push_object(L, ret, "cc.Label"); @@ -29141,22 +31003,22 @@ static int _cocos2d_Label_createWithSystemFont$2(lua_State *L) return num_ret; } -static int _cocos2d_Label_createWithSystemFont$3(lua_State *L) +static int _olua_fun_cocos2d_Label_createWithSystemFont$3(lua_State *L) { olua_startinvoke(L); std::string arg1; /** text */ std::string arg2; /** font */ float arg3 = 0; /** fontSize */ - cocos2d::Size arg4; /** dimensions */ + cocos2d::Size *arg4; /** dimensions */ olua_check_string(L, 1, &arg1); olua_check_string(L, 2, &arg2); olua_check_number(L, 3, &arg3); olua_check_object(L, 4, &arg4, "cc.Size"); - // static cocos2d::Label *createWithSystemFont(const std::string &text, const std::string &font, float fontSize, @optional const cocos2d::Size &dimensions, @optional cocos2d::TextHAlignment hAlignment, @optional cocos2d::TextVAlignment vAlignment) - cocos2d::Label *ret = cocos2d::Label::createWithSystemFont(arg1, arg2, arg3, arg4); + // static cocos2d::Label *createWithSystemFont(const std::string &text, const std::string &font, float fontSize, @optional const cocos2d::Size &dimensions) + cocos2d::Label *ret = cocos2d::Label::createWithSystemFont(arg1, arg2, arg3, *arg4); int num_ret = olua_push_object(L, ret, "cc.Label"); olua_endinvoke(L); @@ -29164,14 +31026,14 @@ static int _cocos2d_Label_createWithSystemFont$3(lua_State *L) return num_ret; } -static int _cocos2d_Label_createWithSystemFont$4(lua_State *L) +static int _olua_fun_cocos2d_Label_createWithSystemFont$4(lua_State *L) { olua_startinvoke(L); std::string arg1; /** text */ std::string arg2; /** font */ float arg3 = 0; /** fontSize */ - cocos2d::Size arg4; /** dimensions */ + cocos2d::Size *arg4; /** dimensions */ cocos2d::TextHAlignment arg5 = (cocos2d::TextHAlignment)0; /** hAlignment */ olua_check_string(L, 1, &arg1); @@ -29180,8 +31042,8 @@ static int _cocos2d_Label_createWithSystemFont$4(lua_State *L) olua_check_object(L, 4, &arg4, "cc.Size"); olua_check_enum(L, 5, &arg5); - // static cocos2d::Label *createWithSystemFont(const std::string &text, const std::string &font, float fontSize, @optional const cocos2d::Size &dimensions, @optional cocos2d::TextHAlignment hAlignment, @optional cocos2d::TextVAlignment vAlignment) - cocos2d::Label *ret = cocos2d::Label::createWithSystemFont(arg1, arg2, arg3, arg4, arg5); + // static cocos2d::Label *createWithSystemFont(const std::string &text, const std::string &font, float fontSize, @optional const cocos2d::Size &dimensions, @optional cocos2d::TextHAlignment hAlignment) + cocos2d::Label *ret = cocos2d::Label::createWithSystemFont(arg1, arg2, arg3, *arg4, arg5); int num_ret = olua_push_object(L, ret, "cc.Label"); olua_endinvoke(L); @@ -29189,35 +31051,35 @@ static int _cocos2d_Label_createWithSystemFont$4(lua_State *L) return num_ret; } -static int _cocos2d_Label_createWithSystemFont(lua_State *L) +static int _olua_fun_cocos2d_Label_createWithSystemFont(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 3) { // if ((olua_is_string(L, 1)) && (olua_is_string(L, 2)) && (olua_is_number(L, 3))) { - // static cocos2d::Label *createWithSystemFont(const std::string &text, const std::string &font, float fontSize, @optional const cocos2d::Size &dimensions, @optional cocos2d::TextHAlignment hAlignment, @optional cocos2d::TextVAlignment vAlignment) - return _cocos2d_Label_createWithSystemFont$2(L); + // static cocos2d::Label *createWithSystemFont(const std::string &text, const std::string &font, float fontSize) + return _olua_fun_cocos2d_Label_createWithSystemFont$2(L); // } } if (num_args == 4) { // if ((olua_is_string(L, 1)) && (olua_is_string(L, 2)) && (olua_is_number(L, 3)) && (olua_is_object(L, 4, "cc.Size"))) { - // static cocos2d::Label *createWithSystemFont(const std::string &text, const std::string &font, float fontSize, @optional const cocos2d::Size &dimensions, @optional cocos2d::TextHAlignment hAlignment, @optional cocos2d::TextVAlignment vAlignment) - return _cocos2d_Label_createWithSystemFont$3(L); + // static cocos2d::Label *createWithSystemFont(const std::string &text, const std::string &font, float fontSize, @optional const cocos2d::Size &dimensions) + return _olua_fun_cocos2d_Label_createWithSystemFont$3(L); // } } if (num_args == 5) { // if ((olua_is_string(L, 1)) && (olua_is_string(L, 2)) && (olua_is_number(L, 3)) && (olua_is_object(L, 4, "cc.Size")) && (olua_is_enum(L, 5))) { - // static cocos2d::Label *createWithSystemFont(const std::string &text, const std::string &font, float fontSize, @optional const cocos2d::Size &dimensions, @optional cocos2d::TextHAlignment hAlignment, @optional cocos2d::TextVAlignment vAlignment) - return _cocos2d_Label_createWithSystemFont$4(L); + // static cocos2d::Label *createWithSystemFont(const std::string &text, const std::string &font, float fontSize, @optional const cocos2d::Size &dimensions, @optional cocos2d::TextHAlignment hAlignment) + return _olua_fun_cocos2d_Label_createWithSystemFont$4(L); // } } if (num_args == 6) { // if ((olua_is_string(L, 1)) && (olua_is_string(L, 2)) && (olua_is_number(L, 3)) && (olua_is_object(L, 4, "cc.Size")) && (olua_is_enum(L, 5)) && (olua_is_enum(L, 6))) { // static cocos2d::Label *createWithSystemFont(const std::string &text, const std::string &font, float fontSize, @optional const cocos2d::Size &dimensions, @optional cocos2d::TextHAlignment hAlignment, @optional cocos2d::TextVAlignment vAlignment) - return _cocos2d_Label_createWithSystemFont$1(L); + return _olua_fun_cocos2d_Label_createWithSystemFont$1(L); // } } @@ -29226,14 +31088,14 @@ static int _cocos2d_Label_createWithSystemFont(lua_State *L) return 0; } -static int _cocos2d_Label_createWithTTF$1(lua_State *L) +static int _olua_fun_cocos2d_Label_createWithTTF$1(lua_State *L) { olua_startinvoke(L); std::string arg1; /** text */ std::string arg2; /** fontFilePath */ float arg3 = 0; /** fontSize */ - cocos2d::Size arg4; /** dimensions */ + cocos2d::Size *arg4; /** dimensions */ cocos2d::TextHAlignment arg5 = (cocos2d::TextHAlignment)0; /** hAlignment */ cocos2d::TextVAlignment arg6 = (cocos2d::TextVAlignment)0; /** vAlignment */ @@ -29245,7 +31107,7 @@ static int _cocos2d_Label_createWithTTF$1(lua_State *L) olua_check_enum(L, 6, &arg6); // static cocos2d::Label *createWithTTF(const std::string &text, const std::string &fontFilePath, float fontSize, @optional const cocos2d::Size &dimensions, @optional cocos2d::TextHAlignment hAlignment, @optional cocos2d::TextVAlignment vAlignment) - cocos2d::Label *ret = cocos2d::Label::createWithTTF(arg1, arg2, arg3, arg4, arg5, arg6); + cocos2d::Label *ret = cocos2d::Label::createWithTTF(arg1, arg2, arg3, *arg4, arg5, arg6); int num_ret = olua_push_object(L, ret, "cc.Label"); olua_endinvoke(L); @@ -29253,22 +31115,20 @@ static int _cocos2d_Label_createWithTTF$1(lua_State *L) return num_ret; } -static int _cocos2d_Label_createWithTTF$2(lua_State *L) +static int _olua_fun_cocos2d_Label_createWithTTF$2(lua_State *L) { olua_startinvoke(L); - cocos2d::TTFConfig arg1; /** ttfConfig */ - std::string arg2; /** text */ - cocos2d::TextHAlignment arg3 = (cocos2d::TextHAlignment)0; /** hAlignment */ - int arg4 = 0; /** maxLineWidth */ + std::string arg1; /** text */ + std::string arg2; /** fontFilePath */ + float arg3 = 0; /** fontSize */ - olua_check_object(L, 1, &arg1, "cc.TTFConfig"); + olua_check_string(L, 1, &arg1); olua_check_string(L, 2, &arg2); - olua_check_enum(L, 3, &arg3); - olua_check_integer(L, 4, &arg4); + olua_check_number(L, 3, &arg3); - // static cocos2d::Label *createWithTTF(const cocos2d::TTFConfig &ttfConfig, const std::string &text, @optional cocos2d::TextHAlignment hAlignment, @optional int maxLineWidth) - cocos2d::Label *ret = cocos2d::Label::createWithTTF(arg1, arg2, arg3, arg4); + // static cocos2d::Label *createWithTTF(const std::string &text, const std::string &fontFilePath, float fontSize) + cocos2d::Label *ret = cocos2d::Label::createWithTTF(arg1, arg2, arg3); int num_ret = olua_push_object(L, ret, "cc.Label"); olua_endinvoke(L); @@ -29276,20 +31136,22 @@ static int _cocos2d_Label_createWithTTF$2(lua_State *L) return num_ret; } -static int _cocos2d_Label_createWithTTF$3(lua_State *L) +static int _olua_fun_cocos2d_Label_createWithTTF$3(lua_State *L) { olua_startinvoke(L); std::string arg1; /** text */ std::string arg2; /** fontFilePath */ float arg3 = 0; /** fontSize */ + cocos2d::Size *arg4; /** dimensions */ olua_check_string(L, 1, &arg1); olua_check_string(L, 2, &arg2); olua_check_number(L, 3, &arg3); + olua_check_object(L, 4, &arg4, "cc.Size"); - // static cocos2d::Label *createWithTTF(const std::string &text, const std::string &fontFilePath, float fontSize, @optional const cocos2d::Size &dimensions, @optional cocos2d::TextHAlignment hAlignment, @optional cocos2d::TextVAlignment vAlignment) - cocos2d::Label *ret = cocos2d::Label::createWithTTF(arg1, arg2, arg3); + // static cocos2d::Label *createWithTTF(const std::string &text, const std::string &fontFilePath, float fontSize, @optional const cocos2d::Size &dimensions) + cocos2d::Label *ret = cocos2d::Label::createWithTTF(arg1, arg2, arg3, *arg4); int num_ret = olua_push_object(L, ret, "cc.Label"); olua_endinvoke(L); @@ -29297,22 +31159,24 @@ static int _cocos2d_Label_createWithTTF$3(lua_State *L) return num_ret; } -static int _cocos2d_Label_createWithTTF$4(lua_State *L) +static int _olua_fun_cocos2d_Label_createWithTTF$4(lua_State *L) { olua_startinvoke(L); std::string arg1; /** text */ std::string arg2; /** fontFilePath */ float arg3 = 0; /** fontSize */ - cocos2d::Size arg4; /** dimensions */ + cocos2d::Size *arg4; /** dimensions */ + cocos2d::TextHAlignment arg5 = (cocos2d::TextHAlignment)0; /** hAlignment */ olua_check_string(L, 1, &arg1); olua_check_string(L, 2, &arg2); olua_check_number(L, 3, &arg3); olua_check_object(L, 4, &arg4, "cc.Size"); + olua_check_enum(L, 5, &arg5); - // static cocos2d::Label *createWithTTF(const std::string &text, const std::string &fontFilePath, float fontSize, @optional const cocos2d::Size &dimensions, @optional cocos2d::TextHAlignment hAlignment, @optional cocos2d::TextVAlignment vAlignment) - cocos2d::Label *ret = cocos2d::Label::createWithTTF(arg1, arg2, arg3, arg4); + // static cocos2d::Label *createWithTTF(const std::string &text, const std::string &fontFilePath, float fontSize, @optional const cocos2d::Size &dimensions, @optional cocos2d::TextHAlignment hAlignment) + cocos2d::Label *ret = cocos2d::Label::createWithTTF(arg1, arg2, arg3, *arg4, arg5); int num_ret = olua_push_object(L, ret, "cc.Label"); olua_endinvoke(L); @@ -29320,24 +31184,22 @@ static int _cocos2d_Label_createWithTTF$4(lua_State *L) return num_ret; } -static int _cocos2d_Label_createWithTTF$5(lua_State *L) +static int _olua_fun_cocos2d_Label_createWithTTF$5(lua_State *L) { olua_startinvoke(L); - std::string arg1; /** text */ - std::string arg2; /** fontFilePath */ - float arg3 = 0; /** fontSize */ - cocos2d::Size arg4; /** dimensions */ - cocos2d::TextHAlignment arg5 = (cocos2d::TextHAlignment)0; /** hAlignment */ + cocos2d::TTFConfig *arg1; /** ttfConfig */ + std::string arg2; /** text */ + cocos2d::TextHAlignment arg3 = (cocos2d::TextHAlignment)0; /** hAlignment */ + int arg4 = 0; /** maxLineWidth */ - olua_check_string(L, 1, &arg1); + olua_check_object(L, 1, &arg1, "cc.TTFConfig"); olua_check_string(L, 2, &arg2); - olua_check_number(L, 3, &arg3); - olua_check_object(L, 4, &arg4, "cc.Size"); - olua_check_enum(L, 5, &arg5); + olua_check_enum(L, 3, &arg3); + olua_check_integer(L, 4, &arg4); - // static cocos2d::Label *createWithTTF(const std::string &text, const std::string &fontFilePath, float fontSize, @optional const cocos2d::Size &dimensions, @optional cocos2d::TextHAlignment hAlignment, @optional cocos2d::TextVAlignment vAlignment) - cocos2d::Label *ret = cocos2d::Label::createWithTTF(arg1, arg2, arg3, arg4, arg5); + // static cocos2d::Label *createWithTTF(const cocos2d::TTFConfig &ttfConfig, const std::string &text, @optional cocos2d::TextHAlignment hAlignment, @optional int maxLineWidth) + cocos2d::Label *ret = cocos2d::Label::createWithTTF(*arg1, arg2, arg3, arg4); int num_ret = olua_push_object(L, ret, "cc.Label"); olua_endinvoke(L); @@ -29345,18 +31207,18 @@ static int _cocos2d_Label_createWithTTF$5(lua_State *L) return num_ret; } -static int _cocos2d_Label_createWithTTF$6(lua_State *L) +static int _olua_fun_cocos2d_Label_createWithTTF$6(lua_State *L) { olua_startinvoke(L); - cocos2d::TTFConfig arg1; /** ttfConfig */ + cocos2d::TTFConfig *arg1; /** ttfConfig */ std::string arg2; /** text */ olua_check_object(L, 1, &arg1, "cc.TTFConfig"); olua_check_string(L, 2, &arg2); - // static cocos2d::Label *createWithTTF(const cocos2d::TTFConfig &ttfConfig, const std::string &text, @optional cocos2d::TextHAlignment hAlignment, @optional int maxLineWidth) - cocos2d::Label *ret = cocos2d::Label::createWithTTF(arg1, arg2); + // static cocos2d::Label *createWithTTF(const cocos2d::TTFConfig &ttfConfig, const std::string &text) + cocos2d::Label *ret = cocos2d::Label::createWithTTF(*arg1, arg2); int num_ret = olua_push_object(L, ret, "cc.Label"); olua_endinvoke(L); @@ -29364,11 +31226,11 @@ static int _cocos2d_Label_createWithTTF$6(lua_State *L) return num_ret; } -static int _cocos2d_Label_createWithTTF$7(lua_State *L) +static int _olua_fun_cocos2d_Label_createWithTTF$7(lua_State *L) { olua_startinvoke(L); - cocos2d::TTFConfig arg1; /** ttfConfig */ + cocos2d::TTFConfig *arg1; /** ttfConfig */ std::string arg2; /** text */ cocos2d::TextHAlignment arg3 = (cocos2d::TextHAlignment)0; /** hAlignment */ @@ -29376,8 +31238,8 @@ static int _cocos2d_Label_createWithTTF$7(lua_State *L) olua_check_string(L, 2, &arg2); olua_check_enum(L, 3, &arg3); - // static cocos2d::Label *createWithTTF(const cocos2d::TTFConfig &ttfConfig, const std::string &text, @optional cocos2d::TextHAlignment hAlignment, @optional int maxLineWidth) - cocos2d::Label *ret = cocos2d::Label::createWithTTF(arg1, arg2, arg3); + // static cocos2d::Label *createWithTTF(const cocos2d::TTFConfig &ttfConfig, const std::string &text, @optional cocos2d::TextHAlignment hAlignment) + cocos2d::Label *ret = cocos2d::Label::createWithTTF(*arg1, arg2, arg3); int num_ret = olua_push_object(L, ret, "cc.Label"); olua_endinvoke(L); @@ -29385,52 +31247,52 @@ static int _cocos2d_Label_createWithTTF$7(lua_State *L) return num_ret; } -static int _cocos2d_Label_createWithTTF(lua_State *L) +static int _olua_fun_cocos2d_Label_createWithTTF(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 2) { // if ((olua_is_object(L, 1, "cc.TTFConfig")) && (olua_is_string(L, 2))) { - // static cocos2d::Label *createWithTTF(const cocos2d::TTFConfig &ttfConfig, const std::string &text, @optional cocos2d::TextHAlignment hAlignment, @optional int maxLineWidth) - return _cocos2d_Label_createWithTTF$6(L); + // static cocos2d::Label *createWithTTF(const cocos2d::TTFConfig &ttfConfig, const std::string &text) + return _olua_fun_cocos2d_Label_createWithTTF$6(L); // } } if (num_args == 3) { if ((olua_is_string(L, 1)) && (olua_is_string(L, 2)) && (olua_is_number(L, 3))) { - // static cocos2d::Label *createWithTTF(const std::string &text, const std::string &fontFilePath, float fontSize, @optional const cocos2d::Size &dimensions, @optional cocos2d::TextHAlignment hAlignment, @optional cocos2d::TextVAlignment vAlignment) - return _cocos2d_Label_createWithTTF$3(L); + // static cocos2d::Label *createWithTTF(const std::string &text, const std::string &fontFilePath, float fontSize) + return _olua_fun_cocos2d_Label_createWithTTF$2(L); } // if ((olua_is_object(L, 1, "cc.TTFConfig")) && (olua_is_string(L, 2)) && (olua_is_enum(L, 3))) { - // static cocos2d::Label *createWithTTF(const cocos2d::TTFConfig &ttfConfig, const std::string &text, @optional cocos2d::TextHAlignment hAlignment, @optional int maxLineWidth) - return _cocos2d_Label_createWithTTF$7(L); + // static cocos2d::Label *createWithTTF(const cocos2d::TTFConfig &ttfConfig, const std::string &text, @optional cocos2d::TextHAlignment hAlignment) + return _olua_fun_cocos2d_Label_createWithTTF$7(L); // } } if (num_args == 4) { if ((olua_is_string(L, 1)) && (olua_is_string(L, 2)) && (olua_is_number(L, 3)) && (olua_is_object(L, 4, "cc.Size"))) { - // static cocos2d::Label *createWithTTF(const std::string &text, const std::string &fontFilePath, float fontSize, @optional const cocos2d::Size &dimensions, @optional cocos2d::TextHAlignment hAlignment, @optional cocos2d::TextVAlignment vAlignment) - return _cocos2d_Label_createWithTTF$4(L); + // static cocos2d::Label *createWithTTF(const std::string &text, const std::string &fontFilePath, float fontSize, @optional const cocos2d::Size &dimensions) + return _olua_fun_cocos2d_Label_createWithTTF$3(L); } // if ((olua_is_object(L, 1, "cc.TTFConfig")) && (olua_is_string(L, 2)) && (olua_is_enum(L, 3)) && (olua_is_integer(L, 4))) { // static cocos2d::Label *createWithTTF(const cocos2d::TTFConfig &ttfConfig, const std::string &text, @optional cocos2d::TextHAlignment hAlignment, @optional int maxLineWidth) - return _cocos2d_Label_createWithTTF$2(L); + return _olua_fun_cocos2d_Label_createWithTTF$5(L); // } } if (num_args == 5) { // if ((olua_is_string(L, 1)) && (olua_is_string(L, 2)) && (olua_is_number(L, 3)) && (olua_is_object(L, 4, "cc.Size")) && (olua_is_enum(L, 5))) { - // static cocos2d::Label *createWithTTF(const std::string &text, const std::string &fontFilePath, float fontSize, @optional const cocos2d::Size &dimensions, @optional cocos2d::TextHAlignment hAlignment, @optional cocos2d::TextVAlignment vAlignment) - return _cocos2d_Label_createWithTTF$5(L); + // static cocos2d::Label *createWithTTF(const std::string &text, const std::string &fontFilePath, float fontSize, @optional const cocos2d::Size &dimensions, @optional cocos2d::TextHAlignment hAlignment) + return _olua_fun_cocos2d_Label_createWithTTF$4(L); // } } if (num_args == 6) { // if ((olua_is_string(L, 1)) && (olua_is_string(L, 2)) && (olua_is_number(L, 3)) && (olua_is_object(L, 4, "cc.Size")) && (olua_is_enum(L, 5)) && (olua_is_enum(L, 6))) { // static cocos2d::Label *createWithTTF(const std::string &text, const std::string &fontFilePath, float fontSize, @optional const cocos2d::Size &dimensions, @optional cocos2d::TextHAlignment hAlignment, @optional cocos2d::TextVAlignment vAlignment) - return _cocos2d_Label_createWithTTF$1(L); + return _olua_fun_cocos2d_Label_createWithTTF$1(L); // } } @@ -29439,7 +31301,7 @@ static int _cocos2d_Label_createWithTTF(lua_State *L) return 0; } -static int _cocos2d_Label_disableEffect$1(lua_State *L) +static int _olua_fun_cocos2d_Label_disableEffect$1(lua_State *L) { olua_startinvoke(L); @@ -29455,7 +31317,7 @@ static int _cocos2d_Label_disableEffect$1(lua_State *L) return 0; } -static int _cocos2d_Label_disableEffect$2(lua_State *L) +static int _olua_fun_cocos2d_Label_disableEffect$2(lua_State *L) { olua_startinvoke(L); @@ -29473,19 +31335,19 @@ static int _cocos2d_Label_disableEffect$2(lua_State *L) return 0; } -static int _cocos2d_Label_disableEffect(lua_State *L) +static int _olua_fun_cocos2d_Label_disableEffect(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 0) { // void disableEffect() - return _cocos2d_Label_disableEffect$1(L); + return _olua_fun_cocos2d_Label_disableEffect$1(L); } if (num_args == 1) { // if ((olua_is_enum(L, 2))) { // void disableEffect(cocos2d::LabelEffect effect) - return _cocos2d_Label_disableEffect$2(L); + return _olua_fun_cocos2d_Label_disableEffect$2(L); // } } @@ -29494,7 +31356,7 @@ static int _cocos2d_Label_disableEffect(lua_State *L) return 0; } -static int _cocos2d_Label_enableBold(lua_State *L) +static int _olua_fun_cocos2d_Label_enableBold(lua_State *L) { olua_startinvoke(L); @@ -29510,7 +31372,7 @@ static int _cocos2d_Label_enableBold(lua_State *L) return 0; } -static int _cocos2d_Label_enableGlow(lua_State *L) +static int _olua_fun_cocos2d_Label_enableGlow(lua_State *L) { olua_startinvoke(L); @@ -29528,7 +31390,7 @@ static int _cocos2d_Label_enableGlow(lua_State *L) return 0; } -static int _cocos2d_Label_enableItalics(lua_State *L) +static int _olua_fun_cocos2d_Label_enableItalics(lua_State *L) { olua_startinvoke(L); @@ -29544,7 +31406,7 @@ static int _cocos2d_Label_enableItalics(lua_State *L) return 0; } -static int _cocos2d_Label_enableOutline$1(lua_State *L) +static int _olua_fun_cocos2d_Label_enableOutline$1(lua_State *L) { olua_startinvoke(L); @@ -29564,7 +31426,7 @@ static int _cocos2d_Label_enableOutline$1(lua_State *L) return 0; } -static int _cocos2d_Label_enableOutline$2(lua_State *L) +static int _olua_fun_cocos2d_Label_enableOutline$2(lua_State *L) { olua_startinvoke(L); @@ -29574,7 +31436,7 @@ static int _cocos2d_Label_enableOutline$2(lua_State *L) olua_to_object(L, 1, &self, "cc.Label"); olua_check_cocos2d_Color4B(L, 2, &arg1); - // void enableOutline(const cocos2d::Color4B &outlineColor, @optional int outlineSize) + // void enableOutline(const cocos2d::Color4B &outlineColor) self->enableOutline(arg1); olua_endinvoke(L); @@ -29582,21 +31444,21 @@ static int _cocos2d_Label_enableOutline$2(lua_State *L) return 0; } -static int _cocos2d_Label_enableOutline(lua_State *L) +static int _olua_fun_cocos2d_Label_enableOutline(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_cocos2d_Color4B(L, 2))) { - // void enableOutline(const cocos2d::Color4B &outlineColor, @optional int outlineSize) - return _cocos2d_Label_enableOutline$2(L); + // void enableOutline(const cocos2d::Color4B &outlineColor) + return _olua_fun_cocos2d_Label_enableOutline$2(L); // } } if (num_args == 2) { // if ((olua_is_cocos2d_Color4B(L, 2)) && (olua_is_integer(L, 3))) { // void enableOutline(const cocos2d::Color4B &outlineColor, @optional int outlineSize) - return _cocos2d_Label_enableOutline$1(L); + return _olua_fun_cocos2d_Label_enableOutline$1(L); // } } @@ -29605,13 +31467,13 @@ static int _cocos2d_Label_enableOutline(lua_State *L) return 0; } -static int _cocos2d_Label_enableShadow$1(lua_State *L) +static int _olua_fun_cocos2d_Label_enableShadow$1(lua_State *L) { olua_startinvoke(L); cocos2d::Label *self = nullptr; cocos2d::Color4B arg1; /** shadowColor */ - cocos2d::Size arg2; /** offset */ + cocos2d::Size *arg2; /** offset */ int arg3 = 0; /** blurRadius */ olua_to_object(L, 1, &self, "cc.Label"); @@ -29620,14 +31482,14 @@ static int _cocos2d_Label_enableShadow$1(lua_State *L) olua_check_integer(L, 4, &arg3); // void enableShadow(@optional const cocos2d::Color4B &shadowColor, @optional const cocos2d::Size &offset, @optional int blurRadius) - self->enableShadow(arg1, arg2, arg3); + self->enableShadow(arg1, *arg2, arg3); olua_endinvoke(L); return 0; } -static int _cocos2d_Label_enableShadow$2(lua_State *L) +static int _olua_fun_cocos2d_Label_enableShadow$2(lua_State *L) { olua_startinvoke(L); @@ -29635,7 +31497,7 @@ static int _cocos2d_Label_enableShadow$2(lua_State *L) olua_to_object(L, 1, &self, "cc.Label"); - // void enableShadow(@optional const cocos2d::Color4B &shadowColor, @optional const cocos2d::Size &offset, @optional int blurRadius) + // void enableShadow() self->enableShadow(); olua_endinvoke(L); @@ -29643,7 +31505,7 @@ static int _cocos2d_Label_enableShadow$2(lua_State *L) return 0; } -static int _cocos2d_Label_enableShadow$3(lua_State *L) +static int _olua_fun_cocos2d_Label_enableShadow$3(lua_State *L) { olua_startinvoke(L); @@ -29653,7 +31515,7 @@ static int _cocos2d_Label_enableShadow$3(lua_State *L) olua_to_object(L, 1, &self, "cc.Label"); olua_check_cocos2d_Color4B(L, 2, &arg1); - // void enableShadow(@optional const cocos2d::Color4B &shadowColor, @optional const cocos2d::Size &offset, @optional int blurRadius) + // void enableShadow(@optional const cocos2d::Color4B &shadowColor) self->enableShadow(arg1); olua_endinvoke(L); @@ -29661,53 +31523,53 @@ static int _cocos2d_Label_enableShadow$3(lua_State *L) return 0; } -static int _cocos2d_Label_enableShadow$4(lua_State *L) +static int _olua_fun_cocos2d_Label_enableShadow$4(lua_State *L) { olua_startinvoke(L); cocos2d::Label *self = nullptr; cocos2d::Color4B arg1; /** shadowColor */ - cocos2d::Size arg2; /** offset */ + cocos2d::Size *arg2; /** offset */ olua_to_object(L, 1, &self, "cc.Label"); olua_check_cocos2d_Color4B(L, 2, &arg1); olua_check_object(L, 3, &arg2, "cc.Size"); - // void enableShadow(@optional const cocos2d::Color4B &shadowColor, @optional const cocos2d::Size &offset, @optional int blurRadius) - self->enableShadow(arg1, arg2); + // void enableShadow(@optional const cocos2d::Color4B &shadowColor, @optional const cocos2d::Size &offset) + self->enableShadow(arg1, *arg2); olua_endinvoke(L); return 0; } -static int _cocos2d_Label_enableShadow(lua_State *L) +static int _olua_fun_cocos2d_Label_enableShadow(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 0) { - // void enableShadow(@optional const cocos2d::Color4B &shadowColor, @optional const cocos2d::Size &offset, @optional int blurRadius) - return _cocos2d_Label_enableShadow$2(L); + // void enableShadow() + return _olua_fun_cocos2d_Label_enableShadow$2(L); } if (num_args == 1) { // if ((olua_is_cocos2d_Color4B(L, 2))) { - // void enableShadow(@optional const cocos2d::Color4B &shadowColor, @optional const cocos2d::Size &offset, @optional int blurRadius) - return _cocos2d_Label_enableShadow$3(L); + // void enableShadow(@optional const cocos2d::Color4B &shadowColor) + return _olua_fun_cocos2d_Label_enableShadow$3(L); // } } if (num_args == 2) { // if ((olua_is_cocos2d_Color4B(L, 2)) && (olua_is_object(L, 3, "cc.Size"))) { - // void enableShadow(@optional const cocos2d::Color4B &shadowColor, @optional const cocos2d::Size &offset, @optional int blurRadius) - return _cocos2d_Label_enableShadow$4(L); + // void enableShadow(@optional const cocos2d::Color4B &shadowColor, @optional const cocos2d::Size &offset) + return _olua_fun_cocos2d_Label_enableShadow$4(L); // } } if (num_args == 3) { // if ((olua_is_cocos2d_Color4B(L, 2)) && (olua_is_object(L, 3, "cc.Size")) && (olua_is_integer(L, 4))) { // void enableShadow(@optional const cocos2d::Color4B &shadowColor, @optional const cocos2d::Size &offset, @optional int blurRadius) - return _cocos2d_Label_enableShadow$1(L); + return _olua_fun_cocos2d_Label_enableShadow$1(L); // } } @@ -29716,7 +31578,7 @@ static int _cocos2d_Label_enableShadow(lua_State *L) return 0; } -static int _cocos2d_Label_enableStrikethrough(lua_State *L) +static int _olua_fun_cocos2d_Label_enableStrikethrough(lua_State *L) { olua_startinvoke(L); @@ -29732,7 +31594,7 @@ static int _cocos2d_Label_enableStrikethrough(lua_State *L) return 0; } -static int _cocos2d_Label_enableUnderline(lua_State *L) +static int _olua_fun_cocos2d_Label_enableUnderline(lua_State *L) { olua_startinvoke(L); @@ -29748,7 +31610,7 @@ static int _cocos2d_Label_enableUnderline(lua_State *L) return 0; } -static int _cocos2d_Label_enableWrap(lua_State *L) +static int _olua_fun_cocos2d_Label_enableWrap(lua_State *L) { olua_startinvoke(L); @@ -29766,7 +31628,7 @@ static int _cocos2d_Label_enableWrap(lua_State *L) return 0; } -static int _cocos2d_Label_getAdditionalKerning(lua_State *L) +static int _olua_fun_cocos2d_Label_getAdditionalKerning(lua_State *L) { olua_startinvoke(L); @@ -29783,7 +31645,7 @@ static int _cocos2d_Label_getAdditionalKerning(lua_State *L) return num_ret; } -static int _cocos2d_Label_getBMFontFilePath(lua_State *L) +static int _olua_fun_cocos2d_Label_getBMFontFilePath(lua_State *L) { olua_startinvoke(L); @@ -29800,7 +31662,7 @@ static int _cocos2d_Label_getBMFontFilePath(lua_State *L) return num_ret; } -static int _cocos2d_Label_getBMFontSize(lua_State *L) +static int _olua_fun_cocos2d_Label_getBMFontSize(lua_State *L) { olua_startinvoke(L); @@ -29817,7 +31679,7 @@ static int _cocos2d_Label_getBMFontSize(lua_State *L) return num_ret; } -static int _cocos2d_Label_getBlendFunc(lua_State *L) +static int _olua_fun_cocos2d_Label_getBlendFunc(lua_State *L) { olua_startinvoke(L); @@ -29834,7 +31696,7 @@ static int _cocos2d_Label_getBlendFunc(lua_State *L) return num_ret; } -static int _cocos2d_Label_getDimensions(lua_State *L) +static int _olua_fun_cocos2d_Label_getDimensions(lua_State *L) { olua_startinvoke(L); @@ -29851,7 +31713,7 @@ static int _cocos2d_Label_getDimensions(lua_State *L) return num_ret; } -static int _cocos2d_Label_getEffectColor(lua_State *L) +static int _olua_fun_cocos2d_Label_getEffectColor(lua_State *L) { olua_startinvoke(L); @@ -29868,7 +31730,7 @@ static int _cocos2d_Label_getEffectColor(lua_State *L) return num_ret; } -static int _cocos2d_Label_getFontAtlas(lua_State *L) +static int _olua_fun_cocos2d_Label_getFontAtlas(lua_State *L) { olua_startinvoke(L); @@ -29885,7 +31747,7 @@ static int _cocos2d_Label_getFontAtlas(lua_State *L) return num_ret; } -static int _cocos2d_Label_getHeight(lua_State *L) +static int _olua_fun_cocos2d_Label_getHeight(lua_State *L) { olua_startinvoke(L); @@ -29902,7 +31764,7 @@ static int _cocos2d_Label_getHeight(lua_State *L) return num_ret; } -static int _cocos2d_Label_getHorizontalAlignment(lua_State *L) +static int _olua_fun_cocos2d_Label_getHorizontalAlignment(lua_State *L) { olua_startinvoke(L); @@ -29919,7 +31781,7 @@ static int _cocos2d_Label_getHorizontalAlignment(lua_State *L) return num_ret; } -static int _cocos2d_Label_getLabelEffectType(lua_State *L) +static int _olua_fun_cocos2d_Label_getLabelEffectType(lua_State *L) { olua_startinvoke(L); @@ -29936,7 +31798,7 @@ static int _cocos2d_Label_getLabelEffectType(lua_State *L) return num_ret; } -static int _cocos2d_Label_getLabelType(lua_State *L) +static int _olua_fun_cocos2d_Label_getLabelType(lua_State *L) { olua_startinvoke(L); @@ -29953,7 +31815,7 @@ static int _cocos2d_Label_getLabelType(lua_State *L) return num_ret; } -static int _cocos2d_Label_getLetter(lua_State *L) +static int _olua_fun_cocos2d_Label_getLetter(lua_State *L) { olua_startinvoke(L); @@ -29972,7 +31834,7 @@ static int _cocos2d_Label_getLetter(lua_State *L) return num_ret; } -static int _cocos2d_Label_getLineHeight(lua_State *L) +static int _olua_fun_cocos2d_Label_getLineHeight(lua_State *L) { olua_startinvoke(L); @@ -29989,7 +31851,7 @@ static int _cocos2d_Label_getLineHeight(lua_State *L) return num_ret; } -static int _cocos2d_Label_getLineSpacing(lua_State *L) +static int _olua_fun_cocos2d_Label_getLineSpacing(lua_State *L) { olua_startinvoke(L); @@ -30006,7 +31868,7 @@ static int _cocos2d_Label_getLineSpacing(lua_State *L) return num_ret; } -static int _cocos2d_Label_getMaxLineWidth(lua_State *L) +static int _olua_fun_cocos2d_Label_getMaxLineWidth(lua_State *L) { olua_startinvoke(L); @@ -30023,7 +31885,7 @@ static int _cocos2d_Label_getMaxLineWidth(lua_State *L) return num_ret; } -static int _cocos2d_Label_getOutlineSize(lua_State *L) +static int _olua_fun_cocos2d_Label_getOutlineSize(lua_State *L) { olua_startinvoke(L); @@ -30040,7 +31902,7 @@ static int _cocos2d_Label_getOutlineSize(lua_State *L) return num_ret; } -static int _cocos2d_Label_getOverflow(lua_State *L) +static int _olua_fun_cocos2d_Label_getOverflow(lua_State *L) { olua_startinvoke(L); @@ -30057,7 +31919,7 @@ static int _cocos2d_Label_getOverflow(lua_State *L) return num_ret; } -static int _cocos2d_Label_getRenderingFontSize(lua_State *L) +static int _olua_fun_cocos2d_Label_getRenderingFontSize(lua_State *L) { olua_startinvoke(L); @@ -30074,7 +31936,7 @@ static int _cocos2d_Label_getRenderingFontSize(lua_State *L) return num_ret; } -static int _cocos2d_Label_getShadowBlurRadius(lua_State *L) +static int _olua_fun_cocos2d_Label_getShadowBlurRadius(lua_State *L) { olua_startinvoke(L); @@ -30091,7 +31953,7 @@ static int _cocos2d_Label_getShadowBlurRadius(lua_State *L) return num_ret; } -static int _cocos2d_Label_getShadowColor(lua_State *L) +static int _olua_fun_cocos2d_Label_getShadowColor(lua_State *L) { olua_startinvoke(L); @@ -30108,7 +31970,7 @@ static int _cocos2d_Label_getShadowColor(lua_State *L) return num_ret; } -static int _cocos2d_Label_getShadowOffset(lua_State *L) +static int _olua_fun_cocos2d_Label_getShadowOffset(lua_State *L) { olua_startinvoke(L); @@ -30118,14 +31980,14 @@ static int _cocos2d_Label_getShadowOffset(lua_State *L) // cocos2d::Size getShadowOffset() cocos2d::Size ret = self->getShadowOffset(); - int num_ret = olua_pushcopy_object(L, ret, "cc.Size"); + int num_ret = olua_copy_object(L, ret, "cc.Size"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_Label_getString(lua_State *L) +static int _olua_fun_cocos2d_Label_getString(lua_State *L) { olua_startinvoke(L); @@ -30142,7 +32004,7 @@ static int _cocos2d_Label_getString(lua_State *L) return num_ret; } -static int _cocos2d_Label_getStringLength(lua_State *L) +static int _olua_fun_cocos2d_Label_getStringLength(lua_State *L) { olua_startinvoke(L); @@ -30159,7 +32021,7 @@ static int _cocos2d_Label_getStringLength(lua_State *L) return num_ret; } -static int _cocos2d_Label_getStringNumLines(lua_State *L) +static int _olua_fun_cocos2d_Label_getStringNumLines(lua_State *L) { olua_startinvoke(L); @@ -30176,7 +32038,7 @@ static int _cocos2d_Label_getStringNumLines(lua_State *L) return num_ret; } -static int _cocos2d_Label_getSystemFontName(lua_State *L) +static int _olua_fun_cocos2d_Label_getSystemFontName(lua_State *L) { olua_startinvoke(L); @@ -30193,7 +32055,7 @@ static int _cocos2d_Label_getSystemFontName(lua_State *L) return num_ret; } -static int _cocos2d_Label_getSystemFontSize(lua_State *L) +static int _olua_fun_cocos2d_Label_getSystemFontSize(lua_State *L) { olua_startinvoke(L); @@ -30210,7 +32072,7 @@ static int _cocos2d_Label_getSystemFontSize(lua_State *L) return num_ret; } -static int _cocos2d_Label_getTTFConfig(lua_State *L) +static int _olua_fun_cocos2d_Label_getTTFConfig(lua_State *L) { olua_startinvoke(L); @@ -30227,7 +32089,7 @@ static int _cocos2d_Label_getTTFConfig(lua_State *L) return num_ret; } -static int _cocos2d_Label_getTextAlignment(lua_State *L) +static int _olua_fun_cocos2d_Label_getTextAlignment(lua_State *L) { olua_startinvoke(L); @@ -30244,7 +32106,7 @@ static int _cocos2d_Label_getTextAlignment(lua_State *L) return num_ret; } -static int _cocos2d_Label_getTextColor(lua_State *L) +static int _olua_fun_cocos2d_Label_getTextColor(lua_State *L) { olua_startinvoke(L); @@ -30261,7 +32123,7 @@ static int _cocos2d_Label_getTextColor(lua_State *L) return num_ret; } -static int _cocos2d_Label_getVerticalAlignment(lua_State *L) +static int _olua_fun_cocos2d_Label_getVerticalAlignment(lua_State *L) { olua_startinvoke(L); @@ -30278,7 +32140,7 @@ static int _cocos2d_Label_getVerticalAlignment(lua_State *L) return num_ret; } -static int _cocos2d_Label_getWidth(lua_State *L) +static int _olua_fun_cocos2d_Label_getWidth(lua_State *L) { olua_startinvoke(L); @@ -30295,7 +32157,7 @@ static int _cocos2d_Label_getWidth(lua_State *L) return num_ret; } -static int _cocos2d_Label_initWithTTF$1(lua_State *L) +static int _olua_fun_cocos2d_Label_initWithTTF$1(lua_State *L) { olua_startinvoke(L); @@ -30303,7 +32165,7 @@ static int _cocos2d_Label_initWithTTF$1(lua_State *L) std::string arg1; /** text */ std::string arg2; /** fontFilePath */ float arg3 = 0; /** fontSize */ - cocos2d::Size arg4; /** dimensions */ + cocos2d::Size *arg4; /** dimensions */ cocos2d::TextHAlignment arg5 = (cocos2d::TextHAlignment)0; /** hAlignment */ cocos2d::TextVAlignment arg6 = (cocos2d::TextVAlignment)0; /** vAlignment */ @@ -30316,7 +32178,7 @@ static int _cocos2d_Label_initWithTTF$1(lua_State *L) olua_check_enum(L, 7, &arg6); // bool initWithTTF(const std::string &text, const std::string &fontFilePath, float fontSize, @optional const cocos2d::Size &dimensions, @optional cocos2d::TextHAlignment hAlignment, @optional cocos2d::TextVAlignment vAlignment) - bool ret = self->initWithTTF(arg1, arg2, arg3, arg4, arg5, arg6); + bool ret = self->initWithTTF(arg1, arg2, arg3, *arg4, arg5, arg6); int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); @@ -30324,24 +32186,22 @@ static int _cocos2d_Label_initWithTTF$1(lua_State *L) return num_ret; } -static int _cocos2d_Label_initWithTTF$2(lua_State *L) +static int _olua_fun_cocos2d_Label_initWithTTF$2(lua_State *L) { olua_startinvoke(L); cocos2d::Label *self = nullptr; - cocos2d::TTFConfig arg1; /** ttfConfig */ - std::string arg2; /** text */ - cocos2d::TextHAlignment arg3 = (cocos2d::TextHAlignment)0; /** hAlignment */ - int arg4 = 0; /** maxLineWidth */ + std::string arg1; /** text */ + std::string arg2; /** fontFilePath */ + float arg3 = 0; /** fontSize */ olua_to_object(L, 1, &self, "cc.Label"); - olua_check_object(L, 2, &arg1, "cc.TTFConfig"); + olua_check_string(L, 2, &arg1); olua_check_string(L, 3, &arg2); - olua_check_enum(L, 4, &arg3); - olua_check_integer(L, 5, &arg4); + olua_check_number(L, 4, &arg3); - // bool initWithTTF(const cocos2d::TTFConfig &ttfConfig, const std::string &text, @optional cocos2d::TextHAlignment hAlignment, @optional int maxLineWidth) - bool ret = self->initWithTTF(arg1, arg2, arg3, arg4); + // bool initWithTTF(const std::string &text, const std::string &fontFilePath, float fontSize) + bool ret = self->initWithTTF(arg1, arg2, arg3); int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); @@ -30349,7 +32209,7 @@ static int _cocos2d_Label_initWithTTF$2(lua_State *L) return num_ret; } -static int _cocos2d_Label_initWithTTF$3(lua_State *L) +static int _olua_fun_cocos2d_Label_initWithTTF$3(lua_State *L) { olua_startinvoke(L); @@ -30357,14 +32217,16 @@ static int _cocos2d_Label_initWithTTF$3(lua_State *L) std::string arg1; /** text */ std::string arg2; /** fontFilePath */ float arg3 = 0; /** fontSize */ + cocos2d::Size *arg4; /** dimensions */ olua_to_object(L, 1, &self, "cc.Label"); olua_check_string(L, 2, &arg1); olua_check_string(L, 3, &arg2); olua_check_number(L, 4, &arg3); + olua_check_object(L, 5, &arg4, "cc.Size"); - // bool initWithTTF(const std::string &text, const std::string &fontFilePath, float fontSize, @optional const cocos2d::Size &dimensions, @optional cocos2d::TextHAlignment hAlignment, @optional cocos2d::TextVAlignment vAlignment) - bool ret = self->initWithTTF(arg1, arg2, arg3); + // bool initWithTTF(const std::string &text, const std::string &fontFilePath, float fontSize, @optional const cocos2d::Size &dimensions) + bool ret = self->initWithTTF(arg1, arg2, arg3, *arg4); int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); @@ -30372,7 +32234,7 @@ static int _cocos2d_Label_initWithTTF$3(lua_State *L) return num_ret; } -static int _cocos2d_Label_initWithTTF$4(lua_State *L) +static int _olua_fun_cocos2d_Label_initWithTTF$4(lua_State *L) { olua_startinvoke(L); @@ -30380,16 +32242,18 @@ static int _cocos2d_Label_initWithTTF$4(lua_State *L) std::string arg1; /** text */ std::string arg2; /** fontFilePath */ float arg3 = 0; /** fontSize */ - cocos2d::Size arg4; /** dimensions */ + cocos2d::Size *arg4; /** dimensions */ + cocos2d::TextHAlignment arg5 = (cocos2d::TextHAlignment)0; /** hAlignment */ olua_to_object(L, 1, &self, "cc.Label"); olua_check_string(L, 2, &arg1); olua_check_string(L, 3, &arg2); olua_check_number(L, 4, &arg3); olua_check_object(L, 5, &arg4, "cc.Size"); + olua_check_enum(L, 6, &arg5); - // bool initWithTTF(const std::string &text, const std::string &fontFilePath, float fontSize, @optional const cocos2d::Size &dimensions, @optional cocos2d::TextHAlignment hAlignment, @optional cocos2d::TextVAlignment vAlignment) - bool ret = self->initWithTTF(arg1, arg2, arg3, arg4); + // bool initWithTTF(const std::string &text, const std::string &fontFilePath, float fontSize, @optional const cocos2d::Size &dimensions, @optional cocos2d::TextHAlignment hAlignment) + bool ret = self->initWithTTF(arg1, arg2, arg3, *arg4, arg5); int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); @@ -30397,26 +32261,24 @@ static int _cocos2d_Label_initWithTTF$4(lua_State *L) return num_ret; } -static int _cocos2d_Label_initWithTTF$5(lua_State *L) +static int _olua_fun_cocos2d_Label_initWithTTF$5(lua_State *L) { olua_startinvoke(L); cocos2d::Label *self = nullptr; - std::string arg1; /** text */ - std::string arg2; /** fontFilePath */ - float arg3 = 0; /** fontSize */ - cocos2d::Size arg4; /** dimensions */ - cocos2d::TextHAlignment arg5 = (cocos2d::TextHAlignment)0; /** hAlignment */ + cocos2d::TTFConfig *arg1; /** ttfConfig */ + std::string arg2; /** text */ + cocos2d::TextHAlignment arg3 = (cocos2d::TextHAlignment)0; /** hAlignment */ + int arg4 = 0; /** maxLineWidth */ olua_to_object(L, 1, &self, "cc.Label"); - olua_check_string(L, 2, &arg1); + olua_check_object(L, 2, &arg1, "cc.TTFConfig"); olua_check_string(L, 3, &arg2); - olua_check_number(L, 4, &arg3); - olua_check_object(L, 5, &arg4, "cc.Size"); - olua_check_enum(L, 6, &arg5); + olua_check_enum(L, 4, &arg3); + olua_check_integer(L, 5, &arg4); - // bool initWithTTF(const std::string &text, const std::string &fontFilePath, float fontSize, @optional const cocos2d::Size &dimensions, @optional cocos2d::TextHAlignment hAlignment, @optional cocos2d::TextVAlignment vAlignment) - bool ret = self->initWithTTF(arg1, arg2, arg3, arg4, arg5); + // bool initWithTTF(const cocos2d::TTFConfig &ttfConfig, const std::string &text, @optional cocos2d::TextHAlignment hAlignment, @optional int maxLineWidth) + bool ret = self->initWithTTF(*arg1, arg2, arg3, arg4); int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); @@ -30424,20 +32286,20 @@ static int _cocos2d_Label_initWithTTF$5(lua_State *L) return num_ret; } -static int _cocos2d_Label_initWithTTF$6(lua_State *L) +static int _olua_fun_cocos2d_Label_initWithTTF$6(lua_State *L) { olua_startinvoke(L); cocos2d::Label *self = nullptr; - cocos2d::TTFConfig arg1; /** ttfConfig */ + cocos2d::TTFConfig *arg1; /** ttfConfig */ std::string arg2; /** text */ olua_to_object(L, 1, &self, "cc.Label"); olua_check_object(L, 2, &arg1, "cc.TTFConfig"); olua_check_string(L, 3, &arg2); - // bool initWithTTF(const cocos2d::TTFConfig &ttfConfig, const std::string &text, @optional cocos2d::TextHAlignment hAlignment, @optional int maxLineWidth) - bool ret = self->initWithTTF(arg1, arg2); + // bool initWithTTF(const cocos2d::TTFConfig &ttfConfig, const std::string &text) + bool ret = self->initWithTTF(*arg1, arg2); int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); @@ -30445,12 +32307,12 @@ static int _cocos2d_Label_initWithTTF$6(lua_State *L) return num_ret; } -static int _cocos2d_Label_initWithTTF$7(lua_State *L) +static int _olua_fun_cocos2d_Label_initWithTTF$7(lua_State *L) { olua_startinvoke(L); cocos2d::Label *self = nullptr; - cocos2d::TTFConfig arg1; /** ttfConfig */ + cocos2d::TTFConfig *arg1; /** ttfConfig */ std::string arg2; /** text */ cocos2d::TextHAlignment arg3 = (cocos2d::TextHAlignment)0; /** hAlignment */ @@ -30459,8 +32321,8 @@ static int _cocos2d_Label_initWithTTF$7(lua_State *L) olua_check_string(L, 3, &arg2); olua_check_enum(L, 4, &arg3); - // bool initWithTTF(const cocos2d::TTFConfig &ttfConfig, const std::string &text, @optional cocos2d::TextHAlignment hAlignment, @optional int maxLineWidth) - bool ret = self->initWithTTF(arg1, arg2, arg3); + // bool initWithTTF(const cocos2d::TTFConfig &ttfConfig, const std::string &text, @optional cocos2d::TextHAlignment hAlignment) + bool ret = self->initWithTTF(*arg1, arg2, arg3); int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); @@ -30468,52 +32330,52 @@ static int _cocos2d_Label_initWithTTF$7(lua_State *L) return num_ret; } -static int _cocos2d_Label_initWithTTF(lua_State *L) +static int _olua_fun_cocos2d_Label_initWithTTF(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 2) { // if ((olua_is_object(L, 2, "cc.TTFConfig")) && (olua_is_string(L, 3))) { - // bool initWithTTF(const cocos2d::TTFConfig &ttfConfig, const std::string &text, @optional cocos2d::TextHAlignment hAlignment, @optional int maxLineWidth) - return _cocos2d_Label_initWithTTF$6(L); + // bool initWithTTF(const cocos2d::TTFConfig &ttfConfig, const std::string &text) + return _olua_fun_cocos2d_Label_initWithTTF$6(L); // } } if (num_args == 3) { if ((olua_is_string(L, 2)) && (olua_is_string(L, 3)) && (olua_is_number(L, 4))) { - // bool initWithTTF(const std::string &text, const std::string &fontFilePath, float fontSize, @optional const cocos2d::Size &dimensions, @optional cocos2d::TextHAlignment hAlignment, @optional cocos2d::TextVAlignment vAlignment) - return _cocos2d_Label_initWithTTF$3(L); + // bool initWithTTF(const std::string &text, const std::string &fontFilePath, float fontSize) + return _olua_fun_cocos2d_Label_initWithTTF$2(L); } // if ((olua_is_object(L, 2, "cc.TTFConfig")) && (olua_is_string(L, 3)) && (olua_is_enum(L, 4))) { - // bool initWithTTF(const cocos2d::TTFConfig &ttfConfig, const std::string &text, @optional cocos2d::TextHAlignment hAlignment, @optional int maxLineWidth) - return _cocos2d_Label_initWithTTF$7(L); + // bool initWithTTF(const cocos2d::TTFConfig &ttfConfig, const std::string &text, @optional cocos2d::TextHAlignment hAlignment) + return _olua_fun_cocos2d_Label_initWithTTF$7(L); // } } if (num_args == 4) { if ((olua_is_string(L, 2)) && (olua_is_string(L, 3)) && (olua_is_number(L, 4)) && (olua_is_object(L, 5, "cc.Size"))) { - // bool initWithTTF(const std::string &text, const std::string &fontFilePath, float fontSize, @optional const cocos2d::Size &dimensions, @optional cocos2d::TextHAlignment hAlignment, @optional cocos2d::TextVAlignment vAlignment) - return _cocos2d_Label_initWithTTF$4(L); + // bool initWithTTF(const std::string &text, const std::string &fontFilePath, float fontSize, @optional const cocos2d::Size &dimensions) + return _olua_fun_cocos2d_Label_initWithTTF$3(L); } // if ((olua_is_object(L, 2, "cc.TTFConfig")) && (olua_is_string(L, 3)) && (olua_is_enum(L, 4)) && (olua_is_integer(L, 5))) { // bool initWithTTF(const cocos2d::TTFConfig &ttfConfig, const std::string &text, @optional cocos2d::TextHAlignment hAlignment, @optional int maxLineWidth) - return _cocos2d_Label_initWithTTF$2(L); + return _olua_fun_cocos2d_Label_initWithTTF$5(L); // } } if (num_args == 5) { // if ((olua_is_string(L, 2)) && (olua_is_string(L, 3)) && (olua_is_number(L, 4)) && (olua_is_object(L, 5, "cc.Size")) && (olua_is_enum(L, 6))) { - // bool initWithTTF(const std::string &text, const std::string &fontFilePath, float fontSize, @optional const cocos2d::Size &dimensions, @optional cocos2d::TextHAlignment hAlignment, @optional cocos2d::TextVAlignment vAlignment) - return _cocos2d_Label_initWithTTF$5(L); + // bool initWithTTF(const std::string &text, const std::string &fontFilePath, float fontSize, @optional const cocos2d::Size &dimensions, @optional cocos2d::TextHAlignment hAlignment) + return _olua_fun_cocos2d_Label_initWithTTF$4(L); // } } if (num_args == 6) { // if ((olua_is_string(L, 2)) && (olua_is_string(L, 3)) && (olua_is_number(L, 4)) && (olua_is_object(L, 5, "cc.Size")) && (olua_is_enum(L, 6)) && (olua_is_enum(L, 7))) { // bool initWithTTF(const std::string &text, const std::string &fontFilePath, float fontSize, @optional const cocos2d::Size &dimensions, @optional cocos2d::TextHAlignment hAlignment, @optional cocos2d::TextVAlignment vAlignment) - return _cocos2d_Label_initWithTTF$1(L); + return _olua_fun_cocos2d_Label_initWithTTF$1(L); // } } @@ -30522,7 +32384,7 @@ static int _cocos2d_Label_initWithTTF(lua_State *L) return 0; } -static int _cocos2d_Label_isClipMarginEnabled(lua_State *L) +static int _olua_fun_cocos2d_Label_isClipMarginEnabled(lua_State *L) { olua_startinvoke(L); @@ -30539,7 +32401,7 @@ static int _cocos2d_Label_isClipMarginEnabled(lua_State *L) return num_ret; } -static int _cocos2d_Label_isShadowEnabled(lua_State *L) +static int _olua_fun_cocos2d_Label_isShadowEnabled(lua_State *L) { olua_startinvoke(L); @@ -30556,7 +32418,7 @@ static int _cocos2d_Label_isShadowEnabled(lua_State *L) return num_ret; } -static int _cocos2d_Label_isWrapEnabled(lua_State *L) +static int _olua_fun_cocos2d_Label_isWrapEnabled(lua_State *L) { olua_startinvoke(L); @@ -30573,7 +32435,7 @@ static int _cocos2d_Label_isWrapEnabled(lua_State *L) return num_ret; } -static int _cocos2d_Label_new$1(lua_State *L) +static int _olua_fun_cocos2d_Label_new$1(lua_State *L) { olua_startinvoke(L); @@ -30583,7 +32445,7 @@ static int _cocos2d_Label_new$1(lua_State *L) olua_check_enum(L, 1, &arg1); olua_check_enum(L, 2, &arg2); - // Label(@optional cocos2d::TextHAlignment hAlignment, @optional cocos2d::TextVAlignment vAlignment) + // cocos2d::Label(@optional cocos2d::TextHAlignment hAlignment, @optional cocos2d::TextVAlignment vAlignment) cocos2d::Label *ret = new cocos2d::Label(arg1, arg2); int num_ret = olua_push_object(L, ret, "cc.Label"); olua_postnew(L, ret); @@ -30593,11 +32455,11 @@ static int _cocos2d_Label_new$1(lua_State *L) return num_ret; } -static int _cocos2d_Label_new$2(lua_State *L) +static int _olua_fun_cocos2d_Label_new$2(lua_State *L) { olua_startinvoke(L); - // Label(@optional cocos2d::TextHAlignment hAlignment, @optional cocos2d::TextVAlignment vAlignment) + // cocos2d::Label() cocos2d::Label *ret = new cocos2d::Label(); int num_ret = olua_push_object(L, ret, "cc.Label"); olua_postnew(L, ret); @@ -30607,7 +32469,7 @@ static int _cocos2d_Label_new$2(lua_State *L) return num_ret; } -static int _cocos2d_Label_new$3(lua_State *L) +static int _olua_fun_cocos2d_Label_new$3(lua_State *L) { olua_startinvoke(L); @@ -30615,7 +32477,7 @@ static int _cocos2d_Label_new$3(lua_State *L) olua_check_enum(L, 1, &arg1); - // Label(@optional cocos2d::TextHAlignment hAlignment, @optional cocos2d::TextVAlignment vAlignment) + // cocos2d::Label(@optional cocos2d::TextHAlignment hAlignment) cocos2d::Label *ret = new cocos2d::Label(arg1); int num_ret = olua_push_object(L, ret, "cc.Label"); olua_postnew(L, ret); @@ -30625,26 +32487,26 @@ static int _cocos2d_Label_new$3(lua_State *L) return num_ret; } -static int _cocos2d_Label_new(lua_State *L) +static int _olua_fun_cocos2d_Label_new(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 0) { - // Label(@optional cocos2d::TextHAlignment hAlignment, @optional cocos2d::TextVAlignment vAlignment) - return _cocos2d_Label_new$2(L); + // cocos2d::Label() + return _olua_fun_cocos2d_Label_new$2(L); } if (num_args == 1) { // if ((olua_is_enum(L, 1))) { - // Label(@optional cocos2d::TextHAlignment hAlignment, @optional cocos2d::TextVAlignment vAlignment) - return _cocos2d_Label_new$3(L); + // cocos2d::Label(@optional cocos2d::TextHAlignment hAlignment) + return _olua_fun_cocos2d_Label_new$3(L); // } } if (num_args == 2) { // if ((olua_is_enum(L, 1)) && (olua_is_enum(L, 2))) { - // Label(@optional cocos2d::TextHAlignment hAlignment, @optional cocos2d::TextVAlignment vAlignment) - return _cocos2d_Label_new$1(L); + // cocos2d::Label(@optional cocos2d::TextHAlignment hAlignment, @optional cocos2d::TextVAlignment vAlignment) + return _olua_fun_cocos2d_Label_new$1(L); // } } @@ -30653,7 +32515,7 @@ static int _cocos2d_Label_new(lua_State *L) return 0; } -static int _cocos2d_Label_requestSystemFontRefresh(lua_State *L) +static int _olua_fun_cocos2d_Label_requestSystemFontRefresh(lua_State *L) { olua_startinvoke(L); @@ -30669,7 +32531,7 @@ static int _cocos2d_Label_requestSystemFontRefresh(lua_State *L) return 0; } -static int _cocos2d_Label_setAdditionalKerning(lua_State *L) +static int _olua_fun_cocos2d_Label_setAdditionalKerning(lua_State *L) { olua_startinvoke(L); @@ -30687,7 +32549,7 @@ static int _cocos2d_Label_setAdditionalKerning(lua_State *L) return 0; } -static int _cocos2d_Label_setAlignment$1(lua_State *L) +static int _olua_fun_cocos2d_Label_setAlignment$1(lua_State *L) { olua_startinvoke(L); @@ -30705,7 +32567,7 @@ static int _cocos2d_Label_setAlignment$1(lua_State *L) return 0; } -static int _cocos2d_Label_setAlignment$2(lua_State *L) +static int _olua_fun_cocos2d_Label_setAlignment$2(lua_State *L) { olua_startinvoke(L); @@ -30725,21 +32587,21 @@ static int _cocos2d_Label_setAlignment$2(lua_State *L) return 0; } -static int _cocos2d_Label_setAlignment(lua_State *L) +static int _olua_fun_cocos2d_Label_setAlignment(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_enum(L, 2))) { // void setAlignment(cocos2d::TextHAlignment hAlignment) - return _cocos2d_Label_setAlignment$1(L); + return _olua_fun_cocos2d_Label_setAlignment$1(L); // } } if (num_args == 2) { // if ((olua_is_enum(L, 2)) && (olua_is_enum(L, 3))) { // void setAlignment(cocos2d::TextHAlignment hAlignment, cocos2d::TextVAlignment vAlignment) - return _cocos2d_Label_setAlignment$2(L); + return _olua_fun_cocos2d_Label_setAlignment$2(L); // } } @@ -30748,7 +32610,7 @@ static int _cocos2d_Label_setAlignment(lua_State *L) return 0; } -static int _cocos2d_Label_setBMFontFilePath$1(lua_State *L) +static int _olua_fun_cocos2d_Label_setBMFontFilePath$1(lua_State *L) { olua_startinvoke(L); @@ -30769,24 +32631,18 @@ static int _cocos2d_Label_setBMFontFilePath$1(lua_State *L) return num_ret; } -static int _cocos2d_Label_setBMFontFilePath$2(lua_State *L) +static int _olua_fun_cocos2d_Label_setBMFontFilePath$2(lua_State *L) { olua_startinvoke(L); cocos2d::Label *self = nullptr; std::string arg1; /** bmfontFilePath */ - cocos2d::Rect arg2; /** imageRect */ - bool arg3 = false; /** imageRotated */ - float arg4 = 0; /** fontSize */ olua_to_object(L, 1, &self, "cc.Label"); olua_check_string(L, 2, &arg1); - olua_check_object(L, 3, &arg2, "cc.Rect"); - olua_check_bool(L, 4, &arg3); - olua_check_number(L, 5, &arg4); - // bool setBMFontFilePath(const std::string &bmfontFilePath, const cocos2d::Rect &imageRect, bool imageRotated, @optional float fontSize) - bool ret = self->setBMFontFilePath(arg1, arg2, arg3, arg4); + // bool setBMFontFilePath(const std::string &bmfontFilePath) + bool ret = self->setBMFontFilePath(arg1); int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); @@ -30794,22 +32650,24 @@ static int _cocos2d_Label_setBMFontFilePath$2(lua_State *L) return num_ret; } -static int _cocos2d_Label_setBMFontFilePath$3(lua_State *L) +static int _olua_fun_cocos2d_Label_setBMFontFilePath$3(lua_State *L) { olua_startinvoke(L); cocos2d::Label *self = nullptr; std::string arg1; /** bmfontFilePath */ - std::string arg2; /** subTextureKey */ - float arg3 = 0; /** fontSize */ + cocos2d::Rect *arg2; /** imageRect */ + bool arg3 = false; /** imageRotated */ + float arg4 = 0; /** fontSize */ olua_to_object(L, 1, &self, "cc.Label"); olua_check_string(L, 2, &arg1); - olua_check_string(L, 3, &arg2); - olua_check_number(L, 4, &arg3); + olua_check_object(L, 3, &arg2, "cc.Rect"); + olua_check_bool(L, 4, &arg3); + olua_check_number(L, 5, &arg4); - // bool setBMFontFilePath(const std::string &bmfontFilePath, const std::string &subTextureKey, @optional float fontSize) - bool ret = self->setBMFontFilePath(arg1, arg2, arg3); + // bool setBMFontFilePath(const std::string &bmfontFilePath, const cocos2d::Rect &imageRect, bool imageRotated, @optional float fontSize) + bool ret = self->setBMFontFilePath(arg1, *arg2, arg3, arg4); int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); @@ -30817,18 +32675,22 @@ static int _cocos2d_Label_setBMFontFilePath$3(lua_State *L) return num_ret; } -static int _cocos2d_Label_setBMFontFilePath$4(lua_State *L) +static int _olua_fun_cocos2d_Label_setBMFontFilePath$4(lua_State *L) { olua_startinvoke(L); cocos2d::Label *self = nullptr; std::string arg1; /** bmfontFilePath */ + cocos2d::Rect *arg2; /** imageRect */ + bool arg3 = false; /** imageRotated */ olua_to_object(L, 1, &self, "cc.Label"); olua_check_string(L, 2, &arg1); + olua_check_object(L, 3, &arg2, "cc.Rect"); + olua_check_bool(L, 4, &arg3); - // bool setBMFontFilePath(const std::string &bmfontFilePath, @optional float fontSize) - bool ret = self->setBMFontFilePath(arg1); + // bool setBMFontFilePath(const std::string &bmfontFilePath, const cocos2d::Rect &imageRect, bool imageRotated) + bool ret = self->setBMFontFilePath(arg1, *arg2, arg3); int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); @@ -30836,21 +32698,21 @@ static int _cocos2d_Label_setBMFontFilePath$4(lua_State *L) return num_ret; } -static int _cocos2d_Label_setBMFontFilePath$5(lua_State *L) +static int _olua_fun_cocos2d_Label_setBMFontFilePath$5(lua_State *L) { olua_startinvoke(L); cocos2d::Label *self = nullptr; std::string arg1; /** bmfontFilePath */ - cocos2d::Rect arg2; /** imageRect */ - bool arg3 = false; /** imageRotated */ + std::string arg2; /** subTextureKey */ + float arg3 = 0; /** fontSize */ olua_to_object(L, 1, &self, "cc.Label"); olua_check_string(L, 2, &arg1); - olua_check_object(L, 3, &arg2, "cc.Rect"); - olua_check_bool(L, 4, &arg3); + olua_check_string(L, 3, &arg2); + olua_check_number(L, 4, &arg3); - // bool setBMFontFilePath(const std::string &bmfontFilePath, const cocos2d::Rect &imageRect, bool imageRotated, @optional float fontSize) + // bool setBMFontFilePath(const std::string &bmfontFilePath, const std::string &subTextureKey, @optional float fontSize) bool ret = self->setBMFontFilePath(arg1, arg2, arg3); int num_ret = olua_push_bool(L, ret); @@ -30859,7 +32721,7 @@ static int _cocos2d_Label_setBMFontFilePath$5(lua_State *L) return num_ret; } -static int _cocos2d_Label_setBMFontFilePath$6(lua_State *L) +static int _olua_fun_cocos2d_Label_setBMFontFilePath$6(lua_State *L) { olua_startinvoke(L); @@ -30871,7 +32733,7 @@ static int _cocos2d_Label_setBMFontFilePath$6(lua_State *L) olua_check_string(L, 2, &arg1); olua_check_string(L, 3, &arg2); - // bool setBMFontFilePath(const std::string &bmfontFilePath, const std::string &subTextureKey, @optional float fontSize) + // bool setBMFontFilePath(const std::string &bmfontFilePath, const std::string &subTextureKey) bool ret = self->setBMFontFilePath(arg1, arg2); int num_ret = olua_push_bool(L, ret); @@ -30880,45 +32742,45 @@ static int _cocos2d_Label_setBMFontFilePath$6(lua_State *L) return num_ret; } -static int _cocos2d_Label_setBMFontFilePath(lua_State *L) +static int _olua_fun_cocos2d_Label_setBMFontFilePath(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_string(L, 2))) { - // bool setBMFontFilePath(const std::string &bmfontFilePath, @optional float fontSize) - return _cocos2d_Label_setBMFontFilePath$4(L); + // bool setBMFontFilePath(const std::string &bmfontFilePath) + return _olua_fun_cocos2d_Label_setBMFontFilePath$2(L); // } } if (num_args == 2) { if ((olua_is_string(L, 2)) && (olua_is_number(L, 3))) { // bool setBMFontFilePath(const std::string &bmfontFilePath, @optional float fontSize) - return _cocos2d_Label_setBMFontFilePath$1(L); + return _olua_fun_cocos2d_Label_setBMFontFilePath$1(L); } // if ((olua_is_string(L, 2)) && (olua_is_string(L, 3))) { - // bool setBMFontFilePath(const std::string &bmfontFilePath, const std::string &subTextureKey, @optional float fontSize) - return _cocos2d_Label_setBMFontFilePath$6(L); + // bool setBMFontFilePath(const std::string &bmfontFilePath, const std::string &subTextureKey) + return _olua_fun_cocos2d_Label_setBMFontFilePath$6(L); // } } if (num_args == 3) { if ((olua_is_string(L, 2)) && (olua_is_object(L, 3, "cc.Rect")) && (olua_is_bool(L, 4))) { - // bool setBMFontFilePath(const std::string &bmfontFilePath, const cocos2d::Rect &imageRect, bool imageRotated, @optional float fontSize) - return _cocos2d_Label_setBMFontFilePath$5(L); + // bool setBMFontFilePath(const std::string &bmfontFilePath, const cocos2d::Rect &imageRect, bool imageRotated) + return _olua_fun_cocos2d_Label_setBMFontFilePath$4(L); } // if ((olua_is_string(L, 2)) && (olua_is_string(L, 3)) && (olua_is_number(L, 4))) { // bool setBMFontFilePath(const std::string &bmfontFilePath, const std::string &subTextureKey, @optional float fontSize) - return _cocos2d_Label_setBMFontFilePath$3(L); + return _olua_fun_cocos2d_Label_setBMFontFilePath$5(L); // } } if (num_args == 4) { // if ((olua_is_string(L, 2)) && (olua_is_object(L, 3, "cc.Rect")) && (olua_is_bool(L, 4)) && (olua_is_number(L, 5))) { // bool setBMFontFilePath(const std::string &bmfontFilePath, const cocos2d::Rect &imageRect, bool imageRotated, @optional float fontSize) - return _cocos2d_Label_setBMFontFilePath$2(L); + return _olua_fun_cocos2d_Label_setBMFontFilePath$3(L); // } } @@ -30927,7 +32789,7 @@ static int _cocos2d_Label_setBMFontFilePath(lua_State *L) return 0; } -static int _cocos2d_Label_setBMFontSize(lua_State *L) +static int _olua_fun_cocos2d_Label_setBMFontSize(lua_State *L) { olua_startinvoke(L); @@ -30945,25 +32807,25 @@ static int _cocos2d_Label_setBMFontSize(lua_State *L) return 0; } -static int _cocos2d_Label_setBlendFunc(lua_State *L) +static int _olua_fun_cocos2d_Label_setBlendFunc(lua_State *L) { olua_startinvoke(L); cocos2d::Label *self = nullptr; - cocos2d::BlendFunc arg1; /** blendFunc */ + cocos2d::BlendFunc *arg1; /** blendFunc */ olua_to_object(L, 1, &self, "cc.Label"); olua_check_object(L, 2, &arg1, "cc.BlendFunc"); // void setBlendFunc(const cocos2d::BlendFunc &blendFunc) - self->setBlendFunc(arg1); + self->setBlendFunc(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_Label_setCharMap$1(lua_State *L) +static int _olua_fun_cocos2d_Label_setCharMap$1(lua_State *L) { olua_startinvoke(L); @@ -30988,7 +32850,7 @@ static int _cocos2d_Label_setCharMap$1(lua_State *L) return num_ret; } -static int _cocos2d_Label_setCharMap$2(lua_State *L) +static int _olua_fun_cocos2d_Label_setCharMap$2(lua_State *L) { olua_startinvoke(L); @@ -31013,7 +32875,7 @@ static int _cocos2d_Label_setCharMap$2(lua_State *L) return num_ret; } -static int _cocos2d_Label_setCharMap$3(lua_State *L) +static int _olua_fun_cocos2d_Label_setCharMap$3(lua_State *L) { olua_startinvoke(L); @@ -31032,26 +32894,26 @@ static int _cocos2d_Label_setCharMap$3(lua_State *L) return num_ret; } -static int _cocos2d_Label_setCharMap(lua_State *L) +static int _olua_fun_cocos2d_Label_setCharMap(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_string(L, 2))) { // bool setCharMap(const std::string &plistFile) - return _cocos2d_Label_setCharMap$3(L); + return _olua_fun_cocos2d_Label_setCharMap$3(L); // } } if (num_args == 4) { if ((olua_is_string(L, 2)) && (olua_is_integer(L, 3)) && (olua_is_integer(L, 4)) && (olua_is_integer(L, 5))) { // bool setCharMap(const std::string &charMapFile, int itemWidth, int itemHeight, int startCharMap) - return _cocos2d_Label_setCharMap$1(L); + return _olua_fun_cocos2d_Label_setCharMap$1(L); } // if ((olua_is_object(L, 2, "cc.Texture2D")) && (olua_is_integer(L, 3)) && (olua_is_integer(L, 4)) && (olua_is_integer(L, 5))) { // bool setCharMap(cocos2d::Texture2D *texture, int itemWidth, int itemHeight, int startCharMap) - return _cocos2d_Label_setCharMap$2(L); + return _olua_fun_cocos2d_Label_setCharMap$2(L); // } } @@ -31060,7 +32922,7 @@ static int _cocos2d_Label_setCharMap(lua_State *L) return 0; } -static int _cocos2d_Label_setClipMarginEnabled(lua_State *L) +static int _olua_fun_cocos2d_Label_setClipMarginEnabled(lua_State *L) { olua_startinvoke(L); @@ -31078,7 +32940,7 @@ static int _cocos2d_Label_setClipMarginEnabled(lua_State *L) return 0; } -static int _cocos2d_Label_setDimensions(lua_State *L) +static int _olua_fun_cocos2d_Label_setDimensions(lua_State *L) { olua_startinvoke(L); @@ -31098,7 +32960,7 @@ static int _cocos2d_Label_setDimensions(lua_State *L) return 0; } -static int _cocos2d_Label_setHeight(lua_State *L) +static int _olua_fun_cocos2d_Label_setHeight(lua_State *L) { olua_startinvoke(L); @@ -31116,7 +32978,7 @@ static int _cocos2d_Label_setHeight(lua_State *L) return 0; } -static int _cocos2d_Label_setHorizontalAlignment(lua_State *L) +static int _olua_fun_cocos2d_Label_setHorizontalAlignment(lua_State *L) { olua_startinvoke(L); @@ -31134,7 +32996,7 @@ static int _cocos2d_Label_setHorizontalAlignment(lua_State *L) return 0; } -static int _cocos2d_Label_setLineBreakWithoutSpace(lua_State *L) +static int _olua_fun_cocos2d_Label_setLineBreakWithoutSpace(lua_State *L) { olua_startinvoke(L); @@ -31152,7 +33014,7 @@ static int _cocos2d_Label_setLineBreakWithoutSpace(lua_State *L) return 0; } -static int _cocos2d_Label_setLineHeight(lua_State *L) +static int _olua_fun_cocos2d_Label_setLineHeight(lua_State *L) { olua_startinvoke(L); @@ -31170,7 +33032,7 @@ static int _cocos2d_Label_setLineHeight(lua_State *L) return 0; } -static int _cocos2d_Label_setLineSpacing(lua_State *L) +static int _olua_fun_cocos2d_Label_setLineSpacing(lua_State *L) { olua_startinvoke(L); @@ -31188,7 +33050,7 @@ static int _cocos2d_Label_setLineSpacing(lua_State *L) return 0; } -static int _cocos2d_Label_setMaxLineWidth(lua_State *L) +static int _olua_fun_cocos2d_Label_setMaxLineWidth(lua_State *L) { olua_startinvoke(L); @@ -31206,7 +33068,7 @@ static int _cocos2d_Label_setMaxLineWidth(lua_State *L) return 0; } -static int _cocos2d_Label_setOverflow(lua_State *L) +static int _olua_fun_cocos2d_Label_setOverflow(lua_State *L) { olua_startinvoke(L); @@ -31224,7 +33086,7 @@ static int _cocos2d_Label_setOverflow(lua_State *L) return 0; } -static int _cocos2d_Label_setString(lua_State *L) +static int _olua_fun_cocos2d_Label_setString(lua_State *L) { olua_startinvoke(L); @@ -31242,7 +33104,7 @@ static int _cocos2d_Label_setString(lua_State *L) return 0; } -static int _cocos2d_Label_setSystemFontName(lua_State *L) +static int _olua_fun_cocos2d_Label_setSystemFontName(lua_State *L) { olua_startinvoke(L); @@ -31260,7 +33122,7 @@ static int _cocos2d_Label_setSystemFontName(lua_State *L) return 0; } -static int _cocos2d_Label_setSystemFontSize(lua_State *L) +static int _olua_fun_cocos2d_Label_setSystemFontSize(lua_State *L) { olua_startinvoke(L); @@ -31278,18 +33140,18 @@ static int _cocos2d_Label_setSystemFontSize(lua_State *L) return 0; } -static int _cocos2d_Label_setTTFConfig(lua_State *L) +static int _olua_fun_cocos2d_Label_setTTFConfig(lua_State *L) { olua_startinvoke(L); cocos2d::Label *self = nullptr; - cocos2d::TTFConfig arg1; /** ttfConfig */ + cocos2d::TTFConfig *arg1; /** ttfConfig */ olua_to_object(L, 1, &self, "cc.Label"); olua_check_object(L, 2, &arg1, "cc.TTFConfig"); // bool setTTFConfig(const cocos2d::TTFConfig &ttfConfig) - bool ret = self->setTTFConfig(arg1); + bool ret = self->setTTFConfig(*arg1); int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); @@ -31297,7 +33159,7 @@ static int _cocos2d_Label_setTTFConfig(lua_State *L) return num_ret; } -static int _cocos2d_Label_setTextColor(lua_State *L) +static int _olua_fun_cocos2d_Label_setTextColor(lua_State *L) { olua_startinvoke(L); @@ -31315,7 +33177,7 @@ static int _cocos2d_Label_setTextColor(lua_State *L) return 0; } -static int _cocos2d_Label_setVerticalAlignment(lua_State *L) +static int _olua_fun_cocos2d_Label_setVerticalAlignment(lua_State *L) { olua_startinvoke(L); @@ -31333,7 +33195,7 @@ static int _cocos2d_Label_setVerticalAlignment(lua_State *L) return 0; } -static int _cocos2d_Label_setWidth(lua_State *L) +static int _olua_fun_cocos2d_Label_setWidth(lua_State *L) { olua_startinvoke(L); @@ -31351,7 +33213,7 @@ static int _cocos2d_Label_setWidth(lua_State *L) return 0; } -static int _cocos2d_Label_updateContent(lua_State *L) +static int _olua_fun_cocos2d_Label_updateContent(lua_State *L) { olua_startinvoke(L); @@ -31367,123 +33229,132 @@ static int _cocos2d_Label_updateContent(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_Label(lua_State *L) +static int _olua_cls_cc_Label(lua_State *L) { oluacls_class(L, "cc.Label"); - oluacls_func(L, "as", _cocos2d_Label_as); - oluacls_func(L, "create", _cocos2d_Label_create); - oluacls_func(L, "createWithBMFont", _cocos2d_Label_createWithBMFont); - oluacls_func(L, "createWithCharMap", _cocos2d_Label_createWithCharMap); - oluacls_func(L, "createWithSystemFont", _cocos2d_Label_createWithSystemFont); - oluacls_func(L, "createWithTTF", _cocos2d_Label_createWithTTF); - oluacls_func(L, "disableEffect", _cocos2d_Label_disableEffect); - oluacls_func(L, "enableBold", _cocos2d_Label_enableBold); - oluacls_func(L, "enableGlow", _cocos2d_Label_enableGlow); - oluacls_func(L, "enableItalics", _cocos2d_Label_enableItalics); - oluacls_func(L, "enableOutline", _cocos2d_Label_enableOutline); - oluacls_func(L, "enableShadow", _cocos2d_Label_enableShadow); - oluacls_func(L, "enableStrikethrough", _cocos2d_Label_enableStrikethrough); - oluacls_func(L, "enableUnderline", _cocos2d_Label_enableUnderline); - oluacls_func(L, "enableWrap", _cocos2d_Label_enableWrap); - oluacls_func(L, "getAdditionalKerning", _cocos2d_Label_getAdditionalKerning); - oluacls_func(L, "getBMFontFilePath", _cocos2d_Label_getBMFontFilePath); - oluacls_func(L, "getBMFontSize", _cocos2d_Label_getBMFontSize); - oluacls_func(L, "getBlendFunc", _cocos2d_Label_getBlendFunc); - oluacls_func(L, "getDimensions", _cocos2d_Label_getDimensions); - oluacls_func(L, "getEffectColor", _cocos2d_Label_getEffectColor); - oluacls_func(L, "getFontAtlas", _cocos2d_Label_getFontAtlas); - oluacls_func(L, "getHeight", _cocos2d_Label_getHeight); - oluacls_func(L, "getHorizontalAlignment", _cocos2d_Label_getHorizontalAlignment); - oluacls_func(L, "getLabelEffectType", _cocos2d_Label_getLabelEffectType); - oluacls_func(L, "getLabelType", _cocos2d_Label_getLabelType); - oluacls_func(L, "getLetter", _cocos2d_Label_getLetter); - oluacls_func(L, "getLineHeight", _cocos2d_Label_getLineHeight); - oluacls_func(L, "getLineSpacing", _cocos2d_Label_getLineSpacing); - oluacls_func(L, "getMaxLineWidth", _cocos2d_Label_getMaxLineWidth); - oluacls_func(L, "getOutlineSize", _cocos2d_Label_getOutlineSize); - oluacls_func(L, "getOverflow", _cocos2d_Label_getOverflow); - oluacls_func(L, "getRenderingFontSize", _cocos2d_Label_getRenderingFontSize); - oluacls_func(L, "getShadowBlurRadius", _cocos2d_Label_getShadowBlurRadius); - oluacls_func(L, "getShadowColor", _cocos2d_Label_getShadowColor); - oluacls_func(L, "getShadowOffset", _cocos2d_Label_getShadowOffset); - oluacls_func(L, "getString", _cocos2d_Label_getString); - oluacls_func(L, "getStringLength", _cocos2d_Label_getStringLength); - oluacls_func(L, "getStringNumLines", _cocos2d_Label_getStringNumLines); - oluacls_func(L, "getSystemFontName", _cocos2d_Label_getSystemFontName); - oluacls_func(L, "getSystemFontSize", _cocos2d_Label_getSystemFontSize); - oluacls_func(L, "getTTFConfig", _cocos2d_Label_getTTFConfig); - oluacls_func(L, "getTextAlignment", _cocos2d_Label_getTextAlignment); - oluacls_func(L, "getTextColor", _cocos2d_Label_getTextColor); - oluacls_func(L, "getVerticalAlignment", _cocos2d_Label_getVerticalAlignment); - oluacls_func(L, "getWidth", _cocos2d_Label_getWidth); - oluacls_func(L, "initWithTTF", _cocos2d_Label_initWithTTF); - oluacls_func(L, "isClipMarginEnabled", _cocos2d_Label_isClipMarginEnabled); - oluacls_func(L, "isShadowEnabled", _cocos2d_Label_isShadowEnabled); - oluacls_func(L, "isWrapEnabled", _cocos2d_Label_isWrapEnabled); - oluacls_func(L, "new", _cocos2d_Label_new); - oluacls_func(L, "requestSystemFontRefresh", _cocos2d_Label_requestSystemFontRefresh); - oluacls_func(L, "setAdditionalKerning", _cocos2d_Label_setAdditionalKerning); - oluacls_func(L, "setAlignment", _cocos2d_Label_setAlignment); - oluacls_func(L, "setBMFontFilePath", _cocos2d_Label_setBMFontFilePath); - oluacls_func(L, "setBMFontSize", _cocos2d_Label_setBMFontSize); - oluacls_func(L, "setBlendFunc", _cocos2d_Label_setBlendFunc); - oluacls_func(L, "setCharMap", _cocos2d_Label_setCharMap); - oluacls_func(L, "setClipMarginEnabled", _cocos2d_Label_setClipMarginEnabled); - oluacls_func(L, "setDimensions", _cocos2d_Label_setDimensions); - oluacls_func(L, "setHeight", _cocos2d_Label_setHeight); - oluacls_func(L, "setHorizontalAlignment", _cocos2d_Label_setHorizontalAlignment); - oluacls_func(L, "setLineBreakWithoutSpace", _cocos2d_Label_setLineBreakWithoutSpace); - oluacls_func(L, "setLineHeight", _cocos2d_Label_setLineHeight); - oluacls_func(L, "setLineSpacing", _cocos2d_Label_setLineSpacing); - oluacls_func(L, "setMaxLineWidth", _cocos2d_Label_setMaxLineWidth); - oluacls_func(L, "setOverflow", _cocos2d_Label_setOverflow); - oluacls_func(L, "setString", _cocos2d_Label_setString); - oluacls_func(L, "setSystemFontName", _cocos2d_Label_setSystemFontName); - oluacls_func(L, "setSystemFontSize", _cocos2d_Label_setSystemFontSize); - oluacls_func(L, "setTTFConfig", _cocos2d_Label_setTTFConfig); - oluacls_func(L, "setTextColor", _cocos2d_Label_setTextColor); - oluacls_func(L, "setVerticalAlignment", _cocos2d_Label_setVerticalAlignment); - oluacls_func(L, "setWidth", _cocos2d_Label_setWidth); - oluacls_func(L, "updateContent", _cocos2d_Label_updateContent); - oluacls_prop(L, "additionalKerning", _cocos2d_Label_getAdditionalKerning, _cocos2d_Label_setAdditionalKerning); - oluacls_prop(L, "blendFunc", _cocos2d_Label_getBlendFunc, _cocos2d_Label_setBlendFunc); - oluacls_prop(L, "bmFontFilePath", _cocos2d_Label_getBMFontFilePath, _cocos2d_Label_setBMFontFilePath); - oluacls_prop(L, "bmFontSize", _cocos2d_Label_getBMFontSize, _cocos2d_Label_setBMFontSize); - oluacls_prop(L, "clipMarginEnabled", _cocos2d_Label_isClipMarginEnabled, _cocos2d_Label_setClipMarginEnabled); - oluacls_prop(L, "effectColor", _cocos2d_Label_getEffectColor, nullptr); - oluacls_prop(L, "fontAtlas", _cocos2d_Label_getFontAtlas, nullptr); - oluacls_prop(L, "height", _cocos2d_Label_getHeight, _cocos2d_Label_setHeight); - oluacls_prop(L, "horizontalAlignment", _cocos2d_Label_getHorizontalAlignment, _cocos2d_Label_setHorizontalAlignment); - oluacls_prop(L, "labelEffectType", _cocos2d_Label_getLabelEffectType, nullptr); - oluacls_prop(L, "labelType", _cocos2d_Label_getLabelType, nullptr); - oluacls_prop(L, "lineHeight", _cocos2d_Label_getLineHeight, _cocos2d_Label_setLineHeight); - oluacls_prop(L, "lineSpacing", _cocos2d_Label_getLineSpacing, _cocos2d_Label_setLineSpacing); - oluacls_prop(L, "maxLineWidth", _cocos2d_Label_getMaxLineWidth, _cocos2d_Label_setMaxLineWidth); - oluacls_prop(L, "outlineSize", _cocos2d_Label_getOutlineSize, nullptr); - oluacls_prop(L, "overflow", _cocos2d_Label_getOverflow, _cocos2d_Label_setOverflow); - oluacls_prop(L, "renderingFontSize", _cocos2d_Label_getRenderingFontSize, nullptr); - oluacls_prop(L, "shadowBlurRadius", _cocos2d_Label_getShadowBlurRadius, nullptr); - oluacls_prop(L, "shadowColor", _cocos2d_Label_getShadowColor, nullptr); - oluacls_prop(L, "shadowEnabled", _cocos2d_Label_isShadowEnabled, nullptr); - oluacls_prop(L, "shadowOffset", _cocos2d_Label_getShadowOffset, nullptr); - oluacls_prop(L, "string", _cocos2d_Label_getString, _cocos2d_Label_setString); - oluacls_prop(L, "stringLength", _cocos2d_Label_getStringLength, nullptr); - oluacls_prop(L, "stringNumLines", _cocos2d_Label_getStringNumLines, nullptr); - oluacls_prop(L, "systemFontName", _cocos2d_Label_getSystemFontName, _cocos2d_Label_setSystemFontName); - oluacls_prop(L, "systemFontSize", _cocos2d_Label_getSystemFontSize, _cocos2d_Label_setSystemFontSize); - oluacls_prop(L, "textAlignment", _cocos2d_Label_getTextAlignment, nullptr); - oluacls_prop(L, "textColor", _cocos2d_Label_getTextColor, _cocos2d_Label_setTextColor); - oluacls_prop(L, "ttfConfig", _cocos2d_Label_getTTFConfig, _cocos2d_Label_setTTFConfig); - oluacls_prop(L, "verticalAlignment", _cocos2d_Label_getVerticalAlignment, _cocos2d_Label_setVerticalAlignment); - oluacls_prop(L, "width", _cocos2d_Label_getWidth, _cocos2d_Label_setWidth); - oluacls_prop(L, "wrapEnabled", _cocos2d_Label_isWrapEnabled, nullptr); + oluacls_func(L, "as", _olua_fun_cocos2d_Label_as); + oluacls_func(L, "create", _olua_fun_cocos2d_Label_create); + oluacls_func(L, "createWithBMFont", _olua_fun_cocos2d_Label_createWithBMFont); + oluacls_func(L, "createWithCharMap", _olua_fun_cocos2d_Label_createWithCharMap); + oluacls_func(L, "createWithSystemFont", _olua_fun_cocos2d_Label_createWithSystemFont); + oluacls_func(L, "createWithTTF", _olua_fun_cocos2d_Label_createWithTTF); + oluacls_func(L, "disableEffect", _olua_fun_cocos2d_Label_disableEffect); + oluacls_func(L, "enableBold", _olua_fun_cocos2d_Label_enableBold); + oluacls_func(L, "enableGlow", _olua_fun_cocos2d_Label_enableGlow); + oluacls_func(L, "enableItalics", _olua_fun_cocos2d_Label_enableItalics); + oluacls_func(L, "enableOutline", _olua_fun_cocos2d_Label_enableOutline); + oluacls_func(L, "enableShadow", _olua_fun_cocos2d_Label_enableShadow); + oluacls_func(L, "enableStrikethrough", _olua_fun_cocos2d_Label_enableStrikethrough); + oluacls_func(L, "enableUnderline", _olua_fun_cocos2d_Label_enableUnderline); + oluacls_func(L, "enableWrap", _olua_fun_cocos2d_Label_enableWrap); + oluacls_func(L, "getAdditionalKerning", _olua_fun_cocos2d_Label_getAdditionalKerning); + oluacls_func(L, "getBMFontFilePath", _olua_fun_cocos2d_Label_getBMFontFilePath); + oluacls_func(L, "getBMFontSize", _olua_fun_cocos2d_Label_getBMFontSize); + oluacls_func(L, "getBlendFunc", _olua_fun_cocos2d_Label_getBlendFunc); + oluacls_func(L, "getDimensions", _olua_fun_cocos2d_Label_getDimensions); + oluacls_func(L, "getEffectColor", _olua_fun_cocos2d_Label_getEffectColor); + oluacls_func(L, "getFontAtlas", _olua_fun_cocos2d_Label_getFontAtlas); + oluacls_func(L, "getHeight", _olua_fun_cocos2d_Label_getHeight); + oluacls_func(L, "getHorizontalAlignment", _olua_fun_cocos2d_Label_getHorizontalAlignment); + oluacls_func(L, "getLabelEffectType", _olua_fun_cocos2d_Label_getLabelEffectType); + oluacls_func(L, "getLabelType", _olua_fun_cocos2d_Label_getLabelType); + oluacls_func(L, "getLetter", _olua_fun_cocos2d_Label_getLetter); + oluacls_func(L, "getLineHeight", _olua_fun_cocos2d_Label_getLineHeight); + oluacls_func(L, "getLineSpacing", _olua_fun_cocos2d_Label_getLineSpacing); + oluacls_func(L, "getMaxLineWidth", _olua_fun_cocos2d_Label_getMaxLineWidth); + oluacls_func(L, "getOutlineSize", _olua_fun_cocos2d_Label_getOutlineSize); + oluacls_func(L, "getOverflow", _olua_fun_cocos2d_Label_getOverflow); + oluacls_func(L, "getRenderingFontSize", _olua_fun_cocos2d_Label_getRenderingFontSize); + oluacls_func(L, "getShadowBlurRadius", _olua_fun_cocos2d_Label_getShadowBlurRadius); + oluacls_func(L, "getShadowColor", _olua_fun_cocos2d_Label_getShadowColor); + oluacls_func(L, "getShadowOffset", _olua_fun_cocos2d_Label_getShadowOffset); + oluacls_func(L, "getString", _olua_fun_cocos2d_Label_getString); + oluacls_func(L, "getStringLength", _olua_fun_cocos2d_Label_getStringLength); + oluacls_func(L, "getStringNumLines", _olua_fun_cocos2d_Label_getStringNumLines); + oluacls_func(L, "getSystemFontName", _olua_fun_cocos2d_Label_getSystemFontName); + oluacls_func(L, "getSystemFontSize", _olua_fun_cocos2d_Label_getSystemFontSize); + oluacls_func(L, "getTTFConfig", _olua_fun_cocos2d_Label_getTTFConfig); + oluacls_func(L, "getTextAlignment", _olua_fun_cocos2d_Label_getTextAlignment); + oluacls_func(L, "getTextColor", _olua_fun_cocos2d_Label_getTextColor); + oluacls_func(L, "getVerticalAlignment", _olua_fun_cocos2d_Label_getVerticalAlignment); + oluacls_func(L, "getWidth", _olua_fun_cocos2d_Label_getWidth); + oluacls_func(L, "initWithTTF", _olua_fun_cocos2d_Label_initWithTTF); + oluacls_func(L, "isClipMarginEnabled", _olua_fun_cocos2d_Label_isClipMarginEnabled); + oluacls_func(L, "isShadowEnabled", _olua_fun_cocos2d_Label_isShadowEnabled); + oluacls_func(L, "isWrapEnabled", _olua_fun_cocos2d_Label_isWrapEnabled); + oluacls_func(L, "new", _olua_fun_cocos2d_Label_new); + oluacls_func(L, "requestSystemFontRefresh", _olua_fun_cocos2d_Label_requestSystemFontRefresh); + oluacls_func(L, "setAdditionalKerning", _olua_fun_cocos2d_Label_setAdditionalKerning); + oluacls_func(L, "setAlignment", _olua_fun_cocos2d_Label_setAlignment); + oluacls_func(L, "setBMFontFilePath", _olua_fun_cocos2d_Label_setBMFontFilePath); + oluacls_func(L, "setBMFontSize", _olua_fun_cocos2d_Label_setBMFontSize); + oluacls_func(L, "setBlendFunc", _olua_fun_cocos2d_Label_setBlendFunc); + oluacls_func(L, "setCharMap", _olua_fun_cocos2d_Label_setCharMap); + oluacls_func(L, "setClipMarginEnabled", _olua_fun_cocos2d_Label_setClipMarginEnabled); + oluacls_func(L, "setDimensions", _olua_fun_cocos2d_Label_setDimensions); + oluacls_func(L, "setHeight", _olua_fun_cocos2d_Label_setHeight); + oluacls_func(L, "setHorizontalAlignment", _olua_fun_cocos2d_Label_setHorizontalAlignment); + oluacls_func(L, "setLineBreakWithoutSpace", _olua_fun_cocos2d_Label_setLineBreakWithoutSpace); + oluacls_func(L, "setLineHeight", _olua_fun_cocos2d_Label_setLineHeight); + oluacls_func(L, "setLineSpacing", _olua_fun_cocos2d_Label_setLineSpacing); + oluacls_func(L, "setMaxLineWidth", _olua_fun_cocos2d_Label_setMaxLineWidth); + oluacls_func(L, "setOverflow", _olua_fun_cocos2d_Label_setOverflow); + oluacls_func(L, "setString", _olua_fun_cocos2d_Label_setString); + oluacls_func(L, "setSystemFontName", _olua_fun_cocos2d_Label_setSystemFontName); + oluacls_func(L, "setSystemFontSize", _olua_fun_cocos2d_Label_setSystemFontSize); + oluacls_func(L, "setTTFConfig", _olua_fun_cocos2d_Label_setTTFConfig); + oluacls_func(L, "setTextColor", _olua_fun_cocos2d_Label_setTextColor); + oluacls_func(L, "setVerticalAlignment", _olua_fun_cocos2d_Label_setVerticalAlignment); + oluacls_func(L, "setWidth", _olua_fun_cocos2d_Label_setWidth); + oluacls_func(L, "updateContent", _olua_fun_cocos2d_Label_updateContent); + oluacls_prop(L, "additionalKerning", _olua_fun_cocos2d_Label_getAdditionalKerning, _olua_fun_cocos2d_Label_setAdditionalKerning); + oluacls_prop(L, "blendFunc", _olua_fun_cocos2d_Label_getBlendFunc, _olua_fun_cocos2d_Label_setBlendFunc); + oluacls_prop(L, "bmFontFilePath", _olua_fun_cocos2d_Label_getBMFontFilePath, nullptr); + oluacls_prop(L, "bmFontSize", _olua_fun_cocos2d_Label_getBMFontSize, _olua_fun_cocos2d_Label_setBMFontSize); + oluacls_prop(L, "clipMarginEnabled", _olua_fun_cocos2d_Label_isClipMarginEnabled, _olua_fun_cocos2d_Label_setClipMarginEnabled); + oluacls_prop(L, "effectColor", _olua_fun_cocos2d_Label_getEffectColor, nullptr); + oluacls_prop(L, "fontAtlas", _olua_fun_cocos2d_Label_getFontAtlas, nullptr); + oluacls_prop(L, "height", _olua_fun_cocos2d_Label_getHeight, _olua_fun_cocos2d_Label_setHeight); + oluacls_prop(L, "horizontalAlignment", _olua_fun_cocos2d_Label_getHorizontalAlignment, _olua_fun_cocos2d_Label_setHorizontalAlignment); + oluacls_prop(L, "labelEffectType", _olua_fun_cocos2d_Label_getLabelEffectType, nullptr); + oluacls_prop(L, "labelType", _olua_fun_cocos2d_Label_getLabelType, nullptr); + oluacls_prop(L, "lineHeight", _olua_fun_cocos2d_Label_getLineHeight, _olua_fun_cocos2d_Label_setLineHeight); + oluacls_prop(L, "lineSpacing", _olua_fun_cocos2d_Label_getLineSpacing, _olua_fun_cocos2d_Label_setLineSpacing); + oluacls_prop(L, "maxLineWidth", _olua_fun_cocos2d_Label_getMaxLineWidth, _olua_fun_cocos2d_Label_setMaxLineWidth); + oluacls_prop(L, "outlineSize", _olua_fun_cocos2d_Label_getOutlineSize, nullptr); + oluacls_prop(L, "overflow", _olua_fun_cocos2d_Label_getOverflow, _olua_fun_cocos2d_Label_setOverflow); + oluacls_prop(L, "renderingFontSize", _olua_fun_cocos2d_Label_getRenderingFontSize, nullptr); + oluacls_prop(L, "shadowBlurRadius", _olua_fun_cocos2d_Label_getShadowBlurRadius, nullptr); + oluacls_prop(L, "shadowColor", _olua_fun_cocos2d_Label_getShadowColor, nullptr); + oluacls_prop(L, "shadowEnabled", _olua_fun_cocos2d_Label_isShadowEnabled, nullptr); + oluacls_prop(L, "shadowOffset", _olua_fun_cocos2d_Label_getShadowOffset, nullptr); + oluacls_prop(L, "string", _olua_fun_cocos2d_Label_getString, _olua_fun_cocos2d_Label_setString); + oluacls_prop(L, "stringLength", _olua_fun_cocos2d_Label_getStringLength, nullptr); + oluacls_prop(L, "stringNumLines", _olua_fun_cocos2d_Label_getStringNumLines, nullptr); + oluacls_prop(L, "systemFontName", _olua_fun_cocos2d_Label_getSystemFontName, _olua_fun_cocos2d_Label_setSystemFontName); + oluacls_prop(L, "systemFontSize", _olua_fun_cocos2d_Label_getSystemFontSize, _olua_fun_cocos2d_Label_setSystemFontSize); + oluacls_prop(L, "textAlignment", _olua_fun_cocos2d_Label_getTextAlignment, nullptr); + oluacls_prop(L, "textColor", _olua_fun_cocos2d_Label_getTextColor, _olua_fun_cocos2d_Label_setTextColor); + oluacls_prop(L, "ttfConfig", _olua_fun_cocos2d_Label_getTTFConfig, _olua_fun_cocos2d_Label_setTTFConfig); + oluacls_prop(L, "verticalAlignment", _olua_fun_cocos2d_Label_getVerticalAlignment, _olua_fun_cocos2d_Label_setVerticalAlignment); + oluacls_prop(L, "width", _olua_fun_cocos2d_Label_getWidth, _olua_fun_cocos2d_Label_setWidth); + oluacls_prop(L, "wrapEnabled", _olua_fun_cocos2d_Label_isWrapEnabled, nullptr); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_Label(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.Label")) { + luaL_error(L, "class not found: cocos2d::Label"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_LabelAtlas_as(lua_State *L) +static int _olua_fun_cocos2d_LabelAtlas_as(lua_State *L) { olua_startinvoke(L); @@ -31519,7 +33390,7 @@ static int _cocos2d_LabelAtlas_as(lua_State *L) return 1; } -static int _cocos2d_LabelAtlas_create$1(lua_State *L) +static int _olua_fun_cocos2d_LabelAtlas_create$1(lua_State *L) { olua_startinvoke(L); @@ -31532,7 +33403,7 @@ static int _cocos2d_LabelAtlas_create$1(lua_State *L) return num_ret; } -static int _cocos2d_LabelAtlas_create$2(lua_State *L) +static int _olua_fun_cocos2d_LabelAtlas_create$2(lua_State *L) { olua_startinvoke(L); @@ -31557,7 +33428,7 @@ static int _cocos2d_LabelAtlas_create$2(lua_State *L) return num_ret; } -static int _cocos2d_LabelAtlas_create$3(lua_State *L) +static int _olua_fun_cocos2d_LabelAtlas_create$3(lua_State *L) { olua_startinvoke(L); @@ -31576,26 +33447,26 @@ static int _cocos2d_LabelAtlas_create$3(lua_State *L) return num_ret; } -static int _cocos2d_LabelAtlas_create(lua_State *L) +static int _olua_fun_cocos2d_LabelAtlas_create(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 0) { // static cocos2d::LabelAtlas *create() - return _cocos2d_LabelAtlas_create$1(L); + return _olua_fun_cocos2d_LabelAtlas_create$1(L); } if (num_args == 2) { // if ((olua_is_string(L, 1)) && (olua_is_string(L, 2))) { // static cocos2d::LabelAtlas *create(const std::string &string, const std::string &fntFile) - return _cocos2d_LabelAtlas_create$3(L); + return _olua_fun_cocos2d_LabelAtlas_create$3(L); // } } if (num_args == 5) { // if ((olua_is_string(L, 1)) && (olua_is_string(L, 2)) && (olua_is_integer(L, 3)) && (olua_is_integer(L, 4)) && (olua_is_integer(L, 5))) { // static cocos2d::LabelAtlas *create(const std::string &string, const std::string &charMapFile, int itemWidth, int itemHeight, int startCharMap) - return _cocos2d_LabelAtlas_create$2(L); + return _olua_fun_cocos2d_LabelAtlas_create$2(L); // } } @@ -31604,7 +33475,7 @@ static int _cocos2d_LabelAtlas_create(lua_State *L) return 0; } -static int _cocos2d_LabelAtlas_getString(lua_State *L) +static int _olua_fun_cocos2d_LabelAtlas_getString(lua_State *L) { olua_startinvoke(L); @@ -31621,7 +33492,7 @@ static int _cocos2d_LabelAtlas_getString(lua_State *L) return num_ret; } -static int _cocos2d_LabelAtlas_initWithString$1(lua_State *L) +static int _olua_fun_cocos2d_LabelAtlas_initWithString$1(lua_State *L) { olua_startinvoke(L); @@ -31648,7 +33519,7 @@ static int _cocos2d_LabelAtlas_initWithString$1(lua_State *L) return num_ret; } -static int _cocos2d_LabelAtlas_initWithString$2(lua_State *L) +static int _olua_fun_cocos2d_LabelAtlas_initWithString$2(lua_State *L) { olua_startinvoke(L); @@ -31669,7 +33540,7 @@ static int _cocos2d_LabelAtlas_initWithString$2(lua_State *L) return num_ret; } -static int _cocos2d_LabelAtlas_initWithString$3(lua_State *L) +static int _olua_fun_cocos2d_LabelAtlas_initWithString$3(lua_State *L) { olua_startinvoke(L); @@ -31696,26 +33567,26 @@ static int _cocos2d_LabelAtlas_initWithString$3(lua_State *L) return num_ret; } -static int _cocos2d_LabelAtlas_initWithString(lua_State *L) +static int _olua_fun_cocos2d_LabelAtlas_initWithString(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 2) { // if ((olua_is_string(L, 2)) && (olua_is_string(L, 3))) { // bool initWithString(const std::string &string, const std::string &fntFile) - return _cocos2d_LabelAtlas_initWithString$2(L); + return _olua_fun_cocos2d_LabelAtlas_initWithString$2(L); // } } if (num_args == 5) { if ((olua_is_string(L, 2)) && (olua_is_string(L, 3)) && (olua_is_integer(L, 4)) && (olua_is_integer(L, 5)) && (olua_is_integer(L, 6))) { // bool initWithString(const std::string &string, const std::string &charMapFile, int itemWidth, int itemHeight, int startCharMap) - return _cocos2d_LabelAtlas_initWithString$1(L); + return _olua_fun_cocos2d_LabelAtlas_initWithString$1(L); } // if ((olua_is_string(L, 2)) && (olua_is_object(L, 3, "cc.Texture2D")) && (olua_is_integer(L, 4)) && (olua_is_integer(L, 5)) && (olua_is_integer(L, 6))) { // bool initWithString(const std::string &string, cocos2d::Texture2D *texture, int itemWidth, int itemHeight, int startCharMap) - return _cocos2d_LabelAtlas_initWithString$3(L); + return _olua_fun_cocos2d_LabelAtlas_initWithString$3(L); // } } @@ -31724,11 +33595,11 @@ static int _cocos2d_LabelAtlas_initWithString(lua_State *L) return 0; } -static int _cocos2d_LabelAtlas_new(lua_State *L) +static int _olua_fun_cocos2d_LabelAtlas_new(lua_State *L) { olua_startinvoke(L); - // LabelAtlas() + // cocos2d::LabelAtlas() cocos2d::LabelAtlas *ret = new cocos2d::LabelAtlas(); int num_ret = olua_push_object(L, ret, "cc.LabelAtlas"); olua_postnew(L, ret); @@ -31738,7 +33609,7 @@ static int _cocos2d_LabelAtlas_new(lua_State *L) return num_ret; } -static int _cocos2d_LabelAtlas_setString(lua_State *L) +static int _olua_fun_cocos2d_LabelAtlas_setString(lua_State *L) { olua_startinvoke(L); @@ -31756,23 +33627,132 @@ static int _cocos2d_LabelAtlas_setString(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_LabelAtlas(lua_State *L) +static int _olua_cls_cc_LabelAtlas(lua_State *L) { oluacls_class(L, "cc.LabelAtlas"); - oluacls_func(L, "as", _cocos2d_LabelAtlas_as); - oluacls_func(L, "create", _cocos2d_LabelAtlas_create); - oluacls_func(L, "getString", _cocos2d_LabelAtlas_getString); - oluacls_func(L, "initWithString", _cocos2d_LabelAtlas_initWithString); - oluacls_func(L, "new", _cocos2d_LabelAtlas_new); - oluacls_func(L, "setString", _cocos2d_LabelAtlas_setString); - oluacls_prop(L, "string", _cocos2d_LabelAtlas_getString, _cocos2d_LabelAtlas_setString); + oluacls_func(L, "as", _olua_fun_cocos2d_LabelAtlas_as); + oluacls_func(L, "create", _olua_fun_cocos2d_LabelAtlas_create); + oluacls_func(L, "getString", _olua_fun_cocos2d_LabelAtlas_getString); + oluacls_func(L, "initWithString", _olua_fun_cocos2d_LabelAtlas_initWithString); + oluacls_func(L, "new", _olua_fun_cocos2d_LabelAtlas_new); + oluacls_func(L, "setString", _olua_fun_cocos2d_LabelAtlas_setString); + oluacls_prop(L, "string", _olua_fun_cocos2d_LabelAtlas_getString, _olua_fun_cocos2d_LabelAtlas_setString); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_LabelAtlas(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.LabelAtlas")) { + luaL_error(L, "class not found: cocos2d::LabelAtlas"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_FontAtlas_addTexture(lua_State *L) +static int _olua_fun_cocos2d_FontAtlas_CMD_PURGE_FONTATLAS$1(lua_State *L) +{ + olua_startinvoke(L); + + // static const char *CMD_PURGE_FONTATLAS + const char *ret = cocos2d::FontAtlas::CMD_PURGE_FONTATLAS; + int num_ret = olua_push_string(L, ret); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_cocos2d_FontAtlas_CMD_PURGE_FONTATLAS$2(lua_State *L) +{ + olua_startinvoke(L); + + const char *arg1 = nullptr; /** CMD_PURGE_FONTATLAS */ + + olua_check_string(L, 1, &arg1); + + // static const char *CMD_PURGE_FONTATLAS + cocos2d::FontAtlas::CMD_PURGE_FONTATLAS = arg1; + + olua_endinvoke(L); + + return 0; +} + +static int _olua_fun_cocos2d_FontAtlas_CMD_PURGE_FONTATLAS(lua_State *L) +{ + int num_args = lua_gettop(L); + + if (num_args == 0) { + // static const char *CMD_PURGE_FONTATLAS + return _olua_fun_cocos2d_FontAtlas_CMD_PURGE_FONTATLAS$1(L); + } + + if (num_args == 1) { + // if ((olua_is_string(L, 1))) { + // static const char *CMD_PURGE_FONTATLAS + return _olua_fun_cocos2d_FontAtlas_CMD_PURGE_FONTATLAS$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::FontAtlas::CMD_PURGE_FONTATLAS' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_FontAtlas_CMD_RESET_FONTATLAS$1(lua_State *L) +{ + olua_startinvoke(L); + + // static const char *CMD_RESET_FONTATLAS + const char *ret = cocos2d::FontAtlas::CMD_RESET_FONTATLAS; + int num_ret = olua_push_string(L, ret); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_cocos2d_FontAtlas_CMD_RESET_FONTATLAS$2(lua_State *L) +{ + olua_startinvoke(L); + + const char *arg1 = nullptr; /** CMD_RESET_FONTATLAS */ + + olua_check_string(L, 1, &arg1); + + // static const char *CMD_RESET_FONTATLAS + cocos2d::FontAtlas::CMD_RESET_FONTATLAS = arg1; + + olua_endinvoke(L); + + return 0; +} + +static int _olua_fun_cocos2d_FontAtlas_CMD_RESET_FONTATLAS(lua_State *L) +{ + int num_args = lua_gettop(L); + + if (num_args == 0) { + // static const char *CMD_RESET_FONTATLAS + return _olua_fun_cocos2d_FontAtlas_CMD_RESET_FONTATLAS$1(L); + } + + if (num_args == 1) { + // if ((olua_is_string(L, 1))) { + // static const char *CMD_RESET_FONTATLAS + return _olua_fun_cocos2d_FontAtlas_CMD_RESET_FONTATLAS$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::FontAtlas::CMD_RESET_FONTATLAS' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_FontAtlas_addTexture(lua_State *L) { olua_startinvoke(L); @@ -31792,7 +33772,7 @@ static int _cocos2d_FontAtlas_addTexture(lua_State *L) return 0; } -static int _cocos2d_FontAtlas_getFontName(lua_State *L) +static int _olua_fun_cocos2d_FontAtlas_getFontName(lua_State *L) { olua_startinvoke(L); @@ -31809,7 +33789,7 @@ static int _cocos2d_FontAtlas_getFontName(lua_State *L) return num_ret; } -static int _cocos2d_FontAtlas_getLineHeight(lua_State *L) +static int _olua_fun_cocos2d_FontAtlas_getLineHeight(lua_State *L) { olua_startinvoke(L); @@ -31826,7 +33806,7 @@ static int _cocos2d_FontAtlas_getLineHeight(lua_State *L) return num_ret; } -static int _cocos2d_FontAtlas_getTexture(lua_State *L) +static int _olua_fun_cocos2d_FontAtlas_getTexture(lua_State *L) { olua_startinvoke(L); @@ -31845,7 +33825,7 @@ static int _cocos2d_FontAtlas_getTexture(lua_State *L) return num_ret; } -static int _cocos2d_FontAtlas_listenRendererRecreated(lua_State *L) +static int _olua_fun_cocos2d_FontAtlas_listenRendererRecreated(lua_State *L) { olua_startinvoke(L); @@ -31863,7 +33843,7 @@ static int _cocos2d_FontAtlas_listenRendererRecreated(lua_State *L) return 0; } -static int _cocos2d_FontAtlas_purgeTexturesAtlas(lua_State *L) +static int _olua_fun_cocos2d_FontAtlas_purgeTexturesAtlas(lua_State *L) { olua_startinvoke(L); @@ -31879,7 +33859,7 @@ static int _cocos2d_FontAtlas_purgeTexturesAtlas(lua_State *L) return 0; } -static int _cocos2d_FontAtlas_setAliasTexParameters(lua_State *L) +static int _olua_fun_cocos2d_FontAtlas_setAliasTexParameters(lua_State *L) { olua_startinvoke(L); @@ -31895,7 +33875,7 @@ static int _cocos2d_FontAtlas_setAliasTexParameters(lua_State *L) return 0; } -static int _cocos2d_FontAtlas_setAntiAliasTexParameters(lua_State *L) +static int _olua_fun_cocos2d_FontAtlas_setAntiAliasTexParameters(lua_State *L) { olua_startinvoke(L); @@ -31911,7 +33891,7 @@ static int _cocos2d_FontAtlas_setAntiAliasTexParameters(lua_State *L) return 0; } -static int _cocos2d_FontAtlas_setLineHeight(lua_State *L) +static int _olua_fun_cocos2d_FontAtlas_setLineHeight(lua_State *L) { olua_startinvoke(L); @@ -31929,98 +33909,49 @@ static int _cocos2d_FontAtlas_setLineHeight(lua_State *L) return 0; } -static int _cocos2d_FontAtlas_get_CMD_PURGE_FONTATLAS(lua_State *L) +static int _olua_cls_cc_FontAtlas(lua_State *L) { - olua_startinvoke(L); - - // static const char *CMD_PURGE_FONTATLAS - const char *ret = cocos2d::FontAtlas::CMD_PURGE_FONTATLAS; - int num_ret = olua_push_string(L, ret); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_FontAtlas_set_CMD_PURGE_FONTATLAS(lua_State *L) -{ - olua_startinvoke(L); - - const char *arg1 = nullptr; /** CMD_PURGE_FONTATLAS */ - - olua_check_string(L, 1, &arg1); - - // static const char *CMD_PURGE_FONTATLAS - cocos2d::FontAtlas::CMD_PURGE_FONTATLAS = arg1; - - olua_endinvoke(L); - - return 0; -} - -static int _cocos2d_FontAtlas_get_CMD_RESET_FONTATLAS(lua_State *L) -{ - olua_startinvoke(L); - - // static const char *CMD_RESET_FONTATLAS - const char *ret = cocos2d::FontAtlas::CMD_RESET_FONTATLAS; - int num_ret = olua_push_string(L, ret); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_FontAtlas_set_CMD_RESET_FONTATLAS(lua_State *L) -{ - olua_startinvoke(L); - - const char *arg1 = nullptr; /** CMD_RESET_FONTATLAS */ - - olua_check_string(L, 1, &arg1); - - // static const char *CMD_RESET_FONTATLAS - cocos2d::FontAtlas::CMD_RESET_FONTATLAS = arg1; - - olua_endinvoke(L); + oluacls_class(L, "cc.FontAtlas"); + oluacls_func(L, "addTexture", _olua_fun_cocos2d_FontAtlas_addTexture); + oluacls_func(L, "getFontName", _olua_fun_cocos2d_FontAtlas_getFontName); + oluacls_func(L, "getLineHeight", _olua_fun_cocos2d_FontAtlas_getLineHeight); + oluacls_func(L, "getTexture", _olua_fun_cocos2d_FontAtlas_getTexture); + oluacls_func(L, "listenRendererRecreated", _olua_fun_cocos2d_FontAtlas_listenRendererRecreated); + oluacls_func(L, "purgeTexturesAtlas", _olua_fun_cocos2d_FontAtlas_purgeTexturesAtlas); + oluacls_func(L, "setAliasTexParameters", _olua_fun_cocos2d_FontAtlas_setAliasTexParameters); + oluacls_func(L, "setAntiAliasTexParameters", _olua_fun_cocos2d_FontAtlas_setAntiAliasTexParameters); + oluacls_func(L, "setLineHeight", _olua_fun_cocos2d_FontAtlas_setLineHeight); + oluacls_prop(L, "fontName", _olua_fun_cocos2d_FontAtlas_getFontName, nullptr); + oluacls_prop(L, "lineHeight", _olua_fun_cocos2d_FontAtlas_getLineHeight, _olua_fun_cocos2d_FontAtlas_setLineHeight); + oluacls_prop(L, "CMD_PURGE_FONTATLAS", _olua_fun_cocos2d_FontAtlas_CMD_PURGE_FONTATLAS, _olua_fun_cocos2d_FontAtlas_CMD_PURGE_FONTATLAS); + oluacls_prop(L, "CMD_RESET_FONTATLAS", _olua_fun_cocos2d_FontAtlas_CMD_RESET_FONTATLAS, _olua_fun_cocos2d_FontAtlas_CMD_RESET_FONTATLAS); + oluacls_const(L, "CacheTextureHeight", cocos2d::FontAtlas::CacheTextureHeight); + oluacls_const(L, "CacheTextureWidth", cocos2d::FontAtlas::CacheTextureWidth); - return 0; + return 1; } OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_FontAtlas(lua_State *L) +OLUA_LIB int luaopen_cc_FontAtlas(lua_State *L) { - oluacls_class(L, "cc.FontAtlas"); - oluacls_func(L, "addTexture", _cocos2d_FontAtlas_addTexture); - oluacls_func(L, "getFontName", _cocos2d_FontAtlas_getFontName); - oluacls_func(L, "getLineHeight", _cocos2d_FontAtlas_getLineHeight); - oluacls_func(L, "getTexture", _cocos2d_FontAtlas_getTexture); - oluacls_func(L, "listenRendererRecreated", _cocos2d_FontAtlas_listenRendererRecreated); - oluacls_func(L, "purgeTexturesAtlas", _cocos2d_FontAtlas_purgeTexturesAtlas); - oluacls_func(L, "setAliasTexParameters", _cocos2d_FontAtlas_setAliasTexParameters); - oluacls_func(L, "setAntiAliasTexParameters", _cocos2d_FontAtlas_setAntiAliasTexParameters); - oluacls_func(L, "setLineHeight", _cocos2d_FontAtlas_setLineHeight); - oluacls_prop(L, "fontName", _cocos2d_FontAtlas_getFontName, nullptr); - oluacls_prop(L, "lineHeight", _cocos2d_FontAtlas_getLineHeight, _cocos2d_FontAtlas_setLineHeight); - oluacls_prop(L, "CMD_PURGE_FONTATLAS", _cocos2d_FontAtlas_get_CMD_PURGE_FONTATLAS, _cocos2d_FontAtlas_set_CMD_PURGE_FONTATLAS); - oluacls_prop(L, "CMD_RESET_FONTATLAS", _cocos2d_FontAtlas_get_CMD_RESET_FONTATLAS, _cocos2d_FontAtlas_set_CMD_RESET_FONTATLAS); - oluacls_const(L, "CacheTextureHeight", cocos2d::FontAtlas::CacheTextureHeight); - oluacls_const(L, "CacheTextureWidth", cocos2d::FontAtlas::CacheTextureWidth); - + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.FontAtlas")) { + luaL_error(L, "class not found: cocos2d::FontAtlas"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_ClippingRectangleNode_create$1(lua_State *L) +static int _olua_fun_cocos2d_ClippingRectangleNode_create$1(lua_State *L) { olua_startinvoke(L); - cocos2d::Rect arg1; /** clippingRegion */ + cocos2d::Rect *arg1; /** clippingRegion */ olua_check_object(L, 1, &arg1, "cc.Rect"); // static cocos2d::ClippingRectangleNode *create(const cocos2d::Rect &clippingRegion) - cocos2d::ClippingRectangleNode *ret = cocos2d::ClippingRectangleNode::create(arg1); + cocos2d::ClippingRectangleNode *ret = cocos2d::ClippingRectangleNode::create(*arg1); int num_ret = olua_push_object(L, ret, "cc.ClippingRectangleNode"); olua_endinvoke(L); @@ -32028,7 +33959,7 @@ static int _cocos2d_ClippingRectangleNode_create$1(lua_State *L) return num_ret; } -static int _cocos2d_ClippingRectangleNode_create$2(lua_State *L) +static int _olua_fun_cocos2d_ClippingRectangleNode_create$2(lua_State *L) { olua_startinvoke(L); @@ -32041,19 +33972,19 @@ static int _cocos2d_ClippingRectangleNode_create$2(lua_State *L) return num_ret; } -static int _cocos2d_ClippingRectangleNode_create(lua_State *L) +static int _olua_fun_cocos2d_ClippingRectangleNode_create(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 0) { // static cocos2d::ClippingRectangleNode *create() - return _cocos2d_ClippingRectangleNode_create$2(L); + return _olua_fun_cocos2d_ClippingRectangleNode_create$2(L); } if (num_args == 1) { // if ((olua_is_object(L, 1, "cc.Rect"))) { // static cocos2d::ClippingRectangleNode *create(const cocos2d::Rect &clippingRegion) - return _cocos2d_ClippingRectangleNode_create$1(L); + return _olua_fun_cocos2d_ClippingRectangleNode_create$1(L); // } } @@ -32062,7 +33993,7 @@ static int _cocos2d_ClippingRectangleNode_create(lua_State *L) return 0; } -static int _cocos2d_ClippingRectangleNode_getClippingRegion(lua_State *L) +static int _olua_fun_cocos2d_ClippingRectangleNode_getClippingRegion(lua_State *L) { olua_startinvoke(L); @@ -32079,7 +34010,7 @@ static int _cocos2d_ClippingRectangleNode_getClippingRegion(lua_State *L) return num_ret; } -static int _cocos2d_ClippingRectangleNode_isClippingEnabled(lua_State *L) +static int _olua_fun_cocos2d_ClippingRectangleNode_isClippingEnabled(lua_State *L) { olua_startinvoke(L); @@ -32096,7 +34027,7 @@ static int _cocos2d_ClippingRectangleNode_isClippingEnabled(lua_State *L) return num_ret; } -static int _cocos2d_ClippingRectangleNode_setClippingEnabled(lua_State *L) +static int _olua_fun_cocos2d_ClippingRectangleNode_setClippingEnabled(lua_State *L) { olua_startinvoke(L); @@ -32114,41 +34045,50 @@ static int _cocos2d_ClippingRectangleNode_setClippingEnabled(lua_State *L) return 0; } -static int _cocos2d_ClippingRectangleNode_setClippingRegion(lua_State *L) +static int _olua_fun_cocos2d_ClippingRectangleNode_setClippingRegion(lua_State *L) { olua_startinvoke(L); cocos2d::ClippingRectangleNode *self = nullptr; - cocos2d::Rect arg1; /** clippingRegion */ + cocos2d::Rect *arg1; /** clippingRegion */ olua_to_object(L, 1, &self, "cc.ClippingRectangleNode"); olua_check_object(L, 2, &arg1, "cc.Rect"); // void setClippingRegion(const cocos2d::Rect &clippingRegion) - self->setClippingRegion(arg1); + self->setClippingRegion(*arg1); olua_endinvoke(L); return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ClippingRectangleNode(lua_State *L) +static int _olua_cls_cc_ClippingRectangleNode(lua_State *L) { oluacls_class(L, "cc.ClippingRectangleNode"); - oluacls_func(L, "create", _cocos2d_ClippingRectangleNode_create); - oluacls_func(L, "getClippingRegion", _cocos2d_ClippingRectangleNode_getClippingRegion); - oluacls_func(L, "isClippingEnabled", _cocos2d_ClippingRectangleNode_isClippingEnabled); - oluacls_func(L, "setClippingEnabled", _cocos2d_ClippingRectangleNode_setClippingEnabled); - oluacls_func(L, "setClippingRegion", _cocos2d_ClippingRectangleNode_setClippingRegion); - oluacls_prop(L, "clippingEnabled", _cocos2d_ClippingRectangleNode_isClippingEnabled, _cocos2d_ClippingRectangleNode_setClippingEnabled); - oluacls_prop(L, "clippingRegion", _cocos2d_ClippingRectangleNode_getClippingRegion, _cocos2d_ClippingRectangleNode_setClippingRegion); + oluacls_func(L, "create", _olua_fun_cocos2d_ClippingRectangleNode_create); + oluacls_func(L, "getClippingRegion", _olua_fun_cocos2d_ClippingRectangleNode_getClippingRegion); + oluacls_func(L, "isClippingEnabled", _olua_fun_cocos2d_ClippingRectangleNode_isClippingEnabled); + oluacls_func(L, "setClippingEnabled", _olua_fun_cocos2d_ClippingRectangleNode_setClippingEnabled); + oluacls_func(L, "setClippingRegion", _olua_fun_cocos2d_ClippingRectangleNode_setClippingRegion); + oluacls_prop(L, "clippingEnabled", _olua_fun_cocos2d_ClippingRectangleNode_isClippingEnabled, _olua_fun_cocos2d_ClippingRectangleNode_setClippingEnabled); + oluacls_prop(L, "clippingRegion", _olua_fun_cocos2d_ClippingRectangleNode_getClippingRegion, _olua_fun_cocos2d_ClippingRectangleNode_setClippingRegion); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_ClippingRectangleNode(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.ClippingRectangleNode")) { + luaL_error(L, "class not found: cocos2d::ClippingRectangleNode"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_RenderTexture_begin(lua_State *L) +static int _olua_fun_cocos2d_RenderTexture_begin(lua_State *L) { olua_startinvoke(L); @@ -32164,7 +34104,23 @@ static int _cocos2d_RenderTexture_begin(lua_State *L) return 0; } -static int _cocos2d_RenderTexture_beginWithClear$1(lua_State *L) +static int _olua_fun_cocos2d_RenderTexture_beginVisit(lua_State *L) +{ + olua_startinvoke(L); + + cocos2d::RenderTexture *arg1 = nullptr; /** rt */ + + olua_check_object(L, 1, &arg1, "cc.RenderTexture"); + + // @extend(cocos2d::RenderTextureExtend) static void beginVisit(cocos2d::RenderTexture *rt) + cocos2d::RenderTextureExtend::beginVisit(arg1); + + olua_endinvoke(L); + + return 0; +} + +static int _olua_fun_cocos2d_RenderTexture_beginWithClear$1(lua_State *L) { olua_startinvoke(L); @@ -32188,7 +34144,7 @@ static int _cocos2d_RenderTexture_beginWithClear$1(lua_State *L) return 0; } -static int _cocos2d_RenderTexture_beginWithClear$2(lua_State *L) +static int _olua_fun_cocos2d_RenderTexture_beginWithClear$2(lua_State *L) { olua_startinvoke(L); @@ -32214,7 +34170,7 @@ static int _cocos2d_RenderTexture_beginWithClear$2(lua_State *L) return 0; } -static int _cocos2d_RenderTexture_beginWithClear$3(lua_State *L) +static int _olua_fun_cocos2d_RenderTexture_beginWithClear$3(lua_State *L) { olua_startinvoke(L); @@ -32242,28 +34198,28 @@ static int _cocos2d_RenderTexture_beginWithClear$3(lua_State *L) return 0; } -static int _cocos2d_RenderTexture_beginWithClear(lua_State *L) +static int _olua_fun_cocos2d_RenderTexture_beginWithClear(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 4) { // if ((olua_is_number(L, 2)) && (olua_is_number(L, 3)) && (olua_is_number(L, 4)) && (olua_is_number(L, 5))) { // void beginWithClear(float r, float g, float b, float a) - return _cocos2d_RenderTexture_beginWithClear$1(L); + return _olua_fun_cocos2d_RenderTexture_beginWithClear$1(L); // } } if (num_args == 5) { // if ((olua_is_number(L, 2)) && (olua_is_number(L, 3)) && (olua_is_number(L, 4)) && (olua_is_number(L, 5)) && (olua_is_number(L, 6))) { // void beginWithClear(float r, float g, float b, float a, float depthValue) - return _cocos2d_RenderTexture_beginWithClear$2(L); + return _olua_fun_cocos2d_RenderTexture_beginWithClear$2(L); // } } if (num_args == 6) { // if ((olua_is_number(L, 2)) && (olua_is_number(L, 3)) && (olua_is_number(L, 4)) && (olua_is_number(L, 5)) && (olua_is_number(L, 6)) && (olua_is_integer(L, 7))) { // void beginWithClear(float r, float g, float b, float a, float depthValue, int stencilValue) - return _cocos2d_RenderTexture_beginWithClear$3(L); + return _olua_fun_cocos2d_RenderTexture_beginWithClear$3(L); // } } @@ -32272,7 +34228,7 @@ static int _cocos2d_RenderTexture_beginWithClear(lua_State *L) return 0; } -static int _cocos2d_RenderTexture_clear(lua_State *L) +static int _olua_fun_cocos2d_RenderTexture_clear(lua_State *L) { olua_startinvoke(L); @@ -32296,7 +34252,7 @@ static int _cocos2d_RenderTexture_clear(lua_State *L) return 0; } -static int _cocos2d_RenderTexture_clearDepth(lua_State *L) +static int _olua_fun_cocos2d_RenderTexture_clearDepth(lua_State *L) { olua_startinvoke(L); @@ -32314,7 +34270,7 @@ static int _cocos2d_RenderTexture_clearDepth(lua_State *L) return 0; } -static int _cocos2d_RenderTexture_clearStencil(lua_State *L) +static int _olua_fun_cocos2d_RenderTexture_clearStencil(lua_State *L) { olua_startinvoke(L); @@ -32332,7 +34288,7 @@ static int _cocos2d_RenderTexture_clearStencil(lua_State *L) return 0; } -static int _cocos2d_RenderTexture_create$1(lua_State *L) +static int _olua_fun_cocos2d_RenderTexture_create$1(lua_State *L) { olua_startinvoke(L); @@ -32355,7 +34311,7 @@ static int _cocos2d_RenderTexture_create$1(lua_State *L) return num_ret; } -static int _cocos2d_RenderTexture_create$2(lua_State *L) +static int _olua_fun_cocos2d_RenderTexture_create$2(lua_State *L) { olua_startinvoke(L); @@ -32376,7 +34332,7 @@ static int _cocos2d_RenderTexture_create$2(lua_State *L) return num_ret; } -static int _cocos2d_RenderTexture_create$3(lua_State *L) +static int _olua_fun_cocos2d_RenderTexture_create$3(lua_State *L) { olua_startinvoke(L); @@ -32395,28 +34351,28 @@ static int _cocos2d_RenderTexture_create$3(lua_State *L) return num_ret; } -static int _cocos2d_RenderTexture_create(lua_State *L) +static int _olua_fun_cocos2d_RenderTexture_create(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 2) { // if ((olua_is_integer(L, 1)) && (olua_is_integer(L, 2))) { // static cocos2d::RenderTexture *create(int w, int h) - return _cocos2d_RenderTexture_create$3(L); + return _olua_fun_cocos2d_RenderTexture_create$3(L); // } } if (num_args == 3) { // if ((olua_is_integer(L, 1)) && (olua_is_integer(L, 2)) && (olua_is_enum(L, 3))) { // static cocos2d::RenderTexture *create(int w, int h, cocos2d::backend::PixelFormat format) - return _cocos2d_RenderTexture_create$2(L); + return _olua_fun_cocos2d_RenderTexture_create$2(L); // } } if (num_args == 4) { // if ((olua_is_integer(L, 1)) && (olua_is_integer(L, 2)) && (olua_is_enum(L, 3)) && (olua_is_enum(L, 4))) { // static cocos2d::RenderTexture *create(int w, int h, cocos2d::backend::PixelFormat format, cocos2d::backend::PixelFormat depthStencilFormat) - return _cocos2d_RenderTexture_create$1(L); + return _olua_fun_cocos2d_RenderTexture_create$1(L); // } } @@ -32425,7 +34381,23 @@ static int _cocos2d_RenderTexture_create(lua_State *L) return 0; } -static int _cocos2d_RenderTexture_end(lua_State *L) +static int _olua_fun_cocos2d_RenderTexture_endVisit(lua_State *L) +{ + olua_startinvoke(L); + + cocos2d::RenderTexture *arg1 = nullptr; /** rt */ + + olua_check_object(L, 1, &arg1, "cc.RenderTexture"); + + // @extend(cocos2d::RenderTextureExtend) static void endVisit(cocos2d::RenderTexture *rt) + cocos2d::RenderTextureExtend::endVisit(arg1); + + olua_endinvoke(L); + + return 0; +} + +static int _olua_fun_cocos2d_RenderTexture_end_(lua_State *L) { olua_startinvoke(L); @@ -32441,7 +34413,7 @@ static int _cocos2d_RenderTexture_end(lua_State *L) return 0; } -static int _cocos2d_RenderTexture_getClearColor(lua_State *L) +static int _olua_fun_cocos2d_RenderTexture_getClearColor(lua_State *L) { olua_startinvoke(L); @@ -32458,7 +34430,7 @@ static int _cocos2d_RenderTexture_getClearColor(lua_State *L) return num_ret; } -static int _cocos2d_RenderTexture_getClearDepth(lua_State *L) +static int _olua_fun_cocos2d_RenderTexture_getClearDepth(lua_State *L) { olua_startinvoke(L); @@ -32475,7 +34447,7 @@ static int _cocos2d_RenderTexture_getClearDepth(lua_State *L) return num_ret; } -static int _cocos2d_RenderTexture_getClearFlags(lua_State *L) +static int _olua_fun_cocos2d_RenderTexture_getClearFlags(lua_State *L) { olua_startinvoke(L); @@ -32492,7 +34464,7 @@ static int _cocos2d_RenderTexture_getClearFlags(lua_State *L) return num_ret; } -static int _cocos2d_RenderTexture_getClearStencil(lua_State *L) +static int _olua_fun_cocos2d_RenderTexture_getClearStencil(lua_State *L) { olua_startinvoke(L); @@ -32509,7 +34481,7 @@ static int _cocos2d_RenderTexture_getClearStencil(lua_State *L) return num_ret; } -static int _cocos2d_RenderTexture_getSprite(lua_State *L) +static int _olua_fun_cocos2d_RenderTexture_getSprite(lua_State *L) { olua_startinvoke(L); @@ -32526,7 +34498,7 @@ static int _cocos2d_RenderTexture_getSprite(lua_State *L) return num_ret; } -static int _cocos2d_RenderTexture_initWithWidthAndHeight$1(lua_State *L) +static int _olua_fun_cocos2d_RenderTexture_initWithWidthAndHeight$1(lua_State *L) { olua_startinvoke(L); @@ -32549,7 +34521,7 @@ static int _cocos2d_RenderTexture_initWithWidthAndHeight$1(lua_State *L) return num_ret; } -static int _cocos2d_RenderTexture_initWithWidthAndHeight$2(lua_State *L) +static int _olua_fun_cocos2d_RenderTexture_initWithWidthAndHeight$2(lua_State *L) { olua_startinvoke(L); @@ -32574,21 +34546,21 @@ static int _cocos2d_RenderTexture_initWithWidthAndHeight$2(lua_State *L) return num_ret; } -static int _cocos2d_RenderTexture_initWithWidthAndHeight(lua_State *L) +static int _olua_fun_cocos2d_RenderTexture_initWithWidthAndHeight(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 3) { // if ((olua_is_integer(L, 2)) && (olua_is_integer(L, 3)) && (olua_is_enum(L, 4))) { // bool initWithWidthAndHeight(int w, int h, cocos2d::backend::PixelFormat format) - return _cocos2d_RenderTexture_initWithWidthAndHeight$1(L); + return _olua_fun_cocos2d_RenderTexture_initWithWidthAndHeight$1(L); // } } if (num_args == 4) { // if ((olua_is_integer(L, 2)) && (olua_is_integer(L, 3)) && (olua_is_enum(L, 4)) && (olua_is_enum(L, 5))) { // bool initWithWidthAndHeight(int w, int h, cocos2d::backend::PixelFormat format, cocos2d::backend::PixelFormat depthStencilFormat) - return _cocos2d_RenderTexture_initWithWidthAndHeight$2(L); + return _olua_fun_cocos2d_RenderTexture_initWithWidthAndHeight$2(L); // } } @@ -32597,7 +34569,7 @@ static int _cocos2d_RenderTexture_initWithWidthAndHeight(lua_State *L) return 0; } -static int _cocos2d_RenderTexture_isAutoDraw(lua_State *L) +static int _olua_fun_cocos2d_RenderTexture_isAutoDraw(lua_State *L) { olua_startinvoke(L); @@ -32614,7 +34586,7 @@ static int _cocos2d_RenderTexture_isAutoDraw(lua_State *L) return num_ret; } -static int _cocos2d_RenderTexture_listenToBackground(lua_State *L) +static int _olua_fun_cocos2d_RenderTexture_listenToBackground(lua_State *L) { olua_startinvoke(L); @@ -32632,7 +34604,7 @@ static int _cocos2d_RenderTexture_listenToBackground(lua_State *L) return 0; } -static int _cocos2d_RenderTexture_listenToForeground(lua_State *L) +static int _olua_fun_cocos2d_RenderTexture_listenToForeground(lua_State *L) { olua_startinvoke(L); @@ -32650,11 +34622,11 @@ static int _cocos2d_RenderTexture_listenToForeground(lua_State *L) return 0; } -static int _cocos2d_RenderTexture_new(lua_State *L) +static int _olua_fun_cocos2d_RenderTexture_new(lua_State *L) { olua_startinvoke(L); - // RenderTexture() + // cocos2d::RenderTexture() cocos2d::RenderTexture *ret = new cocos2d::RenderTexture(); int num_ret = olua_push_object(L, ret, "cc.RenderTexture"); olua_postnew(L, ret); @@ -32664,7 +34636,7 @@ static int _cocos2d_RenderTexture_new(lua_State *L) return num_ret; } -static int _cocos2d_RenderTexture_newImage$1(lua_State *L) +static int _olua_fun_cocos2d_RenderTexture_newImage$1(lua_State *L) { olua_startinvoke(L); @@ -32678,15 +34650,16 @@ static int _cocos2d_RenderTexture_newImage$1(lua_State *L) void *cb_store = (void *)self; std::string cb_tag = "newImage"; - std::string cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_NEW); + std::string cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_NEW); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](cocos2d::Image *arg1) { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](cocos2d::Image *cb_arg1) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); if (olua_contextequal(L, cb_ctx)) { int top = lua_gettop(L); - olua_push_object(L, arg1, "cc.Image"); + olua_push_object(L, cb_arg1, "cc.Image"); olua_callback(L, cb_store, cb_name.c_str(), 1); @@ -32704,7 +34677,7 @@ static int _cocos2d_RenderTexture_newImage$1(lua_State *L) return 0; } -static int _cocos2d_RenderTexture_newImage$2(lua_State *L) +static int _olua_fun_cocos2d_RenderTexture_newImage$2(lua_State *L) { olua_startinvoke(L); @@ -32716,15 +34689,16 @@ static int _cocos2d_RenderTexture_newImage$2(lua_State *L) void *cb_store = (void *)self; std::string cb_tag = "newImage"; - std::string cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_NEW); + std::string cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_NEW); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](cocos2d::Image *arg1) { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](cocos2d::Image *cb_arg1) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); if (olua_contextequal(L, cb_ctx)) { int top = lua_gettop(L); - olua_push_object(L, arg1, "cc.Image"); + olua_push_object(L, cb_arg1, "cc.Image"); olua_callback(L, cb_store, cb_name.c_str(), 1); @@ -32734,7 +34708,7 @@ static int _cocos2d_RenderTexture_newImage$2(lua_State *L) } }; - // void newImage(std::function imageCallback, @optional bool flipImage) + // void newImage(std::function imageCallback) self->newImage(arg1); olua_endinvoke(L); @@ -32742,21 +34716,21 @@ static int _cocos2d_RenderTexture_newImage$2(lua_State *L) return 0; } -static int _cocos2d_RenderTexture_newImage(lua_State *L) +static int _olua_fun_cocos2d_RenderTexture_newImage(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_callback(L, 2, "std.function"))) { - // void newImage(std::function imageCallback, @optional bool flipImage) - return _cocos2d_RenderTexture_newImage$2(L); + // void newImage(std::function imageCallback) + return _olua_fun_cocos2d_RenderTexture_newImage$2(L); // } } if (num_args == 2) { // if ((olua_is_callback(L, 2, "std.function")) && (olua_is_bool(L, 3))) { // void newImage(std::function imageCallback, @optional bool flipImage) - return _cocos2d_RenderTexture_newImage$1(L); + return _olua_fun_cocos2d_RenderTexture_newImage$1(L); // } } @@ -32765,7 +34739,242 @@ static int _cocos2d_RenderTexture_newImage(lua_State *L) return 0; } -static int _cocos2d_RenderTexture_saveToFile$1(lua_State *L) +static int _olua_fun_cocos2d_RenderTexture_saveToFile$1(lua_State *L) +{ + olua_startinvoke(L); + + cocos2d::RenderTexture *self = nullptr; + std::string arg1; /** filename */ + bool arg2 = false; /** isRGBA */ + std::function arg3; /** callback */ + + olua_to_object(L, 1, &self, "cc.RenderTexture"); + olua_check_string(L, 2, &arg1); + olua_check_bool(L, 3, &arg2); + olua_check_callback(L, 4, &arg3, "std.function"); + + void *cb_store = (void *)self; + std::string cb_tag = "saveToFile"; + std::string cb_name; + if (olua_isfunction(L, 4)) { + cb_name = olua_setcallback(L, cb_store, 4, cb_tag.c_str(), OLUA_TAG_REPLACE); + olua_Context cb_ctx = olua_context(L); + // lua_State *ML = olua_mainthread(L); + arg3 = [cb_store, cb_name, cb_ctx /*, ML */](cocos2d::RenderTexture *cb_arg1, const std::string &cb_arg2) { + lua_State *L = olua_mainthread(NULL); + olua_checkhostthread(); + + if (olua_contextequal(L, cb_ctx)) { + int top = lua_gettop(L); + olua_push_object(L, cb_arg1, "cc.RenderTexture"); + olua_push_string(L, cb_arg2); + + olua_callback(L, cb_store, cb_name.c_str(), 2); + + olua_removecallback(L, cb_store, cb_name.c_str(), OLUA_TAG_WHOLE); + + lua_settop(L, top); + } + }; + } else { + olua_removecallback(L, cb_store, cb_tag.c_str(), OLUA_TAG_EQUAL); + arg3 = nullptr; + } + + // bool saveToFile(const std::string &filename, @optional bool isRGBA, @optional std::function callback) + bool ret = self->saveToFile(arg1, arg2, arg3); + int num_ret = olua_push_bool(L, ret); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_cocos2d_RenderTexture_saveToFile$2(lua_State *L) +{ + olua_startinvoke(L); + + cocos2d::RenderTexture *self = nullptr; + std::string arg1; /** filename */ + + olua_to_object(L, 1, &self, "cc.RenderTexture"); + olua_check_string(L, 2, &arg1); + + // bool saveToFile(const std::string &filename) + bool ret = self->saveToFile(arg1); + int num_ret = olua_push_bool(L, ret); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_cocos2d_RenderTexture_saveToFile$3(lua_State *L) +{ + olua_startinvoke(L); + + cocos2d::RenderTexture *self = nullptr; + std::string arg1; /** filename */ + bool arg2 = false; /** isRGBA */ + + olua_to_object(L, 1, &self, "cc.RenderTexture"); + olua_check_string(L, 2, &arg1); + olua_check_bool(L, 3, &arg2); + + // bool saveToFile(const std::string &filename, @optional bool isRGBA) + bool ret = self->saveToFile(arg1, arg2); + int num_ret = olua_push_bool(L, ret); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_cocos2d_RenderTexture_saveToFile$4(lua_State *L) +{ + olua_startinvoke(L); + + cocos2d::RenderTexture *self = nullptr; + std::string arg1; /** filename */ + cocos2d::Image::Format arg2 = (cocos2d::Image::Format)0; /** format */ + bool arg3 = false; /** isRGBA */ + std::function arg4; /** callback */ + + olua_to_object(L, 1, &self, "cc.RenderTexture"); + olua_check_string(L, 2, &arg1); + olua_check_enum(L, 3, &arg2); + olua_check_bool(L, 4, &arg3); + olua_check_callback(L, 5, &arg4, "std.function"); + + void *cb_store = (void *)self; + std::string cb_tag = "saveToFile"; + std::string cb_name; + if (olua_isfunction(L, 5)) { + cb_name = olua_setcallback(L, cb_store, 5, cb_tag.c_str(), OLUA_TAG_REPLACE); + olua_Context cb_ctx = olua_context(L); + // lua_State *ML = olua_mainthread(L); + arg4 = [cb_store, cb_name, cb_ctx /*, ML */](cocos2d::RenderTexture *cb_arg1, const std::string &cb_arg2) { + lua_State *L = olua_mainthread(NULL); + olua_checkhostthread(); + + if (olua_contextequal(L, cb_ctx)) { + int top = lua_gettop(L); + olua_push_object(L, cb_arg1, "cc.RenderTexture"); + olua_push_string(L, cb_arg2); + + olua_callback(L, cb_store, cb_name.c_str(), 2); + + olua_removecallback(L, cb_store, cb_name.c_str(), OLUA_TAG_WHOLE); + + lua_settop(L, top); + } + }; + } else { + olua_removecallback(L, cb_store, cb_tag.c_str(), OLUA_TAG_EQUAL); + arg4 = nullptr; + } + + // bool saveToFile(const std::string &filename, cocos2d::Image::Format format, @optional bool isRGBA, @optional std::function callback) + bool ret = self->saveToFile(arg1, arg2, arg3, arg4); + int num_ret = olua_push_bool(L, ret); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_cocos2d_RenderTexture_saveToFile$5(lua_State *L) +{ + olua_startinvoke(L); + + cocos2d::RenderTexture *self = nullptr; + std::string arg1; /** filename */ + cocos2d::Image::Format arg2 = (cocos2d::Image::Format)0; /** format */ + + olua_to_object(L, 1, &self, "cc.RenderTexture"); + olua_check_string(L, 2, &arg1); + olua_check_enum(L, 3, &arg2); + + // bool saveToFile(const std::string &filename, cocos2d::Image::Format format) + bool ret = self->saveToFile(arg1, arg2); + int num_ret = olua_push_bool(L, ret); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_cocos2d_RenderTexture_saveToFile$6(lua_State *L) +{ + olua_startinvoke(L); + + cocos2d::RenderTexture *self = nullptr; + std::string arg1; /** filename */ + cocos2d::Image::Format arg2 = (cocos2d::Image::Format)0; /** format */ + bool arg3 = false; /** isRGBA */ + + olua_to_object(L, 1, &self, "cc.RenderTexture"); + olua_check_string(L, 2, &arg1); + olua_check_enum(L, 3, &arg2); + olua_check_bool(L, 4, &arg3); + + // bool saveToFile(const std::string &filename, cocos2d::Image::Format format, @optional bool isRGBA) + bool ret = self->saveToFile(arg1, arg2, arg3); + int num_ret = olua_push_bool(L, ret); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_cocos2d_RenderTexture_saveToFile(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 1) { + // if ((olua_is_string(L, 2))) { + // bool saveToFile(const std::string &filename) + return _olua_fun_cocos2d_RenderTexture_saveToFile$2(L); + // } + } + + if (num_args == 2) { + if ((olua_is_string(L, 2)) && (olua_is_bool(L, 3))) { + // bool saveToFile(const std::string &filename, @optional bool isRGBA) + return _olua_fun_cocos2d_RenderTexture_saveToFile$3(L); + } + + // if ((olua_is_string(L, 2)) && (olua_is_enum(L, 3))) { + // bool saveToFile(const std::string &filename, cocos2d::Image::Format format) + return _olua_fun_cocos2d_RenderTexture_saveToFile$5(L); + // } + } + + if (num_args == 3) { + if ((olua_is_string(L, 2)) && (olua_is_bool(L, 3)) && (olua_is_callback(L, 4, "std.function"))) { + // bool saveToFile(const std::string &filename, @optional bool isRGBA, @optional std::function callback) + return _olua_fun_cocos2d_RenderTexture_saveToFile$1(L); + } + + // if ((olua_is_string(L, 2)) && (olua_is_enum(L, 3)) && (olua_is_bool(L, 4))) { + // bool saveToFile(const std::string &filename, cocos2d::Image::Format format, @optional bool isRGBA) + return _olua_fun_cocos2d_RenderTexture_saveToFile$6(L); + // } + } + + if (num_args == 4) { + // if ((olua_is_string(L, 2)) && (olua_is_enum(L, 3)) && (olua_is_bool(L, 4)) && (olua_is_callback(L, 5, "std.function"))) { + // bool saveToFile(const std::string &filename, cocos2d::Image::Format format, @optional bool isRGBA, @optional std::function callback) + return _olua_fun_cocos2d_RenderTexture_saveToFile$4(L); + // } + } + + luaL_error(L, "method 'cocos2d::RenderTexture::saveToFile' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_RenderTexture_saveToFileAsNonPMA$1(lua_State *L) { olua_startinvoke(L); @@ -32783,16 +34992,17 @@ static int _cocos2d_RenderTexture_saveToFile$1(lua_State *L) std::string cb_tag = "saveToFile"; std::string cb_name; if (olua_isfunction(L, 4)) { - cb_name = olua_setcallback(L, cb_store, 4, cb_tag.c_str(), OLUA_TAG_REPLACE); + cb_name = olua_setcallback(L, cb_store, 4, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg3 = [cb_store, cb_name, cb_ctx](cocos2d::RenderTexture *arg1, const std::string &arg2) { + // lua_State *ML = olua_mainthread(L); + arg3 = [cb_store, cb_name, cb_ctx /*, ML */](cocos2d::RenderTexture *cb_arg1, const std::string &cb_arg2) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); if (olua_contextequal(L, cb_ctx)) { int top = lua_gettop(L); - olua_push_object(L, arg1, "cc.RenderTexture"); - olua_push_string(L, arg2); + olua_push_object(L, cb_arg1, "cc.RenderTexture"); + olua_push_string(L, cb_arg2); olua_callback(L, cb_store, cb_name.c_str(), 2); @@ -32806,121 +35016,8 @@ static int _cocos2d_RenderTexture_saveToFile$1(lua_State *L) arg3 = nullptr; } - // bool saveToFile(const std::string &filename, @optional bool isRGBA, @optional std::function callback) - bool ret = self->saveToFile(arg1, arg2, arg3); - int num_ret = olua_push_bool(L, ret); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_RenderTexture_saveToFile$2(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::RenderTexture *self = nullptr; - std::string arg1; /** filename */ - cocos2d::Image::Format arg2 = (cocos2d::Image::Format)0; /** format */ - bool arg3 = false; /** isRGBA */ - std::function arg4; /** callback */ - - olua_to_object(L, 1, &self, "cc.RenderTexture"); - olua_check_string(L, 2, &arg1); - olua_check_enum(L, 3, &arg2); - olua_check_bool(L, 4, &arg3); - olua_check_callback(L, 5, &arg4, "std.function"); - - void *cb_store = (void *)self; - std::string cb_tag = "saveToFile"; - std::string cb_name; - if (olua_isfunction(L, 5)) { - cb_name = olua_setcallback(L, cb_store, 5, cb_tag.c_str(), OLUA_TAG_REPLACE); - olua_Context cb_ctx = olua_context(L); - arg4 = [cb_store, cb_name, cb_ctx](cocos2d::RenderTexture *arg1, const std::string &arg2) { - lua_State *L = olua_mainthread(NULL); - olua_checkhostthread(); - - if (olua_contextequal(L, cb_ctx)) { - int top = lua_gettop(L); - olua_push_object(L, arg1, "cc.RenderTexture"); - olua_push_string(L, arg2); - - olua_callback(L, cb_store, cb_name.c_str(), 2); - - olua_removecallback(L, cb_store, cb_name.c_str(), OLUA_TAG_WHOLE); - - lua_settop(L, top); - } - }; - } else { - olua_removecallback(L, cb_store, cb_tag.c_str(), OLUA_TAG_EQUAL); - arg4 = nullptr; - } - - // bool saveToFile(const std::string &filename, cocos2d::Image::Format format, @optional bool isRGBA, @optional std::function callback) - bool ret = self->saveToFile(arg1, arg2, arg3, arg4); - int num_ret = olua_push_bool(L, ret); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_RenderTexture_saveToFile$3(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::RenderTexture *self = nullptr; - std::string arg1; /** filename */ - - olua_to_object(L, 1, &self, "cc.RenderTexture"); - olua_check_string(L, 2, &arg1); - - // bool saveToFile(const std::string &filename, @optional bool isRGBA, @optional std::function callback) - bool ret = self->saveToFile(arg1); - int num_ret = olua_push_bool(L, ret); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_RenderTexture_saveToFile$4(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::RenderTexture *self = nullptr; - std::string arg1; /** filename */ - bool arg2 = false; /** isRGBA */ - - olua_to_object(L, 1, &self, "cc.RenderTexture"); - olua_check_string(L, 2, &arg1); - olua_check_bool(L, 3, &arg2); - - // bool saveToFile(const std::string &filename, @optional bool isRGBA, @optional std::function callback) - bool ret = self->saveToFile(arg1, arg2); - int num_ret = olua_push_bool(L, ret); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_RenderTexture_saveToFile$5(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::RenderTexture *self = nullptr; - std::string arg1; /** filename */ - cocos2d::Image::Format arg2 = (cocos2d::Image::Format)0; /** format */ - - olua_to_object(L, 1, &self, "cc.RenderTexture"); - olua_check_string(L, 2, &arg1); - olua_check_enum(L, 3, &arg2); - - // bool saveToFile(const std::string &filename, cocos2d::Image::Format format, @optional bool isRGBA, @optional std::function callback) - bool ret = self->saveToFile(arg1, arg2); + // bool saveToFileAsNonPMA(const std::string &filename, @optional bool isRGBA, @optional std::function callback) + bool ret = self->saveToFileAsNonPMA(arg1, arg2, arg3); int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); @@ -32928,22 +35025,18 @@ static int _cocos2d_RenderTexture_saveToFile$5(lua_State *L) return num_ret; } -static int _cocos2d_RenderTexture_saveToFile$6(lua_State *L) +static int _olua_fun_cocos2d_RenderTexture_saveToFileAsNonPMA$2(lua_State *L) { olua_startinvoke(L); cocos2d::RenderTexture *self = nullptr; std::string arg1; /** filename */ - cocos2d::Image::Format arg2 = (cocos2d::Image::Format)0; /** format */ - bool arg3 = false; /** isRGBA */ olua_to_object(L, 1, &self, "cc.RenderTexture"); olua_check_string(L, 2, &arg1); - olua_check_enum(L, 3, &arg2); - olua_check_bool(L, 4, &arg3); - // bool saveToFile(const std::string &filename, cocos2d::Image::Format format, @optional bool isRGBA, @optional std::function callback) - bool ret = self->saveToFile(arg1, arg2, arg3); + // bool saveToFileAsNonPMA(const std::string &filename) + bool ret = self->saveToFileAsNonPMA(arg1); int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); @@ -32951,96 +35044,20 @@ static int _cocos2d_RenderTexture_saveToFile$6(lua_State *L) return num_ret; } -static int _cocos2d_RenderTexture_saveToFile(lua_State *L) -{ - int num_args = lua_gettop(L) - 1; - - if (num_args == 1) { - // if ((olua_is_string(L, 2))) { - // bool saveToFile(const std::string &filename, @optional bool isRGBA, @optional std::function callback) - return _cocos2d_RenderTexture_saveToFile$3(L); - // } - } - - if (num_args == 2) { - if ((olua_is_string(L, 2)) && (olua_is_bool(L, 3))) { - // bool saveToFile(const std::string &filename, @optional bool isRGBA, @optional std::function callback) - return _cocos2d_RenderTexture_saveToFile$4(L); - } - - // if ((olua_is_string(L, 2)) && (olua_is_enum(L, 3))) { - // bool saveToFile(const std::string &filename, cocos2d::Image::Format format, @optional bool isRGBA, @optional std::function callback) - return _cocos2d_RenderTexture_saveToFile$5(L); - // } - } - - if (num_args == 3) { - if ((olua_is_string(L, 2)) && (olua_is_bool(L, 3)) && (olua_is_callback(L, 4, "std.function"))) { - // bool saveToFile(const std::string &filename, @optional bool isRGBA, @optional std::function callback) - return _cocos2d_RenderTexture_saveToFile$1(L); - } - - // if ((olua_is_string(L, 2)) && (olua_is_enum(L, 3)) && (olua_is_bool(L, 4))) { - // bool saveToFile(const std::string &filename, cocos2d::Image::Format format, @optional bool isRGBA, @optional std::function callback) - return _cocos2d_RenderTexture_saveToFile$6(L); - // } - } - - if (num_args == 4) { - // if ((olua_is_string(L, 2)) && (olua_is_enum(L, 3)) && (olua_is_bool(L, 4)) && (olua_is_callback(L, 5, "std.function"))) { - // bool saveToFile(const std::string &filename, cocos2d::Image::Format format, @optional bool isRGBA, @optional std::function callback) - return _cocos2d_RenderTexture_saveToFile$2(L); - // } - } - - luaL_error(L, "method 'cocos2d::RenderTexture::saveToFile' not support '%d' arguments", num_args); - - return 0; -} - -static int _cocos2d_RenderTexture_saveToFileAsNonPMA$1(lua_State *L) +static int _olua_fun_cocos2d_RenderTexture_saveToFileAsNonPMA$3(lua_State *L) { olua_startinvoke(L); cocos2d::RenderTexture *self = nullptr; std::string arg1; /** filename */ bool arg2 = false; /** isRGBA */ - std::function arg3; /** callback */ olua_to_object(L, 1, &self, "cc.RenderTexture"); olua_check_string(L, 2, &arg1); olua_check_bool(L, 3, &arg2); - olua_check_callback(L, 4, &arg3, "std.function"); - - void *cb_store = (void *)self; - std::string cb_tag = "saveToFile"; - std::string cb_name; - if (olua_isfunction(L, 4)) { - cb_name = olua_setcallback(L, cb_store, 4, cb_tag.c_str(), OLUA_TAG_REPLACE); - olua_Context cb_ctx = olua_context(L); - arg3 = [cb_store, cb_name, cb_ctx](cocos2d::RenderTexture *arg1, const std::string &arg2) { - lua_State *L = olua_mainthread(NULL); - olua_checkhostthread(); - - if (olua_contextequal(L, cb_ctx)) { - int top = lua_gettop(L); - olua_push_object(L, arg1, "cc.RenderTexture"); - olua_push_string(L, arg2); - - olua_callback(L, cb_store, cb_name.c_str(), 2); - olua_removecallback(L, cb_store, cb_name.c_str(), OLUA_TAG_WHOLE); - - lua_settop(L, top); - } - }; - } else { - olua_removecallback(L, cb_store, cb_tag.c_str(), OLUA_TAG_EQUAL); - arg3 = nullptr; - } - - // bool saveToFileAsNonPMA(const std::string &filename, @optional bool isRGBA, @optional std::function callback) - bool ret = self->saveToFileAsNonPMA(arg1, arg2, arg3); + // bool saveToFileAsNonPMA(const std::string &filename, @optional bool isRGBA) + bool ret = self->saveToFileAsNonPMA(arg1, arg2); int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); @@ -33048,7 +35065,7 @@ static int _cocos2d_RenderTexture_saveToFileAsNonPMA$1(lua_State *L) return num_ret; } -static int _cocos2d_RenderTexture_saveToFileAsNonPMA$2(lua_State *L) +static int _olua_fun_cocos2d_RenderTexture_saveToFileAsNonPMA$4(lua_State *L) { olua_startinvoke(L); @@ -33066,16 +35083,17 @@ static int _cocos2d_RenderTexture_saveToFileAsNonPMA$2(lua_State *L) void *cb_store = (void *)self; std::string cb_tag = "saveToFile"; - std::string cb_name = olua_setcallback(L, cb_store, 5, cb_tag.c_str(), OLUA_TAG_REPLACE); + std::string cb_name = olua_setcallback(L, cb_store, 5, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg4 = [cb_store, cb_name, cb_ctx](cocos2d::RenderTexture *arg1, const std::string &arg2) { + // lua_State *ML = olua_mainthread(L); + arg4 = [cb_store, cb_name, cb_ctx /*, ML */](cocos2d::RenderTexture *cb_arg1, const std::string &cb_arg2) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); if (olua_contextequal(L, cb_ctx)) { int top = lua_gettop(L); - olua_push_object(L, arg1, "cc.RenderTexture"); - olua_push_string(L, arg2); + olua_push_object(L, cb_arg1, "cc.RenderTexture"); + olua_push_string(L, cb_arg2); olua_callback(L, cb_store, cb_name.c_str(), 2); @@ -33094,75 +35112,35 @@ static int _cocos2d_RenderTexture_saveToFileAsNonPMA$2(lua_State *L) return num_ret; } -static int _cocos2d_RenderTexture_saveToFileAsNonPMA$3(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::RenderTexture *self = nullptr; - std::string arg1; /** filename */ - - olua_to_object(L, 1, &self, "cc.RenderTexture"); - olua_check_string(L, 2, &arg1); - - // bool saveToFileAsNonPMA(const std::string &filename, @optional bool isRGBA, @optional std::function callback) - bool ret = self->saveToFileAsNonPMA(arg1); - int num_ret = olua_push_bool(L, ret); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_RenderTexture_saveToFileAsNonPMA$4(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::RenderTexture *self = nullptr; - std::string arg1; /** filename */ - bool arg2 = false; /** isRGBA */ - - olua_to_object(L, 1, &self, "cc.RenderTexture"); - olua_check_string(L, 2, &arg1); - olua_check_bool(L, 3, &arg2); - - // bool saveToFileAsNonPMA(const std::string &filename, @optional bool isRGBA, @optional std::function callback) - bool ret = self->saveToFileAsNonPMA(arg1, arg2); - int num_ret = olua_push_bool(L, ret); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_RenderTexture_saveToFileAsNonPMA(lua_State *L) +static int _olua_fun_cocos2d_RenderTexture_saveToFileAsNonPMA(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_string(L, 2))) { - // bool saveToFileAsNonPMA(const std::string &filename, @optional bool isRGBA, @optional std::function callback) - return _cocos2d_RenderTexture_saveToFileAsNonPMA$3(L); + // bool saveToFileAsNonPMA(const std::string &filename) + return _olua_fun_cocos2d_RenderTexture_saveToFileAsNonPMA$2(L); // } } if (num_args == 2) { // if ((olua_is_string(L, 2)) && (olua_is_bool(L, 3))) { - // bool saveToFileAsNonPMA(const std::string &filename, @optional bool isRGBA, @optional std::function callback) - return _cocos2d_RenderTexture_saveToFileAsNonPMA$4(L); + // bool saveToFileAsNonPMA(const std::string &filename, @optional bool isRGBA) + return _olua_fun_cocos2d_RenderTexture_saveToFileAsNonPMA$3(L); // } } if (num_args == 3) { // if ((olua_is_string(L, 2)) && (olua_is_bool(L, 3)) && (olua_is_callback(L, 4, "std.function"))) { // bool saveToFileAsNonPMA(const std::string &filename, @optional bool isRGBA, @optional std::function callback) - return _cocos2d_RenderTexture_saveToFileAsNonPMA$1(L); + return _olua_fun_cocos2d_RenderTexture_saveToFileAsNonPMA$1(L); // } } if (num_args == 4) { // if ((olua_is_string(L, 2)) && (olua_is_enum(L, 3)) && (olua_is_bool(L, 4)) && (olua_is_callback(L, 5, "std.function"))) { // bool saveToFileAsNonPMA(const std::string &fileName, cocos2d::Image::Format format, bool isRGBA, std::function callback) - return _cocos2d_RenderTexture_saveToFileAsNonPMA$2(L); + return _olua_fun_cocos2d_RenderTexture_saveToFileAsNonPMA$4(L); // } } @@ -33171,7 +35149,7 @@ static int _cocos2d_RenderTexture_saveToFileAsNonPMA(lua_State *L) return 0; } -static int _cocos2d_RenderTexture_setAutoDraw(lua_State *L) +static int _olua_fun_cocos2d_RenderTexture_setAutoDraw(lua_State *L) { olua_startinvoke(L); @@ -33189,7 +35167,7 @@ static int _cocos2d_RenderTexture_setAutoDraw(lua_State *L) return 0; } -static int _cocos2d_RenderTexture_setClearColor(lua_State *L) +static int _olua_fun_cocos2d_RenderTexture_setClearColor(lua_State *L) { olua_startinvoke(L); @@ -33207,7 +35185,7 @@ static int _cocos2d_RenderTexture_setClearColor(lua_State *L) return 0; } -static int _cocos2d_RenderTexture_setClearDepth(lua_State *L) +static int _olua_fun_cocos2d_RenderTexture_setClearDepth(lua_State *L) { olua_startinvoke(L); @@ -33225,7 +35203,7 @@ static int _cocos2d_RenderTexture_setClearDepth(lua_State *L) return 0; } -static int _cocos2d_RenderTexture_setClearFlags(lua_State *L) +static int _olua_fun_cocos2d_RenderTexture_setClearFlags(lua_State *L) { olua_startinvoke(L); @@ -33243,7 +35221,7 @@ static int _cocos2d_RenderTexture_setClearFlags(lua_State *L) return 0; } -static int _cocos2d_RenderTexture_setClearStencil(lua_State *L) +static int _olua_fun_cocos2d_RenderTexture_setClearStencil(lua_State *L) { olua_startinvoke(L); @@ -33261,7 +35239,7 @@ static int _cocos2d_RenderTexture_setClearStencil(lua_State *L) return 0; } -static int _cocos2d_RenderTexture_setKeepMatrix(lua_State *L) +static int _olua_fun_cocos2d_RenderTexture_setKeepMatrix(lua_State *L) { olua_startinvoke(L); @@ -33279,7 +35257,7 @@ static int _cocos2d_RenderTexture_setKeepMatrix(lua_State *L) return 0; } -static int _cocos2d_RenderTexture_setSprite(lua_State *L) +static int _olua_fun_cocos2d_RenderTexture_setSprite(lua_State *L) { olua_startinvoke(L); @@ -33297,14 +35275,14 @@ static int _cocos2d_RenderTexture_setSprite(lua_State *L) return 0; } -static int _cocos2d_RenderTexture_setVirtualViewport(lua_State *L) +static int _olua_fun_cocos2d_RenderTexture_setVirtualViewport(lua_State *L) { olua_startinvoke(L); cocos2d::RenderTexture *self = nullptr; - cocos2d::Vec2 arg1; /** rtBegin */ - cocos2d::Rect arg2; /** fullRect */ - cocos2d::Rect arg3; /** fullViewport */ + cocos2d::Vec2 *arg1; /** rtBegin */ + cocos2d::Rect *arg2; /** fullRect */ + cocos2d::Rect *arg3; /** fullViewport */ olua_to_object(L, 1, &self, "cc.RenderTexture"); olua_check_object(L, 2, &arg1, "cc.Vec2"); @@ -33312,60 +35290,66 @@ static int _cocos2d_RenderTexture_setVirtualViewport(lua_State *L) olua_check_object(L, 4, &arg3, "cc.Rect"); // void setVirtualViewport(const cocos2d::Vec2 &rtBegin, const cocos2d::Rect &fullRect, const cocos2d::Rect &fullViewport) - self->setVirtualViewport(arg1, arg2, arg3); + self->setVirtualViewport(*arg1, *arg2, *arg3); olua_endinvoke(L); return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_RenderTexture(lua_State *L) +static int _olua_cls_cc_RenderTexture(lua_State *L) { oluacls_class(L, "cc.RenderTexture"); - oluacls_func(L, "begin", _cocos2d_RenderTexture_begin); - oluacls_func(L, "beginVisit", _cocos2d_RenderTexture_begin); - oluacls_func(L, "beginWithClear", _cocos2d_RenderTexture_beginWithClear); - oluacls_func(L, "clear", _cocos2d_RenderTexture_clear); - oluacls_func(L, "clearDepth", _cocos2d_RenderTexture_clearDepth); - oluacls_func(L, "clearStencil", _cocos2d_RenderTexture_clearStencil); - oluacls_func(L, "create", _cocos2d_RenderTexture_create); - oluacls_func(L, "end", _cocos2d_RenderTexture_end); - oluacls_func(L, "endVisit", _cocos2d_RenderTexture_end); - oluacls_func(L, "getClearColor", _cocos2d_RenderTexture_getClearColor); - oluacls_func(L, "getClearDepth", _cocos2d_RenderTexture_getClearDepth); - oluacls_func(L, "getClearFlags", _cocos2d_RenderTexture_getClearFlags); - oluacls_func(L, "getClearStencil", _cocos2d_RenderTexture_getClearStencil); - oluacls_func(L, "getSprite", _cocos2d_RenderTexture_getSprite); - oluacls_func(L, "initWithWidthAndHeight", _cocos2d_RenderTexture_initWithWidthAndHeight); - oluacls_func(L, "isAutoDraw", _cocos2d_RenderTexture_isAutoDraw); - oluacls_func(L, "listenToBackground", _cocos2d_RenderTexture_listenToBackground); - oluacls_func(L, "listenToForeground", _cocos2d_RenderTexture_listenToForeground); - oluacls_func(L, "new", _cocos2d_RenderTexture_new); - oluacls_func(L, "newImage", _cocos2d_RenderTexture_newImage); - oluacls_func(L, "saveToFile", _cocos2d_RenderTexture_saveToFile); - oluacls_func(L, "saveToFileAsNonPMA", _cocos2d_RenderTexture_saveToFileAsNonPMA); - oluacls_func(L, "setAutoDraw", _cocos2d_RenderTexture_setAutoDraw); - oluacls_func(L, "setClearColor", _cocos2d_RenderTexture_setClearColor); - oluacls_func(L, "setClearDepth", _cocos2d_RenderTexture_setClearDepth); - oluacls_func(L, "setClearFlags", _cocos2d_RenderTexture_setClearFlags); - oluacls_func(L, "setClearStencil", _cocos2d_RenderTexture_setClearStencil); - oluacls_func(L, "setKeepMatrix", _cocos2d_RenderTexture_setKeepMatrix); - oluacls_func(L, "setSprite", _cocos2d_RenderTexture_setSprite); - oluacls_func(L, "setVirtualViewport", _cocos2d_RenderTexture_setVirtualViewport); - oluacls_prop(L, "autoDraw", _cocos2d_RenderTexture_isAutoDraw, _cocos2d_RenderTexture_setAutoDraw); - oluacls_prop(L, "clearColor", _cocos2d_RenderTexture_getClearColor, _cocos2d_RenderTexture_setClearColor); - oluacls_prop(L, "clearDepth", _cocos2d_RenderTexture_getClearDepth, _cocos2d_RenderTexture_setClearDepth); - oluacls_prop(L, "clearFlags", _cocos2d_RenderTexture_getClearFlags, _cocos2d_RenderTexture_setClearFlags); - oluacls_prop(L, "clearStencil", _cocos2d_RenderTexture_getClearStencil, _cocos2d_RenderTexture_setClearStencil); - oluacls_prop(L, "sprite", _cocos2d_RenderTexture_getSprite, _cocos2d_RenderTexture_setSprite); + oluacls_func(L, "begin", _olua_fun_cocos2d_RenderTexture_begin); + oluacls_func(L, "beginVisit", _olua_fun_cocos2d_RenderTexture_beginVisit); + oluacls_func(L, "beginWithClear", _olua_fun_cocos2d_RenderTexture_beginWithClear); + oluacls_func(L, "clear", _olua_fun_cocos2d_RenderTexture_clear); + oluacls_func(L, "clearDepth", _olua_fun_cocos2d_RenderTexture_clearDepth); + oluacls_func(L, "clearStencil", _olua_fun_cocos2d_RenderTexture_clearStencil); + oluacls_func(L, "create", _olua_fun_cocos2d_RenderTexture_create); + oluacls_func(L, "endVisit", _olua_fun_cocos2d_RenderTexture_endVisit); + oluacls_func(L, "end_", _olua_fun_cocos2d_RenderTexture_end_); + oluacls_func(L, "getClearColor", _olua_fun_cocos2d_RenderTexture_getClearColor); + oluacls_func(L, "getClearDepth", _olua_fun_cocos2d_RenderTexture_getClearDepth); + oluacls_func(L, "getClearFlags", _olua_fun_cocos2d_RenderTexture_getClearFlags); + oluacls_func(L, "getClearStencil", _olua_fun_cocos2d_RenderTexture_getClearStencil); + oluacls_func(L, "getSprite", _olua_fun_cocos2d_RenderTexture_getSprite); + oluacls_func(L, "initWithWidthAndHeight", _olua_fun_cocos2d_RenderTexture_initWithWidthAndHeight); + oluacls_func(L, "isAutoDraw", _olua_fun_cocos2d_RenderTexture_isAutoDraw); + oluacls_func(L, "listenToBackground", _olua_fun_cocos2d_RenderTexture_listenToBackground); + oluacls_func(L, "listenToForeground", _olua_fun_cocos2d_RenderTexture_listenToForeground); + oluacls_func(L, "new", _olua_fun_cocos2d_RenderTexture_new); + oluacls_func(L, "newImage", _olua_fun_cocos2d_RenderTexture_newImage); + oluacls_func(L, "saveToFile", _olua_fun_cocos2d_RenderTexture_saveToFile); + oluacls_func(L, "saveToFileAsNonPMA", _olua_fun_cocos2d_RenderTexture_saveToFileAsNonPMA); + oluacls_func(L, "setAutoDraw", _olua_fun_cocos2d_RenderTexture_setAutoDraw); + oluacls_func(L, "setClearColor", _olua_fun_cocos2d_RenderTexture_setClearColor); + oluacls_func(L, "setClearDepth", _olua_fun_cocos2d_RenderTexture_setClearDepth); + oluacls_func(L, "setClearFlags", _olua_fun_cocos2d_RenderTexture_setClearFlags); + oluacls_func(L, "setClearStencil", _olua_fun_cocos2d_RenderTexture_setClearStencil); + oluacls_func(L, "setKeepMatrix", _olua_fun_cocos2d_RenderTexture_setKeepMatrix); + oluacls_func(L, "setSprite", _olua_fun_cocos2d_RenderTexture_setSprite); + oluacls_func(L, "setVirtualViewport", _olua_fun_cocos2d_RenderTexture_setVirtualViewport); + oluacls_prop(L, "autoDraw", _olua_fun_cocos2d_RenderTexture_isAutoDraw, _olua_fun_cocos2d_RenderTexture_setAutoDraw); + oluacls_prop(L, "clearColor", _olua_fun_cocos2d_RenderTexture_getClearColor, _olua_fun_cocos2d_RenderTexture_setClearColor); + oluacls_prop(L, "clearFlags", _olua_fun_cocos2d_RenderTexture_getClearFlags, _olua_fun_cocos2d_RenderTexture_setClearFlags); + oluacls_prop(L, "sprite", _olua_fun_cocos2d_RenderTexture_getSprite, _olua_fun_cocos2d_RenderTexture_setSprite); return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ProgressTimer_Type(lua_State *L) +OLUA_LIB int luaopen_cc_RenderTexture(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.RenderTexture")) { + luaL_error(L, "class not found: cocos2d::RenderTexture"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_cc_ProgressTimer_Type(lua_State *L) { oluacls_class(L, "cc.ProgressTimer.Type"); oluacls_func(L, "__index", olua_indexerror); @@ -33375,9 +35359,19 @@ OLUA_LIB int luaopen_cocos2d_ProgressTimer_Type(lua_State *L) return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_ProgressTimer_Type(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.ProgressTimer.Type")) { + luaL_error(L, "class not found: cocos2d::ProgressTimer::Type"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_ProgressTimer_create(lua_State *L) +static int _olua_fun_cocos2d_ProgressTimer_create(lua_State *L) { olua_startinvoke(L); @@ -33394,7 +35388,7 @@ static int _cocos2d_ProgressTimer_create(lua_State *L) return num_ret; } -static int _cocos2d_ProgressTimer_getBarChangeRate(lua_State *L) +static int _olua_fun_cocos2d_ProgressTimer_getBarChangeRate(lua_State *L) { olua_startinvoke(L); @@ -33404,14 +35398,14 @@ static int _cocos2d_ProgressTimer_getBarChangeRate(lua_State *L) // cocos2d::Vec2 getBarChangeRate() cocos2d::Vec2 ret = self->getBarChangeRate(); - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec2"); + int num_ret = olua_copy_object(L, ret, "cc.Vec2"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_ProgressTimer_getMidpoint(lua_State *L) +static int _olua_fun_cocos2d_ProgressTimer_getMidpoint(lua_State *L) { olua_startinvoke(L); @@ -33421,14 +35415,14 @@ static int _cocos2d_ProgressTimer_getMidpoint(lua_State *L) // cocos2d::Vec2 getMidpoint() cocos2d::Vec2 ret = self->getMidpoint(); - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec2"); + int num_ret = olua_copy_object(L, ret, "cc.Vec2"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_ProgressTimer_getPercentage(lua_State *L) +static int _olua_fun_cocos2d_ProgressTimer_getPercentage(lua_State *L) { olua_startinvoke(L); @@ -33445,7 +35439,7 @@ static int _cocos2d_ProgressTimer_getPercentage(lua_State *L) return num_ret; } -static int _cocos2d_ProgressTimer_getSprite(lua_State *L) +static int _olua_fun_cocos2d_ProgressTimer_getSprite(lua_State *L) { olua_startinvoke(L); @@ -33462,7 +35456,7 @@ static int _cocos2d_ProgressTimer_getSprite(lua_State *L) return num_ret; } -static int _cocos2d_ProgressTimer_getType(lua_State *L) +static int _olua_fun_cocos2d_ProgressTimer_getType(lua_State *L) { olua_startinvoke(L); @@ -33479,7 +35473,7 @@ static int _cocos2d_ProgressTimer_getType(lua_State *L) return num_ret; } -static int _cocos2d_ProgressTimer_initWithSprite(lua_State *L) +static int _olua_fun_cocos2d_ProgressTimer_initWithSprite(lua_State *L) { olua_startinvoke(L); @@ -33498,7 +35492,7 @@ static int _cocos2d_ProgressTimer_initWithSprite(lua_State *L) return num_ret; } -static int _cocos2d_ProgressTimer_isReverseDirection(lua_State *L) +static int _olua_fun_cocos2d_ProgressTimer_isReverseDirection(lua_State *L) { olua_startinvoke(L); @@ -33515,11 +35509,11 @@ static int _cocos2d_ProgressTimer_isReverseDirection(lua_State *L) return num_ret; } -static int _cocos2d_ProgressTimer_new(lua_State *L) +static int _olua_fun_cocos2d_ProgressTimer_new(lua_State *L) { olua_startinvoke(L); - // ProgressTimer() + // cocos2d::ProgressTimer() cocos2d::ProgressTimer *ret = new cocos2d::ProgressTimer(); int num_ret = olua_push_object(L, ret, "cc.ProgressTimer"); olua_postnew(L, ret); @@ -33529,43 +35523,43 @@ static int _cocos2d_ProgressTimer_new(lua_State *L) return num_ret; } -static int _cocos2d_ProgressTimer_setBarChangeRate(lua_State *L) +static int _olua_fun_cocos2d_ProgressTimer_setBarChangeRate(lua_State *L) { olua_startinvoke(L); cocos2d::ProgressTimer *self = nullptr; - cocos2d::Vec2 arg1; /** barChangeRate */ + cocos2d::Vec2 *arg1; /** barChangeRate */ olua_to_object(L, 1, &self, "cc.ProgressTimer"); olua_check_object(L, 2, &arg1, "cc.Vec2"); // void setBarChangeRate(const cocos2d::Vec2 &barChangeRate) - self->setBarChangeRate(arg1); + self->setBarChangeRate(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_ProgressTimer_setMidpoint(lua_State *L) +static int _olua_fun_cocos2d_ProgressTimer_setMidpoint(lua_State *L) { olua_startinvoke(L); cocos2d::ProgressTimer *self = nullptr; - cocos2d::Vec2 arg1; /** point */ + cocos2d::Vec2 *arg1; /** point */ olua_to_object(L, 1, &self, "cc.ProgressTimer"); olua_check_object(L, 2, &arg1, "cc.Vec2"); // void setMidpoint(const cocos2d::Vec2 &point) - self->setMidpoint(arg1); + self->setMidpoint(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_ProgressTimer_setPercentage(lua_State *L) +static int _olua_fun_cocos2d_ProgressTimer_setPercentage(lua_State *L) { olua_startinvoke(L); @@ -33583,7 +35577,7 @@ static int _cocos2d_ProgressTimer_setPercentage(lua_State *L) return 0; } -static int _cocos2d_ProgressTimer_setReverseDirection(lua_State *L) +static int _olua_fun_cocos2d_ProgressTimer_setReverseDirection(lua_State *L) { olua_startinvoke(L); @@ -33601,7 +35595,7 @@ static int _cocos2d_ProgressTimer_setReverseDirection(lua_State *L) return 0; } -static int _cocos2d_ProgressTimer_setSprite(lua_State *L) +static int _olua_fun_cocos2d_ProgressTimer_setSprite(lua_State *L) { olua_startinvoke(L); @@ -33619,7 +35613,7 @@ static int _cocos2d_ProgressTimer_setSprite(lua_State *L) return 0; } -static int _cocos2d_ProgressTimer_setType(lua_State *L) +static int _olua_fun_cocos2d_ProgressTimer_setType(lua_State *L) { olua_startinvoke(L); @@ -33637,37 +35631,46 @@ static int _cocos2d_ProgressTimer_setType(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ProgressTimer(lua_State *L) +static int _olua_cls_cc_ProgressTimer(lua_State *L) { oluacls_class(L, "cc.ProgressTimer"); - oluacls_func(L, "create", _cocos2d_ProgressTimer_create); - oluacls_func(L, "getBarChangeRate", _cocos2d_ProgressTimer_getBarChangeRate); - oluacls_func(L, "getMidpoint", _cocos2d_ProgressTimer_getMidpoint); - oluacls_func(L, "getPercentage", _cocos2d_ProgressTimer_getPercentage); - oluacls_func(L, "getSprite", _cocos2d_ProgressTimer_getSprite); - oluacls_func(L, "getType", _cocos2d_ProgressTimer_getType); - oluacls_func(L, "initWithSprite", _cocos2d_ProgressTimer_initWithSprite); - oluacls_func(L, "isReverseDirection", _cocos2d_ProgressTimer_isReverseDirection); - oluacls_func(L, "new", _cocos2d_ProgressTimer_new); - oluacls_func(L, "setBarChangeRate", _cocos2d_ProgressTimer_setBarChangeRate); - oluacls_func(L, "setMidpoint", _cocos2d_ProgressTimer_setMidpoint); - oluacls_func(L, "setPercentage", _cocos2d_ProgressTimer_setPercentage); - oluacls_func(L, "setReverseDirection", _cocos2d_ProgressTimer_setReverseDirection); - oluacls_func(L, "setSprite", _cocos2d_ProgressTimer_setSprite); - oluacls_func(L, "setType", _cocos2d_ProgressTimer_setType); - oluacls_prop(L, "barChangeRate", _cocos2d_ProgressTimer_getBarChangeRate, _cocos2d_ProgressTimer_setBarChangeRate); - oluacls_prop(L, "midpoint", _cocos2d_ProgressTimer_getMidpoint, _cocos2d_ProgressTimer_setMidpoint); - oluacls_prop(L, "percentage", _cocos2d_ProgressTimer_getPercentage, _cocos2d_ProgressTimer_setPercentage); - oluacls_prop(L, "reverseDirection", _cocos2d_ProgressTimer_isReverseDirection, _cocos2d_ProgressTimer_setReverseDirection); - oluacls_prop(L, "sprite", _cocos2d_ProgressTimer_getSprite, _cocos2d_ProgressTimer_setSprite); - oluacls_prop(L, "type", _cocos2d_ProgressTimer_getType, _cocos2d_ProgressTimer_setType); + oluacls_func(L, "create", _olua_fun_cocos2d_ProgressTimer_create); + oluacls_func(L, "getBarChangeRate", _olua_fun_cocos2d_ProgressTimer_getBarChangeRate); + oluacls_func(L, "getMidpoint", _olua_fun_cocos2d_ProgressTimer_getMidpoint); + oluacls_func(L, "getPercentage", _olua_fun_cocos2d_ProgressTimer_getPercentage); + oluacls_func(L, "getSprite", _olua_fun_cocos2d_ProgressTimer_getSprite); + oluacls_func(L, "getType", _olua_fun_cocos2d_ProgressTimer_getType); + oluacls_func(L, "initWithSprite", _olua_fun_cocos2d_ProgressTimer_initWithSprite); + oluacls_func(L, "isReverseDirection", _olua_fun_cocos2d_ProgressTimer_isReverseDirection); + oluacls_func(L, "new", _olua_fun_cocos2d_ProgressTimer_new); + oluacls_func(L, "setBarChangeRate", _olua_fun_cocos2d_ProgressTimer_setBarChangeRate); + oluacls_func(L, "setMidpoint", _olua_fun_cocos2d_ProgressTimer_setMidpoint); + oluacls_func(L, "setPercentage", _olua_fun_cocos2d_ProgressTimer_setPercentage); + oluacls_func(L, "setReverseDirection", _olua_fun_cocos2d_ProgressTimer_setReverseDirection); + oluacls_func(L, "setSprite", _olua_fun_cocos2d_ProgressTimer_setSprite); + oluacls_func(L, "setType", _olua_fun_cocos2d_ProgressTimer_setType); + oluacls_prop(L, "barChangeRate", _olua_fun_cocos2d_ProgressTimer_getBarChangeRate, _olua_fun_cocos2d_ProgressTimer_setBarChangeRate); + oluacls_prop(L, "midpoint", _olua_fun_cocos2d_ProgressTimer_getMidpoint, _olua_fun_cocos2d_ProgressTimer_setMidpoint); + oluacls_prop(L, "percentage", _olua_fun_cocos2d_ProgressTimer_getPercentage, _olua_fun_cocos2d_ProgressTimer_setPercentage); + oluacls_prop(L, "reverseDirection", _olua_fun_cocos2d_ProgressTimer_isReverseDirection, _olua_fun_cocos2d_ProgressTimer_setReverseDirection); + oluacls_prop(L, "sprite", _olua_fun_cocos2d_ProgressTimer_getSprite, _olua_fun_cocos2d_ProgressTimer_setSprite); + oluacls_prop(L, "type", _olua_fun_cocos2d_ProgressTimer_getType, _olua_fun_cocos2d_ProgressTimer_setType); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_ProgressTimer(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.ProgressTimer")) { + luaL_error(L, "class not found: cocos2d::ProgressTimer"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_AnimationFrame_as(lua_State *L) +static int _olua_fun_cocos2d_AnimationFrame_as(lua_State *L) { olua_startinvoke(L); @@ -33695,7 +35698,7 @@ static int _cocos2d_AnimationFrame_as(lua_State *L) return 1; } -static int _cocos2d_AnimationFrame_clone(lua_State *L) +static int _olua_fun_cocos2d_AnimationFrame_clone(lua_State *L) { olua_startinvoke(L); @@ -33712,7 +35715,7 @@ static int _cocos2d_AnimationFrame_clone(lua_State *L) return num_ret; } -static int _cocos2d_AnimationFrame_create(lua_State *L) +static int _olua_fun_cocos2d_AnimationFrame_create(lua_State *L) { olua_startinvoke(L); @@ -33733,7 +35736,7 @@ static int _cocos2d_AnimationFrame_create(lua_State *L) return num_ret; } -static int _cocos2d_AnimationFrame_getDelayUnits(lua_State *L) +static int _olua_fun_cocos2d_AnimationFrame_getDelayUnits(lua_State *L) { olua_startinvoke(L); @@ -33750,7 +35753,7 @@ static int _cocos2d_AnimationFrame_getDelayUnits(lua_State *L) return num_ret; } -static int _cocos2d_AnimationFrame_getSpriteFrame(lua_State *L) +static int _olua_fun_cocos2d_AnimationFrame_getSpriteFrame(lua_State *L) { olua_startinvoke(L); @@ -33767,7 +35770,7 @@ static int _cocos2d_AnimationFrame_getSpriteFrame(lua_State *L) return num_ret; } -static int _cocos2d_AnimationFrame_getUserInfo(lua_State *L) +static int _olua_fun_cocos2d_AnimationFrame_getUserInfo(lua_State *L) { olua_startinvoke(L); @@ -33784,7 +35787,7 @@ static int _cocos2d_AnimationFrame_getUserInfo(lua_State *L) return num_ret; } -static int _cocos2d_AnimationFrame_initWithSpriteFrame(lua_State *L) +static int _olua_fun_cocos2d_AnimationFrame_initWithSpriteFrame(lua_State *L) { olua_startinvoke(L); @@ -33807,11 +35810,11 @@ static int _cocos2d_AnimationFrame_initWithSpriteFrame(lua_State *L) return num_ret; } -static int _cocos2d_AnimationFrame_new(lua_State *L) +static int _olua_fun_cocos2d_AnimationFrame_new(lua_State *L) { olua_startinvoke(L); - // AnimationFrame() + // cocos2d::AnimationFrame() cocos2d::AnimationFrame *ret = new cocos2d::AnimationFrame(); int num_ret = olua_push_object(L, ret, "cc.AnimationFrame"); olua_postnew(L, ret); @@ -33821,7 +35824,7 @@ static int _cocos2d_AnimationFrame_new(lua_State *L) return num_ret; } -static int _cocos2d_AnimationFrame_setDelayUnits(lua_State *L) +static int _olua_fun_cocos2d_AnimationFrame_setDelayUnits(lua_State *L) { olua_startinvoke(L); @@ -33839,7 +35842,7 @@ static int _cocos2d_AnimationFrame_setDelayUnits(lua_State *L) return 0; } -static int _cocos2d_AnimationFrame_setSpriteFrame(lua_State *L) +static int _olua_fun_cocos2d_AnimationFrame_setSpriteFrame(lua_State *L) { olua_startinvoke(L); @@ -33857,7 +35860,7 @@ static int _cocos2d_AnimationFrame_setSpriteFrame(lua_State *L) return 0; } -static int _cocos2d_AnimationFrame_setUserInfo(lua_State *L) +static int _olua_fun_cocos2d_AnimationFrame_setUserInfo(lua_State *L) { olua_startinvoke(L); @@ -33875,30 +35878,39 @@ static int _cocos2d_AnimationFrame_setUserInfo(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_AnimationFrame(lua_State *L) +static int _olua_cls_cc_AnimationFrame(lua_State *L) { oluacls_class(L, "cc.AnimationFrame"); - oluacls_func(L, "as", _cocos2d_AnimationFrame_as); - oluacls_func(L, "clone", _cocos2d_AnimationFrame_clone); - oluacls_func(L, "create", _cocos2d_AnimationFrame_create); - oluacls_func(L, "getDelayUnits", _cocos2d_AnimationFrame_getDelayUnits); - oluacls_func(L, "getSpriteFrame", _cocos2d_AnimationFrame_getSpriteFrame); - oluacls_func(L, "getUserInfo", _cocos2d_AnimationFrame_getUserInfo); - oluacls_func(L, "initWithSpriteFrame", _cocos2d_AnimationFrame_initWithSpriteFrame); - oluacls_func(L, "new", _cocos2d_AnimationFrame_new); - oluacls_func(L, "setDelayUnits", _cocos2d_AnimationFrame_setDelayUnits); - oluacls_func(L, "setSpriteFrame", _cocos2d_AnimationFrame_setSpriteFrame); - oluacls_func(L, "setUserInfo", _cocos2d_AnimationFrame_setUserInfo); - oluacls_prop(L, "delayUnits", _cocos2d_AnimationFrame_getDelayUnits, _cocos2d_AnimationFrame_setDelayUnits); - oluacls_prop(L, "spriteFrame", _cocos2d_AnimationFrame_getSpriteFrame, _cocos2d_AnimationFrame_setSpriteFrame); - oluacls_prop(L, "userInfo", _cocos2d_AnimationFrame_getUserInfo, _cocos2d_AnimationFrame_setUserInfo); + oluacls_func(L, "as", _olua_fun_cocos2d_AnimationFrame_as); + oluacls_func(L, "clone", _olua_fun_cocos2d_AnimationFrame_clone); + oluacls_func(L, "create", _olua_fun_cocos2d_AnimationFrame_create); + oluacls_func(L, "getDelayUnits", _olua_fun_cocos2d_AnimationFrame_getDelayUnits); + oluacls_func(L, "getSpriteFrame", _olua_fun_cocos2d_AnimationFrame_getSpriteFrame); + oluacls_func(L, "getUserInfo", _olua_fun_cocos2d_AnimationFrame_getUserInfo); + oluacls_func(L, "initWithSpriteFrame", _olua_fun_cocos2d_AnimationFrame_initWithSpriteFrame); + oluacls_func(L, "new", _olua_fun_cocos2d_AnimationFrame_new); + oluacls_func(L, "setDelayUnits", _olua_fun_cocos2d_AnimationFrame_setDelayUnits); + oluacls_func(L, "setSpriteFrame", _olua_fun_cocos2d_AnimationFrame_setSpriteFrame); + oluacls_func(L, "setUserInfo", _olua_fun_cocos2d_AnimationFrame_setUserInfo); + oluacls_prop(L, "delayUnits", _olua_fun_cocos2d_AnimationFrame_getDelayUnits, _olua_fun_cocos2d_AnimationFrame_setDelayUnits); + oluacls_prop(L, "spriteFrame", _olua_fun_cocos2d_AnimationFrame_getSpriteFrame, _olua_fun_cocos2d_AnimationFrame_setSpriteFrame); + oluacls_prop(L, "userInfo", _olua_fun_cocos2d_AnimationFrame_getUserInfo, _olua_fun_cocos2d_AnimationFrame_setUserInfo); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_AnimationFrame(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.AnimationFrame")) { + luaL_error(L, "class not found: cocos2d::AnimationFrame"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_Animation_addSpriteFrame(lua_State *L) +static int _olua_fun_cocos2d_Animation_addSpriteFrame(lua_State *L) { olua_startinvoke(L); @@ -33916,7 +35928,7 @@ static int _cocos2d_Animation_addSpriteFrame(lua_State *L) return 0; } -static int _cocos2d_Animation_addSpriteFrameWithFile(lua_State *L) +static int _olua_fun_cocos2d_Animation_addSpriteFrameWithFile(lua_State *L) { olua_startinvoke(L); @@ -33934,27 +35946,27 @@ static int _cocos2d_Animation_addSpriteFrameWithFile(lua_State *L) return 0; } -static int _cocos2d_Animation_addSpriteFrameWithTexture(lua_State *L) +static int _olua_fun_cocos2d_Animation_addSpriteFrameWithTexture(lua_State *L) { olua_startinvoke(L); cocos2d::Animation *self = nullptr; cocos2d::Texture2D *arg1 = nullptr; /** pobTexture */ - cocos2d::Rect arg2; /** rect */ + cocos2d::Rect *arg2; /** rect */ olua_to_object(L, 1, &self, "cc.Animation"); olua_check_object(L, 2, &arg1, "cc.Texture2D"); olua_check_object(L, 3, &arg2, "cc.Rect"); // void addSpriteFrameWithTexture(cocos2d::Texture2D *pobTexture, const cocos2d::Rect &rect) - self->addSpriteFrameWithTexture(arg1, arg2); + self->addSpriteFrameWithTexture(arg1, *arg2); olua_endinvoke(L); return 0; } -static int _cocos2d_Animation_as(lua_State *L) +static int _olua_fun_cocos2d_Animation_as(lua_State *L) { olua_startinvoke(L); @@ -33982,7 +35994,7 @@ static int _cocos2d_Animation_as(lua_State *L) return 1; } -static int _cocos2d_Animation_clone(lua_State *L) +static int _olua_fun_cocos2d_Animation_clone(lua_State *L) { olua_startinvoke(L); @@ -33999,7 +36011,7 @@ static int _cocos2d_Animation_clone(lua_State *L) return num_ret; } -static int _cocos2d_Animation_create$1(lua_State *L) +static int _olua_fun_cocos2d_Animation_create$1(lua_State *L) { olua_startinvoke(L); @@ -34012,7 +36024,7 @@ static int _cocos2d_Animation_create$1(lua_State *L) return num_ret; } -static int _cocos2d_Animation_create$2(lua_State *L) +static int _olua_fun_cocos2d_Animation_create$2(lua_State *L) { olua_startinvoke(L); @@ -34035,7 +36047,7 @@ static int _cocos2d_Animation_create$2(lua_State *L) return num_ret; } -static int _cocos2d_Animation_create$3(lua_State *L) +static int _olua_fun_cocos2d_Animation_create$3(lua_State *L) { olua_startinvoke(L); @@ -34047,7 +36059,7 @@ static int _cocos2d_Animation_create$3(lua_State *L) }); olua_check_number(L, 2, &arg2); - // static cocos2d::Animation *create(const cocos2d::Vector &arrayOfAnimationFrameNames, float delayPerUnit, @optional unsigned int loops) + // static cocos2d::Animation *create(const cocos2d::Vector &arrayOfAnimationFrameNames, float delayPerUnit) cocos2d::Animation *ret = cocos2d::Animation::create(arg1, arg2); int num_ret = olua_push_object(L, ret, "cc.Animation"); @@ -34056,26 +36068,26 @@ static int _cocos2d_Animation_create$3(lua_State *L) return num_ret; } -static int _cocos2d_Animation_create(lua_State *L) +static int _olua_fun_cocos2d_Animation_create(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 0) { // static cocos2d::Animation *create() - return _cocos2d_Animation_create$1(L); + return _olua_fun_cocos2d_Animation_create$1(L); } if (num_args == 2) { // if ((olua_is_array(L, 1)) && (olua_is_number(L, 2))) { - // static cocos2d::Animation *create(const cocos2d::Vector &arrayOfAnimationFrameNames, float delayPerUnit, @optional unsigned int loops) - return _cocos2d_Animation_create$3(L); + // static cocos2d::Animation *create(const cocos2d::Vector &arrayOfAnimationFrameNames, float delayPerUnit) + return _olua_fun_cocos2d_Animation_create$3(L); // } } if (num_args == 3) { // if ((olua_is_array(L, 1)) && (olua_is_number(L, 2)) && (olua_is_integer(L, 3))) { // static cocos2d::Animation *create(const cocos2d::Vector &arrayOfAnimationFrameNames, float delayPerUnit, @optional unsigned int loops) - return _cocos2d_Animation_create$2(L); + return _olua_fun_cocos2d_Animation_create$2(L); // } } @@ -34084,7 +36096,7 @@ static int _cocos2d_Animation_create(lua_State *L) return 0; } -static int _cocos2d_Animation_createWithSpriteFrames$1(lua_State *L) +static int _olua_fun_cocos2d_Animation_createWithSpriteFrames$1(lua_State *L) { olua_startinvoke(L); @@ -34107,7 +36119,7 @@ static int _cocos2d_Animation_createWithSpriteFrames$1(lua_State *L) return num_ret; } -static int _cocos2d_Animation_createWithSpriteFrames$2(lua_State *L) +static int _olua_fun_cocos2d_Animation_createWithSpriteFrames$2(lua_State *L) { olua_startinvoke(L); @@ -34117,7 +36129,7 @@ static int _cocos2d_Animation_createWithSpriteFrames$2(lua_State *L) olua_check_object(L, -1, arg1, "cc.SpriteFrame"); }); - // static cocos2d::Animation *createWithSpriteFrames(const cocos2d::Vector &arrayOfSpriteFrameNames, @optional float delay, @optional unsigned int loops) + // static cocos2d::Animation *createWithSpriteFrames(const cocos2d::Vector &arrayOfSpriteFrameNames) cocos2d::Animation *ret = cocos2d::Animation::createWithSpriteFrames(arg1); int num_ret = olua_push_object(L, ret, "cc.Animation"); @@ -34126,7 +36138,7 @@ static int _cocos2d_Animation_createWithSpriteFrames$2(lua_State *L) return num_ret; } -static int _cocos2d_Animation_createWithSpriteFrames$3(lua_State *L) +static int _olua_fun_cocos2d_Animation_createWithSpriteFrames$3(lua_State *L) { olua_startinvoke(L); @@ -34138,7 +36150,7 @@ static int _cocos2d_Animation_createWithSpriteFrames$3(lua_State *L) }); olua_check_number(L, 2, &arg2); - // static cocos2d::Animation *createWithSpriteFrames(const cocos2d::Vector &arrayOfSpriteFrameNames, @optional float delay, @optional unsigned int loops) + // static cocos2d::Animation *createWithSpriteFrames(const cocos2d::Vector &arrayOfSpriteFrameNames, @optional float delay) cocos2d::Animation *ret = cocos2d::Animation::createWithSpriteFrames(arg1, arg2); int num_ret = olua_push_object(L, ret, "cc.Animation"); @@ -34147,28 +36159,28 @@ static int _cocos2d_Animation_createWithSpriteFrames$3(lua_State *L) return num_ret; } -static int _cocos2d_Animation_createWithSpriteFrames(lua_State *L) +static int _olua_fun_cocos2d_Animation_createWithSpriteFrames(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 1) { // if ((olua_is_array(L, 1))) { - // static cocos2d::Animation *createWithSpriteFrames(const cocos2d::Vector &arrayOfSpriteFrameNames, @optional float delay, @optional unsigned int loops) - return _cocos2d_Animation_createWithSpriteFrames$2(L); + // static cocos2d::Animation *createWithSpriteFrames(const cocos2d::Vector &arrayOfSpriteFrameNames) + return _olua_fun_cocos2d_Animation_createWithSpriteFrames$2(L); // } } if (num_args == 2) { // if ((olua_is_array(L, 1)) && (olua_is_number(L, 2))) { - // static cocos2d::Animation *createWithSpriteFrames(const cocos2d::Vector &arrayOfSpriteFrameNames, @optional float delay, @optional unsigned int loops) - return _cocos2d_Animation_createWithSpriteFrames$3(L); + // static cocos2d::Animation *createWithSpriteFrames(const cocos2d::Vector &arrayOfSpriteFrameNames, @optional float delay) + return _olua_fun_cocos2d_Animation_createWithSpriteFrames$3(L); // } } if (num_args == 3) { // if ((olua_is_array(L, 1)) && (olua_is_number(L, 2)) && (olua_is_integer(L, 3))) { // static cocos2d::Animation *createWithSpriteFrames(const cocos2d::Vector &arrayOfSpriteFrameNames, @optional float delay, @optional unsigned int loops) - return _cocos2d_Animation_createWithSpriteFrames$1(L); + return _olua_fun_cocos2d_Animation_createWithSpriteFrames$1(L); // } } @@ -34177,7 +36189,7 @@ static int _cocos2d_Animation_createWithSpriteFrames(lua_State *L) return 0; } -static int _cocos2d_Animation_getDelayPerUnit(lua_State *L) +static int _olua_fun_cocos2d_Animation_getDelayPerUnit(lua_State *L) { olua_startinvoke(L); @@ -34194,7 +36206,7 @@ static int _cocos2d_Animation_getDelayPerUnit(lua_State *L) return num_ret; } -static int _cocos2d_Animation_getDuration(lua_State *L) +static int _olua_fun_cocos2d_Animation_getDuration(lua_State *L) { olua_startinvoke(L); @@ -34211,7 +36223,7 @@ static int _cocos2d_Animation_getDuration(lua_State *L) return num_ret; } -static int _cocos2d_Animation_getFrames(lua_State *L) +static int _olua_fun_cocos2d_Animation_getFrames(lua_State *L) { olua_startinvoke(L); @@ -34230,7 +36242,7 @@ static int _cocos2d_Animation_getFrames(lua_State *L) return num_ret; } -static int _cocos2d_Animation_getLoops(lua_State *L) +static int _olua_fun_cocos2d_Animation_getLoops(lua_State *L) { olua_startinvoke(L); @@ -34247,7 +36259,7 @@ static int _cocos2d_Animation_getLoops(lua_State *L) return num_ret; } -static int _cocos2d_Animation_getRestoreOriginalFrame(lua_State *L) +static int _olua_fun_cocos2d_Animation_getRestoreOriginalFrame(lua_State *L) { olua_startinvoke(L); @@ -34264,7 +36276,7 @@ static int _cocos2d_Animation_getRestoreOriginalFrame(lua_State *L) return num_ret; } -static int _cocos2d_Animation_getTotalDelayUnits(lua_State *L) +static int _olua_fun_cocos2d_Animation_getTotalDelayUnits(lua_State *L) { olua_startinvoke(L); @@ -34281,7 +36293,7 @@ static int _cocos2d_Animation_getTotalDelayUnits(lua_State *L) return num_ret; } -static int _cocos2d_Animation_init(lua_State *L) +static int _olua_fun_cocos2d_Animation_init(lua_State *L) { olua_startinvoke(L); @@ -34298,7 +36310,7 @@ static int _cocos2d_Animation_init(lua_State *L) return num_ret; } -static int _cocos2d_Animation_initWithAnimationFrames(lua_State *L) +static int _olua_fun_cocos2d_Animation_initWithAnimationFrames(lua_State *L) { olua_startinvoke(L); @@ -34323,7 +36335,7 @@ static int _cocos2d_Animation_initWithAnimationFrames(lua_State *L) return num_ret; } -static int _cocos2d_Animation_initWithSpriteFrames$1(lua_State *L) +static int _olua_fun_cocos2d_Animation_initWithSpriteFrames$1(lua_State *L) { olua_startinvoke(L); @@ -34348,7 +36360,7 @@ static int _cocos2d_Animation_initWithSpriteFrames$1(lua_State *L) return num_ret; } -static int _cocos2d_Animation_initWithSpriteFrames$2(lua_State *L) +static int _olua_fun_cocos2d_Animation_initWithSpriteFrames$2(lua_State *L) { olua_startinvoke(L); @@ -34360,7 +36372,7 @@ static int _cocos2d_Animation_initWithSpriteFrames$2(lua_State *L) olua_check_object(L, -1, arg1, "cc.SpriteFrame"); }); - // bool initWithSpriteFrames(const cocos2d::Vector &arrayOfSpriteFrameNames, @optional float delay, @optional unsigned int loops) + // bool initWithSpriteFrames(const cocos2d::Vector &arrayOfSpriteFrameNames) bool ret = self->initWithSpriteFrames(arg1); int num_ret = olua_push_bool(L, ret); @@ -34369,7 +36381,7 @@ static int _cocos2d_Animation_initWithSpriteFrames$2(lua_State *L) return num_ret; } -static int _cocos2d_Animation_initWithSpriteFrames$3(lua_State *L) +static int _olua_fun_cocos2d_Animation_initWithSpriteFrames$3(lua_State *L) { olua_startinvoke(L); @@ -34383,7 +36395,7 @@ static int _cocos2d_Animation_initWithSpriteFrames$3(lua_State *L) }); olua_check_number(L, 3, &arg2); - // bool initWithSpriteFrames(const cocos2d::Vector &arrayOfSpriteFrameNames, @optional float delay, @optional unsigned int loops) + // bool initWithSpriteFrames(const cocos2d::Vector &arrayOfSpriteFrameNames, @optional float delay) bool ret = self->initWithSpriteFrames(arg1, arg2); int num_ret = olua_push_bool(L, ret); @@ -34392,28 +36404,28 @@ static int _cocos2d_Animation_initWithSpriteFrames$3(lua_State *L) return num_ret; } -static int _cocos2d_Animation_initWithSpriteFrames(lua_State *L) +static int _olua_fun_cocos2d_Animation_initWithSpriteFrames(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_array(L, 2))) { - // bool initWithSpriteFrames(const cocos2d::Vector &arrayOfSpriteFrameNames, @optional float delay, @optional unsigned int loops) - return _cocos2d_Animation_initWithSpriteFrames$2(L); + // bool initWithSpriteFrames(const cocos2d::Vector &arrayOfSpriteFrameNames) + return _olua_fun_cocos2d_Animation_initWithSpriteFrames$2(L); // } } if (num_args == 2) { // if ((olua_is_array(L, 2)) && (olua_is_number(L, 3))) { - // bool initWithSpriteFrames(const cocos2d::Vector &arrayOfSpriteFrameNames, @optional float delay, @optional unsigned int loops) - return _cocos2d_Animation_initWithSpriteFrames$3(L); + // bool initWithSpriteFrames(const cocos2d::Vector &arrayOfSpriteFrameNames, @optional float delay) + return _olua_fun_cocos2d_Animation_initWithSpriteFrames$3(L); // } } if (num_args == 3) { // if ((olua_is_array(L, 2)) && (olua_is_number(L, 3)) && (olua_is_integer(L, 4))) { // bool initWithSpriteFrames(const cocos2d::Vector &arrayOfSpriteFrameNames, @optional float delay, @optional unsigned int loops) - return _cocos2d_Animation_initWithSpriteFrames$1(L); + return _olua_fun_cocos2d_Animation_initWithSpriteFrames$1(L); // } } @@ -34422,11 +36434,11 @@ static int _cocos2d_Animation_initWithSpriteFrames(lua_State *L) return 0; } -static int _cocos2d_Animation_new(lua_State *L) +static int _olua_fun_cocos2d_Animation_new(lua_State *L) { olua_startinvoke(L); - // Animation() + // cocos2d::Animation() cocos2d::Animation *ret = new cocos2d::Animation(); int num_ret = olua_push_object(L, ret, "cc.Animation"); olua_postnew(L, ret); @@ -34436,7 +36448,7 @@ static int _cocos2d_Animation_new(lua_State *L) return num_ret; } -static int _cocos2d_Animation_setDelayPerUnit(lua_State *L) +static int _olua_fun_cocos2d_Animation_setDelayPerUnit(lua_State *L) { olua_startinvoke(L); @@ -34454,7 +36466,7 @@ static int _cocos2d_Animation_setDelayPerUnit(lua_State *L) return 0; } -static int _cocos2d_Animation_setFrames(lua_State *L) +static int _olua_fun_cocos2d_Animation_setFrames(lua_State *L) { olua_startinvoke(L); @@ -34474,7 +36486,7 @@ static int _cocos2d_Animation_setFrames(lua_State *L) return 0; } -static int _cocos2d_Animation_setLoops(lua_State *L) +static int _olua_fun_cocos2d_Animation_setLoops(lua_State *L) { olua_startinvoke(L); @@ -34492,7 +36504,7 @@ static int _cocos2d_Animation_setLoops(lua_State *L) return 0; } -static int _cocos2d_Animation_setRestoreOriginalFrame(lua_State *L) +static int _olua_fun_cocos2d_Animation_setRestoreOriginalFrame(lua_State *L) { olua_startinvoke(L); @@ -34510,43 +36522,52 @@ static int _cocos2d_Animation_setRestoreOriginalFrame(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_Animation(lua_State *L) +static int _olua_cls_cc_Animation(lua_State *L) { oluacls_class(L, "cc.Animation"); - oluacls_func(L, "addSpriteFrame", _cocos2d_Animation_addSpriteFrame); - oluacls_func(L, "addSpriteFrameWithFile", _cocos2d_Animation_addSpriteFrameWithFile); - oluacls_func(L, "addSpriteFrameWithTexture", _cocos2d_Animation_addSpriteFrameWithTexture); - oluacls_func(L, "as", _cocos2d_Animation_as); - oluacls_func(L, "clone", _cocos2d_Animation_clone); - oluacls_func(L, "create", _cocos2d_Animation_create); - oluacls_func(L, "createWithSpriteFrames", _cocos2d_Animation_createWithSpriteFrames); - oluacls_func(L, "getDelayPerUnit", _cocos2d_Animation_getDelayPerUnit); - oluacls_func(L, "getDuration", _cocos2d_Animation_getDuration); - oluacls_func(L, "getFrames", _cocos2d_Animation_getFrames); - oluacls_func(L, "getLoops", _cocos2d_Animation_getLoops); - oluacls_func(L, "getRestoreOriginalFrame", _cocos2d_Animation_getRestoreOriginalFrame); - oluacls_func(L, "getTotalDelayUnits", _cocos2d_Animation_getTotalDelayUnits); - oluacls_func(L, "init", _cocos2d_Animation_init); - oluacls_func(L, "initWithAnimationFrames", _cocos2d_Animation_initWithAnimationFrames); - oluacls_func(L, "initWithSpriteFrames", _cocos2d_Animation_initWithSpriteFrames); - oluacls_func(L, "new", _cocos2d_Animation_new); - oluacls_func(L, "setDelayPerUnit", _cocos2d_Animation_setDelayPerUnit); - oluacls_func(L, "setFrames", _cocos2d_Animation_setFrames); - oluacls_func(L, "setLoops", _cocos2d_Animation_setLoops); - oluacls_func(L, "setRestoreOriginalFrame", _cocos2d_Animation_setRestoreOriginalFrame); - oluacls_prop(L, "delayPerUnit", _cocos2d_Animation_getDelayPerUnit, _cocos2d_Animation_setDelayPerUnit); - oluacls_prop(L, "duration", _cocos2d_Animation_getDuration, nullptr); - oluacls_prop(L, "frames", _cocos2d_Animation_getFrames, _cocos2d_Animation_setFrames); - oluacls_prop(L, "loops", _cocos2d_Animation_getLoops, _cocos2d_Animation_setLoops); - oluacls_prop(L, "restoreOriginalFrame", _cocos2d_Animation_getRestoreOriginalFrame, _cocos2d_Animation_setRestoreOriginalFrame); - oluacls_prop(L, "totalDelayUnits", _cocos2d_Animation_getTotalDelayUnits, nullptr); + oluacls_func(L, "addSpriteFrame", _olua_fun_cocos2d_Animation_addSpriteFrame); + oluacls_func(L, "addSpriteFrameWithFile", _olua_fun_cocos2d_Animation_addSpriteFrameWithFile); + oluacls_func(L, "addSpriteFrameWithTexture", _olua_fun_cocos2d_Animation_addSpriteFrameWithTexture); + oluacls_func(L, "as", _olua_fun_cocos2d_Animation_as); + oluacls_func(L, "clone", _olua_fun_cocos2d_Animation_clone); + oluacls_func(L, "create", _olua_fun_cocos2d_Animation_create); + oluacls_func(L, "createWithSpriteFrames", _olua_fun_cocos2d_Animation_createWithSpriteFrames); + oluacls_func(L, "getDelayPerUnit", _olua_fun_cocos2d_Animation_getDelayPerUnit); + oluacls_func(L, "getDuration", _olua_fun_cocos2d_Animation_getDuration); + oluacls_func(L, "getFrames", _olua_fun_cocos2d_Animation_getFrames); + oluacls_func(L, "getLoops", _olua_fun_cocos2d_Animation_getLoops); + oluacls_func(L, "getRestoreOriginalFrame", _olua_fun_cocos2d_Animation_getRestoreOriginalFrame); + oluacls_func(L, "getTotalDelayUnits", _olua_fun_cocos2d_Animation_getTotalDelayUnits); + oluacls_func(L, "init", _olua_fun_cocos2d_Animation_init); + oluacls_func(L, "initWithAnimationFrames", _olua_fun_cocos2d_Animation_initWithAnimationFrames); + oluacls_func(L, "initWithSpriteFrames", _olua_fun_cocos2d_Animation_initWithSpriteFrames); + oluacls_func(L, "new", _olua_fun_cocos2d_Animation_new); + oluacls_func(L, "setDelayPerUnit", _olua_fun_cocos2d_Animation_setDelayPerUnit); + oluacls_func(L, "setFrames", _olua_fun_cocos2d_Animation_setFrames); + oluacls_func(L, "setLoops", _olua_fun_cocos2d_Animation_setLoops); + oluacls_func(L, "setRestoreOriginalFrame", _olua_fun_cocos2d_Animation_setRestoreOriginalFrame); + oluacls_prop(L, "delayPerUnit", _olua_fun_cocos2d_Animation_getDelayPerUnit, _olua_fun_cocos2d_Animation_setDelayPerUnit); + oluacls_prop(L, "duration", _olua_fun_cocos2d_Animation_getDuration, nullptr); + oluacls_prop(L, "frames", _olua_fun_cocos2d_Animation_getFrames, _olua_fun_cocos2d_Animation_setFrames); + oluacls_prop(L, "loops", _olua_fun_cocos2d_Animation_getLoops, _olua_fun_cocos2d_Animation_setLoops); + oluacls_prop(L, "restoreOriginalFrame", _olua_fun_cocos2d_Animation_getRestoreOriginalFrame, _olua_fun_cocos2d_Animation_setRestoreOriginalFrame); + oluacls_prop(L, "totalDelayUnits", _olua_fun_cocos2d_Animation_getTotalDelayUnits, nullptr); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_Animation(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.Animation")) { + luaL_error(L, "class not found: cocos2d::Animation"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_SpriteFrame_as(lua_State *L) +static int _olua_fun_cocos2d_SpriteFrame_as(lua_State *L) { olua_startinvoke(L); @@ -34574,7 +36595,7 @@ static int _cocos2d_SpriteFrame_as(lua_State *L) return 1; } -static int _cocos2d_SpriteFrame_clone(lua_State *L) +static int _olua_fun_cocos2d_SpriteFrame_clone(lua_State *L) { olua_startinvoke(L); @@ -34591,18 +36612,18 @@ static int _cocos2d_SpriteFrame_clone(lua_State *L) return num_ret; } -static int _cocos2d_SpriteFrame_create$1(lua_State *L) +static int _olua_fun_cocos2d_SpriteFrame_create$1(lua_State *L) { olua_startinvoke(L); std::string arg1; /** filename */ - cocos2d::Rect arg2; /** rect */ + cocos2d::Rect *arg2; /** rect */ olua_check_string(L, 1, &arg1); olua_check_object(L, 2, &arg2, "cc.Rect"); // static cocos2d::SpriteFrame *create(const std::string &filename, const cocos2d::Rect &rect) - cocos2d::SpriteFrame *ret = cocos2d::SpriteFrame::create(arg1, arg2); + cocos2d::SpriteFrame *ret = cocos2d::SpriteFrame::create(arg1, *arg2); int num_ret = olua_push_object(L, ret, "cc.SpriteFrame"); olua_endinvoke(L); @@ -34610,15 +36631,15 @@ static int _cocos2d_SpriteFrame_create$1(lua_State *L) return num_ret; } -static int _cocos2d_SpriteFrame_create$2(lua_State *L) +static int _olua_fun_cocos2d_SpriteFrame_create$2(lua_State *L) { olua_startinvoke(L); std::string arg1; /** filename */ - cocos2d::Rect arg2; /** rect */ + cocos2d::Rect *arg2; /** rect */ bool arg3 = false; /** rotated */ - cocos2d::Vec2 arg4; /** offset */ - cocos2d::Size arg5; /** originalSize */ + cocos2d::Vec2 *arg4; /** offset */ + cocos2d::Size *arg5; /** originalSize */ olua_check_string(L, 1, &arg1); olua_check_object(L, 2, &arg2, "cc.Rect"); @@ -34627,7 +36648,7 @@ static int _cocos2d_SpriteFrame_create$2(lua_State *L) olua_check_object(L, 5, &arg5, "cc.Size"); // static cocos2d::SpriteFrame *create(const std::string &filename, const cocos2d::Rect &rect, bool rotated, const cocos2d::Vec2 &offset, const cocos2d::Size &originalSize) - cocos2d::SpriteFrame *ret = cocos2d::SpriteFrame::create(arg1, arg2, arg3, arg4, arg5); + cocos2d::SpriteFrame *ret = cocos2d::SpriteFrame::create(arg1, *arg2, arg3, *arg4, *arg5); int num_ret = olua_push_object(L, ret, "cc.SpriteFrame"); olua_endinvoke(L); @@ -34635,21 +36656,21 @@ static int _cocos2d_SpriteFrame_create$2(lua_State *L) return num_ret; } -static int _cocos2d_SpriteFrame_create(lua_State *L) +static int _olua_fun_cocos2d_SpriteFrame_create(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 2) { // if ((olua_is_string(L, 1)) && (olua_is_object(L, 2, "cc.Rect"))) { // static cocos2d::SpriteFrame *create(const std::string &filename, const cocos2d::Rect &rect) - return _cocos2d_SpriteFrame_create$1(L); + return _olua_fun_cocos2d_SpriteFrame_create$1(L); // } } if (num_args == 5) { // if ((olua_is_string(L, 1)) && (olua_is_object(L, 2, "cc.Rect")) && (olua_is_bool(L, 3)) && (olua_is_object(L, 4, "cc.Vec2")) && (olua_is_object(L, 5, "cc.Size"))) { // static cocos2d::SpriteFrame *create(const std::string &filename, const cocos2d::Rect &rect, bool rotated, const cocos2d::Vec2 &offset, const cocos2d::Size &originalSize) - return _cocos2d_SpriteFrame_create$2(L); + return _olua_fun_cocos2d_SpriteFrame_create$2(L); // } } @@ -34658,18 +36679,18 @@ static int _cocos2d_SpriteFrame_create(lua_State *L) return 0; } -static int _cocos2d_SpriteFrame_createWithTexture$1(lua_State *L) +static int _olua_fun_cocos2d_SpriteFrame_createWithTexture$1(lua_State *L) { olua_startinvoke(L); cocos2d::Texture2D *arg1 = nullptr; /** pobTexture */ - cocos2d::Rect arg2; /** rect */ + cocos2d::Rect *arg2; /** rect */ olua_check_object(L, 1, &arg1, "cc.Texture2D"); olua_check_object(L, 2, &arg2, "cc.Rect"); // static cocos2d::SpriteFrame *createWithTexture(cocos2d::Texture2D *pobTexture, const cocos2d::Rect &rect) - cocos2d::SpriteFrame *ret = cocos2d::SpriteFrame::createWithTexture(arg1, arg2); + cocos2d::SpriteFrame *ret = cocos2d::SpriteFrame::createWithTexture(arg1, *arg2); int num_ret = olua_push_object(L, ret, "cc.SpriteFrame"); olua_endinvoke(L); @@ -34677,15 +36698,15 @@ static int _cocos2d_SpriteFrame_createWithTexture$1(lua_State *L) return num_ret; } -static int _cocos2d_SpriteFrame_createWithTexture$2(lua_State *L) +static int _olua_fun_cocos2d_SpriteFrame_createWithTexture$2(lua_State *L) { olua_startinvoke(L); cocos2d::Texture2D *arg1 = nullptr; /** pobTexture */ - cocos2d::Rect arg2; /** rect */ + cocos2d::Rect *arg2; /** rect */ bool arg3 = false; /** rotated */ - cocos2d::Vec2 arg4; /** offset */ - cocos2d::Size arg5; /** originalSize */ + cocos2d::Vec2 *arg4; /** offset */ + cocos2d::Size *arg5; /** originalSize */ olua_check_object(L, 1, &arg1, "cc.Texture2D"); olua_check_object(L, 2, &arg2, "cc.Rect"); @@ -34694,7 +36715,7 @@ static int _cocos2d_SpriteFrame_createWithTexture$2(lua_State *L) olua_check_object(L, 5, &arg5, "cc.Size"); // static cocos2d::SpriteFrame *createWithTexture(cocos2d::Texture2D *pobTexture, const cocos2d::Rect &rect, bool rotated, const cocos2d::Vec2 &offset, const cocos2d::Size &originalSize) - cocos2d::SpriteFrame *ret = cocos2d::SpriteFrame::createWithTexture(arg1, arg2, arg3, arg4, arg5); + cocos2d::SpriteFrame *ret = cocos2d::SpriteFrame::createWithTexture(arg1, *arg2, arg3, *arg4, *arg5); int num_ret = olua_push_object(L, ret, "cc.SpriteFrame"); olua_endinvoke(L); @@ -34702,21 +36723,21 @@ static int _cocos2d_SpriteFrame_createWithTexture$2(lua_State *L) return num_ret; } -static int _cocos2d_SpriteFrame_createWithTexture(lua_State *L) +static int _olua_fun_cocos2d_SpriteFrame_createWithTexture(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 2) { // if ((olua_is_object(L, 1, "cc.Texture2D")) && (olua_is_object(L, 2, "cc.Rect"))) { // static cocos2d::SpriteFrame *createWithTexture(cocos2d::Texture2D *pobTexture, const cocos2d::Rect &rect) - return _cocos2d_SpriteFrame_createWithTexture$1(L); + return _olua_fun_cocos2d_SpriteFrame_createWithTexture$1(L); // } } if (num_args == 5) { // if ((olua_is_object(L, 1, "cc.Texture2D")) && (olua_is_object(L, 2, "cc.Rect")) && (olua_is_bool(L, 3)) && (olua_is_object(L, 4, "cc.Vec2")) && (olua_is_object(L, 5, "cc.Size"))) { // static cocos2d::SpriteFrame *createWithTexture(cocos2d::Texture2D *pobTexture, const cocos2d::Rect &rect, bool rotated, const cocos2d::Vec2 &offset, const cocos2d::Size &originalSize) - return _cocos2d_SpriteFrame_createWithTexture$2(L); + return _olua_fun_cocos2d_SpriteFrame_createWithTexture$2(L); // } } @@ -34725,7 +36746,7 @@ static int _cocos2d_SpriteFrame_createWithTexture(lua_State *L) return 0; } -static int _cocos2d_SpriteFrame_getAnchorPoint(lua_State *L) +static int _olua_fun_cocos2d_SpriteFrame_getAnchorPoint(lua_State *L) { olua_startinvoke(L); @@ -34742,7 +36763,7 @@ static int _cocos2d_SpriteFrame_getAnchorPoint(lua_State *L) return num_ret; } -static int _cocos2d_SpriteFrame_getCenterRect(lua_State *L) +static int _olua_fun_cocos2d_SpriteFrame_getCenterRect(lua_State *L) { olua_startinvoke(L); @@ -34759,7 +36780,7 @@ static int _cocos2d_SpriteFrame_getCenterRect(lua_State *L) return num_ret; } -static int _cocos2d_SpriteFrame_getOffset(lua_State *L) +static int _olua_fun_cocos2d_SpriteFrame_getOffset(lua_State *L) { olua_startinvoke(L); @@ -34776,7 +36797,7 @@ static int _cocos2d_SpriteFrame_getOffset(lua_State *L) return num_ret; } -static int _cocos2d_SpriteFrame_getOffsetInPixels(lua_State *L) +static int _olua_fun_cocos2d_SpriteFrame_getOffsetInPixels(lua_State *L) { olua_startinvoke(L); @@ -34793,7 +36814,7 @@ static int _cocos2d_SpriteFrame_getOffsetInPixels(lua_State *L) return num_ret; } -static int _cocos2d_SpriteFrame_getOriginalSize(lua_State *L) +static int _olua_fun_cocos2d_SpriteFrame_getOriginalSize(lua_State *L) { olua_startinvoke(L); @@ -34810,7 +36831,7 @@ static int _cocos2d_SpriteFrame_getOriginalSize(lua_State *L) return num_ret; } -static int _cocos2d_SpriteFrame_getOriginalSizeInPixels(lua_State *L) +static int _olua_fun_cocos2d_SpriteFrame_getOriginalSizeInPixels(lua_State *L) { olua_startinvoke(L); @@ -34827,7 +36848,7 @@ static int _cocos2d_SpriteFrame_getOriginalSizeInPixels(lua_State *L) return num_ret; } -static int _cocos2d_SpriteFrame_getRect(lua_State *L) +static int _olua_fun_cocos2d_SpriteFrame_getRect(lua_State *L) { olua_startinvoke(L); @@ -34844,7 +36865,7 @@ static int _cocos2d_SpriteFrame_getRect(lua_State *L) return num_ret; } -static int _cocos2d_SpriteFrame_getRectInPixels(lua_State *L) +static int _olua_fun_cocos2d_SpriteFrame_getRectInPixels(lua_State *L) { olua_startinvoke(L); @@ -34861,7 +36882,7 @@ static int _cocos2d_SpriteFrame_getRectInPixels(lua_State *L) return num_ret; } -static int _cocos2d_SpriteFrame_getTexture(lua_State *L) +static int _olua_fun_cocos2d_SpriteFrame_getTexture(lua_State *L) { olua_startinvoke(L); @@ -34878,7 +36899,7 @@ static int _cocos2d_SpriteFrame_getTexture(lua_State *L) return num_ret; } -static int _cocos2d_SpriteFrame_hasAnchorPoint(lua_State *L) +static int _olua_fun_cocos2d_SpriteFrame_hasAnchorPoint(lua_State *L) { olua_startinvoke(L); @@ -34895,7 +36916,7 @@ static int _cocos2d_SpriteFrame_hasAnchorPoint(lua_State *L) return num_ret; } -static int _cocos2d_SpriteFrame_hasCenterRect(lua_State *L) +static int _olua_fun_cocos2d_SpriteFrame_hasCenterRect(lua_State *L) { olua_startinvoke(L); @@ -34912,7 +36933,7 @@ static int _cocos2d_SpriteFrame_hasCenterRect(lua_State *L) return num_ret; } -static int _cocos2d_SpriteFrame_hasPolygonInfo(lua_State *L) +static int _olua_fun_cocos2d_SpriteFrame_hasPolygonInfo(lua_State *L) { olua_startinvoke(L); @@ -34929,20 +36950,20 @@ static int _cocos2d_SpriteFrame_hasPolygonInfo(lua_State *L) return num_ret; } -static int _cocos2d_SpriteFrame_initWithTexture$1(lua_State *L) +static int _olua_fun_cocos2d_SpriteFrame_initWithTexture$1(lua_State *L) { olua_startinvoke(L); cocos2d::SpriteFrame *self = nullptr; cocos2d::Texture2D *arg1 = nullptr; /** pobTexture */ - cocos2d::Rect arg2; /** rect */ + cocos2d::Rect *arg2; /** rect */ olua_to_object(L, 1, &self, "cc.SpriteFrame"); olua_check_object(L, 2, &arg1, "cc.Texture2D"); olua_check_object(L, 3, &arg2, "cc.Rect"); // bool initWithTexture(cocos2d::Texture2D *pobTexture, const cocos2d::Rect &rect) - bool ret = self->initWithTexture(arg1, arg2); + bool ret = self->initWithTexture(arg1, *arg2); int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); @@ -34950,16 +36971,16 @@ static int _cocos2d_SpriteFrame_initWithTexture$1(lua_State *L) return num_ret; } -static int _cocos2d_SpriteFrame_initWithTexture$2(lua_State *L) +static int _olua_fun_cocos2d_SpriteFrame_initWithTexture$2(lua_State *L) { olua_startinvoke(L); cocos2d::SpriteFrame *self = nullptr; cocos2d::Texture2D *arg1 = nullptr; /** pobTexture */ - cocos2d::Rect arg2; /** rect */ + cocos2d::Rect *arg2; /** rect */ bool arg3 = false; /** rotated */ - cocos2d::Vec2 arg4; /** offset */ - cocos2d::Size arg5; /** originalSize */ + cocos2d::Vec2 *arg4; /** offset */ + cocos2d::Size *arg5; /** originalSize */ olua_to_object(L, 1, &self, "cc.SpriteFrame"); olua_check_object(L, 2, &arg1, "cc.Texture2D"); @@ -34969,7 +36990,7 @@ static int _cocos2d_SpriteFrame_initWithTexture$2(lua_State *L) olua_check_object(L, 6, &arg5, "cc.Size"); // bool initWithTexture(cocos2d::Texture2D *pobTexture, const cocos2d::Rect &rect, bool rotated, const cocos2d::Vec2 &offset, const cocos2d::Size &originalSize) - bool ret = self->initWithTexture(arg1, arg2, arg3, arg4, arg5); + bool ret = self->initWithTexture(arg1, *arg2, arg3, *arg4, *arg5); int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); @@ -34977,21 +36998,21 @@ static int _cocos2d_SpriteFrame_initWithTexture$2(lua_State *L) return num_ret; } -static int _cocos2d_SpriteFrame_initWithTexture(lua_State *L) +static int _olua_fun_cocos2d_SpriteFrame_initWithTexture(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 2) { // if ((olua_is_object(L, 2, "cc.Texture2D")) && (olua_is_object(L, 3, "cc.Rect"))) { // bool initWithTexture(cocos2d::Texture2D *pobTexture, const cocos2d::Rect &rect) - return _cocos2d_SpriteFrame_initWithTexture$1(L); + return _olua_fun_cocos2d_SpriteFrame_initWithTexture$1(L); // } } if (num_args == 5) { // if ((olua_is_object(L, 2, "cc.Texture2D")) && (olua_is_object(L, 3, "cc.Rect")) && (olua_is_bool(L, 4)) && (olua_is_object(L, 5, "cc.Vec2")) && (olua_is_object(L, 6, "cc.Size"))) { // bool initWithTexture(cocos2d::Texture2D *pobTexture, const cocos2d::Rect &rect, bool rotated, const cocos2d::Vec2 &offset, const cocos2d::Size &originalSize) - return _cocos2d_SpriteFrame_initWithTexture$2(L); + return _olua_fun_cocos2d_SpriteFrame_initWithTexture$2(L); // } } @@ -35000,20 +37021,20 @@ static int _cocos2d_SpriteFrame_initWithTexture(lua_State *L) return 0; } -static int _cocos2d_SpriteFrame_initWithTextureFilename$1(lua_State *L) +static int _olua_fun_cocos2d_SpriteFrame_initWithTextureFilename$1(lua_State *L) { olua_startinvoke(L); cocos2d::SpriteFrame *self = nullptr; std::string arg1; /** filename */ - cocos2d::Rect arg2; /** rect */ + cocos2d::Rect *arg2; /** rect */ olua_to_object(L, 1, &self, "cc.SpriteFrame"); olua_check_string(L, 2, &arg1); olua_check_object(L, 3, &arg2, "cc.Rect"); // bool initWithTextureFilename(const std::string &filename, const cocos2d::Rect &rect) - bool ret = self->initWithTextureFilename(arg1, arg2); + bool ret = self->initWithTextureFilename(arg1, *arg2); int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); @@ -35021,16 +37042,16 @@ static int _cocos2d_SpriteFrame_initWithTextureFilename$1(lua_State *L) return num_ret; } -static int _cocos2d_SpriteFrame_initWithTextureFilename$2(lua_State *L) +static int _olua_fun_cocos2d_SpriteFrame_initWithTextureFilename$2(lua_State *L) { olua_startinvoke(L); cocos2d::SpriteFrame *self = nullptr; std::string arg1; /** filename */ - cocos2d::Rect arg2; /** rect */ + cocos2d::Rect *arg2; /** rect */ bool arg3 = false; /** rotated */ - cocos2d::Vec2 arg4; /** offset */ - cocos2d::Size arg5; /** originalSize */ + cocos2d::Vec2 *arg4; /** offset */ + cocos2d::Size *arg5; /** originalSize */ olua_to_object(L, 1, &self, "cc.SpriteFrame"); olua_check_string(L, 2, &arg1); @@ -35040,7 +37061,7 @@ static int _cocos2d_SpriteFrame_initWithTextureFilename$2(lua_State *L) olua_check_object(L, 6, &arg5, "cc.Size"); // bool initWithTextureFilename(const std::string &filename, const cocos2d::Rect &rect, bool rotated, const cocos2d::Vec2 &offset, const cocos2d::Size &originalSize) - bool ret = self->initWithTextureFilename(arg1, arg2, arg3, arg4, arg5); + bool ret = self->initWithTextureFilename(arg1, *arg2, arg3, *arg4, *arg5); int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); @@ -35048,21 +37069,21 @@ static int _cocos2d_SpriteFrame_initWithTextureFilename$2(lua_State *L) return num_ret; } -static int _cocos2d_SpriteFrame_initWithTextureFilename(lua_State *L) +static int _olua_fun_cocos2d_SpriteFrame_initWithTextureFilename(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 2) { // if ((olua_is_string(L, 2)) && (olua_is_object(L, 3, "cc.Rect"))) { // bool initWithTextureFilename(const std::string &filename, const cocos2d::Rect &rect) - return _cocos2d_SpriteFrame_initWithTextureFilename$1(L); + return _olua_fun_cocos2d_SpriteFrame_initWithTextureFilename$1(L); // } } if (num_args == 5) { // if ((olua_is_string(L, 2)) && (olua_is_object(L, 3, "cc.Rect")) && (olua_is_bool(L, 4)) && (olua_is_object(L, 5, "cc.Vec2")) && (olua_is_object(L, 6, "cc.Size"))) { // bool initWithTextureFilename(const std::string &filename, const cocos2d::Rect &rect, bool rotated, const cocos2d::Vec2 &offset, const cocos2d::Size &originalSize) - return _cocos2d_SpriteFrame_initWithTextureFilename$2(L); + return _olua_fun_cocos2d_SpriteFrame_initWithTextureFilename$2(L); // } } @@ -35071,7 +37092,7 @@ static int _cocos2d_SpriteFrame_initWithTextureFilename(lua_State *L) return 0; } -static int _cocos2d_SpriteFrame_isRotated(lua_State *L) +static int _olua_fun_cocos2d_SpriteFrame_isRotated(lua_State *L) { olua_startinvoke(L); @@ -35088,11 +37109,11 @@ static int _cocos2d_SpriteFrame_isRotated(lua_State *L) return num_ret; } -static int _cocos2d_SpriteFrame_new(lua_State *L) +static int _olua_fun_cocos2d_SpriteFrame_new(lua_State *L) { olua_startinvoke(L); - // SpriteFrame() + // cocos2d::SpriteFrame() cocos2d::SpriteFrame *ret = new cocos2d::SpriteFrame(); int num_ret = olua_push_object(L, ret, "cc.SpriteFrame"); olua_postnew(L, ret); @@ -35102,151 +37123,151 @@ static int _cocos2d_SpriteFrame_new(lua_State *L) return num_ret; } -static int _cocos2d_SpriteFrame_setAnchorPoint(lua_State *L) +static int _olua_fun_cocos2d_SpriteFrame_setAnchorPoint(lua_State *L) { olua_startinvoke(L); cocos2d::SpriteFrame *self = nullptr; - cocos2d::Vec2 arg1; /** anchorPoint */ + cocos2d::Vec2 *arg1; /** anchorPoint */ olua_to_object(L, 1, &self, "cc.SpriteFrame"); olua_check_object(L, 2, &arg1, "cc.Vec2"); // void setAnchorPoint(const cocos2d::Vec2 &anchorPoint) - self->setAnchorPoint(arg1); + self->setAnchorPoint(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_SpriteFrame_setCenterRectInPixels(lua_State *L) +static int _olua_fun_cocos2d_SpriteFrame_setCenterRectInPixels(lua_State *L) { olua_startinvoke(L); cocos2d::SpriteFrame *self = nullptr; - cocos2d::Rect arg1; /** centerRect */ + cocos2d::Rect *arg1; /** centerRect */ olua_to_object(L, 1, &self, "cc.SpriteFrame"); olua_check_object(L, 2, &arg1, "cc.Rect"); // void setCenterRectInPixels(const cocos2d::Rect ¢erRect) - self->setCenterRectInPixels(arg1); + self->setCenterRectInPixels(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_SpriteFrame_setOffset(lua_State *L) +static int _olua_fun_cocos2d_SpriteFrame_setOffset(lua_State *L) { olua_startinvoke(L); cocos2d::SpriteFrame *self = nullptr; - cocos2d::Vec2 arg1; /** offsets */ + cocos2d::Vec2 *arg1; /** offsets */ olua_to_object(L, 1, &self, "cc.SpriteFrame"); olua_check_object(L, 2, &arg1, "cc.Vec2"); // void setOffset(const cocos2d::Vec2 &offsets) - self->setOffset(arg1); + self->setOffset(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_SpriteFrame_setOffsetInPixels(lua_State *L) +static int _olua_fun_cocos2d_SpriteFrame_setOffsetInPixels(lua_State *L) { olua_startinvoke(L); cocos2d::SpriteFrame *self = nullptr; - cocos2d::Vec2 arg1; /** offsetInPixels */ + cocos2d::Vec2 *arg1; /** offsetInPixels */ olua_to_object(L, 1, &self, "cc.SpriteFrame"); olua_check_object(L, 2, &arg1, "cc.Vec2"); // void setOffsetInPixels(const cocos2d::Vec2 &offsetInPixels) - self->setOffsetInPixels(arg1); + self->setOffsetInPixels(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_SpriteFrame_setOriginalSize(lua_State *L) +static int _olua_fun_cocos2d_SpriteFrame_setOriginalSize(lua_State *L) { olua_startinvoke(L); cocos2d::SpriteFrame *self = nullptr; - cocos2d::Size arg1; /** sizeInPixels */ + cocos2d::Size *arg1; /** sizeInPixels */ olua_to_object(L, 1, &self, "cc.SpriteFrame"); olua_check_object(L, 2, &arg1, "cc.Size"); // void setOriginalSize(const cocos2d::Size &sizeInPixels) - self->setOriginalSize(arg1); + self->setOriginalSize(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_SpriteFrame_setOriginalSizeInPixels(lua_State *L) +static int _olua_fun_cocos2d_SpriteFrame_setOriginalSizeInPixels(lua_State *L) { olua_startinvoke(L); cocos2d::SpriteFrame *self = nullptr; - cocos2d::Size arg1; /** sizeInPixels */ + cocos2d::Size *arg1; /** sizeInPixels */ olua_to_object(L, 1, &self, "cc.SpriteFrame"); olua_check_object(L, 2, &arg1, "cc.Size"); // void setOriginalSizeInPixels(const cocos2d::Size &sizeInPixels) - self->setOriginalSizeInPixels(arg1); + self->setOriginalSizeInPixels(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_SpriteFrame_setRect(lua_State *L) +static int _olua_fun_cocos2d_SpriteFrame_setRect(lua_State *L) { olua_startinvoke(L); cocos2d::SpriteFrame *self = nullptr; - cocos2d::Rect arg1; /** rect */ + cocos2d::Rect *arg1; /** rect */ olua_to_object(L, 1, &self, "cc.SpriteFrame"); olua_check_object(L, 2, &arg1, "cc.Rect"); // void setRect(const cocos2d::Rect &rect) - self->setRect(arg1); + self->setRect(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_SpriteFrame_setRectInPixels(lua_State *L) +static int _olua_fun_cocos2d_SpriteFrame_setRectInPixels(lua_State *L) { olua_startinvoke(L); cocos2d::SpriteFrame *self = nullptr; - cocos2d::Rect arg1; /** rectInPixels */ + cocos2d::Rect *arg1; /** rectInPixels */ olua_to_object(L, 1, &self, "cc.SpriteFrame"); olua_check_object(L, 2, &arg1, "cc.Rect"); // void setRectInPixels(const cocos2d::Rect &rectInPixels) - self->setRectInPixels(arg1); + self->setRectInPixels(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_SpriteFrame_setRotated(lua_State *L) +static int _olua_fun_cocos2d_SpriteFrame_setRotated(lua_State *L) { olua_startinvoke(L); @@ -35264,7 +37285,7 @@ static int _cocos2d_SpriteFrame_setRotated(lua_State *L) return 0; } -static int _cocos2d_SpriteFrame_setTexture(lua_State *L) +static int _olua_fun_cocos2d_SpriteFrame_setTexture(lua_State *L) { olua_startinvoke(L); @@ -35282,56 +37303,65 @@ static int _cocos2d_SpriteFrame_setTexture(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_SpriteFrame(lua_State *L) +static int _olua_cls_cc_SpriteFrame(lua_State *L) { oluacls_class(L, "cc.SpriteFrame"); - oluacls_func(L, "as", _cocos2d_SpriteFrame_as); - oluacls_func(L, "clone", _cocos2d_SpriteFrame_clone); - oluacls_func(L, "create", _cocos2d_SpriteFrame_create); - oluacls_func(L, "createWithTexture", _cocos2d_SpriteFrame_createWithTexture); - oluacls_func(L, "getAnchorPoint", _cocos2d_SpriteFrame_getAnchorPoint); - oluacls_func(L, "getCenterRect", _cocos2d_SpriteFrame_getCenterRect); - oluacls_func(L, "getOffset", _cocos2d_SpriteFrame_getOffset); - oluacls_func(L, "getOffsetInPixels", _cocos2d_SpriteFrame_getOffsetInPixels); - oluacls_func(L, "getOriginalSize", _cocos2d_SpriteFrame_getOriginalSize); - oluacls_func(L, "getOriginalSizeInPixels", _cocos2d_SpriteFrame_getOriginalSizeInPixels); - oluacls_func(L, "getRect", _cocos2d_SpriteFrame_getRect); - oluacls_func(L, "getRectInPixels", _cocos2d_SpriteFrame_getRectInPixels); - oluacls_func(L, "getTexture", _cocos2d_SpriteFrame_getTexture); - oluacls_func(L, "hasAnchorPoint", _cocos2d_SpriteFrame_hasAnchorPoint); - oluacls_func(L, "hasCenterRect", _cocos2d_SpriteFrame_hasCenterRect); - oluacls_func(L, "hasPolygonInfo", _cocos2d_SpriteFrame_hasPolygonInfo); - oluacls_func(L, "initWithTexture", _cocos2d_SpriteFrame_initWithTexture); - oluacls_func(L, "initWithTextureFilename", _cocos2d_SpriteFrame_initWithTextureFilename); - oluacls_func(L, "isRotated", _cocos2d_SpriteFrame_isRotated); - oluacls_func(L, "new", _cocos2d_SpriteFrame_new); - oluacls_func(L, "setAnchorPoint", _cocos2d_SpriteFrame_setAnchorPoint); - oluacls_func(L, "setCenterRectInPixels", _cocos2d_SpriteFrame_setCenterRectInPixels); - oluacls_func(L, "setOffset", _cocos2d_SpriteFrame_setOffset); - oluacls_func(L, "setOffsetInPixels", _cocos2d_SpriteFrame_setOffsetInPixels); - oluacls_func(L, "setOriginalSize", _cocos2d_SpriteFrame_setOriginalSize); - oluacls_func(L, "setOriginalSizeInPixels", _cocos2d_SpriteFrame_setOriginalSizeInPixels); - oluacls_func(L, "setRect", _cocos2d_SpriteFrame_setRect); - oluacls_func(L, "setRectInPixels", _cocos2d_SpriteFrame_setRectInPixels); - oluacls_func(L, "setRotated", _cocos2d_SpriteFrame_setRotated); - oluacls_func(L, "setTexture", _cocos2d_SpriteFrame_setTexture); - oluacls_prop(L, "anchorPoint", _cocos2d_SpriteFrame_getAnchorPoint, _cocos2d_SpriteFrame_setAnchorPoint); - oluacls_prop(L, "centerRect", _cocos2d_SpriteFrame_getCenterRect, nullptr); - oluacls_prop(L, "offset", _cocos2d_SpriteFrame_getOffset, _cocos2d_SpriteFrame_setOffset); - oluacls_prop(L, "offsetInPixels", _cocos2d_SpriteFrame_getOffsetInPixels, _cocos2d_SpriteFrame_setOffsetInPixels); - oluacls_prop(L, "originalSize", _cocos2d_SpriteFrame_getOriginalSize, _cocos2d_SpriteFrame_setOriginalSize); - oluacls_prop(L, "originalSizeInPixels", _cocos2d_SpriteFrame_getOriginalSizeInPixels, _cocos2d_SpriteFrame_setOriginalSizeInPixels); - oluacls_prop(L, "rect", _cocos2d_SpriteFrame_getRect, _cocos2d_SpriteFrame_setRect); - oluacls_prop(L, "rectInPixels", _cocos2d_SpriteFrame_getRectInPixels, _cocos2d_SpriteFrame_setRectInPixels); - oluacls_prop(L, "rotated", _cocos2d_SpriteFrame_isRotated, _cocos2d_SpriteFrame_setRotated); - oluacls_prop(L, "texture", _cocos2d_SpriteFrame_getTexture, _cocos2d_SpriteFrame_setTexture); + oluacls_func(L, "as", _olua_fun_cocos2d_SpriteFrame_as); + oluacls_func(L, "clone", _olua_fun_cocos2d_SpriteFrame_clone); + oluacls_func(L, "create", _olua_fun_cocos2d_SpriteFrame_create); + oluacls_func(L, "createWithTexture", _olua_fun_cocos2d_SpriteFrame_createWithTexture); + oluacls_func(L, "getAnchorPoint", _olua_fun_cocos2d_SpriteFrame_getAnchorPoint); + oluacls_func(L, "getCenterRect", _olua_fun_cocos2d_SpriteFrame_getCenterRect); + oluacls_func(L, "getOffset", _olua_fun_cocos2d_SpriteFrame_getOffset); + oluacls_func(L, "getOffsetInPixels", _olua_fun_cocos2d_SpriteFrame_getOffsetInPixels); + oluacls_func(L, "getOriginalSize", _olua_fun_cocos2d_SpriteFrame_getOriginalSize); + oluacls_func(L, "getOriginalSizeInPixels", _olua_fun_cocos2d_SpriteFrame_getOriginalSizeInPixels); + oluacls_func(L, "getRect", _olua_fun_cocos2d_SpriteFrame_getRect); + oluacls_func(L, "getRectInPixels", _olua_fun_cocos2d_SpriteFrame_getRectInPixels); + oluacls_func(L, "getTexture", _olua_fun_cocos2d_SpriteFrame_getTexture); + oluacls_func(L, "hasAnchorPoint", _olua_fun_cocos2d_SpriteFrame_hasAnchorPoint); + oluacls_func(L, "hasCenterRect", _olua_fun_cocos2d_SpriteFrame_hasCenterRect); + oluacls_func(L, "hasPolygonInfo", _olua_fun_cocos2d_SpriteFrame_hasPolygonInfo); + oluacls_func(L, "initWithTexture", _olua_fun_cocos2d_SpriteFrame_initWithTexture); + oluacls_func(L, "initWithTextureFilename", _olua_fun_cocos2d_SpriteFrame_initWithTextureFilename); + oluacls_func(L, "isRotated", _olua_fun_cocos2d_SpriteFrame_isRotated); + oluacls_func(L, "new", _olua_fun_cocos2d_SpriteFrame_new); + oluacls_func(L, "setAnchorPoint", _olua_fun_cocos2d_SpriteFrame_setAnchorPoint); + oluacls_func(L, "setCenterRectInPixels", _olua_fun_cocos2d_SpriteFrame_setCenterRectInPixels); + oluacls_func(L, "setOffset", _olua_fun_cocos2d_SpriteFrame_setOffset); + oluacls_func(L, "setOffsetInPixels", _olua_fun_cocos2d_SpriteFrame_setOffsetInPixels); + oluacls_func(L, "setOriginalSize", _olua_fun_cocos2d_SpriteFrame_setOriginalSize); + oluacls_func(L, "setOriginalSizeInPixels", _olua_fun_cocos2d_SpriteFrame_setOriginalSizeInPixels); + oluacls_func(L, "setRect", _olua_fun_cocos2d_SpriteFrame_setRect); + oluacls_func(L, "setRectInPixels", _olua_fun_cocos2d_SpriteFrame_setRectInPixels); + oluacls_func(L, "setRotated", _olua_fun_cocos2d_SpriteFrame_setRotated); + oluacls_func(L, "setTexture", _olua_fun_cocos2d_SpriteFrame_setTexture); + oluacls_prop(L, "anchorPoint", _olua_fun_cocos2d_SpriteFrame_getAnchorPoint, _olua_fun_cocos2d_SpriteFrame_setAnchorPoint); + oluacls_prop(L, "centerRect", _olua_fun_cocos2d_SpriteFrame_getCenterRect, nullptr); + oluacls_prop(L, "offset", _olua_fun_cocos2d_SpriteFrame_getOffset, _olua_fun_cocos2d_SpriteFrame_setOffset); + oluacls_prop(L, "offsetInPixels", _olua_fun_cocos2d_SpriteFrame_getOffsetInPixels, _olua_fun_cocos2d_SpriteFrame_setOffsetInPixels); + oluacls_prop(L, "originalSize", _olua_fun_cocos2d_SpriteFrame_getOriginalSize, _olua_fun_cocos2d_SpriteFrame_setOriginalSize); + oluacls_prop(L, "originalSizeInPixels", _olua_fun_cocos2d_SpriteFrame_getOriginalSizeInPixels, _olua_fun_cocos2d_SpriteFrame_setOriginalSizeInPixels); + oluacls_prop(L, "rect", _olua_fun_cocos2d_SpriteFrame_getRect, _olua_fun_cocos2d_SpriteFrame_setRect); + oluacls_prop(L, "rectInPixels", _olua_fun_cocos2d_SpriteFrame_getRectInPixels, _olua_fun_cocos2d_SpriteFrame_setRectInPixels); + oluacls_prop(L, "rotated", _olua_fun_cocos2d_SpriteFrame_isRotated, _olua_fun_cocos2d_SpriteFrame_setRotated); + oluacls_prop(L, "texture", _olua_fun_cocos2d_SpriteFrame_getTexture, _olua_fun_cocos2d_SpriteFrame_setTexture); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_SpriteFrame(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.SpriteFrame")) { + luaL_error(L, "class not found: cocos2d::SpriteFrame"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_Sprite_as(lua_State *L) +static int _olua_fun_cocos2d_Sprite_as(lua_State *L) { olua_startinvoke(L); @@ -35363,7 +37393,7 @@ static int _cocos2d_Sprite_as(lua_State *L) return 1; } -static int _cocos2d_Sprite_create$1(lua_State *L) +static int _olua_fun_cocos2d_Sprite_create$1(lua_State *L) { olua_startinvoke(L); @@ -35376,7 +37406,7 @@ static int _cocos2d_Sprite_create$1(lua_State *L) return num_ret; } -static int _cocos2d_Sprite_create$2(lua_State *L) +static int _olua_fun_cocos2d_Sprite_create$2(lua_State *L) { olua_startinvoke(L); @@ -35393,18 +37423,18 @@ static int _cocos2d_Sprite_create$2(lua_State *L) return num_ret; } -static int _cocos2d_Sprite_create$3(lua_State *L) +static int _olua_fun_cocos2d_Sprite_create$3(lua_State *L) { olua_startinvoke(L); std::string arg1; /** filename */ - cocos2d::Rect arg2; /** rect */ + cocos2d::Rect *arg2; /** rect */ olua_check_string(L, 1, &arg1); olua_check_object(L, 2, &arg2, "cc.Rect"); // static cocos2d::Sprite *create(const std::string &filename, const cocos2d::Rect &rect) - cocos2d::Sprite *ret = cocos2d::Sprite::create(arg1, arg2); + cocos2d::Sprite *ret = cocos2d::Sprite::create(arg1, *arg2); int num_ret = olua_push_object(L, ret, "cc.Sprite"); olua_endinvoke(L); @@ -35412,26 +37442,26 @@ static int _cocos2d_Sprite_create$3(lua_State *L) return num_ret; } -static int _cocos2d_Sprite_create(lua_State *L) +static int _olua_fun_cocos2d_Sprite_create(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 0) { // static cocos2d::Sprite *create() - return _cocos2d_Sprite_create$1(L); + return _olua_fun_cocos2d_Sprite_create$1(L); } if (num_args == 1) { // if ((olua_is_string(L, 1))) { // static cocos2d::Sprite *create(const std::string &filename) - return _cocos2d_Sprite_create$2(L); + return _olua_fun_cocos2d_Sprite_create$2(L); // } } if (num_args == 2) { // if ((olua_is_string(L, 1)) && (olua_is_object(L, 2, "cc.Rect"))) { // static cocos2d::Sprite *create(const std::string &filename, const cocos2d::Rect &rect) - return _cocos2d_Sprite_create$3(L); + return _olua_fun_cocos2d_Sprite_create$3(L); // } } @@ -35440,7 +37470,7 @@ static int _cocos2d_Sprite_create(lua_State *L) return 0; } -static int _cocos2d_Sprite_createWithSpriteFrame(lua_State *L) +static int _olua_fun_cocos2d_Sprite_createWithSpriteFrame(lua_State *L) { olua_startinvoke(L); @@ -35457,7 +37487,7 @@ static int _cocos2d_Sprite_createWithSpriteFrame(lua_State *L) return num_ret; } -static int _cocos2d_Sprite_createWithSpriteFrameName(lua_State *L) +static int _olua_fun_cocos2d_Sprite_createWithSpriteFrameName(lua_State *L) { olua_startinvoke(L); @@ -35474,7 +37504,7 @@ static int _cocos2d_Sprite_createWithSpriteFrameName(lua_State *L) return num_ret; } -static int _cocos2d_Sprite_createWithTexture$1(lua_State *L) +static int _olua_fun_cocos2d_Sprite_createWithTexture$1(lua_State *L) { olua_startinvoke(L); @@ -35491,12 +37521,12 @@ static int _cocos2d_Sprite_createWithTexture$1(lua_State *L) return num_ret; } -static int _cocos2d_Sprite_createWithTexture$2(lua_State *L) +static int _olua_fun_cocos2d_Sprite_createWithTexture$2(lua_State *L) { olua_startinvoke(L); cocos2d::Texture2D *arg1 = nullptr; /** texture */ - cocos2d::Rect arg2; /** rect */ + cocos2d::Rect *arg2; /** rect */ bool arg3 = false; /** rotated */ olua_check_object(L, 1, &arg1, "cc.Texture2D"); @@ -35504,7 +37534,7 @@ static int _cocos2d_Sprite_createWithTexture$2(lua_State *L) olua_check_bool(L, 3, &arg3); // static cocos2d::Sprite *createWithTexture(cocos2d::Texture2D *texture, const cocos2d::Rect &rect, @optional bool rotated) - cocos2d::Sprite *ret = cocos2d::Sprite::createWithTexture(arg1, arg2, arg3); + cocos2d::Sprite *ret = cocos2d::Sprite::createWithTexture(arg1, *arg2, arg3); int num_ret = olua_push_object(L, ret, "cc.Sprite"); olua_endinvoke(L); @@ -35512,18 +37542,18 @@ static int _cocos2d_Sprite_createWithTexture$2(lua_State *L) return num_ret; } -static int _cocos2d_Sprite_createWithTexture$3(lua_State *L) +static int _olua_fun_cocos2d_Sprite_createWithTexture$3(lua_State *L) { olua_startinvoke(L); cocos2d::Texture2D *arg1 = nullptr; /** texture */ - cocos2d::Rect arg2; /** rect */ + cocos2d::Rect *arg2; /** rect */ olua_check_object(L, 1, &arg1, "cc.Texture2D"); olua_check_object(L, 2, &arg2, "cc.Rect"); - // static cocos2d::Sprite *createWithTexture(cocos2d::Texture2D *texture, const cocos2d::Rect &rect, @optional bool rotated) - cocos2d::Sprite *ret = cocos2d::Sprite::createWithTexture(arg1, arg2); + // static cocos2d::Sprite *createWithTexture(cocos2d::Texture2D *texture, const cocos2d::Rect &rect) + cocos2d::Sprite *ret = cocos2d::Sprite::createWithTexture(arg1, *arg2); int num_ret = olua_push_object(L, ret, "cc.Sprite"); olua_endinvoke(L); @@ -35531,28 +37561,28 @@ static int _cocos2d_Sprite_createWithTexture$3(lua_State *L) return num_ret; } -static int _cocos2d_Sprite_createWithTexture(lua_State *L) +static int _olua_fun_cocos2d_Sprite_createWithTexture(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 1) { // if ((olua_is_object(L, 1, "cc.Texture2D"))) { // static cocos2d::Sprite *createWithTexture(cocos2d::Texture2D *texture) - return _cocos2d_Sprite_createWithTexture$1(L); + return _olua_fun_cocos2d_Sprite_createWithTexture$1(L); // } } if (num_args == 2) { // if ((olua_is_object(L, 1, "cc.Texture2D")) && (olua_is_object(L, 2, "cc.Rect"))) { - // static cocos2d::Sprite *createWithTexture(cocos2d::Texture2D *texture, const cocos2d::Rect &rect, @optional bool rotated) - return _cocos2d_Sprite_createWithTexture$3(L); + // static cocos2d::Sprite *createWithTexture(cocos2d::Texture2D *texture, const cocos2d::Rect &rect) + return _olua_fun_cocos2d_Sprite_createWithTexture$3(L); // } } if (num_args == 3) { // if ((olua_is_object(L, 1, "cc.Texture2D")) && (olua_is_object(L, 2, "cc.Rect")) && (olua_is_bool(L, 3))) { // static cocos2d::Sprite *createWithTexture(cocos2d::Texture2D *texture, const cocos2d::Rect &rect, @optional bool rotated) - return _cocos2d_Sprite_createWithTexture$2(L); + return _olua_fun_cocos2d_Sprite_createWithTexture$2(L); // } } @@ -35561,7 +37591,7 @@ static int _cocos2d_Sprite_createWithTexture(lua_State *L) return 0; } -static int _cocos2d_Sprite_getAtlasIndex(lua_State *L) +static int _olua_fun_cocos2d_Sprite_getAtlasIndex(lua_State *L) { olua_startinvoke(L); @@ -35578,7 +37608,7 @@ static int _cocos2d_Sprite_getAtlasIndex(lua_State *L) return num_ret; } -static int _cocos2d_Sprite_getBatchNode(lua_State *L) +static int _olua_fun_cocos2d_Sprite_getBatchNode(lua_State *L) { olua_startinvoke(L); @@ -35595,7 +37625,7 @@ static int _cocos2d_Sprite_getBatchNode(lua_State *L) return num_ret; } -static int _cocos2d_Sprite_getBlendFunc(lua_State *L) +static int _olua_fun_cocos2d_Sprite_getBlendFunc(lua_State *L) { olua_startinvoke(L); @@ -35612,7 +37642,7 @@ static int _cocos2d_Sprite_getBlendFunc(lua_State *L) return num_ret; } -static int _cocos2d_Sprite_getCenterRect(lua_State *L) +static int _olua_fun_cocos2d_Sprite_getCenterRect(lua_State *L) { olua_startinvoke(L); @@ -35622,14 +37652,14 @@ static int _cocos2d_Sprite_getCenterRect(lua_State *L) // cocos2d::Rect getCenterRect() cocos2d::Rect ret = self->getCenterRect(); - int num_ret = olua_pushcopy_object(L, ret, "cc.Rect"); + int num_ret = olua_copy_object(L, ret, "cc.Rect"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_Sprite_getCenterRectNormalized(lua_State *L) +static int _olua_fun_cocos2d_Sprite_getCenterRectNormalized(lua_State *L) { olua_startinvoke(L); @@ -35639,14 +37669,14 @@ static int _cocos2d_Sprite_getCenterRectNormalized(lua_State *L) // cocos2d::Rect getCenterRectNormalized() cocos2d::Rect ret = self->getCenterRectNormalized(); - int num_ret = olua_pushcopy_object(L, ret, "cc.Rect"); + int num_ret = olua_copy_object(L, ret, "cc.Rect"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_Sprite_getOffsetPosition(lua_State *L) +static int _olua_fun_cocos2d_Sprite_getOffsetPosition(lua_State *L) { olua_startinvoke(L); @@ -35663,7 +37693,7 @@ static int _cocos2d_Sprite_getOffsetPosition(lua_State *L) return num_ret; } -static int _cocos2d_Sprite_getResourceName(lua_State *L) +static int _olua_fun_cocos2d_Sprite_getResourceName(lua_State *L) { olua_startinvoke(L); @@ -35680,7 +37710,7 @@ static int _cocos2d_Sprite_getResourceName(lua_State *L) return num_ret; } -static int _cocos2d_Sprite_getResourceType(lua_State *L) +static int _olua_fun_cocos2d_Sprite_getResourceType(lua_State *L) { olua_startinvoke(L); @@ -35697,7 +37727,7 @@ static int _cocos2d_Sprite_getResourceType(lua_State *L) return num_ret; } -static int _cocos2d_Sprite_getSpriteFrame(lua_State *L) +static int _olua_fun_cocos2d_Sprite_getSpriteFrame(lua_State *L) { olua_startinvoke(L); @@ -35714,7 +37744,7 @@ static int _cocos2d_Sprite_getSpriteFrame(lua_State *L) return num_ret; } -static int _cocos2d_Sprite_getTexture(lua_State *L) +static int _olua_fun_cocos2d_Sprite_getTexture(lua_State *L) { olua_startinvoke(L); @@ -35731,7 +37761,7 @@ static int _cocos2d_Sprite_getTexture(lua_State *L) return num_ret; } -static int _cocos2d_Sprite_getTextureAtlas(lua_State *L) +static int _olua_fun_cocos2d_Sprite_getTextureAtlas(lua_State *L) { olua_startinvoke(L); @@ -35748,7 +37778,7 @@ static int _cocos2d_Sprite_getTextureAtlas(lua_State *L) return num_ret; } -static int _cocos2d_Sprite_getTextureRect(lua_State *L) +static int _olua_fun_cocos2d_Sprite_getTextureRect(lua_State *L) { olua_startinvoke(L); @@ -35765,7 +37795,7 @@ static int _cocos2d_Sprite_getTextureRect(lua_State *L) return num_ret; } -static int _cocos2d_Sprite_initWithFile$1(lua_State *L) +static int _olua_fun_cocos2d_Sprite_initWithFile$1(lua_State *L) { olua_startinvoke(L); @@ -35784,20 +37814,20 @@ static int _cocos2d_Sprite_initWithFile$1(lua_State *L) return num_ret; } -static int _cocos2d_Sprite_initWithFile$2(lua_State *L) +static int _olua_fun_cocos2d_Sprite_initWithFile$2(lua_State *L) { olua_startinvoke(L); cocos2d::Sprite *self = nullptr; std::string arg1; /** filename */ - cocos2d::Rect arg2; /** rect */ + cocos2d::Rect *arg2; /** rect */ olua_to_object(L, 1, &self, "cc.Sprite"); olua_check_string(L, 2, &arg1); olua_check_object(L, 3, &arg2, "cc.Rect"); // bool initWithFile(const std::string &filename, const cocos2d::Rect &rect) - bool ret = self->initWithFile(arg1, arg2); + bool ret = self->initWithFile(arg1, *arg2); int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); @@ -35805,21 +37835,21 @@ static int _cocos2d_Sprite_initWithFile$2(lua_State *L) return num_ret; } -static int _cocos2d_Sprite_initWithFile(lua_State *L) +static int _olua_fun_cocos2d_Sprite_initWithFile(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_string(L, 2))) { // bool initWithFile(const std::string &filename) - return _cocos2d_Sprite_initWithFile$1(L); + return _olua_fun_cocos2d_Sprite_initWithFile$1(L); // } } if (num_args == 2) { // if ((olua_is_string(L, 2)) && (olua_is_object(L, 3, "cc.Rect"))) { // bool initWithFile(const std::string &filename, const cocos2d::Rect &rect) - return _cocos2d_Sprite_initWithFile$2(L); + return _olua_fun_cocos2d_Sprite_initWithFile$2(L); // } } @@ -35828,7 +37858,7 @@ static int _cocos2d_Sprite_initWithFile(lua_State *L) return 0; } -static int _cocos2d_Sprite_initWithSpriteFrame(lua_State *L) +static int _olua_fun_cocos2d_Sprite_initWithSpriteFrame(lua_State *L) { olua_startinvoke(L); @@ -35847,7 +37877,7 @@ static int _cocos2d_Sprite_initWithSpriteFrame(lua_State *L) return num_ret; } -static int _cocos2d_Sprite_initWithSpriteFrameName(lua_State *L) +static int _olua_fun_cocos2d_Sprite_initWithSpriteFrameName(lua_State *L) { olua_startinvoke(L); @@ -35866,7 +37896,7 @@ static int _cocos2d_Sprite_initWithSpriteFrameName(lua_State *L) return num_ret; } -static int _cocos2d_Sprite_initWithTexture$1(lua_State *L) +static int _olua_fun_cocos2d_Sprite_initWithTexture$1(lua_State *L) { olua_startinvoke(L); @@ -35885,20 +37915,20 @@ static int _cocos2d_Sprite_initWithTexture$1(lua_State *L) return num_ret; } -static int _cocos2d_Sprite_initWithTexture$2(lua_State *L) +static int _olua_fun_cocos2d_Sprite_initWithTexture$2(lua_State *L) { olua_startinvoke(L); cocos2d::Sprite *self = nullptr; cocos2d::Texture2D *arg1 = nullptr; /** texture */ - cocos2d::Rect arg2; /** rect */ + cocos2d::Rect *arg2; /** rect */ olua_to_object(L, 1, &self, "cc.Sprite"); olua_check_object(L, 2, &arg1, "cc.Texture2D"); olua_check_object(L, 3, &arg2, "cc.Rect"); // bool initWithTexture(cocos2d::Texture2D *texture, const cocos2d::Rect &rect) - bool ret = self->initWithTexture(arg1, arg2); + bool ret = self->initWithTexture(arg1, *arg2); int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); @@ -35906,13 +37936,13 @@ static int _cocos2d_Sprite_initWithTexture$2(lua_State *L) return num_ret; } -static int _cocos2d_Sprite_initWithTexture$3(lua_State *L) +static int _olua_fun_cocos2d_Sprite_initWithTexture$3(lua_State *L) { olua_startinvoke(L); cocos2d::Sprite *self = nullptr; cocos2d::Texture2D *arg1 = nullptr; /** texture */ - cocos2d::Rect arg2; /** rect */ + cocos2d::Rect *arg2; /** rect */ bool arg3 = false; /** rotated */ olua_to_object(L, 1, &self, "cc.Sprite"); @@ -35921,7 +37951,7 @@ static int _cocos2d_Sprite_initWithTexture$3(lua_State *L) olua_check_bool(L, 4, &arg3); // bool initWithTexture(cocos2d::Texture2D *texture, const cocos2d::Rect &rect, bool rotated) - bool ret = self->initWithTexture(arg1, arg2, arg3); + bool ret = self->initWithTexture(arg1, *arg2, arg3); int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); @@ -35929,28 +37959,28 @@ static int _cocos2d_Sprite_initWithTexture$3(lua_State *L) return num_ret; } -static int _cocos2d_Sprite_initWithTexture(lua_State *L) +static int _olua_fun_cocos2d_Sprite_initWithTexture(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_object(L, 2, "cc.Texture2D"))) { // bool initWithTexture(cocos2d::Texture2D *texture) - return _cocos2d_Sprite_initWithTexture$1(L); + return _olua_fun_cocos2d_Sprite_initWithTexture$1(L); // } } if (num_args == 2) { // if ((olua_is_object(L, 2, "cc.Texture2D")) && (olua_is_object(L, 3, "cc.Rect"))) { // bool initWithTexture(cocos2d::Texture2D *texture, const cocos2d::Rect &rect) - return _cocos2d_Sprite_initWithTexture$2(L); + return _olua_fun_cocos2d_Sprite_initWithTexture$2(L); // } } if (num_args == 3) { // if ((olua_is_object(L, 2, "cc.Texture2D")) && (olua_is_object(L, 3, "cc.Rect")) && (olua_is_bool(L, 4))) { // bool initWithTexture(cocos2d::Texture2D *texture, const cocos2d::Rect &rect, bool rotated) - return _cocos2d_Sprite_initWithTexture$3(L); + return _olua_fun_cocos2d_Sprite_initWithTexture$3(L); // } } @@ -35959,7 +37989,7 @@ static int _cocos2d_Sprite_initWithTexture(lua_State *L) return 0; } -static int _cocos2d_Sprite_isDirty(lua_State *L) +static int _olua_fun_cocos2d_Sprite_isDirty(lua_State *L) { olua_startinvoke(L); @@ -35976,7 +38006,7 @@ static int _cocos2d_Sprite_isDirty(lua_State *L) return num_ret; } -static int _cocos2d_Sprite_isFlippedX(lua_State *L) +static int _olua_fun_cocos2d_Sprite_isFlippedX(lua_State *L) { olua_startinvoke(L); @@ -35993,7 +38023,7 @@ static int _cocos2d_Sprite_isFlippedX(lua_State *L) return num_ret; } -static int _cocos2d_Sprite_isFlippedY(lua_State *L) +static int _olua_fun_cocos2d_Sprite_isFlippedY(lua_State *L) { olua_startinvoke(L); @@ -36010,7 +38040,7 @@ static int _cocos2d_Sprite_isFlippedY(lua_State *L) return num_ret; } -static int _cocos2d_Sprite_isFrameDisplayed(lua_State *L) +static int _olua_fun_cocos2d_Sprite_isFrameDisplayed(lua_State *L) { olua_startinvoke(L); @@ -36029,7 +38059,7 @@ static int _cocos2d_Sprite_isFrameDisplayed(lua_State *L) return num_ret; } -static int _cocos2d_Sprite_isStretchEnabled(lua_State *L) +static int _olua_fun_cocos2d_Sprite_isStretchEnabled(lua_State *L) { olua_startinvoke(L); @@ -36046,7 +38076,7 @@ static int _cocos2d_Sprite_isStretchEnabled(lua_State *L) return num_ret; } -static int _cocos2d_Sprite_isTextureRectRotated(lua_State *L) +static int _olua_fun_cocos2d_Sprite_isTextureRectRotated(lua_State *L) { olua_startinvoke(L); @@ -36063,11 +38093,11 @@ static int _cocos2d_Sprite_isTextureRectRotated(lua_State *L) return num_ret; } -static int _cocos2d_Sprite_new(lua_State *L) +static int _olua_fun_cocos2d_Sprite_new(lua_State *L) { olua_startinvoke(L); - // Sprite() + // cocos2d::Sprite() cocos2d::Sprite *ret = new cocos2d::Sprite(); int num_ret = olua_push_object(L, ret, "cc.Sprite"); olua_postnew(L, ret); @@ -36077,7 +38107,7 @@ static int _cocos2d_Sprite_new(lua_State *L) return num_ret; } -static int _cocos2d_Sprite_setAtlasIndex(lua_State *L) +static int _olua_fun_cocos2d_Sprite_setAtlasIndex(lua_State *L) { olua_startinvoke(L); @@ -36095,7 +38125,7 @@ static int _cocos2d_Sprite_setAtlasIndex(lua_State *L) return 0; } -static int _cocos2d_Sprite_setBatchNode(lua_State *L) +static int _olua_fun_cocos2d_Sprite_setBatchNode(lua_State *L) { olua_startinvoke(L); @@ -36113,61 +38143,61 @@ static int _cocos2d_Sprite_setBatchNode(lua_State *L) return 0; } -static int _cocos2d_Sprite_setBlendFunc(lua_State *L) +static int _olua_fun_cocos2d_Sprite_setBlendFunc(lua_State *L) { olua_startinvoke(L); cocos2d::Sprite *self = nullptr; - cocos2d::BlendFunc arg1; /** blendFunc */ + cocos2d::BlendFunc *arg1; /** blendFunc */ olua_to_object(L, 1, &self, "cc.Sprite"); olua_check_object(L, 2, &arg1, "cc.BlendFunc"); // void setBlendFunc(const cocos2d::BlendFunc &blendFunc) - self->setBlendFunc(arg1); + self->setBlendFunc(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_Sprite_setCenterRect(lua_State *L) +static int _olua_fun_cocos2d_Sprite_setCenterRect(lua_State *L) { olua_startinvoke(L); cocos2d::Sprite *self = nullptr; - cocos2d::Rect arg1; /** rect */ + cocos2d::Rect *arg1; /** rect */ olua_to_object(L, 1, &self, "cc.Sprite"); olua_check_object(L, 2, &arg1, "cc.Rect"); // void setCenterRect(const cocos2d::Rect &rect) - self->setCenterRect(arg1); + self->setCenterRect(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_Sprite_setCenterRectNormalized(lua_State *L) +static int _olua_fun_cocos2d_Sprite_setCenterRectNormalized(lua_State *L) { olua_startinvoke(L); cocos2d::Sprite *self = nullptr; - cocos2d::Rect arg1; /** rect */ + cocos2d::Rect *arg1; /** rect */ olua_to_object(L, 1, &self, "cc.Sprite"); olua_check_object(L, 2, &arg1, "cc.Rect"); // void setCenterRectNormalized(const cocos2d::Rect &rect) - self->setCenterRectNormalized(arg1); + self->setCenterRectNormalized(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_Sprite_setDirty(lua_State *L) +static int _olua_fun_cocos2d_Sprite_setDirty(lua_State *L) { olua_startinvoke(L); @@ -36185,7 +38215,7 @@ static int _cocos2d_Sprite_setDirty(lua_State *L) return 0; } -static int _cocos2d_Sprite_setDisplayFrameWithAnimationName(lua_State *L) +static int _olua_fun_cocos2d_Sprite_setDisplayFrameWithAnimationName(lua_State *L) { olua_startinvoke(L); @@ -36205,7 +38235,7 @@ static int _cocos2d_Sprite_setDisplayFrameWithAnimationName(lua_State *L) return 0; } -static int _cocos2d_Sprite_setFlippedX(lua_State *L) +static int _olua_fun_cocos2d_Sprite_setFlippedX(lua_State *L) { olua_startinvoke(L); @@ -36223,7 +38253,7 @@ static int _cocos2d_Sprite_setFlippedX(lua_State *L) return 0; } -static int _cocos2d_Sprite_setFlippedY(lua_State *L) +static int _olua_fun_cocos2d_Sprite_setFlippedY(lua_State *L) { olua_startinvoke(L); @@ -36241,7 +38271,7 @@ static int _cocos2d_Sprite_setFlippedY(lua_State *L) return 0; } -static int _cocos2d_Sprite_setSpriteFrame$1(lua_State *L) +static int _olua_fun_cocos2d_Sprite_setSpriteFrame$1(lua_State *L) { olua_startinvoke(L); @@ -36259,7 +38289,7 @@ static int _cocos2d_Sprite_setSpriteFrame$1(lua_State *L) return 0; } -static int _cocos2d_Sprite_setSpriteFrame$2(lua_State *L) +static int _olua_fun_cocos2d_Sprite_setSpriteFrame$2(lua_State *L) { olua_startinvoke(L); @@ -36277,19 +38307,19 @@ static int _cocos2d_Sprite_setSpriteFrame$2(lua_State *L) return 0; } -static int _cocos2d_Sprite_setSpriteFrame(lua_State *L) +static int _olua_fun_cocos2d_Sprite_setSpriteFrame(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { if ((olua_is_string(L, 2))) { // void setSpriteFrame(const std::string &spriteFrameName) - return _cocos2d_Sprite_setSpriteFrame$1(L); + return _olua_fun_cocos2d_Sprite_setSpriteFrame$1(L); } // if ((olua_is_object(L, 2, "cc.SpriteFrame"))) { // void setSpriteFrame(cocos2d::SpriteFrame *newFrame) - return _cocos2d_Sprite_setSpriteFrame$2(L); + return _olua_fun_cocos2d_Sprite_setSpriteFrame$2(L); // } } @@ -36298,7 +38328,7 @@ static int _cocos2d_Sprite_setSpriteFrame(lua_State *L) return 0; } -static int _cocos2d_Sprite_setStretchEnabled(lua_State *L) +static int _olua_fun_cocos2d_Sprite_setStretchEnabled(lua_State *L) { olua_startinvoke(L); @@ -36316,7 +38346,7 @@ static int _cocos2d_Sprite_setStretchEnabled(lua_State *L) return 0; } -static int _cocos2d_Sprite_setTexture$1(lua_State *L) +static int _olua_fun_cocos2d_Sprite_setTexture$1(lua_State *L) { olua_startinvoke(L); @@ -36334,7 +38364,7 @@ static int _cocos2d_Sprite_setTexture$1(lua_State *L) return 0; } -static int _cocos2d_Sprite_setTexture$2(lua_State *L) +static int _olua_fun_cocos2d_Sprite_setTexture$2(lua_State *L) { olua_startinvoke(L); @@ -36352,19 +38382,19 @@ static int _cocos2d_Sprite_setTexture$2(lua_State *L) return 0; } -static int _cocos2d_Sprite_setTexture(lua_State *L) +static int _olua_fun_cocos2d_Sprite_setTexture(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { if ((olua_is_string(L, 2))) { // void setTexture(const std::string &filename) - return _cocos2d_Sprite_setTexture$1(L); + return _olua_fun_cocos2d_Sprite_setTexture$1(L); } // if ((olua_is_object(L, 2, "cc.Texture2D"))) { // void setTexture(cocos2d::Texture2D *texture) - return _cocos2d_Sprite_setTexture$2(L); + return _olua_fun_cocos2d_Sprite_setTexture$2(L); // } } @@ -36373,7 +38403,7 @@ static int _cocos2d_Sprite_setTexture(lua_State *L) return 0; } -static int _cocos2d_Sprite_setTextureAtlas(lua_State *L) +static int _olua_fun_cocos2d_Sprite_setTextureAtlas(lua_State *L) { olua_startinvoke(L); @@ -36391,32 +38421,32 @@ static int _cocos2d_Sprite_setTextureAtlas(lua_State *L) return 0; } -static int _cocos2d_Sprite_setTextureRect$1(lua_State *L) +static int _olua_fun_cocos2d_Sprite_setTextureRect$1(lua_State *L) { olua_startinvoke(L); cocos2d::Sprite *self = nullptr; - cocos2d::Rect arg1; /** rect */ + cocos2d::Rect *arg1; /** rect */ olua_to_object(L, 1, &self, "cc.Sprite"); olua_check_object(L, 2, &arg1, "cc.Rect"); // void setTextureRect(const cocos2d::Rect &rect) - self->setTextureRect(arg1); + self->setTextureRect(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_Sprite_setTextureRect$2(lua_State *L) +static int _olua_fun_cocos2d_Sprite_setTextureRect$2(lua_State *L) { olua_startinvoke(L); cocos2d::Sprite *self = nullptr; - cocos2d::Rect arg1; /** rect */ + cocos2d::Rect *arg1; /** rect */ bool arg2 = false; /** rotated */ - cocos2d::Size arg3; /** untrimmedSize */ + cocos2d::Size *arg3; /** untrimmedSize */ olua_to_object(L, 1, &self, "cc.Sprite"); olua_check_object(L, 2, &arg1, "cc.Rect"); @@ -36424,28 +38454,28 @@ static int _cocos2d_Sprite_setTextureRect$2(lua_State *L) olua_check_object(L, 4, &arg3, "cc.Size"); // void setTextureRect(const cocos2d::Rect &rect, bool rotated, const cocos2d::Size &untrimmedSize) - self->setTextureRect(arg1, arg2, arg3); + self->setTextureRect(*arg1, arg2, *arg3); olua_endinvoke(L); return 0; } -static int _cocos2d_Sprite_setTextureRect(lua_State *L) +static int _olua_fun_cocos2d_Sprite_setTextureRect(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_object(L, 2, "cc.Rect"))) { // void setTextureRect(const cocos2d::Rect &rect) - return _cocos2d_Sprite_setTextureRect$1(L); + return _olua_fun_cocos2d_Sprite_setTextureRect$1(L); // } } if (num_args == 3) { // if ((olua_is_object(L, 2, "cc.Rect")) && (olua_is_bool(L, 3)) && (olua_is_object(L, 4, "cc.Size"))) { // void setTextureRect(const cocos2d::Rect &rect, bool rotated, const cocos2d::Size &untrimmedSize) - return _cocos2d_Sprite_setTextureRect$2(L); + return _olua_fun_cocos2d_Sprite_setTextureRect$2(L); // } } @@ -36454,7 +38484,7 @@ static int _cocos2d_Sprite_setTextureRect(lua_State *L) return 0; } -static int _cocos2d_Sprite_setVertexLayout(lua_State *L) +static int _olua_fun_cocos2d_Sprite_setVertexLayout(lua_State *L) { olua_startinvoke(L); @@ -36470,25 +38500,25 @@ static int _cocos2d_Sprite_setVertexLayout(lua_State *L) return 0; } -static int _cocos2d_Sprite_setVertexRect(lua_State *L) +static int _olua_fun_cocos2d_Sprite_setVertexRect(lua_State *L) { olua_startinvoke(L); cocos2d::Sprite *self = nullptr; - cocos2d::Rect arg1; /** rect */ + cocos2d::Rect *arg1; /** rect */ olua_to_object(L, 1, &self, "cc.Sprite"); olua_check_object(L, 2, &arg1, "cc.Rect"); // void setVertexRect(const cocos2d::Rect &rect) - self->setVertexRect(arg1); + self->setVertexRect(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_Sprite_updateShaders(lua_State *L) +static int _olua_fun_cocos2d_Sprite_updateShaders(lua_State *L) { olua_startinvoke(L); @@ -36508,79 +38538,88 @@ static int _cocos2d_Sprite_updateShaders(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_Sprite(lua_State *L) +static int _olua_cls_cc_Sprite(lua_State *L) { oluacls_class(L, "cc.Sprite"); - oluacls_func(L, "as", _cocos2d_Sprite_as); - oluacls_func(L, "create", _cocos2d_Sprite_create); - oluacls_func(L, "createWithSpriteFrame", _cocos2d_Sprite_createWithSpriteFrame); - oluacls_func(L, "createWithSpriteFrameName", _cocos2d_Sprite_createWithSpriteFrameName); - oluacls_func(L, "createWithTexture", _cocos2d_Sprite_createWithTexture); - oluacls_func(L, "getAtlasIndex", _cocos2d_Sprite_getAtlasIndex); - oluacls_func(L, "getBatchNode", _cocos2d_Sprite_getBatchNode); - oluacls_func(L, "getBlendFunc", _cocos2d_Sprite_getBlendFunc); - oluacls_func(L, "getCenterRect", _cocos2d_Sprite_getCenterRect); - oluacls_func(L, "getCenterRectNormalized", _cocos2d_Sprite_getCenterRectNormalized); - oluacls_func(L, "getOffsetPosition", _cocos2d_Sprite_getOffsetPosition); - oluacls_func(L, "getResourceName", _cocos2d_Sprite_getResourceName); - oluacls_func(L, "getResourceType", _cocos2d_Sprite_getResourceType); - oluacls_func(L, "getSpriteFrame", _cocos2d_Sprite_getSpriteFrame); - oluacls_func(L, "getTexture", _cocos2d_Sprite_getTexture); - oluacls_func(L, "getTextureAtlas", _cocos2d_Sprite_getTextureAtlas); - oluacls_func(L, "getTextureRect", _cocos2d_Sprite_getTextureRect); - oluacls_func(L, "initWithFile", _cocos2d_Sprite_initWithFile); - oluacls_func(L, "initWithSpriteFrame", _cocos2d_Sprite_initWithSpriteFrame); - oluacls_func(L, "initWithSpriteFrameName", _cocos2d_Sprite_initWithSpriteFrameName); - oluacls_func(L, "initWithTexture", _cocos2d_Sprite_initWithTexture); - oluacls_func(L, "isDirty", _cocos2d_Sprite_isDirty); - oluacls_func(L, "isFlippedX", _cocos2d_Sprite_isFlippedX); - oluacls_func(L, "isFlippedY", _cocos2d_Sprite_isFlippedY); - oluacls_func(L, "isFrameDisplayed", _cocos2d_Sprite_isFrameDisplayed); - oluacls_func(L, "isStretchEnabled", _cocos2d_Sprite_isStretchEnabled); - oluacls_func(L, "isTextureRectRotated", _cocos2d_Sprite_isTextureRectRotated); - oluacls_func(L, "new", _cocos2d_Sprite_new); - oluacls_func(L, "setAtlasIndex", _cocos2d_Sprite_setAtlasIndex); - oluacls_func(L, "setBatchNode", _cocos2d_Sprite_setBatchNode); - oluacls_func(L, "setBlendFunc", _cocos2d_Sprite_setBlendFunc); - oluacls_func(L, "setCenterRect", _cocos2d_Sprite_setCenterRect); - oluacls_func(L, "setCenterRectNormalized", _cocos2d_Sprite_setCenterRectNormalized); - oluacls_func(L, "setDirty", _cocos2d_Sprite_setDirty); - oluacls_func(L, "setDisplayFrameWithAnimationName", _cocos2d_Sprite_setDisplayFrameWithAnimationName); - oluacls_func(L, "setFlippedX", _cocos2d_Sprite_setFlippedX); - oluacls_func(L, "setFlippedY", _cocos2d_Sprite_setFlippedY); - oluacls_func(L, "setSpriteFrame", _cocos2d_Sprite_setSpriteFrame); - oluacls_func(L, "setStretchEnabled", _cocos2d_Sprite_setStretchEnabled); - oluacls_func(L, "setTexture", _cocos2d_Sprite_setTexture); - oluacls_func(L, "setTextureAtlas", _cocos2d_Sprite_setTextureAtlas); - oluacls_func(L, "setTextureRect", _cocos2d_Sprite_setTextureRect); - oluacls_func(L, "setVertexLayout", _cocos2d_Sprite_setVertexLayout); - oluacls_func(L, "setVertexRect", _cocos2d_Sprite_setVertexRect); - oluacls_func(L, "updateShaders", _cocos2d_Sprite_updateShaders); - oluacls_prop(L, "atlasIndex", _cocos2d_Sprite_getAtlasIndex, _cocos2d_Sprite_setAtlasIndex); - oluacls_prop(L, "batchNode", _cocos2d_Sprite_getBatchNode, _cocos2d_Sprite_setBatchNode); - oluacls_prop(L, "blendFunc", _cocos2d_Sprite_getBlendFunc, _cocos2d_Sprite_setBlendFunc); - oluacls_prop(L, "centerRect", _cocos2d_Sprite_getCenterRect, _cocos2d_Sprite_setCenterRect); - oluacls_prop(L, "centerRectNormalized", _cocos2d_Sprite_getCenterRectNormalized, _cocos2d_Sprite_setCenterRectNormalized); - oluacls_prop(L, "dirty", _cocos2d_Sprite_isDirty, _cocos2d_Sprite_setDirty); - oluacls_prop(L, "flippedX", _cocos2d_Sprite_isFlippedX, _cocos2d_Sprite_setFlippedX); - oluacls_prop(L, "flippedY", _cocos2d_Sprite_isFlippedY, _cocos2d_Sprite_setFlippedY); - oluacls_prop(L, "offsetPosition", _cocos2d_Sprite_getOffsetPosition, nullptr); - oluacls_prop(L, "resourceName", _cocos2d_Sprite_getResourceName, nullptr); - oluacls_prop(L, "resourceType", _cocos2d_Sprite_getResourceType, nullptr); - oluacls_prop(L, "spriteFrame", _cocos2d_Sprite_getSpriteFrame, _cocos2d_Sprite_setSpriteFrame); - oluacls_prop(L, "stretchEnabled", _cocos2d_Sprite_isStretchEnabled, _cocos2d_Sprite_setStretchEnabled); - oluacls_prop(L, "texture", _cocos2d_Sprite_getTexture, _cocos2d_Sprite_setTexture); - oluacls_prop(L, "textureAtlas", _cocos2d_Sprite_getTextureAtlas, _cocos2d_Sprite_setTextureAtlas); - oluacls_prop(L, "textureRect", _cocos2d_Sprite_getTextureRect, _cocos2d_Sprite_setTextureRect); - oluacls_prop(L, "textureRectRotated", _cocos2d_Sprite_isTextureRectRotated, nullptr); + oluacls_func(L, "as", _olua_fun_cocos2d_Sprite_as); + oluacls_func(L, "create", _olua_fun_cocos2d_Sprite_create); + oluacls_func(L, "createWithSpriteFrame", _olua_fun_cocos2d_Sprite_createWithSpriteFrame); + oluacls_func(L, "createWithSpriteFrameName", _olua_fun_cocos2d_Sprite_createWithSpriteFrameName); + oluacls_func(L, "createWithTexture", _olua_fun_cocos2d_Sprite_createWithTexture); + oluacls_func(L, "getAtlasIndex", _olua_fun_cocos2d_Sprite_getAtlasIndex); + oluacls_func(L, "getBatchNode", _olua_fun_cocos2d_Sprite_getBatchNode); + oluacls_func(L, "getBlendFunc", _olua_fun_cocos2d_Sprite_getBlendFunc); + oluacls_func(L, "getCenterRect", _olua_fun_cocos2d_Sprite_getCenterRect); + oluacls_func(L, "getCenterRectNormalized", _olua_fun_cocos2d_Sprite_getCenterRectNormalized); + oluacls_func(L, "getOffsetPosition", _olua_fun_cocos2d_Sprite_getOffsetPosition); + oluacls_func(L, "getResourceName", _olua_fun_cocos2d_Sprite_getResourceName); + oluacls_func(L, "getResourceType", _olua_fun_cocos2d_Sprite_getResourceType); + oluacls_func(L, "getSpriteFrame", _olua_fun_cocos2d_Sprite_getSpriteFrame); + oluacls_func(L, "getTexture", _olua_fun_cocos2d_Sprite_getTexture); + oluacls_func(L, "getTextureAtlas", _olua_fun_cocos2d_Sprite_getTextureAtlas); + oluacls_func(L, "getTextureRect", _olua_fun_cocos2d_Sprite_getTextureRect); + oluacls_func(L, "initWithFile", _olua_fun_cocos2d_Sprite_initWithFile); + oluacls_func(L, "initWithSpriteFrame", _olua_fun_cocos2d_Sprite_initWithSpriteFrame); + oluacls_func(L, "initWithSpriteFrameName", _olua_fun_cocos2d_Sprite_initWithSpriteFrameName); + oluacls_func(L, "initWithTexture", _olua_fun_cocos2d_Sprite_initWithTexture); + oluacls_func(L, "isDirty", _olua_fun_cocos2d_Sprite_isDirty); + oluacls_func(L, "isFlippedX", _olua_fun_cocos2d_Sprite_isFlippedX); + oluacls_func(L, "isFlippedY", _olua_fun_cocos2d_Sprite_isFlippedY); + oluacls_func(L, "isFrameDisplayed", _olua_fun_cocos2d_Sprite_isFrameDisplayed); + oluacls_func(L, "isStretchEnabled", _olua_fun_cocos2d_Sprite_isStretchEnabled); + oluacls_func(L, "isTextureRectRotated", _olua_fun_cocos2d_Sprite_isTextureRectRotated); + oluacls_func(L, "new", _olua_fun_cocos2d_Sprite_new); + oluacls_func(L, "setAtlasIndex", _olua_fun_cocos2d_Sprite_setAtlasIndex); + oluacls_func(L, "setBatchNode", _olua_fun_cocos2d_Sprite_setBatchNode); + oluacls_func(L, "setBlendFunc", _olua_fun_cocos2d_Sprite_setBlendFunc); + oluacls_func(L, "setCenterRect", _olua_fun_cocos2d_Sprite_setCenterRect); + oluacls_func(L, "setCenterRectNormalized", _olua_fun_cocos2d_Sprite_setCenterRectNormalized); + oluacls_func(L, "setDirty", _olua_fun_cocos2d_Sprite_setDirty); + oluacls_func(L, "setDisplayFrameWithAnimationName", _olua_fun_cocos2d_Sprite_setDisplayFrameWithAnimationName); + oluacls_func(L, "setFlippedX", _olua_fun_cocos2d_Sprite_setFlippedX); + oluacls_func(L, "setFlippedY", _olua_fun_cocos2d_Sprite_setFlippedY); + oluacls_func(L, "setSpriteFrame", _olua_fun_cocos2d_Sprite_setSpriteFrame); + oluacls_func(L, "setStretchEnabled", _olua_fun_cocos2d_Sprite_setStretchEnabled); + oluacls_func(L, "setTexture", _olua_fun_cocos2d_Sprite_setTexture); + oluacls_func(L, "setTextureAtlas", _olua_fun_cocos2d_Sprite_setTextureAtlas); + oluacls_func(L, "setTextureRect", _olua_fun_cocos2d_Sprite_setTextureRect); + oluacls_func(L, "setVertexLayout", _olua_fun_cocos2d_Sprite_setVertexLayout); + oluacls_func(L, "setVertexRect", _olua_fun_cocos2d_Sprite_setVertexRect); + oluacls_func(L, "updateShaders", _olua_fun_cocos2d_Sprite_updateShaders); + oluacls_prop(L, "atlasIndex", _olua_fun_cocos2d_Sprite_getAtlasIndex, _olua_fun_cocos2d_Sprite_setAtlasIndex); + oluacls_prop(L, "batchNode", _olua_fun_cocos2d_Sprite_getBatchNode, _olua_fun_cocos2d_Sprite_setBatchNode); + oluacls_prop(L, "blendFunc", _olua_fun_cocos2d_Sprite_getBlendFunc, _olua_fun_cocos2d_Sprite_setBlendFunc); + oluacls_prop(L, "centerRect", _olua_fun_cocos2d_Sprite_getCenterRect, _olua_fun_cocos2d_Sprite_setCenterRect); + oluacls_prop(L, "centerRectNormalized", _olua_fun_cocos2d_Sprite_getCenterRectNormalized, _olua_fun_cocos2d_Sprite_setCenterRectNormalized); + oluacls_prop(L, "dirty", _olua_fun_cocos2d_Sprite_isDirty, _olua_fun_cocos2d_Sprite_setDirty); + oluacls_prop(L, "flippedX", _olua_fun_cocos2d_Sprite_isFlippedX, _olua_fun_cocos2d_Sprite_setFlippedX); + oluacls_prop(L, "flippedY", _olua_fun_cocos2d_Sprite_isFlippedY, _olua_fun_cocos2d_Sprite_setFlippedY); + oluacls_prop(L, "offsetPosition", _olua_fun_cocos2d_Sprite_getOffsetPosition, nullptr); + oluacls_prop(L, "resourceName", _olua_fun_cocos2d_Sprite_getResourceName, nullptr); + oluacls_prop(L, "resourceType", _olua_fun_cocos2d_Sprite_getResourceType, nullptr); + oluacls_prop(L, "spriteFrame", _olua_fun_cocos2d_Sprite_getSpriteFrame, nullptr); + oluacls_prop(L, "stretchEnabled", _olua_fun_cocos2d_Sprite_isStretchEnabled, _olua_fun_cocos2d_Sprite_setStretchEnabled); + oluacls_prop(L, "texture", _olua_fun_cocos2d_Sprite_getTexture, nullptr); + oluacls_prop(L, "textureAtlas", _olua_fun_cocos2d_Sprite_getTextureAtlas, _olua_fun_cocos2d_Sprite_setTextureAtlas); + oluacls_prop(L, "textureRect", _olua_fun_cocos2d_Sprite_getTextureRect, nullptr); + oluacls_prop(L, "textureRectRotated", _olua_fun_cocos2d_Sprite_isTextureRectRotated, nullptr); oluacls_const(L, "INDEX_NOT_INITIALIZED", cocos2d::Sprite::INDEX_NOT_INITIALIZED); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_Sprite(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.Sprite")) { + luaL_error(L, "class not found: cocos2d::Sprite"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_SpriteBatchNode_addSpriteWithoutQuad(lua_State *L) +static int _olua_fun_cocos2d_SpriteBatchNode_addSpriteWithoutQuad(lua_State *L) { olua_startinvoke(L); @@ -36603,7 +38642,7 @@ static int _cocos2d_SpriteBatchNode_addSpriteWithoutQuad(lua_State *L) return num_ret; } -static int _cocos2d_SpriteBatchNode_appendChild(lua_State *L) +static int _olua_fun_cocos2d_SpriteBatchNode_appendChild(lua_State *L) { olua_startinvoke(L); @@ -36621,7 +38660,7 @@ static int _cocos2d_SpriteBatchNode_appendChild(lua_State *L) return 0; } -static int _cocos2d_SpriteBatchNode_as(lua_State *L) +static int _olua_fun_cocos2d_SpriteBatchNode_as(lua_State *L) { olua_startinvoke(L); @@ -36653,7 +38692,7 @@ static int _cocos2d_SpriteBatchNode_as(lua_State *L) return 1; } -static int _cocos2d_SpriteBatchNode_atlasIndexForChild(lua_State *L) +static int _olua_fun_cocos2d_SpriteBatchNode_atlasIndexForChild(lua_State *L) { olua_startinvoke(L); @@ -36674,7 +38713,7 @@ static int _cocos2d_SpriteBatchNode_atlasIndexForChild(lua_State *L) return num_ret; } -static int _cocos2d_SpriteBatchNode_create$1(lua_State *L) +static int _olua_fun_cocos2d_SpriteBatchNode_create$1(lua_State *L) { olua_startinvoke(L); @@ -36693,7 +38732,7 @@ static int _cocos2d_SpriteBatchNode_create$1(lua_State *L) return num_ret; } -static int _cocos2d_SpriteBatchNode_create$2(lua_State *L) +static int _olua_fun_cocos2d_SpriteBatchNode_create$2(lua_State *L) { olua_startinvoke(L); @@ -36701,7 +38740,7 @@ static int _cocos2d_SpriteBatchNode_create$2(lua_State *L) olua_check_string(L, 1, &arg1); - // static cocos2d::SpriteBatchNode *create(const std::string &fileImage, @optional ssize_t capacity) + // static cocos2d::SpriteBatchNode *create(const std::string &fileImage) cocos2d::SpriteBatchNode *ret = cocos2d::SpriteBatchNode::create(arg1); int num_ret = olua_push_object(L, ret, "cc.SpriteBatchNode"); @@ -36710,21 +38749,21 @@ static int _cocos2d_SpriteBatchNode_create$2(lua_State *L) return num_ret; } -static int _cocos2d_SpriteBatchNode_create(lua_State *L) +static int _olua_fun_cocos2d_SpriteBatchNode_create(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 1) { // if ((olua_is_string(L, 1))) { - // static cocos2d::SpriteBatchNode *create(const std::string &fileImage, @optional ssize_t capacity) - return _cocos2d_SpriteBatchNode_create$2(L); + // static cocos2d::SpriteBatchNode *create(const std::string &fileImage) + return _olua_fun_cocos2d_SpriteBatchNode_create$2(L); // } } if (num_args == 2) { // if ((olua_is_string(L, 1)) && (olua_is_integer(L, 2))) { // static cocos2d::SpriteBatchNode *create(const std::string &fileImage, @optional ssize_t capacity) - return _cocos2d_SpriteBatchNode_create$1(L); + return _olua_fun_cocos2d_SpriteBatchNode_create$1(L); // } } @@ -36733,7 +38772,7 @@ static int _cocos2d_SpriteBatchNode_create(lua_State *L) return 0; } -static int _cocos2d_SpriteBatchNode_createWithTexture$1(lua_State *L) +static int _olua_fun_cocos2d_SpriteBatchNode_createWithTexture$1(lua_State *L) { olua_startinvoke(L); @@ -36752,7 +38791,7 @@ static int _cocos2d_SpriteBatchNode_createWithTexture$1(lua_State *L) return num_ret; } -static int _cocos2d_SpriteBatchNode_createWithTexture$2(lua_State *L) +static int _olua_fun_cocos2d_SpriteBatchNode_createWithTexture$2(lua_State *L) { olua_startinvoke(L); @@ -36760,7 +38799,7 @@ static int _cocos2d_SpriteBatchNode_createWithTexture$2(lua_State *L) olua_check_object(L, 1, &arg1, "cc.Texture2D"); - // static cocos2d::SpriteBatchNode *createWithTexture(cocos2d::Texture2D *tex, @optional ssize_t capacity) + // static cocos2d::SpriteBatchNode *createWithTexture(cocos2d::Texture2D *tex) cocos2d::SpriteBatchNode *ret = cocos2d::SpriteBatchNode::createWithTexture(arg1); int num_ret = olua_push_object(L, ret, "cc.SpriteBatchNode"); @@ -36769,21 +38808,21 @@ static int _cocos2d_SpriteBatchNode_createWithTexture$2(lua_State *L) return num_ret; } -static int _cocos2d_SpriteBatchNode_createWithTexture(lua_State *L) +static int _olua_fun_cocos2d_SpriteBatchNode_createWithTexture(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 1) { // if ((olua_is_object(L, 1, "cc.Texture2D"))) { - // static cocos2d::SpriteBatchNode *createWithTexture(cocos2d::Texture2D *tex, @optional ssize_t capacity) - return _cocos2d_SpriteBatchNode_createWithTexture$2(L); + // static cocos2d::SpriteBatchNode *createWithTexture(cocos2d::Texture2D *tex) + return _olua_fun_cocos2d_SpriteBatchNode_createWithTexture$2(L); // } } if (num_args == 2) { // if ((olua_is_object(L, 1, "cc.Texture2D")) && (olua_is_integer(L, 2))) { // static cocos2d::SpriteBatchNode *createWithTexture(cocos2d::Texture2D *tex, @optional ssize_t capacity) - return _cocos2d_SpriteBatchNode_createWithTexture$1(L); + return _olua_fun_cocos2d_SpriteBatchNode_createWithTexture$1(L); // } } @@ -36792,7 +38831,7 @@ static int _cocos2d_SpriteBatchNode_createWithTexture(lua_State *L) return 0; } -static int _cocos2d_SpriteBatchNode_getBlendFunc(lua_State *L) +static int _olua_fun_cocos2d_SpriteBatchNode_getBlendFunc(lua_State *L) { olua_startinvoke(L); @@ -36809,7 +38848,7 @@ static int _cocos2d_SpriteBatchNode_getBlendFunc(lua_State *L) return num_ret; } -static int _cocos2d_SpriteBatchNode_getDescendants(lua_State *L) +static int _olua_fun_cocos2d_SpriteBatchNode_getDescendants(lua_State *L) { olua_startinvoke(L); @@ -36828,7 +38867,7 @@ static int _cocos2d_SpriteBatchNode_getDescendants(lua_State *L) return num_ret; } -static int _cocos2d_SpriteBatchNode_getTexture(lua_State *L) +static int _olua_fun_cocos2d_SpriteBatchNode_getTexture(lua_State *L) { olua_startinvoke(L); @@ -36845,7 +38884,7 @@ static int _cocos2d_SpriteBatchNode_getTexture(lua_State *L) return num_ret; } -static int _cocos2d_SpriteBatchNode_getTextureAtlas(lua_State *L) +static int _olua_fun_cocos2d_SpriteBatchNode_getTextureAtlas(lua_State *L) { olua_startinvoke(L); @@ -36862,7 +38901,7 @@ static int _cocos2d_SpriteBatchNode_getTextureAtlas(lua_State *L) return num_ret; } -static int _cocos2d_SpriteBatchNode_highestAtlasIndexInChild(lua_State *L) +static int _olua_fun_cocos2d_SpriteBatchNode_highestAtlasIndexInChild(lua_State *L) { olua_startinvoke(L); @@ -36881,7 +38920,7 @@ static int _cocos2d_SpriteBatchNode_highestAtlasIndexInChild(lua_State *L) return num_ret; } -static int _cocos2d_SpriteBatchNode_increaseAtlasCapacity(lua_State *L) +static int _olua_fun_cocos2d_SpriteBatchNode_increaseAtlasCapacity(lua_State *L) { olua_startinvoke(L); @@ -36897,7 +38936,7 @@ static int _cocos2d_SpriteBatchNode_increaseAtlasCapacity(lua_State *L) return 0; } -static int _cocos2d_SpriteBatchNode_initWithFile$1(lua_State *L) +static int _olua_fun_cocos2d_SpriteBatchNode_initWithFile$1(lua_State *L) { olua_startinvoke(L); @@ -36918,7 +38957,7 @@ static int _cocos2d_SpriteBatchNode_initWithFile$1(lua_State *L) return num_ret; } -static int _cocos2d_SpriteBatchNode_initWithFile$2(lua_State *L) +static int _olua_fun_cocos2d_SpriteBatchNode_initWithFile$2(lua_State *L) { olua_startinvoke(L); @@ -36928,7 +38967,7 @@ static int _cocos2d_SpriteBatchNode_initWithFile$2(lua_State *L) olua_to_object(L, 1, &self, "cc.SpriteBatchNode"); olua_check_string(L, 2, &arg1); - // bool initWithFile(const std::string &fileImage, @optional ssize_t capacity) + // bool initWithFile(const std::string &fileImage) bool ret = self->initWithFile(arg1); int num_ret = olua_push_bool(L, ret); @@ -36937,21 +38976,21 @@ static int _cocos2d_SpriteBatchNode_initWithFile$2(lua_State *L) return num_ret; } -static int _cocos2d_SpriteBatchNode_initWithFile(lua_State *L) +static int _olua_fun_cocos2d_SpriteBatchNode_initWithFile(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_string(L, 2))) { - // bool initWithFile(const std::string &fileImage, @optional ssize_t capacity) - return _cocos2d_SpriteBatchNode_initWithFile$2(L); + // bool initWithFile(const std::string &fileImage) + return _olua_fun_cocos2d_SpriteBatchNode_initWithFile$2(L); // } } if (num_args == 2) { // if ((olua_is_string(L, 2)) && (olua_is_integer(L, 3))) { // bool initWithFile(const std::string &fileImage, @optional ssize_t capacity) - return _cocos2d_SpriteBatchNode_initWithFile$1(L); + return _olua_fun_cocos2d_SpriteBatchNode_initWithFile$1(L); // } } @@ -36960,7 +38999,7 @@ static int _cocos2d_SpriteBatchNode_initWithFile(lua_State *L) return 0; } -static int _cocos2d_SpriteBatchNode_initWithTexture$1(lua_State *L) +static int _olua_fun_cocos2d_SpriteBatchNode_initWithTexture$1(lua_State *L) { olua_startinvoke(L); @@ -36981,7 +39020,7 @@ static int _cocos2d_SpriteBatchNode_initWithTexture$1(lua_State *L) return num_ret; } -static int _cocos2d_SpriteBatchNode_initWithTexture$2(lua_State *L) +static int _olua_fun_cocos2d_SpriteBatchNode_initWithTexture$2(lua_State *L) { olua_startinvoke(L); @@ -36991,7 +39030,7 @@ static int _cocos2d_SpriteBatchNode_initWithTexture$2(lua_State *L) olua_to_object(L, 1, &self, "cc.SpriteBatchNode"); olua_check_object(L, 2, &arg1, "cc.Texture2D"); - // bool initWithTexture(cocos2d::Texture2D *tex, @optional ssize_t capacity) + // bool initWithTexture(cocos2d::Texture2D *tex) bool ret = self->initWithTexture(arg1); int num_ret = olua_push_bool(L, ret); @@ -37000,21 +39039,21 @@ static int _cocos2d_SpriteBatchNode_initWithTexture$2(lua_State *L) return num_ret; } -static int _cocos2d_SpriteBatchNode_initWithTexture(lua_State *L) +static int _olua_fun_cocos2d_SpriteBatchNode_initWithTexture(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_object(L, 2, "cc.Texture2D"))) { - // bool initWithTexture(cocos2d::Texture2D *tex, @optional ssize_t capacity) - return _cocos2d_SpriteBatchNode_initWithTexture$2(L); + // bool initWithTexture(cocos2d::Texture2D *tex) + return _olua_fun_cocos2d_SpriteBatchNode_initWithTexture$2(L); // } } if (num_args == 2) { // if ((olua_is_object(L, 2, "cc.Texture2D")) && (olua_is_integer(L, 3))) { // bool initWithTexture(cocos2d::Texture2D *tex, @optional ssize_t capacity) - return _cocos2d_SpriteBatchNode_initWithTexture$1(L); + return _olua_fun_cocos2d_SpriteBatchNode_initWithTexture$1(L); // } } @@ -37023,7 +39062,7 @@ static int _cocos2d_SpriteBatchNode_initWithTexture(lua_State *L) return 0; } -static int _cocos2d_SpriteBatchNode_insertQuadFromSprite(lua_State *L) +static int _olua_fun_cocos2d_SpriteBatchNode_insertQuadFromSprite(lua_State *L) { olua_startinvoke(L); @@ -37043,7 +39082,7 @@ static int _cocos2d_SpriteBatchNode_insertQuadFromSprite(lua_State *L) return 0; } -static int _cocos2d_SpriteBatchNode_lowestAtlasIndexInChild(lua_State *L) +static int _olua_fun_cocos2d_SpriteBatchNode_lowestAtlasIndexInChild(lua_State *L) { olua_startinvoke(L); @@ -37062,11 +39101,11 @@ static int _cocos2d_SpriteBatchNode_lowestAtlasIndexInChild(lua_State *L) return num_ret; } -static int _cocos2d_SpriteBatchNode_new(lua_State *L) +static int _olua_fun_cocos2d_SpriteBatchNode_new(lua_State *L) { olua_startinvoke(L); - // SpriteBatchNode() + // cocos2d::SpriteBatchNode() cocos2d::SpriteBatchNode *ret = new cocos2d::SpriteBatchNode(); int num_ret = olua_push_object(L, ret, "cc.SpriteBatchNode"); olua_postnew(L, ret); @@ -37076,7 +39115,7 @@ static int _cocos2d_SpriteBatchNode_new(lua_State *L) return num_ret; } -static int _cocos2d_SpriteBatchNode_rebuildIndexInOrder(lua_State *L) +static int _olua_fun_cocos2d_SpriteBatchNode_rebuildIndexInOrder(lua_State *L) { olua_startinvoke(L); @@ -37097,7 +39136,7 @@ static int _cocos2d_SpriteBatchNode_rebuildIndexInOrder(lua_State *L) return num_ret; } -static int _cocos2d_SpriteBatchNode_removeChildAtIndex(lua_State *L) +static int _olua_fun_cocos2d_SpriteBatchNode_removeChildAtIndex(lua_State *L) { olua_startinvoke(L); @@ -37117,7 +39156,7 @@ static int _cocos2d_SpriteBatchNode_removeChildAtIndex(lua_State *L) return 0; } -static int _cocos2d_SpriteBatchNode_removeSpriteFromAtlas(lua_State *L) +static int _olua_fun_cocos2d_SpriteBatchNode_removeSpriteFromAtlas(lua_State *L) { olua_startinvoke(L); @@ -37135,7 +39174,7 @@ static int _cocos2d_SpriteBatchNode_removeSpriteFromAtlas(lua_State *L) return 0; } -static int _cocos2d_SpriteBatchNode_reorderBatch(lua_State *L) +static int _olua_fun_cocos2d_SpriteBatchNode_reorderBatch(lua_State *L) { olua_startinvoke(L); @@ -37153,7 +39192,7 @@ static int _cocos2d_SpriteBatchNode_reorderBatch(lua_State *L) return 0; } -static int _cocos2d_SpriteBatchNode_reserveCapacity(lua_State *L) +static int _olua_fun_cocos2d_SpriteBatchNode_reserveCapacity(lua_State *L) { olua_startinvoke(L); @@ -37171,25 +39210,25 @@ static int _cocos2d_SpriteBatchNode_reserveCapacity(lua_State *L) return 0; } -static int _cocos2d_SpriteBatchNode_setBlendFunc(lua_State *L) +static int _olua_fun_cocos2d_SpriteBatchNode_setBlendFunc(lua_State *L) { olua_startinvoke(L); cocos2d::SpriteBatchNode *self = nullptr; - cocos2d::BlendFunc arg1; /** blendFunc */ + cocos2d::BlendFunc *arg1; /** blendFunc */ olua_to_object(L, 1, &self, "cc.SpriteBatchNode"); olua_check_object(L, 2, &arg1, "cc.BlendFunc"); // void setBlendFunc(const cocos2d::BlendFunc &blendFunc) - self->setBlendFunc(arg1); + self->setBlendFunc(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_SpriteBatchNode_setTexture(lua_State *L) +static int _olua_fun_cocos2d_SpriteBatchNode_setTexture(lua_State *L) { olua_startinvoke(L); @@ -37207,7 +39246,7 @@ static int _cocos2d_SpriteBatchNode_setTexture(lua_State *L) return 0; } -static int _cocos2d_SpriteBatchNode_setTextureAtlas(lua_State *L) +static int _olua_fun_cocos2d_SpriteBatchNode_setTextureAtlas(lua_State *L) { olua_startinvoke(L); @@ -37225,45 +39264,54 @@ static int _cocos2d_SpriteBatchNode_setTextureAtlas(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_SpriteBatchNode(lua_State *L) +static int _olua_cls_cc_SpriteBatchNode(lua_State *L) { oluacls_class(L, "cc.SpriteBatchNode"); - oluacls_func(L, "addSpriteWithoutQuad", _cocos2d_SpriteBatchNode_addSpriteWithoutQuad); - oluacls_func(L, "appendChild", _cocos2d_SpriteBatchNode_appendChild); - oluacls_func(L, "as", _cocos2d_SpriteBatchNode_as); - oluacls_func(L, "atlasIndexForChild", _cocos2d_SpriteBatchNode_atlasIndexForChild); - oluacls_func(L, "create", _cocos2d_SpriteBatchNode_create); - oluacls_func(L, "createWithTexture", _cocos2d_SpriteBatchNode_createWithTexture); - oluacls_func(L, "getBlendFunc", _cocos2d_SpriteBatchNode_getBlendFunc); - oluacls_func(L, "getDescendants", _cocos2d_SpriteBatchNode_getDescendants); - oluacls_func(L, "getTexture", _cocos2d_SpriteBatchNode_getTexture); - oluacls_func(L, "getTextureAtlas", _cocos2d_SpriteBatchNode_getTextureAtlas); - oluacls_func(L, "highestAtlasIndexInChild", _cocos2d_SpriteBatchNode_highestAtlasIndexInChild); - oluacls_func(L, "increaseAtlasCapacity", _cocos2d_SpriteBatchNode_increaseAtlasCapacity); - oluacls_func(L, "initWithFile", _cocos2d_SpriteBatchNode_initWithFile); - oluacls_func(L, "initWithTexture", _cocos2d_SpriteBatchNode_initWithTexture); - oluacls_func(L, "insertQuadFromSprite", _cocos2d_SpriteBatchNode_insertQuadFromSprite); - oluacls_func(L, "lowestAtlasIndexInChild", _cocos2d_SpriteBatchNode_lowestAtlasIndexInChild); - oluacls_func(L, "new", _cocos2d_SpriteBatchNode_new); - oluacls_func(L, "rebuildIndexInOrder", _cocos2d_SpriteBatchNode_rebuildIndexInOrder); - oluacls_func(L, "removeChildAtIndex", _cocos2d_SpriteBatchNode_removeChildAtIndex); - oluacls_func(L, "removeSpriteFromAtlas", _cocos2d_SpriteBatchNode_removeSpriteFromAtlas); - oluacls_func(L, "reorderBatch", _cocos2d_SpriteBatchNode_reorderBatch); - oluacls_func(L, "reserveCapacity", _cocos2d_SpriteBatchNode_reserveCapacity); - oluacls_func(L, "setBlendFunc", _cocos2d_SpriteBatchNode_setBlendFunc); - oluacls_func(L, "setTexture", _cocos2d_SpriteBatchNode_setTexture); - oluacls_func(L, "setTextureAtlas", _cocos2d_SpriteBatchNode_setTextureAtlas); - oluacls_prop(L, "blendFunc", _cocos2d_SpriteBatchNode_getBlendFunc, _cocos2d_SpriteBatchNode_setBlendFunc); - oluacls_prop(L, "descendants", _cocos2d_SpriteBatchNode_getDescendants, nullptr); - oluacls_prop(L, "texture", _cocos2d_SpriteBatchNode_getTexture, _cocos2d_SpriteBatchNode_setTexture); - oluacls_prop(L, "textureAtlas", _cocos2d_SpriteBatchNode_getTextureAtlas, _cocos2d_SpriteBatchNode_setTextureAtlas); + oluacls_func(L, "addSpriteWithoutQuad", _olua_fun_cocos2d_SpriteBatchNode_addSpriteWithoutQuad); + oluacls_func(L, "appendChild", _olua_fun_cocos2d_SpriteBatchNode_appendChild); + oluacls_func(L, "as", _olua_fun_cocos2d_SpriteBatchNode_as); + oluacls_func(L, "atlasIndexForChild", _olua_fun_cocos2d_SpriteBatchNode_atlasIndexForChild); + oluacls_func(L, "create", _olua_fun_cocos2d_SpriteBatchNode_create); + oluacls_func(L, "createWithTexture", _olua_fun_cocos2d_SpriteBatchNode_createWithTexture); + oluacls_func(L, "getBlendFunc", _olua_fun_cocos2d_SpriteBatchNode_getBlendFunc); + oluacls_func(L, "getDescendants", _olua_fun_cocos2d_SpriteBatchNode_getDescendants); + oluacls_func(L, "getTexture", _olua_fun_cocos2d_SpriteBatchNode_getTexture); + oluacls_func(L, "getTextureAtlas", _olua_fun_cocos2d_SpriteBatchNode_getTextureAtlas); + oluacls_func(L, "highestAtlasIndexInChild", _olua_fun_cocos2d_SpriteBatchNode_highestAtlasIndexInChild); + oluacls_func(L, "increaseAtlasCapacity", _olua_fun_cocos2d_SpriteBatchNode_increaseAtlasCapacity); + oluacls_func(L, "initWithFile", _olua_fun_cocos2d_SpriteBatchNode_initWithFile); + oluacls_func(L, "initWithTexture", _olua_fun_cocos2d_SpriteBatchNode_initWithTexture); + oluacls_func(L, "insertQuadFromSprite", _olua_fun_cocos2d_SpriteBatchNode_insertQuadFromSprite); + oluacls_func(L, "lowestAtlasIndexInChild", _olua_fun_cocos2d_SpriteBatchNode_lowestAtlasIndexInChild); + oluacls_func(L, "new", _olua_fun_cocos2d_SpriteBatchNode_new); + oluacls_func(L, "rebuildIndexInOrder", _olua_fun_cocos2d_SpriteBatchNode_rebuildIndexInOrder); + oluacls_func(L, "removeChildAtIndex", _olua_fun_cocos2d_SpriteBatchNode_removeChildAtIndex); + oluacls_func(L, "removeSpriteFromAtlas", _olua_fun_cocos2d_SpriteBatchNode_removeSpriteFromAtlas); + oluacls_func(L, "reorderBatch", _olua_fun_cocos2d_SpriteBatchNode_reorderBatch); + oluacls_func(L, "reserveCapacity", _olua_fun_cocos2d_SpriteBatchNode_reserveCapacity); + oluacls_func(L, "setBlendFunc", _olua_fun_cocos2d_SpriteBatchNode_setBlendFunc); + oluacls_func(L, "setTexture", _olua_fun_cocos2d_SpriteBatchNode_setTexture); + oluacls_func(L, "setTextureAtlas", _olua_fun_cocos2d_SpriteBatchNode_setTextureAtlas); + oluacls_prop(L, "blendFunc", _olua_fun_cocos2d_SpriteBatchNode_getBlendFunc, _olua_fun_cocos2d_SpriteBatchNode_setBlendFunc); + oluacls_prop(L, "descendants", _olua_fun_cocos2d_SpriteBatchNode_getDescendants, nullptr); + oluacls_prop(L, "texture", _olua_fun_cocos2d_SpriteBatchNode_getTexture, _olua_fun_cocos2d_SpriteBatchNode_setTexture); + oluacls_prop(L, "textureAtlas", _olua_fun_cocos2d_SpriteBatchNode_getTextureAtlas, _olua_fun_cocos2d_SpriteBatchNode_setTextureAtlas); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_SpriteBatchNode(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.SpriteBatchNode")) { + luaL_error(L, "class not found: cocos2d::SpriteBatchNode"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_SpriteFrameCache_addSpriteFrame(lua_State *L) +static int _olua_fun_cocos2d_SpriteFrameCache_addSpriteFrame(lua_State *L) { olua_startinvoke(L); @@ -37283,7 +39331,7 @@ static int _cocos2d_SpriteFrameCache_addSpriteFrame(lua_State *L) return 0; } -static int _cocos2d_SpriteFrameCache_addSpriteFramesWithFile$1(lua_State *L) +static int _olua_fun_cocos2d_SpriteFrameCache_addSpriteFramesWithFile$1(lua_State *L) { olua_startinvoke(L); @@ -37301,7 +39349,7 @@ static int _cocos2d_SpriteFrameCache_addSpriteFramesWithFile$1(lua_State *L) return 0; } -static int _cocos2d_SpriteFrameCache_addSpriteFramesWithFile$2(lua_State *L) +static int _olua_fun_cocos2d_SpriteFrameCache_addSpriteFramesWithFile$2(lua_State *L) { olua_startinvoke(L); @@ -37321,7 +39369,7 @@ static int _cocos2d_SpriteFrameCache_addSpriteFramesWithFile$2(lua_State *L) return 0; } -static int _cocos2d_SpriteFrameCache_addSpriteFramesWithFile$3(lua_State *L) +static int _olua_fun_cocos2d_SpriteFrameCache_addSpriteFramesWithFile$3(lua_State *L) { olua_startinvoke(L); @@ -37341,26 +39389,26 @@ static int _cocos2d_SpriteFrameCache_addSpriteFramesWithFile$3(lua_State *L) return 0; } -static int _cocos2d_SpriteFrameCache_addSpriteFramesWithFile(lua_State *L) +static int _olua_fun_cocos2d_SpriteFrameCache_addSpriteFramesWithFile(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_string(L, 2))) { // void addSpriteFramesWithFile(const std::string &plist) - return _cocos2d_SpriteFrameCache_addSpriteFramesWithFile$1(L); + return _olua_fun_cocos2d_SpriteFrameCache_addSpriteFramesWithFile$1(L); // } } if (num_args == 2) { if ((olua_is_string(L, 2)) && (olua_is_string(L, 3))) { // void addSpriteFramesWithFile(const std::string &plist, const std::string &textureFileName) - return _cocos2d_SpriteFrameCache_addSpriteFramesWithFile$2(L); + return _olua_fun_cocos2d_SpriteFrameCache_addSpriteFramesWithFile$2(L); } // if ((olua_is_string(L, 2)) && (olua_is_object(L, 3, "cc.Texture2D"))) { // void addSpriteFramesWithFile(const std::string &plist, cocos2d::Texture2D *texture) - return _cocos2d_SpriteFrameCache_addSpriteFramesWithFile$3(L); + return _olua_fun_cocos2d_SpriteFrameCache_addSpriteFramesWithFile$3(L); // } } @@ -37369,7 +39417,7 @@ static int _cocos2d_SpriteFrameCache_addSpriteFramesWithFile(lua_State *L) return 0; } -static int _cocos2d_SpriteFrameCache_addSpriteFramesWithFileContent(lua_State *L) +static int _olua_fun_cocos2d_SpriteFrameCache_addSpriteFramesWithFileContent(lua_State *L) { olua_startinvoke(L); @@ -37389,7 +39437,7 @@ static int _cocos2d_SpriteFrameCache_addSpriteFramesWithFileContent(lua_State *L return 0; } -static int _cocos2d_SpriteFrameCache_destroyInstance(lua_State *L) +static int _olua_fun_cocos2d_SpriteFrameCache_destroyInstance(lua_State *L) { olua_startinvoke(L); @@ -37401,7 +39449,7 @@ static int _cocos2d_SpriteFrameCache_destroyInstance(lua_State *L) return 0; } -static int _cocos2d_SpriteFrameCache_getInstance(lua_State *L) +static int _olua_fun_cocos2d_SpriteFrameCache_getInstance(lua_State *L) { olua_startinvoke(L); @@ -37414,7 +39462,7 @@ static int _cocos2d_SpriteFrameCache_getInstance(lua_State *L) return num_ret; } -static int _cocos2d_SpriteFrameCache_getSpriteFrameByName(lua_State *L) +static int _olua_fun_cocos2d_SpriteFrameCache_getSpriteFrameByName(lua_State *L) { olua_startinvoke(L); @@ -37433,7 +39481,7 @@ static int _cocos2d_SpriteFrameCache_getSpriteFrameByName(lua_State *L) return num_ret; } -static int _cocos2d_SpriteFrameCache_init(lua_State *L) +static int _olua_fun_cocos2d_SpriteFrameCache_init(lua_State *L) { olua_startinvoke(L); @@ -37450,7 +39498,7 @@ static int _cocos2d_SpriteFrameCache_init(lua_State *L) return num_ret; } -static int _cocos2d_SpriteFrameCache_isSpriteFramesWithFileLoaded(lua_State *L) +static int _olua_fun_cocos2d_SpriteFrameCache_isSpriteFramesWithFileLoaded(lua_State *L) { olua_startinvoke(L); @@ -37469,7 +39517,7 @@ static int _cocos2d_SpriteFrameCache_isSpriteFramesWithFileLoaded(lua_State *L) return num_ret; } -static int _cocos2d_SpriteFrameCache_reloadTexture(lua_State *L) +static int _olua_fun_cocos2d_SpriteFrameCache_reloadTexture(lua_State *L) { olua_startinvoke(L); @@ -37488,7 +39536,7 @@ static int _cocos2d_SpriteFrameCache_reloadTexture(lua_State *L) return num_ret; } -static int _cocos2d_SpriteFrameCache_removeSpriteFrameByName(lua_State *L) +static int _olua_fun_cocos2d_SpriteFrameCache_removeSpriteFrameByName(lua_State *L) { olua_startinvoke(L); @@ -37506,7 +39554,7 @@ static int _cocos2d_SpriteFrameCache_removeSpriteFrameByName(lua_State *L) return 0; } -static int _cocos2d_SpriteFrameCache_removeSpriteFrames(lua_State *L) +static int _olua_fun_cocos2d_SpriteFrameCache_removeSpriteFrames(lua_State *L) { olua_startinvoke(L); @@ -37522,7 +39570,7 @@ static int _cocos2d_SpriteFrameCache_removeSpriteFrames(lua_State *L) return 0; } -static int _cocos2d_SpriteFrameCache_removeSpriteFramesFromFile(lua_State *L) +static int _olua_fun_cocos2d_SpriteFrameCache_removeSpriteFramesFromFile(lua_State *L) { olua_startinvoke(L); @@ -37540,7 +39588,7 @@ static int _cocos2d_SpriteFrameCache_removeSpriteFramesFromFile(lua_State *L) return 0; } -static int _cocos2d_SpriteFrameCache_removeSpriteFramesFromFileContent(lua_State *L) +static int _olua_fun_cocos2d_SpriteFrameCache_removeSpriteFramesFromFileContent(lua_State *L) { olua_startinvoke(L); @@ -37558,7 +39606,7 @@ static int _cocos2d_SpriteFrameCache_removeSpriteFramesFromFileContent(lua_State return 0; } -static int _cocos2d_SpriteFrameCache_removeSpriteFramesFromTexture(lua_State *L) +static int _olua_fun_cocos2d_SpriteFrameCache_removeSpriteFramesFromTexture(lua_State *L) { olua_startinvoke(L); @@ -37576,7 +39624,7 @@ static int _cocos2d_SpriteFrameCache_removeSpriteFramesFromTexture(lua_State *L) return 0; } -static int _cocos2d_SpriteFrameCache_removeUnusedSpriteFrames(lua_State *L) +static int _olua_fun_cocos2d_SpriteFrameCache_removeUnusedSpriteFrames(lua_State *L) { olua_startinvoke(L); @@ -37592,32 +39640,41 @@ static int _cocos2d_SpriteFrameCache_removeUnusedSpriteFrames(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_SpriteFrameCache(lua_State *L) +static int _olua_cls_cc_SpriteFrameCache(lua_State *L) { oluacls_class(L, "cc.SpriteFrameCache"); - oluacls_func(L, "addSpriteFrame", _cocos2d_SpriteFrameCache_addSpriteFrame); - oluacls_func(L, "addSpriteFramesWithFile", _cocos2d_SpriteFrameCache_addSpriteFramesWithFile); - oluacls_func(L, "addSpriteFramesWithFileContent", _cocos2d_SpriteFrameCache_addSpriteFramesWithFileContent); - oluacls_func(L, "destroyInstance", _cocos2d_SpriteFrameCache_destroyInstance); - oluacls_func(L, "getInstance", _cocos2d_SpriteFrameCache_getInstance); - oluacls_func(L, "getSpriteFrameByName", _cocos2d_SpriteFrameCache_getSpriteFrameByName); - oluacls_func(L, "init", _cocos2d_SpriteFrameCache_init); - oluacls_func(L, "isSpriteFramesWithFileLoaded", _cocos2d_SpriteFrameCache_isSpriteFramesWithFileLoaded); - oluacls_func(L, "reloadTexture", _cocos2d_SpriteFrameCache_reloadTexture); - oluacls_func(L, "removeSpriteFrameByName", _cocos2d_SpriteFrameCache_removeSpriteFrameByName); - oluacls_func(L, "removeSpriteFrames", _cocos2d_SpriteFrameCache_removeSpriteFrames); - oluacls_func(L, "removeSpriteFramesFromFile", _cocos2d_SpriteFrameCache_removeSpriteFramesFromFile); - oluacls_func(L, "removeSpriteFramesFromFileContent", _cocos2d_SpriteFrameCache_removeSpriteFramesFromFileContent); - oluacls_func(L, "removeSpriteFramesFromTexture", _cocos2d_SpriteFrameCache_removeSpriteFramesFromTexture); - oluacls_func(L, "removeUnusedSpriteFrames", _cocos2d_SpriteFrameCache_removeUnusedSpriteFrames); - oluacls_prop(L, "instance", _cocos2d_SpriteFrameCache_getInstance, nullptr); + oluacls_func(L, "addSpriteFrame", _olua_fun_cocos2d_SpriteFrameCache_addSpriteFrame); + oluacls_func(L, "addSpriteFramesWithFile", _olua_fun_cocos2d_SpriteFrameCache_addSpriteFramesWithFile); + oluacls_func(L, "addSpriteFramesWithFileContent", _olua_fun_cocos2d_SpriteFrameCache_addSpriteFramesWithFileContent); + oluacls_func(L, "destroyInstance", _olua_fun_cocos2d_SpriteFrameCache_destroyInstance); + oluacls_func(L, "getInstance", _olua_fun_cocos2d_SpriteFrameCache_getInstance); + oluacls_func(L, "getSpriteFrameByName", _olua_fun_cocos2d_SpriteFrameCache_getSpriteFrameByName); + oluacls_func(L, "init", _olua_fun_cocos2d_SpriteFrameCache_init); + oluacls_func(L, "isSpriteFramesWithFileLoaded", _olua_fun_cocos2d_SpriteFrameCache_isSpriteFramesWithFileLoaded); + oluacls_func(L, "reloadTexture", _olua_fun_cocos2d_SpriteFrameCache_reloadTexture); + oluacls_func(L, "removeSpriteFrameByName", _olua_fun_cocos2d_SpriteFrameCache_removeSpriteFrameByName); + oluacls_func(L, "removeSpriteFrames", _olua_fun_cocos2d_SpriteFrameCache_removeSpriteFrames); + oluacls_func(L, "removeSpriteFramesFromFile", _olua_fun_cocos2d_SpriteFrameCache_removeSpriteFramesFromFile); + oluacls_func(L, "removeSpriteFramesFromFileContent", _olua_fun_cocos2d_SpriteFrameCache_removeSpriteFramesFromFileContent); + oluacls_func(L, "removeSpriteFramesFromTexture", _olua_fun_cocos2d_SpriteFrameCache_removeSpriteFramesFromTexture); + oluacls_func(L, "removeUnusedSpriteFrames", _olua_fun_cocos2d_SpriteFrameCache_removeUnusedSpriteFrames); + oluacls_prop(L, "instance", _olua_fun_cocos2d_SpriteFrameCache_getInstance, nullptr); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_SpriteFrameCache(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.SpriteFrameCache")) { + luaL_error(L, "class not found: cocos2d::SpriteFrameCache"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_AnimationCache_addAnimation(lua_State *L) +static int _olua_fun_cocos2d_AnimationCache_addAnimation(lua_State *L) { olua_startinvoke(L); @@ -37637,7 +39694,7 @@ static int _cocos2d_AnimationCache_addAnimation(lua_State *L) return 0; } -static int _cocos2d_AnimationCache_addAnimationsWithDictionary(lua_State *L) +static int _olua_fun_cocos2d_AnimationCache_addAnimationsWithDictionary(lua_State *L) { olua_startinvoke(L); @@ -37657,7 +39714,7 @@ static int _cocos2d_AnimationCache_addAnimationsWithDictionary(lua_State *L) return 0; } -static int _cocos2d_AnimationCache_addAnimationsWithFile(lua_State *L) +static int _olua_fun_cocos2d_AnimationCache_addAnimationsWithFile(lua_State *L) { olua_startinvoke(L); @@ -37675,7 +39732,7 @@ static int _cocos2d_AnimationCache_addAnimationsWithFile(lua_State *L) return 0; } -static int _cocos2d_AnimationCache_destroyInstance(lua_State *L) +static int _olua_fun_cocos2d_AnimationCache_destroyInstance(lua_State *L) { olua_startinvoke(L); @@ -37687,7 +39744,7 @@ static int _cocos2d_AnimationCache_destroyInstance(lua_State *L) return 0; } -static int _cocos2d_AnimationCache_getAnimation(lua_State *L) +static int _olua_fun_cocos2d_AnimationCache_getAnimation(lua_State *L) { olua_startinvoke(L); @@ -37706,7 +39763,7 @@ static int _cocos2d_AnimationCache_getAnimation(lua_State *L) return num_ret; } -static int _cocos2d_AnimationCache_getInstance(lua_State *L) +static int _olua_fun_cocos2d_AnimationCache_getInstance(lua_State *L) { olua_startinvoke(L); @@ -37719,7 +39776,7 @@ static int _cocos2d_AnimationCache_getInstance(lua_State *L) return num_ret; } -static int _cocos2d_AnimationCache_init(lua_State *L) +static int _olua_fun_cocos2d_AnimationCache_init(lua_State *L) { olua_startinvoke(L); @@ -37736,11 +39793,11 @@ static int _cocos2d_AnimationCache_init(lua_State *L) return num_ret; } -static int _cocos2d_AnimationCache_new(lua_State *L) +static int _olua_fun_cocos2d_AnimationCache_new(lua_State *L) { olua_startinvoke(L); - // AnimationCache() + // cocos2d::AnimationCache() cocos2d::AnimationCache *ret = new cocos2d::AnimationCache(); int num_ret = olua_push_object(L, ret, "cc.AnimationCache"); olua_postnew(L, ret); @@ -37750,7 +39807,7 @@ static int _cocos2d_AnimationCache_new(lua_State *L) return num_ret; } -static int _cocos2d_AnimationCache_removeAnimation(lua_State *L) +static int _olua_fun_cocos2d_AnimationCache_removeAnimation(lua_State *L) { olua_startinvoke(L); @@ -37768,26 +39825,35 @@ static int _cocos2d_AnimationCache_removeAnimation(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_AnimationCache(lua_State *L) +static int _olua_cls_cc_AnimationCache(lua_State *L) { oluacls_class(L, "cc.AnimationCache"); - oluacls_func(L, "addAnimation", _cocos2d_AnimationCache_addAnimation); - oluacls_func(L, "addAnimationsWithDictionary", _cocos2d_AnimationCache_addAnimationsWithDictionary); - oluacls_func(L, "addAnimationsWithFile", _cocos2d_AnimationCache_addAnimationsWithFile); - oluacls_func(L, "destroyInstance", _cocos2d_AnimationCache_destroyInstance); - oluacls_func(L, "getAnimation", _cocos2d_AnimationCache_getAnimation); - oluacls_func(L, "getInstance", _cocos2d_AnimationCache_getInstance); - oluacls_func(L, "init", _cocos2d_AnimationCache_init); - oluacls_func(L, "new", _cocos2d_AnimationCache_new); - oluacls_func(L, "removeAnimation", _cocos2d_AnimationCache_removeAnimation); - oluacls_prop(L, "instance", _cocos2d_AnimationCache_getInstance, nullptr); + oluacls_func(L, "addAnimation", _olua_fun_cocos2d_AnimationCache_addAnimation); + oluacls_func(L, "addAnimationsWithDictionary", _olua_fun_cocos2d_AnimationCache_addAnimationsWithDictionary); + oluacls_func(L, "addAnimationsWithFile", _olua_fun_cocos2d_AnimationCache_addAnimationsWithFile); + oluacls_func(L, "destroyInstance", _olua_fun_cocos2d_AnimationCache_destroyInstance); + oluacls_func(L, "getAnimation", _olua_fun_cocos2d_AnimationCache_getAnimation); + oluacls_func(L, "getInstance", _olua_fun_cocos2d_AnimationCache_getInstance); + oluacls_func(L, "init", _olua_fun_cocos2d_AnimationCache_init); + oluacls_func(L, "new", _olua_fun_cocos2d_AnimationCache_new); + oluacls_func(L, "removeAnimation", _olua_fun_cocos2d_AnimationCache_removeAnimation); + oluacls_prop(L, "instance", _olua_fun_cocos2d_AnimationCache_getInstance, nullptr); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_AnimationCache(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.AnimationCache")) { + luaL_error(L, "class not found: cocos2d::AnimationCache"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_Scene_create(lua_State *L) +static int _olua_fun_cocos2d_Scene_create(lua_State *L) { olua_startinvoke(L); @@ -37801,7 +39867,7 @@ static int _cocos2d_Scene_create(lua_State *L) } #if (CC_USE_PHYSICS || (CC_USE_3D_PHYSICS && CC_ENABLE_BULLET_INTEGRATION)) -static int _cocos2d_Scene_createWithPhysics(lua_State *L) +static int _olua_fun_cocos2d_Scene_createWithPhysics(lua_State *L) { olua_startinvoke(L); @@ -37815,16 +39881,16 @@ static int _cocos2d_Scene_createWithPhysics(lua_State *L) } #endif -static int _cocos2d_Scene_createWithSize(lua_State *L) +static int _olua_fun_cocos2d_Scene_createWithSize(lua_State *L) { olua_startinvoke(L); - cocos2d::Size arg1; /** size */ + cocos2d::Size *arg1; /** size */ olua_check_object(L, 1, &arg1, "cc.Size"); // static cocos2d::Scene *createWithSize(const cocos2d::Size &size) - cocos2d::Scene *ret = cocos2d::Scene::createWithSize(arg1); + cocos2d::Scene *ret = cocos2d::Scene::createWithSize(*arg1); int num_ret = olua_push_object(L, ret, "cc.Scene"); olua_endinvoke(L); @@ -37832,7 +39898,7 @@ static int _cocos2d_Scene_createWithSize(lua_State *L) return num_ret; } -static int _cocos2d_Scene_getCameras(lua_State *L) +static int _olua_fun_cocos2d_Scene_getCameras(lua_State *L) { olua_startinvoke(L); @@ -37851,7 +39917,7 @@ static int _cocos2d_Scene_getCameras(lua_State *L) return num_ret; } -static int _cocos2d_Scene_getDefaultCamera(lua_State *L) +static int _olua_fun_cocos2d_Scene_getDefaultCamera(lua_State *L) { olua_startinvoke(L); @@ -37868,7 +39934,7 @@ static int _cocos2d_Scene_getDefaultCamera(lua_State *L) return num_ret; } -static int _cocos2d_Scene_getLights(lua_State *L) +static int _olua_fun_cocos2d_Scene_getLights(lua_State *L) { olua_startinvoke(L); @@ -37888,7 +39954,7 @@ static int _cocos2d_Scene_getLights(lua_State *L) } #if CC_USE_NAVMESH -static int _cocos2d_Scene_getNavMesh(lua_State *L) +static int _olua_fun_cocos2d_Scene_getNavMesh(lua_State *L) { olua_startinvoke(L); @@ -37907,7 +39973,7 @@ static int _cocos2d_Scene_getNavMesh(lua_State *L) #endif #if CC_USE_PHYSICS -static int _cocos2d_Scene_getPhysicsWorld(lua_State *L) +static int _olua_fun_cocos2d_Scene_getPhysicsWorld(lua_State *L) { olua_startinvoke(L); @@ -37928,18 +39994,18 @@ static int _cocos2d_Scene_getPhysicsWorld(lua_State *L) } #endif -static int _cocos2d_Scene_initWithSize(lua_State *L) +static int _olua_fun_cocos2d_Scene_initWithSize(lua_State *L) { olua_startinvoke(L); cocos2d::Scene *self = nullptr; - cocos2d::Size arg1; /** size */ + cocos2d::Size *arg1; /** size */ olua_to_object(L, 1, &self, "cc.Scene"); olua_check_object(L, 2, &arg1, "cc.Size"); // bool initWithSize(const cocos2d::Size &size) - bool ret = self->initWithSize(arg1); + bool ret = self->initWithSize(*arg1); int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); @@ -37947,11 +40013,11 @@ static int _cocos2d_Scene_initWithSize(lua_State *L) return num_ret; } -static int _cocos2d_Scene_new(lua_State *L) +static int _olua_fun_cocos2d_Scene_new(lua_State *L) { olua_startinvoke(L); - // Scene() + // cocos2d::Scene() cocos2d::Scene *ret = new cocos2d::Scene(); int num_ret = olua_push_object(L, ret, "cc.Scene"); olua_postnew(L, ret); @@ -37961,7 +40027,7 @@ static int _cocos2d_Scene_new(lua_State *L) return num_ret; } -static int _cocos2d_Scene_onProjectionChanged(lua_State *L) +static int _olua_fun_cocos2d_Scene_onProjectionChanged(lua_State *L) { olua_startinvoke(L); @@ -37979,13 +40045,13 @@ static int _cocos2d_Scene_onProjectionChanged(lua_State *L) return 0; } -static int _cocos2d_Scene_render$1(lua_State *L) +static int _olua_fun_cocos2d_Scene_render$1(lua_State *L) { olua_startinvoke(L); cocos2d::Scene *self = nullptr; cocos2d::Renderer *arg1 = nullptr; /** renderer */ - cocos2d::Mat4 arg2; /** eyeTransform */ + cocos2d::Mat4 *arg2; /** eyeTransform */ cocos2d::Mat4 *arg3 = nullptr; /** eyeProjection */ olua_to_object(L, 1, &self, "cc.Scene"); @@ -37994,48 +40060,48 @@ static int _cocos2d_Scene_render$1(lua_State *L) olua_check_object(L, 4, &arg3, "cc.Mat4"); // void render(cocos2d::Renderer *renderer, const cocos2d::Mat4 &eyeTransform, @optional const cocos2d::Mat4 *eyeProjection) - self->render(arg1, arg2, arg3); + self->render(arg1, *arg2, arg3); olua_endinvoke(L); return 0; } -static int _cocos2d_Scene_render$2(lua_State *L) +static int _olua_fun_cocos2d_Scene_render$2(lua_State *L) { olua_startinvoke(L); cocos2d::Scene *self = nullptr; cocos2d::Renderer *arg1 = nullptr; /** renderer */ - cocos2d::Mat4 arg2; /** eyeTransform */ + cocos2d::Mat4 *arg2; /** eyeTransform */ olua_to_object(L, 1, &self, "cc.Scene"); olua_check_object(L, 2, &arg1, "cc.Renderer"); olua_check_object(L, 3, &arg2, "cc.Mat4"); - // void render(cocos2d::Renderer *renderer, const cocos2d::Mat4 &eyeTransform, @optional const cocos2d::Mat4 *eyeProjection) - self->render(arg1, arg2); + // void render(cocos2d::Renderer *renderer, const cocos2d::Mat4 &eyeTransform) + self->render(arg1, *arg2); olua_endinvoke(L); return 0; } -static int _cocos2d_Scene_render(lua_State *L) +static int _olua_fun_cocos2d_Scene_render(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 2) { // if ((olua_is_object(L, 2, "cc.Renderer")) && (olua_is_object(L, 3, "cc.Mat4"))) { - // void render(cocos2d::Renderer *renderer, const cocos2d::Mat4 &eyeTransform, @optional const cocos2d::Mat4 *eyeProjection) - return _cocos2d_Scene_render$2(L); + // void render(cocos2d::Renderer *renderer, const cocos2d::Mat4 &eyeTransform) + return _olua_fun_cocos2d_Scene_render$2(L); // } } if (num_args == 3) { // if ((olua_is_object(L, 2, "cc.Renderer")) && (olua_is_object(L, 3, "cc.Mat4")) && (olua_is_object(L, 4, "cc.Mat4"))) { // void render(cocos2d::Renderer *renderer, const cocos2d::Mat4 &eyeTransform, @optional const cocos2d::Mat4 *eyeProjection) - return _cocos2d_Scene_render$1(L); + return _olua_fun_cocos2d_Scene_render$1(L); // } } @@ -38044,7 +40110,7 @@ static int _cocos2d_Scene_render(lua_State *L) return 0; } -static int _cocos2d_Scene_setCameraOrderDirty(lua_State *L) +static int _olua_fun_cocos2d_Scene_setCameraOrderDirty(lua_State *L) { olua_startinvoke(L); @@ -38061,7 +40127,7 @@ static int _cocos2d_Scene_setCameraOrderDirty(lua_State *L) } #if CC_USE_NAVMESH -static int _cocos2d_Scene_setNavMesh(lua_State *L) +static int _olua_fun_cocos2d_Scene_setNavMesh(lua_State *L) { olua_startinvoke(L); @@ -38081,7 +40147,7 @@ static int _cocos2d_Scene_setNavMesh(lua_State *L) #endif #if CC_USE_NAVMESH -static int _cocos2d_Scene_setNavMeshDebugCamera(lua_State *L) +static int _olua_fun_cocos2d_Scene_setNavMeshDebugCamera(lua_State *L) { olua_startinvoke(L); @@ -38101,7 +40167,7 @@ static int _cocos2d_Scene_setNavMeshDebugCamera(lua_State *L) #endif #if CC_USE_3D_PHYSICS && CC_ENABLE_BULLET_INTEGRATION -static int _cocos2d_Scene_setPhysics3DDebugCamera(lua_State *L) +static int _olua_fun_cocos2d_Scene_setPhysics3DDebugCamera(lua_State *L) { olua_startinvoke(L); @@ -38121,7 +40187,7 @@ static int _cocos2d_Scene_setPhysics3DDebugCamera(lua_State *L) #endif #if (CC_USE_PHYSICS || (CC_USE_3D_PHYSICS && CC_ENABLE_BULLET_INTEGRATION) || CC_USE_NAVMESH) -static int _cocos2d_Scene_stepPhysicsAndNavigation(lua_State *L) +static int _olua_fun_cocos2d_Scene_stepPhysicsAndNavigation(lua_State *L) { olua_startinvoke(L); @@ -38140,56 +40206,65 @@ static int _cocos2d_Scene_stepPhysicsAndNavigation(lua_State *L) } #endif -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_Scene(lua_State *L) +static int _olua_cls_cc_Scene(lua_State *L) { oluacls_class(L, "cc.Scene"); - oluacls_func(L, "create", _cocos2d_Scene_create); + oluacls_func(L, "create", _olua_fun_cocos2d_Scene_create); #if (CC_USE_PHYSICS || (CC_USE_3D_PHYSICS && CC_ENABLE_BULLET_INTEGRATION)) - oluacls_func(L, "createWithPhysics", _cocos2d_Scene_createWithPhysics); + oluacls_func(L, "createWithPhysics", _olua_fun_cocos2d_Scene_createWithPhysics); #endif - oluacls_func(L, "createWithSize", _cocos2d_Scene_createWithSize); - oluacls_func(L, "getCameras", _cocos2d_Scene_getCameras); - oluacls_func(L, "getDefaultCamera", _cocos2d_Scene_getDefaultCamera); - oluacls_func(L, "getLights", _cocos2d_Scene_getLights); + oluacls_func(L, "createWithSize", _olua_fun_cocos2d_Scene_createWithSize); + oluacls_func(L, "getCameras", _olua_fun_cocos2d_Scene_getCameras); + oluacls_func(L, "getDefaultCamera", _olua_fun_cocos2d_Scene_getDefaultCamera); + oluacls_func(L, "getLights", _olua_fun_cocos2d_Scene_getLights); #if CC_USE_NAVMESH - oluacls_func(L, "getNavMesh", _cocos2d_Scene_getNavMesh); + oluacls_func(L, "getNavMesh", _olua_fun_cocos2d_Scene_getNavMesh); #endif #if CC_USE_PHYSICS - oluacls_func(L, "getPhysicsWorld", _cocos2d_Scene_getPhysicsWorld); + oluacls_func(L, "getPhysicsWorld", _olua_fun_cocos2d_Scene_getPhysicsWorld); #endif - oluacls_func(L, "initWithSize", _cocos2d_Scene_initWithSize); - oluacls_func(L, "new", _cocos2d_Scene_new); - oluacls_func(L, "onProjectionChanged", _cocos2d_Scene_onProjectionChanged); - oluacls_func(L, "render", _cocos2d_Scene_render); - oluacls_func(L, "setCameraOrderDirty", _cocos2d_Scene_setCameraOrderDirty); + oluacls_func(L, "initWithSize", _olua_fun_cocos2d_Scene_initWithSize); + oluacls_func(L, "new", _olua_fun_cocos2d_Scene_new); + oluacls_func(L, "onProjectionChanged", _olua_fun_cocos2d_Scene_onProjectionChanged); + oluacls_func(L, "render", _olua_fun_cocos2d_Scene_render); + oluacls_func(L, "setCameraOrderDirty", _olua_fun_cocos2d_Scene_setCameraOrderDirty); #if CC_USE_NAVMESH - oluacls_func(L, "setNavMesh", _cocos2d_Scene_setNavMesh); + oluacls_func(L, "setNavMesh", _olua_fun_cocos2d_Scene_setNavMesh); #endif #if CC_USE_NAVMESH - oluacls_func(L, "setNavMeshDebugCamera", _cocos2d_Scene_setNavMeshDebugCamera); + oluacls_func(L, "setNavMeshDebugCamera", _olua_fun_cocos2d_Scene_setNavMeshDebugCamera); #endif #if CC_USE_3D_PHYSICS && CC_ENABLE_BULLET_INTEGRATION - oluacls_func(L, "setPhysics3DDebugCamera", _cocos2d_Scene_setPhysics3DDebugCamera); + oluacls_func(L, "setPhysics3DDebugCamera", _olua_fun_cocos2d_Scene_setPhysics3DDebugCamera); #endif #if (CC_USE_PHYSICS || (CC_USE_3D_PHYSICS && CC_ENABLE_BULLET_INTEGRATION) || CC_USE_NAVMESH) - oluacls_func(L, "stepPhysicsAndNavigation", _cocos2d_Scene_stepPhysicsAndNavigation); + oluacls_func(L, "stepPhysicsAndNavigation", _olua_fun_cocos2d_Scene_stepPhysicsAndNavigation); #endif - oluacls_prop(L, "cameras", _cocos2d_Scene_getCameras, nullptr); - oluacls_prop(L, "defaultCamera", _cocos2d_Scene_getDefaultCamera, nullptr); - oluacls_prop(L, "lights", _cocos2d_Scene_getLights, nullptr); + oluacls_prop(L, "cameras", _olua_fun_cocos2d_Scene_getCameras, nullptr); + oluacls_prop(L, "defaultCamera", _olua_fun_cocos2d_Scene_getDefaultCamera, nullptr); + oluacls_prop(L, "lights", _olua_fun_cocos2d_Scene_getLights, nullptr); #if CC_USE_NAVMESH - oluacls_prop(L, "navMesh", _cocos2d_Scene_getNavMesh, _cocos2d_Scene_setNavMesh); + oluacls_prop(L, "navMesh", _olua_fun_cocos2d_Scene_getNavMesh, _olua_fun_cocos2d_Scene_setNavMesh); #endif #if CC_USE_PHYSICS - oluacls_prop(L, "physicsWorld", _cocos2d_Scene_getPhysicsWorld, nullptr); + oluacls_prop(L, "physicsWorld", _olua_fun_cocos2d_Scene_getPhysicsWorld, nullptr); #endif return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_Scene(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.Scene")) { + luaL_error(L, "class not found: cocos2d::Scene"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_Layer_create(lua_State *L) +static int _olua_fun_cocos2d_Layer_create(lua_State *L) { olua_startinvoke(L); @@ -38202,11 +40277,11 @@ static int _cocos2d_Layer_create(lua_State *L) return num_ret; } -static int _cocos2d_Layer_new(lua_State *L) +static int _olua_fun_cocos2d_Layer_new(lua_State *L) { olua_startinvoke(L); - // Layer() + // cocos2d::Layer() cocos2d::Layer *ret = new cocos2d::Layer(); int num_ret = olua_push_object(L, ret, "cc.Layer"); olua_postnew(L, ret); @@ -38216,7 +40291,7 @@ static int _cocos2d_Layer_new(lua_State *L) return num_ret; } -static int _cocos2d_Layer_onAcceleration(lua_State *L) +static int _olua_fun_cocos2d_Layer_onAcceleration(lua_State *L) { olua_startinvoke(L); @@ -38236,7 +40311,7 @@ static int _cocos2d_Layer_onAcceleration(lua_State *L) return 0; } -static int _cocos2d_Layer_onKeyPressed(lua_State *L) +static int _olua_fun_cocos2d_Layer_onKeyPressed(lua_State *L) { olua_startinvoke(L); @@ -38256,7 +40331,7 @@ static int _cocos2d_Layer_onKeyPressed(lua_State *L) return 0; } -static int _cocos2d_Layer_onKeyReleased(lua_State *L) +static int _olua_fun_cocos2d_Layer_onKeyReleased(lua_State *L) { olua_startinvoke(L); @@ -38276,7 +40351,7 @@ static int _cocos2d_Layer_onKeyReleased(lua_State *L) return 0; } -static int _cocos2d_Layer_onTouchBegan(lua_State *L) +static int _olua_fun_cocos2d_Layer_onTouchBegan(lua_State *L) { olua_startinvoke(L); @@ -38297,7 +40372,7 @@ static int _cocos2d_Layer_onTouchBegan(lua_State *L) return num_ret; } -static int _cocos2d_Layer_onTouchCancelled(lua_State *L) +static int _olua_fun_cocos2d_Layer_onTouchCancelled(lua_State *L) { olua_startinvoke(L); @@ -38317,7 +40392,7 @@ static int _cocos2d_Layer_onTouchCancelled(lua_State *L) return 0; } -static int _cocos2d_Layer_onTouchEnded(lua_State *L) +static int _olua_fun_cocos2d_Layer_onTouchEnded(lua_State *L) { olua_startinvoke(L); @@ -38337,7 +40412,7 @@ static int _cocos2d_Layer_onTouchEnded(lua_State *L) return 0; } -static int _cocos2d_Layer_onTouchMoved(lua_State *L) +static int _olua_fun_cocos2d_Layer_onTouchMoved(lua_State *L) { olua_startinvoke(L); @@ -38357,7 +40432,7 @@ static int _cocos2d_Layer_onTouchMoved(lua_State *L) return 0; } -static int _cocos2d_Layer_onTouchesBegan(lua_State *L) +static int _olua_fun_cocos2d_Layer_onTouchesBegan(lua_State *L) { olua_startinvoke(L); @@ -38379,7 +40454,7 @@ static int _cocos2d_Layer_onTouchesBegan(lua_State *L) return 0; } -static int _cocos2d_Layer_onTouchesCancelled(lua_State *L) +static int _olua_fun_cocos2d_Layer_onTouchesCancelled(lua_State *L) { olua_startinvoke(L); @@ -38401,7 +40476,7 @@ static int _cocos2d_Layer_onTouchesCancelled(lua_State *L) return 0; } -static int _cocos2d_Layer_onTouchesEnded(lua_State *L) +static int _olua_fun_cocos2d_Layer_onTouchesEnded(lua_State *L) { olua_startinvoke(L); @@ -38423,7 +40498,7 @@ static int _cocos2d_Layer_onTouchesEnded(lua_State *L) return 0; } -static int _cocos2d_Layer_onTouchesMoved(lua_State *L) +static int _olua_fun_cocos2d_Layer_onTouchesMoved(lua_State *L) { olua_startinvoke(L); @@ -38445,29 +40520,38 @@ static int _cocos2d_Layer_onTouchesMoved(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_Layer(lua_State *L) +static int _olua_cls_cc_Layer(lua_State *L) { oluacls_class(L, "cc.Layer"); - oluacls_func(L, "create", _cocos2d_Layer_create); - oluacls_func(L, "new", _cocos2d_Layer_new); - oluacls_func(L, "onAcceleration", _cocos2d_Layer_onAcceleration); - oluacls_func(L, "onKeyPressed", _cocos2d_Layer_onKeyPressed); - oluacls_func(L, "onKeyReleased", _cocos2d_Layer_onKeyReleased); - oluacls_func(L, "onTouchBegan", _cocos2d_Layer_onTouchBegan); - oluacls_func(L, "onTouchCancelled", _cocos2d_Layer_onTouchCancelled); - oluacls_func(L, "onTouchEnded", _cocos2d_Layer_onTouchEnded); - oluacls_func(L, "onTouchMoved", _cocos2d_Layer_onTouchMoved); - oluacls_func(L, "onTouchesBegan", _cocos2d_Layer_onTouchesBegan); - oluacls_func(L, "onTouchesCancelled", _cocos2d_Layer_onTouchesCancelled); - oluacls_func(L, "onTouchesEnded", _cocos2d_Layer_onTouchesEnded); - oluacls_func(L, "onTouchesMoved", _cocos2d_Layer_onTouchesMoved); + oluacls_func(L, "create", _olua_fun_cocos2d_Layer_create); + oluacls_func(L, "new", _olua_fun_cocos2d_Layer_new); + oluacls_func(L, "onAcceleration", _olua_fun_cocos2d_Layer_onAcceleration); + oluacls_func(L, "onKeyPressed", _olua_fun_cocos2d_Layer_onKeyPressed); + oluacls_func(L, "onKeyReleased", _olua_fun_cocos2d_Layer_onKeyReleased); + oluacls_func(L, "onTouchBegan", _olua_fun_cocos2d_Layer_onTouchBegan); + oluacls_func(L, "onTouchCancelled", _olua_fun_cocos2d_Layer_onTouchCancelled); + oluacls_func(L, "onTouchEnded", _olua_fun_cocos2d_Layer_onTouchEnded); + oluacls_func(L, "onTouchMoved", _olua_fun_cocos2d_Layer_onTouchMoved); + oluacls_func(L, "onTouchesBegan", _olua_fun_cocos2d_Layer_onTouchesBegan); + oluacls_func(L, "onTouchesCancelled", _olua_fun_cocos2d_Layer_onTouchesCancelled); + oluacls_func(L, "onTouchesEnded", _olua_fun_cocos2d_Layer_onTouchesEnded); + oluacls_func(L, "onTouchesMoved", _olua_fun_cocos2d_Layer_onTouchesMoved); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_Layer(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.Layer")) { + luaL_error(L, "class not found: cocos2d::Layer"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_LayerColor_as(lua_State *L) +static int _olua_fun_cocos2d_LayerColor_as(lua_State *L) { olua_startinvoke(L); @@ -38495,7 +40579,7 @@ static int _cocos2d_LayerColor_as(lua_State *L) return 1; } -static int _cocos2d_LayerColor_changeHeight(lua_State *L) +static int _olua_fun_cocos2d_LayerColor_changeHeight(lua_State *L) { olua_startinvoke(L); @@ -38513,7 +40597,7 @@ static int _cocos2d_LayerColor_changeHeight(lua_State *L) return 0; } -static int _cocos2d_LayerColor_changeWidth(lua_State *L) +static int _olua_fun_cocos2d_LayerColor_changeWidth(lua_State *L) { olua_startinvoke(L); @@ -38531,7 +40615,7 @@ static int _cocos2d_LayerColor_changeWidth(lua_State *L) return 0; } -static int _cocos2d_LayerColor_changeWidthAndHeight(lua_State *L) +static int _olua_fun_cocos2d_LayerColor_changeWidthAndHeight(lua_State *L) { olua_startinvoke(L); @@ -38551,7 +40635,7 @@ static int _cocos2d_LayerColor_changeWidthAndHeight(lua_State *L) return 0; } -static int _cocos2d_LayerColor_create$1(lua_State *L) +static int _olua_fun_cocos2d_LayerColor_create$1(lua_State *L) { olua_startinvoke(L); @@ -38564,7 +40648,7 @@ static int _cocos2d_LayerColor_create$1(lua_State *L) return num_ret; } -static int _cocos2d_LayerColor_create$2(lua_State *L) +static int _olua_fun_cocos2d_LayerColor_create$2(lua_State *L) { olua_startinvoke(L); @@ -38585,7 +40669,7 @@ static int _cocos2d_LayerColor_create$2(lua_State *L) return num_ret; } -static int _cocos2d_LayerColor_create$3(lua_State *L) +static int _olua_fun_cocos2d_LayerColor_create$3(lua_State *L) { olua_startinvoke(L); @@ -38602,26 +40686,26 @@ static int _cocos2d_LayerColor_create$3(lua_State *L) return num_ret; } -static int _cocos2d_LayerColor_create(lua_State *L) +static int _olua_fun_cocos2d_LayerColor_create(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 0) { // static cocos2d::LayerColor *create() - return _cocos2d_LayerColor_create$1(L); + return _olua_fun_cocos2d_LayerColor_create$1(L); } if (num_args == 1) { // if ((olua_is_cocos2d_Color4B(L, 1))) { // static cocos2d::LayerColor *create(const cocos2d::Color4B &color) - return _cocos2d_LayerColor_create$3(L); + return _olua_fun_cocos2d_LayerColor_create$3(L); // } } if (num_args == 3) { // if ((olua_is_cocos2d_Color4B(L, 1)) && (olua_is_number(L, 2)) && (olua_is_number(L, 3))) { // static cocos2d::LayerColor *create(const cocos2d::Color4B &color, float width, float height) - return _cocos2d_LayerColor_create$2(L); + return _olua_fun_cocos2d_LayerColor_create$2(L); // } } @@ -38630,7 +40714,7 @@ static int _cocos2d_LayerColor_create(lua_State *L) return 0; } -static int _cocos2d_LayerColor_getBlendFunc(lua_State *L) +static int _olua_fun_cocos2d_LayerColor_getBlendFunc(lua_State *L) { olua_startinvoke(L); @@ -38647,7 +40731,7 @@ static int _cocos2d_LayerColor_getBlendFunc(lua_State *L) return num_ret; } -static int _cocos2d_LayerColor_initWithColor$1(lua_State *L) +static int _olua_fun_cocos2d_LayerColor_initWithColor$1(lua_State *L) { olua_startinvoke(L); @@ -38670,7 +40754,7 @@ static int _cocos2d_LayerColor_initWithColor$1(lua_State *L) return num_ret; } -static int _cocos2d_LayerColor_initWithColor$2(lua_State *L) +static int _olua_fun_cocos2d_LayerColor_initWithColor$2(lua_State *L) { olua_startinvoke(L); @@ -38689,21 +40773,21 @@ static int _cocos2d_LayerColor_initWithColor$2(lua_State *L) return num_ret; } -static int _cocos2d_LayerColor_initWithColor(lua_State *L) +static int _olua_fun_cocos2d_LayerColor_initWithColor(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_cocos2d_Color4B(L, 2))) { // bool initWithColor(const cocos2d::Color4B &color) - return _cocos2d_LayerColor_initWithColor$2(L); + return _olua_fun_cocos2d_LayerColor_initWithColor$2(L); // } } if (num_args == 3) { // if ((olua_is_cocos2d_Color4B(L, 2)) && (olua_is_number(L, 3)) && (olua_is_number(L, 4))) { // bool initWithColor(const cocos2d::Color4B &color, float width, float height) - return _cocos2d_LayerColor_initWithColor$1(L); + return _olua_fun_cocos2d_LayerColor_initWithColor$1(L); // } } @@ -38712,11 +40796,11 @@ static int _cocos2d_LayerColor_initWithColor(lua_State *L) return 0; } -static int _cocos2d_LayerColor_new(lua_State *L) +static int _olua_fun_cocos2d_LayerColor_new(lua_State *L) { olua_startinvoke(L); - // LayerColor() + // cocos2d::LayerColor() cocos2d::LayerColor *ret = new cocos2d::LayerColor(); int num_ret = olua_push_object(L, ret, "cc.LayerColor"); olua_postnew(L, ret); @@ -38726,44 +40810,53 @@ static int _cocos2d_LayerColor_new(lua_State *L) return num_ret; } -static int _cocos2d_LayerColor_setBlendFunc(lua_State *L) +static int _olua_fun_cocos2d_LayerColor_setBlendFunc(lua_State *L) { olua_startinvoke(L); cocos2d::LayerColor *self = nullptr; - cocos2d::BlendFunc arg1; /** blendFunc */ + cocos2d::BlendFunc *arg1; /** blendFunc */ olua_to_object(L, 1, &self, "cc.LayerColor"); olua_check_object(L, 2, &arg1, "cc.BlendFunc"); // void setBlendFunc(const cocos2d::BlendFunc &blendFunc) - self->setBlendFunc(arg1); + self->setBlendFunc(*arg1); olua_endinvoke(L); return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_LayerColor(lua_State *L) +static int _olua_cls_cc_LayerColor(lua_State *L) { oluacls_class(L, "cc.LayerColor"); - oluacls_func(L, "as", _cocos2d_LayerColor_as); - oluacls_func(L, "changeHeight", _cocos2d_LayerColor_changeHeight); - oluacls_func(L, "changeWidth", _cocos2d_LayerColor_changeWidth); - oluacls_func(L, "changeWidthAndHeight", _cocos2d_LayerColor_changeWidthAndHeight); - oluacls_func(L, "create", _cocos2d_LayerColor_create); - oluacls_func(L, "getBlendFunc", _cocos2d_LayerColor_getBlendFunc); - oluacls_func(L, "initWithColor", _cocos2d_LayerColor_initWithColor); - oluacls_func(L, "new", _cocos2d_LayerColor_new); - oluacls_func(L, "setBlendFunc", _cocos2d_LayerColor_setBlendFunc); - oluacls_prop(L, "blendFunc", _cocos2d_LayerColor_getBlendFunc, _cocos2d_LayerColor_setBlendFunc); + oluacls_func(L, "as", _olua_fun_cocos2d_LayerColor_as); + oluacls_func(L, "changeHeight", _olua_fun_cocos2d_LayerColor_changeHeight); + oluacls_func(L, "changeWidth", _olua_fun_cocos2d_LayerColor_changeWidth); + oluacls_func(L, "changeWidthAndHeight", _olua_fun_cocos2d_LayerColor_changeWidthAndHeight); + oluacls_func(L, "create", _olua_fun_cocos2d_LayerColor_create); + oluacls_func(L, "getBlendFunc", _olua_fun_cocos2d_LayerColor_getBlendFunc); + oluacls_func(L, "initWithColor", _olua_fun_cocos2d_LayerColor_initWithColor); + oluacls_func(L, "new", _olua_fun_cocos2d_LayerColor_new); + oluacls_func(L, "setBlendFunc", _olua_fun_cocos2d_LayerColor_setBlendFunc); + oluacls_prop(L, "blendFunc", _olua_fun_cocos2d_LayerColor_getBlendFunc, _olua_fun_cocos2d_LayerColor_setBlendFunc); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_LayerColor(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.LayerColor")) { + luaL_error(L, "class not found: cocos2d::LayerColor"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_LayerGradient_create$1(lua_State *L) +static int _olua_fun_cocos2d_LayerGradient_create$1(lua_State *L) { olua_startinvoke(L); @@ -38776,17 +40869,17 @@ static int _cocos2d_LayerGradient_create$1(lua_State *L) return num_ret; } -static int _cocos2d_LayerGradient_create$2(lua_State *L) +static int _olua_fun_cocos2d_LayerGradient_create$2(lua_State *L) { olua_startinvoke(L); cocos2d::Color4B arg1; /** start */ - cocos2d::Color4B arg2; /** end */ + cocos2d::Color4B arg2; /** end_ */ olua_check_cocos2d_Color4B(L, 1, &arg1); olua_check_cocos2d_Color4B(L, 2, &arg2); - // static cocos2d::LayerGradient *create(const cocos2d::Color4B &start, const cocos2d::Color4B &end) + // static cocos2d::LayerGradient *create(const cocos2d::Color4B &start, const cocos2d::Color4B &end_) cocos2d::LayerGradient *ret = cocos2d::LayerGradient::create(arg1, arg2); int num_ret = olua_push_object(L, ret, "cc.LayerGradient"); @@ -38795,20 +40888,20 @@ static int _cocos2d_LayerGradient_create$2(lua_State *L) return num_ret; } -static int _cocos2d_LayerGradient_create$3(lua_State *L) +static int _olua_fun_cocos2d_LayerGradient_create$3(lua_State *L) { olua_startinvoke(L); cocos2d::Color4B arg1; /** start */ - cocos2d::Color4B arg2; /** end */ - cocos2d::Vec2 arg3; /** v */ + cocos2d::Color4B arg2; /** end_ */ + cocos2d::Vec2 *arg3; /** v */ olua_check_cocos2d_Color4B(L, 1, &arg1); olua_check_cocos2d_Color4B(L, 2, &arg2); olua_check_object(L, 3, &arg3, "cc.Vec2"); - // static cocos2d::LayerGradient *create(const cocos2d::Color4B &start, const cocos2d::Color4B &end, const cocos2d::Vec2 &v) - cocos2d::LayerGradient *ret = cocos2d::LayerGradient::create(arg1, arg2, arg3); + // static cocos2d::LayerGradient *create(const cocos2d::Color4B &start, const cocos2d::Color4B &end_, const cocos2d::Vec2 &v) + cocos2d::LayerGradient *ret = cocos2d::LayerGradient::create(arg1, arg2, *arg3); int num_ret = olua_push_object(L, ret, "cc.LayerGradient"); olua_endinvoke(L); @@ -38816,26 +40909,26 @@ static int _cocos2d_LayerGradient_create$3(lua_State *L) return num_ret; } -static int _cocos2d_LayerGradient_create(lua_State *L) +static int _olua_fun_cocos2d_LayerGradient_create(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 0) { // static cocos2d::LayerGradient *create() - return _cocos2d_LayerGradient_create$1(L); + return _olua_fun_cocos2d_LayerGradient_create$1(L); } if (num_args == 2) { // if ((olua_is_cocos2d_Color4B(L, 1)) && (olua_is_cocos2d_Color4B(L, 2))) { - // static cocos2d::LayerGradient *create(const cocos2d::Color4B &start, const cocos2d::Color4B &end) - return _cocos2d_LayerGradient_create$2(L); + // static cocos2d::LayerGradient *create(const cocos2d::Color4B &start, const cocos2d::Color4B &end_) + return _olua_fun_cocos2d_LayerGradient_create$2(L); // } } if (num_args == 3) { // if ((olua_is_cocos2d_Color4B(L, 1)) && (olua_is_cocos2d_Color4B(L, 2)) && (olua_is_object(L, 3, "cc.Vec2"))) { - // static cocos2d::LayerGradient *create(const cocos2d::Color4B &start, const cocos2d::Color4B &end, const cocos2d::Vec2 &v) - return _cocos2d_LayerGradient_create$3(L); + // static cocos2d::LayerGradient *create(const cocos2d::Color4B &start, const cocos2d::Color4B &end_, const cocos2d::Vec2 &v) + return _olua_fun_cocos2d_LayerGradient_create$3(L); // } } @@ -38844,7 +40937,7 @@ static int _cocos2d_LayerGradient_create(lua_State *L) return 0; } -static int _cocos2d_LayerGradient_getEndColor(lua_State *L) +static int _olua_fun_cocos2d_LayerGradient_getEndColor(lua_State *L) { olua_startinvoke(L); @@ -38861,7 +40954,7 @@ static int _cocos2d_LayerGradient_getEndColor(lua_State *L) return num_ret; } -static int _cocos2d_LayerGradient_getEndOpacity(lua_State *L) +static int _olua_fun_cocos2d_LayerGradient_getEndOpacity(lua_State *L) { olua_startinvoke(L); @@ -38878,7 +40971,7 @@ static int _cocos2d_LayerGradient_getEndOpacity(lua_State *L) return num_ret; } -static int _cocos2d_LayerGradient_getStartColor(lua_State *L) +static int _olua_fun_cocos2d_LayerGradient_getStartColor(lua_State *L) { olua_startinvoke(L); @@ -38895,7 +40988,7 @@ static int _cocos2d_LayerGradient_getStartColor(lua_State *L) return num_ret; } -static int _cocos2d_LayerGradient_getStartOpacity(lua_State *L) +static int _olua_fun_cocos2d_LayerGradient_getStartOpacity(lua_State *L) { olua_startinvoke(L); @@ -38912,7 +41005,7 @@ static int _cocos2d_LayerGradient_getStartOpacity(lua_State *L) return num_ret; } -static int _cocos2d_LayerGradient_getVector(lua_State *L) +static int _olua_fun_cocos2d_LayerGradient_getVector(lua_State *L) { olua_startinvoke(L); @@ -38929,19 +41022,19 @@ static int _cocos2d_LayerGradient_getVector(lua_State *L) return num_ret; } -static int _cocos2d_LayerGradient_initWithColor$1(lua_State *L) +static int _olua_fun_cocos2d_LayerGradient_initWithColor$1(lua_State *L) { olua_startinvoke(L); cocos2d::LayerGradient *self = nullptr; cocos2d::Color4B arg1; /** start */ - cocos2d::Color4B arg2; /** end */ + cocos2d::Color4B arg2; /** end_ */ olua_to_object(L, 1, &self, "cc.LayerGradient"); olua_check_cocos2d_Color4B(L, 2, &arg1); olua_check_cocos2d_Color4B(L, 3, &arg2); - // bool initWithColor(const cocos2d::Color4B &start, const cocos2d::Color4B &end) + // bool initWithColor(const cocos2d::Color4B &start, const cocos2d::Color4B &end_) bool ret = self->initWithColor(arg1, arg2); int num_ret = olua_push_bool(L, ret); @@ -38950,22 +41043,22 @@ static int _cocos2d_LayerGradient_initWithColor$1(lua_State *L) return num_ret; } -static int _cocos2d_LayerGradient_initWithColor$2(lua_State *L) +static int _olua_fun_cocos2d_LayerGradient_initWithColor$2(lua_State *L) { olua_startinvoke(L); cocos2d::LayerGradient *self = nullptr; cocos2d::Color4B arg1; /** start */ - cocos2d::Color4B arg2; /** end */ - cocos2d::Vec2 arg3; /** v */ + cocos2d::Color4B arg2; /** end_ */ + cocos2d::Vec2 *arg3; /** v */ olua_to_object(L, 1, &self, "cc.LayerGradient"); olua_check_cocos2d_Color4B(L, 2, &arg1); olua_check_cocos2d_Color4B(L, 3, &arg2); olua_check_object(L, 4, &arg3, "cc.Vec2"); - // bool initWithColor(const cocos2d::Color4B &start, const cocos2d::Color4B &end, const cocos2d::Vec2 &v) - bool ret = self->initWithColor(arg1, arg2, arg3); + // bool initWithColor(const cocos2d::Color4B &start, const cocos2d::Color4B &end_, const cocos2d::Vec2 &v) + bool ret = self->initWithColor(arg1, arg2, *arg3); int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); @@ -38973,21 +41066,21 @@ static int _cocos2d_LayerGradient_initWithColor$2(lua_State *L) return num_ret; } -static int _cocos2d_LayerGradient_initWithColor(lua_State *L) +static int _olua_fun_cocos2d_LayerGradient_initWithColor(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 2) { // if ((olua_is_cocos2d_Color4B(L, 2)) && (olua_is_cocos2d_Color4B(L, 3))) { - // bool initWithColor(const cocos2d::Color4B &start, const cocos2d::Color4B &end) - return _cocos2d_LayerGradient_initWithColor$1(L); + // bool initWithColor(const cocos2d::Color4B &start, const cocos2d::Color4B &end_) + return _olua_fun_cocos2d_LayerGradient_initWithColor$1(L); // } } if (num_args == 3) { // if ((olua_is_cocos2d_Color4B(L, 2)) && (olua_is_cocos2d_Color4B(L, 3)) && (olua_is_object(L, 4, "cc.Vec2"))) { - // bool initWithColor(const cocos2d::Color4B &start, const cocos2d::Color4B &end, const cocos2d::Vec2 &v) - return _cocos2d_LayerGradient_initWithColor$2(L); + // bool initWithColor(const cocos2d::Color4B &start, const cocos2d::Color4B &end_, const cocos2d::Vec2 &v) + return _olua_fun_cocos2d_LayerGradient_initWithColor$2(L); // } } @@ -38996,7 +41089,7 @@ static int _cocos2d_LayerGradient_initWithColor(lua_State *L) return 0; } -static int _cocos2d_LayerGradient_isCompressedInterpolation(lua_State *L) +static int _olua_fun_cocos2d_LayerGradient_isCompressedInterpolation(lua_State *L) { olua_startinvoke(L); @@ -39013,11 +41106,11 @@ static int _cocos2d_LayerGradient_isCompressedInterpolation(lua_State *L) return num_ret; } -static int _cocos2d_LayerGradient_new(lua_State *L) +static int _olua_fun_cocos2d_LayerGradient_new(lua_State *L) { olua_startinvoke(L); - // LayerGradient() + // cocos2d::LayerGradient() cocos2d::LayerGradient *ret = new cocos2d::LayerGradient(); int num_ret = olua_push_object(L, ret, "cc.LayerGradient"); olua_postnew(L, ret); @@ -39027,7 +41120,7 @@ static int _cocos2d_LayerGradient_new(lua_State *L) return num_ret; } -static int _cocos2d_LayerGradient_setCompressedInterpolation(lua_State *L) +static int _olua_fun_cocos2d_LayerGradient_setCompressedInterpolation(lua_State *L) { olua_startinvoke(L); @@ -39045,7 +41138,7 @@ static int _cocos2d_LayerGradient_setCompressedInterpolation(lua_State *L) return 0; } -static int _cocos2d_LayerGradient_setEndColor(lua_State *L) +static int _olua_fun_cocos2d_LayerGradient_setEndColor(lua_State *L) { olua_startinvoke(L); @@ -39063,7 +41156,7 @@ static int _cocos2d_LayerGradient_setEndColor(lua_State *L) return 0; } -static int _cocos2d_LayerGradient_setEndOpacity(lua_State *L) +static int _olua_fun_cocos2d_LayerGradient_setEndOpacity(lua_State *L) { olua_startinvoke(L); @@ -39081,7 +41174,7 @@ static int _cocos2d_LayerGradient_setEndOpacity(lua_State *L) return 0; } -static int _cocos2d_LayerGradient_setStartColor(lua_State *L) +static int _olua_fun_cocos2d_LayerGradient_setStartColor(lua_State *L) { olua_startinvoke(L); @@ -39099,7 +41192,7 @@ static int _cocos2d_LayerGradient_setStartColor(lua_State *L) return 0; } -static int _cocos2d_LayerGradient_setStartOpacity(lua_State *L) +static int _olua_fun_cocos2d_LayerGradient_setStartOpacity(lua_State *L) { olua_startinvoke(L); @@ -39117,62 +41210,71 @@ static int _cocos2d_LayerGradient_setStartOpacity(lua_State *L) return 0; } -static int _cocos2d_LayerGradient_setVector(lua_State *L) +static int _olua_fun_cocos2d_LayerGradient_setVector(lua_State *L) { olua_startinvoke(L); cocos2d::LayerGradient *self = nullptr; - cocos2d::Vec2 arg1; /** alongVector */ + cocos2d::Vec2 *arg1; /** alongVector */ olua_to_object(L, 1, &self, "cc.LayerGradient"); olua_check_object(L, 2, &arg1, "cc.Vec2"); // void setVector(const cocos2d::Vec2 &alongVector) - self->setVector(arg1); + self->setVector(*arg1); olua_endinvoke(L); return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_LayerGradient(lua_State *L) +static int _olua_cls_cc_LayerGradient(lua_State *L) { oluacls_class(L, "cc.LayerGradient"); - oluacls_func(L, "create", _cocos2d_LayerGradient_create); - oluacls_func(L, "getEndColor", _cocos2d_LayerGradient_getEndColor); - oluacls_func(L, "getEndOpacity", _cocos2d_LayerGradient_getEndOpacity); - oluacls_func(L, "getStartColor", _cocos2d_LayerGradient_getStartColor); - oluacls_func(L, "getStartOpacity", _cocos2d_LayerGradient_getStartOpacity); - oluacls_func(L, "getVector", _cocos2d_LayerGradient_getVector); - oluacls_func(L, "initWithColor", _cocos2d_LayerGradient_initWithColor); - oluacls_func(L, "isCompressedInterpolation", _cocos2d_LayerGradient_isCompressedInterpolation); - oluacls_func(L, "new", _cocos2d_LayerGradient_new); - oluacls_func(L, "setCompressedInterpolation", _cocos2d_LayerGradient_setCompressedInterpolation); - oluacls_func(L, "setEndColor", _cocos2d_LayerGradient_setEndColor); - oluacls_func(L, "setEndOpacity", _cocos2d_LayerGradient_setEndOpacity); - oluacls_func(L, "setStartColor", _cocos2d_LayerGradient_setStartColor); - oluacls_func(L, "setStartOpacity", _cocos2d_LayerGradient_setStartOpacity); - oluacls_func(L, "setVector", _cocos2d_LayerGradient_setVector); - oluacls_prop(L, "compressedInterpolation", _cocos2d_LayerGradient_isCompressedInterpolation, _cocos2d_LayerGradient_setCompressedInterpolation); - oluacls_prop(L, "endColor", _cocos2d_LayerGradient_getEndColor, _cocos2d_LayerGradient_setEndColor); - oluacls_prop(L, "endOpacity", _cocos2d_LayerGradient_getEndOpacity, _cocos2d_LayerGradient_setEndOpacity); - oluacls_prop(L, "startColor", _cocos2d_LayerGradient_getStartColor, _cocos2d_LayerGradient_setStartColor); - oluacls_prop(L, "startOpacity", _cocos2d_LayerGradient_getStartOpacity, _cocos2d_LayerGradient_setStartOpacity); - oluacls_prop(L, "vector", _cocos2d_LayerGradient_getVector, _cocos2d_LayerGradient_setVector); + oluacls_func(L, "create", _olua_fun_cocos2d_LayerGradient_create); + oluacls_func(L, "getEndColor", _olua_fun_cocos2d_LayerGradient_getEndColor); + oluacls_func(L, "getEndOpacity", _olua_fun_cocos2d_LayerGradient_getEndOpacity); + oluacls_func(L, "getStartColor", _olua_fun_cocos2d_LayerGradient_getStartColor); + oluacls_func(L, "getStartOpacity", _olua_fun_cocos2d_LayerGradient_getStartOpacity); + oluacls_func(L, "getVector", _olua_fun_cocos2d_LayerGradient_getVector); + oluacls_func(L, "initWithColor", _olua_fun_cocos2d_LayerGradient_initWithColor); + oluacls_func(L, "isCompressedInterpolation", _olua_fun_cocos2d_LayerGradient_isCompressedInterpolation); + oluacls_func(L, "new", _olua_fun_cocos2d_LayerGradient_new); + oluacls_func(L, "setCompressedInterpolation", _olua_fun_cocos2d_LayerGradient_setCompressedInterpolation); + oluacls_func(L, "setEndColor", _olua_fun_cocos2d_LayerGradient_setEndColor); + oluacls_func(L, "setEndOpacity", _olua_fun_cocos2d_LayerGradient_setEndOpacity); + oluacls_func(L, "setStartColor", _olua_fun_cocos2d_LayerGradient_setStartColor); + oluacls_func(L, "setStartOpacity", _olua_fun_cocos2d_LayerGradient_setStartOpacity); + oluacls_func(L, "setVector", _olua_fun_cocos2d_LayerGradient_setVector); + oluacls_prop(L, "compressedInterpolation", _olua_fun_cocos2d_LayerGradient_isCompressedInterpolation, _olua_fun_cocos2d_LayerGradient_setCompressedInterpolation); + oluacls_prop(L, "endColor", _olua_fun_cocos2d_LayerGradient_getEndColor, _olua_fun_cocos2d_LayerGradient_setEndColor); + oluacls_prop(L, "endOpacity", _olua_fun_cocos2d_LayerGradient_getEndOpacity, _olua_fun_cocos2d_LayerGradient_setEndOpacity); + oluacls_prop(L, "startColor", _olua_fun_cocos2d_LayerGradient_getStartColor, _olua_fun_cocos2d_LayerGradient_setStartColor); + oluacls_prop(L, "startOpacity", _olua_fun_cocos2d_LayerGradient_getStartOpacity, _olua_fun_cocos2d_LayerGradient_setStartOpacity); + oluacls_prop(L, "vector", _olua_fun_cocos2d_LayerGradient_getVector, _olua_fun_cocos2d_LayerGradient_setVector); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_LayerGradient(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.LayerGradient")) { + luaL_error(L, "class not found: cocos2d::LayerGradient"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_LayerRadialGradient_create$1(lua_State *L) +static int _olua_fun_cocos2d_LayerRadialGradient_create$1(lua_State *L) { olua_startinvoke(L); cocos2d::Color4B arg1; /** startColor */ cocos2d::Color4B arg2; /** endColor */ float arg3 = 0; /** radius */ - cocos2d::Vec2 arg4; /** center */ + cocos2d::Vec2 *arg4; /** center */ float arg5 = 0; /** expand */ olua_check_cocos2d_Color4B(L, 1, &arg1); @@ -39182,7 +41284,7 @@ static int _cocos2d_LayerRadialGradient_create$1(lua_State *L) olua_check_number(L, 5, &arg5); // static cocos2d::LayerRadialGradient *create(const cocos2d::Color4B &startColor, const cocos2d::Color4B &endColor, float radius, const cocos2d::Vec2 ¢er, float expand) - cocos2d::LayerRadialGradient *ret = cocos2d::LayerRadialGradient::create(arg1, arg2, arg3, arg4, arg5); + cocos2d::LayerRadialGradient *ret = cocos2d::LayerRadialGradient::create(arg1, arg2, arg3, *arg4, arg5); int num_ret = olua_push_object(L, ret, "cc.LayerRadialGradient"); olua_endinvoke(L); @@ -39190,7 +41292,7 @@ static int _cocos2d_LayerRadialGradient_create$1(lua_State *L) return num_ret; } -static int _cocos2d_LayerRadialGradient_create$2(lua_State *L) +static int _olua_fun_cocos2d_LayerRadialGradient_create$2(lua_State *L) { olua_startinvoke(L); @@ -39203,19 +41305,19 @@ static int _cocos2d_LayerRadialGradient_create$2(lua_State *L) return num_ret; } -static int _cocos2d_LayerRadialGradient_create(lua_State *L) +static int _olua_fun_cocos2d_LayerRadialGradient_create(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 0) { // static cocos2d::LayerRadialGradient *create() - return _cocos2d_LayerRadialGradient_create$2(L); + return _olua_fun_cocos2d_LayerRadialGradient_create$2(L); } if (num_args == 5) { // if ((olua_is_cocos2d_Color4B(L, 1)) && (olua_is_cocos2d_Color4B(L, 2)) && (olua_is_number(L, 3)) && (olua_is_object(L, 4, "cc.Vec2")) && (olua_is_number(L, 5))) { // static cocos2d::LayerRadialGradient *create(const cocos2d::Color4B &startColor, const cocos2d::Color4B &endColor, float radius, const cocos2d::Vec2 ¢er, float expand) - return _cocos2d_LayerRadialGradient_create$1(L); + return _olua_fun_cocos2d_LayerRadialGradient_create$1(L); // } } @@ -39224,7 +41326,7 @@ static int _cocos2d_LayerRadialGradient_create(lua_State *L) return 0; } -static int _cocos2d_LayerRadialGradient_getBlendFunc(lua_State *L) +static int _olua_fun_cocos2d_LayerRadialGradient_getBlendFunc(lua_State *L) { olua_startinvoke(L); @@ -39234,14 +41336,14 @@ static int _cocos2d_LayerRadialGradient_getBlendFunc(lua_State *L) // cocos2d::BlendFunc getBlendFunc() cocos2d::BlendFunc ret = self->getBlendFunc(); - int num_ret = olua_pushcopy_object(L, ret, "cc.BlendFunc"); + int num_ret = olua_copy_object(L, ret, "cc.BlendFunc"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_LayerRadialGradient_getCenter(lua_State *L) +static int _olua_fun_cocos2d_LayerRadialGradient_getCenter(lua_State *L) { olua_startinvoke(L); @@ -39251,14 +41353,14 @@ static int _cocos2d_LayerRadialGradient_getCenter(lua_State *L) // cocos2d::Vec2 getCenter() cocos2d::Vec2 ret = self->getCenter(); - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec2"); + int num_ret = olua_copy_object(L, ret, "cc.Vec2"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_LayerRadialGradient_getEndColor(lua_State *L) +static int _olua_fun_cocos2d_LayerRadialGradient_getEndColor(lua_State *L) { olua_startinvoke(L); @@ -39275,7 +41377,7 @@ static int _cocos2d_LayerRadialGradient_getEndColor(lua_State *L) return num_ret; } -static int _cocos2d_LayerRadialGradient_getEndColor3B(lua_State *L) +static int _olua_fun_cocos2d_LayerRadialGradient_getEndColor3B(lua_State *L) { olua_startinvoke(L); @@ -39292,7 +41394,7 @@ static int _cocos2d_LayerRadialGradient_getEndColor3B(lua_State *L) return num_ret; } -static int _cocos2d_LayerRadialGradient_getEndOpacity(lua_State *L) +static int _olua_fun_cocos2d_LayerRadialGradient_getEndOpacity(lua_State *L) { olua_startinvoke(L); @@ -39309,7 +41411,7 @@ static int _cocos2d_LayerRadialGradient_getEndOpacity(lua_State *L) return num_ret; } -static int _cocos2d_LayerRadialGradient_getExpand(lua_State *L) +static int _olua_fun_cocos2d_LayerRadialGradient_getExpand(lua_State *L) { olua_startinvoke(L); @@ -39326,7 +41428,7 @@ static int _cocos2d_LayerRadialGradient_getExpand(lua_State *L) return num_ret; } -static int _cocos2d_LayerRadialGradient_getRadius(lua_State *L) +static int _olua_fun_cocos2d_LayerRadialGradient_getRadius(lua_State *L) { olua_startinvoke(L); @@ -39343,7 +41445,7 @@ static int _cocos2d_LayerRadialGradient_getRadius(lua_State *L) return num_ret; } -static int _cocos2d_LayerRadialGradient_getStartColor(lua_State *L) +static int _olua_fun_cocos2d_LayerRadialGradient_getStartColor(lua_State *L) { olua_startinvoke(L); @@ -39360,7 +41462,7 @@ static int _cocos2d_LayerRadialGradient_getStartColor(lua_State *L) return num_ret; } -static int _cocos2d_LayerRadialGradient_getStartColor3B(lua_State *L) +static int _olua_fun_cocos2d_LayerRadialGradient_getStartColor3B(lua_State *L) { olua_startinvoke(L); @@ -39377,7 +41479,7 @@ static int _cocos2d_LayerRadialGradient_getStartColor3B(lua_State *L) return num_ret; } -static int _cocos2d_LayerRadialGradient_getStartOpacity(lua_State *L) +static int _olua_fun_cocos2d_LayerRadialGradient_getStartOpacity(lua_State *L) { olua_startinvoke(L); @@ -39394,7 +41496,7 @@ static int _cocos2d_LayerRadialGradient_getStartOpacity(lua_State *L) return num_ret; } -static int _cocos2d_LayerRadialGradient_initWithColor(lua_State *L) +static int _olua_fun_cocos2d_LayerRadialGradient_initWithColor(lua_State *L) { olua_startinvoke(L); @@ -39402,7 +41504,7 @@ static int _cocos2d_LayerRadialGradient_initWithColor(lua_State *L) cocos2d::Color4B arg1; /** startColor */ cocos2d::Color4B arg2; /** endColor */ float arg3 = 0; /** radius */ - cocos2d::Vec2 arg4; /** center */ + cocos2d::Vec2 *arg4; /** center */ float arg5 = 0; /** expand */ olua_to_object(L, 1, &self, "cc.LayerRadialGradient"); @@ -39413,7 +41515,7 @@ static int _cocos2d_LayerRadialGradient_initWithColor(lua_State *L) olua_check_number(L, 6, &arg5); // bool initWithColor(const cocos2d::Color4B &startColor, const cocos2d::Color4B &endColor, float radius, const cocos2d::Vec2 ¢er, float expand) - bool ret = self->initWithColor(arg1, arg2, arg3, arg4, arg5); + bool ret = self->initWithColor(arg1, arg2, arg3, *arg4, arg5); int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); @@ -39421,11 +41523,11 @@ static int _cocos2d_LayerRadialGradient_initWithColor(lua_State *L) return num_ret; } -static int _cocos2d_LayerRadialGradient_new(lua_State *L) +static int _olua_fun_cocos2d_LayerRadialGradient_new(lua_State *L) { olua_startinvoke(L); - // LayerRadialGradient() + // cocos2d::LayerRadialGradient() cocos2d::LayerRadialGradient *ret = new cocos2d::LayerRadialGradient(); int num_ret = olua_push_object(L, ret, "cc.LayerRadialGradient"); olua_postnew(L, ret); @@ -39435,43 +41537,43 @@ static int _cocos2d_LayerRadialGradient_new(lua_State *L) return num_ret; } -static int _cocos2d_LayerRadialGradient_setBlendFunc(lua_State *L) +static int _olua_fun_cocos2d_LayerRadialGradient_setBlendFunc(lua_State *L) { olua_startinvoke(L); cocos2d::LayerRadialGradient *self = nullptr; - cocos2d::BlendFunc arg1; /** blendFunc */ + cocos2d::BlendFunc *arg1; /** blendFunc */ olua_to_object(L, 1, &self, "cc.LayerRadialGradient"); olua_check_object(L, 2, &arg1, "cc.BlendFunc"); // void setBlendFunc(const cocos2d::BlendFunc &blendFunc) - self->setBlendFunc(arg1); + self->setBlendFunc(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_LayerRadialGradient_setCenter(lua_State *L) +static int _olua_fun_cocos2d_LayerRadialGradient_setCenter(lua_State *L) { olua_startinvoke(L); cocos2d::LayerRadialGradient *self = nullptr; - cocos2d::Vec2 arg1; /** center */ + cocos2d::Vec2 *arg1; /** center */ olua_to_object(L, 1, &self, "cc.LayerRadialGradient"); olua_check_object(L, 2, &arg1, "cc.Vec2"); // void setCenter(const cocos2d::Vec2 ¢er) - self->setCenter(arg1); + self->setCenter(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_LayerRadialGradient_setEndColor$1(lua_State *L) +static int _olua_fun_cocos2d_LayerRadialGradient_setEndColor$1(lua_State *L) { olua_startinvoke(L); @@ -39489,7 +41591,7 @@ static int _cocos2d_LayerRadialGradient_setEndColor$1(lua_State *L) return 0; } -static int _cocos2d_LayerRadialGradient_setEndColor$2(lua_State *L) +static int _olua_fun_cocos2d_LayerRadialGradient_setEndColor$2(lua_State *L) { olua_startinvoke(L); @@ -39507,19 +41609,19 @@ static int _cocos2d_LayerRadialGradient_setEndColor$2(lua_State *L) return 0; } -static int _cocos2d_LayerRadialGradient_setEndColor(lua_State *L) +static int _olua_fun_cocos2d_LayerRadialGradient_setEndColor(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { if ((olua_is_cocos2d_Color3B(L, 2))) { // void setEndColor(const cocos2d::Color3B &color) - return _cocos2d_LayerRadialGradient_setEndColor$1(L); + return _olua_fun_cocos2d_LayerRadialGradient_setEndColor$1(L); } // if ((olua_is_cocos2d_Color4B(L, 2))) { // void setEndColor(const cocos2d::Color4B &color) - return _cocos2d_LayerRadialGradient_setEndColor$2(L); + return _olua_fun_cocos2d_LayerRadialGradient_setEndColor$2(L); // } } @@ -39528,7 +41630,7 @@ static int _cocos2d_LayerRadialGradient_setEndColor(lua_State *L) return 0; } -static int _cocos2d_LayerRadialGradient_setEndOpacity(lua_State *L) +static int _olua_fun_cocos2d_LayerRadialGradient_setEndOpacity(lua_State *L) { olua_startinvoke(L); @@ -39546,7 +41648,7 @@ static int _cocos2d_LayerRadialGradient_setEndOpacity(lua_State *L) return 0; } -static int _cocos2d_LayerRadialGradient_setExpand(lua_State *L) +static int _olua_fun_cocos2d_LayerRadialGradient_setExpand(lua_State *L) { olua_startinvoke(L); @@ -39564,7 +41666,7 @@ static int _cocos2d_LayerRadialGradient_setExpand(lua_State *L) return 0; } -static int _cocos2d_LayerRadialGradient_setRadius(lua_State *L) +static int _olua_fun_cocos2d_LayerRadialGradient_setRadius(lua_State *L) { olua_startinvoke(L); @@ -39582,7 +41684,7 @@ static int _cocos2d_LayerRadialGradient_setRadius(lua_State *L) return 0; } -static int _cocos2d_LayerRadialGradient_setStartColor$1(lua_State *L) +static int _olua_fun_cocos2d_LayerRadialGradient_setStartColor$1(lua_State *L) { olua_startinvoke(L); @@ -39600,7 +41702,7 @@ static int _cocos2d_LayerRadialGradient_setStartColor$1(lua_State *L) return 0; } -static int _cocos2d_LayerRadialGradient_setStartColor$2(lua_State *L) +static int _olua_fun_cocos2d_LayerRadialGradient_setStartColor$2(lua_State *L) { olua_startinvoke(L); @@ -39618,19 +41720,19 @@ static int _cocos2d_LayerRadialGradient_setStartColor$2(lua_State *L) return 0; } -static int _cocos2d_LayerRadialGradient_setStartColor(lua_State *L) +static int _olua_fun_cocos2d_LayerRadialGradient_setStartColor(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { if ((olua_is_cocos2d_Color3B(L, 2))) { // void setStartColor(const cocos2d::Color3B &color) - return _cocos2d_LayerRadialGradient_setStartColor$1(L); + return _olua_fun_cocos2d_LayerRadialGradient_setStartColor$1(L); } // if ((olua_is_cocos2d_Color4B(L, 2))) { // void setStartColor(const cocos2d::Color4B &color) - return _cocos2d_LayerRadialGradient_setStartColor$2(L); + return _olua_fun_cocos2d_LayerRadialGradient_setStartColor$2(L); // } } @@ -39639,7 +41741,7 @@ static int _cocos2d_LayerRadialGradient_setStartColor(lua_State *L) return 0; } -static int _cocos2d_LayerRadialGradient_setStartOpacity(lua_State *L) +static int _olua_fun_cocos2d_LayerRadialGradient_setStartOpacity(lua_State *L) { olua_startinvoke(L); @@ -39657,47 +41759,56 @@ static int _cocos2d_LayerRadialGradient_setStartOpacity(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_LayerRadialGradient(lua_State *L) +static int _olua_cls_cc_LayerRadialGradient(lua_State *L) { oluacls_class(L, "cc.LayerRadialGradient"); - oluacls_func(L, "create", _cocos2d_LayerRadialGradient_create); - oluacls_func(L, "getBlendFunc", _cocos2d_LayerRadialGradient_getBlendFunc); - oluacls_func(L, "getCenter", _cocos2d_LayerRadialGradient_getCenter); - oluacls_func(L, "getEndColor", _cocos2d_LayerRadialGradient_getEndColor); - oluacls_func(L, "getEndColor3B", _cocos2d_LayerRadialGradient_getEndColor3B); - oluacls_func(L, "getEndOpacity", _cocos2d_LayerRadialGradient_getEndOpacity); - oluacls_func(L, "getExpand", _cocos2d_LayerRadialGradient_getExpand); - oluacls_func(L, "getRadius", _cocos2d_LayerRadialGradient_getRadius); - oluacls_func(L, "getStartColor", _cocos2d_LayerRadialGradient_getStartColor); - oluacls_func(L, "getStartColor3B", _cocos2d_LayerRadialGradient_getStartColor3B); - oluacls_func(L, "getStartOpacity", _cocos2d_LayerRadialGradient_getStartOpacity); - oluacls_func(L, "initWithColor", _cocos2d_LayerRadialGradient_initWithColor); - oluacls_func(L, "new", _cocos2d_LayerRadialGradient_new); - oluacls_func(L, "setBlendFunc", _cocos2d_LayerRadialGradient_setBlendFunc); - oluacls_func(L, "setCenter", _cocos2d_LayerRadialGradient_setCenter); - oluacls_func(L, "setEndColor", _cocos2d_LayerRadialGradient_setEndColor); - oluacls_func(L, "setEndOpacity", _cocos2d_LayerRadialGradient_setEndOpacity); - oluacls_func(L, "setExpand", _cocos2d_LayerRadialGradient_setExpand); - oluacls_func(L, "setRadius", _cocos2d_LayerRadialGradient_setRadius); - oluacls_func(L, "setStartColor", _cocos2d_LayerRadialGradient_setStartColor); - oluacls_func(L, "setStartOpacity", _cocos2d_LayerRadialGradient_setStartOpacity); - oluacls_prop(L, "blendFunc", _cocos2d_LayerRadialGradient_getBlendFunc, _cocos2d_LayerRadialGradient_setBlendFunc); - oluacls_prop(L, "center", _cocos2d_LayerRadialGradient_getCenter, _cocos2d_LayerRadialGradient_setCenter); - oluacls_prop(L, "endColor", _cocos2d_LayerRadialGradient_getEndColor, _cocos2d_LayerRadialGradient_setEndColor); - oluacls_prop(L, "endColor3B", _cocos2d_LayerRadialGradient_getEndColor3B, nullptr); - oluacls_prop(L, "endOpacity", _cocos2d_LayerRadialGradient_getEndOpacity, _cocos2d_LayerRadialGradient_setEndOpacity); - oluacls_prop(L, "expand", _cocos2d_LayerRadialGradient_getExpand, _cocos2d_LayerRadialGradient_setExpand); - oluacls_prop(L, "radius", _cocos2d_LayerRadialGradient_getRadius, _cocos2d_LayerRadialGradient_setRadius); - oluacls_prop(L, "startColor", _cocos2d_LayerRadialGradient_getStartColor, _cocos2d_LayerRadialGradient_setStartColor); - oluacls_prop(L, "startColor3B", _cocos2d_LayerRadialGradient_getStartColor3B, nullptr); - oluacls_prop(L, "startOpacity", _cocos2d_LayerRadialGradient_getStartOpacity, _cocos2d_LayerRadialGradient_setStartOpacity); + oluacls_func(L, "create", _olua_fun_cocos2d_LayerRadialGradient_create); + oluacls_func(L, "getBlendFunc", _olua_fun_cocos2d_LayerRadialGradient_getBlendFunc); + oluacls_func(L, "getCenter", _olua_fun_cocos2d_LayerRadialGradient_getCenter); + oluacls_func(L, "getEndColor", _olua_fun_cocos2d_LayerRadialGradient_getEndColor); + oluacls_func(L, "getEndColor3B", _olua_fun_cocos2d_LayerRadialGradient_getEndColor3B); + oluacls_func(L, "getEndOpacity", _olua_fun_cocos2d_LayerRadialGradient_getEndOpacity); + oluacls_func(L, "getExpand", _olua_fun_cocos2d_LayerRadialGradient_getExpand); + oluacls_func(L, "getRadius", _olua_fun_cocos2d_LayerRadialGradient_getRadius); + oluacls_func(L, "getStartColor", _olua_fun_cocos2d_LayerRadialGradient_getStartColor); + oluacls_func(L, "getStartColor3B", _olua_fun_cocos2d_LayerRadialGradient_getStartColor3B); + oluacls_func(L, "getStartOpacity", _olua_fun_cocos2d_LayerRadialGradient_getStartOpacity); + oluacls_func(L, "initWithColor", _olua_fun_cocos2d_LayerRadialGradient_initWithColor); + oluacls_func(L, "new", _olua_fun_cocos2d_LayerRadialGradient_new); + oluacls_func(L, "setBlendFunc", _olua_fun_cocos2d_LayerRadialGradient_setBlendFunc); + oluacls_func(L, "setCenter", _olua_fun_cocos2d_LayerRadialGradient_setCenter); + oluacls_func(L, "setEndColor", _olua_fun_cocos2d_LayerRadialGradient_setEndColor); + oluacls_func(L, "setEndOpacity", _olua_fun_cocos2d_LayerRadialGradient_setEndOpacity); + oluacls_func(L, "setExpand", _olua_fun_cocos2d_LayerRadialGradient_setExpand); + oluacls_func(L, "setRadius", _olua_fun_cocos2d_LayerRadialGradient_setRadius); + oluacls_func(L, "setStartColor", _olua_fun_cocos2d_LayerRadialGradient_setStartColor); + oluacls_func(L, "setStartOpacity", _olua_fun_cocos2d_LayerRadialGradient_setStartOpacity); + oluacls_prop(L, "blendFunc", _olua_fun_cocos2d_LayerRadialGradient_getBlendFunc, _olua_fun_cocos2d_LayerRadialGradient_setBlendFunc); + oluacls_prop(L, "center", _olua_fun_cocos2d_LayerRadialGradient_getCenter, _olua_fun_cocos2d_LayerRadialGradient_setCenter); + oluacls_prop(L, "endColor", _olua_fun_cocos2d_LayerRadialGradient_getEndColor, nullptr); + oluacls_prop(L, "endColor3B", _olua_fun_cocos2d_LayerRadialGradient_getEndColor3B, nullptr); + oluacls_prop(L, "endOpacity", _olua_fun_cocos2d_LayerRadialGradient_getEndOpacity, _olua_fun_cocos2d_LayerRadialGradient_setEndOpacity); + oluacls_prop(L, "expand", _olua_fun_cocos2d_LayerRadialGradient_getExpand, _olua_fun_cocos2d_LayerRadialGradient_setExpand); + oluacls_prop(L, "radius", _olua_fun_cocos2d_LayerRadialGradient_getRadius, _olua_fun_cocos2d_LayerRadialGradient_setRadius); + oluacls_prop(L, "startColor", _olua_fun_cocos2d_LayerRadialGradient_getStartColor, nullptr); + oluacls_prop(L, "startColor3B", _olua_fun_cocos2d_LayerRadialGradient_getStartColor3B, nullptr); + oluacls_prop(L, "startOpacity", _olua_fun_cocos2d_LayerRadialGradient_getStartOpacity, _olua_fun_cocos2d_LayerRadialGradient_setStartOpacity); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_LayerRadialGradient(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.LayerRadialGradient")) { + luaL_error(L, "class not found: cocos2d::LayerRadialGradient"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_LayerMultiplex_addLayer(lua_State *L) +static int _olua_fun_cocos2d_LayerMultiplex_addLayer(lua_State *L) { olua_startinvoke(L); @@ -39715,7 +41826,7 @@ static int _cocos2d_LayerMultiplex_addLayer(lua_State *L) return 0; } -static int _cocos2d_LayerMultiplex_create$1(lua_State *L) +static int _olua_fun_cocos2d_LayerMultiplex_create$1(lua_State *L) { olua_startinvoke(L); @@ -39728,56 +41839,7 @@ static int _cocos2d_LayerMultiplex_create$1(lua_State *L) return num_ret; } -static int _cocos2d_LayerMultiplex_create$2(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::Layer *arg1 = nullptr; /** layer */ - cocos2d::Layer *arg2 = nullptr; /** layer_$1 */ - cocos2d::Layer *arg3 = nullptr; /** layer_$2 */ - cocos2d::Layer *arg4 = nullptr; /** layer_$3 */ - cocos2d::Layer *arg5 = nullptr; /** layer_$4 */ - cocos2d::Layer *arg6 = nullptr; /** layer_$5 */ - cocos2d::Layer *arg7 = nullptr; /** layer_$6 */ - cocos2d::Layer *arg8 = nullptr; /** layer_$7 */ - cocos2d::Layer *arg9 = nullptr; /** layer_$8 */ - cocos2d::Layer *arg10 = nullptr; /** layer_$9 */ - cocos2d::Layer *arg11 = nullptr; /** layer_$10 */ - cocos2d::Layer *arg12 = nullptr; /** layer_$11 */ - cocos2d::Layer *arg13 = nullptr; /** layer_$12 */ - cocos2d::Layer *arg14 = nullptr; /** layer_$13 */ - cocos2d::Layer *arg15 = nullptr; /** layer_$14 */ - cocos2d::Layer *arg16 = nullptr; /** layer_$15 */ - cocos2d::Layer *arg17 = nullptr; /** layer_$16 */ - - olua_check_object(L, 1, &arg1, "cc.Layer"); - olua_check_object(L, 2, &arg2, "cc.Layer"); - olua_check_object(L, 3, &arg3, "cc.Layer"); - olua_check_object(L, 4, &arg4, "cc.Layer"); - olua_check_object(L, 5, &arg5, "cc.Layer"); - olua_check_object(L, 6, &arg6, "cc.Layer"); - olua_check_object(L, 7, &arg7, "cc.Layer"); - olua_check_object(L, 8, &arg8, "cc.Layer"); - olua_check_object(L, 9, &arg9, "cc.Layer"); - olua_check_object(L, 10, &arg10, "cc.Layer"); - olua_check_object(L, 11, &arg11, "cc.Layer"); - olua_check_object(L, 12, &arg12, "cc.Layer"); - olua_check_object(L, 13, &arg13, "cc.Layer"); - olua_check_object(L, 14, &arg14, "cc.Layer"); - olua_check_object(L, 15, &arg15, "cc.Layer"); - olua_check_object(L, 16, &arg16, "cc.Layer"); - olua_check_object(L, 17, &arg17, "cc.Layer"); - - // @variadic static cocos2d::LayerMultiplex *create(cocos2d::Layer *layer, @optional cocos2d::Layer *layer_$1, @optional cocos2d::Layer *layer_$2, @optional cocos2d::Layer *layer_$3, @optional cocos2d::Layer *layer_$4, @optional cocos2d::Layer *layer_$5, @optional cocos2d::Layer *layer_$6, @optional cocos2d::Layer *layer_$7, @optional cocos2d::Layer *layer_$8, @optional cocos2d::Layer *layer_$9, @optional cocos2d::Layer *layer_$10, @optional cocos2d::Layer *layer_$11, @optional cocos2d::Layer *layer_$12, @optional cocos2d::Layer *layer_$13, @optional cocos2d::Layer *layer_$14, @optional cocos2d::Layer *layer_$15, @optional cocos2d::Layer *layer_$16) - cocos2d::LayerMultiplex *ret = cocos2d::LayerMultiplex::create(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17, nullptr); - int num_ret = olua_push_object(L, ret, "cc.LayerMultiplex"); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_LayerMultiplex_create$3(lua_State *L) +static int _olua_fun_cocos2d_LayerMultiplex_create$2(lua_State *L) { olua_startinvoke(L); @@ -39785,7 +41847,7 @@ static int _cocos2d_LayerMultiplex_create$3(lua_State *L) olua_check_object(L, 1, &arg1, "cc.Layer"); - // @variadic static cocos2d::LayerMultiplex *create(cocos2d::Layer *layer, @optional cocos2d::Layer *layer_$1, @optional cocos2d::Layer *layer_$2, @optional cocos2d::Layer *layer_$3, @optional cocos2d::Layer *layer_$4, @optional cocos2d::Layer *layer_$5, @optional cocos2d::Layer *layer_$6, @optional cocos2d::Layer *layer_$7, @optional cocos2d::Layer *layer_$8, @optional cocos2d::Layer *layer_$9, @optional cocos2d::Layer *layer_$10, @optional cocos2d::Layer *layer_$11, @optional cocos2d::Layer *layer_$12, @optional cocos2d::Layer *layer_$13, @optional cocos2d::Layer *layer_$14, @optional cocos2d::Layer *layer_$15, @optional cocos2d::Layer *layer_$16) + // @variadic static cocos2d::LayerMultiplex *create(cocos2d::Layer *layer) cocos2d::LayerMultiplex *ret = cocos2d::LayerMultiplex::create(arg1, nullptr); int num_ret = olua_push_object(L, ret, "cc.LayerMultiplex"); @@ -39794,7 +41856,7 @@ static int _cocos2d_LayerMultiplex_create$3(lua_State *L) return num_ret; } -static int _cocos2d_LayerMultiplex_create$4(lua_State *L) +static int _olua_fun_cocos2d_LayerMultiplex_create$3(lua_State *L) { olua_startinvoke(L); @@ -39804,7 +41866,7 @@ static int _cocos2d_LayerMultiplex_create$4(lua_State *L) olua_check_object(L, 1, &arg1, "cc.Layer"); olua_check_object(L, 2, &arg2, "cc.Layer"); - // @variadic static cocos2d::LayerMultiplex *create(cocos2d::Layer *layer, @optional cocos2d::Layer *layer_$1, @optional cocos2d::Layer *layer_$2, @optional cocos2d::Layer *layer_$3, @optional cocos2d::Layer *layer_$4, @optional cocos2d::Layer *layer_$5, @optional cocos2d::Layer *layer_$6, @optional cocos2d::Layer *layer_$7, @optional cocos2d::Layer *layer_$8, @optional cocos2d::Layer *layer_$9, @optional cocos2d::Layer *layer_$10, @optional cocos2d::Layer *layer_$11, @optional cocos2d::Layer *layer_$12, @optional cocos2d::Layer *layer_$13, @optional cocos2d::Layer *layer_$14, @optional cocos2d::Layer *layer_$15, @optional cocos2d::Layer *layer_$16) + // @variadic static cocos2d::LayerMultiplex *create(cocos2d::Layer *layer, cocos2d::Layer *layer_$1) cocos2d::LayerMultiplex *ret = cocos2d::LayerMultiplex::create(arg1, arg2, nullptr); int num_ret = olua_push_object(L, ret, "cc.LayerMultiplex"); @@ -39813,7 +41875,7 @@ static int _cocos2d_LayerMultiplex_create$4(lua_State *L) return num_ret; } -static int _cocos2d_LayerMultiplex_create$5(lua_State *L) +static int _olua_fun_cocos2d_LayerMultiplex_create$4(lua_State *L) { olua_startinvoke(L); @@ -39825,7 +41887,7 @@ static int _cocos2d_LayerMultiplex_create$5(lua_State *L) olua_check_object(L, 2, &arg2, "cc.Layer"); olua_check_object(L, 3, &arg3, "cc.Layer"); - // @variadic static cocos2d::LayerMultiplex *create(cocos2d::Layer *layer, @optional cocos2d::Layer *layer_$1, @optional cocos2d::Layer *layer_$2, @optional cocos2d::Layer *layer_$3, @optional cocos2d::Layer *layer_$4, @optional cocos2d::Layer *layer_$5, @optional cocos2d::Layer *layer_$6, @optional cocos2d::Layer *layer_$7, @optional cocos2d::Layer *layer_$8, @optional cocos2d::Layer *layer_$9, @optional cocos2d::Layer *layer_$10, @optional cocos2d::Layer *layer_$11, @optional cocos2d::Layer *layer_$12, @optional cocos2d::Layer *layer_$13, @optional cocos2d::Layer *layer_$14, @optional cocos2d::Layer *layer_$15, @optional cocos2d::Layer *layer_$16) + // @variadic static cocos2d::LayerMultiplex *create(cocos2d::Layer *layer, cocos2d::Layer *layer_$1, cocos2d::Layer *layer_$2) cocos2d::LayerMultiplex *ret = cocos2d::LayerMultiplex::create(arg1, arg2, arg3, nullptr); int num_ret = olua_push_object(L, ret, "cc.LayerMultiplex"); @@ -39834,7 +41896,7 @@ static int _cocos2d_LayerMultiplex_create$5(lua_State *L) return num_ret; } -static int _cocos2d_LayerMultiplex_create$6(lua_State *L) +static int _olua_fun_cocos2d_LayerMultiplex_create$5(lua_State *L) { olua_startinvoke(L); @@ -39848,7 +41910,7 @@ static int _cocos2d_LayerMultiplex_create$6(lua_State *L) olua_check_object(L, 3, &arg3, "cc.Layer"); olua_check_object(L, 4, &arg4, "cc.Layer"); - // @variadic static cocos2d::LayerMultiplex *create(cocos2d::Layer *layer, @optional cocos2d::Layer *layer_$1, @optional cocos2d::Layer *layer_$2, @optional cocos2d::Layer *layer_$3, @optional cocos2d::Layer *layer_$4, @optional cocos2d::Layer *layer_$5, @optional cocos2d::Layer *layer_$6, @optional cocos2d::Layer *layer_$7, @optional cocos2d::Layer *layer_$8, @optional cocos2d::Layer *layer_$9, @optional cocos2d::Layer *layer_$10, @optional cocos2d::Layer *layer_$11, @optional cocos2d::Layer *layer_$12, @optional cocos2d::Layer *layer_$13, @optional cocos2d::Layer *layer_$14, @optional cocos2d::Layer *layer_$15, @optional cocos2d::Layer *layer_$16) + // @variadic static cocos2d::LayerMultiplex *create(cocos2d::Layer *layer, cocos2d::Layer *layer_$1, cocos2d::Layer *layer_$2, cocos2d::Layer *layer_$3) cocos2d::LayerMultiplex *ret = cocos2d::LayerMultiplex::create(arg1, arg2, arg3, arg4, nullptr); int num_ret = olua_push_object(L, ret, "cc.LayerMultiplex"); @@ -39857,7 +41919,7 @@ static int _cocos2d_LayerMultiplex_create$6(lua_State *L) return num_ret; } -static int _cocos2d_LayerMultiplex_create$7(lua_State *L) +static int _olua_fun_cocos2d_LayerMultiplex_create$6(lua_State *L) { olua_startinvoke(L); @@ -39873,7 +41935,7 @@ static int _cocos2d_LayerMultiplex_create$7(lua_State *L) olua_check_object(L, 4, &arg4, "cc.Layer"); olua_check_object(L, 5, &arg5, "cc.Layer"); - // @variadic static cocos2d::LayerMultiplex *create(cocos2d::Layer *layer, @optional cocos2d::Layer *layer_$1, @optional cocos2d::Layer *layer_$2, @optional cocos2d::Layer *layer_$3, @optional cocos2d::Layer *layer_$4, @optional cocos2d::Layer *layer_$5, @optional cocos2d::Layer *layer_$6, @optional cocos2d::Layer *layer_$7, @optional cocos2d::Layer *layer_$8, @optional cocos2d::Layer *layer_$9, @optional cocos2d::Layer *layer_$10, @optional cocos2d::Layer *layer_$11, @optional cocos2d::Layer *layer_$12, @optional cocos2d::Layer *layer_$13, @optional cocos2d::Layer *layer_$14, @optional cocos2d::Layer *layer_$15, @optional cocos2d::Layer *layer_$16) + // @variadic static cocos2d::LayerMultiplex *create(cocos2d::Layer *layer, cocos2d::Layer *layer_$1, cocos2d::Layer *layer_$2, cocos2d::Layer *layer_$3, cocos2d::Layer *layer_$4) cocos2d::LayerMultiplex *ret = cocos2d::LayerMultiplex::create(arg1, arg2, arg3, arg4, arg5, nullptr); int num_ret = olua_push_object(L, ret, "cc.LayerMultiplex"); @@ -39882,7 +41944,7 @@ static int _cocos2d_LayerMultiplex_create$7(lua_State *L) return num_ret; } -static int _cocos2d_LayerMultiplex_create$8(lua_State *L) +static int _olua_fun_cocos2d_LayerMultiplex_create$7(lua_State *L) { olua_startinvoke(L); @@ -39900,7 +41962,7 @@ static int _cocos2d_LayerMultiplex_create$8(lua_State *L) olua_check_object(L, 5, &arg5, "cc.Layer"); olua_check_object(L, 6, &arg6, "cc.Layer"); - // @variadic static cocos2d::LayerMultiplex *create(cocos2d::Layer *layer, @optional cocos2d::Layer *layer_$1, @optional cocos2d::Layer *layer_$2, @optional cocos2d::Layer *layer_$3, @optional cocos2d::Layer *layer_$4, @optional cocos2d::Layer *layer_$5, @optional cocos2d::Layer *layer_$6, @optional cocos2d::Layer *layer_$7, @optional cocos2d::Layer *layer_$8, @optional cocos2d::Layer *layer_$9, @optional cocos2d::Layer *layer_$10, @optional cocos2d::Layer *layer_$11, @optional cocos2d::Layer *layer_$12, @optional cocos2d::Layer *layer_$13, @optional cocos2d::Layer *layer_$14, @optional cocos2d::Layer *layer_$15, @optional cocos2d::Layer *layer_$16) + // @variadic static cocos2d::LayerMultiplex *create(cocos2d::Layer *layer, cocos2d::Layer *layer_$1, cocos2d::Layer *layer_$2, cocos2d::Layer *layer_$3, cocos2d::Layer *layer_$4, cocos2d::Layer *layer_$5) cocos2d::LayerMultiplex *ret = cocos2d::LayerMultiplex::create(arg1, arg2, arg3, arg4, arg5, arg6, nullptr); int num_ret = olua_push_object(L, ret, "cc.LayerMultiplex"); @@ -39909,7 +41971,7 @@ static int _cocos2d_LayerMultiplex_create$8(lua_State *L) return num_ret; } -static int _cocos2d_LayerMultiplex_create$9(lua_State *L) +static int _olua_fun_cocos2d_LayerMultiplex_create$8(lua_State *L) { olua_startinvoke(L); @@ -39929,7 +41991,7 @@ static int _cocos2d_LayerMultiplex_create$9(lua_State *L) olua_check_object(L, 6, &arg6, "cc.Layer"); olua_check_object(L, 7, &arg7, "cc.Layer"); - // @variadic static cocos2d::LayerMultiplex *create(cocos2d::Layer *layer, @optional cocos2d::Layer *layer_$1, @optional cocos2d::Layer *layer_$2, @optional cocos2d::Layer *layer_$3, @optional cocos2d::Layer *layer_$4, @optional cocos2d::Layer *layer_$5, @optional cocos2d::Layer *layer_$6, @optional cocos2d::Layer *layer_$7, @optional cocos2d::Layer *layer_$8, @optional cocos2d::Layer *layer_$9, @optional cocos2d::Layer *layer_$10, @optional cocos2d::Layer *layer_$11, @optional cocos2d::Layer *layer_$12, @optional cocos2d::Layer *layer_$13, @optional cocos2d::Layer *layer_$14, @optional cocos2d::Layer *layer_$15, @optional cocos2d::Layer *layer_$16) + // @variadic static cocos2d::LayerMultiplex *create(cocos2d::Layer *layer, cocos2d::Layer *layer_$1, cocos2d::Layer *layer_$2, cocos2d::Layer *layer_$3, cocos2d::Layer *layer_$4, cocos2d::Layer *layer_$5, cocos2d::Layer *layer_$6) cocos2d::LayerMultiplex *ret = cocos2d::LayerMultiplex::create(arg1, arg2, arg3, arg4, arg5, arg6, arg7, nullptr); int num_ret = olua_push_object(L, ret, "cc.LayerMultiplex"); @@ -39938,7 +42000,7 @@ static int _cocos2d_LayerMultiplex_create$9(lua_State *L) return num_ret; } -static int _cocos2d_LayerMultiplex_create$10(lua_State *L) +static int _olua_fun_cocos2d_LayerMultiplex_create$9(lua_State *L) { olua_startinvoke(L); @@ -39960,7 +42022,7 @@ static int _cocos2d_LayerMultiplex_create$10(lua_State *L) olua_check_object(L, 7, &arg7, "cc.Layer"); olua_check_object(L, 8, &arg8, "cc.Layer"); - // @variadic static cocos2d::LayerMultiplex *create(cocos2d::Layer *layer, @optional cocos2d::Layer *layer_$1, @optional cocos2d::Layer *layer_$2, @optional cocos2d::Layer *layer_$3, @optional cocos2d::Layer *layer_$4, @optional cocos2d::Layer *layer_$5, @optional cocos2d::Layer *layer_$6, @optional cocos2d::Layer *layer_$7, @optional cocos2d::Layer *layer_$8, @optional cocos2d::Layer *layer_$9, @optional cocos2d::Layer *layer_$10, @optional cocos2d::Layer *layer_$11, @optional cocos2d::Layer *layer_$12, @optional cocos2d::Layer *layer_$13, @optional cocos2d::Layer *layer_$14, @optional cocos2d::Layer *layer_$15, @optional cocos2d::Layer *layer_$16) + // @variadic static cocos2d::LayerMultiplex *create(cocos2d::Layer *layer, cocos2d::Layer *layer_$1, cocos2d::Layer *layer_$2, cocos2d::Layer *layer_$3, cocos2d::Layer *layer_$4, cocos2d::Layer *layer_$5, cocos2d::Layer *layer_$6, cocos2d::Layer *layer_$7) cocos2d::LayerMultiplex *ret = cocos2d::LayerMultiplex::create(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, nullptr); int num_ret = olua_push_object(L, ret, "cc.LayerMultiplex"); @@ -39969,7 +42031,7 @@ static int _cocos2d_LayerMultiplex_create$10(lua_State *L) return num_ret; } -static int _cocos2d_LayerMultiplex_create$11(lua_State *L) +static int _olua_fun_cocos2d_LayerMultiplex_create$10(lua_State *L) { olua_startinvoke(L); @@ -39993,7 +42055,7 @@ static int _cocos2d_LayerMultiplex_create$11(lua_State *L) olua_check_object(L, 8, &arg8, "cc.Layer"); olua_check_object(L, 9, &arg9, "cc.Layer"); - // @variadic static cocos2d::LayerMultiplex *create(cocos2d::Layer *layer, @optional cocos2d::Layer *layer_$1, @optional cocos2d::Layer *layer_$2, @optional cocos2d::Layer *layer_$3, @optional cocos2d::Layer *layer_$4, @optional cocos2d::Layer *layer_$5, @optional cocos2d::Layer *layer_$6, @optional cocos2d::Layer *layer_$7, @optional cocos2d::Layer *layer_$8, @optional cocos2d::Layer *layer_$9, @optional cocos2d::Layer *layer_$10, @optional cocos2d::Layer *layer_$11, @optional cocos2d::Layer *layer_$12, @optional cocos2d::Layer *layer_$13, @optional cocos2d::Layer *layer_$14, @optional cocos2d::Layer *layer_$15, @optional cocos2d::Layer *layer_$16) + // @variadic static cocos2d::LayerMultiplex *create(cocos2d::Layer *layer, cocos2d::Layer *layer_$1, cocos2d::Layer *layer_$2, cocos2d::Layer *layer_$3, cocos2d::Layer *layer_$4, cocos2d::Layer *layer_$5, cocos2d::Layer *layer_$6, cocos2d::Layer *layer_$7, cocos2d::Layer *layer_$8) cocos2d::LayerMultiplex *ret = cocos2d::LayerMultiplex::create(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, nullptr); int num_ret = olua_push_object(L, ret, "cc.LayerMultiplex"); @@ -40002,7 +42064,7 @@ static int _cocos2d_LayerMultiplex_create$11(lua_State *L) return num_ret; } -static int _cocos2d_LayerMultiplex_create$12(lua_State *L) +static int _olua_fun_cocos2d_LayerMultiplex_create$11(lua_State *L) { olua_startinvoke(L); @@ -40028,7 +42090,7 @@ static int _cocos2d_LayerMultiplex_create$12(lua_State *L) olua_check_object(L, 9, &arg9, "cc.Layer"); olua_check_object(L, 10, &arg10, "cc.Layer"); - // @variadic static cocos2d::LayerMultiplex *create(cocos2d::Layer *layer, @optional cocos2d::Layer *layer_$1, @optional cocos2d::Layer *layer_$2, @optional cocos2d::Layer *layer_$3, @optional cocos2d::Layer *layer_$4, @optional cocos2d::Layer *layer_$5, @optional cocos2d::Layer *layer_$6, @optional cocos2d::Layer *layer_$7, @optional cocos2d::Layer *layer_$8, @optional cocos2d::Layer *layer_$9, @optional cocos2d::Layer *layer_$10, @optional cocos2d::Layer *layer_$11, @optional cocos2d::Layer *layer_$12, @optional cocos2d::Layer *layer_$13, @optional cocos2d::Layer *layer_$14, @optional cocos2d::Layer *layer_$15, @optional cocos2d::Layer *layer_$16) + // @variadic static cocos2d::LayerMultiplex *create(cocos2d::Layer *layer, cocos2d::Layer *layer_$1, cocos2d::Layer *layer_$2, cocos2d::Layer *layer_$3, cocos2d::Layer *layer_$4, cocos2d::Layer *layer_$5, cocos2d::Layer *layer_$6, cocos2d::Layer *layer_$7, cocos2d::Layer *layer_$8, cocos2d::Layer *layer_$9) cocos2d::LayerMultiplex *ret = cocos2d::LayerMultiplex::create(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, nullptr); int num_ret = olua_push_object(L, ret, "cc.LayerMultiplex"); @@ -40037,7 +42099,7 @@ static int _cocos2d_LayerMultiplex_create$12(lua_State *L) return num_ret; } -static int _cocos2d_LayerMultiplex_create$13(lua_State *L) +static int _olua_fun_cocos2d_LayerMultiplex_create$12(lua_State *L) { olua_startinvoke(L); @@ -40065,7 +42127,7 @@ static int _cocos2d_LayerMultiplex_create$13(lua_State *L) olua_check_object(L, 10, &arg10, "cc.Layer"); olua_check_object(L, 11, &arg11, "cc.Layer"); - // @variadic static cocos2d::LayerMultiplex *create(cocos2d::Layer *layer, @optional cocos2d::Layer *layer_$1, @optional cocos2d::Layer *layer_$2, @optional cocos2d::Layer *layer_$3, @optional cocos2d::Layer *layer_$4, @optional cocos2d::Layer *layer_$5, @optional cocos2d::Layer *layer_$6, @optional cocos2d::Layer *layer_$7, @optional cocos2d::Layer *layer_$8, @optional cocos2d::Layer *layer_$9, @optional cocos2d::Layer *layer_$10, @optional cocos2d::Layer *layer_$11, @optional cocos2d::Layer *layer_$12, @optional cocos2d::Layer *layer_$13, @optional cocos2d::Layer *layer_$14, @optional cocos2d::Layer *layer_$15, @optional cocos2d::Layer *layer_$16) + // @variadic static cocos2d::LayerMultiplex *create(cocos2d::Layer *layer, cocos2d::Layer *layer_$1, cocos2d::Layer *layer_$2, cocos2d::Layer *layer_$3, cocos2d::Layer *layer_$4, cocos2d::Layer *layer_$5, cocos2d::Layer *layer_$6, cocos2d::Layer *layer_$7, cocos2d::Layer *layer_$8, cocos2d::Layer *layer_$9, cocos2d::Layer *layer_$10) cocos2d::LayerMultiplex *ret = cocos2d::LayerMultiplex::create(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, nullptr); int num_ret = olua_push_object(L, ret, "cc.LayerMultiplex"); @@ -40074,7 +42136,7 @@ static int _cocos2d_LayerMultiplex_create$13(lua_State *L) return num_ret; } -static int _cocos2d_LayerMultiplex_create$14(lua_State *L) +static int _olua_fun_cocos2d_LayerMultiplex_create$13(lua_State *L) { olua_startinvoke(L); @@ -40104,7 +42166,7 @@ static int _cocos2d_LayerMultiplex_create$14(lua_State *L) olua_check_object(L, 11, &arg11, "cc.Layer"); olua_check_object(L, 12, &arg12, "cc.Layer"); - // @variadic static cocos2d::LayerMultiplex *create(cocos2d::Layer *layer, @optional cocos2d::Layer *layer_$1, @optional cocos2d::Layer *layer_$2, @optional cocos2d::Layer *layer_$3, @optional cocos2d::Layer *layer_$4, @optional cocos2d::Layer *layer_$5, @optional cocos2d::Layer *layer_$6, @optional cocos2d::Layer *layer_$7, @optional cocos2d::Layer *layer_$8, @optional cocos2d::Layer *layer_$9, @optional cocos2d::Layer *layer_$10, @optional cocos2d::Layer *layer_$11, @optional cocos2d::Layer *layer_$12, @optional cocos2d::Layer *layer_$13, @optional cocos2d::Layer *layer_$14, @optional cocos2d::Layer *layer_$15, @optional cocos2d::Layer *layer_$16) + // @variadic static cocos2d::LayerMultiplex *create(cocos2d::Layer *layer, cocos2d::Layer *layer_$1, cocos2d::Layer *layer_$2, cocos2d::Layer *layer_$3, cocos2d::Layer *layer_$4, cocos2d::Layer *layer_$5, cocos2d::Layer *layer_$6, cocos2d::Layer *layer_$7, cocos2d::Layer *layer_$8, cocos2d::Layer *layer_$9, cocos2d::Layer *layer_$10, cocos2d::Layer *layer_$11) cocos2d::LayerMultiplex *ret = cocos2d::LayerMultiplex::create(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, nullptr); int num_ret = olua_push_object(L, ret, "cc.LayerMultiplex"); @@ -40113,7 +42175,7 @@ static int _cocos2d_LayerMultiplex_create$14(lua_State *L) return num_ret; } -static int _cocos2d_LayerMultiplex_create$15(lua_State *L) +static int _olua_fun_cocos2d_LayerMultiplex_create$14(lua_State *L) { olua_startinvoke(L); @@ -40145,7 +42207,7 @@ static int _cocos2d_LayerMultiplex_create$15(lua_State *L) olua_check_object(L, 12, &arg12, "cc.Layer"); olua_check_object(L, 13, &arg13, "cc.Layer"); - // @variadic static cocos2d::LayerMultiplex *create(cocos2d::Layer *layer, @optional cocos2d::Layer *layer_$1, @optional cocos2d::Layer *layer_$2, @optional cocos2d::Layer *layer_$3, @optional cocos2d::Layer *layer_$4, @optional cocos2d::Layer *layer_$5, @optional cocos2d::Layer *layer_$6, @optional cocos2d::Layer *layer_$7, @optional cocos2d::Layer *layer_$8, @optional cocos2d::Layer *layer_$9, @optional cocos2d::Layer *layer_$10, @optional cocos2d::Layer *layer_$11, @optional cocos2d::Layer *layer_$12, @optional cocos2d::Layer *layer_$13, @optional cocos2d::Layer *layer_$14, @optional cocos2d::Layer *layer_$15, @optional cocos2d::Layer *layer_$16) + // @variadic static cocos2d::LayerMultiplex *create(cocos2d::Layer *layer, cocos2d::Layer *layer_$1, cocos2d::Layer *layer_$2, cocos2d::Layer *layer_$3, cocos2d::Layer *layer_$4, cocos2d::Layer *layer_$5, cocos2d::Layer *layer_$6, cocos2d::Layer *layer_$7, cocos2d::Layer *layer_$8, cocos2d::Layer *layer_$9, cocos2d::Layer *layer_$10, cocos2d::Layer *layer_$11, cocos2d::Layer *layer_$12) cocos2d::LayerMultiplex *ret = cocos2d::LayerMultiplex::create(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, nullptr); int num_ret = olua_push_object(L, ret, "cc.LayerMultiplex"); @@ -40154,7 +42216,7 @@ static int _cocos2d_LayerMultiplex_create$15(lua_State *L) return num_ret; } -static int _cocos2d_LayerMultiplex_create$16(lua_State *L) +static int _olua_fun_cocos2d_LayerMultiplex_create$15(lua_State *L) { olua_startinvoke(L); @@ -40188,7 +42250,7 @@ static int _cocos2d_LayerMultiplex_create$16(lua_State *L) olua_check_object(L, 13, &arg13, "cc.Layer"); olua_check_object(L, 14, &arg14, "cc.Layer"); - // @variadic static cocos2d::LayerMultiplex *create(cocos2d::Layer *layer, @optional cocos2d::Layer *layer_$1, @optional cocos2d::Layer *layer_$2, @optional cocos2d::Layer *layer_$3, @optional cocos2d::Layer *layer_$4, @optional cocos2d::Layer *layer_$5, @optional cocos2d::Layer *layer_$6, @optional cocos2d::Layer *layer_$7, @optional cocos2d::Layer *layer_$8, @optional cocos2d::Layer *layer_$9, @optional cocos2d::Layer *layer_$10, @optional cocos2d::Layer *layer_$11, @optional cocos2d::Layer *layer_$12, @optional cocos2d::Layer *layer_$13, @optional cocos2d::Layer *layer_$14, @optional cocos2d::Layer *layer_$15, @optional cocos2d::Layer *layer_$16) + // @variadic static cocos2d::LayerMultiplex *create(cocos2d::Layer *layer, cocos2d::Layer *layer_$1, cocos2d::Layer *layer_$2, cocos2d::Layer *layer_$3, cocos2d::Layer *layer_$4, cocos2d::Layer *layer_$5, cocos2d::Layer *layer_$6, cocos2d::Layer *layer_$7, cocos2d::Layer *layer_$8, cocos2d::Layer *layer_$9, cocos2d::Layer *layer_$10, cocos2d::Layer *layer_$11, cocos2d::Layer *layer_$12, cocos2d::Layer *layer_$13) cocos2d::LayerMultiplex *ret = cocos2d::LayerMultiplex::create(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, nullptr); int num_ret = olua_push_object(L, ret, "cc.LayerMultiplex"); @@ -40197,7 +42259,7 @@ static int _cocos2d_LayerMultiplex_create$16(lua_State *L) return num_ret; } -static int _cocos2d_LayerMultiplex_create$17(lua_State *L) +static int _olua_fun_cocos2d_LayerMultiplex_create$16(lua_State *L) { olua_startinvoke(L); @@ -40233,7 +42295,7 @@ static int _cocos2d_LayerMultiplex_create$17(lua_State *L) olua_check_object(L, 14, &arg14, "cc.Layer"); olua_check_object(L, 15, &arg15, "cc.Layer"); - // @variadic static cocos2d::LayerMultiplex *create(cocos2d::Layer *layer, @optional cocos2d::Layer *layer_$1, @optional cocos2d::Layer *layer_$2, @optional cocos2d::Layer *layer_$3, @optional cocos2d::Layer *layer_$4, @optional cocos2d::Layer *layer_$5, @optional cocos2d::Layer *layer_$6, @optional cocos2d::Layer *layer_$7, @optional cocos2d::Layer *layer_$8, @optional cocos2d::Layer *layer_$9, @optional cocos2d::Layer *layer_$10, @optional cocos2d::Layer *layer_$11, @optional cocos2d::Layer *layer_$12, @optional cocos2d::Layer *layer_$13, @optional cocos2d::Layer *layer_$14, @optional cocos2d::Layer *layer_$15, @optional cocos2d::Layer *layer_$16) + // @variadic static cocos2d::LayerMultiplex *create(cocos2d::Layer *layer, cocos2d::Layer *layer_$1, cocos2d::Layer *layer_$2, cocos2d::Layer *layer_$3, cocos2d::Layer *layer_$4, cocos2d::Layer *layer_$5, cocos2d::Layer *layer_$6, cocos2d::Layer *layer_$7, cocos2d::Layer *layer_$8, cocos2d::Layer *layer_$9, cocos2d::Layer *layer_$10, cocos2d::Layer *layer_$11, cocos2d::Layer *layer_$12, cocos2d::Layer *layer_$13, cocos2d::Layer *layer_$14) cocos2d::LayerMultiplex *ret = cocos2d::LayerMultiplex::create(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, nullptr); int num_ret = olua_push_object(L, ret, "cc.LayerMultiplex"); @@ -40242,7 +42304,7 @@ static int _cocos2d_LayerMultiplex_create$17(lua_State *L) return num_ret; } -static int _cocos2d_LayerMultiplex_create$18(lua_State *L) +static int _olua_fun_cocos2d_LayerMultiplex_create$17(lua_State *L) { olua_startinvoke(L); @@ -40280,7 +42342,7 @@ static int _cocos2d_LayerMultiplex_create$18(lua_State *L) olua_check_object(L, 15, &arg15, "cc.Layer"); olua_check_object(L, 16, &arg16, "cc.Layer"); - // @variadic static cocos2d::LayerMultiplex *create(cocos2d::Layer *layer, @optional cocos2d::Layer *layer_$1, @optional cocos2d::Layer *layer_$2, @optional cocos2d::Layer *layer_$3, @optional cocos2d::Layer *layer_$4, @optional cocos2d::Layer *layer_$5, @optional cocos2d::Layer *layer_$6, @optional cocos2d::Layer *layer_$7, @optional cocos2d::Layer *layer_$8, @optional cocos2d::Layer *layer_$9, @optional cocos2d::Layer *layer_$10, @optional cocos2d::Layer *layer_$11, @optional cocos2d::Layer *layer_$12, @optional cocos2d::Layer *layer_$13, @optional cocos2d::Layer *layer_$14, @optional cocos2d::Layer *layer_$15, @optional cocos2d::Layer *layer_$16) + // @variadic static cocos2d::LayerMultiplex *create(cocos2d::Layer *layer, cocos2d::Layer *layer_$1, cocos2d::Layer *layer_$2, cocos2d::Layer *layer_$3, cocos2d::Layer *layer_$4, cocos2d::Layer *layer_$5, cocos2d::Layer *layer_$6, cocos2d::Layer *layer_$7, cocos2d::Layer *layer_$8, cocos2d::Layer *layer_$9, cocos2d::Layer *layer_$10, cocos2d::Layer *layer_$11, cocos2d::Layer *layer_$12, cocos2d::Layer *layer_$13, cocos2d::Layer *layer_$14, cocos2d::Layer *layer_$15) cocos2d::LayerMultiplex *ret = cocos2d::LayerMultiplex::create(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, nullptr); int num_ret = olua_push_object(L, ret, "cc.LayerMultiplex"); @@ -40289,131 +42351,180 @@ static int _cocos2d_LayerMultiplex_create$18(lua_State *L) return num_ret; } -static int _cocos2d_LayerMultiplex_create(lua_State *L) +static int _olua_fun_cocos2d_LayerMultiplex_create$18(lua_State *L) +{ + olua_startinvoke(L); + + cocos2d::Layer *arg1 = nullptr; /** layer */ + cocos2d::Layer *arg2 = nullptr; /** layer_$1 */ + cocos2d::Layer *arg3 = nullptr; /** layer_$2 */ + cocos2d::Layer *arg4 = nullptr; /** layer_$3 */ + cocos2d::Layer *arg5 = nullptr; /** layer_$4 */ + cocos2d::Layer *arg6 = nullptr; /** layer_$5 */ + cocos2d::Layer *arg7 = nullptr; /** layer_$6 */ + cocos2d::Layer *arg8 = nullptr; /** layer_$7 */ + cocos2d::Layer *arg9 = nullptr; /** layer_$8 */ + cocos2d::Layer *arg10 = nullptr; /** layer_$9 */ + cocos2d::Layer *arg11 = nullptr; /** layer_$10 */ + cocos2d::Layer *arg12 = nullptr; /** layer_$11 */ + cocos2d::Layer *arg13 = nullptr; /** layer_$12 */ + cocos2d::Layer *arg14 = nullptr; /** layer_$13 */ + cocos2d::Layer *arg15 = nullptr; /** layer_$14 */ + cocos2d::Layer *arg16 = nullptr; /** layer_$15 */ + cocos2d::Layer *arg17 = nullptr; /** layer_$16 */ + + olua_check_object(L, 1, &arg1, "cc.Layer"); + olua_check_object(L, 2, &arg2, "cc.Layer"); + olua_check_object(L, 3, &arg3, "cc.Layer"); + olua_check_object(L, 4, &arg4, "cc.Layer"); + olua_check_object(L, 5, &arg5, "cc.Layer"); + olua_check_object(L, 6, &arg6, "cc.Layer"); + olua_check_object(L, 7, &arg7, "cc.Layer"); + olua_check_object(L, 8, &arg8, "cc.Layer"); + olua_check_object(L, 9, &arg9, "cc.Layer"); + olua_check_object(L, 10, &arg10, "cc.Layer"); + olua_check_object(L, 11, &arg11, "cc.Layer"); + olua_check_object(L, 12, &arg12, "cc.Layer"); + olua_check_object(L, 13, &arg13, "cc.Layer"); + olua_check_object(L, 14, &arg14, "cc.Layer"); + olua_check_object(L, 15, &arg15, "cc.Layer"); + olua_check_object(L, 16, &arg16, "cc.Layer"); + olua_check_object(L, 17, &arg17, "cc.Layer"); + + // @variadic static cocos2d::LayerMultiplex *create(cocos2d::Layer *layer, cocos2d::Layer *layer_$1, cocos2d::Layer *layer_$2, cocos2d::Layer *layer_$3, cocos2d::Layer *layer_$4, cocos2d::Layer *layer_$5, cocos2d::Layer *layer_$6, cocos2d::Layer *layer_$7, cocos2d::Layer *layer_$8, cocos2d::Layer *layer_$9, cocos2d::Layer *layer_$10, cocos2d::Layer *layer_$11, cocos2d::Layer *layer_$12, cocos2d::Layer *layer_$13, cocos2d::Layer *layer_$14, cocos2d::Layer *layer_$15, cocos2d::Layer *layer_$16) + cocos2d::LayerMultiplex *ret = cocos2d::LayerMultiplex::create(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17, nullptr); + int num_ret = olua_push_object(L, ret, "cc.LayerMultiplex"); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_cocos2d_LayerMultiplex_create(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 0) { // static cocos2d::LayerMultiplex *create() - return _cocos2d_LayerMultiplex_create$1(L); + return _olua_fun_cocos2d_LayerMultiplex_create$1(L); } if (num_args == 1) { // if ((olua_is_object(L, 1, "cc.Layer"))) { - // @variadic static cocos2d::LayerMultiplex *create(cocos2d::Layer *layer, @optional cocos2d::Layer *layer_$1, @optional cocos2d::Layer *layer_$2, @optional cocos2d::Layer *layer_$3, @optional cocos2d::Layer *layer_$4, @optional cocos2d::Layer *layer_$5, @optional cocos2d::Layer *layer_$6, @optional cocos2d::Layer *layer_$7, @optional cocos2d::Layer *layer_$8, @optional cocos2d::Layer *layer_$9, @optional cocos2d::Layer *layer_$10, @optional cocos2d::Layer *layer_$11, @optional cocos2d::Layer *layer_$12, @optional cocos2d::Layer *layer_$13, @optional cocos2d::Layer *layer_$14, @optional cocos2d::Layer *layer_$15, @optional cocos2d::Layer *layer_$16) - return _cocos2d_LayerMultiplex_create$3(L); + // @variadic static cocos2d::LayerMultiplex *create(cocos2d::Layer *layer) + return _olua_fun_cocos2d_LayerMultiplex_create$2(L); // } } if (num_args == 2) { // if ((olua_is_object(L, 1, "cc.Layer")) && (olua_is_object(L, 2, "cc.Layer"))) { - // @variadic static cocos2d::LayerMultiplex *create(cocos2d::Layer *layer, @optional cocos2d::Layer *layer_$1, @optional cocos2d::Layer *layer_$2, @optional cocos2d::Layer *layer_$3, @optional cocos2d::Layer *layer_$4, @optional cocos2d::Layer *layer_$5, @optional cocos2d::Layer *layer_$6, @optional cocos2d::Layer *layer_$7, @optional cocos2d::Layer *layer_$8, @optional cocos2d::Layer *layer_$9, @optional cocos2d::Layer *layer_$10, @optional cocos2d::Layer *layer_$11, @optional cocos2d::Layer *layer_$12, @optional cocos2d::Layer *layer_$13, @optional cocos2d::Layer *layer_$14, @optional cocos2d::Layer *layer_$15, @optional cocos2d::Layer *layer_$16) - return _cocos2d_LayerMultiplex_create$4(L); + // @variadic static cocos2d::LayerMultiplex *create(cocos2d::Layer *layer, cocos2d::Layer *layer_$1) + return _olua_fun_cocos2d_LayerMultiplex_create$3(L); // } } if (num_args == 3) { // if ((olua_is_object(L, 1, "cc.Layer")) && (olua_is_object(L, 2, "cc.Layer")) && (olua_is_object(L, 3, "cc.Layer"))) { - // @variadic static cocos2d::LayerMultiplex *create(cocos2d::Layer *layer, @optional cocos2d::Layer *layer_$1, @optional cocos2d::Layer *layer_$2, @optional cocos2d::Layer *layer_$3, @optional cocos2d::Layer *layer_$4, @optional cocos2d::Layer *layer_$5, @optional cocos2d::Layer *layer_$6, @optional cocos2d::Layer *layer_$7, @optional cocos2d::Layer *layer_$8, @optional cocos2d::Layer *layer_$9, @optional cocos2d::Layer *layer_$10, @optional cocos2d::Layer *layer_$11, @optional cocos2d::Layer *layer_$12, @optional cocos2d::Layer *layer_$13, @optional cocos2d::Layer *layer_$14, @optional cocos2d::Layer *layer_$15, @optional cocos2d::Layer *layer_$16) - return _cocos2d_LayerMultiplex_create$5(L); + // @variadic static cocos2d::LayerMultiplex *create(cocos2d::Layer *layer, cocos2d::Layer *layer_$1, cocos2d::Layer *layer_$2) + return _olua_fun_cocos2d_LayerMultiplex_create$4(L); // } } if (num_args == 4) { // if ((olua_is_object(L, 1, "cc.Layer")) && (olua_is_object(L, 2, "cc.Layer")) && (olua_is_object(L, 3, "cc.Layer")) && (olua_is_object(L, 4, "cc.Layer"))) { - // @variadic static cocos2d::LayerMultiplex *create(cocos2d::Layer *layer, @optional cocos2d::Layer *layer_$1, @optional cocos2d::Layer *layer_$2, @optional cocos2d::Layer *layer_$3, @optional cocos2d::Layer *layer_$4, @optional cocos2d::Layer *layer_$5, @optional cocos2d::Layer *layer_$6, @optional cocos2d::Layer *layer_$7, @optional cocos2d::Layer *layer_$8, @optional cocos2d::Layer *layer_$9, @optional cocos2d::Layer *layer_$10, @optional cocos2d::Layer *layer_$11, @optional cocos2d::Layer *layer_$12, @optional cocos2d::Layer *layer_$13, @optional cocos2d::Layer *layer_$14, @optional cocos2d::Layer *layer_$15, @optional cocos2d::Layer *layer_$16) - return _cocos2d_LayerMultiplex_create$6(L); + // @variadic static cocos2d::LayerMultiplex *create(cocos2d::Layer *layer, cocos2d::Layer *layer_$1, cocos2d::Layer *layer_$2, cocos2d::Layer *layer_$3) + return _olua_fun_cocos2d_LayerMultiplex_create$5(L); // } } if (num_args == 5) { // if ((olua_is_object(L, 1, "cc.Layer")) && (olua_is_object(L, 2, "cc.Layer")) && (olua_is_object(L, 3, "cc.Layer")) && (olua_is_object(L, 4, "cc.Layer")) && (olua_is_object(L, 5, "cc.Layer"))) { - // @variadic static cocos2d::LayerMultiplex *create(cocos2d::Layer *layer, @optional cocos2d::Layer *layer_$1, @optional cocos2d::Layer *layer_$2, @optional cocos2d::Layer *layer_$3, @optional cocos2d::Layer *layer_$4, @optional cocos2d::Layer *layer_$5, @optional cocos2d::Layer *layer_$6, @optional cocos2d::Layer *layer_$7, @optional cocos2d::Layer *layer_$8, @optional cocos2d::Layer *layer_$9, @optional cocos2d::Layer *layer_$10, @optional cocos2d::Layer *layer_$11, @optional cocos2d::Layer *layer_$12, @optional cocos2d::Layer *layer_$13, @optional cocos2d::Layer *layer_$14, @optional cocos2d::Layer *layer_$15, @optional cocos2d::Layer *layer_$16) - return _cocos2d_LayerMultiplex_create$7(L); + // @variadic static cocos2d::LayerMultiplex *create(cocos2d::Layer *layer, cocos2d::Layer *layer_$1, cocos2d::Layer *layer_$2, cocos2d::Layer *layer_$3, cocos2d::Layer *layer_$4) + return _olua_fun_cocos2d_LayerMultiplex_create$6(L); // } } if (num_args == 6) { // if ((olua_is_object(L, 1, "cc.Layer")) && (olua_is_object(L, 2, "cc.Layer")) && (olua_is_object(L, 3, "cc.Layer")) && (olua_is_object(L, 4, "cc.Layer")) && (olua_is_object(L, 5, "cc.Layer")) && (olua_is_object(L, 6, "cc.Layer"))) { - // @variadic static cocos2d::LayerMultiplex *create(cocos2d::Layer *layer, @optional cocos2d::Layer *layer_$1, @optional cocos2d::Layer *layer_$2, @optional cocos2d::Layer *layer_$3, @optional cocos2d::Layer *layer_$4, @optional cocos2d::Layer *layer_$5, @optional cocos2d::Layer *layer_$6, @optional cocos2d::Layer *layer_$7, @optional cocos2d::Layer *layer_$8, @optional cocos2d::Layer *layer_$9, @optional cocos2d::Layer *layer_$10, @optional cocos2d::Layer *layer_$11, @optional cocos2d::Layer *layer_$12, @optional cocos2d::Layer *layer_$13, @optional cocos2d::Layer *layer_$14, @optional cocos2d::Layer *layer_$15, @optional cocos2d::Layer *layer_$16) - return _cocos2d_LayerMultiplex_create$8(L); + // @variadic static cocos2d::LayerMultiplex *create(cocos2d::Layer *layer, cocos2d::Layer *layer_$1, cocos2d::Layer *layer_$2, cocos2d::Layer *layer_$3, cocos2d::Layer *layer_$4, cocos2d::Layer *layer_$5) + return _olua_fun_cocos2d_LayerMultiplex_create$7(L); // } } if (num_args == 7) { // if ((olua_is_object(L, 1, "cc.Layer")) && (olua_is_object(L, 2, "cc.Layer")) && (olua_is_object(L, 3, "cc.Layer")) && (olua_is_object(L, 4, "cc.Layer")) && (olua_is_object(L, 5, "cc.Layer")) && (olua_is_object(L, 6, "cc.Layer")) && (olua_is_object(L, 7, "cc.Layer"))) { - // @variadic static cocos2d::LayerMultiplex *create(cocos2d::Layer *layer, @optional cocos2d::Layer *layer_$1, @optional cocos2d::Layer *layer_$2, @optional cocos2d::Layer *layer_$3, @optional cocos2d::Layer *layer_$4, @optional cocos2d::Layer *layer_$5, @optional cocos2d::Layer *layer_$6, @optional cocos2d::Layer *layer_$7, @optional cocos2d::Layer *layer_$8, @optional cocos2d::Layer *layer_$9, @optional cocos2d::Layer *layer_$10, @optional cocos2d::Layer *layer_$11, @optional cocos2d::Layer *layer_$12, @optional cocos2d::Layer *layer_$13, @optional cocos2d::Layer *layer_$14, @optional cocos2d::Layer *layer_$15, @optional cocos2d::Layer *layer_$16) - return _cocos2d_LayerMultiplex_create$9(L); + // @variadic static cocos2d::LayerMultiplex *create(cocos2d::Layer *layer, cocos2d::Layer *layer_$1, cocos2d::Layer *layer_$2, cocos2d::Layer *layer_$3, cocos2d::Layer *layer_$4, cocos2d::Layer *layer_$5, cocos2d::Layer *layer_$6) + return _olua_fun_cocos2d_LayerMultiplex_create$8(L); // } } if (num_args == 8) { // if ((olua_is_object(L, 1, "cc.Layer")) && (olua_is_object(L, 2, "cc.Layer")) && (olua_is_object(L, 3, "cc.Layer")) && (olua_is_object(L, 4, "cc.Layer")) && (olua_is_object(L, 5, "cc.Layer")) && (olua_is_object(L, 6, "cc.Layer")) && (olua_is_object(L, 7, "cc.Layer")) && (olua_is_object(L, 8, "cc.Layer"))) { - // @variadic static cocos2d::LayerMultiplex *create(cocos2d::Layer *layer, @optional cocos2d::Layer *layer_$1, @optional cocos2d::Layer *layer_$2, @optional cocos2d::Layer *layer_$3, @optional cocos2d::Layer *layer_$4, @optional cocos2d::Layer *layer_$5, @optional cocos2d::Layer *layer_$6, @optional cocos2d::Layer *layer_$7, @optional cocos2d::Layer *layer_$8, @optional cocos2d::Layer *layer_$9, @optional cocos2d::Layer *layer_$10, @optional cocos2d::Layer *layer_$11, @optional cocos2d::Layer *layer_$12, @optional cocos2d::Layer *layer_$13, @optional cocos2d::Layer *layer_$14, @optional cocos2d::Layer *layer_$15, @optional cocos2d::Layer *layer_$16) - return _cocos2d_LayerMultiplex_create$10(L); + // @variadic static cocos2d::LayerMultiplex *create(cocos2d::Layer *layer, cocos2d::Layer *layer_$1, cocos2d::Layer *layer_$2, cocos2d::Layer *layer_$3, cocos2d::Layer *layer_$4, cocos2d::Layer *layer_$5, cocos2d::Layer *layer_$6, cocos2d::Layer *layer_$7) + return _olua_fun_cocos2d_LayerMultiplex_create$9(L); // } } if (num_args == 9) { // if ((olua_is_object(L, 1, "cc.Layer")) && (olua_is_object(L, 2, "cc.Layer")) && (olua_is_object(L, 3, "cc.Layer")) && (olua_is_object(L, 4, "cc.Layer")) && (olua_is_object(L, 5, "cc.Layer")) && (olua_is_object(L, 6, "cc.Layer")) && (olua_is_object(L, 7, "cc.Layer")) && (olua_is_object(L, 8, "cc.Layer")) && (olua_is_object(L, 9, "cc.Layer"))) { - // @variadic static cocos2d::LayerMultiplex *create(cocos2d::Layer *layer, @optional cocos2d::Layer *layer_$1, @optional cocos2d::Layer *layer_$2, @optional cocos2d::Layer *layer_$3, @optional cocos2d::Layer *layer_$4, @optional cocos2d::Layer *layer_$5, @optional cocos2d::Layer *layer_$6, @optional cocos2d::Layer *layer_$7, @optional cocos2d::Layer *layer_$8, @optional cocos2d::Layer *layer_$9, @optional cocos2d::Layer *layer_$10, @optional cocos2d::Layer *layer_$11, @optional cocos2d::Layer *layer_$12, @optional cocos2d::Layer *layer_$13, @optional cocos2d::Layer *layer_$14, @optional cocos2d::Layer *layer_$15, @optional cocos2d::Layer *layer_$16) - return _cocos2d_LayerMultiplex_create$11(L); + // @variadic static cocos2d::LayerMultiplex *create(cocos2d::Layer *layer, cocos2d::Layer *layer_$1, cocos2d::Layer *layer_$2, cocos2d::Layer *layer_$3, cocos2d::Layer *layer_$4, cocos2d::Layer *layer_$5, cocos2d::Layer *layer_$6, cocos2d::Layer *layer_$7, cocos2d::Layer *layer_$8) + return _olua_fun_cocos2d_LayerMultiplex_create$10(L); // } } if (num_args == 10) { // if ((olua_is_object(L, 1, "cc.Layer")) && (olua_is_object(L, 2, "cc.Layer")) && (olua_is_object(L, 3, "cc.Layer")) && (olua_is_object(L, 4, "cc.Layer")) && (olua_is_object(L, 5, "cc.Layer")) && (olua_is_object(L, 6, "cc.Layer")) && (olua_is_object(L, 7, "cc.Layer")) && (olua_is_object(L, 8, "cc.Layer")) && (olua_is_object(L, 9, "cc.Layer")) && (olua_is_object(L, 10, "cc.Layer"))) { - // @variadic static cocos2d::LayerMultiplex *create(cocos2d::Layer *layer, @optional cocos2d::Layer *layer_$1, @optional cocos2d::Layer *layer_$2, @optional cocos2d::Layer *layer_$3, @optional cocos2d::Layer *layer_$4, @optional cocos2d::Layer *layer_$5, @optional cocos2d::Layer *layer_$6, @optional cocos2d::Layer *layer_$7, @optional cocos2d::Layer *layer_$8, @optional cocos2d::Layer *layer_$9, @optional cocos2d::Layer *layer_$10, @optional cocos2d::Layer *layer_$11, @optional cocos2d::Layer *layer_$12, @optional cocos2d::Layer *layer_$13, @optional cocos2d::Layer *layer_$14, @optional cocos2d::Layer *layer_$15, @optional cocos2d::Layer *layer_$16) - return _cocos2d_LayerMultiplex_create$12(L); + // @variadic static cocos2d::LayerMultiplex *create(cocos2d::Layer *layer, cocos2d::Layer *layer_$1, cocos2d::Layer *layer_$2, cocos2d::Layer *layer_$3, cocos2d::Layer *layer_$4, cocos2d::Layer *layer_$5, cocos2d::Layer *layer_$6, cocos2d::Layer *layer_$7, cocos2d::Layer *layer_$8, cocos2d::Layer *layer_$9) + return _olua_fun_cocos2d_LayerMultiplex_create$11(L); // } } if (num_args == 11) { // if ((olua_is_object(L, 1, "cc.Layer")) && (olua_is_object(L, 2, "cc.Layer")) && (olua_is_object(L, 3, "cc.Layer")) && (olua_is_object(L, 4, "cc.Layer")) && (olua_is_object(L, 5, "cc.Layer")) && (olua_is_object(L, 6, "cc.Layer")) && (olua_is_object(L, 7, "cc.Layer")) && (olua_is_object(L, 8, "cc.Layer")) && (olua_is_object(L, 9, "cc.Layer")) && (olua_is_object(L, 10, "cc.Layer")) && (olua_is_object(L, 11, "cc.Layer"))) { - // @variadic static cocos2d::LayerMultiplex *create(cocos2d::Layer *layer, @optional cocos2d::Layer *layer_$1, @optional cocos2d::Layer *layer_$2, @optional cocos2d::Layer *layer_$3, @optional cocos2d::Layer *layer_$4, @optional cocos2d::Layer *layer_$5, @optional cocos2d::Layer *layer_$6, @optional cocos2d::Layer *layer_$7, @optional cocos2d::Layer *layer_$8, @optional cocos2d::Layer *layer_$9, @optional cocos2d::Layer *layer_$10, @optional cocos2d::Layer *layer_$11, @optional cocos2d::Layer *layer_$12, @optional cocos2d::Layer *layer_$13, @optional cocos2d::Layer *layer_$14, @optional cocos2d::Layer *layer_$15, @optional cocos2d::Layer *layer_$16) - return _cocos2d_LayerMultiplex_create$13(L); + // @variadic static cocos2d::LayerMultiplex *create(cocos2d::Layer *layer, cocos2d::Layer *layer_$1, cocos2d::Layer *layer_$2, cocos2d::Layer *layer_$3, cocos2d::Layer *layer_$4, cocos2d::Layer *layer_$5, cocos2d::Layer *layer_$6, cocos2d::Layer *layer_$7, cocos2d::Layer *layer_$8, cocos2d::Layer *layer_$9, cocos2d::Layer *layer_$10) + return _olua_fun_cocos2d_LayerMultiplex_create$12(L); // } } if (num_args == 12) { // if ((olua_is_object(L, 1, "cc.Layer")) && (olua_is_object(L, 2, "cc.Layer")) && (olua_is_object(L, 3, "cc.Layer")) && (olua_is_object(L, 4, "cc.Layer")) && (olua_is_object(L, 5, "cc.Layer")) && (olua_is_object(L, 6, "cc.Layer")) && (olua_is_object(L, 7, "cc.Layer")) && (olua_is_object(L, 8, "cc.Layer")) && (olua_is_object(L, 9, "cc.Layer")) && (olua_is_object(L, 10, "cc.Layer")) && (olua_is_object(L, 11, "cc.Layer")) && (olua_is_object(L, 12, "cc.Layer"))) { - // @variadic static cocos2d::LayerMultiplex *create(cocos2d::Layer *layer, @optional cocos2d::Layer *layer_$1, @optional cocos2d::Layer *layer_$2, @optional cocos2d::Layer *layer_$3, @optional cocos2d::Layer *layer_$4, @optional cocos2d::Layer *layer_$5, @optional cocos2d::Layer *layer_$6, @optional cocos2d::Layer *layer_$7, @optional cocos2d::Layer *layer_$8, @optional cocos2d::Layer *layer_$9, @optional cocos2d::Layer *layer_$10, @optional cocos2d::Layer *layer_$11, @optional cocos2d::Layer *layer_$12, @optional cocos2d::Layer *layer_$13, @optional cocos2d::Layer *layer_$14, @optional cocos2d::Layer *layer_$15, @optional cocos2d::Layer *layer_$16) - return _cocos2d_LayerMultiplex_create$14(L); + // @variadic static cocos2d::LayerMultiplex *create(cocos2d::Layer *layer, cocos2d::Layer *layer_$1, cocos2d::Layer *layer_$2, cocos2d::Layer *layer_$3, cocos2d::Layer *layer_$4, cocos2d::Layer *layer_$5, cocos2d::Layer *layer_$6, cocos2d::Layer *layer_$7, cocos2d::Layer *layer_$8, cocos2d::Layer *layer_$9, cocos2d::Layer *layer_$10, cocos2d::Layer *layer_$11) + return _olua_fun_cocos2d_LayerMultiplex_create$13(L); // } } if (num_args == 13) { // if ((olua_is_object(L, 1, "cc.Layer")) && (olua_is_object(L, 2, "cc.Layer")) && (olua_is_object(L, 3, "cc.Layer")) && (olua_is_object(L, 4, "cc.Layer")) && (olua_is_object(L, 5, "cc.Layer")) && (olua_is_object(L, 6, "cc.Layer")) && (olua_is_object(L, 7, "cc.Layer")) && (olua_is_object(L, 8, "cc.Layer")) && (olua_is_object(L, 9, "cc.Layer")) && (olua_is_object(L, 10, "cc.Layer")) && (olua_is_object(L, 11, "cc.Layer")) && (olua_is_object(L, 12, "cc.Layer")) && (olua_is_object(L, 13, "cc.Layer"))) { - // @variadic static cocos2d::LayerMultiplex *create(cocos2d::Layer *layer, @optional cocos2d::Layer *layer_$1, @optional cocos2d::Layer *layer_$2, @optional cocos2d::Layer *layer_$3, @optional cocos2d::Layer *layer_$4, @optional cocos2d::Layer *layer_$5, @optional cocos2d::Layer *layer_$6, @optional cocos2d::Layer *layer_$7, @optional cocos2d::Layer *layer_$8, @optional cocos2d::Layer *layer_$9, @optional cocos2d::Layer *layer_$10, @optional cocos2d::Layer *layer_$11, @optional cocos2d::Layer *layer_$12, @optional cocos2d::Layer *layer_$13, @optional cocos2d::Layer *layer_$14, @optional cocos2d::Layer *layer_$15, @optional cocos2d::Layer *layer_$16) - return _cocos2d_LayerMultiplex_create$15(L); + // @variadic static cocos2d::LayerMultiplex *create(cocos2d::Layer *layer, cocos2d::Layer *layer_$1, cocos2d::Layer *layer_$2, cocos2d::Layer *layer_$3, cocos2d::Layer *layer_$4, cocos2d::Layer *layer_$5, cocos2d::Layer *layer_$6, cocos2d::Layer *layer_$7, cocos2d::Layer *layer_$8, cocos2d::Layer *layer_$9, cocos2d::Layer *layer_$10, cocos2d::Layer *layer_$11, cocos2d::Layer *layer_$12) + return _olua_fun_cocos2d_LayerMultiplex_create$14(L); // } } if (num_args == 14) { // if ((olua_is_object(L, 1, "cc.Layer")) && (olua_is_object(L, 2, "cc.Layer")) && (olua_is_object(L, 3, "cc.Layer")) && (olua_is_object(L, 4, "cc.Layer")) && (olua_is_object(L, 5, "cc.Layer")) && (olua_is_object(L, 6, "cc.Layer")) && (olua_is_object(L, 7, "cc.Layer")) && (olua_is_object(L, 8, "cc.Layer")) && (olua_is_object(L, 9, "cc.Layer")) && (olua_is_object(L, 10, "cc.Layer")) && (olua_is_object(L, 11, "cc.Layer")) && (olua_is_object(L, 12, "cc.Layer")) && (olua_is_object(L, 13, "cc.Layer")) && (olua_is_object(L, 14, "cc.Layer"))) { - // @variadic static cocos2d::LayerMultiplex *create(cocos2d::Layer *layer, @optional cocos2d::Layer *layer_$1, @optional cocos2d::Layer *layer_$2, @optional cocos2d::Layer *layer_$3, @optional cocos2d::Layer *layer_$4, @optional cocos2d::Layer *layer_$5, @optional cocos2d::Layer *layer_$6, @optional cocos2d::Layer *layer_$7, @optional cocos2d::Layer *layer_$8, @optional cocos2d::Layer *layer_$9, @optional cocos2d::Layer *layer_$10, @optional cocos2d::Layer *layer_$11, @optional cocos2d::Layer *layer_$12, @optional cocos2d::Layer *layer_$13, @optional cocos2d::Layer *layer_$14, @optional cocos2d::Layer *layer_$15, @optional cocos2d::Layer *layer_$16) - return _cocos2d_LayerMultiplex_create$16(L); + // @variadic static cocos2d::LayerMultiplex *create(cocos2d::Layer *layer, cocos2d::Layer *layer_$1, cocos2d::Layer *layer_$2, cocos2d::Layer *layer_$3, cocos2d::Layer *layer_$4, cocos2d::Layer *layer_$5, cocos2d::Layer *layer_$6, cocos2d::Layer *layer_$7, cocos2d::Layer *layer_$8, cocos2d::Layer *layer_$9, cocos2d::Layer *layer_$10, cocos2d::Layer *layer_$11, cocos2d::Layer *layer_$12, cocos2d::Layer *layer_$13) + return _olua_fun_cocos2d_LayerMultiplex_create$15(L); // } } if (num_args == 15) { // if ((olua_is_object(L, 1, "cc.Layer")) && (olua_is_object(L, 2, "cc.Layer")) && (olua_is_object(L, 3, "cc.Layer")) && (olua_is_object(L, 4, "cc.Layer")) && (olua_is_object(L, 5, "cc.Layer")) && (olua_is_object(L, 6, "cc.Layer")) && (olua_is_object(L, 7, "cc.Layer")) && (olua_is_object(L, 8, "cc.Layer")) && (olua_is_object(L, 9, "cc.Layer")) && (olua_is_object(L, 10, "cc.Layer")) && (olua_is_object(L, 11, "cc.Layer")) && (olua_is_object(L, 12, "cc.Layer")) && (olua_is_object(L, 13, "cc.Layer")) && (olua_is_object(L, 14, "cc.Layer")) && (olua_is_object(L, 15, "cc.Layer"))) { - // @variadic static cocos2d::LayerMultiplex *create(cocos2d::Layer *layer, @optional cocos2d::Layer *layer_$1, @optional cocos2d::Layer *layer_$2, @optional cocos2d::Layer *layer_$3, @optional cocos2d::Layer *layer_$4, @optional cocos2d::Layer *layer_$5, @optional cocos2d::Layer *layer_$6, @optional cocos2d::Layer *layer_$7, @optional cocos2d::Layer *layer_$8, @optional cocos2d::Layer *layer_$9, @optional cocos2d::Layer *layer_$10, @optional cocos2d::Layer *layer_$11, @optional cocos2d::Layer *layer_$12, @optional cocos2d::Layer *layer_$13, @optional cocos2d::Layer *layer_$14, @optional cocos2d::Layer *layer_$15, @optional cocos2d::Layer *layer_$16) - return _cocos2d_LayerMultiplex_create$17(L); + // @variadic static cocos2d::LayerMultiplex *create(cocos2d::Layer *layer, cocos2d::Layer *layer_$1, cocos2d::Layer *layer_$2, cocos2d::Layer *layer_$3, cocos2d::Layer *layer_$4, cocos2d::Layer *layer_$5, cocos2d::Layer *layer_$6, cocos2d::Layer *layer_$7, cocos2d::Layer *layer_$8, cocos2d::Layer *layer_$9, cocos2d::Layer *layer_$10, cocos2d::Layer *layer_$11, cocos2d::Layer *layer_$12, cocos2d::Layer *layer_$13, cocos2d::Layer *layer_$14) + return _olua_fun_cocos2d_LayerMultiplex_create$16(L); // } } if (num_args == 16) { // if ((olua_is_object(L, 1, "cc.Layer")) && (olua_is_object(L, 2, "cc.Layer")) && (olua_is_object(L, 3, "cc.Layer")) && (olua_is_object(L, 4, "cc.Layer")) && (olua_is_object(L, 5, "cc.Layer")) && (olua_is_object(L, 6, "cc.Layer")) && (olua_is_object(L, 7, "cc.Layer")) && (olua_is_object(L, 8, "cc.Layer")) && (olua_is_object(L, 9, "cc.Layer")) && (olua_is_object(L, 10, "cc.Layer")) && (olua_is_object(L, 11, "cc.Layer")) && (olua_is_object(L, 12, "cc.Layer")) && (olua_is_object(L, 13, "cc.Layer")) && (olua_is_object(L, 14, "cc.Layer")) && (olua_is_object(L, 15, "cc.Layer")) && (olua_is_object(L, 16, "cc.Layer"))) { - // @variadic static cocos2d::LayerMultiplex *create(cocos2d::Layer *layer, @optional cocos2d::Layer *layer_$1, @optional cocos2d::Layer *layer_$2, @optional cocos2d::Layer *layer_$3, @optional cocos2d::Layer *layer_$4, @optional cocos2d::Layer *layer_$5, @optional cocos2d::Layer *layer_$6, @optional cocos2d::Layer *layer_$7, @optional cocos2d::Layer *layer_$8, @optional cocos2d::Layer *layer_$9, @optional cocos2d::Layer *layer_$10, @optional cocos2d::Layer *layer_$11, @optional cocos2d::Layer *layer_$12, @optional cocos2d::Layer *layer_$13, @optional cocos2d::Layer *layer_$14, @optional cocos2d::Layer *layer_$15, @optional cocos2d::Layer *layer_$16) - return _cocos2d_LayerMultiplex_create$18(L); + // @variadic static cocos2d::LayerMultiplex *create(cocos2d::Layer *layer, cocos2d::Layer *layer_$1, cocos2d::Layer *layer_$2, cocos2d::Layer *layer_$3, cocos2d::Layer *layer_$4, cocos2d::Layer *layer_$5, cocos2d::Layer *layer_$6, cocos2d::Layer *layer_$7, cocos2d::Layer *layer_$8, cocos2d::Layer *layer_$9, cocos2d::Layer *layer_$10, cocos2d::Layer *layer_$11, cocos2d::Layer *layer_$12, cocos2d::Layer *layer_$13, cocos2d::Layer *layer_$14, cocos2d::Layer *layer_$15) + return _olua_fun_cocos2d_LayerMultiplex_create$17(L); // } } if (num_args == 17) { // if ((olua_is_object(L, 1, "cc.Layer")) && (olua_is_object(L, 2, "cc.Layer")) && (olua_is_object(L, 3, "cc.Layer")) && (olua_is_object(L, 4, "cc.Layer")) && (olua_is_object(L, 5, "cc.Layer")) && (olua_is_object(L, 6, "cc.Layer")) && (olua_is_object(L, 7, "cc.Layer")) && (olua_is_object(L, 8, "cc.Layer")) && (olua_is_object(L, 9, "cc.Layer")) && (olua_is_object(L, 10, "cc.Layer")) && (olua_is_object(L, 11, "cc.Layer")) && (olua_is_object(L, 12, "cc.Layer")) && (olua_is_object(L, 13, "cc.Layer")) && (olua_is_object(L, 14, "cc.Layer")) && (olua_is_object(L, 15, "cc.Layer")) && (olua_is_object(L, 16, "cc.Layer")) && (olua_is_object(L, 17, "cc.Layer"))) { - // @variadic static cocos2d::LayerMultiplex *create(cocos2d::Layer *layer, @optional cocos2d::Layer *layer_$1, @optional cocos2d::Layer *layer_$2, @optional cocos2d::Layer *layer_$3, @optional cocos2d::Layer *layer_$4, @optional cocos2d::Layer *layer_$5, @optional cocos2d::Layer *layer_$6, @optional cocos2d::Layer *layer_$7, @optional cocos2d::Layer *layer_$8, @optional cocos2d::Layer *layer_$9, @optional cocos2d::Layer *layer_$10, @optional cocos2d::Layer *layer_$11, @optional cocos2d::Layer *layer_$12, @optional cocos2d::Layer *layer_$13, @optional cocos2d::Layer *layer_$14, @optional cocos2d::Layer *layer_$15, @optional cocos2d::Layer *layer_$16) - return _cocos2d_LayerMultiplex_create$2(L); + // @variadic static cocos2d::LayerMultiplex *create(cocos2d::Layer *layer, cocos2d::Layer *layer_$1, cocos2d::Layer *layer_$2, cocos2d::Layer *layer_$3, cocos2d::Layer *layer_$4, cocos2d::Layer *layer_$5, cocos2d::Layer *layer_$6, cocos2d::Layer *layer_$7, cocos2d::Layer *layer_$8, cocos2d::Layer *layer_$9, cocos2d::Layer *layer_$10, cocos2d::Layer *layer_$11, cocos2d::Layer *layer_$12, cocos2d::Layer *layer_$13, cocos2d::Layer *layer_$14, cocos2d::Layer *layer_$15, cocos2d::Layer *layer_$16) + return _olua_fun_cocos2d_LayerMultiplex_create$18(L); // } } @@ -40422,7 +42533,7 @@ static int _cocos2d_LayerMultiplex_create(lua_State *L) return 0; } -static int _cocos2d_LayerMultiplex_createWithArray(lua_State *L) +static int _olua_fun_cocos2d_LayerMultiplex_createWithArray(lua_State *L) { olua_startinvoke(L); @@ -40441,7 +42552,7 @@ static int _cocos2d_LayerMultiplex_createWithArray(lua_State *L) return num_ret; } -static int _cocos2d_LayerMultiplex_createWithLayer(lua_State *L) +static int _olua_fun_cocos2d_LayerMultiplex_createWithLayer(lua_State *L) { olua_startinvoke(L); @@ -40458,7 +42569,7 @@ static int _cocos2d_LayerMultiplex_createWithLayer(lua_State *L) return num_ret; } -static int _cocos2d_LayerMultiplex_initWithArray(lua_State *L) +static int _olua_fun_cocos2d_LayerMultiplex_initWithArray(lua_State *L) { olua_startinvoke(L); @@ -40479,11 +42590,11 @@ static int _cocos2d_LayerMultiplex_initWithArray(lua_State *L) return num_ret; } -static int _cocos2d_LayerMultiplex_new(lua_State *L) +static int _olua_fun_cocos2d_LayerMultiplex_new(lua_State *L) { olua_startinvoke(L); - // LayerMultiplex() + // cocos2d::LayerMultiplex() cocos2d::LayerMultiplex *ret = new cocos2d::LayerMultiplex(); int num_ret = olua_push_object(L, ret, "cc.LayerMultiplex"); olua_postnew(L, ret); @@ -40493,7 +42604,7 @@ static int _cocos2d_LayerMultiplex_new(lua_State *L) return num_ret; } -static int _cocos2d_LayerMultiplex_switchTo$1(lua_State *L) +static int _olua_fun_cocos2d_LayerMultiplex_switchTo$1(lua_State *L) { olua_startinvoke(L); @@ -40511,7 +42622,7 @@ static int _cocos2d_LayerMultiplex_switchTo$1(lua_State *L) return 0; } -static int _cocos2d_LayerMultiplex_switchTo$2(lua_State *L) +static int _olua_fun_cocos2d_LayerMultiplex_switchTo$2(lua_State *L) { olua_startinvoke(L); @@ -40531,21 +42642,21 @@ static int _cocos2d_LayerMultiplex_switchTo$2(lua_State *L) return 0; } -static int _cocos2d_LayerMultiplex_switchTo(lua_State *L) +static int _olua_fun_cocos2d_LayerMultiplex_switchTo(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_integer(L, 2))) { // void switchTo(int n) - return _cocos2d_LayerMultiplex_switchTo$1(L); + return _olua_fun_cocos2d_LayerMultiplex_switchTo$1(L); // } } if (num_args == 2) { // if ((olua_is_integer(L, 2)) && (olua_is_bool(L, 3))) { // void switchTo(int n, bool cleanup) - return _cocos2d_LayerMultiplex_switchTo$2(L); + return _olua_fun_cocos2d_LayerMultiplex_switchTo$2(L); // } } @@ -40554,7 +42665,7 @@ static int _cocos2d_LayerMultiplex_switchTo(lua_State *L) return 0; } -static int _cocos2d_LayerMultiplex_switchToAndReleaseMe(lua_State *L) +static int _olua_fun_cocos2d_LayerMultiplex_switchToAndReleaseMe(lua_State *L) { olua_startinvoke(L); @@ -40572,25 +42683,33 @@ static int _cocos2d_LayerMultiplex_switchToAndReleaseMe(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_LayerMultiplex(lua_State *L) +static int _olua_cls_cc_LayerMultiplex(lua_State *L) { oluacls_class(L, "cc.LayerMultiplex"); - oluacls_func(L, "addLayer", _cocos2d_LayerMultiplex_addLayer); - oluacls_func(L, "create", _cocos2d_LayerMultiplex_create); - oluacls_func(L, "createWithArray", _cocos2d_LayerMultiplex_createWithArray); - oluacls_func(L, "createWithLayer", _cocos2d_LayerMultiplex_createWithLayer); - oluacls_func(L, "initWithArray", _cocos2d_LayerMultiplex_initWithArray); - oluacls_func(L, "new", _cocos2d_LayerMultiplex_new); - oluacls_func(L, "switchTo", _cocos2d_LayerMultiplex_switchTo); - oluacls_func(L, "switchToAndReleaseMe", _cocos2d_LayerMultiplex_switchToAndReleaseMe); + oluacls_func(L, "addLayer", _olua_fun_cocos2d_LayerMultiplex_addLayer); + oluacls_func(L, "create", _olua_fun_cocos2d_LayerMultiplex_create); + oluacls_func(L, "createWithArray", _olua_fun_cocos2d_LayerMultiplex_createWithArray); + oluacls_func(L, "createWithLayer", _olua_fun_cocos2d_LayerMultiplex_createWithLayer); + oluacls_func(L, "initWithArray", _olua_fun_cocos2d_LayerMultiplex_initWithArray); + oluacls_func(L, "new", _olua_fun_cocos2d_LayerMultiplex_new); + oluacls_func(L, "switchTo", _olua_fun_cocos2d_LayerMultiplex_switchTo); + oluacls_func(L, "switchToAndReleaseMe", _olua_fun_cocos2d_LayerMultiplex_switchToAndReleaseMe); return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_TransitionScene_Orientation(lua_State *L) +OLUA_LIB int luaopen_cc_LayerMultiplex(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.LayerMultiplex")) { + luaL_error(L, "class not found: cocos2d::LayerMultiplex"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_cc_TransitionScene_Orientation(lua_State *L) { oluacls_class(L, "cc.TransitionScene.Orientation"); oluacls_func(L, "__index", olua_indexerror); @@ -40602,9 +42721,19 @@ OLUA_LIB int luaopen_cocos2d_TransitionScene_Orientation(lua_State *L) return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_TransitionScene_Orientation(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.TransitionScene.Orientation")) { + luaL_error(L, "class not found: cocos2d::TransitionScene::Orientation"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_TransitionScene_create(lua_State *L) +static int _olua_fun_cocos2d_TransitionScene_create(lua_State *L) { olua_startinvoke(L); @@ -40626,7 +42755,7 @@ static int _cocos2d_TransitionScene_create(lua_State *L) return num_ret; } -static int _cocos2d_TransitionScene_finish(lua_State *L) +static int _olua_fun_cocos2d_TransitionScene_finish(lua_State *L) { olua_startinvoke(L); @@ -40642,7 +42771,7 @@ static int _cocos2d_TransitionScene_finish(lua_State *L) return 0; } -static int _cocos2d_TransitionScene_getDuration(lua_State *L) +static int _olua_fun_cocos2d_TransitionScene_getDuration(lua_State *L) { olua_startinvoke(L); @@ -40659,7 +42788,7 @@ static int _cocos2d_TransitionScene_getDuration(lua_State *L) return num_ret; } -static int _cocos2d_TransitionScene_getInScene(lua_State *L) +static int _olua_fun_cocos2d_TransitionScene_getInScene(lua_State *L) { olua_startinvoke(L); @@ -40676,7 +42805,7 @@ static int _cocos2d_TransitionScene_getInScene(lua_State *L) return num_ret; } -static int _cocos2d_TransitionScene_hideOutShowIn(lua_State *L) +static int _olua_fun_cocos2d_TransitionScene_hideOutShowIn(lua_State *L) { olua_startinvoke(L); @@ -40692,11 +42821,11 @@ static int _cocos2d_TransitionScene_hideOutShowIn(lua_State *L) return 0; } -static int _cocos2d_TransitionScene_new(lua_State *L) +static int _olua_fun_cocos2d_TransitionScene_new(lua_State *L) { olua_startinvoke(L); - // TransitionScene() + // cocos2d::TransitionScene() cocos2d::TransitionScene *ret = new cocos2d::TransitionScene(); int num_ret = olua_push_object(L, ret, "cc.TransitionScene"); olua_postnew(L, ret); @@ -40706,24 +42835,33 @@ static int _cocos2d_TransitionScene_new(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_TransitionScene(lua_State *L) +static int _olua_cls_cc_TransitionScene(lua_State *L) { oluacls_class(L, "cc.TransitionScene"); - oluacls_func(L, "create", _cocos2d_TransitionScene_create); - oluacls_func(L, "finish", _cocos2d_TransitionScene_finish); - oluacls_func(L, "getDuration", _cocos2d_TransitionScene_getDuration); - oluacls_func(L, "getInScene", _cocos2d_TransitionScene_getInScene); - oluacls_func(L, "hideOutShowIn", _cocos2d_TransitionScene_hideOutShowIn); - oluacls_func(L, "new", _cocos2d_TransitionScene_new); - oluacls_prop(L, "duration", _cocos2d_TransitionScene_getDuration, nullptr); - oluacls_prop(L, "inScene", _cocos2d_TransitionScene_getInScene, nullptr); + oluacls_func(L, "create", _olua_fun_cocos2d_TransitionScene_create); + oluacls_func(L, "finish", _olua_fun_cocos2d_TransitionScene_finish); + oluacls_func(L, "getDuration", _olua_fun_cocos2d_TransitionScene_getDuration); + oluacls_func(L, "getInScene", _olua_fun_cocos2d_TransitionScene_getInScene); + oluacls_func(L, "hideOutShowIn", _olua_fun_cocos2d_TransitionScene_hideOutShowIn); + oluacls_func(L, "new", _olua_fun_cocos2d_TransitionScene_new); + oluacls_prop(L, "duration", _olua_fun_cocos2d_TransitionScene_getDuration, nullptr); + oluacls_prop(L, "inScene", _olua_fun_cocos2d_TransitionScene_getInScene, nullptr); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_TransitionScene(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.TransitionScene")) { + luaL_error(L, "class not found: cocos2d::TransitionScene"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_TransitionEaseScene___gc(lua_State *L) +static int _olua_fun_cocos2d_TransitionEaseScene___gc(lua_State *L) { olua_startinvoke(L); @@ -40735,7 +42873,7 @@ static int _cocos2d_TransitionEaseScene___gc(lua_State *L) return 0; } -static int _cocos2d_TransitionEaseScene___olua_move(lua_State *L) +static int _olua_fun_cocos2d_TransitionEaseScene___olua_move(lua_State *L) { olua_startinvoke(L); @@ -40747,7 +42885,7 @@ static int _cocos2d_TransitionEaseScene___olua_move(lua_State *L) return 1; } -static int _cocos2d_TransitionEaseScene_easeActionWithAction(lua_State *L) +static int _olua_fun_cocos2d_TransitionEaseScene_easeActionWithAction(lua_State *L) { olua_startinvoke(L); @@ -40769,19 +42907,28 @@ static int _cocos2d_TransitionEaseScene_easeActionWithAction(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_TransitionEaseScene(lua_State *L) +static int _olua_cls_cc_TransitionEaseScene(lua_State *L) { oluacls_class(L, "cc.TransitionEaseScene"); - oluacls_func(L, "__gc", _cocos2d_TransitionEaseScene___gc); - oluacls_func(L, "__olua_move", _cocos2d_TransitionEaseScene___olua_move); - oluacls_func(L, "easeActionWithAction", _cocos2d_TransitionEaseScene_easeActionWithAction); + oluacls_func(L, "__gc", _olua_fun_cocos2d_TransitionEaseScene___gc); + oluacls_func(L, "__olua_move", _olua_fun_cocos2d_TransitionEaseScene___olua_move); + oluacls_func(L, "easeActionWithAction", _olua_fun_cocos2d_TransitionEaseScene_easeActionWithAction); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_TransitionEaseScene(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.TransitionEaseScene")) { + luaL_error(L, "class not found: cocos2d::TransitionEaseScene"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_TransitionSceneOriented_create(lua_State *L) +static int _olua_fun_cocos2d_TransitionSceneOriented_create(lua_State *L) { olua_startinvoke(L); @@ -40805,11 +42952,11 @@ static int _cocos2d_TransitionSceneOriented_create(lua_State *L) return num_ret; } -static int _cocos2d_TransitionSceneOriented_new(lua_State *L) +static int _olua_fun_cocos2d_TransitionSceneOriented_new(lua_State *L) { olua_startinvoke(L); - // TransitionSceneOriented() + // cocos2d::TransitionSceneOriented() cocos2d::TransitionSceneOriented *ret = new cocos2d::TransitionSceneOriented(); int num_ret = olua_push_object(L, ret, "cc.TransitionSceneOriented"); olua_postnew(L, ret); @@ -40819,18 +42966,27 @@ static int _cocos2d_TransitionSceneOriented_new(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_TransitionSceneOriented(lua_State *L) +static int _olua_cls_cc_TransitionSceneOriented(lua_State *L) { oluacls_class(L, "cc.TransitionSceneOriented"); - oluacls_func(L, "create", _cocos2d_TransitionSceneOriented_create); - oluacls_func(L, "new", _cocos2d_TransitionSceneOriented_new); + oluacls_func(L, "create", _olua_fun_cocos2d_TransitionSceneOriented_create); + oluacls_func(L, "new", _olua_fun_cocos2d_TransitionSceneOriented_new); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_TransitionSceneOriented(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.TransitionSceneOriented")) { + luaL_error(L, "class not found: cocos2d::TransitionSceneOriented"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_TransitionRotoZoom_create(lua_State *L) +static int _olua_fun_cocos2d_TransitionRotoZoom_create(lua_State *L) { olua_startinvoke(L); @@ -40852,11 +43008,11 @@ static int _cocos2d_TransitionRotoZoom_create(lua_State *L) return num_ret; } -static int _cocos2d_TransitionRotoZoom_new(lua_State *L) +static int _olua_fun_cocos2d_TransitionRotoZoom_new(lua_State *L) { olua_startinvoke(L); - // TransitionRotoZoom() + // cocos2d::TransitionRotoZoom() cocos2d::TransitionRotoZoom *ret = new cocos2d::TransitionRotoZoom(); int num_ret = olua_push_object(L, ret, "cc.TransitionRotoZoom"); olua_postnew(L, ret); @@ -40866,18 +43022,27 @@ static int _cocos2d_TransitionRotoZoom_new(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_TransitionRotoZoom(lua_State *L) +static int _olua_cls_cc_TransitionRotoZoom(lua_State *L) { oluacls_class(L, "cc.TransitionRotoZoom"); - oluacls_func(L, "create", _cocos2d_TransitionRotoZoom_create); - oluacls_func(L, "new", _cocos2d_TransitionRotoZoom_new); + oluacls_func(L, "create", _olua_fun_cocos2d_TransitionRotoZoom_create); + oluacls_func(L, "new", _olua_fun_cocos2d_TransitionRotoZoom_new); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_TransitionRotoZoom(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.TransitionRotoZoom")) { + luaL_error(L, "class not found: cocos2d::TransitionRotoZoom"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_TransitionJumpZoom_create(lua_State *L) +static int _olua_fun_cocos2d_TransitionJumpZoom_create(lua_State *L) { olua_startinvoke(L); @@ -40899,11 +43064,11 @@ static int _cocos2d_TransitionJumpZoom_create(lua_State *L) return num_ret; } -static int _cocos2d_TransitionJumpZoom_new(lua_State *L) +static int _olua_fun_cocos2d_TransitionJumpZoom_new(lua_State *L) { olua_startinvoke(L); - // TransitionJumpZoom() + // cocos2d::TransitionJumpZoom() cocos2d::TransitionJumpZoom *ret = new cocos2d::TransitionJumpZoom(); int num_ret = olua_push_object(L, ret, "cc.TransitionJumpZoom"); olua_postnew(L, ret); @@ -40913,18 +43078,27 @@ static int _cocos2d_TransitionJumpZoom_new(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_TransitionJumpZoom(lua_State *L) +static int _olua_cls_cc_TransitionJumpZoom(lua_State *L) { oluacls_class(L, "cc.TransitionJumpZoom"); - oluacls_func(L, "create", _cocos2d_TransitionJumpZoom_create); - oluacls_func(L, "new", _cocos2d_TransitionJumpZoom_new); + oluacls_func(L, "create", _olua_fun_cocos2d_TransitionJumpZoom_create); + oluacls_func(L, "new", _olua_fun_cocos2d_TransitionJumpZoom_new); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_TransitionJumpZoom(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.TransitionJumpZoom")) { + luaL_error(L, "class not found: cocos2d::TransitionJumpZoom"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_TransitionMoveInL_action(lua_State *L) +static int _olua_fun_cocos2d_TransitionMoveInL_action(lua_State *L) { olua_startinvoke(L); @@ -40941,7 +43115,7 @@ static int _cocos2d_TransitionMoveInL_action(lua_State *L) return num_ret; } -static int _cocos2d_TransitionMoveInL_as(lua_State *L) +static int _olua_fun_cocos2d_TransitionMoveInL_as(lua_State *L) { olua_startinvoke(L); @@ -40969,7 +43143,7 @@ static int _cocos2d_TransitionMoveInL_as(lua_State *L) return 1; } -static int _cocos2d_TransitionMoveInL_create(lua_State *L) +static int _olua_fun_cocos2d_TransitionMoveInL_create(lua_State *L) { olua_startinvoke(L); @@ -40991,7 +43165,7 @@ static int _cocos2d_TransitionMoveInL_create(lua_State *L) return num_ret; } -static int _cocos2d_TransitionMoveInL_easeActionWithAction(lua_State *L) +static int _olua_fun_cocos2d_TransitionMoveInL_easeActionWithAction(lua_State *L) { olua_startinvoke(L); @@ -41013,11 +43187,11 @@ static int _cocos2d_TransitionMoveInL_easeActionWithAction(lua_State *L) return num_ret; } -static int _cocos2d_TransitionMoveInL_new(lua_State *L) +static int _olua_fun_cocos2d_TransitionMoveInL_new(lua_State *L) { olua_startinvoke(L); - // TransitionMoveInL() + // cocos2d::TransitionMoveInL() cocos2d::TransitionMoveInL *ret = new cocos2d::TransitionMoveInL(); int num_ret = olua_push_object(L, ret, "cc.TransitionMoveInL"); olua_postnew(L, ret); @@ -41027,21 +43201,30 @@ static int _cocos2d_TransitionMoveInL_new(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_TransitionMoveInL(lua_State *L) +static int _olua_cls_cc_TransitionMoveInL(lua_State *L) { oluacls_class(L, "cc.TransitionMoveInL"); - oluacls_func(L, "action", _cocos2d_TransitionMoveInL_action); - oluacls_func(L, "as", _cocos2d_TransitionMoveInL_as); - oluacls_func(L, "create", _cocos2d_TransitionMoveInL_create); - oluacls_func(L, "easeActionWithAction", _cocos2d_TransitionMoveInL_easeActionWithAction); - oluacls_func(L, "new", _cocos2d_TransitionMoveInL_new); + oluacls_func(L, "action", _olua_fun_cocos2d_TransitionMoveInL_action); + oluacls_func(L, "as", _olua_fun_cocos2d_TransitionMoveInL_as); + oluacls_func(L, "create", _olua_fun_cocos2d_TransitionMoveInL_create); + oluacls_func(L, "easeActionWithAction", _olua_fun_cocos2d_TransitionMoveInL_easeActionWithAction); + oluacls_func(L, "new", _olua_fun_cocos2d_TransitionMoveInL_new); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_TransitionMoveInL(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.TransitionMoveInL")) { + luaL_error(L, "class not found: cocos2d::TransitionMoveInL"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_TransitionMoveInR_create(lua_State *L) +static int _olua_fun_cocos2d_TransitionMoveInR_create(lua_State *L) { olua_startinvoke(L); @@ -41063,11 +43246,11 @@ static int _cocos2d_TransitionMoveInR_create(lua_State *L) return num_ret; } -static int _cocos2d_TransitionMoveInR_new(lua_State *L) +static int _olua_fun_cocos2d_TransitionMoveInR_new(lua_State *L) { olua_startinvoke(L); - // TransitionMoveInR() + // cocos2d::TransitionMoveInR() cocos2d::TransitionMoveInR *ret = new cocos2d::TransitionMoveInR(); int num_ret = olua_push_object(L, ret, "cc.TransitionMoveInR"); olua_postnew(L, ret); @@ -41077,18 +43260,27 @@ static int _cocos2d_TransitionMoveInR_new(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_TransitionMoveInR(lua_State *L) +static int _olua_cls_cc_TransitionMoveInR(lua_State *L) { oluacls_class(L, "cc.TransitionMoveInR"); - oluacls_func(L, "create", _cocos2d_TransitionMoveInR_create); - oluacls_func(L, "new", _cocos2d_TransitionMoveInR_new); + oluacls_func(L, "create", _olua_fun_cocos2d_TransitionMoveInR_create); + oluacls_func(L, "new", _olua_fun_cocos2d_TransitionMoveInR_new); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_TransitionMoveInR(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.TransitionMoveInR")) { + luaL_error(L, "class not found: cocos2d::TransitionMoveInR"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_TransitionMoveInT_create(lua_State *L) +static int _olua_fun_cocos2d_TransitionMoveInT_create(lua_State *L) { olua_startinvoke(L); @@ -41110,11 +43302,11 @@ static int _cocos2d_TransitionMoveInT_create(lua_State *L) return num_ret; } -static int _cocos2d_TransitionMoveInT_new(lua_State *L) +static int _olua_fun_cocos2d_TransitionMoveInT_new(lua_State *L) { olua_startinvoke(L); - // TransitionMoveInT() + // cocos2d::TransitionMoveInT() cocos2d::TransitionMoveInT *ret = new cocos2d::TransitionMoveInT(); int num_ret = olua_push_object(L, ret, "cc.TransitionMoveInT"); olua_postnew(L, ret); @@ -41124,18 +43316,27 @@ static int _cocos2d_TransitionMoveInT_new(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_TransitionMoveInT(lua_State *L) +static int _olua_cls_cc_TransitionMoveInT(lua_State *L) { oluacls_class(L, "cc.TransitionMoveInT"); - oluacls_func(L, "create", _cocos2d_TransitionMoveInT_create); - oluacls_func(L, "new", _cocos2d_TransitionMoveInT_new); + oluacls_func(L, "create", _olua_fun_cocos2d_TransitionMoveInT_create); + oluacls_func(L, "new", _olua_fun_cocos2d_TransitionMoveInT_new); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_TransitionMoveInT(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.TransitionMoveInT")) { + luaL_error(L, "class not found: cocos2d::TransitionMoveInT"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_TransitionMoveInB_create(lua_State *L) +static int _olua_fun_cocos2d_TransitionMoveInB_create(lua_State *L) { olua_startinvoke(L); @@ -41157,11 +43358,11 @@ static int _cocos2d_TransitionMoveInB_create(lua_State *L) return num_ret; } -static int _cocos2d_TransitionMoveInB_new(lua_State *L) +static int _olua_fun_cocos2d_TransitionMoveInB_new(lua_State *L) { olua_startinvoke(L); - // TransitionMoveInB() + // cocos2d::TransitionMoveInB() cocos2d::TransitionMoveInB *ret = new cocos2d::TransitionMoveInB(); int num_ret = olua_push_object(L, ret, "cc.TransitionMoveInB"); olua_postnew(L, ret); @@ -41171,18 +43372,27 @@ static int _cocos2d_TransitionMoveInB_new(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_TransitionMoveInB(lua_State *L) +static int _olua_cls_cc_TransitionMoveInB(lua_State *L) { oluacls_class(L, "cc.TransitionMoveInB"); - oluacls_func(L, "create", _cocos2d_TransitionMoveInB_create); - oluacls_func(L, "new", _cocos2d_TransitionMoveInB_new); + oluacls_func(L, "create", _olua_fun_cocos2d_TransitionMoveInB_create); + oluacls_func(L, "new", _olua_fun_cocos2d_TransitionMoveInB_new); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_TransitionMoveInB(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.TransitionMoveInB")) { + luaL_error(L, "class not found: cocos2d::TransitionMoveInB"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_TransitionSlideInL_action(lua_State *L) +static int _olua_fun_cocos2d_TransitionSlideInL_action(lua_State *L) { olua_startinvoke(L); @@ -41199,7 +43409,7 @@ static int _cocos2d_TransitionSlideInL_action(lua_State *L) return num_ret; } -static int _cocos2d_TransitionSlideInL_as(lua_State *L) +static int _olua_fun_cocos2d_TransitionSlideInL_as(lua_State *L) { olua_startinvoke(L); @@ -41227,7 +43437,7 @@ static int _cocos2d_TransitionSlideInL_as(lua_State *L) return 1; } -static int _cocos2d_TransitionSlideInL_create(lua_State *L) +static int _olua_fun_cocos2d_TransitionSlideInL_create(lua_State *L) { olua_startinvoke(L); @@ -41249,7 +43459,7 @@ static int _cocos2d_TransitionSlideInL_create(lua_State *L) return num_ret; } -static int _cocos2d_TransitionSlideInL_easeActionWithAction(lua_State *L) +static int _olua_fun_cocos2d_TransitionSlideInL_easeActionWithAction(lua_State *L) { olua_startinvoke(L); @@ -41271,11 +43481,11 @@ static int _cocos2d_TransitionSlideInL_easeActionWithAction(lua_State *L) return num_ret; } -static int _cocos2d_TransitionSlideInL_new(lua_State *L) +static int _olua_fun_cocos2d_TransitionSlideInL_new(lua_State *L) { olua_startinvoke(L); - // TransitionSlideInL() + // cocos2d::TransitionSlideInL() cocos2d::TransitionSlideInL *ret = new cocos2d::TransitionSlideInL(); int num_ret = olua_push_object(L, ret, "cc.TransitionSlideInL"); olua_postnew(L, ret); @@ -41285,21 +43495,30 @@ static int _cocos2d_TransitionSlideInL_new(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_TransitionSlideInL(lua_State *L) +static int _olua_cls_cc_TransitionSlideInL(lua_State *L) { oluacls_class(L, "cc.TransitionSlideInL"); - oluacls_func(L, "action", _cocos2d_TransitionSlideInL_action); - oluacls_func(L, "as", _cocos2d_TransitionSlideInL_as); - oluacls_func(L, "create", _cocos2d_TransitionSlideInL_create); - oluacls_func(L, "easeActionWithAction", _cocos2d_TransitionSlideInL_easeActionWithAction); - oluacls_func(L, "new", _cocos2d_TransitionSlideInL_new); + oluacls_func(L, "action", _olua_fun_cocos2d_TransitionSlideInL_action); + oluacls_func(L, "as", _olua_fun_cocos2d_TransitionSlideInL_as); + oluacls_func(L, "create", _olua_fun_cocos2d_TransitionSlideInL_create); + oluacls_func(L, "easeActionWithAction", _olua_fun_cocos2d_TransitionSlideInL_easeActionWithAction); + oluacls_func(L, "new", _olua_fun_cocos2d_TransitionSlideInL_new); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_TransitionSlideInL(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.TransitionSlideInL")) { + luaL_error(L, "class not found: cocos2d::TransitionSlideInL"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_TransitionSlideInR_create(lua_State *L) +static int _olua_fun_cocos2d_TransitionSlideInR_create(lua_State *L) { olua_startinvoke(L); @@ -41321,11 +43540,11 @@ static int _cocos2d_TransitionSlideInR_create(lua_State *L) return num_ret; } -static int _cocos2d_TransitionSlideInR_new(lua_State *L) +static int _olua_fun_cocos2d_TransitionSlideInR_new(lua_State *L) { olua_startinvoke(L); - // TransitionSlideInR() + // cocos2d::TransitionSlideInR() cocos2d::TransitionSlideInR *ret = new cocos2d::TransitionSlideInR(); int num_ret = olua_push_object(L, ret, "cc.TransitionSlideInR"); olua_postnew(L, ret); @@ -41335,18 +43554,27 @@ static int _cocos2d_TransitionSlideInR_new(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_TransitionSlideInR(lua_State *L) +static int _olua_cls_cc_TransitionSlideInR(lua_State *L) { oluacls_class(L, "cc.TransitionSlideInR"); - oluacls_func(L, "create", _cocos2d_TransitionSlideInR_create); - oluacls_func(L, "new", _cocos2d_TransitionSlideInR_new); + oluacls_func(L, "create", _olua_fun_cocos2d_TransitionSlideInR_create); + oluacls_func(L, "new", _olua_fun_cocos2d_TransitionSlideInR_new); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_TransitionSlideInR(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.TransitionSlideInR")) { + luaL_error(L, "class not found: cocos2d::TransitionSlideInR"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_TransitionSlideInB_create(lua_State *L) +static int _olua_fun_cocos2d_TransitionSlideInB_create(lua_State *L) { olua_startinvoke(L); @@ -41368,11 +43596,11 @@ static int _cocos2d_TransitionSlideInB_create(lua_State *L) return num_ret; } -static int _cocos2d_TransitionSlideInB_new(lua_State *L) +static int _olua_fun_cocos2d_TransitionSlideInB_new(lua_State *L) { olua_startinvoke(L); - // TransitionSlideInB() + // cocos2d::TransitionSlideInB() cocos2d::TransitionSlideInB *ret = new cocos2d::TransitionSlideInB(); int num_ret = olua_push_object(L, ret, "cc.TransitionSlideInB"); olua_postnew(L, ret); @@ -41382,18 +43610,27 @@ static int _cocos2d_TransitionSlideInB_new(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_TransitionSlideInB(lua_State *L) +static int _olua_cls_cc_TransitionSlideInB(lua_State *L) { oluacls_class(L, "cc.TransitionSlideInB"); - oluacls_func(L, "create", _cocos2d_TransitionSlideInB_create); - oluacls_func(L, "new", _cocos2d_TransitionSlideInB_new); + oluacls_func(L, "create", _olua_fun_cocos2d_TransitionSlideInB_create); + oluacls_func(L, "new", _olua_fun_cocos2d_TransitionSlideInB_new); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_TransitionSlideInB(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.TransitionSlideInB")) { + luaL_error(L, "class not found: cocos2d::TransitionSlideInB"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_TransitionSlideInT_create(lua_State *L) +static int _olua_fun_cocos2d_TransitionSlideInT_create(lua_State *L) { olua_startinvoke(L); @@ -41415,11 +43652,11 @@ static int _cocos2d_TransitionSlideInT_create(lua_State *L) return num_ret; } -static int _cocos2d_TransitionSlideInT_new(lua_State *L) +static int _olua_fun_cocos2d_TransitionSlideInT_new(lua_State *L) { olua_startinvoke(L); - // TransitionSlideInT() + // cocos2d::TransitionSlideInT() cocos2d::TransitionSlideInT *ret = new cocos2d::TransitionSlideInT(); int num_ret = olua_push_object(L, ret, "cc.TransitionSlideInT"); olua_postnew(L, ret); @@ -41429,18 +43666,27 @@ static int _cocos2d_TransitionSlideInT_new(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_TransitionSlideInT(lua_State *L) +static int _olua_cls_cc_TransitionSlideInT(lua_State *L) { oluacls_class(L, "cc.TransitionSlideInT"); - oluacls_func(L, "create", _cocos2d_TransitionSlideInT_create); - oluacls_func(L, "new", _cocos2d_TransitionSlideInT_new); + oluacls_func(L, "create", _olua_fun_cocos2d_TransitionSlideInT_create); + oluacls_func(L, "new", _olua_fun_cocos2d_TransitionSlideInT_new); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_TransitionSlideInT(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.TransitionSlideInT")) { + luaL_error(L, "class not found: cocos2d::TransitionSlideInT"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_TransitionShrinkGrow_as(lua_State *L) +static int _olua_fun_cocos2d_TransitionShrinkGrow_as(lua_State *L) { olua_startinvoke(L); @@ -41468,7 +43714,7 @@ static int _cocos2d_TransitionShrinkGrow_as(lua_State *L) return 1; } -static int _cocos2d_TransitionShrinkGrow_create(lua_State *L) +static int _olua_fun_cocos2d_TransitionShrinkGrow_create(lua_State *L) { olua_startinvoke(L); @@ -41490,7 +43736,7 @@ static int _cocos2d_TransitionShrinkGrow_create(lua_State *L) return num_ret; } -static int _cocos2d_TransitionShrinkGrow_easeActionWithAction(lua_State *L) +static int _olua_fun_cocos2d_TransitionShrinkGrow_easeActionWithAction(lua_State *L) { olua_startinvoke(L); @@ -41512,11 +43758,11 @@ static int _cocos2d_TransitionShrinkGrow_easeActionWithAction(lua_State *L) return num_ret; } -static int _cocos2d_TransitionShrinkGrow_new(lua_State *L) +static int _olua_fun_cocos2d_TransitionShrinkGrow_new(lua_State *L) { olua_startinvoke(L); - // TransitionShrinkGrow() + // cocos2d::TransitionShrinkGrow() cocos2d::TransitionShrinkGrow *ret = new cocos2d::TransitionShrinkGrow(); int num_ret = olua_push_object(L, ret, "cc.TransitionShrinkGrow"); olua_postnew(L, ret); @@ -41526,20 +43772,29 @@ static int _cocos2d_TransitionShrinkGrow_new(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_TransitionShrinkGrow(lua_State *L) +static int _olua_cls_cc_TransitionShrinkGrow(lua_State *L) { oluacls_class(L, "cc.TransitionShrinkGrow"); - oluacls_func(L, "as", _cocos2d_TransitionShrinkGrow_as); - oluacls_func(L, "create", _cocos2d_TransitionShrinkGrow_create); - oluacls_func(L, "easeActionWithAction", _cocos2d_TransitionShrinkGrow_easeActionWithAction); - oluacls_func(L, "new", _cocos2d_TransitionShrinkGrow_new); + oluacls_func(L, "as", _olua_fun_cocos2d_TransitionShrinkGrow_as); + oluacls_func(L, "create", _olua_fun_cocos2d_TransitionShrinkGrow_create); + oluacls_func(L, "easeActionWithAction", _olua_fun_cocos2d_TransitionShrinkGrow_easeActionWithAction); + oluacls_func(L, "new", _olua_fun_cocos2d_TransitionShrinkGrow_new); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_TransitionShrinkGrow(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.TransitionShrinkGrow")) { + luaL_error(L, "class not found: cocos2d::TransitionShrinkGrow"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_TransitionFlipX_create$1(lua_State *L) +static int _olua_fun_cocos2d_TransitionFlipX_create$1(lua_State *L) { olua_startinvoke(L); @@ -41563,7 +43818,7 @@ static int _cocos2d_TransitionFlipX_create$1(lua_State *L) return num_ret; } -static int _cocos2d_TransitionFlipX_create$2(lua_State *L) +static int _olua_fun_cocos2d_TransitionFlipX_create$2(lua_State *L) { olua_startinvoke(L); @@ -41585,21 +43840,21 @@ static int _cocos2d_TransitionFlipX_create$2(lua_State *L) return num_ret; } -static int _cocos2d_TransitionFlipX_create(lua_State *L) +static int _olua_fun_cocos2d_TransitionFlipX_create(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 2) { // if ((olua_is_number(L, 1)) && (olua_is_object(L, 2, "cc.Scene"))) { // static cocos2d::TransitionFlipX *create(float t, @addref(scenes |) cocos2d::Scene *s) - return _cocos2d_TransitionFlipX_create$2(L); + return _olua_fun_cocos2d_TransitionFlipX_create$2(L); // } } if (num_args == 3) { // if ((olua_is_number(L, 1)) && (olua_is_object(L, 2, "cc.Scene")) && (olua_is_enum(L, 3))) { // static cocos2d::TransitionFlipX *create(float t, @addref(scenes |) cocos2d::Scene *s, cocos2d::TransitionScene::Orientation o) - return _cocos2d_TransitionFlipX_create$1(L); + return _olua_fun_cocos2d_TransitionFlipX_create$1(L); // } } @@ -41608,11 +43863,11 @@ static int _cocos2d_TransitionFlipX_create(lua_State *L) return 0; } -static int _cocos2d_TransitionFlipX_new(lua_State *L) +static int _olua_fun_cocos2d_TransitionFlipX_new(lua_State *L) { olua_startinvoke(L); - // TransitionFlipX() + // cocos2d::TransitionFlipX() cocos2d::TransitionFlipX *ret = new cocos2d::TransitionFlipX(); int num_ret = olua_push_object(L, ret, "cc.TransitionFlipX"); olua_postnew(L, ret); @@ -41622,18 +43877,27 @@ static int _cocos2d_TransitionFlipX_new(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_TransitionFlipX(lua_State *L) +static int _olua_cls_cc_TransitionFlipX(lua_State *L) { oluacls_class(L, "cc.TransitionFlipX"); - oluacls_func(L, "create", _cocos2d_TransitionFlipX_create); - oluacls_func(L, "new", _cocos2d_TransitionFlipX_new); + oluacls_func(L, "create", _olua_fun_cocos2d_TransitionFlipX_create); + oluacls_func(L, "new", _olua_fun_cocos2d_TransitionFlipX_new); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_TransitionFlipX(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.TransitionFlipX")) { + luaL_error(L, "class not found: cocos2d::TransitionFlipX"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_TransitionFlipY_create$1(lua_State *L) +static int _olua_fun_cocos2d_TransitionFlipY_create$1(lua_State *L) { olua_startinvoke(L); @@ -41657,7 +43921,7 @@ static int _cocos2d_TransitionFlipY_create$1(lua_State *L) return num_ret; } -static int _cocos2d_TransitionFlipY_create$2(lua_State *L) +static int _olua_fun_cocos2d_TransitionFlipY_create$2(lua_State *L) { olua_startinvoke(L); @@ -41679,21 +43943,21 @@ static int _cocos2d_TransitionFlipY_create$2(lua_State *L) return num_ret; } -static int _cocos2d_TransitionFlipY_create(lua_State *L) +static int _olua_fun_cocos2d_TransitionFlipY_create(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 2) { // if ((olua_is_number(L, 1)) && (olua_is_object(L, 2, "cc.Scene"))) { // static cocos2d::TransitionFlipY *create(float t, @addref(scenes |) cocos2d::Scene *s) - return _cocos2d_TransitionFlipY_create$2(L); + return _olua_fun_cocos2d_TransitionFlipY_create$2(L); // } } if (num_args == 3) { // if ((olua_is_number(L, 1)) && (olua_is_object(L, 2, "cc.Scene")) && (olua_is_enum(L, 3))) { // static cocos2d::TransitionFlipY *create(float t, @addref(scenes |) cocos2d::Scene *s, cocos2d::TransitionScene::Orientation o) - return _cocos2d_TransitionFlipY_create$1(L); + return _olua_fun_cocos2d_TransitionFlipY_create$1(L); // } } @@ -41702,11 +43966,11 @@ static int _cocos2d_TransitionFlipY_create(lua_State *L) return 0; } -static int _cocos2d_TransitionFlipY_new(lua_State *L) +static int _olua_fun_cocos2d_TransitionFlipY_new(lua_State *L) { olua_startinvoke(L); - // TransitionFlipY() + // cocos2d::TransitionFlipY() cocos2d::TransitionFlipY *ret = new cocos2d::TransitionFlipY(); int num_ret = olua_push_object(L, ret, "cc.TransitionFlipY"); olua_postnew(L, ret); @@ -41716,18 +43980,27 @@ static int _cocos2d_TransitionFlipY_new(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_TransitionFlipY(lua_State *L) +static int _olua_cls_cc_TransitionFlipY(lua_State *L) { oluacls_class(L, "cc.TransitionFlipY"); - oluacls_func(L, "create", _cocos2d_TransitionFlipY_create); - oluacls_func(L, "new", _cocos2d_TransitionFlipY_new); + oluacls_func(L, "create", _olua_fun_cocos2d_TransitionFlipY_create); + oluacls_func(L, "new", _olua_fun_cocos2d_TransitionFlipY_new); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_TransitionFlipY(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.TransitionFlipY")) { + luaL_error(L, "class not found: cocos2d::TransitionFlipY"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_TransitionFlipAngular_create$1(lua_State *L) +static int _olua_fun_cocos2d_TransitionFlipAngular_create$1(lua_State *L) { olua_startinvoke(L); @@ -41751,7 +44024,7 @@ static int _cocos2d_TransitionFlipAngular_create$1(lua_State *L) return num_ret; } -static int _cocos2d_TransitionFlipAngular_create$2(lua_State *L) +static int _olua_fun_cocos2d_TransitionFlipAngular_create$2(lua_State *L) { olua_startinvoke(L); @@ -41773,21 +44046,21 @@ static int _cocos2d_TransitionFlipAngular_create$2(lua_State *L) return num_ret; } -static int _cocos2d_TransitionFlipAngular_create(lua_State *L) +static int _olua_fun_cocos2d_TransitionFlipAngular_create(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 2) { // if ((olua_is_number(L, 1)) && (olua_is_object(L, 2, "cc.Scene"))) { // static cocos2d::TransitionFlipAngular *create(float t, @addref(scenes |) cocos2d::Scene *s) - return _cocos2d_TransitionFlipAngular_create$2(L); + return _olua_fun_cocos2d_TransitionFlipAngular_create$2(L); // } } if (num_args == 3) { // if ((olua_is_number(L, 1)) && (olua_is_object(L, 2, "cc.Scene")) && (olua_is_enum(L, 3))) { // static cocos2d::TransitionFlipAngular *create(float t, @addref(scenes |) cocos2d::Scene *s, cocos2d::TransitionScene::Orientation o) - return _cocos2d_TransitionFlipAngular_create$1(L); + return _olua_fun_cocos2d_TransitionFlipAngular_create$1(L); // } } @@ -41796,11 +44069,11 @@ static int _cocos2d_TransitionFlipAngular_create(lua_State *L) return 0; } -static int _cocos2d_TransitionFlipAngular_new(lua_State *L) +static int _olua_fun_cocos2d_TransitionFlipAngular_new(lua_State *L) { olua_startinvoke(L); - // TransitionFlipAngular() + // cocos2d::TransitionFlipAngular() cocos2d::TransitionFlipAngular *ret = new cocos2d::TransitionFlipAngular(); int num_ret = olua_push_object(L, ret, "cc.TransitionFlipAngular"); olua_postnew(L, ret); @@ -41810,18 +44083,27 @@ static int _cocos2d_TransitionFlipAngular_new(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_TransitionFlipAngular(lua_State *L) +static int _olua_cls_cc_TransitionFlipAngular(lua_State *L) { oluacls_class(L, "cc.TransitionFlipAngular"); - oluacls_func(L, "create", _cocos2d_TransitionFlipAngular_create); - oluacls_func(L, "new", _cocos2d_TransitionFlipAngular_new); + oluacls_func(L, "create", _olua_fun_cocos2d_TransitionFlipAngular_create); + oluacls_func(L, "new", _olua_fun_cocos2d_TransitionFlipAngular_new); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_TransitionFlipAngular(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.TransitionFlipAngular")) { + luaL_error(L, "class not found: cocos2d::TransitionFlipAngular"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_TransitionZoomFlipX_create$1(lua_State *L) +static int _olua_fun_cocos2d_TransitionZoomFlipX_create$1(lua_State *L) { olua_startinvoke(L); @@ -41845,7 +44127,7 @@ static int _cocos2d_TransitionZoomFlipX_create$1(lua_State *L) return num_ret; } -static int _cocos2d_TransitionZoomFlipX_create$2(lua_State *L) +static int _olua_fun_cocos2d_TransitionZoomFlipX_create$2(lua_State *L) { olua_startinvoke(L); @@ -41867,21 +44149,21 @@ static int _cocos2d_TransitionZoomFlipX_create$2(lua_State *L) return num_ret; } -static int _cocos2d_TransitionZoomFlipX_create(lua_State *L) +static int _olua_fun_cocos2d_TransitionZoomFlipX_create(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 2) { // if ((olua_is_number(L, 1)) && (olua_is_object(L, 2, "cc.Scene"))) { // static cocos2d::TransitionZoomFlipX *create(float t, @addref(scenes |) cocos2d::Scene *s) - return _cocos2d_TransitionZoomFlipX_create$2(L); + return _olua_fun_cocos2d_TransitionZoomFlipX_create$2(L); // } } if (num_args == 3) { // if ((olua_is_number(L, 1)) && (olua_is_object(L, 2, "cc.Scene")) && (olua_is_enum(L, 3))) { // static cocos2d::TransitionZoomFlipX *create(float t, @addref(scenes |) cocos2d::Scene *s, cocos2d::TransitionScene::Orientation o) - return _cocos2d_TransitionZoomFlipX_create$1(L); + return _olua_fun_cocos2d_TransitionZoomFlipX_create$1(L); // } } @@ -41890,11 +44172,11 @@ static int _cocos2d_TransitionZoomFlipX_create(lua_State *L) return 0; } -static int _cocos2d_TransitionZoomFlipX_new(lua_State *L) +static int _olua_fun_cocos2d_TransitionZoomFlipX_new(lua_State *L) { olua_startinvoke(L); - // TransitionZoomFlipX() + // cocos2d::TransitionZoomFlipX() cocos2d::TransitionZoomFlipX *ret = new cocos2d::TransitionZoomFlipX(); int num_ret = olua_push_object(L, ret, "cc.TransitionZoomFlipX"); olua_postnew(L, ret); @@ -41904,18 +44186,27 @@ static int _cocos2d_TransitionZoomFlipX_new(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_TransitionZoomFlipX(lua_State *L) +static int _olua_cls_cc_TransitionZoomFlipX(lua_State *L) { oluacls_class(L, "cc.TransitionZoomFlipX"); - oluacls_func(L, "create", _cocos2d_TransitionZoomFlipX_create); - oluacls_func(L, "new", _cocos2d_TransitionZoomFlipX_new); + oluacls_func(L, "create", _olua_fun_cocos2d_TransitionZoomFlipX_create); + oluacls_func(L, "new", _olua_fun_cocos2d_TransitionZoomFlipX_new); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_TransitionZoomFlipX(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.TransitionZoomFlipX")) { + luaL_error(L, "class not found: cocos2d::TransitionZoomFlipX"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_TransitionZoomFlipY_create$1(lua_State *L) +static int _olua_fun_cocos2d_TransitionZoomFlipY_create$1(lua_State *L) { olua_startinvoke(L); @@ -41939,7 +44230,7 @@ static int _cocos2d_TransitionZoomFlipY_create$1(lua_State *L) return num_ret; } -static int _cocos2d_TransitionZoomFlipY_create$2(lua_State *L) +static int _olua_fun_cocos2d_TransitionZoomFlipY_create$2(lua_State *L) { olua_startinvoke(L); @@ -41961,21 +44252,21 @@ static int _cocos2d_TransitionZoomFlipY_create$2(lua_State *L) return num_ret; } -static int _cocos2d_TransitionZoomFlipY_create(lua_State *L) +static int _olua_fun_cocos2d_TransitionZoomFlipY_create(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 2) { // if ((olua_is_number(L, 1)) && (olua_is_object(L, 2, "cc.Scene"))) { // static cocos2d::TransitionZoomFlipY *create(float t, @addref(scenes |) cocos2d::Scene *s) - return _cocos2d_TransitionZoomFlipY_create$2(L); + return _olua_fun_cocos2d_TransitionZoomFlipY_create$2(L); // } } if (num_args == 3) { // if ((olua_is_number(L, 1)) && (olua_is_object(L, 2, "cc.Scene")) && (olua_is_enum(L, 3))) { // static cocos2d::TransitionZoomFlipY *create(float t, @addref(scenes |) cocos2d::Scene *s, cocos2d::TransitionScene::Orientation o) - return _cocos2d_TransitionZoomFlipY_create$1(L); + return _olua_fun_cocos2d_TransitionZoomFlipY_create$1(L); // } } @@ -41984,11 +44275,11 @@ static int _cocos2d_TransitionZoomFlipY_create(lua_State *L) return 0; } -static int _cocos2d_TransitionZoomFlipY_new(lua_State *L) +static int _olua_fun_cocos2d_TransitionZoomFlipY_new(lua_State *L) { olua_startinvoke(L); - // TransitionZoomFlipY() + // cocos2d::TransitionZoomFlipY() cocos2d::TransitionZoomFlipY *ret = new cocos2d::TransitionZoomFlipY(); int num_ret = olua_push_object(L, ret, "cc.TransitionZoomFlipY"); olua_postnew(L, ret); @@ -41998,18 +44289,27 @@ static int _cocos2d_TransitionZoomFlipY_new(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_TransitionZoomFlipY(lua_State *L) +static int _olua_cls_cc_TransitionZoomFlipY(lua_State *L) { oluacls_class(L, "cc.TransitionZoomFlipY"); - oluacls_func(L, "create", _cocos2d_TransitionZoomFlipY_create); - oluacls_func(L, "new", _cocos2d_TransitionZoomFlipY_new); + oluacls_func(L, "create", _olua_fun_cocos2d_TransitionZoomFlipY_create); + oluacls_func(L, "new", _olua_fun_cocos2d_TransitionZoomFlipY_new); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_TransitionZoomFlipY(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.TransitionZoomFlipY")) { + luaL_error(L, "class not found: cocos2d::TransitionZoomFlipY"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_TransitionZoomFlipAngular_create$1(lua_State *L) +static int _olua_fun_cocos2d_TransitionZoomFlipAngular_create$1(lua_State *L) { olua_startinvoke(L); @@ -42033,7 +44333,7 @@ static int _cocos2d_TransitionZoomFlipAngular_create$1(lua_State *L) return num_ret; } -static int _cocos2d_TransitionZoomFlipAngular_create$2(lua_State *L) +static int _olua_fun_cocos2d_TransitionZoomFlipAngular_create$2(lua_State *L) { olua_startinvoke(L); @@ -42055,21 +44355,21 @@ static int _cocos2d_TransitionZoomFlipAngular_create$2(lua_State *L) return num_ret; } -static int _cocos2d_TransitionZoomFlipAngular_create(lua_State *L) +static int _olua_fun_cocos2d_TransitionZoomFlipAngular_create(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 2) { // if ((olua_is_number(L, 1)) && (olua_is_object(L, 2, "cc.Scene"))) { // static cocos2d::TransitionZoomFlipAngular *create(float t, @addref(scenes |) cocos2d::Scene *s) - return _cocos2d_TransitionZoomFlipAngular_create$2(L); + return _olua_fun_cocos2d_TransitionZoomFlipAngular_create$2(L); // } } if (num_args == 3) { // if ((olua_is_number(L, 1)) && (olua_is_object(L, 2, "cc.Scene")) && (olua_is_enum(L, 3))) { // static cocos2d::TransitionZoomFlipAngular *create(float t, @addref(scenes |) cocos2d::Scene *s, cocos2d::TransitionScene::Orientation o) - return _cocos2d_TransitionZoomFlipAngular_create$1(L); + return _olua_fun_cocos2d_TransitionZoomFlipAngular_create$1(L); // } } @@ -42078,11 +44378,11 @@ static int _cocos2d_TransitionZoomFlipAngular_create(lua_State *L) return 0; } -static int _cocos2d_TransitionZoomFlipAngular_new(lua_State *L) +static int _olua_fun_cocos2d_TransitionZoomFlipAngular_new(lua_State *L) { olua_startinvoke(L); - // TransitionZoomFlipAngular() + // cocos2d::TransitionZoomFlipAngular() cocos2d::TransitionZoomFlipAngular *ret = new cocos2d::TransitionZoomFlipAngular(); int num_ret = olua_push_object(L, ret, "cc.TransitionZoomFlipAngular"); olua_postnew(L, ret); @@ -42092,18 +44392,27 @@ static int _cocos2d_TransitionZoomFlipAngular_new(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_TransitionZoomFlipAngular(lua_State *L) +static int _olua_cls_cc_TransitionZoomFlipAngular(lua_State *L) { oluacls_class(L, "cc.TransitionZoomFlipAngular"); - oluacls_func(L, "create", _cocos2d_TransitionZoomFlipAngular_create); - oluacls_func(L, "new", _cocos2d_TransitionZoomFlipAngular_new); + oluacls_func(L, "create", _olua_fun_cocos2d_TransitionZoomFlipAngular_create); + oluacls_func(L, "new", _olua_fun_cocos2d_TransitionZoomFlipAngular_new); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_TransitionZoomFlipAngular(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.TransitionZoomFlipAngular")) { + luaL_error(L, "class not found: cocos2d::TransitionZoomFlipAngular"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_TransitionFade_create$1(lua_State *L) +static int _olua_fun_cocos2d_TransitionFade_create$1(lua_State *L) { olua_startinvoke(L); @@ -42127,7 +44436,7 @@ static int _cocos2d_TransitionFade_create$1(lua_State *L) return num_ret; } -static int _cocos2d_TransitionFade_create$2(lua_State *L) +static int _olua_fun_cocos2d_TransitionFade_create$2(lua_State *L) { olua_startinvoke(L); @@ -42149,21 +44458,21 @@ static int _cocos2d_TransitionFade_create$2(lua_State *L) return num_ret; } -static int _cocos2d_TransitionFade_create(lua_State *L) +static int _olua_fun_cocos2d_TransitionFade_create(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 2) { // if ((olua_is_number(L, 1)) && (olua_is_object(L, 2, "cc.Scene"))) { // static cocos2d::TransitionFade *create(float duration, @addref(scenes |) cocos2d::Scene *scene) - return _cocos2d_TransitionFade_create$2(L); + return _olua_fun_cocos2d_TransitionFade_create$2(L); // } } if (num_args == 3) { // if ((olua_is_number(L, 1)) && (olua_is_object(L, 2, "cc.Scene")) && (olua_is_cocos2d_Color3B(L, 3))) { // static cocos2d::TransitionFade *create(float duration, @addref(scenes |) cocos2d::Scene *scene, const cocos2d::Color3B &color) - return _cocos2d_TransitionFade_create$1(L); + return _olua_fun_cocos2d_TransitionFade_create$1(L); // } } @@ -42172,11 +44481,11 @@ static int _cocos2d_TransitionFade_create(lua_State *L) return 0; } -static int _cocos2d_TransitionFade_new(lua_State *L) +static int _olua_fun_cocos2d_TransitionFade_new(lua_State *L) { olua_startinvoke(L); - // TransitionFade() + // cocos2d::TransitionFade() cocos2d::TransitionFade *ret = new cocos2d::TransitionFade(); int num_ret = olua_push_object(L, ret, "cc.TransitionFade"); olua_postnew(L, ret); @@ -42186,18 +44495,27 @@ static int _cocos2d_TransitionFade_new(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_TransitionFade(lua_State *L) +static int _olua_cls_cc_TransitionFade(lua_State *L) { oluacls_class(L, "cc.TransitionFade"); - oluacls_func(L, "create", _cocos2d_TransitionFade_create); - oluacls_func(L, "new", _cocos2d_TransitionFade_new); + oluacls_func(L, "create", _olua_fun_cocos2d_TransitionFade_create); + oluacls_func(L, "new", _olua_fun_cocos2d_TransitionFade_new); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_TransitionFade(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.TransitionFade")) { + luaL_error(L, "class not found: cocos2d::TransitionFade"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_TransitionCrossFade_create(lua_State *L) +static int _olua_fun_cocos2d_TransitionCrossFade_create(lua_State *L) { olua_startinvoke(L); @@ -42219,11 +44537,11 @@ static int _cocos2d_TransitionCrossFade_create(lua_State *L) return num_ret; } -static int _cocos2d_TransitionCrossFade_new(lua_State *L) +static int _olua_fun_cocos2d_TransitionCrossFade_new(lua_State *L) { olua_startinvoke(L); - // TransitionCrossFade() + // cocos2d::TransitionCrossFade() cocos2d::TransitionCrossFade *ret = new cocos2d::TransitionCrossFade(); int num_ret = olua_push_object(L, ret, "cc.TransitionCrossFade"); olua_postnew(L, ret); @@ -42233,18 +44551,27 @@ static int _cocos2d_TransitionCrossFade_new(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_TransitionCrossFade(lua_State *L) +static int _olua_cls_cc_TransitionCrossFade(lua_State *L) { oluacls_class(L, "cc.TransitionCrossFade"); - oluacls_func(L, "create", _cocos2d_TransitionCrossFade_create); - oluacls_func(L, "new", _cocos2d_TransitionCrossFade_new); + oluacls_func(L, "create", _olua_fun_cocos2d_TransitionCrossFade_create); + oluacls_func(L, "new", _olua_fun_cocos2d_TransitionCrossFade_new); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_TransitionCrossFade(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.TransitionCrossFade")) { + luaL_error(L, "class not found: cocos2d::TransitionCrossFade"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_TransitionTurnOffTiles_as(lua_State *L) +static int _olua_fun_cocos2d_TransitionTurnOffTiles_as(lua_State *L) { olua_startinvoke(L); @@ -42272,7 +44599,7 @@ static int _cocos2d_TransitionTurnOffTiles_as(lua_State *L) return 1; } -static int _cocos2d_TransitionTurnOffTiles_create(lua_State *L) +static int _olua_fun_cocos2d_TransitionTurnOffTiles_create(lua_State *L) { olua_startinvoke(L); @@ -42294,7 +44621,7 @@ static int _cocos2d_TransitionTurnOffTiles_create(lua_State *L) return num_ret; } -static int _cocos2d_TransitionTurnOffTiles_easeActionWithAction(lua_State *L) +static int _olua_fun_cocos2d_TransitionTurnOffTiles_easeActionWithAction(lua_State *L) { olua_startinvoke(L); @@ -42316,11 +44643,11 @@ static int _cocos2d_TransitionTurnOffTiles_easeActionWithAction(lua_State *L) return num_ret; } -static int _cocos2d_TransitionTurnOffTiles_new(lua_State *L) +static int _olua_fun_cocos2d_TransitionTurnOffTiles_new(lua_State *L) { olua_startinvoke(L); - // TransitionTurnOffTiles() + // cocos2d::TransitionTurnOffTiles() cocos2d::TransitionTurnOffTiles *ret = new cocos2d::TransitionTurnOffTiles(); int num_ret = olua_push_object(L, ret, "cc.TransitionTurnOffTiles"); olua_postnew(L, ret); @@ -42330,20 +44657,29 @@ static int _cocos2d_TransitionTurnOffTiles_new(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_TransitionTurnOffTiles(lua_State *L) +static int _olua_cls_cc_TransitionTurnOffTiles(lua_State *L) { oluacls_class(L, "cc.TransitionTurnOffTiles"); - oluacls_func(L, "as", _cocos2d_TransitionTurnOffTiles_as); - oluacls_func(L, "create", _cocos2d_TransitionTurnOffTiles_create); - oluacls_func(L, "easeActionWithAction", _cocos2d_TransitionTurnOffTiles_easeActionWithAction); - oluacls_func(L, "new", _cocos2d_TransitionTurnOffTiles_new); + oluacls_func(L, "as", _olua_fun_cocos2d_TransitionTurnOffTiles_as); + oluacls_func(L, "create", _olua_fun_cocos2d_TransitionTurnOffTiles_create); + oluacls_func(L, "easeActionWithAction", _olua_fun_cocos2d_TransitionTurnOffTiles_easeActionWithAction); + oluacls_func(L, "new", _olua_fun_cocos2d_TransitionTurnOffTiles_new); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_TransitionTurnOffTiles(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.TransitionTurnOffTiles")) { + luaL_error(L, "class not found: cocos2d::TransitionTurnOffTiles"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_TransitionSplitCols_action(lua_State *L) +static int _olua_fun_cocos2d_TransitionSplitCols_action(lua_State *L) { olua_startinvoke(L); @@ -42360,7 +44696,7 @@ static int _cocos2d_TransitionSplitCols_action(lua_State *L) return num_ret; } -static int _cocos2d_TransitionSplitCols_as(lua_State *L) +static int _olua_fun_cocos2d_TransitionSplitCols_as(lua_State *L) { olua_startinvoke(L); @@ -42388,7 +44724,7 @@ static int _cocos2d_TransitionSplitCols_as(lua_State *L) return 1; } -static int _cocos2d_TransitionSplitCols_create(lua_State *L) +static int _olua_fun_cocos2d_TransitionSplitCols_create(lua_State *L) { olua_startinvoke(L); @@ -42410,7 +44746,7 @@ static int _cocos2d_TransitionSplitCols_create(lua_State *L) return num_ret; } -static int _cocos2d_TransitionSplitCols_easeActionWithAction(lua_State *L) +static int _olua_fun_cocos2d_TransitionSplitCols_easeActionWithAction(lua_State *L) { olua_startinvoke(L); @@ -42432,11 +44768,11 @@ static int _cocos2d_TransitionSplitCols_easeActionWithAction(lua_State *L) return num_ret; } -static int _cocos2d_TransitionSplitCols_new(lua_State *L) +static int _olua_fun_cocos2d_TransitionSplitCols_new(lua_State *L) { olua_startinvoke(L); - // TransitionSplitCols() + // cocos2d::TransitionSplitCols() cocos2d::TransitionSplitCols *ret = new cocos2d::TransitionSplitCols(); int num_ret = olua_push_object(L, ret, "cc.TransitionSplitCols"); olua_postnew(L, ret); @@ -42446,21 +44782,30 @@ static int _cocos2d_TransitionSplitCols_new(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_TransitionSplitCols(lua_State *L) +static int _olua_cls_cc_TransitionSplitCols(lua_State *L) { oluacls_class(L, "cc.TransitionSplitCols"); - oluacls_func(L, "action", _cocos2d_TransitionSplitCols_action); - oluacls_func(L, "as", _cocos2d_TransitionSplitCols_as); - oluacls_func(L, "create", _cocos2d_TransitionSplitCols_create); - oluacls_func(L, "easeActionWithAction", _cocos2d_TransitionSplitCols_easeActionWithAction); - oluacls_func(L, "new", _cocos2d_TransitionSplitCols_new); + oluacls_func(L, "action", _olua_fun_cocos2d_TransitionSplitCols_action); + oluacls_func(L, "as", _olua_fun_cocos2d_TransitionSplitCols_as); + oluacls_func(L, "create", _olua_fun_cocos2d_TransitionSplitCols_create); + oluacls_func(L, "easeActionWithAction", _olua_fun_cocos2d_TransitionSplitCols_easeActionWithAction); + oluacls_func(L, "new", _olua_fun_cocos2d_TransitionSplitCols_new); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_TransitionSplitCols(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.TransitionSplitCols")) { + luaL_error(L, "class not found: cocos2d::TransitionSplitCols"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_TransitionSplitRows_create(lua_State *L) +static int _olua_fun_cocos2d_TransitionSplitRows_create(lua_State *L) { olua_startinvoke(L); @@ -42482,11 +44827,11 @@ static int _cocos2d_TransitionSplitRows_create(lua_State *L) return num_ret; } -static int _cocos2d_TransitionSplitRows_new(lua_State *L) +static int _olua_fun_cocos2d_TransitionSplitRows_new(lua_State *L) { olua_startinvoke(L); - // TransitionSplitRows() + // cocos2d::TransitionSplitRows() cocos2d::TransitionSplitRows *ret = new cocos2d::TransitionSplitRows(); int num_ret = olua_push_object(L, ret, "cc.TransitionSplitRows"); olua_postnew(L, ret); @@ -42496,29 +44841,38 @@ static int _cocos2d_TransitionSplitRows_new(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_TransitionSplitRows(lua_State *L) +static int _olua_cls_cc_TransitionSplitRows(lua_State *L) { oluacls_class(L, "cc.TransitionSplitRows"); - oluacls_func(L, "create", _cocos2d_TransitionSplitRows_create); - oluacls_func(L, "new", _cocos2d_TransitionSplitRows_new); + oluacls_func(L, "create", _olua_fun_cocos2d_TransitionSplitRows_create); + oluacls_func(L, "new", _olua_fun_cocos2d_TransitionSplitRows_new); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_TransitionSplitRows(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.TransitionSplitRows")) { + luaL_error(L, "class not found: cocos2d::TransitionSplitRows"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_TransitionFadeTR_actionWithSize(lua_State *L) +static int _olua_fun_cocos2d_TransitionFadeTR_actionWithSize(lua_State *L) { olua_startinvoke(L); cocos2d::TransitionFadeTR *self = nullptr; - cocos2d::Size arg1; /** size */ + cocos2d::Size *arg1; /** size */ olua_to_object(L, 1, &self, "cc.TransitionFadeTR"); olua_check_object(L, 2, &arg1, "cc.Size"); // cocos2d::ActionInterval *actionWithSize(const cocos2d::Size &size) - cocos2d::ActionInterval *ret = self->actionWithSize(arg1); + cocos2d::ActionInterval *ret = self->actionWithSize(*arg1); int num_ret = olua_push_object(L, ret, "cc.ActionInterval"); olua_endinvoke(L); @@ -42526,7 +44880,7 @@ static int _cocos2d_TransitionFadeTR_actionWithSize(lua_State *L) return num_ret; } -static int _cocos2d_TransitionFadeTR_as(lua_State *L) +static int _olua_fun_cocos2d_TransitionFadeTR_as(lua_State *L) { olua_startinvoke(L); @@ -42554,7 +44908,7 @@ static int _cocos2d_TransitionFadeTR_as(lua_State *L) return 1; } -static int _cocos2d_TransitionFadeTR_create(lua_State *L) +static int _olua_fun_cocos2d_TransitionFadeTR_create(lua_State *L) { olua_startinvoke(L); @@ -42576,7 +44930,7 @@ static int _cocos2d_TransitionFadeTR_create(lua_State *L) return num_ret; } -static int _cocos2d_TransitionFadeTR_easeActionWithAction(lua_State *L) +static int _olua_fun_cocos2d_TransitionFadeTR_easeActionWithAction(lua_State *L) { olua_startinvoke(L); @@ -42598,11 +44952,11 @@ static int _cocos2d_TransitionFadeTR_easeActionWithAction(lua_State *L) return num_ret; } -static int _cocos2d_TransitionFadeTR_new(lua_State *L) +static int _olua_fun_cocos2d_TransitionFadeTR_new(lua_State *L) { olua_startinvoke(L); - // TransitionFadeTR() + // cocos2d::TransitionFadeTR() cocos2d::TransitionFadeTR *ret = new cocos2d::TransitionFadeTR(); int num_ret = olua_push_object(L, ret, "cc.TransitionFadeTR"); olua_postnew(L, ret); @@ -42612,21 +44966,30 @@ static int _cocos2d_TransitionFadeTR_new(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_TransitionFadeTR(lua_State *L) +static int _olua_cls_cc_TransitionFadeTR(lua_State *L) { oluacls_class(L, "cc.TransitionFadeTR"); - oluacls_func(L, "actionWithSize", _cocos2d_TransitionFadeTR_actionWithSize); - oluacls_func(L, "as", _cocos2d_TransitionFadeTR_as); - oluacls_func(L, "create", _cocos2d_TransitionFadeTR_create); - oluacls_func(L, "easeActionWithAction", _cocos2d_TransitionFadeTR_easeActionWithAction); - oluacls_func(L, "new", _cocos2d_TransitionFadeTR_new); + oluacls_func(L, "actionWithSize", _olua_fun_cocos2d_TransitionFadeTR_actionWithSize); + oluacls_func(L, "as", _olua_fun_cocos2d_TransitionFadeTR_as); + oluacls_func(L, "create", _olua_fun_cocos2d_TransitionFadeTR_create); + oluacls_func(L, "easeActionWithAction", _olua_fun_cocos2d_TransitionFadeTR_easeActionWithAction); + oluacls_func(L, "new", _olua_fun_cocos2d_TransitionFadeTR_new); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_TransitionFadeTR(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.TransitionFadeTR")) { + luaL_error(L, "class not found: cocos2d::TransitionFadeTR"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_TransitionFadeBL_create(lua_State *L) +static int _olua_fun_cocos2d_TransitionFadeBL_create(lua_State *L) { olua_startinvoke(L); @@ -42648,11 +45011,11 @@ static int _cocos2d_TransitionFadeBL_create(lua_State *L) return num_ret; } -static int _cocos2d_TransitionFadeBL_new(lua_State *L) +static int _olua_fun_cocos2d_TransitionFadeBL_new(lua_State *L) { olua_startinvoke(L); - // TransitionFadeBL() + // cocos2d::TransitionFadeBL() cocos2d::TransitionFadeBL *ret = new cocos2d::TransitionFadeBL(); int num_ret = olua_push_object(L, ret, "cc.TransitionFadeBL"); olua_postnew(L, ret); @@ -42662,18 +45025,27 @@ static int _cocos2d_TransitionFadeBL_new(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_TransitionFadeBL(lua_State *L) +static int _olua_cls_cc_TransitionFadeBL(lua_State *L) { oluacls_class(L, "cc.TransitionFadeBL"); - oluacls_func(L, "create", _cocos2d_TransitionFadeBL_create); - oluacls_func(L, "new", _cocos2d_TransitionFadeBL_new); + oluacls_func(L, "create", _olua_fun_cocos2d_TransitionFadeBL_create); + oluacls_func(L, "new", _olua_fun_cocos2d_TransitionFadeBL_new); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_TransitionFadeBL(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.TransitionFadeBL")) { + luaL_error(L, "class not found: cocos2d::TransitionFadeBL"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_TransitionFadeUp_create(lua_State *L) +static int _olua_fun_cocos2d_TransitionFadeUp_create(lua_State *L) { olua_startinvoke(L); @@ -42695,11 +45067,11 @@ static int _cocos2d_TransitionFadeUp_create(lua_State *L) return num_ret; } -static int _cocos2d_TransitionFadeUp_new(lua_State *L) +static int _olua_fun_cocos2d_TransitionFadeUp_new(lua_State *L) { olua_startinvoke(L); - // TransitionFadeUp() + // cocos2d::TransitionFadeUp() cocos2d::TransitionFadeUp *ret = new cocos2d::TransitionFadeUp(); int num_ret = olua_push_object(L, ret, "cc.TransitionFadeUp"); olua_postnew(L, ret); @@ -42709,18 +45081,27 @@ static int _cocos2d_TransitionFadeUp_new(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_TransitionFadeUp(lua_State *L) +static int _olua_cls_cc_TransitionFadeUp(lua_State *L) { oluacls_class(L, "cc.TransitionFadeUp"); - oluacls_func(L, "create", _cocos2d_TransitionFadeUp_create); - oluacls_func(L, "new", _cocos2d_TransitionFadeUp_new); + oluacls_func(L, "create", _olua_fun_cocos2d_TransitionFadeUp_create); + oluacls_func(L, "new", _olua_fun_cocos2d_TransitionFadeUp_new); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_TransitionFadeUp(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.TransitionFadeUp")) { + luaL_error(L, "class not found: cocos2d::TransitionFadeUp"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_TransitionFadeDown_create(lua_State *L) +static int _olua_fun_cocos2d_TransitionFadeDown_create(lua_State *L) { olua_startinvoke(L); @@ -42742,11 +45123,11 @@ static int _cocos2d_TransitionFadeDown_create(lua_State *L) return num_ret; } -static int _cocos2d_TransitionFadeDown_new(lua_State *L) +static int _olua_fun_cocos2d_TransitionFadeDown_new(lua_State *L) { olua_startinvoke(L); - // TransitionFadeDown() + // cocos2d::TransitionFadeDown() cocos2d::TransitionFadeDown *ret = new cocos2d::TransitionFadeDown(); int num_ret = olua_push_object(L, ret, "cc.TransitionFadeDown"); olua_postnew(L, ret); @@ -42756,29 +45137,38 @@ static int _cocos2d_TransitionFadeDown_new(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_TransitionFadeDown(lua_State *L) +static int _olua_cls_cc_TransitionFadeDown(lua_State *L) { oluacls_class(L, "cc.TransitionFadeDown"); - oluacls_func(L, "create", _cocos2d_TransitionFadeDown_create); - oluacls_func(L, "new", _cocos2d_TransitionFadeDown_new); + oluacls_func(L, "create", _olua_fun_cocos2d_TransitionFadeDown_create); + oluacls_func(L, "new", _olua_fun_cocos2d_TransitionFadeDown_new); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_TransitionFadeDown(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.TransitionFadeDown")) { + luaL_error(L, "class not found: cocos2d::TransitionFadeDown"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_TransitionPageTurn_actionWithSize(lua_State *L) +static int _olua_fun_cocos2d_TransitionPageTurn_actionWithSize(lua_State *L) { olua_startinvoke(L); cocos2d::TransitionPageTurn *self = nullptr; - cocos2d::Size arg1; /** vector */ + cocos2d::Size *arg1; /** vector */ olua_to_object(L, 1, &self, "cc.TransitionPageTurn"); olua_check_object(L, 2, &arg1, "cc.Size"); // cocos2d::ActionInterval *actionWithSize(const cocos2d::Size &vector) - cocos2d::ActionInterval *ret = self->actionWithSize(arg1); + cocos2d::ActionInterval *ret = self->actionWithSize(*arg1); int num_ret = olua_push_object(L, ret, "cc.ActionInterval"); olua_endinvoke(L); @@ -42786,7 +45176,7 @@ static int _cocos2d_TransitionPageTurn_actionWithSize(lua_State *L) return num_ret; } -static int _cocos2d_TransitionPageTurn_create(lua_State *L) +static int _olua_fun_cocos2d_TransitionPageTurn_create(lua_State *L) { olua_startinvoke(L); @@ -42810,11 +45200,11 @@ static int _cocos2d_TransitionPageTurn_create(lua_State *L) return num_ret; } -static int _cocos2d_TransitionPageTurn_new(lua_State *L) +static int _olua_fun_cocos2d_TransitionPageTurn_new(lua_State *L) { olua_startinvoke(L); - // TransitionPageTurn() + // cocos2d::TransitionPageTurn() cocos2d::TransitionPageTurn *ret = new cocos2d::TransitionPageTurn(); int num_ret = olua_push_object(L, ret, "cc.TransitionPageTurn"); olua_postnew(L, ret); @@ -42824,19 +45214,28 @@ static int _cocos2d_TransitionPageTurn_new(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_TransitionPageTurn(lua_State *L) +static int _olua_cls_cc_TransitionPageTurn(lua_State *L) { oluacls_class(L, "cc.TransitionPageTurn"); - oluacls_func(L, "actionWithSize", _cocos2d_TransitionPageTurn_actionWithSize); - oluacls_func(L, "create", _cocos2d_TransitionPageTurn_create); - oluacls_func(L, "new", _cocos2d_TransitionPageTurn_new); + oluacls_func(L, "actionWithSize", _olua_fun_cocos2d_TransitionPageTurn_actionWithSize); + oluacls_func(L, "create", _olua_fun_cocos2d_TransitionPageTurn_create); + oluacls_func(L, "new", _olua_fun_cocos2d_TransitionPageTurn_new); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_TransitionPageTurn(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.TransitionPageTurn")) { + luaL_error(L, "class not found: cocos2d::TransitionPageTurn"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_TransitionProgress_create(lua_State *L) +static int _olua_fun_cocos2d_TransitionProgress_create(lua_State *L) { olua_startinvoke(L); @@ -42858,11 +45257,11 @@ static int _cocos2d_TransitionProgress_create(lua_State *L) return num_ret; } -static int _cocos2d_TransitionProgress_new(lua_State *L) +static int _olua_fun_cocos2d_TransitionProgress_new(lua_State *L) { olua_startinvoke(L); - // TransitionProgress() + // cocos2d::TransitionProgress() cocos2d::TransitionProgress *ret = new cocos2d::TransitionProgress(); int num_ret = olua_push_object(L, ret, "cc.TransitionProgress"); olua_postnew(L, ret); @@ -42872,18 +45271,27 @@ static int _cocos2d_TransitionProgress_new(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_TransitionProgress(lua_State *L) +static int _olua_cls_cc_TransitionProgress(lua_State *L) { oluacls_class(L, "cc.TransitionProgress"); - oluacls_func(L, "create", _cocos2d_TransitionProgress_create); - oluacls_func(L, "new", _cocos2d_TransitionProgress_new); + oluacls_func(L, "create", _olua_fun_cocos2d_TransitionProgress_create); + oluacls_func(L, "new", _olua_fun_cocos2d_TransitionProgress_new); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_TransitionProgress(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.TransitionProgress")) { + luaL_error(L, "class not found: cocos2d::TransitionProgress"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_TransitionProgressRadialCCW_create(lua_State *L) +static int _olua_fun_cocos2d_TransitionProgressRadialCCW_create(lua_State *L) { olua_startinvoke(L); @@ -42905,11 +45313,11 @@ static int _cocos2d_TransitionProgressRadialCCW_create(lua_State *L) return num_ret; } -static int _cocos2d_TransitionProgressRadialCCW_new(lua_State *L) +static int _olua_fun_cocos2d_TransitionProgressRadialCCW_new(lua_State *L) { olua_startinvoke(L); - // TransitionProgressRadialCCW() + // cocos2d::TransitionProgressRadialCCW() cocos2d::TransitionProgressRadialCCW *ret = new cocos2d::TransitionProgressRadialCCW(); int num_ret = olua_push_object(L, ret, "cc.TransitionProgressRadialCCW"); olua_postnew(L, ret); @@ -42919,18 +45327,27 @@ static int _cocos2d_TransitionProgressRadialCCW_new(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_TransitionProgressRadialCCW(lua_State *L) +static int _olua_cls_cc_TransitionProgressRadialCCW(lua_State *L) { oluacls_class(L, "cc.TransitionProgressRadialCCW"); - oluacls_func(L, "create", _cocos2d_TransitionProgressRadialCCW_create); - oluacls_func(L, "new", _cocos2d_TransitionProgressRadialCCW_new); + oluacls_func(L, "create", _olua_fun_cocos2d_TransitionProgressRadialCCW_create); + oluacls_func(L, "new", _olua_fun_cocos2d_TransitionProgressRadialCCW_new); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_TransitionProgressRadialCCW(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.TransitionProgressRadialCCW")) { + luaL_error(L, "class not found: cocos2d::TransitionProgressRadialCCW"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_TransitionProgressRadialCW_create(lua_State *L) +static int _olua_fun_cocos2d_TransitionProgressRadialCW_create(lua_State *L) { olua_startinvoke(L); @@ -42952,11 +45369,11 @@ static int _cocos2d_TransitionProgressRadialCW_create(lua_State *L) return num_ret; } -static int _cocos2d_TransitionProgressRadialCW_new(lua_State *L) +static int _olua_fun_cocos2d_TransitionProgressRadialCW_new(lua_State *L) { olua_startinvoke(L); - // TransitionProgressRadialCW() + // cocos2d::TransitionProgressRadialCW() cocos2d::TransitionProgressRadialCW *ret = new cocos2d::TransitionProgressRadialCW(); int num_ret = olua_push_object(L, ret, "cc.TransitionProgressRadialCW"); olua_postnew(L, ret); @@ -42966,18 +45383,27 @@ static int _cocos2d_TransitionProgressRadialCW_new(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_TransitionProgressRadialCW(lua_State *L) +static int _olua_cls_cc_TransitionProgressRadialCW(lua_State *L) { oluacls_class(L, "cc.TransitionProgressRadialCW"); - oluacls_func(L, "create", _cocos2d_TransitionProgressRadialCW_create); - oluacls_func(L, "new", _cocos2d_TransitionProgressRadialCW_new); + oluacls_func(L, "create", _olua_fun_cocos2d_TransitionProgressRadialCW_create); + oluacls_func(L, "new", _olua_fun_cocos2d_TransitionProgressRadialCW_new); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_TransitionProgressRadialCW(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.TransitionProgressRadialCW")) { + luaL_error(L, "class not found: cocos2d::TransitionProgressRadialCW"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_TransitionProgressHorizontal_create(lua_State *L) +static int _olua_fun_cocos2d_TransitionProgressHorizontal_create(lua_State *L) { olua_startinvoke(L); @@ -42999,11 +45425,11 @@ static int _cocos2d_TransitionProgressHorizontal_create(lua_State *L) return num_ret; } -static int _cocos2d_TransitionProgressHorizontal_new(lua_State *L) +static int _olua_fun_cocos2d_TransitionProgressHorizontal_new(lua_State *L) { olua_startinvoke(L); - // TransitionProgressHorizontal() + // cocos2d::TransitionProgressHorizontal() cocos2d::TransitionProgressHorizontal *ret = new cocos2d::TransitionProgressHorizontal(); int num_ret = olua_push_object(L, ret, "cc.TransitionProgressHorizontal"); olua_postnew(L, ret); @@ -43013,18 +45439,27 @@ static int _cocos2d_TransitionProgressHorizontal_new(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_TransitionProgressHorizontal(lua_State *L) +static int _olua_cls_cc_TransitionProgressHorizontal(lua_State *L) { oluacls_class(L, "cc.TransitionProgressHorizontal"); - oluacls_func(L, "create", _cocos2d_TransitionProgressHorizontal_create); - oluacls_func(L, "new", _cocos2d_TransitionProgressHorizontal_new); + oluacls_func(L, "create", _olua_fun_cocos2d_TransitionProgressHorizontal_create); + oluacls_func(L, "new", _olua_fun_cocos2d_TransitionProgressHorizontal_new); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_TransitionProgressHorizontal(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.TransitionProgressHorizontal")) { + luaL_error(L, "class not found: cocos2d::TransitionProgressHorizontal"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_TransitionProgressVertical_create(lua_State *L) +static int _olua_fun_cocos2d_TransitionProgressVertical_create(lua_State *L) { olua_startinvoke(L); @@ -43046,11 +45481,11 @@ static int _cocos2d_TransitionProgressVertical_create(lua_State *L) return num_ret; } -static int _cocos2d_TransitionProgressVertical_new(lua_State *L) +static int _olua_fun_cocos2d_TransitionProgressVertical_new(lua_State *L) { olua_startinvoke(L); - // TransitionProgressVertical() + // cocos2d::TransitionProgressVertical() cocos2d::TransitionProgressVertical *ret = new cocos2d::TransitionProgressVertical(); int num_ret = olua_push_object(L, ret, "cc.TransitionProgressVertical"); olua_postnew(L, ret); @@ -43060,18 +45495,27 @@ static int _cocos2d_TransitionProgressVertical_new(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_TransitionProgressVertical(lua_State *L) +static int _olua_cls_cc_TransitionProgressVertical(lua_State *L) { oluacls_class(L, "cc.TransitionProgressVertical"); - oluacls_func(L, "create", _cocos2d_TransitionProgressVertical_create); - oluacls_func(L, "new", _cocos2d_TransitionProgressVertical_new); + oluacls_func(L, "create", _olua_fun_cocos2d_TransitionProgressVertical_create); + oluacls_func(L, "new", _olua_fun_cocos2d_TransitionProgressVertical_new); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_TransitionProgressVertical(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.TransitionProgressVertical")) { + luaL_error(L, "class not found: cocos2d::TransitionProgressVertical"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_TransitionProgressInOut_create(lua_State *L) +static int _olua_fun_cocos2d_TransitionProgressInOut_create(lua_State *L) { olua_startinvoke(L); @@ -43093,11 +45537,11 @@ static int _cocos2d_TransitionProgressInOut_create(lua_State *L) return num_ret; } -static int _cocos2d_TransitionProgressInOut_new(lua_State *L) +static int _olua_fun_cocos2d_TransitionProgressInOut_new(lua_State *L) { olua_startinvoke(L); - // TransitionProgressInOut() + // cocos2d::TransitionProgressInOut() cocos2d::TransitionProgressInOut *ret = new cocos2d::TransitionProgressInOut(); int num_ret = olua_push_object(L, ret, "cc.TransitionProgressInOut"); olua_postnew(L, ret); @@ -43107,18 +45551,27 @@ static int _cocos2d_TransitionProgressInOut_new(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_TransitionProgressInOut(lua_State *L) +static int _olua_cls_cc_TransitionProgressInOut(lua_State *L) { oluacls_class(L, "cc.TransitionProgressInOut"); - oluacls_func(L, "create", _cocos2d_TransitionProgressInOut_create); - oluacls_func(L, "new", _cocos2d_TransitionProgressInOut_new); + oluacls_func(L, "create", _olua_fun_cocos2d_TransitionProgressInOut_create); + oluacls_func(L, "new", _olua_fun_cocos2d_TransitionProgressInOut_new); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_TransitionProgressInOut(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.TransitionProgressInOut")) { + luaL_error(L, "class not found: cocos2d::TransitionProgressInOut"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_TransitionProgressOutIn_create(lua_State *L) +static int _olua_fun_cocos2d_TransitionProgressOutIn_create(lua_State *L) { olua_startinvoke(L); @@ -43140,11 +45593,11 @@ static int _cocos2d_TransitionProgressOutIn_create(lua_State *L) return num_ret; } -static int _cocos2d_TransitionProgressOutIn_new(lua_State *L) +static int _olua_fun_cocos2d_TransitionProgressOutIn_new(lua_State *L) { olua_startinvoke(L); - // TransitionProgressOutIn() + // cocos2d::TransitionProgressOutIn() cocos2d::TransitionProgressOutIn *ret = new cocos2d::TransitionProgressOutIn(); int num_ret = olua_push_object(L, ret, "cc.TransitionProgressOutIn"); olua_postnew(L, ret); @@ -43154,18 +45607,27 @@ static int _cocos2d_TransitionProgressOutIn_new(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_TransitionProgressOutIn(lua_State *L) +static int _olua_cls_cc_TransitionProgressOutIn(lua_State *L) { oluacls_class(L, "cc.TransitionProgressOutIn"); - oluacls_func(L, "create", _cocos2d_TransitionProgressOutIn_create); - oluacls_func(L, "new", _cocos2d_TransitionProgressOutIn_new); + oluacls_func(L, "create", _olua_fun_cocos2d_TransitionProgressOutIn_create); + oluacls_func(L, "new", _olua_fun_cocos2d_TransitionProgressOutIn_new); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_TransitionProgressOutIn(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.TransitionProgressOutIn")) { + luaL_error(L, "class not found: cocos2d::TransitionProgressOutIn"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_IMEDelegate___gc(lua_State *L) +static int _olua_fun_cocos2d_IMEDelegate___gc(lua_State *L) { olua_startinvoke(L); @@ -43177,7 +45639,7 @@ static int _cocos2d_IMEDelegate___gc(lua_State *L) return 0; } -static int _cocos2d_IMEDelegate___olua_move(lua_State *L) +static int _olua_fun_cocos2d_IMEDelegate___olua_move(lua_State *L) { olua_startinvoke(L); @@ -43189,7 +45651,7 @@ static int _cocos2d_IMEDelegate___olua_move(lua_State *L) return 1; } -static int _cocos2d_IMEDelegate_attachWithIME(lua_State *L) +static int _olua_fun_cocos2d_IMEDelegate_attachWithIME(lua_State *L) { olua_startinvoke(L); @@ -43206,7 +45668,7 @@ static int _cocos2d_IMEDelegate_attachWithIME(lua_State *L) return num_ret; } -static int _cocos2d_IMEDelegate_detachWithIME(lua_State *L) +static int _olua_fun_cocos2d_IMEDelegate_detachWithIME(lua_State *L) { olua_startinvoke(L); @@ -43223,20 +45685,29 @@ static int _cocos2d_IMEDelegate_detachWithIME(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_IMEDelegate(lua_State *L) +static int _olua_cls_cc_IMEDelegate(lua_State *L) { oluacls_class(L, "cc.IMEDelegate"); - oluacls_func(L, "__gc", _cocos2d_IMEDelegate___gc); - oluacls_func(L, "__olua_move", _cocos2d_IMEDelegate___olua_move); - oluacls_func(L, "attachWithIME", _cocos2d_IMEDelegate_attachWithIME); - oluacls_func(L, "detachWithIME", _cocos2d_IMEDelegate_detachWithIME); + oluacls_func(L, "__gc", _olua_fun_cocos2d_IMEDelegate___gc); + oluacls_func(L, "__olua_move", _olua_fun_cocos2d_IMEDelegate___olua_move); + oluacls_func(L, "attachWithIME", _olua_fun_cocos2d_IMEDelegate_attachWithIME); + oluacls_func(L, "detachWithIME", _olua_fun_cocos2d_IMEDelegate_detachWithIME); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_IMEDelegate(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.IMEDelegate")) { + luaL_error(L, "class not found: cocos2d::IMEDelegate"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_TextFieldDelegate___gc(lua_State *L) +static int _olua_fun_cocos2d_TextFieldDelegate___gc(lua_State *L) { olua_startinvoke(L); @@ -43248,7 +45719,7 @@ static int _cocos2d_TextFieldDelegate___gc(lua_State *L) return 0; } -static int _cocos2d_TextFieldDelegate___olua_move(lua_State *L) +static int _olua_fun_cocos2d_TextFieldDelegate___olua_move(lua_State *L) { olua_startinvoke(L); @@ -43260,7 +45731,7 @@ static int _cocos2d_TextFieldDelegate___olua_move(lua_State *L) return 1; } -static int _cocos2d_TextFieldDelegate_onTextFieldAttachWithIME(lua_State *L) +static int _olua_fun_cocos2d_TextFieldDelegate_onTextFieldAttachWithIME(lua_State *L) { olua_startinvoke(L); @@ -43279,7 +45750,7 @@ static int _cocos2d_TextFieldDelegate_onTextFieldAttachWithIME(lua_State *L) return num_ret; } -static int _cocos2d_TextFieldDelegate_onTextFieldDeleteBackward(lua_State *L) +static int _olua_fun_cocos2d_TextFieldDelegate_onTextFieldDeleteBackward(lua_State *L) { olua_startinvoke(L); @@ -43302,7 +45773,7 @@ static int _cocos2d_TextFieldDelegate_onTextFieldDeleteBackward(lua_State *L) return num_ret; } -static int _cocos2d_TextFieldDelegate_onTextFieldDetachWithIME(lua_State *L) +static int _olua_fun_cocos2d_TextFieldDelegate_onTextFieldDetachWithIME(lua_State *L) { olua_startinvoke(L); @@ -43321,7 +45792,7 @@ static int _cocos2d_TextFieldDelegate_onTextFieldDetachWithIME(lua_State *L) return num_ret; } -static int _cocos2d_TextFieldDelegate_onTextFieldInsertText(lua_State *L) +static int _olua_fun_cocos2d_TextFieldDelegate_onTextFieldInsertText(lua_State *L) { olua_startinvoke(L); @@ -43344,14 +45815,14 @@ static int _cocos2d_TextFieldDelegate_onTextFieldInsertText(lua_State *L) return num_ret; } -static int _cocos2d_TextFieldDelegate_onVisit(lua_State *L) +static int _olua_fun_cocos2d_TextFieldDelegate_onVisit(lua_State *L) { olua_startinvoke(L); cocos2d::TextFieldDelegate *self = nullptr; cocos2d::TextFieldTTF *arg1 = nullptr; /** sender */ cocos2d::Renderer *arg2 = nullptr; /** renderer */ - cocos2d::Mat4 arg3; /** transform */ + cocos2d::Mat4 *arg3; /** transform */ uint32_t arg4 = 0; /** flags */ olua_to_object(L, 1, &self, "cc.TextFieldDelegate"); @@ -43361,7 +45832,7 @@ static int _cocos2d_TextFieldDelegate_onVisit(lua_State *L) olua_check_integer(L, 5, &arg4); // bool onVisit(cocos2d::TextFieldTTF *sender, cocos2d::Renderer *renderer, const cocos2d::Mat4 &transform, uint32_t flags) - bool ret = self->onVisit(arg1, arg2, arg3, arg4); + bool ret = self->onVisit(arg1, arg2, *arg3, arg4); int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); @@ -43369,23 +45840,32 @@ static int _cocos2d_TextFieldDelegate_onVisit(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_TextFieldDelegate(lua_State *L) +static int _olua_cls_cc_TextFieldDelegate(lua_State *L) { oluacls_class(L, "cc.TextFieldDelegate"); - oluacls_func(L, "__gc", _cocos2d_TextFieldDelegate___gc); - oluacls_func(L, "__olua_move", _cocos2d_TextFieldDelegate___olua_move); - oluacls_func(L, "onTextFieldAttachWithIME", _cocos2d_TextFieldDelegate_onTextFieldAttachWithIME); - oluacls_func(L, "onTextFieldDeleteBackward", _cocos2d_TextFieldDelegate_onTextFieldDeleteBackward); - oluacls_func(L, "onTextFieldDetachWithIME", _cocos2d_TextFieldDelegate_onTextFieldDetachWithIME); - oluacls_func(L, "onTextFieldInsertText", _cocos2d_TextFieldDelegate_onTextFieldInsertText); - oluacls_func(L, "onVisit", _cocos2d_TextFieldDelegate_onVisit); + oluacls_func(L, "__gc", _olua_fun_cocos2d_TextFieldDelegate___gc); + oluacls_func(L, "__olua_move", _olua_fun_cocos2d_TextFieldDelegate___olua_move); + oluacls_func(L, "onTextFieldAttachWithIME", _olua_fun_cocos2d_TextFieldDelegate_onTextFieldAttachWithIME); + oluacls_func(L, "onTextFieldDeleteBackward", _olua_fun_cocos2d_TextFieldDelegate_onTextFieldDeleteBackward); + oluacls_func(L, "onTextFieldDetachWithIME", _olua_fun_cocos2d_TextFieldDelegate_onTextFieldDetachWithIME); + oluacls_func(L, "onTextFieldInsertText", _olua_fun_cocos2d_TextFieldDelegate_onTextFieldInsertText); + oluacls_func(L, "onVisit", _olua_fun_cocos2d_TextFieldDelegate_onVisit); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_TextFieldDelegate(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.TextFieldDelegate")) { + luaL_error(L, "class not found: cocos2d::TextFieldDelegate"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_TextFieldTTF_appendString(lua_State *L) +static int _olua_fun_cocos2d_TextFieldTTF_appendString(lua_State *L) { olua_startinvoke(L); @@ -43403,7 +45883,7 @@ static int _cocos2d_TextFieldTTF_appendString(lua_State *L) return 0; } -static int _cocos2d_TextFieldTTF_as(lua_State *L) +static int _olua_fun_cocos2d_TextFieldTTF_as(lua_State *L) { olua_startinvoke(L); @@ -43439,7 +45919,7 @@ static int _cocos2d_TextFieldTTF_as(lua_State *L) return 1; } -static int _cocos2d_TextFieldTTF_attachWithIME(lua_State *L) +static int _olua_fun_cocos2d_TextFieldTTF_attachWithIME(lua_State *L) { olua_startinvoke(L); @@ -43456,7 +45936,7 @@ static int _cocos2d_TextFieldTTF_attachWithIME(lua_State *L) return num_ret; } -static int _cocos2d_TextFieldTTF_detachWithIME(lua_State *L) +static int _olua_fun_cocos2d_TextFieldTTF_detachWithIME(lua_State *L) { olua_startinvoke(L); @@ -43473,7 +45953,7 @@ static int _cocos2d_TextFieldTTF_detachWithIME(lua_State *L) return num_ret; } -static int _cocos2d_TextFieldTTF_getCharCount(lua_State *L) +static int _olua_fun_cocos2d_TextFieldTTF_getCharCount(lua_State *L) { olua_startinvoke(L); @@ -43490,7 +45970,7 @@ static int _cocos2d_TextFieldTTF_getCharCount(lua_State *L) return num_ret; } -static int _cocos2d_TextFieldTTF_getColorSpaceHolder(lua_State *L) +static int _olua_fun_cocos2d_TextFieldTTF_getColorSpaceHolder(lua_State *L) { olua_startinvoke(L); @@ -43507,7 +45987,7 @@ static int _cocos2d_TextFieldTTF_getColorSpaceHolder(lua_State *L) return num_ret; } -static int _cocos2d_TextFieldTTF_getDelegate(lua_State *L) +static int _olua_fun_cocos2d_TextFieldTTF_getDelegate(lua_State *L) { olua_startinvoke(L); @@ -43524,7 +46004,7 @@ static int _cocos2d_TextFieldTTF_getDelegate(lua_State *L) return num_ret; } -static int _cocos2d_TextFieldTTF_getPasswordTextStyle(lua_State *L) +static int _olua_fun_cocos2d_TextFieldTTF_getPasswordTextStyle(lua_State *L) { olua_startinvoke(L); @@ -43541,7 +46021,7 @@ static int _cocos2d_TextFieldTTF_getPasswordTextStyle(lua_State *L) return num_ret; } -static int _cocos2d_TextFieldTTF_getPlaceHolder(lua_State *L) +static int _olua_fun_cocos2d_TextFieldTTF_getPlaceHolder(lua_State *L) { olua_startinvoke(L); @@ -43558,13 +46038,13 @@ static int _cocos2d_TextFieldTTF_getPlaceHolder(lua_State *L) return num_ret; } -static int _cocos2d_TextFieldTTF_initWithPlaceHolder$1(lua_State *L) +static int _olua_fun_cocos2d_TextFieldTTF_initWithPlaceHolder$1(lua_State *L) { olua_startinvoke(L); cocos2d::TextFieldTTF *self = nullptr; std::string arg1; /** placeholder */ - cocos2d::Size arg2; /** dimensions */ + cocos2d::Size *arg2; /** dimensions */ cocos2d::TextHAlignment arg3 = (cocos2d::TextHAlignment)0; /** alignment */ std::string arg4; /** fontName */ float arg5 = 0; /** fontSize */ @@ -43577,7 +46057,7 @@ static int _cocos2d_TextFieldTTF_initWithPlaceHolder$1(lua_State *L) olua_check_number(L, 6, &arg5); // bool initWithPlaceHolder(const std::string &placeholder, const cocos2d::Size &dimensions, cocos2d::TextHAlignment alignment, const std::string &fontName, float fontSize) - bool ret = self->initWithPlaceHolder(arg1, arg2, arg3, arg4, arg5); + bool ret = self->initWithPlaceHolder(arg1, *arg2, arg3, arg4, arg5); int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); @@ -43585,7 +46065,7 @@ static int _cocos2d_TextFieldTTF_initWithPlaceHolder$1(lua_State *L) return num_ret; } -static int _cocos2d_TextFieldTTF_initWithPlaceHolder$2(lua_State *L) +static int _olua_fun_cocos2d_TextFieldTTF_initWithPlaceHolder$2(lua_State *L) { olua_startinvoke(L); @@ -43608,21 +46088,21 @@ static int _cocos2d_TextFieldTTF_initWithPlaceHolder$2(lua_State *L) return num_ret; } -static int _cocos2d_TextFieldTTF_initWithPlaceHolder(lua_State *L) +static int _olua_fun_cocos2d_TextFieldTTF_initWithPlaceHolder(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 3) { // if ((olua_is_string(L, 2)) && (olua_is_string(L, 3)) && (olua_is_number(L, 4))) { // bool initWithPlaceHolder(const std::string &placeholder, const std::string &fontName, float fontSize) - return _cocos2d_TextFieldTTF_initWithPlaceHolder$2(L); + return _olua_fun_cocos2d_TextFieldTTF_initWithPlaceHolder$2(L); // } } if (num_args == 5) { // if ((olua_is_string(L, 2)) && (olua_is_object(L, 3, "cc.Size")) && (olua_is_enum(L, 4)) && (olua_is_string(L, 5)) && (olua_is_number(L, 6))) { // bool initWithPlaceHolder(const std::string &placeholder, const cocos2d::Size &dimensions, cocos2d::TextHAlignment alignment, const std::string &fontName, float fontSize) - return _cocos2d_TextFieldTTF_initWithPlaceHolder$1(L); + return _olua_fun_cocos2d_TextFieldTTF_initWithPlaceHolder$1(L); // } } @@ -43631,7 +46111,7 @@ static int _cocos2d_TextFieldTTF_initWithPlaceHolder(lua_State *L) return 0; } -static int _cocos2d_TextFieldTTF_isSecureTextEntry(lua_State *L) +static int _olua_fun_cocos2d_TextFieldTTF_isSecureTextEntry(lua_State *L) { olua_startinvoke(L); @@ -43648,11 +46128,11 @@ static int _cocos2d_TextFieldTTF_isSecureTextEntry(lua_State *L) return num_ret; } -static int _cocos2d_TextFieldTTF_new(lua_State *L) +static int _olua_fun_cocos2d_TextFieldTTF_new(lua_State *L) { olua_startinvoke(L); - // TextFieldTTF() + // cocos2d::TextFieldTTF() cocos2d::TextFieldTTF *ret = new cocos2d::TextFieldTTF(); int num_ret = olua_push_object(L, ret, "cc.TextFieldTTF"); olua_postnew(L, ret); @@ -43662,7 +46142,7 @@ static int _cocos2d_TextFieldTTF_new(lua_State *L) return num_ret; } -static int _cocos2d_TextFieldTTF_setColorSpaceHolder$1(lua_State *L) +static int _olua_fun_cocos2d_TextFieldTTF_setColorSpaceHolder$1(lua_State *L) { olua_startinvoke(L); @@ -43680,7 +46160,7 @@ static int _cocos2d_TextFieldTTF_setColorSpaceHolder$1(lua_State *L) return 0; } -static int _cocos2d_TextFieldTTF_setColorSpaceHolder$2(lua_State *L) +static int _olua_fun_cocos2d_TextFieldTTF_setColorSpaceHolder$2(lua_State *L) { olua_startinvoke(L); @@ -43698,19 +46178,19 @@ static int _cocos2d_TextFieldTTF_setColorSpaceHolder$2(lua_State *L) return 0; } -static int _cocos2d_TextFieldTTF_setColorSpaceHolder(lua_State *L) +static int _olua_fun_cocos2d_TextFieldTTF_setColorSpaceHolder(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { if ((olua_is_cocos2d_Color3B(L, 2))) { // void setColorSpaceHolder(const cocos2d::Color3B &color) - return _cocos2d_TextFieldTTF_setColorSpaceHolder$1(L); + return _olua_fun_cocos2d_TextFieldTTF_setColorSpaceHolder$1(L); } // if ((olua_is_cocos2d_Color4B(L, 2))) { // void setColorSpaceHolder(const cocos2d::Color4B &color) - return _cocos2d_TextFieldTTF_setColorSpaceHolder$2(L); + return _olua_fun_cocos2d_TextFieldTTF_setColorSpaceHolder$2(L); // } } @@ -43719,7 +46199,7 @@ static int _cocos2d_TextFieldTTF_setColorSpaceHolder(lua_State *L) return 0; } -static int _cocos2d_TextFieldTTF_setCursorChar(lua_State *L) +static int _olua_fun_cocos2d_TextFieldTTF_setCursorChar(lua_State *L) { olua_startinvoke(L); @@ -43737,7 +46217,7 @@ static int _cocos2d_TextFieldTTF_setCursorChar(lua_State *L) return 0; } -static int _cocos2d_TextFieldTTF_setCursorEnabled(lua_State *L) +static int _olua_fun_cocos2d_TextFieldTTF_setCursorEnabled(lua_State *L) { olua_startinvoke(L); @@ -43755,12 +46235,12 @@ static int _cocos2d_TextFieldTTF_setCursorEnabled(lua_State *L) return 0; } -static int _cocos2d_TextFieldTTF_setCursorFromPoint(lua_State *L) +static int _olua_fun_cocos2d_TextFieldTTF_setCursorFromPoint(lua_State *L) { olua_startinvoke(L); cocos2d::TextFieldTTF *self = nullptr; - cocos2d::Vec2 arg1; /** point */ + cocos2d::Vec2 *arg1; /** point */ cocos2d::Camera *arg2 = nullptr; /** camera */ olua_to_object(L, 1, &self, "cc.TextFieldTTF"); @@ -43768,14 +46248,14 @@ static int _cocos2d_TextFieldTTF_setCursorFromPoint(lua_State *L) olua_check_object(L, 3, &arg2, "cc.Camera"); // void setCursorFromPoint(const cocos2d::Vec2 &point, const cocos2d::Camera *camera) - self->setCursorFromPoint(arg1, arg2); + self->setCursorFromPoint(*arg1, arg2); olua_endinvoke(L); return 0; } -static int _cocos2d_TextFieldTTF_setCursorPosition(lua_State *L) +static int _olua_fun_cocos2d_TextFieldTTF_setCursorPosition(lua_State *L) { olua_startinvoke(L); @@ -43793,7 +46273,7 @@ static int _cocos2d_TextFieldTTF_setCursorPosition(lua_State *L) return 0; } -static int _cocos2d_TextFieldTTF_setDelegate(lua_State *L) +static int _olua_fun_cocos2d_TextFieldTTF_setDelegate(lua_State *L) { olua_startinvoke(L); @@ -43811,7 +46291,7 @@ static int _cocos2d_TextFieldTTF_setDelegate(lua_State *L) return 0; } -static int _cocos2d_TextFieldTTF_setPasswordTextStyle(lua_State *L) +static int _olua_fun_cocos2d_TextFieldTTF_setPasswordTextStyle(lua_State *L) { olua_startinvoke(L); @@ -43829,7 +46309,7 @@ static int _cocos2d_TextFieldTTF_setPasswordTextStyle(lua_State *L) return 0; } -static int _cocos2d_TextFieldTTF_setPlaceHolder(lua_State *L) +static int _olua_fun_cocos2d_TextFieldTTF_setPlaceHolder(lua_State *L) { olua_startinvoke(L); @@ -43847,7 +46327,7 @@ static int _cocos2d_TextFieldTTF_setPlaceHolder(lua_State *L) return 0; } -static int _cocos2d_TextFieldTTF_setSecureTextEntry(lua_State *L) +static int _olua_fun_cocos2d_TextFieldTTF_setSecureTextEntry(lua_State *L) { olua_startinvoke(L); @@ -43865,12 +46345,12 @@ static int _cocos2d_TextFieldTTF_setSecureTextEntry(lua_State *L) return 0; } -static int _cocos2d_TextFieldTTF_textFieldWithPlaceHolder$1(lua_State *L) +static int _olua_fun_cocos2d_TextFieldTTF_textFieldWithPlaceHolder$1(lua_State *L) { olua_startinvoke(L); std::string arg1; /** placeholder */ - cocos2d::Size arg2; /** dimensions */ + cocos2d::Size *arg2; /** dimensions */ cocos2d::TextHAlignment arg3 = (cocos2d::TextHAlignment)0; /** alignment */ std::string arg4; /** fontName */ float arg5 = 0; /** fontSize */ @@ -43882,7 +46362,7 @@ static int _cocos2d_TextFieldTTF_textFieldWithPlaceHolder$1(lua_State *L) olua_check_number(L, 5, &arg5); // static cocos2d::TextFieldTTF *textFieldWithPlaceHolder(const std::string &placeholder, const cocos2d::Size &dimensions, cocos2d::TextHAlignment alignment, const std::string &fontName, float fontSize) - cocos2d::TextFieldTTF *ret = cocos2d::TextFieldTTF::textFieldWithPlaceHolder(arg1, arg2, arg3, arg4, arg5); + cocos2d::TextFieldTTF *ret = cocos2d::TextFieldTTF::textFieldWithPlaceHolder(arg1, *arg2, arg3, arg4, arg5); int num_ret = olua_push_object(L, ret, "cc.TextFieldTTF"); olua_endinvoke(L); @@ -43890,7 +46370,7 @@ static int _cocos2d_TextFieldTTF_textFieldWithPlaceHolder$1(lua_State *L) return num_ret; } -static int _cocos2d_TextFieldTTF_textFieldWithPlaceHolder$2(lua_State *L) +static int _olua_fun_cocos2d_TextFieldTTF_textFieldWithPlaceHolder$2(lua_State *L) { olua_startinvoke(L); @@ -43911,21 +46391,21 @@ static int _cocos2d_TextFieldTTF_textFieldWithPlaceHolder$2(lua_State *L) return num_ret; } -static int _cocos2d_TextFieldTTF_textFieldWithPlaceHolder(lua_State *L) +static int _olua_fun_cocos2d_TextFieldTTF_textFieldWithPlaceHolder(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 3) { // if ((olua_is_string(L, 1)) && (olua_is_string(L, 2)) && (olua_is_number(L, 3))) { // static cocos2d::TextFieldTTF *textFieldWithPlaceHolder(const std::string &placeholder, const std::string &fontName, float fontSize) - return _cocos2d_TextFieldTTF_textFieldWithPlaceHolder$2(L); + return _olua_fun_cocos2d_TextFieldTTF_textFieldWithPlaceHolder$2(L); // } } if (num_args == 5) { // if ((olua_is_string(L, 1)) && (olua_is_object(L, 2, "cc.Size")) && (olua_is_enum(L, 3)) && (olua_is_string(L, 4)) && (olua_is_number(L, 5))) { // static cocos2d::TextFieldTTF *textFieldWithPlaceHolder(const std::string &placeholder, const cocos2d::Size &dimensions, cocos2d::TextHAlignment alignment, const std::string &fontName, float fontSize) - return _cocos2d_TextFieldTTF_textFieldWithPlaceHolder$1(L); + return _olua_fun_cocos2d_TextFieldTTF_textFieldWithPlaceHolder$1(L); // } } @@ -43934,45 +46414,53 @@ static int _cocos2d_TextFieldTTF_textFieldWithPlaceHolder(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_TextFieldTTF(lua_State *L) +static int _olua_cls_cc_TextFieldTTF(lua_State *L) { oluacls_class(L, "cc.TextFieldTTF"); - oluacls_func(L, "appendString", _cocos2d_TextFieldTTF_appendString); - oluacls_func(L, "as", _cocos2d_TextFieldTTF_as); - oluacls_func(L, "attachWithIME", _cocos2d_TextFieldTTF_attachWithIME); - oluacls_func(L, "detachWithIME", _cocos2d_TextFieldTTF_detachWithIME); - oluacls_func(L, "getCharCount", _cocos2d_TextFieldTTF_getCharCount); - oluacls_func(L, "getColorSpaceHolder", _cocos2d_TextFieldTTF_getColorSpaceHolder); - oluacls_func(L, "getDelegate", _cocos2d_TextFieldTTF_getDelegate); - oluacls_func(L, "getPasswordTextStyle", _cocos2d_TextFieldTTF_getPasswordTextStyle); - oluacls_func(L, "getPlaceHolder", _cocos2d_TextFieldTTF_getPlaceHolder); - oluacls_func(L, "initWithPlaceHolder", _cocos2d_TextFieldTTF_initWithPlaceHolder); - oluacls_func(L, "isSecureTextEntry", _cocos2d_TextFieldTTF_isSecureTextEntry); - oluacls_func(L, "new", _cocos2d_TextFieldTTF_new); - oluacls_func(L, "setColorSpaceHolder", _cocos2d_TextFieldTTF_setColorSpaceHolder); - oluacls_func(L, "setCursorChar", _cocos2d_TextFieldTTF_setCursorChar); - oluacls_func(L, "setCursorEnabled", _cocos2d_TextFieldTTF_setCursorEnabled); - oluacls_func(L, "setCursorFromPoint", _cocos2d_TextFieldTTF_setCursorFromPoint); - oluacls_func(L, "setCursorPosition", _cocos2d_TextFieldTTF_setCursorPosition); - oluacls_func(L, "setDelegate", _cocos2d_TextFieldTTF_setDelegate); - oluacls_func(L, "setPasswordTextStyle", _cocos2d_TextFieldTTF_setPasswordTextStyle); - oluacls_func(L, "setPlaceHolder", _cocos2d_TextFieldTTF_setPlaceHolder); - oluacls_func(L, "setSecureTextEntry", _cocos2d_TextFieldTTF_setSecureTextEntry); - oluacls_func(L, "textFieldWithPlaceHolder", _cocos2d_TextFieldTTF_textFieldWithPlaceHolder); - oluacls_prop(L, "charCount", _cocos2d_TextFieldTTF_getCharCount, nullptr); - oluacls_prop(L, "colorSpaceHolder", _cocos2d_TextFieldTTF_getColorSpaceHolder, _cocos2d_TextFieldTTF_setColorSpaceHolder); - oluacls_prop(L, "delegate", _cocos2d_TextFieldTTF_getDelegate, _cocos2d_TextFieldTTF_setDelegate); - oluacls_prop(L, "passwordTextStyle", _cocos2d_TextFieldTTF_getPasswordTextStyle, _cocos2d_TextFieldTTF_setPasswordTextStyle); - oluacls_prop(L, "placeHolder", _cocos2d_TextFieldTTF_getPlaceHolder, _cocos2d_TextFieldTTF_setPlaceHolder); - oluacls_prop(L, "secureTextEntry", _cocos2d_TextFieldTTF_isSecureTextEntry, _cocos2d_TextFieldTTF_setSecureTextEntry); + oluacls_func(L, "appendString", _olua_fun_cocos2d_TextFieldTTF_appendString); + oluacls_func(L, "as", _olua_fun_cocos2d_TextFieldTTF_as); + oluacls_func(L, "attachWithIME", _olua_fun_cocos2d_TextFieldTTF_attachWithIME); + oluacls_func(L, "detachWithIME", _olua_fun_cocos2d_TextFieldTTF_detachWithIME); + oluacls_func(L, "getCharCount", _olua_fun_cocos2d_TextFieldTTF_getCharCount); + oluacls_func(L, "getColorSpaceHolder", _olua_fun_cocos2d_TextFieldTTF_getColorSpaceHolder); + oluacls_func(L, "getDelegate", _olua_fun_cocos2d_TextFieldTTF_getDelegate); + oluacls_func(L, "getPasswordTextStyle", _olua_fun_cocos2d_TextFieldTTF_getPasswordTextStyle); + oluacls_func(L, "getPlaceHolder", _olua_fun_cocos2d_TextFieldTTF_getPlaceHolder); + oluacls_func(L, "initWithPlaceHolder", _olua_fun_cocos2d_TextFieldTTF_initWithPlaceHolder); + oluacls_func(L, "isSecureTextEntry", _olua_fun_cocos2d_TextFieldTTF_isSecureTextEntry); + oluacls_func(L, "new", _olua_fun_cocos2d_TextFieldTTF_new); + oluacls_func(L, "setColorSpaceHolder", _olua_fun_cocos2d_TextFieldTTF_setColorSpaceHolder); + oluacls_func(L, "setCursorChar", _olua_fun_cocos2d_TextFieldTTF_setCursorChar); + oluacls_func(L, "setCursorEnabled", _olua_fun_cocos2d_TextFieldTTF_setCursorEnabled); + oluacls_func(L, "setCursorFromPoint", _olua_fun_cocos2d_TextFieldTTF_setCursorFromPoint); + oluacls_func(L, "setCursorPosition", _olua_fun_cocos2d_TextFieldTTF_setCursorPosition); + oluacls_func(L, "setDelegate", _olua_fun_cocos2d_TextFieldTTF_setDelegate); + oluacls_func(L, "setPasswordTextStyle", _olua_fun_cocos2d_TextFieldTTF_setPasswordTextStyle); + oluacls_func(L, "setPlaceHolder", _olua_fun_cocos2d_TextFieldTTF_setPlaceHolder); + oluacls_func(L, "setSecureTextEntry", _olua_fun_cocos2d_TextFieldTTF_setSecureTextEntry); + oluacls_func(L, "textFieldWithPlaceHolder", _olua_fun_cocos2d_TextFieldTTF_textFieldWithPlaceHolder); + oluacls_prop(L, "charCount", _olua_fun_cocos2d_TextFieldTTF_getCharCount, nullptr); + oluacls_prop(L, "colorSpaceHolder", _olua_fun_cocos2d_TextFieldTTF_getColorSpaceHolder, nullptr); + oluacls_prop(L, "delegate", _olua_fun_cocos2d_TextFieldTTF_getDelegate, _olua_fun_cocos2d_TextFieldTTF_setDelegate); + oluacls_prop(L, "passwordTextStyle", _olua_fun_cocos2d_TextFieldTTF_getPasswordTextStyle, _olua_fun_cocos2d_TextFieldTTF_setPasswordTextStyle); + oluacls_prop(L, "placeHolder", _olua_fun_cocos2d_TextFieldTTF_getPlaceHolder, _olua_fun_cocos2d_TextFieldTTF_setPlaceHolder); + oluacls_prop(L, "secureTextEntry", _olua_fun_cocos2d_TextFieldTTF_isSecureTextEntry, _olua_fun_cocos2d_TextFieldTTF_setSecureTextEntry); return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_LightType(lua_State *L) +OLUA_LIB int luaopen_cc_TextFieldTTF(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.TextFieldTTF")) { + luaL_error(L, "class not found: cocos2d::TextFieldTTF"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_cc_LightType(lua_State *L) { oluacls_class(L, "cc.LightType"); oluacls_func(L, "__index", olua_indexerror); @@ -43984,10 +46472,19 @@ OLUA_LIB int luaopen_cocos2d_LightType(lua_State *L) return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_LightFlag(lua_State *L) +OLUA_LIB int luaopen_cc_LightType(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.LightType")) { + luaL_error(L, "class not found: cocos2d::LightType"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_cc_LightFlag(lua_State *L) { oluacls_class(L, "cc.LightFlag"); oluacls_func(L, "__index", olua_indexerror); @@ -44011,9 +46508,19 @@ OLUA_LIB int luaopen_cocos2d_LightFlag(lua_State *L) return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_LightFlag(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.LightFlag")) { + luaL_error(L, "class not found: cocos2d::LightFlag"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_BaseLight_getIntensity(lua_State *L) +static int _olua_fun_cocos2d_BaseLight_getIntensity(lua_State *L) { olua_startinvoke(L); @@ -44030,7 +46537,7 @@ static int _cocos2d_BaseLight_getIntensity(lua_State *L) return num_ret; } -static int _cocos2d_BaseLight_getLightFlag(lua_State *L) +static int _olua_fun_cocos2d_BaseLight_getLightFlag(lua_State *L) { olua_startinvoke(L); @@ -44047,7 +46554,7 @@ static int _cocos2d_BaseLight_getLightFlag(lua_State *L) return num_ret; } -static int _cocos2d_BaseLight_getLightType(lua_State *L) +static int _olua_fun_cocos2d_BaseLight_getLightType(lua_State *L) { olua_startinvoke(L); @@ -44064,7 +46571,7 @@ static int _cocos2d_BaseLight_getLightType(lua_State *L) return num_ret; } -static int _cocos2d_BaseLight_isEnabled(lua_State *L) +static int _olua_fun_cocos2d_BaseLight_isEnabled(lua_State *L) { olua_startinvoke(L); @@ -44081,7 +46588,7 @@ static int _cocos2d_BaseLight_isEnabled(lua_State *L) return num_ret; } -static int _cocos2d_BaseLight_setEnabled(lua_State *L) +static int _olua_fun_cocos2d_BaseLight_setEnabled(lua_State *L) { olua_startinvoke(L); @@ -44099,7 +46606,7 @@ static int _cocos2d_BaseLight_setEnabled(lua_State *L) return 0; } -static int _cocos2d_BaseLight_setIntensity(lua_State *L) +static int _olua_fun_cocos2d_BaseLight_setIntensity(lua_State *L) { olua_startinvoke(L); @@ -44117,7 +46624,7 @@ static int _cocos2d_BaseLight_setIntensity(lua_State *L) return 0; } -static int _cocos2d_BaseLight_setLightFlag(lua_State *L) +static int _olua_fun_cocos2d_BaseLight_setLightFlag(lua_State *L) { olua_startinvoke(L); @@ -44135,38 +46642,47 @@ static int _cocos2d_BaseLight_setLightFlag(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_BaseLight(lua_State *L) +static int _olua_cls_cc_BaseLight(lua_State *L) { oluacls_class(L, "cc.BaseLight"); - oluacls_func(L, "getIntensity", _cocos2d_BaseLight_getIntensity); - oluacls_func(L, "getLightFlag", _cocos2d_BaseLight_getLightFlag); - oluacls_func(L, "getLightType", _cocos2d_BaseLight_getLightType); - oluacls_func(L, "isEnabled", _cocos2d_BaseLight_isEnabled); - oluacls_func(L, "setEnabled", _cocos2d_BaseLight_setEnabled); - oluacls_func(L, "setIntensity", _cocos2d_BaseLight_setIntensity); - oluacls_func(L, "setLightFlag", _cocos2d_BaseLight_setLightFlag); - oluacls_prop(L, "enabled", _cocos2d_BaseLight_isEnabled, _cocos2d_BaseLight_setEnabled); - oluacls_prop(L, "intensity", _cocos2d_BaseLight_getIntensity, _cocos2d_BaseLight_setIntensity); - oluacls_prop(L, "lightFlag", _cocos2d_BaseLight_getLightFlag, _cocos2d_BaseLight_setLightFlag); - oluacls_prop(L, "lightType", _cocos2d_BaseLight_getLightType, nullptr); + oluacls_func(L, "getIntensity", _olua_fun_cocos2d_BaseLight_getIntensity); + oluacls_func(L, "getLightFlag", _olua_fun_cocos2d_BaseLight_getLightFlag); + oluacls_func(L, "getLightType", _olua_fun_cocos2d_BaseLight_getLightType); + oluacls_func(L, "isEnabled", _olua_fun_cocos2d_BaseLight_isEnabled); + oluacls_func(L, "setEnabled", _olua_fun_cocos2d_BaseLight_setEnabled); + oluacls_func(L, "setIntensity", _olua_fun_cocos2d_BaseLight_setIntensity); + oluacls_func(L, "setLightFlag", _olua_fun_cocos2d_BaseLight_setLightFlag); + oluacls_prop(L, "enabled", _olua_fun_cocos2d_BaseLight_isEnabled, _olua_fun_cocos2d_BaseLight_setEnabled); + oluacls_prop(L, "intensity", _olua_fun_cocos2d_BaseLight_getIntensity, _olua_fun_cocos2d_BaseLight_setIntensity); + oluacls_prop(L, "lightFlag", _olua_fun_cocos2d_BaseLight_getLightFlag, _olua_fun_cocos2d_BaseLight_setLightFlag); + oluacls_prop(L, "lightType", _olua_fun_cocos2d_BaseLight_getLightType, nullptr); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_BaseLight(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.BaseLight")) { + luaL_error(L, "class not found: cocos2d::BaseLight"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_DirectionLight_create(lua_State *L) +static int _olua_fun_cocos2d_DirectionLight_create(lua_State *L) { olua_startinvoke(L); - cocos2d::Vec3 arg1; /** direction */ + cocos2d::Vec3 *arg1; /** direction */ cocos2d::Color3B arg2; /** color */ olua_check_object(L, 1, &arg1, "cc.Vec3"); olua_check_cocos2d_Color3B(L, 2, &arg2); // static cocos2d::DirectionLight *create(const cocos2d::Vec3 &direction, const cocos2d::Color3B &color) - cocos2d::DirectionLight *ret = cocos2d::DirectionLight::create(arg1, arg2); + cocos2d::DirectionLight *ret = cocos2d::DirectionLight::create(*arg1, arg2); int num_ret = olua_push_object(L, ret, "cc.DirectionLight"); olua_endinvoke(L); @@ -44174,7 +46690,7 @@ static int _cocos2d_DirectionLight_create(lua_State *L) return num_ret; } -static int _cocos2d_DirectionLight_getDirection(lua_State *L) +static int _olua_fun_cocos2d_DirectionLight_getDirection(lua_State *L) { olua_startinvoke(L); @@ -44184,14 +46700,14 @@ static int _cocos2d_DirectionLight_getDirection(lua_State *L) // cocos2d::Vec3 getDirection() cocos2d::Vec3 ret = self->getDirection(); - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec3"); + int num_ret = olua_copy_object(L, ret, "cc.Vec3"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_DirectionLight_getDirectionInWorld(lua_State *L) +static int _olua_fun_cocos2d_DirectionLight_getDirectionInWorld(lua_State *L) { olua_startinvoke(L); @@ -44201,18 +46717,18 @@ static int _cocos2d_DirectionLight_getDirectionInWorld(lua_State *L) // cocos2d::Vec3 getDirectionInWorld() cocos2d::Vec3 ret = self->getDirectionInWorld(); - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec3"); + int num_ret = olua_copy_object(L, ret, "cc.Vec3"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_DirectionLight_new(lua_State *L) +static int _olua_fun_cocos2d_DirectionLight_new(lua_State *L) { olua_startinvoke(L); - // DirectionLight() + // cocos2d::DirectionLight() cocos2d::DirectionLight *ret = new cocos2d::DirectionLight(); int num_ret = olua_push_object(L, ret, "cc.DirectionLight"); olua_postnew(L, ret); @@ -44222,45 +46738,54 @@ static int _cocos2d_DirectionLight_new(lua_State *L) return num_ret; } -static int _cocos2d_DirectionLight_setDirection(lua_State *L) +static int _olua_fun_cocos2d_DirectionLight_setDirection(lua_State *L) { olua_startinvoke(L); cocos2d::DirectionLight *self = nullptr; - cocos2d::Vec3 arg1; /** dir */ + cocos2d::Vec3 *arg1; /** dir */ olua_to_object(L, 1, &self, "cc.DirectionLight"); olua_check_object(L, 2, &arg1, "cc.Vec3"); // void setDirection(const cocos2d::Vec3 &dir) - self->setDirection(arg1); + self->setDirection(*arg1); olua_endinvoke(L); return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_DirectionLight(lua_State *L) +static int _olua_cls_cc_DirectionLight(lua_State *L) { oluacls_class(L, "cc.DirectionLight"); - oluacls_func(L, "create", _cocos2d_DirectionLight_create); - oluacls_func(L, "getDirection", _cocos2d_DirectionLight_getDirection); - oluacls_func(L, "getDirectionInWorld", _cocos2d_DirectionLight_getDirectionInWorld); - oluacls_func(L, "new", _cocos2d_DirectionLight_new); - oluacls_func(L, "setDirection", _cocos2d_DirectionLight_setDirection); - oluacls_prop(L, "direction", _cocos2d_DirectionLight_getDirection, _cocos2d_DirectionLight_setDirection); - oluacls_prop(L, "directionInWorld", _cocos2d_DirectionLight_getDirectionInWorld, nullptr); + oluacls_func(L, "create", _olua_fun_cocos2d_DirectionLight_create); + oluacls_func(L, "getDirection", _olua_fun_cocos2d_DirectionLight_getDirection); + oluacls_func(L, "getDirectionInWorld", _olua_fun_cocos2d_DirectionLight_getDirectionInWorld); + oluacls_func(L, "new", _olua_fun_cocos2d_DirectionLight_new); + oluacls_func(L, "setDirection", _olua_fun_cocos2d_DirectionLight_setDirection); + oluacls_prop(L, "direction", _olua_fun_cocos2d_DirectionLight_getDirection, _olua_fun_cocos2d_DirectionLight_setDirection); + oluacls_prop(L, "directionInWorld", _olua_fun_cocos2d_DirectionLight_getDirectionInWorld, nullptr); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_DirectionLight(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.DirectionLight")) { + luaL_error(L, "class not found: cocos2d::DirectionLight"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_PointLight_create(lua_State *L) +static int _olua_fun_cocos2d_PointLight_create(lua_State *L) { olua_startinvoke(L); - cocos2d::Vec3 arg1; /** position */ + cocos2d::Vec3 *arg1; /** position */ cocos2d::Color3B arg2; /** color */ float arg3 = 0; /** range */ @@ -44269,7 +46794,7 @@ static int _cocos2d_PointLight_create(lua_State *L) olua_check_number(L, 3, &arg3); // static cocos2d::PointLight *create(const cocos2d::Vec3 &position, const cocos2d::Color3B &color, float range) - cocos2d::PointLight *ret = cocos2d::PointLight::create(arg1, arg2, arg3); + cocos2d::PointLight *ret = cocos2d::PointLight::create(*arg1, arg2, arg3); int num_ret = olua_push_object(L, ret, "cc.PointLight"); olua_endinvoke(L); @@ -44277,7 +46802,7 @@ static int _cocos2d_PointLight_create(lua_State *L) return num_ret; } -static int _cocos2d_PointLight_getRange(lua_State *L) +static int _olua_fun_cocos2d_PointLight_getRange(lua_State *L) { olua_startinvoke(L); @@ -44294,11 +46819,11 @@ static int _cocos2d_PointLight_getRange(lua_State *L) return num_ret; } -static int _cocos2d_PointLight_new(lua_State *L) +static int _olua_fun_cocos2d_PointLight_new(lua_State *L) { olua_startinvoke(L); - // PointLight() + // cocos2d::PointLight() cocos2d::PointLight *ret = new cocos2d::PointLight(); int num_ret = olua_push_object(L, ret, "cc.PointLight"); olua_postnew(L, ret); @@ -44308,7 +46833,7 @@ static int _cocos2d_PointLight_new(lua_State *L) return num_ret; } -static int _cocos2d_PointLight_setRange(lua_State *L) +static int _olua_fun_cocos2d_PointLight_setRange(lua_State *L) { olua_startinvoke(L); @@ -44326,26 +46851,35 @@ static int _cocos2d_PointLight_setRange(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_PointLight(lua_State *L) +static int _olua_cls_cc_PointLight(lua_State *L) { oluacls_class(L, "cc.PointLight"); - oluacls_func(L, "create", _cocos2d_PointLight_create); - oluacls_func(L, "getRange", _cocos2d_PointLight_getRange); - oluacls_func(L, "new", _cocos2d_PointLight_new); - oluacls_func(L, "setRange", _cocos2d_PointLight_setRange); - oluacls_prop(L, "range", _cocos2d_PointLight_getRange, _cocos2d_PointLight_setRange); + oluacls_func(L, "create", _olua_fun_cocos2d_PointLight_create); + oluacls_func(L, "getRange", _olua_fun_cocos2d_PointLight_getRange); + oluacls_func(L, "new", _olua_fun_cocos2d_PointLight_new); + oluacls_func(L, "setRange", _olua_fun_cocos2d_PointLight_setRange); + oluacls_prop(L, "range", _olua_fun_cocos2d_PointLight_getRange, _olua_fun_cocos2d_PointLight_setRange); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_PointLight(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.PointLight")) { + luaL_error(L, "class not found: cocos2d::PointLight"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_SpotLight_create(lua_State *L) +static int _olua_fun_cocos2d_SpotLight_create(lua_State *L) { olua_startinvoke(L); - cocos2d::Vec3 arg1; /** direction */ - cocos2d::Vec3 arg2; /** position */ + cocos2d::Vec3 *arg1; /** direction */ + cocos2d::Vec3 *arg2; /** position */ cocos2d::Color3B arg3; /** color */ float arg4 = 0; /** innerAngle */ float arg5 = 0; /** outerAngle */ @@ -44359,7 +46893,7 @@ static int _cocos2d_SpotLight_create(lua_State *L) olua_check_number(L, 6, &arg6); // static cocos2d::SpotLight *create(const cocos2d::Vec3 &direction, const cocos2d::Vec3 &position, const cocos2d::Color3B &color, float innerAngle, float outerAngle, float range) - cocos2d::SpotLight *ret = cocos2d::SpotLight::create(arg1, arg2, arg3, arg4, arg5, arg6); + cocos2d::SpotLight *ret = cocos2d::SpotLight::create(*arg1, *arg2, arg3, arg4, arg5, arg6); int num_ret = olua_push_object(L, ret, "cc.SpotLight"); olua_endinvoke(L); @@ -44367,7 +46901,7 @@ static int _cocos2d_SpotLight_create(lua_State *L) return num_ret; } -static int _cocos2d_SpotLight_getCosInnerAngle(lua_State *L) +static int _olua_fun_cocos2d_SpotLight_getCosInnerAngle(lua_State *L) { olua_startinvoke(L); @@ -44384,7 +46918,7 @@ static int _cocos2d_SpotLight_getCosInnerAngle(lua_State *L) return num_ret; } -static int _cocos2d_SpotLight_getCosOuterAngle(lua_State *L) +static int _olua_fun_cocos2d_SpotLight_getCosOuterAngle(lua_State *L) { olua_startinvoke(L); @@ -44401,7 +46935,7 @@ static int _cocos2d_SpotLight_getCosOuterAngle(lua_State *L) return num_ret; } -static int _cocos2d_SpotLight_getDirection(lua_State *L) +static int _olua_fun_cocos2d_SpotLight_getDirection(lua_State *L) { olua_startinvoke(L); @@ -44411,14 +46945,14 @@ static int _cocos2d_SpotLight_getDirection(lua_State *L) // cocos2d::Vec3 getDirection() cocos2d::Vec3 ret = self->getDirection(); - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec3"); + int num_ret = olua_copy_object(L, ret, "cc.Vec3"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_SpotLight_getDirectionInWorld(lua_State *L) +static int _olua_fun_cocos2d_SpotLight_getDirectionInWorld(lua_State *L) { olua_startinvoke(L); @@ -44428,14 +46962,14 @@ static int _cocos2d_SpotLight_getDirectionInWorld(lua_State *L) // cocos2d::Vec3 getDirectionInWorld() cocos2d::Vec3 ret = self->getDirectionInWorld(); - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec3"); + int num_ret = olua_copy_object(L, ret, "cc.Vec3"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_SpotLight_getInnerAngle(lua_State *L) +static int _olua_fun_cocos2d_SpotLight_getInnerAngle(lua_State *L) { olua_startinvoke(L); @@ -44452,7 +46986,7 @@ static int _cocos2d_SpotLight_getInnerAngle(lua_State *L) return num_ret; } -static int _cocos2d_SpotLight_getOuterAngle(lua_State *L) +static int _olua_fun_cocos2d_SpotLight_getOuterAngle(lua_State *L) { olua_startinvoke(L); @@ -44469,7 +47003,7 @@ static int _cocos2d_SpotLight_getOuterAngle(lua_State *L) return num_ret; } -static int _cocos2d_SpotLight_getRange(lua_State *L) +static int _olua_fun_cocos2d_SpotLight_getRange(lua_State *L) { olua_startinvoke(L); @@ -44486,11 +47020,11 @@ static int _cocos2d_SpotLight_getRange(lua_State *L) return num_ret; } -static int _cocos2d_SpotLight_new(lua_State *L) +static int _olua_fun_cocos2d_SpotLight_new(lua_State *L) { olua_startinvoke(L); - // SpotLight() + // cocos2d::SpotLight() cocos2d::SpotLight *ret = new cocos2d::SpotLight(); int num_ret = olua_push_object(L, ret, "cc.SpotLight"); olua_postnew(L, ret); @@ -44500,25 +47034,25 @@ static int _cocos2d_SpotLight_new(lua_State *L) return num_ret; } -static int _cocos2d_SpotLight_setDirection(lua_State *L) +static int _olua_fun_cocos2d_SpotLight_setDirection(lua_State *L) { olua_startinvoke(L); cocos2d::SpotLight *self = nullptr; - cocos2d::Vec3 arg1; /** dir */ + cocos2d::Vec3 *arg1; /** dir */ olua_to_object(L, 1, &self, "cc.SpotLight"); olua_check_object(L, 2, &arg1, "cc.Vec3"); // void setDirection(const cocos2d::Vec3 &dir) - self->setDirection(arg1); + self->setDirection(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_SpotLight_setInnerAngle(lua_State *L) +static int _olua_fun_cocos2d_SpotLight_setInnerAngle(lua_State *L) { olua_startinvoke(L); @@ -44536,7 +47070,7 @@ static int _cocos2d_SpotLight_setInnerAngle(lua_State *L) return 0; } -static int _cocos2d_SpotLight_setOuterAngle(lua_State *L) +static int _olua_fun_cocos2d_SpotLight_setOuterAngle(lua_State *L) { olua_startinvoke(L); @@ -44554,7 +47088,7 @@ static int _cocos2d_SpotLight_setOuterAngle(lua_State *L) return 0; } -static int _cocos2d_SpotLight_setRange(lua_State *L) +static int _olua_fun_cocos2d_SpotLight_setRange(lua_State *L) { olua_startinvoke(L); @@ -44572,36 +47106,45 @@ static int _cocos2d_SpotLight_setRange(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_SpotLight(lua_State *L) +static int _olua_cls_cc_SpotLight(lua_State *L) { oluacls_class(L, "cc.SpotLight"); - oluacls_func(L, "create", _cocos2d_SpotLight_create); - oluacls_func(L, "getCosInnerAngle", _cocos2d_SpotLight_getCosInnerAngle); - oluacls_func(L, "getCosOuterAngle", _cocos2d_SpotLight_getCosOuterAngle); - oluacls_func(L, "getDirection", _cocos2d_SpotLight_getDirection); - oluacls_func(L, "getDirectionInWorld", _cocos2d_SpotLight_getDirectionInWorld); - oluacls_func(L, "getInnerAngle", _cocos2d_SpotLight_getInnerAngle); - oluacls_func(L, "getOuterAngle", _cocos2d_SpotLight_getOuterAngle); - oluacls_func(L, "getRange", _cocos2d_SpotLight_getRange); - oluacls_func(L, "new", _cocos2d_SpotLight_new); - oluacls_func(L, "setDirection", _cocos2d_SpotLight_setDirection); - oluacls_func(L, "setInnerAngle", _cocos2d_SpotLight_setInnerAngle); - oluacls_func(L, "setOuterAngle", _cocos2d_SpotLight_setOuterAngle); - oluacls_func(L, "setRange", _cocos2d_SpotLight_setRange); - oluacls_prop(L, "cosInnerAngle", _cocos2d_SpotLight_getCosInnerAngle, nullptr); - oluacls_prop(L, "cosOuterAngle", _cocos2d_SpotLight_getCosOuterAngle, nullptr); - oluacls_prop(L, "direction", _cocos2d_SpotLight_getDirection, _cocos2d_SpotLight_setDirection); - oluacls_prop(L, "directionInWorld", _cocos2d_SpotLight_getDirectionInWorld, nullptr); - oluacls_prop(L, "innerAngle", _cocos2d_SpotLight_getInnerAngle, _cocos2d_SpotLight_setInnerAngle); - oluacls_prop(L, "outerAngle", _cocos2d_SpotLight_getOuterAngle, _cocos2d_SpotLight_setOuterAngle); - oluacls_prop(L, "range", _cocos2d_SpotLight_getRange, _cocos2d_SpotLight_setRange); + oluacls_func(L, "create", _olua_fun_cocos2d_SpotLight_create); + oluacls_func(L, "getCosInnerAngle", _olua_fun_cocos2d_SpotLight_getCosInnerAngle); + oluacls_func(L, "getCosOuterAngle", _olua_fun_cocos2d_SpotLight_getCosOuterAngle); + oluacls_func(L, "getDirection", _olua_fun_cocos2d_SpotLight_getDirection); + oluacls_func(L, "getDirectionInWorld", _olua_fun_cocos2d_SpotLight_getDirectionInWorld); + oluacls_func(L, "getInnerAngle", _olua_fun_cocos2d_SpotLight_getInnerAngle); + oluacls_func(L, "getOuterAngle", _olua_fun_cocos2d_SpotLight_getOuterAngle); + oluacls_func(L, "getRange", _olua_fun_cocos2d_SpotLight_getRange); + oluacls_func(L, "new", _olua_fun_cocos2d_SpotLight_new); + oluacls_func(L, "setDirection", _olua_fun_cocos2d_SpotLight_setDirection); + oluacls_func(L, "setInnerAngle", _olua_fun_cocos2d_SpotLight_setInnerAngle); + oluacls_func(L, "setOuterAngle", _olua_fun_cocos2d_SpotLight_setOuterAngle); + oluacls_func(L, "setRange", _olua_fun_cocos2d_SpotLight_setRange); + oluacls_prop(L, "cosInnerAngle", _olua_fun_cocos2d_SpotLight_getCosInnerAngle, nullptr); + oluacls_prop(L, "cosOuterAngle", _olua_fun_cocos2d_SpotLight_getCosOuterAngle, nullptr); + oluacls_prop(L, "direction", _olua_fun_cocos2d_SpotLight_getDirection, _olua_fun_cocos2d_SpotLight_setDirection); + oluacls_prop(L, "directionInWorld", _olua_fun_cocos2d_SpotLight_getDirectionInWorld, nullptr); + oluacls_prop(L, "innerAngle", _olua_fun_cocos2d_SpotLight_getInnerAngle, _olua_fun_cocos2d_SpotLight_setInnerAngle); + oluacls_prop(L, "outerAngle", _olua_fun_cocos2d_SpotLight_getOuterAngle, _olua_fun_cocos2d_SpotLight_setOuterAngle); + oluacls_prop(L, "range", _olua_fun_cocos2d_SpotLight_getRange, _olua_fun_cocos2d_SpotLight_setRange); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_SpotLight(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.SpotLight")) { + luaL_error(L, "class not found: cocos2d::SpotLight"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_AmbientLight_create(lua_State *L) +static int _olua_fun_cocos2d_AmbientLight_create(lua_State *L) { olua_startinvoke(L); @@ -44618,11 +47161,11 @@ static int _cocos2d_AmbientLight_create(lua_State *L) return num_ret; } -static int _cocos2d_AmbientLight_new(lua_State *L) +static int _olua_fun_cocos2d_AmbientLight_new(lua_State *L) { olua_startinvoke(L); - // AmbientLight() + // cocos2d::AmbientLight() cocos2d::AmbientLight *ret = new cocos2d::AmbientLight(); int num_ret = olua_push_object(L, ret, "cc.AmbientLight"); olua_postnew(L, ret); @@ -44632,19 +47175,27 @@ static int _cocos2d_AmbientLight_new(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_AmbientLight(lua_State *L) +static int _olua_cls_cc_AmbientLight(lua_State *L) { oluacls_class(L, "cc.AmbientLight"); - oluacls_func(L, "create", _cocos2d_AmbientLight_create); - oluacls_func(L, "new", _cocos2d_AmbientLight_new); + oluacls_func(L, "create", _olua_fun_cocos2d_AmbientLight_create); + oluacls_func(L, "new", _olua_fun_cocos2d_AmbientLight_new); return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_CameraFlag(lua_State *L) +OLUA_LIB int luaopen_cc_AmbientLight(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.AmbientLight")) { + luaL_error(L, "class not found: cocos2d::AmbientLight"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_cc_CameraFlag(lua_State *L) { oluacls_class(L, "cc.CameraFlag"); oluacls_func(L, "__index", olua_indexerror); @@ -44661,10 +47212,19 @@ OLUA_LIB int luaopen_cocos2d_CameraFlag(lua_State *L) return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_Camera_Type(lua_State *L) +OLUA_LIB int luaopen_cc_CameraFlag(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.CameraFlag")) { + luaL_error(L, "class not found: cocos2d::CameraFlag"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_cc_Camera_Type(lua_State *L) { oluacls_class(L, "cc.Camera.Type"); oluacls_func(L, "__index", olua_indexerror); @@ -44674,9 +47234,19 @@ OLUA_LIB int luaopen_cocos2d_Camera_Type(lua_State *L) return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_Camera_Type(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.Camera.Type")) { + luaL_error(L, "class not found: cocos2d::Camera::Type"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_Camera_apply(lua_State *L) +static int _olua_fun_cocos2d_Camera_apply(lua_State *L) { olua_startinvoke(L); @@ -44692,7 +47262,7 @@ static int _cocos2d_Camera_apply(lua_State *L) return 0; } -static int _cocos2d_Camera_applyViewport(lua_State *L) +static int _olua_fun_cocos2d_Camera_applyViewport(lua_State *L) { olua_startinvoke(L); @@ -44708,7 +47278,7 @@ static int _cocos2d_Camera_applyViewport(lua_State *L) return 0; } -static int _cocos2d_Camera_clearBackground(lua_State *L) +static int _olua_fun_cocos2d_Camera_clearBackground(lua_State *L) { olua_startinvoke(L); @@ -44724,7 +47294,7 @@ static int _cocos2d_Camera_clearBackground(lua_State *L) return 0; } -static int _cocos2d_Camera_create(lua_State *L) +static int _olua_fun_cocos2d_Camera_create(lua_State *L) { olua_startinvoke(L); @@ -44737,7 +47307,7 @@ static int _cocos2d_Camera_create(lua_State *L) return num_ret; } -static int _cocos2d_Camera_createOrthographic(lua_State *L) +static int _olua_fun_cocos2d_Camera_createOrthographic(lua_State *L) { olua_startinvoke(L); @@ -44760,7 +47330,7 @@ static int _cocos2d_Camera_createOrthographic(lua_State *L) return num_ret; } -static int _cocos2d_Camera_createPerspective(lua_State *L) +static int _olua_fun_cocos2d_Camera_createPerspective(lua_State *L) { olua_startinvoke(L); @@ -44783,7 +47353,7 @@ static int _cocos2d_Camera_createPerspective(lua_State *L) return num_ret; } -static int _cocos2d_Camera_getBackgroundBrush(lua_State *L) +static int _olua_fun_cocos2d_Camera_getBackgroundBrush(lua_State *L) { olua_startinvoke(L); @@ -44800,7 +47370,7 @@ static int _cocos2d_Camera_getBackgroundBrush(lua_State *L) return num_ret; } -static int _cocos2d_Camera_getCameraFlag(lua_State *L) +static int _olua_fun_cocos2d_Camera_getCameraFlag(lua_State *L) { olua_startinvoke(L); @@ -44817,7 +47387,7 @@ static int _cocos2d_Camera_getCameraFlag(lua_State *L) return num_ret; } -static int _cocos2d_Camera_getDefaultCamera(lua_State *L) +static int _olua_fun_cocos2d_Camera_getDefaultCamera(lua_State *L) { olua_startinvoke(L); @@ -44830,7 +47400,7 @@ static int _cocos2d_Camera_getDefaultCamera(lua_State *L) return num_ret; } -static int _cocos2d_Camera_getDefaultViewport(lua_State *L) +static int _olua_fun_cocos2d_Camera_getDefaultViewport(lua_State *L) { olua_startinvoke(L); @@ -44843,7 +47413,7 @@ static int _cocos2d_Camera_getDefaultViewport(lua_State *L) return num_ret; } -static int _cocos2d_Camera_getDepth(lua_State *L) +static int _olua_fun_cocos2d_Camera_getDepth(lua_State *L) { olua_startinvoke(L); @@ -44860,18 +47430,18 @@ static int _cocos2d_Camera_getDepth(lua_State *L) return num_ret; } -static int _cocos2d_Camera_getDepthInView(lua_State *L) +static int _olua_fun_cocos2d_Camera_getDepthInView(lua_State *L) { olua_startinvoke(L); cocos2d::Camera *self = nullptr; - cocos2d::Mat4 arg1; /** transform */ + cocos2d::Mat4 *arg1; /** transform */ olua_to_object(L, 1, &self, "cc.Camera"); olua_check_object(L, 2, &arg1, "cc.Mat4"); // float getDepthInView(const cocos2d::Mat4 &transform) - float ret = self->getDepthInView(arg1); + float ret = self->getDepthInView(*arg1); int num_ret = olua_push_number(L, ret); olua_endinvoke(L); @@ -44879,7 +47449,7 @@ static int _cocos2d_Camera_getDepthInView(lua_State *L) return num_ret; } -static int _cocos2d_Camera_getFarPlane(lua_State *L) +static int _olua_fun_cocos2d_Camera_getFarPlane(lua_State *L) { olua_startinvoke(L); @@ -44896,7 +47466,7 @@ static int _cocos2d_Camera_getFarPlane(lua_State *L) return num_ret; } -static int _cocos2d_Camera_getNearPlane(lua_State *L) +static int _olua_fun_cocos2d_Camera_getNearPlane(lua_State *L) { olua_startinvoke(L); @@ -44913,7 +47483,7 @@ static int _cocos2d_Camera_getNearPlane(lua_State *L) return num_ret; } -static int _cocos2d_Camera_getProjectionMatrix(lua_State *L) +static int _olua_fun_cocos2d_Camera_getProjectionMatrix(lua_State *L) { olua_startinvoke(L); @@ -44930,7 +47500,7 @@ static int _cocos2d_Camera_getProjectionMatrix(lua_State *L) return num_ret; } -static int _cocos2d_Camera_getRenderOrder(lua_State *L) +static int _olua_fun_cocos2d_Camera_getRenderOrder(lua_State *L) { olua_startinvoke(L); @@ -44947,7 +47517,7 @@ static int _cocos2d_Camera_getRenderOrder(lua_State *L) return num_ret; } -static int _cocos2d_Camera_getType(lua_State *L) +static int _olua_fun_cocos2d_Camera_getType(lua_State *L) { olua_startinvoke(L); @@ -44964,7 +47534,7 @@ static int _cocos2d_Camera_getType(lua_State *L) return num_ret; } -static int _cocos2d_Camera_getViewMatrix(lua_State *L) +static int _olua_fun_cocos2d_Camera_getViewMatrix(lua_State *L) { olua_startinvoke(L); @@ -44981,7 +47551,7 @@ static int _cocos2d_Camera_getViewMatrix(lua_State *L) return num_ret; } -static int _cocos2d_Camera_getViewProjectionMatrix(lua_State *L) +static int _olua_fun_cocos2d_Camera_getViewProjectionMatrix(lua_State *L) { olua_startinvoke(L); @@ -44998,7 +47568,7 @@ static int _cocos2d_Camera_getViewProjectionMatrix(lua_State *L) return num_ret; } -static int _cocos2d_Camera_getVisitingCamera(lua_State *L) +static int _olua_fun_cocos2d_Camera_getVisitingCamera(lua_State *L) { olua_startinvoke(L); @@ -45011,7 +47581,7 @@ static int _cocos2d_Camera_getVisitingCamera(lua_State *L) return num_ret; } -static int _cocos2d_Camera_initDefault(lua_State *L) +static int _olua_fun_cocos2d_Camera_initDefault(lua_State *L) { olua_startinvoke(L); @@ -45028,7 +47598,7 @@ static int _cocos2d_Camera_initDefault(lua_State *L) return num_ret; } -static int _cocos2d_Camera_initOrthographic(lua_State *L) +static int _olua_fun_cocos2d_Camera_initOrthographic(lua_State *L) { olua_startinvoke(L); @@ -45053,7 +47623,7 @@ static int _cocos2d_Camera_initOrthographic(lua_State *L) return num_ret; } -static int _cocos2d_Camera_initPerspective(lua_State *L) +static int _olua_fun_cocos2d_Camera_initPerspective(lua_State *L) { olua_startinvoke(L); @@ -45078,7 +47648,7 @@ static int _cocos2d_Camera_initPerspective(lua_State *L) return num_ret; } -static int _cocos2d_Camera_isBrushValid(lua_State *L) +static int _olua_fun_cocos2d_Camera_isBrushValid(lua_State *L) { olua_startinvoke(L); @@ -45095,7 +47665,7 @@ static int _cocos2d_Camera_isBrushValid(lua_State *L) return num_ret; } -static int _cocos2d_Camera_isViewProjectionUpdated(lua_State *L) +static int _olua_fun_cocos2d_Camera_isViewProjectionUpdated(lua_State *L) { olua_startinvoke(L); @@ -45112,59 +47682,59 @@ static int _cocos2d_Camera_isViewProjectionUpdated(lua_State *L) return num_ret; } -static int _cocos2d_Camera_lookAt$1(lua_State *L) +static int _olua_fun_cocos2d_Camera_lookAt$1(lua_State *L) { olua_startinvoke(L); cocos2d::Camera *self = nullptr; - cocos2d::Vec3 arg1; /** target */ - cocos2d::Vec3 arg2; /** up */ + cocos2d::Vec3 *arg1; /** target */ + cocos2d::Vec3 *arg2; /** up */ olua_to_object(L, 1, &self, "cc.Camera"); olua_check_object(L, 2, &arg1, "cc.Vec3"); olua_check_object(L, 3, &arg2, "cc.Vec3"); // void lookAt(const cocos2d::Vec3 &target, @optional const cocos2d::Vec3 &up) - self->lookAt(arg1, arg2); + self->lookAt(*arg1, *arg2); olua_endinvoke(L); return 0; } -static int _cocos2d_Camera_lookAt$2(lua_State *L) +static int _olua_fun_cocos2d_Camera_lookAt$2(lua_State *L) { olua_startinvoke(L); cocos2d::Camera *self = nullptr; - cocos2d::Vec3 arg1; /** target */ + cocos2d::Vec3 *arg1; /** target */ olua_to_object(L, 1, &self, "cc.Camera"); olua_check_object(L, 2, &arg1, "cc.Vec3"); - // void lookAt(const cocos2d::Vec3 &target, @optional const cocos2d::Vec3 &up) - self->lookAt(arg1); + // void lookAt(const cocos2d::Vec3 &target) + self->lookAt(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_Camera_lookAt(lua_State *L) +static int _olua_fun_cocos2d_Camera_lookAt(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_object(L, 2, "cc.Vec3"))) { - // void lookAt(const cocos2d::Vec3 &target, @optional const cocos2d::Vec3 &up) - return _cocos2d_Camera_lookAt$2(L); + // void lookAt(const cocos2d::Vec3 &target) + return _olua_fun_cocos2d_Camera_lookAt$2(L); // } } if (num_args == 2) { // if ((olua_is_object(L, 2, "cc.Vec3")) && (olua_is_object(L, 3, "cc.Vec3"))) { // void lookAt(const cocos2d::Vec3 &target, @optional const cocos2d::Vec3 &up) - return _cocos2d_Camera_lookAt$1(L); + return _olua_fun_cocos2d_Camera_lookAt$1(L); // } } @@ -45173,11 +47743,11 @@ static int _cocos2d_Camera_lookAt(lua_State *L) return 0; } -static int _cocos2d_Camera_new(lua_State *L) +static int _olua_fun_cocos2d_Camera_new(lua_State *L) { olua_startinvoke(L); - // Camera() + // cocos2d::Camera() cocos2d::Camera *ret = new cocos2d::Camera(); int num_ret = olua_push_object(L, ret, "cc.Camera"); olua_postnew(L, ret); @@ -45187,63 +47757,63 @@ static int _cocos2d_Camera_new(lua_State *L) return num_ret; } -static int _cocos2d_Camera_project(lua_State *L) +static int _olua_fun_cocos2d_Camera_project(lua_State *L) { olua_startinvoke(L); cocos2d::Camera *self = nullptr; - cocos2d::Vec3 arg1; /** src */ + cocos2d::Vec3 *arg1; /** src */ olua_to_object(L, 1, &self, "cc.Camera"); olua_check_object(L, 2, &arg1, "cc.Vec3"); // cocos2d::Vec2 project(const cocos2d::Vec3 &src) - cocos2d::Vec2 ret = self->project(arg1); - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec2"); + cocos2d::Vec2 ret = self->project(*arg1); + int num_ret = olua_copy_object(L, ret, "cc.Vec2"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_Camera_projectGL(lua_State *L) +static int _olua_fun_cocos2d_Camera_projectGL(lua_State *L) { olua_startinvoke(L); cocos2d::Camera *self = nullptr; - cocos2d::Vec3 arg1; /** src */ + cocos2d::Vec3 *arg1; /** src */ olua_to_object(L, 1, &self, "cc.Camera"); olua_check_object(L, 2, &arg1, "cc.Vec3"); // cocos2d::Vec2 projectGL(const cocos2d::Vec3 &src) - cocos2d::Vec2 ret = self->projectGL(arg1); - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec2"); + cocos2d::Vec2 ret = self->projectGL(*arg1); + int num_ret = olua_copy_object(L, ret, "cc.Vec2"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_Camera_setAdditionalProjection(lua_State *L) +static int _olua_fun_cocos2d_Camera_setAdditionalProjection(lua_State *L) { olua_startinvoke(L); cocos2d::Camera *self = nullptr; - cocos2d::Mat4 arg1; /** mat */ + cocos2d::Mat4 *arg1; /** mat */ olua_to_object(L, 1, &self, "cc.Camera"); olua_check_object(L, 2, &arg1, "cc.Mat4"); // void setAdditionalProjection(const cocos2d::Mat4 &mat) - self->setAdditionalProjection(arg1); + self->setAdditionalProjection(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_Camera_setBackgroundBrush(lua_State *L) +static int _olua_fun_cocos2d_Camera_setBackgroundBrush(lua_State *L) { olua_startinvoke(L); @@ -45261,7 +47831,7 @@ static int _cocos2d_Camera_setBackgroundBrush(lua_State *L) return 0; } -static int _cocos2d_Camera_setCameraFlag(lua_State *L) +static int _olua_fun_cocos2d_Camera_setCameraFlag(lua_State *L) { olua_startinvoke(L); @@ -45279,23 +47849,23 @@ static int _cocos2d_Camera_setCameraFlag(lua_State *L) return 0; } -static int _cocos2d_Camera_setDefaultViewport(lua_State *L) +static int _olua_fun_cocos2d_Camera_setDefaultViewport(lua_State *L) { olua_startinvoke(L); - cocos2d::Viewport arg1; /** vp */ + cocos2d::Viewport *arg1; /** vp */ olua_check_object(L, 1, &arg1, "cc.Viewport"); // static void setDefaultViewport(const cocos2d::Viewport &vp) - cocos2d::Camera::setDefaultViewport(arg1); + cocos2d::Camera::setDefaultViewport(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_Camera_setDepth(lua_State *L) +static int _olua_fun_cocos2d_Camera_setDepth(lua_State *L) { olua_startinvoke(L); @@ -45313,7 +47883,7 @@ static int _cocos2d_Camera_setDepth(lua_State *L) return 0; } -static int _cocos2d_Camera_setScene(lua_State *L) +static int _olua_fun_cocos2d_Camera_setScene(lua_State *L) { olua_startinvoke(L); @@ -45331,31 +47901,31 @@ static int _cocos2d_Camera_setScene(lua_State *L) return 0; } -static int _cocos2d_Camera_unproject$1(lua_State *L) +static int _olua_fun_cocos2d_Camera_unproject$1(lua_State *L) { olua_startinvoke(L); cocos2d::Camera *self = nullptr; - cocos2d::Vec3 arg1; /** src */ + cocos2d::Vec3 *arg1; /** src */ olua_to_object(L, 1, &self, "cc.Camera"); olua_check_object(L, 2, &arg1, "cc.Vec3"); // cocos2d::Vec3 unproject(const cocos2d::Vec3 &src) - cocos2d::Vec3 ret = self->unproject(arg1); - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec3"); + cocos2d::Vec3 ret = self->unproject(*arg1); + int num_ret = olua_copy_object(L, ret, "cc.Vec3"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_Camera_unproject$2(lua_State *L) +static int _olua_fun_cocos2d_Camera_unproject$2(lua_State *L) { olua_startinvoke(L); cocos2d::Camera *self = nullptr; - cocos2d::Size arg1; /** size */ + cocos2d::Size *arg1; /** size */ cocos2d::Vec3 *arg2 = nullptr; /** src */ cocos2d::Vec3 *arg3 = nullptr; /** dst */ @@ -45365,28 +47935,28 @@ static int _cocos2d_Camera_unproject$2(lua_State *L) olua_check_object(L, 4, &arg3, "cc.Vec3"); // void unproject(const cocos2d::Size &size, const cocos2d::Vec3 *src, cocos2d::Vec3 *dst) - self->unproject(arg1, arg2, arg3); + self->unproject(*arg1, arg2, arg3); olua_endinvoke(L); return 0; } -static int _cocos2d_Camera_unproject(lua_State *L) +static int _olua_fun_cocos2d_Camera_unproject(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_object(L, 2, "cc.Vec3"))) { // cocos2d::Vec3 unproject(const cocos2d::Vec3 &src) - return _cocos2d_Camera_unproject$1(L); + return _olua_fun_cocos2d_Camera_unproject$1(L); // } } if (num_args == 3) { // if ((olua_is_object(L, 2, "cc.Size")) && (olua_is_object(L, 3, "cc.Vec3")) && (olua_is_object(L, 4, "cc.Vec3"))) { // void unproject(const cocos2d::Size &size, const cocos2d::Vec3 *src, cocos2d::Vec3 *dst) - return _cocos2d_Camera_unproject$2(L); + return _olua_fun_cocos2d_Camera_unproject$2(L); // } } @@ -45395,31 +47965,31 @@ static int _cocos2d_Camera_unproject(lua_State *L) return 0; } -static int _cocos2d_Camera_unprojectGL$1(lua_State *L) +static int _olua_fun_cocos2d_Camera_unprojectGL$1(lua_State *L) { olua_startinvoke(L); cocos2d::Camera *self = nullptr; - cocos2d::Vec3 arg1; /** src */ + cocos2d::Vec3 *arg1; /** src */ olua_to_object(L, 1, &self, "cc.Camera"); olua_check_object(L, 2, &arg1, "cc.Vec3"); // cocos2d::Vec3 unprojectGL(const cocos2d::Vec3 &src) - cocos2d::Vec3 ret = self->unprojectGL(arg1); - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec3"); + cocos2d::Vec3 ret = self->unprojectGL(*arg1); + int num_ret = olua_copy_object(L, ret, "cc.Vec3"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_Camera_unprojectGL$2(lua_State *L) +static int _olua_fun_cocos2d_Camera_unprojectGL$2(lua_State *L) { olua_startinvoke(L); cocos2d::Camera *self = nullptr; - cocos2d::Size arg1; /** size */ + cocos2d::Size *arg1; /** size */ cocos2d::Vec3 *arg2 = nullptr; /** src */ cocos2d::Vec3 *arg3 = nullptr; /** dst */ @@ -45429,28 +47999,28 @@ static int _cocos2d_Camera_unprojectGL$2(lua_State *L) olua_check_object(L, 4, &arg3, "cc.Vec3"); // void unprojectGL(const cocos2d::Size &size, const cocos2d::Vec3 *src, cocos2d::Vec3 *dst) - self->unprojectGL(arg1, arg2, arg3); + self->unprojectGL(*arg1, arg2, arg3); olua_endinvoke(L); return 0; } -static int _cocos2d_Camera_unprojectGL(lua_State *L) +static int _olua_fun_cocos2d_Camera_unprojectGL(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_object(L, 2, "cc.Vec3"))) { // cocos2d::Vec3 unprojectGL(const cocos2d::Vec3 &src) - return _cocos2d_Camera_unprojectGL$1(L); + return _olua_fun_cocos2d_Camera_unprojectGL$1(L); // } } if (num_args == 3) { // if ((olua_is_object(L, 2, "cc.Size")) && (olua_is_object(L, 3, "cc.Vec3")) && (olua_is_object(L, 4, "cc.Vec3"))) { // void unprojectGL(const cocos2d::Size &size, const cocos2d::Vec3 *src, cocos2d::Vec3 *dst) - return _cocos2d_Camera_unprojectGL$2(L); + return _olua_fun_cocos2d_Camera_unprojectGL$2(L); // } } @@ -45459,69 +48029,77 @@ static int _cocos2d_Camera_unprojectGL(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_Camera(lua_State *L) +static int _olua_cls_cc_Camera(lua_State *L) { oluacls_class(L, "cc.Camera"); - oluacls_func(L, "apply", _cocos2d_Camera_apply); - oluacls_func(L, "applyViewport", _cocos2d_Camera_applyViewport); - oluacls_func(L, "clearBackground", _cocos2d_Camera_clearBackground); - oluacls_func(L, "create", _cocos2d_Camera_create); - oluacls_func(L, "createOrthographic", _cocos2d_Camera_createOrthographic); - oluacls_func(L, "createPerspective", _cocos2d_Camera_createPerspective); - oluacls_func(L, "getBackgroundBrush", _cocos2d_Camera_getBackgroundBrush); - oluacls_func(L, "getCameraFlag", _cocos2d_Camera_getCameraFlag); - oluacls_func(L, "getDefaultCamera", _cocos2d_Camera_getDefaultCamera); - oluacls_func(L, "getDefaultViewport", _cocos2d_Camera_getDefaultViewport); - oluacls_func(L, "getDepth", _cocos2d_Camera_getDepth); - oluacls_func(L, "getDepthInView", _cocos2d_Camera_getDepthInView); - oluacls_func(L, "getFarPlane", _cocos2d_Camera_getFarPlane); - oluacls_func(L, "getNearPlane", _cocos2d_Camera_getNearPlane); - oluacls_func(L, "getProjectionMatrix", _cocos2d_Camera_getProjectionMatrix); - oluacls_func(L, "getRenderOrder", _cocos2d_Camera_getRenderOrder); - oluacls_func(L, "getType", _cocos2d_Camera_getType); - oluacls_func(L, "getViewMatrix", _cocos2d_Camera_getViewMatrix); - oluacls_func(L, "getViewProjectionMatrix", _cocos2d_Camera_getViewProjectionMatrix); - oluacls_func(L, "getVisitingCamera", _cocos2d_Camera_getVisitingCamera); - oluacls_func(L, "initDefault", _cocos2d_Camera_initDefault); - oluacls_func(L, "initOrthographic", _cocos2d_Camera_initOrthographic); - oluacls_func(L, "initPerspective", _cocos2d_Camera_initPerspective); - oluacls_func(L, "isBrushValid", _cocos2d_Camera_isBrushValid); - oluacls_func(L, "isViewProjectionUpdated", _cocos2d_Camera_isViewProjectionUpdated); - oluacls_func(L, "lookAt", _cocos2d_Camera_lookAt); - oluacls_func(L, "new", _cocos2d_Camera_new); - oluacls_func(L, "project", _cocos2d_Camera_project); - oluacls_func(L, "projectGL", _cocos2d_Camera_projectGL); - oluacls_func(L, "setAdditionalProjection", _cocos2d_Camera_setAdditionalProjection); - oluacls_func(L, "setBackgroundBrush", _cocos2d_Camera_setBackgroundBrush); - oluacls_func(L, "setCameraFlag", _cocos2d_Camera_setCameraFlag); - oluacls_func(L, "setDefaultViewport", _cocos2d_Camera_setDefaultViewport); - oluacls_func(L, "setDepth", _cocos2d_Camera_setDepth); - oluacls_func(L, "setScene", _cocos2d_Camera_setScene); - oluacls_func(L, "unproject", _cocos2d_Camera_unproject); - oluacls_func(L, "unprojectGL", _cocos2d_Camera_unprojectGL); - oluacls_prop(L, "backgroundBrush", _cocos2d_Camera_getBackgroundBrush, _cocos2d_Camera_setBackgroundBrush); - oluacls_prop(L, "brushValid", _cocos2d_Camera_isBrushValid, nullptr); - oluacls_prop(L, "cameraFlag", _cocos2d_Camera_getCameraFlag, _cocos2d_Camera_setCameraFlag); - oluacls_prop(L, "defaultCamera", _cocos2d_Camera_getDefaultCamera, nullptr); - oluacls_prop(L, "defaultViewport", _cocos2d_Camera_getDefaultViewport, _cocos2d_Camera_setDefaultViewport); - oluacls_prop(L, "depth", _cocos2d_Camera_getDepth, _cocos2d_Camera_setDepth); - oluacls_prop(L, "farPlane", _cocos2d_Camera_getFarPlane, nullptr); - oluacls_prop(L, "nearPlane", _cocos2d_Camera_getNearPlane, nullptr); - oluacls_prop(L, "projectionMatrix", _cocos2d_Camera_getProjectionMatrix, nullptr); - oluacls_prop(L, "renderOrder", _cocos2d_Camera_getRenderOrder, nullptr); - oluacls_prop(L, "type", _cocos2d_Camera_getType, nullptr); - oluacls_prop(L, "viewMatrix", _cocos2d_Camera_getViewMatrix, nullptr); - oluacls_prop(L, "viewProjectionMatrix", _cocos2d_Camera_getViewProjectionMatrix, nullptr); - oluacls_prop(L, "viewProjectionUpdated", _cocos2d_Camera_isViewProjectionUpdated, nullptr); - oluacls_prop(L, "visitingCamera", _cocos2d_Camera_getVisitingCamera, nullptr); + oluacls_func(L, "apply", _olua_fun_cocos2d_Camera_apply); + oluacls_func(L, "applyViewport", _olua_fun_cocos2d_Camera_applyViewport); + oluacls_func(L, "clearBackground", _olua_fun_cocos2d_Camera_clearBackground); + oluacls_func(L, "create", _olua_fun_cocos2d_Camera_create); + oluacls_func(L, "createOrthographic", _olua_fun_cocos2d_Camera_createOrthographic); + oluacls_func(L, "createPerspective", _olua_fun_cocos2d_Camera_createPerspective); + oluacls_func(L, "getBackgroundBrush", _olua_fun_cocos2d_Camera_getBackgroundBrush); + oluacls_func(L, "getCameraFlag", _olua_fun_cocos2d_Camera_getCameraFlag); + oluacls_func(L, "getDefaultCamera", _olua_fun_cocos2d_Camera_getDefaultCamera); + oluacls_func(L, "getDefaultViewport", _olua_fun_cocos2d_Camera_getDefaultViewport); + oluacls_func(L, "getDepth", _olua_fun_cocos2d_Camera_getDepth); + oluacls_func(L, "getDepthInView", _olua_fun_cocos2d_Camera_getDepthInView); + oluacls_func(L, "getFarPlane", _olua_fun_cocos2d_Camera_getFarPlane); + oluacls_func(L, "getNearPlane", _olua_fun_cocos2d_Camera_getNearPlane); + oluacls_func(L, "getProjectionMatrix", _olua_fun_cocos2d_Camera_getProjectionMatrix); + oluacls_func(L, "getRenderOrder", _olua_fun_cocos2d_Camera_getRenderOrder); + oluacls_func(L, "getType", _olua_fun_cocos2d_Camera_getType); + oluacls_func(L, "getViewMatrix", _olua_fun_cocos2d_Camera_getViewMatrix); + oluacls_func(L, "getViewProjectionMatrix", _olua_fun_cocos2d_Camera_getViewProjectionMatrix); + oluacls_func(L, "getVisitingCamera", _olua_fun_cocos2d_Camera_getVisitingCamera); + oluacls_func(L, "initDefault", _olua_fun_cocos2d_Camera_initDefault); + oluacls_func(L, "initOrthographic", _olua_fun_cocos2d_Camera_initOrthographic); + oluacls_func(L, "initPerspective", _olua_fun_cocos2d_Camera_initPerspective); + oluacls_func(L, "isBrushValid", _olua_fun_cocos2d_Camera_isBrushValid); + oluacls_func(L, "isViewProjectionUpdated", _olua_fun_cocos2d_Camera_isViewProjectionUpdated); + oluacls_func(L, "lookAt", _olua_fun_cocos2d_Camera_lookAt); + oluacls_func(L, "new", _olua_fun_cocos2d_Camera_new); + oluacls_func(L, "project", _olua_fun_cocos2d_Camera_project); + oluacls_func(L, "projectGL", _olua_fun_cocos2d_Camera_projectGL); + oluacls_func(L, "setAdditionalProjection", _olua_fun_cocos2d_Camera_setAdditionalProjection); + oluacls_func(L, "setBackgroundBrush", _olua_fun_cocos2d_Camera_setBackgroundBrush); + oluacls_func(L, "setCameraFlag", _olua_fun_cocos2d_Camera_setCameraFlag); + oluacls_func(L, "setDefaultViewport", _olua_fun_cocos2d_Camera_setDefaultViewport); + oluacls_func(L, "setDepth", _olua_fun_cocos2d_Camera_setDepth); + oluacls_func(L, "setScene", _olua_fun_cocos2d_Camera_setScene); + oluacls_func(L, "unproject", _olua_fun_cocos2d_Camera_unproject); + oluacls_func(L, "unprojectGL", _olua_fun_cocos2d_Camera_unprojectGL); + oluacls_prop(L, "backgroundBrush", _olua_fun_cocos2d_Camera_getBackgroundBrush, _olua_fun_cocos2d_Camera_setBackgroundBrush); + oluacls_prop(L, "brushValid", _olua_fun_cocos2d_Camera_isBrushValid, nullptr); + oluacls_prop(L, "cameraFlag", _olua_fun_cocos2d_Camera_getCameraFlag, _olua_fun_cocos2d_Camera_setCameraFlag); + oluacls_prop(L, "defaultCamera", _olua_fun_cocos2d_Camera_getDefaultCamera, nullptr); + oluacls_prop(L, "defaultViewport", _olua_fun_cocos2d_Camera_getDefaultViewport, _olua_fun_cocos2d_Camera_setDefaultViewport); + oluacls_prop(L, "depth", _olua_fun_cocos2d_Camera_getDepth, _olua_fun_cocos2d_Camera_setDepth); + oluacls_prop(L, "farPlane", _olua_fun_cocos2d_Camera_getFarPlane, nullptr); + oluacls_prop(L, "nearPlane", _olua_fun_cocos2d_Camera_getNearPlane, nullptr); + oluacls_prop(L, "projectionMatrix", _olua_fun_cocos2d_Camera_getProjectionMatrix, nullptr); + oluacls_prop(L, "renderOrder", _olua_fun_cocos2d_Camera_getRenderOrder, nullptr); + oluacls_prop(L, "type", _olua_fun_cocos2d_Camera_getType, nullptr); + oluacls_prop(L, "viewMatrix", _olua_fun_cocos2d_Camera_getViewMatrix, nullptr); + oluacls_prop(L, "viewProjectionMatrix", _olua_fun_cocos2d_Camera_getViewProjectionMatrix, nullptr); + oluacls_prop(L, "viewProjectionUpdated", _olua_fun_cocos2d_Camera_isViewProjectionUpdated, nullptr); + oluacls_prop(L, "visitingCamera", _olua_fun_cocos2d_Camera_getVisitingCamera, nullptr); return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_CameraBackgroundBrush_BrushType(lua_State *L) +OLUA_LIB int luaopen_cc_Camera(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.Camera")) { + luaL_error(L, "class not found: cocos2d::Camera"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_cc_CameraBackgroundBrush_BrushType(lua_State *L) { oluacls_class(L, "cc.CameraBackgroundBrush.BrushType"); oluacls_func(L, "__index", olua_indexerror); @@ -45533,9 +48111,19 @@ OLUA_LIB int luaopen_cocos2d_CameraBackgroundBrush_BrushType(lua_State *L) return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_CameraBackgroundBrush_BrushType(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.CameraBackgroundBrush.BrushType")) { + luaL_error(L, "class not found: cocos2d::CameraBackgroundBrush::BrushType"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_CameraBackgroundBrush_createColorBrush(lua_State *L) +static int _olua_fun_cocos2d_CameraBackgroundBrush_createColorBrush(lua_State *L) { olua_startinvoke(L); @@ -45554,7 +48142,7 @@ static int _cocos2d_CameraBackgroundBrush_createColorBrush(lua_State *L) return num_ret; } -static int _cocos2d_CameraBackgroundBrush_createDepthBrush$1(lua_State *L) +static int _olua_fun_cocos2d_CameraBackgroundBrush_createDepthBrush$1(lua_State *L) { olua_startinvoke(L); @@ -45571,11 +48159,11 @@ static int _cocos2d_CameraBackgroundBrush_createDepthBrush$1(lua_State *L) return num_ret; } -static int _cocos2d_CameraBackgroundBrush_createDepthBrush$2(lua_State *L) +static int _olua_fun_cocos2d_CameraBackgroundBrush_createDepthBrush$2(lua_State *L) { olua_startinvoke(L); - // static cocos2d::CameraBackgroundDepthBrush *createDepthBrush(@optional float depth) + // static cocos2d::CameraBackgroundDepthBrush *createDepthBrush() cocos2d::CameraBackgroundDepthBrush *ret = cocos2d::CameraBackgroundBrush::createDepthBrush(); int num_ret = olua_push_object(L, ret, "cc.CameraBackgroundDepthBrush"); @@ -45584,19 +48172,19 @@ static int _cocos2d_CameraBackgroundBrush_createDepthBrush$2(lua_State *L) return num_ret; } -static int _cocos2d_CameraBackgroundBrush_createDepthBrush(lua_State *L) +static int _olua_fun_cocos2d_CameraBackgroundBrush_createDepthBrush(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 0) { - // static cocos2d::CameraBackgroundDepthBrush *createDepthBrush(@optional float depth) - return _cocos2d_CameraBackgroundBrush_createDepthBrush$2(L); + // static cocos2d::CameraBackgroundDepthBrush *createDepthBrush() + return _olua_fun_cocos2d_CameraBackgroundBrush_createDepthBrush$2(L); } if (num_args == 1) { // if ((olua_is_number(L, 1))) { // static cocos2d::CameraBackgroundDepthBrush *createDepthBrush(@optional float depth) - return _cocos2d_CameraBackgroundBrush_createDepthBrush$1(L); + return _olua_fun_cocos2d_CameraBackgroundBrush_createDepthBrush$1(L); // } } @@ -45605,7 +48193,7 @@ static int _cocos2d_CameraBackgroundBrush_createDepthBrush(lua_State *L) return 0; } -static int _cocos2d_CameraBackgroundBrush_createNoneBrush(lua_State *L) +static int _olua_fun_cocos2d_CameraBackgroundBrush_createNoneBrush(lua_State *L) { olua_startinvoke(L); @@ -45618,7 +48206,7 @@ static int _cocos2d_CameraBackgroundBrush_createNoneBrush(lua_State *L) return num_ret; } -static int _cocos2d_CameraBackgroundBrush_createSkyboxBrush(lua_State *L) +static int _olua_fun_cocos2d_CameraBackgroundBrush_createSkyboxBrush(lua_State *L) { olua_startinvoke(L); @@ -45645,17 +48233,17 @@ static int _cocos2d_CameraBackgroundBrush_createSkyboxBrush(lua_State *L) return num_ret; } -static int _cocos2d_CameraBackgroundBrush_drawBackground(lua_State *L) +static int _olua_fun_cocos2d_CameraBackgroundBrush_drawBackground(lua_State *L) { olua_startinvoke(L); cocos2d::CameraBackgroundBrush *self = nullptr; - cocos2d::Camera *arg1 = nullptr; /** */ + cocos2d::Camera *arg1 = nullptr; /** arg1 */ olua_to_object(L, 1, &self, "cc.CameraBackgroundBrush"); olua_check_object(L, 2, &arg1, "cc.Camera"); - // void drawBackground(cocos2d::Camera *) + // void drawBackground(cocos2d::Camera *arg1) self->drawBackground(arg1); olua_endinvoke(L); @@ -45663,7 +48251,7 @@ static int _cocos2d_CameraBackgroundBrush_drawBackground(lua_State *L) return 0; } -static int _cocos2d_CameraBackgroundBrush_getBrushType(lua_State *L) +static int _olua_fun_cocos2d_CameraBackgroundBrush_getBrushType(lua_State *L) { olua_startinvoke(L); @@ -45680,7 +48268,7 @@ static int _cocos2d_CameraBackgroundBrush_getBrushType(lua_State *L) return num_ret; } -static int _cocos2d_CameraBackgroundBrush_init(lua_State *L) +static int _olua_fun_cocos2d_CameraBackgroundBrush_init(lua_State *L) { olua_startinvoke(L); @@ -45697,7 +48285,7 @@ static int _cocos2d_CameraBackgroundBrush_init(lua_State *L) return num_ret; } -static int _cocos2d_CameraBackgroundBrush_isValid(lua_State *L) +static int _olua_fun_cocos2d_CameraBackgroundBrush_isValid(lua_State *L) { olua_startinvoke(L); @@ -45714,11 +48302,11 @@ static int _cocos2d_CameraBackgroundBrush_isValid(lua_State *L) return num_ret; } -static int _cocos2d_CameraBackgroundBrush_new(lua_State *L) +static int _olua_fun_cocos2d_CameraBackgroundBrush_new(lua_State *L) { olua_startinvoke(L); - // CameraBackgroundBrush() + // cocos2d::CameraBackgroundBrush() cocos2d::CameraBackgroundBrush *ret = new cocos2d::CameraBackgroundBrush(); int num_ret = olua_push_object(L, ret, "cc.CameraBackgroundBrush"); olua_postnew(L, ret); @@ -45728,27 +48316,36 @@ static int _cocos2d_CameraBackgroundBrush_new(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_CameraBackgroundBrush(lua_State *L) +static int _olua_cls_cc_CameraBackgroundBrush(lua_State *L) { oluacls_class(L, "cc.CameraBackgroundBrush"); - oluacls_func(L, "createColorBrush", _cocos2d_CameraBackgroundBrush_createColorBrush); - oluacls_func(L, "createDepthBrush", _cocos2d_CameraBackgroundBrush_createDepthBrush); - oluacls_func(L, "createNoneBrush", _cocos2d_CameraBackgroundBrush_createNoneBrush); - oluacls_func(L, "createSkyboxBrush", _cocos2d_CameraBackgroundBrush_createSkyboxBrush); - oluacls_func(L, "drawBackground", _cocos2d_CameraBackgroundBrush_drawBackground); - oluacls_func(L, "getBrushType", _cocos2d_CameraBackgroundBrush_getBrushType); - oluacls_func(L, "init", _cocos2d_CameraBackgroundBrush_init); - oluacls_func(L, "isValid", _cocos2d_CameraBackgroundBrush_isValid); - oluacls_func(L, "new", _cocos2d_CameraBackgroundBrush_new); - oluacls_prop(L, "brushType", _cocos2d_CameraBackgroundBrush_getBrushType, nullptr); - oluacls_prop(L, "valid", _cocos2d_CameraBackgroundBrush_isValid, nullptr); + oluacls_func(L, "createColorBrush", _olua_fun_cocos2d_CameraBackgroundBrush_createColorBrush); + oluacls_func(L, "createDepthBrush", _olua_fun_cocos2d_CameraBackgroundBrush_createDepthBrush); + oluacls_func(L, "createNoneBrush", _olua_fun_cocos2d_CameraBackgroundBrush_createNoneBrush); + oluacls_func(L, "createSkyboxBrush", _olua_fun_cocos2d_CameraBackgroundBrush_createSkyboxBrush); + oluacls_func(L, "drawBackground", _olua_fun_cocos2d_CameraBackgroundBrush_drawBackground); + oluacls_func(L, "getBrushType", _olua_fun_cocos2d_CameraBackgroundBrush_getBrushType); + oluacls_func(L, "init", _olua_fun_cocos2d_CameraBackgroundBrush_init); + oluacls_func(L, "isValid", _olua_fun_cocos2d_CameraBackgroundBrush_isValid); + oluacls_func(L, "new", _olua_fun_cocos2d_CameraBackgroundBrush_new); + oluacls_prop(L, "brushType", _olua_fun_cocos2d_CameraBackgroundBrush_getBrushType, nullptr); + oluacls_prop(L, "valid", _olua_fun_cocos2d_CameraBackgroundBrush_isValid, nullptr); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_CameraBackgroundBrush(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.CameraBackgroundBrush")) { + luaL_error(L, "class not found: cocos2d::CameraBackgroundBrush"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_CameraBackgroundDepthBrush_create(lua_State *L) +static int _olua_fun_cocos2d_CameraBackgroundDepthBrush_create(lua_State *L) { olua_startinvoke(L); @@ -45765,11 +48362,11 @@ static int _cocos2d_CameraBackgroundDepthBrush_create(lua_State *L) return num_ret; } -static int _cocos2d_CameraBackgroundDepthBrush_new(lua_State *L) +static int _olua_fun_cocos2d_CameraBackgroundDepthBrush_new(lua_State *L) { olua_startinvoke(L); - // CameraBackgroundDepthBrush() + // cocos2d::CameraBackgroundDepthBrush() cocos2d::CameraBackgroundDepthBrush *ret = new cocos2d::CameraBackgroundDepthBrush(); int num_ret = olua_push_object(L, ret, "cc.CameraBackgroundDepthBrush"); olua_postnew(L, ret); @@ -45779,7 +48376,7 @@ static int _cocos2d_CameraBackgroundDepthBrush_new(lua_State *L) return num_ret; } -static int _cocos2d_CameraBackgroundDepthBrush_setDepth(lua_State *L) +static int _olua_fun_cocos2d_CameraBackgroundDepthBrush_setDepth(lua_State *L) { olua_startinvoke(L); @@ -45797,19 +48394,28 @@ static int _cocos2d_CameraBackgroundDepthBrush_setDepth(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_CameraBackgroundDepthBrush(lua_State *L) +static int _olua_cls_cc_CameraBackgroundDepthBrush(lua_State *L) { oluacls_class(L, "cc.CameraBackgroundDepthBrush"); - oluacls_func(L, "create", _cocos2d_CameraBackgroundDepthBrush_create); - oluacls_func(L, "new", _cocos2d_CameraBackgroundDepthBrush_new); - oluacls_func(L, "setDepth", _cocos2d_CameraBackgroundDepthBrush_setDepth); + oluacls_func(L, "create", _olua_fun_cocos2d_CameraBackgroundDepthBrush_create); + oluacls_func(L, "new", _olua_fun_cocos2d_CameraBackgroundDepthBrush_new); + oluacls_func(L, "setDepth", _olua_fun_cocos2d_CameraBackgroundDepthBrush_setDepth); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_CameraBackgroundDepthBrush(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.CameraBackgroundDepthBrush")) { + luaL_error(L, "class not found: cocos2d::CameraBackgroundDepthBrush"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_CameraBackgroundColorBrush_create(lua_State *L) +static int _olua_fun_cocos2d_CameraBackgroundColorBrush_create(lua_State *L) { olua_startinvoke(L); @@ -45828,11 +48434,11 @@ static int _cocos2d_CameraBackgroundColorBrush_create(lua_State *L) return num_ret; } -static int _cocos2d_CameraBackgroundColorBrush_new(lua_State *L) +static int _olua_fun_cocos2d_CameraBackgroundColorBrush_new(lua_State *L) { olua_startinvoke(L); - // CameraBackgroundColorBrush() + // cocos2d::CameraBackgroundColorBrush() cocos2d::CameraBackgroundColorBrush *ret = new cocos2d::CameraBackgroundColorBrush(); int num_ret = olua_push_object(L, ret, "cc.CameraBackgroundColorBrush"); olua_postnew(L, ret); @@ -45842,7 +48448,7 @@ static int _cocos2d_CameraBackgroundColorBrush_new(lua_State *L) return num_ret; } -static int _cocos2d_CameraBackgroundColorBrush_setColor(lua_State *L) +static int _olua_fun_cocos2d_CameraBackgroundColorBrush_setColor(lua_State *L) { olua_startinvoke(L); @@ -45860,19 +48466,28 @@ static int _cocos2d_CameraBackgroundColorBrush_setColor(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_CameraBackgroundColorBrush(lua_State *L) +static int _olua_cls_cc_CameraBackgroundColorBrush(lua_State *L) { oluacls_class(L, "cc.CameraBackgroundColorBrush"); - oluacls_func(L, "create", _cocos2d_CameraBackgroundColorBrush_create); - oluacls_func(L, "new", _cocos2d_CameraBackgroundColorBrush_new); - oluacls_func(L, "setColor", _cocos2d_CameraBackgroundColorBrush_setColor); + oluacls_func(L, "create", _olua_fun_cocos2d_CameraBackgroundColorBrush_create); + oluacls_func(L, "new", _olua_fun_cocos2d_CameraBackgroundColorBrush_new); + oluacls_func(L, "setColor", _olua_fun_cocos2d_CameraBackgroundColorBrush_setColor); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_CameraBackgroundColorBrush(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.CameraBackgroundColorBrush")) { + luaL_error(L, "class not found: cocos2d::CameraBackgroundColorBrush"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_CameraBackgroundSkyBoxBrush_create$1(lua_State *L) +static int _olua_fun_cocos2d_CameraBackgroundSkyBoxBrush_create$1(lua_State *L) { olua_startinvoke(L); @@ -45899,7 +48514,7 @@ static int _cocos2d_CameraBackgroundSkyBoxBrush_create$1(lua_State *L) return num_ret; } -static int _cocos2d_CameraBackgroundSkyBoxBrush_create$2(lua_State *L) +static int _olua_fun_cocos2d_CameraBackgroundSkyBoxBrush_create$2(lua_State *L) { olua_startinvoke(L); @@ -45912,19 +48527,19 @@ static int _cocos2d_CameraBackgroundSkyBoxBrush_create$2(lua_State *L) return num_ret; } -static int _cocos2d_CameraBackgroundSkyBoxBrush_create(lua_State *L) +static int _olua_fun_cocos2d_CameraBackgroundSkyBoxBrush_create(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 0) { // static cocos2d::CameraBackgroundSkyBoxBrush *create() - return _cocos2d_CameraBackgroundSkyBoxBrush_create$2(L); + return _olua_fun_cocos2d_CameraBackgroundSkyBoxBrush_create$2(L); } if (num_args == 6) { // if ((olua_is_string(L, 1)) && (olua_is_string(L, 2)) && (olua_is_string(L, 3)) && (olua_is_string(L, 4)) && (olua_is_string(L, 5)) && (olua_is_string(L, 6))) { // static cocos2d::CameraBackgroundSkyBoxBrush *create(const std::string &positive_x, const std::string &negative_x, const std::string &positive_y, const std::string &negative_y, const std::string &positive_z, const std::string &negative_z) - return _cocos2d_CameraBackgroundSkyBoxBrush_create$1(L); + return _olua_fun_cocos2d_CameraBackgroundSkyBoxBrush_create$1(L); // } } @@ -45933,7 +48548,7 @@ static int _cocos2d_CameraBackgroundSkyBoxBrush_create(lua_State *L) return 0; } -static int _cocos2d_CameraBackgroundSkyBoxBrush_isActived(lua_State *L) +static int _olua_fun_cocos2d_CameraBackgroundSkyBoxBrush_isActived(lua_State *L) { olua_startinvoke(L); @@ -45950,11 +48565,11 @@ static int _cocos2d_CameraBackgroundSkyBoxBrush_isActived(lua_State *L) return num_ret; } -static int _cocos2d_CameraBackgroundSkyBoxBrush_new(lua_State *L) +static int _olua_fun_cocos2d_CameraBackgroundSkyBoxBrush_new(lua_State *L) { olua_startinvoke(L); - // CameraBackgroundSkyBoxBrush() + // cocos2d::CameraBackgroundSkyBoxBrush() cocos2d::CameraBackgroundSkyBoxBrush *ret = new cocos2d::CameraBackgroundSkyBoxBrush(); int num_ret = olua_push_object(L, ret, "cc.CameraBackgroundSkyBoxBrush"); olua_postnew(L, ret); @@ -45964,7 +48579,7 @@ static int _cocos2d_CameraBackgroundSkyBoxBrush_new(lua_State *L) return num_ret; } -static int _cocos2d_CameraBackgroundSkyBoxBrush_setActived(lua_State *L) +static int _olua_fun_cocos2d_CameraBackgroundSkyBoxBrush_setActived(lua_State *L) { olua_startinvoke(L); @@ -45982,7 +48597,7 @@ static int _cocos2d_CameraBackgroundSkyBoxBrush_setActived(lua_State *L) return 0; } -static int _cocos2d_CameraBackgroundSkyBoxBrush_setTexture(lua_State *L) +static int _olua_fun_cocos2d_CameraBackgroundSkyBoxBrush_setTexture(lua_State *L) { olua_startinvoke(L); @@ -46000,7 +48615,7 @@ static int _cocos2d_CameraBackgroundSkyBoxBrush_setTexture(lua_State *L) return 0; } -static int _cocos2d_CameraBackgroundSkyBoxBrush_setTextureValid(lua_State *L) +static int _olua_fun_cocos2d_CameraBackgroundSkyBoxBrush_setTextureValid(lua_State *L) { olua_startinvoke(L); @@ -46018,23 +48633,32 @@ static int _cocos2d_CameraBackgroundSkyBoxBrush_setTextureValid(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_CameraBackgroundSkyBoxBrush(lua_State *L) +static int _olua_cls_cc_CameraBackgroundSkyBoxBrush(lua_State *L) { oluacls_class(L, "cc.CameraBackgroundSkyBoxBrush"); - oluacls_func(L, "create", _cocos2d_CameraBackgroundSkyBoxBrush_create); - oluacls_func(L, "isActived", _cocos2d_CameraBackgroundSkyBoxBrush_isActived); - oluacls_func(L, "new", _cocos2d_CameraBackgroundSkyBoxBrush_new); - oluacls_func(L, "setActived", _cocos2d_CameraBackgroundSkyBoxBrush_setActived); - oluacls_func(L, "setTexture", _cocos2d_CameraBackgroundSkyBoxBrush_setTexture); - oluacls_func(L, "setTextureValid", _cocos2d_CameraBackgroundSkyBoxBrush_setTextureValid); - oluacls_prop(L, "actived", _cocos2d_CameraBackgroundSkyBoxBrush_isActived, _cocos2d_CameraBackgroundSkyBoxBrush_setActived); + oluacls_func(L, "create", _olua_fun_cocos2d_CameraBackgroundSkyBoxBrush_create); + oluacls_func(L, "isActived", _olua_fun_cocos2d_CameraBackgroundSkyBoxBrush_isActived); + oluacls_func(L, "new", _olua_fun_cocos2d_CameraBackgroundSkyBoxBrush_new); + oluacls_func(L, "setActived", _olua_fun_cocos2d_CameraBackgroundSkyBoxBrush_setActived); + oluacls_func(L, "setTexture", _olua_fun_cocos2d_CameraBackgroundSkyBoxBrush_setTexture); + oluacls_func(L, "setTextureValid", _olua_fun_cocos2d_CameraBackgroundSkyBoxBrush_setTextureValid); + oluacls_prop(L, "actived", _olua_fun_cocos2d_CameraBackgroundSkyBoxBrush_isActived, _olua_fun_cocos2d_CameraBackgroundSkyBoxBrush_setActived); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_CameraBackgroundSkyBoxBrush(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.CameraBackgroundSkyBoxBrush")) { + luaL_error(L, "class not found: cocos2d::CameraBackgroundSkyBoxBrush"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_PlayableProtocol___gc(lua_State *L) +static int _olua_fun_cocos2d_PlayableProtocol___gc(lua_State *L) { olua_startinvoke(L); @@ -46046,7 +48670,7 @@ static int _cocos2d_PlayableProtocol___gc(lua_State *L) return 0; } -static int _cocos2d_PlayableProtocol___olua_move(lua_State *L) +static int _olua_fun_cocos2d_PlayableProtocol___olua_move(lua_State *L) { olua_startinvoke(L); @@ -46058,7 +48682,7 @@ static int _cocos2d_PlayableProtocol___olua_move(lua_State *L) return 1; } -static int _cocos2d_PlayableProtocol_start(lua_State *L) +static int _olua_fun_cocos2d_PlayableProtocol_start(lua_State *L) { olua_startinvoke(L); @@ -46074,7 +48698,7 @@ static int _cocos2d_PlayableProtocol_start(lua_State *L) return 0; } -static int _cocos2d_PlayableProtocol_stop(lua_State *L) +static int _olua_fun_cocos2d_PlayableProtocol_stop(lua_State *L) { olua_startinvoke(L); @@ -46090,20 +48714,29 @@ static int _cocos2d_PlayableProtocol_stop(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_PlayableProtocol(lua_State *L) +static int _olua_cls_cc_PlayableProtocol(lua_State *L) { oluacls_class(L, "cc.PlayableProtocol"); - oluacls_func(L, "__gc", _cocos2d_PlayableProtocol___gc); - oluacls_func(L, "__olua_move", _cocos2d_PlayableProtocol___olua_move); - oluacls_func(L, "start", _cocos2d_PlayableProtocol_start); - oluacls_func(L, "stop", _cocos2d_PlayableProtocol_stop); + oluacls_func(L, "__gc", _olua_fun_cocos2d_PlayableProtocol___gc); + oluacls_func(L, "__olua_move", _olua_fun_cocos2d_PlayableProtocol___olua_move); + oluacls_func(L, "start", _olua_fun_cocos2d_PlayableProtocol_start); + oluacls_func(L, "stop", _olua_fun_cocos2d_PlayableProtocol_stop); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_PlayableProtocol(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.PlayableProtocol")) { + luaL_error(L, "class not found: cocos2d::PlayableProtocol"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_ParticleBatchNode_as(lua_State *L) +static int _olua_fun_cocos2d_ParticleBatchNode_as(lua_State *L) { olua_startinvoke(L); @@ -46135,7 +48768,7 @@ static int _cocos2d_ParticleBatchNode_as(lua_State *L) return 1; } -static int _cocos2d_ParticleBatchNode_create$1(lua_State *L) +static int _olua_fun_cocos2d_ParticleBatchNode_create$1(lua_State *L) { olua_startinvoke(L); @@ -46154,7 +48787,7 @@ static int _cocos2d_ParticleBatchNode_create$1(lua_State *L) return num_ret; } -static int _cocos2d_ParticleBatchNode_create$2(lua_State *L) +static int _olua_fun_cocos2d_ParticleBatchNode_create$2(lua_State *L) { olua_startinvoke(L); @@ -46162,7 +48795,7 @@ static int _cocos2d_ParticleBatchNode_create$2(lua_State *L) olua_check_string(L, 1, &arg1); - // static cocos2d::ParticleBatchNode *create(const std::string &fileImage, @optional int capacity) + // static cocos2d::ParticleBatchNode *create(const std::string &fileImage) cocos2d::ParticleBatchNode *ret = cocos2d::ParticleBatchNode::create(arg1); int num_ret = olua_push_object(L, ret, "cc.ParticleBatchNode"); @@ -46171,21 +48804,21 @@ static int _cocos2d_ParticleBatchNode_create$2(lua_State *L) return num_ret; } -static int _cocos2d_ParticleBatchNode_create(lua_State *L) +static int _olua_fun_cocos2d_ParticleBatchNode_create(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 1) { // if ((olua_is_string(L, 1))) { - // static cocos2d::ParticleBatchNode *create(const std::string &fileImage, @optional int capacity) - return _cocos2d_ParticleBatchNode_create$2(L); + // static cocos2d::ParticleBatchNode *create(const std::string &fileImage) + return _olua_fun_cocos2d_ParticleBatchNode_create$2(L); // } } if (num_args == 2) { // if ((olua_is_string(L, 1)) && (olua_is_integer(L, 2))) { // static cocos2d::ParticleBatchNode *create(const std::string &fileImage, @optional int capacity) - return _cocos2d_ParticleBatchNode_create$1(L); + return _olua_fun_cocos2d_ParticleBatchNode_create$1(L); // } } @@ -46194,7 +48827,7 @@ static int _cocos2d_ParticleBatchNode_create(lua_State *L) return 0; } -static int _cocos2d_ParticleBatchNode_createWithTexture$1(lua_State *L) +static int _olua_fun_cocos2d_ParticleBatchNode_createWithTexture$1(lua_State *L) { olua_startinvoke(L); @@ -46213,7 +48846,7 @@ static int _cocos2d_ParticleBatchNode_createWithTexture$1(lua_State *L) return num_ret; } -static int _cocos2d_ParticleBatchNode_createWithTexture$2(lua_State *L) +static int _olua_fun_cocos2d_ParticleBatchNode_createWithTexture$2(lua_State *L) { olua_startinvoke(L); @@ -46221,7 +48854,7 @@ static int _cocos2d_ParticleBatchNode_createWithTexture$2(lua_State *L) olua_check_object(L, 1, &arg1, "cc.Texture2D"); - // static cocos2d::ParticleBatchNode *createWithTexture(cocos2d::Texture2D *tex, @optional int capacity) + // static cocos2d::ParticleBatchNode *createWithTexture(cocos2d::Texture2D *tex) cocos2d::ParticleBatchNode *ret = cocos2d::ParticleBatchNode::createWithTexture(arg1); int num_ret = olua_push_object(L, ret, "cc.ParticleBatchNode"); @@ -46230,21 +48863,21 @@ static int _cocos2d_ParticleBatchNode_createWithTexture$2(lua_State *L) return num_ret; } -static int _cocos2d_ParticleBatchNode_createWithTexture(lua_State *L) +static int _olua_fun_cocos2d_ParticleBatchNode_createWithTexture(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 1) { // if ((olua_is_object(L, 1, "cc.Texture2D"))) { - // static cocos2d::ParticleBatchNode *createWithTexture(cocos2d::Texture2D *tex, @optional int capacity) - return _cocos2d_ParticleBatchNode_createWithTexture$2(L); + // static cocos2d::ParticleBatchNode *createWithTexture(cocos2d::Texture2D *tex) + return _olua_fun_cocos2d_ParticleBatchNode_createWithTexture$2(L); // } } if (num_args == 2) { // if ((olua_is_object(L, 1, "cc.Texture2D")) && (olua_is_integer(L, 2))) { // static cocos2d::ParticleBatchNode *createWithTexture(cocos2d::Texture2D *tex, @optional int capacity) - return _cocos2d_ParticleBatchNode_createWithTexture$1(L); + return _olua_fun_cocos2d_ParticleBatchNode_createWithTexture$1(L); // } } @@ -46253,7 +48886,7 @@ static int _cocos2d_ParticleBatchNode_createWithTexture(lua_State *L) return 0; } -static int _cocos2d_ParticleBatchNode_disableParticle(lua_State *L) +static int _olua_fun_cocos2d_ParticleBatchNode_disableParticle(lua_State *L) { olua_startinvoke(L); @@ -46271,7 +48904,7 @@ static int _cocos2d_ParticleBatchNode_disableParticle(lua_State *L) return 0; } -static int _cocos2d_ParticleBatchNode_getBlendFunc(lua_State *L) +static int _olua_fun_cocos2d_ParticleBatchNode_getBlendFunc(lua_State *L) { olua_startinvoke(L); @@ -46288,7 +48921,7 @@ static int _cocos2d_ParticleBatchNode_getBlendFunc(lua_State *L) return num_ret; } -static int _cocos2d_ParticleBatchNode_getTexture(lua_State *L) +static int _olua_fun_cocos2d_ParticleBatchNode_getTexture(lua_State *L) { olua_startinvoke(L); @@ -46305,7 +48938,7 @@ static int _cocos2d_ParticleBatchNode_getTexture(lua_State *L) return num_ret; } -static int _cocos2d_ParticleBatchNode_getTextureAtlas(lua_State *L) +static int _olua_fun_cocos2d_ParticleBatchNode_getTextureAtlas(lua_State *L) { olua_startinvoke(L); @@ -46322,7 +48955,7 @@ static int _cocos2d_ParticleBatchNode_getTextureAtlas(lua_State *L) return num_ret; } -static int _cocos2d_ParticleBatchNode_initWithFile(lua_State *L) +static int _olua_fun_cocos2d_ParticleBatchNode_initWithFile(lua_State *L) { olua_startinvoke(L); @@ -46343,7 +48976,7 @@ static int _cocos2d_ParticleBatchNode_initWithFile(lua_State *L) return num_ret; } -static int _cocos2d_ParticleBatchNode_initWithTexture(lua_State *L) +static int _olua_fun_cocos2d_ParticleBatchNode_initWithTexture(lua_State *L) { olua_startinvoke(L); @@ -46364,7 +48997,7 @@ static int _cocos2d_ParticleBatchNode_initWithTexture(lua_State *L) return num_ret; } -static int _cocos2d_ParticleBatchNode_insertChild(lua_State *L) +static int _olua_fun_cocos2d_ParticleBatchNode_insertChild(lua_State *L) { olua_startinvoke(L); @@ -46384,11 +49017,11 @@ static int _cocos2d_ParticleBatchNode_insertChild(lua_State *L) return 0; } -static int _cocos2d_ParticleBatchNode_new(lua_State *L) +static int _olua_fun_cocos2d_ParticleBatchNode_new(lua_State *L) { olua_startinvoke(L); - // ParticleBatchNode() + // cocos2d::ParticleBatchNode() cocos2d::ParticleBatchNode *ret = new cocos2d::ParticleBatchNode(); int num_ret = olua_push_object(L, ret, "cc.ParticleBatchNode"); olua_postnew(L, ret); @@ -46398,7 +49031,7 @@ static int _cocos2d_ParticleBatchNode_new(lua_State *L) return num_ret; } -static int _cocos2d_ParticleBatchNode_removeChildAtIndex(lua_State *L) +static int _olua_fun_cocos2d_ParticleBatchNode_removeChildAtIndex(lua_State *L) { olua_startinvoke(L); @@ -46418,25 +49051,25 @@ static int _cocos2d_ParticleBatchNode_removeChildAtIndex(lua_State *L) return 0; } -static int _cocos2d_ParticleBatchNode_setBlendFunc(lua_State *L) +static int _olua_fun_cocos2d_ParticleBatchNode_setBlendFunc(lua_State *L) { olua_startinvoke(L); cocos2d::ParticleBatchNode *self = nullptr; - cocos2d::BlendFunc arg1; /** blendFunc */ + cocos2d::BlendFunc *arg1; /** blendFunc */ olua_to_object(L, 1, &self, "cc.ParticleBatchNode"); olua_check_object(L, 2, &arg1, "cc.BlendFunc"); // void setBlendFunc(const cocos2d::BlendFunc &blendFunc) - self->setBlendFunc(arg1); + self->setBlendFunc(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_ParticleBatchNode_setTexture(lua_State *L) +static int _olua_fun_cocos2d_ParticleBatchNode_setTexture(lua_State *L) { olua_startinvoke(L); @@ -46454,7 +49087,7 @@ static int _cocos2d_ParticleBatchNode_setTexture(lua_State *L) return 0; } -static int _cocos2d_ParticleBatchNode_setTextureAtlas(lua_State *L) +static int _olua_fun_cocos2d_ParticleBatchNode_setTextureAtlas(lua_State *L) { olua_startinvoke(L); @@ -46472,35 +49105,43 @@ static int _cocos2d_ParticleBatchNode_setTextureAtlas(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ParticleBatchNode(lua_State *L) +static int _olua_cls_cc_ParticleBatchNode(lua_State *L) { oluacls_class(L, "cc.ParticleBatchNode"); - oluacls_func(L, "as", _cocos2d_ParticleBatchNode_as); - oluacls_func(L, "create", _cocos2d_ParticleBatchNode_create); - oluacls_func(L, "createWithTexture", _cocos2d_ParticleBatchNode_createWithTexture); - oluacls_func(L, "disableParticle", _cocos2d_ParticleBatchNode_disableParticle); - oluacls_func(L, "getBlendFunc", _cocos2d_ParticleBatchNode_getBlendFunc); - oluacls_func(L, "getTexture", _cocos2d_ParticleBatchNode_getTexture); - oluacls_func(L, "getTextureAtlas", _cocos2d_ParticleBatchNode_getTextureAtlas); - oluacls_func(L, "initWithFile", _cocos2d_ParticleBatchNode_initWithFile); - oluacls_func(L, "initWithTexture", _cocos2d_ParticleBatchNode_initWithTexture); - oluacls_func(L, "insertChild", _cocos2d_ParticleBatchNode_insertChild); - oluacls_func(L, "new", _cocos2d_ParticleBatchNode_new); - oluacls_func(L, "removeChildAtIndex", _cocos2d_ParticleBatchNode_removeChildAtIndex); - oluacls_func(L, "setBlendFunc", _cocos2d_ParticleBatchNode_setBlendFunc); - oluacls_func(L, "setTexture", _cocos2d_ParticleBatchNode_setTexture); - oluacls_func(L, "setTextureAtlas", _cocos2d_ParticleBatchNode_setTextureAtlas); - oluacls_prop(L, "blendFunc", _cocos2d_ParticleBatchNode_getBlendFunc, _cocos2d_ParticleBatchNode_setBlendFunc); - oluacls_prop(L, "texture", _cocos2d_ParticleBatchNode_getTexture, _cocos2d_ParticleBatchNode_setTexture); - oluacls_prop(L, "textureAtlas", _cocos2d_ParticleBatchNode_getTextureAtlas, _cocos2d_ParticleBatchNode_setTextureAtlas); + oluacls_func(L, "as", _olua_fun_cocos2d_ParticleBatchNode_as); + oluacls_func(L, "create", _olua_fun_cocos2d_ParticleBatchNode_create); + oluacls_func(L, "createWithTexture", _olua_fun_cocos2d_ParticleBatchNode_createWithTexture); + oluacls_func(L, "disableParticle", _olua_fun_cocos2d_ParticleBatchNode_disableParticle); + oluacls_func(L, "getBlendFunc", _olua_fun_cocos2d_ParticleBatchNode_getBlendFunc); + oluacls_func(L, "getTexture", _olua_fun_cocos2d_ParticleBatchNode_getTexture); + oluacls_func(L, "getTextureAtlas", _olua_fun_cocos2d_ParticleBatchNode_getTextureAtlas); + oluacls_func(L, "initWithFile", _olua_fun_cocos2d_ParticleBatchNode_initWithFile); + oluacls_func(L, "initWithTexture", _olua_fun_cocos2d_ParticleBatchNode_initWithTexture); + oluacls_func(L, "insertChild", _olua_fun_cocos2d_ParticleBatchNode_insertChild); + oluacls_func(L, "new", _olua_fun_cocos2d_ParticleBatchNode_new); + oluacls_func(L, "removeChildAtIndex", _olua_fun_cocos2d_ParticleBatchNode_removeChildAtIndex); + oluacls_func(L, "setBlendFunc", _olua_fun_cocos2d_ParticleBatchNode_setBlendFunc); + oluacls_func(L, "setTexture", _olua_fun_cocos2d_ParticleBatchNode_setTexture); + oluacls_func(L, "setTextureAtlas", _olua_fun_cocos2d_ParticleBatchNode_setTextureAtlas); + oluacls_prop(L, "blendFunc", _olua_fun_cocos2d_ParticleBatchNode_getBlendFunc, _olua_fun_cocos2d_ParticleBatchNode_setBlendFunc); + oluacls_prop(L, "texture", _olua_fun_cocos2d_ParticleBatchNode_getTexture, _olua_fun_cocos2d_ParticleBatchNode_setTexture); + oluacls_prop(L, "textureAtlas", _olua_fun_cocos2d_ParticleBatchNode_getTextureAtlas, _olua_fun_cocos2d_ParticleBatchNode_setTextureAtlas); return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ParticleSystem_Mode(lua_State *L) +OLUA_LIB int luaopen_cc_ParticleBatchNode(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.ParticleBatchNode")) { + luaL_error(L, "class not found: cocos2d::ParticleBatchNode"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_cc_ParticleSystem_Mode(lua_State *L) { oluacls_class(L, "cc.ParticleSystem.Mode"); oluacls_func(L, "__index", olua_indexerror); @@ -46510,10 +49151,19 @@ OLUA_LIB int luaopen_cocos2d_ParticleSystem_Mode(lua_State *L) return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ParticleSystem_PositionType(lua_State *L) +OLUA_LIB int luaopen_cc_ParticleSystem_Mode(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.ParticleSystem.Mode")) { + luaL_error(L, "class not found: cocos2d::ParticleSystem::Mode"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_cc_ParticleSystem_PositionType(lua_State *L) { oluacls_class(L, "cc.ParticleSystem.PositionType"); oluacls_func(L, "__index", olua_indexerror); @@ -46524,9 +49174,19 @@ OLUA_LIB int luaopen_cocos2d_ParticleSystem_PositionType(lua_State *L) return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_ParticleSystem_PositionType(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.ParticleSystem.PositionType")) { + luaL_error(L, "class not found: cocos2d::ParticleSystem::PositionType"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_ParticleSystem_addParticles(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystem_addParticles(lua_State *L) { olua_startinvoke(L); @@ -46544,7 +49204,7 @@ static int _cocos2d_ParticleSystem_addParticles(lua_State *L) return 0; } -static int _cocos2d_ParticleSystem_as(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystem_as(lua_State *L) { olua_startinvoke(L); @@ -46580,7 +49240,7 @@ static int _cocos2d_ParticleSystem_as(lua_State *L) return 1; } -static int _cocos2d_ParticleSystem_create(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystem_create(lua_State *L) { olua_startinvoke(L); @@ -46597,7 +49257,7 @@ static int _cocos2d_ParticleSystem_create(lua_State *L) return num_ret; } -static int _cocos2d_ParticleSystem_createWithTotalParticles(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystem_createWithTotalParticles(lua_State *L) { olua_startinvoke(L); @@ -46614,7 +49274,7 @@ static int _cocos2d_ParticleSystem_createWithTotalParticles(lua_State *L) return num_ret; } -static int _cocos2d_ParticleSystem_getAllParticleSystems(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystem_getAllParticleSystems(lua_State *L) { olua_startinvoke(L); @@ -46629,7 +49289,7 @@ static int _cocos2d_ParticleSystem_getAllParticleSystems(lua_State *L) return num_ret; } -static int _cocos2d_ParticleSystem_getAngle(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystem_getAngle(lua_State *L) { olua_startinvoke(L); @@ -46646,7 +49306,7 @@ static int _cocos2d_ParticleSystem_getAngle(lua_State *L) return num_ret; } -static int _cocos2d_ParticleSystem_getAngleVar(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystem_getAngleVar(lua_State *L) { olua_startinvoke(L); @@ -46663,7 +49323,7 @@ static int _cocos2d_ParticleSystem_getAngleVar(lua_State *L) return num_ret; } -static int _cocos2d_ParticleSystem_getAtlasIndex(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystem_getAtlasIndex(lua_State *L) { olua_startinvoke(L); @@ -46680,7 +49340,7 @@ static int _cocos2d_ParticleSystem_getAtlasIndex(lua_State *L) return num_ret; } -static int _cocos2d_ParticleSystem_getBatchNode(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystem_getBatchNode(lua_State *L) { olua_startinvoke(L); @@ -46697,7 +49357,7 @@ static int _cocos2d_ParticleSystem_getBatchNode(lua_State *L) return num_ret; } -static int _cocos2d_ParticleSystem_getBlendFunc(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystem_getBlendFunc(lua_State *L) { olua_startinvoke(L); @@ -46714,7 +49374,7 @@ static int _cocos2d_ParticleSystem_getBlendFunc(lua_State *L) return num_ret; } -static int _cocos2d_ParticleSystem_getDuration(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystem_getDuration(lua_State *L) { olua_startinvoke(L); @@ -46731,7 +49391,7 @@ static int _cocos2d_ParticleSystem_getDuration(lua_State *L) return num_ret; } -static int _cocos2d_ParticleSystem_getEmissionRate(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystem_getEmissionRate(lua_State *L) { olua_startinvoke(L); @@ -46748,7 +49408,7 @@ static int _cocos2d_ParticleSystem_getEmissionRate(lua_State *L) return num_ret; } -static int _cocos2d_ParticleSystem_getEmitterMode(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystem_getEmitterMode(lua_State *L) { olua_startinvoke(L); @@ -46765,7 +49425,7 @@ static int _cocos2d_ParticleSystem_getEmitterMode(lua_State *L) return num_ret; } -static int _cocos2d_ParticleSystem_getEndColor(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystem_getEndColor(lua_State *L) { olua_startinvoke(L); @@ -46782,7 +49442,7 @@ static int _cocos2d_ParticleSystem_getEndColor(lua_State *L) return num_ret; } -static int _cocos2d_ParticleSystem_getEndColorVar(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystem_getEndColorVar(lua_State *L) { olua_startinvoke(L); @@ -46799,7 +49459,7 @@ static int _cocos2d_ParticleSystem_getEndColorVar(lua_State *L) return num_ret; } -static int _cocos2d_ParticleSystem_getEndRadius(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystem_getEndRadius(lua_State *L) { olua_startinvoke(L); @@ -46816,7 +49476,7 @@ static int _cocos2d_ParticleSystem_getEndRadius(lua_State *L) return num_ret; } -static int _cocos2d_ParticleSystem_getEndRadiusVar(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystem_getEndRadiusVar(lua_State *L) { olua_startinvoke(L); @@ -46833,7 +49493,7 @@ static int _cocos2d_ParticleSystem_getEndRadiusVar(lua_State *L) return num_ret; } -static int _cocos2d_ParticleSystem_getEndSize(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystem_getEndSize(lua_State *L) { olua_startinvoke(L); @@ -46850,7 +49510,7 @@ static int _cocos2d_ParticleSystem_getEndSize(lua_State *L) return num_ret; } -static int _cocos2d_ParticleSystem_getEndSizeVar(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystem_getEndSizeVar(lua_State *L) { olua_startinvoke(L); @@ -46867,7 +49527,7 @@ static int _cocos2d_ParticleSystem_getEndSizeVar(lua_State *L) return num_ret; } -static int _cocos2d_ParticleSystem_getEndSpin(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystem_getEndSpin(lua_State *L) { olua_startinvoke(L); @@ -46884,7 +49544,7 @@ static int _cocos2d_ParticleSystem_getEndSpin(lua_State *L) return num_ret; } -static int _cocos2d_ParticleSystem_getEndSpinVar(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystem_getEndSpinVar(lua_State *L) { olua_startinvoke(L); @@ -46901,7 +49561,7 @@ static int _cocos2d_ParticleSystem_getEndSpinVar(lua_State *L) return num_ret; } -static int _cocos2d_ParticleSystem_getGravity(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystem_getGravity(lua_State *L) { olua_startinvoke(L); @@ -46918,7 +49578,7 @@ static int _cocos2d_ParticleSystem_getGravity(lua_State *L) return num_ret; } -static int _cocos2d_ParticleSystem_getLife(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystem_getLife(lua_State *L) { olua_startinvoke(L); @@ -46935,7 +49595,7 @@ static int _cocos2d_ParticleSystem_getLife(lua_State *L) return num_ret; } -static int _cocos2d_ParticleSystem_getLifeVar(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystem_getLifeVar(lua_State *L) { olua_startinvoke(L); @@ -46952,7 +49612,7 @@ static int _cocos2d_ParticleSystem_getLifeVar(lua_State *L) return num_ret; } -static int _cocos2d_ParticleSystem_getParticleCount(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystem_getParticleCount(lua_State *L) { olua_startinvoke(L); @@ -46969,7 +49629,7 @@ static int _cocos2d_ParticleSystem_getParticleCount(lua_State *L) return num_ret; } -static int _cocos2d_ParticleSystem_getPosVar(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystem_getPosVar(lua_State *L) { olua_startinvoke(L); @@ -46986,7 +49646,7 @@ static int _cocos2d_ParticleSystem_getPosVar(lua_State *L) return num_ret; } -static int _cocos2d_ParticleSystem_getPositionType(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystem_getPositionType(lua_State *L) { olua_startinvoke(L); @@ -47003,7 +49663,7 @@ static int _cocos2d_ParticleSystem_getPositionType(lua_State *L) return num_ret; } -static int _cocos2d_ParticleSystem_getRadialAccel(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystem_getRadialAccel(lua_State *L) { olua_startinvoke(L); @@ -47020,7 +49680,7 @@ static int _cocos2d_ParticleSystem_getRadialAccel(lua_State *L) return num_ret; } -static int _cocos2d_ParticleSystem_getRadialAccelVar(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystem_getRadialAccelVar(lua_State *L) { olua_startinvoke(L); @@ -47037,7 +49697,7 @@ static int _cocos2d_ParticleSystem_getRadialAccelVar(lua_State *L) return num_ret; } -static int _cocos2d_ParticleSystem_getResourceFile(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystem_getResourceFile(lua_State *L) { olua_startinvoke(L); @@ -47054,7 +49714,7 @@ static int _cocos2d_ParticleSystem_getResourceFile(lua_State *L) return num_ret; } -static int _cocos2d_ParticleSystem_getRotatePerSecond(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystem_getRotatePerSecond(lua_State *L) { olua_startinvoke(L); @@ -47071,7 +49731,7 @@ static int _cocos2d_ParticleSystem_getRotatePerSecond(lua_State *L) return num_ret; } -static int _cocos2d_ParticleSystem_getRotatePerSecondVar(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystem_getRotatePerSecondVar(lua_State *L) { olua_startinvoke(L); @@ -47088,7 +49748,7 @@ static int _cocos2d_ParticleSystem_getRotatePerSecondVar(lua_State *L) return num_ret; } -static int _cocos2d_ParticleSystem_getRotationIsDir(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystem_getRotationIsDir(lua_State *L) { olua_startinvoke(L); @@ -47105,7 +49765,7 @@ static int _cocos2d_ParticleSystem_getRotationIsDir(lua_State *L) return num_ret; } -static int _cocos2d_ParticleSystem_getSourcePosition(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystem_getSourcePosition(lua_State *L) { olua_startinvoke(L); @@ -47122,7 +49782,7 @@ static int _cocos2d_ParticleSystem_getSourcePosition(lua_State *L) return num_ret; } -static int _cocos2d_ParticleSystem_getSpeed(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystem_getSpeed(lua_State *L) { olua_startinvoke(L); @@ -47139,7 +49799,7 @@ static int _cocos2d_ParticleSystem_getSpeed(lua_State *L) return num_ret; } -static int _cocos2d_ParticleSystem_getSpeedVar(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystem_getSpeedVar(lua_State *L) { olua_startinvoke(L); @@ -47156,7 +49816,7 @@ static int _cocos2d_ParticleSystem_getSpeedVar(lua_State *L) return num_ret; } -static int _cocos2d_ParticleSystem_getStartColor(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystem_getStartColor(lua_State *L) { olua_startinvoke(L); @@ -47173,7 +49833,7 @@ static int _cocos2d_ParticleSystem_getStartColor(lua_State *L) return num_ret; } -static int _cocos2d_ParticleSystem_getStartColorVar(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystem_getStartColorVar(lua_State *L) { olua_startinvoke(L); @@ -47190,7 +49850,7 @@ static int _cocos2d_ParticleSystem_getStartColorVar(lua_State *L) return num_ret; } -static int _cocos2d_ParticleSystem_getStartRadius(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystem_getStartRadius(lua_State *L) { olua_startinvoke(L); @@ -47207,7 +49867,7 @@ static int _cocos2d_ParticleSystem_getStartRadius(lua_State *L) return num_ret; } -static int _cocos2d_ParticleSystem_getStartRadiusVar(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystem_getStartRadiusVar(lua_State *L) { olua_startinvoke(L); @@ -47224,7 +49884,7 @@ static int _cocos2d_ParticleSystem_getStartRadiusVar(lua_State *L) return num_ret; } -static int _cocos2d_ParticleSystem_getStartSize(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystem_getStartSize(lua_State *L) { olua_startinvoke(L); @@ -47241,7 +49901,7 @@ static int _cocos2d_ParticleSystem_getStartSize(lua_State *L) return num_ret; } -static int _cocos2d_ParticleSystem_getStartSizeVar(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystem_getStartSizeVar(lua_State *L) { olua_startinvoke(L); @@ -47258,7 +49918,7 @@ static int _cocos2d_ParticleSystem_getStartSizeVar(lua_State *L) return num_ret; } -static int _cocos2d_ParticleSystem_getStartSpin(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystem_getStartSpin(lua_State *L) { olua_startinvoke(L); @@ -47275,7 +49935,7 @@ static int _cocos2d_ParticleSystem_getStartSpin(lua_State *L) return num_ret; } -static int _cocos2d_ParticleSystem_getStartSpinVar(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystem_getStartSpinVar(lua_State *L) { olua_startinvoke(L); @@ -47292,7 +49952,7 @@ static int _cocos2d_ParticleSystem_getStartSpinVar(lua_State *L) return num_ret; } -static int _cocos2d_ParticleSystem_getTangentialAccel(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystem_getTangentialAccel(lua_State *L) { olua_startinvoke(L); @@ -47309,7 +49969,7 @@ static int _cocos2d_ParticleSystem_getTangentialAccel(lua_State *L) return num_ret; } -static int _cocos2d_ParticleSystem_getTangentialAccelVar(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystem_getTangentialAccelVar(lua_State *L) { olua_startinvoke(L); @@ -47326,7 +49986,7 @@ static int _cocos2d_ParticleSystem_getTangentialAccelVar(lua_State *L) return num_ret; } -static int _cocos2d_ParticleSystem_getTexture(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystem_getTexture(lua_State *L) { olua_startinvoke(L); @@ -47343,7 +50003,7 @@ static int _cocos2d_ParticleSystem_getTexture(lua_State *L) return num_ret; } -static int _cocos2d_ParticleSystem_getTotalParticles(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystem_getTotalParticles(lua_State *L) { olua_startinvoke(L); @@ -47360,7 +50020,7 @@ static int _cocos2d_ParticleSystem_getTotalParticles(lua_State *L) return num_ret; } -static int _cocos2d_ParticleSystem_initWithDictionary$1(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystem_initWithDictionary$1(lua_State *L) { olua_startinvoke(L); @@ -47368,7 +50028,7 @@ static int _cocos2d_ParticleSystem_initWithDictionary$1(lua_State *L) cocos2d::ValueMap *arg1 = nullptr; /** dictionary */ olua_to_object(L, 1, &self, "cc.ParticleSystem"); - olua_check_pointer(L, 2, &arg1, "cc.ValueMap"); + olua_check_valueptr(L, 2, &arg1, "cc.types.ValueMap"); // bool initWithDictionary(cocos2d::ValueMap &dictionary) bool ret = self->initWithDictionary(*arg1); @@ -47379,7 +50039,7 @@ static int _cocos2d_ParticleSystem_initWithDictionary$1(lua_State *L) return num_ret; } -static int _cocos2d_ParticleSystem_initWithDictionary$2(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystem_initWithDictionary$2(lua_State *L) { olua_startinvoke(L); @@ -47388,7 +50048,7 @@ static int _cocos2d_ParticleSystem_initWithDictionary$2(lua_State *L) std::string arg2; /** dirname */ olua_to_object(L, 1, &self, "cc.ParticleSystem"); - olua_check_pointer(L, 2, &arg1, "cc.ValueMap"); + olua_check_valueptr(L, 2, &arg1, "cc.types.ValueMap"); olua_check_string(L, 3, &arg2); // bool initWithDictionary(cocos2d::ValueMap &dictionary, const std::string &dirname) @@ -47400,21 +50060,21 @@ static int _cocos2d_ParticleSystem_initWithDictionary$2(lua_State *L) return num_ret; } -static int _cocos2d_ParticleSystem_initWithDictionary(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystem_initWithDictionary(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { - // if ((olua_is_pointer(L, 2, "cc.ValueMap"))) { + // if ((olua_is_valueptr(L, 2, "cc.types.ValueMap"))) { // bool initWithDictionary(cocos2d::ValueMap &dictionary) - return _cocos2d_ParticleSystem_initWithDictionary$1(L); + return _olua_fun_cocos2d_ParticleSystem_initWithDictionary$1(L); // } } if (num_args == 2) { - // if ((olua_is_pointer(L, 2, "cc.ValueMap")) && (olua_is_string(L, 3))) { + // if ((olua_is_valueptr(L, 2, "cc.types.ValueMap")) && (olua_is_string(L, 3))) { // bool initWithDictionary(cocos2d::ValueMap &dictionary, const std::string &dirname) - return _cocos2d_ParticleSystem_initWithDictionary$2(L); + return _olua_fun_cocos2d_ParticleSystem_initWithDictionary$2(L); // } } @@ -47423,7 +50083,7 @@ static int _cocos2d_ParticleSystem_initWithDictionary(lua_State *L) return 0; } -static int _cocos2d_ParticleSystem_initWithFile(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystem_initWithFile(lua_State *L) { olua_startinvoke(L); @@ -47442,7 +50102,7 @@ static int _cocos2d_ParticleSystem_initWithFile(lua_State *L) return num_ret; } -static int _cocos2d_ParticleSystem_initWithTotalParticles(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystem_initWithTotalParticles(lua_State *L) { olua_startinvoke(L); @@ -47461,7 +50121,7 @@ static int _cocos2d_ParticleSystem_initWithTotalParticles(lua_State *L) return num_ret; } -static int _cocos2d_ParticleSystem_isActive(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystem_isActive(lua_State *L) { olua_startinvoke(L); @@ -47478,7 +50138,7 @@ static int _cocos2d_ParticleSystem_isActive(lua_State *L) return num_ret; } -static int _cocos2d_ParticleSystem_isAutoRemoveOnFinish(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystem_isAutoRemoveOnFinish(lua_State *L) { olua_startinvoke(L); @@ -47495,7 +50155,7 @@ static int _cocos2d_ParticleSystem_isAutoRemoveOnFinish(lua_State *L) return num_ret; } -static int _cocos2d_ParticleSystem_isBlendAdditive(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystem_isBlendAdditive(lua_State *L) { olua_startinvoke(L); @@ -47512,7 +50172,7 @@ static int _cocos2d_ParticleSystem_isBlendAdditive(lua_State *L) return num_ret; } -static int _cocos2d_ParticleSystem_isFull(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystem_isFull(lua_State *L) { olua_startinvoke(L); @@ -47529,7 +50189,7 @@ static int _cocos2d_ParticleSystem_isFull(lua_State *L) return num_ret; } -static int _cocos2d_ParticleSystem_isPaused(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystem_isPaused(lua_State *L) { olua_startinvoke(L); @@ -47546,7 +50206,7 @@ static int _cocos2d_ParticleSystem_isPaused(lua_State *L) return num_ret; } -static int _cocos2d_ParticleSystem_isSourcePositionCompatible(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystem_isSourcePositionCompatible(lua_State *L) { olua_startinvoke(L); @@ -47563,11 +50223,11 @@ static int _cocos2d_ParticleSystem_isSourcePositionCompatible(lua_State *L) return num_ret; } -static int _cocos2d_ParticleSystem_new(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystem_new(lua_State *L) { olua_startinvoke(L); - // ParticleSystem() + // cocos2d::ParticleSystem() cocos2d::ParticleSystem *ret = new cocos2d::ParticleSystem(); int num_ret = olua_push_object(L, ret, "cc.ParticleSystem"); olua_postnew(L, ret); @@ -47577,7 +50237,7 @@ static int _cocos2d_ParticleSystem_new(lua_State *L) return num_ret; } -static int _cocos2d_ParticleSystem_pauseEmissions(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystem_pauseEmissions(lua_State *L) { olua_startinvoke(L); @@ -47593,7 +50253,7 @@ static int _cocos2d_ParticleSystem_pauseEmissions(lua_State *L) return 0; } -static int _cocos2d_ParticleSystem_postStep(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystem_postStep(lua_State *L) { olua_startinvoke(L); @@ -47609,7 +50269,7 @@ static int _cocos2d_ParticleSystem_postStep(lua_State *L) return 0; } -static int _cocos2d_ParticleSystem_resetSystem(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystem_resetSystem(lua_State *L) { olua_startinvoke(L); @@ -47625,7 +50285,7 @@ static int _cocos2d_ParticleSystem_resetSystem(lua_State *L) return 0; } -static int _cocos2d_ParticleSystem_resumeEmissions(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystem_resumeEmissions(lua_State *L) { olua_startinvoke(L); @@ -47641,7 +50301,7 @@ static int _cocos2d_ParticleSystem_resumeEmissions(lua_State *L) return 0; } -static int _cocos2d_ParticleSystem_setAngle(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystem_setAngle(lua_State *L) { olua_startinvoke(L); @@ -47659,7 +50319,7 @@ static int _cocos2d_ParticleSystem_setAngle(lua_State *L) return 0; } -static int _cocos2d_ParticleSystem_setAngleVar(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystem_setAngleVar(lua_State *L) { olua_startinvoke(L); @@ -47677,7 +50337,7 @@ static int _cocos2d_ParticleSystem_setAngleVar(lua_State *L) return 0; } -static int _cocos2d_ParticleSystem_setAtlasIndex(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystem_setAtlasIndex(lua_State *L) { olua_startinvoke(L); @@ -47695,7 +50355,7 @@ static int _cocos2d_ParticleSystem_setAtlasIndex(lua_State *L) return 0; } -static int _cocos2d_ParticleSystem_setAutoRemoveOnFinish(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystem_setAutoRemoveOnFinish(lua_State *L) { olua_startinvoke(L); @@ -47713,7 +50373,7 @@ static int _cocos2d_ParticleSystem_setAutoRemoveOnFinish(lua_State *L) return 0; } -static int _cocos2d_ParticleSystem_setBatchNode(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystem_setBatchNode(lua_State *L) { olua_startinvoke(L); @@ -47731,7 +50391,7 @@ static int _cocos2d_ParticleSystem_setBatchNode(lua_State *L) return 0; } -static int _cocos2d_ParticleSystem_setBlendAdditive(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystem_setBlendAdditive(lua_State *L) { olua_startinvoke(L); @@ -47749,25 +50409,25 @@ static int _cocos2d_ParticleSystem_setBlendAdditive(lua_State *L) return 0; } -static int _cocos2d_ParticleSystem_setBlendFunc(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystem_setBlendFunc(lua_State *L) { olua_startinvoke(L); cocos2d::ParticleSystem *self = nullptr; - cocos2d::BlendFunc arg1; /** blendFunc */ + cocos2d::BlendFunc *arg1; /** blendFunc */ olua_to_object(L, 1, &self, "cc.ParticleSystem"); olua_check_object(L, 2, &arg1, "cc.BlendFunc"); // void setBlendFunc(const cocos2d::BlendFunc &blendFunc) - self->setBlendFunc(arg1); + self->setBlendFunc(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_ParticleSystem_setDuration(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystem_setDuration(lua_State *L) { olua_startinvoke(L); @@ -47785,7 +50445,7 @@ static int _cocos2d_ParticleSystem_setDuration(lua_State *L) return 0; } -static int _cocos2d_ParticleSystem_setEmissionRate(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystem_setEmissionRate(lua_State *L) { olua_startinvoke(L); @@ -47803,7 +50463,7 @@ static int _cocos2d_ParticleSystem_setEmissionRate(lua_State *L) return 0; } -static int _cocos2d_ParticleSystem_setEmitterMode(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystem_setEmitterMode(lua_State *L) { olua_startinvoke(L); @@ -47821,7 +50481,7 @@ static int _cocos2d_ParticleSystem_setEmitterMode(lua_State *L) return 0; } -static int _cocos2d_ParticleSystem_setEndColor(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystem_setEndColor(lua_State *L) { olua_startinvoke(L); @@ -47839,7 +50499,7 @@ static int _cocos2d_ParticleSystem_setEndColor(lua_State *L) return 0; } -static int _cocos2d_ParticleSystem_setEndColorVar(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystem_setEndColorVar(lua_State *L) { olua_startinvoke(L); @@ -47857,7 +50517,7 @@ static int _cocos2d_ParticleSystem_setEndColorVar(lua_State *L) return 0; } -static int _cocos2d_ParticleSystem_setEndRadius(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystem_setEndRadius(lua_State *L) { olua_startinvoke(L); @@ -47875,7 +50535,7 @@ static int _cocos2d_ParticleSystem_setEndRadius(lua_State *L) return 0; } -static int _cocos2d_ParticleSystem_setEndRadiusVar(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystem_setEndRadiusVar(lua_State *L) { olua_startinvoke(L); @@ -47893,7 +50553,7 @@ static int _cocos2d_ParticleSystem_setEndRadiusVar(lua_State *L) return 0; } -static int _cocos2d_ParticleSystem_setEndSize(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystem_setEndSize(lua_State *L) { olua_startinvoke(L); @@ -47911,7 +50571,7 @@ static int _cocos2d_ParticleSystem_setEndSize(lua_State *L) return 0; } -static int _cocos2d_ParticleSystem_setEndSizeVar(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystem_setEndSizeVar(lua_State *L) { olua_startinvoke(L); @@ -47929,7 +50589,7 @@ static int _cocos2d_ParticleSystem_setEndSizeVar(lua_State *L) return 0; } -static int _cocos2d_ParticleSystem_setEndSpin(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystem_setEndSpin(lua_State *L) { olua_startinvoke(L); @@ -47947,7 +50607,7 @@ static int _cocos2d_ParticleSystem_setEndSpin(lua_State *L) return 0; } -static int _cocos2d_ParticleSystem_setEndSpinVar(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystem_setEndSpinVar(lua_State *L) { olua_startinvoke(L); @@ -47965,25 +50625,25 @@ static int _cocos2d_ParticleSystem_setEndSpinVar(lua_State *L) return 0; } -static int _cocos2d_ParticleSystem_setGravity(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystem_setGravity(lua_State *L) { olua_startinvoke(L); cocos2d::ParticleSystem *self = nullptr; - cocos2d::Vec2 arg1; /** g */ + cocos2d::Vec2 *arg1; /** g */ olua_to_object(L, 1, &self, "cc.ParticleSystem"); olua_check_object(L, 2, &arg1, "cc.Vec2"); // void setGravity(const cocos2d::Vec2 &g) - self->setGravity(arg1); + self->setGravity(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_ParticleSystem_setLife(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystem_setLife(lua_State *L) { olua_startinvoke(L); @@ -48001,7 +50661,7 @@ static int _cocos2d_ParticleSystem_setLife(lua_State *L) return 0; } -static int _cocos2d_ParticleSystem_setLifeVar(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystem_setLifeVar(lua_State *L) { olua_startinvoke(L); @@ -48019,25 +50679,25 @@ static int _cocos2d_ParticleSystem_setLifeVar(lua_State *L) return 0; } -static int _cocos2d_ParticleSystem_setPosVar(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystem_setPosVar(lua_State *L) { olua_startinvoke(L); cocos2d::ParticleSystem *self = nullptr; - cocos2d::Vec2 arg1; /** pos */ + cocos2d::Vec2 *arg1; /** pos */ olua_to_object(L, 1, &self, "cc.ParticleSystem"); olua_check_object(L, 2, &arg1, "cc.Vec2"); // void setPosVar(const cocos2d::Vec2 &pos) - self->setPosVar(arg1); + self->setPosVar(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_ParticleSystem_setPositionType(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystem_setPositionType(lua_State *L) { olua_startinvoke(L); @@ -48055,7 +50715,7 @@ static int _cocos2d_ParticleSystem_setPositionType(lua_State *L) return 0; } -static int _cocos2d_ParticleSystem_setRadialAccel(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystem_setRadialAccel(lua_State *L) { olua_startinvoke(L); @@ -48073,7 +50733,7 @@ static int _cocos2d_ParticleSystem_setRadialAccel(lua_State *L) return 0; } -static int _cocos2d_ParticleSystem_setRadialAccelVar(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystem_setRadialAccelVar(lua_State *L) { olua_startinvoke(L); @@ -48091,7 +50751,7 @@ static int _cocos2d_ParticleSystem_setRadialAccelVar(lua_State *L) return 0; } -static int _cocos2d_ParticleSystem_setRotatePerSecond(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystem_setRotatePerSecond(lua_State *L) { olua_startinvoke(L); @@ -48109,7 +50769,7 @@ static int _cocos2d_ParticleSystem_setRotatePerSecond(lua_State *L) return 0; } -static int _cocos2d_ParticleSystem_setRotatePerSecondVar(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystem_setRotatePerSecondVar(lua_State *L) { olua_startinvoke(L); @@ -48127,7 +50787,7 @@ static int _cocos2d_ParticleSystem_setRotatePerSecondVar(lua_State *L) return 0; } -static int _cocos2d_ParticleSystem_setRotationIsDir(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystem_setRotationIsDir(lua_State *L) { olua_startinvoke(L); @@ -48145,25 +50805,25 @@ static int _cocos2d_ParticleSystem_setRotationIsDir(lua_State *L) return 0; } -static int _cocos2d_ParticleSystem_setSourcePosition(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystem_setSourcePosition(lua_State *L) { olua_startinvoke(L); cocos2d::ParticleSystem *self = nullptr; - cocos2d::Vec2 arg1; /** pos */ + cocos2d::Vec2 *arg1; /** pos */ olua_to_object(L, 1, &self, "cc.ParticleSystem"); olua_check_object(L, 2, &arg1, "cc.Vec2"); // void setSourcePosition(const cocos2d::Vec2 &pos) - self->setSourcePosition(arg1); + self->setSourcePosition(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_ParticleSystem_setSourcePositionCompatible(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystem_setSourcePositionCompatible(lua_State *L) { olua_startinvoke(L); @@ -48181,7 +50841,7 @@ static int _cocos2d_ParticleSystem_setSourcePositionCompatible(lua_State *L) return 0; } -static int _cocos2d_ParticleSystem_setSpeed(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystem_setSpeed(lua_State *L) { olua_startinvoke(L); @@ -48199,7 +50859,7 @@ static int _cocos2d_ParticleSystem_setSpeed(lua_State *L) return 0; } -static int _cocos2d_ParticleSystem_setSpeedVar(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystem_setSpeedVar(lua_State *L) { olua_startinvoke(L); @@ -48217,7 +50877,7 @@ static int _cocos2d_ParticleSystem_setSpeedVar(lua_State *L) return 0; } -static int _cocos2d_ParticleSystem_setStartColor(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystem_setStartColor(lua_State *L) { olua_startinvoke(L); @@ -48235,7 +50895,7 @@ static int _cocos2d_ParticleSystem_setStartColor(lua_State *L) return 0; } -static int _cocos2d_ParticleSystem_setStartColorVar(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystem_setStartColorVar(lua_State *L) { olua_startinvoke(L); @@ -48253,7 +50913,7 @@ static int _cocos2d_ParticleSystem_setStartColorVar(lua_State *L) return 0; } -static int _cocos2d_ParticleSystem_setStartRadius(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystem_setStartRadius(lua_State *L) { olua_startinvoke(L); @@ -48271,7 +50931,7 @@ static int _cocos2d_ParticleSystem_setStartRadius(lua_State *L) return 0; } -static int _cocos2d_ParticleSystem_setStartRadiusVar(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystem_setStartRadiusVar(lua_State *L) { olua_startinvoke(L); @@ -48289,7 +50949,7 @@ static int _cocos2d_ParticleSystem_setStartRadiusVar(lua_State *L) return 0; } -static int _cocos2d_ParticleSystem_setStartSize(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystem_setStartSize(lua_State *L) { olua_startinvoke(L); @@ -48307,7 +50967,7 @@ static int _cocos2d_ParticleSystem_setStartSize(lua_State *L) return 0; } -static int _cocos2d_ParticleSystem_setStartSizeVar(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystem_setStartSizeVar(lua_State *L) { olua_startinvoke(L); @@ -48325,7 +50985,7 @@ static int _cocos2d_ParticleSystem_setStartSizeVar(lua_State *L) return 0; } -static int _cocos2d_ParticleSystem_setStartSpin(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystem_setStartSpin(lua_State *L) { olua_startinvoke(L); @@ -48343,7 +51003,7 @@ static int _cocos2d_ParticleSystem_setStartSpin(lua_State *L) return 0; } -static int _cocos2d_ParticleSystem_setStartSpinVar(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystem_setStartSpinVar(lua_State *L) { olua_startinvoke(L); @@ -48361,7 +51021,7 @@ static int _cocos2d_ParticleSystem_setStartSpinVar(lua_State *L) return 0; } -static int _cocos2d_ParticleSystem_setTangentialAccel(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystem_setTangentialAccel(lua_State *L) { olua_startinvoke(L); @@ -48379,7 +51039,7 @@ static int _cocos2d_ParticleSystem_setTangentialAccel(lua_State *L) return 0; } -static int _cocos2d_ParticleSystem_setTangentialAccelVar(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystem_setTangentialAccelVar(lua_State *L) { olua_startinvoke(L); @@ -48397,7 +51057,7 @@ static int _cocos2d_ParticleSystem_setTangentialAccelVar(lua_State *L) return 0; } -static int _cocos2d_ParticleSystem_setTexture(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystem_setTexture(lua_State *L) { olua_startinvoke(L); @@ -48415,7 +51075,7 @@ static int _cocos2d_ParticleSystem_setTexture(lua_State *L) return 0; } -static int _cocos2d_ParticleSystem_setTotalParticles(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystem_setTotalParticles(lua_State *L) { olua_startinvoke(L); @@ -48433,7 +51093,7 @@ static int _cocos2d_ParticleSystem_setTotalParticles(lua_State *L) return 0; } -static int _cocos2d_ParticleSystem_start(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystem_start(lua_State *L) { olua_startinvoke(L); @@ -48449,7 +51109,7 @@ static int _cocos2d_ParticleSystem_start(lua_State *L) return 0; } -static int _cocos2d_ParticleSystem_stop(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystem_stop(lua_State *L) { olua_startinvoke(L); @@ -48465,7 +51125,7 @@ static int _cocos2d_ParticleSystem_stop(lua_State *L) return 0; } -static int _cocos2d_ParticleSystem_stopSystem(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystem_stopSystem(lua_State *L) { olua_startinvoke(L); @@ -48481,7 +51141,7 @@ static int _cocos2d_ParticleSystem_stopSystem(lua_State *L) return 0; } -static int _cocos2d_ParticleSystem_updateParticleQuads(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystem_updateParticleQuads(lua_State *L) { olua_startinvoke(L); @@ -48497,7 +51157,7 @@ static int _cocos2d_ParticleSystem_updateParticleQuads(lua_State *L) return 0; } -static int _cocos2d_ParticleSystem_updateWithNoTime(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystem_updateWithNoTime(lua_State *L) { olua_startinvoke(L); @@ -48513,177 +51173,186 @@ static int _cocos2d_ParticleSystem_updateWithNoTime(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ParticleSystem(lua_State *L) +static int _olua_cls_cc_ParticleSystem(lua_State *L) { oluacls_class(L, "cc.ParticleSystem"); - oluacls_func(L, "addParticles", _cocos2d_ParticleSystem_addParticles); - oluacls_func(L, "as", _cocos2d_ParticleSystem_as); - oluacls_func(L, "create", _cocos2d_ParticleSystem_create); - oluacls_func(L, "createWithTotalParticles", _cocos2d_ParticleSystem_createWithTotalParticles); - oluacls_func(L, "getAllParticleSystems", _cocos2d_ParticleSystem_getAllParticleSystems); - oluacls_func(L, "getAngle", _cocos2d_ParticleSystem_getAngle); - oluacls_func(L, "getAngleVar", _cocos2d_ParticleSystem_getAngleVar); - oluacls_func(L, "getAtlasIndex", _cocos2d_ParticleSystem_getAtlasIndex); - oluacls_func(L, "getBatchNode", _cocos2d_ParticleSystem_getBatchNode); - oluacls_func(L, "getBlendFunc", _cocos2d_ParticleSystem_getBlendFunc); - oluacls_func(L, "getDuration", _cocos2d_ParticleSystem_getDuration); - oluacls_func(L, "getEmissionRate", _cocos2d_ParticleSystem_getEmissionRate); - oluacls_func(L, "getEmitterMode", _cocos2d_ParticleSystem_getEmitterMode); - oluacls_func(L, "getEndColor", _cocos2d_ParticleSystem_getEndColor); - oluacls_func(L, "getEndColorVar", _cocos2d_ParticleSystem_getEndColorVar); - oluacls_func(L, "getEndRadius", _cocos2d_ParticleSystem_getEndRadius); - oluacls_func(L, "getEndRadiusVar", _cocos2d_ParticleSystem_getEndRadiusVar); - oluacls_func(L, "getEndSize", _cocos2d_ParticleSystem_getEndSize); - oluacls_func(L, "getEndSizeVar", _cocos2d_ParticleSystem_getEndSizeVar); - oluacls_func(L, "getEndSpin", _cocos2d_ParticleSystem_getEndSpin); - oluacls_func(L, "getEndSpinVar", _cocos2d_ParticleSystem_getEndSpinVar); - oluacls_func(L, "getGravity", _cocos2d_ParticleSystem_getGravity); - oluacls_func(L, "getLife", _cocos2d_ParticleSystem_getLife); - oluacls_func(L, "getLifeVar", _cocos2d_ParticleSystem_getLifeVar); - oluacls_func(L, "getParticleCount", _cocos2d_ParticleSystem_getParticleCount); - oluacls_func(L, "getPosVar", _cocos2d_ParticleSystem_getPosVar); - oluacls_func(L, "getPositionType", _cocos2d_ParticleSystem_getPositionType); - oluacls_func(L, "getRadialAccel", _cocos2d_ParticleSystem_getRadialAccel); - oluacls_func(L, "getRadialAccelVar", _cocos2d_ParticleSystem_getRadialAccelVar); - oluacls_func(L, "getResourceFile", _cocos2d_ParticleSystem_getResourceFile); - oluacls_func(L, "getRotatePerSecond", _cocos2d_ParticleSystem_getRotatePerSecond); - oluacls_func(L, "getRotatePerSecondVar", _cocos2d_ParticleSystem_getRotatePerSecondVar); - oluacls_func(L, "getRotationIsDir", _cocos2d_ParticleSystem_getRotationIsDir); - oluacls_func(L, "getSourcePosition", _cocos2d_ParticleSystem_getSourcePosition); - oluacls_func(L, "getSpeed", _cocos2d_ParticleSystem_getSpeed); - oluacls_func(L, "getSpeedVar", _cocos2d_ParticleSystem_getSpeedVar); - oluacls_func(L, "getStartColor", _cocos2d_ParticleSystem_getStartColor); - oluacls_func(L, "getStartColorVar", _cocos2d_ParticleSystem_getStartColorVar); - oluacls_func(L, "getStartRadius", _cocos2d_ParticleSystem_getStartRadius); - oluacls_func(L, "getStartRadiusVar", _cocos2d_ParticleSystem_getStartRadiusVar); - oluacls_func(L, "getStartSize", _cocos2d_ParticleSystem_getStartSize); - oluacls_func(L, "getStartSizeVar", _cocos2d_ParticleSystem_getStartSizeVar); - oluacls_func(L, "getStartSpin", _cocos2d_ParticleSystem_getStartSpin); - oluacls_func(L, "getStartSpinVar", _cocos2d_ParticleSystem_getStartSpinVar); - oluacls_func(L, "getTangentialAccel", _cocos2d_ParticleSystem_getTangentialAccel); - oluacls_func(L, "getTangentialAccelVar", _cocos2d_ParticleSystem_getTangentialAccelVar); - oluacls_func(L, "getTexture", _cocos2d_ParticleSystem_getTexture); - oluacls_func(L, "getTotalParticles", _cocos2d_ParticleSystem_getTotalParticles); - oluacls_func(L, "initWithDictionary", _cocos2d_ParticleSystem_initWithDictionary); - oluacls_func(L, "initWithFile", _cocos2d_ParticleSystem_initWithFile); - oluacls_func(L, "initWithTotalParticles", _cocos2d_ParticleSystem_initWithTotalParticles); - oluacls_func(L, "isActive", _cocos2d_ParticleSystem_isActive); - oluacls_func(L, "isAutoRemoveOnFinish", _cocos2d_ParticleSystem_isAutoRemoveOnFinish); - oluacls_func(L, "isBlendAdditive", _cocos2d_ParticleSystem_isBlendAdditive); - oluacls_func(L, "isFull", _cocos2d_ParticleSystem_isFull); - oluacls_func(L, "isPaused", _cocos2d_ParticleSystem_isPaused); - oluacls_func(L, "isSourcePositionCompatible", _cocos2d_ParticleSystem_isSourcePositionCompatible); - oluacls_func(L, "new", _cocos2d_ParticleSystem_new); - oluacls_func(L, "pauseEmissions", _cocos2d_ParticleSystem_pauseEmissions); - oluacls_func(L, "postStep", _cocos2d_ParticleSystem_postStep); - oluacls_func(L, "resetSystem", _cocos2d_ParticleSystem_resetSystem); - oluacls_func(L, "resumeEmissions", _cocos2d_ParticleSystem_resumeEmissions); - oluacls_func(L, "setAngle", _cocos2d_ParticleSystem_setAngle); - oluacls_func(L, "setAngleVar", _cocos2d_ParticleSystem_setAngleVar); - oluacls_func(L, "setAtlasIndex", _cocos2d_ParticleSystem_setAtlasIndex); - oluacls_func(L, "setAutoRemoveOnFinish", _cocos2d_ParticleSystem_setAutoRemoveOnFinish); - oluacls_func(L, "setBatchNode", _cocos2d_ParticleSystem_setBatchNode); - oluacls_func(L, "setBlendAdditive", _cocos2d_ParticleSystem_setBlendAdditive); - oluacls_func(L, "setBlendFunc", _cocos2d_ParticleSystem_setBlendFunc); - oluacls_func(L, "setDuration", _cocos2d_ParticleSystem_setDuration); - oluacls_func(L, "setEmissionRate", _cocos2d_ParticleSystem_setEmissionRate); - oluacls_func(L, "setEmitterMode", _cocos2d_ParticleSystem_setEmitterMode); - oluacls_func(L, "setEndColor", _cocos2d_ParticleSystem_setEndColor); - oluacls_func(L, "setEndColorVar", _cocos2d_ParticleSystem_setEndColorVar); - oluacls_func(L, "setEndRadius", _cocos2d_ParticleSystem_setEndRadius); - oluacls_func(L, "setEndRadiusVar", _cocos2d_ParticleSystem_setEndRadiusVar); - oluacls_func(L, "setEndSize", _cocos2d_ParticleSystem_setEndSize); - oluacls_func(L, "setEndSizeVar", _cocos2d_ParticleSystem_setEndSizeVar); - oluacls_func(L, "setEndSpin", _cocos2d_ParticleSystem_setEndSpin); - oluacls_func(L, "setEndSpinVar", _cocos2d_ParticleSystem_setEndSpinVar); - oluacls_func(L, "setGravity", _cocos2d_ParticleSystem_setGravity); - oluacls_func(L, "setLife", _cocos2d_ParticleSystem_setLife); - oluacls_func(L, "setLifeVar", _cocos2d_ParticleSystem_setLifeVar); - oluacls_func(L, "setPosVar", _cocos2d_ParticleSystem_setPosVar); - oluacls_func(L, "setPositionType", _cocos2d_ParticleSystem_setPositionType); - oluacls_func(L, "setRadialAccel", _cocos2d_ParticleSystem_setRadialAccel); - oluacls_func(L, "setRadialAccelVar", _cocos2d_ParticleSystem_setRadialAccelVar); - oluacls_func(L, "setRotatePerSecond", _cocos2d_ParticleSystem_setRotatePerSecond); - oluacls_func(L, "setRotatePerSecondVar", _cocos2d_ParticleSystem_setRotatePerSecondVar); - oluacls_func(L, "setRotationIsDir", _cocos2d_ParticleSystem_setRotationIsDir); - oluacls_func(L, "setSourcePosition", _cocos2d_ParticleSystem_setSourcePosition); - oluacls_func(L, "setSourcePositionCompatible", _cocos2d_ParticleSystem_setSourcePositionCompatible); - oluacls_func(L, "setSpeed", _cocos2d_ParticleSystem_setSpeed); - oluacls_func(L, "setSpeedVar", _cocos2d_ParticleSystem_setSpeedVar); - oluacls_func(L, "setStartColor", _cocos2d_ParticleSystem_setStartColor); - oluacls_func(L, "setStartColorVar", _cocos2d_ParticleSystem_setStartColorVar); - oluacls_func(L, "setStartRadius", _cocos2d_ParticleSystem_setStartRadius); - oluacls_func(L, "setStartRadiusVar", _cocos2d_ParticleSystem_setStartRadiusVar); - oluacls_func(L, "setStartSize", _cocos2d_ParticleSystem_setStartSize); - oluacls_func(L, "setStartSizeVar", _cocos2d_ParticleSystem_setStartSizeVar); - oluacls_func(L, "setStartSpin", _cocos2d_ParticleSystem_setStartSpin); - oluacls_func(L, "setStartSpinVar", _cocos2d_ParticleSystem_setStartSpinVar); - oluacls_func(L, "setTangentialAccel", _cocos2d_ParticleSystem_setTangentialAccel); - oluacls_func(L, "setTangentialAccelVar", _cocos2d_ParticleSystem_setTangentialAccelVar); - oluacls_func(L, "setTexture", _cocos2d_ParticleSystem_setTexture); - oluacls_func(L, "setTotalParticles", _cocos2d_ParticleSystem_setTotalParticles); - oluacls_func(L, "start", _cocos2d_ParticleSystem_start); - oluacls_func(L, "stop", _cocos2d_ParticleSystem_stop); - oluacls_func(L, "stopSystem", _cocos2d_ParticleSystem_stopSystem); - oluacls_func(L, "updateParticleQuads", _cocos2d_ParticleSystem_updateParticleQuads); - oluacls_func(L, "updateWithNoTime", _cocos2d_ParticleSystem_updateWithNoTime); - oluacls_prop(L, "active", _cocos2d_ParticleSystem_isActive, nullptr); - oluacls_prop(L, "allParticleSystems", _cocos2d_ParticleSystem_getAllParticleSystems, nullptr); - oluacls_prop(L, "angle", _cocos2d_ParticleSystem_getAngle, _cocos2d_ParticleSystem_setAngle); - oluacls_prop(L, "angleVar", _cocos2d_ParticleSystem_getAngleVar, _cocos2d_ParticleSystem_setAngleVar); - oluacls_prop(L, "atlasIndex", _cocos2d_ParticleSystem_getAtlasIndex, _cocos2d_ParticleSystem_setAtlasIndex); - oluacls_prop(L, "autoRemoveOnFinish", _cocos2d_ParticleSystem_isAutoRemoveOnFinish, _cocos2d_ParticleSystem_setAutoRemoveOnFinish); - oluacls_prop(L, "batchNode", _cocos2d_ParticleSystem_getBatchNode, _cocos2d_ParticleSystem_setBatchNode); - oluacls_prop(L, "blendAdditive", _cocos2d_ParticleSystem_isBlendAdditive, _cocos2d_ParticleSystem_setBlendAdditive); - oluacls_prop(L, "blendFunc", _cocos2d_ParticleSystem_getBlendFunc, _cocos2d_ParticleSystem_setBlendFunc); - oluacls_prop(L, "duration", _cocos2d_ParticleSystem_getDuration, _cocos2d_ParticleSystem_setDuration); - oluacls_prop(L, "emissionRate", _cocos2d_ParticleSystem_getEmissionRate, _cocos2d_ParticleSystem_setEmissionRate); - oluacls_prop(L, "emitterMode", _cocos2d_ParticleSystem_getEmitterMode, _cocos2d_ParticleSystem_setEmitterMode); - oluacls_prop(L, "endColor", _cocos2d_ParticleSystem_getEndColor, _cocos2d_ParticleSystem_setEndColor); - oluacls_prop(L, "endColorVar", _cocos2d_ParticleSystem_getEndColorVar, _cocos2d_ParticleSystem_setEndColorVar); - oluacls_prop(L, "endRadius", _cocos2d_ParticleSystem_getEndRadius, _cocos2d_ParticleSystem_setEndRadius); - oluacls_prop(L, "endRadiusVar", _cocos2d_ParticleSystem_getEndRadiusVar, _cocos2d_ParticleSystem_setEndRadiusVar); - oluacls_prop(L, "endSize", _cocos2d_ParticleSystem_getEndSize, _cocos2d_ParticleSystem_setEndSize); - oluacls_prop(L, "endSizeVar", _cocos2d_ParticleSystem_getEndSizeVar, _cocos2d_ParticleSystem_setEndSizeVar); - oluacls_prop(L, "endSpin", _cocos2d_ParticleSystem_getEndSpin, _cocos2d_ParticleSystem_setEndSpin); - oluacls_prop(L, "endSpinVar", _cocos2d_ParticleSystem_getEndSpinVar, _cocos2d_ParticleSystem_setEndSpinVar); - oluacls_prop(L, "full", _cocos2d_ParticleSystem_isFull, nullptr); - oluacls_prop(L, "gravity", _cocos2d_ParticleSystem_getGravity, _cocos2d_ParticleSystem_setGravity); - oluacls_prop(L, "life", _cocos2d_ParticleSystem_getLife, _cocos2d_ParticleSystem_setLife); - oluacls_prop(L, "lifeVar", _cocos2d_ParticleSystem_getLifeVar, _cocos2d_ParticleSystem_setLifeVar); - oluacls_prop(L, "particleCount", _cocos2d_ParticleSystem_getParticleCount, nullptr); - oluacls_prop(L, "paused", _cocos2d_ParticleSystem_isPaused, nullptr); - oluacls_prop(L, "posVar", _cocos2d_ParticleSystem_getPosVar, _cocos2d_ParticleSystem_setPosVar); - oluacls_prop(L, "positionType", _cocos2d_ParticleSystem_getPositionType, _cocos2d_ParticleSystem_setPositionType); - oluacls_prop(L, "radialAccel", _cocos2d_ParticleSystem_getRadialAccel, _cocos2d_ParticleSystem_setRadialAccel); - oluacls_prop(L, "radialAccelVar", _cocos2d_ParticleSystem_getRadialAccelVar, _cocos2d_ParticleSystem_setRadialAccelVar); - oluacls_prop(L, "resourceFile", _cocos2d_ParticleSystem_getResourceFile, nullptr); - oluacls_prop(L, "rotatePerSecond", _cocos2d_ParticleSystem_getRotatePerSecond, _cocos2d_ParticleSystem_setRotatePerSecond); - oluacls_prop(L, "rotatePerSecondVar", _cocos2d_ParticleSystem_getRotatePerSecondVar, _cocos2d_ParticleSystem_setRotatePerSecondVar); - oluacls_prop(L, "rotationIsDir", _cocos2d_ParticleSystem_getRotationIsDir, _cocos2d_ParticleSystem_setRotationIsDir); - oluacls_prop(L, "sourcePosition", _cocos2d_ParticleSystem_getSourcePosition, _cocos2d_ParticleSystem_setSourcePosition); - oluacls_prop(L, "sourcePositionCompatible", _cocos2d_ParticleSystem_isSourcePositionCompatible, _cocos2d_ParticleSystem_setSourcePositionCompatible); - oluacls_prop(L, "speed", _cocos2d_ParticleSystem_getSpeed, _cocos2d_ParticleSystem_setSpeed); - oluacls_prop(L, "speedVar", _cocos2d_ParticleSystem_getSpeedVar, _cocos2d_ParticleSystem_setSpeedVar); - oluacls_prop(L, "startColor", _cocos2d_ParticleSystem_getStartColor, _cocos2d_ParticleSystem_setStartColor); - oluacls_prop(L, "startColorVar", _cocos2d_ParticleSystem_getStartColorVar, _cocos2d_ParticleSystem_setStartColorVar); - oluacls_prop(L, "startRadius", _cocos2d_ParticleSystem_getStartRadius, _cocos2d_ParticleSystem_setStartRadius); - oluacls_prop(L, "startRadiusVar", _cocos2d_ParticleSystem_getStartRadiusVar, _cocos2d_ParticleSystem_setStartRadiusVar); - oluacls_prop(L, "startSize", _cocos2d_ParticleSystem_getStartSize, _cocos2d_ParticleSystem_setStartSize); - oluacls_prop(L, "startSizeVar", _cocos2d_ParticleSystem_getStartSizeVar, _cocos2d_ParticleSystem_setStartSizeVar); - oluacls_prop(L, "startSpin", _cocos2d_ParticleSystem_getStartSpin, _cocos2d_ParticleSystem_setStartSpin); - oluacls_prop(L, "startSpinVar", _cocos2d_ParticleSystem_getStartSpinVar, _cocos2d_ParticleSystem_setStartSpinVar); - oluacls_prop(L, "tangentialAccel", _cocos2d_ParticleSystem_getTangentialAccel, _cocos2d_ParticleSystem_setTangentialAccel); - oluacls_prop(L, "tangentialAccelVar", _cocos2d_ParticleSystem_getTangentialAccelVar, _cocos2d_ParticleSystem_setTangentialAccelVar); - oluacls_prop(L, "texture", _cocos2d_ParticleSystem_getTexture, _cocos2d_ParticleSystem_setTexture); - oluacls_prop(L, "totalParticles", _cocos2d_ParticleSystem_getTotalParticles, _cocos2d_ParticleSystem_setTotalParticles); + oluacls_func(L, "addParticles", _olua_fun_cocos2d_ParticleSystem_addParticles); + oluacls_func(L, "as", _olua_fun_cocos2d_ParticleSystem_as); + oluacls_func(L, "create", _olua_fun_cocos2d_ParticleSystem_create); + oluacls_func(L, "createWithTotalParticles", _olua_fun_cocos2d_ParticleSystem_createWithTotalParticles); + oluacls_func(L, "getAllParticleSystems", _olua_fun_cocos2d_ParticleSystem_getAllParticleSystems); + oluacls_func(L, "getAngle", _olua_fun_cocos2d_ParticleSystem_getAngle); + oluacls_func(L, "getAngleVar", _olua_fun_cocos2d_ParticleSystem_getAngleVar); + oluacls_func(L, "getAtlasIndex", _olua_fun_cocos2d_ParticleSystem_getAtlasIndex); + oluacls_func(L, "getBatchNode", _olua_fun_cocos2d_ParticleSystem_getBatchNode); + oluacls_func(L, "getBlendFunc", _olua_fun_cocos2d_ParticleSystem_getBlendFunc); + oluacls_func(L, "getDuration", _olua_fun_cocos2d_ParticleSystem_getDuration); + oluacls_func(L, "getEmissionRate", _olua_fun_cocos2d_ParticleSystem_getEmissionRate); + oluacls_func(L, "getEmitterMode", _olua_fun_cocos2d_ParticleSystem_getEmitterMode); + oluacls_func(L, "getEndColor", _olua_fun_cocos2d_ParticleSystem_getEndColor); + oluacls_func(L, "getEndColorVar", _olua_fun_cocos2d_ParticleSystem_getEndColorVar); + oluacls_func(L, "getEndRadius", _olua_fun_cocos2d_ParticleSystem_getEndRadius); + oluacls_func(L, "getEndRadiusVar", _olua_fun_cocos2d_ParticleSystem_getEndRadiusVar); + oluacls_func(L, "getEndSize", _olua_fun_cocos2d_ParticleSystem_getEndSize); + oluacls_func(L, "getEndSizeVar", _olua_fun_cocos2d_ParticleSystem_getEndSizeVar); + oluacls_func(L, "getEndSpin", _olua_fun_cocos2d_ParticleSystem_getEndSpin); + oluacls_func(L, "getEndSpinVar", _olua_fun_cocos2d_ParticleSystem_getEndSpinVar); + oluacls_func(L, "getGravity", _olua_fun_cocos2d_ParticleSystem_getGravity); + oluacls_func(L, "getLife", _olua_fun_cocos2d_ParticleSystem_getLife); + oluacls_func(L, "getLifeVar", _olua_fun_cocos2d_ParticleSystem_getLifeVar); + oluacls_func(L, "getParticleCount", _olua_fun_cocos2d_ParticleSystem_getParticleCount); + oluacls_func(L, "getPosVar", _olua_fun_cocos2d_ParticleSystem_getPosVar); + oluacls_func(L, "getPositionType", _olua_fun_cocos2d_ParticleSystem_getPositionType); + oluacls_func(L, "getRadialAccel", _olua_fun_cocos2d_ParticleSystem_getRadialAccel); + oluacls_func(L, "getRadialAccelVar", _olua_fun_cocos2d_ParticleSystem_getRadialAccelVar); + oluacls_func(L, "getResourceFile", _olua_fun_cocos2d_ParticleSystem_getResourceFile); + oluacls_func(L, "getRotatePerSecond", _olua_fun_cocos2d_ParticleSystem_getRotatePerSecond); + oluacls_func(L, "getRotatePerSecondVar", _olua_fun_cocos2d_ParticleSystem_getRotatePerSecondVar); + oluacls_func(L, "getRotationIsDir", _olua_fun_cocos2d_ParticleSystem_getRotationIsDir); + oluacls_func(L, "getSourcePosition", _olua_fun_cocos2d_ParticleSystem_getSourcePosition); + oluacls_func(L, "getSpeed", _olua_fun_cocos2d_ParticleSystem_getSpeed); + oluacls_func(L, "getSpeedVar", _olua_fun_cocos2d_ParticleSystem_getSpeedVar); + oluacls_func(L, "getStartColor", _olua_fun_cocos2d_ParticleSystem_getStartColor); + oluacls_func(L, "getStartColorVar", _olua_fun_cocos2d_ParticleSystem_getStartColorVar); + oluacls_func(L, "getStartRadius", _olua_fun_cocos2d_ParticleSystem_getStartRadius); + oluacls_func(L, "getStartRadiusVar", _olua_fun_cocos2d_ParticleSystem_getStartRadiusVar); + oluacls_func(L, "getStartSize", _olua_fun_cocos2d_ParticleSystem_getStartSize); + oluacls_func(L, "getStartSizeVar", _olua_fun_cocos2d_ParticleSystem_getStartSizeVar); + oluacls_func(L, "getStartSpin", _olua_fun_cocos2d_ParticleSystem_getStartSpin); + oluacls_func(L, "getStartSpinVar", _olua_fun_cocos2d_ParticleSystem_getStartSpinVar); + oluacls_func(L, "getTangentialAccel", _olua_fun_cocos2d_ParticleSystem_getTangentialAccel); + oluacls_func(L, "getTangentialAccelVar", _olua_fun_cocos2d_ParticleSystem_getTangentialAccelVar); + oluacls_func(L, "getTexture", _olua_fun_cocos2d_ParticleSystem_getTexture); + oluacls_func(L, "getTotalParticles", _olua_fun_cocos2d_ParticleSystem_getTotalParticles); + oluacls_func(L, "initWithDictionary", _olua_fun_cocos2d_ParticleSystem_initWithDictionary); + oluacls_func(L, "initWithFile", _olua_fun_cocos2d_ParticleSystem_initWithFile); + oluacls_func(L, "initWithTotalParticles", _olua_fun_cocos2d_ParticleSystem_initWithTotalParticles); + oluacls_func(L, "isActive", _olua_fun_cocos2d_ParticleSystem_isActive); + oluacls_func(L, "isAutoRemoveOnFinish", _olua_fun_cocos2d_ParticleSystem_isAutoRemoveOnFinish); + oluacls_func(L, "isBlendAdditive", _olua_fun_cocos2d_ParticleSystem_isBlendAdditive); + oluacls_func(L, "isFull", _olua_fun_cocos2d_ParticleSystem_isFull); + oluacls_func(L, "isPaused", _olua_fun_cocos2d_ParticleSystem_isPaused); + oluacls_func(L, "isSourcePositionCompatible", _olua_fun_cocos2d_ParticleSystem_isSourcePositionCompatible); + oluacls_func(L, "new", _olua_fun_cocos2d_ParticleSystem_new); + oluacls_func(L, "pauseEmissions", _olua_fun_cocos2d_ParticleSystem_pauseEmissions); + oluacls_func(L, "postStep", _olua_fun_cocos2d_ParticleSystem_postStep); + oluacls_func(L, "resetSystem", _olua_fun_cocos2d_ParticleSystem_resetSystem); + oluacls_func(L, "resumeEmissions", _olua_fun_cocos2d_ParticleSystem_resumeEmissions); + oluacls_func(L, "setAngle", _olua_fun_cocos2d_ParticleSystem_setAngle); + oluacls_func(L, "setAngleVar", _olua_fun_cocos2d_ParticleSystem_setAngleVar); + oluacls_func(L, "setAtlasIndex", _olua_fun_cocos2d_ParticleSystem_setAtlasIndex); + oluacls_func(L, "setAutoRemoveOnFinish", _olua_fun_cocos2d_ParticleSystem_setAutoRemoveOnFinish); + oluacls_func(L, "setBatchNode", _olua_fun_cocos2d_ParticleSystem_setBatchNode); + oluacls_func(L, "setBlendAdditive", _olua_fun_cocos2d_ParticleSystem_setBlendAdditive); + oluacls_func(L, "setBlendFunc", _olua_fun_cocos2d_ParticleSystem_setBlendFunc); + oluacls_func(L, "setDuration", _olua_fun_cocos2d_ParticleSystem_setDuration); + oluacls_func(L, "setEmissionRate", _olua_fun_cocos2d_ParticleSystem_setEmissionRate); + oluacls_func(L, "setEmitterMode", _olua_fun_cocos2d_ParticleSystem_setEmitterMode); + oluacls_func(L, "setEndColor", _olua_fun_cocos2d_ParticleSystem_setEndColor); + oluacls_func(L, "setEndColorVar", _olua_fun_cocos2d_ParticleSystem_setEndColorVar); + oluacls_func(L, "setEndRadius", _olua_fun_cocos2d_ParticleSystem_setEndRadius); + oluacls_func(L, "setEndRadiusVar", _olua_fun_cocos2d_ParticleSystem_setEndRadiusVar); + oluacls_func(L, "setEndSize", _olua_fun_cocos2d_ParticleSystem_setEndSize); + oluacls_func(L, "setEndSizeVar", _olua_fun_cocos2d_ParticleSystem_setEndSizeVar); + oluacls_func(L, "setEndSpin", _olua_fun_cocos2d_ParticleSystem_setEndSpin); + oluacls_func(L, "setEndSpinVar", _olua_fun_cocos2d_ParticleSystem_setEndSpinVar); + oluacls_func(L, "setGravity", _olua_fun_cocos2d_ParticleSystem_setGravity); + oluacls_func(L, "setLife", _olua_fun_cocos2d_ParticleSystem_setLife); + oluacls_func(L, "setLifeVar", _olua_fun_cocos2d_ParticleSystem_setLifeVar); + oluacls_func(L, "setPosVar", _olua_fun_cocos2d_ParticleSystem_setPosVar); + oluacls_func(L, "setPositionType", _olua_fun_cocos2d_ParticleSystem_setPositionType); + oluacls_func(L, "setRadialAccel", _olua_fun_cocos2d_ParticleSystem_setRadialAccel); + oluacls_func(L, "setRadialAccelVar", _olua_fun_cocos2d_ParticleSystem_setRadialAccelVar); + oluacls_func(L, "setRotatePerSecond", _olua_fun_cocos2d_ParticleSystem_setRotatePerSecond); + oluacls_func(L, "setRotatePerSecondVar", _olua_fun_cocos2d_ParticleSystem_setRotatePerSecondVar); + oluacls_func(L, "setRotationIsDir", _olua_fun_cocos2d_ParticleSystem_setRotationIsDir); + oluacls_func(L, "setSourcePosition", _olua_fun_cocos2d_ParticleSystem_setSourcePosition); + oluacls_func(L, "setSourcePositionCompatible", _olua_fun_cocos2d_ParticleSystem_setSourcePositionCompatible); + oluacls_func(L, "setSpeed", _olua_fun_cocos2d_ParticleSystem_setSpeed); + oluacls_func(L, "setSpeedVar", _olua_fun_cocos2d_ParticleSystem_setSpeedVar); + oluacls_func(L, "setStartColor", _olua_fun_cocos2d_ParticleSystem_setStartColor); + oluacls_func(L, "setStartColorVar", _olua_fun_cocos2d_ParticleSystem_setStartColorVar); + oluacls_func(L, "setStartRadius", _olua_fun_cocos2d_ParticleSystem_setStartRadius); + oluacls_func(L, "setStartRadiusVar", _olua_fun_cocos2d_ParticleSystem_setStartRadiusVar); + oluacls_func(L, "setStartSize", _olua_fun_cocos2d_ParticleSystem_setStartSize); + oluacls_func(L, "setStartSizeVar", _olua_fun_cocos2d_ParticleSystem_setStartSizeVar); + oluacls_func(L, "setStartSpin", _olua_fun_cocos2d_ParticleSystem_setStartSpin); + oluacls_func(L, "setStartSpinVar", _olua_fun_cocos2d_ParticleSystem_setStartSpinVar); + oluacls_func(L, "setTangentialAccel", _olua_fun_cocos2d_ParticleSystem_setTangentialAccel); + oluacls_func(L, "setTangentialAccelVar", _olua_fun_cocos2d_ParticleSystem_setTangentialAccelVar); + oluacls_func(L, "setTexture", _olua_fun_cocos2d_ParticleSystem_setTexture); + oluacls_func(L, "setTotalParticles", _olua_fun_cocos2d_ParticleSystem_setTotalParticles); + oluacls_func(L, "start", _olua_fun_cocos2d_ParticleSystem_start); + oluacls_func(L, "stop", _olua_fun_cocos2d_ParticleSystem_stop); + oluacls_func(L, "stopSystem", _olua_fun_cocos2d_ParticleSystem_stopSystem); + oluacls_func(L, "updateParticleQuads", _olua_fun_cocos2d_ParticleSystem_updateParticleQuads); + oluacls_func(L, "updateWithNoTime", _olua_fun_cocos2d_ParticleSystem_updateWithNoTime); + oluacls_prop(L, "active", _olua_fun_cocos2d_ParticleSystem_isActive, nullptr); + oluacls_prop(L, "allParticleSystems", _olua_fun_cocos2d_ParticleSystem_getAllParticleSystems, nullptr); + oluacls_prop(L, "angle", _olua_fun_cocos2d_ParticleSystem_getAngle, _olua_fun_cocos2d_ParticleSystem_setAngle); + oluacls_prop(L, "angleVar", _olua_fun_cocos2d_ParticleSystem_getAngleVar, _olua_fun_cocos2d_ParticleSystem_setAngleVar); + oluacls_prop(L, "atlasIndex", _olua_fun_cocos2d_ParticleSystem_getAtlasIndex, _olua_fun_cocos2d_ParticleSystem_setAtlasIndex); + oluacls_prop(L, "autoRemoveOnFinish", _olua_fun_cocos2d_ParticleSystem_isAutoRemoveOnFinish, _olua_fun_cocos2d_ParticleSystem_setAutoRemoveOnFinish); + oluacls_prop(L, "batchNode", _olua_fun_cocos2d_ParticleSystem_getBatchNode, _olua_fun_cocos2d_ParticleSystem_setBatchNode); + oluacls_prop(L, "blendAdditive", _olua_fun_cocos2d_ParticleSystem_isBlendAdditive, _olua_fun_cocos2d_ParticleSystem_setBlendAdditive); + oluacls_prop(L, "blendFunc", _olua_fun_cocos2d_ParticleSystem_getBlendFunc, _olua_fun_cocos2d_ParticleSystem_setBlendFunc); + oluacls_prop(L, "duration", _olua_fun_cocos2d_ParticleSystem_getDuration, _olua_fun_cocos2d_ParticleSystem_setDuration); + oluacls_prop(L, "emissionRate", _olua_fun_cocos2d_ParticleSystem_getEmissionRate, _olua_fun_cocos2d_ParticleSystem_setEmissionRate); + oluacls_prop(L, "emitterMode", _olua_fun_cocos2d_ParticleSystem_getEmitterMode, _olua_fun_cocos2d_ParticleSystem_setEmitterMode); + oluacls_prop(L, "endColor", _olua_fun_cocos2d_ParticleSystem_getEndColor, _olua_fun_cocos2d_ParticleSystem_setEndColor); + oluacls_prop(L, "endColorVar", _olua_fun_cocos2d_ParticleSystem_getEndColorVar, _olua_fun_cocos2d_ParticleSystem_setEndColorVar); + oluacls_prop(L, "endRadius", _olua_fun_cocos2d_ParticleSystem_getEndRadius, _olua_fun_cocos2d_ParticleSystem_setEndRadius); + oluacls_prop(L, "endRadiusVar", _olua_fun_cocos2d_ParticleSystem_getEndRadiusVar, _olua_fun_cocos2d_ParticleSystem_setEndRadiusVar); + oluacls_prop(L, "endSize", _olua_fun_cocos2d_ParticleSystem_getEndSize, _olua_fun_cocos2d_ParticleSystem_setEndSize); + oluacls_prop(L, "endSizeVar", _olua_fun_cocos2d_ParticleSystem_getEndSizeVar, _olua_fun_cocos2d_ParticleSystem_setEndSizeVar); + oluacls_prop(L, "endSpin", _olua_fun_cocos2d_ParticleSystem_getEndSpin, _olua_fun_cocos2d_ParticleSystem_setEndSpin); + oluacls_prop(L, "endSpinVar", _olua_fun_cocos2d_ParticleSystem_getEndSpinVar, _olua_fun_cocos2d_ParticleSystem_setEndSpinVar); + oluacls_prop(L, "full", _olua_fun_cocos2d_ParticleSystem_isFull, nullptr); + oluacls_prop(L, "gravity", _olua_fun_cocos2d_ParticleSystem_getGravity, _olua_fun_cocos2d_ParticleSystem_setGravity); + oluacls_prop(L, "life", _olua_fun_cocos2d_ParticleSystem_getLife, _olua_fun_cocos2d_ParticleSystem_setLife); + oluacls_prop(L, "lifeVar", _olua_fun_cocos2d_ParticleSystem_getLifeVar, _olua_fun_cocos2d_ParticleSystem_setLifeVar); + oluacls_prop(L, "particleCount", _olua_fun_cocos2d_ParticleSystem_getParticleCount, nullptr); + oluacls_prop(L, "paused", _olua_fun_cocos2d_ParticleSystem_isPaused, nullptr); + oluacls_prop(L, "posVar", _olua_fun_cocos2d_ParticleSystem_getPosVar, _olua_fun_cocos2d_ParticleSystem_setPosVar); + oluacls_prop(L, "positionType", _olua_fun_cocos2d_ParticleSystem_getPositionType, _olua_fun_cocos2d_ParticleSystem_setPositionType); + oluacls_prop(L, "radialAccel", _olua_fun_cocos2d_ParticleSystem_getRadialAccel, _olua_fun_cocos2d_ParticleSystem_setRadialAccel); + oluacls_prop(L, "radialAccelVar", _olua_fun_cocos2d_ParticleSystem_getRadialAccelVar, _olua_fun_cocos2d_ParticleSystem_setRadialAccelVar); + oluacls_prop(L, "resourceFile", _olua_fun_cocos2d_ParticleSystem_getResourceFile, nullptr); + oluacls_prop(L, "rotatePerSecond", _olua_fun_cocos2d_ParticleSystem_getRotatePerSecond, _olua_fun_cocos2d_ParticleSystem_setRotatePerSecond); + oluacls_prop(L, "rotatePerSecondVar", _olua_fun_cocos2d_ParticleSystem_getRotatePerSecondVar, _olua_fun_cocos2d_ParticleSystem_setRotatePerSecondVar); + oluacls_prop(L, "rotationIsDir", _olua_fun_cocos2d_ParticleSystem_getRotationIsDir, _olua_fun_cocos2d_ParticleSystem_setRotationIsDir); + oluacls_prop(L, "sourcePosition", _olua_fun_cocos2d_ParticleSystem_getSourcePosition, _olua_fun_cocos2d_ParticleSystem_setSourcePosition); + oluacls_prop(L, "sourcePositionCompatible", _olua_fun_cocos2d_ParticleSystem_isSourcePositionCompatible, _olua_fun_cocos2d_ParticleSystem_setSourcePositionCompatible); + oluacls_prop(L, "speed", _olua_fun_cocos2d_ParticleSystem_getSpeed, _olua_fun_cocos2d_ParticleSystem_setSpeed); + oluacls_prop(L, "speedVar", _olua_fun_cocos2d_ParticleSystem_getSpeedVar, _olua_fun_cocos2d_ParticleSystem_setSpeedVar); + oluacls_prop(L, "startColor", _olua_fun_cocos2d_ParticleSystem_getStartColor, _olua_fun_cocos2d_ParticleSystem_setStartColor); + oluacls_prop(L, "startColorVar", _olua_fun_cocos2d_ParticleSystem_getStartColorVar, _olua_fun_cocos2d_ParticleSystem_setStartColorVar); + oluacls_prop(L, "startRadius", _olua_fun_cocos2d_ParticleSystem_getStartRadius, _olua_fun_cocos2d_ParticleSystem_setStartRadius); + oluacls_prop(L, "startRadiusVar", _olua_fun_cocos2d_ParticleSystem_getStartRadiusVar, _olua_fun_cocos2d_ParticleSystem_setStartRadiusVar); + oluacls_prop(L, "startSize", _olua_fun_cocos2d_ParticleSystem_getStartSize, _olua_fun_cocos2d_ParticleSystem_setStartSize); + oluacls_prop(L, "startSizeVar", _olua_fun_cocos2d_ParticleSystem_getStartSizeVar, _olua_fun_cocos2d_ParticleSystem_setStartSizeVar); + oluacls_prop(L, "startSpin", _olua_fun_cocos2d_ParticleSystem_getStartSpin, _olua_fun_cocos2d_ParticleSystem_setStartSpin); + oluacls_prop(L, "startSpinVar", _olua_fun_cocos2d_ParticleSystem_getStartSpinVar, _olua_fun_cocos2d_ParticleSystem_setStartSpinVar); + oluacls_prop(L, "tangentialAccel", _olua_fun_cocos2d_ParticleSystem_getTangentialAccel, _olua_fun_cocos2d_ParticleSystem_setTangentialAccel); + oluacls_prop(L, "tangentialAccelVar", _olua_fun_cocos2d_ParticleSystem_getTangentialAccelVar, _olua_fun_cocos2d_ParticleSystem_setTangentialAccelVar); + oluacls_prop(L, "texture", _olua_fun_cocos2d_ParticleSystem_getTexture, _olua_fun_cocos2d_ParticleSystem_setTexture); + oluacls_prop(L, "totalParticles", _olua_fun_cocos2d_ParticleSystem_getTotalParticles, _olua_fun_cocos2d_ParticleSystem_setTotalParticles); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_ParticleSystem(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.ParticleSystem")) { + luaL_error(L, "class not found: cocos2d::ParticleSystem"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_ParticleSystemQuad_create$1(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystemQuad_create$1(lua_State *L) { olua_startinvoke(L); @@ -48696,7 +51365,7 @@ static int _cocos2d_ParticleSystemQuad_create$1(lua_State *L) return num_ret; } -static int _cocos2d_ParticleSystemQuad_create$2(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystemQuad_create$2(lua_State *L) { olua_startinvoke(L); @@ -48713,13 +51382,13 @@ static int _cocos2d_ParticleSystemQuad_create$2(lua_State *L) return num_ret; } -static int _cocos2d_ParticleSystemQuad_create$3(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystemQuad_create$3(lua_State *L) { olua_startinvoke(L); cocos2d::ValueMap *arg1 = nullptr; /** dictionary */ - olua_check_pointer(L, 1, &arg1, "cc.ValueMap"); + olua_check_valueptr(L, 1, &arg1, "cc.types.ValueMap"); // static cocos2d::ParticleSystemQuad *create(cocos2d::ValueMap &dictionary) cocos2d::ParticleSystemQuad *ret = cocos2d::ParticleSystemQuad::create(*arg1); @@ -48730,24 +51399,24 @@ static int _cocos2d_ParticleSystemQuad_create$3(lua_State *L) return num_ret; } -static int _cocos2d_ParticleSystemQuad_create(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystemQuad_create(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 0) { // static cocos2d::ParticleSystemQuad *create() - return _cocos2d_ParticleSystemQuad_create$1(L); + return _olua_fun_cocos2d_ParticleSystemQuad_create$1(L); } if (num_args == 1) { if ((olua_is_string(L, 1))) { // static cocos2d::ParticleSystemQuad *create(const std::string &filename) - return _cocos2d_ParticleSystemQuad_create$2(L); + return _olua_fun_cocos2d_ParticleSystemQuad_create$2(L); } - // if ((olua_is_pointer(L, 1, "cc.ValueMap"))) { + // if ((olua_is_valueptr(L, 1, "cc.types.ValueMap"))) { // static cocos2d::ParticleSystemQuad *create(cocos2d::ValueMap &dictionary) - return _cocos2d_ParticleSystemQuad_create$3(L); + return _olua_fun_cocos2d_ParticleSystemQuad_create$3(L); // } } @@ -48756,7 +51425,7 @@ static int _cocos2d_ParticleSystemQuad_create(lua_State *L) return 0; } -static int _cocos2d_ParticleSystemQuad_createWithTotalParticles(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystemQuad_createWithTotalParticles(lua_State *L) { olua_startinvoke(L); @@ -48773,7 +51442,7 @@ static int _cocos2d_ParticleSystemQuad_createWithTotalParticles(lua_State *L) return num_ret; } -static int _cocos2d_ParticleSystemQuad_listenRendererRecreated(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystemQuad_listenRendererRecreated(lua_State *L) { olua_startinvoke(L); @@ -48791,11 +51460,11 @@ static int _cocos2d_ParticleSystemQuad_listenRendererRecreated(lua_State *L) return 0; } -static int _cocos2d_ParticleSystemQuad_new(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystemQuad_new(lua_State *L) { olua_startinvoke(L); - // ParticleSystemQuad() + // cocos2d::ParticleSystemQuad() cocos2d::ParticleSystemQuad *ret = new cocos2d::ParticleSystemQuad(); int num_ret = olua_push_object(L, ret, "cc.ParticleSystemQuad"); olua_postnew(L, ret); @@ -48805,7 +51474,7 @@ static int _cocos2d_ParticleSystemQuad_new(lua_State *L) return num_ret; } -static int _cocos2d_ParticleSystemQuad_setDisplayFrame(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystemQuad_setDisplayFrame(lua_State *L) { olua_startinvoke(L); @@ -48823,42 +51492,51 @@ static int _cocos2d_ParticleSystemQuad_setDisplayFrame(lua_State *L) return 0; } -static int _cocos2d_ParticleSystemQuad_setTextureWithRect(lua_State *L) +static int _olua_fun_cocos2d_ParticleSystemQuad_setTextureWithRect(lua_State *L) { olua_startinvoke(L); cocos2d::ParticleSystemQuad *self = nullptr; cocos2d::Texture2D *arg1 = nullptr; /** texture */ - cocos2d::Rect arg2; /** rect */ + cocos2d::Rect *arg2; /** rect */ olua_to_object(L, 1, &self, "cc.ParticleSystemQuad"); olua_check_object(L, 2, &arg1, "cc.Texture2D"); olua_check_object(L, 3, &arg2, "cc.Rect"); // void setTextureWithRect(cocos2d::Texture2D *texture, const cocos2d::Rect &rect) - self->setTextureWithRect(arg1, arg2); + self->setTextureWithRect(arg1, *arg2); olua_endinvoke(L); return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ParticleSystemQuad(lua_State *L) +static int _olua_cls_cc_ParticleSystemQuad(lua_State *L) { oluacls_class(L, "cc.ParticleSystemQuad"); - oluacls_func(L, "create", _cocos2d_ParticleSystemQuad_create); - oluacls_func(L, "createWithTotalParticles", _cocos2d_ParticleSystemQuad_createWithTotalParticles); - oluacls_func(L, "listenRendererRecreated", _cocos2d_ParticleSystemQuad_listenRendererRecreated); - oluacls_func(L, "new", _cocos2d_ParticleSystemQuad_new); - oluacls_func(L, "setDisplayFrame", _cocos2d_ParticleSystemQuad_setDisplayFrame); - oluacls_func(L, "setTextureWithRect", _cocos2d_ParticleSystemQuad_setTextureWithRect); + oluacls_func(L, "create", _olua_fun_cocos2d_ParticleSystemQuad_create); + oluacls_func(L, "createWithTotalParticles", _olua_fun_cocos2d_ParticleSystemQuad_createWithTotalParticles); + oluacls_func(L, "listenRendererRecreated", _olua_fun_cocos2d_ParticleSystemQuad_listenRendererRecreated); + oluacls_func(L, "new", _olua_fun_cocos2d_ParticleSystemQuad_new); + oluacls_func(L, "setDisplayFrame", _olua_fun_cocos2d_ParticleSystemQuad_setDisplayFrame); + oluacls_func(L, "setTextureWithRect", _olua_fun_cocos2d_ParticleSystemQuad_setTextureWithRect); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_ParticleSystemQuad(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.ParticleSystemQuad")) { + luaL_error(L, "class not found: cocos2d::ParticleSystemQuad"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_ParticleExplosion_create(lua_State *L) +static int _olua_fun_cocos2d_ParticleExplosion_create(lua_State *L) { olua_startinvoke(L); @@ -48871,7 +51549,7 @@ static int _cocos2d_ParticleExplosion_create(lua_State *L) return num_ret; } -static int _cocos2d_ParticleExplosion_createWithTotalParticles(lua_State *L) +static int _olua_fun_cocos2d_ParticleExplosion_createWithTotalParticles(lua_State *L) { olua_startinvoke(L); @@ -48888,11 +51566,11 @@ static int _cocos2d_ParticleExplosion_createWithTotalParticles(lua_State *L) return num_ret; } -static int _cocos2d_ParticleExplosion_new(lua_State *L) +static int _olua_fun_cocos2d_ParticleExplosion_new(lua_State *L) { olua_startinvoke(L); - // ParticleExplosion() + // cocos2d::ParticleExplosion() cocos2d::ParticleExplosion *ret = new cocos2d::ParticleExplosion(); int num_ret = olua_push_object(L, ret, "cc.ParticleExplosion"); olua_postnew(L, ret); @@ -48902,19 +51580,28 @@ static int _cocos2d_ParticleExplosion_new(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ParticleExplosion(lua_State *L) +static int _olua_cls_cc_ParticleExplosion(lua_State *L) { oluacls_class(L, "cc.ParticleExplosion"); - oluacls_func(L, "create", _cocos2d_ParticleExplosion_create); - oluacls_func(L, "createWithTotalParticles", _cocos2d_ParticleExplosion_createWithTotalParticles); - oluacls_func(L, "new", _cocos2d_ParticleExplosion_new); + oluacls_func(L, "create", _olua_fun_cocos2d_ParticleExplosion_create); + oluacls_func(L, "createWithTotalParticles", _olua_fun_cocos2d_ParticleExplosion_createWithTotalParticles); + oluacls_func(L, "new", _olua_fun_cocos2d_ParticleExplosion_new); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_ParticleExplosion(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.ParticleExplosion")) { + luaL_error(L, "class not found: cocos2d::ParticleExplosion"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_ParticleFire_create(lua_State *L) +static int _olua_fun_cocos2d_ParticleFire_create(lua_State *L) { olua_startinvoke(L); @@ -48927,7 +51614,7 @@ static int _cocos2d_ParticleFire_create(lua_State *L) return num_ret; } -static int _cocos2d_ParticleFire_createWithTotalParticles(lua_State *L) +static int _olua_fun_cocos2d_ParticleFire_createWithTotalParticles(lua_State *L) { olua_startinvoke(L); @@ -48944,11 +51631,11 @@ static int _cocos2d_ParticleFire_createWithTotalParticles(lua_State *L) return num_ret; } -static int _cocos2d_ParticleFire_new(lua_State *L) +static int _olua_fun_cocos2d_ParticleFire_new(lua_State *L) { olua_startinvoke(L); - // ParticleFire() + // cocos2d::ParticleFire() cocos2d::ParticleFire *ret = new cocos2d::ParticleFire(); int num_ret = olua_push_object(L, ret, "cc.ParticleFire"); olua_postnew(L, ret); @@ -48958,19 +51645,28 @@ static int _cocos2d_ParticleFire_new(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ParticleFire(lua_State *L) +static int _olua_cls_cc_ParticleFire(lua_State *L) { oluacls_class(L, "cc.ParticleFire"); - oluacls_func(L, "create", _cocos2d_ParticleFire_create); - oluacls_func(L, "createWithTotalParticles", _cocos2d_ParticleFire_createWithTotalParticles); - oluacls_func(L, "new", _cocos2d_ParticleFire_new); + oluacls_func(L, "create", _olua_fun_cocos2d_ParticleFire_create); + oluacls_func(L, "createWithTotalParticles", _olua_fun_cocos2d_ParticleFire_createWithTotalParticles); + oluacls_func(L, "new", _olua_fun_cocos2d_ParticleFire_new); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_ParticleFire(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.ParticleFire")) { + luaL_error(L, "class not found: cocos2d::ParticleFire"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_ParticleFireworks_create(lua_State *L) +static int _olua_fun_cocos2d_ParticleFireworks_create(lua_State *L) { olua_startinvoke(L); @@ -48983,7 +51679,7 @@ static int _cocos2d_ParticleFireworks_create(lua_State *L) return num_ret; } -static int _cocos2d_ParticleFireworks_createWithTotalParticles(lua_State *L) +static int _olua_fun_cocos2d_ParticleFireworks_createWithTotalParticles(lua_State *L) { olua_startinvoke(L); @@ -49000,11 +51696,11 @@ static int _cocos2d_ParticleFireworks_createWithTotalParticles(lua_State *L) return num_ret; } -static int _cocos2d_ParticleFireworks_new(lua_State *L) +static int _olua_fun_cocos2d_ParticleFireworks_new(lua_State *L) { olua_startinvoke(L); - // ParticleFireworks() + // cocos2d::ParticleFireworks() cocos2d::ParticleFireworks *ret = new cocos2d::ParticleFireworks(); int num_ret = olua_push_object(L, ret, "cc.ParticleFireworks"); olua_postnew(L, ret); @@ -49014,19 +51710,28 @@ static int _cocos2d_ParticleFireworks_new(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ParticleFireworks(lua_State *L) +static int _olua_cls_cc_ParticleFireworks(lua_State *L) { oluacls_class(L, "cc.ParticleFireworks"); - oluacls_func(L, "create", _cocos2d_ParticleFireworks_create); - oluacls_func(L, "createWithTotalParticles", _cocos2d_ParticleFireworks_createWithTotalParticles); - oluacls_func(L, "new", _cocos2d_ParticleFireworks_new); + oluacls_func(L, "create", _olua_fun_cocos2d_ParticleFireworks_create); + oluacls_func(L, "createWithTotalParticles", _olua_fun_cocos2d_ParticleFireworks_createWithTotalParticles); + oluacls_func(L, "new", _olua_fun_cocos2d_ParticleFireworks_new); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_ParticleFireworks(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.ParticleFireworks")) { + luaL_error(L, "class not found: cocos2d::ParticleFireworks"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_ParticleFlower_create(lua_State *L) +static int _olua_fun_cocos2d_ParticleFlower_create(lua_State *L) { olua_startinvoke(L); @@ -49039,7 +51744,7 @@ static int _cocos2d_ParticleFlower_create(lua_State *L) return num_ret; } -static int _cocos2d_ParticleFlower_createWithTotalParticles(lua_State *L) +static int _olua_fun_cocos2d_ParticleFlower_createWithTotalParticles(lua_State *L) { olua_startinvoke(L); @@ -49056,11 +51761,11 @@ static int _cocos2d_ParticleFlower_createWithTotalParticles(lua_State *L) return num_ret; } -static int _cocos2d_ParticleFlower_new(lua_State *L) +static int _olua_fun_cocos2d_ParticleFlower_new(lua_State *L) { olua_startinvoke(L); - // ParticleFlower() + // cocos2d::ParticleFlower() cocos2d::ParticleFlower *ret = new cocos2d::ParticleFlower(); int num_ret = olua_push_object(L, ret, "cc.ParticleFlower"); olua_postnew(L, ret); @@ -49070,19 +51775,28 @@ static int _cocos2d_ParticleFlower_new(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ParticleFlower(lua_State *L) +static int _olua_cls_cc_ParticleFlower(lua_State *L) { oluacls_class(L, "cc.ParticleFlower"); - oluacls_func(L, "create", _cocos2d_ParticleFlower_create); - oluacls_func(L, "createWithTotalParticles", _cocos2d_ParticleFlower_createWithTotalParticles); - oluacls_func(L, "new", _cocos2d_ParticleFlower_new); + oluacls_func(L, "create", _olua_fun_cocos2d_ParticleFlower_create); + oluacls_func(L, "createWithTotalParticles", _olua_fun_cocos2d_ParticleFlower_createWithTotalParticles); + oluacls_func(L, "new", _olua_fun_cocos2d_ParticleFlower_new); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_ParticleFlower(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.ParticleFlower")) { + luaL_error(L, "class not found: cocos2d::ParticleFlower"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_ParticleGalaxy_create(lua_State *L) +static int _olua_fun_cocos2d_ParticleGalaxy_create(lua_State *L) { olua_startinvoke(L); @@ -49095,7 +51809,7 @@ static int _cocos2d_ParticleGalaxy_create(lua_State *L) return num_ret; } -static int _cocos2d_ParticleGalaxy_createWithTotalParticles(lua_State *L) +static int _olua_fun_cocos2d_ParticleGalaxy_createWithTotalParticles(lua_State *L) { olua_startinvoke(L); @@ -49112,11 +51826,11 @@ static int _cocos2d_ParticleGalaxy_createWithTotalParticles(lua_State *L) return num_ret; } -static int _cocos2d_ParticleGalaxy_new(lua_State *L) +static int _olua_fun_cocos2d_ParticleGalaxy_new(lua_State *L) { olua_startinvoke(L); - // ParticleGalaxy() + // cocos2d::ParticleGalaxy() cocos2d::ParticleGalaxy *ret = new cocos2d::ParticleGalaxy(); int num_ret = olua_push_object(L, ret, "cc.ParticleGalaxy"); olua_postnew(L, ret); @@ -49126,19 +51840,28 @@ static int _cocos2d_ParticleGalaxy_new(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ParticleGalaxy(lua_State *L) +static int _olua_cls_cc_ParticleGalaxy(lua_State *L) { oluacls_class(L, "cc.ParticleGalaxy"); - oluacls_func(L, "create", _cocos2d_ParticleGalaxy_create); - oluacls_func(L, "createWithTotalParticles", _cocos2d_ParticleGalaxy_createWithTotalParticles); - oluacls_func(L, "new", _cocos2d_ParticleGalaxy_new); + oluacls_func(L, "create", _olua_fun_cocos2d_ParticleGalaxy_create); + oluacls_func(L, "createWithTotalParticles", _olua_fun_cocos2d_ParticleGalaxy_createWithTotalParticles); + oluacls_func(L, "new", _olua_fun_cocos2d_ParticleGalaxy_new); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_ParticleGalaxy(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.ParticleGalaxy")) { + luaL_error(L, "class not found: cocos2d::ParticleGalaxy"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_ParticleMeteor_create(lua_State *L) +static int _olua_fun_cocos2d_ParticleMeteor_create(lua_State *L) { olua_startinvoke(L); @@ -49151,7 +51874,7 @@ static int _cocos2d_ParticleMeteor_create(lua_State *L) return num_ret; } -static int _cocos2d_ParticleMeteor_createWithTotalParticles(lua_State *L) +static int _olua_fun_cocos2d_ParticleMeteor_createWithTotalParticles(lua_State *L) { olua_startinvoke(L); @@ -49168,11 +51891,11 @@ static int _cocos2d_ParticleMeteor_createWithTotalParticles(lua_State *L) return num_ret; } -static int _cocos2d_ParticleMeteor_new(lua_State *L) +static int _olua_fun_cocos2d_ParticleMeteor_new(lua_State *L) { olua_startinvoke(L); - // ParticleMeteor() + // cocos2d::ParticleMeteor() cocos2d::ParticleMeteor *ret = new cocos2d::ParticleMeteor(); int num_ret = olua_push_object(L, ret, "cc.ParticleMeteor"); olua_postnew(L, ret); @@ -49182,19 +51905,28 @@ static int _cocos2d_ParticleMeteor_new(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ParticleMeteor(lua_State *L) +static int _olua_cls_cc_ParticleMeteor(lua_State *L) { oluacls_class(L, "cc.ParticleMeteor"); - oluacls_func(L, "create", _cocos2d_ParticleMeteor_create); - oluacls_func(L, "createWithTotalParticles", _cocos2d_ParticleMeteor_createWithTotalParticles); - oluacls_func(L, "new", _cocos2d_ParticleMeteor_new); + oluacls_func(L, "create", _olua_fun_cocos2d_ParticleMeteor_create); + oluacls_func(L, "createWithTotalParticles", _olua_fun_cocos2d_ParticleMeteor_createWithTotalParticles); + oluacls_func(L, "new", _olua_fun_cocos2d_ParticleMeteor_new); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_ParticleMeteor(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.ParticleMeteor")) { + luaL_error(L, "class not found: cocos2d::ParticleMeteor"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_ParticleRain_create(lua_State *L) +static int _olua_fun_cocos2d_ParticleRain_create(lua_State *L) { olua_startinvoke(L); @@ -49207,7 +51939,7 @@ static int _cocos2d_ParticleRain_create(lua_State *L) return num_ret; } -static int _cocos2d_ParticleRain_createWithTotalParticles(lua_State *L) +static int _olua_fun_cocos2d_ParticleRain_createWithTotalParticles(lua_State *L) { olua_startinvoke(L); @@ -49224,11 +51956,11 @@ static int _cocos2d_ParticleRain_createWithTotalParticles(lua_State *L) return num_ret; } -static int _cocos2d_ParticleRain_new(lua_State *L) +static int _olua_fun_cocos2d_ParticleRain_new(lua_State *L) { olua_startinvoke(L); - // ParticleRain() + // cocos2d::ParticleRain() cocos2d::ParticleRain *ret = new cocos2d::ParticleRain(); int num_ret = olua_push_object(L, ret, "cc.ParticleRain"); olua_postnew(L, ret); @@ -49238,19 +51970,28 @@ static int _cocos2d_ParticleRain_new(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ParticleRain(lua_State *L) +static int _olua_cls_cc_ParticleRain(lua_State *L) { oluacls_class(L, "cc.ParticleRain"); - oluacls_func(L, "create", _cocos2d_ParticleRain_create); - oluacls_func(L, "createWithTotalParticles", _cocos2d_ParticleRain_createWithTotalParticles); - oluacls_func(L, "new", _cocos2d_ParticleRain_new); + oluacls_func(L, "create", _olua_fun_cocos2d_ParticleRain_create); + oluacls_func(L, "createWithTotalParticles", _olua_fun_cocos2d_ParticleRain_createWithTotalParticles); + oluacls_func(L, "new", _olua_fun_cocos2d_ParticleRain_new); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_ParticleRain(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.ParticleRain")) { + luaL_error(L, "class not found: cocos2d::ParticleRain"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_ParticleSmoke_create(lua_State *L) +static int _olua_fun_cocos2d_ParticleSmoke_create(lua_State *L) { olua_startinvoke(L); @@ -49263,7 +52004,7 @@ static int _cocos2d_ParticleSmoke_create(lua_State *L) return num_ret; } -static int _cocos2d_ParticleSmoke_createWithTotalParticles(lua_State *L) +static int _olua_fun_cocos2d_ParticleSmoke_createWithTotalParticles(lua_State *L) { olua_startinvoke(L); @@ -49280,11 +52021,11 @@ static int _cocos2d_ParticleSmoke_createWithTotalParticles(lua_State *L) return num_ret; } -static int _cocos2d_ParticleSmoke_new(lua_State *L) +static int _olua_fun_cocos2d_ParticleSmoke_new(lua_State *L) { olua_startinvoke(L); - // ParticleSmoke() + // cocos2d::ParticleSmoke() cocos2d::ParticleSmoke *ret = new cocos2d::ParticleSmoke(); int num_ret = olua_push_object(L, ret, "cc.ParticleSmoke"); olua_postnew(L, ret); @@ -49294,19 +52035,28 @@ static int _cocos2d_ParticleSmoke_new(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ParticleSmoke(lua_State *L) +static int _olua_cls_cc_ParticleSmoke(lua_State *L) { oluacls_class(L, "cc.ParticleSmoke"); - oluacls_func(L, "create", _cocos2d_ParticleSmoke_create); - oluacls_func(L, "createWithTotalParticles", _cocos2d_ParticleSmoke_createWithTotalParticles); - oluacls_func(L, "new", _cocos2d_ParticleSmoke_new); + oluacls_func(L, "create", _olua_fun_cocos2d_ParticleSmoke_create); + oluacls_func(L, "createWithTotalParticles", _olua_fun_cocos2d_ParticleSmoke_createWithTotalParticles); + oluacls_func(L, "new", _olua_fun_cocos2d_ParticleSmoke_new); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_ParticleSmoke(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.ParticleSmoke")) { + luaL_error(L, "class not found: cocos2d::ParticleSmoke"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_ParticleSnow_create(lua_State *L) +static int _olua_fun_cocos2d_ParticleSnow_create(lua_State *L) { olua_startinvoke(L); @@ -49319,7 +52069,7 @@ static int _cocos2d_ParticleSnow_create(lua_State *L) return num_ret; } -static int _cocos2d_ParticleSnow_createWithTotalParticles(lua_State *L) +static int _olua_fun_cocos2d_ParticleSnow_createWithTotalParticles(lua_State *L) { olua_startinvoke(L); @@ -49336,11 +52086,11 @@ static int _cocos2d_ParticleSnow_createWithTotalParticles(lua_State *L) return num_ret; } -static int _cocos2d_ParticleSnow_new(lua_State *L) +static int _olua_fun_cocos2d_ParticleSnow_new(lua_State *L) { olua_startinvoke(L); - // ParticleSnow() + // cocos2d::ParticleSnow() cocos2d::ParticleSnow *ret = new cocos2d::ParticleSnow(); int num_ret = olua_push_object(L, ret, "cc.ParticleSnow"); olua_postnew(L, ret); @@ -49350,19 +52100,28 @@ static int _cocos2d_ParticleSnow_new(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ParticleSnow(lua_State *L) +static int _olua_cls_cc_ParticleSnow(lua_State *L) { oluacls_class(L, "cc.ParticleSnow"); - oluacls_func(L, "create", _cocos2d_ParticleSnow_create); - oluacls_func(L, "createWithTotalParticles", _cocos2d_ParticleSnow_createWithTotalParticles); - oluacls_func(L, "new", _cocos2d_ParticleSnow_new); + oluacls_func(L, "create", _olua_fun_cocos2d_ParticleSnow_create); + oluacls_func(L, "createWithTotalParticles", _olua_fun_cocos2d_ParticleSnow_createWithTotalParticles); + oluacls_func(L, "new", _olua_fun_cocos2d_ParticleSnow_new); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_ParticleSnow(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.ParticleSnow")) { + luaL_error(L, "class not found: cocos2d::ParticleSnow"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_ParticleSpiral_create(lua_State *L) +static int _olua_fun_cocos2d_ParticleSpiral_create(lua_State *L) { olua_startinvoke(L); @@ -49375,7 +52134,7 @@ static int _cocos2d_ParticleSpiral_create(lua_State *L) return num_ret; } -static int _cocos2d_ParticleSpiral_createWithTotalParticles(lua_State *L) +static int _olua_fun_cocos2d_ParticleSpiral_createWithTotalParticles(lua_State *L) { olua_startinvoke(L); @@ -49392,11 +52151,11 @@ static int _cocos2d_ParticleSpiral_createWithTotalParticles(lua_State *L) return num_ret; } -static int _cocos2d_ParticleSpiral_new(lua_State *L) +static int _olua_fun_cocos2d_ParticleSpiral_new(lua_State *L) { olua_startinvoke(L); - // ParticleSpiral() + // cocos2d::ParticleSpiral() cocos2d::ParticleSpiral *ret = new cocos2d::ParticleSpiral(); int num_ret = olua_push_object(L, ret, "cc.ParticleSpiral"); olua_postnew(L, ret); @@ -49406,19 +52165,28 @@ static int _cocos2d_ParticleSpiral_new(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ParticleSpiral(lua_State *L) +static int _olua_cls_cc_ParticleSpiral(lua_State *L) { oluacls_class(L, "cc.ParticleSpiral"); - oluacls_func(L, "create", _cocos2d_ParticleSpiral_create); - oluacls_func(L, "createWithTotalParticles", _cocos2d_ParticleSpiral_createWithTotalParticles); - oluacls_func(L, "new", _cocos2d_ParticleSpiral_new); + oluacls_func(L, "create", _olua_fun_cocos2d_ParticleSpiral_create); + oluacls_func(L, "createWithTotalParticles", _olua_fun_cocos2d_ParticleSpiral_createWithTotalParticles); + oluacls_func(L, "new", _olua_fun_cocos2d_ParticleSpiral_new); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_ParticleSpiral(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.ParticleSpiral")) { + luaL_error(L, "class not found: cocos2d::ParticleSpiral"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_ParticleSun_create(lua_State *L) +static int _olua_fun_cocos2d_ParticleSun_create(lua_State *L) { olua_startinvoke(L); @@ -49431,7 +52199,7 @@ static int _cocos2d_ParticleSun_create(lua_State *L) return num_ret; } -static int _cocos2d_ParticleSun_createWithTotalParticles(lua_State *L) +static int _olua_fun_cocos2d_ParticleSun_createWithTotalParticles(lua_State *L) { olua_startinvoke(L); @@ -49448,11 +52216,11 @@ static int _cocos2d_ParticleSun_createWithTotalParticles(lua_State *L) return num_ret; } -static int _cocos2d_ParticleSun_new(lua_State *L) +static int _olua_fun_cocos2d_ParticleSun_new(lua_State *L) { olua_startinvoke(L); - // ParticleSun() + // cocos2d::ParticleSun() cocos2d::ParticleSun *ret = new cocos2d::ParticleSun(); int num_ret = olua_push_object(L, ret, "cc.ParticleSun"); olua_postnew(L, ret); @@ -49462,19 +52230,28 @@ static int _cocos2d_ParticleSun_new(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ParticleSun(lua_State *L) +static int _olua_cls_cc_ParticleSun(lua_State *L) { oluacls_class(L, "cc.ParticleSun"); - oluacls_func(L, "create", _cocos2d_ParticleSun_create); - oluacls_func(L, "createWithTotalParticles", _cocos2d_ParticleSun_createWithTotalParticles); - oluacls_func(L, "new", _cocos2d_ParticleSun_new); + oluacls_func(L, "create", _olua_fun_cocos2d_ParticleSun_create); + oluacls_func(L, "createWithTotalParticles", _olua_fun_cocos2d_ParticleSun_createWithTotalParticles); + oluacls_func(L, "new", _olua_fun_cocos2d_ParticleSun_new); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_ParticleSun(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.ParticleSun")) { + luaL_error(L, "class not found: cocos2d::ParticleSun"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_SAXDelegator___gc(lua_State *L) +static int _olua_fun_cocos2d_SAXDelegator___gc(lua_State *L) { olua_startinvoke(L); @@ -49486,7 +52263,7 @@ static int _cocos2d_SAXDelegator___gc(lua_State *L) return 0; } -static int _cocos2d_SAXDelegator___olua_move(lua_State *L) +static int _olua_fun_cocos2d_SAXDelegator___olua_move(lua_State *L) { olua_startinvoke(L); @@ -49498,7 +52275,7 @@ static int _cocos2d_SAXDelegator___olua_move(lua_State *L) return 1; } -static int _cocos2d_SAXDelegator_endElement(lua_State *L) +static int _olua_fun_cocos2d_SAXDelegator_endElement(lua_State *L) { olua_startinvoke(L); @@ -49518,7 +52295,7 @@ static int _cocos2d_SAXDelegator_endElement(lua_State *L) return 0; } -static int _cocos2d_SAXDelegator_textHandler(lua_State *L) +static int _olua_fun_cocos2d_SAXDelegator_textHandler(lua_State *L) { olua_startinvoke(L); @@ -49540,21 +52317,29 @@ static int _cocos2d_SAXDelegator_textHandler(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_SAXDelegator(lua_State *L) +static int _olua_cls_cc_SAXDelegator(lua_State *L) { oluacls_class(L, "cc.SAXDelegator"); - oluacls_func(L, "__gc", _cocos2d_SAXDelegator___gc); - oluacls_func(L, "__olua_move", _cocos2d_SAXDelegator___olua_move); - oluacls_func(L, "endElement", _cocos2d_SAXDelegator_endElement); - oluacls_func(L, "textHandler", _cocos2d_SAXDelegator_textHandler); + oluacls_func(L, "__gc", _olua_fun_cocos2d_SAXDelegator___gc); + oluacls_func(L, "__olua_move", _olua_fun_cocos2d_SAXDelegator___olua_move); + oluacls_func(L, "endElement", _olua_fun_cocos2d_SAXDelegator_endElement); + oluacls_func(L, "textHandler", _olua_fun_cocos2d_SAXDelegator_textHandler); return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_TMXTileFlags(lua_State *L) +OLUA_LIB int luaopen_cc_SAXDelegator(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.SAXDelegator")) { + luaL_error(L, "class not found: cocos2d::SAXDelegator"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_cc_TMXTileFlags(lua_State *L) { oluacls_class(L, "cc.TMXTileFlags"); oluacls_func(L, "__index", olua_indexerror); @@ -49567,9 +52352,19 @@ OLUA_LIB int luaopen_cocos2d_TMXTileFlags(lua_State *L) return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_TMXTileFlags(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.TMXTileFlags")) { + luaL_error(L, "class not found: cocos2d::TMXTileFlags"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_TMXObjectGroup_getGroupName(lua_State *L) +static int _olua_fun_cocos2d_TMXObjectGroup_getGroupName(lua_State *L) { olua_startinvoke(L); @@ -49586,7 +52381,7 @@ static int _cocos2d_TMXObjectGroup_getGroupName(lua_State *L) return num_ret; } -static int _cocos2d_TMXObjectGroup_getObject(lua_State *L) +static int _olua_fun_cocos2d_TMXObjectGroup_getObject(lua_State *L) { olua_startinvoke(L); @@ -49605,7 +52400,7 @@ static int _cocos2d_TMXObjectGroup_getObject(lua_State *L) return num_ret; } -static int _cocos2d_TMXObjectGroup_getObjects(lua_State *L) +static int _olua_fun_cocos2d_TMXObjectGroup_getObjects(lua_State *L) { olua_startinvoke(L); @@ -49622,7 +52417,7 @@ static int _cocos2d_TMXObjectGroup_getObjects(lua_State *L) return num_ret; } -static int _cocos2d_TMXObjectGroup_getPositionOffset(lua_State *L) +static int _olua_fun_cocos2d_TMXObjectGroup_getPositionOffset(lua_State *L) { olua_startinvoke(L); @@ -49639,7 +52434,7 @@ static int _cocos2d_TMXObjectGroup_getPositionOffset(lua_State *L) return num_ret; } -static int _cocos2d_TMXObjectGroup_getProperties(lua_State *L) +static int _olua_fun_cocos2d_TMXObjectGroup_getProperties(lua_State *L) { olua_startinvoke(L); @@ -49656,7 +52451,7 @@ static int _cocos2d_TMXObjectGroup_getProperties(lua_State *L) return num_ret; } -static int _cocos2d_TMXObjectGroup_getProperty(lua_State *L) +static int _olua_fun_cocos2d_TMXObjectGroup_getProperty(lua_State *L) { olua_startinvoke(L); @@ -49675,11 +52470,11 @@ static int _cocos2d_TMXObjectGroup_getProperty(lua_State *L) return num_ret; } -static int _cocos2d_TMXObjectGroup_new(lua_State *L) +static int _olua_fun_cocos2d_TMXObjectGroup_new(lua_State *L) { olua_startinvoke(L); - // TMXObjectGroup() + // cocos2d::TMXObjectGroup() cocos2d::TMXObjectGroup *ret = new cocos2d::TMXObjectGroup(); int num_ret = olua_push_object(L, ret, "cc.TMXObjectGroup"); olua_postnew(L, ret); @@ -49689,7 +52484,7 @@ static int _cocos2d_TMXObjectGroup_new(lua_State *L) return num_ret; } -static int _cocos2d_TMXObjectGroup_setGroupName(lua_State *L) +static int _olua_fun_cocos2d_TMXObjectGroup_setGroupName(lua_State *L) { olua_startinvoke(L); @@ -49707,7 +52502,7 @@ static int _cocos2d_TMXObjectGroup_setGroupName(lua_State *L) return 0; } -static int _cocos2d_TMXObjectGroup_setObjects(lua_State *L) +static int _olua_fun_cocos2d_TMXObjectGroup_setObjects(lua_State *L) { olua_startinvoke(L); @@ -49725,25 +52520,25 @@ static int _cocos2d_TMXObjectGroup_setObjects(lua_State *L) return 0; } -static int _cocos2d_TMXObjectGroup_setPositionOffset(lua_State *L) +static int _olua_fun_cocos2d_TMXObjectGroup_setPositionOffset(lua_State *L) { olua_startinvoke(L); cocos2d::TMXObjectGroup *self = nullptr; - cocos2d::Vec2 arg1; /** offset */ + cocos2d::Vec2 *arg1; /** offset */ olua_to_object(L, 1, &self, "cc.TMXObjectGroup"); olua_check_object(L, 2, &arg1, "cc.Vec2"); // void setPositionOffset(const cocos2d::Vec2 &offset) - self->setPositionOffset(arg1); + self->setPositionOffset(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_TMXObjectGroup_setProperties(lua_State *L) +static int _olua_fun_cocos2d_TMXObjectGroup_setProperties(lua_State *L) { olua_startinvoke(L); @@ -49761,31 +52556,40 @@ static int _cocos2d_TMXObjectGroup_setProperties(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_TMXObjectGroup(lua_State *L) +static int _olua_cls_cc_TMXObjectGroup(lua_State *L) { oluacls_class(L, "cc.TMXObjectGroup"); - oluacls_func(L, "getGroupName", _cocos2d_TMXObjectGroup_getGroupName); - oluacls_func(L, "getObject", _cocos2d_TMXObjectGroup_getObject); - oluacls_func(L, "getObjects", _cocos2d_TMXObjectGroup_getObjects); - oluacls_func(L, "getPositionOffset", _cocos2d_TMXObjectGroup_getPositionOffset); - oluacls_func(L, "getProperties", _cocos2d_TMXObjectGroup_getProperties); - oluacls_func(L, "getProperty", _cocos2d_TMXObjectGroup_getProperty); - oluacls_func(L, "new", _cocos2d_TMXObjectGroup_new); - oluacls_func(L, "setGroupName", _cocos2d_TMXObjectGroup_setGroupName); - oluacls_func(L, "setObjects", _cocos2d_TMXObjectGroup_setObjects); - oluacls_func(L, "setPositionOffset", _cocos2d_TMXObjectGroup_setPositionOffset); - oluacls_func(L, "setProperties", _cocos2d_TMXObjectGroup_setProperties); - oluacls_prop(L, "groupName", _cocos2d_TMXObjectGroup_getGroupName, _cocos2d_TMXObjectGroup_setGroupName); - oluacls_prop(L, "objects", _cocos2d_TMXObjectGroup_getObjects, _cocos2d_TMXObjectGroup_setObjects); - oluacls_prop(L, "positionOffset", _cocos2d_TMXObjectGroup_getPositionOffset, _cocos2d_TMXObjectGroup_setPositionOffset); - oluacls_prop(L, "properties", _cocos2d_TMXObjectGroup_getProperties, _cocos2d_TMXObjectGroup_setProperties); + oluacls_func(L, "getGroupName", _olua_fun_cocos2d_TMXObjectGroup_getGroupName); + oluacls_func(L, "getObject", _olua_fun_cocos2d_TMXObjectGroup_getObject); + oluacls_func(L, "getObjects", _olua_fun_cocos2d_TMXObjectGroup_getObjects); + oluacls_func(L, "getPositionOffset", _olua_fun_cocos2d_TMXObjectGroup_getPositionOffset); + oluacls_func(L, "getProperties", _olua_fun_cocos2d_TMXObjectGroup_getProperties); + oluacls_func(L, "getProperty", _olua_fun_cocos2d_TMXObjectGroup_getProperty); + oluacls_func(L, "new", _olua_fun_cocos2d_TMXObjectGroup_new); + oluacls_func(L, "setGroupName", _olua_fun_cocos2d_TMXObjectGroup_setGroupName); + oluacls_func(L, "setObjects", _olua_fun_cocos2d_TMXObjectGroup_setObjects); + oluacls_func(L, "setPositionOffset", _olua_fun_cocos2d_TMXObjectGroup_setPositionOffset); + oluacls_func(L, "setProperties", _olua_fun_cocos2d_TMXObjectGroup_setProperties); + oluacls_prop(L, "groupName", _olua_fun_cocos2d_TMXObjectGroup_getGroupName, _olua_fun_cocos2d_TMXObjectGroup_setGroupName); + oluacls_prop(L, "objects", _olua_fun_cocos2d_TMXObjectGroup_getObjects, _olua_fun_cocos2d_TMXObjectGroup_setObjects); + oluacls_prop(L, "positionOffset", _olua_fun_cocos2d_TMXObjectGroup_getPositionOffset, _olua_fun_cocos2d_TMXObjectGroup_setPositionOffset); + oluacls_prop(L, "properties", _olua_fun_cocos2d_TMXObjectGroup_getProperties, _olua_fun_cocos2d_TMXObjectGroup_setProperties); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_TMXObjectGroup(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.TMXObjectGroup")) { + luaL_error(L, "class not found: cocos2d::TMXObjectGroup"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_TMXLayer_create(lua_State *L) +static int _olua_fun_cocos2d_TMXLayer_create(lua_State *L) { olua_startinvoke(L); @@ -49806,7 +52610,7 @@ static int _cocos2d_TMXLayer_create(lua_State *L) return num_ret; } -static int _cocos2d_TMXLayer_getLayerName(lua_State *L) +static int _olua_fun_cocos2d_TMXLayer_getLayerName(lua_State *L) { olua_startinvoke(L); @@ -49823,7 +52627,7 @@ static int _cocos2d_TMXLayer_getLayerName(lua_State *L) return num_ret; } -static int _cocos2d_TMXLayer_getLayerOrientation(lua_State *L) +static int _olua_fun_cocos2d_TMXLayer_getLayerOrientation(lua_State *L) { olua_startinvoke(L); @@ -49840,7 +52644,7 @@ static int _cocos2d_TMXLayer_getLayerOrientation(lua_State *L) return num_ret; } -static int _cocos2d_TMXLayer_getLayerSize(lua_State *L) +static int _olua_fun_cocos2d_TMXLayer_getLayerSize(lua_State *L) { olua_startinvoke(L); @@ -49857,7 +52661,7 @@ static int _cocos2d_TMXLayer_getLayerSize(lua_State *L) return num_ret; } -static int _cocos2d_TMXLayer_getMapTileSize(lua_State *L) +static int _olua_fun_cocos2d_TMXLayer_getMapTileSize(lua_State *L) { olua_startinvoke(L); @@ -49874,26 +52678,26 @@ static int _cocos2d_TMXLayer_getMapTileSize(lua_State *L) return num_ret; } -static int _cocos2d_TMXLayer_getPositionAt(lua_State *L) +static int _olua_fun_cocos2d_TMXLayer_getPositionAt(lua_State *L) { olua_startinvoke(L); cocos2d::TMXLayer *self = nullptr; - cocos2d::Vec2 arg1; /** tileCoordinate */ + cocos2d::Vec2 *arg1; /** tileCoordinate */ olua_to_object(L, 1, &self, "cc.TMXLayer"); olua_check_object(L, 2, &arg1, "cc.Vec2"); // cocos2d::Vec2 getPositionAt(const cocos2d::Vec2 &tileCoordinate) - cocos2d::Vec2 ret = self->getPositionAt(arg1); - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec2"); + cocos2d::Vec2 ret = self->getPositionAt(*arg1); + int num_ret = olua_copy_object(L, ret, "cc.Vec2"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_TMXLayer_getProperties(lua_State *L) +static int _olua_fun_cocos2d_TMXLayer_getProperties(lua_State *L) { olua_startinvoke(L); @@ -49910,7 +52714,7 @@ static int _cocos2d_TMXLayer_getProperties(lua_State *L) return num_ret; } -static int _cocos2d_TMXLayer_getProperty(lua_State *L) +static int _olua_fun_cocos2d_TMXLayer_getProperty(lua_State *L) { olua_startinvoke(L); @@ -49929,18 +52733,18 @@ static int _cocos2d_TMXLayer_getProperty(lua_State *L) return num_ret; } -static int _cocos2d_TMXLayer_getTileAt(lua_State *L) +static int _olua_fun_cocos2d_TMXLayer_getTileAt(lua_State *L) { olua_startinvoke(L); cocos2d::TMXLayer *self = nullptr; - cocos2d::Vec2 arg1; /** tileCoordinate */ + cocos2d::Vec2 *arg1; /** tileCoordinate */ olua_to_object(L, 1, &self, "cc.TMXLayer"); olua_check_object(L, 2, &arg1, "cc.Vec2"); // cocos2d::Sprite *getTileAt(const cocos2d::Vec2 &tileCoordinate) - cocos2d::Sprite *ret = self->getTileAt(arg1); + cocos2d::Sprite *ret = self->getTileAt(*arg1); int num_ret = olua_push_object(L, ret, "cc.Sprite"); olua_endinvoke(L); @@ -49948,20 +52752,20 @@ static int _cocos2d_TMXLayer_getTileAt(lua_State *L) return num_ret; } -static int _cocos2d_TMXLayer_getTileGIDAt$1(lua_State *L) +static int _olua_fun_cocos2d_TMXLayer_getTileGIDAt$1(lua_State *L) { olua_startinvoke(L); cocos2d::TMXLayer *self = nullptr; - cocos2d::Vec2 arg1; /** tileCoordinate */ + cocos2d::Vec2 *arg1; /** tileCoordinate */ cocos2d::TMXTileFlags *arg2 = nullptr; /** flags */ olua_to_object(L, 1, &self, "cc.TMXLayer"); olua_check_object(L, 2, &arg1, "cc.Vec2"); - olua_check_pointer(L, 3, &arg2, "cc.TMXTileFlags"); + olua_check_valueptr(L, 3, &arg2, "cc.types.TMXTileFlags"); // uint32_t getTileGIDAt(const cocos2d::Vec2 &tileCoordinate, @optional cocos2d::TMXTileFlags *flags) - uint32_t ret = self->getTileGIDAt(arg1, arg2); + uint32_t ret = self->getTileGIDAt(*arg1, arg2); int num_ret = olua_push_integer(L, ret); olua_endinvoke(L); @@ -49969,18 +52773,18 @@ static int _cocos2d_TMXLayer_getTileGIDAt$1(lua_State *L) return num_ret; } -static int _cocos2d_TMXLayer_getTileGIDAt$2(lua_State *L) +static int _olua_fun_cocos2d_TMXLayer_getTileGIDAt$2(lua_State *L) { olua_startinvoke(L); cocos2d::TMXLayer *self = nullptr; - cocos2d::Vec2 arg1; /** tileCoordinate */ + cocos2d::Vec2 *arg1; /** tileCoordinate */ olua_to_object(L, 1, &self, "cc.TMXLayer"); olua_check_object(L, 2, &arg1, "cc.Vec2"); - // uint32_t getTileGIDAt(const cocos2d::Vec2 &tileCoordinate, @optional cocos2d::TMXTileFlags *flags) - uint32_t ret = self->getTileGIDAt(arg1); + // uint32_t getTileGIDAt(const cocos2d::Vec2 &tileCoordinate) + uint32_t ret = self->getTileGIDAt(*arg1); int num_ret = olua_push_integer(L, ret); olua_endinvoke(L); @@ -49988,21 +52792,21 @@ static int _cocos2d_TMXLayer_getTileGIDAt$2(lua_State *L) return num_ret; } -static int _cocos2d_TMXLayer_getTileGIDAt(lua_State *L) +static int _olua_fun_cocos2d_TMXLayer_getTileGIDAt(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_object(L, 2, "cc.Vec2"))) { - // uint32_t getTileGIDAt(const cocos2d::Vec2 &tileCoordinate, @optional cocos2d::TMXTileFlags *flags) - return _cocos2d_TMXLayer_getTileGIDAt$2(L); + // uint32_t getTileGIDAt(const cocos2d::Vec2 &tileCoordinate) + return _olua_fun_cocos2d_TMXLayer_getTileGIDAt$2(L); // } } if (num_args == 2) { - // if ((olua_is_object(L, 2, "cc.Vec2")) && (olua_is_pointer(L, 3, "cc.TMXTileFlags"))) { + // if ((olua_is_object(L, 2, "cc.Vec2")) && (olua_is_valueptr(L, 3, "cc.types.TMXTileFlags"))) { // uint32_t getTileGIDAt(const cocos2d::Vec2 &tileCoordinate, @optional cocos2d::TMXTileFlags *flags) - return _cocos2d_TMXLayer_getTileGIDAt$1(L); + return _olua_fun_cocos2d_TMXLayer_getTileGIDAt$1(L); // } } @@ -50011,7 +52815,7 @@ static int _cocos2d_TMXLayer_getTileGIDAt(lua_State *L) return 0; } -static int _cocos2d_TMXLayer_getTileSet(lua_State *L) +static int _olua_fun_cocos2d_TMXLayer_getTileSet(lua_State *L) { olua_startinvoke(L); @@ -50028,7 +52832,7 @@ static int _cocos2d_TMXLayer_getTileSet(lua_State *L) return num_ret; } -static int _cocos2d_TMXLayer_getTiles(lua_State *L) +static int _olua_fun_cocos2d_TMXLayer_getTiles(lua_State *L) { olua_startinvoke(L); @@ -50038,14 +52842,14 @@ static int _cocos2d_TMXLayer_getTiles(lua_State *L) // uint32_t *getTiles() uint32_t *ret = self->getTiles(); - int num_ret = olua_push_pointer(L, ret, "olua.uint32_t"); + int num_ret = olua_push_valueptr(L, ret, "olua.uint32"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_TMXLayer_initWithTilesetInfo(lua_State *L) +static int _olua_fun_cocos2d_TMXLayer_initWithTilesetInfo(lua_State *L) { olua_startinvoke(L); @@ -50068,11 +52872,11 @@ static int _cocos2d_TMXLayer_initWithTilesetInfo(lua_State *L) return num_ret; } -static int _cocos2d_TMXLayer_new(lua_State *L) +static int _olua_fun_cocos2d_TMXLayer_new(lua_State *L) { olua_startinvoke(L); - // TMXLayer() + // cocos2d::TMXLayer() cocos2d::TMXLayer *ret = new cocos2d::TMXLayer(); int num_ret = olua_push_object(L, ret, "cc.TMXLayer"); olua_postnew(L, ret); @@ -50082,7 +52886,7 @@ static int _cocos2d_TMXLayer_new(lua_State *L) return num_ret; } -static int _cocos2d_TMXLayer_releaseMap(lua_State *L) +static int _olua_fun_cocos2d_TMXLayer_releaseMap(lua_State *L) { olua_startinvoke(L); @@ -50098,25 +52902,25 @@ static int _cocos2d_TMXLayer_releaseMap(lua_State *L) return 0; } -static int _cocos2d_TMXLayer_removeTileAt(lua_State *L) +static int _olua_fun_cocos2d_TMXLayer_removeTileAt(lua_State *L) { olua_startinvoke(L); cocos2d::TMXLayer *self = nullptr; - cocos2d::Vec2 arg1; /** tileCoordinate */ + cocos2d::Vec2 *arg1; /** tileCoordinate */ olua_to_object(L, 1, &self, "cc.TMXLayer"); olua_check_object(L, 2, &arg1, "cc.Vec2"); // void removeTileAt(const cocos2d::Vec2 &tileCoordinate) - self->removeTileAt(arg1); + self->removeTileAt(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_TMXLayer_setLayerName(lua_State *L) +static int _olua_fun_cocos2d_TMXLayer_setLayerName(lua_State *L) { olua_startinvoke(L); @@ -50134,7 +52938,7 @@ static int _cocos2d_TMXLayer_setLayerName(lua_State *L) return 0; } -static int _cocos2d_TMXLayer_setLayerOrientation(lua_State *L) +static int _olua_fun_cocos2d_TMXLayer_setLayerOrientation(lua_State *L) { olua_startinvoke(L); @@ -50152,43 +52956,43 @@ static int _cocos2d_TMXLayer_setLayerOrientation(lua_State *L) return 0; } -static int _cocos2d_TMXLayer_setLayerSize(lua_State *L) +static int _olua_fun_cocos2d_TMXLayer_setLayerSize(lua_State *L) { olua_startinvoke(L); cocos2d::TMXLayer *self = nullptr; - cocos2d::Size arg1; /** size */ + cocos2d::Size *arg1; /** size */ olua_to_object(L, 1, &self, "cc.TMXLayer"); olua_check_object(L, 2, &arg1, "cc.Size"); // void setLayerSize(const cocos2d::Size &size) - self->setLayerSize(arg1); + self->setLayerSize(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_TMXLayer_setMapTileSize(lua_State *L) +static int _olua_fun_cocos2d_TMXLayer_setMapTileSize(lua_State *L) { olua_startinvoke(L); cocos2d::TMXLayer *self = nullptr; - cocos2d::Size arg1; /** size */ + cocos2d::Size *arg1; /** size */ olua_to_object(L, 1, &self, "cc.TMXLayer"); olua_check_object(L, 2, &arg1, "cc.Size"); // void setMapTileSize(const cocos2d::Size &size) - self->setMapTileSize(arg1); + self->setMapTileSize(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_TMXLayer_setProperties(lua_State *L) +static int _olua_fun_cocos2d_TMXLayer_setProperties(lua_State *L) { olua_startinvoke(L); @@ -50206,33 +53010,33 @@ static int _cocos2d_TMXLayer_setProperties(lua_State *L) return 0; } -static int _cocos2d_TMXLayer_setTileGID$1(lua_State *L) +static int _olua_fun_cocos2d_TMXLayer_setTileGID$1(lua_State *L) { olua_startinvoke(L); cocos2d::TMXLayer *self = nullptr; uint32_t arg1 = 0; /** gid */ - cocos2d::Vec2 arg2; /** tileCoordinate */ + cocos2d::Vec2 *arg2; /** tileCoordinate */ olua_to_object(L, 1, &self, "cc.TMXLayer"); olua_check_integer(L, 2, &arg1); olua_check_object(L, 3, &arg2, "cc.Vec2"); // void setTileGID(uint32_t gid, const cocos2d::Vec2 &tileCoordinate) - self->setTileGID(arg1, arg2); + self->setTileGID(arg1, *arg2); olua_endinvoke(L); return 0; } -static int _cocos2d_TMXLayer_setTileGID$2(lua_State *L) +static int _olua_fun_cocos2d_TMXLayer_setTileGID$2(lua_State *L) { olua_startinvoke(L); cocos2d::TMXLayer *self = nullptr; uint32_t arg1 = 0; /** gid */ - cocos2d::Vec2 arg2; /** tileCoordinate */ + cocos2d::Vec2 *arg2; /** tileCoordinate */ cocos2d::TMXTileFlags arg3 = (cocos2d::TMXTileFlags)0; /** flags */ olua_to_object(L, 1, &self, "cc.TMXLayer"); @@ -50241,28 +53045,28 @@ static int _cocos2d_TMXLayer_setTileGID$2(lua_State *L) olua_check_enum(L, 4, &arg3); // void setTileGID(uint32_t gid, const cocos2d::Vec2 &tileCoordinate, cocos2d::TMXTileFlags flags) - self->setTileGID(arg1, arg2, arg3); + self->setTileGID(arg1, *arg2, arg3); olua_endinvoke(L); return 0; } -static int _cocos2d_TMXLayer_setTileGID(lua_State *L) +static int _olua_fun_cocos2d_TMXLayer_setTileGID(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 2) { // if ((olua_is_integer(L, 2)) && (olua_is_object(L, 3, "cc.Vec2"))) { // void setTileGID(uint32_t gid, const cocos2d::Vec2 &tileCoordinate) - return _cocos2d_TMXLayer_setTileGID$1(L); + return _olua_fun_cocos2d_TMXLayer_setTileGID$1(L); // } } if (num_args == 3) { // if ((olua_is_integer(L, 2)) && (olua_is_object(L, 3, "cc.Vec2")) && (olua_is_enum(L, 4))) { // void setTileGID(uint32_t gid, const cocos2d::Vec2 &tileCoordinate, cocos2d::TMXTileFlags flags) - return _cocos2d_TMXLayer_setTileGID$2(L); + return _olua_fun_cocos2d_TMXLayer_setTileGID$2(L); // } } @@ -50271,7 +53075,7 @@ static int _cocos2d_TMXLayer_setTileGID(lua_State *L) return 0; } -static int _cocos2d_TMXLayer_setTileSet(lua_State *L) +static int _olua_fun_cocos2d_TMXLayer_setTileSet(lua_State *L) { olua_startinvoke(L); @@ -50289,7 +53093,7 @@ static int _cocos2d_TMXLayer_setTileSet(lua_State *L) return 0; } -static int _cocos2d_TMXLayer_setTiles(lua_State *L) +static int _olua_fun_cocos2d_TMXLayer_setTiles(lua_State *L) { olua_startinvoke(L); @@ -50297,7 +53101,7 @@ static int _cocos2d_TMXLayer_setTiles(lua_State *L) uint32_t *arg1 = nullptr; /** tiles */ olua_to_object(L, 1, &self, "cc.TMXLayer"); - olua_check_pointer(L, 2, &arg1, "olua.uint32_t"); + olua_check_valueptr(L, 2, &arg1, "olua.uint32"); // void setTiles(uint32_t *tiles) self->setTiles(arg1); @@ -50307,7 +53111,7 @@ static int _cocos2d_TMXLayer_setTiles(lua_State *L) return 0; } -static int _cocos2d_TMXLayer_setupTiles(lua_State *L) +static int _olua_fun_cocos2d_TMXLayer_setupTiles(lua_State *L) { olua_startinvoke(L); @@ -50323,48 +53127,57 @@ static int _cocos2d_TMXLayer_setupTiles(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_TMXLayer(lua_State *L) +static int _olua_cls_cc_TMXLayer(lua_State *L) { oluacls_class(L, "cc.TMXLayer"); - oluacls_func(L, "create", _cocos2d_TMXLayer_create); - oluacls_func(L, "getLayerName", _cocos2d_TMXLayer_getLayerName); - oluacls_func(L, "getLayerOrientation", _cocos2d_TMXLayer_getLayerOrientation); - oluacls_func(L, "getLayerSize", _cocos2d_TMXLayer_getLayerSize); - oluacls_func(L, "getMapTileSize", _cocos2d_TMXLayer_getMapTileSize); - oluacls_func(L, "getPositionAt", _cocos2d_TMXLayer_getPositionAt); - oluacls_func(L, "getProperties", _cocos2d_TMXLayer_getProperties); - oluacls_func(L, "getProperty", _cocos2d_TMXLayer_getProperty); - oluacls_func(L, "getTileAt", _cocos2d_TMXLayer_getTileAt); - oluacls_func(L, "getTileGIDAt", _cocos2d_TMXLayer_getTileGIDAt); - oluacls_func(L, "getTileSet", _cocos2d_TMXLayer_getTileSet); - oluacls_func(L, "getTiles", _cocos2d_TMXLayer_getTiles); - oluacls_func(L, "initWithTilesetInfo", _cocos2d_TMXLayer_initWithTilesetInfo); - oluacls_func(L, "new", _cocos2d_TMXLayer_new); - oluacls_func(L, "releaseMap", _cocos2d_TMXLayer_releaseMap); - oluacls_func(L, "removeTileAt", _cocos2d_TMXLayer_removeTileAt); - oluacls_func(L, "setLayerName", _cocos2d_TMXLayer_setLayerName); - oluacls_func(L, "setLayerOrientation", _cocos2d_TMXLayer_setLayerOrientation); - oluacls_func(L, "setLayerSize", _cocos2d_TMXLayer_setLayerSize); - oluacls_func(L, "setMapTileSize", _cocos2d_TMXLayer_setMapTileSize); - oluacls_func(L, "setProperties", _cocos2d_TMXLayer_setProperties); - oluacls_func(L, "setTileGID", _cocos2d_TMXLayer_setTileGID); - oluacls_func(L, "setTileSet", _cocos2d_TMXLayer_setTileSet); - oluacls_func(L, "setTiles", _cocos2d_TMXLayer_setTiles); - oluacls_func(L, "setupTiles", _cocos2d_TMXLayer_setupTiles); - oluacls_prop(L, "layerName", _cocos2d_TMXLayer_getLayerName, _cocos2d_TMXLayer_setLayerName); - oluacls_prop(L, "layerOrientation", _cocos2d_TMXLayer_getLayerOrientation, _cocos2d_TMXLayer_setLayerOrientation); - oluacls_prop(L, "layerSize", _cocos2d_TMXLayer_getLayerSize, _cocos2d_TMXLayer_setLayerSize); - oluacls_prop(L, "mapTileSize", _cocos2d_TMXLayer_getMapTileSize, _cocos2d_TMXLayer_setMapTileSize); - oluacls_prop(L, "properties", _cocos2d_TMXLayer_getProperties, _cocos2d_TMXLayer_setProperties); - oluacls_prop(L, "tileSet", _cocos2d_TMXLayer_getTileSet, _cocos2d_TMXLayer_setTileSet); - oluacls_prop(L, "tiles", _cocos2d_TMXLayer_getTiles, _cocos2d_TMXLayer_setTiles); + oluacls_func(L, "create", _olua_fun_cocos2d_TMXLayer_create); + oluacls_func(L, "getLayerName", _olua_fun_cocos2d_TMXLayer_getLayerName); + oluacls_func(L, "getLayerOrientation", _olua_fun_cocos2d_TMXLayer_getLayerOrientation); + oluacls_func(L, "getLayerSize", _olua_fun_cocos2d_TMXLayer_getLayerSize); + oluacls_func(L, "getMapTileSize", _olua_fun_cocos2d_TMXLayer_getMapTileSize); + oluacls_func(L, "getPositionAt", _olua_fun_cocos2d_TMXLayer_getPositionAt); + oluacls_func(L, "getProperties", _olua_fun_cocos2d_TMXLayer_getProperties); + oluacls_func(L, "getProperty", _olua_fun_cocos2d_TMXLayer_getProperty); + oluacls_func(L, "getTileAt", _olua_fun_cocos2d_TMXLayer_getTileAt); + oluacls_func(L, "getTileGIDAt", _olua_fun_cocos2d_TMXLayer_getTileGIDAt); + oluacls_func(L, "getTileSet", _olua_fun_cocos2d_TMXLayer_getTileSet); + oluacls_func(L, "getTiles", _olua_fun_cocos2d_TMXLayer_getTiles); + oluacls_func(L, "initWithTilesetInfo", _olua_fun_cocos2d_TMXLayer_initWithTilesetInfo); + oluacls_func(L, "new", _olua_fun_cocos2d_TMXLayer_new); + oluacls_func(L, "releaseMap", _olua_fun_cocos2d_TMXLayer_releaseMap); + oluacls_func(L, "removeTileAt", _olua_fun_cocos2d_TMXLayer_removeTileAt); + oluacls_func(L, "setLayerName", _olua_fun_cocos2d_TMXLayer_setLayerName); + oluacls_func(L, "setLayerOrientation", _olua_fun_cocos2d_TMXLayer_setLayerOrientation); + oluacls_func(L, "setLayerSize", _olua_fun_cocos2d_TMXLayer_setLayerSize); + oluacls_func(L, "setMapTileSize", _olua_fun_cocos2d_TMXLayer_setMapTileSize); + oluacls_func(L, "setProperties", _olua_fun_cocos2d_TMXLayer_setProperties); + oluacls_func(L, "setTileGID", _olua_fun_cocos2d_TMXLayer_setTileGID); + oluacls_func(L, "setTileSet", _olua_fun_cocos2d_TMXLayer_setTileSet); + oluacls_func(L, "setTiles", _olua_fun_cocos2d_TMXLayer_setTiles); + oluacls_func(L, "setupTiles", _olua_fun_cocos2d_TMXLayer_setupTiles); + oluacls_prop(L, "layerName", _olua_fun_cocos2d_TMXLayer_getLayerName, _olua_fun_cocos2d_TMXLayer_setLayerName); + oluacls_prop(L, "layerOrientation", _olua_fun_cocos2d_TMXLayer_getLayerOrientation, _olua_fun_cocos2d_TMXLayer_setLayerOrientation); + oluacls_prop(L, "layerSize", _olua_fun_cocos2d_TMXLayer_getLayerSize, _olua_fun_cocos2d_TMXLayer_setLayerSize); + oluacls_prop(L, "mapTileSize", _olua_fun_cocos2d_TMXLayer_getMapTileSize, _olua_fun_cocos2d_TMXLayer_setMapTileSize); + oluacls_prop(L, "properties", _olua_fun_cocos2d_TMXLayer_getProperties, _olua_fun_cocos2d_TMXLayer_setProperties); + oluacls_prop(L, "tileSet", _olua_fun_cocos2d_TMXLayer_getTileSet, _olua_fun_cocos2d_TMXLayer_setTileSet); + oluacls_prop(L, "tiles", _olua_fun_cocos2d_TMXLayer_getTiles, _olua_fun_cocos2d_TMXLayer_setTiles); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_TMXLayer(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.TMXLayer")) { + luaL_error(L, "class not found: cocos2d::TMXLayer"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_TMXLayerInfo_getProperties(lua_State *L) +static int _olua_fun_cocos2d_TMXLayerInfo_getProperties(lua_State *L) { olua_startinvoke(L); @@ -50374,18 +53187,18 @@ static int _cocos2d_TMXLayerInfo_getProperties(lua_State *L) // cocos2d::ValueMap &getProperties() cocos2d::ValueMap &ret = self->getProperties(); - int num_ret = olua_push_pointer(L, &ret, "cc.ValueMap"); + int num_ret = olua_push_valueptr(L, &ret, "cc.types.ValueMap"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_TMXLayerInfo_new(lua_State *L) +static int _olua_fun_cocos2d_TMXLayerInfo_new(lua_State *L) { olua_startinvoke(L); - // TMXLayerInfo() + // cocos2d::TMXLayerInfo() cocos2d::TMXLayerInfo *ret = new cocos2d::TMXLayerInfo(); int num_ret = olua_push_object(L, ret, "cc.TMXLayerInfo"); olua_postnew(L, ret); @@ -50395,7 +53208,7 @@ static int _cocos2d_TMXLayerInfo_new(lua_State *L) return num_ret; } -static int _cocos2d_TMXLayerInfo_setProperties(lua_State *L) +static int _olua_fun_cocos2d_TMXLayerInfo_setProperties(lua_State *L) { olua_startinvoke(L); @@ -50413,20 +53226,29 @@ static int _cocos2d_TMXLayerInfo_setProperties(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_TMXLayerInfo(lua_State *L) +static int _olua_cls_cc_TMXLayerInfo(lua_State *L) { oluacls_class(L, "cc.TMXLayerInfo"); - oluacls_func(L, "getProperties", _cocos2d_TMXLayerInfo_getProperties); - oluacls_func(L, "new", _cocos2d_TMXLayerInfo_new); - oluacls_func(L, "setProperties", _cocos2d_TMXLayerInfo_setProperties); - oluacls_prop(L, "properties", _cocos2d_TMXLayerInfo_getProperties, _cocos2d_TMXLayerInfo_setProperties); + oluacls_func(L, "getProperties", _olua_fun_cocos2d_TMXLayerInfo_getProperties); + oluacls_func(L, "new", _olua_fun_cocos2d_TMXLayerInfo_new); + oluacls_func(L, "setProperties", _olua_fun_cocos2d_TMXLayerInfo_setProperties); + oluacls_prop(L, "properties", _olua_fun_cocos2d_TMXLayerInfo_getProperties, _olua_fun_cocos2d_TMXLayerInfo_setProperties); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_TMXLayerInfo(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.TMXLayerInfo")) { + luaL_error(L, "class not found: cocos2d::TMXLayerInfo"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_TMXMapInfo_as(lua_State *L) +static int _olua_fun_cocos2d_TMXMapInfo_as(lua_State *L) { olua_startinvoke(L); @@ -50454,7 +53276,7 @@ static int _cocos2d_TMXMapInfo_as(lua_State *L) return 1; } -static int _cocos2d_TMXMapInfo_create(lua_State *L) +static int _olua_fun_cocos2d_TMXMapInfo_create(lua_State *L) { olua_startinvoke(L); @@ -50471,7 +53293,7 @@ static int _cocos2d_TMXMapInfo_create(lua_State *L) return num_ret; } -static int _cocos2d_TMXMapInfo_createWithXML(lua_State *L) +static int _olua_fun_cocos2d_TMXMapInfo_createWithXML(lua_State *L) { olua_startinvoke(L); @@ -50490,7 +53312,7 @@ static int _cocos2d_TMXMapInfo_createWithXML(lua_State *L) return num_ret; } -static int _cocos2d_TMXMapInfo_endElement(lua_State *L) +static int _olua_fun_cocos2d_TMXMapInfo_endElement(lua_State *L) { olua_startinvoke(L); @@ -50510,7 +53332,7 @@ static int _cocos2d_TMXMapInfo_endElement(lua_State *L) return 0; } -static int _cocos2d_TMXMapInfo_getCurrentString(lua_State *L) +static int _olua_fun_cocos2d_TMXMapInfo_getCurrentString(lua_State *L) { olua_startinvoke(L); @@ -50527,7 +53349,7 @@ static int _cocos2d_TMXMapInfo_getCurrentString(lua_State *L) return num_ret; } -static int _cocos2d_TMXMapInfo_getExternalTilesetFileName(lua_State *L) +static int _olua_fun_cocos2d_TMXMapInfo_getExternalTilesetFileName(lua_State *L) { olua_startinvoke(L); @@ -50544,7 +53366,7 @@ static int _cocos2d_TMXMapInfo_getExternalTilesetFileName(lua_State *L) return num_ret; } -static int _cocos2d_TMXMapInfo_getHexSideLength(lua_State *L) +static int _olua_fun_cocos2d_TMXMapInfo_getHexSideLength(lua_State *L) { olua_startinvoke(L); @@ -50561,7 +53383,7 @@ static int _cocos2d_TMXMapInfo_getHexSideLength(lua_State *L) return num_ret; } -static int _cocos2d_TMXMapInfo_getLayerAttribs(lua_State *L) +static int _olua_fun_cocos2d_TMXMapInfo_getLayerAttribs(lua_State *L) { olua_startinvoke(L); @@ -50578,7 +53400,7 @@ static int _cocos2d_TMXMapInfo_getLayerAttribs(lua_State *L) return num_ret; } -static int _cocos2d_TMXMapInfo_getLayers(lua_State *L) +static int _olua_fun_cocos2d_TMXMapInfo_getLayers(lua_State *L) { olua_startinvoke(L); @@ -50597,7 +53419,7 @@ static int _cocos2d_TMXMapInfo_getLayers(lua_State *L) return num_ret; } -static int _cocos2d_TMXMapInfo_getMapSize(lua_State *L) +static int _olua_fun_cocos2d_TMXMapInfo_getMapSize(lua_State *L) { olua_startinvoke(L); @@ -50614,7 +53436,7 @@ static int _cocos2d_TMXMapInfo_getMapSize(lua_State *L) return num_ret; } -static int _cocos2d_TMXMapInfo_getObjectGroups(lua_State *L) +static int _olua_fun_cocos2d_TMXMapInfo_getObjectGroups(lua_State *L) { olua_startinvoke(L); @@ -50633,7 +53455,7 @@ static int _cocos2d_TMXMapInfo_getObjectGroups(lua_State *L) return num_ret; } -static int _cocos2d_TMXMapInfo_getOrientation(lua_State *L) +static int _olua_fun_cocos2d_TMXMapInfo_getOrientation(lua_State *L) { olua_startinvoke(L); @@ -50650,7 +53472,7 @@ static int _cocos2d_TMXMapInfo_getOrientation(lua_State *L) return num_ret; } -static int _cocos2d_TMXMapInfo_getParentElement(lua_State *L) +static int _olua_fun_cocos2d_TMXMapInfo_getParentElement(lua_State *L) { olua_startinvoke(L); @@ -50667,7 +53489,7 @@ static int _cocos2d_TMXMapInfo_getParentElement(lua_State *L) return num_ret; } -static int _cocos2d_TMXMapInfo_getParentGID(lua_State *L) +static int _olua_fun_cocos2d_TMXMapInfo_getParentGID(lua_State *L) { olua_startinvoke(L); @@ -50684,7 +53506,7 @@ static int _cocos2d_TMXMapInfo_getParentGID(lua_State *L) return num_ret; } -static int _cocos2d_TMXMapInfo_getProperties(lua_State *L) +static int _olua_fun_cocos2d_TMXMapInfo_getProperties(lua_State *L) { olua_startinvoke(L); @@ -50701,7 +53523,7 @@ static int _cocos2d_TMXMapInfo_getProperties(lua_State *L) return num_ret; } -static int _cocos2d_TMXMapInfo_getStaggerAxis(lua_State *L) +static int _olua_fun_cocos2d_TMXMapInfo_getStaggerAxis(lua_State *L) { olua_startinvoke(L); @@ -50718,7 +53540,7 @@ static int _cocos2d_TMXMapInfo_getStaggerAxis(lua_State *L) return num_ret; } -static int _cocos2d_TMXMapInfo_getStaggerIndex(lua_State *L) +static int _olua_fun_cocos2d_TMXMapInfo_getStaggerIndex(lua_State *L) { olua_startinvoke(L); @@ -50735,7 +53557,7 @@ static int _cocos2d_TMXMapInfo_getStaggerIndex(lua_State *L) return num_ret; } -static int _cocos2d_TMXMapInfo_getTMXFileName(lua_State *L) +static int _olua_fun_cocos2d_TMXMapInfo_getTMXFileName(lua_State *L) { olua_startinvoke(L); @@ -50752,7 +53574,7 @@ static int _cocos2d_TMXMapInfo_getTMXFileName(lua_State *L) return num_ret; } -static int _cocos2d_TMXMapInfo_getTileProperties(lua_State *L) +static int _olua_fun_cocos2d_TMXMapInfo_getTileProperties(lua_State *L) { olua_startinvoke(L); @@ -50769,7 +53591,7 @@ static int _cocos2d_TMXMapInfo_getTileProperties(lua_State *L) return num_ret; } -static int _cocos2d_TMXMapInfo_getTileSize(lua_State *L) +static int _olua_fun_cocos2d_TMXMapInfo_getTileSize(lua_State *L) { olua_startinvoke(L); @@ -50786,7 +53608,7 @@ static int _cocos2d_TMXMapInfo_getTileSize(lua_State *L) return num_ret; } -static int _cocos2d_TMXMapInfo_getTilesets(lua_State *L) +static int _olua_fun_cocos2d_TMXMapInfo_getTilesets(lua_State *L) { olua_startinvoke(L); @@ -50805,7 +53627,7 @@ static int _cocos2d_TMXMapInfo_getTilesets(lua_State *L) return num_ret; } -static int _cocos2d_TMXMapInfo_initWithTMXFile(lua_State *L) +static int _olua_fun_cocos2d_TMXMapInfo_initWithTMXFile(lua_State *L) { olua_startinvoke(L); @@ -50824,7 +53646,7 @@ static int _cocos2d_TMXMapInfo_initWithTMXFile(lua_State *L) return num_ret; } -static int _cocos2d_TMXMapInfo_initWithXML(lua_State *L) +static int _olua_fun_cocos2d_TMXMapInfo_initWithXML(lua_State *L) { olua_startinvoke(L); @@ -50845,7 +53667,7 @@ static int _cocos2d_TMXMapInfo_initWithXML(lua_State *L) return num_ret; } -static int _cocos2d_TMXMapInfo_isStoringCharacters(lua_State *L) +static int _olua_fun_cocos2d_TMXMapInfo_isStoringCharacters(lua_State *L) { olua_startinvoke(L); @@ -50862,11 +53684,11 @@ static int _cocos2d_TMXMapInfo_isStoringCharacters(lua_State *L) return num_ret; } -static int _cocos2d_TMXMapInfo_new(lua_State *L) +static int _olua_fun_cocos2d_TMXMapInfo_new(lua_State *L) { olua_startinvoke(L); - // TMXMapInfo() + // cocos2d::TMXMapInfo() cocos2d::TMXMapInfo *ret = new cocos2d::TMXMapInfo(); int num_ret = olua_push_object(L, ret, "cc.TMXMapInfo"); olua_postnew(L, ret); @@ -50876,7 +53698,7 @@ static int _cocos2d_TMXMapInfo_new(lua_State *L) return num_ret; } -static int _cocos2d_TMXMapInfo_parseXMLFile(lua_State *L) +static int _olua_fun_cocos2d_TMXMapInfo_parseXMLFile(lua_State *L) { olua_startinvoke(L); @@ -50895,7 +53717,7 @@ static int _cocos2d_TMXMapInfo_parseXMLFile(lua_State *L) return num_ret; } -static int _cocos2d_TMXMapInfo_parseXMLString(lua_State *L) +static int _olua_fun_cocos2d_TMXMapInfo_parseXMLString(lua_State *L) { olua_startinvoke(L); @@ -50914,7 +53736,7 @@ static int _cocos2d_TMXMapInfo_parseXMLString(lua_State *L) return num_ret; } -static int _cocos2d_TMXMapInfo_setCurrentString(lua_State *L) +static int _olua_fun_cocos2d_TMXMapInfo_setCurrentString(lua_State *L) { olua_startinvoke(L); @@ -50932,7 +53754,7 @@ static int _cocos2d_TMXMapInfo_setCurrentString(lua_State *L) return 0; } -static int _cocos2d_TMXMapInfo_setHexSideLength(lua_State *L) +static int _olua_fun_cocos2d_TMXMapInfo_setHexSideLength(lua_State *L) { olua_startinvoke(L); @@ -50950,7 +53772,7 @@ static int _cocos2d_TMXMapInfo_setHexSideLength(lua_State *L) return 0; } -static int _cocos2d_TMXMapInfo_setLayerAttribs(lua_State *L) +static int _olua_fun_cocos2d_TMXMapInfo_setLayerAttribs(lua_State *L) { olua_startinvoke(L); @@ -50968,7 +53790,7 @@ static int _cocos2d_TMXMapInfo_setLayerAttribs(lua_State *L) return 0; } -static int _cocos2d_TMXMapInfo_setLayers(lua_State *L) +static int _olua_fun_cocos2d_TMXMapInfo_setLayers(lua_State *L) { olua_startinvoke(L); @@ -50988,25 +53810,25 @@ static int _cocos2d_TMXMapInfo_setLayers(lua_State *L) return 0; } -static int _cocos2d_TMXMapInfo_setMapSize(lua_State *L) +static int _olua_fun_cocos2d_TMXMapInfo_setMapSize(lua_State *L) { olua_startinvoke(L); cocos2d::TMXMapInfo *self = nullptr; - cocos2d::Size arg1; /** mapSize */ + cocos2d::Size *arg1; /** mapSize */ olua_to_object(L, 1, &self, "cc.TMXMapInfo"); olua_check_object(L, 2, &arg1, "cc.Size"); // void setMapSize(const cocos2d::Size &mapSize) - self->setMapSize(arg1); + self->setMapSize(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_TMXMapInfo_setObjectGroups(lua_State *L) +static int _olua_fun_cocos2d_TMXMapInfo_setObjectGroups(lua_State *L) { olua_startinvoke(L); @@ -51026,7 +53848,7 @@ static int _cocos2d_TMXMapInfo_setObjectGroups(lua_State *L) return 0; } -static int _cocos2d_TMXMapInfo_setOrientation(lua_State *L) +static int _olua_fun_cocos2d_TMXMapInfo_setOrientation(lua_State *L) { olua_startinvoke(L); @@ -51044,7 +53866,7 @@ static int _cocos2d_TMXMapInfo_setOrientation(lua_State *L) return 0; } -static int _cocos2d_TMXMapInfo_setParentElement(lua_State *L) +static int _olua_fun_cocos2d_TMXMapInfo_setParentElement(lua_State *L) { olua_startinvoke(L); @@ -51062,7 +53884,7 @@ static int _cocos2d_TMXMapInfo_setParentElement(lua_State *L) return 0; } -static int _cocos2d_TMXMapInfo_setParentGID(lua_State *L) +static int _olua_fun_cocos2d_TMXMapInfo_setParentGID(lua_State *L) { olua_startinvoke(L); @@ -51080,7 +53902,7 @@ static int _cocos2d_TMXMapInfo_setParentGID(lua_State *L) return 0; } -static int _cocos2d_TMXMapInfo_setProperties(lua_State *L) +static int _olua_fun_cocos2d_TMXMapInfo_setProperties(lua_State *L) { olua_startinvoke(L); @@ -51098,7 +53920,7 @@ static int _cocos2d_TMXMapInfo_setProperties(lua_State *L) return 0; } -static int _cocos2d_TMXMapInfo_setStaggerAxis(lua_State *L) +static int _olua_fun_cocos2d_TMXMapInfo_setStaggerAxis(lua_State *L) { olua_startinvoke(L); @@ -51116,7 +53938,7 @@ static int _cocos2d_TMXMapInfo_setStaggerAxis(lua_State *L) return 0; } -static int _cocos2d_TMXMapInfo_setStaggerIndex(lua_State *L) +static int _olua_fun_cocos2d_TMXMapInfo_setStaggerIndex(lua_State *L) { olua_startinvoke(L); @@ -51134,7 +53956,7 @@ static int _cocos2d_TMXMapInfo_setStaggerIndex(lua_State *L) return 0; } -static int _cocos2d_TMXMapInfo_setStoringCharacters(lua_State *L) +static int _olua_fun_cocos2d_TMXMapInfo_setStoringCharacters(lua_State *L) { olua_startinvoke(L); @@ -51152,7 +53974,7 @@ static int _cocos2d_TMXMapInfo_setStoringCharacters(lua_State *L) return 0; } -static int _cocos2d_TMXMapInfo_setTMXFileName(lua_State *L) +static int _olua_fun_cocos2d_TMXMapInfo_setTMXFileName(lua_State *L) { olua_startinvoke(L); @@ -51170,7 +53992,7 @@ static int _cocos2d_TMXMapInfo_setTMXFileName(lua_State *L) return 0; } -static int _cocos2d_TMXMapInfo_setTileProperties(lua_State *L) +static int _olua_fun_cocos2d_TMXMapInfo_setTileProperties(lua_State *L) { olua_startinvoke(L); @@ -51188,25 +54010,25 @@ static int _cocos2d_TMXMapInfo_setTileProperties(lua_State *L) return 0; } -static int _cocos2d_TMXMapInfo_setTileSize(lua_State *L) +static int _olua_fun_cocos2d_TMXMapInfo_setTileSize(lua_State *L) { olua_startinvoke(L); cocos2d::TMXMapInfo *self = nullptr; - cocos2d::Size arg1; /** tileSize */ + cocos2d::Size *arg1; /** tileSize */ olua_to_object(L, 1, &self, "cc.TMXMapInfo"); olua_check_object(L, 2, &arg1, "cc.Size"); // void setTileSize(const cocos2d::Size &tileSize) - self->setTileSize(arg1); + self->setTileSize(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_TMXMapInfo_setTilesets(lua_State *L) +static int _olua_fun_cocos2d_TMXMapInfo_setTilesets(lua_State *L) { olua_startinvoke(L); @@ -51226,7 +54048,7 @@ static int _cocos2d_TMXMapInfo_setTilesets(lua_State *L) return 0; } -static int _cocos2d_TMXMapInfo_textHandler(lua_State *L) +static int _olua_fun_cocos2d_TMXMapInfo_textHandler(lua_State *L) { olua_startinvoke(L); @@ -51248,79 +54070,88 @@ static int _cocos2d_TMXMapInfo_textHandler(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_TMXMapInfo(lua_State *L) +static int _olua_cls_cc_TMXMapInfo(lua_State *L) { oluacls_class(L, "cc.TMXMapInfo"); - oluacls_func(L, "as", _cocos2d_TMXMapInfo_as); - oluacls_func(L, "create", _cocos2d_TMXMapInfo_create); - oluacls_func(L, "createWithXML", _cocos2d_TMXMapInfo_createWithXML); - oluacls_func(L, "endElement", _cocos2d_TMXMapInfo_endElement); - oluacls_func(L, "getCurrentString", _cocos2d_TMXMapInfo_getCurrentString); - oluacls_func(L, "getExternalTilesetFileName", _cocos2d_TMXMapInfo_getExternalTilesetFileName); - oluacls_func(L, "getHexSideLength", _cocos2d_TMXMapInfo_getHexSideLength); - oluacls_func(L, "getLayerAttribs", _cocos2d_TMXMapInfo_getLayerAttribs); - oluacls_func(L, "getLayers", _cocos2d_TMXMapInfo_getLayers); - oluacls_func(L, "getMapSize", _cocos2d_TMXMapInfo_getMapSize); - oluacls_func(L, "getObjectGroups", _cocos2d_TMXMapInfo_getObjectGroups); - oluacls_func(L, "getOrientation", _cocos2d_TMXMapInfo_getOrientation); - oluacls_func(L, "getParentElement", _cocos2d_TMXMapInfo_getParentElement); - oluacls_func(L, "getParentGID", _cocos2d_TMXMapInfo_getParentGID); - oluacls_func(L, "getProperties", _cocos2d_TMXMapInfo_getProperties); - oluacls_func(L, "getStaggerAxis", _cocos2d_TMXMapInfo_getStaggerAxis); - oluacls_func(L, "getStaggerIndex", _cocos2d_TMXMapInfo_getStaggerIndex); - oluacls_func(L, "getTMXFileName", _cocos2d_TMXMapInfo_getTMXFileName); - oluacls_func(L, "getTileProperties", _cocos2d_TMXMapInfo_getTileProperties); - oluacls_func(L, "getTileSize", _cocos2d_TMXMapInfo_getTileSize); - oluacls_func(L, "getTilesets", _cocos2d_TMXMapInfo_getTilesets); - oluacls_func(L, "initWithTMXFile", _cocos2d_TMXMapInfo_initWithTMXFile); - oluacls_func(L, "initWithXML", _cocos2d_TMXMapInfo_initWithXML); - oluacls_func(L, "isStoringCharacters", _cocos2d_TMXMapInfo_isStoringCharacters); - oluacls_func(L, "new", _cocos2d_TMXMapInfo_new); - oluacls_func(L, "parseXMLFile", _cocos2d_TMXMapInfo_parseXMLFile); - oluacls_func(L, "parseXMLString", _cocos2d_TMXMapInfo_parseXMLString); - oluacls_func(L, "setCurrentString", _cocos2d_TMXMapInfo_setCurrentString); - oluacls_func(L, "setHexSideLength", _cocos2d_TMXMapInfo_setHexSideLength); - oluacls_func(L, "setLayerAttribs", _cocos2d_TMXMapInfo_setLayerAttribs); - oluacls_func(L, "setLayers", _cocos2d_TMXMapInfo_setLayers); - oluacls_func(L, "setMapSize", _cocos2d_TMXMapInfo_setMapSize); - oluacls_func(L, "setObjectGroups", _cocos2d_TMXMapInfo_setObjectGroups); - oluacls_func(L, "setOrientation", _cocos2d_TMXMapInfo_setOrientation); - oluacls_func(L, "setParentElement", _cocos2d_TMXMapInfo_setParentElement); - oluacls_func(L, "setParentGID", _cocos2d_TMXMapInfo_setParentGID); - oluacls_func(L, "setProperties", _cocos2d_TMXMapInfo_setProperties); - oluacls_func(L, "setStaggerAxis", _cocos2d_TMXMapInfo_setStaggerAxis); - oluacls_func(L, "setStaggerIndex", _cocos2d_TMXMapInfo_setStaggerIndex); - oluacls_func(L, "setStoringCharacters", _cocos2d_TMXMapInfo_setStoringCharacters); - oluacls_func(L, "setTMXFileName", _cocos2d_TMXMapInfo_setTMXFileName); - oluacls_func(L, "setTileProperties", _cocos2d_TMXMapInfo_setTileProperties); - oluacls_func(L, "setTileSize", _cocos2d_TMXMapInfo_setTileSize); - oluacls_func(L, "setTilesets", _cocos2d_TMXMapInfo_setTilesets); - oluacls_func(L, "textHandler", _cocos2d_TMXMapInfo_textHandler); - oluacls_prop(L, "currentString", _cocos2d_TMXMapInfo_getCurrentString, _cocos2d_TMXMapInfo_setCurrentString); - oluacls_prop(L, "externalTilesetFileName", _cocos2d_TMXMapInfo_getExternalTilesetFileName, nullptr); - oluacls_prop(L, "hexSideLength", _cocos2d_TMXMapInfo_getHexSideLength, _cocos2d_TMXMapInfo_setHexSideLength); - oluacls_prop(L, "layerAttribs", _cocos2d_TMXMapInfo_getLayerAttribs, _cocos2d_TMXMapInfo_setLayerAttribs); - oluacls_prop(L, "layers", _cocos2d_TMXMapInfo_getLayers, _cocos2d_TMXMapInfo_setLayers); - oluacls_prop(L, "mapSize", _cocos2d_TMXMapInfo_getMapSize, _cocos2d_TMXMapInfo_setMapSize); - oluacls_prop(L, "objectGroups", _cocos2d_TMXMapInfo_getObjectGroups, _cocos2d_TMXMapInfo_setObjectGroups); - oluacls_prop(L, "orientation", _cocos2d_TMXMapInfo_getOrientation, _cocos2d_TMXMapInfo_setOrientation); - oluacls_prop(L, "parentElement", _cocos2d_TMXMapInfo_getParentElement, _cocos2d_TMXMapInfo_setParentElement); - oluacls_prop(L, "parentGID", _cocos2d_TMXMapInfo_getParentGID, _cocos2d_TMXMapInfo_setParentGID); - oluacls_prop(L, "properties", _cocos2d_TMXMapInfo_getProperties, _cocos2d_TMXMapInfo_setProperties); - oluacls_prop(L, "staggerAxis", _cocos2d_TMXMapInfo_getStaggerAxis, _cocos2d_TMXMapInfo_setStaggerAxis); - oluacls_prop(L, "staggerIndex", _cocos2d_TMXMapInfo_getStaggerIndex, _cocos2d_TMXMapInfo_setStaggerIndex); - oluacls_prop(L, "storingCharacters", _cocos2d_TMXMapInfo_isStoringCharacters, _cocos2d_TMXMapInfo_setStoringCharacters); - oluacls_prop(L, "tileProperties", _cocos2d_TMXMapInfo_getTileProperties, _cocos2d_TMXMapInfo_setTileProperties); - oluacls_prop(L, "tileSize", _cocos2d_TMXMapInfo_getTileSize, _cocos2d_TMXMapInfo_setTileSize); - oluacls_prop(L, "tilesets", _cocos2d_TMXMapInfo_getTilesets, _cocos2d_TMXMapInfo_setTilesets); - oluacls_prop(L, "tmxFileName", _cocos2d_TMXMapInfo_getTMXFileName, _cocos2d_TMXMapInfo_setTMXFileName); + oluacls_func(L, "as", _olua_fun_cocos2d_TMXMapInfo_as); + oluacls_func(L, "create", _olua_fun_cocos2d_TMXMapInfo_create); + oluacls_func(L, "createWithXML", _olua_fun_cocos2d_TMXMapInfo_createWithXML); + oluacls_func(L, "endElement", _olua_fun_cocos2d_TMXMapInfo_endElement); + oluacls_func(L, "getCurrentString", _olua_fun_cocos2d_TMXMapInfo_getCurrentString); + oluacls_func(L, "getExternalTilesetFileName", _olua_fun_cocos2d_TMXMapInfo_getExternalTilesetFileName); + oluacls_func(L, "getHexSideLength", _olua_fun_cocos2d_TMXMapInfo_getHexSideLength); + oluacls_func(L, "getLayerAttribs", _olua_fun_cocos2d_TMXMapInfo_getLayerAttribs); + oluacls_func(L, "getLayers", _olua_fun_cocos2d_TMXMapInfo_getLayers); + oluacls_func(L, "getMapSize", _olua_fun_cocos2d_TMXMapInfo_getMapSize); + oluacls_func(L, "getObjectGroups", _olua_fun_cocos2d_TMXMapInfo_getObjectGroups); + oluacls_func(L, "getOrientation", _olua_fun_cocos2d_TMXMapInfo_getOrientation); + oluacls_func(L, "getParentElement", _olua_fun_cocos2d_TMXMapInfo_getParentElement); + oluacls_func(L, "getParentGID", _olua_fun_cocos2d_TMXMapInfo_getParentGID); + oluacls_func(L, "getProperties", _olua_fun_cocos2d_TMXMapInfo_getProperties); + oluacls_func(L, "getStaggerAxis", _olua_fun_cocos2d_TMXMapInfo_getStaggerAxis); + oluacls_func(L, "getStaggerIndex", _olua_fun_cocos2d_TMXMapInfo_getStaggerIndex); + oluacls_func(L, "getTMXFileName", _olua_fun_cocos2d_TMXMapInfo_getTMXFileName); + oluacls_func(L, "getTileProperties", _olua_fun_cocos2d_TMXMapInfo_getTileProperties); + oluacls_func(L, "getTileSize", _olua_fun_cocos2d_TMXMapInfo_getTileSize); + oluacls_func(L, "getTilesets", _olua_fun_cocos2d_TMXMapInfo_getTilesets); + oluacls_func(L, "initWithTMXFile", _olua_fun_cocos2d_TMXMapInfo_initWithTMXFile); + oluacls_func(L, "initWithXML", _olua_fun_cocos2d_TMXMapInfo_initWithXML); + oluacls_func(L, "isStoringCharacters", _olua_fun_cocos2d_TMXMapInfo_isStoringCharacters); + oluacls_func(L, "new", _olua_fun_cocos2d_TMXMapInfo_new); + oluacls_func(L, "parseXMLFile", _olua_fun_cocos2d_TMXMapInfo_parseXMLFile); + oluacls_func(L, "parseXMLString", _olua_fun_cocos2d_TMXMapInfo_parseXMLString); + oluacls_func(L, "setCurrentString", _olua_fun_cocos2d_TMXMapInfo_setCurrentString); + oluacls_func(L, "setHexSideLength", _olua_fun_cocos2d_TMXMapInfo_setHexSideLength); + oluacls_func(L, "setLayerAttribs", _olua_fun_cocos2d_TMXMapInfo_setLayerAttribs); + oluacls_func(L, "setLayers", _olua_fun_cocos2d_TMXMapInfo_setLayers); + oluacls_func(L, "setMapSize", _olua_fun_cocos2d_TMXMapInfo_setMapSize); + oluacls_func(L, "setObjectGroups", _olua_fun_cocos2d_TMXMapInfo_setObjectGroups); + oluacls_func(L, "setOrientation", _olua_fun_cocos2d_TMXMapInfo_setOrientation); + oluacls_func(L, "setParentElement", _olua_fun_cocos2d_TMXMapInfo_setParentElement); + oluacls_func(L, "setParentGID", _olua_fun_cocos2d_TMXMapInfo_setParentGID); + oluacls_func(L, "setProperties", _olua_fun_cocos2d_TMXMapInfo_setProperties); + oluacls_func(L, "setStaggerAxis", _olua_fun_cocos2d_TMXMapInfo_setStaggerAxis); + oluacls_func(L, "setStaggerIndex", _olua_fun_cocos2d_TMXMapInfo_setStaggerIndex); + oluacls_func(L, "setStoringCharacters", _olua_fun_cocos2d_TMXMapInfo_setStoringCharacters); + oluacls_func(L, "setTMXFileName", _olua_fun_cocos2d_TMXMapInfo_setTMXFileName); + oluacls_func(L, "setTileProperties", _olua_fun_cocos2d_TMXMapInfo_setTileProperties); + oluacls_func(L, "setTileSize", _olua_fun_cocos2d_TMXMapInfo_setTileSize); + oluacls_func(L, "setTilesets", _olua_fun_cocos2d_TMXMapInfo_setTilesets); + oluacls_func(L, "textHandler", _olua_fun_cocos2d_TMXMapInfo_textHandler); + oluacls_prop(L, "currentString", _olua_fun_cocos2d_TMXMapInfo_getCurrentString, _olua_fun_cocos2d_TMXMapInfo_setCurrentString); + oluacls_prop(L, "externalTilesetFileName", _olua_fun_cocos2d_TMXMapInfo_getExternalTilesetFileName, nullptr); + oluacls_prop(L, "hexSideLength", _olua_fun_cocos2d_TMXMapInfo_getHexSideLength, _olua_fun_cocos2d_TMXMapInfo_setHexSideLength); + oluacls_prop(L, "layerAttribs", _olua_fun_cocos2d_TMXMapInfo_getLayerAttribs, _olua_fun_cocos2d_TMXMapInfo_setLayerAttribs); + oluacls_prop(L, "layers", _olua_fun_cocos2d_TMXMapInfo_getLayers, _olua_fun_cocos2d_TMXMapInfo_setLayers); + oluacls_prop(L, "mapSize", _olua_fun_cocos2d_TMXMapInfo_getMapSize, _olua_fun_cocos2d_TMXMapInfo_setMapSize); + oluacls_prop(L, "objectGroups", _olua_fun_cocos2d_TMXMapInfo_getObjectGroups, _olua_fun_cocos2d_TMXMapInfo_setObjectGroups); + oluacls_prop(L, "orientation", _olua_fun_cocos2d_TMXMapInfo_getOrientation, _olua_fun_cocos2d_TMXMapInfo_setOrientation); + oluacls_prop(L, "parentElement", _olua_fun_cocos2d_TMXMapInfo_getParentElement, _olua_fun_cocos2d_TMXMapInfo_setParentElement); + oluacls_prop(L, "parentGID", _olua_fun_cocos2d_TMXMapInfo_getParentGID, _olua_fun_cocos2d_TMXMapInfo_setParentGID); + oluacls_prop(L, "properties", _olua_fun_cocos2d_TMXMapInfo_getProperties, _olua_fun_cocos2d_TMXMapInfo_setProperties); + oluacls_prop(L, "staggerAxis", _olua_fun_cocos2d_TMXMapInfo_getStaggerAxis, _olua_fun_cocos2d_TMXMapInfo_setStaggerAxis); + oluacls_prop(L, "staggerIndex", _olua_fun_cocos2d_TMXMapInfo_getStaggerIndex, _olua_fun_cocos2d_TMXMapInfo_setStaggerIndex); + oluacls_prop(L, "storingCharacters", _olua_fun_cocos2d_TMXMapInfo_isStoringCharacters, _olua_fun_cocos2d_TMXMapInfo_setStoringCharacters); + oluacls_prop(L, "tileProperties", _olua_fun_cocos2d_TMXMapInfo_getTileProperties, _olua_fun_cocos2d_TMXMapInfo_setTileProperties); + oluacls_prop(L, "tileSize", _olua_fun_cocos2d_TMXMapInfo_getTileSize, _olua_fun_cocos2d_TMXMapInfo_setTileSize); + oluacls_prop(L, "tilesets", _olua_fun_cocos2d_TMXMapInfo_getTilesets, _olua_fun_cocos2d_TMXMapInfo_setTilesets); + oluacls_prop(L, "tmxFileName", _olua_fun_cocos2d_TMXMapInfo_getTMXFileName, _olua_fun_cocos2d_TMXMapInfo_setTMXFileName); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_TMXMapInfo(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.TMXMapInfo")) { + luaL_error(L, "class not found: cocos2d::TMXMapInfo"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_TMXTilesetInfo_getRectForGID(lua_State *L) +static int _olua_fun_cocos2d_TMXTilesetInfo_getRectForGID(lua_State *L) { olua_startinvoke(L); @@ -51332,18 +54163,18 @@ static int _cocos2d_TMXTilesetInfo_getRectForGID(lua_State *L) // cocos2d::Rect getRectForGID(uint32_t gid) cocos2d::Rect ret = self->getRectForGID(arg1); - int num_ret = olua_pushcopy_object(L, ret, "cc.Rect"); + int num_ret = olua_copy_object(L, ret, "cc.Rect"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_TMXTilesetInfo_new(lua_State *L) +static int _olua_fun_cocos2d_TMXTilesetInfo_new(lua_State *L) { olua_startinvoke(L); - // TMXTilesetInfo() + // cocos2d::TMXTilesetInfo() cocos2d::TMXTilesetInfo *ret = new cocos2d::TMXTilesetInfo(); int num_ret = olua_push_object(L, ret, "cc.TMXTilesetInfo"); olua_postnew(L, ret); @@ -51353,18 +54184,27 @@ static int _cocos2d_TMXTilesetInfo_new(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_TMXTilesetInfo(lua_State *L) +static int _olua_cls_cc_TMXTilesetInfo(lua_State *L) { oluacls_class(L, "cc.TMXTilesetInfo"); - oluacls_func(L, "getRectForGID", _cocos2d_TMXTilesetInfo_getRectForGID); - oluacls_func(L, "new", _cocos2d_TMXTilesetInfo_new); + oluacls_func(L, "getRectForGID", _olua_fun_cocos2d_TMXTilesetInfo_getRectForGID); + oluacls_func(L, "new", _olua_fun_cocos2d_TMXTilesetInfo_new); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_TMXTilesetInfo(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.TMXTilesetInfo")) { + luaL_error(L, "class not found: cocos2d::TMXTilesetInfo"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_TMXTiledMap_create(lua_State *L) +static int _olua_fun_cocos2d_TMXTiledMap_create(lua_State *L) { olua_startinvoke(L); @@ -51381,7 +54221,7 @@ static int _cocos2d_TMXTiledMap_create(lua_State *L) return num_ret; } -static int _cocos2d_TMXTiledMap_createWithXML(lua_State *L) +static int _olua_fun_cocos2d_TMXTiledMap_createWithXML(lua_State *L) { olua_startinvoke(L); @@ -51400,7 +54240,7 @@ static int _cocos2d_TMXTiledMap_createWithXML(lua_State *L) return num_ret; } -static int _cocos2d_TMXTiledMap_getLayer(lua_State *L) +static int _olua_fun_cocos2d_TMXTiledMap_getLayer(lua_State *L) { olua_startinvoke(L); @@ -51419,7 +54259,7 @@ static int _cocos2d_TMXTiledMap_getLayer(lua_State *L) return num_ret; } -static int _cocos2d_TMXTiledMap_getLayerNum(lua_State *L) +static int _olua_fun_cocos2d_TMXTiledMap_getLayerNum(lua_State *L) { olua_startinvoke(L); @@ -51436,7 +54276,7 @@ static int _cocos2d_TMXTiledMap_getLayerNum(lua_State *L) return num_ret; } -static int _cocos2d_TMXTiledMap_getMapOrientation(lua_State *L) +static int _olua_fun_cocos2d_TMXTiledMap_getMapOrientation(lua_State *L) { olua_startinvoke(L); @@ -51453,7 +54293,7 @@ static int _cocos2d_TMXTiledMap_getMapOrientation(lua_State *L) return num_ret; } -static int _cocos2d_TMXTiledMap_getMapSize(lua_State *L) +static int _olua_fun_cocos2d_TMXTiledMap_getMapSize(lua_State *L) { olua_startinvoke(L); @@ -51470,7 +54310,7 @@ static int _cocos2d_TMXTiledMap_getMapSize(lua_State *L) return num_ret; } -static int _cocos2d_TMXTiledMap_getObjectGroup(lua_State *L) +static int _olua_fun_cocos2d_TMXTiledMap_getObjectGroup(lua_State *L) { olua_startinvoke(L); @@ -51489,7 +54329,7 @@ static int _cocos2d_TMXTiledMap_getObjectGroup(lua_State *L) return num_ret; } -static int _cocos2d_TMXTiledMap_getObjectGroups(lua_State *L) +static int _olua_fun_cocos2d_TMXTiledMap_getObjectGroups(lua_State *L) { olua_startinvoke(L); @@ -51508,7 +54348,7 @@ static int _cocos2d_TMXTiledMap_getObjectGroups(lua_State *L) return num_ret; } -static int _cocos2d_TMXTiledMap_getProperties(lua_State *L) +static int _olua_fun_cocos2d_TMXTiledMap_getProperties(lua_State *L) { olua_startinvoke(L); @@ -51518,14 +54358,14 @@ static int _cocos2d_TMXTiledMap_getProperties(lua_State *L) // cocos2d::ValueMap &getProperties() cocos2d::ValueMap &ret = self->getProperties(); - int num_ret = olua_push_pointer(L, &ret, "cc.ValueMap"); + int num_ret = olua_push_valueptr(L, &ret, "cc.types.ValueMap"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_TMXTiledMap_getPropertiesForGID(lua_State *L) +static int _olua_fun_cocos2d_TMXTiledMap_getPropertiesForGID(lua_State *L) { olua_startinvoke(L); @@ -51544,7 +54384,7 @@ static int _cocos2d_TMXTiledMap_getPropertiesForGID(lua_State *L) return num_ret; } -static int _cocos2d_TMXTiledMap_getProperty(lua_State *L) +static int _olua_fun_cocos2d_TMXTiledMap_getProperty(lua_State *L) { olua_startinvoke(L); @@ -51563,7 +54403,7 @@ static int _cocos2d_TMXTiledMap_getProperty(lua_State *L) return num_ret; } -static int _cocos2d_TMXTiledMap_getResourceFile(lua_State *L) +static int _olua_fun_cocos2d_TMXTiledMap_getResourceFile(lua_State *L) { olua_startinvoke(L); @@ -51580,7 +54420,7 @@ static int _cocos2d_TMXTiledMap_getResourceFile(lua_State *L) return num_ret; } -static int _cocos2d_TMXTiledMap_getTileSize(lua_State *L) +static int _olua_fun_cocos2d_TMXTiledMap_getTileSize(lua_State *L) { olua_startinvoke(L); @@ -51597,7 +54437,7 @@ static int _cocos2d_TMXTiledMap_getTileSize(lua_State *L) return num_ret; } -static int _cocos2d_TMXTiledMap_initWithTMXFile(lua_State *L) +static int _olua_fun_cocos2d_TMXTiledMap_initWithTMXFile(lua_State *L) { olua_startinvoke(L); @@ -51616,7 +54456,7 @@ static int _cocos2d_TMXTiledMap_initWithTMXFile(lua_State *L) return num_ret; } -static int _cocos2d_TMXTiledMap_initWithXML(lua_State *L) +static int _olua_fun_cocos2d_TMXTiledMap_initWithXML(lua_State *L) { olua_startinvoke(L); @@ -51637,11 +54477,11 @@ static int _cocos2d_TMXTiledMap_initWithXML(lua_State *L) return num_ret; } -static int _cocos2d_TMXTiledMap_new(lua_State *L) +static int _olua_fun_cocos2d_TMXTiledMap_new(lua_State *L) { olua_startinvoke(L); - // TMXTiledMap() + // cocos2d::TMXTiledMap() cocos2d::TMXTiledMap *ret = new cocos2d::TMXTiledMap(); int num_ret = olua_push_object(L, ret, "cc.TMXTiledMap"); olua_postnew(L, ret); @@ -51651,7 +54491,7 @@ static int _cocos2d_TMXTiledMap_new(lua_State *L) return num_ret; } -static int _cocos2d_TMXTiledMap_setMapOrientation(lua_State *L) +static int _olua_fun_cocos2d_TMXTiledMap_setMapOrientation(lua_State *L) { olua_startinvoke(L); @@ -51669,25 +54509,25 @@ static int _cocos2d_TMXTiledMap_setMapOrientation(lua_State *L) return 0; } -static int _cocos2d_TMXTiledMap_setMapSize(lua_State *L) +static int _olua_fun_cocos2d_TMXTiledMap_setMapSize(lua_State *L) { olua_startinvoke(L); cocos2d::TMXTiledMap *self = nullptr; - cocos2d::Size arg1; /** mapSize */ + cocos2d::Size *arg1; /** mapSize */ olua_to_object(L, 1, &self, "cc.TMXTiledMap"); olua_check_object(L, 2, &arg1, "cc.Size"); // void setMapSize(const cocos2d::Size &mapSize) - self->setMapSize(arg1); + self->setMapSize(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_TMXTiledMap_setObjectGroups(lua_State *L) +static int _olua_fun_cocos2d_TMXTiledMap_setObjectGroups(lua_State *L) { olua_startinvoke(L); @@ -51707,7 +54547,7 @@ static int _cocos2d_TMXTiledMap_setObjectGroups(lua_State *L) return 0; } -static int _cocos2d_TMXTiledMap_setProperties(lua_State *L) +static int _olua_fun_cocos2d_TMXTiledMap_setProperties(lua_State *L) { olua_startinvoke(L); @@ -51725,62 +54565,71 @@ static int _cocos2d_TMXTiledMap_setProperties(lua_State *L) return 0; } -static int _cocos2d_TMXTiledMap_setTileSize(lua_State *L) +static int _olua_fun_cocos2d_TMXTiledMap_setTileSize(lua_State *L) { olua_startinvoke(L); cocos2d::TMXTiledMap *self = nullptr; - cocos2d::Size arg1; /** tileSize */ + cocos2d::Size *arg1; /** tileSize */ olua_to_object(L, 1, &self, "cc.TMXTiledMap"); olua_check_object(L, 2, &arg1, "cc.Size"); // void setTileSize(const cocos2d::Size &tileSize) - self->setTileSize(arg1); + self->setTileSize(*arg1); olua_endinvoke(L); return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_TMXTiledMap(lua_State *L) +static int _olua_cls_cc_TMXTiledMap(lua_State *L) { oluacls_class(L, "cc.TMXTiledMap"); - oluacls_func(L, "create", _cocos2d_TMXTiledMap_create); - oluacls_func(L, "createWithXML", _cocos2d_TMXTiledMap_createWithXML); - oluacls_func(L, "getLayer", _cocos2d_TMXTiledMap_getLayer); - oluacls_func(L, "getLayerNum", _cocos2d_TMXTiledMap_getLayerNum); - oluacls_func(L, "getMapOrientation", _cocos2d_TMXTiledMap_getMapOrientation); - oluacls_func(L, "getMapSize", _cocos2d_TMXTiledMap_getMapSize); - oluacls_func(L, "getObjectGroup", _cocos2d_TMXTiledMap_getObjectGroup); - oluacls_func(L, "getObjectGroups", _cocos2d_TMXTiledMap_getObjectGroups); - oluacls_func(L, "getProperties", _cocos2d_TMXTiledMap_getProperties); - oluacls_func(L, "getPropertiesForGID", _cocos2d_TMXTiledMap_getPropertiesForGID); - oluacls_func(L, "getProperty", _cocos2d_TMXTiledMap_getProperty); - oluacls_func(L, "getResourceFile", _cocos2d_TMXTiledMap_getResourceFile); - oluacls_func(L, "getTileSize", _cocos2d_TMXTiledMap_getTileSize); - oluacls_func(L, "initWithTMXFile", _cocos2d_TMXTiledMap_initWithTMXFile); - oluacls_func(L, "initWithXML", _cocos2d_TMXTiledMap_initWithXML); - oluacls_func(L, "new", _cocos2d_TMXTiledMap_new); - oluacls_func(L, "setMapOrientation", _cocos2d_TMXTiledMap_setMapOrientation); - oluacls_func(L, "setMapSize", _cocos2d_TMXTiledMap_setMapSize); - oluacls_func(L, "setObjectGroups", _cocos2d_TMXTiledMap_setObjectGroups); - oluacls_func(L, "setProperties", _cocos2d_TMXTiledMap_setProperties); - oluacls_func(L, "setTileSize", _cocos2d_TMXTiledMap_setTileSize); - oluacls_prop(L, "layerNum", _cocos2d_TMXTiledMap_getLayerNum, nullptr); - oluacls_prop(L, "mapOrientation", _cocos2d_TMXTiledMap_getMapOrientation, _cocos2d_TMXTiledMap_setMapOrientation); - oluacls_prop(L, "mapSize", _cocos2d_TMXTiledMap_getMapSize, _cocos2d_TMXTiledMap_setMapSize); - oluacls_prop(L, "objectGroups", _cocos2d_TMXTiledMap_getObjectGroups, _cocos2d_TMXTiledMap_setObjectGroups); - oluacls_prop(L, "properties", _cocos2d_TMXTiledMap_getProperties, _cocos2d_TMXTiledMap_setProperties); - oluacls_prop(L, "resourceFile", _cocos2d_TMXTiledMap_getResourceFile, nullptr); - oluacls_prop(L, "tileSize", _cocos2d_TMXTiledMap_getTileSize, _cocos2d_TMXTiledMap_setTileSize); + oluacls_func(L, "create", _olua_fun_cocos2d_TMXTiledMap_create); + oluacls_func(L, "createWithXML", _olua_fun_cocos2d_TMXTiledMap_createWithXML); + oluacls_func(L, "getLayer", _olua_fun_cocos2d_TMXTiledMap_getLayer); + oluacls_func(L, "getLayerNum", _olua_fun_cocos2d_TMXTiledMap_getLayerNum); + oluacls_func(L, "getMapOrientation", _olua_fun_cocos2d_TMXTiledMap_getMapOrientation); + oluacls_func(L, "getMapSize", _olua_fun_cocos2d_TMXTiledMap_getMapSize); + oluacls_func(L, "getObjectGroup", _olua_fun_cocos2d_TMXTiledMap_getObjectGroup); + oluacls_func(L, "getObjectGroups", _olua_fun_cocos2d_TMXTiledMap_getObjectGroups); + oluacls_func(L, "getProperties", _olua_fun_cocos2d_TMXTiledMap_getProperties); + oluacls_func(L, "getPropertiesForGID", _olua_fun_cocos2d_TMXTiledMap_getPropertiesForGID); + oluacls_func(L, "getProperty", _olua_fun_cocos2d_TMXTiledMap_getProperty); + oluacls_func(L, "getResourceFile", _olua_fun_cocos2d_TMXTiledMap_getResourceFile); + oluacls_func(L, "getTileSize", _olua_fun_cocos2d_TMXTiledMap_getTileSize); + oluacls_func(L, "initWithTMXFile", _olua_fun_cocos2d_TMXTiledMap_initWithTMXFile); + oluacls_func(L, "initWithXML", _olua_fun_cocos2d_TMXTiledMap_initWithXML); + oluacls_func(L, "new", _olua_fun_cocos2d_TMXTiledMap_new); + oluacls_func(L, "setMapOrientation", _olua_fun_cocos2d_TMXTiledMap_setMapOrientation); + oluacls_func(L, "setMapSize", _olua_fun_cocos2d_TMXTiledMap_setMapSize); + oluacls_func(L, "setObjectGroups", _olua_fun_cocos2d_TMXTiledMap_setObjectGroups); + oluacls_func(L, "setProperties", _olua_fun_cocos2d_TMXTiledMap_setProperties); + oluacls_func(L, "setTileSize", _olua_fun_cocos2d_TMXTiledMap_setTileSize); + oluacls_prop(L, "layerNum", _olua_fun_cocos2d_TMXTiledMap_getLayerNum, nullptr); + oluacls_prop(L, "mapOrientation", _olua_fun_cocos2d_TMXTiledMap_getMapOrientation, _olua_fun_cocos2d_TMXTiledMap_setMapOrientation); + oluacls_prop(L, "mapSize", _olua_fun_cocos2d_TMXTiledMap_getMapSize, _olua_fun_cocos2d_TMXTiledMap_setMapSize); + oluacls_prop(L, "objectGroups", _olua_fun_cocos2d_TMXTiledMap_getObjectGroups, _olua_fun_cocos2d_TMXTiledMap_setObjectGroups); + oluacls_prop(L, "properties", _olua_fun_cocos2d_TMXTiledMap_getProperties, _olua_fun_cocos2d_TMXTiledMap_setProperties); + oluacls_prop(L, "resourceFile", _olua_fun_cocos2d_TMXTiledMap_getResourceFile, nullptr); + oluacls_prop(L, "tileSize", _olua_fun_cocos2d_TMXTiledMap_getTileSize, _olua_fun_cocos2d_TMXTiledMap_setTileSize); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_TMXTiledMap(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.TMXTiledMap")) { + luaL_error(L, "class not found: cocos2d::TMXTiledMap"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_FastTMXTiledMap_create(lua_State *L) +static int _olua_fun_cocos2d_FastTMXTiledMap_create(lua_State *L) { olua_startinvoke(L); @@ -51797,7 +54646,7 @@ static int _cocos2d_FastTMXTiledMap_create(lua_State *L) return num_ret; } -static int _cocos2d_FastTMXTiledMap_createWithXML(lua_State *L) +static int _olua_fun_cocos2d_FastTMXTiledMap_createWithXML(lua_State *L) { olua_startinvoke(L); @@ -51816,7 +54665,7 @@ static int _cocos2d_FastTMXTiledMap_createWithXML(lua_State *L) return num_ret; } -static int _cocos2d_FastTMXTiledMap_getLayer(lua_State *L) +static int _olua_fun_cocos2d_FastTMXTiledMap_getLayer(lua_State *L) { olua_startinvoke(L); @@ -51835,7 +54684,7 @@ static int _cocos2d_FastTMXTiledMap_getLayer(lua_State *L) return num_ret; } -static int _cocos2d_FastTMXTiledMap_getMapOrientation(lua_State *L) +static int _olua_fun_cocos2d_FastTMXTiledMap_getMapOrientation(lua_State *L) { olua_startinvoke(L); @@ -51852,7 +54701,7 @@ static int _cocos2d_FastTMXTiledMap_getMapOrientation(lua_State *L) return num_ret; } -static int _cocos2d_FastTMXTiledMap_getMapSize(lua_State *L) +static int _olua_fun_cocos2d_FastTMXTiledMap_getMapSize(lua_State *L) { olua_startinvoke(L); @@ -51869,7 +54718,7 @@ static int _cocos2d_FastTMXTiledMap_getMapSize(lua_State *L) return num_ret; } -static int _cocos2d_FastTMXTiledMap_getObjectGroup(lua_State *L) +static int _olua_fun_cocos2d_FastTMXTiledMap_getObjectGroup(lua_State *L) { olua_startinvoke(L); @@ -51888,7 +54737,7 @@ static int _cocos2d_FastTMXTiledMap_getObjectGroup(lua_State *L) return num_ret; } -static int _cocos2d_FastTMXTiledMap_getObjectGroups(lua_State *L) +static int _olua_fun_cocos2d_FastTMXTiledMap_getObjectGroups(lua_State *L) { olua_startinvoke(L); @@ -51907,7 +54756,7 @@ static int _cocos2d_FastTMXTiledMap_getObjectGroups(lua_State *L) return num_ret; } -static int _cocos2d_FastTMXTiledMap_getProperties(lua_State *L) +static int _olua_fun_cocos2d_FastTMXTiledMap_getProperties(lua_State *L) { olua_startinvoke(L); @@ -51924,7 +54773,7 @@ static int _cocos2d_FastTMXTiledMap_getProperties(lua_State *L) return num_ret; } -static int _cocos2d_FastTMXTiledMap_getPropertiesForGID(lua_State *L) +static int _olua_fun_cocos2d_FastTMXTiledMap_getPropertiesForGID(lua_State *L) { olua_startinvoke(L); @@ -51943,7 +54792,7 @@ static int _cocos2d_FastTMXTiledMap_getPropertiesForGID(lua_State *L) return num_ret; } -static int _cocos2d_FastTMXTiledMap_getProperty(lua_State *L) +static int _olua_fun_cocos2d_FastTMXTiledMap_getProperty(lua_State *L) { olua_startinvoke(L); @@ -51962,7 +54811,7 @@ static int _cocos2d_FastTMXTiledMap_getProperty(lua_State *L) return num_ret; } -static int _cocos2d_FastTMXTiledMap_getTileSize(lua_State *L) +static int _olua_fun_cocos2d_FastTMXTiledMap_getTileSize(lua_State *L) { olua_startinvoke(L); @@ -51979,7 +54828,7 @@ static int _cocos2d_FastTMXTiledMap_getTileSize(lua_State *L) return num_ret; } -static int _cocos2d_FastTMXTiledMap_setMapOrientation(lua_State *L) +static int _olua_fun_cocos2d_FastTMXTiledMap_setMapOrientation(lua_State *L) { olua_startinvoke(L); @@ -51997,25 +54846,25 @@ static int _cocos2d_FastTMXTiledMap_setMapOrientation(lua_State *L) return 0; } -static int _cocos2d_FastTMXTiledMap_setMapSize(lua_State *L) +static int _olua_fun_cocos2d_FastTMXTiledMap_setMapSize(lua_State *L) { olua_startinvoke(L); cocos2d::FastTMXTiledMap *self = nullptr; - cocos2d::Size arg1; /** mapSize */ + cocos2d::Size *arg1; /** mapSize */ olua_to_object(L, 1, &self, "cc.FastTMXTiledMap"); olua_check_object(L, 2, &arg1, "cc.Size"); // void setMapSize(const cocos2d::Size &mapSize) - self->setMapSize(arg1); + self->setMapSize(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_FastTMXTiledMap_setObjectGroups(lua_State *L) +static int _olua_fun_cocos2d_FastTMXTiledMap_setObjectGroups(lua_State *L) { olua_startinvoke(L); @@ -52035,7 +54884,7 @@ static int _cocos2d_FastTMXTiledMap_setObjectGroups(lua_State *L) return 0; } -static int _cocos2d_FastTMXTiledMap_setProperties(lua_State *L) +static int _olua_fun_cocos2d_FastTMXTiledMap_setProperties(lua_State *L) { olua_startinvoke(L); @@ -52053,55 +54902,64 @@ static int _cocos2d_FastTMXTiledMap_setProperties(lua_State *L) return 0; } -static int _cocos2d_FastTMXTiledMap_setTileSize(lua_State *L) +static int _olua_fun_cocos2d_FastTMXTiledMap_setTileSize(lua_State *L) { olua_startinvoke(L); cocos2d::FastTMXTiledMap *self = nullptr; - cocos2d::Size arg1; /** tileSize */ + cocos2d::Size *arg1; /** tileSize */ olua_to_object(L, 1, &self, "cc.FastTMXTiledMap"); olua_check_object(L, 2, &arg1, "cc.Size"); // void setTileSize(const cocos2d::Size &tileSize) - self->setTileSize(arg1); + self->setTileSize(*arg1); olua_endinvoke(L); return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_FastTMXTiledMap(lua_State *L) +static int _olua_cls_cc_FastTMXTiledMap(lua_State *L) { oluacls_class(L, "cc.FastTMXTiledMap"); - oluacls_func(L, "create", _cocos2d_FastTMXTiledMap_create); - oluacls_func(L, "createWithXML", _cocos2d_FastTMXTiledMap_createWithXML); - oluacls_func(L, "getLayer", _cocos2d_FastTMXTiledMap_getLayer); - oluacls_func(L, "getMapOrientation", _cocos2d_FastTMXTiledMap_getMapOrientation); - oluacls_func(L, "getMapSize", _cocos2d_FastTMXTiledMap_getMapSize); - oluacls_func(L, "getObjectGroup", _cocos2d_FastTMXTiledMap_getObjectGroup); - oluacls_func(L, "getObjectGroups", _cocos2d_FastTMXTiledMap_getObjectGroups); - oluacls_func(L, "getProperties", _cocos2d_FastTMXTiledMap_getProperties); - oluacls_func(L, "getPropertiesForGID", _cocos2d_FastTMXTiledMap_getPropertiesForGID); - oluacls_func(L, "getProperty", _cocos2d_FastTMXTiledMap_getProperty); - oluacls_func(L, "getTileSize", _cocos2d_FastTMXTiledMap_getTileSize); - oluacls_func(L, "setMapOrientation", _cocos2d_FastTMXTiledMap_setMapOrientation); - oluacls_func(L, "setMapSize", _cocos2d_FastTMXTiledMap_setMapSize); - oluacls_func(L, "setObjectGroups", _cocos2d_FastTMXTiledMap_setObjectGroups); - oluacls_func(L, "setProperties", _cocos2d_FastTMXTiledMap_setProperties); - oluacls_func(L, "setTileSize", _cocos2d_FastTMXTiledMap_setTileSize); - oluacls_prop(L, "mapOrientation", _cocos2d_FastTMXTiledMap_getMapOrientation, _cocos2d_FastTMXTiledMap_setMapOrientation); - oluacls_prop(L, "mapSize", _cocos2d_FastTMXTiledMap_getMapSize, _cocos2d_FastTMXTiledMap_setMapSize); - oluacls_prop(L, "objectGroups", _cocos2d_FastTMXTiledMap_getObjectGroups, _cocos2d_FastTMXTiledMap_setObjectGroups); - oluacls_prop(L, "properties", _cocos2d_FastTMXTiledMap_getProperties, _cocos2d_FastTMXTiledMap_setProperties); - oluacls_prop(L, "tileSize", _cocos2d_FastTMXTiledMap_getTileSize, _cocos2d_FastTMXTiledMap_setTileSize); + oluacls_func(L, "create", _olua_fun_cocos2d_FastTMXTiledMap_create); + oluacls_func(L, "createWithXML", _olua_fun_cocos2d_FastTMXTiledMap_createWithXML); + oluacls_func(L, "getLayer", _olua_fun_cocos2d_FastTMXTiledMap_getLayer); + oluacls_func(L, "getMapOrientation", _olua_fun_cocos2d_FastTMXTiledMap_getMapOrientation); + oluacls_func(L, "getMapSize", _olua_fun_cocos2d_FastTMXTiledMap_getMapSize); + oluacls_func(L, "getObjectGroup", _olua_fun_cocos2d_FastTMXTiledMap_getObjectGroup); + oluacls_func(L, "getObjectGroups", _olua_fun_cocos2d_FastTMXTiledMap_getObjectGroups); + oluacls_func(L, "getProperties", _olua_fun_cocos2d_FastTMXTiledMap_getProperties); + oluacls_func(L, "getPropertiesForGID", _olua_fun_cocos2d_FastTMXTiledMap_getPropertiesForGID); + oluacls_func(L, "getProperty", _olua_fun_cocos2d_FastTMXTiledMap_getProperty); + oluacls_func(L, "getTileSize", _olua_fun_cocos2d_FastTMXTiledMap_getTileSize); + oluacls_func(L, "setMapOrientation", _olua_fun_cocos2d_FastTMXTiledMap_setMapOrientation); + oluacls_func(L, "setMapSize", _olua_fun_cocos2d_FastTMXTiledMap_setMapSize); + oluacls_func(L, "setObjectGroups", _olua_fun_cocos2d_FastTMXTiledMap_setObjectGroups); + oluacls_func(L, "setProperties", _olua_fun_cocos2d_FastTMXTiledMap_setProperties); + oluacls_func(L, "setTileSize", _olua_fun_cocos2d_FastTMXTiledMap_setTileSize); + oluacls_prop(L, "mapOrientation", _olua_fun_cocos2d_FastTMXTiledMap_getMapOrientation, _olua_fun_cocos2d_FastTMXTiledMap_setMapOrientation); + oluacls_prop(L, "mapSize", _olua_fun_cocos2d_FastTMXTiledMap_getMapSize, _olua_fun_cocos2d_FastTMXTiledMap_setMapSize); + oluacls_prop(L, "objectGroups", _olua_fun_cocos2d_FastTMXTiledMap_getObjectGroups, _olua_fun_cocos2d_FastTMXTiledMap_setObjectGroups); + oluacls_prop(L, "properties", _olua_fun_cocos2d_FastTMXTiledMap_getProperties, _olua_fun_cocos2d_FastTMXTiledMap_setProperties); + oluacls_prop(L, "tileSize", _olua_fun_cocos2d_FastTMXTiledMap_getTileSize, _olua_fun_cocos2d_FastTMXTiledMap_setTileSize); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_FastTMXTiledMap(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.FastTMXTiledMap")) { + luaL_error(L, "class not found: cocos2d::FastTMXTiledMap"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_FastTMXLayer_create(lua_State *L) +static int _olua_fun_cocos2d_FastTMXLayer_create(lua_State *L) { olua_startinvoke(L); @@ -52122,7 +54980,7 @@ static int _cocos2d_FastTMXLayer_create(lua_State *L) return num_ret; } -static int _cocos2d_FastTMXLayer_getLayerName(lua_State *L) +static int _olua_fun_cocos2d_FastTMXLayer_getLayerName(lua_State *L) { olua_startinvoke(L); @@ -52139,7 +54997,7 @@ static int _cocos2d_FastTMXLayer_getLayerName(lua_State *L) return num_ret; } -static int _cocos2d_FastTMXLayer_getLayerOrientation(lua_State *L) +static int _olua_fun_cocos2d_FastTMXLayer_getLayerOrientation(lua_State *L) { olua_startinvoke(L); @@ -52156,7 +55014,7 @@ static int _cocos2d_FastTMXLayer_getLayerOrientation(lua_State *L) return num_ret; } -static int _cocos2d_FastTMXLayer_getLayerSize(lua_State *L) +static int _olua_fun_cocos2d_FastTMXLayer_getLayerSize(lua_State *L) { olua_startinvoke(L); @@ -52173,7 +55031,7 @@ static int _cocos2d_FastTMXLayer_getLayerSize(lua_State *L) return num_ret; } -static int _cocos2d_FastTMXLayer_getMapTileSize(lua_State *L) +static int _olua_fun_cocos2d_FastTMXLayer_getMapTileSize(lua_State *L) { olua_startinvoke(L); @@ -52190,26 +55048,26 @@ static int _cocos2d_FastTMXLayer_getMapTileSize(lua_State *L) return num_ret; } -static int _cocos2d_FastTMXLayer_getPositionAt(lua_State *L) +static int _olua_fun_cocos2d_FastTMXLayer_getPositionAt(lua_State *L) { olua_startinvoke(L); cocos2d::FastTMXLayer *self = nullptr; - cocos2d::Vec2 arg1; /** tileCoordinate */ + cocos2d::Vec2 *arg1; /** tileCoordinate */ olua_to_object(L, 1, &self, "cc.FastTMXLayer"); olua_check_object(L, 2, &arg1, "cc.Vec2"); // cocos2d::Vec2 getPositionAt(const cocos2d::Vec2 &tileCoordinate) - cocos2d::Vec2 ret = self->getPositionAt(arg1); - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec2"); + cocos2d::Vec2 ret = self->getPositionAt(*arg1); + int num_ret = olua_copy_object(L, ret, "cc.Vec2"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_FastTMXLayer_getProperties(lua_State *L) +static int _olua_fun_cocos2d_FastTMXLayer_getProperties(lua_State *L) { olua_startinvoke(L); @@ -52226,7 +55084,7 @@ static int _cocos2d_FastTMXLayer_getProperties(lua_State *L) return num_ret; } -static int _cocos2d_FastTMXLayer_getProperty(lua_State *L) +static int _olua_fun_cocos2d_FastTMXLayer_getProperty(lua_State *L) { olua_startinvoke(L); @@ -52245,18 +55103,18 @@ static int _cocos2d_FastTMXLayer_getProperty(lua_State *L) return num_ret; } -static int _cocos2d_FastTMXLayer_getTileAt(lua_State *L) +static int _olua_fun_cocos2d_FastTMXLayer_getTileAt(lua_State *L) { olua_startinvoke(L); cocos2d::FastTMXLayer *self = nullptr; - cocos2d::Vec2 arg1; /** tileCoordinate */ + cocos2d::Vec2 *arg1; /** tileCoordinate */ olua_to_object(L, 1, &self, "cc.FastTMXLayer"); olua_check_object(L, 2, &arg1, "cc.Vec2"); // cocos2d::Sprite *getTileAt(const cocos2d::Vec2 &tileCoordinate) - cocos2d::Sprite *ret = self->getTileAt(arg1); + cocos2d::Sprite *ret = self->getTileAt(*arg1); int num_ret = olua_push_object(L, ret, "cc.Sprite"); olua_endinvoke(L); @@ -52264,20 +55122,20 @@ static int _cocos2d_FastTMXLayer_getTileAt(lua_State *L) return num_ret; } -static int _cocos2d_FastTMXLayer_getTileGIDAt$1(lua_State *L) +static int _olua_fun_cocos2d_FastTMXLayer_getTileGIDAt$1(lua_State *L) { olua_startinvoke(L); cocos2d::FastTMXLayer *self = nullptr; - cocos2d::Vec2 arg1; /** tileCoordinate */ + cocos2d::Vec2 *arg1; /** tileCoordinate */ cocos2d::TMXTileFlags *arg2 = nullptr; /** flags */ olua_to_object(L, 1, &self, "cc.FastTMXLayer"); olua_check_object(L, 2, &arg1, "cc.Vec2"); - olua_check_pointer(L, 3, &arg2, "cc.TMXTileFlags"); + olua_check_valueptr(L, 3, &arg2, "cc.types.TMXTileFlags"); // int getTileGIDAt(const cocos2d::Vec2 &tileCoordinate, @optional cocos2d::TMXTileFlags *flags) - int ret = self->getTileGIDAt(arg1, arg2); + int ret = self->getTileGIDAt(*arg1, arg2); int num_ret = olua_push_integer(L, ret); olua_endinvoke(L); @@ -52285,18 +55143,18 @@ static int _cocos2d_FastTMXLayer_getTileGIDAt$1(lua_State *L) return num_ret; } -static int _cocos2d_FastTMXLayer_getTileGIDAt$2(lua_State *L) +static int _olua_fun_cocos2d_FastTMXLayer_getTileGIDAt$2(lua_State *L) { olua_startinvoke(L); cocos2d::FastTMXLayer *self = nullptr; - cocos2d::Vec2 arg1; /** tileCoordinate */ + cocos2d::Vec2 *arg1; /** tileCoordinate */ olua_to_object(L, 1, &self, "cc.FastTMXLayer"); olua_check_object(L, 2, &arg1, "cc.Vec2"); - // int getTileGIDAt(const cocos2d::Vec2 &tileCoordinate, @optional cocos2d::TMXTileFlags *flags) - int ret = self->getTileGIDAt(arg1); + // int getTileGIDAt(const cocos2d::Vec2 &tileCoordinate) + int ret = self->getTileGIDAt(*arg1); int num_ret = olua_push_integer(L, ret); olua_endinvoke(L); @@ -52304,21 +55162,21 @@ static int _cocos2d_FastTMXLayer_getTileGIDAt$2(lua_State *L) return num_ret; } -static int _cocos2d_FastTMXLayer_getTileGIDAt(lua_State *L) +static int _olua_fun_cocos2d_FastTMXLayer_getTileGIDAt(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_object(L, 2, "cc.Vec2"))) { - // int getTileGIDAt(const cocos2d::Vec2 &tileCoordinate, @optional cocos2d::TMXTileFlags *flags) - return _cocos2d_FastTMXLayer_getTileGIDAt$2(L); + // int getTileGIDAt(const cocos2d::Vec2 &tileCoordinate) + return _olua_fun_cocos2d_FastTMXLayer_getTileGIDAt$2(L); // } } if (num_args == 2) { - // if ((olua_is_object(L, 2, "cc.Vec2")) && (olua_is_pointer(L, 3, "cc.TMXTileFlags"))) { + // if ((olua_is_object(L, 2, "cc.Vec2")) && (olua_is_valueptr(L, 3, "cc.types.TMXTileFlags"))) { // int getTileGIDAt(const cocos2d::Vec2 &tileCoordinate, @optional cocos2d::TMXTileFlags *flags) - return _cocos2d_FastTMXLayer_getTileGIDAt$1(L); + return _olua_fun_cocos2d_FastTMXLayer_getTileGIDAt$1(L); // } } @@ -52327,7 +55185,7 @@ static int _cocos2d_FastTMXLayer_getTileGIDAt(lua_State *L) return 0; } -static int _cocos2d_FastTMXLayer_getTileSet(lua_State *L) +static int _olua_fun_cocos2d_FastTMXLayer_getTileSet(lua_State *L) { olua_startinvoke(L); @@ -52344,7 +55202,7 @@ static int _cocos2d_FastTMXLayer_getTileSet(lua_State *L) return num_ret; } -static int _cocos2d_FastTMXLayer_getTiles(lua_State *L) +static int _olua_fun_cocos2d_FastTMXLayer_getTiles(lua_State *L) { olua_startinvoke(L); @@ -52354,18 +55212,18 @@ static int _cocos2d_FastTMXLayer_getTiles(lua_State *L) // const uint32_t *getTiles() const uint32_t *ret = self->getTiles(); - int num_ret = olua_push_pointer(L, ret, "olua.uint32_t"); + int num_ret = olua_push_valueptr(L, ret, "olua.uint32"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_FastTMXLayer_new(lua_State *L) +static int _olua_fun_cocos2d_FastTMXLayer_new(lua_State *L) { olua_startinvoke(L); - // FastTMXLayer() + // cocos2d::FastTMXLayer() cocos2d::FastTMXLayer *ret = new cocos2d::FastTMXLayer(); int num_ret = olua_push_object(L, ret, "cc.FastTMXLayer"); olua_postnew(L, ret); @@ -52375,25 +55233,25 @@ static int _cocos2d_FastTMXLayer_new(lua_State *L) return num_ret; } -static int _cocos2d_FastTMXLayer_removeTileAt(lua_State *L) +static int _olua_fun_cocos2d_FastTMXLayer_removeTileAt(lua_State *L) { olua_startinvoke(L); cocos2d::FastTMXLayer *self = nullptr; - cocos2d::Vec2 arg1; /** tileCoordinate */ + cocos2d::Vec2 *arg1; /** tileCoordinate */ olua_to_object(L, 1, &self, "cc.FastTMXLayer"); olua_check_object(L, 2, &arg1, "cc.Vec2"); // void removeTileAt(const cocos2d::Vec2 &tileCoordinate) - self->removeTileAt(arg1); + self->removeTileAt(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_FastTMXLayer_setLayerName(lua_State *L) +static int _olua_fun_cocos2d_FastTMXLayer_setLayerName(lua_State *L) { olua_startinvoke(L); @@ -52411,7 +55269,7 @@ static int _cocos2d_FastTMXLayer_setLayerName(lua_State *L) return 0; } -static int _cocos2d_FastTMXLayer_setLayerOrientation(lua_State *L) +static int _olua_fun_cocos2d_FastTMXLayer_setLayerOrientation(lua_State *L) { olua_startinvoke(L); @@ -52429,43 +55287,43 @@ static int _cocos2d_FastTMXLayer_setLayerOrientation(lua_State *L) return 0; } -static int _cocos2d_FastTMXLayer_setLayerSize(lua_State *L) +static int _olua_fun_cocos2d_FastTMXLayer_setLayerSize(lua_State *L) { olua_startinvoke(L); cocos2d::FastTMXLayer *self = nullptr; - cocos2d::Size arg1; /** size */ + cocos2d::Size *arg1; /** size */ olua_to_object(L, 1, &self, "cc.FastTMXLayer"); olua_check_object(L, 2, &arg1, "cc.Size"); // void setLayerSize(const cocos2d::Size &size) - self->setLayerSize(arg1); + self->setLayerSize(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_FastTMXLayer_setMapTileSize(lua_State *L) +static int _olua_fun_cocos2d_FastTMXLayer_setMapTileSize(lua_State *L) { olua_startinvoke(L); cocos2d::FastTMXLayer *self = nullptr; - cocos2d::Size arg1; /** size */ + cocos2d::Size *arg1; /** size */ olua_to_object(L, 1, &self, "cc.FastTMXLayer"); olua_check_object(L, 2, &arg1, "cc.Size"); // void setMapTileSize(const cocos2d::Size &size) - self->setMapTileSize(arg1); + self->setMapTileSize(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_FastTMXLayer_setProperties(lua_State *L) +static int _olua_fun_cocos2d_FastTMXLayer_setProperties(lua_State *L) { olua_startinvoke(L); @@ -52483,33 +55341,33 @@ static int _cocos2d_FastTMXLayer_setProperties(lua_State *L) return 0; } -static int _cocos2d_FastTMXLayer_setTileGID$1(lua_State *L) +static int _olua_fun_cocos2d_FastTMXLayer_setTileGID$1(lua_State *L) { olua_startinvoke(L); cocos2d::FastTMXLayer *self = nullptr; int arg1 = 0; /** gid */ - cocos2d::Vec2 arg2; /** tileCoordinate */ + cocos2d::Vec2 *arg2; /** tileCoordinate */ olua_to_object(L, 1, &self, "cc.FastTMXLayer"); olua_check_integer(L, 2, &arg1); olua_check_object(L, 3, &arg2, "cc.Vec2"); // void setTileGID(int gid, const cocos2d::Vec2 &tileCoordinate) - self->setTileGID(arg1, arg2); + self->setTileGID(arg1, *arg2); olua_endinvoke(L); return 0; } -static int _cocos2d_FastTMXLayer_setTileGID$2(lua_State *L) +static int _olua_fun_cocos2d_FastTMXLayer_setTileGID$2(lua_State *L) { olua_startinvoke(L); cocos2d::FastTMXLayer *self = nullptr; int arg1 = 0; /** gid */ - cocos2d::Vec2 arg2; /** tileCoordinate */ + cocos2d::Vec2 *arg2; /** tileCoordinate */ cocos2d::TMXTileFlags arg3 = (cocos2d::TMXTileFlags)0; /** flags */ olua_to_object(L, 1, &self, "cc.FastTMXLayer"); @@ -52518,28 +55376,28 @@ static int _cocos2d_FastTMXLayer_setTileGID$2(lua_State *L) olua_check_enum(L, 4, &arg3); // void setTileGID(int gid, const cocos2d::Vec2 &tileCoordinate, cocos2d::TMXTileFlags flags) - self->setTileGID(arg1, arg2, arg3); + self->setTileGID(arg1, *arg2, arg3); olua_endinvoke(L); return 0; } -static int _cocos2d_FastTMXLayer_setTileGID(lua_State *L) +static int _olua_fun_cocos2d_FastTMXLayer_setTileGID(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 2) { // if ((olua_is_integer(L, 2)) && (olua_is_object(L, 3, "cc.Vec2"))) { // void setTileGID(int gid, const cocos2d::Vec2 &tileCoordinate) - return _cocos2d_FastTMXLayer_setTileGID$1(L); + return _olua_fun_cocos2d_FastTMXLayer_setTileGID$1(L); // } } if (num_args == 3) { // if ((olua_is_integer(L, 2)) && (olua_is_object(L, 3, "cc.Vec2")) && (olua_is_enum(L, 4))) { // void setTileGID(int gid, const cocos2d::Vec2 &tileCoordinate, cocos2d::TMXTileFlags flags) - return _cocos2d_FastTMXLayer_setTileGID$2(L); + return _olua_fun_cocos2d_FastTMXLayer_setTileGID$2(L); // } } @@ -52548,7 +55406,7 @@ static int _cocos2d_FastTMXLayer_setTileGID(lua_State *L) return 0; } -static int _cocos2d_FastTMXLayer_setTileSet(lua_State *L) +static int _olua_fun_cocos2d_FastTMXLayer_setTileSet(lua_State *L) { olua_startinvoke(L); @@ -52566,7 +55424,7 @@ static int _cocos2d_FastTMXLayer_setTileSet(lua_State *L) return 0; } -static int _cocos2d_FastTMXLayer_setTiles(lua_State *L) +static int _olua_fun_cocos2d_FastTMXLayer_setTiles(lua_State *L) { olua_startinvoke(L); @@ -52574,7 +55432,7 @@ static int _cocos2d_FastTMXLayer_setTiles(lua_State *L) uint32_t *arg1 = nullptr; /** tiles */ olua_to_object(L, 1, &self, "cc.FastTMXLayer"); - olua_check_pointer(L, 2, &arg1, "olua.uint32_t"); + olua_check_valueptr(L, 2, &arg1, "olua.uint32"); // void setTiles(uint32_t *tiles) self->setTiles(arg1); @@ -52584,13 +55442,13 @@ static int _cocos2d_FastTMXLayer_setTiles(lua_State *L) return 0; } -static int _cocos2d_FastTMXLayer_setupTileSprite(lua_State *L) +static int _olua_fun_cocos2d_FastTMXLayer_setupTileSprite(lua_State *L) { olua_startinvoke(L); cocos2d::FastTMXLayer *self = nullptr; cocos2d::Sprite *arg1 = nullptr; /** sprite */ - cocos2d::Vec2 arg2; /** pos */ + cocos2d::Vec2 *arg2; /** pos */ uint32_t arg3 = 0; /** gid */ olua_to_object(L, 1, &self, "cc.FastTMXLayer"); @@ -52599,14 +55457,14 @@ static int _cocos2d_FastTMXLayer_setupTileSprite(lua_State *L) olua_check_integer(L, 4, &arg3); // void setupTileSprite(cocos2d::Sprite *sprite, const cocos2d::Vec2 &pos, uint32_t gid) - self->setupTileSprite(arg1, arg2, arg3); + self->setupTileSprite(arg1, *arg2, arg3); olua_endinvoke(L); return 0; } -static int _cocos2d_FastTMXLayer_setupTiles(lua_State *L) +static int _olua_fun_cocos2d_FastTMXLayer_setupTiles(lua_State *L) { olua_startinvoke(L); @@ -52622,52 +55480,60 @@ static int _cocos2d_FastTMXLayer_setupTiles(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_FastTMXLayer(lua_State *L) +static int _olua_cls_cc_FastTMXLayer(lua_State *L) { oluacls_class(L, "cc.FastTMXLayer"); - oluacls_func(L, "create", _cocos2d_FastTMXLayer_create); - oluacls_func(L, "getLayerName", _cocos2d_FastTMXLayer_getLayerName); - oluacls_func(L, "getLayerOrientation", _cocos2d_FastTMXLayer_getLayerOrientation); - oluacls_func(L, "getLayerSize", _cocos2d_FastTMXLayer_getLayerSize); - oluacls_func(L, "getMapTileSize", _cocos2d_FastTMXLayer_getMapTileSize); - oluacls_func(L, "getPositionAt", _cocos2d_FastTMXLayer_getPositionAt); - oluacls_func(L, "getProperties", _cocos2d_FastTMXLayer_getProperties); - oluacls_func(L, "getProperty", _cocos2d_FastTMXLayer_getProperty); - oluacls_func(L, "getTileAt", _cocos2d_FastTMXLayer_getTileAt); - oluacls_func(L, "getTileGIDAt", _cocos2d_FastTMXLayer_getTileGIDAt); - oluacls_func(L, "getTileSet", _cocos2d_FastTMXLayer_getTileSet); - oluacls_func(L, "getTiles", _cocos2d_FastTMXLayer_getTiles); - oluacls_func(L, "new", _cocos2d_FastTMXLayer_new); - oluacls_func(L, "removeTileAt", _cocos2d_FastTMXLayer_removeTileAt); - oluacls_func(L, "setLayerName", _cocos2d_FastTMXLayer_setLayerName); - oluacls_func(L, "setLayerOrientation", _cocos2d_FastTMXLayer_setLayerOrientation); - oluacls_func(L, "setLayerSize", _cocos2d_FastTMXLayer_setLayerSize); - oluacls_func(L, "setMapTileSize", _cocos2d_FastTMXLayer_setMapTileSize); - oluacls_func(L, "setProperties", _cocos2d_FastTMXLayer_setProperties); - oluacls_func(L, "setTileGID", _cocos2d_FastTMXLayer_setTileGID); - oluacls_func(L, "setTileSet", _cocos2d_FastTMXLayer_setTileSet); - oluacls_func(L, "setTiles", _cocos2d_FastTMXLayer_setTiles); - oluacls_func(L, "setupTileSprite", _cocos2d_FastTMXLayer_setupTileSprite); - oluacls_func(L, "setupTiles", _cocos2d_FastTMXLayer_setupTiles); - oluacls_prop(L, "layerName", _cocos2d_FastTMXLayer_getLayerName, _cocos2d_FastTMXLayer_setLayerName); - oluacls_prop(L, "layerOrientation", _cocos2d_FastTMXLayer_getLayerOrientation, _cocos2d_FastTMXLayer_setLayerOrientation); - oluacls_prop(L, "layerSize", _cocos2d_FastTMXLayer_getLayerSize, _cocos2d_FastTMXLayer_setLayerSize); - oluacls_prop(L, "mapTileSize", _cocos2d_FastTMXLayer_getMapTileSize, _cocos2d_FastTMXLayer_setMapTileSize); - oluacls_prop(L, "properties", _cocos2d_FastTMXLayer_getProperties, _cocos2d_FastTMXLayer_setProperties); - oluacls_prop(L, "tileSet", _cocos2d_FastTMXLayer_getTileSet, _cocos2d_FastTMXLayer_setTileSet); - oluacls_prop(L, "tiles", _cocos2d_FastTMXLayer_getTiles, _cocos2d_FastTMXLayer_setTiles); + oluacls_func(L, "create", _olua_fun_cocos2d_FastTMXLayer_create); + oluacls_func(L, "getLayerName", _olua_fun_cocos2d_FastTMXLayer_getLayerName); + oluacls_func(L, "getLayerOrientation", _olua_fun_cocos2d_FastTMXLayer_getLayerOrientation); + oluacls_func(L, "getLayerSize", _olua_fun_cocos2d_FastTMXLayer_getLayerSize); + oluacls_func(L, "getMapTileSize", _olua_fun_cocos2d_FastTMXLayer_getMapTileSize); + oluacls_func(L, "getPositionAt", _olua_fun_cocos2d_FastTMXLayer_getPositionAt); + oluacls_func(L, "getProperties", _olua_fun_cocos2d_FastTMXLayer_getProperties); + oluacls_func(L, "getProperty", _olua_fun_cocos2d_FastTMXLayer_getProperty); + oluacls_func(L, "getTileAt", _olua_fun_cocos2d_FastTMXLayer_getTileAt); + oluacls_func(L, "getTileGIDAt", _olua_fun_cocos2d_FastTMXLayer_getTileGIDAt); + oluacls_func(L, "getTileSet", _olua_fun_cocos2d_FastTMXLayer_getTileSet); + oluacls_func(L, "getTiles", _olua_fun_cocos2d_FastTMXLayer_getTiles); + oluacls_func(L, "new", _olua_fun_cocos2d_FastTMXLayer_new); + oluacls_func(L, "removeTileAt", _olua_fun_cocos2d_FastTMXLayer_removeTileAt); + oluacls_func(L, "setLayerName", _olua_fun_cocos2d_FastTMXLayer_setLayerName); + oluacls_func(L, "setLayerOrientation", _olua_fun_cocos2d_FastTMXLayer_setLayerOrientation); + oluacls_func(L, "setLayerSize", _olua_fun_cocos2d_FastTMXLayer_setLayerSize); + oluacls_func(L, "setMapTileSize", _olua_fun_cocos2d_FastTMXLayer_setMapTileSize); + oluacls_func(L, "setProperties", _olua_fun_cocos2d_FastTMXLayer_setProperties); + oluacls_func(L, "setTileGID", _olua_fun_cocos2d_FastTMXLayer_setTileGID); + oluacls_func(L, "setTileSet", _olua_fun_cocos2d_FastTMXLayer_setTileSet); + oluacls_func(L, "setTiles", _olua_fun_cocos2d_FastTMXLayer_setTiles); + oluacls_func(L, "setupTileSprite", _olua_fun_cocos2d_FastTMXLayer_setupTileSprite); + oluacls_func(L, "setupTiles", _olua_fun_cocos2d_FastTMXLayer_setupTiles); + oluacls_prop(L, "layerName", _olua_fun_cocos2d_FastTMXLayer_getLayerName, _olua_fun_cocos2d_FastTMXLayer_setLayerName); + oluacls_prop(L, "layerOrientation", _olua_fun_cocos2d_FastTMXLayer_getLayerOrientation, _olua_fun_cocos2d_FastTMXLayer_setLayerOrientation); + oluacls_prop(L, "layerSize", _olua_fun_cocos2d_FastTMXLayer_getLayerSize, _olua_fun_cocos2d_FastTMXLayer_setLayerSize); + oluacls_prop(L, "mapTileSize", _olua_fun_cocos2d_FastTMXLayer_getMapTileSize, _olua_fun_cocos2d_FastTMXLayer_setMapTileSize); + oluacls_prop(L, "properties", _olua_fun_cocos2d_FastTMXLayer_getProperties, _olua_fun_cocos2d_FastTMXLayer_setProperties); + oluacls_prop(L, "tileSet", _olua_fun_cocos2d_FastTMXLayer_getTileSet, _olua_fun_cocos2d_FastTMXLayer_setTileSet); + oluacls_prop(L, "tiles", _olua_fun_cocos2d_FastTMXLayer_getTiles, _olua_fun_cocos2d_FastTMXLayer_setTiles); oluacls_const(L, "FAST_TMX_ORIENTATION_HEX", cocos2d::FastTMXLayer::FAST_TMX_ORIENTATION_HEX); oluacls_const(L, "FAST_TMX_ORIENTATION_ISO", cocos2d::FastTMXLayer::FAST_TMX_ORIENTATION_ISO); oluacls_const(L, "FAST_TMX_ORIENTATION_ORTHO", cocos2d::FastTMXLayer::FAST_TMX_ORIENTATION_ORTHO); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_FastTMXLayer(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.FastTMXLayer")) { + luaL_error(L, "class not found: cocos2d::FastTMXLayer"); + } + return 1; +} OLUA_END_DECLS #if CC_USE_NAVMESH -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_NavMeshAgent_NavMeshAgentSyncFlag(lua_State *L) +static int _olua_cls_cc_NavMeshAgent_NavMeshAgentSyncFlag(lua_State *L) { oluacls_class(L, "cc.NavMeshAgent.NavMeshAgentSyncFlag"); oluacls_func(L, "__index", olua_indexerror); @@ -52679,11 +55545,21 @@ OLUA_LIB int luaopen_cocos2d_NavMeshAgent_NavMeshAgentSyncFlag(lua_State *L) return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_NavMeshAgent_NavMeshAgentSyncFlag(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.NavMeshAgent.NavMeshAgentSyncFlag")) { + luaL_error(L, "class not found: cocos2d::NavMeshAgent::NavMeshAgentSyncFlag"); + } + return 1; +} OLUA_END_DECLS #endif #if CC_USE_NAVMESH -static int _cocos2d_NavMeshAgent_completeOffMeshLink(lua_State *L) +static int _olua_fun_cocos2d_NavMeshAgent_completeOffMeshLink(lua_State *L) { olua_startinvoke(L); @@ -52699,16 +55575,16 @@ static int _cocos2d_NavMeshAgent_completeOffMeshLink(lua_State *L) return 0; } -static int _cocos2d_NavMeshAgent_create(lua_State *L) +static int _olua_fun_cocos2d_NavMeshAgent_create(lua_State *L) { olua_startinvoke(L); - cocos2d::NavMeshAgentParam arg1; /** param */ + cocos2d::NavMeshAgentParam *arg1; /** param */ olua_check_object(L, 1, &arg1, "cc.NavMeshAgentParam"); // static cocos2d::NavMeshAgent *create(const cocos2d::NavMeshAgentParam ¶m) - cocos2d::NavMeshAgent *ret = cocos2d::NavMeshAgent::create(arg1); + cocos2d::NavMeshAgent *ret = cocos2d::NavMeshAgent::create(*arg1); int num_ret = olua_push_object(L, ret, "cc.NavMeshAgent"); olua_endinvoke(L); @@ -52716,7 +55592,7 @@ static int _cocos2d_NavMeshAgent_create(lua_State *L) return num_ret; } -static int _cocos2d_NavMeshAgent_getCurrentOffMeshLinkData(lua_State *L) +static int _olua_fun_cocos2d_NavMeshAgent_getCurrentOffMeshLinkData(lua_State *L) { olua_startinvoke(L); @@ -52726,14 +55602,14 @@ static int _cocos2d_NavMeshAgent_getCurrentOffMeshLinkData(lua_State *L) // cocos2d::OffMeshLinkData getCurrentOffMeshLinkData() cocos2d::OffMeshLinkData ret = self->getCurrentOffMeshLinkData(); - int num_ret = olua_pushcopy_object(L, ret, "cc.OffMeshLinkData"); + int num_ret = olua_copy_object(L, ret, "cc.OffMeshLinkData"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_NavMeshAgent_getCurrentVelocity(lua_State *L) +static int _olua_fun_cocos2d_NavMeshAgent_getCurrentVelocity(lua_State *L) { olua_startinvoke(L); @@ -52743,14 +55619,14 @@ static int _cocos2d_NavMeshAgent_getCurrentVelocity(lua_State *L) // cocos2d::Vec3 getCurrentVelocity() cocos2d::Vec3 ret = self->getCurrentVelocity(); - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec3"); + int num_ret = olua_copy_object(L, ret, "cc.Vec3"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_NavMeshAgent_getHeight(lua_State *L) +static int _olua_fun_cocos2d_NavMeshAgent_getHeight(lua_State *L) { olua_startinvoke(L); @@ -52767,7 +55643,7 @@ static int _cocos2d_NavMeshAgent_getHeight(lua_State *L) return num_ret; } -static int _cocos2d_NavMeshAgent_getMaxAcceleration(lua_State *L) +static int _olua_fun_cocos2d_NavMeshAgent_getMaxAcceleration(lua_State *L) { olua_startinvoke(L); @@ -52784,7 +55660,7 @@ static int _cocos2d_NavMeshAgent_getMaxAcceleration(lua_State *L) return num_ret; } -static int _cocos2d_NavMeshAgent_getMaxSpeed(lua_State *L) +static int _olua_fun_cocos2d_NavMeshAgent_getMaxSpeed(lua_State *L) { olua_startinvoke(L); @@ -52801,7 +55677,7 @@ static int _cocos2d_NavMeshAgent_getMaxSpeed(lua_State *L) return num_ret; } -static int _cocos2d_NavMeshAgent_getNavMeshAgentComponentName(lua_State *L) +static int _olua_fun_cocos2d_NavMeshAgent_getNavMeshAgentComponentName(lua_State *L) { olua_startinvoke(L); @@ -52814,7 +55690,7 @@ static int _cocos2d_NavMeshAgent_getNavMeshAgentComponentName(lua_State *L) return num_ret; } -static int _cocos2d_NavMeshAgent_getObstacleAvoidanceType(lua_State *L) +static int _olua_fun_cocos2d_NavMeshAgent_getObstacleAvoidanceType(lua_State *L) { olua_startinvoke(L); @@ -52831,7 +55707,7 @@ static int _cocos2d_NavMeshAgent_getObstacleAvoidanceType(lua_State *L) return num_ret; } -static int _cocos2d_NavMeshAgent_getRadius(lua_State *L) +static int _olua_fun_cocos2d_NavMeshAgent_getRadius(lua_State *L) { olua_startinvoke(L); @@ -52848,7 +55724,7 @@ static int _cocos2d_NavMeshAgent_getRadius(lua_State *L) return num_ret; } -static int _cocos2d_NavMeshAgent_getSeparationWeight(lua_State *L) +static int _olua_fun_cocos2d_NavMeshAgent_getSeparationWeight(lua_State *L) { olua_startinvoke(L); @@ -52865,7 +55741,7 @@ static int _cocos2d_NavMeshAgent_getSeparationWeight(lua_State *L) return num_ret; } -static int _cocos2d_NavMeshAgent_getSyncFlag(lua_State *L) +static int _olua_fun_cocos2d_NavMeshAgent_getSyncFlag(lua_State *L) { olua_startinvoke(L); @@ -52882,7 +55758,7 @@ static int _cocos2d_NavMeshAgent_getSyncFlag(lua_State *L) return num_ret; } -static int _cocos2d_NavMeshAgent_getUserData(lua_State *L) +static int _olua_fun_cocos2d_NavMeshAgent_getUserData(lua_State *L) { olua_startinvoke(L); @@ -52899,7 +55775,7 @@ static int _cocos2d_NavMeshAgent_getUserData(lua_State *L) return num_ret; } -static int _cocos2d_NavMeshAgent_getVelocity(lua_State *L) +static int _olua_fun_cocos2d_NavMeshAgent_getVelocity(lua_State *L) { olua_startinvoke(L); @@ -52909,14 +55785,14 @@ static int _cocos2d_NavMeshAgent_getVelocity(lua_State *L) // cocos2d::Vec3 getVelocity() cocos2d::Vec3 ret = self->getVelocity(); - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec3"); + int num_ret = olua_copy_object(L, ret, "cc.Vec3"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_NavMeshAgent_isOnOffMeshLink(lua_State *L) +static int _olua_fun_cocos2d_NavMeshAgent_isOnOffMeshLink(lua_State *L) { olua_startinvoke(L); @@ -52933,12 +55809,12 @@ static int _cocos2d_NavMeshAgent_isOnOffMeshLink(lua_State *L) return num_ret; } -static int _cocos2d_NavMeshAgent_move$1(lua_State *L) +static int _olua_fun_cocos2d_NavMeshAgent_move$1(lua_State *L) { olua_startinvoke(L); cocos2d::NavMeshAgent *self = nullptr; - cocos2d::Vec3 arg1; /** destination */ + cocos2d::Vec3 *arg1; /** destination */ std::function arg2; /** callback */ olua_to_object(L, 1, &self, "cc.NavMeshAgent"); @@ -52949,9 +55825,10 @@ static int _cocos2d_NavMeshAgent_move$1(lua_State *L) std::string cb_tag = "move"; std::string cb_name; if (olua_isfunction(L, 3)) { - cb_name = olua_setcallback(L, cb_store, 3, cb_tag.c_str(), OLUA_TAG_REPLACE); + cb_name = olua_setcallback(L, cb_store, 3, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg2 = [cb_store, cb_name, cb_ctx](cocos2d::NavMeshAgent *arg1, float arg2) { + // lua_State *ML = olua_mainthread(L); + arg2 = [cb_store, cb_name, cb_ctx /*, ML */](cocos2d::NavMeshAgent *cb_arg1, float cb_arg2) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); @@ -52959,8 +55836,8 @@ static int _cocos2d_NavMeshAgent_move$1(lua_State *L) int top = lua_gettop(L); size_t last = olua_push_objpool(L); olua_enable_objpool(L); - olua_push_object(L, arg1, "cc.NavMeshAgent"); - olua_push_number(L, arg2); + olua_push_object(L, cb_arg1, "cc.NavMeshAgent"); + olua_push_number(L, cb_arg2); olua_disable_objpool(L); olua_callback(L, cb_store, cb_name.c_str(), 2); @@ -52975,47 +55852,47 @@ static int _cocos2d_NavMeshAgent_move$1(lua_State *L) arg2 = nullptr; } - // void move(const cocos2d::Vec3 &destination, @localvar @optional const std::function &callback) - self->move(arg1, arg2); + // void move(const cocos2d::Vec3 &destination, @optional const std::function &callback) + self->move(*arg1, arg2); olua_endinvoke(L); return 0; } -static int _cocos2d_NavMeshAgent_move$2(lua_State *L) +static int _olua_fun_cocos2d_NavMeshAgent_move$2(lua_State *L) { olua_startinvoke(L); cocos2d::NavMeshAgent *self = nullptr; - cocos2d::Vec3 arg1; /** destination */ + cocos2d::Vec3 *arg1; /** destination */ olua_to_object(L, 1, &self, "cc.NavMeshAgent"); olua_check_object(L, 2, &arg1, "cc.Vec3"); - // void move(const cocos2d::Vec3 &destination, @localvar @optional const std::function &callback) - self->move(arg1); + // void move(const cocos2d::Vec3 &destination) + self->move(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_NavMeshAgent_move(lua_State *L) +static int _olua_fun_cocos2d_NavMeshAgent_move(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_object(L, 2, "cc.Vec3"))) { - // void move(const cocos2d::Vec3 &destination, @localvar @optional const std::function &callback) - return _cocos2d_NavMeshAgent_move$2(L); + // void move(const cocos2d::Vec3 &destination) + return _olua_fun_cocos2d_NavMeshAgent_move$2(L); // } } if (num_args == 2) { // if ((olua_is_object(L, 2, "cc.Vec3")) && (olua_is_callback(L, 3, "std.function"))) { - // void move(const cocos2d::Vec3 &destination, @localvar @optional const std::function &callback) - return _cocos2d_NavMeshAgent_move$1(L); + // void move(const cocos2d::Vec3 &destination, @optional const std::function &callback) + return _olua_fun_cocos2d_NavMeshAgent_move$1(L); // } } @@ -53024,11 +55901,11 @@ static int _cocos2d_NavMeshAgent_move(lua_State *L) return 0; } -static int _cocos2d_NavMeshAgent_new(lua_State *L) +static int _olua_fun_cocos2d_NavMeshAgent_new(lua_State *L) { olua_startinvoke(L); - // NavMeshAgent() + // cocos2d::NavMeshAgent() cocos2d::NavMeshAgent *ret = new cocos2d::NavMeshAgent(); int num_ret = olua_push_object(L, ret, "cc.NavMeshAgent"); olua_postnew(L, ret); @@ -53038,7 +55915,7 @@ static int _cocos2d_NavMeshAgent_new(lua_State *L) return num_ret; } -static int _cocos2d_NavMeshAgent_pause(lua_State *L) +static int _olua_fun_cocos2d_NavMeshAgent_pause(lua_State *L) { olua_startinvoke(L); @@ -53054,7 +55931,7 @@ static int _cocos2d_NavMeshAgent_pause(lua_State *L) return 0; } -static int _cocos2d_NavMeshAgent_resume(lua_State *L) +static int _olua_fun_cocos2d_NavMeshAgent_resume(lua_State *L) { olua_startinvoke(L); @@ -53070,7 +55947,7 @@ static int _cocos2d_NavMeshAgent_resume(lua_State *L) return 0; } -static int _cocos2d_NavMeshAgent_setAutoOrientation(lua_State *L) +static int _olua_fun_cocos2d_NavMeshAgent_setAutoOrientation(lua_State *L) { olua_startinvoke(L); @@ -53088,7 +55965,7 @@ static int _cocos2d_NavMeshAgent_setAutoOrientation(lua_State *L) return 0; } -static int _cocos2d_NavMeshAgent_setAutoTraverseOffMeshLink(lua_State *L) +static int _olua_fun_cocos2d_NavMeshAgent_setAutoTraverseOffMeshLink(lua_State *L) { olua_startinvoke(L); @@ -53106,7 +55983,7 @@ static int _cocos2d_NavMeshAgent_setAutoTraverseOffMeshLink(lua_State *L) return 0; } -static int _cocos2d_NavMeshAgent_setHeight(lua_State *L) +static int _olua_fun_cocos2d_NavMeshAgent_setHeight(lua_State *L) { olua_startinvoke(L); @@ -53124,7 +56001,7 @@ static int _cocos2d_NavMeshAgent_setHeight(lua_State *L) return 0; } -static int _cocos2d_NavMeshAgent_setMaxAcceleration(lua_State *L) +static int _olua_fun_cocos2d_NavMeshAgent_setMaxAcceleration(lua_State *L) { olua_startinvoke(L); @@ -53142,7 +56019,7 @@ static int _cocos2d_NavMeshAgent_setMaxAcceleration(lua_State *L) return 0; } -static int _cocos2d_NavMeshAgent_setMaxSpeed(lua_State *L) +static int _olua_fun_cocos2d_NavMeshAgent_setMaxSpeed(lua_State *L) { olua_startinvoke(L); @@ -53160,7 +56037,7 @@ static int _cocos2d_NavMeshAgent_setMaxSpeed(lua_State *L) return 0; } -static int _cocos2d_NavMeshAgent_setObstacleAvoidanceType(lua_State *L) +static int _olua_fun_cocos2d_NavMeshAgent_setObstacleAvoidanceType(lua_State *L) { olua_startinvoke(L); @@ -53178,25 +56055,25 @@ static int _cocos2d_NavMeshAgent_setObstacleAvoidanceType(lua_State *L) return 0; } -static int _cocos2d_NavMeshAgent_setOrientationRefAxes(lua_State *L) +static int _olua_fun_cocos2d_NavMeshAgent_setOrientationRefAxes(lua_State *L) { olua_startinvoke(L); cocos2d::NavMeshAgent *self = nullptr; - cocos2d::Vec3 arg1; /** rotRefAxes */ + cocos2d::Vec3 *arg1; /** rotRefAxes */ olua_to_object(L, 1, &self, "cc.NavMeshAgent"); olua_check_object(L, 2, &arg1, "cc.Vec3"); // void setOrientationRefAxes(const cocos2d::Vec3 &rotRefAxes) - self->setOrientationRefAxes(arg1); + self->setOrientationRefAxes(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_NavMeshAgent_setRadius(lua_State *L) +static int _olua_fun_cocos2d_NavMeshAgent_setRadius(lua_State *L) { olua_startinvoke(L); @@ -53214,7 +56091,7 @@ static int _cocos2d_NavMeshAgent_setRadius(lua_State *L) return 0; } -static int _cocos2d_NavMeshAgent_setSeparationWeight(lua_State *L) +static int _olua_fun_cocos2d_NavMeshAgent_setSeparationWeight(lua_State *L) { olua_startinvoke(L); @@ -53232,7 +56109,7 @@ static int _cocos2d_NavMeshAgent_setSeparationWeight(lua_State *L) return 0; } -static int _cocos2d_NavMeshAgent_setSyncFlag(lua_State *L) +static int _olua_fun_cocos2d_NavMeshAgent_setSyncFlag(lua_State *L) { olua_startinvoke(L); @@ -53250,7 +56127,7 @@ static int _cocos2d_NavMeshAgent_setSyncFlag(lua_State *L) return 0; } -static int _cocos2d_NavMeshAgent_setUserData(lua_State *L) +static int _olua_fun_cocos2d_NavMeshAgent_setUserData(lua_State *L) { olua_startinvoke(L); @@ -53268,7 +56145,7 @@ static int _cocos2d_NavMeshAgent_setUserData(lua_State *L) return 0; } -static int _cocos2d_NavMeshAgent_stop(lua_State *L) +static int _olua_fun_cocos2d_NavMeshAgent_stop(lua_State *L) { olua_startinvoke(L); @@ -53284,7 +56161,7 @@ static int _cocos2d_NavMeshAgent_stop(lua_State *L) return 0; } -static int _cocos2d_NavMeshAgent_syncToAgent(lua_State *L) +static int _olua_fun_cocos2d_NavMeshAgent_syncToAgent(lua_State *L) { olua_startinvoke(L); @@ -53300,7 +56177,7 @@ static int _cocos2d_NavMeshAgent_syncToAgent(lua_State *L) return 0; } -static int _cocos2d_NavMeshAgent_syncToNode(lua_State *L) +static int _olua_fun_cocos2d_NavMeshAgent_syncToNode(lua_State *L) { olua_startinvoke(L); @@ -53316,65 +56193,73 @@ static int _cocos2d_NavMeshAgent_syncToNode(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_NavMeshAgent(lua_State *L) +static int _olua_cls_cc_NavMeshAgent(lua_State *L) { oluacls_class(L, "cc.NavMeshAgent"); - oluacls_func(L, "completeOffMeshLink", _cocos2d_NavMeshAgent_completeOffMeshLink); - oluacls_func(L, "create", _cocos2d_NavMeshAgent_create); - oluacls_func(L, "getCurrentOffMeshLinkData", _cocos2d_NavMeshAgent_getCurrentOffMeshLinkData); - oluacls_func(L, "getCurrentVelocity", _cocos2d_NavMeshAgent_getCurrentVelocity); - oluacls_func(L, "getHeight", _cocos2d_NavMeshAgent_getHeight); - oluacls_func(L, "getMaxAcceleration", _cocos2d_NavMeshAgent_getMaxAcceleration); - oluacls_func(L, "getMaxSpeed", _cocos2d_NavMeshAgent_getMaxSpeed); - oluacls_func(L, "getNavMeshAgentComponentName", _cocos2d_NavMeshAgent_getNavMeshAgentComponentName); - oluacls_func(L, "getObstacleAvoidanceType", _cocos2d_NavMeshAgent_getObstacleAvoidanceType); - oluacls_func(L, "getRadius", _cocos2d_NavMeshAgent_getRadius); - oluacls_func(L, "getSeparationWeight", _cocos2d_NavMeshAgent_getSeparationWeight); - oluacls_func(L, "getSyncFlag", _cocos2d_NavMeshAgent_getSyncFlag); - oluacls_func(L, "getUserData", _cocos2d_NavMeshAgent_getUserData); - oluacls_func(L, "getVelocity", _cocos2d_NavMeshAgent_getVelocity); - oluacls_func(L, "isOnOffMeshLink", _cocos2d_NavMeshAgent_isOnOffMeshLink); - oluacls_func(L, "move", _cocos2d_NavMeshAgent_move); - oluacls_func(L, "new", _cocos2d_NavMeshAgent_new); - oluacls_func(L, "pause", _cocos2d_NavMeshAgent_pause); - oluacls_func(L, "resume", _cocos2d_NavMeshAgent_resume); - oluacls_func(L, "setAutoOrientation", _cocos2d_NavMeshAgent_setAutoOrientation); - oluacls_func(L, "setAutoTraverseOffMeshLink", _cocos2d_NavMeshAgent_setAutoTraverseOffMeshLink); - oluacls_func(L, "setHeight", _cocos2d_NavMeshAgent_setHeight); - oluacls_func(L, "setMaxAcceleration", _cocos2d_NavMeshAgent_setMaxAcceleration); - oluacls_func(L, "setMaxSpeed", _cocos2d_NavMeshAgent_setMaxSpeed); - oluacls_func(L, "setObstacleAvoidanceType", _cocos2d_NavMeshAgent_setObstacleAvoidanceType); - oluacls_func(L, "setOrientationRefAxes", _cocos2d_NavMeshAgent_setOrientationRefAxes); - oluacls_func(L, "setRadius", _cocos2d_NavMeshAgent_setRadius); - oluacls_func(L, "setSeparationWeight", _cocos2d_NavMeshAgent_setSeparationWeight); - oluacls_func(L, "setSyncFlag", _cocos2d_NavMeshAgent_setSyncFlag); - oluacls_func(L, "setUserData", _cocos2d_NavMeshAgent_setUserData); - oluacls_func(L, "stop", _cocos2d_NavMeshAgent_stop); - oluacls_func(L, "syncToAgent", _cocos2d_NavMeshAgent_syncToAgent); - oluacls_func(L, "syncToNode", _cocos2d_NavMeshAgent_syncToNode); - oluacls_prop(L, "currentOffMeshLinkData", _cocos2d_NavMeshAgent_getCurrentOffMeshLinkData, nullptr); - oluacls_prop(L, "currentVelocity", _cocos2d_NavMeshAgent_getCurrentVelocity, nullptr); - oluacls_prop(L, "height", _cocos2d_NavMeshAgent_getHeight, _cocos2d_NavMeshAgent_setHeight); - oluacls_prop(L, "maxAcceleration", _cocos2d_NavMeshAgent_getMaxAcceleration, _cocos2d_NavMeshAgent_setMaxAcceleration); - oluacls_prop(L, "maxSpeed", _cocos2d_NavMeshAgent_getMaxSpeed, _cocos2d_NavMeshAgent_setMaxSpeed); - oluacls_prop(L, "navMeshAgentComponentName", _cocos2d_NavMeshAgent_getNavMeshAgentComponentName, nullptr); - oluacls_prop(L, "obstacleAvoidanceType", _cocos2d_NavMeshAgent_getObstacleAvoidanceType, _cocos2d_NavMeshAgent_setObstacleAvoidanceType); - oluacls_prop(L, "onOffMeshLink", _cocos2d_NavMeshAgent_isOnOffMeshLink, nullptr); - oluacls_prop(L, "radius", _cocos2d_NavMeshAgent_getRadius, _cocos2d_NavMeshAgent_setRadius); - oluacls_prop(L, "separationWeight", _cocos2d_NavMeshAgent_getSeparationWeight, _cocos2d_NavMeshAgent_setSeparationWeight); - oluacls_prop(L, "syncFlag", _cocos2d_NavMeshAgent_getSyncFlag, _cocos2d_NavMeshAgent_setSyncFlag); - oluacls_prop(L, "userData", _cocos2d_NavMeshAgent_getUserData, _cocos2d_NavMeshAgent_setUserData); - oluacls_prop(L, "velocity", _cocos2d_NavMeshAgent_getVelocity, nullptr); + oluacls_func(L, "completeOffMeshLink", _olua_fun_cocos2d_NavMeshAgent_completeOffMeshLink); + oluacls_func(L, "create", _olua_fun_cocos2d_NavMeshAgent_create); + oluacls_func(L, "getCurrentOffMeshLinkData", _olua_fun_cocos2d_NavMeshAgent_getCurrentOffMeshLinkData); + oluacls_func(L, "getCurrentVelocity", _olua_fun_cocos2d_NavMeshAgent_getCurrentVelocity); + oluacls_func(L, "getHeight", _olua_fun_cocos2d_NavMeshAgent_getHeight); + oluacls_func(L, "getMaxAcceleration", _olua_fun_cocos2d_NavMeshAgent_getMaxAcceleration); + oluacls_func(L, "getMaxSpeed", _olua_fun_cocos2d_NavMeshAgent_getMaxSpeed); + oluacls_func(L, "getNavMeshAgentComponentName", _olua_fun_cocos2d_NavMeshAgent_getNavMeshAgentComponentName); + oluacls_func(L, "getObstacleAvoidanceType", _olua_fun_cocos2d_NavMeshAgent_getObstacleAvoidanceType); + oluacls_func(L, "getRadius", _olua_fun_cocos2d_NavMeshAgent_getRadius); + oluacls_func(L, "getSeparationWeight", _olua_fun_cocos2d_NavMeshAgent_getSeparationWeight); + oluacls_func(L, "getSyncFlag", _olua_fun_cocos2d_NavMeshAgent_getSyncFlag); + oluacls_func(L, "getUserData", _olua_fun_cocos2d_NavMeshAgent_getUserData); + oluacls_func(L, "getVelocity", _olua_fun_cocos2d_NavMeshAgent_getVelocity); + oluacls_func(L, "isOnOffMeshLink", _olua_fun_cocos2d_NavMeshAgent_isOnOffMeshLink); + oluacls_func(L, "move", _olua_fun_cocos2d_NavMeshAgent_move); + oluacls_func(L, "new", _olua_fun_cocos2d_NavMeshAgent_new); + oluacls_func(L, "pause", _olua_fun_cocos2d_NavMeshAgent_pause); + oluacls_func(L, "resume", _olua_fun_cocos2d_NavMeshAgent_resume); + oluacls_func(L, "setAutoOrientation", _olua_fun_cocos2d_NavMeshAgent_setAutoOrientation); + oluacls_func(L, "setAutoTraverseOffMeshLink", _olua_fun_cocos2d_NavMeshAgent_setAutoTraverseOffMeshLink); + oluacls_func(L, "setHeight", _olua_fun_cocos2d_NavMeshAgent_setHeight); + oluacls_func(L, "setMaxAcceleration", _olua_fun_cocos2d_NavMeshAgent_setMaxAcceleration); + oluacls_func(L, "setMaxSpeed", _olua_fun_cocos2d_NavMeshAgent_setMaxSpeed); + oluacls_func(L, "setObstacleAvoidanceType", _olua_fun_cocos2d_NavMeshAgent_setObstacleAvoidanceType); + oluacls_func(L, "setOrientationRefAxes", _olua_fun_cocos2d_NavMeshAgent_setOrientationRefAxes); + oluacls_func(L, "setRadius", _olua_fun_cocos2d_NavMeshAgent_setRadius); + oluacls_func(L, "setSeparationWeight", _olua_fun_cocos2d_NavMeshAgent_setSeparationWeight); + oluacls_func(L, "setSyncFlag", _olua_fun_cocos2d_NavMeshAgent_setSyncFlag); + oluacls_func(L, "setUserData", _olua_fun_cocos2d_NavMeshAgent_setUserData); + oluacls_func(L, "stop", _olua_fun_cocos2d_NavMeshAgent_stop); + oluacls_func(L, "syncToAgent", _olua_fun_cocos2d_NavMeshAgent_syncToAgent); + oluacls_func(L, "syncToNode", _olua_fun_cocos2d_NavMeshAgent_syncToNode); + oluacls_prop(L, "currentOffMeshLinkData", _olua_fun_cocos2d_NavMeshAgent_getCurrentOffMeshLinkData, nullptr); + oluacls_prop(L, "currentVelocity", _olua_fun_cocos2d_NavMeshAgent_getCurrentVelocity, nullptr); + oluacls_prop(L, "height", _olua_fun_cocos2d_NavMeshAgent_getHeight, _olua_fun_cocos2d_NavMeshAgent_setHeight); + oluacls_prop(L, "maxAcceleration", _olua_fun_cocos2d_NavMeshAgent_getMaxAcceleration, _olua_fun_cocos2d_NavMeshAgent_setMaxAcceleration); + oluacls_prop(L, "maxSpeed", _olua_fun_cocos2d_NavMeshAgent_getMaxSpeed, _olua_fun_cocos2d_NavMeshAgent_setMaxSpeed); + oluacls_prop(L, "navMeshAgentComponentName", _olua_fun_cocos2d_NavMeshAgent_getNavMeshAgentComponentName, nullptr); + oluacls_prop(L, "obstacleAvoidanceType", _olua_fun_cocos2d_NavMeshAgent_getObstacleAvoidanceType, _olua_fun_cocos2d_NavMeshAgent_setObstacleAvoidanceType); + oluacls_prop(L, "onOffMeshLink", _olua_fun_cocos2d_NavMeshAgent_isOnOffMeshLink, nullptr); + oluacls_prop(L, "radius", _olua_fun_cocos2d_NavMeshAgent_getRadius, _olua_fun_cocos2d_NavMeshAgent_setRadius); + oluacls_prop(L, "separationWeight", _olua_fun_cocos2d_NavMeshAgent_getSeparationWeight, _olua_fun_cocos2d_NavMeshAgent_setSeparationWeight); + oluacls_prop(L, "syncFlag", _olua_fun_cocos2d_NavMeshAgent_getSyncFlag, _olua_fun_cocos2d_NavMeshAgent_setSyncFlag); + oluacls_prop(L, "userData", _olua_fun_cocos2d_NavMeshAgent_getUserData, _olua_fun_cocos2d_NavMeshAgent_setUserData); + oluacls_prop(L, "velocity", _olua_fun_cocos2d_NavMeshAgent_getVelocity, nullptr); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_NavMeshAgent(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.NavMeshAgent")) { + luaL_error(L, "class not found: cocos2d::NavMeshAgent"); + } return 1; } OLUA_END_DECLS #endif #if CC_USE_NAVMESH -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_NavMeshObstacle_NavMeshObstacleSyncFlag(lua_State *L) +static int _olua_cls_cc_NavMeshObstacle_NavMeshObstacleSyncFlag(lua_State *L) { oluacls_class(L, "cc.NavMeshObstacle.NavMeshObstacleSyncFlag"); oluacls_func(L, "__index", olua_indexerror); @@ -53386,11 +56271,21 @@ OLUA_LIB int luaopen_cocos2d_NavMeshObstacle_NavMeshObstacleSyncFlag(lua_State * return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_NavMeshObstacle_NavMeshObstacleSyncFlag(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.NavMeshObstacle.NavMeshObstacleSyncFlag")) { + luaL_error(L, "class not found: cocos2d::NavMeshObstacle::NavMeshObstacleSyncFlag"); + } + return 1; +} OLUA_END_DECLS #endif #if CC_USE_NAVMESH -static int _cocos2d_NavMeshObstacle_create(lua_State *L) +static int _olua_fun_cocos2d_NavMeshObstacle_create(lua_State *L) { olua_startinvoke(L); @@ -53409,7 +56304,7 @@ static int _cocos2d_NavMeshObstacle_create(lua_State *L) return num_ret; } -static int _cocos2d_NavMeshObstacle_getHeight(lua_State *L) +static int _olua_fun_cocos2d_NavMeshObstacle_getHeight(lua_State *L) { olua_startinvoke(L); @@ -53426,7 +56321,7 @@ static int _cocos2d_NavMeshObstacle_getHeight(lua_State *L) return num_ret; } -static int _cocos2d_NavMeshObstacle_getNavMeshObstacleComponentName(lua_State *L) +static int _olua_fun_cocos2d_NavMeshObstacle_getNavMeshObstacleComponentName(lua_State *L) { olua_startinvoke(L); @@ -53439,7 +56334,7 @@ static int _cocos2d_NavMeshObstacle_getNavMeshObstacleComponentName(lua_State *L return num_ret; } -static int _cocos2d_NavMeshObstacle_getRadius(lua_State *L) +static int _olua_fun_cocos2d_NavMeshObstacle_getRadius(lua_State *L) { olua_startinvoke(L); @@ -53456,7 +56351,7 @@ static int _cocos2d_NavMeshObstacle_getRadius(lua_State *L) return num_ret; } -static int _cocos2d_NavMeshObstacle_getSyncFlag(lua_State *L) +static int _olua_fun_cocos2d_NavMeshObstacle_getSyncFlag(lua_State *L) { olua_startinvoke(L); @@ -53473,7 +56368,7 @@ static int _cocos2d_NavMeshObstacle_getSyncFlag(lua_State *L) return num_ret; } -static int _cocos2d_NavMeshObstacle_initWith(lua_State *L) +static int _olua_fun_cocos2d_NavMeshObstacle_initWith(lua_State *L) { olua_startinvoke(L); @@ -53494,11 +56389,11 @@ static int _cocos2d_NavMeshObstacle_initWith(lua_State *L) return num_ret; } -static int _cocos2d_NavMeshObstacle_new(lua_State *L) +static int _olua_fun_cocos2d_NavMeshObstacle_new(lua_State *L) { olua_startinvoke(L); - // NavMeshObstacle() + // cocos2d::NavMeshObstacle() cocos2d::NavMeshObstacle *ret = new cocos2d::NavMeshObstacle(); int num_ret = olua_push_object(L, ret, "cc.NavMeshObstacle"); olua_postnew(L, ret); @@ -53508,7 +56403,7 @@ static int _cocos2d_NavMeshObstacle_new(lua_State *L) return num_ret; } -static int _cocos2d_NavMeshObstacle_setHeight(lua_State *L) +static int _olua_fun_cocos2d_NavMeshObstacle_setHeight(lua_State *L) { olua_startinvoke(L); @@ -53526,7 +56421,7 @@ static int _cocos2d_NavMeshObstacle_setHeight(lua_State *L) return 0; } -static int _cocos2d_NavMeshObstacle_setRadius(lua_State *L) +static int _olua_fun_cocos2d_NavMeshObstacle_setRadius(lua_State *L) { olua_startinvoke(L); @@ -53544,7 +56439,7 @@ static int _cocos2d_NavMeshObstacle_setRadius(lua_State *L) return 0; } -static int _cocos2d_NavMeshObstacle_setSyncFlag(lua_State *L) +static int _olua_fun_cocos2d_NavMeshObstacle_setSyncFlag(lua_State *L) { olua_startinvoke(L); @@ -53562,7 +56457,7 @@ static int _cocos2d_NavMeshObstacle_setSyncFlag(lua_State *L) return 0; } -static int _cocos2d_NavMeshObstacle_syncToNode(lua_State *L) +static int _olua_fun_cocos2d_NavMeshObstacle_syncToNode(lua_State *L) { olua_startinvoke(L); @@ -53578,7 +56473,7 @@ static int _cocos2d_NavMeshObstacle_syncToNode(lua_State *L) return 0; } -static int _cocos2d_NavMeshObstacle_syncToObstacle(lua_State *L) +static int _olua_fun_cocos2d_NavMeshObstacle_syncToObstacle(lua_State *L) { olua_startinvoke(L); @@ -53594,34 +56489,43 @@ static int _cocos2d_NavMeshObstacle_syncToObstacle(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_NavMeshObstacle(lua_State *L) +static int _olua_cls_cc_NavMeshObstacle(lua_State *L) { oluacls_class(L, "cc.NavMeshObstacle"); - oluacls_func(L, "create", _cocos2d_NavMeshObstacle_create); - oluacls_func(L, "getHeight", _cocos2d_NavMeshObstacle_getHeight); - oluacls_func(L, "getNavMeshObstacleComponentName", _cocos2d_NavMeshObstacle_getNavMeshObstacleComponentName); - oluacls_func(L, "getRadius", _cocos2d_NavMeshObstacle_getRadius); - oluacls_func(L, "getSyncFlag", _cocos2d_NavMeshObstacle_getSyncFlag); - oluacls_func(L, "initWith", _cocos2d_NavMeshObstacle_initWith); - oluacls_func(L, "new", _cocos2d_NavMeshObstacle_new); - oluacls_func(L, "setHeight", _cocos2d_NavMeshObstacle_setHeight); - oluacls_func(L, "setRadius", _cocos2d_NavMeshObstacle_setRadius); - oluacls_func(L, "setSyncFlag", _cocos2d_NavMeshObstacle_setSyncFlag); - oluacls_func(L, "syncToNode", _cocos2d_NavMeshObstacle_syncToNode); - oluacls_func(L, "syncToObstacle", _cocos2d_NavMeshObstacle_syncToObstacle); - oluacls_prop(L, "height", _cocos2d_NavMeshObstacle_getHeight, _cocos2d_NavMeshObstacle_setHeight); - oluacls_prop(L, "navMeshObstacleComponentName", _cocos2d_NavMeshObstacle_getNavMeshObstacleComponentName, nullptr); - oluacls_prop(L, "radius", _cocos2d_NavMeshObstacle_getRadius, _cocos2d_NavMeshObstacle_setRadius); - oluacls_prop(L, "syncFlag", _cocos2d_NavMeshObstacle_getSyncFlag, _cocos2d_NavMeshObstacle_setSyncFlag); + oluacls_func(L, "create", _olua_fun_cocos2d_NavMeshObstacle_create); + oluacls_func(L, "getHeight", _olua_fun_cocos2d_NavMeshObstacle_getHeight); + oluacls_func(L, "getNavMeshObstacleComponentName", _olua_fun_cocos2d_NavMeshObstacle_getNavMeshObstacleComponentName); + oluacls_func(L, "getRadius", _olua_fun_cocos2d_NavMeshObstacle_getRadius); + oluacls_func(L, "getSyncFlag", _olua_fun_cocos2d_NavMeshObstacle_getSyncFlag); + oluacls_func(L, "initWith", _olua_fun_cocos2d_NavMeshObstacle_initWith); + oluacls_func(L, "new", _olua_fun_cocos2d_NavMeshObstacle_new); + oluacls_func(L, "setHeight", _olua_fun_cocos2d_NavMeshObstacle_setHeight); + oluacls_func(L, "setRadius", _olua_fun_cocos2d_NavMeshObstacle_setRadius); + oluacls_func(L, "setSyncFlag", _olua_fun_cocos2d_NavMeshObstacle_setSyncFlag); + oluacls_func(L, "syncToNode", _olua_fun_cocos2d_NavMeshObstacle_syncToNode); + oluacls_func(L, "syncToObstacle", _olua_fun_cocos2d_NavMeshObstacle_syncToObstacle); + oluacls_prop(L, "height", _olua_fun_cocos2d_NavMeshObstacle_getHeight, _olua_fun_cocos2d_NavMeshObstacle_setHeight); + oluacls_prop(L, "navMeshObstacleComponentName", _olua_fun_cocos2d_NavMeshObstacle_getNavMeshObstacleComponentName, nullptr); + oluacls_prop(L, "radius", _olua_fun_cocos2d_NavMeshObstacle_getRadius, _olua_fun_cocos2d_NavMeshObstacle_setRadius); + oluacls_prop(L, "syncFlag", _olua_fun_cocos2d_NavMeshObstacle_getSyncFlag, _olua_fun_cocos2d_NavMeshObstacle_setSyncFlag); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_NavMeshObstacle(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.NavMeshObstacle")) { + luaL_error(L, "class not found: cocos2d::NavMeshObstacle"); + } return 1; } OLUA_END_DECLS #endif #if CC_USE_NAVMESH -static int _cocos2d_NavMesh_addNavMeshAgent(lua_State *L) +static int _olua_fun_cocos2d_NavMesh_addNavMeshAgent(lua_State *L) { olua_startinvoke(L); @@ -53639,7 +56543,7 @@ static int _cocos2d_NavMesh_addNavMeshAgent(lua_State *L) return 0; } -static int _cocos2d_NavMesh_addNavMeshObstacle(lua_State *L) +static int _olua_fun_cocos2d_NavMesh_addNavMeshObstacle(lua_State *L) { olua_startinvoke(L); @@ -53657,7 +56561,7 @@ static int _cocos2d_NavMesh_addNavMeshObstacle(lua_State *L) return 0; } -static int _cocos2d_NavMesh_create(lua_State *L) +static int _olua_fun_cocos2d_NavMesh_create(lua_State *L) { olua_startinvoke(L); @@ -53676,7 +56580,7 @@ static int _cocos2d_NavMesh_create(lua_State *L) return num_ret; } -static int _cocos2d_NavMesh_debugDraw(lua_State *L) +static int _olua_fun_cocos2d_NavMesh_debugDraw(lua_State *L) { olua_startinvoke(L); @@ -53694,13 +56598,13 @@ static int _cocos2d_NavMesh_debugDraw(lua_State *L) return 0; } -static int _cocos2d_NavMesh_findPath(lua_State *L) +static int _olua_fun_cocos2d_NavMesh_findPath(lua_State *L) { olua_startinvoke(L); cocos2d::NavMesh *self = nullptr; - cocos2d::Vec3 arg1; /** start */ - cocos2d::Vec3 arg2; /** end */ + cocos2d::Vec3 *arg1; /** start */ + cocos2d::Vec3 *arg2; /** end_ */ std::vector arg3; /** pathPoints */ olua_to_object(L, 1, &self, "cc.NavMesh"); @@ -53710,15 +56614,15 @@ static int _cocos2d_NavMesh_findPath(lua_State *L) olua_check_object(L, -1, arg1, "cc.Vec3"); }); - // void findPath(const cocos2d::Vec3 &start, const cocos2d::Vec3 &end, std::vector &pathPoints) - self->findPath(arg1, arg2, arg3); + // void findPath(const cocos2d::Vec3 &start, const cocos2d::Vec3 &end_, std::vector &pathPoints) + self->findPath(*arg1, *arg2, arg3); olua_endinvoke(L); return 0; } -static int _cocos2d_NavMesh_isDebugDrawEnabled(lua_State *L) +static int _olua_fun_cocos2d_NavMesh_isDebugDrawEnabled(lua_State *L) { olua_startinvoke(L); @@ -53735,11 +56639,11 @@ static int _cocos2d_NavMesh_isDebugDrawEnabled(lua_State *L) return num_ret; } -static int _cocos2d_NavMesh_new(lua_State *L) +static int _olua_fun_cocos2d_NavMesh_new(lua_State *L) { olua_startinvoke(L); - // NavMesh() + // cocos2d::NavMesh() cocos2d::NavMesh *ret = new cocos2d::NavMesh(); int num_ret = olua_push_object(L, ret, "cc.NavMesh"); olua_postnew(L, ret); @@ -53749,7 +56653,7 @@ static int _cocos2d_NavMesh_new(lua_State *L) return num_ret; } -static int _cocos2d_NavMesh_removeNavMeshAgent(lua_State *L) +static int _olua_fun_cocos2d_NavMesh_removeNavMeshAgent(lua_State *L) { olua_startinvoke(L); @@ -53767,7 +56671,7 @@ static int _cocos2d_NavMesh_removeNavMeshAgent(lua_State *L) return 0; } -static int _cocos2d_NavMesh_removeNavMeshObstacle(lua_State *L) +static int _olua_fun_cocos2d_NavMesh_removeNavMeshObstacle(lua_State *L) { olua_startinvoke(L); @@ -53785,7 +56689,7 @@ static int _cocos2d_NavMesh_removeNavMeshObstacle(lua_State *L) return 0; } -static int _cocos2d_NavMesh_setDebugDrawEnable(lua_State *L) +static int _olua_fun_cocos2d_NavMesh_setDebugDrawEnable(lua_State *L) { olua_startinvoke(L); @@ -53803,7 +56707,7 @@ static int _cocos2d_NavMesh_setDebugDrawEnable(lua_State *L) return 0; } -static int _cocos2d_NavMesh_update(lua_State *L) +static int _olua_fun_cocos2d_NavMesh_update(lua_State *L) { olua_startinvoke(L); @@ -53821,23 +56725,32 @@ static int _cocos2d_NavMesh_update(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_NavMesh(lua_State *L) +static int _olua_cls_cc_NavMesh(lua_State *L) { oluacls_class(L, "cc.NavMesh"); - oluacls_func(L, "addNavMeshAgent", _cocos2d_NavMesh_addNavMeshAgent); - oluacls_func(L, "addNavMeshObstacle", _cocos2d_NavMesh_addNavMeshObstacle); - oluacls_func(L, "create", _cocos2d_NavMesh_create); - oluacls_func(L, "debugDraw", _cocos2d_NavMesh_debugDraw); - oluacls_func(L, "findPath", _cocos2d_NavMesh_findPath); - oluacls_func(L, "isDebugDrawEnabled", _cocos2d_NavMesh_isDebugDrawEnabled); - oluacls_func(L, "new", _cocos2d_NavMesh_new); - oluacls_func(L, "removeNavMeshAgent", _cocos2d_NavMesh_removeNavMeshAgent); - oluacls_func(L, "removeNavMeshObstacle", _cocos2d_NavMesh_removeNavMeshObstacle); - oluacls_func(L, "setDebugDrawEnable", _cocos2d_NavMesh_setDebugDrawEnable); - oluacls_func(L, "update", _cocos2d_NavMesh_update); - oluacls_prop(L, "debugDrawEnabled", _cocos2d_NavMesh_isDebugDrawEnabled, nullptr); + oluacls_func(L, "addNavMeshAgent", _olua_fun_cocos2d_NavMesh_addNavMeshAgent); + oluacls_func(L, "addNavMeshObstacle", _olua_fun_cocos2d_NavMesh_addNavMeshObstacle); + oluacls_func(L, "create", _olua_fun_cocos2d_NavMesh_create); + oluacls_func(L, "debugDraw", _olua_fun_cocos2d_NavMesh_debugDraw); + oluacls_func(L, "findPath", _olua_fun_cocos2d_NavMesh_findPath); + oluacls_func(L, "isDebugDrawEnabled", _olua_fun_cocos2d_NavMesh_isDebugDrawEnabled); + oluacls_func(L, "new", _olua_fun_cocos2d_NavMesh_new); + oluacls_func(L, "removeNavMeshAgent", _olua_fun_cocos2d_NavMesh_removeNavMeshAgent); + oluacls_func(L, "removeNavMeshObstacle", _olua_fun_cocos2d_NavMesh_removeNavMeshObstacle); + oluacls_func(L, "setDebugDrawEnable", _olua_fun_cocos2d_NavMesh_setDebugDrawEnable); + oluacls_func(L, "update", _olua_fun_cocos2d_NavMesh_update); + oluacls_prop(L, "debugDrawEnabled", _olua_fun_cocos2d_NavMesh_isDebugDrawEnabled, nullptr); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_NavMesh(lua_State *L) +{ + olua_require(L, "cocos2d", luaopen_cocos2d); + if (!olua_getclass(L, "cc.NavMesh")) { + luaL_error(L, "class not found: cocos2d::NavMesh"); + } return 1; } OLUA_END_DECLS @@ -53846,218 +56759,218 @@ OLUA_END_DECLS OLUA_BEGIN_DECLS OLUA_LIB int luaopen_cocos2d(lua_State *L) { - olua_require(L, "cc.RenderTargetFlag", luaopen_cocos2d_RenderTargetFlag); - olua_require(L, "cc.ClearFlag", luaopen_cocos2d_ClearFlag); - olua_require(L, "cc.MATRIX_STACK_TYPE", luaopen_cocos2d_MATRIX_STACK_TYPE); - olua_require(L, "cc.Director.Projection", luaopen_cocos2d_Director_Projection); - olua_require(L, "cc.UserDefault", luaopen_cocos2d_UserDefault); - olua_require(L, "cc.Ref", luaopen_cocos2d_Ref); - olua_require(L, "cc.Clonable", luaopen_cocos2d_Clonable); - olua_require(L, "cc.Console", luaopen_cocos2d_Console); - olua_require(L, "cc.Acceleration", luaopen_cocos2d_Acceleration); - olua_require(L, "cc.Director", luaopen_cocos2d_Director); - olua_require(L, "cc.ccSchedulerFunc", luaopen_cocos2d_ccSchedulerFunc); - olua_require(L, "cc.Scheduler", luaopen_cocos2d_Scheduler); - olua_require(L, "cc.EventDispatcher", luaopen_cocos2d_EventDispatcher); - olua_require(L, "cc.EventListener.Type", luaopen_cocos2d_EventListener_Type); - olua_require(L, "cc.EventListener", luaopen_cocos2d_EventListener); - olua_require(L, "cc.EventListenerTouchOneByOne.ccTouchBeganCallback", luaopen_cocos2d_EventListenerTouchOneByOne_ccTouchBeganCallback); - olua_require(L, "cc.EventListenerTouchOneByOne.ccTouchCallback", luaopen_cocos2d_EventListenerTouchOneByOne_ccTouchCallback); - olua_require(L, "cc.EventListenerTouchOneByOne", luaopen_cocos2d_EventListenerTouchOneByOne); - olua_require(L, "cc.EventListenerTouchAllAtOnce.ccTouchesCallback", luaopen_cocos2d_EventListenerTouchAllAtOnce_ccTouchesCallback); - olua_require(L, "cc.EventListenerTouchAllAtOnce", luaopen_cocos2d_EventListenerTouchAllAtOnce); - olua_require(L, "cc.EventListenerCustom", luaopen_cocos2d_EventListenerCustom); - olua_require(L, "cc.EventListenerKeyboard", luaopen_cocos2d_EventListenerKeyboard); - olua_require(L, "cc.EventListenerAcceleration", luaopen_cocos2d_EventListenerAcceleration); - olua_require(L, "cc.EventListenerFocus", luaopen_cocos2d_EventListenerFocus); - olua_require(L, "cc.EventListenerMouse", luaopen_cocos2d_EventListenerMouse); - olua_require(L, "cc.Event.Type", luaopen_cocos2d_Event_Type); - olua_require(L, "cc.Event", luaopen_cocos2d_Event); - olua_require(L, "cc.EventCustom", luaopen_cocos2d_EventCustom); - olua_require(L, "cc.EventListenerController", luaopen_cocos2d_EventListenerController); - olua_require(L, "cc.EventTouch.EventCode", luaopen_cocos2d_EventTouch_EventCode); - olua_require(L, "cc.EventTouch", luaopen_cocos2d_EventTouch); - olua_require(L, "cc.EventKeyboard", luaopen_cocos2d_EventKeyboard); - olua_require(L, "cc.EventAcceleration", luaopen_cocos2d_EventAcceleration); - olua_require(L, "cc.EventFocus", luaopen_cocos2d_EventFocus); - olua_require(L, "cc.EventMouse.MouseEventType", luaopen_cocos2d_EventMouse_MouseEventType); - olua_require(L, "cc.EventMouse.MouseButton", luaopen_cocos2d_EventMouse_MouseButton); - olua_require(L, "cc.EventMouse", luaopen_cocos2d_EventMouse); - olua_require(L, "cc.EventKeyboard.KeyCode", luaopen_cocos2d_EventKeyboard_KeyCode); - olua_require(L, "cc.Touch.DispatchMode", luaopen_cocos2d_Touch_DispatchMode); - olua_require(L, "cc.EventController.ControllerEventType", luaopen_cocos2d_EventController_ControllerEventType); - olua_require(L, "cc.EventController", luaopen_cocos2d_EventController); - olua_require(L, "cc.Touch", luaopen_cocos2d_Touch); - olua_require(L, "cc.Controller.Key", luaopen_cocos2d_Controller_Key); - olua_require(L, "cc.Controller", luaopen_cocos2d_Controller); - olua_require(L, "cc.AudioProfile", luaopen_cocos2d_AudioProfile); - olua_require(L, "cc.AudioEngine.AudioState", luaopen_cocos2d_AudioEngine_AudioState); - olua_require(L, "cc.AudioEngine", luaopen_cocos2d_AudioEngine); - olua_require(L, "cc.ApplicationProtocol.Platform", luaopen_cocos2d_ApplicationProtocol_Platform); - olua_require(L, "cc.LanguageType", luaopen_cocos2d_LanguageType); - olua_require(L, "cc.ApplicationProtocol", luaopen_cocos2d_ApplicationProtocol); - olua_require(L, "cc.Application", luaopen_cocos2d_Application); - olua_require(L, "cc.Device", luaopen_cocos2d_Device); - olua_require(L, "cc.ResizableBuffer", luaopen_cocos2d_ResizableBuffer); - olua_require(L, "cc.FileUtils.Status", luaopen_cocos2d_FileUtils_Status); - olua_require(L, "cc.FileUtils", luaopen_cocos2d_FileUtils); - olua_require(L, "cc.ResolutionPolicy", luaopen_ResolutionPolicy); - olua_require(L, "cc.GLView", luaopen_cocos2d_GLView); - olua_require(L, "cc.GLViewImpl", luaopen_cocos2d_GLViewImpl); - olua_require(L, "cc.Image.Format", luaopen_cocos2d_Image_Format); - olua_require(L, "cc.Image", luaopen_cocos2d_Image); - olua_require(L, "cc.Properties.Type", luaopen_cocos2d_Properties_Type); - olua_require(L, "cc.Properties", luaopen_cocos2d_Properties); - olua_require(L, "cc.Material", luaopen_cocos2d_Material); - olua_require(L, "cc.Renderer", luaopen_cocos2d_Renderer); - olua_require(L, "cc.RenderCommand.Type", luaopen_cocos2d_RenderCommand_Type); - olua_require(L, "cc.CustomCommand.DrawType", luaopen_cocos2d_CustomCommand_DrawType); - olua_require(L, "cc.PipelineDescriptor", luaopen_cocos2d_PipelineDescriptor); - olua_require(L, "cc.Technique", luaopen_cocos2d_Technique); - olua_require(L, "cc.Pass", luaopen_cocos2d_Pass); - olua_require(L, "cc.RenderState", luaopen_cocos2d_RenderState); - olua_require(L, "cc.RenderCommand", luaopen_cocos2d_RenderCommand); - olua_require(L, "cc.CustomCommand", luaopen_cocos2d_CustomCommand); - olua_require(L, "cc.MeshCommand", luaopen_cocos2d_MeshCommand); - olua_require(L, "cc.TextureCache", luaopen_cocos2d_TextureCache); - olua_require(L, "cc.Texture2D", luaopen_cocos2d_Texture2D); - olua_require(L, "cc.TextureCube", luaopen_cocos2d_TextureCube); - olua_require(L, "cc.TextureAtlas", luaopen_cocos2d_TextureAtlas); - olua_require(L, "cc.WebSocket.ErrorCode", luaopen_cocos2d_network_WebSocket_ErrorCode); - olua_require(L, "cc.WebSocket.State", luaopen_cocos2d_network_WebSocket_State); - olua_require(L, "cc.WebSocket.Delegate", luaopen_cocos2d_network_WebSocket_Delegate); - olua_require(L, "cc.WebSocket", luaopen_cocos2d_network_WebSocket); - olua_require(L, "cc.LuaWebSocketDelegate", luaopen_cocos2d_LuaWebSocketDelegate); - olua_require(L, "cc.ActionManager", luaopen_cocos2d_ActionManager); - olua_require(L, "cc.Component", luaopen_cocos2d_Component); - olua_require(L, "cc.LuaComponent", luaopen_cocos2d_LuaComponent); - olua_require(L, "cc.Node", luaopen_cocos2d_Node); - olua_require(L, "cc.BlendProtocol", luaopen_cocos2d_BlendProtocol); - olua_require(L, "cc.TextureProtocol", luaopen_cocos2d_TextureProtocol); - olua_require(L, "cc.AtlasNode", luaopen_cocos2d_AtlasNode); - olua_require(L, "cc.sImageTGA", luaopen_cocos2d_sImageTGA); - olua_require(L, "cc.TileMapAtlas", luaopen_cocos2d_TileMapAtlas); - olua_require(L, "cc.ClippingNode", luaopen_cocos2d_ClippingNode); - olua_require(L, "cc.MotionStreak", luaopen_cocos2d_MotionStreak); - olua_require(L, "cc.ProtectedNode", luaopen_cocos2d_ProtectedNode); - olua_require(L, "cc.DrawNode", luaopen_cocos2d_DrawNode); - olua_require(L, "cc.ParallaxNode", luaopen_cocos2d_ParallaxNode); - olua_require(L, "cc.TextHAlignment", luaopen_cocos2d_TextHAlignment); - olua_require(L, "cc.TextVAlignment", luaopen_cocos2d_TextVAlignment); - olua_require(L, "cc.GlyphCollection", luaopen_cocos2d_GlyphCollection); - olua_require(L, "cc.LabelEffect", luaopen_cocos2d_LabelEffect); - olua_require(L, "cc.Label.LabelType", luaopen_cocos2d_Label_LabelType); - olua_require(L, "cc.Label.Overflow", luaopen_cocos2d_Label_Overflow); - olua_require(L, "cc.LabelProtocol", luaopen_cocos2d_LabelProtocol); - olua_require(L, "cc.Label", luaopen_cocos2d_Label); - olua_require(L, "cc.LabelAtlas", luaopen_cocos2d_LabelAtlas); - olua_require(L, "cc.FontAtlas", luaopen_cocos2d_FontAtlas); - olua_require(L, "cc.ClippingRectangleNode", luaopen_cocos2d_ClippingRectangleNode); - olua_require(L, "cc.RenderTexture", luaopen_cocos2d_RenderTexture); - olua_require(L, "cc.ProgressTimer.Type", luaopen_cocos2d_ProgressTimer_Type); - olua_require(L, "cc.ProgressTimer", luaopen_cocos2d_ProgressTimer); - olua_require(L, "cc.AnimationFrame", luaopen_cocos2d_AnimationFrame); - olua_require(L, "cc.Animation", luaopen_cocos2d_Animation); - olua_require(L, "cc.SpriteFrame", luaopen_cocos2d_SpriteFrame); - olua_require(L, "cc.Sprite", luaopen_cocos2d_Sprite); - olua_require(L, "cc.SpriteBatchNode", luaopen_cocos2d_SpriteBatchNode); - olua_require(L, "cc.SpriteFrameCache", luaopen_cocos2d_SpriteFrameCache); - olua_require(L, "cc.AnimationCache", luaopen_cocos2d_AnimationCache); - olua_require(L, "cc.Scene", luaopen_cocos2d_Scene); - olua_require(L, "cc.Layer", luaopen_cocos2d_Layer); - olua_require(L, "cc.LayerColor", luaopen_cocos2d_LayerColor); - olua_require(L, "cc.LayerGradient", luaopen_cocos2d_LayerGradient); - olua_require(L, "cc.LayerRadialGradient", luaopen_cocos2d_LayerRadialGradient); - olua_require(L, "cc.LayerMultiplex", luaopen_cocos2d_LayerMultiplex); - olua_require(L, "cc.TransitionScene.Orientation", luaopen_cocos2d_TransitionScene_Orientation); - olua_require(L, "cc.TransitionScene", luaopen_cocos2d_TransitionScene); - olua_require(L, "cc.TransitionEaseScene", luaopen_cocos2d_TransitionEaseScene); - olua_require(L, "cc.TransitionSceneOriented", luaopen_cocos2d_TransitionSceneOriented); - olua_require(L, "cc.TransitionRotoZoom", luaopen_cocos2d_TransitionRotoZoom); - olua_require(L, "cc.TransitionJumpZoom", luaopen_cocos2d_TransitionJumpZoom); - olua_require(L, "cc.TransitionMoveInL", luaopen_cocos2d_TransitionMoveInL); - olua_require(L, "cc.TransitionMoveInR", luaopen_cocos2d_TransitionMoveInR); - olua_require(L, "cc.TransitionMoveInT", luaopen_cocos2d_TransitionMoveInT); - olua_require(L, "cc.TransitionMoveInB", luaopen_cocos2d_TransitionMoveInB); - olua_require(L, "cc.TransitionSlideInL", luaopen_cocos2d_TransitionSlideInL); - olua_require(L, "cc.TransitionSlideInR", luaopen_cocos2d_TransitionSlideInR); - olua_require(L, "cc.TransitionSlideInB", luaopen_cocos2d_TransitionSlideInB); - olua_require(L, "cc.TransitionSlideInT", luaopen_cocos2d_TransitionSlideInT); - olua_require(L, "cc.TransitionShrinkGrow", luaopen_cocos2d_TransitionShrinkGrow); - olua_require(L, "cc.TransitionFlipX", luaopen_cocos2d_TransitionFlipX); - olua_require(L, "cc.TransitionFlipY", luaopen_cocos2d_TransitionFlipY); - olua_require(L, "cc.TransitionFlipAngular", luaopen_cocos2d_TransitionFlipAngular); - olua_require(L, "cc.TransitionZoomFlipX", luaopen_cocos2d_TransitionZoomFlipX); - olua_require(L, "cc.TransitionZoomFlipY", luaopen_cocos2d_TransitionZoomFlipY); - olua_require(L, "cc.TransitionZoomFlipAngular", luaopen_cocos2d_TransitionZoomFlipAngular); - olua_require(L, "cc.TransitionFade", luaopen_cocos2d_TransitionFade); - olua_require(L, "cc.TransitionCrossFade", luaopen_cocos2d_TransitionCrossFade); - olua_require(L, "cc.TransitionTurnOffTiles", luaopen_cocos2d_TransitionTurnOffTiles); - olua_require(L, "cc.TransitionSplitCols", luaopen_cocos2d_TransitionSplitCols); - olua_require(L, "cc.TransitionSplitRows", luaopen_cocos2d_TransitionSplitRows); - olua_require(L, "cc.TransitionFadeTR", luaopen_cocos2d_TransitionFadeTR); - olua_require(L, "cc.TransitionFadeBL", luaopen_cocos2d_TransitionFadeBL); - olua_require(L, "cc.TransitionFadeUp", luaopen_cocos2d_TransitionFadeUp); - olua_require(L, "cc.TransitionFadeDown", luaopen_cocos2d_TransitionFadeDown); - olua_require(L, "cc.TransitionPageTurn", luaopen_cocos2d_TransitionPageTurn); - olua_require(L, "cc.TransitionProgress", luaopen_cocos2d_TransitionProgress); - olua_require(L, "cc.TransitionProgressRadialCCW", luaopen_cocos2d_TransitionProgressRadialCCW); - olua_require(L, "cc.TransitionProgressRadialCW", luaopen_cocos2d_TransitionProgressRadialCW); - olua_require(L, "cc.TransitionProgressHorizontal", luaopen_cocos2d_TransitionProgressHorizontal); - olua_require(L, "cc.TransitionProgressVertical", luaopen_cocos2d_TransitionProgressVertical); - olua_require(L, "cc.TransitionProgressInOut", luaopen_cocos2d_TransitionProgressInOut); - olua_require(L, "cc.TransitionProgressOutIn", luaopen_cocos2d_TransitionProgressOutIn); - olua_require(L, "cc.IMEDelegate", luaopen_cocos2d_IMEDelegate); - olua_require(L, "cc.TextFieldDelegate", luaopen_cocos2d_TextFieldDelegate); - olua_require(L, "cc.TextFieldTTF", luaopen_cocos2d_TextFieldTTF); - olua_require(L, "cc.LightType", luaopen_cocos2d_LightType); - olua_require(L, "cc.LightFlag", luaopen_cocos2d_LightFlag); - olua_require(L, "cc.BaseLight", luaopen_cocos2d_BaseLight); - olua_require(L, "cc.DirectionLight", luaopen_cocos2d_DirectionLight); - olua_require(L, "cc.PointLight", luaopen_cocos2d_PointLight); - olua_require(L, "cc.SpotLight", luaopen_cocos2d_SpotLight); - olua_require(L, "cc.AmbientLight", luaopen_cocos2d_AmbientLight); - olua_require(L, "cc.CameraFlag", luaopen_cocos2d_CameraFlag); - olua_require(L, "cc.Camera.Type", luaopen_cocos2d_Camera_Type); - olua_require(L, "cc.Camera", luaopen_cocos2d_Camera); - olua_require(L, "cc.CameraBackgroundBrush.BrushType", luaopen_cocos2d_CameraBackgroundBrush_BrushType); - olua_require(L, "cc.CameraBackgroundBrush", luaopen_cocos2d_CameraBackgroundBrush); - olua_require(L, "cc.CameraBackgroundDepthBrush", luaopen_cocos2d_CameraBackgroundDepthBrush); - olua_require(L, "cc.CameraBackgroundColorBrush", luaopen_cocos2d_CameraBackgroundColorBrush); - olua_require(L, "cc.CameraBackgroundSkyBoxBrush", luaopen_cocos2d_CameraBackgroundSkyBoxBrush); - olua_require(L, "cc.PlayableProtocol", luaopen_cocos2d_PlayableProtocol); - olua_require(L, "cc.ParticleBatchNode", luaopen_cocos2d_ParticleBatchNode); - olua_require(L, "cc.ParticleSystem.Mode", luaopen_cocos2d_ParticleSystem_Mode); - olua_require(L, "cc.ParticleSystem.PositionType", luaopen_cocos2d_ParticleSystem_PositionType); - olua_require(L, "cc.ParticleSystem", luaopen_cocos2d_ParticleSystem); - olua_require(L, "cc.ParticleSystemQuad", luaopen_cocos2d_ParticleSystemQuad); - olua_require(L, "cc.ParticleExplosion", luaopen_cocos2d_ParticleExplosion); - olua_require(L, "cc.ParticleFire", luaopen_cocos2d_ParticleFire); - olua_require(L, "cc.ParticleFireworks", luaopen_cocos2d_ParticleFireworks); - olua_require(L, "cc.ParticleFlower", luaopen_cocos2d_ParticleFlower); - olua_require(L, "cc.ParticleGalaxy", luaopen_cocos2d_ParticleGalaxy); - olua_require(L, "cc.ParticleMeteor", luaopen_cocos2d_ParticleMeteor); - olua_require(L, "cc.ParticleRain", luaopen_cocos2d_ParticleRain); - olua_require(L, "cc.ParticleSmoke", luaopen_cocos2d_ParticleSmoke); - olua_require(L, "cc.ParticleSnow", luaopen_cocos2d_ParticleSnow); - olua_require(L, "cc.ParticleSpiral", luaopen_cocos2d_ParticleSpiral); - olua_require(L, "cc.ParticleSun", luaopen_cocos2d_ParticleSun); - olua_require(L, "cc.SAXDelegator", luaopen_cocos2d_SAXDelegator); - olua_require(L, "cc.TMXTileFlags", luaopen_cocos2d_TMXTileFlags); - olua_require(L, "cc.TMXObjectGroup", luaopen_cocos2d_TMXObjectGroup); - olua_require(L, "cc.TMXLayer", luaopen_cocos2d_TMXLayer); - olua_require(L, "cc.TMXLayerInfo", luaopen_cocos2d_TMXLayerInfo); - olua_require(L, "cc.TMXMapInfo", luaopen_cocos2d_TMXMapInfo); - olua_require(L, "cc.TMXTilesetInfo", luaopen_cocos2d_TMXTilesetInfo); - olua_require(L, "cc.TMXTiledMap", luaopen_cocos2d_TMXTiledMap); - olua_require(L, "cc.FastTMXTiledMap", luaopen_cocos2d_FastTMXTiledMap); - olua_require(L, "cc.FastTMXLayer", luaopen_cocos2d_FastTMXLayer); + olua_require(L, "cc.RenderTargetFlag", _olua_cls_cc_RenderTargetFlag); + olua_require(L, "cc.ClearFlag", _olua_cls_cc_ClearFlag); + olua_require(L, "cc.MATRIX_STACK_TYPE", _olua_cls_cc_MATRIX_STACK_TYPE); + olua_require(L, "cc.Director.Projection", _olua_cls_cc_Director_Projection); + olua_require(L, "cc.UserDefault", _olua_cls_cc_UserDefault); + olua_require(L, "cc.Ref", _olua_cls_cc_Ref); + olua_require(L, "cc.Clonable", _olua_cls_cc_Clonable); + olua_require(L, "cc.Console", _olua_cls_cc_Console); + olua_require(L, "cc.Acceleration", _olua_cls_cc_Acceleration); + olua_require(L, "cc.Director", _olua_cls_cc_Director); + olua_require(L, "cc.ccSchedulerFunc", _olua_cls_cc_ccSchedulerFunc); + olua_require(L, "cc.Scheduler", _olua_cls_cc_Scheduler); + olua_require(L, "cc.EventDispatcher", _olua_cls_cc_EventDispatcher); + olua_require(L, "cc.EventListener.Type", _olua_cls_cc_EventListener_Type); + olua_require(L, "cc.EventListener", _olua_cls_cc_EventListener); + olua_require(L, "cc.EventListenerTouchOneByOne.ccTouchBeganCallback", _olua_cls_cc_EventListenerTouchOneByOne_ccTouchBeganCallback); + olua_require(L, "cc.EventListenerTouchOneByOne.ccTouchCallback", _olua_cls_cc_EventListenerTouchOneByOne_ccTouchCallback); + olua_require(L, "cc.EventListenerTouchOneByOne", _olua_cls_cc_EventListenerTouchOneByOne); + olua_require(L, "cc.EventListenerTouchAllAtOnce.ccTouchesCallback", _olua_cls_cc_EventListenerTouchAllAtOnce_ccTouchesCallback); + olua_require(L, "cc.EventListenerTouchAllAtOnce", _olua_cls_cc_EventListenerTouchAllAtOnce); + olua_require(L, "cc.EventListenerCustom", _olua_cls_cc_EventListenerCustom); + olua_require(L, "cc.EventListenerKeyboard", _olua_cls_cc_EventListenerKeyboard); + olua_require(L, "cc.EventListenerAcceleration", _olua_cls_cc_EventListenerAcceleration); + olua_require(L, "cc.EventListenerFocus", _olua_cls_cc_EventListenerFocus); + olua_require(L, "cc.EventListenerMouse", _olua_cls_cc_EventListenerMouse); + olua_require(L, "cc.Event.Type", _olua_cls_cc_Event_Type); + olua_require(L, "cc.Event", _olua_cls_cc_Event); + olua_require(L, "cc.EventCustom", _olua_cls_cc_EventCustom); + olua_require(L, "cc.EventListenerController", _olua_cls_cc_EventListenerController); + olua_require(L, "cc.EventTouch.EventCode", _olua_cls_cc_EventTouch_EventCode); + olua_require(L, "cc.EventTouch", _olua_cls_cc_EventTouch); + olua_require(L, "cc.EventKeyboard", _olua_cls_cc_EventKeyboard); + olua_require(L, "cc.EventAcceleration", _olua_cls_cc_EventAcceleration); + olua_require(L, "cc.EventFocus", _olua_cls_cc_EventFocus); + olua_require(L, "cc.EventMouse.MouseEventType", _olua_cls_cc_EventMouse_MouseEventType); + olua_require(L, "cc.EventMouse.MouseButton", _olua_cls_cc_EventMouse_MouseButton); + olua_require(L, "cc.EventMouse", _olua_cls_cc_EventMouse); + olua_require(L, "cc.EventKeyboard.KeyCode", _olua_cls_cc_EventKeyboard_KeyCode); + olua_require(L, "cc.Touch.DispatchMode", _olua_cls_cc_Touch_DispatchMode); + olua_require(L, "cc.EventController.ControllerEventType", _olua_cls_cc_EventController_ControllerEventType); + olua_require(L, "cc.EventController", _olua_cls_cc_EventController); + olua_require(L, "cc.Touch", _olua_cls_cc_Touch); + olua_require(L, "cc.Controller.Key", _olua_cls_cc_Controller_Key); + olua_require(L, "cc.Controller", _olua_cls_cc_Controller); + olua_require(L, "cc.AudioProfile", _olua_cls_cc_AudioProfile); + olua_require(L, "cc.AudioEngine.AudioState", _olua_cls_cc_AudioEngine_AudioState); + olua_require(L, "cc.AudioEngine", _olua_cls_cc_AudioEngine); + olua_require(L, "cc.ApplicationProtocol.Platform", _olua_cls_cc_ApplicationProtocol_Platform); + olua_require(L, "cc.LanguageType", _olua_cls_cc_LanguageType); + olua_require(L, "cc.ApplicationProtocol", _olua_cls_cc_ApplicationProtocol); + olua_require(L, "cc.Application", _olua_cls_cc_Application); + olua_require(L, "cc.Device", _olua_cls_cc_Device); + olua_require(L, "cc.ResizableBuffer", _olua_cls_cc_ResizableBuffer); + olua_require(L, "cc.FileUtils.Status", _olua_cls_cc_FileUtils_Status); + olua_require(L, "cc.FileUtils", _olua_cls_cc_FileUtils); + olua_require(L, "cc.ResolutionPolicy", _olua_cls_cc_ResolutionPolicy); + olua_require(L, "cc.GLView", _olua_cls_cc_GLView); + olua_require(L, "cc.GLViewImpl", _olua_cls_cc_GLViewImpl); + olua_require(L, "cc.Image.Format", _olua_cls_cc_Image_Format); + olua_require(L, "cc.Image", _olua_cls_cc_Image); + olua_require(L, "cc.Properties.Type", _olua_cls_cc_Properties_Type); + olua_require(L, "cc.Properties", _olua_cls_cc_Properties); + olua_require(L, "cc.Material", _olua_cls_cc_Material); + olua_require(L, "cc.Renderer", _olua_cls_cc_Renderer); + olua_require(L, "cc.RenderCommand.Type", _olua_cls_cc_RenderCommand_Type); + olua_require(L, "cc.CustomCommand.DrawType", _olua_cls_cc_CustomCommand_DrawType); + olua_require(L, "cc.PipelineDescriptor", _olua_cls_cc_PipelineDescriptor); + olua_require(L, "cc.Technique", _olua_cls_cc_Technique); + olua_require(L, "cc.Pass", _olua_cls_cc_Pass); + olua_require(L, "cc.RenderState", _olua_cls_cc_RenderState); + olua_require(L, "cc.RenderCommand", _olua_cls_cc_RenderCommand); + olua_require(L, "cc.CustomCommand", _olua_cls_cc_CustomCommand); + olua_require(L, "cc.MeshCommand", _olua_cls_cc_MeshCommand); + olua_require(L, "cc.TextureCache", _olua_cls_cc_TextureCache); + olua_require(L, "cc.Texture2D", _olua_cls_cc_Texture2D); + olua_require(L, "cc.TextureCube", _olua_cls_cc_TextureCube); + olua_require(L, "cc.TextureAtlas", _olua_cls_cc_TextureAtlas); + olua_require(L, "cc.WebSocket.ErrorCode", _olua_cls_cc_WebSocket_ErrorCode); + olua_require(L, "cc.WebSocket.State", _olua_cls_cc_WebSocket_State); + olua_require(L, "cc.WebSocket.Delegate", _olua_cls_cc_WebSocket_Delegate); + olua_require(L, "cc.WebSocket", _olua_cls_cc_WebSocket); + olua_require(L, "cc.LuaWebSocketDelegate", _olua_cls_cc_LuaWebSocketDelegate); + olua_require(L, "cc.ActionManager", _olua_cls_cc_ActionManager); + olua_require(L, "cc.Component", _olua_cls_cc_Component); + olua_require(L, "cc.LuaComponent", _olua_cls_cc_LuaComponent); + olua_require(L, "cc.Node", _olua_cls_cc_Node); + olua_require(L, "cc.BlendProtocol", _olua_cls_cc_BlendProtocol); + olua_require(L, "cc.TextureProtocol", _olua_cls_cc_TextureProtocol); + olua_require(L, "cc.AtlasNode", _olua_cls_cc_AtlasNode); + olua_require(L, "cc.sImageTGA", _olua_cls_cc_sImageTGA); + olua_require(L, "cc.TileMapAtlas", _olua_cls_cc_TileMapAtlas); + olua_require(L, "cc.ClippingNode", _olua_cls_cc_ClippingNode); + olua_require(L, "cc.MotionStreak", _olua_cls_cc_MotionStreak); + olua_require(L, "cc.ProtectedNode", _olua_cls_cc_ProtectedNode); + olua_require(L, "cc.DrawNode", _olua_cls_cc_DrawNode); + olua_require(L, "cc.ParallaxNode", _olua_cls_cc_ParallaxNode); + olua_require(L, "cc.TextHAlignment", _olua_cls_cc_TextHAlignment); + olua_require(L, "cc.TextVAlignment", _olua_cls_cc_TextVAlignment); + olua_require(L, "cc.GlyphCollection", _olua_cls_cc_GlyphCollection); + olua_require(L, "cc.LabelEffect", _olua_cls_cc_LabelEffect); + olua_require(L, "cc.Label.LabelType", _olua_cls_cc_Label_LabelType); + olua_require(L, "cc.Label.Overflow", _olua_cls_cc_Label_Overflow); + olua_require(L, "cc.LabelProtocol", _olua_cls_cc_LabelProtocol); + olua_require(L, "cc.Label", _olua_cls_cc_Label); + olua_require(L, "cc.LabelAtlas", _olua_cls_cc_LabelAtlas); + olua_require(L, "cc.FontAtlas", _olua_cls_cc_FontAtlas); + olua_require(L, "cc.ClippingRectangleNode", _olua_cls_cc_ClippingRectangleNode); + olua_require(L, "cc.RenderTexture", _olua_cls_cc_RenderTexture); + olua_require(L, "cc.ProgressTimer.Type", _olua_cls_cc_ProgressTimer_Type); + olua_require(L, "cc.ProgressTimer", _olua_cls_cc_ProgressTimer); + olua_require(L, "cc.AnimationFrame", _olua_cls_cc_AnimationFrame); + olua_require(L, "cc.Animation", _olua_cls_cc_Animation); + olua_require(L, "cc.SpriteFrame", _olua_cls_cc_SpriteFrame); + olua_require(L, "cc.Sprite", _olua_cls_cc_Sprite); + olua_require(L, "cc.SpriteBatchNode", _olua_cls_cc_SpriteBatchNode); + olua_require(L, "cc.SpriteFrameCache", _olua_cls_cc_SpriteFrameCache); + olua_require(L, "cc.AnimationCache", _olua_cls_cc_AnimationCache); + olua_require(L, "cc.Scene", _olua_cls_cc_Scene); + olua_require(L, "cc.Layer", _olua_cls_cc_Layer); + olua_require(L, "cc.LayerColor", _olua_cls_cc_LayerColor); + olua_require(L, "cc.LayerGradient", _olua_cls_cc_LayerGradient); + olua_require(L, "cc.LayerRadialGradient", _olua_cls_cc_LayerRadialGradient); + olua_require(L, "cc.LayerMultiplex", _olua_cls_cc_LayerMultiplex); + olua_require(L, "cc.TransitionScene.Orientation", _olua_cls_cc_TransitionScene_Orientation); + olua_require(L, "cc.TransitionScene", _olua_cls_cc_TransitionScene); + olua_require(L, "cc.TransitionEaseScene", _olua_cls_cc_TransitionEaseScene); + olua_require(L, "cc.TransitionSceneOriented", _olua_cls_cc_TransitionSceneOriented); + olua_require(L, "cc.TransitionRotoZoom", _olua_cls_cc_TransitionRotoZoom); + olua_require(L, "cc.TransitionJumpZoom", _olua_cls_cc_TransitionJumpZoom); + olua_require(L, "cc.TransitionMoveInL", _olua_cls_cc_TransitionMoveInL); + olua_require(L, "cc.TransitionMoveInR", _olua_cls_cc_TransitionMoveInR); + olua_require(L, "cc.TransitionMoveInT", _olua_cls_cc_TransitionMoveInT); + olua_require(L, "cc.TransitionMoveInB", _olua_cls_cc_TransitionMoveInB); + olua_require(L, "cc.TransitionSlideInL", _olua_cls_cc_TransitionSlideInL); + olua_require(L, "cc.TransitionSlideInR", _olua_cls_cc_TransitionSlideInR); + olua_require(L, "cc.TransitionSlideInB", _olua_cls_cc_TransitionSlideInB); + olua_require(L, "cc.TransitionSlideInT", _olua_cls_cc_TransitionSlideInT); + olua_require(L, "cc.TransitionShrinkGrow", _olua_cls_cc_TransitionShrinkGrow); + olua_require(L, "cc.TransitionFlipX", _olua_cls_cc_TransitionFlipX); + olua_require(L, "cc.TransitionFlipY", _olua_cls_cc_TransitionFlipY); + olua_require(L, "cc.TransitionFlipAngular", _olua_cls_cc_TransitionFlipAngular); + olua_require(L, "cc.TransitionZoomFlipX", _olua_cls_cc_TransitionZoomFlipX); + olua_require(L, "cc.TransitionZoomFlipY", _olua_cls_cc_TransitionZoomFlipY); + olua_require(L, "cc.TransitionZoomFlipAngular", _olua_cls_cc_TransitionZoomFlipAngular); + olua_require(L, "cc.TransitionFade", _olua_cls_cc_TransitionFade); + olua_require(L, "cc.TransitionCrossFade", _olua_cls_cc_TransitionCrossFade); + olua_require(L, "cc.TransitionTurnOffTiles", _olua_cls_cc_TransitionTurnOffTiles); + olua_require(L, "cc.TransitionSplitCols", _olua_cls_cc_TransitionSplitCols); + olua_require(L, "cc.TransitionSplitRows", _olua_cls_cc_TransitionSplitRows); + olua_require(L, "cc.TransitionFadeTR", _olua_cls_cc_TransitionFadeTR); + olua_require(L, "cc.TransitionFadeBL", _olua_cls_cc_TransitionFadeBL); + olua_require(L, "cc.TransitionFadeUp", _olua_cls_cc_TransitionFadeUp); + olua_require(L, "cc.TransitionFadeDown", _olua_cls_cc_TransitionFadeDown); + olua_require(L, "cc.TransitionPageTurn", _olua_cls_cc_TransitionPageTurn); + olua_require(L, "cc.TransitionProgress", _olua_cls_cc_TransitionProgress); + olua_require(L, "cc.TransitionProgressRadialCCW", _olua_cls_cc_TransitionProgressRadialCCW); + olua_require(L, "cc.TransitionProgressRadialCW", _olua_cls_cc_TransitionProgressRadialCW); + olua_require(L, "cc.TransitionProgressHorizontal", _olua_cls_cc_TransitionProgressHorizontal); + olua_require(L, "cc.TransitionProgressVertical", _olua_cls_cc_TransitionProgressVertical); + olua_require(L, "cc.TransitionProgressInOut", _olua_cls_cc_TransitionProgressInOut); + olua_require(L, "cc.TransitionProgressOutIn", _olua_cls_cc_TransitionProgressOutIn); + olua_require(L, "cc.IMEDelegate", _olua_cls_cc_IMEDelegate); + olua_require(L, "cc.TextFieldDelegate", _olua_cls_cc_TextFieldDelegate); + olua_require(L, "cc.TextFieldTTF", _olua_cls_cc_TextFieldTTF); + olua_require(L, "cc.LightType", _olua_cls_cc_LightType); + olua_require(L, "cc.LightFlag", _olua_cls_cc_LightFlag); + olua_require(L, "cc.BaseLight", _olua_cls_cc_BaseLight); + olua_require(L, "cc.DirectionLight", _olua_cls_cc_DirectionLight); + olua_require(L, "cc.PointLight", _olua_cls_cc_PointLight); + olua_require(L, "cc.SpotLight", _olua_cls_cc_SpotLight); + olua_require(L, "cc.AmbientLight", _olua_cls_cc_AmbientLight); + olua_require(L, "cc.CameraFlag", _olua_cls_cc_CameraFlag); + olua_require(L, "cc.Camera.Type", _olua_cls_cc_Camera_Type); + olua_require(L, "cc.Camera", _olua_cls_cc_Camera); + olua_require(L, "cc.CameraBackgroundBrush.BrushType", _olua_cls_cc_CameraBackgroundBrush_BrushType); + olua_require(L, "cc.CameraBackgroundBrush", _olua_cls_cc_CameraBackgroundBrush); + olua_require(L, "cc.CameraBackgroundDepthBrush", _olua_cls_cc_CameraBackgroundDepthBrush); + olua_require(L, "cc.CameraBackgroundColorBrush", _olua_cls_cc_CameraBackgroundColorBrush); + olua_require(L, "cc.CameraBackgroundSkyBoxBrush", _olua_cls_cc_CameraBackgroundSkyBoxBrush); + olua_require(L, "cc.PlayableProtocol", _olua_cls_cc_PlayableProtocol); + olua_require(L, "cc.ParticleBatchNode", _olua_cls_cc_ParticleBatchNode); + olua_require(L, "cc.ParticleSystem.Mode", _olua_cls_cc_ParticleSystem_Mode); + olua_require(L, "cc.ParticleSystem.PositionType", _olua_cls_cc_ParticleSystem_PositionType); + olua_require(L, "cc.ParticleSystem", _olua_cls_cc_ParticleSystem); + olua_require(L, "cc.ParticleSystemQuad", _olua_cls_cc_ParticleSystemQuad); + olua_require(L, "cc.ParticleExplosion", _olua_cls_cc_ParticleExplosion); + olua_require(L, "cc.ParticleFire", _olua_cls_cc_ParticleFire); + olua_require(L, "cc.ParticleFireworks", _olua_cls_cc_ParticleFireworks); + olua_require(L, "cc.ParticleFlower", _olua_cls_cc_ParticleFlower); + olua_require(L, "cc.ParticleGalaxy", _olua_cls_cc_ParticleGalaxy); + olua_require(L, "cc.ParticleMeteor", _olua_cls_cc_ParticleMeteor); + olua_require(L, "cc.ParticleRain", _olua_cls_cc_ParticleRain); + olua_require(L, "cc.ParticleSmoke", _olua_cls_cc_ParticleSmoke); + olua_require(L, "cc.ParticleSnow", _olua_cls_cc_ParticleSnow); + olua_require(L, "cc.ParticleSpiral", _olua_cls_cc_ParticleSpiral); + olua_require(L, "cc.ParticleSun", _olua_cls_cc_ParticleSun); + olua_require(L, "cc.SAXDelegator", _olua_cls_cc_SAXDelegator); + olua_require(L, "cc.TMXTileFlags", _olua_cls_cc_TMXTileFlags); + olua_require(L, "cc.TMXObjectGroup", _olua_cls_cc_TMXObjectGroup); + olua_require(L, "cc.TMXLayer", _olua_cls_cc_TMXLayer); + olua_require(L, "cc.TMXLayerInfo", _olua_cls_cc_TMXLayerInfo); + olua_require(L, "cc.TMXMapInfo", _olua_cls_cc_TMXMapInfo); + olua_require(L, "cc.TMXTilesetInfo", _olua_cls_cc_TMXTilesetInfo); + olua_require(L, "cc.TMXTiledMap", _olua_cls_cc_TMXTiledMap); + olua_require(L, "cc.FastTMXTiledMap", _olua_cls_cc_FastTMXTiledMap); + olua_require(L, "cc.FastTMXLayer", _olua_cls_cc_FastTMXLayer); #if CC_USE_NAVMESH - olua_require(L, "cc.NavMeshAgent.NavMeshAgentSyncFlag", luaopen_cocos2d_NavMeshAgent_NavMeshAgentSyncFlag); - olua_require(L, "cc.NavMeshAgent", luaopen_cocos2d_NavMeshAgent); - olua_require(L, "cc.NavMeshObstacle.NavMeshObstacleSyncFlag", luaopen_cocos2d_NavMeshObstacle_NavMeshObstacleSyncFlag); - olua_require(L, "cc.NavMeshObstacle", luaopen_cocos2d_NavMeshObstacle); - olua_require(L, "cc.NavMesh", luaopen_cocos2d_NavMesh); + olua_require(L, "cc.NavMeshAgent.NavMeshAgentSyncFlag", _olua_cls_cc_NavMeshAgent_NavMeshAgentSyncFlag); + olua_require(L, "cc.NavMeshAgent", _olua_cls_cc_NavMeshAgent); + olua_require(L, "cc.NavMeshObstacle.NavMeshObstacleSyncFlag", _olua_cls_cc_NavMeshObstacle_NavMeshObstacleSyncFlag); + olua_require(L, "cc.NavMeshObstacle", _olua_cls_cc_NavMeshObstacle); + olua_require(L, "cc.NavMesh", _olua_cls_cc_NavMesh); #endif return 0; diff --git a/frameworks/cclua/src/lua-bindings/lua_cocos2d.h b/frameworks/cclua/src/lua-bindings/lua_cocos2d.h index c5568d85..9effce50 100644 --- a/frameworks/cclua/src/lua-bindings/lua_cocos2d.h +++ b/frameworks/cclua/src/lua-bindings/lua_cocos2d.h @@ -1,5 +1,5 @@ // -// AUTO BUILD, DON'T MODIFY! +// AUTO GENERATED, DO NOT MODIFY! // #ifndef __AUTO_GEN_LUA_COCOS2D_H__ #define __AUTO_GEN_LUA_COCOS2D_H__ diff --git a/frameworks/cclua/src/lua-bindings/lua_cocos2d_3d.cpp b/frameworks/cclua/src/lua-bindings/lua_cocos2d_3d.cpp index 58cff449..e9928a30 100644 --- a/frameworks/cclua/src/lua-bindings/lua_cocos2d_3d.cpp +++ b/frameworks/cclua/src/lua-bindings/lua_cocos2d_3d.cpp @@ -1,5 +1,5 @@ // -// AUTO BUILD, DON'T MODIFY! +// AUTO GENERATED, DO NOT MODIFY! // #include "lua_cocos2d_3d.h" #include "lua-bindings/lua_cocos2d_types.h" @@ -7,35 +7,7 @@ #include "cocos2d.h" #include "3d/CC3DProgramInfo.h" -static int _cocos2d_MeshVertexAttrib___call(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::MeshVertexAttrib ret; - - luaL_checktype(L, 2, LUA_TTABLE); - - cocos2d::backend::VertexFormat arg1 = (cocos2d::backend::VertexFormat)0; /** type */ - cocos2d::shaderinfos::VertexKey arg2 = (cocos2d::shaderinfos::VertexKey)0; /** vertexAttrib */ - - olua_getfield(L, 2, "type"); - olua_check_enum(L, -1, &arg1); - ret.type = arg1; - lua_pop(L, 1); - - olua_getfield(L, 2, "vertexAttrib"); - olua_check_enum(L, -1, &arg2); - ret.vertexAttrib = arg2; - lua_pop(L, 1); - - olua_pushcopy_object(L, ret, "cc.MeshVertexAttrib"); - - olua_endinvoke(L); - - return 1; -} - -static int _cocos2d_MeshVertexAttrib___gc(lua_State *L) +static int _olua_fun_cocos2d_MeshVertexAttrib___gc(lua_State *L) { olua_startinvoke(L); @@ -47,7 +19,7 @@ static int _cocos2d_MeshVertexAttrib___gc(lua_State *L) return 0; } -static int _cocos2d_MeshVertexAttrib___olua_move(lua_State *L) +static int _olua_fun_cocos2d_MeshVertexAttrib___olua_move(lua_State *L) { olua_startinvoke(L); @@ -59,7 +31,7 @@ static int _cocos2d_MeshVertexAttrib___olua_move(lua_State *L) return 1; } -static int _cocos2d_MeshVertexAttrib_getAttribSizeBytes(lua_State *L) +static int _olua_fun_cocos2d_MeshVertexAttrib_getAttribSizeBytes(lua_State *L) { olua_startinvoke(L); @@ -76,7 +48,7 @@ static int _cocos2d_MeshVertexAttrib_getAttribSizeBytes(lua_State *L) return num_ret; } -static int _cocos2d_MeshVertexAttrib_get_type(lua_State *L) +static int _olua_fun_cocos2d_MeshVertexAttrib_type$1(lua_State *L) { olua_startinvoke(L); @@ -93,7 +65,7 @@ static int _cocos2d_MeshVertexAttrib_get_type(lua_State *L) return num_ret; } -static int _cocos2d_MeshVertexAttrib_set_type(lua_State *L) +static int _olua_fun_cocos2d_MeshVertexAttrib_type$2(lua_State *L) { olua_startinvoke(L); @@ -111,7 +83,28 @@ static int _cocos2d_MeshVertexAttrib_set_type(lua_State *L) return 0; } -static int _cocos2d_MeshVertexAttrib_get_vertexAttrib(lua_State *L) +static int _olua_fun_cocos2d_MeshVertexAttrib_type(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // cocos2d::backend::VertexFormat type + return _olua_fun_cocos2d_MeshVertexAttrib_type$1(L); + } + + if (num_args == 1) { + // if ((olua_is_enum(L, 2))) { + // cocos2d::backend::VertexFormat type + return _olua_fun_cocos2d_MeshVertexAttrib_type$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::MeshVertexAttrib::type' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_MeshVertexAttrib_vertexAttrib$1(lua_State *L) { olua_startinvoke(L); @@ -128,7 +121,7 @@ static int _cocos2d_MeshVertexAttrib_get_vertexAttrib(lua_State *L) return num_ret; } -static int _cocos2d_MeshVertexAttrib_set_vertexAttrib(lua_State *L) +static int _olua_fun_cocos2d_MeshVertexAttrib_vertexAttrib$2(lua_State *L) { olua_startinvoke(L); @@ -146,24 +139,52 @@ static int _cocos2d_MeshVertexAttrib_set_vertexAttrib(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_MeshVertexAttrib(lua_State *L) +static int _olua_fun_cocos2d_MeshVertexAttrib_vertexAttrib(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // cocos2d::shaderinfos::VertexKey vertexAttrib + return _olua_fun_cocos2d_MeshVertexAttrib_vertexAttrib$1(L); + } + + if (num_args == 1) { + // if ((olua_is_enum(L, 2))) { + // cocos2d::shaderinfos::VertexKey vertexAttrib + return _olua_fun_cocos2d_MeshVertexAttrib_vertexAttrib$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::MeshVertexAttrib::vertexAttrib' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_cls_cc_MeshVertexAttrib(lua_State *L) { oluacls_class(L, "cc.MeshVertexAttrib"); - oluacls_func(L, "__call", _cocos2d_MeshVertexAttrib___call); - oluacls_func(L, "__gc", _cocos2d_MeshVertexAttrib___gc); - oluacls_func(L, "__olua_move", _cocos2d_MeshVertexAttrib___olua_move); - oluacls_func(L, "getAttribSizeBytes", _cocos2d_MeshVertexAttrib_getAttribSizeBytes); - oluacls_prop(L, "attribSizeBytes", _cocos2d_MeshVertexAttrib_getAttribSizeBytes, nullptr); - oluacls_prop(L, "type", _cocos2d_MeshVertexAttrib_get_type, _cocos2d_MeshVertexAttrib_set_type); - oluacls_prop(L, "vertexAttrib", _cocos2d_MeshVertexAttrib_get_vertexAttrib, _cocos2d_MeshVertexAttrib_set_vertexAttrib); + oluacls_func(L, "__gc", _olua_fun_cocos2d_MeshVertexAttrib___gc); + oluacls_func(L, "__olua_move", _olua_fun_cocos2d_MeshVertexAttrib___olua_move); + oluacls_func(L, "getAttribSizeBytes", _olua_fun_cocos2d_MeshVertexAttrib_getAttribSizeBytes); + oluacls_prop(L, "attribSizeBytes", _olua_fun_cocos2d_MeshVertexAttrib_getAttribSizeBytes, nullptr); + oluacls_prop(L, "type", _olua_fun_cocos2d_MeshVertexAttrib_type, _olua_fun_cocos2d_MeshVertexAttrib_type); + oluacls_prop(L, "vertexAttrib", _olua_fun_cocos2d_MeshVertexAttrib_vertexAttrib, _olua_fun_cocos2d_MeshVertexAttrib_vertexAttrib); return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_NTextureData_Usage(lua_State *L) +OLUA_LIB int luaopen_cc_MeshVertexAttrib(lua_State *L) +{ + olua_require(L, "cocos2d_3d", luaopen_cocos2d_3d); + if (!olua_getclass(L, "cc.MeshVertexAttrib")) { + luaL_error(L, "class not found: cocos2d::MeshVertexAttrib"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_cc_NTextureData_Usage(lua_State *L) { oluacls_class(L, "cc.NTextureData.Usage"); oluacls_func(L, "__index", olua_indexerror); @@ -182,10 +203,19 @@ OLUA_LIB int luaopen_cocos2d_NTextureData_Usage(lua_State *L) return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_shaderinfos_VertexKey(lua_State *L) +OLUA_LIB int luaopen_cc_NTextureData_Usage(lua_State *L) +{ + olua_require(L, "cocos2d_3d", luaopen_cocos2d_3d); + if (!olua_getclass(L, "cc.NTextureData.Usage")) { + luaL_error(L, "class not found: cocos2d::NTextureData::Usage"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_cc_VertexKey(lua_State *L) { oluacls_class(L, "cc.VertexKey"); oluacls_func(L, "__index", olua_indexerror); @@ -207,10 +237,19 @@ OLUA_LIB int luaopen_cocos2d_shaderinfos_VertexKey(lua_State *L) return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_shaderinfos_Uniformkey(lua_State *L) +OLUA_LIB int luaopen_cc_VertexKey(lua_State *L) +{ + olua_require(L, "cocos2d_3d", luaopen_cocos2d_3d); + if (!olua_getclass(L, "cc.VertexKey")) { + luaL_error(L, "class not found: cocos2d::shaderinfos::VertexKey"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_cc_Uniformkey(lua_State *L) { oluacls_class(L, "cc.Uniformkey"); oluacls_func(L, "__index", olua_indexerror); @@ -234,55 +273,19 @@ OLUA_LIB int luaopen_cocos2d_shaderinfos_Uniformkey(lua_State *L) return 1; } -OLUA_END_DECLS -static int _cocos2d_NTextureData___call(lua_State *L) +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_Uniformkey(lua_State *L) { - olua_startinvoke(L); - - cocos2d::NTextureData ret; - - luaL_checktype(L, 2, LUA_TTABLE); - - std::string arg1; /** id */ - std::string arg2; /** filename */ - cocos2d::NTextureData::Usage arg3 = (cocos2d::NTextureData::Usage)0; /** type */ - cocos2d::backend::SamplerAddressMode arg4 = (cocos2d::backend::SamplerAddressMode)0; /** wrapS */ - cocos2d::backend::SamplerAddressMode arg5 = (cocos2d::backend::SamplerAddressMode)0; /** wrapT */ - - olua_getfield(L, 2, "id"); - olua_check_string(L, -1, &arg1); - ret.id = arg1; - lua_pop(L, 1); - - olua_getfield(L, 2, "filename"); - olua_check_string(L, -1, &arg2); - ret.filename = arg2; - lua_pop(L, 1); - - olua_getfield(L, 2, "type"); - olua_check_enum(L, -1, &arg3); - ret.type = arg3; - lua_pop(L, 1); - - olua_getfield(L, 2, "wrapS"); - olua_check_enum(L, -1, &arg4); - ret.wrapS = arg4; - lua_pop(L, 1); - - olua_getfield(L, 2, "wrapT"); - olua_check_enum(L, -1, &arg5); - ret.wrapT = arg5; - lua_pop(L, 1); - - olua_pushcopy_object(L, ret, "cc.NTextureData"); - - olua_endinvoke(L); - + olua_require(L, "cocos2d_3d", luaopen_cocos2d_3d); + if (!olua_getclass(L, "cc.Uniformkey")) { + luaL_error(L, "class not found: cocos2d::shaderinfos::Uniformkey"); + } return 1; } +OLUA_END_DECLS -static int _cocos2d_NTextureData___gc(lua_State *L) +static int _olua_fun_cocos2d_NTextureData___gc(lua_State *L) { olua_startinvoke(L); @@ -294,7 +297,7 @@ static int _cocos2d_NTextureData___gc(lua_State *L) return 0; } -static int _cocos2d_NTextureData___olua_move(lua_State *L) +static int _olua_fun_cocos2d_NTextureData___olua_move(lua_State *L) { olua_startinvoke(L); @@ -306,7 +309,7 @@ static int _cocos2d_NTextureData___olua_move(lua_State *L) return 1; } -static int _cocos2d_NTextureData_get_filename(lua_State *L) +static int _olua_fun_cocos2d_NTextureData_filename$1(lua_State *L) { olua_startinvoke(L); @@ -323,7 +326,7 @@ static int _cocos2d_NTextureData_get_filename(lua_State *L) return num_ret; } -static int _cocos2d_NTextureData_set_filename(lua_State *L) +static int _olua_fun_cocos2d_NTextureData_filename$2(lua_State *L) { olua_startinvoke(L); @@ -341,7 +344,28 @@ static int _cocos2d_NTextureData_set_filename(lua_State *L) return 0; } -static int _cocos2d_NTextureData_get_id(lua_State *L) +static int _olua_fun_cocos2d_NTextureData_filename(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // std::string filename + return _olua_fun_cocos2d_NTextureData_filename$1(L); + } + + if (num_args == 1) { + // if ((olua_is_string(L, 2))) { + // std::string filename + return _olua_fun_cocos2d_NTextureData_filename$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::NTextureData::filename' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_NTextureData_id$1(lua_State *L) { olua_startinvoke(L); @@ -358,7 +382,7 @@ static int _cocos2d_NTextureData_get_id(lua_State *L) return num_ret; } -static int _cocos2d_NTextureData_set_id(lua_State *L) +static int _olua_fun_cocos2d_NTextureData_id$2(lua_State *L) { olua_startinvoke(L); @@ -376,7 +400,28 @@ static int _cocos2d_NTextureData_set_id(lua_State *L) return 0; } -static int _cocos2d_NTextureData_get_type(lua_State *L) +static int _olua_fun_cocos2d_NTextureData_id(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // std::string id + return _olua_fun_cocos2d_NTextureData_id$1(L); + } + + if (num_args == 1) { + // if ((olua_is_string(L, 2))) { + // std::string id + return _olua_fun_cocos2d_NTextureData_id$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::NTextureData::id' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_NTextureData_type$1(lua_State *L) { olua_startinvoke(L); @@ -393,7 +438,7 @@ static int _cocos2d_NTextureData_get_type(lua_State *L) return num_ret; } -static int _cocos2d_NTextureData_set_type(lua_State *L) +static int _olua_fun_cocos2d_NTextureData_type$2(lua_State *L) { olua_startinvoke(L); @@ -411,7 +456,28 @@ static int _cocos2d_NTextureData_set_type(lua_State *L) return 0; } -static int _cocos2d_NTextureData_get_wrapS(lua_State *L) +static int _olua_fun_cocos2d_NTextureData_type(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // cocos2d::NTextureData::Usage type + return _olua_fun_cocos2d_NTextureData_type$1(L); + } + + if (num_args == 1) { + // if ((olua_is_enum(L, 2))) { + // cocos2d::NTextureData::Usage type + return _olua_fun_cocos2d_NTextureData_type$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::NTextureData::type' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_NTextureData_wrapS$1(lua_State *L) { olua_startinvoke(L); @@ -428,7 +494,7 @@ static int _cocos2d_NTextureData_get_wrapS(lua_State *L) return num_ret; } -static int _cocos2d_NTextureData_set_wrapS(lua_State *L) +static int _olua_fun_cocos2d_NTextureData_wrapS$2(lua_State *L) { olua_startinvoke(L); @@ -446,7 +512,28 @@ static int _cocos2d_NTextureData_set_wrapS(lua_State *L) return 0; } -static int _cocos2d_NTextureData_get_wrapT(lua_State *L) +static int _olua_fun_cocos2d_NTextureData_wrapS(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // cocos2d::backend::SamplerAddressMode wrapS + return _olua_fun_cocos2d_NTextureData_wrapS$1(L); + } + + if (num_args == 1) { + // if ((olua_is_enum(L, 2))) { + // cocos2d::backend::SamplerAddressMode wrapS + return _olua_fun_cocos2d_NTextureData_wrapS$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::NTextureData::wrapS' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_NTextureData_wrapT$1(lua_State *L) { olua_startinvoke(L); @@ -463,7 +550,7 @@ static int _cocos2d_NTextureData_get_wrapT(lua_State *L) return num_ret; } -static int _cocos2d_NTextureData_set_wrapT(lua_State *L) +static int _olua_fun_cocos2d_NTextureData_wrapT$2(lua_State *L) { olua_startinvoke(L); @@ -481,24 +568,53 @@ static int _cocos2d_NTextureData_set_wrapT(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_NTextureData(lua_State *L) +static int _olua_fun_cocos2d_NTextureData_wrapT(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // cocos2d::backend::SamplerAddressMode wrapT + return _olua_fun_cocos2d_NTextureData_wrapT$1(L); + } + + if (num_args == 1) { + // if ((olua_is_enum(L, 2))) { + // cocos2d::backend::SamplerAddressMode wrapT + return _olua_fun_cocos2d_NTextureData_wrapT$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::NTextureData::wrapT' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_cls_cc_NTextureData(lua_State *L) { oluacls_class(L, "cc.NTextureData"); - oluacls_func(L, "__call", _cocos2d_NTextureData___call); - oluacls_func(L, "__gc", _cocos2d_NTextureData___gc); - oluacls_func(L, "__olua_move", _cocos2d_NTextureData___olua_move); - oluacls_prop(L, "filename", _cocos2d_NTextureData_get_filename, _cocos2d_NTextureData_set_filename); - oluacls_prop(L, "id", _cocos2d_NTextureData_get_id, _cocos2d_NTextureData_set_id); - oluacls_prop(L, "type", _cocos2d_NTextureData_get_type, _cocos2d_NTextureData_set_type); - oluacls_prop(L, "wrapS", _cocos2d_NTextureData_get_wrapS, _cocos2d_NTextureData_set_wrapS); - oluacls_prop(L, "wrapT", _cocos2d_NTextureData_get_wrapT, _cocos2d_NTextureData_set_wrapT); + oluacls_func(L, "__gc", _olua_fun_cocos2d_NTextureData___gc); + oluacls_func(L, "__olua_move", _olua_fun_cocos2d_NTextureData___olua_move); + oluacls_prop(L, "filename", _olua_fun_cocos2d_NTextureData_filename, _olua_fun_cocos2d_NTextureData_filename); + oluacls_prop(L, "id", _olua_fun_cocos2d_NTextureData_id, _olua_fun_cocos2d_NTextureData_id); + oluacls_prop(L, "type", _olua_fun_cocos2d_NTextureData_type, _olua_fun_cocos2d_NTextureData_type); + oluacls_prop(L, "wrapS", _olua_fun_cocos2d_NTextureData_wrapS, _olua_fun_cocos2d_NTextureData_wrapS); + oluacls_prop(L, "wrapT", _olua_fun_cocos2d_NTextureData_wrapT, _olua_fun_cocos2d_NTextureData_wrapT); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_NTextureData(lua_State *L) +{ + olua_require(L, "cocos2d_3d", luaopen_cocos2d_3d); + if (!olua_getclass(L, "cc.NTextureData")) { + luaL_error(L, "class not found: cocos2d::NTextureData"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_Mesh_calculateAABB(lua_State *L) +static int _olua_fun_cocos2d_Mesh_calculateAABB(lua_State *L) { olua_startinvoke(L); @@ -514,7 +630,7 @@ static int _cocos2d_Mesh_calculateAABB(lua_State *L) return 0; } -static int _cocos2d_Mesh_create$1(lua_State *L) +static int _olua_fun_cocos2d_Mesh_create$1(lua_State *L) { olua_startinvoke(L); @@ -545,7 +661,7 @@ static int _cocos2d_Mesh_create$1(lua_State *L) return num_ret; } -static int _cocos2d_Mesh_create$2(lua_State *L) +static int _olua_fun_cocos2d_Mesh_create$2(lua_State *L) { olua_startinvoke(L); @@ -574,19 +690,19 @@ static int _cocos2d_Mesh_create$2(lua_State *L) return num_ret; } -static int _cocos2d_Mesh_create(lua_State *L) +static int _olua_fun_cocos2d_Mesh_create(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 4) { if ((olua_is_array(L, 1)) && (olua_is_array(L, 2)) && (olua_is_array(L, 3)) && (olua_is_array(L, 4))) { // static cocos2d::Mesh *create(const std::vector &positions, const std::vector &normals, const std::vector &texs, const std::vector &indices) - return _cocos2d_Mesh_create$1(L); + return _olua_fun_cocos2d_Mesh_create$1(L); } // if ((olua_is_array(L, 1)) && (olua_is_integer(L, 2)) && (olua_is_array(L, 3)) && (olua_is_array(L, 4))) { // static cocos2d::Mesh *create(const std::vector &vertices, int perVertexSizeInFloat, const std::vector &indices, const std::vector &attribs) - return _cocos2d_Mesh_create$2(L); + return _olua_fun_cocos2d_Mesh_create$2(L); // } } @@ -595,17 +711,17 @@ static int _cocos2d_Mesh_create(lua_State *L) return 0; } -static int _cocos2d_Mesh_draw(lua_State *L) +static int _olua_fun_cocos2d_Mesh_draw(lua_State *L) { olua_startinvoke(L); cocos2d::Mesh *self = nullptr; cocos2d::Renderer *arg1 = nullptr; /** renderer */ float arg2 = 0; /** globalZ */ - cocos2d::Mat4 arg3; /** transform */ + cocos2d::Mat4 *arg3; /** transform */ uint32_t arg4 = 0; /** flags */ unsigned int arg5 = 0; /** lightMask */ - cocos2d::Vec4 arg6; /** color */ + cocos2d::Vec4 *arg6; /** color */ bool arg7 = false; /** forceDepthWrite */ olua_to_object(L, 1, &self, "cc.Mesh"); @@ -618,14 +734,14 @@ static int _cocos2d_Mesh_draw(lua_State *L) olua_check_bool(L, 8, &arg7); // void draw(cocos2d::Renderer *renderer, float globalZ, const cocos2d::Mat4 &transform, uint32_t flags, unsigned int lightMask, const cocos2d::Vec4 &color, bool forceDepthWrite) - self->draw(arg1, arg2, arg3, arg4, arg5, arg6, arg7); + self->draw(arg1, arg2, *arg3, arg4, arg5, *arg6, arg7); olua_endinvoke(L); return 0; } -static int _cocos2d_Mesh_getBlendFunc(lua_State *L) +static int _olua_fun_cocos2d_Mesh_getBlendFunc(lua_State *L) { olua_startinvoke(L); @@ -642,7 +758,7 @@ static int _cocos2d_Mesh_getBlendFunc(lua_State *L) return num_ret; } -static int _cocos2d_Mesh_getIndexBuffer(lua_State *L) +static int _olua_fun_cocos2d_Mesh_getIndexBuffer(lua_State *L) { olua_startinvoke(L); @@ -659,7 +775,7 @@ static int _cocos2d_Mesh_getIndexBuffer(lua_State *L) return num_ret; } -static int _cocos2d_Mesh_getIndexCount(lua_State *L) +static int _olua_fun_cocos2d_Mesh_getIndexCount(lua_State *L) { olua_startinvoke(L); @@ -676,7 +792,7 @@ static int _cocos2d_Mesh_getIndexCount(lua_State *L) return num_ret; } -static int _cocos2d_Mesh_getIndexFormat(lua_State *L) +static int _olua_fun_cocos2d_Mesh_getIndexFormat(lua_State *L) { olua_startinvoke(L); @@ -693,7 +809,7 @@ static int _cocos2d_Mesh_getIndexFormat(lua_State *L) return num_ret; } -static int _cocos2d_Mesh_getMaterial(lua_State *L) +static int _olua_fun_cocos2d_Mesh_getMaterial(lua_State *L) { olua_startinvoke(L); @@ -710,7 +826,7 @@ static int _cocos2d_Mesh_getMaterial(lua_State *L) return num_ret; } -static int _cocos2d_Mesh_getMeshVertexAttribCount(lua_State *L) +static int _olua_fun_cocos2d_Mesh_getMeshVertexAttribCount(lua_State *L) { olua_startinvoke(L); @@ -727,7 +843,7 @@ static int _cocos2d_Mesh_getMeshVertexAttribCount(lua_State *L) return num_ret; } -static int _cocos2d_Mesh_getMeshVertexAttribute(lua_State *L) +static int _olua_fun_cocos2d_Mesh_getMeshVertexAttribute(lua_State *L) { olua_startinvoke(L); @@ -746,7 +862,7 @@ static int _cocos2d_Mesh_getMeshVertexAttribute(lua_State *L) return num_ret; } -static int _cocos2d_Mesh_getName(lua_State *L) +static int _olua_fun_cocos2d_Mesh_getName(lua_State *L) { olua_startinvoke(L); @@ -763,7 +879,7 @@ static int _cocos2d_Mesh_getName(lua_State *L) return num_ret; } -static int _cocos2d_Mesh_getPrimitiveType(lua_State *L) +static int _olua_fun_cocos2d_Mesh_getPrimitiveType(lua_State *L) { olua_startinvoke(L); @@ -780,7 +896,7 @@ static int _cocos2d_Mesh_getPrimitiveType(lua_State *L) return num_ret; } -static int _cocos2d_Mesh_getProgramState(lua_State *L) +static int _olua_fun_cocos2d_Mesh_getProgramState(lua_State *L) { olua_startinvoke(L); @@ -797,7 +913,7 @@ static int _cocos2d_Mesh_getProgramState(lua_State *L) return num_ret; } -static int _cocos2d_Mesh_getSkin(lua_State *L) +static int _olua_fun_cocos2d_Mesh_getSkin(lua_State *L) { olua_startinvoke(L); @@ -814,7 +930,7 @@ static int _cocos2d_Mesh_getSkin(lua_State *L) return num_ret; } -static int _cocos2d_Mesh_getTexture$1(lua_State *L) +static int _olua_fun_cocos2d_Mesh_getTexture$1(lua_State *L) { olua_startinvoke(L); @@ -831,7 +947,7 @@ static int _cocos2d_Mesh_getTexture$1(lua_State *L) return num_ret; } -static int _cocos2d_Mesh_getTexture$2(lua_State *L) +static int _olua_fun_cocos2d_Mesh_getTexture$2(lua_State *L) { olua_startinvoke(L); @@ -850,19 +966,19 @@ static int _cocos2d_Mesh_getTexture$2(lua_State *L) return num_ret; } -static int _cocos2d_Mesh_getTexture(lua_State *L) +static int _olua_fun_cocos2d_Mesh_getTexture(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 0) { // cocos2d::Texture2D *getTexture() - return _cocos2d_Mesh_getTexture$1(L); + return _olua_fun_cocos2d_Mesh_getTexture$1(L); } if (num_args == 1) { // if ((olua_is_enum(L, 2))) { // cocos2d::Texture2D *getTexture(cocos2d::NTextureData::Usage usage) - return _cocos2d_Mesh_getTexture$2(L); + return _olua_fun_cocos2d_Mesh_getTexture$2(L); // } } @@ -871,7 +987,7 @@ static int _cocos2d_Mesh_getTexture(lua_State *L) return 0; } -static int _cocos2d_Mesh_getTextureFileName(lua_State *L) +static int _olua_fun_cocos2d_Mesh_getTextureFileName(lua_State *L) { olua_startinvoke(L); @@ -888,7 +1004,7 @@ static int _cocos2d_Mesh_getTextureFileName(lua_State *L) return num_ret; } -static int _cocos2d_Mesh_getVertexBuffer(lua_State *L) +static int _olua_fun_cocos2d_Mesh_getVertexBuffer(lua_State *L) { olua_startinvoke(L); @@ -905,7 +1021,7 @@ static int _cocos2d_Mesh_getVertexBuffer(lua_State *L) return num_ret; } -static int _cocos2d_Mesh_getVertexSizeInBytes(lua_State *L) +static int _olua_fun_cocos2d_Mesh_getVertexSizeInBytes(lua_State *L) { olua_startinvoke(L); @@ -922,7 +1038,7 @@ static int _cocos2d_Mesh_getVertexSizeInBytes(lua_State *L) return num_ret; } -static int _cocos2d_Mesh_hasVertexAttrib(lua_State *L) +static int _olua_fun_cocos2d_Mesh_hasVertexAttrib(lua_State *L) { olua_startinvoke(L); @@ -941,7 +1057,7 @@ static int _cocos2d_Mesh_hasVertexAttrib(lua_State *L) return num_ret; } -static int _cocos2d_Mesh_isVisible(lua_State *L) +static int _olua_fun_cocos2d_Mesh_isVisible(lua_State *L) { olua_startinvoke(L); @@ -958,11 +1074,11 @@ static int _cocos2d_Mesh_isVisible(lua_State *L) return num_ret; } -static int _cocos2d_Mesh_new(lua_State *L) +static int _olua_fun_cocos2d_Mesh_new(lua_State *L) { olua_startinvoke(L); - // Mesh() + // cocos2d::Mesh() cocos2d::Mesh *ret = new cocos2d::Mesh(); int num_ret = olua_push_object(L, ret, "cc.Mesh"); olua_postnew(L, ret); @@ -972,25 +1088,25 @@ static int _cocos2d_Mesh_new(lua_State *L) return num_ret; } -static int _cocos2d_Mesh_setBlendFunc(lua_State *L) +static int _olua_fun_cocos2d_Mesh_setBlendFunc(lua_State *L) { olua_startinvoke(L); cocos2d::Mesh *self = nullptr; - cocos2d::BlendFunc arg1; /** blendFunc */ + cocos2d::BlendFunc *arg1; /** blendFunc */ olua_to_object(L, 1, &self, "cc.Mesh"); olua_check_object(L, 2, &arg1, "cc.BlendFunc"); // void setBlendFunc(const cocos2d::BlendFunc &blendFunc) - self->setBlendFunc(arg1); + self->setBlendFunc(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_Mesh_setForce2DQueue(lua_State *L) +static int _olua_fun_cocos2d_Mesh_setForce2DQueue(lua_State *L) { olua_startinvoke(L); @@ -1008,7 +1124,7 @@ static int _cocos2d_Mesh_setForce2DQueue(lua_State *L) return 0; } -static int _cocos2d_Mesh_setMaterial(lua_State *L) +static int _olua_fun_cocos2d_Mesh_setMaterial(lua_State *L) { olua_startinvoke(L); @@ -1026,7 +1142,7 @@ static int _cocos2d_Mesh_setMaterial(lua_State *L) return 0; } -static int _cocos2d_Mesh_setName(lua_State *L) +static int _olua_fun_cocos2d_Mesh_setName(lua_State *L) { olua_startinvoke(L); @@ -1044,7 +1160,7 @@ static int _cocos2d_Mesh_setName(lua_State *L) return 0; } -static int _cocos2d_Mesh_setProgramState(lua_State *L) +static int _olua_fun_cocos2d_Mesh_setProgramState(lua_State *L) { olua_startinvoke(L); @@ -1062,7 +1178,7 @@ static int _cocos2d_Mesh_setProgramState(lua_State *L) return 0; } -static int _cocos2d_Mesh_setSkin(lua_State *L) +static int _olua_fun_cocos2d_Mesh_setSkin(lua_State *L) { olua_startinvoke(L); @@ -1080,7 +1196,7 @@ static int _cocos2d_Mesh_setSkin(lua_State *L) return 0; } -static int _cocos2d_Mesh_setTexture$1(lua_State *L) +static int _olua_fun_cocos2d_Mesh_setTexture$1(lua_State *L) { olua_startinvoke(L); @@ -1098,7 +1214,7 @@ static int _cocos2d_Mesh_setTexture$1(lua_State *L) return 0; } -static int _cocos2d_Mesh_setTexture$2(lua_State *L) +static int _olua_fun_cocos2d_Mesh_setTexture$2(lua_State *L) { olua_startinvoke(L); @@ -1116,7 +1232,7 @@ static int _cocos2d_Mesh_setTexture$2(lua_State *L) return 0; } -static int _cocos2d_Mesh_setTexture$3(lua_State *L) +static int _olua_fun_cocos2d_Mesh_setTexture$3(lua_State *L) { olua_startinvoke(L); @@ -1138,19 +1254,19 @@ static int _cocos2d_Mesh_setTexture$3(lua_State *L) return 0; } -static int _cocos2d_Mesh_setTexture$4(lua_State *L) +static int _olua_fun_cocos2d_Mesh_setTexture$4(lua_State *L) { olua_startinvoke(L); cocos2d::Mesh *self = nullptr; - std::string arg1; /** texPath */ + cocos2d::Texture2D *arg1 = nullptr; /** tex */ cocos2d::NTextureData::Usage arg2 = (cocos2d::NTextureData::Usage)0; /** usage */ olua_to_object(L, 1, &self, "cc.Mesh"); - olua_check_string(L, 2, &arg1); + olua_check_object(L, 2, &arg1, "cc.Texture2D"); olua_check_enum(L, 3, &arg2); - // void setTexture(const std::string &texPath, cocos2d::NTextureData::Usage usage) + // void setTexture(cocos2d::Texture2D *tex, cocos2d::NTextureData::Usage usage) self->setTexture(arg1, arg2); olua_endinvoke(L); @@ -1158,19 +1274,19 @@ static int _cocos2d_Mesh_setTexture$4(lua_State *L) return 0; } -static int _cocos2d_Mesh_setTexture$5(lua_State *L) +static int _olua_fun_cocos2d_Mesh_setTexture$5(lua_State *L) { olua_startinvoke(L); cocos2d::Mesh *self = nullptr; - cocos2d::Texture2D *arg1 = nullptr; /** tex */ + std::string arg1; /** texPath */ cocos2d::NTextureData::Usage arg2 = (cocos2d::NTextureData::Usage)0; /** usage */ olua_to_object(L, 1, &self, "cc.Mesh"); - olua_check_object(L, 2, &arg1, "cc.Texture2D"); + olua_check_string(L, 2, &arg1); olua_check_enum(L, 3, &arg2); - // void setTexture(cocos2d::Texture2D *tex, cocos2d::NTextureData::Usage usage, @optional bool cacheFileName) + // void setTexture(const std::string &texPath, cocos2d::NTextureData::Usage usage) self->setTexture(arg1, arg2); olua_endinvoke(L); @@ -1178,38 +1294,38 @@ static int _cocos2d_Mesh_setTexture$5(lua_State *L) return 0; } -static int _cocos2d_Mesh_setTexture(lua_State *L) +static int _olua_fun_cocos2d_Mesh_setTexture(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { if ((olua_is_string(L, 2))) { // void setTexture(const std::string &texPath) - return _cocos2d_Mesh_setTexture$1(L); + return _olua_fun_cocos2d_Mesh_setTexture$1(L); } // if ((olua_is_object(L, 2, "cc.Texture2D"))) { // void setTexture(cocos2d::Texture2D *tex) - return _cocos2d_Mesh_setTexture$2(L); + return _olua_fun_cocos2d_Mesh_setTexture$2(L); // } } if (num_args == 2) { - if ((olua_is_string(L, 2)) && (olua_is_enum(L, 3))) { - // void setTexture(const std::string &texPath, cocos2d::NTextureData::Usage usage) - return _cocos2d_Mesh_setTexture$4(L); + if ((olua_is_object(L, 2, "cc.Texture2D")) && (olua_is_enum(L, 3))) { + // void setTexture(cocos2d::Texture2D *tex, cocos2d::NTextureData::Usage usage) + return _olua_fun_cocos2d_Mesh_setTexture$4(L); } - // if ((olua_is_object(L, 2, "cc.Texture2D")) && (olua_is_enum(L, 3))) { - // void setTexture(cocos2d::Texture2D *tex, cocos2d::NTextureData::Usage usage, @optional bool cacheFileName) - return _cocos2d_Mesh_setTexture$5(L); + // if ((olua_is_string(L, 2)) && (olua_is_enum(L, 3))) { + // void setTexture(const std::string &texPath, cocos2d::NTextureData::Usage usage) + return _olua_fun_cocos2d_Mesh_setTexture$5(L); // } } if (num_args == 3) { // if ((olua_is_object(L, 2, "cc.Texture2D")) && (olua_is_enum(L, 3)) && (olua_is_bool(L, 4))) { // void setTexture(cocos2d::Texture2D *tex, cocos2d::NTextureData::Usage usage, @optional bool cacheFileName) - return _cocos2d_Mesh_setTexture$3(L); + return _olua_fun_cocos2d_Mesh_setTexture$3(L); // } } @@ -1218,7 +1334,7 @@ static int _cocos2d_Mesh_setTexture(lua_State *L) return 0; } -static int _cocos2d_Mesh_setVisible(lua_State *L) +static int _olua_fun_cocos2d_Mesh_setVisible(lua_State *L) { olua_startinvoke(L); @@ -1236,59 +1352,68 @@ static int _cocos2d_Mesh_setVisible(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_Mesh(lua_State *L) +static int _olua_cls_cc_Mesh(lua_State *L) { oluacls_class(L, "cc.Mesh"); - oluacls_func(L, "calculateAABB", _cocos2d_Mesh_calculateAABB); - oluacls_func(L, "create", _cocos2d_Mesh_create); - oluacls_func(L, "draw", _cocos2d_Mesh_draw); - oluacls_func(L, "getBlendFunc", _cocos2d_Mesh_getBlendFunc); - oluacls_func(L, "getIndexBuffer", _cocos2d_Mesh_getIndexBuffer); - oluacls_func(L, "getIndexCount", _cocos2d_Mesh_getIndexCount); - oluacls_func(L, "getIndexFormat", _cocos2d_Mesh_getIndexFormat); - oluacls_func(L, "getMaterial", _cocos2d_Mesh_getMaterial); - oluacls_func(L, "getMeshVertexAttribCount", _cocos2d_Mesh_getMeshVertexAttribCount); - oluacls_func(L, "getMeshVertexAttribute", _cocos2d_Mesh_getMeshVertexAttribute); - oluacls_func(L, "getName", _cocos2d_Mesh_getName); - oluacls_func(L, "getPrimitiveType", _cocos2d_Mesh_getPrimitiveType); - oluacls_func(L, "getProgramState", _cocos2d_Mesh_getProgramState); - oluacls_func(L, "getSkin", _cocos2d_Mesh_getSkin); - oluacls_func(L, "getTexture", _cocos2d_Mesh_getTexture); - oluacls_func(L, "getTextureFileName", _cocos2d_Mesh_getTextureFileName); - oluacls_func(L, "getVertexBuffer", _cocos2d_Mesh_getVertexBuffer); - oluacls_func(L, "getVertexSizeInBytes", _cocos2d_Mesh_getVertexSizeInBytes); - oluacls_func(L, "hasVertexAttrib", _cocos2d_Mesh_hasVertexAttrib); - oluacls_func(L, "isVisible", _cocos2d_Mesh_isVisible); - oluacls_func(L, "new", _cocos2d_Mesh_new); - oluacls_func(L, "setBlendFunc", _cocos2d_Mesh_setBlendFunc); - oluacls_func(L, "setForce2DQueue", _cocos2d_Mesh_setForce2DQueue); - oluacls_func(L, "setMaterial", _cocos2d_Mesh_setMaterial); - oluacls_func(L, "setName", _cocos2d_Mesh_setName); - oluacls_func(L, "setProgramState", _cocos2d_Mesh_setProgramState); - oluacls_func(L, "setSkin", _cocos2d_Mesh_setSkin); - oluacls_func(L, "setTexture", _cocos2d_Mesh_setTexture); - oluacls_func(L, "setVisible", _cocos2d_Mesh_setVisible); - oluacls_prop(L, "blendFunc", _cocos2d_Mesh_getBlendFunc, _cocos2d_Mesh_setBlendFunc); - oluacls_prop(L, "indexBuffer", _cocos2d_Mesh_getIndexBuffer, nullptr); - oluacls_prop(L, "indexCount", _cocos2d_Mesh_getIndexCount, nullptr); - oluacls_prop(L, "indexFormat", _cocos2d_Mesh_getIndexFormat, nullptr); - oluacls_prop(L, "material", _cocos2d_Mesh_getMaterial, _cocos2d_Mesh_setMaterial); - oluacls_prop(L, "meshVertexAttribCount", _cocos2d_Mesh_getMeshVertexAttribCount, nullptr); - oluacls_prop(L, "name", _cocos2d_Mesh_getName, _cocos2d_Mesh_setName); - oluacls_prop(L, "primitiveType", _cocos2d_Mesh_getPrimitiveType, nullptr); - oluacls_prop(L, "programState", _cocos2d_Mesh_getProgramState, _cocos2d_Mesh_setProgramState); - oluacls_prop(L, "skin", _cocos2d_Mesh_getSkin, _cocos2d_Mesh_setSkin); - oluacls_prop(L, "textureFileName", _cocos2d_Mesh_getTextureFileName, nullptr); - oluacls_prop(L, "vertexBuffer", _cocos2d_Mesh_getVertexBuffer, nullptr); - oluacls_prop(L, "vertexSizeInBytes", _cocos2d_Mesh_getVertexSizeInBytes, nullptr); - oluacls_prop(L, "visible", _cocos2d_Mesh_isVisible, _cocos2d_Mesh_setVisible); + oluacls_func(L, "calculateAABB", _olua_fun_cocos2d_Mesh_calculateAABB); + oluacls_func(L, "create", _olua_fun_cocos2d_Mesh_create); + oluacls_func(L, "draw", _olua_fun_cocos2d_Mesh_draw); + oluacls_func(L, "getBlendFunc", _olua_fun_cocos2d_Mesh_getBlendFunc); + oluacls_func(L, "getIndexBuffer", _olua_fun_cocos2d_Mesh_getIndexBuffer); + oluacls_func(L, "getIndexCount", _olua_fun_cocos2d_Mesh_getIndexCount); + oluacls_func(L, "getIndexFormat", _olua_fun_cocos2d_Mesh_getIndexFormat); + oluacls_func(L, "getMaterial", _olua_fun_cocos2d_Mesh_getMaterial); + oluacls_func(L, "getMeshVertexAttribCount", _olua_fun_cocos2d_Mesh_getMeshVertexAttribCount); + oluacls_func(L, "getMeshVertexAttribute", _olua_fun_cocos2d_Mesh_getMeshVertexAttribute); + oluacls_func(L, "getName", _olua_fun_cocos2d_Mesh_getName); + oluacls_func(L, "getPrimitiveType", _olua_fun_cocos2d_Mesh_getPrimitiveType); + oluacls_func(L, "getProgramState", _olua_fun_cocos2d_Mesh_getProgramState); + oluacls_func(L, "getSkin", _olua_fun_cocos2d_Mesh_getSkin); + oluacls_func(L, "getTexture", _olua_fun_cocos2d_Mesh_getTexture); + oluacls_func(L, "getTextureFileName", _olua_fun_cocos2d_Mesh_getTextureFileName); + oluacls_func(L, "getVertexBuffer", _olua_fun_cocos2d_Mesh_getVertexBuffer); + oluacls_func(L, "getVertexSizeInBytes", _olua_fun_cocos2d_Mesh_getVertexSizeInBytes); + oluacls_func(L, "hasVertexAttrib", _olua_fun_cocos2d_Mesh_hasVertexAttrib); + oluacls_func(L, "isVisible", _olua_fun_cocos2d_Mesh_isVisible); + oluacls_func(L, "new", _olua_fun_cocos2d_Mesh_new); + oluacls_func(L, "setBlendFunc", _olua_fun_cocos2d_Mesh_setBlendFunc); + oluacls_func(L, "setForce2DQueue", _olua_fun_cocos2d_Mesh_setForce2DQueue); + oluacls_func(L, "setMaterial", _olua_fun_cocos2d_Mesh_setMaterial); + oluacls_func(L, "setName", _olua_fun_cocos2d_Mesh_setName); + oluacls_func(L, "setProgramState", _olua_fun_cocos2d_Mesh_setProgramState); + oluacls_func(L, "setSkin", _olua_fun_cocos2d_Mesh_setSkin); + oluacls_func(L, "setTexture", _olua_fun_cocos2d_Mesh_setTexture); + oluacls_func(L, "setVisible", _olua_fun_cocos2d_Mesh_setVisible); + oluacls_prop(L, "blendFunc", _olua_fun_cocos2d_Mesh_getBlendFunc, _olua_fun_cocos2d_Mesh_setBlendFunc); + oluacls_prop(L, "indexBuffer", _olua_fun_cocos2d_Mesh_getIndexBuffer, nullptr); + oluacls_prop(L, "indexCount", _olua_fun_cocos2d_Mesh_getIndexCount, nullptr); + oluacls_prop(L, "indexFormat", _olua_fun_cocos2d_Mesh_getIndexFormat, nullptr); + oluacls_prop(L, "material", _olua_fun_cocos2d_Mesh_getMaterial, _olua_fun_cocos2d_Mesh_setMaterial); + oluacls_prop(L, "meshVertexAttribCount", _olua_fun_cocos2d_Mesh_getMeshVertexAttribCount, nullptr); + oluacls_prop(L, "name", _olua_fun_cocos2d_Mesh_getName, _olua_fun_cocos2d_Mesh_setName); + oluacls_prop(L, "primitiveType", _olua_fun_cocos2d_Mesh_getPrimitiveType, nullptr); + oluacls_prop(L, "programState", _olua_fun_cocos2d_Mesh_getProgramState, _olua_fun_cocos2d_Mesh_setProgramState); + oluacls_prop(L, "skin", _olua_fun_cocos2d_Mesh_getSkin, _olua_fun_cocos2d_Mesh_setSkin); + oluacls_prop(L, "textureFileName", _olua_fun_cocos2d_Mesh_getTextureFileName, nullptr); + oluacls_prop(L, "vertexBuffer", _olua_fun_cocos2d_Mesh_getVertexBuffer, nullptr); + oluacls_prop(L, "vertexSizeInBytes", _olua_fun_cocos2d_Mesh_getVertexSizeInBytes, nullptr); + oluacls_prop(L, "visible", _olua_fun_cocos2d_Mesh_isVisible, _olua_fun_cocos2d_Mesh_setVisible); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_Mesh(lua_State *L) +{ + olua_require(L, "cocos2d_3d", luaopen_cocos2d_3d); + if (!olua_getclass(L, "cc.Mesh")) { + luaL_error(L, "class not found: cocos2d::Mesh"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_MeshSkin_addSkinBone(lua_State *L) +static int _olua_fun_cocos2d_MeshSkin_addSkinBone(lua_State *L) { olua_startinvoke(L); @@ -1306,7 +1431,7 @@ static int _cocos2d_MeshSkin_addSkinBone(lua_State *L) return 0; } -static int _cocos2d_MeshSkin_getBoneByIndex(lua_State *L) +static int _olua_fun_cocos2d_MeshSkin_getBoneByIndex(lua_State *L) { olua_startinvoke(L); @@ -1325,7 +1450,7 @@ static int _cocos2d_MeshSkin_getBoneByIndex(lua_State *L) return num_ret; } -static int _cocos2d_MeshSkin_getBoneByName(lua_State *L) +static int _olua_fun_cocos2d_MeshSkin_getBoneByName(lua_State *L) { olua_startinvoke(L); @@ -1344,7 +1469,7 @@ static int _cocos2d_MeshSkin_getBoneByName(lua_State *L) return num_ret; } -static int _cocos2d_MeshSkin_getBoneCount(lua_State *L) +static int _olua_fun_cocos2d_MeshSkin_getBoneCount(lua_State *L) { olua_startinvoke(L); @@ -1361,7 +1486,7 @@ static int _cocos2d_MeshSkin_getBoneCount(lua_State *L) return num_ret; } -static int _cocos2d_MeshSkin_getBoneIndex(lua_State *L) +static int _olua_fun_cocos2d_MeshSkin_getBoneIndex(lua_State *L) { olua_startinvoke(L); @@ -1380,7 +1505,7 @@ static int _cocos2d_MeshSkin_getBoneIndex(lua_State *L) return num_ret; } -static int _cocos2d_MeshSkin_getInvBindPose(lua_State *L) +static int _olua_fun_cocos2d_MeshSkin_getInvBindPose(lua_State *L) { olua_startinvoke(L); @@ -1399,7 +1524,7 @@ static int _cocos2d_MeshSkin_getInvBindPose(lua_State *L) return num_ret; } -static int _cocos2d_MeshSkin_getMatrixPalette(lua_State *L) +static int _olua_fun_cocos2d_MeshSkin_getMatrixPalette(lua_State *L) { olua_startinvoke(L); @@ -1416,7 +1541,7 @@ static int _cocos2d_MeshSkin_getMatrixPalette(lua_State *L) return num_ret; } -static int _cocos2d_MeshSkin_getMatrixPaletteSize(lua_State *L) +static int _olua_fun_cocos2d_MeshSkin_getMatrixPaletteSize(lua_State *L) { olua_startinvoke(L); @@ -1433,7 +1558,7 @@ static int _cocos2d_MeshSkin_getMatrixPaletteSize(lua_State *L) return num_ret; } -static int _cocos2d_MeshSkin_getMatrixPaletteSizeInBytes(lua_State *L) +static int _olua_fun_cocos2d_MeshSkin_getMatrixPaletteSizeInBytes(lua_State *L) { olua_startinvoke(L); @@ -1450,7 +1575,7 @@ static int _cocos2d_MeshSkin_getMatrixPaletteSizeInBytes(lua_State *L) return num_ret; } -static int _cocos2d_MeshSkin_getRootBone(lua_State *L) +static int _olua_fun_cocos2d_MeshSkin_getRootBone(lua_State *L) { olua_startinvoke(L); @@ -1467,11 +1592,11 @@ static int _cocos2d_MeshSkin_getRootBone(lua_State *L) return num_ret; } -static int _cocos2d_MeshSkin_new(lua_State *L) +static int _olua_fun_cocos2d_MeshSkin_new(lua_State *L) { olua_startinvoke(L); - // MeshSkin() + // cocos2d::MeshSkin() cocos2d::MeshSkin *ret = new cocos2d::MeshSkin(); int num_ret = olua_push_object(L, ret, "cc.MeshSkin"); olua_postnew(L, ret); @@ -1481,7 +1606,7 @@ static int _cocos2d_MeshSkin_new(lua_State *L) return num_ret; } -static int _cocos2d_MeshSkin_removeAllBones(lua_State *L) +static int _olua_fun_cocos2d_MeshSkin_removeAllBones(lua_State *L) { olua_startinvoke(L); @@ -1497,34 +1622,42 @@ static int _cocos2d_MeshSkin_removeAllBones(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_MeshSkin(lua_State *L) +static int _olua_cls_cc_MeshSkin(lua_State *L) { oluacls_class(L, "cc.MeshSkin"); - oluacls_func(L, "addSkinBone", _cocos2d_MeshSkin_addSkinBone); - oluacls_func(L, "getBoneByIndex", _cocos2d_MeshSkin_getBoneByIndex); - oluacls_func(L, "getBoneByName", _cocos2d_MeshSkin_getBoneByName); - oluacls_func(L, "getBoneCount", _cocos2d_MeshSkin_getBoneCount); - oluacls_func(L, "getBoneIndex", _cocos2d_MeshSkin_getBoneIndex); - oluacls_func(L, "getInvBindPose", _cocos2d_MeshSkin_getInvBindPose); - oluacls_func(L, "getMatrixPalette", _cocos2d_MeshSkin_getMatrixPalette); - oluacls_func(L, "getMatrixPaletteSize", _cocos2d_MeshSkin_getMatrixPaletteSize); - oluacls_func(L, "getMatrixPaletteSizeInBytes", _cocos2d_MeshSkin_getMatrixPaletteSizeInBytes); - oluacls_func(L, "getRootBone", _cocos2d_MeshSkin_getRootBone); - oluacls_func(L, "new", _cocos2d_MeshSkin_new); - oluacls_func(L, "removeAllBones", _cocos2d_MeshSkin_removeAllBones); - oluacls_prop(L, "boneCount", _cocos2d_MeshSkin_getBoneCount, nullptr); - oluacls_prop(L, "matrixPalette", _cocos2d_MeshSkin_getMatrixPalette, nullptr); - oluacls_prop(L, "matrixPaletteSize", _cocos2d_MeshSkin_getMatrixPaletteSize, nullptr); - oluacls_prop(L, "matrixPaletteSizeInBytes", _cocos2d_MeshSkin_getMatrixPaletteSizeInBytes, nullptr); - oluacls_prop(L, "rootBone", _cocos2d_MeshSkin_getRootBone, nullptr); + oluacls_func(L, "addSkinBone", _olua_fun_cocos2d_MeshSkin_addSkinBone); + oluacls_func(L, "getBoneByIndex", _olua_fun_cocos2d_MeshSkin_getBoneByIndex); + oluacls_func(L, "getBoneByName", _olua_fun_cocos2d_MeshSkin_getBoneByName); + oluacls_func(L, "getBoneCount", _olua_fun_cocos2d_MeshSkin_getBoneCount); + oluacls_func(L, "getBoneIndex", _olua_fun_cocos2d_MeshSkin_getBoneIndex); + oluacls_func(L, "getInvBindPose", _olua_fun_cocos2d_MeshSkin_getInvBindPose); + oluacls_func(L, "getMatrixPalette", _olua_fun_cocos2d_MeshSkin_getMatrixPalette); + oluacls_func(L, "getMatrixPaletteSize", _olua_fun_cocos2d_MeshSkin_getMatrixPaletteSize); + oluacls_func(L, "getMatrixPaletteSizeInBytes", _olua_fun_cocos2d_MeshSkin_getMatrixPaletteSizeInBytes); + oluacls_func(L, "getRootBone", _olua_fun_cocos2d_MeshSkin_getRootBone); + oluacls_func(L, "new", _olua_fun_cocos2d_MeshSkin_new); + oluacls_func(L, "removeAllBones", _olua_fun_cocos2d_MeshSkin_removeAllBones); + oluacls_prop(L, "boneCount", _olua_fun_cocos2d_MeshSkin_getBoneCount, nullptr); + oluacls_prop(L, "matrixPalette", _olua_fun_cocos2d_MeshSkin_getMatrixPalette, nullptr); + oluacls_prop(L, "matrixPaletteSize", _olua_fun_cocos2d_MeshSkin_getMatrixPaletteSize, nullptr); + oluacls_prop(L, "matrixPaletteSizeInBytes", _olua_fun_cocos2d_MeshSkin_getMatrixPaletteSizeInBytes, nullptr); + oluacls_prop(L, "rootBone", _olua_fun_cocos2d_MeshSkin_getRootBone, nullptr); return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_BillBoard_Mode(lua_State *L) +OLUA_LIB int luaopen_cc_MeshSkin(lua_State *L) +{ + olua_require(L, "cocos2d_3d", luaopen_cocos2d_3d); + if (!olua_getclass(L, "cc.MeshSkin")) { + luaL_error(L, "class not found: cocos2d::MeshSkin"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_cc_BillBoard_Mode(lua_State *L) { oluacls_class(L, "cc.BillBoard.Mode"); oluacls_func(L, "__index", olua_indexerror); @@ -1534,9 +1667,19 @@ OLUA_LIB int luaopen_cocos2d_BillBoard_Mode(lua_State *L) return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_BillBoard_Mode(lua_State *L) +{ + olua_require(L, "cocos2d_3d", luaopen_cocos2d_3d); + if (!olua_getclass(L, "cc.BillBoard.Mode")) { + luaL_error(L, "class not found: cocos2d::BillBoard::Mode"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_BillBoard_create$1(lua_State *L) +static int _olua_fun_cocos2d_BillBoard_create$1(lua_State *L) { olua_startinvoke(L); @@ -1553,18 +1696,12 @@ static int _cocos2d_BillBoard_create$1(lua_State *L) return num_ret; } -static int _cocos2d_BillBoard_create$2(lua_State *L) +static int _olua_fun_cocos2d_BillBoard_create$2(lua_State *L) { olua_startinvoke(L); - std::string arg1; /** filename */ - cocos2d::BillBoard::Mode arg2 = (cocos2d::BillBoard::Mode)0; /** mode */ - - olua_check_string(L, 1, &arg1); - olua_check_enum(L, 2, &arg2); - - // static cocos2d::BillBoard *create(const std::string &filename, @optional cocos2d::BillBoard::Mode mode) - cocos2d::BillBoard *ret = cocos2d::BillBoard::create(arg1, arg2); + // static cocos2d::BillBoard *create() + cocos2d::BillBoard *ret = cocos2d::BillBoard::create(); int num_ret = olua_push_object(L, ret, "cc.BillBoard"); olua_endinvoke(L); @@ -1572,20 +1709,18 @@ static int _cocos2d_BillBoard_create$2(lua_State *L) return num_ret; } -static int _cocos2d_BillBoard_create$3(lua_State *L) +static int _olua_fun_cocos2d_BillBoard_create$3(lua_State *L) { olua_startinvoke(L); std::string arg1; /** filename */ - cocos2d::Rect arg2; /** rect */ - cocos2d::BillBoard::Mode arg3 = (cocos2d::BillBoard::Mode)0; /** mode */ + cocos2d::BillBoard::Mode arg2 = (cocos2d::BillBoard::Mode)0; /** mode */ olua_check_string(L, 1, &arg1); - olua_check_object(L, 2, &arg2, "cc.Rect"); - olua_check_enum(L, 3, &arg3); + olua_check_enum(L, 2, &arg2); - // static cocos2d::BillBoard *create(const std::string &filename, const cocos2d::Rect &rect, @optional cocos2d::BillBoard::Mode mode) - cocos2d::BillBoard *ret = cocos2d::BillBoard::create(arg1, arg2, arg3); + // static cocos2d::BillBoard *create(const std::string &filename, @optional cocos2d::BillBoard::Mode mode) + cocos2d::BillBoard *ret = cocos2d::BillBoard::create(arg1, arg2); int num_ret = olua_push_object(L, ret, "cc.BillBoard"); olua_endinvoke(L); @@ -1593,12 +1728,16 @@ static int _cocos2d_BillBoard_create$3(lua_State *L) return num_ret; } -static int _cocos2d_BillBoard_create$4(lua_State *L) +static int _olua_fun_cocos2d_BillBoard_create$4(lua_State *L) { olua_startinvoke(L); - // static cocos2d::BillBoard *create(@optional cocos2d::BillBoard::Mode mode) - cocos2d::BillBoard *ret = cocos2d::BillBoard::create(); + std::string arg1; /** filename */ + + olua_check_string(L, 1, &arg1); + + // static cocos2d::BillBoard *create(const std::string &filename) + cocos2d::BillBoard *ret = cocos2d::BillBoard::create(arg1); int num_ret = olua_push_object(L, ret, "cc.BillBoard"); olua_endinvoke(L); @@ -1606,16 +1745,20 @@ static int _cocos2d_BillBoard_create$4(lua_State *L) return num_ret; } -static int _cocos2d_BillBoard_create$5(lua_State *L) +static int _olua_fun_cocos2d_BillBoard_create$5(lua_State *L) { olua_startinvoke(L); std::string arg1; /** filename */ + cocos2d::Rect *arg2; /** rect */ + cocos2d::BillBoard::Mode arg3 = (cocos2d::BillBoard::Mode)0; /** mode */ olua_check_string(L, 1, &arg1); + olua_check_object(L, 2, &arg2, "cc.Rect"); + olua_check_enum(L, 3, &arg3); - // static cocos2d::BillBoard *create(const std::string &filename, @optional cocos2d::BillBoard::Mode mode) - cocos2d::BillBoard *ret = cocos2d::BillBoard::create(arg1); + // static cocos2d::BillBoard *create(const std::string &filename, const cocos2d::Rect &rect, @optional cocos2d::BillBoard::Mode mode) + cocos2d::BillBoard *ret = cocos2d::BillBoard::create(arg1, *arg2, arg3); int num_ret = olua_push_object(L, ret, "cc.BillBoard"); olua_endinvoke(L); @@ -1623,18 +1766,18 @@ static int _cocos2d_BillBoard_create$5(lua_State *L) return num_ret; } -static int _cocos2d_BillBoard_create$6(lua_State *L) +static int _olua_fun_cocos2d_BillBoard_create$6(lua_State *L) { olua_startinvoke(L); std::string arg1; /** filename */ - cocos2d::Rect arg2; /** rect */ + cocos2d::Rect *arg2; /** rect */ olua_check_string(L, 1, &arg1); olua_check_object(L, 2, &arg2, "cc.Rect"); - // static cocos2d::BillBoard *create(const std::string &filename, const cocos2d::Rect &rect, @optional cocos2d::BillBoard::Mode mode) - cocos2d::BillBoard *ret = cocos2d::BillBoard::create(arg1, arg2); + // static cocos2d::BillBoard *create(const std::string &filename, const cocos2d::Rect &rect) + cocos2d::BillBoard *ret = cocos2d::BillBoard::create(arg1, *arg2); int num_ret = olua_push_object(L, ret, "cc.BillBoard"); olua_endinvoke(L); @@ -1642,43 +1785,43 @@ static int _cocos2d_BillBoard_create$6(lua_State *L) return num_ret; } -static int _cocos2d_BillBoard_create(lua_State *L) +static int _olua_fun_cocos2d_BillBoard_create(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 0) { - // static cocos2d::BillBoard *create(@optional cocos2d::BillBoard::Mode mode) - return _cocos2d_BillBoard_create$4(L); + // static cocos2d::BillBoard *create() + return _olua_fun_cocos2d_BillBoard_create$2(L); } if (num_args == 1) { if ((olua_is_enum(L, 1))) { // static cocos2d::BillBoard *create(@optional cocos2d::BillBoard::Mode mode) - return _cocos2d_BillBoard_create$1(L); + return _olua_fun_cocos2d_BillBoard_create$1(L); } // if ((olua_is_string(L, 1))) { - // static cocos2d::BillBoard *create(const std::string &filename, @optional cocos2d::BillBoard::Mode mode) - return _cocos2d_BillBoard_create$5(L); + // static cocos2d::BillBoard *create(const std::string &filename) + return _olua_fun_cocos2d_BillBoard_create$4(L); // } } if (num_args == 2) { if ((olua_is_string(L, 1)) && (olua_is_object(L, 2, "cc.Rect"))) { - // static cocos2d::BillBoard *create(const std::string &filename, const cocos2d::Rect &rect, @optional cocos2d::BillBoard::Mode mode) - return _cocos2d_BillBoard_create$6(L); + // static cocos2d::BillBoard *create(const std::string &filename, const cocos2d::Rect &rect) + return _olua_fun_cocos2d_BillBoard_create$6(L); } // if ((olua_is_string(L, 1)) && (olua_is_enum(L, 2))) { // static cocos2d::BillBoard *create(const std::string &filename, @optional cocos2d::BillBoard::Mode mode) - return _cocos2d_BillBoard_create$2(L); + return _olua_fun_cocos2d_BillBoard_create$3(L); // } } if (num_args == 3) { // if ((olua_is_string(L, 1)) && (olua_is_object(L, 2, "cc.Rect")) && (olua_is_enum(L, 3))) { // static cocos2d::BillBoard *create(const std::string &filename, const cocos2d::Rect &rect, @optional cocos2d::BillBoard::Mode mode) - return _cocos2d_BillBoard_create$3(L); + return _olua_fun_cocos2d_BillBoard_create$5(L); // } } @@ -1687,7 +1830,7 @@ static int _cocos2d_BillBoard_create(lua_State *L) return 0; } -static int _cocos2d_BillBoard_createWithTexture$1(lua_State *L) +static int _olua_fun_cocos2d_BillBoard_createWithTexture$1(lua_State *L) { olua_startinvoke(L); @@ -1706,7 +1849,7 @@ static int _cocos2d_BillBoard_createWithTexture$1(lua_State *L) return num_ret; } -static int _cocos2d_BillBoard_createWithTexture$2(lua_State *L) +static int _olua_fun_cocos2d_BillBoard_createWithTexture$2(lua_State *L) { olua_startinvoke(L); @@ -1714,7 +1857,7 @@ static int _cocos2d_BillBoard_createWithTexture$2(lua_State *L) olua_check_object(L, 1, &arg1, "cc.Texture2D"); - // static cocos2d::BillBoard *createWithTexture(cocos2d::Texture2D *texture, @optional cocos2d::BillBoard::Mode mode) + // static cocos2d::BillBoard *createWithTexture(cocos2d::Texture2D *texture) cocos2d::BillBoard *ret = cocos2d::BillBoard::createWithTexture(arg1); int num_ret = olua_push_object(L, ret, "cc.BillBoard"); @@ -1723,21 +1866,21 @@ static int _cocos2d_BillBoard_createWithTexture$2(lua_State *L) return num_ret; } -static int _cocos2d_BillBoard_createWithTexture(lua_State *L) +static int _olua_fun_cocos2d_BillBoard_createWithTexture(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 1) { // if ((olua_is_object(L, 1, "cc.Texture2D"))) { - // static cocos2d::BillBoard *createWithTexture(cocos2d::Texture2D *texture, @optional cocos2d::BillBoard::Mode mode) - return _cocos2d_BillBoard_createWithTexture$2(L); + // static cocos2d::BillBoard *createWithTexture(cocos2d::Texture2D *texture) + return _olua_fun_cocos2d_BillBoard_createWithTexture$2(L); // } } if (num_args == 2) { // if ((olua_is_object(L, 1, "cc.Texture2D")) && (olua_is_enum(L, 2))) { // static cocos2d::BillBoard *createWithTexture(cocos2d::Texture2D *texture, @optional cocos2d::BillBoard::Mode mode) - return _cocos2d_BillBoard_createWithTexture$1(L); + return _olua_fun_cocos2d_BillBoard_createWithTexture$1(L); // } } @@ -1746,7 +1889,7 @@ static int _cocos2d_BillBoard_createWithTexture(lua_State *L) return 0; } -static int _cocos2d_BillBoard_getMode(lua_State *L) +static int _olua_fun_cocos2d_BillBoard_getMode(lua_State *L) { olua_startinvoke(L); @@ -1763,11 +1906,11 @@ static int _cocos2d_BillBoard_getMode(lua_State *L) return num_ret; } -static int _cocos2d_BillBoard_new(lua_State *L) +static int _olua_fun_cocos2d_BillBoard_new(lua_State *L) { olua_startinvoke(L); - // BillBoard() + // cocos2d::BillBoard() cocos2d::BillBoard *ret = new cocos2d::BillBoard(); int num_ret = olua_push_object(L, ret, "cc.BillBoard"); olua_postnew(L, ret); @@ -1777,7 +1920,7 @@ static int _cocos2d_BillBoard_new(lua_State *L) return num_ret; } -static int _cocos2d_BillBoard_setMode(lua_State *L) +static int _olua_fun_cocos2d_BillBoard_setMode(lua_State *L) { olua_startinvoke(L); @@ -1795,23 +1938,31 @@ static int _cocos2d_BillBoard_setMode(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_BillBoard(lua_State *L) +static int _olua_cls_cc_BillBoard(lua_State *L) { oluacls_class(L, "cc.BillBoard"); - oluacls_func(L, "create", _cocos2d_BillBoard_create); - oluacls_func(L, "createWithTexture", _cocos2d_BillBoard_createWithTexture); - oluacls_func(L, "getMode", _cocos2d_BillBoard_getMode); - oluacls_func(L, "new", _cocos2d_BillBoard_new); - oluacls_func(L, "setMode", _cocos2d_BillBoard_setMode); - oluacls_prop(L, "mode", _cocos2d_BillBoard_getMode, _cocos2d_BillBoard_setMode); + oluacls_func(L, "create", _olua_fun_cocos2d_BillBoard_create); + oluacls_func(L, "createWithTexture", _olua_fun_cocos2d_BillBoard_createWithTexture); + oluacls_func(L, "getMode", _olua_fun_cocos2d_BillBoard_getMode); + oluacls_func(L, "new", _olua_fun_cocos2d_BillBoard_new); + oluacls_func(L, "setMode", _olua_fun_cocos2d_BillBoard_setMode); + oluacls_prop(L, "mode", _olua_fun_cocos2d_BillBoard_getMode, _olua_fun_cocos2d_BillBoard_setMode); return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_Sprite3DMaterial_MaterialType(lua_State *L) +OLUA_LIB int luaopen_cc_BillBoard(lua_State *L) +{ + olua_require(L, "cocos2d_3d", luaopen_cocos2d_3d); + if (!olua_getclass(L, "cc.BillBoard")) { + luaL_error(L, "class not found: cocos2d::BillBoard"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_cc_Sprite3DMaterial_MaterialType(lua_State *L) { oluacls_class(L, "cc.Sprite3DMaterial.MaterialType"); oluacls_func(L, "__index", olua_indexerror); @@ -1826,9 +1977,19 @@ OLUA_LIB int luaopen_cocos2d_Sprite3DMaterial_MaterialType(lua_State *L) return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_Sprite3DMaterial_MaterialType(lua_State *L) +{ + olua_require(L, "cocos2d_3d", luaopen_cocos2d_3d); + if (!olua_getclass(L, "cc.Sprite3DMaterial.MaterialType")) { + luaL_error(L, "class not found: cocos2d::Sprite3DMaterial::MaterialType"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_Sprite3DMaterial_createBuiltInMaterial$1(lua_State *L) +static int _olua_fun_cocos2d_Sprite3DMaterial_createBuiltInMaterial$1(lua_State *L) { olua_startinvoke(L); @@ -1847,7 +2008,7 @@ static int _cocos2d_Sprite3DMaterial_createBuiltInMaterial$1(lua_State *L) return num_ret; } -static int _cocos2d_Sprite3DMaterial_createBuiltInMaterial$2(lua_State *L) +static int _olua_fun_cocos2d_Sprite3DMaterial_createBuiltInMaterial$2(lua_State *L) { olua_startinvoke(L); @@ -1859,19 +2020,19 @@ static int _cocos2d_Sprite3DMaterial_createBuiltInMaterial$2(lua_State *L) return 0; } -static int _cocos2d_Sprite3DMaterial_createBuiltInMaterial(lua_State *L) +static int _olua_fun_cocos2d_Sprite3DMaterial_createBuiltInMaterial(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 0) { // static void createBuiltInMaterial() - return _cocos2d_Sprite3DMaterial_createBuiltInMaterial$2(L); + return _olua_fun_cocos2d_Sprite3DMaterial_createBuiltInMaterial$2(L); } if (num_args == 2) { // if ((olua_is_enum(L, 1)) && (olua_is_bool(L, 2))) { // static cocos2d::Sprite3DMaterial *createBuiltInMaterial(cocos2d::Sprite3DMaterial::MaterialType type, bool skinned) - return _cocos2d_Sprite3DMaterial_createBuiltInMaterial$1(L); + return _olua_fun_cocos2d_Sprite3DMaterial_createBuiltInMaterial$1(L); // } } @@ -1880,7 +2041,7 @@ static int _cocos2d_Sprite3DMaterial_createBuiltInMaterial(lua_State *L) return 0; } -static int _cocos2d_Sprite3DMaterial_createWithFilename(lua_State *L) +static int _olua_fun_cocos2d_Sprite3DMaterial_createWithFilename(lua_State *L) { olua_startinvoke(L); @@ -1897,7 +2058,7 @@ static int _cocos2d_Sprite3DMaterial_createWithFilename(lua_State *L) return num_ret; } -static int _cocos2d_Sprite3DMaterial_createWithProgramState(lua_State *L) +static int _olua_fun_cocos2d_Sprite3DMaterial_createWithProgramState(lua_State *L) { olua_startinvoke(L); @@ -1914,7 +2075,7 @@ static int _cocos2d_Sprite3DMaterial_createWithProgramState(lua_State *L) return num_ret; } -static int _cocos2d_Sprite3DMaterial_getMaterialType(lua_State *L) +static int _olua_fun_cocos2d_Sprite3DMaterial_getMaterialType(lua_State *L) { olua_startinvoke(L); @@ -1931,7 +2092,7 @@ static int _cocos2d_Sprite3DMaterial_getMaterialType(lua_State *L) return num_ret; } -static int _cocos2d_Sprite3DMaterial_releaseBuiltInMaterial(lua_State *L) +static int _olua_fun_cocos2d_Sprite3DMaterial_releaseBuiltInMaterial(lua_State *L) { olua_startinvoke(L); @@ -1943,7 +2104,7 @@ static int _cocos2d_Sprite3DMaterial_releaseBuiltInMaterial(lua_State *L) return 0; } -static int _cocos2d_Sprite3DMaterial_releaseCachedMaterial(lua_State *L) +static int _olua_fun_cocos2d_Sprite3DMaterial_releaseCachedMaterial(lua_State *L) { olua_startinvoke(L); @@ -1955,7 +2116,7 @@ static int _cocos2d_Sprite3DMaterial_releaseCachedMaterial(lua_State *L) return 0; } -static int _cocos2d_Sprite3DMaterial_setTexture(lua_State *L) +static int _olua_fun_cocos2d_Sprite3DMaterial_setTexture(lua_State *L) { olua_startinvoke(L); @@ -1975,24 +2136,33 @@ static int _cocos2d_Sprite3DMaterial_setTexture(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_Sprite3DMaterial(lua_State *L) +static int _olua_cls_cc_Sprite3DMaterial(lua_State *L) { oluacls_class(L, "cc.Sprite3DMaterial"); - oluacls_func(L, "createBuiltInMaterial", _cocos2d_Sprite3DMaterial_createBuiltInMaterial); - oluacls_func(L, "createWithFilename", _cocos2d_Sprite3DMaterial_createWithFilename); - oluacls_func(L, "createWithProgramState", _cocos2d_Sprite3DMaterial_createWithProgramState); - oluacls_func(L, "getMaterialType", _cocos2d_Sprite3DMaterial_getMaterialType); - oluacls_func(L, "releaseBuiltInMaterial", _cocos2d_Sprite3DMaterial_releaseBuiltInMaterial); - oluacls_func(L, "releaseCachedMaterial", _cocos2d_Sprite3DMaterial_releaseCachedMaterial); - oluacls_func(L, "setTexture", _cocos2d_Sprite3DMaterial_setTexture); - oluacls_prop(L, "materialType", _cocos2d_Sprite3DMaterial_getMaterialType, nullptr); + oluacls_func(L, "createBuiltInMaterial", _olua_fun_cocos2d_Sprite3DMaterial_createBuiltInMaterial); + oluacls_func(L, "createWithFilename", _olua_fun_cocos2d_Sprite3DMaterial_createWithFilename); + oluacls_func(L, "createWithProgramState", _olua_fun_cocos2d_Sprite3DMaterial_createWithProgramState); + oluacls_func(L, "getMaterialType", _olua_fun_cocos2d_Sprite3DMaterial_getMaterialType); + oluacls_func(L, "releaseBuiltInMaterial", _olua_fun_cocos2d_Sprite3DMaterial_releaseBuiltInMaterial); + oluacls_func(L, "releaseCachedMaterial", _olua_fun_cocos2d_Sprite3DMaterial_releaseCachedMaterial); + oluacls_func(L, "setTexture", _olua_fun_cocos2d_Sprite3DMaterial_setTexture); + oluacls_prop(L, "materialType", _olua_fun_cocos2d_Sprite3DMaterial_getMaterialType, nullptr); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_Sprite3DMaterial(lua_State *L) +{ + olua_require(L, "cocos2d_3d", luaopen_cocos2d_3d); + if (!olua_getclass(L, "cc.Sprite3DMaterial")) { + luaL_error(L, "class not found: cocos2d::Sprite3DMaterial"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_Sprite3D_addMesh(lua_State *L) +static int _olua_fun_cocos2d_Sprite3D_addMesh(lua_State *L) { olua_startinvoke(L); @@ -2010,7 +2180,7 @@ static int _cocos2d_Sprite3D_addMesh(lua_State *L) return 0; } -static int _cocos2d_Sprite3D_afterAsyncLoad(lua_State *L) +static int _olua_fun_cocos2d_Sprite3D_afterAsyncLoad(lua_State *L) { olua_startinvoke(L); @@ -2028,7 +2198,7 @@ static int _cocos2d_Sprite3D_afterAsyncLoad(lua_State *L) return 0; } -static int _cocos2d_Sprite3D_as(lua_State *L) +static int _olua_fun_cocos2d_Sprite3D_as(lua_State *L) { olua_startinvoke(L); @@ -2056,7 +2226,7 @@ static int _cocos2d_Sprite3D_as(lua_State *L) return 1; } -static int _cocos2d_Sprite3D_create$1(lua_State *L) +static int _olua_fun_cocos2d_Sprite3D_create$1(lua_State *L) { olua_startinvoke(L); @@ -2069,7 +2239,7 @@ static int _cocos2d_Sprite3D_create$1(lua_State *L) return num_ret; } -static int _cocos2d_Sprite3D_create$2(lua_State *L) +static int _olua_fun_cocos2d_Sprite3D_create$2(lua_State *L) { olua_startinvoke(L); @@ -2086,7 +2256,7 @@ static int _cocos2d_Sprite3D_create$2(lua_State *L) return num_ret; } -static int _cocos2d_Sprite3D_create$3(lua_State *L) +static int _olua_fun_cocos2d_Sprite3D_create$3(lua_State *L) { olua_startinvoke(L); @@ -2105,26 +2275,26 @@ static int _cocos2d_Sprite3D_create$3(lua_State *L) return num_ret; } -static int _cocos2d_Sprite3D_create(lua_State *L) +static int _olua_fun_cocos2d_Sprite3D_create(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 0) { // static cocos2d::Sprite3D *create() - return _cocos2d_Sprite3D_create$1(L); + return _olua_fun_cocos2d_Sprite3D_create$1(L); } if (num_args == 1) { // if ((olua_is_string(L, 1))) { // static cocos2d::Sprite3D *create(const std::string &modelPath) - return _cocos2d_Sprite3D_create$2(L); + return _olua_fun_cocos2d_Sprite3D_create$2(L); // } } if (num_args == 2) { // if ((olua_is_string(L, 1)) && (olua_is_string(L, 2))) { // static cocos2d::Sprite3D *create(const std::string &modelPath, const std::string &texturePath) - return _cocos2d_Sprite3D_create$3(L); + return _olua_fun_cocos2d_Sprite3D_create$3(L); // } } @@ -2133,7 +2303,7 @@ static int _cocos2d_Sprite3D_create(lua_State *L) return 0; } -static int _cocos2d_Sprite3D_createAsync$1(lua_State *L) +static int _olua_fun_cocos2d_Sprite3D_createAsync$1(lua_State *L) { olua_startinvoke(L); @@ -2147,9 +2317,10 @@ static int _cocos2d_Sprite3D_createAsync$1(lua_State *L) void *cb_store = (void *)olua_pushclassobj(L, "cc.Sprite3D"); std::string cb_tag = "createAsync"; - std::string cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + std::string cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg2 = [cb_store, cb_name, cb_ctx](cocos2d::Sprite3D *arg1, void *arg2) { + // lua_State *ML = olua_mainthread(L); + arg2 = [cb_store, cb_name, cb_ctx /*, ML */](cocos2d::Sprite3D *cb_arg1, void *cb_arg2) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); @@ -2157,8 +2328,8 @@ static int _cocos2d_Sprite3D_createAsync$1(lua_State *L) int top = lua_gettop(L); size_t last = olua_push_objpool(L); olua_enable_objpool(L); - olua_push_object(L, arg1, "cc.Sprite3D"); - olua_push_object(L, arg2, "void *"); + olua_push_object(L, cb_arg1, "cc.Sprite3D"); + olua_push_object(L, cb_arg2, "void *"); olua_disable_objpool(L); olua_callback(L, cb_store, cb_name.c_str(), 2); @@ -2169,7 +2340,7 @@ static int _cocos2d_Sprite3D_createAsync$1(lua_State *L) } }; - // static void createAsync(const std::string &modelPath, @localvar const std::function &callback, void *callbackparam) + // static void createAsync(const std::string &modelPath, const std::function &callback, void *callbackparam) cocos2d::Sprite3D::createAsync(arg1, arg2, arg3); olua_endinvoke(L); @@ -2177,7 +2348,7 @@ static int _cocos2d_Sprite3D_createAsync$1(lua_State *L) return 0; } -static int _cocos2d_Sprite3D_createAsync$2(lua_State *L) +static int _olua_fun_cocos2d_Sprite3D_createAsync$2(lua_State *L) { olua_startinvoke(L); @@ -2193,9 +2364,10 @@ static int _cocos2d_Sprite3D_createAsync$2(lua_State *L) void *cb_store = (void *)olua_pushclassobj(L, "cc.Sprite3D"); std::string cb_tag = "createAsync"; - std::string cb_name = olua_setcallback(L, cb_store, 3, cb_tag.c_str(), OLUA_TAG_REPLACE); + std::string cb_name = olua_setcallback(L, cb_store, 3, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg3 = [cb_store, cb_name, cb_ctx](cocos2d::Sprite3D *arg1, void *arg2) { + // lua_State *ML = olua_mainthread(L); + arg3 = [cb_store, cb_name, cb_ctx /*, ML */](cocos2d::Sprite3D *cb_arg1, void *cb_arg2) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); @@ -2203,8 +2375,8 @@ static int _cocos2d_Sprite3D_createAsync$2(lua_State *L) int top = lua_gettop(L); size_t last = olua_push_objpool(L); olua_enable_objpool(L); - olua_push_object(L, arg1, "cc.Sprite3D"); - olua_push_object(L, arg2, "void *"); + olua_push_object(L, cb_arg1, "cc.Sprite3D"); + olua_push_object(L, cb_arg2, "void *"); olua_disable_objpool(L); olua_callback(L, cb_store, cb_name.c_str(), 2); @@ -2215,7 +2387,7 @@ static int _cocos2d_Sprite3D_createAsync$2(lua_State *L) } }; - // static void createAsync(const std::string &modelPath, const std::string &texturePath, @localvar const std::function &callback, void *callbackparam) + // static void createAsync(const std::string &modelPath, const std::string &texturePath, const std::function &callback, void *callbackparam) cocos2d::Sprite3D::createAsync(arg1, arg2, arg3, arg4); olua_endinvoke(L); @@ -2223,21 +2395,21 @@ static int _cocos2d_Sprite3D_createAsync$2(lua_State *L) return 0; } -static int _cocos2d_Sprite3D_createAsync(lua_State *L) +static int _olua_fun_cocos2d_Sprite3D_createAsync(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 3) { // if ((olua_is_string(L, 1)) && (olua_is_callback(L, 2, "std.function")) && (olua_is_object(L, 3, "void *"))) { - // static void createAsync(const std::string &modelPath, @localvar const std::function &callback, void *callbackparam) - return _cocos2d_Sprite3D_createAsync$1(L); + // static void createAsync(const std::string &modelPath, const std::function &callback, void *callbackparam) + return _olua_fun_cocos2d_Sprite3D_createAsync$1(L); // } } if (num_args == 4) { // if ((olua_is_string(L, 1)) && (olua_is_string(L, 2)) && (olua_is_callback(L, 3, "std.function")) && (olua_is_object(L, 4, "void *"))) { - // static void createAsync(const std::string &modelPath, const std::string &texturePath, @localvar const std::function &callback, void *callbackparam) - return _cocos2d_Sprite3D_createAsync$2(L); + // static void createAsync(const std::string &modelPath, const std::string &texturePath, const std::function &callback, void *callbackparam) + return _olua_fun_cocos2d_Sprite3D_createAsync$2(L); // } } @@ -2246,7 +2418,7 @@ static int _cocos2d_Sprite3D_createAsync(lua_State *L) return 0; } -static int _cocos2d_Sprite3D_genMaterial$1(lua_State *L) +static int _olua_fun_cocos2d_Sprite3D_genMaterial$1(lua_State *L) { olua_startinvoke(L); @@ -2264,7 +2436,7 @@ static int _cocos2d_Sprite3D_genMaterial$1(lua_State *L) return 0; } -static int _cocos2d_Sprite3D_genMaterial$2(lua_State *L) +static int _olua_fun_cocos2d_Sprite3D_genMaterial$2(lua_State *L) { olua_startinvoke(L); @@ -2272,7 +2444,7 @@ static int _cocos2d_Sprite3D_genMaterial$2(lua_State *L) olua_to_object(L, 1, &self, "cc.Sprite3D"); - // void genMaterial(@optional bool useLight) + // void genMaterial() self->genMaterial(); olua_endinvoke(L); @@ -2280,19 +2452,19 @@ static int _cocos2d_Sprite3D_genMaterial$2(lua_State *L) return 0; } -static int _cocos2d_Sprite3D_genMaterial(lua_State *L) +static int _olua_fun_cocos2d_Sprite3D_genMaterial(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 0) { - // void genMaterial(@optional bool useLight) - return _cocos2d_Sprite3D_genMaterial$2(L); + // void genMaterial() + return _olua_fun_cocos2d_Sprite3D_genMaterial$2(L); } if (num_args == 1) { // if ((olua_is_bool(L, 2))) { // void genMaterial(@optional bool useLight) - return _cocos2d_Sprite3D_genMaterial$1(L); + return _olua_fun_cocos2d_Sprite3D_genMaterial$1(L); // } } @@ -2301,7 +2473,7 @@ static int _cocos2d_Sprite3D_genMaterial(lua_State *L) return 0; } -static int _cocos2d_Sprite3D_getAttachNode(lua_State *L) +static int _olua_fun_cocos2d_Sprite3D_getAttachNode(lua_State *L) { olua_startinvoke(L); @@ -2320,7 +2492,7 @@ static int _cocos2d_Sprite3D_getAttachNode(lua_State *L) return num_ret; } -static int _cocos2d_Sprite3D_getBlendFunc(lua_State *L) +static int _olua_fun_cocos2d_Sprite3D_getBlendFunc(lua_State *L) { olua_startinvoke(L); @@ -2337,7 +2509,7 @@ static int _cocos2d_Sprite3D_getBlendFunc(lua_State *L) return num_ret; } -static int _cocos2d_Sprite3D_getLightMask(lua_State *L) +static int _olua_fun_cocos2d_Sprite3D_getLightMask(lua_State *L) { olua_startinvoke(L); @@ -2354,7 +2526,7 @@ static int _cocos2d_Sprite3D_getLightMask(lua_State *L) return num_ret; } -static int _cocos2d_Sprite3D_getMaterial(lua_State *L) +static int _olua_fun_cocos2d_Sprite3D_getMaterial(lua_State *L) { olua_startinvoke(L); @@ -2373,7 +2545,7 @@ static int _cocos2d_Sprite3D_getMaterial(lua_State *L) return num_ret; } -static int _cocos2d_Sprite3D_getMesh(lua_State *L) +static int _olua_fun_cocos2d_Sprite3D_getMesh(lua_State *L) { olua_startinvoke(L); @@ -2390,7 +2562,7 @@ static int _cocos2d_Sprite3D_getMesh(lua_State *L) return num_ret; } -static int _cocos2d_Sprite3D_getMeshArrayByName(lua_State *L) +static int _olua_fun_cocos2d_Sprite3D_getMeshArrayByName(lua_State *L) { olua_startinvoke(L); @@ -2411,7 +2583,7 @@ static int _cocos2d_Sprite3D_getMeshArrayByName(lua_State *L) return num_ret; } -static int _cocos2d_Sprite3D_getMeshByIndex(lua_State *L) +static int _olua_fun_cocos2d_Sprite3D_getMeshByIndex(lua_State *L) { olua_startinvoke(L); @@ -2430,7 +2602,7 @@ static int _cocos2d_Sprite3D_getMeshByIndex(lua_State *L) return num_ret; } -static int _cocos2d_Sprite3D_getMeshByName(lua_State *L) +static int _olua_fun_cocos2d_Sprite3D_getMeshByName(lua_State *L) { olua_startinvoke(L); @@ -2449,7 +2621,7 @@ static int _cocos2d_Sprite3D_getMeshByName(lua_State *L) return num_ret; } -static int _cocos2d_Sprite3D_getMeshCount(lua_State *L) +static int _olua_fun_cocos2d_Sprite3D_getMeshCount(lua_State *L) { olua_startinvoke(L); @@ -2466,7 +2638,7 @@ static int _cocos2d_Sprite3D_getMeshCount(lua_State *L) return num_ret; } -static int _cocos2d_Sprite3D_getMeshes(lua_State *L) +static int _olua_fun_cocos2d_Sprite3D_getMeshes(lua_State *L) { olua_startinvoke(L); @@ -2485,7 +2657,7 @@ static int _cocos2d_Sprite3D_getMeshes(lua_State *L) return num_ret; } -static int _cocos2d_Sprite3D_getSkeleton(lua_State *L) +static int _olua_fun_cocos2d_Sprite3D_getSkeleton(lua_State *L) { olua_startinvoke(L); @@ -2502,7 +2674,7 @@ static int _cocos2d_Sprite3D_getSkeleton(lua_State *L) return num_ret; } -static int _cocos2d_Sprite3D_initWithFile(lua_State *L) +static int _olua_fun_cocos2d_Sprite3D_initWithFile(lua_State *L) { olua_startinvoke(L); @@ -2521,7 +2693,7 @@ static int _cocos2d_Sprite3D_initWithFile(lua_State *L) return num_ret; } -static int _cocos2d_Sprite3D_isForceDepthWrite(lua_State *L) +static int _olua_fun_cocos2d_Sprite3D_isForceDepthWrite(lua_State *L) { olua_startinvoke(L); @@ -2538,7 +2710,7 @@ static int _cocos2d_Sprite3D_isForceDepthWrite(lua_State *L) return num_ret; } -static int _cocos2d_Sprite3D_loadFromCache(lua_State *L) +static int _olua_fun_cocos2d_Sprite3D_loadFromCache(lua_State *L) { olua_startinvoke(L); @@ -2557,11 +2729,11 @@ static int _cocos2d_Sprite3D_loadFromCache(lua_State *L) return num_ret; } -static int _cocos2d_Sprite3D_new(lua_State *L) +static int _olua_fun_cocos2d_Sprite3D_new(lua_State *L) { olua_startinvoke(L); - // Sprite3D() + // cocos2d::Sprite3D() cocos2d::Sprite3D *ret = new cocos2d::Sprite3D(); int num_ret = olua_push_object(L, ret, "cc.Sprite3D"); olua_postnew(L, ret); @@ -2571,7 +2743,7 @@ static int _cocos2d_Sprite3D_new(lua_State *L) return num_ret; } -static int _cocos2d_Sprite3D_onAABBDirty(lua_State *L) +static int _olua_fun_cocos2d_Sprite3D_onAABBDirty(lua_State *L) { olua_startinvoke(L); @@ -2587,7 +2759,7 @@ static int _cocos2d_Sprite3D_onAABBDirty(lua_State *L) return 0; } -static int _cocos2d_Sprite3D_removeAllAttachNode(lua_State *L) +static int _olua_fun_cocos2d_Sprite3D_removeAllAttachNode(lua_State *L) { olua_startinvoke(L); @@ -2603,7 +2775,7 @@ static int _cocos2d_Sprite3D_removeAllAttachNode(lua_State *L) return 0; } -static int _cocos2d_Sprite3D_removeAttachNode(lua_State *L) +static int _olua_fun_cocos2d_Sprite3D_removeAttachNode(lua_State *L) { olua_startinvoke(L); @@ -2621,25 +2793,25 @@ static int _cocos2d_Sprite3D_removeAttachNode(lua_State *L) return 0; } -static int _cocos2d_Sprite3D_setBlendFunc(lua_State *L) +static int _olua_fun_cocos2d_Sprite3D_setBlendFunc(lua_State *L) { olua_startinvoke(L); cocos2d::Sprite3D *self = nullptr; - cocos2d::BlendFunc arg1; /** blendFunc */ + cocos2d::BlendFunc *arg1; /** blendFunc */ olua_to_object(L, 1, &self, "cc.Sprite3D"); olua_check_object(L, 2, &arg1, "cc.BlendFunc"); // void setBlendFunc(const cocos2d::BlendFunc &blendFunc) - self->setBlendFunc(arg1); + self->setBlendFunc(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_Sprite3D_setCullFace(lua_State *L) +static int _olua_fun_cocos2d_Sprite3D_setCullFace(lua_State *L) { olua_startinvoke(L); @@ -2657,7 +2829,7 @@ static int _cocos2d_Sprite3D_setCullFace(lua_State *L) return 0; } -static int _cocos2d_Sprite3D_setCullFaceEnabled(lua_State *L) +static int _olua_fun_cocos2d_Sprite3D_setCullFaceEnabled(lua_State *L) { olua_startinvoke(L); @@ -2675,7 +2847,7 @@ static int _cocos2d_Sprite3D_setCullFaceEnabled(lua_State *L) return 0; } -static int _cocos2d_Sprite3D_setForce2DQueue(lua_State *L) +static int _olua_fun_cocos2d_Sprite3D_setForce2DQueue(lua_State *L) { olua_startinvoke(L); @@ -2693,7 +2865,7 @@ static int _cocos2d_Sprite3D_setForce2DQueue(lua_State *L) return 0; } -static int _cocos2d_Sprite3D_setForceDepthWrite(lua_State *L) +static int _olua_fun_cocos2d_Sprite3D_setForceDepthWrite(lua_State *L) { olua_startinvoke(L); @@ -2711,7 +2883,7 @@ static int _cocos2d_Sprite3D_setForceDepthWrite(lua_State *L) return 0; } -static int _cocos2d_Sprite3D_setLightMask(lua_State *L) +static int _olua_fun_cocos2d_Sprite3D_setLightMask(lua_State *L) { olua_startinvoke(L); @@ -2729,7 +2901,7 @@ static int _cocos2d_Sprite3D_setLightMask(lua_State *L) return 0; } -static int _cocos2d_Sprite3D_setMaterial$1(lua_State *L) +static int _olua_fun_cocos2d_Sprite3D_setMaterial$1(lua_State *L) { olua_startinvoke(L); @@ -2747,7 +2919,7 @@ static int _cocos2d_Sprite3D_setMaterial$1(lua_State *L) return 0; } -static int _cocos2d_Sprite3D_setMaterial$2(lua_State *L) +static int _olua_fun_cocos2d_Sprite3D_setMaterial$2(lua_State *L) { olua_startinvoke(L); @@ -2767,21 +2939,21 @@ static int _cocos2d_Sprite3D_setMaterial$2(lua_State *L) return 0; } -static int _cocos2d_Sprite3D_setMaterial(lua_State *L) +static int _olua_fun_cocos2d_Sprite3D_setMaterial(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_object(L, 2, "cc.Material"))) { // void setMaterial(cocos2d::Material *material) - return _cocos2d_Sprite3D_setMaterial$1(L); + return _olua_fun_cocos2d_Sprite3D_setMaterial$1(L); // } } if (num_args == 2) { // if ((olua_is_object(L, 2, "cc.Material")) && (olua_is_integer(L, 3))) { // void setMaterial(cocos2d::Material *material, int meshIndex) - return _cocos2d_Sprite3D_setMaterial$2(L); + return _olua_fun_cocos2d_Sprite3D_setMaterial$2(L); // } } @@ -2790,7 +2962,7 @@ static int _cocos2d_Sprite3D_setMaterial(lua_State *L) return 0; } -static int _cocos2d_Sprite3D_setTexture$1(lua_State *L) +static int _olua_fun_cocos2d_Sprite3D_setTexture$1(lua_State *L) { olua_startinvoke(L); @@ -2808,7 +2980,7 @@ static int _cocos2d_Sprite3D_setTexture$1(lua_State *L) return 0; } -static int _cocos2d_Sprite3D_setTexture$2(lua_State *L) +static int _olua_fun_cocos2d_Sprite3D_setTexture$2(lua_State *L) { olua_startinvoke(L); @@ -2826,19 +2998,19 @@ static int _cocos2d_Sprite3D_setTexture$2(lua_State *L) return 0; } -static int _cocos2d_Sprite3D_setTexture(lua_State *L) +static int _olua_fun_cocos2d_Sprite3D_setTexture(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { if ((olua_is_string(L, 2))) { // void setTexture(const std::string &texFile) - return _cocos2d_Sprite3D_setTexture$1(L); + return _olua_fun_cocos2d_Sprite3D_setTexture$1(L); } // if ((olua_is_object(L, 2, "cc.Texture2D"))) { // void setTexture(cocos2d::Texture2D *texture) - return _cocos2d_Sprite3D_setTexture$2(L); + return _olua_fun_cocos2d_Sprite3D_setTexture$2(L); // } } @@ -2847,55 +3019,64 @@ static int _cocos2d_Sprite3D_setTexture(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_Sprite3D(lua_State *L) +static int _olua_cls_cc_Sprite3D(lua_State *L) { oluacls_class(L, "cc.Sprite3D"); - oluacls_func(L, "addMesh", _cocos2d_Sprite3D_addMesh); - oluacls_func(L, "afterAsyncLoad", _cocos2d_Sprite3D_afterAsyncLoad); - oluacls_func(L, "as", _cocos2d_Sprite3D_as); - oluacls_func(L, "create", _cocos2d_Sprite3D_create); - oluacls_func(L, "createAsync", _cocos2d_Sprite3D_createAsync); - oluacls_func(L, "genMaterial", _cocos2d_Sprite3D_genMaterial); - oluacls_func(L, "getAttachNode", _cocos2d_Sprite3D_getAttachNode); - oluacls_func(L, "getBlendFunc", _cocos2d_Sprite3D_getBlendFunc); - oluacls_func(L, "getLightMask", _cocos2d_Sprite3D_getLightMask); - oluacls_func(L, "getMaterial", _cocos2d_Sprite3D_getMaterial); - oluacls_func(L, "getMesh", _cocos2d_Sprite3D_getMesh); - oluacls_func(L, "getMeshArrayByName", _cocos2d_Sprite3D_getMeshArrayByName); - oluacls_func(L, "getMeshByIndex", _cocos2d_Sprite3D_getMeshByIndex); - oluacls_func(L, "getMeshByName", _cocos2d_Sprite3D_getMeshByName); - oluacls_func(L, "getMeshCount", _cocos2d_Sprite3D_getMeshCount); - oluacls_func(L, "getMeshes", _cocos2d_Sprite3D_getMeshes); - oluacls_func(L, "getSkeleton", _cocos2d_Sprite3D_getSkeleton); - oluacls_func(L, "initWithFile", _cocos2d_Sprite3D_initWithFile); - oluacls_func(L, "isForceDepthWrite", _cocos2d_Sprite3D_isForceDepthWrite); - oluacls_func(L, "loadFromCache", _cocos2d_Sprite3D_loadFromCache); - oluacls_func(L, "new", _cocos2d_Sprite3D_new); - oluacls_func(L, "onAABBDirty", _cocos2d_Sprite3D_onAABBDirty); - oluacls_func(L, "removeAllAttachNode", _cocos2d_Sprite3D_removeAllAttachNode); - oluacls_func(L, "removeAttachNode", _cocos2d_Sprite3D_removeAttachNode); - oluacls_func(L, "setBlendFunc", _cocos2d_Sprite3D_setBlendFunc); - oluacls_func(L, "setCullFace", _cocos2d_Sprite3D_setCullFace); - oluacls_func(L, "setCullFaceEnabled", _cocos2d_Sprite3D_setCullFaceEnabled); - oluacls_func(L, "setForce2DQueue", _cocos2d_Sprite3D_setForce2DQueue); - oluacls_func(L, "setForceDepthWrite", _cocos2d_Sprite3D_setForceDepthWrite); - oluacls_func(L, "setLightMask", _cocos2d_Sprite3D_setLightMask); - oluacls_func(L, "setMaterial", _cocos2d_Sprite3D_setMaterial); - oluacls_func(L, "setTexture", _cocos2d_Sprite3D_setTexture); - oluacls_prop(L, "blendFunc", _cocos2d_Sprite3D_getBlendFunc, _cocos2d_Sprite3D_setBlendFunc); - oluacls_prop(L, "forceDepthWrite", _cocos2d_Sprite3D_isForceDepthWrite, _cocos2d_Sprite3D_setForceDepthWrite); - oluacls_prop(L, "lightMask", _cocos2d_Sprite3D_getLightMask, _cocos2d_Sprite3D_setLightMask); - oluacls_prop(L, "mesh", _cocos2d_Sprite3D_getMesh, nullptr); - oluacls_prop(L, "meshCount", _cocos2d_Sprite3D_getMeshCount, nullptr); - oluacls_prop(L, "meshes", _cocos2d_Sprite3D_getMeshes, nullptr); - oluacls_prop(L, "skeleton", _cocos2d_Sprite3D_getSkeleton, nullptr); + oluacls_func(L, "addMesh", _olua_fun_cocos2d_Sprite3D_addMesh); + oluacls_func(L, "afterAsyncLoad", _olua_fun_cocos2d_Sprite3D_afterAsyncLoad); + oluacls_func(L, "as", _olua_fun_cocos2d_Sprite3D_as); + oluacls_func(L, "create", _olua_fun_cocos2d_Sprite3D_create); + oluacls_func(L, "createAsync", _olua_fun_cocos2d_Sprite3D_createAsync); + oluacls_func(L, "genMaterial", _olua_fun_cocos2d_Sprite3D_genMaterial); + oluacls_func(L, "getAttachNode", _olua_fun_cocos2d_Sprite3D_getAttachNode); + oluacls_func(L, "getBlendFunc", _olua_fun_cocos2d_Sprite3D_getBlendFunc); + oluacls_func(L, "getLightMask", _olua_fun_cocos2d_Sprite3D_getLightMask); + oluacls_func(L, "getMaterial", _olua_fun_cocos2d_Sprite3D_getMaterial); + oluacls_func(L, "getMesh", _olua_fun_cocos2d_Sprite3D_getMesh); + oluacls_func(L, "getMeshArrayByName", _olua_fun_cocos2d_Sprite3D_getMeshArrayByName); + oluacls_func(L, "getMeshByIndex", _olua_fun_cocos2d_Sprite3D_getMeshByIndex); + oluacls_func(L, "getMeshByName", _olua_fun_cocos2d_Sprite3D_getMeshByName); + oluacls_func(L, "getMeshCount", _olua_fun_cocos2d_Sprite3D_getMeshCount); + oluacls_func(L, "getMeshes", _olua_fun_cocos2d_Sprite3D_getMeshes); + oluacls_func(L, "getSkeleton", _olua_fun_cocos2d_Sprite3D_getSkeleton); + oluacls_func(L, "initWithFile", _olua_fun_cocos2d_Sprite3D_initWithFile); + oluacls_func(L, "isForceDepthWrite", _olua_fun_cocos2d_Sprite3D_isForceDepthWrite); + oluacls_func(L, "loadFromCache", _olua_fun_cocos2d_Sprite3D_loadFromCache); + oluacls_func(L, "new", _olua_fun_cocos2d_Sprite3D_new); + oluacls_func(L, "onAABBDirty", _olua_fun_cocos2d_Sprite3D_onAABBDirty); + oluacls_func(L, "removeAllAttachNode", _olua_fun_cocos2d_Sprite3D_removeAllAttachNode); + oluacls_func(L, "removeAttachNode", _olua_fun_cocos2d_Sprite3D_removeAttachNode); + oluacls_func(L, "setBlendFunc", _olua_fun_cocos2d_Sprite3D_setBlendFunc); + oluacls_func(L, "setCullFace", _olua_fun_cocos2d_Sprite3D_setCullFace); + oluacls_func(L, "setCullFaceEnabled", _olua_fun_cocos2d_Sprite3D_setCullFaceEnabled); + oluacls_func(L, "setForce2DQueue", _olua_fun_cocos2d_Sprite3D_setForce2DQueue); + oluacls_func(L, "setForceDepthWrite", _olua_fun_cocos2d_Sprite3D_setForceDepthWrite); + oluacls_func(L, "setLightMask", _olua_fun_cocos2d_Sprite3D_setLightMask); + oluacls_func(L, "setMaterial", _olua_fun_cocos2d_Sprite3D_setMaterial); + oluacls_func(L, "setTexture", _olua_fun_cocos2d_Sprite3D_setTexture); + oluacls_prop(L, "blendFunc", _olua_fun_cocos2d_Sprite3D_getBlendFunc, _olua_fun_cocos2d_Sprite3D_setBlendFunc); + oluacls_prop(L, "forceDepthWrite", _olua_fun_cocos2d_Sprite3D_isForceDepthWrite, _olua_fun_cocos2d_Sprite3D_setForceDepthWrite); + oluacls_prop(L, "lightMask", _olua_fun_cocos2d_Sprite3D_getLightMask, _olua_fun_cocos2d_Sprite3D_setLightMask); + oluacls_prop(L, "mesh", _olua_fun_cocos2d_Sprite3D_getMesh, nullptr); + oluacls_prop(L, "meshCount", _olua_fun_cocos2d_Sprite3D_getMeshCount, nullptr); + oluacls_prop(L, "meshes", _olua_fun_cocos2d_Sprite3D_getMeshes, nullptr); + oluacls_prop(L, "skeleton", _olua_fun_cocos2d_Sprite3D_getSkeleton, nullptr); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_Sprite3D(lua_State *L) +{ + olua_require(L, "cocos2d_3d", luaopen_cocos2d_3d); + if (!olua_getclass(L, "cc.Sprite3D")) { + luaL_error(L, "class not found: cocos2d::Sprite3D"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_AttachNode_create(lua_State *L) +static int _olua_fun_cocos2d_AttachNode_create(lua_State *L) { olua_startinvoke(L); @@ -2912,11 +3093,11 @@ static int _cocos2d_AttachNode_create(lua_State *L) return num_ret; } -static int _cocos2d_AttachNode_new(lua_State *L) +static int _olua_fun_cocos2d_AttachNode_new(lua_State *L) { olua_startinvoke(L); - // AttachNode() + // cocos2d::AttachNode() cocos2d::AttachNode *ret = new cocos2d::AttachNode(); int num_ret = olua_push_object(L, ret, "cc.AttachNode"); olua_postnew(L, ret); @@ -2926,18 +3107,27 @@ static int _cocos2d_AttachNode_new(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_AttachNode(lua_State *L) +static int _olua_cls_cc_AttachNode(lua_State *L) { oluacls_class(L, "cc.AttachNode"); - oluacls_func(L, "create", _cocos2d_AttachNode_create); - oluacls_func(L, "new", _cocos2d_AttachNode_new); + oluacls_func(L, "create", _olua_fun_cocos2d_AttachNode_create); + oluacls_func(L, "new", _olua_fun_cocos2d_AttachNode_new); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_AttachNode(lua_State *L) +{ + olua_require(L, "cocos2d_3d", luaopen_cocos2d_3d); + if (!olua_getclass(L, "cc.AttachNode")) { + luaL_error(L, "class not found: cocos2d::AttachNode"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_Bone3D_addChildBone(lua_State *L) +static int _olua_fun_cocos2d_Bone3D_addChildBone(lua_State *L) { olua_startinvoke(L); @@ -2955,7 +3145,7 @@ static int _cocos2d_Bone3D_addChildBone(lua_State *L) return 0; } -static int _cocos2d_Bone3D_clearBoneBlendState(lua_State *L) +static int _olua_fun_cocos2d_Bone3D_clearBoneBlendState(lua_State *L) { olua_startinvoke(L); @@ -2971,7 +3161,7 @@ static int _cocos2d_Bone3D_clearBoneBlendState(lua_State *L) return 0; } -static int _cocos2d_Bone3D_create(lua_State *L) +static int _olua_fun_cocos2d_Bone3D_create(lua_State *L) { olua_startinvoke(L); @@ -2988,7 +3178,7 @@ static int _cocos2d_Bone3D_create(lua_State *L) return num_ret; } -static int _cocos2d_Bone3D_getChildBoneByIndex(lua_State *L) +static int _olua_fun_cocos2d_Bone3D_getChildBoneByIndex(lua_State *L) { olua_startinvoke(L); @@ -3007,7 +3197,7 @@ static int _cocos2d_Bone3D_getChildBoneByIndex(lua_State *L) return num_ret; } -static int _cocos2d_Bone3D_getChildBoneCount(lua_State *L) +static int _olua_fun_cocos2d_Bone3D_getChildBoneCount(lua_State *L) { olua_startinvoke(L); @@ -3024,7 +3214,7 @@ static int _cocos2d_Bone3D_getChildBoneCount(lua_State *L) return num_ret; } -static int _cocos2d_Bone3D_getInverseBindPose(lua_State *L) +static int _olua_fun_cocos2d_Bone3D_getInverseBindPose(lua_State *L) { olua_startinvoke(L); @@ -3041,7 +3231,7 @@ static int _cocos2d_Bone3D_getInverseBindPose(lua_State *L) return num_ret; } -static int _cocos2d_Bone3D_getName(lua_State *L) +static int _olua_fun_cocos2d_Bone3D_getName(lua_State *L) { olua_startinvoke(L); @@ -3058,7 +3248,7 @@ static int _cocos2d_Bone3D_getName(lua_State *L) return num_ret; } -static int _cocos2d_Bone3D_getParentBone(lua_State *L) +static int _olua_fun_cocos2d_Bone3D_getParentBone(lua_State *L) { olua_startinvoke(L); @@ -3075,7 +3265,7 @@ static int _cocos2d_Bone3D_getParentBone(lua_State *L) return num_ret; } -static int _cocos2d_Bone3D_getWorldMat(lua_State *L) +static int _olua_fun_cocos2d_Bone3D_getWorldMat(lua_State *L) { olua_startinvoke(L); @@ -3092,7 +3282,7 @@ static int _cocos2d_Bone3D_getWorldMat(lua_State *L) return num_ret; } -static int _cocos2d_Bone3D_removeAllChildBone(lua_State *L) +static int _olua_fun_cocos2d_Bone3D_removeAllChildBone(lua_State *L) { olua_startinvoke(L); @@ -3108,7 +3298,7 @@ static int _cocos2d_Bone3D_removeAllChildBone(lua_State *L) return 0; } -static int _cocos2d_Bone3D_removeChildBone(lua_State *L) +static int _olua_fun_cocos2d_Bone3D_removeChildBone(lua_State *L) { olua_startinvoke(L); @@ -3126,7 +3316,7 @@ static int _cocos2d_Bone3D_removeChildBone(lua_State *L) return 0; } -static int _cocos2d_Bone3D_removeChildBoneByIndex(lua_State *L) +static int _olua_fun_cocos2d_Bone3D_removeChildBoneByIndex(lua_State *L) { olua_startinvoke(L); @@ -3144,7 +3334,7 @@ static int _cocos2d_Bone3D_removeChildBoneByIndex(lua_State *L) return 0; } -static int _cocos2d_Bone3D_resetPose(lua_State *L) +static int _olua_fun_cocos2d_Bone3D_resetPose(lua_State *L) { olua_startinvoke(L); @@ -3160,7 +3350,7 @@ static int _cocos2d_Bone3D_resetPose(lua_State *L) return 0; } -static int _cocos2d_Bone3D_setAnimationValue$1(lua_State *L) +static int _olua_fun_cocos2d_Bone3D_setAnimationValue$1(lua_State *L) { olua_startinvoke(L); @@ -3172,9 +3362,9 @@ static int _cocos2d_Bone3D_setAnimationValue$1(lua_State *L) float arg5 = 0; /** weight */ olua_to_object(L, 1, &self, "cc.Bone3D"); - olua_check_pointer(L, 2, &arg1, "olua.float"); - olua_check_pointer(L, 3, &arg2, "olua.float"); - olua_check_pointer(L, 4, &arg3, "olua.float"); + olua_check_valueptr(L, 2, &arg1, "olua.float"); + olua_check_valueptr(L, 3, &arg2, "olua.float"); + olua_check_valueptr(L, 4, &arg3, "olua.float"); olua_check_object(L, 5, &arg4, "void *"); olua_check_number(L, 6, &arg5); @@ -3186,7 +3376,7 @@ static int _cocos2d_Bone3D_setAnimationValue$1(lua_State *L) return 0; } -static int _cocos2d_Bone3D_setAnimationValue$2(lua_State *L) +static int _olua_fun_cocos2d_Bone3D_setAnimationValue$2(lua_State *L) { olua_startinvoke(L); @@ -3196,11 +3386,11 @@ static int _cocos2d_Bone3D_setAnimationValue$2(lua_State *L) float *arg3 = nullptr; /** scale */ olua_to_object(L, 1, &self, "cc.Bone3D"); - olua_check_pointer(L, 2, &arg1, "olua.float"); - olua_check_pointer(L, 3, &arg2, "olua.float"); - olua_check_pointer(L, 4, &arg3, "olua.float"); + olua_check_valueptr(L, 2, &arg1, "olua.float"); + olua_check_valueptr(L, 3, &arg2, "olua.float"); + olua_check_valueptr(L, 4, &arg3, "olua.float"); - // void setAnimationValue(float *trans, float *rot, float *scale, @optional void *tag, @optional float weight) + // void setAnimationValue(float *trans, float *rot, float *scale) self->setAnimationValue(arg1, arg2, arg3); olua_endinvoke(L); @@ -3208,7 +3398,7 @@ static int _cocos2d_Bone3D_setAnimationValue$2(lua_State *L) return 0; } -static int _cocos2d_Bone3D_setAnimationValue$3(lua_State *L) +static int _olua_fun_cocos2d_Bone3D_setAnimationValue$3(lua_State *L) { olua_startinvoke(L); @@ -3219,12 +3409,12 @@ static int _cocos2d_Bone3D_setAnimationValue$3(lua_State *L) void *arg4 = nullptr; /** tag */ olua_to_object(L, 1, &self, "cc.Bone3D"); - olua_check_pointer(L, 2, &arg1, "olua.float"); - olua_check_pointer(L, 3, &arg2, "olua.float"); - olua_check_pointer(L, 4, &arg3, "olua.float"); + olua_check_valueptr(L, 2, &arg1, "olua.float"); + olua_check_valueptr(L, 3, &arg2, "olua.float"); + olua_check_valueptr(L, 4, &arg3, "olua.float"); olua_check_object(L, 5, &arg4, "void *"); - // void setAnimationValue(float *trans, float *rot, float *scale, @optional void *tag, @optional float weight) + // void setAnimationValue(float *trans, float *rot, float *scale, @optional void *tag) self->setAnimationValue(arg1, arg2, arg3, arg4); olua_endinvoke(L); @@ -3232,28 +3422,28 @@ static int _cocos2d_Bone3D_setAnimationValue$3(lua_State *L) return 0; } -static int _cocos2d_Bone3D_setAnimationValue(lua_State *L) +static int _olua_fun_cocos2d_Bone3D_setAnimationValue(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 3) { - // if ((olua_is_pointer(L, 2, "olua.float")) && (olua_is_pointer(L, 3, "olua.float")) && (olua_is_pointer(L, 4, "olua.float"))) { - // void setAnimationValue(float *trans, float *rot, float *scale, @optional void *tag, @optional float weight) - return _cocos2d_Bone3D_setAnimationValue$2(L); + // if ((olua_is_valueptr(L, 2, "olua.float")) && (olua_is_valueptr(L, 3, "olua.float")) && (olua_is_valueptr(L, 4, "olua.float"))) { + // void setAnimationValue(float *trans, float *rot, float *scale) + return _olua_fun_cocos2d_Bone3D_setAnimationValue$2(L); // } } if (num_args == 4) { - // if ((olua_is_pointer(L, 2, "olua.float")) && (olua_is_pointer(L, 3, "olua.float")) && (olua_is_pointer(L, 4, "olua.float")) && (olua_is_object(L, 5, "void *"))) { - // void setAnimationValue(float *trans, float *rot, float *scale, @optional void *tag, @optional float weight) - return _cocos2d_Bone3D_setAnimationValue$3(L); + // if ((olua_is_valueptr(L, 2, "olua.float")) && (olua_is_valueptr(L, 3, "olua.float")) && (olua_is_valueptr(L, 4, "olua.float")) && (olua_is_object(L, 5, "void *"))) { + // void setAnimationValue(float *trans, float *rot, float *scale, @optional void *tag) + return _olua_fun_cocos2d_Bone3D_setAnimationValue$3(L); // } } if (num_args == 5) { - // if ((olua_is_pointer(L, 2, "olua.float")) && (olua_is_pointer(L, 3, "olua.float")) && (olua_is_pointer(L, 4, "olua.float")) && (olua_is_object(L, 5, "void *")) && (olua_is_number(L, 6))) { + // if ((olua_is_valueptr(L, 2, "olua.float")) && (olua_is_valueptr(L, 3, "olua.float")) && (olua_is_valueptr(L, 4, "olua.float")) && (olua_is_object(L, 5, "void *")) && (olua_is_number(L, 6))) { // void setAnimationValue(float *trans, float *rot, float *scale, @optional void *tag, @optional float weight) - return _cocos2d_Bone3D_setAnimationValue$1(L); + return _olua_fun_cocos2d_Bone3D_setAnimationValue$1(L); // } } @@ -3262,43 +3452,43 @@ static int _cocos2d_Bone3D_setAnimationValue(lua_State *L) return 0; } -static int _cocos2d_Bone3D_setInverseBindPose(lua_State *L) +static int _olua_fun_cocos2d_Bone3D_setInverseBindPose(lua_State *L) { olua_startinvoke(L); cocos2d::Bone3D *self = nullptr; - cocos2d::Mat4 arg1; /** m */ + cocos2d::Mat4 *arg1; /** m */ olua_to_object(L, 1, &self, "cc.Bone3D"); olua_check_object(L, 2, &arg1, "cc.Mat4"); // void setInverseBindPose(const cocos2d::Mat4 &m) - self->setInverseBindPose(arg1); + self->setInverseBindPose(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_Bone3D_setOriPose(lua_State *L) +static int _olua_fun_cocos2d_Bone3D_setOriPose(lua_State *L) { olua_startinvoke(L); cocos2d::Bone3D *self = nullptr; - cocos2d::Mat4 arg1; /** m */ + cocos2d::Mat4 *arg1; /** m */ olua_to_object(L, 1, &self, "cc.Bone3D"); olua_check_object(L, 2, &arg1, "cc.Mat4"); // void setOriPose(const cocos2d::Mat4 &m) - self->setOriPose(arg1); + self->setOriPose(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_Bone3D_updateJointMatrix(lua_State *L) +static int _olua_fun_cocos2d_Bone3D_updateJointMatrix(lua_State *L) { olua_startinvoke(L); @@ -3316,7 +3506,7 @@ static int _cocos2d_Bone3D_updateJointMatrix(lua_State *L) return 0; } -static int _cocos2d_Bone3D_updateWorldMat(lua_State *L) +static int _olua_fun_cocos2d_Bone3D_updateWorldMat(lua_State *L) { olua_startinvoke(L); @@ -3332,39 +3522,48 @@ static int _cocos2d_Bone3D_updateWorldMat(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_Bone3D(lua_State *L) +static int _olua_cls_cc_Bone3D(lua_State *L) { oluacls_class(L, "cc.Bone3D"); - oluacls_func(L, "addChildBone", _cocos2d_Bone3D_addChildBone); - oluacls_func(L, "clearBoneBlendState", _cocos2d_Bone3D_clearBoneBlendState); - oluacls_func(L, "create", _cocos2d_Bone3D_create); - oluacls_func(L, "getChildBoneByIndex", _cocos2d_Bone3D_getChildBoneByIndex); - oluacls_func(L, "getChildBoneCount", _cocos2d_Bone3D_getChildBoneCount); - oluacls_func(L, "getInverseBindPose", _cocos2d_Bone3D_getInverseBindPose); - oluacls_func(L, "getName", _cocos2d_Bone3D_getName); - oluacls_func(L, "getParentBone", _cocos2d_Bone3D_getParentBone); - oluacls_func(L, "getWorldMat", _cocos2d_Bone3D_getWorldMat); - oluacls_func(L, "removeAllChildBone", _cocos2d_Bone3D_removeAllChildBone); - oluacls_func(L, "removeChildBone", _cocos2d_Bone3D_removeChildBone); - oluacls_func(L, "removeChildBoneByIndex", _cocos2d_Bone3D_removeChildBoneByIndex); - oluacls_func(L, "resetPose", _cocos2d_Bone3D_resetPose); - oluacls_func(L, "setAnimationValue", _cocos2d_Bone3D_setAnimationValue); - oluacls_func(L, "setInverseBindPose", _cocos2d_Bone3D_setInverseBindPose); - oluacls_func(L, "setOriPose", _cocos2d_Bone3D_setOriPose); - oluacls_func(L, "updateJointMatrix", _cocos2d_Bone3D_updateJointMatrix); - oluacls_func(L, "updateWorldMat", _cocos2d_Bone3D_updateWorldMat); - oluacls_prop(L, "childBoneCount", _cocos2d_Bone3D_getChildBoneCount, nullptr); - oluacls_prop(L, "inverseBindPose", _cocos2d_Bone3D_getInverseBindPose, _cocos2d_Bone3D_setInverseBindPose); - oluacls_prop(L, "name", _cocos2d_Bone3D_getName, nullptr); - oluacls_prop(L, "parentBone", _cocos2d_Bone3D_getParentBone, nullptr); - oluacls_prop(L, "worldMat", _cocos2d_Bone3D_getWorldMat, nullptr); + oluacls_func(L, "addChildBone", _olua_fun_cocos2d_Bone3D_addChildBone); + oluacls_func(L, "clearBoneBlendState", _olua_fun_cocos2d_Bone3D_clearBoneBlendState); + oluacls_func(L, "create", _olua_fun_cocos2d_Bone3D_create); + oluacls_func(L, "getChildBoneByIndex", _olua_fun_cocos2d_Bone3D_getChildBoneByIndex); + oluacls_func(L, "getChildBoneCount", _olua_fun_cocos2d_Bone3D_getChildBoneCount); + oluacls_func(L, "getInverseBindPose", _olua_fun_cocos2d_Bone3D_getInverseBindPose); + oluacls_func(L, "getName", _olua_fun_cocos2d_Bone3D_getName); + oluacls_func(L, "getParentBone", _olua_fun_cocos2d_Bone3D_getParentBone); + oluacls_func(L, "getWorldMat", _olua_fun_cocos2d_Bone3D_getWorldMat); + oluacls_func(L, "removeAllChildBone", _olua_fun_cocos2d_Bone3D_removeAllChildBone); + oluacls_func(L, "removeChildBone", _olua_fun_cocos2d_Bone3D_removeChildBone); + oluacls_func(L, "removeChildBoneByIndex", _olua_fun_cocos2d_Bone3D_removeChildBoneByIndex); + oluacls_func(L, "resetPose", _olua_fun_cocos2d_Bone3D_resetPose); + oluacls_func(L, "setAnimationValue", _olua_fun_cocos2d_Bone3D_setAnimationValue); + oluacls_func(L, "setInverseBindPose", _olua_fun_cocos2d_Bone3D_setInverseBindPose); + oluacls_func(L, "setOriPose", _olua_fun_cocos2d_Bone3D_setOriPose); + oluacls_func(L, "updateJointMatrix", _olua_fun_cocos2d_Bone3D_updateJointMatrix); + oluacls_func(L, "updateWorldMat", _olua_fun_cocos2d_Bone3D_updateWorldMat); + oluacls_prop(L, "childBoneCount", _olua_fun_cocos2d_Bone3D_getChildBoneCount, nullptr); + oluacls_prop(L, "inverseBindPose", _olua_fun_cocos2d_Bone3D_getInverseBindPose, _olua_fun_cocos2d_Bone3D_setInverseBindPose); + oluacls_prop(L, "name", _olua_fun_cocos2d_Bone3D_getName, nullptr); + oluacls_prop(L, "parentBone", _olua_fun_cocos2d_Bone3D_getParentBone, nullptr); + oluacls_prop(L, "worldMat", _olua_fun_cocos2d_Bone3D_getWorldMat, nullptr); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_Bone3D(lua_State *L) +{ + olua_require(L, "cocos2d_3d", luaopen_cocos2d_3d); + if (!olua_getclass(L, "cc.Bone3D")) { + luaL_error(L, "class not found: cocos2d::Bone3D"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_Skeleton3D_addBone(lua_State *L) +static int _olua_fun_cocos2d_Skeleton3D_addBone(lua_State *L) { olua_startinvoke(L); @@ -3382,7 +3581,7 @@ static int _cocos2d_Skeleton3D_addBone(lua_State *L) return 0; } -static int _cocos2d_Skeleton3D_getBoneByIndex(lua_State *L) +static int _olua_fun_cocos2d_Skeleton3D_getBoneByIndex(lua_State *L) { olua_startinvoke(L); @@ -3401,7 +3600,7 @@ static int _cocos2d_Skeleton3D_getBoneByIndex(lua_State *L) return num_ret; } -static int _cocos2d_Skeleton3D_getBoneByName(lua_State *L) +static int _olua_fun_cocos2d_Skeleton3D_getBoneByName(lua_State *L) { olua_startinvoke(L); @@ -3420,7 +3619,7 @@ static int _cocos2d_Skeleton3D_getBoneByName(lua_State *L) return num_ret; } -static int _cocos2d_Skeleton3D_getBoneCount(lua_State *L) +static int _olua_fun_cocos2d_Skeleton3D_getBoneCount(lua_State *L) { olua_startinvoke(L); @@ -3437,7 +3636,7 @@ static int _cocos2d_Skeleton3D_getBoneCount(lua_State *L) return num_ret; } -static int _cocos2d_Skeleton3D_getBoneIndex(lua_State *L) +static int _olua_fun_cocos2d_Skeleton3D_getBoneIndex(lua_State *L) { olua_startinvoke(L); @@ -3456,7 +3655,7 @@ static int _cocos2d_Skeleton3D_getBoneIndex(lua_State *L) return num_ret; } -static int _cocos2d_Skeleton3D_getRootBone(lua_State *L) +static int _olua_fun_cocos2d_Skeleton3D_getRootBone(lua_State *L) { olua_startinvoke(L); @@ -3475,7 +3674,7 @@ static int _cocos2d_Skeleton3D_getRootBone(lua_State *L) return num_ret; } -static int _cocos2d_Skeleton3D_getRootCount(lua_State *L) +static int _olua_fun_cocos2d_Skeleton3D_getRootCount(lua_State *L) { olua_startinvoke(L); @@ -3492,11 +3691,11 @@ static int _cocos2d_Skeleton3D_getRootCount(lua_State *L) return num_ret; } -static int _cocos2d_Skeleton3D_new(lua_State *L) +static int _olua_fun_cocos2d_Skeleton3D_new(lua_State *L) { olua_startinvoke(L); - // Skeleton3D() + // cocos2d::Skeleton3D() cocos2d::Skeleton3D *ret = new cocos2d::Skeleton3D(); int num_ret = olua_push_object(L, ret, "cc.Skeleton3D"); olua_postnew(L, ret); @@ -3506,7 +3705,7 @@ static int _cocos2d_Skeleton3D_new(lua_State *L) return num_ret; } -static int _cocos2d_Skeleton3D_removeAllBones(lua_State *L) +static int _olua_fun_cocos2d_Skeleton3D_removeAllBones(lua_State *L) { olua_startinvoke(L); @@ -3522,7 +3721,7 @@ static int _cocos2d_Skeleton3D_removeAllBones(lua_State *L) return 0; } -static int _cocos2d_Skeleton3D_updateBoneMatrix(lua_State *L) +static int _olua_fun_cocos2d_Skeleton3D_updateBoneMatrix(lua_State *L) { olua_startinvoke(L); @@ -3538,45 +3737,54 @@ static int _cocos2d_Skeleton3D_updateBoneMatrix(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_Skeleton3D(lua_State *L) +static int _olua_cls_cc_Skeleton3D(lua_State *L) { oluacls_class(L, "cc.Skeleton3D"); - oluacls_func(L, "addBone", _cocos2d_Skeleton3D_addBone); - oluacls_func(L, "getBoneByIndex", _cocos2d_Skeleton3D_getBoneByIndex); - oluacls_func(L, "getBoneByName", _cocos2d_Skeleton3D_getBoneByName); - oluacls_func(L, "getBoneCount", _cocos2d_Skeleton3D_getBoneCount); - oluacls_func(L, "getBoneIndex", _cocos2d_Skeleton3D_getBoneIndex); - oluacls_func(L, "getRootBone", _cocos2d_Skeleton3D_getRootBone); - oluacls_func(L, "getRootCount", _cocos2d_Skeleton3D_getRootCount); - oluacls_func(L, "new", _cocos2d_Skeleton3D_new); - oluacls_func(L, "removeAllBones", _cocos2d_Skeleton3D_removeAllBones); - oluacls_func(L, "updateBoneMatrix", _cocos2d_Skeleton3D_updateBoneMatrix); - oluacls_prop(L, "boneCount", _cocos2d_Skeleton3D_getBoneCount, nullptr); - oluacls_prop(L, "rootCount", _cocos2d_Skeleton3D_getRootCount, nullptr); + oluacls_func(L, "addBone", _olua_fun_cocos2d_Skeleton3D_addBone); + oluacls_func(L, "getBoneByIndex", _olua_fun_cocos2d_Skeleton3D_getBoneByIndex); + oluacls_func(L, "getBoneByName", _olua_fun_cocos2d_Skeleton3D_getBoneByName); + oluacls_func(L, "getBoneCount", _olua_fun_cocos2d_Skeleton3D_getBoneCount); + oluacls_func(L, "getBoneIndex", _olua_fun_cocos2d_Skeleton3D_getBoneIndex); + oluacls_func(L, "getRootBone", _olua_fun_cocos2d_Skeleton3D_getRootBone); + oluacls_func(L, "getRootCount", _olua_fun_cocos2d_Skeleton3D_getRootCount); + oluacls_func(L, "new", _olua_fun_cocos2d_Skeleton3D_new); + oluacls_func(L, "removeAllBones", _olua_fun_cocos2d_Skeleton3D_removeAllBones); + oluacls_func(L, "updateBoneMatrix", _olua_fun_cocos2d_Skeleton3D_updateBoneMatrix); + oluacls_prop(L, "boneCount", _olua_fun_cocos2d_Skeleton3D_getBoneCount, nullptr); + oluacls_prop(L, "rootCount", _olua_fun_cocos2d_Skeleton3D_getRootCount, nullptr); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_Skeleton3D(lua_State *L) +{ + olua_require(L, "cocos2d_3d", luaopen_cocos2d_3d); + if (!olua_getclass(L, "cc.Skeleton3D")) { + luaL_error(L, "class not found: cocos2d::Skeleton3D"); + } + return 1; +} OLUA_END_DECLS OLUA_BEGIN_DECLS OLUA_LIB int luaopen_cocos2d_3d(lua_State *L) { - olua_require(L, "cc.MeshVertexAttrib", luaopen_cocos2d_MeshVertexAttrib); - olua_require(L, "cc.NTextureData.Usage", luaopen_cocos2d_NTextureData_Usage); - olua_require(L, "cc.VertexKey", luaopen_cocos2d_shaderinfos_VertexKey); - olua_require(L, "cc.Uniformkey", luaopen_cocos2d_shaderinfos_Uniformkey); - olua_require(L, "cc.NTextureData", luaopen_cocos2d_NTextureData); - olua_require(L, "cc.Mesh", luaopen_cocos2d_Mesh); - olua_require(L, "cc.MeshSkin", luaopen_cocos2d_MeshSkin); - olua_require(L, "cc.BillBoard.Mode", luaopen_cocos2d_BillBoard_Mode); - olua_require(L, "cc.BillBoard", luaopen_cocos2d_BillBoard); - olua_require(L, "cc.Sprite3DMaterial.MaterialType", luaopen_cocos2d_Sprite3DMaterial_MaterialType); - olua_require(L, "cc.Sprite3DMaterial", luaopen_cocos2d_Sprite3DMaterial); - olua_require(L, "cc.Sprite3D", luaopen_cocos2d_Sprite3D); - olua_require(L, "cc.AttachNode", luaopen_cocos2d_AttachNode); - olua_require(L, "cc.Bone3D", luaopen_cocos2d_Bone3D); - olua_require(L, "cc.Skeleton3D", luaopen_cocos2d_Skeleton3D); + olua_require(L, "cc.MeshVertexAttrib", _olua_cls_cc_MeshVertexAttrib); + olua_require(L, "cc.NTextureData.Usage", _olua_cls_cc_NTextureData_Usage); + olua_require(L, "cc.VertexKey", _olua_cls_cc_VertexKey); + olua_require(L, "cc.Uniformkey", _olua_cls_cc_Uniformkey); + olua_require(L, "cc.NTextureData", _olua_cls_cc_NTextureData); + olua_require(L, "cc.Mesh", _olua_cls_cc_Mesh); + olua_require(L, "cc.MeshSkin", _olua_cls_cc_MeshSkin); + olua_require(L, "cc.BillBoard.Mode", _olua_cls_cc_BillBoard_Mode); + olua_require(L, "cc.BillBoard", _olua_cls_cc_BillBoard); + olua_require(L, "cc.Sprite3DMaterial.MaterialType", _olua_cls_cc_Sprite3DMaterial_MaterialType); + olua_require(L, "cc.Sprite3DMaterial", _olua_cls_cc_Sprite3DMaterial); + olua_require(L, "cc.Sprite3D", _olua_cls_cc_Sprite3D); + olua_require(L, "cc.AttachNode", _olua_cls_cc_AttachNode); + olua_require(L, "cc.Bone3D", _olua_cls_cc_Bone3D); + olua_require(L, "cc.Skeleton3D", _olua_cls_cc_Skeleton3D); return 0; } diff --git a/frameworks/cclua/src/lua-bindings/lua_cocos2d_3d.h b/frameworks/cclua/src/lua-bindings/lua_cocos2d_3d.h index e27b565b..71540cbf 100644 --- a/frameworks/cclua/src/lua-bindings/lua_cocos2d_3d.h +++ b/frameworks/cclua/src/lua-bindings/lua_cocos2d_3d.h @@ -1,5 +1,5 @@ // -// AUTO BUILD, DON'T MODIFY! +// AUTO GENERATED, DO NOT MODIFY! // #ifndef __AUTO_GEN_LUA_COCOS2D_3D_H__ #define __AUTO_GEN_LUA_COCOS2D_3D_H__ diff --git a/frameworks/cclua/src/lua-bindings/lua_cocos2d_action.cpp b/frameworks/cclua/src/lua-bindings/lua_cocos2d_action.cpp index c1cf7ca1..f8bdae34 100644 --- a/frameworks/cclua/src/lua-bindings/lua_cocos2d_action.cpp +++ b/frameworks/cclua/src/lua-bindings/lua_cocos2d_action.cpp @@ -1,13 +1,12 @@ // -// AUTO BUILD, DON'T MODIFY! +// AUTO GENERATED, DO NOT MODIFY! // #include "lua_cocos2d_action.h" #include "lua-bindings/lua_cocos2d_types.h" #include "lua-bindings/lua_conv_manual.h" #include "cocos2d.h" -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_tweenfunc_TweenType(lua_State *L) +static int _olua_cls_cc_tweenfunc_TweenType(lua_State *L) { oluacls_class(L, "cc.tweenfunc.TweenType"); oluacls_func(L, "__index", olua_indexerror); @@ -48,9 +47,19 @@ OLUA_LIB int luaopen_cocos2d_tweenfunc_TweenType(lua_State *L) return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_tweenfunc_TweenType(lua_State *L) +{ + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.tweenfunc.TweenType")) { + luaL_error(L, "class not found: cocos2d::tweenfunc::TweenType"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_Action_as(lua_State *L) +static int _olua_fun_cocos2d_Action_as(lua_State *L) { olua_startinvoke(L); @@ -78,7 +87,7 @@ static int _cocos2d_Action_as(lua_State *L) return 1; } -static int _cocos2d_Action_clone(lua_State *L) +static int _olua_fun_cocos2d_Action_clone(lua_State *L) { olua_startinvoke(L); @@ -95,7 +104,7 @@ static int _cocos2d_Action_clone(lua_State *L) return num_ret; } -static int _cocos2d_Action_description(lua_State *L) +static int _olua_fun_cocos2d_Action_description(lua_State *L) { olua_startinvoke(L); @@ -112,7 +121,7 @@ static int _cocos2d_Action_description(lua_State *L) return num_ret; } -static int _cocos2d_Action_getFlags(lua_State *L) +static int _olua_fun_cocos2d_Action_getFlags(lua_State *L) { olua_startinvoke(L); @@ -129,7 +138,7 @@ static int _cocos2d_Action_getFlags(lua_State *L) return num_ret; } -static int _cocos2d_Action_getOriginalTarget(lua_State *L) +static int _olua_fun_cocos2d_Action_getOriginalTarget(lua_State *L) { olua_startinvoke(L); @@ -146,7 +155,7 @@ static int _cocos2d_Action_getOriginalTarget(lua_State *L) return num_ret; } -static int _cocos2d_Action_getTag(lua_State *L) +static int _olua_fun_cocos2d_Action_getTag(lua_State *L) { olua_startinvoke(L); @@ -163,7 +172,7 @@ static int _cocos2d_Action_getTag(lua_State *L) return num_ret; } -static int _cocos2d_Action_getTarget(lua_State *L) +static int _olua_fun_cocos2d_Action_getTarget(lua_State *L) { olua_startinvoke(L); @@ -180,7 +189,7 @@ static int _cocos2d_Action_getTarget(lua_State *L) return num_ret; } -static int _cocos2d_Action_isDone(lua_State *L) +static int _olua_fun_cocos2d_Action_isDone(lua_State *L) { olua_startinvoke(L); @@ -197,7 +206,7 @@ static int _cocos2d_Action_isDone(lua_State *L) return num_ret; } -static int _cocos2d_Action_reverse(lua_State *L) +static int _olua_fun_cocos2d_Action_reverse(lua_State *L) { olua_startinvoke(L); @@ -214,7 +223,7 @@ static int _cocos2d_Action_reverse(lua_State *L) return num_ret; } -static int _cocos2d_Action_setFlags(lua_State *L) +static int _olua_fun_cocos2d_Action_setFlags(lua_State *L) { olua_startinvoke(L); @@ -232,7 +241,7 @@ static int _cocos2d_Action_setFlags(lua_State *L) return 0; } -static int _cocos2d_Action_setOriginalTarget(lua_State *L) +static int _olua_fun_cocos2d_Action_setOriginalTarget(lua_State *L) { olua_startinvoke(L); @@ -250,7 +259,7 @@ static int _cocos2d_Action_setOriginalTarget(lua_State *L) return 0; } -static int _cocos2d_Action_setTag(lua_State *L) +static int _olua_fun_cocos2d_Action_setTag(lua_State *L) { olua_startinvoke(L); @@ -268,7 +277,7 @@ static int _cocos2d_Action_setTag(lua_State *L) return 0; } -static int _cocos2d_Action_setTarget(lua_State *L) +static int _olua_fun_cocos2d_Action_setTarget(lua_State *L) { olua_startinvoke(L); @@ -286,7 +295,7 @@ static int _cocos2d_Action_setTarget(lua_State *L) return 0; } -static int _cocos2d_Action_startWithTarget(lua_State *L) +static int _olua_fun_cocos2d_Action_startWithTarget(lua_State *L) { olua_startinvoke(L); @@ -304,7 +313,7 @@ static int _cocos2d_Action_startWithTarget(lua_State *L) return 0; } -static int _cocos2d_Action_step(lua_State *L) +static int _olua_fun_cocos2d_Action_step(lua_State *L) { olua_startinvoke(L); @@ -322,7 +331,7 @@ static int _cocos2d_Action_step(lua_State *L) return 0; } -static int _cocos2d_Action_stop(lua_State *L) +static int _olua_fun_cocos2d_Action_stop(lua_State *L) { olua_startinvoke(L); @@ -338,7 +347,7 @@ static int _cocos2d_Action_stop(lua_State *L) return 0; } -static int _cocos2d_Action_update(lua_State *L) +static int _olua_fun_cocos2d_Action_update(lua_State *L) { olua_startinvoke(L); @@ -356,39 +365,48 @@ static int _cocos2d_Action_update(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_Action(lua_State *L) +static int _olua_cls_cc_Action(lua_State *L) { oluacls_class(L, "cc.Action"); - oluacls_func(L, "as", _cocos2d_Action_as); - oluacls_func(L, "clone", _cocos2d_Action_clone); - oluacls_func(L, "description", _cocos2d_Action_description); - oluacls_func(L, "getFlags", _cocos2d_Action_getFlags); - oluacls_func(L, "getOriginalTarget", _cocos2d_Action_getOriginalTarget); - oluacls_func(L, "getTag", _cocos2d_Action_getTag); - oluacls_func(L, "getTarget", _cocos2d_Action_getTarget); - oluacls_func(L, "isDone", _cocos2d_Action_isDone); - oluacls_func(L, "reverse", _cocos2d_Action_reverse); - oluacls_func(L, "setFlags", _cocos2d_Action_setFlags); - oluacls_func(L, "setOriginalTarget", _cocos2d_Action_setOriginalTarget); - oluacls_func(L, "setTag", _cocos2d_Action_setTag); - oluacls_func(L, "setTarget", _cocos2d_Action_setTarget); - oluacls_func(L, "startWithTarget", _cocos2d_Action_startWithTarget); - oluacls_func(L, "step", _cocos2d_Action_step); - oluacls_func(L, "stop", _cocos2d_Action_stop); - oluacls_func(L, "update", _cocos2d_Action_update); - oluacls_prop(L, "done", _cocos2d_Action_isDone, nullptr); - oluacls_prop(L, "flags", _cocos2d_Action_getFlags, _cocos2d_Action_setFlags); - oluacls_prop(L, "originalTarget", _cocos2d_Action_getOriginalTarget, _cocos2d_Action_setOriginalTarget); - oluacls_prop(L, "tag", _cocos2d_Action_getTag, _cocos2d_Action_setTag); - oluacls_prop(L, "target", _cocos2d_Action_getTarget, _cocos2d_Action_setTarget); + oluacls_func(L, "as", _olua_fun_cocos2d_Action_as); + oluacls_func(L, "clone", _olua_fun_cocos2d_Action_clone); + oluacls_func(L, "description", _olua_fun_cocos2d_Action_description); + oluacls_func(L, "getFlags", _olua_fun_cocos2d_Action_getFlags); + oluacls_func(L, "getOriginalTarget", _olua_fun_cocos2d_Action_getOriginalTarget); + oluacls_func(L, "getTag", _olua_fun_cocos2d_Action_getTag); + oluacls_func(L, "getTarget", _olua_fun_cocos2d_Action_getTarget); + oluacls_func(L, "isDone", _olua_fun_cocos2d_Action_isDone); + oluacls_func(L, "reverse", _olua_fun_cocos2d_Action_reverse); + oluacls_func(L, "setFlags", _olua_fun_cocos2d_Action_setFlags); + oluacls_func(L, "setOriginalTarget", _olua_fun_cocos2d_Action_setOriginalTarget); + oluacls_func(L, "setTag", _olua_fun_cocos2d_Action_setTag); + oluacls_func(L, "setTarget", _olua_fun_cocos2d_Action_setTarget); + oluacls_func(L, "startWithTarget", _olua_fun_cocos2d_Action_startWithTarget); + oluacls_func(L, "step", _olua_fun_cocos2d_Action_step); + oluacls_func(L, "stop", _olua_fun_cocos2d_Action_stop); + oluacls_func(L, "update", _olua_fun_cocos2d_Action_update); + oluacls_prop(L, "done", _olua_fun_cocos2d_Action_isDone, nullptr); + oluacls_prop(L, "flags", _olua_fun_cocos2d_Action_getFlags, _olua_fun_cocos2d_Action_setFlags); + oluacls_prop(L, "originalTarget", _olua_fun_cocos2d_Action_getOriginalTarget, _olua_fun_cocos2d_Action_setOriginalTarget); + oluacls_prop(L, "tag", _olua_fun_cocos2d_Action_getTag, _olua_fun_cocos2d_Action_setTag); + oluacls_prop(L, "target", _olua_fun_cocos2d_Action_getTarget, _olua_fun_cocos2d_Action_setTarget); oluacls_const(L, "INVALID_TAG", cocos2d::Action::INVALID_TAG); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_Action(lua_State *L) +{ + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.Action")) { + luaL_error(L, "class not found: cocos2d::Action"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_ActionTweenDelegate___gc(lua_State *L) +static int _olua_fun_cocos2d_ActionTweenDelegate___gc(lua_State *L) { olua_startinvoke(L); @@ -400,7 +418,7 @@ static int _cocos2d_ActionTweenDelegate___gc(lua_State *L) return 0; } -static int _cocos2d_ActionTweenDelegate___olua_move(lua_State *L) +static int _olua_fun_cocos2d_ActionTweenDelegate___olua_move(lua_State *L) { olua_startinvoke(L); @@ -412,7 +430,7 @@ static int _cocos2d_ActionTweenDelegate___olua_move(lua_State *L) return 1; } -static int _cocos2d_ActionTweenDelegate_updateTweenAction(lua_State *L) +static int _olua_fun_cocos2d_ActionTweenDelegate_updateTweenAction(lua_State *L) { olua_startinvoke(L); @@ -432,36 +450,28 @@ static int _cocos2d_ActionTweenDelegate_updateTweenAction(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ActionTweenDelegate(lua_State *L) +static int _olua_cls_cc_ActionTweenDelegate(lua_State *L) { oluacls_class(L, "cc.ActionTweenDelegate"); - oluacls_func(L, "__gc", _cocos2d_ActionTweenDelegate___gc); - oluacls_func(L, "__olua_move", _cocos2d_ActionTweenDelegate___olua_move); - oluacls_func(L, "updateTweenAction", _cocos2d_ActionTweenDelegate_updateTweenAction); + oluacls_func(L, "__gc", _olua_fun_cocos2d_ActionTweenDelegate___gc); + oluacls_func(L, "__olua_move", _olua_fun_cocos2d_ActionTweenDelegate___olua_move); + oluacls_func(L, "updateTweenAction", _olua_fun_cocos2d_ActionTweenDelegate_updateTweenAction); return 1; } -OLUA_END_DECLS -static int _cocos2d_FiniteTimeAction_clone(lua_State *L) +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_ActionTweenDelegate(lua_State *L) { - olua_startinvoke(L); - - cocos2d::FiniteTimeAction *self = nullptr; - - olua_to_object(L, 1, &self, "cc.FiniteTimeAction"); - - // cocos2d::FiniteTimeAction *clone() - cocos2d::FiniteTimeAction *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.FiniteTimeAction"); - - olua_endinvoke(L); - - return num_ret; + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.ActionTweenDelegate")) { + luaL_error(L, "class not found: cocos2d::ActionTweenDelegate"); + } + return 1; } +OLUA_END_DECLS -static int _cocos2d_FiniteTimeAction_getDuration(lua_State *L) +static int _olua_fun_cocos2d_FiniteTimeAction_getDuration(lua_State *L) { olua_startinvoke(L); @@ -478,24 +488,7 @@ static int _cocos2d_FiniteTimeAction_getDuration(lua_State *L) return num_ret; } -static int _cocos2d_FiniteTimeAction_reverse(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::FiniteTimeAction *self = nullptr; - - olua_to_object(L, 1, &self, "cc.FiniteTimeAction"); - - // cocos2d::FiniteTimeAction *reverse() - cocos2d::FiniteTimeAction *ret = self->reverse(); - int num_ret = olua_push_object(L, ret, "cc.FiniteTimeAction"); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_FiniteTimeAction_setDuration(lua_State *L) +static int _olua_fun_cocos2d_FiniteTimeAction_setDuration(lua_State *L) { olua_startinvoke(L); @@ -513,38 +506,28 @@ static int _cocos2d_FiniteTimeAction_setDuration(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_FiniteTimeAction(lua_State *L) +static int _olua_cls_cc_FiniteTimeAction(lua_State *L) { oluacls_class(L, "cc.FiniteTimeAction"); - oluacls_func(L, "clone", _cocos2d_FiniteTimeAction_clone); - oluacls_func(L, "getDuration", _cocos2d_FiniteTimeAction_getDuration); - oluacls_func(L, "reverse", _cocos2d_FiniteTimeAction_reverse); - oluacls_func(L, "setDuration", _cocos2d_FiniteTimeAction_setDuration); - oluacls_prop(L, "duration", _cocos2d_FiniteTimeAction_getDuration, _cocos2d_FiniteTimeAction_setDuration); + oluacls_func(L, "getDuration", _olua_fun_cocos2d_FiniteTimeAction_getDuration); + oluacls_func(L, "setDuration", _olua_fun_cocos2d_FiniteTimeAction_setDuration); + oluacls_prop(L, "duration", _olua_fun_cocos2d_FiniteTimeAction_getDuration, _olua_fun_cocos2d_FiniteTimeAction_setDuration); return 1; } -OLUA_END_DECLS -static int _cocos2d_Speed_clone(lua_State *L) +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_FiniteTimeAction(lua_State *L) { - olua_startinvoke(L); - - cocos2d::Speed *self = nullptr; - - olua_to_object(L, 1, &self, "cc.Speed"); - - // cocos2d::Speed *clone() - cocos2d::Speed *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.Speed"); - - olua_endinvoke(L); - - return num_ret; + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.FiniteTimeAction")) { + luaL_error(L, "class not found: cocos2d::FiniteTimeAction"); + } + return 1; } +OLUA_END_DECLS -static int _cocos2d_Speed_create(lua_State *L) +static int _olua_fun_cocos2d_Speed_create(lua_State *L) { olua_startinvoke(L); @@ -566,7 +549,7 @@ static int _cocos2d_Speed_create(lua_State *L) return num_ret; } -static int _cocos2d_Speed_getInnerAction(lua_State *L) +static int _olua_fun_cocos2d_Speed_getInnerAction(lua_State *L) { olua_startinvoke(L); @@ -586,7 +569,7 @@ static int _cocos2d_Speed_getInnerAction(lua_State *L) return num_ret; } -static int _cocos2d_Speed_getSpeed(lua_State *L) +static int _olua_fun_cocos2d_Speed_getSpeed(lua_State *L) { olua_startinvoke(L); @@ -603,24 +586,7 @@ static int _cocos2d_Speed_getSpeed(lua_State *L) return num_ret; } -static int _cocos2d_Speed_reverse(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::Speed *self = nullptr; - - olua_to_object(L, 1, &self, "cc.Speed"); - - // cocos2d::Speed *reverse() - cocos2d::Speed *ret = self->reverse(); - int num_ret = olua_push_object(L, ret, "cc.Speed"); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_Speed_setInnerAction(lua_State *L) +static int _olua_fun_cocos2d_Speed_setInnerAction(lua_State *L) { olua_startinvoke(L); @@ -641,7 +607,7 @@ static int _cocos2d_Speed_setInnerAction(lua_State *L) return 0; } -static int _cocos2d_Speed_setSpeed(lua_State *L) +static int _olua_fun_cocos2d_Speed_setSpeed(lua_State *L) { olua_startinvoke(L); @@ -659,53 +625,43 @@ static int _cocos2d_Speed_setSpeed(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_Speed(lua_State *L) +static int _olua_cls_cc_Speed(lua_State *L) { oluacls_class(L, "cc.Speed"); - oluacls_func(L, "clone", _cocos2d_Speed_clone); - oluacls_func(L, "create", _cocos2d_Speed_create); - oluacls_func(L, "getInnerAction", _cocos2d_Speed_getInnerAction); - oluacls_func(L, "getSpeed", _cocos2d_Speed_getSpeed); - oluacls_func(L, "reverse", _cocos2d_Speed_reverse); - oluacls_func(L, "setInnerAction", _cocos2d_Speed_setInnerAction); - oluacls_func(L, "setSpeed", _cocos2d_Speed_setSpeed); - oluacls_prop(L, "innerAction", _cocos2d_Speed_getInnerAction, _cocos2d_Speed_setInnerAction); - oluacls_prop(L, "speed", _cocos2d_Speed_getSpeed, _cocos2d_Speed_setSpeed); + oluacls_func(L, "create", _olua_fun_cocos2d_Speed_create); + oluacls_func(L, "getInnerAction", _olua_fun_cocos2d_Speed_getInnerAction); + oluacls_func(L, "getSpeed", _olua_fun_cocos2d_Speed_getSpeed); + oluacls_func(L, "setInnerAction", _olua_fun_cocos2d_Speed_setInnerAction); + oluacls_func(L, "setSpeed", _olua_fun_cocos2d_Speed_setSpeed); + oluacls_prop(L, "innerAction", _olua_fun_cocos2d_Speed_getInnerAction, _olua_fun_cocos2d_Speed_setInnerAction); + oluacls_prop(L, "speed", _olua_fun_cocos2d_Speed_getSpeed, _olua_fun_cocos2d_Speed_setSpeed); return 1; } -OLUA_END_DECLS -static int _cocos2d_Follow_clone(lua_State *L) +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_Speed(lua_State *L) { - olua_startinvoke(L); - - cocos2d::Follow *self = nullptr; - - olua_to_object(L, 1, &self, "cc.Follow"); - - // cocos2d::Follow *clone() - cocos2d::Follow *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.Follow"); - - olua_endinvoke(L); - - return num_ret; + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.Speed")) { + luaL_error(L, "class not found: cocos2d::Speed"); + } + return 1; } +OLUA_END_DECLS -static int _cocos2d_Follow_create$1(lua_State *L) +static int _olua_fun_cocos2d_Follow_create$1(lua_State *L) { olua_startinvoke(L); cocos2d::Node *arg1 = nullptr; /** followedNode */ - cocos2d::Rect arg2; /** rect */ + cocos2d::Rect *arg2; /** rect */ olua_check_object(L, 1, &arg1, "cc.Node"); olua_check_object(L, 2, &arg2, "cc.Rect"); // static cocos2d::Follow *create(cocos2d::Node *followedNode, @optional const cocos2d::Rect &rect) - cocos2d::Follow *ret = cocos2d::Follow::create(arg1, arg2); + cocos2d::Follow *ret = cocos2d::Follow::create(arg1, *arg2); int num_ret = olua_push_object(L, ret, "cc.Follow"); olua_endinvoke(L); @@ -713,7 +669,7 @@ static int _cocos2d_Follow_create$1(lua_State *L) return num_ret; } -static int _cocos2d_Follow_create$2(lua_State *L) +static int _olua_fun_cocos2d_Follow_create$2(lua_State *L) { olua_startinvoke(L); @@ -721,7 +677,7 @@ static int _cocos2d_Follow_create$2(lua_State *L) olua_check_object(L, 1, &arg1, "cc.Node"); - // static cocos2d::Follow *create(cocos2d::Node *followedNode, @optional const cocos2d::Rect &rect) + // static cocos2d::Follow *create(cocos2d::Node *followedNode) cocos2d::Follow *ret = cocos2d::Follow::create(arg1); int num_ret = olua_push_object(L, ret, "cc.Follow"); @@ -730,21 +686,21 @@ static int _cocos2d_Follow_create$2(lua_State *L) return num_ret; } -static int _cocos2d_Follow_create(lua_State *L) +static int _olua_fun_cocos2d_Follow_create(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 1) { // if ((olua_is_object(L, 1, "cc.Node"))) { - // static cocos2d::Follow *create(cocos2d::Node *followedNode, @optional const cocos2d::Rect &rect) - return _cocos2d_Follow_create$2(L); + // static cocos2d::Follow *create(cocos2d::Node *followedNode) + return _olua_fun_cocos2d_Follow_create$2(L); // } } if (num_args == 2) { // if ((olua_is_object(L, 1, "cc.Node")) && (olua_is_object(L, 2, "cc.Rect"))) { // static cocos2d::Follow *create(cocos2d::Node *followedNode, @optional const cocos2d::Rect &rect) - return _cocos2d_Follow_create$1(L); + return _olua_fun_cocos2d_Follow_create$1(L); // } } @@ -753,14 +709,14 @@ static int _cocos2d_Follow_create(lua_State *L) return 0; } -static int _cocos2d_Follow_createWithOffset$1(lua_State *L) +static int _olua_fun_cocos2d_Follow_createWithOffset$1(lua_State *L) { olua_startinvoke(L); cocos2d::Node *arg1 = nullptr; /** followedNode */ float arg2 = 0; /** xOffset */ float arg3 = 0; /** yOffset */ - cocos2d::Rect arg4; /** rect */ + cocos2d::Rect *arg4; /** rect */ olua_check_object(L, 1, &arg1, "cc.Node"); olua_check_number(L, 2, &arg2); @@ -768,7 +724,7 @@ static int _cocos2d_Follow_createWithOffset$1(lua_State *L) olua_check_object(L, 4, &arg4, "cc.Rect"); // static cocos2d::Follow *createWithOffset(cocos2d::Node *followedNode, float xOffset, float yOffset, @optional const cocos2d::Rect &rect) - cocos2d::Follow *ret = cocos2d::Follow::createWithOffset(arg1, arg2, arg3, arg4); + cocos2d::Follow *ret = cocos2d::Follow::createWithOffset(arg1, arg2, arg3, *arg4); int num_ret = olua_push_object(L, ret, "cc.Follow"); olua_endinvoke(L); @@ -776,7 +732,7 @@ static int _cocos2d_Follow_createWithOffset$1(lua_State *L) return num_ret; } -static int _cocos2d_Follow_createWithOffset$2(lua_State *L) +static int _olua_fun_cocos2d_Follow_createWithOffset$2(lua_State *L) { olua_startinvoke(L); @@ -788,7 +744,7 @@ static int _cocos2d_Follow_createWithOffset$2(lua_State *L) olua_check_number(L, 2, &arg2); olua_check_number(L, 3, &arg3); - // static cocos2d::Follow *createWithOffset(cocos2d::Node *followedNode, float xOffset, float yOffset, @optional const cocos2d::Rect &rect) + // static cocos2d::Follow *createWithOffset(cocos2d::Node *followedNode, float xOffset, float yOffset) cocos2d::Follow *ret = cocos2d::Follow::createWithOffset(arg1, arg2, arg3); int num_ret = olua_push_object(L, ret, "cc.Follow"); @@ -797,21 +753,21 @@ static int _cocos2d_Follow_createWithOffset$2(lua_State *L) return num_ret; } -static int _cocos2d_Follow_createWithOffset(lua_State *L) +static int _olua_fun_cocos2d_Follow_createWithOffset(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 3) { // if ((olua_is_object(L, 1, "cc.Node")) && (olua_is_number(L, 2)) && (olua_is_number(L, 3))) { - // static cocos2d::Follow *createWithOffset(cocos2d::Node *followedNode, float xOffset, float yOffset, @optional const cocos2d::Rect &rect) - return _cocos2d_Follow_createWithOffset$2(L); + // static cocos2d::Follow *createWithOffset(cocos2d::Node *followedNode, float xOffset, float yOffset) + return _olua_fun_cocos2d_Follow_createWithOffset$2(L); // } } if (num_args == 4) { // if ((olua_is_object(L, 1, "cc.Node")) && (olua_is_number(L, 2)) && (olua_is_number(L, 3)) && (olua_is_object(L, 4, "cc.Rect"))) { // static cocos2d::Follow *createWithOffset(cocos2d::Node *followedNode, float xOffset, float yOffset, @optional const cocos2d::Rect &rect) - return _cocos2d_Follow_createWithOffset$1(L); + return _olua_fun_cocos2d_Follow_createWithOffset$1(L); // } } @@ -820,20 +776,20 @@ static int _cocos2d_Follow_createWithOffset(lua_State *L) return 0; } -static int _cocos2d_Follow_initWithTarget$1(lua_State *L) +static int _olua_fun_cocos2d_Follow_initWithTarget$1(lua_State *L) { olua_startinvoke(L); cocos2d::Follow *self = nullptr; cocos2d::Node *arg1 = nullptr; /** followedNode */ - cocos2d::Rect arg2; /** rect */ + cocos2d::Rect *arg2; /** rect */ olua_to_object(L, 1, &self, "cc.Follow"); olua_check_object(L, 2, &arg1, "cc.Node"); olua_check_object(L, 3, &arg2, "cc.Rect"); // bool initWithTarget(cocos2d::Node *followedNode, @optional const cocos2d::Rect &rect) - bool ret = self->initWithTarget(arg1, arg2); + bool ret = self->initWithTarget(arg1, *arg2); int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); @@ -841,7 +797,7 @@ static int _cocos2d_Follow_initWithTarget$1(lua_State *L) return num_ret; } -static int _cocos2d_Follow_initWithTarget$2(lua_State *L) +static int _olua_fun_cocos2d_Follow_initWithTarget$2(lua_State *L) { olua_startinvoke(L); @@ -851,7 +807,7 @@ static int _cocos2d_Follow_initWithTarget$2(lua_State *L) olua_to_object(L, 1, &self, "cc.Follow"); olua_check_object(L, 2, &arg1, "cc.Node"); - // bool initWithTarget(cocos2d::Node *followedNode, @optional const cocos2d::Rect &rect) + // bool initWithTarget(cocos2d::Node *followedNode) bool ret = self->initWithTarget(arg1); int num_ret = olua_push_bool(L, ret); @@ -860,21 +816,21 @@ static int _cocos2d_Follow_initWithTarget$2(lua_State *L) return num_ret; } -static int _cocos2d_Follow_initWithTarget(lua_State *L) +static int _olua_fun_cocos2d_Follow_initWithTarget(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_object(L, 2, "cc.Node"))) { - // bool initWithTarget(cocos2d::Node *followedNode, @optional const cocos2d::Rect &rect) - return _cocos2d_Follow_initWithTarget$2(L); + // bool initWithTarget(cocos2d::Node *followedNode) + return _olua_fun_cocos2d_Follow_initWithTarget$2(L); // } } if (num_args == 2) { // if ((olua_is_object(L, 2, "cc.Node")) && (olua_is_object(L, 3, "cc.Rect"))) { // bool initWithTarget(cocos2d::Node *followedNode, @optional const cocos2d::Rect &rect) - return _cocos2d_Follow_initWithTarget$1(L); + return _olua_fun_cocos2d_Follow_initWithTarget$1(L); // } } @@ -883,7 +839,7 @@ static int _cocos2d_Follow_initWithTarget(lua_State *L) return 0; } -static int _cocos2d_Follow_initWithTargetAndOffset$1(lua_State *L) +static int _olua_fun_cocos2d_Follow_initWithTargetAndOffset$1(lua_State *L) { olua_startinvoke(L); @@ -891,7 +847,7 @@ static int _cocos2d_Follow_initWithTargetAndOffset$1(lua_State *L) cocos2d::Node *arg1 = nullptr; /** followedNode */ float arg2 = 0; /** xOffset */ float arg3 = 0; /** yOffset */ - cocos2d::Rect arg4; /** rect */ + cocos2d::Rect *arg4; /** rect */ olua_to_object(L, 1, &self, "cc.Follow"); olua_check_object(L, 2, &arg1, "cc.Node"); @@ -900,7 +856,7 @@ static int _cocos2d_Follow_initWithTargetAndOffset$1(lua_State *L) olua_check_object(L, 5, &arg4, "cc.Rect"); // bool initWithTargetAndOffset(cocos2d::Node *followedNode, float xOffset, float yOffset, @optional const cocos2d::Rect &rect) - bool ret = self->initWithTargetAndOffset(arg1, arg2, arg3, arg4); + bool ret = self->initWithTargetAndOffset(arg1, arg2, arg3, *arg4); int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); @@ -908,7 +864,7 @@ static int _cocos2d_Follow_initWithTargetAndOffset$1(lua_State *L) return num_ret; } -static int _cocos2d_Follow_initWithTargetAndOffset$2(lua_State *L) +static int _olua_fun_cocos2d_Follow_initWithTargetAndOffset$2(lua_State *L) { olua_startinvoke(L); @@ -922,7 +878,7 @@ static int _cocos2d_Follow_initWithTargetAndOffset$2(lua_State *L) olua_check_number(L, 3, &arg2); olua_check_number(L, 4, &arg3); - // bool initWithTargetAndOffset(cocos2d::Node *followedNode, float xOffset, float yOffset, @optional const cocos2d::Rect &rect) + // bool initWithTargetAndOffset(cocos2d::Node *followedNode, float xOffset, float yOffset) bool ret = self->initWithTargetAndOffset(arg1, arg2, arg3); int num_ret = olua_push_bool(L, ret); @@ -931,21 +887,21 @@ static int _cocos2d_Follow_initWithTargetAndOffset$2(lua_State *L) return num_ret; } -static int _cocos2d_Follow_initWithTargetAndOffset(lua_State *L) +static int _olua_fun_cocos2d_Follow_initWithTargetAndOffset(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 3) { // if ((olua_is_object(L, 2, "cc.Node")) && (olua_is_number(L, 3)) && (olua_is_number(L, 4))) { - // bool initWithTargetAndOffset(cocos2d::Node *followedNode, float xOffset, float yOffset, @optional const cocos2d::Rect &rect) - return _cocos2d_Follow_initWithTargetAndOffset$2(L); + // bool initWithTargetAndOffset(cocos2d::Node *followedNode, float xOffset, float yOffset) + return _olua_fun_cocos2d_Follow_initWithTargetAndOffset$2(L); // } } if (num_args == 4) { // if ((olua_is_object(L, 2, "cc.Node")) && (olua_is_number(L, 3)) && (olua_is_number(L, 4)) && (olua_is_object(L, 5, "cc.Rect"))) { // bool initWithTargetAndOffset(cocos2d::Node *followedNode, float xOffset, float yOffset, @optional const cocos2d::Rect &rect) - return _cocos2d_Follow_initWithTargetAndOffset$1(L); + return _olua_fun_cocos2d_Follow_initWithTargetAndOffset$1(L); // } } @@ -954,7 +910,7 @@ static int _cocos2d_Follow_initWithTargetAndOffset(lua_State *L) return 0; } -static int _cocos2d_Follow_isBoundarySet(lua_State *L) +static int _olua_fun_cocos2d_Follow_isBoundarySet(lua_State *L) { olua_startinvoke(L); @@ -971,24 +927,7 @@ static int _cocos2d_Follow_isBoundarySet(lua_State *L) return num_ret; } -static int _cocos2d_Follow_reverse(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::Follow *self = nullptr; - - olua_to_object(L, 1, &self, "cc.Follow"); - - // cocos2d::Follow *reverse() - cocos2d::Follow *ret = self->reverse(); - int num_ret = olua_push_object(L, ret, "cc.Follow"); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_Follow_setBoundarySet(lua_State *L) +static int _olua_fun_cocos2d_Follow_setBoundarySet(lua_State *L) { olua_startinvoke(L); @@ -1006,25 +945,32 @@ static int _cocos2d_Follow_setBoundarySet(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_Follow(lua_State *L) +static int _olua_cls_cc_Follow(lua_State *L) { oluacls_class(L, "cc.Follow"); - oluacls_func(L, "clone", _cocos2d_Follow_clone); - oluacls_func(L, "create", _cocos2d_Follow_create); - oluacls_func(L, "createWithOffset", _cocos2d_Follow_createWithOffset); - oluacls_func(L, "initWithTarget", _cocos2d_Follow_initWithTarget); - oluacls_func(L, "initWithTargetAndOffset", _cocos2d_Follow_initWithTargetAndOffset); - oluacls_func(L, "isBoundarySet", _cocos2d_Follow_isBoundarySet); - oluacls_func(L, "reverse", _cocos2d_Follow_reverse); - oluacls_func(L, "setBoundarySet", _cocos2d_Follow_setBoundarySet); - oluacls_prop(L, "boundarySet", _cocos2d_Follow_isBoundarySet, _cocos2d_Follow_setBoundarySet); + oluacls_func(L, "create", _olua_fun_cocos2d_Follow_create); + oluacls_func(L, "createWithOffset", _olua_fun_cocos2d_Follow_createWithOffset); + oluacls_func(L, "initWithTarget", _olua_fun_cocos2d_Follow_initWithTarget); + oluacls_func(L, "initWithTargetAndOffset", _olua_fun_cocos2d_Follow_initWithTargetAndOffset); + oluacls_func(L, "isBoundarySet", _olua_fun_cocos2d_Follow_isBoundarySet); + oluacls_func(L, "setBoundarySet", _olua_fun_cocos2d_Follow_setBoundarySet); + oluacls_prop(L, "boundarySet", _olua_fun_cocos2d_Follow_isBoundarySet, _olua_fun_cocos2d_Follow_setBoundarySet); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_Follow(lua_State *L) +{ + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.Follow")) { + luaL_error(L, "class not found: cocos2d::Follow"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_tweenfunc_backEaseIn(lua_State *L) +static int _olua_fun_cocos2d_tweenfunc_backEaseIn(lua_State *L) { olua_startinvoke(L); @@ -1041,7 +987,7 @@ static int _cocos2d_tweenfunc_backEaseIn(lua_State *L) return num_ret; } -static int _cocos2d_tweenfunc_backEaseInOut(lua_State *L) +static int _olua_fun_cocos2d_tweenfunc_backEaseInOut(lua_State *L) { olua_startinvoke(L); @@ -1058,7 +1004,7 @@ static int _cocos2d_tweenfunc_backEaseInOut(lua_State *L) return num_ret; } -static int _cocos2d_tweenfunc_backEaseOut(lua_State *L) +static int _olua_fun_cocos2d_tweenfunc_backEaseOut(lua_State *L) { olua_startinvoke(L); @@ -1075,7 +1021,7 @@ static int _cocos2d_tweenfunc_backEaseOut(lua_State *L) return num_ret; } -static int _cocos2d_tweenfunc_bezieratFunction(lua_State *L) +static int _olua_fun_cocos2d_tweenfunc_bezieratFunction(lua_State *L) { olua_startinvoke(L); @@ -1100,7 +1046,7 @@ static int _cocos2d_tweenfunc_bezieratFunction(lua_State *L) return num_ret; } -static int _cocos2d_tweenfunc_bounceEaseIn(lua_State *L) +static int _olua_fun_cocos2d_tweenfunc_bounceEaseIn(lua_State *L) { olua_startinvoke(L); @@ -1117,7 +1063,7 @@ static int _cocos2d_tweenfunc_bounceEaseIn(lua_State *L) return num_ret; } -static int _cocos2d_tweenfunc_bounceEaseInOut(lua_State *L) +static int _olua_fun_cocos2d_tweenfunc_bounceEaseInOut(lua_State *L) { olua_startinvoke(L); @@ -1134,7 +1080,7 @@ static int _cocos2d_tweenfunc_bounceEaseInOut(lua_State *L) return num_ret; } -static int _cocos2d_tweenfunc_bounceEaseOut(lua_State *L) +static int _olua_fun_cocos2d_tweenfunc_bounceEaseOut(lua_State *L) { olua_startinvoke(L); @@ -1151,7 +1097,7 @@ static int _cocos2d_tweenfunc_bounceEaseOut(lua_State *L) return num_ret; } -static int _cocos2d_tweenfunc_circEaseIn(lua_State *L) +static int _olua_fun_cocos2d_tweenfunc_circEaseIn(lua_State *L) { olua_startinvoke(L); @@ -1168,7 +1114,7 @@ static int _cocos2d_tweenfunc_circEaseIn(lua_State *L) return num_ret; } -static int _cocos2d_tweenfunc_circEaseInOut(lua_State *L) +static int _olua_fun_cocos2d_tweenfunc_circEaseInOut(lua_State *L) { olua_startinvoke(L); @@ -1185,7 +1131,7 @@ static int _cocos2d_tweenfunc_circEaseInOut(lua_State *L) return num_ret; } -static int _cocos2d_tweenfunc_circEaseOut(lua_State *L) +static int _olua_fun_cocos2d_tweenfunc_circEaseOut(lua_State *L) { olua_startinvoke(L); @@ -1202,7 +1148,7 @@ static int _cocos2d_tweenfunc_circEaseOut(lua_State *L) return num_ret; } -static int _cocos2d_tweenfunc_cubicEaseIn(lua_State *L) +static int _olua_fun_cocos2d_tweenfunc_cubicEaseIn(lua_State *L) { olua_startinvoke(L); @@ -1219,7 +1165,7 @@ static int _cocos2d_tweenfunc_cubicEaseIn(lua_State *L) return num_ret; } -static int _cocos2d_tweenfunc_cubicEaseInOut(lua_State *L) +static int _olua_fun_cocos2d_tweenfunc_cubicEaseInOut(lua_State *L) { olua_startinvoke(L); @@ -1236,7 +1182,7 @@ static int _cocos2d_tweenfunc_cubicEaseInOut(lua_State *L) return num_ret; } -static int _cocos2d_tweenfunc_cubicEaseOut(lua_State *L) +static int _olua_fun_cocos2d_tweenfunc_cubicEaseOut(lua_State *L) { olua_startinvoke(L); @@ -1253,7 +1199,7 @@ static int _cocos2d_tweenfunc_cubicEaseOut(lua_State *L) return num_ret; } -static int _cocos2d_tweenfunc_customEase(lua_State *L) +static int _olua_fun_cocos2d_tweenfunc_customEase(lua_State *L) { olua_startinvoke(L); @@ -1261,7 +1207,7 @@ static int _cocos2d_tweenfunc_customEase(lua_State *L) float *arg2 = nullptr; /** easingParam */ olua_check_number(L, 1, &arg1); - olua_check_pointer(L, 2, &arg2, "olua.float"); + olua_check_valueptr(L, 2, &arg2, "olua.float"); // static float customEase(float time, float *easingParam) float ret = cocos2d::tweenfunc::customEase(arg1, arg2); @@ -1272,7 +1218,7 @@ static int _cocos2d_tweenfunc_customEase(lua_State *L) return num_ret; } -static int _cocos2d_tweenfunc_easeIn(lua_State *L) +static int _olua_fun_cocos2d_tweenfunc_easeIn(lua_State *L) { olua_startinvoke(L); @@ -1291,7 +1237,7 @@ static int _cocos2d_tweenfunc_easeIn(lua_State *L) return num_ret; } -static int _cocos2d_tweenfunc_easeInOut(lua_State *L) +static int _olua_fun_cocos2d_tweenfunc_easeInOut(lua_State *L) { olua_startinvoke(L); @@ -1310,7 +1256,7 @@ static int _cocos2d_tweenfunc_easeInOut(lua_State *L) return num_ret; } -static int _cocos2d_tweenfunc_easeOut(lua_State *L) +static int _olua_fun_cocos2d_tweenfunc_easeOut(lua_State *L) { olua_startinvoke(L); @@ -1329,7 +1275,7 @@ static int _cocos2d_tweenfunc_easeOut(lua_State *L) return num_ret; } -static int _cocos2d_tweenfunc_elasticEaseIn(lua_State *L) +static int _olua_fun_cocos2d_tweenfunc_elasticEaseIn(lua_State *L) { olua_startinvoke(L); @@ -1348,7 +1294,7 @@ static int _cocos2d_tweenfunc_elasticEaseIn(lua_State *L) return num_ret; } -static int _cocos2d_tweenfunc_elasticEaseInOut(lua_State *L) +static int _olua_fun_cocos2d_tweenfunc_elasticEaseInOut(lua_State *L) { olua_startinvoke(L); @@ -1367,7 +1313,7 @@ static int _cocos2d_tweenfunc_elasticEaseInOut(lua_State *L) return num_ret; } -static int _cocos2d_tweenfunc_elasticEaseOut(lua_State *L) +static int _olua_fun_cocos2d_tweenfunc_elasticEaseOut(lua_State *L) { olua_startinvoke(L); @@ -1386,7 +1332,7 @@ static int _cocos2d_tweenfunc_elasticEaseOut(lua_State *L) return num_ret; } -static int _cocos2d_tweenfunc_expoEaseIn(lua_State *L) +static int _olua_fun_cocos2d_tweenfunc_expoEaseIn(lua_State *L) { olua_startinvoke(L); @@ -1403,7 +1349,7 @@ static int _cocos2d_tweenfunc_expoEaseIn(lua_State *L) return num_ret; } -static int _cocos2d_tweenfunc_expoEaseInOut(lua_State *L) +static int _olua_fun_cocos2d_tweenfunc_expoEaseInOut(lua_State *L) { olua_startinvoke(L); @@ -1420,7 +1366,7 @@ static int _cocos2d_tweenfunc_expoEaseInOut(lua_State *L) return num_ret; } -static int _cocos2d_tweenfunc_expoEaseOut(lua_State *L) +static int _olua_fun_cocos2d_tweenfunc_expoEaseOut(lua_State *L) { olua_startinvoke(L); @@ -1437,7 +1383,7 @@ static int _cocos2d_tweenfunc_expoEaseOut(lua_State *L) return num_ret; } -static int _cocos2d_tweenfunc_linear(lua_State *L) +static int _olua_fun_cocos2d_tweenfunc_linear(lua_State *L) { olua_startinvoke(L); @@ -1454,7 +1400,7 @@ static int _cocos2d_tweenfunc_linear(lua_State *L) return num_ret; } -static int _cocos2d_tweenfunc_quadEaseIn(lua_State *L) +static int _olua_fun_cocos2d_tweenfunc_quadEaseIn(lua_State *L) { olua_startinvoke(L); @@ -1471,7 +1417,7 @@ static int _cocos2d_tweenfunc_quadEaseIn(lua_State *L) return num_ret; } -static int _cocos2d_tweenfunc_quadEaseInOut(lua_State *L) +static int _olua_fun_cocos2d_tweenfunc_quadEaseInOut(lua_State *L) { olua_startinvoke(L); @@ -1488,7 +1434,7 @@ static int _cocos2d_tweenfunc_quadEaseInOut(lua_State *L) return num_ret; } -static int _cocos2d_tweenfunc_quadEaseOut(lua_State *L) +static int _olua_fun_cocos2d_tweenfunc_quadEaseOut(lua_State *L) { olua_startinvoke(L); @@ -1505,7 +1451,7 @@ static int _cocos2d_tweenfunc_quadEaseOut(lua_State *L) return num_ret; } -static int _cocos2d_tweenfunc_quadraticIn(lua_State *L) +static int _olua_fun_cocos2d_tweenfunc_quadraticIn(lua_State *L) { olua_startinvoke(L); @@ -1522,7 +1468,7 @@ static int _cocos2d_tweenfunc_quadraticIn(lua_State *L) return num_ret; } -static int _cocos2d_tweenfunc_quadraticInOut(lua_State *L) +static int _olua_fun_cocos2d_tweenfunc_quadraticInOut(lua_State *L) { olua_startinvoke(L); @@ -1539,7 +1485,7 @@ static int _cocos2d_tweenfunc_quadraticInOut(lua_State *L) return num_ret; } -static int _cocos2d_tweenfunc_quadraticOut(lua_State *L) +static int _olua_fun_cocos2d_tweenfunc_quadraticOut(lua_State *L) { olua_startinvoke(L); @@ -1556,7 +1502,7 @@ static int _cocos2d_tweenfunc_quadraticOut(lua_State *L) return num_ret; } -static int _cocos2d_tweenfunc_quartEaseIn(lua_State *L) +static int _olua_fun_cocos2d_tweenfunc_quartEaseIn(lua_State *L) { olua_startinvoke(L); @@ -1573,7 +1519,7 @@ static int _cocos2d_tweenfunc_quartEaseIn(lua_State *L) return num_ret; } -static int _cocos2d_tweenfunc_quartEaseInOut(lua_State *L) +static int _olua_fun_cocos2d_tweenfunc_quartEaseInOut(lua_State *L) { olua_startinvoke(L); @@ -1590,7 +1536,7 @@ static int _cocos2d_tweenfunc_quartEaseInOut(lua_State *L) return num_ret; } -static int _cocos2d_tweenfunc_quartEaseOut(lua_State *L) +static int _olua_fun_cocos2d_tweenfunc_quartEaseOut(lua_State *L) { olua_startinvoke(L); @@ -1607,7 +1553,7 @@ static int _cocos2d_tweenfunc_quartEaseOut(lua_State *L) return num_ret; } -static int _cocos2d_tweenfunc_quintEaseIn(lua_State *L) +static int _olua_fun_cocos2d_tweenfunc_quintEaseIn(lua_State *L) { olua_startinvoke(L); @@ -1624,7 +1570,7 @@ static int _cocos2d_tweenfunc_quintEaseIn(lua_State *L) return num_ret; } -static int _cocos2d_tweenfunc_quintEaseInOut(lua_State *L) +static int _olua_fun_cocos2d_tweenfunc_quintEaseInOut(lua_State *L) { olua_startinvoke(L); @@ -1641,7 +1587,7 @@ static int _cocos2d_tweenfunc_quintEaseInOut(lua_State *L) return num_ret; } -static int _cocos2d_tweenfunc_quintEaseOut(lua_State *L) +static int _olua_fun_cocos2d_tweenfunc_quintEaseOut(lua_State *L) { olua_startinvoke(L); @@ -1658,7 +1604,7 @@ static int _cocos2d_tweenfunc_quintEaseOut(lua_State *L) return num_ret; } -static int _cocos2d_tweenfunc_sineEaseIn(lua_State *L) +static int _olua_fun_cocos2d_tweenfunc_sineEaseIn(lua_State *L) { olua_startinvoke(L); @@ -1675,7 +1621,7 @@ static int _cocos2d_tweenfunc_sineEaseIn(lua_State *L) return num_ret; } -static int _cocos2d_tweenfunc_sineEaseInOut(lua_State *L) +static int _olua_fun_cocos2d_tweenfunc_sineEaseInOut(lua_State *L) { olua_startinvoke(L); @@ -1692,7 +1638,7 @@ static int _cocos2d_tweenfunc_sineEaseInOut(lua_State *L) return num_ret; } -static int _cocos2d_tweenfunc_sineEaseOut(lua_State *L) +static int _olua_fun_cocos2d_tweenfunc_sineEaseOut(lua_State *L) { olua_startinvoke(L); @@ -1709,7 +1655,7 @@ static int _cocos2d_tweenfunc_sineEaseOut(lua_State *L) return num_ret; } -static int _cocos2d_tweenfunc_tweenTo(lua_State *L) +static int _olua_fun_cocos2d_tweenfunc_tweenTo(lua_State *L) { olua_startinvoke(L); @@ -1719,7 +1665,7 @@ static int _cocos2d_tweenfunc_tweenTo(lua_State *L) olua_check_number(L, 1, &arg1); olua_check_enum(L, 2, &arg2); - olua_check_pointer(L, 3, &arg3, "olua.float"); + olua_check_valueptr(L, 3, &arg3, "olua.float"); // static float tweenTo(float time, cocos2d::tweenfunc::TweenType type, float *easingParam) float ret = cocos2d::tweenfunc::tweenTo(arg1, arg2, arg3); @@ -1730,73 +1676,65 @@ static int _cocos2d_tweenfunc_tweenTo(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_tweenfunc(lua_State *L) +static int _olua_cls_cc_tweenfunc(lua_State *L) { oluacls_class(L, "cc.tweenfunc", nullptr); - oluacls_func(L, "backEaseIn", _cocos2d_tweenfunc_backEaseIn); - oluacls_func(L, "backEaseInOut", _cocos2d_tweenfunc_backEaseInOut); - oluacls_func(L, "backEaseOut", _cocos2d_tweenfunc_backEaseOut); - oluacls_func(L, "bezieratFunction", _cocos2d_tweenfunc_bezieratFunction); - oluacls_func(L, "bounceEaseIn", _cocos2d_tweenfunc_bounceEaseIn); - oluacls_func(L, "bounceEaseInOut", _cocos2d_tweenfunc_bounceEaseInOut); - oluacls_func(L, "bounceEaseOut", _cocos2d_tweenfunc_bounceEaseOut); - oluacls_func(L, "circEaseIn", _cocos2d_tweenfunc_circEaseIn); - oluacls_func(L, "circEaseInOut", _cocos2d_tweenfunc_circEaseInOut); - oluacls_func(L, "circEaseOut", _cocos2d_tweenfunc_circEaseOut); - oluacls_func(L, "cubicEaseIn", _cocos2d_tweenfunc_cubicEaseIn); - oluacls_func(L, "cubicEaseInOut", _cocos2d_tweenfunc_cubicEaseInOut); - oluacls_func(L, "cubicEaseOut", _cocos2d_tweenfunc_cubicEaseOut); - oluacls_func(L, "customEase", _cocos2d_tweenfunc_customEase); - oluacls_func(L, "easeIn", _cocos2d_tweenfunc_easeIn); - oluacls_func(L, "easeInOut", _cocos2d_tweenfunc_easeInOut); - oluacls_func(L, "easeOut", _cocos2d_tweenfunc_easeOut); - oluacls_func(L, "elasticEaseIn", _cocos2d_tweenfunc_elasticEaseIn); - oluacls_func(L, "elasticEaseInOut", _cocos2d_tweenfunc_elasticEaseInOut); - oluacls_func(L, "elasticEaseOut", _cocos2d_tweenfunc_elasticEaseOut); - oluacls_func(L, "expoEaseIn", _cocos2d_tweenfunc_expoEaseIn); - oluacls_func(L, "expoEaseInOut", _cocos2d_tweenfunc_expoEaseInOut); - oluacls_func(L, "expoEaseOut", _cocos2d_tweenfunc_expoEaseOut); - oluacls_func(L, "linear", _cocos2d_tweenfunc_linear); - oluacls_func(L, "quadEaseIn", _cocos2d_tweenfunc_quadEaseIn); - oluacls_func(L, "quadEaseInOut", _cocos2d_tweenfunc_quadEaseInOut); - oluacls_func(L, "quadEaseOut", _cocos2d_tweenfunc_quadEaseOut); - oluacls_func(L, "quadraticIn", _cocos2d_tweenfunc_quadraticIn); - oluacls_func(L, "quadraticInOut", _cocos2d_tweenfunc_quadraticInOut); - oluacls_func(L, "quadraticOut", _cocos2d_tweenfunc_quadraticOut); - oluacls_func(L, "quartEaseIn", _cocos2d_tweenfunc_quartEaseIn); - oluacls_func(L, "quartEaseInOut", _cocos2d_tweenfunc_quartEaseInOut); - oluacls_func(L, "quartEaseOut", _cocos2d_tweenfunc_quartEaseOut); - oluacls_func(L, "quintEaseIn", _cocos2d_tweenfunc_quintEaseIn); - oluacls_func(L, "quintEaseInOut", _cocos2d_tweenfunc_quintEaseInOut); - oluacls_func(L, "quintEaseOut", _cocos2d_tweenfunc_quintEaseOut); - oluacls_func(L, "sineEaseIn", _cocos2d_tweenfunc_sineEaseIn); - oluacls_func(L, "sineEaseInOut", _cocos2d_tweenfunc_sineEaseInOut); - oluacls_func(L, "sineEaseOut", _cocos2d_tweenfunc_sineEaseOut); - oluacls_func(L, "tweenTo", _cocos2d_tweenfunc_tweenTo); - - return 1; -} -OLUA_END_DECLS - -static int _cocos2d_ActionInterval_clone(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::ActionInterval *self = nullptr; - - olua_to_object(L, 1, &self, "cc.ActionInterval"); - - // cocos2d::ActionInterval *clone() - cocos2d::ActionInterval *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.ActionInterval"); - - olua_endinvoke(L); - - return num_ret; + oluacls_func(L, "backEaseIn", _olua_fun_cocos2d_tweenfunc_backEaseIn); + oluacls_func(L, "backEaseInOut", _olua_fun_cocos2d_tweenfunc_backEaseInOut); + oluacls_func(L, "backEaseOut", _olua_fun_cocos2d_tweenfunc_backEaseOut); + oluacls_func(L, "bezieratFunction", _olua_fun_cocos2d_tweenfunc_bezieratFunction); + oluacls_func(L, "bounceEaseIn", _olua_fun_cocos2d_tweenfunc_bounceEaseIn); + oluacls_func(L, "bounceEaseInOut", _olua_fun_cocos2d_tweenfunc_bounceEaseInOut); + oluacls_func(L, "bounceEaseOut", _olua_fun_cocos2d_tweenfunc_bounceEaseOut); + oluacls_func(L, "circEaseIn", _olua_fun_cocos2d_tweenfunc_circEaseIn); + oluacls_func(L, "circEaseInOut", _olua_fun_cocos2d_tweenfunc_circEaseInOut); + oluacls_func(L, "circEaseOut", _olua_fun_cocos2d_tweenfunc_circEaseOut); + oluacls_func(L, "cubicEaseIn", _olua_fun_cocos2d_tweenfunc_cubicEaseIn); + oluacls_func(L, "cubicEaseInOut", _olua_fun_cocos2d_tweenfunc_cubicEaseInOut); + oluacls_func(L, "cubicEaseOut", _olua_fun_cocos2d_tweenfunc_cubicEaseOut); + oluacls_func(L, "customEase", _olua_fun_cocos2d_tweenfunc_customEase); + oluacls_func(L, "easeIn", _olua_fun_cocos2d_tweenfunc_easeIn); + oluacls_func(L, "easeInOut", _olua_fun_cocos2d_tweenfunc_easeInOut); + oluacls_func(L, "easeOut", _olua_fun_cocos2d_tweenfunc_easeOut); + oluacls_func(L, "elasticEaseIn", _olua_fun_cocos2d_tweenfunc_elasticEaseIn); + oluacls_func(L, "elasticEaseInOut", _olua_fun_cocos2d_tweenfunc_elasticEaseInOut); + oluacls_func(L, "elasticEaseOut", _olua_fun_cocos2d_tweenfunc_elasticEaseOut); + oluacls_func(L, "expoEaseIn", _olua_fun_cocos2d_tweenfunc_expoEaseIn); + oluacls_func(L, "expoEaseInOut", _olua_fun_cocos2d_tweenfunc_expoEaseInOut); + oluacls_func(L, "expoEaseOut", _olua_fun_cocos2d_tweenfunc_expoEaseOut); + oluacls_func(L, "linear", _olua_fun_cocos2d_tweenfunc_linear); + oluacls_func(L, "quadEaseIn", _olua_fun_cocos2d_tweenfunc_quadEaseIn); + oluacls_func(L, "quadEaseInOut", _olua_fun_cocos2d_tweenfunc_quadEaseInOut); + oluacls_func(L, "quadEaseOut", _olua_fun_cocos2d_tweenfunc_quadEaseOut); + oluacls_func(L, "quadraticIn", _olua_fun_cocos2d_tweenfunc_quadraticIn); + oluacls_func(L, "quadraticInOut", _olua_fun_cocos2d_tweenfunc_quadraticInOut); + oluacls_func(L, "quadraticOut", _olua_fun_cocos2d_tweenfunc_quadraticOut); + oluacls_func(L, "quartEaseIn", _olua_fun_cocos2d_tweenfunc_quartEaseIn); + oluacls_func(L, "quartEaseInOut", _olua_fun_cocos2d_tweenfunc_quartEaseInOut); + oluacls_func(L, "quartEaseOut", _olua_fun_cocos2d_tweenfunc_quartEaseOut); + oluacls_func(L, "quintEaseIn", _olua_fun_cocos2d_tweenfunc_quintEaseIn); + oluacls_func(L, "quintEaseInOut", _olua_fun_cocos2d_tweenfunc_quintEaseInOut); + oluacls_func(L, "quintEaseOut", _olua_fun_cocos2d_tweenfunc_quintEaseOut); + oluacls_func(L, "sineEaseIn", _olua_fun_cocos2d_tweenfunc_sineEaseIn); + oluacls_func(L, "sineEaseInOut", _olua_fun_cocos2d_tweenfunc_sineEaseInOut); + oluacls_func(L, "sineEaseOut", _olua_fun_cocos2d_tweenfunc_sineEaseOut); + oluacls_func(L, "tweenTo", _olua_fun_cocos2d_tweenfunc_tweenTo); + + return 1; +} + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_tweenfunc(lua_State *L) +{ + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.tweenfunc")) { + luaL_error(L, "class not found: cocos2d::tweenfunc"); + } + return 1; } +OLUA_END_DECLS -static int _cocos2d_ActionInterval_getAmplitudeRate(lua_State *L) +static int _olua_fun_cocos2d_ActionInterval_getAmplitudeRate(lua_State *L) { olua_startinvoke(L); @@ -1813,7 +1751,7 @@ static int _cocos2d_ActionInterval_getAmplitudeRate(lua_State *L) return num_ret; } -static int _cocos2d_ActionInterval_getElapsed(lua_State *L) +static int _olua_fun_cocos2d_ActionInterval_getElapsed(lua_State *L) { olua_startinvoke(L); @@ -1830,24 +1768,7 @@ static int _cocos2d_ActionInterval_getElapsed(lua_State *L) return num_ret; } -static int _cocos2d_ActionInterval_reverse(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::ActionInterval *self = nullptr; - - olua_to_object(L, 1, &self, "cc.ActionInterval"); - - // cocos2d::ActionInterval *reverse() - cocos2d::ActionInterval *ret = self->reverse(); - int num_ret = olua_push_object(L, ret, "cc.ActionInterval"); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_ActionInterval_setAmplitudeRate(lua_State *L) +static int _olua_fun_cocos2d_ActionInterval_setAmplitudeRate(lua_State *L) { olua_startinvoke(L); @@ -1865,40 +1786,30 @@ static int _cocos2d_ActionInterval_setAmplitudeRate(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ActionInterval(lua_State *L) +static int _olua_cls_cc_ActionInterval(lua_State *L) { oluacls_class(L, "cc.ActionInterval"); - oluacls_func(L, "clone", _cocos2d_ActionInterval_clone); - oluacls_func(L, "getAmplitudeRate", _cocos2d_ActionInterval_getAmplitudeRate); - oluacls_func(L, "getElapsed", _cocos2d_ActionInterval_getElapsed); - oluacls_func(L, "reverse", _cocos2d_ActionInterval_reverse); - oluacls_func(L, "setAmplitudeRate", _cocos2d_ActionInterval_setAmplitudeRate); - oluacls_prop(L, "amplitudeRate", _cocos2d_ActionInterval_getAmplitudeRate, _cocos2d_ActionInterval_setAmplitudeRate); - oluacls_prop(L, "elapsed", _cocos2d_ActionInterval_getElapsed, nullptr); + oluacls_func(L, "getAmplitudeRate", _olua_fun_cocos2d_ActionInterval_getAmplitudeRate); + oluacls_func(L, "getElapsed", _olua_fun_cocos2d_ActionInterval_getElapsed); + oluacls_func(L, "setAmplitudeRate", _olua_fun_cocos2d_ActionInterval_setAmplitudeRate); + oluacls_prop(L, "amplitudeRate", _olua_fun_cocos2d_ActionInterval_getAmplitudeRate, _olua_fun_cocos2d_ActionInterval_setAmplitudeRate); + oluacls_prop(L, "elapsed", _olua_fun_cocos2d_ActionInterval_getElapsed, nullptr); return 1; } -OLUA_END_DECLS -static int _cocos2d_ActionTween_clone(lua_State *L) +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_ActionInterval(lua_State *L) { - olua_startinvoke(L); - - cocos2d::ActionTween *self = nullptr; - - olua_to_object(L, 1, &self, "cc.ActionTween"); - - // cocos2d::ActionTween *clone() - cocos2d::ActionTween *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.ActionTween"); - - olua_endinvoke(L); - - return num_ret; + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.ActionInterval")) { + luaL_error(L, "class not found: cocos2d::ActionInterval"); + } + return 1; } +OLUA_END_DECLS -static int _cocos2d_ActionTween_create(lua_State *L) +static int _olua_fun_cocos2d_ActionTween_create(lua_State *L) { olua_startinvoke(L); @@ -1921,212 +1832,124 @@ static int _cocos2d_ActionTween_create(lua_State *L) return num_ret; } -static int _cocos2d_ActionTween_reverse(lua_State *L) +static int _olua_cls_cc_ActionTween(lua_State *L) { - olua_startinvoke(L); - - cocos2d::ActionTween *self = nullptr; - - olua_to_object(L, 1, &self, "cc.ActionTween"); - - // cocos2d::ActionTween *reverse() - cocos2d::ActionTween *ret = self->reverse(); - int num_ret = olua_push_object(L, ret, "cc.ActionTween"); - - olua_endinvoke(L); + oluacls_class(L, "cc.ActionTween"); + oluacls_func(L, "create", _olua_fun_cocos2d_ActionTween_create); - return num_ret; + return 1; } OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ActionTween(lua_State *L) +OLUA_LIB int luaopen_cc_ActionTween(lua_State *L) { - oluacls_class(L, "cc.ActionTween"); - oluacls_func(L, "clone", _cocos2d_ActionTween_clone); - oluacls_func(L, "create", _cocos2d_ActionTween_create); - oluacls_func(L, "reverse", _cocos2d_ActionTween_reverse); - + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.ActionTween")) { + luaL_error(L, "class not found: cocos2d::ActionTween"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_Sequence_clone(lua_State *L) +static int _olua_fun_cocos2d_Sequence_create$1(lua_State *L) { olua_startinvoke(L); - cocos2d::Sequence *self = nullptr; + cocos2d::FiniteTimeAction *arg1 = nullptr; /** action1 */ - olua_to_object(L, 1, &self, "cc.Sequence"); + olua_check_object(L, 1, &arg1, "cc.FiniteTimeAction"); - // cocos2d::Sequence *clone() - cocos2d::Sequence *ret = self->clone(); + // @variadic static cocos2d::Sequence *create(@addref(actions |) cocos2d::FiniteTimeAction *action1) + cocos2d::Sequence *ret = cocos2d::Sequence::create(arg1, nullptr); int num_ret = olua_push_object(L, ret, "cc.Sequence"); + // insert code after call + olua_addref(L, -1, "actions", 1, OLUA_REF_MULTI); + olua_endinvoke(L); return num_ret; } -static int _cocos2d_Sequence_create$1(lua_State *L) +static int _olua_fun_cocos2d_Sequence_create$2(lua_State *L) { olua_startinvoke(L); cocos2d::FiniteTimeAction *arg1 = nullptr; /** action1 */ cocos2d::FiniteTimeAction *arg2 = nullptr; /** action1_$1 */ - cocos2d::FiniteTimeAction *arg3 = nullptr; /** action1_$2 */ - cocos2d::FiniteTimeAction *arg4 = nullptr; /** action1_$3 */ - cocos2d::FiniteTimeAction *arg5 = nullptr; /** action1_$4 */ - cocos2d::FiniteTimeAction *arg6 = nullptr; /** action1_$5 */ - cocos2d::FiniteTimeAction *arg7 = nullptr; /** action1_$6 */ - cocos2d::FiniteTimeAction *arg8 = nullptr; /** action1_$7 */ - cocos2d::FiniteTimeAction *arg9 = nullptr; /** action1_$8 */ - cocos2d::FiniteTimeAction *arg10 = nullptr; /** action1_$9 */ - cocos2d::FiniteTimeAction *arg11 = nullptr; /** action1_$10 */ - cocos2d::FiniteTimeAction *arg12 = nullptr; /** action1_$11 */ - cocos2d::FiniteTimeAction *arg13 = nullptr; /** action1_$12 */ - cocos2d::FiniteTimeAction *arg14 = nullptr; /** action1_$13 */ - cocos2d::FiniteTimeAction *arg15 = nullptr; /** action1_$14 */ - cocos2d::FiniteTimeAction *arg16 = nullptr; /** action1_$15 */ - cocos2d::FiniteTimeAction *arg17 = nullptr; /** action1_$16 */ olua_check_object(L, 1, &arg1, "cc.FiniteTimeAction"); olua_check_object(L, 2, &arg2, "cc.FiniteTimeAction"); - olua_check_object(L, 3, &arg3, "cc.FiniteTimeAction"); - olua_check_object(L, 4, &arg4, "cc.FiniteTimeAction"); - olua_check_object(L, 5, &arg5, "cc.FiniteTimeAction"); - olua_check_object(L, 6, &arg6, "cc.FiniteTimeAction"); - olua_check_object(L, 7, &arg7, "cc.FiniteTimeAction"); - olua_check_object(L, 8, &arg8, "cc.FiniteTimeAction"); - olua_check_object(L, 9, &arg9, "cc.FiniteTimeAction"); - olua_check_object(L, 10, &arg10, "cc.FiniteTimeAction"); - olua_check_object(L, 11, &arg11, "cc.FiniteTimeAction"); - olua_check_object(L, 12, &arg12, "cc.FiniteTimeAction"); - olua_check_object(L, 13, &arg13, "cc.FiniteTimeAction"); - olua_check_object(L, 14, &arg14, "cc.FiniteTimeAction"); - olua_check_object(L, 15, &arg15, "cc.FiniteTimeAction"); - olua_check_object(L, 16, &arg16, "cc.FiniteTimeAction"); - olua_check_object(L, 17, &arg17, "cc.FiniteTimeAction"); - // @variadic static cocos2d::Sequence *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$4, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$5, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$6, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$7, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$8, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$9, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$10, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$11, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$12, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$13, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$14, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$15, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$16) - cocos2d::Sequence *ret = cocos2d::Sequence::create(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17, nullptr); + // @variadic static cocos2d::Sequence *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$1) + cocos2d::Sequence *ret = cocos2d::Sequence::create(arg1, arg2, nullptr); int num_ret = olua_push_object(L, ret, "cc.Sequence"); // insert code after call olua_addref(L, -1, "actions", 1, OLUA_REF_MULTI); olua_addref(L, -1, "actions", 2, OLUA_REF_MULTI); - olua_addref(L, -1, "actions", 3, OLUA_REF_MULTI); - olua_addref(L, -1, "actions", 4, OLUA_REF_MULTI); - olua_addref(L, -1, "actions", 5, OLUA_REF_MULTI); - olua_addref(L, -1, "actions", 6, OLUA_REF_MULTI); - olua_addref(L, -1, "actions", 7, OLUA_REF_MULTI); - olua_addref(L, -1, "actions", 8, OLUA_REF_MULTI); - olua_addref(L, -1, "actions", 9, OLUA_REF_MULTI); - olua_addref(L, -1, "actions", 10, OLUA_REF_MULTI); - olua_addref(L, -1, "actions", 11, OLUA_REF_MULTI); - olua_addref(L, -1, "actions", 12, OLUA_REF_MULTI); - olua_addref(L, -1, "actions", 13, OLUA_REF_MULTI); - olua_addref(L, -1, "actions", 14, OLUA_REF_MULTI); - olua_addref(L, -1, "actions", 15, OLUA_REF_MULTI); - olua_addref(L, -1, "actions", 16, OLUA_REF_MULTI); - olua_addref(L, -1, "actions", 17, OLUA_REF_MULTI); olua_endinvoke(L); return num_ret; } -static int _cocos2d_Sequence_create$2(lua_State *L) +static int _olua_fun_cocos2d_Sequence_create$3(lua_State *L) { olua_startinvoke(L); - cocos2d::Vector arg1; /** arrayOfActions */ + cocos2d::FiniteTimeAction *arg1 = nullptr; /** action1 */ + cocos2d::FiniteTimeAction *arg2 = nullptr; /** action1_$1 */ + cocos2d::FiniteTimeAction *arg3 = nullptr; /** action1_$2 */ - olua_check_array(L, 1, arg1, [L](cocos2d::FiniteTimeAction **arg1) { - olua_check_object(L, -1, arg1, "cc.FiniteTimeAction"); - }); + olua_check_object(L, 1, &arg1, "cc.FiniteTimeAction"); + olua_check_object(L, 2, &arg2, "cc.FiniteTimeAction"); + olua_check_object(L, 3, &arg3, "cc.FiniteTimeAction"); - // static cocos2d::Sequence *create(@addref(actions |) const cocos2d::Vector &arrayOfActions) - cocos2d::Sequence *ret = cocos2d::Sequence::create(arg1); + // @variadic static cocos2d::Sequence *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$2) + cocos2d::Sequence *ret = cocos2d::Sequence::create(arg1, arg2, arg3, nullptr); int num_ret = olua_push_object(L, ret, "cc.Sequence"); // insert code after call - olua_addref(L, -1, "actions", 1, OLUA_REF_MULTI | OLUA_REF_TABLE); + olua_addref(L, -1, "actions", 1, OLUA_REF_MULTI); + olua_addref(L, -1, "actions", 2, OLUA_REF_MULTI); + olua_addref(L, -1, "actions", 3, OLUA_REF_MULTI); olua_endinvoke(L); return num_ret; } -static int _cocos2d_Sequence_create$3(lua_State *L) +static int _olua_fun_cocos2d_Sequence_create$4(lua_State *L) { olua_startinvoke(L); cocos2d::FiniteTimeAction *arg1 = nullptr; /** action1 */ - - olua_check_object(L, 1, &arg1, "cc.FiniteTimeAction"); - - // @variadic static cocos2d::Sequence *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$4, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$5, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$6, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$7, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$8, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$9, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$10, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$11, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$12, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$13, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$14, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$15, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$16) - cocos2d::Sequence *ret = cocos2d::Sequence::create(arg1, nullptr); - int num_ret = olua_push_object(L, ret, "cc.Sequence"); - - // insert code after call - olua_addref(L, -1, "actions", 1, OLUA_REF_MULTI); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_Sequence_create$4(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::FiniteTimeAction *arg1 = nullptr; /** action1 */ - cocos2d::FiniteTimeAction *arg2 = nullptr; /** action1_$1 */ - - olua_check_object(L, 1, &arg1, "cc.FiniteTimeAction"); - olua_check_object(L, 2, &arg2, "cc.FiniteTimeAction"); - - // @variadic static cocos2d::Sequence *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$4, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$5, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$6, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$7, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$8, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$9, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$10, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$11, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$12, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$13, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$14, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$15, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$16) - cocos2d::Sequence *ret = cocos2d::Sequence::create(arg1, arg2, nullptr); - int num_ret = olua_push_object(L, ret, "cc.Sequence"); - - // insert code after call - olua_addref(L, -1, "actions", 1, OLUA_REF_MULTI); - olua_addref(L, -1, "actions", 2, OLUA_REF_MULTI); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_Sequence_create$5(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::FiniteTimeAction *arg1 = nullptr; /** action1 */ - cocos2d::FiniteTimeAction *arg2 = nullptr; /** action1_$1 */ - cocos2d::FiniteTimeAction *arg3 = nullptr; /** action1_$2 */ + cocos2d::FiniteTimeAction *arg2 = nullptr; /** action1_$1 */ + cocos2d::FiniteTimeAction *arg3 = nullptr; /** action1_$2 */ + cocos2d::FiniteTimeAction *arg4 = nullptr; /** action1_$3 */ olua_check_object(L, 1, &arg1, "cc.FiniteTimeAction"); olua_check_object(L, 2, &arg2, "cc.FiniteTimeAction"); olua_check_object(L, 3, &arg3, "cc.FiniteTimeAction"); + olua_check_object(L, 4, &arg4, "cc.FiniteTimeAction"); - // @variadic static cocos2d::Sequence *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$4, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$5, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$6, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$7, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$8, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$9, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$10, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$11, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$12, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$13, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$14, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$15, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$16) - cocos2d::Sequence *ret = cocos2d::Sequence::create(arg1, arg2, arg3, nullptr); + // @variadic static cocos2d::Sequence *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @addref(actions |) cocos2d::FiniteTimeAction *action1_$3) + cocos2d::Sequence *ret = cocos2d::Sequence::create(arg1, arg2, arg3, arg4, nullptr); int num_ret = olua_push_object(L, ret, "cc.Sequence"); // insert code after call olua_addref(L, -1, "actions", 1, OLUA_REF_MULTI); olua_addref(L, -1, "actions", 2, OLUA_REF_MULTI); olua_addref(L, -1, "actions", 3, OLUA_REF_MULTI); + olua_addref(L, -1, "actions", 4, OLUA_REF_MULTI); olua_endinvoke(L); return num_ret; } -static int _cocos2d_Sequence_create$6(lua_State *L) +static int _olua_fun_cocos2d_Sequence_create$5(lua_State *L) { olua_startinvoke(L); @@ -2134,14 +1957,16 @@ static int _cocos2d_Sequence_create$6(lua_State *L) cocos2d::FiniteTimeAction *arg2 = nullptr; /** action1_$1 */ cocos2d::FiniteTimeAction *arg3 = nullptr; /** action1_$2 */ cocos2d::FiniteTimeAction *arg4 = nullptr; /** action1_$3 */ + cocos2d::FiniteTimeAction *arg5 = nullptr; /** action1_$4 */ olua_check_object(L, 1, &arg1, "cc.FiniteTimeAction"); olua_check_object(L, 2, &arg2, "cc.FiniteTimeAction"); olua_check_object(L, 3, &arg3, "cc.FiniteTimeAction"); olua_check_object(L, 4, &arg4, "cc.FiniteTimeAction"); + olua_check_object(L, 5, &arg5, "cc.FiniteTimeAction"); - // @variadic static cocos2d::Sequence *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$4, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$5, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$6, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$7, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$8, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$9, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$10, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$11, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$12, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$13, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$14, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$15, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$16) - cocos2d::Sequence *ret = cocos2d::Sequence::create(arg1, arg2, arg3, arg4, nullptr); + // @variadic static cocos2d::Sequence *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @addref(actions |) cocos2d::FiniteTimeAction *action1_$4) + cocos2d::Sequence *ret = cocos2d::Sequence::create(arg1, arg2, arg3, arg4, arg5, nullptr); int num_ret = olua_push_object(L, ret, "cc.Sequence"); // insert code after call @@ -2149,13 +1974,14 @@ static int _cocos2d_Sequence_create$6(lua_State *L) olua_addref(L, -1, "actions", 2, OLUA_REF_MULTI); olua_addref(L, -1, "actions", 3, OLUA_REF_MULTI); olua_addref(L, -1, "actions", 4, OLUA_REF_MULTI); + olua_addref(L, -1, "actions", 5, OLUA_REF_MULTI); olua_endinvoke(L); return num_ret; } -static int _cocos2d_Sequence_create$7(lua_State *L) +static int _olua_fun_cocos2d_Sequence_create$6(lua_State *L) { olua_startinvoke(L); @@ -2164,15 +1990,17 @@ static int _cocos2d_Sequence_create$7(lua_State *L) cocos2d::FiniteTimeAction *arg3 = nullptr; /** action1_$2 */ cocos2d::FiniteTimeAction *arg4 = nullptr; /** action1_$3 */ cocos2d::FiniteTimeAction *arg5 = nullptr; /** action1_$4 */ + cocos2d::FiniteTimeAction *arg6 = nullptr; /** action1_$5 */ olua_check_object(L, 1, &arg1, "cc.FiniteTimeAction"); olua_check_object(L, 2, &arg2, "cc.FiniteTimeAction"); olua_check_object(L, 3, &arg3, "cc.FiniteTimeAction"); olua_check_object(L, 4, &arg4, "cc.FiniteTimeAction"); olua_check_object(L, 5, &arg5, "cc.FiniteTimeAction"); + olua_check_object(L, 6, &arg6, "cc.FiniteTimeAction"); - // @variadic static cocos2d::Sequence *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$4, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$5, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$6, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$7, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$8, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$9, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$10, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$11, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$12, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$13, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$14, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$15, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$16) - cocos2d::Sequence *ret = cocos2d::Sequence::create(arg1, arg2, arg3, arg4, arg5, nullptr); + // @variadic static cocos2d::Sequence *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @addref(actions |) cocos2d::FiniteTimeAction *action1_$4, @addref(actions |) cocos2d::FiniteTimeAction *action1_$5) + cocos2d::Sequence *ret = cocos2d::Sequence::create(arg1, arg2, arg3, arg4, arg5, arg6, nullptr); int num_ret = olua_push_object(L, ret, "cc.Sequence"); // insert code after call @@ -2181,13 +2009,14 @@ static int _cocos2d_Sequence_create$7(lua_State *L) olua_addref(L, -1, "actions", 3, OLUA_REF_MULTI); olua_addref(L, -1, "actions", 4, OLUA_REF_MULTI); olua_addref(L, -1, "actions", 5, OLUA_REF_MULTI); + olua_addref(L, -1, "actions", 6, OLUA_REF_MULTI); olua_endinvoke(L); return num_ret; } -static int _cocos2d_Sequence_create$8(lua_State *L) +static int _olua_fun_cocos2d_Sequence_create$7(lua_State *L) { olua_startinvoke(L); @@ -2197,6 +2026,7 @@ static int _cocos2d_Sequence_create$8(lua_State *L) cocos2d::FiniteTimeAction *arg4 = nullptr; /** action1_$3 */ cocos2d::FiniteTimeAction *arg5 = nullptr; /** action1_$4 */ cocos2d::FiniteTimeAction *arg6 = nullptr; /** action1_$5 */ + cocos2d::FiniteTimeAction *arg7 = nullptr; /** action1_$6 */ olua_check_object(L, 1, &arg1, "cc.FiniteTimeAction"); olua_check_object(L, 2, &arg2, "cc.FiniteTimeAction"); @@ -2204,9 +2034,10 @@ static int _cocos2d_Sequence_create$8(lua_State *L) olua_check_object(L, 4, &arg4, "cc.FiniteTimeAction"); olua_check_object(L, 5, &arg5, "cc.FiniteTimeAction"); olua_check_object(L, 6, &arg6, "cc.FiniteTimeAction"); + olua_check_object(L, 7, &arg7, "cc.FiniteTimeAction"); - // @variadic static cocos2d::Sequence *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$4, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$5, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$6, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$7, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$8, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$9, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$10, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$11, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$12, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$13, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$14, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$15, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$16) - cocos2d::Sequence *ret = cocos2d::Sequence::create(arg1, arg2, arg3, arg4, arg5, arg6, nullptr); + // @variadic static cocos2d::Sequence *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @addref(actions |) cocos2d::FiniteTimeAction *action1_$4, @addref(actions |) cocos2d::FiniteTimeAction *action1_$5, @addref(actions |) cocos2d::FiniteTimeAction *action1_$6) + cocos2d::Sequence *ret = cocos2d::Sequence::create(arg1, arg2, arg3, arg4, arg5, arg6, arg7, nullptr); int num_ret = olua_push_object(L, ret, "cc.Sequence"); // insert code after call @@ -2216,13 +2047,14 @@ static int _cocos2d_Sequence_create$8(lua_State *L) olua_addref(L, -1, "actions", 4, OLUA_REF_MULTI); olua_addref(L, -1, "actions", 5, OLUA_REF_MULTI); olua_addref(L, -1, "actions", 6, OLUA_REF_MULTI); + olua_addref(L, -1, "actions", 7, OLUA_REF_MULTI); olua_endinvoke(L); return num_ret; } -static int _cocos2d_Sequence_create$9(lua_State *L) +static int _olua_fun_cocos2d_Sequence_create$8(lua_State *L) { olua_startinvoke(L); @@ -2233,6 +2065,7 @@ static int _cocos2d_Sequence_create$9(lua_State *L) cocos2d::FiniteTimeAction *arg5 = nullptr; /** action1_$4 */ cocos2d::FiniteTimeAction *arg6 = nullptr; /** action1_$5 */ cocos2d::FiniteTimeAction *arg7 = nullptr; /** action1_$6 */ + cocos2d::FiniteTimeAction *arg8 = nullptr; /** action1_$7 */ olua_check_object(L, 1, &arg1, "cc.FiniteTimeAction"); olua_check_object(L, 2, &arg2, "cc.FiniteTimeAction"); @@ -2241,9 +2074,10 @@ static int _cocos2d_Sequence_create$9(lua_State *L) olua_check_object(L, 5, &arg5, "cc.FiniteTimeAction"); olua_check_object(L, 6, &arg6, "cc.FiniteTimeAction"); olua_check_object(L, 7, &arg7, "cc.FiniteTimeAction"); + olua_check_object(L, 8, &arg8, "cc.FiniteTimeAction"); - // @variadic static cocos2d::Sequence *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$4, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$5, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$6, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$7, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$8, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$9, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$10, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$11, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$12, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$13, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$14, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$15, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$16) - cocos2d::Sequence *ret = cocos2d::Sequence::create(arg1, arg2, arg3, arg4, arg5, arg6, arg7, nullptr); + // @variadic static cocos2d::Sequence *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @addref(actions |) cocos2d::FiniteTimeAction *action1_$4, @addref(actions |) cocos2d::FiniteTimeAction *action1_$5, @addref(actions |) cocos2d::FiniteTimeAction *action1_$6, @addref(actions |) cocos2d::FiniteTimeAction *action1_$7) + cocos2d::Sequence *ret = cocos2d::Sequence::create(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, nullptr); int num_ret = olua_push_object(L, ret, "cc.Sequence"); // insert code after call @@ -2254,13 +2088,14 @@ static int _cocos2d_Sequence_create$9(lua_State *L) olua_addref(L, -1, "actions", 5, OLUA_REF_MULTI); olua_addref(L, -1, "actions", 6, OLUA_REF_MULTI); olua_addref(L, -1, "actions", 7, OLUA_REF_MULTI); + olua_addref(L, -1, "actions", 8, OLUA_REF_MULTI); olua_endinvoke(L); return num_ret; } -static int _cocos2d_Sequence_create$10(lua_State *L) +static int _olua_fun_cocos2d_Sequence_create$9(lua_State *L) { olua_startinvoke(L); @@ -2272,6 +2107,7 @@ static int _cocos2d_Sequence_create$10(lua_State *L) cocos2d::FiniteTimeAction *arg6 = nullptr; /** action1_$5 */ cocos2d::FiniteTimeAction *arg7 = nullptr; /** action1_$6 */ cocos2d::FiniteTimeAction *arg8 = nullptr; /** action1_$7 */ + cocos2d::FiniteTimeAction *arg9 = nullptr; /** action1_$8 */ olua_check_object(L, 1, &arg1, "cc.FiniteTimeAction"); olua_check_object(L, 2, &arg2, "cc.FiniteTimeAction"); @@ -2281,9 +2117,10 @@ static int _cocos2d_Sequence_create$10(lua_State *L) olua_check_object(L, 6, &arg6, "cc.FiniteTimeAction"); olua_check_object(L, 7, &arg7, "cc.FiniteTimeAction"); olua_check_object(L, 8, &arg8, "cc.FiniteTimeAction"); + olua_check_object(L, 9, &arg9, "cc.FiniteTimeAction"); - // @variadic static cocos2d::Sequence *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$4, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$5, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$6, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$7, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$8, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$9, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$10, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$11, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$12, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$13, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$14, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$15, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$16) - cocos2d::Sequence *ret = cocos2d::Sequence::create(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, nullptr); + // @variadic static cocos2d::Sequence *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @addref(actions |) cocos2d::FiniteTimeAction *action1_$4, @addref(actions |) cocos2d::FiniteTimeAction *action1_$5, @addref(actions |) cocos2d::FiniteTimeAction *action1_$6, @addref(actions |) cocos2d::FiniteTimeAction *action1_$7, @addref(actions |) cocos2d::FiniteTimeAction *action1_$8) + cocos2d::Sequence *ret = cocos2d::Sequence::create(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, nullptr); int num_ret = olua_push_object(L, ret, "cc.Sequence"); // insert code after call @@ -2295,13 +2132,14 @@ static int _cocos2d_Sequence_create$10(lua_State *L) olua_addref(L, -1, "actions", 6, OLUA_REF_MULTI); olua_addref(L, -1, "actions", 7, OLUA_REF_MULTI); olua_addref(L, -1, "actions", 8, OLUA_REF_MULTI); + olua_addref(L, -1, "actions", 9, OLUA_REF_MULTI); olua_endinvoke(L); return num_ret; } -static int _cocos2d_Sequence_create$11(lua_State *L) +static int _olua_fun_cocos2d_Sequence_create$10(lua_State *L) { olua_startinvoke(L); @@ -2314,6 +2152,7 @@ static int _cocos2d_Sequence_create$11(lua_State *L) cocos2d::FiniteTimeAction *arg7 = nullptr; /** action1_$6 */ cocos2d::FiniteTimeAction *arg8 = nullptr; /** action1_$7 */ cocos2d::FiniteTimeAction *arg9 = nullptr; /** action1_$8 */ + cocos2d::FiniteTimeAction *arg10 = nullptr; /** action1_$9 */ olua_check_object(L, 1, &arg1, "cc.FiniteTimeAction"); olua_check_object(L, 2, &arg2, "cc.FiniteTimeAction"); @@ -2324,9 +2163,10 @@ static int _cocos2d_Sequence_create$11(lua_State *L) olua_check_object(L, 7, &arg7, "cc.FiniteTimeAction"); olua_check_object(L, 8, &arg8, "cc.FiniteTimeAction"); olua_check_object(L, 9, &arg9, "cc.FiniteTimeAction"); + olua_check_object(L, 10, &arg10, "cc.FiniteTimeAction"); - // @variadic static cocos2d::Sequence *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$4, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$5, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$6, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$7, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$8, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$9, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$10, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$11, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$12, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$13, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$14, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$15, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$16) - cocos2d::Sequence *ret = cocos2d::Sequence::create(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, nullptr); + // @variadic static cocos2d::Sequence *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @addref(actions |) cocos2d::FiniteTimeAction *action1_$4, @addref(actions |) cocos2d::FiniteTimeAction *action1_$5, @addref(actions |) cocos2d::FiniteTimeAction *action1_$6, @addref(actions |) cocos2d::FiniteTimeAction *action1_$7, @addref(actions |) cocos2d::FiniteTimeAction *action1_$8, @addref(actions |) cocos2d::FiniteTimeAction *action1_$9) + cocos2d::Sequence *ret = cocos2d::Sequence::create(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, nullptr); int num_ret = olua_push_object(L, ret, "cc.Sequence"); // insert code after call @@ -2339,13 +2179,14 @@ static int _cocos2d_Sequence_create$11(lua_State *L) olua_addref(L, -1, "actions", 7, OLUA_REF_MULTI); olua_addref(L, -1, "actions", 8, OLUA_REF_MULTI); olua_addref(L, -1, "actions", 9, OLUA_REF_MULTI); + olua_addref(L, -1, "actions", 10, OLUA_REF_MULTI); olua_endinvoke(L); return num_ret; } -static int _cocos2d_Sequence_create$12(lua_State *L) +static int _olua_fun_cocos2d_Sequence_create$11(lua_State *L) { olua_startinvoke(L); @@ -2359,6 +2200,7 @@ static int _cocos2d_Sequence_create$12(lua_State *L) cocos2d::FiniteTimeAction *arg8 = nullptr; /** action1_$7 */ cocos2d::FiniteTimeAction *arg9 = nullptr; /** action1_$8 */ cocos2d::FiniteTimeAction *arg10 = nullptr; /** action1_$9 */ + cocos2d::FiniteTimeAction *arg11 = nullptr; /** action1_$10 */ olua_check_object(L, 1, &arg1, "cc.FiniteTimeAction"); olua_check_object(L, 2, &arg2, "cc.FiniteTimeAction"); @@ -2370,9 +2212,10 @@ static int _cocos2d_Sequence_create$12(lua_State *L) olua_check_object(L, 8, &arg8, "cc.FiniteTimeAction"); olua_check_object(L, 9, &arg9, "cc.FiniteTimeAction"); olua_check_object(L, 10, &arg10, "cc.FiniteTimeAction"); + olua_check_object(L, 11, &arg11, "cc.FiniteTimeAction"); - // @variadic static cocos2d::Sequence *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$4, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$5, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$6, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$7, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$8, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$9, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$10, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$11, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$12, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$13, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$14, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$15, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$16) - cocos2d::Sequence *ret = cocos2d::Sequence::create(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, nullptr); + // @variadic static cocos2d::Sequence *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @addref(actions |) cocos2d::FiniteTimeAction *action1_$4, @addref(actions |) cocos2d::FiniteTimeAction *action1_$5, @addref(actions |) cocos2d::FiniteTimeAction *action1_$6, @addref(actions |) cocos2d::FiniteTimeAction *action1_$7, @addref(actions |) cocos2d::FiniteTimeAction *action1_$8, @addref(actions |) cocos2d::FiniteTimeAction *action1_$9, @addref(actions |) cocos2d::FiniteTimeAction *action1_$10) + cocos2d::Sequence *ret = cocos2d::Sequence::create(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, nullptr); int num_ret = olua_push_object(L, ret, "cc.Sequence"); // insert code after call @@ -2386,13 +2229,14 @@ static int _cocos2d_Sequence_create$12(lua_State *L) olua_addref(L, -1, "actions", 8, OLUA_REF_MULTI); olua_addref(L, -1, "actions", 9, OLUA_REF_MULTI); olua_addref(L, -1, "actions", 10, OLUA_REF_MULTI); + olua_addref(L, -1, "actions", 11, OLUA_REF_MULTI); olua_endinvoke(L); return num_ret; } -static int _cocos2d_Sequence_create$13(lua_State *L) +static int _olua_fun_cocos2d_Sequence_create$12(lua_State *L) { olua_startinvoke(L); @@ -2407,6 +2251,7 @@ static int _cocos2d_Sequence_create$13(lua_State *L) cocos2d::FiniteTimeAction *arg9 = nullptr; /** action1_$8 */ cocos2d::FiniteTimeAction *arg10 = nullptr; /** action1_$9 */ cocos2d::FiniteTimeAction *arg11 = nullptr; /** action1_$10 */ + cocos2d::FiniteTimeAction *arg12 = nullptr; /** action1_$11 */ olua_check_object(L, 1, &arg1, "cc.FiniteTimeAction"); olua_check_object(L, 2, &arg2, "cc.FiniteTimeAction"); @@ -2419,9 +2264,10 @@ static int _cocos2d_Sequence_create$13(lua_State *L) olua_check_object(L, 9, &arg9, "cc.FiniteTimeAction"); olua_check_object(L, 10, &arg10, "cc.FiniteTimeAction"); olua_check_object(L, 11, &arg11, "cc.FiniteTimeAction"); + olua_check_object(L, 12, &arg12, "cc.FiniteTimeAction"); - // @variadic static cocos2d::Sequence *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$4, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$5, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$6, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$7, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$8, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$9, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$10, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$11, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$12, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$13, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$14, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$15, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$16) - cocos2d::Sequence *ret = cocos2d::Sequence::create(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, nullptr); + // @variadic static cocos2d::Sequence *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @addref(actions |) cocos2d::FiniteTimeAction *action1_$4, @addref(actions |) cocos2d::FiniteTimeAction *action1_$5, @addref(actions |) cocos2d::FiniteTimeAction *action1_$6, @addref(actions |) cocos2d::FiniteTimeAction *action1_$7, @addref(actions |) cocos2d::FiniteTimeAction *action1_$8, @addref(actions |) cocos2d::FiniteTimeAction *action1_$9, @addref(actions |) cocos2d::FiniteTimeAction *action1_$10, @addref(actions |) cocos2d::FiniteTimeAction *action1_$11) + cocos2d::Sequence *ret = cocos2d::Sequence::create(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, nullptr); int num_ret = olua_push_object(L, ret, "cc.Sequence"); // insert code after call @@ -2436,13 +2282,14 @@ static int _cocos2d_Sequence_create$13(lua_State *L) olua_addref(L, -1, "actions", 9, OLUA_REF_MULTI); olua_addref(L, -1, "actions", 10, OLUA_REF_MULTI); olua_addref(L, -1, "actions", 11, OLUA_REF_MULTI); + olua_addref(L, -1, "actions", 12, OLUA_REF_MULTI); olua_endinvoke(L); return num_ret; } -static int _cocos2d_Sequence_create$14(lua_State *L) +static int _olua_fun_cocos2d_Sequence_create$13(lua_State *L) { olua_startinvoke(L); @@ -2458,6 +2305,7 @@ static int _cocos2d_Sequence_create$14(lua_State *L) cocos2d::FiniteTimeAction *arg10 = nullptr; /** action1_$9 */ cocos2d::FiniteTimeAction *arg11 = nullptr; /** action1_$10 */ cocos2d::FiniteTimeAction *arg12 = nullptr; /** action1_$11 */ + cocos2d::FiniteTimeAction *arg13 = nullptr; /** action1_$12 */ olua_check_object(L, 1, &arg1, "cc.FiniteTimeAction"); olua_check_object(L, 2, &arg2, "cc.FiniteTimeAction"); @@ -2471,9 +2319,10 @@ static int _cocos2d_Sequence_create$14(lua_State *L) olua_check_object(L, 10, &arg10, "cc.FiniteTimeAction"); olua_check_object(L, 11, &arg11, "cc.FiniteTimeAction"); olua_check_object(L, 12, &arg12, "cc.FiniteTimeAction"); + olua_check_object(L, 13, &arg13, "cc.FiniteTimeAction"); - // @variadic static cocos2d::Sequence *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$4, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$5, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$6, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$7, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$8, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$9, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$10, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$11, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$12, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$13, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$14, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$15, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$16) - cocos2d::Sequence *ret = cocos2d::Sequence::create(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, nullptr); + // @variadic static cocos2d::Sequence *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @addref(actions |) cocos2d::FiniteTimeAction *action1_$4, @addref(actions |) cocos2d::FiniteTimeAction *action1_$5, @addref(actions |) cocos2d::FiniteTimeAction *action1_$6, @addref(actions |) cocos2d::FiniteTimeAction *action1_$7, @addref(actions |) cocos2d::FiniteTimeAction *action1_$8, @addref(actions |) cocos2d::FiniteTimeAction *action1_$9, @addref(actions |) cocos2d::FiniteTimeAction *action1_$10, @addref(actions |) cocos2d::FiniteTimeAction *action1_$11, @addref(actions |) cocos2d::FiniteTimeAction *action1_$12) + cocos2d::Sequence *ret = cocos2d::Sequence::create(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, nullptr); int num_ret = olua_push_object(L, ret, "cc.Sequence"); // insert code after call @@ -2489,13 +2338,14 @@ static int _cocos2d_Sequence_create$14(lua_State *L) olua_addref(L, -1, "actions", 10, OLUA_REF_MULTI); olua_addref(L, -1, "actions", 11, OLUA_REF_MULTI); olua_addref(L, -1, "actions", 12, OLUA_REF_MULTI); + olua_addref(L, -1, "actions", 13, OLUA_REF_MULTI); olua_endinvoke(L); return num_ret; } -static int _cocos2d_Sequence_create$15(lua_State *L) +static int _olua_fun_cocos2d_Sequence_create$14(lua_State *L) { olua_startinvoke(L); @@ -2512,6 +2362,7 @@ static int _cocos2d_Sequence_create$15(lua_State *L) cocos2d::FiniteTimeAction *arg11 = nullptr; /** action1_$10 */ cocos2d::FiniteTimeAction *arg12 = nullptr; /** action1_$11 */ cocos2d::FiniteTimeAction *arg13 = nullptr; /** action1_$12 */ + cocos2d::FiniteTimeAction *arg14 = nullptr; /** action1_$13 */ olua_check_object(L, 1, &arg1, "cc.FiniteTimeAction"); olua_check_object(L, 2, &arg2, "cc.FiniteTimeAction"); @@ -2526,9 +2377,10 @@ static int _cocos2d_Sequence_create$15(lua_State *L) olua_check_object(L, 11, &arg11, "cc.FiniteTimeAction"); olua_check_object(L, 12, &arg12, "cc.FiniteTimeAction"); olua_check_object(L, 13, &arg13, "cc.FiniteTimeAction"); + olua_check_object(L, 14, &arg14, "cc.FiniteTimeAction"); - // @variadic static cocos2d::Sequence *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$4, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$5, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$6, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$7, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$8, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$9, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$10, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$11, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$12, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$13, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$14, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$15, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$16) - cocos2d::Sequence *ret = cocos2d::Sequence::create(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, nullptr); + // @variadic static cocos2d::Sequence *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @addref(actions |) cocos2d::FiniteTimeAction *action1_$4, @addref(actions |) cocos2d::FiniteTimeAction *action1_$5, @addref(actions |) cocos2d::FiniteTimeAction *action1_$6, @addref(actions |) cocos2d::FiniteTimeAction *action1_$7, @addref(actions |) cocos2d::FiniteTimeAction *action1_$8, @addref(actions |) cocos2d::FiniteTimeAction *action1_$9, @addref(actions |) cocos2d::FiniteTimeAction *action1_$10, @addref(actions |) cocos2d::FiniteTimeAction *action1_$11, @addref(actions |) cocos2d::FiniteTimeAction *action1_$12, @addref(actions |) cocos2d::FiniteTimeAction *action1_$13) + cocos2d::Sequence *ret = cocos2d::Sequence::create(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, nullptr); int num_ret = olua_push_object(L, ret, "cc.Sequence"); // insert code after call @@ -2545,13 +2397,14 @@ static int _cocos2d_Sequence_create$15(lua_State *L) olua_addref(L, -1, "actions", 11, OLUA_REF_MULTI); olua_addref(L, -1, "actions", 12, OLUA_REF_MULTI); olua_addref(L, -1, "actions", 13, OLUA_REF_MULTI); + olua_addref(L, -1, "actions", 14, OLUA_REF_MULTI); olua_endinvoke(L); return num_ret; } -static int _cocos2d_Sequence_create$16(lua_State *L) +static int _olua_fun_cocos2d_Sequence_create$15(lua_State *L) { olua_startinvoke(L); @@ -2569,6 +2422,7 @@ static int _cocos2d_Sequence_create$16(lua_State *L) cocos2d::FiniteTimeAction *arg12 = nullptr; /** action1_$11 */ cocos2d::FiniteTimeAction *arg13 = nullptr; /** action1_$12 */ cocos2d::FiniteTimeAction *arg14 = nullptr; /** action1_$13 */ + cocos2d::FiniteTimeAction *arg15 = nullptr; /** action1_$14 */ olua_check_object(L, 1, &arg1, "cc.FiniteTimeAction"); olua_check_object(L, 2, &arg2, "cc.FiniteTimeAction"); @@ -2584,9 +2438,10 @@ static int _cocos2d_Sequence_create$16(lua_State *L) olua_check_object(L, 12, &arg12, "cc.FiniteTimeAction"); olua_check_object(L, 13, &arg13, "cc.FiniteTimeAction"); olua_check_object(L, 14, &arg14, "cc.FiniteTimeAction"); + olua_check_object(L, 15, &arg15, "cc.FiniteTimeAction"); - // @variadic static cocos2d::Sequence *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$4, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$5, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$6, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$7, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$8, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$9, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$10, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$11, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$12, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$13, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$14, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$15, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$16) - cocos2d::Sequence *ret = cocos2d::Sequence::create(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, nullptr); + // @variadic static cocos2d::Sequence *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @addref(actions |) cocos2d::FiniteTimeAction *action1_$4, @addref(actions |) cocos2d::FiniteTimeAction *action1_$5, @addref(actions |) cocos2d::FiniteTimeAction *action1_$6, @addref(actions |) cocos2d::FiniteTimeAction *action1_$7, @addref(actions |) cocos2d::FiniteTimeAction *action1_$8, @addref(actions |) cocos2d::FiniteTimeAction *action1_$9, @addref(actions |) cocos2d::FiniteTimeAction *action1_$10, @addref(actions |) cocos2d::FiniteTimeAction *action1_$11, @addref(actions |) cocos2d::FiniteTimeAction *action1_$12, @addref(actions |) cocos2d::FiniteTimeAction *action1_$13, @addref(actions |) cocos2d::FiniteTimeAction *action1_$14) + cocos2d::Sequence *ret = cocos2d::Sequence::create(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, nullptr); int num_ret = olua_push_object(L, ret, "cc.Sequence"); // insert code after call @@ -2604,13 +2459,14 @@ static int _cocos2d_Sequence_create$16(lua_State *L) olua_addref(L, -1, "actions", 12, OLUA_REF_MULTI); olua_addref(L, -1, "actions", 13, OLUA_REF_MULTI); olua_addref(L, -1, "actions", 14, OLUA_REF_MULTI); + olua_addref(L, -1, "actions", 15, OLUA_REF_MULTI); olua_endinvoke(L); return num_ret; } -static int _cocos2d_Sequence_create$17(lua_State *L) +static int _olua_fun_cocos2d_Sequence_create$16(lua_State *L) { olua_startinvoke(L); @@ -2629,6 +2485,7 @@ static int _cocos2d_Sequence_create$17(lua_State *L) cocos2d::FiniteTimeAction *arg13 = nullptr; /** action1_$12 */ cocos2d::FiniteTimeAction *arg14 = nullptr; /** action1_$13 */ cocos2d::FiniteTimeAction *arg15 = nullptr; /** action1_$14 */ + cocos2d::FiniteTimeAction *arg16 = nullptr; /** action1_$15 */ olua_check_object(L, 1, &arg1, "cc.FiniteTimeAction"); olua_check_object(L, 2, &arg2, "cc.FiniteTimeAction"); @@ -2645,9 +2502,10 @@ static int _cocos2d_Sequence_create$17(lua_State *L) olua_check_object(L, 13, &arg13, "cc.FiniteTimeAction"); olua_check_object(L, 14, &arg14, "cc.FiniteTimeAction"); olua_check_object(L, 15, &arg15, "cc.FiniteTimeAction"); + olua_check_object(L, 16, &arg16, "cc.FiniteTimeAction"); - // @variadic static cocos2d::Sequence *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$4, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$5, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$6, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$7, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$8, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$9, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$10, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$11, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$12, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$13, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$14, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$15, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$16) - cocos2d::Sequence *ret = cocos2d::Sequence::create(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, nullptr); + // @variadic static cocos2d::Sequence *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @addref(actions |) cocos2d::FiniteTimeAction *action1_$4, @addref(actions |) cocos2d::FiniteTimeAction *action1_$5, @addref(actions |) cocos2d::FiniteTimeAction *action1_$6, @addref(actions |) cocos2d::FiniteTimeAction *action1_$7, @addref(actions |) cocos2d::FiniteTimeAction *action1_$8, @addref(actions |) cocos2d::FiniteTimeAction *action1_$9, @addref(actions |) cocos2d::FiniteTimeAction *action1_$10, @addref(actions |) cocos2d::FiniteTimeAction *action1_$11, @addref(actions |) cocos2d::FiniteTimeAction *action1_$12, @addref(actions |) cocos2d::FiniteTimeAction *action1_$13, @addref(actions |) cocos2d::FiniteTimeAction *action1_$14, @addref(actions |) cocos2d::FiniteTimeAction *action1_$15) + cocos2d::Sequence *ret = cocos2d::Sequence::create(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, nullptr); int num_ret = olua_push_object(L, ret, "cc.Sequence"); // insert code after call @@ -2666,13 +2524,14 @@ static int _cocos2d_Sequence_create$17(lua_State *L) olua_addref(L, -1, "actions", 13, OLUA_REF_MULTI); olua_addref(L, -1, "actions", 14, OLUA_REF_MULTI); olua_addref(L, -1, "actions", 15, OLUA_REF_MULTI); + olua_addref(L, -1, "actions", 16, OLUA_REF_MULTI); olua_endinvoke(L); return num_ret; } -static int _cocos2d_Sequence_create$18(lua_State *L) +static int _olua_fun_cocos2d_Sequence_create$17(lua_State *L) { olua_startinvoke(L); @@ -2692,6 +2551,7 @@ static int _cocos2d_Sequence_create$18(lua_State *L) cocos2d::FiniteTimeAction *arg14 = nullptr; /** action1_$13 */ cocos2d::FiniteTimeAction *arg15 = nullptr; /** action1_$14 */ cocos2d::FiniteTimeAction *arg16 = nullptr; /** action1_$15 */ + cocos2d::FiniteTimeAction *arg17 = nullptr; /** action1_$16 */ olua_check_object(L, 1, &arg1, "cc.FiniteTimeAction"); olua_check_object(L, 2, &arg2, "cc.FiniteTimeAction"); @@ -2709,9 +2569,10 @@ static int _cocos2d_Sequence_create$18(lua_State *L) olua_check_object(L, 14, &arg14, "cc.FiniteTimeAction"); olua_check_object(L, 15, &arg15, "cc.FiniteTimeAction"); olua_check_object(L, 16, &arg16, "cc.FiniteTimeAction"); + olua_check_object(L, 17, &arg17, "cc.FiniteTimeAction"); - // @variadic static cocos2d::Sequence *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$4, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$5, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$6, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$7, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$8, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$9, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$10, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$11, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$12, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$13, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$14, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$15, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$16) - cocos2d::Sequence *ret = cocos2d::Sequence::create(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, nullptr); + // @variadic static cocos2d::Sequence *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @addref(actions |) cocos2d::FiniteTimeAction *action1_$4, @addref(actions |) cocos2d::FiniteTimeAction *action1_$5, @addref(actions |) cocos2d::FiniteTimeAction *action1_$6, @addref(actions |) cocos2d::FiniteTimeAction *action1_$7, @addref(actions |) cocos2d::FiniteTimeAction *action1_$8, @addref(actions |) cocos2d::FiniteTimeAction *action1_$9, @addref(actions |) cocos2d::FiniteTimeAction *action1_$10, @addref(actions |) cocos2d::FiniteTimeAction *action1_$11, @addref(actions |) cocos2d::FiniteTimeAction *action1_$12, @addref(actions |) cocos2d::FiniteTimeAction *action1_$13, @addref(actions |) cocos2d::FiniteTimeAction *action1_$14, @addref(actions |) cocos2d::FiniteTimeAction *action1_$15, @addref(actions |) cocos2d::FiniteTimeAction *action1_$16) + cocos2d::Sequence *ret = cocos2d::Sequence::create(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17, nullptr); int num_ret = olua_push_object(L, ret, "cc.Sequence"); // insert code after call @@ -2731,137 +2592,160 @@ static int _cocos2d_Sequence_create$18(lua_State *L) olua_addref(L, -1, "actions", 14, OLUA_REF_MULTI); olua_addref(L, -1, "actions", 15, OLUA_REF_MULTI); olua_addref(L, -1, "actions", 16, OLUA_REF_MULTI); + olua_addref(L, -1, "actions", 17, OLUA_REF_MULTI); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_cocos2d_Sequence_create$18(lua_State *L) +{ + olua_startinvoke(L); + + cocos2d::Vector arg1; /** arrayOfActions */ + + olua_check_array(L, 1, arg1, [L](cocos2d::FiniteTimeAction **arg1) { + olua_check_object(L, -1, arg1, "cc.FiniteTimeAction"); + }); + + // static cocos2d::Sequence *create(@addref(actions |) const cocos2d::Vector &arrayOfActions) + cocos2d::Sequence *ret = cocos2d::Sequence::create(arg1); + int num_ret = olua_push_object(L, ret, "cc.Sequence"); + + // insert code after call + olua_addref(L, -1, "actions", 1, OLUA_REF_MULTI | OLUA_REF_TABLE); olua_endinvoke(L); return num_ret; } -static int _cocos2d_Sequence_create(lua_State *L) +static int _olua_fun_cocos2d_Sequence_create(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 1) { - if ((olua_is_array(L, 1))) { - // static cocos2d::Sequence *create(@addref(actions |) const cocos2d::Vector &arrayOfActions) - return _cocos2d_Sequence_create$2(L); + if ((olua_is_object(L, 1, "cc.FiniteTimeAction"))) { + // @variadic static cocos2d::Sequence *create(@addref(actions |) cocos2d::FiniteTimeAction *action1) + return _olua_fun_cocos2d_Sequence_create$1(L); } - // if ((olua_is_object(L, 1, "cc.FiniteTimeAction"))) { - // @variadic static cocos2d::Sequence *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$4, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$5, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$6, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$7, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$8, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$9, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$10, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$11, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$12, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$13, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$14, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$15, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$16) - return _cocos2d_Sequence_create$3(L); + // if ((olua_is_array(L, 1))) { + // static cocos2d::Sequence *create(@addref(actions |) const cocos2d::Vector &arrayOfActions) + return _olua_fun_cocos2d_Sequence_create$18(L); // } } if (num_args == 2) { // if ((olua_is_object(L, 1, "cc.FiniteTimeAction")) && (olua_is_object(L, 2, "cc.FiniteTimeAction"))) { - // @variadic static cocos2d::Sequence *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$4, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$5, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$6, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$7, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$8, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$9, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$10, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$11, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$12, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$13, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$14, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$15, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$16) - return _cocos2d_Sequence_create$4(L); + // @variadic static cocos2d::Sequence *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$1) + return _olua_fun_cocos2d_Sequence_create$2(L); // } } if (num_args == 3) { // if ((olua_is_object(L, 1, "cc.FiniteTimeAction")) && (olua_is_object(L, 2, "cc.FiniteTimeAction")) && (olua_is_object(L, 3, "cc.FiniteTimeAction"))) { - // @variadic static cocos2d::Sequence *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$4, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$5, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$6, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$7, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$8, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$9, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$10, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$11, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$12, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$13, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$14, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$15, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$16) - return _cocos2d_Sequence_create$5(L); + // @variadic static cocos2d::Sequence *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$2) + return _olua_fun_cocos2d_Sequence_create$3(L); // } } if (num_args == 4) { // if ((olua_is_object(L, 1, "cc.FiniteTimeAction")) && (olua_is_object(L, 2, "cc.FiniteTimeAction")) && (olua_is_object(L, 3, "cc.FiniteTimeAction")) && (olua_is_object(L, 4, "cc.FiniteTimeAction"))) { - // @variadic static cocos2d::Sequence *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$4, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$5, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$6, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$7, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$8, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$9, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$10, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$11, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$12, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$13, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$14, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$15, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$16) - return _cocos2d_Sequence_create$6(L); + // @variadic static cocos2d::Sequence *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @addref(actions |) cocos2d::FiniteTimeAction *action1_$3) + return _olua_fun_cocos2d_Sequence_create$4(L); // } } if (num_args == 5) { // if ((olua_is_object(L, 1, "cc.FiniteTimeAction")) && (olua_is_object(L, 2, "cc.FiniteTimeAction")) && (olua_is_object(L, 3, "cc.FiniteTimeAction")) && (olua_is_object(L, 4, "cc.FiniteTimeAction")) && (olua_is_object(L, 5, "cc.FiniteTimeAction"))) { - // @variadic static cocos2d::Sequence *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$4, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$5, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$6, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$7, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$8, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$9, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$10, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$11, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$12, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$13, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$14, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$15, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$16) - return _cocos2d_Sequence_create$7(L); + // @variadic static cocos2d::Sequence *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @addref(actions |) cocos2d::FiniteTimeAction *action1_$4) + return _olua_fun_cocos2d_Sequence_create$5(L); // } } if (num_args == 6) { // if ((olua_is_object(L, 1, "cc.FiniteTimeAction")) && (olua_is_object(L, 2, "cc.FiniteTimeAction")) && (olua_is_object(L, 3, "cc.FiniteTimeAction")) && (olua_is_object(L, 4, "cc.FiniteTimeAction")) && (olua_is_object(L, 5, "cc.FiniteTimeAction")) && (olua_is_object(L, 6, "cc.FiniteTimeAction"))) { - // @variadic static cocos2d::Sequence *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$4, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$5, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$6, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$7, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$8, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$9, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$10, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$11, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$12, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$13, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$14, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$15, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$16) - return _cocos2d_Sequence_create$8(L); + // @variadic static cocos2d::Sequence *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @addref(actions |) cocos2d::FiniteTimeAction *action1_$4, @addref(actions |) cocos2d::FiniteTimeAction *action1_$5) + return _olua_fun_cocos2d_Sequence_create$6(L); // } } if (num_args == 7) { // if ((olua_is_object(L, 1, "cc.FiniteTimeAction")) && (olua_is_object(L, 2, "cc.FiniteTimeAction")) && (olua_is_object(L, 3, "cc.FiniteTimeAction")) && (olua_is_object(L, 4, "cc.FiniteTimeAction")) && (olua_is_object(L, 5, "cc.FiniteTimeAction")) && (olua_is_object(L, 6, "cc.FiniteTimeAction")) && (olua_is_object(L, 7, "cc.FiniteTimeAction"))) { - // @variadic static cocos2d::Sequence *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$4, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$5, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$6, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$7, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$8, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$9, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$10, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$11, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$12, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$13, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$14, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$15, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$16) - return _cocos2d_Sequence_create$9(L); + // @variadic static cocos2d::Sequence *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @addref(actions |) cocos2d::FiniteTimeAction *action1_$4, @addref(actions |) cocos2d::FiniteTimeAction *action1_$5, @addref(actions |) cocos2d::FiniteTimeAction *action1_$6) + return _olua_fun_cocos2d_Sequence_create$7(L); // } } if (num_args == 8) { // if ((olua_is_object(L, 1, "cc.FiniteTimeAction")) && (olua_is_object(L, 2, "cc.FiniteTimeAction")) && (olua_is_object(L, 3, "cc.FiniteTimeAction")) && (olua_is_object(L, 4, "cc.FiniteTimeAction")) && (olua_is_object(L, 5, "cc.FiniteTimeAction")) && (olua_is_object(L, 6, "cc.FiniteTimeAction")) && (olua_is_object(L, 7, "cc.FiniteTimeAction")) && (olua_is_object(L, 8, "cc.FiniteTimeAction"))) { - // @variadic static cocos2d::Sequence *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$4, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$5, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$6, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$7, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$8, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$9, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$10, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$11, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$12, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$13, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$14, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$15, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$16) - return _cocos2d_Sequence_create$10(L); + // @variadic static cocos2d::Sequence *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @addref(actions |) cocos2d::FiniteTimeAction *action1_$4, @addref(actions |) cocos2d::FiniteTimeAction *action1_$5, @addref(actions |) cocos2d::FiniteTimeAction *action1_$6, @addref(actions |) cocos2d::FiniteTimeAction *action1_$7) + return _olua_fun_cocos2d_Sequence_create$8(L); // } } if (num_args == 9) { // if ((olua_is_object(L, 1, "cc.FiniteTimeAction")) && (olua_is_object(L, 2, "cc.FiniteTimeAction")) && (olua_is_object(L, 3, "cc.FiniteTimeAction")) && (olua_is_object(L, 4, "cc.FiniteTimeAction")) && (olua_is_object(L, 5, "cc.FiniteTimeAction")) && (olua_is_object(L, 6, "cc.FiniteTimeAction")) && (olua_is_object(L, 7, "cc.FiniteTimeAction")) && (olua_is_object(L, 8, "cc.FiniteTimeAction")) && (olua_is_object(L, 9, "cc.FiniteTimeAction"))) { - // @variadic static cocos2d::Sequence *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$4, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$5, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$6, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$7, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$8, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$9, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$10, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$11, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$12, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$13, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$14, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$15, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$16) - return _cocos2d_Sequence_create$11(L); + // @variadic static cocos2d::Sequence *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @addref(actions |) cocos2d::FiniteTimeAction *action1_$4, @addref(actions |) cocos2d::FiniteTimeAction *action1_$5, @addref(actions |) cocos2d::FiniteTimeAction *action1_$6, @addref(actions |) cocos2d::FiniteTimeAction *action1_$7, @addref(actions |) cocos2d::FiniteTimeAction *action1_$8) + return _olua_fun_cocos2d_Sequence_create$9(L); // } } if (num_args == 10) { // if ((olua_is_object(L, 1, "cc.FiniteTimeAction")) && (olua_is_object(L, 2, "cc.FiniteTimeAction")) && (olua_is_object(L, 3, "cc.FiniteTimeAction")) && (olua_is_object(L, 4, "cc.FiniteTimeAction")) && (olua_is_object(L, 5, "cc.FiniteTimeAction")) && (olua_is_object(L, 6, "cc.FiniteTimeAction")) && (olua_is_object(L, 7, "cc.FiniteTimeAction")) && (olua_is_object(L, 8, "cc.FiniteTimeAction")) && (olua_is_object(L, 9, "cc.FiniteTimeAction")) && (olua_is_object(L, 10, "cc.FiniteTimeAction"))) { - // @variadic static cocos2d::Sequence *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$4, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$5, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$6, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$7, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$8, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$9, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$10, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$11, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$12, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$13, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$14, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$15, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$16) - return _cocos2d_Sequence_create$12(L); + // @variadic static cocos2d::Sequence *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @addref(actions |) cocos2d::FiniteTimeAction *action1_$4, @addref(actions |) cocos2d::FiniteTimeAction *action1_$5, @addref(actions |) cocos2d::FiniteTimeAction *action1_$6, @addref(actions |) cocos2d::FiniteTimeAction *action1_$7, @addref(actions |) cocos2d::FiniteTimeAction *action1_$8, @addref(actions |) cocos2d::FiniteTimeAction *action1_$9) + return _olua_fun_cocos2d_Sequence_create$10(L); // } } if (num_args == 11) { // if ((olua_is_object(L, 1, "cc.FiniteTimeAction")) && (olua_is_object(L, 2, "cc.FiniteTimeAction")) && (olua_is_object(L, 3, "cc.FiniteTimeAction")) && (olua_is_object(L, 4, "cc.FiniteTimeAction")) && (olua_is_object(L, 5, "cc.FiniteTimeAction")) && (olua_is_object(L, 6, "cc.FiniteTimeAction")) && (olua_is_object(L, 7, "cc.FiniteTimeAction")) && (olua_is_object(L, 8, "cc.FiniteTimeAction")) && (olua_is_object(L, 9, "cc.FiniteTimeAction")) && (olua_is_object(L, 10, "cc.FiniteTimeAction")) && (olua_is_object(L, 11, "cc.FiniteTimeAction"))) { - // @variadic static cocos2d::Sequence *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$4, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$5, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$6, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$7, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$8, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$9, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$10, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$11, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$12, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$13, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$14, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$15, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$16) - return _cocos2d_Sequence_create$13(L); + // @variadic static cocos2d::Sequence *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @addref(actions |) cocos2d::FiniteTimeAction *action1_$4, @addref(actions |) cocos2d::FiniteTimeAction *action1_$5, @addref(actions |) cocos2d::FiniteTimeAction *action1_$6, @addref(actions |) cocos2d::FiniteTimeAction *action1_$7, @addref(actions |) cocos2d::FiniteTimeAction *action1_$8, @addref(actions |) cocos2d::FiniteTimeAction *action1_$9, @addref(actions |) cocos2d::FiniteTimeAction *action1_$10) + return _olua_fun_cocos2d_Sequence_create$11(L); // } } if (num_args == 12) { // if ((olua_is_object(L, 1, "cc.FiniteTimeAction")) && (olua_is_object(L, 2, "cc.FiniteTimeAction")) && (olua_is_object(L, 3, "cc.FiniteTimeAction")) && (olua_is_object(L, 4, "cc.FiniteTimeAction")) && (olua_is_object(L, 5, "cc.FiniteTimeAction")) && (olua_is_object(L, 6, "cc.FiniteTimeAction")) && (olua_is_object(L, 7, "cc.FiniteTimeAction")) && (olua_is_object(L, 8, "cc.FiniteTimeAction")) && (olua_is_object(L, 9, "cc.FiniteTimeAction")) && (olua_is_object(L, 10, "cc.FiniteTimeAction")) && (olua_is_object(L, 11, "cc.FiniteTimeAction")) && (olua_is_object(L, 12, "cc.FiniteTimeAction"))) { - // @variadic static cocos2d::Sequence *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$4, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$5, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$6, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$7, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$8, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$9, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$10, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$11, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$12, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$13, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$14, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$15, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$16) - return _cocos2d_Sequence_create$14(L); + // @variadic static cocos2d::Sequence *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @addref(actions |) cocos2d::FiniteTimeAction *action1_$4, @addref(actions |) cocos2d::FiniteTimeAction *action1_$5, @addref(actions |) cocos2d::FiniteTimeAction *action1_$6, @addref(actions |) cocos2d::FiniteTimeAction *action1_$7, @addref(actions |) cocos2d::FiniteTimeAction *action1_$8, @addref(actions |) cocos2d::FiniteTimeAction *action1_$9, @addref(actions |) cocos2d::FiniteTimeAction *action1_$10, @addref(actions |) cocos2d::FiniteTimeAction *action1_$11) + return _olua_fun_cocos2d_Sequence_create$12(L); // } } if (num_args == 13) { // if ((olua_is_object(L, 1, "cc.FiniteTimeAction")) && (olua_is_object(L, 2, "cc.FiniteTimeAction")) && (olua_is_object(L, 3, "cc.FiniteTimeAction")) && (olua_is_object(L, 4, "cc.FiniteTimeAction")) && (olua_is_object(L, 5, "cc.FiniteTimeAction")) && (olua_is_object(L, 6, "cc.FiniteTimeAction")) && (olua_is_object(L, 7, "cc.FiniteTimeAction")) && (olua_is_object(L, 8, "cc.FiniteTimeAction")) && (olua_is_object(L, 9, "cc.FiniteTimeAction")) && (olua_is_object(L, 10, "cc.FiniteTimeAction")) && (olua_is_object(L, 11, "cc.FiniteTimeAction")) && (olua_is_object(L, 12, "cc.FiniteTimeAction")) && (olua_is_object(L, 13, "cc.FiniteTimeAction"))) { - // @variadic static cocos2d::Sequence *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$4, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$5, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$6, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$7, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$8, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$9, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$10, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$11, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$12, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$13, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$14, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$15, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$16) - return _cocos2d_Sequence_create$15(L); + // @variadic static cocos2d::Sequence *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @addref(actions |) cocos2d::FiniteTimeAction *action1_$4, @addref(actions |) cocos2d::FiniteTimeAction *action1_$5, @addref(actions |) cocos2d::FiniteTimeAction *action1_$6, @addref(actions |) cocos2d::FiniteTimeAction *action1_$7, @addref(actions |) cocos2d::FiniteTimeAction *action1_$8, @addref(actions |) cocos2d::FiniteTimeAction *action1_$9, @addref(actions |) cocos2d::FiniteTimeAction *action1_$10, @addref(actions |) cocos2d::FiniteTimeAction *action1_$11, @addref(actions |) cocos2d::FiniteTimeAction *action1_$12) + return _olua_fun_cocos2d_Sequence_create$13(L); // } } if (num_args == 14) { // if ((olua_is_object(L, 1, "cc.FiniteTimeAction")) && (olua_is_object(L, 2, "cc.FiniteTimeAction")) && (olua_is_object(L, 3, "cc.FiniteTimeAction")) && (olua_is_object(L, 4, "cc.FiniteTimeAction")) && (olua_is_object(L, 5, "cc.FiniteTimeAction")) && (olua_is_object(L, 6, "cc.FiniteTimeAction")) && (olua_is_object(L, 7, "cc.FiniteTimeAction")) && (olua_is_object(L, 8, "cc.FiniteTimeAction")) && (olua_is_object(L, 9, "cc.FiniteTimeAction")) && (olua_is_object(L, 10, "cc.FiniteTimeAction")) && (olua_is_object(L, 11, "cc.FiniteTimeAction")) && (olua_is_object(L, 12, "cc.FiniteTimeAction")) && (olua_is_object(L, 13, "cc.FiniteTimeAction")) && (olua_is_object(L, 14, "cc.FiniteTimeAction"))) { - // @variadic static cocos2d::Sequence *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$4, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$5, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$6, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$7, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$8, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$9, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$10, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$11, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$12, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$13, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$14, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$15, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$16) - return _cocos2d_Sequence_create$16(L); + // @variadic static cocos2d::Sequence *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @addref(actions |) cocos2d::FiniteTimeAction *action1_$4, @addref(actions |) cocos2d::FiniteTimeAction *action1_$5, @addref(actions |) cocos2d::FiniteTimeAction *action1_$6, @addref(actions |) cocos2d::FiniteTimeAction *action1_$7, @addref(actions |) cocos2d::FiniteTimeAction *action1_$8, @addref(actions |) cocos2d::FiniteTimeAction *action1_$9, @addref(actions |) cocos2d::FiniteTimeAction *action1_$10, @addref(actions |) cocos2d::FiniteTimeAction *action1_$11, @addref(actions |) cocos2d::FiniteTimeAction *action1_$12, @addref(actions |) cocos2d::FiniteTimeAction *action1_$13) + return _olua_fun_cocos2d_Sequence_create$14(L); // } } if (num_args == 15) { // if ((olua_is_object(L, 1, "cc.FiniteTimeAction")) && (olua_is_object(L, 2, "cc.FiniteTimeAction")) && (olua_is_object(L, 3, "cc.FiniteTimeAction")) && (olua_is_object(L, 4, "cc.FiniteTimeAction")) && (olua_is_object(L, 5, "cc.FiniteTimeAction")) && (olua_is_object(L, 6, "cc.FiniteTimeAction")) && (olua_is_object(L, 7, "cc.FiniteTimeAction")) && (olua_is_object(L, 8, "cc.FiniteTimeAction")) && (olua_is_object(L, 9, "cc.FiniteTimeAction")) && (olua_is_object(L, 10, "cc.FiniteTimeAction")) && (olua_is_object(L, 11, "cc.FiniteTimeAction")) && (olua_is_object(L, 12, "cc.FiniteTimeAction")) && (olua_is_object(L, 13, "cc.FiniteTimeAction")) && (olua_is_object(L, 14, "cc.FiniteTimeAction")) && (olua_is_object(L, 15, "cc.FiniteTimeAction"))) { - // @variadic static cocos2d::Sequence *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$4, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$5, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$6, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$7, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$8, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$9, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$10, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$11, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$12, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$13, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$14, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$15, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$16) - return _cocos2d_Sequence_create$17(L); + // @variadic static cocos2d::Sequence *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @addref(actions |) cocos2d::FiniteTimeAction *action1_$4, @addref(actions |) cocos2d::FiniteTimeAction *action1_$5, @addref(actions |) cocos2d::FiniteTimeAction *action1_$6, @addref(actions |) cocos2d::FiniteTimeAction *action1_$7, @addref(actions |) cocos2d::FiniteTimeAction *action1_$8, @addref(actions |) cocos2d::FiniteTimeAction *action1_$9, @addref(actions |) cocos2d::FiniteTimeAction *action1_$10, @addref(actions |) cocos2d::FiniteTimeAction *action1_$11, @addref(actions |) cocos2d::FiniteTimeAction *action1_$12, @addref(actions |) cocos2d::FiniteTimeAction *action1_$13, @addref(actions |) cocos2d::FiniteTimeAction *action1_$14) + return _olua_fun_cocos2d_Sequence_create$15(L); // } } if (num_args == 16) { // if ((olua_is_object(L, 1, "cc.FiniteTimeAction")) && (olua_is_object(L, 2, "cc.FiniteTimeAction")) && (olua_is_object(L, 3, "cc.FiniteTimeAction")) && (olua_is_object(L, 4, "cc.FiniteTimeAction")) && (olua_is_object(L, 5, "cc.FiniteTimeAction")) && (olua_is_object(L, 6, "cc.FiniteTimeAction")) && (olua_is_object(L, 7, "cc.FiniteTimeAction")) && (olua_is_object(L, 8, "cc.FiniteTimeAction")) && (olua_is_object(L, 9, "cc.FiniteTimeAction")) && (olua_is_object(L, 10, "cc.FiniteTimeAction")) && (olua_is_object(L, 11, "cc.FiniteTimeAction")) && (olua_is_object(L, 12, "cc.FiniteTimeAction")) && (olua_is_object(L, 13, "cc.FiniteTimeAction")) && (olua_is_object(L, 14, "cc.FiniteTimeAction")) && (olua_is_object(L, 15, "cc.FiniteTimeAction")) && (olua_is_object(L, 16, "cc.FiniteTimeAction"))) { - // @variadic static cocos2d::Sequence *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$4, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$5, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$6, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$7, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$8, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$9, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$10, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$11, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$12, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$13, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$14, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$15, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$16) - return _cocos2d_Sequence_create$18(L); + // @variadic static cocos2d::Sequence *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @addref(actions |) cocos2d::FiniteTimeAction *action1_$4, @addref(actions |) cocos2d::FiniteTimeAction *action1_$5, @addref(actions |) cocos2d::FiniteTimeAction *action1_$6, @addref(actions |) cocos2d::FiniteTimeAction *action1_$7, @addref(actions |) cocos2d::FiniteTimeAction *action1_$8, @addref(actions |) cocos2d::FiniteTimeAction *action1_$9, @addref(actions |) cocos2d::FiniteTimeAction *action1_$10, @addref(actions |) cocos2d::FiniteTimeAction *action1_$11, @addref(actions |) cocos2d::FiniteTimeAction *action1_$12, @addref(actions |) cocos2d::FiniteTimeAction *action1_$13, @addref(actions |) cocos2d::FiniteTimeAction *action1_$14, @addref(actions |) cocos2d::FiniteTimeAction *action1_$15) + return _olua_fun_cocos2d_Sequence_create$16(L); // } } if (num_args == 17) { // if ((olua_is_object(L, 1, "cc.FiniteTimeAction")) && (olua_is_object(L, 2, "cc.FiniteTimeAction")) && (olua_is_object(L, 3, "cc.FiniteTimeAction")) && (olua_is_object(L, 4, "cc.FiniteTimeAction")) && (olua_is_object(L, 5, "cc.FiniteTimeAction")) && (olua_is_object(L, 6, "cc.FiniteTimeAction")) && (olua_is_object(L, 7, "cc.FiniteTimeAction")) && (olua_is_object(L, 8, "cc.FiniteTimeAction")) && (olua_is_object(L, 9, "cc.FiniteTimeAction")) && (olua_is_object(L, 10, "cc.FiniteTimeAction")) && (olua_is_object(L, 11, "cc.FiniteTimeAction")) && (olua_is_object(L, 12, "cc.FiniteTimeAction")) && (olua_is_object(L, 13, "cc.FiniteTimeAction")) && (olua_is_object(L, 14, "cc.FiniteTimeAction")) && (olua_is_object(L, 15, "cc.FiniteTimeAction")) && (olua_is_object(L, 16, "cc.FiniteTimeAction")) && (olua_is_object(L, 17, "cc.FiniteTimeAction"))) { - // @variadic static cocos2d::Sequence *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$4, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$5, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$6, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$7, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$8, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$9, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$10, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$11, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$12, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$13, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$14, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$15, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$16) - return _cocos2d_Sequence_create$1(L); + // @variadic static cocos2d::Sequence *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @addref(actions |) cocos2d::FiniteTimeAction *action1_$4, @addref(actions |) cocos2d::FiniteTimeAction *action1_$5, @addref(actions |) cocos2d::FiniteTimeAction *action1_$6, @addref(actions |) cocos2d::FiniteTimeAction *action1_$7, @addref(actions |) cocos2d::FiniteTimeAction *action1_$8, @addref(actions |) cocos2d::FiniteTimeAction *action1_$9, @addref(actions |) cocos2d::FiniteTimeAction *action1_$10, @addref(actions |) cocos2d::FiniteTimeAction *action1_$11, @addref(actions |) cocos2d::FiniteTimeAction *action1_$12, @addref(actions |) cocos2d::FiniteTimeAction *action1_$13, @addref(actions |) cocos2d::FiniteTimeAction *action1_$14, @addref(actions |) cocos2d::FiniteTimeAction *action1_$15, @addref(actions |) cocos2d::FiniteTimeAction *action1_$16) + return _olua_fun_cocos2d_Sequence_create$17(L); // } } @@ -2870,7 +2754,7 @@ static int _cocos2d_Sequence_create(lua_State *L) return 0; } -static int _cocos2d_Sequence_createWithTwoActions(lua_State *L) +static int _olua_fun_cocos2d_Sequence_createWithTwoActions(lua_State *L) { olua_startinvoke(L); @@ -2893,54 +2777,27 @@ static int _cocos2d_Sequence_createWithTwoActions(lua_State *L) return num_ret; } -static int _cocos2d_Sequence_reverse(lua_State *L) +static int _olua_cls_cc_Sequence(lua_State *L) { - olua_startinvoke(L); - - cocos2d::Sequence *self = nullptr; - - olua_to_object(L, 1, &self, "cc.Sequence"); - - // cocos2d::Sequence *reverse() - cocos2d::Sequence *ret = self->reverse(); - int num_ret = olua_push_object(L, ret, "cc.Sequence"); - - olua_endinvoke(L); + oluacls_class(L, "cc.Sequence"); + oluacls_func(L, "create", _olua_fun_cocos2d_Sequence_create); + oluacls_func(L, "createWithTwoActions", _olua_fun_cocos2d_Sequence_createWithTwoActions); - return num_ret; + return 1; } OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_Sequence(lua_State *L) +OLUA_LIB int luaopen_cc_Sequence(lua_State *L) { - oluacls_class(L, "cc.Sequence"); - oluacls_func(L, "clone", _cocos2d_Sequence_clone); - oluacls_func(L, "create", _cocos2d_Sequence_create); - oluacls_func(L, "createWithTwoActions", _cocos2d_Sequence_createWithTwoActions); - oluacls_func(L, "reverse", _cocos2d_Sequence_reverse); - + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.Sequence")) { + luaL_error(L, "class not found: cocos2d::Sequence"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_Repeat_clone(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::Repeat *self = nullptr; - - olua_to_object(L, 1, &self, "cc.Repeat"); - - // cocos2d::Repeat *clone() - cocos2d::Repeat *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.Repeat"); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_Repeat_create(lua_State *L) +static int _olua_fun_cocos2d_Repeat_create(lua_State *L) { olua_startinvoke(L); @@ -2962,7 +2819,7 @@ static int _cocos2d_Repeat_create(lua_State *L) return num_ret; } -static int _cocos2d_Repeat_getInnerAction(lua_State *L) +static int _olua_fun_cocos2d_Repeat_getInnerAction(lua_State *L) { olua_startinvoke(L); @@ -2982,24 +2839,7 @@ static int _cocos2d_Repeat_getInnerAction(lua_State *L) return num_ret; } -static int _cocos2d_Repeat_reverse(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::Repeat *self = nullptr; - - olua_to_object(L, 1, &self, "cc.Repeat"); - - // cocos2d::Repeat *reverse() - cocos2d::Repeat *ret = self->reverse(); - int num_ret = olua_push_object(L, ret, "cc.Repeat"); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_Repeat_setInnerAction(lua_State *L) +static int _olua_fun_cocos2d_Repeat_setInnerAction(lua_State *L) { olua_startinvoke(L); @@ -3020,39 +2860,29 @@ static int _cocos2d_Repeat_setInnerAction(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_Repeat(lua_State *L) +static int _olua_cls_cc_Repeat(lua_State *L) { oluacls_class(L, "cc.Repeat"); - oluacls_func(L, "clone", _cocos2d_Repeat_clone); - oluacls_func(L, "create", _cocos2d_Repeat_create); - oluacls_func(L, "getInnerAction", _cocos2d_Repeat_getInnerAction); - oluacls_func(L, "reverse", _cocos2d_Repeat_reverse); - oluacls_func(L, "setInnerAction", _cocos2d_Repeat_setInnerAction); - oluacls_prop(L, "innerAction", _cocos2d_Repeat_getInnerAction, _cocos2d_Repeat_setInnerAction); + oluacls_func(L, "create", _olua_fun_cocos2d_Repeat_create); + oluacls_func(L, "getInnerAction", _olua_fun_cocos2d_Repeat_getInnerAction); + oluacls_func(L, "setInnerAction", _olua_fun_cocos2d_Repeat_setInnerAction); + oluacls_prop(L, "innerAction", _olua_fun_cocos2d_Repeat_getInnerAction, _olua_fun_cocos2d_Repeat_setInnerAction); return 1; } -OLUA_END_DECLS -static int _cocos2d_RepeatForever_clone(lua_State *L) +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_Repeat(lua_State *L) { - olua_startinvoke(L); - - cocos2d::RepeatForever *self = nullptr; - - olua_to_object(L, 1, &self, "cc.RepeatForever"); - - // cocos2d::RepeatForever *clone() - cocos2d::RepeatForever *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.RepeatForever"); - - olua_endinvoke(L); - - return num_ret; + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.Repeat")) { + luaL_error(L, "class not found: cocos2d::Repeat"); + } + return 1; } +OLUA_END_DECLS -static int _cocos2d_RepeatForever_create(lua_State *L) +static int _olua_fun_cocos2d_RepeatForever_create(lua_State *L) { olua_startinvoke(L); @@ -3072,7 +2902,7 @@ static int _cocos2d_RepeatForever_create(lua_State *L) return num_ret; } -static int _cocos2d_RepeatForever_getInnerAction(lua_State *L) +static int _olua_fun_cocos2d_RepeatForever_getInnerAction(lua_State *L) { olua_startinvoke(L); @@ -3092,24 +2922,7 @@ static int _cocos2d_RepeatForever_getInnerAction(lua_State *L) return num_ret; } -static int _cocos2d_RepeatForever_reverse(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::RepeatForever *self = nullptr; - - olua_to_object(L, 1, &self, "cc.RepeatForever"); - - // cocos2d::RepeatForever *reverse() - cocos2d::RepeatForever *ret = self->reverse(); - int num_ret = olua_push_object(L, ret, "cc.RepeatForever"); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_RepeatForever_setInnerAction(lua_State *L) +static int _olua_fun_cocos2d_RepeatForever_setInnerAction(lua_State *L) { olua_startinvoke(L); @@ -3130,198 +2943,127 @@ static int _cocos2d_RepeatForever_setInnerAction(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_RepeatForever(lua_State *L) +static int _olua_cls_cc_RepeatForever(lua_State *L) { oluacls_class(L, "cc.RepeatForever"); - oluacls_func(L, "clone", _cocos2d_RepeatForever_clone); - oluacls_func(L, "create", _cocos2d_RepeatForever_create); - oluacls_func(L, "getInnerAction", _cocos2d_RepeatForever_getInnerAction); - oluacls_func(L, "reverse", _cocos2d_RepeatForever_reverse); - oluacls_func(L, "setInnerAction", _cocos2d_RepeatForever_setInnerAction); - oluacls_prop(L, "innerAction", _cocos2d_RepeatForever_getInnerAction, _cocos2d_RepeatForever_setInnerAction); + oluacls_func(L, "create", _olua_fun_cocos2d_RepeatForever_create); + oluacls_func(L, "getInnerAction", _olua_fun_cocos2d_RepeatForever_getInnerAction); + oluacls_func(L, "setInnerAction", _olua_fun_cocos2d_RepeatForever_setInnerAction); + oluacls_prop(L, "innerAction", _olua_fun_cocos2d_RepeatForever_getInnerAction, _olua_fun_cocos2d_RepeatForever_setInnerAction); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_RepeatForever(lua_State *L) +{ + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.RepeatForever")) { + luaL_error(L, "class not found: cocos2d::RepeatForever"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_Spawn_clone(lua_State *L) +static int _olua_fun_cocos2d_Spawn_create$1(lua_State *L) { olua_startinvoke(L); - cocos2d::Spawn *self = nullptr; + cocos2d::FiniteTimeAction *arg1 = nullptr; /** action1 */ - olua_to_object(L, 1, &self, "cc.Spawn"); + olua_check_object(L, 1, &arg1, "cc.FiniteTimeAction"); - // cocos2d::Spawn *clone() - cocos2d::Spawn *ret = self->clone(); + // @variadic static cocos2d::Spawn *create(@addref(actions |) cocos2d::FiniteTimeAction *action1) + cocos2d::Spawn *ret = cocos2d::Spawn::create(arg1, nullptr); int num_ret = olua_push_object(L, ret, "cc.Spawn"); + // insert code after call + olua_addref(L, -1, "actions", 1, OLUA_REF_MULTI); + olua_endinvoke(L); return num_ret; } -static int _cocos2d_Spawn_create$1(lua_State *L) +static int _olua_fun_cocos2d_Spawn_create$2(lua_State *L) { olua_startinvoke(L); cocos2d::FiniteTimeAction *arg1 = nullptr; /** action1 */ cocos2d::FiniteTimeAction *arg2 = nullptr; /** action1_$1 */ - cocos2d::FiniteTimeAction *arg3 = nullptr; /** action1_$2 */ - cocos2d::FiniteTimeAction *arg4 = nullptr; /** action1_$3 */ - cocos2d::FiniteTimeAction *arg5 = nullptr; /** action1_$4 */ - cocos2d::FiniteTimeAction *arg6 = nullptr; /** action1_$5 */ - cocos2d::FiniteTimeAction *arg7 = nullptr; /** action1_$6 */ - cocos2d::FiniteTimeAction *arg8 = nullptr; /** action1_$7 */ - cocos2d::FiniteTimeAction *arg9 = nullptr; /** action1_$8 */ - cocos2d::FiniteTimeAction *arg10 = nullptr; /** action1_$9 */ - cocos2d::FiniteTimeAction *arg11 = nullptr; /** action1_$10 */ - cocos2d::FiniteTimeAction *arg12 = nullptr; /** action1_$11 */ - cocos2d::FiniteTimeAction *arg13 = nullptr; /** action1_$12 */ - cocos2d::FiniteTimeAction *arg14 = nullptr; /** action1_$13 */ - cocos2d::FiniteTimeAction *arg15 = nullptr; /** action1_$14 */ - cocos2d::FiniteTimeAction *arg16 = nullptr; /** action1_$15 */ - cocos2d::FiniteTimeAction *arg17 = nullptr; /** action1_$16 */ olua_check_object(L, 1, &arg1, "cc.FiniteTimeAction"); olua_check_object(L, 2, &arg2, "cc.FiniteTimeAction"); - olua_check_object(L, 3, &arg3, "cc.FiniteTimeAction"); - olua_check_object(L, 4, &arg4, "cc.FiniteTimeAction"); - olua_check_object(L, 5, &arg5, "cc.FiniteTimeAction"); - olua_check_object(L, 6, &arg6, "cc.FiniteTimeAction"); - olua_check_object(L, 7, &arg7, "cc.FiniteTimeAction"); - olua_check_object(L, 8, &arg8, "cc.FiniteTimeAction"); - olua_check_object(L, 9, &arg9, "cc.FiniteTimeAction"); - olua_check_object(L, 10, &arg10, "cc.FiniteTimeAction"); - olua_check_object(L, 11, &arg11, "cc.FiniteTimeAction"); - olua_check_object(L, 12, &arg12, "cc.FiniteTimeAction"); - olua_check_object(L, 13, &arg13, "cc.FiniteTimeAction"); - olua_check_object(L, 14, &arg14, "cc.FiniteTimeAction"); - olua_check_object(L, 15, &arg15, "cc.FiniteTimeAction"); - olua_check_object(L, 16, &arg16, "cc.FiniteTimeAction"); - olua_check_object(L, 17, &arg17, "cc.FiniteTimeAction"); - // @variadic static cocos2d::Spawn *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$4, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$5, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$6, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$7, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$8, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$9, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$10, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$11, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$12, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$13, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$14, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$15, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$16) - cocos2d::Spawn *ret = cocos2d::Spawn::create(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17, nullptr); + // @variadic static cocos2d::Spawn *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$1) + cocos2d::Spawn *ret = cocos2d::Spawn::create(arg1, arg2, nullptr); int num_ret = olua_push_object(L, ret, "cc.Spawn"); // insert code after call olua_addref(L, -1, "actions", 1, OLUA_REF_MULTI); olua_addref(L, -1, "actions", 2, OLUA_REF_MULTI); - olua_addref(L, -1, "actions", 3, OLUA_REF_MULTI); - olua_addref(L, -1, "actions", 4, OLUA_REF_MULTI); - olua_addref(L, -1, "actions", 5, OLUA_REF_MULTI); - olua_addref(L, -1, "actions", 6, OLUA_REF_MULTI); - olua_addref(L, -1, "actions", 7, OLUA_REF_MULTI); - olua_addref(L, -1, "actions", 8, OLUA_REF_MULTI); - olua_addref(L, -1, "actions", 9, OLUA_REF_MULTI); - olua_addref(L, -1, "actions", 10, OLUA_REF_MULTI); - olua_addref(L, -1, "actions", 11, OLUA_REF_MULTI); - olua_addref(L, -1, "actions", 12, OLUA_REF_MULTI); - olua_addref(L, -1, "actions", 13, OLUA_REF_MULTI); - olua_addref(L, -1, "actions", 14, OLUA_REF_MULTI); - olua_addref(L, -1, "actions", 15, OLUA_REF_MULTI); - olua_addref(L, -1, "actions", 16, OLUA_REF_MULTI); - olua_addref(L, -1, "actions", 17, OLUA_REF_MULTI); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_Spawn_create$2(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::Vector arg1; /** arrayOfActions */ - - olua_check_array(L, 1, arg1, [L](cocos2d::FiniteTimeAction **arg1) { - olua_check_object(L, -1, arg1, "cc.FiniteTimeAction"); - }); - - // static cocos2d::Spawn *create(@addref(actions |) const cocos2d::Vector &arrayOfActions) - cocos2d::Spawn *ret = cocos2d::Spawn::create(arg1); - int num_ret = olua_push_object(L, ret, "cc.Spawn"); - - // insert code after call - olua_addref(L, -1, "actions", 1, OLUA_REF_MULTI | OLUA_REF_TABLE); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_Spawn_create$3(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::FiniteTimeAction *arg1 = nullptr; /** action1 */ - - olua_check_object(L, 1, &arg1, "cc.FiniteTimeAction"); - - // @variadic static cocos2d::Spawn *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$4, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$5, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$6, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$7, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$8, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$9, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$10, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$11, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$12, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$13, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$14, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$15, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$16) - cocos2d::Spawn *ret = cocos2d::Spawn::create(arg1, nullptr); - int num_ret = olua_push_object(L, ret, "cc.Spawn"); - - // insert code after call - olua_addref(L, -1, "actions", 1, OLUA_REF_MULTI); olua_endinvoke(L); return num_ret; } -static int _cocos2d_Spawn_create$4(lua_State *L) +static int _olua_fun_cocos2d_Spawn_create$3(lua_State *L) { olua_startinvoke(L); cocos2d::FiniteTimeAction *arg1 = nullptr; /** action1 */ cocos2d::FiniteTimeAction *arg2 = nullptr; /** action1_$1 */ + cocos2d::FiniteTimeAction *arg3 = nullptr; /** action1_$2 */ olua_check_object(L, 1, &arg1, "cc.FiniteTimeAction"); olua_check_object(L, 2, &arg2, "cc.FiniteTimeAction"); + olua_check_object(L, 3, &arg3, "cc.FiniteTimeAction"); - // @variadic static cocos2d::Spawn *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$4, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$5, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$6, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$7, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$8, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$9, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$10, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$11, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$12, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$13, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$14, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$15, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$16) - cocos2d::Spawn *ret = cocos2d::Spawn::create(arg1, arg2, nullptr); + // @variadic static cocos2d::Spawn *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$2) + cocos2d::Spawn *ret = cocos2d::Spawn::create(arg1, arg2, arg3, nullptr); int num_ret = olua_push_object(L, ret, "cc.Spawn"); // insert code after call olua_addref(L, -1, "actions", 1, OLUA_REF_MULTI); olua_addref(L, -1, "actions", 2, OLUA_REF_MULTI); + olua_addref(L, -1, "actions", 3, OLUA_REF_MULTI); olua_endinvoke(L); return num_ret; } -static int _cocos2d_Spawn_create$5(lua_State *L) +static int _olua_fun_cocos2d_Spawn_create$4(lua_State *L) { olua_startinvoke(L); cocos2d::FiniteTimeAction *arg1 = nullptr; /** action1 */ cocos2d::FiniteTimeAction *arg2 = nullptr; /** action1_$1 */ cocos2d::FiniteTimeAction *arg3 = nullptr; /** action1_$2 */ + cocos2d::FiniteTimeAction *arg4 = nullptr; /** action1_$3 */ olua_check_object(L, 1, &arg1, "cc.FiniteTimeAction"); olua_check_object(L, 2, &arg2, "cc.FiniteTimeAction"); olua_check_object(L, 3, &arg3, "cc.FiniteTimeAction"); + olua_check_object(L, 4, &arg4, "cc.FiniteTimeAction"); - // @variadic static cocos2d::Spawn *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$4, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$5, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$6, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$7, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$8, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$9, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$10, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$11, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$12, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$13, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$14, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$15, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$16) - cocos2d::Spawn *ret = cocos2d::Spawn::create(arg1, arg2, arg3, nullptr); + // @variadic static cocos2d::Spawn *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @addref(actions |) cocos2d::FiniteTimeAction *action1_$3) + cocos2d::Spawn *ret = cocos2d::Spawn::create(arg1, arg2, arg3, arg4, nullptr); int num_ret = olua_push_object(L, ret, "cc.Spawn"); // insert code after call olua_addref(L, -1, "actions", 1, OLUA_REF_MULTI); olua_addref(L, -1, "actions", 2, OLUA_REF_MULTI); olua_addref(L, -1, "actions", 3, OLUA_REF_MULTI); + olua_addref(L, -1, "actions", 4, OLUA_REF_MULTI); olua_endinvoke(L); return num_ret; } -static int _cocos2d_Spawn_create$6(lua_State *L) +static int _olua_fun_cocos2d_Spawn_create$5(lua_State *L) { olua_startinvoke(L); @@ -3329,14 +3071,16 @@ static int _cocos2d_Spawn_create$6(lua_State *L) cocos2d::FiniteTimeAction *arg2 = nullptr; /** action1_$1 */ cocos2d::FiniteTimeAction *arg3 = nullptr; /** action1_$2 */ cocos2d::FiniteTimeAction *arg4 = nullptr; /** action1_$3 */ + cocos2d::FiniteTimeAction *arg5 = nullptr; /** action1_$4 */ olua_check_object(L, 1, &arg1, "cc.FiniteTimeAction"); olua_check_object(L, 2, &arg2, "cc.FiniteTimeAction"); olua_check_object(L, 3, &arg3, "cc.FiniteTimeAction"); olua_check_object(L, 4, &arg4, "cc.FiniteTimeAction"); + olua_check_object(L, 5, &arg5, "cc.FiniteTimeAction"); - // @variadic static cocos2d::Spawn *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$4, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$5, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$6, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$7, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$8, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$9, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$10, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$11, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$12, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$13, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$14, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$15, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$16) - cocos2d::Spawn *ret = cocos2d::Spawn::create(arg1, arg2, arg3, arg4, nullptr); + // @variadic static cocos2d::Spawn *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @addref(actions |) cocos2d::FiniteTimeAction *action1_$4) + cocos2d::Spawn *ret = cocos2d::Spawn::create(arg1, arg2, arg3, arg4, arg5, nullptr); int num_ret = olua_push_object(L, ret, "cc.Spawn"); // insert code after call @@ -3344,13 +3088,14 @@ static int _cocos2d_Spawn_create$6(lua_State *L) olua_addref(L, -1, "actions", 2, OLUA_REF_MULTI); olua_addref(L, -1, "actions", 3, OLUA_REF_MULTI); olua_addref(L, -1, "actions", 4, OLUA_REF_MULTI); + olua_addref(L, -1, "actions", 5, OLUA_REF_MULTI); olua_endinvoke(L); return num_ret; } -static int _cocos2d_Spawn_create$7(lua_State *L) +static int _olua_fun_cocos2d_Spawn_create$6(lua_State *L) { olua_startinvoke(L); @@ -3359,15 +3104,17 @@ static int _cocos2d_Spawn_create$7(lua_State *L) cocos2d::FiniteTimeAction *arg3 = nullptr; /** action1_$2 */ cocos2d::FiniteTimeAction *arg4 = nullptr; /** action1_$3 */ cocos2d::FiniteTimeAction *arg5 = nullptr; /** action1_$4 */ + cocos2d::FiniteTimeAction *arg6 = nullptr; /** action1_$5 */ olua_check_object(L, 1, &arg1, "cc.FiniteTimeAction"); olua_check_object(L, 2, &arg2, "cc.FiniteTimeAction"); olua_check_object(L, 3, &arg3, "cc.FiniteTimeAction"); olua_check_object(L, 4, &arg4, "cc.FiniteTimeAction"); olua_check_object(L, 5, &arg5, "cc.FiniteTimeAction"); + olua_check_object(L, 6, &arg6, "cc.FiniteTimeAction"); - // @variadic static cocos2d::Spawn *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$4, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$5, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$6, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$7, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$8, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$9, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$10, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$11, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$12, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$13, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$14, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$15, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$16) - cocos2d::Spawn *ret = cocos2d::Spawn::create(arg1, arg2, arg3, arg4, arg5, nullptr); + // @variadic static cocos2d::Spawn *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @addref(actions |) cocos2d::FiniteTimeAction *action1_$4, @addref(actions |) cocos2d::FiniteTimeAction *action1_$5) + cocos2d::Spawn *ret = cocos2d::Spawn::create(arg1, arg2, arg3, arg4, arg5, arg6, nullptr); int num_ret = olua_push_object(L, ret, "cc.Spawn"); // insert code after call @@ -3376,13 +3123,14 @@ static int _cocos2d_Spawn_create$7(lua_State *L) olua_addref(L, -1, "actions", 3, OLUA_REF_MULTI); olua_addref(L, -1, "actions", 4, OLUA_REF_MULTI); olua_addref(L, -1, "actions", 5, OLUA_REF_MULTI); + olua_addref(L, -1, "actions", 6, OLUA_REF_MULTI); olua_endinvoke(L); return num_ret; } -static int _cocos2d_Spawn_create$8(lua_State *L) +static int _olua_fun_cocos2d_Spawn_create$7(lua_State *L) { olua_startinvoke(L); @@ -3392,6 +3140,7 @@ static int _cocos2d_Spawn_create$8(lua_State *L) cocos2d::FiniteTimeAction *arg4 = nullptr; /** action1_$3 */ cocos2d::FiniteTimeAction *arg5 = nullptr; /** action1_$4 */ cocos2d::FiniteTimeAction *arg6 = nullptr; /** action1_$5 */ + cocos2d::FiniteTimeAction *arg7 = nullptr; /** action1_$6 */ olua_check_object(L, 1, &arg1, "cc.FiniteTimeAction"); olua_check_object(L, 2, &arg2, "cc.FiniteTimeAction"); @@ -3399,9 +3148,10 @@ static int _cocos2d_Spawn_create$8(lua_State *L) olua_check_object(L, 4, &arg4, "cc.FiniteTimeAction"); olua_check_object(L, 5, &arg5, "cc.FiniteTimeAction"); olua_check_object(L, 6, &arg6, "cc.FiniteTimeAction"); + olua_check_object(L, 7, &arg7, "cc.FiniteTimeAction"); - // @variadic static cocos2d::Spawn *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$4, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$5, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$6, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$7, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$8, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$9, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$10, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$11, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$12, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$13, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$14, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$15, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$16) - cocos2d::Spawn *ret = cocos2d::Spawn::create(arg1, arg2, arg3, arg4, arg5, arg6, nullptr); + // @variadic static cocos2d::Spawn *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @addref(actions |) cocos2d::FiniteTimeAction *action1_$4, @addref(actions |) cocos2d::FiniteTimeAction *action1_$5, @addref(actions |) cocos2d::FiniteTimeAction *action1_$6) + cocos2d::Spawn *ret = cocos2d::Spawn::create(arg1, arg2, arg3, arg4, arg5, arg6, arg7, nullptr); int num_ret = olua_push_object(L, ret, "cc.Spawn"); // insert code after call @@ -3411,13 +3161,14 @@ static int _cocos2d_Spawn_create$8(lua_State *L) olua_addref(L, -1, "actions", 4, OLUA_REF_MULTI); olua_addref(L, -1, "actions", 5, OLUA_REF_MULTI); olua_addref(L, -1, "actions", 6, OLUA_REF_MULTI); + olua_addref(L, -1, "actions", 7, OLUA_REF_MULTI); olua_endinvoke(L); return num_ret; } -static int _cocos2d_Spawn_create$9(lua_State *L) +static int _olua_fun_cocos2d_Spawn_create$8(lua_State *L) { olua_startinvoke(L); @@ -3428,6 +3179,7 @@ static int _cocos2d_Spawn_create$9(lua_State *L) cocos2d::FiniteTimeAction *arg5 = nullptr; /** action1_$4 */ cocos2d::FiniteTimeAction *arg6 = nullptr; /** action1_$5 */ cocos2d::FiniteTimeAction *arg7 = nullptr; /** action1_$6 */ + cocos2d::FiniteTimeAction *arg8 = nullptr; /** action1_$7 */ olua_check_object(L, 1, &arg1, "cc.FiniteTimeAction"); olua_check_object(L, 2, &arg2, "cc.FiniteTimeAction"); @@ -3436,9 +3188,10 @@ static int _cocos2d_Spawn_create$9(lua_State *L) olua_check_object(L, 5, &arg5, "cc.FiniteTimeAction"); olua_check_object(L, 6, &arg6, "cc.FiniteTimeAction"); olua_check_object(L, 7, &arg7, "cc.FiniteTimeAction"); + olua_check_object(L, 8, &arg8, "cc.FiniteTimeAction"); - // @variadic static cocos2d::Spawn *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$4, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$5, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$6, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$7, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$8, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$9, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$10, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$11, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$12, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$13, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$14, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$15, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$16) - cocos2d::Spawn *ret = cocos2d::Spawn::create(arg1, arg2, arg3, arg4, arg5, arg6, arg7, nullptr); + // @variadic static cocos2d::Spawn *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @addref(actions |) cocos2d::FiniteTimeAction *action1_$4, @addref(actions |) cocos2d::FiniteTimeAction *action1_$5, @addref(actions |) cocos2d::FiniteTimeAction *action1_$6, @addref(actions |) cocos2d::FiniteTimeAction *action1_$7) + cocos2d::Spawn *ret = cocos2d::Spawn::create(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, nullptr); int num_ret = olua_push_object(L, ret, "cc.Spawn"); // insert code after call @@ -3449,13 +3202,14 @@ static int _cocos2d_Spawn_create$9(lua_State *L) olua_addref(L, -1, "actions", 5, OLUA_REF_MULTI); olua_addref(L, -1, "actions", 6, OLUA_REF_MULTI); olua_addref(L, -1, "actions", 7, OLUA_REF_MULTI); + olua_addref(L, -1, "actions", 8, OLUA_REF_MULTI); olua_endinvoke(L); return num_ret; } -static int _cocos2d_Spawn_create$10(lua_State *L) +static int _olua_fun_cocos2d_Spawn_create$9(lua_State *L) { olua_startinvoke(L); @@ -3467,6 +3221,7 @@ static int _cocos2d_Spawn_create$10(lua_State *L) cocos2d::FiniteTimeAction *arg6 = nullptr; /** action1_$5 */ cocos2d::FiniteTimeAction *arg7 = nullptr; /** action1_$6 */ cocos2d::FiniteTimeAction *arg8 = nullptr; /** action1_$7 */ + cocos2d::FiniteTimeAction *arg9 = nullptr; /** action1_$8 */ olua_check_object(L, 1, &arg1, "cc.FiniteTimeAction"); olua_check_object(L, 2, &arg2, "cc.FiniteTimeAction"); @@ -3476,9 +3231,10 @@ static int _cocos2d_Spawn_create$10(lua_State *L) olua_check_object(L, 6, &arg6, "cc.FiniteTimeAction"); olua_check_object(L, 7, &arg7, "cc.FiniteTimeAction"); olua_check_object(L, 8, &arg8, "cc.FiniteTimeAction"); + olua_check_object(L, 9, &arg9, "cc.FiniteTimeAction"); - // @variadic static cocos2d::Spawn *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$4, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$5, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$6, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$7, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$8, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$9, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$10, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$11, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$12, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$13, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$14, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$15, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$16) - cocos2d::Spawn *ret = cocos2d::Spawn::create(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, nullptr); + // @variadic static cocos2d::Spawn *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @addref(actions |) cocos2d::FiniteTimeAction *action1_$4, @addref(actions |) cocos2d::FiniteTimeAction *action1_$5, @addref(actions |) cocos2d::FiniteTimeAction *action1_$6, @addref(actions |) cocos2d::FiniteTimeAction *action1_$7, @addref(actions |) cocos2d::FiniteTimeAction *action1_$8) + cocos2d::Spawn *ret = cocos2d::Spawn::create(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, nullptr); int num_ret = olua_push_object(L, ret, "cc.Spawn"); // insert code after call @@ -3490,13 +3246,14 @@ static int _cocos2d_Spawn_create$10(lua_State *L) olua_addref(L, -1, "actions", 6, OLUA_REF_MULTI); olua_addref(L, -1, "actions", 7, OLUA_REF_MULTI); olua_addref(L, -1, "actions", 8, OLUA_REF_MULTI); + olua_addref(L, -1, "actions", 9, OLUA_REF_MULTI); olua_endinvoke(L); return num_ret; } -static int _cocos2d_Spawn_create$11(lua_State *L) +static int _olua_fun_cocos2d_Spawn_create$10(lua_State *L) { olua_startinvoke(L); @@ -3509,6 +3266,7 @@ static int _cocos2d_Spawn_create$11(lua_State *L) cocos2d::FiniteTimeAction *arg7 = nullptr; /** action1_$6 */ cocos2d::FiniteTimeAction *arg8 = nullptr; /** action1_$7 */ cocos2d::FiniteTimeAction *arg9 = nullptr; /** action1_$8 */ + cocos2d::FiniteTimeAction *arg10 = nullptr; /** action1_$9 */ olua_check_object(L, 1, &arg1, "cc.FiniteTimeAction"); olua_check_object(L, 2, &arg2, "cc.FiniteTimeAction"); @@ -3519,9 +3277,10 @@ static int _cocos2d_Spawn_create$11(lua_State *L) olua_check_object(L, 7, &arg7, "cc.FiniteTimeAction"); olua_check_object(L, 8, &arg8, "cc.FiniteTimeAction"); olua_check_object(L, 9, &arg9, "cc.FiniteTimeAction"); + olua_check_object(L, 10, &arg10, "cc.FiniteTimeAction"); - // @variadic static cocos2d::Spawn *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$4, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$5, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$6, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$7, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$8, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$9, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$10, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$11, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$12, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$13, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$14, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$15, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$16) - cocos2d::Spawn *ret = cocos2d::Spawn::create(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, nullptr); + // @variadic static cocos2d::Spawn *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @addref(actions |) cocos2d::FiniteTimeAction *action1_$4, @addref(actions |) cocos2d::FiniteTimeAction *action1_$5, @addref(actions |) cocos2d::FiniteTimeAction *action1_$6, @addref(actions |) cocos2d::FiniteTimeAction *action1_$7, @addref(actions |) cocos2d::FiniteTimeAction *action1_$8, @addref(actions |) cocos2d::FiniteTimeAction *action1_$9) + cocos2d::Spawn *ret = cocos2d::Spawn::create(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, nullptr); int num_ret = olua_push_object(L, ret, "cc.Spawn"); // insert code after call @@ -3534,13 +3293,14 @@ static int _cocos2d_Spawn_create$11(lua_State *L) olua_addref(L, -1, "actions", 7, OLUA_REF_MULTI); olua_addref(L, -1, "actions", 8, OLUA_REF_MULTI); olua_addref(L, -1, "actions", 9, OLUA_REF_MULTI); + olua_addref(L, -1, "actions", 10, OLUA_REF_MULTI); olua_endinvoke(L); return num_ret; } -static int _cocos2d_Spawn_create$12(lua_State *L) +static int _olua_fun_cocos2d_Spawn_create$11(lua_State *L) { olua_startinvoke(L); @@ -3554,6 +3314,7 @@ static int _cocos2d_Spawn_create$12(lua_State *L) cocos2d::FiniteTimeAction *arg8 = nullptr; /** action1_$7 */ cocos2d::FiniteTimeAction *arg9 = nullptr; /** action1_$8 */ cocos2d::FiniteTimeAction *arg10 = nullptr; /** action1_$9 */ + cocos2d::FiniteTimeAction *arg11 = nullptr; /** action1_$10 */ olua_check_object(L, 1, &arg1, "cc.FiniteTimeAction"); olua_check_object(L, 2, &arg2, "cc.FiniteTimeAction"); @@ -3565,9 +3326,10 @@ static int _cocos2d_Spawn_create$12(lua_State *L) olua_check_object(L, 8, &arg8, "cc.FiniteTimeAction"); olua_check_object(L, 9, &arg9, "cc.FiniteTimeAction"); olua_check_object(L, 10, &arg10, "cc.FiniteTimeAction"); + olua_check_object(L, 11, &arg11, "cc.FiniteTimeAction"); - // @variadic static cocos2d::Spawn *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$4, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$5, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$6, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$7, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$8, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$9, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$10, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$11, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$12, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$13, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$14, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$15, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$16) - cocos2d::Spawn *ret = cocos2d::Spawn::create(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, nullptr); + // @variadic static cocos2d::Spawn *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @addref(actions |) cocos2d::FiniteTimeAction *action1_$4, @addref(actions |) cocos2d::FiniteTimeAction *action1_$5, @addref(actions |) cocos2d::FiniteTimeAction *action1_$6, @addref(actions |) cocos2d::FiniteTimeAction *action1_$7, @addref(actions |) cocos2d::FiniteTimeAction *action1_$8, @addref(actions |) cocos2d::FiniteTimeAction *action1_$9, @addref(actions |) cocos2d::FiniteTimeAction *action1_$10) + cocos2d::Spawn *ret = cocos2d::Spawn::create(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, nullptr); int num_ret = olua_push_object(L, ret, "cc.Spawn"); // insert code after call @@ -3581,13 +3343,14 @@ static int _cocos2d_Spawn_create$12(lua_State *L) olua_addref(L, -1, "actions", 8, OLUA_REF_MULTI); olua_addref(L, -1, "actions", 9, OLUA_REF_MULTI); olua_addref(L, -1, "actions", 10, OLUA_REF_MULTI); + olua_addref(L, -1, "actions", 11, OLUA_REF_MULTI); olua_endinvoke(L); return num_ret; } -static int _cocos2d_Spawn_create$13(lua_State *L) +static int _olua_fun_cocos2d_Spawn_create$12(lua_State *L) { olua_startinvoke(L); @@ -3602,6 +3365,7 @@ static int _cocos2d_Spawn_create$13(lua_State *L) cocos2d::FiniteTimeAction *arg9 = nullptr; /** action1_$8 */ cocos2d::FiniteTimeAction *arg10 = nullptr; /** action1_$9 */ cocos2d::FiniteTimeAction *arg11 = nullptr; /** action1_$10 */ + cocos2d::FiniteTimeAction *arg12 = nullptr; /** action1_$11 */ olua_check_object(L, 1, &arg1, "cc.FiniteTimeAction"); olua_check_object(L, 2, &arg2, "cc.FiniteTimeAction"); @@ -3614,9 +3378,10 @@ static int _cocos2d_Spawn_create$13(lua_State *L) olua_check_object(L, 9, &arg9, "cc.FiniteTimeAction"); olua_check_object(L, 10, &arg10, "cc.FiniteTimeAction"); olua_check_object(L, 11, &arg11, "cc.FiniteTimeAction"); + olua_check_object(L, 12, &arg12, "cc.FiniteTimeAction"); - // @variadic static cocos2d::Spawn *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$4, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$5, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$6, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$7, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$8, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$9, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$10, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$11, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$12, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$13, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$14, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$15, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$16) - cocos2d::Spawn *ret = cocos2d::Spawn::create(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, nullptr); + // @variadic static cocos2d::Spawn *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @addref(actions |) cocos2d::FiniteTimeAction *action1_$4, @addref(actions |) cocos2d::FiniteTimeAction *action1_$5, @addref(actions |) cocos2d::FiniteTimeAction *action1_$6, @addref(actions |) cocos2d::FiniteTimeAction *action1_$7, @addref(actions |) cocos2d::FiniteTimeAction *action1_$8, @addref(actions |) cocos2d::FiniteTimeAction *action1_$9, @addref(actions |) cocos2d::FiniteTimeAction *action1_$10, @addref(actions |) cocos2d::FiniteTimeAction *action1_$11) + cocos2d::Spawn *ret = cocos2d::Spawn::create(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, nullptr); int num_ret = olua_push_object(L, ret, "cc.Spawn"); // insert code after call @@ -3631,13 +3396,14 @@ static int _cocos2d_Spawn_create$13(lua_State *L) olua_addref(L, -1, "actions", 9, OLUA_REF_MULTI); olua_addref(L, -1, "actions", 10, OLUA_REF_MULTI); olua_addref(L, -1, "actions", 11, OLUA_REF_MULTI); + olua_addref(L, -1, "actions", 12, OLUA_REF_MULTI); olua_endinvoke(L); return num_ret; } -static int _cocos2d_Spawn_create$14(lua_State *L) +static int _olua_fun_cocos2d_Spawn_create$13(lua_State *L) { olua_startinvoke(L); @@ -3653,6 +3419,7 @@ static int _cocos2d_Spawn_create$14(lua_State *L) cocos2d::FiniteTimeAction *arg10 = nullptr; /** action1_$9 */ cocos2d::FiniteTimeAction *arg11 = nullptr; /** action1_$10 */ cocos2d::FiniteTimeAction *arg12 = nullptr; /** action1_$11 */ + cocos2d::FiniteTimeAction *arg13 = nullptr; /** action1_$12 */ olua_check_object(L, 1, &arg1, "cc.FiniteTimeAction"); olua_check_object(L, 2, &arg2, "cc.FiniteTimeAction"); @@ -3666,9 +3433,10 @@ static int _cocos2d_Spawn_create$14(lua_State *L) olua_check_object(L, 10, &arg10, "cc.FiniteTimeAction"); olua_check_object(L, 11, &arg11, "cc.FiniteTimeAction"); olua_check_object(L, 12, &arg12, "cc.FiniteTimeAction"); + olua_check_object(L, 13, &arg13, "cc.FiniteTimeAction"); - // @variadic static cocos2d::Spawn *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$4, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$5, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$6, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$7, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$8, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$9, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$10, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$11, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$12, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$13, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$14, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$15, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$16) - cocos2d::Spawn *ret = cocos2d::Spawn::create(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, nullptr); + // @variadic static cocos2d::Spawn *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @addref(actions |) cocos2d::FiniteTimeAction *action1_$4, @addref(actions |) cocos2d::FiniteTimeAction *action1_$5, @addref(actions |) cocos2d::FiniteTimeAction *action1_$6, @addref(actions |) cocos2d::FiniteTimeAction *action1_$7, @addref(actions |) cocos2d::FiniteTimeAction *action1_$8, @addref(actions |) cocos2d::FiniteTimeAction *action1_$9, @addref(actions |) cocos2d::FiniteTimeAction *action1_$10, @addref(actions |) cocos2d::FiniteTimeAction *action1_$11, @addref(actions |) cocos2d::FiniteTimeAction *action1_$12) + cocos2d::Spawn *ret = cocos2d::Spawn::create(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, nullptr); int num_ret = olua_push_object(L, ret, "cc.Spawn"); // insert code after call @@ -3684,13 +3452,14 @@ static int _cocos2d_Spawn_create$14(lua_State *L) olua_addref(L, -1, "actions", 10, OLUA_REF_MULTI); olua_addref(L, -1, "actions", 11, OLUA_REF_MULTI); olua_addref(L, -1, "actions", 12, OLUA_REF_MULTI); + olua_addref(L, -1, "actions", 13, OLUA_REF_MULTI); olua_endinvoke(L); return num_ret; } -static int _cocos2d_Spawn_create$15(lua_State *L) +static int _olua_fun_cocos2d_Spawn_create$14(lua_State *L) { olua_startinvoke(L); @@ -3707,6 +3476,7 @@ static int _cocos2d_Spawn_create$15(lua_State *L) cocos2d::FiniteTimeAction *arg11 = nullptr; /** action1_$10 */ cocos2d::FiniteTimeAction *arg12 = nullptr; /** action1_$11 */ cocos2d::FiniteTimeAction *arg13 = nullptr; /** action1_$12 */ + cocos2d::FiniteTimeAction *arg14 = nullptr; /** action1_$13 */ olua_check_object(L, 1, &arg1, "cc.FiniteTimeAction"); olua_check_object(L, 2, &arg2, "cc.FiniteTimeAction"); @@ -3721,9 +3491,10 @@ static int _cocos2d_Spawn_create$15(lua_State *L) olua_check_object(L, 11, &arg11, "cc.FiniteTimeAction"); olua_check_object(L, 12, &arg12, "cc.FiniteTimeAction"); olua_check_object(L, 13, &arg13, "cc.FiniteTimeAction"); + olua_check_object(L, 14, &arg14, "cc.FiniteTimeAction"); - // @variadic static cocos2d::Spawn *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$4, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$5, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$6, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$7, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$8, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$9, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$10, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$11, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$12, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$13, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$14, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$15, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$16) - cocos2d::Spawn *ret = cocos2d::Spawn::create(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, nullptr); + // @variadic static cocos2d::Spawn *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @addref(actions |) cocos2d::FiniteTimeAction *action1_$4, @addref(actions |) cocos2d::FiniteTimeAction *action1_$5, @addref(actions |) cocos2d::FiniteTimeAction *action1_$6, @addref(actions |) cocos2d::FiniteTimeAction *action1_$7, @addref(actions |) cocos2d::FiniteTimeAction *action1_$8, @addref(actions |) cocos2d::FiniteTimeAction *action1_$9, @addref(actions |) cocos2d::FiniteTimeAction *action1_$10, @addref(actions |) cocos2d::FiniteTimeAction *action1_$11, @addref(actions |) cocos2d::FiniteTimeAction *action1_$12, @addref(actions |) cocos2d::FiniteTimeAction *action1_$13) + cocos2d::Spawn *ret = cocos2d::Spawn::create(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, nullptr); int num_ret = olua_push_object(L, ret, "cc.Spawn"); // insert code after call @@ -3740,13 +3511,14 @@ static int _cocos2d_Spawn_create$15(lua_State *L) olua_addref(L, -1, "actions", 11, OLUA_REF_MULTI); olua_addref(L, -1, "actions", 12, OLUA_REF_MULTI); olua_addref(L, -1, "actions", 13, OLUA_REF_MULTI); + olua_addref(L, -1, "actions", 14, OLUA_REF_MULTI); olua_endinvoke(L); return num_ret; } -static int _cocos2d_Spawn_create$16(lua_State *L) +static int _olua_fun_cocos2d_Spawn_create$15(lua_State *L) { olua_startinvoke(L); @@ -3764,6 +3536,7 @@ static int _cocos2d_Spawn_create$16(lua_State *L) cocos2d::FiniteTimeAction *arg12 = nullptr; /** action1_$11 */ cocos2d::FiniteTimeAction *arg13 = nullptr; /** action1_$12 */ cocos2d::FiniteTimeAction *arg14 = nullptr; /** action1_$13 */ + cocos2d::FiniteTimeAction *arg15 = nullptr; /** action1_$14 */ olua_check_object(L, 1, &arg1, "cc.FiniteTimeAction"); olua_check_object(L, 2, &arg2, "cc.FiniteTimeAction"); @@ -3779,9 +3552,10 @@ static int _cocos2d_Spawn_create$16(lua_State *L) olua_check_object(L, 12, &arg12, "cc.FiniteTimeAction"); olua_check_object(L, 13, &arg13, "cc.FiniteTimeAction"); olua_check_object(L, 14, &arg14, "cc.FiniteTimeAction"); + olua_check_object(L, 15, &arg15, "cc.FiniteTimeAction"); - // @variadic static cocos2d::Spawn *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$4, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$5, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$6, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$7, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$8, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$9, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$10, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$11, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$12, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$13, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$14, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$15, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$16) - cocos2d::Spawn *ret = cocos2d::Spawn::create(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, nullptr); + // @variadic static cocos2d::Spawn *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @addref(actions |) cocos2d::FiniteTimeAction *action1_$4, @addref(actions |) cocos2d::FiniteTimeAction *action1_$5, @addref(actions |) cocos2d::FiniteTimeAction *action1_$6, @addref(actions |) cocos2d::FiniteTimeAction *action1_$7, @addref(actions |) cocos2d::FiniteTimeAction *action1_$8, @addref(actions |) cocos2d::FiniteTimeAction *action1_$9, @addref(actions |) cocos2d::FiniteTimeAction *action1_$10, @addref(actions |) cocos2d::FiniteTimeAction *action1_$11, @addref(actions |) cocos2d::FiniteTimeAction *action1_$12, @addref(actions |) cocos2d::FiniteTimeAction *action1_$13, @addref(actions |) cocos2d::FiniteTimeAction *action1_$14) + cocos2d::Spawn *ret = cocos2d::Spawn::create(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, nullptr); int num_ret = olua_push_object(L, ret, "cc.Spawn"); // insert code after call @@ -3799,13 +3573,14 @@ static int _cocos2d_Spawn_create$16(lua_State *L) olua_addref(L, -1, "actions", 12, OLUA_REF_MULTI); olua_addref(L, -1, "actions", 13, OLUA_REF_MULTI); olua_addref(L, -1, "actions", 14, OLUA_REF_MULTI); + olua_addref(L, -1, "actions", 15, OLUA_REF_MULTI); olua_endinvoke(L); return num_ret; } -static int _cocos2d_Spawn_create$17(lua_State *L) +static int _olua_fun_cocos2d_Spawn_create$16(lua_State *L) { olua_startinvoke(L); @@ -3824,6 +3599,7 @@ static int _cocos2d_Spawn_create$17(lua_State *L) cocos2d::FiniteTimeAction *arg13 = nullptr; /** action1_$12 */ cocos2d::FiniteTimeAction *arg14 = nullptr; /** action1_$13 */ cocos2d::FiniteTimeAction *arg15 = nullptr; /** action1_$14 */ + cocos2d::FiniteTimeAction *arg16 = nullptr; /** action1_$15 */ olua_check_object(L, 1, &arg1, "cc.FiniteTimeAction"); olua_check_object(L, 2, &arg2, "cc.FiniteTimeAction"); @@ -3840,9 +3616,10 @@ static int _cocos2d_Spawn_create$17(lua_State *L) olua_check_object(L, 13, &arg13, "cc.FiniteTimeAction"); olua_check_object(L, 14, &arg14, "cc.FiniteTimeAction"); olua_check_object(L, 15, &arg15, "cc.FiniteTimeAction"); + olua_check_object(L, 16, &arg16, "cc.FiniteTimeAction"); - // @variadic static cocos2d::Spawn *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$4, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$5, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$6, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$7, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$8, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$9, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$10, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$11, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$12, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$13, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$14, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$15, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$16) - cocos2d::Spawn *ret = cocos2d::Spawn::create(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, nullptr); + // @variadic static cocos2d::Spawn *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @addref(actions |) cocos2d::FiniteTimeAction *action1_$4, @addref(actions |) cocos2d::FiniteTimeAction *action1_$5, @addref(actions |) cocos2d::FiniteTimeAction *action1_$6, @addref(actions |) cocos2d::FiniteTimeAction *action1_$7, @addref(actions |) cocos2d::FiniteTimeAction *action1_$8, @addref(actions |) cocos2d::FiniteTimeAction *action1_$9, @addref(actions |) cocos2d::FiniteTimeAction *action1_$10, @addref(actions |) cocos2d::FiniteTimeAction *action1_$11, @addref(actions |) cocos2d::FiniteTimeAction *action1_$12, @addref(actions |) cocos2d::FiniteTimeAction *action1_$13, @addref(actions |) cocos2d::FiniteTimeAction *action1_$14, @addref(actions |) cocos2d::FiniteTimeAction *action1_$15) + cocos2d::Spawn *ret = cocos2d::Spawn::create(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, nullptr); int num_ret = olua_push_object(L, ret, "cc.Spawn"); // insert code after call @@ -3861,13 +3638,14 @@ static int _cocos2d_Spawn_create$17(lua_State *L) olua_addref(L, -1, "actions", 13, OLUA_REF_MULTI); olua_addref(L, -1, "actions", 14, OLUA_REF_MULTI); olua_addref(L, -1, "actions", 15, OLUA_REF_MULTI); + olua_addref(L, -1, "actions", 16, OLUA_REF_MULTI); olua_endinvoke(L); return num_ret; } -static int _cocos2d_Spawn_create$18(lua_State *L) +static int _olua_fun_cocos2d_Spawn_create$17(lua_State *L) { olua_startinvoke(L); @@ -3887,6 +3665,7 @@ static int _cocos2d_Spawn_create$18(lua_State *L) cocos2d::FiniteTimeAction *arg14 = nullptr; /** action1_$13 */ cocos2d::FiniteTimeAction *arg15 = nullptr; /** action1_$14 */ cocos2d::FiniteTimeAction *arg16 = nullptr; /** action1_$15 */ + cocos2d::FiniteTimeAction *arg17 = nullptr; /** action1_$16 */ olua_check_object(L, 1, &arg1, "cc.FiniteTimeAction"); olua_check_object(L, 2, &arg2, "cc.FiniteTimeAction"); @@ -3904,9 +3683,10 @@ static int _cocos2d_Spawn_create$18(lua_State *L) olua_check_object(L, 14, &arg14, "cc.FiniteTimeAction"); olua_check_object(L, 15, &arg15, "cc.FiniteTimeAction"); olua_check_object(L, 16, &arg16, "cc.FiniteTimeAction"); + olua_check_object(L, 17, &arg17, "cc.FiniteTimeAction"); - // @variadic static cocos2d::Spawn *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$4, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$5, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$6, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$7, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$8, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$9, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$10, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$11, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$12, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$13, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$14, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$15, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$16) - cocos2d::Spawn *ret = cocos2d::Spawn::create(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, nullptr); + // @variadic static cocos2d::Spawn *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @addref(actions |) cocos2d::FiniteTimeAction *action1_$4, @addref(actions |) cocos2d::FiniteTimeAction *action1_$5, @addref(actions |) cocos2d::FiniteTimeAction *action1_$6, @addref(actions |) cocos2d::FiniteTimeAction *action1_$7, @addref(actions |) cocos2d::FiniteTimeAction *action1_$8, @addref(actions |) cocos2d::FiniteTimeAction *action1_$9, @addref(actions |) cocos2d::FiniteTimeAction *action1_$10, @addref(actions |) cocos2d::FiniteTimeAction *action1_$11, @addref(actions |) cocos2d::FiniteTimeAction *action1_$12, @addref(actions |) cocos2d::FiniteTimeAction *action1_$13, @addref(actions |) cocos2d::FiniteTimeAction *action1_$14, @addref(actions |) cocos2d::FiniteTimeAction *action1_$15, @addref(actions |) cocos2d::FiniteTimeAction *action1_$16) + cocos2d::Spawn *ret = cocos2d::Spawn::create(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17, nullptr); int num_ret = olua_push_object(L, ret, "cc.Spawn"); // insert code after call @@ -3926,137 +3706,160 @@ static int _cocos2d_Spawn_create$18(lua_State *L) olua_addref(L, -1, "actions", 14, OLUA_REF_MULTI); olua_addref(L, -1, "actions", 15, OLUA_REF_MULTI); olua_addref(L, -1, "actions", 16, OLUA_REF_MULTI); + olua_addref(L, -1, "actions", 17, OLUA_REF_MULTI); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_cocos2d_Spawn_create$18(lua_State *L) +{ + olua_startinvoke(L); + + cocos2d::Vector arg1; /** arrayOfActions */ + + olua_check_array(L, 1, arg1, [L](cocos2d::FiniteTimeAction **arg1) { + olua_check_object(L, -1, arg1, "cc.FiniteTimeAction"); + }); + + // static cocos2d::Spawn *create(@addref(actions |) const cocos2d::Vector &arrayOfActions) + cocos2d::Spawn *ret = cocos2d::Spawn::create(arg1); + int num_ret = olua_push_object(L, ret, "cc.Spawn"); + + // insert code after call + olua_addref(L, -1, "actions", 1, OLUA_REF_MULTI | OLUA_REF_TABLE); olua_endinvoke(L); return num_ret; } -static int _cocos2d_Spawn_create(lua_State *L) +static int _olua_fun_cocos2d_Spawn_create(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 1) { - if ((olua_is_array(L, 1))) { - // static cocos2d::Spawn *create(@addref(actions |) const cocos2d::Vector &arrayOfActions) - return _cocos2d_Spawn_create$2(L); + if ((olua_is_object(L, 1, "cc.FiniteTimeAction"))) { + // @variadic static cocos2d::Spawn *create(@addref(actions |) cocos2d::FiniteTimeAction *action1) + return _olua_fun_cocos2d_Spawn_create$1(L); } - // if ((olua_is_object(L, 1, "cc.FiniteTimeAction"))) { - // @variadic static cocos2d::Spawn *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$4, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$5, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$6, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$7, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$8, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$9, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$10, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$11, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$12, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$13, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$14, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$15, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$16) - return _cocos2d_Spawn_create$3(L); + // if ((olua_is_array(L, 1))) { + // static cocos2d::Spawn *create(@addref(actions |) const cocos2d::Vector &arrayOfActions) + return _olua_fun_cocos2d_Spawn_create$18(L); // } } if (num_args == 2) { // if ((olua_is_object(L, 1, "cc.FiniteTimeAction")) && (olua_is_object(L, 2, "cc.FiniteTimeAction"))) { - // @variadic static cocos2d::Spawn *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$4, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$5, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$6, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$7, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$8, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$9, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$10, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$11, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$12, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$13, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$14, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$15, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$16) - return _cocos2d_Spawn_create$4(L); + // @variadic static cocos2d::Spawn *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$1) + return _olua_fun_cocos2d_Spawn_create$2(L); // } } if (num_args == 3) { // if ((olua_is_object(L, 1, "cc.FiniteTimeAction")) && (olua_is_object(L, 2, "cc.FiniteTimeAction")) && (olua_is_object(L, 3, "cc.FiniteTimeAction"))) { - // @variadic static cocos2d::Spawn *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$4, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$5, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$6, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$7, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$8, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$9, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$10, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$11, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$12, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$13, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$14, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$15, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$16) - return _cocos2d_Spawn_create$5(L); + // @variadic static cocos2d::Spawn *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$2) + return _olua_fun_cocos2d_Spawn_create$3(L); // } } if (num_args == 4) { // if ((olua_is_object(L, 1, "cc.FiniteTimeAction")) && (olua_is_object(L, 2, "cc.FiniteTimeAction")) && (olua_is_object(L, 3, "cc.FiniteTimeAction")) && (olua_is_object(L, 4, "cc.FiniteTimeAction"))) { - // @variadic static cocos2d::Spawn *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$4, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$5, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$6, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$7, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$8, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$9, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$10, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$11, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$12, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$13, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$14, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$15, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$16) - return _cocos2d_Spawn_create$6(L); + // @variadic static cocos2d::Spawn *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @addref(actions |) cocos2d::FiniteTimeAction *action1_$3) + return _olua_fun_cocos2d_Spawn_create$4(L); // } } if (num_args == 5) { // if ((olua_is_object(L, 1, "cc.FiniteTimeAction")) && (olua_is_object(L, 2, "cc.FiniteTimeAction")) && (olua_is_object(L, 3, "cc.FiniteTimeAction")) && (olua_is_object(L, 4, "cc.FiniteTimeAction")) && (olua_is_object(L, 5, "cc.FiniteTimeAction"))) { - // @variadic static cocos2d::Spawn *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$4, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$5, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$6, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$7, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$8, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$9, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$10, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$11, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$12, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$13, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$14, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$15, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$16) - return _cocos2d_Spawn_create$7(L); + // @variadic static cocos2d::Spawn *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @addref(actions |) cocos2d::FiniteTimeAction *action1_$4) + return _olua_fun_cocos2d_Spawn_create$5(L); // } } if (num_args == 6) { // if ((olua_is_object(L, 1, "cc.FiniteTimeAction")) && (olua_is_object(L, 2, "cc.FiniteTimeAction")) && (olua_is_object(L, 3, "cc.FiniteTimeAction")) && (olua_is_object(L, 4, "cc.FiniteTimeAction")) && (olua_is_object(L, 5, "cc.FiniteTimeAction")) && (olua_is_object(L, 6, "cc.FiniteTimeAction"))) { - // @variadic static cocos2d::Spawn *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$4, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$5, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$6, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$7, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$8, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$9, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$10, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$11, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$12, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$13, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$14, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$15, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$16) - return _cocos2d_Spawn_create$8(L); + // @variadic static cocos2d::Spawn *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @addref(actions |) cocos2d::FiniteTimeAction *action1_$4, @addref(actions |) cocos2d::FiniteTimeAction *action1_$5) + return _olua_fun_cocos2d_Spawn_create$6(L); // } } if (num_args == 7) { // if ((olua_is_object(L, 1, "cc.FiniteTimeAction")) && (olua_is_object(L, 2, "cc.FiniteTimeAction")) && (olua_is_object(L, 3, "cc.FiniteTimeAction")) && (olua_is_object(L, 4, "cc.FiniteTimeAction")) && (olua_is_object(L, 5, "cc.FiniteTimeAction")) && (olua_is_object(L, 6, "cc.FiniteTimeAction")) && (olua_is_object(L, 7, "cc.FiniteTimeAction"))) { - // @variadic static cocos2d::Spawn *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$4, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$5, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$6, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$7, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$8, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$9, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$10, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$11, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$12, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$13, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$14, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$15, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$16) - return _cocos2d_Spawn_create$9(L); + // @variadic static cocos2d::Spawn *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @addref(actions |) cocos2d::FiniteTimeAction *action1_$4, @addref(actions |) cocos2d::FiniteTimeAction *action1_$5, @addref(actions |) cocos2d::FiniteTimeAction *action1_$6) + return _olua_fun_cocos2d_Spawn_create$7(L); // } } if (num_args == 8) { // if ((olua_is_object(L, 1, "cc.FiniteTimeAction")) && (olua_is_object(L, 2, "cc.FiniteTimeAction")) && (olua_is_object(L, 3, "cc.FiniteTimeAction")) && (olua_is_object(L, 4, "cc.FiniteTimeAction")) && (olua_is_object(L, 5, "cc.FiniteTimeAction")) && (olua_is_object(L, 6, "cc.FiniteTimeAction")) && (olua_is_object(L, 7, "cc.FiniteTimeAction")) && (olua_is_object(L, 8, "cc.FiniteTimeAction"))) { - // @variadic static cocos2d::Spawn *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$4, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$5, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$6, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$7, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$8, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$9, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$10, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$11, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$12, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$13, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$14, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$15, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$16) - return _cocos2d_Spawn_create$10(L); + // @variadic static cocos2d::Spawn *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @addref(actions |) cocos2d::FiniteTimeAction *action1_$4, @addref(actions |) cocos2d::FiniteTimeAction *action1_$5, @addref(actions |) cocos2d::FiniteTimeAction *action1_$6, @addref(actions |) cocos2d::FiniteTimeAction *action1_$7) + return _olua_fun_cocos2d_Spawn_create$8(L); // } } if (num_args == 9) { // if ((olua_is_object(L, 1, "cc.FiniteTimeAction")) && (olua_is_object(L, 2, "cc.FiniteTimeAction")) && (olua_is_object(L, 3, "cc.FiniteTimeAction")) && (olua_is_object(L, 4, "cc.FiniteTimeAction")) && (olua_is_object(L, 5, "cc.FiniteTimeAction")) && (olua_is_object(L, 6, "cc.FiniteTimeAction")) && (olua_is_object(L, 7, "cc.FiniteTimeAction")) && (olua_is_object(L, 8, "cc.FiniteTimeAction")) && (olua_is_object(L, 9, "cc.FiniteTimeAction"))) { - // @variadic static cocos2d::Spawn *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$4, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$5, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$6, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$7, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$8, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$9, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$10, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$11, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$12, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$13, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$14, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$15, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$16) - return _cocos2d_Spawn_create$11(L); + // @variadic static cocos2d::Spawn *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @addref(actions |) cocos2d::FiniteTimeAction *action1_$4, @addref(actions |) cocos2d::FiniteTimeAction *action1_$5, @addref(actions |) cocos2d::FiniteTimeAction *action1_$6, @addref(actions |) cocos2d::FiniteTimeAction *action1_$7, @addref(actions |) cocos2d::FiniteTimeAction *action1_$8) + return _olua_fun_cocos2d_Spawn_create$9(L); // } } if (num_args == 10) { // if ((olua_is_object(L, 1, "cc.FiniteTimeAction")) && (olua_is_object(L, 2, "cc.FiniteTimeAction")) && (olua_is_object(L, 3, "cc.FiniteTimeAction")) && (olua_is_object(L, 4, "cc.FiniteTimeAction")) && (olua_is_object(L, 5, "cc.FiniteTimeAction")) && (olua_is_object(L, 6, "cc.FiniteTimeAction")) && (olua_is_object(L, 7, "cc.FiniteTimeAction")) && (olua_is_object(L, 8, "cc.FiniteTimeAction")) && (olua_is_object(L, 9, "cc.FiniteTimeAction")) && (olua_is_object(L, 10, "cc.FiniteTimeAction"))) { - // @variadic static cocos2d::Spawn *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$4, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$5, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$6, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$7, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$8, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$9, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$10, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$11, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$12, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$13, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$14, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$15, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$16) - return _cocos2d_Spawn_create$12(L); + // @variadic static cocos2d::Spawn *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @addref(actions |) cocos2d::FiniteTimeAction *action1_$4, @addref(actions |) cocos2d::FiniteTimeAction *action1_$5, @addref(actions |) cocos2d::FiniteTimeAction *action1_$6, @addref(actions |) cocos2d::FiniteTimeAction *action1_$7, @addref(actions |) cocos2d::FiniteTimeAction *action1_$8, @addref(actions |) cocos2d::FiniteTimeAction *action1_$9) + return _olua_fun_cocos2d_Spawn_create$10(L); // } } if (num_args == 11) { // if ((olua_is_object(L, 1, "cc.FiniteTimeAction")) && (olua_is_object(L, 2, "cc.FiniteTimeAction")) && (olua_is_object(L, 3, "cc.FiniteTimeAction")) && (olua_is_object(L, 4, "cc.FiniteTimeAction")) && (olua_is_object(L, 5, "cc.FiniteTimeAction")) && (olua_is_object(L, 6, "cc.FiniteTimeAction")) && (olua_is_object(L, 7, "cc.FiniteTimeAction")) && (olua_is_object(L, 8, "cc.FiniteTimeAction")) && (olua_is_object(L, 9, "cc.FiniteTimeAction")) && (olua_is_object(L, 10, "cc.FiniteTimeAction")) && (olua_is_object(L, 11, "cc.FiniteTimeAction"))) { - // @variadic static cocos2d::Spawn *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$4, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$5, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$6, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$7, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$8, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$9, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$10, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$11, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$12, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$13, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$14, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$15, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$16) - return _cocos2d_Spawn_create$13(L); + // @variadic static cocos2d::Spawn *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @addref(actions |) cocos2d::FiniteTimeAction *action1_$4, @addref(actions |) cocos2d::FiniteTimeAction *action1_$5, @addref(actions |) cocos2d::FiniteTimeAction *action1_$6, @addref(actions |) cocos2d::FiniteTimeAction *action1_$7, @addref(actions |) cocos2d::FiniteTimeAction *action1_$8, @addref(actions |) cocos2d::FiniteTimeAction *action1_$9, @addref(actions |) cocos2d::FiniteTimeAction *action1_$10) + return _olua_fun_cocos2d_Spawn_create$11(L); // } } if (num_args == 12) { // if ((olua_is_object(L, 1, "cc.FiniteTimeAction")) && (olua_is_object(L, 2, "cc.FiniteTimeAction")) && (olua_is_object(L, 3, "cc.FiniteTimeAction")) && (olua_is_object(L, 4, "cc.FiniteTimeAction")) && (olua_is_object(L, 5, "cc.FiniteTimeAction")) && (olua_is_object(L, 6, "cc.FiniteTimeAction")) && (olua_is_object(L, 7, "cc.FiniteTimeAction")) && (olua_is_object(L, 8, "cc.FiniteTimeAction")) && (olua_is_object(L, 9, "cc.FiniteTimeAction")) && (olua_is_object(L, 10, "cc.FiniteTimeAction")) && (olua_is_object(L, 11, "cc.FiniteTimeAction")) && (olua_is_object(L, 12, "cc.FiniteTimeAction"))) { - // @variadic static cocos2d::Spawn *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$4, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$5, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$6, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$7, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$8, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$9, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$10, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$11, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$12, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$13, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$14, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$15, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$16) - return _cocos2d_Spawn_create$14(L); + // @variadic static cocos2d::Spawn *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @addref(actions |) cocos2d::FiniteTimeAction *action1_$4, @addref(actions |) cocos2d::FiniteTimeAction *action1_$5, @addref(actions |) cocos2d::FiniteTimeAction *action1_$6, @addref(actions |) cocos2d::FiniteTimeAction *action1_$7, @addref(actions |) cocos2d::FiniteTimeAction *action1_$8, @addref(actions |) cocos2d::FiniteTimeAction *action1_$9, @addref(actions |) cocos2d::FiniteTimeAction *action1_$10, @addref(actions |) cocos2d::FiniteTimeAction *action1_$11) + return _olua_fun_cocos2d_Spawn_create$12(L); // } } if (num_args == 13) { // if ((olua_is_object(L, 1, "cc.FiniteTimeAction")) && (olua_is_object(L, 2, "cc.FiniteTimeAction")) && (olua_is_object(L, 3, "cc.FiniteTimeAction")) && (olua_is_object(L, 4, "cc.FiniteTimeAction")) && (olua_is_object(L, 5, "cc.FiniteTimeAction")) && (olua_is_object(L, 6, "cc.FiniteTimeAction")) && (olua_is_object(L, 7, "cc.FiniteTimeAction")) && (olua_is_object(L, 8, "cc.FiniteTimeAction")) && (olua_is_object(L, 9, "cc.FiniteTimeAction")) && (olua_is_object(L, 10, "cc.FiniteTimeAction")) && (olua_is_object(L, 11, "cc.FiniteTimeAction")) && (olua_is_object(L, 12, "cc.FiniteTimeAction")) && (olua_is_object(L, 13, "cc.FiniteTimeAction"))) { - // @variadic static cocos2d::Spawn *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$4, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$5, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$6, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$7, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$8, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$9, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$10, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$11, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$12, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$13, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$14, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$15, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$16) - return _cocos2d_Spawn_create$15(L); + // @variadic static cocos2d::Spawn *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @addref(actions |) cocos2d::FiniteTimeAction *action1_$4, @addref(actions |) cocos2d::FiniteTimeAction *action1_$5, @addref(actions |) cocos2d::FiniteTimeAction *action1_$6, @addref(actions |) cocos2d::FiniteTimeAction *action1_$7, @addref(actions |) cocos2d::FiniteTimeAction *action1_$8, @addref(actions |) cocos2d::FiniteTimeAction *action1_$9, @addref(actions |) cocos2d::FiniteTimeAction *action1_$10, @addref(actions |) cocos2d::FiniteTimeAction *action1_$11, @addref(actions |) cocos2d::FiniteTimeAction *action1_$12) + return _olua_fun_cocos2d_Spawn_create$13(L); // } } if (num_args == 14) { // if ((olua_is_object(L, 1, "cc.FiniteTimeAction")) && (olua_is_object(L, 2, "cc.FiniteTimeAction")) && (olua_is_object(L, 3, "cc.FiniteTimeAction")) && (olua_is_object(L, 4, "cc.FiniteTimeAction")) && (olua_is_object(L, 5, "cc.FiniteTimeAction")) && (olua_is_object(L, 6, "cc.FiniteTimeAction")) && (olua_is_object(L, 7, "cc.FiniteTimeAction")) && (olua_is_object(L, 8, "cc.FiniteTimeAction")) && (olua_is_object(L, 9, "cc.FiniteTimeAction")) && (olua_is_object(L, 10, "cc.FiniteTimeAction")) && (olua_is_object(L, 11, "cc.FiniteTimeAction")) && (olua_is_object(L, 12, "cc.FiniteTimeAction")) && (olua_is_object(L, 13, "cc.FiniteTimeAction")) && (olua_is_object(L, 14, "cc.FiniteTimeAction"))) { - // @variadic static cocos2d::Spawn *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$4, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$5, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$6, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$7, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$8, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$9, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$10, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$11, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$12, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$13, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$14, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$15, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$16) - return _cocos2d_Spawn_create$16(L); + // @variadic static cocos2d::Spawn *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @addref(actions |) cocos2d::FiniteTimeAction *action1_$4, @addref(actions |) cocos2d::FiniteTimeAction *action1_$5, @addref(actions |) cocos2d::FiniteTimeAction *action1_$6, @addref(actions |) cocos2d::FiniteTimeAction *action1_$7, @addref(actions |) cocos2d::FiniteTimeAction *action1_$8, @addref(actions |) cocos2d::FiniteTimeAction *action1_$9, @addref(actions |) cocos2d::FiniteTimeAction *action1_$10, @addref(actions |) cocos2d::FiniteTimeAction *action1_$11, @addref(actions |) cocos2d::FiniteTimeAction *action1_$12, @addref(actions |) cocos2d::FiniteTimeAction *action1_$13) + return _olua_fun_cocos2d_Spawn_create$14(L); // } } if (num_args == 15) { // if ((olua_is_object(L, 1, "cc.FiniteTimeAction")) && (olua_is_object(L, 2, "cc.FiniteTimeAction")) && (olua_is_object(L, 3, "cc.FiniteTimeAction")) && (olua_is_object(L, 4, "cc.FiniteTimeAction")) && (olua_is_object(L, 5, "cc.FiniteTimeAction")) && (olua_is_object(L, 6, "cc.FiniteTimeAction")) && (olua_is_object(L, 7, "cc.FiniteTimeAction")) && (olua_is_object(L, 8, "cc.FiniteTimeAction")) && (olua_is_object(L, 9, "cc.FiniteTimeAction")) && (olua_is_object(L, 10, "cc.FiniteTimeAction")) && (olua_is_object(L, 11, "cc.FiniteTimeAction")) && (olua_is_object(L, 12, "cc.FiniteTimeAction")) && (olua_is_object(L, 13, "cc.FiniteTimeAction")) && (olua_is_object(L, 14, "cc.FiniteTimeAction")) && (olua_is_object(L, 15, "cc.FiniteTimeAction"))) { - // @variadic static cocos2d::Spawn *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$4, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$5, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$6, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$7, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$8, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$9, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$10, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$11, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$12, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$13, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$14, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$15, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$16) - return _cocos2d_Spawn_create$17(L); + // @variadic static cocos2d::Spawn *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @addref(actions |) cocos2d::FiniteTimeAction *action1_$4, @addref(actions |) cocos2d::FiniteTimeAction *action1_$5, @addref(actions |) cocos2d::FiniteTimeAction *action1_$6, @addref(actions |) cocos2d::FiniteTimeAction *action1_$7, @addref(actions |) cocos2d::FiniteTimeAction *action1_$8, @addref(actions |) cocos2d::FiniteTimeAction *action1_$9, @addref(actions |) cocos2d::FiniteTimeAction *action1_$10, @addref(actions |) cocos2d::FiniteTimeAction *action1_$11, @addref(actions |) cocos2d::FiniteTimeAction *action1_$12, @addref(actions |) cocos2d::FiniteTimeAction *action1_$13, @addref(actions |) cocos2d::FiniteTimeAction *action1_$14) + return _olua_fun_cocos2d_Spawn_create$15(L); // } } if (num_args == 16) { // if ((olua_is_object(L, 1, "cc.FiniteTimeAction")) && (olua_is_object(L, 2, "cc.FiniteTimeAction")) && (olua_is_object(L, 3, "cc.FiniteTimeAction")) && (olua_is_object(L, 4, "cc.FiniteTimeAction")) && (olua_is_object(L, 5, "cc.FiniteTimeAction")) && (olua_is_object(L, 6, "cc.FiniteTimeAction")) && (olua_is_object(L, 7, "cc.FiniteTimeAction")) && (olua_is_object(L, 8, "cc.FiniteTimeAction")) && (olua_is_object(L, 9, "cc.FiniteTimeAction")) && (olua_is_object(L, 10, "cc.FiniteTimeAction")) && (olua_is_object(L, 11, "cc.FiniteTimeAction")) && (olua_is_object(L, 12, "cc.FiniteTimeAction")) && (olua_is_object(L, 13, "cc.FiniteTimeAction")) && (olua_is_object(L, 14, "cc.FiniteTimeAction")) && (olua_is_object(L, 15, "cc.FiniteTimeAction")) && (olua_is_object(L, 16, "cc.FiniteTimeAction"))) { - // @variadic static cocos2d::Spawn *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$4, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$5, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$6, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$7, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$8, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$9, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$10, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$11, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$12, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$13, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$14, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$15, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$16) - return _cocos2d_Spawn_create$18(L); + // @variadic static cocos2d::Spawn *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @addref(actions |) cocos2d::FiniteTimeAction *action1_$4, @addref(actions |) cocos2d::FiniteTimeAction *action1_$5, @addref(actions |) cocos2d::FiniteTimeAction *action1_$6, @addref(actions |) cocos2d::FiniteTimeAction *action1_$7, @addref(actions |) cocos2d::FiniteTimeAction *action1_$8, @addref(actions |) cocos2d::FiniteTimeAction *action1_$9, @addref(actions |) cocos2d::FiniteTimeAction *action1_$10, @addref(actions |) cocos2d::FiniteTimeAction *action1_$11, @addref(actions |) cocos2d::FiniteTimeAction *action1_$12, @addref(actions |) cocos2d::FiniteTimeAction *action1_$13, @addref(actions |) cocos2d::FiniteTimeAction *action1_$14, @addref(actions |) cocos2d::FiniteTimeAction *action1_$15) + return _olua_fun_cocos2d_Spawn_create$16(L); // } } if (num_args == 17) { // if ((olua_is_object(L, 1, "cc.FiniteTimeAction")) && (olua_is_object(L, 2, "cc.FiniteTimeAction")) && (olua_is_object(L, 3, "cc.FiniteTimeAction")) && (olua_is_object(L, 4, "cc.FiniteTimeAction")) && (olua_is_object(L, 5, "cc.FiniteTimeAction")) && (olua_is_object(L, 6, "cc.FiniteTimeAction")) && (olua_is_object(L, 7, "cc.FiniteTimeAction")) && (olua_is_object(L, 8, "cc.FiniteTimeAction")) && (olua_is_object(L, 9, "cc.FiniteTimeAction")) && (olua_is_object(L, 10, "cc.FiniteTimeAction")) && (olua_is_object(L, 11, "cc.FiniteTimeAction")) && (olua_is_object(L, 12, "cc.FiniteTimeAction")) && (olua_is_object(L, 13, "cc.FiniteTimeAction")) && (olua_is_object(L, 14, "cc.FiniteTimeAction")) && (olua_is_object(L, 15, "cc.FiniteTimeAction")) && (olua_is_object(L, 16, "cc.FiniteTimeAction")) && (olua_is_object(L, 17, "cc.FiniteTimeAction"))) { - // @variadic static cocos2d::Spawn *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$4, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$5, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$6, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$7, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$8, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$9, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$10, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$11, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$12, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$13, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$14, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$15, @optional @addref(actions |) cocos2d::FiniteTimeAction *action1_$16) - return _cocos2d_Spawn_create$1(L); + // @variadic static cocos2d::Spawn *create(@addref(actions |) cocos2d::FiniteTimeAction *action1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$1, @addref(actions |) cocos2d::FiniteTimeAction *action1_$2, @addref(actions |) cocos2d::FiniteTimeAction *action1_$3, @addref(actions |) cocos2d::FiniteTimeAction *action1_$4, @addref(actions |) cocos2d::FiniteTimeAction *action1_$5, @addref(actions |) cocos2d::FiniteTimeAction *action1_$6, @addref(actions |) cocos2d::FiniteTimeAction *action1_$7, @addref(actions |) cocos2d::FiniteTimeAction *action1_$8, @addref(actions |) cocos2d::FiniteTimeAction *action1_$9, @addref(actions |) cocos2d::FiniteTimeAction *action1_$10, @addref(actions |) cocos2d::FiniteTimeAction *action1_$11, @addref(actions |) cocos2d::FiniteTimeAction *action1_$12, @addref(actions |) cocos2d::FiniteTimeAction *action1_$13, @addref(actions |) cocos2d::FiniteTimeAction *action1_$14, @addref(actions |) cocos2d::FiniteTimeAction *action1_$15, @addref(actions |) cocos2d::FiniteTimeAction *action1_$16) + return _olua_fun_cocos2d_Spawn_create$17(L); // } } @@ -4065,7 +3868,7 @@ static int _cocos2d_Spawn_create(lua_State *L) return 0; } -static int _cocos2d_Spawn_createWithTwoActions(lua_State *L) +static int _olua_fun_cocos2d_Spawn_createWithTwoActions(lua_State *L) { olua_startinvoke(L); @@ -4088,54 +3891,27 @@ static int _cocos2d_Spawn_createWithTwoActions(lua_State *L) return num_ret; } -static int _cocos2d_Spawn_reverse(lua_State *L) +static int _olua_cls_cc_Spawn(lua_State *L) { - olua_startinvoke(L); - - cocos2d::Spawn *self = nullptr; - - olua_to_object(L, 1, &self, "cc.Spawn"); - - // cocos2d::Spawn *reverse() - cocos2d::Spawn *ret = self->reverse(); - int num_ret = olua_push_object(L, ret, "cc.Spawn"); - - olua_endinvoke(L); + oluacls_class(L, "cc.Spawn"); + oluacls_func(L, "create", _olua_fun_cocos2d_Spawn_create); + oluacls_func(L, "createWithTwoActions", _olua_fun_cocos2d_Spawn_createWithTwoActions); - return num_ret; + return 1; } OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_Spawn(lua_State *L) +OLUA_LIB int luaopen_cc_Spawn(lua_State *L) { - oluacls_class(L, "cc.Spawn"); - oluacls_func(L, "clone", _cocos2d_Spawn_clone); - oluacls_func(L, "create", _cocos2d_Spawn_create); - oluacls_func(L, "createWithTwoActions", _cocos2d_Spawn_createWithTwoActions); - oluacls_func(L, "reverse", _cocos2d_Spawn_reverse); - + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.Spawn")) { + luaL_error(L, "class not found: cocos2d::Spawn"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_RotateTo_clone(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::RotateTo *self = nullptr; - - olua_to_object(L, 1, &self, "cc.RotateTo"); - - // cocos2d::RotateTo *clone() - cocos2d::RotateTo *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.RotateTo"); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_RotateTo_create$1(lua_State *L) +static int _olua_fun_cocos2d_RotateTo_create$1(lua_State *L) { olua_startinvoke(L); @@ -4156,7 +3932,7 @@ static int _cocos2d_RotateTo_create$1(lua_State *L) return num_ret; } -static int _cocos2d_RotateTo_create$2(lua_State *L) +static int _olua_fun_cocos2d_RotateTo_create$2(lua_State *L) { olua_startinvoke(L); @@ -4175,18 +3951,18 @@ static int _cocos2d_RotateTo_create$2(lua_State *L) return num_ret; } -static int _cocos2d_RotateTo_create$3(lua_State *L) +static int _olua_fun_cocos2d_RotateTo_create$3(lua_State *L) { olua_startinvoke(L); float arg1 = 0; /** duration */ - cocos2d::Vec3 arg2; /** dstAngle3D */ + cocos2d::Vec3 *arg2; /** dstAngle3D */ olua_check_number(L, 1, &arg1); olua_check_object(L, 2, &arg2, "cc.Vec3"); // static cocos2d::RotateTo *create(float duration, const cocos2d::Vec3 &dstAngle3D) - cocos2d::RotateTo *ret = cocos2d::RotateTo::create(arg1, arg2); + cocos2d::RotateTo *ret = cocos2d::RotateTo::create(arg1, *arg2); int num_ret = olua_push_object(L, ret, "cc.RotateTo"); olua_endinvoke(L); @@ -4194,26 +3970,26 @@ static int _cocos2d_RotateTo_create$3(lua_State *L) return num_ret; } -static int _cocos2d_RotateTo_create(lua_State *L) +static int _olua_fun_cocos2d_RotateTo_create(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 2) { if ((olua_is_number(L, 1)) && (olua_is_object(L, 2, "cc.Vec3"))) { // static cocos2d::RotateTo *create(float duration, const cocos2d::Vec3 &dstAngle3D) - return _cocos2d_RotateTo_create$3(L); + return _olua_fun_cocos2d_RotateTo_create$3(L); } // if ((olua_is_number(L, 1)) && (olua_is_number(L, 2))) { // static cocos2d::RotateTo *create(float duration, float dstAngle) - return _cocos2d_RotateTo_create$2(L); + return _olua_fun_cocos2d_RotateTo_create$2(L); // } } if (num_args == 3) { // if ((olua_is_number(L, 1)) && (olua_is_number(L, 2)) && (olua_is_number(L, 3))) { // static cocos2d::RotateTo *create(float duration, float dstAngleX, float dstAngleY) - return _cocos2d_RotateTo_create$1(L); + return _olua_fun_cocos2d_RotateTo_create$1(L); // } } @@ -4222,53 +3998,26 @@ static int _cocos2d_RotateTo_create(lua_State *L) return 0; } -static int _cocos2d_RotateTo_reverse(lua_State *L) +static int _olua_cls_cc_RotateTo(lua_State *L) { - olua_startinvoke(L); - - cocos2d::RotateTo *self = nullptr; - - olua_to_object(L, 1, &self, "cc.RotateTo"); - - // cocos2d::RotateTo *reverse() - cocos2d::RotateTo *ret = self->reverse(); - int num_ret = olua_push_object(L, ret, "cc.RotateTo"); - - olua_endinvoke(L); + oluacls_class(L, "cc.RotateTo"); + oluacls_func(L, "create", _olua_fun_cocos2d_RotateTo_create); - return num_ret; + return 1; } OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_RotateTo(lua_State *L) +OLUA_LIB int luaopen_cc_RotateTo(lua_State *L) { - oluacls_class(L, "cc.RotateTo"); - oluacls_func(L, "clone", _cocos2d_RotateTo_clone); - oluacls_func(L, "create", _cocos2d_RotateTo_create); - oluacls_func(L, "reverse", _cocos2d_RotateTo_reverse); - + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.RotateTo")) { + luaL_error(L, "class not found: cocos2d::RotateTo"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_RotateFrom_clone(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::RotateFrom *self = nullptr; - - olua_to_object(L, 1, &self, "cc.RotateFrom"); - - // cocos2d::RotateFrom *clone() - cocos2d::RotateFrom *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.RotateFrom"); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_RotateFrom_create$1(lua_State *L) +static int _olua_fun_cocos2d_RotateFrom_create$1(lua_State *L) { olua_startinvoke(L); @@ -4289,7 +4038,7 @@ static int _cocos2d_RotateFrom_create$1(lua_State *L) return num_ret; } -static int _cocos2d_RotateFrom_create$2(lua_State *L) +static int _olua_fun_cocos2d_RotateFrom_create$2(lua_State *L) { olua_startinvoke(L); @@ -4308,18 +4057,18 @@ static int _cocos2d_RotateFrom_create$2(lua_State *L) return num_ret; } -static int _cocos2d_RotateFrom_create$3(lua_State *L) +static int _olua_fun_cocos2d_RotateFrom_create$3(lua_State *L) { olua_startinvoke(L); float arg1 = 0; /** duration */ - cocos2d::Vec3 arg2; /** fromAngle3D */ + cocos2d::Vec3 *arg2; /** fromAngle3D */ olua_check_number(L, 1, &arg1); olua_check_object(L, 2, &arg2, "cc.Vec3"); // static cocos2d::RotateFrom *create(float duration, const cocos2d::Vec3 &fromAngle3D) - cocos2d::RotateFrom *ret = cocos2d::RotateFrom::create(arg1, arg2); + cocos2d::RotateFrom *ret = cocos2d::RotateFrom::create(arg1, *arg2); int num_ret = olua_push_object(L, ret, "cc.RotateFrom"); olua_endinvoke(L); @@ -4327,26 +4076,26 @@ static int _cocos2d_RotateFrom_create$3(lua_State *L) return num_ret; } -static int _cocos2d_RotateFrom_create(lua_State *L) +static int _olua_fun_cocos2d_RotateFrom_create(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 2) { if ((olua_is_number(L, 1)) && (olua_is_object(L, 2, "cc.Vec3"))) { // static cocos2d::RotateFrom *create(float duration, const cocos2d::Vec3 &fromAngle3D) - return _cocos2d_RotateFrom_create$3(L); + return _olua_fun_cocos2d_RotateFrom_create$3(L); } // if ((olua_is_number(L, 1)) && (olua_is_number(L, 2))) { // static cocos2d::RotateFrom *create(float duration, float fromAngle) - return _cocos2d_RotateFrom_create$2(L); + return _olua_fun_cocos2d_RotateFrom_create$2(L); // } } if (num_args == 3) { // if ((olua_is_number(L, 1)) && (olua_is_number(L, 2)) && (olua_is_number(L, 3))) { // static cocos2d::RotateFrom *create(float duration, float fromAngleX, float fromAngleY) - return _cocos2d_RotateFrom_create$1(L); + return _olua_fun_cocos2d_RotateFrom_create$1(L); // } } @@ -4355,53 +4104,26 @@ static int _cocos2d_RotateFrom_create(lua_State *L) return 0; } -static int _cocos2d_RotateFrom_reverse(lua_State *L) +static int _olua_cls_cc_RotateFrom(lua_State *L) { - olua_startinvoke(L); - - cocos2d::RotateFrom *self = nullptr; - - olua_to_object(L, 1, &self, "cc.RotateFrom"); - - // cocos2d::RotateFrom *reverse() - cocos2d::RotateFrom *ret = self->reverse(); - int num_ret = olua_push_object(L, ret, "cc.RotateFrom"); - - olua_endinvoke(L); + oluacls_class(L, "cc.RotateFrom"); + oluacls_func(L, "create", _olua_fun_cocos2d_RotateFrom_create); - return num_ret; + return 1; } OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_RotateFrom(lua_State *L) +OLUA_LIB int luaopen_cc_RotateFrom(lua_State *L) { - oluacls_class(L, "cc.RotateFrom"); - oluacls_func(L, "clone", _cocos2d_RotateFrom_clone); - oluacls_func(L, "create", _cocos2d_RotateFrom_create); - oluacls_func(L, "reverse", _cocos2d_RotateFrom_reverse); - + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.RotateFrom")) { + luaL_error(L, "class not found: cocos2d::RotateFrom"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_RotateBy_clone(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::RotateBy *self = nullptr; - - olua_to_object(L, 1, &self, "cc.RotateBy"); - - // cocos2d::RotateBy *clone() - cocos2d::RotateBy *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.RotateBy"); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_RotateBy_create$1(lua_State *L) +static int _olua_fun_cocos2d_RotateBy_create$1(lua_State *L) { olua_startinvoke(L); @@ -4420,7 +4142,7 @@ static int _cocos2d_RotateBy_create$1(lua_State *L) return num_ret; } -static int _cocos2d_RotateBy_create$2(lua_State *L) +static int _olua_fun_cocos2d_RotateBy_create$2(lua_State *L) { olua_startinvoke(L); @@ -4441,18 +4163,18 @@ static int _cocos2d_RotateBy_create$2(lua_State *L) return num_ret; } -static int _cocos2d_RotateBy_create$3(lua_State *L) +static int _olua_fun_cocos2d_RotateBy_create$3(lua_State *L) { olua_startinvoke(L); float arg1 = 0; /** duration */ - cocos2d::Vec3 arg2; /** deltaAngle3D */ + cocos2d::Vec3 *arg2; /** deltaAngle3D */ olua_check_number(L, 1, &arg1); olua_check_object(L, 2, &arg2, "cc.Vec3"); // static cocos2d::RotateBy *create(float duration, const cocos2d::Vec3 &deltaAngle3D) - cocos2d::RotateBy *ret = cocos2d::RotateBy::create(arg1, arg2); + cocos2d::RotateBy *ret = cocos2d::RotateBy::create(arg1, *arg2); int num_ret = olua_push_object(L, ret, "cc.RotateBy"); olua_endinvoke(L); @@ -4460,26 +4182,26 @@ static int _cocos2d_RotateBy_create$3(lua_State *L) return num_ret; } -static int _cocos2d_RotateBy_create(lua_State *L) +static int _olua_fun_cocos2d_RotateBy_create(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 2) { if ((olua_is_number(L, 1)) && (olua_is_object(L, 2, "cc.Vec3"))) { // static cocos2d::RotateBy *create(float duration, const cocos2d::Vec3 &deltaAngle3D) - return _cocos2d_RotateBy_create$3(L); + return _olua_fun_cocos2d_RotateBy_create$3(L); } // if ((olua_is_number(L, 1)) && (olua_is_number(L, 2))) { // static cocos2d::RotateBy *create(float duration, float deltaAngle) - return _cocos2d_RotateBy_create$1(L); + return _olua_fun_cocos2d_RotateBy_create$1(L); // } } if (num_args == 3) { // if ((olua_is_number(L, 1)) && (olua_is_number(L, 2)) && (olua_is_number(L, 3))) { // static cocos2d::RotateBy *create(float duration, float deltaAngleZ_X, float deltaAngleZ_Y) - return _cocos2d_RotateBy_create$2(L); + return _olua_fun_cocos2d_RotateBy_create$2(L); // } } @@ -4488,45 +4210,37 @@ static int _cocos2d_RotateBy_create(lua_State *L) return 0; } -static int _cocos2d_RotateBy_reverse(lua_State *L) +static int _olua_cls_cc_RotateBy(lua_State *L) { - olua_startinvoke(L); - - cocos2d::RotateBy *self = nullptr; - - olua_to_object(L, 1, &self, "cc.RotateBy"); - - // cocos2d::RotateBy *reverse() - cocos2d::RotateBy *ret = self->reverse(); - int num_ret = olua_push_object(L, ret, "cc.RotateBy"); - - olua_endinvoke(L); + oluacls_class(L, "cc.RotateBy"); + oluacls_func(L, "create", _olua_fun_cocos2d_RotateBy_create); - return num_ret; + return 1; } OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_RotateBy(lua_State *L) +OLUA_LIB int luaopen_cc_RotateBy(lua_State *L) { - oluacls_class(L, "cc.RotateBy"); - oluacls_func(L, "clone", _cocos2d_RotateBy_clone); - oluacls_func(L, "create", _cocos2d_RotateBy_create); - oluacls_func(L, "reverse", _cocos2d_RotateBy_reverse); - + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.RotateBy")) { + luaL_error(L, "class not found: cocos2d::RotateBy"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_MoveBy_clone(lua_State *L) +static int _olua_fun_cocos2d_MoveBy_create$1(lua_State *L) { olua_startinvoke(L); - cocos2d::MoveBy *self = nullptr; + float arg1 = 0; /** duration */ + cocos2d::Vec2 *arg2; /** deltaPosition */ - olua_to_object(L, 1, &self, "cc.MoveBy"); + olua_check_number(L, 1, &arg1); + olua_check_object(L, 2, &arg2, "cc.Vec2"); - // cocos2d::MoveBy *clone() - cocos2d::MoveBy *ret = self->clone(); + // static cocos2d::MoveBy *create(float duration, const cocos2d::Vec2 &deltaPosition) + cocos2d::MoveBy *ret = cocos2d::MoveBy::create(arg1, *arg2); int num_ret = olua_push_object(L, ret, "cc.MoveBy"); olua_endinvoke(L); @@ -4534,18 +4248,18 @@ static int _cocos2d_MoveBy_clone(lua_State *L) return num_ret; } -static int _cocos2d_MoveBy_create$1(lua_State *L) +static int _olua_fun_cocos2d_MoveBy_create$2(lua_State *L) { olua_startinvoke(L); float arg1 = 0; /** duration */ - cocos2d::Vec2 arg2; /** deltaPosition */ + cocos2d::Vec3 *arg2; /** deltaPosition */ olua_check_number(L, 1, &arg1); - olua_check_object(L, 2, &arg2, "cc.Vec2"); + olua_check_object(L, 2, &arg2, "cc.Vec3"); - // static cocos2d::MoveBy *create(float duration, const cocos2d::Vec2 &deltaPosition) - cocos2d::MoveBy *ret = cocos2d::MoveBy::create(arg1, arg2); + // static cocos2d::MoveBy *create(float duration, const cocos2d::Vec3 &deltaPosition) + cocos2d::MoveBy *ret = cocos2d::MoveBy::create(arg1, *arg2); int num_ret = olua_push_object(L, ret, "cc.MoveBy"); olua_endinvoke(L); @@ -4553,7 +4267,7 @@ static int _cocos2d_MoveBy_create$1(lua_State *L) return num_ret; } -static int _cocos2d_MoveBy_create$2(lua_State *L) +static int _olua_fun_cocos2d_MoveBy_create$3(lua_State *L) { olua_startinvoke(L); @@ -4572,7 +4286,7 @@ static int _cocos2d_MoveBy_create$2(lua_State *L) return num_ret; } -static int _cocos2d_MoveBy_create$3(lua_State *L) +static int _olua_fun_cocos2d_MoveBy_create$4(lua_State *L) { olua_startinvoke(L); @@ -4580,9 +4294,9 @@ static int _cocos2d_MoveBy_create$3(lua_State *L) cocos2d::Vec3 arg2; /** deltaPosition */ olua_check_number(L, 1, &arg1); - olua_check_object(L, 2, &arg2, "cc.Vec3"); + olua_pack_object(L, 2, &arg2); - // static cocos2d::MoveBy *create(float duration, const cocos2d::Vec3 &deltaPosition) + // static cocos2d::MoveBy *create(float duration, @pack const cocos2d::Vec3 &deltaPosition) cocos2d::MoveBy *ret = cocos2d::MoveBy::create(arg1, arg2); int num_ret = olua_push_object(L, ret, "cc.MoveBy"); @@ -4591,52 +4305,33 @@ static int _cocos2d_MoveBy_create$3(lua_State *L) return num_ret; } -static int _cocos2d_MoveBy_create$4(lua_State *L) +static int _olua_fun_cocos2d_MoveBy_create(lua_State *L) { - olua_startinvoke(L); - - float arg1 = 0; /** duration */ - cocos2d::Vec3 arg2; /** deltaPosition */ - - olua_check_number(L, 1, &arg1); - olua_pack_object(L, 2, &arg2); - - // static cocos2d::MoveBy *create(float duration, @pack const cocos2d::Vec3 &deltaPosition) - cocos2d::MoveBy *ret = cocos2d::MoveBy::create(arg1, arg2); - int num_ret = olua_push_object(L, ret, "cc.MoveBy"); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_MoveBy_create(lua_State *L) -{ - int num_args = lua_gettop(L); + int num_args = lua_gettop(L); if (num_args == 2) { if ((olua_is_number(L, 1)) && (olua_is_object(L, 2, "cc.Vec3"))) { // static cocos2d::MoveBy *create(float duration, const cocos2d::Vec3 &deltaPosition) - return _cocos2d_MoveBy_create$3(L); + return _olua_fun_cocos2d_MoveBy_create$2(L); } // if ((olua_is_number(L, 1)) && (olua_is_object(L, 2, "cc.Vec2"))) { // static cocos2d::MoveBy *create(float duration, const cocos2d::Vec2 &deltaPosition) - return _cocos2d_MoveBy_create$1(L); + return _olua_fun_cocos2d_MoveBy_create$1(L); // } } if (num_args == 3) { // if ((olua_is_number(L, 1)) && (olua_canpack_object(L, 2, (cocos2d::Vec2 *)nullptr))) { // static cocos2d::MoveBy *create(float duration, @pack const cocos2d::Vec2 &deltaPosition) - return _cocos2d_MoveBy_create$2(L); + return _olua_fun_cocos2d_MoveBy_create$3(L); // } } if (num_args == 4) { // if ((olua_is_number(L, 1)) && (olua_canpack_object(L, 2, (cocos2d::Vec3 *)nullptr))) { // static cocos2d::MoveBy *create(float duration, @pack const cocos2d::Vec3 &deltaPosition) - return _cocos2d_MoveBy_create$4(L); + return _olua_fun_cocos2d_MoveBy_create$4(L); // } } @@ -4645,64 +4340,37 @@ static int _cocos2d_MoveBy_create(lua_State *L) return 0; } -static int _cocos2d_MoveBy_reverse(lua_State *L) +static int _olua_cls_cc_MoveBy(lua_State *L) { - olua_startinvoke(L); - - cocos2d::MoveBy *self = nullptr; - - olua_to_object(L, 1, &self, "cc.MoveBy"); - - // cocos2d::MoveBy *reverse() - cocos2d::MoveBy *ret = self->reverse(); - int num_ret = olua_push_object(L, ret, "cc.MoveBy"); - - olua_endinvoke(L); + oluacls_class(L, "cc.MoveBy"); + oluacls_func(L, "create", _olua_fun_cocos2d_MoveBy_create); - return num_ret; + return 1; } OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_MoveBy(lua_State *L) +OLUA_LIB int luaopen_cc_MoveBy(lua_State *L) { - oluacls_class(L, "cc.MoveBy"); - oluacls_func(L, "clone", _cocos2d_MoveBy_clone); - oluacls_func(L, "create", _cocos2d_MoveBy_create); - oluacls_func(L, "reverse", _cocos2d_MoveBy_reverse); - + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.MoveBy")) { + luaL_error(L, "class not found: cocos2d::MoveBy"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_MoveTo_clone(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::MoveTo *self = nullptr; - - olua_to_object(L, 1, &self, "cc.MoveTo"); - - // cocos2d::MoveTo *clone() - cocos2d::MoveTo *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.MoveTo"); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_MoveTo_create$1(lua_State *L) +static int _olua_fun_cocos2d_MoveTo_create$1(lua_State *L) { olua_startinvoke(L); float arg1 = 0; /** duration */ - cocos2d::Vec2 arg2; /** position */ + cocos2d::Vec2 *arg2; /** position */ olua_check_number(L, 1, &arg1); olua_check_object(L, 2, &arg2, "cc.Vec2"); // static cocos2d::MoveTo *create(float duration, const cocos2d::Vec2 &position) - cocos2d::MoveTo *ret = cocos2d::MoveTo::create(arg1, arg2); + cocos2d::MoveTo *ret = cocos2d::MoveTo::create(arg1, *arg2); int num_ret = olua_push_object(L, ret, "cc.MoveTo"); olua_endinvoke(L); @@ -4710,18 +4378,18 @@ static int _cocos2d_MoveTo_create$1(lua_State *L) return num_ret; } -static int _cocos2d_MoveTo_create$2(lua_State *L) +static int _olua_fun_cocos2d_MoveTo_create$2(lua_State *L) { olua_startinvoke(L); float arg1 = 0; /** duration */ - cocos2d::Vec2 arg2; /** position */ + cocos2d::Vec3 *arg2; /** position */ olua_check_number(L, 1, &arg1); - olua_pack_object(L, 2, &arg2); + olua_check_object(L, 2, &arg2, "cc.Vec3"); - // static cocos2d::MoveTo *create(float duration, @pack const cocos2d::Vec2 &position) - cocos2d::MoveTo *ret = cocos2d::MoveTo::create(arg1, arg2); + // static cocos2d::MoveTo *create(float duration, const cocos2d::Vec3 &position) + cocos2d::MoveTo *ret = cocos2d::MoveTo::create(arg1, *arg2); int num_ret = olua_push_object(L, ret, "cc.MoveTo"); olua_endinvoke(L); @@ -4729,17 +4397,17 @@ static int _cocos2d_MoveTo_create$2(lua_State *L) return num_ret; } -static int _cocos2d_MoveTo_create$3(lua_State *L) +static int _olua_fun_cocos2d_MoveTo_create$3(lua_State *L) { olua_startinvoke(L); float arg1 = 0; /** duration */ - cocos2d::Vec3 arg2; /** position */ + cocos2d::Vec2 arg2; /** position */ olua_check_number(L, 1, &arg1); - olua_check_object(L, 2, &arg2, "cc.Vec3"); + olua_pack_object(L, 2, &arg2); - // static cocos2d::MoveTo *create(float duration, const cocos2d::Vec3 &position) + // static cocos2d::MoveTo *create(float duration, @pack const cocos2d::Vec2 &position) cocos2d::MoveTo *ret = cocos2d::MoveTo::create(arg1, arg2); int num_ret = olua_push_object(L, ret, "cc.MoveTo"); @@ -4748,7 +4416,7 @@ static int _cocos2d_MoveTo_create$3(lua_State *L) return num_ret; } -static int _cocos2d_MoveTo_create$4(lua_State *L) +static int _olua_fun_cocos2d_MoveTo_create$4(lua_State *L) { olua_startinvoke(L); @@ -4767,33 +4435,33 @@ static int _cocos2d_MoveTo_create$4(lua_State *L) return num_ret; } -static int _cocos2d_MoveTo_create(lua_State *L) +static int _olua_fun_cocos2d_MoveTo_create(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 2) { if ((olua_is_number(L, 1)) && (olua_is_object(L, 2, "cc.Vec3"))) { // static cocos2d::MoveTo *create(float duration, const cocos2d::Vec3 &position) - return _cocos2d_MoveTo_create$3(L); + return _olua_fun_cocos2d_MoveTo_create$2(L); } // if ((olua_is_number(L, 1)) && (olua_is_object(L, 2, "cc.Vec2"))) { // static cocos2d::MoveTo *create(float duration, const cocos2d::Vec2 &position) - return _cocos2d_MoveTo_create$1(L); + return _olua_fun_cocos2d_MoveTo_create$1(L); // } } if (num_args == 3) { // if ((olua_is_number(L, 1)) && (olua_canpack_object(L, 2, (cocos2d::Vec2 *)nullptr))) { // static cocos2d::MoveTo *create(float duration, @pack const cocos2d::Vec2 &position) - return _cocos2d_MoveTo_create$2(L); + return _olua_fun_cocos2d_MoveTo_create$3(L); // } } if (num_args == 4) { // if ((olua_is_number(L, 1)) && (olua_canpack_object(L, 2, (cocos2d::Vec3 *)nullptr))) { // static cocos2d::MoveTo *create(float duration, @pack const cocos2d::Vec3 &position) - return _cocos2d_MoveTo_create$4(L); + return _olua_fun_cocos2d_MoveTo_create$4(L); // } } @@ -4802,64 +4470,37 @@ static int _cocos2d_MoveTo_create(lua_State *L) return 0; } -static int _cocos2d_MoveTo_reverse(lua_State *L) +static int _olua_cls_cc_MoveTo(lua_State *L) { - olua_startinvoke(L); - - cocos2d::MoveTo *self = nullptr; - - olua_to_object(L, 1, &self, "cc.MoveTo"); - - // cocos2d::MoveTo *reverse() - cocos2d::MoveTo *ret = self->reverse(); - int num_ret = olua_push_object(L, ret, "cc.MoveTo"); - - olua_endinvoke(L); + oluacls_class(L, "cc.MoveTo"); + oluacls_func(L, "create", _olua_fun_cocos2d_MoveTo_create); - return num_ret; + return 1; } OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_MoveTo(lua_State *L) +OLUA_LIB int luaopen_cc_MoveTo(lua_State *L) { - oluacls_class(L, "cc.MoveTo"); - oluacls_func(L, "clone", _cocos2d_MoveTo_clone); - oluacls_func(L, "create", _cocos2d_MoveTo_create); - oluacls_func(L, "reverse", _cocos2d_MoveTo_reverse); - + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.MoveTo")) { + luaL_error(L, "class not found: cocos2d::MoveTo"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_MoveFrom_clone(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::MoveFrom *self = nullptr; - - olua_to_object(L, 1, &self, "cc.MoveFrom"); - - // cocos2d::MoveFrom *clone() - cocos2d::MoveFrom *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.MoveFrom"); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_MoveFrom_create$1(lua_State *L) +static int _olua_fun_cocos2d_MoveFrom_create$1(lua_State *L) { olua_startinvoke(L); float arg1 = 0; /** duration */ - cocos2d::Vec2 arg2; /** position */ + cocos2d::Vec2 *arg2; /** position */ olua_check_number(L, 1, &arg1); olua_check_object(L, 2, &arg2, "cc.Vec2"); // static cocos2d::MoveFrom *create(float duration, const cocos2d::Vec2 &position) - cocos2d::MoveFrom *ret = cocos2d::MoveFrom::create(arg1, arg2); + cocos2d::MoveFrom *ret = cocos2d::MoveFrom::create(arg1, *arg2); int num_ret = olua_push_object(L, ret, "cc.MoveFrom"); olua_endinvoke(L); @@ -4867,18 +4508,18 @@ static int _cocos2d_MoveFrom_create$1(lua_State *L) return num_ret; } -static int _cocos2d_MoveFrom_create$2(lua_State *L) +static int _olua_fun_cocos2d_MoveFrom_create$2(lua_State *L) { olua_startinvoke(L); float arg1 = 0; /** duration */ - cocos2d::Vec2 arg2; /** position */ + cocos2d::Vec3 *arg2; /** position */ olua_check_number(L, 1, &arg1); - olua_pack_object(L, 2, &arg2); + olua_check_object(L, 2, &arg2, "cc.Vec3"); - // static cocos2d::MoveFrom *create(float duration, @pack const cocos2d::Vec2 &position) - cocos2d::MoveFrom *ret = cocos2d::MoveFrom::create(arg1, arg2); + // static cocos2d::MoveFrom *create(float duration, const cocos2d::Vec3 &position) + cocos2d::MoveFrom *ret = cocos2d::MoveFrom::create(arg1, *arg2); int num_ret = olua_push_object(L, ret, "cc.MoveFrom"); olua_endinvoke(L); @@ -4886,17 +4527,17 @@ static int _cocos2d_MoveFrom_create$2(lua_State *L) return num_ret; } -static int _cocos2d_MoveFrom_create$3(lua_State *L) +static int _olua_fun_cocos2d_MoveFrom_create$3(lua_State *L) { olua_startinvoke(L); float arg1 = 0; /** duration */ - cocos2d::Vec3 arg2; /** position */ + cocos2d::Vec2 arg2; /** position */ olua_check_number(L, 1, &arg1); - olua_check_object(L, 2, &arg2, "cc.Vec3"); + olua_pack_object(L, 2, &arg2); - // static cocos2d::MoveFrom *create(float duration, const cocos2d::Vec3 &position) + // static cocos2d::MoveFrom *create(float duration, @pack const cocos2d::Vec2 &position) cocos2d::MoveFrom *ret = cocos2d::MoveFrom::create(arg1, arg2); int num_ret = olua_push_object(L, ret, "cc.MoveFrom"); @@ -4905,7 +4546,7 @@ static int _cocos2d_MoveFrom_create$3(lua_State *L) return num_ret; } -static int _cocos2d_MoveFrom_create$4(lua_State *L) +static int _olua_fun_cocos2d_MoveFrom_create$4(lua_State *L) { olua_startinvoke(L); @@ -4924,33 +4565,33 @@ static int _cocos2d_MoveFrom_create$4(lua_State *L) return num_ret; } -static int _cocos2d_MoveFrom_create(lua_State *L) +static int _olua_fun_cocos2d_MoveFrom_create(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 2) { if ((olua_is_number(L, 1)) && (olua_is_object(L, 2, "cc.Vec3"))) { // static cocos2d::MoveFrom *create(float duration, const cocos2d::Vec3 &position) - return _cocos2d_MoveFrom_create$3(L); + return _olua_fun_cocos2d_MoveFrom_create$2(L); } // if ((olua_is_number(L, 1)) && (olua_is_object(L, 2, "cc.Vec2"))) { // static cocos2d::MoveFrom *create(float duration, const cocos2d::Vec2 &position) - return _cocos2d_MoveFrom_create$1(L); + return _olua_fun_cocos2d_MoveFrom_create$1(L); // } } if (num_args == 3) { // if ((olua_is_number(L, 1)) && (olua_canpack_object(L, 2, (cocos2d::Vec2 *)nullptr))) { // static cocos2d::MoveFrom *create(float duration, @pack const cocos2d::Vec2 &position) - return _cocos2d_MoveFrom_create$2(L); + return _olua_fun_cocos2d_MoveFrom_create$3(L); // } } if (num_args == 4) { // if ((olua_is_number(L, 1)) && (olua_canpack_object(L, 2, (cocos2d::Vec3 *)nullptr))) { // static cocos2d::MoveFrom *create(float duration, @pack const cocos2d::Vec3 &position) - return _cocos2d_MoveFrom_create$4(L); + return _olua_fun_cocos2d_MoveFrom_create$4(L); // } } @@ -4959,53 +4600,26 @@ static int _cocos2d_MoveFrom_create(lua_State *L) return 0; } -static int _cocos2d_MoveFrom_reverse(lua_State *L) +static int _olua_cls_cc_MoveFrom(lua_State *L) { - olua_startinvoke(L); - - cocos2d::MoveFrom *self = nullptr; - - olua_to_object(L, 1, &self, "cc.MoveFrom"); - - // cocos2d::MoveFrom *reverse() - cocos2d::MoveFrom *ret = self->reverse(); - int num_ret = olua_push_object(L, ret, "cc.MoveFrom"); - - olua_endinvoke(L); + oluacls_class(L, "cc.MoveFrom"); + oluacls_func(L, "create", _olua_fun_cocos2d_MoveFrom_create); - return num_ret; + return 1; } OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_MoveFrom(lua_State *L) +OLUA_LIB int luaopen_cc_MoveFrom(lua_State *L) { - oluacls_class(L, "cc.MoveFrom"); - oluacls_func(L, "clone", _cocos2d_MoveFrom_clone); - oluacls_func(L, "create", _cocos2d_MoveFrom_create); - oluacls_func(L, "reverse", _cocos2d_MoveFrom_reverse); - + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.MoveFrom")) { + luaL_error(L, "class not found: cocos2d::MoveFrom"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_SkewTo_clone(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::SkewTo *self = nullptr; - - olua_to_object(L, 1, &self, "cc.SkewTo"); - - // cocos2d::SkewTo *clone() - cocos2d::SkewTo *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.SkewTo"); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_SkewTo_create(lua_State *L) +static int _olua_fun_cocos2d_SkewTo_create(lua_State *L) { olua_startinvoke(L); @@ -5026,53 +4640,26 @@ static int _cocos2d_SkewTo_create(lua_State *L) return num_ret; } -static int _cocos2d_SkewTo_reverse(lua_State *L) +static int _olua_cls_cc_SkewTo(lua_State *L) { - olua_startinvoke(L); - - cocos2d::SkewTo *self = nullptr; - - olua_to_object(L, 1, &self, "cc.SkewTo"); - - // cocos2d::SkewTo *reverse() - cocos2d::SkewTo *ret = self->reverse(); - int num_ret = olua_push_object(L, ret, "cc.SkewTo"); - - olua_endinvoke(L); + oluacls_class(L, "cc.SkewTo"); + oluacls_func(L, "create", _olua_fun_cocos2d_SkewTo_create); - return num_ret; + return 1; } OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_SkewTo(lua_State *L) +OLUA_LIB int luaopen_cc_SkewTo(lua_State *L) { - oluacls_class(L, "cc.SkewTo"); - oluacls_func(L, "clone", _cocos2d_SkewTo_clone); - oluacls_func(L, "create", _cocos2d_SkewTo_create); - oluacls_func(L, "reverse", _cocos2d_SkewTo_reverse); - + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.SkewTo")) { + luaL_error(L, "class not found: cocos2d::SkewTo"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_SkewBy_clone(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::SkewBy *self = nullptr; - - olua_to_object(L, 1, &self, "cc.SkewBy"); - - // cocos2d::SkewBy *clone() - cocos2d::SkewBy *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.SkewBy"); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_SkewBy_create(lua_State *L) +static int _olua_fun_cocos2d_SkewBy_create(lua_State *L) { olua_startinvoke(L); @@ -5093,64 +4680,37 @@ static int _cocos2d_SkewBy_create(lua_State *L) return num_ret; } -static int _cocos2d_SkewBy_reverse(lua_State *L) +static int _olua_cls_cc_SkewBy(lua_State *L) { - olua_startinvoke(L); - - cocos2d::SkewBy *self = nullptr; - - olua_to_object(L, 1, &self, "cc.SkewBy"); - - // cocos2d::SkewBy *reverse() - cocos2d::SkewBy *ret = self->reverse(); - int num_ret = olua_push_object(L, ret, "cc.SkewBy"); - - olua_endinvoke(L); + oluacls_class(L, "cc.SkewBy"); + oluacls_func(L, "create", _olua_fun_cocos2d_SkewBy_create); - return num_ret; + return 1; } OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_SkewBy(lua_State *L) +OLUA_LIB int luaopen_cc_SkewBy(lua_State *L) { - oluacls_class(L, "cc.SkewBy"); - oluacls_func(L, "clone", _cocos2d_SkewBy_clone); - oluacls_func(L, "create", _cocos2d_SkewBy_create); - oluacls_func(L, "reverse", _cocos2d_SkewBy_reverse); - + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.SkewBy")) { + luaL_error(L, "class not found: cocos2d::SkewBy"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_ResizeTo_clone(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::ResizeTo *self = nullptr; - - olua_to_object(L, 1, &self, "cc.ResizeTo"); - - // cocos2d::ResizeTo *clone() - cocos2d::ResizeTo *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.ResizeTo"); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_ResizeTo_create(lua_State *L) +static int _olua_fun_cocos2d_ResizeTo_create(lua_State *L) { olua_startinvoke(L); float arg1 = 0; /** duration */ - cocos2d::Size arg2; /** final_size */ + cocos2d::Size *arg2; /** final_size */ olua_check_number(L, 1, &arg1); olua_check_object(L, 2, &arg2, "cc.Size"); // static cocos2d::ResizeTo *create(float duration, const cocos2d::Size &final_size) - cocos2d::ResizeTo *ret = cocos2d::ResizeTo::create(arg1, arg2); + cocos2d::ResizeTo *ret = cocos2d::ResizeTo::create(arg1, *arg2); int num_ret = olua_push_object(L, ret, "cc.ResizeTo"); olua_endinvoke(L); @@ -5158,46 +4718,37 @@ static int _cocos2d_ResizeTo_create(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ResizeTo(lua_State *L) +static int _olua_cls_cc_ResizeTo(lua_State *L) { oluacls_class(L, "cc.ResizeTo"); - oluacls_func(L, "clone", _cocos2d_ResizeTo_clone); - oluacls_func(L, "create", _cocos2d_ResizeTo_create); + oluacls_func(L, "create", _olua_fun_cocos2d_ResizeTo_create); return 1; } -OLUA_END_DECLS -static int _cocos2d_ResizeBy_clone(lua_State *L) +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_ResizeTo(lua_State *L) { - olua_startinvoke(L); - - cocos2d::ResizeBy *self = nullptr; - - olua_to_object(L, 1, &self, "cc.ResizeBy"); - - // cocos2d::ResizeBy *clone() - cocos2d::ResizeBy *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.ResizeBy"); - - olua_endinvoke(L); - - return num_ret; + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.ResizeTo")) { + luaL_error(L, "class not found: cocos2d::ResizeTo"); + } + return 1; } +OLUA_END_DECLS -static int _cocos2d_ResizeBy_create(lua_State *L) +static int _olua_fun_cocos2d_ResizeBy_create(lua_State *L) { olua_startinvoke(L); float arg1 = 0; /** duration */ - cocos2d::Size arg2; /** deltaSize */ + cocos2d::Size *arg2; /** deltaSize */ olua_check_number(L, 1, &arg1); olua_check_object(L, 2, &arg2, "cc.Size"); // static cocos2d::ResizeBy *create(float duration, const cocos2d::Size &deltaSize) - cocos2d::ResizeBy *ret = cocos2d::ResizeBy::create(arg1, arg2); + cocos2d::ResizeBy *ret = cocos2d::ResizeBy::create(arg1, *arg2); int num_ret = olua_push_object(L, ret, "cc.ResizeBy"); olua_endinvoke(L); @@ -5205,64 +4756,37 @@ static int _cocos2d_ResizeBy_create(lua_State *L) return num_ret; } -static int _cocos2d_ResizeBy_reverse(lua_State *L) +static int _olua_cls_cc_ResizeBy(lua_State *L) { - olua_startinvoke(L); - - cocos2d::ResizeBy *self = nullptr; - - olua_to_object(L, 1, &self, "cc.ResizeBy"); - - // cocos2d::ResizeBy *reverse() - cocos2d::ResizeBy *ret = self->reverse(); - int num_ret = olua_push_object(L, ret, "cc.ResizeBy"); - - olua_endinvoke(L); + oluacls_class(L, "cc.ResizeBy"); + oluacls_func(L, "create", _olua_fun_cocos2d_ResizeBy_create); - return num_ret; + return 1; } OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ResizeBy(lua_State *L) +OLUA_LIB int luaopen_cc_ResizeBy(lua_State *L) { - oluacls_class(L, "cc.ResizeBy"); - oluacls_func(L, "clone", _cocos2d_ResizeBy_clone); - oluacls_func(L, "create", _cocos2d_ResizeBy_create); - oluacls_func(L, "reverse", _cocos2d_ResizeBy_reverse); - + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.ResizeBy")) { + luaL_error(L, "class not found: cocos2d::ResizeBy"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_BezierBy_clone(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::BezierBy *self = nullptr; - - olua_to_object(L, 1, &self, "cc.BezierBy"); - - // cocos2d::BezierBy *clone() - cocos2d::BezierBy *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.BezierBy"); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_BezierBy_create$1(lua_State *L) +static int _olua_fun_cocos2d_BezierBy_create$1(lua_State *L) { olua_startinvoke(L); float arg1 = 0; /** t */ - cocos2d::ccBezierConfig arg2; /** c */ + cocos2d::ccBezierConfig *arg2; /** c */ olua_check_number(L, 1, &arg1); olua_check_object(L, 2, &arg2, "cc.ccBezierConfig"); // static cocos2d::BezierBy *create(float t, const cocos2d::ccBezierConfig &c) - cocos2d::BezierBy *ret = cocos2d::BezierBy::create(arg1, arg2); + cocos2d::BezierBy *ret = cocos2d::BezierBy::create(arg1, *arg2); int num_ret = olua_push_object(L, ret, "cc.BezierBy"); olua_endinvoke(L); @@ -5270,7 +4794,7 @@ static int _cocos2d_BezierBy_create$1(lua_State *L) return num_ret; } -static int _cocos2d_BezierBy_create$2(lua_State *L) +static int _olua_fun_cocos2d_BezierBy_create$2(lua_State *L) { olua_startinvoke(L); @@ -5289,21 +4813,21 @@ static int _cocos2d_BezierBy_create$2(lua_State *L) return num_ret; } -static int _cocos2d_BezierBy_create(lua_State *L) +static int _olua_fun_cocos2d_BezierBy_create(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 2) { // if ((olua_is_number(L, 1)) && (olua_is_object(L, 2, "cc.ccBezierConfig"))) { // static cocos2d::BezierBy *create(float t, const cocos2d::ccBezierConfig &c) - return _cocos2d_BezierBy_create$1(L); + return _olua_fun_cocos2d_BezierBy_create$1(L); // } } if (num_args == 4) { // if ((olua_is_number(L, 1)) && (olua_canpack_object(L, 2, (cocos2d::ccBezierConfig *)nullptr))) { // static cocos2d::BezierBy *create(float t, @pack const cocos2d::ccBezierConfig &c) - return _cocos2d_BezierBy_create$2(L); + return _olua_fun_cocos2d_BezierBy_create$2(L); // } } @@ -5312,64 +4836,37 @@ static int _cocos2d_BezierBy_create(lua_State *L) return 0; } -static int _cocos2d_BezierBy_reverse(lua_State *L) +static int _olua_cls_cc_BezierBy(lua_State *L) { - olua_startinvoke(L); - - cocos2d::BezierBy *self = nullptr; - - olua_to_object(L, 1, &self, "cc.BezierBy"); - - // cocos2d::BezierBy *reverse() - cocos2d::BezierBy *ret = self->reverse(); - int num_ret = olua_push_object(L, ret, "cc.BezierBy"); - - olua_endinvoke(L); + oluacls_class(L, "cc.BezierBy"); + oluacls_func(L, "create", _olua_fun_cocos2d_BezierBy_create); - return num_ret; + return 1; } OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_BezierBy(lua_State *L) +OLUA_LIB int luaopen_cc_BezierBy(lua_State *L) { - oluacls_class(L, "cc.BezierBy"); - oluacls_func(L, "clone", _cocos2d_BezierBy_clone); - oluacls_func(L, "create", _cocos2d_BezierBy_create); - oluacls_func(L, "reverse", _cocos2d_BezierBy_reverse); - + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.BezierBy")) { + luaL_error(L, "class not found: cocos2d::BezierBy"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_BezierTo_clone(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::BezierTo *self = nullptr; - - olua_to_object(L, 1, &self, "cc.BezierTo"); - - // cocos2d::BezierTo *clone() - cocos2d::BezierTo *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.BezierTo"); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_BezierTo_create$1(lua_State *L) +static int _olua_fun_cocos2d_BezierTo_create$1(lua_State *L) { olua_startinvoke(L); float arg1 = 0; /** t */ - cocos2d::ccBezierConfig arg2; /** c */ + cocos2d::ccBezierConfig *arg2; /** c */ olua_check_number(L, 1, &arg1); olua_check_object(L, 2, &arg2, "cc.ccBezierConfig"); // static cocos2d::BezierTo *create(float t, const cocos2d::ccBezierConfig &c) - cocos2d::BezierTo *ret = cocos2d::BezierTo::create(arg1, arg2); + cocos2d::BezierTo *ret = cocos2d::BezierTo::create(arg1, *arg2); int num_ret = olua_push_object(L, ret, "cc.BezierTo"); olua_endinvoke(L); @@ -5377,7 +4874,7 @@ static int _cocos2d_BezierTo_create$1(lua_State *L) return num_ret; } -static int _cocos2d_BezierTo_create$2(lua_State *L) +static int _olua_fun_cocos2d_BezierTo_create$2(lua_State *L) { olua_startinvoke(L); @@ -5396,21 +4893,21 @@ static int _cocos2d_BezierTo_create$2(lua_State *L) return num_ret; } -static int _cocos2d_BezierTo_create(lua_State *L) +static int _olua_fun_cocos2d_BezierTo_create(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 2) { // if ((olua_is_number(L, 1)) && (olua_is_object(L, 2, "cc.ccBezierConfig"))) { // static cocos2d::BezierTo *create(float t, const cocos2d::ccBezierConfig &c) - return _cocos2d_BezierTo_create$1(L); + return _olua_fun_cocos2d_BezierTo_create$1(L); // } } if (num_args == 4) { // if ((olua_is_number(L, 1)) && (olua_canpack_object(L, 2, (cocos2d::ccBezierConfig *)nullptr))) { // static cocos2d::BezierTo *create(float t, @pack const cocos2d::ccBezierConfig &c) - return _cocos2d_BezierTo_create$2(L); + return _olua_fun_cocos2d_BezierTo_create$2(L); // } } @@ -5419,45 +4916,41 @@ static int _cocos2d_BezierTo_create(lua_State *L) return 0; } -static int _cocos2d_BezierTo_reverse(lua_State *L) +static int _olua_cls_cc_BezierTo(lua_State *L) { - olua_startinvoke(L); - - cocos2d::BezierTo *self = nullptr; - - olua_to_object(L, 1, &self, "cc.BezierTo"); - - // cocos2d::BezierTo *reverse() - cocos2d::BezierTo *ret = self->reverse(); - int num_ret = olua_push_object(L, ret, "cc.BezierTo"); - - olua_endinvoke(L); + oluacls_class(L, "cc.BezierTo"); + oluacls_func(L, "create", _olua_fun_cocos2d_BezierTo_create); - return num_ret; + return 1; } OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_BezierTo(lua_State *L) +OLUA_LIB int luaopen_cc_BezierTo(lua_State *L) { - oluacls_class(L, "cc.BezierTo"); - oluacls_func(L, "clone", _cocos2d_BezierTo_clone); - oluacls_func(L, "create", _cocos2d_BezierTo_create); - oluacls_func(L, "reverse", _cocos2d_BezierTo_reverse); - + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.BezierTo")) { + luaL_error(L, "class not found: cocos2d::BezierTo"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_JumpBy_clone(lua_State *L) +static int _olua_fun_cocos2d_JumpBy_create$1(lua_State *L) { olua_startinvoke(L); - cocos2d::JumpBy *self = nullptr; + float arg1 = 0; /** duration */ + cocos2d::Vec2 *arg2; /** position */ + float arg3 = 0; /** height */ + int arg4 = 0; /** jumps */ - olua_to_object(L, 1, &self, "cc.JumpBy"); + olua_check_number(L, 1, &arg1); + olua_check_object(L, 2, &arg2, "cc.Vec2"); + olua_check_number(L, 3, &arg3); + olua_check_integer(L, 4, &arg4); - // cocos2d::JumpBy *clone() - cocos2d::JumpBy *ret = self->clone(); + // static cocos2d::JumpBy *create(float duration, const cocos2d::Vec2 &position, float height, int jumps) + cocos2d::JumpBy *ret = cocos2d::JumpBy::create(arg1, *arg2, arg3, arg4); int num_ret = olua_push_object(L, ret, "cc.JumpBy"); olua_endinvoke(L); @@ -5465,30 +4958,7 @@ static int _cocos2d_JumpBy_clone(lua_State *L) return num_ret; } -static int _cocos2d_JumpBy_create$1(lua_State *L) -{ - olua_startinvoke(L); - - float arg1 = 0; /** duration */ - cocos2d::Vec2 arg2; /** position */ - float arg3 = 0; /** height */ - int arg4 = 0; /** jumps */ - - olua_check_number(L, 1, &arg1); - olua_check_object(L, 2, &arg2, "cc.Vec2"); - olua_check_number(L, 3, &arg3); - olua_check_integer(L, 4, &arg4); - - // static cocos2d::JumpBy *create(float duration, const cocos2d::Vec2 &position, float height, int jumps) - cocos2d::JumpBy *ret = cocos2d::JumpBy::create(arg1, arg2, arg3, arg4); - int num_ret = olua_push_object(L, ret, "cc.JumpBy"); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_JumpBy_create$2(lua_State *L) +static int _olua_fun_cocos2d_JumpBy_create$2(lua_State *L) { olua_startinvoke(L); @@ -5511,21 +4981,21 @@ static int _cocos2d_JumpBy_create$2(lua_State *L) return num_ret; } -static int _cocos2d_JumpBy_create(lua_State *L) +static int _olua_fun_cocos2d_JumpBy_create(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 4) { // if ((olua_is_number(L, 1)) && (olua_is_object(L, 2, "cc.Vec2")) && (olua_is_number(L, 3)) && (olua_is_integer(L, 4))) { // static cocos2d::JumpBy *create(float duration, const cocos2d::Vec2 &position, float height, int jumps) - return _cocos2d_JumpBy_create$1(L); + return _olua_fun_cocos2d_JumpBy_create$1(L); // } } if (num_args == 5) { // if ((olua_is_number(L, 1)) && (olua_canpack_object(L, 2, (cocos2d::Vec2 *)nullptr)) && (olua_is_number(L, 4)) && (olua_is_integer(L, 5))) { // static cocos2d::JumpBy *create(float duration, @pack const cocos2d::Vec2 &position, float height, int jumps) - return _cocos2d_JumpBy_create$2(L); + return _olua_fun_cocos2d_JumpBy_create$2(L); // } } @@ -5534,58 +5004,31 @@ static int _cocos2d_JumpBy_create(lua_State *L) return 0; } -static int _cocos2d_JumpBy_reverse(lua_State *L) +static int _olua_cls_cc_JumpBy(lua_State *L) { - olua_startinvoke(L); - - cocos2d::JumpBy *self = nullptr; - - olua_to_object(L, 1, &self, "cc.JumpBy"); - - // cocos2d::JumpBy *reverse() - cocos2d::JumpBy *ret = self->reverse(); - int num_ret = olua_push_object(L, ret, "cc.JumpBy"); - - olua_endinvoke(L); + oluacls_class(L, "cc.JumpBy"); + oluacls_func(L, "create", _olua_fun_cocos2d_JumpBy_create); - return num_ret; + return 1; } OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_JumpBy(lua_State *L) +OLUA_LIB int luaopen_cc_JumpBy(lua_State *L) { - oluacls_class(L, "cc.JumpBy"); - oluacls_func(L, "clone", _cocos2d_JumpBy_clone); - oluacls_func(L, "create", _cocos2d_JumpBy_create); - oluacls_func(L, "reverse", _cocos2d_JumpBy_reverse); - + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.JumpBy")) { + luaL_error(L, "class not found: cocos2d::JumpBy"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_JumpTo_clone(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::JumpTo *self = nullptr; - - olua_to_object(L, 1, &self, "cc.JumpTo"); - - // cocos2d::JumpTo *clone() - cocos2d::JumpTo *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.JumpTo"); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_JumpTo_create$1(lua_State *L) +static int _olua_fun_cocos2d_JumpTo_create$1(lua_State *L) { olua_startinvoke(L); float arg1 = 0; /** duration */ - cocos2d::Vec2 arg2; /** position */ + cocos2d::Vec2 *arg2; /** position */ float arg3 = 0; /** height */ int arg4 = 0; /** jumps */ @@ -5595,7 +5038,7 @@ static int _cocos2d_JumpTo_create$1(lua_State *L) olua_check_integer(L, 4, &arg4); // static cocos2d::JumpTo *create(float duration, const cocos2d::Vec2 &position, float height, int jumps) - cocos2d::JumpTo *ret = cocos2d::JumpTo::create(arg1, arg2, arg3, arg4); + cocos2d::JumpTo *ret = cocos2d::JumpTo::create(arg1, *arg2, arg3, arg4); int num_ret = olua_push_object(L, ret, "cc.JumpTo"); olua_endinvoke(L); @@ -5603,7 +5046,7 @@ static int _cocos2d_JumpTo_create$1(lua_State *L) return num_ret; } -static int _cocos2d_JumpTo_create$2(lua_State *L) +static int _olua_fun_cocos2d_JumpTo_create$2(lua_State *L) { olua_startinvoke(L); @@ -5626,21 +5069,21 @@ static int _cocos2d_JumpTo_create$2(lua_State *L) return num_ret; } -static int _cocos2d_JumpTo_create(lua_State *L) +static int _olua_fun_cocos2d_JumpTo_create(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 4) { // if ((olua_is_number(L, 1)) && (olua_is_object(L, 2, "cc.Vec2")) && (olua_is_number(L, 3)) && (olua_is_integer(L, 4))) { // static cocos2d::JumpTo *create(float duration, const cocos2d::Vec2 &position, float height, int jumps) - return _cocos2d_JumpTo_create$1(L); + return _olua_fun_cocos2d_JumpTo_create$1(L); // } } if (num_args == 5) { // if ((olua_is_number(L, 1)) && (olua_canpack_object(L, 2, (cocos2d::Vec2 *)nullptr)) && (olua_is_number(L, 4)) && (olua_is_integer(L, 5))) { // static cocos2d::JumpTo *create(float duration, @pack const cocos2d::Vec2 &position, float height, int jumps) - return _cocos2d_JumpTo_create$2(L); + return _olua_fun_cocos2d_JumpTo_create$2(L); // } } @@ -5649,53 +5092,26 @@ static int _cocos2d_JumpTo_create(lua_State *L) return 0; } -static int _cocos2d_JumpTo_reverse(lua_State *L) +static int _olua_cls_cc_JumpTo(lua_State *L) { - olua_startinvoke(L); - - cocos2d::JumpTo *self = nullptr; - - olua_to_object(L, 1, &self, "cc.JumpTo"); - - // cocos2d::JumpTo *reverse() - cocos2d::JumpTo *ret = self->reverse(); - int num_ret = olua_push_object(L, ret, "cc.JumpTo"); - - olua_endinvoke(L); + oluacls_class(L, "cc.JumpTo"); + oluacls_func(L, "create", _olua_fun_cocos2d_JumpTo_create); - return num_ret; + return 1; } OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_JumpTo(lua_State *L) +OLUA_LIB int luaopen_cc_JumpTo(lua_State *L) { - oluacls_class(L, "cc.JumpTo"); - oluacls_func(L, "clone", _cocos2d_JumpTo_clone); - oluacls_func(L, "create", _cocos2d_JumpTo_create); - oluacls_func(L, "reverse", _cocos2d_JumpTo_reverse); - + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.JumpTo")) { + luaL_error(L, "class not found: cocos2d::JumpTo"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_ScaleTo_clone(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::ScaleTo *self = nullptr; - - olua_to_object(L, 1, &self, "cc.ScaleTo"); - - // cocos2d::ScaleTo *clone() - cocos2d::ScaleTo *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.ScaleTo"); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_ScaleTo_create$1(lua_State *L) +static int _olua_fun_cocos2d_ScaleTo_create$1(lua_State *L) { olua_startinvoke(L); @@ -5714,7 +5130,7 @@ static int _cocos2d_ScaleTo_create$1(lua_State *L) return num_ret; } -static int _cocos2d_ScaleTo_create$2(lua_State *L) +static int _olua_fun_cocos2d_ScaleTo_create$2(lua_State *L) { olua_startinvoke(L); @@ -5735,7 +5151,7 @@ static int _cocos2d_ScaleTo_create$2(lua_State *L) return num_ret; } -static int _cocos2d_ScaleTo_create$3(lua_State *L) +static int _olua_fun_cocos2d_ScaleTo_create$3(lua_State *L) { olua_startinvoke(L); @@ -5758,28 +5174,28 @@ static int _cocos2d_ScaleTo_create$3(lua_State *L) return num_ret; } -static int _cocos2d_ScaleTo_create(lua_State *L) +static int _olua_fun_cocos2d_ScaleTo_create(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 2) { // if ((olua_is_number(L, 1)) && (olua_is_number(L, 2))) { // static cocos2d::ScaleTo *create(float duration, float s) - return _cocos2d_ScaleTo_create$1(L); + return _olua_fun_cocos2d_ScaleTo_create$1(L); // } } if (num_args == 3) { // if ((olua_is_number(L, 1)) && (olua_is_number(L, 2)) && (olua_is_number(L, 3))) { // static cocos2d::ScaleTo *create(float duration, float sx, float sy) - return _cocos2d_ScaleTo_create$2(L); + return _olua_fun_cocos2d_ScaleTo_create$2(L); // } } if (num_args == 4) { // if ((olua_is_number(L, 1)) && (olua_is_number(L, 2)) && (olua_is_number(L, 3)) && (olua_is_number(L, 4))) { // static cocos2d::ScaleTo *create(float duration, float sx, float sy, float sz) - return _cocos2d_ScaleTo_create$3(L); + return _olua_fun_cocos2d_ScaleTo_create$3(L); // } } @@ -5788,53 +5204,26 @@ static int _cocos2d_ScaleTo_create(lua_State *L) return 0; } -static int _cocos2d_ScaleTo_reverse(lua_State *L) +static int _olua_cls_cc_ScaleTo(lua_State *L) { - olua_startinvoke(L); - - cocos2d::ScaleTo *self = nullptr; - - olua_to_object(L, 1, &self, "cc.ScaleTo"); - - // cocos2d::ScaleTo *reverse() - cocos2d::ScaleTo *ret = self->reverse(); - int num_ret = olua_push_object(L, ret, "cc.ScaleTo"); - - olua_endinvoke(L); + oluacls_class(L, "cc.ScaleTo"); + oluacls_func(L, "create", _olua_fun_cocos2d_ScaleTo_create); - return num_ret; + return 1; } OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ScaleTo(lua_State *L) +OLUA_LIB int luaopen_cc_ScaleTo(lua_State *L) { - oluacls_class(L, "cc.ScaleTo"); - oluacls_func(L, "clone", _cocos2d_ScaleTo_clone); - oluacls_func(L, "create", _cocos2d_ScaleTo_create); - oluacls_func(L, "reverse", _cocos2d_ScaleTo_reverse); - + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.ScaleTo")) { + luaL_error(L, "class not found: cocos2d::ScaleTo"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_ScaleBy_clone(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::ScaleBy *self = nullptr; - - olua_to_object(L, 1, &self, "cc.ScaleBy"); - - // cocos2d::ScaleBy *clone() - cocos2d::ScaleBy *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.ScaleBy"); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_ScaleBy_create$1(lua_State *L) +static int _olua_fun_cocos2d_ScaleBy_create$1(lua_State *L) { olua_startinvoke(L); @@ -5853,7 +5242,7 @@ static int _cocos2d_ScaleBy_create$1(lua_State *L) return num_ret; } -static int _cocos2d_ScaleBy_create$2(lua_State *L) +static int _olua_fun_cocos2d_ScaleBy_create$2(lua_State *L) { olua_startinvoke(L); @@ -5874,7 +5263,7 @@ static int _cocos2d_ScaleBy_create$2(lua_State *L) return num_ret; } -static int _cocos2d_ScaleBy_create$3(lua_State *L) +static int _olua_fun_cocos2d_ScaleBy_create$3(lua_State *L) { olua_startinvoke(L); @@ -5897,28 +5286,28 @@ static int _cocos2d_ScaleBy_create$3(lua_State *L) return num_ret; } -static int _cocos2d_ScaleBy_create(lua_State *L) +static int _olua_fun_cocos2d_ScaleBy_create(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 2) { // if ((olua_is_number(L, 1)) && (olua_is_number(L, 2))) { // static cocos2d::ScaleBy *create(float duration, float s) - return _cocos2d_ScaleBy_create$1(L); + return _olua_fun_cocos2d_ScaleBy_create$1(L); // } } if (num_args == 3) { // if ((olua_is_number(L, 1)) && (olua_is_number(L, 2)) && (olua_is_number(L, 3))) { // static cocos2d::ScaleBy *create(float duration, float sx, float sy) - return _cocos2d_ScaleBy_create$2(L); + return _olua_fun_cocos2d_ScaleBy_create$2(L); // } } if (num_args == 4) { // if ((olua_is_number(L, 1)) && (olua_is_number(L, 2)) && (olua_is_number(L, 3)) && (olua_is_number(L, 4))) { // static cocos2d::ScaleBy *create(float duration, float sx, float sy, float sz) - return _cocos2d_ScaleBy_create$3(L); + return _olua_fun_cocos2d_ScaleBy_create$3(L); // } } @@ -5927,53 +5316,26 @@ static int _cocos2d_ScaleBy_create(lua_State *L) return 0; } -static int _cocos2d_ScaleBy_reverse(lua_State *L) +static int _olua_cls_cc_ScaleBy(lua_State *L) { - olua_startinvoke(L); - - cocos2d::ScaleBy *self = nullptr; - - olua_to_object(L, 1, &self, "cc.ScaleBy"); - - // cocos2d::ScaleBy *reverse() - cocos2d::ScaleBy *ret = self->reverse(); - int num_ret = olua_push_object(L, ret, "cc.ScaleBy"); - - olua_endinvoke(L); + oluacls_class(L, "cc.ScaleBy"); + oluacls_func(L, "create", _olua_fun_cocos2d_ScaleBy_create); - return num_ret; + return 1; } OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ScaleBy(lua_State *L) +OLUA_LIB int luaopen_cc_ScaleBy(lua_State *L) { - oluacls_class(L, "cc.ScaleBy"); - oluacls_func(L, "clone", _cocos2d_ScaleBy_clone); - oluacls_func(L, "create", _cocos2d_ScaleBy_create); - oluacls_func(L, "reverse", _cocos2d_ScaleBy_reverse); - + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.ScaleBy")) { + luaL_error(L, "class not found: cocos2d::ScaleBy"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_ScaleFrom_clone(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::ScaleFrom *self = nullptr; - - olua_to_object(L, 1, &self, "cc.ScaleFrom"); - - // cocos2d::ScaleFrom *clone() - cocos2d::ScaleFrom *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.ScaleFrom"); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_ScaleFrom_create$1(lua_State *L) +static int _olua_fun_cocos2d_ScaleFrom_create$1(lua_State *L) { olua_startinvoke(L); @@ -5992,7 +5354,7 @@ static int _cocos2d_ScaleFrom_create$1(lua_State *L) return num_ret; } -static int _cocos2d_ScaleFrom_create$2(lua_State *L) +static int _olua_fun_cocos2d_ScaleFrom_create$2(lua_State *L) { olua_startinvoke(L); @@ -6013,7 +5375,7 @@ static int _cocos2d_ScaleFrom_create$2(lua_State *L) return num_ret; } -static int _cocos2d_ScaleFrom_create$3(lua_State *L) +static int _olua_fun_cocos2d_ScaleFrom_create$3(lua_State *L) { olua_startinvoke(L); @@ -6036,28 +5398,28 @@ static int _cocos2d_ScaleFrom_create$3(lua_State *L) return num_ret; } -static int _cocos2d_ScaleFrom_create(lua_State *L) +static int _olua_fun_cocos2d_ScaleFrom_create(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 2) { // if ((olua_is_number(L, 1)) && (olua_is_number(L, 2))) { // static cocos2d::ScaleFrom *create(float duration, float s) - return _cocos2d_ScaleFrom_create$1(L); + return _olua_fun_cocos2d_ScaleFrom_create$1(L); // } } if (num_args == 3) { // if ((olua_is_number(L, 1)) && (olua_is_number(L, 2)) && (olua_is_number(L, 3))) { // static cocos2d::ScaleFrom *create(float duration, float sx, float sy) - return _cocos2d_ScaleFrom_create$2(L); + return _olua_fun_cocos2d_ScaleFrom_create$2(L); // } } if (num_args == 4) { // if ((olua_is_number(L, 1)) && (olua_is_number(L, 2)) && (olua_is_number(L, 3)) && (olua_is_number(L, 4))) { // static cocos2d::ScaleFrom *create(float duration, float sx, float sy, float sz) - return _cocos2d_ScaleFrom_create$3(L); + return _olua_fun_cocos2d_ScaleFrom_create$3(L); // } } @@ -6066,53 +5428,26 @@ static int _cocos2d_ScaleFrom_create(lua_State *L) return 0; } -static int _cocos2d_ScaleFrom_reverse(lua_State *L) +static int _olua_cls_cc_ScaleFrom(lua_State *L) { - olua_startinvoke(L); - - cocos2d::ScaleFrom *self = nullptr; - - olua_to_object(L, 1, &self, "cc.ScaleFrom"); - - // cocos2d::ScaleFrom *reverse() - cocos2d::ScaleFrom *ret = self->reverse(); - int num_ret = olua_push_object(L, ret, "cc.ScaleFrom"); - - olua_endinvoke(L); + oluacls_class(L, "cc.ScaleFrom"); + oluacls_func(L, "create", _olua_fun_cocos2d_ScaleFrom_create); - return num_ret; + return 1; } OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ScaleFrom(lua_State *L) +OLUA_LIB int luaopen_cc_ScaleFrom(lua_State *L) { - oluacls_class(L, "cc.ScaleFrom"); - oluacls_func(L, "clone", _cocos2d_ScaleFrom_clone); - oluacls_func(L, "create", _cocos2d_ScaleFrom_create); - oluacls_func(L, "reverse", _cocos2d_ScaleFrom_reverse); - + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.ScaleFrom")) { + luaL_error(L, "class not found: cocos2d::ScaleFrom"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_Blink_clone(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::Blink *self = nullptr; - - olua_to_object(L, 1, &self, "cc.Blink"); - - // cocos2d::Blink *clone() - cocos2d::Blink *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.Blink"); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_Blink_create(lua_State *L) +static int _olua_fun_cocos2d_Blink_create(lua_State *L) { olua_startinvoke(L); @@ -6131,53 +5466,26 @@ static int _cocos2d_Blink_create(lua_State *L) return num_ret; } -static int _cocos2d_Blink_reverse(lua_State *L) +static int _olua_cls_cc_Blink(lua_State *L) { - olua_startinvoke(L); - - cocos2d::Blink *self = nullptr; - - olua_to_object(L, 1, &self, "cc.Blink"); - - // cocos2d::Blink *reverse() - cocos2d::Blink *ret = self->reverse(); - int num_ret = olua_push_object(L, ret, "cc.Blink"); - - olua_endinvoke(L); + oluacls_class(L, "cc.Blink"); + oluacls_func(L, "create", _olua_fun_cocos2d_Blink_create); - return num_ret; + return 1; } OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_Blink(lua_State *L) +OLUA_LIB int luaopen_cc_Blink(lua_State *L) { - oluacls_class(L, "cc.Blink"); - oluacls_func(L, "clone", _cocos2d_Blink_clone); - oluacls_func(L, "create", _cocos2d_Blink_create); - oluacls_func(L, "reverse", _cocos2d_Blink_reverse); - + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.Blink")) { + luaL_error(L, "class not found: cocos2d::Blink"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_FadeTo_clone(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::FadeTo *self = nullptr; - - olua_to_object(L, 1, &self, "cc.FadeTo"); - - // cocos2d::FadeTo *clone() - cocos2d::FadeTo *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.FadeTo"); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_FadeTo_create(lua_State *L) +static int _olua_fun_cocos2d_FadeTo_create(lua_State *L) { olua_startinvoke(L); @@ -6196,53 +5504,26 @@ static int _cocos2d_FadeTo_create(lua_State *L) return num_ret; } -static int _cocos2d_FadeTo_reverse(lua_State *L) +static int _olua_cls_cc_FadeTo(lua_State *L) { - olua_startinvoke(L); - - cocos2d::FadeTo *self = nullptr; - - olua_to_object(L, 1, &self, "cc.FadeTo"); - - // cocos2d::FadeTo *reverse() - cocos2d::FadeTo *ret = self->reverse(); - int num_ret = olua_push_object(L, ret, "cc.FadeTo"); - - olua_endinvoke(L); + oluacls_class(L, "cc.FadeTo"); + oluacls_func(L, "create", _olua_fun_cocos2d_FadeTo_create); - return num_ret; + return 1; } OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_FadeTo(lua_State *L) +OLUA_LIB int luaopen_cc_FadeTo(lua_State *L) { - oluacls_class(L, "cc.FadeTo"); - oluacls_func(L, "clone", _cocos2d_FadeTo_clone); - oluacls_func(L, "create", _cocos2d_FadeTo_create); - oluacls_func(L, "reverse", _cocos2d_FadeTo_reverse); - + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.FadeTo")) { + luaL_error(L, "class not found: cocos2d::FadeTo"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_FadeFrom_clone(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::FadeFrom *self = nullptr; - - olua_to_object(L, 1, &self, "cc.FadeFrom"); - - // cocos2d::FadeFrom *clone() - cocos2d::FadeFrom *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.FadeFrom"); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_FadeFrom_create(lua_State *L) +static int _olua_fun_cocos2d_FadeFrom_create(lua_State *L) { olua_startinvoke(L); @@ -6261,53 +5542,26 @@ static int _cocos2d_FadeFrom_create(lua_State *L) return num_ret; } -static int _cocos2d_FadeFrom_reverse(lua_State *L) +static int _olua_cls_cc_FadeFrom(lua_State *L) { - olua_startinvoke(L); - - cocos2d::FadeFrom *self = nullptr; - - olua_to_object(L, 1, &self, "cc.FadeFrom"); - - // cocos2d::FadeFrom *reverse() - cocos2d::FadeFrom *ret = self->reverse(); - int num_ret = olua_push_object(L, ret, "cc.FadeFrom"); - - olua_endinvoke(L); + oluacls_class(L, "cc.FadeFrom"); + oluacls_func(L, "create", _olua_fun_cocos2d_FadeFrom_create); - return num_ret; + return 1; } OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_FadeFrom(lua_State *L) +OLUA_LIB int luaopen_cc_FadeFrom(lua_State *L) { - oluacls_class(L, "cc.FadeFrom"); - oluacls_func(L, "clone", _cocos2d_FadeFrom_clone); - oluacls_func(L, "create", _cocos2d_FadeFrom_create); - oluacls_func(L, "reverse", _cocos2d_FadeFrom_reverse); - + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.FadeFrom")) { + luaL_error(L, "class not found: cocos2d::FadeFrom"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_FadeIn_clone(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::FadeIn *self = nullptr; - - olua_to_object(L, 1, &self, "cc.FadeIn"); - - // cocos2d::FadeIn *clone() - cocos2d::FadeIn *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.FadeIn"); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_FadeIn_create(lua_State *L) +static int _olua_fun_cocos2d_FadeIn_create(lua_State *L) { olua_startinvoke(L); @@ -6324,35 +5578,26 @@ static int _cocos2d_FadeIn_create(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_FadeIn(lua_State *L) +static int _olua_cls_cc_FadeIn(lua_State *L) { oluacls_class(L, "cc.FadeIn"); - oluacls_func(L, "clone", _cocos2d_FadeIn_clone); - oluacls_func(L, "create", _cocos2d_FadeIn_create); + oluacls_func(L, "create", _olua_fun_cocos2d_FadeIn_create); return 1; } -OLUA_END_DECLS -static int _cocos2d_FadeOut_clone(lua_State *L) +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_FadeIn(lua_State *L) { - olua_startinvoke(L); - - cocos2d::FadeOut *self = nullptr; - - olua_to_object(L, 1, &self, "cc.FadeOut"); - - // cocos2d::FadeOut *clone() - cocos2d::FadeOut *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.FadeOut"); - - olua_endinvoke(L); - - return num_ret; + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.FadeIn")) { + luaL_error(L, "class not found: cocos2d::FadeIn"); + } + return 1; } +OLUA_END_DECLS -static int _cocos2d_FadeOut_create(lua_State *L) +static int _olua_fun_cocos2d_FadeOut_create(lua_State *L) { olua_startinvoke(L); @@ -6369,35 +5614,26 @@ static int _cocos2d_FadeOut_create(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_FadeOut(lua_State *L) +static int _olua_cls_cc_FadeOut(lua_State *L) { oluacls_class(L, "cc.FadeOut"); - oluacls_func(L, "clone", _cocos2d_FadeOut_clone); - oluacls_func(L, "create", _cocos2d_FadeOut_create); + oluacls_func(L, "create", _olua_fun_cocos2d_FadeOut_create); return 1; } -OLUA_END_DECLS -static int _cocos2d_TintTo_clone(lua_State *L) +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_FadeOut(lua_State *L) { - olua_startinvoke(L); - - cocos2d::TintTo *self = nullptr; - - olua_to_object(L, 1, &self, "cc.TintTo"); - - // cocos2d::TintTo *clone() - cocos2d::TintTo *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.TintTo"); - - olua_endinvoke(L); - - return num_ret; + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.FadeOut")) { + luaL_error(L, "class not found: cocos2d::FadeOut"); + } + return 1; } +OLUA_END_DECLS -static int _cocos2d_TintTo_create$1(lua_State *L) +static int _olua_fun_cocos2d_TintTo_create$1(lua_State *L) { olua_startinvoke(L); @@ -6420,7 +5656,7 @@ static int _cocos2d_TintTo_create$1(lua_State *L) return num_ret; } -static int _cocos2d_TintTo_create$2(lua_State *L) +static int _olua_fun_cocos2d_TintTo_create$2(lua_State *L) { olua_startinvoke(L); @@ -6439,21 +5675,21 @@ static int _cocos2d_TintTo_create$2(lua_State *L) return num_ret; } -static int _cocos2d_TintTo_create(lua_State *L) +static int _olua_fun_cocos2d_TintTo_create(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 2) { // if ((olua_is_number(L, 1)) && (olua_is_cocos2d_Color3B(L, 2))) { // static cocos2d::TintTo *create(float duration, const cocos2d::Color3B &color) - return _cocos2d_TintTo_create$2(L); + return _olua_fun_cocos2d_TintTo_create$2(L); // } } if (num_args == 4) { // if ((olua_is_number(L, 1)) && (olua_is_integer(L, 2)) && (olua_is_integer(L, 3)) && (olua_is_integer(L, 4))) { // static cocos2d::TintTo *create(float duration, uint8_t red, uint8_t green, uint8_t blue) - return _cocos2d_TintTo_create$1(L); + return _olua_fun_cocos2d_TintTo_create$1(L); // } } @@ -6462,53 +5698,26 @@ static int _cocos2d_TintTo_create(lua_State *L) return 0; } -static int _cocos2d_TintTo_reverse(lua_State *L) +static int _olua_cls_cc_TintTo(lua_State *L) { - olua_startinvoke(L); + oluacls_class(L, "cc.TintTo"); + oluacls_func(L, "create", _olua_fun_cocos2d_TintTo_create); - cocos2d::TintTo *self = nullptr; - - olua_to_object(L, 1, &self, "cc.TintTo"); - - // cocos2d::TintTo *reverse() - cocos2d::TintTo *ret = self->reverse(); - int num_ret = olua_push_object(L, ret, "cc.TintTo"); - - olua_endinvoke(L); - - return num_ret; + return 1; } OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_TintTo(lua_State *L) +OLUA_LIB int luaopen_cc_TintTo(lua_State *L) { - oluacls_class(L, "cc.TintTo"); - oluacls_func(L, "clone", _cocos2d_TintTo_clone); - oluacls_func(L, "create", _cocos2d_TintTo_create); - oluacls_func(L, "reverse", _cocos2d_TintTo_reverse); - + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.TintTo")) { + luaL_error(L, "class not found: cocos2d::TintTo"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_TintBy_clone(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::TintBy *self = nullptr; - - olua_to_object(L, 1, &self, "cc.TintBy"); - - // cocos2d::TintBy *clone() - cocos2d::TintBy *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.TintBy"); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_TintBy_create(lua_State *L) +static int _olua_fun_cocos2d_TintBy_create(lua_State *L) { olua_startinvoke(L); @@ -6531,53 +5740,26 @@ static int _cocos2d_TintBy_create(lua_State *L) return num_ret; } -static int _cocos2d_TintBy_reverse(lua_State *L) +static int _olua_cls_cc_TintBy(lua_State *L) { - olua_startinvoke(L); - - cocos2d::TintBy *self = nullptr; - - olua_to_object(L, 1, &self, "cc.TintBy"); - - // cocos2d::TintBy *reverse() - cocos2d::TintBy *ret = self->reverse(); - int num_ret = olua_push_object(L, ret, "cc.TintBy"); - - olua_endinvoke(L); + oluacls_class(L, "cc.TintBy"); + oluacls_func(L, "create", _olua_fun_cocos2d_TintBy_create); - return num_ret; + return 1; } OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_TintBy(lua_State *L) +OLUA_LIB int luaopen_cc_TintBy(lua_State *L) { - oluacls_class(L, "cc.TintBy"); - oluacls_func(L, "clone", _cocos2d_TintBy_clone); - oluacls_func(L, "create", _cocos2d_TintBy_create); - oluacls_func(L, "reverse", _cocos2d_TintBy_reverse); - + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.TintBy")) { + luaL_error(L, "class not found: cocos2d::TintBy"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_DelayTime_clone(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::DelayTime *self = nullptr; - - olua_to_object(L, 1, &self, "cc.DelayTime"); - - // cocos2d::DelayTime *clone() - cocos2d::DelayTime *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.DelayTime"); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_DelayTime_create(lua_State *L) +static int _olua_fun_cocos2d_DelayTime_create(lua_State *L) { olua_startinvoke(L); @@ -6594,53 +5776,26 @@ static int _cocos2d_DelayTime_create(lua_State *L) return num_ret; } -static int _cocos2d_DelayTime_reverse(lua_State *L) +static int _olua_cls_cc_DelayTime(lua_State *L) { - olua_startinvoke(L); - - cocos2d::DelayTime *self = nullptr; - - olua_to_object(L, 1, &self, "cc.DelayTime"); - - // cocos2d::DelayTime *reverse() - cocos2d::DelayTime *ret = self->reverse(); - int num_ret = olua_push_object(L, ret, "cc.DelayTime"); - - olua_endinvoke(L); + oluacls_class(L, "cc.DelayTime"); + oluacls_func(L, "create", _olua_fun_cocos2d_DelayTime_create); - return num_ret; + return 1; } OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_DelayTime(lua_State *L) +OLUA_LIB int luaopen_cc_DelayTime(lua_State *L) { - oluacls_class(L, "cc.DelayTime"); - oluacls_func(L, "clone", _cocos2d_DelayTime_clone); - oluacls_func(L, "create", _cocos2d_DelayTime_create); - oluacls_func(L, "reverse", _cocos2d_DelayTime_reverse); - + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.DelayTime")) { + luaL_error(L, "class not found: cocos2d::DelayTime"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_ReverseTime_clone(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::ReverseTime *self = nullptr; - - olua_to_object(L, 1, &self, "cc.ReverseTime"); - - // cocos2d::ReverseTime *clone() - cocos2d::ReverseTime *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.ReverseTime"); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_ReverseTime_create(lua_State *L) +static int _olua_fun_cocos2d_ReverseTime_create(lua_State *L) { olua_startinvoke(L); @@ -6660,53 +5815,26 @@ static int _cocos2d_ReverseTime_create(lua_State *L) return num_ret; } -static int _cocos2d_ReverseTime_reverse(lua_State *L) +static int _olua_cls_cc_ReverseTime(lua_State *L) { - olua_startinvoke(L); - - cocos2d::ReverseTime *self = nullptr; - - olua_to_object(L, 1, &self, "cc.ReverseTime"); - - // cocos2d::ReverseTime *reverse() - cocos2d::ReverseTime *ret = self->reverse(); - int num_ret = olua_push_object(L, ret, "cc.ReverseTime"); - - olua_endinvoke(L); + oluacls_class(L, "cc.ReverseTime"); + oluacls_func(L, "create", _olua_fun_cocos2d_ReverseTime_create); - return num_ret; + return 1; } OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ReverseTime(lua_State *L) +OLUA_LIB int luaopen_cc_ReverseTime(lua_State *L) { - oluacls_class(L, "cc.ReverseTime"); - oluacls_func(L, "clone", _cocos2d_ReverseTime_clone); - oluacls_func(L, "create", _cocos2d_ReverseTime_create); - oluacls_func(L, "reverse", _cocos2d_ReverseTime_reverse); - + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.ReverseTime")) { + luaL_error(L, "class not found: cocos2d::ReverseTime"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_Animate_clone(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::Animate *self = nullptr; - - olua_to_object(L, 1, &self, "cc.Animate"); - - // cocos2d::Animate *clone() - cocos2d::Animate *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.Animate"); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_Animate_create(lua_State *L) +static int _olua_fun_cocos2d_Animate_create(lua_State *L) { olua_startinvoke(L); @@ -6723,7 +5851,7 @@ static int _cocos2d_Animate_create(lua_State *L) return num_ret; } -static int _cocos2d_Animate_getAnimation(lua_State *L) +static int _olua_fun_cocos2d_Animate_getAnimation(lua_State *L) { olua_startinvoke(L); @@ -6740,7 +5868,7 @@ static int _cocos2d_Animate_getAnimation(lua_State *L) return num_ret; } -static int _cocos2d_Animate_getCurrentFrameIndex(lua_State *L) +static int _olua_fun_cocos2d_Animate_getCurrentFrameIndex(lua_State *L) { olua_startinvoke(L); @@ -6757,24 +5885,7 @@ static int _cocos2d_Animate_getCurrentFrameIndex(lua_State *L) return num_ret; } -static int _cocos2d_Animate_reverse(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::Animate *self = nullptr; - - olua_to_object(L, 1, &self, "cc.Animate"); - - // cocos2d::Animate *reverse() - cocos2d::Animate *ret = self->reverse(); - int num_ret = olua_push_object(L, ret, "cc.Animate"); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_Animate_setAnimation(lua_State *L) +static int _olua_fun_cocos2d_Animate_setAnimation(lua_State *L) { olua_startinvoke(L); @@ -6792,41 +5903,31 @@ static int _cocos2d_Animate_setAnimation(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_Animate(lua_State *L) +static int _olua_cls_cc_Animate(lua_State *L) { oluacls_class(L, "cc.Animate"); - oluacls_func(L, "clone", _cocos2d_Animate_clone); - oluacls_func(L, "create", _cocos2d_Animate_create); - oluacls_func(L, "getAnimation", _cocos2d_Animate_getAnimation); - oluacls_func(L, "getCurrentFrameIndex", _cocos2d_Animate_getCurrentFrameIndex); - oluacls_func(L, "reverse", _cocos2d_Animate_reverse); - oluacls_func(L, "setAnimation", _cocos2d_Animate_setAnimation); - oluacls_prop(L, "animation", _cocos2d_Animate_getAnimation, _cocos2d_Animate_setAnimation); - oluacls_prop(L, "currentFrameIndex", _cocos2d_Animate_getCurrentFrameIndex, nullptr); + oluacls_func(L, "create", _olua_fun_cocos2d_Animate_create); + oluacls_func(L, "getAnimation", _olua_fun_cocos2d_Animate_getAnimation); + oluacls_func(L, "getCurrentFrameIndex", _olua_fun_cocos2d_Animate_getCurrentFrameIndex); + oluacls_func(L, "setAnimation", _olua_fun_cocos2d_Animate_setAnimation); + oluacls_prop(L, "animation", _olua_fun_cocos2d_Animate_getAnimation, _olua_fun_cocos2d_Animate_setAnimation); + oluacls_prop(L, "currentFrameIndex", _olua_fun_cocos2d_Animate_getCurrentFrameIndex, nullptr); return 1; } -OLUA_END_DECLS -static int _cocos2d_TargetedAction_clone(lua_State *L) +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_Animate(lua_State *L) { - olua_startinvoke(L); - - cocos2d::TargetedAction *self = nullptr; - - olua_to_object(L, 1, &self, "cc.TargetedAction"); - - // cocos2d::TargetedAction *clone() - cocos2d::TargetedAction *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.TargetedAction"); - - olua_endinvoke(L); - - return num_ret; + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.Animate")) { + luaL_error(L, "class not found: cocos2d::Animate"); + } + return 1; } +OLUA_END_DECLS -static int _cocos2d_TargetedAction_create(lua_State *L) +static int _olua_fun_cocos2d_TargetedAction_create(lua_State *L) { olua_startinvoke(L); @@ -6848,7 +5949,7 @@ static int _cocos2d_TargetedAction_create(lua_State *L) return num_ret; } -static int _cocos2d_TargetedAction_getForcedTarget(lua_State *L) +static int _olua_fun_cocos2d_TargetedAction_getForcedTarget(lua_State *L) { olua_startinvoke(L); @@ -6865,7 +5966,7 @@ static int _cocos2d_TargetedAction_getForcedTarget(lua_State *L) return num_ret; } -static int _cocos2d_TargetedAction_initWithTarget(lua_State *L) +static int _olua_fun_cocos2d_TargetedAction_initWithTarget(lua_State *L) { olua_startinvoke(L); @@ -6886,24 +5987,7 @@ static int _cocos2d_TargetedAction_initWithTarget(lua_State *L) return num_ret; } -static int _cocos2d_TargetedAction_reverse(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::TargetedAction *self = nullptr; - - olua_to_object(L, 1, &self, "cc.TargetedAction"); - - // cocos2d::TargetedAction *reverse() - cocos2d::TargetedAction *ret = self->reverse(); - int num_ret = olua_push_object(L, ret, "cc.TargetedAction"); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_TargetedAction_setForcedTarget(lua_State *L) +static int _olua_fun_cocos2d_TargetedAction_setForcedTarget(lua_State *L) { olua_startinvoke(L); @@ -6921,23 +6005,30 @@ static int _cocos2d_TargetedAction_setForcedTarget(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_TargetedAction(lua_State *L) +static int _olua_cls_cc_TargetedAction(lua_State *L) { oluacls_class(L, "cc.TargetedAction"); - oluacls_func(L, "clone", _cocos2d_TargetedAction_clone); - oluacls_func(L, "create", _cocos2d_TargetedAction_create); - oluacls_func(L, "getForcedTarget", _cocos2d_TargetedAction_getForcedTarget); - oluacls_func(L, "initWithTarget", _cocos2d_TargetedAction_initWithTarget); - oluacls_func(L, "reverse", _cocos2d_TargetedAction_reverse); - oluacls_func(L, "setForcedTarget", _cocos2d_TargetedAction_setForcedTarget); - oluacls_prop(L, "forcedTarget", _cocos2d_TargetedAction_getForcedTarget, _cocos2d_TargetedAction_setForcedTarget); + oluacls_func(L, "create", _olua_fun_cocos2d_TargetedAction_create); + oluacls_func(L, "getForcedTarget", _olua_fun_cocos2d_TargetedAction_getForcedTarget); + oluacls_func(L, "initWithTarget", _olua_fun_cocos2d_TargetedAction_initWithTarget); + oluacls_func(L, "setForcedTarget", _olua_fun_cocos2d_TargetedAction_setForcedTarget); + oluacls_prop(L, "forcedTarget", _olua_fun_cocos2d_TargetedAction_getForcedTarget, _olua_fun_cocos2d_TargetedAction_setForcedTarget); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_TargetedAction(lua_State *L) +{ + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.TargetedAction")) { + luaL_error(L, "class not found: cocos2d::TargetedAction"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_ActionFloat_ActionFloatCallback___call(lua_State *L) +static int _olua_fun_cocos2d_ActionFloat_ActionFloatCallback___call(lua_State *L) { olua_startinvoke(L); @@ -6949,34 +6040,26 @@ static int _cocos2d_ActionFloat_ActionFloatCallback___call(lua_State *L) return 1; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ActionFloat_ActionFloatCallback(lua_State *L) +static int _olua_cls_cc_ActionFloat_ActionFloatCallback(lua_State *L) { oluacls_class(L, "cc.ActionFloat.ActionFloatCallback"); - oluacls_func(L, "__call", _cocos2d_ActionFloat_ActionFloatCallback___call); + oluacls_func(L, "__call", _olua_fun_cocos2d_ActionFloat_ActionFloatCallback___call); return 1; } -OLUA_END_DECLS -static int _cocos2d_ActionFloat_clone(lua_State *L) +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_ActionFloat_ActionFloatCallback(lua_State *L) { - olua_startinvoke(L); - - cocos2d::ActionFloat *self = nullptr; - - olua_to_object(L, 1, &self, "cc.ActionFloat"); - - // cocos2d::ActionFloat *clone() - cocos2d::ActionFloat *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.ActionFloat"); - - olua_endinvoke(L); - - return num_ret; + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.ActionFloat.ActionFloatCallback")) { + luaL_error(L, "class not found: cocos2d::ActionFloat::ActionFloatCallback"); + } + return 1; } +OLUA_END_DECLS -static int _cocos2d_ActionFloat_create(lua_State *L) +static int _olua_fun_cocos2d_ActionFloat_create(lua_State *L) { olua_startinvoke(L); @@ -6992,15 +6075,16 @@ static int _cocos2d_ActionFloat_create(lua_State *L) void *cb_store = (void *)olua_newobjstub(L, "cc.ActionFloat"); std::string cb_tag = "ActionFloat"; - std::string cb_name = olua_setcallback(L, cb_store, 4, cb_tag.c_str(), OLUA_TAG_NEW); + std::string cb_name = olua_setcallback(L, cb_store, 4, cb_tag.c_str(), OLUA_TAG_NEW); olua_Context cb_ctx = olua_context(L); - arg4 = [cb_store, cb_name, cb_ctx](float arg1) { + // lua_State *ML = olua_mainthread(L); + arg4 = [cb_store, cb_name, cb_ctx /*, ML */](float cb_arg1) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); if (olua_contextequal(L, cb_ctx)) { int top = lua_gettop(L); - olua_push_number(L, arg1); + olua_push_number(L, cb_arg1); olua_callback(L, cb_store, cb_name.c_str(), 1); @@ -7008,7 +6092,7 @@ static int _cocos2d_ActionFloat_create(lua_State *L) } }; - // static cocos2d::ActionFloat *create(float duration, float from, float to, @localvar cocos2d::ActionFloat::ActionFloatCallback callback) + // static cocos2d::ActionFloat *create(float duration, float from, float to, cocos2d::ActionFloat::ActionFloatCallback callback) cocos2d::ActionFloat *ret = cocos2d::ActionFloat::create(arg1, arg2, arg3, arg4); if (olua_pushobjstub(L, ret, cb_store, "cc.ActionFloat") == OLUA_OBJ_EXIST) { lua_pushstring(L, cb_name.c_str()); @@ -7023,53 +6107,26 @@ static int _cocos2d_ActionFloat_create(lua_State *L) return 1; } -static int _cocos2d_ActionFloat_reverse(lua_State *L) +static int _olua_cls_cc_ActionFloat(lua_State *L) { - olua_startinvoke(L); - - cocos2d::ActionFloat *self = nullptr; - - olua_to_object(L, 1, &self, "cc.ActionFloat"); - - // cocos2d::ActionFloat *reverse() - cocos2d::ActionFloat *ret = self->reverse(); - int num_ret = olua_push_object(L, ret, "cc.ActionFloat"); - - olua_endinvoke(L); + oluacls_class(L, "cc.ActionFloat"); + oluacls_func(L, "create", _olua_fun_cocos2d_ActionFloat_create); - return num_ret; + return 1; } OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ActionFloat(lua_State *L) +OLUA_LIB int luaopen_cc_ActionFloat(lua_State *L) { - oluacls_class(L, "cc.ActionFloat"); - oluacls_func(L, "clone", _cocos2d_ActionFloat_clone); - oluacls_func(L, "create", _cocos2d_ActionFloat_create); - oluacls_func(L, "reverse", _cocos2d_ActionFloat_reverse); - + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.ActionFloat")) { + luaL_error(L, "class not found: cocos2d::ActionFloat"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_ProgressTo_clone(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::ProgressTo *self = nullptr; - - olua_to_object(L, 1, &self, "cc.ProgressTo"); - - // cocos2d::ProgressTo *clone() - cocos2d::ProgressTo *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.ProgressTo"); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_ProgressTo_create(lua_State *L) +static int _olua_fun_cocos2d_ProgressTo_create(lua_State *L) { olua_startinvoke(L); @@ -7088,53 +6145,26 @@ static int _cocos2d_ProgressTo_create(lua_State *L) return num_ret; } -static int _cocos2d_ProgressTo_reverse(lua_State *L) +static int _olua_cls_cc_ProgressTo(lua_State *L) { - olua_startinvoke(L); - - cocos2d::ProgressTo *self = nullptr; - - olua_to_object(L, 1, &self, "cc.ProgressTo"); - - // cocos2d::ProgressTo *reverse() - cocos2d::ProgressTo *ret = self->reverse(); - int num_ret = olua_push_object(L, ret, "cc.ProgressTo"); - - olua_endinvoke(L); + oluacls_class(L, "cc.ProgressTo"); + oluacls_func(L, "create", _olua_fun_cocos2d_ProgressTo_create); - return num_ret; + return 1; } OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ProgressTo(lua_State *L) +OLUA_LIB int luaopen_cc_ProgressTo(lua_State *L) { - oluacls_class(L, "cc.ProgressTo"); - oluacls_func(L, "clone", _cocos2d_ProgressTo_clone); - oluacls_func(L, "create", _cocos2d_ProgressTo_create); - oluacls_func(L, "reverse", _cocos2d_ProgressTo_reverse); - + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.ProgressTo")) { + luaL_error(L, "class not found: cocos2d::ProgressTo"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_ProgressFromTo_clone(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::ProgressFromTo *self = nullptr; - - olua_to_object(L, 1, &self, "cc.ProgressFromTo"); - - // cocos2d::ProgressFromTo *clone() - cocos2d::ProgressFromTo *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.ProgressFromTo"); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_ProgressFromTo_create(lua_State *L) +static int _olua_fun_cocos2d_ProgressFromTo_create(lua_State *L) { olua_startinvoke(L); @@ -7155,36 +6185,26 @@ static int _cocos2d_ProgressFromTo_create(lua_State *L) return num_ret; } -static int _cocos2d_ProgressFromTo_reverse(lua_State *L) +static int _olua_cls_cc_ProgressFromTo(lua_State *L) { - olua_startinvoke(L); - - cocos2d::ProgressFromTo *self = nullptr; - - olua_to_object(L, 1, &self, "cc.ProgressFromTo"); - - // cocos2d::ProgressFromTo *reverse() - cocos2d::ProgressFromTo *ret = self->reverse(); - int num_ret = olua_push_object(L, ret, "cc.ProgressFromTo"); - - olua_endinvoke(L); + oluacls_class(L, "cc.ProgressFromTo"); + oluacls_func(L, "create", _olua_fun_cocos2d_ProgressFromTo_create); - return num_ret; + return 1; } OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ProgressFromTo(lua_State *L) +OLUA_LIB int luaopen_cc_ProgressFromTo(lua_State *L) { - oluacls_class(L, "cc.ProgressFromTo"); - oluacls_func(L, "clone", _cocos2d_ProgressFromTo_clone); - oluacls_func(L, "create", _cocos2d_ProgressFromTo_create); - oluacls_func(L, "reverse", _cocos2d_ProgressFromTo_reverse); - + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.ProgressFromTo")) { + luaL_error(L, "class not found: cocos2d::ProgressFromTo"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_ActionEase_getInnerAction(lua_State *L) +static int _olua_fun_cocos2d_ActionEase_getInnerAction(lua_State *L) { olua_startinvoke(L); @@ -7204,18 +6224,27 @@ static int _cocos2d_ActionEase_getInnerAction(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ActionEase(lua_State *L) +static int _olua_cls_cc_ActionEase(lua_State *L) { oluacls_class(L, "cc.ActionEase"); - oluacls_func(L, "getInnerAction", _cocos2d_ActionEase_getInnerAction); - oluacls_prop(L, "innerAction", _cocos2d_ActionEase_getInnerAction, nullptr); + oluacls_func(L, "getInnerAction", _olua_fun_cocos2d_ActionEase_getInnerAction); + oluacls_prop(L, "innerAction", _olua_fun_cocos2d_ActionEase_getInnerAction, nullptr); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_ActionEase(lua_State *L) +{ + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.ActionEase")) { + luaL_error(L, "class not found: cocos2d::ActionEase"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_EaseRateAction_create(lua_State *L) +static int _olua_fun_cocos2d_EaseRateAction_create(lua_State *L) { olua_startinvoke(L); @@ -7237,7 +6266,7 @@ static int _cocos2d_EaseRateAction_create(lua_State *L) return num_ret; } -static int _cocos2d_EaseRateAction_getRate(lua_State *L) +static int _olua_fun_cocos2d_EaseRateAction_getRate(lua_State *L) { olua_startinvoke(L); @@ -7254,7 +6283,7 @@ static int _cocos2d_EaseRateAction_getRate(lua_State *L) return num_ret; } -static int _cocos2d_EaseRateAction_setRate(lua_State *L) +static int _olua_fun_cocos2d_EaseRateAction_setRate(lua_State *L) { olua_startinvoke(L); @@ -7272,37 +6301,29 @@ static int _cocos2d_EaseRateAction_setRate(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_EaseRateAction(lua_State *L) +static int _olua_cls_cc_EaseRateAction(lua_State *L) { oluacls_class(L, "cc.EaseRateAction"); - oluacls_func(L, "create", _cocos2d_EaseRateAction_create); - oluacls_func(L, "getRate", _cocos2d_EaseRateAction_getRate); - oluacls_func(L, "setRate", _cocos2d_EaseRateAction_setRate); - oluacls_prop(L, "rate", _cocos2d_EaseRateAction_getRate, _cocos2d_EaseRateAction_setRate); + oluacls_func(L, "create", _olua_fun_cocos2d_EaseRateAction_create); + oluacls_func(L, "getRate", _olua_fun_cocos2d_EaseRateAction_getRate); + oluacls_func(L, "setRate", _olua_fun_cocos2d_EaseRateAction_setRate); + oluacls_prop(L, "rate", _olua_fun_cocos2d_EaseRateAction_getRate, _olua_fun_cocos2d_EaseRateAction_setRate); return 1; } -OLUA_END_DECLS -static int _cocos2d_EaseExponentialIn_clone(lua_State *L) +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_EaseRateAction(lua_State *L) { - olua_startinvoke(L); - - cocos2d::EaseExponentialIn *self = nullptr; - - olua_to_object(L, 1, &self, "cc.EaseExponentialIn"); - - // cocos2d::EaseExponentialIn *clone() - cocos2d::EaseExponentialIn *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.EaseExponentialIn"); - - olua_endinvoke(L); - - return num_ret; + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.EaseRateAction")) { + luaL_error(L, "class not found: cocos2d::EaseRateAction"); + } + return 1; } +OLUA_END_DECLS -static int _cocos2d_EaseExponentialIn_create(lua_State *L) +static int _olua_fun_cocos2d_EaseExponentialIn_create(lua_State *L) { olua_startinvoke(L); @@ -7322,53 +6343,26 @@ static int _cocos2d_EaseExponentialIn_create(lua_State *L) return num_ret; } -static int _cocos2d_EaseExponentialIn_reverse(lua_State *L) +static int _olua_cls_cc_EaseExponentialIn(lua_State *L) { - olua_startinvoke(L); - - cocos2d::EaseExponentialIn *self = nullptr; - - olua_to_object(L, 1, &self, "cc.EaseExponentialIn"); + oluacls_class(L, "cc.EaseExponentialIn"); + oluacls_func(L, "create", _olua_fun_cocos2d_EaseExponentialIn_create); - // cocos2d::ActionEase *reverse() - cocos2d::ActionEase *ret = self->reverse(); - int num_ret = olua_push_object(L, ret, "cc.ActionEase"); - - olua_endinvoke(L); - - return num_ret; -} + return 1; +} OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_EaseExponentialIn(lua_State *L) +OLUA_LIB int luaopen_cc_EaseExponentialIn(lua_State *L) { - oluacls_class(L, "cc.EaseExponentialIn"); - oluacls_func(L, "clone", _cocos2d_EaseExponentialIn_clone); - oluacls_func(L, "create", _cocos2d_EaseExponentialIn_create); - oluacls_func(L, "reverse", _cocos2d_EaseExponentialIn_reverse); - + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.EaseExponentialIn")) { + luaL_error(L, "class not found: cocos2d::EaseExponentialIn"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_EaseExponentialOut_clone(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::EaseExponentialOut *self = nullptr; - - olua_to_object(L, 1, &self, "cc.EaseExponentialOut"); - - // cocos2d::EaseExponentialOut *clone() - cocos2d::EaseExponentialOut *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.EaseExponentialOut"); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_EaseExponentialOut_create(lua_State *L) +static int _olua_fun_cocos2d_EaseExponentialOut_create(lua_State *L) { olua_startinvoke(L); @@ -7388,53 +6382,26 @@ static int _cocos2d_EaseExponentialOut_create(lua_State *L) return num_ret; } -static int _cocos2d_EaseExponentialOut_reverse(lua_State *L) +static int _olua_cls_cc_EaseExponentialOut(lua_State *L) { - olua_startinvoke(L); - - cocos2d::EaseExponentialOut *self = nullptr; - - olua_to_object(L, 1, &self, "cc.EaseExponentialOut"); - - // cocos2d::ActionEase *reverse() - cocos2d::ActionEase *ret = self->reverse(); - int num_ret = olua_push_object(L, ret, "cc.ActionEase"); - - olua_endinvoke(L); + oluacls_class(L, "cc.EaseExponentialOut"); + oluacls_func(L, "create", _olua_fun_cocos2d_EaseExponentialOut_create); - return num_ret; + return 1; } OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_EaseExponentialOut(lua_State *L) +OLUA_LIB int luaopen_cc_EaseExponentialOut(lua_State *L) { - oluacls_class(L, "cc.EaseExponentialOut"); - oluacls_func(L, "clone", _cocos2d_EaseExponentialOut_clone); - oluacls_func(L, "create", _cocos2d_EaseExponentialOut_create); - oluacls_func(L, "reverse", _cocos2d_EaseExponentialOut_reverse); - + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.EaseExponentialOut")) { + luaL_error(L, "class not found: cocos2d::EaseExponentialOut"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_EaseExponentialInOut_clone(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::EaseExponentialInOut *self = nullptr; - - olua_to_object(L, 1, &self, "cc.EaseExponentialInOut"); - - // cocos2d::EaseExponentialInOut *clone() - cocos2d::EaseExponentialInOut *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.EaseExponentialInOut"); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_EaseExponentialInOut_create(lua_State *L) +static int _olua_fun_cocos2d_EaseExponentialInOut_create(lua_State *L) { olua_startinvoke(L); @@ -7454,53 +6421,26 @@ static int _cocos2d_EaseExponentialInOut_create(lua_State *L) return num_ret; } -static int _cocos2d_EaseExponentialInOut_reverse(lua_State *L) +static int _olua_cls_cc_EaseExponentialInOut(lua_State *L) { - olua_startinvoke(L); - - cocos2d::EaseExponentialInOut *self = nullptr; - - olua_to_object(L, 1, &self, "cc.EaseExponentialInOut"); - - // cocos2d::ActionEase *reverse() - cocos2d::ActionEase *ret = self->reverse(); - int num_ret = olua_push_object(L, ret, "cc.ActionEase"); - - olua_endinvoke(L); + oluacls_class(L, "cc.EaseExponentialInOut"); + oluacls_func(L, "create", _olua_fun_cocos2d_EaseExponentialInOut_create); - return num_ret; + return 1; } OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_EaseExponentialInOut(lua_State *L) +OLUA_LIB int luaopen_cc_EaseExponentialInOut(lua_State *L) { - oluacls_class(L, "cc.EaseExponentialInOut"); - oluacls_func(L, "clone", _cocos2d_EaseExponentialInOut_clone); - oluacls_func(L, "create", _cocos2d_EaseExponentialInOut_create); - oluacls_func(L, "reverse", _cocos2d_EaseExponentialInOut_reverse); - + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.EaseExponentialInOut")) { + luaL_error(L, "class not found: cocos2d::EaseExponentialInOut"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_EaseSineIn_clone(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::EaseSineIn *self = nullptr; - - olua_to_object(L, 1, &self, "cc.EaseSineIn"); - - // cocos2d::EaseSineIn *clone() - cocos2d::EaseSineIn *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.EaseSineIn"); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_EaseSineIn_create(lua_State *L) +static int _olua_fun_cocos2d_EaseSineIn_create(lua_State *L) { olua_startinvoke(L); @@ -7520,53 +6460,26 @@ static int _cocos2d_EaseSineIn_create(lua_State *L) return num_ret; } -static int _cocos2d_EaseSineIn_reverse(lua_State *L) +static int _olua_cls_cc_EaseSineIn(lua_State *L) { - olua_startinvoke(L); - - cocos2d::EaseSineIn *self = nullptr; - - olua_to_object(L, 1, &self, "cc.EaseSineIn"); - - // cocos2d::ActionEase *reverse() - cocos2d::ActionEase *ret = self->reverse(); - int num_ret = olua_push_object(L, ret, "cc.ActionEase"); - - olua_endinvoke(L); + oluacls_class(L, "cc.EaseSineIn"); + oluacls_func(L, "create", _olua_fun_cocos2d_EaseSineIn_create); - return num_ret; + return 1; } OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_EaseSineIn(lua_State *L) +OLUA_LIB int luaopen_cc_EaseSineIn(lua_State *L) { - oluacls_class(L, "cc.EaseSineIn"); - oluacls_func(L, "clone", _cocos2d_EaseSineIn_clone); - oluacls_func(L, "create", _cocos2d_EaseSineIn_create); - oluacls_func(L, "reverse", _cocos2d_EaseSineIn_reverse); - + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.EaseSineIn")) { + luaL_error(L, "class not found: cocos2d::EaseSineIn"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_EaseSineOut_clone(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::EaseSineOut *self = nullptr; - - olua_to_object(L, 1, &self, "cc.EaseSineOut"); - - // cocos2d::EaseSineOut *clone() - cocos2d::EaseSineOut *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.EaseSineOut"); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_EaseSineOut_create(lua_State *L) +static int _olua_fun_cocos2d_EaseSineOut_create(lua_State *L) { olua_startinvoke(L); @@ -7586,53 +6499,26 @@ static int _cocos2d_EaseSineOut_create(lua_State *L) return num_ret; } -static int _cocos2d_EaseSineOut_reverse(lua_State *L) +static int _olua_cls_cc_EaseSineOut(lua_State *L) { - olua_startinvoke(L); - - cocos2d::EaseSineOut *self = nullptr; - - olua_to_object(L, 1, &self, "cc.EaseSineOut"); - - // cocos2d::ActionEase *reverse() - cocos2d::ActionEase *ret = self->reverse(); - int num_ret = olua_push_object(L, ret, "cc.ActionEase"); - - olua_endinvoke(L); + oluacls_class(L, "cc.EaseSineOut"); + oluacls_func(L, "create", _olua_fun_cocos2d_EaseSineOut_create); - return num_ret; + return 1; } OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_EaseSineOut(lua_State *L) +OLUA_LIB int luaopen_cc_EaseSineOut(lua_State *L) { - oluacls_class(L, "cc.EaseSineOut"); - oluacls_func(L, "clone", _cocos2d_EaseSineOut_clone); - oluacls_func(L, "create", _cocos2d_EaseSineOut_create); - oluacls_func(L, "reverse", _cocos2d_EaseSineOut_reverse); - + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.EaseSineOut")) { + luaL_error(L, "class not found: cocos2d::EaseSineOut"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_EaseSineInOut_clone(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::EaseSineInOut *self = nullptr; - - olua_to_object(L, 1, &self, "cc.EaseSineInOut"); - - // cocos2d::EaseSineInOut *clone() - cocos2d::EaseSineInOut *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.EaseSineInOut"); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_EaseSineInOut_create(lua_State *L) +static int _olua_fun_cocos2d_EaseSineInOut_create(lua_State *L) { olua_startinvoke(L); @@ -7652,53 +6538,26 @@ static int _cocos2d_EaseSineInOut_create(lua_State *L) return num_ret; } -static int _cocos2d_EaseSineInOut_reverse(lua_State *L) +static int _olua_cls_cc_EaseSineInOut(lua_State *L) { - olua_startinvoke(L); - - cocos2d::EaseSineInOut *self = nullptr; - - olua_to_object(L, 1, &self, "cc.EaseSineInOut"); - - // cocos2d::ActionEase *reverse() - cocos2d::ActionEase *ret = self->reverse(); - int num_ret = olua_push_object(L, ret, "cc.ActionEase"); - - olua_endinvoke(L); + oluacls_class(L, "cc.EaseSineInOut"); + oluacls_func(L, "create", _olua_fun_cocos2d_EaseSineInOut_create); - return num_ret; + return 1; } OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_EaseSineInOut(lua_State *L) +OLUA_LIB int luaopen_cc_EaseSineInOut(lua_State *L) { - oluacls_class(L, "cc.EaseSineInOut"); - oluacls_func(L, "clone", _cocos2d_EaseSineInOut_clone); - oluacls_func(L, "create", _cocos2d_EaseSineInOut_create); - oluacls_func(L, "reverse", _cocos2d_EaseSineInOut_reverse); - + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.EaseSineInOut")) { + luaL_error(L, "class not found: cocos2d::EaseSineInOut"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_EaseBounceIn_clone(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::EaseBounceIn *self = nullptr; - - olua_to_object(L, 1, &self, "cc.EaseBounceIn"); - - // cocos2d::EaseBounceIn *clone() - cocos2d::EaseBounceIn *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.EaseBounceIn"); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_EaseBounceIn_create(lua_State *L) +static int _olua_fun_cocos2d_EaseBounceIn_create(lua_State *L) { olua_startinvoke(L); @@ -7718,53 +6577,26 @@ static int _cocos2d_EaseBounceIn_create(lua_State *L) return num_ret; } -static int _cocos2d_EaseBounceIn_reverse(lua_State *L) +static int _olua_cls_cc_EaseBounceIn(lua_State *L) { - olua_startinvoke(L); - - cocos2d::EaseBounceIn *self = nullptr; - - olua_to_object(L, 1, &self, "cc.EaseBounceIn"); - - // cocos2d::ActionEase *reverse() - cocos2d::ActionEase *ret = self->reverse(); - int num_ret = olua_push_object(L, ret, "cc.ActionEase"); - - olua_endinvoke(L); + oluacls_class(L, "cc.EaseBounceIn"); + oluacls_func(L, "create", _olua_fun_cocos2d_EaseBounceIn_create); - return num_ret; + return 1; } OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_EaseBounceIn(lua_State *L) +OLUA_LIB int luaopen_cc_EaseBounceIn(lua_State *L) { - oluacls_class(L, "cc.EaseBounceIn"); - oluacls_func(L, "clone", _cocos2d_EaseBounceIn_clone); - oluacls_func(L, "create", _cocos2d_EaseBounceIn_create); - oluacls_func(L, "reverse", _cocos2d_EaseBounceIn_reverse); - + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.EaseBounceIn")) { + luaL_error(L, "class not found: cocos2d::EaseBounceIn"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_EaseBounceOut_clone(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::EaseBounceOut *self = nullptr; - - olua_to_object(L, 1, &self, "cc.EaseBounceOut"); - - // cocos2d::EaseBounceOut *clone() - cocos2d::EaseBounceOut *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.EaseBounceOut"); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_EaseBounceOut_create(lua_State *L) +static int _olua_fun_cocos2d_EaseBounceOut_create(lua_State *L) { olua_startinvoke(L); @@ -7784,53 +6616,26 @@ static int _cocos2d_EaseBounceOut_create(lua_State *L) return num_ret; } -static int _cocos2d_EaseBounceOut_reverse(lua_State *L) +static int _olua_cls_cc_EaseBounceOut(lua_State *L) { - olua_startinvoke(L); - - cocos2d::EaseBounceOut *self = nullptr; - - olua_to_object(L, 1, &self, "cc.EaseBounceOut"); - - // cocos2d::ActionEase *reverse() - cocos2d::ActionEase *ret = self->reverse(); - int num_ret = olua_push_object(L, ret, "cc.ActionEase"); - - olua_endinvoke(L); + oluacls_class(L, "cc.EaseBounceOut"); + oluacls_func(L, "create", _olua_fun_cocos2d_EaseBounceOut_create); - return num_ret; + return 1; } OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_EaseBounceOut(lua_State *L) +OLUA_LIB int luaopen_cc_EaseBounceOut(lua_State *L) { - oluacls_class(L, "cc.EaseBounceOut"); - oluacls_func(L, "clone", _cocos2d_EaseBounceOut_clone); - oluacls_func(L, "create", _cocos2d_EaseBounceOut_create); - oluacls_func(L, "reverse", _cocos2d_EaseBounceOut_reverse); - + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.EaseBounceOut")) { + luaL_error(L, "class not found: cocos2d::EaseBounceOut"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_EaseBounceInOut_clone(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::EaseBounceInOut *self = nullptr; - - olua_to_object(L, 1, &self, "cc.EaseBounceInOut"); - - // cocos2d::EaseBounceInOut *clone() - cocos2d::EaseBounceInOut *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.EaseBounceInOut"); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_EaseBounceInOut_create(lua_State *L) +static int _olua_fun_cocos2d_EaseBounceInOut_create(lua_State *L) { olua_startinvoke(L); @@ -7850,53 +6655,26 @@ static int _cocos2d_EaseBounceInOut_create(lua_State *L) return num_ret; } -static int _cocos2d_EaseBounceInOut_reverse(lua_State *L) +static int _olua_cls_cc_EaseBounceInOut(lua_State *L) { - olua_startinvoke(L); - - cocos2d::EaseBounceInOut *self = nullptr; - - olua_to_object(L, 1, &self, "cc.EaseBounceInOut"); - - // cocos2d::ActionEase *reverse() - cocos2d::ActionEase *ret = self->reverse(); - int num_ret = olua_push_object(L, ret, "cc.ActionEase"); - - olua_endinvoke(L); + oluacls_class(L, "cc.EaseBounceInOut"); + oluacls_func(L, "create", _olua_fun_cocos2d_EaseBounceInOut_create); - return num_ret; + return 1; } OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_EaseBounceInOut(lua_State *L) +OLUA_LIB int luaopen_cc_EaseBounceInOut(lua_State *L) { - oluacls_class(L, "cc.EaseBounceInOut"); - oluacls_func(L, "clone", _cocos2d_EaseBounceInOut_clone); - oluacls_func(L, "create", _cocos2d_EaseBounceInOut_create); - oluacls_func(L, "reverse", _cocos2d_EaseBounceInOut_reverse); - + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.EaseBounceInOut")) { + luaL_error(L, "class not found: cocos2d::EaseBounceInOut"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_EaseBackIn_clone(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::EaseBackIn *self = nullptr; - - olua_to_object(L, 1, &self, "cc.EaseBackIn"); - - // cocos2d::EaseBackIn *clone() - cocos2d::EaseBackIn *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.EaseBackIn"); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_EaseBackIn_create(lua_State *L) +static int _olua_fun_cocos2d_EaseBackIn_create(lua_State *L) { olua_startinvoke(L); @@ -7916,53 +6694,26 @@ static int _cocos2d_EaseBackIn_create(lua_State *L) return num_ret; } -static int _cocos2d_EaseBackIn_reverse(lua_State *L) +static int _olua_cls_cc_EaseBackIn(lua_State *L) { - olua_startinvoke(L); - - cocos2d::EaseBackIn *self = nullptr; - - olua_to_object(L, 1, &self, "cc.EaseBackIn"); - - // cocos2d::ActionEase *reverse() - cocos2d::ActionEase *ret = self->reverse(); - int num_ret = olua_push_object(L, ret, "cc.ActionEase"); - - olua_endinvoke(L); + oluacls_class(L, "cc.EaseBackIn"); + oluacls_func(L, "create", _olua_fun_cocos2d_EaseBackIn_create); - return num_ret; + return 1; } OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_EaseBackIn(lua_State *L) +OLUA_LIB int luaopen_cc_EaseBackIn(lua_State *L) { - oluacls_class(L, "cc.EaseBackIn"); - oluacls_func(L, "clone", _cocos2d_EaseBackIn_clone); - oluacls_func(L, "create", _cocos2d_EaseBackIn_create); - oluacls_func(L, "reverse", _cocos2d_EaseBackIn_reverse); - + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.EaseBackIn")) { + luaL_error(L, "class not found: cocos2d::EaseBackIn"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_EaseBackOut_clone(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::EaseBackOut *self = nullptr; - - olua_to_object(L, 1, &self, "cc.EaseBackOut"); - - // cocos2d::EaseBackOut *clone() - cocos2d::EaseBackOut *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.EaseBackOut"); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_EaseBackOut_create(lua_State *L) +static int _olua_fun_cocos2d_EaseBackOut_create(lua_State *L) { olua_startinvoke(L); @@ -7982,119 +6733,65 @@ static int _cocos2d_EaseBackOut_create(lua_State *L) return num_ret; } -static int _cocos2d_EaseBackOut_reverse(lua_State *L) +static int _olua_cls_cc_EaseBackOut(lua_State *L) { - olua_startinvoke(L); - - cocos2d::EaseBackOut *self = nullptr; - - olua_to_object(L, 1, &self, "cc.EaseBackOut"); - - // cocos2d::ActionEase *reverse() - cocos2d::ActionEase *ret = self->reverse(); - int num_ret = olua_push_object(L, ret, "cc.ActionEase"); - - olua_endinvoke(L); + oluacls_class(L, "cc.EaseBackOut"); + oluacls_func(L, "create", _olua_fun_cocos2d_EaseBackOut_create); - return num_ret; + return 1; } OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_EaseBackOut(lua_State *L) +OLUA_LIB int luaopen_cc_EaseBackOut(lua_State *L) { - oluacls_class(L, "cc.EaseBackOut"); - oluacls_func(L, "clone", _cocos2d_EaseBackOut_clone); - oluacls_func(L, "create", _cocos2d_EaseBackOut_create); - oluacls_func(L, "reverse", _cocos2d_EaseBackOut_reverse); - + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.EaseBackOut")) { + luaL_error(L, "class not found: cocos2d::EaseBackOut"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_EaseBackInOut_clone(lua_State *L) +static int _olua_fun_cocos2d_EaseBackInOut_create(lua_State *L) { olua_startinvoke(L); - cocos2d::EaseBackInOut *self = nullptr; + cocos2d::ActionInterval *arg1 = nullptr; /** action */ - olua_to_object(L, 1, &self, "cc.EaseBackInOut"); + olua_check_object(L, 1, &arg1, "cc.ActionInterval"); - // cocos2d::EaseBackInOut *clone() - cocos2d::EaseBackInOut *ret = self->clone(); + // static cocos2d::EaseBackInOut *create(@addref(innerAction ^) cocos2d::ActionInterval *action) + cocos2d::EaseBackInOut *ret = cocos2d::EaseBackInOut::create(arg1); int num_ret = olua_push_object(L, ret, "cc.EaseBackInOut"); + // insert code after call + olua_addref(L, -1, "innerAction", 1, OLUA_REF_ALONE); + olua_endinvoke(L); return num_ret; } -static int _cocos2d_EaseBackInOut_create(lua_State *L) +static int _olua_cls_cc_EaseBackInOut(lua_State *L) { - olua_startinvoke(L); - - cocos2d::ActionInterval *arg1 = nullptr; /** action */ - - olua_check_object(L, 1, &arg1, "cc.ActionInterval"); - - // static cocos2d::EaseBackInOut *create(@addref(innerAction ^) cocos2d::ActionInterval *action) - cocos2d::EaseBackInOut *ret = cocos2d::EaseBackInOut::create(arg1); - int num_ret = olua_push_object(L, ret, "cc.EaseBackInOut"); - - // insert code after call - olua_addref(L, -1, "innerAction", 1, OLUA_REF_ALONE); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_EaseBackInOut_reverse(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::EaseBackInOut *self = nullptr; - - olua_to_object(L, 1, &self, "cc.EaseBackInOut"); - - // cocos2d::ActionEase *reverse() - cocos2d::ActionEase *ret = self->reverse(); - int num_ret = olua_push_object(L, ret, "cc.ActionEase"); - - olua_endinvoke(L); + oluacls_class(L, "cc.EaseBackInOut"); + oluacls_func(L, "create", _olua_fun_cocos2d_EaseBackInOut_create); - return num_ret; + return 1; } OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_EaseBackInOut(lua_State *L) +OLUA_LIB int luaopen_cc_EaseBackInOut(lua_State *L) { - oluacls_class(L, "cc.EaseBackInOut"); - oluacls_func(L, "clone", _cocos2d_EaseBackInOut_clone); - oluacls_func(L, "create", _cocos2d_EaseBackInOut_create); - oluacls_func(L, "reverse", _cocos2d_EaseBackInOut_reverse); - + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.EaseBackInOut")) { + luaL_error(L, "class not found: cocos2d::EaseBackInOut"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_EaseQuadraticActionIn_clone(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::EaseQuadraticActionIn *self = nullptr; - - olua_to_object(L, 1, &self, "cc.EaseQuadraticActionIn"); - - // cocos2d::EaseQuadraticActionIn *clone() - cocos2d::EaseQuadraticActionIn *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.EaseQuadraticActionIn"); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_EaseQuadraticActionIn_create(lua_State *L) +static int _olua_fun_cocos2d_EaseQuadraticActionIn_create(lua_State *L) { olua_startinvoke(L); @@ -8114,53 +6811,26 @@ static int _cocos2d_EaseQuadraticActionIn_create(lua_State *L) return num_ret; } -static int _cocos2d_EaseQuadraticActionIn_reverse(lua_State *L) +static int _olua_cls_cc_EaseQuadraticActionIn(lua_State *L) { - olua_startinvoke(L); - - cocos2d::EaseQuadraticActionIn *self = nullptr; - - olua_to_object(L, 1, &self, "cc.EaseQuadraticActionIn"); - - // cocos2d::ActionEase *reverse() - cocos2d::ActionEase *ret = self->reverse(); - int num_ret = olua_push_object(L, ret, "cc.ActionEase"); - - olua_endinvoke(L); + oluacls_class(L, "cc.EaseQuadraticActionIn"); + oluacls_func(L, "create", _olua_fun_cocos2d_EaseQuadraticActionIn_create); - return num_ret; + return 1; } OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_EaseQuadraticActionIn(lua_State *L) +OLUA_LIB int luaopen_cc_EaseQuadraticActionIn(lua_State *L) { - oluacls_class(L, "cc.EaseQuadraticActionIn"); - oluacls_func(L, "clone", _cocos2d_EaseQuadraticActionIn_clone); - oluacls_func(L, "create", _cocos2d_EaseQuadraticActionIn_create); - oluacls_func(L, "reverse", _cocos2d_EaseQuadraticActionIn_reverse); - + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.EaseQuadraticActionIn")) { + luaL_error(L, "class not found: cocos2d::EaseQuadraticActionIn"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_EaseQuadraticActionOut_clone(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::EaseQuadraticActionOut *self = nullptr; - - olua_to_object(L, 1, &self, "cc.EaseQuadraticActionOut"); - - // cocos2d::EaseQuadraticActionOut *clone() - cocos2d::EaseQuadraticActionOut *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.EaseQuadraticActionOut"); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_EaseQuadraticActionOut_create(lua_State *L) +static int _olua_fun_cocos2d_EaseQuadraticActionOut_create(lua_State *L) { olua_startinvoke(L); @@ -8180,53 +6850,26 @@ static int _cocos2d_EaseQuadraticActionOut_create(lua_State *L) return num_ret; } -static int _cocos2d_EaseQuadraticActionOut_reverse(lua_State *L) +static int _olua_cls_cc_EaseQuadraticActionOut(lua_State *L) { - olua_startinvoke(L); - - cocos2d::EaseQuadraticActionOut *self = nullptr; - - olua_to_object(L, 1, &self, "cc.EaseQuadraticActionOut"); - - // cocos2d::ActionEase *reverse() - cocos2d::ActionEase *ret = self->reverse(); - int num_ret = olua_push_object(L, ret, "cc.ActionEase"); - - olua_endinvoke(L); + oluacls_class(L, "cc.EaseQuadraticActionOut"); + oluacls_func(L, "create", _olua_fun_cocos2d_EaseQuadraticActionOut_create); - return num_ret; + return 1; } OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_EaseQuadraticActionOut(lua_State *L) +OLUA_LIB int luaopen_cc_EaseQuadraticActionOut(lua_State *L) { - oluacls_class(L, "cc.EaseQuadraticActionOut"); - oluacls_func(L, "clone", _cocos2d_EaseQuadraticActionOut_clone); - oluacls_func(L, "create", _cocos2d_EaseQuadraticActionOut_create); - oluacls_func(L, "reverse", _cocos2d_EaseQuadraticActionOut_reverse); - + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.EaseQuadraticActionOut")) { + luaL_error(L, "class not found: cocos2d::EaseQuadraticActionOut"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_EaseQuadraticActionInOut_clone(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::EaseQuadraticActionInOut *self = nullptr; - - olua_to_object(L, 1, &self, "cc.EaseQuadraticActionInOut"); - - // cocos2d::EaseQuadraticActionInOut *clone() - cocos2d::EaseQuadraticActionInOut *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.EaseQuadraticActionInOut"); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_EaseQuadraticActionInOut_create(lua_State *L) +static int _olua_fun_cocos2d_EaseQuadraticActionInOut_create(lua_State *L) { olua_startinvoke(L); @@ -8246,53 +6889,26 @@ static int _cocos2d_EaseQuadraticActionInOut_create(lua_State *L) return num_ret; } -static int _cocos2d_EaseQuadraticActionInOut_reverse(lua_State *L) +static int _olua_cls_cc_EaseQuadraticActionInOut(lua_State *L) { - olua_startinvoke(L); - - cocos2d::EaseQuadraticActionInOut *self = nullptr; - - olua_to_object(L, 1, &self, "cc.EaseQuadraticActionInOut"); - - // cocos2d::ActionEase *reverse() - cocos2d::ActionEase *ret = self->reverse(); - int num_ret = olua_push_object(L, ret, "cc.ActionEase"); - - olua_endinvoke(L); + oluacls_class(L, "cc.EaseQuadraticActionInOut"); + oluacls_func(L, "create", _olua_fun_cocos2d_EaseQuadraticActionInOut_create); - return num_ret; + return 1; } OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_EaseQuadraticActionInOut(lua_State *L) +OLUA_LIB int luaopen_cc_EaseQuadraticActionInOut(lua_State *L) { - oluacls_class(L, "cc.EaseQuadraticActionInOut"); - oluacls_func(L, "clone", _cocos2d_EaseQuadraticActionInOut_clone); - oluacls_func(L, "create", _cocos2d_EaseQuadraticActionInOut_create); - oluacls_func(L, "reverse", _cocos2d_EaseQuadraticActionInOut_reverse); - + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.EaseQuadraticActionInOut")) { + luaL_error(L, "class not found: cocos2d::EaseQuadraticActionInOut"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_EaseQuarticActionIn_clone(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::EaseQuarticActionIn *self = nullptr; - - olua_to_object(L, 1, &self, "cc.EaseQuarticActionIn"); - - // cocos2d::EaseQuarticActionIn *clone() - cocos2d::EaseQuarticActionIn *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.EaseQuarticActionIn"); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_EaseQuarticActionIn_create(lua_State *L) +static int _olua_fun_cocos2d_EaseQuarticActionIn_create(lua_State *L) { olua_startinvoke(L); @@ -8312,53 +6928,26 @@ static int _cocos2d_EaseQuarticActionIn_create(lua_State *L) return num_ret; } -static int _cocos2d_EaseQuarticActionIn_reverse(lua_State *L) +static int _olua_cls_cc_EaseQuarticActionIn(lua_State *L) { - olua_startinvoke(L); - - cocos2d::EaseQuarticActionIn *self = nullptr; - - olua_to_object(L, 1, &self, "cc.EaseQuarticActionIn"); - - // cocos2d::ActionEase *reverse() - cocos2d::ActionEase *ret = self->reverse(); - int num_ret = olua_push_object(L, ret, "cc.ActionEase"); - - olua_endinvoke(L); + oluacls_class(L, "cc.EaseQuarticActionIn"); + oluacls_func(L, "create", _olua_fun_cocos2d_EaseQuarticActionIn_create); - return num_ret; + return 1; } OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_EaseQuarticActionIn(lua_State *L) +OLUA_LIB int luaopen_cc_EaseQuarticActionIn(lua_State *L) { - oluacls_class(L, "cc.EaseQuarticActionIn"); - oluacls_func(L, "clone", _cocos2d_EaseQuarticActionIn_clone); - oluacls_func(L, "create", _cocos2d_EaseQuarticActionIn_create); - oluacls_func(L, "reverse", _cocos2d_EaseQuarticActionIn_reverse); - + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.EaseQuarticActionIn")) { + luaL_error(L, "class not found: cocos2d::EaseQuarticActionIn"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_EaseQuarticActionOut_clone(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::EaseQuarticActionOut *self = nullptr; - - olua_to_object(L, 1, &self, "cc.EaseQuarticActionOut"); - - // cocos2d::EaseQuarticActionOut *clone() - cocos2d::EaseQuarticActionOut *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.EaseQuarticActionOut"); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_EaseQuarticActionOut_create(lua_State *L) +static int _olua_fun_cocos2d_EaseQuarticActionOut_create(lua_State *L) { olua_startinvoke(L); @@ -8378,53 +6967,26 @@ static int _cocos2d_EaseQuarticActionOut_create(lua_State *L) return num_ret; } -static int _cocos2d_EaseQuarticActionOut_reverse(lua_State *L) +static int _olua_cls_cc_EaseQuarticActionOut(lua_State *L) { - olua_startinvoke(L); - - cocos2d::EaseQuarticActionOut *self = nullptr; - - olua_to_object(L, 1, &self, "cc.EaseQuarticActionOut"); - - // cocos2d::ActionEase *reverse() - cocos2d::ActionEase *ret = self->reverse(); - int num_ret = olua_push_object(L, ret, "cc.ActionEase"); - - olua_endinvoke(L); + oluacls_class(L, "cc.EaseQuarticActionOut"); + oluacls_func(L, "create", _olua_fun_cocos2d_EaseQuarticActionOut_create); - return num_ret; + return 1; } OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_EaseQuarticActionOut(lua_State *L) +OLUA_LIB int luaopen_cc_EaseQuarticActionOut(lua_State *L) { - oluacls_class(L, "cc.EaseQuarticActionOut"); - oluacls_func(L, "clone", _cocos2d_EaseQuarticActionOut_clone); - oluacls_func(L, "create", _cocos2d_EaseQuarticActionOut_create); - oluacls_func(L, "reverse", _cocos2d_EaseQuarticActionOut_reverse); - + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.EaseQuarticActionOut")) { + luaL_error(L, "class not found: cocos2d::EaseQuarticActionOut"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_EaseQuarticActionInOut_clone(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::EaseQuarticActionInOut *self = nullptr; - - olua_to_object(L, 1, &self, "cc.EaseQuarticActionInOut"); - - // cocos2d::EaseQuarticActionInOut *clone() - cocos2d::EaseQuarticActionInOut *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.EaseQuarticActionInOut"); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_EaseQuarticActionInOut_create(lua_State *L) +static int _olua_fun_cocos2d_EaseQuarticActionInOut_create(lua_State *L) { olua_startinvoke(L); @@ -8444,53 +7006,26 @@ static int _cocos2d_EaseQuarticActionInOut_create(lua_State *L) return num_ret; } -static int _cocos2d_EaseQuarticActionInOut_reverse(lua_State *L) +static int _olua_cls_cc_EaseQuarticActionInOut(lua_State *L) { - olua_startinvoke(L); - - cocos2d::EaseQuarticActionInOut *self = nullptr; - - olua_to_object(L, 1, &self, "cc.EaseQuarticActionInOut"); - - // cocos2d::ActionEase *reverse() - cocos2d::ActionEase *ret = self->reverse(); - int num_ret = olua_push_object(L, ret, "cc.ActionEase"); - - olua_endinvoke(L); + oluacls_class(L, "cc.EaseQuarticActionInOut"); + oluacls_func(L, "create", _olua_fun_cocos2d_EaseQuarticActionInOut_create); - return num_ret; + return 1; } OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_EaseQuarticActionInOut(lua_State *L) +OLUA_LIB int luaopen_cc_EaseQuarticActionInOut(lua_State *L) { - oluacls_class(L, "cc.EaseQuarticActionInOut"); - oluacls_func(L, "clone", _cocos2d_EaseQuarticActionInOut_clone); - oluacls_func(L, "create", _cocos2d_EaseQuarticActionInOut_create); - oluacls_func(L, "reverse", _cocos2d_EaseQuarticActionInOut_reverse); - + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.EaseQuarticActionInOut")) { + luaL_error(L, "class not found: cocos2d::EaseQuarticActionInOut"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_EaseQuinticActionIn_clone(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::EaseQuinticActionIn *self = nullptr; - - olua_to_object(L, 1, &self, "cc.EaseQuinticActionIn"); - - // cocos2d::EaseQuinticActionIn *clone() - cocos2d::EaseQuinticActionIn *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.EaseQuinticActionIn"); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_EaseQuinticActionIn_create(lua_State *L) +static int _olua_fun_cocos2d_EaseQuinticActionIn_create(lua_State *L) { olua_startinvoke(L); @@ -8510,53 +7045,26 @@ static int _cocos2d_EaseQuinticActionIn_create(lua_State *L) return num_ret; } -static int _cocos2d_EaseQuinticActionIn_reverse(lua_State *L) +static int _olua_cls_cc_EaseQuinticActionIn(lua_State *L) { - olua_startinvoke(L); - - cocos2d::EaseQuinticActionIn *self = nullptr; - - olua_to_object(L, 1, &self, "cc.EaseQuinticActionIn"); - - // cocos2d::ActionEase *reverse() - cocos2d::ActionEase *ret = self->reverse(); - int num_ret = olua_push_object(L, ret, "cc.ActionEase"); - - olua_endinvoke(L); + oluacls_class(L, "cc.EaseQuinticActionIn"); + oluacls_func(L, "create", _olua_fun_cocos2d_EaseQuinticActionIn_create); - return num_ret; + return 1; } OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_EaseQuinticActionIn(lua_State *L) +OLUA_LIB int luaopen_cc_EaseQuinticActionIn(lua_State *L) { - oluacls_class(L, "cc.EaseQuinticActionIn"); - oluacls_func(L, "clone", _cocos2d_EaseQuinticActionIn_clone); - oluacls_func(L, "create", _cocos2d_EaseQuinticActionIn_create); - oluacls_func(L, "reverse", _cocos2d_EaseQuinticActionIn_reverse); - + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.EaseQuinticActionIn")) { + luaL_error(L, "class not found: cocos2d::EaseQuinticActionIn"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_EaseQuinticActionOut_clone(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::EaseQuinticActionOut *self = nullptr; - - olua_to_object(L, 1, &self, "cc.EaseQuinticActionOut"); - - // cocos2d::EaseQuinticActionOut *clone() - cocos2d::EaseQuinticActionOut *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.EaseQuinticActionOut"); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_EaseQuinticActionOut_create(lua_State *L) +static int _olua_fun_cocos2d_EaseQuinticActionOut_create(lua_State *L) { olua_startinvoke(L); @@ -8576,53 +7084,26 @@ static int _cocos2d_EaseQuinticActionOut_create(lua_State *L) return num_ret; } -static int _cocos2d_EaseQuinticActionOut_reverse(lua_State *L) +static int _olua_cls_cc_EaseQuinticActionOut(lua_State *L) { - olua_startinvoke(L); - - cocos2d::EaseQuinticActionOut *self = nullptr; - - olua_to_object(L, 1, &self, "cc.EaseQuinticActionOut"); - - // cocos2d::ActionEase *reverse() - cocos2d::ActionEase *ret = self->reverse(); - int num_ret = olua_push_object(L, ret, "cc.ActionEase"); - - olua_endinvoke(L); + oluacls_class(L, "cc.EaseQuinticActionOut"); + oluacls_func(L, "create", _olua_fun_cocos2d_EaseQuinticActionOut_create); - return num_ret; + return 1; } OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_EaseQuinticActionOut(lua_State *L) +OLUA_LIB int luaopen_cc_EaseQuinticActionOut(lua_State *L) { - oluacls_class(L, "cc.EaseQuinticActionOut"); - oluacls_func(L, "clone", _cocos2d_EaseQuinticActionOut_clone); - oluacls_func(L, "create", _cocos2d_EaseQuinticActionOut_create); - oluacls_func(L, "reverse", _cocos2d_EaseQuinticActionOut_reverse); - + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.EaseQuinticActionOut")) { + luaL_error(L, "class not found: cocos2d::EaseQuinticActionOut"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_EaseQuinticActionInOut_clone(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::EaseQuinticActionInOut *self = nullptr; - - olua_to_object(L, 1, &self, "cc.EaseQuinticActionInOut"); - - // cocos2d::EaseQuinticActionInOut *clone() - cocos2d::EaseQuinticActionInOut *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.EaseQuinticActionInOut"); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_EaseQuinticActionInOut_create(lua_State *L) +static int _olua_fun_cocos2d_EaseQuinticActionInOut_create(lua_State *L) { olua_startinvoke(L); @@ -8642,53 +7123,26 @@ static int _cocos2d_EaseQuinticActionInOut_create(lua_State *L) return num_ret; } -static int _cocos2d_EaseQuinticActionInOut_reverse(lua_State *L) +static int _olua_cls_cc_EaseQuinticActionInOut(lua_State *L) { - olua_startinvoke(L); - - cocos2d::EaseQuinticActionInOut *self = nullptr; - - olua_to_object(L, 1, &self, "cc.EaseQuinticActionInOut"); - - // cocos2d::ActionEase *reverse() - cocos2d::ActionEase *ret = self->reverse(); - int num_ret = olua_push_object(L, ret, "cc.ActionEase"); - - olua_endinvoke(L); + oluacls_class(L, "cc.EaseQuinticActionInOut"); + oluacls_func(L, "create", _olua_fun_cocos2d_EaseQuinticActionInOut_create); - return num_ret; + return 1; } OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_EaseQuinticActionInOut(lua_State *L) +OLUA_LIB int luaopen_cc_EaseQuinticActionInOut(lua_State *L) { - oluacls_class(L, "cc.EaseQuinticActionInOut"); - oluacls_func(L, "clone", _cocos2d_EaseQuinticActionInOut_clone); - oluacls_func(L, "create", _cocos2d_EaseQuinticActionInOut_create); - oluacls_func(L, "reverse", _cocos2d_EaseQuinticActionInOut_reverse); - + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.EaseQuinticActionInOut")) { + luaL_error(L, "class not found: cocos2d::EaseQuinticActionInOut"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_EaseCircleActionIn_clone(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::EaseCircleActionIn *self = nullptr; - - olua_to_object(L, 1, &self, "cc.EaseCircleActionIn"); - - // cocos2d::EaseCircleActionIn *clone() - cocos2d::EaseCircleActionIn *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.EaseCircleActionIn"); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_EaseCircleActionIn_create(lua_State *L) +static int _olua_fun_cocos2d_EaseCircleActionIn_create(lua_State *L) { olua_startinvoke(L); @@ -8708,53 +7162,26 @@ static int _cocos2d_EaseCircleActionIn_create(lua_State *L) return num_ret; } -static int _cocos2d_EaseCircleActionIn_reverse(lua_State *L) +static int _olua_cls_cc_EaseCircleActionIn(lua_State *L) { - olua_startinvoke(L); - - cocos2d::EaseCircleActionIn *self = nullptr; - - olua_to_object(L, 1, &self, "cc.EaseCircleActionIn"); - - // cocos2d::ActionEase *reverse() - cocos2d::ActionEase *ret = self->reverse(); - int num_ret = olua_push_object(L, ret, "cc.ActionEase"); - - olua_endinvoke(L); + oluacls_class(L, "cc.EaseCircleActionIn"); + oluacls_func(L, "create", _olua_fun_cocos2d_EaseCircleActionIn_create); - return num_ret; + return 1; } OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_EaseCircleActionIn(lua_State *L) +OLUA_LIB int luaopen_cc_EaseCircleActionIn(lua_State *L) { - oluacls_class(L, "cc.EaseCircleActionIn"); - oluacls_func(L, "clone", _cocos2d_EaseCircleActionIn_clone); - oluacls_func(L, "create", _cocos2d_EaseCircleActionIn_create); - oluacls_func(L, "reverse", _cocos2d_EaseCircleActionIn_reverse); - + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.EaseCircleActionIn")) { + luaL_error(L, "class not found: cocos2d::EaseCircleActionIn"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_EaseCircleActionOut_clone(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::EaseCircleActionOut *self = nullptr; - - olua_to_object(L, 1, &self, "cc.EaseCircleActionOut"); - - // cocos2d::EaseCircleActionOut *clone() - cocos2d::EaseCircleActionOut *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.EaseCircleActionOut"); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_EaseCircleActionOut_create(lua_State *L) +static int _olua_fun_cocos2d_EaseCircleActionOut_create(lua_State *L) { olua_startinvoke(L); @@ -8767,60 +7194,33 @@ static int _cocos2d_EaseCircleActionOut_create(lua_State *L) int num_ret = olua_push_object(L, ret, "cc.EaseCircleActionOut"); // insert code after call - olua_addref(L, -1, "innerAction", 1, OLUA_REF_ALONE); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_EaseCircleActionOut_reverse(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::EaseCircleActionOut *self = nullptr; - - olua_to_object(L, 1, &self, "cc.EaseCircleActionOut"); - - // cocos2d::ActionEase *reverse() - cocos2d::ActionEase *ret = self->reverse(); - int num_ret = olua_push_object(L, ret, "cc.ActionEase"); + olua_addref(L, -1, "innerAction", 1, OLUA_REF_ALONE); olua_endinvoke(L); return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_EaseCircleActionOut(lua_State *L) +static int _olua_cls_cc_EaseCircleActionOut(lua_State *L) { oluacls_class(L, "cc.EaseCircleActionOut"); - oluacls_func(L, "clone", _cocos2d_EaseCircleActionOut_clone); - oluacls_func(L, "create", _cocos2d_EaseCircleActionOut_create); - oluacls_func(L, "reverse", _cocos2d_EaseCircleActionOut_reverse); + oluacls_func(L, "create", _olua_fun_cocos2d_EaseCircleActionOut_create); return 1; } -OLUA_END_DECLS -static int _cocos2d_EaseCircleActionInOut_clone(lua_State *L) +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_EaseCircleActionOut(lua_State *L) { - olua_startinvoke(L); - - cocos2d::EaseCircleActionInOut *self = nullptr; - - olua_to_object(L, 1, &self, "cc.EaseCircleActionInOut"); - - // cocos2d::EaseCircleActionInOut *clone() - cocos2d::EaseCircleActionInOut *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.EaseCircleActionInOut"); - - olua_endinvoke(L); - - return num_ret; + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.EaseCircleActionOut")) { + luaL_error(L, "class not found: cocos2d::EaseCircleActionOut"); + } + return 1; } +OLUA_END_DECLS -static int _cocos2d_EaseCircleActionInOut_create(lua_State *L) +static int _olua_fun_cocos2d_EaseCircleActionInOut_create(lua_State *L) { olua_startinvoke(L); @@ -8840,53 +7240,26 @@ static int _cocos2d_EaseCircleActionInOut_create(lua_State *L) return num_ret; } -static int _cocos2d_EaseCircleActionInOut_reverse(lua_State *L) +static int _olua_cls_cc_EaseCircleActionInOut(lua_State *L) { - olua_startinvoke(L); - - cocos2d::EaseCircleActionInOut *self = nullptr; - - olua_to_object(L, 1, &self, "cc.EaseCircleActionInOut"); - - // cocos2d::ActionEase *reverse() - cocos2d::ActionEase *ret = self->reverse(); - int num_ret = olua_push_object(L, ret, "cc.ActionEase"); - - olua_endinvoke(L); + oluacls_class(L, "cc.EaseCircleActionInOut"); + oluacls_func(L, "create", _olua_fun_cocos2d_EaseCircleActionInOut_create); - return num_ret; + return 1; } OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_EaseCircleActionInOut(lua_State *L) +OLUA_LIB int luaopen_cc_EaseCircleActionInOut(lua_State *L) { - oluacls_class(L, "cc.EaseCircleActionInOut"); - oluacls_func(L, "clone", _cocos2d_EaseCircleActionInOut_clone); - oluacls_func(L, "create", _cocos2d_EaseCircleActionInOut_create); - oluacls_func(L, "reverse", _cocos2d_EaseCircleActionInOut_reverse); - + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.EaseCircleActionInOut")) { + luaL_error(L, "class not found: cocos2d::EaseCircleActionInOut"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_EaseCubicActionIn_clone(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::EaseCubicActionIn *self = nullptr; - - olua_to_object(L, 1, &self, "cc.EaseCubicActionIn"); - - // cocos2d::EaseCubicActionIn *clone() - cocos2d::EaseCubicActionIn *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.EaseCubicActionIn"); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_EaseCubicActionIn_create(lua_State *L) +static int _olua_fun_cocos2d_EaseCubicActionIn_create(lua_State *L) { olua_startinvoke(L); @@ -8906,53 +7279,26 @@ static int _cocos2d_EaseCubicActionIn_create(lua_State *L) return num_ret; } -static int _cocos2d_EaseCubicActionIn_reverse(lua_State *L) +static int _olua_cls_cc_EaseCubicActionIn(lua_State *L) { - olua_startinvoke(L); - - cocos2d::EaseCubicActionIn *self = nullptr; - - olua_to_object(L, 1, &self, "cc.EaseCubicActionIn"); - - // cocos2d::ActionEase *reverse() - cocos2d::ActionEase *ret = self->reverse(); - int num_ret = olua_push_object(L, ret, "cc.ActionEase"); - - olua_endinvoke(L); + oluacls_class(L, "cc.EaseCubicActionIn"); + oluacls_func(L, "create", _olua_fun_cocos2d_EaseCubicActionIn_create); - return num_ret; + return 1; } OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_EaseCubicActionIn(lua_State *L) +OLUA_LIB int luaopen_cc_EaseCubicActionIn(lua_State *L) { - oluacls_class(L, "cc.EaseCubicActionIn"); - oluacls_func(L, "clone", _cocos2d_EaseCubicActionIn_clone); - oluacls_func(L, "create", _cocos2d_EaseCubicActionIn_create); - oluacls_func(L, "reverse", _cocos2d_EaseCubicActionIn_reverse); - + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.EaseCubicActionIn")) { + luaL_error(L, "class not found: cocos2d::EaseCubicActionIn"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_EaseCubicActionOut_clone(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::EaseCubicActionOut *self = nullptr; - - olua_to_object(L, 1, &self, "cc.EaseCubicActionOut"); - - // cocos2d::EaseCubicActionOut *clone() - cocos2d::EaseCubicActionOut *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.EaseCubicActionOut"); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_EaseCubicActionOut_create(lua_State *L) +static int _olua_fun_cocos2d_EaseCubicActionOut_create(lua_State *L) { olua_startinvoke(L); @@ -8972,53 +7318,26 @@ static int _cocos2d_EaseCubicActionOut_create(lua_State *L) return num_ret; } -static int _cocos2d_EaseCubicActionOut_reverse(lua_State *L) +static int _olua_cls_cc_EaseCubicActionOut(lua_State *L) { - olua_startinvoke(L); - - cocos2d::EaseCubicActionOut *self = nullptr; - - olua_to_object(L, 1, &self, "cc.EaseCubicActionOut"); - - // cocos2d::ActionEase *reverse() - cocos2d::ActionEase *ret = self->reverse(); - int num_ret = olua_push_object(L, ret, "cc.ActionEase"); - - olua_endinvoke(L); + oluacls_class(L, "cc.EaseCubicActionOut"); + oluacls_func(L, "create", _olua_fun_cocos2d_EaseCubicActionOut_create); - return num_ret; + return 1; } OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_EaseCubicActionOut(lua_State *L) +OLUA_LIB int luaopen_cc_EaseCubicActionOut(lua_State *L) { - oluacls_class(L, "cc.EaseCubicActionOut"); - oluacls_func(L, "clone", _cocos2d_EaseCubicActionOut_clone); - oluacls_func(L, "create", _cocos2d_EaseCubicActionOut_create); - oluacls_func(L, "reverse", _cocos2d_EaseCubicActionOut_reverse); - + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.EaseCubicActionOut")) { + luaL_error(L, "class not found: cocos2d::EaseCubicActionOut"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_EaseCubicActionInOut_clone(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::EaseCubicActionInOut *self = nullptr; - - olua_to_object(L, 1, &self, "cc.EaseCubicActionInOut"); - - // cocos2d::EaseCubicActionInOut *clone() - cocos2d::EaseCubicActionInOut *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.EaseCubicActionInOut"); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_EaseCubicActionInOut_create(lua_State *L) +static int _olua_fun_cocos2d_EaseCubicActionInOut_create(lua_State *L) { olua_startinvoke(L); @@ -9038,53 +7357,26 @@ static int _cocos2d_EaseCubicActionInOut_create(lua_State *L) return num_ret; } -static int _cocos2d_EaseCubicActionInOut_reverse(lua_State *L) +static int _olua_cls_cc_EaseCubicActionInOut(lua_State *L) { - olua_startinvoke(L); - - cocos2d::EaseCubicActionInOut *self = nullptr; - - olua_to_object(L, 1, &self, "cc.EaseCubicActionInOut"); - - // cocos2d::ActionEase *reverse() - cocos2d::ActionEase *ret = self->reverse(); - int num_ret = olua_push_object(L, ret, "cc.ActionEase"); - - olua_endinvoke(L); + oluacls_class(L, "cc.EaseCubicActionInOut"); + oluacls_func(L, "create", _olua_fun_cocos2d_EaseCubicActionInOut_create); - return num_ret; + return 1; } OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_EaseCubicActionInOut(lua_State *L) +OLUA_LIB int luaopen_cc_EaseCubicActionInOut(lua_State *L) { - oluacls_class(L, "cc.EaseCubicActionInOut"); - oluacls_func(L, "clone", _cocos2d_EaseCubicActionInOut_clone); - oluacls_func(L, "create", _cocos2d_EaseCubicActionInOut_create); - oluacls_func(L, "reverse", _cocos2d_EaseCubicActionInOut_reverse); - + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.EaseCubicActionInOut")) { + luaL_error(L, "class not found: cocos2d::EaseCubicActionInOut"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_EaseIn_clone(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::EaseIn *self = nullptr; - - olua_to_object(L, 1, &self, "cc.EaseIn"); - - // cocos2d::EaseIn *clone() - cocos2d::EaseIn *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.EaseIn"); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_EaseIn_create(lua_State *L) +static int _olua_fun_cocos2d_EaseIn_create(lua_State *L) { olua_startinvoke(L); @@ -9106,53 +7398,26 @@ static int _cocos2d_EaseIn_create(lua_State *L) return num_ret; } -static int _cocos2d_EaseIn_reverse(lua_State *L) +static int _olua_cls_cc_EaseIn(lua_State *L) { - olua_startinvoke(L); - - cocos2d::EaseIn *self = nullptr; - - olua_to_object(L, 1, &self, "cc.EaseIn"); - - // cocos2d::EaseRateAction *reverse() - cocos2d::EaseRateAction *ret = self->reverse(); - int num_ret = olua_push_object(L, ret, "cc.EaseRateAction"); - - olua_endinvoke(L); + oluacls_class(L, "cc.EaseIn"); + oluacls_func(L, "create", _olua_fun_cocos2d_EaseIn_create); - return num_ret; + return 1; } OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_EaseIn(lua_State *L) +OLUA_LIB int luaopen_cc_EaseIn(lua_State *L) { - oluacls_class(L, "cc.EaseIn"); - oluacls_func(L, "clone", _cocos2d_EaseIn_clone); - oluacls_func(L, "create", _cocos2d_EaseIn_create); - oluacls_func(L, "reverse", _cocos2d_EaseIn_reverse); - + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.EaseIn")) { + luaL_error(L, "class not found: cocos2d::EaseIn"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_EaseOut_clone(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::EaseOut *self = nullptr; - - olua_to_object(L, 1, &self, "cc.EaseOut"); - - // cocos2d::EaseOut *clone() - cocos2d::EaseOut *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.EaseOut"); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_EaseOut_create(lua_State *L) +static int _olua_fun_cocos2d_EaseOut_create(lua_State *L) { olua_startinvoke(L); @@ -9174,53 +7439,26 @@ static int _cocos2d_EaseOut_create(lua_State *L) return num_ret; } -static int _cocos2d_EaseOut_reverse(lua_State *L) +static int _olua_cls_cc_EaseOut(lua_State *L) { - olua_startinvoke(L); - - cocos2d::EaseOut *self = nullptr; - - olua_to_object(L, 1, &self, "cc.EaseOut"); - - // cocos2d::EaseRateAction *reverse() - cocos2d::EaseRateAction *ret = self->reverse(); - int num_ret = olua_push_object(L, ret, "cc.EaseRateAction"); - - olua_endinvoke(L); + oluacls_class(L, "cc.EaseOut"); + oluacls_func(L, "create", _olua_fun_cocos2d_EaseOut_create); - return num_ret; + return 1; } OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_EaseOut(lua_State *L) +OLUA_LIB int luaopen_cc_EaseOut(lua_State *L) { - oluacls_class(L, "cc.EaseOut"); - oluacls_func(L, "clone", _cocos2d_EaseOut_clone); - oluacls_func(L, "create", _cocos2d_EaseOut_create); - oluacls_func(L, "reverse", _cocos2d_EaseOut_reverse); - + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.EaseOut")) { + luaL_error(L, "class not found: cocos2d::EaseOut"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_EaseInOut_clone(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::EaseInOut *self = nullptr; - - olua_to_object(L, 1, &self, "cc.EaseInOut"); - - // cocos2d::EaseInOut *clone() - cocos2d::EaseInOut *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.EaseInOut"); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_EaseInOut_create(lua_State *L) +static int _olua_fun_cocos2d_EaseInOut_create(lua_State *L) { olua_startinvoke(L); @@ -9242,36 +7480,26 @@ static int _cocos2d_EaseInOut_create(lua_State *L) return num_ret; } -static int _cocos2d_EaseInOut_reverse(lua_State *L) +static int _olua_cls_cc_EaseInOut(lua_State *L) { - olua_startinvoke(L); - - cocos2d::EaseInOut *self = nullptr; - - olua_to_object(L, 1, &self, "cc.EaseInOut"); - - // cocos2d::EaseRateAction *reverse() - cocos2d::EaseRateAction *ret = self->reverse(); - int num_ret = olua_push_object(L, ret, "cc.EaseRateAction"); - - olua_endinvoke(L); + oluacls_class(L, "cc.EaseInOut"); + oluacls_func(L, "create", _olua_fun_cocos2d_EaseInOut_create); - return num_ret; + return 1; } OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_EaseInOut(lua_State *L) +OLUA_LIB int luaopen_cc_EaseInOut(lua_State *L) { - oluacls_class(L, "cc.EaseInOut"); - oluacls_func(L, "clone", _cocos2d_EaseInOut_clone); - oluacls_func(L, "create", _cocos2d_EaseInOut_create); - oluacls_func(L, "reverse", _cocos2d_EaseInOut_reverse); - + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.EaseInOut")) { + luaL_error(L, "class not found: cocos2d::EaseInOut"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_EaseElastic_getPeriod(lua_State *L) +static int _olua_fun_cocos2d_EaseElastic_getPeriod(lua_State *L) { olua_startinvoke(L); @@ -9288,7 +7516,7 @@ static int _cocos2d_EaseElastic_getPeriod(lua_State *L) return num_ret; } -static int _cocos2d_EaseElastic_setPeriod(lua_State *L) +static int _olua_fun_cocos2d_EaseElastic_setPeriod(lua_State *L) { olua_startinvoke(L); @@ -9306,36 +7534,28 @@ static int _cocos2d_EaseElastic_setPeriod(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_EaseElastic(lua_State *L) +static int _olua_cls_cc_EaseElastic(lua_State *L) { oluacls_class(L, "cc.EaseElastic"); - oluacls_func(L, "getPeriod", _cocos2d_EaseElastic_getPeriod); - oluacls_func(L, "setPeriod", _cocos2d_EaseElastic_setPeriod); - oluacls_prop(L, "period", _cocos2d_EaseElastic_getPeriod, _cocos2d_EaseElastic_setPeriod); + oluacls_func(L, "getPeriod", _olua_fun_cocos2d_EaseElastic_getPeriod); + oluacls_func(L, "setPeriod", _olua_fun_cocos2d_EaseElastic_setPeriod); + oluacls_prop(L, "period", _olua_fun_cocos2d_EaseElastic_getPeriod, _olua_fun_cocos2d_EaseElastic_setPeriod); return 1; } -OLUA_END_DECLS -static int _cocos2d_EaseElasticIn_clone(lua_State *L) +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_EaseElastic(lua_State *L) { - olua_startinvoke(L); - - cocos2d::EaseElasticIn *self = nullptr; - - olua_to_object(L, 1, &self, "cc.EaseElasticIn"); - - // cocos2d::EaseElasticIn *clone() - cocos2d::EaseElasticIn *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.EaseElasticIn"); - - olua_endinvoke(L); - - return num_ret; + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.EaseElastic")) { + luaL_error(L, "class not found: cocos2d::EaseElastic"); + } + return 1; } +OLUA_END_DECLS -static int _cocos2d_EaseElasticIn_create$1(lua_State *L) +static int _olua_fun_cocos2d_EaseElasticIn_create$1(lua_State *L) { olua_startinvoke(L); @@ -9357,7 +7577,7 @@ static int _cocos2d_EaseElasticIn_create$1(lua_State *L) return num_ret; } -static int _cocos2d_EaseElasticIn_create$2(lua_State *L) +static int _olua_fun_cocos2d_EaseElasticIn_create$2(lua_State *L) { olua_startinvoke(L); @@ -9365,7 +7585,7 @@ static int _cocos2d_EaseElasticIn_create$2(lua_State *L) olua_check_object(L, 1, &arg1, "cc.ActionInterval"); - // static cocos2d::EaseElasticIn *create(@addref(innerAction ^) cocos2d::ActionInterval *action, @optional float rate) + // static cocos2d::EaseElasticIn *create(@addref(innerAction ^) cocos2d::ActionInterval *action) cocos2d::EaseElasticIn *ret = cocos2d::EaseElasticIn::create(arg1); int num_ret = olua_push_object(L, ret, "cc.EaseElasticIn"); @@ -9377,21 +7597,21 @@ static int _cocos2d_EaseElasticIn_create$2(lua_State *L) return num_ret; } -static int _cocos2d_EaseElasticIn_create(lua_State *L) +static int _olua_fun_cocos2d_EaseElasticIn_create(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 1) { // if ((olua_is_object(L, 1, "cc.ActionInterval"))) { - // static cocos2d::EaseElasticIn *create(@addref(innerAction ^) cocos2d::ActionInterval *action, @optional float rate) - return _cocos2d_EaseElasticIn_create$2(L); + // static cocos2d::EaseElasticIn *create(@addref(innerAction ^) cocos2d::ActionInterval *action) + return _olua_fun_cocos2d_EaseElasticIn_create$2(L); // } } if (num_args == 2) { // if ((olua_is_object(L, 1, "cc.ActionInterval")) && (olua_is_number(L, 2))) { // static cocos2d::EaseElasticIn *create(@addref(innerAction ^) cocos2d::ActionInterval *action, @optional float rate) - return _cocos2d_EaseElasticIn_create$1(L); + return _olua_fun_cocos2d_EaseElasticIn_create$1(L); // } } @@ -9400,53 +7620,26 @@ static int _cocos2d_EaseElasticIn_create(lua_State *L) return 0; } -static int _cocos2d_EaseElasticIn_reverse(lua_State *L) +static int _olua_cls_cc_EaseElasticIn(lua_State *L) { - olua_startinvoke(L); - - cocos2d::EaseElasticIn *self = nullptr; - - olua_to_object(L, 1, &self, "cc.EaseElasticIn"); - - // cocos2d::EaseElastic *reverse() - cocos2d::EaseElastic *ret = self->reverse(); - int num_ret = olua_push_object(L, ret, "cc.EaseElastic"); - - olua_endinvoke(L); + oluacls_class(L, "cc.EaseElasticIn"); + oluacls_func(L, "create", _olua_fun_cocos2d_EaseElasticIn_create); - return num_ret; + return 1; } OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_EaseElasticIn(lua_State *L) +OLUA_LIB int luaopen_cc_EaseElasticIn(lua_State *L) { - oluacls_class(L, "cc.EaseElasticIn"); - oluacls_func(L, "clone", _cocos2d_EaseElasticIn_clone); - oluacls_func(L, "create", _cocos2d_EaseElasticIn_create); - oluacls_func(L, "reverse", _cocos2d_EaseElasticIn_reverse); - + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.EaseElasticIn")) { + luaL_error(L, "class not found: cocos2d::EaseElasticIn"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_EaseElasticOut_clone(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::EaseElasticOut *self = nullptr; - - olua_to_object(L, 1, &self, "cc.EaseElasticOut"); - - // cocos2d::EaseElasticOut *clone() - cocos2d::EaseElasticOut *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.EaseElasticOut"); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_EaseElasticOut_create$1(lua_State *L) +static int _olua_fun_cocos2d_EaseElasticOut_create$1(lua_State *L) { olua_startinvoke(L); @@ -9468,7 +7661,7 @@ static int _cocos2d_EaseElasticOut_create$1(lua_State *L) return num_ret; } -static int _cocos2d_EaseElasticOut_create$2(lua_State *L) +static int _olua_fun_cocos2d_EaseElasticOut_create$2(lua_State *L) { olua_startinvoke(L); @@ -9476,7 +7669,7 @@ static int _cocos2d_EaseElasticOut_create$2(lua_State *L) olua_check_object(L, 1, &arg1, "cc.ActionInterval"); - // static cocos2d::EaseElasticOut *create(@addref(innerAction ^) cocos2d::ActionInterval *action, @optional float rate) + // static cocos2d::EaseElasticOut *create(@addref(innerAction ^) cocos2d::ActionInterval *action) cocos2d::EaseElasticOut *ret = cocos2d::EaseElasticOut::create(arg1); int num_ret = olua_push_object(L, ret, "cc.EaseElasticOut"); @@ -9488,21 +7681,21 @@ static int _cocos2d_EaseElasticOut_create$2(lua_State *L) return num_ret; } -static int _cocos2d_EaseElasticOut_create(lua_State *L) +static int _olua_fun_cocos2d_EaseElasticOut_create(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 1) { // if ((olua_is_object(L, 1, "cc.ActionInterval"))) { - // static cocos2d::EaseElasticOut *create(@addref(innerAction ^) cocos2d::ActionInterval *action, @optional float rate) - return _cocos2d_EaseElasticOut_create$2(L); + // static cocos2d::EaseElasticOut *create(@addref(innerAction ^) cocos2d::ActionInterval *action) + return _olua_fun_cocos2d_EaseElasticOut_create$2(L); // } } if (num_args == 2) { // if ((olua_is_object(L, 1, "cc.ActionInterval")) && (olua_is_number(L, 2))) { // static cocos2d::EaseElasticOut *create(@addref(innerAction ^) cocos2d::ActionInterval *action, @optional float rate) - return _cocos2d_EaseElasticOut_create$1(L); + return _olua_fun_cocos2d_EaseElasticOut_create$1(L); // } } @@ -9511,53 +7704,26 @@ static int _cocos2d_EaseElasticOut_create(lua_State *L) return 0; } -static int _cocos2d_EaseElasticOut_reverse(lua_State *L) +static int _olua_cls_cc_EaseElasticOut(lua_State *L) { - olua_startinvoke(L); - - cocos2d::EaseElasticOut *self = nullptr; - - olua_to_object(L, 1, &self, "cc.EaseElasticOut"); - - // cocos2d::EaseElastic *reverse() - cocos2d::EaseElastic *ret = self->reverse(); - int num_ret = olua_push_object(L, ret, "cc.EaseElastic"); - - olua_endinvoke(L); + oluacls_class(L, "cc.EaseElasticOut"); + oluacls_func(L, "create", _olua_fun_cocos2d_EaseElasticOut_create); - return num_ret; + return 1; } OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_EaseElasticOut(lua_State *L) +OLUA_LIB int luaopen_cc_EaseElasticOut(lua_State *L) { - oluacls_class(L, "cc.EaseElasticOut"); - oluacls_func(L, "clone", _cocos2d_EaseElasticOut_clone); - oluacls_func(L, "create", _cocos2d_EaseElasticOut_create); - oluacls_func(L, "reverse", _cocos2d_EaseElasticOut_reverse); - + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.EaseElasticOut")) { + luaL_error(L, "class not found: cocos2d::EaseElasticOut"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_EaseElasticInOut_clone(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::EaseElasticInOut *self = nullptr; - - olua_to_object(L, 1, &self, "cc.EaseElasticInOut"); - - // cocos2d::EaseElasticInOut *clone() - cocos2d::EaseElasticInOut *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.EaseElasticInOut"); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_EaseElasticInOut_create$1(lua_State *L) +static int _olua_fun_cocos2d_EaseElasticInOut_create$1(lua_State *L) { olua_startinvoke(L); @@ -9579,7 +7745,7 @@ static int _cocos2d_EaseElasticInOut_create$1(lua_State *L) return num_ret; } -static int _cocos2d_EaseElasticInOut_create$2(lua_State *L) +static int _olua_fun_cocos2d_EaseElasticInOut_create$2(lua_State *L) { olua_startinvoke(L); @@ -9587,7 +7753,7 @@ static int _cocos2d_EaseElasticInOut_create$2(lua_State *L) olua_check_object(L, 1, &arg1, "cc.ActionInterval"); - // static cocos2d::EaseElasticInOut *create(@addref(innerAction ^) cocos2d::ActionInterval *action, @optional float rate) + // static cocos2d::EaseElasticInOut *create(@addref(innerAction ^) cocos2d::ActionInterval *action) cocos2d::EaseElasticInOut *ret = cocos2d::EaseElasticInOut::create(arg1); int num_ret = olua_push_object(L, ret, "cc.EaseElasticInOut"); @@ -9599,76 +7765,49 @@ static int _cocos2d_EaseElasticInOut_create$2(lua_State *L) return num_ret; } -static int _cocos2d_EaseElasticInOut_create(lua_State *L) +static int _olua_fun_cocos2d_EaseElasticInOut_create(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 1) { // if ((olua_is_object(L, 1, "cc.ActionInterval"))) { - // static cocos2d::EaseElasticInOut *create(@addref(innerAction ^) cocos2d::ActionInterval *action, @optional float rate) - return _cocos2d_EaseElasticInOut_create$2(L); + // static cocos2d::EaseElasticInOut *create(@addref(innerAction ^) cocos2d::ActionInterval *action) + return _olua_fun_cocos2d_EaseElasticInOut_create$2(L); // } } if (num_args == 2) { // if ((olua_is_object(L, 1, "cc.ActionInterval")) && (olua_is_number(L, 2))) { // static cocos2d::EaseElasticInOut *create(@addref(innerAction ^) cocos2d::ActionInterval *action, @optional float rate) - return _cocos2d_EaseElasticInOut_create$1(L); + return _olua_fun_cocos2d_EaseElasticInOut_create$1(L); // } } - luaL_error(L, "method 'cocos2d::EaseElasticInOut::create' not support '%d' arguments", num_args); - - return 0; -} - -static int _cocos2d_EaseElasticInOut_reverse(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::EaseElasticInOut *self = nullptr; - - olua_to_object(L, 1, &self, "cc.EaseElasticInOut"); - - // cocos2d::EaseElastic *reverse() - cocos2d::EaseElastic *ret = self->reverse(); - int num_ret = olua_push_object(L, ret, "cc.EaseElastic"); - - olua_endinvoke(L); + luaL_error(L, "method 'cocos2d::EaseElasticInOut::create' not support '%d' arguments", num_args); - return num_ret; + return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_EaseElasticInOut(lua_State *L) +static int _olua_cls_cc_EaseElasticInOut(lua_State *L) { oluacls_class(L, "cc.EaseElasticInOut"); - oluacls_func(L, "clone", _cocos2d_EaseElasticInOut_clone); - oluacls_func(L, "create", _cocos2d_EaseElasticInOut_create); - oluacls_func(L, "reverse", _cocos2d_EaseElasticInOut_reverse); + oluacls_func(L, "create", _olua_fun_cocos2d_EaseElasticInOut_create); return 1; } -OLUA_END_DECLS -static int _cocos2d_EaseBezierAction_clone(lua_State *L) +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_EaseElasticInOut(lua_State *L) { - olua_startinvoke(L); - - cocos2d::EaseBezierAction *self = nullptr; - - olua_to_object(L, 1, &self, "cc.EaseBezierAction"); - - // cocos2d::EaseBezierAction *clone() - cocos2d::EaseBezierAction *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.EaseBezierAction"); - - olua_endinvoke(L); - - return num_ret; + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.EaseElasticInOut")) { + luaL_error(L, "class not found: cocos2d::EaseElasticInOut"); + } + return 1; } +OLUA_END_DECLS -static int _cocos2d_EaseBezierAction_create(lua_State *L) +static int _olua_fun_cocos2d_EaseBezierAction_create(lua_State *L) { olua_startinvoke(L); @@ -9688,24 +7827,7 @@ static int _cocos2d_EaseBezierAction_create(lua_State *L) return num_ret; } -static int _cocos2d_EaseBezierAction_reverse(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::EaseBezierAction *self = nullptr; - - olua_to_object(L, 1, &self, "cc.EaseBezierAction"); - - // cocos2d::EaseBezierAction *reverse() - cocos2d::EaseBezierAction *ret = self->reverse(); - int num_ret = olua_push_object(L, ret, "cc.EaseBezierAction"); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_EaseBezierAction_setBezierParamer(lua_State *L) +static int _olua_fun_cocos2d_EaseBezierAction_setBezierParamer(lua_State *L) { olua_startinvoke(L); @@ -9729,38 +7851,45 @@ static int _cocos2d_EaseBezierAction_setBezierParamer(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_EaseBezierAction(lua_State *L) +static int _olua_cls_cc_EaseBezierAction(lua_State *L) { oluacls_class(L, "cc.EaseBezierAction"); - oluacls_func(L, "clone", _cocos2d_EaseBezierAction_clone); - oluacls_func(L, "create", _cocos2d_EaseBezierAction_create); - oluacls_func(L, "reverse", _cocos2d_EaseBezierAction_reverse); - oluacls_func(L, "setBezierParamer", _cocos2d_EaseBezierAction_setBezierParamer); + oluacls_func(L, "create", _olua_fun_cocos2d_EaseBezierAction_create); + oluacls_func(L, "setBezierParamer", _olua_fun_cocos2d_EaseBezierAction_setBezierParamer); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_EaseBezierAction(lua_State *L) +{ + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.EaseBezierAction")) { + luaL_error(L, "class not found: cocos2d::EaseBezierAction"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_PointArray_addControlPoint(lua_State *L) +static int _olua_fun_cocos2d_PointArray_addControlPoint(lua_State *L) { olua_startinvoke(L); cocos2d::PointArray *self = nullptr; - cocos2d::Vec2 arg1; /** controlPoint */ + cocos2d::Vec2 *arg1; /** controlPoint */ olua_to_object(L, 1, &self, "cc.PointArray"); olua_check_object(L, 2, &arg1, "cc.Vec2"); // void addControlPoint(const cocos2d::Vec2 &controlPoint) - self->addControlPoint(arg1); + self->addControlPoint(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_PointArray_as(lua_State *L) +static int _olua_fun_cocos2d_PointArray_as(lua_State *L) { olua_startinvoke(L); @@ -9788,7 +7917,7 @@ static int _cocos2d_PointArray_as(lua_State *L) return 1; } -static int _cocos2d_PointArray_clone(lua_State *L) +static int _olua_fun_cocos2d_PointArray_clone(lua_State *L) { olua_startinvoke(L); @@ -9805,7 +7934,7 @@ static int _cocos2d_PointArray_clone(lua_State *L) return num_ret; } -static int _cocos2d_PointArray_count(lua_State *L) +static int _olua_fun_cocos2d_PointArray_count(lua_State *L) { olua_startinvoke(L); @@ -9822,7 +7951,7 @@ static int _cocos2d_PointArray_count(lua_State *L) return num_ret; } -static int _cocos2d_PointArray_create(lua_State *L) +static int _olua_fun_cocos2d_PointArray_create(lua_State *L) { olua_startinvoke(L); @@ -9839,7 +7968,7 @@ static int _cocos2d_PointArray_create(lua_State *L) return num_ret; } -static int _cocos2d_PointArray_getControlPointAtIndex(lua_State *L) +static int _olua_fun_cocos2d_PointArray_getControlPointAtIndex(lua_State *L) { olua_startinvoke(L); @@ -9858,7 +7987,7 @@ static int _cocos2d_PointArray_getControlPointAtIndex(lua_State *L) return num_ret; } -static int _cocos2d_PointArray_getControlPoints(lua_State *L) +static int _olua_fun_cocos2d_PointArray_getControlPoints(lua_State *L) { olua_startinvoke(L); @@ -9869,7 +7998,7 @@ static int _cocos2d_PointArray_getControlPoints(lua_State *L) // const std::vector &getControlPoints() const std::vector &ret = self->getControlPoints(); int num_ret = olua_push_array(L, ret, [L](cocos2d::Vec2 &arg1) { - olua_pushcopy_object(L, arg1, "cc.Vec2"); + olua_copy_object(L, arg1, "cc.Vec2"); }); olua_endinvoke(L); @@ -9877,7 +8006,7 @@ static int _cocos2d_PointArray_getControlPoints(lua_State *L) return num_ret; } -static int _cocos2d_PointArray_initWithCapacity(lua_State *L) +static int _olua_fun_cocos2d_PointArray_initWithCapacity(lua_State *L) { olua_startinvoke(L); @@ -9896,12 +8025,12 @@ static int _cocos2d_PointArray_initWithCapacity(lua_State *L) return num_ret; } -static int _cocos2d_PointArray_insertControlPoint(lua_State *L) +static int _olua_fun_cocos2d_PointArray_insertControlPoint(lua_State *L) { olua_startinvoke(L); cocos2d::PointArray *self = nullptr; - cocos2d::Vec2 arg1; /** controlPoint */ + cocos2d::Vec2 *arg1; /** controlPoint */ ssize_t arg2 = 0; /** index */ olua_to_object(L, 1, &self, "cc.PointArray"); @@ -9909,14 +8038,14 @@ static int _cocos2d_PointArray_insertControlPoint(lua_State *L) olua_check_integer(L, 3, &arg2); // void insertControlPoint(const cocos2d::Vec2 &controlPoint, ssize_t index) - self->insertControlPoint(arg1, arg2); + self->insertControlPoint(*arg1, arg2); olua_endinvoke(L); return 0; } -static int _cocos2d_PointArray_removeControlPointAtIndex(lua_State *L) +static int _olua_fun_cocos2d_PointArray_removeControlPointAtIndex(lua_State *L) { olua_startinvoke(L); @@ -9934,12 +8063,12 @@ static int _cocos2d_PointArray_removeControlPointAtIndex(lua_State *L) return 0; } -static int _cocos2d_PointArray_replaceControlPoint(lua_State *L) +static int _olua_fun_cocos2d_PointArray_replaceControlPoint(lua_State *L) { olua_startinvoke(L); cocos2d::PointArray *self = nullptr; - cocos2d::Vec2 arg1; /** controlPoint */ + cocos2d::Vec2 *arg1; /** controlPoint */ ssize_t arg2 = 0; /** index */ olua_to_object(L, 1, &self, "cc.PointArray"); @@ -9947,14 +8076,14 @@ static int _cocos2d_PointArray_replaceControlPoint(lua_State *L) olua_check_integer(L, 3, &arg2); // void replaceControlPoint(const cocos2d::Vec2 &controlPoint, ssize_t index) - self->replaceControlPoint(arg1, arg2); + self->replaceControlPoint(*arg1, arg2); olua_endinvoke(L); return 0; } -static int _cocos2d_PointArray_reverse(lua_State *L) +static int _olua_fun_cocos2d_PointArray_reverse(lua_State *L) { olua_startinvoke(L); @@ -9971,7 +8100,7 @@ static int _cocos2d_PointArray_reverse(lua_State *L) return num_ret; } -static int _cocos2d_PointArray_reverseInline(lua_State *L) +static int _olua_fun_cocos2d_PointArray_reverseInline(lua_State *L) { olua_startinvoke(L); @@ -9987,7 +8116,7 @@ static int _cocos2d_PointArray_reverseInline(lua_State *L) return 0; } -static int _cocos2d_PointArray_setControlPoints(lua_State *L) +static int _olua_fun_cocos2d_PointArray_setControlPoints(lua_State *L) { olua_startinvoke(L); @@ -10007,48 +8136,40 @@ static int _cocos2d_PointArray_setControlPoints(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_PointArray(lua_State *L) +static int _olua_cls_cc_PointArray(lua_State *L) { oluacls_class(L, "cc.PointArray"); - oluacls_func(L, "addControlPoint", _cocos2d_PointArray_addControlPoint); - oluacls_func(L, "as", _cocos2d_PointArray_as); - oluacls_func(L, "clone", _cocos2d_PointArray_clone); - oluacls_func(L, "count", _cocos2d_PointArray_count); - oluacls_func(L, "create", _cocos2d_PointArray_create); - oluacls_func(L, "getControlPointAtIndex", _cocos2d_PointArray_getControlPointAtIndex); - oluacls_func(L, "getControlPoints", _cocos2d_PointArray_getControlPoints); - oluacls_func(L, "initWithCapacity", _cocos2d_PointArray_initWithCapacity); - oluacls_func(L, "insertControlPoint", _cocos2d_PointArray_insertControlPoint); - oluacls_func(L, "removeControlPointAtIndex", _cocos2d_PointArray_removeControlPointAtIndex); - oluacls_func(L, "replaceControlPoint", _cocos2d_PointArray_replaceControlPoint); - oluacls_func(L, "reverse", _cocos2d_PointArray_reverse); - oluacls_func(L, "reverseInline", _cocos2d_PointArray_reverseInline); - oluacls_func(L, "setControlPoints", _cocos2d_PointArray_setControlPoints); - oluacls_prop(L, "controlPoints", _cocos2d_PointArray_getControlPoints, _cocos2d_PointArray_setControlPoints); + oluacls_func(L, "addControlPoint", _olua_fun_cocos2d_PointArray_addControlPoint); + oluacls_func(L, "as", _olua_fun_cocos2d_PointArray_as); + oluacls_func(L, "clone", _olua_fun_cocos2d_PointArray_clone); + oluacls_func(L, "count", _olua_fun_cocos2d_PointArray_count); + oluacls_func(L, "create", _olua_fun_cocos2d_PointArray_create); + oluacls_func(L, "getControlPointAtIndex", _olua_fun_cocos2d_PointArray_getControlPointAtIndex); + oluacls_func(L, "getControlPoints", _olua_fun_cocos2d_PointArray_getControlPoints); + oluacls_func(L, "initWithCapacity", _olua_fun_cocos2d_PointArray_initWithCapacity); + oluacls_func(L, "insertControlPoint", _olua_fun_cocos2d_PointArray_insertControlPoint); + oluacls_func(L, "removeControlPointAtIndex", _olua_fun_cocos2d_PointArray_removeControlPointAtIndex); + oluacls_func(L, "replaceControlPoint", _olua_fun_cocos2d_PointArray_replaceControlPoint); + oluacls_func(L, "reverse", _olua_fun_cocos2d_PointArray_reverse); + oluacls_func(L, "reverseInline", _olua_fun_cocos2d_PointArray_reverseInline); + oluacls_func(L, "setControlPoints", _olua_fun_cocos2d_PointArray_setControlPoints); + oluacls_prop(L, "controlPoints", _olua_fun_cocos2d_PointArray_getControlPoints, _olua_fun_cocos2d_PointArray_setControlPoints); return 1; } -OLUA_END_DECLS -static int _cocos2d_CardinalSplineTo_clone(lua_State *L) +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_PointArray(lua_State *L) { - olua_startinvoke(L); - - cocos2d::CardinalSplineTo *self = nullptr; - - olua_to_object(L, 1, &self, "cc.CardinalSplineTo"); - - // cocos2d::CardinalSplineTo *clone() - cocos2d::CardinalSplineTo *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.CardinalSplineTo"); - - olua_endinvoke(L); - - return num_ret; + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.PointArray")) { + luaL_error(L, "class not found: cocos2d::PointArray"); + } + return 1; } +OLUA_END_DECLS -static int _cocos2d_CardinalSplineTo_create(lua_State *L) +static int _olua_fun_cocos2d_CardinalSplineTo_create(lua_State *L) { olua_startinvoke(L); @@ -10069,7 +8190,7 @@ static int _cocos2d_CardinalSplineTo_create(lua_State *L) return num_ret; } -static int _cocos2d_CardinalSplineTo_getPoints(lua_State *L) +static int _olua_fun_cocos2d_CardinalSplineTo_getPoints(lua_State *L) { olua_startinvoke(L); @@ -10086,24 +8207,7 @@ static int _cocos2d_CardinalSplineTo_getPoints(lua_State *L) return num_ret; } -static int _cocos2d_CardinalSplineTo_reverse(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::CardinalSplineTo *self = nullptr; - - olua_to_object(L, 1, &self, "cc.CardinalSplineTo"); - - // cocos2d::CardinalSplineTo *reverse() - cocos2d::CardinalSplineTo *ret = self->reverse(); - int num_ret = olua_push_object(L, ret, "cc.CardinalSplineTo"); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_CardinalSplineTo_setPoints(lua_State *L) +static int _olua_fun_cocos2d_CardinalSplineTo_setPoints(lua_State *L) { olua_startinvoke(L); @@ -10121,58 +8225,48 @@ static int _cocos2d_CardinalSplineTo_setPoints(lua_State *L) return 0; } -static int _cocos2d_CardinalSplineTo_updatePosition(lua_State *L) +static int _olua_fun_cocos2d_CardinalSplineTo_updatePosition(lua_State *L) { olua_startinvoke(L); cocos2d::CardinalSplineTo *self = nullptr; - cocos2d::Vec2 arg1; /** newPos */ + cocos2d::Vec2 *arg1; /** newPos */ olua_to_object(L, 1, &self, "cc.CardinalSplineTo"); olua_check_object(L, 2, &arg1, "cc.Vec2"); // void updatePosition(const cocos2d::Vec2 &newPos) - self->updatePosition(arg1); + self->updatePosition(*arg1); olua_endinvoke(L); return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_CardinalSplineTo(lua_State *L) +static int _olua_cls_cc_CardinalSplineTo(lua_State *L) { oluacls_class(L, "cc.CardinalSplineTo"); - oluacls_func(L, "clone", _cocos2d_CardinalSplineTo_clone); - oluacls_func(L, "create", _cocos2d_CardinalSplineTo_create); - oluacls_func(L, "getPoints", _cocos2d_CardinalSplineTo_getPoints); - oluacls_func(L, "reverse", _cocos2d_CardinalSplineTo_reverse); - oluacls_func(L, "setPoints", _cocos2d_CardinalSplineTo_setPoints); - oluacls_func(L, "updatePosition", _cocos2d_CardinalSplineTo_updatePosition); - oluacls_prop(L, "points", _cocos2d_CardinalSplineTo_getPoints, _cocos2d_CardinalSplineTo_setPoints); + oluacls_func(L, "create", _olua_fun_cocos2d_CardinalSplineTo_create); + oluacls_func(L, "getPoints", _olua_fun_cocos2d_CardinalSplineTo_getPoints); + oluacls_func(L, "setPoints", _olua_fun_cocos2d_CardinalSplineTo_setPoints); + oluacls_func(L, "updatePosition", _olua_fun_cocos2d_CardinalSplineTo_updatePosition); + oluacls_prop(L, "points", _olua_fun_cocos2d_CardinalSplineTo_getPoints, _olua_fun_cocos2d_CardinalSplineTo_setPoints); return 1; } -OLUA_END_DECLS -static int _cocos2d_CardinalSplineBy_clone(lua_State *L) +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_CardinalSplineTo(lua_State *L) { - olua_startinvoke(L); - - cocos2d::CardinalSplineBy *self = nullptr; - - olua_to_object(L, 1, &self, "cc.CardinalSplineBy"); - - // cocos2d::CardinalSplineBy *clone() - cocos2d::CardinalSplineBy *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.CardinalSplineBy"); - - olua_endinvoke(L); - - return num_ret; + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.CardinalSplineTo")) { + luaL_error(L, "class not found: cocos2d::CardinalSplineTo"); + } + return 1; } +OLUA_END_DECLS -static int _cocos2d_CardinalSplineBy_create(lua_State *L) +static int _olua_fun_cocos2d_CardinalSplineBy_create(lua_State *L) { olua_startinvoke(L); @@ -10193,53 +8287,26 @@ static int _cocos2d_CardinalSplineBy_create(lua_State *L) return num_ret; } -static int _cocos2d_CardinalSplineBy_reverse(lua_State *L) +static int _olua_cls_cc_CardinalSplineBy(lua_State *L) { - olua_startinvoke(L); - - cocos2d::CardinalSplineBy *self = nullptr; - - olua_to_object(L, 1, &self, "cc.CardinalSplineBy"); - - // cocos2d::CardinalSplineBy *reverse() - cocos2d::CardinalSplineBy *ret = self->reverse(); - int num_ret = olua_push_object(L, ret, "cc.CardinalSplineBy"); - - olua_endinvoke(L); + oluacls_class(L, "cc.CardinalSplineBy"); + oluacls_func(L, "create", _olua_fun_cocos2d_CardinalSplineBy_create); - return num_ret; + return 1; } OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_CardinalSplineBy(lua_State *L) +OLUA_LIB int luaopen_cc_CardinalSplineBy(lua_State *L) { - oluacls_class(L, "cc.CardinalSplineBy"); - oluacls_func(L, "clone", _cocos2d_CardinalSplineBy_clone); - oluacls_func(L, "create", _cocos2d_CardinalSplineBy_create); - oluacls_func(L, "reverse", _cocos2d_CardinalSplineBy_reverse); - + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.CardinalSplineBy")) { + luaL_error(L, "class not found: cocos2d::CardinalSplineBy"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_CatmullRomTo_clone(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::CatmullRomTo *self = nullptr; - - olua_to_object(L, 1, &self, "cc.CatmullRomTo"); - - // cocos2d::CatmullRomTo *clone() - cocos2d::CatmullRomTo *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.CatmullRomTo"); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_CatmullRomTo_create(lua_State *L) +static int _olua_fun_cocos2d_CatmullRomTo_create(lua_State *L) { olua_startinvoke(L); @@ -10258,53 +8325,26 @@ static int _cocos2d_CatmullRomTo_create(lua_State *L) return num_ret; } -static int _cocos2d_CatmullRomTo_reverse(lua_State *L) +static int _olua_cls_cc_CatmullRomTo(lua_State *L) { - olua_startinvoke(L); - - cocos2d::CatmullRomTo *self = nullptr; - - olua_to_object(L, 1, &self, "cc.CatmullRomTo"); - - // cocos2d::CatmullRomTo *reverse() - cocos2d::CatmullRomTo *ret = self->reverse(); - int num_ret = olua_push_object(L, ret, "cc.CatmullRomTo"); - - olua_endinvoke(L); + oluacls_class(L, "cc.CatmullRomTo"); + oluacls_func(L, "create", _olua_fun_cocos2d_CatmullRomTo_create); - return num_ret; + return 1; } OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_CatmullRomTo(lua_State *L) +OLUA_LIB int luaopen_cc_CatmullRomTo(lua_State *L) { - oluacls_class(L, "cc.CatmullRomTo"); - oluacls_func(L, "clone", _cocos2d_CatmullRomTo_clone); - oluacls_func(L, "create", _cocos2d_CatmullRomTo_create); - oluacls_func(L, "reverse", _cocos2d_CatmullRomTo_reverse); - + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.CatmullRomTo")) { + luaL_error(L, "class not found: cocos2d::CatmullRomTo"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_CatmullRomBy_clone(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::CatmullRomBy *self = nullptr; - - olua_to_object(L, 1, &self, "cc.CatmullRomBy"); - - // cocos2d::CatmullRomBy *clone() - cocos2d::CatmullRomBy *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.CatmullRomBy"); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_CatmullRomBy_create(lua_State *L) +static int _olua_fun_cocos2d_CatmullRomBy_create(lua_State *L) { olua_startinvoke(L); @@ -10323,98 +8363,44 @@ static int _cocos2d_CatmullRomBy_create(lua_State *L) return num_ret; } -static int _cocos2d_CatmullRomBy_reverse(lua_State *L) +static int _olua_cls_cc_CatmullRomBy(lua_State *L) { - olua_startinvoke(L); - - cocos2d::CatmullRomBy *self = nullptr; - - olua_to_object(L, 1, &self, "cc.CatmullRomBy"); - - // cocos2d::CatmullRomBy *reverse() - cocos2d::CatmullRomBy *ret = self->reverse(); - int num_ret = olua_push_object(L, ret, "cc.CatmullRomBy"); - - olua_endinvoke(L); + oluacls_class(L, "cc.CatmullRomBy"); + oluacls_func(L, "create", _olua_fun_cocos2d_CatmullRomBy_create); - return num_ret; + return 1; } OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_CatmullRomBy(lua_State *L) +OLUA_LIB int luaopen_cc_CatmullRomBy(lua_State *L) { - oluacls_class(L, "cc.CatmullRomBy"); - oluacls_func(L, "clone", _cocos2d_CatmullRomBy_clone); - oluacls_func(L, "create", _cocos2d_CatmullRomBy_create); - oluacls_func(L, "reverse", _cocos2d_CatmullRomBy_reverse); - + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.CatmullRomBy")) { + luaL_error(L, "class not found: cocos2d::CatmullRomBy"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_ActionInstant_clone(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::ActionInstant *self = nullptr; - - olua_to_object(L, 1, &self, "cc.ActionInstant"); - - // cocos2d::ActionInstant *clone() - cocos2d::ActionInstant *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.ActionInstant"); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_ActionInstant_reverse(lua_State *L) +static int _olua_cls_cc_ActionInstant(lua_State *L) { - olua_startinvoke(L); - - cocos2d::ActionInstant *self = nullptr; - - olua_to_object(L, 1, &self, "cc.ActionInstant"); - - // cocos2d::ActionInstant *reverse() - cocos2d::ActionInstant *ret = self->reverse(); - int num_ret = olua_push_object(L, ret, "cc.ActionInstant"); - - olua_endinvoke(L); + oluacls_class(L, "cc.ActionInstant"); - return num_ret; + return 1; } OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ActionInstant(lua_State *L) +OLUA_LIB int luaopen_cc_ActionInstant(lua_State *L) { - oluacls_class(L, "cc.ActionInstant"); - oluacls_func(L, "clone", _cocos2d_ActionInstant_clone); - oluacls_func(L, "reverse", _cocos2d_ActionInstant_reverse); - + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.ActionInstant")) { + luaL_error(L, "class not found: cocos2d::ActionInstant"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_Show_clone(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::Show *self = nullptr; - - olua_to_object(L, 1, &self, "cc.Show"); - - // cocos2d::Show *clone() - cocos2d::Show *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.Show"); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_Show_create(lua_State *L) +static int _olua_fun_cocos2d_Show_create(lua_State *L) { olua_startinvoke(L); @@ -10427,35 +8413,26 @@ static int _cocos2d_Show_create(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_Show(lua_State *L) +static int _olua_cls_cc_Show(lua_State *L) { oluacls_class(L, "cc.Show"); - oluacls_func(L, "clone", _cocos2d_Show_clone); - oluacls_func(L, "create", _cocos2d_Show_create); + oluacls_func(L, "create", _olua_fun_cocos2d_Show_create); return 1; } -OLUA_END_DECLS -static int _cocos2d_Hide_clone(lua_State *L) +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_Show(lua_State *L) { - olua_startinvoke(L); - - cocos2d::Hide *self = nullptr; - - olua_to_object(L, 1, &self, "cc.Hide"); - - // cocos2d::Hide *clone() - cocos2d::Hide *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.Hide"); - - olua_endinvoke(L); - - return num_ret; + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.Show")) { + luaL_error(L, "class not found: cocos2d::Show"); + } + return 1; } +OLUA_END_DECLS -static int _cocos2d_Hide_create(lua_State *L) +static int _olua_fun_cocos2d_Hide_create(lua_State *L) { olua_startinvoke(L); @@ -10468,35 +8445,26 @@ static int _cocos2d_Hide_create(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_Hide(lua_State *L) +static int _olua_cls_cc_Hide(lua_State *L) { oluacls_class(L, "cc.Hide"); - oluacls_func(L, "clone", _cocos2d_Hide_clone); - oluacls_func(L, "create", _cocos2d_Hide_create); + oluacls_func(L, "create", _olua_fun_cocos2d_Hide_create); return 1; } -OLUA_END_DECLS -static int _cocos2d_ToggleVisibility_clone(lua_State *L) +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_Hide(lua_State *L) { - olua_startinvoke(L); - - cocos2d::ToggleVisibility *self = nullptr; - - olua_to_object(L, 1, &self, "cc.ToggleVisibility"); - - // cocos2d::ToggleVisibility *clone() - cocos2d::ToggleVisibility *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.ToggleVisibility"); - - olua_endinvoke(L); - - return num_ret; + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.Hide")) { + luaL_error(L, "class not found: cocos2d::Hide"); + } + return 1; } +OLUA_END_DECLS -static int _cocos2d_ToggleVisibility_create(lua_State *L) +static int _olua_fun_cocos2d_ToggleVisibility_create(lua_State *L) { olua_startinvoke(L); @@ -10509,53 +8477,26 @@ static int _cocos2d_ToggleVisibility_create(lua_State *L) return num_ret; } -static int _cocos2d_ToggleVisibility_reverse(lua_State *L) +static int _olua_cls_cc_ToggleVisibility(lua_State *L) { - olua_startinvoke(L); - - cocos2d::ToggleVisibility *self = nullptr; - - olua_to_object(L, 1, &self, "cc.ToggleVisibility"); - - // cocos2d::ToggleVisibility *reverse() - cocos2d::ToggleVisibility *ret = self->reverse(); - int num_ret = olua_push_object(L, ret, "cc.ToggleVisibility"); - - olua_endinvoke(L); + oluacls_class(L, "cc.ToggleVisibility"); + oluacls_func(L, "create", _olua_fun_cocos2d_ToggleVisibility_create); - return num_ret; + return 1; } OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ToggleVisibility(lua_State *L) +OLUA_LIB int luaopen_cc_ToggleVisibility(lua_State *L) { - oluacls_class(L, "cc.ToggleVisibility"); - oluacls_func(L, "clone", _cocos2d_ToggleVisibility_clone); - oluacls_func(L, "create", _cocos2d_ToggleVisibility_create); - oluacls_func(L, "reverse", _cocos2d_ToggleVisibility_reverse); - + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.ToggleVisibility")) { + luaL_error(L, "class not found: cocos2d::ToggleVisibility"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_RemoveSelf_clone(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::RemoveSelf *self = nullptr; - - olua_to_object(L, 1, &self, "cc.RemoveSelf"); - - // cocos2d::RemoveSelf *clone() - cocos2d::RemoveSelf *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.RemoveSelf"); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_RemoveSelf_create$1(lua_State *L) +static int _olua_fun_cocos2d_RemoveSelf_create$1(lua_State *L) { olua_startinvoke(L); @@ -10572,11 +8513,11 @@ static int _cocos2d_RemoveSelf_create$1(lua_State *L) return num_ret; } -static int _cocos2d_RemoveSelf_create$2(lua_State *L) +static int _olua_fun_cocos2d_RemoveSelf_create$2(lua_State *L) { olua_startinvoke(L); - // static cocos2d::RemoveSelf *create(@optional bool isNeedCleanUp) + // static cocos2d::RemoveSelf *create() cocos2d::RemoveSelf *ret = cocos2d::RemoveSelf::create(); int num_ret = olua_push_object(L, ret, "cc.RemoveSelf"); @@ -10585,74 +8526,47 @@ static int _cocos2d_RemoveSelf_create$2(lua_State *L) return num_ret; } -static int _cocos2d_RemoveSelf_create(lua_State *L) +static int _olua_fun_cocos2d_RemoveSelf_create(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 0) { - // static cocos2d::RemoveSelf *create(@optional bool isNeedCleanUp) - return _cocos2d_RemoveSelf_create$2(L); + // static cocos2d::RemoveSelf *create() + return _olua_fun_cocos2d_RemoveSelf_create$2(L); } if (num_args == 1) { // if ((olua_is_bool(L, 1))) { - // static cocos2d::RemoveSelf *create(@optional bool isNeedCleanUp) - return _cocos2d_RemoveSelf_create$1(L); - // } - } - - luaL_error(L, "method 'cocos2d::RemoveSelf::create' not support '%d' arguments", num_args); - - return 0; -} - -static int _cocos2d_RemoveSelf_reverse(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::RemoveSelf *self = nullptr; - - olua_to_object(L, 1, &self, "cc.RemoveSelf"); - - // cocos2d::RemoveSelf *reverse() - cocos2d::RemoveSelf *ret = self->reverse(); - int num_ret = olua_push_object(L, ret, "cc.RemoveSelf"); + // static cocos2d::RemoveSelf *create(@optional bool isNeedCleanUp) + return _olua_fun_cocos2d_RemoveSelf_create$1(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'cocos2d::RemoveSelf::create' not support '%d' arguments", num_args); - return num_ret; + return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_RemoveSelf(lua_State *L) +static int _olua_cls_cc_RemoveSelf(lua_State *L) { oluacls_class(L, "cc.RemoveSelf"); - oluacls_func(L, "clone", _cocos2d_RemoveSelf_clone); - oluacls_func(L, "create", _cocos2d_RemoveSelf_create); - oluacls_func(L, "reverse", _cocos2d_RemoveSelf_reverse); + oluacls_func(L, "create", _olua_fun_cocos2d_RemoveSelf_create); return 1; } -OLUA_END_DECLS -static int _cocos2d_FlipX_clone(lua_State *L) +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_RemoveSelf(lua_State *L) { - olua_startinvoke(L); - - cocos2d::FlipX *self = nullptr; - - olua_to_object(L, 1, &self, "cc.FlipX"); - - // cocos2d::FlipX *clone() - cocos2d::FlipX *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.FlipX"); - - olua_endinvoke(L); - - return num_ret; + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.RemoveSelf")) { + luaL_error(L, "class not found: cocos2d::RemoveSelf"); + } + return 1; } +OLUA_END_DECLS -static int _cocos2d_FlipX_create(lua_State *L) +static int _olua_fun_cocos2d_FlipX_create(lua_State *L) { olua_startinvoke(L); @@ -10669,53 +8583,26 @@ static int _cocos2d_FlipX_create(lua_State *L) return num_ret; } -static int _cocos2d_FlipX_reverse(lua_State *L) +static int _olua_cls_cc_FlipX(lua_State *L) { - olua_startinvoke(L); - - cocos2d::FlipX *self = nullptr; - - olua_to_object(L, 1, &self, "cc.FlipX"); - - // cocos2d::FlipX *reverse() - cocos2d::FlipX *ret = self->reverse(); - int num_ret = olua_push_object(L, ret, "cc.FlipX"); - - olua_endinvoke(L); + oluacls_class(L, "cc.FlipX"); + oluacls_func(L, "create", _olua_fun_cocos2d_FlipX_create); - return num_ret; + return 1; } OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_FlipX(lua_State *L) +OLUA_LIB int luaopen_cc_FlipX(lua_State *L) { - oluacls_class(L, "cc.FlipX"); - oluacls_func(L, "clone", _cocos2d_FlipX_clone); - oluacls_func(L, "create", _cocos2d_FlipX_create); - oluacls_func(L, "reverse", _cocos2d_FlipX_reverse); - + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.FlipX")) { + luaL_error(L, "class not found: cocos2d::FlipX"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_FlipY_clone(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::FlipY *self = nullptr; - - olua_to_object(L, 1, &self, "cc.FlipY"); - - // cocos2d::FlipY *clone() - cocos2d::FlipY *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.FlipY"); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_FlipY_create(lua_State *L) +static int _olua_fun_cocos2d_FlipY_create(lua_State *L) { olua_startinvoke(L); @@ -10732,62 +8619,35 @@ static int _cocos2d_FlipY_create(lua_State *L) return num_ret; } -static int _cocos2d_FlipY_reverse(lua_State *L) +static int _olua_cls_cc_FlipY(lua_State *L) { - olua_startinvoke(L); - - cocos2d::FlipY *self = nullptr; - - olua_to_object(L, 1, &self, "cc.FlipY"); - - // cocos2d::FlipY *reverse() - cocos2d::FlipY *ret = self->reverse(); - int num_ret = olua_push_object(L, ret, "cc.FlipY"); - - olua_endinvoke(L); + oluacls_class(L, "cc.FlipY"); + oluacls_func(L, "create", _olua_fun_cocos2d_FlipY_create); - return num_ret; + return 1; } OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_FlipY(lua_State *L) +OLUA_LIB int luaopen_cc_FlipY(lua_State *L) { - oluacls_class(L, "cc.FlipY"); - oluacls_func(L, "clone", _cocos2d_FlipY_clone); - oluacls_func(L, "create", _cocos2d_FlipY_create); - oluacls_func(L, "reverse", _cocos2d_FlipY_reverse); - + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.FlipY")) { + luaL_error(L, "class not found: cocos2d::FlipY"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_Place_clone(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::Place *self = nullptr; - - olua_to_object(L, 1, &self, "cc.Place"); - - // cocos2d::Place *clone() - cocos2d::Place *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.Place"); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_Place_create(lua_State *L) +static int _olua_fun_cocos2d_Place_create(lua_State *L) { olua_startinvoke(L); - cocos2d::Vec2 arg1; /** pos */ + cocos2d::Vec2 *arg1; /** pos */ olua_check_object(L, 1, &arg1, "cc.Vec2"); // static cocos2d::Place *create(const cocos2d::Vec2 &pos) - cocos2d::Place *ret = cocos2d::Place::create(arg1); + cocos2d::Place *ret = cocos2d::Place::create(*arg1); int num_ret = olua_push_object(L, ret, "cc.Place"); olua_endinvoke(L); @@ -10795,53 +8655,26 @@ static int _cocos2d_Place_create(lua_State *L) return num_ret; } -static int _cocos2d_Place_reverse(lua_State *L) +static int _olua_cls_cc_Place(lua_State *L) { - olua_startinvoke(L); - - cocos2d::Place *self = nullptr; - - olua_to_object(L, 1, &self, "cc.Place"); - - // cocos2d::Place *reverse() - cocos2d::Place *ret = self->reverse(); - int num_ret = olua_push_object(L, ret, "cc.Place"); - - olua_endinvoke(L); + oluacls_class(L, "cc.Place"); + oluacls_func(L, "create", _olua_fun_cocos2d_Place_create); - return num_ret; + return 1; } OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_Place(lua_State *L) +OLUA_LIB int luaopen_cc_Place(lua_State *L) { - oluacls_class(L, "cc.Place"); - oluacls_func(L, "clone", _cocos2d_Place_clone); - oluacls_func(L, "create", _cocos2d_Place_create); - oluacls_func(L, "reverse", _cocos2d_Place_reverse); - + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.Place")) { + luaL_error(L, "class not found: cocos2d::Place"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_CallFunc_clone(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::CallFunc *self = nullptr; - - olua_to_object(L, 1, &self, "cc.CallFunc"); - - // cocos2d::CallFunc *clone() - cocos2d::CallFunc *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.CallFunc"); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_CallFunc_create(lua_State *L) +static int _olua_fun_cocos2d_CallFunc_create(lua_State *L) { olua_startinvoke(L); @@ -10851,9 +8684,10 @@ static int _cocos2d_CallFunc_create(lua_State *L) void *cb_store = (void *)olua_newobjstub(L, "cc.CallFunc"); std::string cb_tag = "CallFunc"; - std::string cb_name = olua_setcallback(L, cb_store, 1, cb_tag.c_str(), OLUA_TAG_NEW); + std::string cb_name = olua_setcallback(L, cb_store, 1, cb_tag.c_str(), OLUA_TAG_NEW); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx]() { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */]() { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); @@ -10866,7 +8700,7 @@ static int _cocos2d_CallFunc_create(lua_State *L) } }; - // static cocos2d::CallFunc *create(@localvar const std::function &func) + // static cocos2d::CallFunc *create(const std::function &func) cocos2d::CallFunc *ret = cocos2d::CallFunc::create(arg1); if (olua_pushobjstub(L, ret, cb_store, "cc.CallFunc") == OLUA_OBJ_EXIST) { lua_pushstring(L, cb_name.c_str()); @@ -10881,7 +8715,7 @@ static int _cocos2d_CallFunc_create(lua_State *L) return 1; } -static int _cocos2d_CallFunc_execute(lua_State *L) +static int _olua_fun_cocos2d_CallFunc_execute(lua_State *L) { olua_startinvoke(L); @@ -10897,54 +8731,27 @@ static int _cocos2d_CallFunc_execute(lua_State *L) return 0; } -static int _cocos2d_CallFunc_reverse(lua_State *L) +static int _olua_cls_cc_CallFunc(lua_State *L) { - olua_startinvoke(L); - - cocos2d::CallFunc *self = nullptr; - - olua_to_object(L, 1, &self, "cc.CallFunc"); - - // cocos2d::CallFunc *reverse() - cocos2d::CallFunc *ret = self->reverse(); - int num_ret = olua_push_object(L, ret, "cc.CallFunc"); - - olua_endinvoke(L); + oluacls_class(L, "cc.CallFunc"); + oluacls_func(L, "create", _olua_fun_cocos2d_CallFunc_create); + oluacls_func(L, "execute", _olua_fun_cocos2d_CallFunc_execute); - return num_ret; + return 1; } OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_CallFunc(lua_State *L) +OLUA_LIB int luaopen_cc_CallFunc(lua_State *L) { - oluacls_class(L, "cc.CallFunc"); - oluacls_func(L, "clone", _cocos2d_CallFunc_clone); - oluacls_func(L, "create", _cocos2d_CallFunc_create); - oluacls_func(L, "execute", _cocos2d_CallFunc_execute); - oluacls_func(L, "reverse", _cocos2d_CallFunc_reverse); - + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.CallFunc")) { + luaL_error(L, "class not found: cocos2d::CallFunc"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_ActionCamera_clone(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::ActionCamera *self = nullptr; - - olua_to_object(L, 1, &self, "cc.ActionCamera"); - - // cocos2d::ActionCamera *clone() - cocos2d::ActionCamera *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.ActionCamera"); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_ActionCamera_getCenter(lua_State *L) +static int _olua_fun_cocos2d_ActionCamera_getCenter(lua_State *L) { olua_startinvoke(L); @@ -10961,7 +8768,7 @@ static int _cocos2d_ActionCamera_getCenter(lua_State *L) return num_ret; } -static int _cocos2d_ActionCamera_getEye(lua_State *L) +static int _olua_fun_cocos2d_ActionCamera_getEye(lua_State *L) { olua_startinvoke(L); @@ -10978,7 +8785,7 @@ static int _cocos2d_ActionCamera_getEye(lua_State *L) return num_ret; } -static int _cocos2d_ActionCamera_getUp(lua_State *L) +static int _olua_fun_cocos2d_ActionCamera_getUp(lua_State *L) { olua_startinvoke(L); @@ -10995,60 +8802,43 @@ static int _cocos2d_ActionCamera_getUp(lua_State *L) return num_ret; } -static int _cocos2d_ActionCamera_reverse(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::ActionCamera *self = nullptr; - - olua_to_object(L, 1, &self, "cc.ActionCamera"); - - // cocos2d::ActionCamera *reverse() - cocos2d::ActionCamera *ret = self->reverse(); - int num_ret = olua_push_object(L, ret, "cc.ActionCamera"); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_ActionCamera_setCenter(lua_State *L) +static int _olua_fun_cocos2d_ActionCamera_setCenter(lua_State *L) { olua_startinvoke(L); cocos2d::ActionCamera *self = nullptr; - cocos2d::Vec3 arg1; /** center */ + cocos2d::Vec3 *arg1; /** center */ olua_to_object(L, 1, &self, "cc.ActionCamera"); olua_check_object(L, 2, &arg1, "cc.Vec3"); // void setCenter(const cocos2d::Vec3 ¢er) - self->setCenter(arg1); + self->setCenter(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_ActionCamera_setEye$1(lua_State *L) +static int _olua_fun_cocos2d_ActionCamera_setEye$1(lua_State *L) { olua_startinvoke(L); cocos2d::ActionCamera *self = nullptr; - cocos2d::Vec3 arg1; /** eye */ + cocos2d::Vec3 *arg1; /** eye */ olua_to_object(L, 1, &self, "cc.ActionCamera"); olua_check_object(L, 2, &arg1, "cc.Vec3"); // void setEye(const cocos2d::Vec3 &eye) - self->setEye(arg1); + self->setEye(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_ActionCamera_setEye$2(lua_State *L) +static int _olua_fun_cocos2d_ActionCamera_setEye$2(lua_State *L) { olua_startinvoke(L); @@ -11070,21 +8860,21 @@ static int _cocos2d_ActionCamera_setEye$2(lua_State *L) return 0; } -static int _cocos2d_ActionCamera_setEye(lua_State *L) +static int _olua_fun_cocos2d_ActionCamera_setEye(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_object(L, 2, "cc.Vec3"))) { // void setEye(const cocos2d::Vec3 &eye) - return _cocos2d_ActionCamera_setEye$1(L); + return _olua_fun_cocos2d_ActionCamera_setEye$1(L); // } } if (num_args == 3) { // if ((olua_is_number(L, 2)) && (olua_is_number(L, 3)) && (olua_is_number(L, 4))) { // void setEye(float x, float y, float z) - return _cocos2d_ActionCamera_setEye$2(L); + return _olua_fun_cocos2d_ActionCamera_setEye$2(L); // } } @@ -11093,62 +8883,52 @@ static int _cocos2d_ActionCamera_setEye(lua_State *L) return 0; } -static int _cocos2d_ActionCamera_setUp(lua_State *L) +static int _olua_fun_cocos2d_ActionCamera_setUp(lua_State *L) { olua_startinvoke(L); cocos2d::ActionCamera *self = nullptr; - cocos2d::Vec3 arg1; /** up */ + cocos2d::Vec3 *arg1; /** up */ olua_to_object(L, 1, &self, "cc.ActionCamera"); olua_check_object(L, 2, &arg1, "cc.Vec3"); // void setUp(const cocos2d::Vec3 &up) - self->setUp(arg1); + self->setUp(*arg1); olua_endinvoke(L); return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ActionCamera(lua_State *L) +static int _olua_cls_cc_ActionCamera(lua_State *L) { oluacls_class(L, "cc.ActionCamera"); - oluacls_func(L, "clone", _cocos2d_ActionCamera_clone); - oluacls_func(L, "getCenter", _cocos2d_ActionCamera_getCenter); - oluacls_func(L, "getEye", _cocos2d_ActionCamera_getEye); - oluacls_func(L, "getUp", _cocos2d_ActionCamera_getUp); - oluacls_func(L, "reverse", _cocos2d_ActionCamera_reverse); - oluacls_func(L, "setCenter", _cocos2d_ActionCamera_setCenter); - oluacls_func(L, "setEye", _cocos2d_ActionCamera_setEye); - oluacls_func(L, "setUp", _cocos2d_ActionCamera_setUp); - oluacls_prop(L, "center", _cocos2d_ActionCamera_getCenter, _cocos2d_ActionCamera_setCenter); - oluacls_prop(L, "eye", _cocos2d_ActionCamera_getEye, _cocos2d_ActionCamera_setEye); - oluacls_prop(L, "up", _cocos2d_ActionCamera_getUp, _cocos2d_ActionCamera_setUp); + oluacls_func(L, "getCenter", _olua_fun_cocos2d_ActionCamera_getCenter); + oluacls_func(L, "getEye", _olua_fun_cocos2d_ActionCamera_getEye); + oluacls_func(L, "getUp", _olua_fun_cocos2d_ActionCamera_getUp); + oluacls_func(L, "setCenter", _olua_fun_cocos2d_ActionCamera_setCenter); + oluacls_func(L, "setEye", _olua_fun_cocos2d_ActionCamera_setEye); + oluacls_func(L, "setUp", _olua_fun_cocos2d_ActionCamera_setUp); + oluacls_prop(L, "center", _olua_fun_cocos2d_ActionCamera_getCenter, _olua_fun_cocos2d_ActionCamera_setCenter); + oluacls_prop(L, "eye", _olua_fun_cocos2d_ActionCamera_getEye, nullptr); + oluacls_prop(L, "up", _olua_fun_cocos2d_ActionCamera_getUp, _olua_fun_cocos2d_ActionCamera_setUp); return 1; } -OLUA_END_DECLS -static int _cocos2d_OrbitCamera_clone(lua_State *L) +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_ActionCamera(lua_State *L) { - olua_startinvoke(L); - - cocos2d::OrbitCamera *self = nullptr; - - olua_to_object(L, 1, &self, "cc.OrbitCamera"); - - // cocos2d::OrbitCamera *clone() - cocos2d::OrbitCamera *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.OrbitCamera"); - - olua_endinvoke(L); - - return num_ret; + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.ActionCamera")) { + luaL_error(L, "class not found: cocos2d::ActionCamera"); + } + return 1; } +OLUA_END_DECLS -static int _cocos2d_OrbitCamera_create(lua_State *L) +static int _olua_fun_cocos2d_OrbitCamera_create(lua_State *L) { olua_startinvoke(L); @@ -11177,7 +8957,7 @@ static int _cocos2d_OrbitCamera_create(lua_State *L) return num_ret; } -static int _cocos2d_OrbitCamera_sphericalRadius(lua_State *L) +static int _olua_fun_cocos2d_OrbitCamera_sphericalRadius(lua_State *L) { olua_startinvoke(L); @@ -11187,9 +8967,9 @@ static int _cocos2d_OrbitCamera_sphericalRadius(lua_State *L) float *arg3 = nullptr; /** azimuth */ olua_to_object(L, 1, &self, "cc.OrbitCamera"); - olua_check_pointer(L, 2, &arg1, "olua.float"); - olua_check_pointer(L, 3, &arg2, "olua.float"); - olua_check_pointer(L, 4, &arg3, "olua.float"); + olua_check_valueptr(L, 2, &arg1, "olua.float"); + olua_check_valueptr(L, 3, &arg2, "olua.float"); + olua_check_valueptr(L, 4, &arg3, "olua.float"); // void sphericalRadius(float *r, float *zenith, float *azimuth) self->sphericalRadius(arg1, arg2, arg3); @@ -11199,19 +8979,27 @@ static int _cocos2d_OrbitCamera_sphericalRadius(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_OrbitCamera(lua_State *L) +static int _olua_cls_cc_OrbitCamera(lua_State *L) { oluacls_class(L, "cc.OrbitCamera"); - oluacls_func(L, "clone", _cocos2d_OrbitCamera_clone); - oluacls_func(L, "create", _cocos2d_OrbitCamera_create); - oluacls_func(L, "sphericalRadius", _cocos2d_OrbitCamera_sphericalRadius); + oluacls_func(L, "create", _olua_fun_cocos2d_OrbitCamera_create); + oluacls_func(L, "sphericalRadius", _olua_fun_cocos2d_OrbitCamera_sphericalRadius); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_OrbitCamera(lua_State *L) +{ + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.OrbitCamera")) { + luaL_error(L, "class not found: cocos2d::OrbitCamera"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_GridBase_afterBlit(lua_State *L) +static int _olua_fun_cocos2d_GridBase_afterBlit(lua_State *L) { olua_startinvoke(L); @@ -11227,7 +9015,7 @@ static int _cocos2d_GridBase_afterBlit(lua_State *L) return 0; } -static int _cocos2d_GridBase_afterDraw(lua_State *L) +static int _olua_fun_cocos2d_GridBase_afterDraw(lua_State *L) { olua_startinvoke(L); @@ -11245,7 +9033,7 @@ static int _cocos2d_GridBase_afterDraw(lua_State *L) return 0; } -static int _cocos2d_GridBase_beforeBlit(lua_State *L) +static int _olua_fun_cocos2d_GridBase_beforeBlit(lua_State *L) { olua_startinvoke(L); @@ -11261,7 +9049,7 @@ static int _cocos2d_GridBase_beforeBlit(lua_State *L) return 0; } -static int _cocos2d_GridBase_beforeDraw(lua_State *L) +static int _olua_fun_cocos2d_GridBase_beforeDraw(lua_State *L) { olua_startinvoke(L); @@ -11277,7 +9065,7 @@ static int _cocos2d_GridBase_beforeDraw(lua_State *L) return 0; } -static int _cocos2d_GridBase_blit(lua_State *L) +static int _olua_fun_cocos2d_GridBase_blit(lua_State *L) { olua_startinvoke(L); @@ -11293,7 +9081,7 @@ static int _cocos2d_GridBase_blit(lua_State *L) return 0; } -static int _cocos2d_GridBase_calculateVertexPoints(lua_State *L) +static int _olua_fun_cocos2d_GridBase_calculateVertexPoints(lua_State *L) { olua_startinvoke(L); @@ -11309,7 +9097,7 @@ static int _cocos2d_GridBase_calculateVertexPoints(lua_State *L) return 0; } -static int _cocos2d_GridBase_getGridRect(lua_State *L) +static int _olua_fun_cocos2d_GridBase_getGridRect(lua_State *L) { olua_startinvoke(L); @@ -11326,7 +9114,7 @@ static int _cocos2d_GridBase_getGridRect(lua_State *L) return num_ret; } -static int _cocos2d_GridBase_getGridSize(lua_State *L) +static int _olua_fun_cocos2d_GridBase_getGridSize(lua_State *L) { olua_startinvoke(L); @@ -11343,7 +9131,7 @@ static int _cocos2d_GridBase_getGridSize(lua_State *L) return num_ret; } -static int _cocos2d_GridBase_getReuseGrid(lua_State *L) +static int _olua_fun_cocos2d_GridBase_getReuseGrid(lua_State *L) { olua_startinvoke(L); @@ -11360,7 +9148,7 @@ static int _cocos2d_GridBase_getReuseGrid(lua_State *L) return num_ret; } -static int _cocos2d_GridBase_getStep(lua_State *L) +static int _olua_fun_cocos2d_GridBase_getStep(lua_State *L) { olua_startinvoke(L); @@ -11377,18 +9165,18 @@ static int _cocos2d_GridBase_getStep(lua_State *L) return num_ret; } -static int _cocos2d_GridBase_initWithSize$1(lua_State *L) +static int _olua_fun_cocos2d_GridBase_initWithSize$1(lua_State *L) { olua_startinvoke(L); cocos2d::GridBase *self = nullptr; - cocos2d::Size arg1; /** gridSize */ + cocos2d::Size *arg1; /** gridSize */ olua_to_object(L, 1, &self, "cc.GridBase"); olua_check_object(L, 2, &arg1, "cc.Size"); // bool initWithSize(const cocos2d::Size &gridSize) - bool ret = self->initWithSize(arg1); + bool ret = self->initWithSize(*arg1); int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); @@ -11396,20 +9184,20 @@ static int _cocos2d_GridBase_initWithSize$1(lua_State *L) return num_ret; } -static int _cocos2d_GridBase_initWithSize$2(lua_State *L) +static int _olua_fun_cocos2d_GridBase_initWithSize$2(lua_State *L) { olua_startinvoke(L); cocos2d::GridBase *self = nullptr; - cocos2d::Size arg1; /** gridSize */ - cocos2d::Rect arg2; /** rect */ + cocos2d::Size *arg1; /** gridSize */ + cocos2d::Rect *arg2; /** rect */ olua_to_object(L, 1, &self, "cc.GridBase"); olua_check_object(L, 2, &arg1, "cc.Size"); olua_check_object(L, 3, &arg2, "cc.Rect"); // bool initWithSize(const cocos2d::Size &gridSize, const cocos2d::Rect &rect) - bool ret = self->initWithSize(arg1, arg2); + bool ret = self->initWithSize(*arg1, *arg2); int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); @@ -11417,12 +9205,12 @@ static int _cocos2d_GridBase_initWithSize$2(lua_State *L) return num_ret; } -static int _cocos2d_GridBase_initWithSize$3(lua_State *L) +static int _olua_fun_cocos2d_GridBase_initWithSize$3(lua_State *L) { olua_startinvoke(L); cocos2d::GridBase *self = nullptr; - cocos2d::Size arg1; /** gridSize */ + cocos2d::Size *arg1; /** gridSize */ cocos2d::Texture2D *arg2 = nullptr; /** texture */ bool arg3 = false; /** flipped */ @@ -11432,7 +9220,7 @@ static int _cocos2d_GridBase_initWithSize$3(lua_State *L) olua_check_bool(L, 4, &arg3); // bool initWithSize(const cocos2d::Size &gridSize, cocos2d::Texture2D *texture, bool flipped) - bool ret = self->initWithSize(arg1, arg2, arg3); + bool ret = self->initWithSize(*arg1, arg2, arg3); int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); @@ -11440,15 +9228,15 @@ static int _cocos2d_GridBase_initWithSize$3(lua_State *L) return num_ret; } -static int _cocos2d_GridBase_initWithSize$4(lua_State *L) +static int _olua_fun_cocos2d_GridBase_initWithSize$4(lua_State *L) { olua_startinvoke(L); cocos2d::GridBase *self = nullptr; - cocos2d::Size arg1; /** gridSize */ + cocos2d::Size *arg1; /** gridSize */ cocos2d::Texture2D *arg2 = nullptr; /** texture */ bool arg3 = false; /** flipped */ - cocos2d::Rect arg4; /** rect */ + cocos2d::Rect *arg4; /** rect */ olua_to_object(L, 1, &self, "cc.GridBase"); olua_check_object(L, 2, &arg1, "cc.Size"); @@ -11457,7 +9245,7 @@ static int _cocos2d_GridBase_initWithSize$4(lua_State *L) olua_check_object(L, 5, &arg4, "cc.Rect"); // bool initWithSize(const cocos2d::Size &gridSize, cocos2d::Texture2D *texture, bool flipped, const cocos2d::Rect &rect) - bool ret = self->initWithSize(arg1, arg2, arg3, arg4); + bool ret = self->initWithSize(*arg1, arg2, arg3, *arg4); int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); @@ -11465,35 +9253,35 @@ static int _cocos2d_GridBase_initWithSize$4(lua_State *L) return num_ret; } -static int _cocos2d_GridBase_initWithSize(lua_State *L) +static int _olua_fun_cocos2d_GridBase_initWithSize(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_object(L, 2, "cc.Size"))) { // bool initWithSize(const cocos2d::Size &gridSize) - return _cocos2d_GridBase_initWithSize$1(L); + return _olua_fun_cocos2d_GridBase_initWithSize$1(L); // } } if (num_args == 2) { // if ((olua_is_object(L, 2, "cc.Size")) && (olua_is_object(L, 3, "cc.Rect"))) { // bool initWithSize(const cocos2d::Size &gridSize, const cocos2d::Rect &rect) - return _cocos2d_GridBase_initWithSize$2(L); + return _olua_fun_cocos2d_GridBase_initWithSize$2(L); // } } if (num_args == 3) { // if ((olua_is_object(L, 2, "cc.Size")) && (olua_is_object(L, 3, "cc.Texture2D")) && (olua_is_bool(L, 4))) { // bool initWithSize(const cocos2d::Size &gridSize, cocos2d::Texture2D *texture, bool flipped) - return _cocos2d_GridBase_initWithSize$3(L); + return _olua_fun_cocos2d_GridBase_initWithSize$3(L); // } } if (num_args == 4) { // if ((olua_is_object(L, 2, "cc.Size")) && (olua_is_object(L, 3, "cc.Texture2D")) && (olua_is_bool(L, 4)) && (olua_is_object(L, 5, "cc.Rect"))) { // bool initWithSize(const cocos2d::Size &gridSize, cocos2d::Texture2D *texture, bool flipped, const cocos2d::Rect &rect) - return _cocos2d_GridBase_initWithSize$4(L); + return _olua_fun_cocos2d_GridBase_initWithSize$4(L); // } } @@ -11502,7 +9290,7 @@ static int _cocos2d_GridBase_initWithSize(lua_State *L) return 0; } -static int _cocos2d_GridBase_isActive(lua_State *L) +static int _olua_fun_cocos2d_GridBase_isActive(lua_State *L) { olua_startinvoke(L); @@ -11519,7 +9307,7 @@ static int _cocos2d_GridBase_isActive(lua_State *L) return num_ret; } -static int _cocos2d_GridBase_isTextureFlipped(lua_State *L) +static int _olua_fun_cocos2d_GridBase_isTextureFlipped(lua_State *L) { olua_startinvoke(L); @@ -11536,7 +9324,7 @@ static int _cocos2d_GridBase_isTextureFlipped(lua_State *L) return num_ret; } -static int _cocos2d_GridBase_reuse(lua_State *L) +static int _olua_fun_cocos2d_GridBase_reuse(lua_State *L) { olua_startinvoke(L); @@ -11552,7 +9340,7 @@ static int _cocos2d_GridBase_reuse(lua_State *L) return 0; } -static int _cocos2d_GridBase_set2DProjection(lua_State *L) +static int _olua_fun_cocos2d_GridBase_set2DProjection(lua_State *L) { olua_startinvoke(L); @@ -11568,7 +9356,7 @@ static int _cocos2d_GridBase_set2DProjection(lua_State *L) return 0; } -static int _cocos2d_GridBase_setActive(lua_State *L) +static int _olua_fun_cocos2d_GridBase_setActive(lua_State *L) { olua_startinvoke(L); @@ -11586,43 +9374,43 @@ static int _cocos2d_GridBase_setActive(lua_State *L) return 0; } -static int _cocos2d_GridBase_setGridRect(lua_State *L) +static int _olua_fun_cocos2d_GridBase_setGridRect(lua_State *L) { olua_startinvoke(L); cocos2d::GridBase *self = nullptr; - cocos2d::Rect arg1; /** rect */ + cocos2d::Rect *arg1; /** rect */ olua_to_object(L, 1, &self, "cc.GridBase"); olua_check_object(L, 2, &arg1, "cc.Rect"); // void setGridRect(const cocos2d::Rect &rect) - self->setGridRect(arg1); + self->setGridRect(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_GridBase_setGridSize(lua_State *L) +static int _olua_fun_cocos2d_GridBase_setGridSize(lua_State *L) { olua_startinvoke(L); cocos2d::GridBase *self = nullptr; - cocos2d::Size arg1; /** gridSize */ + cocos2d::Size *arg1; /** gridSize */ olua_to_object(L, 1, &self, "cc.GridBase"); olua_check_object(L, 2, &arg1, "cc.Size"); // void setGridSize(const cocos2d::Size &gridSize) - self->setGridSize(arg1); + self->setGridSize(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_GridBase_setReuseGrid(lua_State *L) +static int _olua_fun_cocos2d_GridBase_setReuseGrid(lua_State *L) { olua_startinvoke(L); @@ -11640,25 +9428,25 @@ static int _cocos2d_GridBase_setReuseGrid(lua_State *L) return 0; } -static int _cocos2d_GridBase_setStep(lua_State *L) +static int _olua_fun_cocos2d_GridBase_setStep(lua_State *L) { olua_startinvoke(L); cocos2d::GridBase *self = nullptr; - cocos2d::Vec2 arg1; /** step */ + cocos2d::Vec2 *arg1; /** step */ olua_to_object(L, 1, &self, "cc.GridBase"); olua_check_object(L, 2, &arg1, "cc.Vec2"); // void setStep(const cocos2d::Vec2 &step) - self->setStep(arg1); + self->setStep(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_GridBase_setTextureFlipped(lua_State *L) +static int _olua_fun_cocos2d_GridBase_setTextureFlipped(lua_State *L) { olua_startinvoke(L); @@ -11676,52 +9464,61 @@ static int _cocos2d_GridBase_setTextureFlipped(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_GridBase(lua_State *L) +static int _olua_cls_cc_GridBase(lua_State *L) { oluacls_class(L, "cc.GridBase"); - oluacls_func(L, "afterBlit", _cocos2d_GridBase_afterBlit); - oluacls_func(L, "afterDraw", _cocos2d_GridBase_afterDraw); - oluacls_func(L, "beforeBlit", _cocos2d_GridBase_beforeBlit); - oluacls_func(L, "beforeDraw", _cocos2d_GridBase_beforeDraw); - oluacls_func(L, "blit", _cocos2d_GridBase_blit); - oluacls_func(L, "calculateVertexPoints", _cocos2d_GridBase_calculateVertexPoints); - oluacls_func(L, "getGridRect", _cocos2d_GridBase_getGridRect); - oluacls_func(L, "getGridSize", _cocos2d_GridBase_getGridSize); - oluacls_func(L, "getReuseGrid", _cocos2d_GridBase_getReuseGrid); - oluacls_func(L, "getStep", _cocos2d_GridBase_getStep); - oluacls_func(L, "initWithSize", _cocos2d_GridBase_initWithSize); - oluacls_func(L, "isActive", _cocos2d_GridBase_isActive); - oluacls_func(L, "isTextureFlipped", _cocos2d_GridBase_isTextureFlipped); - oluacls_func(L, "reuse", _cocos2d_GridBase_reuse); - oluacls_func(L, "set2DProjection", _cocos2d_GridBase_set2DProjection); - oluacls_func(L, "setActive", _cocos2d_GridBase_setActive); - oluacls_func(L, "setGridRect", _cocos2d_GridBase_setGridRect); - oluacls_func(L, "setGridSize", _cocos2d_GridBase_setGridSize); - oluacls_func(L, "setReuseGrid", _cocos2d_GridBase_setReuseGrid); - oluacls_func(L, "setStep", _cocos2d_GridBase_setStep); - oluacls_func(L, "setTextureFlipped", _cocos2d_GridBase_setTextureFlipped); - oluacls_prop(L, "active", _cocos2d_GridBase_isActive, _cocos2d_GridBase_setActive); - oluacls_prop(L, "gridRect", _cocos2d_GridBase_getGridRect, _cocos2d_GridBase_setGridRect); - oluacls_prop(L, "gridSize", _cocos2d_GridBase_getGridSize, _cocos2d_GridBase_setGridSize); - oluacls_prop(L, "reuseGrid", _cocos2d_GridBase_getReuseGrid, _cocos2d_GridBase_setReuseGrid); - oluacls_prop(L, "step", _cocos2d_GridBase_getStep, _cocos2d_GridBase_setStep); - oluacls_prop(L, "textureFlipped", _cocos2d_GridBase_isTextureFlipped, _cocos2d_GridBase_setTextureFlipped); - + oluacls_func(L, "afterBlit", _olua_fun_cocos2d_GridBase_afterBlit); + oluacls_func(L, "afterDraw", _olua_fun_cocos2d_GridBase_afterDraw); + oluacls_func(L, "beforeBlit", _olua_fun_cocos2d_GridBase_beforeBlit); + oluacls_func(L, "beforeDraw", _olua_fun_cocos2d_GridBase_beforeDraw); + oluacls_func(L, "blit", _olua_fun_cocos2d_GridBase_blit); + oluacls_func(L, "calculateVertexPoints", _olua_fun_cocos2d_GridBase_calculateVertexPoints); + oluacls_func(L, "getGridRect", _olua_fun_cocos2d_GridBase_getGridRect); + oluacls_func(L, "getGridSize", _olua_fun_cocos2d_GridBase_getGridSize); + oluacls_func(L, "getReuseGrid", _olua_fun_cocos2d_GridBase_getReuseGrid); + oluacls_func(L, "getStep", _olua_fun_cocos2d_GridBase_getStep); + oluacls_func(L, "initWithSize", _olua_fun_cocos2d_GridBase_initWithSize); + oluacls_func(L, "isActive", _olua_fun_cocos2d_GridBase_isActive); + oluacls_func(L, "isTextureFlipped", _olua_fun_cocos2d_GridBase_isTextureFlipped); + oluacls_func(L, "reuse", _olua_fun_cocos2d_GridBase_reuse); + oluacls_func(L, "set2DProjection", _olua_fun_cocos2d_GridBase_set2DProjection); + oluacls_func(L, "setActive", _olua_fun_cocos2d_GridBase_setActive); + oluacls_func(L, "setGridRect", _olua_fun_cocos2d_GridBase_setGridRect); + oluacls_func(L, "setGridSize", _olua_fun_cocos2d_GridBase_setGridSize); + oluacls_func(L, "setReuseGrid", _olua_fun_cocos2d_GridBase_setReuseGrid); + oluacls_func(L, "setStep", _olua_fun_cocos2d_GridBase_setStep); + oluacls_func(L, "setTextureFlipped", _olua_fun_cocos2d_GridBase_setTextureFlipped); + oluacls_prop(L, "active", _olua_fun_cocos2d_GridBase_isActive, _olua_fun_cocos2d_GridBase_setActive); + oluacls_prop(L, "gridRect", _olua_fun_cocos2d_GridBase_getGridRect, _olua_fun_cocos2d_GridBase_setGridRect); + oluacls_prop(L, "gridSize", _olua_fun_cocos2d_GridBase_getGridSize, _olua_fun_cocos2d_GridBase_setGridSize); + oluacls_prop(L, "reuseGrid", _olua_fun_cocos2d_GridBase_getReuseGrid, _olua_fun_cocos2d_GridBase_setReuseGrid); + oluacls_prop(L, "step", _olua_fun_cocos2d_GridBase_getStep, _olua_fun_cocos2d_GridBase_setStep); + oluacls_prop(L, "textureFlipped", _olua_fun_cocos2d_GridBase_isTextureFlipped, _olua_fun_cocos2d_GridBase_setTextureFlipped); + + return 1; +} + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_GridBase(lua_State *L) +{ + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.GridBase")) { + luaL_error(L, "class not found: cocos2d::GridBase"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_Grid3D_create$1(lua_State *L) +static int _olua_fun_cocos2d_Grid3D_create$1(lua_State *L) { olua_startinvoke(L); - cocos2d::Size arg1; /** gridSize */ + cocos2d::Size *arg1; /** gridSize */ olua_check_object(L, 1, &arg1, "cc.Size"); // static cocos2d::Grid3D *create(const cocos2d::Size &gridSize) - cocos2d::Grid3D *ret = cocos2d::Grid3D::create(arg1); + cocos2d::Grid3D *ret = cocos2d::Grid3D::create(*arg1); int num_ret = olua_push_object(L, ret, "cc.Grid3D"); olua_endinvoke(L); @@ -11729,18 +9526,18 @@ static int _cocos2d_Grid3D_create$1(lua_State *L) return num_ret; } -static int _cocos2d_Grid3D_create$2(lua_State *L) +static int _olua_fun_cocos2d_Grid3D_create$2(lua_State *L) { olua_startinvoke(L); - cocos2d::Size arg1; /** gridSize */ - cocos2d::Rect arg2; /** rect */ + cocos2d::Size *arg1; /** gridSize */ + cocos2d::Rect *arg2; /** rect */ olua_check_object(L, 1, &arg1, "cc.Size"); olua_check_object(L, 2, &arg2, "cc.Rect"); // static cocos2d::Grid3D *create(const cocos2d::Size &gridSize, const cocos2d::Rect &rect) - cocos2d::Grid3D *ret = cocos2d::Grid3D::create(arg1, arg2); + cocos2d::Grid3D *ret = cocos2d::Grid3D::create(*arg1, *arg2); int num_ret = olua_push_object(L, ret, "cc.Grid3D"); olua_endinvoke(L); @@ -11748,11 +9545,11 @@ static int _cocos2d_Grid3D_create$2(lua_State *L) return num_ret; } -static int _cocos2d_Grid3D_create$3(lua_State *L) +static int _olua_fun_cocos2d_Grid3D_create$3(lua_State *L) { olua_startinvoke(L); - cocos2d::Size arg1; /** gridSize */ + cocos2d::Size *arg1; /** gridSize */ cocos2d::Texture2D *arg2 = nullptr; /** texture */ bool arg3 = false; /** flipped */ @@ -11761,7 +9558,7 @@ static int _cocos2d_Grid3D_create$3(lua_State *L) olua_check_bool(L, 3, &arg3); // static cocos2d::Grid3D *create(const cocos2d::Size &gridSize, cocos2d::Texture2D *texture, bool flipped) - cocos2d::Grid3D *ret = cocos2d::Grid3D::create(arg1, arg2, arg3); + cocos2d::Grid3D *ret = cocos2d::Grid3D::create(*arg1, arg2, arg3); int num_ret = olua_push_object(L, ret, "cc.Grid3D"); olua_endinvoke(L); @@ -11769,14 +9566,14 @@ static int _cocos2d_Grid3D_create$3(lua_State *L) return num_ret; } -static int _cocos2d_Grid3D_create$4(lua_State *L) +static int _olua_fun_cocos2d_Grid3D_create$4(lua_State *L) { olua_startinvoke(L); - cocos2d::Size arg1; /** gridSize */ + cocos2d::Size *arg1; /** gridSize */ cocos2d::Texture2D *arg2 = nullptr; /** texture */ bool arg3 = false; /** flipped */ - cocos2d::Rect arg4; /** rect */ + cocos2d::Rect *arg4; /** rect */ olua_check_object(L, 1, &arg1, "cc.Size"); olua_check_object(L, 2, &arg2, "cc.Texture2D"); @@ -11784,7 +9581,7 @@ static int _cocos2d_Grid3D_create$4(lua_State *L) olua_check_object(L, 4, &arg4, "cc.Rect"); // static cocos2d::Grid3D *create(const cocos2d::Size &gridSize, cocos2d::Texture2D *texture, bool flipped, const cocos2d::Rect &rect) - cocos2d::Grid3D *ret = cocos2d::Grid3D::create(arg1, arg2, arg3, arg4); + cocos2d::Grid3D *ret = cocos2d::Grid3D::create(*arg1, arg2, arg3, *arg4); int num_ret = olua_push_object(L, ret, "cc.Grid3D"); olua_endinvoke(L); @@ -11792,35 +9589,35 @@ static int _cocos2d_Grid3D_create$4(lua_State *L) return num_ret; } -static int _cocos2d_Grid3D_create(lua_State *L) +static int _olua_fun_cocos2d_Grid3D_create(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 1) { // if ((olua_is_object(L, 1, "cc.Size"))) { // static cocos2d::Grid3D *create(const cocos2d::Size &gridSize) - return _cocos2d_Grid3D_create$1(L); + return _olua_fun_cocos2d_Grid3D_create$1(L); // } } if (num_args == 2) { // if ((olua_is_object(L, 1, "cc.Size")) && (olua_is_object(L, 2, "cc.Rect"))) { // static cocos2d::Grid3D *create(const cocos2d::Size &gridSize, const cocos2d::Rect &rect) - return _cocos2d_Grid3D_create$2(L); + return _olua_fun_cocos2d_Grid3D_create$2(L); // } } if (num_args == 3) { // if ((olua_is_object(L, 1, "cc.Size")) && (olua_is_object(L, 2, "cc.Texture2D")) && (olua_is_bool(L, 3))) { // static cocos2d::Grid3D *create(const cocos2d::Size &gridSize, cocos2d::Texture2D *texture, bool flipped) - return _cocos2d_Grid3D_create$3(L); + return _olua_fun_cocos2d_Grid3D_create$3(L); // } } if (num_args == 4) { // if ((olua_is_object(L, 1, "cc.Size")) && (olua_is_object(L, 2, "cc.Texture2D")) && (olua_is_bool(L, 3)) && (olua_is_object(L, 4, "cc.Rect"))) { // static cocos2d::Grid3D *create(const cocos2d::Size &gridSize, cocos2d::Texture2D *texture, bool flipped, const cocos2d::Rect &rect) - return _cocos2d_Grid3D_create$4(L); + return _olua_fun_cocos2d_Grid3D_create$4(L); // } } @@ -11829,7 +9626,7 @@ static int _cocos2d_Grid3D_create(lua_State *L) return 0; } -static int _cocos2d_Grid3D_getNeedDepthTestForBlit(lua_State *L) +static int _olua_fun_cocos2d_Grid3D_getNeedDepthTestForBlit(lua_State *L) { olua_startinvoke(L); @@ -11846,45 +9643,45 @@ static int _cocos2d_Grid3D_getNeedDepthTestForBlit(lua_State *L) return num_ret; } -static int _cocos2d_Grid3D_getOriginalVertex(lua_State *L) +static int _olua_fun_cocos2d_Grid3D_getOriginalVertex(lua_State *L) { olua_startinvoke(L); cocos2d::Grid3D *self = nullptr; - cocos2d::Vec2 arg1; /** pos */ + cocos2d::Vec2 *arg1; /** pos */ olua_to_object(L, 1, &self, "cc.Grid3D"); olua_check_object(L, 2, &arg1, "cc.Vec2"); // cocos2d::Vec3 getOriginalVertex(const cocos2d::Vec2 &pos) - cocos2d::Vec3 ret = self->getOriginalVertex(arg1); - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec3"); + cocos2d::Vec3 ret = self->getOriginalVertex(*arg1); + int num_ret = olua_copy_object(L, ret, "cc.Vec3"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_Grid3D_getVertex(lua_State *L) +static int _olua_fun_cocos2d_Grid3D_getVertex(lua_State *L) { olua_startinvoke(L); cocos2d::Grid3D *self = nullptr; - cocos2d::Vec2 arg1; /** pos */ + cocos2d::Vec2 *arg1; /** pos */ olua_to_object(L, 1, &self, "cc.Grid3D"); olua_check_object(L, 2, &arg1, "cc.Vec2"); // cocos2d::Vec3 getVertex(const cocos2d::Vec2 &pos) - cocos2d::Vec3 ret = self->getVertex(arg1); - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec3"); + cocos2d::Vec3 ret = self->getVertex(*arg1); + int num_ret = olua_copy_object(L, ret, "cc.Vec3"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_Grid3D_setNeedDepthTestForBlit(lua_State *L) +static int _olua_fun_cocos2d_Grid3D_setNeedDepthTestForBlit(lua_State *L) { olua_startinvoke(L); @@ -11902,52 +9699,61 @@ static int _cocos2d_Grid3D_setNeedDepthTestForBlit(lua_State *L) return 0; } -static int _cocos2d_Grid3D_setVertex(lua_State *L) +static int _olua_fun_cocos2d_Grid3D_setVertex(lua_State *L) { olua_startinvoke(L); cocos2d::Grid3D *self = nullptr; - cocos2d::Vec2 arg1; /** pos */ - cocos2d::Vec3 arg2; /** vertex */ + cocos2d::Vec2 *arg1; /** pos */ + cocos2d::Vec3 *arg2; /** vertex */ olua_to_object(L, 1, &self, "cc.Grid3D"); olua_check_object(L, 2, &arg1, "cc.Vec2"); olua_check_object(L, 3, &arg2, "cc.Vec3"); // void setVertex(const cocos2d::Vec2 &pos, const cocos2d::Vec3 &vertex) - self->setVertex(arg1, arg2); + self->setVertex(*arg1, *arg2); olua_endinvoke(L); return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_Grid3D(lua_State *L) +static int _olua_cls_cc_Grid3D(lua_State *L) { oluacls_class(L, "cc.Grid3D"); - oluacls_func(L, "create", _cocos2d_Grid3D_create); - oluacls_func(L, "getNeedDepthTestForBlit", _cocos2d_Grid3D_getNeedDepthTestForBlit); - oluacls_func(L, "getOriginalVertex", _cocos2d_Grid3D_getOriginalVertex); - oluacls_func(L, "getVertex", _cocos2d_Grid3D_getVertex); - oluacls_func(L, "setNeedDepthTestForBlit", _cocos2d_Grid3D_setNeedDepthTestForBlit); - oluacls_func(L, "setVertex", _cocos2d_Grid3D_setVertex); - oluacls_prop(L, "needDepthTestForBlit", _cocos2d_Grid3D_getNeedDepthTestForBlit, _cocos2d_Grid3D_setNeedDepthTestForBlit); + oluacls_func(L, "create", _olua_fun_cocos2d_Grid3D_create); + oluacls_func(L, "getNeedDepthTestForBlit", _olua_fun_cocos2d_Grid3D_getNeedDepthTestForBlit); + oluacls_func(L, "getOriginalVertex", _olua_fun_cocos2d_Grid3D_getOriginalVertex); + oluacls_func(L, "getVertex", _olua_fun_cocos2d_Grid3D_getVertex); + oluacls_func(L, "setNeedDepthTestForBlit", _olua_fun_cocos2d_Grid3D_setNeedDepthTestForBlit); + oluacls_func(L, "setVertex", _olua_fun_cocos2d_Grid3D_setVertex); + oluacls_prop(L, "needDepthTestForBlit", _olua_fun_cocos2d_Grid3D_getNeedDepthTestForBlit, _olua_fun_cocos2d_Grid3D_setNeedDepthTestForBlit); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_Grid3D(lua_State *L) +{ + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.Grid3D")) { + luaL_error(L, "class not found: cocos2d::Grid3D"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_TiledGrid3D_create$1(lua_State *L) +static int _olua_fun_cocos2d_TiledGrid3D_create$1(lua_State *L) { olua_startinvoke(L); - cocos2d::Size arg1; /** gridSize */ + cocos2d::Size *arg1; /** gridSize */ olua_check_object(L, 1, &arg1, "cc.Size"); // static cocos2d::TiledGrid3D *create(const cocos2d::Size &gridSize) - cocos2d::TiledGrid3D *ret = cocos2d::TiledGrid3D::create(arg1); + cocos2d::TiledGrid3D *ret = cocos2d::TiledGrid3D::create(*arg1); int num_ret = olua_push_object(L, ret, "cc.TiledGrid3D"); olua_endinvoke(L); @@ -11955,18 +9761,18 @@ static int _cocos2d_TiledGrid3D_create$1(lua_State *L) return num_ret; } -static int _cocos2d_TiledGrid3D_create$2(lua_State *L) +static int _olua_fun_cocos2d_TiledGrid3D_create$2(lua_State *L) { olua_startinvoke(L); - cocos2d::Size arg1; /** gridSize */ - cocos2d::Rect arg2; /** rect */ + cocos2d::Size *arg1; /** gridSize */ + cocos2d::Rect *arg2; /** rect */ olua_check_object(L, 1, &arg1, "cc.Size"); olua_check_object(L, 2, &arg2, "cc.Rect"); // static cocos2d::TiledGrid3D *create(const cocos2d::Size &gridSize, const cocos2d::Rect &rect) - cocos2d::TiledGrid3D *ret = cocos2d::TiledGrid3D::create(arg1, arg2); + cocos2d::TiledGrid3D *ret = cocos2d::TiledGrid3D::create(*arg1, *arg2); int num_ret = olua_push_object(L, ret, "cc.TiledGrid3D"); olua_endinvoke(L); @@ -11974,11 +9780,11 @@ static int _cocos2d_TiledGrid3D_create$2(lua_State *L) return num_ret; } -static int _cocos2d_TiledGrid3D_create$3(lua_State *L) +static int _olua_fun_cocos2d_TiledGrid3D_create$3(lua_State *L) { olua_startinvoke(L); - cocos2d::Size arg1; /** gridSize */ + cocos2d::Size *arg1; /** gridSize */ cocos2d::Texture2D *arg2 = nullptr; /** texture */ bool arg3 = false; /** flipped */ @@ -11987,7 +9793,7 @@ static int _cocos2d_TiledGrid3D_create$3(lua_State *L) olua_check_bool(L, 3, &arg3); // static cocos2d::TiledGrid3D *create(const cocos2d::Size &gridSize, cocos2d::Texture2D *texture, bool flipped) - cocos2d::TiledGrid3D *ret = cocos2d::TiledGrid3D::create(arg1, arg2, arg3); + cocos2d::TiledGrid3D *ret = cocos2d::TiledGrid3D::create(*arg1, arg2, arg3); int num_ret = olua_push_object(L, ret, "cc.TiledGrid3D"); olua_endinvoke(L); @@ -11995,14 +9801,14 @@ static int _cocos2d_TiledGrid3D_create$3(lua_State *L) return num_ret; } -static int _cocos2d_TiledGrid3D_create$4(lua_State *L) +static int _olua_fun_cocos2d_TiledGrid3D_create$4(lua_State *L) { olua_startinvoke(L); - cocos2d::Size arg1; /** gridSize */ + cocos2d::Size *arg1; /** gridSize */ cocos2d::Texture2D *arg2 = nullptr; /** texture */ bool arg3 = false; /** flipped */ - cocos2d::Rect arg4; /** rect */ + cocos2d::Rect *arg4; /** rect */ olua_check_object(L, 1, &arg1, "cc.Size"); olua_check_object(L, 2, &arg2, "cc.Texture2D"); @@ -12010,7 +9816,7 @@ static int _cocos2d_TiledGrid3D_create$4(lua_State *L) olua_check_object(L, 4, &arg4, "cc.Rect"); // static cocos2d::TiledGrid3D *create(const cocos2d::Size &gridSize, cocos2d::Texture2D *texture, bool flipped, const cocos2d::Rect &rect) - cocos2d::TiledGrid3D *ret = cocos2d::TiledGrid3D::create(arg1, arg2, arg3, arg4); + cocos2d::TiledGrid3D *ret = cocos2d::TiledGrid3D::create(*arg1, arg2, arg3, *arg4); int num_ret = olua_push_object(L, ret, "cc.TiledGrid3D"); olua_endinvoke(L); @@ -12018,35 +9824,35 @@ static int _cocos2d_TiledGrid3D_create$4(lua_State *L) return num_ret; } -static int _cocos2d_TiledGrid3D_create(lua_State *L) +static int _olua_fun_cocos2d_TiledGrid3D_create(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 1) { // if ((olua_is_object(L, 1, "cc.Size"))) { // static cocos2d::TiledGrid3D *create(const cocos2d::Size &gridSize) - return _cocos2d_TiledGrid3D_create$1(L); + return _olua_fun_cocos2d_TiledGrid3D_create$1(L); // } } if (num_args == 2) { // if ((olua_is_object(L, 1, "cc.Size")) && (olua_is_object(L, 2, "cc.Rect"))) { // static cocos2d::TiledGrid3D *create(const cocos2d::Size &gridSize, const cocos2d::Rect &rect) - return _cocos2d_TiledGrid3D_create$2(L); + return _olua_fun_cocos2d_TiledGrid3D_create$2(L); // } } if (num_args == 3) { // if ((olua_is_object(L, 1, "cc.Size")) && (olua_is_object(L, 2, "cc.Texture2D")) && (olua_is_bool(L, 3))) { // static cocos2d::TiledGrid3D *create(const cocos2d::Size &gridSize, cocos2d::Texture2D *texture, bool flipped) - return _cocos2d_TiledGrid3D_create$3(L); + return _olua_fun_cocos2d_TiledGrid3D_create$3(L); // } } if (num_args == 4) { // if ((olua_is_object(L, 1, "cc.Size")) && (olua_is_object(L, 2, "cc.Texture2D")) && (olua_is_bool(L, 3)) && (olua_is_object(L, 4, "cc.Rect"))) { // static cocos2d::TiledGrid3D *create(const cocos2d::Size &gridSize, cocos2d::Texture2D *texture, bool flipped, const cocos2d::Rect &rect) - return _cocos2d_TiledGrid3D_create$4(L); + return _olua_fun_cocos2d_TiledGrid3D_create$4(L); // } } @@ -12055,78 +9861,87 @@ static int _cocos2d_TiledGrid3D_create(lua_State *L) return 0; } -static int _cocos2d_TiledGrid3D_getOriginalTile(lua_State *L) +static int _olua_fun_cocos2d_TiledGrid3D_getOriginalTile(lua_State *L) { olua_startinvoke(L); cocos2d::TiledGrid3D *self = nullptr; - cocos2d::Vec2 arg1; /** pos */ + cocos2d::Vec2 *arg1; /** pos */ olua_to_object(L, 1, &self, "cc.TiledGrid3D"); olua_check_object(L, 2, &arg1, "cc.Vec2"); // cocos2d::Quad3 getOriginalTile(const cocos2d::Vec2 &pos) - cocos2d::Quad3 ret = self->getOriginalTile(arg1); - int num_ret = olua_pushcopy_object(L, ret, "cc.Quad3"); + cocos2d::Quad3 ret = self->getOriginalTile(*arg1); + int num_ret = olua_copy_object(L, ret, "cc.Quad3"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_TiledGrid3D_getTile(lua_State *L) +static int _olua_fun_cocos2d_TiledGrid3D_getTile(lua_State *L) { olua_startinvoke(L); cocos2d::TiledGrid3D *self = nullptr; - cocos2d::Vec2 arg1; /** pos */ + cocos2d::Vec2 *arg1; /** pos */ olua_to_object(L, 1, &self, "cc.TiledGrid3D"); olua_check_object(L, 2, &arg1, "cc.Vec2"); // cocos2d::Quad3 getTile(const cocos2d::Vec2 &pos) - cocos2d::Quad3 ret = self->getTile(arg1); - int num_ret = olua_pushcopy_object(L, ret, "cc.Quad3"); + cocos2d::Quad3 ret = self->getTile(*arg1); + int num_ret = olua_copy_object(L, ret, "cc.Quad3"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_TiledGrid3D_setTile(lua_State *L) +static int _olua_fun_cocos2d_TiledGrid3D_setTile(lua_State *L) { olua_startinvoke(L); cocos2d::TiledGrid3D *self = nullptr; - cocos2d::Vec2 arg1; /** pos */ - cocos2d::Quad3 arg2; /** coords */ + cocos2d::Vec2 *arg1; /** pos */ + cocos2d::Quad3 *arg2; /** coords */ olua_to_object(L, 1, &self, "cc.TiledGrid3D"); olua_check_object(L, 2, &arg1, "cc.Vec2"); olua_check_object(L, 3, &arg2, "cc.Quad3"); // void setTile(const cocos2d::Vec2 &pos, const cocos2d::Quad3 &coords) - self->setTile(arg1, arg2); + self->setTile(*arg1, *arg2); olua_endinvoke(L); return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_TiledGrid3D(lua_State *L) +static int _olua_cls_cc_TiledGrid3D(lua_State *L) { oluacls_class(L, "cc.TiledGrid3D"); - oluacls_func(L, "create", _cocos2d_TiledGrid3D_create); - oluacls_func(L, "getOriginalTile", _cocos2d_TiledGrid3D_getOriginalTile); - oluacls_func(L, "getTile", _cocos2d_TiledGrid3D_getTile); - oluacls_func(L, "setTile", _cocos2d_TiledGrid3D_setTile); + oluacls_func(L, "create", _olua_fun_cocos2d_TiledGrid3D_create); + oluacls_func(L, "getOriginalTile", _olua_fun_cocos2d_TiledGrid3D_getOriginalTile); + oluacls_func(L, "getTile", _olua_fun_cocos2d_TiledGrid3D_getTile); + oluacls_func(L, "setTile", _olua_fun_cocos2d_TiledGrid3D_setTile); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_TiledGrid3D(lua_State *L) +{ + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.TiledGrid3D")) { + luaL_error(L, "class not found: cocos2d::TiledGrid3D"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_NodeGrid_create$1(lua_State *L) +static int _olua_fun_cocos2d_NodeGrid_create$1(lua_State *L) { olua_startinvoke(L); @@ -12139,16 +9954,16 @@ static int _cocos2d_NodeGrid_create$1(lua_State *L) return num_ret; } -static int _cocos2d_NodeGrid_create$2(lua_State *L) +static int _olua_fun_cocos2d_NodeGrid_create$2(lua_State *L) { olua_startinvoke(L); - cocos2d::Rect arg1; /** rect */ + cocos2d::Rect *arg1; /** rect */ olua_check_object(L, 1, &arg1, "cc.Rect"); // static cocos2d::NodeGrid *create(const cocos2d::Rect &rect) - cocos2d::NodeGrid *ret = cocos2d::NodeGrid::create(arg1); + cocos2d::NodeGrid *ret = cocos2d::NodeGrid::create(*arg1); int num_ret = olua_push_object(L, ret, "cc.NodeGrid"); olua_endinvoke(L); @@ -12156,19 +9971,19 @@ static int _cocos2d_NodeGrid_create$2(lua_State *L) return num_ret; } -static int _cocos2d_NodeGrid_create(lua_State *L) +static int _olua_fun_cocos2d_NodeGrid_create(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 0) { // static cocos2d::NodeGrid *create() - return _cocos2d_NodeGrid_create$1(L); + return _olua_fun_cocos2d_NodeGrid_create$1(L); } if (num_args == 1) { // if ((olua_is_object(L, 1, "cc.Rect"))) { // static cocos2d::NodeGrid *create(const cocos2d::Rect &rect) - return _cocos2d_NodeGrid_create$2(L); + return _olua_fun_cocos2d_NodeGrid_create$2(L); // } } @@ -12177,7 +9992,7 @@ static int _cocos2d_NodeGrid_create(lua_State *L) return 0; } -static int _cocos2d_NodeGrid_getGrid(lua_State *L) +static int _olua_fun_cocos2d_NodeGrid_getGrid(lua_State *L) { olua_startinvoke(L); @@ -12194,7 +10009,7 @@ static int _cocos2d_NodeGrid_getGrid(lua_State *L) return num_ret; } -static int _cocos2d_NodeGrid_getGridRect(lua_State *L) +static int _olua_fun_cocos2d_NodeGrid_getGridRect(lua_State *L) { olua_startinvoke(L); @@ -12211,7 +10026,7 @@ static int _cocos2d_NodeGrid_getGridRect(lua_State *L) return num_ret; } -static int _cocos2d_NodeGrid_setGrid(lua_State *L) +static int _olua_fun_cocos2d_NodeGrid_setGrid(lua_State *L) { olua_startinvoke(L); @@ -12229,25 +10044,25 @@ static int _cocos2d_NodeGrid_setGrid(lua_State *L) return 0; } -static int _cocos2d_NodeGrid_setGridRect(lua_State *L) +static int _olua_fun_cocos2d_NodeGrid_setGridRect(lua_State *L) { olua_startinvoke(L); cocos2d::NodeGrid *self = nullptr; - cocos2d::Rect arg1; /** gridRect */ + cocos2d::Rect *arg1; /** gridRect */ olua_to_object(L, 1, &self, "cc.NodeGrid"); olua_check_object(L, 2, &arg1, "cc.Rect"); // void setGridRect(const cocos2d::Rect &gridRect) - self->setGridRect(arg1); + self->setGridRect(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_NodeGrid_setTarget(lua_State *L) +static int _olua_fun_cocos2d_NodeGrid_setTarget(lua_State *L) { olua_startinvoke(L); @@ -12265,41 +10080,33 @@ static int _cocos2d_NodeGrid_setTarget(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_NodeGrid(lua_State *L) +static int _olua_cls_cc_NodeGrid(lua_State *L) { oluacls_class(L, "cc.NodeGrid"); - oluacls_func(L, "create", _cocos2d_NodeGrid_create); - oluacls_func(L, "getGrid", _cocos2d_NodeGrid_getGrid); - oluacls_func(L, "getGridRect", _cocos2d_NodeGrid_getGridRect); - oluacls_func(L, "setGrid", _cocos2d_NodeGrid_setGrid); - oluacls_func(L, "setGridRect", _cocos2d_NodeGrid_setGridRect); - oluacls_func(L, "setTarget", _cocos2d_NodeGrid_setTarget); - oluacls_prop(L, "grid", _cocos2d_NodeGrid_getGrid, _cocos2d_NodeGrid_setGrid); - oluacls_prop(L, "gridRect", _cocos2d_NodeGrid_getGridRect, _cocos2d_NodeGrid_setGridRect); + oluacls_func(L, "create", _olua_fun_cocos2d_NodeGrid_create); + oluacls_func(L, "getGrid", _olua_fun_cocos2d_NodeGrid_getGrid); + oluacls_func(L, "getGridRect", _olua_fun_cocos2d_NodeGrid_getGridRect); + oluacls_func(L, "setGrid", _olua_fun_cocos2d_NodeGrid_setGrid); + oluacls_func(L, "setGridRect", _olua_fun_cocos2d_NodeGrid_setGridRect); + oluacls_func(L, "setTarget", _olua_fun_cocos2d_NodeGrid_setTarget); + oluacls_prop(L, "grid", _olua_fun_cocos2d_NodeGrid_getGrid, _olua_fun_cocos2d_NodeGrid_setGrid); + oluacls_prop(L, "gridRect", _olua_fun_cocos2d_NodeGrid_getGridRect, _olua_fun_cocos2d_NodeGrid_setGridRect); return 1; } -OLUA_END_DECLS -static int _cocos2d_GridAction_clone(lua_State *L) +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_NodeGrid(lua_State *L) { - olua_startinvoke(L); - - cocos2d::GridAction *self = nullptr; - - olua_to_object(L, 1, &self, "cc.GridAction"); - - // cocos2d::GridAction *clone() - cocos2d::GridAction *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.GridAction"); - - olua_endinvoke(L); - - return num_ret; + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.NodeGrid")) { + luaL_error(L, "class not found: cocos2d::NodeGrid"); + } + return 1; } +OLUA_END_DECLS -static int _cocos2d_GridAction_getGrid(lua_State *L) +static int _olua_fun_cocos2d_GridAction_getGrid(lua_State *L) { olua_startinvoke(L); @@ -12316,54 +10123,27 @@ static int _cocos2d_GridAction_getGrid(lua_State *L) return num_ret; } -static int _cocos2d_GridAction_reverse(lua_State *L) +static int _olua_cls_cc_GridAction(lua_State *L) { - olua_startinvoke(L); - - cocos2d::GridAction *self = nullptr; - - olua_to_object(L, 1, &self, "cc.GridAction"); - - // cocos2d::GridAction *reverse() - cocos2d::GridAction *ret = self->reverse(); - int num_ret = olua_push_object(L, ret, "cc.GridAction"); - - olua_endinvoke(L); + oluacls_class(L, "cc.GridAction"); + oluacls_func(L, "getGrid", _olua_fun_cocos2d_GridAction_getGrid); + oluacls_prop(L, "grid", _olua_fun_cocos2d_GridAction_getGrid, nullptr); - return num_ret; + return 1; } OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_GridAction(lua_State *L) +OLUA_LIB int luaopen_cc_GridAction(lua_State *L) { - oluacls_class(L, "cc.GridAction"); - oluacls_func(L, "clone", _cocos2d_GridAction_clone); - oluacls_func(L, "getGrid", _cocos2d_GridAction_getGrid); - oluacls_func(L, "reverse", _cocos2d_GridAction_reverse); - oluacls_prop(L, "grid", _cocos2d_GridAction_getGrid, nullptr); - + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.GridAction")) { + luaL_error(L, "class not found: cocos2d::GridAction"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_Grid3DAction_clone(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::Grid3DAction *self = nullptr; - - olua_to_object(L, 1, &self, "cc.Grid3DAction"); - - // cocos2d::Grid3DAction *clone() - cocos2d::Grid3DAction *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.Grid3DAction"); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_Grid3DAction_getGridRect(lua_State *L) +static int _olua_fun_cocos2d_Grid3DAction_getGridRect(lua_State *L) { olua_startinvoke(L); @@ -12373,115 +10153,106 @@ static int _cocos2d_Grid3DAction_getGridRect(lua_State *L) // cocos2d::Rect getGridRect() cocos2d::Rect ret = self->getGridRect(); - int num_ret = olua_pushcopy_object(L, ret, "cc.Rect"); + int num_ret = olua_copy_object(L, ret, "cc.Rect"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_Grid3DAction_getOriginalVertex(lua_State *L) +static int _olua_fun_cocos2d_Grid3DAction_getOriginalVertex(lua_State *L) { olua_startinvoke(L); cocos2d::Grid3DAction *self = nullptr; - cocos2d::Vec2 arg1; /** position */ + cocos2d::Vec2 *arg1; /** position */ olua_to_object(L, 1, &self, "cc.Grid3DAction"); olua_check_object(L, 2, &arg1, "cc.Vec2"); // cocos2d::Vec3 getOriginalVertex(const cocos2d::Vec2 &position) - cocos2d::Vec3 ret = self->getOriginalVertex(arg1); - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec3"); + cocos2d::Vec3 ret = self->getOriginalVertex(*arg1); + int num_ret = olua_copy_object(L, ret, "cc.Vec3"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_Grid3DAction_getVertex(lua_State *L) +static int _olua_fun_cocos2d_Grid3DAction_getVertex(lua_State *L) { olua_startinvoke(L); cocos2d::Grid3DAction *self = nullptr; - cocos2d::Vec2 arg1; /** position */ + cocos2d::Vec2 *arg1; /** position */ olua_to_object(L, 1, &self, "cc.Grid3DAction"); olua_check_object(L, 2, &arg1, "cc.Vec2"); // cocos2d::Vec3 getVertex(const cocos2d::Vec2 &position) - cocos2d::Vec3 ret = self->getVertex(arg1); - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec3"); + cocos2d::Vec3 ret = self->getVertex(*arg1); + int num_ret = olua_copy_object(L, ret, "cc.Vec3"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_Grid3DAction_setVertex(lua_State *L) +static int _olua_fun_cocos2d_Grid3DAction_setVertex(lua_State *L) { olua_startinvoke(L); cocos2d::Grid3DAction *self = nullptr; - cocos2d::Vec2 arg1; /** position */ - cocos2d::Vec3 arg2; /** vertex */ + cocos2d::Vec2 *arg1; /** position */ + cocos2d::Vec3 *arg2; /** vertex */ olua_to_object(L, 1, &self, "cc.Grid3DAction"); olua_check_object(L, 2, &arg1, "cc.Vec2"); olua_check_object(L, 3, &arg2, "cc.Vec3"); // void setVertex(const cocos2d::Vec2 &position, const cocos2d::Vec3 &vertex) - self->setVertex(arg1, arg2); + self->setVertex(*arg1, *arg2); olua_endinvoke(L); return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_Grid3DAction(lua_State *L) +static int _olua_cls_cc_Grid3DAction(lua_State *L) { oluacls_class(L, "cc.Grid3DAction"); - oluacls_func(L, "clone", _cocos2d_Grid3DAction_clone); - oluacls_func(L, "getGridRect", _cocos2d_Grid3DAction_getGridRect); - oluacls_func(L, "getOriginalVertex", _cocos2d_Grid3DAction_getOriginalVertex); - oluacls_func(L, "getVertex", _cocos2d_Grid3DAction_getVertex); - oluacls_func(L, "setVertex", _cocos2d_Grid3DAction_setVertex); - oluacls_prop(L, "gridRect", _cocos2d_Grid3DAction_getGridRect, nullptr); + oluacls_func(L, "getGridRect", _olua_fun_cocos2d_Grid3DAction_getGridRect); + oluacls_func(L, "getOriginalVertex", _olua_fun_cocos2d_Grid3DAction_getOriginalVertex); + oluacls_func(L, "getVertex", _olua_fun_cocos2d_Grid3DAction_getVertex); + oluacls_func(L, "setVertex", _olua_fun_cocos2d_Grid3DAction_setVertex); + oluacls_prop(L, "gridRect", _olua_fun_cocos2d_Grid3DAction_getGridRect, nullptr); return 1; } -OLUA_END_DECLS -static int _cocos2d_TiledGrid3DAction_clone(lua_State *L) +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_Grid3DAction(lua_State *L) { - olua_startinvoke(L); - - cocos2d::TiledGrid3DAction *self = nullptr; - - olua_to_object(L, 1, &self, "cc.TiledGrid3DAction"); - - // cocos2d::TiledGrid3DAction *clone() - cocos2d::TiledGrid3DAction *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.TiledGrid3DAction"); - - olua_endinvoke(L); - - return num_ret; + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.Grid3DAction")) { + luaL_error(L, "class not found: cocos2d::Grid3DAction"); + } + return 1; } +OLUA_END_DECLS -static int _cocos2d_TiledGrid3DAction_create(lua_State *L) +static int _olua_fun_cocos2d_TiledGrid3DAction_create(lua_State *L) { olua_startinvoke(L); float arg1 = 0; /** duration */ - cocos2d::Size arg2; /** gridSize */ + cocos2d::Size *arg2; /** gridSize */ olua_check_number(L, 1, &arg1); olua_check_object(L, 2, &arg2, "cc.Size"); // static cocos2d::TiledGrid3DAction *create(float duration, const cocos2d::Size &gridSize) - cocos2d::TiledGrid3DAction *ret = cocos2d::TiledGrid3DAction::create(arg1, arg2); + cocos2d::TiledGrid3DAction *ret = cocos2d::TiledGrid3DAction::create(arg1, *arg2); int num_ret = olua_push_object(L, ret, "cc.TiledGrid3DAction"); olua_endinvoke(L); @@ -12489,96 +10260,87 @@ static int _cocos2d_TiledGrid3DAction_create(lua_State *L) return num_ret; } -static int _cocos2d_TiledGrid3DAction_getOriginalTile(lua_State *L) +static int _olua_fun_cocos2d_TiledGrid3DAction_getOriginalTile(lua_State *L) { olua_startinvoke(L); cocos2d::TiledGrid3DAction *self = nullptr; - cocos2d::Vec2 arg1; /** position */ + cocos2d::Vec2 *arg1; /** position */ olua_to_object(L, 1, &self, "cc.TiledGrid3DAction"); olua_check_object(L, 2, &arg1, "cc.Vec2"); // cocos2d::Quad3 getOriginalTile(const cocos2d::Vec2 &position) - cocos2d::Quad3 ret = self->getOriginalTile(arg1); - int num_ret = olua_pushcopy_object(L, ret, "cc.Quad3"); + cocos2d::Quad3 ret = self->getOriginalTile(*arg1); + int num_ret = olua_copy_object(L, ret, "cc.Quad3"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_TiledGrid3DAction_getTile(lua_State *L) +static int _olua_fun_cocos2d_TiledGrid3DAction_getTile(lua_State *L) { olua_startinvoke(L); cocos2d::TiledGrid3DAction *self = nullptr; - cocos2d::Vec2 arg1; /** position */ + cocos2d::Vec2 *arg1; /** position */ olua_to_object(L, 1, &self, "cc.TiledGrid3DAction"); olua_check_object(L, 2, &arg1, "cc.Vec2"); // cocos2d::Quad3 getTile(const cocos2d::Vec2 &position) - cocos2d::Quad3 ret = self->getTile(arg1); - int num_ret = olua_pushcopy_object(L, ret, "cc.Quad3"); + cocos2d::Quad3 ret = self->getTile(*arg1); + int num_ret = olua_copy_object(L, ret, "cc.Quad3"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_TiledGrid3DAction_setTile(lua_State *L) +static int _olua_fun_cocos2d_TiledGrid3DAction_setTile(lua_State *L) { olua_startinvoke(L); cocos2d::TiledGrid3DAction *self = nullptr; - cocos2d::Vec2 arg1; /** position */ - cocos2d::Quad3 arg2; /** coords */ + cocos2d::Vec2 *arg1; /** position */ + cocos2d::Quad3 *arg2; /** coords */ olua_to_object(L, 1, &self, "cc.TiledGrid3DAction"); olua_check_object(L, 2, &arg1, "cc.Vec2"); olua_check_object(L, 3, &arg2, "cc.Quad3"); // void setTile(const cocos2d::Vec2 &position, const cocos2d::Quad3 &coords) - self->setTile(arg1, arg2); + self->setTile(*arg1, *arg2); olua_endinvoke(L); - return 0; -} - -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_TiledGrid3DAction(lua_State *L) -{ - oluacls_class(L, "cc.TiledGrid3DAction"); - oluacls_func(L, "clone", _cocos2d_TiledGrid3DAction_clone); - oluacls_func(L, "create", _cocos2d_TiledGrid3DAction_create); - oluacls_func(L, "getOriginalTile", _cocos2d_TiledGrid3DAction_getOriginalTile); - oluacls_func(L, "getTile", _cocos2d_TiledGrid3DAction_getTile); - oluacls_func(L, "setTile", _cocos2d_TiledGrid3DAction_setTile); - - return 1; -} -OLUA_END_DECLS - -static int _cocos2d_AccelDeccelAmplitude_clone(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::AccelDeccelAmplitude *self = nullptr; - - olua_to_object(L, 1, &self, "cc.AccelDeccelAmplitude"); + return 0; +} - // cocos2d::AccelDeccelAmplitude *clone() - cocos2d::AccelDeccelAmplitude *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.AccelDeccelAmplitude"); +static int _olua_cls_cc_TiledGrid3DAction(lua_State *L) +{ + oluacls_class(L, "cc.TiledGrid3DAction"); + oluacls_func(L, "create", _olua_fun_cocos2d_TiledGrid3DAction_create); + oluacls_func(L, "getOriginalTile", _olua_fun_cocos2d_TiledGrid3DAction_getOriginalTile); + oluacls_func(L, "getTile", _olua_fun_cocos2d_TiledGrid3DAction_getTile); + oluacls_func(L, "setTile", _olua_fun_cocos2d_TiledGrid3DAction_setTile); - olua_endinvoke(L); + return 1; +} - return num_ret; +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_TiledGrid3DAction(lua_State *L) +{ + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.TiledGrid3DAction")) { + luaL_error(L, "class not found: cocos2d::TiledGrid3DAction"); + } + return 1; } +OLUA_END_DECLS -static int _cocos2d_AccelDeccelAmplitude_create(lua_State *L) +static int _olua_fun_cocos2d_AccelDeccelAmplitude_create(lua_State *L) { olua_startinvoke(L); @@ -12597,7 +10359,7 @@ static int _cocos2d_AccelDeccelAmplitude_create(lua_State *L) return num_ret; } -static int _cocos2d_AccelDeccelAmplitude_getRate(lua_State *L) +static int _olua_fun_cocos2d_AccelDeccelAmplitude_getRate(lua_State *L) { olua_startinvoke(L); @@ -12614,24 +10376,7 @@ static int _cocos2d_AccelDeccelAmplitude_getRate(lua_State *L) return num_ret; } -static int _cocos2d_AccelDeccelAmplitude_reverse(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::AccelDeccelAmplitude *self = nullptr; - - olua_to_object(L, 1, &self, "cc.AccelDeccelAmplitude"); - - // cocos2d::AccelDeccelAmplitude *reverse() - cocos2d::AccelDeccelAmplitude *ret = self->reverse(); - int num_ret = olua_push_object(L, ret, "cc.AccelDeccelAmplitude"); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_AccelDeccelAmplitude_setRate(lua_State *L) +static int _olua_fun_cocos2d_AccelDeccelAmplitude_setRate(lua_State *L) { olua_startinvoke(L); @@ -12649,39 +10394,29 @@ static int _cocos2d_AccelDeccelAmplitude_setRate(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_AccelDeccelAmplitude(lua_State *L) +static int _olua_cls_cc_AccelDeccelAmplitude(lua_State *L) { oluacls_class(L, "cc.AccelDeccelAmplitude"); - oluacls_func(L, "clone", _cocos2d_AccelDeccelAmplitude_clone); - oluacls_func(L, "create", _cocos2d_AccelDeccelAmplitude_create); - oluacls_func(L, "getRate", _cocos2d_AccelDeccelAmplitude_getRate); - oluacls_func(L, "reverse", _cocos2d_AccelDeccelAmplitude_reverse); - oluacls_func(L, "setRate", _cocos2d_AccelDeccelAmplitude_setRate); - oluacls_prop(L, "rate", _cocos2d_AccelDeccelAmplitude_getRate, _cocos2d_AccelDeccelAmplitude_setRate); + oluacls_func(L, "create", _olua_fun_cocos2d_AccelDeccelAmplitude_create); + oluacls_func(L, "getRate", _olua_fun_cocos2d_AccelDeccelAmplitude_getRate); + oluacls_func(L, "setRate", _olua_fun_cocos2d_AccelDeccelAmplitude_setRate); + oluacls_prop(L, "rate", _olua_fun_cocos2d_AccelDeccelAmplitude_getRate, _olua_fun_cocos2d_AccelDeccelAmplitude_setRate); return 1; } -OLUA_END_DECLS -static int _cocos2d_AccelAmplitude_clone(lua_State *L) +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_AccelDeccelAmplitude(lua_State *L) { - olua_startinvoke(L); - - cocos2d::AccelAmplitude *self = nullptr; - - olua_to_object(L, 1, &self, "cc.AccelAmplitude"); - - // cocos2d::AccelAmplitude *clone() - cocos2d::AccelAmplitude *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.AccelAmplitude"); - - olua_endinvoke(L); - - return num_ret; + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.AccelDeccelAmplitude")) { + luaL_error(L, "class not found: cocos2d::AccelDeccelAmplitude"); + } + return 1; } +OLUA_END_DECLS -static int _cocos2d_AccelAmplitude_create(lua_State *L) +static int _olua_fun_cocos2d_AccelAmplitude_create(lua_State *L) { olua_startinvoke(L); @@ -12700,7 +10435,7 @@ static int _cocos2d_AccelAmplitude_create(lua_State *L) return num_ret; } -static int _cocos2d_AccelAmplitude_getRate(lua_State *L) +static int _olua_fun_cocos2d_AccelAmplitude_getRate(lua_State *L) { olua_startinvoke(L); @@ -12717,24 +10452,7 @@ static int _cocos2d_AccelAmplitude_getRate(lua_State *L) return num_ret; } -static int _cocos2d_AccelAmplitude_reverse(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::AccelAmplitude *self = nullptr; - - olua_to_object(L, 1, &self, "cc.AccelAmplitude"); - - // cocos2d::AccelAmplitude *reverse() - cocos2d::AccelAmplitude *ret = self->reverse(); - int num_ret = olua_push_object(L, ret, "cc.AccelAmplitude"); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_AccelAmplitude_setRate(lua_State *L) +static int _olua_fun_cocos2d_AccelAmplitude_setRate(lua_State *L) { olua_startinvoke(L); @@ -12752,39 +10470,29 @@ static int _cocos2d_AccelAmplitude_setRate(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_AccelAmplitude(lua_State *L) +static int _olua_cls_cc_AccelAmplitude(lua_State *L) { oluacls_class(L, "cc.AccelAmplitude"); - oluacls_func(L, "clone", _cocos2d_AccelAmplitude_clone); - oluacls_func(L, "create", _cocos2d_AccelAmplitude_create); - oluacls_func(L, "getRate", _cocos2d_AccelAmplitude_getRate); - oluacls_func(L, "reverse", _cocos2d_AccelAmplitude_reverse); - oluacls_func(L, "setRate", _cocos2d_AccelAmplitude_setRate); - oluacls_prop(L, "rate", _cocos2d_AccelAmplitude_getRate, _cocos2d_AccelAmplitude_setRate); + oluacls_func(L, "create", _olua_fun_cocos2d_AccelAmplitude_create); + oluacls_func(L, "getRate", _olua_fun_cocos2d_AccelAmplitude_getRate); + oluacls_func(L, "setRate", _olua_fun_cocos2d_AccelAmplitude_setRate); + oluacls_prop(L, "rate", _olua_fun_cocos2d_AccelAmplitude_getRate, _olua_fun_cocos2d_AccelAmplitude_setRate); return 1; } -OLUA_END_DECLS -static int _cocos2d_DeccelAmplitude_clone(lua_State *L) +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_AccelAmplitude(lua_State *L) { - olua_startinvoke(L); - - cocos2d::DeccelAmplitude *self = nullptr; - - olua_to_object(L, 1, &self, "cc.DeccelAmplitude"); - - // cocos2d::DeccelAmplitude *clone() - cocos2d::DeccelAmplitude *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.DeccelAmplitude"); - - olua_endinvoke(L); - - return num_ret; + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.AccelAmplitude")) { + luaL_error(L, "class not found: cocos2d::AccelAmplitude"); + } + return 1; } +OLUA_END_DECLS -static int _cocos2d_DeccelAmplitude_create(lua_State *L) +static int _olua_fun_cocos2d_DeccelAmplitude_create(lua_State *L) { olua_startinvoke(L); @@ -12803,7 +10511,7 @@ static int _cocos2d_DeccelAmplitude_create(lua_State *L) return num_ret; } -static int _cocos2d_DeccelAmplitude_getRate(lua_State *L) +static int _olua_fun_cocos2d_DeccelAmplitude_getRate(lua_State *L) { olua_startinvoke(L); @@ -12820,24 +10528,7 @@ static int _cocos2d_DeccelAmplitude_getRate(lua_State *L) return num_ret; } -static int _cocos2d_DeccelAmplitude_reverse(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::DeccelAmplitude *self = nullptr; - - olua_to_object(L, 1, &self, "cc.DeccelAmplitude"); - - // cocos2d::DeccelAmplitude *reverse() - cocos2d::DeccelAmplitude *ret = self->reverse(); - int num_ret = olua_push_object(L, ret, "cc.DeccelAmplitude"); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_DeccelAmplitude_setRate(lua_State *L) +static int _olua_fun_cocos2d_DeccelAmplitude_setRate(lua_State *L) { olua_startinvoke(L); @@ -12855,39 +10546,29 @@ static int _cocos2d_DeccelAmplitude_setRate(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_DeccelAmplitude(lua_State *L) +static int _olua_cls_cc_DeccelAmplitude(lua_State *L) { oluacls_class(L, "cc.DeccelAmplitude"); - oluacls_func(L, "clone", _cocos2d_DeccelAmplitude_clone); - oluacls_func(L, "create", _cocos2d_DeccelAmplitude_create); - oluacls_func(L, "getRate", _cocos2d_DeccelAmplitude_getRate); - oluacls_func(L, "reverse", _cocos2d_DeccelAmplitude_reverse); - oluacls_func(L, "setRate", _cocos2d_DeccelAmplitude_setRate); - oluacls_prop(L, "rate", _cocos2d_DeccelAmplitude_getRate, _cocos2d_DeccelAmplitude_setRate); + oluacls_func(L, "create", _olua_fun_cocos2d_DeccelAmplitude_create); + oluacls_func(L, "getRate", _olua_fun_cocos2d_DeccelAmplitude_getRate); + oluacls_func(L, "setRate", _olua_fun_cocos2d_DeccelAmplitude_setRate); + oluacls_prop(L, "rate", _olua_fun_cocos2d_DeccelAmplitude_getRate, _olua_fun_cocos2d_DeccelAmplitude_setRate); return 1; } -OLUA_END_DECLS -static int _cocos2d_StopGrid_clone(lua_State *L) +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_DeccelAmplitude(lua_State *L) { - olua_startinvoke(L); - - cocos2d::StopGrid *self = nullptr; - - olua_to_object(L, 1, &self, "cc.StopGrid"); - - // cocos2d::StopGrid *clone() - cocos2d::StopGrid *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.StopGrid"); - - olua_endinvoke(L); - - return num_ret; + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.DeccelAmplitude")) { + luaL_error(L, "class not found: cocos2d::DeccelAmplitude"); + } + return 1; } +OLUA_END_DECLS -static int _cocos2d_StopGrid_create(lua_State *L) +static int _olua_fun_cocos2d_StopGrid_create(lua_State *L) { olua_startinvoke(L); @@ -12900,53 +10581,26 @@ static int _cocos2d_StopGrid_create(lua_State *L) return num_ret; } -static int _cocos2d_StopGrid_reverse(lua_State *L) +static int _olua_cls_cc_StopGrid(lua_State *L) { - olua_startinvoke(L); - - cocos2d::StopGrid *self = nullptr; - - olua_to_object(L, 1, &self, "cc.StopGrid"); - - // cocos2d::StopGrid *reverse() - cocos2d::StopGrid *ret = self->reverse(); - int num_ret = olua_push_object(L, ret, "cc.StopGrid"); - - olua_endinvoke(L); + oluacls_class(L, "cc.StopGrid"); + oluacls_func(L, "create", _olua_fun_cocos2d_StopGrid_create); - return num_ret; + return 1; } OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_StopGrid(lua_State *L) +OLUA_LIB int luaopen_cc_StopGrid(lua_State *L) { - oluacls_class(L, "cc.StopGrid"); - oluacls_func(L, "clone", _cocos2d_StopGrid_clone); - oluacls_func(L, "create", _cocos2d_StopGrid_create); - oluacls_func(L, "reverse", _cocos2d_StopGrid_reverse); - + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.StopGrid")) { + luaL_error(L, "class not found: cocos2d::StopGrid"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_ReuseGrid_clone(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::ReuseGrid *self = nullptr; - - olua_to_object(L, 1, &self, "cc.ReuseGrid"); - - // cocos2d::ReuseGrid *clone() - cocos2d::ReuseGrid *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.ReuseGrid"); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_ReuseGrid_create(lua_State *L) +static int _olua_fun_cocos2d_ReuseGrid_create(lua_State *L) { olua_startinvoke(L); @@ -12963,7 +10617,7 @@ static int _cocos2d_ReuseGrid_create(lua_State *L) return num_ret; } -static int _cocos2d_ReuseGrid_initWithTimes(lua_State *L) +static int _olua_fun_cocos2d_ReuseGrid_initWithTimes(lua_State *L) { olua_startinvoke(L); @@ -12982,59 +10636,32 @@ static int _cocos2d_ReuseGrid_initWithTimes(lua_State *L) return num_ret; } -static int _cocos2d_ReuseGrid_reverse(lua_State *L) +static int _olua_cls_cc_ReuseGrid(lua_State *L) { - olua_startinvoke(L); - - cocos2d::ReuseGrid *self = nullptr; - - olua_to_object(L, 1, &self, "cc.ReuseGrid"); - - // cocos2d::ReuseGrid *reverse() - cocos2d::ReuseGrid *ret = self->reverse(); - int num_ret = olua_push_object(L, ret, "cc.ReuseGrid"); - - olua_endinvoke(L); + oluacls_class(L, "cc.ReuseGrid"); + oluacls_func(L, "create", _olua_fun_cocos2d_ReuseGrid_create); + oluacls_func(L, "initWithTimes", _olua_fun_cocos2d_ReuseGrid_initWithTimes); - return num_ret; + return 1; } OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ReuseGrid(lua_State *L) +OLUA_LIB int luaopen_cc_ReuseGrid(lua_State *L) { - oluacls_class(L, "cc.ReuseGrid"); - oluacls_func(L, "clone", _cocos2d_ReuseGrid_clone); - oluacls_func(L, "create", _cocos2d_ReuseGrid_create); - oluacls_func(L, "initWithTimes", _cocos2d_ReuseGrid_initWithTimes); - oluacls_func(L, "reverse", _cocos2d_ReuseGrid_reverse); - + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.ReuseGrid")) { + luaL_error(L, "class not found: cocos2d::ReuseGrid"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_Waves3D_clone(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::Waves3D *self = nullptr; - - olua_to_object(L, 1, &self, "cc.Waves3D"); - - // cocos2d::Waves3D *clone() - cocos2d::Waves3D *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.Waves3D"); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_Waves3D_create(lua_State *L) +static int _olua_fun_cocos2d_Waves3D_create(lua_State *L) { olua_startinvoke(L); float arg1 = 0; /** duration */ - cocos2d::Size arg2; /** gridSize */ + cocos2d::Size *arg2; /** gridSize */ unsigned int arg3 = 0; /** waves */ float arg4 = 0; /** amplitude */ @@ -13044,7 +10671,7 @@ static int _cocos2d_Waves3D_create(lua_State *L) olua_check_number(L, 4, &arg4); // static cocos2d::Waves3D *create(float duration, const cocos2d::Size &gridSize, unsigned int waves, float amplitude) - cocos2d::Waves3D *ret = cocos2d::Waves3D::create(arg1, arg2, arg3, arg4); + cocos2d::Waves3D *ret = cocos2d::Waves3D::create(arg1, *arg2, arg3, arg4); int num_ret = olua_push_object(L, ret, "cc.Waves3D"); olua_endinvoke(L); @@ -13052,7 +10679,7 @@ static int _cocos2d_Waves3D_create(lua_State *L) return num_ret; } -static int _cocos2d_Waves3D_getAmplitude(lua_State *L) +static int _olua_fun_cocos2d_Waves3D_getAmplitude(lua_State *L) { olua_startinvoke(L); @@ -13069,7 +10696,7 @@ static int _cocos2d_Waves3D_getAmplitude(lua_State *L) return num_ret; } -static int _cocos2d_Waves3D_setAmplitude(lua_State *L) +static int _olua_fun_cocos2d_Waves3D_setAmplitude(lua_State *L) { olua_startinvoke(L); @@ -13087,38 +10714,29 @@ static int _cocos2d_Waves3D_setAmplitude(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_Waves3D(lua_State *L) +static int _olua_cls_cc_Waves3D(lua_State *L) { oluacls_class(L, "cc.Waves3D"); - oluacls_func(L, "clone", _cocos2d_Waves3D_clone); - oluacls_func(L, "create", _cocos2d_Waves3D_create); - oluacls_func(L, "getAmplitude", _cocos2d_Waves3D_getAmplitude); - oluacls_func(L, "setAmplitude", _cocos2d_Waves3D_setAmplitude); - oluacls_prop(L, "amplitude", _cocos2d_Waves3D_getAmplitude, _cocos2d_Waves3D_setAmplitude); + oluacls_func(L, "create", _olua_fun_cocos2d_Waves3D_create); + oluacls_func(L, "getAmplitude", _olua_fun_cocos2d_Waves3D_getAmplitude); + oluacls_func(L, "setAmplitude", _olua_fun_cocos2d_Waves3D_setAmplitude); + oluacls_prop(L, "amplitude", _olua_fun_cocos2d_Waves3D_getAmplitude, _olua_fun_cocos2d_Waves3D_setAmplitude); return 1; } -OLUA_END_DECLS -static int _cocos2d_FlipX3D_clone(lua_State *L) +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_Waves3D(lua_State *L) { - olua_startinvoke(L); - - cocos2d::FlipX3D *self = nullptr; - - olua_to_object(L, 1, &self, "cc.FlipX3D"); - - // cocos2d::FlipX3D *clone() - cocos2d::FlipX3D *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.FlipX3D"); - - olua_endinvoke(L); - - return num_ret; + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.Waves3D")) { + luaL_error(L, "class not found: cocos2d::Waves3D"); + } + return 1; } +OLUA_END_DECLS -static int _cocos2d_FlipX3D_create(lua_State *L) +static int _olua_fun_cocos2d_FlipX3D_create(lua_State *L) { olua_startinvoke(L); @@ -13135,12 +10753,12 @@ static int _cocos2d_FlipX3D_create(lua_State *L) return num_ret; } -static int _cocos2d_FlipX3D_initWithSize(lua_State *L) +static int _olua_fun_cocos2d_FlipX3D_initWithSize(lua_State *L) { olua_startinvoke(L); cocos2d::FlipX3D *self = nullptr; - cocos2d::Size arg1; /** gridSize */ + cocos2d::Size *arg1; /** gridSize */ float arg2 = 0; /** duration */ olua_to_object(L, 1, &self, "cc.FlipX3D"); @@ -13148,7 +10766,7 @@ static int _cocos2d_FlipX3D_initWithSize(lua_State *L) olua_check_number(L, 3, &arg2); // bool initWithSize(const cocos2d::Size &gridSize, float duration) - bool ret = self->initWithSize(arg1, arg2); + bool ret = self->initWithSize(*arg1, arg2); int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); @@ -13156,36 +10774,27 @@ static int _cocos2d_FlipX3D_initWithSize(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_FlipX3D(lua_State *L) +static int _olua_cls_cc_FlipX3D(lua_State *L) { oluacls_class(L, "cc.FlipX3D"); - oluacls_func(L, "clone", _cocos2d_FlipX3D_clone); - oluacls_func(L, "create", _cocos2d_FlipX3D_create); - oluacls_func(L, "initWithSize", _cocos2d_FlipX3D_initWithSize); + oluacls_func(L, "create", _olua_fun_cocos2d_FlipX3D_create); + oluacls_func(L, "initWithSize", _olua_fun_cocos2d_FlipX3D_initWithSize); return 1; } -OLUA_END_DECLS -static int _cocos2d_FlipY3D_clone(lua_State *L) +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_FlipX3D(lua_State *L) { - olua_startinvoke(L); - - cocos2d::FlipY3D *self = nullptr; - - olua_to_object(L, 1, &self, "cc.FlipY3D"); - - // cocos2d::FlipY3D *clone() - cocos2d::FlipY3D *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.FlipY3D"); - - olua_endinvoke(L); - - return num_ret; + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.FlipX3D")) { + luaL_error(L, "class not found: cocos2d::FlipX3D"); + } + return 1; } +OLUA_END_DECLS -static int _cocos2d_FlipY3D_create(lua_State *L) +static int _olua_fun_cocos2d_FlipY3D_create(lua_State *L) { olua_startinvoke(L); @@ -13202,41 +10811,32 @@ static int _cocos2d_FlipY3D_create(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_FlipY3D(lua_State *L) +static int _olua_cls_cc_FlipY3D(lua_State *L) { oluacls_class(L, "cc.FlipY3D"); - oluacls_func(L, "clone", _cocos2d_FlipY3D_clone); - oluacls_func(L, "create", _cocos2d_FlipY3D_create); + oluacls_func(L, "create", _olua_fun_cocos2d_FlipY3D_create); return 1; } -OLUA_END_DECLS -static int _cocos2d_Lens3D_clone(lua_State *L) +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_FlipY3D(lua_State *L) { - olua_startinvoke(L); - - cocos2d::Lens3D *self = nullptr; - - olua_to_object(L, 1, &self, "cc.Lens3D"); - - // cocos2d::Lens3D *clone() - cocos2d::Lens3D *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.Lens3D"); - - olua_endinvoke(L); - - return num_ret; + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.FlipY3D")) { + luaL_error(L, "class not found: cocos2d::FlipY3D"); + } + return 1; } +OLUA_END_DECLS -static int _cocos2d_Lens3D_create(lua_State *L) +static int _olua_fun_cocos2d_Lens3D_create(lua_State *L) { olua_startinvoke(L); float arg1 = 0; /** duration */ - cocos2d::Size arg2; /** gridSize */ - cocos2d::Vec2 arg3; /** position */ + cocos2d::Size *arg2; /** gridSize */ + cocos2d::Vec2 *arg3; /** position */ float arg4 = 0; /** radius */ olua_check_number(L, 1, &arg1); @@ -13245,7 +10845,7 @@ static int _cocos2d_Lens3D_create(lua_State *L) olua_check_number(L, 4, &arg4); // static cocos2d::Lens3D *create(float duration, const cocos2d::Size &gridSize, const cocos2d::Vec2 &position, float radius) - cocos2d::Lens3D *ret = cocos2d::Lens3D::create(arg1, arg2, arg3, arg4); + cocos2d::Lens3D *ret = cocos2d::Lens3D::create(arg1, *arg2, *arg3, arg4); int num_ret = olua_push_object(L, ret, "cc.Lens3D"); olua_endinvoke(L); @@ -13253,7 +10853,7 @@ static int _cocos2d_Lens3D_create(lua_State *L) return num_ret; } -static int _cocos2d_Lens3D_getLensEffect(lua_State *L) +static int _olua_fun_cocos2d_Lens3D_getLensEffect(lua_State *L) { olua_startinvoke(L); @@ -13270,7 +10870,7 @@ static int _cocos2d_Lens3D_getLensEffect(lua_State *L) return num_ret; } -static int _cocos2d_Lens3D_getPosition(lua_State *L) +static int _olua_fun_cocos2d_Lens3D_getPosition(lua_State *L) { olua_startinvoke(L); @@ -13287,7 +10887,7 @@ static int _cocos2d_Lens3D_getPosition(lua_State *L) return num_ret; } -static int _cocos2d_Lens3D_setConcave(lua_State *L) +static int _olua_fun_cocos2d_Lens3D_setConcave(lua_State *L) { olua_startinvoke(L); @@ -13305,7 +10905,7 @@ static int _cocos2d_Lens3D_setConcave(lua_State *L) return 0; } -static int _cocos2d_Lens3D_setLensEffect(lua_State *L) +static int _olua_fun_cocos2d_Lens3D_setLensEffect(lua_State *L) { olua_startinvoke(L); @@ -13323,66 +10923,57 @@ static int _cocos2d_Lens3D_setLensEffect(lua_State *L) return 0; } -static int _cocos2d_Lens3D_setPosition(lua_State *L) +static int _olua_fun_cocos2d_Lens3D_setPosition(lua_State *L) { olua_startinvoke(L); cocos2d::Lens3D *self = nullptr; - cocos2d::Vec2 arg1; /** position */ + cocos2d::Vec2 *arg1; /** position */ olua_to_object(L, 1, &self, "cc.Lens3D"); olua_check_object(L, 2, &arg1, "cc.Vec2"); // void setPosition(const cocos2d::Vec2 &position) - self->setPosition(arg1); + self->setPosition(*arg1); olua_endinvoke(L); return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_Lens3D(lua_State *L) +static int _olua_cls_cc_Lens3D(lua_State *L) { oluacls_class(L, "cc.Lens3D"); - oluacls_func(L, "clone", _cocos2d_Lens3D_clone); - oluacls_func(L, "create", _cocos2d_Lens3D_create); - oluacls_func(L, "getLensEffect", _cocos2d_Lens3D_getLensEffect); - oluacls_func(L, "getPosition", _cocos2d_Lens3D_getPosition); - oluacls_func(L, "setConcave", _cocos2d_Lens3D_setConcave); - oluacls_func(L, "setLensEffect", _cocos2d_Lens3D_setLensEffect); - oluacls_func(L, "setPosition", _cocos2d_Lens3D_setPosition); - oluacls_prop(L, "lensEffect", _cocos2d_Lens3D_getLensEffect, _cocos2d_Lens3D_setLensEffect); - oluacls_prop(L, "position", _cocos2d_Lens3D_getPosition, _cocos2d_Lens3D_setPosition); + oluacls_func(L, "create", _olua_fun_cocos2d_Lens3D_create); + oluacls_func(L, "getLensEffect", _olua_fun_cocos2d_Lens3D_getLensEffect); + oluacls_func(L, "getPosition", _olua_fun_cocos2d_Lens3D_getPosition); + oluacls_func(L, "setConcave", _olua_fun_cocos2d_Lens3D_setConcave); + oluacls_func(L, "setLensEffect", _olua_fun_cocos2d_Lens3D_setLensEffect); + oluacls_func(L, "setPosition", _olua_fun_cocos2d_Lens3D_setPosition); + oluacls_prop(L, "lensEffect", _olua_fun_cocos2d_Lens3D_getLensEffect, _olua_fun_cocos2d_Lens3D_setLensEffect); + oluacls_prop(L, "position", _olua_fun_cocos2d_Lens3D_getPosition, _olua_fun_cocos2d_Lens3D_setPosition); return 1; } -OLUA_END_DECLS -static int _cocos2d_Ripple3D_clone(lua_State *L) +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_Lens3D(lua_State *L) { - olua_startinvoke(L); - - cocos2d::Ripple3D *self = nullptr; - - olua_to_object(L, 1, &self, "cc.Ripple3D"); - - // cocos2d::Ripple3D *clone() - cocos2d::Ripple3D *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.Ripple3D"); - - olua_endinvoke(L); - - return num_ret; + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.Lens3D")) { + luaL_error(L, "class not found: cocos2d::Lens3D"); + } + return 1; } +OLUA_END_DECLS -static int _cocos2d_Ripple3D_create(lua_State *L) +static int _olua_fun_cocos2d_Ripple3D_create(lua_State *L) { olua_startinvoke(L); float arg1 = 0; /** duration */ - cocos2d::Size arg2; /** gridSize */ - cocos2d::Vec2 arg3; /** position */ + cocos2d::Size *arg2; /** gridSize */ + cocos2d::Vec2 *arg3; /** position */ float arg4 = 0; /** radius */ unsigned int arg5 = 0; /** waves */ float arg6 = 0; /** amplitude */ @@ -13395,7 +10986,7 @@ static int _cocos2d_Ripple3D_create(lua_State *L) olua_check_number(L, 6, &arg6); // static cocos2d::Ripple3D *create(float duration, const cocos2d::Size &gridSize, const cocos2d::Vec2 &position, float radius, unsigned int waves, float amplitude) - cocos2d::Ripple3D *ret = cocos2d::Ripple3D::create(arg1, arg2, arg3, arg4, arg5, arg6); + cocos2d::Ripple3D *ret = cocos2d::Ripple3D::create(arg1, *arg2, *arg3, arg4, arg5, arg6); int num_ret = olua_push_object(L, ret, "cc.Ripple3D"); olua_endinvoke(L); @@ -13403,7 +10994,7 @@ static int _cocos2d_Ripple3D_create(lua_State *L) return num_ret; } -static int _cocos2d_Ripple3D_getAmplitude(lua_State *L) +static int _olua_fun_cocos2d_Ripple3D_getAmplitude(lua_State *L) { olua_startinvoke(L); @@ -13420,7 +11011,7 @@ static int _cocos2d_Ripple3D_getAmplitude(lua_State *L) return num_ret; } -static int _cocos2d_Ripple3D_getPosition(lua_State *L) +static int _olua_fun_cocos2d_Ripple3D_getPosition(lua_State *L) { olua_startinvoke(L); @@ -13437,7 +11028,7 @@ static int _cocos2d_Ripple3D_getPosition(lua_State *L) return num_ret; } -static int _cocos2d_Ripple3D_setAmplitude(lua_State *L) +static int _olua_fun_cocos2d_Ripple3D_setAmplitude(lua_State *L) { olua_startinvoke(L); @@ -13455,64 +11046,55 @@ static int _cocos2d_Ripple3D_setAmplitude(lua_State *L) return 0; } -static int _cocos2d_Ripple3D_setPosition(lua_State *L) +static int _olua_fun_cocos2d_Ripple3D_setPosition(lua_State *L) { olua_startinvoke(L); cocos2d::Ripple3D *self = nullptr; - cocos2d::Vec2 arg1; /** position */ + cocos2d::Vec2 *arg1; /** position */ olua_to_object(L, 1, &self, "cc.Ripple3D"); olua_check_object(L, 2, &arg1, "cc.Vec2"); // void setPosition(const cocos2d::Vec2 &position) - self->setPosition(arg1); + self->setPosition(*arg1); olua_endinvoke(L); return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_Ripple3D(lua_State *L) +static int _olua_cls_cc_Ripple3D(lua_State *L) { oluacls_class(L, "cc.Ripple3D"); - oluacls_func(L, "clone", _cocos2d_Ripple3D_clone); - oluacls_func(L, "create", _cocos2d_Ripple3D_create); - oluacls_func(L, "getAmplitude", _cocos2d_Ripple3D_getAmplitude); - oluacls_func(L, "getPosition", _cocos2d_Ripple3D_getPosition); - oluacls_func(L, "setAmplitude", _cocos2d_Ripple3D_setAmplitude); - oluacls_func(L, "setPosition", _cocos2d_Ripple3D_setPosition); - oluacls_prop(L, "amplitude", _cocos2d_Ripple3D_getAmplitude, _cocos2d_Ripple3D_setAmplitude); - oluacls_prop(L, "position", _cocos2d_Ripple3D_getPosition, _cocos2d_Ripple3D_setPosition); + oluacls_func(L, "create", _olua_fun_cocos2d_Ripple3D_create); + oluacls_func(L, "getAmplitude", _olua_fun_cocos2d_Ripple3D_getAmplitude); + oluacls_func(L, "getPosition", _olua_fun_cocos2d_Ripple3D_getPosition); + oluacls_func(L, "setAmplitude", _olua_fun_cocos2d_Ripple3D_setAmplitude); + oluacls_func(L, "setPosition", _olua_fun_cocos2d_Ripple3D_setPosition); + oluacls_prop(L, "amplitude", _olua_fun_cocos2d_Ripple3D_getAmplitude, _olua_fun_cocos2d_Ripple3D_setAmplitude); + oluacls_prop(L, "position", _olua_fun_cocos2d_Ripple3D_getPosition, _olua_fun_cocos2d_Ripple3D_setPosition); return 1; } -OLUA_END_DECLS -static int _cocos2d_Shaky3D_clone(lua_State *L) +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_Ripple3D(lua_State *L) { - olua_startinvoke(L); - - cocos2d::Shaky3D *self = nullptr; - - olua_to_object(L, 1, &self, "cc.Shaky3D"); - - // cocos2d::Shaky3D *clone() - cocos2d::Shaky3D *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.Shaky3D"); - - olua_endinvoke(L); - - return num_ret; + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.Ripple3D")) { + luaL_error(L, "class not found: cocos2d::Ripple3D"); + } + return 1; } +OLUA_END_DECLS -static int _cocos2d_Shaky3D_create(lua_State *L) +static int _olua_fun_cocos2d_Shaky3D_create(lua_State *L) { olua_startinvoke(L); float arg1 = 0; /** initWithDuration */ - cocos2d::Size arg2; /** gridSize */ + cocos2d::Size *arg2; /** gridSize */ int arg3 = 0; /** range */ bool arg4 = false; /** shakeZ */ @@ -13522,7 +11104,7 @@ static int _cocos2d_Shaky3D_create(lua_State *L) olua_check_bool(L, 4, &arg4); // static cocos2d::Shaky3D *create(float initWithDuration, const cocos2d::Size &gridSize, int range, bool shakeZ) - cocos2d::Shaky3D *ret = cocos2d::Shaky3D::create(arg1, arg2, arg3, arg4); + cocos2d::Shaky3D *ret = cocos2d::Shaky3D::create(arg1, *arg2, arg3, arg4); int num_ret = olua_push_object(L, ret, "cc.Shaky3D"); olua_endinvoke(L); @@ -13530,40 +11112,31 @@ static int _cocos2d_Shaky3D_create(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_Shaky3D(lua_State *L) +static int _olua_cls_cc_Shaky3D(lua_State *L) { oluacls_class(L, "cc.Shaky3D"); - oluacls_func(L, "clone", _cocos2d_Shaky3D_clone); - oluacls_func(L, "create", _cocos2d_Shaky3D_create); + oluacls_func(L, "create", _olua_fun_cocos2d_Shaky3D_create); return 1; } -OLUA_END_DECLS -static int _cocos2d_Liquid_clone(lua_State *L) +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_Shaky3D(lua_State *L) { - olua_startinvoke(L); - - cocos2d::Liquid *self = nullptr; - - olua_to_object(L, 1, &self, "cc.Liquid"); - - // cocos2d::Liquid *clone() - cocos2d::Liquid *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.Liquid"); - - olua_endinvoke(L); - - return num_ret; + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.Shaky3D")) { + luaL_error(L, "class not found: cocos2d::Shaky3D"); + } + return 1; } +OLUA_END_DECLS -static int _cocos2d_Liquid_create(lua_State *L) +static int _olua_fun_cocos2d_Liquid_create(lua_State *L) { olua_startinvoke(L); float arg1 = 0; /** duration */ - cocos2d::Size arg2; /** gridSize */ + cocos2d::Size *arg2; /** gridSize */ unsigned int arg3 = 0; /** waves */ float arg4 = 0; /** amplitude */ @@ -13573,7 +11146,7 @@ static int _cocos2d_Liquid_create(lua_State *L) olua_check_number(L, 4, &arg4); // static cocos2d::Liquid *create(float duration, const cocos2d::Size &gridSize, unsigned int waves, float amplitude) - cocos2d::Liquid *ret = cocos2d::Liquid::create(arg1, arg2, arg3, arg4); + cocos2d::Liquid *ret = cocos2d::Liquid::create(arg1, *arg2, arg3, arg4); int num_ret = olua_push_object(L, ret, "cc.Liquid"); olua_endinvoke(L); @@ -13581,7 +11154,7 @@ static int _cocos2d_Liquid_create(lua_State *L) return num_ret; } -static int _cocos2d_Liquid_getAmplitude(lua_State *L) +static int _olua_fun_cocos2d_Liquid_getAmplitude(lua_State *L) { olua_startinvoke(L); @@ -13598,7 +11171,7 @@ static int _cocos2d_Liquid_getAmplitude(lua_State *L) return num_ret; } -static int _cocos2d_Liquid_setAmplitude(lua_State *L) +static int _olua_fun_cocos2d_Liquid_setAmplitude(lua_State *L) { olua_startinvoke(L); @@ -13616,43 +11189,34 @@ static int _cocos2d_Liquid_setAmplitude(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_Liquid(lua_State *L) +static int _olua_cls_cc_Liquid(lua_State *L) { oluacls_class(L, "cc.Liquid"); - oluacls_func(L, "clone", _cocos2d_Liquid_clone); - oluacls_func(L, "create", _cocos2d_Liquid_create); - oluacls_func(L, "getAmplitude", _cocos2d_Liquid_getAmplitude); - oluacls_func(L, "setAmplitude", _cocos2d_Liquid_setAmplitude); - oluacls_prop(L, "amplitude", _cocos2d_Liquid_getAmplitude, _cocos2d_Liquid_setAmplitude); + oluacls_func(L, "create", _olua_fun_cocos2d_Liquid_create); + oluacls_func(L, "getAmplitude", _olua_fun_cocos2d_Liquid_getAmplitude); + oluacls_func(L, "setAmplitude", _olua_fun_cocos2d_Liquid_setAmplitude); + oluacls_prop(L, "amplitude", _olua_fun_cocos2d_Liquid_getAmplitude, _olua_fun_cocos2d_Liquid_setAmplitude); return 1; } -OLUA_END_DECLS -static int _cocos2d_Waves_clone(lua_State *L) +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_Liquid(lua_State *L) { - olua_startinvoke(L); - - cocos2d::Waves *self = nullptr; - - olua_to_object(L, 1, &self, "cc.Waves"); - - // cocos2d::Waves *clone() - cocos2d::Waves *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.Waves"); - - olua_endinvoke(L); - - return num_ret; + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.Liquid")) { + luaL_error(L, "class not found: cocos2d::Liquid"); + } + return 1; } +OLUA_END_DECLS -static int _cocos2d_Waves_create(lua_State *L) +static int _olua_fun_cocos2d_Waves_create(lua_State *L) { olua_startinvoke(L); float arg1 = 0; /** duration */ - cocos2d::Size arg2; /** gridSize */ + cocos2d::Size *arg2; /** gridSize */ unsigned int arg3 = 0; /** waves */ float arg4 = 0; /** amplitude */ bool arg5 = false; /** horizontal */ @@ -13666,7 +11230,7 @@ static int _cocos2d_Waves_create(lua_State *L) olua_check_bool(L, 6, &arg6); // static cocos2d::Waves *create(float duration, const cocos2d::Size &gridSize, unsigned int waves, float amplitude, bool horizontal, bool vertical) - cocos2d::Waves *ret = cocos2d::Waves::create(arg1, arg2, arg3, arg4, arg5, arg6); + cocos2d::Waves *ret = cocos2d::Waves::create(arg1, *arg2, arg3, arg4, arg5, arg6); int num_ret = olua_push_object(L, ret, "cc.Waves"); olua_endinvoke(L); @@ -13674,7 +11238,7 @@ static int _cocos2d_Waves_create(lua_State *L) return num_ret; } -static int _cocos2d_Waves_getAmplitude(lua_State *L) +static int _olua_fun_cocos2d_Waves_getAmplitude(lua_State *L) { olua_startinvoke(L); @@ -13691,7 +11255,7 @@ static int _cocos2d_Waves_getAmplitude(lua_State *L) return num_ret; } -static int _cocos2d_Waves_setAmplitude(lua_State *L) +static int _olua_fun_cocos2d_Waves_setAmplitude(lua_State *L) { olua_startinvoke(L); @@ -13709,44 +11273,35 @@ static int _cocos2d_Waves_setAmplitude(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_Waves(lua_State *L) +static int _olua_cls_cc_Waves(lua_State *L) { oluacls_class(L, "cc.Waves"); - oluacls_func(L, "clone", _cocos2d_Waves_clone); - oluacls_func(L, "create", _cocos2d_Waves_create); - oluacls_func(L, "getAmplitude", _cocos2d_Waves_getAmplitude); - oluacls_func(L, "setAmplitude", _cocos2d_Waves_setAmplitude); - oluacls_prop(L, "amplitude", _cocos2d_Waves_getAmplitude, _cocos2d_Waves_setAmplitude); + oluacls_func(L, "create", _olua_fun_cocos2d_Waves_create); + oluacls_func(L, "getAmplitude", _olua_fun_cocos2d_Waves_getAmplitude); + oluacls_func(L, "setAmplitude", _olua_fun_cocos2d_Waves_setAmplitude); + oluacls_prop(L, "amplitude", _olua_fun_cocos2d_Waves_getAmplitude, _olua_fun_cocos2d_Waves_setAmplitude); return 1; } -OLUA_END_DECLS -static int _cocos2d_Twirl_clone(lua_State *L) +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_Waves(lua_State *L) { - olua_startinvoke(L); - - cocos2d::Twirl *self = nullptr; - - olua_to_object(L, 1, &self, "cc.Twirl"); - - // cocos2d::Twirl *clone() - cocos2d::Twirl *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.Twirl"); - - olua_endinvoke(L); - - return num_ret; + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.Waves")) { + luaL_error(L, "class not found: cocos2d::Waves"); + } + return 1; } +OLUA_END_DECLS -static int _cocos2d_Twirl_create(lua_State *L) +static int _olua_fun_cocos2d_Twirl_create(lua_State *L) { olua_startinvoke(L); float arg1 = 0; /** duration */ - cocos2d::Size arg2; /** gridSize */ - cocos2d::Vec2 arg3; /** position */ + cocos2d::Size *arg2; /** gridSize */ + cocos2d::Vec2 *arg3; /** position */ unsigned int arg4 = 0; /** twirls */ float arg5 = 0; /** amplitude */ @@ -13757,7 +11312,7 @@ static int _cocos2d_Twirl_create(lua_State *L) olua_check_number(L, 5, &arg5); // static cocos2d::Twirl *create(float duration, const cocos2d::Size &gridSize, const cocos2d::Vec2 &position, unsigned int twirls, float amplitude) - cocos2d::Twirl *ret = cocos2d::Twirl::create(arg1, arg2, arg3, arg4, arg5); + cocos2d::Twirl *ret = cocos2d::Twirl::create(arg1, *arg2, *arg3, arg4, arg5); int num_ret = olua_push_object(L, ret, "cc.Twirl"); olua_endinvoke(L); @@ -13765,7 +11320,7 @@ static int _cocos2d_Twirl_create(lua_State *L) return num_ret; } -static int _cocos2d_Twirl_getAmplitude(lua_State *L) +static int _olua_fun_cocos2d_Twirl_getAmplitude(lua_State *L) { olua_startinvoke(L); @@ -13782,7 +11337,7 @@ static int _cocos2d_Twirl_getAmplitude(lua_State *L) return num_ret; } -static int _cocos2d_Twirl_getPosition(lua_State *L) +static int _olua_fun_cocos2d_Twirl_getPosition(lua_State *L) { olua_startinvoke(L); @@ -13799,7 +11354,7 @@ static int _cocos2d_Twirl_getPosition(lua_State *L) return num_ret; } -static int _cocos2d_Twirl_setAmplitude(lua_State *L) +static int _olua_fun_cocos2d_Twirl_setAmplitude(lua_State *L) { olua_startinvoke(L); @@ -13817,70 +11372,61 @@ static int _cocos2d_Twirl_setAmplitude(lua_State *L) return 0; } -static int _cocos2d_Twirl_setPosition(lua_State *L) +static int _olua_fun_cocos2d_Twirl_setPosition(lua_State *L) { olua_startinvoke(L); cocos2d::Twirl *self = nullptr; - cocos2d::Vec2 arg1; /** position */ + cocos2d::Vec2 *arg1; /** position */ olua_to_object(L, 1, &self, "cc.Twirl"); olua_check_object(L, 2, &arg1, "cc.Vec2"); // void setPosition(const cocos2d::Vec2 &position) - self->setPosition(arg1); + self->setPosition(*arg1); olua_endinvoke(L); return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_Twirl(lua_State *L) +static int _olua_cls_cc_Twirl(lua_State *L) { oluacls_class(L, "cc.Twirl"); - oluacls_func(L, "clone", _cocos2d_Twirl_clone); - oluacls_func(L, "create", _cocos2d_Twirl_create); - oluacls_func(L, "getAmplitude", _cocos2d_Twirl_getAmplitude); - oluacls_func(L, "getPosition", _cocos2d_Twirl_getPosition); - oluacls_func(L, "setAmplitude", _cocos2d_Twirl_setAmplitude); - oluacls_func(L, "setPosition", _cocos2d_Twirl_setPosition); - oluacls_prop(L, "amplitude", _cocos2d_Twirl_getAmplitude, _cocos2d_Twirl_setAmplitude); - oluacls_prop(L, "position", _cocos2d_Twirl_getPosition, _cocos2d_Twirl_setPosition); + oluacls_func(L, "create", _olua_fun_cocos2d_Twirl_create); + oluacls_func(L, "getAmplitude", _olua_fun_cocos2d_Twirl_getAmplitude); + oluacls_func(L, "getPosition", _olua_fun_cocos2d_Twirl_getPosition); + oluacls_func(L, "setAmplitude", _olua_fun_cocos2d_Twirl_setAmplitude); + oluacls_func(L, "setPosition", _olua_fun_cocos2d_Twirl_setPosition); + oluacls_prop(L, "amplitude", _olua_fun_cocos2d_Twirl_getAmplitude, _olua_fun_cocos2d_Twirl_setAmplitude); + oluacls_prop(L, "position", _olua_fun_cocos2d_Twirl_getPosition, _olua_fun_cocos2d_Twirl_setPosition); return 1; } -OLUA_END_DECLS -static int _cocos2d_PageTurn3D_clone(lua_State *L) +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_Twirl(lua_State *L) { - olua_startinvoke(L); - - cocos2d::PageTurn3D *self = nullptr; - - olua_to_object(L, 1, &self, "cc.PageTurn3D"); - - // cocos2d::PageTurn3D *clone() - cocos2d::PageTurn3D *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.PageTurn3D"); - - olua_endinvoke(L); - - return num_ret; + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.Twirl")) { + luaL_error(L, "class not found: cocos2d::Twirl"); + } + return 1; } +OLUA_END_DECLS -static int _cocos2d_PageTurn3D_create(lua_State *L) +static int _olua_fun_cocos2d_PageTurn3D_create(lua_State *L) { olua_startinvoke(L); float arg1 = 0; /** duration */ - cocos2d::Size arg2; /** gridSize */ + cocos2d::Size *arg2; /** gridSize */ olua_check_number(L, 1, &arg1); olua_check_object(L, 2, &arg2, "cc.Size"); // static cocos2d::PageTurn3D *create(float duration, const cocos2d::Size &gridSize) - cocos2d::PageTurn3D *ret = cocos2d::PageTurn3D::create(arg1, arg2); + cocos2d::PageTurn3D *ret = cocos2d::PageTurn3D::create(arg1, *arg2); int num_ret = olua_push_object(L, ret, "cc.PageTurn3D"); olua_endinvoke(L); @@ -13888,40 +11434,31 @@ static int _cocos2d_PageTurn3D_create(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_PageTurn3D(lua_State *L) +static int _olua_cls_cc_PageTurn3D(lua_State *L) { oluacls_class(L, "cc.PageTurn3D"); - oluacls_func(L, "clone", _cocos2d_PageTurn3D_clone); - oluacls_func(L, "create", _cocos2d_PageTurn3D_create); + oluacls_func(L, "create", _olua_fun_cocos2d_PageTurn3D_create); return 1; } -OLUA_END_DECLS -static int _cocos2d_ShakyTiles3D_clone(lua_State *L) +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_PageTurn3D(lua_State *L) { - olua_startinvoke(L); - - cocos2d::ShakyTiles3D *self = nullptr; - - olua_to_object(L, 1, &self, "cc.ShakyTiles3D"); - - // cocos2d::ShakyTiles3D *clone() - cocos2d::ShakyTiles3D *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.ShakyTiles3D"); - - olua_endinvoke(L); - - return num_ret; + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.PageTurn3D")) { + luaL_error(L, "class not found: cocos2d::PageTurn3D"); + } + return 1; } +OLUA_END_DECLS -static int _cocos2d_ShakyTiles3D_create(lua_State *L) +static int _olua_fun_cocos2d_ShakyTiles3D_create(lua_State *L) { olua_startinvoke(L); float arg1 = 0; /** duration */ - cocos2d::Size arg2; /** gridSize */ + cocos2d::Size *arg2; /** gridSize */ int arg3 = 0; /** range */ bool arg4 = false; /** shakeZ */ @@ -13931,7 +11468,7 @@ static int _cocos2d_ShakyTiles3D_create(lua_State *L) olua_check_bool(L, 4, &arg4); // static cocos2d::ShakyTiles3D *create(float duration, const cocos2d::Size &gridSize, int range, bool shakeZ) - cocos2d::ShakyTiles3D *ret = cocos2d::ShakyTiles3D::create(arg1, arg2, arg3, arg4); + cocos2d::ShakyTiles3D *ret = cocos2d::ShakyTiles3D::create(arg1, *arg2, arg3, arg4); int num_ret = olua_push_object(L, ret, "cc.ShakyTiles3D"); olua_endinvoke(L); @@ -13939,40 +11476,31 @@ static int _cocos2d_ShakyTiles3D_create(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ShakyTiles3D(lua_State *L) +static int _olua_cls_cc_ShakyTiles3D(lua_State *L) { oluacls_class(L, "cc.ShakyTiles3D"); - oluacls_func(L, "clone", _cocos2d_ShakyTiles3D_clone); - oluacls_func(L, "create", _cocos2d_ShakyTiles3D_create); + oluacls_func(L, "create", _olua_fun_cocos2d_ShakyTiles3D_create); return 1; } -OLUA_END_DECLS -static int _cocos2d_ShatteredTiles3D_clone(lua_State *L) +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_ShakyTiles3D(lua_State *L) { - olua_startinvoke(L); - - cocos2d::ShatteredTiles3D *self = nullptr; - - olua_to_object(L, 1, &self, "cc.ShatteredTiles3D"); - - // cocos2d::ShatteredTiles3D *clone() - cocos2d::ShatteredTiles3D *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.ShatteredTiles3D"); - - olua_endinvoke(L); - - return num_ret; + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.ShakyTiles3D")) { + luaL_error(L, "class not found: cocos2d::ShakyTiles3D"); + } + return 1; } +OLUA_END_DECLS -static int _cocos2d_ShatteredTiles3D_create(lua_State *L) +static int _olua_fun_cocos2d_ShatteredTiles3D_create(lua_State *L) { olua_startinvoke(L); float arg1 = 0; /** duration */ - cocos2d::Size arg2; /** gridSize */ + cocos2d::Size *arg2; /** gridSize */ int arg3 = 0; /** range */ bool arg4 = false; /** shatterZ */ @@ -13982,7 +11510,7 @@ static int _cocos2d_ShatteredTiles3D_create(lua_State *L) olua_check_bool(L, 4, &arg4); // static cocos2d::ShatteredTiles3D *create(float duration, const cocos2d::Size &gridSize, int range, bool shatterZ) - cocos2d::ShatteredTiles3D *ret = cocos2d::ShatteredTiles3D::create(arg1, arg2, arg3, arg4); + cocos2d::ShatteredTiles3D *ret = cocos2d::ShatteredTiles3D::create(arg1, *arg2, arg3, arg4); int num_ret = olua_push_object(L, ret, "cc.ShatteredTiles3D"); olua_endinvoke(L); @@ -13990,40 +11518,31 @@ static int _cocos2d_ShatteredTiles3D_create(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ShatteredTiles3D(lua_State *L) +static int _olua_cls_cc_ShatteredTiles3D(lua_State *L) { oluacls_class(L, "cc.ShatteredTiles3D"); - oluacls_func(L, "clone", _cocos2d_ShatteredTiles3D_clone); - oluacls_func(L, "create", _cocos2d_ShatteredTiles3D_create); + oluacls_func(L, "create", _olua_fun_cocos2d_ShatteredTiles3D_create); return 1; } -OLUA_END_DECLS -static int _cocos2d_ShuffleTiles_clone(lua_State *L) +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_ShatteredTiles3D(lua_State *L) { - olua_startinvoke(L); - - cocos2d::ShuffleTiles *self = nullptr; - - olua_to_object(L, 1, &self, "cc.ShuffleTiles"); - - // cocos2d::ShuffleTiles *clone() - cocos2d::ShuffleTiles *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.ShuffleTiles"); - - olua_endinvoke(L); - - return num_ret; + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.ShatteredTiles3D")) { + luaL_error(L, "class not found: cocos2d::ShatteredTiles3D"); + } + return 1; } +OLUA_END_DECLS -static int _cocos2d_ShuffleTiles_create(lua_State *L) +static int _olua_fun_cocos2d_ShuffleTiles_create(lua_State *L) { olua_startinvoke(L); float arg1 = 0; /** duration */ - cocos2d::Size arg2; /** gridSize */ + cocos2d::Size *arg2; /** gridSize */ unsigned int arg3 = 0; /** seed */ olua_check_number(L, 1, &arg1); @@ -14031,7 +11550,7 @@ static int _cocos2d_ShuffleTiles_create(lua_State *L) olua_check_integer(L, 3, &arg3); // static cocos2d::ShuffleTiles *create(float duration, const cocos2d::Size &gridSize, unsigned int seed) - cocos2d::ShuffleTiles *ret = cocos2d::ShuffleTiles::create(arg1, arg2, arg3); + cocos2d::ShuffleTiles *ret = cocos2d::ShuffleTiles::create(arg1, *arg2, arg3); int num_ret = olua_push_object(L, ret, "cc.ShuffleTiles"); olua_endinvoke(L); @@ -14039,26 +11558,26 @@ static int _cocos2d_ShuffleTiles_create(lua_State *L) return num_ret; } -static int _cocos2d_ShuffleTiles_getDelta(lua_State *L) +static int _olua_fun_cocos2d_ShuffleTiles_getDelta(lua_State *L) { olua_startinvoke(L); cocos2d::ShuffleTiles *self = nullptr; - cocos2d::Size arg1; /** pos */ + cocos2d::Size *arg1; /** pos */ olua_to_object(L, 1, &self, "cc.ShuffleTiles"); olua_check_object(L, 2, &arg1, "cc.Size"); // cocos2d::Size getDelta(const cocos2d::Size &pos) - cocos2d::Size ret = self->getDelta(arg1); - int num_ret = olua_pushcopy_object(L, ret, "cc.Size"); + cocos2d::Size ret = self->getDelta(*arg1); + int num_ret = olua_copy_object(L, ret, "cc.Size"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_ShuffleTiles_shuffle(lua_State *L) +static int _olua_fun_cocos2d_ShuffleTiles_shuffle(lua_State *L) { olua_startinvoke(L); @@ -14067,7 +11586,7 @@ static int _cocos2d_ShuffleTiles_shuffle(lua_State *L) unsigned int arg2 = 0; /** len */ olua_to_object(L, 1, &self, "cc.ShuffleTiles"); - olua_check_pointer(L, 2, &arg1, "olua.uint"); + olua_check_valueptr(L, 2, &arg1, "olua.uint"); olua_check_integer(L, 3, &arg2); // void shuffle(unsigned int *array, unsigned int len) @@ -14078,48 +11597,39 @@ static int _cocos2d_ShuffleTiles_shuffle(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ShuffleTiles(lua_State *L) +static int _olua_cls_cc_ShuffleTiles(lua_State *L) { oluacls_class(L, "cc.ShuffleTiles"); - oluacls_func(L, "clone", _cocos2d_ShuffleTiles_clone); - oluacls_func(L, "create", _cocos2d_ShuffleTiles_create); - oluacls_func(L, "getDelta", _cocos2d_ShuffleTiles_getDelta); - oluacls_func(L, "shuffle", _cocos2d_ShuffleTiles_shuffle); + oluacls_func(L, "create", _olua_fun_cocos2d_ShuffleTiles_create); + oluacls_func(L, "getDelta", _olua_fun_cocos2d_ShuffleTiles_getDelta); + oluacls_func(L, "shuffle", _olua_fun_cocos2d_ShuffleTiles_shuffle); return 1; } -OLUA_END_DECLS -static int _cocos2d_FadeOutTRTiles_clone(lua_State *L) +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_ShuffleTiles(lua_State *L) { - olua_startinvoke(L); - - cocos2d::FadeOutTRTiles *self = nullptr; - - olua_to_object(L, 1, &self, "cc.FadeOutTRTiles"); - - // cocos2d::FadeOutTRTiles *clone() - cocos2d::FadeOutTRTiles *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.FadeOutTRTiles"); - - olua_endinvoke(L); - - return num_ret; + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.ShuffleTiles")) { + luaL_error(L, "class not found: cocos2d::ShuffleTiles"); + } + return 1; } +OLUA_END_DECLS -static int _cocos2d_FadeOutTRTiles_create(lua_State *L) +static int _olua_fun_cocos2d_FadeOutTRTiles_create(lua_State *L) { olua_startinvoke(L); float arg1 = 0; /** duration */ - cocos2d::Size arg2; /** gridSize */ + cocos2d::Size *arg2; /** gridSize */ olua_check_number(L, 1, &arg1); olua_check_object(L, 2, &arg2, "cc.Size"); // static cocos2d::FadeOutTRTiles *create(float duration, const cocos2d::Size &gridSize) - cocos2d::FadeOutTRTiles *ret = cocos2d::FadeOutTRTiles::create(arg1, arg2); + cocos2d::FadeOutTRTiles *ret = cocos2d::FadeOutTRTiles::create(arg1, *arg2); int num_ret = olua_push_object(L, ret, "cc.FadeOutTRTiles"); olua_endinvoke(L); @@ -14127,12 +11637,12 @@ static int _cocos2d_FadeOutTRTiles_create(lua_State *L) return num_ret; } -static int _cocos2d_FadeOutTRTiles_testFunc(lua_State *L) +static int _olua_fun_cocos2d_FadeOutTRTiles_testFunc(lua_State *L) { olua_startinvoke(L); cocos2d::FadeOutTRTiles *self = nullptr; - cocos2d::Size arg1; /** pos */ + cocos2d::Size *arg1; /** pos */ float arg2 = 0; /** time */ olua_to_object(L, 1, &self, "cc.FadeOutTRTiles"); @@ -14140,7 +11650,7 @@ static int _cocos2d_FadeOutTRTiles_testFunc(lua_State *L) olua_check_number(L, 3, &arg2); // float testFunc(const cocos2d::Size &pos, float time) - float ret = self->testFunc(arg1, arg2); + float ret = self->testFunc(*arg1, arg2); int num_ret = olua_push_number(L, ret); olua_endinvoke(L); @@ -14148,12 +11658,12 @@ static int _cocos2d_FadeOutTRTiles_testFunc(lua_State *L) return num_ret; } -static int _cocos2d_FadeOutTRTiles_transformTile(lua_State *L) +static int _olua_fun_cocos2d_FadeOutTRTiles_transformTile(lua_State *L) { olua_startinvoke(L); cocos2d::FadeOutTRTiles *self = nullptr; - cocos2d::Vec2 arg1; /** pos */ + cocos2d::Vec2 *arg1; /** pos */ float arg2 = 0; /** distance */ olua_to_object(L, 1, &self, "cc.FadeOutTRTiles"); @@ -14161,93 +11671,84 @@ static int _cocos2d_FadeOutTRTiles_transformTile(lua_State *L) olua_check_number(L, 3, &arg2); // void transformTile(const cocos2d::Vec2 &pos, float distance) - self->transformTile(arg1, arg2); + self->transformTile(*arg1, arg2); olua_endinvoke(L); return 0; } -static int _cocos2d_FadeOutTRTiles_turnOffTile(lua_State *L) +static int _olua_fun_cocos2d_FadeOutTRTiles_turnOffTile(lua_State *L) { olua_startinvoke(L); cocos2d::FadeOutTRTiles *self = nullptr; - cocos2d::Vec2 arg1; /** pos */ + cocos2d::Vec2 *arg1; /** pos */ olua_to_object(L, 1, &self, "cc.FadeOutTRTiles"); olua_check_object(L, 2, &arg1, "cc.Vec2"); // void turnOffTile(const cocos2d::Vec2 &pos) - self->turnOffTile(arg1); + self->turnOffTile(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_FadeOutTRTiles_turnOnTile(lua_State *L) +static int _olua_fun_cocos2d_FadeOutTRTiles_turnOnTile(lua_State *L) { olua_startinvoke(L); cocos2d::FadeOutTRTiles *self = nullptr; - cocos2d::Vec2 arg1; /** pos */ + cocos2d::Vec2 *arg1; /** pos */ olua_to_object(L, 1, &self, "cc.FadeOutTRTiles"); olua_check_object(L, 2, &arg1, "cc.Vec2"); // void turnOnTile(const cocos2d::Vec2 &pos) - self->turnOnTile(arg1); + self->turnOnTile(*arg1); olua_endinvoke(L); return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_FadeOutTRTiles(lua_State *L) +static int _olua_cls_cc_FadeOutTRTiles(lua_State *L) { oluacls_class(L, "cc.FadeOutTRTiles"); - oluacls_func(L, "clone", _cocos2d_FadeOutTRTiles_clone); - oluacls_func(L, "create", _cocos2d_FadeOutTRTiles_create); - oluacls_func(L, "testFunc", _cocos2d_FadeOutTRTiles_testFunc); - oluacls_func(L, "transformTile", _cocos2d_FadeOutTRTiles_transformTile); - oluacls_func(L, "turnOffTile", _cocos2d_FadeOutTRTiles_turnOffTile); - oluacls_func(L, "turnOnTile", _cocos2d_FadeOutTRTiles_turnOnTile); + oluacls_func(L, "create", _olua_fun_cocos2d_FadeOutTRTiles_create); + oluacls_func(L, "testFunc", _olua_fun_cocos2d_FadeOutTRTiles_testFunc); + oluacls_func(L, "transformTile", _olua_fun_cocos2d_FadeOutTRTiles_transformTile); + oluacls_func(L, "turnOffTile", _olua_fun_cocos2d_FadeOutTRTiles_turnOffTile); + oluacls_func(L, "turnOnTile", _olua_fun_cocos2d_FadeOutTRTiles_turnOnTile); return 1; } -OLUA_END_DECLS -static int _cocos2d_FadeOutBLTiles_clone(lua_State *L) +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_FadeOutTRTiles(lua_State *L) { - olua_startinvoke(L); - - cocos2d::FadeOutBLTiles *self = nullptr; - - olua_to_object(L, 1, &self, "cc.FadeOutBLTiles"); - - // cocos2d::FadeOutBLTiles *clone() - cocos2d::FadeOutBLTiles *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.FadeOutBLTiles"); - - olua_endinvoke(L); - - return num_ret; + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.FadeOutTRTiles")) { + luaL_error(L, "class not found: cocos2d::FadeOutTRTiles"); + } + return 1; } +OLUA_END_DECLS -static int _cocos2d_FadeOutBLTiles_create(lua_State *L) +static int _olua_fun_cocos2d_FadeOutBLTiles_create(lua_State *L) { olua_startinvoke(L); float arg1 = 0; /** duration */ - cocos2d::Size arg2; /** gridSize */ + cocos2d::Size *arg2; /** gridSize */ olua_check_number(L, 1, &arg1); olua_check_object(L, 2, &arg2, "cc.Size"); // static cocos2d::FadeOutBLTiles *create(float duration, const cocos2d::Size &gridSize) - cocos2d::FadeOutBLTiles *ret = cocos2d::FadeOutBLTiles::create(arg1, arg2); + cocos2d::FadeOutBLTiles *ret = cocos2d::FadeOutBLTiles::create(arg1, *arg2); int num_ret = olua_push_object(L, ret, "cc.FadeOutBLTiles"); olua_endinvoke(L); @@ -14255,46 +11756,37 @@ static int _cocos2d_FadeOutBLTiles_create(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_FadeOutBLTiles(lua_State *L) +static int _olua_cls_cc_FadeOutBLTiles(lua_State *L) { oluacls_class(L, "cc.FadeOutBLTiles"); - oluacls_func(L, "clone", _cocos2d_FadeOutBLTiles_clone); - oluacls_func(L, "create", _cocos2d_FadeOutBLTiles_create); + oluacls_func(L, "create", _olua_fun_cocos2d_FadeOutBLTiles_create); return 1; } -OLUA_END_DECLS -static int _cocos2d_FadeOutUpTiles_clone(lua_State *L) +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_FadeOutBLTiles(lua_State *L) { - olua_startinvoke(L); - - cocos2d::FadeOutUpTiles *self = nullptr; - - olua_to_object(L, 1, &self, "cc.FadeOutUpTiles"); - - // cocos2d::FadeOutUpTiles *clone() - cocos2d::FadeOutUpTiles *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.FadeOutUpTiles"); - - olua_endinvoke(L); - - return num_ret; + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.FadeOutBLTiles")) { + luaL_error(L, "class not found: cocos2d::FadeOutBLTiles"); + } + return 1; } +OLUA_END_DECLS -static int _cocos2d_FadeOutUpTiles_create(lua_State *L) +static int _olua_fun_cocos2d_FadeOutUpTiles_create(lua_State *L) { olua_startinvoke(L); float arg1 = 0; /** duration */ - cocos2d::Size arg2; /** gridSize */ + cocos2d::Size *arg2; /** gridSize */ olua_check_number(L, 1, &arg1); olua_check_object(L, 2, &arg2, "cc.Size"); // static cocos2d::FadeOutUpTiles *create(float duration, const cocos2d::Size &gridSize) - cocos2d::FadeOutUpTiles *ret = cocos2d::FadeOutUpTiles::create(arg1, arg2); + cocos2d::FadeOutUpTiles *ret = cocos2d::FadeOutUpTiles::create(arg1, *arg2); int num_ret = olua_push_object(L, ret, "cc.FadeOutUpTiles"); olua_endinvoke(L); @@ -14302,46 +11794,37 @@ static int _cocos2d_FadeOutUpTiles_create(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_FadeOutUpTiles(lua_State *L) +static int _olua_cls_cc_FadeOutUpTiles(lua_State *L) { oluacls_class(L, "cc.FadeOutUpTiles"); - oluacls_func(L, "clone", _cocos2d_FadeOutUpTiles_clone); - oluacls_func(L, "create", _cocos2d_FadeOutUpTiles_create); + oluacls_func(L, "create", _olua_fun_cocos2d_FadeOutUpTiles_create); return 1; } -OLUA_END_DECLS -static int _cocos2d_FadeOutDownTiles_clone(lua_State *L) +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_FadeOutUpTiles(lua_State *L) { - olua_startinvoke(L); - - cocos2d::FadeOutDownTiles *self = nullptr; - - olua_to_object(L, 1, &self, "cc.FadeOutDownTiles"); - - // cocos2d::FadeOutDownTiles *clone() - cocos2d::FadeOutDownTiles *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.FadeOutDownTiles"); - - olua_endinvoke(L); - - return num_ret; + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.FadeOutUpTiles")) { + luaL_error(L, "class not found: cocos2d::FadeOutUpTiles"); + } + return 1; } +OLUA_END_DECLS -static int _cocos2d_FadeOutDownTiles_create(lua_State *L) +static int _olua_fun_cocos2d_FadeOutDownTiles_create(lua_State *L) { olua_startinvoke(L); float arg1 = 0; /** duration */ - cocos2d::Size arg2; /** gridSize */ + cocos2d::Size *arg2; /** gridSize */ olua_check_number(L, 1, &arg1); olua_check_object(L, 2, &arg2, "cc.Size"); // static cocos2d::FadeOutDownTiles *create(float duration, const cocos2d::Size &gridSize) - cocos2d::FadeOutDownTiles *ret = cocos2d::FadeOutDownTiles::create(arg1, arg2); + cocos2d::FadeOutDownTiles *ret = cocos2d::FadeOutDownTiles::create(arg1, *arg2); int num_ret = olua_push_object(L, ret, "cc.FadeOutDownTiles"); olua_endinvoke(L); @@ -14349,46 +11832,37 @@ static int _cocos2d_FadeOutDownTiles_create(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_FadeOutDownTiles(lua_State *L) +static int _olua_cls_cc_FadeOutDownTiles(lua_State *L) { oluacls_class(L, "cc.FadeOutDownTiles"); - oluacls_func(L, "clone", _cocos2d_FadeOutDownTiles_clone); - oluacls_func(L, "create", _cocos2d_FadeOutDownTiles_create); + oluacls_func(L, "create", _olua_fun_cocos2d_FadeOutDownTiles_create); return 1; } -OLUA_END_DECLS -static int _cocos2d_TurnOffTiles_clone(lua_State *L) +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_FadeOutDownTiles(lua_State *L) { - olua_startinvoke(L); - - cocos2d::TurnOffTiles *self = nullptr; - - olua_to_object(L, 1, &self, "cc.TurnOffTiles"); - - // cocos2d::TurnOffTiles *clone() - cocos2d::TurnOffTiles *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.TurnOffTiles"); - - olua_endinvoke(L); - - return num_ret; + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.FadeOutDownTiles")) { + luaL_error(L, "class not found: cocos2d::FadeOutDownTiles"); + } + return 1; } +OLUA_END_DECLS -static int _cocos2d_TurnOffTiles_create$1(lua_State *L) +static int _olua_fun_cocos2d_TurnOffTiles_create$1(lua_State *L) { olua_startinvoke(L); float arg1 = 0; /** duration */ - cocos2d::Size arg2; /** gridSize */ + cocos2d::Size *arg2; /** gridSize */ olua_check_number(L, 1, &arg1); olua_check_object(L, 2, &arg2, "cc.Size"); // static cocos2d::TurnOffTiles *create(float duration, const cocos2d::Size &gridSize) - cocos2d::TurnOffTiles *ret = cocos2d::TurnOffTiles::create(arg1, arg2); + cocos2d::TurnOffTiles *ret = cocos2d::TurnOffTiles::create(arg1, *arg2); int num_ret = olua_push_object(L, ret, "cc.TurnOffTiles"); olua_endinvoke(L); @@ -14396,12 +11870,12 @@ static int _cocos2d_TurnOffTiles_create$1(lua_State *L) return num_ret; } -static int _cocos2d_TurnOffTiles_create$2(lua_State *L) +static int _olua_fun_cocos2d_TurnOffTiles_create$2(lua_State *L) { olua_startinvoke(L); float arg1 = 0; /** duration */ - cocos2d::Size arg2; /** gridSize */ + cocos2d::Size *arg2; /** gridSize */ unsigned int arg3 = 0; /** seed */ olua_check_number(L, 1, &arg1); @@ -14409,7 +11883,7 @@ static int _cocos2d_TurnOffTiles_create$2(lua_State *L) olua_check_integer(L, 3, &arg3); // static cocos2d::TurnOffTiles *create(float duration, const cocos2d::Size &gridSize, unsigned int seed) - cocos2d::TurnOffTiles *ret = cocos2d::TurnOffTiles::create(arg1, arg2, arg3); + cocos2d::TurnOffTiles *ret = cocos2d::TurnOffTiles::create(arg1, *arg2, arg3); int num_ret = olua_push_object(L, ret, "cc.TurnOffTiles"); olua_endinvoke(L); @@ -14417,21 +11891,21 @@ static int _cocos2d_TurnOffTiles_create$2(lua_State *L) return num_ret; } -static int _cocos2d_TurnOffTiles_create(lua_State *L) +static int _olua_fun_cocos2d_TurnOffTiles_create(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 2) { // if ((olua_is_number(L, 1)) && (olua_is_object(L, 2, "cc.Size"))) { // static cocos2d::TurnOffTiles *create(float duration, const cocos2d::Size &gridSize) - return _cocos2d_TurnOffTiles_create$1(L); + return _olua_fun_cocos2d_TurnOffTiles_create$1(L); // } } if (num_args == 3) { // if ((olua_is_number(L, 1)) && (olua_is_object(L, 2, "cc.Size")) && (olua_is_integer(L, 3))) { // static cocos2d::TurnOffTiles *create(float duration, const cocos2d::Size &gridSize, unsigned int seed) - return _cocos2d_TurnOffTiles_create$2(L); + return _olua_fun_cocos2d_TurnOffTiles_create$2(L); // } } @@ -14440,7 +11914,7 @@ static int _cocos2d_TurnOffTiles_create(lua_State *L) return 0; } -static int _cocos2d_TurnOffTiles_shuffle(lua_State *L) +static int _olua_fun_cocos2d_TurnOffTiles_shuffle(lua_State *L) { olua_startinvoke(L); @@ -14449,7 +11923,7 @@ static int _cocos2d_TurnOffTiles_shuffle(lua_State *L) unsigned int arg2 = 0; /** len */ olua_to_object(L, 1, &self, "cc.TurnOffTiles"); - olua_check_pointer(L, 2, &arg1, "olua.uint"); + olua_check_valueptr(L, 2, &arg1, "olua.uint"); olua_check_integer(L, 3, &arg2); // void shuffle(unsigned int *array, unsigned int len) @@ -14460,79 +11934,70 @@ static int _cocos2d_TurnOffTiles_shuffle(lua_State *L) return 0; } -static int _cocos2d_TurnOffTiles_turnOffTile(lua_State *L) +static int _olua_fun_cocos2d_TurnOffTiles_turnOffTile(lua_State *L) { olua_startinvoke(L); cocos2d::TurnOffTiles *self = nullptr; - cocos2d::Vec2 arg1; /** pos */ + cocos2d::Vec2 *arg1; /** pos */ olua_to_object(L, 1, &self, "cc.TurnOffTiles"); olua_check_object(L, 2, &arg1, "cc.Vec2"); // void turnOffTile(const cocos2d::Vec2 &pos) - self->turnOffTile(arg1); + self->turnOffTile(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_TurnOffTiles_turnOnTile(lua_State *L) +static int _olua_fun_cocos2d_TurnOffTiles_turnOnTile(lua_State *L) { olua_startinvoke(L); cocos2d::TurnOffTiles *self = nullptr; - cocos2d::Vec2 arg1; /** pos */ + cocos2d::Vec2 *arg1; /** pos */ olua_to_object(L, 1, &self, "cc.TurnOffTiles"); olua_check_object(L, 2, &arg1, "cc.Vec2"); // void turnOnTile(const cocos2d::Vec2 &pos) - self->turnOnTile(arg1); + self->turnOnTile(*arg1); olua_endinvoke(L); return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_TurnOffTiles(lua_State *L) +static int _olua_cls_cc_TurnOffTiles(lua_State *L) { oluacls_class(L, "cc.TurnOffTiles"); - oluacls_func(L, "clone", _cocos2d_TurnOffTiles_clone); - oluacls_func(L, "create", _cocos2d_TurnOffTiles_create); - oluacls_func(L, "shuffle", _cocos2d_TurnOffTiles_shuffle); - oluacls_func(L, "turnOffTile", _cocos2d_TurnOffTiles_turnOffTile); - oluacls_func(L, "turnOnTile", _cocos2d_TurnOffTiles_turnOnTile); + oluacls_func(L, "create", _olua_fun_cocos2d_TurnOffTiles_create); + oluacls_func(L, "shuffle", _olua_fun_cocos2d_TurnOffTiles_shuffle); + oluacls_func(L, "turnOffTile", _olua_fun_cocos2d_TurnOffTiles_turnOffTile); + oluacls_func(L, "turnOnTile", _olua_fun_cocos2d_TurnOffTiles_turnOnTile); return 1; } -OLUA_END_DECLS -static int _cocos2d_WavesTiles3D_clone(lua_State *L) +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_TurnOffTiles(lua_State *L) { - olua_startinvoke(L); - - cocos2d::WavesTiles3D *self = nullptr; - - olua_to_object(L, 1, &self, "cc.WavesTiles3D"); - - // cocos2d::WavesTiles3D *clone() - cocos2d::WavesTiles3D *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.WavesTiles3D"); - - olua_endinvoke(L); - - return num_ret; + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.TurnOffTiles")) { + luaL_error(L, "class not found: cocos2d::TurnOffTiles"); + } + return 1; } +OLUA_END_DECLS -static int _cocos2d_WavesTiles3D_create(lua_State *L) +static int _olua_fun_cocos2d_WavesTiles3D_create(lua_State *L) { olua_startinvoke(L); float arg1 = 0; /** duration */ - cocos2d::Size arg2; /** gridSize */ + cocos2d::Size *arg2; /** gridSize */ unsigned int arg3 = 0; /** waves */ float arg4 = 0; /** amplitude */ @@ -14542,7 +12007,7 @@ static int _cocos2d_WavesTiles3D_create(lua_State *L) olua_check_number(L, 4, &arg4); // static cocos2d::WavesTiles3D *create(float duration, const cocos2d::Size &gridSize, unsigned int waves, float amplitude) - cocos2d::WavesTiles3D *ret = cocos2d::WavesTiles3D::create(arg1, arg2, arg3, arg4); + cocos2d::WavesTiles3D *ret = cocos2d::WavesTiles3D::create(arg1, *arg2, arg3, arg4); int num_ret = olua_push_object(L, ret, "cc.WavesTiles3D"); olua_endinvoke(L); @@ -14550,7 +12015,7 @@ static int _cocos2d_WavesTiles3D_create(lua_State *L) return num_ret; } -static int _cocos2d_WavesTiles3D_getAmplitude(lua_State *L) +static int _olua_fun_cocos2d_WavesTiles3D_getAmplitude(lua_State *L) { olua_startinvoke(L); @@ -14567,7 +12032,7 @@ static int _cocos2d_WavesTiles3D_getAmplitude(lua_State *L) return num_ret; } -static int _cocos2d_WavesTiles3D_setAmplitude(lua_State *L) +static int _olua_fun_cocos2d_WavesTiles3D_setAmplitude(lua_State *L) { olua_startinvoke(L); @@ -14585,43 +12050,34 @@ static int _cocos2d_WavesTiles3D_setAmplitude(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_WavesTiles3D(lua_State *L) +static int _olua_cls_cc_WavesTiles3D(lua_State *L) { oluacls_class(L, "cc.WavesTiles3D"); - oluacls_func(L, "clone", _cocos2d_WavesTiles3D_clone); - oluacls_func(L, "create", _cocos2d_WavesTiles3D_create); - oluacls_func(L, "getAmplitude", _cocos2d_WavesTiles3D_getAmplitude); - oluacls_func(L, "setAmplitude", _cocos2d_WavesTiles3D_setAmplitude); - oluacls_prop(L, "amplitude", _cocos2d_WavesTiles3D_getAmplitude, _cocos2d_WavesTiles3D_setAmplitude); + oluacls_func(L, "create", _olua_fun_cocos2d_WavesTiles3D_create); + oluacls_func(L, "getAmplitude", _olua_fun_cocos2d_WavesTiles3D_getAmplitude); + oluacls_func(L, "setAmplitude", _olua_fun_cocos2d_WavesTiles3D_setAmplitude); + oluacls_prop(L, "amplitude", _olua_fun_cocos2d_WavesTiles3D_getAmplitude, _olua_fun_cocos2d_WavesTiles3D_setAmplitude); return 1; } -OLUA_END_DECLS -static int _cocos2d_JumpTiles3D_clone(lua_State *L) +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_WavesTiles3D(lua_State *L) { - olua_startinvoke(L); - - cocos2d::JumpTiles3D *self = nullptr; - - olua_to_object(L, 1, &self, "cc.JumpTiles3D"); - - // cocos2d::JumpTiles3D *clone() - cocos2d::JumpTiles3D *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.JumpTiles3D"); - - olua_endinvoke(L); - - return num_ret; + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.WavesTiles3D")) { + luaL_error(L, "class not found: cocos2d::WavesTiles3D"); + } + return 1; } +OLUA_END_DECLS -static int _cocos2d_JumpTiles3D_create(lua_State *L) +static int _olua_fun_cocos2d_JumpTiles3D_create(lua_State *L) { olua_startinvoke(L); float arg1 = 0; /** duration */ - cocos2d::Size arg2; /** gridSize */ + cocos2d::Size *arg2; /** gridSize */ unsigned int arg3 = 0; /** numberOfJumps */ float arg4 = 0; /** amplitude */ @@ -14631,7 +12087,7 @@ static int _cocos2d_JumpTiles3D_create(lua_State *L) olua_check_number(L, 4, &arg4); // static cocos2d::JumpTiles3D *create(float duration, const cocos2d::Size &gridSize, unsigned int numberOfJumps, float amplitude) - cocos2d::JumpTiles3D *ret = cocos2d::JumpTiles3D::create(arg1, arg2, arg3, arg4); + cocos2d::JumpTiles3D *ret = cocos2d::JumpTiles3D::create(arg1, *arg2, arg3, arg4); int num_ret = olua_push_object(L, ret, "cc.JumpTiles3D"); olua_endinvoke(L); @@ -14639,7 +12095,7 @@ static int _cocos2d_JumpTiles3D_create(lua_State *L) return num_ret; } -static int _cocos2d_JumpTiles3D_getAmplitude(lua_State *L) +static int _olua_fun_cocos2d_JumpTiles3D_getAmplitude(lua_State *L) { olua_startinvoke(L); @@ -14656,7 +12112,7 @@ static int _cocos2d_JumpTiles3D_getAmplitude(lua_State *L) return num_ret; } -static int _cocos2d_JumpTiles3D_setAmplitude(lua_State *L) +static int _olua_fun_cocos2d_JumpTiles3D_setAmplitude(lua_State *L) { olua_startinvoke(L); @@ -14674,38 +12130,29 @@ static int _cocos2d_JumpTiles3D_setAmplitude(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_JumpTiles3D(lua_State *L) +static int _olua_cls_cc_JumpTiles3D(lua_State *L) { oluacls_class(L, "cc.JumpTiles3D"); - oluacls_func(L, "clone", _cocos2d_JumpTiles3D_clone); - oluacls_func(L, "create", _cocos2d_JumpTiles3D_create); - oluacls_func(L, "getAmplitude", _cocos2d_JumpTiles3D_getAmplitude); - oluacls_func(L, "setAmplitude", _cocos2d_JumpTiles3D_setAmplitude); - oluacls_prop(L, "amplitude", _cocos2d_JumpTiles3D_getAmplitude, _cocos2d_JumpTiles3D_setAmplitude); + oluacls_func(L, "create", _olua_fun_cocos2d_JumpTiles3D_create); + oluacls_func(L, "getAmplitude", _olua_fun_cocos2d_JumpTiles3D_getAmplitude); + oluacls_func(L, "setAmplitude", _olua_fun_cocos2d_JumpTiles3D_setAmplitude); + oluacls_prop(L, "amplitude", _olua_fun_cocos2d_JumpTiles3D_getAmplitude, _olua_fun_cocos2d_JumpTiles3D_setAmplitude); return 1; } -OLUA_END_DECLS -static int _cocos2d_SplitRows_clone(lua_State *L) +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_JumpTiles3D(lua_State *L) { - olua_startinvoke(L); - - cocos2d::SplitRows *self = nullptr; - - olua_to_object(L, 1, &self, "cc.SplitRows"); - - // cocos2d::SplitRows *clone() - cocos2d::SplitRows *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.SplitRows"); - - olua_endinvoke(L); - - return num_ret; + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.JumpTiles3D")) { + luaL_error(L, "class not found: cocos2d::JumpTiles3D"); + } + return 1; } +OLUA_END_DECLS -static int _cocos2d_SplitRows_create(lua_State *L) +static int _olua_fun_cocos2d_SplitRows_create(lua_State *L) { olua_startinvoke(L); @@ -14724,35 +12171,26 @@ static int _cocos2d_SplitRows_create(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_SplitRows(lua_State *L) +static int _olua_cls_cc_SplitRows(lua_State *L) { oluacls_class(L, "cc.SplitRows"); - oluacls_func(L, "clone", _cocos2d_SplitRows_clone); - oluacls_func(L, "create", _cocos2d_SplitRows_create); + oluacls_func(L, "create", _olua_fun_cocos2d_SplitRows_create); return 1; } -OLUA_END_DECLS -static int _cocos2d_SplitCols_clone(lua_State *L) +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_SplitRows(lua_State *L) { - olua_startinvoke(L); - - cocos2d::SplitCols *self = nullptr; - - olua_to_object(L, 1, &self, "cc.SplitCols"); - - // cocos2d::SplitCols *clone() - cocos2d::SplitCols *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.SplitCols"); - - olua_endinvoke(L); - - return num_ret; + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.SplitRows")) { + luaL_error(L, "class not found: cocos2d::SplitRows"); + } + return 1; } +OLUA_END_DECLS -static int _cocos2d_SplitCols_create(lua_State *L) +static int _olua_fun_cocos2d_SplitCols_create(lua_State *L) { olua_startinvoke(L); @@ -14771,18 +12209,26 @@ static int _cocos2d_SplitCols_create(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_SplitCols(lua_State *L) +static int _olua_cls_cc_SplitCols(lua_State *L) { oluacls_class(L, "cc.SplitCols"); - oluacls_func(L, "clone", _cocos2d_SplitCols_clone); - oluacls_func(L, "create", _cocos2d_SplitCols_create); + oluacls_func(L, "create", _olua_fun_cocos2d_SplitCols_create); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_SplitCols(lua_State *L) +{ + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.SplitCols")) { + luaL_error(L, "class not found: cocos2d::SplitCols"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_LuaTweenNode_as(lua_State *L) +static int _olua_fun_cocos2d_LuaTweenNode_as(lua_State *L) { olua_startinvoke(L); @@ -14810,7 +12256,7 @@ static int _cocos2d_LuaTweenNode_as(lua_State *L) return 1; } -static int _cocos2d_LuaTweenNode_create(lua_State *L) +static int _olua_fun_cocos2d_LuaTweenNode_create(lua_State *L) { olua_startinvoke(L); @@ -14820,16 +12266,17 @@ static int _cocos2d_LuaTweenNode_create(lua_State *L) void *cb_store = (void *)olua_newobjstub(L, "cc.LuaTweenNode"); std::string cb_tag = "ActionTween"; - std::string cb_name = olua_setcallback(L, cb_store, 1, cb_tag.c_str(), OLUA_TAG_NEW); + std::string cb_name = olua_setcallback(L, cb_store, 1, cb_tag.c_str(), OLUA_TAG_NEW); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](float arg1, const std::string &arg2) { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](float cb_arg1, const std::string &cb_arg2) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); if (olua_contextequal(L, cb_ctx)) { int top = lua_gettop(L); - olua_push_number(L, arg1); - olua_push_string(L, arg2); + olua_push_number(L, cb_arg1); + olua_push_string(L, cb_arg2); olua_callback(L, cb_store, cb_name.c_str(), 2); @@ -14837,7 +12284,7 @@ static int _cocos2d_LuaTweenNode_create(lua_State *L) } }; - // static cocos2d::LuaTweenNode *create(@localvar const std::function &callback) + // static cocos2d::LuaTweenNode *create(const std::function &callback) cocos2d::LuaTweenNode *ret = cocos2d::LuaTweenNode::create(arg1); if (olua_pushobjstub(L, ret, cb_store, "cc.LuaTweenNode") == OLUA_OBJ_EXIST) { lua_pushstring(L, cb_name.c_str()); @@ -14852,7 +12299,7 @@ static int _cocos2d_LuaTweenNode_create(lua_State *L) return 1; } -static int _cocos2d_LuaTweenNode_updateTweenAction(lua_State *L) +static int _olua_fun_cocos2d_LuaTweenNode_updateTweenAction(lua_State *L) { olua_startinvoke(L); @@ -14872,14 +12319,23 @@ static int _cocos2d_LuaTweenNode_updateTweenAction(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_LuaTweenNode(lua_State *L) +static int _olua_cls_cc_LuaTweenNode(lua_State *L) { oluacls_class(L, "cc.LuaTweenNode"); - oluacls_func(L, "as", _cocos2d_LuaTweenNode_as); - oluacls_func(L, "create", _cocos2d_LuaTweenNode_create); - oluacls_func(L, "updateTweenAction", _cocos2d_LuaTweenNode_updateTweenAction); + oluacls_func(L, "as", _olua_fun_cocos2d_LuaTweenNode_as); + oluacls_func(L, "create", _olua_fun_cocos2d_LuaTweenNode_create); + oluacls_func(L, "updateTweenAction", _olua_fun_cocos2d_LuaTweenNode_updateTweenAction); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_LuaTweenNode(lua_State *L) +{ + olua_require(L, "cocos2d_action", luaopen_cocos2d_action); + if (!olua_getclass(L, "cc.LuaTweenNode")) { + luaL_error(L, "class not found: cocos2d::LuaTweenNode"); + } return 1; } OLUA_END_DECLS @@ -14887,139 +12343,139 @@ OLUA_END_DECLS OLUA_BEGIN_DECLS OLUA_LIB int luaopen_cocos2d_action(lua_State *L) { - olua_require(L, "cc.tweenfunc.TweenType", luaopen_cocos2d_tweenfunc_TweenType); - olua_require(L, "cc.Action", luaopen_cocos2d_Action); - olua_require(L, "cc.ActionTweenDelegate", luaopen_cocos2d_ActionTweenDelegate); - olua_require(L, "cc.FiniteTimeAction", luaopen_cocos2d_FiniteTimeAction); - olua_require(L, "cc.Speed", luaopen_cocos2d_Speed); - olua_require(L, "cc.Follow", luaopen_cocos2d_Follow); - olua_require(L, "cc.tweenfunc", luaopen_cocos2d_tweenfunc); - olua_require(L, "cc.ActionInterval", luaopen_cocos2d_ActionInterval); - olua_require(L, "cc.ActionTween", luaopen_cocos2d_ActionTween); - olua_require(L, "cc.Sequence", luaopen_cocos2d_Sequence); - olua_require(L, "cc.Repeat", luaopen_cocos2d_Repeat); - olua_require(L, "cc.RepeatForever", luaopen_cocos2d_RepeatForever); - olua_require(L, "cc.Spawn", luaopen_cocos2d_Spawn); - olua_require(L, "cc.RotateTo", luaopen_cocos2d_RotateTo); - olua_require(L, "cc.RotateFrom", luaopen_cocos2d_RotateFrom); - olua_require(L, "cc.RotateBy", luaopen_cocos2d_RotateBy); - olua_require(L, "cc.MoveBy", luaopen_cocos2d_MoveBy); - olua_require(L, "cc.MoveTo", luaopen_cocos2d_MoveTo); - olua_require(L, "cc.MoveFrom", luaopen_cocos2d_MoveFrom); - olua_require(L, "cc.SkewTo", luaopen_cocos2d_SkewTo); - olua_require(L, "cc.SkewBy", luaopen_cocos2d_SkewBy); - olua_require(L, "cc.ResizeTo", luaopen_cocos2d_ResizeTo); - olua_require(L, "cc.ResizeBy", luaopen_cocos2d_ResizeBy); - olua_require(L, "cc.BezierBy", luaopen_cocos2d_BezierBy); - olua_require(L, "cc.BezierTo", luaopen_cocos2d_BezierTo); - olua_require(L, "cc.JumpBy", luaopen_cocos2d_JumpBy); - olua_require(L, "cc.JumpTo", luaopen_cocos2d_JumpTo); - olua_require(L, "cc.ScaleTo", luaopen_cocos2d_ScaleTo); - olua_require(L, "cc.ScaleBy", luaopen_cocos2d_ScaleBy); - olua_require(L, "cc.ScaleFrom", luaopen_cocos2d_ScaleFrom); - olua_require(L, "cc.Blink", luaopen_cocos2d_Blink); - olua_require(L, "cc.FadeTo", luaopen_cocos2d_FadeTo); - olua_require(L, "cc.FadeFrom", luaopen_cocos2d_FadeFrom); - olua_require(L, "cc.FadeIn", luaopen_cocos2d_FadeIn); - olua_require(L, "cc.FadeOut", luaopen_cocos2d_FadeOut); - olua_require(L, "cc.TintTo", luaopen_cocos2d_TintTo); - olua_require(L, "cc.TintBy", luaopen_cocos2d_TintBy); - olua_require(L, "cc.DelayTime", luaopen_cocos2d_DelayTime); - olua_require(L, "cc.ReverseTime", luaopen_cocos2d_ReverseTime); - olua_require(L, "cc.Animate", luaopen_cocos2d_Animate); - olua_require(L, "cc.TargetedAction", luaopen_cocos2d_TargetedAction); - olua_require(L, "cc.ActionFloat.ActionFloatCallback", luaopen_cocos2d_ActionFloat_ActionFloatCallback); - olua_require(L, "cc.ActionFloat", luaopen_cocos2d_ActionFloat); - olua_require(L, "cc.ProgressTo", luaopen_cocos2d_ProgressTo); - olua_require(L, "cc.ProgressFromTo", luaopen_cocos2d_ProgressFromTo); - olua_require(L, "cc.ActionEase", luaopen_cocos2d_ActionEase); - olua_require(L, "cc.EaseRateAction", luaopen_cocos2d_EaseRateAction); - olua_require(L, "cc.EaseExponentialIn", luaopen_cocos2d_EaseExponentialIn); - olua_require(L, "cc.EaseExponentialOut", luaopen_cocos2d_EaseExponentialOut); - olua_require(L, "cc.EaseExponentialInOut", luaopen_cocos2d_EaseExponentialInOut); - olua_require(L, "cc.EaseSineIn", luaopen_cocos2d_EaseSineIn); - olua_require(L, "cc.EaseSineOut", luaopen_cocos2d_EaseSineOut); - olua_require(L, "cc.EaseSineInOut", luaopen_cocos2d_EaseSineInOut); - olua_require(L, "cc.EaseBounceIn", luaopen_cocos2d_EaseBounceIn); - olua_require(L, "cc.EaseBounceOut", luaopen_cocos2d_EaseBounceOut); - olua_require(L, "cc.EaseBounceInOut", luaopen_cocos2d_EaseBounceInOut); - olua_require(L, "cc.EaseBackIn", luaopen_cocos2d_EaseBackIn); - olua_require(L, "cc.EaseBackOut", luaopen_cocos2d_EaseBackOut); - olua_require(L, "cc.EaseBackInOut", luaopen_cocos2d_EaseBackInOut); - olua_require(L, "cc.EaseQuadraticActionIn", luaopen_cocos2d_EaseQuadraticActionIn); - olua_require(L, "cc.EaseQuadraticActionOut", luaopen_cocos2d_EaseQuadraticActionOut); - olua_require(L, "cc.EaseQuadraticActionInOut", luaopen_cocos2d_EaseQuadraticActionInOut); - olua_require(L, "cc.EaseQuarticActionIn", luaopen_cocos2d_EaseQuarticActionIn); - olua_require(L, "cc.EaseQuarticActionOut", luaopen_cocos2d_EaseQuarticActionOut); - olua_require(L, "cc.EaseQuarticActionInOut", luaopen_cocos2d_EaseQuarticActionInOut); - olua_require(L, "cc.EaseQuinticActionIn", luaopen_cocos2d_EaseQuinticActionIn); - olua_require(L, "cc.EaseQuinticActionOut", luaopen_cocos2d_EaseQuinticActionOut); - olua_require(L, "cc.EaseQuinticActionInOut", luaopen_cocos2d_EaseQuinticActionInOut); - olua_require(L, "cc.EaseCircleActionIn", luaopen_cocos2d_EaseCircleActionIn); - olua_require(L, "cc.EaseCircleActionOut", luaopen_cocos2d_EaseCircleActionOut); - olua_require(L, "cc.EaseCircleActionInOut", luaopen_cocos2d_EaseCircleActionInOut); - olua_require(L, "cc.EaseCubicActionIn", luaopen_cocos2d_EaseCubicActionIn); - olua_require(L, "cc.EaseCubicActionOut", luaopen_cocos2d_EaseCubicActionOut); - olua_require(L, "cc.EaseCubicActionInOut", luaopen_cocos2d_EaseCubicActionInOut); - olua_require(L, "cc.EaseIn", luaopen_cocos2d_EaseIn); - olua_require(L, "cc.EaseOut", luaopen_cocos2d_EaseOut); - olua_require(L, "cc.EaseInOut", luaopen_cocos2d_EaseInOut); - olua_require(L, "cc.EaseElastic", luaopen_cocos2d_EaseElastic); - olua_require(L, "cc.EaseElasticIn", luaopen_cocos2d_EaseElasticIn); - olua_require(L, "cc.EaseElasticOut", luaopen_cocos2d_EaseElasticOut); - olua_require(L, "cc.EaseElasticInOut", luaopen_cocos2d_EaseElasticInOut); - olua_require(L, "cc.EaseBezierAction", luaopen_cocos2d_EaseBezierAction); - olua_require(L, "cc.PointArray", luaopen_cocos2d_PointArray); - olua_require(L, "cc.CardinalSplineTo", luaopen_cocos2d_CardinalSplineTo); - olua_require(L, "cc.CardinalSplineBy", luaopen_cocos2d_CardinalSplineBy); - olua_require(L, "cc.CatmullRomTo", luaopen_cocos2d_CatmullRomTo); - olua_require(L, "cc.CatmullRomBy", luaopen_cocos2d_CatmullRomBy); - olua_require(L, "cc.ActionInstant", luaopen_cocos2d_ActionInstant); - olua_require(L, "cc.Show", luaopen_cocos2d_Show); - olua_require(L, "cc.Hide", luaopen_cocos2d_Hide); - olua_require(L, "cc.ToggleVisibility", luaopen_cocos2d_ToggleVisibility); - olua_require(L, "cc.RemoveSelf", luaopen_cocos2d_RemoveSelf); - olua_require(L, "cc.FlipX", luaopen_cocos2d_FlipX); - olua_require(L, "cc.FlipY", luaopen_cocos2d_FlipY); - olua_require(L, "cc.Place", luaopen_cocos2d_Place); - olua_require(L, "cc.CallFunc", luaopen_cocos2d_CallFunc); - olua_require(L, "cc.ActionCamera", luaopen_cocos2d_ActionCamera); - olua_require(L, "cc.OrbitCamera", luaopen_cocos2d_OrbitCamera); - olua_require(L, "cc.GridBase", luaopen_cocos2d_GridBase); - olua_require(L, "cc.Grid3D", luaopen_cocos2d_Grid3D); - olua_require(L, "cc.TiledGrid3D", luaopen_cocos2d_TiledGrid3D); - olua_require(L, "cc.NodeGrid", luaopen_cocos2d_NodeGrid); - olua_require(L, "cc.GridAction", luaopen_cocos2d_GridAction); - olua_require(L, "cc.Grid3DAction", luaopen_cocos2d_Grid3DAction); - olua_require(L, "cc.TiledGrid3DAction", luaopen_cocos2d_TiledGrid3DAction); - olua_require(L, "cc.AccelDeccelAmplitude", luaopen_cocos2d_AccelDeccelAmplitude); - olua_require(L, "cc.AccelAmplitude", luaopen_cocos2d_AccelAmplitude); - olua_require(L, "cc.DeccelAmplitude", luaopen_cocos2d_DeccelAmplitude); - olua_require(L, "cc.StopGrid", luaopen_cocos2d_StopGrid); - olua_require(L, "cc.ReuseGrid", luaopen_cocos2d_ReuseGrid); - olua_require(L, "cc.Waves3D", luaopen_cocos2d_Waves3D); - olua_require(L, "cc.FlipX3D", luaopen_cocos2d_FlipX3D); - olua_require(L, "cc.FlipY3D", luaopen_cocos2d_FlipY3D); - olua_require(L, "cc.Lens3D", luaopen_cocos2d_Lens3D); - olua_require(L, "cc.Ripple3D", luaopen_cocos2d_Ripple3D); - olua_require(L, "cc.Shaky3D", luaopen_cocos2d_Shaky3D); - olua_require(L, "cc.Liquid", luaopen_cocos2d_Liquid); - olua_require(L, "cc.Waves", luaopen_cocos2d_Waves); - olua_require(L, "cc.Twirl", luaopen_cocos2d_Twirl); - olua_require(L, "cc.PageTurn3D", luaopen_cocos2d_PageTurn3D); - olua_require(L, "cc.ShakyTiles3D", luaopen_cocos2d_ShakyTiles3D); - olua_require(L, "cc.ShatteredTiles3D", luaopen_cocos2d_ShatteredTiles3D); - olua_require(L, "cc.ShuffleTiles", luaopen_cocos2d_ShuffleTiles); - olua_require(L, "cc.FadeOutTRTiles", luaopen_cocos2d_FadeOutTRTiles); - olua_require(L, "cc.FadeOutBLTiles", luaopen_cocos2d_FadeOutBLTiles); - olua_require(L, "cc.FadeOutUpTiles", luaopen_cocos2d_FadeOutUpTiles); - olua_require(L, "cc.FadeOutDownTiles", luaopen_cocos2d_FadeOutDownTiles); - olua_require(L, "cc.TurnOffTiles", luaopen_cocos2d_TurnOffTiles); - olua_require(L, "cc.WavesTiles3D", luaopen_cocos2d_WavesTiles3D); - olua_require(L, "cc.JumpTiles3D", luaopen_cocos2d_JumpTiles3D); - olua_require(L, "cc.SplitRows", luaopen_cocos2d_SplitRows); - olua_require(L, "cc.SplitCols", luaopen_cocos2d_SplitCols); - olua_require(L, "cc.LuaTweenNode", luaopen_cocos2d_LuaTweenNode); + olua_require(L, "cc.tweenfunc.TweenType", _olua_cls_cc_tweenfunc_TweenType); + olua_require(L, "cc.Action", _olua_cls_cc_Action); + olua_require(L, "cc.ActionTweenDelegate", _olua_cls_cc_ActionTweenDelegate); + olua_require(L, "cc.FiniteTimeAction", _olua_cls_cc_FiniteTimeAction); + olua_require(L, "cc.Speed", _olua_cls_cc_Speed); + olua_require(L, "cc.Follow", _olua_cls_cc_Follow); + olua_require(L, "cc.tweenfunc", _olua_cls_cc_tweenfunc); + olua_require(L, "cc.ActionInterval", _olua_cls_cc_ActionInterval); + olua_require(L, "cc.ActionTween", _olua_cls_cc_ActionTween); + olua_require(L, "cc.Sequence", _olua_cls_cc_Sequence); + olua_require(L, "cc.Repeat", _olua_cls_cc_Repeat); + olua_require(L, "cc.RepeatForever", _olua_cls_cc_RepeatForever); + olua_require(L, "cc.Spawn", _olua_cls_cc_Spawn); + olua_require(L, "cc.RotateTo", _olua_cls_cc_RotateTo); + olua_require(L, "cc.RotateFrom", _olua_cls_cc_RotateFrom); + olua_require(L, "cc.RotateBy", _olua_cls_cc_RotateBy); + olua_require(L, "cc.MoveBy", _olua_cls_cc_MoveBy); + olua_require(L, "cc.MoveTo", _olua_cls_cc_MoveTo); + olua_require(L, "cc.MoveFrom", _olua_cls_cc_MoveFrom); + olua_require(L, "cc.SkewTo", _olua_cls_cc_SkewTo); + olua_require(L, "cc.SkewBy", _olua_cls_cc_SkewBy); + olua_require(L, "cc.ResizeTo", _olua_cls_cc_ResizeTo); + olua_require(L, "cc.ResizeBy", _olua_cls_cc_ResizeBy); + olua_require(L, "cc.BezierBy", _olua_cls_cc_BezierBy); + olua_require(L, "cc.BezierTo", _olua_cls_cc_BezierTo); + olua_require(L, "cc.JumpBy", _olua_cls_cc_JumpBy); + olua_require(L, "cc.JumpTo", _olua_cls_cc_JumpTo); + olua_require(L, "cc.ScaleTo", _olua_cls_cc_ScaleTo); + olua_require(L, "cc.ScaleBy", _olua_cls_cc_ScaleBy); + olua_require(L, "cc.ScaleFrom", _olua_cls_cc_ScaleFrom); + olua_require(L, "cc.Blink", _olua_cls_cc_Blink); + olua_require(L, "cc.FadeTo", _olua_cls_cc_FadeTo); + olua_require(L, "cc.FadeFrom", _olua_cls_cc_FadeFrom); + olua_require(L, "cc.FadeIn", _olua_cls_cc_FadeIn); + olua_require(L, "cc.FadeOut", _olua_cls_cc_FadeOut); + olua_require(L, "cc.TintTo", _olua_cls_cc_TintTo); + olua_require(L, "cc.TintBy", _olua_cls_cc_TintBy); + olua_require(L, "cc.DelayTime", _olua_cls_cc_DelayTime); + olua_require(L, "cc.ReverseTime", _olua_cls_cc_ReverseTime); + olua_require(L, "cc.Animate", _olua_cls_cc_Animate); + olua_require(L, "cc.TargetedAction", _olua_cls_cc_TargetedAction); + olua_require(L, "cc.ActionFloat.ActionFloatCallback", _olua_cls_cc_ActionFloat_ActionFloatCallback); + olua_require(L, "cc.ActionFloat", _olua_cls_cc_ActionFloat); + olua_require(L, "cc.ProgressTo", _olua_cls_cc_ProgressTo); + olua_require(L, "cc.ProgressFromTo", _olua_cls_cc_ProgressFromTo); + olua_require(L, "cc.ActionEase", _olua_cls_cc_ActionEase); + olua_require(L, "cc.EaseRateAction", _olua_cls_cc_EaseRateAction); + olua_require(L, "cc.EaseExponentialIn", _olua_cls_cc_EaseExponentialIn); + olua_require(L, "cc.EaseExponentialOut", _olua_cls_cc_EaseExponentialOut); + olua_require(L, "cc.EaseExponentialInOut", _olua_cls_cc_EaseExponentialInOut); + olua_require(L, "cc.EaseSineIn", _olua_cls_cc_EaseSineIn); + olua_require(L, "cc.EaseSineOut", _olua_cls_cc_EaseSineOut); + olua_require(L, "cc.EaseSineInOut", _olua_cls_cc_EaseSineInOut); + olua_require(L, "cc.EaseBounceIn", _olua_cls_cc_EaseBounceIn); + olua_require(L, "cc.EaseBounceOut", _olua_cls_cc_EaseBounceOut); + olua_require(L, "cc.EaseBounceInOut", _olua_cls_cc_EaseBounceInOut); + olua_require(L, "cc.EaseBackIn", _olua_cls_cc_EaseBackIn); + olua_require(L, "cc.EaseBackOut", _olua_cls_cc_EaseBackOut); + olua_require(L, "cc.EaseBackInOut", _olua_cls_cc_EaseBackInOut); + olua_require(L, "cc.EaseQuadraticActionIn", _olua_cls_cc_EaseQuadraticActionIn); + olua_require(L, "cc.EaseQuadraticActionOut", _olua_cls_cc_EaseQuadraticActionOut); + olua_require(L, "cc.EaseQuadraticActionInOut", _olua_cls_cc_EaseQuadraticActionInOut); + olua_require(L, "cc.EaseQuarticActionIn", _olua_cls_cc_EaseQuarticActionIn); + olua_require(L, "cc.EaseQuarticActionOut", _olua_cls_cc_EaseQuarticActionOut); + olua_require(L, "cc.EaseQuarticActionInOut", _olua_cls_cc_EaseQuarticActionInOut); + olua_require(L, "cc.EaseQuinticActionIn", _olua_cls_cc_EaseQuinticActionIn); + olua_require(L, "cc.EaseQuinticActionOut", _olua_cls_cc_EaseQuinticActionOut); + olua_require(L, "cc.EaseQuinticActionInOut", _olua_cls_cc_EaseQuinticActionInOut); + olua_require(L, "cc.EaseCircleActionIn", _olua_cls_cc_EaseCircleActionIn); + olua_require(L, "cc.EaseCircleActionOut", _olua_cls_cc_EaseCircleActionOut); + olua_require(L, "cc.EaseCircleActionInOut", _olua_cls_cc_EaseCircleActionInOut); + olua_require(L, "cc.EaseCubicActionIn", _olua_cls_cc_EaseCubicActionIn); + olua_require(L, "cc.EaseCubicActionOut", _olua_cls_cc_EaseCubicActionOut); + olua_require(L, "cc.EaseCubicActionInOut", _olua_cls_cc_EaseCubicActionInOut); + olua_require(L, "cc.EaseIn", _olua_cls_cc_EaseIn); + olua_require(L, "cc.EaseOut", _olua_cls_cc_EaseOut); + olua_require(L, "cc.EaseInOut", _olua_cls_cc_EaseInOut); + olua_require(L, "cc.EaseElastic", _olua_cls_cc_EaseElastic); + olua_require(L, "cc.EaseElasticIn", _olua_cls_cc_EaseElasticIn); + olua_require(L, "cc.EaseElasticOut", _olua_cls_cc_EaseElasticOut); + olua_require(L, "cc.EaseElasticInOut", _olua_cls_cc_EaseElasticInOut); + olua_require(L, "cc.EaseBezierAction", _olua_cls_cc_EaseBezierAction); + olua_require(L, "cc.PointArray", _olua_cls_cc_PointArray); + olua_require(L, "cc.CardinalSplineTo", _olua_cls_cc_CardinalSplineTo); + olua_require(L, "cc.CardinalSplineBy", _olua_cls_cc_CardinalSplineBy); + olua_require(L, "cc.CatmullRomTo", _olua_cls_cc_CatmullRomTo); + olua_require(L, "cc.CatmullRomBy", _olua_cls_cc_CatmullRomBy); + olua_require(L, "cc.ActionInstant", _olua_cls_cc_ActionInstant); + olua_require(L, "cc.Show", _olua_cls_cc_Show); + olua_require(L, "cc.Hide", _olua_cls_cc_Hide); + olua_require(L, "cc.ToggleVisibility", _olua_cls_cc_ToggleVisibility); + olua_require(L, "cc.RemoveSelf", _olua_cls_cc_RemoveSelf); + olua_require(L, "cc.FlipX", _olua_cls_cc_FlipX); + olua_require(L, "cc.FlipY", _olua_cls_cc_FlipY); + olua_require(L, "cc.Place", _olua_cls_cc_Place); + olua_require(L, "cc.CallFunc", _olua_cls_cc_CallFunc); + olua_require(L, "cc.ActionCamera", _olua_cls_cc_ActionCamera); + olua_require(L, "cc.OrbitCamera", _olua_cls_cc_OrbitCamera); + olua_require(L, "cc.GridBase", _olua_cls_cc_GridBase); + olua_require(L, "cc.Grid3D", _olua_cls_cc_Grid3D); + olua_require(L, "cc.TiledGrid3D", _olua_cls_cc_TiledGrid3D); + olua_require(L, "cc.NodeGrid", _olua_cls_cc_NodeGrid); + olua_require(L, "cc.GridAction", _olua_cls_cc_GridAction); + olua_require(L, "cc.Grid3DAction", _olua_cls_cc_Grid3DAction); + olua_require(L, "cc.TiledGrid3DAction", _olua_cls_cc_TiledGrid3DAction); + olua_require(L, "cc.AccelDeccelAmplitude", _olua_cls_cc_AccelDeccelAmplitude); + olua_require(L, "cc.AccelAmplitude", _olua_cls_cc_AccelAmplitude); + olua_require(L, "cc.DeccelAmplitude", _olua_cls_cc_DeccelAmplitude); + olua_require(L, "cc.StopGrid", _olua_cls_cc_StopGrid); + olua_require(L, "cc.ReuseGrid", _olua_cls_cc_ReuseGrid); + olua_require(L, "cc.Waves3D", _olua_cls_cc_Waves3D); + olua_require(L, "cc.FlipX3D", _olua_cls_cc_FlipX3D); + olua_require(L, "cc.FlipY3D", _olua_cls_cc_FlipY3D); + olua_require(L, "cc.Lens3D", _olua_cls_cc_Lens3D); + olua_require(L, "cc.Ripple3D", _olua_cls_cc_Ripple3D); + olua_require(L, "cc.Shaky3D", _olua_cls_cc_Shaky3D); + olua_require(L, "cc.Liquid", _olua_cls_cc_Liquid); + olua_require(L, "cc.Waves", _olua_cls_cc_Waves); + olua_require(L, "cc.Twirl", _olua_cls_cc_Twirl); + olua_require(L, "cc.PageTurn3D", _olua_cls_cc_PageTurn3D); + olua_require(L, "cc.ShakyTiles3D", _olua_cls_cc_ShakyTiles3D); + olua_require(L, "cc.ShatteredTiles3D", _olua_cls_cc_ShatteredTiles3D); + olua_require(L, "cc.ShuffleTiles", _olua_cls_cc_ShuffleTiles); + olua_require(L, "cc.FadeOutTRTiles", _olua_cls_cc_FadeOutTRTiles); + olua_require(L, "cc.FadeOutBLTiles", _olua_cls_cc_FadeOutBLTiles); + olua_require(L, "cc.FadeOutUpTiles", _olua_cls_cc_FadeOutUpTiles); + olua_require(L, "cc.FadeOutDownTiles", _olua_cls_cc_FadeOutDownTiles); + olua_require(L, "cc.TurnOffTiles", _olua_cls_cc_TurnOffTiles); + olua_require(L, "cc.WavesTiles3D", _olua_cls_cc_WavesTiles3D); + olua_require(L, "cc.JumpTiles3D", _olua_cls_cc_JumpTiles3D); + olua_require(L, "cc.SplitRows", _olua_cls_cc_SplitRows); + olua_require(L, "cc.SplitCols", _olua_cls_cc_SplitCols); + olua_require(L, "cc.LuaTweenNode", _olua_cls_cc_LuaTweenNode); return 0; } diff --git a/frameworks/cclua/src/lua-bindings/lua_cocos2d_action.h b/frameworks/cclua/src/lua-bindings/lua_cocos2d_action.h index d1177512..e1ac3123 100644 --- a/frameworks/cclua/src/lua-bindings/lua_cocos2d_action.h +++ b/frameworks/cclua/src/lua-bindings/lua_cocos2d_action.h @@ -1,5 +1,5 @@ // -// AUTO BUILD, DON'T MODIFY! +// AUTO GENERATED, DO NOT MODIFY! // #ifndef __AUTO_GEN_LUA_COCOS2D_ACTION_H__ #define __AUTO_GEN_LUA_COCOS2D_ACTION_H__ diff --git a/frameworks/cclua/src/lua-bindings/lua_cocos2d_backend.cpp b/frameworks/cclua/src/lua-bindings/lua_cocos2d_backend.cpp index 5572e92d..c8d5b0a3 100644 --- a/frameworks/cclua/src/lua-bindings/lua_cocos2d_backend.cpp +++ b/frameworks/cclua/src/lua-bindings/lua_cocos2d_backend.cpp @@ -1,36 +1,12 @@ // -// AUTO BUILD, DON'T MODIFY! +// AUTO GENERATED, DO NOT MODIFY! // #include "lua_cocos2d_backend.h" #include "lua-bindings/lua_cocos2d_types.h" #include "lua-bindings/lua_conv_manual.h" #include "cocos2d.h" -static int _cocos2d_backend_UniformLocation___call(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::backend::UniformLocation ret; - - luaL_checktype(L, 2, LUA_TTABLE); - - cocos2d::backend::ShaderStage arg1 = (cocos2d::backend::ShaderStage)0; /** shaderStage */ - - olua_getfield(L, 2, "shaderStage"); - if (!olua_isnoneornil(L, -1)) { - olua_check_enum(L, -1, &arg1); - ret.shaderStage = arg1; - } - lua_pop(L, 1); - - olua_pushcopy_object(L, ret, "ccb.UniformLocation"); - - olua_endinvoke(L); - - return 1; -} - -static int _cocos2d_backend_UniformLocation___gc(lua_State *L) +static int _olua_fun_cocos2d_backend_UniformLocation___gc(lua_State *L) { olua_startinvoke(L); @@ -42,7 +18,7 @@ static int _cocos2d_backend_UniformLocation___gc(lua_State *L) return 0; } -static int _cocos2d_backend_UniformLocation___olua_move(lua_State *L) +static int _olua_fun_cocos2d_backend_UniformLocation___olua_move(lua_State *L) { olua_startinvoke(L); @@ -54,11 +30,11 @@ static int _cocos2d_backend_UniformLocation___olua_move(lua_State *L) return 1; } -static int _cocos2d_backend_UniformLocation_new(lua_State *L) +static int _olua_fun_cocos2d_backend_UniformLocation_new(lua_State *L) { olua_startinvoke(L); - // UniformLocation() + // cocos2d::backend::UniformLocation() cocos2d::backend::UniformLocation *ret = new cocos2d::backend::UniformLocation(); int num_ret = olua_push_object(L, ret, "ccb.UniformLocation"); olua_postnew(L, ret); @@ -68,7 +44,7 @@ static int _cocos2d_backend_UniformLocation_new(lua_State *L) return num_ret; } -static int _cocos2d_backend_UniformLocation_reset(lua_State *L) +static int _olua_fun_cocos2d_backend_UniformLocation_reset(lua_State *L) { olua_startinvoke(L); @@ -84,7 +60,7 @@ static int _cocos2d_backend_UniformLocation_reset(lua_State *L) return 0; } -static int _cocos2d_backend_UniformLocation_get_shaderStage(lua_State *L) +static int _olua_fun_cocos2d_backend_UniformLocation_shaderStage$1(lua_State *L) { olua_startinvoke(L); @@ -92,7 +68,7 @@ static int _cocos2d_backend_UniformLocation_get_shaderStage(lua_State *L) olua_to_object(L, 1, &self, "ccb.UniformLocation"); - // @optional cocos2d::backend::ShaderStage shaderStage + // cocos2d::backend::ShaderStage shaderStage cocos2d::backend::ShaderStage ret = self->shaderStage; int num_ret = olua_push_enum(L, ret); @@ -101,7 +77,7 @@ static int _cocos2d_backend_UniformLocation_get_shaderStage(lua_State *L) return num_ret; } -static int _cocos2d_backend_UniformLocation_set_shaderStage(lua_State *L) +static int _olua_fun_cocos2d_backend_UniformLocation_shaderStage$2(lua_State *L) { olua_startinvoke(L); @@ -111,7 +87,7 @@ static int _cocos2d_backend_UniformLocation_set_shaderStage(lua_State *L) olua_to_object(L, 1, &self, "ccb.UniformLocation"); olua_check_enum(L, 2, &arg1); - // @optional cocos2d::backend::ShaderStage shaderStage + // cocos2d::backend::ShaderStage shaderStage self->shaderStage = arg1; olua_endinvoke(L); @@ -119,23 +95,51 @@ static int _cocos2d_backend_UniformLocation_set_shaderStage(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_backend_UniformLocation(lua_State *L) +static int _olua_fun_cocos2d_backend_UniformLocation_shaderStage(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // cocos2d::backend::ShaderStage shaderStage + return _olua_fun_cocos2d_backend_UniformLocation_shaderStage$1(L); + } + + if (num_args == 1) { + // if ((olua_is_enum(L, 2))) { + // cocos2d::backend::ShaderStage shaderStage + return _olua_fun_cocos2d_backend_UniformLocation_shaderStage$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::backend::UniformLocation::shaderStage' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_cls_ccb_UniformLocation(lua_State *L) { oluacls_class(L, "ccb.UniformLocation"); - oluacls_func(L, "__call", _cocos2d_backend_UniformLocation___call); - oluacls_func(L, "__gc", _cocos2d_backend_UniformLocation___gc); - oluacls_func(L, "__olua_move", _cocos2d_backend_UniformLocation___olua_move); - oluacls_func(L, "new", _cocos2d_backend_UniformLocation_new); - oluacls_func(L, "reset", _cocos2d_backend_UniformLocation_reset); - oluacls_prop(L, "shaderStage", _cocos2d_backend_UniformLocation_get_shaderStage, _cocos2d_backend_UniformLocation_set_shaderStage); + oluacls_func(L, "__gc", _olua_fun_cocos2d_backend_UniformLocation___gc); + oluacls_func(L, "__olua_move", _olua_fun_cocos2d_backend_UniformLocation___olua_move); + oluacls_func(L, "new", _olua_fun_cocos2d_backend_UniformLocation_new); + oluacls_func(L, "reset", _olua_fun_cocos2d_backend_UniformLocation_reset); + oluacls_prop(L, "shaderStage", _olua_fun_cocos2d_backend_UniformLocation_shaderStage, _olua_fun_cocos2d_backend_UniformLocation_shaderStage); return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_backend_BufferUsage(lua_State *L) +OLUA_LIB int luaopen_ccb_UniformLocation(lua_State *L) +{ + olua_require(L, "cocos2d_backend", luaopen_cocos2d_backend); + if (!olua_getclass(L, "ccb.UniformLocation")) { + luaL_error(L, "class not found: cocos2d::backend::UniformLocation"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_ccb_BufferUsage(lua_State *L) { oluacls_class(L, "ccb.BufferUsage"); oluacls_func(L, "__index", olua_indexerror); @@ -145,10 +149,19 @@ OLUA_LIB int luaopen_cocos2d_backend_BufferUsage(lua_State *L) return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_backend_BufferType(lua_State *L) +OLUA_LIB int luaopen_ccb_BufferUsage(lua_State *L) +{ + olua_require(L, "cocos2d_backend", luaopen_cocos2d_backend); + if (!olua_getclass(L, "ccb.BufferUsage")) { + luaL_error(L, "class not found: cocos2d::backend::BufferUsage"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_ccb_BufferType(lua_State *L) { oluacls_class(L, "ccb.BufferType"); oluacls_func(L, "__index", olua_indexerror); @@ -158,10 +171,19 @@ OLUA_LIB int luaopen_cocos2d_backend_BufferType(lua_State *L) return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_backend_ShaderStage(lua_State *L) +OLUA_LIB int luaopen_ccb_BufferType(lua_State *L) +{ + olua_require(L, "cocos2d_backend", luaopen_cocos2d_backend); + if (!olua_getclass(L, "ccb.BufferType")) { + luaL_error(L, "class not found: cocos2d::backend::BufferType"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_ccb_ShaderStage(lua_State *L) { oluacls_class(L, "ccb.ShaderStage"); oluacls_func(L, "__index", olua_indexerror); @@ -172,10 +194,19 @@ OLUA_LIB int luaopen_cocos2d_backend_ShaderStage(lua_State *L) return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_backend_VertexFormat(lua_State *L) +OLUA_LIB int luaopen_ccb_ShaderStage(lua_State *L) +{ + olua_require(L, "cocos2d_backend", luaopen_cocos2d_backend); + if (!olua_getclass(L, "ccb.ShaderStage")) { + luaL_error(L, "class not found: cocos2d::backend::ShaderStage"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_ccb_VertexFormat(lua_State *L) { oluacls_class(L, "ccb.VertexFormat"); oluacls_func(L, "__index", olua_indexerror); @@ -194,10 +225,19 @@ OLUA_LIB int luaopen_cocos2d_backend_VertexFormat(lua_State *L) return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_backend_PixelFormat(lua_State *L) +OLUA_LIB int luaopen_ccb_VertexFormat(lua_State *L) +{ + olua_require(L, "cocos2d_backend", luaopen_cocos2d_backend); + if (!olua_getclass(L, "ccb.VertexFormat")) { + luaL_error(L, "class not found: cocos2d::backend::VertexFormat"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_ccb_PixelFormat(lua_State *L) { oluacls_class(L, "ccb.PixelFormat"); oluacls_func(L, "__index", olua_indexerror); @@ -232,10 +272,19 @@ OLUA_LIB int luaopen_cocos2d_backend_PixelFormat(lua_State *L) return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_backend_TextureUsage(lua_State *L) +OLUA_LIB int luaopen_ccb_PixelFormat(lua_State *L) +{ + olua_require(L, "cocos2d_backend", luaopen_cocos2d_backend); + if (!olua_getclass(L, "ccb.PixelFormat")) { + luaL_error(L, "class not found: cocos2d::backend::PixelFormat"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_ccb_TextureUsage(lua_State *L) { oluacls_class(L, "ccb.TextureUsage"); oluacls_func(L, "__index", olua_indexerror); @@ -246,10 +295,19 @@ OLUA_LIB int luaopen_cocos2d_backend_TextureUsage(lua_State *L) return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_backend_IndexFormat(lua_State *L) +OLUA_LIB int luaopen_ccb_TextureUsage(lua_State *L) +{ + olua_require(L, "cocos2d_backend", luaopen_cocos2d_backend); + if (!olua_getclass(L, "ccb.TextureUsage")) { + luaL_error(L, "class not found: cocos2d::backend::TextureUsage"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_ccb_IndexFormat(lua_State *L) { oluacls_class(L, "ccb.IndexFormat"); oluacls_func(L, "__index", olua_indexerror); @@ -259,10 +317,19 @@ OLUA_LIB int luaopen_cocos2d_backend_IndexFormat(lua_State *L) return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_backend_VertexStepMode(lua_State *L) +OLUA_LIB int luaopen_ccb_IndexFormat(lua_State *L) +{ + olua_require(L, "cocos2d_backend", luaopen_cocos2d_backend); + if (!olua_getclass(L, "ccb.IndexFormat")) { + luaL_error(L, "class not found: cocos2d::backend::IndexFormat"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_ccb_VertexStepMode(lua_State *L) { oluacls_class(L, "ccb.VertexStepMode"); oluacls_func(L, "__index", olua_indexerror); @@ -272,10 +339,19 @@ OLUA_LIB int luaopen_cocos2d_backend_VertexStepMode(lua_State *L) return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_backend_PrimitiveType(lua_State *L) +OLUA_LIB int luaopen_ccb_VertexStepMode(lua_State *L) +{ + olua_require(L, "cocos2d_backend", luaopen_cocos2d_backend); + if (!olua_getclass(L, "ccb.VertexStepMode")) { + luaL_error(L, "class not found: cocos2d::backend::VertexStepMode"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_ccb_PrimitiveType(lua_State *L) { oluacls_class(L, "ccb.PrimitiveType"); oluacls_func(L, "__index", olua_indexerror); @@ -288,10 +364,19 @@ OLUA_LIB int luaopen_cocos2d_backend_PrimitiveType(lua_State *L) return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_backend_TextureType(lua_State *L) +OLUA_LIB int luaopen_ccb_PrimitiveType(lua_State *L) +{ + olua_require(L, "cocos2d_backend", luaopen_cocos2d_backend); + if (!olua_getclass(L, "ccb.PrimitiveType")) { + luaL_error(L, "class not found: cocos2d::backend::PrimitiveType"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_ccb_TextureType(lua_State *L) { oluacls_class(L, "ccb.TextureType"); oluacls_func(L, "__index", olua_indexerror); @@ -301,10 +386,19 @@ OLUA_LIB int luaopen_cocos2d_backend_TextureType(lua_State *L) return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_backend_SamplerAddressMode(lua_State *L) +OLUA_LIB int luaopen_ccb_TextureType(lua_State *L) +{ + olua_require(L, "cocos2d_backend", luaopen_cocos2d_backend); + if (!olua_getclass(L, "ccb.TextureType")) { + luaL_error(L, "class not found: cocos2d::backend::TextureType"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_ccb_SamplerAddressMode(lua_State *L) { oluacls_class(L, "ccb.SamplerAddressMode"); oluacls_func(L, "__index", olua_indexerror); @@ -316,10 +410,19 @@ OLUA_LIB int luaopen_cocos2d_backend_SamplerAddressMode(lua_State *L) return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_backend_SamplerFilter(lua_State *L) +OLUA_LIB int luaopen_ccb_SamplerAddressMode(lua_State *L) +{ + olua_require(L, "cocos2d_backend", luaopen_cocos2d_backend); + if (!olua_getclass(L, "ccb.SamplerAddressMode")) { + luaL_error(L, "class not found: cocos2d::backend::SamplerAddressMode"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_ccb_SamplerFilter(lua_State *L) { oluacls_class(L, "ccb.SamplerFilter"); oluacls_func(L, "__index", olua_indexerror); @@ -334,10 +437,19 @@ OLUA_LIB int luaopen_cocos2d_backend_SamplerFilter(lua_State *L) return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_backend_StencilOperation(lua_State *L) +OLUA_LIB int luaopen_ccb_SamplerFilter(lua_State *L) +{ + olua_require(L, "cocos2d_backend", luaopen_cocos2d_backend); + if (!olua_getclass(L, "ccb.SamplerFilter")) { + luaL_error(L, "class not found: cocos2d::backend::SamplerFilter"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_ccb_StencilOperation(lua_State *L) { oluacls_class(L, "ccb.StencilOperation"); oluacls_func(L, "__index", olua_indexerror); @@ -351,10 +463,19 @@ OLUA_LIB int luaopen_cocos2d_backend_StencilOperation(lua_State *L) return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_backend_CompareFunction(lua_State *L) +OLUA_LIB int luaopen_ccb_StencilOperation(lua_State *L) +{ + olua_require(L, "cocos2d_backend", luaopen_cocos2d_backend); + if (!olua_getclass(L, "ccb.StencilOperation")) { + luaL_error(L, "class not found: cocos2d::backend::StencilOperation"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_ccb_CompareFunction(lua_State *L) { oluacls_class(L, "ccb.CompareFunction"); oluacls_func(L, "__index", olua_indexerror); @@ -370,10 +491,19 @@ OLUA_LIB int luaopen_cocos2d_backend_CompareFunction(lua_State *L) return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_backend_BlendOperation(lua_State *L) +OLUA_LIB int luaopen_ccb_CompareFunction(lua_State *L) +{ + olua_require(L, "cocos2d_backend", luaopen_cocos2d_backend); + if (!olua_getclass(L, "ccb.CompareFunction")) { + luaL_error(L, "class not found: cocos2d::backend::CompareFunction"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_ccb_BlendOperation(lua_State *L) { oluacls_class(L, "ccb.BlendOperation"); oluacls_func(L, "__index", olua_indexerror); @@ -384,10 +514,19 @@ OLUA_LIB int luaopen_cocos2d_backend_BlendOperation(lua_State *L) return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_backend_BlendFactor(lua_State *L) +OLUA_LIB int luaopen_ccb_BlendOperation(lua_State *L) +{ + olua_require(L, "cocos2d_backend", luaopen_cocos2d_backend); + if (!olua_getclass(L, "ccb.BlendOperation")) { + luaL_error(L, "class not found: cocos2d::backend::BlendOperation"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_ccb_BlendFactor(lua_State *L) { oluacls_class(L, "ccb.BlendFactor"); oluacls_func(L, "__index", olua_indexerror); @@ -409,10 +548,19 @@ OLUA_LIB int luaopen_cocos2d_backend_BlendFactor(lua_State *L) return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_backend_ColorWriteMask(lua_State *L) +OLUA_LIB int luaopen_ccb_BlendFactor(lua_State *L) +{ + olua_require(L, "cocos2d_backend", luaopen_cocos2d_backend); + if (!olua_getclass(L, "ccb.BlendFactor")) { + luaL_error(L, "class not found: cocos2d::backend::BlendFactor"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_ccb_ColorWriteMask(lua_State *L) { oluacls_class(L, "ccb.ColorWriteMask"); oluacls_func(L, "__index", olua_indexerror); @@ -426,10 +574,19 @@ OLUA_LIB int luaopen_cocos2d_backend_ColorWriteMask(lua_State *L) return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_backend_CullMode(lua_State *L) +OLUA_LIB int luaopen_ccb_ColorWriteMask(lua_State *L) +{ + olua_require(L, "cocos2d_backend", luaopen_cocos2d_backend); + if (!olua_getclass(L, "ccb.ColorWriteMask")) { + luaL_error(L, "class not found: cocos2d::backend::ColorWriteMask"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_ccb_CullMode(lua_State *L) { oluacls_class(L, "ccb.CullMode"); oluacls_func(L, "__index", olua_indexerror); @@ -440,10 +597,19 @@ OLUA_LIB int luaopen_cocos2d_backend_CullMode(lua_State *L) return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_backend_Winding(lua_State *L) +OLUA_LIB int luaopen_ccb_CullMode(lua_State *L) +{ + olua_require(L, "cocos2d_backend", luaopen_cocos2d_backend); + if (!olua_getclass(L, "ccb.CullMode")) { + luaL_error(L, "class not found: cocos2d::backend::CullMode"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_ccb_Winding(lua_State *L) { oluacls_class(L, "ccb.Winding"); oluacls_func(L, "__index", olua_indexerror); @@ -453,10 +619,19 @@ OLUA_LIB int luaopen_cocos2d_backend_Winding(lua_State *L) return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_backend_TextureCubeFace(lua_State *L) +OLUA_LIB int luaopen_ccb_Winding(lua_State *L) +{ + olua_require(L, "cocos2d_backend", luaopen_cocos2d_backend); + if (!olua_getclass(L, "ccb.Winding")) { + luaL_error(L, "class not found: cocos2d::backend::Winding"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_ccb_TextureCubeFace(lua_State *L) { oluacls_class(L, "ccb.TextureCubeFace"); oluacls_func(L, "__index", olua_indexerror); @@ -470,10 +645,19 @@ OLUA_LIB int luaopen_cocos2d_backend_TextureCubeFace(lua_State *L) return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_backend_ProgramType(lua_State *L) +OLUA_LIB int luaopen_ccb_TextureCubeFace(lua_State *L) +{ + olua_require(L, "cocos2d_backend", luaopen_cocos2d_backend); + if (!olua_getclass(L, "ccb.TextureCubeFace")) { + luaL_error(L, "class not found: cocos2d::backend::TextureCubeFace"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_ccb_ProgramType(lua_State *L) { oluacls_class(L, "ccb.ProgramType"); oluacls_func(L, "__index", olua_indexerror); @@ -512,10 +696,19 @@ OLUA_LIB int luaopen_cocos2d_backend_ProgramType(lua_State *L) return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_backend_Uniform(lua_State *L) +OLUA_LIB int luaopen_ccb_ProgramType(lua_State *L) +{ + olua_require(L, "cocos2d_backend", luaopen_cocos2d_backend); + if (!olua_getclass(L, "ccb.ProgramType")) { + luaL_error(L, "class not found: cocos2d::backend::ProgramType"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_ccb_Uniform(lua_State *L) { oluacls_class(L, "ccb.Uniform"); oluacls_func(L, "__index", olua_indexerror); @@ -532,10 +725,19 @@ OLUA_LIB int luaopen_cocos2d_backend_Uniform(lua_State *L) return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_backend_Attribute(lua_State *L) +OLUA_LIB int luaopen_ccb_Uniform(lua_State *L) +{ + olua_require(L, "cocos2d_backend", luaopen_cocos2d_backend); + if (!olua_getclass(L, "ccb.Uniform")) { + luaL_error(L, "class not found: cocos2d::backend::Uniform"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_ccb_Attribute(lua_State *L) { oluacls_class(L, "ccb.Attribute"); oluacls_func(L, "__index", olua_indexerror); @@ -550,10 +752,19 @@ OLUA_LIB int luaopen_cocos2d_backend_Attribute(lua_State *L) return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_backend_FeatureType(lua_State *L) +OLUA_LIB int luaopen_ccb_Attribute(lua_State *L) +{ + olua_require(L, "cocos2d_backend", luaopen_cocos2d_backend); + if (!olua_getclass(L, "ccb.Attribute")) { + luaL_error(L, "class not found: cocos2d::backend::Attribute"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_ccb_FeatureType(lua_State *L) { oluacls_class(L, "ccb.FeatureType"); oluacls_func(L, "__index", olua_indexerror); @@ -572,9 +783,19 @@ OLUA_LIB int luaopen_cocos2d_backend_FeatureType(lua_State *L) return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccb_FeatureType(lua_State *L) +{ + olua_require(L, "cocos2d_backend", luaopen_cocos2d_backend); + if (!olua_getclass(L, "ccb.FeatureType")) { + luaL_error(L, "class not found: cocos2d::backend::FeatureType"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_backend_Buffer_getSize(lua_State *L) +static int _olua_fun_cocos2d_backend_Buffer_getSize(lua_State *L) { olua_startinvoke(L); @@ -591,7 +812,7 @@ static int _cocos2d_backend_Buffer_getSize(lua_State *L) return num_ret; } -static int _cocos2d_backend_Buffer_updateData(lua_State *L) +static int _olua_fun_cocos2d_backend_Buffer_updateData(lua_State *L) { olua_startinvoke(L); @@ -611,7 +832,7 @@ static int _cocos2d_backend_Buffer_updateData(lua_State *L) return 0; } -static int _cocos2d_backend_Buffer_updateSubData(lua_State *L) +static int _olua_fun_cocos2d_backend_Buffer_updateSubData(lua_State *L) { olua_startinvoke(L); @@ -633,7 +854,7 @@ static int _cocos2d_backend_Buffer_updateSubData(lua_State *L) return 0; } -static int _cocos2d_backend_Buffer_usingDefaultStoredData(lua_State *L) +static int _olua_fun_cocos2d_backend_Buffer_usingDefaultStoredData(lua_State *L) { olua_startinvoke(L); @@ -651,39 +872,66 @@ static int _cocos2d_backend_Buffer_usingDefaultStoredData(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_backend_Buffer(lua_State *L) +static int _olua_cls_ccb_Buffer(lua_State *L) { oluacls_class(L, "ccb.Buffer"); - oluacls_func(L, "getSize", _cocos2d_backend_Buffer_getSize); - oluacls_func(L, "updateData", _cocos2d_backend_Buffer_updateData); - oluacls_func(L, "updateSubData", _cocos2d_backend_Buffer_updateSubData); - oluacls_func(L, "usingDefaultStoredData", _cocos2d_backend_Buffer_usingDefaultStoredData); - oluacls_prop(L, "size", _cocos2d_backend_Buffer_getSize, nullptr); + oluacls_func(L, "getSize", _olua_fun_cocos2d_backend_Buffer_getSize); + oluacls_func(L, "updateData", _olua_fun_cocos2d_backend_Buffer_updateData); + oluacls_func(L, "updateSubData", _olua_fun_cocos2d_backend_Buffer_updateSubData); + oluacls_func(L, "usingDefaultStoredData", _olua_fun_cocos2d_backend_Buffer_usingDefaultStoredData); + oluacls_prop(L, "size", _olua_fun_cocos2d_backend_Buffer_getSize, nullptr); return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_backend_RenderPipeline(lua_State *L) +OLUA_LIB int luaopen_ccb_Buffer(lua_State *L) +{ + olua_require(L, "cocos2d_backend", luaopen_cocos2d_backend); + if (!olua_getclass(L, "ccb.Buffer")) { + luaL_error(L, "class not found: cocos2d::backend::Buffer"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_ccb_RenderPipeline(lua_State *L) { oluacls_class(L, "ccb.RenderPipeline"); return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_backend_DepthStencilState(lua_State *L) +OLUA_LIB int luaopen_ccb_RenderPipeline(lua_State *L) +{ + olua_require(L, "cocos2d_backend", luaopen_cocos2d_backend); + if (!olua_getclass(L, "ccb.RenderPipeline")) { + luaL_error(L, "class not found: cocos2d::backend::RenderPipeline"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_ccb_DepthStencilState(lua_State *L) { oluacls_class(L, "ccb.DepthStencilState"); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccb_DepthStencilState(lua_State *L) +{ + olua_require(L, "cocos2d_backend", luaopen_cocos2d_backend); + if (!olua_getclass(L, "ccb.DepthStencilState")) { + luaL_error(L, "class not found: cocos2d::backend::DepthStencilState"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_backend_VertexLayout___gc(lua_State *L) +static int _olua_fun_cocos2d_backend_VertexLayout___gc(lua_State *L) { olua_startinvoke(L); @@ -695,7 +943,7 @@ static int _cocos2d_backend_VertexLayout___gc(lua_State *L) return 0; } -static int _cocos2d_backend_VertexLayout___olua_move(lua_State *L) +static int _olua_fun_cocos2d_backend_VertexLayout___olua_move(lua_State *L) { olua_startinvoke(L); @@ -707,7 +955,7 @@ static int _cocos2d_backend_VertexLayout___olua_move(lua_State *L) return 1; } -static int _cocos2d_backend_VertexLayout_getAttributes(lua_State *L) +static int _olua_fun_cocos2d_backend_VertexLayout_getAttributes(lua_State *L) { olua_startinvoke(L); @@ -719,7 +967,7 @@ static int _cocos2d_backend_VertexLayout_getAttributes(lua_State *L) const std::unordered_map &ret = self->getAttributes(); int num_ret = olua_push_map(L, ret, [L](std::string &arg1, cocos2d::backend::VertexLayout::Attribute &arg2) { olua_push_string(L, arg1); - olua_pushcopy_object(L, arg2, "ccb.VertexLayout.Attribute"); + olua_copy_object(L, arg2, "ccb.VertexLayout.Attribute"); }); olua_endinvoke(L); @@ -727,7 +975,7 @@ static int _cocos2d_backend_VertexLayout_getAttributes(lua_State *L) return num_ret; } -static int _cocos2d_backend_VertexLayout_getStride(lua_State *L) +static int _olua_fun_cocos2d_backend_VertexLayout_getStride(lua_State *L) { olua_startinvoke(L); @@ -744,7 +992,7 @@ static int _cocos2d_backend_VertexLayout_getStride(lua_State *L) return num_ret; } -static int _cocos2d_backend_VertexLayout_getVertexStepMode(lua_State *L) +static int _olua_fun_cocos2d_backend_VertexLayout_getVertexStepMode(lua_State *L) { olua_startinvoke(L); @@ -761,7 +1009,7 @@ static int _cocos2d_backend_VertexLayout_getVertexStepMode(lua_State *L) return num_ret; } -static int _cocos2d_backend_VertexLayout_isValid(lua_State *L) +static int _olua_fun_cocos2d_backend_VertexLayout_isValid(lua_State *L) { olua_startinvoke(L); @@ -778,11 +1026,11 @@ static int _cocos2d_backend_VertexLayout_isValid(lua_State *L) return num_ret; } -static int _cocos2d_backend_VertexLayout_new(lua_State *L) +static int _olua_fun_cocos2d_backend_VertexLayout_new(lua_State *L) { olua_startinvoke(L); - // VertexLayout() + // cocos2d::backend::VertexLayout() cocos2d::backend::VertexLayout *ret = new cocos2d::backend::VertexLayout(); int num_ret = olua_push_object(L, ret, "ccb.VertexLayout"); olua_postnew(L, ret); @@ -792,7 +1040,7 @@ static int _cocos2d_backend_VertexLayout_new(lua_State *L) return num_ret; } -static int _cocos2d_backend_VertexLayout_setAttribute(lua_State *L) +static int _olua_fun_cocos2d_backend_VertexLayout_setAttribute(lua_State *L) { olua_startinvoke(L); @@ -818,7 +1066,7 @@ static int _cocos2d_backend_VertexLayout_setAttribute(lua_State *L) return 0; } -static int _cocos2d_backend_VertexLayout_setLayout(lua_State *L) +static int _olua_fun_cocos2d_backend_VertexLayout_setLayout(lua_State *L) { olua_startinvoke(L); @@ -836,29 +1084,38 @@ static int _cocos2d_backend_VertexLayout_setLayout(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_backend_VertexLayout(lua_State *L) +static int _olua_cls_ccb_VertexLayout(lua_State *L) { oluacls_class(L, "ccb.VertexLayout"); - oluacls_func(L, "__gc", _cocos2d_backend_VertexLayout___gc); - oluacls_func(L, "__olua_move", _cocos2d_backend_VertexLayout___olua_move); - oluacls_func(L, "getAttributes", _cocos2d_backend_VertexLayout_getAttributes); - oluacls_func(L, "getStride", _cocos2d_backend_VertexLayout_getStride); - oluacls_func(L, "getVertexStepMode", _cocos2d_backend_VertexLayout_getVertexStepMode); - oluacls_func(L, "isValid", _cocos2d_backend_VertexLayout_isValid); - oluacls_func(L, "new", _cocos2d_backend_VertexLayout_new); - oluacls_func(L, "setAttribute", _cocos2d_backend_VertexLayout_setAttribute); - oluacls_func(L, "setLayout", _cocos2d_backend_VertexLayout_setLayout); - oluacls_prop(L, "attributes", _cocos2d_backend_VertexLayout_getAttributes, nullptr); - oluacls_prop(L, "stride", _cocos2d_backend_VertexLayout_getStride, nullptr); - oluacls_prop(L, "valid", _cocos2d_backend_VertexLayout_isValid, nullptr); - oluacls_prop(L, "vertexStepMode", _cocos2d_backend_VertexLayout_getVertexStepMode, nullptr); + oluacls_func(L, "__gc", _olua_fun_cocos2d_backend_VertexLayout___gc); + oluacls_func(L, "__olua_move", _olua_fun_cocos2d_backend_VertexLayout___olua_move); + oluacls_func(L, "getAttributes", _olua_fun_cocos2d_backend_VertexLayout_getAttributes); + oluacls_func(L, "getStride", _olua_fun_cocos2d_backend_VertexLayout_getStride); + oluacls_func(L, "getVertexStepMode", _olua_fun_cocos2d_backend_VertexLayout_getVertexStepMode); + oluacls_func(L, "isValid", _olua_fun_cocos2d_backend_VertexLayout_isValid); + oluacls_func(L, "new", _olua_fun_cocos2d_backend_VertexLayout_new); + oluacls_func(L, "setAttribute", _olua_fun_cocos2d_backend_VertexLayout_setAttribute); + oluacls_func(L, "setLayout", _olua_fun_cocos2d_backend_VertexLayout_setLayout); + oluacls_prop(L, "attributes", _olua_fun_cocos2d_backend_VertexLayout_getAttributes, nullptr); + oluacls_prop(L, "stride", _olua_fun_cocos2d_backend_VertexLayout_getStride, nullptr); + oluacls_prop(L, "valid", _olua_fun_cocos2d_backend_VertexLayout_isValid, nullptr); + oluacls_prop(L, "vertexStepMode", _olua_fun_cocos2d_backend_VertexLayout_getVertexStepMode, nullptr); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccb_VertexLayout(lua_State *L) +{ + olua_require(L, "cocos2d_backend", luaopen_cocos2d_backend); + if (!olua_getclass(L, "ccb.VertexLayout")) { + luaL_error(L, "class not found: cocos2d::backend::VertexLayout"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_backend_CommandBuffer_beginFrame(lua_State *L) +static int _olua_fun_cocos2d_backend_CommandBuffer_beginFrame(lua_State *L) { olua_startinvoke(L); @@ -874,7 +1131,7 @@ static int _cocos2d_backend_CommandBuffer_beginFrame(lua_State *L) return 0; } -static int _cocos2d_backend_CommandBuffer_captureScreen(lua_State *L) +static int _olua_fun_cocos2d_backend_CommandBuffer_captureScreen(lua_State *L) { olua_startinvoke(L); @@ -886,17 +1143,18 @@ static int _cocos2d_backend_CommandBuffer_captureScreen(lua_State *L) void *cb_store = (void *)self; std::string cb_tag = "captureScreen"; - std::string cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_NEW); + std::string cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_NEW); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](const unsigned char *arg1, int arg2, int arg3) { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](const unsigned char *cb_arg1, int cb_arg2, int cb_arg3) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); if (olua_contextequal(L, cb_ctx)) { int top = lua_gettop(L); - olua_push_string(L, arg1); - olua_push_integer(L, arg2); - olua_push_integer(L, arg3); + olua_push_string(L, cb_arg1); + olua_push_integer(L, cb_arg2); + olua_push_integer(L, cb_arg3); olua_callback(L, cb_store, cb_name.c_str(), 3); @@ -906,7 +1164,7 @@ static int _cocos2d_backend_CommandBuffer_captureScreen(lua_State *L) } }; - // void captureScreen(@localvar std::function callback) + // void captureScreen(std::function callback) self->captureScreen(arg1); olua_endinvoke(L); @@ -914,7 +1172,7 @@ static int _cocos2d_backend_CommandBuffer_captureScreen(lua_State *L) return 0; } -static int _cocos2d_backend_CommandBuffer_drawArrays(lua_State *L) +static int _olua_fun_cocos2d_backend_CommandBuffer_drawArrays(lua_State *L) { olua_startinvoke(L); @@ -936,7 +1194,7 @@ static int _cocos2d_backend_CommandBuffer_drawArrays(lua_State *L) return 0; } -static int _cocos2d_backend_CommandBuffer_drawElements(lua_State *L) +static int _olua_fun_cocos2d_backend_CommandBuffer_drawElements(lua_State *L) { olua_startinvoke(L); @@ -960,7 +1218,7 @@ static int _cocos2d_backend_CommandBuffer_drawElements(lua_State *L) return 0; } -static int _cocos2d_backend_CommandBuffer_endFrame(lua_State *L) +static int _olua_fun_cocos2d_backend_CommandBuffer_endFrame(lua_State *L) { olua_startinvoke(L); @@ -976,7 +1234,7 @@ static int _cocos2d_backend_CommandBuffer_endFrame(lua_State *L) return 0; } -static int _cocos2d_backend_CommandBuffer_endRenderPass(lua_State *L) +static int _olua_fun_cocos2d_backend_CommandBuffer_endRenderPass(lua_State *L) { olua_startinvoke(L); @@ -992,7 +1250,7 @@ static int _cocos2d_backend_CommandBuffer_endRenderPass(lua_State *L) return 0; } -static int _cocos2d_backend_CommandBuffer_setCullMode(lua_State *L) +static int _olua_fun_cocos2d_backend_CommandBuffer_setCullMode(lua_State *L) { olua_startinvoke(L); @@ -1010,7 +1268,7 @@ static int _cocos2d_backend_CommandBuffer_setCullMode(lua_State *L) return 0; } -static int _cocos2d_backend_CommandBuffer_setDepthStencilState(lua_State *L) +static int _olua_fun_cocos2d_backend_CommandBuffer_setDepthStencilState(lua_State *L) { olua_startinvoke(L); @@ -1028,7 +1286,7 @@ static int _cocos2d_backend_CommandBuffer_setDepthStencilState(lua_State *L) return 0; } -static int _cocos2d_backend_CommandBuffer_setIndexBuffer(lua_State *L) +static int _olua_fun_cocos2d_backend_CommandBuffer_setIndexBuffer(lua_State *L) { olua_startinvoke(L); @@ -1046,7 +1304,7 @@ static int _cocos2d_backend_CommandBuffer_setIndexBuffer(lua_State *L) return 0; } -static int _cocos2d_backend_CommandBuffer_setLineWidth(lua_State *L) +static int _olua_fun_cocos2d_backend_CommandBuffer_setLineWidth(lua_State *L) { olua_startinvoke(L); @@ -1064,7 +1322,7 @@ static int _cocos2d_backend_CommandBuffer_setLineWidth(lua_State *L) return 0; } -static int _cocos2d_backend_CommandBuffer_setProgramState(lua_State *L) +static int _olua_fun_cocos2d_backend_CommandBuffer_setProgramState(lua_State *L) { olua_startinvoke(L); @@ -1082,7 +1340,7 @@ static int _cocos2d_backend_CommandBuffer_setProgramState(lua_State *L) return 0; } -static int _cocos2d_backend_CommandBuffer_setRenderPipeline(lua_State *L) +static int _olua_fun_cocos2d_backend_CommandBuffer_setRenderPipeline(lua_State *L) { olua_startinvoke(L); @@ -1100,7 +1358,7 @@ static int _cocos2d_backend_CommandBuffer_setRenderPipeline(lua_State *L) return 0; } -static int _cocos2d_backend_CommandBuffer_setScissorRect(lua_State *L) +static int _olua_fun_cocos2d_backend_CommandBuffer_setScissorRect(lua_State *L) { olua_startinvoke(L); @@ -1126,7 +1384,7 @@ static int _cocos2d_backend_CommandBuffer_setScissorRect(lua_State *L) return 0; } -static int _cocos2d_backend_CommandBuffer_setStencilReferenceValue$1(lua_State *L) +static int _olua_fun_cocos2d_backend_CommandBuffer_setStencilReferenceValue$1(lua_State *L) { olua_startinvoke(L); @@ -1144,7 +1402,7 @@ static int _cocos2d_backend_CommandBuffer_setStencilReferenceValue$1(lua_State * return 0; } -static int _cocos2d_backend_CommandBuffer_setStencilReferenceValue$2(lua_State *L) +static int _olua_fun_cocos2d_backend_CommandBuffer_setStencilReferenceValue$2(lua_State *L) { olua_startinvoke(L); @@ -1164,21 +1422,21 @@ static int _cocos2d_backend_CommandBuffer_setStencilReferenceValue$2(lua_State * return 0; } -static int _cocos2d_backend_CommandBuffer_setStencilReferenceValue(lua_State *L) +static int _olua_fun_cocos2d_backend_CommandBuffer_setStencilReferenceValue(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_integer(L, 2))) { // void setStencilReferenceValue(unsigned int value) - return _cocos2d_backend_CommandBuffer_setStencilReferenceValue$1(L); + return _olua_fun_cocos2d_backend_CommandBuffer_setStencilReferenceValue$1(L); // } } if (num_args == 2) { // if ((olua_is_integer(L, 2)) && (olua_is_integer(L, 3))) { // void setStencilReferenceValue(unsigned int frontRef, unsigned int backRef) - return _cocos2d_backend_CommandBuffer_setStencilReferenceValue$2(L); + return _olua_fun_cocos2d_backend_CommandBuffer_setStencilReferenceValue$2(L); // } } @@ -1187,7 +1445,7 @@ static int _cocos2d_backend_CommandBuffer_setStencilReferenceValue(lua_State *L) return 0; } -static int _cocos2d_backend_CommandBuffer_setVertexBuffer(lua_State *L) +static int _olua_fun_cocos2d_backend_CommandBuffer_setVertexBuffer(lua_State *L) { olua_startinvoke(L); @@ -1205,7 +1463,7 @@ static int _cocos2d_backend_CommandBuffer_setVertexBuffer(lua_State *L) return 0; } -static int _cocos2d_backend_CommandBuffer_setViewport(lua_State *L) +static int _olua_fun_cocos2d_backend_CommandBuffer_setViewport(lua_State *L) { olua_startinvoke(L); @@ -1229,7 +1487,7 @@ static int _cocos2d_backend_CommandBuffer_setViewport(lua_State *L) return 0; } -static int _cocos2d_backend_CommandBuffer_setWinding(lua_State *L) +static int _olua_fun_cocos2d_backend_CommandBuffer_setWinding(lua_State *L) { olua_startinvoke(L); @@ -1247,44 +1505,53 @@ static int _cocos2d_backend_CommandBuffer_setWinding(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_backend_CommandBuffer(lua_State *L) +static int _olua_cls_ccb_CommandBuffer(lua_State *L) { oluacls_class(L, "ccb.CommandBuffer"); - oluacls_func(L, "beginFrame", _cocos2d_backend_CommandBuffer_beginFrame); - oluacls_func(L, "captureScreen", _cocos2d_backend_CommandBuffer_captureScreen); - oluacls_func(L, "drawArrays", _cocos2d_backend_CommandBuffer_drawArrays); - oluacls_func(L, "drawElements", _cocos2d_backend_CommandBuffer_drawElements); - oluacls_func(L, "endFrame", _cocos2d_backend_CommandBuffer_endFrame); - oluacls_func(L, "endRenderPass", _cocos2d_backend_CommandBuffer_endRenderPass); - oluacls_func(L, "setCullMode", _cocos2d_backend_CommandBuffer_setCullMode); - oluacls_func(L, "setDepthStencilState", _cocos2d_backend_CommandBuffer_setDepthStencilState); - oluacls_func(L, "setIndexBuffer", _cocos2d_backend_CommandBuffer_setIndexBuffer); - oluacls_func(L, "setLineWidth", _cocos2d_backend_CommandBuffer_setLineWidth); - oluacls_func(L, "setProgramState", _cocos2d_backend_CommandBuffer_setProgramState); - oluacls_func(L, "setRenderPipeline", _cocos2d_backend_CommandBuffer_setRenderPipeline); - oluacls_func(L, "setScissorRect", _cocos2d_backend_CommandBuffer_setScissorRect); - oluacls_func(L, "setStencilReferenceValue", _cocos2d_backend_CommandBuffer_setStencilReferenceValue); - oluacls_func(L, "setVertexBuffer", _cocos2d_backend_CommandBuffer_setVertexBuffer); - oluacls_func(L, "setViewport", _cocos2d_backend_CommandBuffer_setViewport); - oluacls_func(L, "setWinding", _cocos2d_backend_CommandBuffer_setWinding); + oluacls_func(L, "beginFrame", _olua_fun_cocos2d_backend_CommandBuffer_beginFrame); + oluacls_func(L, "captureScreen", _olua_fun_cocos2d_backend_CommandBuffer_captureScreen); + oluacls_func(L, "drawArrays", _olua_fun_cocos2d_backend_CommandBuffer_drawArrays); + oluacls_func(L, "drawElements", _olua_fun_cocos2d_backend_CommandBuffer_drawElements); + oluacls_func(L, "endFrame", _olua_fun_cocos2d_backend_CommandBuffer_endFrame); + oluacls_func(L, "endRenderPass", _olua_fun_cocos2d_backend_CommandBuffer_endRenderPass); + oluacls_func(L, "setCullMode", _olua_fun_cocos2d_backend_CommandBuffer_setCullMode); + oluacls_func(L, "setDepthStencilState", _olua_fun_cocos2d_backend_CommandBuffer_setDepthStencilState); + oluacls_func(L, "setIndexBuffer", _olua_fun_cocos2d_backend_CommandBuffer_setIndexBuffer); + oluacls_func(L, "setLineWidth", _olua_fun_cocos2d_backend_CommandBuffer_setLineWidth); + oluacls_func(L, "setProgramState", _olua_fun_cocos2d_backend_CommandBuffer_setProgramState); + oluacls_func(L, "setRenderPipeline", _olua_fun_cocos2d_backend_CommandBuffer_setRenderPipeline); + oluacls_func(L, "setScissorRect", _olua_fun_cocos2d_backend_CommandBuffer_setScissorRect); + oluacls_func(L, "setStencilReferenceValue", _olua_fun_cocos2d_backend_CommandBuffer_setStencilReferenceValue); + oluacls_func(L, "setVertexBuffer", _olua_fun_cocos2d_backend_CommandBuffer_setVertexBuffer); + oluacls_func(L, "setViewport", _olua_fun_cocos2d_backend_CommandBuffer_setViewport); + oluacls_func(L, "setWinding", _olua_fun_cocos2d_backend_CommandBuffer_setWinding); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccb_CommandBuffer(lua_State *L) +{ + olua_require(L, "cocos2d_backend", luaopen_cocos2d_backend); + if (!olua_getclass(L, "ccb.CommandBuffer")) { + luaL_error(L, "class not found: cocos2d::backend::CommandBuffer"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_backend_Device_createDepthStencilState(lua_State *L) +static int _olua_fun_cocos2d_backend_Device_createDepthStencilState(lua_State *L) { olua_startinvoke(L); cocos2d::backend::Device *self = nullptr; - cocos2d::backend::DepthStencilDescriptor arg1; /** descriptor */ + cocos2d::backend::DepthStencilDescriptor *arg1; /** descriptor */ olua_to_object(L, 1, &self, "ccb.Device"); olua_check_object(L, 2, &arg1, "ccb.DepthStencilDescriptor"); // cocos2d::backend::DepthStencilState *createDepthStencilState(const cocos2d::backend::DepthStencilDescriptor &descriptor) - cocos2d::backend::DepthStencilState *ret = self->createDepthStencilState(arg1); + cocos2d::backend::DepthStencilState *ret = self->createDepthStencilState(*arg1); int num_ret = olua_push_object(L, ret, "ccb.DepthStencilState"); olua_endinvoke(L); @@ -1292,7 +1559,7 @@ static int _cocos2d_backend_Device_createDepthStencilState(lua_State *L) return num_ret; } -static int _cocos2d_backend_Device_getDeviceInfo(lua_State *L) +static int _olua_fun_cocos2d_backend_Device_getDeviceInfo(lua_State *L) { olua_startinvoke(L); @@ -1309,7 +1576,7 @@ static int _cocos2d_backend_Device_getDeviceInfo(lua_State *L) return num_ret; } -static int _cocos2d_backend_Device_getInstance(lua_State *L) +static int _olua_fun_cocos2d_backend_Device_getInstance(lua_State *L) { olua_startinvoke(L); @@ -1322,7 +1589,7 @@ static int _cocos2d_backend_Device_getInstance(lua_State *L) return num_ret; } -static int _cocos2d_backend_Device_newBuffer(lua_State *L) +static int _olua_fun_cocos2d_backend_Device_newBuffer(lua_State *L) { olua_startinvoke(L); @@ -1348,7 +1615,7 @@ static int _cocos2d_backend_Device_newBuffer(lua_State *L) return num_ret; } -static int _cocos2d_backend_Device_newCommandBuffer(lua_State *L) +static int _olua_fun_cocos2d_backend_Device_newCommandBuffer(lua_State *L) { olua_startinvoke(L); @@ -1368,7 +1635,7 @@ static int _cocos2d_backend_Device_newCommandBuffer(lua_State *L) return num_ret; } -static int _cocos2d_backend_Device_newProgram(lua_State *L) +static int _olua_fun_cocos2d_backend_Device_newProgram(lua_State *L) { olua_startinvoke(L); @@ -1392,7 +1659,7 @@ static int _cocos2d_backend_Device_newProgram(lua_State *L) return num_ret; } -static int _cocos2d_backend_Device_newRenderPipeline(lua_State *L) +static int _olua_fun_cocos2d_backend_Device_newRenderPipeline(lua_State *L) { olua_startinvoke(L); @@ -1412,18 +1679,18 @@ static int _cocos2d_backend_Device_newRenderPipeline(lua_State *L) return num_ret; } -static int _cocos2d_backend_Device_newTexture(lua_State *L) +static int _olua_fun_cocos2d_backend_Device_newTexture(lua_State *L) { olua_startinvoke(L); cocos2d::backend::Device *self = nullptr; - cocos2d::backend::TextureDescriptor arg1; /** descriptor */ + cocos2d::backend::TextureDescriptor *arg1; /** descriptor */ olua_to_object(L, 1, &self, "ccb.Device"); olua_check_object(L, 2, &arg1, "ccb.TextureDescriptor"); // @postnew cocos2d::backend::TextureBackend *newTexture(const cocos2d::backend::TextureDescriptor &descriptor) - cocos2d::backend::TextureBackend *ret = self->newTexture(arg1); + cocos2d::backend::TextureBackend *ret = self->newTexture(*arg1); int num_ret = olua_push_object(L, ret, "ccb.TextureBackend"); // insert code after call @@ -1434,7 +1701,7 @@ static int _cocos2d_backend_Device_newTexture(lua_State *L) return num_ret; } -static int _cocos2d_backend_Device_setFrameBufferOnly(lua_State *L) +static int _olua_fun_cocos2d_backend_Device_setFrameBufferOnly(lua_State *L) { olua_startinvoke(L); @@ -1452,27 +1719,36 @@ static int _cocos2d_backend_Device_setFrameBufferOnly(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_backend_Device(lua_State *L) +static int _olua_cls_ccb_Device(lua_State *L) { oluacls_class(L, "ccb.Device"); - oluacls_func(L, "createDepthStencilState", _cocos2d_backend_Device_createDepthStencilState); - oluacls_func(L, "getDeviceInfo", _cocos2d_backend_Device_getDeviceInfo); - oluacls_func(L, "getInstance", _cocos2d_backend_Device_getInstance); - oluacls_func(L, "newBuffer", _cocos2d_backend_Device_newBuffer); - oluacls_func(L, "newCommandBuffer", _cocos2d_backend_Device_newCommandBuffer); - oluacls_func(L, "newProgram", _cocos2d_backend_Device_newProgram); - oluacls_func(L, "newRenderPipeline", _cocos2d_backend_Device_newRenderPipeline); - oluacls_func(L, "newTexture", _cocos2d_backend_Device_newTexture); - oluacls_func(L, "setFrameBufferOnly", _cocos2d_backend_Device_setFrameBufferOnly); - oluacls_prop(L, "deviceInfo", _cocos2d_backend_Device_getDeviceInfo, nullptr); - oluacls_prop(L, "instance", _cocos2d_backend_Device_getInstance, nullptr); + oluacls_func(L, "createDepthStencilState", _olua_fun_cocos2d_backend_Device_createDepthStencilState); + oluacls_func(L, "getDeviceInfo", _olua_fun_cocos2d_backend_Device_getDeviceInfo); + oluacls_func(L, "getInstance", _olua_fun_cocos2d_backend_Device_getInstance); + oluacls_func(L, "newBuffer", _olua_fun_cocos2d_backend_Device_newBuffer); + oluacls_func(L, "newCommandBuffer", _olua_fun_cocos2d_backend_Device_newCommandBuffer); + oluacls_func(L, "newProgram", _olua_fun_cocos2d_backend_Device_newProgram); + oluacls_func(L, "newRenderPipeline", _olua_fun_cocos2d_backend_Device_newRenderPipeline); + oluacls_func(L, "newTexture", _olua_fun_cocos2d_backend_Device_newTexture); + oluacls_func(L, "setFrameBufferOnly", _olua_fun_cocos2d_backend_Device_setFrameBufferOnly); + oluacls_prop(L, "deviceInfo", _olua_fun_cocos2d_backend_Device_getDeviceInfo, nullptr); + oluacls_prop(L, "instance", _olua_fun_cocos2d_backend_Device_getInstance, nullptr); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccb_Device(lua_State *L) +{ + olua_require(L, "cocos2d_backend", luaopen_cocos2d_backend); + if (!olua_getclass(L, "ccb.Device")) { + luaL_error(L, "class not found: cocos2d::backend::Device"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_backend_DeviceInfo___gc(lua_State *L) +static int _olua_fun_cocos2d_backend_DeviceInfo___gc(lua_State *L) { olua_startinvoke(L); @@ -1484,7 +1760,7 @@ static int _cocos2d_backend_DeviceInfo___gc(lua_State *L) return 0; } -static int _cocos2d_backend_DeviceInfo___olua_move(lua_State *L) +static int _olua_fun_cocos2d_backend_DeviceInfo___olua_move(lua_State *L) { olua_startinvoke(L); @@ -1496,7 +1772,7 @@ static int _cocos2d_backend_DeviceInfo___olua_move(lua_State *L) return 1; } -static int _cocos2d_backend_DeviceInfo_checkForFeatureSupported(lua_State *L) +static int _olua_fun_cocos2d_backend_DeviceInfo_checkForFeatureSupported(lua_State *L) { olua_startinvoke(L); @@ -1515,7 +1791,7 @@ static int _cocos2d_backend_DeviceInfo_checkForFeatureSupported(lua_State *L) return num_ret; } -static int _cocos2d_backend_DeviceInfo_getExtension(lua_State *L) +static int _olua_fun_cocos2d_backend_DeviceInfo_getExtension(lua_State *L) { olua_startinvoke(L); @@ -1532,7 +1808,7 @@ static int _cocos2d_backend_DeviceInfo_getExtension(lua_State *L) return num_ret; } -static int _cocos2d_backend_DeviceInfo_getMaxAttributes(lua_State *L) +static int _olua_fun_cocos2d_backend_DeviceInfo_getMaxAttributes(lua_State *L) { olua_startinvoke(L); @@ -1549,7 +1825,7 @@ static int _cocos2d_backend_DeviceInfo_getMaxAttributes(lua_State *L) return num_ret; } -static int _cocos2d_backend_DeviceInfo_getMaxSamplesAllowed(lua_State *L) +static int _olua_fun_cocos2d_backend_DeviceInfo_getMaxSamplesAllowed(lua_State *L) { olua_startinvoke(L); @@ -1566,7 +1842,7 @@ static int _cocos2d_backend_DeviceInfo_getMaxSamplesAllowed(lua_State *L) return num_ret; } -static int _cocos2d_backend_DeviceInfo_getMaxTextureSize(lua_State *L) +static int _olua_fun_cocos2d_backend_DeviceInfo_getMaxTextureSize(lua_State *L) { olua_startinvoke(L); @@ -1583,7 +1859,7 @@ static int _cocos2d_backend_DeviceInfo_getMaxTextureSize(lua_State *L) return num_ret; } -static int _cocos2d_backend_DeviceInfo_getMaxTextureUnits(lua_State *L) +static int _olua_fun_cocos2d_backend_DeviceInfo_getMaxTextureUnits(lua_State *L) { olua_startinvoke(L); @@ -1600,7 +1876,7 @@ static int _cocos2d_backend_DeviceInfo_getMaxTextureUnits(lua_State *L) return num_ret; } -static int _cocos2d_backend_DeviceInfo_getRenderer(lua_State *L) +static int _olua_fun_cocos2d_backend_DeviceInfo_getRenderer(lua_State *L) { olua_startinvoke(L); @@ -1617,7 +1893,7 @@ static int _cocos2d_backend_DeviceInfo_getRenderer(lua_State *L) return num_ret; } -static int _cocos2d_backend_DeviceInfo_getVendor(lua_State *L) +static int _olua_fun_cocos2d_backend_DeviceInfo_getVendor(lua_State *L) { olua_startinvoke(L); @@ -1634,7 +1910,7 @@ static int _cocos2d_backend_DeviceInfo_getVendor(lua_State *L) return num_ret; } -static int _cocos2d_backend_DeviceInfo_getVersion(lua_State *L) +static int _olua_fun_cocos2d_backend_DeviceInfo_getVersion(lua_State *L) { olua_startinvoke(L); @@ -1651,7 +1927,7 @@ static int _cocos2d_backend_DeviceInfo_getVersion(lua_State *L) return num_ret; } -static int _cocos2d_backend_DeviceInfo_init(lua_State *L) +static int _olua_fun_cocos2d_backend_DeviceInfo_init(lua_State *L) { olua_startinvoke(L); @@ -1668,36 +1944,45 @@ static int _cocos2d_backend_DeviceInfo_init(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_backend_DeviceInfo(lua_State *L) +static int _olua_cls_ccb_DeviceInfo(lua_State *L) { oluacls_class(L, "ccb.DeviceInfo"); - oluacls_func(L, "__gc", _cocos2d_backend_DeviceInfo___gc); - oluacls_func(L, "__olua_move", _cocos2d_backend_DeviceInfo___olua_move); - oluacls_func(L, "checkForFeatureSupported", _cocos2d_backend_DeviceInfo_checkForFeatureSupported); - oluacls_func(L, "getExtension", _cocos2d_backend_DeviceInfo_getExtension); - oluacls_func(L, "getMaxAttributes", _cocos2d_backend_DeviceInfo_getMaxAttributes); - oluacls_func(L, "getMaxSamplesAllowed", _cocos2d_backend_DeviceInfo_getMaxSamplesAllowed); - oluacls_func(L, "getMaxTextureSize", _cocos2d_backend_DeviceInfo_getMaxTextureSize); - oluacls_func(L, "getMaxTextureUnits", _cocos2d_backend_DeviceInfo_getMaxTextureUnits); - oluacls_func(L, "getRenderer", _cocos2d_backend_DeviceInfo_getRenderer); - oluacls_func(L, "getVendor", _cocos2d_backend_DeviceInfo_getVendor); - oluacls_func(L, "getVersion", _cocos2d_backend_DeviceInfo_getVersion); - oluacls_func(L, "init", _cocos2d_backend_DeviceInfo_init); - oluacls_prop(L, "extension", _cocos2d_backend_DeviceInfo_getExtension, nullptr); - oluacls_prop(L, "maxAttributes", _cocos2d_backend_DeviceInfo_getMaxAttributes, nullptr); - oluacls_prop(L, "maxSamplesAllowed", _cocos2d_backend_DeviceInfo_getMaxSamplesAllowed, nullptr); - oluacls_prop(L, "maxTextureSize", _cocos2d_backend_DeviceInfo_getMaxTextureSize, nullptr); - oluacls_prop(L, "maxTextureUnits", _cocos2d_backend_DeviceInfo_getMaxTextureUnits, nullptr); - oluacls_prop(L, "renderer", _cocos2d_backend_DeviceInfo_getRenderer, nullptr); - oluacls_prop(L, "vendor", _cocos2d_backend_DeviceInfo_getVendor, nullptr); - oluacls_prop(L, "version", _cocos2d_backend_DeviceInfo_getVersion, nullptr); + oluacls_func(L, "__gc", _olua_fun_cocos2d_backend_DeviceInfo___gc); + oluacls_func(L, "__olua_move", _olua_fun_cocos2d_backend_DeviceInfo___olua_move); + oluacls_func(L, "checkForFeatureSupported", _olua_fun_cocos2d_backend_DeviceInfo_checkForFeatureSupported); + oluacls_func(L, "getExtension", _olua_fun_cocos2d_backend_DeviceInfo_getExtension); + oluacls_func(L, "getMaxAttributes", _olua_fun_cocos2d_backend_DeviceInfo_getMaxAttributes); + oluacls_func(L, "getMaxSamplesAllowed", _olua_fun_cocos2d_backend_DeviceInfo_getMaxSamplesAllowed); + oluacls_func(L, "getMaxTextureSize", _olua_fun_cocos2d_backend_DeviceInfo_getMaxTextureSize); + oluacls_func(L, "getMaxTextureUnits", _olua_fun_cocos2d_backend_DeviceInfo_getMaxTextureUnits); + oluacls_func(L, "getRenderer", _olua_fun_cocos2d_backend_DeviceInfo_getRenderer); + oluacls_func(L, "getVendor", _olua_fun_cocos2d_backend_DeviceInfo_getVendor); + oluacls_func(L, "getVersion", _olua_fun_cocos2d_backend_DeviceInfo_getVersion); + oluacls_func(L, "init", _olua_fun_cocos2d_backend_DeviceInfo_init); + oluacls_prop(L, "extension", _olua_fun_cocos2d_backend_DeviceInfo_getExtension, nullptr); + oluacls_prop(L, "maxAttributes", _olua_fun_cocos2d_backend_DeviceInfo_getMaxAttributes, nullptr); + oluacls_prop(L, "maxSamplesAllowed", _olua_fun_cocos2d_backend_DeviceInfo_getMaxSamplesAllowed, nullptr); + oluacls_prop(L, "maxTextureSize", _olua_fun_cocos2d_backend_DeviceInfo_getMaxTextureSize, nullptr); + oluacls_prop(L, "maxTextureUnits", _olua_fun_cocos2d_backend_DeviceInfo_getMaxTextureUnits, nullptr); + oluacls_prop(L, "renderer", _olua_fun_cocos2d_backend_DeviceInfo_getRenderer, nullptr); + oluacls_prop(L, "vendor", _olua_fun_cocos2d_backend_DeviceInfo_getVendor, nullptr); + oluacls_prop(L, "version", _olua_fun_cocos2d_backend_DeviceInfo_getVersion, nullptr); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccb_DeviceInfo(lua_State *L) +{ + olua_require(L, "cocos2d_backend", luaopen_cocos2d_backend); + if (!olua_getclass(L, "ccb.DeviceInfo")) { + luaL_error(L, "class not found: cocos2d::backend::DeviceInfo"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_backend_ShaderCache_destroyInstance(lua_State *L) +static int _olua_fun_cocos2d_backend_ShaderCache_destroyInstance(lua_State *L) { olua_startinvoke(L); @@ -1709,7 +1994,7 @@ static int _cocos2d_backend_ShaderCache_destroyInstance(lua_State *L) return 0; } -static int _cocos2d_backend_ShaderCache_getInstance(lua_State *L) +static int _olua_fun_cocos2d_backend_ShaderCache_getInstance(lua_State *L) { olua_startinvoke(L); @@ -1722,7 +2007,7 @@ static int _cocos2d_backend_ShaderCache_getInstance(lua_State *L) return num_ret; } -static int _cocos2d_backend_ShaderCache_newFragmentShaderModule(lua_State *L) +static int _olua_fun_cocos2d_backend_ShaderCache_newFragmentShaderModule(lua_State *L) { olua_startinvoke(L); @@ -1739,7 +2024,7 @@ static int _cocos2d_backend_ShaderCache_newFragmentShaderModule(lua_State *L) return num_ret; } -static int _cocos2d_backend_ShaderCache_newVertexShaderModule(lua_State *L) +static int _olua_fun_cocos2d_backend_ShaderCache_newVertexShaderModule(lua_State *L) { olua_startinvoke(L); @@ -1756,7 +2041,7 @@ static int _cocos2d_backend_ShaderCache_newVertexShaderModule(lua_State *L) return num_ret; } -static int _cocos2d_backend_ShaderCache_removeUnusedShader(lua_State *L) +static int _olua_fun_cocos2d_backend_ShaderCache_removeUnusedShader(lua_State *L) { olua_startinvoke(L); @@ -1772,22 +2057,31 @@ static int _cocos2d_backend_ShaderCache_removeUnusedShader(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_backend_ShaderCache(lua_State *L) +static int _olua_cls_ccb_ShaderCache(lua_State *L) { oluacls_class(L, "ccb.ShaderCache"); - oluacls_func(L, "destroyInstance", _cocos2d_backend_ShaderCache_destroyInstance); - oluacls_func(L, "getInstance", _cocos2d_backend_ShaderCache_getInstance); - oluacls_func(L, "newFragmentShaderModule", _cocos2d_backend_ShaderCache_newFragmentShaderModule); - oluacls_func(L, "newVertexShaderModule", _cocos2d_backend_ShaderCache_newVertexShaderModule); - oluacls_func(L, "removeUnusedShader", _cocos2d_backend_ShaderCache_removeUnusedShader); - oluacls_prop(L, "instance", _cocos2d_backend_ShaderCache_getInstance, nullptr); + oluacls_func(L, "destroyInstance", _olua_fun_cocos2d_backend_ShaderCache_destroyInstance); + oluacls_func(L, "getInstance", _olua_fun_cocos2d_backend_ShaderCache_getInstance); + oluacls_func(L, "newFragmentShaderModule", _olua_fun_cocos2d_backend_ShaderCache_newFragmentShaderModule); + oluacls_func(L, "newVertexShaderModule", _olua_fun_cocos2d_backend_ShaderCache_newVertexShaderModule); + oluacls_func(L, "removeUnusedShader", _olua_fun_cocos2d_backend_ShaderCache_removeUnusedShader); + oluacls_prop(L, "instance", _olua_fun_cocos2d_backend_ShaderCache_getInstance, nullptr); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccb_ShaderCache(lua_State *L) +{ + olua_require(L, "cocos2d_backend", luaopen_cocos2d_backend); + if (!olua_getclass(L, "ccb.ShaderCache")) { + luaL_error(L, "class not found: cocos2d::backend::ShaderCache"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_backend_ShaderModule_getHashValue(lua_State *L) +static int _olua_fun_cocos2d_backend_ShaderModule_getHashValue(lua_State *L) { olua_startinvoke(L); @@ -1804,7 +2098,7 @@ static int _cocos2d_backend_ShaderModule_getHashValue(lua_State *L) return num_ret; } -static int _cocos2d_backend_ShaderModule_getShaderStage(lua_State *L) +static int _olua_fun_cocos2d_backend_ShaderModule_getShaderStage(lua_State *L) { olua_startinvoke(L); @@ -1821,20 +2115,29 @@ static int _cocos2d_backend_ShaderModule_getShaderStage(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_backend_ShaderModule(lua_State *L) +static int _olua_cls_ccb_ShaderModule(lua_State *L) { oluacls_class(L, "ccb.ShaderModule"); - oluacls_func(L, "getHashValue", _cocos2d_backend_ShaderModule_getHashValue); - oluacls_func(L, "getShaderStage", _cocos2d_backend_ShaderModule_getShaderStage); - oluacls_prop(L, "hashValue", _cocos2d_backend_ShaderModule_getHashValue, nullptr); - oluacls_prop(L, "shaderStage", _cocos2d_backend_ShaderModule_getShaderStage, nullptr); + oluacls_func(L, "getHashValue", _olua_fun_cocos2d_backend_ShaderModule_getHashValue); + oluacls_func(L, "getShaderStage", _olua_fun_cocos2d_backend_ShaderModule_getShaderStage); + oluacls_prop(L, "hashValue", _olua_fun_cocos2d_backend_ShaderModule_getHashValue, nullptr); + oluacls_prop(L, "shaderStage", _olua_fun_cocos2d_backend_ShaderModule_getShaderStage, nullptr); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccb_ShaderModule(lua_State *L) +{ + olua_require(L, "cocos2d_backend", luaopen_cocos2d_backend); + if (!olua_getclass(L, "ccb.ShaderModule")) { + luaL_error(L, "class not found: cocos2d::backend::ShaderModule"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_backend_ProgramCache_addCustomProgram(lua_State *L) +static int _olua_fun_cocos2d_backend_ProgramCache_addCustomProgram(lua_State *L) { olua_startinvoke(L); @@ -1854,7 +2157,7 @@ static int _cocos2d_backend_ProgramCache_addCustomProgram(lua_State *L) return 0; } -static int _cocos2d_backend_ProgramCache_destroyInstance(lua_State *L) +static int _olua_fun_cocos2d_backend_ProgramCache_destroyInstance(lua_State *L) { olua_startinvoke(L); @@ -1866,7 +2169,7 @@ static int _cocos2d_backend_ProgramCache_destroyInstance(lua_State *L) return 0; } -static int _cocos2d_backend_ProgramCache_getBuiltinProgram(lua_State *L) +static int _olua_fun_cocos2d_backend_ProgramCache_getBuiltinProgram(lua_State *L) { olua_startinvoke(L); @@ -1885,7 +2188,7 @@ static int _cocos2d_backend_ProgramCache_getBuiltinProgram(lua_State *L) return num_ret; } -static int _cocos2d_backend_ProgramCache_getCustomProgram(lua_State *L) +static int _olua_fun_cocos2d_backend_ProgramCache_getCustomProgram(lua_State *L) { olua_startinvoke(L); @@ -1904,7 +2207,7 @@ static int _cocos2d_backend_ProgramCache_getCustomProgram(lua_State *L) return num_ret; } -static int _cocos2d_backend_ProgramCache_getInstance(lua_State *L) +static int _olua_fun_cocos2d_backend_ProgramCache_getInstance(lua_State *L) { olua_startinvoke(L); @@ -1917,7 +2220,7 @@ static int _cocos2d_backend_ProgramCache_getInstance(lua_State *L) return num_ret; } -static int _cocos2d_backend_ProgramCache_removeAllPrograms(lua_State *L) +static int _olua_fun_cocos2d_backend_ProgramCache_removeAllPrograms(lua_State *L) { olua_startinvoke(L); @@ -1933,7 +2236,7 @@ static int _cocos2d_backend_ProgramCache_removeAllPrograms(lua_State *L) return 0; } -static int _cocos2d_backend_ProgramCache_removeProgram(lua_State *L) +static int _olua_fun_cocos2d_backend_ProgramCache_removeProgram(lua_State *L) { olua_startinvoke(L); @@ -1951,7 +2254,7 @@ static int _cocos2d_backend_ProgramCache_removeProgram(lua_State *L) return 0; } -static int _cocos2d_backend_ProgramCache_removeUnusedProgram(lua_State *L) +static int _olua_fun_cocos2d_backend_ProgramCache_removeUnusedProgram(lua_State *L) { olua_startinvoke(L); @@ -1967,25 +2270,34 @@ static int _cocos2d_backend_ProgramCache_removeUnusedProgram(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_backend_ProgramCache(lua_State *L) +static int _olua_cls_ccb_ProgramCache(lua_State *L) { oluacls_class(L, "ccb.ProgramCache"); - oluacls_func(L, "addCustomProgram", _cocos2d_backend_ProgramCache_addCustomProgram); - oluacls_func(L, "destroyInstance", _cocos2d_backend_ProgramCache_destroyInstance); - oluacls_func(L, "getBuiltinProgram", _cocos2d_backend_ProgramCache_getBuiltinProgram); - oluacls_func(L, "getCustomProgram", _cocos2d_backend_ProgramCache_getCustomProgram); - oluacls_func(L, "getInstance", _cocos2d_backend_ProgramCache_getInstance); - oluacls_func(L, "removeAllPrograms", _cocos2d_backend_ProgramCache_removeAllPrograms); - oluacls_func(L, "removeProgram", _cocos2d_backend_ProgramCache_removeProgram); - oluacls_func(L, "removeUnusedProgram", _cocos2d_backend_ProgramCache_removeUnusedProgram); - oluacls_prop(L, "instance", _cocos2d_backend_ProgramCache_getInstance, nullptr); + oluacls_func(L, "addCustomProgram", _olua_fun_cocos2d_backend_ProgramCache_addCustomProgram); + oluacls_func(L, "destroyInstance", _olua_fun_cocos2d_backend_ProgramCache_destroyInstance); + oluacls_func(L, "getBuiltinProgram", _olua_fun_cocos2d_backend_ProgramCache_getBuiltinProgram); + oluacls_func(L, "getCustomProgram", _olua_fun_cocos2d_backend_ProgramCache_getCustomProgram); + oluacls_func(L, "getInstance", _olua_fun_cocos2d_backend_ProgramCache_getInstance); + oluacls_func(L, "removeAllPrograms", _olua_fun_cocos2d_backend_ProgramCache_removeAllPrograms); + oluacls_func(L, "removeProgram", _olua_fun_cocos2d_backend_ProgramCache_removeProgram); + oluacls_func(L, "removeUnusedProgram", _olua_fun_cocos2d_backend_ProgramCache_removeUnusedProgram); + oluacls_prop(L, "instance", _olua_fun_cocos2d_backend_ProgramCache_getInstance, nullptr); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccb_ProgramCache(lua_State *L) +{ + olua_require(L, "cocos2d_backend", luaopen_cocos2d_backend); + if (!olua_getclass(L, "ccb.ProgramCache")) { + luaL_error(L, "class not found: cocos2d::backend::ProgramCache"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_backend_ProgramState_clone(lua_State *L) +static int _olua_fun_cocos2d_backend_ProgramState_clone(lua_State *L) { olua_startinvoke(L); @@ -2002,7 +2314,7 @@ static int _cocos2d_backend_ProgramState_clone(lua_State *L) return num_ret; } -static int _cocos2d_backend_ProgramState_getAttributeLocation$1(lua_State *L) +static int _olua_fun_cocos2d_backend_ProgramState_getAttributeLocation$1(lua_State *L) { olua_startinvoke(L); @@ -2021,7 +2333,7 @@ static int _cocos2d_backend_ProgramState_getAttributeLocation$1(lua_State *L) return num_ret; } -static int _cocos2d_backend_ProgramState_getAttributeLocation$2(lua_State *L) +static int _olua_fun_cocos2d_backend_ProgramState_getAttributeLocation$2(lua_State *L) { olua_startinvoke(L); @@ -2040,19 +2352,19 @@ static int _cocos2d_backend_ProgramState_getAttributeLocation$2(lua_State *L) return num_ret; } -static int _cocos2d_backend_ProgramState_getAttributeLocation(lua_State *L) +static int _olua_fun_cocos2d_backend_ProgramState_getAttributeLocation(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { if ((olua_is_string(L, 2))) { // int getAttributeLocation(const std::string &name) - return _cocos2d_backend_ProgramState_getAttributeLocation$1(L); + return _olua_fun_cocos2d_backend_ProgramState_getAttributeLocation$1(L); } // if ((olua_is_enum(L, 2))) { // int getAttributeLocation(cocos2d::backend::Attribute name) - return _cocos2d_backend_ProgramState_getAttributeLocation$2(L); + return _olua_fun_cocos2d_backend_ProgramState_getAttributeLocation$2(L); // } } @@ -2061,7 +2373,7 @@ static int _cocos2d_backend_ProgramState_getAttributeLocation(lua_State *L) return 0; } -static int _cocos2d_backend_ProgramState_getFragmentTextureInfos(lua_State *L) +static int _olua_fun_cocos2d_backend_ProgramState_getFragmentTextureInfos(lua_State *L) { olua_startinvoke(L); @@ -2073,7 +2385,7 @@ static int _cocos2d_backend_ProgramState_getFragmentTextureInfos(lua_State *L) const std::unordered_map &ret = self->getFragmentTextureInfos(); int num_ret = olua_push_map(L, ret, [L](int &arg1, cocos2d::backend::TextureInfo &arg2) { olua_push_integer(L, arg1); - olua_pushcopy_object(L, arg2, "ccb.TextureInfo"); + olua_copy_object(L, arg2, "ccb.TextureInfo"); }); olua_endinvoke(L); @@ -2081,7 +2393,7 @@ static int _cocos2d_backend_ProgramState_getFragmentTextureInfos(lua_State *L) return num_ret; } -static int _cocos2d_backend_ProgramState_getProgram(lua_State *L) +static int _olua_fun_cocos2d_backend_ProgramState_getProgram(lua_State *L) { olua_startinvoke(L); @@ -2098,7 +2410,7 @@ static int _cocos2d_backend_ProgramState_getProgram(lua_State *L) return num_ret; } -static int _cocos2d_backend_ProgramState_getUniformLocation$1(lua_State *L) +static int _olua_fun_cocos2d_backend_ProgramState_getUniformLocation$1(lua_State *L) { olua_startinvoke(L); @@ -2110,14 +2422,14 @@ static int _cocos2d_backend_ProgramState_getUniformLocation$1(lua_State *L) // cocos2d::backend::UniformLocation getUniformLocation(const std::string &uniform) cocos2d::backend::UniformLocation ret = self->getUniformLocation(arg1); - int num_ret = olua_pushcopy_object(L, ret, "ccb.UniformLocation"); + int num_ret = olua_copy_object(L, ret, "ccb.UniformLocation"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_backend_ProgramState_getUniformLocation$2(lua_State *L) +static int _olua_fun_cocos2d_backend_ProgramState_getUniformLocation$2(lua_State *L) { olua_startinvoke(L); @@ -2129,26 +2441,26 @@ static int _cocos2d_backend_ProgramState_getUniformLocation$2(lua_State *L) // cocos2d::backend::UniformLocation getUniformLocation(cocos2d::backend::Uniform name) cocos2d::backend::UniformLocation ret = self->getUniformLocation(arg1); - int num_ret = olua_pushcopy_object(L, ret, "ccb.UniformLocation"); + int num_ret = olua_copy_object(L, ret, "ccb.UniformLocation"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_backend_ProgramState_getUniformLocation(lua_State *L) +static int _olua_fun_cocos2d_backend_ProgramState_getUniformLocation(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { if ((olua_is_string(L, 2))) { // cocos2d::backend::UniformLocation getUniformLocation(const std::string &uniform) - return _cocos2d_backend_ProgramState_getUniformLocation$1(L); + return _olua_fun_cocos2d_backend_ProgramState_getUniformLocation$1(L); } // if ((olua_is_enum(L, 2))) { // cocos2d::backend::UniformLocation getUniformLocation(cocos2d::backend::Uniform name) - return _cocos2d_backend_ProgramState_getUniformLocation$2(L); + return _olua_fun_cocos2d_backend_ProgramState_getUniformLocation$2(L); // } } @@ -2157,7 +2469,7 @@ static int _cocos2d_backend_ProgramState_getUniformLocation(lua_State *L) return 0; } -static int _cocos2d_backend_ProgramState_getVertexLayout(lua_State *L) +static int _olua_fun_cocos2d_backend_ProgramState_getVertexLayout(lua_State *L) { olua_startinvoke(L); @@ -2170,7 +2482,7 @@ static int _cocos2d_backend_ProgramState_getVertexLayout(lua_State *L) return 1; } -static int _cocos2d_backend_ProgramState_getVertexTextureInfos(lua_State *L) +static int _olua_fun_cocos2d_backend_ProgramState_getVertexTextureInfos(lua_State *L) { olua_startinvoke(L); @@ -2182,7 +2494,7 @@ static int _cocos2d_backend_ProgramState_getVertexTextureInfos(lua_State *L) const std::unordered_map &ret = self->getVertexTextureInfos(); int num_ret = olua_push_map(L, ret, [L](int &arg1, cocos2d::backend::TextureInfo &arg2) { olua_push_integer(L, arg1); - olua_pushcopy_object(L, arg2, "ccb.TextureInfo"); + olua_copy_object(L, arg2, "ccb.TextureInfo"); }); olua_endinvoke(L); @@ -2190,7 +2502,7 @@ static int _cocos2d_backend_ProgramState_getVertexTextureInfos(lua_State *L) return num_ret; } -static int _cocos2d_backend_ProgramState_new(lua_State *L) +static int _olua_fun_cocos2d_backend_ProgramState_new(lua_State *L) { olua_startinvoke(L); @@ -2198,7 +2510,7 @@ static int _cocos2d_backend_ProgramState_new(lua_State *L) olua_check_object(L, 1, &arg1, "ccb.Program"); - // ProgramState(cocos2d::backend::Program *program) + // cocos2d::backend::ProgramState(cocos2d::backend::Program *program) cocos2d::backend::ProgramState *ret = new cocos2d::backend::ProgramState(arg1); int num_ret = olua_push_object(L, ret, "ccb.ProgramState"); olua_postnew(L, ret); @@ -2208,7 +2520,7 @@ static int _cocos2d_backend_ProgramState_new(lua_State *L) return num_ret; } -static int _cocos2d_backend_ProgramState_setParameterAutoBinding(lua_State *L) +static int _olua_fun_cocos2d_backend_ProgramState_setParameterAutoBinding(lua_State *L) { olua_startinvoke(L); @@ -2228,12 +2540,12 @@ static int _cocos2d_backend_ProgramState_setParameterAutoBinding(lua_State *L) return 0; } -static int _cocos2d_backend_ProgramState_setTexture(lua_State *L) +static int _olua_fun_cocos2d_backend_ProgramState_setTexture(lua_State *L) { olua_startinvoke(L); cocos2d::backend::ProgramState *self = nullptr; - cocos2d::backend::UniformLocation arg1; /** uniformLocation */ + cocos2d::backend::UniformLocation *arg1; /** uniformLocation */ uint32_t arg2 = 0; /** slot */ cocos2d::backend::TextureBackend *arg3 = nullptr; /** texture */ @@ -2243,19 +2555,19 @@ static int _cocos2d_backend_ProgramState_setTexture(lua_State *L) olua_check_object(L, 4, &arg3, "ccb.TextureBackend"); // void setTexture(const cocos2d::backend::UniformLocation &uniformLocation, uint32_t slot, cocos2d::backend::TextureBackend *texture) - self->setTexture(arg1, arg2, arg3); + self->setTexture(*arg1, arg2, arg3); olua_endinvoke(L); return 0; } -static int _cocos2d_backend_ProgramState_setTextureArray(lua_State *L) +static int _olua_fun_cocos2d_backend_ProgramState_setTextureArray(lua_State *L) { olua_startinvoke(L); cocos2d::backend::ProgramState *self = nullptr; - cocos2d::backend::UniformLocation arg1; /** uniformLocation */ + cocos2d::backend::UniformLocation *arg1; /** uniformLocation */ std::vector arg2; /** slots */ std::vector arg3; /** textures */ @@ -2269,19 +2581,19 @@ static int _cocos2d_backend_ProgramState_setTextureArray(lua_State *L) }); // void setTextureArray(const cocos2d::backend::UniformLocation &uniformLocation, const std::vector &slots, const std::vector textures) - self->setTextureArray(arg1, arg2, arg3); + self->setTextureArray(*arg1, arg2, arg3); olua_endinvoke(L); return 0; } -static int _cocos2d_backend_ProgramState_setUniform(lua_State *L) +static int _olua_fun_cocos2d_backend_ProgramState_setUniform(lua_State *L) { olua_startinvoke(L); cocos2d::backend::ProgramState *self = nullptr; - cocos2d::backend::UniformLocation arg1; /** uniformLocation */ + cocos2d::backend::UniformLocation *arg1; /** uniformLocation */ void *arg2 = nullptr; /** data */ std::size_t arg3 = 0; /** size */ @@ -2291,38 +2603,47 @@ static int _cocos2d_backend_ProgramState_setUniform(lua_State *L) olua_check_integer(L, 4, &arg3); // void setUniform(const cocos2d::backend::UniformLocation &uniformLocation, const void *data, std::size_t size) - self->setUniform(arg1, arg2, arg3); + self->setUniform(*arg1, arg2, arg3); olua_endinvoke(L); return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_backend_ProgramState(lua_State *L) +static int _olua_cls_ccb_ProgramState(lua_State *L) { oluacls_class(L, "ccb.ProgramState"); - oluacls_func(L, "clone", _cocos2d_backend_ProgramState_clone); - oluacls_func(L, "getAttributeLocation", _cocos2d_backend_ProgramState_getAttributeLocation); - oluacls_func(L, "getFragmentTextureInfos", _cocos2d_backend_ProgramState_getFragmentTextureInfos); - oluacls_func(L, "getProgram", _cocos2d_backend_ProgramState_getProgram); - oluacls_func(L, "getUniformLocation", _cocos2d_backend_ProgramState_getUniformLocation); - oluacls_func(L, "getVertexLayout", _cocos2d_backend_ProgramState_getVertexLayout); - oluacls_func(L, "getVertexTextureInfos", _cocos2d_backend_ProgramState_getVertexTextureInfos); - oluacls_func(L, "new", _cocos2d_backend_ProgramState_new); - oluacls_func(L, "setParameterAutoBinding", _cocos2d_backend_ProgramState_setParameterAutoBinding); - oluacls_func(L, "setTexture", _cocos2d_backend_ProgramState_setTexture); - oluacls_func(L, "setTextureArray", _cocos2d_backend_ProgramState_setTextureArray); - oluacls_func(L, "setUniform", _cocos2d_backend_ProgramState_setUniform); - oluacls_prop(L, "fragmentTextureInfos", _cocos2d_backend_ProgramState_getFragmentTextureInfos, nullptr); - oluacls_prop(L, "program", _cocos2d_backend_ProgramState_getProgram, nullptr); - oluacls_prop(L, "vertexTextureInfos", _cocos2d_backend_ProgramState_getVertexTextureInfos, nullptr); + oluacls_func(L, "clone", _olua_fun_cocos2d_backend_ProgramState_clone); + oluacls_func(L, "getAttributeLocation", _olua_fun_cocos2d_backend_ProgramState_getAttributeLocation); + oluacls_func(L, "getFragmentTextureInfos", _olua_fun_cocos2d_backend_ProgramState_getFragmentTextureInfos); + oluacls_func(L, "getProgram", _olua_fun_cocos2d_backend_ProgramState_getProgram); + oluacls_func(L, "getUniformLocation", _olua_fun_cocos2d_backend_ProgramState_getUniformLocation); + oluacls_func(L, "getVertexLayout", _olua_fun_cocos2d_backend_ProgramState_getVertexLayout); + oluacls_func(L, "getVertexTextureInfos", _olua_fun_cocos2d_backend_ProgramState_getVertexTextureInfos); + oluacls_func(L, "new", _olua_fun_cocos2d_backend_ProgramState_new); + oluacls_func(L, "setParameterAutoBinding", _olua_fun_cocos2d_backend_ProgramState_setParameterAutoBinding); + oluacls_func(L, "setTexture", _olua_fun_cocos2d_backend_ProgramState_setTexture); + oluacls_func(L, "setTextureArray", _olua_fun_cocos2d_backend_ProgramState_setTextureArray); + oluacls_func(L, "setUniform", _olua_fun_cocos2d_backend_ProgramState_setUniform); + oluacls_prop(L, "fragmentTextureInfos", _olua_fun_cocos2d_backend_ProgramState_getFragmentTextureInfos, nullptr); + oluacls_prop(L, "program", _olua_fun_cocos2d_backend_ProgramState_getProgram, nullptr); + oluacls_prop(L, "vertexTextureInfos", _olua_fun_cocos2d_backend_ProgramState_getVertexTextureInfos, nullptr); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccb_ProgramState(lua_State *L) +{ + olua_require(L, "cocos2d_backend", luaopen_cocos2d_backend); + if (!olua_getclass(L, "ccb.ProgramState")) { + luaL_error(L, "class not found: cocos2d::backend::ProgramState"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_backend_Program_getActiveAttributes(lua_State *L) +static int _olua_fun_cocos2d_backend_Program_getActiveAttributes(lua_State *L) { olua_startinvoke(L); @@ -2334,7 +2655,7 @@ static int _cocos2d_backend_Program_getActiveAttributes(lua_State *L) const std::unordered_map ret = self->getActiveAttributes(); int num_ret = olua_push_map(L, ret, [L](std::string &arg1, cocos2d::backend::AttributeBindInfo &arg2) { olua_push_string(L, arg1); - olua_pushcopy_object(L, arg2, "ccb.AttributeBindInfo"); + olua_copy_object(L, arg2, "ccb.AttributeBindInfo"); }); olua_endinvoke(L); @@ -2342,7 +2663,7 @@ static int _cocos2d_backend_Program_getActiveAttributes(lua_State *L) return num_ret; } -static int _cocos2d_backend_Program_getActiveUniformInfo(lua_State *L) +static int _olua_fun_cocos2d_backend_Program_getActiveUniformInfo(lua_State *L) { olua_startinvoke(L); @@ -2363,7 +2684,7 @@ static int _cocos2d_backend_Program_getActiveUniformInfo(lua_State *L) return num_ret; } -static int _cocos2d_backend_Program_getAllActiveUniformInfo(lua_State *L) +static int _olua_fun_cocos2d_backend_Program_getAllActiveUniformInfo(lua_State *L) { olua_startinvoke(L); @@ -2377,7 +2698,7 @@ static int _cocos2d_backend_Program_getAllActiveUniformInfo(lua_State *L) const std::unordered_map &ret = self->getAllActiveUniformInfo(arg1); int num_ret = olua_push_map(L, ret, [L](std::string &arg1, cocos2d::backend::UniformInfo &arg2) { olua_push_string(L, arg1); - olua_pushcopy_object(L, arg2, "ccb.UniformInfo"); + olua_copy_object(L, arg2, "ccb.UniformInfo"); }); olua_endinvoke(L); @@ -2385,7 +2706,7 @@ static int _cocos2d_backend_Program_getAllActiveUniformInfo(lua_State *L) return num_ret; } -static int _cocos2d_backend_Program_getAttributeLocation$1(lua_State *L) +static int _olua_fun_cocos2d_backend_Program_getAttributeLocation$1(lua_State *L) { olua_startinvoke(L); @@ -2404,7 +2725,7 @@ static int _cocos2d_backend_Program_getAttributeLocation$1(lua_State *L) return num_ret; } -static int _cocos2d_backend_Program_getAttributeLocation$2(lua_State *L) +static int _olua_fun_cocos2d_backend_Program_getAttributeLocation$2(lua_State *L) { olua_startinvoke(L); @@ -2423,19 +2744,19 @@ static int _cocos2d_backend_Program_getAttributeLocation$2(lua_State *L) return num_ret; } -static int _cocos2d_backend_Program_getAttributeLocation(lua_State *L) +static int _olua_fun_cocos2d_backend_Program_getAttributeLocation(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { if ((olua_is_string(L, 2))) { // int getAttributeLocation(const std::string &name) - return _cocos2d_backend_Program_getAttributeLocation$1(L); + return _olua_fun_cocos2d_backend_Program_getAttributeLocation$1(L); } // if ((olua_is_enum(L, 2))) { // int getAttributeLocation(cocos2d::backend::Attribute name) - return _cocos2d_backend_Program_getAttributeLocation$2(L); + return _olua_fun_cocos2d_backend_Program_getAttributeLocation$2(L); // } } @@ -2444,7 +2765,7 @@ static int _cocos2d_backend_Program_getAttributeLocation(lua_State *L) return 0; } -static int _cocos2d_backend_Program_getBuiltinProgram(lua_State *L) +static int _olua_fun_cocos2d_backend_Program_getBuiltinProgram(lua_State *L) { olua_startinvoke(L); @@ -2461,7 +2782,7 @@ static int _cocos2d_backend_Program_getBuiltinProgram(lua_State *L) return num_ret; } -static int _cocos2d_backend_Program_getFragmentShader(lua_State *L) +static int _olua_fun_cocos2d_backend_Program_getFragmentShader(lua_State *L) { olua_startinvoke(L); @@ -2478,7 +2799,7 @@ static int _cocos2d_backend_Program_getFragmentShader(lua_State *L) return num_ret; } -static int _cocos2d_backend_Program_getMaxFragmentLocation(lua_State *L) +static int _olua_fun_cocos2d_backend_Program_getMaxFragmentLocation(lua_State *L) { olua_startinvoke(L); @@ -2495,7 +2816,7 @@ static int _cocos2d_backend_Program_getMaxFragmentLocation(lua_State *L) return num_ret; } -static int _cocos2d_backend_Program_getMaxVertexLocation(lua_State *L) +static int _olua_fun_cocos2d_backend_Program_getMaxVertexLocation(lua_State *L) { olua_startinvoke(L); @@ -2512,7 +2833,7 @@ static int _cocos2d_backend_Program_getMaxVertexLocation(lua_State *L) return num_ret; } -static int _cocos2d_backend_Program_getProgramType(lua_State *L) +static int _olua_fun_cocos2d_backend_Program_getProgramType(lua_State *L) { olua_startinvoke(L); @@ -2529,7 +2850,7 @@ static int _cocos2d_backend_Program_getProgramType(lua_State *L) return num_ret; } -static int _cocos2d_backend_Program_getUniformBufferSize(lua_State *L) +static int _olua_fun_cocos2d_backend_Program_getUniformBufferSize(lua_State *L) { olua_startinvoke(L); @@ -2548,7 +2869,7 @@ static int _cocos2d_backend_Program_getUniformBufferSize(lua_State *L) return num_ret; } -static int _cocos2d_backend_Program_getUniformLocation$1(lua_State *L) +static int _olua_fun_cocos2d_backend_Program_getUniformLocation$1(lua_State *L) { olua_startinvoke(L); @@ -2560,14 +2881,14 @@ static int _cocos2d_backend_Program_getUniformLocation$1(lua_State *L) // cocos2d::backend::UniformLocation getUniformLocation(const std::string &uniform) cocos2d::backend::UniformLocation ret = self->getUniformLocation(arg1); - int num_ret = olua_pushcopy_object(L, ret, "ccb.UniformLocation"); + int num_ret = olua_copy_object(L, ret, "ccb.UniformLocation"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_backend_Program_getUniformLocation$2(lua_State *L) +static int _olua_fun_cocos2d_backend_Program_getUniformLocation$2(lua_State *L) { olua_startinvoke(L); @@ -2579,26 +2900,26 @@ static int _cocos2d_backend_Program_getUniformLocation$2(lua_State *L) // cocos2d::backend::UniformLocation getUniformLocation(cocos2d::backend::Uniform name) cocos2d::backend::UniformLocation ret = self->getUniformLocation(arg1); - int num_ret = olua_pushcopy_object(L, ret, "ccb.UniformLocation"); + int num_ret = olua_copy_object(L, ret, "ccb.UniformLocation"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_backend_Program_getUniformLocation(lua_State *L) +static int _olua_fun_cocos2d_backend_Program_getUniformLocation(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { if ((olua_is_string(L, 2))) { // cocos2d::backend::UniformLocation getUniformLocation(const std::string &uniform) - return _cocos2d_backend_Program_getUniformLocation$1(L); + return _olua_fun_cocos2d_backend_Program_getUniformLocation$1(L); } // if ((olua_is_enum(L, 2))) { // cocos2d::backend::UniformLocation getUniformLocation(cocos2d::backend::Uniform name) - return _cocos2d_backend_Program_getUniformLocation$2(L); + return _olua_fun_cocos2d_backend_Program_getUniformLocation$2(L); // } } @@ -2607,7 +2928,7 @@ static int _cocos2d_backend_Program_getUniformLocation(lua_State *L) return 0; } -static int _cocos2d_backend_Program_getVertexShader(lua_State *L) +static int _olua_fun_cocos2d_backend_Program_getVertexShader(lua_State *L) { olua_startinvoke(L); @@ -2624,34 +2945,43 @@ static int _cocos2d_backend_Program_getVertexShader(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_backend_Program(lua_State *L) +static int _olua_cls_ccb_Program(lua_State *L) { oluacls_class(L, "ccb.Program"); - oluacls_func(L, "getActiveAttributes", _cocos2d_backend_Program_getActiveAttributes); - oluacls_func(L, "getActiveUniformInfo", _cocos2d_backend_Program_getActiveUniformInfo); - oluacls_func(L, "getAllActiveUniformInfo", _cocos2d_backend_Program_getAllActiveUniformInfo); - oluacls_func(L, "getAttributeLocation", _cocos2d_backend_Program_getAttributeLocation); - oluacls_func(L, "getBuiltinProgram", _cocos2d_backend_Program_getBuiltinProgram); - oluacls_func(L, "getFragmentShader", _cocos2d_backend_Program_getFragmentShader); - oluacls_func(L, "getMaxFragmentLocation", _cocos2d_backend_Program_getMaxFragmentLocation); - oluacls_func(L, "getMaxVertexLocation", _cocos2d_backend_Program_getMaxVertexLocation); - oluacls_func(L, "getProgramType", _cocos2d_backend_Program_getProgramType); - oluacls_func(L, "getUniformBufferSize", _cocos2d_backend_Program_getUniformBufferSize); - oluacls_func(L, "getUniformLocation", _cocos2d_backend_Program_getUniformLocation); - oluacls_func(L, "getVertexShader", _cocos2d_backend_Program_getVertexShader); - oluacls_prop(L, "activeAttributes", _cocos2d_backend_Program_getActiveAttributes, nullptr); - oluacls_prop(L, "fragmentShader", _cocos2d_backend_Program_getFragmentShader, nullptr); - oluacls_prop(L, "maxFragmentLocation", _cocos2d_backend_Program_getMaxFragmentLocation, nullptr); - oluacls_prop(L, "maxVertexLocation", _cocos2d_backend_Program_getMaxVertexLocation, nullptr); - oluacls_prop(L, "programType", _cocos2d_backend_Program_getProgramType, nullptr); - oluacls_prop(L, "vertexShader", _cocos2d_backend_Program_getVertexShader, nullptr); + oluacls_func(L, "getActiveAttributes", _olua_fun_cocos2d_backend_Program_getActiveAttributes); + oluacls_func(L, "getActiveUniformInfo", _olua_fun_cocos2d_backend_Program_getActiveUniformInfo); + oluacls_func(L, "getAllActiveUniformInfo", _olua_fun_cocos2d_backend_Program_getAllActiveUniformInfo); + oluacls_func(L, "getAttributeLocation", _olua_fun_cocos2d_backend_Program_getAttributeLocation); + oluacls_func(L, "getBuiltinProgram", _olua_fun_cocos2d_backend_Program_getBuiltinProgram); + oluacls_func(L, "getFragmentShader", _olua_fun_cocos2d_backend_Program_getFragmentShader); + oluacls_func(L, "getMaxFragmentLocation", _olua_fun_cocos2d_backend_Program_getMaxFragmentLocation); + oluacls_func(L, "getMaxVertexLocation", _olua_fun_cocos2d_backend_Program_getMaxVertexLocation); + oluacls_func(L, "getProgramType", _olua_fun_cocos2d_backend_Program_getProgramType); + oluacls_func(L, "getUniformBufferSize", _olua_fun_cocos2d_backend_Program_getUniformBufferSize); + oluacls_func(L, "getUniformLocation", _olua_fun_cocos2d_backend_Program_getUniformLocation); + oluacls_func(L, "getVertexShader", _olua_fun_cocos2d_backend_Program_getVertexShader); + oluacls_prop(L, "activeAttributes", _olua_fun_cocos2d_backend_Program_getActiveAttributes, nullptr); + oluacls_prop(L, "fragmentShader", _olua_fun_cocos2d_backend_Program_getFragmentShader, nullptr); + oluacls_prop(L, "maxFragmentLocation", _olua_fun_cocos2d_backend_Program_getMaxFragmentLocation, nullptr); + oluacls_prop(L, "maxVertexLocation", _olua_fun_cocos2d_backend_Program_getMaxVertexLocation, nullptr); + oluacls_prop(L, "programType", _olua_fun_cocos2d_backend_Program_getProgramType, nullptr); + oluacls_prop(L, "vertexShader", _olua_fun_cocos2d_backend_Program_getVertexShader, nullptr); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccb_Program(lua_State *L) +{ + olua_require(L, "cocos2d_backend", luaopen_cocos2d_backend); + if (!olua_getclass(L, "ccb.Program")) { + luaL_error(L, "class not found: cocos2d::backend::Program"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_backend_TextureBackend_generateMipmaps(lua_State *L) +static int _olua_fun_cocos2d_backend_TextureBackend_generateMipmaps(lua_State *L) { olua_startinvoke(L); @@ -2667,7 +2997,7 @@ static int _cocos2d_backend_TextureBackend_generateMipmaps(lua_State *L) return 0; } -static int _cocos2d_backend_TextureBackend_getBytes(lua_State *L) +static int _olua_fun_cocos2d_backend_TextureBackend_getBytes(lua_State *L) { olua_startinvoke(L); @@ -2689,17 +3019,18 @@ static int _cocos2d_backend_TextureBackend_getBytes(lua_State *L) void *cb_store = (void *)self; std::string cb_tag = "Bytes"; - std::string cb_name = olua_setcallback(L, cb_store, 7, cb_tag.c_str(), OLUA_TAG_NEW); + std::string cb_name = olua_setcallback(L, cb_store, 7, cb_tag.c_str(), OLUA_TAG_NEW); olua_Context cb_ctx = olua_context(L); - arg6 = [cb_store, cb_name, cb_ctx](const unsigned char *arg1, std::size_t arg2, std::size_t arg3) { + // lua_State *ML = olua_mainthread(L); + arg6 = [cb_store, cb_name, cb_ctx /*, ML */](const unsigned char *cb_arg1, std::size_t cb_arg2, std::size_t cb_arg3) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); if (olua_contextequal(L, cb_ctx)) { int top = lua_gettop(L); - olua_push_string(L, arg1); - olua_push_integer(L, arg2); - olua_push_integer(L, arg3); + olua_push_string(L, cb_arg1); + olua_push_integer(L, cb_arg2); + olua_push_integer(L, cb_arg3); olua_callback(L, cb_store, cb_name.c_str(), 3); @@ -2709,7 +3040,7 @@ static int _cocos2d_backend_TextureBackend_getBytes(lua_State *L) } }; - // void getBytes(std::size_t x, std::size_t y, std::size_t width, std::size_t height, bool flipImage, @localvar std::function callback) + // void getBytes(std::size_t x, std::size_t y, std::size_t width, std::size_t height, bool flipImage, std::function callback) self->getBytes(arg1, arg2, arg3, arg4, arg5, arg6); olua_endinvoke(L); @@ -2717,7 +3048,7 @@ static int _cocos2d_backend_TextureBackend_getBytes(lua_State *L) return 0; } -static int _cocos2d_backend_TextureBackend_getTextureFormat(lua_State *L) +static int _olua_fun_cocos2d_backend_TextureBackend_getTextureFormat(lua_State *L) { olua_startinvoke(L); @@ -2734,7 +3065,7 @@ static int _cocos2d_backend_TextureBackend_getTextureFormat(lua_State *L) return num_ret; } -static int _cocos2d_backend_TextureBackend_getTextureType(lua_State *L) +static int _olua_fun_cocos2d_backend_TextureBackend_getTextureType(lua_State *L) { olua_startinvoke(L); @@ -2751,7 +3082,7 @@ static int _cocos2d_backend_TextureBackend_getTextureType(lua_State *L) return num_ret; } -static int _cocos2d_backend_TextureBackend_getTextureUsage(lua_State *L) +static int _olua_fun_cocos2d_backend_TextureBackend_getTextureUsage(lua_State *L) { olua_startinvoke(L); @@ -2768,7 +3099,7 @@ static int _cocos2d_backend_TextureBackend_getTextureUsage(lua_State *L) return num_ret; } -static int _cocos2d_backend_TextureBackend_hasMipmaps(lua_State *L) +static int _olua_fun_cocos2d_backend_TextureBackend_hasMipmaps(lua_State *L) { olua_startinvoke(L); @@ -2785,63 +3116,72 @@ static int _cocos2d_backend_TextureBackend_hasMipmaps(lua_State *L) return num_ret; } -static int _cocos2d_backend_TextureBackend_updateSamplerDescriptor(lua_State *L) +static int _olua_fun_cocos2d_backend_TextureBackend_updateSamplerDescriptor(lua_State *L) { olua_startinvoke(L); cocos2d::backend::TextureBackend *self = nullptr; - cocos2d::backend::SamplerDescriptor arg1; /** sampler */ + cocos2d::backend::SamplerDescriptor *arg1; /** sampler */ olua_to_object(L, 1, &self, "ccb.TextureBackend"); olua_check_object(L, 2, &arg1, "ccb.SamplerDescriptor"); // void updateSamplerDescriptor(const cocos2d::backend::SamplerDescriptor &sampler) - self->updateSamplerDescriptor(arg1); + self->updateSamplerDescriptor(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_backend_TextureBackend_updateTextureDescriptor(lua_State *L) +static int _olua_fun_cocos2d_backend_TextureBackend_updateTextureDescriptor(lua_State *L) { olua_startinvoke(L); cocos2d::backend::TextureBackend *self = nullptr; - cocos2d::backend::TextureDescriptor arg1; /** descriptor */ + cocos2d::backend::TextureDescriptor *arg1; /** descriptor */ olua_to_object(L, 1, &self, "ccb.TextureBackend"); olua_check_object(L, 2, &arg1, "ccb.TextureDescriptor"); // void updateTextureDescriptor(const cocos2d::backend::TextureDescriptor &descriptor) - self->updateTextureDescriptor(arg1); + self->updateTextureDescriptor(*arg1); olua_endinvoke(L); return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_backend_TextureBackend(lua_State *L) +static int _olua_cls_ccb_TextureBackend(lua_State *L) { oluacls_class(L, "ccb.TextureBackend"); - oluacls_func(L, "generateMipmaps", _cocos2d_backend_TextureBackend_generateMipmaps); - oluacls_func(L, "getBytes", _cocos2d_backend_TextureBackend_getBytes); - oluacls_func(L, "getTextureFormat", _cocos2d_backend_TextureBackend_getTextureFormat); - oluacls_func(L, "getTextureType", _cocos2d_backend_TextureBackend_getTextureType); - oluacls_func(L, "getTextureUsage", _cocos2d_backend_TextureBackend_getTextureUsage); - oluacls_func(L, "hasMipmaps", _cocos2d_backend_TextureBackend_hasMipmaps); - oluacls_func(L, "updateSamplerDescriptor", _cocos2d_backend_TextureBackend_updateSamplerDescriptor); - oluacls_func(L, "updateTextureDescriptor", _cocos2d_backend_TextureBackend_updateTextureDescriptor); - oluacls_prop(L, "textureFormat", _cocos2d_backend_TextureBackend_getTextureFormat, nullptr); - oluacls_prop(L, "textureType", _cocos2d_backend_TextureBackend_getTextureType, nullptr); - oluacls_prop(L, "textureUsage", _cocos2d_backend_TextureBackend_getTextureUsage, nullptr); + oluacls_func(L, "generateMipmaps", _olua_fun_cocos2d_backend_TextureBackend_generateMipmaps); + oluacls_func(L, "getBytes", _olua_fun_cocos2d_backend_TextureBackend_getBytes); + oluacls_func(L, "getTextureFormat", _olua_fun_cocos2d_backend_TextureBackend_getTextureFormat); + oluacls_func(L, "getTextureType", _olua_fun_cocos2d_backend_TextureBackend_getTextureType); + oluacls_func(L, "getTextureUsage", _olua_fun_cocos2d_backend_TextureBackend_getTextureUsage); + oluacls_func(L, "hasMipmaps", _olua_fun_cocos2d_backend_TextureBackend_hasMipmaps); + oluacls_func(L, "updateSamplerDescriptor", _olua_fun_cocos2d_backend_TextureBackend_updateSamplerDescriptor); + oluacls_func(L, "updateTextureDescriptor", _olua_fun_cocos2d_backend_TextureBackend_updateTextureDescriptor); + oluacls_prop(L, "textureFormat", _olua_fun_cocos2d_backend_TextureBackend_getTextureFormat, nullptr); + oluacls_prop(L, "textureType", _olua_fun_cocos2d_backend_TextureBackend_getTextureType, nullptr); + oluacls_prop(L, "textureUsage", _olua_fun_cocos2d_backend_TextureBackend_getTextureUsage, nullptr); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccb_TextureBackend(lua_State *L) +{ + olua_require(L, "cocos2d_backend", luaopen_cocos2d_backend); + if (!olua_getclass(L, "ccb.TextureBackend")) { + luaL_error(L, "class not found: cocos2d::backend::TextureBackend"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_backend_Texture2DBackend_getHeight(lua_State *L) +static int _olua_fun_cocos2d_backend_Texture2DBackend_getHeight(lua_State *L) { olua_startinvoke(L); @@ -2858,7 +3198,7 @@ static int _cocos2d_backend_Texture2DBackend_getHeight(lua_State *L) return num_ret; } -static int _cocos2d_backend_Texture2DBackend_getWidth(lua_State *L) +static int _olua_fun_cocos2d_backend_Texture2DBackend_getWidth(lua_State *L) { olua_startinvoke(L); @@ -2875,7 +3215,7 @@ static int _cocos2d_backend_Texture2DBackend_getWidth(lua_State *L) return num_ret; } -static int _cocos2d_backend_Texture2DBackend_updateCompressedData(lua_State *L) +static int _olua_fun_cocos2d_backend_Texture2DBackend_updateCompressedData(lua_State *L) { olua_startinvoke(L); @@ -2887,7 +3227,7 @@ static int _cocos2d_backend_Texture2DBackend_updateCompressedData(lua_State *L) std::size_t arg5 = 0; /** level */ olua_to_object(L, 1, &self, "ccb.Texture2DBackend"); - olua_check_pointer(L, 2, &arg1, "olua.uint8_t"); + olua_check_valueptr(L, 2, &arg1, "olua.uint8"); olua_check_integer(L, 3, &arg2); olua_check_integer(L, 4, &arg3); olua_check_integer(L, 5, &arg4); @@ -2901,7 +3241,7 @@ static int _cocos2d_backend_Texture2DBackend_updateCompressedData(lua_State *L) return 0; } -static int _cocos2d_backend_Texture2DBackend_updateCompressedSubData(lua_State *L) +static int _olua_fun_cocos2d_backend_Texture2DBackend_updateCompressedSubData(lua_State *L) { olua_startinvoke(L); @@ -2921,7 +3261,7 @@ static int _cocos2d_backend_Texture2DBackend_updateCompressedSubData(lua_State * olua_check_integer(L, 5, &arg4); olua_check_integer(L, 6, &arg5); olua_check_integer(L, 7, &arg6); - olua_check_pointer(L, 8, &arg7, "olua.uint8_t"); + olua_check_valueptr(L, 8, &arg7, "olua.uint8"); // void updateCompressedSubData(std::size_t xoffset, std::size_t yoffset, std::size_t width, std::size_t height, std::size_t dataLen, std::size_t level, uint8_t *data) self->updateCompressedSubData(arg1, arg2, arg3, arg4, arg5, arg6, arg7); @@ -2931,7 +3271,7 @@ static int _cocos2d_backend_Texture2DBackend_updateCompressedSubData(lua_State * return 0; } -static int _cocos2d_backend_Texture2DBackend_updateData(lua_State *L) +static int _olua_fun_cocos2d_backend_Texture2DBackend_updateData(lua_State *L) { olua_startinvoke(L); @@ -2942,7 +3282,7 @@ static int _cocos2d_backend_Texture2DBackend_updateData(lua_State *L) std::size_t arg4 = 0; /** level */ olua_to_object(L, 1, &self, "ccb.Texture2DBackend"); - olua_check_pointer(L, 2, &arg1, "olua.uint8_t"); + olua_check_valueptr(L, 2, &arg1, "olua.uint8"); olua_check_integer(L, 3, &arg2); olua_check_integer(L, 4, &arg3); olua_check_integer(L, 5, &arg4); @@ -2955,7 +3295,7 @@ static int _cocos2d_backend_Texture2DBackend_updateData(lua_State *L) return 0; } -static int _cocos2d_backend_Texture2DBackend_updateSubData(lua_State *L) +static int _olua_fun_cocos2d_backend_Texture2DBackend_updateSubData(lua_State *L) { olua_startinvoke(L); @@ -2973,7 +3313,7 @@ static int _cocos2d_backend_Texture2DBackend_updateSubData(lua_State *L) olua_check_integer(L, 4, &arg3); olua_check_integer(L, 5, &arg4); olua_check_integer(L, 6, &arg5); - olua_check_pointer(L, 7, &arg6, "olua.uint8_t"); + olua_check_valueptr(L, 7, &arg6, "olua.uint8"); // void updateSubData(std::size_t xoffset, std::size_t yoffset, std::size_t width, std::size_t height, std::size_t level, uint8_t *data) self->updateSubData(arg1, arg2, arg3, arg4, arg5, arg6); @@ -2983,24 +3323,33 @@ static int _cocos2d_backend_Texture2DBackend_updateSubData(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_backend_Texture2DBackend(lua_State *L) +static int _olua_cls_ccb_Texture2DBackend(lua_State *L) { oluacls_class(L, "ccb.Texture2DBackend"); - oluacls_func(L, "getHeight", _cocos2d_backend_Texture2DBackend_getHeight); - oluacls_func(L, "getWidth", _cocos2d_backend_Texture2DBackend_getWidth); - oluacls_func(L, "updateCompressedData", _cocos2d_backend_Texture2DBackend_updateCompressedData); - oluacls_func(L, "updateCompressedSubData", _cocos2d_backend_Texture2DBackend_updateCompressedSubData); - oluacls_func(L, "updateData", _cocos2d_backend_Texture2DBackend_updateData); - oluacls_func(L, "updateSubData", _cocos2d_backend_Texture2DBackend_updateSubData); - oluacls_prop(L, "height", _cocos2d_backend_Texture2DBackend_getHeight, nullptr); - oluacls_prop(L, "width", _cocos2d_backend_Texture2DBackend_getWidth, nullptr); + oluacls_func(L, "getHeight", _olua_fun_cocos2d_backend_Texture2DBackend_getHeight); + oluacls_func(L, "getWidth", _olua_fun_cocos2d_backend_Texture2DBackend_getWidth); + oluacls_func(L, "updateCompressedData", _olua_fun_cocos2d_backend_Texture2DBackend_updateCompressedData); + oluacls_func(L, "updateCompressedSubData", _olua_fun_cocos2d_backend_Texture2DBackend_updateCompressedSubData); + oluacls_func(L, "updateData", _olua_fun_cocos2d_backend_Texture2DBackend_updateData); + oluacls_func(L, "updateSubData", _olua_fun_cocos2d_backend_Texture2DBackend_updateSubData); + oluacls_prop(L, "height", _olua_fun_cocos2d_backend_Texture2DBackend_getHeight, nullptr); + oluacls_prop(L, "width", _olua_fun_cocos2d_backend_Texture2DBackend_getWidth, nullptr); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccb_Texture2DBackend(lua_State *L) +{ + olua_require(L, "cocos2d_backend", luaopen_cocos2d_backend); + if (!olua_getclass(L, "ccb.Texture2DBackend")) { + luaL_error(L, "class not found: cocos2d::backend::Texture2DBackend"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_backend_TextureCubemapBackend_updateFaceData(lua_State *L) +static int _olua_fun_cocos2d_backend_TextureCubemapBackend_updateFaceData(lua_State *L) { olua_startinvoke(L); @@ -3020,59 +3369,68 @@ static int _cocos2d_backend_TextureCubemapBackend_updateFaceData(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_backend_TextureCubemapBackend(lua_State *L) +static int _olua_cls_ccb_TextureCubemapBackend(lua_State *L) { oluacls_class(L, "ccb.TextureCubemapBackend"); - oluacls_func(L, "updateFaceData", _cocos2d_backend_TextureCubemapBackend_updateFaceData); + oluacls_func(L, "updateFaceData", _olua_fun_cocos2d_backend_TextureCubemapBackend_updateFaceData); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccb_TextureCubemapBackend(lua_State *L) +{ + olua_require(L, "cocos2d_backend", luaopen_cocos2d_backend); + if (!olua_getclass(L, "ccb.TextureCubemapBackend")) { + luaL_error(L, "class not found: cocos2d::backend::TextureCubemapBackend"); + } + return 1; +} OLUA_END_DECLS OLUA_BEGIN_DECLS OLUA_LIB int luaopen_cocos2d_backend(lua_State *L) { - olua_require(L, "ccb.UniformLocation", luaopen_cocos2d_backend_UniformLocation); - olua_require(L, "ccb.BufferUsage", luaopen_cocos2d_backend_BufferUsage); - olua_require(L, "ccb.BufferType", luaopen_cocos2d_backend_BufferType); - olua_require(L, "ccb.ShaderStage", luaopen_cocos2d_backend_ShaderStage); - olua_require(L, "ccb.VertexFormat", luaopen_cocos2d_backend_VertexFormat); - olua_require(L, "ccb.PixelFormat", luaopen_cocos2d_backend_PixelFormat); - olua_require(L, "ccb.TextureUsage", luaopen_cocos2d_backend_TextureUsage); - olua_require(L, "ccb.IndexFormat", luaopen_cocos2d_backend_IndexFormat); - olua_require(L, "ccb.VertexStepMode", luaopen_cocos2d_backend_VertexStepMode); - olua_require(L, "ccb.PrimitiveType", luaopen_cocos2d_backend_PrimitiveType); - olua_require(L, "ccb.TextureType", luaopen_cocos2d_backend_TextureType); - olua_require(L, "ccb.SamplerAddressMode", luaopen_cocos2d_backend_SamplerAddressMode); - olua_require(L, "ccb.SamplerFilter", luaopen_cocos2d_backend_SamplerFilter); - olua_require(L, "ccb.StencilOperation", luaopen_cocos2d_backend_StencilOperation); - olua_require(L, "ccb.CompareFunction", luaopen_cocos2d_backend_CompareFunction); - olua_require(L, "ccb.BlendOperation", luaopen_cocos2d_backend_BlendOperation); - olua_require(L, "ccb.BlendFactor", luaopen_cocos2d_backend_BlendFactor); - olua_require(L, "ccb.ColorWriteMask", luaopen_cocos2d_backend_ColorWriteMask); - olua_require(L, "ccb.CullMode", luaopen_cocos2d_backend_CullMode); - olua_require(L, "ccb.Winding", luaopen_cocos2d_backend_Winding); - olua_require(L, "ccb.TextureCubeFace", luaopen_cocos2d_backend_TextureCubeFace); - olua_require(L, "ccb.ProgramType", luaopen_cocos2d_backend_ProgramType); - olua_require(L, "ccb.Uniform", luaopen_cocos2d_backend_Uniform); - olua_require(L, "ccb.Attribute", luaopen_cocos2d_backend_Attribute); - olua_require(L, "ccb.FeatureType", luaopen_cocos2d_backend_FeatureType); - olua_require(L, "ccb.Buffer", luaopen_cocos2d_backend_Buffer); - olua_require(L, "ccb.RenderPipeline", luaopen_cocos2d_backend_RenderPipeline); - olua_require(L, "ccb.DepthStencilState", luaopen_cocos2d_backend_DepthStencilState); - olua_require(L, "ccb.VertexLayout", luaopen_cocos2d_backend_VertexLayout); - olua_require(L, "ccb.CommandBuffer", luaopen_cocos2d_backend_CommandBuffer); - olua_require(L, "ccb.Device", luaopen_cocos2d_backend_Device); - olua_require(L, "ccb.DeviceInfo", luaopen_cocos2d_backend_DeviceInfo); - olua_require(L, "ccb.ShaderCache", luaopen_cocos2d_backend_ShaderCache); - olua_require(L, "ccb.ShaderModule", luaopen_cocos2d_backend_ShaderModule); - olua_require(L, "ccb.ProgramCache", luaopen_cocos2d_backend_ProgramCache); - olua_require(L, "ccb.ProgramState", luaopen_cocos2d_backend_ProgramState); - olua_require(L, "ccb.Program", luaopen_cocos2d_backend_Program); - olua_require(L, "ccb.TextureBackend", luaopen_cocos2d_backend_TextureBackend); - olua_require(L, "ccb.Texture2DBackend", luaopen_cocos2d_backend_Texture2DBackend); - olua_require(L, "ccb.TextureCubemapBackend", luaopen_cocos2d_backend_TextureCubemapBackend); + olua_require(L, "ccb.UniformLocation", _olua_cls_ccb_UniformLocation); + olua_require(L, "ccb.BufferUsage", _olua_cls_ccb_BufferUsage); + olua_require(L, "ccb.BufferType", _olua_cls_ccb_BufferType); + olua_require(L, "ccb.ShaderStage", _olua_cls_ccb_ShaderStage); + olua_require(L, "ccb.VertexFormat", _olua_cls_ccb_VertexFormat); + olua_require(L, "ccb.PixelFormat", _olua_cls_ccb_PixelFormat); + olua_require(L, "ccb.TextureUsage", _olua_cls_ccb_TextureUsage); + olua_require(L, "ccb.IndexFormat", _olua_cls_ccb_IndexFormat); + olua_require(L, "ccb.VertexStepMode", _olua_cls_ccb_VertexStepMode); + olua_require(L, "ccb.PrimitiveType", _olua_cls_ccb_PrimitiveType); + olua_require(L, "ccb.TextureType", _olua_cls_ccb_TextureType); + olua_require(L, "ccb.SamplerAddressMode", _olua_cls_ccb_SamplerAddressMode); + olua_require(L, "ccb.SamplerFilter", _olua_cls_ccb_SamplerFilter); + olua_require(L, "ccb.StencilOperation", _olua_cls_ccb_StencilOperation); + olua_require(L, "ccb.CompareFunction", _olua_cls_ccb_CompareFunction); + olua_require(L, "ccb.BlendOperation", _olua_cls_ccb_BlendOperation); + olua_require(L, "ccb.BlendFactor", _olua_cls_ccb_BlendFactor); + olua_require(L, "ccb.ColorWriteMask", _olua_cls_ccb_ColorWriteMask); + olua_require(L, "ccb.CullMode", _olua_cls_ccb_CullMode); + olua_require(L, "ccb.Winding", _olua_cls_ccb_Winding); + olua_require(L, "ccb.TextureCubeFace", _olua_cls_ccb_TextureCubeFace); + olua_require(L, "ccb.ProgramType", _olua_cls_ccb_ProgramType); + olua_require(L, "ccb.Uniform", _olua_cls_ccb_Uniform); + olua_require(L, "ccb.Attribute", _olua_cls_ccb_Attribute); + olua_require(L, "ccb.FeatureType", _olua_cls_ccb_FeatureType); + olua_require(L, "ccb.Buffer", _olua_cls_ccb_Buffer); + olua_require(L, "ccb.RenderPipeline", _olua_cls_ccb_RenderPipeline); + olua_require(L, "ccb.DepthStencilState", _olua_cls_ccb_DepthStencilState); + olua_require(L, "ccb.VertexLayout", _olua_cls_ccb_VertexLayout); + olua_require(L, "ccb.CommandBuffer", _olua_cls_ccb_CommandBuffer); + olua_require(L, "ccb.Device", _olua_cls_ccb_Device); + olua_require(L, "ccb.DeviceInfo", _olua_cls_ccb_DeviceInfo); + olua_require(L, "ccb.ShaderCache", _olua_cls_ccb_ShaderCache); + olua_require(L, "ccb.ShaderModule", _olua_cls_ccb_ShaderModule); + olua_require(L, "ccb.ProgramCache", _olua_cls_ccb_ProgramCache); + olua_require(L, "ccb.ProgramState", _olua_cls_ccb_ProgramState); + olua_require(L, "ccb.Program", _olua_cls_ccb_Program); + olua_require(L, "ccb.TextureBackend", _olua_cls_ccb_TextureBackend); + olua_require(L, "ccb.Texture2DBackend", _olua_cls_ccb_Texture2DBackend); + olua_require(L, "ccb.TextureCubemapBackend", _olua_cls_ccb_TextureCubemapBackend); return 0; } diff --git a/frameworks/cclua/src/lua-bindings/lua_cocos2d_backend.h b/frameworks/cclua/src/lua-bindings/lua_cocos2d_backend.h index 755826c9..fa866165 100644 --- a/frameworks/cclua/src/lua-bindings/lua_cocos2d_backend.h +++ b/frameworks/cclua/src/lua-bindings/lua_cocos2d_backend.h @@ -1,5 +1,5 @@ // -// AUTO BUILD, DON'T MODIFY! +// AUTO GENERATED, DO NOT MODIFY! // #ifndef __AUTO_GEN_LUA_COCOS2D_BACKEND_H__ #define __AUTO_GEN_LUA_COCOS2D_BACKEND_H__ diff --git a/frameworks/cclua/src/lua-bindings/lua_cocos2d_physics.cpp b/frameworks/cclua/src/lua-bindings/lua_cocos2d_physics.cpp index bed329cc..223296c6 100644 --- a/frameworks/cclua/src/lua-bindings/lua_cocos2d_physics.cpp +++ b/frameworks/cclua/src/lua-bindings/lua_cocos2d_physics.cpp @@ -1,5 +1,5 @@ // -// AUTO BUILD, DON'T MODIFY! +// AUTO GENERATED, DO NOT MODIFY! // #include "lua_cocos2d_physics.h" #include "lua-bindings/lua_cocos2d_types.h" @@ -7,41 +7,7 @@ #include "cocos2d.h" #if CC_USE_PHYSICS -static int _cocos2d_PhysicsMaterial___call(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::PhysicsMaterial ret; - - luaL_checktype(L, 2, LUA_TTABLE); - - float arg1 = 0; /** density */ - float arg2 = 0; /** restitution */ - float arg3 = 0; /** friction */ - - olua_getfield(L, 2, "density"); - olua_check_number(L, -1, &arg1); - ret.density = arg1; - lua_pop(L, 1); - - olua_getfield(L, 2, "restitution"); - olua_check_number(L, -1, &arg2); - ret.restitution = arg2; - lua_pop(L, 1); - - olua_getfield(L, 2, "friction"); - olua_check_number(L, -1, &arg3); - ret.friction = arg3; - lua_pop(L, 1); - - olua_pushcopy_object(L, ret, "cc.PhysicsMaterial"); - - olua_endinvoke(L); - - return 1; -} - -static int _cocos2d_PhysicsMaterial___gc(lua_State *L) +static int _olua_fun_cocos2d_PhysicsMaterial___gc(lua_State *L) { olua_startinvoke(L); @@ -53,7 +19,7 @@ static int _cocos2d_PhysicsMaterial___gc(lua_State *L) return 0; } -static int _cocos2d_PhysicsMaterial___olua_move(lua_State *L) +static int _olua_fun_cocos2d_PhysicsMaterial___olua_move(lua_State *L) { olua_startinvoke(L); @@ -65,64 +31,63 @@ static int _cocos2d_PhysicsMaterial___olua_move(lua_State *L) return 1; } -static int _cocos2d_PhysicsMaterial_new$1(lua_State *L) +static int _olua_fun_cocos2d_PhysicsMaterial_density$1(lua_State *L) { olua_startinvoke(L); - // PhysicsMaterial() - cocos2d::PhysicsMaterial *ret = new cocos2d::PhysicsMaterial(); - int num_ret = olua_push_object(L, ret, "cc.PhysicsMaterial"); - olua_postnew(L, ret); + cocos2d::PhysicsMaterial *self = nullptr; + + olua_to_object(L, 1, &self, "cc.PhysicsMaterial"); + + // float density + float ret = self->density; + int num_ret = olua_push_number(L, ret); olua_endinvoke(L); return num_ret; } -static int _cocos2d_PhysicsMaterial_new$2(lua_State *L) +static int _olua_fun_cocos2d_PhysicsMaterial_density$2(lua_State *L) { olua_startinvoke(L); - float arg1 = 0; /** aDensity */ - float arg2 = 0; /** aRestitution */ - float arg3 = 0; /** aFriction */ + cocos2d::PhysicsMaterial *self = nullptr; + float arg1 = 0; /** density */ - olua_check_number(L, 1, &arg1); - olua_check_number(L, 2, &arg2); - olua_check_number(L, 3, &arg3); + olua_to_object(L, 1, &self, "cc.PhysicsMaterial"); + olua_check_number(L, 2, &arg1); - // PhysicsMaterial(float aDensity, float aRestitution, float aFriction) - cocos2d::PhysicsMaterial *ret = new cocos2d::PhysicsMaterial(arg1, arg2, arg3); - int num_ret = olua_push_object(L, ret, "cc.PhysicsMaterial"); - olua_postnew(L, ret); + // float density + self->density = arg1; olua_endinvoke(L); - return num_ret; + return 0; } -static int _cocos2d_PhysicsMaterial_new(lua_State *L) +static int _olua_fun_cocos2d_PhysicsMaterial_density(lua_State *L) { - int num_args = lua_gettop(L); + int num_args = lua_gettop(L) - 1; if (num_args == 0) { - // PhysicsMaterial() - return _cocos2d_PhysicsMaterial_new$1(L); + // float density + return _olua_fun_cocos2d_PhysicsMaterial_density$1(L); } - if (num_args == 3) { - // if ((olua_is_number(L, 1)) && (olua_is_number(L, 2)) && (olua_is_number(L, 3))) { - // PhysicsMaterial(float aDensity, float aRestitution, float aFriction) - return _cocos2d_PhysicsMaterial_new$2(L); + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float density + return _olua_fun_cocos2d_PhysicsMaterial_density$2(L); // } } - luaL_error(L, "method 'cocos2d::PhysicsMaterial::new' not support '%d' arguments", num_args); + luaL_error(L, "method 'cocos2d::PhysicsMaterial::density' not support '%d' arguments", num_args); return 0; } -static int _cocos2d_PhysicsMaterial_get_density(lua_State *L) +static int _olua_fun_cocos2d_PhysicsMaterial_friction$1(lua_State *L) { olua_startinvoke(L); @@ -130,8 +95,8 @@ static int _cocos2d_PhysicsMaterial_get_density(lua_State *L) olua_to_object(L, 1, &self, "cc.PhysicsMaterial"); - // float density - float ret = self->density; + // float friction + float ret = self->friction; int num_ret = olua_push_number(L, ret); olua_endinvoke(L); @@ -139,60 +104,103 @@ static int _cocos2d_PhysicsMaterial_get_density(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsMaterial_set_density(lua_State *L) +static int _olua_fun_cocos2d_PhysicsMaterial_friction$2(lua_State *L) { olua_startinvoke(L); cocos2d::PhysicsMaterial *self = nullptr; - float arg1 = 0; /** density */ + float arg1 = 0; /** friction */ olua_to_object(L, 1, &self, "cc.PhysicsMaterial"); olua_check_number(L, 2, &arg1); - // float density - self->density = arg1; + // float friction + self->friction = arg1; olua_endinvoke(L); return 0; } -static int _cocos2d_PhysicsMaterial_get_friction(lua_State *L) +static int _olua_fun_cocos2d_PhysicsMaterial_friction(lua_State *L) { - olua_startinvoke(L); + int num_args = lua_gettop(L) - 1; - cocos2d::PhysicsMaterial *self = nullptr; + if (num_args == 0) { + // float friction + return _olua_fun_cocos2d_PhysicsMaterial_friction$1(L); + } - olua_to_object(L, 1, &self, "cc.PhysicsMaterial"); + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float friction + return _olua_fun_cocos2d_PhysicsMaterial_friction$2(L); + // } + } - // float friction - float ret = self->friction; - int num_ret = olua_push_number(L, ret); + luaL_error(L, "method 'cocos2d::PhysicsMaterial::friction' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_PhysicsMaterial_new$1(lua_State *L) +{ + olua_startinvoke(L); + + // cocos2d::PhysicsMaterial() + cocos2d::PhysicsMaterial *ret = new cocos2d::PhysicsMaterial(); + int num_ret = olua_push_object(L, ret, "cc.PhysicsMaterial"); + olua_postnew(L, ret); olua_endinvoke(L); return num_ret; } -static int _cocos2d_PhysicsMaterial_set_friction(lua_State *L) +static int _olua_fun_cocos2d_PhysicsMaterial_new$2(lua_State *L) { olua_startinvoke(L); - cocos2d::PhysicsMaterial *self = nullptr; - float arg1 = 0; /** friction */ + float arg1 = 0; /** aDensity */ + float arg2 = 0; /** aRestitution */ + float arg3 = 0; /** aFriction */ - olua_to_object(L, 1, &self, "cc.PhysicsMaterial"); - olua_check_number(L, 2, &arg1); + olua_check_number(L, 1, &arg1); + olua_check_number(L, 2, &arg2); + olua_check_number(L, 3, &arg3); - // float friction - self->friction = arg1; + // cocos2d::PhysicsMaterial(float aDensity, float aRestitution, float aFriction) + cocos2d::PhysicsMaterial *ret = new cocos2d::PhysicsMaterial(arg1, arg2, arg3); + int num_ret = olua_push_object(L, ret, "cc.PhysicsMaterial"); + olua_postnew(L, ret); olua_endinvoke(L); + return num_ret; +} + +static int _olua_fun_cocos2d_PhysicsMaterial_new(lua_State *L) +{ + int num_args = lua_gettop(L); + + if (num_args == 0) { + // cocos2d::PhysicsMaterial() + return _olua_fun_cocos2d_PhysicsMaterial_new$1(L); + } + + if (num_args == 3) { + // if ((olua_is_number(L, 1)) && (olua_is_number(L, 2)) && (olua_is_number(L, 3))) { + // cocos2d::PhysicsMaterial(float aDensity, float aRestitution, float aFriction) + return _olua_fun_cocos2d_PhysicsMaterial_new$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::PhysicsMaterial::new' not support '%d' arguments", num_args); + return 0; } -static int _cocos2d_PhysicsMaterial_get_restitution(lua_State *L) +static int _olua_fun_cocos2d_PhysicsMaterial_restitution$1(lua_State *L) { olua_startinvoke(L); @@ -209,7 +217,7 @@ static int _cocos2d_PhysicsMaterial_get_restitution(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsMaterial_set_restitution(lua_State *L) +static int _olua_fun_cocos2d_PhysicsMaterial_restitution$2(lua_State *L) { olua_startinvoke(L); @@ -227,25 +235,54 @@ static int _cocos2d_PhysicsMaterial_set_restitution(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_PhysicsMaterial(lua_State *L) +static int _olua_fun_cocos2d_PhysicsMaterial_restitution(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float restitution + return _olua_fun_cocos2d_PhysicsMaterial_restitution$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float restitution + return _olua_fun_cocos2d_PhysicsMaterial_restitution$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::PhysicsMaterial::restitution' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_cls_cc_PhysicsMaterial(lua_State *L) { oluacls_class(L, "cc.PhysicsMaterial"); - oluacls_func(L, "__call", _cocos2d_PhysicsMaterial___call); - oluacls_func(L, "__gc", _cocos2d_PhysicsMaterial___gc); - oluacls_func(L, "__olua_move", _cocos2d_PhysicsMaterial___olua_move); - oluacls_func(L, "new", _cocos2d_PhysicsMaterial_new); - oluacls_prop(L, "density", _cocos2d_PhysicsMaterial_get_density, _cocos2d_PhysicsMaterial_set_density); - oluacls_prop(L, "friction", _cocos2d_PhysicsMaterial_get_friction, _cocos2d_PhysicsMaterial_set_friction); - oluacls_prop(L, "restitution", _cocos2d_PhysicsMaterial_get_restitution, _cocos2d_PhysicsMaterial_set_restitution); + oluacls_func(L, "__gc", _olua_fun_cocos2d_PhysicsMaterial___gc); + oluacls_func(L, "__olua_move", _olua_fun_cocos2d_PhysicsMaterial___olua_move); + oluacls_func(L, "new", _olua_fun_cocos2d_PhysicsMaterial_new); + oluacls_prop(L, "density", _olua_fun_cocos2d_PhysicsMaterial_density, _olua_fun_cocos2d_PhysicsMaterial_density); + oluacls_prop(L, "friction", _olua_fun_cocos2d_PhysicsMaterial_friction, _olua_fun_cocos2d_PhysicsMaterial_friction); + oluacls_prop(L, "restitution", _olua_fun_cocos2d_PhysicsMaterial_restitution, _olua_fun_cocos2d_PhysicsMaterial_restitution); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_PhysicsMaterial(lua_State *L) +{ + olua_require(L, "cocos2d_physics", luaopen_cocos2d_physics); + if (!olua_getclass(L, "cc.PhysicsMaterial")) { + luaL_error(L, "class not found: cocos2d::PhysicsMaterial"); + } + return 1; +} OLUA_END_DECLS #endif #if CC_USE_PHYSICS -static int _cocos2d_PhysicsRayCastCallbackFunc___call(lua_State *L) +static int _olua_fun_cocos2d_PhysicsRayCastCallbackFunc___call(lua_State *L) { olua_startinvoke(L); @@ -257,19 +294,28 @@ static int _cocos2d_PhysicsRayCastCallbackFunc___call(lua_State *L) return 1; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_PhysicsRayCastCallbackFunc(lua_State *L) +static int _olua_cls_cc_PhysicsRayCastCallbackFunc(lua_State *L) { oluacls_class(L, "cc.PhysicsRayCastCallbackFunc"); - oluacls_func(L, "__call", _cocos2d_PhysicsRayCastCallbackFunc___call); + oluacls_func(L, "__call", _olua_fun_cocos2d_PhysicsRayCastCallbackFunc___call); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_PhysicsRayCastCallbackFunc(lua_State *L) +{ + olua_require(L, "cocos2d_physics", luaopen_cocos2d_physics); + if (!olua_getclass(L, "cc.PhysicsRayCastCallbackFunc")) { + luaL_error(L, "class not found: cocos2d::PhysicsRayCastCallbackFunc"); + } + return 1; +} OLUA_END_DECLS #endif #if CC_USE_PHYSICS -static int _cocos2d_PhysicsQueryRectCallbackFunc___call(lua_State *L) +static int _olua_fun_cocos2d_PhysicsQueryRectCallbackFunc___call(lua_State *L) { olua_startinvoke(L); @@ -281,19 +327,28 @@ static int _cocos2d_PhysicsQueryRectCallbackFunc___call(lua_State *L) return 1; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_PhysicsQueryRectCallbackFunc(lua_State *L) +static int _olua_cls_cc_PhysicsQueryRectCallbackFunc(lua_State *L) { oluacls_class(L, "cc.PhysicsQueryRectCallbackFunc"); - oluacls_func(L, "__call", _cocos2d_PhysicsQueryRectCallbackFunc___call); + oluacls_func(L, "__call", _olua_fun_cocos2d_PhysicsQueryRectCallbackFunc___call); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_PhysicsQueryRectCallbackFunc(lua_State *L) +{ + olua_require(L, "cocos2d_physics", luaopen_cocos2d_physics); + if (!olua_getclass(L, "cc.PhysicsQueryRectCallbackFunc")) { + luaL_error(L, "class not found: cocos2d::PhysicsQueryRectCallbackFunc"); + } + return 1; +} OLUA_END_DECLS #endif #if CC_USE_PHYSICS -static int _cocos2d_PhysicsQueryPointCallbackFunc___call(lua_State *L) +static int _olua_fun_cocos2d_PhysicsQueryPointCallbackFunc___call(lua_State *L) { olua_startinvoke(L); @@ -305,36 +360,28 @@ static int _cocos2d_PhysicsQueryPointCallbackFunc___call(lua_State *L) return 1; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_PhysicsQueryPointCallbackFunc(lua_State *L) +static int _olua_cls_cc_PhysicsQueryPointCallbackFunc(lua_State *L) { oluacls_class(L, "cc.PhysicsQueryPointCallbackFunc"); - oluacls_func(L, "__call", _cocos2d_PhysicsQueryPointCallbackFunc___call); + oluacls_func(L, "__call", _olua_fun_cocos2d_PhysicsQueryPointCallbackFunc___call); return 1; } -OLUA_END_DECLS -#endif -#if CC_USE_PHYSICS -static int _cocos2d_EventListenerPhysicsContact_clone(lua_State *L) +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_PhysicsQueryPointCallbackFunc(lua_State *L) { - olua_startinvoke(L); - - cocos2d::EventListenerPhysicsContact *self = nullptr; - - olua_to_object(L, 1, &self, "cc.EventListenerPhysicsContact"); - - // cocos2d::EventListenerPhysicsContact *clone() - cocos2d::EventListenerPhysicsContact *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.EventListenerPhysicsContact"); - - olua_endinvoke(L); - - return num_ret; + olua_require(L, "cocos2d_physics", luaopen_cocos2d_physics); + if (!olua_getclass(L, "cc.PhysicsQueryPointCallbackFunc")) { + luaL_error(L, "class not found: cocos2d::PhysicsQueryPointCallbackFunc"); + } + return 1; } +OLUA_END_DECLS +#endif -static int _cocos2d_EventListenerPhysicsContact_create(lua_State *L) +#if CC_USE_PHYSICS +static int _olua_fun_cocos2d_EventListenerPhysicsContact_create(lua_State *L) { olua_startinvoke(L); @@ -347,7 +394,7 @@ static int _cocos2d_EventListenerPhysicsContact_create(lua_State *L) return num_ret; } -static int _cocos2d_EventListenerPhysicsContact_get_onContactBegin(lua_State *L) +static int _olua_fun_cocos2d_EventListenerPhysicsContact_onContactBegin$1(lua_State *L) { olua_startinvoke(L); @@ -359,7 +406,7 @@ static int _cocos2d_EventListenerPhysicsContact_get_onContactBegin(lua_State *L) std::string cb_tag = "onContactBegin"; olua_getcallback(L, cb_store, cb_tag.c_str(), OLUA_TAG_EQUAL); - // @nullable @localvar std::function onContactBegin + // std::function onContactBegin std::function ret = self->onContactBegin; int num_ret = olua_push_callback(L, &ret, "std.function"); @@ -368,7 +415,7 @@ static int _cocos2d_EventListenerPhysicsContact_get_onContactBegin(lua_State *L) return num_ret; } -static int _cocos2d_EventListenerPhysicsContact_set_onContactBegin(lua_State *L) +static int _olua_fun_cocos2d_EventListenerPhysicsContact_onContactBegin$2(lua_State *L) { olua_startinvoke(L); @@ -384,9 +431,10 @@ static int _cocos2d_EventListenerPhysicsContact_set_onContactBegin(lua_State *L) std::string cb_tag = "onContactBegin"; std::string cb_name; if (olua_isfunction(L, 2)) { - cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](cocos2d::PhysicsContact &arg1) { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](cocos2d::PhysicsContact &cb_arg1) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); bool ret = false; /** ret */ @@ -394,7 +442,7 @@ static int _cocos2d_EventListenerPhysicsContact_set_onContactBegin(lua_State *L) int top = lua_gettop(L); size_t last = olua_push_objpool(L); olua_enable_objpool(L); - olua_push_object(L, &arg1, "cc.PhysicsContact"); + olua_push_object(L, &cb_arg1, "cc.PhysicsContact"); olua_disable_objpool(L); olua_callback(L, cb_store, cb_name.c_str(), 1); @@ -414,7 +462,7 @@ static int _cocos2d_EventListenerPhysicsContact_set_onContactBegin(lua_State *L) arg1 = nullptr; } - // @nullable @localvar std::function onContactBegin + // std::function onContactBegin self->onContactBegin = arg1; olua_endinvoke(L); @@ -422,7 +470,28 @@ static int _cocos2d_EventListenerPhysicsContact_set_onContactBegin(lua_State *L) return 0; } -static int _cocos2d_EventListenerPhysicsContact_get_onContactPostSolve(lua_State *L) +static int _olua_fun_cocos2d_EventListenerPhysicsContact_onContactBegin(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // std::function onContactBegin + return _olua_fun_cocos2d_EventListenerPhysicsContact_onContactBegin$1(L); + } + + if (num_args == 1) { + // if ((olua_is_callback(L, 2, "std.function") || olua_isnil(L, 2))) { + // std::function onContactBegin + return _olua_fun_cocos2d_EventListenerPhysicsContact_onContactBegin$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::EventListenerPhysicsContact::onContactBegin' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_EventListenerPhysicsContact_onContactPostSolve$1(lua_State *L) { olua_startinvoke(L); @@ -434,7 +503,7 @@ static int _cocos2d_EventListenerPhysicsContact_get_onContactPostSolve(lua_State std::string cb_tag = "onContactPostSolve"; olua_getcallback(L, cb_store, cb_tag.c_str(), OLUA_TAG_EQUAL); - // @nullable @localvar std::function onContactPostSolve + // std::function onContactPostSolve std::function ret = self->onContactPostSolve; int num_ret = olua_push_callback(L, &ret, "std.function"); @@ -443,7 +512,7 @@ static int _cocos2d_EventListenerPhysicsContact_get_onContactPostSolve(lua_State return num_ret; } -static int _cocos2d_EventListenerPhysicsContact_set_onContactPostSolve(lua_State *L) +static int _olua_fun_cocos2d_EventListenerPhysicsContact_onContactPostSolve$2(lua_State *L) { olua_startinvoke(L); @@ -459,9 +528,10 @@ static int _cocos2d_EventListenerPhysicsContact_set_onContactPostSolve(lua_State std::string cb_tag = "onContactPostSolve"; std::string cb_name; if (olua_isfunction(L, 2)) { - cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](cocos2d::PhysicsContact &arg1, const cocos2d::PhysicsContactPostSolve &arg2) { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](cocos2d::PhysicsContact &cb_arg1, const cocos2d::PhysicsContactPostSolve &cb_arg2) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); @@ -469,8 +539,8 @@ static int _cocos2d_EventListenerPhysicsContact_set_onContactPostSolve(lua_State int top = lua_gettop(L); size_t last = olua_push_objpool(L); olua_enable_objpool(L); - olua_push_object(L, &arg1, "cc.PhysicsContact"); - olua_push_object(L, arg2, "cc.PhysicsContactPostSolve"); + olua_push_object(L, &cb_arg1, "cc.PhysicsContact"); + olua_push_object(L, cb_arg2, "cc.PhysicsContactPostSolve"); olua_disable_objpool(L); olua_callback(L, cb_store, cb_name.c_str(), 2); @@ -485,7 +555,7 @@ static int _cocos2d_EventListenerPhysicsContact_set_onContactPostSolve(lua_State arg1 = nullptr; } - // @nullable @localvar std::function onContactPostSolve + // std::function onContactPostSolve self->onContactPostSolve = arg1; olua_endinvoke(L); @@ -493,7 +563,28 @@ static int _cocos2d_EventListenerPhysicsContact_set_onContactPostSolve(lua_State return 0; } -static int _cocos2d_EventListenerPhysicsContact_get_onContactPreSolve(lua_State *L) +static int _olua_fun_cocos2d_EventListenerPhysicsContact_onContactPostSolve(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // std::function onContactPostSolve + return _olua_fun_cocos2d_EventListenerPhysicsContact_onContactPostSolve$1(L); + } + + if (num_args == 1) { + // if ((olua_is_callback(L, 2, "std.function") || olua_isnil(L, 2))) { + // std::function onContactPostSolve + return _olua_fun_cocos2d_EventListenerPhysicsContact_onContactPostSolve$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::EventListenerPhysicsContact::onContactPostSolve' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_EventListenerPhysicsContact_onContactPreSolve$1(lua_State *L) { olua_startinvoke(L); @@ -505,7 +596,7 @@ static int _cocos2d_EventListenerPhysicsContact_get_onContactPreSolve(lua_State std::string cb_tag = "onContactPreSolve"; olua_getcallback(L, cb_store, cb_tag.c_str(), OLUA_TAG_EQUAL); - // @nullable @localvar std::function onContactPreSolve + // std::function onContactPreSolve std::function ret = self->onContactPreSolve; int num_ret = olua_push_callback(L, &ret, "std.function"); @@ -514,7 +605,7 @@ static int _cocos2d_EventListenerPhysicsContact_get_onContactPreSolve(lua_State return num_ret; } -static int _cocos2d_EventListenerPhysicsContact_set_onContactPreSolve(lua_State *L) +static int _olua_fun_cocos2d_EventListenerPhysicsContact_onContactPreSolve$2(lua_State *L) { olua_startinvoke(L); @@ -530,9 +621,10 @@ static int _cocos2d_EventListenerPhysicsContact_set_onContactPreSolve(lua_State std::string cb_tag = "onContactPreSolve"; std::string cb_name; if (olua_isfunction(L, 2)) { - cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](cocos2d::PhysicsContact &arg1, cocos2d::PhysicsContactPreSolve &arg2) { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](cocos2d::PhysicsContact &cb_arg1, cocos2d::PhysicsContactPreSolve &cb_arg2) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); bool ret = false; /** ret */ @@ -540,8 +632,8 @@ static int _cocos2d_EventListenerPhysicsContact_set_onContactPreSolve(lua_State int top = lua_gettop(L); size_t last = olua_push_objpool(L); olua_enable_objpool(L); - olua_push_object(L, &arg1, "cc.PhysicsContact"); - olua_push_object(L, &arg2, "cc.PhysicsContactPreSolve"); + olua_push_object(L, &cb_arg1, "cc.PhysicsContact"); + olua_push_object(L, &cb_arg2, "cc.PhysicsContactPreSolve"); olua_disable_objpool(L); olua_callback(L, cb_store, cb_name.c_str(), 2); @@ -561,7 +653,7 @@ static int _cocos2d_EventListenerPhysicsContact_set_onContactPreSolve(lua_State arg1 = nullptr; } - // @nullable @localvar std::function onContactPreSolve + // std::function onContactPreSolve self->onContactPreSolve = arg1; olua_endinvoke(L); @@ -569,7 +661,28 @@ static int _cocos2d_EventListenerPhysicsContact_set_onContactPreSolve(lua_State return 0; } -static int _cocos2d_EventListenerPhysicsContact_get_onContactSeparate(lua_State *L) +static int _olua_fun_cocos2d_EventListenerPhysicsContact_onContactPreSolve(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // std::function onContactPreSolve + return _olua_fun_cocos2d_EventListenerPhysicsContact_onContactPreSolve$1(L); + } + + if (num_args == 1) { + // if ((olua_is_callback(L, 2, "std.function") || olua_isnil(L, 2))) { + // std::function onContactPreSolve + return _olua_fun_cocos2d_EventListenerPhysicsContact_onContactPreSolve$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::EventListenerPhysicsContact::onContactPreSolve' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_EventListenerPhysicsContact_onContactSeparate$1(lua_State *L) { olua_startinvoke(L); @@ -581,7 +694,7 @@ static int _cocos2d_EventListenerPhysicsContact_get_onContactSeparate(lua_State std::string cb_tag = "onContactSeparate"; olua_getcallback(L, cb_store, cb_tag.c_str(), OLUA_TAG_EQUAL); - // @nullable @localvar std::function onContactSeparate + // std::function onContactSeparate std::function ret = self->onContactSeparate; int num_ret = olua_push_callback(L, &ret, "std.function"); @@ -590,7 +703,7 @@ static int _cocos2d_EventListenerPhysicsContact_get_onContactSeparate(lua_State return num_ret; } -static int _cocos2d_EventListenerPhysicsContact_set_onContactSeparate(lua_State *L) +static int _olua_fun_cocos2d_EventListenerPhysicsContact_onContactSeparate$2(lua_State *L) { olua_startinvoke(L); @@ -606,9 +719,10 @@ static int _cocos2d_EventListenerPhysicsContact_set_onContactSeparate(lua_State std::string cb_tag = "onContactSeparate"; std::string cb_name; if (olua_isfunction(L, 2)) { - cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](cocos2d::PhysicsContact &arg1) { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](cocos2d::PhysicsContact &cb_arg1) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); @@ -616,7 +730,7 @@ static int _cocos2d_EventListenerPhysicsContact_set_onContactSeparate(lua_State int top = lua_gettop(L); size_t last = olua_push_objpool(L); olua_enable_objpool(L); - olua_push_object(L, &arg1, "cc.PhysicsContact"); + olua_push_object(L, &cb_arg1, "cc.PhysicsContact"); olua_disable_objpool(L); olua_callback(L, cb_store, cb_name.c_str(), 1); @@ -631,7 +745,7 @@ static int _cocos2d_EventListenerPhysicsContact_set_onContactSeparate(lua_State arg1 = nullptr; } - // @nullable @localvar std::function onContactSeparate + // std::function onContactSeparate self->onContactSeparate = arg1; olua_endinvoke(L); @@ -639,41 +753,53 @@ static int _cocos2d_EventListenerPhysicsContact_set_onContactSeparate(lua_State return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_EventListenerPhysicsContact(lua_State *L) +static int _olua_fun_cocos2d_EventListenerPhysicsContact_onContactSeparate(lua_State *L) { - oluacls_class(L, "cc.EventListenerPhysicsContact"); - oluacls_func(L, "clone", _cocos2d_EventListenerPhysicsContact_clone); - oluacls_func(L, "create", _cocos2d_EventListenerPhysicsContact_create); - oluacls_prop(L, "onContactBegin", _cocos2d_EventListenerPhysicsContact_get_onContactBegin, _cocos2d_EventListenerPhysicsContact_set_onContactBegin); - oluacls_prop(L, "onContactPostSolve", _cocos2d_EventListenerPhysicsContact_get_onContactPostSolve, _cocos2d_EventListenerPhysicsContact_set_onContactPostSolve); - oluacls_prop(L, "onContactPreSolve", _cocos2d_EventListenerPhysicsContact_get_onContactPreSolve, _cocos2d_EventListenerPhysicsContact_set_onContactPreSolve); - oluacls_prop(L, "onContactSeparate", _cocos2d_EventListenerPhysicsContact_get_onContactSeparate, _cocos2d_EventListenerPhysicsContact_set_onContactSeparate); + int num_args = lua_gettop(L) - 1; - return 1; -} -OLUA_END_DECLS -#endif + if (num_args == 0) { + // std::function onContactSeparate + return _olua_fun_cocos2d_EventListenerPhysicsContact_onContactSeparate$1(L); + } -#if CC_USE_PHYSICS -static int _cocos2d_EventListenerPhysicsContactWithGroup_clone(lua_State *L) -{ - olua_startinvoke(L); + if (num_args == 1) { + // if ((olua_is_callback(L, 2, "std.function") || olua_isnil(L, 2))) { + // std::function onContactSeparate + return _olua_fun_cocos2d_EventListenerPhysicsContact_onContactSeparate$2(L); + // } + } - cocos2d::EventListenerPhysicsContactWithGroup *self = nullptr; + luaL_error(L, "method 'cocos2d::EventListenerPhysicsContact::onContactSeparate' not support '%d' arguments", num_args); - olua_to_object(L, 1, &self, "cc.EventListenerPhysicsContactWithGroup"); + return 0; +} - // cocos2d::EventListenerPhysicsContactWithGroup *clone() - cocos2d::EventListenerPhysicsContactWithGroup *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.EventListenerPhysicsContactWithGroup"); +static int _olua_cls_cc_EventListenerPhysicsContact(lua_State *L) +{ + oluacls_class(L, "cc.EventListenerPhysicsContact"); + oluacls_func(L, "create", _olua_fun_cocos2d_EventListenerPhysicsContact_create); + oluacls_prop(L, "onContactBegin", _olua_fun_cocos2d_EventListenerPhysicsContact_onContactBegin, _olua_fun_cocos2d_EventListenerPhysicsContact_onContactBegin); + oluacls_prop(L, "onContactPostSolve", _olua_fun_cocos2d_EventListenerPhysicsContact_onContactPostSolve, _olua_fun_cocos2d_EventListenerPhysicsContact_onContactPostSolve); + oluacls_prop(L, "onContactPreSolve", _olua_fun_cocos2d_EventListenerPhysicsContact_onContactPreSolve, _olua_fun_cocos2d_EventListenerPhysicsContact_onContactPreSolve); + oluacls_prop(L, "onContactSeparate", _olua_fun_cocos2d_EventListenerPhysicsContact_onContactSeparate, _olua_fun_cocos2d_EventListenerPhysicsContact_onContactSeparate); - olua_endinvoke(L); + return 1; +} - return num_ret; +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_EventListenerPhysicsContact(lua_State *L) +{ + olua_require(L, "cocos2d_physics", luaopen_cocos2d_physics); + if (!olua_getclass(L, "cc.EventListenerPhysicsContact")) { + luaL_error(L, "class not found: cocos2d::EventListenerPhysicsContact"); + } + return 1; } +OLUA_END_DECLS +#endif -static int _cocos2d_EventListenerPhysicsContactWithGroup_create(lua_State *L) +#if CC_USE_PHYSICS +static int _olua_fun_cocos2d_EventListenerPhysicsContactWithGroup_create(lua_State *L) { olua_startinvoke(L); @@ -690,7 +816,7 @@ static int _cocos2d_EventListenerPhysicsContactWithGroup_create(lua_State *L) return num_ret; } -static int _cocos2d_EventListenerPhysicsContactWithGroup_hitTest(lua_State *L) +static int _olua_fun_cocos2d_EventListenerPhysicsContactWithGroup_hitTest(lua_State *L) { olua_startinvoke(L); @@ -711,38 +837,29 @@ static int _cocos2d_EventListenerPhysicsContactWithGroup_hitTest(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_EventListenerPhysicsContactWithGroup(lua_State *L) +static int _olua_cls_cc_EventListenerPhysicsContactWithGroup(lua_State *L) { oluacls_class(L, "cc.EventListenerPhysicsContactWithGroup"); - oluacls_func(L, "clone", _cocos2d_EventListenerPhysicsContactWithGroup_clone); - oluacls_func(L, "create", _cocos2d_EventListenerPhysicsContactWithGroup_create); - oluacls_func(L, "hitTest", _cocos2d_EventListenerPhysicsContactWithGroup_hitTest); + oluacls_func(L, "create", _olua_fun_cocos2d_EventListenerPhysicsContactWithGroup_create); + oluacls_func(L, "hitTest", _olua_fun_cocos2d_EventListenerPhysicsContactWithGroup_hitTest); return 1; } -OLUA_END_DECLS -#endif -#if CC_USE_PHYSICS -static int _cocos2d_EventListenerPhysicsContactWithBodies_clone(lua_State *L) +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_EventListenerPhysicsContactWithGroup(lua_State *L) { - olua_startinvoke(L); - - cocos2d::EventListenerPhysicsContactWithBodies *self = nullptr; - - olua_to_object(L, 1, &self, "cc.EventListenerPhysicsContactWithBodies"); - - // cocos2d::EventListenerPhysicsContactWithBodies *clone() - cocos2d::EventListenerPhysicsContactWithBodies *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.EventListenerPhysicsContactWithBodies"); - - olua_endinvoke(L); - - return num_ret; + olua_require(L, "cocos2d_physics", luaopen_cocos2d_physics); + if (!olua_getclass(L, "cc.EventListenerPhysicsContactWithGroup")) { + luaL_error(L, "class not found: cocos2d::EventListenerPhysicsContactWithGroup"); + } + return 1; } +OLUA_END_DECLS +#endif -static int _cocos2d_EventListenerPhysicsContactWithBodies_create(lua_State *L) +#if CC_USE_PHYSICS +static int _olua_fun_cocos2d_EventListenerPhysicsContactWithBodies_create(lua_State *L) { olua_startinvoke(L); @@ -761,7 +878,7 @@ static int _cocos2d_EventListenerPhysicsContactWithBodies_create(lua_State *L) return num_ret; } -static int _cocos2d_EventListenerPhysicsContactWithBodies_hitTest(lua_State *L) +static int _olua_fun_cocos2d_EventListenerPhysicsContactWithBodies_hitTest(lua_State *L) { olua_startinvoke(L); @@ -782,38 +899,29 @@ static int _cocos2d_EventListenerPhysicsContactWithBodies_hitTest(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_EventListenerPhysicsContactWithBodies(lua_State *L) +static int _olua_cls_cc_EventListenerPhysicsContactWithBodies(lua_State *L) { oluacls_class(L, "cc.EventListenerPhysicsContactWithBodies"); - oluacls_func(L, "clone", _cocos2d_EventListenerPhysicsContactWithBodies_clone); - oluacls_func(L, "create", _cocos2d_EventListenerPhysicsContactWithBodies_create); - oluacls_func(L, "hitTest", _cocos2d_EventListenerPhysicsContactWithBodies_hitTest); + oluacls_func(L, "create", _olua_fun_cocos2d_EventListenerPhysicsContactWithBodies_create); + oluacls_func(L, "hitTest", _olua_fun_cocos2d_EventListenerPhysicsContactWithBodies_hitTest); return 1; } -OLUA_END_DECLS -#endif -#if CC_USE_PHYSICS -static int _cocos2d_EventListenerPhysicsContactWithShapes_clone(lua_State *L) +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_EventListenerPhysicsContactWithBodies(lua_State *L) { - olua_startinvoke(L); - - cocos2d::EventListenerPhysicsContactWithShapes *self = nullptr; - - olua_to_object(L, 1, &self, "cc.EventListenerPhysicsContactWithShapes"); - - // cocos2d::EventListenerPhysicsContactWithShapes *clone() - cocos2d::EventListenerPhysicsContactWithShapes *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "cc.EventListenerPhysicsContactWithShapes"); - - olua_endinvoke(L); - - return num_ret; + olua_require(L, "cocos2d_physics", luaopen_cocos2d_physics); + if (!olua_getclass(L, "cc.EventListenerPhysicsContactWithBodies")) { + luaL_error(L, "class not found: cocos2d::EventListenerPhysicsContactWithBodies"); + } + return 1; } +OLUA_END_DECLS +#endif -static int _cocos2d_EventListenerPhysicsContactWithShapes_create(lua_State *L) +#if CC_USE_PHYSICS +static int _olua_fun_cocos2d_EventListenerPhysicsContactWithShapes_create(lua_State *L) { olua_startinvoke(L); @@ -832,7 +940,7 @@ static int _cocos2d_EventListenerPhysicsContactWithShapes_create(lua_State *L) return num_ret; } -static int _cocos2d_EventListenerPhysicsContactWithShapes_hitTest(lua_State *L) +static int _olua_fun_cocos2d_EventListenerPhysicsContactWithShapes_hitTest(lua_State *L) { olua_startinvoke(L); @@ -853,21 +961,29 @@ static int _cocos2d_EventListenerPhysicsContactWithShapes_hitTest(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_EventListenerPhysicsContactWithShapes(lua_State *L) +static int _olua_cls_cc_EventListenerPhysicsContactWithShapes(lua_State *L) { oluacls_class(L, "cc.EventListenerPhysicsContactWithShapes"); - oluacls_func(L, "clone", _cocos2d_EventListenerPhysicsContactWithShapes_clone); - oluacls_func(L, "create", _cocos2d_EventListenerPhysicsContactWithShapes_create); - oluacls_func(L, "hitTest", _cocos2d_EventListenerPhysicsContactWithShapes_hitTest); + oluacls_func(L, "create", _olua_fun_cocos2d_EventListenerPhysicsContactWithShapes_create); + oluacls_func(L, "hitTest", _olua_fun_cocos2d_EventListenerPhysicsContactWithShapes_hitTest); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_EventListenerPhysicsContactWithShapes(lua_State *L) +{ + olua_require(L, "cocos2d_physics", luaopen_cocos2d_physics); + if (!olua_getclass(L, "cc.EventListenerPhysicsContactWithShapes")) { + luaL_error(L, "class not found: cocos2d::EventListenerPhysicsContactWithShapes"); + } return 1; } OLUA_END_DECLS #endif #if CC_USE_PHYSICS -static int _cocos2d_PhysicsBody_addMass(lua_State *L) +static int _olua_fun_cocos2d_PhysicsBody_addMass(lua_State *L) { olua_startinvoke(L); @@ -885,7 +1001,7 @@ static int _cocos2d_PhysicsBody_addMass(lua_State *L) return 0; } -static int _cocos2d_PhysicsBody_addMoment(lua_State *L) +static int _olua_fun_cocos2d_PhysicsBody_addMoment(lua_State *L) { olua_startinvoke(L); @@ -903,7 +1019,7 @@ static int _cocos2d_PhysicsBody_addMoment(lua_State *L) return 0; } -static int _cocos2d_PhysicsBody_addShape$1(lua_State *L) +static int _olua_fun_cocos2d_PhysicsBody_addShape$1(lua_State *L) { olua_startinvoke(L); @@ -924,7 +1040,7 @@ static int _cocos2d_PhysicsBody_addShape$1(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsBody_addShape$2(lua_State *L) +static int _olua_fun_cocos2d_PhysicsBody_addShape$2(lua_State *L) { olua_startinvoke(L); @@ -934,7 +1050,7 @@ static int _cocos2d_PhysicsBody_addShape$2(lua_State *L) olua_to_object(L, 1, &self, "cc.PhysicsBody"); olua_check_object(L, 2, &arg1, "cc.PhysicsShape"); - // cocos2d::PhysicsShape *addShape(cocos2d::PhysicsShape *shape, @optional bool addMassAndMoment) + // cocos2d::PhysicsShape *addShape(cocos2d::PhysicsShape *shape) cocos2d::PhysicsShape *ret = self->addShape(arg1); int num_ret = olua_push_object(L, ret, "cc.PhysicsShape"); @@ -943,21 +1059,21 @@ static int _cocos2d_PhysicsBody_addShape$2(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsBody_addShape(lua_State *L) +static int _olua_fun_cocos2d_PhysicsBody_addShape(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_object(L, 2, "cc.PhysicsShape"))) { - // cocos2d::PhysicsShape *addShape(cocos2d::PhysicsShape *shape, @optional bool addMassAndMoment) - return _cocos2d_PhysicsBody_addShape$2(L); + // cocos2d::PhysicsShape *addShape(cocos2d::PhysicsShape *shape) + return _olua_fun_cocos2d_PhysicsBody_addShape$2(L); // } } if (num_args == 2) { // if ((olua_is_object(L, 2, "cc.PhysicsShape")) && (olua_is_bool(L, 3))) { // cocos2d::PhysicsShape *addShape(cocos2d::PhysicsShape *shape, @optional bool addMassAndMoment) - return _cocos2d_PhysicsBody_addShape$1(L); + return _olua_fun_cocos2d_PhysicsBody_addShape$1(L); // } } @@ -966,59 +1082,59 @@ static int _cocos2d_PhysicsBody_addShape(lua_State *L) return 0; } -static int _cocos2d_PhysicsBody_applyForce$1(lua_State *L) +static int _olua_fun_cocos2d_PhysicsBody_applyForce$1(lua_State *L) { olua_startinvoke(L); cocos2d::PhysicsBody *self = nullptr; - cocos2d::Vec2 arg1; /** force */ - cocos2d::Vec2 arg2; /** offset */ + cocos2d::Vec2 *arg1; /** force */ + cocos2d::Vec2 *arg2; /** offset */ olua_to_object(L, 1, &self, "cc.PhysicsBody"); olua_check_object(L, 2, &arg1, "cc.Vec2"); olua_check_object(L, 3, &arg2, "cc.Vec2"); // void applyForce(const cocos2d::Vec2 &force, @optional const cocos2d::Vec2 &offset) - self->applyForce(arg1, arg2); + self->applyForce(*arg1, *arg2); olua_endinvoke(L); return 0; } -static int _cocos2d_PhysicsBody_applyForce$2(lua_State *L) +static int _olua_fun_cocos2d_PhysicsBody_applyForce$2(lua_State *L) { olua_startinvoke(L); cocos2d::PhysicsBody *self = nullptr; - cocos2d::Vec2 arg1; /** force */ + cocos2d::Vec2 *arg1; /** force */ olua_to_object(L, 1, &self, "cc.PhysicsBody"); olua_check_object(L, 2, &arg1, "cc.Vec2"); - // void applyForce(const cocos2d::Vec2 &force, @optional const cocos2d::Vec2 &offset) - self->applyForce(arg1); + // void applyForce(const cocos2d::Vec2 &force) + self->applyForce(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_PhysicsBody_applyForce(lua_State *L) +static int _olua_fun_cocos2d_PhysicsBody_applyForce(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_object(L, 2, "cc.Vec2"))) { - // void applyForce(const cocos2d::Vec2 &force, @optional const cocos2d::Vec2 &offset) - return _cocos2d_PhysicsBody_applyForce$2(L); + // void applyForce(const cocos2d::Vec2 &force) + return _olua_fun_cocos2d_PhysicsBody_applyForce$2(L); // } } if (num_args == 2) { // if ((olua_is_object(L, 2, "cc.Vec2")) && (olua_is_object(L, 3, "cc.Vec2"))) { // void applyForce(const cocos2d::Vec2 &force, @optional const cocos2d::Vec2 &offset) - return _cocos2d_PhysicsBody_applyForce$1(L); + return _olua_fun_cocos2d_PhysicsBody_applyForce$1(L); // } } @@ -1027,59 +1143,59 @@ static int _cocos2d_PhysicsBody_applyForce(lua_State *L) return 0; } -static int _cocos2d_PhysicsBody_applyImpulse$1(lua_State *L) +static int _olua_fun_cocos2d_PhysicsBody_applyImpulse$1(lua_State *L) { olua_startinvoke(L); cocos2d::PhysicsBody *self = nullptr; - cocos2d::Vec2 arg1; /** impulse */ - cocos2d::Vec2 arg2; /** offset */ + cocos2d::Vec2 *arg1; /** impulse */ + cocos2d::Vec2 *arg2; /** offset */ olua_to_object(L, 1, &self, "cc.PhysicsBody"); olua_check_object(L, 2, &arg1, "cc.Vec2"); olua_check_object(L, 3, &arg2, "cc.Vec2"); // void applyImpulse(const cocos2d::Vec2 &impulse, @optional const cocos2d::Vec2 &offset) - self->applyImpulse(arg1, arg2); + self->applyImpulse(*arg1, *arg2); olua_endinvoke(L); return 0; } -static int _cocos2d_PhysicsBody_applyImpulse$2(lua_State *L) +static int _olua_fun_cocos2d_PhysicsBody_applyImpulse$2(lua_State *L) { olua_startinvoke(L); cocos2d::PhysicsBody *self = nullptr; - cocos2d::Vec2 arg1; /** impulse */ + cocos2d::Vec2 *arg1; /** impulse */ olua_to_object(L, 1, &self, "cc.PhysicsBody"); olua_check_object(L, 2, &arg1, "cc.Vec2"); - // void applyImpulse(const cocos2d::Vec2 &impulse, @optional const cocos2d::Vec2 &offset) - self->applyImpulse(arg1); + // void applyImpulse(const cocos2d::Vec2 &impulse) + self->applyImpulse(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_PhysicsBody_applyImpulse(lua_State *L) +static int _olua_fun_cocos2d_PhysicsBody_applyImpulse(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_object(L, 2, "cc.Vec2"))) { - // void applyImpulse(const cocos2d::Vec2 &impulse, @optional const cocos2d::Vec2 &offset) - return _cocos2d_PhysicsBody_applyImpulse$2(L); + // void applyImpulse(const cocos2d::Vec2 &impulse) + return _olua_fun_cocos2d_PhysicsBody_applyImpulse$2(L); // } } if (num_args == 2) { // if ((olua_is_object(L, 2, "cc.Vec2")) && (olua_is_object(L, 3, "cc.Vec2"))) { // void applyImpulse(const cocos2d::Vec2 &impulse, @optional const cocos2d::Vec2 &offset) - return _cocos2d_PhysicsBody_applyImpulse$1(L); + return _olua_fun_cocos2d_PhysicsBody_applyImpulse$1(L); // } } @@ -1088,7 +1204,7 @@ static int _cocos2d_PhysicsBody_applyImpulse(lua_State *L) return 0; } -static int _cocos2d_PhysicsBody_applyTorque(lua_State *L) +static int _olua_fun_cocos2d_PhysicsBody_applyTorque(lua_State *L) { olua_startinvoke(L); @@ -1106,7 +1222,7 @@ static int _cocos2d_PhysicsBody_applyTorque(lua_State *L) return 0; } -static int _cocos2d_PhysicsBody_create$1(lua_State *L) +static int _olua_fun_cocos2d_PhysicsBody_create$1(lua_State *L) { olua_startinvoke(L); @@ -1119,7 +1235,7 @@ static int _cocos2d_PhysicsBody_create$1(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsBody_create$2(lua_State *L) +static int _olua_fun_cocos2d_PhysicsBody_create$2(lua_State *L) { olua_startinvoke(L); @@ -1136,7 +1252,7 @@ static int _cocos2d_PhysicsBody_create$2(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsBody_create$3(lua_State *L) +static int _olua_fun_cocos2d_PhysicsBody_create$3(lua_State *L) { olua_startinvoke(L); @@ -1155,26 +1271,26 @@ static int _cocos2d_PhysicsBody_create$3(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsBody_create(lua_State *L) +static int _olua_fun_cocos2d_PhysicsBody_create(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 0) { // static cocos2d::PhysicsBody *create() - return _cocos2d_PhysicsBody_create$1(L); + return _olua_fun_cocos2d_PhysicsBody_create$1(L); } if (num_args == 1) { // if ((olua_is_number(L, 1))) { // static cocos2d::PhysicsBody *create(float mass) - return _cocos2d_PhysicsBody_create$2(L); + return _olua_fun_cocos2d_PhysicsBody_create$2(L); // } } if (num_args == 2) { // if ((olua_is_number(L, 1)) && (olua_is_number(L, 2))) { // static cocos2d::PhysicsBody *create(float mass, float moment) - return _cocos2d_PhysicsBody_create$3(L); + return _olua_fun_cocos2d_PhysicsBody_create$3(L); // } } @@ -1183,20 +1299,20 @@ static int _cocos2d_PhysicsBody_create(lua_State *L) return 0; } -static int _cocos2d_PhysicsBody_createBox$1(lua_State *L) +static int _olua_fun_cocos2d_PhysicsBody_createBox$1(lua_State *L) { olua_startinvoke(L); - cocos2d::Size arg1; /** size */ - cocos2d::PhysicsMaterial arg2; /** material */ - cocos2d::Vec2 arg3; /** offset */ + cocos2d::Size *arg1; /** size */ + cocos2d::PhysicsMaterial *arg2; /** material */ + cocos2d::Vec2 *arg3; /** offset */ olua_check_object(L, 1, &arg1, "cc.Size"); olua_check_object(L, 2, &arg2, "cc.PhysicsMaterial"); olua_check_object(L, 3, &arg3, "cc.Vec2"); // static cocos2d::PhysicsBody *createBox(const cocos2d::Size &size, @optional const cocos2d::PhysicsMaterial &material, @optional const cocos2d::Vec2 &offset) - cocos2d::PhysicsBody *ret = cocos2d::PhysicsBody::createBox(arg1, arg2, arg3); + cocos2d::PhysicsBody *ret = cocos2d::PhysicsBody::createBox(*arg1, *arg2, *arg3); int num_ret = olua_push_object(L, ret, "cc.PhysicsBody"); olua_endinvoke(L); @@ -1204,16 +1320,16 @@ static int _cocos2d_PhysicsBody_createBox$1(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsBody_createBox$2(lua_State *L) +static int _olua_fun_cocos2d_PhysicsBody_createBox$2(lua_State *L) { olua_startinvoke(L); - cocos2d::Size arg1; /** size */ + cocos2d::Size *arg1; /** size */ olua_check_object(L, 1, &arg1, "cc.Size"); - // static cocos2d::PhysicsBody *createBox(const cocos2d::Size &size, @optional const cocos2d::PhysicsMaterial &material, @optional const cocos2d::Vec2 &offset) - cocos2d::PhysicsBody *ret = cocos2d::PhysicsBody::createBox(arg1); + // static cocos2d::PhysicsBody *createBox(const cocos2d::Size &size) + cocos2d::PhysicsBody *ret = cocos2d::PhysicsBody::createBox(*arg1); int num_ret = olua_push_object(L, ret, "cc.PhysicsBody"); olua_endinvoke(L); @@ -1221,18 +1337,18 @@ static int _cocos2d_PhysicsBody_createBox$2(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsBody_createBox$3(lua_State *L) +static int _olua_fun_cocos2d_PhysicsBody_createBox$3(lua_State *L) { olua_startinvoke(L); - cocos2d::Size arg1; /** size */ - cocos2d::PhysicsMaterial arg2; /** material */ + cocos2d::Size *arg1; /** size */ + cocos2d::PhysicsMaterial *arg2; /** material */ olua_check_object(L, 1, &arg1, "cc.Size"); olua_check_object(L, 2, &arg2, "cc.PhysicsMaterial"); - // static cocos2d::PhysicsBody *createBox(const cocos2d::Size &size, @optional const cocos2d::PhysicsMaterial &material, @optional const cocos2d::Vec2 &offset) - cocos2d::PhysicsBody *ret = cocos2d::PhysicsBody::createBox(arg1, arg2); + // static cocos2d::PhysicsBody *createBox(const cocos2d::Size &size, @optional const cocos2d::PhysicsMaterial &material) + cocos2d::PhysicsBody *ret = cocos2d::PhysicsBody::createBox(*arg1, *arg2); int num_ret = olua_push_object(L, ret, "cc.PhysicsBody"); olua_endinvoke(L); @@ -1240,28 +1356,28 @@ static int _cocos2d_PhysicsBody_createBox$3(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsBody_createBox(lua_State *L) +static int _olua_fun_cocos2d_PhysicsBody_createBox(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 1) { // if ((olua_is_object(L, 1, "cc.Size"))) { - // static cocos2d::PhysicsBody *createBox(const cocos2d::Size &size, @optional const cocos2d::PhysicsMaterial &material, @optional const cocos2d::Vec2 &offset) - return _cocos2d_PhysicsBody_createBox$2(L); + // static cocos2d::PhysicsBody *createBox(const cocos2d::Size &size) + return _olua_fun_cocos2d_PhysicsBody_createBox$2(L); // } } if (num_args == 2) { // if ((olua_is_object(L, 1, "cc.Size")) && (olua_is_object(L, 2, "cc.PhysicsMaterial"))) { - // static cocos2d::PhysicsBody *createBox(const cocos2d::Size &size, @optional const cocos2d::PhysicsMaterial &material, @optional const cocos2d::Vec2 &offset) - return _cocos2d_PhysicsBody_createBox$3(L); + // static cocos2d::PhysicsBody *createBox(const cocos2d::Size &size, @optional const cocos2d::PhysicsMaterial &material) + return _olua_fun_cocos2d_PhysicsBody_createBox$3(L); // } } if (num_args == 3) { // if ((olua_is_object(L, 1, "cc.Size")) && (olua_is_object(L, 2, "cc.PhysicsMaterial")) && (olua_is_object(L, 3, "cc.Vec2"))) { // static cocos2d::PhysicsBody *createBox(const cocos2d::Size &size, @optional const cocos2d::PhysicsMaterial &material, @optional const cocos2d::Vec2 &offset) - return _cocos2d_PhysicsBody_createBox$1(L); + return _olua_fun_cocos2d_PhysicsBody_createBox$1(L); // } } @@ -1270,20 +1386,20 @@ static int _cocos2d_PhysicsBody_createBox(lua_State *L) return 0; } -static int _cocos2d_PhysicsBody_createCircle$1(lua_State *L) +static int _olua_fun_cocos2d_PhysicsBody_createCircle$1(lua_State *L) { olua_startinvoke(L); float arg1 = 0; /** radius */ - cocos2d::PhysicsMaterial arg2; /** material */ - cocos2d::Vec2 arg3; /** offset */ + cocos2d::PhysicsMaterial *arg2; /** material */ + cocos2d::Vec2 *arg3; /** offset */ olua_check_number(L, 1, &arg1); olua_check_object(L, 2, &arg2, "cc.PhysicsMaterial"); olua_check_object(L, 3, &arg3, "cc.Vec2"); // static cocos2d::PhysicsBody *createCircle(float radius, @optional const cocos2d::PhysicsMaterial &material, @optional const cocos2d::Vec2 &offset) - cocos2d::PhysicsBody *ret = cocos2d::PhysicsBody::createCircle(arg1, arg2, arg3); + cocos2d::PhysicsBody *ret = cocos2d::PhysicsBody::createCircle(arg1, *arg2, *arg3); int num_ret = olua_push_object(L, ret, "cc.PhysicsBody"); olua_endinvoke(L); @@ -1291,7 +1407,7 @@ static int _cocos2d_PhysicsBody_createCircle$1(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsBody_createCircle$2(lua_State *L) +static int _olua_fun_cocos2d_PhysicsBody_createCircle$2(lua_State *L) { olua_startinvoke(L); @@ -1299,7 +1415,7 @@ static int _cocos2d_PhysicsBody_createCircle$2(lua_State *L) olua_check_number(L, 1, &arg1); - // static cocos2d::PhysicsBody *createCircle(float radius, @optional const cocos2d::PhysicsMaterial &material, @optional const cocos2d::Vec2 &offset) + // static cocos2d::PhysicsBody *createCircle(float radius) cocos2d::PhysicsBody *ret = cocos2d::PhysicsBody::createCircle(arg1); int num_ret = olua_push_object(L, ret, "cc.PhysicsBody"); @@ -1308,18 +1424,18 @@ static int _cocos2d_PhysicsBody_createCircle$2(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsBody_createCircle$3(lua_State *L) +static int _olua_fun_cocos2d_PhysicsBody_createCircle$3(lua_State *L) { olua_startinvoke(L); float arg1 = 0; /** radius */ - cocos2d::PhysicsMaterial arg2; /** material */ + cocos2d::PhysicsMaterial *arg2; /** material */ olua_check_number(L, 1, &arg1); olua_check_object(L, 2, &arg2, "cc.PhysicsMaterial"); - // static cocos2d::PhysicsBody *createCircle(float radius, @optional const cocos2d::PhysicsMaterial &material, @optional const cocos2d::Vec2 &offset) - cocos2d::PhysicsBody *ret = cocos2d::PhysicsBody::createCircle(arg1, arg2); + // static cocos2d::PhysicsBody *createCircle(float radius, @optional const cocos2d::PhysicsMaterial &material) + cocos2d::PhysicsBody *ret = cocos2d::PhysicsBody::createCircle(arg1, *arg2); int num_ret = olua_push_object(L, ret, "cc.PhysicsBody"); olua_endinvoke(L); @@ -1327,28 +1443,28 @@ static int _cocos2d_PhysicsBody_createCircle$3(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsBody_createCircle(lua_State *L) +static int _olua_fun_cocos2d_PhysicsBody_createCircle(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 1) { // if ((olua_is_number(L, 1))) { - // static cocos2d::PhysicsBody *createCircle(float radius, @optional const cocos2d::PhysicsMaterial &material, @optional const cocos2d::Vec2 &offset) - return _cocos2d_PhysicsBody_createCircle$2(L); + // static cocos2d::PhysicsBody *createCircle(float radius) + return _olua_fun_cocos2d_PhysicsBody_createCircle$2(L); // } } if (num_args == 2) { // if ((olua_is_number(L, 1)) && (olua_is_object(L, 2, "cc.PhysicsMaterial"))) { - // static cocos2d::PhysicsBody *createCircle(float radius, @optional const cocos2d::PhysicsMaterial &material, @optional const cocos2d::Vec2 &offset) - return _cocos2d_PhysicsBody_createCircle$3(L); + // static cocos2d::PhysicsBody *createCircle(float radius, @optional const cocos2d::PhysicsMaterial &material) + return _olua_fun_cocos2d_PhysicsBody_createCircle$3(L); // } } if (num_args == 3) { // if ((olua_is_number(L, 1)) && (olua_is_object(L, 2, "cc.PhysicsMaterial")) && (olua_is_object(L, 3, "cc.Vec2"))) { // static cocos2d::PhysicsBody *createCircle(float radius, @optional const cocos2d::PhysicsMaterial &material, @optional const cocos2d::Vec2 &offset) - return _cocos2d_PhysicsBody_createCircle$1(L); + return _olua_fun_cocos2d_PhysicsBody_createCircle$1(L); // } } @@ -1357,14 +1473,14 @@ static int _cocos2d_PhysicsBody_createCircle(lua_State *L) return 0; } -static int _cocos2d_PhysicsBody_createEdgeBox$1(lua_State *L) +static int _olua_fun_cocos2d_PhysicsBody_createEdgeBox$1(lua_State *L) { olua_startinvoke(L); - cocos2d::Size arg1; /** size */ - cocos2d::PhysicsMaterial arg2; /** material */ + cocos2d::Size *arg1; /** size */ + cocos2d::PhysicsMaterial *arg2; /** material */ float arg3 = 0; /** border */ - cocos2d::Vec2 arg4; /** offset */ + cocos2d::Vec2 *arg4; /** offset */ olua_check_object(L, 1, &arg1, "cc.Size"); olua_check_object(L, 2, &arg2, "cc.PhysicsMaterial"); @@ -1372,7 +1488,7 @@ static int _cocos2d_PhysicsBody_createEdgeBox$1(lua_State *L) olua_check_object(L, 4, &arg4, "cc.Vec2"); // static cocos2d::PhysicsBody *createEdgeBox(const cocos2d::Size &size, @optional const cocos2d::PhysicsMaterial &material, @optional float border, @optional const cocos2d::Vec2 &offset) - cocos2d::PhysicsBody *ret = cocos2d::PhysicsBody::createEdgeBox(arg1, arg2, arg3, arg4); + cocos2d::PhysicsBody *ret = cocos2d::PhysicsBody::createEdgeBox(*arg1, *arg2, arg3, *arg4); int num_ret = olua_push_object(L, ret, "cc.PhysicsBody"); olua_endinvoke(L); @@ -1380,16 +1496,16 @@ static int _cocos2d_PhysicsBody_createEdgeBox$1(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsBody_createEdgeBox$2(lua_State *L) +static int _olua_fun_cocos2d_PhysicsBody_createEdgeBox$2(lua_State *L) { olua_startinvoke(L); - cocos2d::Size arg1; /** size */ + cocos2d::Size *arg1; /** size */ olua_check_object(L, 1, &arg1, "cc.Size"); - // static cocos2d::PhysicsBody *createEdgeBox(const cocos2d::Size &size, @optional const cocos2d::PhysicsMaterial &material, @optional float border, @optional const cocos2d::Vec2 &offset) - cocos2d::PhysicsBody *ret = cocos2d::PhysicsBody::createEdgeBox(arg1); + // static cocos2d::PhysicsBody *createEdgeBox(const cocos2d::Size &size) + cocos2d::PhysicsBody *ret = cocos2d::PhysicsBody::createEdgeBox(*arg1); int num_ret = olua_push_object(L, ret, "cc.PhysicsBody"); olua_endinvoke(L); @@ -1397,18 +1513,18 @@ static int _cocos2d_PhysicsBody_createEdgeBox$2(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsBody_createEdgeBox$3(lua_State *L) +static int _olua_fun_cocos2d_PhysicsBody_createEdgeBox$3(lua_State *L) { olua_startinvoke(L); - cocos2d::Size arg1; /** size */ - cocos2d::PhysicsMaterial arg2; /** material */ + cocos2d::Size *arg1; /** size */ + cocos2d::PhysicsMaterial *arg2; /** material */ olua_check_object(L, 1, &arg1, "cc.Size"); olua_check_object(L, 2, &arg2, "cc.PhysicsMaterial"); - // static cocos2d::PhysicsBody *createEdgeBox(const cocos2d::Size &size, @optional const cocos2d::PhysicsMaterial &material, @optional float border, @optional const cocos2d::Vec2 &offset) - cocos2d::PhysicsBody *ret = cocos2d::PhysicsBody::createEdgeBox(arg1, arg2); + // static cocos2d::PhysicsBody *createEdgeBox(const cocos2d::Size &size, @optional const cocos2d::PhysicsMaterial &material) + cocos2d::PhysicsBody *ret = cocos2d::PhysicsBody::createEdgeBox(*arg1, *arg2); int num_ret = olua_push_object(L, ret, "cc.PhysicsBody"); olua_endinvoke(L); @@ -1416,20 +1532,20 @@ static int _cocos2d_PhysicsBody_createEdgeBox$3(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsBody_createEdgeBox$4(lua_State *L) +static int _olua_fun_cocos2d_PhysicsBody_createEdgeBox$4(lua_State *L) { olua_startinvoke(L); - cocos2d::Size arg1; /** size */ - cocos2d::PhysicsMaterial arg2; /** material */ + cocos2d::Size *arg1; /** size */ + cocos2d::PhysicsMaterial *arg2; /** material */ float arg3 = 0; /** border */ olua_check_object(L, 1, &arg1, "cc.Size"); olua_check_object(L, 2, &arg2, "cc.PhysicsMaterial"); olua_check_number(L, 3, &arg3); - // static cocos2d::PhysicsBody *createEdgeBox(const cocos2d::Size &size, @optional const cocos2d::PhysicsMaterial &material, @optional float border, @optional const cocos2d::Vec2 &offset) - cocos2d::PhysicsBody *ret = cocos2d::PhysicsBody::createEdgeBox(arg1, arg2, arg3); + // static cocos2d::PhysicsBody *createEdgeBox(const cocos2d::Size &size, @optional const cocos2d::PhysicsMaterial &material, @optional float border) + cocos2d::PhysicsBody *ret = cocos2d::PhysicsBody::createEdgeBox(*arg1, *arg2, arg3); int num_ret = olua_push_object(L, ret, "cc.PhysicsBody"); olua_endinvoke(L); @@ -1437,35 +1553,35 @@ static int _cocos2d_PhysicsBody_createEdgeBox$4(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsBody_createEdgeBox(lua_State *L) +static int _olua_fun_cocos2d_PhysicsBody_createEdgeBox(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 1) { // if ((olua_is_object(L, 1, "cc.Size"))) { - // static cocos2d::PhysicsBody *createEdgeBox(const cocos2d::Size &size, @optional const cocos2d::PhysicsMaterial &material, @optional float border, @optional const cocos2d::Vec2 &offset) - return _cocos2d_PhysicsBody_createEdgeBox$2(L); + // static cocos2d::PhysicsBody *createEdgeBox(const cocos2d::Size &size) + return _olua_fun_cocos2d_PhysicsBody_createEdgeBox$2(L); // } } if (num_args == 2) { // if ((olua_is_object(L, 1, "cc.Size")) && (olua_is_object(L, 2, "cc.PhysicsMaterial"))) { - // static cocos2d::PhysicsBody *createEdgeBox(const cocos2d::Size &size, @optional const cocos2d::PhysicsMaterial &material, @optional float border, @optional const cocos2d::Vec2 &offset) - return _cocos2d_PhysicsBody_createEdgeBox$3(L); + // static cocos2d::PhysicsBody *createEdgeBox(const cocos2d::Size &size, @optional const cocos2d::PhysicsMaterial &material) + return _olua_fun_cocos2d_PhysicsBody_createEdgeBox$3(L); // } } if (num_args == 3) { // if ((olua_is_object(L, 1, "cc.Size")) && (olua_is_object(L, 2, "cc.PhysicsMaterial")) && (olua_is_number(L, 3))) { - // static cocos2d::PhysicsBody *createEdgeBox(const cocos2d::Size &size, @optional const cocos2d::PhysicsMaterial &material, @optional float border, @optional const cocos2d::Vec2 &offset) - return _cocos2d_PhysicsBody_createEdgeBox$4(L); + // static cocos2d::PhysicsBody *createEdgeBox(const cocos2d::Size &size, @optional const cocos2d::PhysicsMaterial &material, @optional float border) + return _olua_fun_cocos2d_PhysicsBody_createEdgeBox$4(L); // } } if (num_args == 4) { // if ((olua_is_object(L, 1, "cc.Size")) && (olua_is_object(L, 2, "cc.PhysicsMaterial")) && (olua_is_number(L, 3)) && (olua_is_object(L, 4, "cc.Vec2"))) { // static cocos2d::PhysicsBody *createEdgeBox(const cocos2d::Size &size, @optional const cocos2d::PhysicsMaterial &material, @optional float border, @optional const cocos2d::Vec2 &offset) - return _cocos2d_PhysicsBody_createEdgeBox$1(L); + return _olua_fun_cocos2d_PhysicsBody_createEdgeBox$1(L); // } } @@ -1474,13 +1590,13 @@ static int _cocos2d_PhysicsBody_createEdgeBox(lua_State *L) return 0; } -static int _cocos2d_PhysicsBody_createEdgeChain$1(lua_State *L) +static int _olua_fun_cocos2d_PhysicsBody_createEdgeChain$1(lua_State *L) { olua_startinvoke(L); cocos2d::Vec2 *arg1 = nullptr; /** points */ int arg2 = 0; /** count */ - cocos2d::PhysicsMaterial arg3; /** material */ + cocos2d::PhysicsMaterial *arg3; /** material */ float arg4 = 0; /** border */ olua_check_object(L, 1, &arg1, "cc.Vec2"); @@ -1489,7 +1605,7 @@ static int _cocos2d_PhysicsBody_createEdgeChain$1(lua_State *L) olua_check_number(L, 4, &arg4); // static cocos2d::PhysicsBody *createEdgeChain(const cocos2d::Vec2 *points, int count, @optional const cocos2d::PhysicsMaterial &material, @optional float border) - cocos2d::PhysicsBody *ret = cocos2d::PhysicsBody::createEdgeChain(arg1, arg2, arg3, arg4); + cocos2d::PhysicsBody *ret = cocos2d::PhysicsBody::createEdgeChain(arg1, arg2, *arg3, arg4); int num_ret = olua_push_object(L, ret, "cc.PhysicsBody"); olua_endinvoke(L); @@ -1497,7 +1613,7 @@ static int _cocos2d_PhysicsBody_createEdgeChain$1(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsBody_createEdgeChain$2(lua_State *L) +static int _olua_fun_cocos2d_PhysicsBody_createEdgeChain$2(lua_State *L) { olua_startinvoke(L); @@ -1507,7 +1623,7 @@ static int _cocos2d_PhysicsBody_createEdgeChain$2(lua_State *L) olua_check_object(L, 1, &arg1, "cc.Vec2"); olua_check_integer(L, 2, &arg2); - // static cocos2d::PhysicsBody *createEdgeChain(const cocos2d::Vec2 *points, int count, @optional const cocos2d::PhysicsMaterial &material, @optional float border) + // static cocos2d::PhysicsBody *createEdgeChain(const cocos2d::Vec2 *points, int count) cocos2d::PhysicsBody *ret = cocos2d::PhysicsBody::createEdgeChain(arg1, arg2); int num_ret = olua_push_object(L, ret, "cc.PhysicsBody"); @@ -1516,20 +1632,20 @@ static int _cocos2d_PhysicsBody_createEdgeChain$2(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsBody_createEdgeChain$3(lua_State *L) +static int _olua_fun_cocos2d_PhysicsBody_createEdgeChain$3(lua_State *L) { olua_startinvoke(L); cocos2d::Vec2 *arg1 = nullptr; /** points */ int arg2 = 0; /** count */ - cocos2d::PhysicsMaterial arg3; /** material */ + cocos2d::PhysicsMaterial *arg3; /** material */ olua_check_object(L, 1, &arg1, "cc.Vec2"); olua_check_integer(L, 2, &arg2); olua_check_object(L, 3, &arg3, "cc.PhysicsMaterial"); - // static cocos2d::PhysicsBody *createEdgeChain(const cocos2d::Vec2 *points, int count, @optional const cocos2d::PhysicsMaterial &material, @optional float border) - cocos2d::PhysicsBody *ret = cocos2d::PhysicsBody::createEdgeChain(arg1, arg2, arg3); + // static cocos2d::PhysicsBody *createEdgeChain(const cocos2d::Vec2 *points, int count, @optional const cocos2d::PhysicsMaterial &material) + cocos2d::PhysicsBody *ret = cocos2d::PhysicsBody::createEdgeChain(arg1, arg2, *arg3); int num_ret = olua_push_object(L, ret, "cc.PhysicsBody"); olua_endinvoke(L); @@ -1537,28 +1653,28 @@ static int _cocos2d_PhysicsBody_createEdgeChain$3(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsBody_createEdgeChain(lua_State *L) +static int _olua_fun_cocos2d_PhysicsBody_createEdgeChain(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 2) { // if ((olua_is_object(L, 1, "cc.Vec2")) && (olua_is_integer(L, 2))) { - // static cocos2d::PhysicsBody *createEdgeChain(const cocos2d::Vec2 *points, int count, @optional const cocos2d::PhysicsMaterial &material, @optional float border) - return _cocos2d_PhysicsBody_createEdgeChain$2(L); + // static cocos2d::PhysicsBody *createEdgeChain(const cocos2d::Vec2 *points, int count) + return _olua_fun_cocos2d_PhysicsBody_createEdgeChain$2(L); // } } if (num_args == 3) { // if ((olua_is_object(L, 1, "cc.Vec2")) && (olua_is_integer(L, 2)) && (olua_is_object(L, 3, "cc.PhysicsMaterial"))) { - // static cocos2d::PhysicsBody *createEdgeChain(const cocos2d::Vec2 *points, int count, @optional const cocos2d::PhysicsMaterial &material, @optional float border) - return _cocos2d_PhysicsBody_createEdgeChain$3(L); + // static cocos2d::PhysicsBody *createEdgeChain(const cocos2d::Vec2 *points, int count, @optional const cocos2d::PhysicsMaterial &material) + return _olua_fun_cocos2d_PhysicsBody_createEdgeChain$3(L); // } } if (num_args == 4) { // if ((olua_is_object(L, 1, "cc.Vec2")) && (olua_is_integer(L, 2)) && (olua_is_object(L, 3, "cc.PhysicsMaterial")) && (olua_is_number(L, 4))) { // static cocos2d::PhysicsBody *createEdgeChain(const cocos2d::Vec2 *points, int count, @optional const cocos2d::PhysicsMaterial &material, @optional float border) - return _cocos2d_PhysicsBody_createEdgeChain$1(L); + return _olua_fun_cocos2d_PhysicsBody_createEdgeChain$1(L); // } } @@ -1567,13 +1683,13 @@ static int _cocos2d_PhysicsBody_createEdgeChain(lua_State *L) return 0; } -static int _cocos2d_PhysicsBody_createEdgePolygon$1(lua_State *L) +static int _olua_fun_cocos2d_PhysicsBody_createEdgePolygon$1(lua_State *L) { olua_startinvoke(L); cocos2d::Vec2 *arg1 = nullptr; /** points */ int arg2 = 0; /** count */ - cocos2d::PhysicsMaterial arg3; /** material */ + cocos2d::PhysicsMaterial *arg3; /** material */ float arg4 = 0; /** border */ olua_check_object(L, 1, &arg1, "cc.Vec2"); @@ -1582,7 +1698,7 @@ static int _cocos2d_PhysicsBody_createEdgePolygon$1(lua_State *L) olua_check_number(L, 4, &arg4); // static cocos2d::PhysicsBody *createEdgePolygon(const cocos2d::Vec2 *points, int count, @optional const cocos2d::PhysicsMaterial &material, @optional float border) - cocos2d::PhysicsBody *ret = cocos2d::PhysicsBody::createEdgePolygon(arg1, arg2, arg3, arg4); + cocos2d::PhysicsBody *ret = cocos2d::PhysicsBody::createEdgePolygon(arg1, arg2, *arg3, arg4); int num_ret = olua_push_object(L, ret, "cc.PhysicsBody"); olua_endinvoke(L); @@ -1590,7 +1706,7 @@ static int _cocos2d_PhysicsBody_createEdgePolygon$1(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsBody_createEdgePolygon$2(lua_State *L) +static int _olua_fun_cocos2d_PhysicsBody_createEdgePolygon$2(lua_State *L) { olua_startinvoke(L); @@ -1600,7 +1716,7 @@ static int _cocos2d_PhysicsBody_createEdgePolygon$2(lua_State *L) olua_check_object(L, 1, &arg1, "cc.Vec2"); olua_check_integer(L, 2, &arg2); - // static cocos2d::PhysicsBody *createEdgePolygon(const cocos2d::Vec2 *points, int count, @optional const cocos2d::PhysicsMaterial &material, @optional float border) + // static cocos2d::PhysicsBody *createEdgePolygon(const cocos2d::Vec2 *points, int count) cocos2d::PhysicsBody *ret = cocos2d::PhysicsBody::createEdgePolygon(arg1, arg2); int num_ret = olua_push_object(L, ret, "cc.PhysicsBody"); @@ -1609,20 +1725,20 @@ static int _cocos2d_PhysicsBody_createEdgePolygon$2(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsBody_createEdgePolygon$3(lua_State *L) +static int _olua_fun_cocos2d_PhysicsBody_createEdgePolygon$3(lua_State *L) { olua_startinvoke(L); cocos2d::Vec2 *arg1 = nullptr; /** points */ int arg2 = 0; /** count */ - cocos2d::PhysicsMaterial arg3; /** material */ + cocos2d::PhysicsMaterial *arg3; /** material */ olua_check_object(L, 1, &arg1, "cc.Vec2"); olua_check_integer(L, 2, &arg2); olua_check_object(L, 3, &arg3, "cc.PhysicsMaterial"); - // static cocos2d::PhysicsBody *createEdgePolygon(const cocos2d::Vec2 *points, int count, @optional const cocos2d::PhysicsMaterial &material, @optional float border) - cocos2d::PhysicsBody *ret = cocos2d::PhysicsBody::createEdgePolygon(arg1, arg2, arg3); + // static cocos2d::PhysicsBody *createEdgePolygon(const cocos2d::Vec2 *points, int count, @optional const cocos2d::PhysicsMaterial &material) + cocos2d::PhysicsBody *ret = cocos2d::PhysicsBody::createEdgePolygon(arg1, arg2, *arg3); int num_ret = olua_push_object(L, ret, "cc.PhysicsBody"); olua_endinvoke(L); @@ -1630,28 +1746,28 @@ static int _cocos2d_PhysicsBody_createEdgePolygon$3(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsBody_createEdgePolygon(lua_State *L) +static int _olua_fun_cocos2d_PhysicsBody_createEdgePolygon(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 2) { // if ((olua_is_object(L, 1, "cc.Vec2")) && (olua_is_integer(L, 2))) { - // static cocos2d::PhysicsBody *createEdgePolygon(const cocos2d::Vec2 *points, int count, @optional const cocos2d::PhysicsMaterial &material, @optional float border) - return _cocos2d_PhysicsBody_createEdgePolygon$2(L); + // static cocos2d::PhysicsBody *createEdgePolygon(const cocos2d::Vec2 *points, int count) + return _olua_fun_cocos2d_PhysicsBody_createEdgePolygon$2(L); // } } if (num_args == 3) { // if ((olua_is_object(L, 1, "cc.Vec2")) && (olua_is_integer(L, 2)) && (olua_is_object(L, 3, "cc.PhysicsMaterial"))) { - // static cocos2d::PhysicsBody *createEdgePolygon(const cocos2d::Vec2 *points, int count, @optional const cocos2d::PhysicsMaterial &material, @optional float border) - return _cocos2d_PhysicsBody_createEdgePolygon$3(L); + // static cocos2d::PhysicsBody *createEdgePolygon(const cocos2d::Vec2 *points, int count, @optional const cocos2d::PhysicsMaterial &material) + return _olua_fun_cocos2d_PhysicsBody_createEdgePolygon$3(L); // } } if (num_args == 4) { // if ((olua_is_object(L, 1, "cc.Vec2")) && (olua_is_integer(L, 2)) && (olua_is_object(L, 3, "cc.PhysicsMaterial")) && (olua_is_number(L, 4))) { // static cocos2d::PhysicsBody *createEdgePolygon(const cocos2d::Vec2 *points, int count, @optional const cocos2d::PhysicsMaterial &material, @optional float border) - return _cocos2d_PhysicsBody_createEdgePolygon$1(L); + return _olua_fun_cocos2d_PhysicsBody_createEdgePolygon$1(L); // } } @@ -1660,13 +1776,13 @@ static int _cocos2d_PhysicsBody_createEdgePolygon(lua_State *L) return 0; } -static int _cocos2d_PhysicsBody_createEdgeSegment$1(lua_State *L) +static int _olua_fun_cocos2d_PhysicsBody_createEdgeSegment$1(lua_State *L) { olua_startinvoke(L); - cocos2d::Vec2 arg1; /** a */ - cocos2d::Vec2 arg2; /** b */ - cocos2d::PhysicsMaterial arg3; /** material */ + cocos2d::Vec2 *arg1; /** a */ + cocos2d::Vec2 *arg2; /** b */ + cocos2d::PhysicsMaterial *arg3; /** material */ float arg4 = 0; /** border */ olua_check_object(L, 1, &arg1, "cc.Vec2"); @@ -1675,7 +1791,7 @@ static int _cocos2d_PhysicsBody_createEdgeSegment$1(lua_State *L) olua_check_number(L, 4, &arg4); // static cocos2d::PhysicsBody *createEdgeSegment(const cocos2d::Vec2 &a, const cocos2d::Vec2 &b, @optional const cocos2d::PhysicsMaterial &material, @optional float border) - cocos2d::PhysicsBody *ret = cocos2d::PhysicsBody::createEdgeSegment(arg1, arg2, arg3, arg4); + cocos2d::PhysicsBody *ret = cocos2d::PhysicsBody::createEdgeSegment(*arg1, *arg2, *arg3, arg4); int num_ret = olua_push_object(L, ret, "cc.PhysicsBody"); olua_endinvoke(L); @@ -1683,18 +1799,18 @@ static int _cocos2d_PhysicsBody_createEdgeSegment$1(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsBody_createEdgeSegment$2(lua_State *L) +static int _olua_fun_cocos2d_PhysicsBody_createEdgeSegment$2(lua_State *L) { olua_startinvoke(L); - cocos2d::Vec2 arg1; /** a */ - cocos2d::Vec2 arg2; /** b */ + cocos2d::Vec2 *arg1; /** a */ + cocos2d::Vec2 *arg2; /** b */ olua_check_object(L, 1, &arg1, "cc.Vec2"); olua_check_object(L, 2, &arg2, "cc.Vec2"); - // static cocos2d::PhysicsBody *createEdgeSegment(const cocos2d::Vec2 &a, const cocos2d::Vec2 &b, @optional const cocos2d::PhysicsMaterial &material, @optional float border) - cocos2d::PhysicsBody *ret = cocos2d::PhysicsBody::createEdgeSegment(arg1, arg2); + // static cocos2d::PhysicsBody *createEdgeSegment(const cocos2d::Vec2 &a, const cocos2d::Vec2 &b) + cocos2d::PhysicsBody *ret = cocos2d::PhysicsBody::createEdgeSegment(*arg1, *arg2); int num_ret = olua_push_object(L, ret, "cc.PhysicsBody"); olua_endinvoke(L); @@ -1702,20 +1818,20 @@ static int _cocos2d_PhysicsBody_createEdgeSegment$2(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsBody_createEdgeSegment$3(lua_State *L) +static int _olua_fun_cocos2d_PhysicsBody_createEdgeSegment$3(lua_State *L) { olua_startinvoke(L); - cocos2d::Vec2 arg1; /** a */ - cocos2d::Vec2 arg2; /** b */ - cocos2d::PhysicsMaterial arg3; /** material */ + cocos2d::Vec2 *arg1; /** a */ + cocos2d::Vec2 *arg2; /** b */ + cocos2d::PhysicsMaterial *arg3; /** material */ olua_check_object(L, 1, &arg1, "cc.Vec2"); olua_check_object(L, 2, &arg2, "cc.Vec2"); olua_check_object(L, 3, &arg3, "cc.PhysicsMaterial"); - // static cocos2d::PhysicsBody *createEdgeSegment(const cocos2d::Vec2 &a, const cocos2d::Vec2 &b, @optional const cocos2d::PhysicsMaterial &material, @optional float border) - cocos2d::PhysicsBody *ret = cocos2d::PhysicsBody::createEdgeSegment(arg1, arg2, arg3); + // static cocos2d::PhysicsBody *createEdgeSegment(const cocos2d::Vec2 &a, const cocos2d::Vec2 &b, @optional const cocos2d::PhysicsMaterial &material) + cocos2d::PhysicsBody *ret = cocos2d::PhysicsBody::createEdgeSegment(*arg1, *arg2, *arg3); int num_ret = olua_push_object(L, ret, "cc.PhysicsBody"); olua_endinvoke(L); @@ -1723,28 +1839,28 @@ static int _cocos2d_PhysicsBody_createEdgeSegment$3(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsBody_createEdgeSegment(lua_State *L) +static int _olua_fun_cocos2d_PhysicsBody_createEdgeSegment(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 2) { // if ((olua_is_object(L, 1, "cc.Vec2")) && (olua_is_object(L, 2, "cc.Vec2"))) { - // static cocos2d::PhysicsBody *createEdgeSegment(const cocos2d::Vec2 &a, const cocos2d::Vec2 &b, @optional const cocos2d::PhysicsMaterial &material, @optional float border) - return _cocos2d_PhysicsBody_createEdgeSegment$2(L); + // static cocos2d::PhysicsBody *createEdgeSegment(const cocos2d::Vec2 &a, const cocos2d::Vec2 &b) + return _olua_fun_cocos2d_PhysicsBody_createEdgeSegment$2(L); // } } if (num_args == 3) { // if ((olua_is_object(L, 1, "cc.Vec2")) && (olua_is_object(L, 2, "cc.Vec2")) && (olua_is_object(L, 3, "cc.PhysicsMaterial"))) { - // static cocos2d::PhysicsBody *createEdgeSegment(const cocos2d::Vec2 &a, const cocos2d::Vec2 &b, @optional const cocos2d::PhysicsMaterial &material, @optional float border) - return _cocos2d_PhysicsBody_createEdgeSegment$3(L); + // static cocos2d::PhysicsBody *createEdgeSegment(const cocos2d::Vec2 &a, const cocos2d::Vec2 &b, @optional const cocos2d::PhysicsMaterial &material) + return _olua_fun_cocos2d_PhysicsBody_createEdgeSegment$3(L); // } } if (num_args == 4) { // if ((olua_is_object(L, 1, "cc.Vec2")) && (olua_is_object(L, 2, "cc.Vec2")) && (olua_is_object(L, 3, "cc.PhysicsMaterial")) && (olua_is_number(L, 4))) { // static cocos2d::PhysicsBody *createEdgeSegment(const cocos2d::Vec2 &a, const cocos2d::Vec2 &b, @optional const cocos2d::PhysicsMaterial &material, @optional float border) - return _cocos2d_PhysicsBody_createEdgeSegment$1(L); + return _olua_fun_cocos2d_PhysicsBody_createEdgeSegment$1(L); // } } @@ -1753,14 +1869,14 @@ static int _cocos2d_PhysicsBody_createEdgeSegment(lua_State *L) return 0; } -static int _cocos2d_PhysicsBody_createPolygon$1(lua_State *L) +static int _olua_fun_cocos2d_PhysicsBody_createPolygon$1(lua_State *L) { olua_startinvoke(L); cocos2d::Vec2 *arg1 = nullptr; /** points */ int arg2 = 0; /** count */ - cocos2d::PhysicsMaterial arg3; /** material */ - cocos2d::Vec2 arg4; /** offset */ + cocos2d::PhysicsMaterial *arg3; /** material */ + cocos2d::Vec2 *arg4; /** offset */ olua_check_object(L, 1, &arg1, "cc.Vec2"); olua_check_integer(L, 2, &arg2); @@ -1768,7 +1884,7 @@ static int _cocos2d_PhysicsBody_createPolygon$1(lua_State *L) olua_check_object(L, 4, &arg4, "cc.Vec2"); // static cocos2d::PhysicsBody *createPolygon(const cocos2d::Vec2 *points, int count, @optional const cocos2d::PhysicsMaterial &material, @optional const cocos2d::Vec2 &offset) - cocos2d::PhysicsBody *ret = cocos2d::PhysicsBody::createPolygon(arg1, arg2, arg3, arg4); + cocos2d::PhysicsBody *ret = cocos2d::PhysicsBody::createPolygon(arg1, arg2, *arg3, *arg4); int num_ret = olua_push_object(L, ret, "cc.PhysicsBody"); olua_endinvoke(L); @@ -1776,7 +1892,7 @@ static int _cocos2d_PhysicsBody_createPolygon$1(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsBody_createPolygon$2(lua_State *L) +static int _olua_fun_cocos2d_PhysicsBody_createPolygon$2(lua_State *L) { olua_startinvoke(L); @@ -1786,7 +1902,7 @@ static int _cocos2d_PhysicsBody_createPolygon$2(lua_State *L) olua_check_object(L, 1, &arg1, "cc.Vec2"); olua_check_integer(L, 2, &arg2); - // static cocos2d::PhysicsBody *createPolygon(const cocos2d::Vec2 *points, int count, @optional const cocos2d::PhysicsMaterial &material, @optional const cocos2d::Vec2 &offset) + // static cocos2d::PhysicsBody *createPolygon(const cocos2d::Vec2 *points, int count) cocos2d::PhysicsBody *ret = cocos2d::PhysicsBody::createPolygon(arg1, arg2); int num_ret = olua_push_object(L, ret, "cc.PhysicsBody"); @@ -1795,20 +1911,20 @@ static int _cocos2d_PhysicsBody_createPolygon$2(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsBody_createPolygon$3(lua_State *L) +static int _olua_fun_cocos2d_PhysicsBody_createPolygon$3(lua_State *L) { olua_startinvoke(L); cocos2d::Vec2 *arg1 = nullptr; /** points */ int arg2 = 0; /** count */ - cocos2d::PhysicsMaterial arg3; /** material */ + cocos2d::PhysicsMaterial *arg3; /** material */ olua_check_object(L, 1, &arg1, "cc.Vec2"); olua_check_integer(L, 2, &arg2); olua_check_object(L, 3, &arg3, "cc.PhysicsMaterial"); - // static cocos2d::PhysicsBody *createPolygon(const cocos2d::Vec2 *points, int count, @optional const cocos2d::PhysicsMaterial &material, @optional const cocos2d::Vec2 &offset) - cocos2d::PhysicsBody *ret = cocos2d::PhysicsBody::createPolygon(arg1, arg2, arg3); + // static cocos2d::PhysicsBody *createPolygon(const cocos2d::Vec2 *points, int count, @optional const cocos2d::PhysicsMaterial &material) + cocos2d::PhysicsBody *ret = cocos2d::PhysicsBody::createPolygon(arg1, arg2, *arg3); int num_ret = olua_push_object(L, ret, "cc.PhysicsBody"); olua_endinvoke(L); @@ -1816,28 +1932,28 @@ static int _cocos2d_PhysicsBody_createPolygon$3(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsBody_createPolygon(lua_State *L) +static int _olua_fun_cocos2d_PhysicsBody_createPolygon(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 2) { // if ((olua_is_object(L, 1, "cc.Vec2")) && (olua_is_integer(L, 2))) { - // static cocos2d::PhysicsBody *createPolygon(const cocos2d::Vec2 *points, int count, @optional const cocos2d::PhysicsMaterial &material, @optional const cocos2d::Vec2 &offset) - return _cocos2d_PhysicsBody_createPolygon$2(L); + // static cocos2d::PhysicsBody *createPolygon(const cocos2d::Vec2 *points, int count) + return _olua_fun_cocos2d_PhysicsBody_createPolygon$2(L); // } } if (num_args == 3) { // if ((olua_is_object(L, 1, "cc.Vec2")) && (olua_is_integer(L, 2)) && (olua_is_object(L, 3, "cc.PhysicsMaterial"))) { - // static cocos2d::PhysicsBody *createPolygon(const cocos2d::Vec2 *points, int count, @optional const cocos2d::PhysicsMaterial &material, @optional const cocos2d::Vec2 &offset) - return _cocos2d_PhysicsBody_createPolygon$3(L); + // static cocos2d::PhysicsBody *createPolygon(const cocos2d::Vec2 *points, int count, @optional const cocos2d::PhysicsMaterial &material) + return _olua_fun_cocos2d_PhysicsBody_createPolygon$3(L); // } } if (num_args == 4) { // if ((olua_is_object(L, 1, "cc.Vec2")) && (olua_is_integer(L, 2)) && (olua_is_object(L, 3, "cc.PhysicsMaterial")) && (olua_is_object(L, 4, "cc.Vec2"))) { // static cocos2d::PhysicsBody *createPolygon(const cocos2d::Vec2 *points, int count, @optional const cocos2d::PhysicsMaterial &material, @optional const cocos2d::Vec2 &offset) - return _cocos2d_PhysicsBody_createPolygon$1(L); + return _olua_fun_cocos2d_PhysicsBody_createPolygon$1(L); // } } @@ -1846,7 +1962,7 @@ static int _cocos2d_PhysicsBody_createPolygon(lua_State *L) return 0; } -static int _cocos2d_PhysicsBody_getAngularDamping(lua_State *L) +static int _olua_fun_cocos2d_PhysicsBody_getAngularDamping(lua_State *L) { olua_startinvoke(L); @@ -1863,7 +1979,7 @@ static int _cocos2d_PhysicsBody_getAngularDamping(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsBody_getAngularVelocity(lua_State *L) +static int _olua_fun_cocos2d_PhysicsBody_getAngularVelocity(lua_State *L) { olua_startinvoke(L); @@ -1880,7 +1996,7 @@ static int _cocos2d_PhysicsBody_getAngularVelocity(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsBody_getAngularVelocityLimit(lua_State *L) +static int _olua_fun_cocos2d_PhysicsBody_getAngularVelocityLimit(lua_State *L) { olua_startinvoke(L); @@ -1897,7 +2013,7 @@ static int _cocos2d_PhysicsBody_getAngularVelocityLimit(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsBody_getCategoryBitmask(lua_State *L) +static int _olua_fun_cocos2d_PhysicsBody_getCategoryBitmask(lua_State *L) { olua_startinvoke(L); @@ -1914,7 +2030,7 @@ static int _cocos2d_PhysicsBody_getCategoryBitmask(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsBody_getCollisionBitmask(lua_State *L) +static int _olua_fun_cocos2d_PhysicsBody_getCollisionBitmask(lua_State *L) { olua_startinvoke(L); @@ -1931,7 +2047,7 @@ static int _cocos2d_PhysicsBody_getCollisionBitmask(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsBody_getContactTestBitmask(lua_State *L) +static int _olua_fun_cocos2d_PhysicsBody_getContactTestBitmask(lua_State *L) { olua_startinvoke(L); @@ -1948,7 +2064,7 @@ static int _cocos2d_PhysicsBody_getContactTestBitmask(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsBody_getFirstShape(lua_State *L) +static int _olua_fun_cocos2d_PhysicsBody_getFirstShape(lua_State *L) { olua_startinvoke(L); @@ -1965,7 +2081,7 @@ static int _cocos2d_PhysicsBody_getFirstShape(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsBody_getGroup(lua_State *L) +static int _olua_fun_cocos2d_PhysicsBody_getGroup(lua_State *L) { olua_startinvoke(L); @@ -1982,7 +2098,7 @@ static int _cocos2d_PhysicsBody_getGroup(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsBody_getJoints(lua_State *L) +static int _olua_fun_cocos2d_PhysicsBody_getJoints(lua_State *L) { olua_startinvoke(L); @@ -2001,7 +2117,7 @@ static int _cocos2d_PhysicsBody_getJoints(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsBody_getLinearDamping(lua_State *L) +static int _olua_fun_cocos2d_PhysicsBody_getLinearDamping(lua_State *L) { olua_startinvoke(L); @@ -2018,7 +2134,7 @@ static int _cocos2d_PhysicsBody_getLinearDamping(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsBody_getMass(lua_State *L) +static int _olua_fun_cocos2d_PhysicsBody_getMass(lua_State *L) { olua_startinvoke(L); @@ -2035,7 +2151,7 @@ static int _cocos2d_PhysicsBody_getMass(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsBody_getMoment(lua_State *L) +static int _olua_fun_cocos2d_PhysicsBody_getMoment(lua_State *L) { olua_startinvoke(L); @@ -2052,7 +2168,7 @@ static int _cocos2d_PhysicsBody_getMoment(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsBody_getNode(lua_State *L) +static int _olua_fun_cocos2d_PhysicsBody_getNode(lua_State *L) { olua_startinvoke(L); @@ -2069,7 +2185,7 @@ static int _cocos2d_PhysicsBody_getNode(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsBody_getPosition(lua_State *L) +static int _olua_fun_cocos2d_PhysicsBody_getPosition(lua_State *L) { olua_startinvoke(L); @@ -2079,14 +2195,14 @@ static int _cocos2d_PhysicsBody_getPosition(lua_State *L) // cocos2d::Vec2 getPosition() cocos2d::Vec2 ret = self->getPosition(); - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec2"); + int num_ret = olua_copy_object(L, ret, "cc.Vec2"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_PhysicsBody_getPositionOffset(lua_State *L) +static int _olua_fun_cocos2d_PhysicsBody_getPositionOffset(lua_State *L) { olua_startinvoke(L); @@ -2103,7 +2219,7 @@ static int _cocos2d_PhysicsBody_getPositionOffset(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsBody_getRotation(lua_State *L) +static int _olua_fun_cocos2d_PhysicsBody_getRotation(lua_State *L) { olua_startinvoke(L); @@ -2120,7 +2236,7 @@ static int _cocos2d_PhysicsBody_getRotation(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsBody_getRotationOffset(lua_State *L) +static int _olua_fun_cocos2d_PhysicsBody_getRotationOffset(lua_State *L) { olua_startinvoke(L); @@ -2137,7 +2253,7 @@ static int _cocos2d_PhysicsBody_getRotationOffset(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsBody_getShape(lua_State *L) +static int _olua_fun_cocos2d_PhysicsBody_getShape(lua_State *L) { olua_startinvoke(L); @@ -2156,7 +2272,7 @@ static int _cocos2d_PhysicsBody_getShape(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsBody_getShapes(lua_State *L) +static int _olua_fun_cocos2d_PhysicsBody_getShapes(lua_State *L) { olua_startinvoke(L); @@ -2175,7 +2291,7 @@ static int _cocos2d_PhysicsBody_getShapes(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsBody_getTag(lua_State *L) +static int _olua_fun_cocos2d_PhysicsBody_getTag(lua_State *L) { olua_startinvoke(L); @@ -2192,7 +2308,7 @@ static int _cocos2d_PhysicsBody_getTag(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsBody_getVelocity(lua_State *L) +static int _olua_fun_cocos2d_PhysicsBody_getVelocity(lua_State *L) { olua_startinvoke(L); @@ -2202,52 +2318,52 @@ static int _cocos2d_PhysicsBody_getVelocity(lua_State *L) // cocos2d::Vec2 getVelocity() cocos2d::Vec2 ret = self->getVelocity(); - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec2"); + int num_ret = olua_copy_object(L, ret, "cc.Vec2"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_PhysicsBody_getVelocityAtLocalPoint(lua_State *L) +static int _olua_fun_cocos2d_PhysicsBody_getVelocityAtLocalPoint(lua_State *L) { olua_startinvoke(L); cocos2d::PhysicsBody *self = nullptr; - cocos2d::Vec2 arg1; /** point */ + cocos2d::Vec2 *arg1; /** point */ olua_to_object(L, 1, &self, "cc.PhysicsBody"); olua_check_object(L, 2, &arg1, "cc.Vec2"); // cocos2d::Vec2 getVelocityAtLocalPoint(const cocos2d::Vec2 &point) - cocos2d::Vec2 ret = self->getVelocityAtLocalPoint(arg1); - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec2"); + cocos2d::Vec2 ret = self->getVelocityAtLocalPoint(*arg1); + int num_ret = olua_copy_object(L, ret, "cc.Vec2"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_PhysicsBody_getVelocityAtWorldPoint(lua_State *L) +static int _olua_fun_cocos2d_PhysicsBody_getVelocityAtWorldPoint(lua_State *L) { olua_startinvoke(L); cocos2d::PhysicsBody *self = nullptr; - cocos2d::Vec2 arg1; /** point */ + cocos2d::Vec2 *arg1; /** point */ olua_to_object(L, 1, &self, "cc.PhysicsBody"); olua_check_object(L, 2, &arg1, "cc.Vec2"); // cocos2d::Vec2 getVelocityAtWorldPoint(const cocos2d::Vec2 &point) - cocos2d::Vec2 ret = self->getVelocityAtWorldPoint(arg1); - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec2"); + cocos2d::Vec2 ret = self->getVelocityAtWorldPoint(*arg1); + int num_ret = olua_copy_object(L, ret, "cc.Vec2"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_PhysicsBody_getVelocityLimit(lua_State *L) +static int _olua_fun_cocos2d_PhysicsBody_getVelocityLimit(lua_State *L) { olua_startinvoke(L); @@ -2264,7 +2380,7 @@ static int _cocos2d_PhysicsBody_getVelocityLimit(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsBody_getWorld(lua_State *L) +static int _olua_fun_cocos2d_PhysicsBody_getWorld(lua_State *L) { olua_startinvoke(L); @@ -2281,7 +2397,7 @@ static int _cocos2d_PhysicsBody_getWorld(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsBody_isDynamic(lua_State *L) +static int _olua_fun_cocos2d_PhysicsBody_isDynamic(lua_State *L) { olua_startinvoke(L); @@ -2298,7 +2414,7 @@ static int _cocos2d_PhysicsBody_isDynamic(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsBody_isGravityEnabled(lua_State *L) +static int _olua_fun_cocos2d_PhysicsBody_isGravityEnabled(lua_State *L) { olua_startinvoke(L); @@ -2315,7 +2431,7 @@ static int _cocos2d_PhysicsBody_isGravityEnabled(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsBody_isResting(lua_State *L) +static int _olua_fun_cocos2d_PhysicsBody_isResting(lua_State *L) { olua_startinvoke(L); @@ -2332,7 +2448,7 @@ static int _cocos2d_PhysicsBody_isResting(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsBody_isRotationEnabled(lua_State *L) +static int _olua_fun_cocos2d_PhysicsBody_isRotationEnabled(lua_State *L) { olua_startinvoke(L); @@ -2349,26 +2465,26 @@ static int _cocos2d_PhysicsBody_isRotationEnabled(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsBody_local2World(lua_State *L) +static int _olua_fun_cocos2d_PhysicsBody_local2World(lua_State *L) { olua_startinvoke(L); cocos2d::PhysicsBody *self = nullptr; - cocos2d::Vec2 arg1; /** point */ + cocos2d::Vec2 *arg1; /** point */ olua_to_object(L, 1, &self, "cc.PhysicsBody"); olua_check_object(L, 2, &arg1, "cc.Vec2"); // cocos2d::Vec2 local2World(const cocos2d::Vec2 &point) - cocos2d::Vec2 ret = self->local2World(arg1); - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec2"); + cocos2d::Vec2 ret = self->local2World(*arg1); + int num_ret = olua_copy_object(L, ret, "cc.Vec2"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_PhysicsBody_removeAllShapes$1(lua_State *L) +static int _olua_fun_cocos2d_PhysicsBody_removeAllShapes$1(lua_State *L) { olua_startinvoke(L); @@ -2386,7 +2502,7 @@ static int _cocos2d_PhysicsBody_removeAllShapes$1(lua_State *L) return 0; } -static int _cocos2d_PhysicsBody_removeAllShapes$2(lua_State *L) +static int _olua_fun_cocos2d_PhysicsBody_removeAllShapes$2(lua_State *L) { olua_startinvoke(L); @@ -2394,7 +2510,7 @@ static int _cocos2d_PhysicsBody_removeAllShapes$2(lua_State *L) olua_to_object(L, 1, &self, "cc.PhysicsBody"); - // void removeAllShapes(@optional bool reduceMassAndMoment) + // void removeAllShapes() self->removeAllShapes(); olua_endinvoke(L); @@ -2402,19 +2518,19 @@ static int _cocos2d_PhysicsBody_removeAllShapes$2(lua_State *L) return 0; } -static int _cocos2d_PhysicsBody_removeAllShapes(lua_State *L) +static int _olua_fun_cocos2d_PhysicsBody_removeAllShapes(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 0) { - // void removeAllShapes(@optional bool reduceMassAndMoment) - return _cocos2d_PhysicsBody_removeAllShapes$2(L); + // void removeAllShapes() + return _olua_fun_cocos2d_PhysicsBody_removeAllShapes$2(L); } if (num_args == 1) { // if ((olua_is_bool(L, 2))) { // void removeAllShapes(@optional bool reduceMassAndMoment) - return _cocos2d_PhysicsBody_removeAllShapes$1(L); + return _olua_fun_cocos2d_PhysicsBody_removeAllShapes$1(L); // } } @@ -2423,7 +2539,7 @@ static int _cocos2d_PhysicsBody_removeAllShapes(lua_State *L) return 0; } -static int _cocos2d_PhysicsBody_removeFromWorld(lua_State *L) +static int _olua_fun_cocos2d_PhysicsBody_removeFromWorld(lua_State *L) { olua_startinvoke(L); @@ -2439,7 +2555,7 @@ static int _cocos2d_PhysicsBody_removeFromWorld(lua_State *L) return 0; } -static int _cocos2d_PhysicsBody_removeShape$1(lua_State *L) +static int _olua_fun_cocos2d_PhysicsBody_removeShape$1(lua_State *L) { olua_startinvoke(L); @@ -2459,45 +2575,45 @@ static int _cocos2d_PhysicsBody_removeShape$1(lua_State *L) return 0; } -static int _cocos2d_PhysicsBody_removeShape$2(lua_State *L) +static int _olua_fun_cocos2d_PhysicsBody_removeShape$2(lua_State *L) { olua_startinvoke(L); cocos2d::PhysicsBody *self = nullptr; - int arg1 = 0; /** tag */ - bool arg2 = false; /** reduceMassAndMoment */ + cocos2d::PhysicsShape *arg1 = nullptr; /** shape */ olua_to_object(L, 1, &self, "cc.PhysicsBody"); - olua_check_integer(L, 2, &arg1); - olua_check_bool(L, 3, &arg2); + olua_check_object(L, 2, &arg1, "cc.PhysicsShape"); - // void removeShape(int tag, @optional bool reduceMassAndMoment) - self->removeShape(arg1, arg2); + // void removeShape(cocos2d::PhysicsShape *shape) + self->removeShape(arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_PhysicsBody_removeShape$3(lua_State *L) +static int _olua_fun_cocos2d_PhysicsBody_removeShape$3(lua_State *L) { olua_startinvoke(L); cocos2d::PhysicsBody *self = nullptr; - cocos2d::PhysicsShape *arg1 = nullptr; /** shape */ + int arg1 = 0; /** tag */ + bool arg2 = false; /** reduceMassAndMoment */ olua_to_object(L, 1, &self, "cc.PhysicsBody"); - olua_check_object(L, 2, &arg1, "cc.PhysicsShape"); + olua_check_integer(L, 2, &arg1); + olua_check_bool(L, 3, &arg2); - // void removeShape(cocos2d::PhysicsShape *shape, @optional bool reduceMassAndMoment) - self->removeShape(arg1); + // void removeShape(int tag, @optional bool reduceMassAndMoment) + self->removeShape(arg1, arg2); olua_endinvoke(L); return 0; } -static int _cocos2d_PhysicsBody_removeShape$4(lua_State *L) +static int _olua_fun_cocos2d_PhysicsBody_removeShape$4(lua_State *L) { olua_startinvoke(L); @@ -2507,7 +2623,7 @@ static int _cocos2d_PhysicsBody_removeShape$4(lua_State *L) olua_to_object(L, 1, &self, "cc.PhysicsBody"); olua_check_integer(L, 2, &arg1); - // void removeShape(int tag, @optional bool reduceMassAndMoment) + // void removeShape(int tag) self->removeShape(arg1); olua_endinvoke(L); @@ -2515,31 +2631,31 @@ static int _cocos2d_PhysicsBody_removeShape$4(lua_State *L) return 0; } -static int _cocos2d_PhysicsBody_removeShape(lua_State *L) +static int _olua_fun_cocos2d_PhysicsBody_removeShape(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { if ((olua_is_object(L, 2, "cc.PhysicsShape"))) { - // void removeShape(cocos2d::PhysicsShape *shape, @optional bool reduceMassAndMoment) - return _cocos2d_PhysicsBody_removeShape$3(L); + // void removeShape(cocos2d::PhysicsShape *shape) + return _olua_fun_cocos2d_PhysicsBody_removeShape$2(L); } // if ((olua_is_integer(L, 2))) { - // void removeShape(int tag, @optional bool reduceMassAndMoment) - return _cocos2d_PhysicsBody_removeShape$4(L); + // void removeShape(int tag) + return _olua_fun_cocos2d_PhysicsBody_removeShape$4(L); // } } if (num_args == 2) { if ((olua_is_object(L, 2, "cc.PhysicsShape")) && (olua_is_bool(L, 3))) { // void removeShape(cocos2d::PhysicsShape *shape, @optional bool reduceMassAndMoment) - return _cocos2d_PhysicsBody_removeShape$1(L); + return _olua_fun_cocos2d_PhysicsBody_removeShape$1(L); } // if ((olua_is_integer(L, 2)) && (olua_is_bool(L, 3))) { // void removeShape(int tag, @optional bool reduceMassAndMoment) - return _cocos2d_PhysicsBody_removeShape$2(L); + return _olua_fun_cocos2d_PhysicsBody_removeShape$3(L); // } } @@ -2548,7 +2664,7 @@ static int _cocos2d_PhysicsBody_removeShape(lua_State *L) return 0; } -static int _cocos2d_PhysicsBody_resetForces(lua_State *L) +static int _olua_fun_cocos2d_PhysicsBody_resetForces(lua_State *L) { olua_startinvoke(L); @@ -2564,7 +2680,7 @@ static int _cocos2d_PhysicsBody_resetForces(lua_State *L) return 0; } -static int _cocos2d_PhysicsBody_setAngularDamping(lua_State *L) +static int _olua_fun_cocos2d_PhysicsBody_setAngularDamping(lua_State *L) { olua_startinvoke(L); @@ -2582,7 +2698,7 @@ static int _cocos2d_PhysicsBody_setAngularDamping(lua_State *L) return 0; } -static int _cocos2d_PhysicsBody_setAngularVelocity(lua_State *L) +static int _olua_fun_cocos2d_PhysicsBody_setAngularVelocity(lua_State *L) { olua_startinvoke(L); @@ -2600,7 +2716,7 @@ static int _cocos2d_PhysicsBody_setAngularVelocity(lua_State *L) return 0; } -static int _cocos2d_PhysicsBody_setAngularVelocityLimit(lua_State *L) +static int _olua_fun_cocos2d_PhysicsBody_setAngularVelocityLimit(lua_State *L) { olua_startinvoke(L); @@ -2618,7 +2734,7 @@ static int _cocos2d_PhysicsBody_setAngularVelocityLimit(lua_State *L) return 0; } -static int _cocos2d_PhysicsBody_setCategoryBitmask(lua_State *L) +static int _olua_fun_cocos2d_PhysicsBody_setCategoryBitmask(lua_State *L) { olua_startinvoke(L); @@ -2636,7 +2752,7 @@ static int _cocos2d_PhysicsBody_setCategoryBitmask(lua_State *L) return 0; } -static int _cocos2d_PhysicsBody_setCollisionBitmask(lua_State *L) +static int _olua_fun_cocos2d_PhysicsBody_setCollisionBitmask(lua_State *L) { olua_startinvoke(L); @@ -2654,7 +2770,7 @@ static int _cocos2d_PhysicsBody_setCollisionBitmask(lua_State *L) return 0; } -static int _cocos2d_PhysicsBody_setContactTestBitmask(lua_State *L) +static int _olua_fun_cocos2d_PhysicsBody_setContactTestBitmask(lua_State *L) { olua_startinvoke(L); @@ -2672,7 +2788,7 @@ static int _cocos2d_PhysicsBody_setContactTestBitmask(lua_State *L) return 0; } -static int _cocos2d_PhysicsBody_setDynamic(lua_State *L) +static int _olua_fun_cocos2d_PhysicsBody_setDynamic(lua_State *L) { olua_startinvoke(L); @@ -2690,7 +2806,7 @@ static int _cocos2d_PhysicsBody_setDynamic(lua_State *L) return 0; } -static int _cocos2d_PhysicsBody_setGravityEnable(lua_State *L) +static int _olua_fun_cocos2d_PhysicsBody_setGravityEnable(lua_State *L) { olua_startinvoke(L); @@ -2708,7 +2824,7 @@ static int _cocos2d_PhysicsBody_setGravityEnable(lua_State *L) return 0; } -static int _cocos2d_PhysicsBody_setGroup(lua_State *L) +static int _olua_fun_cocos2d_PhysicsBody_setGroup(lua_State *L) { olua_startinvoke(L); @@ -2726,7 +2842,7 @@ static int _cocos2d_PhysicsBody_setGroup(lua_State *L) return 0; } -static int _cocos2d_PhysicsBody_setLinearDamping(lua_State *L) +static int _olua_fun_cocos2d_PhysicsBody_setLinearDamping(lua_State *L) { olua_startinvoke(L); @@ -2744,7 +2860,7 @@ static int _cocos2d_PhysicsBody_setLinearDamping(lua_State *L) return 0; } -static int _cocos2d_PhysicsBody_setMass(lua_State *L) +static int _olua_fun_cocos2d_PhysicsBody_setMass(lua_State *L) { olua_startinvoke(L); @@ -2762,7 +2878,7 @@ static int _cocos2d_PhysicsBody_setMass(lua_State *L) return 0; } -static int _cocos2d_PhysicsBody_setMoment(lua_State *L) +static int _olua_fun_cocos2d_PhysicsBody_setMoment(lua_State *L) { olua_startinvoke(L); @@ -2780,25 +2896,25 @@ static int _cocos2d_PhysicsBody_setMoment(lua_State *L) return 0; } -static int _cocos2d_PhysicsBody_setPositionOffset(lua_State *L) +static int _olua_fun_cocos2d_PhysicsBody_setPositionOffset(lua_State *L) { olua_startinvoke(L); cocos2d::PhysicsBody *self = nullptr; - cocos2d::Vec2 arg1; /** position */ + cocos2d::Vec2 *arg1; /** position */ olua_to_object(L, 1, &self, "cc.PhysicsBody"); olua_check_object(L, 2, &arg1, "cc.Vec2"); // void setPositionOffset(const cocos2d::Vec2 &position) - self->setPositionOffset(arg1); + self->setPositionOffset(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_PhysicsBody_setResting(lua_State *L) +static int _olua_fun_cocos2d_PhysicsBody_setResting(lua_State *L) { olua_startinvoke(L); @@ -2816,7 +2932,7 @@ static int _cocos2d_PhysicsBody_setResting(lua_State *L) return 0; } -static int _cocos2d_PhysicsBody_setRotationEnable(lua_State *L) +static int _olua_fun_cocos2d_PhysicsBody_setRotationEnable(lua_State *L) { olua_startinvoke(L); @@ -2834,7 +2950,7 @@ static int _cocos2d_PhysicsBody_setRotationEnable(lua_State *L) return 0; } -static int _cocos2d_PhysicsBody_setRotationOffset(lua_State *L) +static int _olua_fun_cocos2d_PhysicsBody_setRotationOffset(lua_State *L) { olua_startinvoke(L); @@ -2852,7 +2968,7 @@ static int _cocos2d_PhysicsBody_setRotationOffset(lua_State *L) return 0; } -static int _cocos2d_PhysicsBody_setTag(lua_State *L) +static int _olua_fun_cocos2d_PhysicsBody_setTag(lua_State *L) { olua_startinvoke(L); @@ -2870,25 +2986,25 @@ static int _cocos2d_PhysicsBody_setTag(lua_State *L) return 0; } -static int _cocos2d_PhysicsBody_setVelocity(lua_State *L) +static int _olua_fun_cocos2d_PhysicsBody_setVelocity(lua_State *L) { olua_startinvoke(L); cocos2d::PhysicsBody *self = nullptr; - cocos2d::Vec2 arg1; /** velocity */ + cocos2d::Vec2 *arg1; /** velocity */ olua_to_object(L, 1, &self, "cc.PhysicsBody"); olua_check_object(L, 2, &arg1, "cc.Vec2"); // void setVelocity(const cocos2d::Vec2 &velocity) - self->setVelocity(arg1); + self->setVelocity(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_PhysicsBody_setVelocityLimit(lua_State *L) +static int _olua_fun_cocos2d_PhysicsBody_setVelocityLimit(lua_State *L) { olua_startinvoke(L); @@ -2906,133 +3022,141 @@ static int _cocos2d_PhysicsBody_setVelocityLimit(lua_State *L) return 0; } -static int _cocos2d_PhysicsBody_world2Local(lua_State *L) +static int _olua_fun_cocos2d_PhysicsBody_world2Local(lua_State *L) { olua_startinvoke(L); cocos2d::PhysicsBody *self = nullptr; - cocos2d::Vec2 arg1; /** point */ + cocos2d::Vec2 *arg1; /** point */ olua_to_object(L, 1, &self, "cc.PhysicsBody"); olua_check_object(L, 2, &arg1, "cc.Vec2"); // cocos2d::Vec2 world2Local(const cocos2d::Vec2 &point) - cocos2d::Vec2 ret = self->world2Local(arg1); - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec2"); + cocos2d::Vec2 ret = self->world2Local(*arg1); + int num_ret = olua_copy_object(L, ret, "cc.Vec2"); olua_endinvoke(L); return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_PhysicsBody(lua_State *L) +static int _olua_cls_cc_PhysicsBody(lua_State *L) { oluacls_class(L, "cc.PhysicsBody"); - oluacls_func(L, "addMass", _cocos2d_PhysicsBody_addMass); - oluacls_func(L, "addMoment", _cocos2d_PhysicsBody_addMoment); - oluacls_func(L, "addShape", _cocos2d_PhysicsBody_addShape); - oluacls_func(L, "applyForce", _cocos2d_PhysicsBody_applyForce); - oluacls_func(L, "applyImpulse", _cocos2d_PhysicsBody_applyImpulse); - oluacls_func(L, "applyTorque", _cocos2d_PhysicsBody_applyTorque); - oluacls_func(L, "create", _cocos2d_PhysicsBody_create); - oluacls_func(L, "createBox", _cocos2d_PhysicsBody_createBox); - oluacls_func(L, "createCircle", _cocos2d_PhysicsBody_createCircle); - oluacls_func(L, "createEdgeBox", _cocos2d_PhysicsBody_createEdgeBox); - oluacls_func(L, "createEdgeChain", _cocos2d_PhysicsBody_createEdgeChain); - oluacls_func(L, "createEdgePolygon", _cocos2d_PhysicsBody_createEdgePolygon); - oluacls_func(L, "createEdgeSegment", _cocos2d_PhysicsBody_createEdgeSegment); - oluacls_func(L, "createPolygon", _cocos2d_PhysicsBody_createPolygon); - oluacls_func(L, "getAngularDamping", _cocos2d_PhysicsBody_getAngularDamping); - oluacls_func(L, "getAngularVelocity", _cocos2d_PhysicsBody_getAngularVelocity); - oluacls_func(L, "getAngularVelocityLimit", _cocos2d_PhysicsBody_getAngularVelocityLimit); - oluacls_func(L, "getCategoryBitmask", _cocos2d_PhysicsBody_getCategoryBitmask); - oluacls_func(L, "getCollisionBitmask", _cocos2d_PhysicsBody_getCollisionBitmask); - oluacls_func(L, "getContactTestBitmask", _cocos2d_PhysicsBody_getContactTestBitmask); - oluacls_func(L, "getFirstShape", _cocos2d_PhysicsBody_getFirstShape); - oluacls_func(L, "getGroup", _cocos2d_PhysicsBody_getGroup); - oluacls_func(L, "getJoints", _cocos2d_PhysicsBody_getJoints); - oluacls_func(L, "getLinearDamping", _cocos2d_PhysicsBody_getLinearDamping); - oluacls_func(L, "getMass", _cocos2d_PhysicsBody_getMass); - oluacls_func(L, "getMoment", _cocos2d_PhysicsBody_getMoment); - oluacls_func(L, "getNode", _cocos2d_PhysicsBody_getNode); - oluacls_func(L, "getPosition", _cocos2d_PhysicsBody_getPosition); - oluacls_func(L, "getPositionOffset", _cocos2d_PhysicsBody_getPositionOffset); - oluacls_func(L, "getRotation", _cocos2d_PhysicsBody_getRotation); - oluacls_func(L, "getRotationOffset", _cocos2d_PhysicsBody_getRotationOffset); - oluacls_func(L, "getShape", _cocos2d_PhysicsBody_getShape); - oluacls_func(L, "getShapes", _cocos2d_PhysicsBody_getShapes); - oluacls_func(L, "getTag", _cocos2d_PhysicsBody_getTag); - oluacls_func(L, "getVelocity", _cocos2d_PhysicsBody_getVelocity); - oluacls_func(L, "getVelocityAtLocalPoint", _cocos2d_PhysicsBody_getVelocityAtLocalPoint); - oluacls_func(L, "getVelocityAtWorldPoint", _cocos2d_PhysicsBody_getVelocityAtWorldPoint); - oluacls_func(L, "getVelocityLimit", _cocos2d_PhysicsBody_getVelocityLimit); - oluacls_func(L, "getWorld", _cocos2d_PhysicsBody_getWorld); - oluacls_func(L, "isDynamic", _cocos2d_PhysicsBody_isDynamic); - oluacls_func(L, "isGravityEnabled", _cocos2d_PhysicsBody_isGravityEnabled); - oluacls_func(L, "isResting", _cocos2d_PhysicsBody_isResting); - oluacls_func(L, "isRotationEnabled", _cocos2d_PhysicsBody_isRotationEnabled); - oluacls_func(L, "local2World", _cocos2d_PhysicsBody_local2World); - oluacls_func(L, "removeAllShapes", _cocos2d_PhysicsBody_removeAllShapes); - oluacls_func(L, "removeFromWorld", _cocos2d_PhysicsBody_removeFromWorld); - oluacls_func(L, "removeShape", _cocos2d_PhysicsBody_removeShape); - oluacls_func(L, "resetForces", _cocos2d_PhysicsBody_resetForces); - oluacls_func(L, "setAngularDamping", _cocos2d_PhysicsBody_setAngularDamping); - oluacls_func(L, "setAngularVelocity", _cocos2d_PhysicsBody_setAngularVelocity); - oluacls_func(L, "setAngularVelocityLimit", _cocos2d_PhysicsBody_setAngularVelocityLimit); - oluacls_func(L, "setCategoryBitmask", _cocos2d_PhysicsBody_setCategoryBitmask); - oluacls_func(L, "setCollisionBitmask", _cocos2d_PhysicsBody_setCollisionBitmask); - oluacls_func(L, "setContactTestBitmask", _cocos2d_PhysicsBody_setContactTestBitmask); - oluacls_func(L, "setDynamic", _cocos2d_PhysicsBody_setDynamic); - oluacls_func(L, "setGravityEnable", _cocos2d_PhysicsBody_setGravityEnable); - oluacls_func(L, "setGroup", _cocos2d_PhysicsBody_setGroup); - oluacls_func(L, "setLinearDamping", _cocos2d_PhysicsBody_setLinearDamping); - oluacls_func(L, "setMass", _cocos2d_PhysicsBody_setMass); - oluacls_func(L, "setMoment", _cocos2d_PhysicsBody_setMoment); - oluacls_func(L, "setPositionOffset", _cocos2d_PhysicsBody_setPositionOffset); - oluacls_func(L, "setResting", _cocos2d_PhysicsBody_setResting); - oluacls_func(L, "setRotationEnable", _cocos2d_PhysicsBody_setRotationEnable); - oluacls_func(L, "setRotationOffset", _cocos2d_PhysicsBody_setRotationOffset); - oluacls_func(L, "setTag", _cocos2d_PhysicsBody_setTag); - oluacls_func(L, "setVelocity", _cocos2d_PhysicsBody_setVelocity); - oluacls_func(L, "setVelocityLimit", _cocos2d_PhysicsBody_setVelocityLimit); - oluacls_func(L, "world2Local", _cocos2d_PhysicsBody_world2Local); - oluacls_prop(L, "angularDamping", _cocos2d_PhysicsBody_getAngularDamping, _cocos2d_PhysicsBody_setAngularDamping); - oluacls_prop(L, "angularVelocity", _cocos2d_PhysicsBody_getAngularVelocity, _cocos2d_PhysicsBody_setAngularVelocity); - oluacls_prop(L, "angularVelocityLimit", _cocos2d_PhysicsBody_getAngularVelocityLimit, _cocos2d_PhysicsBody_setAngularVelocityLimit); - oluacls_prop(L, "categoryBitmask", _cocos2d_PhysicsBody_getCategoryBitmask, _cocos2d_PhysicsBody_setCategoryBitmask); - oluacls_prop(L, "collisionBitmask", _cocos2d_PhysicsBody_getCollisionBitmask, _cocos2d_PhysicsBody_setCollisionBitmask); - oluacls_prop(L, "contactTestBitmask", _cocos2d_PhysicsBody_getContactTestBitmask, _cocos2d_PhysicsBody_setContactTestBitmask); - oluacls_prop(L, "dynamic", _cocos2d_PhysicsBody_isDynamic, _cocos2d_PhysicsBody_setDynamic); - oluacls_prop(L, "firstShape", _cocos2d_PhysicsBody_getFirstShape, nullptr); - oluacls_prop(L, "gravityEnabled", _cocos2d_PhysicsBody_isGravityEnabled, nullptr); - oluacls_prop(L, "group", _cocos2d_PhysicsBody_getGroup, _cocos2d_PhysicsBody_setGroup); - oluacls_prop(L, "joints", _cocos2d_PhysicsBody_getJoints, nullptr); - oluacls_prop(L, "linearDamping", _cocos2d_PhysicsBody_getLinearDamping, _cocos2d_PhysicsBody_setLinearDamping); - oluacls_prop(L, "mass", _cocos2d_PhysicsBody_getMass, _cocos2d_PhysicsBody_setMass); - oluacls_prop(L, "moment", _cocos2d_PhysicsBody_getMoment, _cocos2d_PhysicsBody_setMoment); - oluacls_prop(L, "node", _cocos2d_PhysicsBody_getNode, nullptr); - oluacls_prop(L, "position", _cocos2d_PhysicsBody_getPosition, nullptr); - oluacls_prop(L, "positionOffset", _cocos2d_PhysicsBody_getPositionOffset, _cocos2d_PhysicsBody_setPositionOffset); - oluacls_prop(L, "resting", _cocos2d_PhysicsBody_isResting, _cocos2d_PhysicsBody_setResting); - oluacls_prop(L, "rotation", _cocos2d_PhysicsBody_getRotation, nullptr); - oluacls_prop(L, "rotationEnabled", _cocos2d_PhysicsBody_isRotationEnabled, nullptr); - oluacls_prop(L, "rotationOffset", _cocos2d_PhysicsBody_getRotationOffset, _cocos2d_PhysicsBody_setRotationOffset); - oluacls_prop(L, "shapes", _cocos2d_PhysicsBody_getShapes, nullptr); - oluacls_prop(L, "tag", _cocos2d_PhysicsBody_getTag, _cocos2d_PhysicsBody_setTag); - oluacls_prop(L, "velocity", _cocos2d_PhysicsBody_getVelocity, _cocos2d_PhysicsBody_setVelocity); - oluacls_prop(L, "velocityLimit", _cocos2d_PhysicsBody_getVelocityLimit, _cocos2d_PhysicsBody_setVelocityLimit); - oluacls_prop(L, "world", _cocos2d_PhysicsBody_getWorld, nullptr); + oluacls_func(L, "addMass", _olua_fun_cocos2d_PhysicsBody_addMass); + oluacls_func(L, "addMoment", _olua_fun_cocos2d_PhysicsBody_addMoment); + oluacls_func(L, "addShape", _olua_fun_cocos2d_PhysicsBody_addShape); + oluacls_func(L, "applyForce", _olua_fun_cocos2d_PhysicsBody_applyForce); + oluacls_func(L, "applyImpulse", _olua_fun_cocos2d_PhysicsBody_applyImpulse); + oluacls_func(L, "applyTorque", _olua_fun_cocos2d_PhysicsBody_applyTorque); + oluacls_func(L, "create", _olua_fun_cocos2d_PhysicsBody_create); + oluacls_func(L, "createBox", _olua_fun_cocos2d_PhysicsBody_createBox); + oluacls_func(L, "createCircle", _olua_fun_cocos2d_PhysicsBody_createCircle); + oluacls_func(L, "createEdgeBox", _olua_fun_cocos2d_PhysicsBody_createEdgeBox); + oluacls_func(L, "createEdgeChain", _olua_fun_cocos2d_PhysicsBody_createEdgeChain); + oluacls_func(L, "createEdgePolygon", _olua_fun_cocos2d_PhysicsBody_createEdgePolygon); + oluacls_func(L, "createEdgeSegment", _olua_fun_cocos2d_PhysicsBody_createEdgeSegment); + oluacls_func(L, "createPolygon", _olua_fun_cocos2d_PhysicsBody_createPolygon); + oluacls_func(L, "getAngularDamping", _olua_fun_cocos2d_PhysicsBody_getAngularDamping); + oluacls_func(L, "getAngularVelocity", _olua_fun_cocos2d_PhysicsBody_getAngularVelocity); + oluacls_func(L, "getAngularVelocityLimit", _olua_fun_cocos2d_PhysicsBody_getAngularVelocityLimit); + oluacls_func(L, "getCategoryBitmask", _olua_fun_cocos2d_PhysicsBody_getCategoryBitmask); + oluacls_func(L, "getCollisionBitmask", _olua_fun_cocos2d_PhysicsBody_getCollisionBitmask); + oluacls_func(L, "getContactTestBitmask", _olua_fun_cocos2d_PhysicsBody_getContactTestBitmask); + oluacls_func(L, "getFirstShape", _olua_fun_cocos2d_PhysicsBody_getFirstShape); + oluacls_func(L, "getGroup", _olua_fun_cocos2d_PhysicsBody_getGroup); + oluacls_func(L, "getJoints", _olua_fun_cocos2d_PhysicsBody_getJoints); + oluacls_func(L, "getLinearDamping", _olua_fun_cocos2d_PhysicsBody_getLinearDamping); + oluacls_func(L, "getMass", _olua_fun_cocos2d_PhysicsBody_getMass); + oluacls_func(L, "getMoment", _olua_fun_cocos2d_PhysicsBody_getMoment); + oluacls_func(L, "getNode", _olua_fun_cocos2d_PhysicsBody_getNode); + oluacls_func(L, "getPosition", _olua_fun_cocos2d_PhysicsBody_getPosition); + oluacls_func(L, "getPositionOffset", _olua_fun_cocos2d_PhysicsBody_getPositionOffset); + oluacls_func(L, "getRotation", _olua_fun_cocos2d_PhysicsBody_getRotation); + oluacls_func(L, "getRotationOffset", _olua_fun_cocos2d_PhysicsBody_getRotationOffset); + oluacls_func(L, "getShape", _olua_fun_cocos2d_PhysicsBody_getShape); + oluacls_func(L, "getShapes", _olua_fun_cocos2d_PhysicsBody_getShapes); + oluacls_func(L, "getTag", _olua_fun_cocos2d_PhysicsBody_getTag); + oluacls_func(L, "getVelocity", _olua_fun_cocos2d_PhysicsBody_getVelocity); + oluacls_func(L, "getVelocityAtLocalPoint", _olua_fun_cocos2d_PhysicsBody_getVelocityAtLocalPoint); + oluacls_func(L, "getVelocityAtWorldPoint", _olua_fun_cocos2d_PhysicsBody_getVelocityAtWorldPoint); + oluacls_func(L, "getVelocityLimit", _olua_fun_cocos2d_PhysicsBody_getVelocityLimit); + oluacls_func(L, "getWorld", _olua_fun_cocos2d_PhysicsBody_getWorld); + oluacls_func(L, "isDynamic", _olua_fun_cocos2d_PhysicsBody_isDynamic); + oluacls_func(L, "isGravityEnabled", _olua_fun_cocos2d_PhysicsBody_isGravityEnabled); + oluacls_func(L, "isResting", _olua_fun_cocos2d_PhysicsBody_isResting); + oluacls_func(L, "isRotationEnabled", _olua_fun_cocos2d_PhysicsBody_isRotationEnabled); + oluacls_func(L, "local2World", _olua_fun_cocos2d_PhysicsBody_local2World); + oluacls_func(L, "removeAllShapes", _olua_fun_cocos2d_PhysicsBody_removeAllShapes); + oluacls_func(L, "removeFromWorld", _olua_fun_cocos2d_PhysicsBody_removeFromWorld); + oluacls_func(L, "removeShape", _olua_fun_cocos2d_PhysicsBody_removeShape); + oluacls_func(L, "resetForces", _olua_fun_cocos2d_PhysicsBody_resetForces); + oluacls_func(L, "setAngularDamping", _olua_fun_cocos2d_PhysicsBody_setAngularDamping); + oluacls_func(L, "setAngularVelocity", _olua_fun_cocos2d_PhysicsBody_setAngularVelocity); + oluacls_func(L, "setAngularVelocityLimit", _olua_fun_cocos2d_PhysicsBody_setAngularVelocityLimit); + oluacls_func(L, "setCategoryBitmask", _olua_fun_cocos2d_PhysicsBody_setCategoryBitmask); + oluacls_func(L, "setCollisionBitmask", _olua_fun_cocos2d_PhysicsBody_setCollisionBitmask); + oluacls_func(L, "setContactTestBitmask", _olua_fun_cocos2d_PhysicsBody_setContactTestBitmask); + oluacls_func(L, "setDynamic", _olua_fun_cocos2d_PhysicsBody_setDynamic); + oluacls_func(L, "setGravityEnable", _olua_fun_cocos2d_PhysicsBody_setGravityEnable); + oluacls_func(L, "setGroup", _olua_fun_cocos2d_PhysicsBody_setGroup); + oluacls_func(L, "setLinearDamping", _olua_fun_cocos2d_PhysicsBody_setLinearDamping); + oluacls_func(L, "setMass", _olua_fun_cocos2d_PhysicsBody_setMass); + oluacls_func(L, "setMoment", _olua_fun_cocos2d_PhysicsBody_setMoment); + oluacls_func(L, "setPositionOffset", _olua_fun_cocos2d_PhysicsBody_setPositionOffset); + oluacls_func(L, "setResting", _olua_fun_cocos2d_PhysicsBody_setResting); + oluacls_func(L, "setRotationEnable", _olua_fun_cocos2d_PhysicsBody_setRotationEnable); + oluacls_func(L, "setRotationOffset", _olua_fun_cocos2d_PhysicsBody_setRotationOffset); + oluacls_func(L, "setTag", _olua_fun_cocos2d_PhysicsBody_setTag); + oluacls_func(L, "setVelocity", _olua_fun_cocos2d_PhysicsBody_setVelocity); + oluacls_func(L, "setVelocityLimit", _olua_fun_cocos2d_PhysicsBody_setVelocityLimit); + oluacls_func(L, "world2Local", _olua_fun_cocos2d_PhysicsBody_world2Local); + oluacls_prop(L, "angularDamping", _olua_fun_cocos2d_PhysicsBody_getAngularDamping, _olua_fun_cocos2d_PhysicsBody_setAngularDamping); + oluacls_prop(L, "angularVelocity", _olua_fun_cocos2d_PhysicsBody_getAngularVelocity, _olua_fun_cocos2d_PhysicsBody_setAngularVelocity); + oluacls_prop(L, "angularVelocityLimit", _olua_fun_cocos2d_PhysicsBody_getAngularVelocityLimit, _olua_fun_cocos2d_PhysicsBody_setAngularVelocityLimit); + oluacls_prop(L, "categoryBitmask", _olua_fun_cocos2d_PhysicsBody_getCategoryBitmask, _olua_fun_cocos2d_PhysicsBody_setCategoryBitmask); + oluacls_prop(L, "collisionBitmask", _olua_fun_cocos2d_PhysicsBody_getCollisionBitmask, _olua_fun_cocos2d_PhysicsBody_setCollisionBitmask); + oluacls_prop(L, "contactTestBitmask", _olua_fun_cocos2d_PhysicsBody_getContactTestBitmask, _olua_fun_cocos2d_PhysicsBody_setContactTestBitmask); + oluacls_prop(L, "dynamic", _olua_fun_cocos2d_PhysicsBody_isDynamic, _olua_fun_cocos2d_PhysicsBody_setDynamic); + oluacls_prop(L, "firstShape", _olua_fun_cocos2d_PhysicsBody_getFirstShape, nullptr); + oluacls_prop(L, "gravityEnabled", _olua_fun_cocos2d_PhysicsBody_isGravityEnabled, nullptr); + oluacls_prop(L, "group", _olua_fun_cocos2d_PhysicsBody_getGroup, _olua_fun_cocos2d_PhysicsBody_setGroup); + oluacls_prop(L, "joints", _olua_fun_cocos2d_PhysicsBody_getJoints, nullptr); + oluacls_prop(L, "linearDamping", _olua_fun_cocos2d_PhysicsBody_getLinearDamping, _olua_fun_cocos2d_PhysicsBody_setLinearDamping); + oluacls_prop(L, "mass", _olua_fun_cocos2d_PhysicsBody_getMass, _olua_fun_cocos2d_PhysicsBody_setMass); + oluacls_prop(L, "moment", _olua_fun_cocos2d_PhysicsBody_getMoment, _olua_fun_cocos2d_PhysicsBody_setMoment); + oluacls_prop(L, "node", _olua_fun_cocos2d_PhysicsBody_getNode, nullptr); + oluacls_prop(L, "position", _olua_fun_cocos2d_PhysicsBody_getPosition, nullptr); + oluacls_prop(L, "positionOffset", _olua_fun_cocos2d_PhysicsBody_getPositionOffset, _olua_fun_cocos2d_PhysicsBody_setPositionOffset); + oluacls_prop(L, "resting", _olua_fun_cocos2d_PhysicsBody_isResting, _olua_fun_cocos2d_PhysicsBody_setResting); + oluacls_prop(L, "rotation", _olua_fun_cocos2d_PhysicsBody_getRotation, nullptr); + oluacls_prop(L, "rotationEnabled", _olua_fun_cocos2d_PhysicsBody_isRotationEnabled, nullptr); + oluacls_prop(L, "rotationOffset", _olua_fun_cocos2d_PhysicsBody_getRotationOffset, _olua_fun_cocos2d_PhysicsBody_setRotationOffset); + oluacls_prop(L, "shapes", _olua_fun_cocos2d_PhysicsBody_getShapes, nullptr); + oluacls_prop(L, "tag", _olua_fun_cocos2d_PhysicsBody_getTag, _olua_fun_cocos2d_PhysicsBody_setTag); + oluacls_prop(L, "velocity", _olua_fun_cocos2d_PhysicsBody_getVelocity, _olua_fun_cocos2d_PhysicsBody_setVelocity); + oluacls_prop(L, "velocityLimit", _olua_fun_cocos2d_PhysicsBody_getVelocityLimit, _olua_fun_cocos2d_PhysicsBody_setVelocityLimit); + oluacls_prop(L, "world", _olua_fun_cocos2d_PhysicsBody_getWorld, nullptr); oluacls_const(L, "COMPONENT_NAME", cocos2d::PhysicsBody::COMPONENT_NAME); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_PhysicsBody(lua_State *L) +{ + olua_require(L, "cocos2d_physics", luaopen_cocos2d_physics); + if (!olua_getclass(L, "cc.PhysicsBody")) { + luaL_error(L, "class not found: cocos2d::PhysicsBody"); + } + return 1; +} OLUA_END_DECLS #endif #if CC_USE_PHYSICS -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_PhysicsContact_EventCode(lua_State *L) +static int _olua_cls_cc_PhysicsContact_EventCode(lua_State *L) { oluacls_class(L, "cc.PhysicsContact.EventCode"); oluacls_func(L, "__index", olua_indexerror); @@ -3045,11 +3169,21 @@ OLUA_LIB int luaopen_cocos2d_PhysicsContact_EventCode(lua_State *L) return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_PhysicsContact_EventCode(lua_State *L) +{ + olua_require(L, "cocos2d_physics", luaopen_cocos2d_physics); + if (!olua_getclass(L, "cc.PhysicsContact.EventCode")) { + luaL_error(L, "class not found: cocos2d::PhysicsContact::EventCode"); + } + return 1; +} OLUA_END_DECLS #endif #if CC_USE_PHYSICS -static int _cocos2d_PhysicsContact_getData(lua_State *L) +static int _olua_fun_cocos2d_PhysicsContact_getData(lua_State *L) { olua_startinvoke(L); @@ -3066,7 +3200,7 @@ static int _cocos2d_PhysicsContact_getData(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsContact_getEventCode(lua_State *L) +static int _olua_fun_cocos2d_PhysicsContact_getEventCode(lua_State *L) { olua_startinvoke(L); @@ -3083,7 +3217,7 @@ static int _cocos2d_PhysicsContact_getEventCode(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsContact_getShapeA(lua_State *L) +static int _olua_fun_cocos2d_PhysicsContact_getShapeA(lua_State *L) { olua_startinvoke(L); @@ -3100,7 +3234,7 @@ static int _cocos2d_PhysicsContact_getShapeA(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsContact_getShapeB(lua_State *L) +static int _olua_fun_cocos2d_PhysicsContact_getShapeB(lua_State *L) { olua_startinvoke(L); @@ -3117,7 +3251,7 @@ static int _cocos2d_PhysicsContact_getShapeB(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsContact_setData(lua_State *L) +static int _olua_fun_cocos2d_PhysicsContact_setData(lua_State *L) { olua_startinvoke(L); @@ -3135,27 +3269,36 @@ static int _cocos2d_PhysicsContact_setData(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_PhysicsContact(lua_State *L) +static int _olua_cls_cc_PhysicsContact(lua_State *L) { oluacls_class(L, "cc.PhysicsContact"); - oluacls_func(L, "getData", _cocos2d_PhysicsContact_getData); - oluacls_func(L, "getEventCode", _cocos2d_PhysicsContact_getEventCode); - oluacls_func(L, "getShapeA", _cocos2d_PhysicsContact_getShapeA); - oluacls_func(L, "getShapeB", _cocos2d_PhysicsContact_getShapeB); - oluacls_func(L, "setData", _cocos2d_PhysicsContact_setData); - oluacls_prop(L, "data", _cocos2d_PhysicsContact_getData, _cocos2d_PhysicsContact_setData); - oluacls_prop(L, "eventCode", _cocos2d_PhysicsContact_getEventCode, nullptr); - oluacls_prop(L, "shapeA", _cocos2d_PhysicsContact_getShapeA, nullptr); - oluacls_prop(L, "shapeB", _cocos2d_PhysicsContact_getShapeB, nullptr); + oluacls_func(L, "getData", _olua_fun_cocos2d_PhysicsContact_getData); + oluacls_func(L, "getEventCode", _olua_fun_cocos2d_PhysicsContact_getEventCode); + oluacls_func(L, "getShapeA", _olua_fun_cocos2d_PhysicsContact_getShapeA); + oluacls_func(L, "getShapeB", _olua_fun_cocos2d_PhysicsContact_getShapeB); + oluacls_func(L, "setData", _olua_fun_cocos2d_PhysicsContact_setData); + oluacls_prop(L, "data", _olua_fun_cocos2d_PhysicsContact_getData, _olua_fun_cocos2d_PhysicsContact_setData); + oluacls_prop(L, "eventCode", _olua_fun_cocos2d_PhysicsContact_getEventCode, nullptr); + oluacls_prop(L, "shapeA", _olua_fun_cocos2d_PhysicsContact_getShapeA, nullptr); + oluacls_prop(L, "shapeB", _olua_fun_cocos2d_PhysicsContact_getShapeB, nullptr); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_PhysicsContact(lua_State *L) +{ + olua_require(L, "cocos2d_physics", luaopen_cocos2d_physics); + if (!olua_getclass(L, "cc.PhysicsContact")) { + luaL_error(L, "class not found: cocos2d::PhysicsContact"); + } return 1; } OLUA_END_DECLS #endif #if CC_USE_PHYSICS -static int _cocos2d_PhysicsContactPostSolve___olua_move(lua_State *L) +static int _olua_fun_cocos2d_PhysicsContactPostSolve___olua_move(lua_State *L) { olua_startinvoke(L); @@ -3167,7 +3310,7 @@ static int _cocos2d_PhysicsContactPostSolve___olua_move(lua_State *L) return 1; } -static int _cocos2d_PhysicsContactPostSolve_getFriction(lua_State *L) +static int _olua_fun_cocos2d_PhysicsContactPostSolve_getFriction(lua_State *L) { olua_startinvoke(L); @@ -3184,7 +3327,7 @@ static int _cocos2d_PhysicsContactPostSolve_getFriction(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsContactPostSolve_getRestitution(lua_State *L) +static int _olua_fun_cocos2d_PhysicsContactPostSolve_getRestitution(lua_State *L) { olua_startinvoke(L); @@ -3201,7 +3344,7 @@ static int _cocos2d_PhysicsContactPostSolve_getRestitution(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsContactPostSolve_getSurfaceVelocity(lua_State *L) +static int _olua_fun_cocos2d_PhysicsContactPostSolve_getSurfaceVelocity(lua_State *L) { olua_startinvoke(L); @@ -3211,32 +3354,41 @@ static int _cocos2d_PhysicsContactPostSolve_getSurfaceVelocity(lua_State *L) // cocos2d::Vec2 getSurfaceVelocity() cocos2d::Vec2 ret = self->getSurfaceVelocity(); - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec2"); + int num_ret = olua_copy_object(L, ret, "cc.Vec2"); olua_endinvoke(L); return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_PhysicsContactPostSolve(lua_State *L) +static int _olua_cls_cc_PhysicsContactPostSolve(lua_State *L) { oluacls_class(L, "cc.PhysicsContactPostSolve"); - oluacls_func(L, "__olua_move", _cocos2d_PhysicsContactPostSolve___olua_move); - oluacls_func(L, "getFriction", _cocos2d_PhysicsContactPostSolve_getFriction); - oluacls_func(L, "getRestitution", _cocos2d_PhysicsContactPostSolve_getRestitution); - oluacls_func(L, "getSurfaceVelocity", _cocos2d_PhysicsContactPostSolve_getSurfaceVelocity); - oluacls_prop(L, "friction", _cocos2d_PhysicsContactPostSolve_getFriction, nullptr); - oluacls_prop(L, "restitution", _cocos2d_PhysicsContactPostSolve_getRestitution, nullptr); - oluacls_prop(L, "surfaceVelocity", _cocos2d_PhysicsContactPostSolve_getSurfaceVelocity, nullptr); + oluacls_func(L, "__olua_move", _olua_fun_cocos2d_PhysicsContactPostSolve___olua_move); + oluacls_func(L, "getFriction", _olua_fun_cocos2d_PhysicsContactPostSolve_getFriction); + oluacls_func(L, "getRestitution", _olua_fun_cocos2d_PhysicsContactPostSolve_getRestitution); + oluacls_func(L, "getSurfaceVelocity", _olua_fun_cocos2d_PhysicsContactPostSolve_getSurfaceVelocity); + oluacls_prop(L, "friction", _olua_fun_cocos2d_PhysicsContactPostSolve_getFriction, nullptr); + oluacls_prop(L, "restitution", _olua_fun_cocos2d_PhysicsContactPostSolve_getRestitution, nullptr); + oluacls_prop(L, "surfaceVelocity", _olua_fun_cocos2d_PhysicsContactPostSolve_getSurfaceVelocity, nullptr); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_PhysicsContactPostSolve(lua_State *L) +{ + olua_require(L, "cocos2d_physics", luaopen_cocos2d_physics); + if (!olua_getclass(L, "cc.PhysicsContactPostSolve")) { + luaL_error(L, "class not found: cocos2d::PhysicsContactPostSolve"); + } return 1; } OLUA_END_DECLS #endif #if CC_USE_PHYSICS -static int _cocos2d_PhysicsContactPreSolve___olua_move(lua_State *L) +static int _olua_fun_cocos2d_PhysicsContactPreSolve___olua_move(lua_State *L) { olua_startinvoke(L); @@ -3248,7 +3400,7 @@ static int _cocos2d_PhysicsContactPreSolve___olua_move(lua_State *L) return 1; } -static int _cocos2d_PhysicsContactPreSolve_getFriction(lua_State *L) +static int _olua_fun_cocos2d_PhysicsContactPreSolve_getFriction(lua_State *L) { olua_startinvoke(L); @@ -3265,7 +3417,7 @@ static int _cocos2d_PhysicsContactPreSolve_getFriction(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsContactPreSolve_getRestitution(lua_State *L) +static int _olua_fun_cocos2d_PhysicsContactPreSolve_getRestitution(lua_State *L) { olua_startinvoke(L); @@ -3282,7 +3434,7 @@ static int _cocos2d_PhysicsContactPreSolve_getRestitution(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsContactPreSolve_getSurfaceVelocity(lua_State *L) +static int _olua_fun_cocos2d_PhysicsContactPreSolve_getSurfaceVelocity(lua_State *L) { olua_startinvoke(L); @@ -3292,14 +3444,14 @@ static int _cocos2d_PhysicsContactPreSolve_getSurfaceVelocity(lua_State *L) // cocos2d::Vec2 getSurfaceVelocity() cocos2d::Vec2 ret = self->getSurfaceVelocity(); - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec2"); + int num_ret = olua_copy_object(L, ret, "cc.Vec2"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_PhysicsContactPreSolve_ignore(lua_State *L) +static int _olua_fun_cocos2d_PhysicsContactPreSolve_ignore(lua_State *L) { olua_startinvoke(L); @@ -3315,7 +3467,7 @@ static int _cocos2d_PhysicsContactPreSolve_ignore(lua_State *L) return 0; } -static int _cocos2d_PhysicsContactPreSolve_setFriction(lua_State *L) +static int _olua_fun_cocos2d_PhysicsContactPreSolve_setFriction(lua_State *L) { olua_startinvoke(L); @@ -3333,7 +3485,7 @@ static int _cocos2d_PhysicsContactPreSolve_setFriction(lua_State *L) return 0; } -static int _cocos2d_PhysicsContactPreSolve_setRestitution(lua_State *L) +static int _olua_fun_cocos2d_PhysicsContactPreSolve_setRestitution(lua_State *L) { olua_startinvoke(L); @@ -3351,47 +3503,56 @@ static int _cocos2d_PhysicsContactPreSolve_setRestitution(lua_State *L) return 0; } -static int _cocos2d_PhysicsContactPreSolve_setSurfaceVelocity(lua_State *L) +static int _olua_fun_cocos2d_PhysicsContactPreSolve_setSurfaceVelocity(lua_State *L) { olua_startinvoke(L); cocos2d::PhysicsContactPreSolve *self = nullptr; - cocos2d::Vec2 arg1; /** velocity */ + cocos2d::Vec2 *arg1; /** velocity */ olua_to_object(L, 1, &self, "cc.PhysicsContactPreSolve"); olua_check_object(L, 2, &arg1, "cc.Vec2"); // void setSurfaceVelocity(const cocos2d::Vec2 &velocity) - self->setSurfaceVelocity(arg1); + self->setSurfaceVelocity(*arg1); olua_endinvoke(L); return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_PhysicsContactPreSolve(lua_State *L) +static int _olua_cls_cc_PhysicsContactPreSolve(lua_State *L) { oluacls_class(L, "cc.PhysicsContactPreSolve"); - oluacls_func(L, "__olua_move", _cocos2d_PhysicsContactPreSolve___olua_move); - oluacls_func(L, "getFriction", _cocos2d_PhysicsContactPreSolve_getFriction); - oluacls_func(L, "getRestitution", _cocos2d_PhysicsContactPreSolve_getRestitution); - oluacls_func(L, "getSurfaceVelocity", _cocos2d_PhysicsContactPreSolve_getSurfaceVelocity); - oluacls_func(L, "ignore", _cocos2d_PhysicsContactPreSolve_ignore); - oluacls_func(L, "setFriction", _cocos2d_PhysicsContactPreSolve_setFriction); - oluacls_func(L, "setRestitution", _cocos2d_PhysicsContactPreSolve_setRestitution); - oluacls_func(L, "setSurfaceVelocity", _cocos2d_PhysicsContactPreSolve_setSurfaceVelocity); - oluacls_prop(L, "friction", _cocos2d_PhysicsContactPreSolve_getFriction, _cocos2d_PhysicsContactPreSolve_setFriction); - oluacls_prop(L, "restitution", _cocos2d_PhysicsContactPreSolve_getRestitution, _cocos2d_PhysicsContactPreSolve_setRestitution); - oluacls_prop(L, "surfaceVelocity", _cocos2d_PhysicsContactPreSolve_getSurfaceVelocity, _cocos2d_PhysicsContactPreSolve_setSurfaceVelocity); + oluacls_func(L, "__olua_move", _olua_fun_cocos2d_PhysicsContactPreSolve___olua_move); + oluacls_func(L, "getFriction", _olua_fun_cocos2d_PhysicsContactPreSolve_getFriction); + oluacls_func(L, "getRestitution", _olua_fun_cocos2d_PhysicsContactPreSolve_getRestitution); + oluacls_func(L, "getSurfaceVelocity", _olua_fun_cocos2d_PhysicsContactPreSolve_getSurfaceVelocity); + oluacls_func(L, "ignore", _olua_fun_cocos2d_PhysicsContactPreSolve_ignore); + oluacls_func(L, "setFriction", _olua_fun_cocos2d_PhysicsContactPreSolve_setFriction); + oluacls_func(L, "setRestitution", _olua_fun_cocos2d_PhysicsContactPreSolve_setRestitution); + oluacls_func(L, "setSurfaceVelocity", _olua_fun_cocos2d_PhysicsContactPreSolve_setSurfaceVelocity); + oluacls_prop(L, "friction", _olua_fun_cocos2d_PhysicsContactPreSolve_getFriction, _olua_fun_cocos2d_PhysicsContactPreSolve_setFriction); + oluacls_prop(L, "restitution", _olua_fun_cocos2d_PhysicsContactPreSolve_getRestitution, _olua_fun_cocos2d_PhysicsContactPreSolve_setRestitution); + oluacls_prop(L, "surfaceVelocity", _olua_fun_cocos2d_PhysicsContactPreSolve_getSurfaceVelocity, _olua_fun_cocos2d_PhysicsContactPreSolve_setSurfaceVelocity); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_PhysicsContactPreSolve(lua_State *L) +{ + olua_require(L, "cocos2d_physics", luaopen_cocos2d_physics); + if (!olua_getclass(L, "cc.PhysicsContactPreSolve")) { + luaL_error(L, "class not found: cocos2d::PhysicsContactPreSolve"); + } + return 1; +} OLUA_END_DECLS #endif #if CC_USE_PHYSICS -static int _cocos2d_PhysicsJoint___olua_move(lua_State *L) +static int _olua_fun_cocos2d_PhysicsJoint___olua_move(lua_State *L) { olua_startinvoke(L); @@ -3403,7 +3564,7 @@ static int _cocos2d_PhysicsJoint___olua_move(lua_State *L) return 1; } -static int _cocos2d_PhysicsJoint_getBodyA(lua_State *L) +static int _olua_fun_cocos2d_PhysicsJoint_getBodyA(lua_State *L) { olua_startinvoke(L); @@ -3420,7 +3581,7 @@ static int _cocos2d_PhysicsJoint_getBodyA(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsJoint_getBodyB(lua_State *L) +static int _olua_fun_cocos2d_PhysicsJoint_getBodyB(lua_State *L) { olua_startinvoke(L); @@ -3437,7 +3598,7 @@ static int _cocos2d_PhysicsJoint_getBodyB(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsJoint_getMaxForce(lua_State *L) +static int _olua_fun_cocos2d_PhysicsJoint_getMaxForce(lua_State *L) { olua_startinvoke(L); @@ -3454,7 +3615,7 @@ static int _cocos2d_PhysicsJoint_getMaxForce(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsJoint_getTag(lua_State *L) +static int _olua_fun_cocos2d_PhysicsJoint_getTag(lua_State *L) { olua_startinvoke(L); @@ -3471,7 +3632,7 @@ static int _cocos2d_PhysicsJoint_getTag(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsJoint_getWorld(lua_State *L) +static int _olua_fun_cocos2d_PhysicsJoint_getWorld(lua_State *L) { olua_startinvoke(L); @@ -3488,7 +3649,7 @@ static int _cocos2d_PhysicsJoint_getWorld(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsJoint_isCollisionEnabled(lua_State *L) +static int _olua_fun_cocos2d_PhysicsJoint_isCollisionEnabled(lua_State *L) { olua_startinvoke(L); @@ -3505,7 +3666,7 @@ static int _cocos2d_PhysicsJoint_isCollisionEnabled(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsJoint_isEnabled(lua_State *L) +static int _olua_fun_cocos2d_PhysicsJoint_isEnabled(lua_State *L) { olua_startinvoke(L); @@ -3522,7 +3683,7 @@ static int _cocos2d_PhysicsJoint_isEnabled(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsJoint_removeFormWorld(lua_State *L) +static int _olua_fun_cocos2d_PhysicsJoint_removeFormWorld(lua_State *L) { olua_startinvoke(L); @@ -3538,7 +3699,7 @@ static int _cocos2d_PhysicsJoint_removeFormWorld(lua_State *L) return 0; } -static int _cocos2d_PhysicsJoint_setCollisionEnable(lua_State *L) +static int _olua_fun_cocos2d_PhysicsJoint_setCollisionEnable(lua_State *L) { olua_startinvoke(L); @@ -3556,7 +3717,7 @@ static int _cocos2d_PhysicsJoint_setCollisionEnable(lua_State *L) return 0; } -static int _cocos2d_PhysicsJoint_setEnable(lua_State *L) +static int _olua_fun_cocos2d_PhysicsJoint_setEnable(lua_State *L) { olua_startinvoke(L); @@ -3574,7 +3735,7 @@ static int _cocos2d_PhysicsJoint_setEnable(lua_State *L) return 0; } -static int _cocos2d_PhysicsJoint_setMaxForce(lua_State *L) +static int _olua_fun_cocos2d_PhysicsJoint_setMaxForce(lua_State *L) { olua_startinvoke(L); @@ -3592,7 +3753,7 @@ static int _cocos2d_PhysicsJoint_setMaxForce(lua_State *L) return 0; } -static int _cocos2d_PhysicsJoint_setTag(lua_State *L) +static int _olua_fun_cocos2d_PhysicsJoint_setTag(lua_State *L) { olua_startinvoke(L); @@ -3610,45 +3771,54 @@ static int _cocos2d_PhysicsJoint_setTag(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_PhysicsJoint(lua_State *L) +static int _olua_cls_cc_PhysicsJoint(lua_State *L) { oluacls_class(L, "cc.PhysicsJoint"); - oluacls_func(L, "__olua_move", _cocos2d_PhysicsJoint___olua_move); - oluacls_func(L, "getBodyA", _cocos2d_PhysicsJoint_getBodyA); - oluacls_func(L, "getBodyB", _cocos2d_PhysicsJoint_getBodyB); - oluacls_func(L, "getMaxForce", _cocos2d_PhysicsJoint_getMaxForce); - oluacls_func(L, "getTag", _cocos2d_PhysicsJoint_getTag); - oluacls_func(L, "getWorld", _cocos2d_PhysicsJoint_getWorld); - oluacls_func(L, "isCollisionEnabled", _cocos2d_PhysicsJoint_isCollisionEnabled); - oluacls_func(L, "isEnabled", _cocos2d_PhysicsJoint_isEnabled); - oluacls_func(L, "removeFormWorld", _cocos2d_PhysicsJoint_removeFormWorld); - oluacls_func(L, "setCollisionEnable", _cocos2d_PhysicsJoint_setCollisionEnable); - oluacls_func(L, "setEnable", _cocos2d_PhysicsJoint_setEnable); - oluacls_func(L, "setMaxForce", _cocos2d_PhysicsJoint_setMaxForce); - oluacls_func(L, "setTag", _cocos2d_PhysicsJoint_setTag); - oluacls_prop(L, "bodyA", _cocos2d_PhysicsJoint_getBodyA, nullptr); - oluacls_prop(L, "bodyB", _cocos2d_PhysicsJoint_getBodyB, nullptr); - oluacls_prop(L, "collisionEnabled", _cocos2d_PhysicsJoint_isCollisionEnabled, nullptr); - oluacls_prop(L, "enabled", _cocos2d_PhysicsJoint_isEnabled, nullptr); - oluacls_prop(L, "maxForce", _cocos2d_PhysicsJoint_getMaxForce, _cocos2d_PhysicsJoint_setMaxForce); - oluacls_prop(L, "tag", _cocos2d_PhysicsJoint_getTag, _cocos2d_PhysicsJoint_setTag); - oluacls_prop(L, "world", _cocos2d_PhysicsJoint_getWorld, nullptr); + oluacls_func(L, "__olua_move", _olua_fun_cocos2d_PhysicsJoint___olua_move); + oluacls_func(L, "getBodyA", _olua_fun_cocos2d_PhysicsJoint_getBodyA); + oluacls_func(L, "getBodyB", _olua_fun_cocos2d_PhysicsJoint_getBodyB); + oluacls_func(L, "getMaxForce", _olua_fun_cocos2d_PhysicsJoint_getMaxForce); + oluacls_func(L, "getTag", _olua_fun_cocos2d_PhysicsJoint_getTag); + oluacls_func(L, "getWorld", _olua_fun_cocos2d_PhysicsJoint_getWorld); + oluacls_func(L, "isCollisionEnabled", _olua_fun_cocos2d_PhysicsJoint_isCollisionEnabled); + oluacls_func(L, "isEnabled", _olua_fun_cocos2d_PhysicsJoint_isEnabled); + oluacls_func(L, "removeFormWorld", _olua_fun_cocos2d_PhysicsJoint_removeFormWorld); + oluacls_func(L, "setCollisionEnable", _olua_fun_cocos2d_PhysicsJoint_setCollisionEnable); + oluacls_func(L, "setEnable", _olua_fun_cocos2d_PhysicsJoint_setEnable); + oluacls_func(L, "setMaxForce", _olua_fun_cocos2d_PhysicsJoint_setMaxForce); + oluacls_func(L, "setTag", _olua_fun_cocos2d_PhysicsJoint_setTag); + oluacls_prop(L, "bodyA", _olua_fun_cocos2d_PhysicsJoint_getBodyA, nullptr); + oluacls_prop(L, "bodyB", _olua_fun_cocos2d_PhysicsJoint_getBodyB, nullptr); + oluacls_prop(L, "collisionEnabled", _olua_fun_cocos2d_PhysicsJoint_isCollisionEnabled, nullptr); + oluacls_prop(L, "enabled", _olua_fun_cocos2d_PhysicsJoint_isEnabled, nullptr); + oluacls_prop(L, "maxForce", _olua_fun_cocos2d_PhysicsJoint_getMaxForce, _olua_fun_cocos2d_PhysicsJoint_setMaxForce); + oluacls_prop(L, "tag", _olua_fun_cocos2d_PhysicsJoint_getTag, _olua_fun_cocos2d_PhysicsJoint_setTag); + oluacls_prop(L, "world", _olua_fun_cocos2d_PhysicsJoint_getWorld, nullptr); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_PhysicsJoint(lua_State *L) +{ + olua_require(L, "cocos2d_physics", luaopen_cocos2d_physics); + if (!olua_getclass(L, "cc.PhysicsJoint")) { + luaL_error(L, "class not found: cocos2d::PhysicsJoint"); + } + return 1; +} OLUA_END_DECLS #endif #if CC_USE_PHYSICS -static int _cocos2d_PhysicsJointDistance_construct(lua_State *L) +static int _olua_fun_cocos2d_PhysicsJointDistance_construct(lua_State *L) { olua_startinvoke(L); cocos2d::PhysicsBody *arg1 = nullptr; /** a */ cocos2d::PhysicsBody *arg2 = nullptr; /** b */ - cocos2d::Vec2 arg3; /** anchr1 */ - cocos2d::Vec2 arg4; /** anchr2 */ + cocos2d::Vec2 *arg3; /** anchr1 */ + cocos2d::Vec2 *arg4; /** anchr2 */ olua_check_object(L, 1, &arg1, "cc.PhysicsBody"); olua_check_object(L, 2, &arg2, "cc.PhysicsBody"); @@ -3656,7 +3826,7 @@ static int _cocos2d_PhysicsJointDistance_construct(lua_State *L) olua_check_object(L, 4, &arg4, "cc.Vec2"); // static cocos2d::PhysicsJointDistance *construct(cocos2d::PhysicsBody *a, cocos2d::PhysicsBody *b, const cocos2d::Vec2 &anchr1, const cocos2d::Vec2 &anchr2) - cocos2d::PhysicsJointDistance *ret = cocos2d::PhysicsJointDistance::construct(arg1, arg2, arg3, arg4); + cocos2d::PhysicsJointDistance *ret = cocos2d::PhysicsJointDistance::construct(arg1, arg2, *arg3, *arg4); int num_ret = olua_push_object(L, ret, "cc.PhysicsJointDistance"); olua_endinvoke(L); @@ -3664,7 +3834,7 @@ static int _cocos2d_PhysicsJointDistance_construct(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsJointDistance_createConstraints(lua_State *L) +static int _olua_fun_cocos2d_PhysicsJointDistance_createConstraints(lua_State *L) { olua_startinvoke(L); @@ -3681,7 +3851,7 @@ static int _cocos2d_PhysicsJointDistance_createConstraints(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsJointDistance_getDistance(lua_State *L) +static int _olua_fun_cocos2d_PhysicsJointDistance_getDistance(lua_State *L) { olua_startinvoke(L); @@ -3698,7 +3868,7 @@ static int _cocos2d_PhysicsJointDistance_getDistance(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsJointDistance_setDistance(lua_State *L) +static int _olua_fun_cocos2d_PhysicsJointDistance_setDistance(lua_State *L) { olua_startinvoke(L); @@ -3716,36 +3886,45 @@ static int _cocos2d_PhysicsJointDistance_setDistance(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_PhysicsJointDistance(lua_State *L) +static int _olua_cls_cc_PhysicsJointDistance(lua_State *L) { oluacls_class(L, "cc.PhysicsJointDistance"); - oluacls_func(L, "construct", _cocos2d_PhysicsJointDistance_construct); - oluacls_func(L, "createConstraints", _cocos2d_PhysicsJointDistance_createConstraints); - oluacls_func(L, "getDistance", _cocos2d_PhysicsJointDistance_getDistance); - oluacls_func(L, "setDistance", _cocos2d_PhysicsJointDistance_setDistance); - oluacls_prop(L, "distance", _cocos2d_PhysicsJointDistance_getDistance, _cocos2d_PhysicsJointDistance_setDistance); + oluacls_func(L, "construct", _olua_fun_cocos2d_PhysicsJointDistance_construct); + oluacls_func(L, "createConstraints", _olua_fun_cocos2d_PhysicsJointDistance_createConstraints); + oluacls_func(L, "getDistance", _olua_fun_cocos2d_PhysicsJointDistance_getDistance); + oluacls_func(L, "setDistance", _olua_fun_cocos2d_PhysicsJointDistance_setDistance); + oluacls_prop(L, "distance", _olua_fun_cocos2d_PhysicsJointDistance_getDistance, _olua_fun_cocos2d_PhysicsJointDistance_setDistance); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_PhysicsJointDistance(lua_State *L) +{ + olua_require(L, "cocos2d_physics", luaopen_cocos2d_physics); + if (!olua_getclass(L, "cc.PhysicsJointDistance")) { + luaL_error(L, "class not found: cocos2d::PhysicsJointDistance"); + } + return 1; +} OLUA_END_DECLS #endif #if CC_USE_PHYSICS -static int _cocos2d_PhysicsJointFixed_construct(lua_State *L) +static int _olua_fun_cocos2d_PhysicsJointFixed_construct(lua_State *L) { olua_startinvoke(L); cocos2d::PhysicsBody *arg1 = nullptr; /** a */ cocos2d::PhysicsBody *arg2 = nullptr; /** b */ - cocos2d::Vec2 arg3; /** anchr */ + cocos2d::Vec2 *arg3; /** anchr */ olua_check_object(L, 1, &arg1, "cc.PhysicsBody"); olua_check_object(L, 2, &arg2, "cc.PhysicsBody"); olua_check_object(L, 3, &arg3, "cc.Vec2"); // static cocos2d::PhysicsJointFixed *construct(cocos2d::PhysicsBody *a, cocos2d::PhysicsBody *b, const cocos2d::Vec2 &anchr) - cocos2d::PhysicsJointFixed *ret = cocos2d::PhysicsJointFixed::construct(arg1, arg2, arg3); + cocos2d::PhysicsJointFixed *ret = cocos2d::PhysicsJointFixed::construct(arg1, arg2, *arg3); int num_ret = olua_push_object(L, ret, "cc.PhysicsJointFixed"); olua_endinvoke(L); @@ -3753,7 +3932,7 @@ static int _cocos2d_PhysicsJointFixed_construct(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsJointFixed_createConstraints(lua_State *L) +static int _olua_fun_cocos2d_PhysicsJointFixed_createConstraints(lua_State *L) { olua_startinvoke(L); @@ -3770,20 +3949,29 @@ static int _cocos2d_PhysicsJointFixed_createConstraints(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_PhysicsJointFixed(lua_State *L) +static int _olua_cls_cc_PhysicsJointFixed(lua_State *L) { oluacls_class(L, "cc.PhysicsJointFixed"); - oluacls_func(L, "construct", _cocos2d_PhysicsJointFixed_construct); - oluacls_func(L, "createConstraints", _cocos2d_PhysicsJointFixed_createConstraints); + oluacls_func(L, "construct", _olua_fun_cocos2d_PhysicsJointFixed_construct); + oluacls_func(L, "createConstraints", _olua_fun_cocos2d_PhysicsJointFixed_createConstraints); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_PhysicsJointFixed(lua_State *L) +{ + olua_require(L, "cocos2d_physics", luaopen_cocos2d_physics); + if (!olua_getclass(L, "cc.PhysicsJointFixed")) { + luaL_error(L, "class not found: cocos2d::PhysicsJointFixed"); + } + return 1; +} OLUA_END_DECLS #endif #if CC_USE_PHYSICS -static int _cocos2d_PhysicsJointGear_construct(lua_State *L) +static int _olua_fun_cocos2d_PhysicsJointGear_construct(lua_State *L) { olua_startinvoke(L); @@ -3806,7 +3994,7 @@ static int _cocos2d_PhysicsJointGear_construct(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsJointGear_createConstraints(lua_State *L) +static int _olua_fun_cocos2d_PhysicsJointGear_createConstraints(lua_State *L) { olua_startinvoke(L); @@ -3823,7 +4011,7 @@ static int _cocos2d_PhysicsJointGear_createConstraints(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsJointGear_getPhase(lua_State *L) +static int _olua_fun_cocos2d_PhysicsJointGear_getPhase(lua_State *L) { olua_startinvoke(L); @@ -3840,7 +4028,7 @@ static int _cocos2d_PhysicsJointGear_getPhase(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsJointGear_getRatio(lua_State *L) +static int _olua_fun_cocos2d_PhysicsJointGear_getRatio(lua_State *L) { olua_startinvoke(L); @@ -3857,7 +4045,7 @@ static int _cocos2d_PhysicsJointGear_getRatio(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsJointGear_setPhase(lua_State *L) +static int _olua_fun_cocos2d_PhysicsJointGear_setPhase(lua_State *L) { olua_startinvoke(L); @@ -3875,7 +4063,7 @@ static int _cocos2d_PhysicsJointGear_setPhase(lua_State *L) return 0; } -static int _cocos2d_PhysicsJointGear_setRatio(lua_State *L) +static int _olua_fun_cocos2d_PhysicsJointGear_setRatio(lua_State *L) { olua_startinvoke(L); @@ -3893,34 +4081,43 @@ static int _cocos2d_PhysicsJointGear_setRatio(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_PhysicsJointGear(lua_State *L) +static int _olua_cls_cc_PhysicsJointGear(lua_State *L) { oluacls_class(L, "cc.PhysicsJointGear"); - oluacls_func(L, "construct", _cocos2d_PhysicsJointGear_construct); - oluacls_func(L, "createConstraints", _cocos2d_PhysicsJointGear_createConstraints); - oluacls_func(L, "getPhase", _cocos2d_PhysicsJointGear_getPhase); - oluacls_func(L, "getRatio", _cocos2d_PhysicsJointGear_getRatio); - oluacls_func(L, "setPhase", _cocos2d_PhysicsJointGear_setPhase); - oluacls_func(L, "setRatio", _cocos2d_PhysicsJointGear_setRatio); - oluacls_prop(L, "phase", _cocos2d_PhysicsJointGear_getPhase, _cocos2d_PhysicsJointGear_setPhase); - oluacls_prop(L, "ratio", _cocos2d_PhysicsJointGear_getRatio, _cocos2d_PhysicsJointGear_setRatio); + oluacls_func(L, "construct", _olua_fun_cocos2d_PhysicsJointGear_construct); + oluacls_func(L, "createConstraints", _olua_fun_cocos2d_PhysicsJointGear_createConstraints); + oluacls_func(L, "getPhase", _olua_fun_cocos2d_PhysicsJointGear_getPhase); + oluacls_func(L, "getRatio", _olua_fun_cocos2d_PhysicsJointGear_getRatio); + oluacls_func(L, "setPhase", _olua_fun_cocos2d_PhysicsJointGear_setPhase); + oluacls_func(L, "setRatio", _olua_fun_cocos2d_PhysicsJointGear_setRatio); + oluacls_prop(L, "phase", _olua_fun_cocos2d_PhysicsJointGear_getPhase, _olua_fun_cocos2d_PhysicsJointGear_setPhase); + oluacls_prop(L, "ratio", _olua_fun_cocos2d_PhysicsJointGear_getRatio, _olua_fun_cocos2d_PhysicsJointGear_setRatio); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_PhysicsJointGear(lua_State *L) +{ + olua_require(L, "cocos2d_physics", luaopen_cocos2d_physics); + if (!olua_getclass(L, "cc.PhysicsJointGear")) { + luaL_error(L, "class not found: cocos2d::PhysicsJointGear"); + } + return 1; +} OLUA_END_DECLS #endif #if CC_USE_PHYSICS -static int _cocos2d_PhysicsJointGroove_construct(lua_State *L) +static int _olua_fun_cocos2d_PhysicsJointGroove_construct(lua_State *L) { olua_startinvoke(L); cocos2d::PhysicsBody *arg1 = nullptr; /** a */ cocos2d::PhysicsBody *arg2 = nullptr; /** b */ - cocos2d::Vec2 arg3; /** grooveA */ - cocos2d::Vec2 arg4; /** grooveB */ - cocos2d::Vec2 arg5; /** anchr2 */ + cocos2d::Vec2 *arg3; /** grooveA */ + cocos2d::Vec2 *arg4; /** grooveB */ + cocos2d::Vec2 *arg5; /** anchr2 */ olua_check_object(L, 1, &arg1, "cc.PhysicsBody"); olua_check_object(L, 2, &arg2, "cc.PhysicsBody"); @@ -3929,7 +4126,7 @@ static int _cocos2d_PhysicsJointGroove_construct(lua_State *L) olua_check_object(L, 5, &arg5, "cc.Vec2"); // static cocos2d::PhysicsJointGroove *construct(cocos2d::PhysicsBody *a, cocos2d::PhysicsBody *b, const cocos2d::Vec2 &grooveA, const cocos2d::Vec2 &grooveB, const cocos2d::Vec2 &anchr2) - cocos2d::PhysicsJointGroove *ret = cocos2d::PhysicsJointGroove::construct(arg1, arg2, arg3, arg4, arg5); + cocos2d::PhysicsJointGroove *ret = cocos2d::PhysicsJointGroove::construct(arg1, arg2, *arg3, *arg4, *arg5); int num_ret = olua_push_object(L, ret, "cc.PhysicsJointGroove"); olua_endinvoke(L); @@ -3937,7 +4134,7 @@ static int _cocos2d_PhysicsJointGroove_construct(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsJointGroove_createConstraints(lua_State *L) +static int _olua_fun_cocos2d_PhysicsJointGroove_createConstraints(lua_State *L) { olua_startinvoke(L); @@ -3954,7 +4151,7 @@ static int _cocos2d_PhysicsJointGroove_createConstraints(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsJointGroove_getAnchr2(lua_State *L) +static int _olua_fun_cocos2d_PhysicsJointGroove_getAnchr2(lua_State *L) { olua_startinvoke(L); @@ -3964,14 +4161,14 @@ static int _cocos2d_PhysicsJointGroove_getAnchr2(lua_State *L) // cocos2d::Vec2 getAnchr2() cocos2d::Vec2 ret = self->getAnchr2(); - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec2"); + int num_ret = olua_copy_object(L, ret, "cc.Vec2"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_PhysicsJointGroove_getGrooveA(lua_State *L) +static int _olua_fun_cocos2d_PhysicsJointGroove_getGrooveA(lua_State *L) { olua_startinvoke(L); @@ -3981,14 +4178,14 @@ static int _cocos2d_PhysicsJointGroove_getGrooveA(lua_State *L) // cocos2d::Vec2 getGrooveA() cocos2d::Vec2 ret = self->getGrooveA(); - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec2"); + int num_ret = olua_copy_object(L, ret, "cc.Vec2"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_PhysicsJointGroove_getGrooveB(lua_State *L) +static int _olua_fun_cocos2d_PhysicsJointGroove_getGrooveB(lua_State *L) { olua_startinvoke(L); @@ -3998,97 +4195,106 @@ static int _cocos2d_PhysicsJointGroove_getGrooveB(lua_State *L) // cocos2d::Vec2 getGrooveB() cocos2d::Vec2 ret = self->getGrooveB(); - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec2"); + int num_ret = olua_copy_object(L, ret, "cc.Vec2"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_PhysicsJointGroove_setAnchr2(lua_State *L) +static int _olua_fun_cocos2d_PhysicsJointGroove_setAnchr2(lua_State *L) { olua_startinvoke(L); cocos2d::PhysicsJointGroove *self = nullptr; - cocos2d::Vec2 arg1; /** anchr2 */ + cocos2d::Vec2 *arg1; /** anchr2 */ olua_to_object(L, 1, &self, "cc.PhysicsJointGroove"); olua_check_object(L, 2, &arg1, "cc.Vec2"); // void setAnchr2(const cocos2d::Vec2 &anchr2) - self->setAnchr2(arg1); + self->setAnchr2(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_PhysicsJointGroove_setGrooveA(lua_State *L) +static int _olua_fun_cocos2d_PhysicsJointGroove_setGrooveA(lua_State *L) { olua_startinvoke(L); cocos2d::PhysicsJointGroove *self = nullptr; - cocos2d::Vec2 arg1; /** grooveA */ + cocos2d::Vec2 *arg1; /** grooveA */ olua_to_object(L, 1, &self, "cc.PhysicsJointGroove"); olua_check_object(L, 2, &arg1, "cc.Vec2"); // void setGrooveA(const cocos2d::Vec2 &grooveA) - self->setGrooveA(arg1); + self->setGrooveA(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_PhysicsJointGroove_setGrooveB(lua_State *L) +static int _olua_fun_cocos2d_PhysicsJointGroove_setGrooveB(lua_State *L) { olua_startinvoke(L); cocos2d::PhysicsJointGroove *self = nullptr; - cocos2d::Vec2 arg1; /** grooveB */ + cocos2d::Vec2 *arg1; /** grooveB */ olua_to_object(L, 1, &self, "cc.PhysicsJointGroove"); olua_check_object(L, 2, &arg1, "cc.Vec2"); // void setGrooveB(const cocos2d::Vec2 &grooveB) - self->setGrooveB(arg1); + self->setGrooveB(*arg1); olua_endinvoke(L); return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_PhysicsJointGroove(lua_State *L) +static int _olua_cls_cc_PhysicsJointGroove(lua_State *L) { oluacls_class(L, "cc.PhysicsJointGroove"); - oluacls_func(L, "construct", _cocos2d_PhysicsJointGroove_construct); - oluacls_func(L, "createConstraints", _cocos2d_PhysicsJointGroove_createConstraints); - oluacls_func(L, "getAnchr2", _cocos2d_PhysicsJointGroove_getAnchr2); - oluacls_func(L, "getGrooveA", _cocos2d_PhysicsJointGroove_getGrooveA); - oluacls_func(L, "getGrooveB", _cocos2d_PhysicsJointGroove_getGrooveB); - oluacls_func(L, "setAnchr2", _cocos2d_PhysicsJointGroove_setAnchr2); - oluacls_func(L, "setGrooveA", _cocos2d_PhysicsJointGroove_setGrooveA); - oluacls_func(L, "setGrooveB", _cocos2d_PhysicsJointGroove_setGrooveB); - oluacls_prop(L, "anchr2", _cocos2d_PhysicsJointGroove_getAnchr2, _cocos2d_PhysicsJointGroove_setAnchr2); - oluacls_prop(L, "grooveA", _cocos2d_PhysicsJointGroove_getGrooveA, _cocos2d_PhysicsJointGroove_setGrooveA); - oluacls_prop(L, "grooveB", _cocos2d_PhysicsJointGroove_getGrooveB, _cocos2d_PhysicsJointGroove_setGrooveB); + oluacls_func(L, "construct", _olua_fun_cocos2d_PhysicsJointGroove_construct); + oluacls_func(L, "createConstraints", _olua_fun_cocos2d_PhysicsJointGroove_createConstraints); + oluacls_func(L, "getAnchr2", _olua_fun_cocos2d_PhysicsJointGroove_getAnchr2); + oluacls_func(L, "getGrooveA", _olua_fun_cocos2d_PhysicsJointGroove_getGrooveA); + oluacls_func(L, "getGrooveB", _olua_fun_cocos2d_PhysicsJointGroove_getGrooveB); + oluacls_func(L, "setAnchr2", _olua_fun_cocos2d_PhysicsJointGroove_setAnchr2); + oluacls_func(L, "setGrooveA", _olua_fun_cocos2d_PhysicsJointGroove_setGrooveA); + oluacls_func(L, "setGrooveB", _olua_fun_cocos2d_PhysicsJointGroove_setGrooveB); + oluacls_prop(L, "anchr2", _olua_fun_cocos2d_PhysicsJointGroove_getAnchr2, _olua_fun_cocos2d_PhysicsJointGroove_setAnchr2); + oluacls_prop(L, "grooveA", _olua_fun_cocos2d_PhysicsJointGroove_getGrooveA, _olua_fun_cocos2d_PhysicsJointGroove_setGrooveA); + oluacls_prop(L, "grooveB", _olua_fun_cocos2d_PhysicsJointGroove_getGrooveB, _olua_fun_cocos2d_PhysicsJointGroove_setGrooveB); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_PhysicsJointGroove(lua_State *L) +{ + olua_require(L, "cocos2d_physics", luaopen_cocos2d_physics); + if (!olua_getclass(L, "cc.PhysicsJointGroove")) { + luaL_error(L, "class not found: cocos2d::PhysicsJointGroove"); + } + return 1; +} OLUA_END_DECLS #endif #if CC_USE_PHYSICS -static int _cocos2d_PhysicsJointLimit_construct$1(lua_State *L) +static int _olua_fun_cocos2d_PhysicsJointLimit_construct$1(lua_State *L) { olua_startinvoke(L); cocos2d::PhysicsBody *arg1 = nullptr; /** a */ cocos2d::PhysicsBody *arg2 = nullptr; /** b */ - cocos2d::Vec2 arg3; /** anchr1 */ - cocos2d::Vec2 arg4; /** anchr2 */ + cocos2d::Vec2 *arg3; /** anchr1 */ + cocos2d::Vec2 *arg4; /** anchr2 */ olua_check_object(L, 1, &arg1, "cc.PhysicsBody"); olua_check_object(L, 2, &arg2, "cc.PhysicsBody"); @@ -4096,7 +4302,7 @@ static int _cocos2d_PhysicsJointLimit_construct$1(lua_State *L) olua_check_object(L, 4, &arg4, "cc.Vec2"); // static cocos2d::PhysicsJointLimit *construct(cocos2d::PhysicsBody *a, cocos2d::PhysicsBody *b, const cocos2d::Vec2 &anchr1, const cocos2d::Vec2 &anchr2) - cocos2d::PhysicsJointLimit *ret = cocos2d::PhysicsJointLimit::construct(arg1, arg2, arg3, arg4); + cocos2d::PhysicsJointLimit *ret = cocos2d::PhysicsJointLimit::construct(arg1, arg2, *arg3, *arg4); int num_ret = olua_push_object(L, ret, "cc.PhysicsJointLimit"); olua_endinvoke(L); @@ -4104,14 +4310,14 @@ static int _cocos2d_PhysicsJointLimit_construct$1(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsJointLimit_construct$2(lua_State *L) +static int _olua_fun_cocos2d_PhysicsJointLimit_construct$2(lua_State *L) { olua_startinvoke(L); cocos2d::PhysicsBody *arg1 = nullptr; /** a */ cocos2d::PhysicsBody *arg2 = nullptr; /** b */ - cocos2d::Vec2 arg3; /** anchr1 */ - cocos2d::Vec2 arg4; /** anchr2 */ + cocos2d::Vec2 *arg3; /** anchr1 */ + cocos2d::Vec2 *arg4; /** anchr2 */ float arg5 = 0; /** min */ float arg6 = 0; /** max */ @@ -4123,7 +4329,7 @@ static int _cocos2d_PhysicsJointLimit_construct$2(lua_State *L) olua_check_number(L, 6, &arg6); // static cocos2d::PhysicsJointLimit *construct(cocos2d::PhysicsBody *a, cocos2d::PhysicsBody *b, const cocos2d::Vec2 &anchr1, const cocos2d::Vec2 &anchr2, float min, float max) - cocos2d::PhysicsJointLimit *ret = cocos2d::PhysicsJointLimit::construct(arg1, arg2, arg3, arg4, arg5, arg6); + cocos2d::PhysicsJointLimit *ret = cocos2d::PhysicsJointLimit::construct(arg1, arg2, *arg3, *arg4, arg5, arg6); int num_ret = olua_push_object(L, ret, "cc.PhysicsJointLimit"); olua_endinvoke(L); @@ -4131,21 +4337,21 @@ static int _cocos2d_PhysicsJointLimit_construct$2(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsJointLimit_construct(lua_State *L) +static int _olua_fun_cocos2d_PhysicsJointLimit_construct(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 4) { // if ((olua_is_object(L, 1, "cc.PhysicsBody")) && (olua_is_object(L, 2, "cc.PhysicsBody")) && (olua_is_object(L, 3, "cc.Vec2")) && (olua_is_object(L, 4, "cc.Vec2"))) { // static cocos2d::PhysicsJointLimit *construct(cocos2d::PhysicsBody *a, cocos2d::PhysicsBody *b, const cocos2d::Vec2 &anchr1, const cocos2d::Vec2 &anchr2) - return _cocos2d_PhysicsJointLimit_construct$1(L); + return _olua_fun_cocos2d_PhysicsJointLimit_construct$1(L); // } } if (num_args == 6) { // if ((olua_is_object(L, 1, "cc.PhysicsBody")) && (olua_is_object(L, 2, "cc.PhysicsBody")) && (olua_is_object(L, 3, "cc.Vec2")) && (olua_is_object(L, 4, "cc.Vec2")) && (olua_is_number(L, 5)) && (olua_is_number(L, 6))) { // static cocos2d::PhysicsJointLimit *construct(cocos2d::PhysicsBody *a, cocos2d::PhysicsBody *b, const cocos2d::Vec2 &anchr1, const cocos2d::Vec2 &anchr2, float min, float max) - return _cocos2d_PhysicsJointLimit_construct$2(L); + return _olua_fun_cocos2d_PhysicsJointLimit_construct$2(L); // } } @@ -4154,7 +4360,7 @@ static int _cocos2d_PhysicsJointLimit_construct(lua_State *L) return 0; } -static int _cocos2d_PhysicsJointLimit_createConstraints(lua_State *L) +static int _olua_fun_cocos2d_PhysicsJointLimit_createConstraints(lua_State *L) { olua_startinvoke(L); @@ -4171,7 +4377,7 @@ static int _cocos2d_PhysicsJointLimit_createConstraints(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsJointLimit_getAnchr1(lua_State *L) +static int _olua_fun_cocos2d_PhysicsJointLimit_getAnchr1(lua_State *L) { olua_startinvoke(L); @@ -4181,14 +4387,14 @@ static int _cocos2d_PhysicsJointLimit_getAnchr1(lua_State *L) // cocos2d::Vec2 getAnchr1() cocos2d::Vec2 ret = self->getAnchr1(); - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec2"); + int num_ret = olua_copy_object(L, ret, "cc.Vec2"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_PhysicsJointLimit_getAnchr2(lua_State *L) +static int _olua_fun_cocos2d_PhysicsJointLimit_getAnchr2(lua_State *L) { olua_startinvoke(L); @@ -4198,14 +4404,14 @@ static int _cocos2d_PhysicsJointLimit_getAnchr2(lua_State *L) // cocos2d::Vec2 getAnchr2() cocos2d::Vec2 ret = self->getAnchr2(); - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec2"); + int num_ret = olua_copy_object(L, ret, "cc.Vec2"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_PhysicsJointLimit_getMax(lua_State *L) +static int _olua_fun_cocos2d_PhysicsJointLimit_getMax(lua_State *L) { olua_startinvoke(L); @@ -4222,7 +4428,7 @@ static int _cocos2d_PhysicsJointLimit_getMax(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsJointLimit_getMin(lua_State *L) +static int _olua_fun_cocos2d_PhysicsJointLimit_getMin(lua_State *L) { olua_startinvoke(L); @@ -4239,43 +4445,43 @@ static int _cocos2d_PhysicsJointLimit_getMin(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsJointLimit_setAnchr1(lua_State *L) +static int _olua_fun_cocos2d_PhysicsJointLimit_setAnchr1(lua_State *L) { olua_startinvoke(L); cocos2d::PhysicsJointLimit *self = nullptr; - cocos2d::Vec2 arg1; /** anchr1 */ + cocos2d::Vec2 *arg1; /** anchr1 */ olua_to_object(L, 1, &self, "cc.PhysicsJointLimit"); olua_check_object(L, 2, &arg1, "cc.Vec2"); // void setAnchr1(const cocos2d::Vec2 &anchr1) - self->setAnchr1(arg1); + self->setAnchr1(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_PhysicsJointLimit_setAnchr2(lua_State *L) +static int _olua_fun_cocos2d_PhysicsJointLimit_setAnchr2(lua_State *L) { olua_startinvoke(L); cocos2d::PhysicsJointLimit *self = nullptr; - cocos2d::Vec2 arg1; /** anchr2 */ + cocos2d::Vec2 *arg1; /** anchr2 */ olua_to_object(L, 1, &self, "cc.PhysicsJointLimit"); olua_check_object(L, 2, &arg1, "cc.Vec2"); // void setAnchr2(const cocos2d::Vec2 &anchr2) - self->setAnchr2(arg1); + self->setAnchr2(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_PhysicsJointLimit_setMax(lua_State *L) +static int _olua_fun_cocos2d_PhysicsJointLimit_setMax(lua_State *L) { olua_startinvoke(L); @@ -4293,7 +4499,7 @@ static int _cocos2d_PhysicsJointLimit_setMax(lua_State *L) return 0; } -static int _cocos2d_PhysicsJointLimit_setMin(lua_State *L) +static int _olua_fun_cocos2d_PhysicsJointLimit_setMin(lua_State *L) { olua_startinvoke(L); @@ -4311,32 +4517,41 @@ static int _cocos2d_PhysicsJointLimit_setMin(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_PhysicsJointLimit(lua_State *L) +static int _olua_cls_cc_PhysicsJointLimit(lua_State *L) { oluacls_class(L, "cc.PhysicsJointLimit"); - oluacls_func(L, "construct", _cocos2d_PhysicsJointLimit_construct); - oluacls_func(L, "createConstraints", _cocos2d_PhysicsJointLimit_createConstraints); - oluacls_func(L, "getAnchr1", _cocos2d_PhysicsJointLimit_getAnchr1); - oluacls_func(L, "getAnchr2", _cocos2d_PhysicsJointLimit_getAnchr2); - oluacls_func(L, "getMax", _cocos2d_PhysicsJointLimit_getMax); - oluacls_func(L, "getMin", _cocos2d_PhysicsJointLimit_getMin); - oluacls_func(L, "setAnchr1", _cocos2d_PhysicsJointLimit_setAnchr1); - oluacls_func(L, "setAnchr2", _cocos2d_PhysicsJointLimit_setAnchr2); - oluacls_func(L, "setMax", _cocos2d_PhysicsJointLimit_setMax); - oluacls_func(L, "setMin", _cocos2d_PhysicsJointLimit_setMin); - oluacls_prop(L, "anchr1", _cocos2d_PhysicsJointLimit_getAnchr1, _cocos2d_PhysicsJointLimit_setAnchr1); - oluacls_prop(L, "anchr2", _cocos2d_PhysicsJointLimit_getAnchr2, _cocos2d_PhysicsJointLimit_setAnchr2); - oluacls_prop(L, "max", _cocos2d_PhysicsJointLimit_getMax, _cocos2d_PhysicsJointLimit_setMax); - oluacls_prop(L, "min", _cocos2d_PhysicsJointLimit_getMin, _cocos2d_PhysicsJointLimit_setMin); + oluacls_func(L, "construct", _olua_fun_cocos2d_PhysicsJointLimit_construct); + oluacls_func(L, "createConstraints", _olua_fun_cocos2d_PhysicsJointLimit_createConstraints); + oluacls_func(L, "getAnchr1", _olua_fun_cocos2d_PhysicsJointLimit_getAnchr1); + oluacls_func(L, "getAnchr2", _olua_fun_cocos2d_PhysicsJointLimit_getAnchr2); + oluacls_func(L, "getMax", _olua_fun_cocos2d_PhysicsJointLimit_getMax); + oluacls_func(L, "getMin", _olua_fun_cocos2d_PhysicsJointLimit_getMin); + oluacls_func(L, "setAnchr1", _olua_fun_cocos2d_PhysicsJointLimit_setAnchr1); + oluacls_func(L, "setAnchr2", _olua_fun_cocos2d_PhysicsJointLimit_setAnchr2); + oluacls_func(L, "setMax", _olua_fun_cocos2d_PhysicsJointLimit_setMax); + oluacls_func(L, "setMin", _olua_fun_cocos2d_PhysicsJointLimit_setMin); + oluacls_prop(L, "anchr1", _olua_fun_cocos2d_PhysicsJointLimit_getAnchr1, _olua_fun_cocos2d_PhysicsJointLimit_setAnchr1); + oluacls_prop(L, "anchr2", _olua_fun_cocos2d_PhysicsJointLimit_getAnchr2, _olua_fun_cocos2d_PhysicsJointLimit_setAnchr2); + oluacls_prop(L, "max", _olua_fun_cocos2d_PhysicsJointLimit_getMax, _olua_fun_cocos2d_PhysicsJointLimit_setMax); + oluacls_prop(L, "min", _olua_fun_cocos2d_PhysicsJointLimit_getMin, _olua_fun_cocos2d_PhysicsJointLimit_setMin); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_PhysicsJointLimit(lua_State *L) +{ + olua_require(L, "cocos2d_physics", luaopen_cocos2d_physics); + if (!olua_getclass(L, "cc.PhysicsJointLimit")) { + luaL_error(L, "class not found: cocos2d::PhysicsJointLimit"); + } + return 1; +} OLUA_END_DECLS #endif #if CC_USE_PHYSICS -static int _cocos2d_PhysicsJointMotor_construct(lua_State *L) +static int _olua_fun_cocos2d_PhysicsJointMotor_construct(lua_State *L) { olua_startinvoke(L); @@ -4357,7 +4572,7 @@ static int _cocos2d_PhysicsJointMotor_construct(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsJointMotor_createConstraints(lua_State *L) +static int _olua_fun_cocos2d_PhysicsJointMotor_createConstraints(lua_State *L) { olua_startinvoke(L); @@ -4374,7 +4589,7 @@ static int _cocos2d_PhysicsJointMotor_createConstraints(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsJointMotor_getRate(lua_State *L) +static int _olua_fun_cocos2d_PhysicsJointMotor_getRate(lua_State *L) { olua_startinvoke(L); @@ -4391,7 +4606,7 @@ static int _cocos2d_PhysicsJointMotor_getRate(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsJointMotor_setRate(lua_State *L) +static int _olua_fun_cocos2d_PhysicsJointMotor_setRate(lua_State *L) { olua_startinvoke(L); @@ -4409,36 +4624,45 @@ static int _cocos2d_PhysicsJointMotor_setRate(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_PhysicsJointMotor(lua_State *L) +static int _olua_cls_cc_PhysicsJointMotor(lua_State *L) { oluacls_class(L, "cc.PhysicsJointMotor"); - oluacls_func(L, "construct", _cocos2d_PhysicsJointMotor_construct); - oluacls_func(L, "createConstraints", _cocos2d_PhysicsJointMotor_createConstraints); - oluacls_func(L, "getRate", _cocos2d_PhysicsJointMotor_getRate); - oluacls_func(L, "setRate", _cocos2d_PhysicsJointMotor_setRate); - oluacls_prop(L, "rate", _cocos2d_PhysicsJointMotor_getRate, _cocos2d_PhysicsJointMotor_setRate); + oluacls_func(L, "construct", _olua_fun_cocos2d_PhysicsJointMotor_construct); + oluacls_func(L, "createConstraints", _olua_fun_cocos2d_PhysicsJointMotor_createConstraints); + oluacls_func(L, "getRate", _olua_fun_cocos2d_PhysicsJointMotor_getRate); + oluacls_func(L, "setRate", _olua_fun_cocos2d_PhysicsJointMotor_setRate); + oluacls_prop(L, "rate", _olua_fun_cocos2d_PhysicsJointMotor_getRate, _olua_fun_cocos2d_PhysicsJointMotor_setRate); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_PhysicsJointMotor(lua_State *L) +{ + olua_require(L, "cocos2d_physics", luaopen_cocos2d_physics); + if (!olua_getclass(L, "cc.PhysicsJointMotor")) { + luaL_error(L, "class not found: cocos2d::PhysicsJointMotor"); + } + return 1; +} OLUA_END_DECLS #endif #if CC_USE_PHYSICS -static int _cocos2d_PhysicsJointPin_construct$1(lua_State *L) +static int _olua_fun_cocos2d_PhysicsJointPin_construct$1(lua_State *L) { olua_startinvoke(L); cocos2d::PhysicsBody *arg1 = nullptr; /** a */ cocos2d::PhysicsBody *arg2 = nullptr; /** b */ - cocos2d::Vec2 arg3; /** pivot */ + cocos2d::Vec2 *arg3; /** pivot */ olua_check_object(L, 1, &arg1, "cc.PhysicsBody"); olua_check_object(L, 2, &arg2, "cc.PhysicsBody"); olua_check_object(L, 3, &arg3, "cc.Vec2"); // static cocos2d::PhysicsJointPin *construct(cocos2d::PhysicsBody *a, cocos2d::PhysicsBody *b, const cocos2d::Vec2 &pivot) - cocos2d::PhysicsJointPin *ret = cocos2d::PhysicsJointPin::construct(arg1, arg2, arg3); + cocos2d::PhysicsJointPin *ret = cocos2d::PhysicsJointPin::construct(arg1, arg2, *arg3); int num_ret = olua_push_object(L, ret, "cc.PhysicsJointPin"); olua_endinvoke(L); @@ -4446,14 +4670,14 @@ static int _cocos2d_PhysicsJointPin_construct$1(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsJointPin_construct$2(lua_State *L) +static int _olua_fun_cocos2d_PhysicsJointPin_construct$2(lua_State *L) { olua_startinvoke(L); cocos2d::PhysicsBody *arg1 = nullptr; /** a */ cocos2d::PhysicsBody *arg2 = nullptr; /** b */ - cocos2d::Vec2 arg3; /** anchr1 */ - cocos2d::Vec2 arg4; /** anchr2 */ + cocos2d::Vec2 *arg3; /** anchr1 */ + cocos2d::Vec2 *arg4; /** anchr2 */ olua_check_object(L, 1, &arg1, "cc.PhysicsBody"); olua_check_object(L, 2, &arg2, "cc.PhysicsBody"); @@ -4461,7 +4685,7 @@ static int _cocos2d_PhysicsJointPin_construct$2(lua_State *L) olua_check_object(L, 4, &arg4, "cc.Vec2"); // static cocos2d::PhysicsJointPin *construct(cocos2d::PhysicsBody *a, cocos2d::PhysicsBody *b, const cocos2d::Vec2 &anchr1, const cocos2d::Vec2 &anchr2) - cocos2d::PhysicsJointPin *ret = cocos2d::PhysicsJointPin::construct(arg1, arg2, arg3, arg4); + cocos2d::PhysicsJointPin *ret = cocos2d::PhysicsJointPin::construct(arg1, arg2, *arg3, *arg4); int num_ret = olua_push_object(L, ret, "cc.PhysicsJointPin"); olua_endinvoke(L); @@ -4469,21 +4693,21 @@ static int _cocos2d_PhysicsJointPin_construct$2(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsJointPin_construct(lua_State *L) +static int _olua_fun_cocos2d_PhysicsJointPin_construct(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 3) { // if ((olua_is_object(L, 1, "cc.PhysicsBody")) && (olua_is_object(L, 2, "cc.PhysicsBody")) && (olua_is_object(L, 3, "cc.Vec2"))) { // static cocos2d::PhysicsJointPin *construct(cocos2d::PhysicsBody *a, cocos2d::PhysicsBody *b, const cocos2d::Vec2 &pivot) - return _cocos2d_PhysicsJointPin_construct$1(L); + return _olua_fun_cocos2d_PhysicsJointPin_construct$1(L); // } } if (num_args == 4) { // if ((olua_is_object(L, 1, "cc.PhysicsBody")) && (olua_is_object(L, 2, "cc.PhysicsBody")) && (olua_is_object(L, 3, "cc.Vec2")) && (olua_is_object(L, 4, "cc.Vec2"))) { // static cocos2d::PhysicsJointPin *construct(cocos2d::PhysicsBody *a, cocos2d::PhysicsBody *b, const cocos2d::Vec2 &anchr1, const cocos2d::Vec2 &anchr2) - return _cocos2d_PhysicsJointPin_construct$2(L); + return _olua_fun_cocos2d_PhysicsJointPin_construct$2(L); // } } @@ -4492,7 +4716,7 @@ static int _cocos2d_PhysicsJointPin_construct(lua_State *L) return 0; } -static int _cocos2d_PhysicsJointPin_createConstraints(lua_State *L) +static int _olua_fun_cocos2d_PhysicsJointPin_createConstraints(lua_State *L) { olua_startinvoke(L); @@ -4509,20 +4733,29 @@ static int _cocos2d_PhysicsJointPin_createConstraints(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_PhysicsJointPin(lua_State *L) +static int _olua_cls_cc_PhysicsJointPin(lua_State *L) { oluacls_class(L, "cc.PhysicsJointPin"); - oluacls_func(L, "construct", _cocos2d_PhysicsJointPin_construct); - oluacls_func(L, "createConstraints", _cocos2d_PhysicsJointPin_createConstraints); + oluacls_func(L, "construct", _olua_fun_cocos2d_PhysicsJointPin_construct); + oluacls_func(L, "createConstraints", _olua_fun_cocos2d_PhysicsJointPin_createConstraints); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_PhysicsJointPin(lua_State *L) +{ + olua_require(L, "cocos2d_physics", luaopen_cocos2d_physics); + if (!olua_getclass(L, "cc.PhysicsJointPin")) { + luaL_error(L, "class not found: cocos2d::PhysicsJointPin"); + } + return 1; +} OLUA_END_DECLS #endif #if CC_USE_PHYSICS -static int _cocos2d_PhysicsJointRatchet_construct(lua_State *L) +static int _olua_fun_cocos2d_PhysicsJointRatchet_construct(lua_State *L) { olua_startinvoke(L); @@ -4545,7 +4778,7 @@ static int _cocos2d_PhysicsJointRatchet_construct(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsJointRatchet_createConstraints(lua_State *L) +static int _olua_fun_cocos2d_PhysicsJointRatchet_createConstraints(lua_State *L) { olua_startinvoke(L); @@ -4562,7 +4795,7 @@ static int _cocos2d_PhysicsJointRatchet_createConstraints(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsJointRatchet_getAngle(lua_State *L) +static int _olua_fun_cocos2d_PhysicsJointRatchet_getAngle(lua_State *L) { olua_startinvoke(L); @@ -4579,7 +4812,7 @@ static int _cocos2d_PhysicsJointRatchet_getAngle(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsJointRatchet_getPhase(lua_State *L) +static int _olua_fun_cocos2d_PhysicsJointRatchet_getPhase(lua_State *L) { olua_startinvoke(L); @@ -4596,7 +4829,7 @@ static int _cocos2d_PhysicsJointRatchet_getPhase(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsJointRatchet_getRatchet(lua_State *L) +static int _olua_fun_cocos2d_PhysicsJointRatchet_getRatchet(lua_State *L) { olua_startinvoke(L); @@ -4613,7 +4846,7 @@ static int _cocos2d_PhysicsJointRatchet_getRatchet(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsJointRatchet_setAngle(lua_State *L) +static int _olua_fun_cocos2d_PhysicsJointRatchet_setAngle(lua_State *L) { olua_startinvoke(L); @@ -4631,7 +4864,7 @@ static int _cocos2d_PhysicsJointRatchet_setAngle(lua_State *L) return 0; } -static int _cocos2d_PhysicsJointRatchet_setPhase(lua_State *L) +static int _olua_fun_cocos2d_PhysicsJointRatchet_setPhase(lua_State *L) { olua_startinvoke(L); @@ -4649,7 +4882,7 @@ static int _cocos2d_PhysicsJointRatchet_setPhase(lua_State *L) return 0; } -static int _cocos2d_PhysicsJointRatchet_setRatchet(lua_State *L) +static int _olua_fun_cocos2d_PhysicsJointRatchet_setRatchet(lua_State *L) { olua_startinvoke(L); @@ -4667,29 +4900,38 @@ static int _cocos2d_PhysicsJointRatchet_setRatchet(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_PhysicsJointRatchet(lua_State *L) +static int _olua_cls_cc_PhysicsJointRatchet(lua_State *L) { oluacls_class(L, "cc.PhysicsJointRatchet"); - oluacls_func(L, "construct", _cocos2d_PhysicsJointRatchet_construct); - oluacls_func(L, "createConstraints", _cocos2d_PhysicsJointRatchet_createConstraints); - oluacls_func(L, "getAngle", _cocos2d_PhysicsJointRatchet_getAngle); - oluacls_func(L, "getPhase", _cocos2d_PhysicsJointRatchet_getPhase); - oluacls_func(L, "getRatchet", _cocos2d_PhysicsJointRatchet_getRatchet); - oluacls_func(L, "setAngle", _cocos2d_PhysicsJointRatchet_setAngle); - oluacls_func(L, "setPhase", _cocos2d_PhysicsJointRatchet_setPhase); - oluacls_func(L, "setRatchet", _cocos2d_PhysicsJointRatchet_setRatchet); - oluacls_prop(L, "angle", _cocos2d_PhysicsJointRatchet_getAngle, _cocos2d_PhysicsJointRatchet_setAngle); - oluacls_prop(L, "phase", _cocos2d_PhysicsJointRatchet_getPhase, _cocos2d_PhysicsJointRatchet_setPhase); - oluacls_prop(L, "ratchet", _cocos2d_PhysicsJointRatchet_getRatchet, _cocos2d_PhysicsJointRatchet_setRatchet); + oluacls_func(L, "construct", _olua_fun_cocos2d_PhysicsJointRatchet_construct); + oluacls_func(L, "createConstraints", _olua_fun_cocos2d_PhysicsJointRatchet_createConstraints); + oluacls_func(L, "getAngle", _olua_fun_cocos2d_PhysicsJointRatchet_getAngle); + oluacls_func(L, "getPhase", _olua_fun_cocos2d_PhysicsJointRatchet_getPhase); + oluacls_func(L, "getRatchet", _olua_fun_cocos2d_PhysicsJointRatchet_getRatchet); + oluacls_func(L, "setAngle", _olua_fun_cocos2d_PhysicsJointRatchet_setAngle); + oluacls_func(L, "setPhase", _olua_fun_cocos2d_PhysicsJointRatchet_setPhase); + oluacls_func(L, "setRatchet", _olua_fun_cocos2d_PhysicsJointRatchet_setRatchet); + oluacls_prop(L, "angle", _olua_fun_cocos2d_PhysicsJointRatchet_getAngle, _olua_fun_cocos2d_PhysicsJointRatchet_setAngle); + oluacls_prop(L, "phase", _olua_fun_cocos2d_PhysicsJointRatchet_getPhase, _olua_fun_cocos2d_PhysicsJointRatchet_setPhase); + oluacls_prop(L, "ratchet", _olua_fun_cocos2d_PhysicsJointRatchet_getRatchet, _olua_fun_cocos2d_PhysicsJointRatchet_setRatchet); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_PhysicsJointRatchet(lua_State *L) +{ + olua_require(L, "cocos2d_physics", luaopen_cocos2d_physics); + if (!olua_getclass(L, "cc.PhysicsJointRatchet")) { + luaL_error(L, "class not found: cocos2d::PhysicsJointRatchet"); + } + return 1; +} OLUA_END_DECLS #endif #if CC_USE_PHYSICS -static int _cocos2d_PhysicsJointRotaryLimit_construct$1(lua_State *L) +static int _olua_fun_cocos2d_PhysicsJointRotaryLimit_construct$1(lua_State *L) { olua_startinvoke(L); @@ -4712,7 +4954,7 @@ static int _cocos2d_PhysicsJointRotaryLimit_construct$1(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsJointRotaryLimit_construct$2(lua_State *L) +static int _olua_fun_cocos2d_PhysicsJointRotaryLimit_construct$2(lua_State *L) { olua_startinvoke(L); @@ -4731,21 +4973,21 @@ static int _cocos2d_PhysicsJointRotaryLimit_construct$2(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsJointRotaryLimit_construct(lua_State *L) +static int _olua_fun_cocos2d_PhysicsJointRotaryLimit_construct(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 2) { // if ((olua_is_object(L, 1, "cc.PhysicsBody")) && (olua_is_object(L, 2, "cc.PhysicsBody"))) { // static cocos2d::PhysicsJointRotaryLimit *construct(cocos2d::PhysicsBody *a, cocos2d::PhysicsBody *b) - return _cocos2d_PhysicsJointRotaryLimit_construct$2(L); + return _olua_fun_cocos2d_PhysicsJointRotaryLimit_construct$2(L); // } } if (num_args == 4) { // if ((olua_is_object(L, 1, "cc.PhysicsBody")) && (olua_is_object(L, 2, "cc.PhysicsBody")) && (olua_is_number(L, 3)) && (olua_is_number(L, 4))) { // static cocos2d::PhysicsJointRotaryLimit *construct(cocos2d::PhysicsBody *a, cocos2d::PhysicsBody *b, float min, float max) - return _cocos2d_PhysicsJointRotaryLimit_construct$1(L); + return _olua_fun_cocos2d_PhysicsJointRotaryLimit_construct$1(L); // } } @@ -4754,7 +4996,7 @@ static int _cocos2d_PhysicsJointRotaryLimit_construct(lua_State *L) return 0; } -static int _cocos2d_PhysicsJointRotaryLimit_createConstraints(lua_State *L) +static int _olua_fun_cocos2d_PhysicsJointRotaryLimit_createConstraints(lua_State *L) { olua_startinvoke(L); @@ -4771,7 +5013,7 @@ static int _cocos2d_PhysicsJointRotaryLimit_createConstraints(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsJointRotaryLimit_getMax(lua_State *L) +static int _olua_fun_cocos2d_PhysicsJointRotaryLimit_getMax(lua_State *L) { olua_startinvoke(L); @@ -4788,7 +5030,7 @@ static int _cocos2d_PhysicsJointRotaryLimit_getMax(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsJointRotaryLimit_getMin(lua_State *L) +static int _olua_fun_cocos2d_PhysicsJointRotaryLimit_getMin(lua_State *L) { olua_startinvoke(L); @@ -4805,7 +5047,7 @@ static int _cocos2d_PhysicsJointRotaryLimit_getMin(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsJointRotaryLimit_setMax(lua_State *L) +static int _olua_fun_cocos2d_PhysicsJointRotaryLimit_setMax(lua_State *L) { olua_startinvoke(L); @@ -4823,7 +5065,7 @@ static int _cocos2d_PhysicsJointRotaryLimit_setMax(lua_State *L) return 0; } -static int _cocos2d_PhysicsJointRotaryLimit_setMin(lua_State *L) +static int _olua_fun_cocos2d_PhysicsJointRotaryLimit_setMin(lua_State *L) { olua_startinvoke(L); @@ -4841,26 +5083,35 @@ static int _cocos2d_PhysicsJointRotaryLimit_setMin(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_PhysicsJointRotaryLimit(lua_State *L) +static int _olua_cls_cc_PhysicsJointRotaryLimit(lua_State *L) { oluacls_class(L, "cc.PhysicsJointRotaryLimit"); - oluacls_func(L, "construct", _cocos2d_PhysicsJointRotaryLimit_construct); - oluacls_func(L, "createConstraints", _cocos2d_PhysicsJointRotaryLimit_createConstraints); - oluacls_func(L, "getMax", _cocos2d_PhysicsJointRotaryLimit_getMax); - oluacls_func(L, "getMin", _cocos2d_PhysicsJointRotaryLimit_getMin); - oluacls_func(L, "setMax", _cocos2d_PhysicsJointRotaryLimit_setMax); - oluacls_func(L, "setMin", _cocos2d_PhysicsJointRotaryLimit_setMin); - oluacls_prop(L, "max", _cocos2d_PhysicsJointRotaryLimit_getMax, _cocos2d_PhysicsJointRotaryLimit_setMax); - oluacls_prop(L, "min", _cocos2d_PhysicsJointRotaryLimit_getMin, _cocos2d_PhysicsJointRotaryLimit_setMin); + oluacls_func(L, "construct", _olua_fun_cocos2d_PhysicsJointRotaryLimit_construct); + oluacls_func(L, "createConstraints", _olua_fun_cocos2d_PhysicsJointRotaryLimit_createConstraints); + oluacls_func(L, "getMax", _olua_fun_cocos2d_PhysicsJointRotaryLimit_getMax); + oluacls_func(L, "getMin", _olua_fun_cocos2d_PhysicsJointRotaryLimit_getMin); + oluacls_func(L, "setMax", _olua_fun_cocos2d_PhysicsJointRotaryLimit_setMax); + oluacls_func(L, "setMin", _olua_fun_cocos2d_PhysicsJointRotaryLimit_setMin); + oluacls_prop(L, "max", _olua_fun_cocos2d_PhysicsJointRotaryLimit_getMax, _olua_fun_cocos2d_PhysicsJointRotaryLimit_setMax); + oluacls_prop(L, "min", _olua_fun_cocos2d_PhysicsJointRotaryLimit_getMin, _olua_fun_cocos2d_PhysicsJointRotaryLimit_setMin); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_PhysicsJointRotaryLimit(lua_State *L) +{ + olua_require(L, "cocos2d_physics", luaopen_cocos2d_physics); + if (!olua_getclass(L, "cc.PhysicsJointRotaryLimit")) { + luaL_error(L, "class not found: cocos2d::PhysicsJointRotaryLimit"); + } + return 1; +} OLUA_END_DECLS #endif #if CC_USE_PHYSICS -static int _cocos2d_PhysicsJointRotarySpring_construct(lua_State *L) +static int _olua_fun_cocos2d_PhysicsJointRotarySpring_construct(lua_State *L) { olua_startinvoke(L); @@ -4883,7 +5134,7 @@ static int _cocos2d_PhysicsJointRotarySpring_construct(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsJointRotarySpring_createConstraints(lua_State *L) +static int _olua_fun_cocos2d_PhysicsJointRotarySpring_createConstraints(lua_State *L) { olua_startinvoke(L); @@ -4900,7 +5151,7 @@ static int _cocos2d_PhysicsJointRotarySpring_createConstraints(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsJointRotarySpring_getDamping(lua_State *L) +static int _olua_fun_cocos2d_PhysicsJointRotarySpring_getDamping(lua_State *L) { olua_startinvoke(L); @@ -4917,7 +5168,7 @@ static int _cocos2d_PhysicsJointRotarySpring_getDamping(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsJointRotarySpring_getRestAngle(lua_State *L) +static int _olua_fun_cocos2d_PhysicsJointRotarySpring_getRestAngle(lua_State *L) { olua_startinvoke(L); @@ -4934,7 +5185,7 @@ static int _cocos2d_PhysicsJointRotarySpring_getRestAngle(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsJointRotarySpring_getStiffness(lua_State *L) +static int _olua_fun_cocos2d_PhysicsJointRotarySpring_getStiffness(lua_State *L) { olua_startinvoke(L); @@ -4951,7 +5202,7 @@ static int _cocos2d_PhysicsJointRotarySpring_getStiffness(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsJointRotarySpring_setDamping(lua_State *L) +static int _olua_fun_cocos2d_PhysicsJointRotarySpring_setDamping(lua_State *L) { olua_startinvoke(L); @@ -4969,7 +5220,7 @@ static int _cocos2d_PhysicsJointRotarySpring_setDamping(lua_State *L) return 0; } -static int _cocos2d_PhysicsJointRotarySpring_setRestAngle(lua_State *L) +static int _olua_fun_cocos2d_PhysicsJointRotarySpring_setRestAngle(lua_State *L) { olua_startinvoke(L); @@ -4987,7 +5238,7 @@ static int _cocos2d_PhysicsJointRotarySpring_setRestAngle(lua_State *L) return 0; } -static int _cocos2d_PhysicsJointRotarySpring_setStiffness(lua_State *L) +static int _olua_fun_cocos2d_PhysicsJointRotarySpring_setStiffness(lua_State *L) { olua_startinvoke(L); @@ -5002,39 +5253,48 @@ static int _cocos2d_PhysicsJointRotarySpring_setStiffness(lua_State *L) olua_endinvoke(L); - return 0; + return 0; +} + +static int _olua_cls_cc_PhysicsJointRotarySpring(lua_State *L) +{ + oluacls_class(L, "cc.PhysicsJointRotarySpring"); + oluacls_func(L, "construct", _olua_fun_cocos2d_PhysicsJointRotarySpring_construct); + oluacls_func(L, "createConstraints", _olua_fun_cocos2d_PhysicsJointRotarySpring_createConstraints); + oluacls_func(L, "getDamping", _olua_fun_cocos2d_PhysicsJointRotarySpring_getDamping); + oluacls_func(L, "getRestAngle", _olua_fun_cocos2d_PhysicsJointRotarySpring_getRestAngle); + oluacls_func(L, "getStiffness", _olua_fun_cocos2d_PhysicsJointRotarySpring_getStiffness); + oluacls_func(L, "setDamping", _olua_fun_cocos2d_PhysicsJointRotarySpring_setDamping); + oluacls_func(L, "setRestAngle", _olua_fun_cocos2d_PhysicsJointRotarySpring_setRestAngle); + oluacls_func(L, "setStiffness", _olua_fun_cocos2d_PhysicsJointRotarySpring_setStiffness); + oluacls_prop(L, "damping", _olua_fun_cocos2d_PhysicsJointRotarySpring_getDamping, _olua_fun_cocos2d_PhysicsJointRotarySpring_setDamping); + oluacls_prop(L, "restAngle", _olua_fun_cocos2d_PhysicsJointRotarySpring_getRestAngle, _olua_fun_cocos2d_PhysicsJointRotarySpring_setRestAngle); + oluacls_prop(L, "stiffness", _olua_fun_cocos2d_PhysicsJointRotarySpring_getStiffness, _olua_fun_cocos2d_PhysicsJointRotarySpring_setStiffness); + + return 1; } OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_PhysicsJointRotarySpring(lua_State *L) +OLUA_LIB int luaopen_cc_PhysicsJointRotarySpring(lua_State *L) { - oluacls_class(L, "cc.PhysicsJointRotarySpring"); - oluacls_func(L, "construct", _cocos2d_PhysicsJointRotarySpring_construct); - oluacls_func(L, "createConstraints", _cocos2d_PhysicsJointRotarySpring_createConstraints); - oluacls_func(L, "getDamping", _cocos2d_PhysicsJointRotarySpring_getDamping); - oluacls_func(L, "getRestAngle", _cocos2d_PhysicsJointRotarySpring_getRestAngle); - oluacls_func(L, "getStiffness", _cocos2d_PhysicsJointRotarySpring_getStiffness); - oluacls_func(L, "setDamping", _cocos2d_PhysicsJointRotarySpring_setDamping); - oluacls_func(L, "setRestAngle", _cocos2d_PhysicsJointRotarySpring_setRestAngle); - oluacls_func(L, "setStiffness", _cocos2d_PhysicsJointRotarySpring_setStiffness); - oluacls_prop(L, "damping", _cocos2d_PhysicsJointRotarySpring_getDamping, _cocos2d_PhysicsJointRotarySpring_setDamping); - oluacls_prop(L, "restAngle", _cocos2d_PhysicsJointRotarySpring_getRestAngle, _cocos2d_PhysicsJointRotarySpring_setRestAngle); - oluacls_prop(L, "stiffness", _cocos2d_PhysicsJointRotarySpring_getStiffness, _cocos2d_PhysicsJointRotarySpring_setStiffness); - + olua_require(L, "cocos2d_physics", luaopen_cocos2d_physics); + if (!olua_getclass(L, "cc.PhysicsJointRotarySpring")) { + luaL_error(L, "class not found: cocos2d::PhysicsJointRotarySpring"); + } return 1; } OLUA_END_DECLS #endif #if CC_USE_PHYSICS -static int _cocos2d_PhysicsJointSpring_construct(lua_State *L) +static int _olua_fun_cocos2d_PhysicsJointSpring_construct(lua_State *L) { olua_startinvoke(L); cocos2d::PhysicsBody *arg1 = nullptr; /** a */ cocos2d::PhysicsBody *arg2 = nullptr; /** b */ - cocos2d::Vec2 arg3; /** anchr1 */ - cocos2d::Vec2 arg4; /** anchr2 */ + cocos2d::Vec2 *arg3; /** anchr1 */ + cocos2d::Vec2 *arg4; /** anchr2 */ float arg5 = 0; /** stiffness */ float arg6 = 0; /** damping */ @@ -5046,7 +5306,7 @@ static int _cocos2d_PhysicsJointSpring_construct(lua_State *L) olua_check_number(L, 6, &arg6); // static cocos2d::PhysicsJointSpring *construct(cocos2d::PhysicsBody *a, cocos2d::PhysicsBody *b, const cocos2d::Vec2 &anchr1, const cocos2d::Vec2 &anchr2, float stiffness, float damping) - cocos2d::PhysicsJointSpring *ret = cocos2d::PhysicsJointSpring::construct(arg1, arg2, arg3, arg4, arg5, arg6); + cocos2d::PhysicsJointSpring *ret = cocos2d::PhysicsJointSpring::construct(arg1, arg2, *arg3, *arg4, arg5, arg6); int num_ret = olua_push_object(L, ret, "cc.PhysicsJointSpring"); olua_endinvoke(L); @@ -5054,7 +5314,7 @@ static int _cocos2d_PhysicsJointSpring_construct(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsJointSpring_createConstraints(lua_State *L) +static int _olua_fun_cocos2d_PhysicsJointSpring_createConstraints(lua_State *L) { olua_startinvoke(L); @@ -5071,7 +5331,7 @@ static int _cocos2d_PhysicsJointSpring_createConstraints(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsJointSpring_getAnchr1(lua_State *L) +static int _olua_fun_cocos2d_PhysicsJointSpring_getAnchr1(lua_State *L) { olua_startinvoke(L); @@ -5081,14 +5341,14 @@ static int _cocos2d_PhysicsJointSpring_getAnchr1(lua_State *L) // cocos2d::Vec2 getAnchr1() cocos2d::Vec2 ret = self->getAnchr1(); - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec2"); + int num_ret = olua_copy_object(L, ret, "cc.Vec2"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_PhysicsJointSpring_getAnchr2(lua_State *L) +static int _olua_fun_cocos2d_PhysicsJointSpring_getAnchr2(lua_State *L) { olua_startinvoke(L); @@ -5098,14 +5358,14 @@ static int _cocos2d_PhysicsJointSpring_getAnchr2(lua_State *L) // cocos2d::Vec2 getAnchr2() cocos2d::Vec2 ret = self->getAnchr2(); - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec2"); + int num_ret = olua_copy_object(L, ret, "cc.Vec2"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_PhysicsJointSpring_getDamping(lua_State *L) +static int _olua_fun_cocos2d_PhysicsJointSpring_getDamping(lua_State *L) { olua_startinvoke(L); @@ -5122,7 +5382,7 @@ static int _cocos2d_PhysicsJointSpring_getDamping(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsJointSpring_getRestLength(lua_State *L) +static int _olua_fun_cocos2d_PhysicsJointSpring_getRestLength(lua_State *L) { olua_startinvoke(L); @@ -5139,7 +5399,7 @@ static int _cocos2d_PhysicsJointSpring_getRestLength(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsJointSpring_getStiffness(lua_State *L) +static int _olua_fun_cocos2d_PhysicsJointSpring_getStiffness(lua_State *L) { olua_startinvoke(L); @@ -5156,43 +5416,43 @@ static int _cocos2d_PhysicsJointSpring_getStiffness(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsJointSpring_setAnchr1(lua_State *L) +static int _olua_fun_cocos2d_PhysicsJointSpring_setAnchr1(lua_State *L) { olua_startinvoke(L); cocos2d::PhysicsJointSpring *self = nullptr; - cocos2d::Vec2 arg1; /** anchr1 */ + cocos2d::Vec2 *arg1; /** anchr1 */ olua_to_object(L, 1, &self, "cc.PhysicsJointSpring"); olua_check_object(L, 2, &arg1, "cc.Vec2"); // void setAnchr1(const cocos2d::Vec2 &anchr1) - self->setAnchr1(arg1); + self->setAnchr1(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_PhysicsJointSpring_setAnchr2(lua_State *L) +static int _olua_fun_cocos2d_PhysicsJointSpring_setAnchr2(lua_State *L) { olua_startinvoke(L); cocos2d::PhysicsJointSpring *self = nullptr; - cocos2d::Vec2 arg1; /** anchr2 */ + cocos2d::Vec2 *arg1; /** anchr2 */ olua_to_object(L, 1, &self, "cc.PhysicsJointSpring"); olua_check_object(L, 2, &arg1, "cc.Vec2"); // void setAnchr2(const cocos2d::Vec2 &anchr2) - self->setAnchr2(arg1); + self->setAnchr2(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_PhysicsJointSpring_setDamping(lua_State *L) +static int _olua_fun_cocos2d_PhysicsJointSpring_setDamping(lua_State *L) { olua_startinvoke(L); @@ -5210,7 +5470,7 @@ static int _cocos2d_PhysicsJointSpring_setDamping(lua_State *L) return 0; } -static int _cocos2d_PhysicsJointSpring_setRestLength(lua_State *L) +static int _olua_fun_cocos2d_PhysicsJointSpring_setRestLength(lua_State *L) { olua_startinvoke(L); @@ -5228,7 +5488,7 @@ static int _cocos2d_PhysicsJointSpring_setRestLength(lua_State *L) return 0; } -static int _cocos2d_PhysicsJointSpring_setStiffness(lua_State *L) +static int _olua_fun_cocos2d_PhysicsJointSpring_setStiffness(lua_State *L) { olua_startinvoke(L); @@ -5246,36 +5506,44 @@ static int _cocos2d_PhysicsJointSpring_setStiffness(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_PhysicsJointSpring(lua_State *L) +static int _olua_cls_cc_PhysicsJointSpring(lua_State *L) { oluacls_class(L, "cc.PhysicsJointSpring"); - oluacls_func(L, "construct", _cocos2d_PhysicsJointSpring_construct); - oluacls_func(L, "createConstraints", _cocos2d_PhysicsJointSpring_createConstraints); - oluacls_func(L, "getAnchr1", _cocos2d_PhysicsJointSpring_getAnchr1); - oluacls_func(L, "getAnchr2", _cocos2d_PhysicsJointSpring_getAnchr2); - oluacls_func(L, "getDamping", _cocos2d_PhysicsJointSpring_getDamping); - oluacls_func(L, "getRestLength", _cocos2d_PhysicsJointSpring_getRestLength); - oluacls_func(L, "getStiffness", _cocos2d_PhysicsJointSpring_getStiffness); - oluacls_func(L, "setAnchr1", _cocos2d_PhysicsJointSpring_setAnchr1); - oluacls_func(L, "setAnchr2", _cocos2d_PhysicsJointSpring_setAnchr2); - oluacls_func(L, "setDamping", _cocos2d_PhysicsJointSpring_setDamping); - oluacls_func(L, "setRestLength", _cocos2d_PhysicsJointSpring_setRestLength); - oluacls_func(L, "setStiffness", _cocos2d_PhysicsJointSpring_setStiffness); - oluacls_prop(L, "anchr1", _cocos2d_PhysicsJointSpring_getAnchr1, _cocos2d_PhysicsJointSpring_setAnchr1); - oluacls_prop(L, "anchr2", _cocos2d_PhysicsJointSpring_getAnchr2, _cocos2d_PhysicsJointSpring_setAnchr2); - oluacls_prop(L, "damping", _cocos2d_PhysicsJointSpring_getDamping, _cocos2d_PhysicsJointSpring_setDamping); - oluacls_prop(L, "restLength", _cocos2d_PhysicsJointSpring_getRestLength, _cocos2d_PhysicsJointSpring_setRestLength); - oluacls_prop(L, "stiffness", _cocos2d_PhysicsJointSpring_getStiffness, _cocos2d_PhysicsJointSpring_setStiffness); + oluacls_func(L, "construct", _olua_fun_cocos2d_PhysicsJointSpring_construct); + oluacls_func(L, "createConstraints", _olua_fun_cocos2d_PhysicsJointSpring_createConstraints); + oluacls_func(L, "getAnchr1", _olua_fun_cocos2d_PhysicsJointSpring_getAnchr1); + oluacls_func(L, "getAnchr2", _olua_fun_cocos2d_PhysicsJointSpring_getAnchr2); + oluacls_func(L, "getDamping", _olua_fun_cocos2d_PhysicsJointSpring_getDamping); + oluacls_func(L, "getRestLength", _olua_fun_cocos2d_PhysicsJointSpring_getRestLength); + oluacls_func(L, "getStiffness", _olua_fun_cocos2d_PhysicsJointSpring_getStiffness); + oluacls_func(L, "setAnchr1", _olua_fun_cocos2d_PhysicsJointSpring_setAnchr1); + oluacls_func(L, "setAnchr2", _olua_fun_cocos2d_PhysicsJointSpring_setAnchr2); + oluacls_func(L, "setDamping", _olua_fun_cocos2d_PhysicsJointSpring_setDamping); + oluacls_func(L, "setRestLength", _olua_fun_cocos2d_PhysicsJointSpring_setRestLength); + oluacls_func(L, "setStiffness", _olua_fun_cocos2d_PhysicsJointSpring_setStiffness); + oluacls_prop(L, "anchr1", _olua_fun_cocos2d_PhysicsJointSpring_getAnchr1, _olua_fun_cocos2d_PhysicsJointSpring_setAnchr1); + oluacls_prop(L, "anchr2", _olua_fun_cocos2d_PhysicsJointSpring_getAnchr2, _olua_fun_cocos2d_PhysicsJointSpring_setAnchr2); + oluacls_prop(L, "damping", _olua_fun_cocos2d_PhysicsJointSpring_getDamping, _olua_fun_cocos2d_PhysicsJointSpring_setDamping); + oluacls_prop(L, "restLength", _olua_fun_cocos2d_PhysicsJointSpring_getRestLength, _olua_fun_cocos2d_PhysicsJointSpring_setRestLength); + oluacls_prop(L, "stiffness", _olua_fun_cocos2d_PhysicsJointSpring_getStiffness, _olua_fun_cocos2d_PhysicsJointSpring_setStiffness); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_PhysicsJointSpring(lua_State *L) +{ + olua_require(L, "cocos2d_physics", luaopen_cocos2d_physics); + if (!olua_getclass(L, "cc.PhysicsJointSpring")) { + luaL_error(L, "class not found: cocos2d::PhysicsJointSpring"); + } return 1; } OLUA_END_DECLS #endif #if CC_USE_PHYSICS -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_PhysicsShape_Type(lua_State *L) +static int _olua_cls_cc_PhysicsShape_Type(lua_State *L) { oluacls_class(L, "cc.PhysicsShape.Type"); oluacls_func(L, "__index", olua_indexerror); @@ -5293,11 +5561,21 @@ OLUA_LIB int luaopen_cocos2d_PhysicsShape_Type(lua_State *L) return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_PhysicsShape_Type(lua_State *L) +{ + olua_require(L, "cocos2d_physics", luaopen_cocos2d_physics); + if (!olua_getclass(L, "cc.PhysicsShape.Type")) { + luaL_error(L, "class not found: cocos2d::PhysicsShape::Type"); + } + return 1; +} OLUA_END_DECLS #endif #if CC_USE_PHYSICS -static int _cocos2d_PhysicsShape_calculateDefaultMoment(lua_State *L) +static int _olua_fun_cocos2d_PhysicsShape_calculateDefaultMoment(lua_State *L) { olua_startinvoke(L); @@ -5314,18 +5592,18 @@ static int _cocos2d_PhysicsShape_calculateDefaultMoment(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsShape_containsPoint(lua_State *L) +static int _olua_fun_cocos2d_PhysicsShape_containsPoint(lua_State *L) { olua_startinvoke(L); cocos2d::PhysicsShape *self = nullptr; - cocos2d::Vec2 arg1; /** point */ + cocos2d::Vec2 *arg1; /** point */ olua_to_object(L, 1, &self, "cc.PhysicsShape"); olua_check_object(L, 2, &arg1, "cc.Vec2"); // bool containsPoint(const cocos2d::Vec2 &point) - bool ret = self->containsPoint(arg1); + bool ret = self->containsPoint(*arg1); int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); @@ -5333,7 +5611,7 @@ static int _cocos2d_PhysicsShape_containsPoint(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsShape_getArea(lua_State *L) +static int _olua_fun_cocos2d_PhysicsShape_getArea(lua_State *L) { olua_startinvoke(L); @@ -5350,7 +5628,7 @@ static int _cocos2d_PhysicsShape_getArea(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsShape_getBody(lua_State *L) +static int _olua_fun_cocos2d_PhysicsShape_getBody(lua_State *L) { olua_startinvoke(L); @@ -5367,7 +5645,7 @@ static int _cocos2d_PhysicsShape_getBody(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsShape_getCategoryBitmask(lua_State *L) +static int _olua_fun_cocos2d_PhysicsShape_getCategoryBitmask(lua_State *L) { olua_startinvoke(L); @@ -5384,7 +5662,7 @@ static int _cocos2d_PhysicsShape_getCategoryBitmask(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsShape_getCenter(lua_State *L) +static int _olua_fun_cocos2d_PhysicsShape_getCenter(lua_State *L) { olua_startinvoke(L); @@ -5394,14 +5672,14 @@ static int _cocos2d_PhysicsShape_getCenter(lua_State *L) // cocos2d::Vec2 getCenter() cocos2d::Vec2 ret = self->getCenter(); - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec2"); + int num_ret = olua_copy_object(L, ret, "cc.Vec2"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_PhysicsShape_getCollisionBitmask(lua_State *L) +static int _olua_fun_cocos2d_PhysicsShape_getCollisionBitmask(lua_State *L) { olua_startinvoke(L); @@ -5418,7 +5696,7 @@ static int _cocos2d_PhysicsShape_getCollisionBitmask(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsShape_getContactTestBitmask(lua_State *L) +static int _olua_fun_cocos2d_PhysicsShape_getContactTestBitmask(lua_State *L) { olua_startinvoke(L); @@ -5435,7 +5713,7 @@ static int _cocos2d_PhysicsShape_getContactTestBitmask(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsShape_getDensity(lua_State *L) +static int _olua_fun_cocos2d_PhysicsShape_getDensity(lua_State *L) { olua_startinvoke(L); @@ -5452,7 +5730,7 @@ static int _cocos2d_PhysicsShape_getDensity(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsShape_getFriction(lua_State *L) +static int _olua_fun_cocos2d_PhysicsShape_getFriction(lua_State *L) { olua_startinvoke(L); @@ -5469,7 +5747,7 @@ static int _cocos2d_PhysicsShape_getFriction(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsShape_getGroup(lua_State *L) +static int _olua_fun_cocos2d_PhysicsShape_getGroup(lua_State *L) { olua_startinvoke(L); @@ -5486,7 +5764,7 @@ static int _cocos2d_PhysicsShape_getGroup(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsShape_getMass(lua_State *L) +static int _olua_fun_cocos2d_PhysicsShape_getMass(lua_State *L) { olua_startinvoke(L); @@ -5503,7 +5781,7 @@ static int _cocos2d_PhysicsShape_getMass(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsShape_getMaterial(lua_State *L) +static int _olua_fun_cocos2d_PhysicsShape_getMaterial(lua_State *L) { olua_startinvoke(L); @@ -5520,7 +5798,7 @@ static int _cocos2d_PhysicsShape_getMaterial(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsShape_getMoment(lua_State *L) +static int _olua_fun_cocos2d_PhysicsShape_getMoment(lua_State *L) { olua_startinvoke(L); @@ -5537,7 +5815,7 @@ static int _cocos2d_PhysicsShape_getMoment(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsShape_getOffset(lua_State *L) +static int _olua_fun_cocos2d_PhysicsShape_getOffset(lua_State *L) { olua_startinvoke(L); @@ -5547,14 +5825,14 @@ static int _cocos2d_PhysicsShape_getOffset(lua_State *L) // cocos2d::Vec2 getOffset() cocos2d::Vec2 ret = self->getOffset(); - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec2"); + int num_ret = olua_copy_object(L, ret, "cc.Vec2"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_PhysicsShape_getPolygonCenter(lua_State *L) +static int _olua_fun_cocos2d_PhysicsShape_getPolygonCenter(lua_State *L) { olua_startinvoke(L); @@ -5566,14 +5844,14 @@ static int _cocos2d_PhysicsShape_getPolygonCenter(lua_State *L) // static cocos2d::Vec2 getPolygonCenter(const cocos2d::Vec2 *points, int count) cocos2d::Vec2 ret = cocos2d::PhysicsShape::getPolygonCenter(arg1, arg2); - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec2"); + int num_ret = olua_copy_object(L, ret, "cc.Vec2"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_PhysicsShape_getRestitution(lua_State *L) +static int _olua_fun_cocos2d_PhysicsShape_getRestitution(lua_State *L) { olua_startinvoke(L); @@ -5590,7 +5868,7 @@ static int _cocos2d_PhysicsShape_getRestitution(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsShape_getTag(lua_State *L) +static int _olua_fun_cocos2d_PhysicsShape_getTag(lua_State *L) { olua_startinvoke(L); @@ -5607,7 +5885,7 @@ static int _cocos2d_PhysicsShape_getTag(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsShape_getType(lua_State *L) +static int _olua_fun_cocos2d_PhysicsShape_getType(lua_State *L) { olua_startinvoke(L); @@ -5624,7 +5902,7 @@ static int _cocos2d_PhysicsShape_getType(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsShape_isSensor(lua_State *L) +static int _olua_fun_cocos2d_PhysicsShape_isSensor(lua_State *L) { olua_startinvoke(L); @@ -5641,27 +5919,27 @@ static int _cocos2d_PhysicsShape_isSensor(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsShape_recenterPoints$1(lua_State *L) +static int _olua_fun_cocos2d_PhysicsShape_recenterPoints$1(lua_State *L) { olua_startinvoke(L); cocos2d::Vec2 *arg1 = nullptr; /** points */ int arg2 = 0; /** count */ - cocos2d::Vec2 arg3; /** center */ + cocos2d::Vec2 *arg3; /** center */ olua_check_object(L, 1, &arg1, "cc.Vec2"); olua_check_integer(L, 2, &arg2); olua_check_object(L, 3, &arg3, "cc.Vec2"); // static void recenterPoints(cocos2d::Vec2 *points, int count, @optional const cocos2d::Vec2 ¢er) - cocos2d::PhysicsShape::recenterPoints(arg1, arg2, arg3); + cocos2d::PhysicsShape::recenterPoints(arg1, arg2, *arg3); olua_endinvoke(L); return 0; } -static int _cocos2d_PhysicsShape_recenterPoints$2(lua_State *L) +static int _olua_fun_cocos2d_PhysicsShape_recenterPoints$2(lua_State *L) { olua_startinvoke(L); @@ -5671,7 +5949,7 @@ static int _cocos2d_PhysicsShape_recenterPoints$2(lua_State *L) olua_check_object(L, 1, &arg1, "cc.Vec2"); olua_check_integer(L, 2, &arg2); - // static void recenterPoints(cocos2d::Vec2 *points, int count, @optional const cocos2d::Vec2 ¢er) + // static void recenterPoints(cocos2d::Vec2 *points, int count) cocos2d::PhysicsShape::recenterPoints(arg1, arg2); olua_endinvoke(L); @@ -5679,21 +5957,21 @@ static int _cocos2d_PhysicsShape_recenterPoints$2(lua_State *L) return 0; } -static int _cocos2d_PhysicsShape_recenterPoints(lua_State *L) +static int _olua_fun_cocos2d_PhysicsShape_recenterPoints(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 2) { // if ((olua_is_object(L, 1, "cc.Vec2")) && (olua_is_integer(L, 2))) { - // static void recenterPoints(cocos2d::Vec2 *points, int count, @optional const cocos2d::Vec2 ¢er) - return _cocos2d_PhysicsShape_recenterPoints$2(L); + // static void recenterPoints(cocos2d::Vec2 *points, int count) + return _olua_fun_cocos2d_PhysicsShape_recenterPoints$2(L); // } } if (num_args == 3) { // if ((olua_is_object(L, 1, "cc.Vec2")) && (olua_is_integer(L, 2)) && (olua_is_object(L, 3, "cc.Vec2"))) { // static void recenterPoints(cocos2d::Vec2 *points, int count, @optional const cocos2d::Vec2 ¢er) - return _cocos2d_PhysicsShape_recenterPoints$1(L); + return _olua_fun_cocos2d_PhysicsShape_recenterPoints$1(L); // } } @@ -5702,7 +5980,7 @@ static int _cocos2d_PhysicsShape_recenterPoints(lua_State *L) return 0; } -static int _cocos2d_PhysicsShape_setCategoryBitmask(lua_State *L) +static int _olua_fun_cocos2d_PhysicsShape_setCategoryBitmask(lua_State *L) { olua_startinvoke(L); @@ -5720,7 +5998,7 @@ static int _cocos2d_PhysicsShape_setCategoryBitmask(lua_State *L) return 0; } -static int _cocos2d_PhysicsShape_setCollisionBitmask(lua_State *L) +static int _olua_fun_cocos2d_PhysicsShape_setCollisionBitmask(lua_State *L) { olua_startinvoke(L); @@ -5738,7 +6016,7 @@ static int _cocos2d_PhysicsShape_setCollisionBitmask(lua_State *L) return 0; } -static int _cocos2d_PhysicsShape_setContactTestBitmask(lua_State *L) +static int _olua_fun_cocos2d_PhysicsShape_setContactTestBitmask(lua_State *L) { olua_startinvoke(L); @@ -5756,7 +6034,7 @@ static int _cocos2d_PhysicsShape_setContactTestBitmask(lua_State *L) return 0; } -static int _cocos2d_PhysicsShape_setDensity(lua_State *L) +static int _olua_fun_cocos2d_PhysicsShape_setDensity(lua_State *L) { olua_startinvoke(L); @@ -5774,7 +6052,7 @@ static int _cocos2d_PhysicsShape_setDensity(lua_State *L) return 0; } -static int _cocos2d_PhysicsShape_setFriction(lua_State *L) +static int _olua_fun_cocos2d_PhysicsShape_setFriction(lua_State *L) { olua_startinvoke(L); @@ -5792,7 +6070,7 @@ static int _cocos2d_PhysicsShape_setFriction(lua_State *L) return 0; } -static int _cocos2d_PhysicsShape_setGroup(lua_State *L) +static int _olua_fun_cocos2d_PhysicsShape_setGroup(lua_State *L) { olua_startinvoke(L); @@ -5810,7 +6088,7 @@ static int _cocos2d_PhysicsShape_setGroup(lua_State *L) return 0; } -static int _cocos2d_PhysicsShape_setMass(lua_State *L) +static int _olua_fun_cocos2d_PhysicsShape_setMass(lua_State *L) { olua_startinvoke(L); @@ -5828,25 +6106,25 @@ static int _cocos2d_PhysicsShape_setMass(lua_State *L) return 0; } -static int _cocos2d_PhysicsShape_setMaterial(lua_State *L) +static int _olua_fun_cocos2d_PhysicsShape_setMaterial(lua_State *L) { olua_startinvoke(L); cocos2d::PhysicsShape *self = nullptr; - cocos2d::PhysicsMaterial arg1; /** material */ + cocos2d::PhysicsMaterial *arg1; /** material */ olua_to_object(L, 1, &self, "cc.PhysicsShape"); olua_check_object(L, 2, &arg1, "cc.PhysicsMaterial"); // void setMaterial(const cocos2d::PhysicsMaterial &material) - self->setMaterial(arg1); + self->setMaterial(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_PhysicsShape_setMoment(lua_State *L) +static int _olua_fun_cocos2d_PhysicsShape_setMoment(lua_State *L) { olua_startinvoke(L); @@ -5864,7 +6142,7 @@ static int _cocos2d_PhysicsShape_setMoment(lua_State *L) return 0; } -static int _cocos2d_PhysicsShape_setRestitution(lua_State *L) +static int _olua_fun_cocos2d_PhysicsShape_setRestitution(lua_State *L) { olua_startinvoke(L); @@ -5882,7 +6160,7 @@ static int _cocos2d_PhysicsShape_setRestitution(lua_State *L) return 0; } -static int _cocos2d_PhysicsShape_setSensor(lua_State *L) +static int _olua_fun_cocos2d_PhysicsShape_setSensor(lua_State *L) { olua_startinvoke(L); @@ -5900,7 +6178,7 @@ static int _cocos2d_PhysicsShape_setSensor(lua_State *L) return 0; } -static int _cocos2d_PhysicsShape_setTag(lua_State *L) +static int _olua_fun_cocos2d_PhysicsShape_setTag(lua_State *L) { olua_startinvoke(L); @@ -5918,68 +6196,77 @@ static int _cocos2d_PhysicsShape_setTag(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_PhysicsShape(lua_State *L) +static int _olua_cls_cc_PhysicsShape(lua_State *L) { oluacls_class(L, "cc.PhysicsShape"); - oluacls_func(L, "calculateDefaultMoment", _cocos2d_PhysicsShape_calculateDefaultMoment); - oluacls_func(L, "containsPoint", _cocos2d_PhysicsShape_containsPoint); - oluacls_func(L, "getArea", _cocos2d_PhysicsShape_getArea); - oluacls_func(L, "getBody", _cocos2d_PhysicsShape_getBody); - oluacls_func(L, "getCategoryBitmask", _cocos2d_PhysicsShape_getCategoryBitmask); - oluacls_func(L, "getCenter", _cocos2d_PhysicsShape_getCenter); - oluacls_func(L, "getCollisionBitmask", _cocos2d_PhysicsShape_getCollisionBitmask); - oluacls_func(L, "getContactTestBitmask", _cocos2d_PhysicsShape_getContactTestBitmask); - oluacls_func(L, "getDensity", _cocos2d_PhysicsShape_getDensity); - oluacls_func(L, "getFriction", _cocos2d_PhysicsShape_getFriction); - oluacls_func(L, "getGroup", _cocos2d_PhysicsShape_getGroup); - oluacls_func(L, "getMass", _cocos2d_PhysicsShape_getMass); - oluacls_func(L, "getMaterial", _cocos2d_PhysicsShape_getMaterial); - oluacls_func(L, "getMoment", _cocos2d_PhysicsShape_getMoment); - oluacls_func(L, "getOffset", _cocos2d_PhysicsShape_getOffset); - oluacls_func(L, "getPolygonCenter", _cocos2d_PhysicsShape_getPolygonCenter); - oluacls_func(L, "getRestitution", _cocos2d_PhysicsShape_getRestitution); - oluacls_func(L, "getTag", _cocos2d_PhysicsShape_getTag); - oluacls_func(L, "getType", _cocos2d_PhysicsShape_getType); - oluacls_func(L, "isSensor", _cocos2d_PhysicsShape_isSensor); - oluacls_func(L, "recenterPoints", _cocos2d_PhysicsShape_recenterPoints); - oluacls_func(L, "setCategoryBitmask", _cocos2d_PhysicsShape_setCategoryBitmask); - oluacls_func(L, "setCollisionBitmask", _cocos2d_PhysicsShape_setCollisionBitmask); - oluacls_func(L, "setContactTestBitmask", _cocos2d_PhysicsShape_setContactTestBitmask); - oluacls_func(L, "setDensity", _cocos2d_PhysicsShape_setDensity); - oluacls_func(L, "setFriction", _cocos2d_PhysicsShape_setFriction); - oluacls_func(L, "setGroup", _cocos2d_PhysicsShape_setGroup); - oluacls_func(L, "setMass", _cocos2d_PhysicsShape_setMass); - oluacls_func(L, "setMaterial", _cocos2d_PhysicsShape_setMaterial); - oluacls_func(L, "setMoment", _cocos2d_PhysicsShape_setMoment); - oluacls_func(L, "setRestitution", _cocos2d_PhysicsShape_setRestitution); - oluacls_func(L, "setSensor", _cocos2d_PhysicsShape_setSensor); - oluacls_func(L, "setTag", _cocos2d_PhysicsShape_setTag); - oluacls_prop(L, "area", _cocos2d_PhysicsShape_getArea, nullptr); - oluacls_prop(L, "body", _cocos2d_PhysicsShape_getBody, nullptr); - oluacls_prop(L, "categoryBitmask", _cocos2d_PhysicsShape_getCategoryBitmask, _cocos2d_PhysicsShape_setCategoryBitmask); - oluacls_prop(L, "center", _cocos2d_PhysicsShape_getCenter, nullptr); - oluacls_prop(L, "collisionBitmask", _cocos2d_PhysicsShape_getCollisionBitmask, _cocos2d_PhysicsShape_setCollisionBitmask); - oluacls_prop(L, "contactTestBitmask", _cocos2d_PhysicsShape_getContactTestBitmask, _cocos2d_PhysicsShape_setContactTestBitmask); - oluacls_prop(L, "density", _cocos2d_PhysicsShape_getDensity, _cocos2d_PhysicsShape_setDensity); - oluacls_prop(L, "friction", _cocos2d_PhysicsShape_getFriction, _cocos2d_PhysicsShape_setFriction); - oluacls_prop(L, "group", _cocos2d_PhysicsShape_getGroup, _cocos2d_PhysicsShape_setGroup); - oluacls_prop(L, "mass", _cocos2d_PhysicsShape_getMass, _cocos2d_PhysicsShape_setMass); - oluacls_prop(L, "material", _cocos2d_PhysicsShape_getMaterial, _cocos2d_PhysicsShape_setMaterial); - oluacls_prop(L, "moment", _cocos2d_PhysicsShape_getMoment, _cocos2d_PhysicsShape_setMoment); - oluacls_prop(L, "offset", _cocos2d_PhysicsShape_getOffset, nullptr); - oluacls_prop(L, "restitution", _cocos2d_PhysicsShape_getRestitution, _cocos2d_PhysicsShape_setRestitution); - oluacls_prop(L, "sensor", _cocos2d_PhysicsShape_isSensor, _cocos2d_PhysicsShape_setSensor); - oluacls_prop(L, "tag", _cocos2d_PhysicsShape_getTag, _cocos2d_PhysicsShape_setTag); - oluacls_prop(L, "type", _cocos2d_PhysicsShape_getType, nullptr); + oluacls_func(L, "calculateDefaultMoment", _olua_fun_cocos2d_PhysicsShape_calculateDefaultMoment); + oluacls_func(L, "containsPoint", _olua_fun_cocos2d_PhysicsShape_containsPoint); + oluacls_func(L, "getArea", _olua_fun_cocos2d_PhysicsShape_getArea); + oluacls_func(L, "getBody", _olua_fun_cocos2d_PhysicsShape_getBody); + oluacls_func(L, "getCategoryBitmask", _olua_fun_cocos2d_PhysicsShape_getCategoryBitmask); + oluacls_func(L, "getCenter", _olua_fun_cocos2d_PhysicsShape_getCenter); + oluacls_func(L, "getCollisionBitmask", _olua_fun_cocos2d_PhysicsShape_getCollisionBitmask); + oluacls_func(L, "getContactTestBitmask", _olua_fun_cocos2d_PhysicsShape_getContactTestBitmask); + oluacls_func(L, "getDensity", _olua_fun_cocos2d_PhysicsShape_getDensity); + oluacls_func(L, "getFriction", _olua_fun_cocos2d_PhysicsShape_getFriction); + oluacls_func(L, "getGroup", _olua_fun_cocos2d_PhysicsShape_getGroup); + oluacls_func(L, "getMass", _olua_fun_cocos2d_PhysicsShape_getMass); + oluacls_func(L, "getMaterial", _olua_fun_cocos2d_PhysicsShape_getMaterial); + oluacls_func(L, "getMoment", _olua_fun_cocos2d_PhysicsShape_getMoment); + oluacls_func(L, "getOffset", _olua_fun_cocos2d_PhysicsShape_getOffset); + oluacls_func(L, "getPolygonCenter", _olua_fun_cocos2d_PhysicsShape_getPolygonCenter); + oluacls_func(L, "getRestitution", _olua_fun_cocos2d_PhysicsShape_getRestitution); + oluacls_func(L, "getTag", _olua_fun_cocos2d_PhysicsShape_getTag); + oluacls_func(L, "getType", _olua_fun_cocos2d_PhysicsShape_getType); + oluacls_func(L, "isSensor", _olua_fun_cocos2d_PhysicsShape_isSensor); + oluacls_func(L, "recenterPoints", _olua_fun_cocos2d_PhysicsShape_recenterPoints); + oluacls_func(L, "setCategoryBitmask", _olua_fun_cocos2d_PhysicsShape_setCategoryBitmask); + oluacls_func(L, "setCollisionBitmask", _olua_fun_cocos2d_PhysicsShape_setCollisionBitmask); + oluacls_func(L, "setContactTestBitmask", _olua_fun_cocos2d_PhysicsShape_setContactTestBitmask); + oluacls_func(L, "setDensity", _olua_fun_cocos2d_PhysicsShape_setDensity); + oluacls_func(L, "setFriction", _olua_fun_cocos2d_PhysicsShape_setFriction); + oluacls_func(L, "setGroup", _olua_fun_cocos2d_PhysicsShape_setGroup); + oluacls_func(L, "setMass", _olua_fun_cocos2d_PhysicsShape_setMass); + oluacls_func(L, "setMaterial", _olua_fun_cocos2d_PhysicsShape_setMaterial); + oluacls_func(L, "setMoment", _olua_fun_cocos2d_PhysicsShape_setMoment); + oluacls_func(L, "setRestitution", _olua_fun_cocos2d_PhysicsShape_setRestitution); + oluacls_func(L, "setSensor", _olua_fun_cocos2d_PhysicsShape_setSensor); + oluacls_func(L, "setTag", _olua_fun_cocos2d_PhysicsShape_setTag); + oluacls_prop(L, "area", _olua_fun_cocos2d_PhysicsShape_getArea, nullptr); + oluacls_prop(L, "body", _olua_fun_cocos2d_PhysicsShape_getBody, nullptr); + oluacls_prop(L, "categoryBitmask", _olua_fun_cocos2d_PhysicsShape_getCategoryBitmask, _olua_fun_cocos2d_PhysicsShape_setCategoryBitmask); + oluacls_prop(L, "center", _olua_fun_cocos2d_PhysicsShape_getCenter, nullptr); + oluacls_prop(L, "collisionBitmask", _olua_fun_cocos2d_PhysicsShape_getCollisionBitmask, _olua_fun_cocos2d_PhysicsShape_setCollisionBitmask); + oluacls_prop(L, "contactTestBitmask", _olua_fun_cocos2d_PhysicsShape_getContactTestBitmask, _olua_fun_cocos2d_PhysicsShape_setContactTestBitmask); + oluacls_prop(L, "density", _olua_fun_cocos2d_PhysicsShape_getDensity, _olua_fun_cocos2d_PhysicsShape_setDensity); + oluacls_prop(L, "friction", _olua_fun_cocos2d_PhysicsShape_getFriction, _olua_fun_cocos2d_PhysicsShape_setFriction); + oluacls_prop(L, "group", _olua_fun_cocos2d_PhysicsShape_getGroup, _olua_fun_cocos2d_PhysicsShape_setGroup); + oluacls_prop(L, "mass", _olua_fun_cocos2d_PhysicsShape_getMass, _olua_fun_cocos2d_PhysicsShape_setMass); + oluacls_prop(L, "material", _olua_fun_cocos2d_PhysicsShape_getMaterial, _olua_fun_cocos2d_PhysicsShape_setMaterial); + oluacls_prop(L, "moment", _olua_fun_cocos2d_PhysicsShape_getMoment, _olua_fun_cocos2d_PhysicsShape_setMoment); + oluacls_prop(L, "offset", _olua_fun_cocos2d_PhysicsShape_getOffset, nullptr); + oluacls_prop(L, "restitution", _olua_fun_cocos2d_PhysicsShape_getRestitution, _olua_fun_cocos2d_PhysicsShape_setRestitution); + oluacls_prop(L, "sensor", _olua_fun_cocos2d_PhysicsShape_isSensor, _olua_fun_cocos2d_PhysicsShape_setSensor); + oluacls_prop(L, "tag", _olua_fun_cocos2d_PhysicsShape_getTag, _olua_fun_cocos2d_PhysicsShape_setTag); + oluacls_prop(L, "type", _olua_fun_cocos2d_PhysicsShape_getType, nullptr); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_PhysicsShape(lua_State *L) +{ + olua_require(L, "cocos2d_physics", luaopen_cocos2d_physics); + if (!olua_getclass(L, "cc.PhysicsShape")) { + luaL_error(L, "class not found: cocos2d::PhysicsShape"); + } return 1; } OLUA_END_DECLS #endif #if CC_USE_PHYSICS -static int _cocos2d_PhysicsShapePolygon_calculateArea(lua_State *L) +static int _olua_fun_cocos2d_PhysicsShapePolygon_calculateArea(lua_State *L) { olua_startinvoke(L); @@ -5998,14 +6285,14 @@ static int _cocos2d_PhysicsShapePolygon_calculateArea(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsShapePolygon_calculateMoment$1(lua_State *L) +static int _olua_fun_cocos2d_PhysicsShapePolygon_calculateMoment$1(lua_State *L) { olua_startinvoke(L); float arg1 = 0; /** mass */ cocos2d::Vec2 *arg2 = nullptr; /** points */ int arg3 = 0; /** count */ - cocos2d::Vec2 arg4; /** offset */ + cocos2d::Vec2 *arg4; /** offset */ float arg5 = 0; /** radius */ olua_check_number(L, 1, &arg1); @@ -6015,7 +6302,7 @@ static int _cocos2d_PhysicsShapePolygon_calculateMoment$1(lua_State *L) olua_check_number(L, 5, &arg5); // static float calculateMoment(float mass, const cocos2d::Vec2 *points, int count, @optional const cocos2d::Vec2 &offset, @optional float radius) - float ret = cocos2d::PhysicsShapePolygon::calculateMoment(arg1, arg2, arg3, arg4, arg5); + float ret = cocos2d::PhysicsShapePolygon::calculateMoment(arg1, arg2, arg3, *arg4, arg5); int num_ret = olua_push_number(L, ret); olua_endinvoke(L); @@ -6023,7 +6310,7 @@ static int _cocos2d_PhysicsShapePolygon_calculateMoment$1(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsShapePolygon_calculateMoment$2(lua_State *L) +static int _olua_fun_cocos2d_PhysicsShapePolygon_calculateMoment$2(lua_State *L) { olua_startinvoke(L); @@ -6035,7 +6322,7 @@ static int _cocos2d_PhysicsShapePolygon_calculateMoment$2(lua_State *L) olua_check_object(L, 2, &arg2, "cc.Vec2"); olua_check_integer(L, 3, &arg3); - // static float calculateMoment(float mass, const cocos2d::Vec2 *points, int count, @optional const cocos2d::Vec2 &offset, @optional float radius) + // static float calculateMoment(float mass, const cocos2d::Vec2 *points, int count) float ret = cocos2d::PhysicsShapePolygon::calculateMoment(arg1, arg2, arg3); int num_ret = olua_push_number(L, ret); @@ -6044,22 +6331,22 @@ static int _cocos2d_PhysicsShapePolygon_calculateMoment$2(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsShapePolygon_calculateMoment$3(lua_State *L) +static int _olua_fun_cocos2d_PhysicsShapePolygon_calculateMoment$3(lua_State *L) { olua_startinvoke(L); float arg1 = 0; /** mass */ cocos2d::Vec2 *arg2 = nullptr; /** points */ int arg3 = 0; /** count */ - cocos2d::Vec2 arg4; /** offset */ + cocos2d::Vec2 *arg4; /** offset */ olua_check_number(L, 1, &arg1); olua_check_object(L, 2, &arg2, "cc.Vec2"); olua_check_integer(L, 3, &arg3); olua_check_object(L, 4, &arg4, "cc.Vec2"); - // static float calculateMoment(float mass, const cocos2d::Vec2 *points, int count, @optional const cocos2d::Vec2 &offset, @optional float radius) - float ret = cocos2d::PhysicsShapePolygon::calculateMoment(arg1, arg2, arg3, arg4); + // static float calculateMoment(float mass, const cocos2d::Vec2 *points, int count, @optional const cocos2d::Vec2 &offset) + float ret = cocos2d::PhysicsShapePolygon::calculateMoment(arg1, arg2, arg3, *arg4); int num_ret = olua_push_number(L, ret); olua_endinvoke(L); @@ -6067,28 +6354,28 @@ static int _cocos2d_PhysicsShapePolygon_calculateMoment$3(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsShapePolygon_calculateMoment(lua_State *L) +static int _olua_fun_cocos2d_PhysicsShapePolygon_calculateMoment(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 3) { // if ((olua_is_number(L, 1)) && (olua_is_object(L, 2, "cc.Vec2")) && (olua_is_integer(L, 3))) { - // static float calculateMoment(float mass, const cocos2d::Vec2 *points, int count, @optional const cocos2d::Vec2 &offset, @optional float radius) - return _cocos2d_PhysicsShapePolygon_calculateMoment$2(L); + // static float calculateMoment(float mass, const cocos2d::Vec2 *points, int count) + return _olua_fun_cocos2d_PhysicsShapePolygon_calculateMoment$2(L); // } } if (num_args == 4) { // if ((olua_is_number(L, 1)) && (olua_is_object(L, 2, "cc.Vec2")) && (olua_is_integer(L, 3)) && (olua_is_object(L, 4, "cc.Vec2"))) { - // static float calculateMoment(float mass, const cocos2d::Vec2 *points, int count, @optional const cocos2d::Vec2 &offset, @optional float radius) - return _cocos2d_PhysicsShapePolygon_calculateMoment$3(L); + // static float calculateMoment(float mass, const cocos2d::Vec2 *points, int count, @optional const cocos2d::Vec2 &offset) + return _olua_fun_cocos2d_PhysicsShapePolygon_calculateMoment$3(L); // } } if (num_args == 5) { // if ((olua_is_number(L, 1)) && (olua_is_object(L, 2, "cc.Vec2")) && (olua_is_integer(L, 3)) && (olua_is_object(L, 4, "cc.Vec2")) && (olua_is_number(L, 5))) { // static float calculateMoment(float mass, const cocos2d::Vec2 *points, int count, @optional const cocos2d::Vec2 &offset, @optional float radius) - return _cocos2d_PhysicsShapePolygon_calculateMoment$1(L); + return _olua_fun_cocos2d_PhysicsShapePolygon_calculateMoment$1(L); // } } @@ -6097,14 +6384,14 @@ static int _cocos2d_PhysicsShapePolygon_calculateMoment(lua_State *L) return 0; } -static int _cocos2d_PhysicsShapePolygon_create$1(lua_State *L) +static int _olua_fun_cocos2d_PhysicsShapePolygon_create$1(lua_State *L) { olua_startinvoke(L); cocos2d::Vec2 *arg1 = nullptr; /** points */ int arg2 = 0; /** count */ - cocos2d::PhysicsMaterial arg3; /** material */ - cocos2d::Vec2 arg4; /** offset */ + cocos2d::PhysicsMaterial *arg3; /** material */ + cocos2d::Vec2 *arg4; /** offset */ float arg5 = 0; /** radius */ olua_check_object(L, 1, &arg1, "cc.Vec2"); @@ -6114,7 +6401,7 @@ static int _cocos2d_PhysicsShapePolygon_create$1(lua_State *L) olua_check_number(L, 5, &arg5); // static cocos2d::PhysicsShapePolygon *create(const cocos2d::Vec2 *points, int count, @optional const cocos2d::PhysicsMaterial &material, @optional const cocos2d::Vec2 &offset, @optional float radius) - cocos2d::PhysicsShapePolygon *ret = cocos2d::PhysicsShapePolygon::create(arg1, arg2, arg3, arg4, arg5); + cocos2d::PhysicsShapePolygon *ret = cocos2d::PhysicsShapePolygon::create(arg1, arg2, *arg3, *arg4, arg5); int num_ret = olua_push_object(L, ret, "cc.PhysicsShapePolygon"); olua_endinvoke(L); @@ -6122,7 +6409,7 @@ static int _cocos2d_PhysicsShapePolygon_create$1(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsShapePolygon_create$2(lua_State *L) +static int _olua_fun_cocos2d_PhysicsShapePolygon_create$2(lua_State *L) { olua_startinvoke(L); @@ -6132,7 +6419,7 @@ static int _cocos2d_PhysicsShapePolygon_create$2(lua_State *L) olua_check_object(L, 1, &arg1, "cc.Vec2"); olua_check_integer(L, 2, &arg2); - // static cocos2d::PhysicsShapePolygon *create(const cocos2d::Vec2 *points, int count, @optional const cocos2d::PhysicsMaterial &material, @optional const cocos2d::Vec2 &offset, @optional float radius) + // static cocos2d::PhysicsShapePolygon *create(const cocos2d::Vec2 *points, int count) cocos2d::PhysicsShapePolygon *ret = cocos2d::PhysicsShapePolygon::create(arg1, arg2); int num_ret = olua_push_object(L, ret, "cc.PhysicsShapePolygon"); @@ -6141,20 +6428,20 @@ static int _cocos2d_PhysicsShapePolygon_create$2(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsShapePolygon_create$3(lua_State *L) +static int _olua_fun_cocos2d_PhysicsShapePolygon_create$3(lua_State *L) { olua_startinvoke(L); cocos2d::Vec2 *arg1 = nullptr; /** points */ int arg2 = 0; /** count */ - cocos2d::PhysicsMaterial arg3; /** material */ + cocos2d::PhysicsMaterial *arg3; /** material */ olua_check_object(L, 1, &arg1, "cc.Vec2"); olua_check_integer(L, 2, &arg2); olua_check_object(L, 3, &arg3, "cc.PhysicsMaterial"); - // static cocos2d::PhysicsShapePolygon *create(const cocos2d::Vec2 *points, int count, @optional const cocos2d::PhysicsMaterial &material, @optional const cocos2d::Vec2 &offset, @optional float radius) - cocos2d::PhysicsShapePolygon *ret = cocos2d::PhysicsShapePolygon::create(arg1, arg2, arg3); + // static cocos2d::PhysicsShapePolygon *create(const cocos2d::Vec2 *points, int count, @optional const cocos2d::PhysicsMaterial &material) + cocos2d::PhysicsShapePolygon *ret = cocos2d::PhysicsShapePolygon::create(arg1, arg2, *arg3); int num_ret = olua_push_object(L, ret, "cc.PhysicsShapePolygon"); olua_endinvoke(L); @@ -6162,22 +6449,22 @@ static int _cocos2d_PhysicsShapePolygon_create$3(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsShapePolygon_create$4(lua_State *L) +static int _olua_fun_cocos2d_PhysicsShapePolygon_create$4(lua_State *L) { olua_startinvoke(L); cocos2d::Vec2 *arg1 = nullptr; /** points */ int arg2 = 0; /** count */ - cocos2d::PhysicsMaterial arg3; /** material */ - cocos2d::Vec2 arg4; /** offset */ + cocos2d::PhysicsMaterial *arg3; /** material */ + cocos2d::Vec2 *arg4; /** offset */ olua_check_object(L, 1, &arg1, "cc.Vec2"); olua_check_integer(L, 2, &arg2); olua_check_object(L, 3, &arg3, "cc.PhysicsMaterial"); olua_check_object(L, 4, &arg4, "cc.Vec2"); - // static cocos2d::PhysicsShapePolygon *create(const cocos2d::Vec2 *points, int count, @optional const cocos2d::PhysicsMaterial &material, @optional const cocos2d::Vec2 &offset, @optional float radius) - cocos2d::PhysicsShapePolygon *ret = cocos2d::PhysicsShapePolygon::create(arg1, arg2, arg3, arg4); + // static cocos2d::PhysicsShapePolygon *create(const cocos2d::Vec2 *points, int count, @optional const cocos2d::PhysicsMaterial &material, @optional const cocos2d::Vec2 &offset) + cocos2d::PhysicsShapePolygon *ret = cocos2d::PhysicsShapePolygon::create(arg1, arg2, *arg3, *arg4); int num_ret = olua_push_object(L, ret, "cc.PhysicsShapePolygon"); olua_endinvoke(L); @@ -6185,35 +6472,35 @@ static int _cocos2d_PhysicsShapePolygon_create$4(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsShapePolygon_create(lua_State *L) +static int _olua_fun_cocos2d_PhysicsShapePolygon_create(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 2) { // if ((olua_is_object(L, 1, "cc.Vec2")) && (olua_is_integer(L, 2))) { - // static cocos2d::PhysicsShapePolygon *create(const cocos2d::Vec2 *points, int count, @optional const cocos2d::PhysicsMaterial &material, @optional const cocos2d::Vec2 &offset, @optional float radius) - return _cocos2d_PhysicsShapePolygon_create$2(L); + // static cocos2d::PhysicsShapePolygon *create(const cocos2d::Vec2 *points, int count) + return _olua_fun_cocos2d_PhysicsShapePolygon_create$2(L); // } } if (num_args == 3) { // if ((olua_is_object(L, 1, "cc.Vec2")) && (olua_is_integer(L, 2)) && (olua_is_object(L, 3, "cc.PhysicsMaterial"))) { - // static cocos2d::PhysicsShapePolygon *create(const cocos2d::Vec2 *points, int count, @optional const cocos2d::PhysicsMaterial &material, @optional const cocos2d::Vec2 &offset, @optional float radius) - return _cocos2d_PhysicsShapePolygon_create$3(L); + // static cocos2d::PhysicsShapePolygon *create(const cocos2d::Vec2 *points, int count, @optional const cocos2d::PhysicsMaterial &material) + return _olua_fun_cocos2d_PhysicsShapePolygon_create$3(L); // } } if (num_args == 4) { // if ((olua_is_object(L, 1, "cc.Vec2")) && (olua_is_integer(L, 2)) && (olua_is_object(L, 3, "cc.PhysicsMaterial")) && (olua_is_object(L, 4, "cc.Vec2"))) { - // static cocos2d::PhysicsShapePolygon *create(const cocos2d::Vec2 *points, int count, @optional const cocos2d::PhysicsMaterial &material, @optional const cocos2d::Vec2 &offset, @optional float radius) - return _cocos2d_PhysicsShapePolygon_create$4(L); + // static cocos2d::PhysicsShapePolygon *create(const cocos2d::Vec2 *points, int count, @optional const cocos2d::PhysicsMaterial &material, @optional const cocos2d::Vec2 &offset) + return _olua_fun_cocos2d_PhysicsShapePolygon_create$4(L); // } } if (num_args == 5) { // if ((olua_is_object(L, 1, "cc.Vec2")) && (olua_is_integer(L, 2)) && (olua_is_object(L, 3, "cc.PhysicsMaterial")) && (olua_is_object(L, 4, "cc.Vec2")) && (olua_is_number(L, 5))) { // static cocos2d::PhysicsShapePolygon *create(const cocos2d::Vec2 *points, int count, @optional const cocos2d::PhysicsMaterial &material, @optional const cocos2d::Vec2 &offset, @optional float radius) - return _cocos2d_PhysicsShapePolygon_create$1(L); + return _olua_fun_cocos2d_PhysicsShapePolygon_create$1(L); // } } @@ -6222,7 +6509,7 @@ static int _cocos2d_PhysicsShapePolygon_create(lua_State *L) return 0; } -static int _cocos2d_PhysicsShapePolygon_getPoint(lua_State *L) +static int _olua_fun_cocos2d_PhysicsShapePolygon_getPoint(lua_State *L) { olua_startinvoke(L); @@ -6234,14 +6521,14 @@ static int _cocos2d_PhysicsShapePolygon_getPoint(lua_State *L) // cocos2d::Vec2 getPoint(int i) cocos2d::Vec2 ret = self->getPoint(arg1); - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec2"); + int num_ret = olua_copy_object(L, ret, "cc.Vec2"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_PhysicsShapePolygon_getPoints(lua_State *L) +static int _olua_fun_cocos2d_PhysicsShapePolygon_getPoints(lua_State *L) { olua_startinvoke(L); @@ -6259,7 +6546,7 @@ static int _cocos2d_PhysicsShapePolygon_getPoints(lua_State *L) return 0; } -static int _cocos2d_PhysicsShapePolygon_getPointsCount(lua_State *L) +static int _olua_fun_cocos2d_PhysicsShapePolygon_getPointsCount(lua_State *L) { olua_startinvoke(L); @@ -6276,31 +6563,40 @@ static int _cocos2d_PhysicsShapePolygon_getPointsCount(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_PhysicsShapePolygon(lua_State *L) +static int _olua_cls_cc_PhysicsShapePolygon(lua_State *L) { oluacls_class(L, "cc.PhysicsShapePolygon"); - oluacls_func(L, "calculateArea", _cocos2d_PhysicsShapePolygon_calculateArea); - oluacls_func(L, "calculateMoment", _cocos2d_PhysicsShapePolygon_calculateMoment); - oluacls_func(L, "create", _cocos2d_PhysicsShapePolygon_create); - oluacls_func(L, "getPoint", _cocos2d_PhysicsShapePolygon_getPoint); - oluacls_func(L, "getPoints", _cocos2d_PhysicsShapePolygon_getPoints); - oluacls_func(L, "getPointsCount", _cocos2d_PhysicsShapePolygon_getPointsCount); - oluacls_prop(L, "pointsCount", _cocos2d_PhysicsShapePolygon_getPointsCount, nullptr); + oluacls_func(L, "calculateArea", _olua_fun_cocos2d_PhysicsShapePolygon_calculateArea); + oluacls_func(L, "calculateMoment", _olua_fun_cocos2d_PhysicsShapePolygon_calculateMoment); + oluacls_func(L, "create", _olua_fun_cocos2d_PhysicsShapePolygon_create); + oluacls_func(L, "getPoint", _olua_fun_cocos2d_PhysicsShapePolygon_getPoint); + oluacls_func(L, "getPoints", _olua_fun_cocos2d_PhysicsShapePolygon_getPoints); + oluacls_func(L, "getPointsCount", _olua_fun_cocos2d_PhysicsShapePolygon_getPointsCount); + oluacls_prop(L, "pointsCount", _olua_fun_cocos2d_PhysicsShapePolygon_getPointsCount, nullptr); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_PhysicsShapePolygon(lua_State *L) +{ + olua_require(L, "cocos2d_physics", luaopen_cocos2d_physics); + if (!olua_getclass(L, "cc.PhysicsShapePolygon")) { + luaL_error(L, "class not found: cocos2d::PhysicsShapePolygon"); + } return 1; } OLUA_END_DECLS #endif #if CC_USE_PHYSICS -static int _cocos2d_PhysicsShapeEdgePolygon_create$1(lua_State *L) +static int _olua_fun_cocos2d_PhysicsShapeEdgePolygon_create$1(lua_State *L) { olua_startinvoke(L); cocos2d::Vec2 *arg1 = nullptr; /** points */ int arg2 = 0; /** count */ - cocos2d::PhysicsMaterial arg3; /** material */ + cocos2d::PhysicsMaterial *arg3; /** material */ float arg4 = 0; /** border */ olua_check_object(L, 1, &arg1, "cc.Vec2"); @@ -6309,7 +6605,7 @@ static int _cocos2d_PhysicsShapeEdgePolygon_create$1(lua_State *L) olua_check_number(L, 4, &arg4); // static cocos2d::PhysicsShapeEdgePolygon *create(const cocos2d::Vec2 *points, int count, @optional const cocos2d::PhysicsMaterial &material, @optional float border) - cocos2d::PhysicsShapeEdgePolygon *ret = cocos2d::PhysicsShapeEdgePolygon::create(arg1, arg2, arg3, arg4); + cocos2d::PhysicsShapeEdgePolygon *ret = cocos2d::PhysicsShapeEdgePolygon::create(arg1, arg2, *arg3, arg4); int num_ret = olua_push_object(L, ret, "cc.PhysicsShapeEdgePolygon"); olua_endinvoke(L); @@ -6317,7 +6613,7 @@ static int _cocos2d_PhysicsShapeEdgePolygon_create$1(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsShapeEdgePolygon_create$2(lua_State *L) +static int _olua_fun_cocos2d_PhysicsShapeEdgePolygon_create$2(lua_State *L) { olua_startinvoke(L); @@ -6327,7 +6623,7 @@ static int _cocos2d_PhysicsShapeEdgePolygon_create$2(lua_State *L) olua_check_object(L, 1, &arg1, "cc.Vec2"); olua_check_integer(L, 2, &arg2); - // static cocos2d::PhysicsShapeEdgePolygon *create(const cocos2d::Vec2 *points, int count, @optional const cocos2d::PhysicsMaterial &material, @optional float border) + // static cocos2d::PhysicsShapeEdgePolygon *create(const cocos2d::Vec2 *points, int count) cocos2d::PhysicsShapeEdgePolygon *ret = cocos2d::PhysicsShapeEdgePolygon::create(arg1, arg2); int num_ret = olua_push_object(L, ret, "cc.PhysicsShapeEdgePolygon"); @@ -6336,20 +6632,20 @@ static int _cocos2d_PhysicsShapeEdgePolygon_create$2(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsShapeEdgePolygon_create$3(lua_State *L) +static int _olua_fun_cocos2d_PhysicsShapeEdgePolygon_create$3(lua_State *L) { olua_startinvoke(L); cocos2d::Vec2 *arg1 = nullptr; /** points */ int arg2 = 0; /** count */ - cocos2d::PhysicsMaterial arg3; /** material */ + cocos2d::PhysicsMaterial *arg3; /** material */ olua_check_object(L, 1, &arg1, "cc.Vec2"); olua_check_integer(L, 2, &arg2); olua_check_object(L, 3, &arg3, "cc.PhysicsMaterial"); - // static cocos2d::PhysicsShapeEdgePolygon *create(const cocos2d::Vec2 *points, int count, @optional const cocos2d::PhysicsMaterial &material, @optional float border) - cocos2d::PhysicsShapeEdgePolygon *ret = cocos2d::PhysicsShapeEdgePolygon::create(arg1, arg2, arg3); + // static cocos2d::PhysicsShapeEdgePolygon *create(const cocos2d::Vec2 *points, int count, @optional const cocos2d::PhysicsMaterial &material) + cocos2d::PhysicsShapeEdgePolygon *ret = cocos2d::PhysicsShapeEdgePolygon::create(arg1, arg2, *arg3); int num_ret = olua_push_object(L, ret, "cc.PhysicsShapeEdgePolygon"); olua_endinvoke(L); @@ -6357,28 +6653,28 @@ static int _cocos2d_PhysicsShapeEdgePolygon_create$3(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsShapeEdgePolygon_create(lua_State *L) +static int _olua_fun_cocos2d_PhysicsShapeEdgePolygon_create(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 2) { // if ((olua_is_object(L, 1, "cc.Vec2")) && (olua_is_integer(L, 2))) { - // static cocos2d::PhysicsShapeEdgePolygon *create(const cocos2d::Vec2 *points, int count, @optional const cocos2d::PhysicsMaterial &material, @optional float border) - return _cocos2d_PhysicsShapeEdgePolygon_create$2(L); + // static cocos2d::PhysicsShapeEdgePolygon *create(const cocos2d::Vec2 *points, int count) + return _olua_fun_cocos2d_PhysicsShapeEdgePolygon_create$2(L); // } } if (num_args == 3) { // if ((olua_is_object(L, 1, "cc.Vec2")) && (olua_is_integer(L, 2)) && (olua_is_object(L, 3, "cc.PhysicsMaterial"))) { - // static cocos2d::PhysicsShapeEdgePolygon *create(const cocos2d::Vec2 *points, int count, @optional const cocos2d::PhysicsMaterial &material, @optional float border) - return _cocos2d_PhysicsShapeEdgePolygon_create$3(L); + // static cocos2d::PhysicsShapeEdgePolygon *create(const cocos2d::Vec2 *points, int count, @optional const cocos2d::PhysicsMaterial &material) + return _olua_fun_cocos2d_PhysicsShapeEdgePolygon_create$3(L); // } } if (num_args == 4) { // if ((olua_is_object(L, 1, "cc.Vec2")) && (olua_is_integer(L, 2)) && (olua_is_object(L, 3, "cc.PhysicsMaterial")) && (olua_is_number(L, 4))) { // static cocos2d::PhysicsShapeEdgePolygon *create(const cocos2d::Vec2 *points, int count, @optional const cocos2d::PhysicsMaterial &material, @optional float border) - return _cocos2d_PhysicsShapeEdgePolygon_create$1(L); + return _olua_fun_cocos2d_PhysicsShapeEdgePolygon_create$1(L); // } } @@ -6387,7 +6683,7 @@ static int _cocos2d_PhysicsShapeEdgePolygon_create(lua_State *L) return 0; } -static int _cocos2d_PhysicsShapeEdgePolygon_getPoints(lua_State *L) +static int _olua_fun_cocos2d_PhysicsShapeEdgePolygon_getPoints(lua_State *L) { olua_startinvoke(L); @@ -6405,7 +6701,7 @@ static int _cocos2d_PhysicsShapeEdgePolygon_getPoints(lua_State *L) return 0; } -static int _cocos2d_PhysicsShapeEdgePolygon_getPointsCount(lua_State *L) +static int _olua_fun_cocos2d_PhysicsShapeEdgePolygon_getPointsCount(lua_State *L) { olua_startinvoke(L); @@ -6422,28 +6718,37 @@ static int _cocos2d_PhysicsShapeEdgePolygon_getPointsCount(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_PhysicsShapeEdgePolygon(lua_State *L) +static int _olua_cls_cc_PhysicsShapeEdgePolygon(lua_State *L) { oluacls_class(L, "cc.PhysicsShapeEdgePolygon"); - oluacls_func(L, "create", _cocos2d_PhysicsShapeEdgePolygon_create); - oluacls_func(L, "getPoints", _cocos2d_PhysicsShapeEdgePolygon_getPoints); - oluacls_func(L, "getPointsCount", _cocos2d_PhysicsShapeEdgePolygon_getPointsCount); - oluacls_prop(L, "pointsCount", _cocos2d_PhysicsShapeEdgePolygon_getPointsCount, nullptr); + oluacls_func(L, "create", _olua_fun_cocos2d_PhysicsShapeEdgePolygon_create); + oluacls_func(L, "getPoints", _olua_fun_cocos2d_PhysicsShapeEdgePolygon_getPoints); + oluacls_func(L, "getPointsCount", _olua_fun_cocos2d_PhysicsShapeEdgePolygon_getPointsCount); + oluacls_prop(L, "pointsCount", _olua_fun_cocos2d_PhysicsShapeEdgePolygon_getPointsCount, nullptr); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_PhysicsShapeEdgePolygon(lua_State *L) +{ + olua_require(L, "cocos2d_physics", luaopen_cocos2d_physics); + if (!olua_getclass(L, "cc.PhysicsShapeEdgePolygon")) { + luaL_error(L, "class not found: cocos2d::PhysicsShapeEdgePolygon"); + } return 1; } OLUA_END_DECLS #endif #if CC_USE_PHYSICS -static int _cocos2d_PhysicsShapeBox_create$1(lua_State *L) +static int _olua_fun_cocos2d_PhysicsShapeBox_create$1(lua_State *L) { olua_startinvoke(L); - cocos2d::Size arg1; /** size */ - cocos2d::PhysicsMaterial arg2; /** material */ - cocos2d::Vec2 arg3; /** offset */ + cocos2d::Size *arg1; /** size */ + cocos2d::PhysicsMaterial *arg2; /** material */ + cocos2d::Vec2 *arg3; /** offset */ float arg4 = 0; /** radius */ olua_check_object(L, 1, &arg1, "cc.Size"); @@ -6452,7 +6757,7 @@ static int _cocos2d_PhysicsShapeBox_create$1(lua_State *L) olua_check_number(L, 4, &arg4); // static cocos2d::PhysicsShapeBox *create(const cocos2d::Size &size, @optional const cocos2d::PhysicsMaterial &material, @optional const cocos2d::Vec2 &offset, @optional float radius) - cocos2d::PhysicsShapeBox *ret = cocos2d::PhysicsShapeBox::create(arg1, arg2, arg3, arg4); + cocos2d::PhysicsShapeBox *ret = cocos2d::PhysicsShapeBox::create(*arg1, *arg2, *arg3, arg4); int num_ret = olua_push_object(L, ret, "cc.PhysicsShapeBox"); olua_endinvoke(L); @@ -6460,16 +6765,16 @@ static int _cocos2d_PhysicsShapeBox_create$1(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsShapeBox_create$2(lua_State *L) +static int _olua_fun_cocos2d_PhysicsShapeBox_create$2(lua_State *L) { olua_startinvoke(L); - cocos2d::Size arg1; /** size */ + cocos2d::Size *arg1; /** size */ olua_check_object(L, 1, &arg1, "cc.Size"); - // static cocos2d::PhysicsShapeBox *create(const cocos2d::Size &size, @optional const cocos2d::PhysicsMaterial &material, @optional const cocos2d::Vec2 &offset, @optional float radius) - cocos2d::PhysicsShapeBox *ret = cocos2d::PhysicsShapeBox::create(arg1); + // static cocos2d::PhysicsShapeBox *create(const cocos2d::Size &size) + cocos2d::PhysicsShapeBox *ret = cocos2d::PhysicsShapeBox::create(*arg1); int num_ret = olua_push_object(L, ret, "cc.PhysicsShapeBox"); olua_endinvoke(L); @@ -6477,18 +6782,18 @@ static int _cocos2d_PhysicsShapeBox_create$2(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsShapeBox_create$3(lua_State *L) +static int _olua_fun_cocos2d_PhysicsShapeBox_create$3(lua_State *L) { olua_startinvoke(L); - cocos2d::Size arg1; /** size */ - cocos2d::PhysicsMaterial arg2; /** material */ + cocos2d::Size *arg1; /** size */ + cocos2d::PhysicsMaterial *arg2; /** material */ olua_check_object(L, 1, &arg1, "cc.Size"); olua_check_object(L, 2, &arg2, "cc.PhysicsMaterial"); - // static cocos2d::PhysicsShapeBox *create(const cocos2d::Size &size, @optional const cocos2d::PhysicsMaterial &material, @optional const cocos2d::Vec2 &offset, @optional float radius) - cocos2d::PhysicsShapeBox *ret = cocos2d::PhysicsShapeBox::create(arg1, arg2); + // static cocos2d::PhysicsShapeBox *create(const cocos2d::Size &size, @optional const cocos2d::PhysicsMaterial &material) + cocos2d::PhysicsShapeBox *ret = cocos2d::PhysicsShapeBox::create(*arg1, *arg2); int num_ret = olua_push_object(L, ret, "cc.PhysicsShapeBox"); olua_endinvoke(L); @@ -6496,20 +6801,20 @@ static int _cocos2d_PhysicsShapeBox_create$3(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsShapeBox_create$4(lua_State *L) +static int _olua_fun_cocos2d_PhysicsShapeBox_create$4(lua_State *L) { olua_startinvoke(L); - cocos2d::Size arg1; /** size */ - cocos2d::PhysicsMaterial arg2; /** material */ - cocos2d::Vec2 arg3; /** offset */ + cocos2d::Size *arg1; /** size */ + cocos2d::PhysicsMaterial *arg2; /** material */ + cocos2d::Vec2 *arg3; /** offset */ olua_check_object(L, 1, &arg1, "cc.Size"); olua_check_object(L, 2, &arg2, "cc.PhysicsMaterial"); olua_check_object(L, 3, &arg3, "cc.Vec2"); - // static cocos2d::PhysicsShapeBox *create(const cocos2d::Size &size, @optional const cocos2d::PhysicsMaterial &material, @optional const cocos2d::Vec2 &offset, @optional float radius) - cocos2d::PhysicsShapeBox *ret = cocos2d::PhysicsShapeBox::create(arg1, arg2, arg3); + // static cocos2d::PhysicsShapeBox *create(const cocos2d::Size &size, @optional const cocos2d::PhysicsMaterial &material, @optional const cocos2d::Vec2 &offset) + cocos2d::PhysicsShapeBox *ret = cocos2d::PhysicsShapeBox::create(*arg1, *arg2, *arg3); int num_ret = olua_push_object(L, ret, "cc.PhysicsShapeBox"); olua_endinvoke(L); @@ -6517,35 +6822,35 @@ static int _cocos2d_PhysicsShapeBox_create$4(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsShapeBox_create(lua_State *L) +static int _olua_fun_cocos2d_PhysicsShapeBox_create(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 1) { // if ((olua_is_object(L, 1, "cc.Size"))) { - // static cocos2d::PhysicsShapeBox *create(const cocos2d::Size &size, @optional const cocos2d::PhysicsMaterial &material, @optional const cocos2d::Vec2 &offset, @optional float radius) - return _cocos2d_PhysicsShapeBox_create$2(L); + // static cocos2d::PhysicsShapeBox *create(const cocos2d::Size &size) + return _olua_fun_cocos2d_PhysicsShapeBox_create$2(L); // } } if (num_args == 2) { // if ((olua_is_object(L, 1, "cc.Size")) && (olua_is_object(L, 2, "cc.PhysicsMaterial"))) { - // static cocos2d::PhysicsShapeBox *create(const cocos2d::Size &size, @optional const cocos2d::PhysicsMaterial &material, @optional const cocos2d::Vec2 &offset, @optional float radius) - return _cocos2d_PhysicsShapeBox_create$3(L); + // static cocos2d::PhysicsShapeBox *create(const cocos2d::Size &size, @optional const cocos2d::PhysicsMaterial &material) + return _olua_fun_cocos2d_PhysicsShapeBox_create$3(L); // } } if (num_args == 3) { // if ((olua_is_object(L, 1, "cc.Size")) && (olua_is_object(L, 2, "cc.PhysicsMaterial")) && (olua_is_object(L, 3, "cc.Vec2"))) { - // static cocos2d::PhysicsShapeBox *create(const cocos2d::Size &size, @optional const cocos2d::PhysicsMaterial &material, @optional const cocos2d::Vec2 &offset, @optional float radius) - return _cocos2d_PhysicsShapeBox_create$4(L); + // static cocos2d::PhysicsShapeBox *create(const cocos2d::Size &size, @optional const cocos2d::PhysicsMaterial &material, @optional const cocos2d::Vec2 &offset) + return _olua_fun_cocos2d_PhysicsShapeBox_create$4(L); // } } if (num_args == 4) { // if ((olua_is_object(L, 1, "cc.Size")) && (olua_is_object(L, 2, "cc.PhysicsMaterial")) && (olua_is_object(L, 3, "cc.Vec2")) && (olua_is_number(L, 4))) { // static cocos2d::PhysicsShapeBox *create(const cocos2d::Size &size, @optional const cocos2d::PhysicsMaterial &material, @optional const cocos2d::Vec2 &offset, @optional float radius) - return _cocos2d_PhysicsShapeBox_create$1(L); + return _olua_fun_cocos2d_PhysicsShapeBox_create$1(L); // } } @@ -6554,7 +6859,7 @@ static int _cocos2d_PhysicsShapeBox_create(lua_State *L) return 0; } -static int _cocos2d_PhysicsShapeBox_getSize(lua_State *L) +static int _olua_fun_cocos2d_PhysicsShapeBox_getSize(lua_State *L) { olua_startinvoke(L); @@ -6564,28 +6869,37 @@ static int _cocos2d_PhysicsShapeBox_getSize(lua_State *L) // cocos2d::Size getSize() cocos2d::Size ret = self->getSize(); - int num_ret = olua_pushcopy_object(L, ret, "cc.Size"); + int num_ret = olua_copy_object(L, ret, "cc.Size"); olua_endinvoke(L); return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_PhysicsShapeBox(lua_State *L) +static int _olua_cls_cc_PhysicsShapeBox(lua_State *L) { oluacls_class(L, "cc.PhysicsShapeBox"); - oluacls_func(L, "create", _cocos2d_PhysicsShapeBox_create); - oluacls_func(L, "getSize", _cocos2d_PhysicsShapeBox_getSize); - oluacls_prop(L, "size", _cocos2d_PhysicsShapeBox_getSize, nullptr); + oluacls_func(L, "create", _olua_fun_cocos2d_PhysicsShapeBox_create); + oluacls_func(L, "getSize", _olua_fun_cocos2d_PhysicsShapeBox_getSize); + oluacls_prop(L, "size", _olua_fun_cocos2d_PhysicsShapeBox_getSize, nullptr); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_PhysicsShapeBox(lua_State *L) +{ + olua_require(L, "cocos2d_physics", luaopen_cocos2d_physics); + if (!olua_getclass(L, "cc.PhysicsShapeBox")) { + luaL_error(L, "class not found: cocos2d::PhysicsShapeBox"); + } return 1; } OLUA_END_DECLS #endif #if CC_USE_PHYSICS -static int _cocos2d_PhysicsShapeCircle_calculateArea(lua_State *L) +static int _olua_fun_cocos2d_PhysicsShapeCircle_calculateArea(lua_State *L) { olua_startinvoke(L); @@ -6602,20 +6916,20 @@ static int _cocos2d_PhysicsShapeCircle_calculateArea(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsShapeCircle_calculateMoment$1(lua_State *L) +static int _olua_fun_cocos2d_PhysicsShapeCircle_calculateMoment$1(lua_State *L) { olua_startinvoke(L); float arg1 = 0; /** mass */ float arg2 = 0; /** radius */ - cocos2d::Vec2 arg3; /** offset */ + cocos2d::Vec2 *arg3; /** offset */ olua_check_number(L, 1, &arg1); olua_check_number(L, 2, &arg2); olua_check_object(L, 3, &arg3, "cc.Vec2"); // static float calculateMoment(float mass, float radius, @optional const cocos2d::Vec2 &offset) - float ret = cocos2d::PhysicsShapeCircle::calculateMoment(arg1, arg2, arg3); + float ret = cocos2d::PhysicsShapeCircle::calculateMoment(arg1, arg2, *arg3); int num_ret = olua_push_number(L, ret); olua_endinvoke(L); @@ -6623,7 +6937,7 @@ static int _cocos2d_PhysicsShapeCircle_calculateMoment$1(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsShapeCircle_calculateMoment$2(lua_State *L) +static int _olua_fun_cocos2d_PhysicsShapeCircle_calculateMoment$2(lua_State *L) { olua_startinvoke(L); @@ -6633,7 +6947,7 @@ static int _cocos2d_PhysicsShapeCircle_calculateMoment$2(lua_State *L) olua_check_number(L, 1, &arg1); olua_check_number(L, 2, &arg2); - // static float calculateMoment(float mass, float radius, @optional const cocos2d::Vec2 &offset) + // static float calculateMoment(float mass, float radius) float ret = cocos2d::PhysicsShapeCircle::calculateMoment(arg1, arg2); int num_ret = olua_push_number(L, ret); @@ -6642,21 +6956,21 @@ static int _cocos2d_PhysicsShapeCircle_calculateMoment$2(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsShapeCircle_calculateMoment(lua_State *L) +static int _olua_fun_cocos2d_PhysicsShapeCircle_calculateMoment(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 2) { // if ((olua_is_number(L, 1)) && (olua_is_number(L, 2))) { - // static float calculateMoment(float mass, float radius, @optional const cocos2d::Vec2 &offset) - return _cocos2d_PhysicsShapeCircle_calculateMoment$2(L); + // static float calculateMoment(float mass, float radius) + return _olua_fun_cocos2d_PhysicsShapeCircle_calculateMoment$2(L); // } } if (num_args == 3) { // if ((olua_is_number(L, 1)) && (olua_is_number(L, 2)) && (olua_is_object(L, 3, "cc.Vec2"))) { // static float calculateMoment(float mass, float radius, @optional const cocos2d::Vec2 &offset) - return _cocos2d_PhysicsShapeCircle_calculateMoment$1(L); + return _olua_fun_cocos2d_PhysicsShapeCircle_calculateMoment$1(L); // } } @@ -6665,20 +6979,20 @@ static int _cocos2d_PhysicsShapeCircle_calculateMoment(lua_State *L) return 0; } -static int _cocos2d_PhysicsShapeCircle_create$1(lua_State *L) +static int _olua_fun_cocos2d_PhysicsShapeCircle_create$1(lua_State *L) { olua_startinvoke(L); float arg1 = 0; /** radius */ - cocos2d::PhysicsMaterial arg2; /** material */ - cocos2d::Vec2 arg3; /** offset */ + cocos2d::PhysicsMaterial *arg2; /** material */ + cocos2d::Vec2 *arg3; /** offset */ olua_check_number(L, 1, &arg1); olua_check_object(L, 2, &arg2, "cc.PhysicsMaterial"); olua_check_object(L, 3, &arg3, "cc.Vec2"); // static cocos2d::PhysicsShapeCircle *create(float radius, @optional const cocos2d::PhysicsMaterial &material, @optional const cocos2d::Vec2 &offset) - cocos2d::PhysicsShapeCircle *ret = cocos2d::PhysicsShapeCircle::create(arg1, arg2, arg3); + cocos2d::PhysicsShapeCircle *ret = cocos2d::PhysicsShapeCircle::create(arg1, *arg2, *arg3); int num_ret = olua_push_object(L, ret, "cc.PhysicsShapeCircle"); olua_endinvoke(L); @@ -6686,7 +7000,7 @@ static int _cocos2d_PhysicsShapeCircle_create$1(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsShapeCircle_create$2(lua_State *L) +static int _olua_fun_cocos2d_PhysicsShapeCircle_create$2(lua_State *L) { olua_startinvoke(L); @@ -6694,7 +7008,7 @@ static int _cocos2d_PhysicsShapeCircle_create$2(lua_State *L) olua_check_number(L, 1, &arg1); - // static cocos2d::PhysicsShapeCircle *create(float radius, @optional const cocos2d::PhysicsMaterial &material, @optional const cocos2d::Vec2 &offset) + // static cocos2d::PhysicsShapeCircle *create(float radius) cocos2d::PhysicsShapeCircle *ret = cocos2d::PhysicsShapeCircle::create(arg1); int num_ret = olua_push_object(L, ret, "cc.PhysicsShapeCircle"); @@ -6703,18 +7017,18 @@ static int _cocos2d_PhysicsShapeCircle_create$2(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsShapeCircle_create$3(lua_State *L) +static int _olua_fun_cocos2d_PhysicsShapeCircle_create$3(lua_State *L) { olua_startinvoke(L); float arg1 = 0; /** radius */ - cocos2d::PhysicsMaterial arg2; /** material */ + cocos2d::PhysicsMaterial *arg2; /** material */ olua_check_number(L, 1, &arg1); olua_check_object(L, 2, &arg2, "cc.PhysicsMaterial"); - // static cocos2d::PhysicsShapeCircle *create(float radius, @optional const cocos2d::PhysicsMaterial &material, @optional const cocos2d::Vec2 &offset) - cocos2d::PhysicsShapeCircle *ret = cocos2d::PhysicsShapeCircle::create(arg1, arg2); + // static cocos2d::PhysicsShapeCircle *create(float radius, @optional const cocos2d::PhysicsMaterial &material) + cocos2d::PhysicsShapeCircle *ret = cocos2d::PhysicsShapeCircle::create(arg1, *arg2); int num_ret = olua_push_object(L, ret, "cc.PhysicsShapeCircle"); olua_endinvoke(L); @@ -6722,28 +7036,28 @@ static int _cocos2d_PhysicsShapeCircle_create$3(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsShapeCircle_create(lua_State *L) +static int _olua_fun_cocos2d_PhysicsShapeCircle_create(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 1) { // if ((olua_is_number(L, 1))) { - // static cocos2d::PhysicsShapeCircle *create(float radius, @optional const cocos2d::PhysicsMaterial &material, @optional const cocos2d::Vec2 &offset) - return _cocos2d_PhysicsShapeCircle_create$2(L); + // static cocos2d::PhysicsShapeCircle *create(float radius) + return _olua_fun_cocos2d_PhysicsShapeCircle_create$2(L); // } } if (num_args == 2) { // if ((olua_is_number(L, 1)) && (olua_is_object(L, 2, "cc.PhysicsMaterial"))) { - // static cocos2d::PhysicsShapeCircle *create(float radius, @optional const cocos2d::PhysicsMaterial &material, @optional const cocos2d::Vec2 &offset) - return _cocos2d_PhysicsShapeCircle_create$3(L); + // static cocos2d::PhysicsShapeCircle *create(float radius, @optional const cocos2d::PhysicsMaterial &material) + return _olua_fun_cocos2d_PhysicsShapeCircle_create$3(L); // } } if (num_args == 3) { // if ((olua_is_number(L, 1)) && (olua_is_object(L, 2, "cc.PhysicsMaterial")) && (olua_is_object(L, 3, "cc.Vec2"))) { // static cocos2d::PhysicsShapeCircle *create(float radius, @optional const cocos2d::PhysicsMaterial &material, @optional const cocos2d::Vec2 &offset) - return _cocos2d_PhysicsShapeCircle_create$1(L); + return _olua_fun_cocos2d_PhysicsShapeCircle_create$1(L); // } } @@ -6752,7 +7066,7 @@ static int _cocos2d_PhysicsShapeCircle_create(lua_State *L) return 0; } -static int _cocos2d_PhysicsShapeCircle_getRadius(lua_State *L) +static int _olua_fun_cocos2d_PhysicsShapeCircle_getRadius(lua_State *L) { olua_startinvoke(L); @@ -6769,30 +7083,39 @@ static int _cocos2d_PhysicsShapeCircle_getRadius(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_PhysicsShapeCircle(lua_State *L) +static int _olua_cls_cc_PhysicsShapeCircle(lua_State *L) { oluacls_class(L, "cc.PhysicsShapeCircle"); - oluacls_func(L, "calculateArea", _cocos2d_PhysicsShapeCircle_calculateArea); - oluacls_func(L, "calculateMoment", _cocos2d_PhysicsShapeCircle_calculateMoment); - oluacls_func(L, "create", _cocos2d_PhysicsShapeCircle_create); - oluacls_func(L, "getRadius", _cocos2d_PhysicsShapeCircle_getRadius); - oluacls_prop(L, "radius", _cocos2d_PhysicsShapeCircle_getRadius, nullptr); + oluacls_func(L, "calculateArea", _olua_fun_cocos2d_PhysicsShapeCircle_calculateArea); + oluacls_func(L, "calculateMoment", _olua_fun_cocos2d_PhysicsShapeCircle_calculateMoment); + oluacls_func(L, "create", _olua_fun_cocos2d_PhysicsShapeCircle_create); + oluacls_func(L, "getRadius", _olua_fun_cocos2d_PhysicsShapeCircle_getRadius); + oluacls_prop(L, "radius", _olua_fun_cocos2d_PhysicsShapeCircle_getRadius, nullptr); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_PhysicsShapeCircle(lua_State *L) +{ + olua_require(L, "cocos2d_physics", luaopen_cocos2d_physics); + if (!olua_getclass(L, "cc.PhysicsShapeCircle")) { + luaL_error(L, "class not found: cocos2d::PhysicsShapeCircle"); + } + return 1; +} OLUA_END_DECLS #endif #if CC_USE_PHYSICS -static int _cocos2d_PhysicsShapeEdgeBox_create$1(lua_State *L) +static int _olua_fun_cocos2d_PhysicsShapeEdgeBox_create$1(lua_State *L) { olua_startinvoke(L); - cocos2d::Size arg1; /** size */ - cocos2d::PhysicsMaterial arg2; /** material */ + cocos2d::Size *arg1; /** size */ + cocos2d::PhysicsMaterial *arg2; /** material */ float arg3 = 0; /** border */ - cocos2d::Vec2 arg4; /** offset */ + cocos2d::Vec2 *arg4; /** offset */ olua_check_object(L, 1, &arg1, "cc.Size"); olua_check_object(L, 2, &arg2, "cc.PhysicsMaterial"); @@ -6800,7 +7123,7 @@ static int _cocos2d_PhysicsShapeEdgeBox_create$1(lua_State *L) olua_check_object(L, 4, &arg4, "cc.Vec2"); // static cocos2d::PhysicsShapeEdgeBox *create(const cocos2d::Size &size, @optional const cocos2d::PhysicsMaterial &material, @optional float border, @optional const cocos2d::Vec2 &offset) - cocos2d::PhysicsShapeEdgeBox *ret = cocos2d::PhysicsShapeEdgeBox::create(arg1, arg2, arg3, arg4); + cocos2d::PhysicsShapeEdgeBox *ret = cocos2d::PhysicsShapeEdgeBox::create(*arg1, *arg2, arg3, *arg4); int num_ret = olua_push_object(L, ret, "cc.PhysicsShapeEdgeBox"); olua_endinvoke(L); @@ -6808,16 +7131,16 @@ static int _cocos2d_PhysicsShapeEdgeBox_create$1(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsShapeEdgeBox_create$2(lua_State *L) +static int _olua_fun_cocos2d_PhysicsShapeEdgeBox_create$2(lua_State *L) { olua_startinvoke(L); - cocos2d::Size arg1; /** size */ + cocos2d::Size *arg1; /** size */ olua_check_object(L, 1, &arg1, "cc.Size"); - // static cocos2d::PhysicsShapeEdgeBox *create(const cocos2d::Size &size, @optional const cocos2d::PhysicsMaterial &material, @optional float border, @optional const cocos2d::Vec2 &offset) - cocos2d::PhysicsShapeEdgeBox *ret = cocos2d::PhysicsShapeEdgeBox::create(arg1); + // static cocos2d::PhysicsShapeEdgeBox *create(const cocos2d::Size &size) + cocos2d::PhysicsShapeEdgeBox *ret = cocos2d::PhysicsShapeEdgeBox::create(*arg1); int num_ret = olua_push_object(L, ret, "cc.PhysicsShapeEdgeBox"); olua_endinvoke(L); @@ -6825,18 +7148,18 @@ static int _cocos2d_PhysicsShapeEdgeBox_create$2(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsShapeEdgeBox_create$3(lua_State *L) +static int _olua_fun_cocos2d_PhysicsShapeEdgeBox_create$3(lua_State *L) { olua_startinvoke(L); - cocos2d::Size arg1; /** size */ - cocos2d::PhysicsMaterial arg2; /** material */ + cocos2d::Size *arg1; /** size */ + cocos2d::PhysicsMaterial *arg2; /** material */ olua_check_object(L, 1, &arg1, "cc.Size"); olua_check_object(L, 2, &arg2, "cc.PhysicsMaterial"); - // static cocos2d::PhysicsShapeEdgeBox *create(const cocos2d::Size &size, @optional const cocos2d::PhysicsMaterial &material, @optional float border, @optional const cocos2d::Vec2 &offset) - cocos2d::PhysicsShapeEdgeBox *ret = cocos2d::PhysicsShapeEdgeBox::create(arg1, arg2); + // static cocos2d::PhysicsShapeEdgeBox *create(const cocos2d::Size &size, @optional const cocos2d::PhysicsMaterial &material) + cocos2d::PhysicsShapeEdgeBox *ret = cocos2d::PhysicsShapeEdgeBox::create(*arg1, *arg2); int num_ret = olua_push_object(L, ret, "cc.PhysicsShapeEdgeBox"); olua_endinvoke(L); @@ -6844,20 +7167,20 @@ static int _cocos2d_PhysicsShapeEdgeBox_create$3(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsShapeEdgeBox_create$4(lua_State *L) +static int _olua_fun_cocos2d_PhysicsShapeEdgeBox_create$4(lua_State *L) { olua_startinvoke(L); - cocos2d::Size arg1; /** size */ - cocos2d::PhysicsMaterial arg2; /** material */ + cocos2d::Size *arg1; /** size */ + cocos2d::PhysicsMaterial *arg2; /** material */ float arg3 = 0; /** border */ olua_check_object(L, 1, &arg1, "cc.Size"); olua_check_object(L, 2, &arg2, "cc.PhysicsMaterial"); olua_check_number(L, 3, &arg3); - // static cocos2d::PhysicsShapeEdgeBox *create(const cocos2d::Size &size, @optional const cocos2d::PhysicsMaterial &material, @optional float border, @optional const cocos2d::Vec2 &offset) - cocos2d::PhysicsShapeEdgeBox *ret = cocos2d::PhysicsShapeEdgeBox::create(arg1, arg2, arg3); + // static cocos2d::PhysicsShapeEdgeBox *create(const cocos2d::Size &size, @optional const cocos2d::PhysicsMaterial &material, @optional float border) + cocos2d::PhysicsShapeEdgeBox *ret = cocos2d::PhysicsShapeEdgeBox::create(*arg1, *arg2, arg3); int num_ret = olua_push_object(L, ret, "cc.PhysicsShapeEdgeBox"); olua_endinvoke(L); @@ -6865,35 +7188,35 @@ static int _cocos2d_PhysicsShapeEdgeBox_create$4(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsShapeEdgeBox_create(lua_State *L) +static int _olua_fun_cocos2d_PhysicsShapeEdgeBox_create(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 1) { // if ((olua_is_object(L, 1, "cc.Size"))) { - // static cocos2d::PhysicsShapeEdgeBox *create(const cocos2d::Size &size, @optional const cocos2d::PhysicsMaterial &material, @optional float border, @optional const cocos2d::Vec2 &offset) - return _cocos2d_PhysicsShapeEdgeBox_create$2(L); + // static cocos2d::PhysicsShapeEdgeBox *create(const cocos2d::Size &size) + return _olua_fun_cocos2d_PhysicsShapeEdgeBox_create$2(L); // } } if (num_args == 2) { // if ((olua_is_object(L, 1, "cc.Size")) && (olua_is_object(L, 2, "cc.PhysicsMaterial"))) { - // static cocos2d::PhysicsShapeEdgeBox *create(const cocos2d::Size &size, @optional const cocos2d::PhysicsMaterial &material, @optional float border, @optional const cocos2d::Vec2 &offset) - return _cocos2d_PhysicsShapeEdgeBox_create$3(L); + // static cocos2d::PhysicsShapeEdgeBox *create(const cocos2d::Size &size, @optional const cocos2d::PhysicsMaterial &material) + return _olua_fun_cocos2d_PhysicsShapeEdgeBox_create$3(L); // } } if (num_args == 3) { // if ((olua_is_object(L, 1, "cc.Size")) && (olua_is_object(L, 2, "cc.PhysicsMaterial")) && (olua_is_number(L, 3))) { - // static cocos2d::PhysicsShapeEdgeBox *create(const cocos2d::Size &size, @optional const cocos2d::PhysicsMaterial &material, @optional float border, @optional const cocos2d::Vec2 &offset) - return _cocos2d_PhysicsShapeEdgeBox_create$4(L); + // static cocos2d::PhysicsShapeEdgeBox *create(const cocos2d::Size &size, @optional const cocos2d::PhysicsMaterial &material, @optional float border) + return _olua_fun_cocos2d_PhysicsShapeEdgeBox_create$4(L); // } } if (num_args == 4) { // if ((olua_is_object(L, 1, "cc.Size")) && (olua_is_object(L, 2, "cc.PhysicsMaterial")) && (olua_is_number(L, 3)) && (olua_is_object(L, 4, "cc.Vec2"))) { // static cocos2d::PhysicsShapeEdgeBox *create(const cocos2d::Size &size, @optional const cocos2d::PhysicsMaterial &material, @optional float border, @optional const cocos2d::Vec2 &offset) - return _cocos2d_PhysicsShapeEdgeBox_create$1(L); + return _olua_fun_cocos2d_PhysicsShapeEdgeBox_create$1(L); // } } @@ -6902,25 +7225,34 @@ static int _cocos2d_PhysicsShapeEdgeBox_create(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_PhysicsShapeEdgeBox(lua_State *L) +static int _olua_cls_cc_PhysicsShapeEdgeBox(lua_State *L) { oluacls_class(L, "cc.PhysicsShapeEdgeBox"); - oluacls_func(L, "create", _cocos2d_PhysicsShapeEdgeBox_create); + oluacls_func(L, "create", _olua_fun_cocos2d_PhysicsShapeEdgeBox_create); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_PhysicsShapeEdgeBox(lua_State *L) +{ + olua_require(L, "cocos2d_physics", luaopen_cocos2d_physics); + if (!olua_getclass(L, "cc.PhysicsShapeEdgeBox")) { + luaL_error(L, "class not found: cocos2d::PhysicsShapeEdgeBox"); + } return 1; } OLUA_END_DECLS #endif #if CC_USE_PHYSICS -static int _cocos2d_PhysicsShapeEdgeChain_create$1(lua_State *L) +static int _olua_fun_cocos2d_PhysicsShapeEdgeChain_create$1(lua_State *L) { olua_startinvoke(L); cocos2d::Vec2 *arg1 = nullptr; /** points */ int arg2 = 0; /** count */ - cocos2d::PhysicsMaterial arg3; /** material */ + cocos2d::PhysicsMaterial *arg3; /** material */ float arg4 = 0; /** border */ olua_check_object(L, 1, &arg1, "cc.Vec2"); @@ -6929,7 +7261,7 @@ static int _cocos2d_PhysicsShapeEdgeChain_create$1(lua_State *L) olua_check_number(L, 4, &arg4); // static cocos2d::PhysicsShapeEdgeChain *create(const cocos2d::Vec2 *points, int count, @optional const cocos2d::PhysicsMaterial &material, @optional float border) - cocos2d::PhysicsShapeEdgeChain *ret = cocos2d::PhysicsShapeEdgeChain::create(arg1, arg2, arg3, arg4); + cocos2d::PhysicsShapeEdgeChain *ret = cocos2d::PhysicsShapeEdgeChain::create(arg1, arg2, *arg3, arg4); int num_ret = olua_push_object(L, ret, "cc.PhysicsShapeEdgeChain"); olua_endinvoke(L); @@ -6937,7 +7269,7 @@ static int _cocos2d_PhysicsShapeEdgeChain_create$1(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsShapeEdgeChain_create$2(lua_State *L) +static int _olua_fun_cocos2d_PhysicsShapeEdgeChain_create$2(lua_State *L) { olua_startinvoke(L); @@ -6947,7 +7279,7 @@ static int _cocos2d_PhysicsShapeEdgeChain_create$2(lua_State *L) olua_check_object(L, 1, &arg1, "cc.Vec2"); olua_check_integer(L, 2, &arg2); - // static cocos2d::PhysicsShapeEdgeChain *create(const cocos2d::Vec2 *points, int count, @optional const cocos2d::PhysicsMaterial &material, @optional float border) + // static cocos2d::PhysicsShapeEdgeChain *create(const cocos2d::Vec2 *points, int count) cocos2d::PhysicsShapeEdgeChain *ret = cocos2d::PhysicsShapeEdgeChain::create(arg1, arg2); int num_ret = olua_push_object(L, ret, "cc.PhysicsShapeEdgeChain"); @@ -6956,20 +7288,20 @@ static int _cocos2d_PhysicsShapeEdgeChain_create$2(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsShapeEdgeChain_create$3(lua_State *L) +static int _olua_fun_cocos2d_PhysicsShapeEdgeChain_create$3(lua_State *L) { olua_startinvoke(L); cocos2d::Vec2 *arg1 = nullptr; /** points */ int arg2 = 0; /** count */ - cocos2d::PhysicsMaterial arg3; /** material */ + cocos2d::PhysicsMaterial *arg3; /** material */ olua_check_object(L, 1, &arg1, "cc.Vec2"); olua_check_integer(L, 2, &arg2); olua_check_object(L, 3, &arg3, "cc.PhysicsMaterial"); - // static cocos2d::PhysicsShapeEdgeChain *create(const cocos2d::Vec2 *points, int count, @optional const cocos2d::PhysicsMaterial &material, @optional float border) - cocos2d::PhysicsShapeEdgeChain *ret = cocos2d::PhysicsShapeEdgeChain::create(arg1, arg2, arg3); + // static cocos2d::PhysicsShapeEdgeChain *create(const cocos2d::Vec2 *points, int count, @optional const cocos2d::PhysicsMaterial &material) + cocos2d::PhysicsShapeEdgeChain *ret = cocos2d::PhysicsShapeEdgeChain::create(arg1, arg2, *arg3); int num_ret = olua_push_object(L, ret, "cc.PhysicsShapeEdgeChain"); olua_endinvoke(L); @@ -6977,28 +7309,28 @@ static int _cocos2d_PhysicsShapeEdgeChain_create$3(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsShapeEdgeChain_create(lua_State *L) +static int _olua_fun_cocos2d_PhysicsShapeEdgeChain_create(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 2) { // if ((olua_is_object(L, 1, "cc.Vec2")) && (olua_is_integer(L, 2))) { - // static cocos2d::PhysicsShapeEdgeChain *create(const cocos2d::Vec2 *points, int count, @optional const cocos2d::PhysicsMaterial &material, @optional float border) - return _cocos2d_PhysicsShapeEdgeChain_create$2(L); + // static cocos2d::PhysicsShapeEdgeChain *create(const cocos2d::Vec2 *points, int count) + return _olua_fun_cocos2d_PhysicsShapeEdgeChain_create$2(L); // } } if (num_args == 3) { // if ((olua_is_object(L, 1, "cc.Vec2")) && (olua_is_integer(L, 2)) && (olua_is_object(L, 3, "cc.PhysicsMaterial"))) { - // static cocos2d::PhysicsShapeEdgeChain *create(const cocos2d::Vec2 *points, int count, @optional const cocos2d::PhysicsMaterial &material, @optional float border) - return _cocos2d_PhysicsShapeEdgeChain_create$3(L); + // static cocos2d::PhysicsShapeEdgeChain *create(const cocos2d::Vec2 *points, int count, @optional const cocos2d::PhysicsMaterial &material) + return _olua_fun_cocos2d_PhysicsShapeEdgeChain_create$3(L); // } } if (num_args == 4) { // if ((olua_is_object(L, 1, "cc.Vec2")) && (olua_is_integer(L, 2)) && (olua_is_object(L, 3, "cc.PhysicsMaterial")) && (olua_is_number(L, 4))) { // static cocos2d::PhysicsShapeEdgeChain *create(const cocos2d::Vec2 *points, int count, @optional const cocos2d::PhysicsMaterial &material, @optional float border) - return _cocos2d_PhysicsShapeEdgeChain_create$1(L); + return _olua_fun_cocos2d_PhysicsShapeEdgeChain_create$1(L); // } } @@ -7007,7 +7339,7 @@ static int _cocos2d_PhysicsShapeEdgeChain_create(lua_State *L) return 0; } -static int _cocos2d_PhysicsShapeEdgeChain_getPoints(lua_State *L) +static int _olua_fun_cocos2d_PhysicsShapeEdgeChain_getPoints(lua_State *L) { olua_startinvoke(L); @@ -7025,7 +7357,7 @@ static int _cocos2d_PhysicsShapeEdgeChain_getPoints(lua_State *L) return 0; } -static int _cocos2d_PhysicsShapeEdgeChain_getPointsCount(lua_State *L) +static int _olua_fun_cocos2d_PhysicsShapeEdgeChain_getPointsCount(lua_State *L) { olua_startinvoke(L); @@ -7042,28 +7374,37 @@ static int _cocos2d_PhysicsShapeEdgeChain_getPointsCount(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_PhysicsShapeEdgeChain(lua_State *L) +static int _olua_cls_cc_PhysicsShapeEdgeChain(lua_State *L) { oluacls_class(L, "cc.PhysicsShapeEdgeChain"); - oluacls_func(L, "create", _cocos2d_PhysicsShapeEdgeChain_create); - oluacls_func(L, "getPoints", _cocos2d_PhysicsShapeEdgeChain_getPoints); - oluacls_func(L, "getPointsCount", _cocos2d_PhysicsShapeEdgeChain_getPointsCount); - oluacls_prop(L, "pointsCount", _cocos2d_PhysicsShapeEdgeChain_getPointsCount, nullptr); + oluacls_func(L, "create", _olua_fun_cocos2d_PhysicsShapeEdgeChain_create); + oluacls_func(L, "getPoints", _olua_fun_cocos2d_PhysicsShapeEdgeChain_getPoints); + oluacls_func(L, "getPointsCount", _olua_fun_cocos2d_PhysicsShapeEdgeChain_getPointsCount); + oluacls_prop(L, "pointsCount", _olua_fun_cocos2d_PhysicsShapeEdgeChain_getPointsCount, nullptr); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_PhysicsShapeEdgeChain(lua_State *L) +{ + olua_require(L, "cocos2d_physics", luaopen_cocos2d_physics); + if (!olua_getclass(L, "cc.PhysicsShapeEdgeChain")) { + luaL_error(L, "class not found: cocos2d::PhysicsShapeEdgeChain"); + } + return 1; +} OLUA_END_DECLS #endif #if CC_USE_PHYSICS -static int _cocos2d_PhysicsShapeEdgeSegment_create$1(lua_State *L) +static int _olua_fun_cocos2d_PhysicsShapeEdgeSegment_create$1(lua_State *L) { olua_startinvoke(L); - cocos2d::Vec2 arg1; /** a */ - cocos2d::Vec2 arg2; /** b */ - cocos2d::PhysicsMaterial arg3; /** material */ + cocos2d::Vec2 *arg1; /** a */ + cocos2d::Vec2 *arg2; /** b */ + cocos2d::PhysicsMaterial *arg3; /** material */ float arg4 = 0; /** border */ olua_check_object(L, 1, &arg1, "cc.Vec2"); @@ -7072,7 +7413,7 @@ static int _cocos2d_PhysicsShapeEdgeSegment_create$1(lua_State *L) olua_check_number(L, 4, &arg4); // static cocos2d::PhysicsShapeEdgeSegment *create(const cocos2d::Vec2 &a, const cocos2d::Vec2 &b, @optional const cocos2d::PhysicsMaterial &material, @optional float border) - cocos2d::PhysicsShapeEdgeSegment *ret = cocos2d::PhysicsShapeEdgeSegment::create(arg1, arg2, arg3, arg4); + cocos2d::PhysicsShapeEdgeSegment *ret = cocos2d::PhysicsShapeEdgeSegment::create(*arg1, *arg2, *arg3, arg4); int num_ret = olua_push_object(L, ret, "cc.PhysicsShapeEdgeSegment"); olua_endinvoke(L); @@ -7080,18 +7421,18 @@ static int _cocos2d_PhysicsShapeEdgeSegment_create$1(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsShapeEdgeSegment_create$2(lua_State *L) +static int _olua_fun_cocos2d_PhysicsShapeEdgeSegment_create$2(lua_State *L) { olua_startinvoke(L); - cocos2d::Vec2 arg1; /** a */ - cocos2d::Vec2 arg2; /** b */ + cocos2d::Vec2 *arg1; /** a */ + cocos2d::Vec2 *arg2; /** b */ olua_check_object(L, 1, &arg1, "cc.Vec2"); olua_check_object(L, 2, &arg2, "cc.Vec2"); - // static cocos2d::PhysicsShapeEdgeSegment *create(const cocos2d::Vec2 &a, const cocos2d::Vec2 &b, @optional const cocos2d::PhysicsMaterial &material, @optional float border) - cocos2d::PhysicsShapeEdgeSegment *ret = cocos2d::PhysicsShapeEdgeSegment::create(arg1, arg2); + // static cocos2d::PhysicsShapeEdgeSegment *create(const cocos2d::Vec2 &a, const cocos2d::Vec2 &b) + cocos2d::PhysicsShapeEdgeSegment *ret = cocos2d::PhysicsShapeEdgeSegment::create(*arg1, *arg2); int num_ret = olua_push_object(L, ret, "cc.PhysicsShapeEdgeSegment"); olua_endinvoke(L); @@ -7099,20 +7440,20 @@ static int _cocos2d_PhysicsShapeEdgeSegment_create$2(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsShapeEdgeSegment_create$3(lua_State *L) +static int _olua_fun_cocos2d_PhysicsShapeEdgeSegment_create$3(lua_State *L) { olua_startinvoke(L); - cocos2d::Vec2 arg1; /** a */ - cocos2d::Vec2 arg2; /** b */ - cocos2d::PhysicsMaterial arg3; /** material */ + cocos2d::Vec2 *arg1; /** a */ + cocos2d::Vec2 *arg2; /** b */ + cocos2d::PhysicsMaterial *arg3; /** material */ olua_check_object(L, 1, &arg1, "cc.Vec2"); olua_check_object(L, 2, &arg2, "cc.Vec2"); olua_check_object(L, 3, &arg3, "cc.PhysicsMaterial"); - // static cocos2d::PhysicsShapeEdgeSegment *create(const cocos2d::Vec2 &a, const cocos2d::Vec2 &b, @optional const cocos2d::PhysicsMaterial &material, @optional float border) - cocos2d::PhysicsShapeEdgeSegment *ret = cocos2d::PhysicsShapeEdgeSegment::create(arg1, arg2, arg3); + // static cocos2d::PhysicsShapeEdgeSegment *create(const cocos2d::Vec2 &a, const cocos2d::Vec2 &b, @optional const cocos2d::PhysicsMaterial &material) + cocos2d::PhysicsShapeEdgeSegment *ret = cocos2d::PhysicsShapeEdgeSegment::create(*arg1, *arg2, *arg3); int num_ret = olua_push_object(L, ret, "cc.PhysicsShapeEdgeSegment"); olua_endinvoke(L); @@ -7120,28 +7461,28 @@ static int _cocos2d_PhysicsShapeEdgeSegment_create$3(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsShapeEdgeSegment_create(lua_State *L) +static int _olua_fun_cocos2d_PhysicsShapeEdgeSegment_create(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 2) { // if ((olua_is_object(L, 1, "cc.Vec2")) && (olua_is_object(L, 2, "cc.Vec2"))) { - // static cocos2d::PhysicsShapeEdgeSegment *create(const cocos2d::Vec2 &a, const cocos2d::Vec2 &b, @optional const cocos2d::PhysicsMaterial &material, @optional float border) - return _cocos2d_PhysicsShapeEdgeSegment_create$2(L); + // static cocos2d::PhysicsShapeEdgeSegment *create(const cocos2d::Vec2 &a, const cocos2d::Vec2 &b) + return _olua_fun_cocos2d_PhysicsShapeEdgeSegment_create$2(L); // } } if (num_args == 3) { // if ((olua_is_object(L, 1, "cc.Vec2")) && (olua_is_object(L, 2, "cc.Vec2")) && (olua_is_object(L, 3, "cc.PhysicsMaterial"))) { - // static cocos2d::PhysicsShapeEdgeSegment *create(const cocos2d::Vec2 &a, const cocos2d::Vec2 &b, @optional const cocos2d::PhysicsMaterial &material, @optional float border) - return _cocos2d_PhysicsShapeEdgeSegment_create$3(L); + // static cocos2d::PhysicsShapeEdgeSegment *create(const cocos2d::Vec2 &a, const cocos2d::Vec2 &b, @optional const cocos2d::PhysicsMaterial &material) + return _olua_fun_cocos2d_PhysicsShapeEdgeSegment_create$3(L); // } } if (num_args == 4) { // if ((olua_is_object(L, 1, "cc.Vec2")) && (olua_is_object(L, 2, "cc.Vec2")) && (olua_is_object(L, 3, "cc.PhysicsMaterial")) && (olua_is_number(L, 4))) { // static cocos2d::PhysicsShapeEdgeSegment *create(const cocos2d::Vec2 &a, const cocos2d::Vec2 &b, @optional const cocos2d::PhysicsMaterial &material, @optional float border) - return _cocos2d_PhysicsShapeEdgeSegment_create$1(L); + return _olua_fun_cocos2d_PhysicsShapeEdgeSegment_create$1(L); // } } @@ -7150,7 +7491,7 @@ static int _cocos2d_PhysicsShapeEdgeSegment_create(lua_State *L) return 0; } -static int _cocos2d_PhysicsShapeEdgeSegment_getPointA(lua_State *L) +static int _olua_fun_cocos2d_PhysicsShapeEdgeSegment_getPointA(lua_State *L) { olua_startinvoke(L); @@ -7160,14 +7501,14 @@ static int _cocos2d_PhysicsShapeEdgeSegment_getPointA(lua_State *L) // cocos2d::Vec2 getPointA() cocos2d::Vec2 ret = self->getPointA(); - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec2"); + int num_ret = olua_copy_object(L, ret, "cc.Vec2"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_PhysicsShapeEdgeSegment_getPointB(lua_State *L) +static int _olua_fun_cocos2d_PhysicsShapeEdgeSegment_getPointB(lua_State *L) { olua_startinvoke(L); @@ -7177,88 +7518,39 @@ static int _cocos2d_PhysicsShapeEdgeSegment_getPointB(lua_State *L) // cocos2d::Vec2 getPointB() cocos2d::Vec2 ret = self->getPointB(); - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec2"); + int num_ret = olua_copy_object(L, ret, "cc.Vec2"); olua_endinvoke(L); return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_PhysicsShapeEdgeSegment(lua_State *L) +static int _olua_cls_cc_PhysicsShapeEdgeSegment(lua_State *L) { oluacls_class(L, "cc.PhysicsShapeEdgeSegment"); - oluacls_func(L, "create", _cocos2d_PhysicsShapeEdgeSegment_create); - oluacls_func(L, "getPointA", _cocos2d_PhysicsShapeEdgeSegment_getPointA); - oluacls_func(L, "getPointB", _cocos2d_PhysicsShapeEdgeSegment_getPointB); - oluacls_prop(L, "pointA", _cocos2d_PhysicsShapeEdgeSegment_getPointA, nullptr); - oluacls_prop(L, "pointB", _cocos2d_PhysicsShapeEdgeSegment_getPointB, nullptr); + oluacls_func(L, "create", _olua_fun_cocos2d_PhysicsShapeEdgeSegment_create); + oluacls_func(L, "getPointA", _olua_fun_cocos2d_PhysicsShapeEdgeSegment_getPointA); + oluacls_func(L, "getPointB", _olua_fun_cocos2d_PhysicsShapeEdgeSegment_getPointB); + oluacls_prop(L, "pointA", _olua_fun_cocos2d_PhysicsShapeEdgeSegment_getPointA, nullptr); + oluacls_prop(L, "pointB", _olua_fun_cocos2d_PhysicsShapeEdgeSegment_getPointB, nullptr); return 1; } -OLUA_END_DECLS -#endif -#if CC_USE_PHYSICS -static int _cocos2d_PhysicsRayCastInfo___call(lua_State *L) +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_PhysicsShapeEdgeSegment(lua_State *L) { - olua_startinvoke(L); - - cocos2d::PhysicsRayCastInfo ret; - - luaL_checktype(L, 2, LUA_TTABLE); - - cocos2d::PhysicsShape *arg1 = nullptr; /** shape */ - cocos2d::Vec2 arg2; /** start */ - cocos2d::Vec2 arg3; /** end */ - cocos2d::Vec2 arg4; /** contact */ - cocos2d::Vec2 arg5; /** normal */ - float arg6 = 0; /** fraction */ - void *arg7 = nullptr; /** data */ - - olua_getfield(L, 2, "shape"); - olua_check_object(L, -1, &arg1, "cc.PhysicsShape"); - ret.shape = arg1; - lua_pop(L, 1); - - olua_getfield(L, 2, "start"); - olua_check_object(L, -1, &arg2, "cc.Vec2"); - ret.start = arg2; - lua_pop(L, 1); - - olua_getfield(L, 2, "end"); - olua_check_object(L, -1, &arg3, "cc.Vec2"); - ret.end = arg3; - lua_pop(L, 1); - - olua_getfield(L, 2, "contact"); - olua_check_object(L, -1, &arg4, "cc.Vec2"); - ret.contact = arg4; - lua_pop(L, 1); - - olua_getfield(L, 2, "normal"); - olua_check_object(L, -1, &arg5, "cc.Vec2"); - ret.normal = arg5; - lua_pop(L, 1); - - olua_getfield(L, 2, "fraction"); - olua_check_number(L, -1, &arg6); - ret.fraction = arg6; - lua_pop(L, 1); - - olua_getfield(L, 2, "data"); - olua_check_object(L, -1, &arg7, "void *"); - ret.data = arg7; - lua_pop(L, 1); - - olua_pushcopy_object(L, ret, "cc.PhysicsRayCastInfo"); - - olua_endinvoke(L); - + olua_require(L, "cocos2d_physics", luaopen_cocos2d_physics); + if (!olua_getclass(L, "cc.PhysicsShapeEdgeSegment")) { + luaL_error(L, "class not found: cocos2d::PhysicsShapeEdgeSegment"); + } return 1; } +OLUA_END_DECLS +#endif -static int _cocos2d_PhysicsRayCastInfo___gc(lua_State *L) +#if CC_USE_PHYSICS +static int _olua_fun_cocos2d_PhysicsRayCastInfo___gc(lua_State *L) { olua_startinvoke(L); @@ -7270,7 +7562,7 @@ static int _cocos2d_PhysicsRayCastInfo___gc(lua_State *L) return 0; } -static int _cocos2d_PhysicsRayCastInfo___olua_move(lua_State *L) +static int _olua_fun_cocos2d_PhysicsRayCastInfo___olua_move(lua_State *L) { olua_startinvoke(L); @@ -7282,7 +7574,7 @@ static int _cocos2d_PhysicsRayCastInfo___olua_move(lua_State *L) return 1; } -static int _cocos2d_PhysicsRayCastInfo_get_contact(lua_State *L) +static int _olua_fun_cocos2d_PhysicsRayCastInfo_contact$1(lua_State *L) { olua_startinvoke(L); @@ -7292,32 +7584,53 @@ static int _cocos2d_PhysicsRayCastInfo_get_contact(lua_State *L) // cocos2d::Vec2 contact cocos2d::Vec2 &ret = self->contact; - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec2"); + int num_ret = olua_copy_object(L, ret, "cc.Vec2"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_PhysicsRayCastInfo_set_contact(lua_State *L) +static int _olua_fun_cocos2d_PhysicsRayCastInfo_contact$2(lua_State *L) { olua_startinvoke(L); cocos2d::PhysicsRayCastInfo *self = nullptr; - cocos2d::Vec2 arg1; /** contact */ + cocos2d::Vec2 *arg1; /** contact */ olua_to_object(L, 1, &self, "cc.PhysicsRayCastInfo"); olua_check_object(L, 2, &arg1, "cc.Vec2"); // cocos2d::Vec2 contact - self->contact = arg1; + self->contact = *arg1; olua_endinvoke(L); return 0; } -static int _cocos2d_PhysicsRayCastInfo_get_data(lua_State *L) +static int _olua_fun_cocos2d_PhysicsRayCastInfo_contact(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // cocos2d::Vec2 contact + return _olua_fun_cocos2d_PhysicsRayCastInfo_contact$1(L); + } + + if (num_args == 1) { + // if ((olua_is_object(L, 2, "cc.Vec2"))) { + // cocos2d::Vec2 contact + return _olua_fun_cocos2d_PhysicsRayCastInfo_contact$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::PhysicsRayCastInfo::contact' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_PhysicsRayCastInfo_data$1(lua_State *L) { olua_startinvoke(L); @@ -7334,7 +7647,7 @@ static int _cocos2d_PhysicsRayCastInfo_get_data(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsRayCastInfo_set_data(lua_State *L) +static int _olua_fun_cocos2d_PhysicsRayCastInfo_data$2(lua_State *L) { olua_startinvoke(L); @@ -7352,7 +7665,28 @@ static int _cocos2d_PhysicsRayCastInfo_set_data(lua_State *L) return 0; } -static int _cocos2d_PhysicsRayCastInfo_get_end(lua_State *L) +static int _olua_fun_cocos2d_PhysicsRayCastInfo_data(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // void *data + return _olua_fun_cocos2d_PhysicsRayCastInfo_data$1(L); + } + + if (num_args == 1) { + // if ((olua_is_object(L, 2, "void *"))) { + // void *data + return _olua_fun_cocos2d_PhysicsRayCastInfo_data$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::PhysicsRayCastInfo::data' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_PhysicsRayCastInfo_end$1(lua_State *L) { olua_startinvoke(L); @@ -7362,32 +7696,53 @@ static int _cocos2d_PhysicsRayCastInfo_get_end(lua_State *L) // cocos2d::Vec2 end cocos2d::Vec2 &ret = self->end; - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec2"); + int num_ret = olua_copy_object(L, ret, "cc.Vec2"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_PhysicsRayCastInfo_set_end(lua_State *L) +static int _olua_fun_cocos2d_PhysicsRayCastInfo_end$2(lua_State *L) { olua_startinvoke(L); cocos2d::PhysicsRayCastInfo *self = nullptr; - cocos2d::Vec2 arg1; /** end */ + cocos2d::Vec2 *arg1; /** end */ olua_to_object(L, 1, &self, "cc.PhysicsRayCastInfo"); olua_check_object(L, 2, &arg1, "cc.Vec2"); // cocos2d::Vec2 end - self->end = arg1; + self->end = *arg1; olua_endinvoke(L); return 0; } -static int _cocos2d_PhysicsRayCastInfo_get_fraction(lua_State *L) +static int _olua_fun_cocos2d_PhysicsRayCastInfo_end(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // cocos2d::Vec2 end + return _olua_fun_cocos2d_PhysicsRayCastInfo_end$1(L); + } + + if (num_args == 1) { + // if ((olua_is_object(L, 2, "cc.Vec2"))) { + // cocos2d::Vec2 end + return _olua_fun_cocos2d_PhysicsRayCastInfo_end$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::PhysicsRayCastInfo::end' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_PhysicsRayCastInfo_fraction$1(lua_State *L) { olua_startinvoke(L); @@ -7404,7 +7759,7 @@ static int _cocos2d_PhysicsRayCastInfo_get_fraction(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsRayCastInfo_set_fraction(lua_State *L) +static int _olua_fun_cocos2d_PhysicsRayCastInfo_fraction$2(lua_State *L) { olua_startinvoke(L); @@ -7422,7 +7777,28 @@ static int _cocos2d_PhysicsRayCastInfo_set_fraction(lua_State *L) return 0; } -static int _cocos2d_PhysicsRayCastInfo_get_normal(lua_State *L) +static int _olua_fun_cocos2d_PhysicsRayCastInfo_fraction(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float fraction + return _olua_fun_cocos2d_PhysicsRayCastInfo_fraction$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float fraction + return _olua_fun_cocos2d_PhysicsRayCastInfo_fraction$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::PhysicsRayCastInfo::fraction' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_PhysicsRayCastInfo_normal$1(lua_State *L) { olua_startinvoke(L); @@ -7432,32 +7808,53 @@ static int _cocos2d_PhysicsRayCastInfo_get_normal(lua_State *L) // cocos2d::Vec2 normal cocos2d::Vec2 &ret = self->normal; - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec2"); + int num_ret = olua_copy_object(L, ret, "cc.Vec2"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_PhysicsRayCastInfo_set_normal(lua_State *L) +static int _olua_fun_cocos2d_PhysicsRayCastInfo_normal$2(lua_State *L) { olua_startinvoke(L); cocos2d::PhysicsRayCastInfo *self = nullptr; - cocos2d::Vec2 arg1; /** normal */ + cocos2d::Vec2 *arg1; /** normal */ olua_to_object(L, 1, &self, "cc.PhysicsRayCastInfo"); olua_check_object(L, 2, &arg1, "cc.Vec2"); // cocos2d::Vec2 normal - self->normal = arg1; + self->normal = *arg1; olua_endinvoke(L); return 0; } -static int _cocos2d_PhysicsRayCastInfo_get_shape(lua_State *L) +static int _olua_fun_cocos2d_PhysicsRayCastInfo_normal(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // cocos2d::Vec2 normal + return _olua_fun_cocos2d_PhysicsRayCastInfo_normal$1(L); + } + + if (num_args == 1) { + // if ((olua_is_object(L, 2, "cc.Vec2"))) { + // cocos2d::Vec2 normal + return _olua_fun_cocos2d_PhysicsRayCastInfo_normal$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::PhysicsRayCastInfo::normal' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_PhysicsRayCastInfo_shape$1(lua_State *L) { olua_startinvoke(L); @@ -7474,7 +7871,7 @@ static int _cocos2d_PhysicsRayCastInfo_get_shape(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsRayCastInfo_set_shape(lua_State *L) +static int _olua_fun_cocos2d_PhysicsRayCastInfo_shape$2(lua_State *L) { olua_startinvoke(L); @@ -7492,7 +7889,28 @@ static int _cocos2d_PhysicsRayCastInfo_set_shape(lua_State *L) return 0; } -static int _cocos2d_PhysicsRayCastInfo_get_start(lua_State *L) +static int _olua_fun_cocos2d_PhysicsRayCastInfo_shape(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // cocos2d::PhysicsShape *shape + return _olua_fun_cocos2d_PhysicsRayCastInfo_shape$1(L); + } + + if (num_args == 1) { + // if ((olua_is_object(L, 2, "cc.PhysicsShape"))) { + // cocos2d::PhysicsShape *shape + return _olua_fun_cocos2d_PhysicsRayCastInfo_shape$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::PhysicsRayCastInfo::shape' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_PhysicsRayCastInfo_start$1(lua_State *L) { olua_startinvoke(L); @@ -7502,53 +7920,82 @@ static int _cocos2d_PhysicsRayCastInfo_get_start(lua_State *L) // cocos2d::Vec2 start cocos2d::Vec2 &ret = self->start; - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec2"); + int num_ret = olua_copy_object(L, ret, "cc.Vec2"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_PhysicsRayCastInfo_set_start(lua_State *L) +static int _olua_fun_cocos2d_PhysicsRayCastInfo_start$2(lua_State *L) { olua_startinvoke(L); cocos2d::PhysicsRayCastInfo *self = nullptr; - cocos2d::Vec2 arg1; /** start */ + cocos2d::Vec2 *arg1; /** start */ olua_to_object(L, 1, &self, "cc.PhysicsRayCastInfo"); olua_check_object(L, 2, &arg1, "cc.Vec2"); // cocos2d::Vec2 start - self->start = arg1; + self->start = *arg1; olua_endinvoke(L); return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_PhysicsRayCastInfo(lua_State *L) +static int _olua_fun_cocos2d_PhysicsRayCastInfo_start(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // cocos2d::Vec2 start + return _olua_fun_cocos2d_PhysicsRayCastInfo_start$1(L); + } + + if (num_args == 1) { + // if ((olua_is_object(L, 2, "cc.Vec2"))) { + // cocos2d::Vec2 start + return _olua_fun_cocos2d_PhysicsRayCastInfo_start$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::PhysicsRayCastInfo::start' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_cls_cc_PhysicsRayCastInfo(lua_State *L) { oluacls_class(L, "cc.PhysicsRayCastInfo"); - oluacls_func(L, "__call", _cocos2d_PhysicsRayCastInfo___call); - oluacls_func(L, "__gc", _cocos2d_PhysicsRayCastInfo___gc); - oluacls_func(L, "__olua_move", _cocos2d_PhysicsRayCastInfo___olua_move); - oluacls_prop(L, "contact", _cocos2d_PhysicsRayCastInfo_get_contact, _cocos2d_PhysicsRayCastInfo_set_contact); - oluacls_prop(L, "data", _cocos2d_PhysicsRayCastInfo_get_data, _cocos2d_PhysicsRayCastInfo_set_data); - oluacls_prop(L, "end", _cocos2d_PhysicsRayCastInfo_get_end, _cocos2d_PhysicsRayCastInfo_set_end); - oluacls_prop(L, "fraction", _cocos2d_PhysicsRayCastInfo_get_fraction, _cocos2d_PhysicsRayCastInfo_set_fraction); - oluacls_prop(L, "normal", _cocos2d_PhysicsRayCastInfo_get_normal, _cocos2d_PhysicsRayCastInfo_set_normal); - oluacls_prop(L, "shape", _cocos2d_PhysicsRayCastInfo_get_shape, _cocos2d_PhysicsRayCastInfo_set_shape); - oluacls_prop(L, "start", _cocos2d_PhysicsRayCastInfo_get_start, _cocos2d_PhysicsRayCastInfo_set_start); + oluacls_func(L, "__gc", _olua_fun_cocos2d_PhysicsRayCastInfo___gc); + oluacls_func(L, "__olua_move", _olua_fun_cocos2d_PhysicsRayCastInfo___olua_move); + oluacls_prop(L, "contact", _olua_fun_cocos2d_PhysicsRayCastInfo_contact, _olua_fun_cocos2d_PhysicsRayCastInfo_contact); + oluacls_prop(L, "data", _olua_fun_cocos2d_PhysicsRayCastInfo_data, _olua_fun_cocos2d_PhysicsRayCastInfo_data); + oluacls_prop(L, "end", _olua_fun_cocos2d_PhysicsRayCastInfo_end, _olua_fun_cocos2d_PhysicsRayCastInfo_end); + oluacls_prop(L, "fraction", _olua_fun_cocos2d_PhysicsRayCastInfo_fraction, _olua_fun_cocos2d_PhysicsRayCastInfo_fraction); + oluacls_prop(L, "normal", _olua_fun_cocos2d_PhysicsRayCastInfo_normal, _olua_fun_cocos2d_PhysicsRayCastInfo_normal); + oluacls_prop(L, "shape", _olua_fun_cocos2d_PhysicsRayCastInfo_shape, _olua_fun_cocos2d_PhysicsRayCastInfo_shape); + oluacls_prop(L, "start", _olua_fun_cocos2d_PhysicsRayCastInfo_start, _olua_fun_cocos2d_PhysicsRayCastInfo_start); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_PhysicsRayCastInfo(lua_State *L) +{ + olua_require(L, "cocos2d_physics", luaopen_cocos2d_physics); + if (!olua_getclass(L, "cc.PhysicsRayCastInfo")) { + luaL_error(L, "class not found: cocos2d::PhysicsRayCastInfo"); + } return 1; } OLUA_END_DECLS #endif #if CC_USE_PHYSICS -static int _cocos2d_PhysicsWorld___olua_move(lua_State *L) +static int _olua_fun_cocos2d_PhysicsWorld___olua_move(lua_State *L) { olua_startinvoke(L); @@ -7560,7 +8007,7 @@ static int _cocos2d_PhysicsWorld___olua_move(lua_State *L) return 1; } -static int _cocos2d_PhysicsWorld_addJoint(lua_State *L) +static int _olua_fun_cocos2d_PhysicsWorld_addJoint(lua_State *L) { olua_startinvoke(L); @@ -7578,7 +8025,7 @@ static int _cocos2d_PhysicsWorld_addJoint(lua_State *L) return 0; } -static int _cocos2d_PhysicsWorld_getAllBodies(lua_State *L) +static int _olua_fun_cocos2d_PhysicsWorld_getAllBodies(lua_State *L) { olua_startinvoke(L); @@ -7597,7 +8044,7 @@ static int _cocos2d_PhysicsWorld_getAllBodies(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsWorld_getBody(lua_State *L) +static int _olua_fun_cocos2d_PhysicsWorld_getBody(lua_State *L) { olua_startinvoke(L); @@ -7616,7 +8063,7 @@ static int _cocos2d_PhysicsWorld_getBody(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsWorld_getDebugDrawMask(lua_State *L) +static int _olua_fun_cocos2d_PhysicsWorld_getDebugDrawMask(lua_State *L) { olua_startinvoke(L); @@ -7633,7 +8080,7 @@ static int _cocos2d_PhysicsWorld_getDebugDrawMask(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsWorld_getFixedUpdateRate(lua_State *L) +static int _olua_fun_cocos2d_PhysicsWorld_getFixedUpdateRate(lua_State *L) { olua_startinvoke(L); @@ -7650,7 +8097,7 @@ static int _cocos2d_PhysicsWorld_getFixedUpdateRate(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsWorld_getGravity(lua_State *L) +static int _olua_fun_cocos2d_PhysicsWorld_getGravity(lua_State *L) { olua_startinvoke(L); @@ -7660,14 +8107,14 @@ static int _cocos2d_PhysicsWorld_getGravity(lua_State *L) // cocos2d::Vec2 getGravity() cocos2d::Vec2 ret = self->getGravity(); - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec2"); + int num_ret = olua_copy_object(L, ret, "cc.Vec2"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_PhysicsWorld_getScene(lua_State *L) +static int _olua_fun_cocos2d_PhysicsWorld_getScene(lua_State *L) { olua_startinvoke(L); @@ -7684,18 +8131,18 @@ static int _cocos2d_PhysicsWorld_getScene(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsWorld_getShape(lua_State *L) +static int _olua_fun_cocos2d_PhysicsWorld_getShape(lua_State *L) { olua_startinvoke(L); cocos2d::PhysicsWorld *self = nullptr; - cocos2d::Vec2 arg1; /** point */ + cocos2d::Vec2 *arg1; /** point */ olua_to_object(L, 1, &self, "cc.PhysicsWorld"); olua_check_object(L, 2, &arg1, "cc.Vec2"); // cocos2d::PhysicsShape *getShape(const cocos2d::Vec2 &point) - cocos2d::PhysicsShape *ret = self->getShape(arg1); + cocos2d::PhysicsShape *ret = self->getShape(*arg1); int num_ret = olua_push_object(L, ret, "cc.PhysicsShape"); olua_endinvoke(L); @@ -7703,18 +8150,18 @@ static int _cocos2d_PhysicsWorld_getShape(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsWorld_getShapes(lua_State *L) +static int _olua_fun_cocos2d_PhysicsWorld_getShapes(lua_State *L) { olua_startinvoke(L); cocos2d::PhysicsWorld *self = nullptr; - cocos2d::Vec2 arg1; /** point */ + cocos2d::Vec2 *arg1; /** point */ olua_to_object(L, 1, &self, "cc.PhysicsWorld"); olua_check_object(L, 2, &arg1, "cc.Vec2"); // cocos2d::Vector getShapes(const cocos2d::Vec2 &point) - cocos2d::Vector ret = self->getShapes(arg1); + cocos2d::Vector ret = self->getShapes(*arg1); int num_ret = olua_push_array(L, ret, [L](cocos2d::PhysicsShape *arg1) { olua_push_object(L, arg1, "cc.PhysicsShape"); }); @@ -7724,7 +8171,7 @@ static int _cocos2d_PhysicsWorld_getShapes(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsWorld_getSpeed(lua_State *L) +static int _olua_fun_cocos2d_PhysicsWorld_getSpeed(lua_State *L) { olua_startinvoke(L); @@ -7741,7 +8188,7 @@ static int _cocos2d_PhysicsWorld_getSpeed(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsWorld_getSubsteps(lua_State *L) +static int _olua_fun_cocos2d_PhysicsWorld_getSubsteps(lua_State *L) { olua_startinvoke(L); @@ -7758,7 +8205,7 @@ static int _cocos2d_PhysicsWorld_getSubsteps(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsWorld_getUpdateRate(lua_State *L) +static int _olua_fun_cocos2d_PhysicsWorld_getUpdateRate(lua_State *L) { olua_startinvoke(L); @@ -7775,7 +8222,7 @@ static int _cocos2d_PhysicsWorld_getUpdateRate(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsWorld_isAutoStep(lua_State *L) +static int _olua_fun_cocos2d_PhysicsWorld_isAutoStep(lua_State *L) { olua_startinvoke(L); @@ -7792,13 +8239,13 @@ static int _cocos2d_PhysicsWorld_isAutoStep(lua_State *L) return num_ret; } -static int _cocos2d_PhysicsWorld_queryPoint(lua_State *L) +static int _olua_fun_cocos2d_PhysicsWorld_queryPoint(lua_State *L) { olua_startinvoke(L); cocos2d::PhysicsWorld *self = nullptr; cocos2d::PhysicsQueryPointCallbackFunc arg1; /** func */ - cocos2d::Vec2 arg2; /** point */ + cocos2d::Vec2 *arg2; /** point */ void *arg3 = nullptr; /** data */ olua_to_object(L, 1, &self, "cc.PhysicsWorld"); @@ -7808,9 +8255,10 @@ static int _cocos2d_PhysicsWorld_queryPoint(lua_State *L) void *cb_store = (void *)self; std::string cb_tag = "queryPoint"; - std::string cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + std::string cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](cocos2d::PhysicsWorld &arg1, cocos2d::PhysicsShape &arg2, void *arg3) { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](cocos2d::PhysicsWorld &cb_arg1, cocos2d::PhysicsShape &cb_arg2, void *cb_arg3) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); bool ret = false; /** ret */ @@ -7818,9 +8266,9 @@ static int _cocos2d_PhysicsWorld_queryPoint(lua_State *L) int top = lua_gettop(L); size_t last = olua_push_objpool(L); olua_enable_objpool(L); - olua_push_object(L, &arg1, "cc.PhysicsWorld"); - olua_push_object(L, &arg2, "cc.PhysicsShape"); - olua_push_object(L, arg3, "void *"); + olua_push_object(L, &cb_arg1, "cc.PhysicsWorld"); + olua_push_object(L, &cb_arg2, "cc.PhysicsShape"); + olua_push_object(L, cb_arg3, "void *"); olua_disable_objpool(L); olua_callback(L, cb_store, cb_name.c_str(), 3); @@ -7836,21 +8284,21 @@ static int _cocos2d_PhysicsWorld_queryPoint(lua_State *L) return ret; }; - // void queryPoint(@localvar cocos2d::PhysicsQueryPointCallbackFunc func, const cocos2d::Vec2 &point, void *data) - self->queryPoint(arg1, arg2, arg3); + // void queryPoint(cocos2d::PhysicsQueryPointCallbackFunc func, const cocos2d::Vec2 &point, void *data) + self->queryPoint(arg1, *arg2, arg3); olua_endinvoke(L); return 0; } -static int _cocos2d_PhysicsWorld_queryRect(lua_State *L) +static int _olua_fun_cocos2d_PhysicsWorld_queryRect(lua_State *L) { olua_startinvoke(L); cocos2d::PhysicsWorld *self = nullptr; cocos2d::PhysicsQueryRectCallbackFunc arg1; /** func */ - cocos2d::Rect arg2; /** rect */ + cocos2d::Rect *arg2; /** rect */ void *arg3 = nullptr; /** data */ olua_to_object(L, 1, &self, "cc.PhysicsWorld"); @@ -7860,9 +8308,10 @@ static int _cocos2d_PhysicsWorld_queryRect(lua_State *L) void *cb_store = (void *)self; std::string cb_tag = "queryRect"; - std::string cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + std::string cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](cocos2d::PhysicsWorld &arg1, cocos2d::PhysicsShape &arg2, void *arg3) { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](cocos2d::PhysicsWorld &cb_arg1, cocos2d::PhysicsShape &cb_arg2, void *cb_arg3) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); bool ret = false; /** ret */ @@ -7870,9 +8319,9 @@ static int _cocos2d_PhysicsWorld_queryRect(lua_State *L) int top = lua_gettop(L); size_t last = olua_push_objpool(L); olua_enable_objpool(L); - olua_push_object(L, &arg1, "cc.PhysicsWorld"); - olua_push_object(L, &arg2, "cc.PhysicsShape"); - olua_push_object(L, arg3, "void *"); + olua_push_object(L, &cb_arg1, "cc.PhysicsWorld"); + olua_push_object(L, &cb_arg2, "cc.PhysicsShape"); + olua_push_object(L, cb_arg3, "void *"); olua_disable_objpool(L); olua_callback(L, cb_store, cb_name.c_str(), 3); @@ -7888,22 +8337,22 @@ static int _cocos2d_PhysicsWorld_queryRect(lua_State *L) return ret; }; - // void queryRect(@localvar cocos2d::PhysicsQueryRectCallbackFunc func, const cocos2d::Rect &rect, void *data) - self->queryRect(arg1, arg2, arg3); + // void queryRect(cocos2d::PhysicsQueryRectCallbackFunc func, const cocos2d::Rect &rect, void *data) + self->queryRect(arg1, *arg2, arg3); olua_endinvoke(L); return 0; } -static int _cocos2d_PhysicsWorld_rayCast(lua_State *L) +static int _olua_fun_cocos2d_PhysicsWorld_rayCast(lua_State *L) { olua_startinvoke(L); cocos2d::PhysicsWorld *self = nullptr; cocos2d::PhysicsRayCastCallbackFunc arg1; /** func */ - cocos2d::Vec2 arg2; /** start */ - cocos2d::Vec2 arg3; /** end */ + cocos2d::Vec2 *arg2; /** start */ + cocos2d::Vec2 *arg3; /** end_ */ void *arg4 = nullptr; /** data */ olua_to_object(L, 1, &self, "cc.PhysicsWorld"); @@ -7914,9 +8363,10 @@ static int _cocos2d_PhysicsWorld_rayCast(lua_State *L) void *cb_store = (void *)self; std::string cb_tag = "rayCast"; - std::string cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + std::string cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](cocos2d::PhysicsWorld &arg1, const cocos2d::PhysicsRayCastInfo &arg2, void *arg3) { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](cocos2d::PhysicsWorld &cb_arg1, const cocos2d::PhysicsRayCastInfo &cb_arg2, void *cb_arg3) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); bool ret = false; /** ret */ @@ -7924,9 +8374,9 @@ static int _cocos2d_PhysicsWorld_rayCast(lua_State *L) int top = lua_gettop(L); size_t last = olua_push_objpool(L); olua_enable_objpool(L); - olua_push_object(L, &arg1, "cc.PhysicsWorld"); - olua_push_object(L, arg2, "cc.PhysicsRayCastInfo"); - olua_push_object(L, arg3, "void *"); + olua_push_object(L, &cb_arg1, "cc.PhysicsWorld"); + olua_push_object(L, cb_arg2, "cc.PhysicsRayCastInfo"); + olua_push_object(L, cb_arg3, "void *"); olua_disable_objpool(L); olua_callback(L, cb_store, cb_name.c_str(), 3); @@ -7942,15 +8392,15 @@ static int _cocos2d_PhysicsWorld_rayCast(lua_State *L) return ret; }; - // void rayCast(@localvar cocos2d::PhysicsRayCastCallbackFunc func, const cocos2d::Vec2 &start, const cocos2d::Vec2 &end, void *data) - self->rayCast(arg1, arg2, arg3, arg4); + // void rayCast(cocos2d::PhysicsRayCastCallbackFunc func, const cocos2d::Vec2 &start, const cocos2d::Vec2 &end_, void *data) + self->rayCast(arg1, *arg2, *arg3, arg4); olua_endinvoke(L); return 0; } -static int _cocos2d_PhysicsWorld_removeAllBodies(lua_State *L) +static int _olua_fun_cocos2d_PhysicsWorld_removeAllBodies(lua_State *L) { olua_startinvoke(L); @@ -7966,7 +8416,7 @@ static int _cocos2d_PhysicsWorld_removeAllBodies(lua_State *L) return 0; } -static int _cocos2d_PhysicsWorld_removeAllJoints$1(lua_State *L) +static int _olua_fun_cocos2d_PhysicsWorld_removeAllJoints$1(lua_State *L) { olua_startinvoke(L); @@ -7984,7 +8434,7 @@ static int _cocos2d_PhysicsWorld_removeAllJoints$1(lua_State *L) return 0; } -static int _cocos2d_PhysicsWorld_removeAllJoints$2(lua_State *L) +static int _olua_fun_cocos2d_PhysicsWorld_removeAllJoints$2(lua_State *L) { olua_startinvoke(L); @@ -7992,7 +8442,7 @@ static int _cocos2d_PhysicsWorld_removeAllJoints$2(lua_State *L) olua_to_object(L, 1, &self, "cc.PhysicsWorld"); - // void removeAllJoints(@optional bool destroy) + // void removeAllJoints() self->removeAllJoints(); olua_endinvoke(L); @@ -8000,19 +8450,19 @@ static int _cocos2d_PhysicsWorld_removeAllJoints$2(lua_State *L) return 0; } -static int _cocos2d_PhysicsWorld_removeAllJoints(lua_State *L) +static int _olua_fun_cocos2d_PhysicsWorld_removeAllJoints(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 0) { - // void removeAllJoints(@optional bool destroy) - return _cocos2d_PhysicsWorld_removeAllJoints$2(L); + // void removeAllJoints() + return _olua_fun_cocos2d_PhysicsWorld_removeAllJoints$2(L); } if (num_args == 1) { // if ((olua_is_bool(L, 2))) { // void removeAllJoints(@optional bool destroy) - return _cocos2d_PhysicsWorld_removeAllJoints$1(L); + return _olua_fun_cocos2d_PhysicsWorld_removeAllJoints$1(L); // } } @@ -8021,7 +8471,7 @@ static int _cocos2d_PhysicsWorld_removeAllJoints(lua_State *L) return 0; } -static int _cocos2d_PhysicsWorld_removeBody$1(lua_State *L) +static int _olua_fun_cocos2d_PhysicsWorld_removeBody$1(lua_State *L) { olua_startinvoke(L); @@ -8039,7 +8489,7 @@ static int _cocos2d_PhysicsWorld_removeBody$1(lua_State *L) return 0; } -static int _cocos2d_PhysicsWorld_removeBody$2(lua_State *L) +static int _olua_fun_cocos2d_PhysicsWorld_removeBody$2(lua_State *L) { olua_startinvoke(L); @@ -8057,19 +8507,19 @@ static int _cocos2d_PhysicsWorld_removeBody$2(lua_State *L) return 0; } -static int _cocos2d_PhysicsWorld_removeBody(lua_State *L) +static int _olua_fun_cocos2d_PhysicsWorld_removeBody(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { if ((olua_is_object(L, 2, "cc.PhysicsBody"))) { // void removeBody(cocos2d::PhysicsBody *body) - return _cocos2d_PhysicsWorld_removeBody$1(L); + return _olua_fun_cocos2d_PhysicsWorld_removeBody$1(L); } // if ((olua_is_integer(L, 2))) { // void removeBody(int tag) - return _cocos2d_PhysicsWorld_removeBody$2(L); + return _olua_fun_cocos2d_PhysicsWorld_removeBody$2(L); // } } @@ -8078,7 +8528,7 @@ static int _cocos2d_PhysicsWorld_removeBody(lua_State *L) return 0; } -static int _cocos2d_PhysicsWorld_removeJoint$1(lua_State *L) +static int _olua_fun_cocos2d_PhysicsWorld_removeJoint$1(lua_State *L) { olua_startinvoke(L); @@ -8098,7 +8548,7 @@ static int _cocos2d_PhysicsWorld_removeJoint$1(lua_State *L) return 0; } -static int _cocos2d_PhysicsWorld_removeJoint$2(lua_State *L) +static int _olua_fun_cocos2d_PhysicsWorld_removeJoint$2(lua_State *L) { olua_startinvoke(L); @@ -8108,7 +8558,7 @@ static int _cocos2d_PhysicsWorld_removeJoint$2(lua_State *L) olua_to_object(L, 1, &self, "cc.PhysicsWorld"); olua_check_object(L, 2, &arg1, "cc.PhysicsJoint"); - // void removeJoint(cocos2d::PhysicsJoint *joint, @optional bool destroy) + // void removeJoint(cocos2d::PhysicsJoint *joint) self->removeJoint(arg1); olua_endinvoke(L); @@ -8116,21 +8566,21 @@ static int _cocos2d_PhysicsWorld_removeJoint$2(lua_State *L) return 0; } -static int _cocos2d_PhysicsWorld_removeJoint(lua_State *L) +static int _olua_fun_cocos2d_PhysicsWorld_removeJoint(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_object(L, 2, "cc.PhysicsJoint"))) { - // void removeJoint(cocos2d::PhysicsJoint *joint, @optional bool destroy) - return _cocos2d_PhysicsWorld_removeJoint$2(L); + // void removeJoint(cocos2d::PhysicsJoint *joint) + return _olua_fun_cocos2d_PhysicsWorld_removeJoint$2(L); // } } if (num_args == 2) { // if ((olua_is_object(L, 2, "cc.PhysicsJoint")) && (olua_is_bool(L, 3))) { // void removeJoint(cocos2d::PhysicsJoint *joint, @optional bool destroy) - return _cocos2d_PhysicsWorld_removeJoint$1(L); + return _olua_fun_cocos2d_PhysicsWorld_removeJoint$1(L); // } } @@ -8139,7 +8589,7 @@ static int _cocos2d_PhysicsWorld_removeJoint(lua_State *L) return 0; } -static int _cocos2d_PhysicsWorld_setAutoStep(lua_State *L) +static int _olua_fun_cocos2d_PhysicsWorld_setAutoStep(lua_State *L) { olua_startinvoke(L); @@ -8157,7 +8607,7 @@ static int _cocos2d_PhysicsWorld_setAutoStep(lua_State *L) return 0; } -static int _cocos2d_PhysicsWorld_setDebugDrawMask(lua_State *L) +static int _olua_fun_cocos2d_PhysicsWorld_setDebugDrawMask(lua_State *L) { olua_startinvoke(L); @@ -8175,7 +8625,7 @@ static int _cocos2d_PhysicsWorld_setDebugDrawMask(lua_State *L) return 0; } -static int _cocos2d_PhysicsWorld_setFixedUpdateRate(lua_State *L) +static int _olua_fun_cocos2d_PhysicsWorld_setFixedUpdateRate(lua_State *L) { olua_startinvoke(L); @@ -8193,25 +8643,25 @@ static int _cocos2d_PhysicsWorld_setFixedUpdateRate(lua_State *L) return 0; } -static int _cocos2d_PhysicsWorld_setGravity(lua_State *L) +static int _olua_fun_cocos2d_PhysicsWorld_setGravity(lua_State *L) { olua_startinvoke(L); cocos2d::PhysicsWorld *self = nullptr; - cocos2d::Vec2 arg1; /** gravity */ + cocos2d::Vec2 *arg1; /** gravity */ olua_to_object(L, 1, &self, "cc.PhysicsWorld"); olua_check_object(L, 2, &arg1, "cc.Vec2"); // void setGravity(const cocos2d::Vec2 &gravity) - self->setGravity(arg1); + self->setGravity(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_PhysicsWorld_setPostUpdateCallback(lua_State *L) +static int _olua_fun_cocos2d_PhysicsWorld_setPostUpdateCallback(lua_State *L) { olua_startinvoke(L); @@ -8227,9 +8677,10 @@ static int _cocos2d_PhysicsWorld_setPostUpdateCallback(lua_State *L) std::string cb_tag = "PostUpdateCallback"; std::string cb_name; if (olua_isfunction(L, 2)) { - cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx]() { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */]() { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); @@ -8246,7 +8697,7 @@ static int _cocos2d_PhysicsWorld_setPostUpdateCallback(lua_State *L) arg1 = nullptr; } - // void setPostUpdateCallback(@localvar @nullable const std::function &callback) + // void setPostUpdateCallback(@nullable const std::function &callback) self->setPostUpdateCallback(arg1); olua_endinvoke(L); @@ -8254,7 +8705,7 @@ static int _cocos2d_PhysicsWorld_setPostUpdateCallback(lua_State *L) return 0; } -static int _cocos2d_PhysicsWorld_setPreUpdateCallback(lua_State *L) +static int _olua_fun_cocos2d_PhysicsWorld_setPreUpdateCallback(lua_State *L) { olua_startinvoke(L); @@ -8270,9 +8721,10 @@ static int _cocos2d_PhysicsWorld_setPreUpdateCallback(lua_State *L) std::string cb_tag = "PreUpdateCallback"; std::string cb_name; if (olua_isfunction(L, 2)) { - cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx]() { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */]() { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); @@ -8289,7 +8741,7 @@ static int _cocos2d_PhysicsWorld_setPreUpdateCallback(lua_State *L) arg1 = nullptr; } - // void setPreUpdateCallback(@localvar @nullable const std::function &callback) + // void setPreUpdateCallback(@nullable const std::function &callback) self->setPreUpdateCallback(arg1); olua_endinvoke(L); @@ -8297,7 +8749,7 @@ static int _cocos2d_PhysicsWorld_setPreUpdateCallback(lua_State *L) return 0; } -static int _cocos2d_PhysicsWorld_setSpeed(lua_State *L) +static int _olua_fun_cocos2d_PhysicsWorld_setSpeed(lua_State *L) { olua_startinvoke(L); @@ -8315,7 +8767,7 @@ static int _cocos2d_PhysicsWorld_setSpeed(lua_State *L) return 0; } -static int _cocos2d_PhysicsWorld_setSubsteps(lua_State *L) +static int _olua_fun_cocos2d_PhysicsWorld_setSubsteps(lua_State *L) { olua_startinvoke(L); @@ -8333,7 +8785,7 @@ static int _cocos2d_PhysicsWorld_setSubsteps(lua_State *L) return 0; } -static int _cocos2d_PhysicsWorld_setUpdateRate(lua_State *L) +static int _olua_fun_cocos2d_PhysicsWorld_setUpdateRate(lua_State *L) { olua_startinvoke(L); @@ -8351,7 +8803,7 @@ static int _cocos2d_PhysicsWorld_setUpdateRate(lua_State *L) return 0; } -static int _cocos2d_PhysicsWorld_step(lua_State *L) +static int _olua_fun_cocos2d_PhysicsWorld_step(lua_State *L) { olua_startinvoke(L); @@ -8369,50 +8821,49 @@ static int _cocos2d_PhysicsWorld_step(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_PhysicsWorld(lua_State *L) +static int _olua_cls_cc_PhysicsWorld(lua_State *L) { oluacls_class(L, "cc.PhysicsWorld"); - oluacls_func(L, "__olua_move", _cocos2d_PhysicsWorld___olua_move); - oluacls_func(L, "addJoint", _cocos2d_PhysicsWorld_addJoint); - oluacls_func(L, "getAllBodies", _cocos2d_PhysicsWorld_getAllBodies); - oluacls_func(L, "getBody", _cocos2d_PhysicsWorld_getBody); - oluacls_func(L, "getDebugDrawMask", _cocos2d_PhysicsWorld_getDebugDrawMask); - oluacls_func(L, "getFixedUpdateRate", _cocos2d_PhysicsWorld_getFixedUpdateRate); - oluacls_func(L, "getGravity", _cocos2d_PhysicsWorld_getGravity); - oluacls_func(L, "getScene", _cocos2d_PhysicsWorld_getScene); - oluacls_func(L, "getShape", _cocos2d_PhysicsWorld_getShape); - oluacls_func(L, "getShapes", _cocos2d_PhysicsWorld_getShapes); - oluacls_func(L, "getSpeed", _cocos2d_PhysicsWorld_getSpeed); - oluacls_func(L, "getSubsteps", _cocos2d_PhysicsWorld_getSubsteps); - oluacls_func(L, "getUpdateRate", _cocos2d_PhysicsWorld_getUpdateRate); - oluacls_func(L, "isAutoStep", _cocos2d_PhysicsWorld_isAutoStep); - oluacls_func(L, "queryPoint", _cocos2d_PhysicsWorld_queryPoint); - oluacls_func(L, "queryRect", _cocos2d_PhysicsWorld_queryRect); - oluacls_func(L, "rayCast", _cocos2d_PhysicsWorld_rayCast); - oluacls_func(L, "removeAllBodies", _cocos2d_PhysicsWorld_removeAllBodies); - oluacls_func(L, "removeAllJoints", _cocos2d_PhysicsWorld_removeAllJoints); - oluacls_func(L, "removeBody", _cocos2d_PhysicsWorld_removeBody); - oluacls_func(L, "removeJoint", _cocos2d_PhysicsWorld_removeJoint); - oluacls_func(L, "setAutoStep", _cocos2d_PhysicsWorld_setAutoStep); - oluacls_func(L, "setDebugDrawMask", _cocos2d_PhysicsWorld_setDebugDrawMask); - oluacls_func(L, "setFixedUpdateRate", _cocos2d_PhysicsWorld_setFixedUpdateRate); - oluacls_func(L, "setGravity", _cocos2d_PhysicsWorld_setGravity); - oluacls_func(L, "setPostUpdateCallback", _cocos2d_PhysicsWorld_setPostUpdateCallback); - oluacls_func(L, "setPreUpdateCallback", _cocos2d_PhysicsWorld_setPreUpdateCallback); - oluacls_func(L, "setSpeed", _cocos2d_PhysicsWorld_setSpeed); - oluacls_func(L, "setSubsteps", _cocos2d_PhysicsWorld_setSubsteps); - oluacls_func(L, "setUpdateRate", _cocos2d_PhysicsWorld_setUpdateRate); - oluacls_func(L, "step", _cocos2d_PhysicsWorld_step); - oluacls_prop(L, "allBodies", _cocos2d_PhysicsWorld_getAllBodies, nullptr); - oluacls_prop(L, "autoStep", _cocos2d_PhysicsWorld_isAutoStep, _cocos2d_PhysicsWorld_setAutoStep); - oluacls_prop(L, "debugDrawMask", _cocos2d_PhysicsWorld_getDebugDrawMask, _cocos2d_PhysicsWorld_setDebugDrawMask); - oluacls_prop(L, "fixedUpdateRate", _cocos2d_PhysicsWorld_getFixedUpdateRate, _cocos2d_PhysicsWorld_setFixedUpdateRate); - oluacls_prop(L, "gravity", _cocos2d_PhysicsWorld_getGravity, _cocos2d_PhysicsWorld_setGravity); - oluacls_prop(L, "scene", _cocos2d_PhysicsWorld_getScene, nullptr); - oluacls_prop(L, "speed", _cocos2d_PhysicsWorld_getSpeed, _cocos2d_PhysicsWorld_setSpeed); - oluacls_prop(L, "substeps", _cocos2d_PhysicsWorld_getSubsteps, _cocos2d_PhysicsWorld_setSubsteps); - oluacls_prop(L, "updateRate", _cocos2d_PhysicsWorld_getUpdateRate, _cocos2d_PhysicsWorld_setUpdateRate); + oluacls_func(L, "__olua_move", _olua_fun_cocos2d_PhysicsWorld___olua_move); + oluacls_func(L, "addJoint", _olua_fun_cocos2d_PhysicsWorld_addJoint); + oluacls_func(L, "getAllBodies", _olua_fun_cocos2d_PhysicsWorld_getAllBodies); + oluacls_func(L, "getBody", _olua_fun_cocos2d_PhysicsWorld_getBody); + oluacls_func(L, "getDebugDrawMask", _olua_fun_cocos2d_PhysicsWorld_getDebugDrawMask); + oluacls_func(L, "getFixedUpdateRate", _olua_fun_cocos2d_PhysicsWorld_getFixedUpdateRate); + oluacls_func(L, "getGravity", _olua_fun_cocos2d_PhysicsWorld_getGravity); + oluacls_func(L, "getScene", _olua_fun_cocos2d_PhysicsWorld_getScene); + oluacls_func(L, "getShape", _olua_fun_cocos2d_PhysicsWorld_getShape); + oluacls_func(L, "getShapes", _olua_fun_cocos2d_PhysicsWorld_getShapes); + oluacls_func(L, "getSpeed", _olua_fun_cocos2d_PhysicsWorld_getSpeed); + oluacls_func(L, "getSubsteps", _olua_fun_cocos2d_PhysicsWorld_getSubsteps); + oluacls_func(L, "getUpdateRate", _olua_fun_cocos2d_PhysicsWorld_getUpdateRate); + oluacls_func(L, "isAutoStep", _olua_fun_cocos2d_PhysicsWorld_isAutoStep); + oluacls_func(L, "queryPoint", _olua_fun_cocos2d_PhysicsWorld_queryPoint); + oluacls_func(L, "queryRect", _olua_fun_cocos2d_PhysicsWorld_queryRect); + oluacls_func(L, "rayCast", _olua_fun_cocos2d_PhysicsWorld_rayCast); + oluacls_func(L, "removeAllBodies", _olua_fun_cocos2d_PhysicsWorld_removeAllBodies); + oluacls_func(L, "removeAllJoints", _olua_fun_cocos2d_PhysicsWorld_removeAllJoints); + oluacls_func(L, "removeBody", _olua_fun_cocos2d_PhysicsWorld_removeBody); + oluacls_func(L, "removeJoint", _olua_fun_cocos2d_PhysicsWorld_removeJoint); + oluacls_func(L, "setAutoStep", _olua_fun_cocos2d_PhysicsWorld_setAutoStep); + oluacls_func(L, "setDebugDrawMask", _olua_fun_cocos2d_PhysicsWorld_setDebugDrawMask); + oluacls_func(L, "setFixedUpdateRate", _olua_fun_cocos2d_PhysicsWorld_setFixedUpdateRate); + oluacls_func(L, "setGravity", _olua_fun_cocos2d_PhysicsWorld_setGravity); + oluacls_func(L, "setPostUpdateCallback", _olua_fun_cocos2d_PhysicsWorld_setPostUpdateCallback); + oluacls_func(L, "setPreUpdateCallback", _olua_fun_cocos2d_PhysicsWorld_setPreUpdateCallback); + oluacls_func(L, "setSpeed", _olua_fun_cocos2d_PhysicsWorld_setSpeed); + oluacls_func(L, "setSubsteps", _olua_fun_cocos2d_PhysicsWorld_setSubsteps); + oluacls_func(L, "setUpdateRate", _olua_fun_cocos2d_PhysicsWorld_setUpdateRate); + oluacls_func(L, "step", _olua_fun_cocos2d_PhysicsWorld_step); + oluacls_prop(L, "allBodies", _olua_fun_cocos2d_PhysicsWorld_getAllBodies, nullptr); + oluacls_prop(L, "autoStep", _olua_fun_cocos2d_PhysicsWorld_isAutoStep, _olua_fun_cocos2d_PhysicsWorld_setAutoStep); + oluacls_prop(L, "debugDrawMask", _olua_fun_cocos2d_PhysicsWorld_getDebugDrawMask, _olua_fun_cocos2d_PhysicsWorld_setDebugDrawMask); + oluacls_prop(L, "fixedUpdateRate", _olua_fun_cocos2d_PhysicsWorld_getFixedUpdateRate, _olua_fun_cocos2d_PhysicsWorld_setFixedUpdateRate); + oluacls_prop(L, "gravity", _olua_fun_cocos2d_PhysicsWorld_getGravity, _olua_fun_cocos2d_PhysicsWorld_setGravity); + oluacls_prop(L, "scene", _olua_fun_cocos2d_PhysicsWorld_getScene, nullptr); + oluacls_prop(L, "speed", _olua_fun_cocos2d_PhysicsWorld_getSpeed, _olua_fun_cocos2d_PhysicsWorld_setSpeed); + oluacls_prop(L, "substeps", _olua_fun_cocos2d_PhysicsWorld_getSubsteps, _olua_fun_cocos2d_PhysicsWorld_setSubsteps); + oluacls_prop(L, "updateRate", _olua_fun_cocos2d_PhysicsWorld_getUpdateRate, _olua_fun_cocos2d_PhysicsWorld_setUpdateRate); oluacls_const(L, "DEBUGDRAW_ALL", cocos2d::PhysicsWorld::DEBUGDRAW_ALL); oluacls_const(L, "DEBUGDRAW_CONTACT", cocos2d::PhysicsWorld::DEBUGDRAW_CONTACT); oluacls_const(L, "DEBUGDRAW_JOINT", cocos2d::PhysicsWorld::DEBUGDRAW_JOINT); @@ -8421,6 +8872,16 @@ OLUA_LIB int luaopen_cocos2d_PhysicsWorld(lua_State *L) return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_PhysicsWorld(lua_State *L) +{ + olua_require(L, "cocos2d_physics", luaopen_cocos2d_physics); + if (!olua_getclass(L, "cc.PhysicsWorld")) { + luaL_error(L, "class not found: cocos2d::PhysicsWorld"); + } + return 1; +} OLUA_END_DECLS #endif @@ -8428,42 +8889,42 @@ OLUA_BEGIN_DECLS OLUA_LIB int luaopen_cocos2d_physics(lua_State *L) { #if CC_USE_PHYSICS - olua_require(L, "cc.PhysicsMaterial", luaopen_cocos2d_PhysicsMaterial); - olua_require(L, "cc.PhysicsRayCastCallbackFunc", luaopen_cocos2d_PhysicsRayCastCallbackFunc); - olua_require(L, "cc.PhysicsQueryRectCallbackFunc", luaopen_cocos2d_PhysicsQueryRectCallbackFunc); - olua_require(L, "cc.PhysicsQueryPointCallbackFunc", luaopen_cocos2d_PhysicsQueryPointCallbackFunc); - olua_require(L, "cc.EventListenerPhysicsContact", luaopen_cocos2d_EventListenerPhysicsContact); - olua_require(L, "cc.EventListenerPhysicsContactWithGroup", luaopen_cocos2d_EventListenerPhysicsContactWithGroup); - olua_require(L, "cc.EventListenerPhysicsContactWithBodies", luaopen_cocos2d_EventListenerPhysicsContactWithBodies); - olua_require(L, "cc.EventListenerPhysicsContactWithShapes", luaopen_cocos2d_EventListenerPhysicsContactWithShapes); - olua_require(L, "cc.PhysicsBody", luaopen_cocos2d_PhysicsBody); - olua_require(L, "cc.PhysicsContact.EventCode", luaopen_cocos2d_PhysicsContact_EventCode); - olua_require(L, "cc.PhysicsContact", luaopen_cocos2d_PhysicsContact); - olua_require(L, "cc.PhysicsContactPostSolve", luaopen_cocos2d_PhysicsContactPostSolve); - olua_require(L, "cc.PhysicsContactPreSolve", luaopen_cocos2d_PhysicsContactPreSolve); - olua_require(L, "cc.PhysicsJoint", luaopen_cocos2d_PhysicsJoint); - olua_require(L, "cc.PhysicsJointDistance", luaopen_cocos2d_PhysicsJointDistance); - olua_require(L, "cc.PhysicsJointFixed", luaopen_cocos2d_PhysicsJointFixed); - olua_require(L, "cc.PhysicsJointGear", luaopen_cocos2d_PhysicsJointGear); - olua_require(L, "cc.PhysicsJointGroove", luaopen_cocos2d_PhysicsJointGroove); - olua_require(L, "cc.PhysicsJointLimit", luaopen_cocos2d_PhysicsJointLimit); - olua_require(L, "cc.PhysicsJointMotor", luaopen_cocos2d_PhysicsJointMotor); - olua_require(L, "cc.PhysicsJointPin", luaopen_cocos2d_PhysicsJointPin); - olua_require(L, "cc.PhysicsJointRatchet", luaopen_cocos2d_PhysicsJointRatchet); - olua_require(L, "cc.PhysicsJointRotaryLimit", luaopen_cocos2d_PhysicsJointRotaryLimit); - olua_require(L, "cc.PhysicsJointRotarySpring", luaopen_cocos2d_PhysicsJointRotarySpring); - olua_require(L, "cc.PhysicsJointSpring", luaopen_cocos2d_PhysicsJointSpring); - olua_require(L, "cc.PhysicsShape.Type", luaopen_cocos2d_PhysicsShape_Type); - olua_require(L, "cc.PhysicsShape", luaopen_cocos2d_PhysicsShape); - olua_require(L, "cc.PhysicsShapePolygon", luaopen_cocos2d_PhysicsShapePolygon); - olua_require(L, "cc.PhysicsShapeEdgePolygon", luaopen_cocos2d_PhysicsShapeEdgePolygon); - olua_require(L, "cc.PhysicsShapeBox", luaopen_cocos2d_PhysicsShapeBox); - olua_require(L, "cc.PhysicsShapeCircle", luaopen_cocos2d_PhysicsShapeCircle); - olua_require(L, "cc.PhysicsShapeEdgeBox", luaopen_cocos2d_PhysicsShapeEdgeBox); - olua_require(L, "cc.PhysicsShapeEdgeChain", luaopen_cocos2d_PhysicsShapeEdgeChain); - olua_require(L, "cc.PhysicsShapeEdgeSegment", luaopen_cocos2d_PhysicsShapeEdgeSegment); - olua_require(L, "cc.PhysicsRayCastInfo", luaopen_cocos2d_PhysicsRayCastInfo); - olua_require(L, "cc.PhysicsWorld", luaopen_cocos2d_PhysicsWorld); + olua_require(L, "cc.PhysicsMaterial", _olua_cls_cc_PhysicsMaterial); + olua_require(L, "cc.PhysicsRayCastCallbackFunc", _olua_cls_cc_PhysicsRayCastCallbackFunc); + olua_require(L, "cc.PhysicsQueryRectCallbackFunc", _olua_cls_cc_PhysicsQueryRectCallbackFunc); + olua_require(L, "cc.PhysicsQueryPointCallbackFunc", _olua_cls_cc_PhysicsQueryPointCallbackFunc); + olua_require(L, "cc.EventListenerPhysicsContact", _olua_cls_cc_EventListenerPhysicsContact); + olua_require(L, "cc.EventListenerPhysicsContactWithGroup", _olua_cls_cc_EventListenerPhysicsContactWithGroup); + olua_require(L, "cc.EventListenerPhysicsContactWithBodies", _olua_cls_cc_EventListenerPhysicsContactWithBodies); + olua_require(L, "cc.EventListenerPhysicsContactWithShapes", _olua_cls_cc_EventListenerPhysicsContactWithShapes); + olua_require(L, "cc.PhysicsBody", _olua_cls_cc_PhysicsBody); + olua_require(L, "cc.PhysicsContact.EventCode", _olua_cls_cc_PhysicsContact_EventCode); + olua_require(L, "cc.PhysicsContact", _olua_cls_cc_PhysicsContact); + olua_require(L, "cc.PhysicsContactPostSolve", _olua_cls_cc_PhysicsContactPostSolve); + olua_require(L, "cc.PhysicsContactPreSolve", _olua_cls_cc_PhysicsContactPreSolve); + olua_require(L, "cc.PhysicsJoint", _olua_cls_cc_PhysicsJoint); + olua_require(L, "cc.PhysicsJointDistance", _olua_cls_cc_PhysicsJointDistance); + olua_require(L, "cc.PhysicsJointFixed", _olua_cls_cc_PhysicsJointFixed); + olua_require(L, "cc.PhysicsJointGear", _olua_cls_cc_PhysicsJointGear); + olua_require(L, "cc.PhysicsJointGroove", _olua_cls_cc_PhysicsJointGroove); + olua_require(L, "cc.PhysicsJointLimit", _olua_cls_cc_PhysicsJointLimit); + olua_require(L, "cc.PhysicsJointMotor", _olua_cls_cc_PhysicsJointMotor); + olua_require(L, "cc.PhysicsJointPin", _olua_cls_cc_PhysicsJointPin); + olua_require(L, "cc.PhysicsJointRatchet", _olua_cls_cc_PhysicsJointRatchet); + olua_require(L, "cc.PhysicsJointRotaryLimit", _olua_cls_cc_PhysicsJointRotaryLimit); + olua_require(L, "cc.PhysicsJointRotarySpring", _olua_cls_cc_PhysicsJointRotarySpring); + olua_require(L, "cc.PhysicsJointSpring", _olua_cls_cc_PhysicsJointSpring); + olua_require(L, "cc.PhysicsShape.Type", _olua_cls_cc_PhysicsShape_Type); + olua_require(L, "cc.PhysicsShape", _olua_cls_cc_PhysicsShape); + olua_require(L, "cc.PhysicsShapePolygon", _olua_cls_cc_PhysicsShapePolygon); + olua_require(L, "cc.PhysicsShapeEdgePolygon", _olua_cls_cc_PhysicsShapeEdgePolygon); + olua_require(L, "cc.PhysicsShapeBox", _olua_cls_cc_PhysicsShapeBox); + olua_require(L, "cc.PhysicsShapeCircle", _olua_cls_cc_PhysicsShapeCircle); + olua_require(L, "cc.PhysicsShapeEdgeBox", _olua_cls_cc_PhysicsShapeEdgeBox); + olua_require(L, "cc.PhysicsShapeEdgeChain", _olua_cls_cc_PhysicsShapeEdgeChain); + olua_require(L, "cc.PhysicsShapeEdgeSegment", _olua_cls_cc_PhysicsShapeEdgeSegment); + olua_require(L, "cc.PhysicsRayCastInfo", _olua_cls_cc_PhysicsRayCastInfo); + olua_require(L, "cc.PhysicsWorld", _olua_cls_cc_PhysicsWorld); #endif cclua::runtime::registerFeature("physics", true); diff --git a/frameworks/cclua/src/lua-bindings/lua_cocos2d_physics.h b/frameworks/cclua/src/lua-bindings/lua_cocos2d_physics.h index 8b3f378c..7b2bd0d4 100644 --- a/frameworks/cclua/src/lua-bindings/lua_cocos2d_physics.h +++ b/frameworks/cclua/src/lua-bindings/lua_cocos2d_physics.h @@ -1,5 +1,5 @@ // -// AUTO BUILD, DON'T MODIFY! +// AUTO GENERATED, DO NOT MODIFY! // #ifndef __AUTO_GEN_LUA_COCOS2D_PHYSICS_H__ #define __AUTO_GEN_LUA_COCOS2D_PHYSICS_H__ diff --git a/frameworks/cclua/src/lua-bindings/lua_cocos2d_studio.cpp b/frameworks/cclua/src/lua-bindings/lua_cocos2d_studio.cpp index 7ff5b4d7..ee61293c 100644 --- a/frameworks/cclua/src/lua-bindings/lua_cocos2d_studio.cpp +++ b/frameworks/cclua/src/lua-bindings/lua_cocos2d_studio.cpp @@ -1,5 +1,5 @@ // -// AUTO BUILD, DON'T MODIFY! +// AUTO GENERATED, DO NOT MODIFY! // #include "lua_cocos2d_studio.h" #include "lua-bindings/lua_cocos2d_types.h" @@ -22,49 +22,7 @@ static std::string makeFrameEndCallbackTag(cocostudio::timeline::ActionTimeline return makeFrameEndCallbackTag((lua_Integer)info.endIndex, animationName); } -static int _cocostudio_timeline_AnimationInfo___call(lua_State *L) -{ - olua_startinvoke(L); - - cocostudio::timeline::AnimationInfo ret; - - luaL_checktype(L, 2, LUA_TTABLE); - - std::string arg1; /** name */ - int arg2 = 0; /** startIndex */ - int arg3 = 0; /** endIndex */ - std::function arg4; /** clipEndCallBack */ - - olua_getfield(L, 2, "name"); - olua_check_string(L, -1, &arg1); - ret.name = arg1; - lua_pop(L, 1); - - olua_getfield(L, 2, "startIndex"); - olua_check_integer(L, -1, &arg2); - ret.startIndex = arg2; - lua_pop(L, 1); - - olua_getfield(L, 2, "endIndex"); - olua_check_integer(L, -1, &arg3); - ret.endIndex = arg3; - lua_pop(L, 1); - - olua_getfield(L, 2, "clipEndCallBack"); - if (!olua_isnoneornil(L, -1)) { - olua_check_callback(L, -1, &arg4, "std.function"); - } - ret.clipEndCallBack = arg4; - lua_pop(L, 1); - - olua_pushcopy_object(L, ret, "ccs.timeline.AnimationInfo"); - - olua_endinvoke(L); - - return 1; -} - -static int _cocostudio_timeline_AnimationInfo___gc(lua_State *L) +static int _olua_fun_cocostudio_timeline_AnimationInfo___gc(lua_State *L) { olua_startinvoke(L); @@ -76,7 +34,7 @@ static int _cocostudio_timeline_AnimationInfo___gc(lua_State *L) return 0; } -static int _cocostudio_timeline_AnimationInfo___olua_move(lua_State *L) +static int _olua_fun_cocostudio_timeline_AnimationInfo___olua_move(lua_State *L) { olua_startinvoke(L); @@ -88,64 +46,7 @@ static int _cocostudio_timeline_AnimationInfo___olua_move(lua_State *L) return 1; } -static int _cocostudio_timeline_AnimationInfo_new$1(lua_State *L) -{ - olua_startinvoke(L); - - // AnimationInfo() - cocostudio::timeline::AnimationInfo *ret = new cocostudio::timeline::AnimationInfo(); - int num_ret = olua_push_object(L, ret, "ccs.timeline.AnimationInfo"); - olua_postnew(L, ret); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocostudio_timeline_AnimationInfo_new$2(lua_State *L) -{ - olua_startinvoke(L); - - std::string arg1; /** otherName */ - int arg2 = 0; /** otherStartIndex */ - int arg3 = 0; /** otherEndIndex */ - - olua_check_string(L, 1, &arg1); - olua_check_integer(L, 2, &arg2); - olua_check_integer(L, 3, &arg3); - - // AnimationInfo(const std::string &otherName, int otherStartIndex, int otherEndIndex) - cocostudio::timeline::AnimationInfo *ret = new cocostudio::timeline::AnimationInfo(arg1, arg2, arg3); - int num_ret = olua_push_object(L, ret, "ccs.timeline.AnimationInfo"); - olua_postnew(L, ret); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocostudio_timeline_AnimationInfo_new(lua_State *L) -{ - int num_args = lua_gettop(L); - - if (num_args == 0) { - // AnimationInfo() - return _cocostudio_timeline_AnimationInfo_new$1(L); - } - - if (num_args == 3) { - // if ((olua_is_string(L, 1)) && (olua_is_integer(L, 2)) && (olua_is_integer(L, 3))) { - // AnimationInfo(const std::string &otherName, int otherStartIndex, int otherEndIndex) - return _cocostudio_timeline_AnimationInfo_new$2(L); - // } - } - - luaL_error(L, "method 'cocostudio::timeline::AnimationInfo::new' not support '%d' arguments", num_args); - - return 0; -} - -static int _cocostudio_timeline_AnimationInfo_get_clipEndCallBack(lua_State *L) +static int _olua_fun_cocostudio_timeline_AnimationInfo_clipEndCallBack$1(lua_State *L) { olua_startinvoke(L); @@ -157,7 +58,7 @@ static int _cocostudio_timeline_AnimationInfo_get_clipEndCallBack(lua_State *L) std::string cb_tag = "clipEndCallBack"; olua_getcallback(L, cb_store, cb_tag.c_str(), OLUA_TAG_EQUAL); - // @nullable @localvar std::function clipEndCallBack + // std::function clipEndCallBack std::function ret = self->clipEndCallBack; int num_ret = olua_push_callback(L, &ret, "std.function"); @@ -166,7 +67,7 @@ static int _cocostudio_timeline_AnimationInfo_get_clipEndCallBack(lua_State *L) return num_ret; } -static int _cocostudio_timeline_AnimationInfo_set_clipEndCallBack(lua_State *L) +static int _olua_fun_cocostudio_timeline_AnimationInfo_clipEndCallBack$2(lua_State *L) { olua_startinvoke(L); @@ -182,9 +83,10 @@ static int _cocostudio_timeline_AnimationInfo_set_clipEndCallBack(lua_State *L) std::string cb_tag = "clipEndCallBack"; std::string cb_name; if (olua_isfunction(L, 2)) { - cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx]() { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */]() { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); @@ -201,7 +103,7 @@ static int _cocostudio_timeline_AnimationInfo_set_clipEndCallBack(lua_State *L) arg1 = nullptr; } - // @nullable @localvar std::function clipEndCallBack + // std::function clipEndCallBack self->clipEndCallBack = arg1; olua_endinvoke(L); @@ -209,7 +111,28 @@ static int _cocostudio_timeline_AnimationInfo_set_clipEndCallBack(lua_State *L) return 0; } -static int _cocostudio_timeline_AnimationInfo_get_endIndex(lua_State *L) +static int _olua_fun_cocostudio_timeline_AnimationInfo_clipEndCallBack(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // std::function clipEndCallBack + return _olua_fun_cocostudio_timeline_AnimationInfo_clipEndCallBack$1(L); + } + + if (num_args == 1) { + // if ((olua_is_callback(L, 2, "std.function") || olua_isnil(L, 2))) { + // std::function clipEndCallBack + return _olua_fun_cocostudio_timeline_AnimationInfo_clipEndCallBack$2(L); + // } + } + + luaL_error(L, "method 'cocostudio::timeline::AnimationInfo::clipEndCallBack' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocostudio_timeline_AnimationInfo_endIndex$1(lua_State *L) { olua_startinvoke(L); @@ -226,7 +149,7 @@ static int _cocostudio_timeline_AnimationInfo_get_endIndex(lua_State *L) return num_ret; } -static int _cocostudio_timeline_AnimationInfo_set_endIndex(lua_State *L) +static int _olua_fun_cocostudio_timeline_AnimationInfo_endIndex$2(lua_State *L) { olua_startinvoke(L); @@ -244,7 +167,28 @@ static int _cocostudio_timeline_AnimationInfo_set_endIndex(lua_State *L) return 0; } -static int _cocostudio_timeline_AnimationInfo_get_name(lua_State *L) +static int _olua_fun_cocostudio_timeline_AnimationInfo_endIndex(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // int endIndex + return _olua_fun_cocostudio_timeline_AnimationInfo_endIndex$1(L); + } + + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // int endIndex + return _olua_fun_cocostudio_timeline_AnimationInfo_endIndex$2(L); + // } + } + + luaL_error(L, "method 'cocostudio::timeline::AnimationInfo::endIndex' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocostudio_timeline_AnimationInfo_name$1(lua_State *L) { olua_startinvoke(L); @@ -261,7 +205,7 @@ static int _cocostudio_timeline_AnimationInfo_get_name(lua_State *L) return num_ret; } -static int _cocostudio_timeline_AnimationInfo_set_name(lua_State *L) +static int _olua_fun_cocostudio_timeline_AnimationInfo_name$2(lua_State *L) { olua_startinvoke(L); @@ -279,7 +223,85 @@ static int _cocostudio_timeline_AnimationInfo_set_name(lua_State *L) return 0; } -static int _cocostudio_timeline_AnimationInfo_get_startIndex(lua_State *L) +static int _olua_fun_cocostudio_timeline_AnimationInfo_name(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // std::string name + return _olua_fun_cocostudio_timeline_AnimationInfo_name$1(L); + } + + if (num_args == 1) { + // if ((olua_is_string(L, 2))) { + // std::string name + return _olua_fun_cocostudio_timeline_AnimationInfo_name$2(L); + // } + } + + luaL_error(L, "method 'cocostudio::timeline::AnimationInfo::name' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocostudio_timeline_AnimationInfo_new$1(lua_State *L) +{ + olua_startinvoke(L); + + // cocostudio::timeline::AnimationInfo() + cocostudio::timeline::AnimationInfo *ret = new cocostudio::timeline::AnimationInfo(); + int num_ret = olua_push_object(L, ret, "ccs.timeline.AnimationInfo"); + olua_postnew(L, ret); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_cocostudio_timeline_AnimationInfo_new$2(lua_State *L) +{ + olua_startinvoke(L); + + std::string arg1; /** otherName */ + int arg2 = 0; /** otherStartIndex */ + int arg3 = 0; /** otherEndIndex */ + + olua_check_string(L, 1, &arg1); + olua_check_integer(L, 2, &arg2); + olua_check_integer(L, 3, &arg3); + + // cocostudio::timeline::AnimationInfo(const std::string &otherName, int otherStartIndex, int otherEndIndex) + cocostudio::timeline::AnimationInfo *ret = new cocostudio::timeline::AnimationInfo(arg1, arg2, arg3); + int num_ret = olua_push_object(L, ret, "ccs.timeline.AnimationInfo"); + olua_postnew(L, ret); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_cocostudio_timeline_AnimationInfo_new(lua_State *L) +{ + int num_args = lua_gettop(L); + + if (num_args == 0) { + // cocostudio::timeline::AnimationInfo() + return _olua_fun_cocostudio_timeline_AnimationInfo_new$1(L); + } + + if (num_args == 3) { + // if ((olua_is_string(L, 1)) && (olua_is_integer(L, 2)) && (olua_is_integer(L, 3))) { + // cocostudio::timeline::AnimationInfo(const std::string &otherName, int otherStartIndex, int otherEndIndex) + return _olua_fun_cocostudio_timeline_AnimationInfo_new$2(L); + // } + } + + luaL_error(L, "method 'cocostudio::timeline::AnimationInfo::new' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocostudio_timeline_AnimationInfo_startIndex$1(lua_State *L) { olua_startinvoke(L); @@ -296,7 +318,7 @@ static int _cocostudio_timeline_AnimationInfo_get_startIndex(lua_State *L) return num_ret; } -static int _cocostudio_timeline_AnimationInfo_set_startIndex(lua_State *L) +static int _olua_fun_cocostudio_timeline_AnimationInfo_startIndex$2(lua_State *L) { olua_startinvoke(L); @@ -314,24 +336,53 @@ static int _cocostudio_timeline_AnimationInfo_set_startIndex(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocostudio_timeline_AnimationInfo(lua_State *L) +static int _olua_fun_cocostudio_timeline_AnimationInfo_startIndex(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // int startIndex + return _olua_fun_cocostudio_timeline_AnimationInfo_startIndex$1(L); + } + + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // int startIndex + return _olua_fun_cocostudio_timeline_AnimationInfo_startIndex$2(L); + // } + } + + luaL_error(L, "method 'cocostudio::timeline::AnimationInfo::startIndex' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_cls_ccs_timeline_AnimationInfo(lua_State *L) { oluacls_class(L, "ccs.timeline.AnimationInfo"); - oluacls_func(L, "__call", _cocostudio_timeline_AnimationInfo___call); - oluacls_func(L, "__gc", _cocostudio_timeline_AnimationInfo___gc); - oluacls_func(L, "__olua_move", _cocostudio_timeline_AnimationInfo___olua_move); - oluacls_func(L, "new", _cocostudio_timeline_AnimationInfo_new); - oluacls_prop(L, "clipEndCallBack", _cocostudio_timeline_AnimationInfo_get_clipEndCallBack, _cocostudio_timeline_AnimationInfo_set_clipEndCallBack); - oluacls_prop(L, "endIndex", _cocostudio_timeline_AnimationInfo_get_endIndex, _cocostudio_timeline_AnimationInfo_set_endIndex); - oluacls_prop(L, "name", _cocostudio_timeline_AnimationInfo_get_name, _cocostudio_timeline_AnimationInfo_set_name); - oluacls_prop(L, "startIndex", _cocostudio_timeline_AnimationInfo_get_startIndex, _cocostudio_timeline_AnimationInfo_set_startIndex); + oluacls_func(L, "__gc", _olua_fun_cocostudio_timeline_AnimationInfo___gc); + oluacls_func(L, "__olua_move", _olua_fun_cocostudio_timeline_AnimationInfo___olua_move); + oluacls_func(L, "new", _olua_fun_cocostudio_timeline_AnimationInfo_new); + oluacls_prop(L, "clipEndCallBack", _olua_fun_cocostudio_timeline_AnimationInfo_clipEndCallBack, _olua_fun_cocostudio_timeline_AnimationInfo_clipEndCallBack); + oluacls_prop(L, "endIndex", _olua_fun_cocostudio_timeline_AnimationInfo_endIndex, _olua_fun_cocostudio_timeline_AnimationInfo_endIndex); + oluacls_prop(L, "name", _olua_fun_cocostudio_timeline_AnimationInfo_name, _olua_fun_cocostudio_timeline_AnimationInfo_name); + oluacls_prop(L, "startIndex", _olua_fun_cocostudio_timeline_AnimationInfo_startIndex, _olua_fun_cocostudio_timeline_AnimationInfo_startIndex); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccs_timeline_AnimationInfo(lua_State *L) +{ + olua_require(L, "cocos2d_studio", luaopen_cocos2d_studio); + if (!olua_getclass(L, "ccs.timeline.AnimationInfo")) { + luaL_error(L, "class not found: cocostudio::timeline::AnimationInfo"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_CSLoader___gc(lua_State *L) +static int _olua_fun_cocos2d_CSLoader___gc(lua_State *L) { olua_startinvoke(L); @@ -343,7 +394,7 @@ static int _cocos2d_CSLoader___gc(lua_State *L) return 0; } -static int _cocos2d_CSLoader___olua_move(lua_State *L) +static int _olua_fun_cocos2d_CSLoader___olua_move(lua_State *L) { olua_startinvoke(L); @@ -355,7 +406,7 @@ static int _cocos2d_CSLoader___olua_move(lua_State *L) return 1; } -static int _cocos2d_CSLoader_bindCallback(lua_State *L) +static int _olua_fun_cocos2d_CSLoader_bindCallback(lua_State *L) { olua_startinvoke(L); @@ -380,7 +431,7 @@ static int _cocos2d_CSLoader_bindCallback(lua_State *L) return num_ret; } -static int _cocos2d_CSLoader_createNode$1(lua_State *L) +static int _olua_fun_cocos2d_CSLoader_createNode$1(lua_State *L) { olua_startinvoke(L); @@ -397,7 +448,7 @@ static int _cocos2d_CSLoader_createNode$1(lua_State *L) return num_ret; } -static int _cocos2d_CSLoader_createNode$2(lua_State *L) +static int _olua_fun_cocos2d_CSLoader_createNode$2(lua_State *L) { olua_startinvoke(L); @@ -409,9 +460,10 @@ static int _cocos2d_CSLoader_createNode$2(lua_State *L) void *cb_store = (void *)olua_pushclassobj(L, "cc.CSLoader"); std::string cb_tag = "createNode"; - std::string cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_NEW); + std::string cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_NEW); olua_Context cb_ctx = olua_context(L); - arg2 = [cb_store, cb_name, cb_ctx](cocos2d::Ref *arg1) { + // lua_State *ML = olua_mainthread(L); + arg2 = [cb_store, cb_name, cb_ctx /*, ML */](cocos2d::Ref *cb_arg1) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); @@ -419,7 +471,7 @@ static int _cocos2d_CSLoader_createNode$2(lua_State *L) int top = lua_gettop(L); size_t last = olua_push_objpool(L); olua_enable_objpool(L); - olua_push_object(L, arg1, "cc.Ref"); + olua_push_object(L, cb_arg1, "cc.Ref"); olua_disable_objpool(L); olua_callback(L, cb_store, cb_name.c_str(), 1); @@ -430,7 +482,7 @@ static int _cocos2d_CSLoader_createNode$2(lua_State *L) } }; - // static cocos2d::Node *createNode(const std::string &filename, @localvar const std::function &callback) + // static cocos2d::Node *createNode(const std::string &filename, const std::function &callback) cocos2d::Node *ret = cocos2d::CSLoader::createNode(arg1, arg2); int num_ret = olua_push_object(L, ret, "cc.Node"); @@ -441,7 +493,7 @@ static int _cocos2d_CSLoader_createNode$2(lua_State *L) return num_ret; } -static int _cocos2d_CSLoader_createNode$3(lua_State *L) +static int _olua_fun_cocos2d_CSLoader_createNode$3(lua_State *L) { olua_startinvoke(L); @@ -458,7 +510,7 @@ static int _cocos2d_CSLoader_createNode$3(lua_State *L) return num_ret; } -static int _cocos2d_CSLoader_createNode$4(lua_State *L) +static int _olua_fun_cocos2d_CSLoader_createNode$4(lua_State *L) { olua_startinvoke(L); @@ -470,9 +522,10 @@ static int _cocos2d_CSLoader_createNode$4(lua_State *L) void *cb_store = (void *)olua_pushclassobj(L, "cc.CSLoader"); std::string cb_tag = "createNode"; - std::string cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_NEW); + std::string cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_NEW); olua_Context cb_ctx = olua_context(L); - arg2 = [cb_store, cb_name, cb_ctx](cocos2d::Ref *arg1) { + // lua_State *ML = olua_mainthread(L); + arg2 = [cb_store, cb_name, cb_ctx /*, ML */](cocos2d::Ref *cb_arg1) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); @@ -480,7 +533,7 @@ static int _cocos2d_CSLoader_createNode$4(lua_State *L) int top = lua_gettop(L); size_t last = olua_push_objpool(L); olua_enable_objpool(L); - olua_push_object(L, arg1, "cc.Ref"); + olua_push_object(L, cb_arg1, "cc.Ref"); olua_disable_objpool(L); olua_callback(L, cb_store, cb_name.c_str(), 1); @@ -491,7 +544,7 @@ static int _cocos2d_CSLoader_createNode$4(lua_State *L) } }; - // static cocos2d::Node *createNode(const cocos2d::Data &data, @localvar const std::function &callback) + // static cocos2d::Node *createNode(const cocos2d::Data &data, const std::function &callback) cocos2d::Node *ret = cocos2d::CSLoader::createNode(arg1, arg2); int num_ret = olua_push_object(L, ret, "cc.Node"); @@ -502,31 +555,31 @@ static int _cocos2d_CSLoader_createNode$4(lua_State *L) return num_ret; } -static int _cocos2d_CSLoader_createNode(lua_State *L) +static int _olua_fun_cocos2d_CSLoader_createNode(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 1) { if ((olua_is_string(L, 1))) { // static cocos2d::Node *createNode(const std::string &filename) - return _cocos2d_CSLoader_createNode$1(L); + return _olua_fun_cocos2d_CSLoader_createNode$1(L); } // if ((olua_is_cocos2d_Data(L, 1))) { // static cocos2d::Node *createNode(const cocos2d::Data &data) - return _cocos2d_CSLoader_createNode$3(L); + return _olua_fun_cocos2d_CSLoader_createNode$3(L); // } } if (num_args == 2) { if ((olua_is_string(L, 1)) && (olua_is_callback(L, 2, "std.function"))) { - // static cocos2d::Node *createNode(const std::string &filename, @localvar const std::function &callback) - return _cocos2d_CSLoader_createNode$2(L); + // static cocos2d::Node *createNode(const std::string &filename, const std::function &callback) + return _olua_fun_cocos2d_CSLoader_createNode$2(L); } // if ((olua_is_cocos2d_Data(L, 1)) && (olua_is_callback(L, 2, "std.function"))) { - // static cocos2d::Node *createNode(const cocos2d::Data &data, @localvar const std::function &callback) - return _cocos2d_CSLoader_createNode$4(L); + // static cocos2d::Node *createNode(const cocos2d::Data &data, const std::function &callback) + return _olua_fun_cocos2d_CSLoader_createNode$4(L); // } } @@ -535,7 +588,7 @@ static int _cocos2d_CSLoader_createNode(lua_State *L) return 0; } -static int _cocos2d_CSLoader_createNodeFromJson(lua_State *L) +static int _olua_fun_cocos2d_CSLoader_createNodeFromJson(lua_State *L) { olua_startinvoke(L); @@ -554,7 +607,7 @@ static int _cocos2d_CSLoader_createNodeFromJson(lua_State *L) return num_ret; } -static int _cocos2d_CSLoader_createNodeWithFlatBuffersFile(lua_State *L) +static int _olua_fun_cocos2d_CSLoader_createNodeWithFlatBuffersFile(lua_State *L) { olua_startinvoke(L); @@ -573,7 +626,7 @@ static int _cocos2d_CSLoader_createNodeWithFlatBuffersFile(lua_State *L) return num_ret; } -static int _cocos2d_CSLoader_createNodeWithFlatBuffersForSimulator(lua_State *L) +static int _olua_fun_cocos2d_CSLoader_createNodeWithFlatBuffersForSimulator(lua_State *L) { olua_startinvoke(L); @@ -592,7 +645,7 @@ static int _cocos2d_CSLoader_createNodeWithFlatBuffersForSimulator(lua_State *L) return num_ret; } -static int _cocos2d_CSLoader_createNodeWithVisibleSize$1(lua_State *L) +static int _olua_fun_cocos2d_CSLoader_createNodeWithVisibleSize$1(lua_State *L) { olua_startinvoke(L); @@ -609,7 +662,7 @@ static int _cocos2d_CSLoader_createNodeWithVisibleSize$1(lua_State *L) return num_ret; } -static int _cocos2d_CSLoader_createNodeWithVisibleSize$2(lua_State *L) +static int _olua_fun_cocos2d_CSLoader_createNodeWithVisibleSize$2(lua_State *L) { olua_startinvoke(L); @@ -621,9 +674,10 @@ static int _cocos2d_CSLoader_createNodeWithVisibleSize$2(lua_State *L) void *cb_store = (void *)olua_pushclassobj(L, "cc.CSLoader"); std::string cb_tag = "createNodeWithVisibleSize"; - std::string cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_NEW); + std::string cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_NEW); olua_Context cb_ctx = olua_context(L); - arg2 = [cb_store, cb_name, cb_ctx](cocos2d::Ref *arg1) { + // lua_State *ML = olua_mainthread(L); + arg2 = [cb_store, cb_name, cb_ctx /*, ML */](cocos2d::Ref *cb_arg1) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); @@ -631,7 +685,7 @@ static int _cocos2d_CSLoader_createNodeWithVisibleSize$2(lua_State *L) int top = lua_gettop(L); size_t last = olua_push_objpool(L); olua_enable_objpool(L); - olua_push_object(L, arg1, "cc.Ref"); + olua_push_object(L, cb_arg1, "cc.Ref"); olua_disable_objpool(L); olua_callback(L, cb_store, cb_name.c_str(), 1); @@ -642,7 +696,7 @@ static int _cocos2d_CSLoader_createNodeWithVisibleSize$2(lua_State *L) } }; - // static cocos2d::Node *createNodeWithVisibleSize(const std::string &filename, @localvar const std::function &callback) + // static cocos2d::Node *createNodeWithVisibleSize(const std::string &filename, const std::function &callback) cocos2d::Node *ret = cocos2d::CSLoader::createNodeWithVisibleSize(arg1, arg2); int num_ret = olua_push_object(L, ret, "cc.Node"); @@ -653,21 +707,21 @@ static int _cocos2d_CSLoader_createNodeWithVisibleSize$2(lua_State *L) return num_ret; } -static int _cocos2d_CSLoader_createNodeWithVisibleSize(lua_State *L) +static int _olua_fun_cocos2d_CSLoader_createNodeWithVisibleSize(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 1) { // if ((olua_is_string(L, 1))) { // static cocos2d::Node *createNodeWithVisibleSize(const std::string &filename) - return _cocos2d_CSLoader_createNodeWithVisibleSize$1(L); + return _olua_fun_cocos2d_CSLoader_createNodeWithVisibleSize$1(L); // } } if (num_args == 2) { // if ((olua_is_string(L, 1)) && (olua_is_callback(L, 2, "std.function"))) { - // static cocos2d::Node *createNodeWithVisibleSize(const std::string &filename, @localvar const std::function &callback) - return _cocos2d_CSLoader_createNodeWithVisibleSize$2(L); + // static cocos2d::Node *createNodeWithVisibleSize(const std::string &filename, const std::function &callback) + return _olua_fun_cocos2d_CSLoader_createNodeWithVisibleSize$2(L); // } } @@ -676,7 +730,7 @@ static int _cocos2d_CSLoader_createNodeWithVisibleSize(lua_State *L) return 0; } -static int _cocos2d_CSLoader_createTimeline$1(lua_State *L) +static int _olua_fun_cocos2d_CSLoader_createTimeline$1(lua_State *L) { olua_startinvoke(L); @@ -693,7 +747,7 @@ static int _cocos2d_CSLoader_createTimeline$1(lua_State *L) return num_ret; } -static int _cocos2d_CSLoader_createTimeline$2(lua_State *L) +static int _olua_fun_cocos2d_CSLoader_createTimeline$2(lua_State *L) { olua_startinvoke(L); @@ -712,21 +766,21 @@ static int _cocos2d_CSLoader_createTimeline$2(lua_State *L) return num_ret; } -static int _cocos2d_CSLoader_createTimeline(lua_State *L) +static int _olua_fun_cocos2d_CSLoader_createTimeline(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 1) { // if ((olua_is_string(L, 1))) { // static cocostudio::timeline::ActionTimeline *createTimeline(const std::string &filename) - return _cocos2d_CSLoader_createTimeline$1(L); + return _olua_fun_cocos2d_CSLoader_createTimeline$1(L); // } } if (num_args == 2) { // if ((olua_is_cocos2d_Data(L, 1)) && (olua_is_string(L, 2))) { // static cocostudio::timeline::ActionTimeline *createTimeline(const cocos2d::Data &data, const std::string &filename) - return _cocos2d_CSLoader_createTimeline$2(L); + return _olua_fun_cocos2d_CSLoader_createTimeline$2(L); // } } @@ -735,7 +789,7 @@ static int _cocos2d_CSLoader_createTimeline(lua_State *L) return 0; } -static int _cocos2d_CSLoader_destroyInstance(lua_State *L) +static int _olua_fun_cocos2d_CSLoader_destroyInstance(lua_State *L) { olua_startinvoke(L); @@ -747,7 +801,7 @@ static int _cocos2d_CSLoader_destroyInstance(lua_State *L) return 0; } -static int _cocos2d_CSLoader_getInstance(lua_State *L) +static int _olua_fun_cocos2d_CSLoader_getInstance(lua_State *L) { olua_startinvoke(L); @@ -760,7 +814,7 @@ static int _cocos2d_CSLoader_getInstance(lua_State *L) return num_ret; } -static int _cocos2d_CSLoader_getJsonPath(lua_State *L) +static int _olua_fun_cocos2d_CSLoader_getJsonPath(lua_State *L) { olua_startinvoke(L); @@ -777,7 +831,7 @@ static int _cocos2d_CSLoader_getJsonPath(lua_State *L) return num_ret; } -static int _cocos2d_CSLoader_init(lua_State *L) +static int _olua_fun_cocos2d_CSLoader_init(lua_State *L) { olua_startinvoke(L); @@ -793,7 +847,7 @@ static int _cocos2d_CSLoader_init(lua_State *L) return 0; } -static int _cocos2d_CSLoader_isRecordJsonPath(lua_State *L) +static int _olua_fun_cocos2d_CSLoader_isRecordJsonPath(lua_State *L) { olua_startinvoke(L); @@ -810,7 +864,7 @@ static int _cocos2d_CSLoader_isRecordJsonPath(lua_State *L) return num_ret; } -static int _cocos2d_CSLoader_loadNodeWithContent(lua_State *L) +static int _olua_fun_cocos2d_CSLoader_loadNodeWithContent(lua_State *L) { olua_startinvoke(L); @@ -829,7 +883,7 @@ static int _cocos2d_CSLoader_loadNodeWithContent(lua_State *L) return num_ret; } -static int _cocos2d_CSLoader_loadNodeWithFile(lua_State *L) +static int _olua_fun_cocos2d_CSLoader_loadNodeWithFile(lua_State *L) { olua_startinvoke(L); @@ -848,11 +902,11 @@ static int _cocos2d_CSLoader_loadNodeWithFile(lua_State *L) return num_ret; } -static int _cocos2d_CSLoader_new(lua_State *L) +static int _olua_fun_cocos2d_CSLoader_new(lua_State *L) { olua_startinvoke(L); - // CSLoader() + // cocos2d::CSLoader() cocos2d::CSLoader *ret = new cocos2d::CSLoader(); int num_ret = olua_push_object(L, ret, "cc.CSLoader"); olua_postnew(L, ret); @@ -862,7 +916,7 @@ static int _cocos2d_CSLoader_new(lua_State *L) return num_ret; } -static int _cocos2d_CSLoader_nodeWithFlatBuffersFile(lua_State *L) +static int _olua_fun_cocos2d_CSLoader_nodeWithFlatBuffersFile(lua_State *L) { olua_startinvoke(L); @@ -881,7 +935,7 @@ static int _cocos2d_CSLoader_nodeWithFlatBuffersFile(lua_State *L) return num_ret; } -static int _cocos2d_CSLoader_setJsonPath(lua_State *L) +static int _olua_fun_cocos2d_CSLoader_setJsonPath(lua_State *L) { olua_startinvoke(L); @@ -899,7 +953,7 @@ static int _cocos2d_CSLoader_setJsonPath(lua_State *L) return 0; } -static int _cocos2d_CSLoader_setRecordJsonPath(lua_State *L) +static int _olua_fun_cocos2d_CSLoader_setRecordJsonPath(lua_State *L) { olua_startinvoke(L); @@ -917,40 +971,48 @@ static int _cocos2d_CSLoader_setRecordJsonPath(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_CSLoader(lua_State *L) +static int _olua_cls_cc_CSLoader(lua_State *L) { oluacls_class(L, "cc.CSLoader"); - oluacls_func(L, "__gc", _cocos2d_CSLoader___gc); - oluacls_func(L, "__olua_move", _cocos2d_CSLoader___olua_move); - oluacls_func(L, "bindCallback", _cocos2d_CSLoader_bindCallback); - oluacls_func(L, "createNode", _cocos2d_CSLoader_createNode); - oluacls_func(L, "createNodeFromJson", _cocos2d_CSLoader_createNodeFromJson); - oluacls_func(L, "createNodeWithFlatBuffersFile", _cocos2d_CSLoader_createNodeWithFlatBuffersFile); - oluacls_func(L, "createNodeWithFlatBuffersForSimulator", _cocos2d_CSLoader_createNodeWithFlatBuffersForSimulator); - oluacls_func(L, "createNodeWithVisibleSize", _cocos2d_CSLoader_createNodeWithVisibleSize); - oluacls_func(L, "createTimeline", _cocos2d_CSLoader_createTimeline); - oluacls_func(L, "destroyInstance", _cocos2d_CSLoader_destroyInstance); - oluacls_func(L, "getInstance", _cocos2d_CSLoader_getInstance); - oluacls_func(L, "getJsonPath", _cocos2d_CSLoader_getJsonPath); - oluacls_func(L, "init", _cocos2d_CSLoader_init); - oluacls_func(L, "isRecordJsonPath", _cocos2d_CSLoader_isRecordJsonPath); - oluacls_func(L, "loadNodeWithContent", _cocos2d_CSLoader_loadNodeWithContent); - oluacls_func(L, "loadNodeWithFile", _cocos2d_CSLoader_loadNodeWithFile); - oluacls_func(L, "new", _cocos2d_CSLoader_new); - oluacls_func(L, "nodeWithFlatBuffersFile", _cocos2d_CSLoader_nodeWithFlatBuffersFile); - oluacls_func(L, "setJsonPath", _cocos2d_CSLoader_setJsonPath); - oluacls_func(L, "setRecordJsonPath", _cocos2d_CSLoader_setRecordJsonPath); - oluacls_prop(L, "instance", _cocos2d_CSLoader_getInstance, nullptr); - oluacls_prop(L, "jsonPath", _cocos2d_CSLoader_getJsonPath, _cocos2d_CSLoader_setJsonPath); - oluacls_prop(L, "recordJsonPath", _cocos2d_CSLoader_isRecordJsonPath, _cocos2d_CSLoader_setRecordJsonPath); + oluacls_func(L, "__gc", _olua_fun_cocos2d_CSLoader___gc); + oluacls_func(L, "__olua_move", _olua_fun_cocos2d_CSLoader___olua_move); + oluacls_func(L, "bindCallback", _olua_fun_cocos2d_CSLoader_bindCallback); + oluacls_func(L, "createNode", _olua_fun_cocos2d_CSLoader_createNode); + oluacls_func(L, "createNodeFromJson", _olua_fun_cocos2d_CSLoader_createNodeFromJson); + oluacls_func(L, "createNodeWithFlatBuffersFile", _olua_fun_cocos2d_CSLoader_createNodeWithFlatBuffersFile); + oluacls_func(L, "createNodeWithFlatBuffersForSimulator", _olua_fun_cocos2d_CSLoader_createNodeWithFlatBuffersForSimulator); + oluacls_func(L, "createNodeWithVisibleSize", _olua_fun_cocos2d_CSLoader_createNodeWithVisibleSize); + oluacls_func(L, "createTimeline", _olua_fun_cocos2d_CSLoader_createTimeline); + oluacls_func(L, "destroyInstance", _olua_fun_cocos2d_CSLoader_destroyInstance); + oluacls_func(L, "getInstance", _olua_fun_cocos2d_CSLoader_getInstance); + oluacls_func(L, "getJsonPath", _olua_fun_cocos2d_CSLoader_getJsonPath); + oluacls_func(L, "init", _olua_fun_cocos2d_CSLoader_init); + oluacls_func(L, "isRecordJsonPath", _olua_fun_cocos2d_CSLoader_isRecordJsonPath); + oluacls_func(L, "loadNodeWithContent", _olua_fun_cocos2d_CSLoader_loadNodeWithContent); + oluacls_func(L, "loadNodeWithFile", _olua_fun_cocos2d_CSLoader_loadNodeWithFile); + oluacls_func(L, "new", _olua_fun_cocos2d_CSLoader_new); + oluacls_func(L, "nodeWithFlatBuffersFile", _olua_fun_cocos2d_CSLoader_nodeWithFlatBuffersFile); + oluacls_func(L, "setJsonPath", _olua_fun_cocos2d_CSLoader_setJsonPath); + oluacls_func(L, "setRecordJsonPath", _olua_fun_cocos2d_CSLoader_setRecordJsonPath); + oluacls_prop(L, "instance", _olua_fun_cocos2d_CSLoader_getInstance, nullptr); + oluacls_prop(L, "jsonPath", _olua_fun_cocos2d_CSLoader_getJsonPath, _olua_fun_cocos2d_CSLoader_setJsonPath); + oluacls_prop(L, "recordJsonPath", _olua_fun_cocos2d_CSLoader_isRecordJsonPath, _olua_fun_cocos2d_CSLoader_setRecordJsonPath); return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocostudio_MovementEventType(lua_State *L) +OLUA_LIB int luaopen_cc_CSLoader(lua_State *L) +{ + olua_require(L, "cocos2d_studio", luaopen_cocos2d_studio); + if (!olua_getclass(L, "cc.CSLoader")) { + luaL_error(L, "class not found: cocos2d::CSLoader"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_ccs_MovementEventType(lua_State *L) { oluacls_class(L, "ccs.MovementEventType"); oluacls_func(L, "__index", olua_indexerror); @@ -961,10 +1023,19 @@ OLUA_LIB int luaopen_cocostudio_MovementEventType(lua_State *L) return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocostudio_DisplayType(lua_State *L) +OLUA_LIB int luaopen_ccs_MovementEventType(lua_State *L) +{ + olua_require(L, "cocos2d_studio", luaopen_cocos2d_studio); + if (!olua_getclass(L, "ccs.MovementEventType")) { + luaL_error(L, "class not found: cocostudio::MovementEventType"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_ccs_DisplayType(lua_State *L) { oluacls_class(L, "ccs.DisplayType"); oluacls_func(L, "__index", olua_indexerror); @@ -976,9 +1047,19 @@ OLUA_LIB int luaopen_cocostudio_DisplayType(lua_State *L) return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccs_DisplayType(lua_State *L) +{ + olua_require(L, "cocos2d_studio", luaopen_cocos2d_studio); + if (!olua_getclass(L, "ccs.DisplayType")) { + luaL_error(L, "class not found: cocostudio::DisplayType"); + } + return 1; +} OLUA_END_DECLS -static int _cocostudio_ActionFrame_getAction$1(lua_State *L) +static int _olua_fun_cocostudio_ActionFrame_getAction$1(lua_State *L) { olua_startinvoke(L); @@ -1000,7 +1081,7 @@ static int _cocostudio_ActionFrame_getAction$1(lua_State *L) return num_ret; } -static int _cocostudio_ActionFrame_getAction$2(lua_State *L) +static int _olua_fun_cocostudio_ActionFrame_getAction$2(lua_State *L) { olua_startinvoke(L); @@ -1024,21 +1105,21 @@ static int _cocostudio_ActionFrame_getAction$2(lua_State *L) return num_ret; } -static int _cocostudio_ActionFrame_getAction(lua_State *L) +static int _olua_fun_cocostudio_ActionFrame_getAction(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_number(L, 2))) { // @addref(action |) cocos2d::ActionInterval *getAction(float duration) - return _cocostudio_ActionFrame_getAction$1(L); + return _olua_fun_cocostudio_ActionFrame_getAction$1(L); // } } if (num_args == 2) { // if ((olua_is_number(L, 2)) && (olua_is_object(L, 3, "ccs.ActionFrame"))) { // @addref(action |) cocos2d::ActionInterval *getAction(float duration, cocostudio::ActionFrame *srcFrame) - return _cocostudio_ActionFrame_getAction$2(L); + return _olua_fun_cocostudio_ActionFrame_getAction$2(L); // } } @@ -1047,7 +1128,7 @@ static int _cocostudio_ActionFrame_getAction(lua_State *L) return 0; } -static int _cocostudio_ActionFrame_getEasingType(lua_State *L) +static int _olua_fun_cocostudio_ActionFrame_getEasingType(lua_State *L) { olua_startinvoke(L); @@ -1064,7 +1145,7 @@ static int _cocostudio_ActionFrame_getEasingType(lua_State *L) return num_ret; } -static int _cocostudio_ActionFrame_getFrameIndex(lua_State *L) +static int _olua_fun_cocostudio_ActionFrame_getFrameIndex(lua_State *L) { olua_startinvoke(L); @@ -1081,7 +1162,7 @@ static int _cocostudio_ActionFrame_getFrameIndex(lua_State *L) return num_ret; } -static int _cocostudio_ActionFrame_getFrameTime(lua_State *L) +static int _olua_fun_cocostudio_ActionFrame_getFrameTime(lua_State *L) { olua_startinvoke(L); @@ -1098,7 +1179,7 @@ static int _cocostudio_ActionFrame_getFrameTime(lua_State *L) return num_ret; } -static int _cocostudio_ActionFrame_getFrameType(lua_State *L) +static int _olua_fun_cocostudio_ActionFrame_getFrameType(lua_State *L) { olua_startinvoke(L); @@ -1115,11 +1196,11 @@ static int _cocostudio_ActionFrame_getFrameType(lua_State *L) return num_ret; } -static int _cocostudio_ActionFrame_new(lua_State *L) +static int _olua_fun_cocostudio_ActionFrame_new(lua_State *L) { olua_startinvoke(L); - // ActionFrame() + // cocostudio::ActionFrame() cocostudio::ActionFrame *ret = new cocostudio::ActionFrame(); int num_ret = olua_push_object(L, ret, "ccs.ActionFrame"); olua_postnew(L, ret); @@ -1129,7 +1210,7 @@ static int _cocostudio_ActionFrame_new(lua_State *L) return num_ret; } -static int _cocostudio_ActionFrame_setEasingParameter(lua_State *L) +static int _olua_fun_cocostudio_ActionFrame_setEasingParameter(lua_State *L) { olua_startinvoke(L); @@ -1149,7 +1230,7 @@ static int _cocostudio_ActionFrame_setEasingParameter(lua_State *L) return 0; } -static int _cocostudio_ActionFrame_setEasingType(lua_State *L) +static int _olua_fun_cocostudio_ActionFrame_setEasingType(lua_State *L) { olua_startinvoke(L); @@ -1167,7 +1248,7 @@ static int _cocostudio_ActionFrame_setEasingType(lua_State *L) return 0; } -static int _cocostudio_ActionFrame_setFrameIndex(lua_State *L) +static int _olua_fun_cocostudio_ActionFrame_setFrameIndex(lua_State *L) { olua_startinvoke(L); @@ -1185,7 +1266,7 @@ static int _cocostudio_ActionFrame_setFrameIndex(lua_State *L) return 0; } -static int _cocostudio_ActionFrame_setFrameTime(lua_State *L) +static int _olua_fun_cocostudio_ActionFrame_setFrameTime(lua_State *L) { olua_startinvoke(L); @@ -1203,7 +1284,7 @@ static int _cocostudio_ActionFrame_setFrameTime(lua_State *L) return 0; } -static int _cocostudio_ActionFrame_setFrameType(lua_State *L) +static int _olua_fun_cocostudio_ActionFrame_setFrameType(lua_State *L) { olua_startinvoke(L); @@ -1221,31 +1302,40 @@ static int _cocostudio_ActionFrame_setFrameType(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocostudio_ActionFrame(lua_State *L) +static int _olua_cls_ccs_ActionFrame(lua_State *L) { oluacls_class(L, "ccs.ActionFrame"); - oluacls_func(L, "getAction", _cocostudio_ActionFrame_getAction); - oluacls_func(L, "getEasingType", _cocostudio_ActionFrame_getEasingType); - oluacls_func(L, "getFrameIndex", _cocostudio_ActionFrame_getFrameIndex); - oluacls_func(L, "getFrameTime", _cocostudio_ActionFrame_getFrameTime); - oluacls_func(L, "getFrameType", _cocostudio_ActionFrame_getFrameType); - oluacls_func(L, "new", _cocostudio_ActionFrame_new); - oluacls_func(L, "setEasingParameter", _cocostudio_ActionFrame_setEasingParameter); - oluacls_func(L, "setEasingType", _cocostudio_ActionFrame_setEasingType); - oluacls_func(L, "setFrameIndex", _cocostudio_ActionFrame_setFrameIndex); - oluacls_func(L, "setFrameTime", _cocostudio_ActionFrame_setFrameTime); - oluacls_func(L, "setFrameType", _cocostudio_ActionFrame_setFrameType); - oluacls_prop(L, "easingType", _cocostudio_ActionFrame_getEasingType, _cocostudio_ActionFrame_setEasingType); - oluacls_prop(L, "frameIndex", _cocostudio_ActionFrame_getFrameIndex, _cocostudio_ActionFrame_setFrameIndex); - oluacls_prop(L, "frameTime", _cocostudio_ActionFrame_getFrameTime, _cocostudio_ActionFrame_setFrameTime); - oluacls_prop(L, "frameType", _cocostudio_ActionFrame_getFrameType, _cocostudio_ActionFrame_setFrameType); + oluacls_func(L, "getAction", _olua_fun_cocostudio_ActionFrame_getAction); + oluacls_func(L, "getEasingType", _olua_fun_cocostudio_ActionFrame_getEasingType); + oluacls_func(L, "getFrameIndex", _olua_fun_cocostudio_ActionFrame_getFrameIndex); + oluacls_func(L, "getFrameTime", _olua_fun_cocostudio_ActionFrame_getFrameTime); + oluacls_func(L, "getFrameType", _olua_fun_cocostudio_ActionFrame_getFrameType); + oluacls_func(L, "new", _olua_fun_cocostudio_ActionFrame_new); + oluacls_func(L, "setEasingParameter", _olua_fun_cocostudio_ActionFrame_setEasingParameter); + oluacls_func(L, "setEasingType", _olua_fun_cocostudio_ActionFrame_setEasingType); + oluacls_func(L, "setFrameIndex", _olua_fun_cocostudio_ActionFrame_setFrameIndex); + oluacls_func(L, "setFrameTime", _olua_fun_cocostudio_ActionFrame_setFrameTime); + oluacls_func(L, "setFrameType", _olua_fun_cocostudio_ActionFrame_setFrameType); + oluacls_prop(L, "easingType", _olua_fun_cocostudio_ActionFrame_getEasingType, _olua_fun_cocostudio_ActionFrame_setEasingType); + oluacls_prop(L, "frameIndex", _olua_fun_cocostudio_ActionFrame_getFrameIndex, _olua_fun_cocostudio_ActionFrame_setFrameIndex); + oluacls_prop(L, "frameTime", _olua_fun_cocostudio_ActionFrame_getFrameTime, _olua_fun_cocostudio_ActionFrame_setFrameTime); + oluacls_prop(L, "frameType", _olua_fun_cocostudio_ActionFrame_getFrameType, _olua_fun_cocostudio_ActionFrame_setFrameType); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccs_ActionFrame(lua_State *L) +{ + olua_require(L, "cocos2d_studio", luaopen_cocos2d_studio); + if (!olua_getclass(L, "ccs.ActionFrame")) { + luaL_error(L, "class not found: cocostudio::ActionFrame"); + } return 1; } OLUA_END_DECLS -static int _cocostudio_ActionFadeFrame_getOpacity(lua_State *L) +static int _olua_fun_cocostudio_ActionFadeFrame_getOpacity(lua_State *L) { olua_startinvoke(L); @@ -1262,11 +1352,11 @@ static int _cocostudio_ActionFadeFrame_getOpacity(lua_State *L) return num_ret; } -static int _cocostudio_ActionFadeFrame_new(lua_State *L) +static int _olua_fun_cocostudio_ActionFadeFrame_new(lua_State *L) { olua_startinvoke(L); - // ActionFadeFrame() + // cocostudio::ActionFadeFrame() cocostudio::ActionFadeFrame *ret = new cocostudio::ActionFadeFrame(); int num_ret = olua_push_object(L, ret, "ccs.ActionFadeFrame"); olua_postnew(L, ret); @@ -1276,7 +1366,7 @@ static int _cocostudio_ActionFadeFrame_new(lua_State *L) return num_ret; } -static int _cocostudio_ActionFadeFrame_setOpacity(lua_State *L) +static int _olua_fun_cocostudio_ActionFadeFrame_setOpacity(lua_State *L) { olua_startinvoke(L); @@ -1294,20 +1384,29 @@ static int _cocostudio_ActionFadeFrame_setOpacity(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocostudio_ActionFadeFrame(lua_State *L) +static int _olua_cls_ccs_ActionFadeFrame(lua_State *L) { oluacls_class(L, "ccs.ActionFadeFrame"); - oluacls_func(L, "getOpacity", _cocostudio_ActionFadeFrame_getOpacity); - oluacls_func(L, "new", _cocostudio_ActionFadeFrame_new); - oluacls_func(L, "setOpacity", _cocostudio_ActionFadeFrame_setOpacity); - oluacls_prop(L, "opacity", _cocostudio_ActionFadeFrame_getOpacity, _cocostudio_ActionFadeFrame_setOpacity); + oluacls_func(L, "getOpacity", _olua_fun_cocostudio_ActionFadeFrame_getOpacity); + oluacls_func(L, "new", _olua_fun_cocostudio_ActionFadeFrame_new); + oluacls_func(L, "setOpacity", _olua_fun_cocostudio_ActionFadeFrame_setOpacity); + oluacls_prop(L, "opacity", _olua_fun_cocostudio_ActionFadeFrame_getOpacity, _olua_fun_cocostudio_ActionFadeFrame_setOpacity); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccs_ActionFadeFrame(lua_State *L) +{ + olua_require(L, "cocos2d_studio", luaopen_cocos2d_studio); + if (!olua_getclass(L, "ccs.ActionFadeFrame")) { + luaL_error(L, "class not found: cocostudio::ActionFadeFrame"); + } return 1; } OLUA_END_DECLS -static int _cocostudio_ActionFrameEasing_bounceTime(lua_State *L) +static int _olua_fun_cocostudio_ActionFrameEasing_bounceTime(lua_State *L) { olua_startinvoke(L); @@ -1326,7 +1425,7 @@ static int _cocostudio_ActionFrameEasing_bounceTime(lua_State *L) return num_ret; } -static int _cocostudio_ActionFrameEasing_easeValue(lua_State *L) +static int _olua_fun_cocostudio_ActionFrameEasing_easeValue(lua_State *L) { olua_startinvoke(L); @@ -1345,11 +1444,11 @@ static int _cocostudio_ActionFrameEasing_easeValue(lua_State *L) return num_ret; } -static int _cocostudio_ActionFrameEasing_new(lua_State *L) +static int _olua_fun_cocostudio_ActionFrameEasing_new(lua_State *L) { olua_startinvoke(L); - // ActionFrameEasing() + // cocostudio::ActionFrameEasing() cocostudio::ActionFrameEasing *ret = new cocostudio::ActionFrameEasing(); int num_ret = olua_push_object(L, ret, "ccs.ActionFrameEasing"); olua_postnew(L, ret); @@ -1359,19 +1458,28 @@ static int _cocostudio_ActionFrameEasing_new(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocostudio_ActionFrameEasing(lua_State *L) +static int _olua_cls_ccs_ActionFrameEasing(lua_State *L) { oluacls_class(L, "ccs.ActionFrameEasing"); - oluacls_func(L, "bounceTime", _cocostudio_ActionFrameEasing_bounceTime); - oluacls_func(L, "easeValue", _cocostudio_ActionFrameEasing_easeValue); - oluacls_func(L, "new", _cocostudio_ActionFrameEasing_new); + oluacls_func(L, "bounceTime", _olua_fun_cocostudio_ActionFrameEasing_bounceTime); + oluacls_func(L, "easeValue", _olua_fun_cocostudio_ActionFrameEasing_easeValue); + oluacls_func(L, "new", _olua_fun_cocostudio_ActionFrameEasing_new); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccs_ActionFrameEasing(lua_State *L) +{ + olua_require(L, "cocos2d_studio", luaopen_cocos2d_studio); + if (!olua_getclass(L, "ccs.ActionFrameEasing")) { + luaL_error(L, "class not found: cocostudio::ActionFrameEasing"); + } + return 1; +} OLUA_END_DECLS -static int _cocostudio_ActionMoveFrame_getPosition(lua_State *L) +static int _olua_fun_cocostudio_ActionMoveFrame_getPosition(lua_State *L) { olua_startinvoke(L); @@ -1381,18 +1489,18 @@ static int _cocostudio_ActionMoveFrame_getPosition(lua_State *L) // cocos2d::Vec2 getPosition() cocos2d::Vec2 ret = self->getPosition(); - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec2"); + int num_ret = olua_copy_object(L, ret, "cc.Vec2"); olua_endinvoke(L); return num_ret; } -static int _cocostudio_ActionMoveFrame_new(lua_State *L) +static int _olua_fun_cocostudio_ActionMoveFrame_new(lua_State *L) { olua_startinvoke(L); - // ActionMoveFrame() + // cocostudio::ActionMoveFrame() cocostudio::ActionMoveFrame *ret = new cocostudio::ActionMoveFrame(); int num_ret = olua_push_object(L, ret, "ccs.ActionMoveFrame"); olua_postnew(L, ret); @@ -1402,38 +1510,47 @@ static int _cocostudio_ActionMoveFrame_new(lua_State *L) return num_ret; } -static int _cocostudio_ActionMoveFrame_setPosition(lua_State *L) +static int _olua_fun_cocostudio_ActionMoveFrame_setPosition(lua_State *L) { olua_startinvoke(L); cocostudio::ActionMoveFrame *self = nullptr; - cocos2d::Vec2 arg1; /** pos */ + cocos2d::Vec2 *arg1; /** pos */ olua_to_object(L, 1, &self, "ccs.ActionMoveFrame"); olua_check_object(L, 2, &arg1, "cc.Vec2"); // void setPosition(cocos2d::Vec2 pos) - self->setPosition(arg1); + self->setPosition(*arg1); olua_endinvoke(L); return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocostudio_ActionMoveFrame(lua_State *L) +static int _olua_cls_ccs_ActionMoveFrame(lua_State *L) { oluacls_class(L, "ccs.ActionMoveFrame"); - oluacls_func(L, "getPosition", _cocostudio_ActionMoveFrame_getPosition); - oluacls_func(L, "new", _cocostudio_ActionMoveFrame_new); - oluacls_func(L, "setPosition", _cocostudio_ActionMoveFrame_setPosition); - oluacls_prop(L, "position", _cocostudio_ActionMoveFrame_getPosition, _cocostudio_ActionMoveFrame_setPosition); + oluacls_func(L, "getPosition", _olua_fun_cocostudio_ActionMoveFrame_getPosition); + oluacls_func(L, "new", _olua_fun_cocostudio_ActionMoveFrame_new); + oluacls_func(L, "setPosition", _olua_fun_cocostudio_ActionMoveFrame_setPosition); + oluacls_prop(L, "position", _olua_fun_cocostudio_ActionMoveFrame_getPosition, _olua_fun_cocostudio_ActionMoveFrame_setPosition); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccs_ActionMoveFrame(lua_State *L) +{ + olua_require(L, "cocos2d_studio", luaopen_cocos2d_studio); + if (!olua_getclass(L, "ccs.ActionMoveFrame")) { + luaL_error(L, "class not found: cocostudio::ActionMoveFrame"); + } return 1; } OLUA_END_DECLS -static int _cocostudio_ActionRotationFrame_getRotation(lua_State *L) +static int _olua_fun_cocostudio_ActionRotationFrame_getRotation(lua_State *L) { olua_startinvoke(L); @@ -1450,11 +1567,11 @@ static int _cocostudio_ActionRotationFrame_getRotation(lua_State *L) return num_ret; } -static int _cocostudio_ActionRotationFrame_new(lua_State *L) +static int _olua_fun_cocostudio_ActionRotationFrame_new(lua_State *L) { olua_startinvoke(L); - // ActionRotationFrame() + // cocostudio::ActionRotationFrame() cocostudio::ActionRotationFrame *ret = new cocostudio::ActionRotationFrame(); int num_ret = olua_push_object(L, ret, "ccs.ActionRotationFrame"); olua_postnew(L, ret); @@ -1464,7 +1581,7 @@ static int _cocostudio_ActionRotationFrame_new(lua_State *L) return num_ret; } -static int _cocostudio_ActionRotationFrame_setRotation(lua_State *L) +static int _olua_fun_cocostudio_ActionRotationFrame_setRotation(lua_State *L) { olua_startinvoke(L); @@ -1482,20 +1599,29 @@ static int _cocostudio_ActionRotationFrame_setRotation(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocostudio_ActionRotationFrame(lua_State *L) +static int _olua_cls_ccs_ActionRotationFrame(lua_State *L) { oluacls_class(L, "ccs.ActionRotationFrame"); - oluacls_func(L, "getRotation", _cocostudio_ActionRotationFrame_getRotation); - oluacls_func(L, "new", _cocostudio_ActionRotationFrame_new); - oluacls_func(L, "setRotation", _cocostudio_ActionRotationFrame_setRotation); - oluacls_prop(L, "rotation", _cocostudio_ActionRotationFrame_getRotation, _cocostudio_ActionRotationFrame_setRotation); + oluacls_func(L, "getRotation", _olua_fun_cocostudio_ActionRotationFrame_getRotation); + oluacls_func(L, "new", _olua_fun_cocostudio_ActionRotationFrame_new); + oluacls_func(L, "setRotation", _olua_fun_cocostudio_ActionRotationFrame_setRotation); + oluacls_prop(L, "rotation", _olua_fun_cocostudio_ActionRotationFrame_getRotation, _olua_fun_cocostudio_ActionRotationFrame_setRotation); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccs_ActionRotationFrame(lua_State *L) +{ + olua_require(L, "cocos2d_studio", luaopen_cocos2d_studio); + if (!olua_getclass(L, "ccs.ActionRotationFrame")) { + luaL_error(L, "class not found: cocostudio::ActionRotationFrame"); + } return 1; } OLUA_END_DECLS -static int _cocostudio_ActionScaleFrame_getScaleX(lua_State *L) +static int _olua_fun_cocostudio_ActionScaleFrame_getScaleX(lua_State *L) { olua_startinvoke(L); @@ -1512,7 +1638,7 @@ static int _cocostudio_ActionScaleFrame_getScaleX(lua_State *L) return num_ret; } -static int _cocostudio_ActionScaleFrame_getScaleY(lua_State *L) +static int _olua_fun_cocostudio_ActionScaleFrame_getScaleY(lua_State *L) { olua_startinvoke(L); @@ -1529,11 +1655,11 @@ static int _cocostudio_ActionScaleFrame_getScaleY(lua_State *L) return num_ret; } -static int _cocostudio_ActionScaleFrame_new(lua_State *L) +static int _olua_fun_cocostudio_ActionScaleFrame_new(lua_State *L) { olua_startinvoke(L); - // ActionScaleFrame() + // cocostudio::ActionScaleFrame() cocostudio::ActionScaleFrame *ret = new cocostudio::ActionScaleFrame(); int num_ret = olua_push_object(L, ret, "ccs.ActionScaleFrame"); olua_postnew(L, ret); @@ -1543,7 +1669,7 @@ static int _cocostudio_ActionScaleFrame_new(lua_State *L) return num_ret; } -static int _cocostudio_ActionScaleFrame_setScaleX(lua_State *L) +static int _olua_fun_cocostudio_ActionScaleFrame_setScaleX(lua_State *L) { olua_startinvoke(L); @@ -1561,7 +1687,7 @@ static int _cocostudio_ActionScaleFrame_setScaleX(lua_State *L) return 0; } -static int _cocostudio_ActionScaleFrame_setScaleY(lua_State *L) +static int _olua_fun_cocostudio_ActionScaleFrame_setScaleY(lua_State *L) { olua_startinvoke(L); @@ -1579,23 +1705,32 @@ static int _cocostudio_ActionScaleFrame_setScaleY(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocostudio_ActionScaleFrame(lua_State *L) +static int _olua_cls_ccs_ActionScaleFrame(lua_State *L) { oluacls_class(L, "ccs.ActionScaleFrame"); - oluacls_func(L, "getScaleX", _cocostudio_ActionScaleFrame_getScaleX); - oluacls_func(L, "getScaleY", _cocostudio_ActionScaleFrame_getScaleY); - oluacls_func(L, "new", _cocostudio_ActionScaleFrame_new); - oluacls_func(L, "setScaleX", _cocostudio_ActionScaleFrame_setScaleX); - oluacls_func(L, "setScaleY", _cocostudio_ActionScaleFrame_setScaleY); - oluacls_prop(L, "scaleX", _cocostudio_ActionScaleFrame_getScaleX, _cocostudio_ActionScaleFrame_setScaleX); - oluacls_prop(L, "scaleY", _cocostudio_ActionScaleFrame_getScaleY, _cocostudio_ActionScaleFrame_setScaleY); + oluacls_func(L, "getScaleX", _olua_fun_cocostudio_ActionScaleFrame_getScaleX); + oluacls_func(L, "getScaleY", _olua_fun_cocostudio_ActionScaleFrame_getScaleY); + oluacls_func(L, "new", _olua_fun_cocostudio_ActionScaleFrame_new); + oluacls_func(L, "setScaleX", _olua_fun_cocostudio_ActionScaleFrame_setScaleX); + oluacls_func(L, "setScaleY", _olua_fun_cocostudio_ActionScaleFrame_setScaleY); + oluacls_prop(L, "scaleX", _olua_fun_cocostudio_ActionScaleFrame_getScaleX, _olua_fun_cocostudio_ActionScaleFrame_setScaleX); + oluacls_prop(L, "scaleY", _olua_fun_cocostudio_ActionScaleFrame_getScaleY, _olua_fun_cocostudio_ActionScaleFrame_setScaleY); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccs_ActionScaleFrame(lua_State *L) +{ + olua_require(L, "cocos2d_studio", luaopen_cocos2d_studio); + if (!olua_getclass(L, "ccs.ActionScaleFrame")) { + luaL_error(L, "class not found: cocostudio::ActionScaleFrame"); + } return 1; } OLUA_END_DECLS -static int _cocostudio_ActionTintFrame_getColor(lua_State *L) +static int _olua_fun_cocostudio_ActionTintFrame_getColor(lua_State *L) { olua_startinvoke(L); @@ -1612,11 +1747,11 @@ static int _cocostudio_ActionTintFrame_getColor(lua_State *L) return num_ret; } -static int _cocostudio_ActionTintFrame_new(lua_State *L) +static int _olua_fun_cocostudio_ActionTintFrame_new(lua_State *L) { olua_startinvoke(L); - // ActionTintFrame() + // cocostudio::ActionTintFrame() cocostudio::ActionTintFrame *ret = new cocostudio::ActionTintFrame(); int num_ret = olua_push_object(L, ret, "ccs.ActionTintFrame"); olua_postnew(L, ret); @@ -1626,7 +1761,7 @@ static int _cocostudio_ActionTintFrame_new(lua_State *L) return num_ret; } -static int _cocostudio_ActionTintFrame_setColor(lua_State *L) +static int _olua_fun_cocostudio_ActionTintFrame_setColor(lua_State *L) { olua_startinvoke(L); @@ -1644,20 +1779,29 @@ static int _cocostudio_ActionTintFrame_setColor(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocostudio_ActionTintFrame(lua_State *L) +static int _olua_cls_ccs_ActionTintFrame(lua_State *L) { oluacls_class(L, "ccs.ActionTintFrame"); - oluacls_func(L, "getColor", _cocostudio_ActionTintFrame_getColor); - oluacls_func(L, "new", _cocostudio_ActionTintFrame_new); - oluacls_func(L, "setColor", _cocostudio_ActionTintFrame_setColor); - oluacls_prop(L, "color", _cocostudio_ActionTintFrame_getColor, _cocostudio_ActionTintFrame_setColor); + oluacls_func(L, "getColor", _olua_fun_cocostudio_ActionTintFrame_getColor); + oluacls_func(L, "new", _olua_fun_cocostudio_ActionTintFrame_new); + oluacls_func(L, "setColor", _olua_fun_cocostudio_ActionTintFrame_setColor); + oluacls_prop(L, "color", _olua_fun_cocostudio_ActionTintFrame_getColor, _olua_fun_cocostudio_ActionTintFrame_setColor); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccs_ActionTintFrame(lua_State *L) +{ + olua_require(L, "cocos2d_studio", luaopen_cocos2d_studio); + if (!olua_getclass(L, "ccs.ActionTintFrame")) { + luaL_error(L, "class not found: cocostudio::ActionTintFrame"); + } + return 1; +} OLUA_END_DECLS -static int _cocostudio_AnimationData_addMovement(lua_State *L) +static int _olua_fun_cocostudio_AnimationData_addMovement(lua_State *L) { olua_startinvoke(L); @@ -1675,7 +1819,7 @@ static int _cocostudio_AnimationData_addMovement(lua_State *L) return 0; } -static int _cocostudio_AnimationData_create(lua_State *L) +static int _olua_fun_cocostudio_AnimationData_create(lua_State *L) { olua_startinvoke(L); @@ -1688,7 +1832,7 @@ static int _cocostudio_AnimationData_create(lua_State *L) return num_ret; } -static int _cocostudio_AnimationData_getMovement(lua_State *L) +static int _olua_fun_cocostudio_AnimationData_getMovement(lua_State *L) { olua_startinvoke(L); @@ -1707,7 +1851,7 @@ static int _cocostudio_AnimationData_getMovement(lua_State *L) return num_ret; } -static int _cocostudio_AnimationData_getMovementCount(lua_State *L) +static int _olua_fun_cocostudio_AnimationData_getMovementCount(lua_State *L) { olua_startinvoke(L); @@ -1724,27 +1868,13 @@ static int _cocostudio_AnimationData_getMovementCount(lua_State *L) return num_ret; } -static int _cocostudio_AnimationData_new(lua_State *L) +static int _olua_fun_cocostudio_AnimationData_movementDataDic$1(lua_State *L) { olua_startinvoke(L); - // AnimationData() - cocostudio::AnimationData *ret = new cocostudio::AnimationData(); - int num_ret = olua_push_object(L, ret, "ccs.AnimationData"); - olua_postnew(L, ret); + cocostudio::AnimationData *self = nullptr; - olua_endinvoke(L); - - return num_ret; -} - -static int _cocostudio_AnimationData_get_movementDataDic(lua_State *L) -{ - olua_startinvoke(L); - - cocostudio::AnimationData *self = nullptr; - - olua_to_object(L, 1, &self, "ccs.AnimationData"); + olua_to_object(L, 1, &self, "ccs.AnimationData"); // cocos2d::Map movementDataDic cocos2d::Map &ret = self->movementDataDic; @@ -1758,7 +1888,7 @@ static int _cocostudio_AnimationData_get_movementDataDic(lua_State *L) return num_ret; } -static int _cocostudio_AnimationData_set_movementDataDic(lua_State *L) +static int _olua_fun_cocostudio_AnimationData_movementDataDic$2(lua_State *L) { olua_startinvoke(L); @@ -1779,7 +1909,28 @@ static int _cocostudio_AnimationData_set_movementDataDic(lua_State *L) return 0; } -static int _cocostudio_AnimationData_get_movementNames(lua_State *L) +static int _olua_fun_cocostudio_AnimationData_movementDataDic(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // cocos2d::Map movementDataDic + return _olua_fun_cocostudio_AnimationData_movementDataDic$1(L); + } + + if (num_args == 1) { + // if ((olua_is_map(L, 2))) { + // cocos2d::Map movementDataDic + return _olua_fun_cocostudio_AnimationData_movementDataDic$2(L); + // } + } + + luaL_error(L, "method 'cocostudio::AnimationData::movementDataDic' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocostudio_AnimationData_movementNames$1(lua_State *L) { olua_startinvoke(L); @@ -1798,7 +1949,7 @@ static int _cocostudio_AnimationData_get_movementNames(lua_State *L) return num_ret; } -static int _cocostudio_AnimationData_set_movementNames(lua_State *L) +static int _olua_fun_cocostudio_AnimationData_movementNames$2(lua_State *L) { olua_startinvoke(L); @@ -1818,7 +1969,28 @@ static int _cocostudio_AnimationData_set_movementNames(lua_State *L) return 0; } -static int _cocostudio_AnimationData_get_name(lua_State *L) +static int _olua_fun_cocostudio_AnimationData_movementNames(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // std::vector movementNames + return _olua_fun_cocostudio_AnimationData_movementNames$1(L); + } + + if (num_args == 1) { + // if ((olua_is_array(L, 2))) { + // std::vector movementNames + return _olua_fun_cocostudio_AnimationData_movementNames$2(L); + // } + } + + luaL_error(L, "method 'cocostudio::AnimationData::movementNames' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocostudio_AnimationData_name$1(lua_State *L) { olua_startinvoke(L); @@ -1835,7 +2007,7 @@ static int _cocostudio_AnimationData_get_name(lua_State *L) return num_ret; } -static int _cocostudio_AnimationData_set_name(lua_State *L) +static int _olua_fun_cocostudio_AnimationData_name$2(lua_State *L) { olua_startinvoke(L); @@ -1853,25 +2025,69 @@ static int _cocostudio_AnimationData_set_name(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocostudio_AnimationData(lua_State *L) +static int _olua_fun_cocostudio_AnimationData_name(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // std::string name + return _olua_fun_cocostudio_AnimationData_name$1(L); + } + + if (num_args == 1) { + // if ((olua_is_string(L, 2))) { + // std::string name + return _olua_fun_cocostudio_AnimationData_name$2(L); + // } + } + + luaL_error(L, "method 'cocostudio::AnimationData::name' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocostudio_AnimationData_new(lua_State *L) +{ + olua_startinvoke(L); + + // cocostudio::AnimationData() + cocostudio::AnimationData *ret = new cocostudio::AnimationData(); + int num_ret = olua_push_object(L, ret, "ccs.AnimationData"); + olua_postnew(L, ret); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_cls_ccs_AnimationData(lua_State *L) { oluacls_class(L, "ccs.AnimationData"); - oluacls_func(L, "addMovement", _cocostudio_AnimationData_addMovement); - oluacls_func(L, "create", _cocostudio_AnimationData_create); - oluacls_func(L, "getMovement", _cocostudio_AnimationData_getMovement); - oluacls_func(L, "getMovementCount", _cocostudio_AnimationData_getMovementCount); - oluacls_func(L, "new", _cocostudio_AnimationData_new); - oluacls_prop(L, "movementCount", _cocostudio_AnimationData_getMovementCount, nullptr); - oluacls_prop(L, "movementDataDic", _cocostudio_AnimationData_get_movementDataDic, _cocostudio_AnimationData_set_movementDataDic); - oluacls_prop(L, "movementNames", _cocostudio_AnimationData_get_movementNames, _cocostudio_AnimationData_set_movementNames); - oluacls_prop(L, "name", _cocostudio_AnimationData_get_name, _cocostudio_AnimationData_set_name); + oluacls_func(L, "addMovement", _olua_fun_cocostudio_AnimationData_addMovement); + oluacls_func(L, "create", _olua_fun_cocostudio_AnimationData_create); + oluacls_func(L, "getMovement", _olua_fun_cocostudio_AnimationData_getMovement); + oluacls_func(L, "getMovementCount", _olua_fun_cocostudio_AnimationData_getMovementCount); + oluacls_func(L, "new", _olua_fun_cocostudio_AnimationData_new); + oluacls_prop(L, "movementCount", _olua_fun_cocostudio_AnimationData_getMovementCount, nullptr); + oluacls_prop(L, "movementDataDic", _olua_fun_cocostudio_AnimationData_movementDataDic, _olua_fun_cocostudio_AnimationData_movementDataDic); + oluacls_prop(L, "movementNames", _olua_fun_cocostudio_AnimationData_movementNames, _olua_fun_cocostudio_AnimationData_movementNames); + oluacls_prop(L, "name", _olua_fun_cocostudio_AnimationData_name, _olua_fun_cocostudio_AnimationData_name); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccs_AnimationData(lua_State *L) +{ + olua_require(L, "cocos2d_studio", luaopen_cocos2d_studio); + if (!olua_getclass(L, "ccs.AnimationData")) { + luaL_error(L, "class not found: cocostudio::AnimationData"); + } return 1; } OLUA_END_DECLS -static int _cocostudio_Armature_addBone(lua_State *L) +static int _olua_fun_cocostudio_Armature_addBone(lua_State *L) { olua_startinvoke(L); @@ -1891,7 +2107,7 @@ static int _cocostudio_Armature_addBone(lua_State *L) return 0; } -static int _cocostudio_Armature_as(lua_State *L) +static int _olua_fun_cocostudio_Armature_as(lua_State *L) { olua_startinvoke(L); @@ -1919,7 +2135,7 @@ static int _cocostudio_Armature_as(lua_State *L) return 1; } -static int _cocostudio_Armature_changeBoneParent(lua_State *L) +static int _olua_fun_cocostudio_Armature_changeBoneParent(lua_State *L) { olua_startinvoke(L); @@ -1939,7 +2155,7 @@ static int _cocostudio_Armature_changeBoneParent(lua_State *L) return 0; } -static int _cocostudio_Armature_create$1(lua_State *L) +static int _olua_fun_cocostudio_Armature_create$1(lua_State *L) { olua_startinvoke(L); @@ -1952,7 +2168,7 @@ static int _cocostudio_Armature_create$1(lua_State *L) return num_ret; } -static int _cocostudio_Armature_create$2(lua_State *L) +static int _olua_fun_cocostudio_Armature_create$2(lua_State *L) { olua_startinvoke(L); @@ -1969,7 +2185,7 @@ static int _cocostudio_Armature_create$2(lua_State *L) return num_ret; } -static int _cocostudio_Armature_create$3(lua_State *L) +static int _olua_fun_cocostudio_Armature_create$3(lua_State *L) { olua_startinvoke(L); @@ -1988,26 +2204,26 @@ static int _cocostudio_Armature_create$3(lua_State *L) return num_ret; } -static int _cocostudio_Armature_create(lua_State *L) +static int _olua_fun_cocostudio_Armature_create(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 0) { // static cocostudio::Armature *create() - return _cocostudio_Armature_create$1(L); + return _olua_fun_cocostudio_Armature_create$1(L); } if (num_args == 1) { // if ((olua_is_string(L, 1))) { // static cocostudio::Armature *create(const std::string &name) - return _cocostudio_Armature_create$2(L); + return _olua_fun_cocostudio_Armature_create$2(L); // } } if (num_args == 2) { // if ((olua_is_string(L, 1)) && (olua_is_object(L, 2, "ccs.Bone"))) { // static cocostudio::Armature *create(const std::string &name, cocostudio::Bone *parentBone) - return _cocostudio_Armature_create$3(L); + return _olua_fun_cocostudio_Armature_create$3(L); // } } @@ -2016,7 +2232,7 @@ static int _cocostudio_Armature_create(lua_State *L) return 0; } -static int _cocostudio_Armature_getAnimation(lua_State *L) +static int _olua_fun_cocostudio_Armature_getAnimation(lua_State *L) { olua_startinvoke(L); @@ -2033,7 +2249,7 @@ static int _cocostudio_Armature_getAnimation(lua_State *L) return num_ret; } -static int _cocostudio_Armature_getArmatureData(lua_State *L) +static int _olua_fun_cocostudio_Armature_getArmatureData(lua_State *L) { olua_startinvoke(L); @@ -2050,7 +2266,7 @@ static int _cocostudio_Armature_getArmatureData(lua_State *L) return num_ret; } -static int _cocostudio_Armature_getArmatureTransformDirty(lua_State *L) +static int _olua_fun_cocostudio_Armature_getArmatureTransformDirty(lua_State *L) { olua_startinvoke(L); @@ -2067,7 +2283,7 @@ static int _cocostudio_Armature_getArmatureTransformDirty(lua_State *L) return num_ret; } -static int _cocostudio_Armature_getBatchNode(lua_State *L) +static int _olua_fun_cocostudio_Armature_getBatchNode(lua_State *L) { olua_startinvoke(L); @@ -2084,7 +2300,7 @@ static int _cocostudio_Armature_getBatchNode(lua_State *L) return num_ret; } -static int _cocostudio_Armature_getBlendFunc(lua_State *L) +static int _olua_fun_cocostudio_Armature_getBlendFunc(lua_State *L) { olua_startinvoke(L); @@ -2101,7 +2317,7 @@ static int _cocostudio_Armature_getBlendFunc(lua_State *L) return num_ret; } -static int _cocostudio_Armature_getBone(lua_State *L) +static int _olua_fun_cocostudio_Armature_getBone(lua_State *L) { olua_startinvoke(L); @@ -2120,7 +2336,7 @@ static int _cocostudio_Armature_getBone(lua_State *L) return num_ret; } -static int _cocostudio_Armature_getBoneAtPoint(lua_State *L) +static int _olua_fun_cocostudio_Armature_getBoneAtPoint(lua_State *L) { olua_startinvoke(L); @@ -2141,7 +2357,7 @@ static int _cocostudio_Armature_getBoneAtPoint(lua_State *L) return num_ret; } -static int _cocostudio_Armature_getBoneDic(lua_State *L) +static int _olua_fun_cocostudio_Armature_getBoneDic(lua_State *L) { olua_startinvoke(L); @@ -2161,7 +2377,7 @@ static int _cocostudio_Armature_getBoneDic(lua_State *L) return num_ret; } -static int _cocostudio_Armature_getOffsetPoints(lua_State *L) +static int _olua_fun_cocostudio_Armature_getOffsetPoints(lua_State *L) { olua_startinvoke(L); @@ -2178,7 +2394,7 @@ static int _cocostudio_Armature_getOffsetPoints(lua_State *L) return num_ret; } -static int _cocostudio_Armature_getParentBone(lua_State *L) +static int _olua_fun_cocostudio_Armature_getParentBone(lua_State *L) { olua_startinvoke(L); @@ -2195,7 +2411,7 @@ static int _cocostudio_Armature_getParentBone(lua_State *L) return num_ret; } -static int _cocostudio_Armature_getVersion(lua_State *L) +static int _olua_fun_cocostudio_Armature_getVersion(lua_State *L) { olua_startinvoke(L); @@ -2212,7 +2428,7 @@ static int _cocostudio_Armature_getVersion(lua_State *L) return num_ret; } -static int _cocostudio_Armature_init$1(lua_State *L) +static int _olua_fun_cocostudio_Armature_init$1(lua_State *L) { olua_startinvoke(L); @@ -2229,7 +2445,7 @@ static int _cocostudio_Armature_init$1(lua_State *L) return num_ret; } -static int _cocostudio_Armature_init$2(lua_State *L) +static int _olua_fun_cocostudio_Armature_init$2(lua_State *L) { olua_startinvoke(L); @@ -2248,7 +2464,7 @@ static int _cocostudio_Armature_init$2(lua_State *L) return num_ret; } -static int _cocostudio_Armature_init$3(lua_State *L) +static int _olua_fun_cocostudio_Armature_init$3(lua_State *L) { olua_startinvoke(L); @@ -2269,26 +2485,26 @@ static int _cocostudio_Armature_init$3(lua_State *L) return num_ret; } -static int _cocostudio_Armature_init(lua_State *L) +static int _olua_fun_cocostudio_Armature_init(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 0) { // @using bool init() - return _cocostudio_Armature_init$1(L); + return _olua_fun_cocostudio_Armature_init$1(L); } if (num_args == 1) { // if ((olua_is_string(L, 2))) { // bool init(const std::string &name) - return _cocostudio_Armature_init$2(L); + return _olua_fun_cocostudio_Armature_init$2(L); // } } if (num_args == 2) { // if ((olua_is_string(L, 2)) && (olua_is_object(L, 3, "ccs.Bone"))) { // bool init(const std::string &name, cocostudio::Bone *parentBone) - return _cocostudio_Armature_init$3(L); + return _olua_fun_cocostudio_Armature_init$3(L); // } } @@ -2297,11 +2513,11 @@ static int _cocostudio_Armature_init(lua_State *L) return 0; } -static int _cocostudio_Armature_new(lua_State *L) +static int _olua_fun_cocostudio_Armature_new(lua_State *L) { olua_startinvoke(L); - // Armature() + // cocostudio::Armature() cocostudio::Armature *ret = new cocostudio::Armature(); int num_ret = olua_push_object(L, ret, "ccs.Armature"); olua_postnew(L, ret); @@ -2311,7 +2527,7 @@ static int _cocostudio_Armature_new(lua_State *L) return num_ret; } -static int _cocostudio_Armature_removeBone(lua_State *L) +static int _olua_fun_cocostudio_Armature_removeBone(lua_State *L) { olua_startinvoke(L); @@ -2331,7 +2547,7 @@ static int _cocostudio_Armature_removeBone(lua_State *L) return 0; } -static int _cocostudio_Armature_setAnimation(lua_State *L) +static int _olua_fun_cocostudio_Armature_setAnimation(lua_State *L) { olua_startinvoke(L); @@ -2349,7 +2565,7 @@ static int _cocostudio_Armature_setAnimation(lua_State *L) return 0; } -static int _cocostudio_Armature_setArmatureData(lua_State *L) +static int _olua_fun_cocostudio_Armature_setArmatureData(lua_State *L) { olua_startinvoke(L); @@ -2367,7 +2583,7 @@ static int _cocostudio_Armature_setArmatureData(lua_State *L) return 0; } -static int _cocostudio_Armature_setBatchNode(lua_State *L) +static int _olua_fun_cocostudio_Armature_setBatchNode(lua_State *L) { olua_startinvoke(L); @@ -2385,25 +2601,25 @@ static int _cocostudio_Armature_setBatchNode(lua_State *L) return 0; } -static int _cocostudio_Armature_setBlendFunc(lua_State *L) +static int _olua_fun_cocostudio_Armature_setBlendFunc(lua_State *L) { olua_startinvoke(L); cocostudio::Armature *self = nullptr; - cocos2d::BlendFunc arg1; /** blendFunc */ + cocos2d::BlendFunc *arg1; /** blendFunc */ olua_to_object(L, 1, &self, "ccs.Armature"); olua_check_object(L, 2, &arg1, "cc.BlendFunc"); // void setBlendFunc(const cocos2d::BlendFunc &blendFunc) - self->setBlendFunc(arg1); + self->setBlendFunc(*arg1); olua_endinvoke(L); return 0; } -static int _cocostudio_Armature_setParentBone(lua_State *L) +static int _olua_fun_cocostudio_Armature_setParentBone(lua_State *L) { olua_startinvoke(L); @@ -2421,7 +2637,7 @@ static int _cocostudio_Armature_setParentBone(lua_State *L) return 0; } -static int _cocostudio_Armature_setVersion(lua_State *L) +static int _olua_fun_cocostudio_Armature_setVersion(lua_State *L) { olua_startinvoke(L); @@ -2439,7 +2655,7 @@ static int _cocostudio_Armature_setVersion(lua_State *L) return 0; } -static int _cocostudio_Armature_updateOffsetPoint(lua_State *L) +static int _olua_fun_cocostudio_Armature_updateOffsetPoint(lua_State *L) { olua_startinvoke(L); @@ -2455,50 +2671,59 @@ static int _cocostudio_Armature_updateOffsetPoint(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocostudio_Armature(lua_State *L) +static int _olua_cls_ccs_Armature(lua_State *L) { oluacls_class(L, "ccs.Armature"); - oluacls_func(L, "addBone", _cocostudio_Armature_addBone); - oluacls_func(L, "as", _cocostudio_Armature_as); - oluacls_func(L, "changeBoneParent", _cocostudio_Armature_changeBoneParent); - oluacls_func(L, "create", _cocostudio_Armature_create); - oluacls_func(L, "getAnimation", _cocostudio_Armature_getAnimation); - oluacls_func(L, "getArmatureData", _cocostudio_Armature_getArmatureData); - oluacls_func(L, "getArmatureTransformDirty", _cocostudio_Armature_getArmatureTransformDirty); - oluacls_func(L, "getBatchNode", _cocostudio_Armature_getBatchNode); - oluacls_func(L, "getBlendFunc", _cocostudio_Armature_getBlendFunc); - oluacls_func(L, "getBone", _cocostudio_Armature_getBone); - oluacls_func(L, "getBoneAtPoint", _cocostudio_Armature_getBoneAtPoint); - oluacls_func(L, "getBoneDic", _cocostudio_Armature_getBoneDic); - oluacls_func(L, "getOffsetPoints", _cocostudio_Armature_getOffsetPoints); - oluacls_func(L, "getParentBone", _cocostudio_Armature_getParentBone); - oluacls_func(L, "getVersion", _cocostudio_Armature_getVersion); - oluacls_func(L, "init", _cocostudio_Armature_init); - oluacls_func(L, "new", _cocostudio_Armature_new); - oluacls_func(L, "removeBone", _cocostudio_Armature_removeBone); - oluacls_func(L, "setAnimation", _cocostudio_Armature_setAnimation); - oluacls_func(L, "setArmatureData", _cocostudio_Armature_setArmatureData); - oluacls_func(L, "setBatchNode", _cocostudio_Armature_setBatchNode); - oluacls_func(L, "setBlendFunc", _cocostudio_Armature_setBlendFunc); - oluacls_func(L, "setParentBone", _cocostudio_Armature_setParentBone); - oluacls_func(L, "setVersion", _cocostudio_Armature_setVersion); - oluacls_func(L, "updateOffsetPoint", _cocostudio_Armature_updateOffsetPoint); - oluacls_prop(L, "animation", _cocostudio_Armature_getAnimation, _cocostudio_Armature_setAnimation); - oluacls_prop(L, "armatureData", _cocostudio_Armature_getArmatureData, _cocostudio_Armature_setArmatureData); - oluacls_prop(L, "armatureTransformDirty", _cocostudio_Armature_getArmatureTransformDirty, nullptr); - oluacls_prop(L, "batchNode", _cocostudio_Armature_getBatchNode, _cocostudio_Armature_setBatchNode); - oluacls_prop(L, "blendFunc", _cocostudio_Armature_getBlendFunc, _cocostudio_Armature_setBlendFunc); - oluacls_prop(L, "boneDic", _cocostudio_Armature_getBoneDic, nullptr); - oluacls_prop(L, "offsetPoints", _cocostudio_Armature_getOffsetPoints, nullptr); - oluacls_prop(L, "parentBone", _cocostudio_Armature_getParentBone, _cocostudio_Armature_setParentBone); - oluacls_prop(L, "version", _cocostudio_Armature_getVersion, _cocostudio_Armature_setVersion); + oluacls_func(L, "addBone", _olua_fun_cocostudio_Armature_addBone); + oluacls_func(L, "as", _olua_fun_cocostudio_Armature_as); + oluacls_func(L, "changeBoneParent", _olua_fun_cocostudio_Armature_changeBoneParent); + oluacls_func(L, "create", _olua_fun_cocostudio_Armature_create); + oluacls_func(L, "getAnimation", _olua_fun_cocostudio_Armature_getAnimation); + oluacls_func(L, "getArmatureData", _olua_fun_cocostudio_Armature_getArmatureData); + oluacls_func(L, "getArmatureTransformDirty", _olua_fun_cocostudio_Armature_getArmatureTransformDirty); + oluacls_func(L, "getBatchNode", _olua_fun_cocostudio_Armature_getBatchNode); + oluacls_func(L, "getBlendFunc", _olua_fun_cocostudio_Armature_getBlendFunc); + oluacls_func(L, "getBone", _olua_fun_cocostudio_Armature_getBone); + oluacls_func(L, "getBoneAtPoint", _olua_fun_cocostudio_Armature_getBoneAtPoint); + oluacls_func(L, "getBoneDic", _olua_fun_cocostudio_Armature_getBoneDic); + oluacls_func(L, "getOffsetPoints", _olua_fun_cocostudio_Armature_getOffsetPoints); + oluacls_func(L, "getParentBone", _olua_fun_cocostudio_Armature_getParentBone); + oluacls_func(L, "getVersion", _olua_fun_cocostudio_Armature_getVersion); + oluacls_func(L, "init", _olua_fun_cocostudio_Armature_init); + oluacls_func(L, "new", _olua_fun_cocostudio_Armature_new); + oluacls_func(L, "removeBone", _olua_fun_cocostudio_Armature_removeBone); + oluacls_func(L, "setAnimation", _olua_fun_cocostudio_Armature_setAnimation); + oluacls_func(L, "setArmatureData", _olua_fun_cocostudio_Armature_setArmatureData); + oluacls_func(L, "setBatchNode", _olua_fun_cocostudio_Armature_setBatchNode); + oluacls_func(L, "setBlendFunc", _olua_fun_cocostudio_Armature_setBlendFunc); + oluacls_func(L, "setParentBone", _olua_fun_cocostudio_Armature_setParentBone); + oluacls_func(L, "setVersion", _olua_fun_cocostudio_Armature_setVersion); + oluacls_func(L, "updateOffsetPoint", _olua_fun_cocostudio_Armature_updateOffsetPoint); + oluacls_prop(L, "animation", _olua_fun_cocostudio_Armature_getAnimation, _olua_fun_cocostudio_Armature_setAnimation); + oluacls_prop(L, "armatureData", _olua_fun_cocostudio_Armature_getArmatureData, _olua_fun_cocostudio_Armature_setArmatureData); + oluacls_prop(L, "armatureTransformDirty", _olua_fun_cocostudio_Armature_getArmatureTransformDirty, nullptr); + oluacls_prop(L, "batchNode", _olua_fun_cocostudio_Armature_getBatchNode, _olua_fun_cocostudio_Armature_setBatchNode); + oluacls_prop(L, "blendFunc", _olua_fun_cocostudio_Armature_getBlendFunc, _olua_fun_cocostudio_Armature_setBlendFunc); + oluacls_prop(L, "boneDic", _olua_fun_cocostudio_Armature_getBoneDic, nullptr); + oluacls_prop(L, "offsetPoints", _olua_fun_cocostudio_Armature_getOffsetPoints, nullptr); + oluacls_prop(L, "parentBone", _olua_fun_cocostudio_Armature_getParentBone, _olua_fun_cocostudio_Armature_setParentBone); + oluacls_prop(L, "version", _olua_fun_cocostudio_Armature_getVersion, _olua_fun_cocostudio_Armature_setVersion); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccs_Armature(lua_State *L) +{ + olua_require(L, "cocos2d_studio", luaopen_cocos2d_studio); + if (!olua_getclass(L, "ccs.Armature")) { + luaL_error(L, "class not found: cocostudio::Armature"); + } return 1; } OLUA_END_DECLS -static int _cocostudio_ProcessBase_getCurrentFrameIndex(lua_State *L) +static int _olua_fun_cocostudio_ProcessBase_getCurrentFrameIndex(lua_State *L) { olua_startinvoke(L); @@ -2515,7 +2740,7 @@ static int _cocostudio_ProcessBase_getCurrentFrameIndex(lua_State *L) return num_ret; } -static int _cocostudio_ProcessBase_getCurrentPercent(lua_State *L) +static int _olua_fun_cocostudio_ProcessBase_getCurrentPercent(lua_State *L) { olua_startinvoke(L); @@ -2532,7 +2757,7 @@ static int _cocostudio_ProcessBase_getCurrentPercent(lua_State *L) return num_ret; } -static int _cocostudio_ProcessBase_getProcessScale(lua_State *L) +static int _olua_fun_cocostudio_ProcessBase_getProcessScale(lua_State *L) { olua_startinvoke(L); @@ -2549,7 +2774,7 @@ static int _cocostudio_ProcessBase_getProcessScale(lua_State *L) return num_ret; } -static int _cocostudio_ProcessBase_getRawDuration(lua_State *L) +static int _olua_fun_cocostudio_ProcessBase_getRawDuration(lua_State *L) { olua_startinvoke(L); @@ -2566,7 +2791,7 @@ static int _cocostudio_ProcessBase_getRawDuration(lua_State *L) return num_ret; } -static int _cocostudio_ProcessBase_isComplete(lua_State *L) +static int _olua_fun_cocostudio_ProcessBase_isComplete(lua_State *L) { olua_startinvoke(L); @@ -2583,7 +2808,7 @@ static int _cocostudio_ProcessBase_isComplete(lua_State *L) return num_ret; } -static int _cocostudio_ProcessBase_isPause(lua_State *L) +static int _olua_fun_cocostudio_ProcessBase_isPause(lua_State *L) { olua_startinvoke(L); @@ -2600,7 +2825,7 @@ static int _cocostudio_ProcessBase_isPause(lua_State *L) return num_ret; } -static int _cocostudio_ProcessBase_isPlaying(lua_State *L) +static int _olua_fun_cocostudio_ProcessBase_isPlaying(lua_State *L) { olua_startinvoke(L); @@ -2617,11 +2842,11 @@ static int _cocostudio_ProcessBase_isPlaying(lua_State *L) return num_ret; } -static int _cocostudio_ProcessBase_new(lua_State *L) +static int _olua_fun_cocostudio_ProcessBase_new(lua_State *L) { olua_startinvoke(L); - // ProcessBase() + // cocostudio::ProcessBase() cocostudio::ProcessBase *ret = new cocostudio::ProcessBase(); int num_ret = olua_push_object(L, ret, "ccs.ProcessBase"); olua_postnew(L, ret); @@ -2631,7 +2856,7 @@ static int _cocostudio_ProcessBase_new(lua_State *L) return num_ret; } -static int _cocostudio_ProcessBase_pause(lua_State *L) +static int _olua_fun_cocostudio_ProcessBase_pause(lua_State *L) { olua_startinvoke(L); @@ -2647,7 +2872,7 @@ static int _cocostudio_ProcessBase_pause(lua_State *L) return 0; } -static int _cocostudio_ProcessBase_play(lua_State *L) +static int _olua_fun_cocostudio_ProcessBase_play(lua_State *L) { olua_startinvoke(L); @@ -2671,7 +2896,7 @@ static int _cocostudio_ProcessBase_play(lua_State *L) return 0; } -static int _cocostudio_ProcessBase_resume(lua_State *L) +static int _olua_fun_cocostudio_ProcessBase_resume(lua_State *L) { olua_startinvoke(L); @@ -2687,7 +2912,7 @@ static int _cocostudio_ProcessBase_resume(lua_State *L) return 0; } -static int _cocostudio_ProcessBase_setIsComplete(lua_State *L) +static int _olua_fun_cocostudio_ProcessBase_setIsComplete(lua_State *L) { olua_startinvoke(L); @@ -2705,7 +2930,7 @@ static int _cocostudio_ProcessBase_setIsComplete(lua_State *L) return 0; } -static int _cocostudio_ProcessBase_setIsPause(lua_State *L) +static int _olua_fun_cocostudio_ProcessBase_setIsPause(lua_State *L) { olua_startinvoke(L); @@ -2723,7 +2948,7 @@ static int _cocostudio_ProcessBase_setIsPause(lua_State *L) return 0; } -static int _cocostudio_ProcessBase_setIsPlaying(lua_State *L) +static int _olua_fun_cocostudio_ProcessBase_setIsPlaying(lua_State *L) { olua_startinvoke(L); @@ -2741,7 +2966,7 @@ static int _cocostudio_ProcessBase_setIsPlaying(lua_State *L) return 0; } -static int _cocostudio_ProcessBase_setProcessScale(lua_State *L) +static int _olua_fun_cocostudio_ProcessBase_setProcessScale(lua_State *L) { olua_startinvoke(L); @@ -2759,7 +2984,7 @@ static int _cocostudio_ProcessBase_setProcessScale(lua_State *L) return 0; } -static int _cocostudio_ProcessBase_stop(lua_State *L) +static int _olua_fun_cocostudio_ProcessBase_stop(lua_State *L) { olua_startinvoke(L); @@ -2775,7 +3000,7 @@ static int _cocostudio_ProcessBase_stop(lua_State *L) return 0; } -static int _cocostudio_ProcessBase_update(lua_State *L) +static int _olua_fun_cocostudio_ProcessBase_update(lua_State *L) { olua_startinvoke(L); @@ -2793,40 +3018,48 @@ static int _cocostudio_ProcessBase_update(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocostudio_ProcessBase(lua_State *L) +static int _olua_cls_ccs_ProcessBase(lua_State *L) { oluacls_class(L, "ccs.ProcessBase"); - oluacls_func(L, "getCurrentFrameIndex", _cocostudio_ProcessBase_getCurrentFrameIndex); - oluacls_func(L, "getCurrentPercent", _cocostudio_ProcessBase_getCurrentPercent); - oluacls_func(L, "getProcessScale", _cocostudio_ProcessBase_getProcessScale); - oluacls_func(L, "getRawDuration", _cocostudio_ProcessBase_getRawDuration); - oluacls_func(L, "isComplete", _cocostudio_ProcessBase_isComplete); - oluacls_func(L, "isPause", _cocostudio_ProcessBase_isPause); - oluacls_func(L, "isPlaying", _cocostudio_ProcessBase_isPlaying); - oluacls_func(L, "new", _cocostudio_ProcessBase_new); - oluacls_func(L, "pause", _cocostudio_ProcessBase_pause); - oluacls_func(L, "play", _cocostudio_ProcessBase_play); - oluacls_func(L, "resume", _cocostudio_ProcessBase_resume); - oluacls_func(L, "setIsComplete", _cocostudio_ProcessBase_setIsComplete); - oluacls_func(L, "setIsPause", _cocostudio_ProcessBase_setIsPause); - oluacls_func(L, "setIsPlaying", _cocostudio_ProcessBase_setIsPlaying); - oluacls_func(L, "setProcessScale", _cocostudio_ProcessBase_setProcessScale); - oluacls_func(L, "stop", _cocostudio_ProcessBase_stop); - oluacls_func(L, "update", _cocostudio_ProcessBase_update); - oluacls_prop(L, "complete", _cocostudio_ProcessBase_isComplete, nullptr); - oluacls_prop(L, "currentFrameIndex", _cocostudio_ProcessBase_getCurrentFrameIndex, nullptr); - oluacls_prop(L, "currentPercent", _cocostudio_ProcessBase_getCurrentPercent, nullptr); - oluacls_prop(L, "pause", _cocostudio_ProcessBase_isPause, nullptr); - oluacls_prop(L, "playing", _cocostudio_ProcessBase_isPlaying, nullptr); - oluacls_prop(L, "processScale", _cocostudio_ProcessBase_getProcessScale, _cocostudio_ProcessBase_setProcessScale); - oluacls_prop(L, "rawDuration", _cocostudio_ProcessBase_getRawDuration, nullptr); + oluacls_func(L, "getCurrentFrameIndex", _olua_fun_cocostudio_ProcessBase_getCurrentFrameIndex); + oluacls_func(L, "getCurrentPercent", _olua_fun_cocostudio_ProcessBase_getCurrentPercent); + oluacls_func(L, "getProcessScale", _olua_fun_cocostudio_ProcessBase_getProcessScale); + oluacls_func(L, "getRawDuration", _olua_fun_cocostudio_ProcessBase_getRawDuration); + oluacls_func(L, "isComplete", _olua_fun_cocostudio_ProcessBase_isComplete); + oluacls_func(L, "isPause", _olua_fun_cocostudio_ProcessBase_isPause); + oluacls_func(L, "isPlaying", _olua_fun_cocostudio_ProcessBase_isPlaying); + oluacls_func(L, "new", _olua_fun_cocostudio_ProcessBase_new); + oluacls_func(L, "pause", _olua_fun_cocostudio_ProcessBase_pause); + oluacls_func(L, "play", _olua_fun_cocostudio_ProcessBase_play); + oluacls_func(L, "resume", _olua_fun_cocostudio_ProcessBase_resume); + oluacls_func(L, "setIsComplete", _olua_fun_cocostudio_ProcessBase_setIsComplete); + oluacls_func(L, "setIsPause", _olua_fun_cocostudio_ProcessBase_setIsPause); + oluacls_func(L, "setIsPlaying", _olua_fun_cocostudio_ProcessBase_setIsPlaying); + oluacls_func(L, "setProcessScale", _olua_fun_cocostudio_ProcessBase_setProcessScale); + oluacls_func(L, "stop", _olua_fun_cocostudio_ProcessBase_stop); + oluacls_func(L, "update", _olua_fun_cocostudio_ProcessBase_update); + oluacls_prop(L, "complete", _olua_fun_cocostudio_ProcessBase_isComplete, nullptr); + oluacls_prop(L, "currentFrameIndex", _olua_fun_cocostudio_ProcessBase_getCurrentFrameIndex, nullptr); + oluacls_prop(L, "currentPercent", _olua_fun_cocostudio_ProcessBase_getCurrentPercent, nullptr); + oluacls_prop(L, "playing", _olua_fun_cocostudio_ProcessBase_isPlaying, nullptr); + oluacls_prop(L, "processScale", _olua_fun_cocostudio_ProcessBase_getProcessScale, _olua_fun_cocostudio_ProcessBase_setProcessScale); + oluacls_prop(L, "rawDuration", _olua_fun_cocostudio_ProcessBase_getRawDuration, nullptr); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccs_ProcessBase(lua_State *L) +{ + olua_require(L, "cocos2d_studio", luaopen_cocos2d_studio); + if (!olua_getclass(L, "ccs.ProcessBase")) { + luaL_error(L, "class not found: cocostudio::ProcessBase"); + } return 1; } OLUA_END_DECLS -static int _cocostudio_ActionManagerEx_destroyInstance(lua_State *L) +static int _olua_fun_cocostudio_ActionManagerEx_destroyInstance(lua_State *L) { olua_startinvoke(L); @@ -2838,7 +3071,7 @@ static int _cocostudio_ActionManagerEx_destroyInstance(lua_State *L) return 0; } -static int _cocostudio_ActionManagerEx_getActionByName(lua_State *L) +static int _olua_fun_cocostudio_ActionManagerEx_getActionByName(lua_State *L) { olua_startinvoke(L); @@ -2859,7 +3092,7 @@ static int _cocostudio_ActionManagerEx_getActionByName(lua_State *L) return num_ret; } -static int _cocostudio_ActionManagerEx_getInstance(lua_State *L) +static int _olua_fun_cocostudio_ActionManagerEx_getInstance(lua_State *L) { olua_startinvoke(L); @@ -2872,7 +3105,7 @@ static int _cocostudio_ActionManagerEx_getInstance(lua_State *L) return num_ret; } -static int _cocostudio_ActionManagerEx_getStudioVersionNumber(lua_State *L) +static int _olua_fun_cocostudio_ActionManagerEx_getStudioVersionNumber(lua_State *L) { olua_startinvoke(L); @@ -2889,11 +3122,11 @@ static int _cocostudio_ActionManagerEx_getStudioVersionNumber(lua_State *L) return num_ret; } -static int _cocostudio_ActionManagerEx_new(lua_State *L) +static int _olua_fun_cocostudio_ActionManagerEx_new(lua_State *L) { olua_startinvoke(L); - // ActionManagerEx() + // cocostudio::ActionManagerEx() cocostudio::ActionManagerEx *ret = new cocostudio::ActionManagerEx(); int num_ret = olua_push_object(L, ret, "ccs.ActionManagerEx"); olua_postnew(L, ret); @@ -2903,7 +3136,7 @@ static int _cocostudio_ActionManagerEx_new(lua_State *L) return num_ret; } -static int _cocostudio_ActionManagerEx_playActionByName$1(lua_State *L) +static int _olua_fun_cocostudio_ActionManagerEx_playActionByName$1(lua_State *L) { olua_startinvoke(L); @@ -2924,7 +3157,7 @@ static int _cocostudio_ActionManagerEx_playActionByName$1(lua_State *L) return num_ret; } -static int _cocostudio_ActionManagerEx_playActionByName$2(lua_State *L) +static int _olua_fun_cocostudio_ActionManagerEx_playActionByName$2(lua_State *L) { olua_startinvoke(L); @@ -2947,21 +3180,21 @@ static int _cocostudio_ActionManagerEx_playActionByName$2(lua_State *L) return num_ret; } -static int _cocostudio_ActionManagerEx_playActionByName(lua_State *L) +static int _olua_fun_cocostudio_ActionManagerEx_playActionByName(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 2) { // if ((olua_is_string(L, 2)) && (olua_is_string(L, 3))) { // cocostudio::ActionObject *playActionByName(const char *jsonName, const char *actionName) - return _cocostudio_ActionManagerEx_playActionByName$1(L); + return _olua_fun_cocostudio_ActionManagerEx_playActionByName$1(L); // } } if (num_args == 3) { // if ((olua_is_string(L, 2)) && (olua_is_string(L, 3)) && (olua_is_object(L, 4, "cc.CallFunc"))) { // cocostudio::ActionObject *playActionByName(const char *jsonName, const char *actionName, cocos2d::CallFunc *func) - return _cocostudio_ActionManagerEx_playActionByName$2(L); + return _olua_fun_cocostudio_ActionManagerEx_playActionByName$2(L); // } } @@ -2970,7 +3203,7 @@ static int _cocostudio_ActionManagerEx_playActionByName(lua_State *L) return 0; } -static int _cocostudio_ActionManagerEx_releaseActions(lua_State *L) +static int _olua_fun_cocostudio_ActionManagerEx_releaseActions(lua_State *L) { olua_startinvoke(L); @@ -2986,7 +3219,7 @@ static int _cocostudio_ActionManagerEx_releaseActions(lua_State *L) return 0; } -static int _cocostudio_ActionManagerEx_stopActionByName(lua_State *L) +static int _olua_fun_cocostudio_ActionManagerEx_stopActionByName(lua_State *L) { olua_startinvoke(L); @@ -3007,26 +3240,35 @@ static int _cocostudio_ActionManagerEx_stopActionByName(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocostudio_ActionManagerEx(lua_State *L) +static int _olua_cls_ccs_ActionManagerEx(lua_State *L) { oluacls_class(L, "ccs.ActionManagerEx"); - oluacls_func(L, "destroyInstance", _cocostudio_ActionManagerEx_destroyInstance); - oluacls_func(L, "getActionByName", _cocostudio_ActionManagerEx_getActionByName); - oluacls_func(L, "getInstance", _cocostudio_ActionManagerEx_getInstance); - oluacls_func(L, "getStudioVersionNumber", _cocostudio_ActionManagerEx_getStudioVersionNumber); - oluacls_func(L, "new", _cocostudio_ActionManagerEx_new); - oluacls_func(L, "playActionByName", _cocostudio_ActionManagerEx_playActionByName); - oluacls_func(L, "releaseActions", _cocostudio_ActionManagerEx_releaseActions); - oluacls_func(L, "stopActionByName", _cocostudio_ActionManagerEx_stopActionByName); - oluacls_prop(L, "instance", _cocostudio_ActionManagerEx_getInstance, nullptr); - oluacls_prop(L, "studioVersionNumber", _cocostudio_ActionManagerEx_getStudioVersionNumber, nullptr); + oluacls_func(L, "destroyInstance", _olua_fun_cocostudio_ActionManagerEx_destroyInstance); + oluacls_func(L, "getActionByName", _olua_fun_cocostudio_ActionManagerEx_getActionByName); + oluacls_func(L, "getInstance", _olua_fun_cocostudio_ActionManagerEx_getInstance); + oluacls_func(L, "getStudioVersionNumber", _olua_fun_cocostudio_ActionManagerEx_getStudioVersionNumber); + oluacls_func(L, "new", _olua_fun_cocostudio_ActionManagerEx_new); + oluacls_func(L, "playActionByName", _olua_fun_cocostudio_ActionManagerEx_playActionByName); + oluacls_func(L, "releaseActions", _olua_fun_cocostudio_ActionManagerEx_releaseActions); + oluacls_func(L, "stopActionByName", _olua_fun_cocostudio_ActionManagerEx_stopActionByName); + oluacls_prop(L, "instance", _olua_fun_cocostudio_ActionManagerEx_getInstance, nullptr); + oluacls_prop(L, "studioVersionNumber", _olua_fun_cocostudio_ActionManagerEx_getStudioVersionNumber, nullptr); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccs_ActionManagerEx(lua_State *L) +{ + olua_require(L, "cocos2d_studio", luaopen_cocos2d_studio); + if (!olua_getclass(L, "ccs.ActionManagerEx")) { + luaL_error(L, "class not found: cocostudio::ActionManagerEx"); + } + return 1; +} OLUA_END_DECLS -static int _cocostudio_ActionNode_addFrame(lua_State *L) +static int _olua_fun_cocostudio_ActionNode_addFrame(lua_State *L) { olua_startinvoke(L); @@ -3044,7 +3286,7 @@ static int _cocostudio_ActionNode_addFrame(lua_State *L) return 0; } -static int _cocostudio_ActionNode_clearAllFrame(lua_State *L) +static int _olua_fun_cocostudio_ActionNode_clearAllFrame(lua_State *L) { olua_startinvoke(L); @@ -3060,7 +3302,7 @@ static int _cocostudio_ActionNode_clearAllFrame(lua_State *L) return 0; } -static int _cocostudio_ActionNode_deleteFrame(lua_State *L) +static int _olua_fun_cocostudio_ActionNode_deleteFrame(lua_State *L) { olua_startinvoke(L); @@ -3078,7 +3320,7 @@ static int _cocostudio_ActionNode_deleteFrame(lua_State *L) return 0; } -static int _cocostudio_ActionNode_getActionTag(lua_State *L) +static int _olua_fun_cocostudio_ActionNode_getActionTag(lua_State *L) { olua_startinvoke(L); @@ -3095,7 +3337,7 @@ static int _cocostudio_ActionNode_getActionTag(lua_State *L) return num_ret; } -static int _cocostudio_ActionNode_getFirstFrameIndex(lua_State *L) +static int _olua_fun_cocostudio_ActionNode_getFirstFrameIndex(lua_State *L) { olua_startinvoke(L); @@ -3112,7 +3354,7 @@ static int _cocostudio_ActionNode_getFirstFrameIndex(lua_State *L) return num_ret; } -static int _cocostudio_ActionNode_getLastFrameIndex(lua_State *L) +static int _olua_fun_cocostudio_ActionNode_getLastFrameIndex(lua_State *L) { olua_startinvoke(L); @@ -3129,7 +3371,7 @@ static int _cocostudio_ActionNode_getLastFrameIndex(lua_State *L) return num_ret; } -static int _cocostudio_ActionNode_getObject(lua_State *L) +static int _olua_fun_cocostudio_ActionNode_getObject(lua_State *L) { olua_startinvoke(L); @@ -3146,7 +3388,7 @@ static int _cocostudio_ActionNode_getObject(lua_State *L) return num_ret; } -static int _cocostudio_ActionNode_getUnitTime(lua_State *L) +static int _olua_fun_cocostudio_ActionNode_getUnitTime(lua_State *L) { olua_startinvoke(L); @@ -3163,7 +3405,7 @@ static int _cocostudio_ActionNode_getUnitTime(lua_State *L) return num_ret; } -static int _cocostudio_ActionNode_insertFrame(lua_State *L) +static int _olua_fun_cocostudio_ActionNode_insertFrame(lua_State *L) { olua_startinvoke(L); @@ -3183,7 +3425,7 @@ static int _cocostudio_ActionNode_insertFrame(lua_State *L) return 0; } -static int _cocostudio_ActionNode_isActionDoneOnce(lua_State *L) +static int _olua_fun_cocostudio_ActionNode_isActionDoneOnce(lua_State *L) { olua_startinvoke(L); @@ -3200,11 +3442,11 @@ static int _cocostudio_ActionNode_isActionDoneOnce(lua_State *L) return num_ret; } -static int _cocostudio_ActionNode_new(lua_State *L) +static int _olua_fun_cocostudio_ActionNode_new(lua_State *L) { olua_startinvoke(L); - // ActionNode() + // cocostudio::ActionNode() cocostudio::ActionNode *ret = new cocostudio::ActionNode(); int num_ret = olua_push_object(L, ret, "ccs.ActionNode"); olua_postnew(L, ret); @@ -3214,7 +3456,7 @@ static int _cocostudio_ActionNode_new(lua_State *L) return num_ret; } -static int _cocostudio_ActionNode_playAction(lua_State *L) +static int _olua_fun_cocostudio_ActionNode_playAction(lua_State *L) { olua_startinvoke(L); @@ -3230,7 +3472,7 @@ static int _cocostudio_ActionNode_playAction(lua_State *L) return 0; } -static int _cocostudio_ActionNode_setActionTag(lua_State *L) +static int _olua_fun_cocostudio_ActionNode_setActionTag(lua_State *L) { olua_startinvoke(L); @@ -3248,7 +3490,7 @@ static int _cocostudio_ActionNode_setActionTag(lua_State *L) return 0; } -static int _cocostudio_ActionNode_setObject(lua_State *L) +static int _olua_fun_cocostudio_ActionNode_setObject(lua_State *L) { olua_startinvoke(L); @@ -3266,7 +3508,7 @@ static int _cocostudio_ActionNode_setObject(lua_State *L) return 0; } -static int _cocostudio_ActionNode_setUnitTime(lua_State *L) +static int _olua_fun_cocostudio_ActionNode_setUnitTime(lua_State *L) { olua_startinvoke(L); @@ -3284,7 +3526,7 @@ static int _cocostudio_ActionNode_setUnitTime(lua_State *L) return 0; } -static int _cocostudio_ActionNode_stopAction(lua_State *L) +static int _olua_fun_cocostudio_ActionNode_stopAction(lua_State *L) { olua_startinvoke(L); @@ -3300,7 +3542,7 @@ static int _cocostudio_ActionNode_stopAction(lua_State *L) return 0; } -static int _cocostudio_ActionNode_updateActionToTimeLine(lua_State *L) +static int _olua_fun_cocostudio_ActionNode_updateActionToTimeLine(lua_State *L) { olua_startinvoke(L); @@ -3319,39 +3561,48 @@ static int _cocostudio_ActionNode_updateActionToTimeLine(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocostudio_ActionNode(lua_State *L) +static int _olua_cls_ccs_ActionNode(lua_State *L) { oluacls_class(L, "ccs.ActionNode"); - oluacls_func(L, "addFrame", _cocostudio_ActionNode_addFrame); - oluacls_func(L, "clearAllFrame", _cocostudio_ActionNode_clearAllFrame); - oluacls_func(L, "deleteFrame", _cocostudio_ActionNode_deleteFrame); - oluacls_func(L, "getActionTag", _cocostudio_ActionNode_getActionTag); - oluacls_func(L, "getFirstFrameIndex", _cocostudio_ActionNode_getFirstFrameIndex); - oluacls_func(L, "getLastFrameIndex", _cocostudio_ActionNode_getLastFrameIndex); - oluacls_func(L, "getObject", _cocostudio_ActionNode_getObject); - oluacls_func(L, "getUnitTime", _cocostudio_ActionNode_getUnitTime); - oluacls_func(L, "insertFrame", _cocostudio_ActionNode_insertFrame); - oluacls_func(L, "isActionDoneOnce", _cocostudio_ActionNode_isActionDoneOnce); - oluacls_func(L, "new", _cocostudio_ActionNode_new); - oluacls_func(L, "playAction", _cocostudio_ActionNode_playAction); - oluacls_func(L, "setActionTag", _cocostudio_ActionNode_setActionTag); - oluacls_func(L, "setObject", _cocostudio_ActionNode_setObject); - oluacls_func(L, "setUnitTime", _cocostudio_ActionNode_setUnitTime); - oluacls_func(L, "stopAction", _cocostudio_ActionNode_stopAction); - oluacls_func(L, "updateActionToTimeLine", _cocostudio_ActionNode_updateActionToTimeLine); - oluacls_prop(L, "actionDoneOnce", _cocostudio_ActionNode_isActionDoneOnce, nullptr); - oluacls_prop(L, "actionTag", _cocostudio_ActionNode_getActionTag, _cocostudio_ActionNode_setActionTag); - oluacls_prop(L, "firstFrameIndex", _cocostudio_ActionNode_getFirstFrameIndex, nullptr); - oluacls_prop(L, "lastFrameIndex", _cocostudio_ActionNode_getLastFrameIndex, nullptr); - oluacls_prop(L, "object", _cocostudio_ActionNode_getObject, _cocostudio_ActionNode_setObject); - oluacls_prop(L, "unitTime", _cocostudio_ActionNode_getUnitTime, _cocostudio_ActionNode_setUnitTime); + oluacls_func(L, "addFrame", _olua_fun_cocostudio_ActionNode_addFrame); + oluacls_func(L, "clearAllFrame", _olua_fun_cocostudio_ActionNode_clearAllFrame); + oluacls_func(L, "deleteFrame", _olua_fun_cocostudio_ActionNode_deleteFrame); + oluacls_func(L, "getActionTag", _olua_fun_cocostudio_ActionNode_getActionTag); + oluacls_func(L, "getFirstFrameIndex", _olua_fun_cocostudio_ActionNode_getFirstFrameIndex); + oluacls_func(L, "getLastFrameIndex", _olua_fun_cocostudio_ActionNode_getLastFrameIndex); + oluacls_func(L, "getObject", _olua_fun_cocostudio_ActionNode_getObject); + oluacls_func(L, "getUnitTime", _olua_fun_cocostudio_ActionNode_getUnitTime); + oluacls_func(L, "insertFrame", _olua_fun_cocostudio_ActionNode_insertFrame); + oluacls_func(L, "isActionDoneOnce", _olua_fun_cocostudio_ActionNode_isActionDoneOnce); + oluacls_func(L, "new", _olua_fun_cocostudio_ActionNode_new); + oluacls_func(L, "playAction", _olua_fun_cocostudio_ActionNode_playAction); + oluacls_func(L, "setActionTag", _olua_fun_cocostudio_ActionNode_setActionTag); + oluacls_func(L, "setObject", _olua_fun_cocostudio_ActionNode_setObject); + oluacls_func(L, "setUnitTime", _olua_fun_cocostudio_ActionNode_setUnitTime); + oluacls_func(L, "stopAction", _olua_fun_cocostudio_ActionNode_stopAction); + oluacls_func(L, "updateActionToTimeLine", _olua_fun_cocostudio_ActionNode_updateActionToTimeLine); + oluacls_prop(L, "actionDoneOnce", _olua_fun_cocostudio_ActionNode_isActionDoneOnce, nullptr); + oluacls_prop(L, "actionTag", _olua_fun_cocostudio_ActionNode_getActionTag, _olua_fun_cocostudio_ActionNode_setActionTag); + oluacls_prop(L, "firstFrameIndex", _olua_fun_cocostudio_ActionNode_getFirstFrameIndex, nullptr); + oluacls_prop(L, "lastFrameIndex", _olua_fun_cocostudio_ActionNode_getLastFrameIndex, nullptr); + oluacls_prop(L, "object", _olua_fun_cocostudio_ActionNode_getObject, _olua_fun_cocostudio_ActionNode_setObject); + oluacls_prop(L, "unitTime", _olua_fun_cocostudio_ActionNode_getUnitTime, _olua_fun_cocostudio_ActionNode_setUnitTime); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccs_ActionNode(lua_State *L) +{ + olua_require(L, "cocos2d_studio", luaopen_cocos2d_studio); + if (!olua_getclass(L, "ccs.ActionNode")) { + luaL_error(L, "class not found: cocostudio::ActionNode"); + } return 1; } OLUA_END_DECLS -static int _cocostudio_ActionObject_addActionNode(lua_State *L) +static int _olua_fun_cocostudio_ActionObject_addActionNode(lua_State *L) { olua_startinvoke(L); @@ -3369,7 +3620,7 @@ static int _cocostudio_ActionObject_addActionNode(lua_State *L) return 0; } -static int _cocostudio_ActionObject_getCurrentTime(lua_State *L) +static int _olua_fun_cocostudio_ActionObject_getCurrentTime(lua_State *L) { olua_startinvoke(L); @@ -3386,7 +3637,7 @@ static int _cocostudio_ActionObject_getCurrentTime(lua_State *L) return num_ret; } -static int _cocostudio_ActionObject_getLoop(lua_State *L) +static int _olua_fun_cocostudio_ActionObject_getLoop(lua_State *L) { olua_startinvoke(L); @@ -3403,7 +3654,7 @@ static int _cocostudio_ActionObject_getLoop(lua_State *L) return num_ret; } -static int _cocostudio_ActionObject_getName(lua_State *L) +static int _olua_fun_cocostudio_ActionObject_getName(lua_State *L) { olua_startinvoke(L); @@ -3420,7 +3671,7 @@ static int _cocostudio_ActionObject_getName(lua_State *L) return num_ret; } -static int _cocostudio_ActionObject_getTotalTime(lua_State *L) +static int _olua_fun_cocostudio_ActionObject_getTotalTime(lua_State *L) { olua_startinvoke(L); @@ -3437,7 +3688,7 @@ static int _cocostudio_ActionObject_getTotalTime(lua_State *L) return num_ret; } -static int _cocostudio_ActionObject_getUnitTime(lua_State *L) +static int _olua_fun_cocostudio_ActionObject_getUnitTime(lua_State *L) { olua_startinvoke(L); @@ -3454,7 +3705,7 @@ static int _cocostudio_ActionObject_getUnitTime(lua_State *L) return num_ret; } -static int _cocostudio_ActionObject_isPlaying(lua_State *L) +static int _olua_fun_cocostudio_ActionObject_isPlaying(lua_State *L) { olua_startinvoke(L); @@ -3471,11 +3722,11 @@ static int _cocostudio_ActionObject_isPlaying(lua_State *L) return num_ret; } -static int _cocostudio_ActionObject_new(lua_State *L) +static int _olua_fun_cocostudio_ActionObject_new(lua_State *L) { olua_startinvoke(L); - // ActionObject() + // cocostudio::ActionObject() cocostudio::ActionObject *ret = new cocostudio::ActionObject(); int num_ret = olua_push_object(L, ret, "ccs.ActionObject"); olua_postnew(L, ret); @@ -3485,7 +3736,7 @@ static int _cocostudio_ActionObject_new(lua_State *L) return num_ret; } -static int _cocostudio_ActionObject_pause(lua_State *L) +static int _olua_fun_cocostudio_ActionObject_pause(lua_State *L) { olua_startinvoke(L); @@ -3501,7 +3752,7 @@ static int _cocostudio_ActionObject_pause(lua_State *L) return 0; } -static int _cocostudio_ActionObject_play$1(lua_State *L) +static int _olua_fun_cocostudio_ActionObject_play$1(lua_State *L) { olua_startinvoke(L); @@ -3517,7 +3768,7 @@ static int _cocostudio_ActionObject_play$1(lua_State *L) return 0; } -static int _cocostudio_ActionObject_play$2(lua_State *L) +static int _olua_fun_cocostudio_ActionObject_play$2(lua_State *L) { olua_startinvoke(L); @@ -3535,19 +3786,19 @@ static int _cocostudio_ActionObject_play$2(lua_State *L) return 0; } -static int _cocostudio_ActionObject_play(lua_State *L) +static int _olua_fun_cocostudio_ActionObject_play(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 0) { // void play() - return _cocostudio_ActionObject_play$1(L); + return _olua_fun_cocostudio_ActionObject_play$1(L); } if (num_args == 1) { // if ((olua_is_object(L, 2, "cc.CallFunc"))) { // void play(cocos2d::CallFunc *func) - return _cocostudio_ActionObject_play$2(L); + return _olua_fun_cocostudio_ActionObject_play$2(L); // } } @@ -3556,7 +3807,7 @@ static int _cocostudio_ActionObject_play(lua_State *L) return 0; } -static int _cocostudio_ActionObject_removeActionNode(lua_State *L) +static int _olua_fun_cocostudio_ActionObject_removeActionNode(lua_State *L) { olua_startinvoke(L); @@ -3574,7 +3825,7 @@ static int _cocostudio_ActionObject_removeActionNode(lua_State *L) return 0; } -static int _cocostudio_ActionObject_setCurrentTime(lua_State *L) +static int _olua_fun_cocostudio_ActionObject_setCurrentTime(lua_State *L) { olua_startinvoke(L); @@ -3592,7 +3843,7 @@ static int _cocostudio_ActionObject_setCurrentTime(lua_State *L) return 0; } -static int _cocostudio_ActionObject_setLoop(lua_State *L) +static int _olua_fun_cocostudio_ActionObject_setLoop(lua_State *L) { olua_startinvoke(L); @@ -3610,7 +3861,7 @@ static int _cocostudio_ActionObject_setLoop(lua_State *L) return 0; } -static int _cocostudio_ActionObject_setName(lua_State *L) +static int _olua_fun_cocostudio_ActionObject_setName(lua_State *L) { olua_startinvoke(L); @@ -3628,7 +3879,7 @@ static int _cocostudio_ActionObject_setName(lua_State *L) return 0; } -static int _cocostudio_ActionObject_setUnitTime(lua_State *L) +static int _olua_fun_cocostudio_ActionObject_setUnitTime(lua_State *L) { olua_startinvoke(L); @@ -3646,7 +3897,7 @@ static int _cocostudio_ActionObject_setUnitTime(lua_State *L) return 0; } -static int _cocostudio_ActionObject_simulationActionUpdate(lua_State *L) +static int _olua_fun_cocostudio_ActionObject_simulationActionUpdate(lua_State *L) { olua_startinvoke(L); @@ -3664,7 +3915,7 @@ static int _cocostudio_ActionObject_simulationActionUpdate(lua_State *L) return 0; } -static int _cocostudio_ActionObject_stop(lua_State *L) +static int _olua_fun_cocostudio_ActionObject_stop(lua_State *L) { olua_startinvoke(L); @@ -3680,7 +3931,7 @@ static int _cocostudio_ActionObject_stop(lua_State *L) return 0; } -static int _cocostudio_ActionObject_updateToFrameByTime(lua_State *L) +static int _olua_fun_cocostudio_ActionObject_updateToFrameByTime(lua_State *L) { olua_startinvoke(L); @@ -3698,40 +3949,49 @@ static int _cocostudio_ActionObject_updateToFrameByTime(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocostudio_ActionObject(lua_State *L) +static int _olua_cls_ccs_ActionObject(lua_State *L) { oluacls_class(L, "ccs.ActionObject"); - oluacls_func(L, "addActionNode", _cocostudio_ActionObject_addActionNode); - oluacls_func(L, "getCurrentTime", _cocostudio_ActionObject_getCurrentTime); - oluacls_func(L, "getLoop", _cocostudio_ActionObject_getLoop); - oluacls_func(L, "getName", _cocostudio_ActionObject_getName); - oluacls_func(L, "getTotalTime", _cocostudio_ActionObject_getTotalTime); - oluacls_func(L, "getUnitTime", _cocostudio_ActionObject_getUnitTime); - oluacls_func(L, "isPlaying", _cocostudio_ActionObject_isPlaying); - oluacls_func(L, "new", _cocostudio_ActionObject_new); - oluacls_func(L, "pause", _cocostudio_ActionObject_pause); - oluacls_func(L, "play", _cocostudio_ActionObject_play); - oluacls_func(L, "removeActionNode", _cocostudio_ActionObject_removeActionNode); - oluacls_func(L, "setCurrentTime", _cocostudio_ActionObject_setCurrentTime); - oluacls_func(L, "setLoop", _cocostudio_ActionObject_setLoop); - oluacls_func(L, "setName", _cocostudio_ActionObject_setName); - oluacls_func(L, "setUnitTime", _cocostudio_ActionObject_setUnitTime); - oluacls_func(L, "simulationActionUpdate", _cocostudio_ActionObject_simulationActionUpdate); - oluacls_func(L, "stop", _cocostudio_ActionObject_stop); - oluacls_func(L, "updateToFrameByTime", _cocostudio_ActionObject_updateToFrameByTime); - oluacls_prop(L, "currentTime", _cocostudio_ActionObject_getCurrentTime, _cocostudio_ActionObject_setCurrentTime); - oluacls_prop(L, "loop", _cocostudio_ActionObject_getLoop, _cocostudio_ActionObject_setLoop); - oluacls_prop(L, "name", _cocostudio_ActionObject_getName, _cocostudio_ActionObject_setName); - oluacls_prop(L, "playing", _cocostudio_ActionObject_isPlaying, nullptr); - oluacls_prop(L, "totalTime", _cocostudio_ActionObject_getTotalTime, nullptr); - oluacls_prop(L, "unitTime", _cocostudio_ActionObject_getUnitTime, _cocostudio_ActionObject_setUnitTime); + oluacls_func(L, "addActionNode", _olua_fun_cocostudio_ActionObject_addActionNode); + oluacls_func(L, "getCurrentTime", _olua_fun_cocostudio_ActionObject_getCurrentTime); + oluacls_func(L, "getLoop", _olua_fun_cocostudio_ActionObject_getLoop); + oluacls_func(L, "getName", _olua_fun_cocostudio_ActionObject_getName); + oluacls_func(L, "getTotalTime", _olua_fun_cocostudio_ActionObject_getTotalTime); + oluacls_func(L, "getUnitTime", _olua_fun_cocostudio_ActionObject_getUnitTime); + oluacls_func(L, "isPlaying", _olua_fun_cocostudio_ActionObject_isPlaying); + oluacls_func(L, "new", _olua_fun_cocostudio_ActionObject_new); + oluacls_func(L, "pause", _olua_fun_cocostudio_ActionObject_pause); + oluacls_func(L, "play", _olua_fun_cocostudio_ActionObject_play); + oluacls_func(L, "removeActionNode", _olua_fun_cocostudio_ActionObject_removeActionNode); + oluacls_func(L, "setCurrentTime", _olua_fun_cocostudio_ActionObject_setCurrentTime); + oluacls_func(L, "setLoop", _olua_fun_cocostudio_ActionObject_setLoop); + oluacls_func(L, "setName", _olua_fun_cocostudio_ActionObject_setName); + oluacls_func(L, "setUnitTime", _olua_fun_cocostudio_ActionObject_setUnitTime); + oluacls_func(L, "simulationActionUpdate", _olua_fun_cocostudio_ActionObject_simulationActionUpdate); + oluacls_func(L, "stop", _olua_fun_cocostudio_ActionObject_stop); + oluacls_func(L, "updateToFrameByTime", _olua_fun_cocostudio_ActionObject_updateToFrameByTime); + oluacls_prop(L, "currentTime", _olua_fun_cocostudio_ActionObject_getCurrentTime, _olua_fun_cocostudio_ActionObject_setCurrentTime); + oluacls_prop(L, "loop", _olua_fun_cocostudio_ActionObject_getLoop, _olua_fun_cocostudio_ActionObject_setLoop); + oluacls_prop(L, "name", _olua_fun_cocostudio_ActionObject_getName, _olua_fun_cocostudio_ActionObject_setName); + oluacls_prop(L, "playing", _olua_fun_cocostudio_ActionObject_isPlaying, nullptr); + oluacls_prop(L, "totalTime", _olua_fun_cocostudio_ActionObject_getTotalTime, nullptr); + oluacls_prop(L, "unitTime", _olua_fun_cocostudio_ActionObject_getUnitTime, _olua_fun_cocostudio_ActionObject_setUnitTime); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccs_ActionObject(lua_State *L) +{ + olua_require(L, "cocos2d_studio", luaopen_cocos2d_studio); + if (!olua_getclass(L, "ccs.ActionObject")) { + luaL_error(L, "class not found: cocostudio::ActionObject"); + } return 1; } OLUA_END_DECLS -static int _cocostudio_ArmatureAnimation_create(lua_State *L) +static int _olua_fun_cocostudio_ArmatureAnimation_create(lua_State *L) { olua_startinvoke(L); @@ -3748,7 +4008,7 @@ static int _cocostudio_ArmatureAnimation_create(lua_State *L) return num_ret; } -static int _cocostudio_ArmatureAnimation_getAnimationData(lua_State *L) +static int _olua_fun_cocostudio_ArmatureAnimation_getAnimationData(lua_State *L) { olua_startinvoke(L); @@ -3765,7 +4025,7 @@ static int _cocostudio_ArmatureAnimation_getAnimationData(lua_State *L) return num_ret; } -static int _cocostudio_ArmatureAnimation_getCurrentMovementID(lua_State *L) +static int _olua_fun_cocostudio_ArmatureAnimation_getCurrentMovementID(lua_State *L) { olua_startinvoke(L); @@ -3782,7 +4042,7 @@ static int _cocostudio_ArmatureAnimation_getCurrentMovementID(lua_State *L) return num_ret; } -static int _cocostudio_ArmatureAnimation_getMovementCount(lua_State *L) +static int _olua_fun_cocostudio_ArmatureAnimation_getMovementCount(lua_State *L) { olua_startinvoke(L); @@ -3799,7 +4059,7 @@ static int _cocostudio_ArmatureAnimation_getMovementCount(lua_State *L) return num_ret; } -static int _cocostudio_ArmatureAnimation_getSpeedScale(lua_State *L) +static int _olua_fun_cocostudio_ArmatureAnimation_getSpeedScale(lua_State *L) { olua_startinvoke(L); @@ -3816,7 +4076,7 @@ static int _cocostudio_ArmatureAnimation_getSpeedScale(lua_State *L) return num_ret; } -static int _cocostudio_ArmatureAnimation_getUserObject(lua_State *L) +static int _olua_fun_cocostudio_ArmatureAnimation_getUserObject(lua_State *L) { olua_startinvoke(L); @@ -3833,7 +4093,7 @@ static int _cocostudio_ArmatureAnimation_getUserObject(lua_State *L) return num_ret; } -static int _cocostudio_ArmatureAnimation_gotoAndPause(lua_State *L) +static int _olua_fun_cocostudio_ArmatureAnimation_gotoAndPause(lua_State *L) { olua_startinvoke(L); @@ -3851,7 +4111,7 @@ static int _cocostudio_ArmatureAnimation_gotoAndPause(lua_State *L) return 0; } -static int _cocostudio_ArmatureAnimation_gotoAndPlay(lua_State *L) +static int _olua_fun_cocostudio_ArmatureAnimation_gotoAndPlay(lua_State *L) { olua_startinvoke(L); @@ -3869,7 +4129,7 @@ static int _cocostudio_ArmatureAnimation_gotoAndPlay(lua_State *L) return 0; } -static int _cocostudio_ArmatureAnimation_init(lua_State *L) +static int _olua_fun_cocostudio_ArmatureAnimation_init(lua_State *L) { olua_startinvoke(L); @@ -3888,11 +4148,11 @@ static int _cocostudio_ArmatureAnimation_init(lua_State *L) return num_ret; } -static int _cocostudio_ArmatureAnimation_new(lua_State *L) +static int _olua_fun_cocostudio_ArmatureAnimation_new(lua_State *L) { olua_startinvoke(L); - // ArmatureAnimation() + // cocostudio::ArmatureAnimation() cocostudio::ArmatureAnimation *ret = new cocostudio::ArmatureAnimation(); int num_ret = olua_push_object(L, ret, "ccs.ArmatureAnimation"); olua_postnew(L, ret); @@ -3902,7 +4162,7 @@ static int _cocostudio_ArmatureAnimation_new(lua_State *L) return num_ret; } -static int _cocostudio_ArmatureAnimation_play$1(lua_State *L) +static int _olua_fun_cocostudio_ArmatureAnimation_play$1(lua_State *L) { olua_startinvoke(L); @@ -3924,97 +4184,97 @@ static int _cocostudio_ArmatureAnimation_play$1(lua_State *L) return 0; } -static int _cocostudio_ArmatureAnimation_play$2(lua_State *L) +static int _olua_fun_cocostudio_ArmatureAnimation_play$2(lua_State *L) { olua_startinvoke(L); cocostudio::ArmatureAnimation *self = nullptr; - int arg1 = 0; /** durationTo */ - int arg2 = 0; /** durationTween */ - int arg3 = 0; /** loop */ - int arg4 = 0; /** tweenEasing */ + std::string arg1; /** animationName */ olua_to_object(L, 1, &self, "ccs.ArmatureAnimation"); - olua_check_integer(L, 2, &arg1); - olua_check_integer(L, 3, &arg2); - olua_check_integer(L, 4, &arg3); - olua_check_integer(L, 5, &arg4); + olua_check_string(L, 2, &arg1); - // @using void play(int durationTo, int durationTween, int loop, int tweenEasing) - self->play(arg1, arg2, arg3, arg4); + // void play(const std::string &animationName) + self->play(arg1); olua_endinvoke(L); return 0; } -static int _cocostudio_ArmatureAnimation_play$3(lua_State *L) +static int _olua_fun_cocostudio_ArmatureAnimation_play$3(lua_State *L) { olua_startinvoke(L); cocostudio::ArmatureAnimation *self = nullptr; std::string arg1; /** animationName */ + int arg2 = 0; /** durationTo */ olua_to_object(L, 1, &self, "ccs.ArmatureAnimation"); olua_check_string(L, 2, &arg1); + olua_check_integer(L, 3, &arg2); - // void play(const std::string &animationName, @optional int durationTo, @optional int loop) - self->play(arg1); + // void play(const std::string &animationName, @optional int durationTo) + self->play(arg1, arg2); olua_endinvoke(L); return 0; } -static int _cocostudio_ArmatureAnimation_play$4(lua_State *L) +static int _olua_fun_cocostudio_ArmatureAnimation_play$4(lua_State *L) { olua_startinvoke(L); cocostudio::ArmatureAnimation *self = nullptr; - std::string arg1; /** animationName */ - int arg2 = 0; /** durationTo */ + int arg1 = 0; /** durationTo */ + int arg2 = 0; /** durationTween */ + int arg3 = 0; /** loop */ + int arg4 = 0; /** tweenEasing */ olua_to_object(L, 1, &self, "ccs.ArmatureAnimation"); - olua_check_string(L, 2, &arg1); + olua_check_integer(L, 2, &arg1); olua_check_integer(L, 3, &arg2); + olua_check_integer(L, 4, &arg3); + olua_check_integer(L, 5, &arg4); - // void play(const std::string &animationName, @optional int durationTo, @optional int loop) - self->play(arg1, arg2); + // @using void play(int durationTo, int durationTween, int loop, int tweenEasing) + self->play(arg1, arg2, arg3, arg4); olua_endinvoke(L); return 0; } -static int _cocostudio_ArmatureAnimation_play(lua_State *L) +static int _olua_fun_cocostudio_ArmatureAnimation_play(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_string(L, 2))) { - // void play(const std::string &animationName, @optional int durationTo, @optional int loop) - return _cocostudio_ArmatureAnimation_play$3(L); + // void play(const std::string &animationName) + return _olua_fun_cocostudio_ArmatureAnimation_play$2(L); // } } if (num_args == 2) { // if ((olua_is_string(L, 2)) && (olua_is_integer(L, 3))) { - // void play(const std::string &animationName, @optional int durationTo, @optional int loop) - return _cocostudio_ArmatureAnimation_play$4(L); + // void play(const std::string &animationName, @optional int durationTo) + return _olua_fun_cocostudio_ArmatureAnimation_play$3(L); // } } if (num_args == 3) { // if ((olua_is_string(L, 2)) && (olua_is_integer(L, 3)) && (olua_is_integer(L, 4))) { // void play(const std::string &animationName, @optional int durationTo, @optional int loop) - return _cocostudio_ArmatureAnimation_play$1(L); + return _olua_fun_cocostudio_ArmatureAnimation_play$1(L); // } } if (num_args == 4) { // if ((olua_is_integer(L, 2)) && (olua_is_integer(L, 3)) && (olua_is_integer(L, 4)) && (olua_is_integer(L, 5))) { // @using void play(int durationTo, int durationTween, int loop, int tweenEasing) - return _cocostudio_ArmatureAnimation_play$2(L); + return _olua_fun_cocostudio_ArmatureAnimation_play$4(L); // } } @@ -4023,7 +4283,7 @@ static int _cocostudio_ArmatureAnimation_play(lua_State *L) return 0; } -static int _cocostudio_ArmatureAnimation_playWithIndex$1(lua_State *L) +static int _olua_fun_cocostudio_ArmatureAnimation_playWithIndex$1(lua_State *L) { olua_startinvoke(L); @@ -4045,7 +4305,7 @@ static int _cocostudio_ArmatureAnimation_playWithIndex$1(lua_State *L) return 0; } -static int _cocostudio_ArmatureAnimation_playWithIndex$2(lua_State *L) +static int _olua_fun_cocostudio_ArmatureAnimation_playWithIndex$2(lua_State *L) { olua_startinvoke(L); @@ -4055,7 +4315,7 @@ static int _cocostudio_ArmatureAnimation_playWithIndex$2(lua_State *L) olua_to_object(L, 1, &self, "ccs.ArmatureAnimation"); olua_check_integer(L, 2, &arg1); - // void playWithIndex(int animationIndex, @optional int durationTo, @optional int loop) + // void playWithIndex(int animationIndex) self->playWithIndex(arg1); olua_endinvoke(L); @@ -4063,7 +4323,7 @@ static int _cocostudio_ArmatureAnimation_playWithIndex$2(lua_State *L) return 0; } -static int _cocostudio_ArmatureAnimation_playWithIndex$3(lua_State *L) +static int _olua_fun_cocostudio_ArmatureAnimation_playWithIndex$3(lua_State *L) { olua_startinvoke(L); @@ -4075,7 +4335,7 @@ static int _cocostudio_ArmatureAnimation_playWithIndex$3(lua_State *L) olua_check_integer(L, 2, &arg1); olua_check_integer(L, 3, &arg2); - // void playWithIndex(int animationIndex, @optional int durationTo, @optional int loop) + // void playWithIndex(int animationIndex, @optional int durationTo) self->playWithIndex(arg1, arg2); olua_endinvoke(L); @@ -4083,28 +4343,28 @@ static int _cocostudio_ArmatureAnimation_playWithIndex$3(lua_State *L) return 0; } -static int _cocostudio_ArmatureAnimation_playWithIndex(lua_State *L) +static int _olua_fun_cocostudio_ArmatureAnimation_playWithIndex(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_integer(L, 2))) { - // void playWithIndex(int animationIndex, @optional int durationTo, @optional int loop) - return _cocostudio_ArmatureAnimation_playWithIndex$2(L); + // void playWithIndex(int animationIndex) + return _olua_fun_cocostudio_ArmatureAnimation_playWithIndex$2(L); // } } if (num_args == 2) { // if ((olua_is_integer(L, 2)) && (olua_is_integer(L, 3))) { - // void playWithIndex(int animationIndex, @optional int durationTo, @optional int loop) - return _cocostudio_ArmatureAnimation_playWithIndex$3(L); + // void playWithIndex(int animationIndex, @optional int durationTo) + return _olua_fun_cocostudio_ArmatureAnimation_playWithIndex$3(L); // } } if (num_args == 3) { // if ((olua_is_integer(L, 2)) && (olua_is_integer(L, 3)) && (olua_is_integer(L, 4))) { // void playWithIndex(int animationIndex, @optional int durationTo, @optional int loop) - return _cocostudio_ArmatureAnimation_playWithIndex$1(L); + return _olua_fun_cocostudio_ArmatureAnimation_playWithIndex$1(L); // } } @@ -4113,7 +4373,7 @@ static int _cocostudio_ArmatureAnimation_playWithIndex(lua_State *L) return 0; } -static int _cocostudio_ArmatureAnimation_playWithIndexes$1(lua_State *L) +static int _olua_fun_cocostudio_ArmatureAnimation_playWithIndexes$1(lua_State *L) { olua_startinvoke(L); @@ -4137,7 +4397,7 @@ static int _cocostudio_ArmatureAnimation_playWithIndexes$1(lua_State *L) return 0; } -static int _cocostudio_ArmatureAnimation_playWithIndexes$2(lua_State *L) +static int _olua_fun_cocostudio_ArmatureAnimation_playWithIndexes$2(lua_State *L) { olua_startinvoke(L); @@ -4149,7 +4409,7 @@ static int _cocostudio_ArmatureAnimation_playWithIndexes$2(lua_State *L) olua_check_integer(L, -1, arg1); }); - // void playWithIndexes(const std::vector &movementIndexes, @optional int durationTo, @optional bool loop) + // void playWithIndexes(const std::vector &movementIndexes) self->playWithIndexes(arg1); olua_endinvoke(L); @@ -4157,7 +4417,7 @@ static int _cocostudio_ArmatureAnimation_playWithIndexes$2(lua_State *L) return 0; } -static int _cocostudio_ArmatureAnimation_playWithIndexes$3(lua_State *L) +static int _olua_fun_cocostudio_ArmatureAnimation_playWithIndexes$3(lua_State *L) { olua_startinvoke(L); @@ -4171,7 +4431,7 @@ static int _cocostudio_ArmatureAnimation_playWithIndexes$3(lua_State *L) }); olua_check_integer(L, 3, &arg2); - // void playWithIndexes(const std::vector &movementIndexes, @optional int durationTo, @optional bool loop) + // void playWithIndexes(const std::vector &movementIndexes, @optional int durationTo) self->playWithIndexes(arg1, arg2); olua_endinvoke(L); @@ -4179,28 +4439,28 @@ static int _cocostudio_ArmatureAnimation_playWithIndexes$3(lua_State *L) return 0; } -static int _cocostudio_ArmatureAnimation_playWithIndexes(lua_State *L) +static int _olua_fun_cocostudio_ArmatureAnimation_playWithIndexes(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_array(L, 2))) { - // void playWithIndexes(const std::vector &movementIndexes, @optional int durationTo, @optional bool loop) - return _cocostudio_ArmatureAnimation_playWithIndexes$2(L); + // void playWithIndexes(const std::vector &movementIndexes) + return _olua_fun_cocostudio_ArmatureAnimation_playWithIndexes$2(L); // } } if (num_args == 2) { // if ((olua_is_array(L, 2)) && (olua_is_integer(L, 3))) { - // void playWithIndexes(const std::vector &movementIndexes, @optional int durationTo, @optional bool loop) - return _cocostudio_ArmatureAnimation_playWithIndexes$3(L); + // void playWithIndexes(const std::vector &movementIndexes, @optional int durationTo) + return _olua_fun_cocostudio_ArmatureAnimation_playWithIndexes$3(L); // } } if (num_args == 3) { // if ((olua_is_array(L, 2)) && (olua_is_integer(L, 3)) && (olua_is_bool(L, 4))) { // void playWithIndexes(const std::vector &movementIndexes, @optional int durationTo, @optional bool loop) - return _cocostudio_ArmatureAnimation_playWithIndexes$1(L); + return _olua_fun_cocostudio_ArmatureAnimation_playWithIndexes$1(L); // } } @@ -4209,7 +4469,7 @@ static int _cocostudio_ArmatureAnimation_playWithIndexes(lua_State *L) return 0; } -static int _cocostudio_ArmatureAnimation_playWithNames$1(lua_State *L) +static int _olua_fun_cocostudio_ArmatureAnimation_playWithNames$1(lua_State *L) { olua_startinvoke(L); @@ -4233,7 +4493,7 @@ static int _cocostudio_ArmatureAnimation_playWithNames$1(lua_State *L) return 0; } -static int _cocostudio_ArmatureAnimation_playWithNames$2(lua_State *L) +static int _olua_fun_cocostudio_ArmatureAnimation_playWithNames$2(lua_State *L) { olua_startinvoke(L); @@ -4245,7 +4505,7 @@ static int _cocostudio_ArmatureAnimation_playWithNames$2(lua_State *L) olua_check_string(L, -1, arg1); }); - // void playWithNames(const std::vector &movementNames, @optional int durationTo, @optional bool loop) + // void playWithNames(const std::vector &movementNames) self->playWithNames(arg1); olua_endinvoke(L); @@ -4253,7 +4513,7 @@ static int _cocostudio_ArmatureAnimation_playWithNames$2(lua_State *L) return 0; } -static int _cocostudio_ArmatureAnimation_playWithNames$3(lua_State *L) +static int _olua_fun_cocostudio_ArmatureAnimation_playWithNames$3(lua_State *L) { olua_startinvoke(L); @@ -4267,7 +4527,7 @@ static int _cocostudio_ArmatureAnimation_playWithNames$3(lua_State *L) }); olua_check_integer(L, 3, &arg2); - // void playWithNames(const std::vector &movementNames, @optional int durationTo, @optional bool loop) + // void playWithNames(const std::vector &movementNames, @optional int durationTo) self->playWithNames(arg1, arg2); olua_endinvoke(L); @@ -4275,28 +4535,28 @@ static int _cocostudio_ArmatureAnimation_playWithNames$3(lua_State *L) return 0; } -static int _cocostudio_ArmatureAnimation_playWithNames(lua_State *L) +static int _olua_fun_cocostudio_ArmatureAnimation_playWithNames(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_array(L, 2))) { - // void playWithNames(const std::vector &movementNames, @optional int durationTo, @optional bool loop) - return _cocostudio_ArmatureAnimation_playWithNames$2(L); + // void playWithNames(const std::vector &movementNames) + return _olua_fun_cocostudio_ArmatureAnimation_playWithNames$2(L); // } } if (num_args == 2) { // if ((olua_is_array(L, 2)) && (olua_is_integer(L, 3))) { - // void playWithNames(const std::vector &movementNames, @optional int durationTo, @optional bool loop) - return _cocostudio_ArmatureAnimation_playWithNames$3(L); + // void playWithNames(const std::vector &movementNames, @optional int durationTo) + return _olua_fun_cocostudio_ArmatureAnimation_playWithNames$3(L); // } } if (num_args == 3) { // if ((olua_is_array(L, 2)) && (olua_is_integer(L, 3)) && (olua_is_bool(L, 4))) { // void playWithNames(const std::vector &movementNames, @optional int durationTo, @optional bool loop) - return _cocostudio_ArmatureAnimation_playWithNames$1(L); + return _olua_fun_cocostudio_ArmatureAnimation_playWithNames$1(L); // } } @@ -4305,7 +4565,7 @@ static int _cocostudio_ArmatureAnimation_playWithNames(lua_State *L) return 0; } -static int _cocostudio_ArmatureAnimation_setAnimationData(lua_State *L) +static int _olua_fun_cocostudio_ArmatureAnimation_setAnimationData(lua_State *L) { olua_startinvoke(L); @@ -4323,7 +4583,7 @@ static int _cocostudio_ArmatureAnimation_setAnimationData(lua_State *L) return 0; } -static int _cocostudio_ArmatureAnimation_setFrameEventCallFunc(lua_State *L) +static int _olua_fun_cocostudio_ArmatureAnimation_setFrameEventCallFunc(lua_State *L) { olua_startinvoke(L); @@ -4339,9 +4599,10 @@ static int _cocostudio_ArmatureAnimation_setFrameEventCallFunc(lua_State *L) std::string cb_tag = "FrameEventCallFunc"; std::string cb_name; if (olua_isfunction(L, 2)) { - cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](cocostudio::Bone *arg1, const std::string &arg2, int arg3, int arg4) { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](cocostudio::Bone *cb_arg1, const std::string &cb_arg2, int cb_arg3, int cb_arg4) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); @@ -4349,10 +4610,10 @@ static int _cocostudio_ArmatureAnimation_setFrameEventCallFunc(lua_State *L) int top = lua_gettop(L); size_t last = olua_push_objpool(L); olua_enable_objpool(L); - olua_push_object(L, arg1, "ccs.Bone"); - olua_push_string(L, arg2); - olua_push_integer(L, arg3); - olua_push_integer(L, arg4); + olua_push_object(L, cb_arg1, "ccs.Bone"); + olua_push_string(L, cb_arg2); + olua_push_integer(L, cb_arg3); + olua_push_integer(L, cb_arg4); olua_disable_objpool(L); olua_callback(L, cb_store, cb_name.c_str(), 4); @@ -4367,7 +4628,7 @@ static int _cocostudio_ArmatureAnimation_setFrameEventCallFunc(lua_State *L) arg1 = nullptr; } - // void setFrameEventCallFunc(@localvar @nullable std::function listener) + // void setFrameEventCallFunc(@nullable std::function listener) self->setFrameEventCallFunc(arg1); olua_endinvoke(L); @@ -4375,7 +4636,7 @@ static int _cocostudio_ArmatureAnimation_setFrameEventCallFunc(lua_State *L) return 0; } -static int _cocostudio_ArmatureAnimation_setMovementEventCallFunc(lua_State *L) +static int _olua_fun_cocostudio_ArmatureAnimation_setMovementEventCallFunc(lua_State *L) { olua_startinvoke(L); @@ -4391,9 +4652,10 @@ static int _cocostudio_ArmatureAnimation_setMovementEventCallFunc(lua_State *L) std::string cb_tag = "MovementEventCallFunc"; std::string cb_name; if (olua_isfunction(L, 2)) { - cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](cocostudio::Armature *arg1, cocostudio::MovementEventType arg2, const std::string &arg3) { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](cocostudio::Armature *cb_arg1, cocostudio::MovementEventType cb_arg2, const std::string &cb_arg3) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); @@ -4401,9 +4663,9 @@ static int _cocostudio_ArmatureAnimation_setMovementEventCallFunc(lua_State *L) int top = lua_gettop(L); size_t last = olua_push_objpool(L); olua_enable_objpool(L); - olua_push_object(L, arg1, "ccs.Armature"); - olua_push_enum(L, arg2); - olua_push_string(L, arg3); + olua_push_object(L, cb_arg1, "ccs.Armature"); + olua_push_enum(L, cb_arg2); + olua_push_string(L, cb_arg3); olua_disable_objpool(L); olua_callback(L, cb_store, cb_name.c_str(), 3); @@ -4418,7 +4680,7 @@ static int _cocostudio_ArmatureAnimation_setMovementEventCallFunc(lua_State *L) arg1 = nullptr; } - // void setMovementEventCallFunc(@localvar @nullable std::function listener) + // void setMovementEventCallFunc(@nullable std::function listener) self->setMovementEventCallFunc(arg1); olua_endinvoke(L); @@ -4426,7 +4688,7 @@ static int _cocostudio_ArmatureAnimation_setMovementEventCallFunc(lua_State *L) return 0; } -static int _cocostudio_ArmatureAnimation_setSpeedScale(lua_State *L) +static int _olua_fun_cocostudio_ArmatureAnimation_setSpeedScale(lua_State *L) { olua_startinvoke(L); @@ -4444,7 +4706,7 @@ static int _cocostudio_ArmatureAnimation_setSpeedScale(lua_State *L) return 0; } -static int _cocostudio_ArmatureAnimation_setUserObject(lua_State *L) +static int _olua_fun_cocostudio_ArmatureAnimation_setUserObject(lua_State *L) { olua_startinvoke(L); @@ -4462,40 +4724,49 @@ static int _cocostudio_ArmatureAnimation_setUserObject(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocostudio_ArmatureAnimation(lua_State *L) +static int _olua_cls_ccs_ArmatureAnimation(lua_State *L) { oluacls_class(L, "ccs.ArmatureAnimation"); - oluacls_func(L, "create", _cocostudio_ArmatureAnimation_create); - oluacls_func(L, "getAnimationData", _cocostudio_ArmatureAnimation_getAnimationData); - oluacls_func(L, "getCurrentMovementID", _cocostudio_ArmatureAnimation_getCurrentMovementID); - oluacls_func(L, "getMovementCount", _cocostudio_ArmatureAnimation_getMovementCount); - oluacls_func(L, "getSpeedScale", _cocostudio_ArmatureAnimation_getSpeedScale); - oluacls_func(L, "getUserObject", _cocostudio_ArmatureAnimation_getUserObject); - oluacls_func(L, "gotoAndPause", _cocostudio_ArmatureAnimation_gotoAndPause); - oluacls_func(L, "gotoAndPlay", _cocostudio_ArmatureAnimation_gotoAndPlay); - oluacls_func(L, "init", _cocostudio_ArmatureAnimation_init); - oluacls_func(L, "new", _cocostudio_ArmatureAnimation_new); - oluacls_func(L, "play", _cocostudio_ArmatureAnimation_play); - oluacls_func(L, "playWithIndex", _cocostudio_ArmatureAnimation_playWithIndex); - oluacls_func(L, "playWithIndexes", _cocostudio_ArmatureAnimation_playWithIndexes); - oluacls_func(L, "playWithNames", _cocostudio_ArmatureAnimation_playWithNames); - oluacls_func(L, "setAnimationData", _cocostudio_ArmatureAnimation_setAnimationData); - oluacls_func(L, "setFrameEventCallFunc", _cocostudio_ArmatureAnimation_setFrameEventCallFunc); - oluacls_func(L, "setMovementEventCallFunc", _cocostudio_ArmatureAnimation_setMovementEventCallFunc); - oluacls_func(L, "setSpeedScale", _cocostudio_ArmatureAnimation_setSpeedScale); - oluacls_func(L, "setUserObject", _cocostudio_ArmatureAnimation_setUserObject); - oluacls_prop(L, "animationData", _cocostudio_ArmatureAnimation_getAnimationData, _cocostudio_ArmatureAnimation_setAnimationData); - oluacls_prop(L, "currentMovementID", _cocostudio_ArmatureAnimation_getCurrentMovementID, nullptr); - oluacls_prop(L, "movementCount", _cocostudio_ArmatureAnimation_getMovementCount, nullptr); - oluacls_prop(L, "speedScale", _cocostudio_ArmatureAnimation_getSpeedScale, _cocostudio_ArmatureAnimation_setSpeedScale); - oluacls_prop(L, "userObject", _cocostudio_ArmatureAnimation_getUserObject, _cocostudio_ArmatureAnimation_setUserObject); + oluacls_func(L, "create", _olua_fun_cocostudio_ArmatureAnimation_create); + oluacls_func(L, "getAnimationData", _olua_fun_cocostudio_ArmatureAnimation_getAnimationData); + oluacls_func(L, "getCurrentMovementID", _olua_fun_cocostudio_ArmatureAnimation_getCurrentMovementID); + oluacls_func(L, "getMovementCount", _olua_fun_cocostudio_ArmatureAnimation_getMovementCount); + oluacls_func(L, "getSpeedScale", _olua_fun_cocostudio_ArmatureAnimation_getSpeedScale); + oluacls_func(L, "getUserObject", _olua_fun_cocostudio_ArmatureAnimation_getUserObject); + oluacls_func(L, "gotoAndPause", _olua_fun_cocostudio_ArmatureAnimation_gotoAndPause); + oluacls_func(L, "gotoAndPlay", _olua_fun_cocostudio_ArmatureAnimation_gotoAndPlay); + oluacls_func(L, "init", _olua_fun_cocostudio_ArmatureAnimation_init); + oluacls_func(L, "new", _olua_fun_cocostudio_ArmatureAnimation_new); + oluacls_func(L, "play", _olua_fun_cocostudio_ArmatureAnimation_play); + oluacls_func(L, "playWithIndex", _olua_fun_cocostudio_ArmatureAnimation_playWithIndex); + oluacls_func(L, "playWithIndexes", _olua_fun_cocostudio_ArmatureAnimation_playWithIndexes); + oluacls_func(L, "playWithNames", _olua_fun_cocostudio_ArmatureAnimation_playWithNames); + oluacls_func(L, "setAnimationData", _olua_fun_cocostudio_ArmatureAnimation_setAnimationData); + oluacls_func(L, "setFrameEventCallFunc", _olua_fun_cocostudio_ArmatureAnimation_setFrameEventCallFunc); + oluacls_func(L, "setMovementEventCallFunc", _olua_fun_cocostudio_ArmatureAnimation_setMovementEventCallFunc); + oluacls_func(L, "setSpeedScale", _olua_fun_cocostudio_ArmatureAnimation_setSpeedScale); + oluacls_func(L, "setUserObject", _olua_fun_cocostudio_ArmatureAnimation_setUserObject); + oluacls_prop(L, "animationData", _olua_fun_cocostudio_ArmatureAnimation_getAnimationData, _olua_fun_cocostudio_ArmatureAnimation_setAnimationData); + oluacls_prop(L, "currentMovementID", _olua_fun_cocostudio_ArmatureAnimation_getCurrentMovementID, nullptr); + oluacls_prop(L, "movementCount", _olua_fun_cocostudio_ArmatureAnimation_getMovementCount, nullptr); + oluacls_prop(L, "speedScale", _olua_fun_cocostudio_ArmatureAnimation_getSpeedScale, _olua_fun_cocostudio_ArmatureAnimation_setSpeedScale); + oluacls_prop(L, "userObject", _olua_fun_cocostudio_ArmatureAnimation_getUserObject, _olua_fun_cocostudio_ArmatureAnimation_setUserObject); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccs_ArmatureAnimation(lua_State *L) +{ + olua_require(L, "cocos2d_studio", luaopen_cocos2d_studio); + if (!olua_getclass(L, "ccs.ArmatureAnimation")) { + luaL_error(L, "class not found: cocostudio::ArmatureAnimation"); + } return 1; } OLUA_END_DECLS -static int _cocostudio_ArmatureData_addBoneData(lua_State *L) +static int _olua_fun_cocostudio_ArmatureData_addBoneData(lua_State *L) { olua_startinvoke(L); @@ -4513,70 +4784,82 @@ static int _cocostudio_ArmatureData_addBoneData(lua_State *L) return 0; } -static int _cocostudio_ArmatureData_create(lua_State *L) +static int _olua_fun_cocostudio_ArmatureData_boneDataDic$1(lua_State *L) { olua_startinvoke(L); - // static cocostudio::ArmatureData *create() - cocostudio::ArmatureData *ret = cocostudio::ArmatureData::create(); - int num_ret = olua_push_object(L, ret, "ccs.ArmatureData"); + cocostudio::ArmatureData *self = nullptr; + + olua_to_object(L, 1, &self, "ccs.ArmatureData"); + + // cocos2d::Map boneDataDic + cocos2d::Map &ret = self->boneDataDic; + int num_ret = olua_push_map(L, ret, [L](std::string &arg1, cocostudio::BoneData *arg2) { + olua_push_string(L, arg1); + olua_push_object(L, arg2, "ccs.BoneData"); + }); olua_endinvoke(L); return num_ret; } -static int _cocostudio_ArmatureData_getBoneData(lua_State *L) +static int _olua_fun_cocostudio_ArmatureData_boneDataDic$2(lua_State *L) { olua_startinvoke(L); cocostudio::ArmatureData *self = nullptr; - std::string arg1; /** boneName */ + cocos2d::Map arg1; /** boneDataDic */ olua_to_object(L, 1, &self, "ccs.ArmatureData"); - olua_check_string(L, 2, &arg1); + olua_check_map(L, 2, arg1, [L](std::string *arg1, cocostudio::BoneData **arg2) { + olua_check_string(L, -1, arg1); + olua_check_object(L, -2, arg2, "ccs.BoneData"); + }); - // cocostudio::BoneData *getBoneData(const std::string &boneName) - cocostudio::BoneData *ret = self->getBoneData(arg1); - int num_ret = olua_push_object(L, ret, "ccs.BoneData"); + // cocos2d::Map boneDataDic + self->boneDataDic = arg1; olua_endinvoke(L); - return num_ret; + return 0; } -static int _cocostudio_ArmatureData_init(lua_State *L) +static int _olua_fun_cocostudio_ArmatureData_boneDataDic(lua_State *L) { - olua_startinvoke(L); - - cocostudio::ArmatureData *self = nullptr; + int num_args = lua_gettop(L) - 1; - olua_to_object(L, 1, &self, "ccs.ArmatureData"); + if (num_args == 0) { + // cocos2d::Map boneDataDic + return _olua_fun_cocostudio_ArmatureData_boneDataDic$1(L); + } - // bool init() - bool ret = self->init(); - int num_ret = olua_push_bool(L, ret); + if (num_args == 1) { + // if ((olua_is_map(L, 2))) { + // cocos2d::Map boneDataDic + return _olua_fun_cocostudio_ArmatureData_boneDataDic$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'cocostudio::ArmatureData::boneDataDic' not support '%d' arguments", num_args); - return num_ret; + return 0; } -static int _cocostudio_ArmatureData_new(lua_State *L) +static int _olua_fun_cocostudio_ArmatureData_create(lua_State *L) { olua_startinvoke(L); - // ArmatureData() - cocostudio::ArmatureData *ret = new cocostudio::ArmatureData(); + // static cocostudio::ArmatureData *create() + cocostudio::ArmatureData *ret = cocostudio::ArmatureData::create(); int num_ret = olua_push_object(L, ret, "ccs.ArmatureData"); - olua_postnew(L, ret); olua_endinvoke(L); return num_ret; } -static int _cocostudio_ArmatureData_get_boneDataDic(lua_State *L) +static int _olua_fun_cocostudio_ArmatureData_dataVersion$1(lua_State *L) { olua_startinvoke(L); @@ -4584,75 +4867,91 @@ static int _cocostudio_ArmatureData_get_boneDataDic(lua_State *L) olua_to_object(L, 1, &self, "ccs.ArmatureData"); - // cocos2d::Map boneDataDic - cocos2d::Map &ret = self->boneDataDic; - int num_ret = olua_push_map(L, ret, [L](std::string &arg1, cocostudio::BoneData *arg2) { - olua_push_string(L, arg1); - olua_push_object(L, arg2, "ccs.BoneData"); - }); + // float dataVersion + float ret = self->dataVersion; + int num_ret = olua_push_number(L, ret); olua_endinvoke(L); return num_ret; } -static int _cocostudio_ArmatureData_set_boneDataDic(lua_State *L) +static int _olua_fun_cocostudio_ArmatureData_dataVersion$2(lua_State *L) { olua_startinvoke(L); cocostudio::ArmatureData *self = nullptr; - cocos2d::Map arg1; /** boneDataDic */ + float arg1 = 0; /** dataVersion */ olua_to_object(L, 1, &self, "ccs.ArmatureData"); - olua_check_map(L, 2, arg1, [L](std::string *arg1, cocostudio::BoneData **arg2) { - olua_check_string(L, -1, arg1); - olua_check_object(L, -2, arg2, "ccs.BoneData"); - }); + olua_check_number(L, 2, &arg1); - // cocos2d::Map boneDataDic - self->boneDataDic = arg1; + // float dataVersion + self->dataVersion = arg1; olua_endinvoke(L); return 0; } -static int _cocostudio_ArmatureData_get_dataVersion(lua_State *L) +static int _olua_fun_cocostudio_ArmatureData_dataVersion(lua_State *L) { - olua_startinvoke(L); - - cocostudio::ArmatureData *self = nullptr; + int num_args = lua_gettop(L) - 1; - olua_to_object(L, 1, &self, "ccs.ArmatureData"); + if (num_args == 0) { + // float dataVersion + return _olua_fun_cocostudio_ArmatureData_dataVersion$1(L); + } - // float dataVersion - float ret = self->dataVersion; - int num_ret = olua_push_number(L, ret); + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float dataVersion + return _olua_fun_cocostudio_ArmatureData_dataVersion$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'cocostudio::ArmatureData::dataVersion' not support '%d' arguments", num_args); - return num_ret; + return 0; } -static int _cocostudio_ArmatureData_set_dataVersion(lua_State *L) +static int _olua_fun_cocostudio_ArmatureData_getBoneData(lua_State *L) { olua_startinvoke(L); cocostudio::ArmatureData *self = nullptr; - float arg1 = 0; /** dataVersion */ + std::string arg1; /** boneName */ olua_to_object(L, 1, &self, "ccs.ArmatureData"); - olua_check_number(L, 2, &arg1); + olua_check_string(L, 2, &arg1); - // float dataVersion - self->dataVersion = arg1; + // cocostudio::BoneData *getBoneData(const std::string &boneName) + cocostudio::BoneData *ret = self->getBoneData(arg1); + int num_ret = olua_push_object(L, ret, "ccs.BoneData"); olua_endinvoke(L); - return 0; + return num_ret; } -static int _cocostudio_ArmatureData_get_name(lua_State *L) +static int _olua_fun_cocostudio_ArmatureData_init(lua_State *L) +{ + olua_startinvoke(L); + + cocostudio::ArmatureData *self = nullptr; + + olua_to_object(L, 1, &self, "ccs.ArmatureData"); + + // bool init() + bool ret = self->init(); + int num_ret = olua_push_bool(L, ret); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_cocostudio_ArmatureData_name$1(lua_State *L) { olua_startinvoke(L); @@ -4669,7 +4968,7 @@ static int _cocostudio_ArmatureData_get_name(lua_State *L) return num_ret; } -static int _cocostudio_ArmatureData_set_name(lua_State *L) +static int _olua_fun_cocostudio_ArmatureData_name$2(lua_State *L) { olua_startinvoke(L); @@ -4687,24 +4986,68 @@ static int _cocostudio_ArmatureData_set_name(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocostudio_ArmatureData(lua_State *L) +static int _olua_fun_cocostudio_ArmatureData_name(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // std::string name + return _olua_fun_cocostudio_ArmatureData_name$1(L); + } + + if (num_args == 1) { + // if ((olua_is_string(L, 2))) { + // std::string name + return _olua_fun_cocostudio_ArmatureData_name$2(L); + // } + } + + luaL_error(L, "method 'cocostudio::ArmatureData::name' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocostudio_ArmatureData_new(lua_State *L) +{ + olua_startinvoke(L); + + // cocostudio::ArmatureData() + cocostudio::ArmatureData *ret = new cocostudio::ArmatureData(); + int num_ret = olua_push_object(L, ret, "ccs.ArmatureData"); + olua_postnew(L, ret); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_cls_ccs_ArmatureData(lua_State *L) { oluacls_class(L, "ccs.ArmatureData"); - oluacls_func(L, "addBoneData", _cocostudio_ArmatureData_addBoneData); - oluacls_func(L, "create", _cocostudio_ArmatureData_create); - oluacls_func(L, "getBoneData", _cocostudio_ArmatureData_getBoneData); - oluacls_func(L, "init", _cocostudio_ArmatureData_init); - oluacls_func(L, "new", _cocostudio_ArmatureData_new); - oluacls_prop(L, "boneDataDic", _cocostudio_ArmatureData_get_boneDataDic, _cocostudio_ArmatureData_set_boneDataDic); - oluacls_prop(L, "dataVersion", _cocostudio_ArmatureData_get_dataVersion, _cocostudio_ArmatureData_set_dataVersion); - oluacls_prop(L, "name", _cocostudio_ArmatureData_get_name, _cocostudio_ArmatureData_set_name); + oluacls_func(L, "addBoneData", _olua_fun_cocostudio_ArmatureData_addBoneData); + oluacls_func(L, "create", _olua_fun_cocostudio_ArmatureData_create); + oluacls_func(L, "getBoneData", _olua_fun_cocostudio_ArmatureData_getBoneData); + oluacls_func(L, "init", _olua_fun_cocostudio_ArmatureData_init); + oluacls_func(L, "new", _olua_fun_cocostudio_ArmatureData_new); + oluacls_prop(L, "boneDataDic", _olua_fun_cocostudio_ArmatureData_boneDataDic, _olua_fun_cocostudio_ArmatureData_boneDataDic); + oluacls_prop(L, "dataVersion", _olua_fun_cocostudio_ArmatureData_dataVersion, _olua_fun_cocostudio_ArmatureData_dataVersion); + oluacls_prop(L, "name", _olua_fun_cocostudio_ArmatureData_name, _olua_fun_cocostudio_ArmatureData_name); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccs_ArmatureData(lua_State *L) +{ + olua_require(L, "cocos2d_studio", luaopen_cocos2d_studio); + if (!olua_getclass(L, "ccs.ArmatureData")) { + luaL_error(L, "class not found: cocostudio::ArmatureData"); + } + return 1; +} OLUA_END_DECLS -static int _cocostudio_ArmatureDataManager_addAnimationData$1(lua_State *L) +static int _olua_fun_cocostudio_ArmatureDataManager_addAnimationData$1(lua_State *L) { olua_startinvoke(L); @@ -4726,7 +5069,7 @@ static int _cocostudio_ArmatureDataManager_addAnimationData$1(lua_State *L) return 0; } -static int _cocostudio_ArmatureDataManager_addAnimationData$2(lua_State *L) +static int _olua_fun_cocostudio_ArmatureDataManager_addAnimationData$2(lua_State *L) { olua_startinvoke(L); @@ -4738,7 +5081,7 @@ static int _cocostudio_ArmatureDataManager_addAnimationData$2(lua_State *L) olua_check_string(L, 2, &arg1); olua_check_object(L, 3, &arg2, "ccs.AnimationData"); - // void addAnimationData(const std::string &id, cocostudio::AnimationData *animationData, @optional const std::string &configFilePath) + // void addAnimationData(const std::string &id, cocostudio::AnimationData *animationData) self->addAnimationData(arg1, arg2); olua_endinvoke(L); @@ -4746,21 +5089,21 @@ static int _cocostudio_ArmatureDataManager_addAnimationData$2(lua_State *L) return 0; } -static int _cocostudio_ArmatureDataManager_addAnimationData(lua_State *L) +static int _olua_fun_cocostudio_ArmatureDataManager_addAnimationData(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 2) { // if ((olua_is_string(L, 2)) && (olua_is_object(L, 3, "ccs.AnimationData"))) { - // void addAnimationData(const std::string &id, cocostudio::AnimationData *animationData, @optional const std::string &configFilePath) - return _cocostudio_ArmatureDataManager_addAnimationData$2(L); + // void addAnimationData(const std::string &id, cocostudio::AnimationData *animationData) + return _olua_fun_cocostudio_ArmatureDataManager_addAnimationData$2(L); // } } if (num_args == 3) { // if ((olua_is_string(L, 2)) && (olua_is_object(L, 3, "ccs.AnimationData")) && (olua_is_string(L, 4))) { // void addAnimationData(const std::string &id, cocostudio::AnimationData *animationData, @optional const std::string &configFilePath) - return _cocostudio_ArmatureDataManager_addAnimationData$1(L); + return _olua_fun_cocostudio_ArmatureDataManager_addAnimationData$1(L); // } } @@ -4769,7 +5112,7 @@ static int _cocostudio_ArmatureDataManager_addAnimationData(lua_State *L) return 0; } -static int _cocostudio_ArmatureDataManager_addArmatureData$1(lua_State *L) +static int _olua_fun_cocostudio_ArmatureDataManager_addArmatureData$1(lua_State *L) { olua_startinvoke(L); @@ -4791,7 +5134,7 @@ static int _cocostudio_ArmatureDataManager_addArmatureData$1(lua_State *L) return 0; } -static int _cocostudio_ArmatureDataManager_addArmatureData$2(lua_State *L) +static int _olua_fun_cocostudio_ArmatureDataManager_addArmatureData$2(lua_State *L) { olua_startinvoke(L); @@ -4803,7 +5146,7 @@ static int _cocostudio_ArmatureDataManager_addArmatureData$2(lua_State *L) olua_check_string(L, 2, &arg1); olua_check_object(L, 3, &arg2, "ccs.ArmatureData"); - // void addArmatureData(const std::string &id, cocostudio::ArmatureData *armatureData, @optional const std::string &configFilePath) + // void addArmatureData(const std::string &id, cocostudio::ArmatureData *armatureData) self->addArmatureData(arg1, arg2); olua_endinvoke(L); @@ -4811,21 +5154,21 @@ static int _cocostudio_ArmatureDataManager_addArmatureData$2(lua_State *L) return 0; } -static int _cocostudio_ArmatureDataManager_addArmatureData(lua_State *L) +static int _olua_fun_cocostudio_ArmatureDataManager_addArmatureData(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 2) { // if ((olua_is_string(L, 2)) && (olua_is_object(L, 3, "ccs.ArmatureData"))) { - // void addArmatureData(const std::string &id, cocostudio::ArmatureData *armatureData, @optional const std::string &configFilePath) - return _cocostudio_ArmatureDataManager_addArmatureData$2(L); + // void addArmatureData(const std::string &id, cocostudio::ArmatureData *armatureData) + return _olua_fun_cocostudio_ArmatureDataManager_addArmatureData$2(L); // } } if (num_args == 3) { // if ((olua_is_string(L, 2)) && (olua_is_object(L, 3, "ccs.ArmatureData")) && (olua_is_string(L, 4))) { // void addArmatureData(const std::string &id, cocostudio::ArmatureData *armatureData, @optional const std::string &configFilePath) - return _cocostudio_ArmatureDataManager_addArmatureData$1(L); + return _olua_fun_cocostudio_ArmatureDataManager_addArmatureData$1(L); // } } @@ -4834,7 +5177,7 @@ static int _cocostudio_ArmatureDataManager_addArmatureData(lua_State *L) return 0; } -static int _cocostudio_ArmatureDataManager_addArmatureFileInfo$1(lua_State *L) +static int _olua_fun_cocostudio_ArmatureDataManager_addArmatureFileInfo$1(lua_State *L) { olua_startinvoke(L); @@ -4852,7 +5195,7 @@ static int _cocostudio_ArmatureDataManager_addArmatureFileInfo$1(lua_State *L) return 0; } -static int _cocostudio_ArmatureDataManager_addArmatureFileInfo$2(lua_State *L) +static int _olua_fun_cocostudio_ArmatureDataManager_addArmatureFileInfo$2(lua_State *L) { olua_startinvoke(L); @@ -4874,21 +5217,21 @@ static int _cocostudio_ArmatureDataManager_addArmatureFileInfo$2(lua_State *L) return 0; } -static int _cocostudio_ArmatureDataManager_addArmatureFileInfo(lua_State *L) +static int _olua_fun_cocostudio_ArmatureDataManager_addArmatureFileInfo(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_string(L, 2))) { // void addArmatureFileInfo(const std::string &configFilePath) - return _cocostudio_ArmatureDataManager_addArmatureFileInfo$1(L); + return _olua_fun_cocostudio_ArmatureDataManager_addArmatureFileInfo$1(L); // } } if (num_args == 3) { // if ((olua_is_string(L, 2)) && (olua_is_string(L, 3)) && (olua_is_string(L, 4))) { // void addArmatureFileInfo(const std::string &imagePath, const std::string &plistPath, const std::string &configFilePath) - return _cocostudio_ArmatureDataManager_addArmatureFileInfo$2(L); + return _olua_fun_cocostudio_ArmatureDataManager_addArmatureFileInfo$2(L); // } } @@ -4897,7 +5240,7 @@ static int _cocostudio_ArmatureDataManager_addArmatureFileInfo(lua_State *L) return 0; } -static int _cocostudio_ArmatureDataManager_addSpriteFrameFromFile$1(lua_State *L) +static int _olua_fun_cocostudio_ArmatureDataManager_addSpriteFrameFromFile$1(lua_State *L) { olua_startinvoke(L); @@ -4919,7 +5262,7 @@ static int _cocostudio_ArmatureDataManager_addSpriteFrameFromFile$1(lua_State *L return 0; } -static int _cocostudio_ArmatureDataManager_addSpriteFrameFromFile$2(lua_State *L) +static int _olua_fun_cocostudio_ArmatureDataManager_addSpriteFrameFromFile$2(lua_State *L) { olua_startinvoke(L); @@ -4931,7 +5274,7 @@ static int _cocostudio_ArmatureDataManager_addSpriteFrameFromFile$2(lua_State *L olua_check_string(L, 2, &arg1); olua_check_string(L, 3, &arg2); - // void addSpriteFrameFromFile(const std::string &plistPath, const std::string &imagePath, @optional const std::string &configFilePath) + // void addSpriteFrameFromFile(const std::string &plistPath, const std::string &imagePath) self->addSpriteFrameFromFile(arg1, arg2); olua_endinvoke(L); @@ -4939,21 +5282,21 @@ static int _cocostudio_ArmatureDataManager_addSpriteFrameFromFile$2(lua_State *L return 0; } -static int _cocostudio_ArmatureDataManager_addSpriteFrameFromFile(lua_State *L) +static int _olua_fun_cocostudio_ArmatureDataManager_addSpriteFrameFromFile(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 2) { // if ((olua_is_string(L, 2)) && (olua_is_string(L, 3))) { - // void addSpriteFrameFromFile(const std::string &plistPath, const std::string &imagePath, @optional const std::string &configFilePath) - return _cocostudio_ArmatureDataManager_addSpriteFrameFromFile$2(L); + // void addSpriteFrameFromFile(const std::string &plistPath, const std::string &imagePath) + return _olua_fun_cocostudio_ArmatureDataManager_addSpriteFrameFromFile$2(L); // } } if (num_args == 3) { // if ((olua_is_string(L, 2)) && (olua_is_string(L, 3)) && (olua_is_string(L, 4))) { // void addSpriteFrameFromFile(const std::string &plistPath, const std::string &imagePath, @optional const std::string &configFilePath) - return _cocostudio_ArmatureDataManager_addSpriteFrameFromFile$1(L); + return _olua_fun_cocostudio_ArmatureDataManager_addSpriteFrameFromFile$1(L); // } } @@ -4962,7 +5305,7 @@ static int _cocostudio_ArmatureDataManager_addSpriteFrameFromFile(lua_State *L) return 0; } -static int _cocostudio_ArmatureDataManager_addTextureData$1(lua_State *L) +static int _olua_fun_cocostudio_ArmatureDataManager_addTextureData$1(lua_State *L) { olua_startinvoke(L); @@ -4984,7 +5327,7 @@ static int _cocostudio_ArmatureDataManager_addTextureData$1(lua_State *L) return 0; } -static int _cocostudio_ArmatureDataManager_addTextureData$2(lua_State *L) +static int _olua_fun_cocostudio_ArmatureDataManager_addTextureData$2(lua_State *L) { olua_startinvoke(L); @@ -4996,7 +5339,7 @@ static int _cocostudio_ArmatureDataManager_addTextureData$2(lua_State *L) olua_check_string(L, 2, &arg1); olua_check_object(L, 3, &arg2, "ccs.TextureData"); - // void addTextureData(const std::string &id, cocostudio::TextureData *textureData, @optional const std::string &configFilePath) + // void addTextureData(const std::string &id, cocostudio::TextureData *textureData) self->addTextureData(arg1, arg2); olua_endinvoke(L); @@ -5004,21 +5347,21 @@ static int _cocostudio_ArmatureDataManager_addTextureData$2(lua_State *L) return 0; } -static int _cocostudio_ArmatureDataManager_addTextureData(lua_State *L) +static int _olua_fun_cocostudio_ArmatureDataManager_addTextureData(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 2) { // if ((olua_is_string(L, 2)) && (olua_is_object(L, 3, "ccs.TextureData"))) { - // void addTextureData(const std::string &id, cocostudio::TextureData *textureData, @optional const std::string &configFilePath) - return _cocostudio_ArmatureDataManager_addTextureData$2(L); + // void addTextureData(const std::string &id, cocostudio::TextureData *textureData) + return _olua_fun_cocostudio_ArmatureDataManager_addTextureData$2(L); // } } if (num_args == 3) { // if ((olua_is_string(L, 2)) && (olua_is_object(L, 3, "ccs.TextureData")) && (olua_is_string(L, 4))) { // void addTextureData(const std::string &id, cocostudio::TextureData *textureData, @optional const std::string &configFilePath) - return _cocostudio_ArmatureDataManager_addTextureData$1(L); + return _olua_fun_cocostudio_ArmatureDataManager_addTextureData$1(L); // } } @@ -5027,7 +5370,7 @@ static int _cocostudio_ArmatureDataManager_addTextureData(lua_State *L) return 0; } -static int _cocostudio_ArmatureDataManager_destroyInstance(lua_State *L) +static int _olua_fun_cocostudio_ArmatureDataManager_destroyInstance(lua_State *L) { olua_startinvoke(L); @@ -5039,7 +5382,7 @@ static int _cocostudio_ArmatureDataManager_destroyInstance(lua_State *L) return 0; } -static int _cocostudio_ArmatureDataManager_getAnimationData(lua_State *L) +static int _olua_fun_cocostudio_ArmatureDataManager_getAnimationData(lua_State *L) { olua_startinvoke(L); @@ -5058,7 +5401,7 @@ static int _cocostudio_ArmatureDataManager_getAnimationData(lua_State *L) return num_ret; } -static int _cocostudio_ArmatureDataManager_getAnimationDatas(lua_State *L) +static int _olua_fun_cocostudio_ArmatureDataManager_getAnimationDatas(lua_State *L) { olua_startinvoke(L); @@ -5078,7 +5421,7 @@ static int _cocostudio_ArmatureDataManager_getAnimationDatas(lua_State *L) return num_ret; } -static int _cocostudio_ArmatureDataManager_getArmatureData(lua_State *L) +static int _olua_fun_cocostudio_ArmatureDataManager_getArmatureData(lua_State *L) { olua_startinvoke(L); @@ -5097,7 +5440,7 @@ static int _cocostudio_ArmatureDataManager_getArmatureData(lua_State *L) return num_ret; } -static int _cocostudio_ArmatureDataManager_getArmatureDatas(lua_State *L) +static int _olua_fun_cocostudio_ArmatureDataManager_getArmatureDatas(lua_State *L) { olua_startinvoke(L); @@ -5117,7 +5460,7 @@ static int _cocostudio_ArmatureDataManager_getArmatureDatas(lua_State *L) return num_ret; } -static int _cocostudio_ArmatureDataManager_getInstance(lua_State *L) +static int _olua_fun_cocostudio_ArmatureDataManager_getInstance(lua_State *L) { olua_startinvoke(L); @@ -5130,7 +5473,7 @@ static int _cocostudio_ArmatureDataManager_getInstance(lua_State *L) return num_ret; } -static int _cocostudio_ArmatureDataManager_getTextureData(lua_State *L) +static int _olua_fun_cocostudio_ArmatureDataManager_getTextureData(lua_State *L) { olua_startinvoke(L); @@ -5149,7 +5492,7 @@ static int _cocostudio_ArmatureDataManager_getTextureData(lua_State *L) return num_ret; } -static int _cocostudio_ArmatureDataManager_getTextureDatas(lua_State *L) +static int _olua_fun_cocostudio_ArmatureDataManager_getTextureDatas(lua_State *L) { olua_startinvoke(L); @@ -5169,7 +5512,7 @@ static int _cocostudio_ArmatureDataManager_getTextureDatas(lua_State *L) return num_ret; } -static int _cocostudio_ArmatureDataManager_init(lua_State *L) +static int _olua_fun_cocostudio_ArmatureDataManager_init(lua_State *L) { olua_startinvoke(L); @@ -5186,7 +5529,7 @@ static int _cocostudio_ArmatureDataManager_init(lua_State *L) return num_ret; } -static int _cocostudio_ArmatureDataManager_isAutoLoadSpriteFile(lua_State *L) +static int _olua_fun_cocostudio_ArmatureDataManager_isAutoLoadSpriteFile(lua_State *L) { olua_startinvoke(L); @@ -5203,7 +5546,7 @@ static int _cocostudio_ArmatureDataManager_isAutoLoadSpriteFile(lua_State *L) return num_ret; } -static int _cocostudio_ArmatureDataManager_removeAnimationData(lua_State *L) +static int _olua_fun_cocostudio_ArmatureDataManager_removeAnimationData(lua_State *L) { olua_startinvoke(L); @@ -5221,7 +5564,7 @@ static int _cocostudio_ArmatureDataManager_removeAnimationData(lua_State *L) return 0; } -static int _cocostudio_ArmatureDataManager_removeArmatureData(lua_State *L) +static int _olua_fun_cocostudio_ArmatureDataManager_removeArmatureData(lua_State *L) { olua_startinvoke(L); @@ -5239,7 +5582,7 @@ static int _cocostudio_ArmatureDataManager_removeArmatureData(lua_State *L) return 0; } -static int _cocostudio_ArmatureDataManager_removeArmatureFileInfo(lua_State *L) +static int _olua_fun_cocostudio_ArmatureDataManager_removeArmatureFileInfo(lua_State *L) { olua_startinvoke(L); @@ -5257,7 +5600,7 @@ static int _cocostudio_ArmatureDataManager_removeArmatureFileInfo(lua_State *L) return 0; } -static int _cocostudio_ArmatureDataManager_removeTextureData(lua_State *L) +static int _olua_fun_cocostudio_ArmatureDataManager_removeTextureData(lua_State *L) { olua_startinvoke(L); @@ -5275,40 +5618,49 @@ static int _cocostudio_ArmatureDataManager_removeTextureData(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocostudio_ArmatureDataManager(lua_State *L) +static int _olua_cls_ccs_ArmatureDataManager(lua_State *L) { oluacls_class(L, "ccs.ArmatureDataManager"); - oluacls_func(L, "addAnimationData", _cocostudio_ArmatureDataManager_addAnimationData); - oluacls_func(L, "addArmatureData", _cocostudio_ArmatureDataManager_addArmatureData); - oluacls_func(L, "addArmatureFileInfo", _cocostudio_ArmatureDataManager_addArmatureFileInfo); - oluacls_func(L, "addSpriteFrameFromFile", _cocostudio_ArmatureDataManager_addSpriteFrameFromFile); - oluacls_func(L, "addTextureData", _cocostudio_ArmatureDataManager_addTextureData); - oluacls_func(L, "destroyInstance", _cocostudio_ArmatureDataManager_destroyInstance); - oluacls_func(L, "getAnimationData", _cocostudio_ArmatureDataManager_getAnimationData); - oluacls_func(L, "getAnimationDatas", _cocostudio_ArmatureDataManager_getAnimationDatas); - oluacls_func(L, "getArmatureData", _cocostudio_ArmatureDataManager_getArmatureData); - oluacls_func(L, "getArmatureDatas", _cocostudio_ArmatureDataManager_getArmatureDatas); - oluacls_func(L, "getInstance", _cocostudio_ArmatureDataManager_getInstance); - oluacls_func(L, "getTextureData", _cocostudio_ArmatureDataManager_getTextureData); - oluacls_func(L, "getTextureDatas", _cocostudio_ArmatureDataManager_getTextureDatas); - oluacls_func(L, "init", _cocostudio_ArmatureDataManager_init); - oluacls_func(L, "isAutoLoadSpriteFile", _cocostudio_ArmatureDataManager_isAutoLoadSpriteFile); - oluacls_func(L, "removeAnimationData", _cocostudio_ArmatureDataManager_removeAnimationData); - oluacls_func(L, "removeArmatureData", _cocostudio_ArmatureDataManager_removeArmatureData); - oluacls_func(L, "removeArmatureFileInfo", _cocostudio_ArmatureDataManager_removeArmatureFileInfo); - oluacls_func(L, "removeTextureData", _cocostudio_ArmatureDataManager_removeTextureData); - oluacls_prop(L, "animationDatas", _cocostudio_ArmatureDataManager_getAnimationDatas, nullptr); - oluacls_prop(L, "armatureDatas", _cocostudio_ArmatureDataManager_getArmatureDatas, nullptr); - oluacls_prop(L, "autoLoadSpriteFile", _cocostudio_ArmatureDataManager_isAutoLoadSpriteFile, nullptr); - oluacls_prop(L, "instance", _cocostudio_ArmatureDataManager_getInstance, nullptr); - oluacls_prop(L, "textureDatas", _cocostudio_ArmatureDataManager_getTextureDatas, nullptr); + oluacls_func(L, "addAnimationData", _olua_fun_cocostudio_ArmatureDataManager_addAnimationData); + oluacls_func(L, "addArmatureData", _olua_fun_cocostudio_ArmatureDataManager_addArmatureData); + oluacls_func(L, "addArmatureFileInfo", _olua_fun_cocostudio_ArmatureDataManager_addArmatureFileInfo); + oluacls_func(L, "addSpriteFrameFromFile", _olua_fun_cocostudio_ArmatureDataManager_addSpriteFrameFromFile); + oluacls_func(L, "addTextureData", _olua_fun_cocostudio_ArmatureDataManager_addTextureData); + oluacls_func(L, "destroyInstance", _olua_fun_cocostudio_ArmatureDataManager_destroyInstance); + oluacls_func(L, "getAnimationData", _olua_fun_cocostudio_ArmatureDataManager_getAnimationData); + oluacls_func(L, "getAnimationDatas", _olua_fun_cocostudio_ArmatureDataManager_getAnimationDatas); + oluacls_func(L, "getArmatureData", _olua_fun_cocostudio_ArmatureDataManager_getArmatureData); + oluacls_func(L, "getArmatureDatas", _olua_fun_cocostudio_ArmatureDataManager_getArmatureDatas); + oluacls_func(L, "getInstance", _olua_fun_cocostudio_ArmatureDataManager_getInstance); + oluacls_func(L, "getTextureData", _olua_fun_cocostudio_ArmatureDataManager_getTextureData); + oluacls_func(L, "getTextureDatas", _olua_fun_cocostudio_ArmatureDataManager_getTextureDatas); + oluacls_func(L, "init", _olua_fun_cocostudio_ArmatureDataManager_init); + oluacls_func(L, "isAutoLoadSpriteFile", _olua_fun_cocostudio_ArmatureDataManager_isAutoLoadSpriteFile); + oluacls_func(L, "removeAnimationData", _olua_fun_cocostudio_ArmatureDataManager_removeAnimationData); + oluacls_func(L, "removeArmatureData", _olua_fun_cocostudio_ArmatureDataManager_removeArmatureData); + oluacls_func(L, "removeArmatureFileInfo", _olua_fun_cocostudio_ArmatureDataManager_removeArmatureFileInfo); + oluacls_func(L, "removeTextureData", _olua_fun_cocostudio_ArmatureDataManager_removeTextureData); + oluacls_prop(L, "animationDatas", _olua_fun_cocostudio_ArmatureDataManager_getAnimationDatas, nullptr); + oluacls_prop(L, "armatureDatas", _olua_fun_cocostudio_ArmatureDataManager_getArmatureDatas, nullptr); + oluacls_prop(L, "autoLoadSpriteFile", _olua_fun_cocostudio_ArmatureDataManager_isAutoLoadSpriteFile, nullptr); + oluacls_prop(L, "instance", _olua_fun_cocostudio_ArmatureDataManager_getInstance, nullptr); + oluacls_prop(L, "textureDatas", _olua_fun_cocostudio_ArmatureDataManager_getTextureDatas, nullptr); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccs_ArmatureDataManager(lua_State *L) +{ + olua_require(L, "cocos2d_studio", luaopen_cocos2d_studio); + if (!olua_getclass(L, "ccs.ArmatureDataManager")) { + luaL_error(L, "class not found: cocostudio::ArmatureDataManager"); + } + return 1; +} OLUA_END_DECLS -static int _cocostudio_DisplayData_changeDisplayToTexture(lua_State *L) +static int _olua_fun_cocostudio_DisplayData_changeDisplayToTexture(lua_State *L) { olua_startinvoke(L); @@ -5325,7 +5677,7 @@ static int _cocostudio_DisplayData_changeDisplayToTexture(lua_State *L) return num_ret; } -static int _cocostudio_DisplayData_copy(lua_State *L) +static int _olua_fun_cocostudio_DisplayData_copy(lua_State *L) { olua_startinvoke(L); @@ -5343,7 +5695,7 @@ static int _cocostudio_DisplayData_copy(lua_State *L) return 0; } -static int _cocostudio_DisplayData_create(lua_State *L) +static int _olua_fun_cocostudio_DisplayData_create(lua_State *L) { olua_startinvoke(L); @@ -5356,21 +5708,7 @@ static int _cocostudio_DisplayData_create(lua_State *L) return num_ret; } -static int _cocostudio_DisplayData_new(lua_State *L) -{ - olua_startinvoke(L); - - // DisplayData() - cocostudio::DisplayData *ret = new cocostudio::DisplayData(); - int num_ret = olua_push_object(L, ret, "ccs.DisplayData"); - olua_postnew(L, ret); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocostudio_DisplayData_get_displayName(lua_State *L) +static int _olua_fun_cocostudio_DisplayData_displayName$1(lua_State *L) { olua_startinvoke(L); @@ -5387,7 +5725,7 @@ static int _cocostudio_DisplayData_get_displayName(lua_State *L) return num_ret; } -static int _cocostudio_DisplayData_set_displayName(lua_State *L) +static int _olua_fun_cocostudio_DisplayData_displayName$2(lua_State *L) { olua_startinvoke(L); @@ -5405,7 +5743,28 @@ static int _cocostudio_DisplayData_set_displayName(lua_State *L) return 0; } -static int _cocostudio_DisplayData_get_displayType(lua_State *L) +static int _olua_fun_cocostudio_DisplayData_displayName(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // std::string displayName + return _olua_fun_cocostudio_DisplayData_displayName$1(L); + } + + if (num_args == 1) { + // if ((olua_is_string(L, 2))) { + // std::string displayName + return _olua_fun_cocostudio_DisplayData_displayName$2(L); + // } + } + + luaL_error(L, "method 'cocostudio::DisplayData::displayName' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocostudio_DisplayData_displayType$1(lua_State *L) { olua_startinvoke(L); @@ -5422,7 +5781,7 @@ static int _cocostudio_DisplayData_get_displayType(lua_State *L) return num_ret; } -static int _cocostudio_DisplayData_set_displayType(lua_State *L) +static int _olua_fun_cocostudio_DisplayData_displayType$2(lua_State *L) { olua_startinvoke(L); @@ -5440,22 +5799,66 @@ static int _cocostudio_DisplayData_set_displayType(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocostudio_DisplayData(lua_State *L) +static int _olua_fun_cocostudio_DisplayData_displayType(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // cocostudio::DisplayType displayType + return _olua_fun_cocostudio_DisplayData_displayType$1(L); + } + + if (num_args == 1) { + // if ((olua_is_enum(L, 2))) { + // cocostudio::DisplayType displayType + return _olua_fun_cocostudio_DisplayData_displayType$2(L); + // } + } + + luaL_error(L, "method 'cocostudio::DisplayData::displayType' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocostudio_DisplayData_new(lua_State *L) +{ + olua_startinvoke(L); + + // cocostudio::DisplayData() + cocostudio::DisplayData *ret = new cocostudio::DisplayData(); + int num_ret = olua_push_object(L, ret, "ccs.DisplayData"); + olua_postnew(L, ret); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_cls_ccs_DisplayData(lua_State *L) { oluacls_class(L, "ccs.DisplayData"); - oluacls_func(L, "changeDisplayToTexture", _cocostudio_DisplayData_changeDisplayToTexture); - oluacls_func(L, "copy", _cocostudio_DisplayData_copy); - oluacls_func(L, "create", _cocostudio_DisplayData_create); - oluacls_func(L, "new", _cocostudio_DisplayData_new); - oluacls_prop(L, "displayName", _cocostudio_DisplayData_get_displayName, _cocostudio_DisplayData_set_displayName); - oluacls_prop(L, "displayType", _cocostudio_DisplayData_get_displayType, _cocostudio_DisplayData_set_displayType); + oluacls_func(L, "changeDisplayToTexture", _olua_fun_cocostudio_DisplayData_changeDisplayToTexture); + oluacls_func(L, "copy", _olua_fun_cocostudio_DisplayData_copy); + oluacls_func(L, "create", _olua_fun_cocostudio_DisplayData_create); + oluacls_func(L, "new", _olua_fun_cocostudio_DisplayData_new); + oluacls_prop(L, "displayName", _olua_fun_cocostudio_DisplayData_displayName, _olua_fun_cocostudio_DisplayData_displayName); + oluacls_prop(L, "displayType", _olua_fun_cocostudio_DisplayData_displayType, _olua_fun_cocostudio_DisplayData_displayType); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccs_DisplayData(lua_State *L) +{ + olua_require(L, "cocos2d_studio", luaopen_cocos2d_studio); + if (!olua_getclass(L, "ccs.DisplayData")) { + luaL_error(L, "class not found: cocostudio::DisplayData"); + } + return 1; +} OLUA_END_DECLS -static int _cocostudio_ArmatureDisplayData_create(lua_State *L) +static int _olua_fun_cocostudio_ArmatureDisplayData_create(lua_State *L) { olua_startinvoke(L); @@ -5468,11 +5871,11 @@ static int _cocostudio_ArmatureDisplayData_create(lua_State *L) return num_ret; } -static int _cocostudio_ArmatureDisplayData_new(lua_State *L) +static int _olua_fun_cocostudio_ArmatureDisplayData_new(lua_State *L) { olua_startinvoke(L); - // ArmatureDisplayData() + // cocostudio::ArmatureDisplayData() cocostudio::ArmatureDisplayData *ret = new cocostudio::ArmatureDisplayData(); int num_ret = olua_push_object(L, ret, "ccs.ArmatureDisplayData"); olua_postnew(L, ret); @@ -5482,58 +5885,45 @@ static int _cocostudio_ArmatureDisplayData_new(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocostudio_ArmatureDisplayData(lua_State *L) +static int _olua_cls_ccs_ArmatureDisplayData(lua_State *L) { oluacls_class(L, "ccs.ArmatureDisplayData"); - oluacls_func(L, "create", _cocostudio_ArmatureDisplayData_create); - oluacls_func(L, "new", _cocostudio_ArmatureDisplayData_new); + oluacls_func(L, "create", _olua_fun_cocostudio_ArmatureDisplayData_create); + oluacls_func(L, "new", _olua_fun_cocostudio_ArmatureDisplayData_new); return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocostudio_ArmatureMovementDispatcher(lua_State *L) +OLUA_LIB int luaopen_ccs_ArmatureDisplayData(lua_State *L) { - oluacls_class(L, "ccs.ArmatureMovementDispatcher"); - + olua_require(L, "cocos2d_studio", luaopen_cocos2d_studio); + if (!olua_getclass(L, "ccs.ArmatureDisplayData")) { + luaL_error(L, "class not found: cocostudio::ArmatureDisplayData"); + } return 1; } OLUA_END_DECLS -static int _cocostudio_BaseData_copy(lua_State *L) +static int _olua_cls_ccs_ArmatureMovementDispatcher(lua_State *L) { - olua_startinvoke(L); - - cocostudio::BaseData *self = nullptr; - cocostudio::BaseData *arg1 = nullptr; /** node */ - - olua_to_object(L, 1, &self, "ccs.BaseData"); - olua_check_object(L, 2, &arg1, "ccs.BaseData"); - - // void copy(const cocostudio::BaseData *node) - self->copy(arg1); - - olua_endinvoke(L); + oluacls_class(L, "ccs.ArmatureMovementDispatcher"); - return 0; + return 1; } -static int _cocostudio_BaseData_create(lua_State *L) +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccs_ArmatureMovementDispatcher(lua_State *L) { - olua_startinvoke(L); - - // static cocostudio::BaseData *create() - cocostudio::BaseData *ret = cocostudio::BaseData::create(); - int num_ret = olua_push_object(L, ret, "ccs.BaseData"); - - olua_endinvoke(L); - - return num_ret; + olua_require(L, "cocos2d_studio", luaopen_cocos2d_studio); + if (!olua_getclass(L, "ccs.ArmatureMovementDispatcher")) { + luaL_error(L, "class not found: cocostudio::ArmatureMovementDispatcher"); + } + return 1; } +OLUA_END_DECLS -static int _cocostudio_BaseData_getColor(lua_State *L) +static int _olua_fun_cocostudio_BaseData_a$1(lua_State *L) { olua_startinvoke(L); @@ -5541,70 +5931,55 @@ static int _cocostudio_BaseData_getColor(lua_State *L) olua_to_object(L, 1, &self, "ccs.BaseData"); - // cocos2d::Color4B getColor() - cocos2d::Color4B ret = self->getColor(); - int num_ret = olua_push_cocos2d_Color4B(L, ret); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocostudio_BaseData_new(lua_State *L) -{ - olua_startinvoke(L); - - // BaseData() - cocostudio::BaseData *ret = new cocostudio::BaseData(); - int num_ret = olua_push_object(L, ret, "ccs.BaseData"); - olua_postnew(L, ret); + // int a + int ret = self->a; + int num_ret = olua_push_integer(L, ret); olua_endinvoke(L); return num_ret; } -static int _cocostudio_BaseData_setColor(lua_State *L) +static int _olua_fun_cocostudio_BaseData_a$2(lua_State *L) { olua_startinvoke(L); cocostudio::BaseData *self = nullptr; - cocos2d::Color4B arg1; /** color */ + int arg1 = 0; /** a */ olua_to_object(L, 1, &self, "ccs.BaseData"); - olua_check_cocos2d_Color4B(L, 2, &arg1); + olua_check_integer(L, 2, &arg1); - // void setColor(const cocos2d::Color4B &color) - self->setColor(arg1); + // int a + self->a = arg1; olua_endinvoke(L); return 0; } -static int _cocostudio_BaseData_subtract(lua_State *L) +static int _olua_fun_cocostudio_BaseData_a(lua_State *L) { - olua_startinvoke(L); - - cocostudio::BaseData *self = nullptr; - cocostudio::BaseData *arg1 = nullptr; /** from */ - cocostudio::BaseData *arg2 = nullptr; /** to */ - bool arg3 = false; /** limit */ + int num_args = lua_gettop(L) - 1; - olua_to_object(L, 1, &self, "ccs.BaseData"); - olua_check_object(L, 2, &arg1, "ccs.BaseData"); - olua_check_object(L, 3, &arg2, "ccs.BaseData"); - olua_check_bool(L, 4, &arg3); + if (num_args == 0) { + // int a + return _olua_fun_cocostudio_BaseData_a$1(L); + } - // void subtract(cocostudio::BaseData *from, cocostudio::BaseData *to, bool limit) - self->subtract(arg1, arg2, arg3); + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // int a + return _olua_fun_cocostudio_BaseData_a$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'cocostudio::BaseData::a' not support '%d' arguments", num_args); return 0; } -static int _cocostudio_BaseData_get_a(lua_State *L) +static int _olua_fun_cocostudio_BaseData_b$1(lua_State *L) { olua_startinvoke(L); @@ -5612,8 +5987,8 @@ static int _cocostudio_BaseData_get_a(lua_State *L) olua_to_object(L, 1, &self, "ccs.BaseData"); - // int a - int ret = self->a; + // int b + int ret = self->b; int num_ret = olua_push_integer(L, ret); olua_endinvoke(L); @@ -5621,60 +5996,77 @@ static int _cocostudio_BaseData_get_a(lua_State *L) return num_ret; } -static int _cocostudio_BaseData_set_a(lua_State *L) +static int _olua_fun_cocostudio_BaseData_b$2(lua_State *L) { olua_startinvoke(L); cocostudio::BaseData *self = nullptr; - int arg1 = 0; /** a */ + int arg1 = 0; /** b */ olua_to_object(L, 1, &self, "ccs.BaseData"); olua_check_integer(L, 2, &arg1); - // int a - self->a = arg1; + // int b + self->b = arg1; olua_endinvoke(L); return 0; } -static int _cocostudio_BaseData_get_b(lua_State *L) +static int _olua_fun_cocostudio_BaseData_b(lua_State *L) { - olua_startinvoke(L); - - cocostudio::BaseData *self = nullptr; + int num_args = lua_gettop(L) - 1; - olua_to_object(L, 1, &self, "ccs.BaseData"); + if (num_args == 0) { + // int b + return _olua_fun_cocostudio_BaseData_b$1(L); + } - // int b - int ret = self->b; - int num_ret = olua_push_integer(L, ret); + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // int b + return _olua_fun_cocostudio_BaseData_b$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'cocostudio::BaseData::b' not support '%d' arguments", num_args); - return num_ret; + return 0; } -static int _cocostudio_BaseData_set_b(lua_State *L) +static int _olua_fun_cocostudio_BaseData_copy(lua_State *L) { olua_startinvoke(L); cocostudio::BaseData *self = nullptr; - int arg1 = 0; /** b */ + cocostudio::BaseData *arg1 = nullptr; /** node */ olua_to_object(L, 1, &self, "ccs.BaseData"); - olua_check_integer(L, 2, &arg1); + olua_check_object(L, 2, &arg1, "ccs.BaseData"); - // int b - self->b = arg1; + // void copy(const cocostudio::BaseData *node) + self->copy(arg1); olua_endinvoke(L); return 0; } -static int _cocostudio_BaseData_get_g(lua_State *L) +static int _olua_fun_cocostudio_BaseData_create(lua_State *L) +{ + olua_startinvoke(L); + + // static cocostudio::BaseData *create() + cocostudio::BaseData *ret = cocostudio::BaseData::create(); + int num_ret = olua_push_object(L, ret, "ccs.BaseData"); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_cocostudio_BaseData_g$1(lua_State *L) { olua_startinvoke(L); @@ -5691,7 +6083,7 @@ static int _cocostudio_BaseData_get_g(lua_State *L) return num_ret; } -static int _cocostudio_BaseData_set_g(lua_State *L) +static int _olua_fun_cocostudio_BaseData_g$2(lua_State *L) { olua_startinvoke(L); @@ -5709,11 +6101,49 @@ static int _cocostudio_BaseData_set_g(lua_State *L) return 0; } -static int _cocostudio_BaseData_get_isUseColorInfo(lua_State *L) +static int _olua_fun_cocostudio_BaseData_g(lua_State *L) { - olua_startinvoke(L); - - cocostudio::BaseData *self = nullptr; + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // int g + return _olua_fun_cocostudio_BaseData_g$1(L); + } + + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // int g + return _olua_fun_cocostudio_BaseData_g$2(L); + // } + } + + luaL_error(L, "method 'cocostudio::BaseData::g' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocostudio_BaseData_getColor(lua_State *L) +{ + olua_startinvoke(L); + + cocostudio::BaseData *self = nullptr; + + olua_to_object(L, 1, &self, "ccs.BaseData"); + + // cocos2d::Color4B getColor() + cocos2d::Color4B ret = self->getColor(); + int num_ret = olua_push_cocos2d_Color4B(L, ret); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_cocostudio_BaseData_isUseColorInfo$1(lua_State *L) +{ + olua_startinvoke(L); + + cocostudio::BaseData *self = nullptr; olua_to_object(L, 1, &self, "ccs.BaseData"); @@ -5726,7 +6156,7 @@ static int _cocostudio_BaseData_get_isUseColorInfo(lua_State *L) return num_ret; } -static int _cocostudio_BaseData_set_isUseColorInfo(lua_State *L) +static int _olua_fun_cocostudio_BaseData_isUseColorInfo$2(lua_State *L) { olua_startinvoke(L); @@ -5744,7 +6174,42 @@ static int _cocostudio_BaseData_set_isUseColorInfo(lua_State *L) return 0; } -static int _cocostudio_BaseData_get_r(lua_State *L) +static int _olua_fun_cocostudio_BaseData_isUseColorInfo(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // bool isUseColorInfo + return _olua_fun_cocostudio_BaseData_isUseColorInfo$1(L); + } + + if (num_args == 1) { + // if ((olua_is_bool(L, 2))) { + // bool isUseColorInfo + return _olua_fun_cocostudio_BaseData_isUseColorInfo$2(L); + // } + } + + luaL_error(L, "method 'cocostudio::BaseData::isUseColorInfo' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocostudio_BaseData_new(lua_State *L) +{ + olua_startinvoke(L); + + // cocostudio::BaseData() + cocostudio::BaseData *ret = new cocostudio::BaseData(); + int num_ret = olua_push_object(L, ret, "ccs.BaseData"); + olua_postnew(L, ret); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_cocostudio_BaseData_r$1(lua_State *L) { olua_startinvoke(L); @@ -5761,7 +6226,7 @@ static int _cocostudio_BaseData_get_r(lua_State *L) return num_ret; } -static int _cocostudio_BaseData_set_r(lua_State *L) +static int _olua_fun_cocostudio_BaseData_r$2(lua_State *L) { olua_startinvoke(L); @@ -5779,7 +6244,28 @@ static int _cocostudio_BaseData_set_r(lua_State *L) return 0; } -static int _cocostudio_BaseData_get_scaleX(lua_State *L) +static int _olua_fun_cocostudio_BaseData_r(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // int r + return _olua_fun_cocostudio_BaseData_r$1(L); + } + + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // int r + return _olua_fun_cocostudio_BaseData_r$2(L); + // } + } + + luaL_error(L, "method 'cocostudio::BaseData::r' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocostudio_BaseData_scaleX$1(lua_State *L) { olua_startinvoke(L); @@ -5796,7 +6282,7 @@ static int _cocostudio_BaseData_get_scaleX(lua_State *L) return num_ret; } -static int _cocostudio_BaseData_set_scaleX(lua_State *L) +static int _olua_fun_cocostudio_BaseData_scaleX$2(lua_State *L) { olua_startinvoke(L); @@ -5814,7 +6300,28 @@ static int _cocostudio_BaseData_set_scaleX(lua_State *L) return 0; } -static int _cocostudio_BaseData_get_scaleY(lua_State *L) +static int _olua_fun_cocostudio_BaseData_scaleX(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float scaleX + return _olua_fun_cocostudio_BaseData_scaleX$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float scaleX + return _olua_fun_cocostudio_BaseData_scaleX$2(L); + // } + } + + luaL_error(L, "method 'cocostudio::BaseData::scaleX' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocostudio_BaseData_scaleY$1(lua_State *L) { olua_startinvoke(L); @@ -5831,7 +6338,7 @@ static int _cocostudio_BaseData_get_scaleY(lua_State *L) return num_ret; } -static int _cocostudio_BaseData_set_scaleY(lua_State *L) +static int _olua_fun_cocostudio_BaseData_scaleY$2(lua_State *L) { olua_startinvoke(L); @@ -5849,7 +6356,46 @@ static int _cocostudio_BaseData_set_scaleY(lua_State *L) return 0; } -static int _cocostudio_BaseData_get_skewX(lua_State *L) +static int _olua_fun_cocostudio_BaseData_scaleY(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float scaleY + return _olua_fun_cocostudio_BaseData_scaleY$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float scaleY + return _olua_fun_cocostudio_BaseData_scaleY$2(L); + // } + } + + luaL_error(L, "method 'cocostudio::BaseData::scaleY' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocostudio_BaseData_setColor(lua_State *L) +{ + olua_startinvoke(L); + + cocostudio::BaseData *self = nullptr; + cocos2d::Color4B arg1; /** color */ + + olua_to_object(L, 1, &self, "ccs.BaseData"); + olua_check_cocos2d_Color4B(L, 2, &arg1); + + // void setColor(const cocos2d::Color4B &color) + self->setColor(arg1); + + olua_endinvoke(L); + + return 0; +} + +static int _olua_fun_cocostudio_BaseData_skewX$1(lua_State *L) { olua_startinvoke(L); @@ -5866,7 +6412,7 @@ static int _cocostudio_BaseData_get_skewX(lua_State *L) return num_ret; } -static int _cocostudio_BaseData_set_skewX(lua_State *L) +static int _olua_fun_cocostudio_BaseData_skewX$2(lua_State *L) { olua_startinvoke(L); @@ -5884,7 +6430,28 @@ static int _cocostudio_BaseData_set_skewX(lua_State *L) return 0; } -static int _cocostudio_BaseData_get_skewY(lua_State *L) +static int _olua_fun_cocostudio_BaseData_skewX(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float skewX + return _olua_fun_cocostudio_BaseData_skewX$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float skewX + return _olua_fun_cocostudio_BaseData_skewX$2(L); + // } + } + + luaL_error(L, "method 'cocostudio::BaseData::skewX' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocostudio_BaseData_skewY$1(lua_State *L) { olua_startinvoke(L); @@ -5901,7 +6468,7 @@ static int _cocostudio_BaseData_get_skewY(lua_State *L) return num_ret; } -static int _cocostudio_BaseData_set_skewY(lua_State *L) +static int _olua_fun_cocostudio_BaseData_skewY$2(lua_State *L) { olua_startinvoke(L); @@ -5919,7 +6486,50 @@ static int _cocostudio_BaseData_set_skewY(lua_State *L) return 0; } -static int _cocostudio_BaseData_get_tweenRotate(lua_State *L) +static int _olua_fun_cocostudio_BaseData_skewY(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float skewY + return _olua_fun_cocostudio_BaseData_skewY$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float skewY + return _olua_fun_cocostudio_BaseData_skewY$2(L); + // } + } + + luaL_error(L, "method 'cocostudio::BaseData::skewY' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocostudio_BaseData_subtract(lua_State *L) +{ + olua_startinvoke(L); + + cocostudio::BaseData *self = nullptr; + cocostudio::BaseData *arg1 = nullptr; /** from */ + cocostudio::BaseData *arg2 = nullptr; /** to */ + bool arg3 = false; /** limit */ + + olua_to_object(L, 1, &self, "ccs.BaseData"); + olua_check_object(L, 2, &arg1, "ccs.BaseData"); + olua_check_object(L, 3, &arg2, "ccs.BaseData"); + olua_check_bool(L, 4, &arg3); + + // void subtract(cocostudio::BaseData *from, cocostudio::BaseData *to, bool limit) + self->subtract(arg1, arg2, arg3); + + olua_endinvoke(L); + + return 0; +} + +static int _olua_fun_cocostudio_BaseData_tweenRotate$1(lua_State *L) { olua_startinvoke(L); @@ -5936,7 +6546,7 @@ static int _cocostudio_BaseData_get_tweenRotate(lua_State *L) return num_ret; } -static int _cocostudio_BaseData_set_tweenRotate(lua_State *L) +static int _olua_fun_cocostudio_BaseData_tweenRotate$2(lua_State *L) { olua_startinvoke(L); @@ -5954,7 +6564,28 @@ static int _cocostudio_BaseData_set_tweenRotate(lua_State *L) return 0; } -static int _cocostudio_BaseData_get_x(lua_State *L) +static int _olua_fun_cocostudio_BaseData_tweenRotate(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float tweenRotate + return _olua_fun_cocostudio_BaseData_tweenRotate$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float tweenRotate + return _olua_fun_cocostudio_BaseData_tweenRotate$2(L); + // } + } + + luaL_error(L, "method 'cocostudio::BaseData::tweenRotate' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocostudio_BaseData_x$1(lua_State *L) { olua_startinvoke(L); @@ -5971,7 +6602,7 @@ static int _cocostudio_BaseData_get_x(lua_State *L) return num_ret; } -static int _cocostudio_BaseData_set_x(lua_State *L) +static int _olua_fun_cocostudio_BaseData_x$2(lua_State *L) { olua_startinvoke(L); @@ -5989,7 +6620,28 @@ static int _cocostudio_BaseData_set_x(lua_State *L) return 0; } -static int _cocostudio_BaseData_get_y(lua_State *L) +static int _olua_fun_cocostudio_BaseData_x(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float x + return _olua_fun_cocostudio_BaseData_x$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float x + return _olua_fun_cocostudio_BaseData_x$2(L); + // } + } + + luaL_error(L, "method 'cocostudio::BaseData::x' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocostudio_BaseData_y$1(lua_State *L) { olua_startinvoke(L); @@ -6006,7 +6658,7 @@ static int _cocostudio_BaseData_get_y(lua_State *L) return num_ret; } -static int _cocostudio_BaseData_set_y(lua_State *L) +static int _olua_fun_cocostudio_BaseData_y$2(lua_State *L) { olua_startinvoke(L); @@ -6024,7 +6676,28 @@ static int _cocostudio_BaseData_set_y(lua_State *L) return 0; } -static int _cocostudio_BaseData_get_zOrder(lua_State *L) +static int _olua_fun_cocostudio_BaseData_y(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float y + return _olua_fun_cocostudio_BaseData_y$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float y + return _olua_fun_cocostudio_BaseData_y$2(L); + // } + } + + luaL_error(L, "method 'cocostudio::BaseData::y' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocostudio_BaseData_zOrder$1(lua_State *L) { olua_startinvoke(L); @@ -6041,7 +6714,7 @@ static int _cocostudio_BaseData_get_zOrder(lua_State *L) return num_ret; } -static int _cocostudio_BaseData_set_zOrder(lua_State *L) +static int _olua_fun_cocostudio_BaseData_zOrder$2(lua_State *L) { olua_startinvoke(L); @@ -6059,36 +6732,66 @@ static int _cocostudio_BaseData_set_zOrder(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocostudio_BaseData(lua_State *L) +static int _olua_fun_cocostudio_BaseData_zOrder(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // int zOrder + return _olua_fun_cocostudio_BaseData_zOrder$1(L); + } + + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // int zOrder + return _olua_fun_cocostudio_BaseData_zOrder$2(L); + // } + } + + luaL_error(L, "method 'cocostudio::BaseData::zOrder' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_cls_ccs_BaseData(lua_State *L) { oluacls_class(L, "ccs.BaseData"); - oluacls_func(L, "copy", _cocostudio_BaseData_copy); - oluacls_func(L, "create", _cocostudio_BaseData_create); - oluacls_func(L, "getColor", _cocostudio_BaseData_getColor); - oluacls_func(L, "new", _cocostudio_BaseData_new); - oluacls_func(L, "setColor", _cocostudio_BaseData_setColor); - oluacls_func(L, "subtract", _cocostudio_BaseData_subtract); - oluacls_prop(L, "color", _cocostudio_BaseData_getColor, _cocostudio_BaseData_setColor); - oluacls_prop(L, "a", _cocostudio_BaseData_get_a, _cocostudio_BaseData_set_a); - oluacls_prop(L, "b", _cocostudio_BaseData_get_b, _cocostudio_BaseData_set_b); - oluacls_prop(L, "g", _cocostudio_BaseData_get_g, _cocostudio_BaseData_set_g); - oluacls_prop(L, "isUseColorInfo", _cocostudio_BaseData_get_isUseColorInfo, _cocostudio_BaseData_set_isUseColorInfo); - oluacls_prop(L, "r", _cocostudio_BaseData_get_r, _cocostudio_BaseData_set_r); - oluacls_prop(L, "scaleX", _cocostudio_BaseData_get_scaleX, _cocostudio_BaseData_set_scaleX); - oluacls_prop(L, "scaleY", _cocostudio_BaseData_get_scaleY, _cocostudio_BaseData_set_scaleY); - oluacls_prop(L, "skewX", _cocostudio_BaseData_get_skewX, _cocostudio_BaseData_set_skewX); - oluacls_prop(L, "skewY", _cocostudio_BaseData_get_skewY, _cocostudio_BaseData_set_skewY); - oluacls_prop(L, "tweenRotate", _cocostudio_BaseData_get_tweenRotate, _cocostudio_BaseData_set_tweenRotate); - oluacls_prop(L, "x", _cocostudio_BaseData_get_x, _cocostudio_BaseData_set_x); - oluacls_prop(L, "y", _cocostudio_BaseData_get_y, _cocostudio_BaseData_set_y); - oluacls_prop(L, "zOrder", _cocostudio_BaseData_get_zOrder, _cocostudio_BaseData_set_zOrder); + oluacls_func(L, "copy", _olua_fun_cocostudio_BaseData_copy); + oluacls_func(L, "create", _olua_fun_cocostudio_BaseData_create); + oluacls_func(L, "getColor", _olua_fun_cocostudio_BaseData_getColor); + oluacls_func(L, "new", _olua_fun_cocostudio_BaseData_new); + oluacls_func(L, "setColor", _olua_fun_cocostudio_BaseData_setColor); + oluacls_func(L, "subtract", _olua_fun_cocostudio_BaseData_subtract); + oluacls_prop(L, "color", _olua_fun_cocostudio_BaseData_getColor, _olua_fun_cocostudio_BaseData_setColor); + oluacls_prop(L, "a", _olua_fun_cocostudio_BaseData_a, _olua_fun_cocostudio_BaseData_a); + oluacls_prop(L, "b", _olua_fun_cocostudio_BaseData_b, _olua_fun_cocostudio_BaseData_b); + oluacls_prop(L, "g", _olua_fun_cocostudio_BaseData_g, _olua_fun_cocostudio_BaseData_g); + oluacls_prop(L, "isUseColorInfo", _olua_fun_cocostudio_BaseData_isUseColorInfo, _olua_fun_cocostudio_BaseData_isUseColorInfo); + oluacls_prop(L, "r", _olua_fun_cocostudio_BaseData_r, _olua_fun_cocostudio_BaseData_r); + oluacls_prop(L, "scaleX", _olua_fun_cocostudio_BaseData_scaleX, _olua_fun_cocostudio_BaseData_scaleX); + oluacls_prop(L, "scaleY", _olua_fun_cocostudio_BaseData_scaleY, _olua_fun_cocostudio_BaseData_scaleY); + oluacls_prop(L, "skewX", _olua_fun_cocostudio_BaseData_skewX, _olua_fun_cocostudio_BaseData_skewX); + oluacls_prop(L, "skewY", _olua_fun_cocostudio_BaseData_skewY, _olua_fun_cocostudio_BaseData_skewY); + oluacls_prop(L, "tweenRotate", _olua_fun_cocostudio_BaseData_tweenRotate, _olua_fun_cocostudio_BaseData_tweenRotate); + oluacls_prop(L, "x", _olua_fun_cocostudio_BaseData_x, _olua_fun_cocostudio_BaseData_x); + oluacls_prop(L, "y", _olua_fun_cocostudio_BaseData_y, _olua_fun_cocostudio_BaseData_y); + oluacls_prop(L, "zOrder", _olua_fun_cocostudio_BaseData_zOrder, _olua_fun_cocostudio_BaseData_zOrder); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccs_BaseData(lua_State *L) +{ + olua_require(L, "cocos2d_studio", luaopen_cocos2d_studio); + if (!olua_getclass(L, "ccs.BaseData")) { + luaL_error(L, "class not found: cocostudio::BaseData"); + } return 1; } OLUA_END_DECLS -static int _cocostudio_BaseTriggerAction_done(lua_State *L) +static int _olua_fun_cocostudio_BaseTriggerAction_done(lua_State *L) { olua_startinvoke(L); @@ -6104,7 +6807,7 @@ static int _cocostudio_BaseTriggerAction_done(lua_State *L) return 0; } -static int _cocostudio_BaseTriggerAction_init(lua_State *L) +static int _olua_fun_cocostudio_BaseTriggerAction_init(lua_State *L) { olua_startinvoke(L); @@ -6121,7 +6824,7 @@ static int _cocostudio_BaseTriggerAction_init(lua_State *L) return num_ret; } -static int _cocostudio_BaseTriggerAction_removeAll(lua_State *L) +static int _olua_fun_cocostudio_BaseTriggerAction_removeAll(lua_State *L) { olua_startinvoke(L); @@ -6137,19 +6840,28 @@ static int _cocostudio_BaseTriggerAction_removeAll(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocostudio_BaseTriggerAction(lua_State *L) +static int _olua_cls_ccs_BaseTriggerAction(lua_State *L) { oluacls_class(L, "ccs.BaseTriggerAction"); - oluacls_func(L, "done", _cocostudio_BaseTriggerAction_done); - oluacls_func(L, "init", _cocostudio_BaseTriggerAction_init); - oluacls_func(L, "removeAll", _cocostudio_BaseTriggerAction_removeAll); + oluacls_func(L, "done", _olua_fun_cocostudio_BaseTriggerAction_done); + oluacls_func(L, "init", _olua_fun_cocostudio_BaseTriggerAction_init); + oluacls_func(L, "removeAll", _olua_fun_cocostudio_BaseTriggerAction_removeAll); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccs_BaseTriggerAction(lua_State *L) +{ + olua_require(L, "cocos2d_studio", luaopen_cocos2d_studio); + if (!olua_getclass(L, "ccs.BaseTriggerAction")) { + luaL_error(L, "class not found: cocostudio::BaseTriggerAction"); + } return 1; } OLUA_END_DECLS -static int _cocostudio_BaseTriggerCondition_detect(lua_State *L) +static int _olua_fun_cocostudio_BaseTriggerCondition_detect(lua_State *L) { olua_startinvoke(L); @@ -6166,7 +6878,7 @@ static int _cocostudio_BaseTriggerCondition_detect(lua_State *L) return num_ret; } -static int _cocostudio_BaseTriggerCondition_init(lua_State *L) +static int _olua_fun_cocostudio_BaseTriggerCondition_init(lua_State *L) { olua_startinvoke(L); @@ -6183,7 +6895,7 @@ static int _cocostudio_BaseTriggerCondition_init(lua_State *L) return num_ret; } -static int _cocostudio_BaseTriggerCondition_removeAll(lua_State *L) +static int _olua_fun_cocostudio_BaseTriggerCondition_removeAll(lua_State *L) { olua_startinvoke(L); @@ -6199,19 +6911,28 @@ static int _cocostudio_BaseTriggerCondition_removeAll(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocostudio_BaseTriggerCondition(lua_State *L) +static int _olua_cls_ccs_BaseTriggerCondition(lua_State *L) { oluacls_class(L, "ccs.BaseTriggerCondition"); - oluacls_func(L, "detect", _cocostudio_BaseTriggerCondition_detect); - oluacls_func(L, "init", _cocostudio_BaseTriggerCondition_init); - oluacls_func(L, "removeAll", _cocostudio_BaseTriggerCondition_removeAll); + oluacls_func(L, "detect", _olua_fun_cocostudio_BaseTriggerCondition_detect); + oluacls_func(L, "init", _olua_fun_cocostudio_BaseTriggerCondition_init); + oluacls_func(L, "removeAll", _olua_fun_cocostudio_BaseTriggerCondition_removeAll); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccs_BaseTriggerCondition(lua_State *L) +{ + olua_require(L, "cocos2d_studio", luaopen_cocos2d_studio); + if (!olua_getclass(L, "ccs.BaseTriggerCondition")) { + luaL_error(L, "class not found: cocostudio::BaseTriggerCondition"); + } + return 1; +} OLUA_END_DECLS -static int _cocostudio_BatchNode_create(lua_State *L) +static int _olua_fun_cocostudio_BatchNode_create(lua_State *L) { olua_startinvoke(L); @@ -6224,11 +6945,11 @@ static int _cocostudio_BatchNode_create(lua_State *L) return num_ret; } -static int _cocostudio_BatchNode_new(lua_State *L) +static int _olua_fun_cocostudio_BatchNode_new(lua_State *L) { olua_startinvoke(L); - // BatchNode() + // cocostudio::BatchNode() cocostudio::BatchNode *ret = new cocostudio::BatchNode(); int num_ret = olua_push_object(L, ret, "ccs.BatchNode"); olua_postnew(L, ret); @@ -6238,18 +6959,27 @@ static int _cocostudio_BatchNode_new(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocostudio_BatchNode(lua_State *L) +static int _olua_cls_ccs_BatchNode(lua_State *L) { oluacls_class(L, "ccs.BatchNode"); - oluacls_func(L, "create", _cocostudio_BatchNode_create); - oluacls_func(L, "new", _cocostudio_BatchNode_new); + oluacls_func(L, "create", _olua_fun_cocostudio_BatchNode_create); + oluacls_func(L, "new", _olua_fun_cocostudio_BatchNode_new); return 1; } -OLUA_END_DECLS -static int _cocostudio_Bone_addChildBone(lua_State *L) +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccs_BatchNode(lua_State *L) +{ + olua_require(L, "cocos2d_studio", luaopen_cocos2d_studio); + if (!olua_getclass(L, "ccs.BatchNode")) { + luaL_error(L, "class not found: cocostudio::BatchNode"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_fun_cocostudio_Bone_addChildBone(lua_State *L) { olua_startinvoke(L); @@ -6267,7 +6997,7 @@ static int _cocostudio_Bone_addChildBone(lua_State *L) return 0; } -static int _cocostudio_Bone_addDisplay$1(lua_State *L) +static int _olua_fun_cocostudio_Bone_addDisplay$1(lua_State *L) { olua_startinvoke(L); @@ -6287,7 +7017,7 @@ static int _cocostudio_Bone_addDisplay$1(lua_State *L) return 0; } -static int _cocostudio_Bone_addDisplay$2(lua_State *L) +static int _olua_fun_cocostudio_Bone_addDisplay$2(lua_State *L) { olua_startinvoke(L); @@ -6307,19 +7037,19 @@ static int _cocostudio_Bone_addDisplay$2(lua_State *L) return 0; } -static int _cocostudio_Bone_addDisplay(lua_State *L) +static int _olua_fun_cocostudio_Bone_addDisplay(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 2) { if ((olua_is_object(L, 2, "ccs.DisplayData")) && (olua_is_integer(L, 3))) { // void addDisplay(cocostudio::DisplayData *displayData, int index) - return _cocostudio_Bone_addDisplay$1(L); + return _olua_fun_cocostudio_Bone_addDisplay$1(L); } // if ((olua_is_object(L, 2, "cc.Node")) && (olua_is_integer(L, 3))) { // void addDisplay(cocos2d::Node *display, int index) - return _cocostudio_Bone_addDisplay$2(L); + return _olua_fun_cocostudio_Bone_addDisplay$2(L); // } } @@ -6328,7 +7058,7 @@ static int _cocostudio_Bone_addDisplay(lua_State *L) return 0; } -static int _cocostudio_Bone_changeDisplayWithIndex(lua_State *L) +static int _olua_fun_cocostudio_Bone_changeDisplayWithIndex(lua_State *L) { olua_startinvoke(L); @@ -6348,7 +7078,7 @@ static int _cocostudio_Bone_changeDisplayWithIndex(lua_State *L) return 0; } -static int _cocostudio_Bone_changeDisplayWithName(lua_State *L) +static int _olua_fun_cocostudio_Bone_changeDisplayWithName(lua_State *L) { olua_startinvoke(L); @@ -6368,7 +7098,7 @@ static int _cocostudio_Bone_changeDisplayWithName(lua_State *L) return 0; } -static int _cocostudio_Bone_create$1(lua_State *L) +static int _olua_fun_cocostudio_Bone_create$1(lua_State *L) { olua_startinvoke(L); @@ -6381,7 +7111,7 @@ static int _cocostudio_Bone_create$1(lua_State *L) return num_ret; } -static int _cocostudio_Bone_create$2(lua_State *L) +static int _olua_fun_cocostudio_Bone_create$2(lua_State *L) { olua_startinvoke(L); @@ -6398,19 +7128,19 @@ static int _cocostudio_Bone_create$2(lua_State *L) return num_ret; } -static int _cocostudio_Bone_create(lua_State *L) +static int _olua_fun_cocostudio_Bone_create(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 0) { // static cocostudio::Bone *create() - return _cocostudio_Bone_create$1(L); + return _olua_fun_cocostudio_Bone_create$1(L); } if (num_args == 1) { // if ((olua_is_string(L, 1))) { // static cocostudio::Bone *create(const std::string &name) - return _cocostudio_Bone_create$2(L); + return _olua_fun_cocostudio_Bone_create$2(L); // } } @@ -6419,7 +7149,7 @@ static int _cocostudio_Bone_create(lua_State *L) return 0; } -static int _cocostudio_Bone_getArmature(lua_State *L) +static int _olua_fun_cocostudio_Bone_getArmature(lua_State *L) { olua_startinvoke(L); @@ -6436,7 +7166,7 @@ static int _cocostudio_Bone_getArmature(lua_State *L) return num_ret; } -static int _cocostudio_Bone_getBlendFunc(lua_State *L) +static int _olua_fun_cocostudio_Bone_getBlendFunc(lua_State *L) { olua_startinvoke(L); @@ -6446,14 +7176,14 @@ static int _cocostudio_Bone_getBlendFunc(lua_State *L) // cocos2d::BlendFunc getBlendFunc() cocos2d::BlendFunc ret = self->getBlendFunc(); - int num_ret = olua_pushcopy_object(L, ret, "cc.BlendFunc"); + int num_ret = olua_copy_object(L, ret, "cc.BlendFunc"); olua_endinvoke(L); return num_ret; } -static int _cocostudio_Bone_getBoneData(lua_State *L) +static int _olua_fun_cocostudio_Bone_getBoneData(lua_State *L) { olua_startinvoke(L); @@ -6470,7 +7200,7 @@ static int _cocostudio_Bone_getBoneData(lua_State *L) return num_ret; } -static int _cocostudio_Bone_getChildArmature(lua_State *L) +static int _olua_fun_cocostudio_Bone_getChildArmature(lua_State *L) { olua_startinvoke(L); @@ -6487,7 +7217,7 @@ static int _cocostudio_Bone_getChildArmature(lua_State *L) return num_ret; } -static int _cocostudio_Bone_getColliderDetector(lua_State *L) +static int _olua_fun_cocostudio_Bone_getColliderDetector(lua_State *L) { olua_startinvoke(L); @@ -6504,7 +7234,7 @@ static int _cocostudio_Bone_getColliderDetector(lua_State *L) return num_ret; } -static int _cocostudio_Bone_getDisplayManager(lua_State *L) +static int _olua_fun_cocostudio_Bone_getDisplayManager(lua_State *L) { olua_startinvoke(L); @@ -6521,7 +7251,7 @@ static int _cocostudio_Bone_getDisplayManager(lua_State *L) return num_ret; } -static int _cocostudio_Bone_getDisplayRenderNode(lua_State *L) +static int _olua_fun_cocostudio_Bone_getDisplayRenderNode(lua_State *L) { olua_startinvoke(L); @@ -6538,7 +7268,7 @@ static int _cocostudio_Bone_getDisplayRenderNode(lua_State *L) return num_ret; } -static int _cocostudio_Bone_getDisplayRenderNodeType(lua_State *L) +static int _olua_fun_cocostudio_Bone_getDisplayRenderNodeType(lua_State *L) { olua_startinvoke(L); @@ -6555,7 +7285,7 @@ static int _cocostudio_Bone_getDisplayRenderNodeType(lua_State *L) return num_ret; } -static int _cocostudio_Bone_getNodeToArmatureTransform(lua_State *L) +static int _olua_fun_cocostudio_Bone_getNodeToArmatureTransform(lua_State *L) { olua_startinvoke(L); @@ -6565,14 +7295,14 @@ static int _cocostudio_Bone_getNodeToArmatureTransform(lua_State *L) // cocos2d::Mat4 getNodeToArmatureTransform() cocos2d::Mat4 ret = self->getNodeToArmatureTransform(); - int num_ret = olua_pushcopy_object(L, ret, "cc.Mat4"); + int num_ret = olua_copy_object(L, ret, "cc.Mat4"); olua_endinvoke(L); return num_ret; } -static int _cocostudio_Bone_getParentBone(lua_State *L) +static int _olua_fun_cocostudio_Bone_getParentBone(lua_State *L) { olua_startinvoke(L); @@ -6589,7 +7319,7 @@ static int _cocostudio_Bone_getParentBone(lua_State *L) return num_ret; } -static int _cocostudio_Bone_getTween(lua_State *L) +static int _olua_fun_cocostudio_Bone_getTween(lua_State *L) { olua_startinvoke(L); @@ -6606,7 +7336,7 @@ static int _cocostudio_Bone_getTween(lua_State *L) return num_ret; } -static int _cocostudio_Bone_getTweenData(lua_State *L) +static int _olua_fun_cocostudio_Bone_getTweenData(lua_State *L) { olua_startinvoke(L); @@ -6623,7 +7353,7 @@ static int _cocostudio_Bone_getTweenData(lua_State *L) return num_ret; } -static int _cocostudio_Bone_getWorldInfo(lua_State *L) +static int _olua_fun_cocostudio_Bone_getWorldInfo(lua_State *L) { olua_startinvoke(L); @@ -6640,7 +7370,7 @@ static int _cocostudio_Bone_getWorldInfo(lua_State *L) return num_ret; } -static int _cocostudio_Bone_init$1(lua_State *L) +static int _olua_fun_cocostudio_Bone_init$1(lua_State *L) { olua_startinvoke(L); @@ -6657,7 +7387,7 @@ static int _cocostudio_Bone_init$1(lua_State *L) return num_ret; } -static int _cocostudio_Bone_init$2(lua_State *L) +static int _olua_fun_cocostudio_Bone_init$2(lua_State *L) { olua_startinvoke(L); @@ -6676,19 +7406,19 @@ static int _cocostudio_Bone_init$2(lua_State *L) return num_ret; } -static int _cocostudio_Bone_init(lua_State *L) +static int _olua_fun_cocostudio_Bone_init(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 0) { // @using bool init() - return _cocostudio_Bone_init$1(L); + return _olua_fun_cocostudio_Bone_init$1(L); } if (num_args == 1) { // if ((olua_is_string(L, 2))) { // bool init(const std::string &name) - return _cocostudio_Bone_init$2(L); + return _olua_fun_cocostudio_Bone_init$2(L); // } } @@ -6697,7 +7427,7 @@ static int _cocostudio_Bone_init(lua_State *L) return 0; } -static int _cocostudio_Bone_isBlendDirty(lua_State *L) +static int _olua_fun_cocostudio_Bone_isBlendDirty(lua_State *L) { olua_startinvoke(L); @@ -6714,7 +7444,7 @@ static int _cocostudio_Bone_isBlendDirty(lua_State *L) return num_ret; } -static int _cocostudio_Bone_isIgnoreMovementBoneData(lua_State *L) +static int _olua_fun_cocostudio_Bone_isIgnoreMovementBoneData(lua_State *L) { olua_startinvoke(L); @@ -6731,7 +7461,7 @@ static int _cocostudio_Bone_isIgnoreMovementBoneData(lua_State *L) return num_ret; } -static int _cocostudio_Bone_isTransformDirty(lua_State *L) +static int _olua_fun_cocostudio_Bone_isTransformDirty(lua_State *L) { olua_startinvoke(L); @@ -6748,11 +7478,11 @@ static int _cocostudio_Bone_isTransformDirty(lua_State *L) return num_ret; } -static int _cocostudio_Bone_new(lua_State *L) +static int _olua_fun_cocostudio_Bone_new(lua_State *L) { olua_startinvoke(L); - // Bone() + // cocostudio::Bone() cocostudio::Bone *ret = new cocostudio::Bone(); int num_ret = olua_push_object(L, ret, "ccs.Bone"); olua_postnew(L, ret); @@ -6762,7 +7492,7 @@ static int _cocostudio_Bone_new(lua_State *L) return num_ret; } -static int _cocostudio_Bone_removeChildBone(lua_State *L) +static int _olua_fun_cocostudio_Bone_removeChildBone(lua_State *L) { olua_startinvoke(L); @@ -6782,7 +7512,7 @@ static int _cocostudio_Bone_removeChildBone(lua_State *L) return 0; } -static int _cocostudio_Bone_removeDisplay(lua_State *L) +static int _olua_fun_cocostudio_Bone_removeDisplay(lua_State *L) { olua_startinvoke(L); @@ -6800,7 +7530,7 @@ static int _cocostudio_Bone_removeDisplay(lua_State *L) return 0; } -static int _cocostudio_Bone_removeFromParent$1(lua_State *L) +static int _olua_fun_cocostudio_Bone_removeFromParent$1(lua_State *L) { olua_startinvoke(L); @@ -6828,7 +7558,7 @@ static int _cocostudio_Bone_removeFromParent$1(lua_State *L) return 0; } -static int _cocostudio_Bone_removeFromParent$2(lua_State *L) +static int _olua_fun_cocostudio_Bone_removeFromParent$2(lua_State *L) { olua_startinvoke(L); @@ -6843,7 +7573,7 @@ static int _cocostudio_Bone_removeFromParent$2(lua_State *L) olua_pushobj(L, self->getParent()); int parent = lua_gettop(L); - // @using @delref(children | parent) void removeFromParent() + // @delref(children | parent) @using void removeFromParent() self->removeFromParent(); // insert code after call @@ -6854,19 +7584,19 @@ static int _cocostudio_Bone_removeFromParent$2(lua_State *L) return 0; } -static int _cocostudio_Bone_removeFromParent(lua_State *L) +static int _olua_fun_cocostudio_Bone_removeFromParent(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 0) { - // @using @delref(children | parent) void removeFromParent() - return _cocostudio_Bone_removeFromParent$2(L); + // @delref(children | parent) @using void removeFromParent() + return _olua_fun_cocostudio_Bone_removeFromParent$2(L); } if (num_args == 1) { // if ((olua_is_bool(L, 2))) { // @delref(children | parent) void removeFromParent(bool recursion) - return _cocostudio_Bone_removeFromParent$1(L); + return _olua_fun_cocostudio_Bone_removeFromParent$1(L); // } } @@ -6875,7 +7605,7 @@ static int _cocostudio_Bone_removeFromParent(lua_State *L) return 0; } -static int _cocostudio_Bone_setArmature(lua_State *L) +static int _olua_fun_cocostudio_Bone_setArmature(lua_State *L) { olua_startinvoke(L); @@ -6893,7 +7623,7 @@ static int _cocostudio_Bone_setArmature(lua_State *L) return 0; } -static int _cocostudio_Bone_setBlendDirty(lua_State *L) +static int _olua_fun_cocostudio_Bone_setBlendDirty(lua_State *L) { olua_startinvoke(L); @@ -6911,25 +7641,25 @@ static int _cocostudio_Bone_setBlendDirty(lua_State *L) return 0; } -static int _cocostudio_Bone_setBlendFunc(lua_State *L) +static int _olua_fun_cocostudio_Bone_setBlendFunc(lua_State *L) { olua_startinvoke(L); cocostudio::Bone *self = nullptr; - cocos2d::BlendFunc arg1; /** blendFunc */ + cocos2d::BlendFunc *arg1; /** blendFunc */ olua_to_object(L, 1, &self, "ccs.Bone"); olua_check_object(L, 2, &arg1, "cc.BlendFunc"); // void setBlendFunc(const cocos2d::BlendFunc &blendFunc) - self->setBlendFunc(arg1); + self->setBlendFunc(*arg1); olua_endinvoke(L); return 0; } -static int _cocostudio_Bone_setBoneData(lua_State *L) +static int _olua_fun_cocostudio_Bone_setBoneData(lua_State *L) { olua_startinvoke(L); @@ -6947,7 +7677,7 @@ static int _cocostudio_Bone_setBoneData(lua_State *L) return 0; } -static int _cocostudio_Bone_setChildArmature(lua_State *L) +static int _olua_fun_cocostudio_Bone_setChildArmature(lua_State *L) { olua_startinvoke(L); @@ -6965,7 +7695,7 @@ static int _cocostudio_Bone_setChildArmature(lua_State *L) return 0; } -static int _cocostudio_Bone_setIgnoreMovementBoneData(lua_State *L) +static int _olua_fun_cocostudio_Bone_setIgnoreMovementBoneData(lua_State *L) { olua_startinvoke(L); @@ -6983,7 +7713,7 @@ static int _cocostudio_Bone_setIgnoreMovementBoneData(lua_State *L) return 0; } -static int _cocostudio_Bone_setLocalZOrder(lua_State *L) +static int _olua_fun_cocostudio_Bone_setLocalZOrder(lua_State *L) { olua_startinvoke(L); @@ -7001,7 +7731,7 @@ static int _cocostudio_Bone_setLocalZOrder(lua_State *L) return 0; } -static int _cocostudio_Bone_setParentBone(lua_State *L) +static int _olua_fun_cocostudio_Bone_setParentBone(lua_State *L) { olua_startinvoke(L); @@ -7019,7 +7749,7 @@ static int _cocostudio_Bone_setParentBone(lua_State *L) return 0; } -static int _cocostudio_Bone_setTransformDirty(lua_State *L) +static int _olua_fun_cocostudio_Bone_setTransformDirty(lua_State *L) { olua_startinvoke(L); @@ -7037,7 +7767,7 @@ static int _cocostudio_Bone_setTransformDirty(lua_State *L) return 0; } -static int _cocostudio_Bone_updateColor(lua_State *L) +static int _olua_fun_cocostudio_Bone_updateColor(lua_State *L) { olua_startinvoke(L); @@ -7053,7 +7783,7 @@ static int _cocostudio_Bone_updateColor(lua_State *L) return 0; } -static int _cocostudio_Bone_updateZOrder(lua_State *L) +static int _olua_fun_cocostudio_Bone_updateZOrder(lua_State *L) { olua_startinvoke(L); @@ -7069,69 +7799,78 @@ static int _cocostudio_Bone_updateZOrder(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocostudio_Bone(lua_State *L) +static int _olua_cls_ccs_Bone(lua_State *L) { oluacls_class(L, "ccs.Bone"); - oluacls_func(L, "addChildBone", _cocostudio_Bone_addChildBone); - oluacls_func(L, "addDisplay", _cocostudio_Bone_addDisplay); - oluacls_func(L, "changeDisplayWithIndex", _cocostudio_Bone_changeDisplayWithIndex); - oluacls_func(L, "changeDisplayWithName", _cocostudio_Bone_changeDisplayWithName); - oluacls_func(L, "create", _cocostudio_Bone_create); - oluacls_func(L, "getArmature", _cocostudio_Bone_getArmature); - oluacls_func(L, "getBlendFunc", _cocostudio_Bone_getBlendFunc); - oluacls_func(L, "getBoneData", _cocostudio_Bone_getBoneData); - oluacls_func(L, "getChildArmature", _cocostudio_Bone_getChildArmature); - oluacls_func(L, "getColliderDetector", _cocostudio_Bone_getColliderDetector); - oluacls_func(L, "getDisplayManager", _cocostudio_Bone_getDisplayManager); - oluacls_func(L, "getDisplayRenderNode", _cocostudio_Bone_getDisplayRenderNode); - oluacls_func(L, "getDisplayRenderNodeType", _cocostudio_Bone_getDisplayRenderNodeType); - oluacls_func(L, "getNodeToArmatureTransform", _cocostudio_Bone_getNodeToArmatureTransform); - oluacls_func(L, "getParentBone", _cocostudio_Bone_getParentBone); - oluacls_func(L, "getTween", _cocostudio_Bone_getTween); - oluacls_func(L, "getTweenData", _cocostudio_Bone_getTweenData); - oluacls_func(L, "getWorldInfo", _cocostudio_Bone_getWorldInfo); - oluacls_func(L, "init", _cocostudio_Bone_init); - oluacls_func(L, "isBlendDirty", _cocostudio_Bone_isBlendDirty); - oluacls_func(L, "isIgnoreMovementBoneData", _cocostudio_Bone_isIgnoreMovementBoneData); - oluacls_func(L, "isTransformDirty", _cocostudio_Bone_isTransformDirty); - oluacls_func(L, "new", _cocostudio_Bone_new); - oluacls_func(L, "removeChildBone", _cocostudio_Bone_removeChildBone); - oluacls_func(L, "removeDisplay", _cocostudio_Bone_removeDisplay); - oluacls_func(L, "removeFromParent", _cocostudio_Bone_removeFromParent); - oluacls_func(L, "setArmature", _cocostudio_Bone_setArmature); - oluacls_func(L, "setBlendDirty", _cocostudio_Bone_setBlendDirty); - oluacls_func(L, "setBlendFunc", _cocostudio_Bone_setBlendFunc); - oluacls_func(L, "setBoneData", _cocostudio_Bone_setBoneData); - oluacls_func(L, "setChildArmature", _cocostudio_Bone_setChildArmature); - oluacls_func(L, "setIgnoreMovementBoneData", _cocostudio_Bone_setIgnoreMovementBoneData); - oluacls_func(L, "setLocalZOrder", _cocostudio_Bone_setLocalZOrder); - oluacls_func(L, "setParentBone", _cocostudio_Bone_setParentBone); - oluacls_func(L, "setTransformDirty", _cocostudio_Bone_setTransformDirty); - oluacls_func(L, "updateColor", _cocostudio_Bone_updateColor); - oluacls_func(L, "updateZOrder", _cocostudio_Bone_updateZOrder); - oluacls_prop(L, "armature", _cocostudio_Bone_getArmature, _cocostudio_Bone_setArmature); - oluacls_prop(L, "blendDirty", _cocostudio_Bone_isBlendDirty, _cocostudio_Bone_setBlendDirty); - oluacls_prop(L, "blendFunc", _cocostudio_Bone_getBlendFunc, _cocostudio_Bone_setBlendFunc); - oluacls_prop(L, "boneData", _cocostudio_Bone_getBoneData, _cocostudio_Bone_setBoneData); - oluacls_prop(L, "childArmature", _cocostudio_Bone_getChildArmature, _cocostudio_Bone_setChildArmature); - oluacls_prop(L, "colliderDetector", _cocostudio_Bone_getColliderDetector, nullptr); - oluacls_prop(L, "displayManager", _cocostudio_Bone_getDisplayManager, nullptr); - oluacls_prop(L, "displayRenderNode", _cocostudio_Bone_getDisplayRenderNode, nullptr); - oluacls_prop(L, "displayRenderNodeType", _cocostudio_Bone_getDisplayRenderNodeType, nullptr); - oluacls_prop(L, "ignoreMovementBoneData", _cocostudio_Bone_isIgnoreMovementBoneData, _cocostudio_Bone_setIgnoreMovementBoneData); - oluacls_prop(L, "nodeToArmatureTransform", _cocostudio_Bone_getNodeToArmatureTransform, nullptr); - oluacls_prop(L, "parentBone", _cocostudio_Bone_getParentBone, _cocostudio_Bone_setParentBone); - oluacls_prop(L, "transformDirty", _cocostudio_Bone_isTransformDirty, _cocostudio_Bone_setTransformDirty); - oluacls_prop(L, "tween", _cocostudio_Bone_getTween, nullptr); - oluacls_prop(L, "tweenData", _cocostudio_Bone_getTweenData, nullptr); - oluacls_prop(L, "worldInfo", _cocostudio_Bone_getWorldInfo, nullptr); + oluacls_func(L, "addChildBone", _olua_fun_cocostudio_Bone_addChildBone); + oluacls_func(L, "addDisplay", _olua_fun_cocostudio_Bone_addDisplay); + oluacls_func(L, "changeDisplayWithIndex", _olua_fun_cocostudio_Bone_changeDisplayWithIndex); + oluacls_func(L, "changeDisplayWithName", _olua_fun_cocostudio_Bone_changeDisplayWithName); + oluacls_func(L, "create", _olua_fun_cocostudio_Bone_create); + oluacls_func(L, "getArmature", _olua_fun_cocostudio_Bone_getArmature); + oluacls_func(L, "getBlendFunc", _olua_fun_cocostudio_Bone_getBlendFunc); + oluacls_func(L, "getBoneData", _olua_fun_cocostudio_Bone_getBoneData); + oluacls_func(L, "getChildArmature", _olua_fun_cocostudio_Bone_getChildArmature); + oluacls_func(L, "getColliderDetector", _olua_fun_cocostudio_Bone_getColliderDetector); + oluacls_func(L, "getDisplayManager", _olua_fun_cocostudio_Bone_getDisplayManager); + oluacls_func(L, "getDisplayRenderNode", _olua_fun_cocostudio_Bone_getDisplayRenderNode); + oluacls_func(L, "getDisplayRenderNodeType", _olua_fun_cocostudio_Bone_getDisplayRenderNodeType); + oluacls_func(L, "getNodeToArmatureTransform", _olua_fun_cocostudio_Bone_getNodeToArmatureTransform); + oluacls_func(L, "getParentBone", _olua_fun_cocostudio_Bone_getParentBone); + oluacls_func(L, "getTween", _olua_fun_cocostudio_Bone_getTween); + oluacls_func(L, "getTweenData", _olua_fun_cocostudio_Bone_getTweenData); + oluacls_func(L, "getWorldInfo", _olua_fun_cocostudio_Bone_getWorldInfo); + oluacls_func(L, "init", _olua_fun_cocostudio_Bone_init); + oluacls_func(L, "isBlendDirty", _olua_fun_cocostudio_Bone_isBlendDirty); + oluacls_func(L, "isIgnoreMovementBoneData", _olua_fun_cocostudio_Bone_isIgnoreMovementBoneData); + oluacls_func(L, "isTransformDirty", _olua_fun_cocostudio_Bone_isTransformDirty); + oluacls_func(L, "new", _olua_fun_cocostudio_Bone_new); + oluacls_func(L, "removeChildBone", _olua_fun_cocostudio_Bone_removeChildBone); + oluacls_func(L, "removeDisplay", _olua_fun_cocostudio_Bone_removeDisplay); + oluacls_func(L, "removeFromParent", _olua_fun_cocostudio_Bone_removeFromParent); + oluacls_func(L, "setArmature", _olua_fun_cocostudio_Bone_setArmature); + oluacls_func(L, "setBlendDirty", _olua_fun_cocostudio_Bone_setBlendDirty); + oluacls_func(L, "setBlendFunc", _olua_fun_cocostudio_Bone_setBlendFunc); + oluacls_func(L, "setBoneData", _olua_fun_cocostudio_Bone_setBoneData); + oluacls_func(L, "setChildArmature", _olua_fun_cocostudio_Bone_setChildArmature); + oluacls_func(L, "setIgnoreMovementBoneData", _olua_fun_cocostudio_Bone_setIgnoreMovementBoneData); + oluacls_func(L, "setLocalZOrder", _olua_fun_cocostudio_Bone_setLocalZOrder); + oluacls_func(L, "setParentBone", _olua_fun_cocostudio_Bone_setParentBone); + oluacls_func(L, "setTransformDirty", _olua_fun_cocostudio_Bone_setTransformDirty); + oluacls_func(L, "updateColor", _olua_fun_cocostudio_Bone_updateColor); + oluacls_func(L, "updateZOrder", _olua_fun_cocostudio_Bone_updateZOrder); + oluacls_prop(L, "armature", _olua_fun_cocostudio_Bone_getArmature, _olua_fun_cocostudio_Bone_setArmature); + oluacls_prop(L, "blendDirty", _olua_fun_cocostudio_Bone_isBlendDirty, _olua_fun_cocostudio_Bone_setBlendDirty); + oluacls_prop(L, "blendFunc", _olua_fun_cocostudio_Bone_getBlendFunc, _olua_fun_cocostudio_Bone_setBlendFunc); + oluacls_prop(L, "boneData", _olua_fun_cocostudio_Bone_getBoneData, _olua_fun_cocostudio_Bone_setBoneData); + oluacls_prop(L, "childArmature", _olua_fun_cocostudio_Bone_getChildArmature, _olua_fun_cocostudio_Bone_setChildArmature); + oluacls_prop(L, "colliderDetector", _olua_fun_cocostudio_Bone_getColliderDetector, nullptr); + oluacls_prop(L, "displayManager", _olua_fun_cocostudio_Bone_getDisplayManager, nullptr); + oluacls_prop(L, "displayRenderNode", _olua_fun_cocostudio_Bone_getDisplayRenderNode, nullptr); + oluacls_prop(L, "displayRenderNodeType", _olua_fun_cocostudio_Bone_getDisplayRenderNodeType, nullptr); + oluacls_prop(L, "ignoreMovementBoneData", _olua_fun_cocostudio_Bone_isIgnoreMovementBoneData, _olua_fun_cocostudio_Bone_setIgnoreMovementBoneData); + oluacls_prop(L, "nodeToArmatureTransform", _olua_fun_cocostudio_Bone_getNodeToArmatureTransform, nullptr); + oluacls_prop(L, "parentBone", _olua_fun_cocostudio_Bone_getParentBone, _olua_fun_cocostudio_Bone_setParentBone); + oluacls_prop(L, "transformDirty", _olua_fun_cocostudio_Bone_isTransformDirty, _olua_fun_cocostudio_Bone_setTransformDirty); + oluacls_prop(L, "tween", _olua_fun_cocostudio_Bone_getTween, nullptr); + oluacls_prop(L, "tweenData", _olua_fun_cocostudio_Bone_getTweenData, nullptr); + oluacls_prop(L, "worldInfo", _olua_fun_cocostudio_Bone_getWorldInfo, nullptr); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccs_Bone(lua_State *L) +{ + olua_require(L, "cocos2d_studio", luaopen_cocos2d_studio); + if (!olua_getclass(L, "ccs.Bone")) { + luaL_error(L, "class not found: cocostudio::Bone"); + } + return 1; +} OLUA_END_DECLS -static int _cocostudio_BoneData_addDisplayData(lua_State *L) +static int _olua_fun_cocostudio_BoneData_addDisplayData(lua_State *L) { olua_startinvoke(L); @@ -7149,70 +7888,76 @@ static int _cocostudio_BoneData_addDisplayData(lua_State *L) return 0; } -static int _cocostudio_BoneData_create(lua_State *L) +static int _olua_fun_cocostudio_BoneData_boneDataTransform$1(lua_State *L) { olua_startinvoke(L); - // static cocostudio::BoneData *create() - cocostudio::BoneData *ret = cocostudio::BoneData::create(); - int num_ret = olua_push_object(L, ret, "ccs.BoneData"); + cocostudio::BoneData *self = nullptr; + + olua_to_object(L, 1, &self, "ccs.BoneData"); + + // cocos2d::AffineTransform boneDataTransform + cocos2d::AffineTransform &ret = self->boneDataTransform; + int num_ret = olua_copy_object(L, ret, "cc.AffineTransform"); olua_endinvoke(L); return num_ret; } -static int _cocostudio_BoneData_getDisplayData(lua_State *L) +static int _olua_fun_cocostudio_BoneData_boneDataTransform$2(lua_State *L) { olua_startinvoke(L); cocostudio::BoneData *self = nullptr; - int arg1 = 0; /** index */ + cocos2d::AffineTransform *arg1; /** boneDataTransform */ olua_to_object(L, 1, &self, "ccs.BoneData"); - olua_check_integer(L, 2, &arg1); + olua_check_object(L, 2, &arg1, "cc.AffineTransform"); - // cocostudio::DisplayData *getDisplayData(int index) - cocostudio::DisplayData *ret = self->getDisplayData(arg1); - int num_ret = olua_push_object(L, ret, "ccs.DisplayData"); + // cocos2d::AffineTransform boneDataTransform + self->boneDataTransform = *arg1; olua_endinvoke(L); - return num_ret; + return 0; } -static int _cocostudio_BoneData_init(lua_State *L) +static int _olua_fun_cocostudio_BoneData_boneDataTransform(lua_State *L) { - olua_startinvoke(L); - - cocostudio::BoneData *self = nullptr; + int num_args = lua_gettop(L) - 1; - olua_to_object(L, 1, &self, "ccs.BoneData"); + if (num_args == 0) { + // cocos2d::AffineTransform boneDataTransform + return _olua_fun_cocostudio_BoneData_boneDataTransform$1(L); + } - // bool init() - bool ret = self->init(); - int num_ret = olua_push_bool(L, ret); + if (num_args == 1) { + // if ((olua_is_object(L, 2, "cc.AffineTransform"))) { + // cocos2d::AffineTransform boneDataTransform + return _olua_fun_cocostudio_BoneData_boneDataTransform$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'cocostudio::BoneData::boneDataTransform' not support '%d' arguments", num_args); - return num_ret; + return 0; } -static int _cocostudio_BoneData_new(lua_State *L) +static int _olua_fun_cocostudio_BoneData_create(lua_State *L) { olua_startinvoke(L); - // BoneData() - cocostudio::BoneData *ret = new cocostudio::BoneData(); + // static cocostudio::BoneData *create() + cocostudio::BoneData *ret = cocostudio::BoneData::create(); int num_ret = olua_push_object(L, ret, "ccs.BoneData"); - olua_postnew(L, ret); olua_endinvoke(L); return num_ret; } -static int _cocostudio_BoneData_get_boneDataTransform(lua_State *L) +static int _olua_fun_cocostudio_BoneData_displayDataList$1(lua_State *L) { olua_startinvoke(L); @@ -7220,73 +7965,95 @@ static int _cocostudio_BoneData_get_boneDataTransform(lua_State *L) olua_to_object(L, 1, &self, "ccs.BoneData"); - // cocos2d::AffineTransform boneDataTransform - cocos2d::AffineTransform &ret = self->boneDataTransform; - int num_ret = olua_pushcopy_object(L, ret, "cc.AffineTransform"); + // cocos2d::Vector displayDataList + cocos2d::Vector &ret = self->displayDataList; + int num_ret = olua_push_array(L, ret, [L](cocostudio::DisplayData *arg1) { + olua_push_object(L, arg1, "ccs.DisplayData"); + }); olua_endinvoke(L); return num_ret; } -static int _cocostudio_BoneData_set_boneDataTransform(lua_State *L) +static int _olua_fun_cocostudio_BoneData_displayDataList$2(lua_State *L) { olua_startinvoke(L); cocostudio::BoneData *self = nullptr; - cocos2d::AffineTransform arg1; /** boneDataTransform */ + cocos2d::Vector arg1; /** displayDataList */ olua_to_object(L, 1, &self, "ccs.BoneData"); - olua_check_object(L, 2, &arg1, "cc.AffineTransform"); + olua_check_array(L, 2, arg1, [L](cocostudio::DisplayData **arg1) { + olua_check_object(L, -1, arg1, "ccs.DisplayData"); + }); - // cocos2d::AffineTransform boneDataTransform - self->boneDataTransform = arg1; + // cocos2d::Vector displayDataList + self->displayDataList = arg1; olua_endinvoke(L); return 0; } -static int _cocostudio_BoneData_get_displayDataList(lua_State *L) +static int _olua_fun_cocostudio_BoneData_displayDataList(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // cocos2d::Vector displayDataList + return _olua_fun_cocostudio_BoneData_displayDataList$1(L); + } + + if (num_args == 1) { + // if ((olua_is_array(L, 2))) { + // cocos2d::Vector displayDataList + return _olua_fun_cocostudio_BoneData_displayDataList$2(L); + // } + } + + luaL_error(L, "method 'cocostudio::BoneData::displayDataList' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocostudio_BoneData_getDisplayData(lua_State *L) { olua_startinvoke(L); cocostudio::BoneData *self = nullptr; + int arg1 = 0; /** index */ olua_to_object(L, 1, &self, "ccs.BoneData"); + olua_check_integer(L, 2, &arg1); - // cocos2d::Vector displayDataList - cocos2d::Vector &ret = self->displayDataList; - int num_ret = olua_push_array(L, ret, [L](cocostudio::DisplayData *arg1) { - olua_push_object(L, arg1, "ccs.DisplayData"); - }); + // cocostudio::DisplayData *getDisplayData(int index) + cocostudio::DisplayData *ret = self->getDisplayData(arg1); + int num_ret = olua_push_object(L, ret, "ccs.DisplayData"); olua_endinvoke(L); return num_ret; } -static int _cocostudio_BoneData_set_displayDataList(lua_State *L) +static int _olua_fun_cocostudio_BoneData_init(lua_State *L) { olua_startinvoke(L); cocostudio::BoneData *self = nullptr; - cocos2d::Vector arg1; /** displayDataList */ olua_to_object(L, 1, &self, "ccs.BoneData"); - olua_check_array(L, 2, arg1, [L](cocostudio::DisplayData **arg1) { - olua_check_object(L, -1, arg1, "ccs.DisplayData"); - }); - // cocos2d::Vector displayDataList - self->displayDataList = arg1; + // bool init() + bool ret = self->init(); + int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); - return 0; + return num_ret; } -static int _cocostudio_BoneData_get_name(lua_State *L) +static int _olua_fun_cocostudio_BoneData_name$1(lua_State *L) { olua_startinvoke(L); @@ -7303,7 +8070,7 @@ static int _cocostudio_BoneData_get_name(lua_State *L) return num_ret; } -static int _cocostudio_BoneData_set_name(lua_State *L) +static int _olua_fun_cocostudio_BoneData_name$2(lua_State *L) { olua_startinvoke(L); @@ -7321,7 +8088,42 @@ static int _cocostudio_BoneData_set_name(lua_State *L) return 0; } -static int _cocostudio_BoneData_get_parentName(lua_State *L) +static int _olua_fun_cocostudio_BoneData_name(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // std::string name + return _olua_fun_cocostudio_BoneData_name$1(L); + } + + if (num_args == 1) { + // if ((olua_is_string(L, 2))) { + // std::string name + return _olua_fun_cocostudio_BoneData_name$2(L); + // } + } + + luaL_error(L, "method 'cocostudio::BoneData::name' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocostudio_BoneData_new(lua_State *L) +{ + olua_startinvoke(L); + + // cocostudio::BoneData() + cocostudio::BoneData *ret = new cocostudio::BoneData(); + int num_ret = olua_push_object(L, ret, "ccs.BoneData"); + olua_postnew(L, ret); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_cocostudio_BoneData_parentName$1(lua_State *L) { olua_startinvoke(L); @@ -7338,7 +8140,7 @@ static int _cocostudio_BoneData_get_parentName(lua_State *L) return num_ret; } -static int _cocostudio_BoneData_set_parentName(lua_State *L) +static int _olua_fun_cocostudio_BoneData_parentName$2(lua_State *L) { olua_startinvoke(L); @@ -7356,25 +8158,55 @@ static int _cocostudio_BoneData_set_parentName(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocostudio_BoneData(lua_State *L) +static int _olua_fun_cocostudio_BoneData_parentName(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // std::string parentName + return _olua_fun_cocostudio_BoneData_parentName$1(L); + } + + if (num_args == 1) { + // if ((olua_is_string(L, 2))) { + // std::string parentName + return _olua_fun_cocostudio_BoneData_parentName$2(L); + // } + } + + luaL_error(L, "method 'cocostudio::BoneData::parentName' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_cls_ccs_BoneData(lua_State *L) { oluacls_class(L, "ccs.BoneData"); - oluacls_func(L, "addDisplayData", _cocostudio_BoneData_addDisplayData); - oluacls_func(L, "create", _cocostudio_BoneData_create); - oluacls_func(L, "getDisplayData", _cocostudio_BoneData_getDisplayData); - oluacls_func(L, "init", _cocostudio_BoneData_init); - oluacls_func(L, "new", _cocostudio_BoneData_new); - oluacls_prop(L, "boneDataTransform", _cocostudio_BoneData_get_boneDataTransform, _cocostudio_BoneData_set_boneDataTransform); - oluacls_prop(L, "displayDataList", _cocostudio_BoneData_get_displayDataList, _cocostudio_BoneData_set_displayDataList); - oluacls_prop(L, "name", _cocostudio_BoneData_get_name, _cocostudio_BoneData_set_name); - oluacls_prop(L, "parentName", _cocostudio_BoneData_get_parentName, _cocostudio_BoneData_set_parentName); + oluacls_func(L, "addDisplayData", _olua_fun_cocostudio_BoneData_addDisplayData); + oluacls_func(L, "create", _olua_fun_cocostudio_BoneData_create); + oluacls_func(L, "getDisplayData", _olua_fun_cocostudio_BoneData_getDisplayData); + oluacls_func(L, "init", _olua_fun_cocostudio_BoneData_init); + oluacls_func(L, "new", _olua_fun_cocostudio_BoneData_new); + oluacls_prop(L, "boneDataTransform", _olua_fun_cocostudio_BoneData_boneDataTransform, _olua_fun_cocostudio_BoneData_boneDataTransform); + oluacls_prop(L, "displayDataList", _olua_fun_cocostudio_BoneData_displayDataList, _olua_fun_cocostudio_BoneData_displayDataList); + oluacls_prop(L, "name", _olua_fun_cocostudio_BoneData_name, _olua_fun_cocostudio_BoneData_name); + oluacls_prop(L, "parentName", _olua_fun_cocostudio_BoneData_parentName, _olua_fun_cocostudio_BoneData_parentName); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccs_BoneData(lua_State *L) +{ + olua_require(L, "cocos2d_studio", luaopen_cocos2d_studio); + if (!olua_getclass(L, "ccs.BoneData")) { + luaL_error(L, "class not found: cocostudio::BoneData"); + } return 1; } OLUA_END_DECLS -static int _cocostudio_CocoLoader___gc(lua_State *L) +static int _olua_fun_cocostudio_CocoLoader___gc(lua_State *L) { olua_startinvoke(L); @@ -7386,7 +8218,7 @@ static int _cocostudio_CocoLoader___gc(lua_State *L) return 0; } -static int _cocostudio_CocoLoader___olua_move(lua_State *L) +static int _olua_fun_cocostudio_CocoLoader___olua_move(lua_State *L) { olua_startinvoke(L); @@ -7398,18 +8230,27 @@ static int _cocostudio_CocoLoader___olua_move(lua_State *L) return 1; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocostudio_CocoLoader(lua_State *L) +static int _olua_cls_ccs_CocoLoader(lua_State *L) { oluacls_class(L, "ccs.CocoLoader"); - oluacls_func(L, "__gc", _cocostudio_CocoLoader___gc); - oluacls_func(L, "__olua_move", _cocostudio_CocoLoader___olua_move); + oluacls_func(L, "__gc", _olua_fun_cocostudio_CocoLoader___gc); + oluacls_func(L, "__olua_move", _olua_fun_cocostudio_CocoLoader___olua_move); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccs_CocoLoader(lua_State *L) +{ + olua_require(L, "cocos2d_studio", luaopen_cocos2d_studio); + if (!olua_getclass(L, "ccs.CocoLoader")) { + luaL_error(L, "class not found: cocostudio::CocoLoader"); + } return 1; } OLUA_END_DECLS -static int _cocostudio_ColliderBody_getCalculatedVertexList(lua_State *L) +static int _olua_fun_cocostudio_ColliderBody_getCalculatedVertexList(lua_State *L) { olua_startinvoke(L); @@ -7420,7 +8261,7 @@ static int _cocostudio_ColliderBody_getCalculatedVertexList(lua_State *L) // const std::vector &getCalculatedVertexList() const std::vector &ret = self->getCalculatedVertexList(); int num_ret = olua_push_array(L, ret, [L](cocos2d::Vec2 &arg1) { - olua_pushcopy_object(L, arg1, "cc.Vec2"); + olua_copy_object(L, arg1, "cc.Vec2"); }); olua_endinvoke(L); @@ -7428,7 +8269,7 @@ static int _cocostudio_ColliderBody_getCalculatedVertexList(lua_State *L) return num_ret; } -static int _cocostudio_ColliderBody_getContourData(lua_State *L) +static int _olua_fun_cocostudio_ColliderBody_getContourData(lua_State *L) { olua_startinvoke(L); @@ -7445,7 +8286,7 @@ static int _cocostudio_ColliderBody_getContourData(lua_State *L) return num_ret; } -static int _cocostudio_ColliderBody_new(lua_State *L) +static int _olua_fun_cocostudio_ColliderBody_new(lua_State *L) { olua_startinvoke(L); @@ -7453,7 +8294,7 @@ static int _cocostudio_ColliderBody_new(lua_State *L) olua_check_object(L, 1, &arg1, "ccs.ContourData"); - // ColliderBody(cocostudio::ContourData *contourData) + // cocostudio::ColliderBody(cocostudio::ContourData *contourData) cocostudio::ColliderBody *ret = new cocostudio::ColliderBody(arg1); int num_ret = olua_push_object(L, ret, "ccs.ColliderBody"); olua_postnew(L, ret); @@ -7463,21 +8304,30 @@ static int _cocostudio_ColliderBody_new(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocostudio_ColliderBody(lua_State *L) +static int _olua_cls_ccs_ColliderBody(lua_State *L) { oluacls_class(L, "ccs.ColliderBody"); - oluacls_func(L, "getCalculatedVertexList", _cocostudio_ColliderBody_getCalculatedVertexList); - oluacls_func(L, "getContourData", _cocostudio_ColliderBody_getContourData); - oluacls_func(L, "new", _cocostudio_ColliderBody_new); - oluacls_prop(L, "calculatedVertexList", _cocostudio_ColliderBody_getCalculatedVertexList, nullptr); - oluacls_prop(L, "contourData", _cocostudio_ColliderBody_getContourData, nullptr); + oluacls_func(L, "getCalculatedVertexList", _olua_fun_cocostudio_ColliderBody_getCalculatedVertexList); + oluacls_func(L, "getContourData", _olua_fun_cocostudio_ColliderBody_getContourData); + oluacls_func(L, "new", _olua_fun_cocostudio_ColliderBody_new); + oluacls_prop(L, "calculatedVertexList", _olua_fun_cocostudio_ColliderBody_getCalculatedVertexList, nullptr); + oluacls_prop(L, "contourData", _olua_fun_cocostudio_ColliderBody_getContourData, nullptr); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccs_ColliderBody(lua_State *L) +{ + olua_require(L, "cocos2d_studio", luaopen_cocos2d_studio); + if (!olua_getclass(L, "ccs.ColliderBody")) { + luaL_error(L, "class not found: cocostudio::ColliderBody"); + } + return 1; +} OLUA_END_DECLS -static int _cocostudio_ColliderDetector_addContourData(lua_State *L) +static int _olua_fun_cocostudio_ColliderDetector_addContourData(lua_State *L) { olua_startinvoke(L); @@ -7495,7 +8345,7 @@ static int _cocostudio_ColliderDetector_addContourData(lua_State *L) return 0; } -static int _cocostudio_ColliderDetector_addContourDataList(lua_State *L) +static int _olua_fun_cocostudio_ColliderDetector_addContourDataList(lua_State *L) { olua_startinvoke(L); @@ -7515,7 +8365,7 @@ static int _cocostudio_ColliderDetector_addContourDataList(lua_State *L) return 0; } -static int _cocostudio_ColliderDetector_create$1(lua_State *L) +static int _olua_fun_cocostudio_ColliderDetector_create$1(lua_State *L) { olua_startinvoke(L); @@ -7528,7 +8378,7 @@ static int _cocostudio_ColliderDetector_create$1(lua_State *L) return num_ret; } -static int _cocostudio_ColliderDetector_create$2(lua_State *L) +static int _olua_fun_cocostudio_ColliderDetector_create$2(lua_State *L) { olua_startinvoke(L); @@ -7545,19 +8395,19 @@ static int _cocostudio_ColliderDetector_create$2(lua_State *L) return num_ret; } -static int _cocostudio_ColliderDetector_create(lua_State *L) +static int _olua_fun_cocostudio_ColliderDetector_create(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 0) { // static cocostudio::ColliderDetector *create() - return _cocostudio_ColliderDetector_create$1(L); + return _olua_fun_cocostudio_ColliderDetector_create$1(L); } if (num_args == 1) { // if ((olua_is_object(L, 1, "ccs.Bone"))) { // static cocostudio::ColliderDetector *create(cocostudio::Bone *bone) - return _cocostudio_ColliderDetector_create$2(L); + return _olua_fun_cocostudio_ColliderDetector_create$2(L); // } } @@ -7566,7 +8416,7 @@ static int _cocostudio_ColliderDetector_create(lua_State *L) return 0; } -static int _cocostudio_ColliderDetector_getActive(lua_State *L) +static int _olua_fun_cocostudio_ColliderDetector_getActive(lua_State *L) { olua_startinvoke(L); @@ -7583,7 +8433,7 @@ static int _cocostudio_ColliderDetector_getActive(lua_State *L) return num_ret; } -static int _cocostudio_ColliderDetector_getBone(lua_State *L) +static int _olua_fun_cocostudio_ColliderDetector_getBone(lua_State *L) { olua_startinvoke(L); @@ -7600,7 +8450,7 @@ static int _cocostudio_ColliderDetector_getBone(lua_State *L) return num_ret; } -static int _cocostudio_ColliderDetector_getColliderBodyList(lua_State *L) +static int _olua_fun_cocostudio_ColliderDetector_getColliderBodyList(lua_State *L) { olua_startinvoke(L); @@ -7619,7 +8469,7 @@ static int _cocostudio_ColliderDetector_getColliderBodyList(lua_State *L) return num_ret; } -static int _cocostudio_ColliderDetector_init$1(lua_State *L) +static int _olua_fun_cocostudio_ColliderDetector_init$1(lua_State *L) { olua_startinvoke(L); @@ -7636,7 +8486,7 @@ static int _cocostudio_ColliderDetector_init$1(lua_State *L) return num_ret; } -static int _cocostudio_ColliderDetector_init$2(lua_State *L) +static int _olua_fun_cocostudio_ColliderDetector_init$2(lua_State *L) { olua_startinvoke(L); @@ -7655,19 +8505,19 @@ static int _cocostudio_ColliderDetector_init$2(lua_State *L) return num_ret; } -static int _cocostudio_ColliderDetector_init(lua_State *L) +static int _olua_fun_cocostudio_ColliderDetector_init(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 0) { // bool init() - return _cocostudio_ColliderDetector_init$1(L); + return _olua_fun_cocostudio_ColliderDetector_init$1(L); } if (num_args == 1) { // if ((olua_is_object(L, 2, "ccs.Bone"))) { // bool init(cocostudio::Bone *bone) - return _cocostudio_ColliderDetector_init$2(L); + return _olua_fun_cocostudio_ColliderDetector_init$2(L); // } } @@ -7676,11 +8526,11 @@ static int _cocostudio_ColliderDetector_init(lua_State *L) return 0; } -static int _cocostudio_ColliderDetector_new(lua_State *L) +static int _olua_fun_cocostudio_ColliderDetector_new(lua_State *L) { olua_startinvoke(L); - // ColliderDetector() + // cocostudio::ColliderDetector() cocostudio::ColliderDetector *ret = new cocostudio::ColliderDetector(); int num_ret = olua_push_object(L, ret, "ccs.ColliderDetector"); olua_postnew(L, ret); @@ -7690,7 +8540,7 @@ static int _cocostudio_ColliderDetector_new(lua_State *L) return num_ret; } -static int _cocostudio_ColliderDetector_removeAll(lua_State *L) +static int _olua_fun_cocostudio_ColliderDetector_removeAll(lua_State *L) { olua_startinvoke(L); @@ -7706,7 +8556,7 @@ static int _cocostudio_ColliderDetector_removeAll(lua_State *L) return 0; } -static int _cocostudio_ColliderDetector_removeContourData(lua_State *L) +static int _olua_fun_cocostudio_ColliderDetector_removeContourData(lua_State *L) { olua_startinvoke(L); @@ -7724,7 +8574,7 @@ static int _cocostudio_ColliderDetector_removeContourData(lua_State *L) return 0; } -static int _cocostudio_ColliderDetector_setActive(lua_State *L) +static int _olua_fun_cocostudio_ColliderDetector_setActive(lua_State *L) { olua_startinvoke(L); @@ -7742,7 +8592,7 @@ static int _cocostudio_ColliderDetector_setActive(lua_State *L) return 0; } -static int _cocostudio_ColliderDetector_setBone(lua_State *L) +static int _olua_fun_cocostudio_ColliderDetector_setBone(lua_State *L) { olua_startinvoke(L); @@ -7760,7 +8610,7 @@ static int _cocostudio_ColliderDetector_setBone(lua_State *L) return 0; } -static int _cocostudio_ColliderDetector_updateTransform(lua_State *L) +static int _olua_fun_cocostudio_ColliderDetector_updateTransform(lua_State *L) { olua_startinvoke(L); @@ -7778,32 +8628,41 @@ static int _cocostudio_ColliderDetector_updateTransform(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocostudio_ColliderDetector(lua_State *L) +static int _olua_cls_ccs_ColliderDetector(lua_State *L) { oluacls_class(L, "ccs.ColliderDetector"); - oluacls_func(L, "addContourData", _cocostudio_ColliderDetector_addContourData); - oluacls_func(L, "addContourDataList", _cocostudio_ColliderDetector_addContourDataList); - oluacls_func(L, "create", _cocostudio_ColliderDetector_create); - oluacls_func(L, "getActive", _cocostudio_ColliderDetector_getActive); - oluacls_func(L, "getBone", _cocostudio_ColliderDetector_getBone); - oluacls_func(L, "getColliderBodyList", _cocostudio_ColliderDetector_getColliderBodyList); - oluacls_func(L, "init", _cocostudio_ColliderDetector_init); - oluacls_func(L, "new", _cocostudio_ColliderDetector_new); - oluacls_func(L, "removeAll", _cocostudio_ColliderDetector_removeAll); - oluacls_func(L, "removeContourData", _cocostudio_ColliderDetector_removeContourData); - oluacls_func(L, "setActive", _cocostudio_ColliderDetector_setActive); - oluacls_func(L, "setBone", _cocostudio_ColliderDetector_setBone); - oluacls_func(L, "updateTransform", _cocostudio_ColliderDetector_updateTransform); - oluacls_prop(L, "active", _cocostudio_ColliderDetector_getActive, _cocostudio_ColliderDetector_setActive); - oluacls_prop(L, "bone", _cocostudio_ColliderDetector_getBone, _cocostudio_ColliderDetector_setBone); - oluacls_prop(L, "colliderBodyList", _cocostudio_ColliderDetector_getColliderBodyList, nullptr); + oluacls_func(L, "addContourData", _olua_fun_cocostudio_ColliderDetector_addContourData); + oluacls_func(L, "addContourDataList", _olua_fun_cocostudio_ColliderDetector_addContourDataList); + oluacls_func(L, "create", _olua_fun_cocostudio_ColliderDetector_create); + oluacls_func(L, "getActive", _olua_fun_cocostudio_ColliderDetector_getActive); + oluacls_func(L, "getBone", _olua_fun_cocostudio_ColliderDetector_getBone); + oluacls_func(L, "getColliderBodyList", _olua_fun_cocostudio_ColliderDetector_getColliderBodyList); + oluacls_func(L, "init", _olua_fun_cocostudio_ColliderDetector_init); + oluacls_func(L, "new", _olua_fun_cocostudio_ColliderDetector_new); + oluacls_func(L, "removeAll", _olua_fun_cocostudio_ColliderDetector_removeAll); + oluacls_func(L, "removeContourData", _olua_fun_cocostudio_ColliderDetector_removeContourData); + oluacls_func(L, "setActive", _olua_fun_cocostudio_ColliderDetector_setActive); + oluacls_func(L, "setBone", _olua_fun_cocostudio_ColliderDetector_setBone); + oluacls_func(L, "updateTransform", _olua_fun_cocostudio_ColliderDetector_updateTransform); + oluacls_prop(L, "active", _olua_fun_cocostudio_ColliderDetector_getActive, _olua_fun_cocostudio_ColliderDetector_setActive); + oluacls_prop(L, "bone", _olua_fun_cocostudio_ColliderDetector_getBone, _olua_fun_cocostudio_ColliderDetector_setBone); + oluacls_prop(L, "colliderBodyList", _olua_fun_cocostudio_ColliderDetector_getColliderBodyList, nullptr); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccs_ColliderDetector(lua_State *L) +{ + olua_require(L, "cocos2d_studio", luaopen_cocos2d_studio); + if (!olua_getclass(L, "ccs.ColliderDetector")) { + luaL_error(L, "class not found: cocostudio::ColliderDetector"); + } return 1; } OLUA_END_DECLS -static int _cocostudio_ColliderFilter___gc(lua_State *L) +static int _olua_fun_cocostudio_ColliderFilter___gc(lua_State *L) { olua_startinvoke(L); @@ -7815,7 +8674,7 @@ static int _cocostudio_ColliderFilter___gc(lua_State *L) return 0; } -static int _cocostudio_ColliderFilter___olua_move(lua_State *L) +static int _olua_fun_cocostudio_ColliderFilter___olua_move(lua_State *L) { olua_startinvoke(L); @@ -7827,18 +8686,27 @@ static int _cocostudio_ColliderFilter___olua_move(lua_State *L) return 1; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocostudio_ColliderFilter(lua_State *L) +static int _olua_cls_ccs_ColliderFilter(lua_State *L) { oluacls_class(L, "ccs.ColliderFilter"); - oluacls_func(L, "__gc", _cocostudio_ColliderFilter___gc); - oluacls_func(L, "__olua_move", _cocostudio_ColliderFilter___olua_move); + oluacls_func(L, "__gc", _olua_fun_cocostudio_ColliderFilter___gc); + oluacls_func(L, "__olua_move", _olua_fun_cocostudio_ColliderFilter___olua_move); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccs_ColliderFilter(lua_State *L) +{ + olua_require(L, "cocos2d_studio", luaopen_cocos2d_studio); + if (!olua_getclass(L, "ccs.ColliderFilter")) { + luaL_error(L, "class not found: cocostudio::ColliderFilter"); + } return 1; } OLUA_END_DECLS -static int _cocostudio_ComAttribute_create(lua_State *L) +static int _olua_fun_cocostudio_ComAttribute_create(lua_State *L) { olua_startinvoke(L); @@ -7851,7 +8719,7 @@ static int _cocostudio_ComAttribute_create(lua_State *L) return num_ret; } -static int _cocostudio_ComAttribute_createInstance(lua_State *L) +static int _olua_fun_cocostudio_ComAttribute_createInstance(lua_State *L) { olua_startinvoke(L); @@ -7864,7 +8732,7 @@ static int _cocostudio_ComAttribute_createInstance(lua_State *L) return num_ret; } -static int _cocostudio_ComAttribute_getBool$1(lua_State *L) +static int _olua_fun_cocostudio_ComAttribute_getBool$1(lua_State *L) { olua_startinvoke(L); @@ -7885,7 +8753,7 @@ static int _cocostudio_ComAttribute_getBool$1(lua_State *L) return num_ret; } -static int _cocostudio_ComAttribute_getBool$2(lua_State *L) +static int _olua_fun_cocostudio_ComAttribute_getBool$2(lua_State *L) { olua_startinvoke(L); @@ -7895,7 +8763,7 @@ static int _cocostudio_ComAttribute_getBool$2(lua_State *L) olua_to_object(L, 1, &self, "ccs.ComAttribute"); olua_check_string(L, 2, &arg1); - // bool getBool(const std::string &key, @optional bool def) + // bool getBool(const std::string &key) bool ret = self->getBool(arg1); int num_ret = olua_push_bool(L, ret); @@ -7904,21 +8772,21 @@ static int _cocostudio_ComAttribute_getBool$2(lua_State *L) return num_ret; } -static int _cocostudio_ComAttribute_getBool(lua_State *L) +static int _olua_fun_cocostudio_ComAttribute_getBool(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_string(L, 2))) { - // bool getBool(const std::string &key, @optional bool def) - return _cocostudio_ComAttribute_getBool$2(L); + // bool getBool(const std::string &key) + return _olua_fun_cocostudio_ComAttribute_getBool$2(L); // } } if (num_args == 2) { // if ((olua_is_string(L, 2)) && (olua_is_bool(L, 3))) { // bool getBool(const std::string &key, @optional bool def) - return _cocostudio_ComAttribute_getBool$1(L); + return _olua_fun_cocostudio_ComAttribute_getBool$1(L); // } } @@ -7927,7 +8795,7 @@ static int _cocostudio_ComAttribute_getBool(lua_State *L) return 0; } -static int _cocostudio_ComAttribute_getFloat$1(lua_State *L) +static int _olua_fun_cocostudio_ComAttribute_getFloat$1(lua_State *L) { olua_startinvoke(L); @@ -7948,7 +8816,7 @@ static int _cocostudio_ComAttribute_getFloat$1(lua_State *L) return num_ret; } -static int _cocostudio_ComAttribute_getFloat$2(lua_State *L) +static int _olua_fun_cocostudio_ComAttribute_getFloat$2(lua_State *L) { olua_startinvoke(L); @@ -7958,7 +8826,7 @@ static int _cocostudio_ComAttribute_getFloat$2(lua_State *L) olua_to_object(L, 1, &self, "ccs.ComAttribute"); olua_check_string(L, 2, &arg1); - // float getFloat(const std::string &key, @optional float def) + // float getFloat(const std::string &key) float ret = self->getFloat(arg1); int num_ret = olua_push_number(L, ret); @@ -7967,21 +8835,21 @@ static int _cocostudio_ComAttribute_getFloat$2(lua_State *L) return num_ret; } -static int _cocostudio_ComAttribute_getFloat(lua_State *L) +static int _olua_fun_cocostudio_ComAttribute_getFloat(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_string(L, 2))) { - // float getFloat(const std::string &key, @optional float def) - return _cocostudio_ComAttribute_getFloat$2(L); + // float getFloat(const std::string &key) + return _olua_fun_cocostudio_ComAttribute_getFloat$2(L); // } } if (num_args == 2) { // if ((olua_is_string(L, 2)) && (olua_is_number(L, 3))) { // float getFloat(const std::string &key, @optional float def) - return _cocostudio_ComAttribute_getFloat$1(L); + return _olua_fun_cocostudio_ComAttribute_getFloat$1(L); // } } @@ -7990,7 +8858,7 @@ static int _cocostudio_ComAttribute_getFloat(lua_State *L) return 0; } -static int _cocostudio_ComAttribute_getInt$1(lua_State *L) +static int _olua_fun_cocostudio_ComAttribute_getInt$1(lua_State *L) { olua_startinvoke(L); @@ -8011,7 +8879,7 @@ static int _cocostudio_ComAttribute_getInt$1(lua_State *L) return num_ret; } -static int _cocostudio_ComAttribute_getInt$2(lua_State *L) +static int _olua_fun_cocostudio_ComAttribute_getInt$2(lua_State *L) { olua_startinvoke(L); @@ -8021,7 +8889,7 @@ static int _cocostudio_ComAttribute_getInt$2(lua_State *L) olua_to_object(L, 1, &self, "ccs.ComAttribute"); olua_check_string(L, 2, &arg1); - // int getInt(const std::string &key, @optional int def) + // int getInt(const std::string &key) int ret = self->getInt(arg1); int num_ret = olua_push_integer(L, ret); @@ -8030,21 +8898,21 @@ static int _cocostudio_ComAttribute_getInt$2(lua_State *L) return num_ret; } -static int _cocostudio_ComAttribute_getInt(lua_State *L) +static int _olua_fun_cocostudio_ComAttribute_getInt(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_string(L, 2))) { - // int getInt(const std::string &key, @optional int def) - return _cocostudio_ComAttribute_getInt$2(L); + // int getInt(const std::string &key) + return _olua_fun_cocostudio_ComAttribute_getInt$2(L); // } } if (num_args == 2) { // if ((olua_is_string(L, 2)) && (olua_is_integer(L, 3))) { // int getInt(const std::string &key, @optional int def) - return _cocostudio_ComAttribute_getInt$1(L); + return _olua_fun_cocostudio_ComAttribute_getInt$1(L); // } } @@ -8053,7 +8921,7 @@ static int _cocostudio_ComAttribute_getInt(lua_State *L) return 0; } -static int _cocostudio_ComAttribute_getString$1(lua_State *L) +static int _olua_fun_cocostudio_ComAttribute_getString$1(lua_State *L) { olua_startinvoke(L); @@ -8074,7 +8942,7 @@ static int _cocostudio_ComAttribute_getString$1(lua_State *L) return num_ret; } -static int _cocostudio_ComAttribute_getString$2(lua_State *L) +static int _olua_fun_cocostudio_ComAttribute_getString$2(lua_State *L) { olua_startinvoke(L); @@ -8084,7 +8952,7 @@ static int _cocostudio_ComAttribute_getString$2(lua_State *L) olua_to_object(L, 1, &self, "ccs.ComAttribute"); olua_check_string(L, 2, &arg1); - // std::string getString(const std::string &key, @optional const std::string &def) + // std::string getString(const std::string &key) std::string ret = self->getString(arg1); int num_ret = olua_push_string(L, ret); @@ -8093,21 +8961,21 @@ static int _cocostudio_ComAttribute_getString$2(lua_State *L) return num_ret; } -static int _cocostudio_ComAttribute_getString(lua_State *L) +static int _olua_fun_cocostudio_ComAttribute_getString(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_string(L, 2))) { - // std::string getString(const std::string &key, @optional const std::string &def) - return _cocostudio_ComAttribute_getString$2(L); + // std::string getString(const std::string &key) + return _olua_fun_cocostudio_ComAttribute_getString$2(L); // } } if (num_args == 2) { // if ((olua_is_string(L, 2)) && (olua_is_string(L, 3))) { // std::string getString(const std::string &key, @optional const std::string &def) - return _cocostudio_ComAttribute_getString$1(L); + return _olua_fun_cocostudio_ComAttribute_getString$1(L); // } } @@ -8116,11 +8984,11 @@ static int _cocostudio_ComAttribute_getString(lua_State *L) return 0; } -static int _cocostudio_ComAttribute_new(lua_State *L) +static int _olua_fun_cocostudio_ComAttribute_new(lua_State *L) { olua_startinvoke(L); - // ComAttribute() + // cocostudio::ComAttribute() cocostudio::ComAttribute *ret = new cocostudio::ComAttribute(); int num_ret = olua_push_object(L, ret, "ccs.ComAttribute"); olua_postnew(L, ret); @@ -8130,7 +8998,7 @@ static int _cocostudio_ComAttribute_new(lua_State *L) return num_ret; } -static int _cocostudio_ComAttribute_parse(lua_State *L) +static int _olua_fun_cocostudio_ComAttribute_parse(lua_State *L) { olua_startinvoke(L); @@ -8149,7 +9017,7 @@ static int _cocostudio_ComAttribute_parse(lua_State *L) return num_ret; } -static int _cocostudio_ComAttribute_setBool(lua_State *L) +static int _olua_fun_cocostudio_ComAttribute_setBool(lua_State *L) { olua_startinvoke(L); @@ -8169,7 +9037,7 @@ static int _cocostudio_ComAttribute_setBool(lua_State *L) return 0; } -static int _cocostudio_ComAttribute_setFloat(lua_State *L) +static int _olua_fun_cocostudio_ComAttribute_setFloat(lua_State *L) { olua_startinvoke(L); @@ -8189,7 +9057,7 @@ static int _cocostudio_ComAttribute_setFloat(lua_State *L) return 0; } -static int _cocostudio_ComAttribute_setInt(lua_State *L) +static int _olua_fun_cocostudio_ComAttribute_setInt(lua_State *L) { olua_startinvoke(L); @@ -8209,7 +9077,7 @@ static int _cocostudio_ComAttribute_setInt(lua_State *L) return 0; } -static int _cocostudio_ComAttribute_setString(lua_State *L) +static int _olua_fun_cocostudio_ComAttribute_setString(lua_State *L) { olua_startinvoke(L); @@ -8229,29 +9097,38 @@ static int _cocostudio_ComAttribute_setString(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocostudio_ComAttribute(lua_State *L) +static int _olua_cls_ccs_ComAttribute(lua_State *L) { oluacls_class(L, "ccs.ComAttribute"); - oluacls_func(L, "create", _cocostudio_ComAttribute_create); - oluacls_func(L, "createInstance", _cocostudio_ComAttribute_createInstance); - oluacls_func(L, "getBool", _cocostudio_ComAttribute_getBool); - oluacls_func(L, "getFloat", _cocostudio_ComAttribute_getFloat); - oluacls_func(L, "getInt", _cocostudio_ComAttribute_getInt); - oluacls_func(L, "getString", _cocostudio_ComAttribute_getString); - oluacls_func(L, "new", _cocostudio_ComAttribute_new); - oluacls_func(L, "parse", _cocostudio_ComAttribute_parse); - oluacls_func(L, "setBool", _cocostudio_ComAttribute_setBool); - oluacls_func(L, "setFloat", _cocostudio_ComAttribute_setFloat); - oluacls_func(L, "setInt", _cocostudio_ComAttribute_setInt); - oluacls_func(L, "setString", _cocostudio_ComAttribute_setString); + oluacls_func(L, "create", _olua_fun_cocostudio_ComAttribute_create); + oluacls_func(L, "createInstance", _olua_fun_cocostudio_ComAttribute_createInstance); + oluacls_func(L, "getBool", _olua_fun_cocostudio_ComAttribute_getBool); + oluacls_func(L, "getFloat", _olua_fun_cocostudio_ComAttribute_getFloat); + oluacls_func(L, "getInt", _olua_fun_cocostudio_ComAttribute_getInt); + oluacls_func(L, "getString", _olua_fun_cocostudio_ComAttribute_getString); + oluacls_func(L, "new", _olua_fun_cocostudio_ComAttribute_new); + oluacls_func(L, "parse", _olua_fun_cocostudio_ComAttribute_parse); + oluacls_func(L, "setBool", _olua_fun_cocostudio_ComAttribute_setBool); + oluacls_func(L, "setFloat", _olua_fun_cocostudio_ComAttribute_setFloat); + oluacls_func(L, "setInt", _olua_fun_cocostudio_ComAttribute_setInt); + oluacls_func(L, "setString", _olua_fun_cocostudio_ComAttribute_setString); oluacls_const(L, "COMPONENT_NAME", cocostudio::ComAttribute::COMPONENT_NAME); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccs_ComAttribute(lua_State *L) +{ + olua_require(L, "cocos2d_studio", luaopen_cocos2d_studio); + if (!olua_getclass(L, "ccs.ComAttribute")) { + luaL_error(L, "class not found: cocostudio::ComAttribute"); + } + return 1; +} OLUA_END_DECLS -static int _cocostudio_ComAudio_as(lua_State *L) +static int _olua_fun_cocostudio_ComAudio_as(lua_State *L) { olua_startinvoke(L); @@ -8279,7 +9156,7 @@ static int _cocostudio_ComAudio_as(lua_State *L) return 1; } -static int _cocostudio_ComAudio_create(lua_State *L) +static int _olua_fun_cocostudio_ComAudio_create(lua_State *L) { olua_startinvoke(L); @@ -8292,7 +9169,7 @@ static int _cocostudio_ComAudio_create(lua_State *L) return num_ret; } -static int _cocostudio_ComAudio_createInstance(lua_State *L) +static int _olua_fun_cocostudio_ComAudio_createInstance(lua_State *L) { olua_startinvoke(L); @@ -8305,7 +9182,7 @@ static int _cocostudio_ComAudio_createInstance(lua_State *L) return num_ret; } -static int _cocostudio_ComAudio_end(lua_State *L) +static int _olua_fun_cocostudio_ComAudio_end_(lua_State *L) { olua_startinvoke(L); @@ -8321,7 +9198,7 @@ static int _cocostudio_ComAudio_end(lua_State *L) return 0; } -static int _cocostudio_ComAudio_getBackgroundMusicVolume(lua_State *L) +static int _olua_fun_cocostudio_ComAudio_getBackgroundMusicVolume(lua_State *L) { olua_startinvoke(L); @@ -8338,7 +9215,7 @@ static int _cocostudio_ComAudio_getBackgroundMusicVolume(lua_State *L) return num_ret; } -static int _cocostudio_ComAudio_getEffectsVolume(lua_State *L) +static int _olua_fun_cocostudio_ComAudio_getEffectsVolume(lua_State *L) { olua_startinvoke(L); @@ -8355,7 +9232,7 @@ static int _cocostudio_ComAudio_getEffectsVolume(lua_State *L) return num_ret; } -static int _cocostudio_ComAudio_getFile(lua_State *L) +static int _olua_fun_cocostudio_ComAudio_getFile(lua_State *L) { olua_startinvoke(L); @@ -8372,7 +9249,7 @@ static int _cocostudio_ComAudio_getFile(lua_State *L) return num_ret; } -static int _cocostudio_ComAudio_isBackgroundMusicPlaying(lua_State *L) +static int _olua_fun_cocostudio_ComAudio_isBackgroundMusicPlaying(lua_State *L) { olua_startinvoke(L); @@ -8389,7 +9266,7 @@ static int _cocostudio_ComAudio_isBackgroundMusicPlaying(lua_State *L) return num_ret; } -static int _cocostudio_ComAudio_isLoop(lua_State *L) +static int _olua_fun_cocostudio_ComAudio_isLoop(lua_State *L) { olua_startinvoke(L); @@ -8406,11 +9283,11 @@ static int _cocostudio_ComAudio_isLoop(lua_State *L) return num_ret; } -static int _cocostudio_ComAudio_new(lua_State *L) +static int _olua_fun_cocostudio_ComAudio_new(lua_State *L) { olua_startinvoke(L); - // ComAudio() + // cocostudio::ComAudio() cocostudio::ComAudio *ret = new cocostudio::ComAudio(); int num_ret = olua_push_object(L, ret, "ccs.ComAudio"); olua_postnew(L, ret); @@ -8420,7 +9297,7 @@ static int _cocostudio_ComAudio_new(lua_State *L) return num_ret; } -static int _cocostudio_ComAudio_pauseAllEffects(lua_State *L) +static int _olua_fun_cocostudio_ComAudio_pauseAllEffects(lua_State *L) { olua_startinvoke(L); @@ -8436,7 +9313,7 @@ static int _cocostudio_ComAudio_pauseAllEffects(lua_State *L) return 0; } -static int _cocostudio_ComAudio_pauseBackgroundMusic(lua_State *L) +static int _olua_fun_cocostudio_ComAudio_pauseBackgroundMusic(lua_State *L) { olua_startinvoke(L); @@ -8452,7 +9329,7 @@ static int _cocostudio_ComAudio_pauseBackgroundMusic(lua_State *L) return 0; } -static int _cocostudio_ComAudio_pauseEffect(lua_State *L) +static int _olua_fun_cocostudio_ComAudio_pauseEffect(lua_State *L) { olua_startinvoke(L); @@ -8470,7 +9347,7 @@ static int _cocostudio_ComAudio_pauseEffect(lua_State *L) return 0; } -static int _cocostudio_ComAudio_playBackgroundMusic$1(lua_State *L) +static int _olua_fun_cocostudio_ComAudio_playBackgroundMusic$1(lua_State *L) { olua_startinvoke(L); @@ -8490,7 +9367,7 @@ static int _cocostudio_ComAudio_playBackgroundMusic$1(lua_State *L) return 0; } -static int _cocostudio_ComAudio_playBackgroundMusic$2(lua_State *L) +static int _olua_fun_cocostudio_ComAudio_playBackgroundMusic$2(lua_State *L) { olua_startinvoke(L); @@ -8508,7 +9385,7 @@ static int _cocostudio_ComAudio_playBackgroundMusic$2(lua_State *L) return 0; } -static int _cocostudio_ComAudio_playBackgroundMusic$3(lua_State *L) +static int _olua_fun_cocostudio_ComAudio_playBackgroundMusic$3(lua_State *L) { olua_startinvoke(L); @@ -8524,26 +9401,26 @@ static int _cocostudio_ComAudio_playBackgroundMusic$3(lua_State *L) return 0; } -static int _cocostudio_ComAudio_playBackgroundMusic(lua_State *L) +static int _olua_fun_cocostudio_ComAudio_playBackgroundMusic(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 0) { // void playBackgroundMusic() - return _cocostudio_ComAudio_playBackgroundMusic$3(L); + return _olua_fun_cocostudio_ComAudio_playBackgroundMusic$3(L); } if (num_args == 1) { // if ((olua_is_string(L, 2))) { // void playBackgroundMusic(const char *pszFilePath) - return _cocostudio_ComAudio_playBackgroundMusic$2(L); + return _olua_fun_cocostudio_ComAudio_playBackgroundMusic$2(L); // } } if (num_args == 2) { // if ((olua_is_string(L, 2)) && (olua_is_bool(L, 3))) { // void playBackgroundMusic(const char *pszFilePath, bool bLoop) - return _cocostudio_ComAudio_playBackgroundMusic$1(L); + return _olua_fun_cocostudio_ComAudio_playBackgroundMusic$1(L); // } } @@ -8552,7 +9429,7 @@ static int _cocostudio_ComAudio_playBackgroundMusic(lua_State *L) return 0; } -static int _cocostudio_ComAudio_playEffect$1(lua_State *L) +static int _olua_fun_cocostudio_ComAudio_playEffect$1(lua_State *L) { olua_startinvoke(L); @@ -8573,7 +9450,7 @@ static int _cocostudio_ComAudio_playEffect$1(lua_State *L) return num_ret; } -static int _cocostudio_ComAudio_playEffect$2(lua_State *L) +static int _olua_fun_cocostudio_ComAudio_playEffect$2(lua_State *L) { olua_startinvoke(L); @@ -8592,7 +9469,7 @@ static int _cocostudio_ComAudio_playEffect$2(lua_State *L) return num_ret; } -static int _cocostudio_ComAudio_playEffect$3(lua_State *L) +static int _olua_fun_cocostudio_ComAudio_playEffect$3(lua_State *L) { olua_startinvoke(L); @@ -8609,26 +9486,26 @@ static int _cocostudio_ComAudio_playEffect$3(lua_State *L) return num_ret; } -static int _cocostudio_ComAudio_playEffect(lua_State *L) +static int _olua_fun_cocostudio_ComAudio_playEffect(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 0) { // unsigned int playEffect() - return _cocostudio_ComAudio_playEffect$3(L); + return _olua_fun_cocostudio_ComAudio_playEffect$3(L); } if (num_args == 1) { // if ((olua_is_string(L, 2))) { // unsigned int playEffect(const char *pszFilePath) - return _cocostudio_ComAudio_playEffect$2(L); + return _olua_fun_cocostudio_ComAudio_playEffect$2(L); // } } if (num_args == 2) { // if ((olua_is_string(L, 2)) && (olua_is_bool(L, 3))) { // unsigned int playEffect(const char *pszFilePath, bool bLoop) - return _cocostudio_ComAudio_playEffect$1(L); + return _olua_fun_cocostudio_ComAudio_playEffect$1(L); // } } @@ -8637,7 +9514,7 @@ static int _cocostudio_ComAudio_playEffect(lua_State *L) return 0; } -static int _cocostudio_ComAudio_preloadBackgroundMusic(lua_State *L) +static int _olua_fun_cocostudio_ComAudio_preloadBackgroundMusic(lua_State *L) { olua_startinvoke(L); @@ -8655,7 +9532,7 @@ static int _cocostudio_ComAudio_preloadBackgroundMusic(lua_State *L) return 0; } -static int _cocostudio_ComAudio_preloadEffect(lua_State *L) +static int _olua_fun_cocostudio_ComAudio_preloadEffect(lua_State *L) { olua_startinvoke(L); @@ -8673,7 +9550,7 @@ static int _cocostudio_ComAudio_preloadEffect(lua_State *L) return 0; } -static int _cocostudio_ComAudio_resumeAllEffects(lua_State *L) +static int _olua_fun_cocostudio_ComAudio_resumeAllEffects(lua_State *L) { olua_startinvoke(L); @@ -8689,7 +9566,7 @@ static int _cocostudio_ComAudio_resumeAllEffects(lua_State *L) return 0; } -static int _cocostudio_ComAudio_resumeBackgroundMusic(lua_State *L) +static int _olua_fun_cocostudio_ComAudio_resumeBackgroundMusic(lua_State *L) { olua_startinvoke(L); @@ -8705,7 +9582,7 @@ static int _cocostudio_ComAudio_resumeBackgroundMusic(lua_State *L) return 0; } -static int _cocostudio_ComAudio_resumeEffect(lua_State *L) +static int _olua_fun_cocostudio_ComAudio_resumeEffect(lua_State *L) { olua_startinvoke(L); @@ -8723,7 +9600,7 @@ static int _cocostudio_ComAudio_resumeEffect(lua_State *L) return 0; } -static int _cocostudio_ComAudio_rewindBackgroundMusic(lua_State *L) +static int _olua_fun_cocostudio_ComAudio_rewindBackgroundMusic(lua_State *L) { olua_startinvoke(L); @@ -8739,7 +9616,7 @@ static int _cocostudio_ComAudio_rewindBackgroundMusic(lua_State *L) return 0; } -static int _cocostudio_ComAudio_setBackgroundMusicVolume(lua_State *L) +static int _olua_fun_cocostudio_ComAudio_setBackgroundMusicVolume(lua_State *L) { olua_startinvoke(L); @@ -8757,7 +9634,7 @@ static int _cocostudio_ComAudio_setBackgroundMusicVolume(lua_State *L) return 0; } -static int _cocostudio_ComAudio_setEffectsVolume(lua_State *L) +static int _olua_fun_cocostudio_ComAudio_setEffectsVolume(lua_State *L) { olua_startinvoke(L); @@ -8775,7 +9652,7 @@ static int _cocostudio_ComAudio_setEffectsVolume(lua_State *L) return 0; } -static int _cocostudio_ComAudio_setFile(lua_State *L) +static int _olua_fun_cocostudio_ComAudio_setFile(lua_State *L) { olua_startinvoke(L); @@ -8793,7 +9670,7 @@ static int _cocostudio_ComAudio_setFile(lua_State *L) return 0; } -static int _cocostudio_ComAudio_setLoop(lua_State *L) +static int _olua_fun_cocostudio_ComAudio_setLoop(lua_State *L) { olua_startinvoke(L); @@ -8811,7 +9688,7 @@ static int _cocostudio_ComAudio_setLoop(lua_State *L) return 0; } -static int _cocostudio_ComAudio_start(lua_State *L) +static int _olua_fun_cocostudio_ComAudio_start(lua_State *L) { olua_startinvoke(L); @@ -8827,7 +9704,7 @@ static int _cocostudio_ComAudio_start(lua_State *L) return 0; } -static int _cocostudio_ComAudio_stop(lua_State *L) +static int _olua_fun_cocostudio_ComAudio_stop(lua_State *L) { olua_startinvoke(L); @@ -8843,7 +9720,7 @@ static int _cocostudio_ComAudio_stop(lua_State *L) return 0; } -static int _cocostudio_ComAudio_stopAllEffects(lua_State *L) +static int _olua_fun_cocostudio_ComAudio_stopAllEffects(lua_State *L) { olua_startinvoke(L); @@ -8859,7 +9736,7 @@ static int _cocostudio_ComAudio_stopAllEffects(lua_State *L) return 0; } -static int _cocostudio_ComAudio_stopBackgroundMusic$1(lua_State *L) +static int _olua_fun_cocostudio_ComAudio_stopBackgroundMusic$1(lua_State *L) { olua_startinvoke(L); @@ -8877,7 +9754,7 @@ static int _cocostudio_ComAudio_stopBackgroundMusic$1(lua_State *L) return 0; } -static int _cocostudio_ComAudio_stopBackgroundMusic$2(lua_State *L) +static int _olua_fun_cocostudio_ComAudio_stopBackgroundMusic$2(lua_State *L) { olua_startinvoke(L); @@ -8893,19 +9770,19 @@ static int _cocostudio_ComAudio_stopBackgroundMusic$2(lua_State *L) return 0; } -static int _cocostudio_ComAudio_stopBackgroundMusic(lua_State *L) +static int _olua_fun_cocostudio_ComAudio_stopBackgroundMusic(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 0) { // void stopBackgroundMusic() - return _cocostudio_ComAudio_stopBackgroundMusic$2(L); + return _olua_fun_cocostudio_ComAudio_stopBackgroundMusic$2(L); } if (num_args == 1) { // if ((olua_is_bool(L, 2))) { // void stopBackgroundMusic(bool bReleaseData) - return _cocostudio_ComAudio_stopBackgroundMusic$1(L); + return _olua_fun_cocostudio_ComAudio_stopBackgroundMusic$1(L); // } } @@ -8914,7 +9791,7 @@ static int _cocostudio_ComAudio_stopBackgroundMusic(lua_State *L) return 0; } -static int _cocostudio_ComAudio_stopEffect(lua_State *L) +static int _olua_fun_cocostudio_ComAudio_stopEffect(lua_State *L) { olua_startinvoke(L); @@ -8932,7 +9809,7 @@ static int _cocostudio_ComAudio_stopEffect(lua_State *L) return 0; } -static int _cocostudio_ComAudio_unloadEffect(lua_State *L) +static int _olua_fun_cocostudio_ComAudio_unloadEffect(lua_State *L) { olua_startinvoke(L); @@ -8950,7 +9827,7 @@ static int _cocostudio_ComAudio_unloadEffect(lua_State *L) return 0; } -static int _cocostudio_ComAudio_willPlayBackgroundMusic(lua_State *L) +static int _olua_fun_cocostudio_ComAudio_willPlayBackgroundMusic(lua_State *L) { olua_startinvoke(L); @@ -8967,54 +9844,63 @@ static int _cocostudio_ComAudio_willPlayBackgroundMusic(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocostudio_ComAudio(lua_State *L) +static int _olua_cls_ccs_ComAudio(lua_State *L) { oluacls_class(L, "ccs.ComAudio"); - oluacls_func(L, "as", _cocostudio_ComAudio_as); - oluacls_func(L, "create", _cocostudio_ComAudio_create); - oluacls_func(L, "createInstance", _cocostudio_ComAudio_createInstance); - oluacls_func(L, "end", _cocostudio_ComAudio_end); - oluacls_func(L, "getBackgroundMusicVolume", _cocostudio_ComAudio_getBackgroundMusicVolume); - oluacls_func(L, "getEffectsVolume", _cocostudio_ComAudio_getEffectsVolume); - oluacls_func(L, "getFile", _cocostudio_ComAudio_getFile); - oluacls_func(L, "isBackgroundMusicPlaying", _cocostudio_ComAudio_isBackgroundMusicPlaying); - oluacls_func(L, "isLoop", _cocostudio_ComAudio_isLoop); - oluacls_func(L, "new", _cocostudio_ComAudio_new); - oluacls_func(L, "pauseAllEffects", _cocostudio_ComAudio_pauseAllEffects); - oluacls_func(L, "pauseBackgroundMusic", _cocostudio_ComAudio_pauseBackgroundMusic); - oluacls_func(L, "pauseEffect", _cocostudio_ComAudio_pauseEffect); - oluacls_func(L, "playBackgroundMusic", _cocostudio_ComAudio_playBackgroundMusic); - oluacls_func(L, "playEffect", _cocostudio_ComAudio_playEffect); - oluacls_func(L, "preloadBackgroundMusic", _cocostudio_ComAudio_preloadBackgroundMusic); - oluacls_func(L, "preloadEffect", _cocostudio_ComAudio_preloadEffect); - oluacls_func(L, "resumeAllEffects", _cocostudio_ComAudio_resumeAllEffects); - oluacls_func(L, "resumeBackgroundMusic", _cocostudio_ComAudio_resumeBackgroundMusic); - oluacls_func(L, "resumeEffect", _cocostudio_ComAudio_resumeEffect); - oluacls_func(L, "rewindBackgroundMusic", _cocostudio_ComAudio_rewindBackgroundMusic); - oluacls_func(L, "setBackgroundMusicVolume", _cocostudio_ComAudio_setBackgroundMusicVolume); - oluacls_func(L, "setEffectsVolume", _cocostudio_ComAudio_setEffectsVolume); - oluacls_func(L, "setFile", _cocostudio_ComAudio_setFile); - oluacls_func(L, "setLoop", _cocostudio_ComAudio_setLoop); - oluacls_func(L, "start", _cocostudio_ComAudio_start); - oluacls_func(L, "stop", _cocostudio_ComAudio_stop); - oluacls_func(L, "stopAllEffects", _cocostudio_ComAudio_stopAllEffects); - oluacls_func(L, "stopBackgroundMusic", _cocostudio_ComAudio_stopBackgroundMusic); - oluacls_func(L, "stopEffect", _cocostudio_ComAudio_stopEffect); - oluacls_func(L, "unloadEffect", _cocostudio_ComAudio_unloadEffect); - oluacls_func(L, "willPlayBackgroundMusic", _cocostudio_ComAudio_willPlayBackgroundMusic); - oluacls_prop(L, "backgroundMusicPlaying", _cocostudio_ComAudio_isBackgroundMusicPlaying, nullptr); - oluacls_prop(L, "backgroundMusicVolume", _cocostudio_ComAudio_getBackgroundMusicVolume, _cocostudio_ComAudio_setBackgroundMusicVolume); - oluacls_prop(L, "effectsVolume", _cocostudio_ComAudio_getEffectsVolume, _cocostudio_ComAudio_setEffectsVolume); - oluacls_prop(L, "file", _cocostudio_ComAudio_getFile, _cocostudio_ComAudio_setFile); - oluacls_prop(L, "loop", _cocostudio_ComAudio_isLoop, _cocostudio_ComAudio_setLoop); + oluacls_func(L, "as", _olua_fun_cocostudio_ComAudio_as); + oluacls_func(L, "create", _olua_fun_cocostudio_ComAudio_create); + oluacls_func(L, "createInstance", _olua_fun_cocostudio_ComAudio_createInstance); + oluacls_func(L, "end_", _olua_fun_cocostudio_ComAudio_end_); + oluacls_func(L, "getBackgroundMusicVolume", _olua_fun_cocostudio_ComAudio_getBackgroundMusicVolume); + oluacls_func(L, "getEffectsVolume", _olua_fun_cocostudio_ComAudio_getEffectsVolume); + oluacls_func(L, "getFile", _olua_fun_cocostudio_ComAudio_getFile); + oluacls_func(L, "isBackgroundMusicPlaying", _olua_fun_cocostudio_ComAudio_isBackgroundMusicPlaying); + oluacls_func(L, "isLoop", _olua_fun_cocostudio_ComAudio_isLoop); + oluacls_func(L, "new", _olua_fun_cocostudio_ComAudio_new); + oluacls_func(L, "pauseAllEffects", _olua_fun_cocostudio_ComAudio_pauseAllEffects); + oluacls_func(L, "pauseBackgroundMusic", _olua_fun_cocostudio_ComAudio_pauseBackgroundMusic); + oluacls_func(L, "pauseEffect", _olua_fun_cocostudio_ComAudio_pauseEffect); + oluacls_func(L, "playBackgroundMusic", _olua_fun_cocostudio_ComAudio_playBackgroundMusic); + oluacls_func(L, "playEffect", _olua_fun_cocostudio_ComAudio_playEffect); + oluacls_func(L, "preloadBackgroundMusic", _olua_fun_cocostudio_ComAudio_preloadBackgroundMusic); + oluacls_func(L, "preloadEffect", _olua_fun_cocostudio_ComAudio_preloadEffect); + oluacls_func(L, "resumeAllEffects", _olua_fun_cocostudio_ComAudio_resumeAllEffects); + oluacls_func(L, "resumeBackgroundMusic", _olua_fun_cocostudio_ComAudio_resumeBackgroundMusic); + oluacls_func(L, "resumeEffect", _olua_fun_cocostudio_ComAudio_resumeEffect); + oluacls_func(L, "rewindBackgroundMusic", _olua_fun_cocostudio_ComAudio_rewindBackgroundMusic); + oluacls_func(L, "setBackgroundMusicVolume", _olua_fun_cocostudio_ComAudio_setBackgroundMusicVolume); + oluacls_func(L, "setEffectsVolume", _olua_fun_cocostudio_ComAudio_setEffectsVolume); + oluacls_func(L, "setFile", _olua_fun_cocostudio_ComAudio_setFile); + oluacls_func(L, "setLoop", _olua_fun_cocostudio_ComAudio_setLoop); + oluacls_func(L, "start", _olua_fun_cocostudio_ComAudio_start); + oluacls_func(L, "stop", _olua_fun_cocostudio_ComAudio_stop); + oluacls_func(L, "stopAllEffects", _olua_fun_cocostudio_ComAudio_stopAllEffects); + oluacls_func(L, "stopBackgroundMusic", _olua_fun_cocostudio_ComAudio_stopBackgroundMusic); + oluacls_func(L, "stopEffect", _olua_fun_cocostudio_ComAudio_stopEffect); + oluacls_func(L, "unloadEffect", _olua_fun_cocostudio_ComAudio_unloadEffect); + oluacls_func(L, "willPlayBackgroundMusic", _olua_fun_cocostudio_ComAudio_willPlayBackgroundMusic); + oluacls_prop(L, "backgroundMusicPlaying", _olua_fun_cocostudio_ComAudio_isBackgroundMusicPlaying, nullptr); + oluacls_prop(L, "backgroundMusicVolume", _olua_fun_cocostudio_ComAudio_getBackgroundMusicVolume, _olua_fun_cocostudio_ComAudio_setBackgroundMusicVolume); + oluacls_prop(L, "effectsVolume", _olua_fun_cocostudio_ComAudio_getEffectsVolume, _olua_fun_cocostudio_ComAudio_setEffectsVolume); + oluacls_prop(L, "file", _olua_fun_cocostudio_ComAudio_getFile, _olua_fun_cocostudio_ComAudio_setFile); + oluacls_prop(L, "loop", _olua_fun_cocostudio_ComAudio_isLoop, _olua_fun_cocostudio_ComAudio_setLoop); oluacls_const(L, "COMPONENT_NAME", cocostudio::ComAudio::COMPONENT_NAME); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccs_ComAudio(lua_State *L) +{ + olua_require(L, "cocos2d_studio", luaopen_cocos2d_studio); + if (!olua_getclass(L, "ccs.ComAudio")) { + luaL_error(L, "class not found: cocostudio::ComAudio"); + } + return 1; +} OLUA_END_DECLS -static int _cocostudio_ComController_as(lua_State *L) +static int _olua_fun_cocostudio_ComController_as(lua_State *L) { olua_startinvoke(L); @@ -9042,7 +9928,7 @@ static int _cocostudio_ComController_as(lua_State *L) return 1; } -static int _cocostudio_ComController_create(lua_State *L) +static int _olua_fun_cocostudio_ComController_create(lua_State *L) { olua_startinvoke(L); @@ -9055,7 +9941,7 @@ static int _cocostudio_ComController_create(lua_State *L) return num_ret; } -static int _cocostudio_ComController_createInstance(lua_State *L) +static int _olua_fun_cocostudio_ComController_createInstance(lua_State *L) { olua_startinvoke(L); @@ -9068,7 +9954,7 @@ static int _cocostudio_ComController_createInstance(lua_State *L) return num_ret; } -static int _cocostudio_ComController_getTouchMode(lua_State *L) +static int _olua_fun_cocostudio_ComController_getTouchMode(lua_State *L) { olua_startinvoke(L); @@ -9085,7 +9971,7 @@ static int _cocostudio_ComController_getTouchMode(lua_State *L) return num_ret; } -static int _cocostudio_ComController_getTouchPriority(lua_State *L) +static int _olua_fun_cocostudio_ComController_getTouchPriority(lua_State *L) { olua_startinvoke(L); @@ -9102,7 +9988,7 @@ static int _cocostudio_ComController_getTouchPriority(lua_State *L) return num_ret; } -static int _cocostudio_ComController_isAccelerometerEnabled(lua_State *L) +static int _olua_fun_cocostudio_ComController_isAccelerometerEnabled(lua_State *L) { olua_startinvoke(L); @@ -9119,7 +10005,7 @@ static int _cocostudio_ComController_isAccelerometerEnabled(lua_State *L) return num_ret; } -static int _cocostudio_ComController_isKeypadEnabled(lua_State *L) +static int _olua_fun_cocostudio_ComController_isKeypadEnabled(lua_State *L) { olua_startinvoke(L); @@ -9136,7 +10022,7 @@ static int _cocostudio_ComController_isKeypadEnabled(lua_State *L) return num_ret; } -static int _cocostudio_ComController_isTouchEnabled(lua_State *L) +static int _olua_fun_cocostudio_ComController_isTouchEnabled(lua_State *L) { olua_startinvoke(L); @@ -9153,11 +10039,11 @@ static int _cocostudio_ComController_isTouchEnabled(lua_State *L) return num_ret; } -static int _cocostudio_ComController_new(lua_State *L) +static int _olua_fun_cocostudio_ComController_new(lua_State *L) { olua_startinvoke(L); - // ComController() + // cocostudio::ComController() cocostudio::ComController *ret = new cocostudio::ComController(); int num_ret = olua_push_object(L, ret, "ccs.ComController"); olua_postnew(L, ret); @@ -9167,7 +10053,7 @@ static int _cocostudio_ComController_new(lua_State *L) return num_ret; } -static int _cocostudio_ComController_onAcceleration(lua_State *L) +static int _olua_fun_cocostudio_ComController_onAcceleration(lua_State *L) { olua_startinvoke(L); @@ -9187,7 +10073,7 @@ static int _cocostudio_ComController_onAcceleration(lua_State *L) return 0; } -static int _cocostudio_ComController_onKeyPressed(lua_State *L) +static int _olua_fun_cocostudio_ComController_onKeyPressed(lua_State *L) { olua_startinvoke(L); @@ -9207,7 +10093,7 @@ static int _cocostudio_ComController_onKeyPressed(lua_State *L) return 0; } -static int _cocostudio_ComController_onKeyReleased(lua_State *L) +static int _olua_fun_cocostudio_ComController_onKeyReleased(lua_State *L) { olua_startinvoke(L); @@ -9227,7 +10113,7 @@ static int _cocostudio_ComController_onKeyReleased(lua_State *L) return 0; } -static int _cocostudio_ComController_onTouchBegan(lua_State *L) +static int _olua_fun_cocostudio_ComController_onTouchBegan(lua_State *L) { olua_startinvoke(L); @@ -9248,7 +10134,7 @@ static int _cocostudio_ComController_onTouchBegan(lua_State *L) return num_ret; } -static int _cocostudio_ComController_onTouchCancelled(lua_State *L) +static int _olua_fun_cocostudio_ComController_onTouchCancelled(lua_State *L) { olua_startinvoke(L); @@ -9268,7 +10154,7 @@ static int _cocostudio_ComController_onTouchCancelled(lua_State *L) return 0; } -static int _cocostudio_ComController_onTouchEnded(lua_State *L) +static int _olua_fun_cocostudio_ComController_onTouchEnded(lua_State *L) { olua_startinvoke(L); @@ -9288,7 +10174,7 @@ static int _cocostudio_ComController_onTouchEnded(lua_State *L) return 0; } -static int _cocostudio_ComController_onTouchMoved(lua_State *L) +static int _olua_fun_cocostudio_ComController_onTouchMoved(lua_State *L) { olua_startinvoke(L); @@ -9308,7 +10194,7 @@ static int _cocostudio_ComController_onTouchMoved(lua_State *L) return 0; } -static int _cocostudio_ComController_onTouchesBegan(lua_State *L) +static int _olua_fun_cocostudio_ComController_onTouchesBegan(lua_State *L) { olua_startinvoke(L); @@ -9330,7 +10216,7 @@ static int _cocostudio_ComController_onTouchesBegan(lua_State *L) return 0; } -static int _cocostudio_ComController_onTouchesCancelled(lua_State *L) +static int _olua_fun_cocostudio_ComController_onTouchesCancelled(lua_State *L) { olua_startinvoke(L); @@ -9352,7 +10238,7 @@ static int _cocostudio_ComController_onTouchesCancelled(lua_State *L) return 0; } -static int _cocostudio_ComController_onTouchesEnded(lua_State *L) +static int _olua_fun_cocostudio_ComController_onTouchesEnded(lua_State *L) { olua_startinvoke(L); @@ -9374,7 +10260,7 @@ static int _cocostudio_ComController_onTouchesEnded(lua_State *L) return 0; } -static int _cocostudio_ComController_onTouchesMoved(lua_State *L) +static int _olua_fun_cocostudio_ComController_onTouchesMoved(lua_State *L) { olua_startinvoke(L); @@ -9396,7 +10282,7 @@ static int _cocostudio_ComController_onTouchesMoved(lua_State *L) return 0; } -static int _cocostudio_ComController_setAccelerometerEnabled(lua_State *L) +static int _olua_fun_cocostudio_ComController_setAccelerometerEnabled(lua_State *L) { olua_startinvoke(L); @@ -9414,7 +10300,7 @@ static int _cocostudio_ComController_setAccelerometerEnabled(lua_State *L) return 0; } -static int _cocostudio_ComController_setKeypadEnabled(lua_State *L) +static int _olua_fun_cocostudio_ComController_setKeypadEnabled(lua_State *L) { olua_startinvoke(L); @@ -9432,7 +10318,7 @@ static int _cocostudio_ComController_setKeypadEnabled(lua_State *L) return 0; } -static int _cocostudio_ComController_setTouchEnabled(lua_State *L) +static int _olua_fun_cocostudio_ComController_setTouchEnabled(lua_State *L) { olua_startinvoke(L); @@ -9450,7 +10336,7 @@ static int _cocostudio_ComController_setTouchEnabled(lua_State *L) return 0; } -static int _cocostudio_ComController_setTouchMode(lua_State *L) +static int _olua_fun_cocostudio_ComController_setTouchMode(lua_State *L) { olua_startinvoke(L); @@ -9468,7 +10354,7 @@ static int _cocostudio_ComController_setTouchMode(lua_State *L) return 0; } -static int _cocostudio_ComController_setTouchPriority(lua_State *L) +static int _olua_fun_cocostudio_ComController_setTouchPriority(lua_State *L) { olua_startinvoke(L); @@ -9486,47 +10372,56 @@ static int _cocostudio_ComController_setTouchPriority(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocostudio_ComController(lua_State *L) +static int _olua_cls_ccs_ComController(lua_State *L) { oluacls_class(L, "ccs.ComController"); - oluacls_func(L, "as", _cocostudio_ComController_as); - oluacls_func(L, "create", _cocostudio_ComController_create); - oluacls_func(L, "createInstance", _cocostudio_ComController_createInstance); - oluacls_func(L, "getTouchMode", _cocostudio_ComController_getTouchMode); - oluacls_func(L, "getTouchPriority", _cocostudio_ComController_getTouchPriority); - oluacls_func(L, "isAccelerometerEnabled", _cocostudio_ComController_isAccelerometerEnabled); - oluacls_func(L, "isKeypadEnabled", _cocostudio_ComController_isKeypadEnabled); - oluacls_func(L, "isTouchEnabled", _cocostudio_ComController_isTouchEnabled); - oluacls_func(L, "new", _cocostudio_ComController_new); - oluacls_func(L, "onAcceleration", _cocostudio_ComController_onAcceleration); - oluacls_func(L, "onKeyPressed", _cocostudio_ComController_onKeyPressed); - oluacls_func(L, "onKeyReleased", _cocostudio_ComController_onKeyReleased); - oluacls_func(L, "onTouchBegan", _cocostudio_ComController_onTouchBegan); - oluacls_func(L, "onTouchCancelled", _cocostudio_ComController_onTouchCancelled); - oluacls_func(L, "onTouchEnded", _cocostudio_ComController_onTouchEnded); - oluacls_func(L, "onTouchMoved", _cocostudio_ComController_onTouchMoved); - oluacls_func(L, "onTouchesBegan", _cocostudio_ComController_onTouchesBegan); - oluacls_func(L, "onTouchesCancelled", _cocostudio_ComController_onTouchesCancelled); - oluacls_func(L, "onTouchesEnded", _cocostudio_ComController_onTouchesEnded); - oluacls_func(L, "onTouchesMoved", _cocostudio_ComController_onTouchesMoved); - oluacls_func(L, "setAccelerometerEnabled", _cocostudio_ComController_setAccelerometerEnabled); - oluacls_func(L, "setKeypadEnabled", _cocostudio_ComController_setKeypadEnabled); - oluacls_func(L, "setTouchEnabled", _cocostudio_ComController_setTouchEnabled); - oluacls_func(L, "setTouchMode", _cocostudio_ComController_setTouchMode); - oluacls_func(L, "setTouchPriority", _cocostudio_ComController_setTouchPriority); - oluacls_prop(L, "accelerometerEnabled", _cocostudio_ComController_isAccelerometerEnabled, _cocostudio_ComController_setAccelerometerEnabled); - oluacls_prop(L, "keypadEnabled", _cocostudio_ComController_isKeypadEnabled, _cocostudio_ComController_setKeypadEnabled); - oluacls_prop(L, "touchEnabled", _cocostudio_ComController_isTouchEnabled, _cocostudio_ComController_setTouchEnabled); - oluacls_prop(L, "touchMode", _cocostudio_ComController_getTouchMode, _cocostudio_ComController_setTouchMode); - oluacls_prop(L, "touchPriority", _cocostudio_ComController_getTouchPriority, _cocostudio_ComController_setTouchPriority); + oluacls_func(L, "as", _olua_fun_cocostudio_ComController_as); + oluacls_func(L, "create", _olua_fun_cocostudio_ComController_create); + oluacls_func(L, "createInstance", _olua_fun_cocostudio_ComController_createInstance); + oluacls_func(L, "getTouchMode", _olua_fun_cocostudio_ComController_getTouchMode); + oluacls_func(L, "getTouchPriority", _olua_fun_cocostudio_ComController_getTouchPriority); + oluacls_func(L, "isAccelerometerEnabled", _olua_fun_cocostudio_ComController_isAccelerometerEnabled); + oluacls_func(L, "isKeypadEnabled", _olua_fun_cocostudio_ComController_isKeypadEnabled); + oluacls_func(L, "isTouchEnabled", _olua_fun_cocostudio_ComController_isTouchEnabled); + oluacls_func(L, "new", _olua_fun_cocostudio_ComController_new); + oluacls_func(L, "onAcceleration", _olua_fun_cocostudio_ComController_onAcceleration); + oluacls_func(L, "onKeyPressed", _olua_fun_cocostudio_ComController_onKeyPressed); + oluacls_func(L, "onKeyReleased", _olua_fun_cocostudio_ComController_onKeyReleased); + oluacls_func(L, "onTouchBegan", _olua_fun_cocostudio_ComController_onTouchBegan); + oluacls_func(L, "onTouchCancelled", _olua_fun_cocostudio_ComController_onTouchCancelled); + oluacls_func(L, "onTouchEnded", _olua_fun_cocostudio_ComController_onTouchEnded); + oluacls_func(L, "onTouchMoved", _olua_fun_cocostudio_ComController_onTouchMoved); + oluacls_func(L, "onTouchesBegan", _olua_fun_cocostudio_ComController_onTouchesBegan); + oluacls_func(L, "onTouchesCancelled", _olua_fun_cocostudio_ComController_onTouchesCancelled); + oluacls_func(L, "onTouchesEnded", _olua_fun_cocostudio_ComController_onTouchesEnded); + oluacls_func(L, "onTouchesMoved", _olua_fun_cocostudio_ComController_onTouchesMoved); + oluacls_func(L, "setAccelerometerEnabled", _olua_fun_cocostudio_ComController_setAccelerometerEnabled); + oluacls_func(L, "setKeypadEnabled", _olua_fun_cocostudio_ComController_setKeypadEnabled); + oluacls_func(L, "setTouchEnabled", _olua_fun_cocostudio_ComController_setTouchEnabled); + oluacls_func(L, "setTouchMode", _olua_fun_cocostudio_ComController_setTouchMode); + oluacls_func(L, "setTouchPriority", _olua_fun_cocostudio_ComController_setTouchPriority); + oluacls_prop(L, "accelerometerEnabled", _olua_fun_cocostudio_ComController_isAccelerometerEnabled, _olua_fun_cocostudio_ComController_setAccelerometerEnabled); + oluacls_prop(L, "keypadEnabled", _olua_fun_cocostudio_ComController_isKeypadEnabled, _olua_fun_cocostudio_ComController_setKeypadEnabled); + oluacls_prop(L, "touchEnabled", _olua_fun_cocostudio_ComController_isTouchEnabled, _olua_fun_cocostudio_ComController_setTouchEnabled); + oluacls_prop(L, "touchMode", _olua_fun_cocostudio_ComController_getTouchMode, _olua_fun_cocostudio_ComController_setTouchMode); + oluacls_prop(L, "touchPriority", _olua_fun_cocostudio_ComController_getTouchPriority, _olua_fun_cocostudio_ComController_setTouchPriority); oluacls_const(L, "COMPONENT_NAME", cocostudio::ComController::COMPONENT_NAME); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccs_ComController(lua_State *L) +{ + olua_require(L, "cocos2d_studio", luaopen_cocos2d_studio); + if (!olua_getclass(L, "ccs.ComController")) { + luaL_error(L, "class not found: cocostudio::ComController"); + } + return 1; +} OLUA_END_DECLS -static int _cocostudio_ComRender_create$1(lua_State *L) +static int _olua_fun_cocostudio_ComRender_create$1(lua_State *L) { olua_startinvoke(L); @@ -9539,7 +10434,7 @@ static int _cocostudio_ComRender_create$1(lua_State *L) return num_ret; } -static int _cocostudio_ComRender_create$2(lua_State *L) +static int _olua_fun_cocostudio_ComRender_create$2(lua_State *L) { olua_startinvoke(L); @@ -9558,19 +10453,19 @@ static int _cocostudio_ComRender_create$2(lua_State *L) return num_ret; } -static int _cocostudio_ComRender_create(lua_State *L) +static int _olua_fun_cocostudio_ComRender_create(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 0) { // static cocostudio::ComRender *create() - return _cocostudio_ComRender_create$1(L); + return _olua_fun_cocostudio_ComRender_create$1(L); } if (num_args == 2) { // if ((olua_is_object(L, 1, "cc.Node")) && (olua_is_string(L, 2))) { // static cocostudio::ComRender *create(cocos2d::Node *node, const char *comName) - return _cocostudio_ComRender_create$2(L); + return _olua_fun_cocostudio_ComRender_create$2(L); // } } @@ -9579,7 +10474,7 @@ static int _cocostudio_ComRender_create(lua_State *L) return 0; } -static int _cocostudio_ComRender_createInstance(lua_State *L) +static int _olua_fun_cocostudio_ComRender_createInstance(lua_State *L) { olua_startinvoke(L); @@ -9592,7 +10487,7 @@ static int _cocostudio_ComRender_createInstance(lua_State *L) return num_ret; } -static int _cocostudio_ComRender_getNode(lua_State *L) +static int _olua_fun_cocostudio_ComRender_getNode(lua_State *L) { olua_startinvoke(L); @@ -9609,11 +10504,11 @@ static int _cocostudio_ComRender_getNode(lua_State *L) return num_ret; } -static int _cocostudio_ComRender_new$1(lua_State *L) +static int _olua_fun_cocostudio_ComRender_new$1(lua_State *L) { olua_startinvoke(L); - // ComRender() + // cocostudio::ComRender() cocostudio::ComRender *ret = new cocostudio::ComRender(); int num_ret = olua_push_object(L, ret, "ccs.ComRender"); olua_postnew(L, ret); @@ -9623,7 +10518,7 @@ static int _cocostudio_ComRender_new$1(lua_State *L) return num_ret; } -static int _cocostudio_ComRender_new$2(lua_State *L) +static int _olua_fun_cocostudio_ComRender_new$2(lua_State *L) { olua_startinvoke(L); @@ -9633,7 +10528,7 @@ static int _cocostudio_ComRender_new$2(lua_State *L) olua_check_object(L, 1, &arg1, "cc.Node"); olua_check_string(L, 2, &arg2); - // ComRender(cocos2d::Node *node, const char *comName) + // cocostudio::ComRender(cocos2d::Node *node, const char *comName) cocostudio::ComRender *ret = new cocostudio::ComRender(arg1, arg2); int num_ret = olua_push_object(L, ret, "ccs.ComRender"); olua_postnew(L, ret); @@ -9643,19 +10538,19 @@ static int _cocostudio_ComRender_new$2(lua_State *L) return num_ret; } -static int _cocostudio_ComRender_new(lua_State *L) +static int _olua_fun_cocostudio_ComRender_new(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 0) { - // ComRender() - return _cocostudio_ComRender_new$1(L); + // cocostudio::ComRender() + return _olua_fun_cocostudio_ComRender_new$1(L); } if (num_args == 2) { // if ((olua_is_object(L, 1, "cc.Node")) && (olua_is_string(L, 2))) { - // ComRender(cocos2d::Node *node, const char *comName) - return _cocostudio_ComRender_new$2(L); + // cocostudio::ComRender(cocos2d::Node *node, const char *comName) + return _olua_fun_cocostudio_ComRender_new$2(L); // } } @@ -9664,7 +10559,7 @@ static int _cocostudio_ComRender_new(lua_State *L) return 0; } -static int _cocostudio_ComRender_setNode(lua_State *L) +static int _olua_fun_cocostudio_ComRender_setNode(lua_State *L) { olua_startinvoke(L); @@ -9682,23 +10577,32 @@ static int _cocostudio_ComRender_setNode(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocostudio_ComRender(lua_State *L) +static int _olua_cls_ccs_ComRender(lua_State *L) { oluacls_class(L, "ccs.ComRender"); - oluacls_func(L, "create", _cocostudio_ComRender_create); - oluacls_func(L, "createInstance", _cocostudio_ComRender_createInstance); - oluacls_func(L, "getNode", _cocostudio_ComRender_getNode); - oluacls_func(L, "new", _cocostudio_ComRender_new); - oluacls_func(L, "setNode", _cocostudio_ComRender_setNode); - oluacls_prop(L, "node", _cocostudio_ComRender_getNode, _cocostudio_ComRender_setNode); + oluacls_func(L, "create", _olua_fun_cocostudio_ComRender_create); + oluacls_func(L, "createInstance", _olua_fun_cocostudio_ComRender_createInstance); + oluacls_func(L, "getNode", _olua_fun_cocostudio_ComRender_getNode); + oluacls_func(L, "new", _olua_fun_cocostudio_ComRender_new); + oluacls_func(L, "setNode", _olua_fun_cocostudio_ComRender_setNode); + oluacls_prop(L, "node", _olua_fun_cocostudio_ComRender_getNode, _olua_fun_cocostudio_ComRender_setNode); oluacls_const(L, "COMPONENT_NAME", cocostudio::ComRender::COMPONENT_NAME); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccs_ComRender(lua_State *L) +{ + olua_require(L, "cocos2d_studio", luaopen_cocos2d_studio); + if (!olua_getclass(L, "ccs.ComRender")) { + luaL_error(L, "class not found: cocostudio::ComRender"); + } + return 1; +} OLUA_END_DECLS -static int _cocostudio_ContourData_addVertex(lua_State *L) +static int _olua_fun_cocostudio_ContourData_addVertex(lua_State *L) { olua_startinvoke(L); @@ -9716,7 +10620,7 @@ static int _cocostudio_ContourData_addVertex(lua_State *L) return 0; } -static int _cocostudio_ContourData_create(lua_State *L) +static int _olua_fun_cocostudio_ContourData_create(lua_State *L) { olua_startinvoke(L); @@ -9729,7 +10633,7 @@ static int _cocostudio_ContourData_create(lua_State *L) return num_ret; } -static int _cocostudio_ContourData_init(lua_State *L) +static int _olua_fun_cocostudio_ContourData_init(lua_State *L) { olua_startinvoke(L); @@ -9746,11 +10650,11 @@ static int _cocostudio_ContourData_init(lua_State *L) return num_ret; } -static int _cocostudio_ContourData_new(lua_State *L) +static int _olua_fun_cocostudio_ContourData_new(lua_State *L) { olua_startinvoke(L); - // ContourData() + // cocostudio::ContourData() cocostudio::ContourData *ret = new cocostudio::ContourData(); int num_ret = olua_push_object(L, ret, "ccs.ContourData"); olua_postnew(L, ret); @@ -9760,7 +10664,7 @@ static int _cocostudio_ContourData_new(lua_State *L) return num_ret; } -static int _cocostudio_ContourData_get_vertexList(lua_State *L) +static int _olua_fun_cocostudio_ContourData_vertexList$1(lua_State *L) { olua_startinvoke(L); @@ -9771,7 +10675,7 @@ static int _cocostudio_ContourData_get_vertexList(lua_State *L) // std::vector vertexList std::vector &ret = self->vertexList; int num_ret = olua_push_array(L, ret, [L](cocos2d::Vec2 &arg1) { - olua_pushcopy_object(L, arg1, "cc.Vec2"); + olua_copy_object(L, arg1, "cc.Vec2"); }); olua_endinvoke(L); @@ -9779,7 +10683,7 @@ static int _cocostudio_ContourData_get_vertexList(lua_State *L) return num_ret; } -static int _cocostudio_ContourData_set_vertexList(lua_State *L) +static int _olua_fun_cocostudio_ContourData_vertexList$2(lua_State *L) { olua_startinvoke(L); @@ -9799,21 +10703,51 @@ static int _cocostudio_ContourData_set_vertexList(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocostudio_ContourData(lua_State *L) +static int _olua_fun_cocostudio_ContourData_vertexList(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // std::vector vertexList + return _olua_fun_cocostudio_ContourData_vertexList$1(L); + } + + if (num_args == 1) { + // if ((olua_is_array(L, 2))) { + // std::vector vertexList + return _olua_fun_cocostudio_ContourData_vertexList$2(L); + // } + } + + luaL_error(L, "method 'cocostudio::ContourData::vertexList' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_cls_ccs_ContourData(lua_State *L) { oluacls_class(L, "ccs.ContourData"); - oluacls_func(L, "addVertex", _cocostudio_ContourData_addVertex); - oluacls_func(L, "create", _cocostudio_ContourData_create); - oluacls_func(L, "init", _cocostudio_ContourData_init); - oluacls_func(L, "new", _cocostudio_ContourData_new); - oluacls_prop(L, "vertexList", _cocostudio_ContourData_get_vertexList, _cocostudio_ContourData_set_vertexList); + oluacls_func(L, "addVertex", _olua_fun_cocostudio_ContourData_addVertex); + oluacls_func(L, "create", _olua_fun_cocostudio_ContourData_create); + oluacls_func(L, "init", _olua_fun_cocostudio_ContourData_init); + oluacls_func(L, "new", _olua_fun_cocostudio_ContourData_new); + oluacls_prop(L, "vertexList", _olua_fun_cocostudio_ContourData_vertexList, _olua_fun_cocostudio_ContourData_vertexList); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccs_ContourData(lua_State *L) +{ + olua_require(L, "cocos2d_studio", luaopen_cocos2d_studio); + if (!olua_getclass(L, "ccs.ContourData")) { + luaL_error(L, "class not found: cocostudio::ContourData"); + } + return 1; +} OLUA_END_DECLS -static int _cocostudio_DataReaderHelper___gc(lua_State *L) +static int _olua_fun_cocostudio_DataReaderHelper___gc(lua_State *L) { olua_startinvoke(L); @@ -9825,7 +10759,7 @@ static int _cocostudio_DataReaderHelper___gc(lua_State *L) return 0; } -static int _cocostudio_DataReaderHelper___olua_move(lua_State *L) +static int _olua_fun_cocostudio_DataReaderHelper___olua_move(lua_State *L) { olua_startinvoke(L); @@ -9837,7 +10771,7 @@ static int _cocostudio_DataReaderHelper___olua_move(lua_State *L) return 1; } -static int _cocostudio_DataReaderHelper_addDataAsyncCallBack(lua_State *L) +static int _olua_fun_cocostudio_DataReaderHelper_addDataAsyncCallBack(lua_State *L) { olua_startinvoke(L); @@ -9855,7 +10789,7 @@ static int _cocostudio_DataReaderHelper_addDataAsyncCallBack(lua_State *L) return 0; } -static int _cocostudio_DataReaderHelper_addDataFromFile(lua_State *L) +static int _olua_fun_cocostudio_DataReaderHelper_addDataFromFile(lua_State *L) { olua_startinvoke(L); @@ -9873,7 +10807,7 @@ static int _cocostudio_DataReaderHelper_addDataFromFile(lua_State *L) return 0; } -static int _cocostudio_DataReaderHelper_getInstance(lua_State *L) +static int _olua_fun_cocostudio_DataReaderHelper_getInstance(lua_State *L) { olua_startinvoke(L); @@ -9886,7 +10820,7 @@ static int _cocostudio_DataReaderHelper_getInstance(lua_State *L) return num_ret; } -static int _cocostudio_DataReaderHelper_getPositionReadScale(lua_State *L) +static int _olua_fun_cocostudio_DataReaderHelper_getPositionReadScale(lua_State *L) { olua_startinvoke(L); @@ -9899,11 +10833,11 @@ static int _cocostudio_DataReaderHelper_getPositionReadScale(lua_State *L) return num_ret; } -static int _cocostudio_DataReaderHelper_new(lua_State *L) +static int _olua_fun_cocostudio_DataReaderHelper_new(lua_State *L) { olua_startinvoke(L); - // DataReaderHelper() + // cocostudio::DataReaderHelper() cocostudio::DataReaderHelper *ret = new cocostudio::DataReaderHelper(); int num_ret = olua_push_object(L, ret, "ccs.DataReaderHelper"); olua_postnew(L, ret); @@ -9913,7 +10847,7 @@ static int _cocostudio_DataReaderHelper_new(lua_State *L) return num_ret; } -static int _cocostudio_DataReaderHelper_purge(lua_State *L) +static int _olua_fun_cocostudio_DataReaderHelper_purge(lua_State *L) { olua_startinvoke(L); @@ -9925,7 +10859,7 @@ static int _cocostudio_DataReaderHelper_purge(lua_State *L) return 0; } -static int _cocostudio_DataReaderHelper_removeConfigFile(lua_State *L) +static int _olua_fun_cocostudio_DataReaderHelper_removeConfigFile(lua_State *L) { olua_startinvoke(L); @@ -9943,7 +10877,7 @@ static int _cocostudio_DataReaderHelper_removeConfigFile(lua_State *L) return 0; } -static int _cocostudio_DataReaderHelper_setPositionReadScale(lua_State *L) +static int _olua_fun_cocostudio_DataReaderHelper_setPositionReadScale(lua_State *L) { olua_startinvoke(L); @@ -9959,28 +10893,37 @@ static int _cocostudio_DataReaderHelper_setPositionReadScale(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocostudio_DataReaderHelper(lua_State *L) +static int _olua_cls_ccs_DataReaderHelper(lua_State *L) { oluacls_class(L, "ccs.DataReaderHelper"); - oluacls_func(L, "__gc", _cocostudio_DataReaderHelper___gc); - oluacls_func(L, "__olua_move", _cocostudio_DataReaderHelper___olua_move); - oluacls_func(L, "addDataAsyncCallBack", _cocostudio_DataReaderHelper_addDataAsyncCallBack); - oluacls_func(L, "addDataFromFile", _cocostudio_DataReaderHelper_addDataFromFile); - oluacls_func(L, "getInstance", _cocostudio_DataReaderHelper_getInstance); - oluacls_func(L, "getPositionReadScale", _cocostudio_DataReaderHelper_getPositionReadScale); - oluacls_func(L, "new", _cocostudio_DataReaderHelper_new); - oluacls_func(L, "purge", _cocostudio_DataReaderHelper_purge); - oluacls_func(L, "removeConfigFile", _cocostudio_DataReaderHelper_removeConfigFile); - oluacls_func(L, "setPositionReadScale", _cocostudio_DataReaderHelper_setPositionReadScale); - oluacls_prop(L, "instance", _cocostudio_DataReaderHelper_getInstance, nullptr); - oluacls_prop(L, "positionReadScale", _cocostudio_DataReaderHelper_getPositionReadScale, _cocostudio_DataReaderHelper_setPositionReadScale); + oluacls_func(L, "__gc", _olua_fun_cocostudio_DataReaderHelper___gc); + oluacls_func(L, "__olua_move", _olua_fun_cocostudio_DataReaderHelper___olua_move); + oluacls_func(L, "addDataAsyncCallBack", _olua_fun_cocostudio_DataReaderHelper_addDataAsyncCallBack); + oluacls_func(L, "addDataFromFile", _olua_fun_cocostudio_DataReaderHelper_addDataFromFile); + oluacls_func(L, "getInstance", _olua_fun_cocostudio_DataReaderHelper_getInstance); + oluacls_func(L, "getPositionReadScale", _olua_fun_cocostudio_DataReaderHelper_getPositionReadScale); + oluacls_func(L, "new", _olua_fun_cocostudio_DataReaderHelper_new); + oluacls_func(L, "purge", _olua_fun_cocostudio_DataReaderHelper_purge); + oluacls_func(L, "removeConfigFile", _olua_fun_cocostudio_DataReaderHelper_removeConfigFile); + oluacls_func(L, "setPositionReadScale", _olua_fun_cocostudio_DataReaderHelper_setPositionReadScale); + oluacls_prop(L, "instance", _olua_fun_cocostudio_DataReaderHelper_getInstance, nullptr); + oluacls_prop(L, "positionReadScale", _olua_fun_cocostudio_DataReaderHelper_getPositionReadScale, _olua_fun_cocostudio_DataReaderHelper_setPositionReadScale); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccs_DataReaderHelper(lua_State *L) +{ + olua_require(L, "cocos2d_studio", luaopen_cocos2d_studio); + if (!olua_getclass(L, "ccs.DataReaderHelper")) { + luaL_error(L, "class not found: cocostudio::DataReaderHelper"); + } return 1; } OLUA_END_DECLS -static int _cocostudio_DecorativeDisplay_create(lua_State *L) +static int _olua_fun_cocostudio_DecorativeDisplay_create(lua_State *L) { olua_startinvoke(L); @@ -9993,7 +10936,7 @@ static int _cocostudio_DecorativeDisplay_create(lua_State *L) return num_ret; } -static int _cocostudio_DecorativeDisplay_getColliderDetector(lua_State *L) +static int _olua_fun_cocostudio_DecorativeDisplay_getColliderDetector(lua_State *L) { olua_startinvoke(L); @@ -10010,7 +10953,7 @@ static int _cocostudio_DecorativeDisplay_getColliderDetector(lua_State *L) return num_ret; } -static int _cocostudio_DecorativeDisplay_getDisplay(lua_State *L) +static int _olua_fun_cocostudio_DecorativeDisplay_getDisplay(lua_State *L) { olua_startinvoke(L); @@ -10027,7 +10970,7 @@ static int _cocostudio_DecorativeDisplay_getDisplay(lua_State *L) return num_ret; } -static int _cocostudio_DecorativeDisplay_getDisplayData(lua_State *L) +static int _olua_fun_cocostudio_DecorativeDisplay_getDisplayData(lua_State *L) { olua_startinvoke(L); @@ -10044,7 +10987,7 @@ static int _cocostudio_DecorativeDisplay_getDisplayData(lua_State *L) return num_ret; } -static int _cocostudio_DecorativeDisplay_init(lua_State *L) +static int _olua_fun_cocostudio_DecorativeDisplay_init(lua_State *L) { olua_startinvoke(L); @@ -10061,11 +11004,11 @@ static int _cocostudio_DecorativeDisplay_init(lua_State *L) return num_ret; } -static int _cocostudio_DecorativeDisplay_new(lua_State *L) +static int _olua_fun_cocostudio_DecorativeDisplay_new(lua_State *L) { olua_startinvoke(L); - // DecorativeDisplay() + // cocostudio::DecorativeDisplay() cocostudio::DecorativeDisplay *ret = new cocostudio::DecorativeDisplay(); int num_ret = olua_push_object(L, ret, "ccs.DecorativeDisplay"); olua_postnew(L, ret); @@ -10075,7 +11018,7 @@ static int _cocostudio_DecorativeDisplay_new(lua_State *L) return num_ret; } -static int _cocostudio_DecorativeDisplay_setColliderDetector(lua_State *L) +static int _olua_fun_cocostudio_DecorativeDisplay_setColliderDetector(lua_State *L) { olua_startinvoke(L); @@ -10093,7 +11036,7 @@ static int _cocostudio_DecorativeDisplay_setColliderDetector(lua_State *L) return 0; } -static int _cocostudio_DecorativeDisplay_setDisplay(lua_State *L) +static int _olua_fun_cocostudio_DecorativeDisplay_setDisplay(lua_State *L) { olua_startinvoke(L); @@ -10111,7 +11054,7 @@ static int _cocostudio_DecorativeDisplay_setDisplay(lua_State *L) return 0; } -static int _cocostudio_DecorativeDisplay_setDisplayData(lua_State *L) +static int _olua_fun_cocostudio_DecorativeDisplay_setDisplayData(lua_State *L) { olua_startinvoke(L); @@ -10129,28 +11072,37 @@ static int _cocostudio_DecorativeDisplay_setDisplayData(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocostudio_DecorativeDisplay(lua_State *L) +static int _olua_cls_ccs_DecorativeDisplay(lua_State *L) { oluacls_class(L, "ccs.DecorativeDisplay"); - oluacls_func(L, "create", _cocostudio_DecorativeDisplay_create); - oluacls_func(L, "getColliderDetector", _cocostudio_DecorativeDisplay_getColliderDetector); - oluacls_func(L, "getDisplay", _cocostudio_DecorativeDisplay_getDisplay); - oluacls_func(L, "getDisplayData", _cocostudio_DecorativeDisplay_getDisplayData); - oluacls_func(L, "init", _cocostudio_DecorativeDisplay_init); - oluacls_func(L, "new", _cocostudio_DecorativeDisplay_new); - oluacls_func(L, "setColliderDetector", _cocostudio_DecorativeDisplay_setColliderDetector); - oluacls_func(L, "setDisplay", _cocostudio_DecorativeDisplay_setDisplay); - oluacls_func(L, "setDisplayData", _cocostudio_DecorativeDisplay_setDisplayData); - oluacls_prop(L, "colliderDetector", _cocostudio_DecorativeDisplay_getColliderDetector, _cocostudio_DecorativeDisplay_setColliderDetector); - oluacls_prop(L, "display", _cocostudio_DecorativeDisplay_getDisplay, _cocostudio_DecorativeDisplay_setDisplay); - oluacls_prop(L, "displayData", _cocostudio_DecorativeDisplay_getDisplayData, _cocostudio_DecorativeDisplay_setDisplayData); + oluacls_func(L, "create", _olua_fun_cocostudio_DecorativeDisplay_create); + oluacls_func(L, "getColliderDetector", _olua_fun_cocostudio_DecorativeDisplay_getColliderDetector); + oluacls_func(L, "getDisplay", _olua_fun_cocostudio_DecorativeDisplay_getDisplay); + oluacls_func(L, "getDisplayData", _olua_fun_cocostudio_DecorativeDisplay_getDisplayData); + oluacls_func(L, "init", _olua_fun_cocostudio_DecorativeDisplay_init); + oluacls_func(L, "new", _olua_fun_cocostudio_DecorativeDisplay_new); + oluacls_func(L, "setColliderDetector", _olua_fun_cocostudio_DecorativeDisplay_setColliderDetector); + oluacls_func(L, "setDisplay", _olua_fun_cocostudio_DecorativeDisplay_setDisplay); + oluacls_func(L, "setDisplayData", _olua_fun_cocostudio_DecorativeDisplay_setDisplayData); + oluacls_prop(L, "colliderDetector", _olua_fun_cocostudio_DecorativeDisplay_getColliderDetector, _olua_fun_cocostudio_DecorativeDisplay_setColliderDetector); + oluacls_prop(L, "display", _olua_fun_cocostudio_DecorativeDisplay_getDisplay, _olua_fun_cocostudio_DecorativeDisplay_setDisplay); + oluacls_prop(L, "displayData", _olua_fun_cocostudio_DecorativeDisplay_getDisplayData, _olua_fun_cocostudio_DecorativeDisplay_setDisplayData); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccs_DecorativeDisplay(lua_State *L) +{ + olua_require(L, "cocos2d_studio", luaopen_cocos2d_studio); + if (!olua_getclass(L, "ccs.DecorativeDisplay")) { + luaL_error(L, "class not found: cocostudio::DecorativeDisplay"); + } return 1; } OLUA_END_DECLS -static int _cocostudio_DisplayFactory___gc(lua_State *L) +static int _olua_fun_cocostudio_DisplayFactory___gc(lua_State *L) { olua_startinvoke(L); @@ -10162,7 +11114,7 @@ static int _cocostudio_DisplayFactory___gc(lua_State *L) return 0; } -static int _cocostudio_DisplayFactory___olua_move(lua_State *L) +static int _olua_fun_cocostudio_DisplayFactory___olua_move(lua_State *L) { olua_startinvoke(L); @@ -10174,7 +11126,7 @@ static int _cocostudio_DisplayFactory___olua_move(lua_State *L) return 1; } -static int _cocostudio_DisplayFactory_addArmatureDisplay(lua_State *L) +static int _olua_fun_cocostudio_DisplayFactory_addArmatureDisplay(lua_State *L) { olua_startinvoke(L); @@ -10194,7 +11146,7 @@ static int _cocostudio_DisplayFactory_addArmatureDisplay(lua_State *L) return 0; } -static int _cocostudio_DisplayFactory_addDisplay(lua_State *L) +static int _olua_fun_cocostudio_DisplayFactory_addDisplay(lua_State *L) { olua_startinvoke(L); @@ -10214,7 +11166,7 @@ static int _cocostudio_DisplayFactory_addDisplay(lua_State *L) return 0; } -static int _cocostudio_DisplayFactory_addParticleDisplay(lua_State *L) +static int _olua_fun_cocostudio_DisplayFactory_addParticleDisplay(lua_State *L) { olua_startinvoke(L); @@ -10234,7 +11186,7 @@ static int _cocostudio_DisplayFactory_addParticleDisplay(lua_State *L) return 0; } -static int _cocostudio_DisplayFactory_addSpriteDisplay(lua_State *L) +static int _olua_fun_cocostudio_DisplayFactory_addSpriteDisplay(lua_State *L) { olua_startinvoke(L); @@ -10254,7 +11206,7 @@ static int _cocostudio_DisplayFactory_addSpriteDisplay(lua_State *L) return 0; } -static int _cocostudio_DisplayFactory_createArmatureDisplay(lua_State *L) +static int _olua_fun_cocostudio_DisplayFactory_createArmatureDisplay(lua_State *L) { olua_startinvoke(L); @@ -10272,7 +11224,7 @@ static int _cocostudio_DisplayFactory_createArmatureDisplay(lua_State *L) return 0; } -static int _cocostudio_DisplayFactory_createDisplay(lua_State *L) +static int _olua_fun_cocostudio_DisplayFactory_createDisplay(lua_State *L) { olua_startinvoke(L); @@ -10290,7 +11242,7 @@ static int _cocostudio_DisplayFactory_createDisplay(lua_State *L) return 0; } -static int _cocostudio_DisplayFactory_createParticleDisplay(lua_State *L) +static int _olua_fun_cocostudio_DisplayFactory_createParticleDisplay(lua_State *L) { olua_startinvoke(L); @@ -10308,7 +11260,7 @@ static int _cocostudio_DisplayFactory_createParticleDisplay(lua_State *L) return 0; } -static int _cocostudio_DisplayFactory_createSpriteDisplay(lua_State *L) +static int _olua_fun_cocostudio_DisplayFactory_createSpriteDisplay(lua_State *L) { olua_startinvoke(L); @@ -10326,7 +11278,7 @@ static int _cocostudio_DisplayFactory_createSpriteDisplay(lua_State *L) return 0; } -static int _cocostudio_DisplayFactory_initSpriteDisplay(lua_State *L) +static int _olua_fun_cocostudio_DisplayFactory_initSpriteDisplay(lua_State *L) { olua_startinvoke(L); @@ -10348,7 +11300,7 @@ static int _cocostudio_DisplayFactory_initSpriteDisplay(lua_State *L) return 0; } -static int _cocostudio_DisplayFactory_updateArmatureDisplay(lua_State *L) +static int _olua_fun_cocostudio_DisplayFactory_updateArmatureDisplay(lua_State *L) { olua_startinvoke(L); @@ -10368,7 +11320,7 @@ static int _cocostudio_DisplayFactory_updateArmatureDisplay(lua_State *L) return 0; } -static int _cocostudio_DisplayFactory_updateDisplay(lua_State *L) +static int _olua_fun_cocostudio_DisplayFactory_updateDisplay(lua_State *L) { olua_startinvoke(L); @@ -10388,7 +11340,7 @@ static int _cocostudio_DisplayFactory_updateDisplay(lua_State *L) return 0; } -static int _cocostudio_DisplayFactory_updateParticleDisplay(lua_State *L) +static int _olua_fun_cocostudio_DisplayFactory_updateParticleDisplay(lua_State *L) { olua_startinvoke(L); @@ -10408,32 +11360,41 @@ static int _cocostudio_DisplayFactory_updateParticleDisplay(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocostudio_DisplayFactory(lua_State *L) +static int _olua_cls_ccs_DisplayFactory(lua_State *L) { oluacls_class(L, "ccs.DisplayFactory"); - oluacls_func(L, "__gc", _cocostudio_DisplayFactory___gc); - oluacls_func(L, "__olua_move", _cocostudio_DisplayFactory___olua_move); - oluacls_func(L, "addArmatureDisplay", _cocostudio_DisplayFactory_addArmatureDisplay); - oluacls_func(L, "addDisplay", _cocostudio_DisplayFactory_addDisplay); - oluacls_func(L, "addParticleDisplay", _cocostudio_DisplayFactory_addParticleDisplay); - oluacls_func(L, "addSpriteDisplay", _cocostudio_DisplayFactory_addSpriteDisplay); - oluacls_func(L, "createArmatureDisplay", _cocostudio_DisplayFactory_createArmatureDisplay); - oluacls_func(L, "createDisplay", _cocostudio_DisplayFactory_createDisplay); - oluacls_func(L, "createParticleDisplay", _cocostudio_DisplayFactory_createParticleDisplay); - oluacls_func(L, "createSpriteDisplay", _cocostudio_DisplayFactory_createSpriteDisplay); - oluacls_func(L, "initSpriteDisplay", _cocostudio_DisplayFactory_initSpriteDisplay); - oluacls_func(L, "updateArmatureDisplay", _cocostudio_DisplayFactory_updateArmatureDisplay); - oluacls_func(L, "updateDisplay", _cocostudio_DisplayFactory_updateDisplay); - oluacls_func(L, "updateParticleDisplay", _cocostudio_DisplayFactory_updateParticleDisplay); + oluacls_func(L, "__gc", _olua_fun_cocostudio_DisplayFactory___gc); + oluacls_func(L, "__olua_move", _olua_fun_cocostudio_DisplayFactory___olua_move); + oluacls_func(L, "addArmatureDisplay", _olua_fun_cocostudio_DisplayFactory_addArmatureDisplay); + oluacls_func(L, "addDisplay", _olua_fun_cocostudio_DisplayFactory_addDisplay); + oluacls_func(L, "addParticleDisplay", _olua_fun_cocostudio_DisplayFactory_addParticleDisplay); + oluacls_func(L, "addSpriteDisplay", _olua_fun_cocostudio_DisplayFactory_addSpriteDisplay); + oluacls_func(L, "createArmatureDisplay", _olua_fun_cocostudio_DisplayFactory_createArmatureDisplay); + oluacls_func(L, "createDisplay", _olua_fun_cocostudio_DisplayFactory_createDisplay); + oluacls_func(L, "createParticleDisplay", _olua_fun_cocostudio_DisplayFactory_createParticleDisplay); + oluacls_func(L, "createSpriteDisplay", _olua_fun_cocostudio_DisplayFactory_createSpriteDisplay); + oluacls_func(L, "initSpriteDisplay", _olua_fun_cocostudio_DisplayFactory_initSpriteDisplay); + oluacls_func(L, "updateArmatureDisplay", _olua_fun_cocostudio_DisplayFactory_updateArmatureDisplay); + oluacls_func(L, "updateDisplay", _olua_fun_cocostudio_DisplayFactory_updateDisplay); + oluacls_func(L, "updateParticleDisplay", _olua_fun_cocostudio_DisplayFactory_updateParticleDisplay); return 1; } -OLUA_END_DECLS -static int _cocostudio_DisplayManager_addDisplay$1(lua_State *L) +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccs_DisplayFactory(lua_State *L) { - olua_startinvoke(L); + olua_require(L, "cocos2d_studio", luaopen_cocos2d_studio); + if (!olua_getclass(L, "ccs.DisplayFactory")) { + luaL_error(L, "class not found: cocostudio::DisplayFactory"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_fun_cocostudio_DisplayManager_addDisplay$1(lua_State *L) +{ + olua_startinvoke(L); cocostudio::DisplayManager *self = nullptr; cocostudio::DisplayData *arg1 = nullptr; /** displayData */ @@ -10451,7 +11412,7 @@ static int _cocostudio_DisplayManager_addDisplay$1(lua_State *L) return 0; } -static int _cocostudio_DisplayManager_addDisplay$2(lua_State *L) +static int _olua_fun_cocostudio_DisplayManager_addDisplay$2(lua_State *L) { olua_startinvoke(L); @@ -10471,19 +11432,19 @@ static int _cocostudio_DisplayManager_addDisplay$2(lua_State *L) return 0; } -static int _cocostudio_DisplayManager_addDisplay(lua_State *L) +static int _olua_fun_cocostudio_DisplayManager_addDisplay(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 2) { if ((olua_is_object(L, 2, "ccs.DisplayData")) && (olua_is_integer(L, 3))) { // void addDisplay(cocostudio::DisplayData *displayData, int index) - return _cocostudio_DisplayManager_addDisplay$1(L); + return _olua_fun_cocostudio_DisplayManager_addDisplay$1(L); } // if ((olua_is_object(L, 2, "cc.Node")) && (olua_is_integer(L, 3))) { // void addDisplay(cocos2d::Node *display, int index) - return _cocostudio_DisplayManager_addDisplay$2(L); + return _olua_fun_cocostudio_DisplayManager_addDisplay$2(L); // } } @@ -10492,7 +11453,7 @@ static int _cocostudio_DisplayManager_addDisplay(lua_State *L) return 0; } -static int _cocostudio_DisplayManager_changeDisplayWithIndex(lua_State *L) +static int _olua_fun_cocostudio_DisplayManager_changeDisplayWithIndex(lua_State *L) { olua_startinvoke(L); @@ -10512,7 +11473,7 @@ static int _cocostudio_DisplayManager_changeDisplayWithIndex(lua_State *L) return 0; } -static int _cocostudio_DisplayManager_changeDisplayWithName(lua_State *L) +static int _olua_fun_cocostudio_DisplayManager_changeDisplayWithName(lua_State *L) { olua_startinvoke(L); @@ -10532,7 +11493,7 @@ static int _cocostudio_DisplayManager_changeDisplayWithName(lua_State *L) return 0; } -static int _cocostudio_DisplayManager_containPoint$1(lua_State *L) +static int _olua_fun_cocostudio_DisplayManager_containPoint$1(lua_State *L) { olua_startinvoke(L); @@ -10551,7 +11512,7 @@ static int _cocostudio_DisplayManager_containPoint$1(lua_State *L) return num_ret; } -static int _cocostudio_DisplayManager_containPoint$2(lua_State *L) +static int _olua_fun_cocostudio_DisplayManager_containPoint$2(lua_State *L) { olua_startinvoke(L); @@ -10572,21 +11533,21 @@ static int _cocostudio_DisplayManager_containPoint$2(lua_State *L) return num_ret; } -static int _cocostudio_DisplayManager_containPoint(lua_State *L) +static int _olua_fun_cocostudio_DisplayManager_containPoint(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_object(L, 2, "cc.Vec2"))) { // bool containPoint(cocos2d::Vec2 &_point) - return _cocostudio_DisplayManager_containPoint$1(L); + return _olua_fun_cocostudio_DisplayManager_containPoint$1(L); // } } if (num_args == 2) { // if ((olua_is_number(L, 2)) && (olua_is_number(L, 3))) { // bool containPoint(float x, float y) - return _cocostudio_DisplayManager_containPoint$2(L); + return _olua_fun_cocostudio_DisplayManager_containPoint$2(L); // } } @@ -10595,7 +11556,7 @@ static int _cocostudio_DisplayManager_containPoint(lua_State *L) return 0; } -static int _cocostudio_DisplayManager_create(lua_State *L) +static int _olua_fun_cocostudio_DisplayManager_create(lua_State *L) { olua_startinvoke(L); @@ -10612,7 +11573,7 @@ static int _cocostudio_DisplayManager_create(lua_State *L) return num_ret; } -static int _cocostudio_DisplayManager_getAnchorPoint(lua_State *L) +static int _olua_fun_cocostudio_DisplayManager_getAnchorPoint(lua_State *L) { olua_startinvoke(L); @@ -10622,14 +11583,14 @@ static int _cocostudio_DisplayManager_getAnchorPoint(lua_State *L) // cocos2d::Vec2 getAnchorPoint() cocos2d::Vec2 ret = self->getAnchorPoint(); - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec2"); + int num_ret = olua_copy_object(L, ret, "cc.Vec2"); olua_endinvoke(L); return num_ret; } -static int _cocostudio_DisplayManager_getAnchorPointInPoints(lua_State *L) +static int _olua_fun_cocostudio_DisplayManager_getAnchorPointInPoints(lua_State *L) { olua_startinvoke(L); @@ -10639,14 +11600,14 @@ static int _cocostudio_DisplayManager_getAnchorPointInPoints(lua_State *L) // cocos2d::Vec2 getAnchorPointInPoints() cocos2d::Vec2 ret = self->getAnchorPointInPoints(); - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec2"); + int num_ret = olua_copy_object(L, ret, "cc.Vec2"); olua_endinvoke(L); return num_ret; } -static int _cocostudio_DisplayManager_getBoundingBox(lua_State *L) +static int _olua_fun_cocostudio_DisplayManager_getBoundingBox(lua_State *L) { olua_startinvoke(L); @@ -10656,14 +11617,14 @@ static int _cocostudio_DisplayManager_getBoundingBox(lua_State *L) // cocos2d::Rect getBoundingBox() cocos2d::Rect ret = self->getBoundingBox(); - int num_ret = olua_pushcopy_object(L, ret, "cc.Rect"); + int num_ret = olua_copy_object(L, ret, "cc.Rect"); olua_endinvoke(L); return num_ret; } -static int _cocostudio_DisplayManager_getContentSize(lua_State *L) +static int _olua_fun_cocostudio_DisplayManager_getContentSize(lua_State *L) { olua_startinvoke(L); @@ -10673,14 +11634,14 @@ static int _cocostudio_DisplayManager_getContentSize(lua_State *L) // cocos2d::Size getContentSize() cocos2d::Size ret = self->getContentSize(); - int num_ret = olua_pushcopy_object(L, ret, "cc.Size"); + int num_ret = olua_copy_object(L, ret, "cc.Size"); olua_endinvoke(L); return num_ret; } -static int _cocostudio_DisplayManager_getCurrentDecorativeDisplay(lua_State *L) +static int _olua_fun_cocostudio_DisplayManager_getCurrentDecorativeDisplay(lua_State *L) { olua_startinvoke(L); @@ -10697,7 +11658,7 @@ static int _cocostudio_DisplayManager_getCurrentDecorativeDisplay(lua_State *L) return num_ret; } -static int _cocostudio_DisplayManager_getCurrentDisplayIndex(lua_State *L) +static int _olua_fun_cocostudio_DisplayManager_getCurrentDisplayIndex(lua_State *L) { olua_startinvoke(L); @@ -10714,7 +11675,7 @@ static int _cocostudio_DisplayManager_getCurrentDisplayIndex(lua_State *L) return num_ret; } -static int _cocostudio_DisplayManager_getDecorativeDisplayByIndex(lua_State *L) +static int _olua_fun_cocostudio_DisplayManager_getDecorativeDisplayByIndex(lua_State *L) { olua_startinvoke(L); @@ -10733,7 +11694,7 @@ static int _cocostudio_DisplayManager_getDecorativeDisplayByIndex(lua_State *L) return num_ret; } -static int _cocostudio_DisplayManager_getDecorativeDisplayList(lua_State *L) +static int _olua_fun_cocostudio_DisplayManager_getDecorativeDisplayList(lua_State *L) { olua_startinvoke(L); @@ -10752,7 +11713,7 @@ static int _cocostudio_DisplayManager_getDecorativeDisplayList(lua_State *L) return num_ret; } -static int _cocostudio_DisplayManager_getDisplayRenderNode(lua_State *L) +static int _olua_fun_cocostudio_DisplayManager_getDisplayRenderNode(lua_State *L) { olua_startinvoke(L); @@ -10769,7 +11730,7 @@ static int _cocostudio_DisplayManager_getDisplayRenderNode(lua_State *L) return num_ret; } -static int _cocostudio_DisplayManager_getDisplayRenderNodeType(lua_State *L) +static int _olua_fun_cocostudio_DisplayManager_getDisplayRenderNodeType(lua_State *L) { olua_startinvoke(L); @@ -10786,7 +11747,7 @@ static int _cocostudio_DisplayManager_getDisplayRenderNodeType(lua_State *L) return num_ret; } -static int _cocostudio_DisplayManager_init(lua_State *L) +static int _olua_fun_cocostudio_DisplayManager_init(lua_State *L) { olua_startinvoke(L); @@ -10805,7 +11766,7 @@ static int _cocostudio_DisplayManager_init(lua_State *L) return num_ret; } -static int _cocostudio_DisplayManager_initDisplayList(lua_State *L) +static int _olua_fun_cocostudio_DisplayManager_initDisplayList(lua_State *L) { olua_startinvoke(L); @@ -10823,7 +11784,7 @@ static int _cocostudio_DisplayManager_initDisplayList(lua_State *L) return 0; } -static int _cocostudio_DisplayManager_isForceChangeDisplay(lua_State *L) +static int _olua_fun_cocostudio_DisplayManager_isForceChangeDisplay(lua_State *L) { olua_startinvoke(L); @@ -10840,7 +11801,7 @@ static int _cocostudio_DisplayManager_isForceChangeDisplay(lua_State *L) return num_ret; } -static int _cocostudio_DisplayManager_isVisible(lua_State *L) +static int _olua_fun_cocostudio_DisplayManager_isVisible(lua_State *L) { olua_startinvoke(L); @@ -10857,11 +11818,11 @@ static int _cocostudio_DisplayManager_isVisible(lua_State *L) return num_ret; } -static int _cocostudio_DisplayManager_new(lua_State *L) +static int _olua_fun_cocostudio_DisplayManager_new(lua_State *L) { olua_startinvoke(L); - // DisplayManager() + // cocostudio::DisplayManager() cocostudio::DisplayManager *ret = new cocostudio::DisplayManager(); int num_ret = olua_push_object(L, ret, "ccs.DisplayManager"); olua_postnew(L, ret); @@ -10871,7 +11832,7 @@ static int _cocostudio_DisplayManager_new(lua_State *L) return num_ret; } -static int _cocostudio_DisplayManager_removeDisplay(lua_State *L) +static int _olua_fun_cocostudio_DisplayManager_removeDisplay(lua_State *L) { olua_startinvoke(L); @@ -10889,7 +11850,7 @@ static int _cocostudio_DisplayManager_removeDisplay(lua_State *L) return 0; } -static int _cocostudio_DisplayManager_setCurrentDecorativeDisplay(lua_State *L) +static int _olua_fun_cocostudio_DisplayManager_setCurrentDecorativeDisplay(lua_State *L) { olua_startinvoke(L); @@ -10907,7 +11868,7 @@ static int _cocostudio_DisplayManager_setCurrentDecorativeDisplay(lua_State *L) return 0; } -static int _cocostudio_DisplayManager_setForceChangeDisplay(lua_State *L) +static int _olua_fun_cocostudio_DisplayManager_setForceChangeDisplay(lua_State *L) { olua_startinvoke(L); @@ -10925,7 +11886,7 @@ static int _cocostudio_DisplayManager_setForceChangeDisplay(lua_State *L) return 0; } -static int _cocostudio_DisplayManager_setVisible(lua_State *L) +static int _olua_fun_cocostudio_DisplayManager_setVisible(lua_State *L) { olua_startinvoke(L); @@ -10943,113 +11904,129 @@ static int _cocostudio_DisplayManager_setVisible(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocostudio_DisplayManager(lua_State *L) +static int _olua_cls_ccs_DisplayManager(lua_State *L) { oluacls_class(L, "ccs.DisplayManager"); - oluacls_func(L, "addDisplay", _cocostudio_DisplayManager_addDisplay); - oluacls_func(L, "changeDisplayWithIndex", _cocostudio_DisplayManager_changeDisplayWithIndex); - oluacls_func(L, "changeDisplayWithName", _cocostudio_DisplayManager_changeDisplayWithName); - oluacls_func(L, "containPoint", _cocostudio_DisplayManager_containPoint); - oluacls_func(L, "create", _cocostudio_DisplayManager_create); - oluacls_func(L, "getAnchorPoint", _cocostudio_DisplayManager_getAnchorPoint); - oluacls_func(L, "getAnchorPointInPoints", _cocostudio_DisplayManager_getAnchorPointInPoints); - oluacls_func(L, "getBoundingBox", _cocostudio_DisplayManager_getBoundingBox); - oluacls_func(L, "getContentSize", _cocostudio_DisplayManager_getContentSize); - oluacls_func(L, "getCurrentDecorativeDisplay", _cocostudio_DisplayManager_getCurrentDecorativeDisplay); - oluacls_func(L, "getCurrentDisplayIndex", _cocostudio_DisplayManager_getCurrentDisplayIndex); - oluacls_func(L, "getDecorativeDisplayByIndex", _cocostudio_DisplayManager_getDecorativeDisplayByIndex); - oluacls_func(L, "getDecorativeDisplayList", _cocostudio_DisplayManager_getDecorativeDisplayList); - oluacls_func(L, "getDisplayRenderNode", _cocostudio_DisplayManager_getDisplayRenderNode); - oluacls_func(L, "getDisplayRenderNodeType", _cocostudio_DisplayManager_getDisplayRenderNodeType); - oluacls_func(L, "init", _cocostudio_DisplayManager_init); - oluacls_func(L, "initDisplayList", _cocostudio_DisplayManager_initDisplayList); - oluacls_func(L, "isForceChangeDisplay", _cocostudio_DisplayManager_isForceChangeDisplay); - oluacls_func(L, "isVisible", _cocostudio_DisplayManager_isVisible); - oluacls_func(L, "new", _cocostudio_DisplayManager_new); - oluacls_func(L, "removeDisplay", _cocostudio_DisplayManager_removeDisplay); - oluacls_func(L, "setCurrentDecorativeDisplay", _cocostudio_DisplayManager_setCurrentDecorativeDisplay); - oluacls_func(L, "setForceChangeDisplay", _cocostudio_DisplayManager_setForceChangeDisplay); - oluacls_func(L, "setVisible", _cocostudio_DisplayManager_setVisible); - oluacls_prop(L, "anchorPoint", _cocostudio_DisplayManager_getAnchorPoint, nullptr); - oluacls_prop(L, "anchorPointInPoints", _cocostudio_DisplayManager_getAnchorPointInPoints, nullptr); - oluacls_prop(L, "boundingBox", _cocostudio_DisplayManager_getBoundingBox, nullptr); - oluacls_prop(L, "contentSize", _cocostudio_DisplayManager_getContentSize, nullptr); - oluacls_prop(L, "currentDecorativeDisplay", _cocostudio_DisplayManager_getCurrentDecorativeDisplay, _cocostudio_DisplayManager_setCurrentDecorativeDisplay); - oluacls_prop(L, "currentDisplayIndex", _cocostudio_DisplayManager_getCurrentDisplayIndex, nullptr); - oluacls_prop(L, "decorativeDisplayList", _cocostudio_DisplayManager_getDecorativeDisplayList, nullptr); - oluacls_prop(L, "displayRenderNode", _cocostudio_DisplayManager_getDisplayRenderNode, nullptr); - oluacls_prop(L, "displayRenderNodeType", _cocostudio_DisplayManager_getDisplayRenderNodeType, nullptr); - oluacls_prop(L, "forceChangeDisplay", _cocostudio_DisplayManager_isForceChangeDisplay, _cocostudio_DisplayManager_setForceChangeDisplay); - oluacls_prop(L, "visible", _cocostudio_DisplayManager_isVisible, _cocostudio_DisplayManager_setVisible); + oluacls_func(L, "addDisplay", _olua_fun_cocostudio_DisplayManager_addDisplay); + oluacls_func(L, "changeDisplayWithIndex", _olua_fun_cocostudio_DisplayManager_changeDisplayWithIndex); + oluacls_func(L, "changeDisplayWithName", _olua_fun_cocostudio_DisplayManager_changeDisplayWithName); + oluacls_func(L, "containPoint", _olua_fun_cocostudio_DisplayManager_containPoint); + oluacls_func(L, "create", _olua_fun_cocostudio_DisplayManager_create); + oluacls_func(L, "getAnchorPoint", _olua_fun_cocostudio_DisplayManager_getAnchorPoint); + oluacls_func(L, "getAnchorPointInPoints", _olua_fun_cocostudio_DisplayManager_getAnchorPointInPoints); + oluacls_func(L, "getBoundingBox", _olua_fun_cocostudio_DisplayManager_getBoundingBox); + oluacls_func(L, "getContentSize", _olua_fun_cocostudio_DisplayManager_getContentSize); + oluacls_func(L, "getCurrentDecorativeDisplay", _olua_fun_cocostudio_DisplayManager_getCurrentDecorativeDisplay); + oluacls_func(L, "getCurrentDisplayIndex", _olua_fun_cocostudio_DisplayManager_getCurrentDisplayIndex); + oluacls_func(L, "getDecorativeDisplayByIndex", _olua_fun_cocostudio_DisplayManager_getDecorativeDisplayByIndex); + oluacls_func(L, "getDecorativeDisplayList", _olua_fun_cocostudio_DisplayManager_getDecorativeDisplayList); + oluacls_func(L, "getDisplayRenderNode", _olua_fun_cocostudio_DisplayManager_getDisplayRenderNode); + oluacls_func(L, "getDisplayRenderNodeType", _olua_fun_cocostudio_DisplayManager_getDisplayRenderNodeType); + oluacls_func(L, "init", _olua_fun_cocostudio_DisplayManager_init); + oluacls_func(L, "initDisplayList", _olua_fun_cocostudio_DisplayManager_initDisplayList); + oluacls_func(L, "isForceChangeDisplay", _olua_fun_cocostudio_DisplayManager_isForceChangeDisplay); + oluacls_func(L, "isVisible", _olua_fun_cocostudio_DisplayManager_isVisible); + oluacls_func(L, "new", _olua_fun_cocostudio_DisplayManager_new); + oluacls_func(L, "removeDisplay", _olua_fun_cocostudio_DisplayManager_removeDisplay); + oluacls_func(L, "setCurrentDecorativeDisplay", _olua_fun_cocostudio_DisplayManager_setCurrentDecorativeDisplay); + oluacls_func(L, "setForceChangeDisplay", _olua_fun_cocostudio_DisplayManager_setForceChangeDisplay); + oluacls_func(L, "setVisible", _olua_fun_cocostudio_DisplayManager_setVisible); + oluacls_prop(L, "anchorPoint", _olua_fun_cocostudio_DisplayManager_getAnchorPoint, nullptr); + oluacls_prop(L, "anchorPointInPoints", _olua_fun_cocostudio_DisplayManager_getAnchorPointInPoints, nullptr); + oluacls_prop(L, "boundingBox", _olua_fun_cocostudio_DisplayManager_getBoundingBox, nullptr); + oluacls_prop(L, "contentSize", _olua_fun_cocostudio_DisplayManager_getContentSize, nullptr); + oluacls_prop(L, "currentDecorativeDisplay", _olua_fun_cocostudio_DisplayManager_getCurrentDecorativeDisplay, _olua_fun_cocostudio_DisplayManager_setCurrentDecorativeDisplay); + oluacls_prop(L, "currentDisplayIndex", _olua_fun_cocostudio_DisplayManager_getCurrentDisplayIndex, nullptr); + oluacls_prop(L, "decorativeDisplayList", _olua_fun_cocostudio_DisplayManager_getDecorativeDisplayList, nullptr); + oluacls_prop(L, "displayRenderNode", _olua_fun_cocostudio_DisplayManager_getDisplayRenderNode, nullptr); + oluacls_prop(L, "displayRenderNodeType", _olua_fun_cocostudio_DisplayManager_getDisplayRenderNodeType, nullptr); + oluacls_prop(L, "forceChangeDisplay", _olua_fun_cocostudio_DisplayManager_isForceChangeDisplay, _olua_fun_cocostudio_DisplayManager_setForceChangeDisplay); + oluacls_prop(L, "visible", _olua_fun_cocostudio_DisplayManager_isVisible, _olua_fun_cocostudio_DisplayManager_setVisible); return 1; } -OLUA_END_DECLS -static int _cocostudio_FrameData_create(lua_State *L) +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccs_DisplayManager(lua_State *L) { - olua_startinvoke(L); - - // static cocostudio::FrameData *create() - cocostudio::FrameData *ret = cocostudio::FrameData::create(); - int num_ret = olua_push_object(L, ret, "ccs.FrameData"); - - olua_endinvoke(L); - - return num_ret; + olua_require(L, "cocos2d_studio", luaopen_cocos2d_studio); + if (!olua_getclass(L, "ccs.DisplayManager")) { + luaL_error(L, "class not found: cocostudio::DisplayManager"); + } + return 1; } +OLUA_END_DECLS -static int _cocostudio_FrameData_new(lua_State *L) +static int _olua_fun_cocostudio_FrameData_blendFunc$1(lua_State *L) { olua_startinvoke(L); - // FrameData() - cocostudio::FrameData *ret = new cocostudio::FrameData(); - int num_ret = olua_push_object(L, ret, "ccs.FrameData"); - olua_postnew(L, ret); + cocostudio::FrameData *self = nullptr; + + olua_to_object(L, 1, &self, "ccs.FrameData"); + + // cocos2d::BlendFunc blendFunc + cocos2d::BlendFunc &ret = self->blendFunc; + int num_ret = olua_copy_object(L, ret, "cc.BlendFunc"); olua_endinvoke(L); return num_ret; } -static int _cocostudio_FrameData_get_blendFunc(lua_State *L) +static int _olua_fun_cocostudio_FrameData_blendFunc$2(lua_State *L) { olua_startinvoke(L); cocostudio::FrameData *self = nullptr; + cocos2d::BlendFunc *arg1; /** blendFunc */ olua_to_object(L, 1, &self, "ccs.FrameData"); + olua_check_object(L, 2, &arg1, "cc.BlendFunc"); // cocos2d::BlendFunc blendFunc - cocos2d::BlendFunc &ret = self->blendFunc; - int num_ret = olua_pushcopy_object(L, ret, "cc.BlendFunc"); + self->blendFunc = *arg1; olua_endinvoke(L); - return num_ret; + return 0; } -static int _cocostudio_FrameData_set_blendFunc(lua_State *L) +static int _olua_fun_cocostudio_FrameData_blendFunc(lua_State *L) { - olua_startinvoke(L); + int num_args = lua_gettop(L) - 1; - cocostudio::FrameData *self = nullptr; - cocos2d::BlendFunc arg1; /** blendFunc */ + if (num_args == 0) { + // cocos2d::BlendFunc blendFunc + return _olua_fun_cocostudio_FrameData_blendFunc$1(L); + } - olua_to_object(L, 1, &self, "ccs.FrameData"); - olua_check_object(L, 2, &arg1, "cc.BlendFunc"); + if (num_args == 1) { + // if ((olua_is_object(L, 2, "cc.BlendFunc"))) { + // cocos2d::BlendFunc blendFunc + return _olua_fun_cocostudio_FrameData_blendFunc$2(L); + // } + } - // cocos2d::BlendFunc blendFunc - self->blendFunc = arg1; + luaL_error(L, "method 'cocostudio::FrameData::blendFunc' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocostudio_FrameData_create(lua_State *L) +{ + olua_startinvoke(L); + + // static cocostudio::FrameData *create() + cocostudio::FrameData *ret = cocostudio::FrameData::create(); + int num_ret = olua_push_object(L, ret, "ccs.FrameData"); olua_endinvoke(L); - return 0; + return num_ret; } -static int _cocostudio_FrameData_get_displayIndex(lua_State *L) +static int _olua_fun_cocostudio_FrameData_displayIndex$1(lua_State *L) { olua_startinvoke(L); @@ -11066,7 +12043,7 @@ static int _cocostudio_FrameData_get_displayIndex(lua_State *L) return num_ret; } -static int _cocostudio_FrameData_set_displayIndex(lua_State *L) +static int _olua_fun_cocostudio_FrameData_displayIndex$2(lua_State *L) { olua_startinvoke(L); @@ -11084,7 +12061,28 @@ static int _cocostudio_FrameData_set_displayIndex(lua_State *L) return 0; } -static int _cocostudio_FrameData_get_duration(lua_State *L) +static int _olua_fun_cocostudio_FrameData_displayIndex(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // int displayIndex + return _olua_fun_cocostudio_FrameData_displayIndex$1(L); + } + + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // int displayIndex + return _olua_fun_cocostudio_FrameData_displayIndex$2(L); + // } + } + + luaL_error(L, "method 'cocostudio::FrameData::displayIndex' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocostudio_FrameData_duration$1(lua_State *L) { olua_startinvoke(L); @@ -11101,7 +12099,7 @@ static int _cocostudio_FrameData_get_duration(lua_State *L) return num_ret; } -static int _cocostudio_FrameData_set_duration(lua_State *L) +static int _olua_fun_cocostudio_FrameData_duration$2(lua_State *L) { olua_startinvoke(L); @@ -11119,7 +12117,28 @@ static int _cocostudio_FrameData_set_duration(lua_State *L) return 0; } -static int _cocostudio_FrameData_get_easingParamNumber(lua_State *L) +static int _olua_fun_cocostudio_FrameData_duration(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // int duration + return _olua_fun_cocostudio_FrameData_duration$1(L); + } + + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // int duration + return _olua_fun_cocostudio_FrameData_duration$2(L); + // } + } + + luaL_error(L, "method 'cocostudio::FrameData::duration' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocostudio_FrameData_easingParamNumber$1(lua_State *L) { olua_startinvoke(L); @@ -11136,7 +12155,7 @@ static int _cocostudio_FrameData_get_easingParamNumber(lua_State *L) return num_ret; } -static int _cocostudio_FrameData_set_easingParamNumber(lua_State *L) +static int _olua_fun_cocostudio_FrameData_easingParamNumber$2(lua_State *L) { olua_startinvoke(L); @@ -11154,7 +12173,28 @@ static int _cocostudio_FrameData_set_easingParamNumber(lua_State *L) return 0; } -static int _cocostudio_FrameData_get_easingParams(lua_State *L) +static int _olua_fun_cocostudio_FrameData_easingParamNumber(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // int easingParamNumber + return _olua_fun_cocostudio_FrameData_easingParamNumber$1(L); + } + + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // int easingParamNumber + return _olua_fun_cocostudio_FrameData_easingParamNumber$2(L); + // } + } + + luaL_error(L, "method 'cocostudio::FrameData::easingParamNumber' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocostudio_FrameData_easingParams$1(lua_State *L) { olua_startinvoke(L); @@ -11164,14 +12204,14 @@ static int _cocostudio_FrameData_get_easingParams(lua_State *L) // float *easingParams float *ret = self->easingParams; - int num_ret = olua_push_pointer(L, ret, "olua.float"); + int num_ret = olua_push_valueptr(L, ret, "olua.float"); olua_endinvoke(L); return num_ret; } -static int _cocostudio_FrameData_set_easingParams(lua_State *L) +static int _olua_fun_cocostudio_FrameData_easingParams$2(lua_State *L) { olua_startinvoke(L); @@ -11179,7 +12219,7 @@ static int _cocostudio_FrameData_set_easingParams(lua_State *L) float *arg1 = nullptr; /** easingParams */ olua_to_object(L, 1, &self, "ccs.FrameData"); - olua_check_pointer(L, 2, &arg1, "olua.float"); + olua_check_valueptr(L, 2, &arg1, "olua.float"); // float *easingParams self->easingParams = arg1; @@ -11189,7 +12229,28 @@ static int _cocostudio_FrameData_set_easingParams(lua_State *L) return 0; } -static int _cocostudio_FrameData_get_frameID(lua_State *L) +static int _olua_fun_cocostudio_FrameData_easingParams(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float *easingParams + return _olua_fun_cocostudio_FrameData_easingParams$1(L); + } + + if (num_args == 1) { + // if ((olua_is_valueptr(L, 2, "olua.float"))) { + // float *easingParams + return _olua_fun_cocostudio_FrameData_easingParams$2(L); + // } + } + + luaL_error(L, "method 'cocostudio::FrameData::easingParams' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocostudio_FrameData_frameID$1(lua_State *L) { olua_startinvoke(L); @@ -11206,7 +12267,7 @@ static int _cocostudio_FrameData_get_frameID(lua_State *L) return num_ret; } -static int _cocostudio_FrameData_set_frameID(lua_State *L) +static int _olua_fun_cocostudio_FrameData_frameID$2(lua_State *L) { olua_startinvoke(L); @@ -11224,7 +12285,28 @@ static int _cocostudio_FrameData_set_frameID(lua_State *L) return 0; } -static int _cocostudio_FrameData_get_isTween(lua_State *L) +static int _olua_fun_cocostudio_FrameData_frameID(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // int frameID + return _olua_fun_cocostudio_FrameData_frameID$1(L); + } + + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // int frameID + return _olua_fun_cocostudio_FrameData_frameID$2(L); + // } + } + + luaL_error(L, "method 'cocostudio::FrameData::frameID' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocostudio_FrameData_isTween$1(lua_State *L) { olua_startinvoke(L); @@ -11241,7 +12323,7 @@ static int _cocostudio_FrameData_get_isTween(lua_State *L) return num_ret; } -static int _cocostudio_FrameData_set_isTween(lua_State *L) +static int _olua_fun_cocostudio_FrameData_isTween$2(lua_State *L) { olua_startinvoke(L); @@ -11259,7 +12341,42 @@ static int _cocostudio_FrameData_set_isTween(lua_State *L) return 0; } -static int _cocostudio_FrameData_get_strEvent(lua_State *L) +static int _olua_fun_cocostudio_FrameData_isTween(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // bool isTween + return _olua_fun_cocostudio_FrameData_isTween$1(L); + } + + if (num_args == 1) { + // if ((olua_is_bool(L, 2))) { + // bool isTween + return _olua_fun_cocostudio_FrameData_isTween$2(L); + // } + } + + luaL_error(L, "method 'cocostudio::FrameData::isTween' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocostudio_FrameData_new(lua_State *L) +{ + olua_startinvoke(L); + + // cocostudio::FrameData() + cocostudio::FrameData *ret = new cocostudio::FrameData(); + int num_ret = olua_push_object(L, ret, "ccs.FrameData"); + olua_postnew(L, ret); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_cocostudio_FrameData_strEvent$1(lua_State *L) { olua_startinvoke(L); @@ -11276,7 +12393,7 @@ static int _cocostudio_FrameData_get_strEvent(lua_State *L) return num_ret; } -static int _cocostudio_FrameData_set_strEvent(lua_State *L) +static int _olua_fun_cocostudio_FrameData_strEvent$2(lua_State *L) { olua_startinvoke(L); @@ -11294,7 +12411,28 @@ static int _cocostudio_FrameData_set_strEvent(lua_State *L) return 0; } -static int _cocostudio_FrameData_get_strMovement(lua_State *L) +static int _olua_fun_cocostudio_FrameData_strEvent(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // std::string strEvent + return _olua_fun_cocostudio_FrameData_strEvent$1(L); + } + + if (num_args == 1) { + // if ((olua_is_string(L, 2))) { + // std::string strEvent + return _olua_fun_cocostudio_FrameData_strEvent$2(L); + // } + } + + luaL_error(L, "method 'cocostudio::FrameData::strEvent' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocostudio_FrameData_strMovement$1(lua_State *L) { olua_startinvoke(L); @@ -11311,7 +12449,7 @@ static int _cocostudio_FrameData_get_strMovement(lua_State *L) return num_ret; } -static int _cocostudio_FrameData_set_strMovement(lua_State *L) +static int _olua_fun_cocostudio_FrameData_strMovement$2(lua_State *L) { olua_startinvoke(L); @@ -11329,7 +12467,28 @@ static int _cocostudio_FrameData_set_strMovement(lua_State *L) return 0; } -static int _cocostudio_FrameData_get_strSound(lua_State *L) +static int _olua_fun_cocostudio_FrameData_strMovement(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // std::string strMovement + return _olua_fun_cocostudio_FrameData_strMovement$1(L); + } + + if (num_args == 1) { + // if ((olua_is_string(L, 2))) { + // std::string strMovement + return _olua_fun_cocostudio_FrameData_strMovement$2(L); + // } + } + + luaL_error(L, "method 'cocostudio::FrameData::strMovement' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocostudio_FrameData_strSound$1(lua_State *L) { olua_startinvoke(L); @@ -11346,7 +12505,7 @@ static int _cocostudio_FrameData_get_strSound(lua_State *L) return num_ret; } -static int _cocostudio_FrameData_set_strSound(lua_State *L) +static int _olua_fun_cocostudio_FrameData_strSound$2(lua_State *L) { olua_startinvoke(L); @@ -11364,7 +12523,28 @@ static int _cocostudio_FrameData_set_strSound(lua_State *L) return 0; } -static int _cocostudio_FrameData_get_strSoundEffect(lua_State *L) +static int _olua_fun_cocostudio_FrameData_strSound(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // std::string strSound + return _olua_fun_cocostudio_FrameData_strSound$1(L); + } + + if (num_args == 1) { + // if ((olua_is_string(L, 2))) { + // std::string strSound + return _olua_fun_cocostudio_FrameData_strSound$2(L); + // } + } + + luaL_error(L, "method 'cocostudio::FrameData::strSound' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocostudio_FrameData_strSoundEffect$1(lua_State *L) { olua_startinvoke(L); @@ -11381,7 +12561,7 @@ static int _cocostudio_FrameData_get_strSoundEffect(lua_State *L) return num_ret; } -static int _cocostudio_FrameData_set_strSoundEffect(lua_State *L) +static int _olua_fun_cocostudio_FrameData_strSoundEffect$2(lua_State *L) { olua_startinvoke(L); @@ -11399,7 +12579,28 @@ static int _cocostudio_FrameData_set_strSoundEffect(lua_State *L) return 0; } -static int _cocostudio_FrameData_get_tweenEasing(lua_State *L) +static int _olua_fun_cocostudio_FrameData_strSoundEffect(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // std::string strSoundEffect + return _olua_fun_cocostudio_FrameData_strSoundEffect$1(L); + } + + if (num_args == 1) { + // if ((olua_is_string(L, 2))) { + // std::string strSoundEffect + return _olua_fun_cocostudio_FrameData_strSoundEffect$2(L); + // } + } + + luaL_error(L, "method 'cocostudio::FrameData::strSoundEffect' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocostudio_FrameData_tweenEasing$1(lua_State *L) { olua_startinvoke(L); @@ -11416,7 +12617,7 @@ static int _cocostudio_FrameData_get_tweenEasing(lua_State *L) return num_ret; } -static int _cocostudio_FrameData_set_tweenEasing(lua_State *L) +static int _olua_fun_cocostudio_FrameData_tweenEasing$2(lua_State *L) { olua_startinvoke(L); @@ -11434,30 +12635,60 @@ static int _cocostudio_FrameData_set_tweenEasing(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocostudio_FrameData(lua_State *L) +static int _olua_fun_cocostudio_FrameData_tweenEasing(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // cocos2d::tweenfunc::TweenType tweenEasing + return _olua_fun_cocostudio_FrameData_tweenEasing$1(L); + } + + if (num_args == 1) { + // if ((olua_is_enum(L, 2))) { + // cocos2d::tweenfunc::TweenType tweenEasing + return _olua_fun_cocostudio_FrameData_tweenEasing$2(L); + // } + } + + luaL_error(L, "method 'cocostudio::FrameData::tweenEasing' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_cls_ccs_FrameData(lua_State *L) { oluacls_class(L, "ccs.FrameData"); - oluacls_func(L, "create", _cocostudio_FrameData_create); - oluacls_func(L, "new", _cocostudio_FrameData_new); - oluacls_prop(L, "blendFunc", _cocostudio_FrameData_get_blendFunc, _cocostudio_FrameData_set_blendFunc); - oluacls_prop(L, "displayIndex", _cocostudio_FrameData_get_displayIndex, _cocostudio_FrameData_set_displayIndex); - oluacls_prop(L, "duration", _cocostudio_FrameData_get_duration, _cocostudio_FrameData_set_duration); - oluacls_prop(L, "easingParamNumber", _cocostudio_FrameData_get_easingParamNumber, _cocostudio_FrameData_set_easingParamNumber); - oluacls_prop(L, "easingParams", _cocostudio_FrameData_get_easingParams, _cocostudio_FrameData_set_easingParams); - oluacls_prop(L, "frameID", _cocostudio_FrameData_get_frameID, _cocostudio_FrameData_set_frameID); - oluacls_prop(L, "isTween", _cocostudio_FrameData_get_isTween, _cocostudio_FrameData_set_isTween); - oluacls_prop(L, "strEvent", _cocostudio_FrameData_get_strEvent, _cocostudio_FrameData_set_strEvent); - oluacls_prop(L, "strMovement", _cocostudio_FrameData_get_strMovement, _cocostudio_FrameData_set_strMovement); - oluacls_prop(L, "strSound", _cocostudio_FrameData_get_strSound, _cocostudio_FrameData_set_strSound); - oluacls_prop(L, "strSoundEffect", _cocostudio_FrameData_get_strSoundEffect, _cocostudio_FrameData_set_strSoundEffect); - oluacls_prop(L, "tweenEasing", _cocostudio_FrameData_get_tweenEasing, _cocostudio_FrameData_set_tweenEasing); + oluacls_func(L, "create", _olua_fun_cocostudio_FrameData_create); + oluacls_func(L, "new", _olua_fun_cocostudio_FrameData_new); + oluacls_prop(L, "blendFunc", _olua_fun_cocostudio_FrameData_blendFunc, _olua_fun_cocostudio_FrameData_blendFunc); + oluacls_prop(L, "displayIndex", _olua_fun_cocostudio_FrameData_displayIndex, _olua_fun_cocostudio_FrameData_displayIndex); + oluacls_prop(L, "duration", _olua_fun_cocostudio_FrameData_duration, _olua_fun_cocostudio_FrameData_duration); + oluacls_prop(L, "easingParamNumber", _olua_fun_cocostudio_FrameData_easingParamNumber, _olua_fun_cocostudio_FrameData_easingParamNumber); + oluacls_prop(L, "easingParams", _olua_fun_cocostudio_FrameData_easingParams, _olua_fun_cocostudio_FrameData_easingParams); + oluacls_prop(L, "frameID", _olua_fun_cocostudio_FrameData_frameID, _olua_fun_cocostudio_FrameData_frameID); + oluacls_prop(L, "isTween", _olua_fun_cocostudio_FrameData_isTween, _olua_fun_cocostudio_FrameData_isTween); + oluacls_prop(L, "strEvent", _olua_fun_cocostudio_FrameData_strEvent, _olua_fun_cocostudio_FrameData_strEvent); + oluacls_prop(L, "strMovement", _olua_fun_cocostudio_FrameData_strMovement, _olua_fun_cocostudio_FrameData_strMovement); + oluacls_prop(L, "strSound", _olua_fun_cocostudio_FrameData_strSound, _olua_fun_cocostudio_FrameData_strSound); + oluacls_prop(L, "strSoundEffect", _olua_fun_cocostudio_FrameData_strSoundEffect, _olua_fun_cocostudio_FrameData_strSoundEffect); + oluacls_prop(L, "tweenEasing", _olua_fun_cocostudio_FrameData_tweenEasing, _olua_fun_cocostudio_FrameData_tweenEasing); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccs_FrameData(lua_State *L) +{ + olua_require(L, "cocos2d_studio", luaopen_cocos2d_studio); + if (!olua_getclass(L, "ccs.FrameData")) { + luaL_error(L, "class not found: cocostudio::FrameData"); + } return 1; } OLUA_END_DECLS -static int _cocostudio_GUIReader_destroyInstance(lua_State *L) +static int _olua_fun_cocostudio_GUIReader_destroyInstance(lua_State *L) { olua_startinvoke(L); @@ -11469,7 +12700,7 @@ static int _cocostudio_GUIReader_destroyInstance(lua_State *L) return 0; } -static int _cocostudio_GUIReader_getFileDesignSize(lua_State *L) +static int _olua_fun_cocostudio_GUIReader_getFileDesignSize(lua_State *L) { olua_startinvoke(L); @@ -11481,14 +12712,14 @@ static int _cocostudio_GUIReader_getFileDesignSize(lua_State *L) // cocos2d::Size getFileDesignSize(const char *fileName) cocos2d::Size ret = self->getFileDesignSize(arg1); - int num_ret = olua_pushcopy_object(L, ret, "cc.Size"); + int num_ret = olua_copy_object(L, ret, "cc.Size"); olua_endinvoke(L); return num_ret; } -static int _cocostudio_GUIReader_getFilePath(lua_State *L) +static int _olua_fun_cocostudio_GUIReader_getFilePath(lua_State *L) { olua_startinvoke(L); @@ -11505,7 +12736,7 @@ static int _cocostudio_GUIReader_getFilePath(lua_State *L) return num_ret; } -static int _cocostudio_GUIReader_getInstance(lua_State *L) +static int _olua_fun_cocostudio_GUIReader_getInstance(lua_State *L) { olua_startinvoke(L); @@ -11518,7 +12749,7 @@ static int _cocostudio_GUIReader_getInstance(lua_State *L) return num_ret; } -static int _cocostudio_GUIReader_getVersionInteger(lua_State *L) +static int _olua_fun_cocostudio_GUIReader_getVersionInteger(lua_State *L) { olua_startinvoke(L); @@ -11537,7 +12768,7 @@ static int _cocostudio_GUIReader_getVersionInteger(lua_State *L) return num_ret; } -static int _cocostudio_GUIReader_setFilePath(lua_State *L) +static int _olua_fun_cocostudio_GUIReader_setFilePath(lua_State *L) { olua_startinvoke(L); @@ -11555,27 +12786,27 @@ static int _cocostudio_GUIReader_setFilePath(lua_State *L) return 0; } -static int _cocostudio_GUIReader_storeFileDesignSize(lua_State *L) +static int _olua_fun_cocostudio_GUIReader_storeFileDesignSize(lua_State *L) { olua_startinvoke(L); cocostudio::GUIReader *self = nullptr; const char *arg1 = nullptr; /** fileName */ - cocos2d::Size arg2; /** size */ + cocos2d::Size *arg2; /** size */ olua_to_object(L, 1, &self, "ccs.GUIReader"); olua_check_string(L, 2, &arg1); olua_check_object(L, 3, &arg2, "cc.Size"); // void storeFileDesignSize(const char *fileName, const cocos2d::Size &size) - self->storeFileDesignSize(arg1, arg2); + self->storeFileDesignSize(arg1, *arg2); olua_endinvoke(L); return 0; } -static int _cocostudio_GUIReader_widgetFromBinaryFile(lua_State *L) +static int _olua_fun_cocostudio_GUIReader_widgetFromBinaryFile(lua_State *L) { olua_startinvoke(L); @@ -11594,7 +12825,7 @@ static int _cocostudio_GUIReader_widgetFromBinaryFile(lua_State *L) return num_ret; } -static int _cocostudio_GUIReader_widgetFromJsonFile(lua_State *L) +static int _olua_fun_cocostudio_GUIReader_widgetFromJsonFile(lua_State *L) { olua_startinvoke(L); @@ -11613,27 +12844,36 @@ static int _cocostudio_GUIReader_widgetFromJsonFile(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocostudio_GUIReader(lua_State *L) +static int _olua_cls_ccs_GUIReader(lua_State *L) { oluacls_class(L, "ccs.GUIReader"); - oluacls_func(L, "destroyInstance", _cocostudio_GUIReader_destroyInstance); - oluacls_func(L, "getFileDesignSize", _cocostudio_GUIReader_getFileDesignSize); - oluacls_func(L, "getFilePath", _cocostudio_GUIReader_getFilePath); - oluacls_func(L, "getInstance", _cocostudio_GUIReader_getInstance); - oluacls_func(L, "getVersionInteger", _cocostudio_GUIReader_getVersionInteger); - oluacls_func(L, "setFilePath", _cocostudio_GUIReader_setFilePath); - oluacls_func(L, "storeFileDesignSize", _cocostudio_GUIReader_storeFileDesignSize); - oluacls_func(L, "widgetFromBinaryFile", _cocostudio_GUIReader_widgetFromBinaryFile); - oluacls_func(L, "widgetFromJsonFile", _cocostudio_GUIReader_widgetFromJsonFile); - oluacls_prop(L, "filePath", _cocostudio_GUIReader_getFilePath, _cocostudio_GUIReader_setFilePath); - oluacls_prop(L, "instance", _cocostudio_GUIReader_getInstance, nullptr); + oluacls_func(L, "destroyInstance", _olua_fun_cocostudio_GUIReader_destroyInstance); + oluacls_func(L, "getFileDesignSize", _olua_fun_cocostudio_GUIReader_getFileDesignSize); + oluacls_func(L, "getFilePath", _olua_fun_cocostudio_GUIReader_getFilePath); + oluacls_func(L, "getInstance", _olua_fun_cocostudio_GUIReader_getInstance); + oluacls_func(L, "getVersionInteger", _olua_fun_cocostudio_GUIReader_getVersionInteger); + oluacls_func(L, "setFilePath", _olua_fun_cocostudio_GUIReader_setFilePath); + oluacls_func(L, "storeFileDesignSize", _olua_fun_cocostudio_GUIReader_storeFileDesignSize); + oluacls_func(L, "widgetFromBinaryFile", _olua_fun_cocostudio_GUIReader_widgetFromBinaryFile); + oluacls_func(L, "widgetFromJsonFile", _olua_fun_cocostudio_GUIReader_widgetFromJsonFile); + oluacls_prop(L, "filePath", _olua_fun_cocostudio_GUIReader_getFilePath, _olua_fun_cocostudio_GUIReader_setFilePath); + oluacls_prop(L, "instance", _olua_fun_cocostudio_GUIReader_getInstance, nullptr); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccs_GUIReader(lua_State *L) +{ + olua_require(L, "cocos2d_studio", luaopen_cocos2d_studio); + if (!olua_getclass(L, "ccs.GUIReader")) { + luaL_error(L, "class not found: cocostudio::GUIReader"); + } return 1; } OLUA_END_DECLS -static int _cocostudio_InputDelegate___gc(lua_State *L) +static int _olua_fun_cocostudio_InputDelegate___gc(lua_State *L) { olua_startinvoke(L); @@ -11645,7 +12885,7 @@ static int _cocostudio_InputDelegate___gc(lua_State *L) return 0; } -static int _cocostudio_InputDelegate___olua_move(lua_State *L) +static int _olua_fun_cocostudio_InputDelegate___olua_move(lua_State *L) { olua_startinvoke(L); @@ -11657,7 +12897,7 @@ static int _cocostudio_InputDelegate___olua_move(lua_State *L) return 1; } -static int _cocostudio_InputDelegate_getTouchMode(lua_State *L) +static int _olua_fun_cocostudio_InputDelegate_getTouchMode(lua_State *L) { olua_startinvoke(L); @@ -11674,7 +12914,7 @@ static int _cocostudio_InputDelegate_getTouchMode(lua_State *L) return num_ret; } -static int _cocostudio_InputDelegate_getTouchPriority(lua_State *L) +static int _olua_fun_cocostudio_InputDelegate_getTouchPriority(lua_State *L) { olua_startinvoke(L); @@ -11691,7 +12931,7 @@ static int _cocostudio_InputDelegate_getTouchPriority(lua_State *L) return num_ret; } -static int _cocostudio_InputDelegate_isAccelerometerEnabled(lua_State *L) +static int _olua_fun_cocostudio_InputDelegate_isAccelerometerEnabled(lua_State *L) { olua_startinvoke(L); @@ -11708,7 +12948,7 @@ static int _cocostudio_InputDelegate_isAccelerometerEnabled(lua_State *L) return num_ret; } -static int _cocostudio_InputDelegate_isKeypadEnabled(lua_State *L) +static int _olua_fun_cocostudio_InputDelegate_isKeypadEnabled(lua_State *L) { olua_startinvoke(L); @@ -11725,7 +12965,7 @@ static int _cocostudio_InputDelegate_isKeypadEnabled(lua_State *L) return num_ret; } -static int _cocostudio_InputDelegate_isTouchEnabled(lua_State *L) +static int _olua_fun_cocostudio_InputDelegate_isTouchEnabled(lua_State *L) { olua_startinvoke(L); @@ -11742,11 +12982,11 @@ static int _cocostudio_InputDelegate_isTouchEnabled(lua_State *L) return num_ret; } -static int _cocostudio_InputDelegate_new(lua_State *L) +static int _olua_fun_cocostudio_InputDelegate_new(lua_State *L) { olua_startinvoke(L); - // InputDelegate() + // cocostudio::InputDelegate() cocostudio::InputDelegate *ret = new cocostudio::InputDelegate(); int num_ret = olua_push_object(L, ret, "ccs.InputDelegate"); olua_postnew(L, ret); @@ -11756,7 +12996,7 @@ static int _cocostudio_InputDelegate_new(lua_State *L) return num_ret; } -static int _cocostudio_InputDelegate_onAcceleration(lua_State *L) +static int _olua_fun_cocostudio_InputDelegate_onAcceleration(lua_State *L) { olua_startinvoke(L); @@ -11776,7 +13016,7 @@ static int _cocostudio_InputDelegate_onAcceleration(lua_State *L) return 0; } -static int _cocostudio_InputDelegate_onKeyPressed(lua_State *L) +static int _olua_fun_cocostudio_InputDelegate_onKeyPressed(lua_State *L) { olua_startinvoke(L); @@ -11796,7 +13036,7 @@ static int _cocostudio_InputDelegate_onKeyPressed(lua_State *L) return 0; } -static int _cocostudio_InputDelegate_onKeyReleased(lua_State *L) +static int _olua_fun_cocostudio_InputDelegate_onKeyReleased(lua_State *L) { olua_startinvoke(L); @@ -11816,7 +13056,7 @@ static int _cocostudio_InputDelegate_onKeyReleased(lua_State *L) return 0; } -static int _cocostudio_InputDelegate_onTouchBegan(lua_State *L) +static int _olua_fun_cocostudio_InputDelegate_onTouchBegan(lua_State *L) { olua_startinvoke(L); @@ -11837,7 +13077,7 @@ static int _cocostudio_InputDelegate_onTouchBegan(lua_State *L) return num_ret; } -static int _cocostudio_InputDelegate_onTouchCancelled(lua_State *L) +static int _olua_fun_cocostudio_InputDelegate_onTouchCancelled(lua_State *L) { olua_startinvoke(L); @@ -11857,7 +13097,7 @@ static int _cocostudio_InputDelegate_onTouchCancelled(lua_State *L) return 0; } -static int _cocostudio_InputDelegate_onTouchEnded(lua_State *L) +static int _olua_fun_cocostudio_InputDelegate_onTouchEnded(lua_State *L) { olua_startinvoke(L); @@ -11877,7 +13117,7 @@ static int _cocostudio_InputDelegate_onTouchEnded(lua_State *L) return 0; } -static int _cocostudio_InputDelegate_onTouchMoved(lua_State *L) +static int _olua_fun_cocostudio_InputDelegate_onTouchMoved(lua_State *L) { olua_startinvoke(L); @@ -11897,7 +13137,7 @@ static int _cocostudio_InputDelegate_onTouchMoved(lua_State *L) return 0; } -static int _cocostudio_InputDelegate_onTouchesBegan(lua_State *L) +static int _olua_fun_cocostudio_InputDelegate_onTouchesBegan(lua_State *L) { olua_startinvoke(L); @@ -11919,7 +13159,7 @@ static int _cocostudio_InputDelegate_onTouchesBegan(lua_State *L) return 0; } -static int _cocostudio_InputDelegate_onTouchesCancelled(lua_State *L) +static int _olua_fun_cocostudio_InputDelegate_onTouchesCancelled(lua_State *L) { olua_startinvoke(L); @@ -11941,7 +13181,7 @@ static int _cocostudio_InputDelegate_onTouchesCancelled(lua_State *L) return 0; } -static int _cocostudio_InputDelegate_onTouchesEnded(lua_State *L) +static int _olua_fun_cocostudio_InputDelegate_onTouchesEnded(lua_State *L) { olua_startinvoke(L); @@ -11963,7 +13203,7 @@ static int _cocostudio_InputDelegate_onTouchesEnded(lua_State *L) return 0; } -static int _cocostudio_InputDelegate_onTouchesMoved(lua_State *L) +static int _olua_fun_cocostudio_InputDelegate_onTouchesMoved(lua_State *L) { olua_startinvoke(L); @@ -11985,7 +13225,7 @@ static int _cocostudio_InputDelegate_onTouchesMoved(lua_State *L) return 0; } -static int _cocostudio_InputDelegate_setAccelerometerEnabled(lua_State *L) +static int _olua_fun_cocostudio_InputDelegate_setAccelerometerEnabled(lua_State *L) { olua_startinvoke(L); @@ -12003,7 +13243,7 @@ static int _cocostudio_InputDelegate_setAccelerometerEnabled(lua_State *L) return 0; } -static int _cocostudio_InputDelegate_setKeypadEnabled(lua_State *L) +static int _olua_fun_cocostudio_InputDelegate_setKeypadEnabled(lua_State *L) { olua_startinvoke(L); @@ -12021,7 +13261,7 @@ static int _cocostudio_InputDelegate_setKeypadEnabled(lua_State *L) return 0; } -static int _cocostudio_InputDelegate_setTouchEnabled(lua_State *L) +static int _olua_fun_cocostudio_InputDelegate_setTouchEnabled(lua_State *L) { olua_startinvoke(L); @@ -12039,7 +13279,7 @@ static int _cocostudio_InputDelegate_setTouchEnabled(lua_State *L) return 0; } -static int _cocostudio_InputDelegate_setTouchMode(lua_State *L) +static int _olua_fun_cocostudio_InputDelegate_setTouchMode(lua_State *L) { olua_startinvoke(L); @@ -12057,7 +13297,7 @@ static int _cocostudio_InputDelegate_setTouchMode(lua_State *L) return 0; } -static int _cocostudio_InputDelegate_setTouchPriority(lua_State *L) +static int _olua_fun_cocostudio_InputDelegate_setTouchPriority(lua_State *L) { olua_startinvoke(L); @@ -12075,45 +13315,54 @@ static int _cocostudio_InputDelegate_setTouchPriority(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocostudio_InputDelegate(lua_State *L) +static int _olua_cls_ccs_InputDelegate(lua_State *L) { oluacls_class(L, "ccs.InputDelegate"); - oluacls_func(L, "__gc", _cocostudio_InputDelegate___gc); - oluacls_func(L, "__olua_move", _cocostudio_InputDelegate___olua_move); - oluacls_func(L, "getTouchMode", _cocostudio_InputDelegate_getTouchMode); - oluacls_func(L, "getTouchPriority", _cocostudio_InputDelegate_getTouchPriority); - oluacls_func(L, "isAccelerometerEnabled", _cocostudio_InputDelegate_isAccelerometerEnabled); - oluacls_func(L, "isKeypadEnabled", _cocostudio_InputDelegate_isKeypadEnabled); - oluacls_func(L, "isTouchEnabled", _cocostudio_InputDelegate_isTouchEnabled); - oluacls_func(L, "new", _cocostudio_InputDelegate_new); - oluacls_func(L, "onAcceleration", _cocostudio_InputDelegate_onAcceleration); - oluacls_func(L, "onKeyPressed", _cocostudio_InputDelegate_onKeyPressed); - oluacls_func(L, "onKeyReleased", _cocostudio_InputDelegate_onKeyReleased); - oluacls_func(L, "onTouchBegan", _cocostudio_InputDelegate_onTouchBegan); - oluacls_func(L, "onTouchCancelled", _cocostudio_InputDelegate_onTouchCancelled); - oluacls_func(L, "onTouchEnded", _cocostudio_InputDelegate_onTouchEnded); - oluacls_func(L, "onTouchMoved", _cocostudio_InputDelegate_onTouchMoved); - oluacls_func(L, "onTouchesBegan", _cocostudio_InputDelegate_onTouchesBegan); - oluacls_func(L, "onTouchesCancelled", _cocostudio_InputDelegate_onTouchesCancelled); - oluacls_func(L, "onTouchesEnded", _cocostudio_InputDelegate_onTouchesEnded); - oluacls_func(L, "onTouchesMoved", _cocostudio_InputDelegate_onTouchesMoved); - oluacls_func(L, "setAccelerometerEnabled", _cocostudio_InputDelegate_setAccelerometerEnabled); - oluacls_func(L, "setKeypadEnabled", _cocostudio_InputDelegate_setKeypadEnabled); - oluacls_func(L, "setTouchEnabled", _cocostudio_InputDelegate_setTouchEnabled); - oluacls_func(L, "setTouchMode", _cocostudio_InputDelegate_setTouchMode); - oluacls_func(L, "setTouchPriority", _cocostudio_InputDelegate_setTouchPriority); - oluacls_prop(L, "accelerometerEnabled", _cocostudio_InputDelegate_isAccelerometerEnabled, _cocostudio_InputDelegate_setAccelerometerEnabled); - oluacls_prop(L, "keypadEnabled", _cocostudio_InputDelegate_isKeypadEnabled, _cocostudio_InputDelegate_setKeypadEnabled); - oluacls_prop(L, "touchEnabled", _cocostudio_InputDelegate_isTouchEnabled, _cocostudio_InputDelegate_setTouchEnabled); - oluacls_prop(L, "touchMode", _cocostudio_InputDelegate_getTouchMode, _cocostudio_InputDelegate_setTouchMode); - oluacls_prop(L, "touchPriority", _cocostudio_InputDelegate_getTouchPriority, _cocostudio_InputDelegate_setTouchPriority); + oluacls_func(L, "__gc", _olua_fun_cocostudio_InputDelegate___gc); + oluacls_func(L, "__olua_move", _olua_fun_cocostudio_InputDelegate___olua_move); + oluacls_func(L, "getTouchMode", _olua_fun_cocostudio_InputDelegate_getTouchMode); + oluacls_func(L, "getTouchPriority", _olua_fun_cocostudio_InputDelegate_getTouchPriority); + oluacls_func(L, "isAccelerometerEnabled", _olua_fun_cocostudio_InputDelegate_isAccelerometerEnabled); + oluacls_func(L, "isKeypadEnabled", _olua_fun_cocostudio_InputDelegate_isKeypadEnabled); + oluacls_func(L, "isTouchEnabled", _olua_fun_cocostudio_InputDelegate_isTouchEnabled); + oluacls_func(L, "new", _olua_fun_cocostudio_InputDelegate_new); + oluacls_func(L, "onAcceleration", _olua_fun_cocostudio_InputDelegate_onAcceleration); + oluacls_func(L, "onKeyPressed", _olua_fun_cocostudio_InputDelegate_onKeyPressed); + oluacls_func(L, "onKeyReleased", _olua_fun_cocostudio_InputDelegate_onKeyReleased); + oluacls_func(L, "onTouchBegan", _olua_fun_cocostudio_InputDelegate_onTouchBegan); + oluacls_func(L, "onTouchCancelled", _olua_fun_cocostudio_InputDelegate_onTouchCancelled); + oluacls_func(L, "onTouchEnded", _olua_fun_cocostudio_InputDelegate_onTouchEnded); + oluacls_func(L, "onTouchMoved", _olua_fun_cocostudio_InputDelegate_onTouchMoved); + oluacls_func(L, "onTouchesBegan", _olua_fun_cocostudio_InputDelegate_onTouchesBegan); + oluacls_func(L, "onTouchesCancelled", _olua_fun_cocostudio_InputDelegate_onTouchesCancelled); + oluacls_func(L, "onTouchesEnded", _olua_fun_cocostudio_InputDelegate_onTouchesEnded); + oluacls_func(L, "onTouchesMoved", _olua_fun_cocostudio_InputDelegate_onTouchesMoved); + oluacls_func(L, "setAccelerometerEnabled", _olua_fun_cocostudio_InputDelegate_setAccelerometerEnabled); + oluacls_func(L, "setKeypadEnabled", _olua_fun_cocostudio_InputDelegate_setKeypadEnabled); + oluacls_func(L, "setTouchEnabled", _olua_fun_cocostudio_InputDelegate_setTouchEnabled); + oluacls_func(L, "setTouchMode", _olua_fun_cocostudio_InputDelegate_setTouchMode); + oluacls_func(L, "setTouchPriority", _olua_fun_cocostudio_InputDelegate_setTouchPriority); + oluacls_prop(L, "accelerometerEnabled", _olua_fun_cocostudio_InputDelegate_isAccelerometerEnabled, _olua_fun_cocostudio_InputDelegate_setAccelerometerEnabled); + oluacls_prop(L, "keypadEnabled", _olua_fun_cocostudio_InputDelegate_isKeypadEnabled, _olua_fun_cocostudio_InputDelegate_setKeypadEnabled); + oluacls_prop(L, "touchEnabled", _olua_fun_cocostudio_InputDelegate_isTouchEnabled, _olua_fun_cocostudio_InputDelegate_setTouchEnabled); + oluacls_prop(L, "touchMode", _olua_fun_cocostudio_InputDelegate_getTouchMode, _olua_fun_cocostudio_InputDelegate_setTouchMode); + oluacls_prop(L, "touchPriority", _olua_fun_cocostudio_InputDelegate_getTouchPriority, _olua_fun_cocostudio_InputDelegate_setTouchPriority); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccs_InputDelegate(lua_State *L) +{ + olua_require(L, "cocos2d_studio", luaopen_cocos2d_studio); + if (!olua_getclass(L, "ccs.InputDelegate")) { + luaL_error(L, "class not found: cocostudio::InputDelegate"); + } + return 1; +} OLUA_END_DECLS -static int _cocostudio_MovementBoneData_addFrameData(lua_State *L) +static int _olua_fun_cocostudio_MovementBoneData_addFrameData(lua_State *L) { olua_startinvoke(L); @@ -12131,7 +13380,7 @@ static int _cocostudio_MovementBoneData_addFrameData(lua_State *L) return 0; } -static int _cocostudio_MovementBoneData_create(lua_State *L) +static int _olua_fun_cocostudio_MovementBoneData_create(lua_State *L) { olua_startinvoke(L); @@ -12144,57 +13393,63 @@ static int _cocostudio_MovementBoneData_create(lua_State *L) return num_ret; } -static int _cocostudio_MovementBoneData_getFrameData(lua_State *L) +static int _olua_fun_cocostudio_MovementBoneData_delay$1(lua_State *L) { olua_startinvoke(L); cocostudio::MovementBoneData *self = nullptr; - int arg1 = 0; /** index */ olua_to_object(L, 1, &self, "ccs.MovementBoneData"); - olua_check_integer(L, 2, &arg1); - // cocostudio::FrameData *getFrameData(int index) - cocostudio::FrameData *ret = self->getFrameData(arg1); - int num_ret = olua_push_object(L, ret, "ccs.FrameData"); + // float delay + float ret = self->delay; + int num_ret = olua_push_number(L, ret); olua_endinvoke(L); return num_ret; } -static int _cocostudio_MovementBoneData_init(lua_State *L) +static int _olua_fun_cocostudio_MovementBoneData_delay$2(lua_State *L) { olua_startinvoke(L); cocostudio::MovementBoneData *self = nullptr; + float arg1 = 0; /** delay */ olua_to_object(L, 1, &self, "ccs.MovementBoneData"); + olua_check_number(L, 2, &arg1); - // bool init() - bool ret = self->init(); - int num_ret = olua_push_bool(L, ret); + // float delay + self->delay = arg1; olua_endinvoke(L); - return num_ret; + return 0; } -static int _cocostudio_MovementBoneData_new(lua_State *L) +static int _olua_fun_cocostudio_MovementBoneData_delay(lua_State *L) { - olua_startinvoke(L); + int num_args = lua_gettop(L) - 1; - // MovementBoneData() - cocostudio::MovementBoneData *ret = new cocostudio::MovementBoneData(); - int num_ret = olua_push_object(L, ret, "ccs.MovementBoneData"); - olua_postnew(L, ret); + if (num_args == 0) { + // float delay + return _olua_fun_cocostudio_MovementBoneData_delay$1(L); + } - olua_endinvoke(L); + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float delay + return _olua_fun_cocostudio_MovementBoneData_delay$2(L); + // } + } - return num_ret; + luaL_error(L, "method 'cocostudio::MovementBoneData::delay' not support '%d' arguments", num_args); + + return 0; } -static int _cocostudio_MovementBoneData_get_delay(lua_State *L) +static int _olua_fun_cocostudio_MovementBoneData_duration$1(lua_State *L) { olua_startinvoke(L); @@ -12202,8 +13457,8 @@ static int _cocostudio_MovementBoneData_get_delay(lua_State *L) olua_to_object(L, 1, &self, "ccs.MovementBoneData"); - // float delay - float ret = self->delay; + // float duration + float ret = self->duration; int num_ret = olua_push_number(L, ret); olua_endinvoke(L); @@ -12211,25 +13466,46 @@ static int _cocostudio_MovementBoneData_get_delay(lua_State *L) return num_ret; } -static int _cocostudio_MovementBoneData_set_delay(lua_State *L) +static int _olua_fun_cocostudio_MovementBoneData_duration$2(lua_State *L) { olua_startinvoke(L); cocostudio::MovementBoneData *self = nullptr; - float arg1 = 0; /** delay */ + float arg1 = 0; /** duration */ olua_to_object(L, 1, &self, "ccs.MovementBoneData"); olua_check_number(L, 2, &arg1); - // float delay - self->delay = arg1; + // float duration + self->duration = arg1; olua_endinvoke(L); return 0; } -static int _cocostudio_MovementBoneData_get_duration(lua_State *L) +static int _olua_fun_cocostudio_MovementBoneData_duration(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float duration + return _olua_fun_cocostudio_MovementBoneData_duration$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float duration + return _olua_fun_cocostudio_MovementBoneData_duration$2(L); + // } + } + + luaL_error(L, "method 'cocostudio::MovementBoneData::duration' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocostudio_MovementBoneData_frameList$1(lua_State *L) { olua_startinvoke(L); @@ -12237,73 +13513,95 @@ static int _cocostudio_MovementBoneData_get_duration(lua_State *L) olua_to_object(L, 1, &self, "ccs.MovementBoneData"); - // float duration - float ret = self->duration; - int num_ret = olua_push_number(L, ret); + // cocos2d::Vector frameList + cocos2d::Vector &ret = self->frameList; + int num_ret = olua_push_array(L, ret, [L](cocostudio::FrameData *arg1) { + olua_push_object(L, arg1, "ccs.FrameData"); + }); olua_endinvoke(L); return num_ret; } -static int _cocostudio_MovementBoneData_set_duration(lua_State *L) +static int _olua_fun_cocostudio_MovementBoneData_frameList$2(lua_State *L) { olua_startinvoke(L); cocostudio::MovementBoneData *self = nullptr; - float arg1 = 0; /** duration */ + cocos2d::Vector arg1; /** frameList */ olua_to_object(L, 1, &self, "ccs.MovementBoneData"); - olua_check_number(L, 2, &arg1); + olua_check_array(L, 2, arg1, [L](cocostudio::FrameData **arg1) { + olua_check_object(L, -1, arg1, "ccs.FrameData"); + }); - // float duration - self->duration = arg1; + // cocos2d::Vector frameList + self->frameList = arg1; olua_endinvoke(L); return 0; } -static int _cocostudio_MovementBoneData_get_frameList(lua_State *L) +static int _olua_fun_cocostudio_MovementBoneData_frameList(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // cocos2d::Vector frameList + return _olua_fun_cocostudio_MovementBoneData_frameList$1(L); + } + + if (num_args == 1) { + // if ((olua_is_array(L, 2))) { + // cocos2d::Vector frameList + return _olua_fun_cocostudio_MovementBoneData_frameList$2(L); + // } + } + + luaL_error(L, "method 'cocostudio::MovementBoneData::frameList' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocostudio_MovementBoneData_getFrameData(lua_State *L) { olua_startinvoke(L); cocostudio::MovementBoneData *self = nullptr; + int arg1 = 0; /** index */ olua_to_object(L, 1, &self, "ccs.MovementBoneData"); + olua_check_integer(L, 2, &arg1); - // cocos2d::Vector frameList - cocos2d::Vector &ret = self->frameList; - int num_ret = olua_push_array(L, ret, [L](cocostudio::FrameData *arg1) { - olua_push_object(L, arg1, "ccs.FrameData"); - }); + // cocostudio::FrameData *getFrameData(int index) + cocostudio::FrameData *ret = self->getFrameData(arg1); + int num_ret = olua_push_object(L, ret, "ccs.FrameData"); olua_endinvoke(L); return num_ret; } -static int _cocostudio_MovementBoneData_set_frameList(lua_State *L) +static int _olua_fun_cocostudio_MovementBoneData_init(lua_State *L) { olua_startinvoke(L); cocostudio::MovementBoneData *self = nullptr; - cocos2d::Vector arg1; /** frameList */ olua_to_object(L, 1, &self, "ccs.MovementBoneData"); - olua_check_array(L, 2, arg1, [L](cocostudio::FrameData **arg1) { - olua_check_object(L, -1, arg1, "ccs.FrameData"); - }); - // cocos2d::Vector frameList - self->frameList = arg1; + // bool init() + bool ret = self->init(); + int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); - return 0; + return num_ret; } -static int _cocostudio_MovementBoneData_get_name(lua_State *L) +static int _olua_fun_cocostudio_MovementBoneData_name$1(lua_State *L) { olua_startinvoke(L); @@ -12320,7 +13618,7 @@ static int _cocostudio_MovementBoneData_get_name(lua_State *L) return num_ret; } -static int _cocostudio_MovementBoneData_set_name(lua_State *L) +static int _olua_fun_cocostudio_MovementBoneData_name$2(lua_State *L) { olua_startinvoke(L); @@ -12338,7 +13636,42 @@ static int _cocostudio_MovementBoneData_set_name(lua_State *L) return 0; } -static int _cocostudio_MovementBoneData_get_scale(lua_State *L) +static int _olua_fun_cocostudio_MovementBoneData_name(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // std::string name + return _olua_fun_cocostudio_MovementBoneData_name$1(L); + } + + if (num_args == 1) { + // if ((olua_is_string(L, 2))) { + // std::string name + return _olua_fun_cocostudio_MovementBoneData_name$2(L); + // } + } + + luaL_error(L, "method 'cocostudio::MovementBoneData::name' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocostudio_MovementBoneData_new(lua_State *L) +{ + olua_startinvoke(L); + + // cocostudio::MovementBoneData() + cocostudio::MovementBoneData *ret = new cocostudio::MovementBoneData(); + int num_ret = olua_push_object(L, ret, "ccs.MovementBoneData"); + olua_postnew(L, ret); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_cocostudio_MovementBoneData_scale$1(lua_State *L) { olua_startinvoke(L); @@ -12355,7 +13688,7 @@ static int _cocostudio_MovementBoneData_get_scale(lua_State *L) return num_ret; } -static int _cocostudio_MovementBoneData_set_scale(lua_State *L) +static int _olua_fun_cocostudio_MovementBoneData_scale$2(lua_State *L) { olua_startinvoke(L); @@ -12373,26 +13706,56 @@ static int _cocostudio_MovementBoneData_set_scale(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocostudio_MovementBoneData(lua_State *L) +static int _olua_fun_cocostudio_MovementBoneData_scale(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float scale + return _olua_fun_cocostudio_MovementBoneData_scale$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float scale + return _olua_fun_cocostudio_MovementBoneData_scale$2(L); + // } + } + + luaL_error(L, "method 'cocostudio::MovementBoneData::scale' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_cls_ccs_MovementBoneData(lua_State *L) { oluacls_class(L, "ccs.MovementBoneData"); - oluacls_func(L, "addFrameData", _cocostudio_MovementBoneData_addFrameData); - oluacls_func(L, "create", _cocostudio_MovementBoneData_create); - oluacls_func(L, "getFrameData", _cocostudio_MovementBoneData_getFrameData); - oluacls_func(L, "init", _cocostudio_MovementBoneData_init); - oluacls_func(L, "new", _cocostudio_MovementBoneData_new); - oluacls_prop(L, "delay", _cocostudio_MovementBoneData_get_delay, _cocostudio_MovementBoneData_set_delay); - oluacls_prop(L, "duration", _cocostudio_MovementBoneData_get_duration, _cocostudio_MovementBoneData_set_duration); - oluacls_prop(L, "frameList", _cocostudio_MovementBoneData_get_frameList, _cocostudio_MovementBoneData_set_frameList); - oluacls_prop(L, "name", _cocostudio_MovementBoneData_get_name, _cocostudio_MovementBoneData_set_name); - oluacls_prop(L, "scale", _cocostudio_MovementBoneData_get_scale, _cocostudio_MovementBoneData_set_scale); + oluacls_func(L, "addFrameData", _olua_fun_cocostudio_MovementBoneData_addFrameData); + oluacls_func(L, "create", _olua_fun_cocostudio_MovementBoneData_create); + oluacls_func(L, "getFrameData", _olua_fun_cocostudio_MovementBoneData_getFrameData); + oluacls_func(L, "init", _olua_fun_cocostudio_MovementBoneData_init); + oluacls_func(L, "new", _olua_fun_cocostudio_MovementBoneData_new); + oluacls_prop(L, "delay", _olua_fun_cocostudio_MovementBoneData_delay, _olua_fun_cocostudio_MovementBoneData_delay); + oluacls_prop(L, "duration", _olua_fun_cocostudio_MovementBoneData_duration, _olua_fun_cocostudio_MovementBoneData_duration); + oluacls_prop(L, "frameList", _olua_fun_cocostudio_MovementBoneData_frameList, _olua_fun_cocostudio_MovementBoneData_frameList); + oluacls_prop(L, "name", _olua_fun_cocostudio_MovementBoneData_name, _olua_fun_cocostudio_MovementBoneData_name); + oluacls_prop(L, "scale", _olua_fun_cocostudio_MovementBoneData_scale, _olua_fun_cocostudio_MovementBoneData_scale); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccs_MovementBoneData(lua_State *L) +{ + olua_require(L, "cocos2d_studio", luaopen_cocos2d_studio); + if (!olua_getclass(L, "ccs.MovementBoneData")) { + luaL_error(L, "class not found: cocostudio::MovementBoneData"); + } return 1; } OLUA_END_DECLS -static int _cocostudio_MovementData_addMovementBoneData(lua_State *L) +static int _olua_fun_cocostudio_MovementData_addMovementBoneData(lua_State *L) { olua_startinvoke(L); @@ -12410,7 +13773,7 @@ static int _cocostudio_MovementData_addMovementBoneData(lua_State *L) return 0; } -static int _cocostudio_MovementData_create(lua_State *L) +static int _olua_fun_cocostudio_MovementData_create(lua_State *L) { olua_startinvoke(L); @@ -12423,75 +13786,63 @@ static int _cocostudio_MovementData_create(lua_State *L) return num_ret; } -static int _cocostudio_MovementData_getMovementBoneData(lua_State *L) +static int _olua_fun_cocostudio_MovementData_duration$1(lua_State *L) { olua_startinvoke(L); cocostudio::MovementData *self = nullptr; - std::string arg1; /** boneName */ olua_to_object(L, 1, &self, "ccs.MovementData"); - olua_check_string(L, 2, &arg1); - - // cocostudio::MovementBoneData *getMovementBoneData(const std::string &boneName) - cocostudio::MovementBoneData *ret = self->getMovementBoneData(arg1); - int num_ret = olua_push_object(L, ret, "ccs.MovementBoneData"); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocostudio_MovementData_new(lua_State *L) -{ - olua_startinvoke(L); - // MovementData() - cocostudio::MovementData *ret = new cocostudio::MovementData(); - int num_ret = olua_push_object(L, ret, "ccs.MovementData"); - olua_postnew(L, ret); + // int duration + int ret = self->duration; + int num_ret = olua_push_integer(L, ret); olua_endinvoke(L); return num_ret; } -static int _cocostudio_MovementData_get_duration(lua_State *L) +static int _olua_fun_cocostudio_MovementData_duration$2(lua_State *L) { olua_startinvoke(L); cocostudio::MovementData *self = nullptr; + int arg1 = 0; /** duration */ olua_to_object(L, 1, &self, "ccs.MovementData"); + olua_check_integer(L, 2, &arg1); // int duration - int ret = self->duration; - int num_ret = olua_push_integer(L, ret); + self->duration = arg1; olua_endinvoke(L); - return num_ret; + return 0; } -static int _cocostudio_MovementData_set_duration(lua_State *L) +static int _olua_fun_cocostudio_MovementData_duration(lua_State *L) { - olua_startinvoke(L); - - cocostudio::MovementData *self = nullptr; - int arg1 = 0; /** duration */ + int num_args = lua_gettop(L) - 1; - olua_to_object(L, 1, &self, "ccs.MovementData"); - olua_check_integer(L, 2, &arg1); + if (num_args == 0) { + // int duration + return _olua_fun_cocostudio_MovementData_duration$1(L); + } - // int duration - self->duration = arg1; + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // int duration + return _olua_fun_cocostudio_MovementData_duration$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'cocostudio::MovementData::duration' not support '%d' arguments", num_args); return 0; } -static int _cocostudio_MovementData_get_durationTo(lua_State *L) +static int _olua_fun_cocostudio_MovementData_durationTo$1(lua_State *L) { olua_startinvoke(L); @@ -12508,7 +13859,7 @@ static int _cocostudio_MovementData_get_durationTo(lua_State *L) return num_ret; } -static int _cocostudio_MovementData_set_durationTo(lua_State *L) +static int _olua_fun_cocostudio_MovementData_durationTo$2(lua_State *L) { olua_startinvoke(L); @@ -12526,7 +13877,28 @@ static int _cocostudio_MovementData_set_durationTo(lua_State *L) return 0; } -static int _cocostudio_MovementData_get_durationTween(lua_State *L) +static int _olua_fun_cocostudio_MovementData_durationTo(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // int durationTo + return _olua_fun_cocostudio_MovementData_durationTo$1(L); + } + + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // int durationTo + return _olua_fun_cocostudio_MovementData_durationTo$2(L); + // } + } + + luaL_error(L, "method 'cocostudio::MovementData::durationTo' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocostudio_MovementData_durationTween$1(lua_State *L) { olua_startinvoke(L); @@ -12543,7 +13915,7 @@ static int _cocostudio_MovementData_get_durationTween(lua_State *L) return num_ret; } -static int _cocostudio_MovementData_set_durationTween(lua_State *L) +static int _olua_fun_cocostudio_MovementData_durationTween$2(lua_State *L) { olua_startinvoke(L); @@ -12561,7 +13933,47 @@ static int _cocostudio_MovementData_set_durationTween(lua_State *L) return 0; } -static int _cocostudio_MovementData_get_loop(lua_State *L) +static int _olua_fun_cocostudio_MovementData_durationTween(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // int durationTween + return _olua_fun_cocostudio_MovementData_durationTween$1(L); + } + + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // int durationTween + return _olua_fun_cocostudio_MovementData_durationTween$2(L); + // } + } + + luaL_error(L, "method 'cocostudio::MovementData::durationTween' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocostudio_MovementData_getMovementBoneData(lua_State *L) +{ + olua_startinvoke(L); + + cocostudio::MovementData *self = nullptr; + std::string arg1; /** boneName */ + + olua_to_object(L, 1, &self, "ccs.MovementData"); + olua_check_string(L, 2, &arg1); + + // cocostudio::MovementBoneData *getMovementBoneData(const std::string &boneName) + cocostudio::MovementBoneData *ret = self->getMovementBoneData(arg1); + int num_ret = olua_push_object(L, ret, "ccs.MovementBoneData"); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_cocostudio_MovementData_loop$1(lua_State *L) { olua_startinvoke(L); @@ -12578,7 +13990,7 @@ static int _cocostudio_MovementData_get_loop(lua_State *L) return num_ret; } -static int _cocostudio_MovementData_set_loop(lua_State *L) +static int _olua_fun_cocostudio_MovementData_loop$2(lua_State *L) { olua_startinvoke(L); @@ -12596,7 +14008,28 @@ static int _cocostudio_MovementData_set_loop(lua_State *L) return 0; } -static int _cocostudio_MovementData_get_movBoneDataDic(lua_State *L) +static int _olua_fun_cocostudio_MovementData_loop(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // bool loop + return _olua_fun_cocostudio_MovementData_loop$1(L); + } + + if (num_args == 1) { + // if ((olua_is_bool(L, 2))) { + // bool loop + return _olua_fun_cocostudio_MovementData_loop$2(L); + // } + } + + luaL_error(L, "method 'cocostudio::MovementData::loop' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocostudio_MovementData_movBoneDataDic$1(lua_State *L) { olua_startinvoke(L); @@ -12616,7 +14049,7 @@ static int _cocostudio_MovementData_get_movBoneDataDic(lua_State *L) return num_ret; } -static int _cocostudio_MovementData_set_movBoneDataDic(lua_State *L) +static int _olua_fun_cocostudio_MovementData_movBoneDataDic$2(lua_State *L) { olua_startinvoke(L); @@ -12629,15 +14062,36 @@ static int _cocostudio_MovementData_set_movBoneDataDic(lua_State *L) olua_check_object(L, -2, arg2, "ccs.MovementBoneData"); }); - // cocos2d::Map movBoneDataDic - self->movBoneDataDic = arg1; + // cocos2d::Map movBoneDataDic + self->movBoneDataDic = arg1; + + olua_endinvoke(L); + + return 0; +} + +static int _olua_fun_cocostudio_MovementData_movBoneDataDic(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // cocos2d::Map movBoneDataDic + return _olua_fun_cocostudio_MovementData_movBoneDataDic$1(L); + } - olua_endinvoke(L); + if (num_args == 1) { + // if ((olua_is_map(L, 2))) { + // cocos2d::Map movBoneDataDic + return _olua_fun_cocostudio_MovementData_movBoneDataDic$2(L); + // } + } + + luaL_error(L, "method 'cocostudio::MovementData::movBoneDataDic' not support '%d' arguments", num_args); return 0; } -static int _cocostudio_MovementData_get_name(lua_State *L) +static int _olua_fun_cocostudio_MovementData_name$1(lua_State *L) { olua_startinvoke(L); @@ -12654,7 +14108,7 @@ static int _cocostudio_MovementData_get_name(lua_State *L) return num_ret; } -static int _cocostudio_MovementData_set_name(lua_State *L) +static int _olua_fun_cocostudio_MovementData_name$2(lua_State *L) { olua_startinvoke(L); @@ -12672,7 +14126,42 @@ static int _cocostudio_MovementData_set_name(lua_State *L) return 0; } -static int _cocostudio_MovementData_get_scale(lua_State *L) +static int _olua_fun_cocostudio_MovementData_name(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // std::string name + return _olua_fun_cocostudio_MovementData_name$1(L); + } + + if (num_args == 1) { + // if ((olua_is_string(L, 2))) { + // std::string name + return _olua_fun_cocostudio_MovementData_name$2(L); + // } + } + + luaL_error(L, "method 'cocostudio::MovementData::name' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocostudio_MovementData_new(lua_State *L) +{ + olua_startinvoke(L); + + // cocostudio::MovementData() + cocostudio::MovementData *ret = new cocostudio::MovementData(); + int num_ret = olua_push_object(L, ret, "ccs.MovementData"); + olua_postnew(L, ret); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_cocostudio_MovementData_scale$1(lua_State *L) { olua_startinvoke(L); @@ -12689,7 +14178,7 @@ static int _cocostudio_MovementData_get_scale(lua_State *L) return num_ret; } -static int _cocostudio_MovementData_set_scale(lua_State *L) +static int _olua_fun_cocostudio_MovementData_scale$2(lua_State *L) { olua_startinvoke(L); @@ -12707,7 +14196,28 @@ static int _cocostudio_MovementData_set_scale(lua_State *L) return 0; } -static int _cocostudio_MovementData_get_tweenEasing(lua_State *L) +static int _olua_fun_cocostudio_MovementData_scale(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float scale + return _olua_fun_cocostudio_MovementData_scale$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float scale + return _olua_fun_cocostudio_MovementData_scale$2(L); + // } + } + + luaL_error(L, "method 'cocostudio::MovementData::scale' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocostudio_MovementData_tweenEasing$1(lua_State *L) { olua_startinvoke(L); @@ -12724,7 +14234,7 @@ static int _cocostudio_MovementData_get_tweenEasing(lua_State *L) return num_ret; } -static int _cocostudio_MovementData_set_tweenEasing(lua_State *L) +static int _olua_fun_cocostudio_MovementData_tweenEasing$2(lua_State *L) { olua_startinvoke(L); @@ -12742,28 +14252,58 @@ static int _cocostudio_MovementData_set_tweenEasing(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocostudio_MovementData(lua_State *L) +static int _olua_fun_cocostudio_MovementData_tweenEasing(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // cocos2d::tweenfunc::TweenType tweenEasing + return _olua_fun_cocostudio_MovementData_tweenEasing$1(L); + } + + if (num_args == 1) { + // if ((olua_is_enum(L, 2))) { + // cocos2d::tweenfunc::TweenType tweenEasing + return _olua_fun_cocostudio_MovementData_tweenEasing$2(L); + // } + } + + luaL_error(L, "method 'cocostudio::MovementData::tweenEasing' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_cls_ccs_MovementData(lua_State *L) { oluacls_class(L, "ccs.MovementData"); - oluacls_func(L, "addMovementBoneData", _cocostudio_MovementData_addMovementBoneData); - oluacls_func(L, "create", _cocostudio_MovementData_create); - oluacls_func(L, "getMovementBoneData", _cocostudio_MovementData_getMovementBoneData); - oluacls_func(L, "new", _cocostudio_MovementData_new); - oluacls_prop(L, "duration", _cocostudio_MovementData_get_duration, _cocostudio_MovementData_set_duration); - oluacls_prop(L, "durationTo", _cocostudio_MovementData_get_durationTo, _cocostudio_MovementData_set_durationTo); - oluacls_prop(L, "durationTween", _cocostudio_MovementData_get_durationTween, _cocostudio_MovementData_set_durationTween); - oluacls_prop(L, "loop", _cocostudio_MovementData_get_loop, _cocostudio_MovementData_set_loop); - oluacls_prop(L, "movBoneDataDic", _cocostudio_MovementData_get_movBoneDataDic, _cocostudio_MovementData_set_movBoneDataDic); - oluacls_prop(L, "name", _cocostudio_MovementData_get_name, _cocostudio_MovementData_set_name); - oluacls_prop(L, "scale", _cocostudio_MovementData_get_scale, _cocostudio_MovementData_set_scale); - oluacls_prop(L, "tweenEasing", _cocostudio_MovementData_get_tweenEasing, _cocostudio_MovementData_set_tweenEasing); + oluacls_func(L, "addMovementBoneData", _olua_fun_cocostudio_MovementData_addMovementBoneData); + oluacls_func(L, "create", _olua_fun_cocostudio_MovementData_create); + oluacls_func(L, "getMovementBoneData", _olua_fun_cocostudio_MovementData_getMovementBoneData); + oluacls_func(L, "new", _olua_fun_cocostudio_MovementData_new); + oluacls_prop(L, "duration", _olua_fun_cocostudio_MovementData_duration, _olua_fun_cocostudio_MovementData_duration); + oluacls_prop(L, "durationTo", _olua_fun_cocostudio_MovementData_durationTo, _olua_fun_cocostudio_MovementData_durationTo); + oluacls_prop(L, "durationTween", _olua_fun_cocostudio_MovementData_durationTween, _olua_fun_cocostudio_MovementData_durationTween); + oluacls_prop(L, "loop", _olua_fun_cocostudio_MovementData_loop, _olua_fun_cocostudio_MovementData_loop); + oluacls_prop(L, "movBoneDataDic", _olua_fun_cocostudio_MovementData_movBoneDataDic, _olua_fun_cocostudio_MovementData_movBoneDataDic); + oluacls_prop(L, "name", _olua_fun_cocostudio_MovementData_name, _olua_fun_cocostudio_MovementData_name); + oluacls_prop(L, "scale", _olua_fun_cocostudio_MovementData_scale, _olua_fun_cocostudio_MovementData_scale); + oluacls_prop(L, "tweenEasing", _olua_fun_cocostudio_MovementData_tweenEasing, _olua_fun_cocostudio_MovementData_tweenEasing); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccs_MovementData(lua_State *L) +{ + olua_require(L, "cocos2d_studio", luaopen_cocos2d_studio); + if (!olua_getclass(L, "ccs.MovementData")) { + luaL_error(L, "class not found: cocostudio::MovementData"); + } + return 1; +} OLUA_END_DECLS -static int _cocostudio_ParticleDisplayData_create(lua_State *L) +static int _olua_fun_cocostudio_ParticleDisplayData_create(lua_State *L) { olua_startinvoke(L); @@ -12776,11 +14316,11 @@ static int _cocostudio_ParticleDisplayData_create(lua_State *L) return num_ret; } -static int _cocostudio_ParticleDisplayData_new(lua_State *L) +static int _olua_fun_cocostudio_ParticleDisplayData_new(lua_State *L) { olua_startinvoke(L); - // ParticleDisplayData() + // cocostudio::ParticleDisplayData() cocostudio::ParticleDisplayData *ret = new cocostudio::ParticleDisplayData(); int num_ret = olua_push_object(L, ret, "ccs.ParticleDisplayData"); olua_postnew(L, ret); @@ -12790,19 +14330,27 @@ static int _cocostudio_ParticleDisplayData_new(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocostudio_ParticleDisplayData(lua_State *L) +static int _olua_cls_ccs_ParticleDisplayData(lua_State *L) { oluacls_class(L, "ccs.ParticleDisplayData"); - oluacls_func(L, "create", _cocostudio_ParticleDisplayData_create); - oluacls_func(L, "new", _cocostudio_ParticleDisplayData_new); + oluacls_func(L, "create", _olua_fun_cocostudio_ParticleDisplayData_create); + oluacls_func(L, "new", _olua_fun_cocostudio_ParticleDisplayData_new); return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocostudio_SceneReader_AttachComponentType(lua_State *L) +OLUA_LIB int luaopen_ccs_ParticleDisplayData(lua_State *L) +{ + olua_require(L, "cocos2d_studio", luaopen_cocos2d_studio); + if (!olua_getclass(L, "ccs.ParticleDisplayData")) { + luaL_error(L, "class not found: cocostudio::ParticleDisplayData"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_ccs_SceneReader_AttachComponentType(lua_State *L) { oluacls_class(L, "ccs.SceneReader.AttachComponentType"); oluacls_func(L, "__index", olua_indexerror); @@ -12813,9 +14361,19 @@ OLUA_LIB int luaopen_cocostudio_SceneReader_AttachComponentType(lua_State *L) return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccs_SceneReader_AttachComponentType(lua_State *L) +{ + olua_require(L, "cocos2d_studio", luaopen_cocos2d_studio); + if (!olua_getclass(L, "ccs.SceneReader.AttachComponentType")) { + luaL_error(L, "class not found: cocostudio::SceneReader::AttachComponentType"); + } + return 1; +} OLUA_END_DECLS -static int _cocostudio_SceneReader___gc(lua_State *L) +static int _olua_fun_cocostudio_SceneReader___gc(lua_State *L) { olua_startinvoke(L); @@ -12827,7 +14385,7 @@ static int _cocostudio_SceneReader___gc(lua_State *L) return 0; } -static int _cocostudio_SceneReader___olua_move(lua_State *L) +static int _olua_fun_cocostudio_SceneReader___olua_move(lua_State *L) { olua_startinvoke(L); @@ -12839,7 +14397,7 @@ static int _cocostudio_SceneReader___olua_move(lua_State *L) return 1; } -static int _cocostudio_SceneReader_createNodeWithSceneFile$1(lua_State *L) +static int _olua_fun_cocostudio_SceneReader_createNodeWithSceneFile$1(lua_State *L) { olua_startinvoke(L); @@ -12860,7 +14418,7 @@ static int _cocostudio_SceneReader_createNodeWithSceneFile$1(lua_State *L) return num_ret; } -static int _cocostudio_SceneReader_createNodeWithSceneFile$2(lua_State *L) +static int _olua_fun_cocostudio_SceneReader_createNodeWithSceneFile$2(lua_State *L) { olua_startinvoke(L); @@ -12870,7 +14428,7 @@ static int _cocostudio_SceneReader_createNodeWithSceneFile$2(lua_State *L) olua_to_object(L, 1, &self, "ccs.SceneReader"); olua_check_string(L, 2, &arg1); - // cocos2d::Node *createNodeWithSceneFile(const std::string &fileName, @optional cocostudio::SceneReader::AttachComponentType attachComponent) + // cocos2d::Node *createNodeWithSceneFile(const std::string &fileName) cocos2d::Node *ret = self->createNodeWithSceneFile(arg1); int num_ret = olua_push_object(L, ret, "cc.Node"); @@ -12879,21 +14437,21 @@ static int _cocostudio_SceneReader_createNodeWithSceneFile$2(lua_State *L) return num_ret; } -static int _cocostudio_SceneReader_createNodeWithSceneFile(lua_State *L) +static int _olua_fun_cocostudio_SceneReader_createNodeWithSceneFile(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_string(L, 2))) { - // cocos2d::Node *createNodeWithSceneFile(const std::string &fileName, @optional cocostudio::SceneReader::AttachComponentType attachComponent) - return _cocostudio_SceneReader_createNodeWithSceneFile$2(L); + // cocos2d::Node *createNodeWithSceneFile(const std::string &fileName) + return _olua_fun_cocostudio_SceneReader_createNodeWithSceneFile$2(L); // } } if (num_args == 2) { // if ((olua_is_string(L, 2)) && (olua_is_enum(L, 3))) { // cocos2d::Node *createNodeWithSceneFile(const std::string &fileName, @optional cocostudio::SceneReader::AttachComponentType attachComponent) - return _cocostudio_SceneReader_createNodeWithSceneFile$1(L); + return _olua_fun_cocostudio_SceneReader_createNodeWithSceneFile$1(L); // } } @@ -12902,7 +14460,7 @@ static int _cocostudio_SceneReader_createNodeWithSceneFile(lua_State *L) return 0; } -static int _cocostudio_SceneReader_destroyInstance(lua_State *L) +static int _olua_fun_cocostudio_SceneReader_destroyInstance(lua_State *L) { olua_startinvoke(L); @@ -12914,7 +14472,7 @@ static int _cocostudio_SceneReader_destroyInstance(lua_State *L) return 0; } -static int _cocostudio_SceneReader_getAttachComponentType(lua_State *L) +static int _olua_fun_cocostudio_SceneReader_getAttachComponentType(lua_State *L) { olua_startinvoke(L); @@ -12931,7 +14489,7 @@ static int _cocostudio_SceneReader_getAttachComponentType(lua_State *L) return num_ret; } -static int _cocostudio_SceneReader_getInstance(lua_State *L) +static int _olua_fun_cocostudio_SceneReader_getInstance(lua_State *L) { olua_startinvoke(L); @@ -12944,7 +14502,7 @@ static int _cocostudio_SceneReader_getInstance(lua_State *L) return num_ret; } -static int _cocostudio_SceneReader_getNodeByTag(lua_State *L) +static int _olua_fun_cocostudio_SceneReader_getNodeByTag(lua_State *L) { olua_startinvoke(L); @@ -12963,11 +14521,11 @@ static int _cocostudio_SceneReader_getNodeByTag(lua_State *L) return num_ret; } -static int _cocostudio_SceneReader_new(lua_State *L) +static int _olua_fun_cocostudio_SceneReader_new(lua_State *L) { olua_startinvoke(L); - // SceneReader() + // cocostudio::SceneReader() cocostudio::SceneReader *ret = new cocostudio::SceneReader(); int num_ret = olua_push_object(L, ret, "ccs.SceneReader"); olua_postnew(L, ret); @@ -12977,7 +14535,7 @@ static int _cocostudio_SceneReader_new(lua_State *L) return num_ret; } -static int _cocostudio_SceneReader_sceneReaderVersion(lua_State *L) +static int _olua_fun_cocostudio_SceneReader_sceneReaderVersion(lua_State *L) { olua_startinvoke(L); @@ -12990,7 +14548,7 @@ static int _cocostudio_SceneReader_sceneReaderVersion(lua_State *L) return num_ret; } -static int _cocostudio_SceneReader_setTarget(lua_State *L) +static int _olua_fun_cocostudio_SceneReader_setTarget(lua_State *L) { olua_startinvoke(L); @@ -13006,9 +14564,10 @@ static int _cocostudio_SceneReader_setTarget(lua_State *L) std::string cb_tag = "Target"; std::string cb_name; if (olua_isfunction(L, 2)) { - cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](cocos2d::Ref *arg1, void *arg2) { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](cocos2d::Ref *cb_arg1, void *cb_arg2) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); @@ -13016,8 +14575,8 @@ static int _cocostudio_SceneReader_setTarget(lua_State *L) int top = lua_gettop(L); size_t last = olua_push_objpool(L); olua_enable_objpool(L); - olua_push_object(L, arg1, "cc.Ref"); - olua_push_object(L, arg2, "void *"); + olua_push_object(L, cb_arg1, "cc.Ref"); + olua_push_object(L, cb_arg2, "void *"); olua_disable_objpool(L); olua_callback(L, cb_store, cb_name.c_str(), 2); @@ -13032,7 +14591,7 @@ static int _cocostudio_SceneReader_setTarget(lua_State *L) arg1 = nullptr; } - // void setTarget(@localvar @nullable const std::function &selector) + // void setTarget(@nullable const std::function &selector) self->setTarget(arg1); olua_endinvoke(L); @@ -13040,28 +14599,37 @@ static int _cocostudio_SceneReader_setTarget(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocostudio_SceneReader(lua_State *L) +static int _olua_cls_ccs_SceneReader(lua_State *L) { oluacls_class(L, "ccs.SceneReader"); - oluacls_func(L, "__gc", _cocostudio_SceneReader___gc); - oluacls_func(L, "__olua_move", _cocostudio_SceneReader___olua_move); - oluacls_func(L, "createNodeWithSceneFile", _cocostudio_SceneReader_createNodeWithSceneFile); - oluacls_func(L, "destroyInstance", _cocostudio_SceneReader_destroyInstance); - oluacls_func(L, "getAttachComponentType", _cocostudio_SceneReader_getAttachComponentType); - oluacls_func(L, "getInstance", _cocostudio_SceneReader_getInstance); - oluacls_func(L, "getNodeByTag", _cocostudio_SceneReader_getNodeByTag); - oluacls_func(L, "new", _cocostudio_SceneReader_new); - oluacls_func(L, "sceneReaderVersion", _cocostudio_SceneReader_sceneReaderVersion); - oluacls_func(L, "setTarget", _cocostudio_SceneReader_setTarget); - oluacls_prop(L, "attachComponentType", _cocostudio_SceneReader_getAttachComponentType, nullptr); - oluacls_prop(L, "instance", _cocostudio_SceneReader_getInstance, nullptr); + oluacls_func(L, "__gc", _olua_fun_cocostudio_SceneReader___gc); + oluacls_func(L, "__olua_move", _olua_fun_cocostudio_SceneReader___olua_move); + oluacls_func(L, "createNodeWithSceneFile", _olua_fun_cocostudio_SceneReader_createNodeWithSceneFile); + oluacls_func(L, "destroyInstance", _olua_fun_cocostudio_SceneReader_destroyInstance); + oluacls_func(L, "getAttachComponentType", _olua_fun_cocostudio_SceneReader_getAttachComponentType); + oluacls_func(L, "getInstance", _olua_fun_cocostudio_SceneReader_getInstance); + oluacls_func(L, "getNodeByTag", _olua_fun_cocostudio_SceneReader_getNodeByTag); + oluacls_func(L, "new", _olua_fun_cocostudio_SceneReader_new); + oluacls_func(L, "sceneReaderVersion", _olua_fun_cocostudio_SceneReader_sceneReaderVersion); + oluacls_func(L, "setTarget", _olua_fun_cocostudio_SceneReader_setTarget); + oluacls_prop(L, "attachComponentType", _olua_fun_cocostudio_SceneReader_getAttachComponentType, nullptr); + oluacls_prop(L, "instance", _olua_fun_cocostudio_SceneReader_getInstance, nullptr); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccs_SceneReader(lua_State *L) +{ + olua_require(L, "cocos2d_studio", luaopen_cocos2d_studio); + if (!olua_getclass(L, "ccs.SceneReader")) { + luaL_error(L, "class not found: cocostudio::SceneReader"); + } return 1; } OLUA_END_DECLS -static int _cocostudio_Skin_create$1(lua_State *L) +static int _olua_fun_cocostudio_Skin_create$1(lua_State *L) { olua_startinvoke(L); @@ -13074,7 +14642,7 @@ static int _cocostudio_Skin_create$1(lua_State *L) return num_ret; } -static int _cocostudio_Skin_create$2(lua_State *L) +static int _olua_fun_cocostudio_Skin_create$2(lua_State *L) { olua_startinvoke(L); @@ -13091,19 +14659,19 @@ static int _cocostudio_Skin_create$2(lua_State *L) return num_ret; } -static int _cocostudio_Skin_create(lua_State *L) +static int _olua_fun_cocostudio_Skin_create(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 0) { // static cocostudio::Skin *create() - return _cocostudio_Skin_create$1(L); + return _olua_fun_cocostudio_Skin_create$1(L); } if (num_args == 1) { // if ((olua_is_string(L, 1))) { // static cocostudio::Skin *create(const std::string &pszFileName) - return _cocostudio_Skin_create$2(L); + return _olua_fun_cocostudio_Skin_create$2(L); // } } @@ -13112,7 +14680,7 @@ static int _cocostudio_Skin_create(lua_State *L) return 0; } -static int _cocostudio_Skin_createWithSpriteFrameName(lua_State *L) +static int _olua_fun_cocostudio_Skin_createWithSpriteFrameName(lua_State *L) { olua_startinvoke(L); @@ -13129,7 +14697,7 @@ static int _cocostudio_Skin_createWithSpriteFrameName(lua_State *L) return num_ret; } -static int _cocostudio_Skin_getBone(lua_State *L) +static int _olua_fun_cocostudio_Skin_getBone(lua_State *L) { olua_startinvoke(L); @@ -13146,7 +14714,7 @@ static int _cocostudio_Skin_getBone(lua_State *L) return num_ret; } -static int _cocostudio_Skin_getDisplayName(lua_State *L) +static int _olua_fun_cocostudio_Skin_getDisplayName(lua_State *L) { olua_startinvoke(L); @@ -13163,7 +14731,7 @@ static int _cocostudio_Skin_getDisplayName(lua_State *L) return num_ret; } -static int _cocostudio_Skin_getNodeToWorldTransformAR(lua_State *L) +static int _olua_fun_cocostudio_Skin_getNodeToWorldTransformAR(lua_State *L) { olua_startinvoke(L); @@ -13173,14 +14741,14 @@ static int _cocostudio_Skin_getNodeToWorldTransformAR(lua_State *L) // cocos2d::Mat4 getNodeToWorldTransformAR() cocos2d::Mat4 ret = self->getNodeToWorldTransformAR(); - int num_ret = olua_pushcopy_object(L, ret, "cc.Mat4"); + int num_ret = olua_copy_object(L, ret, "cc.Mat4"); olua_endinvoke(L); return num_ret; } -static int _cocostudio_Skin_getSkinData(lua_State *L) +static int _olua_fun_cocostudio_Skin_getSkinData(lua_State *L) { olua_startinvoke(L); @@ -13197,11 +14765,11 @@ static int _cocostudio_Skin_getSkinData(lua_State *L) return num_ret; } -static int _cocostudio_Skin_new(lua_State *L) +static int _olua_fun_cocostudio_Skin_new(lua_State *L) { olua_startinvoke(L); - // Skin() + // cocostudio::Skin() cocostudio::Skin *ret = new cocostudio::Skin(); int num_ret = olua_push_object(L, ret, "ccs.Skin"); olua_postnew(L, ret); @@ -13211,7 +14779,7 @@ static int _cocostudio_Skin_new(lua_State *L) return num_ret; } -static int _cocostudio_Skin_setBone(lua_State *L) +static int _olua_fun_cocostudio_Skin_setBone(lua_State *L) { olua_startinvoke(L); @@ -13229,25 +14797,25 @@ static int _cocostudio_Skin_setBone(lua_State *L) return 0; } -static int _cocostudio_Skin_setSkinData(lua_State *L) +static int _olua_fun_cocostudio_Skin_setSkinData(lua_State *L) { olua_startinvoke(L); cocostudio::Skin *self = nullptr; - cocostudio::BaseData arg1; /** data */ + cocostudio::BaseData *arg1; /** data */ olua_to_object(L, 1, &self, "ccs.Skin"); olua_check_object(L, 2, &arg1, "ccs.BaseData"); // void setSkinData(const cocostudio::BaseData &data) - self->setSkinData(arg1); + self->setSkinData(*arg1); olua_endinvoke(L); return 0; } -static int _cocostudio_Skin_updateArmatureTransform(lua_State *L) +static int _olua_fun_cocostudio_Skin_updateArmatureTransform(lua_State *L) { olua_startinvoke(L); @@ -13263,30 +14831,39 @@ static int _cocostudio_Skin_updateArmatureTransform(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocostudio_Skin(lua_State *L) +static int _olua_cls_ccs_Skin(lua_State *L) { oluacls_class(L, "ccs.Skin"); - oluacls_func(L, "create", _cocostudio_Skin_create); - oluacls_func(L, "createWithSpriteFrameName", _cocostudio_Skin_createWithSpriteFrameName); - oluacls_func(L, "getBone", _cocostudio_Skin_getBone); - oluacls_func(L, "getDisplayName", _cocostudio_Skin_getDisplayName); - oluacls_func(L, "getNodeToWorldTransformAR", _cocostudio_Skin_getNodeToWorldTransformAR); - oluacls_func(L, "getSkinData", _cocostudio_Skin_getSkinData); - oluacls_func(L, "new", _cocostudio_Skin_new); - oluacls_func(L, "setBone", _cocostudio_Skin_setBone); - oluacls_func(L, "setSkinData", _cocostudio_Skin_setSkinData); - oluacls_func(L, "updateArmatureTransform", _cocostudio_Skin_updateArmatureTransform); - oluacls_prop(L, "bone", _cocostudio_Skin_getBone, _cocostudio_Skin_setBone); - oluacls_prop(L, "displayName", _cocostudio_Skin_getDisplayName, nullptr); - oluacls_prop(L, "nodeToWorldTransformAR", _cocostudio_Skin_getNodeToWorldTransformAR, nullptr); - oluacls_prop(L, "skinData", _cocostudio_Skin_getSkinData, _cocostudio_Skin_setSkinData); + oluacls_func(L, "create", _olua_fun_cocostudio_Skin_create); + oluacls_func(L, "createWithSpriteFrameName", _olua_fun_cocostudio_Skin_createWithSpriteFrameName); + oluacls_func(L, "getBone", _olua_fun_cocostudio_Skin_getBone); + oluacls_func(L, "getDisplayName", _olua_fun_cocostudio_Skin_getDisplayName); + oluacls_func(L, "getNodeToWorldTransformAR", _olua_fun_cocostudio_Skin_getNodeToWorldTransformAR); + oluacls_func(L, "getSkinData", _olua_fun_cocostudio_Skin_getSkinData); + oluacls_func(L, "new", _olua_fun_cocostudio_Skin_new); + oluacls_func(L, "setBone", _olua_fun_cocostudio_Skin_setBone); + oluacls_func(L, "setSkinData", _olua_fun_cocostudio_Skin_setSkinData); + oluacls_func(L, "updateArmatureTransform", _olua_fun_cocostudio_Skin_updateArmatureTransform); + oluacls_prop(L, "bone", _olua_fun_cocostudio_Skin_getBone, _olua_fun_cocostudio_Skin_setBone); + oluacls_prop(L, "displayName", _olua_fun_cocostudio_Skin_getDisplayName, nullptr); + oluacls_prop(L, "nodeToWorldTransformAR", _olua_fun_cocostudio_Skin_getNodeToWorldTransformAR, nullptr); + oluacls_prop(L, "skinData", _olua_fun_cocostudio_Skin_getSkinData, _olua_fun_cocostudio_Skin_setSkinData); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccs_Skin(lua_State *L) +{ + olua_require(L, "cocos2d_studio", luaopen_cocos2d_studio); + if (!olua_getclass(L, "ccs.Skin")) { + luaL_error(L, "class not found: cocostudio::Skin"); + } return 1; } OLUA_END_DECLS -static int _cocostudio_SpriteDisplayData_create(lua_State *L) +static int _olua_fun_cocostudio_SpriteDisplayData_create(lua_State *L) { olua_startinvoke(L); @@ -13299,11 +14876,11 @@ static int _cocostudio_SpriteDisplayData_create(lua_State *L) return num_ret; } -static int _cocostudio_SpriteDisplayData_new(lua_State *L) +static int _olua_fun_cocostudio_SpriteDisplayData_new(lua_State *L) { olua_startinvoke(L); - // SpriteDisplayData() + // cocostudio::SpriteDisplayData() cocostudio::SpriteDisplayData *ret = new cocostudio::SpriteDisplayData(); int num_ret = olua_push_object(L, ret, "ccs.SpriteDisplayData"); olua_postnew(L, ret); @@ -13313,7 +14890,7 @@ static int _cocostudio_SpriteDisplayData_new(lua_State *L) return num_ret; } -static int _cocostudio_SpriteDisplayData_get_skinData(lua_State *L) +static int _olua_fun_cocostudio_SpriteDisplayData_skinData$1(lua_State *L) { olua_startinvoke(L); @@ -13323,44 +14900,74 @@ static int _cocostudio_SpriteDisplayData_get_skinData(lua_State *L) // cocostudio::BaseData skinData cocostudio::BaseData &ret = self->skinData; - int num_ret = olua_pushcopy_object(L, ret, "ccs.BaseData"); + int num_ret = olua_copy_object(L, ret, "ccs.BaseData"); olua_endinvoke(L); return num_ret; } -static int _cocostudio_SpriteDisplayData_set_skinData(lua_State *L) +static int _olua_fun_cocostudio_SpriteDisplayData_skinData$2(lua_State *L) { olua_startinvoke(L); cocostudio::SpriteDisplayData *self = nullptr; - cocostudio::BaseData arg1; /** skinData */ + cocostudio::BaseData *arg1; /** skinData */ olua_to_object(L, 1, &self, "ccs.SpriteDisplayData"); olua_check_object(L, 2, &arg1, "ccs.BaseData"); // cocostudio::BaseData skinData - self->skinData = arg1; + self->skinData = *arg1; olua_endinvoke(L); return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocostudio_SpriteDisplayData(lua_State *L) +static int _olua_fun_cocostudio_SpriteDisplayData_skinData(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // cocostudio::BaseData skinData + return _olua_fun_cocostudio_SpriteDisplayData_skinData$1(L); + } + + if (num_args == 1) { + // if ((olua_is_object(L, 2, "ccs.BaseData"))) { + // cocostudio::BaseData skinData + return _olua_fun_cocostudio_SpriteDisplayData_skinData$2(L); + // } + } + + luaL_error(L, "method 'cocostudio::SpriteDisplayData::skinData' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_cls_ccs_SpriteDisplayData(lua_State *L) { oluacls_class(L, "ccs.SpriteDisplayData"); - oluacls_func(L, "create", _cocostudio_SpriteDisplayData_create); - oluacls_func(L, "new", _cocostudio_SpriteDisplayData_new); - oluacls_prop(L, "skinData", _cocostudio_SpriteDisplayData_get_skinData, _cocostudio_SpriteDisplayData_set_skinData); + oluacls_func(L, "create", _olua_fun_cocostudio_SpriteDisplayData_create); + oluacls_func(L, "new", _olua_fun_cocostudio_SpriteDisplayData_new); + oluacls_prop(L, "skinData", _olua_fun_cocostudio_SpriteDisplayData_skinData, _olua_fun_cocostudio_SpriteDisplayData_skinData); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccs_SpriteDisplayData(lua_State *L) +{ + olua_require(L, "cocos2d_studio", luaopen_cocos2d_studio); + if (!olua_getclass(L, "ccs.SpriteDisplayData")) { + luaL_error(L, "class not found: cocostudio::SpriteDisplayData"); + } return 1; } OLUA_END_DECLS -static int _cocostudio_SpriteFrameCacheHelper___olua_move(lua_State *L) +static int _olua_fun_cocostudio_SpriteFrameCacheHelper___olua_move(lua_State *L) { olua_startinvoke(L); @@ -13372,7 +14979,7 @@ static int _cocostudio_SpriteFrameCacheHelper___olua_move(lua_State *L) return 1; } -static int _cocostudio_SpriteFrameCacheHelper_addSpriteFrameFromFile(lua_State *L) +static int _olua_fun_cocostudio_SpriteFrameCacheHelper_addSpriteFrameFromFile(lua_State *L) { olua_startinvoke(L); @@ -13392,7 +14999,7 @@ static int _cocostudio_SpriteFrameCacheHelper_addSpriteFrameFromFile(lua_State * return 0; } -static int _cocostudio_SpriteFrameCacheHelper_getInstance(lua_State *L) +static int _olua_fun_cocostudio_SpriteFrameCacheHelper_getInstance(lua_State *L) { olua_startinvoke(L); @@ -13405,7 +15012,7 @@ static int _cocostudio_SpriteFrameCacheHelper_getInstance(lua_State *L) return num_ret; } -static int _cocostudio_SpriteFrameCacheHelper_purge(lua_State *L) +static int _olua_fun_cocostudio_SpriteFrameCacheHelper_purge(lua_State *L) { olua_startinvoke(L); @@ -13417,7 +15024,7 @@ static int _cocostudio_SpriteFrameCacheHelper_purge(lua_State *L) return 0; } -static int _cocostudio_SpriteFrameCacheHelper_removeSpriteFrameFromFile(lua_State *L) +static int _olua_fun_cocostudio_SpriteFrameCacheHelper_removeSpriteFrameFromFile(lua_State *L) { olua_startinvoke(L); @@ -13435,22 +15042,31 @@ static int _cocostudio_SpriteFrameCacheHelper_removeSpriteFrameFromFile(lua_Stat return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocostudio_SpriteFrameCacheHelper(lua_State *L) +static int _olua_cls_ccs_SpriteFrameCacheHelper(lua_State *L) { oluacls_class(L, "ccs.SpriteFrameCacheHelper"); - oluacls_func(L, "__olua_move", _cocostudio_SpriteFrameCacheHelper___olua_move); - oluacls_func(L, "addSpriteFrameFromFile", _cocostudio_SpriteFrameCacheHelper_addSpriteFrameFromFile); - oluacls_func(L, "getInstance", _cocostudio_SpriteFrameCacheHelper_getInstance); - oluacls_func(L, "purge", _cocostudio_SpriteFrameCacheHelper_purge); - oluacls_func(L, "removeSpriteFrameFromFile", _cocostudio_SpriteFrameCacheHelper_removeSpriteFrameFromFile); - oluacls_prop(L, "instance", _cocostudio_SpriteFrameCacheHelper_getInstance, nullptr); + oluacls_func(L, "__olua_move", _olua_fun_cocostudio_SpriteFrameCacheHelper___olua_move); + oluacls_func(L, "addSpriteFrameFromFile", _olua_fun_cocostudio_SpriteFrameCacheHelper_addSpriteFrameFromFile); + oluacls_func(L, "getInstance", _olua_fun_cocostudio_SpriteFrameCacheHelper_getInstance); + oluacls_func(L, "purge", _olua_fun_cocostudio_SpriteFrameCacheHelper_purge); + oluacls_func(L, "removeSpriteFrameFromFile", _olua_fun_cocostudio_SpriteFrameCacheHelper_removeSpriteFrameFromFile); + oluacls_prop(L, "instance", _olua_fun_cocostudio_SpriteFrameCacheHelper_getInstance, nullptr); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccs_SpriteFrameCacheHelper(lua_State *L) +{ + olua_require(L, "cocos2d_studio", luaopen_cocos2d_studio); + if (!olua_getclass(L, "ccs.SpriteFrameCacheHelper")) { + luaL_error(L, "class not found: cocostudio::SpriteFrameCacheHelper"); + } return 1; } OLUA_END_DECLS -static int _cocostudio_TextureData_addContourData(lua_State *L) +static int _olua_fun_cocostudio_TextureData_addContourData(lua_State *L) { olua_startinvoke(L); @@ -13468,144 +15084,172 @@ static int _cocostudio_TextureData_addContourData(lua_State *L) return 0; } -static int _cocostudio_TextureData_create(lua_State *L) +static int _olua_fun_cocostudio_TextureData_contourDataList$1(lua_State *L) { olua_startinvoke(L); - // static cocostudio::TextureData *create() - cocostudio::TextureData *ret = cocostudio::TextureData::create(); - int num_ret = olua_push_object(L, ret, "ccs.TextureData"); + cocostudio::TextureData *self = nullptr; + + olua_to_object(L, 1, &self, "ccs.TextureData"); + + // cocos2d::Vector contourDataList + cocos2d::Vector &ret = self->contourDataList; + int num_ret = olua_push_array(L, ret, [L](cocostudio::ContourData *arg1) { + olua_push_object(L, arg1, "ccs.ContourData"); + }); olua_endinvoke(L); return num_ret; } -static int _cocostudio_TextureData_getContourData(lua_State *L) +static int _olua_fun_cocostudio_TextureData_contourDataList$2(lua_State *L) { olua_startinvoke(L); cocostudio::TextureData *self = nullptr; - int arg1 = 0; /** index */ + cocos2d::Vector arg1; /** contourDataList */ olua_to_object(L, 1, &self, "ccs.TextureData"); - olua_check_integer(L, 2, &arg1); + olua_check_array(L, 2, arg1, [L](cocostudio::ContourData **arg1) { + olua_check_object(L, -1, arg1, "ccs.ContourData"); + }); - // cocostudio::ContourData *getContourData(int index) - cocostudio::ContourData *ret = self->getContourData(arg1); - int num_ret = olua_push_object(L, ret, "ccs.ContourData"); + // cocos2d::Vector contourDataList + self->contourDataList = arg1; olua_endinvoke(L); - return num_ret; + return 0; } -static int _cocostudio_TextureData_init(lua_State *L) +static int _olua_fun_cocostudio_TextureData_contourDataList(lua_State *L) { - olua_startinvoke(L); - - cocostudio::TextureData *self = nullptr; + int num_args = lua_gettop(L) - 1; - olua_to_object(L, 1, &self, "ccs.TextureData"); + if (num_args == 0) { + // cocos2d::Vector contourDataList + return _olua_fun_cocostudio_TextureData_contourDataList$1(L); + } - // bool init() - bool ret = self->init(); - int num_ret = olua_push_bool(L, ret); + if (num_args == 1) { + // if ((olua_is_array(L, 2))) { + // cocos2d::Vector contourDataList + return _olua_fun_cocostudio_TextureData_contourDataList$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'cocostudio::TextureData::contourDataList' not support '%d' arguments", num_args); - return num_ret; + return 0; } -static int _cocostudio_TextureData_new(lua_State *L) +static int _olua_fun_cocostudio_TextureData_create(lua_State *L) { olua_startinvoke(L); - // TextureData() - cocostudio::TextureData *ret = new cocostudio::TextureData(); + // static cocostudio::TextureData *create() + cocostudio::TextureData *ret = cocostudio::TextureData::create(); int num_ret = olua_push_object(L, ret, "ccs.TextureData"); - olua_postnew(L, ret); olua_endinvoke(L); return num_ret; } -static int _cocostudio_TextureData_get_contourDataList(lua_State *L) +static int _olua_fun_cocostudio_TextureData_getContourData(lua_State *L) { olua_startinvoke(L); cocostudio::TextureData *self = nullptr; + int arg1 = 0; /** index */ olua_to_object(L, 1, &self, "ccs.TextureData"); + olua_check_integer(L, 2, &arg1); - // cocos2d::Vector contourDataList - cocos2d::Vector &ret = self->contourDataList; - int num_ret = olua_push_array(L, ret, [L](cocostudio::ContourData *arg1) { - olua_push_object(L, arg1, "ccs.ContourData"); - }); + // cocostudio::ContourData *getContourData(int index) + cocostudio::ContourData *ret = self->getContourData(arg1); + int num_ret = olua_push_object(L, ret, "ccs.ContourData"); olua_endinvoke(L); return num_ret; } -static int _cocostudio_TextureData_set_contourDataList(lua_State *L) +static int _olua_fun_cocostudio_TextureData_height$1(lua_State *L) { olua_startinvoke(L); cocostudio::TextureData *self = nullptr; - cocos2d::Vector arg1; /** contourDataList */ olua_to_object(L, 1, &self, "ccs.TextureData"); - olua_check_array(L, 2, arg1, [L](cocostudio::ContourData **arg1) { - olua_check_object(L, -1, arg1, "ccs.ContourData"); - }); - // cocos2d::Vector contourDataList - self->contourDataList = arg1; + // float height + float ret = self->height; + int num_ret = olua_push_number(L, ret); olua_endinvoke(L); - return 0; + return num_ret; } -static int _cocostudio_TextureData_get_height(lua_State *L) +static int _olua_fun_cocostudio_TextureData_height$2(lua_State *L) { olua_startinvoke(L); cocostudio::TextureData *self = nullptr; + float arg1 = 0; /** height */ olua_to_object(L, 1, &self, "ccs.TextureData"); + olua_check_number(L, 2, &arg1); // float height - float ret = self->height; - int num_ret = olua_push_number(L, ret); + self->height = arg1; olua_endinvoke(L); - return num_ret; + return 0; +} + +static int _olua_fun_cocostudio_TextureData_height(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float height + return _olua_fun_cocostudio_TextureData_height$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float height + return _olua_fun_cocostudio_TextureData_height$2(L); + // } + } + + luaL_error(L, "method 'cocostudio::TextureData::height' not support '%d' arguments", num_args); + + return 0; } -static int _cocostudio_TextureData_set_height(lua_State *L) +static int _olua_fun_cocostudio_TextureData_init(lua_State *L) { olua_startinvoke(L); cocostudio::TextureData *self = nullptr; - float arg1 = 0; /** height */ olua_to_object(L, 1, &self, "ccs.TextureData"); - olua_check_number(L, 2, &arg1); - // float height - self->height = arg1; + // bool init() + bool ret = self->init(); + int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); - return 0; + return num_ret; } -static int _cocostudio_TextureData_get_name(lua_State *L) +static int _olua_fun_cocostudio_TextureData_name$1(lua_State *L) { olua_startinvoke(L); @@ -13622,7 +15266,7 @@ static int _cocostudio_TextureData_get_name(lua_State *L) return num_ret; } -static int _cocostudio_TextureData_set_name(lua_State *L) +static int _olua_fun_cocostudio_TextureData_name$2(lua_State *L) { olua_startinvoke(L); @@ -13640,7 +15284,42 @@ static int _cocostudio_TextureData_set_name(lua_State *L) return 0; } -static int _cocostudio_TextureData_get_pivotX(lua_State *L) +static int _olua_fun_cocostudio_TextureData_name(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // std::string name + return _olua_fun_cocostudio_TextureData_name$1(L); + } + + if (num_args == 1) { + // if ((olua_is_string(L, 2))) { + // std::string name + return _olua_fun_cocostudio_TextureData_name$2(L); + // } + } + + luaL_error(L, "method 'cocostudio::TextureData::name' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocostudio_TextureData_new(lua_State *L) +{ + olua_startinvoke(L); + + // cocostudio::TextureData() + cocostudio::TextureData *ret = new cocostudio::TextureData(); + int num_ret = olua_push_object(L, ret, "ccs.TextureData"); + olua_postnew(L, ret); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_cocostudio_TextureData_pivotX$1(lua_State *L) { olua_startinvoke(L); @@ -13657,7 +15336,7 @@ static int _cocostudio_TextureData_get_pivotX(lua_State *L) return num_ret; } -static int _cocostudio_TextureData_set_pivotX(lua_State *L) +static int _olua_fun_cocostudio_TextureData_pivotX$2(lua_State *L) { olua_startinvoke(L); @@ -13675,7 +15354,28 @@ static int _cocostudio_TextureData_set_pivotX(lua_State *L) return 0; } -static int _cocostudio_TextureData_get_pivotY(lua_State *L) +static int _olua_fun_cocostudio_TextureData_pivotX(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float pivotX + return _olua_fun_cocostudio_TextureData_pivotX$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float pivotX + return _olua_fun_cocostudio_TextureData_pivotX$2(L); + // } + } + + luaL_error(L, "method 'cocostudio::TextureData::pivotX' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocostudio_TextureData_pivotY$1(lua_State *L) { olua_startinvoke(L); @@ -13692,7 +15392,7 @@ static int _cocostudio_TextureData_get_pivotY(lua_State *L) return num_ret; } -static int _cocostudio_TextureData_set_pivotY(lua_State *L) +static int _olua_fun_cocostudio_TextureData_pivotY$2(lua_State *L) { olua_startinvoke(L); @@ -13710,7 +15410,28 @@ static int _cocostudio_TextureData_set_pivotY(lua_State *L) return 0; } -static int _cocostudio_TextureData_get_width(lua_State *L) +static int _olua_fun_cocostudio_TextureData_pivotY(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float pivotY + return _olua_fun_cocostudio_TextureData_pivotY$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float pivotY + return _olua_fun_cocostudio_TextureData_pivotY$2(L); + // } + } + + luaL_error(L, "method 'cocostudio::TextureData::pivotY' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocostudio_TextureData_width$1(lua_State *L) { olua_startinvoke(L); @@ -13727,7 +15448,7 @@ static int _cocostudio_TextureData_get_width(lua_State *L) return num_ret; } -static int _cocostudio_TextureData_set_width(lua_State *L) +static int _olua_fun_cocostudio_TextureData_width$2(lua_State *L) { olua_startinvoke(L); @@ -13745,27 +15466,57 @@ static int _cocostudio_TextureData_set_width(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocostudio_TextureData(lua_State *L) +static int _olua_fun_cocostudio_TextureData_width(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float width + return _olua_fun_cocostudio_TextureData_width$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float width + return _olua_fun_cocostudio_TextureData_width$2(L); + // } + } + + luaL_error(L, "method 'cocostudio::TextureData::width' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_cls_ccs_TextureData(lua_State *L) { oluacls_class(L, "ccs.TextureData"); - oluacls_func(L, "addContourData", _cocostudio_TextureData_addContourData); - oluacls_func(L, "create", _cocostudio_TextureData_create); - oluacls_func(L, "getContourData", _cocostudio_TextureData_getContourData); - oluacls_func(L, "init", _cocostudio_TextureData_init); - oluacls_func(L, "new", _cocostudio_TextureData_new); - oluacls_prop(L, "contourDataList", _cocostudio_TextureData_get_contourDataList, _cocostudio_TextureData_set_contourDataList); - oluacls_prop(L, "height", _cocostudio_TextureData_get_height, _cocostudio_TextureData_set_height); - oluacls_prop(L, "name", _cocostudio_TextureData_get_name, _cocostudio_TextureData_set_name); - oluacls_prop(L, "pivotX", _cocostudio_TextureData_get_pivotX, _cocostudio_TextureData_set_pivotX); - oluacls_prop(L, "pivotY", _cocostudio_TextureData_get_pivotY, _cocostudio_TextureData_set_pivotY); - oluacls_prop(L, "width", _cocostudio_TextureData_get_width, _cocostudio_TextureData_set_width); + oluacls_func(L, "addContourData", _olua_fun_cocostudio_TextureData_addContourData); + oluacls_func(L, "create", _olua_fun_cocostudio_TextureData_create); + oluacls_func(L, "getContourData", _olua_fun_cocostudio_TextureData_getContourData); + oluacls_func(L, "init", _olua_fun_cocostudio_TextureData_init); + oluacls_func(L, "new", _olua_fun_cocostudio_TextureData_new); + oluacls_prop(L, "contourDataList", _olua_fun_cocostudio_TextureData_contourDataList, _olua_fun_cocostudio_TextureData_contourDataList); + oluacls_prop(L, "height", _olua_fun_cocostudio_TextureData_height, _olua_fun_cocostudio_TextureData_height); + oluacls_prop(L, "name", _olua_fun_cocostudio_TextureData_name, _olua_fun_cocostudio_TextureData_name); + oluacls_prop(L, "pivotX", _olua_fun_cocostudio_TextureData_pivotX, _olua_fun_cocostudio_TextureData_pivotX); + oluacls_prop(L, "pivotY", _olua_fun_cocostudio_TextureData_pivotY, _olua_fun_cocostudio_TextureData_pivotY); + oluacls_prop(L, "width", _olua_fun_cocostudio_TextureData_width, _olua_fun_cocostudio_TextureData_width); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccs_TextureData(lua_State *L) +{ + olua_require(L, "cocos2d_studio", luaopen_cocos2d_studio); + if (!olua_getclass(L, "ccs.TextureData")) { + luaL_error(L, "class not found: cocostudio::TextureData"); + } return 1; } OLUA_END_DECLS -static int _cocostudio_Tween_create(lua_State *L) +static int _olua_fun_cocostudio_Tween_create(lua_State *L) { olua_startinvoke(L); @@ -13782,7 +15533,7 @@ static int _cocostudio_Tween_create(lua_State *L) return num_ret; } -static int _cocostudio_Tween_getAnimation(lua_State *L) +static int _olua_fun_cocostudio_Tween_getAnimation(lua_State *L) { olua_startinvoke(L); @@ -13799,7 +15550,7 @@ static int _cocostudio_Tween_getAnimation(lua_State *L) return num_ret; } -static int _cocostudio_Tween_getMovementBoneData(lua_State *L) +static int _olua_fun_cocostudio_Tween_getMovementBoneData(lua_State *L) { olua_startinvoke(L); @@ -13816,7 +15567,7 @@ static int _cocostudio_Tween_getMovementBoneData(lua_State *L) return num_ret; } -static int _cocostudio_Tween_gotoAndPause(lua_State *L) +static int _olua_fun_cocostudio_Tween_gotoAndPause(lua_State *L) { olua_startinvoke(L); @@ -13834,7 +15585,7 @@ static int _cocostudio_Tween_gotoAndPause(lua_State *L) return 0; } -static int _cocostudio_Tween_gotoAndPlay(lua_State *L) +static int _olua_fun_cocostudio_Tween_gotoAndPlay(lua_State *L) { olua_startinvoke(L); @@ -13852,7 +15603,7 @@ static int _cocostudio_Tween_gotoAndPlay(lua_State *L) return 0; } -static int _cocostudio_Tween_init(lua_State *L) +static int _olua_fun_cocostudio_Tween_init(lua_State *L) { olua_startinvoke(L); @@ -13871,11 +15622,11 @@ static int _cocostudio_Tween_init(lua_State *L) return num_ret; } -static int _cocostudio_Tween_new(lua_State *L) +static int _olua_fun_cocostudio_Tween_new(lua_State *L) { olua_startinvoke(L); - // Tween() + // cocostudio::Tween() cocostudio::Tween *ret = new cocostudio::Tween(); int num_ret = olua_push_object(L, ret, "ccs.Tween"); olua_postnew(L, ret); @@ -13885,7 +15636,7 @@ static int _cocostudio_Tween_new(lua_State *L) return num_ret; } -static int _cocostudio_Tween_play$1(lua_State *L) +static int _olua_fun_cocostudio_Tween_play$1(lua_State *L) { olua_startinvoke(L); @@ -13911,7 +15662,7 @@ static int _cocostudio_Tween_play$1(lua_State *L) return 0; } -static int _cocostudio_Tween_play$2(lua_State *L) +static int _olua_fun_cocostudio_Tween_play$2(lua_State *L) { olua_startinvoke(L); @@ -13935,21 +15686,21 @@ static int _cocostudio_Tween_play$2(lua_State *L) return 0; } -static int _cocostudio_Tween_play(lua_State *L) +static int _olua_fun_cocostudio_Tween_play(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 4) { // if ((olua_is_integer(L, 2)) && (olua_is_integer(L, 3)) && (olua_is_integer(L, 4)) && (olua_is_integer(L, 5))) { // @using void play(int durationTo, int durationTween, int loop, int tweenEasing) - return _cocostudio_Tween_play$2(L); + return _olua_fun_cocostudio_Tween_play$2(L); // } } if (num_args == 5) { // if ((olua_is_object(L, 2, "ccs.MovementBoneData")) && (olua_is_integer(L, 3)) && (olua_is_integer(L, 4)) && (olua_is_integer(L, 5)) && (olua_is_integer(L, 6))) { // void play(cocostudio::MovementBoneData *movementBoneData, int durationTo, int durationTween, int loop, int tweenEasing) - return _cocostudio_Tween_play$1(L); + return _olua_fun_cocostudio_Tween_play$1(L); // } } @@ -13958,7 +15709,7 @@ static int _cocostudio_Tween_play(lua_State *L) return 0; } -static int _cocostudio_Tween_setAnimation(lua_State *L) +static int _olua_fun_cocostudio_Tween_setAnimation(lua_State *L) { olua_startinvoke(L); @@ -13976,7 +15727,7 @@ static int _cocostudio_Tween_setAnimation(lua_State *L) return 0; } -static int _cocostudio_Tween_setMovementBoneData(lua_State *L) +static int _olua_fun_cocostudio_Tween_setMovementBoneData(lua_State *L) { olua_startinvoke(L); @@ -13994,29 +15745,37 @@ static int _cocostudio_Tween_setMovementBoneData(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocostudio_Tween(lua_State *L) +static int _olua_cls_ccs_Tween(lua_State *L) { oluacls_class(L, "ccs.Tween"); - oluacls_func(L, "create", _cocostudio_Tween_create); - oluacls_func(L, "getAnimation", _cocostudio_Tween_getAnimation); - oluacls_func(L, "getMovementBoneData", _cocostudio_Tween_getMovementBoneData); - oluacls_func(L, "gotoAndPause", _cocostudio_Tween_gotoAndPause); - oluacls_func(L, "gotoAndPlay", _cocostudio_Tween_gotoAndPlay); - oluacls_func(L, "init", _cocostudio_Tween_init); - oluacls_func(L, "new", _cocostudio_Tween_new); - oluacls_func(L, "play", _cocostudio_Tween_play); - oluacls_func(L, "setAnimation", _cocostudio_Tween_setAnimation); - oluacls_func(L, "setMovementBoneData", _cocostudio_Tween_setMovementBoneData); - oluacls_prop(L, "animation", _cocostudio_Tween_getAnimation, _cocostudio_Tween_setAnimation); - oluacls_prop(L, "movementBoneData", _cocostudio_Tween_getMovementBoneData, _cocostudio_Tween_setMovementBoneData); + oluacls_func(L, "create", _olua_fun_cocostudio_Tween_create); + oluacls_func(L, "getAnimation", _olua_fun_cocostudio_Tween_getAnimation); + oluacls_func(L, "getMovementBoneData", _olua_fun_cocostudio_Tween_getMovementBoneData); + oluacls_func(L, "gotoAndPause", _olua_fun_cocostudio_Tween_gotoAndPause); + oluacls_func(L, "gotoAndPlay", _olua_fun_cocostudio_Tween_gotoAndPlay); + oluacls_func(L, "init", _olua_fun_cocostudio_Tween_init); + oluacls_func(L, "new", _olua_fun_cocostudio_Tween_new); + oluacls_func(L, "play", _olua_fun_cocostudio_Tween_play); + oluacls_func(L, "setAnimation", _olua_fun_cocostudio_Tween_setAnimation); + oluacls_func(L, "setMovementBoneData", _olua_fun_cocostudio_Tween_setMovementBoneData); + oluacls_prop(L, "animation", _olua_fun_cocostudio_Tween_getAnimation, _olua_fun_cocostudio_Tween_setAnimation); + oluacls_prop(L, "movementBoneData", _olua_fun_cocostudio_Tween_getMovementBoneData, _olua_fun_cocostudio_Tween_setMovementBoneData); return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocostudio_timeline_InnerActionType(lua_State *L) +OLUA_LIB int luaopen_ccs_Tween(lua_State *L) +{ + olua_require(L, "cocos2d_studio", luaopen_cocos2d_studio); + if (!olua_getclass(L, "ccs.Tween")) { + luaL_error(L, "class not found: cocostudio::Tween"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_ccs_timeline_InnerActionType(lua_State *L) { oluacls_class(L, "ccs.timeline.InnerActionType"); oluacls_func(L, "__index", olua_indexerror); @@ -14027,9 +15786,19 @@ OLUA_LIB int luaopen_cocostudio_timeline_InnerActionType(lua_State *L) return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccs_timeline_InnerActionType(lua_State *L) +{ + olua_require(L, "cocos2d_studio", luaopen_cocos2d_studio); + if (!olua_getclass(L, "ccs.timeline.InnerActionType")) { + luaL_error(L, "class not found: cocostudio::timeline::InnerActionType"); + } + return 1; +} OLUA_END_DECLS -static int _cocostudio_timeline_Frame_apply(lua_State *L) +static int _olua_fun_cocostudio_timeline_Frame_apply(lua_State *L) { olua_startinvoke(L); @@ -14047,7 +15816,7 @@ static int _cocostudio_timeline_Frame_apply(lua_State *L) return 0; } -static int _cocostudio_timeline_Frame_clone(lua_State *L) +static int _olua_fun_cocostudio_timeline_Frame_clone(lua_State *L) { olua_startinvoke(L); @@ -14064,7 +15833,7 @@ static int _cocostudio_timeline_Frame_clone(lua_State *L) return num_ret; } -static int _cocostudio_timeline_Frame_getEasingParams(lua_State *L) +static int _olua_fun_cocostudio_timeline_Frame_getEasingParams(lua_State *L) { olua_startinvoke(L); @@ -14083,7 +15852,7 @@ static int _cocostudio_timeline_Frame_getEasingParams(lua_State *L) return num_ret; } -static int _cocostudio_timeline_Frame_getFrameIndex(lua_State *L) +static int _olua_fun_cocostudio_timeline_Frame_getFrameIndex(lua_State *L) { olua_startinvoke(L); @@ -14100,7 +15869,7 @@ static int _cocostudio_timeline_Frame_getFrameIndex(lua_State *L) return num_ret; } -static int _cocostudio_timeline_Frame_getNode(lua_State *L) +static int _olua_fun_cocostudio_timeline_Frame_getNode(lua_State *L) { olua_startinvoke(L); @@ -14120,7 +15889,7 @@ static int _cocostudio_timeline_Frame_getNode(lua_State *L) return num_ret; } -static int _cocostudio_timeline_Frame_getTimeline(lua_State *L) +static int _olua_fun_cocostudio_timeline_Frame_getTimeline(lua_State *L) { olua_startinvoke(L); @@ -14140,7 +15909,7 @@ static int _cocostudio_timeline_Frame_getTimeline(lua_State *L) return num_ret; } -static int _cocostudio_timeline_Frame_getTweenType(lua_State *L) +static int _olua_fun_cocostudio_timeline_Frame_getTweenType(lua_State *L) { olua_startinvoke(L); @@ -14157,7 +15926,7 @@ static int _cocostudio_timeline_Frame_getTweenType(lua_State *L) return num_ret; } -static int _cocostudio_timeline_Frame_isEnterWhenPassed(lua_State *L) +static int _olua_fun_cocostudio_timeline_Frame_isEnterWhenPassed(lua_State *L) { olua_startinvoke(L); @@ -14174,7 +15943,7 @@ static int _cocostudio_timeline_Frame_isEnterWhenPassed(lua_State *L) return num_ret; } -static int _cocostudio_timeline_Frame_isTween(lua_State *L) +static int _olua_fun_cocostudio_timeline_Frame_isTween(lua_State *L) { olua_startinvoke(L); @@ -14191,7 +15960,7 @@ static int _cocostudio_timeline_Frame_isTween(lua_State *L) return num_ret; } -static int _cocostudio_timeline_Frame_onEnter(lua_State *L) +static int _olua_fun_cocostudio_timeline_Frame_onEnter(lua_State *L) { olua_startinvoke(L); @@ -14211,7 +15980,7 @@ static int _cocostudio_timeline_Frame_onEnter(lua_State *L) return 0; } -static int _cocostudio_timeline_Frame_setEasingParams(lua_State *L) +static int _olua_fun_cocostudio_timeline_Frame_setEasingParams(lua_State *L) { olua_startinvoke(L); @@ -14231,7 +16000,7 @@ static int _cocostudio_timeline_Frame_setEasingParams(lua_State *L) return 0; } -static int _cocostudio_timeline_Frame_setFrameIndex(lua_State *L) +static int _olua_fun_cocostudio_timeline_Frame_setFrameIndex(lua_State *L) { olua_startinvoke(L); @@ -14249,7 +16018,7 @@ static int _cocostudio_timeline_Frame_setFrameIndex(lua_State *L) return 0; } -static int _cocostudio_timeline_Frame_setNode(lua_State *L) +static int _olua_fun_cocostudio_timeline_Frame_setNode(lua_State *L) { olua_startinvoke(L); @@ -14270,7 +16039,7 @@ static int _cocostudio_timeline_Frame_setNode(lua_State *L) return 0; } -static int _cocostudio_timeline_Frame_setTimeline(lua_State *L) +static int _olua_fun_cocostudio_timeline_Frame_setTimeline(lua_State *L) { olua_startinvoke(L); @@ -14291,7 +16060,7 @@ static int _cocostudio_timeline_Frame_setTimeline(lua_State *L) return 0; } -static int _cocostudio_timeline_Frame_setTween(lua_State *L) +static int _olua_fun_cocostudio_timeline_Frame_setTween(lua_State *L) { olua_startinvoke(L); @@ -14309,7 +16078,7 @@ static int _cocostudio_timeline_Frame_setTween(lua_State *L) return 0; } -static int _cocostudio_timeline_Frame_setTweenType(lua_State *L) +static int _olua_fun_cocostudio_timeline_Frame_setTweenType(lua_State *L) { olua_startinvoke(L); @@ -14327,39 +16096,48 @@ static int _cocostudio_timeline_Frame_setTweenType(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocostudio_timeline_Frame(lua_State *L) +static int _olua_cls_ccs_timeline_Frame(lua_State *L) { oluacls_class(L, "ccs.timeline.Frame"); - oluacls_func(L, "apply", _cocostudio_timeline_Frame_apply); - oluacls_func(L, "clone", _cocostudio_timeline_Frame_clone); - oluacls_func(L, "getEasingParams", _cocostudio_timeline_Frame_getEasingParams); - oluacls_func(L, "getFrameIndex", _cocostudio_timeline_Frame_getFrameIndex); - oluacls_func(L, "getNode", _cocostudio_timeline_Frame_getNode); - oluacls_func(L, "getTimeline", _cocostudio_timeline_Frame_getTimeline); - oluacls_func(L, "getTweenType", _cocostudio_timeline_Frame_getTweenType); - oluacls_func(L, "isEnterWhenPassed", _cocostudio_timeline_Frame_isEnterWhenPassed); - oluacls_func(L, "isTween", _cocostudio_timeline_Frame_isTween); - oluacls_func(L, "onEnter", _cocostudio_timeline_Frame_onEnter); - oluacls_func(L, "setEasingParams", _cocostudio_timeline_Frame_setEasingParams); - oluacls_func(L, "setFrameIndex", _cocostudio_timeline_Frame_setFrameIndex); - oluacls_func(L, "setNode", _cocostudio_timeline_Frame_setNode); - oluacls_func(L, "setTimeline", _cocostudio_timeline_Frame_setTimeline); - oluacls_func(L, "setTween", _cocostudio_timeline_Frame_setTween); - oluacls_func(L, "setTweenType", _cocostudio_timeline_Frame_setTweenType); - oluacls_prop(L, "easingParams", _cocostudio_timeline_Frame_getEasingParams, _cocostudio_timeline_Frame_setEasingParams); - oluacls_prop(L, "enterWhenPassed", _cocostudio_timeline_Frame_isEnterWhenPassed, nullptr); - oluacls_prop(L, "frameIndex", _cocostudio_timeline_Frame_getFrameIndex, _cocostudio_timeline_Frame_setFrameIndex); - oluacls_prop(L, "node", _cocostudio_timeline_Frame_getNode, _cocostudio_timeline_Frame_setNode); - oluacls_prop(L, "timeline", _cocostudio_timeline_Frame_getTimeline, _cocostudio_timeline_Frame_setTimeline); - oluacls_prop(L, "tween", _cocostudio_timeline_Frame_isTween, _cocostudio_timeline_Frame_setTween); - oluacls_prop(L, "tweenType", _cocostudio_timeline_Frame_getTweenType, _cocostudio_timeline_Frame_setTweenType); + oluacls_func(L, "apply", _olua_fun_cocostudio_timeline_Frame_apply); + oluacls_func(L, "clone", _olua_fun_cocostudio_timeline_Frame_clone); + oluacls_func(L, "getEasingParams", _olua_fun_cocostudio_timeline_Frame_getEasingParams); + oluacls_func(L, "getFrameIndex", _olua_fun_cocostudio_timeline_Frame_getFrameIndex); + oluacls_func(L, "getNode", _olua_fun_cocostudio_timeline_Frame_getNode); + oluacls_func(L, "getTimeline", _olua_fun_cocostudio_timeline_Frame_getTimeline); + oluacls_func(L, "getTweenType", _olua_fun_cocostudio_timeline_Frame_getTweenType); + oluacls_func(L, "isEnterWhenPassed", _olua_fun_cocostudio_timeline_Frame_isEnterWhenPassed); + oluacls_func(L, "isTween", _olua_fun_cocostudio_timeline_Frame_isTween); + oluacls_func(L, "onEnter", _olua_fun_cocostudio_timeline_Frame_onEnter); + oluacls_func(L, "setEasingParams", _olua_fun_cocostudio_timeline_Frame_setEasingParams); + oluacls_func(L, "setFrameIndex", _olua_fun_cocostudio_timeline_Frame_setFrameIndex); + oluacls_func(L, "setNode", _olua_fun_cocostudio_timeline_Frame_setNode); + oluacls_func(L, "setTimeline", _olua_fun_cocostudio_timeline_Frame_setTimeline); + oluacls_func(L, "setTween", _olua_fun_cocostudio_timeline_Frame_setTween); + oluacls_func(L, "setTweenType", _olua_fun_cocostudio_timeline_Frame_setTweenType); + oluacls_prop(L, "easingParams", _olua_fun_cocostudio_timeline_Frame_getEasingParams, _olua_fun_cocostudio_timeline_Frame_setEasingParams); + oluacls_prop(L, "enterWhenPassed", _olua_fun_cocostudio_timeline_Frame_isEnterWhenPassed, nullptr); + oluacls_prop(L, "frameIndex", _olua_fun_cocostudio_timeline_Frame_getFrameIndex, _olua_fun_cocostudio_timeline_Frame_setFrameIndex); + oluacls_prop(L, "node", _olua_fun_cocostudio_timeline_Frame_getNode, _olua_fun_cocostudio_timeline_Frame_setNode); + oluacls_prop(L, "timeline", _olua_fun_cocostudio_timeline_Frame_getTimeline, _olua_fun_cocostudio_timeline_Frame_setTimeline); + oluacls_prop(L, "tween", _olua_fun_cocostudio_timeline_Frame_isTween, _olua_fun_cocostudio_timeline_Frame_setTween); + oluacls_prop(L, "tweenType", _olua_fun_cocostudio_timeline_Frame_getTweenType, _olua_fun_cocostudio_timeline_Frame_setTweenType); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccs_timeline_Frame(lua_State *L) +{ + olua_require(L, "cocos2d_studio", luaopen_cocos2d_studio); + if (!olua_getclass(L, "ccs.timeline.Frame")) { + luaL_error(L, "class not found: cocostudio::timeline::Frame"); + } + return 1; +} OLUA_END_DECLS -static int _cocostudio_timeline_AlphaFrame_create(lua_State *L) +static int _olua_fun_cocostudio_timeline_AlphaFrame_create(lua_State *L) { olua_startinvoke(L); @@ -14372,7 +16150,7 @@ static int _cocostudio_timeline_AlphaFrame_create(lua_State *L) return num_ret; } -static int _cocostudio_timeline_AlphaFrame_getAlpha(lua_State *L) +static int _olua_fun_cocostudio_timeline_AlphaFrame_getAlpha(lua_State *L) { olua_startinvoke(L); @@ -14389,11 +16167,11 @@ static int _cocostudio_timeline_AlphaFrame_getAlpha(lua_State *L) return num_ret; } -static int _cocostudio_timeline_AlphaFrame_new(lua_State *L) +static int _olua_fun_cocostudio_timeline_AlphaFrame_new(lua_State *L) { olua_startinvoke(L); - // AlphaFrame() + // cocostudio::timeline::AlphaFrame() cocostudio::timeline::AlphaFrame *ret = new cocostudio::timeline::AlphaFrame(); int num_ret = olua_push_object(L, ret, "ccs.timeline.AlphaFrame"); olua_postnew(L, ret); @@ -14403,7 +16181,7 @@ static int _cocostudio_timeline_AlphaFrame_new(lua_State *L) return num_ret; } -static int _cocostudio_timeline_AlphaFrame_setAlpha(lua_State *L) +static int _olua_fun_cocostudio_timeline_AlphaFrame_setAlpha(lua_State *L) { olua_startinvoke(L); @@ -14421,21 +16199,30 @@ static int _cocostudio_timeline_AlphaFrame_setAlpha(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocostudio_timeline_AlphaFrame(lua_State *L) +static int _olua_cls_ccs_timeline_AlphaFrame(lua_State *L) { oluacls_class(L, "ccs.timeline.AlphaFrame"); - oluacls_func(L, "create", _cocostudio_timeline_AlphaFrame_create); - oluacls_func(L, "getAlpha", _cocostudio_timeline_AlphaFrame_getAlpha); - oluacls_func(L, "new", _cocostudio_timeline_AlphaFrame_new); - oluacls_func(L, "setAlpha", _cocostudio_timeline_AlphaFrame_setAlpha); - oluacls_prop(L, "alpha", _cocostudio_timeline_AlphaFrame_getAlpha, _cocostudio_timeline_AlphaFrame_setAlpha); + oluacls_func(L, "create", _olua_fun_cocostudio_timeline_AlphaFrame_create); + oluacls_func(L, "getAlpha", _olua_fun_cocostudio_timeline_AlphaFrame_getAlpha); + oluacls_func(L, "new", _olua_fun_cocostudio_timeline_AlphaFrame_new); + oluacls_func(L, "setAlpha", _olua_fun_cocostudio_timeline_AlphaFrame_setAlpha); + oluacls_prop(L, "alpha", _olua_fun_cocostudio_timeline_AlphaFrame_getAlpha, _olua_fun_cocostudio_timeline_AlphaFrame_setAlpha); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccs_timeline_AlphaFrame(lua_State *L) +{ + olua_require(L, "cocos2d_studio", luaopen_cocos2d_studio); + if (!olua_getclass(L, "ccs.timeline.AlphaFrame")) { + luaL_error(L, "class not found: cocostudio::timeline::AlphaFrame"); + } return 1; } OLUA_END_DECLS -static int _cocostudio_timeline_AnchorPointFrame_create(lua_State *L) +static int _olua_fun_cocostudio_timeline_AnchorPointFrame_create(lua_State *L) { olua_startinvoke(L); @@ -14448,7 +16235,7 @@ static int _cocostudio_timeline_AnchorPointFrame_create(lua_State *L) return num_ret; } -static int _cocostudio_timeline_AnchorPointFrame_getAnchorPoint(lua_State *L) +static int _olua_fun_cocostudio_timeline_AnchorPointFrame_getAnchorPoint(lua_State *L) { olua_startinvoke(L); @@ -14458,18 +16245,18 @@ static int _cocostudio_timeline_AnchorPointFrame_getAnchorPoint(lua_State *L) // cocos2d::Point getAnchorPoint() cocos2d::Point ret = self->getAnchorPoint(); - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec2"); + int num_ret = olua_copy_object(L, ret, "cc.Vec2"); olua_endinvoke(L); return num_ret; } -static int _cocostudio_timeline_AnchorPointFrame_new(lua_State *L) +static int _olua_fun_cocostudio_timeline_AnchorPointFrame_new(lua_State *L) { olua_startinvoke(L); - // AnchorPointFrame() + // cocostudio::timeline::AnchorPointFrame() cocostudio::timeline::AnchorPointFrame *ret = new cocostudio::timeline::AnchorPointFrame(); int num_ret = olua_push_object(L, ret, "ccs.timeline.AnchorPointFrame"); olua_postnew(L, ret); @@ -14479,39 +16266,48 @@ static int _cocostudio_timeline_AnchorPointFrame_new(lua_State *L) return num_ret; } -static int _cocostudio_timeline_AnchorPointFrame_setAnchorPoint(lua_State *L) +static int _olua_fun_cocostudio_timeline_AnchorPointFrame_setAnchorPoint(lua_State *L) { olua_startinvoke(L); cocostudio::timeline::AnchorPointFrame *self = nullptr; - cocos2d::Point arg1; /** point */ + cocos2d::Point *arg1; /** point */ olua_to_object(L, 1, &self, "ccs.timeline.AnchorPointFrame"); olua_check_object(L, 2, &arg1, "cc.Vec2"); // void setAnchorPoint(const cocos2d::Point &point) - self->setAnchorPoint(arg1); + self->setAnchorPoint(*arg1); olua_endinvoke(L); return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocostudio_timeline_AnchorPointFrame(lua_State *L) +static int _olua_cls_ccs_timeline_AnchorPointFrame(lua_State *L) { oluacls_class(L, "ccs.timeline.AnchorPointFrame"); - oluacls_func(L, "create", _cocostudio_timeline_AnchorPointFrame_create); - oluacls_func(L, "getAnchorPoint", _cocostudio_timeline_AnchorPointFrame_getAnchorPoint); - oluacls_func(L, "new", _cocostudio_timeline_AnchorPointFrame_new); - oluacls_func(L, "setAnchorPoint", _cocostudio_timeline_AnchorPointFrame_setAnchorPoint); - oluacls_prop(L, "anchorPoint", _cocostudio_timeline_AnchorPointFrame_getAnchorPoint, _cocostudio_timeline_AnchorPointFrame_setAnchorPoint); + oluacls_func(L, "create", _olua_fun_cocostudio_timeline_AnchorPointFrame_create); + oluacls_func(L, "getAnchorPoint", _olua_fun_cocostudio_timeline_AnchorPointFrame_getAnchorPoint); + oluacls_func(L, "new", _olua_fun_cocostudio_timeline_AnchorPointFrame_new); + oluacls_func(L, "setAnchorPoint", _olua_fun_cocostudio_timeline_AnchorPointFrame_setAnchorPoint); + oluacls_prop(L, "anchorPoint", _olua_fun_cocostudio_timeline_AnchorPointFrame_getAnchorPoint, _olua_fun_cocostudio_timeline_AnchorPointFrame_setAnchorPoint); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccs_timeline_AnchorPointFrame(lua_State *L) +{ + olua_require(L, "cocos2d_studio", luaopen_cocos2d_studio); + if (!olua_getclass(L, "ccs.timeline.AnchorPointFrame")) { + luaL_error(L, "class not found: cocostudio::timeline::AnchorPointFrame"); + } return 1; } OLUA_END_DECLS -static int _cocostudio_timeline_BlendFuncFrame_create(lua_State *L) +static int _olua_fun_cocostudio_timeline_BlendFuncFrame_create(lua_State *L) { olua_startinvoke(L); @@ -14524,7 +16320,7 @@ static int _cocostudio_timeline_BlendFuncFrame_create(lua_State *L) return num_ret; } -static int _cocostudio_timeline_BlendFuncFrame_getBlendFunc(lua_State *L) +static int _olua_fun_cocostudio_timeline_BlendFuncFrame_getBlendFunc(lua_State *L) { olua_startinvoke(L); @@ -14534,18 +16330,18 @@ static int _cocostudio_timeline_BlendFuncFrame_getBlendFunc(lua_State *L) // cocos2d::BlendFunc getBlendFunc() cocos2d::BlendFunc ret = self->getBlendFunc(); - int num_ret = olua_pushcopy_object(L, ret, "cc.BlendFunc"); + int num_ret = olua_copy_object(L, ret, "cc.BlendFunc"); olua_endinvoke(L); return num_ret; } -static int _cocostudio_timeline_BlendFuncFrame_new(lua_State *L) +static int _olua_fun_cocostudio_timeline_BlendFuncFrame_new(lua_State *L) { olua_startinvoke(L); - // BlendFuncFrame() + // cocostudio::timeline::BlendFuncFrame() cocostudio::timeline::BlendFuncFrame *ret = new cocostudio::timeline::BlendFuncFrame(); int num_ret = olua_push_object(L, ret, "ccs.timeline.BlendFuncFrame"); olua_postnew(L, ret); @@ -14555,39 +16351,48 @@ static int _cocostudio_timeline_BlendFuncFrame_new(lua_State *L) return num_ret; } -static int _cocostudio_timeline_BlendFuncFrame_setBlendFunc(lua_State *L) +static int _olua_fun_cocostudio_timeline_BlendFuncFrame_setBlendFunc(lua_State *L) { olua_startinvoke(L); cocostudio::timeline::BlendFuncFrame *self = nullptr; - cocos2d::BlendFunc arg1; /** blendFunc */ + cocos2d::BlendFunc *arg1; /** blendFunc */ olua_to_object(L, 1, &self, "ccs.timeline.BlendFuncFrame"); olua_check_object(L, 2, &arg1, "cc.BlendFunc"); // void setBlendFunc(cocos2d::BlendFunc blendFunc) - self->setBlendFunc(arg1); + self->setBlendFunc(*arg1); olua_endinvoke(L); return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocostudio_timeline_BlendFuncFrame(lua_State *L) +static int _olua_cls_ccs_timeline_BlendFuncFrame(lua_State *L) { oluacls_class(L, "ccs.timeline.BlendFuncFrame"); - oluacls_func(L, "create", _cocostudio_timeline_BlendFuncFrame_create); - oluacls_func(L, "getBlendFunc", _cocostudio_timeline_BlendFuncFrame_getBlendFunc); - oluacls_func(L, "new", _cocostudio_timeline_BlendFuncFrame_new); - oluacls_func(L, "setBlendFunc", _cocostudio_timeline_BlendFuncFrame_setBlendFunc); - oluacls_prop(L, "blendFunc", _cocostudio_timeline_BlendFuncFrame_getBlendFunc, _cocostudio_timeline_BlendFuncFrame_setBlendFunc); + oluacls_func(L, "create", _olua_fun_cocostudio_timeline_BlendFuncFrame_create); + oluacls_func(L, "getBlendFunc", _olua_fun_cocostudio_timeline_BlendFuncFrame_getBlendFunc); + oluacls_func(L, "new", _olua_fun_cocostudio_timeline_BlendFuncFrame_new); + oluacls_func(L, "setBlendFunc", _olua_fun_cocostudio_timeline_BlendFuncFrame_setBlendFunc); + oluacls_prop(L, "blendFunc", _olua_fun_cocostudio_timeline_BlendFuncFrame_getBlendFunc, _olua_fun_cocostudio_timeline_BlendFuncFrame_setBlendFunc); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccs_timeline_BlendFuncFrame(lua_State *L) +{ + olua_require(L, "cocos2d_studio", luaopen_cocos2d_studio); + if (!olua_getclass(L, "ccs.timeline.BlendFuncFrame")) { + luaL_error(L, "class not found: cocostudio::timeline::BlendFuncFrame"); + } return 1; } OLUA_END_DECLS -static int _cocostudio_timeline_ColorFrame_create(lua_State *L) +static int _olua_fun_cocostudio_timeline_ColorFrame_create(lua_State *L) { olua_startinvoke(L); @@ -14600,7 +16405,7 @@ static int _cocostudio_timeline_ColorFrame_create(lua_State *L) return num_ret; } -static int _cocostudio_timeline_ColorFrame_getColor(lua_State *L) +static int _olua_fun_cocostudio_timeline_ColorFrame_getColor(lua_State *L) { olua_startinvoke(L); @@ -14617,11 +16422,11 @@ static int _cocostudio_timeline_ColorFrame_getColor(lua_State *L) return num_ret; } -static int _cocostudio_timeline_ColorFrame_new(lua_State *L) +static int _olua_fun_cocostudio_timeline_ColorFrame_new(lua_State *L) { olua_startinvoke(L); - // ColorFrame() + // cocostudio::timeline::ColorFrame() cocostudio::timeline::ColorFrame *ret = new cocostudio::timeline::ColorFrame(); int num_ret = olua_push_object(L, ret, "ccs.timeline.ColorFrame"); olua_postnew(L, ret); @@ -14631,7 +16436,7 @@ static int _cocostudio_timeline_ColorFrame_new(lua_State *L) return num_ret; } -static int _cocostudio_timeline_ColorFrame_setColor(lua_State *L) +static int _olua_fun_cocostudio_timeline_ColorFrame_setColor(lua_State *L) { olua_startinvoke(L); @@ -14649,21 +16454,30 @@ static int _cocostudio_timeline_ColorFrame_setColor(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocostudio_timeline_ColorFrame(lua_State *L) +static int _olua_cls_ccs_timeline_ColorFrame(lua_State *L) { oluacls_class(L, "ccs.timeline.ColorFrame"); - oluacls_func(L, "create", _cocostudio_timeline_ColorFrame_create); - oluacls_func(L, "getColor", _cocostudio_timeline_ColorFrame_getColor); - oluacls_func(L, "new", _cocostudio_timeline_ColorFrame_new); - oluacls_func(L, "setColor", _cocostudio_timeline_ColorFrame_setColor); - oluacls_prop(L, "color", _cocostudio_timeline_ColorFrame_getColor, _cocostudio_timeline_ColorFrame_setColor); + oluacls_func(L, "create", _olua_fun_cocostudio_timeline_ColorFrame_create); + oluacls_func(L, "getColor", _olua_fun_cocostudio_timeline_ColorFrame_getColor); + oluacls_func(L, "new", _olua_fun_cocostudio_timeline_ColorFrame_new); + oluacls_func(L, "setColor", _olua_fun_cocostudio_timeline_ColorFrame_setColor); + oluacls_prop(L, "color", _olua_fun_cocostudio_timeline_ColorFrame_getColor, _olua_fun_cocostudio_timeline_ColorFrame_setColor); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccs_timeline_ColorFrame(lua_State *L) +{ + olua_require(L, "cocos2d_studio", luaopen_cocos2d_studio); + if (!olua_getclass(L, "ccs.timeline.ColorFrame")) { + luaL_error(L, "class not found: cocostudio::timeline::ColorFrame"); + } + return 1; +} OLUA_END_DECLS -static int _cocostudio_timeline_EventFrame_create(lua_State *L) +static int _olua_fun_cocostudio_timeline_EventFrame_create(lua_State *L) { olua_startinvoke(L); @@ -14676,7 +16490,7 @@ static int _cocostudio_timeline_EventFrame_create(lua_State *L) return num_ret; } -static int _cocostudio_timeline_EventFrame_getEvent(lua_State *L) +static int _olua_fun_cocostudio_timeline_EventFrame_getEvent(lua_State *L) { olua_startinvoke(L); @@ -14693,7 +16507,7 @@ static int _cocostudio_timeline_EventFrame_getEvent(lua_State *L) return num_ret; } -static int _cocostudio_timeline_EventFrame_init(lua_State *L) +static int _olua_fun_cocostudio_timeline_EventFrame_init(lua_State *L) { olua_startinvoke(L); @@ -14709,11 +16523,11 @@ static int _cocostudio_timeline_EventFrame_init(lua_State *L) return 0; } -static int _cocostudio_timeline_EventFrame_new(lua_State *L) +static int _olua_fun_cocostudio_timeline_EventFrame_new(lua_State *L) { olua_startinvoke(L); - // EventFrame() + // cocostudio::timeline::EventFrame() cocostudio::timeline::EventFrame *ret = new cocostudio::timeline::EventFrame(); int num_ret = olua_push_object(L, ret, "ccs.timeline.EventFrame"); olua_postnew(L, ret); @@ -14723,7 +16537,7 @@ static int _cocostudio_timeline_EventFrame_new(lua_State *L) return num_ret; } -static int _cocostudio_timeline_EventFrame_setEvent(lua_State *L) +static int _olua_fun_cocostudio_timeline_EventFrame_setEvent(lua_State *L) { olua_startinvoke(L); @@ -14741,22 +16555,31 @@ static int _cocostudio_timeline_EventFrame_setEvent(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocostudio_timeline_EventFrame(lua_State *L) +static int _olua_cls_ccs_timeline_EventFrame(lua_State *L) { oluacls_class(L, "ccs.timeline.EventFrame"); - oluacls_func(L, "create", _cocostudio_timeline_EventFrame_create); - oluacls_func(L, "getEvent", _cocostudio_timeline_EventFrame_getEvent); - oluacls_func(L, "init", _cocostudio_timeline_EventFrame_init); - oluacls_func(L, "new", _cocostudio_timeline_EventFrame_new); - oluacls_func(L, "setEvent", _cocostudio_timeline_EventFrame_setEvent); - oluacls_prop(L, "event", _cocostudio_timeline_EventFrame_getEvent, _cocostudio_timeline_EventFrame_setEvent); + oluacls_func(L, "create", _olua_fun_cocostudio_timeline_EventFrame_create); + oluacls_func(L, "getEvent", _olua_fun_cocostudio_timeline_EventFrame_getEvent); + oluacls_func(L, "init", _olua_fun_cocostudio_timeline_EventFrame_init); + oluacls_func(L, "new", _olua_fun_cocostudio_timeline_EventFrame_new); + oluacls_func(L, "setEvent", _olua_fun_cocostudio_timeline_EventFrame_setEvent); + oluacls_prop(L, "event", _olua_fun_cocostudio_timeline_EventFrame_getEvent, _olua_fun_cocostudio_timeline_EventFrame_setEvent); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccs_timeline_EventFrame(lua_State *L) +{ + olua_require(L, "cocos2d_studio", luaopen_cocos2d_studio); + if (!olua_getclass(L, "ccs.timeline.EventFrame")) { + luaL_error(L, "class not found: cocostudio::timeline::EventFrame"); + } return 1; } OLUA_END_DECLS -static int _cocostudio_timeline_InnerActionFrame_create(lua_State *L) +static int _olua_fun_cocostudio_timeline_InnerActionFrame_create(lua_State *L) { olua_startinvoke(L); @@ -14769,7 +16592,7 @@ static int _cocostudio_timeline_InnerActionFrame_create(lua_State *L) return num_ret; } -static int _cocostudio_timeline_InnerActionFrame_getEndFrameIndex(lua_State *L) +static int _olua_fun_cocostudio_timeline_InnerActionFrame_getEndFrameIndex(lua_State *L) { olua_startinvoke(L); @@ -14786,7 +16609,7 @@ static int _cocostudio_timeline_InnerActionFrame_getEndFrameIndex(lua_State *L) return num_ret; } -static int _cocostudio_timeline_InnerActionFrame_getInnerActionType(lua_State *L) +static int _olua_fun_cocostudio_timeline_InnerActionFrame_getInnerActionType(lua_State *L) { olua_startinvoke(L); @@ -14803,7 +16626,7 @@ static int _cocostudio_timeline_InnerActionFrame_getInnerActionType(lua_State *L return num_ret; } -static int _cocostudio_timeline_InnerActionFrame_getSingleFrameIndex(lua_State *L) +static int _olua_fun_cocostudio_timeline_InnerActionFrame_getSingleFrameIndex(lua_State *L) { olua_startinvoke(L); @@ -14820,7 +16643,7 @@ static int _cocostudio_timeline_InnerActionFrame_getSingleFrameIndex(lua_State * return num_ret; } -static int _cocostudio_timeline_InnerActionFrame_getStartFrameIndex(lua_State *L) +static int _olua_fun_cocostudio_timeline_InnerActionFrame_getStartFrameIndex(lua_State *L) { olua_startinvoke(L); @@ -14837,11 +16660,11 @@ static int _cocostudio_timeline_InnerActionFrame_getStartFrameIndex(lua_State *L return num_ret; } -static int _cocostudio_timeline_InnerActionFrame_new(lua_State *L) +static int _olua_fun_cocostudio_timeline_InnerActionFrame_new(lua_State *L) { olua_startinvoke(L); - // InnerActionFrame() + // cocostudio::timeline::InnerActionFrame() cocostudio::timeline::InnerActionFrame *ret = new cocostudio::timeline::InnerActionFrame(); int num_ret = olua_push_object(L, ret, "ccs.timeline.InnerActionFrame"); olua_postnew(L, ret); @@ -14851,7 +16674,7 @@ static int _cocostudio_timeline_InnerActionFrame_new(lua_State *L) return num_ret; } -static int _cocostudio_timeline_InnerActionFrame_setAnimationName(lua_State *L) +static int _olua_fun_cocostudio_timeline_InnerActionFrame_setAnimationName(lua_State *L) { olua_startinvoke(L); @@ -14869,7 +16692,7 @@ static int _cocostudio_timeline_InnerActionFrame_setAnimationName(lua_State *L) return 0; } -static int _cocostudio_timeline_InnerActionFrame_setEndFrameIndex(lua_State *L) +static int _olua_fun_cocostudio_timeline_InnerActionFrame_setEndFrameIndex(lua_State *L) { olua_startinvoke(L); @@ -14887,7 +16710,7 @@ static int _cocostudio_timeline_InnerActionFrame_setEndFrameIndex(lua_State *L) return 0; } -static int _cocostudio_timeline_InnerActionFrame_setEnterWithName(lua_State *L) +static int _olua_fun_cocostudio_timeline_InnerActionFrame_setEnterWithName(lua_State *L) { olua_startinvoke(L); @@ -14905,7 +16728,7 @@ static int _cocostudio_timeline_InnerActionFrame_setEnterWithName(lua_State *L) return 0; } -static int _cocostudio_timeline_InnerActionFrame_setInnerActionType(lua_State *L) +static int _olua_fun_cocostudio_timeline_InnerActionFrame_setInnerActionType(lua_State *L) { olua_startinvoke(L); @@ -14923,7 +16746,7 @@ static int _cocostudio_timeline_InnerActionFrame_setInnerActionType(lua_State *L return 0; } -static int _cocostudio_timeline_InnerActionFrame_setSingleFrameIndex(lua_State *L) +static int _olua_fun_cocostudio_timeline_InnerActionFrame_setSingleFrameIndex(lua_State *L) { olua_startinvoke(L); @@ -14941,7 +16764,7 @@ static int _cocostudio_timeline_InnerActionFrame_setSingleFrameIndex(lua_State * return 0; } -static int _cocostudio_timeline_InnerActionFrame_setStartFrameIndex(lua_State *L) +static int _olua_fun_cocostudio_timeline_InnerActionFrame_setStartFrameIndex(lua_State *L) { olua_startinvoke(L); @@ -14959,33 +16782,42 @@ static int _cocostudio_timeline_InnerActionFrame_setStartFrameIndex(lua_State *L return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocostudio_timeline_InnerActionFrame(lua_State *L) +static int _olua_cls_ccs_timeline_InnerActionFrame(lua_State *L) { oluacls_class(L, "ccs.timeline.InnerActionFrame"); - oluacls_func(L, "create", _cocostudio_timeline_InnerActionFrame_create); - oluacls_func(L, "getEndFrameIndex", _cocostudio_timeline_InnerActionFrame_getEndFrameIndex); - oluacls_func(L, "getInnerActionType", _cocostudio_timeline_InnerActionFrame_getInnerActionType); - oluacls_func(L, "getSingleFrameIndex", _cocostudio_timeline_InnerActionFrame_getSingleFrameIndex); - oluacls_func(L, "getStartFrameIndex", _cocostudio_timeline_InnerActionFrame_getStartFrameIndex); - oluacls_func(L, "new", _cocostudio_timeline_InnerActionFrame_new); - oluacls_func(L, "setAnimationName", _cocostudio_timeline_InnerActionFrame_setAnimationName); - oluacls_func(L, "setEndFrameIndex", _cocostudio_timeline_InnerActionFrame_setEndFrameIndex); - oluacls_func(L, "setEnterWithName", _cocostudio_timeline_InnerActionFrame_setEnterWithName); - oluacls_func(L, "setInnerActionType", _cocostudio_timeline_InnerActionFrame_setInnerActionType); - oluacls_func(L, "setSingleFrameIndex", _cocostudio_timeline_InnerActionFrame_setSingleFrameIndex); - oluacls_func(L, "setStartFrameIndex", _cocostudio_timeline_InnerActionFrame_setStartFrameIndex); - oluacls_prop(L, "endFrameIndex", _cocostudio_timeline_InnerActionFrame_getEndFrameIndex, _cocostudio_timeline_InnerActionFrame_setEndFrameIndex); - oluacls_prop(L, "innerActionType", _cocostudio_timeline_InnerActionFrame_getInnerActionType, _cocostudio_timeline_InnerActionFrame_setInnerActionType); - oluacls_prop(L, "singleFrameIndex", _cocostudio_timeline_InnerActionFrame_getSingleFrameIndex, _cocostudio_timeline_InnerActionFrame_setSingleFrameIndex); - oluacls_prop(L, "startFrameIndex", _cocostudio_timeline_InnerActionFrame_getStartFrameIndex, _cocostudio_timeline_InnerActionFrame_setStartFrameIndex); + oluacls_func(L, "create", _olua_fun_cocostudio_timeline_InnerActionFrame_create); + oluacls_func(L, "getEndFrameIndex", _olua_fun_cocostudio_timeline_InnerActionFrame_getEndFrameIndex); + oluacls_func(L, "getInnerActionType", _olua_fun_cocostudio_timeline_InnerActionFrame_getInnerActionType); + oluacls_func(L, "getSingleFrameIndex", _olua_fun_cocostudio_timeline_InnerActionFrame_getSingleFrameIndex); + oluacls_func(L, "getStartFrameIndex", _olua_fun_cocostudio_timeline_InnerActionFrame_getStartFrameIndex); + oluacls_func(L, "new", _olua_fun_cocostudio_timeline_InnerActionFrame_new); + oluacls_func(L, "setAnimationName", _olua_fun_cocostudio_timeline_InnerActionFrame_setAnimationName); + oluacls_func(L, "setEndFrameIndex", _olua_fun_cocostudio_timeline_InnerActionFrame_setEndFrameIndex); + oluacls_func(L, "setEnterWithName", _olua_fun_cocostudio_timeline_InnerActionFrame_setEnterWithName); + oluacls_func(L, "setInnerActionType", _olua_fun_cocostudio_timeline_InnerActionFrame_setInnerActionType); + oluacls_func(L, "setSingleFrameIndex", _olua_fun_cocostudio_timeline_InnerActionFrame_setSingleFrameIndex); + oluacls_func(L, "setStartFrameIndex", _olua_fun_cocostudio_timeline_InnerActionFrame_setStartFrameIndex); + oluacls_prop(L, "endFrameIndex", _olua_fun_cocostudio_timeline_InnerActionFrame_getEndFrameIndex, _olua_fun_cocostudio_timeline_InnerActionFrame_setEndFrameIndex); + oluacls_prop(L, "innerActionType", _olua_fun_cocostudio_timeline_InnerActionFrame_getInnerActionType, _olua_fun_cocostudio_timeline_InnerActionFrame_setInnerActionType); + oluacls_prop(L, "singleFrameIndex", _olua_fun_cocostudio_timeline_InnerActionFrame_getSingleFrameIndex, _olua_fun_cocostudio_timeline_InnerActionFrame_setSingleFrameIndex); + oluacls_prop(L, "startFrameIndex", _olua_fun_cocostudio_timeline_InnerActionFrame_getStartFrameIndex, _olua_fun_cocostudio_timeline_InnerActionFrame_setStartFrameIndex); oluacls_const(L, "AnimationAllName", cocostudio::timeline::InnerActionFrame::AnimationAllName); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccs_timeline_InnerActionFrame(lua_State *L) +{ + olua_require(L, "cocos2d_studio", luaopen_cocos2d_studio); + if (!olua_getclass(L, "ccs.timeline.InnerActionFrame")) { + luaL_error(L, "class not found: cocostudio::timeline::InnerActionFrame"); + } + return 1; +} OLUA_END_DECLS -static int _cocostudio_timeline_PlayableFrame_create(lua_State *L) +static int _olua_fun_cocostudio_timeline_PlayableFrame_create(lua_State *L) { olua_startinvoke(L); @@ -14998,7 +16830,7 @@ static int _cocostudio_timeline_PlayableFrame_create(lua_State *L) return num_ret; } -static int _cocostudio_timeline_PlayableFrame_getPlayableAct(lua_State *L) +static int _olua_fun_cocostudio_timeline_PlayableFrame_getPlayableAct(lua_State *L) { olua_startinvoke(L); @@ -15015,11 +16847,11 @@ static int _cocostudio_timeline_PlayableFrame_getPlayableAct(lua_State *L) return num_ret; } -static int _cocostudio_timeline_PlayableFrame_new(lua_State *L) +static int _olua_fun_cocostudio_timeline_PlayableFrame_new(lua_State *L) { olua_startinvoke(L); - // PlayableFrame() + // cocostudio::timeline::PlayableFrame() cocostudio::timeline::PlayableFrame *ret = new cocostudio::timeline::PlayableFrame(); int num_ret = olua_push_object(L, ret, "ccs.timeline.PlayableFrame"); olua_postnew(L, ret); @@ -15029,7 +16861,7 @@ static int _cocostudio_timeline_PlayableFrame_new(lua_State *L) return num_ret; } -static int _cocostudio_timeline_PlayableFrame_setPlayableAct(lua_State *L) +static int _olua_fun_cocostudio_timeline_PlayableFrame_setPlayableAct(lua_State *L) { olua_startinvoke(L); @@ -15047,22 +16879,31 @@ static int _cocostudio_timeline_PlayableFrame_setPlayableAct(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocostudio_timeline_PlayableFrame(lua_State *L) +static int _olua_cls_ccs_timeline_PlayableFrame(lua_State *L) { oluacls_class(L, "ccs.timeline.PlayableFrame"); - oluacls_func(L, "create", _cocostudio_timeline_PlayableFrame_create); - oluacls_func(L, "getPlayableAct", _cocostudio_timeline_PlayableFrame_getPlayableAct); - oluacls_func(L, "new", _cocostudio_timeline_PlayableFrame_new); - oluacls_func(L, "setPlayableAct", _cocostudio_timeline_PlayableFrame_setPlayableAct); - oluacls_prop(L, "playableAct", _cocostudio_timeline_PlayableFrame_getPlayableAct, _cocostudio_timeline_PlayableFrame_setPlayableAct); + oluacls_func(L, "create", _olua_fun_cocostudio_timeline_PlayableFrame_create); + oluacls_func(L, "getPlayableAct", _olua_fun_cocostudio_timeline_PlayableFrame_getPlayableAct); + oluacls_func(L, "new", _olua_fun_cocostudio_timeline_PlayableFrame_new); + oluacls_func(L, "setPlayableAct", _olua_fun_cocostudio_timeline_PlayableFrame_setPlayableAct); + oluacls_prop(L, "playableAct", _olua_fun_cocostudio_timeline_PlayableFrame_getPlayableAct, _olua_fun_cocostudio_timeline_PlayableFrame_setPlayableAct); oluacls_const(L, "PLAYABLE_EXTENTION", cocostudio::timeline::PlayableFrame::PLAYABLE_EXTENTION); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccs_timeline_PlayableFrame(lua_State *L) +{ + olua_require(L, "cocos2d_studio", luaopen_cocos2d_studio); + if (!olua_getclass(L, "ccs.timeline.PlayableFrame")) { + luaL_error(L, "class not found: cocostudio::timeline::PlayableFrame"); + } + return 1; +} OLUA_END_DECLS -static int _cocostudio_timeline_PositionFrame_create(lua_State *L) +static int _olua_fun_cocostudio_timeline_PositionFrame_create(lua_State *L) { olua_startinvoke(L); @@ -15075,7 +16916,7 @@ static int _cocostudio_timeline_PositionFrame_create(lua_State *L) return num_ret; } -static int _cocostudio_timeline_PositionFrame_getPosition(lua_State *L) +static int _olua_fun_cocostudio_timeline_PositionFrame_getPosition(lua_State *L) { olua_startinvoke(L); @@ -15085,14 +16926,14 @@ static int _cocostudio_timeline_PositionFrame_getPosition(lua_State *L) // cocos2d::Point getPosition() cocos2d::Point ret = self->getPosition(); - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec2"); + int num_ret = olua_copy_object(L, ret, "cc.Vec2"); olua_endinvoke(L); return num_ret; } -static int _cocostudio_timeline_PositionFrame_getX(lua_State *L) +static int _olua_fun_cocostudio_timeline_PositionFrame_getX(lua_State *L) { olua_startinvoke(L); @@ -15109,7 +16950,7 @@ static int _cocostudio_timeline_PositionFrame_getX(lua_State *L) return num_ret; } -static int _cocostudio_timeline_PositionFrame_getY(lua_State *L) +static int _olua_fun_cocostudio_timeline_PositionFrame_getY(lua_State *L) { olua_startinvoke(L); @@ -15126,11 +16967,11 @@ static int _cocostudio_timeline_PositionFrame_getY(lua_State *L) return num_ret; } -static int _cocostudio_timeline_PositionFrame_new(lua_State *L) +static int _olua_fun_cocostudio_timeline_PositionFrame_new(lua_State *L) { olua_startinvoke(L); - // PositionFrame() + // cocostudio::timeline::PositionFrame() cocostudio::timeline::PositionFrame *ret = new cocostudio::timeline::PositionFrame(); int num_ret = olua_push_object(L, ret, "ccs.timeline.PositionFrame"); olua_postnew(L, ret); @@ -15140,25 +16981,25 @@ static int _cocostudio_timeline_PositionFrame_new(lua_State *L) return num_ret; } -static int _cocostudio_timeline_PositionFrame_setPosition(lua_State *L) +static int _olua_fun_cocostudio_timeline_PositionFrame_setPosition(lua_State *L) { olua_startinvoke(L); cocostudio::timeline::PositionFrame *self = nullptr; - cocos2d::Point arg1; /** position */ + cocos2d::Point *arg1; /** position */ olua_to_object(L, 1, &self, "ccs.timeline.PositionFrame"); olua_check_object(L, 2, &arg1, "cc.Vec2"); // void setPosition(const cocos2d::Point &position) - self->setPosition(arg1); + self->setPosition(*arg1); olua_endinvoke(L); return 0; } -static int _cocostudio_timeline_PositionFrame_setX(lua_State *L) +static int _olua_fun_cocostudio_timeline_PositionFrame_setX(lua_State *L) { olua_startinvoke(L); @@ -15176,7 +17017,7 @@ static int _cocostudio_timeline_PositionFrame_setX(lua_State *L) return 0; } -static int _cocostudio_timeline_PositionFrame_setY(lua_State *L) +static int _olua_fun_cocostudio_timeline_PositionFrame_setY(lua_State *L) { olua_startinvoke(L); @@ -15194,27 +17035,36 @@ static int _cocostudio_timeline_PositionFrame_setY(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocostudio_timeline_PositionFrame(lua_State *L) +static int _olua_cls_ccs_timeline_PositionFrame(lua_State *L) { oluacls_class(L, "ccs.timeline.PositionFrame"); - oluacls_func(L, "create", _cocostudio_timeline_PositionFrame_create); - oluacls_func(L, "getPosition", _cocostudio_timeline_PositionFrame_getPosition); - oluacls_func(L, "getX", _cocostudio_timeline_PositionFrame_getX); - oluacls_func(L, "getY", _cocostudio_timeline_PositionFrame_getY); - oluacls_func(L, "new", _cocostudio_timeline_PositionFrame_new); - oluacls_func(L, "setPosition", _cocostudio_timeline_PositionFrame_setPosition); - oluacls_func(L, "setX", _cocostudio_timeline_PositionFrame_setX); - oluacls_func(L, "setY", _cocostudio_timeline_PositionFrame_setY); - oluacls_prop(L, "position", _cocostudio_timeline_PositionFrame_getPosition, _cocostudio_timeline_PositionFrame_setPosition); - oluacls_prop(L, "x", _cocostudio_timeline_PositionFrame_getX, _cocostudio_timeline_PositionFrame_setX); - oluacls_prop(L, "y", _cocostudio_timeline_PositionFrame_getY, _cocostudio_timeline_PositionFrame_setY); + oluacls_func(L, "create", _olua_fun_cocostudio_timeline_PositionFrame_create); + oluacls_func(L, "getPosition", _olua_fun_cocostudio_timeline_PositionFrame_getPosition); + oluacls_func(L, "getX", _olua_fun_cocostudio_timeline_PositionFrame_getX); + oluacls_func(L, "getY", _olua_fun_cocostudio_timeline_PositionFrame_getY); + oluacls_func(L, "new", _olua_fun_cocostudio_timeline_PositionFrame_new); + oluacls_func(L, "setPosition", _olua_fun_cocostudio_timeline_PositionFrame_setPosition); + oluacls_func(L, "setX", _olua_fun_cocostudio_timeline_PositionFrame_setX); + oluacls_func(L, "setY", _olua_fun_cocostudio_timeline_PositionFrame_setY); + oluacls_prop(L, "position", _olua_fun_cocostudio_timeline_PositionFrame_getPosition, _olua_fun_cocostudio_timeline_PositionFrame_setPosition); + oluacls_prop(L, "x", _olua_fun_cocostudio_timeline_PositionFrame_getX, _olua_fun_cocostudio_timeline_PositionFrame_setX); + oluacls_prop(L, "y", _olua_fun_cocostudio_timeline_PositionFrame_getY, _olua_fun_cocostudio_timeline_PositionFrame_setY); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccs_timeline_PositionFrame(lua_State *L) +{ + olua_require(L, "cocos2d_studio", luaopen_cocos2d_studio); + if (!olua_getclass(L, "ccs.timeline.PositionFrame")) { + luaL_error(L, "class not found: cocostudio::timeline::PositionFrame"); + } + return 1; +} OLUA_END_DECLS -static int _cocostudio_timeline_RotationFrame_create(lua_State *L) +static int _olua_fun_cocostudio_timeline_RotationFrame_create(lua_State *L) { olua_startinvoke(L); @@ -15227,7 +17077,7 @@ static int _cocostudio_timeline_RotationFrame_create(lua_State *L) return num_ret; } -static int _cocostudio_timeline_RotationFrame_getRotation(lua_State *L) +static int _olua_fun_cocostudio_timeline_RotationFrame_getRotation(lua_State *L) { olua_startinvoke(L); @@ -15244,11 +17094,11 @@ static int _cocostudio_timeline_RotationFrame_getRotation(lua_State *L) return num_ret; } -static int _cocostudio_timeline_RotationFrame_new(lua_State *L) +static int _olua_fun_cocostudio_timeline_RotationFrame_new(lua_State *L) { olua_startinvoke(L); - // RotationFrame() + // cocostudio::timeline::RotationFrame() cocostudio::timeline::RotationFrame *ret = new cocostudio::timeline::RotationFrame(); int num_ret = olua_push_object(L, ret, "ccs.timeline.RotationFrame"); olua_postnew(L, ret); @@ -15258,7 +17108,7 @@ static int _cocostudio_timeline_RotationFrame_new(lua_State *L) return num_ret; } -static int _cocostudio_timeline_RotationFrame_setRotation(lua_State *L) +static int _olua_fun_cocostudio_timeline_RotationFrame_setRotation(lua_State *L) { olua_startinvoke(L); @@ -15276,21 +17126,30 @@ static int _cocostudio_timeline_RotationFrame_setRotation(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocostudio_timeline_RotationFrame(lua_State *L) +static int _olua_cls_ccs_timeline_RotationFrame(lua_State *L) { oluacls_class(L, "ccs.timeline.RotationFrame"); - oluacls_func(L, "create", _cocostudio_timeline_RotationFrame_create); - oluacls_func(L, "getRotation", _cocostudio_timeline_RotationFrame_getRotation); - oluacls_func(L, "new", _cocostudio_timeline_RotationFrame_new); - oluacls_func(L, "setRotation", _cocostudio_timeline_RotationFrame_setRotation); - oluacls_prop(L, "rotation", _cocostudio_timeline_RotationFrame_getRotation, _cocostudio_timeline_RotationFrame_setRotation); + oluacls_func(L, "create", _olua_fun_cocostudio_timeline_RotationFrame_create); + oluacls_func(L, "getRotation", _olua_fun_cocostudio_timeline_RotationFrame_getRotation); + oluacls_func(L, "new", _olua_fun_cocostudio_timeline_RotationFrame_new); + oluacls_func(L, "setRotation", _olua_fun_cocostudio_timeline_RotationFrame_setRotation); + oluacls_prop(L, "rotation", _olua_fun_cocostudio_timeline_RotationFrame_getRotation, _olua_fun_cocostudio_timeline_RotationFrame_setRotation); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccs_timeline_RotationFrame(lua_State *L) +{ + olua_require(L, "cocos2d_studio", luaopen_cocos2d_studio); + if (!olua_getclass(L, "ccs.timeline.RotationFrame")) { + luaL_error(L, "class not found: cocostudio::timeline::RotationFrame"); + } return 1; } OLUA_END_DECLS -static int _cocostudio_timeline_SkewFrame_create(lua_State *L) +static int _olua_fun_cocostudio_timeline_SkewFrame_create(lua_State *L) { olua_startinvoke(L); @@ -15303,7 +17162,7 @@ static int _cocostudio_timeline_SkewFrame_create(lua_State *L) return num_ret; } -static int _cocostudio_timeline_SkewFrame_getSkewX(lua_State *L) +static int _olua_fun_cocostudio_timeline_SkewFrame_getSkewX(lua_State *L) { olua_startinvoke(L); @@ -15320,7 +17179,7 @@ static int _cocostudio_timeline_SkewFrame_getSkewX(lua_State *L) return num_ret; } -static int _cocostudio_timeline_SkewFrame_getSkewY(lua_State *L) +static int _olua_fun_cocostudio_timeline_SkewFrame_getSkewY(lua_State *L) { olua_startinvoke(L); @@ -15337,11 +17196,11 @@ static int _cocostudio_timeline_SkewFrame_getSkewY(lua_State *L) return num_ret; } -static int _cocostudio_timeline_SkewFrame_new(lua_State *L) +static int _olua_fun_cocostudio_timeline_SkewFrame_new(lua_State *L) { olua_startinvoke(L); - // SkewFrame() + // cocostudio::timeline::SkewFrame() cocostudio::timeline::SkewFrame *ret = new cocostudio::timeline::SkewFrame(); int num_ret = olua_push_object(L, ret, "ccs.timeline.SkewFrame"); olua_postnew(L, ret); @@ -15351,7 +17210,7 @@ static int _cocostudio_timeline_SkewFrame_new(lua_State *L) return num_ret; } -static int _cocostudio_timeline_SkewFrame_setSkewX(lua_State *L) +static int _olua_fun_cocostudio_timeline_SkewFrame_setSkewX(lua_State *L) { olua_startinvoke(L); @@ -15369,7 +17228,7 @@ static int _cocostudio_timeline_SkewFrame_setSkewX(lua_State *L) return 0; } -static int _cocostudio_timeline_SkewFrame_setSkewY(lua_State *L) +static int _olua_fun_cocostudio_timeline_SkewFrame_setSkewY(lua_State *L) { olua_startinvoke(L); @@ -15387,24 +17246,33 @@ static int _cocostudio_timeline_SkewFrame_setSkewY(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocostudio_timeline_SkewFrame(lua_State *L) +static int _olua_cls_ccs_timeline_SkewFrame(lua_State *L) { oluacls_class(L, "ccs.timeline.SkewFrame"); - oluacls_func(L, "create", _cocostudio_timeline_SkewFrame_create); - oluacls_func(L, "getSkewX", _cocostudio_timeline_SkewFrame_getSkewX); - oluacls_func(L, "getSkewY", _cocostudio_timeline_SkewFrame_getSkewY); - oluacls_func(L, "new", _cocostudio_timeline_SkewFrame_new); - oluacls_func(L, "setSkewX", _cocostudio_timeline_SkewFrame_setSkewX); - oluacls_func(L, "setSkewY", _cocostudio_timeline_SkewFrame_setSkewY); - oluacls_prop(L, "skewX", _cocostudio_timeline_SkewFrame_getSkewX, _cocostudio_timeline_SkewFrame_setSkewX); - oluacls_prop(L, "skewY", _cocostudio_timeline_SkewFrame_getSkewY, _cocostudio_timeline_SkewFrame_setSkewY); + oluacls_func(L, "create", _olua_fun_cocostudio_timeline_SkewFrame_create); + oluacls_func(L, "getSkewX", _olua_fun_cocostudio_timeline_SkewFrame_getSkewX); + oluacls_func(L, "getSkewY", _olua_fun_cocostudio_timeline_SkewFrame_getSkewY); + oluacls_func(L, "new", _olua_fun_cocostudio_timeline_SkewFrame_new); + oluacls_func(L, "setSkewX", _olua_fun_cocostudio_timeline_SkewFrame_setSkewX); + oluacls_func(L, "setSkewY", _olua_fun_cocostudio_timeline_SkewFrame_setSkewY); + oluacls_prop(L, "skewX", _olua_fun_cocostudio_timeline_SkewFrame_getSkewX, _olua_fun_cocostudio_timeline_SkewFrame_setSkewX); + oluacls_prop(L, "skewY", _olua_fun_cocostudio_timeline_SkewFrame_getSkewY, _olua_fun_cocostudio_timeline_SkewFrame_setSkewY); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccs_timeline_SkewFrame(lua_State *L) +{ + olua_require(L, "cocos2d_studio", luaopen_cocos2d_studio); + if (!olua_getclass(L, "ccs.timeline.SkewFrame")) { + luaL_error(L, "class not found: cocostudio::timeline::SkewFrame"); + } return 1; } OLUA_END_DECLS -static int _cocostudio_timeline_RotationSkewFrame_create(lua_State *L) +static int _olua_fun_cocostudio_timeline_RotationSkewFrame_create(lua_State *L) { olua_startinvoke(L); @@ -15417,11 +17285,11 @@ static int _cocostudio_timeline_RotationSkewFrame_create(lua_State *L) return num_ret; } -static int _cocostudio_timeline_RotationSkewFrame_new(lua_State *L) +static int _olua_fun_cocostudio_timeline_RotationSkewFrame_new(lua_State *L) { olua_startinvoke(L); - // RotationSkewFrame() + // cocostudio::timeline::RotationSkewFrame() cocostudio::timeline::RotationSkewFrame *ret = new cocostudio::timeline::RotationSkewFrame(); int num_ret = olua_push_object(L, ret, "ccs.timeline.RotationSkewFrame"); olua_postnew(L, ret); @@ -15431,18 +17299,27 @@ static int _cocostudio_timeline_RotationSkewFrame_new(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocostudio_timeline_RotationSkewFrame(lua_State *L) +static int _olua_cls_ccs_timeline_RotationSkewFrame(lua_State *L) { oluacls_class(L, "ccs.timeline.RotationSkewFrame"); - oluacls_func(L, "create", _cocostudio_timeline_RotationSkewFrame_create); - oluacls_func(L, "new", _cocostudio_timeline_RotationSkewFrame_new); + oluacls_func(L, "create", _olua_fun_cocostudio_timeline_RotationSkewFrame_create); + oluacls_func(L, "new", _olua_fun_cocostudio_timeline_RotationSkewFrame_new); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccs_timeline_RotationSkewFrame(lua_State *L) +{ + olua_require(L, "cocos2d_studio", luaopen_cocos2d_studio); + if (!olua_getclass(L, "ccs.timeline.RotationSkewFrame")) { + luaL_error(L, "class not found: cocostudio::timeline::RotationSkewFrame"); + } return 1; } OLUA_END_DECLS -static int _cocostudio_timeline_ScaleFrame_create(lua_State *L) +static int _olua_fun_cocostudio_timeline_ScaleFrame_create(lua_State *L) { olua_startinvoke(L); @@ -15455,7 +17332,7 @@ static int _cocostudio_timeline_ScaleFrame_create(lua_State *L) return num_ret; } -static int _cocostudio_timeline_ScaleFrame_getScaleX(lua_State *L) +static int _olua_fun_cocostudio_timeline_ScaleFrame_getScaleX(lua_State *L) { olua_startinvoke(L); @@ -15472,7 +17349,7 @@ static int _cocostudio_timeline_ScaleFrame_getScaleX(lua_State *L) return num_ret; } -static int _cocostudio_timeline_ScaleFrame_getScaleY(lua_State *L) +static int _olua_fun_cocostudio_timeline_ScaleFrame_getScaleY(lua_State *L) { olua_startinvoke(L); @@ -15489,11 +17366,11 @@ static int _cocostudio_timeline_ScaleFrame_getScaleY(lua_State *L) return num_ret; } -static int _cocostudio_timeline_ScaleFrame_new(lua_State *L) +static int _olua_fun_cocostudio_timeline_ScaleFrame_new(lua_State *L) { olua_startinvoke(L); - // ScaleFrame() + // cocostudio::timeline::ScaleFrame() cocostudio::timeline::ScaleFrame *ret = new cocostudio::timeline::ScaleFrame(); int num_ret = olua_push_object(L, ret, "ccs.timeline.ScaleFrame"); olua_postnew(L, ret); @@ -15503,7 +17380,7 @@ static int _cocostudio_timeline_ScaleFrame_new(lua_State *L) return num_ret; } -static int _cocostudio_timeline_ScaleFrame_setScale(lua_State *L) +static int _olua_fun_cocostudio_timeline_ScaleFrame_setScale(lua_State *L) { olua_startinvoke(L); @@ -15521,7 +17398,7 @@ static int _cocostudio_timeline_ScaleFrame_setScale(lua_State *L) return 0; } -static int _cocostudio_timeline_ScaleFrame_setScaleX(lua_State *L) +static int _olua_fun_cocostudio_timeline_ScaleFrame_setScaleX(lua_State *L) { olua_startinvoke(L); @@ -15539,7 +17416,7 @@ static int _cocostudio_timeline_ScaleFrame_setScaleX(lua_State *L) return 0; } -static int _cocostudio_timeline_ScaleFrame_setScaleY(lua_State *L) +static int _olua_fun_cocostudio_timeline_ScaleFrame_setScaleY(lua_State *L) { olua_startinvoke(L); @@ -15557,25 +17434,34 @@ static int _cocostudio_timeline_ScaleFrame_setScaleY(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocostudio_timeline_ScaleFrame(lua_State *L) +static int _olua_cls_ccs_timeline_ScaleFrame(lua_State *L) { oluacls_class(L, "ccs.timeline.ScaleFrame"); - oluacls_func(L, "create", _cocostudio_timeline_ScaleFrame_create); - oluacls_func(L, "getScaleX", _cocostudio_timeline_ScaleFrame_getScaleX); - oluacls_func(L, "getScaleY", _cocostudio_timeline_ScaleFrame_getScaleY); - oluacls_func(L, "new", _cocostudio_timeline_ScaleFrame_new); - oluacls_func(L, "setScale", _cocostudio_timeline_ScaleFrame_setScale); - oluacls_func(L, "setScaleX", _cocostudio_timeline_ScaleFrame_setScaleX); - oluacls_func(L, "setScaleY", _cocostudio_timeline_ScaleFrame_setScaleY); - oluacls_prop(L, "scaleX", _cocostudio_timeline_ScaleFrame_getScaleX, _cocostudio_timeline_ScaleFrame_setScaleX); - oluacls_prop(L, "scaleY", _cocostudio_timeline_ScaleFrame_getScaleY, _cocostudio_timeline_ScaleFrame_setScaleY); + oluacls_func(L, "create", _olua_fun_cocostudio_timeline_ScaleFrame_create); + oluacls_func(L, "getScaleX", _olua_fun_cocostudio_timeline_ScaleFrame_getScaleX); + oluacls_func(L, "getScaleY", _olua_fun_cocostudio_timeline_ScaleFrame_getScaleY); + oluacls_func(L, "new", _olua_fun_cocostudio_timeline_ScaleFrame_new); + oluacls_func(L, "setScale", _olua_fun_cocostudio_timeline_ScaleFrame_setScale); + oluacls_func(L, "setScaleX", _olua_fun_cocostudio_timeline_ScaleFrame_setScaleX); + oluacls_func(L, "setScaleY", _olua_fun_cocostudio_timeline_ScaleFrame_setScaleY); + oluacls_prop(L, "scaleX", _olua_fun_cocostudio_timeline_ScaleFrame_getScaleX, _olua_fun_cocostudio_timeline_ScaleFrame_setScaleX); + oluacls_prop(L, "scaleY", _olua_fun_cocostudio_timeline_ScaleFrame_getScaleY, _olua_fun_cocostudio_timeline_ScaleFrame_setScaleY); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccs_timeline_ScaleFrame(lua_State *L) +{ + olua_require(L, "cocos2d_studio", luaopen_cocos2d_studio); + if (!olua_getclass(L, "ccs.timeline.ScaleFrame")) { + luaL_error(L, "class not found: cocostudio::timeline::ScaleFrame"); + } + return 1; +} OLUA_END_DECLS -static int _cocostudio_timeline_TextureFrame_create(lua_State *L) +static int _olua_fun_cocostudio_timeline_TextureFrame_create(lua_State *L) { olua_startinvoke(L); @@ -15588,7 +17474,7 @@ static int _cocostudio_timeline_TextureFrame_create(lua_State *L) return num_ret; } -static int _cocostudio_timeline_TextureFrame_getTextureName(lua_State *L) +static int _olua_fun_cocostudio_timeline_TextureFrame_getTextureName(lua_State *L) { olua_startinvoke(L); @@ -15605,11 +17491,11 @@ static int _cocostudio_timeline_TextureFrame_getTextureName(lua_State *L) return num_ret; } -static int _cocostudio_timeline_TextureFrame_new(lua_State *L) +static int _olua_fun_cocostudio_timeline_TextureFrame_new(lua_State *L) { olua_startinvoke(L); - // TextureFrame() + // cocostudio::timeline::TextureFrame() cocostudio::timeline::TextureFrame *ret = new cocostudio::timeline::TextureFrame(); int num_ret = olua_push_object(L, ret, "ccs.timeline.TextureFrame"); olua_postnew(L, ret); @@ -15619,7 +17505,7 @@ static int _cocostudio_timeline_TextureFrame_new(lua_State *L) return num_ret; } -static int _cocostudio_timeline_TextureFrame_setTextureName(lua_State *L) +static int _olua_fun_cocostudio_timeline_TextureFrame_setTextureName(lua_State *L) { olua_startinvoke(L); @@ -15637,21 +17523,30 @@ static int _cocostudio_timeline_TextureFrame_setTextureName(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocostudio_timeline_TextureFrame(lua_State *L) +static int _olua_cls_ccs_timeline_TextureFrame(lua_State *L) { oluacls_class(L, "ccs.timeline.TextureFrame"); - oluacls_func(L, "create", _cocostudio_timeline_TextureFrame_create); - oluacls_func(L, "getTextureName", _cocostudio_timeline_TextureFrame_getTextureName); - oluacls_func(L, "new", _cocostudio_timeline_TextureFrame_new); - oluacls_func(L, "setTextureName", _cocostudio_timeline_TextureFrame_setTextureName); - oluacls_prop(L, "textureName", _cocostudio_timeline_TextureFrame_getTextureName, _cocostudio_timeline_TextureFrame_setTextureName); + oluacls_func(L, "create", _olua_fun_cocostudio_timeline_TextureFrame_create); + oluacls_func(L, "getTextureName", _olua_fun_cocostudio_timeline_TextureFrame_getTextureName); + oluacls_func(L, "new", _olua_fun_cocostudio_timeline_TextureFrame_new); + oluacls_func(L, "setTextureName", _olua_fun_cocostudio_timeline_TextureFrame_setTextureName); + oluacls_prop(L, "textureName", _olua_fun_cocostudio_timeline_TextureFrame_getTextureName, _olua_fun_cocostudio_timeline_TextureFrame_setTextureName); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccs_timeline_TextureFrame(lua_State *L) +{ + olua_require(L, "cocos2d_studio", luaopen_cocos2d_studio); + if (!olua_getclass(L, "ccs.timeline.TextureFrame")) { + luaL_error(L, "class not found: cocostudio::timeline::TextureFrame"); + } return 1; } OLUA_END_DECLS -static int _cocostudio_timeline_VisibleFrame_create(lua_State *L) +static int _olua_fun_cocostudio_timeline_VisibleFrame_create(lua_State *L) { olua_startinvoke(L); @@ -15664,7 +17559,7 @@ static int _cocostudio_timeline_VisibleFrame_create(lua_State *L) return num_ret; } -static int _cocostudio_timeline_VisibleFrame_isVisible(lua_State *L) +static int _olua_fun_cocostudio_timeline_VisibleFrame_isVisible(lua_State *L) { olua_startinvoke(L); @@ -15681,11 +17576,11 @@ static int _cocostudio_timeline_VisibleFrame_isVisible(lua_State *L) return num_ret; } -static int _cocostudio_timeline_VisibleFrame_new(lua_State *L) +static int _olua_fun_cocostudio_timeline_VisibleFrame_new(lua_State *L) { olua_startinvoke(L); - // VisibleFrame() + // cocostudio::timeline::VisibleFrame() cocostudio::timeline::VisibleFrame *ret = new cocostudio::timeline::VisibleFrame(); int num_ret = olua_push_object(L, ret, "ccs.timeline.VisibleFrame"); olua_postnew(L, ret); @@ -15695,7 +17590,7 @@ static int _cocostudio_timeline_VisibleFrame_new(lua_State *L) return num_ret; } -static int _cocostudio_timeline_VisibleFrame_setVisible(lua_State *L) +static int _olua_fun_cocostudio_timeline_VisibleFrame_setVisible(lua_State *L) { olua_startinvoke(L); @@ -15713,21 +17608,30 @@ static int _cocostudio_timeline_VisibleFrame_setVisible(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocostudio_timeline_VisibleFrame(lua_State *L) +static int _olua_cls_ccs_timeline_VisibleFrame(lua_State *L) { oluacls_class(L, "ccs.timeline.VisibleFrame"); - oluacls_func(L, "create", _cocostudio_timeline_VisibleFrame_create); - oluacls_func(L, "isVisible", _cocostudio_timeline_VisibleFrame_isVisible); - oluacls_func(L, "new", _cocostudio_timeline_VisibleFrame_new); - oluacls_func(L, "setVisible", _cocostudio_timeline_VisibleFrame_setVisible); - oluacls_prop(L, "visible", _cocostudio_timeline_VisibleFrame_isVisible, _cocostudio_timeline_VisibleFrame_setVisible); + oluacls_func(L, "create", _olua_fun_cocostudio_timeline_VisibleFrame_create); + oluacls_func(L, "isVisible", _olua_fun_cocostudio_timeline_VisibleFrame_isVisible); + oluacls_func(L, "new", _olua_fun_cocostudio_timeline_VisibleFrame_new); + oluacls_func(L, "setVisible", _olua_fun_cocostudio_timeline_VisibleFrame_setVisible); + oluacls_prop(L, "visible", _olua_fun_cocostudio_timeline_VisibleFrame_isVisible, _olua_fun_cocostudio_timeline_VisibleFrame_setVisible); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccs_timeline_VisibleFrame(lua_State *L) +{ + olua_require(L, "cocos2d_studio", luaopen_cocos2d_studio); + if (!olua_getclass(L, "ccs.timeline.VisibleFrame")) { + luaL_error(L, "class not found: cocostudio::timeline::VisibleFrame"); + } return 1; } OLUA_END_DECLS -static int _cocostudio_timeline_ZOrderFrame_create(lua_State *L) +static int _olua_fun_cocostudio_timeline_ZOrderFrame_create(lua_State *L) { olua_startinvoke(L); @@ -15740,7 +17644,7 @@ static int _cocostudio_timeline_ZOrderFrame_create(lua_State *L) return num_ret; } -static int _cocostudio_timeline_ZOrderFrame_getZOrder(lua_State *L) +static int _olua_fun_cocostudio_timeline_ZOrderFrame_getZOrder(lua_State *L) { olua_startinvoke(L); @@ -15757,11 +17661,11 @@ static int _cocostudio_timeline_ZOrderFrame_getZOrder(lua_State *L) return num_ret; } -static int _cocostudio_timeline_ZOrderFrame_new(lua_State *L) +static int _olua_fun_cocostudio_timeline_ZOrderFrame_new(lua_State *L) { olua_startinvoke(L); - // ZOrderFrame() + // cocostudio::timeline::ZOrderFrame() cocostudio::timeline::ZOrderFrame *ret = new cocostudio::timeline::ZOrderFrame(); int num_ret = olua_push_object(L, ret, "ccs.timeline.ZOrderFrame"); olua_postnew(L, ret); @@ -15771,7 +17675,7 @@ static int _cocostudio_timeline_ZOrderFrame_new(lua_State *L) return num_ret; } -static int _cocostudio_timeline_ZOrderFrame_setZOrder(lua_State *L) +static int _olua_fun_cocostudio_timeline_ZOrderFrame_setZOrder(lua_State *L) { olua_startinvoke(L); @@ -15789,21 +17693,30 @@ static int _cocostudio_timeline_ZOrderFrame_setZOrder(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocostudio_timeline_ZOrderFrame(lua_State *L) +static int _olua_cls_ccs_timeline_ZOrderFrame(lua_State *L) { oluacls_class(L, "ccs.timeline.ZOrderFrame"); - oluacls_func(L, "create", _cocostudio_timeline_ZOrderFrame_create); - oluacls_func(L, "getZOrder", _cocostudio_timeline_ZOrderFrame_getZOrder); - oluacls_func(L, "new", _cocostudio_timeline_ZOrderFrame_new); - oluacls_func(L, "setZOrder", _cocostudio_timeline_ZOrderFrame_setZOrder); - oluacls_prop(L, "zOrder", _cocostudio_timeline_ZOrderFrame_getZOrder, _cocostudio_timeline_ZOrderFrame_setZOrder); + oluacls_func(L, "create", _olua_fun_cocostudio_timeline_ZOrderFrame_create); + oluacls_func(L, "getZOrder", _olua_fun_cocostudio_timeline_ZOrderFrame_getZOrder); + oluacls_func(L, "new", _olua_fun_cocostudio_timeline_ZOrderFrame_new); + oluacls_func(L, "setZOrder", _olua_fun_cocostudio_timeline_ZOrderFrame_setZOrder); + oluacls_prop(L, "zOrder", _olua_fun_cocostudio_timeline_ZOrderFrame_getZOrder, _olua_fun_cocostudio_timeline_ZOrderFrame_setZOrder); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccs_timeline_ZOrderFrame(lua_State *L) +{ + olua_require(L, "cocos2d_studio", luaopen_cocos2d_studio); + if (!olua_getclass(L, "ccs.timeline.ZOrderFrame")) { + luaL_error(L, "class not found: cocostudio::timeline::ZOrderFrame"); + } return 1; } OLUA_END_DECLS -static int _cocostudio_timeline_ActionTimelineCache___gc(lua_State *L) +static int _olua_fun_cocostudio_timeline_ActionTimelineCache___gc(lua_State *L) { olua_startinvoke(L); @@ -15815,7 +17728,7 @@ static int _cocostudio_timeline_ActionTimelineCache___gc(lua_State *L) return 0; } -static int _cocostudio_timeline_ActionTimelineCache___olua_move(lua_State *L) +static int _olua_fun_cocostudio_timeline_ActionTimelineCache___olua_move(lua_State *L) { olua_startinvoke(L); @@ -15827,7 +17740,7 @@ static int _cocostudio_timeline_ActionTimelineCache___olua_move(lua_State *L) return 1; } -static int _cocostudio_timeline_ActionTimelineCache_createAction(lua_State *L) +static int _olua_fun_cocostudio_timeline_ActionTimelineCache_createAction(lua_State *L) { olua_startinvoke(L); @@ -15844,7 +17757,7 @@ static int _cocostudio_timeline_ActionTimelineCache_createAction(lua_State *L) return num_ret; } -static int _cocostudio_timeline_ActionTimelineCache_createActionFromContent(lua_State *L) +static int _olua_fun_cocostudio_timeline_ActionTimelineCache_createActionFromContent(lua_State *L) { olua_startinvoke(L); @@ -15865,7 +17778,7 @@ static int _cocostudio_timeline_ActionTimelineCache_createActionFromContent(lua_ return num_ret; } -static int _cocostudio_timeline_ActionTimelineCache_createActionFromJson(lua_State *L) +static int _olua_fun_cocostudio_timeline_ActionTimelineCache_createActionFromJson(lua_State *L) { olua_startinvoke(L); @@ -15884,7 +17797,7 @@ static int _cocostudio_timeline_ActionTimelineCache_createActionFromJson(lua_Sta return num_ret; } -static int _cocostudio_timeline_ActionTimelineCache_createActionWithDataBuffer(lua_State *L) +static int _olua_fun_cocostudio_timeline_ActionTimelineCache_createActionWithDataBuffer(lua_State *L) { olua_startinvoke(L); @@ -15905,7 +17818,7 @@ static int _cocostudio_timeline_ActionTimelineCache_createActionWithDataBuffer(l return num_ret; } -static int _cocostudio_timeline_ActionTimelineCache_createActionWithFlatBuffersFile(lua_State *L) +static int _olua_fun_cocostudio_timeline_ActionTimelineCache_createActionWithFlatBuffersFile(lua_State *L) { olua_startinvoke(L); @@ -15924,7 +17837,7 @@ static int _cocostudio_timeline_ActionTimelineCache_createActionWithFlatBuffersF return num_ret; } -static int _cocostudio_timeline_ActionTimelineCache_createActionWithFlatBuffersForSimulator(lua_State *L) +static int _olua_fun_cocostudio_timeline_ActionTimelineCache_createActionWithFlatBuffersForSimulator(lua_State *L) { olua_startinvoke(L); @@ -15943,7 +17856,7 @@ static int _cocostudio_timeline_ActionTimelineCache_createActionWithFlatBuffersF return num_ret; } -static int _cocostudio_timeline_ActionTimelineCache_destroyInstance(lua_State *L) +static int _olua_fun_cocostudio_timeline_ActionTimelineCache_destroyInstance(lua_State *L) { olua_startinvoke(L); @@ -15955,7 +17868,7 @@ static int _cocostudio_timeline_ActionTimelineCache_destroyInstance(lua_State *L return 0; } -static int _cocostudio_timeline_ActionTimelineCache_getInstance(lua_State *L) +static int _olua_fun_cocostudio_timeline_ActionTimelineCache_getInstance(lua_State *L) { olua_startinvoke(L); @@ -15968,7 +17881,7 @@ static int _cocostudio_timeline_ActionTimelineCache_getInstance(lua_State *L) return num_ret; } -static int _cocostudio_timeline_ActionTimelineCache_init(lua_State *L) +static int _olua_fun_cocostudio_timeline_ActionTimelineCache_init(lua_State *L) { olua_startinvoke(L); @@ -15984,7 +17897,7 @@ static int _cocostudio_timeline_ActionTimelineCache_init(lua_State *L) return 0; } -static int _cocostudio_timeline_ActionTimelineCache_loadAnimationActionWithContent(lua_State *L) +static int _olua_fun_cocostudio_timeline_ActionTimelineCache_loadAnimationActionWithContent(lua_State *L) { olua_startinvoke(L); @@ -16005,7 +17918,7 @@ static int _cocostudio_timeline_ActionTimelineCache_loadAnimationActionWithConte return num_ret; } -static int _cocostudio_timeline_ActionTimelineCache_loadAnimationActionWithFile(lua_State *L) +static int _olua_fun_cocostudio_timeline_ActionTimelineCache_loadAnimationActionWithFile(lua_State *L) { olua_startinvoke(L); @@ -16024,7 +17937,7 @@ static int _cocostudio_timeline_ActionTimelineCache_loadAnimationActionWithFile( return num_ret; } -static int _cocostudio_timeline_ActionTimelineCache_loadAnimationActionWithFlatBuffersFile(lua_State *L) +static int _olua_fun_cocostudio_timeline_ActionTimelineCache_loadAnimationActionWithFlatBuffersFile(lua_State *L) { olua_startinvoke(L); @@ -16043,7 +17956,7 @@ static int _cocostudio_timeline_ActionTimelineCache_loadAnimationActionWithFlatB return num_ret; } -static int _cocostudio_timeline_ActionTimelineCache_loadAnimationWithDataBuffer(lua_State *L) +static int _olua_fun_cocostudio_timeline_ActionTimelineCache_loadAnimationWithDataBuffer(lua_State *L) { olua_startinvoke(L); @@ -16064,7 +17977,7 @@ static int _cocostudio_timeline_ActionTimelineCache_loadAnimationWithDataBuffer( return num_ret; } -static int _cocostudio_timeline_ActionTimelineCache_purge(lua_State *L) +static int _olua_fun_cocostudio_timeline_ActionTimelineCache_purge(lua_State *L) { olua_startinvoke(L); @@ -16080,7 +17993,7 @@ static int _cocostudio_timeline_ActionTimelineCache_purge(lua_State *L) return 0; } -static int _cocostudio_timeline_ActionTimelineCache_removeAction(lua_State *L) +static int _olua_fun_cocostudio_timeline_ActionTimelineCache_removeAction(lua_State *L) { olua_startinvoke(L); @@ -16098,34 +18011,43 @@ static int _cocostudio_timeline_ActionTimelineCache_removeAction(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocostudio_timeline_ActionTimelineCache(lua_State *L) +static int _olua_cls_ccs_timeline_ActionTimelineCache(lua_State *L) { oluacls_class(L, "ccs.timeline.ActionTimelineCache"); - oluacls_func(L, "__gc", _cocostudio_timeline_ActionTimelineCache___gc); - oluacls_func(L, "__olua_move", _cocostudio_timeline_ActionTimelineCache___olua_move); - oluacls_func(L, "createAction", _cocostudio_timeline_ActionTimelineCache_createAction); - oluacls_func(L, "createActionFromContent", _cocostudio_timeline_ActionTimelineCache_createActionFromContent); - oluacls_func(L, "createActionFromJson", _cocostudio_timeline_ActionTimelineCache_createActionFromJson); - oluacls_func(L, "createActionWithDataBuffer", _cocostudio_timeline_ActionTimelineCache_createActionWithDataBuffer); - oluacls_func(L, "createActionWithFlatBuffersFile", _cocostudio_timeline_ActionTimelineCache_createActionWithFlatBuffersFile); - oluacls_func(L, "createActionWithFlatBuffersForSimulator", _cocostudio_timeline_ActionTimelineCache_createActionWithFlatBuffersForSimulator); - oluacls_func(L, "destroyInstance", _cocostudio_timeline_ActionTimelineCache_destroyInstance); - oluacls_func(L, "getInstance", _cocostudio_timeline_ActionTimelineCache_getInstance); - oluacls_func(L, "init", _cocostudio_timeline_ActionTimelineCache_init); - oluacls_func(L, "loadAnimationActionWithContent", _cocostudio_timeline_ActionTimelineCache_loadAnimationActionWithContent); - oluacls_func(L, "loadAnimationActionWithFile", _cocostudio_timeline_ActionTimelineCache_loadAnimationActionWithFile); - oluacls_func(L, "loadAnimationActionWithFlatBuffersFile", _cocostudio_timeline_ActionTimelineCache_loadAnimationActionWithFlatBuffersFile); - oluacls_func(L, "loadAnimationWithDataBuffer", _cocostudio_timeline_ActionTimelineCache_loadAnimationWithDataBuffer); - oluacls_func(L, "purge", _cocostudio_timeline_ActionTimelineCache_purge); - oluacls_func(L, "removeAction", _cocostudio_timeline_ActionTimelineCache_removeAction); - oluacls_prop(L, "instance", _cocostudio_timeline_ActionTimelineCache_getInstance, nullptr); + oluacls_func(L, "__gc", _olua_fun_cocostudio_timeline_ActionTimelineCache___gc); + oluacls_func(L, "__olua_move", _olua_fun_cocostudio_timeline_ActionTimelineCache___olua_move); + oluacls_func(L, "createAction", _olua_fun_cocostudio_timeline_ActionTimelineCache_createAction); + oluacls_func(L, "createActionFromContent", _olua_fun_cocostudio_timeline_ActionTimelineCache_createActionFromContent); + oluacls_func(L, "createActionFromJson", _olua_fun_cocostudio_timeline_ActionTimelineCache_createActionFromJson); + oluacls_func(L, "createActionWithDataBuffer", _olua_fun_cocostudio_timeline_ActionTimelineCache_createActionWithDataBuffer); + oluacls_func(L, "createActionWithFlatBuffersFile", _olua_fun_cocostudio_timeline_ActionTimelineCache_createActionWithFlatBuffersFile); + oluacls_func(L, "createActionWithFlatBuffersForSimulator", _olua_fun_cocostudio_timeline_ActionTimelineCache_createActionWithFlatBuffersForSimulator); + oluacls_func(L, "destroyInstance", _olua_fun_cocostudio_timeline_ActionTimelineCache_destroyInstance); + oluacls_func(L, "getInstance", _olua_fun_cocostudio_timeline_ActionTimelineCache_getInstance); + oluacls_func(L, "init", _olua_fun_cocostudio_timeline_ActionTimelineCache_init); + oluacls_func(L, "loadAnimationActionWithContent", _olua_fun_cocostudio_timeline_ActionTimelineCache_loadAnimationActionWithContent); + oluacls_func(L, "loadAnimationActionWithFile", _olua_fun_cocostudio_timeline_ActionTimelineCache_loadAnimationActionWithFile); + oluacls_func(L, "loadAnimationActionWithFlatBuffersFile", _olua_fun_cocostudio_timeline_ActionTimelineCache_loadAnimationActionWithFlatBuffersFile); + oluacls_func(L, "loadAnimationWithDataBuffer", _olua_fun_cocostudio_timeline_ActionTimelineCache_loadAnimationWithDataBuffer); + oluacls_func(L, "purge", _olua_fun_cocostudio_timeline_ActionTimelineCache_purge); + oluacls_func(L, "removeAction", _olua_fun_cocostudio_timeline_ActionTimelineCache_removeAction); + oluacls_prop(L, "instance", _olua_fun_cocostudio_timeline_ActionTimelineCache_getInstance, nullptr); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccs_timeline_ActionTimelineCache(lua_State *L) +{ + olua_require(L, "cocos2d_studio", luaopen_cocos2d_studio); + if (!olua_getclass(L, "ccs.timeline.ActionTimelineCache")) { + luaL_error(L, "class not found: cocostudio::timeline::ActionTimelineCache"); + } + return 1; +} OLUA_END_DECLS -static int _cocostudio_timeline_ActionTimelineData_create(lua_State *L) +static int _olua_fun_cocostudio_timeline_ActionTimelineData_create(lua_State *L) { olua_startinvoke(L); @@ -16142,7 +18064,7 @@ static int _cocostudio_timeline_ActionTimelineData_create(lua_State *L) return num_ret; } -static int _cocostudio_timeline_ActionTimelineData_getActionTag(lua_State *L) +static int _olua_fun_cocostudio_timeline_ActionTimelineData_getActionTag(lua_State *L) { olua_startinvoke(L); @@ -16159,7 +18081,7 @@ static int _cocostudio_timeline_ActionTimelineData_getActionTag(lua_State *L) return num_ret; } -static int _cocostudio_timeline_ActionTimelineData_init(lua_State *L) +static int _olua_fun_cocostudio_timeline_ActionTimelineData_init(lua_State *L) { olua_startinvoke(L); @@ -16178,11 +18100,11 @@ static int _cocostudio_timeline_ActionTimelineData_init(lua_State *L) return num_ret; } -static int _cocostudio_timeline_ActionTimelineData_new(lua_State *L) +static int _olua_fun_cocostudio_timeline_ActionTimelineData_new(lua_State *L) { olua_startinvoke(L); - // ActionTimelineData() + // cocostudio::timeline::ActionTimelineData() cocostudio::timeline::ActionTimelineData *ret = new cocostudio::timeline::ActionTimelineData(); int num_ret = olua_push_object(L, ret, "ccs.timeline.ActionTimelineData"); olua_postnew(L, ret); @@ -16192,7 +18114,7 @@ static int _cocostudio_timeline_ActionTimelineData_new(lua_State *L) return num_ret; } -static int _cocostudio_timeline_ActionTimelineData_setActionTag(lua_State *L) +static int _olua_fun_cocostudio_timeline_ActionTimelineData_setActionTag(lua_State *L) { olua_startinvoke(L); @@ -16210,22 +18132,31 @@ static int _cocostudio_timeline_ActionTimelineData_setActionTag(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocostudio_timeline_ActionTimelineData(lua_State *L) +static int _olua_cls_ccs_timeline_ActionTimelineData(lua_State *L) { oluacls_class(L, "ccs.timeline.ActionTimelineData"); - oluacls_func(L, "create", _cocostudio_timeline_ActionTimelineData_create); - oluacls_func(L, "getActionTag", _cocostudio_timeline_ActionTimelineData_getActionTag); - oluacls_func(L, "init", _cocostudio_timeline_ActionTimelineData_init); - oluacls_func(L, "new", _cocostudio_timeline_ActionTimelineData_new); - oluacls_func(L, "setActionTag", _cocostudio_timeline_ActionTimelineData_setActionTag); - oluacls_prop(L, "actionTag", _cocostudio_timeline_ActionTimelineData_getActionTag, _cocostudio_timeline_ActionTimelineData_setActionTag); + oluacls_func(L, "create", _olua_fun_cocostudio_timeline_ActionTimelineData_create); + oluacls_func(L, "getActionTag", _olua_fun_cocostudio_timeline_ActionTimelineData_getActionTag); + oluacls_func(L, "init", _olua_fun_cocostudio_timeline_ActionTimelineData_init); + oluacls_func(L, "new", _olua_fun_cocostudio_timeline_ActionTimelineData_new); + oluacls_func(L, "setActionTag", _olua_fun_cocostudio_timeline_ActionTimelineData_setActionTag); + oluacls_prop(L, "actionTag", _olua_fun_cocostudio_timeline_ActionTimelineData_getActionTag, _olua_fun_cocostudio_timeline_ActionTimelineData_setActionTag); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccs_timeline_ActionTimelineData(lua_State *L) +{ + olua_require(L, "cocos2d_studio", luaopen_cocos2d_studio); + if (!olua_getclass(L, "ccs.timeline.ActionTimelineData")) { + luaL_error(L, "class not found: cocostudio::timeline::ActionTimelineData"); + } return 1; } OLUA_END_DECLS -static int _cocostudio_timeline_ActionTimelineNode_create(lua_State *L) +static int _olua_fun_cocostudio_timeline_ActionTimelineNode_create(lua_State *L) { olua_startinvoke(L); @@ -16244,7 +18175,7 @@ static int _cocostudio_timeline_ActionTimelineNode_create(lua_State *L) return num_ret; } -static int _cocostudio_timeline_ActionTimelineNode_getActionTimeline(lua_State *L) +static int _olua_fun_cocostudio_timeline_ActionTimelineNode_getActionTimeline(lua_State *L) { olua_startinvoke(L); @@ -16264,7 +18195,7 @@ static int _cocostudio_timeline_ActionTimelineNode_getActionTimeline(lua_State * return num_ret; } -static int _cocostudio_timeline_ActionTimelineNode_getRoot(lua_State *L) +static int _olua_fun_cocostudio_timeline_ActionTimelineNode_getRoot(lua_State *L) { olua_startinvoke(L); @@ -16284,7 +18215,7 @@ static int _cocostudio_timeline_ActionTimelineNode_getRoot(lua_State *L) return num_ret; } -static int _cocostudio_timeline_ActionTimelineNode_init$1(lua_State *L) +static int _olua_fun_cocostudio_timeline_ActionTimelineNode_init$1(lua_State *L) { olua_startinvoke(L); @@ -16301,7 +18232,7 @@ static int _cocostudio_timeline_ActionTimelineNode_init$1(lua_State *L) return num_ret; } -static int _cocostudio_timeline_ActionTimelineNode_init$2(lua_State *L) +static int _olua_fun_cocostudio_timeline_ActionTimelineNode_init$2(lua_State *L) { olua_startinvoke(L); @@ -16322,19 +18253,19 @@ static int _cocostudio_timeline_ActionTimelineNode_init$2(lua_State *L) return num_ret; } -static int _cocostudio_timeline_ActionTimelineNode_init(lua_State *L) +static int _olua_fun_cocostudio_timeline_ActionTimelineNode_init(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 0) { // @using bool init() - return _cocostudio_timeline_ActionTimelineNode_init$1(L); + return _olua_fun_cocostudio_timeline_ActionTimelineNode_init$1(L); } if (num_args == 2) { // if ((olua_is_object(L, 2, "cc.Node")) && (olua_is_object(L, 3, "ccs.timeline.ActionTimeline"))) { // bool init(cocos2d::Node *root, cocostudio::timeline::ActionTimeline *action) - return _cocostudio_timeline_ActionTimelineNode_init$2(L); + return _olua_fun_cocostudio_timeline_ActionTimelineNode_init$2(L); // } } @@ -16343,11 +18274,11 @@ static int _cocostudio_timeline_ActionTimelineNode_init(lua_State *L) return 0; } -static int _cocostudio_timeline_ActionTimelineNode_new(lua_State *L) +static int _olua_fun_cocostudio_timeline_ActionTimelineNode_new(lua_State *L) { olua_startinvoke(L); - // ActionTimelineNode() + // cocostudio::timeline::ActionTimelineNode() cocostudio::timeline::ActionTimelineNode *ret = new cocostudio::timeline::ActionTimelineNode(); int num_ret = olua_push_object(L, ret, "ccs.timeline.ActionTimelineNode"); olua_postnew(L, ret); @@ -16357,7 +18288,7 @@ static int _cocostudio_timeline_ActionTimelineNode_new(lua_State *L) return num_ret; } -static int _cocostudio_timeline_ActionTimelineNode_setActionTimeline(lua_State *L) +static int _olua_fun_cocostudio_timeline_ActionTimelineNode_setActionTimeline(lua_State *L) { olua_startinvoke(L); @@ -16378,7 +18309,7 @@ static int _cocostudio_timeline_ActionTimelineNode_setActionTimeline(lua_State * return 0; } -static int _cocostudio_timeline_ActionTimelineNode_setRoot(lua_State *L) +static int _olua_fun_cocostudio_timeline_ActionTimelineNode_setRoot(lua_State *L) { olua_startinvoke(L); @@ -16399,25 +18330,34 @@ static int _cocostudio_timeline_ActionTimelineNode_setRoot(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocostudio_timeline_ActionTimelineNode(lua_State *L) +static int _olua_cls_ccs_timeline_ActionTimelineNode(lua_State *L) { oluacls_class(L, "ccs.timeline.ActionTimelineNode"); - oluacls_func(L, "create", _cocostudio_timeline_ActionTimelineNode_create); - oluacls_func(L, "getActionTimeline", _cocostudio_timeline_ActionTimelineNode_getActionTimeline); - oluacls_func(L, "getRoot", _cocostudio_timeline_ActionTimelineNode_getRoot); - oluacls_func(L, "init", _cocostudio_timeline_ActionTimelineNode_init); - oluacls_func(L, "new", _cocostudio_timeline_ActionTimelineNode_new); - oluacls_func(L, "setActionTimeline", _cocostudio_timeline_ActionTimelineNode_setActionTimeline); - oluacls_func(L, "setRoot", _cocostudio_timeline_ActionTimelineNode_setRoot); - oluacls_prop(L, "actionTimeline", _cocostudio_timeline_ActionTimelineNode_getActionTimeline, _cocostudio_timeline_ActionTimelineNode_setActionTimeline); - oluacls_prop(L, "root", _cocostudio_timeline_ActionTimelineNode_getRoot, _cocostudio_timeline_ActionTimelineNode_setRoot); + oluacls_func(L, "create", _olua_fun_cocostudio_timeline_ActionTimelineNode_create); + oluacls_func(L, "getActionTimeline", _olua_fun_cocostudio_timeline_ActionTimelineNode_getActionTimeline); + oluacls_func(L, "getRoot", _olua_fun_cocostudio_timeline_ActionTimelineNode_getRoot); + oluacls_func(L, "init", _olua_fun_cocostudio_timeline_ActionTimelineNode_init); + oluacls_func(L, "new", _olua_fun_cocostudio_timeline_ActionTimelineNode_new); + oluacls_func(L, "setActionTimeline", _olua_fun_cocostudio_timeline_ActionTimelineNode_setActionTimeline); + oluacls_func(L, "setRoot", _olua_fun_cocostudio_timeline_ActionTimelineNode_setRoot); + oluacls_prop(L, "actionTimeline", _olua_fun_cocostudio_timeline_ActionTimelineNode_getActionTimeline, _olua_fun_cocostudio_timeline_ActionTimelineNode_setActionTimeline); + oluacls_prop(L, "root", _olua_fun_cocostudio_timeline_ActionTimelineNode_getRoot, _olua_fun_cocostudio_timeline_ActionTimelineNode_setRoot); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccs_timeline_ActionTimelineNode(lua_State *L) +{ + olua_require(L, "cocos2d_studio", luaopen_cocos2d_studio); + if (!olua_getclass(L, "ccs.timeline.ActionTimelineNode")) { + luaL_error(L, "class not found: cocostudio::timeline::ActionTimelineNode"); + } return 1; } OLUA_END_DECLS -static int _cocostudio_timeline_BoneNode_addSkin$1(lua_State *L) +static int _olua_fun_cocostudio_timeline_BoneNode_addSkin$1(lua_State *L) { olua_startinvoke(L); @@ -16440,7 +18380,7 @@ static int _cocostudio_timeline_BoneNode_addSkin$1(lua_State *L) return 0; } -static int _cocostudio_timeline_BoneNode_addSkin$2(lua_State *L) +static int _olua_fun_cocostudio_timeline_BoneNode_addSkin$2(lua_State *L) { olua_startinvoke(L); @@ -16465,21 +18405,21 @@ static int _cocostudio_timeline_BoneNode_addSkin$2(lua_State *L) return 0; } -static int _cocostudio_timeline_BoneNode_addSkin(lua_State *L) +static int _olua_fun_cocostudio_timeline_BoneNode_addSkin(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 2) { // if ((olua_is_object(L, 2, "cc.Node")) && (olua_is_bool(L, 3))) { // void addSkin(@addref(skins |) cocostudio::timeline::SkinNode *skin, bool display) - return _cocostudio_timeline_BoneNode_addSkin$1(L); + return _olua_fun_cocostudio_timeline_BoneNode_addSkin$1(L); // } } if (num_args == 3) { // if ((olua_is_object(L, 2, "cc.Node")) && (olua_is_bool(L, 3)) && (olua_is_bool(L, 4))) { // void addSkin(@addref(skins |) cocostudio::timeline::SkinNode *skin, bool display, bool hideOthers) - return _cocostudio_timeline_BoneNode_addSkin$2(L); + return _olua_fun_cocostudio_timeline_BoneNode_addSkin$2(L); // } } @@ -16488,7 +18428,7 @@ static int _cocostudio_timeline_BoneNode_addSkin(lua_State *L) return 0; } -static int _cocostudio_timeline_BoneNode_as(lua_State *L) +static int _olua_fun_cocostudio_timeline_BoneNode_as(lua_State *L) { olua_startinvoke(L); @@ -16516,7 +18456,7 @@ static int _cocostudio_timeline_BoneNode_as(lua_State *L) return 1; } -static int _cocostudio_timeline_BoneNode_create$1(lua_State *L) +static int _olua_fun_cocostudio_timeline_BoneNode_create$1(lua_State *L) { olua_startinvoke(L); @@ -16529,7 +18469,7 @@ static int _cocostudio_timeline_BoneNode_create$1(lua_State *L) return num_ret; } -static int _cocostudio_timeline_BoneNode_create$2(lua_State *L) +static int _olua_fun_cocostudio_timeline_BoneNode_create$2(lua_State *L) { olua_startinvoke(L); @@ -16546,19 +18486,19 @@ static int _cocostudio_timeline_BoneNode_create$2(lua_State *L) return num_ret; } -static int _cocostudio_timeline_BoneNode_create(lua_State *L) +static int _olua_fun_cocostudio_timeline_BoneNode_create(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 0) { // static cocostudio::timeline::BoneNode *create() - return _cocostudio_timeline_BoneNode_create$1(L); + return _olua_fun_cocostudio_timeline_BoneNode_create$1(L); } if (num_args == 1) { // if ((olua_is_integer(L, 1))) { // static cocostudio::timeline::BoneNode *create(int length) - return _cocostudio_timeline_BoneNode_create$2(L); + return _olua_fun_cocostudio_timeline_BoneNode_create$2(L); // } } @@ -16567,7 +18507,7 @@ static int _cocostudio_timeline_BoneNode_create(lua_State *L) return 0; } -static int _cocostudio_timeline_BoneNode_displaySkin$1(lua_State *L) +static int _olua_fun_cocostudio_timeline_BoneNode_displaySkin$1(lua_State *L) { olua_startinvoke(L); @@ -16587,7 +18527,7 @@ static int _cocostudio_timeline_BoneNode_displaySkin$1(lua_State *L) return 0; } -static int _cocostudio_timeline_BoneNode_displaySkin$2(lua_State *L) +static int _olua_fun_cocostudio_timeline_BoneNode_displaySkin$2(lua_State *L) { olua_startinvoke(L); @@ -16607,19 +18547,19 @@ static int _cocostudio_timeline_BoneNode_displaySkin$2(lua_State *L) return 0; } -static int _cocostudio_timeline_BoneNode_displaySkin(lua_State *L) +static int _olua_fun_cocostudio_timeline_BoneNode_displaySkin(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 2) { if ((olua_is_object(L, 2, "cc.Node")) && (olua_is_bool(L, 3))) { // void displaySkin(cocostudio::timeline::SkinNode *skin, bool hideOthers) - return _cocostudio_timeline_BoneNode_displaySkin$1(L); + return _olua_fun_cocostudio_timeline_BoneNode_displaySkin$1(L); } // if ((olua_is_string(L, 2)) && (olua_is_bool(L, 3))) { // void displaySkin(const std::string &skinName, bool hideOthers) - return _cocostudio_timeline_BoneNode_displaySkin$2(L); + return _olua_fun_cocostudio_timeline_BoneNode_displaySkin$2(L); // } } @@ -16628,7 +18568,7 @@ static int _cocostudio_timeline_BoneNode_displaySkin(lua_State *L) return 0; } -static int _cocostudio_timeline_BoneNode_getAllSubBones(lua_State *L) +static int _olua_fun_cocostudio_timeline_BoneNode_getAllSubBones(lua_State *L) { olua_startinvoke(L); @@ -16650,7 +18590,7 @@ static int _cocostudio_timeline_BoneNode_getAllSubBones(lua_State *L) return num_ret; } -static int _cocostudio_timeline_BoneNode_getAllSubSkins(lua_State *L) +static int _olua_fun_cocostudio_timeline_BoneNode_getAllSubSkins(lua_State *L) { olua_startinvoke(L); @@ -16672,7 +18612,7 @@ static int _cocostudio_timeline_BoneNode_getAllSubSkins(lua_State *L) return num_ret; } -static int _cocostudio_timeline_BoneNode_getBlendFunc(lua_State *L) +static int _olua_fun_cocostudio_timeline_BoneNode_getBlendFunc(lua_State *L) { olua_startinvoke(L); @@ -16689,7 +18629,7 @@ static int _cocostudio_timeline_BoneNode_getBlendFunc(lua_State *L) return num_ret; } -static int _cocostudio_timeline_BoneNode_getChildBones(lua_State *L) +static int _olua_fun_cocostudio_timeline_BoneNode_getChildBones(lua_State *L) { olua_startinvoke(L); @@ -16711,7 +18651,7 @@ static int _cocostudio_timeline_BoneNode_getChildBones(lua_State *L) return num_ret; } -static int _cocostudio_timeline_BoneNode_getDebugDrawColor(lua_State *L) +static int _olua_fun_cocostudio_timeline_BoneNode_getDebugDrawColor(lua_State *L) { olua_startinvoke(L); @@ -16728,7 +18668,7 @@ static int _cocostudio_timeline_BoneNode_getDebugDrawColor(lua_State *L) return num_ret; } -static int _cocostudio_timeline_BoneNode_getDebugDrawLength(lua_State *L) +static int _olua_fun_cocostudio_timeline_BoneNode_getDebugDrawLength(lua_State *L) { olua_startinvoke(L); @@ -16745,7 +18685,7 @@ static int _cocostudio_timeline_BoneNode_getDebugDrawLength(lua_State *L) return num_ret; } -static int _cocostudio_timeline_BoneNode_getDebugDrawWidth(lua_State *L) +static int _olua_fun_cocostudio_timeline_BoneNode_getDebugDrawWidth(lua_State *L) { olua_startinvoke(L); @@ -16762,7 +18702,7 @@ static int _cocostudio_timeline_BoneNode_getDebugDrawWidth(lua_State *L) return num_ret; } -static int _cocostudio_timeline_BoneNode_getRootSkeletonNode(lua_State *L) +static int _olua_fun_cocostudio_timeline_BoneNode_getRootSkeletonNode(lua_State *L) { olua_startinvoke(L); @@ -16782,7 +18722,7 @@ static int _cocostudio_timeline_BoneNode_getRootSkeletonNode(lua_State *L) return num_ret; } -static int _cocostudio_timeline_BoneNode_getSkins(lua_State *L) +static int _olua_fun_cocostudio_timeline_BoneNode_getSkins(lua_State *L) { olua_startinvoke(L); @@ -16804,7 +18744,7 @@ static int _cocostudio_timeline_BoneNode_getSkins(lua_State *L) return num_ret; } -static int _cocostudio_timeline_BoneNode_getVisibleSkins(lua_State *L) +static int _olua_fun_cocostudio_timeline_BoneNode_getVisibleSkins(lua_State *L) { olua_startinvoke(L); @@ -16826,7 +18766,7 @@ static int _cocostudio_timeline_BoneNode_getVisibleSkins(lua_State *L) return num_ret; } -static int _cocostudio_timeline_BoneNode_getVisibleSkinsRect(lua_State *L) +static int _olua_fun_cocostudio_timeline_BoneNode_getVisibleSkinsRect(lua_State *L) { olua_startinvoke(L); @@ -16836,14 +18776,14 @@ static int _cocostudio_timeline_BoneNode_getVisibleSkinsRect(lua_State *L) // cocos2d::Rect getVisibleSkinsRect() cocos2d::Rect ret = self->getVisibleSkinsRect(); - int num_ret = olua_pushcopy_object(L, ret, "cc.Rect"); + int num_ret = olua_copy_object(L, ret, "cc.Rect"); olua_endinvoke(L); return num_ret; } -static int _cocostudio_timeline_BoneNode_isDebugDrawEnabled(lua_State *L) +static int _olua_fun_cocostudio_timeline_BoneNode_isDebugDrawEnabled(lua_State *L) { olua_startinvoke(L); @@ -16860,11 +18800,11 @@ static int _cocostudio_timeline_BoneNode_isDebugDrawEnabled(lua_State *L) return num_ret; } -static int _cocostudio_timeline_BoneNode_new(lua_State *L) +static int _olua_fun_cocostudio_timeline_BoneNode_new(lua_State *L) { olua_startinvoke(L); - // BoneNode() + // cocostudio::timeline::BoneNode() cocostudio::timeline::BoneNode *ret = new cocostudio::timeline::BoneNode(); int num_ret = olua_push_object(L, ret, "ccs.timeline.BoneNode"); olua_postnew(L, ret); @@ -16874,25 +18814,25 @@ static int _cocostudio_timeline_BoneNode_new(lua_State *L) return num_ret; } -static int _cocostudio_timeline_BoneNode_setBlendFunc(lua_State *L) +static int _olua_fun_cocostudio_timeline_BoneNode_setBlendFunc(lua_State *L) { olua_startinvoke(L); cocostudio::timeline::BoneNode *self = nullptr; - cocos2d::BlendFunc arg1; /** blendFunc */ + cocos2d::BlendFunc *arg1; /** blendFunc */ olua_to_object(L, 1, &self, "ccs.timeline.BoneNode"); olua_check_object(L, 2, &arg1, "cc.BlendFunc"); // void setBlendFunc(const cocos2d::BlendFunc &blendFunc) - self->setBlendFunc(arg1); + self->setBlendFunc(*arg1); olua_endinvoke(L); return 0; } -static int _cocostudio_timeline_BoneNode_setDebugDrawColor(lua_State *L) +static int _olua_fun_cocostudio_timeline_BoneNode_setDebugDrawColor(lua_State *L) { olua_startinvoke(L); @@ -16910,7 +18850,7 @@ static int _cocostudio_timeline_BoneNode_setDebugDrawColor(lua_State *L) return 0; } -static int _cocostudio_timeline_BoneNode_setDebugDrawEnabled(lua_State *L) +static int _olua_fun_cocostudio_timeline_BoneNode_setDebugDrawEnabled(lua_State *L) { olua_startinvoke(L); @@ -16928,7 +18868,7 @@ static int _cocostudio_timeline_BoneNode_setDebugDrawEnabled(lua_State *L) return 0; } -static int _cocostudio_timeline_BoneNode_setDebugDrawLength(lua_State *L) +static int _olua_fun_cocostudio_timeline_BoneNode_setDebugDrawLength(lua_State *L) { olua_startinvoke(L); @@ -16946,7 +18886,7 @@ static int _cocostudio_timeline_BoneNode_setDebugDrawLength(lua_State *L) return 0; } -static int _cocostudio_timeline_BoneNode_setDebugDrawWidth(lua_State *L) +static int _olua_fun_cocostudio_timeline_BoneNode_setDebugDrawWidth(lua_State *L) { olua_startinvoke(L); @@ -16964,7 +18904,7 @@ static int _cocostudio_timeline_BoneNode_setDebugDrawWidth(lua_State *L) return 0; } -static int _cocostudio_timeline_BoneNode_setLocalZOrder(lua_State *L) +static int _olua_fun_cocostudio_timeline_BoneNode_setLocalZOrder(lua_State *L) { olua_startinvoke(L); @@ -16982,51 +18922,60 @@ static int _cocostudio_timeline_BoneNode_setLocalZOrder(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocostudio_timeline_BoneNode(lua_State *L) +static int _olua_cls_ccs_timeline_BoneNode(lua_State *L) { oluacls_class(L, "ccs.timeline.BoneNode"); - oluacls_func(L, "addSkin", _cocostudio_timeline_BoneNode_addSkin); - oluacls_func(L, "as", _cocostudio_timeline_BoneNode_as); - oluacls_func(L, "create", _cocostudio_timeline_BoneNode_create); - oluacls_func(L, "displaySkin", _cocostudio_timeline_BoneNode_displaySkin); - oluacls_func(L, "getAllSubBones", _cocostudio_timeline_BoneNode_getAllSubBones); - oluacls_func(L, "getAllSubSkins", _cocostudio_timeline_BoneNode_getAllSubSkins); - oluacls_func(L, "getBlendFunc", _cocostudio_timeline_BoneNode_getBlendFunc); - oluacls_func(L, "getChildBones", _cocostudio_timeline_BoneNode_getChildBones); - oluacls_func(L, "getDebugDrawColor", _cocostudio_timeline_BoneNode_getDebugDrawColor); - oluacls_func(L, "getDebugDrawLength", _cocostudio_timeline_BoneNode_getDebugDrawLength); - oluacls_func(L, "getDebugDrawWidth", _cocostudio_timeline_BoneNode_getDebugDrawWidth); - oluacls_func(L, "getRootSkeletonNode", _cocostudio_timeline_BoneNode_getRootSkeletonNode); - oluacls_func(L, "getSkins", _cocostudio_timeline_BoneNode_getSkins); - oluacls_func(L, "getVisibleSkins", _cocostudio_timeline_BoneNode_getVisibleSkins); - oluacls_func(L, "getVisibleSkinsRect", _cocostudio_timeline_BoneNode_getVisibleSkinsRect); - oluacls_func(L, "isDebugDrawEnabled", _cocostudio_timeline_BoneNode_isDebugDrawEnabled); - oluacls_func(L, "new", _cocostudio_timeline_BoneNode_new); - oluacls_func(L, "setBlendFunc", _cocostudio_timeline_BoneNode_setBlendFunc); - oluacls_func(L, "setDebugDrawColor", _cocostudio_timeline_BoneNode_setDebugDrawColor); - oluacls_func(L, "setDebugDrawEnabled", _cocostudio_timeline_BoneNode_setDebugDrawEnabled); - oluacls_func(L, "setDebugDrawLength", _cocostudio_timeline_BoneNode_setDebugDrawLength); - oluacls_func(L, "setDebugDrawWidth", _cocostudio_timeline_BoneNode_setDebugDrawWidth); - oluacls_func(L, "setLocalZOrder", _cocostudio_timeline_BoneNode_setLocalZOrder); - oluacls_prop(L, "allSubBones", _cocostudio_timeline_BoneNode_getAllSubBones, nullptr); - oluacls_prop(L, "allSubSkins", _cocostudio_timeline_BoneNode_getAllSubSkins, nullptr); - oluacls_prop(L, "blendFunc", _cocostudio_timeline_BoneNode_getBlendFunc, _cocostudio_timeline_BoneNode_setBlendFunc); - oluacls_prop(L, "childBones", _cocostudio_timeline_BoneNode_getChildBones, nullptr); - oluacls_prop(L, "debugDrawColor", _cocostudio_timeline_BoneNode_getDebugDrawColor, _cocostudio_timeline_BoneNode_setDebugDrawColor); - oluacls_prop(L, "debugDrawEnabled", _cocostudio_timeline_BoneNode_isDebugDrawEnabled, _cocostudio_timeline_BoneNode_setDebugDrawEnabled); - oluacls_prop(L, "debugDrawLength", _cocostudio_timeline_BoneNode_getDebugDrawLength, _cocostudio_timeline_BoneNode_setDebugDrawLength); - oluacls_prop(L, "debugDrawWidth", _cocostudio_timeline_BoneNode_getDebugDrawWidth, _cocostudio_timeline_BoneNode_setDebugDrawWidth); - oluacls_prop(L, "rootSkeletonNode", _cocostudio_timeline_BoneNode_getRootSkeletonNode, nullptr); - oluacls_prop(L, "skins", _cocostudio_timeline_BoneNode_getSkins, nullptr); - oluacls_prop(L, "visibleSkins", _cocostudio_timeline_BoneNode_getVisibleSkins, nullptr); - oluacls_prop(L, "visibleSkinsRect", _cocostudio_timeline_BoneNode_getVisibleSkinsRect, nullptr); + oluacls_func(L, "addSkin", _olua_fun_cocostudio_timeline_BoneNode_addSkin); + oluacls_func(L, "as", _olua_fun_cocostudio_timeline_BoneNode_as); + oluacls_func(L, "create", _olua_fun_cocostudio_timeline_BoneNode_create); + oluacls_func(L, "displaySkin", _olua_fun_cocostudio_timeline_BoneNode_displaySkin); + oluacls_func(L, "getAllSubBones", _olua_fun_cocostudio_timeline_BoneNode_getAllSubBones); + oluacls_func(L, "getAllSubSkins", _olua_fun_cocostudio_timeline_BoneNode_getAllSubSkins); + oluacls_func(L, "getBlendFunc", _olua_fun_cocostudio_timeline_BoneNode_getBlendFunc); + oluacls_func(L, "getChildBones", _olua_fun_cocostudio_timeline_BoneNode_getChildBones); + oluacls_func(L, "getDebugDrawColor", _olua_fun_cocostudio_timeline_BoneNode_getDebugDrawColor); + oluacls_func(L, "getDebugDrawLength", _olua_fun_cocostudio_timeline_BoneNode_getDebugDrawLength); + oluacls_func(L, "getDebugDrawWidth", _olua_fun_cocostudio_timeline_BoneNode_getDebugDrawWidth); + oluacls_func(L, "getRootSkeletonNode", _olua_fun_cocostudio_timeline_BoneNode_getRootSkeletonNode); + oluacls_func(L, "getSkins", _olua_fun_cocostudio_timeline_BoneNode_getSkins); + oluacls_func(L, "getVisibleSkins", _olua_fun_cocostudio_timeline_BoneNode_getVisibleSkins); + oluacls_func(L, "getVisibleSkinsRect", _olua_fun_cocostudio_timeline_BoneNode_getVisibleSkinsRect); + oluacls_func(L, "isDebugDrawEnabled", _olua_fun_cocostudio_timeline_BoneNode_isDebugDrawEnabled); + oluacls_func(L, "new", _olua_fun_cocostudio_timeline_BoneNode_new); + oluacls_func(L, "setBlendFunc", _olua_fun_cocostudio_timeline_BoneNode_setBlendFunc); + oluacls_func(L, "setDebugDrawColor", _olua_fun_cocostudio_timeline_BoneNode_setDebugDrawColor); + oluacls_func(L, "setDebugDrawEnabled", _olua_fun_cocostudio_timeline_BoneNode_setDebugDrawEnabled); + oluacls_func(L, "setDebugDrawLength", _olua_fun_cocostudio_timeline_BoneNode_setDebugDrawLength); + oluacls_func(L, "setDebugDrawWidth", _olua_fun_cocostudio_timeline_BoneNode_setDebugDrawWidth); + oluacls_func(L, "setLocalZOrder", _olua_fun_cocostudio_timeline_BoneNode_setLocalZOrder); + oluacls_prop(L, "allSubBones", _olua_fun_cocostudio_timeline_BoneNode_getAllSubBones, nullptr); + oluacls_prop(L, "allSubSkins", _olua_fun_cocostudio_timeline_BoneNode_getAllSubSkins, nullptr); + oluacls_prop(L, "blendFunc", _olua_fun_cocostudio_timeline_BoneNode_getBlendFunc, _olua_fun_cocostudio_timeline_BoneNode_setBlendFunc); + oluacls_prop(L, "childBones", _olua_fun_cocostudio_timeline_BoneNode_getChildBones, nullptr); + oluacls_prop(L, "debugDrawColor", _olua_fun_cocostudio_timeline_BoneNode_getDebugDrawColor, _olua_fun_cocostudio_timeline_BoneNode_setDebugDrawColor); + oluacls_prop(L, "debugDrawEnabled", _olua_fun_cocostudio_timeline_BoneNode_isDebugDrawEnabled, _olua_fun_cocostudio_timeline_BoneNode_setDebugDrawEnabled); + oluacls_prop(L, "debugDrawLength", _olua_fun_cocostudio_timeline_BoneNode_getDebugDrawLength, _olua_fun_cocostudio_timeline_BoneNode_setDebugDrawLength); + oluacls_prop(L, "debugDrawWidth", _olua_fun_cocostudio_timeline_BoneNode_getDebugDrawWidth, _olua_fun_cocostudio_timeline_BoneNode_setDebugDrawWidth); + oluacls_prop(L, "rootSkeletonNode", _olua_fun_cocostudio_timeline_BoneNode_getRootSkeletonNode, nullptr); + oluacls_prop(L, "skins", _olua_fun_cocostudio_timeline_BoneNode_getSkins, nullptr); + oluacls_prop(L, "visibleSkins", _olua_fun_cocostudio_timeline_BoneNode_getVisibleSkins, nullptr); + oluacls_prop(L, "visibleSkinsRect", _olua_fun_cocostudio_timeline_BoneNode_getVisibleSkinsRect, nullptr); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccs_timeline_BoneNode(lua_State *L) +{ + olua_require(L, "cocos2d_studio", luaopen_cocos2d_studio); + if (!olua_getclass(L, "ccs.timeline.BoneNode")) { + luaL_error(L, "class not found: cocostudio::timeline::BoneNode"); + } return 1; } OLUA_END_DECLS -static int _cocostudio_timeline_SkeletonNode_addSkinGroup(lua_State *L) +static int _olua_fun_cocostudio_timeline_SkeletonNode_addSkinGroup(lua_State *L) { olua_startinvoke(L); @@ -17049,7 +18998,7 @@ static int _cocostudio_timeline_SkeletonNode_addSkinGroup(lua_State *L) return 0; } -static int _cocostudio_timeline_SkeletonNode_changeSkins$1(lua_State *L) +static int _olua_fun_cocostudio_timeline_SkeletonNode_changeSkins$1(lua_State *L) { olua_startinvoke(L); @@ -17070,7 +19019,7 @@ static int _cocostudio_timeline_SkeletonNode_changeSkins$1(lua_State *L) return 0; } -static int _cocostudio_timeline_SkeletonNode_changeSkins$2(lua_State *L) +static int _olua_fun_cocostudio_timeline_SkeletonNode_changeSkins$2(lua_State *L) { olua_startinvoke(L); @@ -17088,19 +19037,19 @@ static int _cocostudio_timeline_SkeletonNode_changeSkins$2(lua_State *L) return 0; } -static int _cocostudio_timeline_SkeletonNode_changeSkins(lua_State *L) +static int _olua_fun_cocostudio_timeline_SkeletonNode_changeSkins(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { if ((olua_is_map(L, 2))) { // void changeSkins(const std::map &boneSkinNameMap) - return _cocostudio_timeline_SkeletonNode_changeSkins$1(L); + return _olua_fun_cocostudio_timeline_SkeletonNode_changeSkins$1(L); } // if ((olua_is_string(L, 2))) { // void changeSkins(const std::string &skinGroupName) - return _cocostudio_timeline_SkeletonNode_changeSkins$2(L); + return _olua_fun_cocostudio_timeline_SkeletonNode_changeSkins$2(L); // } } @@ -17109,7 +19058,7 @@ static int _cocostudio_timeline_SkeletonNode_changeSkins(lua_State *L) return 0; } -static int _cocostudio_timeline_SkeletonNode_create(lua_State *L) +static int _olua_fun_cocostudio_timeline_SkeletonNode_create(lua_State *L) { olua_startinvoke(L); @@ -17122,7 +19071,7 @@ static int _cocostudio_timeline_SkeletonNode_create(lua_State *L) return num_ret; } -static int _cocostudio_timeline_SkeletonNode_getAllSubBonesMap(lua_State *L) +static int _olua_fun_cocostudio_timeline_SkeletonNode_getAllSubBonesMap(lua_State *L) { olua_startinvoke(L); @@ -17145,7 +19094,7 @@ static int _cocostudio_timeline_SkeletonNode_getAllSubBonesMap(lua_State *L) return num_ret; } -static int _cocostudio_timeline_SkeletonNode_getBoneNode(lua_State *L) +static int _olua_fun_cocostudio_timeline_SkeletonNode_getBoneNode(lua_State *L) { olua_startinvoke(L); @@ -17167,11 +19116,11 @@ static int _cocostudio_timeline_SkeletonNode_getBoneNode(lua_State *L) return num_ret; } -static int _cocostudio_timeline_SkeletonNode_new(lua_State *L) +static int _olua_fun_cocostudio_timeline_SkeletonNode_new(lua_State *L) { olua_startinvoke(L); - // SkeletonNode() + // cocostudio::timeline::SkeletonNode() cocostudio::timeline::SkeletonNode *ret = new cocostudio::timeline::SkeletonNode(); int num_ret = olua_push_object(L, ret, "ccs.timeline.SkeletonNode"); olua_postnew(L, ret); @@ -17181,23 +19130,32 @@ static int _cocostudio_timeline_SkeletonNode_new(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocostudio_timeline_SkeletonNode(lua_State *L) +static int _olua_cls_ccs_timeline_SkeletonNode(lua_State *L) { oluacls_class(L, "ccs.timeline.SkeletonNode"); - oluacls_func(L, "addSkinGroup", _cocostudio_timeline_SkeletonNode_addSkinGroup); - oluacls_func(L, "changeSkins", _cocostudio_timeline_SkeletonNode_changeSkins); - oluacls_func(L, "create", _cocostudio_timeline_SkeletonNode_create); - oluacls_func(L, "getAllSubBonesMap", _cocostudio_timeline_SkeletonNode_getAllSubBonesMap); - oluacls_func(L, "getBoneNode", _cocostudio_timeline_SkeletonNode_getBoneNode); - oluacls_func(L, "new", _cocostudio_timeline_SkeletonNode_new); - oluacls_prop(L, "allSubBonesMap", _cocostudio_timeline_SkeletonNode_getAllSubBonesMap, nullptr); + oluacls_func(L, "addSkinGroup", _olua_fun_cocostudio_timeline_SkeletonNode_addSkinGroup); + oluacls_func(L, "changeSkins", _olua_fun_cocostudio_timeline_SkeletonNode_changeSkins); + oluacls_func(L, "create", _olua_fun_cocostudio_timeline_SkeletonNode_create); + oluacls_func(L, "getAllSubBonesMap", _olua_fun_cocostudio_timeline_SkeletonNode_getAllSubBonesMap); + oluacls_func(L, "getBoneNode", _olua_fun_cocostudio_timeline_SkeletonNode_getBoneNode); + oluacls_func(L, "new", _olua_fun_cocostudio_timeline_SkeletonNode_new); + oluacls_prop(L, "allSubBonesMap", _olua_fun_cocostudio_timeline_SkeletonNode_getAllSubBonesMap, nullptr); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccs_timeline_SkeletonNode(lua_State *L) +{ + olua_require(L, "cocos2d_studio", luaopen_cocos2d_studio); + if (!olua_getclass(L, "ccs.timeline.SkeletonNode")) { + luaL_error(L, "class not found: cocostudio::timeline::SkeletonNode"); + } + return 1; +} OLUA_END_DECLS -static int _cocostudio_timeline_Timeline_addFrame(lua_State *L) +static int _olua_fun_cocostudio_timeline_Timeline_addFrame(lua_State *L) { olua_startinvoke(L); @@ -17218,7 +19176,7 @@ static int _cocostudio_timeline_Timeline_addFrame(lua_State *L) return 0; } -static int _cocostudio_timeline_Timeline_clone(lua_State *L) +static int _olua_fun_cocostudio_timeline_Timeline_clone(lua_State *L) { olua_startinvoke(L); @@ -17235,7 +19193,7 @@ static int _cocostudio_timeline_Timeline_clone(lua_State *L) return num_ret; } -static int _cocostudio_timeline_Timeline_create(lua_State *L) +static int _olua_fun_cocostudio_timeline_Timeline_create(lua_State *L) { olua_startinvoke(L); @@ -17248,7 +19206,7 @@ static int _cocostudio_timeline_Timeline_create(lua_State *L) return num_ret; } -static int _cocostudio_timeline_Timeline_getActionTag(lua_State *L) +static int _olua_fun_cocostudio_timeline_Timeline_getActionTag(lua_State *L) { olua_startinvoke(L); @@ -17265,7 +19223,7 @@ static int _cocostudio_timeline_Timeline_getActionTag(lua_State *L) return num_ret; } -static int _cocostudio_timeline_Timeline_getActionTimeline(lua_State *L) +static int _olua_fun_cocostudio_timeline_Timeline_getActionTimeline(lua_State *L) { olua_startinvoke(L); @@ -17285,7 +19243,7 @@ static int _cocostudio_timeline_Timeline_getActionTimeline(lua_State *L) return num_ret; } -static int _cocostudio_timeline_Timeline_getFrames(lua_State *L) +static int _olua_fun_cocostudio_timeline_Timeline_getFrames(lua_State *L) { olua_startinvoke(L); @@ -17307,7 +19265,7 @@ static int _cocostudio_timeline_Timeline_getFrames(lua_State *L) return num_ret; } -static int _cocostudio_timeline_Timeline_getNode(lua_State *L) +static int _olua_fun_cocostudio_timeline_Timeline_getNode(lua_State *L) { olua_startinvoke(L); @@ -17327,7 +19285,7 @@ static int _cocostudio_timeline_Timeline_getNode(lua_State *L) return num_ret; } -static int _cocostudio_timeline_Timeline_gotoFrame(lua_State *L) +static int _olua_fun_cocostudio_timeline_Timeline_gotoFrame(lua_State *L) { olua_startinvoke(L); @@ -17345,7 +19303,7 @@ static int _cocostudio_timeline_Timeline_gotoFrame(lua_State *L) return 0; } -static int _cocostudio_timeline_Timeline_insertFrame(lua_State *L) +static int _olua_fun_cocostudio_timeline_Timeline_insertFrame(lua_State *L) { olua_startinvoke(L); @@ -17368,11 +19326,11 @@ static int _cocostudio_timeline_Timeline_insertFrame(lua_State *L) return 0; } -static int _cocostudio_timeline_Timeline_new(lua_State *L) +static int _olua_fun_cocostudio_timeline_Timeline_new(lua_State *L) { olua_startinvoke(L); - // Timeline() + // cocostudio::timeline::Timeline() cocostudio::timeline::Timeline *ret = new cocostudio::timeline::Timeline(); int num_ret = olua_push_object(L, ret, "ccs.timeline.Timeline"); olua_postnew(L, ret); @@ -17382,7 +19340,7 @@ static int _cocostudio_timeline_Timeline_new(lua_State *L) return num_ret; } -static int _cocostudio_timeline_Timeline_removeFrame(lua_State *L) +static int _olua_fun_cocostudio_timeline_Timeline_removeFrame(lua_State *L) { olua_startinvoke(L); @@ -17403,7 +19361,7 @@ static int _cocostudio_timeline_Timeline_removeFrame(lua_State *L) return 0; } -static int _cocostudio_timeline_Timeline_setActionTag(lua_State *L) +static int _olua_fun_cocostudio_timeline_Timeline_setActionTag(lua_State *L) { olua_startinvoke(L); @@ -17421,7 +19379,7 @@ static int _cocostudio_timeline_Timeline_setActionTag(lua_State *L) return 0; } -static int _cocostudio_timeline_Timeline_setActionTimeline(lua_State *L) +static int _olua_fun_cocostudio_timeline_Timeline_setActionTimeline(lua_State *L) { olua_startinvoke(L); @@ -17442,7 +19400,7 @@ static int _cocostudio_timeline_Timeline_setActionTimeline(lua_State *L) return 0; } -static int _cocostudio_timeline_Timeline_setNode(lua_State *L) +static int _olua_fun_cocostudio_timeline_Timeline_setNode(lua_State *L) { olua_startinvoke(L); @@ -17463,7 +19421,7 @@ static int _cocostudio_timeline_Timeline_setNode(lua_State *L) return 0; } -static int _cocostudio_timeline_Timeline_stepToFrame(lua_State *L) +static int _olua_fun_cocostudio_timeline_Timeline_stepToFrame(lua_State *L) { olua_startinvoke(L); @@ -17481,35 +19439,44 @@ static int _cocostudio_timeline_Timeline_stepToFrame(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocostudio_timeline_Timeline(lua_State *L) +static int _olua_cls_ccs_timeline_Timeline(lua_State *L) { oluacls_class(L, "ccs.timeline.Timeline"); - oluacls_func(L, "addFrame", _cocostudio_timeline_Timeline_addFrame); - oluacls_func(L, "clone", _cocostudio_timeline_Timeline_clone); - oluacls_func(L, "create", _cocostudio_timeline_Timeline_create); - oluacls_func(L, "getActionTag", _cocostudio_timeline_Timeline_getActionTag); - oluacls_func(L, "getActionTimeline", _cocostudio_timeline_Timeline_getActionTimeline); - oluacls_func(L, "getFrames", _cocostudio_timeline_Timeline_getFrames); - oluacls_func(L, "getNode", _cocostudio_timeline_Timeline_getNode); - oluacls_func(L, "gotoFrame", _cocostudio_timeline_Timeline_gotoFrame); - oluacls_func(L, "insertFrame", _cocostudio_timeline_Timeline_insertFrame); - oluacls_func(L, "new", _cocostudio_timeline_Timeline_new); - oluacls_func(L, "removeFrame", _cocostudio_timeline_Timeline_removeFrame); - oluacls_func(L, "setActionTag", _cocostudio_timeline_Timeline_setActionTag); - oluacls_func(L, "setActionTimeline", _cocostudio_timeline_Timeline_setActionTimeline); - oluacls_func(L, "setNode", _cocostudio_timeline_Timeline_setNode); - oluacls_func(L, "stepToFrame", _cocostudio_timeline_Timeline_stepToFrame); - oluacls_prop(L, "actionTag", _cocostudio_timeline_Timeline_getActionTag, _cocostudio_timeline_Timeline_setActionTag); - oluacls_prop(L, "actionTimeline", _cocostudio_timeline_Timeline_getActionTimeline, _cocostudio_timeline_Timeline_setActionTimeline); - oluacls_prop(L, "frames", _cocostudio_timeline_Timeline_getFrames, nullptr); - oluacls_prop(L, "node", _cocostudio_timeline_Timeline_getNode, _cocostudio_timeline_Timeline_setNode); + oluacls_func(L, "addFrame", _olua_fun_cocostudio_timeline_Timeline_addFrame); + oluacls_func(L, "clone", _olua_fun_cocostudio_timeline_Timeline_clone); + oluacls_func(L, "create", _olua_fun_cocostudio_timeline_Timeline_create); + oluacls_func(L, "getActionTag", _olua_fun_cocostudio_timeline_Timeline_getActionTag); + oluacls_func(L, "getActionTimeline", _olua_fun_cocostudio_timeline_Timeline_getActionTimeline); + oluacls_func(L, "getFrames", _olua_fun_cocostudio_timeline_Timeline_getFrames); + oluacls_func(L, "getNode", _olua_fun_cocostudio_timeline_Timeline_getNode); + oluacls_func(L, "gotoFrame", _olua_fun_cocostudio_timeline_Timeline_gotoFrame); + oluacls_func(L, "insertFrame", _olua_fun_cocostudio_timeline_Timeline_insertFrame); + oluacls_func(L, "new", _olua_fun_cocostudio_timeline_Timeline_new); + oluacls_func(L, "removeFrame", _olua_fun_cocostudio_timeline_Timeline_removeFrame); + oluacls_func(L, "setActionTag", _olua_fun_cocostudio_timeline_Timeline_setActionTag); + oluacls_func(L, "setActionTimeline", _olua_fun_cocostudio_timeline_Timeline_setActionTimeline); + oluacls_func(L, "setNode", _olua_fun_cocostudio_timeline_Timeline_setNode); + oluacls_func(L, "stepToFrame", _olua_fun_cocostudio_timeline_Timeline_stepToFrame); + oluacls_prop(L, "actionTag", _olua_fun_cocostudio_timeline_Timeline_getActionTag, _olua_fun_cocostudio_timeline_Timeline_setActionTag); + oluacls_prop(L, "actionTimeline", _olua_fun_cocostudio_timeline_Timeline_getActionTimeline, _olua_fun_cocostudio_timeline_Timeline_setActionTimeline); + oluacls_prop(L, "frames", _olua_fun_cocostudio_timeline_Timeline_getFrames, nullptr); + oluacls_prop(L, "node", _olua_fun_cocostudio_timeline_Timeline_getNode, _olua_fun_cocostudio_timeline_Timeline_setNode); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccs_timeline_Timeline(lua_State *L) +{ + olua_require(L, "cocos2d_studio", luaopen_cocos2d_studio); + if (!olua_getclass(L, "ccs.timeline.Timeline")) { + luaL_error(L, "class not found: cocostudio::timeline::Timeline"); + } return 1; } OLUA_END_DECLS -static int _cocostudio_timeline_ActionTimeline_IsAnimationInfoExists(lua_State *L) +static int _olua_fun_cocostudio_timeline_ActionTimeline_IsAnimationInfoExists(lua_State *L) { olua_startinvoke(L); @@ -17528,12 +19495,12 @@ static int _cocostudio_timeline_ActionTimeline_IsAnimationInfoExists(lua_State * return num_ret; } -static int _cocostudio_timeline_ActionTimeline_addAnimationInfo(lua_State *L) +static int _olua_fun_cocostudio_timeline_ActionTimeline_addAnimationInfo(lua_State *L) { olua_startinvoke(L); cocostudio::timeline::ActionTimeline *self = nullptr; - cocostudio::timeline::AnimationInfo arg1; /** animationInfo */ + cocostudio::timeline::AnimationInfo *arg1; /** animationInfo */ olua_to_object(L, 1, &self, "ccs.timeline.ActionTimeline"); olua_check_object(L, 2, &arg1, "ccs.timeline.AnimationInfo"); @@ -17559,14 +19526,14 @@ static int _cocostudio_timeline_ActionTimeline_addAnimationInfo(lua_State *L) } // void addAnimationInfo(const cocostudio::timeline::AnimationInfo &animationInfo) - self->addAnimationInfo(arg1); + self->addAnimationInfo(*arg1); olua_endinvoke(L); return 0; } -static int _cocostudio_timeline_ActionTimeline_addFrameEndCallFunc(lua_State *L) +static int _olua_fun_cocostudio_timeline_ActionTimeline_addFrameEndCallFunc(lua_State *L) { olua_startinvoke(L); @@ -17582,9 +19549,10 @@ static int _cocostudio_timeline_ActionTimeline_addFrameEndCallFunc(lua_State *L) void *cb_store = (void *)self; std::string cb_tag = makeFrameEndCallbackTag(arg1, arg2); - std::string cb_name = olua_setcallback(L, cb_store, 4, cb_tag.c_str(), OLUA_TAG_REPLACE); + std::string cb_name = olua_setcallback(L, cb_store, 4, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg3 = [cb_store, cb_name, cb_ctx]() { + // lua_State *ML = olua_mainthread(L); + arg3 = [cb_store, cb_name, cb_ctx /*, ML */]() { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); @@ -17597,7 +19565,7 @@ static int _cocostudio_timeline_ActionTimeline_addFrameEndCallFunc(lua_State *L) } }; - // void addFrameEndCallFunc(int frameIndex, const std::string &funcKey, @localvar std::function func) + // void addFrameEndCallFunc(int frameIndex, const std::string &funcKey, std::function func) self->addFrameEndCallFunc(arg1, arg2, arg3); olua_endinvoke(L); @@ -17605,7 +19573,7 @@ static int _cocostudio_timeline_ActionTimeline_addFrameEndCallFunc(lua_State *L) return 0; } -static int _cocostudio_timeline_ActionTimeline_addTimeline(lua_State *L) +static int _olua_fun_cocostudio_timeline_ActionTimeline_addTimeline(lua_State *L) { olua_startinvoke(L); @@ -17626,7 +19594,7 @@ static int _cocostudio_timeline_ActionTimeline_addTimeline(lua_State *L) return 0; } -static int _cocostudio_timeline_ActionTimeline_as(lua_State *L) +static int _olua_fun_cocostudio_timeline_ActionTimeline_as(lua_State *L) { olua_startinvoke(L); @@ -17658,7 +19626,7 @@ static int _cocostudio_timeline_ActionTimeline_as(lua_State *L) return 1; } -static int _cocostudio_timeline_ActionTimeline_clearFrameEndCallFuncs(lua_State *L) +static int _olua_fun_cocostudio_timeline_ActionTimeline_clearFrameEndCallFuncs(lua_State *L) { olua_startinvoke(L); @@ -17678,7 +19646,7 @@ static int _cocostudio_timeline_ActionTimeline_clearFrameEndCallFuncs(lua_State return 0; } -static int _cocostudio_timeline_ActionTimeline_clearFrameEventCallFunc(lua_State *L) +static int _olua_fun_cocostudio_timeline_ActionTimeline_clearFrameEventCallFunc(lua_State *L) { olua_startinvoke(L); @@ -17698,7 +19666,7 @@ static int _cocostudio_timeline_ActionTimeline_clearFrameEventCallFunc(lua_State return 0; } -static int _cocostudio_timeline_ActionTimeline_clearLastFrameCallFunc(lua_State *L) +static int _olua_fun_cocostudio_timeline_ActionTimeline_clearLastFrameCallFunc(lua_State *L) { olua_startinvoke(L); @@ -17718,24 +19686,7 @@ static int _cocostudio_timeline_ActionTimeline_clearLastFrameCallFunc(lua_State return 0; } -static int _cocostudio_timeline_ActionTimeline_clone(lua_State *L) -{ - olua_startinvoke(L); - - cocostudio::timeline::ActionTimeline *self = nullptr; - - olua_to_object(L, 1, &self, "ccs.timeline.ActionTimeline"); - - // cocostudio::timeline::ActionTimeline *clone() - cocostudio::timeline::ActionTimeline *ret = self->clone(); - int num_ret = olua_push_object(L, ret, "ccs.timeline.ActionTimeline"); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocostudio_timeline_ActionTimeline_create(lua_State *L) +static int _olua_fun_cocostudio_timeline_ActionTimeline_create(lua_State *L) { olua_startinvoke(L); @@ -17748,7 +19699,7 @@ static int _cocostudio_timeline_ActionTimeline_create(lua_State *L) return num_ret; } -static int _cocostudio_timeline_ActionTimeline_getAnimationInfo(lua_State *L) +static int _olua_fun_cocostudio_timeline_ActionTimeline_getAnimationInfo(lua_State *L) { olua_startinvoke(L); @@ -17767,7 +19718,7 @@ static int _cocostudio_timeline_ActionTimeline_getAnimationInfo(lua_State *L) return num_ret; } -static int _cocostudio_timeline_ActionTimeline_getCurrentFrame(lua_State *L) +static int _olua_fun_cocostudio_timeline_ActionTimeline_getCurrentFrame(lua_State *L) { olua_startinvoke(L); @@ -17784,7 +19735,7 @@ static int _cocostudio_timeline_ActionTimeline_getCurrentFrame(lua_State *L) return num_ret; } -static int _cocostudio_timeline_ActionTimeline_getDuration(lua_State *L) +static int _olua_fun_cocostudio_timeline_ActionTimeline_getDuration(lua_State *L) { olua_startinvoke(L); @@ -17801,7 +19752,7 @@ static int _cocostudio_timeline_ActionTimeline_getDuration(lua_State *L) return num_ret; } -static int _cocostudio_timeline_ActionTimeline_getEndFrame(lua_State *L) +static int _olua_fun_cocostudio_timeline_ActionTimeline_getEndFrame(lua_State *L) { olua_startinvoke(L); @@ -17818,7 +19769,7 @@ static int _cocostudio_timeline_ActionTimeline_getEndFrame(lua_State *L) return num_ret; } -static int _cocostudio_timeline_ActionTimeline_getStartFrame(lua_State *L) +static int _olua_fun_cocostudio_timeline_ActionTimeline_getStartFrame(lua_State *L) { olua_startinvoke(L); @@ -17835,7 +19786,7 @@ static int _cocostudio_timeline_ActionTimeline_getStartFrame(lua_State *L) return num_ret; } -static int _cocostudio_timeline_ActionTimeline_getTimeSpeed(lua_State *L) +static int _olua_fun_cocostudio_timeline_ActionTimeline_getTimeSpeed(lua_State *L) { olua_startinvoke(L); @@ -17852,7 +19803,7 @@ static int _cocostudio_timeline_ActionTimeline_getTimeSpeed(lua_State *L) return num_ret; } -static int _cocostudio_timeline_ActionTimeline_getTimelines(lua_State *L) +static int _olua_fun_cocostudio_timeline_ActionTimeline_getTimelines(lua_State *L) { olua_startinvoke(L); @@ -17874,7 +19825,7 @@ static int _cocostudio_timeline_ActionTimeline_getTimelines(lua_State *L) return num_ret; } -static int _cocostudio_timeline_ActionTimeline_gotoFrameAndPause(lua_State *L) +static int _olua_fun_cocostudio_timeline_ActionTimeline_gotoFrameAndPause(lua_State *L) { olua_startinvoke(L); @@ -17892,7 +19843,7 @@ static int _cocostudio_timeline_ActionTimeline_gotoFrameAndPause(lua_State *L) return 0; } -static int _cocostudio_timeline_ActionTimeline_gotoFrameAndPlay$1(lua_State *L) +static int _olua_fun_cocostudio_timeline_ActionTimeline_gotoFrameAndPlay$1(lua_State *L) { olua_startinvoke(L); @@ -17910,7 +19861,7 @@ static int _cocostudio_timeline_ActionTimeline_gotoFrameAndPlay$1(lua_State *L) return 0; } -static int _cocostudio_timeline_ActionTimeline_gotoFrameAndPlay$2(lua_State *L) +static int _olua_fun_cocostudio_timeline_ActionTimeline_gotoFrameAndPlay$2(lua_State *L) { olua_startinvoke(L); @@ -17930,7 +19881,7 @@ static int _cocostudio_timeline_ActionTimeline_gotoFrameAndPlay$2(lua_State *L) return 0; } -static int _cocostudio_timeline_ActionTimeline_gotoFrameAndPlay$3(lua_State *L) +static int _olua_fun_cocostudio_timeline_ActionTimeline_gotoFrameAndPlay$3(lua_State *L) { olua_startinvoke(L); @@ -17952,7 +19903,7 @@ static int _cocostudio_timeline_ActionTimeline_gotoFrameAndPlay$3(lua_State *L) return 0; } -static int _cocostudio_timeline_ActionTimeline_gotoFrameAndPlay$4(lua_State *L) +static int _olua_fun_cocostudio_timeline_ActionTimeline_gotoFrameAndPlay$4(lua_State *L) { olua_startinvoke(L); @@ -17976,35 +19927,35 @@ static int _cocostudio_timeline_ActionTimeline_gotoFrameAndPlay$4(lua_State *L) return 0; } -static int _cocostudio_timeline_ActionTimeline_gotoFrameAndPlay(lua_State *L) +static int _olua_fun_cocostudio_timeline_ActionTimeline_gotoFrameAndPlay(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_integer(L, 2))) { // void gotoFrameAndPlay(int startIndex) - return _cocostudio_timeline_ActionTimeline_gotoFrameAndPlay$1(L); + return _olua_fun_cocostudio_timeline_ActionTimeline_gotoFrameAndPlay$1(L); // } } if (num_args == 2) { // if ((olua_is_integer(L, 2)) && (olua_is_bool(L, 3))) { // void gotoFrameAndPlay(int startIndex, bool loop) - return _cocostudio_timeline_ActionTimeline_gotoFrameAndPlay$2(L); + return _olua_fun_cocostudio_timeline_ActionTimeline_gotoFrameAndPlay$2(L); // } } if (num_args == 3) { // if ((olua_is_integer(L, 2)) && (olua_is_integer(L, 3)) && (olua_is_bool(L, 4))) { // void gotoFrameAndPlay(int startIndex, int endIndex, bool loop) - return _cocostudio_timeline_ActionTimeline_gotoFrameAndPlay$3(L); + return _olua_fun_cocostudio_timeline_ActionTimeline_gotoFrameAndPlay$3(L); // } } if (num_args == 4) { // if ((olua_is_integer(L, 2)) && (olua_is_integer(L, 3)) && (olua_is_integer(L, 4)) && (olua_is_bool(L, 5))) { // void gotoFrameAndPlay(int startIndex, int endIndex, int currentFrameIndex, bool loop) - return _cocostudio_timeline_ActionTimeline_gotoFrameAndPlay$4(L); + return _olua_fun_cocostudio_timeline_ActionTimeline_gotoFrameAndPlay$4(L); // } } @@ -18013,7 +19964,7 @@ static int _cocostudio_timeline_ActionTimeline_gotoFrameAndPlay(lua_State *L) return 0; } -static int _cocostudio_timeline_ActionTimeline_isPlaying(lua_State *L) +static int _olua_fun_cocostudio_timeline_ActionTimeline_isPlaying(lua_State *L) { olua_startinvoke(L); @@ -18030,11 +19981,11 @@ static int _cocostudio_timeline_ActionTimeline_isPlaying(lua_State *L) return num_ret; } -static int _cocostudio_timeline_ActionTimeline_new(lua_State *L) +static int _olua_fun_cocostudio_timeline_ActionTimeline_new(lua_State *L) { olua_startinvoke(L); - // ActionTimeline() + // cocostudio::timeline::ActionTimeline() cocostudio::timeline::ActionTimeline *ret = new cocostudio::timeline::ActionTimeline(); int num_ret = olua_push_object(L, ret, "ccs.timeline.ActionTimeline"); olua_postnew(L, ret); @@ -18044,7 +19995,7 @@ static int _cocostudio_timeline_ActionTimeline_new(lua_State *L) return num_ret; } -static int _cocostudio_timeline_ActionTimeline_pause(lua_State *L) +static int _olua_fun_cocostudio_timeline_ActionTimeline_pause(lua_State *L) { olua_startinvoke(L); @@ -18060,7 +20011,7 @@ static int _cocostudio_timeline_ActionTimeline_pause(lua_State *L) return 0; } -static int _cocostudio_timeline_ActionTimeline_play(lua_State *L) +static int _olua_fun_cocostudio_timeline_ActionTimeline_play(lua_State *L) { olua_startinvoke(L); @@ -18080,7 +20031,7 @@ static int _cocostudio_timeline_ActionTimeline_play(lua_State *L) return 0; } -static int _cocostudio_timeline_ActionTimeline_removeAnimationInfo(lua_State *L) +static int _olua_fun_cocostudio_timeline_ActionTimeline_removeAnimationInfo(lua_State *L) { olua_startinvoke(L); @@ -18104,7 +20055,7 @@ static int _cocostudio_timeline_ActionTimeline_removeAnimationInfo(lua_State *L) return 0; } -static int _cocostudio_timeline_ActionTimeline_removeFrameEndCallFunc(lua_State *L) +static int _olua_fun_cocostudio_timeline_ActionTimeline_removeFrameEndCallFunc(lua_State *L) { olua_startinvoke(L); @@ -18128,7 +20079,7 @@ static int _cocostudio_timeline_ActionTimeline_removeFrameEndCallFunc(lua_State return 0; } -static int _cocostudio_timeline_ActionTimeline_removeFrameEndCallFuncs(lua_State *L) +static int _olua_fun_cocostudio_timeline_ActionTimeline_removeFrameEndCallFuncs(lua_State *L) { olua_startinvoke(L); @@ -18150,7 +20101,7 @@ static int _cocostudio_timeline_ActionTimeline_removeFrameEndCallFuncs(lua_State return 0; } -static int _cocostudio_timeline_ActionTimeline_removeTimeline(lua_State *L) +static int _olua_fun_cocostudio_timeline_ActionTimeline_removeTimeline(lua_State *L) { olua_startinvoke(L); @@ -18171,7 +20122,7 @@ static int _cocostudio_timeline_ActionTimeline_removeTimeline(lua_State *L) return 0; } -static int _cocostudio_timeline_ActionTimeline_resume(lua_State *L) +static int _olua_fun_cocostudio_timeline_ActionTimeline_resume(lua_State *L) { olua_startinvoke(L); @@ -18187,24 +20138,7 @@ static int _cocostudio_timeline_ActionTimeline_resume(lua_State *L) return 0; } -static int _cocostudio_timeline_ActionTimeline_reverse(lua_State *L) -{ - olua_startinvoke(L); - - cocostudio::timeline::ActionTimeline *self = nullptr; - - olua_to_object(L, 1, &self, "ccs.timeline.ActionTimeline"); - - // cocostudio::timeline::ActionTimeline *reverse() - cocostudio::timeline::ActionTimeline *ret = self->reverse(); - int num_ret = olua_push_object(L, ret, "ccs.timeline.ActionTimeline"); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocostudio_timeline_ActionTimeline_setAnimationEndCallFunc(lua_State *L) +static int _olua_fun_cocostudio_timeline_ActionTimeline_setAnimationEndCallFunc(lua_State *L) { olua_startinvoke(L); @@ -18218,9 +20152,10 @@ static int _cocostudio_timeline_ActionTimeline_setAnimationEndCallFunc(lua_State void *cb_store = (void *)self; std::string cb_tag = makeFrameEndCallbackTag(self, arg1); - std::string cb_name = olua_setcallback(L, cb_store, 3, cb_tag.c_str(), OLUA_TAG_REPLACE); + std::string cb_name = olua_setcallback(L, cb_store, 3, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg2 = [cb_store, cb_name, cb_ctx]() { + // lua_State *ML = olua_mainthread(L); + arg2 = [cb_store, cb_name, cb_ctx /*, ML */]() { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); @@ -18233,7 +20168,7 @@ static int _cocostudio_timeline_ActionTimeline_setAnimationEndCallFunc(lua_State } }; - // void setAnimationEndCallFunc(const std::string animationName, @localvar std::function func) + // void setAnimationEndCallFunc(const std::string animationName, std::function func) self->setAnimationEndCallFunc(arg1, arg2); olua_endinvoke(L); @@ -18241,7 +20176,7 @@ static int _cocostudio_timeline_ActionTimeline_setAnimationEndCallFunc(lua_State return 0; } -static int _cocostudio_timeline_ActionTimeline_setCurrentFrame(lua_State *L) +static int _olua_fun_cocostudio_timeline_ActionTimeline_setCurrentFrame(lua_State *L) { olua_startinvoke(L); @@ -18259,7 +20194,7 @@ static int _cocostudio_timeline_ActionTimeline_setCurrentFrame(lua_State *L) return 0; } -static int _cocostudio_timeline_ActionTimeline_setDuration(lua_State *L) +static int _olua_fun_cocostudio_timeline_ActionTimeline_setDuration(lua_State *L) { olua_startinvoke(L); @@ -18277,7 +20212,7 @@ static int _cocostudio_timeline_ActionTimeline_setDuration(lua_State *L) return 0; } -static int _cocostudio_timeline_ActionTimeline_setFrameEventCallFunc(lua_State *L) +static int _olua_fun_cocostudio_timeline_ActionTimeline_setFrameEventCallFunc(lua_State *L) { olua_startinvoke(L); @@ -18293,9 +20228,10 @@ static int _cocostudio_timeline_ActionTimeline_setFrameEventCallFunc(lua_State * std::string cb_tag = "frameEventCallFunc"; std::string cb_name; if (olua_isfunction(L, 2)) { - cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](cocostudio::timeline::Frame *arg1) { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](cocostudio::timeline::Frame *cb_arg1) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); @@ -18303,7 +20239,7 @@ static int _cocostudio_timeline_ActionTimeline_setFrameEventCallFunc(lua_State * int top = lua_gettop(L); size_t last = olua_push_objpool(L); olua_enable_objpool(L); - olua_push_object(L, arg1, "ccs.timeline.Frame"); + olua_push_object(L, cb_arg1, "ccs.timeline.Frame"); olua_disable_objpool(L); // insert code before call @@ -18328,7 +20264,7 @@ static int _cocostudio_timeline_ActionTimeline_setFrameEventCallFunc(lua_State * arg1 = nullptr; } - // void setFrameEventCallFunc(@localvar @nullable std::function listener) + // void setFrameEventCallFunc(@nullable std::function listener) self->setFrameEventCallFunc(arg1); olua_endinvoke(L); @@ -18336,7 +20272,7 @@ static int _cocostudio_timeline_ActionTimeline_setFrameEventCallFunc(lua_State * return 0; } -static int _cocostudio_timeline_ActionTimeline_setLastFrameCallFunc(lua_State *L) +static int _olua_fun_cocostudio_timeline_ActionTimeline_setLastFrameCallFunc(lua_State *L) { olua_startinvoke(L); @@ -18352,9 +20288,10 @@ static int _cocostudio_timeline_ActionTimeline_setLastFrameCallFunc(lua_State *L std::string cb_tag = "lastFrameCallFunc"; std::string cb_name; if (olua_isfunction(L, 2)) { - cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx]() { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */]() { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); @@ -18371,7 +20308,7 @@ static int _cocostudio_timeline_ActionTimeline_setLastFrameCallFunc(lua_State *L arg1 = nullptr; } - // void setLastFrameCallFunc(@localvar @nullable std::function listener) + // void setLastFrameCallFunc(@nullable std::function listener) self->setLastFrameCallFunc(arg1); olua_endinvoke(L); @@ -18379,7 +20316,7 @@ static int _cocostudio_timeline_ActionTimeline_setLastFrameCallFunc(lua_State *L return 0; } -static int _cocostudio_timeline_ActionTimeline_setTimeSpeed(lua_State *L) +static int _olua_fun_cocostudio_timeline_ActionTimeline_setTimeSpeed(lua_State *L) { olua_startinvoke(L); @@ -18397,7 +20334,7 @@ static int _cocostudio_timeline_ActionTimeline_setTimeSpeed(lua_State *L) return 0; } -static int _cocostudio_timeline_ActionTimeline_start(lua_State *L) +static int _olua_fun_cocostudio_timeline_ActionTimeline_start(lua_State *L) { olua_startinvoke(L); @@ -18413,54 +20350,61 @@ static int _cocostudio_timeline_ActionTimeline_start(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocostudio_timeline_ActionTimeline(lua_State *L) +static int _olua_cls_ccs_timeline_ActionTimeline(lua_State *L) { oluacls_class(L, "ccs.timeline.ActionTimeline"); - oluacls_func(L, "IsAnimationInfoExists", _cocostudio_timeline_ActionTimeline_IsAnimationInfoExists); - oluacls_func(L, "addAnimationInfo", _cocostudio_timeline_ActionTimeline_addAnimationInfo); - oluacls_func(L, "addFrameEndCallFunc", _cocostudio_timeline_ActionTimeline_addFrameEndCallFunc); - oluacls_func(L, "addTimeline", _cocostudio_timeline_ActionTimeline_addTimeline); - oluacls_func(L, "as", _cocostudio_timeline_ActionTimeline_as); - oluacls_func(L, "clearFrameEndCallFuncs", _cocostudio_timeline_ActionTimeline_clearFrameEndCallFuncs); - oluacls_func(L, "clearFrameEventCallFunc", _cocostudio_timeline_ActionTimeline_clearFrameEventCallFunc); - oluacls_func(L, "clearLastFrameCallFunc", _cocostudio_timeline_ActionTimeline_clearLastFrameCallFunc); - oluacls_func(L, "clone", _cocostudio_timeline_ActionTimeline_clone); - oluacls_func(L, "create", _cocostudio_timeline_ActionTimeline_create); - oluacls_func(L, "getAnimationInfo", _cocostudio_timeline_ActionTimeline_getAnimationInfo); - oluacls_func(L, "getCurrentFrame", _cocostudio_timeline_ActionTimeline_getCurrentFrame); - oluacls_func(L, "getDuration", _cocostudio_timeline_ActionTimeline_getDuration); - oluacls_func(L, "getEndFrame", _cocostudio_timeline_ActionTimeline_getEndFrame); - oluacls_func(L, "getStartFrame", _cocostudio_timeline_ActionTimeline_getStartFrame); - oluacls_func(L, "getTimeSpeed", _cocostudio_timeline_ActionTimeline_getTimeSpeed); - oluacls_func(L, "getTimelines", _cocostudio_timeline_ActionTimeline_getTimelines); - oluacls_func(L, "gotoFrameAndPause", _cocostudio_timeline_ActionTimeline_gotoFrameAndPause); - oluacls_func(L, "gotoFrameAndPlay", _cocostudio_timeline_ActionTimeline_gotoFrameAndPlay); - oluacls_func(L, "isPlaying", _cocostudio_timeline_ActionTimeline_isPlaying); - oluacls_func(L, "new", _cocostudio_timeline_ActionTimeline_new); - oluacls_func(L, "pause", _cocostudio_timeline_ActionTimeline_pause); - oluacls_func(L, "play", _cocostudio_timeline_ActionTimeline_play); - oluacls_func(L, "removeAnimationInfo", _cocostudio_timeline_ActionTimeline_removeAnimationInfo); - oluacls_func(L, "removeFrameEndCallFunc", _cocostudio_timeline_ActionTimeline_removeFrameEndCallFunc); - oluacls_func(L, "removeFrameEndCallFuncs", _cocostudio_timeline_ActionTimeline_removeFrameEndCallFuncs); - oluacls_func(L, "removeTimeline", _cocostudio_timeline_ActionTimeline_removeTimeline); - oluacls_func(L, "resume", _cocostudio_timeline_ActionTimeline_resume); - oluacls_func(L, "reverse", _cocostudio_timeline_ActionTimeline_reverse); - oluacls_func(L, "setAnimationEndCallFunc", _cocostudio_timeline_ActionTimeline_setAnimationEndCallFunc); - oluacls_func(L, "setCurrentFrame", _cocostudio_timeline_ActionTimeline_setCurrentFrame); - oluacls_func(L, "setDuration", _cocostudio_timeline_ActionTimeline_setDuration); - oluacls_func(L, "setFrameEventCallFunc", _cocostudio_timeline_ActionTimeline_setFrameEventCallFunc); - oluacls_func(L, "setLastFrameCallFunc", _cocostudio_timeline_ActionTimeline_setLastFrameCallFunc); - oluacls_func(L, "setTimeSpeed", _cocostudio_timeline_ActionTimeline_setTimeSpeed); - oluacls_func(L, "start", _cocostudio_timeline_ActionTimeline_start); - oluacls_prop(L, "currentFrame", _cocostudio_timeline_ActionTimeline_getCurrentFrame, _cocostudio_timeline_ActionTimeline_setCurrentFrame); - oluacls_prop(L, "duration", _cocostudio_timeline_ActionTimeline_getDuration, _cocostudio_timeline_ActionTimeline_setDuration); - oluacls_prop(L, "endFrame", _cocostudio_timeline_ActionTimeline_getEndFrame, nullptr); - oluacls_prop(L, "playing", _cocostudio_timeline_ActionTimeline_isPlaying, nullptr); - oluacls_prop(L, "startFrame", _cocostudio_timeline_ActionTimeline_getStartFrame, nullptr); - oluacls_prop(L, "timeSpeed", _cocostudio_timeline_ActionTimeline_getTimeSpeed, _cocostudio_timeline_ActionTimeline_setTimeSpeed); - oluacls_prop(L, "timelines", _cocostudio_timeline_ActionTimeline_getTimelines, nullptr); + oluacls_func(L, "IsAnimationInfoExists", _olua_fun_cocostudio_timeline_ActionTimeline_IsAnimationInfoExists); + oluacls_func(L, "addAnimationInfo", _olua_fun_cocostudio_timeline_ActionTimeline_addAnimationInfo); + oluacls_func(L, "addFrameEndCallFunc", _olua_fun_cocostudio_timeline_ActionTimeline_addFrameEndCallFunc); + oluacls_func(L, "addTimeline", _olua_fun_cocostudio_timeline_ActionTimeline_addTimeline); + oluacls_func(L, "as", _olua_fun_cocostudio_timeline_ActionTimeline_as); + oluacls_func(L, "clearFrameEndCallFuncs", _olua_fun_cocostudio_timeline_ActionTimeline_clearFrameEndCallFuncs); + oluacls_func(L, "clearFrameEventCallFunc", _olua_fun_cocostudio_timeline_ActionTimeline_clearFrameEventCallFunc); + oluacls_func(L, "clearLastFrameCallFunc", _olua_fun_cocostudio_timeline_ActionTimeline_clearLastFrameCallFunc); + oluacls_func(L, "create", _olua_fun_cocostudio_timeline_ActionTimeline_create); + oluacls_func(L, "getAnimationInfo", _olua_fun_cocostudio_timeline_ActionTimeline_getAnimationInfo); + oluacls_func(L, "getCurrentFrame", _olua_fun_cocostudio_timeline_ActionTimeline_getCurrentFrame); + oluacls_func(L, "getDuration", _olua_fun_cocostudio_timeline_ActionTimeline_getDuration); + oluacls_func(L, "getEndFrame", _olua_fun_cocostudio_timeline_ActionTimeline_getEndFrame); + oluacls_func(L, "getStartFrame", _olua_fun_cocostudio_timeline_ActionTimeline_getStartFrame); + oluacls_func(L, "getTimeSpeed", _olua_fun_cocostudio_timeline_ActionTimeline_getTimeSpeed); + oluacls_func(L, "getTimelines", _olua_fun_cocostudio_timeline_ActionTimeline_getTimelines); + oluacls_func(L, "gotoFrameAndPause", _olua_fun_cocostudio_timeline_ActionTimeline_gotoFrameAndPause); + oluacls_func(L, "gotoFrameAndPlay", _olua_fun_cocostudio_timeline_ActionTimeline_gotoFrameAndPlay); + oluacls_func(L, "isPlaying", _olua_fun_cocostudio_timeline_ActionTimeline_isPlaying); + oluacls_func(L, "new", _olua_fun_cocostudio_timeline_ActionTimeline_new); + oluacls_func(L, "pause", _olua_fun_cocostudio_timeline_ActionTimeline_pause); + oluacls_func(L, "play", _olua_fun_cocostudio_timeline_ActionTimeline_play); + oluacls_func(L, "removeAnimationInfo", _olua_fun_cocostudio_timeline_ActionTimeline_removeAnimationInfo); + oluacls_func(L, "removeFrameEndCallFunc", _olua_fun_cocostudio_timeline_ActionTimeline_removeFrameEndCallFunc); + oluacls_func(L, "removeFrameEndCallFuncs", _olua_fun_cocostudio_timeline_ActionTimeline_removeFrameEndCallFuncs); + oluacls_func(L, "removeTimeline", _olua_fun_cocostudio_timeline_ActionTimeline_removeTimeline); + oluacls_func(L, "resume", _olua_fun_cocostudio_timeline_ActionTimeline_resume); + oluacls_func(L, "setAnimationEndCallFunc", _olua_fun_cocostudio_timeline_ActionTimeline_setAnimationEndCallFunc); + oluacls_func(L, "setCurrentFrame", _olua_fun_cocostudio_timeline_ActionTimeline_setCurrentFrame); + oluacls_func(L, "setDuration", _olua_fun_cocostudio_timeline_ActionTimeline_setDuration); + oluacls_func(L, "setFrameEventCallFunc", _olua_fun_cocostudio_timeline_ActionTimeline_setFrameEventCallFunc); + oluacls_func(L, "setLastFrameCallFunc", _olua_fun_cocostudio_timeline_ActionTimeline_setLastFrameCallFunc); + oluacls_func(L, "setTimeSpeed", _olua_fun_cocostudio_timeline_ActionTimeline_setTimeSpeed); + oluacls_func(L, "start", _olua_fun_cocostudio_timeline_ActionTimeline_start); + oluacls_prop(L, "currentFrame", _olua_fun_cocostudio_timeline_ActionTimeline_getCurrentFrame, _olua_fun_cocostudio_timeline_ActionTimeline_setCurrentFrame); + oluacls_prop(L, "duration", _olua_fun_cocostudio_timeline_ActionTimeline_getDuration, _olua_fun_cocostudio_timeline_ActionTimeline_setDuration); + oluacls_prop(L, "endFrame", _olua_fun_cocostudio_timeline_ActionTimeline_getEndFrame, nullptr); + oluacls_prop(L, "playing", _olua_fun_cocostudio_timeline_ActionTimeline_isPlaying, nullptr); + oluacls_prop(L, "startFrame", _olua_fun_cocostudio_timeline_ActionTimeline_getStartFrame, nullptr); + oluacls_prop(L, "timeSpeed", _olua_fun_cocostudio_timeline_ActionTimeline_getTimeSpeed, _olua_fun_cocostudio_timeline_ActionTimeline_setTimeSpeed); + oluacls_prop(L, "timelines", _olua_fun_cocostudio_timeline_ActionTimeline_getTimelines, nullptr); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccs_timeline_ActionTimeline(lua_State *L) +{ + olua_require(L, "cocos2d_studio", luaopen_cocos2d_studio); + if (!olua_getclass(L, "ccs.timeline.ActionTimeline")) { + luaL_error(L, "class not found: cocostudio::timeline::ActionTimeline"); + } return 1; } OLUA_END_DECLS @@ -18468,85 +20412,85 @@ OLUA_END_DECLS OLUA_BEGIN_DECLS OLUA_LIB int luaopen_cocos2d_studio(lua_State *L) { - olua_require(L, "ccs.timeline.AnimationInfo", luaopen_cocostudio_timeline_AnimationInfo); - olua_require(L, "cc.CSLoader", luaopen_cocos2d_CSLoader); - olua_require(L, "ccs.MovementEventType", luaopen_cocostudio_MovementEventType); - olua_require(L, "ccs.DisplayType", luaopen_cocostudio_DisplayType); - olua_require(L, "ccs.ActionFrame", luaopen_cocostudio_ActionFrame); - olua_require(L, "ccs.ActionFadeFrame", luaopen_cocostudio_ActionFadeFrame); - olua_require(L, "ccs.ActionFrameEasing", luaopen_cocostudio_ActionFrameEasing); - olua_require(L, "ccs.ActionMoveFrame", luaopen_cocostudio_ActionMoveFrame); - olua_require(L, "ccs.ActionRotationFrame", luaopen_cocostudio_ActionRotationFrame); - olua_require(L, "ccs.ActionScaleFrame", luaopen_cocostudio_ActionScaleFrame); - olua_require(L, "ccs.ActionTintFrame", luaopen_cocostudio_ActionTintFrame); - olua_require(L, "ccs.AnimationData", luaopen_cocostudio_AnimationData); - olua_require(L, "ccs.Armature", luaopen_cocostudio_Armature); - olua_require(L, "ccs.ProcessBase", luaopen_cocostudio_ProcessBase); - olua_require(L, "ccs.ActionManagerEx", luaopen_cocostudio_ActionManagerEx); - olua_require(L, "ccs.ActionNode", luaopen_cocostudio_ActionNode); - olua_require(L, "ccs.ActionObject", luaopen_cocostudio_ActionObject); - olua_require(L, "ccs.ArmatureAnimation", luaopen_cocostudio_ArmatureAnimation); - olua_require(L, "ccs.ArmatureData", luaopen_cocostudio_ArmatureData); - olua_require(L, "ccs.ArmatureDataManager", luaopen_cocostudio_ArmatureDataManager); - olua_require(L, "ccs.DisplayData", luaopen_cocostudio_DisplayData); - olua_require(L, "ccs.ArmatureDisplayData", luaopen_cocostudio_ArmatureDisplayData); - olua_require(L, "ccs.ArmatureMovementDispatcher", luaopen_cocostudio_ArmatureMovementDispatcher); - olua_require(L, "ccs.BaseData", luaopen_cocostudio_BaseData); - olua_require(L, "ccs.BaseTriggerAction", luaopen_cocostudio_BaseTriggerAction); - olua_require(L, "ccs.BaseTriggerCondition", luaopen_cocostudio_BaseTriggerCondition); - olua_require(L, "ccs.BatchNode", luaopen_cocostudio_BatchNode); - olua_require(L, "ccs.Bone", luaopen_cocostudio_Bone); - olua_require(L, "ccs.BoneData", luaopen_cocostudio_BoneData); - olua_require(L, "ccs.CocoLoader", luaopen_cocostudio_CocoLoader); - olua_require(L, "ccs.ColliderBody", luaopen_cocostudio_ColliderBody); - olua_require(L, "ccs.ColliderDetector", luaopen_cocostudio_ColliderDetector); - olua_require(L, "ccs.ColliderFilter", luaopen_cocostudio_ColliderFilter); - olua_require(L, "ccs.ComAttribute", luaopen_cocostudio_ComAttribute); - olua_require(L, "ccs.ComAudio", luaopen_cocostudio_ComAudio); - olua_require(L, "ccs.ComController", luaopen_cocostudio_ComController); - olua_require(L, "ccs.ComRender", luaopen_cocostudio_ComRender); - olua_require(L, "ccs.ContourData", luaopen_cocostudio_ContourData); - olua_require(L, "ccs.DataReaderHelper", luaopen_cocostudio_DataReaderHelper); - olua_require(L, "ccs.DecorativeDisplay", luaopen_cocostudio_DecorativeDisplay); - olua_require(L, "ccs.DisplayFactory", luaopen_cocostudio_DisplayFactory); - olua_require(L, "ccs.DisplayManager", luaopen_cocostudio_DisplayManager); - olua_require(L, "ccs.FrameData", luaopen_cocostudio_FrameData); - olua_require(L, "ccs.GUIReader", luaopen_cocostudio_GUIReader); - olua_require(L, "ccs.InputDelegate", luaopen_cocostudio_InputDelegate); - olua_require(L, "ccs.MovementBoneData", luaopen_cocostudio_MovementBoneData); - olua_require(L, "ccs.MovementData", luaopen_cocostudio_MovementData); - olua_require(L, "ccs.ParticleDisplayData", luaopen_cocostudio_ParticleDisplayData); - olua_require(L, "ccs.SceneReader.AttachComponentType", luaopen_cocostudio_SceneReader_AttachComponentType); - olua_require(L, "ccs.SceneReader", luaopen_cocostudio_SceneReader); - olua_require(L, "ccs.Skin", luaopen_cocostudio_Skin); - olua_require(L, "ccs.SpriteDisplayData", luaopen_cocostudio_SpriteDisplayData); - olua_require(L, "ccs.SpriteFrameCacheHelper", luaopen_cocostudio_SpriteFrameCacheHelper); - olua_require(L, "ccs.TextureData", luaopen_cocostudio_TextureData); - olua_require(L, "ccs.Tween", luaopen_cocostudio_Tween); - olua_require(L, "ccs.timeline.InnerActionType", luaopen_cocostudio_timeline_InnerActionType); - olua_require(L, "ccs.timeline.Frame", luaopen_cocostudio_timeline_Frame); - olua_require(L, "ccs.timeline.AlphaFrame", luaopen_cocostudio_timeline_AlphaFrame); - olua_require(L, "ccs.timeline.AnchorPointFrame", luaopen_cocostudio_timeline_AnchorPointFrame); - olua_require(L, "ccs.timeline.BlendFuncFrame", luaopen_cocostudio_timeline_BlendFuncFrame); - olua_require(L, "ccs.timeline.ColorFrame", luaopen_cocostudio_timeline_ColorFrame); - olua_require(L, "ccs.timeline.EventFrame", luaopen_cocostudio_timeline_EventFrame); - olua_require(L, "ccs.timeline.InnerActionFrame", luaopen_cocostudio_timeline_InnerActionFrame); - olua_require(L, "ccs.timeline.PlayableFrame", luaopen_cocostudio_timeline_PlayableFrame); - olua_require(L, "ccs.timeline.PositionFrame", luaopen_cocostudio_timeline_PositionFrame); - olua_require(L, "ccs.timeline.RotationFrame", luaopen_cocostudio_timeline_RotationFrame); - olua_require(L, "ccs.timeline.SkewFrame", luaopen_cocostudio_timeline_SkewFrame); - olua_require(L, "ccs.timeline.RotationSkewFrame", luaopen_cocostudio_timeline_RotationSkewFrame); - olua_require(L, "ccs.timeline.ScaleFrame", luaopen_cocostudio_timeline_ScaleFrame); - olua_require(L, "ccs.timeline.TextureFrame", luaopen_cocostudio_timeline_TextureFrame); - olua_require(L, "ccs.timeline.VisibleFrame", luaopen_cocostudio_timeline_VisibleFrame); - olua_require(L, "ccs.timeline.ZOrderFrame", luaopen_cocostudio_timeline_ZOrderFrame); - olua_require(L, "ccs.timeline.ActionTimelineCache", luaopen_cocostudio_timeline_ActionTimelineCache); - olua_require(L, "ccs.timeline.ActionTimelineData", luaopen_cocostudio_timeline_ActionTimelineData); - olua_require(L, "ccs.timeline.ActionTimelineNode", luaopen_cocostudio_timeline_ActionTimelineNode); - olua_require(L, "ccs.timeline.BoneNode", luaopen_cocostudio_timeline_BoneNode); - olua_require(L, "ccs.timeline.SkeletonNode", luaopen_cocostudio_timeline_SkeletonNode); - olua_require(L, "ccs.timeline.Timeline", luaopen_cocostudio_timeline_Timeline); - olua_require(L, "ccs.timeline.ActionTimeline", luaopen_cocostudio_timeline_ActionTimeline); + olua_require(L, "ccs.timeline.AnimationInfo", _olua_cls_ccs_timeline_AnimationInfo); + olua_require(L, "cc.CSLoader", _olua_cls_cc_CSLoader); + olua_require(L, "ccs.MovementEventType", _olua_cls_ccs_MovementEventType); + olua_require(L, "ccs.DisplayType", _olua_cls_ccs_DisplayType); + olua_require(L, "ccs.ActionFrame", _olua_cls_ccs_ActionFrame); + olua_require(L, "ccs.ActionFadeFrame", _olua_cls_ccs_ActionFadeFrame); + olua_require(L, "ccs.ActionFrameEasing", _olua_cls_ccs_ActionFrameEasing); + olua_require(L, "ccs.ActionMoveFrame", _olua_cls_ccs_ActionMoveFrame); + olua_require(L, "ccs.ActionRotationFrame", _olua_cls_ccs_ActionRotationFrame); + olua_require(L, "ccs.ActionScaleFrame", _olua_cls_ccs_ActionScaleFrame); + olua_require(L, "ccs.ActionTintFrame", _olua_cls_ccs_ActionTintFrame); + olua_require(L, "ccs.AnimationData", _olua_cls_ccs_AnimationData); + olua_require(L, "ccs.Armature", _olua_cls_ccs_Armature); + olua_require(L, "ccs.ProcessBase", _olua_cls_ccs_ProcessBase); + olua_require(L, "ccs.ActionManagerEx", _olua_cls_ccs_ActionManagerEx); + olua_require(L, "ccs.ActionNode", _olua_cls_ccs_ActionNode); + olua_require(L, "ccs.ActionObject", _olua_cls_ccs_ActionObject); + olua_require(L, "ccs.ArmatureAnimation", _olua_cls_ccs_ArmatureAnimation); + olua_require(L, "ccs.ArmatureData", _olua_cls_ccs_ArmatureData); + olua_require(L, "ccs.ArmatureDataManager", _olua_cls_ccs_ArmatureDataManager); + olua_require(L, "ccs.DisplayData", _olua_cls_ccs_DisplayData); + olua_require(L, "ccs.ArmatureDisplayData", _olua_cls_ccs_ArmatureDisplayData); + olua_require(L, "ccs.ArmatureMovementDispatcher", _olua_cls_ccs_ArmatureMovementDispatcher); + olua_require(L, "ccs.BaseData", _olua_cls_ccs_BaseData); + olua_require(L, "ccs.BaseTriggerAction", _olua_cls_ccs_BaseTriggerAction); + olua_require(L, "ccs.BaseTriggerCondition", _olua_cls_ccs_BaseTriggerCondition); + olua_require(L, "ccs.BatchNode", _olua_cls_ccs_BatchNode); + olua_require(L, "ccs.Bone", _olua_cls_ccs_Bone); + olua_require(L, "ccs.BoneData", _olua_cls_ccs_BoneData); + olua_require(L, "ccs.CocoLoader", _olua_cls_ccs_CocoLoader); + olua_require(L, "ccs.ColliderBody", _olua_cls_ccs_ColliderBody); + olua_require(L, "ccs.ColliderDetector", _olua_cls_ccs_ColliderDetector); + olua_require(L, "ccs.ColliderFilter", _olua_cls_ccs_ColliderFilter); + olua_require(L, "ccs.ComAttribute", _olua_cls_ccs_ComAttribute); + olua_require(L, "ccs.ComAudio", _olua_cls_ccs_ComAudio); + olua_require(L, "ccs.ComController", _olua_cls_ccs_ComController); + olua_require(L, "ccs.ComRender", _olua_cls_ccs_ComRender); + olua_require(L, "ccs.ContourData", _olua_cls_ccs_ContourData); + olua_require(L, "ccs.DataReaderHelper", _olua_cls_ccs_DataReaderHelper); + olua_require(L, "ccs.DecorativeDisplay", _olua_cls_ccs_DecorativeDisplay); + olua_require(L, "ccs.DisplayFactory", _olua_cls_ccs_DisplayFactory); + olua_require(L, "ccs.DisplayManager", _olua_cls_ccs_DisplayManager); + olua_require(L, "ccs.FrameData", _olua_cls_ccs_FrameData); + olua_require(L, "ccs.GUIReader", _olua_cls_ccs_GUIReader); + olua_require(L, "ccs.InputDelegate", _olua_cls_ccs_InputDelegate); + olua_require(L, "ccs.MovementBoneData", _olua_cls_ccs_MovementBoneData); + olua_require(L, "ccs.MovementData", _olua_cls_ccs_MovementData); + olua_require(L, "ccs.ParticleDisplayData", _olua_cls_ccs_ParticleDisplayData); + olua_require(L, "ccs.SceneReader.AttachComponentType", _olua_cls_ccs_SceneReader_AttachComponentType); + olua_require(L, "ccs.SceneReader", _olua_cls_ccs_SceneReader); + olua_require(L, "ccs.Skin", _olua_cls_ccs_Skin); + olua_require(L, "ccs.SpriteDisplayData", _olua_cls_ccs_SpriteDisplayData); + olua_require(L, "ccs.SpriteFrameCacheHelper", _olua_cls_ccs_SpriteFrameCacheHelper); + olua_require(L, "ccs.TextureData", _olua_cls_ccs_TextureData); + olua_require(L, "ccs.Tween", _olua_cls_ccs_Tween); + olua_require(L, "ccs.timeline.InnerActionType", _olua_cls_ccs_timeline_InnerActionType); + olua_require(L, "ccs.timeline.Frame", _olua_cls_ccs_timeline_Frame); + olua_require(L, "ccs.timeline.AlphaFrame", _olua_cls_ccs_timeline_AlphaFrame); + olua_require(L, "ccs.timeline.AnchorPointFrame", _olua_cls_ccs_timeline_AnchorPointFrame); + olua_require(L, "ccs.timeline.BlendFuncFrame", _olua_cls_ccs_timeline_BlendFuncFrame); + olua_require(L, "ccs.timeline.ColorFrame", _olua_cls_ccs_timeline_ColorFrame); + olua_require(L, "ccs.timeline.EventFrame", _olua_cls_ccs_timeline_EventFrame); + olua_require(L, "ccs.timeline.InnerActionFrame", _olua_cls_ccs_timeline_InnerActionFrame); + olua_require(L, "ccs.timeline.PlayableFrame", _olua_cls_ccs_timeline_PlayableFrame); + olua_require(L, "ccs.timeline.PositionFrame", _olua_cls_ccs_timeline_PositionFrame); + olua_require(L, "ccs.timeline.RotationFrame", _olua_cls_ccs_timeline_RotationFrame); + olua_require(L, "ccs.timeline.SkewFrame", _olua_cls_ccs_timeline_SkewFrame); + olua_require(L, "ccs.timeline.RotationSkewFrame", _olua_cls_ccs_timeline_RotationSkewFrame); + olua_require(L, "ccs.timeline.ScaleFrame", _olua_cls_ccs_timeline_ScaleFrame); + olua_require(L, "ccs.timeline.TextureFrame", _olua_cls_ccs_timeline_TextureFrame); + olua_require(L, "ccs.timeline.VisibleFrame", _olua_cls_ccs_timeline_VisibleFrame); + olua_require(L, "ccs.timeline.ZOrderFrame", _olua_cls_ccs_timeline_ZOrderFrame); + olua_require(L, "ccs.timeline.ActionTimelineCache", _olua_cls_ccs_timeline_ActionTimelineCache); + olua_require(L, "ccs.timeline.ActionTimelineData", _olua_cls_ccs_timeline_ActionTimelineData); + olua_require(L, "ccs.timeline.ActionTimelineNode", _olua_cls_ccs_timeline_ActionTimelineNode); + olua_require(L, "ccs.timeline.BoneNode", _olua_cls_ccs_timeline_BoneNode); + olua_require(L, "ccs.timeline.SkeletonNode", _olua_cls_ccs_timeline_SkeletonNode); + olua_require(L, "ccs.timeline.Timeline", _olua_cls_ccs_timeline_Timeline); + olua_require(L, "ccs.timeline.ActionTimeline", _olua_cls_ccs_timeline_ActionTimeline); cclua::runtime::registerFeature("cocostudio", true); diff --git a/frameworks/cclua/src/lua-bindings/lua_cocos2d_studio.h b/frameworks/cclua/src/lua-bindings/lua_cocos2d_studio.h index 5c6788f9..2ea4d2f0 100644 --- a/frameworks/cclua/src/lua-bindings/lua_cocos2d_studio.h +++ b/frameworks/cclua/src/lua-bindings/lua_cocos2d_studio.h @@ -1,5 +1,5 @@ // -// AUTO BUILD, DON'T MODIFY! +// AUTO GENERATED, DO NOT MODIFY! // #ifndef __AUTO_GEN_LUA_COCOS2D_STUDIO_H__ #define __AUTO_GEN_LUA_COCOS2D_STUDIO_H__ diff --git a/frameworks/cclua/src/lua-bindings/lua_cocos2d_types.cpp b/frameworks/cclua/src/lua-bindings/lua_cocos2d_types.cpp index 6526cc3c..688a7639 100644 --- a/frameworks/cclua/src/lua-bindings/lua_cocos2d_types.cpp +++ b/frameworks/cclua/src/lua-bindings/lua_cocos2d_types.cpp @@ -1,5 +1,5 @@ // -// AUTO BUILD, DON'T MODIFY! +// AUTO GENERATED, DO NOT MODIFY! // #include "lua_cocos2d_types.h" @@ -184,9 +184,9 @@ OLUA_LIB void olua_pack_object(lua_State *L, int idx, cocos2d::ccBezierConfig *v OLUA_LIB int olua_unpack_object(lua_State *L, const cocos2d::ccBezierConfig *value) { - olua_pushcopy_object(L, value->endPosition, "cc.Vec2"); - olua_pushcopy_object(L, value->controlPoint_1, "cc.Vec2"); - olua_pushcopy_object(L, value->controlPoint_2, "cc.Vec2"); + olua_copy_object(L, value->endPosition, "cc.Vec2"); + olua_copy_object(L, value->controlPoint_1, "cc.Vec2"); + olua_copy_object(L, value->controlPoint_2, "cc.Vec2"); return 3; } @@ -196,35 +196,7 @@ OLUA_LIB bool olua_canpack_object(lua_State *L, int idx, const cocos2d::ccBezier return olua_is_object(L, idx + 0, "cc.Vec2") && olua_is_object(L, idx + 1, "cc.Vec2") && olua_is_object(L, idx + 2, "cc.Vec2"); } -static int _cocos2d_Vec2___call(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::Vec2 ret; - - luaL_checktype(L, 2, LUA_TTABLE); - - float arg1 = 0; /** x */ - float arg2 = 0; /** y */ - - olua_getfield(L, 2, "x"); - olua_check_number(L, -1, &arg1); - ret.x = arg1; - lua_pop(L, 1); - - olua_getfield(L, 2, "y"); - olua_check_number(L, -1, &arg2); - ret.y = arg2; - lua_pop(L, 1); - - olua_pushcopy_object(L, ret, "cc.Vec2"); - - olua_endinvoke(L); - - return 1; -} - -static int _cocos2d_Vec2___gc(lua_State *L) +static int _olua_fun_cocos2d_Vec2___gc(lua_State *L) { olua_startinvoke(L); @@ -236,7 +208,7 @@ static int _cocos2d_Vec2___gc(lua_State *L) return 0; } -static int _cocos2d_Vec2___olua_move(lua_State *L) +static int _olua_fun_cocos2d_Vec2___olua_move(lua_State *L) { olua_startinvoke(L); @@ -248,30 +220,30 @@ static int _cocos2d_Vec2___olua_move(lua_State *L) return 1; } -static int _cocos2d_Vec2_add$1(lua_State *L) +static int _olua_fun_cocos2d_Vec2_add$1(lua_State *L) { olua_startinvoke(L); cocos2d::Vec2 *self = nullptr; - cocos2d::Vec2 arg1; /** v */ + cocos2d::Vec2 *arg1; /** v */ olua_to_object(L, 1, &self, "cc.Vec2"); olua_check_object(L, 2, &arg1, "cc.Vec2"); // void add(const cocos2d::Vec2 &v) - self->add(arg1); + self->add(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_Vec2_add$2(lua_State *L) +static int _olua_fun_cocos2d_Vec2_add$2(lua_State *L) { olua_startinvoke(L); - cocos2d::Vec2 arg1; /** v1 */ - cocos2d::Vec2 arg2; /** v2 */ + cocos2d::Vec2 *arg1; /** v1 */ + cocos2d::Vec2 *arg2; /** v2 */ cocos2d::Vec2 *arg3 = nullptr; /** dst */ olua_check_object(L, 1, &arg1, "cc.Vec2"); @@ -279,28 +251,28 @@ static int _cocos2d_Vec2_add$2(lua_State *L) olua_check_object(L, 3, &arg3, "cc.Vec2"); // static void add(const cocos2d::Vec2 &v1, const cocos2d::Vec2 &v2, cocos2d::Vec2 *dst) - cocos2d::Vec2::add(arg1, arg2, arg3); + cocos2d::Vec2::add(*arg1, *arg2, arg3); olua_endinvoke(L); return 0; } -static int _cocos2d_Vec2_add(lua_State *L) +static int _olua_fun_cocos2d_Vec2_add(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_object(L, 2, "cc.Vec2"))) { // void add(const cocos2d::Vec2 &v) - return _cocos2d_Vec2_add$1(L); + return _olua_fun_cocos2d_Vec2_add$1(L); // } } if (num_args == 3) { // if ((olua_is_object(L, 1, "cc.Vec2")) && (olua_is_object(L, 2, "cc.Vec2")) && (olua_is_object(L, 3, "cc.Vec2"))) { // static void add(const cocos2d::Vec2 &v1, const cocos2d::Vec2 &v2, cocos2d::Vec2 *dst) - return _cocos2d_Vec2_add$2(L); + return _olua_fun_cocos2d_Vec2_add$2(L); // } } @@ -309,18 +281,18 @@ static int _cocos2d_Vec2_add(lua_State *L) return 0; } -static int _cocos2d_Vec2_angle(lua_State *L) +static int _olua_fun_cocos2d_Vec2_angle(lua_State *L) { olua_startinvoke(L); - cocos2d::Vec2 arg1; /** v1 */ - cocos2d::Vec2 arg2; /** v2 */ + cocos2d::Vec2 *arg1; /** v1 */ + cocos2d::Vec2 *arg2; /** v2 */ olua_check_object(L, 1, &arg1, "cc.Vec2"); olua_check_object(L, 2, &arg2, "cc.Vec2"); // static float angle(const cocos2d::Vec2 &v1, const cocos2d::Vec2 &v2) - float ret = cocos2d::Vec2::angle(arg1, arg2); + float ret = cocos2d::Vec2::angle(*arg1, *arg2); int num_ret = olua_push_number(L, ret); olua_endinvoke(L); @@ -328,33 +300,33 @@ static int _cocos2d_Vec2_angle(lua_State *L) return num_ret; } -static int _cocos2d_Vec2_clamp$1(lua_State *L) +static int _olua_fun_cocos2d_Vec2_clamp$1(lua_State *L) { olua_startinvoke(L); cocos2d::Vec2 *self = nullptr; - cocos2d::Vec2 arg1; /** min */ - cocos2d::Vec2 arg2; /** max */ + cocos2d::Vec2 *arg1; /** min */ + cocos2d::Vec2 *arg2; /** max */ olua_to_object(L, 1, &self, "cc.Vec2"); olua_check_object(L, 2, &arg1, "cc.Vec2"); olua_check_object(L, 3, &arg2, "cc.Vec2"); // void clamp(const cocos2d::Vec2 &min, const cocos2d::Vec2 &max) - self->clamp(arg1, arg2); + self->clamp(*arg1, *arg2); olua_endinvoke(L); return 0; } -static int _cocos2d_Vec2_clamp$2(lua_State *L) +static int _olua_fun_cocos2d_Vec2_clamp$2(lua_State *L) { olua_startinvoke(L); - cocos2d::Vec2 arg1; /** v */ - cocos2d::Vec2 arg2; /** min */ - cocos2d::Vec2 arg3; /** max */ + cocos2d::Vec2 *arg1; /** v */ + cocos2d::Vec2 *arg2; /** min */ + cocos2d::Vec2 *arg3; /** max */ cocos2d::Vec2 *arg4 = nullptr; /** dst */ olua_check_object(L, 1, &arg1, "cc.Vec2"); @@ -363,28 +335,28 @@ static int _cocos2d_Vec2_clamp$2(lua_State *L) olua_check_object(L, 4, &arg4, "cc.Vec2"); // static void clamp(const cocos2d::Vec2 &v, const cocos2d::Vec2 &min, const cocos2d::Vec2 &max, cocos2d::Vec2 *dst) - cocos2d::Vec2::clamp(arg1, arg2, arg3, arg4); + cocos2d::Vec2::clamp(*arg1, *arg2, *arg3, arg4); olua_endinvoke(L); return 0; } -static int _cocos2d_Vec2_clamp(lua_State *L) +static int _olua_fun_cocos2d_Vec2_clamp(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 2) { // if ((olua_is_object(L, 2, "cc.Vec2")) && (olua_is_object(L, 3, "cc.Vec2"))) { // void clamp(const cocos2d::Vec2 &min, const cocos2d::Vec2 &max) - return _cocos2d_Vec2_clamp$1(L); + return _olua_fun_cocos2d_Vec2_clamp$1(L); // } } if (num_args == 4) { // if ((olua_is_object(L, 1, "cc.Vec2")) && (olua_is_object(L, 2, "cc.Vec2")) && (olua_is_object(L, 3, "cc.Vec2")) && (olua_is_object(L, 4, "cc.Vec2"))) { // static void clamp(const cocos2d::Vec2 &v, const cocos2d::Vec2 &min, const cocos2d::Vec2 &max, cocos2d::Vec2 *dst) - return _cocos2d_Vec2_clamp$2(L); + return _olua_fun_cocos2d_Vec2_clamp$2(L); // } } @@ -393,27 +365,28 @@ static int _cocos2d_Vec2_clamp(lua_State *L) return 0; } -static int _cocos2d_Vec2_compOp(lua_State *L) +static int _olua_fun_cocos2d_Vec2_compOp(lua_State *L) { olua_startinvoke(L); cocos2d::Vec2 *self = nullptr; - std::function arg1; /** function */ + std::function arg1; /** function_ */ olua_to_object(L, 1, &self, "cc.Vec2"); olua_check_callback(L, 2, &arg1, "std.function"); void *cb_store = (void *)self; std::string cb_tag = "compOp"; - std::string cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + std::string cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](float arg1) { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](float cb_arg1) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); float ret = 0; /** ret */ if (olua_contextequal(L, cb_ctx)) { int top = lua_gettop(L); - olua_push_number(L, arg1); + olua_push_number(L, cb_arg1); olua_callback(L, cb_store, cb_name.c_str(), 1); @@ -426,27 +399,27 @@ static int _cocos2d_Vec2_compOp(lua_State *L) return ret; }; - // cocos2d::Vec2 compOp(@localvar std::function function) + // cocos2d::Vec2 compOp(std::function function_) cocos2d::Vec2 ret = self->compOp(arg1); - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec2"); + int num_ret = olua_copy_object(L, ret, "cc.Vec2"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_Vec2_cross(lua_State *L) +static int _olua_fun_cocos2d_Vec2_cross(lua_State *L) { olua_startinvoke(L); cocos2d::Vec2 *self = nullptr; - cocos2d::Vec2 arg1; /** other */ + cocos2d::Vec2 *arg1; /** other */ olua_to_object(L, 1, &self, "cc.Vec2"); olua_check_object(L, 2, &arg1, "cc.Vec2"); // float cross(const cocos2d::Vec2 &other) - float ret = self->cross(arg1); + float ret = self->cross(*arg1); int num_ret = olua_push_number(L, ret); olua_endinvoke(L); @@ -454,18 +427,18 @@ static int _cocos2d_Vec2_cross(lua_State *L) return num_ret; } -static int _cocos2d_Vec2_distance(lua_State *L) +static int _olua_fun_cocos2d_Vec2_distance(lua_State *L) { olua_startinvoke(L); cocos2d::Vec2 *self = nullptr; - cocos2d::Vec2 arg1; /** v */ + cocos2d::Vec2 *arg1; /** v */ olua_to_object(L, 1, &self, "cc.Vec2"); olua_check_object(L, 2, &arg1, "cc.Vec2"); // float distance(const cocos2d::Vec2 &v) - float ret = self->distance(arg1); + float ret = self->distance(*arg1); int num_ret = olua_push_number(L, ret); olua_endinvoke(L); @@ -473,18 +446,18 @@ static int _cocos2d_Vec2_distance(lua_State *L) return num_ret; } -static int _cocos2d_Vec2_distanceSquared(lua_State *L) +static int _olua_fun_cocos2d_Vec2_distanceSquared(lua_State *L) { olua_startinvoke(L); cocos2d::Vec2 *self = nullptr; - cocos2d::Vec2 arg1; /** v */ + cocos2d::Vec2 *arg1; /** v */ olua_to_object(L, 1, &self, "cc.Vec2"); olua_check_object(L, 2, &arg1, "cc.Vec2"); // float distanceSquared(const cocos2d::Vec2 &v) - float ret = self->distanceSquared(arg1); + float ret = self->distanceSquared(*arg1); int num_ret = olua_push_number(L, ret); olua_endinvoke(L); @@ -492,18 +465,18 @@ static int _cocos2d_Vec2_distanceSquared(lua_State *L) return num_ret; } -static int _cocos2d_Vec2_dot$1(lua_State *L) +static int _olua_fun_cocos2d_Vec2_dot$1(lua_State *L) { olua_startinvoke(L); cocos2d::Vec2 *self = nullptr; - cocos2d::Vec2 arg1; /** v */ + cocos2d::Vec2 *arg1; /** v */ olua_to_object(L, 1, &self, "cc.Vec2"); olua_check_object(L, 2, &arg1, "cc.Vec2"); // float dot(const cocos2d::Vec2 &v) - float ret = self->dot(arg1); + float ret = self->dot(*arg1); int num_ret = olua_push_number(L, ret); olua_endinvoke(L); @@ -511,18 +484,18 @@ static int _cocos2d_Vec2_dot$1(lua_State *L) return num_ret; } -static int _cocos2d_Vec2_dot$2(lua_State *L) +static int _olua_fun_cocos2d_Vec2_dot$2(lua_State *L) { olua_startinvoke(L); - cocos2d::Vec2 arg1; /** v1 */ - cocos2d::Vec2 arg2; /** v2 */ + cocos2d::Vec2 *arg1; /** v1 */ + cocos2d::Vec2 *arg2; /** v2 */ olua_check_object(L, 1, &arg1, "cc.Vec2"); olua_check_object(L, 2, &arg2, "cc.Vec2"); // static float dot(const cocos2d::Vec2 &v1, const cocos2d::Vec2 &v2) - float ret = cocos2d::Vec2::dot(arg1, arg2); + float ret = cocos2d::Vec2::dot(*arg1, *arg2); int num_ret = olua_push_number(L, ret); olua_endinvoke(L); @@ -530,21 +503,21 @@ static int _cocos2d_Vec2_dot$2(lua_State *L) return num_ret; } -static int _cocos2d_Vec2_dot(lua_State *L) +static int _olua_fun_cocos2d_Vec2_dot(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_object(L, 2, "cc.Vec2"))) { // float dot(const cocos2d::Vec2 &v) - return _cocos2d_Vec2_dot$1(L); + return _olua_fun_cocos2d_Vec2_dot$1(L); // } } if (num_args == 2) { // if ((olua_is_object(L, 1, "cc.Vec2")) && (olua_is_object(L, 2, "cc.Vec2"))) { // static float dot(const cocos2d::Vec2 &v1, const cocos2d::Vec2 &v2) - return _cocos2d_Vec2_dot$2(L); + return _olua_fun_cocos2d_Vec2_dot$2(L); // } } @@ -553,18 +526,18 @@ static int _cocos2d_Vec2_dot(lua_State *L) return 0; } -static int _cocos2d_Vec2_equals(lua_State *L) +static int _olua_fun_cocos2d_Vec2_equals(lua_State *L) { olua_startinvoke(L); cocos2d::Vec2 *self = nullptr; - cocos2d::Vec2 arg1; /** target */ + cocos2d::Vec2 *arg1; /** target */ olua_to_object(L, 1, &self, "cc.Vec2"); olua_check_object(L, 2, &arg1, "cc.Vec2"); // bool equals(const cocos2d::Vec2 &target) - bool ret = self->equals(arg1); + bool ret = self->equals(*arg1); int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); @@ -572,7 +545,7 @@ static int _cocos2d_Vec2_equals(lua_State *L) return num_ret; } -static int _cocos2d_Vec2_forAngle(lua_State *L) +static int _olua_fun_cocos2d_Vec2_forAngle(lua_State *L) { olua_startinvoke(L); @@ -582,19 +555,19 @@ static int _cocos2d_Vec2_forAngle(lua_State *L) // static cocos2d::Vec2 forAngle(const float a) cocos2d::Vec2 ret = cocos2d::Vec2::forAngle(arg1); - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec2"); + int num_ret = olua_copy_object(L, ret, "cc.Vec2"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_Vec2_fuzzyEquals(lua_State *L) +static int _olua_fun_cocos2d_Vec2_fuzzyEquals(lua_State *L) { olua_startinvoke(L); cocos2d::Vec2 *self = nullptr; - cocos2d::Vec2 arg1; /** target */ + cocos2d::Vec2 *arg1; /** target */ float arg2 = 0; /** variance */ olua_to_object(L, 1, &self, "cc.Vec2"); @@ -602,7 +575,7 @@ static int _cocos2d_Vec2_fuzzyEquals(lua_State *L) olua_check_number(L, 3, &arg2); // bool fuzzyEquals(const cocos2d::Vec2 &target, float variance) - bool ret = self->fuzzyEquals(arg1, arg2); + bool ret = self->fuzzyEquals(*arg1, arg2); int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); @@ -610,7 +583,7 @@ static int _cocos2d_Vec2_fuzzyEquals(lua_State *L) return num_ret; } -static int _cocos2d_Vec2_getAngle$1(lua_State *L) +static int _olua_fun_cocos2d_Vec2_getAngle$1(lua_State *L) { olua_startinvoke(L); @@ -627,18 +600,18 @@ static int _cocos2d_Vec2_getAngle$1(lua_State *L) return num_ret; } -static int _cocos2d_Vec2_getAngle$2(lua_State *L) +static int _olua_fun_cocos2d_Vec2_getAngle$2(lua_State *L) { olua_startinvoke(L); cocos2d::Vec2 *self = nullptr; - cocos2d::Vec2 arg1; /** other */ + cocos2d::Vec2 *arg1; /** other */ olua_to_object(L, 1, &self, "cc.Vec2"); olua_check_object(L, 2, &arg1, "cc.Vec2"); // float getAngle(const cocos2d::Vec2 &other) - float ret = self->getAngle(arg1); + float ret = self->getAngle(*arg1); int num_ret = olua_push_number(L, ret); olua_endinvoke(L); @@ -646,19 +619,19 @@ static int _cocos2d_Vec2_getAngle$2(lua_State *L) return num_ret; } -static int _cocos2d_Vec2_getAngle(lua_State *L) +static int _olua_fun_cocos2d_Vec2_getAngle(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 0) { // float getAngle() - return _cocos2d_Vec2_getAngle$1(L); + return _olua_fun_cocos2d_Vec2_getAngle$1(L); } if (num_args == 1) { // if ((olua_is_object(L, 2, "cc.Vec2"))) { // float getAngle(const cocos2d::Vec2 &other) - return _cocos2d_Vec2_getAngle$2(L); + return _olua_fun_cocos2d_Vec2_getAngle$2(L); // } } @@ -667,39 +640,39 @@ static int _cocos2d_Vec2_getAngle(lua_State *L) return 0; } -static int _cocos2d_Vec2_getClampPoint(lua_State *L) +static int _olua_fun_cocos2d_Vec2_getClampPoint(lua_State *L) { olua_startinvoke(L); cocos2d::Vec2 *self = nullptr; - cocos2d::Vec2 arg1; /** min_inclusive */ - cocos2d::Vec2 arg2; /** max_inclusive */ + cocos2d::Vec2 *arg1; /** min_inclusive */ + cocos2d::Vec2 *arg2; /** max_inclusive */ olua_to_object(L, 1, &self, "cc.Vec2"); olua_check_object(L, 2, &arg1, "cc.Vec2"); olua_check_object(L, 3, &arg2, "cc.Vec2"); // cocos2d::Vec2 getClampPoint(const cocos2d::Vec2 &min_inclusive, const cocos2d::Vec2 &max_inclusive) - cocos2d::Vec2 ret = self->getClampPoint(arg1, arg2); - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec2"); + cocos2d::Vec2 ret = self->getClampPoint(*arg1, *arg2); + int num_ret = olua_copy_object(L, ret, "cc.Vec2"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_Vec2_getDistance(lua_State *L) +static int _olua_fun_cocos2d_Vec2_getDistance(lua_State *L) { olua_startinvoke(L); cocos2d::Vec2 *self = nullptr; - cocos2d::Vec2 arg1; /** other */ + cocos2d::Vec2 *arg1; /** other */ olua_to_object(L, 1, &self, "cc.Vec2"); olua_check_object(L, 2, &arg1, "cc.Vec2"); // float getDistance(const cocos2d::Vec2 &other) - float ret = self->getDistance(arg1); + float ret = self->getDistance(*arg1); int num_ret = olua_push_number(L, ret); olua_endinvoke(L); @@ -707,18 +680,18 @@ static int _cocos2d_Vec2_getDistance(lua_State *L) return num_ret; } -static int _cocos2d_Vec2_getDistanceSq(lua_State *L) +static int _olua_fun_cocos2d_Vec2_getDistanceSq(lua_State *L) { olua_startinvoke(L); cocos2d::Vec2 *self = nullptr; - cocos2d::Vec2 arg1; /** other */ + cocos2d::Vec2 *arg1; /** other */ olua_to_object(L, 1, &self, "cc.Vec2"); olua_check_object(L, 2, &arg1, "cc.Vec2"); // float getDistanceSq(const cocos2d::Vec2 &other) - float ret = self->getDistanceSq(arg1); + float ret = self->getDistanceSq(*arg1); int num_ret = olua_push_number(L, ret); olua_endinvoke(L); @@ -726,14 +699,14 @@ static int _cocos2d_Vec2_getDistanceSq(lua_State *L) return num_ret; } -static int _cocos2d_Vec2_getIntersectPoint(lua_State *L) +static int _olua_fun_cocos2d_Vec2_getIntersectPoint(lua_State *L) { olua_startinvoke(L); - cocos2d::Vec2 arg1; /** A */ - cocos2d::Vec2 arg2; /** B */ - cocos2d::Vec2 arg3; /** C */ - cocos2d::Vec2 arg4; /** D */ + cocos2d::Vec2 *arg1; /** A */ + cocos2d::Vec2 *arg2; /** B */ + cocos2d::Vec2 *arg3; /** C */ + cocos2d::Vec2 *arg4; /** D */ olua_check_object(L, 1, &arg1, "cc.Vec2"); olua_check_object(L, 2, &arg2, "cc.Vec2"); @@ -741,15 +714,15 @@ static int _cocos2d_Vec2_getIntersectPoint(lua_State *L) olua_check_object(L, 4, &arg4, "cc.Vec2"); // static cocos2d::Vec2 getIntersectPoint(const cocos2d::Vec2 &A, const cocos2d::Vec2 &B, const cocos2d::Vec2 &C, const cocos2d::Vec2 &D) - cocos2d::Vec2 ret = cocos2d::Vec2::getIntersectPoint(arg1, arg2, arg3, arg4); - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec2"); + cocos2d::Vec2 ret = cocos2d::Vec2::getIntersectPoint(*arg1, *arg2, *arg3, *arg4); + int num_ret = olua_copy_object(L, ret, "cc.Vec2"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_Vec2_getLength(lua_State *L) +static int _olua_fun_cocos2d_Vec2_getLength(lua_State *L) { olua_startinvoke(L); @@ -766,7 +739,7 @@ static int _cocos2d_Vec2_getLength(lua_State *L) return num_ret; } -static int _cocos2d_Vec2_getLengthSq(lua_State *L) +static int _olua_fun_cocos2d_Vec2_getLengthSq(lua_State *L) { olua_startinvoke(L); @@ -783,26 +756,26 @@ static int _cocos2d_Vec2_getLengthSq(lua_State *L) return num_ret; } -static int _cocos2d_Vec2_getMidpoint(lua_State *L) +static int _olua_fun_cocos2d_Vec2_getMidpoint(lua_State *L) { olua_startinvoke(L); cocos2d::Vec2 *self = nullptr; - cocos2d::Vec2 arg1; /** other */ + cocos2d::Vec2 *arg1; /** other */ olua_to_object(L, 1, &self, "cc.Vec2"); olua_check_object(L, 2, &arg1, "cc.Vec2"); // cocos2d::Vec2 getMidpoint(const cocos2d::Vec2 &other) - cocos2d::Vec2 ret = self->getMidpoint(arg1); - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec2"); + cocos2d::Vec2 ret = self->getMidpoint(*arg1); + int num_ret = olua_copy_object(L, ret, "cc.Vec2"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_Vec2_getNormalized(lua_State *L) +static int _olua_fun_cocos2d_Vec2_getNormalized(lua_State *L) { olua_startinvoke(L); @@ -812,14 +785,14 @@ static int _cocos2d_Vec2_getNormalized(lua_State *L) // cocos2d::Vec2 getNormalized() cocos2d::Vec2 ret = self->getNormalized(); - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec2"); + int num_ret = olua_copy_object(L, ret, "cc.Vec2"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_Vec2_getPerp(lua_State *L) +static int _olua_fun_cocos2d_Vec2_getPerp(lua_State *L) { olua_startinvoke(L); @@ -829,14 +802,14 @@ static int _cocos2d_Vec2_getPerp(lua_State *L) // cocos2d::Vec2 getPerp() cocos2d::Vec2 ret = self->getPerp(); - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec2"); + int num_ret = olua_copy_object(L, ret, "cc.Vec2"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_Vec2_getRPerp(lua_State *L) +static int _olua_fun_cocos2d_Vec2_getRPerp(lua_State *L) { olua_startinvoke(L); @@ -846,21 +819,21 @@ static int _cocos2d_Vec2_getRPerp(lua_State *L) // cocos2d::Vec2 getRPerp() cocos2d::Vec2 ret = self->getRPerp(); - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec2"); + int num_ret = olua_copy_object(L, ret, "cc.Vec2"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_Vec2_isLineIntersect$1(lua_State *L) +static int _olua_fun_cocos2d_Vec2_isLineIntersect$1(lua_State *L) { olua_startinvoke(L); - cocos2d::Vec2 arg1; /** A */ - cocos2d::Vec2 arg2; /** B */ - cocos2d::Vec2 arg3; /** C */ - cocos2d::Vec2 arg4; /** D */ + cocos2d::Vec2 *arg1; /** A */ + cocos2d::Vec2 *arg2; /** B */ + cocos2d::Vec2 *arg3; /** C */ + cocos2d::Vec2 *arg4; /** D */ float *arg5 = nullptr; /** S */ float *arg6 = nullptr; /** T */ @@ -868,11 +841,11 @@ static int _cocos2d_Vec2_isLineIntersect$1(lua_State *L) olua_check_object(L, 2, &arg2, "cc.Vec2"); olua_check_object(L, 3, &arg3, "cc.Vec2"); olua_check_object(L, 4, &arg4, "cc.Vec2"); - olua_check_pointer(L, 5, &arg5, "olua.float"); - olua_check_pointer(L, 6, &arg6, "olua.float"); + olua_check_valueptr(L, 5, &arg5, "olua.float"); + olua_check_valueptr(L, 6, &arg6, "olua.float"); // static bool isLineIntersect(const cocos2d::Vec2 &A, const cocos2d::Vec2 &B, const cocos2d::Vec2 &C, const cocos2d::Vec2 &D, @optional float *S, @optional float *T) - bool ret = cocos2d::Vec2::isLineIntersect(arg1, arg2, arg3, arg4, arg5, arg6); + bool ret = cocos2d::Vec2::isLineIntersect(*arg1, *arg2, *arg3, *arg4, arg5, arg6); int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); @@ -880,22 +853,22 @@ static int _cocos2d_Vec2_isLineIntersect$1(lua_State *L) return num_ret; } -static int _cocos2d_Vec2_isLineIntersect$2(lua_State *L) +static int _olua_fun_cocos2d_Vec2_isLineIntersect$2(lua_State *L) { olua_startinvoke(L); - cocos2d::Vec2 arg1; /** A */ - cocos2d::Vec2 arg2; /** B */ - cocos2d::Vec2 arg3; /** C */ - cocos2d::Vec2 arg4; /** D */ + cocos2d::Vec2 *arg1; /** A */ + cocos2d::Vec2 *arg2; /** B */ + cocos2d::Vec2 *arg3; /** C */ + cocos2d::Vec2 *arg4; /** D */ olua_check_object(L, 1, &arg1, "cc.Vec2"); olua_check_object(L, 2, &arg2, "cc.Vec2"); olua_check_object(L, 3, &arg3, "cc.Vec2"); olua_check_object(L, 4, &arg4, "cc.Vec2"); - // static bool isLineIntersect(const cocos2d::Vec2 &A, const cocos2d::Vec2 &B, const cocos2d::Vec2 &C, const cocos2d::Vec2 &D, @optional float *S, @optional float *T) - bool ret = cocos2d::Vec2::isLineIntersect(arg1, arg2, arg3, arg4); + // static bool isLineIntersect(const cocos2d::Vec2 &A, const cocos2d::Vec2 &B, const cocos2d::Vec2 &C, const cocos2d::Vec2 &D) + bool ret = cocos2d::Vec2::isLineIntersect(*arg1, *arg2, *arg3, *arg4); int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); @@ -903,24 +876,24 @@ static int _cocos2d_Vec2_isLineIntersect$2(lua_State *L) return num_ret; } -static int _cocos2d_Vec2_isLineIntersect$3(lua_State *L) +static int _olua_fun_cocos2d_Vec2_isLineIntersect$3(lua_State *L) { olua_startinvoke(L); - cocos2d::Vec2 arg1; /** A */ - cocos2d::Vec2 arg2; /** B */ - cocos2d::Vec2 arg3; /** C */ - cocos2d::Vec2 arg4; /** D */ + cocos2d::Vec2 *arg1; /** A */ + cocos2d::Vec2 *arg2; /** B */ + cocos2d::Vec2 *arg3; /** C */ + cocos2d::Vec2 *arg4; /** D */ float *arg5 = nullptr; /** S */ olua_check_object(L, 1, &arg1, "cc.Vec2"); olua_check_object(L, 2, &arg2, "cc.Vec2"); olua_check_object(L, 3, &arg3, "cc.Vec2"); olua_check_object(L, 4, &arg4, "cc.Vec2"); - olua_check_pointer(L, 5, &arg5, "olua.float"); + olua_check_valueptr(L, 5, &arg5, "olua.float"); - // static bool isLineIntersect(const cocos2d::Vec2 &A, const cocos2d::Vec2 &B, const cocos2d::Vec2 &C, const cocos2d::Vec2 &D, @optional float *S, @optional float *T) - bool ret = cocos2d::Vec2::isLineIntersect(arg1, arg2, arg3, arg4, arg5); + // static bool isLineIntersect(const cocos2d::Vec2 &A, const cocos2d::Vec2 &B, const cocos2d::Vec2 &C, const cocos2d::Vec2 &D, @optional float *S) + bool ret = cocos2d::Vec2::isLineIntersect(*arg1, *arg2, *arg3, *arg4, arg5); int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); @@ -928,28 +901,28 @@ static int _cocos2d_Vec2_isLineIntersect$3(lua_State *L) return num_ret; } -static int _cocos2d_Vec2_isLineIntersect(lua_State *L) +static int _olua_fun_cocos2d_Vec2_isLineIntersect(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 4) { // if ((olua_is_object(L, 1, "cc.Vec2")) && (olua_is_object(L, 2, "cc.Vec2")) && (olua_is_object(L, 3, "cc.Vec2")) && (olua_is_object(L, 4, "cc.Vec2"))) { - // static bool isLineIntersect(const cocos2d::Vec2 &A, const cocos2d::Vec2 &B, const cocos2d::Vec2 &C, const cocos2d::Vec2 &D, @optional float *S, @optional float *T) - return _cocos2d_Vec2_isLineIntersect$2(L); + // static bool isLineIntersect(const cocos2d::Vec2 &A, const cocos2d::Vec2 &B, const cocos2d::Vec2 &C, const cocos2d::Vec2 &D) + return _olua_fun_cocos2d_Vec2_isLineIntersect$2(L); // } } if (num_args == 5) { - // if ((olua_is_object(L, 1, "cc.Vec2")) && (olua_is_object(L, 2, "cc.Vec2")) && (olua_is_object(L, 3, "cc.Vec2")) && (olua_is_object(L, 4, "cc.Vec2")) && (olua_is_pointer(L, 5, "olua.float"))) { - // static bool isLineIntersect(const cocos2d::Vec2 &A, const cocos2d::Vec2 &B, const cocos2d::Vec2 &C, const cocos2d::Vec2 &D, @optional float *S, @optional float *T) - return _cocos2d_Vec2_isLineIntersect$3(L); + // if ((olua_is_object(L, 1, "cc.Vec2")) && (olua_is_object(L, 2, "cc.Vec2")) && (olua_is_object(L, 3, "cc.Vec2")) && (olua_is_object(L, 4, "cc.Vec2")) && (olua_is_valueptr(L, 5, "olua.float"))) { + // static bool isLineIntersect(const cocos2d::Vec2 &A, const cocos2d::Vec2 &B, const cocos2d::Vec2 &C, const cocos2d::Vec2 &D, @optional float *S) + return _olua_fun_cocos2d_Vec2_isLineIntersect$3(L); // } } if (num_args == 6) { - // if ((olua_is_object(L, 1, "cc.Vec2")) && (olua_is_object(L, 2, "cc.Vec2")) && (olua_is_object(L, 3, "cc.Vec2")) && (olua_is_object(L, 4, "cc.Vec2")) && (olua_is_pointer(L, 5, "olua.float")) && (olua_is_pointer(L, 6, "olua.float"))) { + // if ((olua_is_object(L, 1, "cc.Vec2")) && (olua_is_object(L, 2, "cc.Vec2")) && (olua_is_object(L, 3, "cc.Vec2")) && (olua_is_object(L, 4, "cc.Vec2")) && (olua_is_valueptr(L, 5, "olua.float")) && (olua_is_valueptr(L, 6, "olua.float"))) { // static bool isLineIntersect(const cocos2d::Vec2 &A, const cocos2d::Vec2 &B, const cocos2d::Vec2 &C, const cocos2d::Vec2 &D, @optional float *S, @optional float *T) - return _cocos2d_Vec2_isLineIntersect$1(L); + return _olua_fun_cocos2d_Vec2_isLineIntersect$1(L); // } } @@ -958,14 +931,14 @@ static int _cocos2d_Vec2_isLineIntersect(lua_State *L) return 0; } -static int _cocos2d_Vec2_isLineOverlap(lua_State *L) +static int _olua_fun_cocos2d_Vec2_isLineOverlap(lua_State *L) { olua_startinvoke(L); - cocos2d::Vec2 arg1; /** A */ - cocos2d::Vec2 arg2; /** B */ - cocos2d::Vec2 arg3; /** C */ - cocos2d::Vec2 arg4; /** D */ + cocos2d::Vec2 *arg1; /** A */ + cocos2d::Vec2 *arg2; /** B */ + cocos2d::Vec2 *arg3; /** C */ + cocos2d::Vec2 *arg4; /** D */ olua_check_object(L, 1, &arg1, "cc.Vec2"); olua_check_object(L, 2, &arg2, "cc.Vec2"); @@ -973,7 +946,7 @@ static int _cocos2d_Vec2_isLineOverlap(lua_State *L) olua_check_object(L, 4, &arg4, "cc.Vec2"); // static bool isLineOverlap(const cocos2d::Vec2 &A, const cocos2d::Vec2 &B, const cocos2d::Vec2 &C, const cocos2d::Vec2 &D) - bool ret = cocos2d::Vec2::isLineOverlap(arg1, arg2, arg3, arg4); + bool ret = cocos2d::Vec2::isLineOverlap(*arg1, *arg2, *arg3, *arg4); int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); @@ -981,14 +954,14 @@ static int _cocos2d_Vec2_isLineOverlap(lua_State *L) return num_ret; } -static int _cocos2d_Vec2_isLineParallel(lua_State *L) +static int _olua_fun_cocos2d_Vec2_isLineParallel(lua_State *L) { olua_startinvoke(L); - cocos2d::Vec2 arg1; /** A */ - cocos2d::Vec2 arg2; /** B */ - cocos2d::Vec2 arg3; /** C */ - cocos2d::Vec2 arg4; /** D */ + cocos2d::Vec2 *arg1; /** A */ + cocos2d::Vec2 *arg2; /** B */ + cocos2d::Vec2 *arg3; /** C */ + cocos2d::Vec2 *arg4; /** D */ olua_check_object(L, 1, &arg1, "cc.Vec2"); olua_check_object(L, 2, &arg2, "cc.Vec2"); @@ -996,7 +969,7 @@ static int _cocos2d_Vec2_isLineParallel(lua_State *L) olua_check_object(L, 4, &arg4, "cc.Vec2"); // static bool isLineParallel(const cocos2d::Vec2 &A, const cocos2d::Vec2 &B, const cocos2d::Vec2 &C, const cocos2d::Vec2 &D) - bool ret = cocos2d::Vec2::isLineParallel(arg1, arg2, arg3, arg4); + bool ret = cocos2d::Vec2::isLineParallel(*arg1, *arg2, *arg3, *arg4); int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); @@ -1004,7 +977,7 @@ static int _cocos2d_Vec2_isLineParallel(lua_State *L) return num_ret; } -static int _cocos2d_Vec2_isOne(lua_State *L) +static int _olua_fun_cocos2d_Vec2_isOne(lua_State *L) { olua_startinvoke(L); @@ -1021,14 +994,14 @@ static int _cocos2d_Vec2_isOne(lua_State *L) return num_ret; } -static int _cocos2d_Vec2_isSegmentIntersect(lua_State *L) +static int _olua_fun_cocos2d_Vec2_isSegmentIntersect(lua_State *L) { olua_startinvoke(L); - cocos2d::Vec2 arg1; /** A */ - cocos2d::Vec2 arg2; /** B */ - cocos2d::Vec2 arg3; /** C */ - cocos2d::Vec2 arg4; /** D */ + cocos2d::Vec2 *arg1; /** A */ + cocos2d::Vec2 *arg2; /** B */ + cocos2d::Vec2 *arg3; /** C */ + cocos2d::Vec2 *arg4; /** D */ olua_check_object(L, 1, &arg1, "cc.Vec2"); olua_check_object(L, 2, &arg2, "cc.Vec2"); @@ -1036,7 +1009,7 @@ static int _cocos2d_Vec2_isSegmentIntersect(lua_State *L) olua_check_object(L, 4, &arg4, "cc.Vec2"); // static bool isSegmentIntersect(const cocos2d::Vec2 &A, const cocos2d::Vec2 &B, const cocos2d::Vec2 &C, const cocos2d::Vec2 &D) - bool ret = cocos2d::Vec2::isSegmentIntersect(arg1, arg2, arg3, arg4); + bool ret = cocos2d::Vec2::isSegmentIntersect(*arg1, *arg2, *arg3, *arg4); int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); @@ -1044,14 +1017,14 @@ static int _cocos2d_Vec2_isSegmentIntersect(lua_State *L) return num_ret; } -static int _cocos2d_Vec2_isSegmentOverlap$1(lua_State *L) +static int _olua_fun_cocos2d_Vec2_isSegmentOverlap$1(lua_State *L) { olua_startinvoke(L); - cocos2d::Vec2 arg1; /** A */ - cocos2d::Vec2 arg2; /** B */ - cocos2d::Vec2 arg3; /** C */ - cocos2d::Vec2 arg4; /** D */ + cocos2d::Vec2 *arg1; /** A */ + cocos2d::Vec2 *arg2; /** B */ + cocos2d::Vec2 *arg3; /** C */ + cocos2d::Vec2 *arg4; /** D */ cocos2d::Vec2 *arg5 = nullptr; /** S */ cocos2d::Vec2 *arg6 = nullptr; /** E */ @@ -1063,7 +1036,7 @@ static int _cocos2d_Vec2_isSegmentOverlap$1(lua_State *L) olua_check_object(L, 6, &arg6, "cc.Vec2"); // static bool isSegmentOverlap(const cocos2d::Vec2 &A, const cocos2d::Vec2 &B, const cocos2d::Vec2 &C, const cocos2d::Vec2 &D, @optional cocos2d::Vec2 *S, @optional cocos2d::Vec2 *E) - bool ret = cocos2d::Vec2::isSegmentOverlap(arg1, arg2, arg3, arg4, arg5, arg6); + bool ret = cocos2d::Vec2::isSegmentOverlap(*arg1, *arg2, *arg3, *arg4, arg5, arg6); int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); @@ -1071,22 +1044,22 @@ static int _cocos2d_Vec2_isSegmentOverlap$1(lua_State *L) return num_ret; } -static int _cocos2d_Vec2_isSegmentOverlap$2(lua_State *L) +static int _olua_fun_cocos2d_Vec2_isSegmentOverlap$2(lua_State *L) { olua_startinvoke(L); - cocos2d::Vec2 arg1; /** A */ - cocos2d::Vec2 arg2; /** B */ - cocos2d::Vec2 arg3; /** C */ - cocos2d::Vec2 arg4; /** D */ + cocos2d::Vec2 *arg1; /** A */ + cocos2d::Vec2 *arg2; /** B */ + cocos2d::Vec2 *arg3; /** C */ + cocos2d::Vec2 *arg4; /** D */ olua_check_object(L, 1, &arg1, "cc.Vec2"); olua_check_object(L, 2, &arg2, "cc.Vec2"); olua_check_object(L, 3, &arg3, "cc.Vec2"); olua_check_object(L, 4, &arg4, "cc.Vec2"); - // static bool isSegmentOverlap(const cocos2d::Vec2 &A, const cocos2d::Vec2 &B, const cocos2d::Vec2 &C, const cocos2d::Vec2 &D, @optional cocos2d::Vec2 *S, @optional cocos2d::Vec2 *E) - bool ret = cocos2d::Vec2::isSegmentOverlap(arg1, arg2, arg3, arg4); + // static bool isSegmentOverlap(const cocos2d::Vec2 &A, const cocos2d::Vec2 &B, const cocos2d::Vec2 &C, const cocos2d::Vec2 &D) + bool ret = cocos2d::Vec2::isSegmentOverlap(*arg1, *arg2, *arg3, *arg4); int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); @@ -1094,14 +1067,14 @@ static int _cocos2d_Vec2_isSegmentOverlap$2(lua_State *L) return num_ret; } -static int _cocos2d_Vec2_isSegmentOverlap$3(lua_State *L) +static int _olua_fun_cocos2d_Vec2_isSegmentOverlap$3(lua_State *L) { olua_startinvoke(L); - cocos2d::Vec2 arg1; /** A */ - cocos2d::Vec2 arg2; /** B */ - cocos2d::Vec2 arg3; /** C */ - cocos2d::Vec2 arg4; /** D */ + cocos2d::Vec2 *arg1; /** A */ + cocos2d::Vec2 *arg2; /** B */ + cocos2d::Vec2 *arg3; /** C */ + cocos2d::Vec2 *arg4; /** D */ cocos2d::Vec2 *arg5 = nullptr; /** S */ olua_check_object(L, 1, &arg1, "cc.Vec2"); @@ -1110,8 +1083,8 @@ static int _cocos2d_Vec2_isSegmentOverlap$3(lua_State *L) olua_check_object(L, 4, &arg4, "cc.Vec2"); olua_check_object(L, 5, &arg5, "cc.Vec2"); - // static bool isSegmentOverlap(const cocos2d::Vec2 &A, const cocos2d::Vec2 &B, const cocos2d::Vec2 &C, const cocos2d::Vec2 &D, @optional cocos2d::Vec2 *S, @optional cocos2d::Vec2 *E) - bool ret = cocos2d::Vec2::isSegmentOverlap(arg1, arg2, arg3, arg4, arg5); + // static bool isSegmentOverlap(const cocos2d::Vec2 &A, const cocos2d::Vec2 &B, const cocos2d::Vec2 &C, const cocos2d::Vec2 &D, @optional cocos2d::Vec2 *S) + bool ret = cocos2d::Vec2::isSegmentOverlap(*arg1, *arg2, *arg3, *arg4, arg5); int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); @@ -1119,28 +1092,28 @@ static int _cocos2d_Vec2_isSegmentOverlap$3(lua_State *L) return num_ret; } -static int _cocos2d_Vec2_isSegmentOverlap(lua_State *L) +static int _olua_fun_cocos2d_Vec2_isSegmentOverlap(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 4) { // if ((olua_is_object(L, 1, "cc.Vec2")) && (olua_is_object(L, 2, "cc.Vec2")) && (olua_is_object(L, 3, "cc.Vec2")) && (olua_is_object(L, 4, "cc.Vec2"))) { - // static bool isSegmentOverlap(const cocos2d::Vec2 &A, const cocos2d::Vec2 &B, const cocos2d::Vec2 &C, const cocos2d::Vec2 &D, @optional cocos2d::Vec2 *S, @optional cocos2d::Vec2 *E) - return _cocos2d_Vec2_isSegmentOverlap$2(L); + // static bool isSegmentOverlap(const cocos2d::Vec2 &A, const cocos2d::Vec2 &B, const cocos2d::Vec2 &C, const cocos2d::Vec2 &D) + return _olua_fun_cocos2d_Vec2_isSegmentOverlap$2(L); // } } if (num_args == 5) { // if ((olua_is_object(L, 1, "cc.Vec2")) && (olua_is_object(L, 2, "cc.Vec2")) && (olua_is_object(L, 3, "cc.Vec2")) && (olua_is_object(L, 4, "cc.Vec2")) && (olua_is_object(L, 5, "cc.Vec2"))) { - // static bool isSegmentOverlap(const cocos2d::Vec2 &A, const cocos2d::Vec2 &B, const cocos2d::Vec2 &C, const cocos2d::Vec2 &D, @optional cocos2d::Vec2 *S, @optional cocos2d::Vec2 *E) - return _cocos2d_Vec2_isSegmentOverlap$3(L); + // static bool isSegmentOverlap(const cocos2d::Vec2 &A, const cocos2d::Vec2 &B, const cocos2d::Vec2 &C, const cocos2d::Vec2 &D, @optional cocos2d::Vec2 *S) + return _olua_fun_cocos2d_Vec2_isSegmentOverlap$3(L); // } } if (num_args == 6) { // if ((olua_is_object(L, 1, "cc.Vec2")) && (olua_is_object(L, 2, "cc.Vec2")) && (olua_is_object(L, 3, "cc.Vec2")) && (olua_is_object(L, 4, "cc.Vec2")) && (olua_is_object(L, 5, "cc.Vec2")) && (olua_is_object(L, 6, "cc.Vec2"))) { // static bool isSegmentOverlap(const cocos2d::Vec2 &A, const cocos2d::Vec2 &B, const cocos2d::Vec2 &C, const cocos2d::Vec2 &D, @optional cocos2d::Vec2 *S, @optional cocos2d::Vec2 *E) - return _cocos2d_Vec2_isSegmentOverlap$1(L); + return _olua_fun_cocos2d_Vec2_isSegmentOverlap$1(L); // } } @@ -1149,7 +1122,7 @@ static int _cocos2d_Vec2_isSegmentOverlap(lua_State *L) return 0; } -static int _cocos2d_Vec2_isZero(lua_State *L) +static int _olua_fun_cocos2d_Vec2_isZero(lua_State *L) { olua_startinvoke(L); @@ -1166,7 +1139,7 @@ static int _cocos2d_Vec2_isZero(lua_State *L) return num_ret; } -static int _cocos2d_Vec2_length(lua_State *L) +static int _olua_fun_cocos2d_Vec2_length(lua_State *L) { olua_startinvoke(L); @@ -1183,7 +1156,7 @@ static int _cocos2d_Vec2_length(lua_State *L) return num_ret; } -static int _cocos2d_Vec2_lengthSquared(lua_State *L) +static int _olua_fun_cocos2d_Vec2_lengthSquared(lua_State *L) { olua_startinvoke(L); @@ -1200,12 +1173,12 @@ static int _cocos2d_Vec2_lengthSquared(lua_State *L) return num_ret; } -static int _cocos2d_Vec2_lerp(lua_State *L) +static int _olua_fun_cocos2d_Vec2_lerp(lua_State *L) { olua_startinvoke(L); cocos2d::Vec2 *self = nullptr; - cocos2d::Vec2 arg1; /** other */ + cocos2d::Vec2 *arg1; /** other */ float arg2 = 0; /** alpha */ olua_to_object(L, 1, &self, "cc.Vec2"); @@ -1213,15 +1186,15 @@ static int _cocos2d_Vec2_lerp(lua_State *L) olua_check_number(L, 3, &arg2); // cocos2d::Vec2 lerp(const cocos2d::Vec2 &other, float alpha) - cocos2d::Vec2 ret = self->lerp(arg1, arg2); - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec2"); + cocos2d::Vec2 ret = self->lerp(*arg1, arg2); + int num_ret = olua_copy_object(L, ret, "cc.Vec2"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_Vec2_negate(lua_State *L) +static int _olua_fun_cocos2d_Vec2_negate(lua_State *L) { olua_startinvoke(L); @@ -1237,11 +1210,11 @@ static int _cocos2d_Vec2_negate(lua_State *L) return 0; } -static int _cocos2d_Vec2_new$1(lua_State *L) +static int _olua_fun_cocos2d_Vec2_new$1(lua_State *L) { olua_startinvoke(L); - // Vec2() + // cocos2d::Vec2() cocos2d::Vec2 *ret = new cocos2d::Vec2(); int num_ret = olua_push_object(L, ret, "cc.Vec2"); olua_postnew(L, ret); @@ -1251,7 +1224,7 @@ static int _cocos2d_Vec2_new$1(lua_State *L) return num_ret; } -static int _cocos2d_Vec2_new$2(lua_State *L) +static int _olua_fun_cocos2d_Vec2_new$2(lua_State *L) { olua_startinvoke(L); @@ -1261,7 +1234,7 @@ static int _cocos2d_Vec2_new$2(lua_State *L) olua_check_number(L, 1, &arg1); olua_check_number(L, 2, &arg2); - // Vec2(float xx, float yy) + // cocos2d::Vec2(float xx, float yy) cocos2d::Vec2 *ret = new cocos2d::Vec2(arg1, arg2); int num_ret = olua_push_object(L, ret, "cc.Vec2"); olua_postnew(L, ret); @@ -1271,15 +1244,15 @@ static int _cocos2d_Vec2_new$2(lua_State *L) return num_ret; } -static int _cocos2d_Vec2_new$3(lua_State *L) +static int _olua_fun_cocos2d_Vec2_new$3(lua_State *L) { olua_startinvoke(L); float *arg1 = nullptr; /** array */ - olua_check_pointer(L, 1, &arg1, "olua.float"); + olua_check_valueptr(L, 1, &arg1, "olua.float"); - // Vec2(const float *array) + // cocos2d::Vec2(const float *array) cocos2d::Vec2 *ret = new cocos2d::Vec2(arg1); int num_ret = olua_push_object(L, ret, "cc.Vec2"); olua_postnew(L, ret); @@ -1289,18 +1262,18 @@ static int _cocos2d_Vec2_new$3(lua_State *L) return num_ret; } -static int _cocos2d_Vec2_new$4(lua_State *L) +static int _olua_fun_cocos2d_Vec2_new$4(lua_State *L) { olua_startinvoke(L); - cocos2d::Vec2 arg1; /** p1 */ - cocos2d::Vec2 arg2; /** p2 */ + cocos2d::Vec2 *arg1; /** p1 */ + cocos2d::Vec2 *arg2; /** p2 */ olua_check_object(L, 1, &arg1, "cc.Vec2"); olua_check_object(L, 2, &arg2, "cc.Vec2"); - // Vec2(const cocos2d::Vec2 &p1, const cocos2d::Vec2 &p2) - cocos2d::Vec2 *ret = new cocos2d::Vec2(arg1, arg2); + // cocos2d::Vec2(const cocos2d::Vec2 &p1, const cocos2d::Vec2 &p2) + cocos2d::Vec2 *ret = new cocos2d::Vec2(*arg1, *arg2); int num_ret = olua_push_object(L, ret, "cc.Vec2"); olua_postnew(L, ret); @@ -1309,31 +1282,31 @@ static int _cocos2d_Vec2_new$4(lua_State *L) return num_ret; } -static int _cocos2d_Vec2_new(lua_State *L) +static int _olua_fun_cocos2d_Vec2_new(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 0) { - // Vec2() - return _cocos2d_Vec2_new$1(L); + // cocos2d::Vec2() + return _olua_fun_cocos2d_Vec2_new$1(L); } if (num_args == 1) { - // if ((olua_is_pointer(L, 1, "olua.float"))) { - // Vec2(const float *array) - return _cocos2d_Vec2_new$3(L); + // if ((olua_is_valueptr(L, 1, "olua.float"))) { + // cocos2d::Vec2(const float *array) + return _olua_fun_cocos2d_Vec2_new$3(L); // } } if (num_args == 2) { if ((olua_is_object(L, 1, "cc.Vec2")) && (olua_is_object(L, 2, "cc.Vec2"))) { - // Vec2(const cocos2d::Vec2 &p1, const cocos2d::Vec2 &p2) - return _cocos2d_Vec2_new$4(L); + // cocos2d::Vec2(const cocos2d::Vec2 &p1, const cocos2d::Vec2 &p2) + return _olua_fun_cocos2d_Vec2_new$4(L); } // if ((olua_is_number(L, 1)) && (olua_is_number(L, 2))) { - // Vec2(float xx, float yy) - return _cocos2d_Vec2_new$2(L); + // cocos2d::Vec2(float xx, float yy) + return _olua_fun_cocos2d_Vec2_new$2(L); // } } @@ -1342,7 +1315,7 @@ static int _cocos2d_Vec2_new(lua_State *L) return 0; } -static int _cocos2d_Vec2_normalize(lua_State *L) +static int _olua_fun_cocos2d_Vec2_normalize(lua_State *L) { olua_startinvoke(L); @@ -1358,31 +1331,31 @@ static int _cocos2d_Vec2_normalize(lua_State *L) return 0; } -static int _cocos2d_Vec2_project(lua_State *L) +static int _olua_fun_cocos2d_Vec2_project(lua_State *L) { olua_startinvoke(L); cocos2d::Vec2 *self = nullptr; - cocos2d::Vec2 arg1; /** other */ + cocos2d::Vec2 *arg1; /** other */ olua_to_object(L, 1, &self, "cc.Vec2"); olua_check_object(L, 2, &arg1, "cc.Vec2"); // cocos2d::Vec2 project(const cocos2d::Vec2 &other) - cocos2d::Vec2 ret = self->project(arg1); - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec2"); + cocos2d::Vec2 ret = self->project(*arg1); + int num_ret = olua_copy_object(L, ret, "cc.Vec2"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_Vec2_rotate$1(lua_State *L) +static int _olua_fun_cocos2d_Vec2_rotate$1(lua_State *L) { olua_startinvoke(L); cocos2d::Vec2 *self = nullptr; - cocos2d::Vec2 arg1; /** point */ + cocos2d::Vec2 *arg1; /** point */ float arg2 = 0; /** angle */ olua_to_object(L, 1, &self, "cc.Vec2"); @@ -1390,47 +1363,47 @@ static int _cocos2d_Vec2_rotate$1(lua_State *L) olua_check_number(L, 3, &arg2); // void rotate(const cocos2d::Vec2 &point, float angle) - self->rotate(arg1, arg2); + self->rotate(*arg1, arg2); olua_endinvoke(L); return 0; } -static int _cocos2d_Vec2_rotate$2(lua_State *L) +static int _olua_fun_cocos2d_Vec2_rotate$2(lua_State *L) { olua_startinvoke(L); cocos2d::Vec2 *self = nullptr; - cocos2d::Vec2 arg1; /** other */ + cocos2d::Vec2 *arg1; /** other */ olua_to_object(L, 1, &self, "cc.Vec2"); olua_check_object(L, 2, &arg1, "cc.Vec2"); // cocos2d::Vec2 rotate(const cocos2d::Vec2 &other) - cocos2d::Vec2 ret = self->rotate(arg1); - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec2"); + cocos2d::Vec2 ret = self->rotate(*arg1); + int num_ret = olua_copy_object(L, ret, "cc.Vec2"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_Vec2_rotate(lua_State *L) +static int _olua_fun_cocos2d_Vec2_rotate(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_object(L, 2, "cc.Vec2"))) { // cocos2d::Vec2 rotate(const cocos2d::Vec2 &other) - return _cocos2d_Vec2_rotate$2(L); + return _olua_fun_cocos2d_Vec2_rotate$2(L); // } } if (num_args == 2) { // if ((olua_is_object(L, 2, "cc.Vec2")) && (olua_is_number(L, 3))) { // void rotate(const cocos2d::Vec2 &point, float angle) - return _cocos2d_Vec2_rotate$1(L); + return _olua_fun_cocos2d_Vec2_rotate$1(L); // } } @@ -1439,12 +1412,12 @@ static int _cocos2d_Vec2_rotate(lua_State *L) return 0; } -static int _cocos2d_Vec2_rotateByAngle(lua_State *L) +static int _olua_fun_cocos2d_Vec2_rotateByAngle(lua_State *L) { olua_startinvoke(L); cocos2d::Vec2 *self = nullptr; - cocos2d::Vec2 arg1; /** pivot */ + cocos2d::Vec2 *arg1; /** pivot */ float arg2 = 0; /** angle */ olua_to_object(L, 1, &self, "cc.Vec2"); @@ -1452,15 +1425,15 @@ static int _cocos2d_Vec2_rotateByAngle(lua_State *L) olua_check_number(L, 3, &arg2); // cocos2d::Vec2 rotateByAngle(const cocos2d::Vec2 &pivot, float angle) - cocos2d::Vec2 ret = self->rotateByAngle(arg1, arg2); - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec2"); + cocos2d::Vec2 ret = self->rotateByAngle(*arg1, arg2); + int num_ret = olua_copy_object(L, ret, "cc.Vec2"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_Vec2_scale$1(lua_State *L) +static int _olua_fun_cocos2d_Vec2_scale$1(lua_State *L) { olua_startinvoke(L); @@ -1478,37 +1451,37 @@ static int _cocos2d_Vec2_scale$1(lua_State *L) return 0; } -static int _cocos2d_Vec2_scale$2(lua_State *L) +static int _olua_fun_cocos2d_Vec2_scale$2(lua_State *L) { olua_startinvoke(L); cocos2d::Vec2 *self = nullptr; - cocos2d::Vec2 arg1; /** scale */ + cocos2d::Vec2 *arg1; /** scale */ olua_to_object(L, 1, &self, "cc.Vec2"); olua_check_object(L, 2, &arg1, "cc.Vec2"); // void scale(const cocos2d::Vec2 &scale) - self->scale(arg1); + self->scale(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_Vec2_scale(lua_State *L) +static int _olua_fun_cocos2d_Vec2_scale(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { if ((olua_is_object(L, 2, "cc.Vec2"))) { // void scale(const cocos2d::Vec2 &scale) - return _cocos2d_Vec2_scale$2(L); + return _olua_fun_cocos2d_Vec2_scale$2(L); } // if ((olua_is_number(L, 2))) { // void scale(float scalar) - return _cocos2d_Vec2_scale$1(L); + return _olua_fun_cocos2d_Vec2_scale$1(L); // } } @@ -1517,7 +1490,7 @@ static int _cocos2d_Vec2_scale(lua_State *L) return 0; } -static int _cocos2d_Vec2_set$1(lua_State *L) +static int _olua_fun_cocos2d_Vec2_set$1(lua_State *L) { olua_startinvoke(L); @@ -1537,7 +1510,7 @@ static int _cocos2d_Vec2_set$1(lua_State *L) return 0; } -static int _cocos2d_Vec2_set$2(lua_State *L) +static int _olua_fun_cocos2d_Vec2_set$2(lua_State *L) { olua_startinvoke(L); @@ -1545,7 +1518,7 @@ static int _cocos2d_Vec2_set$2(lua_State *L) float *arg1 = nullptr; /** array */ olua_to_object(L, 1, &self, "cc.Vec2"); - olua_check_pointer(L, 2, &arg1, "olua.float"); + olua_check_valueptr(L, 2, &arg1, "olua.float"); // void set(const float *array) self->set(arg1); @@ -1555,69 +1528,69 @@ static int _cocos2d_Vec2_set$2(lua_State *L) return 0; } -static int _cocos2d_Vec2_set$3(lua_State *L) +static int _olua_fun_cocos2d_Vec2_set$3(lua_State *L) { olua_startinvoke(L); cocos2d::Vec2 *self = nullptr; - cocos2d::Vec2 arg1; /** v */ + cocos2d::Vec2 *arg1; /** v */ olua_to_object(L, 1, &self, "cc.Vec2"); olua_check_object(L, 2, &arg1, "cc.Vec2"); // void set(const cocos2d::Vec2 &v) - self->set(arg1); + self->set(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_Vec2_set$4(lua_State *L) +static int _olua_fun_cocos2d_Vec2_set$4(lua_State *L) { olua_startinvoke(L); cocos2d::Vec2 *self = nullptr; - cocos2d::Vec2 arg1; /** p1 */ - cocos2d::Vec2 arg2; /** p2 */ + cocos2d::Vec2 *arg1; /** p1 */ + cocos2d::Vec2 *arg2; /** p2 */ olua_to_object(L, 1, &self, "cc.Vec2"); olua_check_object(L, 2, &arg1, "cc.Vec2"); olua_check_object(L, 3, &arg2, "cc.Vec2"); // void set(const cocos2d::Vec2 &p1, const cocos2d::Vec2 &p2) - self->set(arg1, arg2); + self->set(*arg1, *arg2); olua_endinvoke(L); return 0; } -static int _cocos2d_Vec2_set(lua_State *L) +static int _olua_fun_cocos2d_Vec2_set(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { if ((olua_is_object(L, 2, "cc.Vec2"))) { // void set(const cocos2d::Vec2 &v) - return _cocos2d_Vec2_set$3(L); + return _olua_fun_cocos2d_Vec2_set$3(L); } - // if ((olua_is_pointer(L, 2, "olua.float"))) { + // if ((olua_is_valueptr(L, 2, "olua.float"))) { // void set(const float *array) - return _cocos2d_Vec2_set$2(L); + return _olua_fun_cocos2d_Vec2_set$2(L); // } } if (num_args == 2) { if ((olua_is_object(L, 2, "cc.Vec2")) && (olua_is_object(L, 3, "cc.Vec2"))) { // void set(const cocos2d::Vec2 &p1, const cocos2d::Vec2 &p2) - return _cocos2d_Vec2_set$4(L); + return _olua_fun_cocos2d_Vec2_set$4(L); } // if ((olua_is_number(L, 2)) && (olua_is_number(L, 3))) { // void set(float xx, float yy) - return _cocos2d_Vec2_set$1(L); + return _olua_fun_cocos2d_Vec2_set$1(L); // } } @@ -1626,7 +1599,7 @@ static int _cocos2d_Vec2_set(lua_State *L) return 0; } -static int _cocos2d_Vec2_setPoint(lua_State *L) +static int _olua_fun_cocos2d_Vec2_setPoint(lua_State *L) { olua_startinvoke(L); @@ -1646,7 +1619,7 @@ static int _cocos2d_Vec2_setPoint(lua_State *L) return 0; } -static int _cocos2d_Vec2_setZero(lua_State *L) +static int _olua_fun_cocos2d_Vec2_setZero(lua_State *L) { olua_startinvoke(L); @@ -1662,12 +1635,12 @@ static int _cocos2d_Vec2_setZero(lua_State *L) return 0; } -static int _cocos2d_Vec2_smooth(lua_State *L) +static int _olua_fun_cocos2d_Vec2_smooth(lua_State *L) { olua_startinvoke(L); cocos2d::Vec2 *self = nullptr; - cocos2d::Vec2 arg1; /** target */ + cocos2d::Vec2 *arg1; /** target */ float arg2 = 0; /** elapsedTime */ float arg3 = 0; /** responseTime */ @@ -1677,37 +1650,37 @@ static int _cocos2d_Vec2_smooth(lua_State *L) olua_check_number(L, 4, &arg3); // void smooth(const cocos2d::Vec2 &target, float elapsedTime, float responseTime) - self->smooth(arg1, arg2, arg3); + self->smooth(*arg1, arg2, arg3); olua_endinvoke(L); return 0; } -static int _cocos2d_Vec2_subtract$1(lua_State *L) +static int _olua_fun_cocos2d_Vec2_subtract$1(lua_State *L) { olua_startinvoke(L); cocos2d::Vec2 *self = nullptr; - cocos2d::Vec2 arg1; /** v */ + cocos2d::Vec2 *arg1; /** v */ olua_to_object(L, 1, &self, "cc.Vec2"); olua_check_object(L, 2, &arg1, "cc.Vec2"); // void subtract(const cocos2d::Vec2 &v) - self->subtract(arg1); + self->subtract(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_Vec2_subtract$2(lua_State *L) +static int _olua_fun_cocos2d_Vec2_subtract$2(lua_State *L) { olua_startinvoke(L); - cocos2d::Vec2 arg1; /** v1 */ - cocos2d::Vec2 arg2; /** v2 */ + cocos2d::Vec2 *arg1; /** v1 */ + cocos2d::Vec2 *arg2; /** v2 */ cocos2d::Vec2 *arg3 = nullptr; /** dst */ olua_check_object(L, 1, &arg1, "cc.Vec2"); @@ -1715,28 +1688,28 @@ static int _cocos2d_Vec2_subtract$2(lua_State *L) olua_check_object(L, 3, &arg3, "cc.Vec2"); // static void subtract(const cocos2d::Vec2 &v1, const cocos2d::Vec2 &v2, cocos2d::Vec2 *dst) - cocos2d::Vec2::subtract(arg1, arg2, arg3); + cocos2d::Vec2::subtract(*arg1, *arg2, arg3); olua_endinvoke(L); return 0; } -static int _cocos2d_Vec2_subtract(lua_State *L) +static int _olua_fun_cocos2d_Vec2_subtract(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_object(L, 2, "cc.Vec2"))) { // void subtract(const cocos2d::Vec2 &v) - return _cocos2d_Vec2_subtract$1(L); + return _olua_fun_cocos2d_Vec2_subtract$1(L); // } } if (num_args == 3) { // if ((olua_is_object(L, 1, "cc.Vec2")) && (olua_is_object(L, 2, "cc.Vec2")) && (olua_is_object(L, 3, "cc.Vec2"))) { // static void subtract(const cocos2d::Vec2 &v1, const cocos2d::Vec2 &v2, cocos2d::Vec2 *dst) - return _cocos2d_Vec2_subtract$2(L); + return _olua_fun_cocos2d_Vec2_subtract$2(L); // } } @@ -1745,26 +1718,26 @@ static int _cocos2d_Vec2_subtract(lua_State *L) return 0; } -static int _cocos2d_Vec2_unrotate(lua_State *L) +static int _olua_fun_cocos2d_Vec2_unrotate(lua_State *L) { olua_startinvoke(L); cocos2d::Vec2 *self = nullptr; - cocos2d::Vec2 arg1; /** other */ + cocos2d::Vec2 *arg1; /** other */ olua_to_object(L, 1, &self, "cc.Vec2"); olua_check_object(L, 2, &arg1, "cc.Vec2"); // cocos2d::Vec2 unrotate(const cocos2d::Vec2 &other) - cocos2d::Vec2 ret = self->unrotate(arg1); - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec2"); + cocos2d::Vec2 ret = self->unrotate(*arg1); + int num_ret = olua_copy_object(L, ret, "cc.Vec2"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_Vec2_get_x(lua_State *L) +static int _olua_fun_cocos2d_Vec2_x$1(lua_State *L) { olua_startinvoke(L); @@ -1781,7 +1754,7 @@ static int _cocos2d_Vec2_get_x(lua_State *L) return num_ret; } -static int _cocos2d_Vec2_set_x(lua_State *L) +static int _olua_fun_cocos2d_Vec2_x$2(lua_State *L) { olua_startinvoke(L); @@ -1799,7 +1772,28 @@ static int _cocos2d_Vec2_set_x(lua_State *L) return 0; } -static int _cocos2d_Vec2_get_y(lua_State *L) +static int _olua_fun_cocos2d_Vec2_x(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float x + return _olua_fun_cocos2d_Vec2_x$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float x + return _olua_fun_cocos2d_Vec2_x$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::Vec2::x' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_Vec2_y$1(lua_State *L) { olua_startinvoke(L); @@ -1816,7 +1810,7 @@ static int _cocos2d_Vec2_get_y(lua_State *L) return num_ret; } -static int _cocos2d_Vec2_set_y(lua_State *L) +static int _olua_fun_cocos2d_Vec2_y$2(lua_State *L) { olua_startinvoke(L); @@ -1834,67 +1828,85 @@ static int _cocos2d_Vec2_set_y(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_Vec2(lua_State *L) +static int _olua_fun_cocos2d_Vec2_y(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float y + return _olua_fun_cocos2d_Vec2_y$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float y + return _olua_fun_cocos2d_Vec2_y$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::Vec2::y' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_cls_cc_Vec2(lua_State *L) { oluacls_class(L, "cc.Vec2"); - oluacls_func(L, "__call", _cocos2d_Vec2___call); - oluacls_func(L, "__gc", _cocos2d_Vec2___gc); - oluacls_func(L, "__olua_move", _cocos2d_Vec2___olua_move); - oluacls_func(L, "add", _cocos2d_Vec2_add); - oluacls_func(L, "angle", _cocos2d_Vec2_angle); - oluacls_func(L, "clamp", _cocos2d_Vec2_clamp); - oluacls_func(L, "compOp", _cocos2d_Vec2_compOp); - oluacls_func(L, "cross", _cocos2d_Vec2_cross); - oluacls_func(L, "distance", _cocos2d_Vec2_distance); - oluacls_func(L, "distanceSquared", _cocos2d_Vec2_distanceSquared); - oluacls_func(L, "dot", _cocos2d_Vec2_dot); - oluacls_func(L, "equals", _cocos2d_Vec2_equals); - oluacls_func(L, "forAngle", _cocos2d_Vec2_forAngle); - oluacls_func(L, "fuzzyEquals", _cocos2d_Vec2_fuzzyEquals); - oluacls_func(L, "getAngle", _cocos2d_Vec2_getAngle); - oluacls_func(L, "getClampPoint", _cocos2d_Vec2_getClampPoint); - oluacls_func(L, "getDistance", _cocos2d_Vec2_getDistance); - oluacls_func(L, "getDistanceSq", _cocos2d_Vec2_getDistanceSq); - oluacls_func(L, "getIntersectPoint", _cocos2d_Vec2_getIntersectPoint); - oluacls_func(L, "getLength", _cocos2d_Vec2_getLength); - oluacls_func(L, "getLengthSq", _cocos2d_Vec2_getLengthSq); - oluacls_func(L, "getMidpoint", _cocos2d_Vec2_getMidpoint); - oluacls_func(L, "getNormalized", _cocos2d_Vec2_getNormalized); - oluacls_func(L, "getPerp", _cocos2d_Vec2_getPerp); - oluacls_func(L, "getRPerp", _cocos2d_Vec2_getRPerp); - oluacls_func(L, "isLineIntersect", _cocos2d_Vec2_isLineIntersect); - oluacls_func(L, "isLineOverlap", _cocos2d_Vec2_isLineOverlap); - oluacls_func(L, "isLineParallel", _cocos2d_Vec2_isLineParallel); - oluacls_func(L, "isOne", _cocos2d_Vec2_isOne); - oluacls_func(L, "isSegmentIntersect", _cocos2d_Vec2_isSegmentIntersect); - oluacls_func(L, "isSegmentOverlap", _cocos2d_Vec2_isSegmentOverlap); - oluacls_func(L, "isZero", _cocos2d_Vec2_isZero); - oluacls_func(L, "length", _cocos2d_Vec2_length); - oluacls_func(L, "lengthSquared", _cocos2d_Vec2_lengthSquared); - oluacls_func(L, "lerp", _cocos2d_Vec2_lerp); - oluacls_func(L, "negate", _cocos2d_Vec2_negate); - oluacls_func(L, "new", _cocos2d_Vec2_new); - oluacls_func(L, "normalize", _cocos2d_Vec2_normalize); - oluacls_func(L, "project", _cocos2d_Vec2_project); - oluacls_func(L, "rotate", _cocos2d_Vec2_rotate); - oluacls_func(L, "rotateByAngle", _cocos2d_Vec2_rotateByAngle); - oluacls_func(L, "scale", _cocos2d_Vec2_scale); - oluacls_func(L, "set", _cocos2d_Vec2_set); - oluacls_func(L, "setPoint", _cocos2d_Vec2_setPoint); - oluacls_func(L, "setZero", _cocos2d_Vec2_setZero); - oluacls_func(L, "smooth", _cocos2d_Vec2_smooth); - oluacls_func(L, "subtract", _cocos2d_Vec2_subtract); - oluacls_func(L, "unrotate", _cocos2d_Vec2_unrotate); - oluacls_prop(L, "length", _cocos2d_Vec2_getLength, nullptr); - oluacls_prop(L, "lengthSq", _cocos2d_Vec2_getLengthSq, nullptr); - oluacls_prop(L, "normalized", _cocos2d_Vec2_getNormalized, nullptr); - oluacls_prop(L, "one", _cocos2d_Vec2_isOne, nullptr); - oluacls_prop(L, "perp", _cocos2d_Vec2_getPerp, nullptr); - oluacls_prop(L, "rPerp", _cocos2d_Vec2_getRPerp, nullptr); - oluacls_prop(L, "zero", _cocos2d_Vec2_isZero, _cocos2d_Vec2_setZero); - oluacls_prop(L, "x", _cocos2d_Vec2_get_x, _cocos2d_Vec2_set_x); - oluacls_prop(L, "y", _cocos2d_Vec2_get_y, _cocos2d_Vec2_set_y); + oluacls_func(L, "__gc", _olua_fun_cocos2d_Vec2___gc); + oluacls_func(L, "__olua_move", _olua_fun_cocos2d_Vec2___olua_move); + oluacls_func(L, "add", _olua_fun_cocos2d_Vec2_add); + oluacls_func(L, "angle", _olua_fun_cocos2d_Vec2_angle); + oluacls_func(L, "clamp", _olua_fun_cocos2d_Vec2_clamp); + oluacls_func(L, "compOp", _olua_fun_cocos2d_Vec2_compOp); + oluacls_func(L, "cross", _olua_fun_cocos2d_Vec2_cross); + oluacls_func(L, "distance", _olua_fun_cocos2d_Vec2_distance); + oluacls_func(L, "distanceSquared", _olua_fun_cocos2d_Vec2_distanceSquared); + oluacls_func(L, "dot", _olua_fun_cocos2d_Vec2_dot); + oluacls_func(L, "equals", _olua_fun_cocos2d_Vec2_equals); + oluacls_func(L, "forAngle", _olua_fun_cocos2d_Vec2_forAngle); + oluacls_func(L, "fuzzyEquals", _olua_fun_cocos2d_Vec2_fuzzyEquals); + oluacls_func(L, "getAngle", _olua_fun_cocos2d_Vec2_getAngle); + oluacls_func(L, "getClampPoint", _olua_fun_cocos2d_Vec2_getClampPoint); + oluacls_func(L, "getDistance", _olua_fun_cocos2d_Vec2_getDistance); + oluacls_func(L, "getDistanceSq", _olua_fun_cocos2d_Vec2_getDistanceSq); + oluacls_func(L, "getIntersectPoint", _olua_fun_cocos2d_Vec2_getIntersectPoint); + oluacls_func(L, "getLength", _olua_fun_cocos2d_Vec2_getLength); + oluacls_func(L, "getLengthSq", _olua_fun_cocos2d_Vec2_getLengthSq); + oluacls_func(L, "getMidpoint", _olua_fun_cocos2d_Vec2_getMidpoint); + oluacls_func(L, "getNormalized", _olua_fun_cocos2d_Vec2_getNormalized); + oluacls_func(L, "getPerp", _olua_fun_cocos2d_Vec2_getPerp); + oluacls_func(L, "getRPerp", _olua_fun_cocos2d_Vec2_getRPerp); + oluacls_func(L, "isLineIntersect", _olua_fun_cocos2d_Vec2_isLineIntersect); + oluacls_func(L, "isLineOverlap", _olua_fun_cocos2d_Vec2_isLineOverlap); + oluacls_func(L, "isLineParallel", _olua_fun_cocos2d_Vec2_isLineParallel); + oluacls_func(L, "isOne", _olua_fun_cocos2d_Vec2_isOne); + oluacls_func(L, "isSegmentIntersect", _olua_fun_cocos2d_Vec2_isSegmentIntersect); + oluacls_func(L, "isSegmentOverlap", _olua_fun_cocos2d_Vec2_isSegmentOverlap); + oluacls_func(L, "isZero", _olua_fun_cocos2d_Vec2_isZero); + oluacls_func(L, "length", _olua_fun_cocos2d_Vec2_length); + oluacls_func(L, "lengthSquared", _olua_fun_cocos2d_Vec2_lengthSquared); + oluacls_func(L, "lerp", _olua_fun_cocos2d_Vec2_lerp); + oluacls_func(L, "negate", _olua_fun_cocos2d_Vec2_negate); + oluacls_func(L, "new", _olua_fun_cocos2d_Vec2_new); + oluacls_func(L, "normalize", _olua_fun_cocos2d_Vec2_normalize); + oluacls_func(L, "project", _olua_fun_cocos2d_Vec2_project); + oluacls_func(L, "rotate", _olua_fun_cocos2d_Vec2_rotate); + oluacls_func(L, "rotateByAngle", _olua_fun_cocos2d_Vec2_rotateByAngle); + oluacls_func(L, "scale", _olua_fun_cocos2d_Vec2_scale); + oluacls_func(L, "set", _olua_fun_cocos2d_Vec2_set); + oluacls_func(L, "setPoint", _olua_fun_cocos2d_Vec2_setPoint); + oluacls_func(L, "setZero", _olua_fun_cocos2d_Vec2_setZero); + oluacls_func(L, "smooth", _olua_fun_cocos2d_Vec2_smooth); + oluacls_func(L, "subtract", _olua_fun_cocos2d_Vec2_subtract); + oluacls_func(L, "unrotate", _olua_fun_cocos2d_Vec2_unrotate); + oluacls_prop(L, "lengthSq", _olua_fun_cocos2d_Vec2_getLengthSq, nullptr); + oluacls_prop(L, "normalized", _olua_fun_cocos2d_Vec2_getNormalized, nullptr); + oluacls_prop(L, "one", _olua_fun_cocos2d_Vec2_isOne, nullptr); + oluacls_prop(L, "perp", _olua_fun_cocos2d_Vec2_getPerp, nullptr); + oluacls_prop(L, "rPerp", _olua_fun_cocos2d_Vec2_getRPerp, nullptr); + oluacls_prop(L, "zero", _olua_fun_cocos2d_Vec2_isZero, _olua_fun_cocos2d_Vec2_setZero); + oluacls_prop(L, "x", _olua_fun_cocos2d_Vec2_x, _olua_fun_cocos2d_Vec2_x); + oluacls_prop(L, "y", _olua_fun_cocos2d_Vec2_y, _olua_fun_cocos2d_Vec2_y); oluacls_const(L, "ANCHOR_BOTTOM_LEFT", &cocos2d::Vec2::ANCHOR_BOTTOM_LEFT); oluacls_const(L, "ANCHOR_BOTTOM_RIGHT", &cocos2d::Vec2::ANCHOR_BOTTOM_RIGHT); oluacls_const(L, "ANCHOR_MIDDLE", &cocos2d::Vec2::ANCHOR_MIDDLE); @@ -1911,43 +1923,19 @@ OLUA_LIB int luaopen_cocos2d_Vec2(lua_State *L) return 1; } -OLUA_END_DECLS -static int _cocos2d_Vec3___call(lua_State *L) +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_Vec2(lua_State *L) { - olua_startinvoke(L); - - cocos2d::Vec3 ret; - - luaL_checktype(L, 2, LUA_TTABLE); - - float arg1 = 0; /** x */ - float arg2 = 0; /** y */ - float arg3 = 0; /** z */ - - olua_getfield(L, 2, "x"); - olua_check_number(L, -1, &arg1); - ret.x = arg1; - lua_pop(L, 1); - - olua_getfield(L, 2, "y"); - olua_check_number(L, -1, &arg2); - ret.y = arg2; - lua_pop(L, 1); - - olua_getfield(L, 2, "z"); - olua_check_number(L, -1, &arg3); - ret.z = arg3; - lua_pop(L, 1); - - olua_pushcopy_object(L, ret, "cc.Vec3"); - - olua_endinvoke(L); - + olua_require(L, "cocos2d_types", luaopen_cocos2d_types); + if (!olua_getclass(L, "cc.Vec2")) { + luaL_error(L, "class not found: cocos2d::Vec2"); + } return 1; } +OLUA_END_DECLS -static int _cocos2d_Vec3___gc(lua_State *L) +static int _olua_fun_cocos2d_Vec3___gc(lua_State *L) { olua_startinvoke(L); @@ -1959,7 +1947,7 @@ static int _cocos2d_Vec3___gc(lua_State *L) return 0; } -static int _cocos2d_Vec3___olua_move(lua_State *L) +static int _olua_fun_cocos2d_Vec3___olua_move(lua_State *L) { olua_startinvoke(L); @@ -1971,25 +1959,25 @@ static int _cocos2d_Vec3___olua_move(lua_State *L) return 1; } -static int _cocos2d_Vec3_add$1(lua_State *L) +static int _olua_fun_cocos2d_Vec3_add$1(lua_State *L) { olua_startinvoke(L); cocos2d::Vec3 *self = nullptr; - cocos2d::Vec3 arg1; /** v */ + cocos2d::Vec3 *arg1; /** v */ olua_to_object(L, 1, &self, "cc.Vec3"); olua_check_object(L, 2, &arg1, "cc.Vec3"); // void add(const cocos2d::Vec3 &v) - self->add(arg1); + self->add(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_Vec3_add$2(lua_State *L) +static int _olua_fun_cocos2d_Vec3_add$2(lua_State *L) { olua_startinvoke(L); @@ -2011,12 +1999,12 @@ static int _cocos2d_Vec3_add$2(lua_State *L) return 0; } -static int _cocos2d_Vec3_add$3(lua_State *L) +static int _olua_fun_cocos2d_Vec3_add$3(lua_State *L) { olua_startinvoke(L); - cocos2d::Vec3 arg1; /** v1 */ - cocos2d::Vec3 arg2; /** v2 */ + cocos2d::Vec3 *arg1; /** v1 */ + cocos2d::Vec3 *arg2; /** v2 */ cocos2d::Vec3 *arg3 = nullptr; /** dst */ olua_check_object(L, 1, &arg1, "cc.Vec3"); @@ -2024,33 +2012,33 @@ static int _cocos2d_Vec3_add$3(lua_State *L) olua_check_object(L, 3, &arg3, "cc.Vec3"); // static void add(const cocos2d::Vec3 &v1, const cocos2d::Vec3 &v2, cocos2d::Vec3 *dst) - cocos2d::Vec3::add(arg1, arg2, arg3); + cocos2d::Vec3::add(*arg1, *arg2, arg3); olua_endinvoke(L); return 0; } -static int _cocos2d_Vec3_add(lua_State *L) +static int _olua_fun_cocos2d_Vec3_add(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_object(L, 2, "cc.Vec3"))) { // void add(const cocos2d::Vec3 &v) - return _cocos2d_Vec3_add$1(L); + return _olua_fun_cocos2d_Vec3_add$1(L); // } } if (num_args == 3) { if ((olua_is_object(L, 1, "cc.Vec3")) && (olua_is_object(L, 2, "cc.Vec3")) && (olua_is_object(L, 3, "cc.Vec3"))) { // static void add(const cocos2d::Vec3 &v1, const cocos2d::Vec3 &v2, cocos2d::Vec3 *dst) - return _cocos2d_Vec3_add$3(L); + return _olua_fun_cocos2d_Vec3_add$3(L); } // if ((olua_is_number(L, 2)) && (olua_is_number(L, 3)) && (olua_is_number(L, 4))) { // void add(float xx, float yy, float zz) - return _cocos2d_Vec3_add$2(L); + return _olua_fun_cocos2d_Vec3_add$2(L); // } } @@ -2059,18 +2047,18 @@ static int _cocos2d_Vec3_add(lua_State *L) return 0; } -static int _cocos2d_Vec3_angle(lua_State *L) +static int _olua_fun_cocos2d_Vec3_angle(lua_State *L) { olua_startinvoke(L); - cocos2d::Vec3 arg1; /** v1 */ - cocos2d::Vec3 arg2; /** v2 */ + cocos2d::Vec3 *arg1; /** v1 */ + cocos2d::Vec3 *arg2; /** v2 */ olua_check_object(L, 1, &arg1, "cc.Vec3"); olua_check_object(L, 2, &arg2, "cc.Vec3"); // static float angle(const cocos2d::Vec3 &v1, const cocos2d::Vec3 &v2) - float ret = cocos2d::Vec3::angle(arg1, arg2); + float ret = cocos2d::Vec3::angle(*arg1, *arg2); int num_ret = olua_push_number(L, ret); olua_endinvoke(L); @@ -2078,33 +2066,33 @@ static int _cocos2d_Vec3_angle(lua_State *L) return num_ret; } -static int _cocos2d_Vec3_clamp$1(lua_State *L) +static int _olua_fun_cocos2d_Vec3_clamp$1(lua_State *L) { olua_startinvoke(L); cocos2d::Vec3 *self = nullptr; - cocos2d::Vec3 arg1; /** min */ - cocos2d::Vec3 arg2; /** max */ + cocos2d::Vec3 *arg1; /** min */ + cocos2d::Vec3 *arg2; /** max */ olua_to_object(L, 1, &self, "cc.Vec3"); olua_check_object(L, 2, &arg1, "cc.Vec3"); olua_check_object(L, 3, &arg2, "cc.Vec3"); // void clamp(const cocos2d::Vec3 &min, const cocos2d::Vec3 &max) - self->clamp(arg1, arg2); + self->clamp(*arg1, *arg2); olua_endinvoke(L); return 0; } -static int _cocos2d_Vec3_clamp$2(lua_State *L) +static int _olua_fun_cocos2d_Vec3_clamp$2(lua_State *L) { olua_startinvoke(L); - cocos2d::Vec3 arg1; /** v */ - cocos2d::Vec3 arg2; /** min */ - cocos2d::Vec3 arg3; /** max */ + cocos2d::Vec3 *arg1; /** v */ + cocos2d::Vec3 *arg2; /** min */ + cocos2d::Vec3 *arg3; /** max */ cocos2d::Vec3 *arg4 = nullptr; /** dst */ olua_check_object(L, 1, &arg1, "cc.Vec3"); @@ -2113,28 +2101,28 @@ static int _cocos2d_Vec3_clamp$2(lua_State *L) olua_check_object(L, 4, &arg4, "cc.Vec3"); // static void clamp(const cocos2d::Vec3 &v, const cocos2d::Vec3 &min, const cocos2d::Vec3 &max, cocos2d::Vec3 *dst) - cocos2d::Vec3::clamp(arg1, arg2, arg3, arg4); + cocos2d::Vec3::clamp(*arg1, *arg2, *arg3, arg4); olua_endinvoke(L); return 0; } -static int _cocos2d_Vec3_clamp(lua_State *L) +static int _olua_fun_cocos2d_Vec3_clamp(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 2) { // if ((olua_is_object(L, 2, "cc.Vec3")) && (olua_is_object(L, 3, "cc.Vec3"))) { // void clamp(const cocos2d::Vec3 &min, const cocos2d::Vec3 &max) - return _cocos2d_Vec3_clamp$1(L); + return _olua_fun_cocos2d_Vec3_clamp$1(L); // } } if (num_args == 4) { // if ((olua_is_object(L, 1, "cc.Vec3")) && (olua_is_object(L, 2, "cc.Vec3")) && (olua_is_object(L, 3, "cc.Vec3")) && (olua_is_object(L, 4, "cc.Vec3"))) { // static void clamp(const cocos2d::Vec3 &v, const cocos2d::Vec3 &min, const cocos2d::Vec3 &max, cocos2d::Vec3 *dst) - return _cocos2d_Vec3_clamp$2(L); + return _olua_fun_cocos2d_Vec3_clamp$2(L); // } } @@ -2143,30 +2131,30 @@ static int _cocos2d_Vec3_clamp(lua_State *L) return 0; } -static int _cocos2d_Vec3_cross$1(lua_State *L) +static int _olua_fun_cocos2d_Vec3_cross$1(lua_State *L) { olua_startinvoke(L); cocos2d::Vec3 *self = nullptr; - cocos2d::Vec3 arg1; /** v */ + cocos2d::Vec3 *arg1; /** v */ olua_to_object(L, 1, &self, "cc.Vec3"); olua_check_object(L, 2, &arg1, "cc.Vec3"); // void cross(const cocos2d::Vec3 &v) - self->cross(arg1); + self->cross(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_Vec3_cross$2(lua_State *L) +static int _olua_fun_cocos2d_Vec3_cross$2(lua_State *L) { olua_startinvoke(L); - cocos2d::Vec3 arg1; /** v1 */ - cocos2d::Vec3 arg2; /** v2 */ + cocos2d::Vec3 *arg1; /** v1 */ + cocos2d::Vec3 *arg2; /** v2 */ cocos2d::Vec3 *arg3 = nullptr; /** dst */ olua_check_object(L, 1, &arg1, "cc.Vec3"); @@ -2174,28 +2162,28 @@ static int _cocos2d_Vec3_cross$2(lua_State *L) olua_check_object(L, 3, &arg3, "cc.Vec3"); // static void cross(const cocos2d::Vec3 &v1, const cocos2d::Vec3 &v2, cocos2d::Vec3 *dst) - cocos2d::Vec3::cross(arg1, arg2, arg3); + cocos2d::Vec3::cross(*arg1, *arg2, arg3); olua_endinvoke(L); return 0; } -static int _cocos2d_Vec3_cross(lua_State *L) +static int _olua_fun_cocos2d_Vec3_cross(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_object(L, 2, "cc.Vec3"))) { // void cross(const cocos2d::Vec3 &v) - return _cocos2d_Vec3_cross$1(L); + return _olua_fun_cocos2d_Vec3_cross$1(L); // } } if (num_args == 3) { // if ((olua_is_object(L, 1, "cc.Vec3")) && (olua_is_object(L, 2, "cc.Vec3")) && (olua_is_object(L, 3, "cc.Vec3"))) { // static void cross(const cocos2d::Vec3 &v1, const cocos2d::Vec3 &v2, cocos2d::Vec3 *dst) - return _cocos2d_Vec3_cross$2(L); + return _olua_fun_cocos2d_Vec3_cross$2(L); // } } @@ -2204,18 +2192,18 @@ static int _cocos2d_Vec3_cross(lua_State *L) return 0; } -static int _cocos2d_Vec3_distance(lua_State *L) +static int _olua_fun_cocos2d_Vec3_distance(lua_State *L) { olua_startinvoke(L); cocos2d::Vec3 *self = nullptr; - cocos2d::Vec3 arg1; /** v */ + cocos2d::Vec3 *arg1; /** v */ olua_to_object(L, 1, &self, "cc.Vec3"); olua_check_object(L, 2, &arg1, "cc.Vec3"); // float distance(const cocos2d::Vec3 &v) - float ret = self->distance(arg1); + float ret = self->distance(*arg1); int num_ret = olua_push_number(L, ret); olua_endinvoke(L); @@ -2223,18 +2211,18 @@ static int _cocos2d_Vec3_distance(lua_State *L) return num_ret; } -static int _cocos2d_Vec3_distanceSquared(lua_State *L) +static int _olua_fun_cocos2d_Vec3_distanceSquared(lua_State *L) { olua_startinvoke(L); cocos2d::Vec3 *self = nullptr; - cocos2d::Vec3 arg1; /** v */ + cocos2d::Vec3 *arg1; /** v */ olua_to_object(L, 1, &self, "cc.Vec3"); olua_check_object(L, 2, &arg1, "cc.Vec3"); // float distanceSquared(const cocos2d::Vec3 &v) - float ret = self->distanceSquared(arg1); + float ret = self->distanceSquared(*arg1); int num_ret = olua_push_number(L, ret); olua_endinvoke(L); @@ -2242,18 +2230,18 @@ static int _cocos2d_Vec3_distanceSquared(lua_State *L) return num_ret; } -static int _cocos2d_Vec3_dot$1(lua_State *L) +static int _olua_fun_cocos2d_Vec3_dot$1(lua_State *L) { olua_startinvoke(L); cocos2d::Vec3 *self = nullptr; - cocos2d::Vec3 arg1; /** v */ + cocos2d::Vec3 *arg1; /** v */ olua_to_object(L, 1, &self, "cc.Vec3"); olua_check_object(L, 2, &arg1, "cc.Vec3"); // float dot(const cocos2d::Vec3 &v) - float ret = self->dot(arg1); + float ret = self->dot(*arg1); int num_ret = olua_push_number(L, ret); olua_endinvoke(L); @@ -2261,18 +2249,18 @@ static int _cocos2d_Vec3_dot$1(lua_State *L) return num_ret; } -static int _cocos2d_Vec3_dot$2(lua_State *L) +static int _olua_fun_cocos2d_Vec3_dot$2(lua_State *L) { olua_startinvoke(L); - cocos2d::Vec3 arg1; /** v1 */ - cocos2d::Vec3 arg2; /** v2 */ + cocos2d::Vec3 *arg1; /** v1 */ + cocos2d::Vec3 *arg2; /** v2 */ olua_check_object(L, 1, &arg1, "cc.Vec3"); olua_check_object(L, 2, &arg2, "cc.Vec3"); // static float dot(const cocos2d::Vec3 &v1, const cocos2d::Vec3 &v2) - float ret = cocos2d::Vec3::dot(arg1, arg2); + float ret = cocos2d::Vec3::dot(*arg1, *arg2); int num_ret = olua_push_number(L, ret); olua_endinvoke(L); @@ -2280,21 +2268,21 @@ static int _cocos2d_Vec3_dot$2(lua_State *L) return num_ret; } -static int _cocos2d_Vec3_dot(lua_State *L) +static int _olua_fun_cocos2d_Vec3_dot(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_object(L, 2, "cc.Vec3"))) { // float dot(const cocos2d::Vec3 &v) - return _cocos2d_Vec3_dot$1(L); + return _olua_fun_cocos2d_Vec3_dot$1(L); // } } if (num_args == 2) { // if ((olua_is_object(L, 1, "cc.Vec3")) && (olua_is_object(L, 2, "cc.Vec3"))) { // static float dot(const cocos2d::Vec3 &v1, const cocos2d::Vec3 &v2) - return _cocos2d_Vec3_dot$2(L); + return _olua_fun_cocos2d_Vec3_dot$2(L); // } } @@ -2303,7 +2291,7 @@ static int _cocos2d_Vec3_dot(lua_State *L) return 0; } -static int _cocos2d_Vec3_fromColor(lua_State *L) +static int _olua_fun_cocos2d_Vec3_fromColor(lua_State *L) { olua_startinvoke(L); @@ -2313,14 +2301,14 @@ static int _cocos2d_Vec3_fromColor(lua_State *L) // static cocos2d::Vec3 fromColor(unsigned int color) cocos2d::Vec3 ret = cocos2d::Vec3::fromColor(arg1); - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec3"); + int num_ret = olua_copy_object(L, ret, "cc.Vec3"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_Vec3_getNormalized(lua_State *L) +static int _olua_fun_cocos2d_Vec3_getNormalized(lua_State *L) { olua_startinvoke(L); @@ -2330,14 +2318,14 @@ static int _cocos2d_Vec3_getNormalized(lua_State *L) // cocos2d::Vec3 getNormalized() cocos2d::Vec3 ret = self->getNormalized(); - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec3"); + int num_ret = olua_copy_object(L, ret, "cc.Vec3"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_Vec3_isOne(lua_State *L) +static int _olua_fun_cocos2d_Vec3_isOne(lua_State *L) { olua_startinvoke(L); @@ -2354,7 +2342,7 @@ static int _cocos2d_Vec3_isOne(lua_State *L) return num_ret; } -static int _cocos2d_Vec3_isZero(lua_State *L) +static int _olua_fun_cocos2d_Vec3_isZero(lua_State *L) { olua_startinvoke(L); @@ -2371,7 +2359,7 @@ static int _cocos2d_Vec3_isZero(lua_State *L) return num_ret; } -static int _cocos2d_Vec3_length(lua_State *L) +static int _olua_fun_cocos2d_Vec3_length(lua_State *L) { olua_startinvoke(L); @@ -2388,7 +2376,7 @@ static int _cocos2d_Vec3_length(lua_State *L) return num_ret; } -static int _cocos2d_Vec3_lengthSquared(lua_State *L) +static int _olua_fun_cocos2d_Vec3_lengthSquared(lua_State *L) { olua_startinvoke(L); @@ -2405,12 +2393,12 @@ static int _cocos2d_Vec3_lengthSquared(lua_State *L) return num_ret; } -static int _cocos2d_Vec3_lerp(lua_State *L) +static int _olua_fun_cocos2d_Vec3_lerp(lua_State *L) { olua_startinvoke(L); cocos2d::Vec3 *self = nullptr; - cocos2d::Vec3 arg1; /** target */ + cocos2d::Vec3 *arg1; /** target */ float arg2 = 0; /** alpha */ olua_to_object(L, 1, &self, "cc.Vec3"); @@ -2418,15 +2406,15 @@ static int _cocos2d_Vec3_lerp(lua_State *L) olua_check_number(L, 3, &arg2); // cocos2d::Vec3 lerp(const cocos2d::Vec3 &target, float alpha) - cocos2d::Vec3 ret = self->lerp(arg1, arg2); - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec3"); + cocos2d::Vec3 ret = self->lerp(*arg1, arg2); + int num_ret = olua_copy_object(L, ret, "cc.Vec3"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_Vec3_negate(lua_State *L) +static int _olua_fun_cocos2d_Vec3_negate(lua_State *L) { olua_startinvoke(L); @@ -2442,11 +2430,11 @@ static int _cocos2d_Vec3_negate(lua_State *L) return 0; } -static int _cocos2d_Vec3_new$1(lua_State *L) +static int _olua_fun_cocos2d_Vec3_new$1(lua_State *L) { olua_startinvoke(L); - // Vec3() + // cocos2d::Vec3() cocos2d::Vec3 *ret = new cocos2d::Vec3(); int num_ret = olua_push_object(L, ret, "cc.Vec3"); olua_postnew(L, ret); @@ -2456,7 +2444,7 @@ static int _cocos2d_Vec3_new$1(lua_State *L) return num_ret; } -static int _cocos2d_Vec3_new$2(lua_State *L) +static int _olua_fun_cocos2d_Vec3_new$2(lua_State *L) { olua_startinvoke(L); @@ -2468,7 +2456,7 @@ static int _cocos2d_Vec3_new$2(lua_State *L) olua_check_number(L, 2, &arg2); olua_check_number(L, 3, &arg3); - // Vec3(float xx, float yy, float zz) + // cocos2d::Vec3(float xx, float yy, float zz) cocos2d::Vec3 *ret = new cocos2d::Vec3(arg1, arg2, arg3); int num_ret = olua_push_object(L, ret, "cc.Vec3"); olua_postnew(L, ret); @@ -2478,15 +2466,15 @@ static int _cocos2d_Vec3_new$2(lua_State *L) return num_ret; } -static int _cocos2d_Vec3_new$3(lua_State *L) +static int _olua_fun_cocos2d_Vec3_new$3(lua_State *L) { olua_startinvoke(L); float *arg1 = nullptr; /** array */ - olua_check_pointer(L, 1, &arg1, "olua.float"); + olua_check_valueptr(L, 1, &arg1, "olua.float"); - // Vec3(const float *array) + // cocos2d::Vec3(const float *array) cocos2d::Vec3 *ret = new cocos2d::Vec3(arg1); int num_ret = olua_push_object(L, ret, "cc.Vec3"); olua_postnew(L, ret); @@ -2496,18 +2484,18 @@ static int _cocos2d_Vec3_new$3(lua_State *L) return num_ret; } -static int _cocos2d_Vec3_new$4(lua_State *L) +static int _olua_fun_cocos2d_Vec3_new$4(lua_State *L) { olua_startinvoke(L); - cocos2d::Vec3 arg1; /** p1 */ - cocos2d::Vec3 arg2; /** p2 */ + cocos2d::Vec3 *arg1; /** p1 */ + cocos2d::Vec3 *arg2; /** p2 */ olua_check_object(L, 1, &arg1, "cc.Vec3"); olua_check_object(L, 2, &arg2, "cc.Vec3"); - // Vec3(const cocos2d::Vec3 &p1, const cocos2d::Vec3 &p2) - cocos2d::Vec3 *ret = new cocos2d::Vec3(arg1, arg2); + // cocos2d::Vec3(const cocos2d::Vec3 &p1, const cocos2d::Vec3 &p2) + cocos2d::Vec3 *ret = new cocos2d::Vec3(*arg1, *arg2); int num_ret = olua_push_object(L, ret, "cc.Vec3"); olua_postnew(L, ret); @@ -2516,33 +2504,33 @@ static int _cocos2d_Vec3_new$4(lua_State *L) return num_ret; } -static int _cocos2d_Vec3_new(lua_State *L) +static int _olua_fun_cocos2d_Vec3_new(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 0) { - // Vec3() - return _cocos2d_Vec3_new$1(L); + // cocos2d::Vec3() + return _olua_fun_cocos2d_Vec3_new$1(L); } if (num_args == 1) { - // if ((olua_is_pointer(L, 1, "olua.float"))) { - // Vec3(const float *array) - return _cocos2d_Vec3_new$3(L); + // if ((olua_is_valueptr(L, 1, "olua.float"))) { + // cocos2d::Vec3(const float *array) + return _olua_fun_cocos2d_Vec3_new$3(L); // } } if (num_args == 2) { // if ((olua_is_object(L, 1, "cc.Vec3")) && (olua_is_object(L, 2, "cc.Vec3"))) { - // Vec3(const cocos2d::Vec3 &p1, const cocos2d::Vec3 &p2) - return _cocos2d_Vec3_new$4(L); + // cocos2d::Vec3(const cocos2d::Vec3 &p1, const cocos2d::Vec3 &p2) + return _olua_fun_cocos2d_Vec3_new$4(L); // } } if (num_args == 3) { // if ((olua_is_number(L, 1)) && (olua_is_number(L, 2)) && (olua_is_number(L, 3))) { - // Vec3(float xx, float yy, float zz) - return _cocos2d_Vec3_new$2(L); + // cocos2d::Vec3(float xx, float yy, float zz) + return _olua_fun_cocos2d_Vec3_new$2(L); // } } @@ -2551,7 +2539,7 @@ static int _cocos2d_Vec3_new(lua_State *L) return 0; } -static int _cocos2d_Vec3_normalize(lua_State *L) +static int _olua_fun_cocos2d_Vec3_normalize(lua_State *L) { olua_startinvoke(L); @@ -2567,7 +2555,7 @@ static int _cocos2d_Vec3_normalize(lua_State *L) return 0; } -static int _cocos2d_Vec3_scale(lua_State *L) +static int _olua_fun_cocos2d_Vec3_scale(lua_State *L) { olua_startinvoke(L); @@ -2585,7 +2573,7 @@ static int _cocos2d_Vec3_scale(lua_State *L) return 0; } -static int _cocos2d_Vec3_set$1(lua_State *L) +static int _olua_fun_cocos2d_Vec3_set$1(lua_State *L) { olua_startinvoke(L); @@ -2607,7 +2595,7 @@ static int _cocos2d_Vec3_set$1(lua_State *L) return 0; } -static int _cocos2d_Vec3_set$2(lua_State *L) +static int _olua_fun_cocos2d_Vec3_set$2(lua_State *L) { olua_startinvoke(L); @@ -2615,7 +2603,7 @@ static int _cocos2d_Vec3_set$2(lua_State *L) float *arg1 = nullptr; /** array */ olua_to_object(L, 1, &self, "cc.Vec3"); - olua_check_pointer(L, 2, &arg1, "olua.float"); + olua_check_valueptr(L, 2, &arg1, "olua.float"); // void set(const float *array) self->set(arg1); @@ -2625,71 +2613,71 @@ static int _cocos2d_Vec3_set$2(lua_State *L) return 0; } -static int _cocos2d_Vec3_set$3(lua_State *L) +static int _olua_fun_cocos2d_Vec3_set$3(lua_State *L) { olua_startinvoke(L); cocos2d::Vec3 *self = nullptr; - cocos2d::Vec3 arg1; /** v */ + cocos2d::Vec3 *arg1; /** v */ olua_to_object(L, 1, &self, "cc.Vec3"); olua_check_object(L, 2, &arg1, "cc.Vec3"); // void set(const cocos2d::Vec3 &v) - self->set(arg1); + self->set(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_Vec3_set$4(lua_State *L) +static int _olua_fun_cocos2d_Vec3_set$4(lua_State *L) { olua_startinvoke(L); cocos2d::Vec3 *self = nullptr; - cocos2d::Vec3 arg1; /** p1 */ - cocos2d::Vec3 arg2; /** p2 */ + cocos2d::Vec3 *arg1; /** p1 */ + cocos2d::Vec3 *arg2; /** p2 */ olua_to_object(L, 1, &self, "cc.Vec3"); olua_check_object(L, 2, &arg1, "cc.Vec3"); olua_check_object(L, 3, &arg2, "cc.Vec3"); // void set(const cocos2d::Vec3 &p1, const cocos2d::Vec3 &p2) - self->set(arg1, arg2); + self->set(*arg1, *arg2); olua_endinvoke(L); return 0; } -static int _cocos2d_Vec3_set(lua_State *L) +static int _olua_fun_cocos2d_Vec3_set(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { if ((olua_is_object(L, 2, "cc.Vec3"))) { // void set(const cocos2d::Vec3 &v) - return _cocos2d_Vec3_set$3(L); + return _olua_fun_cocos2d_Vec3_set$3(L); } - // if ((olua_is_pointer(L, 2, "olua.float"))) { + // if ((olua_is_valueptr(L, 2, "olua.float"))) { // void set(const float *array) - return _cocos2d_Vec3_set$2(L); + return _olua_fun_cocos2d_Vec3_set$2(L); // } } if (num_args == 2) { // if ((olua_is_object(L, 2, "cc.Vec3")) && (olua_is_object(L, 3, "cc.Vec3"))) { // void set(const cocos2d::Vec3 &p1, const cocos2d::Vec3 &p2) - return _cocos2d_Vec3_set$4(L); + return _olua_fun_cocos2d_Vec3_set$4(L); // } } if (num_args == 3) { // if ((olua_is_number(L, 2)) && (olua_is_number(L, 3)) && (olua_is_number(L, 4))) { // void set(float xx, float yy, float zz) - return _cocos2d_Vec3_set$1(L); + return _olua_fun_cocos2d_Vec3_set$1(L); // } } @@ -2698,7 +2686,7 @@ static int _cocos2d_Vec3_set(lua_State *L) return 0; } -static int _cocos2d_Vec3_setZero(lua_State *L) +static int _olua_fun_cocos2d_Vec3_setZero(lua_State *L) { olua_startinvoke(L); @@ -2714,12 +2702,12 @@ static int _cocos2d_Vec3_setZero(lua_State *L) return 0; } -static int _cocos2d_Vec3_smooth(lua_State *L) +static int _olua_fun_cocos2d_Vec3_smooth(lua_State *L) { olua_startinvoke(L); cocos2d::Vec3 *self = nullptr; - cocos2d::Vec3 arg1; /** target */ + cocos2d::Vec3 *arg1; /** target */ float arg2 = 0; /** elapsedTime */ float arg3 = 0; /** responseTime */ @@ -2729,37 +2717,37 @@ static int _cocos2d_Vec3_smooth(lua_State *L) olua_check_number(L, 4, &arg3); // void smooth(const cocos2d::Vec3 &target, float elapsedTime, float responseTime) - self->smooth(arg1, arg2, arg3); + self->smooth(*arg1, arg2, arg3); olua_endinvoke(L); return 0; } -static int _cocos2d_Vec3_subtract$1(lua_State *L) +static int _olua_fun_cocos2d_Vec3_subtract$1(lua_State *L) { olua_startinvoke(L); cocos2d::Vec3 *self = nullptr; - cocos2d::Vec3 arg1; /** v */ + cocos2d::Vec3 *arg1; /** v */ olua_to_object(L, 1, &self, "cc.Vec3"); olua_check_object(L, 2, &arg1, "cc.Vec3"); // void subtract(const cocos2d::Vec3 &v) - self->subtract(arg1); + self->subtract(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_Vec3_subtract$2(lua_State *L) +static int _olua_fun_cocos2d_Vec3_subtract$2(lua_State *L) { olua_startinvoke(L); - cocos2d::Vec3 arg1; /** v1 */ - cocos2d::Vec3 arg2; /** v2 */ + cocos2d::Vec3 *arg1; /** v1 */ + cocos2d::Vec3 *arg2; /** v2 */ cocos2d::Vec3 *arg3 = nullptr; /** dst */ olua_check_object(L, 1, &arg1, "cc.Vec3"); @@ -2767,28 +2755,28 @@ static int _cocos2d_Vec3_subtract$2(lua_State *L) olua_check_object(L, 3, &arg3, "cc.Vec3"); // static void subtract(const cocos2d::Vec3 &v1, const cocos2d::Vec3 &v2, cocos2d::Vec3 *dst) - cocos2d::Vec3::subtract(arg1, arg2, arg3); + cocos2d::Vec3::subtract(*arg1, *arg2, arg3); olua_endinvoke(L); return 0; } -static int _cocos2d_Vec3_subtract(lua_State *L) +static int _olua_fun_cocos2d_Vec3_subtract(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_object(L, 2, "cc.Vec3"))) { // void subtract(const cocos2d::Vec3 &v) - return _cocos2d_Vec3_subtract$1(L); + return _olua_fun_cocos2d_Vec3_subtract$1(L); // } } if (num_args == 3) { // if ((olua_is_object(L, 1, "cc.Vec3")) && (olua_is_object(L, 2, "cc.Vec3")) && (olua_is_object(L, 3, "cc.Vec3"))) { // static void subtract(const cocos2d::Vec3 &v1, const cocos2d::Vec3 &v2, cocos2d::Vec3 *dst) - return _cocos2d_Vec3_subtract$2(L); + return _olua_fun_cocos2d_Vec3_subtract$2(L); // } } @@ -2797,7 +2785,7 @@ static int _cocos2d_Vec3_subtract(lua_State *L) return 0; } -static int _cocos2d_Vec3_get_x(lua_State *L) +static int _olua_fun_cocos2d_Vec3_x$1(lua_State *L) { olua_startinvoke(L); @@ -2814,7 +2802,7 @@ static int _cocos2d_Vec3_get_x(lua_State *L) return num_ret; } -static int _cocos2d_Vec3_set_x(lua_State *L) +static int _olua_fun_cocos2d_Vec3_x$2(lua_State *L) { olua_startinvoke(L); @@ -2832,7 +2820,28 @@ static int _cocos2d_Vec3_set_x(lua_State *L) return 0; } -static int _cocos2d_Vec3_get_y(lua_State *L) +static int _olua_fun_cocos2d_Vec3_x(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float x + return _olua_fun_cocos2d_Vec3_x$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float x + return _olua_fun_cocos2d_Vec3_x$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::Vec3::x' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_Vec3_y$1(lua_State *L) { olua_startinvoke(L); @@ -2849,7 +2858,7 @@ static int _cocos2d_Vec3_get_y(lua_State *L) return num_ret; } -static int _cocos2d_Vec3_set_y(lua_State *L) +static int _olua_fun_cocos2d_Vec3_y$2(lua_State *L) { olua_startinvoke(L); @@ -2867,7 +2876,28 @@ static int _cocos2d_Vec3_set_y(lua_State *L) return 0; } -static int _cocos2d_Vec3_get_z(lua_State *L) +static int _olua_fun_cocos2d_Vec3_y(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float y + return _olua_fun_cocos2d_Vec3_y$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float y + return _olua_fun_cocos2d_Vec3_y$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::Vec3::y' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_Vec3_z$1(lua_State *L) { olua_startinvoke(L); @@ -2884,7 +2914,7 @@ static int _cocos2d_Vec3_get_z(lua_State *L) return num_ret; } -static int _cocos2d_Vec3_set_z(lua_State *L) +static int _olua_fun_cocos2d_Vec3_z$2(lua_State *L) { olua_startinvoke(L); @@ -2902,41 +2932,60 @@ static int _cocos2d_Vec3_set_z(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_Vec3(lua_State *L) +static int _olua_fun_cocos2d_Vec3_z(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float z + return _olua_fun_cocos2d_Vec3_z$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float z + return _olua_fun_cocos2d_Vec3_z$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::Vec3::z' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_cls_cc_Vec3(lua_State *L) { oluacls_class(L, "cc.Vec3"); - oluacls_func(L, "__call", _cocos2d_Vec3___call); - oluacls_func(L, "__gc", _cocos2d_Vec3___gc); - oluacls_func(L, "__olua_move", _cocos2d_Vec3___olua_move); - oluacls_func(L, "add", _cocos2d_Vec3_add); - oluacls_func(L, "angle", _cocos2d_Vec3_angle); - oluacls_func(L, "clamp", _cocos2d_Vec3_clamp); - oluacls_func(L, "cross", _cocos2d_Vec3_cross); - oluacls_func(L, "distance", _cocos2d_Vec3_distance); - oluacls_func(L, "distanceSquared", _cocos2d_Vec3_distanceSquared); - oluacls_func(L, "dot", _cocos2d_Vec3_dot); - oluacls_func(L, "fromColor", _cocos2d_Vec3_fromColor); - oluacls_func(L, "getNormalized", _cocos2d_Vec3_getNormalized); - oluacls_func(L, "isOne", _cocos2d_Vec3_isOne); - oluacls_func(L, "isZero", _cocos2d_Vec3_isZero); - oluacls_func(L, "length", _cocos2d_Vec3_length); - oluacls_func(L, "lengthSquared", _cocos2d_Vec3_lengthSquared); - oluacls_func(L, "lerp", _cocos2d_Vec3_lerp); - oluacls_func(L, "negate", _cocos2d_Vec3_negate); - oluacls_func(L, "new", _cocos2d_Vec3_new); - oluacls_func(L, "normalize", _cocos2d_Vec3_normalize); - oluacls_func(L, "scale", _cocos2d_Vec3_scale); - oluacls_func(L, "set", _cocos2d_Vec3_set); - oluacls_func(L, "setZero", _cocos2d_Vec3_setZero); - oluacls_func(L, "smooth", _cocos2d_Vec3_smooth); - oluacls_func(L, "subtract", _cocos2d_Vec3_subtract); - oluacls_prop(L, "normalized", _cocos2d_Vec3_getNormalized, nullptr); - oluacls_prop(L, "one", _cocos2d_Vec3_isOne, nullptr); - oluacls_prop(L, "zero", _cocos2d_Vec3_isZero, _cocos2d_Vec3_setZero); - oluacls_prop(L, "x", _cocos2d_Vec3_get_x, _cocos2d_Vec3_set_x); - oluacls_prop(L, "y", _cocos2d_Vec3_get_y, _cocos2d_Vec3_set_y); - oluacls_prop(L, "z", _cocos2d_Vec3_get_z, _cocos2d_Vec3_set_z); + oluacls_func(L, "__gc", _olua_fun_cocos2d_Vec3___gc); + oluacls_func(L, "__olua_move", _olua_fun_cocos2d_Vec3___olua_move); + oluacls_func(L, "add", _olua_fun_cocos2d_Vec3_add); + oluacls_func(L, "angle", _olua_fun_cocos2d_Vec3_angle); + oluacls_func(L, "clamp", _olua_fun_cocos2d_Vec3_clamp); + oluacls_func(L, "cross", _olua_fun_cocos2d_Vec3_cross); + oluacls_func(L, "distance", _olua_fun_cocos2d_Vec3_distance); + oluacls_func(L, "distanceSquared", _olua_fun_cocos2d_Vec3_distanceSquared); + oluacls_func(L, "dot", _olua_fun_cocos2d_Vec3_dot); + oluacls_func(L, "fromColor", _olua_fun_cocos2d_Vec3_fromColor); + oluacls_func(L, "getNormalized", _olua_fun_cocos2d_Vec3_getNormalized); + oluacls_func(L, "isOne", _olua_fun_cocos2d_Vec3_isOne); + oluacls_func(L, "isZero", _olua_fun_cocos2d_Vec3_isZero); + oluacls_func(L, "length", _olua_fun_cocos2d_Vec3_length); + oluacls_func(L, "lengthSquared", _olua_fun_cocos2d_Vec3_lengthSquared); + oluacls_func(L, "lerp", _olua_fun_cocos2d_Vec3_lerp); + oluacls_func(L, "negate", _olua_fun_cocos2d_Vec3_negate); + oluacls_func(L, "new", _olua_fun_cocos2d_Vec3_new); + oluacls_func(L, "normalize", _olua_fun_cocos2d_Vec3_normalize); + oluacls_func(L, "scale", _olua_fun_cocos2d_Vec3_scale); + oluacls_func(L, "set", _olua_fun_cocos2d_Vec3_set); + oluacls_func(L, "setZero", _olua_fun_cocos2d_Vec3_setZero); + oluacls_func(L, "smooth", _olua_fun_cocos2d_Vec3_smooth); + oluacls_func(L, "subtract", _olua_fun_cocos2d_Vec3_subtract); + oluacls_prop(L, "normalized", _olua_fun_cocos2d_Vec3_getNormalized, nullptr); + oluacls_prop(L, "one", _olua_fun_cocos2d_Vec3_isOne, nullptr); + oluacls_prop(L, "zero", _olua_fun_cocos2d_Vec3_isZero, _olua_fun_cocos2d_Vec3_setZero); + oluacls_prop(L, "x", _olua_fun_cocos2d_Vec3_x, _olua_fun_cocos2d_Vec3_x); + oluacls_prop(L, "y", _olua_fun_cocos2d_Vec3_y, _olua_fun_cocos2d_Vec3_y); + oluacls_prop(L, "z", _olua_fun_cocos2d_Vec3_z, _olua_fun_cocos2d_Vec3_z); oluacls_const(L, "ONE", &cocos2d::Vec3::ONE); oluacls_const(L, "UNIT_X", &cocos2d::Vec3::UNIT_X); oluacls_const(L, "UNIT_Y", &cocos2d::Vec3::UNIT_Y); @@ -2945,49 +2994,19 @@ OLUA_LIB int luaopen_cocos2d_Vec3(lua_State *L) return 1; } -OLUA_END_DECLS -static int _cocos2d_Vec4___call(lua_State *L) +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_Vec3(lua_State *L) { - olua_startinvoke(L); - - cocos2d::Vec4 ret; - - luaL_checktype(L, 2, LUA_TTABLE); - - float arg1 = 0; /** x */ - float arg2 = 0; /** y */ - float arg3 = 0; /** z */ - float arg4 = 0; /** w */ - - olua_getfield(L, 2, "x"); - olua_check_number(L, -1, &arg1); - ret.x = arg1; - lua_pop(L, 1); - - olua_getfield(L, 2, "y"); - olua_check_number(L, -1, &arg2); - ret.y = arg2; - lua_pop(L, 1); - - olua_getfield(L, 2, "z"); - olua_check_number(L, -1, &arg3); - ret.z = arg3; - lua_pop(L, 1); - - olua_getfield(L, 2, "w"); - olua_check_number(L, -1, &arg4); - ret.w = arg4; - lua_pop(L, 1); - - olua_pushcopy_object(L, ret, "cc.Vec4"); - - olua_endinvoke(L); - + olua_require(L, "cocos2d_types", luaopen_cocos2d_types); + if (!olua_getclass(L, "cc.Vec3")) { + luaL_error(L, "class not found: cocos2d::Vec3"); + } return 1; } +OLUA_END_DECLS -static int _cocos2d_Vec4___gc(lua_State *L) +static int _olua_fun_cocos2d_Vec4___gc(lua_State *L) { olua_startinvoke(L); @@ -2999,7 +3018,7 @@ static int _cocos2d_Vec4___gc(lua_State *L) return 0; } -static int _cocos2d_Vec4___olua_move(lua_State *L) +static int _olua_fun_cocos2d_Vec4___olua_move(lua_State *L) { olua_startinvoke(L); @@ -3011,30 +3030,30 @@ static int _cocos2d_Vec4___olua_move(lua_State *L) return 1; } -static int _cocos2d_Vec4_add$1(lua_State *L) +static int _olua_fun_cocos2d_Vec4_add$1(lua_State *L) { olua_startinvoke(L); cocos2d::Vec4 *self = nullptr; - cocos2d::Vec4 arg1; /** v */ + cocos2d::Vec4 *arg1; /** v */ olua_to_object(L, 1, &self, "cc.Vec4"); olua_check_object(L, 2, &arg1, "cc.Vec4"); // void add(const cocos2d::Vec4 &v) - self->add(arg1); + self->add(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_Vec4_add$2(lua_State *L) +static int _olua_fun_cocos2d_Vec4_add$2(lua_State *L) { olua_startinvoke(L); - cocos2d::Vec4 arg1; /** v1 */ - cocos2d::Vec4 arg2; /** v2 */ + cocos2d::Vec4 *arg1; /** v1 */ + cocos2d::Vec4 *arg2; /** v2 */ cocos2d::Vec4 *arg3 = nullptr; /** dst */ olua_check_object(L, 1, &arg1, "cc.Vec4"); @@ -3042,28 +3061,28 @@ static int _cocos2d_Vec4_add$2(lua_State *L) olua_check_object(L, 3, &arg3, "cc.Vec4"); // static void add(const cocos2d::Vec4 &v1, const cocos2d::Vec4 &v2, cocos2d::Vec4 *dst) - cocos2d::Vec4::add(arg1, arg2, arg3); + cocos2d::Vec4::add(*arg1, *arg2, arg3); olua_endinvoke(L); return 0; } -static int _cocos2d_Vec4_add(lua_State *L) +static int _olua_fun_cocos2d_Vec4_add(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_object(L, 2, "cc.Vec4"))) { // void add(const cocos2d::Vec4 &v) - return _cocos2d_Vec4_add$1(L); + return _olua_fun_cocos2d_Vec4_add$1(L); // } } if (num_args == 3) { // if ((olua_is_object(L, 1, "cc.Vec4")) && (olua_is_object(L, 2, "cc.Vec4")) && (olua_is_object(L, 3, "cc.Vec4"))) { // static void add(const cocos2d::Vec4 &v1, const cocos2d::Vec4 &v2, cocos2d::Vec4 *dst) - return _cocos2d_Vec4_add$2(L); + return _olua_fun_cocos2d_Vec4_add$2(L); // } } @@ -3072,18 +3091,18 @@ static int _cocos2d_Vec4_add(lua_State *L) return 0; } -static int _cocos2d_Vec4_angle(lua_State *L) +static int _olua_fun_cocos2d_Vec4_angle(lua_State *L) { olua_startinvoke(L); - cocos2d::Vec4 arg1; /** v1 */ - cocos2d::Vec4 arg2; /** v2 */ + cocos2d::Vec4 *arg1; /** v1 */ + cocos2d::Vec4 *arg2; /** v2 */ olua_check_object(L, 1, &arg1, "cc.Vec4"); olua_check_object(L, 2, &arg2, "cc.Vec4"); // static float angle(const cocos2d::Vec4 &v1, const cocos2d::Vec4 &v2) - float ret = cocos2d::Vec4::angle(arg1, arg2); + float ret = cocos2d::Vec4::angle(*arg1, *arg2); int num_ret = olua_push_number(L, ret); olua_endinvoke(L); @@ -3091,33 +3110,33 @@ static int _cocos2d_Vec4_angle(lua_State *L) return num_ret; } -static int _cocos2d_Vec4_clamp$1(lua_State *L) +static int _olua_fun_cocos2d_Vec4_clamp$1(lua_State *L) { olua_startinvoke(L); cocos2d::Vec4 *self = nullptr; - cocos2d::Vec4 arg1; /** min */ - cocos2d::Vec4 arg2; /** max */ + cocos2d::Vec4 *arg1; /** min */ + cocos2d::Vec4 *arg2; /** max */ olua_to_object(L, 1, &self, "cc.Vec4"); olua_check_object(L, 2, &arg1, "cc.Vec4"); olua_check_object(L, 3, &arg2, "cc.Vec4"); // void clamp(const cocos2d::Vec4 &min, const cocos2d::Vec4 &max) - self->clamp(arg1, arg2); + self->clamp(*arg1, *arg2); olua_endinvoke(L); return 0; } -static int _cocos2d_Vec4_clamp$2(lua_State *L) +static int _olua_fun_cocos2d_Vec4_clamp$2(lua_State *L) { olua_startinvoke(L); - cocos2d::Vec4 arg1; /** v */ - cocos2d::Vec4 arg2; /** min */ - cocos2d::Vec4 arg3; /** max */ + cocos2d::Vec4 *arg1; /** v */ + cocos2d::Vec4 *arg2; /** min */ + cocos2d::Vec4 *arg3; /** max */ cocos2d::Vec4 *arg4 = nullptr; /** dst */ olua_check_object(L, 1, &arg1, "cc.Vec4"); @@ -3126,28 +3145,28 @@ static int _cocos2d_Vec4_clamp$2(lua_State *L) olua_check_object(L, 4, &arg4, "cc.Vec4"); // static void clamp(const cocos2d::Vec4 &v, const cocos2d::Vec4 &min, const cocos2d::Vec4 &max, cocos2d::Vec4 *dst) - cocos2d::Vec4::clamp(arg1, arg2, arg3, arg4); + cocos2d::Vec4::clamp(*arg1, *arg2, *arg3, arg4); olua_endinvoke(L); return 0; } -static int _cocos2d_Vec4_clamp(lua_State *L) +static int _olua_fun_cocos2d_Vec4_clamp(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 2) { // if ((olua_is_object(L, 2, "cc.Vec4")) && (olua_is_object(L, 3, "cc.Vec4"))) { // void clamp(const cocos2d::Vec4 &min, const cocos2d::Vec4 &max) - return _cocos2d_Vec4_clamp$1(L); + return _olua_fun_cocos2d_Vec4_clamp$1(L); // } } if (num_args == 4) { // if ((olua_is_object(L, 1, "cc.Vec4")) && (olua_is_object(L, 2, "cc.Vec4")) && (olua_is_object(L, 3, "cc.Vec4")) && (olua_is_object(L, 4, "cc.Vec4"))) { // static void clamp(const cocos2d::Vec4 &v, const cocos2d::Vec4 &min, const cocos2d::Vec4 &max, cocos2d::Vec4 *dst) - return _cocos2d_Vec4_clamp$2(L); + return _olua_fun_cocos2d_Vec4_clamp$2(L); // } } @@ -3156,18 +3175,18 @@ static int _cocos2d_Vec4_clamp(lua_State *L) return 0; } -static int _cocos2d_Vec4_distance(lua_State *L) +static int _olua_fun_cocos2d_Vec4_distance(lua_State *L) { olua_startinvoke(L); cocos2d::Vec4 *self = nullptr; - cocos2d::Vec4 arg1; /** v */ + cocos2d::Vec4 *arg1; /** v */ olua_to_object(L, 1, &self, "cc.Vec4"); olua_check_object(L, 2, &arg1, "cc.Vec4"); // float distance(const cocos2d::Vec4 &v) - float ret = self->distance(arg1); + float ret = self->distance(*arg1); int num_ret = olua_push_number(L, ret); olua_endinvoke(L); @@ -3175,18 +3194,18 @@ static int _cocos2d_Vec4_distance(lua_State *L) return num_ret; } -static int _cocos2d_Vec4_distanceSquared(lua_State *L) +static int _olua_fun_cocos2d_Vec4_distanceSquared(lua_State *L) { olua_startinvoke(L); cocos2d::Vec4 *self = nullptr; - cocos2d::Vec4 arg1; /** v */ + cocos2d::Vec4 *arg1; /** v */ olua_to_object(L, 1, &self, "cc.Vec4"); olua_check_object(L, 2, &arg1, "cc.Vec4"); // float distanceSquared(const cocos2d::Vec4 &v) - float ret = self->distanceSquared(arg1); + float ret = self->distanceSquared(*arg1); int num_ret = olua_push_number(L, ret); olua_endinvoke(L); @@ -3194,18 +3213,18 @@ static int _cocos2d_Vec4_distanceSquared(lua_State *L) return num_ret; } -static int _cocos2d_Vec4_dot$1(lua_State *L) +static int _olua_fun_cocos2d_Vec4_dot$1(lua_State *L) { olua_startinvoke(L); cocos2d::Vec4 *self = nullptr; - cocos2d::Vec4 arg1; /** v */ + cocos2d::Vec4 *arg1; /** v */ olua_to_object(L, 1, &self, "cc.Vec4"); olua_check_object(L, 2, &arg1, "cc.Vec4"); // float dot(const cocos2d::Vec4 &v) - float ret = self->dot(arg1); + float ret = self->dot(*arg1); int num_ret = olua_push_number(L, ret); olua_endinvoke(L); @@ -3213,18 +3232,18 @@ static int _cocos2d_Vec4_dot$1(lua_State *L) return num_ret; } -static int _cocos2d_Vec4_dot$2(lua_State *L) +static int _olua_fun_cocos2d_Vec4_dot$2(lua_State *L) { olua_startinvoke(L); - cocos2d::Vec4 arg1; /** v1 */ - cocos2d::Vec4 arg2; /** v2 */ + cocos2d::Vec4 *arg1; /** v1 */ + cocos2d::Vec4 *arg2; /** v2 */ olua_check_object(L, 1, &arg1, "cc.Vec4"); olua_check_object(L, 2, &arg2, "cc.Vec4"); // static float dot(const cocos2d::Vec4 &v1, const cocos2d::Vec4 &v2) - float ret = cocos2d::Vec4::dot(arg1, arg2); + float ret = cocos2d::Vec4::dot(*arg1, *arg2); int num_ret = olua_push_number(L, ret); olua_endinvoke(L); @@ -3232,21 +3251,21 @@ static int _cocos2d_Vec4_dot$2(lua_State *L) return num_ret; } -static int _cocos2d_Vec4_dot(lua_State *L) +static int _olua_fun_cocos2d_Vec4_dot(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_object(L, 2, "cc.Vec4"))) { // float dot(const cocos2d::Vec4 &v) - return _cocos2d_Vec4_dot$1(L); + return _olua_fun_cocos2d_Vec4_dot$1(L); // } } if (num_args == 2) { // if ((olua_is_object(L, 1, "cc.Vec4")) && (olua_is_object(L, 2, "cc.Vec4"))) { // static float dot(const cocos2d::Vec4 &v1, const cocos2d::Vec4 &v2) - return _cocos2d_Vec4_dot$2(L); + return _olua_fun_cocos2d_Vec4_dot$2(L); // } } @@ -3255,7 +3274,7 @@ static int _cocos2d_Vec4_dot(lua_State *L) return 0; } -static int _cocos2d_Vec4_fromColor(lua_State *L) +static int _olua_fun_cocos2d_Vec4_fromColor(lua_State *L) { olua_startinvoke(L); @@ -3265,14 +3284,14 @@ static int _cocos2d_Vec4_fromColor(lua_State *L) // static cocos2d::Vec4 fromColor(unsigned int color) cocos2d::Vec4 ret = cocos2d::Vec4::fromColor(arg1); - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec4"); + int num_ret = olua_copy_object(L, ret, "cc.Vec4"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_Vec4_getNormalized(lua_State *L) +static int _olua_fun_cocos2d_Vec4_getNormalized(lua_State *L) { olua_startinvoke(L); @@ -3282,14 +3301,14 @@ static int _cocos2d_Vec4_getNormalized(lua_State *L) // cocos2d::Vec4 getNormalized() cocos2d::Vec4 ret = self->getNormalized(); - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec4"); + int num_ret = olua_copy_object(L, ret, "cc.Vec4"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_Vec4_isOne(lua_State *L) +static int _olua_fun_cocos2d_Vec4_isOne(lua_State *L) { olua_startinvoke(L); @@ -3306,7 +3325,7 @@ static int _cocos2d_Vec4_isOne(lua_State *L) return num_ret; } -static int _cocos2d_Vec4_isZero(lua_State *L) +static int _olua_fun_cocos2d_Vec4_isZero(lua_State *L) { olua_startinvoke(L); @@ -3323,7 +3342,7 @@ static int _cocos2d_Vec4_isZero(lua_State *L) return num_ret; } -static int _cocos2d_Vec4_length(lua_State *L) +static int _olua_fun_cocos2d_Vec4_length(lua_State *L) { olua_startinvoke(L); @@ -3340,7 +3359,7 @@ static int _cocos2d_Vec4_length(lua_State *L) return num_ret; } -static int _cocos2d_Vec4_lengthSquared(lua_State *L) +static int _olua_fun_cocos2d_Vec4_lengthSquared(lua_State *L) { olua_startinvoke(L); @@ -3357,7 +3376,7 @@ static int _cocos2d_Vec4_lengthSquared(lua_State *L) return num_ret; } -static int _cocos2d_Vec4_negate(lua_State *L) +static int _olua_fun_cocos2d_Vec4_negate(lua_State *L) { olua_startinvoke(L); @@ -3373,11 +3392,11 @@ static int _cocos2d_Vec4_negate(lua_State *L) return 0; } -static int _cocos2d_Vec4_new$1(lua_State *L) +static int _olua_fun_cocos2d_Vec4_new$1(lua_State *L) { olua_startinvoke(L); - // Vec4() + // cocos2d::Vec4() cocos2d::Vec4 *ret = new cocos2d::Vec4(); int num_ret = olua_push_object(L, ret, "cc.Vec4"); olua_postnew(L, ret); @@ -3387,7 +3406,7 @@ static int _cocos2d_Vec4_new$1(lua_State *L) return num_ret; } -static int _cocos2d_Vec4_new$2(lua_State *L) +static int _olua_fun_cocos2d_Vec4_new$2(lua_State *L) { olua_startinvoke(L); @@ -3401,7 +3420,7 @@ static int _cocos2d_Vec4_new$2(lua_State *L) olua_check_number(L, 3, &arg3); olua_check_number(L, 4, &arg4); - // Vec4(float xx, float yy, float zz, float ww) + // cocos2d::Vec4(float xx, float yy, float zz, float ww) cocos2d::Vec4 *ret = new cocos2d::Vec4(arg1, arg2, arg3, arg4); int num_ret = olua_push_object(L, ret, "cc.Vec4"); olua_postnew(L, ret); @@ -3411,15 +3430,15 @@ static int _cocos2d_Vec4_new$2(lua_State *L) return num_ret; } -static int _cocos2d_Vec4_new$3(lua_State *L) +static int _olua_fun_cocos2d_Vec4_new$3(lua_State *L) { olua_startinvoke(L); float *arg1 = nullptr; /** array */ - olua_check_pointer(L, 1, &arg1, "olua.float"); + olua_check_valueptr(L, 1, &arg1, "olua.float"); - // Vec4(const float *array) + // cocos2d::Vec4(const float *array) cocos2d::Vec4 *ret = new cocos2d::Vec4(arg1); int num_ret = olua_push_object(L, ret, "cc.Vec4"); olua_postnew(L, ret); @@ -3429,36 +3448,18 @@ static int _cocos2d_Vec4_new$3(lua_State *L) return num_ret; } -static int _cocos2d_Vec4_new$4(lua_State *L) +static int _olua_fun_cocos2d_Vec4_new$4(lua_State *L) { olua_startinvoke(L); - cocos2d::Vec4 arg1; /** p1 */ - cocos2d::Vec4 arg2; /** p2 */ + cocos2d::Vec4 *arg1; /** p1 */ + cocos2d::Vec4 *arg2; /** p2 */ olua_check_object(L, 1, &arg1, "cc.Vec4"); olua_check_object(L, 2, &arg2, "cc.Vec4"); - // Vec4(const cocos2d::Vec4 &p1, const cocos2d::Vec4 &p2) - cocos2d::Vec4 *ret = new cocos2d::Vec4(arg1, arg2); - int num_ret = olua_push_object(L, ret, "cc.Vec4"); - olua_postnew(L, ret); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_Vec4_new$5(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::Vec4 arg1; /** copy */ - - olua_check_object(L, 1, &arg1, "cc.Vec4"); - - // Vec4(const cocos2d::Vec4 ©) - cocos2d::Vec4 *ret = new cocos2d::Vec4(arg1); + // cocos2d::Vec4(const cocos2d::Vec4 &p1, const cocos2d::Vec4 &p2) + cocos2d::Vec4 *ret = new cocos2d::Vec4(*arg1, *arg2); int num_ret = olua_push_object(L, ret, "cc.Vec4"); olua_postnew(L, ret); @@ -3467,38 +3468,33 @@ static int _cocos2d_Vec4_new$5(lua_State *L) return num_ret; } -static int _cocos2d_Vec4_new(lua_State *L) +static int _olua_fun_cocos2d_Vec4_new(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 0) { - // Vec4() - return _cocos2d_Vec4_new$1(L); + // cocos2d::Vec4() + return _olua_fun_cocos2d_Vec4_new$1(L); } if (num_args == 1) { - if ((olua_is_object(L, 1, "cc.Vec4"))) { - // Vec4(const cocos2d::Vec4 ©) - return _cocos2d_Vec4_new$5(L); - } - - // if ((olua_is_pointer(L, 1, "olua.float"))) { - // Vec4(const float *array) - return _cocos2d_Vec4_new$3(L); + // if ((olua_is_valueptr(L, 1, "olua.float"))) { + // cocos2d::Vec4(const float *array) + return _olua_fun_cocos2d_Vec4_new$3(L); // } } if (num_args == 2) { // if ((olua_is_object(L, 1, "cc.Vec4")) && (olua_is_object(L, 2, "cc.Vec4"))) { - // Vec4(const cocos2d::Vec4 &p1, const cocos2d::Vec4 &p2) - return _cocos2d_Vec4_new$4(L); + // cocos2d::Vec4(const cocos2d::Vec4 &p1, const cocos2d::Vec4 &p2) + return _olua_fun_cocos2d_Vec4_new$4(L); // } } if (num_args == 4) { // if ((olua_is_number(L, 1)) && (olua_is_number(L, 2)) && (olua_is_number(L, 3)) && (olua_is_number(L, 4))) { - // Vec4(float xx, float yy, float zz, float ww) - return _cocos2d_Vec4_new$2(L); + // cocos2d::Vec4(float xx, float yy, float zz, float ww) + return _olua_fun_cocos2d_Vec4_new$2(L); // } } @@ -3507,7 +3503,7 @@ static int _cocos2d_Vec4_new(lua_State *L) return 0; } -static int _cocos2d_Vec4_normalize(lua_State *L) +static int _olua_fun_cocos2d_Vec4_normalize(lua_State *L) { olua_startinvoke(L); @@ -3523,7 +3519,7 @@ static int _cocos2d_Vec4_normalize(lua_State *L) return 0; } -static int _cocos2d_Vec4_scale(lua_State *L) +static int _olua_fun_cocos2d_Vec4_scale(lua_State *L) { olua_startinvoke(L); @@ -3541,7 +3537,7 @@ static int _cocos2d_Vec4_scale(lua_State *L) return 0; } -static int _cocos2d_Vec4_set$1(lua_State *L) +static int _olua_fun_cocos2d_Vec4_set$1(lua_State *L) { olua_startinvoke(L); @@ -3565,7 +3561,7 @@ static int _cocos2d_Vec4_set$1(lua_State *L) return 0; } -static int _cocos2d_Vec4_set$2(lua_State *L) +static int _olua_fun_cocos2d_Vec4_set$2(lua_State *L) { olua_startinvoke(L); @@ -3573,7 +3569,7 @@ static int _cocos2d_Vec4_set$2(lua_State *L) float *arg1 = nullptr; /** array */ olua_to_object(L, 1, &self, "cc.Vec4"); - olua_check_pointer(L, 2, &arg1, "olua.float"); + olua_check_valueptr(L, 2, &arg1, "olua.float"); // void set(const float *array) self->set(arg1); @@ -3583,71 +3579,71 @@ static int _cocos2d_Vec4_set$2(lua_State *L) return 0; } -static int _cocos2d_Vec4_set$3(lua_State *L) +static int _olua_fun_cocos2d_Vec4_set$3(lua_State *L) { olua_startinvoke(L); cocos2d::Vec4 *self = nullptr; - cocos2d::Vec4 arg1; /** v */ + cocos2d::Vec4 *arg1; /** v */ olua_to_object(L, 1, &self, "cc.Vec4"); olua_check_object(L, 2, &arg1, "cc.Vec4"); // void set(const cocos2d::Vec4 &v) - self->set(arg1); + self->set(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_Vec4_set$4(lua_State *L) +static int _olua_fun_cocos2d_Vec4_set$4(lua_State *L) { olua_startinvoke(L); cocos2d::Vec4 *self = nullptr; - cocos2d::Vec4 arg1; /** p1 */ - cocos2d::Vec4 arg2; /** p2 */ + cocos2d::Vec4 *arg1; /** p1 */ + cocos2d::Vec4 *arg2; /** p2 */ olua_to_object(L, 1, &self, "cc.Vec4"); olua_check_object(L, 2, &arg1, "cc.Vec4"); olua_check_object(L, 3, &arg2, "cc.Vec4"); // void set(const cocos2d::Vec4 &p1, const cocos2d::Vec4 &p2) - self->set(arg1, arg2); + self->set(*arg1, *arg2); olua_endinvoke(L); return 0; } -static int _cocos2d_Vec4_set(lua_State *L) +static int _olua_fun_cocos2d_Vec4_set(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { if ((olua_is_object(L, 2, "cc.Vec4"))) { // void set(const cocos2d::Vec4 &v) - return _cocos2d_Vec4_set$3(L); + return _olua_fun_cocos2d_Vec4_set$3(L); } - // if ((olua_is_pointer(L, 2, "olua.float"))) { + // if ((olua_is_valueptr(L, 2, "olua.float"))) { // void set(const float *array) - return _cocos2d_Vec4_set$2(L); + return _olua_fun_cocos2d_Vec4_set$2(L); // } } if (num_args == 2) { // if ((olua_is_object(L, 2, "cc.Vec4")) && (olua_is_object(L, 3, "cc.Vec4"))) { // void set(const cocos2d::Vec4 &p1, const cocos2d::Vec4 &p2) - return _cocos2d_Vec4_set$4(L); + return _olua_fun_cocos2d_Vec4_set$4(L); // } } if (num_args == 4) { // if ((olua_is_number(L, 2)) && (olua_is_number(L, 3)) && (olua_is_number(L, 4)) && (olua_is_number(L, 5))) { // void set(float xx, float yy, float zz, float ww) - return _cocos2d_Vec4_set$1(L); + return _olua_fun_cocos2d_Vec4_set$1(L); // } } @@ -3656,30 +3652,30 @@ static int _cocos2d_Vec4_set(lua_State *L) return 0; } -static int _cocos2d_Vec4_subtract$1(lua_State *L) +static int _olua_fun_cocos2d_Vec4_subtract$1(lua_State *L) { olua_startinvoke(L); cocos2d::Vec4 *self = nullptr; - cocos2d::Vec4 arg1; /** v */ + cocos2d::Vec4 *arg1; /** v */ olua_to_object(L, 1, &self, "cc.Vec4"); olua_check_object(L, 2, &arg1, "cc.Vec4"); // void subtract(const cocos2d::Vec4 &v) - self->subtract(arg1); + self->subtract(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_Vec4_subtract$2(lua_State *L) +static int _olua_fun_cocos2d_Vec4_subtract$2(lua_State *L) { olua_startinvoke(L); - cocos2d::Vec4 arg1; /** v1 */ - cocos2d::Vec4 arg2; /** v2 */ + cocos2d::Vec4 *arg1; /** v1 */ + cocos2d::Vec4 *arg2; /** v2 */ cocos2d::Vec4 *arg3 = nullptr; /** dst */ olua_check_object(L, 1, &arg1, "cc.Vec4"); @@ -3687,28 +3683,28 @@ static int _cocos2d_Vec4_subtract$2(lua_State *L) olua_check_object(L, 3, &arg3, "cc.Vec4"); // static void subtract(const cocos2d::Vec4 &v1, const cocos2d::Vec4 &v2, cocos2d::Vec4 *dst) - cocos2d::Vec4::subtract(arg1, arg2, arg3); + cocos2d::Vec4::subtract(*arg1, *arg2, arg3); olua_endinvoke(L); return 0; } -static int _cocos2d_Vec4_subtract(lua_State *L) +static int _olua_fun_cocos2d_Vec4_subtract(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_object(L, 2, "cc.Vec4"))) { // void subtract(const cocos2d::Vec4 &v) - return _cocos2d_Vec4_subtract$1(L); + return _olua_fun_cocos2d_Vec4_subtract$1(L); // } } if (num_args == 3) { // if ((olua_is_object(L, 1, "cc.Vec4")) && (olua_is_object(L, 2, "cc.Vec4")) && (olua_is_object(L, 3, "cc.Vec4"))) { // static void subtract(const cocos2d::Vec4 &v1, const cocos2d::Vec4 &v2, cocos2d::Vec4 *dst) - return _cocos2d_Vec4_subtract$2(L); + return _olua_fun_cocos2d_Vec4_subtract$2(L); // } } @@ -3717,7 +3713,7 @@ static int _cocos2d_Vec4_subtract(lua_State *L) return 0; } -static int _cocos2d_Vec4_get_w(lua_State *L) +static int _olua_fun_cocos2d_Vec4_w$1(lua_State *L) { olua_startinvoke(L); @@ -3734,7 +3730,7 @@ static int _cocos2d_Vec4_get_w(lua_State *L) return num_ret; } -static int _cocos2d_Vec4_set_w(lua_State *L) +static int _olua_fun_cocos2d_Vec4_w$2(lua_State *L) { olua_startinvoke(L); @@ -3752,7 +3748,28 @@ static int _cocos2d_Vec4_set_w(lua_State *L) return 0; } -static int _cocos2d_Vec4_get_x(lua_State *L) +static int _olua_fun_cocos2d_Vec4_w(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float w + return _olua_fun_cocos2d_Vec4_w$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float w + return _olua_fun_cocos2d_Vec4_w$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::Vec4::w' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_Vec4_x$1(lua_State *L) { olua_startinvoke(L); @@ -3769,7 +3786,7 @@ static int _cocos2d_Vec4_get_x(lua_State *L) return num_ret; } -static int _cocos2d_Vec4_set_x(lua_State *L) +static int _olua_fun_cocos2d_Vec4_x$2(lua_State *L) { olua_startinvoke(L); @@ -3787,7 +3804,28 @@ static int _cocos2d_Vec4_set_x(lua_State *L) return 0; } -static int _cocos2d_Vec4_get_y(lua_State *L) +static int _olua_fun_cocos2d_Vec4_x(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float x + return _olua_fun_cocos2d_Vec4_x$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float x + return _olua_fun_cocos2d_Vec4_x$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::Vec4::x' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_Vec4_y$1(lua_State *L) { olua_startinvoke(L); @@ -3804,7 +3842,7 @@ static int _cocos2d_Vec4_get_y(lua_State *L) return num_ret; } -static int _cocos2d_Vec4_set_y(lua_State *L) +static int _olua_fun_cocos2d_Vec4_y$2(lua_State *L) { olua_startinvoke(L); @@ -3822,7 +3860,28 @@ static int _cocos2d_Vec4_set_y(lua_State *L) return 0; } -static int _cocos2d_Vec4_get_z(lua_State *L) +static int _olua_fun_cocos2d_Vec4_y(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float y + return _olua_fun_cocos2d_Vec4_y$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float y + return _olua_fun_cocos2d_Vec4_y$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::Vec4::y' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_Vec4_z$1(lua_State *L) { olua_startinvoke(L); @@ -3839,7 +3898,7 @@ static int _cocos2d_Vec4_get_z(lua_State *L) return num_ret; } -static int _cocos2d_Vec4_set_z(lua_State *L) +static int _olua_fun_cocos2d_Vec4_z$2(lua_State *L) { olua_startinvoke(L); @@ -3857,38 +3916,57 @@ static int _cocos2d_Vec4_set_z(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_Vec4(lua_State *L) +static int _olua_fun_cocos2d_Vec4_z(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float z + return _olua_fun_cocos2d_Vec4_z$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float z + return _olua_fun_cocos2d_Vec4_z$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::Vec4::z' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_cls_cc_Vec4(lua_State *L) { oluacls_class(L, "cc.Vec4"); - oluacls_func(L, "__call", _cocos2d_Vec4___call); - oluacls_func(L, "__gc", _cocos2d_Vec4___gc); - oluacls_func(L, "__olua_move", _cocos2d_Vec4___olua_move); - oluacls_func(L, "add", _cocos2d_Vec4_add); - oluacls_func(L, "angle", _cocos2d_Vec4_angle); - oluacls_func(L, "clamp", _cocos2d_Vec4_clamp); - oluacls_func(L, "distance", _cocos2d_Vec4_distance); - oluacls_func(L, "distanceSquared", _cocos2d_Vec4_distanceSquared); - oluacls_func(L, "dot", _cocos2d_Vec4_dot); - oluacls_func(L, "fromColor", _cocos2d_Vec4_fromColor); - oluacls_func(L, "getNormalized", _cocos2d_Vec4_getNormalized); - oluacls_func(L, "isOne", _cocos2d_Vec4_isOne); - oluacls_func(L, "isZero", _cocos2d_Vec4_isZero); - oluacls_func(L, "length", _cocos2d_Vec4_length); - oluacls_func(L, "lengthSquared", _cocos2d_Vec4_lengthSquared); - oluacls_func(L, "negate", _cocos2d_Vec4_negate); - oluacls_func(L, "new", _cocos2d_Vec4_new); - oluacls_func(L, "normalize", _cocos2d_Vec4_normalize); - oluacls_func(L, "scale", _cocos2d_Vec4_scale); - oluacls_func(L, "set", _cocos2d_Vec4_set); - oluacls_func(L, "subtract", _cocos2d_Vec4_subtract); - oluacls_prop(L, "normalized", _cocos2d_Vec4_getNormalized, nullptr); - oluacls_prop(L, "one", _cocos2d_Vec4_isOne, nullptr); - oluacls_prop(L, "zero", _cocos2d_Vec4_isZero, nullptr); - oluacls_prop(L, "w", _cocos2d_Vec4_get_w, _cocos2d_Vec4_set_w); - oluacls_prop(L, "x", _cocos2d_Vec4_get_x, _cocos2d_Vec4_set_x); - oluacls_prop(L, "y", _cocos2d_Vec4_get_y, _cocos2d_Vec4_set_y); - oluacls_prop(L, "z", _cocos2d_Vec4_get_z, _cocos2d_Vec4_set_z); + oluacls_func(L, "__gc", _olua_fun_cocos2d_Vec4___gc); + oluacls_func(L, "__olua_move", _olua_fun_cocos2d_Vec4___olua_move); + oluacls_func(L, "add", _olua_fun_cocos2d_Vec4_add); + oluacls_func(L, "angle", _olua_fun_cocos2d_Vec4_angle); + oluacls_func(L, "clamp", _olua_fun_cocos2d_Vec4_clamp); + oluacls_func(L, "distance", _olua_fun_cocos2d_Vec4_distance); + oluacls_func(L, "distanceSquared", _olua_fun_cocos2d_Vec4_distanceSquared); + oluacls_func(L, "dot", _olua_fun_cocos2d_Vec4_dot); + oluacls_func(L, "fromColor", _olua_fun_cocos2d_Vec4_fromColor); + oluacls_func(L, "getNormalized", _olua_fun_cocos2d_Vec4_getNormalized); + oluacls_func(L, "isOne", _olua_fun_cocos2d_Vec4_isOne); + oluacls_func(L, "isZero", _olua_fun_cocos2d_Vec4_isZero); + oluacls_func(L, "length", _olua_fun_cocos2d_Vec4_length); + oluacls_func(L, "lengthSquared", _olua_fun_cocos2d_Vec4_lengthSquared); + oluacls_func(L, "negate", _olua_fun_cocos2d_Vec4_negate); + oluacls_func(L, "new", _olua_fun_cocos2d_Vec4_new); + oluacls_func(L, "normalize", _olua_fun_cocos2d_Vec4_normalize); + oluacls_func(L, "scale", _olua_fun_cocos2d_Vec4_scale); + oluacls_func(L, "set", _olua_fun_cocos2d_Vec4_set); + oluacls_func(L, "subtract", _olua_fun_cocos2d_Vec4_subtract); + oluacls_prop(L, "normalized", _olua_fun_cocos2d_Vec4_getNormalized, nullptr); + oluacls_prop(L, "one", _olua_fun_cocos2d_Vec4_isOne, nullptr); + oluacls_prop(L, "zero", _olua_fun_cocos2d_Vec4_isZero, nullptr); + oluacls_prop(L, "w", _olua_fun_cocos2d_Vec4_w, _olua_fun_cocos2d_Vec4_w); + oluacls_prop(L, "x", _olua_fun_cocos2d_Vec4_x, _olua_fun_cocos2d_Vec4_x); + oluacls_prop(L, "y", _olua_fun_cocos2d_Vec4_y, _olua_fun_cocos2d_Vec4_y); + oluacls_prop(L, "z", _olua_fun_cocos2d_Vec4_z, _olua_fun_cocos2d_Vec4_z); oluacls_const(L, "ONE", &cocos2d::Vec4::ONE); oluacls_const(L, "UNIT_W", &cocos2d::Vec4::UNIT_W); oluacls_const(L, "UNIT_X", &cocos2d::Vec4::UNIT_X); @@ -3898,37 +3976,19 @@ OLUA_LIB int luaopen_cocos2d_Vec4(lua_State *L) return 1; } -OLUA_END_DECLS -static int _cocos2d_Size___call(lua_State *L) +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_Vec4(lua_State *L) { - olua_startinvoke(L); - - cocos2d::Size ret; - - luaL_checktype(L, 2, LUA_TTABLE); - - float arg1 = 0; /** width */ - float arg2 = 0; /** height */ - - olua_getfield(L, 2, "width"); - olua_check_number(L, -1, &arg1); - ret.width = arg1; - lua_pop(L, 1); - - olua_getfield(L, 2, "height"); - olua_check_number(L, -1, &arg2); - ret.height = arg2; - lua_pop(L, 1); - - olua_pushcopy_object(L, ret, "cc.Size"); - - olua_endinvoke(L); - + olua_require(L, "cocos2d_types", luaopen_cocos2d_types); + if (!olua_getclass(L, "cc.Vec4")) { + luaL_error(L, "class not found: cocos2d::Vec4"); + } return 1; } +OLUA_END_DECLS -static int _cocos2d_Size___gc(lua_State *L) +static int _olua_fun_cocos2d_Size___gc(lua_State *L) { olua_startinvoke(L); @@ -3940,7 +4000,7 @@ static int _cocos2d_Size___gc(lua_State *L) return 0; } -static int _cocos2d_Size___olua_move(lua_State *L) +static int _olua_fun_cocos2d_Size___olua_move(lua_State *L) { olua_startinvoke(L); @@ -3952,18 +4012,18 @@ static int _cocos2d_Size___olua_move(lua_State *L) return 1; } -static int _cocos2d_Size_equals(lua_State *L) +static int _olua_fun_cocos2d_Size_equals(lua_State *L) { olua_startinvoke(L); cocos2d::Size *self = nullptr; - cocos2d::Size arg1; /** target */ + cocos2d::Size *arg1; /** target */ olua_to_object(L, 1, &self, "cc.Size"); olua_check_object(L, 2, &arg1, "cc.Size"); // bool equals(const cocos2d::Size &target) - bool ret = self->equals(arg1); + bool ret = self->equals(*arg1); int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); @@ -3971,32 +4031,68 @@ static int _cocos2d_Size_equals(lua_State *L) return num_ret; } -static int _cocos2d_Size_new$1(lua_State *L) +static int _olua_fun_cocos2d_Size_height$1(lua_State *L) { olua_startinvoke(L); - // Size() - cocos2d::Size *ret = new cocos2d::Size(); - int num_ret = olua_push_object(L, ret, "cc.Size"); - olua_postnew(L, ret); + cocos2d::Size *self = nullptr; + + olua_to_object(L, 1, &self, "cc.Size"); + + // float height + float ret = self->height; + int num_ret = olua_push_number(L, ret); olua_endinvoke(L); return num_ret; } -static int _cocos2d_Size_new$2(lua_State *L) +static int _olua_fun_cocos2d_Size_height$2(lua_State *L) { olua_startinvoke(L); - float arg1 = 0; /** width */ - float arg2 = 0; /** height */ + cocos2d::Size *self = nullptr; + float arg1 = 0; /** height */ - olua_check_number(L, 1, &arg1); - olua_check_number(L, 2, &arg2); + olua_to_object(L, 1, &self, "cc.Size"); + olua_check_number(L, 2, &arg1); - // Size(float width, float height) - cocos2d::Size *ret = new cocos2d::Size(arg1, arg2); + // float height + self->height = arg1; + + olua_endinvoke(L); + + return 0; +} + +static int _olua_fun_cocos2d_Size_height(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float height + return _olua_fun_cocos2d_Size_height$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float height + return _olua_fun_cocos2d_Size_height$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::Size::height' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_Size_new$1(lua_State *L) +{ + olua_startinvoke(L); + + // cocos2d::Size() + cocos2d::Size *ret = new cocos2d::Size(); int num_ret = olua_push_object(L, ret, "cc.Size"); olua_postnew(L, ret); @@ -4005,16 +4101,18 @@ static int _cocos2d_Size_new$2(lua_State *L) return num_ret; } -static int _cocos2d_Size_new$3(lua_State *L) +static int _olua_fun_cocos2d_Size_new$2(lua_State *L) { olua_startinvoke(L); - cocos2d::Size arg1; /** other */ + float arg1 = 0; /** width */ + float arg2 = 0; /** height */ - olua_check_object(L, 1, &arg1, "cc.Size"); + olua_check_number(L, 1, &arg1); + olua_check_number(L, 2, &arg2); - // Size(const cocos2d::Size &other) - cocos2d::Size *ret = new cocos2d::Size(arg1); + // cocos2d::Size(float width, float height) + cocos2d::Size *ret = new cocos2d::Size(arg1, arg2); int num_ret = olua_push_object(L, ret, "cc.Size"); olua_postnew(L, ret); @@ -4023,16 +4121,16 @@ static int _cocos2d_Size_new$3(lua_State *L) return num_ret; } -static int _cocos2d_Size_new$4(lua_State *L) +static int _olua_fun_cocos2d_Size_new$3(lua_State *L) { olua_startinvoke(L); - cocos2d::Vec2 arg1; /** point */ + cocos2d::Vec2 *arg1; /** point */ olua_check_object(L, 1, &arg1, "cc.Vec2"); - // Size(const cocos2d::Vec2 &point) - cocos2d::Size *ret = new cocos2d::Size(arg1); + // cocos2d::Size(const cocos2d::Vec2 &point) + cocos2d::Size *ret = new cocos2d::Size(*arg1); int num_ret = olua_push_object(L, ret, "cc.Size"); olua_postnew(L, ret); @@ -4041,31 +4139,26 @@ static int _cocos2d_Size_new$4(lua_State *L) return num_ret; } -static int _cocos2d_Size_new(lua_State *L) +static int _olua_fun_cocos2d_Size_new(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 0) { - // Size() - return _cocos2d_Size_new$1(L); + // cocos2d::Size() + return _olua_fun_cocos2d_Size_new$1(L); } if (num_args == 1) { - if ((olua_is_object(L, 1, "cc.Size"))) { - // Size(const cocos2d::Size &other) - return _cocos2d_Size_new$3(L); - } - // if ((olua_is_object(L, 1, "cc.Vec2"))) { - // Size(const cocos2d::Vec2 &point) - return _cocos2d_Size_new$4(L); + // cocos2d::Size(const cocos2d::Vec2 &point) + return _olua_fun_cocos2d_Size_new$3(L); // } } if (num_args == 2) { // if ((olua_is_number(L, 1)) && (olua_is_number(L, 2))) { - // Size(float width, float height) - return _cocos2d_Size_new$2(L); + // cocos2d::Size(float width, float height) + return _olua_fun_cocos2d_Size_new$2(L); // } } @@ -4074,7 +4167,7 @@ static int _cocos2d_Size_new(lua_State *L) return 0; } -static int _cocos2d_Size_setSize(lua_State *L) +static int _olua_fun_cocos2d_Size_setSize(lua_State *L) { olua_startinvoke(L); @@ -4094,7 +4187,7 @@ static int _cocos2d_Size_setSize(lua_State *L) return 0; } -static int _cocos2d_Size_get_height(lua_State *L) +static int _olua_fun_cocos2d_Size_width$1(lua_State *L) { olua_startinvoke(L); @@ -4102,8 +4195,8 @@ static int _cocos2d_Size_get_height(lua_State *L) olua_to_object(L, 1, &self, "cc.Size"); - // float height - float ret = self->height; + // float width + float ret = self->width; int num_ret = olua_push_number(L, ret); olua_endinvoke(L); @@ -4111,78 +4204,72 @@ static int _cocos2d_Size_get_height(lua_State *L) return num_ret; } -static int _cocos2d_Size_set_height(lua_State *L) +static int _olua_fun_cocos2d_Size_width$2(lua_State *L) { olua_startinvoke(L); cocos2d::Size *self = nullptr; - float arg1 = 0; /** height */ + float arg1 = 0; /** width */ olua_to_object(L, 1, &self, "cc.Size"); olua_check_number(L, 2, &arg1); - // float height - self->height = arg1; + // float width + self->width = arg1; olua_endinvoke(L); return 0; } -static int _cocos2d_Size_get_width(lua_State *L) +static int _olua_fun_cocos2d_Size_width(lua_State *L) { - olua_startinvoke(L); - - cocos2d::Size *self = nullptr; + int num_args = lua_gettop(L) - 1; - olua_to_object(L, 1, &self, "cc.Size"); + if (num_args == 0) { + // float width + return _olua_fun_cocos2d_Size_width$1(L); + } - // float width - float ret = self->width; - int num_ret = olua_push_number(L, ret); + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float width + return _olua_fun_cocos2d_Size_width$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'cocos2d::Size::width' not support '%d' arguments", num_args); - return num_ret; + return 0; } -static int _cocos2d_Size_set_width(lua_State *L) +static int _olua_cls_cc_Size(lua_State *L) { - olua_startinvoke(L); - - cocos2d::Size *self = nullptr; - float arg1 = 0; /** width */ - - olua_to_object(L, 1, &self, "cc.Size"); - olua_check_number(L, 2, &arg1); - - // float width - self->width = arg1; - - olua_endinvoke(L); + oluacls_class(L, "cc.Size"); + oluacls_func(L, "__gc", _olua_fun_cocos2d_Size___gc); + oluacls_func(L, "__olua_move", _olua_fun_cocos2d_Size___olua_move); + oluacls_func(L, "equals", _olua_fun_cocos2d_Size_equals); + oluacls_func(L, "new", _olua_fun_cocos2d_Size_new); + oluacls_func(L, "setSize", _olua_fun_cocos2d_Size_setSize); + oluacls_prop(L, "height", _olua_fun_cocos2d_Size_height, _olua_fun_cocos2d_Size_height); + oluacls_prop(L, "width", _olua_fun_cocos2d_Size_width, _olua_fun_cocos2d_Size_width); + oluacls_const(L, "ZERO", &cocos2d::Size::ZERO); - return 0; + return 1; } OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_Size(lua_State *L) +OLUA_LIB int luaopen_cc_Size(lua_State *L) { - oluacls_class(L, "cc.Size"); - oluacls_func(L, "__call", _cocos2d_Size___call); - oluacls_func(L, "__gc", _cocos2d_Size___gc); - oluacls_func(L, "__olua_move", _cocos2d_Size___olua_move); - oluacls_func(L, "equals", _cocos2d_Size_equals); - oluacls_func(L, "new", _cocos2d_Size_new); - oluacls_func(L, "setSize", _cocos2d_Size_setSize); - oluacls_prop(L, "height", _cocos2d_Size_get_height, _cocos2d_Size_set_height); - oluacls_prop(L, "width", _cocos2d_Size_get_width, _cocos2d_Size_set_width); - oluacls_const(L, "ZERO", &cocos2d::Size::ZERO); - + olua_require(L, "cocos2d_types", luaopen_cocos2d_types); + if (!olua_getclass(L, "cc.Size")) { + luaL_error(L, "class not found: cocos2d::Size"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_Rect___call(lua_State *L) +static int _olua_fun_cocos2d_Rect___call(lua_State *L) { olua_startinvoke(L); @@ -4194,7 +4281,7 @@ static int _cocos2d_Rect___call(lua_State *L) return (int)ret; } -static int _cocos2d_Rect___gc(lua_State *L) +static int _olua_fun_cocos2d_Rect___gc(lua_State *L) { olua_startinvoke(L); @@ -4206,7 +4293,7 @@ static int _cocos2d_Rect___gc(lua_State *L) return 0; } -static int _cocos2d_Rect___olua_move(lua_State *L) +static int _olua_fun_cocos2d_Rect___olua_move(lua_State *L) { olua_startinvoke(L); @@ -4218,18 +4305,18 @@ static int _cocos2d_Rect___olua_move(lua_State *L) return 1; } -static int _cocos2d_Rect_containsPoint(lua_State *L) +static int _olua_fun_cocos2d_Rect_containsPoint(lua_State *L) { olua_startinvoke(L); cocos2d::Rect *self = nullptr; - cocos2d::Vec2 arg1; /** point */ + cocos2d::Vec2 *arg1; /** point */ olua_to_object(L, 1, &self, "cc.Rect"); olua_check_object(L, 2, &arg1, "cc.Vec2"); // bool containsPoint(const cocos2d::Vec2 &point) - bool ret = self->containsPoint(arg1); + bool ret = self->containsPoint(*arg1); int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); @@ -4237,18 +4324,18 @@ static int _cocos2d_Rect_containsPoint(lua_State *L) return num_ret; } -static int _cocos2d_Rect_equals(lua_State *L) +static int _olua_fun_cocos2d_Rect_equals(lua_State *L) { olua_startinvoke(L); cocos2d::Rect *self = nullptr; - cocos2d::Rect arg1; /** rect */ + cocos2d::Rect *arg1; /** rect */ olua_to_object(L, 1, &self, "cc.Rect"); olua_check_object(L, 2, &arg1, "cc.Rect"); // bool equals(const cocos2d::Rect &rect) - bool ret = self->equals(arg1); + bool ret = self->equals(*arg1); int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); @@ -4256,7 +4343,7 @@ static int _cocos2d_Rect_equals(lua_State *L) return num_ret; } -static int _cocos2d_Rect_getMaxX(lua_State *L) +static int _olua_fun_cocos2d_Rect_getMaxX(lua_State *L) { olua_startinvoke(L); @@ -4273,7 +4360,7 @@ static int _cocos2d_Rect_getMaxX(lua_State *L) return num_ret; } -static int _cocos2d_Rect_getMaxY(lua_State *L) +static int _olua_fun_cocos2d_Rect_getMaxY(lua_State *L) { olua_startinvoke(L); @@ -4290,7 +4377,7 @@ static int _cocos2d_Rect_getMaxY(lua_State *L) return num_ret; } -static int _cocos2d_Rect_getMidX(lua_State *L) +static int _olua_fun_cocos2d_Rect_getMidX(lua_State *L) { olua_startinvoke(L); @@ -4307,7 +4394,7 @@ static int _cocos2d_Rect_getMidX(lua_State *L) return num_ret; } -static int _cocos2d_Rect_getMidY(lua_State *L) +static int _olua_fun_cocos2d_Rect_getMidY(lua_State *L) { olua_startinvoke(L); @@ -4324,7 +4411,7 @@ static int _cocos2d_Rect_getMidY(lua_State *L) return num_ret; } -static int _cocos2d_Rect_getMinX(lua_State *L) +static int _olua_fun_cocos2d_Rect_getMinX(lua_State *L) { olua_startinvoke(L); @@ -4341,7 +4428,7 @@ static int _cocos2d_Rect_getMinX(lua_State *L) return num_ret; } -static int _cocos2d_Rect_getMinY(lua_State *L) +static int _olua_fun_cocos2d_Rect_getMinY(lua_State *L) { olua_startinvoke(L); @@ -4358,12 +4445,12 @@ static int _cocos2d_Rect_getMinY(lua_State *L) return num_ret; } -static int _cocos2d_Rect_intersectsCircle(lua_State *L) +static int _olua_fun_cocos2d_Rect_intersectsCircle(lua_State *L) { olua_startinvoke(L); cocos2d::Rect *self = nullptr; - cocos2d::Vec2 arg1; /** center */ + cocos2d::Vec2 *arg1; /** center */ float arg2 = 0; /** radius */ olua_to_object(L, 1, &self, "cc.Rect"); @@ -4371,7 +4458,7 @@ static int _cocos2d_Rect_intersectsCircle(lua_State *L) olua_check_number(L, 3, &arg2); // bool intersectsCircle(const cocos2d::Vec2 ¢er, float radius) - bool ret = self->intersectsCircle(arg1, arg2); + bool ret = self->intersectsCircle(*arg1, arg2); int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); @@ -4379,18 +4466,18 @@ static int _cocos2d_Rect_intersectsCircle(lua_State *L) return num_ret; } -static int _cocos2d_Rect_intersectsRect(lua_State *L) +static int _olua_fun_cocos2d_Rect_intersectsRect(lua_State *L) { olua_startinvoke(L); cocos2d::Rect *self = nullptr; - cocos2d::Rect arg1; /** rect */ + cocos2d::Rect *arg1; /** rect */ olua_to_object(L, 1, &self, "cc.Rect"); olua_check_object(L, 2, &arg1, "cc.Rect"); // bool intersectsRect(const cocos2d::Rect &rect) - bool ret = self->intersectsRect(arg1); + bool ret = self->intersectsRect(*arg1); int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); @@ -4398,29 +4485,29 @@ static int _cocos2d_Rect_intersectsRect(lua_State *L) return num_ret; } -static int _cocos2d_Rect_merge(lua_State *L) +static int _olua_fun_cocos2d_Rect_merge(lua_State *L) { olua_startinvoke(L); cocos2d::Rect *self = nullptr; - cocos2d::Rect arg1; /** rect */ + cocos2d::Rect *arg1; /** rect */ olua_to_object(L, 1, &self, "cc.Rect"); olua_check_object(L, 2, &arg1, "cc.Rect"); // void merge(const cocos2d::Rect &rect) - self->merge(arg1); + self->merge(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_Rect_new$1(lua_State *L) +static int _olua_fun_cocos2d_Rect_new$1(lua_State *L) { olua_startinvoke(L); - // Rect() + // cocos2d::Rect() cocos2d::Rect *ret = new cocos2d::Rect(); int num_ret = olua_push_object(L, ret, "cc.Rect"); olua_postnew(L, ret); @@ -4430,7 +4517,7 @@ static int _cocos2d_Rect_new$1(lua_State *L) return num_ret; } -static int _cocos2d_Rect_new$2(lua_State *L) +static int _olua_fun_cocos2d_Rect_new$2(lua_State *L) { olua_startinvoke(L); @@ -4444,7 +4531,7 @@ static int _cocos2d_Rect_new$2(lua_State *L) olua_check_number(L, 3, &arg3); olua_check_number(L, 4, &arg4); - // Rect(float x, float y, float width, float height) + // cocos2d::Rect(float x, float y, float width, float height) cocos2d::Rect *ret = new cocos2d::Rect(arg1, arg2, arg3, arg4); int num_ret = olua_push_object(L, ret, "cc.Rect"); olua_postnew(L, ret); @@ -4454,36 +4541,18 @@ static int _cocos2d_Rect_new$2(lua_State *L) return num_ret; } -static int _cocos2d_Rect_new$3(lua_State *L) +static int _olua_fun_cocos2d_Rect_new$3(lua_State *L) { olua_startinvoke(L); - cocos2d::Vec2 arg1; /** pos */ - cocos2d::Size arg2; /** dimension */ + cocos2d::Vec2 *arg1; /** pos */ + cocos2d::Size *arg2; /** dimension */ olua_check_object(L, 1, &arg1, "cc.Vec2"); olua_check_object(L, 2, &arg2, "cc.Size"); - // Rect(const cocos2d::Vec2 &pos, const cocos2d::Size &dimension) - cocos2d::Rect *ret = new cocos2d::Rect(arg1, arg2); - int num_ret = olua_push_object(L, ret, "cc.Rect"); - olua_postnew(L, ret); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_Rect_new$4(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::Rect arg1; /** other */ - - olua_check_object(L, 1, &arg1, "cc.Rect"); - - // Rect(const cocos2d::Rect &other) - cocos2d::Rect *ret = new cocos2d::Rect(arg1); + // cocos2d::Rect(const cocos2d::Vec2 &pos, const cocos2d::Size &dimension) + cocos2d::Rect *ret = new cocos2d::Rect(*arg1, *arg2); int num_ret = olua_push_object(L, ret, "cc.Rect"); olua_postnew(L, ret); @@ -4492,33 +4561,26 @@ static int _cocos2d_Rect_new$4(lua_State *L) return num_ret; } -static int _cocos2d_Rect_new(lua_State *L) +static int _olua_fun_cocos2d_Rect_new(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 0) { - // Rect() - return _cocos2d_Rect_new$1(L); - } - - if (num_args == 1) { - // if ((olua_is_object(L, 1, "cc.Rect"))) { - // Rect(const cocos2d::Rect &other) - return _cocos2d_Rect_new$4(L); - // } + // cocos2d::Rect() + return _olua_fun_cocos2d_Rect_new$1(L); } if (num_args == 2) { // if ((olua_is_object(L, 1, "cc.Vec2")) && (olua_is_object(L, 2, "cc.Size"))) { - // Rect(const cocos2d::Vec2 &pos, const cocos2d::Size &dimension) - return _cocos2d_Rect_new$3(L); + // cocos2d::Rect(const cocos2d::Vec2 &pos, const cocos2d::Size &dimension) + return _olua_fun_cocos2d_Rect_new$3(L); // } } if (num_args == 4) { // if ((olua_is_number(L, 1)) && (olua_is_number(L, 2)) && (olua_is_number(L, 3)) && (olua_is_number(L, 4))) { - // Rect(float x, float y, float width, float height) - return _cocos2d_Rect_new$2(L); + // cocos2d::Rect(float x, float y, float width, float height) + return _olua_fun_cocos2d_Rect_new$2(L); // } } @@ -4527,85 +4589,87 @@ static int _cocos2d_Rect_new(lua_State *L) return 0; } -static int _cocos2d_Rect_setRect(lua_State *L) +static int _olua_fun_cocos2d_Rect_origin$1(lua_State *L) { olua_startinvoke(L); cocos2d::Rect *self = nullptr; - float arg1 = 0; /** x */ - float arg2 = 0; /** y */ - float arg3 = 0; /** width */ - float arg4 = 0; /** height */ olua_to_object(L, 1, &self, "cc.Rect"); - olua_check_number(L, 2, &arg1); - olua_check_number(L, 3, &arg2); - olua_check_number(L, 4, &arg3); - olua_check_number(L, 5, &arg4); - // void setRect(float x, float y, float width, float height) - self->setRect(arg1, arg2, arg3, arg4); + // cocos2d::Vec2 origin + cocos2d::Vec2 &ret = self->origin; + int num_ret = olua_copy_object(L, ret, "cc.Vec2"); olua_endinvoke(L); - return 0; + return num_ret; } -static int _cocos2d_Rect_unionWithRect(lua_State *L) +static int _olua_fun_cocos2d_Rect_origin$2(lua_State *L) { olua_startinvoke(L); cocos2d::Rect *self = nullptr; - cocos2d::Rect arg1; /** rect */ + cocos2d::Vec2 *arg1; /** origin */ olua_to_object(L, 1, &self, "cc.Rect"); - olua_check_object(L, 2, &arg1, "cc.Rect"); + olua_check_object(L, 2, &arg1, "cc.Vec2"); - // cocos2d::Rect unionWithRect(const cocos2d::Rect &rect) - cocos2d::Rect ret = self->unionWithRect(arg1); - int num_ret = olua_pushcopy_object(L, ret, "cc.Rect"); + // cocos2d::Vec2 origin + self->origin = *arg1; olua_endinvoke(L); - return num_ret; + return 0; } -static int _cocos2d_Rect_get_origin(lua_State *L) +static int _olua_fun_cocos2d_Rect_origin(lua_State *L) { - olua_startinvoke(L); - - cocos2d::Rect *self = nullptr; + int num_args = lua_gettop(L) - 1; - olua_to_object(L, 1, &self, "cc.Rect"); + if (num_args == 0) { + // cocos2d::Vec2 origin + return _olua_fun_cocos2d_Rect_origin$1(L); + } - // cocos2d::Vec2 origin - cocos2d::Vec2 &ret = self->origin; - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec2"); + if (num_args == 1) { + // if ((olua_is_object(L, 2, "cc.Vec2"))) { + // cocos2d::Vec2 origin + return _olua_fun_cocos2d_Rect_origin$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'cocos2d::Rect::origin' not support '%d' arguments", num_args); - return num_ret; + return 0; } -static int _cocos2d_Rect_set_origin(lua_State *L) +static int _olua_fun_cocos2d_Rect_setRect(lua_State *L) { olua_startinvoke(L); cocos2d::Rect *self = nullptr; - cocos2d::Vec2 arg1; /** origin */ + float arg1 = 0; /** x */ + float arg2 = 0; /** y */ + float arg3 = 0; /** width */ + float arg4 = 0; /** height */ olua_to_object(L, 1, &self, "cc.Rect"); - olua_check_object(L, 2, &arg1, "cc.Vec2"); + olua_check_number(L, 2, &arg1); + olua_check_number(L, 3, &arg2); + olua_check_number(L, 4, &arg3); + olua_check_number(L, 5, &arg4); - // cocos2d::Vec2 origin - self->origin = arg1; + // void setRect(float x, float y, float width, float height) + self->setRect(arg1, arg2, arg3, arg4); olua_endinvoke(L); return 0; } -static int _cocos2d_Rect_get_size(lua_State *L) +static int _olua_fun_cocos2d_Rect_size$1(lua_State *L) { olua_startinvoke(L); @@ -4615,107 +4679,116 @@ static int _cocos2d_Rect_get_size(lua_State *L) // cocos2d::Size size cocos2d::Size &ret = self->size; - int num_ret = olua_pushcopy_object(L, ret, "cc.Size"); + int num_ret = olua_copy_object(L, ret, "cc.Size"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_Rect_set_size(lua_State *L) +static int _olua_fun_cocos2d_Rect_size$2(lua_State *L) { olua_startinvoke(L); cocos2d::Rect *self = nullptr; - cocos2d::Size arg1; /** size */ + cocos2d::Size *arg1; /** size */ olua_to_object(L, 1, &self, "cc.Rect"); olua_check_object(L, 2, &arg1, "cc.Size"); // cocos2d::Size size - self->size = arg1; + self->size = *arg1; olua_endinvoke(L); return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_Rect(lua_State *L) +static int _olua_fun_cocos2d_Rect_size(lua_State *L) { - oluacls_class(L, "cc.Rect"); - oluacls_func(L, "__call", _cocos2d_Rect___call); - oluacls_func(L, "__gc", _cocos2d_Rect___gc); - oluacls_func(L, "__olua_move", _cocos2d_Rect___olua_move); - oluacls_func(L, "containsPoint", _cocos2d_Rect_containsPoint); - oluacls_func(L, "equals", _cocos2d_Rect_equals); - oluacls_func(L, "getMaxX", _cocos2d_Rect_getMaxX); - oluacls_func(L, "getMaxY", _cocos2d_Rect_getMaxY); - oluacls_func(L, "getMidX", _cocos2d_Rect_getMidX); - oluacls_func(L, "getMidY", _cocos2d_Rect_getMidY); - oluacls_func(L, "getMinX", _cocos2d_Rect_getMinX); - oluacls_func(L, "getMinY", _cocos2d_Rect_getMinY); - oluacls_func(L, "intersectsCircle", _cocos2d_Rect_intersectsCircle); - oluacls_func(L, "intersectsRect", _cocos2d_Rect_intersectsRect); - oluacls_func(L, "merge", _cocos2d_Rect_merge); - oluacls_func(L, "new", _cocos2d_Rect_new); - oluacls_func(L, "setRect", _cocos2d_Rect_setRect); - oluacls_func(L, "unionWithRect", _cocos2d_Rect_unionWithRect); - oluacls_prop(L, "maxX", _cocos2d_Rect_getMaxX, nullptr); - oluacls_prop(L, "maxY", _cocos2d_Rect_getMaxY, nullptr); - oluacls_prop(L, "midX", _cocos2d_Rect_getMidX, nullptr); - oluacls_prop(L, "midY", _cocos2d_Rect_getMidY, nullptr); - oluacls_prop(L, "minX", _cocos2d_Rect_getMinX, nullptr); - oluacls_prop(L, "minY", _cocos2d_Rect_getMinY, nullptr); - oluacls_prop(L, "origin", _cocos2d_Rect_get_origin, _cocos2d_Rect_set_origin); - oluacls_prop(L, "size", _cocos2d_Rect_get_size, _cocos2d_Rect_set_size); - oluacls_const(L, "ZERO", &cocos2d::Rect::ZERO); + int num_args = lua_gettop(L) - 1; - return 1; + if (num_args == 0) { + // cocos2d::Size size + return _olua_fun_cocos2d_Rect_size$1(L); + } + + if (num_args == 1) { + // if ((olua_is_object(L, 2, "cc.Size"))) { + // cocos2d::Size size + return _olua_fun_cocos2d_Rect_size$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::Rect::size' not support '%d' arguments", num_args); + + return 0; } -OLUA_END_DECLS -static int _cocos2d_Bounds___call(lua_State *L) +static int _olua_fun_cocos2d_Rect_unionWithRect(lua_State *L) { olua_startinvoke(L); - cocos2d::Bounds ret; - - luaL_checktype(L, 2, LUA_TTABLE); - - float arg1 = 0; /** left */ - float arg2 = 0; /** right */ - float arg3 = 0; /** top */ - float arg4 = 0; /** bottom */ + cocos2d::Rect *self = nullptr; + cocos2d::Rect *arg1; /** rect */ - olua_getfield(L, 2, "left"); - olua_check_number(L, -1, &arg1); - ret.left = arg1; - lua_pop(L, 1); + olua_to_object(L, 1, &self, "cc.Rect"); + olua_check_object(L, 2, &arg1, "cc.Rect"); - olua_getfield(L, 2, "right"); - olua_check_number(L, -1, &arg2); - ret.right = arg2; - lua_pop(L, 1); + // cocos2d::Rect unionWithRect(const cocos2d::Rect &rect) + cocos2d::Rect ret = self->unionWithRect(*arg1); + int num_ret = olua_copy_object(L, ret, "cc.Rect"); - olua_getfield(L, 2, "top"); - olua_check_number(L, -1, &arg3); - ret.top = arg3; - lua_pop(L, 1); + olua_endinvoke(L); - olua_getfield(L, 2, "bottom"); - olua_check_number(L, -1, &arg4); - ret.bottom = arg4; - lua_pop(L, 1); + return num_ret; +} - olua_pushcopy_object(L, ret, "cc.Bounds"); +static int _olua_cls_cc_Rect(lua_State *L) +{ + oluacls_class(L, "cc.Rect"); + oluacls_func(L, "__call", _olua_fun_cocos2d_Rect___call); + oluacls_func(L, "__gc", _olua_fun_cocos2d_Rect___gc); + oluacls_func(L, "__olua_move", _olua_fun_cocos2d_Rect___olua_move); + oluacls_func(L, "containsPoint", _olua_fun_cocos2d_Rect_containsPoint); + oluacls_func(L, "equals", _olua_fun_cocos2d_Rect_equals); + oluacls_func(L, "getMaxX", _olua_fun_cocos2d_Rect_getMaxX); + oluacls_func(L, "getMaxY", _olua_fun_cocos2d_Rect_getMaxY); + oluacls_func(L, "getMidX", _olua_fun_cocos2d_Rect_getMidX); + oluacls_func(L, "getMidY", _olua_fun_cocos2d_Rect_getMidY); + oluacls_func(L, "getMinX", _olua_fun_cocos2d_Rect_getMinX); + oluacls_func(L, "getMinY", _olua_fun_cocos2d_Rect_getMinY); + oluacls_func(L, "intersectsCircle", _olua_fun_cocos2d_Rect_intersectsCircle); + oluacls_func(L, "intersectsRect", _olua_fun_cocos2d_Rect_intersectsRect); + oluacls_func(L, "merge", _olua_fun_cocos2d_Rect_merge); + oluacls_func(L, "new", _olua_fun_cocos2d_Rect_new); + oluacls_func(L, "setRect", _olua_fun_cocos2d_Rect_setRect); + oluacls_func(L, "unionWithRect", _olua_fun_cocos2d_Rect_unionWithRect); + oluacls_prop(L, "maxX", _olua_fun_cocos2d_Rect_getMaxX, nullptr); + oluacls_prop(L, "maxY", _olua_fun_cocos2d_Rect_getMaxY, nullptr); + oluacls_prop(L, "midX", _olua_fun_cocos2d_Rect_getMidX, nullptr); + oluacls_prop(L, "midY", _olua_fun_cocos2d_Rect_getMidY, nullptr); + oluacls_prop(L, "minX", _olua_fun_cocos2d_Rect_getMinX, nullptr); + oluacls_prop(L, "minY", _olua_fun_cocos2d_Rect_getMinY, nullptr); + oluacls_prop(L, "origin", _olua_fun_cocos2d_Rect_origin, _olua_fun_cocos2d_Rect_origin); + oluacls_prop(L, "size", _olua_fun_cocos2d_Rect_size, _olua_fun_cocos2d_Rect_size); + oluacls_const(L, "ZERO", &cocos2d::Rect::ZERO); - olua_endinvoke(L); + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_Rect(lua_State *L) +{ + olua_require(L, "cocos2d_types", luaopen_cocos2d_types); + if (!olua_getclass(L, "cc.Rect")) { + luaL_error(L, "class not found: cocos2d::Rect"); + } return 1; } +OLUA_END_DECLS -static int _cocos2d_Bounds___gc(lua_State *L) +static int _olua_fun_cocos2d_Bounds___gc(lua_State *L) { olua_startinvoke(L); @@ -4727,7 +4800,7 @@ static int _cocos2d_Bounds___gc(lua_State *L) return 0; } -static int _cocos2d_Bounds___olua_move(lua_State *L) +static int _olua_fun_cocos2d_Bounds___olua_move(lua_State *L) { olua_startinvoke(L); @@ -4739,21 +4812,7 @@ static int _cocos2d_Bounds___olua_move(lua_State *L) return 1; } -static int _cocos2d_Bounds_new(lua_State *L) -{ - olua_startinvoke(L); - - // Bounds() - cocos2d::Bounds *ret = new cocos2d::Bounds(); - int num_ret = olua_push_object(L, ret, "cc.Bounds"); - olua_postnew(L, ret); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_Bounds_get_bottom(lua_State *L) +static int _olua_fun_cocos2d_Bounds_bottom$1(lua_State *L) { olua_startinvoke(L); @@ -4770,7 +4829,7 @@ static int _cocos2d_Bounds_get_bottom(lua_State *L) return num_ret; } -static int _cocos2d_Bounds_set_bottom(lua_State *L) +static int _olua_fun_cocos2d_Bounds_bottom$2(lua_State *L) { olua_startinvoke(L); @@ -4788,7 +4847,28 @@ static int _cocos2d_Bounds_set_bottom(lua_State *L) return 0; } -static int _cocos2d_Bounds_get_left(lua_State *L) +static int _olua_fun_cocos2d_Bounds_bottom(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float bottom + return _olua_fun_cocos2d_Bounds_bottom$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float bottom + return _olua_fun_cocos2d_Bounds_bottom$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::Bounds::bottom' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_Bounds_left$1(lua_State *L) { olua_startinvoke(L); @@ -4805,7 +4885,7 @@ static int _cocos2d_Bounds_get_left(lua_State *L) return num_ret; } -static int _cocos2d_Bounds_set_left(lua_State *L) +static int _olua_fun_cocos2d_Bounds_left$2(lua_State *L) { olua_startinvoke(L); @@ -4823,42 +4903,42 @@ static int _cocos2d_Bounds_set_left(lua_State *L) return 0; } -static int _cocos2d_Bounds_get_right(lua_State *L) +static int _olua_fun_cocos2d_Bounds_left(lua_State *L) { - olua_startinvoke(L); - - cocos2d::Bounds *self = nullptr; + int num_args = lua_gettop(L) - 1; - olua_to_object(L, 1, &self, "cc.Bounds"); + if (num_args == 0) { + // float left + return _olua_fun_cocos2d_Bounds_left$1(L); + } - // float right - float ret = self->right; - int num_ret = olua_push_number(L, ret); + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float left + return _olua_fun_cocos2d_Bounds_left$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'cocos2d::Bounds::left' not support '%d' arguments", num_args); - return num_ret; + return 0; } -static int _cocos2d_Bounds_set_right(lua_State *L) +static int _olua_fun_cocos2d_Bounds_new(lua_State *L) { olua_startinvoke(L); - cocos2d::Bounds *self = nullptr; - float arg1 = 0; /** right */ - - olua_to_object(L, 1, &self, "cc.Bounds"); - olua_check_number(L, 2, &arg1); - - // float right - self->right = arg1; + // cocos2d::Bounds() + cocos2d::Bounds *ret = new cocos2d::Bounds(); + int num_ret = olua_push_object(L, ret, "cc.Bounds"); + olua_postnew(L, ret); olua_endinvoke(L); - return 0; + return num_ret; } -static int _cocos2d_Bounds_get_top(lua_State *L) +static int _olua_fun_cocos2d_Bounds_right$1(lua_State *L) { olua_startinvoke(L); @@ -4866,8 +4946,8 @@ static int _cocos2d_Bounds_get_top(lua_State *L) olua_to_object(L, 1, &self, "cc.Bounds"); - // float top - float ret = self->top; + // float right + float ret = self->right; int num_ret = olua_push_number(L, ret); olua_endinvoke(L); @@ -4875,17 +4955,73 @@ static int _cocos2d_Bounds_get_top(lua_State *L) return num_ret; } -static int _cocos2d_Bounds_set_top(lua_State *L) +static int _olua_fun_cocos2d_Bounds_right$2(lua_State *L) { olua_startinvoke(L); cocos2d::Bounds *self = nullptr; - float arg1 = 0; /** top */ + float arg1 = 0; /** right */ olua_to_object(L, 1, &self, "cc.Bounds"); olua_check_number(L, 2, &arg1); - // float top + // float right + self->right = arg1; + + olua_endinvoke(L); + + return 0; +} + +static int _olua_fun_cocos2d_Bounds_right(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float right + return _olua_fun_cocos2d_Bounds_right$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float right + return _olua_fun_cocos2d_Bounds_right$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::Bounds::right' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_Bounds_top$1(lua_State *L) +{ + olua_startinvoke(L); + + cocos2d::Bounds *self = nullptr; + + olua_to_object(L, 1, &self, "cc.Bounds"); + + // float top + float ret = self->top; + int num_ret = olua_push_number(L, ret); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_cocos2d_Bounds_top$2(lua_State *L) +{ + olua_startinvoke(L); + + cocos2d::Bounds *self = nullptr; + float arg1 = 0; /** top */ + + olua_to_object(L, 1, &self, "cc.Bounds"); + olua_check_number(L, 2, &arg1); + + // float top self->top = arg1; olua_endinvoke(L); @@ -4893,24 +5029,53 @@ static int _cocos2d_Bounds_set_top(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_Bounds(lua_State *L) +static int _olua_fun_cocos2d_Bounds_top(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float top + return _olua_fun_cocos2d_Bounds_top$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float top + return _olua_fun_cocos2d_Bounds_top$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::Bounds::top' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_cls_cc_Bounds(lua_State *L) { oluacls_class(L, "cc.Bounds"); - oluacls_func(L, "__call", _cocos2d_Bounds___call); - oluacls_func(L, "__gc", _cocos2d_Bounds___gc); - oluacls_func(L, "__olua_move", _cocos2d_Bounds___olua_move); - oluacls_func(L, "new", _cocos2d_Bounds_new); - oluacls_prop(L, "bottom", _cocos2d_Bounds_get_bottom, _cocos2d_Bounds_set_bottom); - oluacls_prop(L, "left", _cocos2d_Bounds_get_left, _cocos2d_Bounds_set_left); - oluacls_prop(L, "right", _cocos2d_Bounds_get_right, _cocos2d_Bounds_set_right); - oluacls_prop(L, "top", _cocos2d_Bounds_get_top, _cocos2d_Bounds_set_top); + oluacls_func(L, "__gc", _olua_fun_cocos2d_Bounds___gc); + oluacls_func(L, "__olua_move", _olua_fun_cocos2d_Bounds___olua_move); + oluacls_func(L, "new", _olua_fun_cocos2d_Bounds_new); + oluacls_prop(L, "bottom", _olua_fun_cocos2d_Bounds_bottom, _olua_fun_cocos2d_Bounds_bottom); + oluacls_prop(L, "left", _olua_fun_cocos2d_Bounds_left, _olua_fun_cocos2d_Bounds_left); + oluacls_prop(L, "right", _olua_fun_cocos2d_Bounds_right, _olua_fun_cocos2d_Bounds_right); + oluacls_prop(L, "top", _olua_fun_cocos2d_Bounds_top, _olua_fun_cocos2d_Bounds_top); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_Bounds(lua_State *L) +{ + olua_require(L, "cocos2d_types", luaopen_cocos2d_types); + if (!olua_getclass(L, "cc.Bounds")) { + luaL_error(L, "class not found: cocos2d::Bounds"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_Mat4___add(lua_State *L) +static int _olua_fun_cocos2d_Mat4___add(lua_State *L) { olua_startinvoke(L); @@ -4920,7 +5085,7 @@ static int _cocos2d_Mat4___add(lua_State *L) olua_check_object(L, 1, &arg1, "cc.Mat4"); olua_check_object(L, 2, &arg2, "cc.Mat4"); - // @extend(cocos2d::Mat4Extend) @postnew static cocos2d::Mat4 *__add(cocos2d::Mat4 *mat1, cocos2d::Mat4 *mat2) + // @postnew @extend(cocos2d::Mat4Extend) static cocos2d::Mat4 *__add(cocos2d::Mat4 *mat1, cocos2d::Mat4 *mat2) cocos2d::Mat4 *ret = cocos2d::Mat4Extend::__add(arg1, arg2); int num_ret = olua_push_object(L, ret, "cc.Mat4"); @@ -4932,7 +5097,7 @@ static int _cocos2d_Mat4___add(lua_State *L) return num_ret; } -static int _cocos2d_Mat4___gc(lua_State *L) +static int _olua_fun_cocos2d_Mat4___gc(lua_State *L) { olua_startinvoke(L); @@ -4944,7 +5109,7 @@ static int _cocos2d_Mat4___gc(lua_State *L) return 0; } -static int _cocos2d_Mat4___mul(lua_State *L) +static int _olua_fun_cocos2d_Mat4___mul(lua_State *L) { olua_startinvoke(L); @@ -4954,7 +5119,7 @@ static int _cocos2d_Mat4___mul(lua_State *L) olua_check_object(L, 1, &arg1, "cc.Mat4"); olua_check_object(L, 2, &arg2, "cc.Mat4"); - // @extend(cocos2d::Mat4Extend) @postnew static cocos2d::Mat4 *__mul(cocos2d::Mat4 *mat1, cocos2d::Mat4 *mat2) + // @postnew @extend(cocos2d::Mat4Extend) static cocos2d::Mat4 *__mul(cocos2d::Mat4 *mat1, cocos2d::Mat4 *mat2) cocos2d::Mat4 *ret = cocos2d::Mat4Extend::__mul(arg1, arg2); int num_ret = olua_push_object(L, ret, "cc.Mat4"); @@ -4966,7 +5131,7 @@ static int _cocos2d_Mat4___mul(lua_State *L) return num_ret; } -static int _cocos2d_Mat4___olua_move(lua_State *L) +static int _olua_fun_cocos2d_Mat4___olua_move(lua_State *L) { olua_startinvoke(L); @@ -4978,7 +5143,7 @@ static int _cocos2d_Mat4___olua_move(lua_State *L) return 1; } -static int _cocos2d_Mat4___sub(lua_State *L) +static int _olua_fun_cocos2d_Mat4___sub(lua_State *L) { olua_startinvoke(L); @@ -4988,7 +5153,7 @@ static int _cocos2d_Mat4___sub(lua_State *L) olua_check_object(L, 1, &arg1, "cc.Mat4"); olua_check_object(L, 2, &arg2, "cc.Mat4"); - // @extend(cocos2d::Mat4Extend) @postnew static cocos2d::Mat4 *__sub(cocos2d::Mat4 *mat1, cocos2d::Mat4 *mat2) + // @postnew @extend(cocos2d::Mat4Extend) static cocos2d::Mat4 *__sub(cocos2d::Mat4 *mat1, cocos2d::Mat4 *mat2) cocos2d::Mat4 *ret = cocos2d::Mat4Extend::__sub(arg1, arg2); int num_ret = olua_push_object(L, ret, "cc.Mat4"); @@ -5000,7 +5165,7 @@ static int _cocos2d_Mat4___sub(lua_State *L) return num_ret; } -static int _cocos2d_Mat4_add$1(lua_State *L) +static int _olua_fun_cocos2d_Mat4_add$1(lua_State *L) { olua_startinvoke(L); @@ -5018,7 +5183,7 @@ static int _cocos2d_Mat4_add$1(lua_State *L) return 0; } -static int _cocos2d_Mat4_add$2(lua_State *L) +static int _olua_fun_cocos2d_Mat4_add$2(lua_State *L) { olua_startinvoke(L); @@ -5038,30 +5203,30 @@ static int _cocos2d_Mat4_add$2(lua_State *L) return 0; } -static int _cocos2d_Mat4_add$3(lua_State *L) +static int _olua_fun_cocos2d_Mat4_add$3(lua_State *L) { olua_startinvoke(L); cocos2d::Mat4 *self = nullptr; - cocos2d::Mat4 arg1; /** mat */ + cocos2d::Mat4 *arg1; /** mat */ olua_to_object(L, 1, &self, "cc.Mat4"); olua_check_object(L, 2, &arg1, "cc.Mat4"); // void add(const cocos2d::Mat4 &mat) - self->add(arg1); + self->add(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_Mat4_add$4(lua_State *L) +static int _olua_fun_cocos2d_Mat4_add$4(lua_State *L) { olua_startinvoke(L); - cocos2d::Mat4 arg1; /** m1 */ - cocos2d::Mat4 arg2; /** m2 */ + cocos2d::Mat4 *arg1; /** m1 */ + cocos2d::Mat4 *arg2; /** m2 */ cocos2d::Mat4 *arg3 = nullptr; /** dst */ olua_check_object(L, 1, &arg1, "cc.Mat4"); @@ -5069,40 +5234,40 @@ static int _cocos2d_Mat4_add$4(lua_State *L) olua_check_object(L, 3, &arg3, "cc.Mat4"); // static void add(const cocos2d::Mat4 &m1, const cocos2d::Mat4 &m2, cocos2d::Mat4 *dst) - cocos2d::Mat4::add(arg1, arg2, arg3); + cocos2d::Mat4::add(*arg1, *arg2, arg3); olua_endinvoke(L); return 0; } -static int _cocos2d_Mat4_add(lua_State *L) +static int _olua_fun_cocos2d_Mat4_add(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { if ((olua_is_number(L, 2))) { // void add(float scalar) - return _cocos2d_Mat4_add$1(L); + return _olua_fun_cocos2d_Mat4_add$1(L); } // if ((olua_is_object(L, 2, "cc.Mat4"))) { // void add(const cocos2d::Mat4 &mat) - return _cocos2d_Mat4_add$3(L); + return _olua_fun_cocos2d_Mat4_add$3(L); // } } if (num_args == 2) { // if ((olua_is_number(L, 2)) && (olua_is_object(L, 3, "cc.Mat4"))) { // void add(float scalar, cocos2d::Mat4 *dst) - return _cocos2d_Mat4_add$2(L); + return _olua_fun_cocos2d_Mat4_add$2(L); // } } if (num_args == 3) { // if ((olua_is_object(L, 1, "cc.Mat4")) && (olua_is_object(L, 2, "cc.Mat4")) && (olua_is_object(L, 3, "cc.Mat4"))) { // static void add(const cocos2d::Mat4 &m1, const cocos2d::Mat4 &m2, cocos2d::Mat4 *dst) - return _cocos2d_Mat4_add$4(L); + return _olua_fun_cocos2d_Mat4_add$4(L); // } } @@ -5111,13 +5276,13 @@ static int _cocos2d_Mat4_add(lua_State *L) return 0; } -static int _cocos2d_Mat4_createBillboard$1(lua_State *L) +static int _olua_fun_cocos2d_Mat4_createBillboard$1(lua_State *L) { olua_startinvoke(L); - cocos2d::Vec3 arg1; /** objectPosition */ - cocos2d::Vec3 arg2; /** cameraPosition */ - cocos2d::Vec3 arg3; /** cameraUpVector */ + cocos2d::Vec3 *arg1; /** objectPosition */ + cocos2d::Vec3 *arg2; /** cameraPosition */ + cocos2d::Vec3 *arg3; /** cameraUpVector */ cocos2d::Mat4 *arg4 = nullptr; /** dst */ olua_check_object(L, 1, &arg1, "cc.Vec3"); @@ -5126,21 +5291,21 @@ static int _cocos2d_Mat4_createBillboard$1(lua_State *L) olua_check_object(L, 4, &arg4, "cc.Mat4"); // static void createBillboard(const cocos2d::Vec3 &objectPosition, const cocos2d::Vec3 &cameraPosition, const cocos2d::Vec3 &cameraUpVector, cocos2d::Mat4 *dst) - cocos2d::Mat4::createBillboard(arg1, arg2, arg3, arg4); + cocos2d::Mat4::createBillboard(*arg1, *arg2, *arg3, arg4); olua_endinvoke(L); return 0; } -static int _cocos2d_Mat4_createBillboard$2(lua_State *L) +static int _olua_fun_cocos2d_Mat4_createBillboard$2(lua_State *L) { olua_startinvoke(L); - cocos2d::Vec3 arg1; /** objectPosition */ - cocos2d::Vec3 arg2; /** cameraPosition */ - cocos2d::Vec3 arg3; /** cameraUpVector */ - cocos2d::Vec3 arg4; /** cameraForwardVector */ + cocos2d::Vec3 *arg1; /** objectPosition */ + cocos2d::Vec3 *arg2; /** cameraPosition */ + cocos2d::Vec3 *arg3; /** cameraUpVector */ + cocos2d::Vec3 *arg4; /** cameraForwardVector */ cocos2d::Mat4 *arg5 = nullptr; /** dst */ olua_check_object(L, 1, &arg1, "cc.Vec3"); @@ -5150,28 +5315,28 @@ static int _cocos2d_Mat4_createBillboard$2(lua_State *L) olua_check_object(L, 5, &arg5, "cc.Mat4"); // static void createBillboard(const cocos2d::Vec3 &objectPosition, const cocos2d::Vec3 &cameraPosition, const cocos2d::Vec3 &cameraUpVector, const cocos2d::Vec3 &cameraForwardVector, cocos2d::Mat4 *dst) - cocos2d::Mat4::createBillboard(arg1, arg2, arg3, arg4, arg5); + cocos2d::Mat4::createBillboard(*arg1, *arg2, *arg3, *arg4, arg5); olua_endinvoke(L); return 0; } -static int _cocos2d_Mat4_createBillboard(lua_State *L) +static int _olua_fun_cocos2d_Mat4_createBillboard(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 4) { // if ((olua_is_object(L, 1, "cc.Vec3")) && (olua_is_object(L, 2, "cc.Vec3")) && (olua_is_object(L, 3, "cc.Vec3")) && (olua_is_object(L, 4, "cc.Mat4"))) { // static void createBillboard(const cocos2d::Vec3 &objectPosition, const cocos2d::Vec3 &cameraPosition, const cocos2d::Vec3 &cameraUpVector, cocos2d::Mat4 *dst) - return _cocos2d_Mat4_createBillboard$1(L); + return _olua_fun_cocos2d_Mat4_createBillboard$1(L); // } } if (num_args == 5) { // if ((olua_is_object(L, 1, "cc.Vec3")) && (olua_is_object(L, 2, "cc.Vec3")) && (olua_is_object(L, 3, "cc.Vec3")) && (olua_is_object(L, 4, "cc.Vec3")) && (olua_is_object(L, 5, "cc.Mat4"))) { // static void createBillboard(const cocos2d::Vec3 &objectPosition, const cocos2d::Vec3 &cameraPosition, const cocos2d::Vec3 &cameraUpVector, const cocos2d::Vec3 &cameraForwardVector, cocos2d::Mat4 *dst) - return _cocos2d_Mat4_createBillboard$2(L); + return _olua_fun_cocos2d_Mat4_createBillboard$2(L); // } } @@ -5180,13 +5345,13 @@ static int _cocos2d_Mat4_createBillboard(lua_State *L) return 0; } -static int _cocos2d_Mat4_createLookAt$1(lua_State *L) +static int _olua_fun_cocos2d_Mat4_createLookAt$1(lua_State *L) { olua_startinvoke(L); - cocos2d::Vec3 arg1; /** eyePosition */ - cocos2d::Vec3 arg2; /** targetPosition */ - cocos2d::Vec3 arg3; /** up */ + cocos2d::Vec3 *arg1; /** eyePosition */ + cocos2d::Vec3 *arg2; /** targetPosition */ + cocos2d::Vec3 *arg3; /** up */ cocos2d::Mat4 *arg4 = nullptr; /** dst */ olua_check_object(L, 1, &arg1, "cc.Vec3"); @@ -5195,14 +5360,14 @@ static int _cocos2d_Mat4_createLookAt$1(lua_State *L) olua_check_object(L, 4, &arg4, "cc.Mat4"); // static void createLookAt(const cocos2d::Vec3 &eyePosition, const cocos2d::Vec3 &targetPosition, const cocos2d::Vec3 &up, cocos2d::Mat4 *dst) - cocos2d::Mat4::createLookAt(arg1, arg2, arg3, arg4); + cocos2d::Mat4::createLookAt(*arg1, *arg2, *arg3, arg4); olua_endinvoke(L); return 0; } -static int _cocos2d_Mat4_createLookAt$2(lua_State *L) +static int _olua_fun_cocos2d_Mat4_createLookAt$2(lua_State *L) { olua_startinvoke(L); @@ -5236,21 +5401,21 @@ static int _cocos2d_Mat4_createLookAt$2(lua_State *L) return 0; } -static int _cocos2d_Mat4_createLookAt(lua_State *L) +static int _olua_fun_cocos2d_Mat4_createLookAt(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 4) { // if ((olua_is_object(L, 1, "cc.Vec3")) && (olua_is_object(L, 2, "cc.Vec3")) && (olua_is_object(L, 3, "cc.Vec3")) && (olua_is_object(L, 4, "cc.Mat4"))) { // static void createLookAt(const cocos2d::Vec3 &eyePosition, const cocos2d::Vec3 &targetPosition, const cocos2d::Vec3 &up, cocos2d::Mat4 *dst) - return _cocos2d_Mat4_createLookAt$1(L); + return _olua_fun_cocos2d_Mat4_createLookAt$1(L); // } } if (num_args == 10) { // if ((olua_is_number(L, 1)) && (olua_is_number(L, 2)) && (olua_is_number(L, 3)) && (olua_is_number(L, 4)) && (olua_is_number(L, 5)) && (olua_is_number(L, 6)) && (olua_is_number(L, 7)) && (olua_is_number(L, 8)) && (olua_is_number(L, 9)) && (olua_is_object(L, 10, "cc.Mat4"))) { // static void createLookAt(float eyePositionX, float eyePositionY, float eyePositionZ, float targetCenterX, float targetCenterY, float targetCenterZ, float upX, float upY, float upZ, cocos2d::Mat4 *dst) - return _cocos2d_Mat4_createLookAt$2(L); + return _olua_fun_cocos2d_Mat4_createLookAt$2(L); // } } @@ -5259,7 +5424,7 @@ static int _cocos2d_Mat4_createLookAt(lua_State *L) return 0; } -static int _cocos2d_Mat4_createOrthographic(lua_State *L) +static int _olua_fun_cocos2d_Mat4_createOrthographic(lua_State *L) { olua_startinvoke(L); @@ -5283,7 +5448,7 @@ static int _cocos2d_Mat4_createOrthographic(lua_State *L) return 0; } -static int _cocos2d_Mat4_createOrthographicOffCenter(lua_State *L) +static int _olua_fun_cocos2d_Mat4_createOrthographicOffCenter(lua_State *L) { olua_startinvoke(L); @@ -5311,7 +5476,7 @@ static int _cocos2d_Mat4_createOrthographicOffCenter(lua_State *L) return 0; } -static int _cocos2d_Mat4_createPerspective(lua_State *L) +static int _olua_fun_cocos2d_Mat4_createPerspective(lua_State *L) { olua_startinvoke(L); @@ -5335,29 +5500,29 @@ static int _cocos2d_Mat4_createPerspective(lua_State *L) return 0; } -static int _cocos2d_Mat4_createRotation$1(lua_State *L) +static int _olua_fun_cocos2d_Mat4_createRotation$1(lua_State *L) { olua_startinvoke(L); - cocos2d::Quaternion arg1; /** quat */ + cocos2d::Quaternion *arg1; /** quat */ cocos2d::Mat4 *arg2 = nullptr; /** dst */ olua_check_object(L, 1, &arg1, "cc.Quaternion"); olua_check_object(L, 2, &arg2, "cc.Mat4"); // static void createRotation(const cocos2d::Quaternion &quat, cocos2d::Mat4 *dst) - cocos2d::Mat4::createRotation(arg1, arg2); + cocos2d::Mat4::createRotation(*arg1, arg2); olua_endinvoke(L); return 0; } -static int _cocos2d_Mat4_createRotation$2(lua_State *L) +static int _olua_fun_cocos2d_Mat4_createRotation$2(lua_State *L) { olua_startinvoke(L); - cocos2d::Vec3 arg1; /** axis */ + cocos2d::Vec3 *arg1; /** axis */ float arg2 = 0; /** angle */ cocos2d::Mat4 *arg3 = nullptr; /** dst */ @@ -5366,28 +5531,28 @@ static int _cocos2d_Mat4_createRotation$2(lua_State *L) olua_check_object(L, 3, &arg3, "cc.Mat4"); // static void createRotation(const cocos2d::Vec3 &axis, float angle, cocos2d::Mat4 *dst) - cocos2d::Mat4::createRotation(arg1, arg2, arg3); + cocos2d::Mat4::createRotation(*arg1, arg2, arg3); olua_endinvoke(L); return 0; } -static int _cocos2d_Mat4_createRotation(lua_State *L) +static int _olua_fun_cocos2d_Mat4_createRotation(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 2) { // if ((olua_is_object(L, 1, "cc.Quaternion")) && (olua_is_object(L, 2, "cc.Mat4"))) { // static void createRotation(const cocos2d::Quaternion &quat, cocos2d::Mat4 *dst) - return _cocos2d_Mat4_createRotation$1(L); + return _olua_fun_cocos2d_Mat4_createRotation$1(L); // } } if (num_args == 3) { // if ((olua_is_object(L, 1, "cc.Vec3")) && (olua_is_number(L, 2)) && (olua_is_object(L, 3, "cc.Mat4"))) { // static void createRotation(const cocos2d::Vec3 &axis, float angle, cocos2d::Mat4 *dst) - return _cocos2d_Mat4_createRotation$2(L); + return _olua_fun_cocos2d_Mat4_createRotation$2(L); // } } @@ -5396,7 +5561,7 @@ static int _cocos2d_Mat4_createRotation(lua_State *L) return 0; } -static int _cocos2d_Mat4_createRotationX(lua_State *L) +static int _olua_fun_cocos2d_Mat4_createRotationX(lua_State *L) { olua_startinvoke(L); @@ -5414,7 +5579,7 @@ static int _cocos2d_Mat4_createRotationX(lua_State *L) return 0; } -static int _cocos2d_Mat4_createRotationY(lua_State *L) +static int _olua_fun_cocos2d_Mat4_createRotationY(lua_State *L) { olua_startinvoke(L); @@ -5432,7 +5597,7 @@ static int _cocos2d_Mat4_createRotationY(lua_State *L) return 0; } -static int _cocos2d_Mat4_createRotationZ(lua_State *L) +static int _olua_fun_cocos2d_Mat4_createRotationZ(lua_State *L) { olua_startinvoke(L); @@ -5450,25 +5615,25 @@ static int _cocos2d_Mat4_createRotationZ(lua_State *L) return 0; } -static int _cocos2d_Mat4_createScale$1(lua_State *L) +static int _olua_fun_cocos2d_Mat4_createScale$1(lua_State *L) { olua_startinvoke(L); - cocos2d::Vec3 arg1; /** scale */ + cocos2d::Vec3 *arg1; /** scale */ cocos2d::Mat4 *arg2 = nullptr; /** dst */ olua_check_object(L, 1, &arg1, "cc.Vec3"); olua_check_object(L, 2, &arg2, "cc.Mat4"); // static void createScale(const cocos2d::Vec3 &scale, cocos2d::Mat4 *dst) - cocos2d::Mat4::createScale(arg1, arg2); + cocos2d::Mat4::createScale(*arg1, arg2); olua_endinvoke(L); return 0; } -static int _cocos2d_Mat4_createScale$2(lua_State *L) +static int _olua_fun_cocos2d_Mat4_createScale$2(lua_State *L) { olua_startinvoke(L); @@ -5490,21 +5655,21 @@ static int _cocos2d_Mat4_createScale$2(lua_State *L) return 0; } -static int _cocos2d_Mat4_createScale(lua_State *L) +static int _olua_fun_cocos2d_Mat4_createScale(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 2) { // if ((olua_is_object(L, 1, "cc.Vec3")) && (olua_is_object(L, 2, "cc.Mat4"))) { // static void createScale(const cocos2d::Vec3 &scale, cocos2d::Mat4 *dst) - return _cocos2d_Mat4_createScale$1(L); + return _olua_fun_cocos2d_Mat4_createScale$1(L); // } } if (num_args == 4) { // if ((olua_is_number(L, 1)) && (olua_is_number(L, 2)) && (olua_is_number(L, 3)) && (olua_is_object(L, 4, "cc.Mat4"))) { // static void createScale(float xScale, float yScale, float zScale, cocos2d::Mat4 *dst) - return _cocos2d_Mat4_createScale$2(L); + return _olua_fun_cocos2d_Mat4_createScale$2(L); // } } @@ -5513,25 +5678,25 @@ static int _cocos2d_Mat4_createScale(lua_State *L) return 0; } -static int _cocos2d_Mat4_createTranslation$1(lua_State *L) +static int _olua_fun_cocos2d_Mat4_createTranslation$1(lua_State *L) { olua_startinvoke(L); - cocos2d::Vec3 arg1; /** translation */ + cocos2d::Vec3 *arg1; /** translation */ cocos2d::Mat4 *arg2 = nullptr; /** dst */ olua_check_object(L, 1, &arg1, "cc.Vec3"); olua_check_object(L, 2, &arg2, "cc.Mat4"); // static void createTranslation(const cocos2d::Vec3 &translation, cocos2d::Mat4 *dst) - cocos2d::Mat4::createTranslation(arg1, arg2); + cocos2d::Mat4::createTranslation(*arg1, arg2); olua_endinvoke(L); return 0; } -static int _cocos2d_Mat4_createTranslation$2(lua_State *L) +static int _olua_fun_cocos2d_Mat4_createTranslation$2(lua_State *L) { olua_startinvoke(L); @@ -5553,21 +5718,21 @@ static int _cocos2d_Mat4_createTranslation$2(lua_State *L) return 0; } -static int _cocos2d_Mat4_createTranslation(lua_State *L) +static int _olua_fun_cocos2d_Mat4_createTranslation(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 2) { // if ((olua_is_object(L, 1, "cc.Vec3")) && (olua_is_object(L, 2, "cc.Mat4"))) { // static void createTranslation(const cocos2d::Vec3 &translation, cocos2d::Mat4 *dst) - return _cocos2d_Mat4_createTranslation$1(L); + return _olua_fun_cocos2d_Mat4_createTranslation$1(L); // } } if (num_args == 4) { // if ((olua_is_number(L, 1)) && (olua_is_number(L, 2)) && (olua_is_number(L, 3)) && (olua_is_object(L, 4, "cc.Mat4"))) { // static void createTranslation(float xTranslation, float yTranslation, float zTranslation, cocos2d::Mat4 *dst) - return _cocos2d_Mat4_createTranslation$2(L); + return _olua_fun_cocos2d_Mat4_createTranslation$2(L); // } } @@ -5576,7 +5741,7 @@ static int _cocos2d_Mat4_createTranslation(lua_State *L) return 0; } -static int _cocos2d_Mat4_decompose(lua_State *L) +static int _olua_fun_cocos2d_Mat4_decompose(lua_State *L) { olua_startinvoke(L); @@ -5599,7 +5764,7 @@ static int _cocos2d_Mat4_decompose(lua_State *L) return num_ret; } -static int _cocos2d_Mat4_determinant(lua_State *L) +static int _olua_fun_cocos2d_Mat4_determinant(lua_State *L) { olua_startinvoke(L); @@ -5616,7 +5781,7 @@ static int _cocos2d_Mat4_determinant(lua_State *L) return num_ret; } -static int _cocos2d_Mat4_getBackVector(lua_State *L) +static int _olua_fun_cocos2d_Mat4_getBackVector(lua_State *L) { olua_startinvoke(L); @@ -5634,7 +5799,7 @@ static int _cocos2d_Mat4_getBackVector(lua_State *L) return 0; } -static int _cocos2d_Mat4_getDownVector(lua_State *L) +static int _olua_fun_cocos2d_Mat4_getDownVector(lua_State *L) { olua_startinvoke(L); @@ -5652,7 +5817,7 @@ static int _cocos2d_Mat4_getDownVector(lua_State *L) return 0; } -static int _cocos2d_Mat4_getForwardVector(lua_State *L) +static int _olua_fun_cocos2d_Mat4_getForwardVector(lua_State *L) { olua_startinvoke(L); @@ -5670,7 +5835,7 @@ static int _cocos2d_Mat4_getForwardVector(lua_State *L) return 0; } -static int _cocos2d_Mat4_getInversed(lua_State *L) +static int _olua_fun_cocos2d_Mat4_getInversed(lua_State *L) { olua_startinvoke(L); @@ -5680,14 +5845,14 @@ static int _cocos2d_Mat4_getInversed(lua_State *L) // cocos2d::Mat4 getInversed() cocos2d::Mat4 ret = self->getInversed(); - int num_ret = olua_pushcopy_object(L, ret, "cc.Mat4"); + int num_ret = olua_copy_object(L, ret, "cc.Mat4"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_Mat4_getLeftVector(lua_State *L) +static int _olua_fun_cocos2d_Mat4_getLeftVector(lua_State *L) { olua_startinvoke(L); @@ -5705,7 +5870,7 @@ static int _cocos2d_Mat4_getLeftVector(lua_State *L) return 0; } -static int _cocos2d_Mat4_getNegated(lua_State *L) +static int _olua_fun_cocos2d_Mat4_getNegated(lua_State *L) { olua_startinvoke(L); @@ -5715,14 +5880,14 @@ static int _cocos2d_Mat4_getNegated(lua_State *L) // cocos2d::Mat4 getNegated() cocos2d::Mat4 ret = self->getNegated(); - int num_ret = olua_pushcopy_object(L, ret, "cc.Mat4"); + int num_ret = olua_copy_object(L, ret, "cc.Mat4"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_Mat4_getRightVector(lua_State *L) +static int _olua_fun_cocos2d_Mat4_getRightVector(lua_State *L) { olua_startinvoke(L); @@ -5740,7 +5905,7 @@ static int _cocos2d_Mat4_getRightVector(lua_State *L) return 0; } -static int _cocos2d_Mat4_getRotation(lua_State *L) +static int _olua_fun_cocos2d_Mat4_getRotation(lua_State *L) { olua_startinvoke(L); @@ -5759,7 +5924,7 @@ static int _cocos2d_Mat4_getRotation(lua_State *L) return num_ret; } -static int _cocos2d_Mat4_getScale(lua_State *L) +static int _olua_fun_cocos2d_Mat4_getScale(lua_State *L) { olua_startinvoke(L); @@ -5777,7 +5942,7 @@ static int _cocos2d_Mat4_getScale(lua_State *L) return 0; } -static int _cocos2d_Mat4_getTranslation(lua_State *L) +static int _olua_fun_cocos2d_Mat4_getTranslation(lua_State *L) { olua_startinvoke(L); @@ -5795,7 +5960,7 @@ static int _cocos2d_Mat4_getTranslation(lua_State *L) return 0; } -static int _cocos2d_Mat4_getTransposed(lua_State *L) +static int _olua_fun_cocos2d_Mat4_getTransposed(lua_State *L) { olua_startinvoke(L); @@ -5805,14 +5970,14 @@ static int _cocos2d_Mat4_getTransposed(lua_State *L) // cocos2d::Mat4 getTransposed() cocos2d::Mat4 ret = self->getTransposed(); - int num_ret = olua_pushcopy_object(L, ret, "cc.Mat4"); + int num_ret = olua_copy_object(L, ret, "cc.Mat4"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_Mat4_getUpVector(lua_State *L) +static int _olua_fun_cocos2d_Mat4_getUpVector(lua_State *L) { olua_startinvoke(L); @@ -5830,7 +5995,7 @@ static int _cocos2d_Mat4_getUpVector(lua_State *L) return 0; } -static int _cocos2d_Mat4_inverse(lua_State *L) +static int _olua_fun_cocos2d_Mat4_inverse(lua_State *L) { olua_startinvoke(L); @@ -5847,7 +6012,7 @@ static int _cocos2d_Mat4_inverse(lua_State *L) return num_ret; } -static int _cocos2d_Mat4_isIdentity(lua_State *L) +static int _olua_fun_cocos2d_Mat4_isIdentity(lua_State *L) { olua_startinvoke(L); @@ -5864,7 +6029,7 @@ static int _cocos2d_Mat4_isIdentity(lua_State *L) return num_ret; } -static int _cocos2d_Mat4_multiply$1(lua_State *L) +static int _olua_fun_cocos2d_Mat4_multiply$1(lua_State *L) { olua_startinvoke(L); @@ -5882,7 +6047,7 @@ static int _cocos2d_Mat4_multiply$1(lua_State *L) return 0; } -static int _cocos2d_Mat4_multiply$2(lua_State *L) +static int _olua_fun_cocos2d_Mat4_multiply$2(lua_State *L) { olua_startinvoke(L); @@ -5902,11 +6067,11 @@ static int _cocos2d_Mat4_multiply$2(lua_State *L) return 0; } -static int _cocos2d_Mat4_multiply$3(lua_State *L) +static int _olua_fun_cocos2d_Mat4_multiply$3(lua_State *L) { olua_startinvoke(L); - cocos2d::Mat4 arg1; /** mat */ + cocos2d::Mat4 *arg1; /** mat */ float arg2 = 0; /** scalar */ cocos2d::Mat4 *arg3 = nullptr; /** dst */ @@ -5915,37 +6080,37 @@ static int _cocos2d_Mat4_multiply$3(lua_State *L) olua_check_object(L, 3, &arg3, "cc.Mat4"); // static void multiply(const cocos2d::Mat4 &mat, float scalar, cocos2d::Mat4 *dst) - cocos2d::Mat4::multiply(arg1, arg2, arg3); + cocos2d::Mat4::multiply(*arg1, arg2, arg3); olua_endinvoke(L); return 0; } -static int _cocos2d_Mat4_multiply$4(lua_State *L) +static int _olua_fun_cocos2d_Mat4_multiply$4(lua_State *L) { olua_startinvoke(L); cocos2d::Mat4 *self = nullptr; - cocos2d::Mat4 arg1; /** mat */ + cocos2d::Mat4 *arg1; /** mat */ olua_to_object(L, 1, &self, "cc.Mat4"); olua_check_object(L, 2, &arg1, "cc.Mat4"); // void multiply(const cocos2d::Mat4 &mat) - self->multiply(arg1); + self->multiply(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_Mat4_multiply$5(lua_State *L) +static int _olua_fun_cocos2d_Mat4_multiply$5(lua_State *L) { olua_startinvoke(L); - cocos2d::Mat4 arg1; /** m1 */ - cocos2d::Mat4 arg2; /** m2 */ + cocos2d::Mat4 *arg1; /** m1 */ + cocos2d::Mat4 *arg2; /** m2 */ cocos2d::Mat4 *arg3 = nullptr; /** dst */ olua_check_object(L, 1, &arg1, "cc.Mat4"); @@ -5953,45 +6118,45 @@ static int _cocos2d_Mat4_multiply$5(lua_State *L) olua_check_object(L, 3, &arg3, "cc.Mat4"); // static void multiply(const cocos2d::Mat4 &m1, const cocos2d::Mat4 &m2, cocos2d::Mat4 *dst) - cocos2d::Mat4::multiply(arg1, arg2, arg3); + cocos2d::Mat4::multiply(*arg1, *arg2, arg3); olua_endinvoke(L); return 0; } -static int _cocos2d_Mat4_multiply(lua_State *L) +static int _olua_fun_cocos2d_Mat4_multiply(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { if ((olua_is_number(L, 2))) { // void multiply(float scalar) - return _cocos2d_Mat4_multiply$1(L); + return _olua_fun_cocos2d_Mat4_multiply$1(L); } // if ((olua_is_object(L, 2, "cc.Mat4"))) { // void multiply(const cocos2d::Mat4 &mat) - return _cocos2d_Mat4_multiply$4(L); + return _olua_fun_cocos2d_Mat4_multiply$4(L); // } } if (num_args == 2) { // if ((olua_is_number(L, 2)) && (olua_is_object(L, 3, "cc.Mat4"))) { // void multiply(float scalar, cocos2d::Mat4 *dst) - return _cocos2d_Mat4_multiply$2(L); + return _olua_fun_cocos2d_Mat4_multiply$2(L); // } } if (num_args == 3) { if ((olua_is_object(L, 1, "cc.Mat4")) && (olua_is_number(L, 2)) && (olua_is_object(L, 3, "cc.Mat4"))) { // static void multiply(const cocos2d::Mat4 &mat, float scalar, cocos2d::Mat4 *dst) - return _cocos2d_Mat4_multiply$3(L); + return _olua_fun_cocos2d_Mat4_multiply$3(L); } // if ((olua_is_object(L, 1, "cc.Mat4")) && (olua_is_object(L, 2, "cc.Mat4")) && (olua_is_object(L, 3, "cc.Mat4"))) { // static void multiply(const cocos2d::Mat4 &m1, const cocos2d::Mat4 &m2, cocos2d::Mat4 *dst) - return _cocos2d_Mat4_multiply$5(L); + return _olua_fun_cocos2d_Mat4_multiply$5(L); // } } @@ -6000,7 +6165,7 @@ static int _cocos2d_Mat4_multiply(lua_State *L) return 0; } -static int _cocos2d_Mat4_negate(lua_State *L) +static int _olua_fun_cocos2d_Mat4_negate(lua_State *L) { olua_startinvoke(L); @@ -6016,11 +6181,11 @@ static int _cocos2d_Mat4_negate(lua_State *L) return 0; } -static int _cocos2d_Mat4_new$1(lua_State *L) +static int _olua_fun_cocos2d_Mat4_new$1(lua_State *L) { olua_startinvoke(L); - // Mat4() + // cocos2d::Mat4() cocos2d::Mat4 *ret = new cocos2d::Mat4(); int num_ret = olua_push_object(L, ret, "cc.Mat4"); olua_postnew(L, ret); @@ -6030,7 +6195,7 @@ static int _cocos2d_Mat4_new$1(lua_State *L) return num_ret; } -static int _cocos2d_Mat4_new$2(lua_State *L) +static int _olua_fun_cocos2d_Mat4_new$2(lua_State *L) { olua_startinvoke(L); @@ -6068,7 +6233,7 @@ static int _cocos2d_Mat4_new$2(lua_State *L) olua_check_number(L, 15, &arg15); olua_check_number(L, 16, &arg16); - // Mat4(float m11, float m12, float m13, float m14, float m21, float m22, float m23, float m24, float m31, float m32, float m33, float m34, float m41, float m42, float m43, float m44) + // cocos2d::Mat4(float m11, float m12, float m13, float m14, float m21, float m22, float m23, float m24, float m31, float m32, float m33, float m34, float m41, float m42, float m43, float m44) cocos2d::Mat4 *ret = new cocos2d::Mat4(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16); int num_ret = olua_push_object(L, ret, "cc.Mat4"); olua_postnew(L, ret); @@ -6078,33 +6243,15 @@ static int _cocos2d_Mat4_new$2(lua_State *L) return num_ret; } -static int _cocos2d_Mat4_new$3(lua_State *L) +static int _olua_fun_cocos2d_Mat4_new$3(lua_State *L) { olua_startinvoke(L); float *arg1 = nullptr; /** mat */ - olua_check_pointer(L, 1, &arg1, "olua.float"); - - // Mat4(const float *mat) - cocos2d::Mat4 *ret = new cocos2d::Mat4(arg1); - int num_ret = olua_push_object(L, ret, "cc.Mat4"); - olua_postnew(L, ret); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_Mat4_new$4(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::Mat4 arg1; /** copy */ - - olua_check_object(L, 1, &arg1, "cc.Mat4"); + olua_check_valueptr(L, 1, &arg1, "olua.float"); - // Mat4(const cocos2d::Mat4 ©) + // cocos2d::Mat4(const float *mat) cocos2d::Mat4 *ret = new cocos2d::Mat4(arg1); int num_ret = olua_push_object(L, ret, "cc.Mat4"); olua_postnew(L, ret); @@ -6114,31 +6261,26 @@ static int _cocos2d_Mat4_new$4(lua_State *L) return num_ret; } -static int _cocos2d_Mat4_new(lua_State *L) +static int _olua_fun_cocos2d_Mat4_new(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 0) { - // Mat4() - return _cocos2d_Mat4_new$1(L); + // cocos2d::Mat4() + return _olua_fun_cocos2d_Mat4_new$1(L); } if (num_args == 1) { - if ((olua_is_pointer(L, 1, "olua.float"))) { - // Mat4(const float *mat) - return _cocos2d_Mat4_new$3(L); - } - - // if ((olua_is_object(L, 1, "cc.Mat4"))) { - // Mat4(const cocos2d::Mat4 ©) - return _cocos2d_Mat4_new$4(L); + // if ((olua_is_valueptr(L, 1, "olua.float"))) { + // cocos2d::Mat4(const float *mat) + return _olua_fun_cocos2d_Mat4_new$3(L); // } } if (num_args == 16) { // if ((olua_is_number(L, 1)) && (olua_is_number(L, 2)) && (olua_is_number(L, 3)) && (olua_is_number(L, 4)) && (olua_is_number(L, 5)) && (olua_is_number(L, 6)) && (olua_is_number(L, 7)) && (olua_is_number(L, 8)) && (olua_is_number(L, 9)) && (olua_is_number(L, 10)) && (olua_is_number(L, 11)) && (olua_is_number(L, 12)) && (olua_is_number(L, 13)) && (olua_is_number(L, 14)) && (olua_is_number(L, 15)) && (olua_is_number(L, 16))) { - // Mat4(float m11, float m12, float m13, float m14, float m21, float m22, float m23, float m24, float m31, float m32, float m33, float m34, float m41, float m42, float m43, float m44) - return _cocos2d_Mat4_new$2(L); + // cocos2d::Mat4(float m11, float m12, float m13, float m14, float m21, float m22, float m23, float m24, float m31, float m32, float m33, float m34, float m41, float m42, float m43, float m44) + return _olua_fun_cocos2d_Mat4_new$2(L); // } } @@ -6147,30 +6289,30 @@ static int _cocos2d_Mat4_new(lua_State *L) return 0; } -static int _cocos2d_Mat4_rotate$1(lua_State *L) +static int _olua_fun_cocos2d_Mat4_rotate$1(lua_State *L) { olua_startinvoke(L); cocos2d::Mat4 *self = nullptr; - cocos2d::Quaternion arg1; /** q */ + cocos2d::Quaternion *arg1; /** q */ olua_to_object(L, 1, &self, "cc.Mat4"); olua_check_object(L, 2, &arg1, "cc.Quaternion"); // void rotate(const cocos2d::Quaternion &q) - self->rotate(arg1); + self->rotate(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_Mat4_rotate$2(lua_State *L) +static int _olua_fun_cocos2d_Mat4_rotate$2(lua_State *L) { olua_startinvoke(L); cocos2d::Mat4 *self = nullptr; - cocos2d::Quaternion arg1; /** q */ + cocos2d::Quaternion *arg1; /** q */ cocos2d::Mat4 *arg2 = nullptr; /** dst */ olua_to_object(L, 1, &self, "cc.Mat4"); @@ -6178,19 +6320,19 @@ static int _cocos2d_Mat4_rotate$2(lua_State *L) olua_check_object(L, 3, &arg2, "cc.Mat4"); // void rotate(const cocos2d::Quaternion &q, cocos2d::Mat4 *dst) - self->rotate(arg1, arg2); + self->rotate(*arg1, arg2); olua_endinvoke(L); return 0; } -static int _cocos2d_Mat4_rotate$3(lua_State *L) +static int _olua_fun_cocos2d_Mat4_rotate$3(lua_State *L) { olua_startinvoke(L); cocos2d::Mat4 *self = nullptr; - cocos2d::Vec3 arg1; /** axis */ + cocos2d::Vec3 *arg1; /** axis */ float arg2 = 0; /** angle */ olua_to_object(L, 1, &self, "cc.Mat4"); @@ -6198,19 +6340,19 @@ static int _cocos2d_Mat4_rotate$3(lua_State *L) olua_check_number(L, 3, &arg2); // void rotate(const cocos2d::Vec3 &axis, float angle) - self->rotate(arg1, arg2); + self->rotate(*arg1, arg2); olua_endinvoke(L); return 0; } -static int _cocos2d_Mat4_rotate$4(lua_State *L) +static int _olua_fun_cocos2d_Mat4_rotate$4(lua_State *L) { olua_startinvoke(L); cocos2d::Mat4 *self = nullptr; - cocos2d::Vec3 arg1; /** axis */ + cocos2d::Vec3 *arg1; /** axis */ float arg2 = 0; /** angle */ cocos2d::Mat4 *arg3 = nullptr; /** dst */ @@ -6220,40 +6362,40 @@ static int _cocos2d_Mat4_rotate$4(lua_State *L) olua_check_object(L, 4, &arg3, "cc.Mat4"); // void rotate(const cocos2d::Vec3 &axis, float angle, cocos2d::Mat4 *dst) - self->rotate(arg1, arg2, arg3); + self->rotate(*arg1, arg2, arg3); olua_endinvoke(L); return 0; } -static int _cocos2d_Mat4_rotate(lua_State *L) +static int _olua_fun_cocos2d_Mat4_rotate(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_object(L, 2, "cc.Quaternion"))) { // void rotate(const cocos2d::Quaternion &q) - return _cocos2d_Mat4_rotate$1(L); + return _olua_fun_cocos2d_Mat4_rotate$1(L); // } } if (num_args == 2) { if ((olua_is_object(L, 2, "cc.Vec3")) && (olua_is_number(L, 3))) { // void rotate(const cocos2d::Vec3 &axis, float angle) - return _cocos2d_Mat4_rotate$3(L); + return _olua_fun_cocos2d_Mat4_rotate$3(L); } // if ((olua_is_object(L, 2, "cc.Quaternion")) && (olua_is_object(L, 3, "cc.Mat4"))) { // void rotate(const cocos2d::Quaternion &q, cocos2d::Mat4 *dst) - return _cocos2d_Mat4_rotate$2(L); + return _olua_fun_cocos2d_Mat4_rotate$2(L); // } } if (num_args == 3) { // if ((olua_is_object(L, 2, "cc.Vec3")) && (olua_is_number(L, 3)) && (olua_is_object(L, 4, "cc.Mat4"))) { // void rotate(const cocos2d::Vec3 &axis, float angle, cocos2d::Mat4 *dst) - return _cocos2d_Mat4_rotate$4(L); + return _olua_fun_cocos2d_Mat4_rotate$4(L); // } } @@ -6262,7 +6404,7 @@ static int _cocos2d_Mat4_rotate(lua_State *L) return 0; } -static int _cocos2d_Mat4_rotateX$1(lua_State *L) +static int _olua_fun_cocos2d_Mat4_rotateX$1(lua_State *L) { olua_startinvoke(L); @@ -6280,7 +6422,7 @@ static int _cocos2d_Mat4_rotateX$1(lua_State *L) return 0; } -static int _cocos2d_Mat4_rotateX$2(lua_State *L) +static int _olua_fun_cocos2d_Mat4_rotateX$2(lua_State *L) { olua_startinvoke(L); @@ -6300,21 +6442,21 @@ static int _cocos2d_Mat4_rotateX$2(lua_State *L) return 0; } -static int _cocos2d_Mat4_rotateX(lua_State *L) +static int _olua_fun_cocos2d_Mat4_rotateX(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_number(L, 2))) { // void rotateX(float angle) - return _cocos2d_Mat4_rotateX$1(L); + return _olua_fun_cocos2d_Mat4_rotateX$1(L); // } } if (num_args == 2) { // if ((olua_is_number(L, 2)) && (olua_is_object(L, 3, "cc.Mat4"))) { // void rotateX(float angle, cocos2d::Mat4 *dst) - return _cocos2d_Mat4_rotateX$2(L); + return _olua_fun_cocos2d_Mat4_rotateX$2(L); // } } @@ -6323,7 +6465,7 @@ static int _cocos2d_Mat4_rotateX(lua_State *L) return 0; } -static int _cocos2d_Mat4_rotateY$1(lua_State *L) +static int _olua_fun_cocos2d_Mat4_rotateY$1(lua_State *L) { olua_startinvoke(L); @@ -6341,7 +6483,7 @@ static int _cocos2d_Mat4_rotateY$1(lua_State *L) return 0; } -static int _cocos2d_Mat4_rotateY$2(lua_State *L) +static int _olua_fun_cocos2d_Mat4_rotateY$2(lua_State *L) { olua_startinvoke(L); @@ -6361,21 +6503,21 @@ static int _cocos2d_Mat4_rotateY$2(lua_State *L) return 0; } -static int _cocos2d_Mat4_rotateY(lua_State *L) +static int _olua_fun_cocos2d_Mat4_rotateY(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_number(L, 2))) { // void rotateY(float angle) - return _cocos2d_Mat4_rotateY$1(L); + return _olua_fun_cocos2d_Mat4_rotateY$1(L); // } } if (num_args == 2) { // if ((olua_is_number(L, 2)) && (olua_is_object(L, 3, "cc.Mat4"))) { // void rotateY(float angle, cocos2d::Mat4 *dst) - return _cocos2d_Mat4_rotateY$2(L); + return _olua_fun_cocos2d_Mat4_rotateY$2(L); // } } @@ -6384,7 +6526,7 @@ static int _cocos2d_Mat4_rotateY(lua_State *L) return 0; } -static int _cocos2d_Mat4_rotateZ$1(lua_State *L) +static int _olua_fun_cocos2d_Mat4_rotateZ$1(lua_State *L) { olua_startinvoke(L); @@ -6402,7 +6544,7 @@ static int _cocos2d_Mat4_rotateZ$1(lua_State *L) return 0; } -static int _cocos2d_Mat4_rotateZ$2(lua_State *L) +static int _olua_fun_cocos2d_Mat4_rotateZ$2(lua_State *L) { olua_startinvoke(L); @@ -6422,21 +6564,21 @@ static int _cocos2d_Mat4_rotateZ$2(lua_State *L) return 0; } -static int _cocos2d_Mat4_rotateZ(lua_State *L) +static int _olua_fun_cocos2d_Mat4_rotateZ(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_number(L, 2))) { // void rotateZ(float angle) - return _cocos2d_Mat4_rotateZ$1(L); + return _olua_fun_cocos2d_Mat4_rotateZ$1(L); // } } if (num_args == 2) { // if ((olua_is_number(L, 2)) && (olua_is_object(L, 3, "cc.Mat4"))) { // void rotateZ(float angle, cocos2d::Mat4 *dst) - return _cocos2d_Mat4_rotateZ$2(L); + return _olua_fun_cocos2d_Mat4_rotateZ$2(L); // } } @@ -6445,7 +6587,7 @@ static int _cocos2d_Mat4_rotateZ(lua_State *L) return 0; } -static int _cocos2d_Mat4_scale$1(lua_State *L) +static int _olua_fun_cocos2d_Mat4_scale$1(lua_State *L) { olua_startinvoke(L); @@ -6463,7 +6605,7 @@ static int _cocos2d_Mat4_scale$1(lua_State *L) return 0; } -static int _cocos2d_Mat4_scale$2(lua_State *L) +static int _olua_fun_cocos2d_Mat4_scale$2(lua_State *L) { olua_startinvoke(L); @@ -6483,7 +6625,7 @@ static int _cocos2d_Mat4_scale$2(lua_State *L) return 0; } -static int _cocos2d_Mat4_scale$3(lua_State *L) +static int _olua_fun_cocos2d_Mat4_scale$3(lua_State *L) { olua_startinvoke(L); @@ -6505,7 +6647,7 @@ static int _cocos2d_Mat4_scale$3(lua_State *L) return 0; } -static int _cocos2d_Mat4_scale$4(lua_State *L) +static int _olua_fun_cocos2d_Mat4_scale$4(lua_State *L) { olua_startinvoke(L); @@ -6529,30 +6671,30 @@ static int _cocos2d_Mat4_scale$4(lua_State *L) return 0; } -static int _cocos2d_Mat4_scale$5(lua_State *L) +static int _olua_fun_cocos2d_Mat4_scale$5(lua_State *L) { olua_startinvoke(L); cocos2d::Mat4 *self = nullptr; - cocos2d::Vec3 arg1; /** s */ + cocos2d::Vec3 *arg1; /** s */ olua_to_object(L, 1, &self, "cc.Mat4"); olua_check_object(L, 2, &arg1, "cc.Vec3"); // void scale(const cocos2d::Vec3 &s) - self->scale(arg1); + self->scale(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_Mat4_scale$6(lua_State *L) +static int _olua_fun_cocos2d_Mat4_scale$6(lua_State *L) { olua_startinvoke(L); cocos2d::Mat4 *self = nullptr; - cocos2d::Vec3 arg1; /** s */ + cocos2d::Vec3 *arg1; /** s */ cocos2d::Mat4 *arg2 = nullptr; /** dst */ olua_to_object(L, 1, &self, "cc.Mat4"); @@ -6560,52 +6702,52 @@ static int _cocos2d_Mat4_scale$6(lua_State *L) olua_check_object(L, 3, &arg2, "cc.Mat4"); // void scale(const cocos2d::Vec3 &s, cocos2d::Mat4 *dst) - self->scale(arg1, arg2); + self->scale(*arg1, arg2); olua_endinvoke(L); return 0; } -static int _cocos2d_Mat4_scale(lua_State *L) +static int _olua_fun_cocos2d_Mat4_scale(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { if ((olua_is_object(L, 2, "cc.Vec3"))) { // void scale(const cocos2d::Vec3 &s) - return _cocos2d_Mat4_scale$5(L); + return _olua_fun_cocos2d_Mat4_scale$5(L); } // if ((olua_is_number(L, 2))) { // void scale(float value) - return _cocos2d_Mat4_scale$1(L); + return _olua_fun_cocos2d_Mat4_scale$1(L); // } } if (num_args == 2) { if ((olua_is_object(L, 2, "cc.Vec3")) && (olua_is_object(L, 3, "cc.Mat4"))) { // void scale(const cocos2d::Vec3 &s, cocos2d::Mat4 *dst) - return _cocos2d_Mat4_scale$6(L); + return _olua_fun_cocos2d_Mat4_scale$6(L); } // if ((olua_is_number(L, 2)) && (olua_is_object(L, 3, "cc.Mat4"))) { // void scale(float value, cocos2d::Mat4 *dst) - return _cocos2d_Mat4_scale$2(L); + return _olua_fun_cocos2d_Mat4_scale$2(L); // } } if (num_args == 3) { // if ((olua_is_number(L, 2)) && (olua_is_number(L, 3)) && (olua_is_number(L, 4))) { // void scale(float xScale, float yScale, float zScale) - return _cocos2d_Mat4_scale$3(L); + return _olua_fun_cocos2d_Mat4_scale$3(L); // } } if (num_args == 4) { // if ((olua_is_number(L, 2)) && (olua_is_number(L, 3)) && (olua_is_number(L, 4)) && (olua_is_object(L, 5, "cc.Mat4"))) { // void scale(float xScale, float yScale, float zScale, cocos2d::Mat4 *dst) - return _cocos2d_Mat4_scale$4(L); + return _olua_fun_cocos2d_Mat4_scale$4(L); // } } @@ -6614,7 +6756,7 @@ static int _cocos2d_Mat4_scale(lua_State *L) return 0; } -static int _cocos2d_Mat4_set$1(lua_State *L) +static int _olua_fun_cocos2d_Mat4_set$1(lua_State *L) { olua_startinvoke(L); @@ -6662,7 +6804,7 @@ static int _cocos2d_Mat4_set$1(lua_State *L) return 0; } -static int _cocos2d_Mat4_set$2(lua_State *L) +static int _olua_fun_cocos2d_Mat4_set$2(lua_State *L) { olua_startinvoke(L); @@ -6670,7 +6812,7 @@ static int _cocos2d_Mat4_set$2(lua_State *L) float *arg1 = nullptr; /** mat */ olua_to_object(L, 1, &self, "cc.Mat4"); - olua_check_pointer(L, 2, &arg1, "olua.float"); + olua_check_valueptr(L, 2, &arg1, "olua.float"); // void set(const float *mat) self->set(arg1); @@ -6680,44 +6822,44 @@ static int _cocos2d_Mat4_set$2(lua_State *L) return 0; } -static int _cocos2d_Mat4_set$3(lua_State *L) +static int _olua_fun_cocos2d_Mat4_set$3(lua_State *L) { olua_startinvoke(L); cocos2d::Mat4 *self = nullptr; - cocos2d::Mat4 arg1; /** mat */ + cocos2d::Mat4 *arg1; /** mat */ olua_to_object(L, 1, &self, "cc.Mat4"); olua_check_object(L, 2, &arg1, "cc.Mat4"); // void set(const cocos2d::Mat4 &mat) - self->set(arg1); + self->set(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_Mat4_set(lua_State *L) +static int _olua_fun_cocos2d_Mat4_set(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { - if ((olua_is_pointer(L, 2, "olua.float"))) { + if ((olua_is_valueptr(L, 2, "olua.float"))) { // void set(const float *mat) - return _cocos2d_Mat4_set$2(L); + return _olua_fun_cocos2d_Mat4_set$2(L); } // if ((olua_is_object(L, 2, "cc.Mat4"))) { // void set(const cocos2d::Mat4 &mat) - return _cocos2d_Mat4_set$3(L); + return _olua_fun_cocos2d_Mat4_set$3(L); // } } if (num_args == 16) { // if ((olua_is_number(L, 2)) && (olua_is_number(L, 3)) && (olua_is_number(L, 4)) && (olua_is_number(L, 5)) && (olua_is_number(L, 6)) && (olua_is_number(L, 7)) && (olua_is_number(L, 8)) && (olua_is_number(L, 9)) && (olua_is_number(L, 10)) && (olua_is_number(L, 11)) && (olua_is_number(L, 12)) && (olua_is_number(L, 13)) && (olua_is_number(L, 14)) && (olua_is_number(L, 15)) && (olua_is_number(L, 16)) && (olua_is_number(L, 17))) { // void set(float m11, float m12, float m13, float m14, float m21, float m22, float m23, float m24, float m31, float m32, float m33, float m34, float m41, float m42, float m43, float m44) - return _cocos2d_Mat4_set$1(L); + return _olua_fun_cocos2d_Mat4_set$1(L); // } } @@ -6726,7 +6868,7 @@ static int _cocos2d_Mat4_set(lua_State *L) return 0; } -static int _cocos2d_Mat4_setIdentity(lua_State *L) +static int _olua_fun_cocos2d_Mat4_setIdentity(lua_State *L) { olua_startinvoke(L); @@ -6742,7 +6884,7 @@ static int _cocos2d_Mat4_setIdentity(lua_State *L) return 0; } -static int _cocos2d_Mat4_setZero(lua_State *L) +static int _olua_fun_cocos2d_Mat4_setZero(lua_State *L) { olua_startinvoke(L); @@ -6758,30 +6900,30 @@ static int _cocos2d_Mat4_setZero(lua_State *L) return 0; } -static int _cocos2d_Mat4_subtract$1(lua_State *L) +static int _olua_fun_cocos2d_Mat4_subtract$1(lua_State *L) { olua_startinvoke(L); cocos2d::Mat4 *self = nullptr; - cocos2d::Mat4 arg1; /** mat */ + cocos2d::Mat4 *arg1; /** mat */ olua_to_object(L, 1, &self, "cc.Mat4"); olua_check_object(L, 2, &arg1, "cc.Mat4"); // void subtract(const cocos2d::Mat4 &mat) - self->subtract(arg1); + self->subtract(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_Mat4_subtract$2(lua_State *L) +static int _olua_fun_cocos2d_Mat4_subtract$2(lua_State *L) { olua_startinvoke(L); - cocos2d::Mat4 arg1; /** m1 */ - cocos2d::Mat4 arg2; /** m2 */ + cocos2d::Mat4 *arg1; /** m1 */ + cocos2d::Mat4 *arg2; /** m2 */ cocos2d::Mat4 *arg3 = nullptr; /** dst */ olua_check_object(L, 1, &arg1, "cc.Mat4"); @@ -6789,28 +6931,28 @@ static int _cocos2d_Mat4_subtract$2(lua_State *L) olua_check_object(L, 3, &arg3, "cc.Mat4"); // static void subtract(const cocos2d::Mat4 &m1, const cocos2d::Mat4 &m2, cocos2d::Mat4 *dst) - cocos2d::Mat4::subtract(arg1, arg2, arg3); + cocos2d::Mat4::subtract(*arg1, *arg2, arg3); olua_endinvoke(L); return 0; } -static int _cocos2d_Mat4_subtract(lua_State *L) +static int _olua_fun_cocos2d_Mat4_subtract(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_object(L, 2, "cc.Mat4"))) { // void subtract(const cocos2d::Mat4 &mat) - return _cocos2d_Mat4_subtract$1(L); + return _olua_fun_cocos2d_Mat4_subtract$1(L); // } } if (num_args == 3) { // if ((olua_is_object(L, 1, "cc.Mat4")) && (olua_is_object(L, 2, "cc.Mat4")) && (olua_is_object(L, 3, "cc.Mat4"))) { // static void subtract(const cocos2d::Mat4 &m1, const cocos2d::Mat4 &m2, cocos2d::Mat4 *dst) - return _cocos2d_Mat4_subtract$2(L); + return _olua_fun_cocos2d_Mat4_subtract$2(L); // } } @@ -6819,75 +6961,75 @@ static int _cocos2d_Mat4_subtract(lua_State *L) return 0; } -static int _cocos2d_Mat4_transform$1(lua_State *L) +static int _olua_fun_cocos2d_Mat4_transform$1(lua_State *L) { olua_startinvoke(L); cocos2d::Mat4 *arg1 = nullptr; /** mat */ - cocos2d::Vec4 arg2; /** p */ + cocos2d::Vec4 *arg2; /** p */ olua_check_object(L, 1, &arg1, "cc.Mat4"); olua_check_object(L, 2, &arg2, "cc.Vec4"); // @extend(cocos2d::Mat4Extend) static cocos2d::Vec4 transform(cocos2d::Mat4 *mat, const cocos2d::Vec4 &p) - cocos2d::Vec4 ret = cocos2d::Mat4Extend::transform(arg1, arg2); - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec4"); + cocos2d::Vec4 ret = cocos2d::Mat4Extend::transform(arg1, *arg2); + int num_ret = olua_copy_object(L, ret, "cc.Vec4"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_Mat4_transform$2(lua_State *L) +static int _olua_fun_cocos2d_Mat4_transform$2(lua_State *L) { olua_startinvoke(L); cocos2d::Mat4 *arg1 = nullptr; /** mat */ - cocos2d::Vec4 arg2; /** p */ + cocos2d::Vec3 *arg2; /** p */ olua_check_object(L, 1, &arg1, "cc.Mat4"); - olua_pack_object(L, 2, &arg2); + olua_check_object(L, 2, &arg2, "cc.Vec3"); - // @extend(cocos2d::Mat4Extend) static cocos2d::Vec4 transform(cocos2d::Mat4 *mat, @pack const cocos2d::Vec4 &p) - cocos2d::Vec4 ret = cocos2d::Mat4Extend::transform(arg1, arg2); - int num_ret = olua_unpack_object(L, &ret); + // @extend(cocos2d::Mat4Extend) static cocos2d::Vec3 transform(cocos2d::Mat4 *mat, const cocos2d::Vec3 &p) + cocos2d::Vec3 ret = cocos2d::Mat4Extend::transform(arg1, *arg2); + int num_ret = olua_copy_object(L, ret, "cc.Vec3"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_Mat4_transform$3(lua_State *L) +static int _olua_fun_cocos2d_Mat4_transform$3(lua_State *L) { olua_startinvoke(L); cocos2d::Mat4 *arg1 = nullptr; /** mat */ - cocos2d::Vec3 arg2; /** p */ + cocos2d::Vec2 *arg2; /** p */ olua_check_object(L, 1, &arg1, "cc.Mat4"); - olua_check_object(L, 2, &arg2, "cc.Vec3"); + olua_check_object(L, 2, &arg2, "cc.Vec2"); - // @extend(cocos2d::Mat4Extend) static cocos2d::Vec3 transform(cocos2d::Mat4 *mat, const cocos2d::Vec3 &p) - cocos2d::Vec3 ret = cocos2d::Mat4Extend::transform(arg1, arg2); - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec3"); + // @extend(cocos2d::Mat4Extend) static cocos2d::Vec2 transform(cocos2d::Mat4 *mat, const cocos2d::Vec2 &p) + cocos2d::Vec2 ret = cocos2d::Mat4Extend::transform(arg1, *arg2); + int num_ret = olua_copy_object(L, ret, "cc.Vec2"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_Mat4_transform$4(lua_State *L) +static int _olua_fun_cocos2d_Mat4_transform$4(lua_State *L) { olua_startinvoke(L); cocos2d::Mat4 *arg1 = nullptr; /** mat */ - cocos2d::Vec3 arg2; /** p */ + cocos2d::Vec4 arg2; /** p */ olua_check_object(L, 1, &arg1, "cc.Mat4"); olua_pack_object(L, 2, &arg2); - // @extend(cocos2d::Mat4Extend) static cocos2d::Vec3 transform(cocos2d::Mat4 *mat, @pack const cocos2d::Vec3 &p) - cocos2d::Vec3 ret = cocos2d::Mat4Extend::transform(arg1, arg2); + // @extend(cocos2d::Mat4Extend) @unpack static cocos2d::Vec4 transform(cocos2d::Mat4 *mat, @pack const cocos2d::Vec4 &p) + cocos2d::Vec4 ret = cocos2d::Mat4Extend::transform(arg1, arg2); int num_ret = olua_unpack_object(L, &ret); olua_endinvoke(L); @@ -6895,26 +7037,26 @@ static int _cocos2d_Mat4_transform$4(lua_State *L) return num_ret; } -static int _cocos2d_Mat4_transform$5(lua_State *L) +static int _olua_fun_cocos2d_Mat4_transform$5(lua_State *L) { olua_startinvoke(L); cocos2d::Mat4 *arg1 = nullptr; /** mat */ - cocos2d::Vec2 arg2; /** p */ + cocos2d::Vec3 arg2; /** p */ olua_check_object(L, 1, &arg1, "cc.Mat4"); - olua_check_object(L, 2, &arg2, "cc.Vec2"); + olua_pack_object(L, 2, &arg2); - // @extend(cocos2d::Mat4Extend) static cocos2d::Vec2 transform(cocos2d::Mat4 *mat, const cocos2d::Vec2 &p) - cocos2d::Vec2 ret = cocos2d::Mat4Extend::transform(arg1, arg2); - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec2"); + // @extend(cocos2d::Mat4Extend) @unpack static cocos2d::Vec3 transform(cocos2d::Mat4 *mat, @pack const cocos2d::Vec3 &p) + cocos2d::Vec3 ret = cocos2d::Mat4Extend::transform(arg1, arg2); + int num_ret = olua_unpack_object(L, &ret); olua_endinvoke(L); return num_ret; } -static int _cocos2d_Mat4_transform$6(lua_State *L) +static int _olua_fun_cocos2d_Mat4_transform$6(lua_State *L) { olua_startinvoke(L); @@ -6924,7 +7066,7 @@ static int _cocos2d_Mat4_transform$6(lua_State *L) olua_check_object(L, 1, &arg1, "cc.Mat4"); olua_pack_object(L, 2, &arg2); - // @extend(cocos2d::Mat4Extend) static cocos2d::Vec2 transform(cocos2d::Mat4 *mat, @pack const cocos2d::Vec2 &p) + // @extend(cocos2d::Mat4Extend) @unpack static cocos2d::Vec2 transform(cocos2d::Mat4 *mat, @pack const cocos2d::Vec2 &p) cocos2d::Vec2 ret = cocos2d::Mat4Extend::transform(arg1, arg2); int num_ret = olua_unpack_object(L, &ret); @@ -6933,45 +7075,45 @@ static int _cocos2d_Mat4_transform$6(lua_State *L) return num_ret; } -static int _cocos2d_Mat4_transform(lua_State *L) +static int _olua_fun_cocos2d_Mat4_transform(lua_State *L) { int num_args = lua_gettop(L); - if (num_args == 2) { + if (num_args == 1) { if ((olua_is_object(L, 1, "cc.Mat4")) && (olua_is_object(L, 2, "cc.Vec4"))) { // @extend(cocos2d::Mat4Extend) static cocos2d::Vec4 transform(cocos2d::Mat4 *mat, const cocos2d::Vec4 &p) - return _cocos2d_Mat4_transform$1(L); + return _olua_fun_cocos2d_Mat4_transform$1(L); } if ((olua_is_object(L, 1, "cc.Mat4")) && (olua_is_object(L, 2, "cc.Vec3"))) { // @extend(cocos2d::Mat4Extend) static cocos2d::Vec3 transform(cocos2d::Mat4 *mat, const cocos2d::Vec3 &p) - return _cocos2d_Mat4_transform$3(L); + return _olua_fun_cocos2d_Mat4_transform$2(L); } // if ((olua_is_object(L, 1, "cc.Mat4")) && (olua_is_object(L, 2, "cc.Vec2"))) { // @extend(cocos2d::Mat4Extend) static cocos2d::Vec2 transform(cocos2d::Mat4 *mat, const cocos2d::Vec2 &p) - return _cocos2d_Mat4_transform$5(L); + return _olua_fun_cocos2d_Mat4_transform$3(L); // } } - if (num_args == 3) { + if (num_args == 2) { // if ((olua_is_object(L, 1, "cc.Mat4")) && (olua_canpack_object(L, 2, (cocos2d::Vec2 *)nullptr))) { - // @extend(cocos2d::Mat4Extend) static cocos2d::Vec2 transform(cocos2d::Mat4 *mat, @pack const cocos2d::Vec2 &p) - return _cocos2d_Mat4_transform$6(L); + // @extend(cocos2d::Mat4Extend) @unpack static cocos2d::Vec2 transform(cocos2d::Mat4 *mat, @pack const cocos2d::Vec2 &p) + return _olua_fun_cocos2d_Mat4_transform$6(L); // } } - if (num_args == 4) { + if (num_args == 3) { // if ((olua_is_object(L, 1, "cc.Mat4")) && (olua_canpack_object(L, 2, (cocos2d::Vec3 *)nullptr))) { - // @extend(cocos2d::Mat4Extend) static cocos2d::Vec3 transform(cocos2d::Mat4 *mat, @pack const cocos2d::Vec3 &p) - return _cocos2d_Mat4_transform$4(L); + // @extend(cocos2d::Mat4Extend) @unpack static cocos2d::Vec3 transform(cocos2d::Mat4 *mat, @pack const cocos2d::Vec3 &p) + return _olua_fun_cocos2d_Mat4_transform$5(L); // } } - if (num_args == 5) { + if (num_args == 4) { // if ((olua_is_object(L, 1, "cc.Mat4")) && (olua_canpack_object(L, 2, (cocos2d::Vec4 *)nullptr))) { - // @extend(cocos2d::Mat4Extend) static cocos2d::Vec4 transform(cocos2d::Mat4 *mat, @pack const cocos2d::Vec4 &p) - return _cocos2d_Mat4_transform$2(L); + // @extend(cocos2d::Mat4Extend) @unpack static cocos2d::Vec4 transform(cocos2d::Mat4 *mat, @pack const cocos2d::Vec4 &p) + return _olua_fun_cocos2d_Mat4_transform$4(L); // } } @@ -6980,7 +7122,7 @@ static int _cocos2d_Mat4_transform(lua_State *L) return 0; } -static int _cocos2d_Mat4_transformPoint$1(lua_State *L) +static int _olua_fun_cocos2d_Mat4_transformPoint$1(lua_State *L) { olua_startinvoke(L); @@ -6998,12 +7140,12 @@ static int _cocos2d_Mat4_transformPoint$1(lua_State *L) return 0; } -static int _cocos2d_Mat4_transformPoint$2(lua_State *L) +static int _olua_fun_cocos2d_Mat4_transformPoint$2(lua_State *L) { olua_startinvoke(L); cocos2d::Mat4 *self = nullptr; - cocos2d::Vec3 arg1; /** point */ + cocos2d::Vec3 *arg1; /** point */ cocos2d::Vec3 *arg2 = nullptr; /** dst */ olua_to_object(L, 1, &self, "cc.Mat4"); @@ -7011,28 +7153,28 @@ static int _cocos2d_Mat4_transformPoint$2(lua_State *L) olua_check_object(L, 3, &arg2, "cc.Vec3"); // void transformPoint(const cocos2d::Vec3 &point, cocos2d::Vec3 *dst) - self->transformPoint(arg1, arg2); + self->transformPoint(*arg1, arg2); olua_endinvoke(L); return 0; } -static int _cocos2d_Mat4_transformPoint(lua_State *L) +static int _olua_fun_cocos2d_Mat4_transformPoint(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_object(L, 2, "cc.Vec3"))) { // void transformPoint(cocos2d::Vec3 *point) - return _cocos2d_Mat4_transformPoint$1(L); + return _olua_fun_cocos2d_Mat4_transformPoint$1(L); // } } if (num_args == 2) { // if ((olua_is_object(L, 2, "cc.Vec3")) && (olua_is_object(L, 3, "cc.Vec3"))) { // void transformPoint(const cocos2d::Vec3 &point, cocos2d::Vec3 *dst) - return _cocos2d_Mat4_transformPoint$2(L); + return _olua_fun_cocos2d_Mat4_transformPoint$2(L); // } } @@ -7041,7 +7183,7 @@ static int _cocos2d_Mat4_transformPoint(lua_State *L) return 0; } -static int _cocos2d_Mat4_transformVector$1(lua_State *L) +static int _olua_fun_cocos2d_Mat4_transformVector$1(lua_State *L) { olua_startinvoke(L); @@ -7059,12 +7201,12 @@ static int _cocos2d_Mat4_transformVector$1(lua_State *L) return 0; } -static int _cocos2d_Mat4_transformVector$2(lua_State *L) +static int _olua_fun_cocos2d_Mat4_transformVector$2(lua_State *L) { olua_startinvoke(L); cocos2d::Mat4 *self = nullptr; - cocos2d::Vec3 arg1; /** vector */ + cocos2d::Vec3 *arg1; /** vector */ cocos2d::Vec3 *arg2 = nullptr; /** dst */ olua_to_object(L, 1, &self, "cc.Mat4"); @@ -7072,14 +7214,14 @@ static int _cocos2d_Mat4_transformVector$2(lua_State *L) olua_check_object(L, 3, &arg2, "cc.Vec3"); // void transformVector(const cocos2d::Vec3 &vector, cocos2d::Vec3 *dst) - self->transformVector(arg1, arg2); + self->transformVector(*arg1, arg2); olua_endinvoke(L); return 0; } -static int _cocos2d_Mat4_transformVector$3(lua_State *L) +static int _olua_fun_cocos2d_Mat4_transformVector$3(lua_State *L) { olua_startinvoke(L); @@ -7105,7 +7247,7 @@ static int _cocos2d_Mat4_transformVector$3(lua_State *L) return 0; } -static int _cocos2d_Mat4_transformVector$4(lua_State *L) +static int _olua_fun_cocos2d_Mat4_transformVector$4(lua_State *L) { olua_startinvoke(L); @@ -7123,12 +7265,12 @@ static int _cocos2d_Mat4_transformVector$4(lua_State *L) return 0; } -static int _cocos2d_Mat4_transformVector$5(lua_State *L) +static int _olua_fun_cocos2d_Mat4_transformVector$5(lua_State *L) { olua_startinvoke(L); cocos2d::Mat4 *self = nullptr; - cocos2d::Vec4 arg1; /** vector */ + cocos2d::Vec4 *arg1; /** vector */ cocos2d::Vec4 *arg2 = nullptr; /** dst */ olua_to_object(L, 1, &self, "cc.Mat4"); @@ -7136,45 +7278,45 @@ static int _cocos2d_Mat4_transformVector$5(lua_State *L) olua_check_object(L, 3, &arg2, "cc.Vec4"); // void transformVector(const cocos2d::Vec4 &vector, cocos2d::Vec4 *dst) - self->transformVector(arg1, arg2); + self->transformVector(*arg1, arg2); olua_endinvoke(L); return 0; } -static int _cocos2d_Mat4_transformVector(lua_State *L) +static int _olua_fun_cocos2d_Mat4_transformVector(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { if ((olua_is_object(L, 2, "cc.Vec4"))) { // void transformVector(cocos2d::Vec4 *vector) - return _cocos2d_Mat4_transformVector$4(L); + return _olua_fun_cocos2d_Mat4_transformVector$4(L); } // if ((olua_is_object(L, 2, "cc.Vec3"))) { // void transformVector(cocos2d::Vec3 *vector) - return _cocos2d_Mat4_transformVector$1(L); + return _olua_fun_cocos2d_Mat4_transformVector$1(L); // } } if (num_args == 2) { if ((olua_is_object(L, 2, "cc.Vec4")) && (olua_is_object(L, 3, "cc.Vec4"))) { // void transformVector(const cocos2d::Vec4 &vector, cocos2d::Vec4 *dst) - return _cocos2d_Mat4_transformVector$5(L); + return _olua_fun_cocos2d_Mat4_transformVector$5(L); } // if ((olua_is_object(L, 2, "cc.Vec3")) && (olua_is_object(L, 3, "cc.Vec3"))) { // void transformVector(const cocos2d::Vec3 &vector, cocos2d::Vec3 *dst) - return _cocos2d_Mat4_transformVector$2(L); + return _olua_fun_cocos2d_Mat4_transformVector$2(L); // } } if (num_args == 5) { // if ((olua_is_number(L, 2)) && (olua_is_number(L, 3)) && (olua_is_number(L, 4)) && (olua_is_number(L, 5)) && (olua_is_object(L, 6, "cc.Vec3"))) { // void transformVector(float x, float y, float z, float w, cocos2d::Vec3 *dst) - return _cocos2d_Mat4_transformVector$3(L); + return _olua_fun_cocos2d_Mat4_transformVector$3(L); // } } @@ -7183,7 +7325,7 @@ static int _cocos2d_Mat4_transformVector(lua_State *L) return 0; } -static int _cocos2d_Mat4_translate$1(lua_State *L) +static int _olua_fun_cocos2d_Mat4_translate$1(lua_State *L) { olua_startinvoke(L); @@ -7205,7 +7347,7 @@ static int _cocos2d_Mat4_translate$1(lua_State *L) return 0; } -static int _cocos2d_Mat4_translate$2(lua_State *L) +static int _olua_fun_cocos2d_Mat4_translate$2(lua_State *L) { olua_startinvoke(L); @@ -7229,30 +7371,30 @@ static int _cocos2d_Mat4_translate$2(lua_State *L) return 0; } -static int _cocos2d_Mat4_translate$3(lua_State *L) +static int _olua_fun_cocos2d_Mat4_translate$3(lua_State *L) { olua_startinvoke(L); cocos2d::Mat4 *self = nullptr; - cocos2d::Vec3 arg1; /** t */ + cocos2d::Vec3 *arg1; /** t */ olua_to_object(L, 1, &self, "cc.Mat4"); olua_check_object(L, 2, &arg1, "cc.Vec3"); // void translate(const cocos2d::Vec3 &t) - self->translate(arg1); + self->translate(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_Mat4_translate$4(lua_State *L) +static int _olua_fun_cocos2d_Mat4_translate$4(lua_State *L) { olua_startinvoke(L); cocos2d::Mat4 *self = nullptr; - cocos2d::Vec3 arg1; /** t */ + cocos2d::Vec3 *arg1; /** t */ cocos2d::Mat4 *arg2 = nullptr; /** dst */ olua_to_object(L, 1, &self, "cc.Mat4"); @@ -7260,42 +7402,42 @@ static int _cocos2d_Mat4_translate$4(lua_State *L) olua_check_object(L, 3, &arg2, "cc.Mat4"); // void translate(const cocos2d::Vec3 &t, cocos2d::Mat4 *dst) - self->translate(arg1, arg2); + self->translate(*arg1, arg2); olua_endinvoke(L); return 0; } -static int _cocos2d_Mat4_translate(lua_State *L) +static int _olua_fun_cocos2d_Mat4_translate(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_object(L, 2, "cc.Vec3"))) { // void translate(const cocos2d::Vec3 &t) - return _cocos2d_Mat4_translate$3(L); + return _olua_fun_cocos2d_Mat4_translate$3(L); // } } if (num_args == 2) { // if ((olua_is_object(L, 2, "cc.Vec3")) && (olua_is_object(L, 3, "cc.Mat4"))) { // void translate(const cocos2d::Vec3 &t, cocos2d::Mat4 *dst) - return _cocos2d_Mat4_translate$4(L); + return _olua_fun_cocos2d_Mat4_translate$4(L); // } } if (num_args == 3) { // if ((olua_is_number(L, 2)) && (olua_is_number(L, 3)) && (olua_is_number(L, 4))) { // void translate(float x, float y, float z) - return _cocos2d_Mat4_translate$1(L); + return _olua_fun_cocos2d_Mat4_translate$1(L); // } } if (num_args == 4) { // if ((olua_is_number(L, 2)) && (olua_is_number(L, 3)) && (olua_is_number(L, 4)) && (olua_is_object(L, 5, "cc.Mat4"))) { // void translate(float x, float y, float z, cocos2d::Mat4 *dst) - return _cocos2d_Mat4_translate$2(L); + return _olua_fun_cocos2d_Mat4_translate$2(L); // } } @@ -7304,7 +7446,7 @@ static int _cocos2d_Mat4_translate(lua_State *L) return 0; } -static int _cocos2d_Mat4_transpose(lua_State *L) +static int _olua_fun_cocos2d_Mat4_transpose(lua_State *L) { olua_startinvoke(L); @@ -7320,120 +7462,81 @@ static int _cocos2d_Mat4_transpose(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_Mat4(lua_State *L) +static int _olua_cls_cc_Mat4(lua_State *L) { oluacls_class(L, "cc.Mat4"); - oluacls_func(L, "__add", _cocos2d_Mat4___add); - oluacls_func(L, "__gc", _cocos2d_Mat4___gc); - oluacls_func(L, "__mul", _cocos2d_Mat4___mul); - oluacls_func(L, "__olua_move", _cocos2d_Mat4___olua_move); - oluacls_func(L, "__sub", _cocos2d_Mat4___sub); - oluacls_func(L, "add", _cocos2d_Mat4_add); - oluacls_func(L, "createBillboard", _cocos2d_Mat4_createBillboard); - oluacls_func(L, "createLookAt", _cocos2d_Mat4_createLookAt); - oluacls_func(L, "createOrthographic", _cocos2d_Mat4_createOrthographic); - oluacls_func(L, "createOrthographicOffCenter", _cocos2d_Mat4_createOrthographicOffCenter); - oluacls_func(L, "createPerspective", _cocos2d_Mat4_createPerspective); - oluacls_func(L, "createRotation", _cocos2d_Mat4_createRotation); - oluacls_func(L, "createRotationX", _cocos2d_Mat4_createRotationX); - oluacls_func(L, "createRotationY", _cocos2d_Mat4_createRotationY); - oluacls_func(L, "createRotationZ", _cocos2d_Mat4_createRotationZ); - oluacls_func(L, "createScale", _cocos2d_Mat4_createScale); - oluacls_func(L, "createTranslation", _cocos2d_Mat4_createTranslation); - oluacls_func(L, "decompose", _cocos2d_Mat4_decompose); - oluacls_func(L, "determinant", _cocos2d_Mat4_determinant); - oluacls_func(L, "getBackVector", _cocos2d_Mat4_getBackVector); - oluacls_func(L, "getDownVector", _cocos2d_Mat4_getDownVector); - oluacls_func(L, "getForwardVector", _cocos2d_Mat4_getForwardVector); - oluacls_func(L, "getInversed", _cocos2d_Mat4_getInversed); - oluacls_func(L, "getLeftVector", _cocos2d_Mat4_getLeftVector); - oluacls_func(L, "getNegated", _cocos2d_Mat4_getNegated); - oluacls_func(L, "getRightVector", _cocos2d_Mat4_getRightVector); - oluacls_func(L, "getRotation", _cocos2d_Mat4_getRotation); - oluacls_func(L, "getScale", _cocos2d_Mat4_getScale); - oluacls_func(L, "getTranslation", _cocos2d_Mat4_getTranslation); - oluacls_func(L, "getTransposed", _cocos2d_Mat4_getTransposed); - oluacls_func(L, "getUpVector", _cocos2d_Mat4_getUpVector); - oluacls_func(L, "inverse", _cocos2d_Mat4_inverse); - oluacls_func(L, "isIdentity", _cocos2d_Mat4_isIdentity); - oluacls_func(L, "multiply", _cocos2d_Mat4_multiply); - oluacls_func(L, "negate", _cocos2d_Mat4_negate); - oluacls_func(L, "new", _cocos2d_Mat4_new); - oluacls_func(L, "rotate", _cocos2d_Mat4_rotate); - oluacls_func(L, "rotateX", _cocos2d_Mat4_rotateX); - oluacls_func(L, "rotateY", _cocos2d_Mat4_rotateY); - oluacls_func(L, "rotateZ", _cocos2d_Mat4_rotateZ); - oluacls_func(L, "scale", _cocos2d_Mat4_scale); - oluacls_func(L, "set", _cocos2d_Mat4_set); - oluacls_func(L, "setIdentity", _cocos2d_Mat4_setIdentity); - oluacls_func(L, "setZero", _cocos2d_Mat4_setZero); - oluacls_func(L, "subtract", _cocos2d_Mat4_subtract); - oluacls_func(L, "transform", _cocos2d_Mat4_transform); - oluacls_func(L, "transformPoint", _cocos2d_Mat4_transformPoint); - oluacls_func(L, "transformVector", _cocos2d_Mat4_transformVector); - oluacls_func(L, "translate", _cocos2d_Mat4_translate); - oluacls_func(L, "transpose", _cocos2d_Mat4_transpose); - oluacls_prop(L, "identity", _cocos2d_Mat4_isIdentity, _cocos2d_Mat4_setIdentity); - oluacls_prop(L, "inversed", _cocos2d_Mat4_getInversed, nullptr); - oluacls_prop(L, "negated", _cocos2d_Mat4_getNegated, nullptr); - oluacls_prop(L, "transposed", _cocos2d_Mat4_getTransposed, nullptr); + oluacls_func(L, "__add", _olua_fun_cocos2d_Mat4___add); + oluacls_func(L, "__gc", _olua_fun_cocos2d_Mat4___gc); + oluacls_func(L, "__mul", _olua_fun_cocos2d_Mat4___mul); + oluacls_func(L, "__olua_move", _olua_fun_cocos2d_Mat4___olua_move); + oluacls_func(L, "__sub", _olua_fun_cocos2d_Mat4___sub); + oluacls_func(L, "add", _olua_fun_cocos2d_Mat4_add); + oluacls_func(L, "createBillboard", _olua_fun_cocos2d_Mat4_createBillboard); + oluacls_func(L, "createLookAt", _olua_fun_cocos2d_Mat4_createLookAt); + oluacls_func(L, "createOrthographic", _olua_fun_cocos2d_Mat4_createOrthographic); + oluacls_func(L, "createOrthographicOffCenter", _olua_fun_cocos2d_Mat4_createOrthographicOffCenter); + oluacls_func(L, "createPerspective", _olua_fun_cocos2d_Mat4_createPerspective); + oluacls_func(L, "createRotation", _olua_fun_cocos2d_Mat4_createRotation); + oluacls_func(L, "createRotationX", _olua_fun_cocos2d_Mat4_createRotationX); + oluacls_func(L, "createRotationY", _olua_fun_cocos2d_Mat4_createRotationY); + oluacls_func(L, "createRotationZ", _olua_fun_cocos2d_Mat4_createRotationZ); + oluacls_func(L, "createScale", _olua_fun_cocos2d_Mat4_createScale); + oluacls_func(L, "createTranslation", _olua_fun_cocos2d_Mat4_createTranslation); + oluacls_func(L, "decompose", _olua_fun_cocos2d_Mat4_decompose); + oluacls_func(L, "determinant", _olua_fun_cocos2d_Mat4_determinant); + oluacls_func(L, "getBackVector", _olua_fun_cocos2d_Mat4_getBackVector); + oluacls_func(L, "getDownVector", _olua_fun_cocos2d_Mat4_getDownVector); + oluacls_func(L, "getForwardVector", _olua_fun_cocos2d_Mat4_getForwardVector); + oluacls_func(L, "getInversed", _olua_fun_cocos2d_Mat4_getInversed); + oluacls_func(L, "getLeftVector", _olua_fun_cocos2d_Mat4_getLeftVector); + oluacls_func(L, "getNegated", _olua_fun_cocos2d_Mat4_getNegated); + oluacls_func(L, "getRightVector", _olua_fun_cocos2d_Mat4_getRightVector); + oluacls_func(L, "getRotation", _olua_fun_cocos2d_Mat4_getRotation); + oluacls_func(L, "getScale", _olua_fun_cocos2d_Mat4_getScale); + oluacls_func(L, "getTranslation", _olua_fun_cocos2d_Mat4_getTranslation); + oluacls_func(L, "getTransposed", _olua_fun_cocos2d_Mat4_getTransposed); + oluacls_func(L, "getUpVector", _olua_fun_cocos2d_Mat4_getUpVector); + oluacls_func(L, "inverse", _olua_fun_cocos2d_Mat4_inverse); + oluacls_func(L, "isIdentity", _olua_fun_cocos2d_Mat4_isIdentity); + oluacls_func(L, "multiply", _olua_fun_cocos2d_Mat4_multiply); + oluacls_func(L, "negate", _olua_fun_cocos2d_Mat4_negate); + oluacls_func(L, "new", _olua_fun_cocos2d_Mat4_new); + oluacls_func(L, "rotate", _olua_fun_cocos2d_Mat4_rotate); + oluacls_func(L, "rotateX", _olua_fun_cocos2d_Mat4_rotateX); + oluacls_func(L, "rotateY", _olua_fun_cocos2d_Mat4_rotateY); + oluacls_func(L, "rotateZ", _olua_fun_cocos2d_Mat4_rotateZ); + oluacls_func(L, "scale", _olua_fun_cocos2d_Mat4_scale); + oluacls_func(L, "set", _olua_fun_cocos2d_Mat4_set); + oluacls_func(L, "setIdentity", _olua_fun_cocos2d_Mat4_setIdentity); + oluacls_func(L, "setZero", _olua_fun_cocos2d_Mat4_setZero); + oluacls_func(L, "subtract", _olua_fun_cocos2d_Mat4_subtract); + oluacls_func(L, "transform", _olua_fun_cocos2d_Mat4_transform); + oluacls_func(L, "transformPoint", _olua_fun_cocos2d_Mat4_transformPoint); + oluacls_func(L, "transformVector", _olua_fun_cocos2d_Mat4_transformVector); + oluacls_func(L, "translate", _olua_fun_cocos2d_Mat4_translate); + oluacls_func(L, "transpose", _olua_fun_cocos2d_Mat4_transpose); + oluacls_prop(L, "identity", _olua_fun_cocos2d_Mat4_isIdentity, _olua_fun_cocos2d_Mat4_setIdentity); + oluacls_prop(L, "inversed", _olua_fun_cocos2d_Mat4_getInversed, nullptr); + oluacls_prop(L, "negated", _olua_fun_cocos2d_Mat4_getNegated, nullptr); + oluacls_prop(L, "transposed", _olua_fun_cocos2d_Mat4_getTransposed, nullptr); oluacls_const(L, "IDENTITY", &cocos2d::Mat4::IDENTITY); oluacls_const(L, "ZERO", &cocos2d::Mat4::ZERO); return 1; } -OLUA_END_DECLS -static int _cocos2d_Viewport___call(lua_State *L) +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_Mat4(lua_State *L) { - olua_startinvoke(L); - - cocos2d::Viewport ret; - - luaL_checktype(L, 2, LUA_TTABLE); - - int arg1 = 0; /** x */ - int arg2 = 0; /** y */ - unsigned int arg3 = 0; /** w */ - unsigned int arg4 = 0; /** h */ - - olua_getfield(L, 2, "x"); - if (!olua_isnoneornil(L, -1)) { - olua_check_integer(L, -1, &arg1); - ret.x = arg1; - } - lua_pop(L, 1); - - olua_getfield(L, 2, "y"); - if (!olua_isnoneornil(L, -1)) { - olua_check_integer(L, -1, &arg2); - ret.y = arg2; - } - lua_pop(L, 1); - - olua_getfield(L, 2, "w"); - if (!olua_isnoneornil(L, -1)) { - olua_check_integer(L, -1, &arg3); - ret.w = arg3; - } - lua_pop(L, 1); - - olua_getfield(L, 2, "h"); - if (!olua_isnoneornil(L, -1)) { - olua_check_integer(L, -1, &arg4); - ret.h = arg4; + olua_require(L, "cocos2d_types", luaopen_cocos2d_types); + if (!olua_getclass(L, "cc.Mat4")) { + luaL_error(L, "class not found: cocos2d::Mat4"); } - lua_pop(L, 1); - - olua_pushcopy_object(L, ret, "cc.Viewport"); - - olua_endinvoke(L); - return 1; } +OLUA_END_DECLS -static int _cocos2d_Viewport___gc(lua_State *L) +static int _olua_fun_cocos2d_Viewport___gc(lua_State *L) { olua_startinvoke(L); @@ -7445,7 +7548,7 @@ static int _cocos2d_Viewport___gc(lua_State *L) return 0; } -static int _cocos2d_Viewport___olua_move(lua_State *L) +static int _olua_fun_cocos2d_Viewport___olua_move(lua_State *L) { olua_startinvoke(L); @@ -7457,7 +7560,7 @@ static int _cocos2d_Viewport___olua_move(lua_State *L) return 1; } -static int _cocos2d_Viewport_get_h(lua_State *L) +static int _olua_fun_cocos2d_Viewport_h$1(lua_State *L) { olua_startinvoke(L); @@ -7465,7 +7568,7 @@ static int _cocos2d_Viewport_get_h(lua_State *L) olua_to_object(L, 1, &self, "cc.Viewport"); - // @optional unsigned int h + // unsigned int h unsigned int ret = self->h; int num_ret = olua_push_integer(L, ret); @@ -7474,7 +7577,7 @@ static int _cocos2d_Viewport_get_h(lua_State *L) return num_ret; } -static int _cocos2d_Viewport_set_h(lua_State *L) +static int _olua_fun_cocos2d_Viewport_h$2(lua_State *L) { olua_startinvoke(L); @@ -7484,7 +7587,7 @@ static int _cocos2d_Viewport_set_h(lua_State *L) olua_to_object(L, 1, &self, "cc.Viewport"); olua_check_integer(L, 2, &arg1); - // @optional unsigned int h + // unsigned int h self->h = arg1; olua_endinvoke(L); @@ -7492,7 +7595,28 @@ static int _cocos2d_Viewport_set_h(lua_State *L) return 0; } -static int _cocos2d_Viewport_get_w(lua_State *L) +static int _olua_fun_cocos2d_Viewport_h(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // unsigned int h + return _olua_fun_cocos2d_Viewport_h$1(L); + } + + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // unsigned int h + return _olua_fun_cocos2d_Viewport_h$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::Viewport::h' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_Viewport_w$1(lua_State *L) { olua_startinvoke(L); @@ -7500,7 +7624,7 @@ static int _cocos2d_Viewport_get_w(lua_State *L) olua_to_object(L, 1, &self, "cc.Viewport"); - // @optional unsigned int w + // unsigned int w unsigned int ret = self->w; int num_ret = olua_push_integer(L, ret); @@ -7509,7 +7633,7 @@ static int _cocos2d_Viewport_get_w(lua_State *L) return num_ret; } -static int _cocos2d_Viewport_set_w(lua_State *L) +static int _olua_fun_cocos2d_Viewport_w$2(lua_State *L) { olua_startinvoke(L); @@ -7519,7 +7643,7 @@ static int _cocos2d_Viewport_set_w(lua_State *L) olua_to_object(L, 1, &self, "cc.Viewport"); olua_check_integer(L, 2, &arg1); - // @optional unsigned int w + // unsigned int w self->w = arg1; olua_endinvoke(L); @@ -7527,7 +7651,28 @@ static int _cocos2d_Viewport_set_w(lua_State *L) return 0; } -static int _cocos2d_Viewport_get_x(lua_State *L) +static int _olua_fun_cocos2d_Viewport_w(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // unsigned int w + return _olua_fun_cocos2d_Viewport_w$1(L); + } + + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // unsigned int w + return _olua_fun_cocos2d_Viewport_w$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::Viewport::w' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_Viewport_x$1(lua_State *L) { olua_startinvoke(L); @@ -7535,7 +7680,7 @@ static int _cocos2d_Viewport_get_x(lua_State *L) olua_to_object(L, 1, &self, "cc.Viewport"); - // @optional int x + // int x int ret = self->x; int num_ret = olua_push_integer(L, ret); @@ -7544,7 +7689,7 @@ static int _cocos2d_Viewport_get_x(lua_State *L) return num_ret; } -static int _cocos2d_Viewport_set_x(lua_State *L) +static int _olua_fun_cocos2d_Viewport_x$2(lua_State *L) { olua_startinvoke(L); @@ -7554,7 +7699,7 @@ static int _cocos2d_Viewport_set_x(lua_State *L) olua_to_object(L, 1, &self, "cc.Viewport"); olua_check_integer(L, 2, &arg1); - // @optional int x + // int x self->x = arg1; olua_endinvoke(L); @@ -7562,7 +7707,28 @@ static int _cocos2d_Viewport_set_x(lua_State *L) return 0; } -static int _cocos2d_Viewport_get_y(lua_State *L) +static int _olua_fun_cocos2d_Viewport_x(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // int x + return _olua_fun_cocos2d_Viewport_x$1(L); + } + + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // int x + return _olua_fun_cocos2d_Viewport_x$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::Viewport::x' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_Viewport_y$1(lua_State *L) { olua_startinvoke(L); @@ -7570,7 +7736,7 @@ static int _cocos2d_Viewport_get_y(lua_State *L) olua_to_object(L, 1, &self, "cc.Viewport"); - // @optional int y + // int y int ret = self->y; int num_ret = olua_push_integer(L, ret); @@ -7579,7 +7745,7 @@ static int _cocos2d_Viewport_get_y(lua_State *L) return num_ret; } -static int _cocos2d_Viewport_set_y(lua_State *L) +static int _olua_fun_cocos2d_Viewport_y$2(lua_State *L) { olua_startinvoke(L); @@ -7589,7 +7755,7 @@ static int _cocos2d_Viewport_set_y(lua_State *L) olua_to_object(L, 1, &self, "cc.Viewport"); olua_check_integer(L, 2, &arg1); - // @optional int y + // int y self->y = arg1; olua_endinvoke(L); @@ -7597,71 +7763,52 @@ static int _cocos2d_Viewport_set_y(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_Viewport(lua_State *L) -{ - oluacls_class(L, "cc.Viewport"); - oluacls_func(L, "__call", _cocos2d_Viewport___call); - oluacls_func(L, "__gc", _cocos2d_Viewport___gc); - oluacls_func(L, "__olua_move", _cocos2d_Viewport___olua_move); - oluacls_prop(L, "h", _cocos2d_Viewport_get_h, _cocos2d_Viewport_set_h); - oluacls_prop(L, "w", _cocos2d_Viewport_get_w, _cocos2d_Viewport_set_w); - oluacls_prop(L, "x", _cocos2d_Viewport_get_x, _cocos2d_Viewport_set_x); - oluacls_prop(L, "y", _cocos2d_Viewport_get_y, _cocos2d_Viewport_set_y); - - return 1; -} -OLUA_END_DECLS - -static int _cocos2d_ScissorRect___call(lua_State *L) +static int _olua_fun_cocos2d_Viewport_y(lua_State *L) { - olua_startinvoke(L); - - cocos2d::ScissorRect ret; - - luaL_checktype(L, 2, LUA_TTABLE); - - float arg1 = 0; /** x */ - float arg2 = 0; /** y */ - float arg3 = 0; /** width */ - float arg4 = 0; /** height */ + int num_args = lua_gettop(L) - 1; - olua_getfield(L, 2, "x"); - if (!olua_isnoneornil(L, -1)) { - olua_check_number(L, -1, &arg1); - ret.x = arg1; + if (num_args == 0) { + // int y + return _olua_fun_cocos2d_Viewport_y$1(L); } - lua_pop(L, 1); - olua_getfield(L, 2, "y"); - if (!olua_isnoneornil(L, -1)) { - olua_check_number(L, -1, &arg2); - ret.y = arg2; + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // int y + return _olua_fun_cocos2d_Viewport_y$2(L); + // } } - lua_pop(L, 1); - olua_getfield(L, 2, "width"); - if (!olua_isnoneornil(L, -1)) { - olua_check_number(L, -1, &arg3); - ret.width = arg3; - } - lua_pop(L, 1); + luaL_error(L, "method 'cocos2d::Viewport::y' not support '%d' arguments", num_args); - olua_getfield(L, 2, "height"); - if (!olua_isnoneornil(L, -1)) { - olua_check_number(L, -1, &arg4); - ret.height = arg4; - } - lua_pop(L, 1); + return 0; +} - olua_pushcopy_object(L, ret, "cc.ScissorRect"); +static int _olua_cls_cc_Viewport(lua_State *L) +{ + oluacls_class(L, "cc.Viewport"); + oluacls_func(L, "__gc", _olua_fun_cocos2d_Viewport___gc); + oluacls_func(L, "__olua_move", _olua_fun_cocos2d_Viewport___olua_move); + oluacls_prop(L, "h", _olua_fun_cocos2d_Viewport_h, _olua_fun_cocos2d_Viewport_h); + oluacls_prop(L, "w", _olua_fun_cocos2d_Viewport_w, _olua_fun_cocos2d_Viewport_w); + oluacls_prop(L, "x", _olua_fun_cocos2d_Viewport_x, _olua_fun_cocos2d_Viewport_x); + oluacls_prop(L, "y", _olua_fun_cocos2d_Viewport_y, _olua_fun_cocos2d_Viewport_y); - olua_endinvoke(L); + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_Viewport(lua_State *L) +{ + olua_require(L, "cocos2d_types", luaopen_cocos2d_types); + if (!olua_getclass(L, "cc.Viewport")) { + luaL_error(L, "class not found: cocos2d::Viewport"); + } return 1; } +OLUA_END_DECLS -static int _cocos2d_ScissorRect___gc(lua_State *L) +static int _olua_fun_cocos2d_ScissorRect___gc(lua_State *L) { olua_startinvoke(L); @@ -7673,7 +7820,7 @@ static int _cocos2d_ScissorRect___gc(lua_State *L) return 0; } -static int _cocos2d_ScissorRect___olua_move(lua_State *L) +static int _olua_fun_cocos2d_ScissorRect___olua_move(lua_State *L) { olua_startinvoke(L); @@ -7685,7 +7832,7 @@ static int _cocos2d_ScissorRect___olua_move(lua_State *L) return 1; } -static int _cocos2d_ScissorRect_get_height(lua_State *L) +static int _olua_fun_cocos2d_ScissorRect_height$1(lua_State *L) { olua_startinvoke(L); @@ -7693,7 +7840,7 @@ static int _cocos2d_ScissorRect_get_height(lua_State *L) olua_to_object(L, 1, &self, "cc.ScissorRect"); - // @optional float height + // float height float ret = self->height; int num_ret = olua_push_number(L, ret); @@ -7702,7 +7849,7 @@ static int _cocos2d_ScissorRect_get_height(lua_State *L) return num_ret; } -static int _cocos2d_ScissorRect_set_height(lua_State *L) +static int _olua_fun_cocos2d_ScissorRect_height$2(lua_State *L) { olua_startinvoke(L); @@ -7712,7 +7859,7 @@ static int _cocos2d_ScissorRect_set_height(lua_State *L) olua_to_object(L, 1, &self, "cc.ScissorRect"); olua_check_number(L, 2, &arg1); - // @optional float height + // float height self->height = arg1; olua_endinvoke(L); @@ -7720,7 +7867,28 @@ static int _cocos2d_ScissorRect_set_height(lua_State *L) return 0; } -static int _cocos2d_ScissorRect_get_width(lua_State *L) +static int _olua_fun_cocos2d_ScissorRect_height(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float height + return _olua_fun_cocos2d_ScissorRect_height$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float height + return _olua_fun_cocos2d_ScissorRect_height$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::ScissorRect::height' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_ScissorRect_width$1(lua_State *L) { olua_startinvoke(L); @@ -7728,7 +7896,7 @@ static int _cocos2d_ScissorRect_get_width(lua_State *L) olua_to_object(L, 1, &self, "cc.ScissorRect"); - // @optional float width + // float width float ret = self->width; int num_ret = olua_push_number(L, ret); @@ -7737,7 +7905,7 @@ static int _cocos2d_ScissorRect_get_width(lua_State *L) return num_ret; } -static int _cocos2d_ScissorRect_set_width(lua_State *L) +static int _olua_fun_cocos2d_ScissorRect_width$2(lua_State *L) { olua_startinvoke(L); @@ -7747,7 +7915,7 @@ static int _cocos2d_ScissorRect_set_width(lua_State *L) olua_to_object(L, 1, &self, "cc.ScissorRect"); olua_check_number(L, 2, &arg1); - // @optional float width + // float width self->width = arg1; olua_endinvoke(L); @@ -7755,15 +7923,36 @@ static int _cocos2d_ScissorRect_set_width(lua_State *L) return 0; } -static int _cocos2d_ScissorRect_get_x(lua_State *L) +static int _olua_fun_cocos2d_ScissorRect_width(lua_State *L) { - olua_startinvoke(L); + int num_args = lua_gettop(L) - 1; - cocos2d::ScissorRect *self = nullptr; + if (num_args == 0) { + // float width + return _olua_fun_cocos2d_ScissorRect_width$1(L); + } - olua_to_object(L, 1, &self, "cc.ScissorRect"); + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float width + return _olua_fun_cocos2d_ScissorRect_width$2(L); + // } + } - // @optional float x + luaL_error(L, "method 'cocos2d::ScissorRect::width' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_ScissorRect_x$1(lua_State *L) +{ + olua_startinvoke(L); + + cocos2d::ScissorRect *self = nullptr; + + olua_to_object(L, 1, &self, "cc.ScissorRect"); + + // float x float ret = self->x; int num_ret = olua_push_number(L, ret); @@ -7772,7 +7961,7 @@ static int _cocos2d_ScissorRect_get_x(lua_State *L) return num_ret; } -static int _cocos2d_ScissorRect_set_x(lua_State *L) +static int _olua_fun_cocos2d_ScissorRect_x$2(lua_State *L) { olua_startinvoke(L); @@ -7782,7 +7971,7 @@ static int _cocos2d_ScissorRect_set_x(lua_State *L) olua_to_object(L, 1, &self, "cc.ScissorRect"); olua_check_number(L, 2, &arg1); - // @optional float x + // float x self->x = arg1; olua_endinvoke(L); @@ -7790,7 +7979,28 @@ static int _cocos2d_ScissorRect_set_x(lua_State *L) return 0; } -static int _cocos2d_ScissorRect_get_y(lua_State *L) +static int _olua_fun_cocos2d_ScissorRect_x(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float x + return _olua_fun_cocos2d_ScissorRect_x$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float x + return _olua_fun_cocos2d_ScissorRect_x$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::ScissorRect::x' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_ScissorRect_y$1(lua_State *L) { olua_startinvoke(L); @@ -7798,7 +8008,7 @@ static int _cocos2d_ScissorRect_get_y(lua_State *L) olua_to_object(L, 1, &self, "cc.ScissorRect"); - // @optional float y + // float y float ret = self->y; int num_ret = olua_push_number(L, ret); @@ -7807,7 +8017,7 @@ static int _cocos2d_ScissorRect_get_y(lua_State *L) return num_ret; } -static int _cocos2d_ScissorRect_set_y(lua_State *L) +static int _olua_fun_cocos2d_ScissorRect_y$2(lua_State *L) { olua_startinvoke(L); @@ -7817,7 +8027,7 @@ static int _cocos2d_ScissorRect_set_y(lua_State *L) olua_to_object(L, 1, &self, "cc.ScissorRect"); olua_check_number(L, 2, &arg1); - // @optional float y + // float y self->y = arg1; olua_endinvoke(L); @@ -7825,63 +8035,52 @@ static int _cocos2d_ScissorRect_set_y(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ScissorRect(lua_State *L) -{ - oluacls_class(L, "cc.ScissorRect"); - oluacls_func(L, "__call", _cocos2d_ScissorRect___call); - oluacls_func(L, "__gc", _cocos2d_ScissorRect___gc); - oluacls_func(L, "__olua_move", _cocos2d_ScissorRect___olua_move); - oluacls_prop(L, "height", _cocos2d_ScissorRect_get_height, _cocos2d_ScissorRect_set_height); - oluacls_prop(L, "width", _cocos2d_ScissorRect_get_width, _cocos2d_ScissorRect_set_width); - oluacls_prop(L, "x", _cocos2d_ScissorRect_get_x, _cocos2d_ScissorRect_set_x); - oluacls_prop(L, "y", _cocos2d_ScissorRect_get_y, _cocos2d_ScissorRect_set_y); - - return 1; -} -OLUA_END_DECLS - -static int _cocos2d_Quaternion___call(lua_State *L) +static int _olua_fun_cocos2d_ScissorRect_y(lua_State *L) { - olua_startinvoke(L); - - cocos2d::Quaternion ret; - - luaL_checktype(L, 2, LUA_TTABLE); - - float arg1 = 0; /** x */ - float arg2 = 0; /** y */ - float arg3 = 0; /** z */ - float arg4 = 0; /** w */ + int num_args = lua_gettop(L) - 1; - olua_getfield(L, 2, "x"); - olua_check_number(L, -1, &arg1); - ret.x = arg1; - lua_pop(L, 1); + if (num_args == 0) { + // float y + return _olua_fun_cocos2d_ScissorRect_y$1(L); + } - olua_getfield(L, 2, "y"); - olua_check_number(L, -1, &arg2); - ret.y = arg2; - lua_pop(L, 1); + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float y + return _olua_fun_cocos2d_ScissorRect_y$2(L); + // } + } - olua_getfield(L, 2, "z"); - olua_check_number(L, -1, &arg3); - ret.z = arg3; - lua_pop(L, 1); + luaL_error(L, "method 'cocos2d::ScissorRect::y' not support '%d' arguments", num_args); - olua_getfield(L, 2, "w"); - olua_check_number(L, -1, &arg4); - ret.w = arg4; - lua_pop(L, 1); + return 0; +} - olua_pushcopy_object(L, ret, "cc.Quaternion"); +static int _olua_cls_cc_ScissorRect(lua_State *L) +{ + oluacls_class(L, "cc.ScissorRect"); + oluacls_func(L, "__gc", _olua_fun_cocos2d_ScissorRect___gc); + oluacls_func(L, "__olua_move", _olua_fun_cocos2d_ScissorRect___olua_move); + oluacls_prop(L, "height", _olua_fun_cocos2d_ScissorRect_height, _olua_fun_cocos2d_ScissorRect_height); + oluacls_prop(L, "width", _olua_fun_cocos2d_ScissorRect_width, _olua_fun_cocos2d_ScissorRect_width); + oluacls_prop(L, "x", _olua_fun_cocos2d_ScissorRect_x, _olua_fun_cocos2d_ScissorRect_x); + oluacls_prop(L, "y", _olua_fun_cocos2d_ScissorRect_y, _olua_fun_cocos2d_ScissorRect_y); - olua_endinvoke(L); + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_ScissorRect(lua_State *L) +{ + olua_require(L, "cocos2d_types", luaopen_cocos2d_types); + if (!olua_getclass(L, "cc.ScissorRect")) { + luaL_error(L, "class not found: cocos2d::ScissorRect"); + } return 1; } +OLUA_END_DECLS -static int _cocos2d_Quaternion___gc(lua_State *L) +static int _olua_fun_cocos2d_Quaternion___gc(lua_State *L) { olua_startinvoke(L); @@ -7893,7 +8092,7 @@ static int _cocos2d_Quaternion___gc(lua_State *L) return 0; } -static int _cocos2d_Quaternion___olua_move(lua_State *L) +static int _olua_fun_cocos2d_Quaternion___olua_move(lua_State *L) { olua_startinvoke(L); @@ -7905,7 +8104,7 @@ static int _cocos2d_Quaternion___olua_move(lua_State *L) return 1; } -static int _cocos2d_Quaternion_conjugate(lua_State *L) +static int _olua_fun_cocos2d_Quaternion_conjugate(lua_State *L) { olua_startinvoke(L); @@ -7921,11 +8120,11 @@ static int _cocos2d_Quaternion_conjugate(lua_State *L) return 0; } -static int _cocos2d_Quaternion_createFromAxisAngle(lua_State *L) +static int _olua_fun_cocos2d_Quaternion_createFromAxisAngle(lua_State *L) { olua_startinvoke(L); - cocos2d::Vec3 arg1; /** axis */ + cocos2d::Vec3 *arg1; /** axis */ float arg2 = 0; /** angle */ cocos2d::Quaternion *arg3 = nullptr; /** dst */ @@ -7934,32 +8133,32 @@ static int _cocos2d_Quaternion_createFromAxisAngle(lua_State *L) olua_check_object(L, 3, &arg3, "cc.Quaternion"); // static void createFromAxisAngle(const cocos2d::Vec3 &axis, float angle, cocos2d::Quaternion *dst) - cocos2d::Quaternion::createFromAxisAngle(arg1, arg2, arg3); + cocos2d::Quaternion::createFromAxisAngle(*arg1, arg2, arg3); olua_endinvoke(L); return 0; } -static int _cocos2d_Quaternion_createFromRotationMatrix(lua_State *L) +static int _olua_fun_cocos2d_Quaternion_createFromRotationMatrix(lua_State *L) { olua_startinvoke(L); - cocos2d::Mat4 arg1; /** m */ + cocos2d::Mat4 *arg1; /** m */ cocos2d::Quaternion *arg2 = nullptr; /** dst */ olua_check_object(L, 1, &arg1, "cc.Mat4"); olua_check_object(L, 2, &arg2, "cc.Quaternion"); // static void createFromRotationMatrix(const cocos2d::Mat4 &m, cocos2d::Quaternion *dst) - cocos2d::Quaternion::createFromRotationMatrix(arg1, arg2); + cocos2d::Quaternion::createFromRotationMatrix(*arg1, arg2); olua_endinvoke(L); return 0; } -static int _cocos2d_Quaternion_getConjugated(lua_State *L) +static int _olua_fun_cocos2d_Quaternion_getConjugated(lua_State *L) { olua_startinvoke(L); @@ -7969,14 +8168,14 @@ static int _cocos2d_Quaternion_getConjugated(lua_State *L) // cocos2d::Quaternion getConjugated() cocos2d::Quaternion ret = self->getConjugated(); - int num_ret = olua_pushcopy_object(L, ret, "cc.Quaternion"); + int num_ret = olua_copy_object(L, ret, "cc.Quaternion"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_Quaternion_getInversed(lua_State *L) +static int _olua_fun_cocos2d_Quaternion_getInversed(lua_State *L) { olua_startinvoke(L); @@ -7986,14 +8185,14 @@ static int _cocos2d_Quaternion_getInversed(lua_State *L) // cocos2d::Quaternion getInversed() cocos2d::Quaternion ret = self->getInversed(); - int num_ret = olua_pushcopy_object(L, ret, "cc.Quaternion"); + int num_ret = olua_copy_object(L, ret, "cc.Quaternion"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_Quaternion_getNormalized(lua_State *L) +static int _olua_fun_cocos2d_Quaternion_getNormalized(lua_State *L) { olua_startinvoke(L); @@ -8003,14 +8202,14 @@ static int _cocos2d_Quaternion_getNormalized(lua_State *L) // cocos2d::Quaternion getNormalized() cocos2d::Quaternion ret = self->getNormalized(); - int num_ret = olua_pushcopy_object(L, ret, "cc.Quaternion"); + int num_ret = olua_copy_object(L, ret, "cc.Quaternion"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_Quaternion_identity(lua_State *L) +static int _olua_fun_cocos2d_Quaternion_identity(lua_State *L) { olua_startinvoke(L); @@ -8023,7 +8222,7 @@ static int _cocos2d_Quaternion_identity(lua_State *L) return num_ret; } -static int _cocos2d_Quaternion_inverse(lua_State *L) +static int _olua_fun_cocos2d_Quaternion_inverse(lua_State *L) { olua_startinvoke(L); @@ -8040,7 +8239,7 @@ static int _cocos2d_Quaternion_inverse(lua_State *L) return num_ret; } -static int _cocos2d_Quaternion_isIdentity(lua_State *L) +static int _olua_fun_cocos2d_Quaternion_isIdentity(lua_State *L) { olua_startinvoke(L); @@ -8057,7 +8256,7 @@ static int _cocos2d_Quaternion_isIdentity(lua_State *L) return num_ret; } -static int _cocos2d_Quaternion_isZero(lua_State *L) +static int _olua_fun_cocos2d_Quaternion_isZero(lua_State *L) { olua_startinvoke(L); @@ -8074,12 +8273,12 @@ static int _cocos2d_Quaternion_isZero(lua_State *L) return num_ret; } -static int _cocos2d_Quaternion_lerp(lua_State *L) +static int _olua_fun_cocos2d_Quaternion_lerp(lua_State *L) { olua_startinvoke(L); - cocos2d::Quaternion arg1; /** q1 */ - cocos2d::Quaternion arg2; /** q2 */ + cocos2d::Quaternion *arg1; /** q1 */ + cocos2d::Quaternion *arg2; /** q2 */ float arg3 = 0; /** t */ cocos2d::Quaternion *arg4 = nullptr; /** dst */ @@ -8089,37 +8288,37 @@ static int _cocos2d_Quaternion_lerp(lua_State *L) olua_check_object(L, 4, &arg4, "cc.Quaternion"); // static void lerp(const cocos2d::Quaternion &q1, const cocos2d::Quaternion &q2, float t, cocos2d::Quaternion *dst) - cocos2d::Quaternion::lerp(arg1, arg2, arg3, arg4); + cocos2d::Quaternion::lerp(*arg1, *arg2, arg3, arg4); olua_endinvoke(L); return 0; } -static int _cocos2d_Quaternion_multiply$1(lua_State *L) +static int _olua_fun_cocos2d_Quaternion_multiply$1(lua_State *L) { olua_startinvoke(L); cocos2d::Quaternion *self = nullptr; - cocos2d::Quaternion arg1; /** q */ + cocos2d::Quaternion *arg1; /** q */ olua_to_object(L, 1, &self, "cc.Quaternion"); olua_check_object(L, 2, &arg1, "cc.Quaternion"); // void multiply(const cocos2d::Quaternion &q) - self->multiply(arg1); + self->multiply(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_Quaternion_multiply$2(lua_State *L) +static int _olua_fun_cocos2d_Quaternion_multiply$2(lua_State *L) { olua_startinvoke(L); - cocos2d::Quaternion arg1; /** q1 */ - cocos2d::Quaternion arg2; /** q2 */ + cocos2d::Quaternion *arg1; /** q1 */ + cocos2d::Quaternion *arg2; /** q2 */ cocos2d::Quaternion *arg3 = nullptr; /** dst */ olua_check_object(L, 1, &arg1, "cc.Quaternion"); @@ -8127,28 +8326,28 @@ static int _cocos2d_Quaternion_multiply$2(lua_State *L) olua_check_object(L, 3, &arg3, "cc.Quaternion"); // static void multiply(const cocos2d::Quaternion &q1, const cocos2d::Quaternion &q2, cocos2d::Quaternion *dst) - cocos2d::Quaternion::multiply(arg1, arg2, arg3); + cocos2d::Quaternion::multiply(*arg1, *arg2, arg3); olua_endinvoke(L); return 0; } -static int _cocos2d_Quaternion_multiply(lua_State *L) +static int _olua_fun_cocos2d_Quaternion_multiply(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_object(L, 2, "cc.Quaternion"))) { // void multiply(const cocos2d::Quaternion &q) - return _cocos2d_Quaternion_multiply$1(L); + return _olua_fun_cocos2d_Quaternion_multiply$1(L); // } } if (num_args == 3) { // if ((olua_is_object(L, 1, "cc.Quaternion")) && (olua_is_object(L, 2, "cc.Quaternion")) && (olua_is_object(L, 3, "cc.Quaternion"))) { // static void multiply(const cocos2d::Quaternion &q1, const cocos2d::Quaternion &q2, cocos2d::Quaternion *dst) - return _cocos2d_Quaternion_multiply$2(L); + return _olua_fun_cocos2d_Quaternion_multiply$2(L); // } } @@ -8157,11 +8356,11 @@ static int _cocos2d_Quaternion_multiply(lua_State *L) return 0; } -static int _cocos2d_Quaternion_new$1(lua_State *L) +static int _olua_fun_cocos2d_Quaternion_new$1(lua_State *L) { olua_startinvoke(L); - // Quaternion() + // cocos2d::Quaternion() cocos2d::Quaternion *ret = new cocos2d::Quaternion(); int num_ret = olua_push_object(L, ret, "cc.Quaternion"); olua_postnew(L, ret); @@ -8171,7 +8370,7 @@ static int _cocos2d_Quaternion_new$1(lua_State *L) return num_ret; } -static int _cocos2d_Quaternion_new$2(lua_State *L) +static int _olua_fun_cocos2d_Quaternion_new$2(lua_State *L) { olua_startinvoke(L); @@ -8185,7 +8384,7 @@ static int _cocos2d_Quaternion_new$2(lua_State *L) olua_check_number(L, 3, &arg3); olua_check_number(L, 4, &arg4); - // Quaternion(float xx, float yy, float zz, float ww) + // cocos2d::Quaternion(float xx, float yy, float zz, float ww) cocos2d::Quaternion *ret = new cocos2d::Quaternion(arg1, arg2, arg3, arg4); int num_ret = olua_push_object(L, ret, "cc.Quaternion"); olua_postnew(L, ret); @@ -8195,15 +8394,15 @@ static int _cocos2d_Quaternion_new$2(lua_State *L) return num_ret; } -static int _cocos2d_Quaternion_new$3(lua_State *L) +static int _olua_fun_cocos2d_Quaternion_new$3(lua_State *L) { olua_startinvoke(L); float *arg1 = nullptr; /** array */ - olua_check_pointer(L, 1, &arg1, "olua.float"); + olua_check_valueptr(L, 1, &arg1, "olua.float"); - // Quaternion(float *array) + // cocos2d::Quaternion(float *array) cocos2d::Quaternion *ret = new cocos2d::Quaternion(arg1); int num_ret = olua_push_object(L, ret, "cc.Quaternion"); olua_postnew(L, ret); @@ -8213,16 +8412,16 @@ static int _cocos2d_Quaternion_new$3(lua_State *L) return num_ret; } -static int _cocos2d_Quaternion_new$4(lua_State *L) +static int _olua_fun_cocos2d_Quaternion_new$4(lua_State *L) { olua_startinvoke(L); - cocos2d::Mat4 arg1; /** m */ + cocos2d::Mat4 *arg1; /** m */ olua_check_object(L, 1, &arg1, "cc.Mat4"); - // Quaternion(const cocos2d::Mat4 &m) - cocos2d::Quaternion *ret = new cocos2d::Quaternion(arg1); + // cocos2d::Quaternion(const cocos2d::Mat4 &m) + cocos2d::Quaternion *ret = new cocos2d::Quaternion(*arg1); int num_ret = olua_push_object(L, ret, "cc.Quaternion"); olua_postnew(L, ret); @@ -8231,18 +8430,18 @@ static int _cocos2d_Quaternion_new$4(lua_State *L) return num_ret; } -static int _cocos2d_Quaternion_new$5(lua_State *L) +static int _olua_fun_cocos2d_Quaternion_new$5(lua_State *L) { olua_startinvoke(L); - cocos2d::Vec3 arg1; /** axis */ + cocos2d::Vec3 *arg1; /** axis */ float arg2 = 0; /** angle */ olua_check_object(L, 1, &arg1, "cc.Vec3"); olua_check_number(L, 2, &arg2); - // Quaternion(const cocos2d::Vec3 &axis, float angle) - cocos2d::Quaternion *ret = new cocos2d::Quaternion(arg1, arg2); + // cocos2d::Quaternion(const cocos2d::Vec3 &axis, float angle) + cocos2d::Quaternion *ret = new cocos2d::Quaternion(*arg1, arg2); int num_ret = olua_push_object(L, ret, "cc.Quaternion"); olua_postnew(L, ret); @@ -8251,38 +8450,38 @@ static int _cocos2d_Quaternion_new$5(lua_State *L) return num_ret; } -static int _cocos2d_Quaternion_new(lua_State *L) +static int _olua_fun_cocos2d_Quaternion_new(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 0) { - // Quaternion() - return _cocos2d_Quaternion_new$1(L); + // cocos2d::Quaternion() + return _olua_fun_cocos2d_Quaternion_new$1(L); } if (num_args == 1) { - if ((olua_is_pointer(L, 1, "olua.float"))) { - // Quaternion(float *array) - return _cocos2d_Quaternion_new$3(L); + if ((olua_is_valueptr(L, 1, "olua.float"))) { + // cocos2d::Quaternion(float *array) + return _olua_fun_cocos2d_Quaternion_new$3(L); } // if ((olua_is_object(L, 1, "cc.Mat4"))) { - // Quaternion(const cocos2d::Mat4 &m) - return _cocos2d_Quaternion_new$4(L); + // cocos2d::Quaternion(const cocos2d::Mat4 &m) + return _olua_fun_cocos2d_Quaternion_new$4(L); // } } if (num_args == 2) { // if ((olua_is_object(L, 1, "cc.Vec3")) && (olua_is_number(L, 2))) { - // Quaternion(const cocos2d::Vec3 &axis, float angle) - return _cocos2d_Quaternion_new$5(L); + // cocos2d::Quaternion(const cocos2d::Vec3 &axis, float angle) + return _olua_fun_cocos2d_Quaternion_new$5(L); // } } if (num_args == 4) { // if ((olua_is_number(L, 1)) && (olua_is_number(L, 2)) && (olua_is_number(L, 3)) && (olua_is_number(L, 4))) { - // Quaternion(float xx, float yy, float zz, float ww) - return _cocos2d_Quaternion_new$2(L); + // cocos2d::Quaternion(float xx, float yy, float zz, float ww) + return _olua_fun_cocos2d_Quaternion_new$2(L); // } } @@ -8291,7 +8490,7 @@ static int _cocos2d_Quaternion_new(lua_State *L) return 0; } -static int _cocos2d_Quaternion_normalize(lua_State *L) +static int _olua_fun_cocos2d_Quaternion_normalize(lua_State *L) { olua_startinvoke(L); @@ -8307,7 +8506,7 @@ static int _cocos2d_Quaternion_normalize(lua_State *L) return 0; } -static int _cocos2d_Quaternion_set$1(lua_State *L) +static int _olua_fun_cocos2d_Quaternion_set$1(lua_State *L) { olua_startinvoke(L); @@ -8331,7 +8530,7 @@ static int _cocos2d_Quaternion_set$1(lua_State *L) return 0; } -static int _cocos2d_Quaternion_set$2(lua_State *L) +static int _olua_fun_cocos2d_Quaternion_set$2(lua_State *L) { olua_startinvoke(L); @@ -8339,7 +8538,7 @@ static int _cocos2d_Quaternion_set$2(lua_State *L) float *arg1 = nullptr; /** array */ olua_to_object(L, 1, &self, "cc.Quaternion"); - olua_check_pointer(L, 2, &arg1, "olua.float"); + olua_check_valueptr(L, 2, &arg1, "olua.float"); // void set(float *array) self->set(arg1); @@ -8349,30 +8548,30 @@ static int _cocos2d_Quaternion_set$2(lua_State *L) return 0; } -static int _cocos2d_Quaternion_set$3(lua_State *L) +static int _olua_fun_cocos2d_Quaternion_set$3(lua_State *L) { olua_startinvoke(L); cocos2d::Quaternion *self = nullptr; - cocos2d::Mat4 arg1; /** m */ + cocos2d::Mat4 *arg1; /** m */ olua_to_object(L, 1, &self, "cc.Quaternion"); olua_check_object(L, 2, &arg1, "cc.Mat4"); // void set(const cocos2d::Mat4 &m) - self->set(arg1); + self->set(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_Quaternion_set$4(lua_State *L) +static int _olua_fun_cocos2d_Quaternion_set$4(lua_State *L) { olua_startinvoke(L); cocos2d::Quaternion *self = nullptr; - cocos2d::Vec3 arg1; /** axis */ + cocos2d::Vec3 *arg1; /** axis */ float arg2 = 0; /** angle */ olua_to_object(L, 1, &self, "cc.Quaternion"); @@ -8380,63 +8579,63 @@ static int _cocos2d_Quaternion_set$4(lua_State *L) olua_check_number(L, 3, &arg2); // void set(const cocos2d::Vec3 &axis, float angle) - self->set(arg1, arg2); + self->set(*arg1, arg2); olua_endinvoke(L); return 0; } -static int _cocos2d_Quaternion_set$5(lua_State *L) +static int _olua_fun_cocos2d_Quaternion_set$5(lua_State *L) { olua_startinvoke(L); cocos2d::Quaternion *self = nullptr; - cocos2d::Quaternion arg1; /** q */ + cocos2d::Quaternion *arg1; /** q */ olua_to_object(L, 1, &self, "cc.Quaternion"); olua_check_object(L, 2, &arg1, "cc.Quaternion"); // void set(const cocos2d::Quaternion &q) - self->set(arg1); + self->set(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_Quaternion_set(lua_State *L) +static int _olua_fun_cocos2d_Quaternion_set(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { - if ((olua_is_pointer(L, 2, "olua.float"))) { + if ((olua_is_valueptr(L, 2, "olua.float"))) { // void set(float *array) - return _cocos2d_Quaternion_set$2(L); + return _olua_fun_cocos2d_Quaternion_set$2(L); } if ((olua_is_object(L, 2, "cc.Mat4"))) { // void set(const cocos2d::Mat4 &m) - return _cocos2d_Quaternion_set$3(L); + return _olua_fun_cocos2d_Quaternion_set$3(L); } // if ((olua_is_object(L, 2, "cc.Quaternion"))) { // void set(const cocos2d::Quaternion &q) - return _cocos2d_Quaternion_set$5(L); + return _olua_fun_cocos2d_Quaternion_set$5(L); // } } if (num_args == 2) { // if ((olua_is_object(L, 2, "cc.Vec3")) && (olua_is_number(L, 3))) { // void set(const cocos2d::Vec3 &axis, float angle) - return _cocos2d_Quaternion_set$4(L); + return _olua_fun_cocos2d_Quaternion_set$4(L); // } } if (num_args == 4) { // if ((olua_is_number(L, 2)) && (olua_is_number(L, 3)) && (olua_is_number(L, 4)) && (olua_is_number(L, 5))) { // void set(float xx, float yy, float zz, float ww) - return _cocos2d_Quaternion_set$1(L); + return _olua_fun_cocos2d_Quaternion_set$1(L); // } } @@ -8445,7 +8644,7 @@ static int _cocos2d_Quaternion_set(lua_State *L) return 0; } -static int _cocos2d_Quaternion_setIdentity(lua_State *L) +static int _olua_fun_cocos2d_Quaternion_setIdentity(lua_State *L) { olua_startinvoke(L); @@ -8461,12 +8660,12 @@ static int _cocos2d_Quaternion_setIdentity(lua_State *L) return 0; } -static int _cocos2d_Quaternion_slerp(lua_State *L) +static int _olua_fun_cocos2d_Quaternion_slerp(lua_State *L) { olua_startinvoke(L); - cocos2d::Quaternion arg1; /** q1 */ - cocos2d::Quaternion arg2; /** q2 */ + cocos2d::Quaternion *arg1; /** q1 */ + cocos2d::Quaternion *arg2; /** q2 */ float arg3 = 0; /** t */ cocos2d::Quaternion *arg4 = nullptr; /** dst */ @@ -8476,21 +8675,21 @@ static int _cocos2d_Quaternion_slerp(lua_State *L) olua_check_object(L, 4, &arg4, "cc.Quaternion"); // static void slerp(const cocos2d::Quaternion &q1, const cocos2d::Quaternion &q2, float t, cocos2d::Quaternion *dst) - cocos2d::Quaternion::slerp(arg1, arg2, arg3, arg4); + cocos2d::Quaternion::slerp(*arg1, *arg2, arg3, arg4); olua_endinvoke(L); return 0; } -static int _cocos2d_Quaternion_squad(lua_State *L) +static int _olua_fun_cocos2d_Quaternion_squad(lua_State *L) { olua_startinvoke(L); - cocos2d::Quaternion arg1; /** q1 */ - cocos2d::Quaternion arg2; /** q2 */ - cocos2d::Quaternion arg3; /** s1 */ - cocos2d::Quaternion arg4; /** s2 */ + cocos2d::Quaternion *arg1; /** q1 */ + cocos2d::Quaternion *arg2; /** q2 */ + cocos2d::Quaternion *arg3; /** s1 */ + cocos2d::Quaternion *arg4; /** s2 */ float arg5 = 0; /** t */ cocos2d::Quaternion *arg6 = nullptr; /** dst */ @@ -8502,14 +8701,14 @@ static int _cocos2d_Quaternion_squad(lua_State *L) olua_check_object(L, 6, &arg6, "cc.Quaternion"); // static void squad(const cocos2d::Quaternion &q1, const cocos2d::Quaternion &q2, const cocos2d::Quaternion &s1, const cocos2d::Quaternion &s2, float t, cocos2d::Quaternion *dst) - cocos2d::Quaternion::squad(arg1, arg2, arg3, arg4, arg5, arg6); + cocos2d::Quaternion::squad(*arg1, *arg2, *arg3, *arg4, arg5, arg6); olua_endinvoke(L); return 0; } -static int _cocos2d_Quaternion_toAxisAngle(lua_State *L) +static int _olua_fun_cocos2d_Quaternion_toAxisAngle(lua_State *L) { olua_startinvoke(L); @@ -8528,20 +8727,7 @@ static int _cocos2d_Quaternion_toAxisAngle(lua_State *L) return num_ret; } -static int _cocos2d_Quaternion_zero(lua_State *L) -{ - olua_startinvoke(L); - - // static const cocos2d::Quaternion &zero() - const cocos2d::Quaternion &ret = cocos2d::Quaternion::zero(); - int num_ret = olua_push_object(L, ret, "cc.Quaternion"); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_Quaternion_get_w(lua_State *L) +static int _olua_fun_cocos2d_Quaternion_w$1(lua_State *L) { olua_startinvoke(L); @@ -8558,7 +8744,7 @@ static int _cocos2d_Quaternion_get_w(lua_State *L) return num_ret; } -static int _cocos2d_Quaternion_set_w(lua_State *L) +static int _olua_fun_cocos2d_Quaternion_w$2(lua_State *L) { olua_startinvoke(L); @@ -8576,7 +8762,28 @@ static int _cocos2d_Quaternion_set_w(lua_State *L) return 0; } -static int _cocos2d_Quaternion_get_x(lua_State *L) +static int _olua_fun_cocos2d_Quaternion_w(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float w + return _olua_fun_cocos2d_Quaternion_w$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float w + return _olua_fun_cocos2d_Quaternion_w$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::Quaternion::w' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_Quaternion_x$1(lua_State *L) { olua_startinvoke(L); @@ -8593,7 +8800,7 @@ static int _cocos2d_Quaternion_get_x(lua_State *L) return num_ret; } -static int _cocos2d_Quaternion_set_x(lua_State *L) +static int _olua_fun_cocos2d_Quaternion_x$2(lua_State *L) { olua_startinvoke(L); @@ -8611,7 +8818,28 @@ static int _cocos2d_Quaternion_set_x(lua_State *L) return 0; } -static int _cocos2d_Quaternion_get_y(lua_State *L) +static int _olua_fun_cocos2d_Quaternion_x(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float x + return _olua_fun_cocos2d_Quaternion_x$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float x + return _olua_fun_cocos2d_Quaternion_x$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::Quaternion::x' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_Quaternion_y$1(lua_State *L) { olua_startinvoke(L); @@ -8628,7 +8856,7 @@ static int _cocos2d_Quaternion_get_y(lua_State *L) return num_ret; } -static int _cocos2d_Quaternion_set_y(lua_State *L) +static int _olua_fun_cocos2d_Quaternion_y$2(lua_State *L) { olua_startinvoke(L); @@ -8646,7 +8874,28 @@ static int _cocos2d_Quaternion_set_y(lua_State *L) return 0; } -static int _cocos2d_Quaternion_get_z(lua_State *L) +static int _olua_fun_cocos2d_Quaternion_y(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float y + return _olua_fun_cocos2d_Quaternion_y$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float y + return _olua_fun_cocos2d_Quaternion_y$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::Quaternion::y' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_Quaternion_z$1(lua_State *L) { olua_startinvoke(L); @@ -8663,7 +8912,7 @@ static int _cocos2d_Quaternion_get_z(lua_State *L) return num_ret; } -static int _cocos2d_Quaternion_set_z(lua_State *L) +static int _olua_fun_cocos2d_Quaternion_z$2(lua_State *L) { olua_startinvoke(L); @@ -8681,101 +8930,89 @@ static int _cocos2d_Quaternion_set_z(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_Quaternion(lua_State *L) -{ - oluacls_class(L, "cc.Quaternion"); - oluacls_func(L, "__call", _cocos2d_Quaternion___call); - oluacls_func(L, "__gc", _cocos2d_Quaternion___gc); - oluacls_func(L, "__olua_move", _cocos2d_Quaternion___olua_move); - oluacls_func(L, "conjugate", _cocos2d_Quaternion_conjugate); - oluacls_func(L, "createFromAxisAngle", _cocos2d_Quaternion_createFromAxisAngle); - oluacls_func(L, "createFromRotationMatrix", _cocos2d_Quaternion_createFromRotationMatrix); - oluacls_func(L, "getConjugated", _cocos2d_Quaternion_getConjugated); - oluacls_func(L, "getInversed", _cocos2d_Quaternion_getInversed); - oluacls_func(L, "getNormalized", _cocos2d_Quaternion_getNormalized); - oluacls_func(L, "identity", _cocos2d_Quaternion_identity); - oluacls_func(L, "inverse", _cocos2d_Quaternion_inverse); - oluacls_func(L, "isIdentity", _cocos2d_Quaternion_isIdentity); - oluacls_func(L, "isZero", _cocos2d_Quaternion_isZero); - oluacls_func(L, "lerp", _cocos2d_Quaternion_lerp); - oluacls_func(L, "multiply", _cocos2d_Quaternion_multiply); - oluacls_func(L, "new", _cocos2d_Quaternion_new); - oluacls_func(L, "normalize", _cocos2d_Quaternion_normalize); - oluacls_func(L, "set", _cocos2d_Quaternion_set); - oluacls_func(L, "setIdentity", _cocos2d_Quaternion_setIdentity); - oluacls_func(L, "slerp", _cocos2d_Quaternion_slerp); - oluacls_func(L, "squad", _cocos2d_Quaternion_squad); - oluacls_func(L, "toAxisAngle", _cocos2d_Quaternion_toAxisAngle); - oluacls_func(L, "zero", _cocos2d_Quaternion_zero); - oluacls_prop(L, "conjugated", _cocos2d_Quaternion_getConjugated, nullptr); - oluacls_prop(L, "identity", _cocos2d_Quaternion_isIdentity, _cocos2d_Quaternion_setIdentity); - oluacls_prop(L, "inversed", _cocos2d_Quaternion_getInversed, nullptr); - oluacls_prop(L, "normalized", _cocos2d_Quaternion_getNormalized, nullptr); - oluacls_prop(L, "zero", _cocos2d_Quaternion_isZero, nullptr); - oluacls_prop(L, "w", _cocos2d_Quaternion_get_w, _cocos2d_Quaternion_set_w); - oluacls_prop(L, "x", _cocos2d_Quaternion_get_x, _cocos2d_Quaternion_set_x); - oluacls_prop(L, "y", _cocos2d_Quaternion_get_y, _cocos2d_Quaternion_set_y); - oluacls_prop(L, "z", _cocos2d_Quaternion_get_z, _cocos2d_Quaternion_set_z); - oluacls_const(L, "ZERO", &cocos2d::Quaternion::ZERO); - - return 1; -} -OLUA_END_DECLS - -static int _cocos2d_AffineTransform___call(lua_State *L) +static int _olua_fun_cocos2d_Quaternion_z(lua_State *L) { - olua_startinvoke(L); - - cocos2d::AffineTransform ret; + int num_args = lua_gettop(L) - 1; - luaL_checktype(L, 2, LUA_TTABLE); + if (num_args == 0) { + // float z + return _olua_fun_cocos2d_Quaternion_z$1(L); + } - float arg1 = 0; /** a */ - float arg2 = 0; /** b */ - float arg3 = 0; /** c */ - float arg4 = 0; /** d */ - float arg5 = 0; /** tx */ - float arg6 = 0; /** ty */ + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float z + return _olua_fun_cocos2d_Quaternion_z$2(L); + // } + } - olua_getfield(L, 2, "a"); - olua_check_number(L, -1, &arg1); - ret.a = arg1; - lua_pop(L, 1); + luaL_error(L, "method 'cocos2d::Quaternion::z' not support '%d' arguments", num_args); - olua_getfield(L, 2, "b"); - olua_check_number(L, -1, &arg2); - ret.b = arg2; - lua_pop(L, 1); + return 0; +} - olua_getfield(L, 2, "c"); - olua_check_number(L, -1, &arg3); - ret.c = arg3; - lua_pop(L, 1); +static int _olua_fun_cocos2d_Quaternion_zero(lua_State *L) +{ + olua_startinvoke(L); - olua_getfield(L, 2, "d"); - olua_check_number(L, -1, &arg4); - ret.d = arg4; - lua_pop(L, 1); + // static const cocos2d::Quaternion &zero() + const cocos2d::Quaternion &ret = cocos2d::Quaternion::zero(); + int num_ret = olua_push_object(L, ret, "cc.Quaternion"); - olua_getfield(L, 2, "tx"); - olua_check_number(L, -1, &arg5); - ret.tx = arg5; - lua_pop(L, 1); + olua_endinvoke(L); - olua_getfield(L, 2, "ty"); - olua_check_number(L, -1, &arg6); - ret.ty = arg6; - lua_pop(L, 1); + return num_ret; +} - olua_pushcopy_object(L, ret, "cc.AffineTransform"); +static int _olua_cls_cc_Quaternion(lua_State *L) +{ + oluacls_class(L, "cc.Quaternion"); + oluacls_func(L, "__gc", _olua_fun_cocos2d_Quaternion___gc); + oluacls_func(L, "__olua_move", _olua_fun_cocos2d_Quaternion___olua_move); + oluacls_func(L, "conjugate", _olua_fun_cocos2d_Quaternion_conjugate); + oluacls_func(L, "createFromAxisAngle", _olua_fun_cocos2d_Quaternion_createFromAxisAngle); + oluacls_func(L, "createFromRotationMatrix", _olua_fun_cocos2d_Quaternion_createFromRotationMatrix); + oluacls_func(L, "getConjugated", _olua_fun_cocos2d_Quaternion_getConjugated); + oluacls_func(L, "getInversed", _olua_fun_cocos2d_Quaternion_getInversed); + oluacls_func(L, "getNormalized", _olua_fun_cocos2d_Quaternion_getNormalized); + oluacls_func(L, "identity", _olua_fun_cocos2d_Quaternion_identity); + oluacls_func(L, "inverse", _olua_fun_cocos2d_Quaternion_inverse); + oluacls_func(L, "isIdentity", _olua_fun_cocos2d_Quaternion_isIdentity); + oluacls_func(L, "isZero", _olua_fun_cocos2d_Quaternion_isZero); + oluacls_func(L, "lerp", _olua_fun_cocos2d_Quaternion_lerp); + oluacls_func(L, "multiply", _olua_fun_cocos2d_Quaternion_multiply); + oluacls_func(L, "new", _olua_fun_cocos2d_Quaternion_new); + oluacls_func(L, "normalize", _olua_fun_cocos2d_Quaternion_normalize); + oluacls_func(L, "set", _olua_fun_cocos2d_Quaternion_set); + oluacls_func(L, "setIdentity", _olua_fun_cocos2d_Quaternion_setIdentity); + oluacls_func(L, "slerp", _olua_fun_cocos2d_Quaternion_slerp); + oluacls_func(L, "squad", _olua_fun_cocos2d_Quaternion_squad); + oluacls_func(L, "toAxisAngle", _olua_fun_cocos2d_Quaternion_toAxisAngle); + oluacls_func(L, "zero", _olua_fun_cocos2d_Quaternion_zero); + oluacls_prop(L, "conjugated", _olua_fun_cocos2d_Quaternion_getConjugated, nullptr); + oluacls_prop(L, "inversed", _olua_fun_cocos2d_Quaternion_getInversed, nullptr); + oluacls_prop(L, "normalized", _olua_fun_cocos2d_Quaternion_getNormalized, nullptr); + oluacls_prop(L, "w", _olua_fun_cocos2d_Quaternion_w, _olua_fun_cocos2d_Quaternion_w); + oluacls_prop(L, "x", _olua_fun_cocos2d_Quaternion_x, _olua_fun_cocos2d_Quaternion_x); + oluacls_prop(L, "y", _olua_fun_cocos2d_Quaternion_y, _olua_fun_cocos2d_Quaternion_y); + oluacls_prop(L, "z", _olua_fun_cocos2d_Quaternion_z, _olua_fun_cocos2d_Quaternion_z); + oluacls_const(L, "ZERO", &cocos2d::Quaternion::ZERO); - olua_endinvoke(L); + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_Quaternion(lua_State *L) +{ + olua_require(L, "cocos2d_types", luaopen_cocos2d_types); + if (!olua_getclass(L, "cc.Quaternion")) { + luaL_error(L, "class not found: cocos2d::Quaternion"); + } return 1; } +OLUA_END_DECLS -static int _cocos2d_AffineTransform___gc(lua_State *L) +static int _olua_fun_cocos2d_AffineTransform___gc(lua_State *L) { olua_startinvoke(L); @@ -8787,7 +9024,7 @@ static int _cocos2d_AffineTransform___gc(lua_State *L) return 0; } -static int _cocos2d_AffineTransform___olua_move(lua_State *L) +static int _olua_fun_cocos2d_AffineTransform___olua_move(lua_State *L) { olua_startinvoke(L); @@ -8799,7 +9036,7 @@ static int _cocos2d_AffineTransform___olua_move(lua_State *L) return 1; } -static int _cocos2d_AffineTransform_get_a(lua_State *L) +static int _olua_fun_cocos2d_AffineTransform_a$1(lua_State *L) { olua_startinvoke(L); @@ -8816,7 +9053,7 @@ static int _cocos2d_AffineTransform_get_a(lua_State *L) return num_ret; } -static int _cocos2d_AffineTransform_set_a(lua_State *L) +static int _olua_fun_cocos2d_AffineTransform_a$2(lua_State *L) { olua_startinvoke(L); @@ -8834,7 +9071,28 @@ static int _cocos2d_AffineTransform_set_a(lua_State *L) return 0; } -static int _cocos2d_AffineTransform_get_b(lua_State *L) +static int _olua_fun_cocos2d_AffineTransform_a(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float a + return _olua_fun_cocos2d_AffineTransform_a$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float a + return _olua_fun_cocos2d_AffineTransform_a$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::AffineTransform::a' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_AffineTransform_b$1(lua_State *L) { olua_startinvoke(L); @@ -8851,7 +9109,7 @@ static int _cocos2d_AffineTransform_get_b(lua_State *L) return num_ret; } -static int _cocos2d_AffineTransform_set_b(lua_State *L) +static int _olua_fun_cocos2d_AffineTransform_b$2(lua_State *L) { olua_startinvoke(L); @@ -8869,7 +9127,28 @@ static int _cocos2d_AffineTransform_set_b(lua_State *L) return 0; } -static int _cocos2d_AffineTransform_get_c(lua_State *L) +static int _olua_fun_cocos2d_AffineTransform_b(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float b + return _olua_fun_cocos2d_AffineTransform_b$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float b + return _olua_fun_cocos2d_AffineTransform_b$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::AffineTransform::b' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_AffineTransform_c$1(lua_State *L) { olua_startinvoke(L); @@ -8886,7 +9165,7 @@ static int _cocos2d_AffineTransform_get_c(lua_State *L) return num_ret; } -static int _cocos2d_AffineTransform_set_c(lua_State *L) +static int _olua_fun_cocos2d_AffineTransform_c$2(lua_State *L) { olua_startinvoke(L); @@ -8904,7 +9183,28 @@ static int _cocos2d_AffineTransform_set_c(lua_State *L) return 0; } -static int _cocos2d_AffineTransform_get_d(lua_State *L) +static int _olua_fun_cocos2d_AffineTransform_c(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float c + return _olua_fun_cocos2d_AffineTransform_c$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float c + return _olua_fun_cocos2d_AffineTransform_c$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::AffineTransform::c' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_AffineTransform_d$1(lua_State *L) { olua_startinvoke(L); @@ -8921,7 +9221,7 @@ static int _cocos2d_AffineTransform_get_d(lua_State *L) return num_ret; } -static int _cocos2d_AffineTransform_set_d(lua_State *L) +static int _olua_fun_cocos2d_AffineTransform_d$2(lua_State *L) { olua_startinvoke(L); @@ -8939,7 +9239,28 @@ static int _cocos2d_AffineTransform_set_d(lua_State *L) return 0; } -static int _cocos2d_AffineTransform_get_tx(lua_State *L) +static int _olua_fun_cocos2d_AffineTransform_d(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float d + return _olua_fun_cocos2d_AffineTransform_d$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float d + return _olua_fun_cocos2d_AffineTransform_d$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::AffineTransform::d' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_AffineTransform_tx$1(lua_State *L) { olua_startinvoke(L); @@ -8956,7 +9277,7 @@ static int _cocos2d_AffineTransform_get_tx(lua_State *L) return num_ret; } -static int _cocos2d_AffineTransform_set_tx(lua_State *L) +static int _olua_fun_cocos2d_AffineTransform_tx$2(lua_State *L) { olua_startinvoke(L); @@ -8974,7 +9295,28 @@ static int _cocos2d_AffineTransform_set_tx(lua_State *L) return 0; } -static int _cocos2d_AffineTransform_get_ty(lua_State *L) +static int _olua_fun_cocos2d_AffineTransform_tx(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float tx + return _olua_fun_cocos2d_AffineTransform_tx$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float tx + return _olua_fun_cocos2d_AffineTransform_tx$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::AffineTransform::tx' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_AffineTransform_ty$1(lua_State *L) { olua_startinvoke(L); @@ -8991,7 +9333,7 @@ static int _cocos2d_AffineTransform_get_ty(lua_State *L) return num_ret; } -static int _cocos2d_AffineTransform_set_ty(lua_State *L) +static int _olua_fun_cocos2d_AffineTransform_ty$2(lua_State *L) { olua_startinvoke(L); @@ -9009,84 +9351,55 @@ static int _cocos2d_AffineTransform_set_ty(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_AffineTransform(lua_State *L) +static int _olua_fun_cocos2d_AffineTransform_ty(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float ty + return _olua_fun_cocos2d_AffineTransform_ty$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float ty + return _olua_fun_cocos2d_AffineTransform_ty$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::AffineTransform::ty' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_cls_cc_AffineTransform(lua_State *L) { oluacls_class(L, "cc.AffineTransform"); - oluacls_func(L, "__call", _cocos2d_AffineTransform___call); - oluacls_func(L, "__gc", _cocos2d_AffineTransform___gc); - oluacls_func(L, "__olua_move", _cocos2d_AffineTransform___olua_move); - oluacls_prop(L, "a", _cocos2d_AffineTransform_get_a, _cocos2d_AffineTransform_set_a); - oluacls_prop(L, "b", _cocos2d_AffineTransform_get_b, _cocos2d_AffineTransform_set_b); - oluacls_prop(L, "c", _cocos2d_AffineTransform_get_c, _cocos2d_AffineTransform_set_c); - oluacls_prop(L, "d", _cocos2d_AffineTransform_get_d, _cocos2d_AffineTransform_set_d); - oluacls_prop(L, "tx", _cocos2d_AffineTransform_get_tx, _cocos2d_AffineTransform_set_tx); - oluacls_prop(L, "ty", _cocos2d_AffineTransform_get_ty, _cocos2d_AffineTransform_set_ty); + oluacls_func(L, "__gc", _olua_fun_cocos2d_AffineTransform___gc); + oluacls_func(L, "__olua_move", _olua_fun_cocos2d_AffineTransform___olua_move); + oluacls_prop(L, "a", _olua_fun_cocos2d_AffineTransform_a, _olua_fun_cocos2d_AffineTransform_a); + oluacls_prop(L, "b", _olua_fun_cocos2d_AffineTransform_b, _olua_fun_cocos2d_AffineTransform_b); + oluacls_prop(L, "c", _olua_fun_cocos2d_AffineTransform_c, _olua_fun_cocos2d_AffineTransform_c); + oluacls_prop(L, "d", _olua_fun_cocos2d_AffineTransform_d, _olua_fun_cocos2d_AffineTransform_d); + oluacls_prop(L, "tx", _olua_fun_cocos2d_AffineTransform_tx, _olua_fun_cocos2d_AffineTransform_tx); + oluacls_prop(L, "ty", _olua_fun_cocos2d_AffineTransform_ty, _olua_fun_cocos2d_AffineTransform_ty); oluacls_const(L, "IDENTITY", &cocos2d::AffineTransform::IDENTITY); return 1; } -OLUA_END_DECLS -static int _GLContextAttrs___call(lua_State *L) +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_AffineTransform(lua_State *L) { - olua_startinvoke(L); - - GLContextAttrs ret; - - luaL_checktype(L, 2, LUA_TTABLE); - - int arg1 = 0; /** redBits */ - int arg2 = 0; /** greenBits */ - int arg3 = 0; /** blueBits */ - int arg4 = 0; /** alphaBits */ - int arg5 = 0; /** depthBits */ - int arg6 = 0; /** stencilBits */ - int arg7 = 0; /** multisamplingCount */ - - olua_getfield(L, 2, "redBits"); - olua_check_integer(L, -1, &arg1); - ret.redBits = arg1; - lua_pop(L, 1); - - olua_getfield(L, 2, "greenBits"); - olua_check_integer(L, -1, &arg2); - ret.greenBits = arg2; - lua_pop(L, 1); - - olua_getfield(L, 2, "blueBits"); - olua_check_integer(L, -1, &arg3); - ret.blueBits = arg3; - lua_pop(L, 1); - - olua_getfield(L, 2, "alphaBits"); - olua_check_integer(L, -1, &arg4); - ret.alphaBits = arg4; - lua_pop(L, 1); - - olua_getfield(L, 2, "depthBits"); - olua_check_integer(L, -1, &arg5); - ret.depthBits = arg5; - lua_pop(L, 1); - - olua_getfield(L, 2, "stencilBits"); - olua_check_integer(L, -1, &arg6); - ret.stencilBits = arg6; - lua_pop(L, 1); - - olua_getfield(L, 2, "multisamplingCount"); - olua_check_integer(L, -1, &arg7); - ret.multisamplingCount = arg7; - lua_pop(L, 1); - - olua_pushcopy_object(L, ret, "cc.GLContextAttrs"); - - olua_endinvoke(L); - + olua_require(L, "cocos2d_types", luaopen_cocos2d_types); + if (!olua_getclass(L, "cc.AffineTransform")) { + luaL_error(L, "class not found: cocos2d::AffineTransform"); + } return 1; } +OLUA_END_DECLS -static int _GLContextAttrs___gc(lua_State *L) +static int _olua_fun_GLContextAttrs___gc(lua_State *L) { olua_startinvoke(L); @@ -9098,7 +9411,7 @@ static int _GLContextAttrs___gc(lua_State *L) return 0; } -static int _GLContextAttrs___olua_move(lua_State *L) +static int _olua_fun_GLContextAttrs___olua_move(lua_State *L) { olua_startinvoke(L); @@ -9110,7 +9423,7 @@ static int _GLContextAttrs___olua_move(lua_State *L) return 1; } -static int _GLContextAttrs_get_alphaBits(lua_State *L) +static int _olua_fun_GLContextAttrs_alphaBits$1(lua_State *L) { olua_startinvoke(L); @@ -9127,7 +9440,7 @@ static int _GLContextAttrs_get_alphaBits(lua_State *L) return num_ret; } -static int _GLContextAttrs_set_alphaBits(lua_State *L) +static int _olua_fun_GLContextAttrs_alphaBits$2(lua_State *L) { olua_startinvoke(L); @@ -9145,7 +9458,28 @@ static int _GLContextAttrs_set_alphaBits(lua_State *L) return 0; } -static int _GLContextAttrs_get_blueBits(lua_State *L) +static int _olua_fun_GLContextAttrs_alphaBits(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // int alphaBits + return _olua_fun_GLContextAttrs_alphaBits$1(L); + } + + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // int alphaBits + return _olua_fun_GLContextAttrs_alphaBits$2(L); + // } + } + + luaL_error(L, "method 'GLContextAttrs::alphaBits' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_GLContextAttrs_blueBits$1(lua_State *L) { olua_startinvoke(L); @@ -9162,7 +9496,7 @@ static int _GLContextAttrs_get_blueBits(lua_State *L) return num_ret; } -static int _GLContextAttrs_set_blueBits(lua_State *L) +static int _olua_fun_GLContextAttrs_blueBits$2(lua_State *L) { olua_startinvoke(L); @@ -9180,7 +9514,28 @@ static int _GLContextAttrs_set_blueBits(lua_State *L) return 0; } -static int _GLContextAttrs_get_depthBits(lua_State *L) +static int _olua_fun_GLContextAttrs_blueBits(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // int blueBits + return _olua_fun_GLContextAttrs_blueBits$1(L); + } + + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // int blueBits + return _olua_fun_GLContextAttrs_blueBits$2(L); + // } + } + + luaL_error(L, "method 'GLContextAttrs::blueBits' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_GLContextAttrs_depthBits$1(lua_State *L) { olua_startinvoke(L); @@ -9197,7 +9552,7 @@ static int _GLContextAttrs_get_depthBits(lua_State *L) return num_ret; } -static int _GLContextAttrs_set_depthBits(lua_State *L) +static int _olua_fun_GLContextAttrs_depthBits$2(lua_State *L) { olua_startinvoke(L); @@ -9215,7 +9570,28 @@ static int _GLContextAttrs_set_depthBits(lua_State *L) return 0; } -static int _GLContextAttrs_get_greenBits(lua_State *L) +static int _olua_fun_GLContextAttrs_depthBits(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // int depthBits + return _olua_fun_GLContextAttrs_depthBits$1(L); + } + + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // int depthBits + return _olua_fun_GLContextAttrs_depthBits$2(L); + // } + } + + luaL_error(L, "method 'GLContextAttrs::depthBits' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_GLContextAttrs_greenBits$1(lua_State *L) { olua_startinvoke(L); @@ -9232,7 +9608,7 @@ static int _GLContextAttrs_get_greenBits(lua_State *L) return num_ret; } -static int _GLContextAttrs_set_greenBits(lua_State *L) +static int _olua_fun_GLContextAttrs_greenBits$2(lua_State *L) { olua_startinvoke(L); @@ -9250,7 +9626,28 @@ static int _GLContextAttrs_set_greenBits(lua_State *L) return 0; } -static int _GLContextAttrs_get_multisamplingCount(lua_State *L) +static int _olua_fun_GLContextAttrs_greenBits(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // int greenBits + return _olua_fun_GLContextAttrs_greenBits$1(L); + } + + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // int greenBits + return _olua_fun_GLContextAttrs_greenBits$2(L); + // } + } + + luaL_error(L, "method 'GLContextAttrs::greenBits' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_GLContextAttrs_multisamplingCount$1(lua_State *L) { olua_startinvoke(L); @@ -9267,7 +9664,7 @@ static int _GLContextAttrs_get_multisamplingCount(lua_State *L) return num_ret; } -static int _GLContextAttrs_set_multisamplingCount(lua_State *L) +static int _olua_fun_GLContextAttrs_multisamplingCount$2(lua_State *L) { olua_startinvoke(L); @@ -9285,7 +9682,28 @@ static int _GLContextAttrs_set_multisamplingCount(lua_State *L) return 0; } -static int _GLContextAttrs_get_redBits(lua_State *L) +static int _olua_fun_GLContextAttrs_multisamplingCount(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // int multisamplingCount + return _olua_fun_GLContextAttrs_multisamplingCount$1(L); + } + + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // int multisamplingCount + return _olua_fun_GLContextAttrs_multisamplingCount$2(L); + // } + } + + luaL_error(L, "method 'GLContextAttrs::multisamplingCount' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_GLContextAttrs_redBits$1(lua_State *L) { olua_startinvoke(L); @@ -9302,7 +9720,7 @@ static int _GLContextAttrs_get_redBits(lua_State *L) return num_ret; } -static int _GLContextAttrs_set_redBits(lua_State *L) +static int _olua_fun_GLContextAttrs_redBits$2(lua_State *L) { olua_startinvoke(L); @@ -9320,7 +9738,28 @@ static int _GLContextAttrs_set_redBits(lua_State *L) return 0; } -static int _GLContextAttrs_get_stencilBits(lua_State *L) +static int _olua_fun_GLContextAttrs_redBits(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // int redBits + return _olua_fun_GLContextAttrs_redBits$1(L); + } + + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // int redBits + return _olua_fun_GLContextAttrs_redBits$2(L); + // } + } + + luaL_error(L, "method 'GLContextAttrs::redBits' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_GLContextAttrs_stencilBits$1(lua_State *L) { olua_startinvoke(L); @@ -9337,7 +9776,7 @@ static int _GLContextAttrs_get_stencilBits(lua_State *L) return num_ret; } -static int _GLContextAttrs_set_stencilBits(lua_State *L) +static int _olua_fun_GLContextAttrs_stencilBits$2(lua_State *L) { olua_startinvoke(L); @@ -9355,58 +9794,55 @@ static int _GLContextAttrs_set_stencilBits(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_GLContextAttrs(lua_State *L) +static int _olua_fun_GLContextAttrs_stencilBits(lua_State *L) { - oluacls_class(L, "cc.GLContextAttrs"); - oluacls_func(L, "__call", _GLContextAttrs___call); - oluacls_func(L, "__gc", _GLContextAttrs___gc); - oluacls_func(L, "__olua_move", _GLContextAttrs___olua_move); - oluacls_prop(L, "alphaBits", _GLContextAttrs_get_alphaBits, _GLContextAttrs_set_alphaBits); - oluacls_prop(L, "blueBits", _GLContextAttrs_get_blueBits, _GLContextAttrs_set_blueBits); - oluacls_prop(L, "depthBits", _GLContextAttrs_get_depthBits, _GLContextAttrs_set_depthBits); - oluacls_prop(L, "greenBits", _GLContextAttrs_get_greenBits, _GLContextAttrs_set_greenBits); - oluacls_prop(L, "multisamplingCount", _GLContextAttrs_get_multisamplingCount, _GLContextAttrs_set_multisamplingCount); - oluacls_prop(L, "redBits", _GLContextAttrs_get_redBits, _GLContextAttrs_set_redBits); - oluacls_prop(L, "stencilBits", _GLContextAttrs_get_stencilBits, _GLContextAttrs_set_stencilBits); + int num_args = lua_gettop(L) - 1; - return 1; -} -OLUA_END_DECLS + if (num_args == 0) { + // int stencilBits + return _olua_fun_GLContextAttrs_stencilBits$1(L); + } -static int _cocos2d_Tex2F___call(lua_State *L) -{ - olua_startinvoke(L); + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // int stencilBits + return _olua_fun_GLContextAttrs_stencilBits$2(L); + // } + } - cocos2d::Tex2F ret; + luaL_error(L, "method 'GLContextAttrs::stencilBits' not support '%d' arguments", num_args); - luaL_checktype(L, 2, LUA_TTABLE); + return 0; +} - float arg1 = 0; /** u */ - float arg2 = 0; /** v */ +static int _olua_cls_cc_GLContextAttrs(lua_State *L) +{ + oluacls_class(L, "cc.GLContextAttrs"); + oluacls_func(L, "__gc", _olua_fun_GLContextAttrs___gc); + oluacls_func(L, "__olua_move", _olua_fun_GLContextAttrs___olua_move); + oluacls_prop(L, "alphaBits", _olua_fun_GLContextAttrs_alphaBits, _olua_fun_GLContextAttrs_alphaBits); + oluacls_prop(L, "blueBits", _olua_fun_GLContextAttrs_blueBits, _olua_fun_GLContextAttrs_blueBits); + oluacls_prop(L, "depthBits", _olua_fun_GLContextAttrs_depthBits, _olua_fun_GLContextAttrs_depthBits); + oluacls_prop(L, "greenBits", _olua_fun_GLContextAttrs_greenBits, _olua_fun_GLContextAttrs_greenBits); + oluacls_prop(L, "multisamplingCount", _olua_fun_GLContextAttrs_multisamplingCount, _olua_fun_GLContextAttrs_multisamplingCount); + oluacls_prop(L, "redBits", _olua_fun_GLContextAttrs_redBits, _olua_fun_GLContextAttrs_redBits); + oluacls_prop(L, "stencilBits", _olua_fun_GLContextAttrs_stencilBits, _olua_fun_GLContextAttrs_stencilBits); - olua_getfield(L, 2, "u"); - if (!olua_isnoneornil(L, -1)) { - olua_check_number(L, -1, &arg1); - ret.u = arg1; - } - lua_pop(L, 1); + return 1; +} - olua_getfield(L, 2, "v"); - if (!olua_isnoneornil(L, -1)) { - olua_check_number(L, -1, &arg2); - ret.v = arg2; +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_GLContextAttrs(lua_State *L) +{ + olua_require(L, "cocos2d_types", luaopen_cocos2d_types); + if (!olua_getclass(L, "cc.GLContextAttrs")) { + luaL_error(L, "class not found: GLContextAttrs"); } - lua_pop(L, 1); - - olua_pushcopy_object(L, ret, "cc.Tex2F"); - - olua_endinvoke(L); - return 1; } +OLUA_END_DECLS -static int _cocos2d_Tex2F___gc(lua_State *L) +static int _olua_fun_cocos2d_Tex2F___gc(lua_State *L) { olua_startinvoke(L); @@ -9418,7 +9854,7 @@ static int _cocos2d_Tex2F___gc(lua_State *L) return 0; } -static int _cocos2d_Tex2F___olua_move(lua_State *L) +static int _olua_fun_cocos2d_Tex2F___olua_move(lua_State *L) { olua_startinvoke(L); @@ -9430,7 +9866,7 @@ static int _cocos2d_Tex2F___olua_move(lua_State *L) return 1; } -static int _cocos2d_Tex2F_new$1(lua_State *L) +static int _olua_fun_cocos2d_Tex2F_new$1(lua_State *L) { olua_startinvoke(L); @@ -9440,7 +9876,7 @@ static int _cocos2d_Tex2F_new$1(lua_State *L) olua_check_number(L, 1, &arg1); olua_check_number(L, 2, &arg2); - // Tex2F(float _u, float _v) + // cocos2d::Tex2F(float _u, float _v) cocos2d::Tex2F *ret = new cocos2d::Tex2F(arg1, arg2); int num_ret = olua_push_object(L, ret, "cc.Tex2F"); olua_postnew(L, ret); @@ -9450,11 +9886,11 @@ static int _cocos2d_Tex2F_new$1(lua_State *L) return num_ret; } -static int _cocos2d_Tex2F_new$2(lua_State *L) +static int _olua_fun_cocos2d_Tex2F_new$2(lua_State *L) { olua_startinvoke(L); - // Tex2F() + // cocos2d::Tex2F() cocos2d::Tex2F *ret = new cocos2d::Tex2F(); int num_ret = olua_push_object(L, ret, "cc.Tex2F"); olua_postnew(L, ret); @@ -9464,19 +9900,19 @@ static int _cocos2d_Tex2F_new$2(lua_State *L) return num_ret; } -static int _cocos2d_Tex2F_new(lua_State *L) +static int _olua_fun_cocos2d_Tex2F_new(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 0) { - // Tex2F() - return _cocos2d_Tex2F_new$2(L); + // cocos2d::Tex2F() + return _olua_fun_cocos2d_Tex2F_new$2(L); } if (num_args == 2) { // if ((olua_is_number(L, 1)) && (olua_is_number(L, 2))) { - // Tex2F(float _u, float _v) - return _cocos2d_Tex2F_new$1(L); + // cocos2d::Tex2F(float _u, float _v) + return _olua_fun_cocos2d_Tex2F_new$1(L); // } } @@ -9485,7 +9921,7 @@ static int _cocos2d_Tex2F_new(lua_State *L) return 0; } -static int _cocos2d_Tex2F_get_u(lua_State *L) +static int _olua_fun_cocos2d_Tex2F_u$1(lua_State *L) { olua_startinvoke(L); @@ -9493,7 +9929,7 @@ static int _cocos2d_Tex2F_get_u(lua_State *L) olua_to_object(L, 1, &self, "cc.Tex2F"); - // @optional float u + // float u float ret = self->u; int num_ret = olua_push_number(L, ret); @@ -9502,7 +9938,7 @@ static int _cocos2d_Tex2F_get_u(lua_State *L) return num_ret; } -static int _cocos2d_Tex2F_set_u(lua_State *L) +static int _olua_fun_cocos2d_Tex2F_u$2(lua_State *L) { olua_startinvoke(L); @@ -9512,7 +9948,7 @@ static int _cocos2d_Tex2F_set_u(lua_State *L) olua_to_object(L, 1, &self, "cc.Tex2F"); olua_check_number(L, 2, &arg1); - // @optional float u + // float u self->u = arg1; olua_endinvoke(L); @@ -9520,7 +9956,28 @@ static int _cocos2d_Tex2F_set_u(lua_State *L) return 0; } -static int _cocos2d_Tex2F_get_v(lua_State *L) +static int _olua_fun_cocos2d_Tex2F_u(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float u + return _olua_fun_cocos2d_Tex2F_u$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float u + return _olua_fun_cocos2d_Tex2F_u$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::Tex2F::u' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_Tex2F_v$1(lua_State *L) { olua_startinvoke(L); @@ -9528,7 +9985,7 @@ static int _cocos2d_Tex2F_get_v(lua_State *L) olua_to_object(L, 1, &self, "cc.Tex2F"); - // @optional float v + // float v float ret = self->v; int num_ret = olua_push_number(L, ret); @@ -9537,7 +9994,7 @@ static int _cocos2d_Tex2F_get_v(lua_State *L) return num_ret; } -static int _cocos2d_Tex2F_set_v(lua_State *L) +static int _olua_fun_cocos2d_Tex2F_v$2(lua_State *L) { olua_startinvoke(L); @@ -9547,7 +10004,7 @@ static int _cocos2d_Tex2F_set_v(lua_State *L) olua_to_object(L, 1, &self, "cc.Tex2F"); olua_check_number(L, 2, &arg1); - // @optional float v + // float v self->v = arg1; olua_endinvoke(L); @@ -9555,62 +10012,51 @@ static int _cocos2d_Tex2F_set_v(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_Tex2F(lua_State *L) -{ - oluacls_class(L, "cc.Tex2F"); - oluacls_func(L, "__call", _cocos2d_Tex2F___call); - oluacls_func(L, "__gc", _cocos2d_Tex2F___gc); - oluacls_func(L, "__olua_move", _cocos2d_Tex2F___olua_move); - oluacls_func(L, "new", _cocos2d_Tex2F_new); - oluacls_prop(L, "u", _cocos2d_Tex2F_get_u, _cocos2d_Tex2F_set_u); - oluacls_prop(L, "v", _cocos2d_Tex2F_get_v, _cocos2d_Tex2F_set_v); - - return 1; -} -OLUA_END_DECLS - -static int _cocos2d_T2F_Quad___call(lua_State *L) +static int _olua_fun_cocos2d_Tex2F_v(lua_State *L) { - olua_startinvoke(L); - - cocos2d::T2F_Quad ret; - - luaL_checktype(L, 2, LUA_TTABLE); - - cocos2d::Tex2F arg1; /** bl */ - cocos2d::Tex2F arg2; /** br */ - cocos2d::Tex2F arg3; /** tl */ - cocos2d::Tex2F arg4; /** tr */ + int num_args = lua_gettop(L) - 1; - olua_getfield(L, 2, "bl"); - olua_check_object(L, -1, &arg1, "cc.Tex2F"); - ret.bl = arg1; - lua_pop(L, 1); + if (num_args == 0) { + // float v + return _olua_fun_cocos2d_Tex2F_v$1(L); + } - olua_getfield(L, 2, "br"); - olua_check_object(L, -1, &arg2, "cc.Tex2F"); - ret.br = arg2; - lua_pop(L, 1); + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float v + return _olua_fun_cocos2d_Tex2F_v$2(L); + // } + } - olua_getfield(L, 2, "tl"); - olua_check_object(L, -1, &arg3, "cc.Tex2F"); - ret.tl = arg3; - lua_pop(L, 1); + luaL_error(L, "method 'cocos2d::Tex2F::v' not support '%d' arguments", num_args); - olua_getfield(L, 2, "tr"); - olua_check_object(L, -1, &arg4, "cc.Tex2F"); - ret.tr = arg4; - lua_pop(L, 1); + return 0; +} - olua_pushcopy_object(L, ret, "cc.T2F_Quad"); +static int _olua_cls_cc_Tex2F(lua_State *L) +{ + oluacls_class(L, "cc.Tex2F"); + oluacls_func(L, "__gc", _olua_fun_cocos2d_Tex2F___gc); + oluacls_func(L, "__olua_move", _olua_fun_cocos2d_Tex2F___olua_move); + oluacls_func(L, "new", _olua_fun_cocos2d_Tex2F_new); + oluacls_prop(L, "u", _olua_fun_cocos2d_Tex2F_u, _olua_fun_cocos2d_Tex2F_u); + oluacls_prop(L, "v", _olua_fun_cocos2d_Tex2F_v, _olua_fun_cocos2d_Tex2F_v); - olua_endinvoke(L); + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_Tex2F(lua_State *L) +{ + olua_require(L, "cocos2d_types", luaopen_cocos2d_types); + if (!olua_getclass(L, "cc.Tex2F")) { + luaL_error(L, "class not found: cocos2d::Tex2F"); + } return 1; } +OLUA_END_DECLS -static int _cocos2d_T2F_Quad___gc(lua_State *L) +static int _olua_fun_cocos2d_T2F_Quad___gc(lua_State *L) { olua_startinvoke(L); @@ -9622,7 +10068,7 @@ static int _cocos2d_T2F_Quad___gc(lua_State *L) return 0; } -static int _cocos2d_T2F_Quad___olua_move(lua_State *L) +static int _olua_fun_cocos2d_T2F_Quad___olua_move(lua_State *L) { olua_startinvoke(L); @@ -9634,7 +10080,7 @@ static int _cocos2d_T2F_Quad___olua_move(lua_State *L) return 1; } -static int _cocos2d_T2F_Quad_get_bl(lua_State *L) +static int _olua_fun_cocos2d_T2F_Quad_bl$1(lua_State *L) { olua_startinvoke(L); @@ -9644,32 +10090,53 @@ static int _cocos2d_T2F_Quad_get_bl(lua_State *L) // cocos2d::Tex2F bl cocos2d::Tex2F &ret = self->bl; - int num_ret = olua_pushcopy_object(L, ret, "cc.Tex2F"); + int num_ret = olua_copy_object(L, ret, "cc.Tex2F"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_T2F_Quad_set_bl(lua_State *L) +static int _olua_fun_cocos2d_T2F_Quad_bl$2(lua_State *L) { olua_startinvoke(L); cocos2d::T2F_Quad *self = nullptr; - cocos2d::Tex2F arg1; /** bl */ + cocos2d::Tex2F *arg1; /** bl */ olua_to_object(L, 1, &self, "cc.T2F_Quad"); olua_check_object(L, 2, &arg1, "cc.Tex2F"); // cocos2d::Tex2F bl - self->bl = arg1; + self->bl = *arg1; olua_endinvoke(L); return 0; } -static int _cocos2d_T2F_Quad_get_br(lua_State *L) +static int _olua_fun_cocos2d_T2F_Quad_bl(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // cocos2d::Tex2F bl + return _olua_fun_cocos2d_T2F_Quad_bl$1(L); + } + + if (num_args == 1) { + // if ((olua_is_object(L, 2, "cc.Tex2F"))) { + // cocos2d::Tex2F bl + return _olua_fun_cocos2d_T2F_Quad_bl$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::T2F_Quad::bl' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_T2F_Quad_br$1(lua_State *L) { olua_startinvoke(L); @@ -9679,32 +10146,53 @@ static int _cocos2d_T2F_Quad_get_br(lua_State *L) // cocos2d::Tex2F br cocos2d::Tex2F &ret = self->br; - int num_ret = olua_pushcopy_object(L, ret, "cc.Tex2F"); + int num_ret = olua_copy_object(L, ret, "cc.Tex2F"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_T2F_Quad_set_br(lua_State *L) +static int _olua_fun_cocos2d_T2F_Quad_br$2(lua_State *L) { olua_startinvoke(L); cocos2d::T2F_Quad *self = nullptr; - cocos2d::Tex2F arg1; /** br */ + cocos2d::Tex2F *arg1; /** br */ olua_to_object(L, 1, &self, "cc.T2F_Quad"); olua_check_object(L, 2, &arg1, "cc.Tex2F"); // cocos2d::Tex2F br - self->br = arg1; + self->br = *arg1; olua_endinvoke(L); return 0; } -static int _cocos2d_T2F_Quad_get_tl(lua_State *L) +static int _olua_fun_cocos2d_T2F_Quad_br(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // cocos2d::Tex2F br + return _olua_fun_cocos2d_T2F_Quad_br$1(L); + } + + if (num_args == 1) { + // if ((olua_is_object(L, 2, "cc.Tex2F"))) { + // cocos2d::Tex2F br + return _olua_fun_cocos2d_T2F_Quad_br$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::T2F_Quad::br' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_T2F_Quad_tl$1(lua_State *L) { olua_startinvoke(L); @@ -9714,32 +10202,53 @@ static int _cocos2d_T2F_Quad_get_tl(lua_State *L) // cocos2d::Tex2F tl cocos2d::Tex2F &ret = self->tl; - int num_ret = olua_pushcopy_object(L, ret, "cc.Tex2F"); + int num_ret = olua_copy_object(L, ret, "cc.Tex2F"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_T2F_Quad_set_tl(lua_State *L) +static int _olua_fun_cocos2d_T2F_Quad_tl$2(lua_State *L) { olua_startinvoke(L); cocos2d::T2F_Quad *self = nullptr; - cocos2d::Tex2F arg1; /** tl */ + cocos2d::Tex2F *arg1; /** tl */ olua_to_object(L, 1, &self, "cc.T2F_Quad"); olua_check_object(L, 2, &arg1, "cc.Tex2F"); // cocos2d::Tex2F tl - self->tl = arg1; + self->tl = *arg1; olua_endinvoke(L); return 0; } -static int _cocos2d_T2F_Quad_get_tr(lua_State *L) +static int _olua_fun_cocos2d_T2F_Quad_tl(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // cocos2d::Tex2F tl + return _olua_fun_cocos2d_T2F_Quad_tl$1(L); + } + + if (num_args == 1) { + // if ((olua_is_object(L, 2, "cc.Tex2F"))) { + // cocos2d::Tex2F tl + return _olua_fun_cocos2d_T2F_Quad_tl$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::T2F_Quad::tl' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_T2F_Quad_tr$1(lua_State *L) { olua_startinvoke(L); @@ -9749,94 +10258,89 @@ static int _cocos2d_T2F_Quad_get_tr(lua_State *L) // cocos2d::Tex2F tr cocos2d::Tex2F &ret = self->tr; - int num_ret = olua_pushcopy_object(L, ret, "cc.Tex2F"); + int num_ret = olua_copy_object(L, ret, "cc.Tex2F"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_T2F_Quad_set_tr(lua_State *L) +static int _olua_fun_cocos2d_T2F_Quad_tr$2(lua_State *L) { olua_startinvoke(L); cocos2d::T2F_Quad *self = nullptr; - cocos2d::Tex2F arg1; /** tr */ + cocos2d::Tex2F *arg1; /** tr */ olua_to_object(L, 1, &self, "cc.T2F_Quad"); olua_check_object(L, 2, &arg1, "cc.Tex2F"); // cocos2d::Tex2F tr - self->tr = arg1; + self->tr = *arg1; olua_endinvoke(L); return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_T2F_Quad(lua_State *L) +static int _olua_fun_cocos2d_T2F_Quad_tr(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // cocos2d::Tex2F tr + return _olua_fun_cocos2d_T2F_Quad_tr$1(L); + } + + if (num_args == 1) { + // if ((olua_is_object(L, 2, "cc.Tex2F"))) { + // cocos2d::Tex2F tr + return _olua_fun_cocos2d_T2F_Quad_tr$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::T2F_Quad::tr' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_cls_cc_T2F_Quad(lua_State *L) { oluacls_class(L, "cc.T2F_Quad"); - oluacls_func(L, "__call", _cocos2d_T2F_Quad___call); - oluacls_func(L, "__gc", _cocos2d_T2F_Quad___gc); - oluacls_func(L, "__olua_move", _cocos2d_T2F_Quad___olua_move); - oluacls_prop(L, "bl", _cocos2d_T2F_Quad_get_bl, _cocos2d_T2F_Quad_set_bl); - oluacls_prop(L, "br", _cocos2d_T2F_Quad_get_br, _cocos2d_T2F_Quad_set_br); - oluacls_prop(L, "tl", _cocos2d_T2F_Quad_get_tl, _cocos2d_T2F_Quad_set_tl); - oluacls_prop(L, "tr", _cocos2d_T2F_Quad_get_tr, _cocos2d_T2F_Quad_set_tr); + oluacls_func(L, "__gc", _olua_fun_cocos2d_T2F_Quad___gc); + oluacls_func(L, "__olua_move", _olua_fun_cocos2d_T2F_Quad___olua_move); + oluacls_prop(L, "bl", _olua_fun_cocos2d_T2F_Quad_bl, _olua_fun_cocos2d_T2F_Quad_bl); + oluacls_prop(L, "br", _olua_fun_cocos2d_T2F_Quad_br, _olua_fun_cocos2d_T2F_Quad_br); + oluacls_prop(L, "tl", _olua_fun_cocos2d_T2F_Quad_tl, _olua_fun_cocos2d_T2F_Quad_tl); + oluacls_prop(L, "tr", _olua_fun_cocos2d_T2F_Quad_tr, _olua_fun_cocos2d_T2F_Quad_tr); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_T2F_Quad(lua_State *L) +{ + olua_require(L, "cocos2d_types", luaopen_cocos2d_types); + if (!olua_getclass(L, "cc.T2F_Quad")) { + luaL_error(L, "class not found: cocos2d::T2F_Quad"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_ccBezierConfig___call(lua_State *L) +static int _olua_fun_cocos2d_ccBezierConfig___gc(lua_State *L) { olua_startinvoke(L); - cocos2d::ccBezierConfig ret; - - luaL_checktype(L, 2, LUA_TTABLE); + auto self = (cocos2d::ccBezierConfig *)olua_toobj(L, 1, "cc.ccBezierConfig"); + olua_postgc(L, self); - cocos2d::Vec2 arg1; /** endPosition */ - cocos2d::Vec2 arg2; /** controlPoint_1 */ - cocos2d::Vec2 arg3; /** controlPoint_2 */ + olua_endinvoke(L); - olua_getfield(L, 2, "endPosition"); - olua_check_object(L, -1, &arg1, "cc.Vec2"); - ret.endPosition = arg1; - lua_pop(L, 1); + return 0; +} - olua_getfield(L, 2, "controlPoint_1"); - olua_check_object(L, -1, &arg2, "cc.Vec2"); - ret.controlPoint_1 = arg2; - lua_pop(L, 1); - - olua_getfield(L, 2, "controlPoint_2"); - olua_check_object(L, -1, &arg3, "cc.Vec2"); - ret.controlPoint_2 = arg3; - lua_pop(L, 1); - - olua_pushcopy_object(L, ret, "cc.ccBezierConfig"); - - olua_endinvoke(L); - - return 1; -} - -static int _cocos2d_ccBezierConfig___gc(lua_State *L) -{ - olua_startinvoke(L); - - auto self = (cocos2d::ccBezierConfig *)olua_toobj(L, 1, "cc.ccBezierConfig"); - olua_postgc(L, self); - - olua_endinvoke(L); - - return 0; -} - -static int _cocos2d_ccBezierConfig___olua_move(lua_State *L) +static int _olua_fun_cocos2d_ccBezierConfig___olua_move(lua_State *L) { olua_startinvoke(L); @@ -9848,7 +10352,7 @@ static int _cocos2d_ccBezierConfig___olua_move(lua_State *L) return 1; } -static int _cocos2d_ccBezierConfig_get_controlPoint_1(lua_State *L) +static int _olua_fun_cocos2d_ccBezierConfig_controlPoint_1$1(lua_State *L) { olua_startinvoke(L); @@ -9858,32 +10362,53 @@ static int _cocos2d_ccBezierConfig_get_controlPoint_1(lua_State *L) // cocos2d::Vec2 controlPoint_1 cocos2d::Vec2 &ret = self->controlPoint_1; - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec2"); + int num_ret = olua_copy_object(L, ret, "cc.Vec2"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_ccBezierConfig_set_controlPoint_1(lua_State *L) +static int _olua_fun_cocos2d_ccBezierConfig_controlPoint_1$2(lua_State *L) { olua_startinvoke(L); cocos2d::ccBezierConfig *self = nullptr; - cocos2d::Vec2 arg1; /** controlPoint_1 */ + cocos2d::Vec2 *arg1; /** controlPoint_1 */ olua_to_object(L, 1, &self, "cc.ccBezierConfig"); olua_check_object(L, 2, &arg1, "cc.Vec2"); // cocos2d::Vec2 controlPoint_1 - self->controlPoint_1 = arg1; + self->controlPoint_1 = *arg1; olua_endinvoke(L); return 0; } -static int _cocos2d_ccBezierConfig_get_controlPoint_2(lua_State *L) +static int _olua_fun_cocos2d_ccBezierConfig_controlPoint_1(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // cocos2d::Vec2 controlPoint_1 + return _olua_fun_cocos2d_ccBezierConfig_controlPoint_1$1(L); + } + + if (num_args == 1) { + // if ((olua_is_object(L, 2, "cc.Vec2"))) { + // cocos2d::Vec2 controlPoint_1 + return _olua_fun_cocos2d_ccBezierConfig_controlPoint_1$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::ccBezierConfig::controlPoint_1' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_ccBezierConfig_controlPoint_2$1(lua_State *L) { olua_startinvoke(L); @@ -9893,32 +10418,53 @@ static int _cocos2d_ccBezierConfig_get_controlPoint_2(lua_State *L) // cocos2d::Vec2 controlPoint_2 cocos2d::Vec2 &ret = self->controlPoint_2; - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec2"); + int num_ret = olua_copy_object(L, ret, "cc.Vec2"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_ccBezierConfig_set_controlPoint_2(lua_State *L) +static int _olua_fun_cocos2d_ccBezierConfig_controlPoint_2$2(lua_State *L) { olua_startinvoke(L); cocos2d::ccBezierConfig *self = nullptr; - cocos2d::Vec2 arg1; /** controlPoint_2 */ + cocos2d::Vec2 *arg1; /** controlPoint_2 */ olua_to_object(L, 1, &self, "cc.ccBezierConfig"); olua_check_object(L, 2, &arg1, "cc.Vec2"); // cocos2d::Vec2 controlPoint_2 - self->controlPoint_2 = arg1; + self->controlPoint_2 = *arg1; olua_endinvoke(L); return 0; } -static int _cocos2d_ccBezierConfig_get_endPosition(lua_State *L) +static int _olua_fun_cocos2d_ccBezierConfig_controlPoint_2(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // cocos2d::Vec2 controlPoint_2 + return _olua_fun_cocos2d_ccBezierConfig_controlPoint_2$1(L); + } + + if (num_args == 1) { + // if ((olua_is_object(L, 2, "cc.Vec2"))) { + // cocos2d::Vec2 controlPoint_2 + return _olua_fun_cocos2d_ccBezierConfig_controlPoint_2$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::ccBezierConfig::controlPoint_2' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_ccBezierConfig_endPosition$1(lua_State *L) { olua_startinvoke(L); @@ -9928,143 +10474,76 @@ static int _cocos2d_ccBezierConfig_get_endPosition(lua_State *L) // cocos2d::Vec2 endPosition cocos2d::Vec2 &ret = self->endPosition; - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec2"); + int num_ret = olua_copy_object(L, ret, "cc.Vec2"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_ccBezierConfig_set_endPosition(lua_State *L) +static int _olua_fun_cocos2d_ccBezierConfig_endPosition$2(lua_State *L) { olua_startinvoke(L); cocos2d::ccBezierConfig *self = nullptr; - cocos2d::Vec2 arg1; /** endPosition */ + cocos2d::Vec2 *arg1; /** endPosition */ olua_to_object(L, 1, &self, "cc.ccBezierConfig"); olua_check_object(L, 2, &arg1, "cc.Vec2"); // cocos2d::Vec2 endPosition - self->endPosition = arg1; + self->endPosition = *arg1; olua_endinvoke(L); return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ccBezierConfig(lua_State *L) -{ - oluacls_class(L, "cc.ccBezierConfig"); - oluacls_func(L, "__call", _cocos2d_ccBezierConfig___call); - oluacls_func(L, "__gc", _cocos2d_ccBezierConfig___gc); - oluacls_func(L, "__olua_move", _cocos2d_ccBezierConfig___olua_move); - oluacls_prop(L, "controlPoint_1", _cocos2d_ccBezierConfig_get_controlPoint_1, _cocos2d_ccBezierConfig_set_controlPoint_1); - oluacls_prop(L, "controlPoint_2", _cocos2d_ccBezierConfig_get_controlPoint_2, _cocos2d_ccBezierConfig_set_controlPoint_2); - oluacls_prop(L, "endPosition", _cocos2d_ccBezierConfig_get_endPosition, _cocos2d_ccBezierConfig_set_endPosition); - - return 1; -} -OLUA_END_DECLS - -static int _cocos2d_TTFConfig___call(lua_State *L) +static int _olua_fun_cocos2d_ccBezierConfig_endPosition(lua_State *L) { - olua_startinvoke(L); - - cocos2d::TTFConfig ret; - - luaL_checktype(L, 2, LUA_TTABLE); - - std::string arg1; /** fontFilePath */ - float arg2 = 0; /** fontSize */ - cocos2d::GlyphCollection arg3 = (cocos2d::GlyphCollection)0; /** glyphs */ - const char *arg4 = nullptr; /** customGlyphs */ - bool arg5 = false; /** distanceFieldEnabled */ - int arg6 = 0; /** outlineSize */ - bool arg7 = false; /** italics */ - bool arg8 = false; /** bold */ - bool arg9 = false; /** underline */ - bool arg10 = false; /** strikethrough */ - - olua_getfield(L, 2, "fontFilePath"); - if (!olua_isnoneornil(L, -1)) { - olua_check_string(L, -1, &arg1); - ret.fontFilePath = arg1; - } - lua_pop(L, 1); - - olua_getfield(L, 2, "fontSize"); - if (!olua_isnoneornil(L, -1)) { - olua_check_number(L, -1, &arg2); - ret.fontSize = arg2; - } - lua_pop(L, 1); - - olua_getfield(L, 2, "glyphs"); - if (!olua_isnoneornil(L, -1)) { - olua_check_enum(L, -1, &arg3); - ret.glyphs = arg3; - } - lua_pop(L, 1); + int num_args = lua_gettop(L) - 1; - olua_getfield(L, 2, "customGlyphs"); - if (!olua_isnoneornil(L, -1)) { - olua_check_string(L, -1, &arg4); - ret.customGlyphs = arg4; + if (num_args == 0) { + // cocos2d::Vec2 endPosition + return _olua_fun_cocos2d_ccBezierConfig_endPosition$1(L); } - lua_pop(L, 1); - olua_getfield(L, 2, "distanceFieldEnabled"); - if (!olua_isnoneornil(L, -1)) { - olua_check_bool(L, -1, &arg5); - ret.distanceFieldEnabled = arg5; + if (num_args == 1) { + // if ((olua_is_object(L, 2, "cc.Vec2"))) { + // cocos2d::Vec2 endPosition + return _olua_fun_cocos2d_ccBezierConfig_endPosition$2(L); + // } } - lua_pop(L, 1); - olua_getfield(L, 2, "outlineSize"); - if (!olua_isnoneornil(L, -1)) { - olua_check_integer(L, -1, &arg6); - ret.outlineSize = arg6; - } - lua_pop(L, 1); + luaL_error(L, "method 'cocos2d::ccBezierConfig::endPosition' not support '%d' arguments", num_args); - olua_getfield(L, 2, "italics"); - if (!olua_isnoneornil(L, -1)) { - olua_check_bool(L, -1, &arg7); - ret.italics = arg7; - } - lua_pop(L, 1); + return 0; +} - olua_getfield(L, 2, "bold"); - if (!olua_isnoneornil(L, -1)) { - olua_check_bool(L, -1, &arg8); - ret.bold = arg8; - } - lua_pop(L, 1); +static int _olua_cls_cc_ccBezierConfig(lua_State *L) +{ + oluacls_class(L, "cc.ccBezierConfig"); + oluacls_func(L, "__gc", _olua_fun_cocos2d_ccBezierConfig___gc); + oluacls_func(L, "__olua_move", _olua_fun_cocos2d_ccBezierConfig___olua_move); + oluacls_prop(L, "controlPoint_1", _olua_fun_cocos2d_ccBezierConfig_controlPoint_1, _olua_fun_cocos2d_ccBezierConfig_controlPoint_1); + oluacls_prop(L, "controlPoint_2", _olua_fun_cocos2d_ccBezierConfig_controlPoint_2, _olua_fun_cocos2d_ccBezierConfig_controlPoint_2); + oluacls_prop(L, "endPosition", _olua_fun_cocos2d_ccBezierConfig_endPosition, _olua_fun_cocos2d_ccBezierConfig_endPosition); - olua_getfield(L, 2, "underline"); - if (!olua_isnoneornil(L, -1)) { - olua_check_bool(L, -1, &arg9); - ret.underline = arg9; - } - lua_pop(L, 1); + return 1; +} - olua_getfield(L, 2, "strikethrough"); - if (!olua_isnoneornil(L, -1)) { - olua_check_bool(L, -1, &arg10); - ret.strikethrough = arg10; +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_ccBezierConfig(lua_State *L) +{ + olua_require(L, "cocos2d_types", luaopen_cocos2d_types); + if (!olua_getclass(L, "cc.ccBezierConfig")) { + luaL_error(L, "class not found: cocos2d::ccBezierConfig"); } - lua_pop(L, 1); - - olua_pushcopy_object(L, ret, "cc.TTFConfig"); - - olua_endinvoke(L); - return 1; } +OLUA_END_DECLS -static int _cocos2d_TTFConfig___gc(lua_State *L) +static int _olua_fun_cocos2d_TTFConfig___gc(lua_State *L) { olua_startinvoke(L); @@ -10076,7 +10555,7 @@ static int _cocos2d_TTFConfig___gc(lua_State *L) return 0; } -static int _cocos2d_TTFConfig___olua_move(lua_State *L) +static int _olua_fun_cocos2d_TTFConfig___olua_move(lua_State *L) { olua_startinvoke(L); @@ -10088,7 +10567,7 @@ static int _cocos2d_TTFConfig___olua_move(lua_State *L) return 1; } -static int _cocos2d_TTFConfig_get_bold(lua_State *L) +static int _olua_fun_cocos2d_TTFConfig_bold$1(lua_State *L) { olua_startinvoke(L); @@ -10096,7 +10575,7 @@ static int _cocos2d_TTFConfig_get_bold(lua_State *L) olua_to_object(L, 1, &self, "cc.TTFConfig"); - // @optional bool bold + // bool bold bool ret = self->bold; int num_ret = olua_push_bool(L, ret); @@ -10105,7 +10584,7 @@ static int _cocos2d_TTFConfig_get_bold(lua_State *L) return num_ret; } -static int _cocos2d_TTFConfig_set_bold(lua_State *L) +static int _olua_fun_cocos2d_TTFConfig_bold$2(lua_State *L) { olua_startinvoke(L); @@ -10115,7 +10594,7 @@ static int _cocos2d_TTFConfig_set_bold(lua_State *L) olua_to_object(L, 1, &self, "cc.TTFConfig"); olua_check_bool(L, 2, &arg1); - // @optional bool bold + // bool bold self->bold = arg1; olua_endinvoke(L); @@ -10123,7 +10602,28 @@ static int _cocos2d_TTFConfig_set_bold(lua_State *L) return 0; } -static int _cocos2d_TTFConfig_get_customGlyphs(lua_State *L) +static int _olua_fun_cocos2d_TTFConfig_bold(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // bool bold + return _olua_fun_cocos2d_TTFConfig_bold$1(L); + } + + if (num_args == 1) { + // if ((olua_is_bool(L, 2))) { + // bool bold + return _olua_fun_cocos2d_TTFConfig_bold$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::TTFConfig::bold' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_TTFConfig_customGlyphs$1(lua_State *L) { olua_startinvoke(L); @@ -10131,7 +10631,7 @@ static int _cocos2d_TTFConfig_get_customGlyphs(lua_State *L) olua_to_object(L, 1, &self, "cc.TTFConfig"); - // @optional const char *customGlyphs + // const char *customGlyphs const char *ret = self->customGlyphs; int num_ret = olua_push_string(L, ret); @@ -10140,7 +10640,7 @@ static int _cocos2d_TTFConfig_get_customGlyphs(lua_State *L) return num_ret; } -static int _cocos2d_TTFConfig_set_customGlyphs(lua_State *L) +static int _olua_fun_cocos2d_TTFConfig_customGlyphs$2(lua_State *L) { olua_startinvoke(L); @@ -10150,7 +10650,7 @@ static int _cocos2d_TTFConfig_set_customGlyphs(lua_State *L) olua_to_object(L, 1, &self, "cc.TTFConfig"); olua_check_string(L, 2, &arg1); - // @optional const char *customGlyphs + // const char *customGlyphs self->customGlyphs = arg1; olua_endinvoke(L); @@ -10158,7 +10658,28 @@ static int _cocos2d_TTFConfig_set_customGlyphs(lua_State *L) return 0; } -static int _cocos2d_TTFConfig_get_distanceFieldEnabled(lua_State *L) +static int _olua_fun_cocos2d_TTFConfig_customGlyphs(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // const char *customGlyphs + return _olua_fun_cocos2d_TTFConfig_customGlyphs$1(L); + } + + if (num_args == 1) { + // if ((olua_is_string(L, 2))) { + // const char *customGlyphs + return _olua_fun_cocos2d_TTFConfig_customGlyphs$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::TTFConfig::customGlyphs' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_TTFConfig_distanceFieldEnabled$1(lua_State *L) { olua_startinvoke(L); @@ -10166,7 +10687,7 @@ static int _cocos2d_TTFConfig_get_distanceFieldEnabled(lua_State *L) olua_to_object(L, 1, &self, "cc.TTFConfig"); - // @optional bool distanceFieldEnabled + // bool distanceFieldEnabled bool ret = self->distanceFieldEnabled; int num_ret = olua_push_bool(L, ret); @@ -10175,7 +10696,7 @@ static int _cocos2d_TTFConfig_get_distanceFieldEnabled(lua_State *L) return num_ret; } -static int _cocos2d_TTFConfig_set_distanceFieldEnabled(lua_State *L) +static int _olua_fun_cocos2d_TTFConfig_distanceFieldEnabled$2(lua_State *L) { olua_startinvoke(L); @@ -10185,7 +10706,7 @@ static int _cocos2d_TTFConfig_set_distanceFieldEnabled(lua_State *L) olua_to_object(L, 1, &self, "cc.TTFConfig"); olua_check_bool(L, 2, &arg1); - // @optional bool distanceFieldEnabled + // bool distanceFieldEnabled self->distanceFieldEnabled = arg1; olua_endinvoke(L); @@ -10193,7 +10714,28 @@ static int _cocos2d_TTFConfig_set_distanceFieldEnabled(lua_State *L) return 0; } -static int _cocos2d_TTFConfig_get_fontFilePath(lua_State *L) +static int _olua_fun_cocos2d_TTFConfig_distanceFieldEnabled(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // bool distanceFieldEnabled + return _olua_fun_cocos2d_TTFConfig_distanceFieldEnabled$1(L); + } + + if (num_args == 1) { + // if ((olua_is_bool(L, 2))) { + // bool distanceFieldEnabled + return _olua_fun_cocos2d_TTFConfig_distanceFieldEnabled$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::TTFConfig::distanceFieldEnabled' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_TTFConfig_fontFilePath$1(lua_State *L) { olua_startinvoke(L); @@ -10201,7 +10743,7 @@ static int _cocos2d_TTFConfig_get_fontFilePath(lua_State *L) olua_to_object(L, 1, &self, "cc.TTFConfig"); - // @optional std::string fontFilePath + // std::string fontFilePath std::string ret = self->fontFilePath; int num_ret = olua_push_string(L, ret); @@ -10210,7 +10752,7 @@ static int _cocos2d_TTFConfig_get_fontFilePath(lua_State *L) return num_ret; } -static int _cocos2d_TTFConfig_set_fontFilePath(lua_State *L) +static int _olua_fun_cocos2d_TTFConfig_fontFilePath$2(lua_State *L) { olua_startinvoke(L); @@ -10220,7 +10762,7 @@ static int _cocos2d_TTFConfig_set_fontFilePath(lua_State *L) olua_to_object(L, 1, &self, "cc.TTFConfig"); olua_check_string(L, 2, &arg1); - // @optional std::string fontFilePath + // std::string fontFilePath self->fontFilePath = arg1; olua_endinvoke(L); @@ -10228,7 +10770,28 @@ static int _cocos2d_TTFConfig_set_fontFilePath(lua_State *L) return 0; } -static int _cocos2d_TTFConfig_get_fontSize(lua_State *L) +static int _olua_fun_cocos2d_TTFConfig_fontFilePath(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // std::string fontFilePath + return _olua_fun_cocos2d_TTFConfig_fontFilePath$1(L); + } + + if (num_args == 1) { + // if ((olua_is_string(L, 2))) { + // std::string fontFilePath + return _olua_fun_cocos2d_TTFConfig_fontFilePath$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::TTFConfig::fontFilePath' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_TTFConfig_fontSize$1(lua_State *L) { olua_startinvoke(L); @@ -10236,7 +10799,7 @@ static int _cocos2d_TTFConfig_get_fontSize(lua_State *L) olua_to_object(L, 1, &self, "cc.TTFConfig"); - // @optional float fontSize + // float fontSize float ret = self->fontSize; int num_ret = olua_push_number(L, ret); @@ -10245,7 +10808,7 @@ static int _cocos2d_TTFConfig_get_fontSize(lua_State *L) return num_ret; } -static int _cocos2d_TTFConfig_set_fontSize(lua_State *L) +static int _olua_fun_cocos2d_TTFConfig_fontSize$2(lua_State *L) { olua_startinvoke(L); @@ -10255,7 +10818,7 @@ static int _cocos2d_TTFConfig_set_fontSize(lua_State *L) olua_to_object(L, 1, &self, "cc.TTFConfig"); olua_check_number(L, 2, &arg1); - // @optional float fontSize + // float fontSize self->fontSize = arg1; olua_endinvoke(L); @@ -10263,7 +10826,28 @@ static int _cocos2d_TTFConfig_set_fontSize(lua_State *L) return 0; } -static int _cocos2d_TTFConfig_get_glyphs(lua_State *L) +static int _olua_fun_cocos2d_TTFConfig_fontSize(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float fontSize + return _olua_fun_cocos2d_TTFConfig_fontSize$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float fontSize + return _olua_fun_cocos2d_TTFConfig_fontSize$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::TTFConfig::fontSize' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_TTFConfig_glyphs$1(lua_State *L) { olua_startinvoke(L); @@ -10271,7 +10855,7 @@ static int _cocos2d_TTFConfig_get_glyphs(lua_State *L) olua_to_object(L, 1, &self, "cc.TTFConfig"); - // @optional cocos2d::GlyphCollection glyphs + // cocos2d::GlyphCollection glyphs cocos2d::GlyphCollection ret = self->glyphs; int num_ret = olua_push_enum(L, ret); @@ -10280,7 +10864,7 @@ static int _cocos2d_TTFConfig_get_glyphs(lua_State *L) return num_ret; } -static int _cocos2d_TTFConfig_set_glyphs(lua_State *L) +static int _olua_fun_cocos2d_TTFConfig_glyphs$2(lua_State *L) { olua_startinvoke(L); @@ -10290,7 +10874,7 @@ static int _cocos2d_TTFConfig_set_glyphs(lua_State *L) olua_to_object(L, 1, &self, "cc.TTFConfig"); olua_check_enum(L, 2, &arg1); - // @optional cocos2d::GlyphCollection glyphs + // cocos2d::GlyphCollection glyphs self->glyphs = arg1; olua_endinvoke(L); @@ -10298,7 +10882,28 @@ static int _cocos2d_TTFConfig_set_glyphs(lua_State *L) return 0; } -static int _cocos2d_TTFConfig_get_italics(lua_State *L) +static int _olua_fun_cocos2d_TTFConfig_glyphs(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // cocos2d::GlyphCollection glyphs + return _olua_fun_cocos2d_TTFConfig_glyphs$1(L); + } + + if (num_args == 1) { + // if ((olua_is_enum(L, 2))) { + // cocos2d::GlyphCollection glyphs + return _olua_fun_cocos2d_TTFConfig_glyphs$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::TTFConfig::glyphs' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_TTFConfig_italics$1(lua_State *L) { olua_startinvoke(L); @@ -10306,7 +10911,7 @@ static int _cocos2d_TTFConfig_get_italics(lua_State *L) olua_to_object(L, 1, &self, "cc.TTFConfig"); - // @optional bool italics + // bool italics bool ret = self->italics; int num_ret = olua_push_bool(L, ret); @@ -10315,7 +10920,7 @@ static int _cocos2d_TTFConfig_get_italics(lua_State *L) return num_ret; } -static int _cocos2d_TTFConfig_set_italics(lua_State *L) +static int _olua_fun_cocos2d_TTFConfig_italics$2(lua_State *L) { olua_startinvoke(L); @@ -10325,7 +10930,7 @@ static int _cocos2d_TTFConfig_set_italics(lua_State *L) olua_to_object(L, 1, &self, "cc.TTFConfig"); olua_check_bool(L, 2, &arg1); - // @optional bool italics + // bool italics self->italics = arg1; olua_endinvoke(L); @@ -10333,7 +10938,28 @@ static int _cocos2d_TTFConfig_set_italics(lua_State *L) return 0; } -static int _cocos2d_TTFConfig_get_outlineSize(lua_State *L) +static int _olua_fun_cocos2d_TTFConfig_italics(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // bool italics + return _olua_fun_cocos2d_TTFConfig_italics$1(L); + } + + if (num_args == 1) { + // if ((olua_is_bool(L, 2))) { + // bool italics + return _olua_fun_cocos2d_TTFConfig_italics$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::TTFConfig::italics' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_TTFConfig_outlineSize$1(lua_State *L) { olua_startinvoke(L); @@ -10341,7 +10967,7 @@ static int _cocos2d_TTFConfig_get_outlineSize(lua_State *L) olua_to_object(L, 1, &self, "cc.TTFConfig"); - // @optional int outlineSize + // int outlineSize int ret = self->outlineSize; int num_ret = olua_push_integer(L, ret); @@ -10350,7 +10976,7 @@ static int _cocos2d_TTFConfig_get_outlineSize(lua_State *L) return num_ret; } -static int _cocos2d_TTFConfig_set_outlineSize(lua_State *L) +static int _olua_fun_cocos2d_TTFConfig_outlineSize$2(lua_State *L) { olua_startinvoke(L); @@ -10360,7 +10986,7 @@ static int _cocos2d_TTFConfig_set_outlineSize(lua_State *L) olua_to_object(L, 1, &self, "cc.TTFConfig"); olua_check_integer(L, 2, &arg1); - // @optional int outlineSize + // int outlineSize self->outlineSize = arg1; olua_endinvoke(L); @@ -10368,7 +10994,28 @@ static int _cocos2d_TTFConfig_set_outlineSize(lua_State *L) return 0; } -static int _cocos2d_TTFConfig_get_strikethrough(lua_State *L) +static int _olua_fun_cocos2d_TTFConfig_outlineSize(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // int outlineSize + return _olua_fun_cocos2d_TTFConfig_outlineSize$1(L); + } + + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // int outlineSize + return _olua_fun_cocos2d_TTFConfig_outlineSize$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::TTFConfig::outlineSize' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_TTFConfig_strikethrough$1(lua_State *L) { olua_startinvoke(L); @@ -10376,7 +11023,7 @@ static int _cocos2d_TTFConfig_get_strikethrough(lua_State *L) olua_to_object(L, 1, &self, "cc.TTFConfig"); - // @optional bool strikethrough + // bool strikethrough bool ret = self->strikethrough; int num_ret = olua_push_bool(L, ret); @@ -10385,7 +11032,7 @@ static int _cocos2d_TTFConfig_get_strikethrough(lua_State *L) return num_ret; } -static int _cocos2d_TTFConfig_set_strikethrough(lua_State *L) +static int _olua_fun_cocos2d_TTFConfig_strikethrough$2(lua_State *L) { olua_startinvoke(L); @@ -10395,7 +11042,7 @@ static int _cocos2d_TTFConfig_set_strikethrough(lua_State *L) olua_to_object(L, 1, &self, "cc.TTFConfig"); olua_check_bool(L, 2, &arg1); - // @optional bool strikethrough + // bool strikethrough self->strikethrough = arg1; olua_endinvoke(L); @@ -10403,7 +11050,28 @@ static int _cocos2d_TTFConfig_set_strikethrough(lua_State *L) return 0; } -static int _cocos2d_TTFConfig_get_underline(lua_State *L) +static int _olua_fun_cocos2d_TTFConfig_strikethrough(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // bool strikethrough + return _olua_fun_cocos2d_TTFConfig_strikethrough$1(L); + } + + if (num_args == 1) { + // if ((olua_is_bool(L, 2))) { + // bool strikethrough + return _olua_fun_cocos2d_TTFConfig_strikethrough$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::TTFConfig::strikethrough' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_TTFConfig_underline$1(lua_State *L) { olua_startinvoke(L); @@ -10411,7 +11079,7 @@ static int _cocos2d_TTFConfig_get_underline(lua_State *L) olua_to_object(L, 1, &self, "cc.TTFConfig"); - // @optional bool underline + // bool underline bool ret = self->underline; int num_ret = olua_push_bool(L, ret); @@ -10420,7 +11088,7 @@ static int _cocos2d_TTFConfig_get_underline(lua_State *L) return num_ret; } -static int _cocos2d_TTFConfig_set_underline(lua_State *L) +static int _olua_fun_cocos2d_TTFConfig_underline$2(lua_State *L) { olua_startinvoke(L); @@ -10430,7 +11098,7 @@ static int _cocos2d_TTFConfig_set_underline(lua_State *L) olua_to_object(L, 1, &self, "cc.TTFConfig"); olua_check_bool(L, 2, &arg1); - // @optional bool underline + // bool underline self->underline = arg1; olua_endinvoke(L); @@ -10438,57 +11106,58 @@ static int _cocos2d_TTFConfig_set_underline(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_TTFConfig(lua_State *L) -{ - oluacls_class(L, "cc.TTFConfig"); - oluacls_func(L, "__call", _cocos2d_TTFConfig___call); - oluacls_func(L, "__gc", _cocos2d_TTFConfig___gc); - oluacls_func(L, "__olua_move", _cocos2d_TTFConfig___olua_move); - oluacls_prop(L, "bold", _cocos2d_TTFConfig_get_bold, _cocos2d_TTFConfig_set_bold); - oluacls_prop(L, "customGlyphs", _cocos2d_TTFConfig_get_customGlyphs, _cocos2d_TTFConfig_set_customGlyphs); - oluacls_prop(L, "distanceFieldEnabled", _cocos2d_TTFConfig_get_distanceFieldEnabled, _cocos2d_TTFConfig_set_distanceFieldEnabled); - oluacls_prop(L, "fontFilePath", _cocos2d_TTFConfig_get_fontFilePath, _cocos2d_TTFConfig_set_fontFilePath); - oluacls_prop(L, "fontSize", _cocos2d_TTFConfig_get_fontSize, _cocos2d_TTFConfig_set_fontSize); - oluacls_prop(L, "glyphs", _cocos2d_TTFConfig_get_glyphs, _cocos2d_TTFConfig_set_glyphs); - oluacls_prop(L, "italics", _cocos2d_TTFConfig_get_italics, _cocos2d_TTFConfig_set_italics); - oluacls_prop(L, "outlineSize", _cocos2d_TTFConfig_get_outlineSize, _cocos2d_TTFConfig_set_outlineSize); - oluacls_prop(L, "strikethrough", _cocos2d_TTFConfig_get_strikethrough, _cocos2d_TTFConfig_set_strikethrough); - oluacls_prop(L, "underline", _cocos2d_TTFConfig_get_underline, _cocos2d_TTFConfig_set_underline); - - return 1; -} -OLUA_END_DECLS - -static int _cocos2d_BlendFunc___call(lua_State *L) +static int _olua_fun_cocos2d_TTFConfig_underline(lua_State *L) { - olua_startinvoke(L); - - cocos2d::BlendFunc ret; + int num_args = lua_gettop(L) - 1; - luaL_checktype(L, 2, LUA_TTABLE); + if (num_args == 0) { + // bool underline + return _olua_fun_cocos2d_TTFConfig_underline$1(L); + } - cocos2d::backend::BlendFactor arg1 = (cocos2d::backend::BlendFactor)0; /** src */ - cocos2d::backend::BlendFactor arg2 = (cocos2d::backend::BlendFactor)0; /** dst */ + if (num_args == 1) { + // if ((olua_is_bool(L, 2))) { + // bool underline + return _olua_fun_cocos2d_TTFConfig_underline$2(L); + // } + } - olua_getfield(L, 2, "src"); - olua_check_enum(L, -1, &arg1); - ret.src = arg1; - lua_pop(L, 1); + luaL_error(L, "method 'cocos2d::TTFConfig::underline' not support '%d' arguments", num_args); - olua_getfield(L, 2, "dst"); - olua_check_enum(L, -1, &arg2); - ret.dst = arg2; - lua_pop(L, 1); + return 0; +} - olua_pushcopy_object(L, ret, "cc.BlendFunc"); +static int _olua_cls_cc_TTFConfig(lua_State *L) +{ + oluacls_class(L, "cc.TTFConfig"); + oluacls_func(L, "__gc", _olua_fun_cocos2d_TTFConfig___gc); + oluacls_func(L, "__olua_move", _olua_fun_cocos2d_TTFConfig___olua_move); + oluacls_prop(L, "bold", _olua_fun_cocos2d_TTFConfig_bold, _olua_fun_cocos2d_TTFConfig_bold); + oluacls_prop(L, "customGlyphs", _olua_fun_cocos2d_TTFConfig_customGlyphs, _olua_fun_cocos2d_TTFConfig_customGlyphs); + oluacls_prop(L, "distanceFieldEnabled", _olua_fun_cocos2d_TTFConfig_distanceFieldEnabled, _olua_fun_cocos2d_TTFConfig_distanceFieldEnabled); + oluacls_prop(L, "fontFilePath", _olua_fun_cocos2d_TTFConfig_fontFilePath, _olua_fun_cocos2d_TTFConfig_fontFilePath); + oluacls_prop(L, "fontSize", _olua_fun_cocos2d_TTFConfig_fontSize, _olua_fun_cocos2d_TTFConfig_fontSize); + oluacls_prop(L, "glyphs", _olua_fun_cocos2d_TTFConfig_glyphs, _olua_fun_cocos2d_TTFConfig_glyphs); + oluacls_prop(L, "italics", _olua_fun_cocos2d_TTFConfig_italics, _olua_fun_cocos2d_TTFConfig_italics); + oluacls_prop(L, "outlineSize", _olua_fun_cocos2d_TTFConfig_outlineSize, _olua_fun_cocos2d_TTFConfig_outlineSize); + oluacls_prop(L, "strikethrough", _olua_fun_cocos2d_TTFConfig_strikethrough, _olua_fun_cocos2d_TTFConfig_strikethrough); + oluacls_prop(L, "underline", _olua_fun_cocos2d_TTFConfig_underline, _olua_fun_cocos2d_TTFConfig_underline); - olua_endinvoke(L); + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_TTFConfig(lua_State *L) +{ + olua_require(L, "cocos2d_types", luaopen_cocos2d_types); + if (!olua_getclass(L, "cc.TTFConfig")) { + luaL_error(L, "class not found: cocos2d::TTFConfig"); + } return 1; } +OLUA_END_DECLS -static int _cocos2d_BlendFunc___gc(lua_State *L) +static int _olua_fun_cocos2d_BlendFunc___gc(lua_State *L) { olua_startinvoke(L); @@ -10500,7 +11169,7 @@ static int _cocos2d_BlendFunc___gc(lua_State *L) return 0; } -static int _cocos2d_BlendFunc___olua_move(lua_State *L) +static int _olua_fun_cocos2d_BlendFunc___olua_move(lua_State *L) { olua_startinvoke(L); @@ -10512,7 +11181,7 @@ static int _cocos2d_BlendFunc___olua_move(lua_State *L) return 1; } -static int _cocos2d_BlendFunc_get_dst(lua_State *L) +static int _olua_fun_cocos2d_BlendFunc_dst$1(lua_State *L) { olua_startinvoke(L); @@ -10529,7 +11198,7 @@ static int _cocos2d_BlendFunc_get_dst(lua_State *L) return num_ret; } -static int _cocos2d_BlendFunc_set_dst(lua_State *L) +static int _olua_fun_cocos2d_BlendFunc_dst$2(lua_State *L) { olua_startinvoke(L); @@ -10547,13 +11216,34 @@ static int _cocos2d_BlendFunc_set_dst(lua_State *L) return 0; } -static int _cocos2d_BlendFunc_get_src(lua_State *L) +static int _olua_fun_cocos2d_BlendFunc_dst(lua_State *L) { - olua_startinvoke(L); + int num_args = lua_gettop(L) - 1; - cocos2d::BlendFunc *self = nullptr; + if (num_args == 0) { + // cocos2d::backend::BlendFactor dst + return _olua_fun_cocos2d_BlendFunc_dst$1(L); + } - olua_to_object(L, 1, &self, "cc.BlendFunc"); + if (num_args == 1) { + // if ((olua_is_enum(L, 2))) { + // cocos2d::backend::BlendFactor dst + return _olua_fun_cocos2d_BlendFunc_dst$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::BlendFunc::dst' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_BlendFunc_src$1(lua_State *L) +{ + olua_startinvoke(L); + + cocos2d::BlendFunc *self = nullptr; + + olua_to_object(L, 1, &self, "cc.BlendFunc"); // cocos2d::backend::BlendFactor src cocos2d::backend::BlendFactor ret = self->src; @@ -10564,7 +11254,7 @@ static int _cocos2d_BlendFunc_get_src(lua_State *L) return num_ret; } -static int _cocos2d_BlendFunc_set_src(lua_State *L) +static int _olua_fun_cocos2d_BlendFunc_src$2(lua_State *L) { olua_startinvoke(L); @@ -10582,15 +11272,34 @@ static int _cocos2d_BlendFunc_set_src(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_BlendFunc(lua_State *L) +static int _olua_fun_cocos2d_BlendFunc_src(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // cocos2d::backend::BlendFactor src + return _olua_fun_cocos2d_BlendFunc_src$1(L); + } + + if (num_args == 1) { + // if ((olua_is_enum(L, 2))) { + // cocos2d::backend::BlendFactor src + return _olua_fun_cocos2d_BlendFunc_src$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::BlendFunc::src' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_cls_cc_BlendFunc(lua_State *L) { oluacls_class(L, "cc.BlendFunc"); - oluacls_func(L, "__call", _cocos2d_BlendFunc___call); - oluacls_func(L, "__gc", _cocos2d_BlendFunc___gc); - oluacls_func(L, "__olua_move", _cocos2d_BlendFunc___olua_move); - oluacls_prop(L, "dst", _cocos2d_BlendFunc_get_dst, _cocos2d_BlendFunc_set_dst); - oluacls_prop(L, "src", _cocos2d_BlendFunc_get_src, _cocos2d_BlendFunc_set_src); + oluacls_func(L, "__gc", _olua_fun_cocos2d_BlendFunc___gc); + oluacls_func(L, "__olua_move", _olua_fun_cocos2d_BlendFunc___olua_move); + oluacls_prop(L, "dst", _olua_fun_cocos2d_BlendFunc_dst, _olua_fun_cocos2d_BlendFunc_dst); + oluacls_prop(L, "src", _olua_fun_cocos2d_BlendFunc_src, _olua_fun_cocos2d_BlendFunc_src); oluacls_const(L, "ADDITIVE", &cocos2d::BlendFunc::ADDITIVE); oluacls_const(L, "ALPHA_NON_PREMULTIPLIED", &cocos2d::BlendFunc::ALPHA_NON_PREMULTIPLIED); oluacls_const(L, "ALPHA_PREMULTIPLIED", &cocos2d::BlendFunc::ALPHA_PREMULTIPLIED); @@ -10598,49 +11307,19 @@ OLUA_LIB int luaopen_cocos2d_BlendFunc(lua_State *L) return 1; } -OLUA_END_DECLS -static int _cocos2d_ui_Margin___call(lua_State *L) +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_BlendFunc(lua_State *L) { - olua_startinvoke(L); - - cocos2d::ui::Margin ret; - - luaL_checktype(L, 2, LUA_TTABLE); - - float arg1 = 0; /** left */ - float arg2 = 0; /** top */ - float arg3 = 0; /** right */ - float arg4 = 0; /** bottom */ - - olua_getfield(L, 2, "left"); - olua_check_number(L, -1, &arg1); - ret.left = arg1; - lua_pop(L, 1); - - olua_getfield(L, 2, "top"); - olua_check_number(L, -1, &arg2); - ret.top = arg2; - lua_pop(L, 1); - - olua_getfield(L, 2, "right"); - olua_check_number(L, -1, &arg3); - ret.right = arg3; - lua_pop(L, 1); - - olua_getfield(L, 2, "bottom"); - olua_check_number(L, -1, &arg4); - ret.bottom = arg4; - lua_pop(L, 1); - - olua_pushcopy_object(L, ret, "cc.ui.Margin"); - - olua_endinvoke(L); - + olua_require(L, "cocos2d_types", luaopen_cocos2d_types); + if (!olua_getclass(L, "cc.BlendFunc")) { + luaL_error(L, "class not found: cocos2d::BlendFunc"); + } return 1; } +OLUA_END_DECLS -static int _cocos2d_ui_Margin___gc(lua_State *L) +static int _olua_fun_cocos2d_ui_Margin___gc(lua_State *L) { olua_startinvoke(L); @@ -10652,7 +11331,7 @@ static int _cocos2d_ui_Margin___gc(lua_State *L) return 0; } -static int _cocos2d_ui_Margin___olua_move(lua_State *L) +static int _olua_fun_cocos2d_ui_Margin___olua_move(lua_State *L) { olua_startinvoke(L); @@ -10664,169 +11343,197 @@ static int _cocos2d_ui_Margin___olua_move(lua_State *L) return 1; } -static int _cocos2d_ui_Margin_equals(lua_State *L) +static int _olua_fun_cocos2d_ui_Margin_bottom$1(lua_State *L) { olua_startinvoke(L); cocos2d::ui::Margin *self = nullptr; - cocos2d::ui::Margin arg1; /** target */ olua_to_object(L, 1, &self, "cc.ui.Margin"); - olua_check_object(L, 2, &arg1, "cc.ui.Margin"); - // bool equals(const cocos2d::ui::Margin &target) - bool ret = self->equals(arg1); - int num_ret = olua_push_bool(L, ret); + // float bottom + float ret = self->bottom; + int num_ret = olua_push_number(L, ret); olua_endinvoke(L); return num_ret; } -static int _cocos2d_ui_Margin_new$1(lua_State *L) +static int _olua_fun_cocos2d_ui_Margin_bottom$2(lua_State *L) { olua_startinvoke(L); - // Margin() - cocos2d::ui::Margin *ret = new cocos2d::ui::Margin(); - int num_ret = olua_push_object(L, ret, "cc.ui.Margin"); - olua_postnew(L, ret); + cocos2d::ui::Margin *self = nullptr; + float arg1 = 0; /** bottom */ + + olua_to_object(L, 1, &self, "cc.ui.Margin"); + olua_check_number(L, 2, &arg1); + + // float bottom + self->bottom = arg1; olua_endinvoke(L); - return num_ret; + return 0; } -static int _cocos2d_ui_Margin_new$2(lua_State *L) +static int _olua_fun_cocos2d_ui_Margin_bottom(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float bottom + return _olua_fun_cocos2d_ui_Margin_bottom$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float bottom + return _olua_fun_cocos2d_ui_Margin_bottom$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::ui::Margin::bottom' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_ui_Margin_equals(lua_State *L) { olua_startinvoke(L); - float arg1 = 0; /** l */ - float arg2 = 0; /** t */ - float arg3 = 0; /** r */ - float arg4 = 0; /** b */ + cocos2d::ui::Margin *self = nullptr; + cocos2d::ui::Margin *arg1; /** target */ - olua_check_number(L, 1, &arg1); - olua_check_number(L, 2, &arg2); - olua_check_number(L, 3, &arg3); - olua_check_number(L, 4, &arg4); + olua_to_object(L, 1, &self, "cc.ui.Margin"); + olua_check_object(L, 2, &arg1, "cc.ui.Margin"); - // Margin(float l, float t, float r, float b) - cocos2d::ui::Margin *ret = new cocos2d::ui::Margin(arg1, arg2, arg3, arg4); - int num_ret = olua_push_object(L, ret, "cc.ui.Margin"); - olua_postnew(L, ret); + // bool equals(const cocos2d::ui::Margin &target) + bool ret = self->equals(*arg1); + int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); return num_ret; } -static int _cocos2d_ui_Margin_new$3(lua_State *L) +static int _olua_fun_cocos2d_ui_Margin_left$1(lua_State *L) { olua_startinvoke(L); - cocos2d::ui::Margin arg1; /** other */ + cocos2d::ui::Margin *self = nullptr; - olua_check_object(L, 1, &arg1, "cc.ui.Margin"); + olua_to_object(L, 1, &self, "cc.ui.Margin"); - // Margin(const cocos2d::ui::Margin &other) - cocos2d::ui::Margin *ret = new cocos2d::ui::Margin(arg1); - int num_ret = olua_push_object(L, ret, "cc.ui.Margin"); - olua_postnew(L, ret); + // float left + float ret = self->left; + int num_ret = olua_push_number(L, ret); olua_endinvoke(L); return num_ret; } -static int _cocos2d_ui_Margin_new(lua_State *L) +static int _olua_fun_cocos2d_ui_Margin_left$2(lua_State *L) { - int num_args = lua_gettop(L); + olua_startinvoke(L); + + cocos2d::ui::Margin *self = nullptr; + float arg1 = 0; /** left */ + + olua_to_object(L, 1, &self, "cc.ui.Margin"); + olua_check_number(L, 2, &arg1); + + // float left + self->left = arg1; + + olua_endinvoke(L); + + return 0; +} + +static int _olua_fun_cocos2d_ui_Margin_left(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; if (num_args == 0) { - // Margin() - return _cocos2d_ui_Margin_new$1(L); + // float left + return _olua_fun_cocos2d_ui_Margin_left$1(L); } if (num_args == 1) { - // if ((olua_is_object(L, 1, "cc.ui.Margin"))) { - // Margin(const cocos2d::ui::Margin &other) - return _cocos2d_ui_Margin_new$3(L); - // } - } - - if (num_args == 4) { - // if ((olua_is_number(L, 1)) && (olua_is_number(L, 2)) && (olua_is_number(L, 3)) && (olua_is_number(L, 4))) { - // Margin(float l, float t, float r, float b) - return _cocos2d_ui_Margin_new$2(L); + // if ((olua_is_number(L, 2))) { + // float left + return _olua_fun_cocos2d_ui_Margin_left$2(L); // } } - luaL_error(L, "method 'cocos2d::ui::Margin::new' not support '%d' arguments", num_args); + luaL_error(L, "method 'cocos2d::ui::Margin::left' not support '%d' arguments", num_args); return 0; } -static int _cocos2d_ui_Margin_setMargin(lua_State *L) +static int _olua_fun_cocos2d_ui_Margin_new$1(lua_State *L) { olua_startinvoke(L); - cocos2d::ui::Margin *self = nullptr; - float arg1 = 0; /** l */ - float arg2 = 0; /** t */ - float arg3 = 0; /** r */ - float arg4 = 0; /** b */ - - olua_to_object(L, 1, &self, "cc.ui.Margin"); - olua_check_number(L, 2, &arg1); - olua_check_number(L, 3, &arg2); - olua_check_number(L, 4, &arg3); - olua_check_number(L, 5, &arg4); - - // void setMargin(float l, float t, float r, float b) - self->setMargin(arg1, arg2, arg3, arg4); + // cocos2d::ui::Margin() + cocos2d::ui::Margin *ret = new cocos2d::ui::Margin(); + int num_ret = olua_push_object(L, ret, "cc.ui.Margin"); + olua_postnew(L, ret); olua_endinvoke(L); - return 0; + return num_ret; } -static int _cocos2d_ui_Margin_get_bottom(lua_State *L) +static int _olua_fun_cocos2d_ui_Margin_new$2(lua_State *L) { olua_startinvoke(L); - cocos2d::ui::Margin *self = nullptr; + float arg1 = 0; /** l */ + float arg2 = 0; /** t */ + float arg3 = 0; /** r */ + float arg4 = 0; /** b */ - olua_to_object(L, 1, &self, "cc.ui.Margin"); + olua_check_number(L, 1, &arg1); + olua_check_number(L, 2, &arg2); + olua_check_number(L, 3, &arg3); + olua_check_number(L, 4, &arg4); - // float bottom - float ret = self->bottom; - int num_ret = olua_push_number(L, ret); + // cocos2d::ui::Margin(float l, float t, float r, float b) + cocos2d::ui::Margin *ret = new cocos2d::ui::Margin(arg1, arg2, arg3, arg4); + int num_ret = olua_push_object(L, ret, "cc.ui.Margin"); + olua_postnew(L, ret); olua_endinvoke(L); return num_ret; } -static int _cocos2d_ui_Margin_set_bottom(lua_State *L) +static int _olua_fun_cocos2d_ui_Margin_new(lua_State *L) { - olua_startinvoke(L); - - cocos2d::ui::Margin *self = nullptr; - float arg1 = 0; /** bottom */ + int num_args = lua_gettop(L); - olua_to_object(L, 1, &self, "cc.ui.Margin"); - olua_check_number(L, 2, &arg1); + if (num_args == 0) { + // cocos2d::ui::Margin() + return _olua_fun_cocos2d_ui_Margin_new$1(L); + } - // float bottom - self->bottom = arg1; + if (num_args == 4) { + // if ((olua_is_number(L, 1)) && (olua_is_number(L, 2)) && (olua_is_number(L, 3)) && (olua_is_number(L, 4))) { + // cocos2d::ui::Margin(float l, float t, float r, float b) + return _olua_fun_cocos2d_ui_Margin_new$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'cocos2d::ui::Margin::new' not support '%d' arguments", num_args); return 0; } -static int _cocos2d_ui_Margin_get_left(lua_State *L) +static int _olua_fun_cocos2d_ui_Margin_right$1(lua_State *L) { olua_startinvoke(L); @@ -10834,8 +11541,8 @@ static int _cocos2d_ui_Margin_get_left(lua_State *L) olua_to_object(L, 1, &self, "cc.ui.Margin"); - // float left - float ret = self->left; + // float right + float ret = self->right; int num_ret = olua_push_number(L, ret); olua_endinvoke(L); @@ -10843,60 +11550,70 @@ static int _cocos2d_ui_Margin_get_left(lua_State *L) return num_ret; } -static int _cocos2d_ui_Margin_set_left(lua_State *L) +static int _olua_fun_cocos2d_ui_Margin_right$2(lua_State *L) { olua_startinvoke(L); cocos2d::ui::Margin *self = nullptr; - float arg1 = 0; /** left */ + float arg1 = 0; /** right */ olua_to_object(L, 1, &self, "cc.ui.Margin"); olua_check_number(L, 2, &arg1); - // float left - self->left = arg1; + // float right + self->right = arg1; olua_endinvoke(L); return 0; } -static int _cocos2d_ui_Margin_get_right(lua_State *L) +static int _olua_fun_cocos2d_ui_Margin_right(lua_State *L) { - olua_startinvoke(L); - - cocos2d::ui::Margin *self = nullptr; + int num_args = lua_gettop(L) - 1; - olua_to_object(L, 1, &self, "cc.ui.Margin"); + if (num_args == 0) { + // float right + return _olua_fun_cocos2d_ui_Margin_right$1(L); + } - // float right - float ret = self->right; - int num_ret = olua_push_number(L, ret); + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float right + return _olua_fun_cocos2d_ui_Margin_right$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'cocos2d::ui::Margin::right' not support '%d' arguments", num_args); - return num_ret; + return 0; } -static int _cocos2d_ui_Margin_set_right(lua_State *L) +static int _olua_fun_cocos2d_ui_Margin_setMargin(lua_State *L) { olua_startinvoke(L); cocos2d::ui::Margin *self = nullptr; - float arg1 = 0; /** right */ + float arg1 = 0; /** l */ + float arg2 = 0; /** t */ + float arg3 = 0; /** r */ + float arg4 = 0; /** b */ olua_to_object(L, 1, &self, "cc.ui.Margin"); olua_check_number(L, 2, &arg1); + olua_check_number(L, 3, &arg2); + olua_check_number(L, 4, &arg3); + olua_check_number(L, 5, &arg4); - // float right - self->right = arg1; + // void setMargin(float l, float t, float r, float b) + self->setMargin(arg1, arg2, arg3, arg4); olua_endinvoke(L); return 0; } -static int _cocos2d_ui_Margin_get_top(lua_State *L) +static int _olua_fun_cocos2d_ui_Margin_top$1(lua_State *L) { olua_startinvoke(L); @@ -10913,7 +11630,7 @@ static int _cocos2d_ui_Margin_get_top(lua_State *L) return num_ret; } -static int _cocos2d_ui_Margin_set_top(lua_State *L) +static int _olua_fun_cocos2d_ui_Margin_top$2(lua_State *L) { olua_startinvoke(L); @@ -10931,89 +11648,140 @@ static int _cocos2d_ui_Margin_set_top(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ui_Margin(lua_State *L) +static int _olua_fun_cocos2d_ui_Margin_top(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float top + return _olua_fun_cocos2d_ui_Margin_top$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float top + return _olua_fun_cocos2d_ui_Margin_top$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::ui::Margin::top' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_cls_cc_ui_Margin(lua_State *L) { oluacls_class(L, "cc.ui.Margin"); - oluacls_func(L, "__call", _cocos2d_ui_Margin___call); - oluacls_func(L, "__gc", _cocos2d_ui_Margin___gc); - oluacls_func(L, "__olua_move", _cocos2d_ui_Margin___olua_move); - oluacls_func(L, "equals", _cocos2d_ui_Margin_equals); - oluacls_func(L, "new", _cocos2d_ui_Margin_new); - oluacls_func(L, "setMargin", _cocos2d_ui_Margin_setMargin); - oluacls_prop(L, "bottom", _cocos2d_ui_Margin_get_bottom, _cocos2d_ui_Margin_set_bottom); - oluacls_prop(L, "left", _cocos2d_ui_Margin_get_left, _cocos2d_ui_Margin_set_left); - oluacls_prop(L, "right", _cocos2d_ui_Margin_get_right, _cocos2d_ui_Margin_set_right); - oluacls_prop(L, "top", _cocos2d_ui_Margin_get_top, _cocos2d_ui_Margin_set_top); + oluacls_func(L, "__gc", _olua_fun_cocos2d_ui_Margin___gc); + oluacls_func(L, "__olua_move", _olua_fun_cocos2d_ui_Margin___olua_move); + oluacls_func(L, "equals", _olua_fun_cocos2d_ui_Margin_equals); + oluacls_func(L, "new", _olua_fun_cocos2d_ui_Margin_new); + oluacls_func(L, "setMargin", _olua_fun_cocos2d_ui_Margin_setMargin); + oluacls_prop(L, "bottom", _olua_fun_cocos2d_ui_Margin_bottom, _olua_fun_cocos2d_ui_Margin_bottom); + oluacls_prop(L, "left", _olua_fun_cocos2d_ui_Margin_left, _olua_fun_cocos2d_ui_Margin_left); + oluacls_prop(L, "right", _olua_fun_cocos2d_ui_Margin_right, _olua_fun_cocos2d_ui_Margin_right); + oluacls_prop(L, "top", _olua_fun_cocos2d_ui_Margin_top, _olua_fun_cocos2d_ui_Margin_top); oluacls_const(L, "ZERO", &cocos2d::ui::Margin::ZERO); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_ui_Margin(lua_State *L) +{ + olua_require(L, "cocos2d_types", luaopen_cocos2d_types); + if (!olua_getclass(L, "cc.ui.Margin")) { + luaL_error(L, "class not found: cocos2d::ui::Margin"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_ResourceData___call(lua_State *L) +static int _olua_fun_cocos2d_ResourceData___gc(lua_State *L) { olua_startinvoke(L); - cocos2d::ResourceData ret; - - luaL_checktype(L, 2, LUA_TTABLE); - - int arg1 = 0; /** type */ - std::string arg2; /** file */ - std::string arg3; /** plist */ + auto self = (cocos2d::ResourceData *)olua_toobj(L, 1, "cc.ResourceData"); + olua_postgc(L, self); - olua_getfield(L, 2, "type"); - olua_check_integer(L, -1, &arg1); - ret.type = arg1; - lua_pop(L, 1); + olua_endinvoke(L); - olua_getfield(L, 2, "file"); - olua_check_string(L, -1, &arg2); - ret.file = arg2; - lua_pop(L, 1); + return 0; +} - olua_getfield(L, 2, "plist"); - olua_check_string(L, -1, &arg3); - ret.plist = arg3; - lua_pop(L, 1); +static int _olua_fun_cocos2d_ResourceData___olua_move(lua_State *L) +{ + olua_startinvoke(L); - olua_pushcopy_object(L, ret, "cc.ResourceData"); + auto self = (cocos2d::ResourceData *)olua_toobj(L, 1, "cc.ResourceData"); + olua_push_object(L, self, "cc.ResourceData"); olua_endinvoke(L); return 1; } -static int _cocos2d_ResourceData___gc(lua_State *L) +static int _olua_fun_cocos2d_ResourceData_file$1(lua_State *L) { olua_startinvoke(L); - auto self = (cocos2d::ResourceData *)olua_toobj(L, 1, "cc.ResourceData"); - olua_postgc(L, self); + cocos2d::ResourceData *self = nullptr; + + olua_to_object(L, 1, &self, "cc.ResourceData"); + + // std::string file + std::string ret = self->file; + int num_ret = olua_push_string(L, ret); olua_endinvoke(L); - return 0; + return num_ret; } -static int _cocos2d_ResourceData___olua_move(lua_State *L) +static int _olua_fun_cocos2d_ResourceData_file$2(lua_State *L) { olua_startinvoke(L); - auto self = (cocos2d::ResourceData *)olua_toobj(L, 1, "cc.ResourceData"); - olua_push_object(L, self, "cc.ResourceData"); + cocos2d::ResourceData *self = nullptr; + std::string arg1; /** file */ + + olua_to_object(L, 1, &self, "cc.ResourceData"); + olua_check_string(L, 2, &arg1); + + // std::string file + self->file = arg1; olua_endinvoke(L); - return 1; + return 0; +} + +static int _olua_fun_cocos2d_ResourceData_file(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // std::string file + return _olua_fun_cocos2d_ResourceData_file$1(L); + } + + if (num_args == 1) { + // if ((olua_is_string(L, 2))) { + // std::string file + return _olua_fun_cocos2d_ResourceData_file$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::ResourceData::file' not support '%d' arguments", num_args); + + return 0; } -static int _cocos2d_ResourceData_new$1(lua_State *L) +static int _olua_fun_cocos2d_ResourceData_new$1(lua_State *L) { olua_startinvoke(L); - // ResourceData() + // cocos2d::ResourceData() cocos2d::ResourceData *ret = new cocos2d::ResourceData(); int num_ret = olua_push_object(L, ret, "cc.ResourceData"); olua_postnew(L, ret); @@ -11023,7 +11791,7 @@ static int _cocos2d_ResourceData_new$1(lua_State *L) return num_ret; } -static int _cocos2d_ResourceData_new$2(lua_State *L) +static int _olua_fun_cocos2d_ResourceData_new$2(lua_State *L) { olua_startinvoke(L); @@ -11035,7 +11803,7 @@ static int _cocos2d_ResourceData_new$2(lua_State *L) olua_check_string(L, 2, &arg2); olua_check_string(L, 3, &arg3); - // ResourceData(int iType, std::string sFile, std::string sPlist) + // cocos2d::ResourceData(int iType, std::string sFile, std::string sPlist) cocos2d::ResourceData *ret = new cocos2d::ResourceData(arg1, arg2, arg3); int num_ret = olua_push_object(L, ret, "cc.ResourceData"); olua_postnew(L, ret); @@ -11045,19 +11813,19 @@ static int _cocos2d_ResourceData_new$2(lua_State *L) return num_ret; } -static int _cocos2d_ResourceData_new(lua_State *L) +static int _olua_fun_cocos2d_ResourceData_new(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 0) { - // ResourceData() - return _cocos2d_ResourceData_new$1(L); + // cocos2d::ResourceData() + return _olua_fun_cocos2d_ResourceData_new$1(L); } if (num_args == 3) { // if ((olua_is_integer(L, 1)) && (olua_is_string(L, 2)) && (olua_is_string(L, 3))) { - // ResourceData(int iType, std::string sFile, std::string sPlist) - return _cocos2d_ResourceData_new$2(L); + // cocos2d::ResourceData(int iType, std::string sFile, std::string sPlist) + return _olua_fun_cocos2d_ResourceData_new$2(L); // } } @@ -11066,7 +11834,7 @@ static int _cocos2d_ResourceData_new(lua_State *L) return 0; } -static int _cocos2d_ResourceData_get_file(lua_State *L) +static int _olua_fun_cocos2d_ResourceData_plist$1(lua_State *L) { olua_startinvoke(L); @@ -11074,8 +11842,8 @@ static int _cocos2d_ResourceData_get_file(lua_State *L) olua_to_object(L, 1, &self, "cc.ResourceData"); - // std::string file - std::string ret = self->file; + // std::string plist + std::string ret = self->plist; int num_ret = olua_push_string(L, ret); olua_endinvoke(L); @@ -11083,60 +11851,46 @@ static int _cocos2d_ResourceData_get_file(lua_State *L) return num_ret; } -static int _cocos2d_ResourceData_set_file(lua_State *L) +static int _olua_fun_cocos2d_ResourceData_plist$2(lua_State *L) { olua_startinvoke(L); cocos2d::ResourceData *self = nullptr; - std::string arg1; /** file */ + std::string arg1; /** plist */ olua_to_object(L, 1, &self, "cc.ResourceData"); olua_check_string(L, 2, &arg1); - // std::string file - self->file = arg1; - - olua_endinvoke(L); - - return 0; -} - -static int _cocos2d_ResourceData_get_plist(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::ResourceData *self = nullptr; - - olua_to_object(L, 1, &self, "cc.ResourceData"); - // std::string plist - std::string ret = self->plist; - int num_ret = olua_push_string(L, ret); + self->plist = arg1; olua_endinvoke(L); - return num_ret; + return 0; } -static int _cocos2d_ResourceData_set_plist(lua_State *L) +static int _olua_fun_cocos2d_ResourceData_plist(lua_State *L) { - olua_startinvoke(L); - - cocos2d::ResourceData *self = nullptr; - std::string arg1; /** plist */ + int num_args = lua_gettop(L) - 1; - olua_to_object(L, 1, &self, "cc.ResourceData"); - olua_check_string(L, 2, &arg1); + if (num_args == 0) { + // std::string plist + return _olua_fun_cocos2d_ResourceData_plist$1(L); + } - // std::string plist - self->plist = arg1; + if (num_args == 1) { + // if ((olua_is_string(L, 2))) { + // std::string plist + return _olua_fun_cocos2d_ResourceData_plist$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'cocos2d::ResourceData::plist' not support '%d' arguments", num_args); return 0; } -static int _cocos2d_ResourceData_get_type(lua_State *L) +static int _olua_fun_cocos2d_ResourceData_type$1(lua_State *L) { olua_startinvoke(L); @@ -11153,7 +11907,7 @@ static int _cocos2d_ResourceData_get_type(lua_State *L) return num_ret; } -static int _cocos2d_ResourceData_set_type(lua_State *L) +static int _olua_fun_cocos2d_ResourceData_type$2(lua_State *L) { olua_startinvoke(L); @@ -11171,63 +11925,52 @@ static int _cocos2d_ResourceData_set_type(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ResourceData(lua_State *L) -{ - oluacls_class(L, "cc.ResourceData"); - oluacls_func(L, "__call", _cocos2d_ResourceData___call); - oluacls_func(L, "__gc", _cocos2d_ResourceData___gc); - oluacls_func(L, "__olua_move", _cocos2d_ResourceData___olua_move); - oluacls_func(L, "new", _cocos2d_ResourceData_new); - oluacls_prop(L, "file", _cocos2d_ResourceData_get_file, _cocos2d_ResourceData_set_file); - oluacls_prop(L, "plist", _cocos2d_ResourceData_get_plist, _cocos2d_ResourceData_set_plist); - oluacls_prop(L, "type", _cocos2d_ResourceData_get_type, _cocos2d_ResourceData_set_type); - - return 1; -} -OLUA_END_DECLS - -static int _cocos2d_Quad3___call(lua_State *L) +static int _olua_fun_cocos2d_ResourceData_type(lua_State *L) { - olua_startinvoke(L); - - cocos2d::Quad3 ret; - - luaL_checktype(L, 2, LUA_TTABLE); - - cocos2d::Vec3 arg1; /** bl */ - cocos2d::Vec3 arg2; /** br */ - cocos2d::Vec3 arg3; /** tl */ - cocos2d::Vec3 arg4; /** tr */ + int num_args = lua_gettop(L) - 1; - olua_getfield(L, 2, "bl"); - olua_check_object(L, -1, &arg1, "cc.Vec3"); - ret.bl = arg1; - lua_pop(L, 1); + if (num_args == 0) { + // int type + return _olua_fun_cocos2d_ResourceData_type$1(L); + } - olua_getfield(L, 2, "br"); - olua_check_object(L, -1, &arg2, "cc.Vec3"); - ret.br = arg2; - lua_pop(L, 1); + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // int type + return _olua_fun_cocos2d_ResourceData_type$2(L); + // } + } - olua_getfield(L, 2, "tl"); - olua_check_object(L, -1, &arg3, "cc.Vec3"); - ret.tl = arg3; - lua_pop(L, 1); + luaL_error(L, "method 'cocos2d::ResourceData::type' not support '%d' arguments", num_args); - olua_getfield(L, 2, "tr"); - olua_check_object(L, -1, &arg4, "cc.Vec3"); - ret.tr = arg4; - lua_pop(L, 1); + return 0; +} - olua_pushcopy_object(L, ret, "cc.Quad3"); +static int _olua_cls_cc_ResourceData(lua_State *L) +{ + oluacls_class(L, "cc.ResourceData"); + oluacls_func(L, "__gc", _olua_fun_cocos2d_ResourceData___gc); + oluacls_func(L, "__olua_move", _olua_fun_cocos2d_ResourceData___olua_move); + oluacls_func(L, "new", _olua_fun_cocos2d_ResourceData_new); + oluacls_prop(L, "file", _olua_fun_cocos2d_ResourceData_file, _olua_fun_cocos2d_ResourceData_file); + oluacls_prop(L, "plist", _olua_fun_cocos2d_ResourceData_plist, _olua_fun_cocos2d_ResourceData_plist); + oluacls_prop(L, "type", _olua_fun_cocos2d_ResourceData_type, _olua_fun_cocos2d_ResourceData_type); - olua_endinvoke(L); + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_ResourceData(lua_State *L) +{ + olua_require(L, "cocos2d_types", luaopen_cocos2d_types); + if (!olua_getclass(L, "cc.ResourceData")) { + luaL_error(L, "class not found: cocos2d::ResourceData"); + } return 1; } +OLUA_END_DECLS -static int _cocos2d_Quad3___gc(lua_State *L) +static int _olua_fun_cocos2d_Quad3___gc(lua_State *L) { olua_startinvoke(L); @@ -11239,7 +11982,7 @@ static int _cocos2d_Quad3___gc(lua_State *L) return 0; } -static int _cocos2d_Quad3___olua_move(lua_State *L) +static int _olua_fun_cocos2d_Quad3___olua_move(lua_State *L) { olua_startinvoke(L); @@ -11251,7 +11994,7 @@ static int _cocos2d_Quad3___olua_move(lua_State *L) return 1; } -static int _cocos2d_Quad3_get_bl(lua_State *L) +static int _olua_fun_cocos2d_Quad3_bl$1(lua_State *L) { olua_startinvoke(L); @@ -11261,32 +12004,53 @@ static int _cocos2d_Quad3_get_bl(lua_State *L) // cocos2d::Vec3 bl cocos2d::Vec3 &ret = self->bl; - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec3"); + int num_ret = olua_copy_object(L, ret, "cc.Vec3"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_Quad3_set_bl(lua_State *L) +static int _olua_fun_cocos2d_Quad3_bl$2(lua_State *L) { olua_startinvoke(L); cocos2d::Quad3 *self = nullptr; - cocos2d::Vec3 arg1; /** bl */ + cocos2d::Vec3 *arg1; /** bl */ olua_to_object(L, 1, &self, "cc.Quad3"); olua_check_object(L, 2, &arg1, "cc.Vec3"); // cocos2d::Vec3 bl - self->bl = arg1; + self->bl = *arg1; olua_endinvoke(L); return 0; } -static int _cocos2d_Quad3_get_br(lua_State *L) +static int _olua_fun_cocos2d_Quad3_bl(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // cocos2d::Vec3 bl + return _olua_fun_cocos2d_Quad3_bl$1(L); + } + + if (num_args == 1) { + // if ((olua_is_object(L, 2, "cc.Vec3"))) { + // cocos2d::Vec3 bl + return _olua_fun_cocos2d_Quad3_bl$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::Quad3::bl' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_Quad3_br$1(lua_State *L) { olua_startinvoke(L); @@ -11296,32 +12060,53 @@ static int _cocos2d_Quad3_get_br(lua_State *L) // cocos2d::Vec3 br cocos2d::Vec3 &ret = self->br; - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec3"); + int num_ret = olua_copy_object(L, ret, "cc.Vec3"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_Quad3_set_br(lua_State *L) +static int _olua_fun_cocos2d_Quad3_br$2(lua_State *L) { olua_startinvoke(L); cocos2d::Quad3 *self = nullptr; - cocos2d::Vec3 arg1; /** br */ + cocos2d::Vec3 *arg1; /** br */ olua_to_object(L, 1, &self, "cc.Quad3"); olua_check_object(L, 2, &arg1, "cc.Vec3"); // cocos2d::Vec3 br - self->br = arg1; + self->br = *arg1; olua_endinvoke(L); return 0; } -static int _cocos2d_Quad3_get_tl(lua_State *L) +static int _olua_fun_cocos2d_Quad3_br(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // cocos2d::Vec3 br + return _olua_fun_cocos2d_Quad3_br$1(L); + } + + if (num_args == 1) { + // if ((olua_is_object(L, 2, "cc.Vec3"))) { + // cocos2d::Vec3 br + return _olua_fun_cocos2d_Quad3_br$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::Quad3::br' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_Quad3_tl$1(lua_State *L) { olua_startinvoke(L); @@ -11331,32 +12116,53 @@ static int _cocos2d_Quad3_get_tl(lua_State *L) // cocos2d::Vec3 tl cocos2d::Vec3 &ret = self->tl; - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec3"); + int num_ret = olua_copy_object(L, ret, "cc.Vec3"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_Quad3_set_tl(lua_State *L) +static int _olua_fun_cocos2d_Quad3_tl$2(lua_State *L) { olua_startinvoke(L); cocos2d::Quad3 *self = nullptr; - cocos2d::Vec3 arg1; /** tl */ + cocos2d::Vec3 *arg1; /** tl */ olua_to_object(L, 1, &self, "cc.Quad3"); olua_check_object(L, 2, &arg1, "cc.Vec3"); // cocos2d::Vec3 tl - self->tl = arg1; + self->tl = *arg1; olua_endinvoke(L); return 0; } -static int _cocos2d_Quad3_get_tr(lua_State *L) +static int _olua_fun_cocos2d_Quad3_tl(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // cocos2d::Vec3 tl + return _olua_fun_cocos2d_Quad3_tl$1(L); + } + + if (num_args == 1) { + // if ((olua_is_object(L, 2, "cc.Vec3"))) { + // cocos2d::Vec3 tl + return _olua_fun_cocos2d_Quad3_tl$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::Quad3::tl' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_Quad3_tr$1(lua_State *L) { olua_startinvoke(L); @@ -11366,48 +12172,77 @@ static int _cocos2d_Quad3_get_tr(lua_State *L) // cocos2d::Vec3 tr cocos2d::Vec3 &ret = self->tr; - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec3"); + int num_ret = olua_copy_object(L, ret, "cc.Vec3"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_Quad3_set_tr(lua_State *L) +static int _olua_fun_cocos2d_Quad3_tr$2(lua_State *L) { olua_startinvoke(L); cocos2d::Quad3 *self = nullptr; - cocos2d::Vec3 arg1; /** tr */ + cocos2d::Vec3 *arg1; /** tr */ olua_to_object(L, 1, &self, "cc.Quad3"); olua_check_object(L, 2, &arg1, "cc.Vec3"); // cocos2d::Vec3 tr - self->tr = arg1; + self->tr = *arg1; olua_endinvoke(L); return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_Quad3(lua_State *L) +static int _olua_fun_cocos2d_Quad3_tr(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // cocos2d::Vec3 tr + return _olua_fun_cocos2d_Quad3_tr$1(L); + } + + if (num_args == 1) { + // if ((olua_is_object(L, 2, "cc.Vec3"))) { + // cocos2d::Vec3 tr + return _olua_fun_cocos2d_Quad3_tr$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::Quad3::tr' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_cls_cc_Quad3(lua_State *L) { oluacls_class(L, "cc.Quad3"); - oluacls_func(L, "__call", _cocos2d_Quad3___call); - oluacls_func(L, "__gc", _cocos2d_Quad3___gc); - oluacls_func(L, "__olua_move", _cocos2d_Quad3___olua_move); - oluacls_prop(L, "bl", _cocos2d_Quad3_get_bl, _cocos2d_Quad3_set_bl); - oluacls_prop(L, "br", _cocos2d_Quad3_get_br, _cocos2d_Quad3_set_br); - oluacls_prop(L, "tl", _cocos2d_Quad3_get_tl, _cocos2d_Quad3_set_tl); - oluacls_prop(L, "tr", _cocos2d_Quad3_get_tr, _cocos2d_Quad3_set_tr); + oluacls_func(L, "__gc", _olua_fun_cocos2d_Quad3___gc); + oluacls_func(L, "__olua_move", _olua_fun_cocos2d_Quad3___olua_move); + oluacls_prop(L, "bl", _olua_fun_cocos2d_Quad3_bl, _olua_fun_cocos2d_Quad3_bl); + oluacls_prop(L, "br", _olua_fun_cocos2d_Quad3_br, _olua_fun_cocos2d_Quad3_br); + oluacls_prop(L, "tl", _olua_fun_cocos2d_Quad3_tl, _olua_fun_cocos2d_Quad3_tl); + oluacls_prop(L, "tr", _olua_fun_cocos2d_Quad3_tr, _olua_fun_cocos2d_Quad3_tr); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_Quad3(lua_State *L) +{ + olua_require(L, "cocos2d_types", luaopen_cocos2d_types); + if (!olua_getclass(L, "cc.Quad3")) { + luaL_error(L, "class not found: cocos2d::Quad3"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_Texture2D_PixelFormatInfo___gc(lua_State *L) +static int _olua_fun_cocos2d_Texture2D_PixelFormatInfo___gc(lua_State *L) { olua_startinvoke(L); @@ -11419,7 +12254,7 @@ static int _cocos2d_Texture2D_PixelFormatInfo___gc(lua_State *L) return 0; } -static int _cocos2d_Texture2D_PixelFormatInfo___olua_move(lua_State *L) +static int _olua_fun_cocos2d_Texture2D_PixelFormatInfo___olua_move(lua_State *L) { olua_startinvoke(L); @@ -11431,29 +12266,7 @@ static int _cocos2d_Texture2D_PixelFormatInfo___olua_move(lua_State *L) return 1; } -static int _cocos2d_Texture2D_PixelFormatInfo_new(lua_State *L) -{ - olua_startinvoke(L); - - int arg1 = 0; /** aBpp */ - bool arg2 = false; /** aCompressed */ - bool arg3 = false; /** anAlpha */ - - olua_check_integer(L, 1, &arg1); - olua_check_bool(L, 2, &arg2); - olua_check_bool(L, 3, &arg3); - - // PixelFormatInfo(int aBpp, bool aCompressed, bool anAlpha) - cocos2d::Texture2D::PixelFormatInfo *ret = new cocos2d::Texture2D::PixelFormatInfo(arg1, arg2, arg3); - int num_ret = olua_push_object(L, ret, "cc.Texture2D.PixelFormatInfo"); - olua_postnew(L, ret); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_Texture2D_PixelFormatInfo_get_alpha(lua_State *L) +static int _olua_fun_cocos2d_Texture2D_PixelFormatInfo_alpha$1(lua_State *L) { olua_startinvoke(L); @@ -11470,7 +12283,7 @@ static int _cocos2d_Texture2D_PixelFormatInfo_get_alpha(lua_State *L) return num_ret; } -static int _cocos2d_Texture2D_PixelFormatInfo_set_alpha(lua_State *L) +static int _olua_fun_cocos2d_Texture2D_PixelFormatInfo_alpha$2(lua_State *L) { olua_startinvoke(L); @@ -11488,7 +12301,28 @@ static int _cocos2d_Texture2D_PixelFormatInfo_set_alpha(lua_State *L) return 0; } -static int _cocos2d_Texture2D_PixelFormatInfo_get_bpp(lua_State *L) +static int _olua_fun_cocos2d_Texture2D_PixelFormatInfo_alpha(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // bool alpha + return _olua_fun_cocos2d_Texture2D_PixelFormatInfo_alpha$1(L); + } + + if (num_args == 1) { + // if ((olua_is_bool(L, 2))) { + // bool alpha + return _olua_fun_cocos2d_Texture2D_PixelFormatInfo_alpha$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::Texture2D::PixelFormatInfo::alpha' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_Texture2D_PixelFormatInfo_bpp$1(lua_State *L) { olua_startinvoke(L); @@ -11505,7 +12339,7 @@ static int _cocos2d_Texture2D_PixelFormatInfo_get_bpp(lua_State *L) return num_ret; } -static int _cocos2d_Texture2D_PixelFormatInfo_set_bpp(lua_State *L) +static int _olua_fun_cocos2d_Texture2D_PixelFormatInfo_bpp$2(lua_State *L) { olua_startinvoke(L); @@ -11523,7 +12357,28 @@ static int _cocos2d_Texture2D_PixelFormatInfo_set_bpp(lua_State *L) return 0; } -static int _cocos2d_Texture2D_PixelFormatInfo_get_compressed(lua_State *L) +static int _olua_fun_cocos2d_Texture2D_PixelFormatInfo_bpp(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // int bpp + return _olua_fun_cocos2d_Texture2D_PixelFormatInfo_bpp$1(L); + } + + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // int bpp + return _olua_fun_cocos2d_Texture2D_PixelFormatInfo_bpp$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::Texture2D::PixelFormatInfo::bpp' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_Texture2D_PixelFormatInfo_compressed$1(lua_State *L) { olua_startinvoke(L); @@ -11540,7 +12395,7 @@ static int _cocos2d_Texture2D_PixelFormatInfo_get_compressed(lua_State *L) return num_ret; } -static int _cocos2d_Texture2D_PixelFormatInfo_set_compressed(lua_State *L) +static int _olua_fun_cocos2d_Texture2D_PixelFormatInfo_compressed$2(lua_State *L) { olua_startinvoke(L); @@ -11555,59 +12410,77 @@ static int _cocos2d_Texture2D_PixelFormatInfo_set_compressed(lua_State *L) olua_endinvoke(L); - return 0; + return 0; +} + +static int _olua_fun_cocos2d_Texture2D_PixelFormatInfo_compressed(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // bool compressed + return _olua_fun_cocos2d_Texture2D_PixelFormatInfo_compressed$1(L); + } + + if (num_args == 1) { + // if ((olua_is_bool(L, 2))) { + // bool compressed + return _olua_fun_cocos2d_Texture2D_PixelFormatInfo_compressed$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::Texture2D::PixelFormatInfo::compressed' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_Texture2D_PixelFormatInfo_new(lua_State *L) +{ + olua_startinvoke(L); + + int arg1 = 0; /** aBpp */ + bool arg2 = false; /** aCompressed */ + bool arg3 = false; /** anAlpha */ + + olua_check_integer(L, 1, &arg1); + olua_check_bool(L, 2, &arg2); + olua_check_bool(L, 3, &arg3); + + // cocos2d::Texture2D::PixelFormatInfo(int aBpp, bool aCompressed, bool anAlpha) + cocos2d::Texture2D::PixelFormatInfo *ret = new cocos2d::Texture2D::PixelFormatInfo(arg1, arg2, arg3); + int num_ret = olua_push_object(L, ret, "cc.Texture2D.PixelFormatInfo"); + olua_postnew(L, ret); + + olua_endinvoke(L); + + return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_Texture2D_PixelFormatInfo(lua_State *L) +static int _olua_cls_cc_Texture2D_PixelFormatInfo(lua_State *L) { oluacls_class(L, "cc.Texture2D.PixelFormatInfo"); - oluacls_func(L, "__gc", _cocos2d_Texture2D_PixelFormatInfo___gc); - oluacls_func(L, "__olua_move", _cocos2d_Texture2D_PixelFormatInfo___olua_move); - oluacls_func(L, "new", _cocos2d_Texture2D_PixelFormatInfo_new); - oluacls_prop(L, "alpha", _cocos2d_Texture2D_PixelFormatInfo_get_alpha, _cocos2d_Texture2D_PixelFormatInfo_set_alpha); - oluacls_prop(L, "bpp", _cocos2d_Texture2D_PixelFormatInfo_get_bpp, _cocos2d_Texture2D_PixelFormatInfo_set_bpp); - oluacls_prop(L, "compressed", _cocos2d_Texture2D_PixelFormatInfo_get_compressed, _cocos2d_Texture2D_PixelFormatInfo_set_compressed); + oluacls_func(L, "__gc", _olua_fun_cocos2d_Texture2D_PixelFormatInfo___gc); + oluacls_func(L, "__olua_move", _olua_fun_cocos2d_Texture2D_PixelFormatInfo___olua_move); + oluacls_func(L, "new", _olua_fun_cocos2d_Texture2D_PixelFormatInfo_new); + oluacls_prop(L, "alpha", _olua_fun_cocos2d_Texture2D_PixelFormatInfo_alpha, _olua_fun_cocos2d_Texture2D_PixelFormatInfo_alpha); + oluacls_prop(L, "bpp", _olua_fun_cocos2d_Texture2D_PixelFormatInfo_bpp, _olua_fun_cocos2d_Texture2D_PixelFormatInfo_bpp); + oluacls_prop(L, "compressed", _olua_fun_cocos2d_Texture2D_PixelFormatInfo_compressed, _olua_fun_cocos2d_Texture2D_PixelFormatInfo_compressed); return 1; } -OLUA_END_DECLS -static int _cocos2d_Controller_KeyStatus___call(lua_State *L) +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_Texture2D_PixelFormatInfo(lua_State *L) { - olua_startinvoke(L); - - cocos2d::Controller::KeyStatus ret; - - luaL_checktype(L, 2, LUA_TTABLE); - - bool arg1 = false; /** isPressed */ - float arg2 = 0; /** value */ - bool arg3 = false; /** isAnalog */ - - olua_getfield(L, 2, "isPressed"); - olua_check_bool(L, -1, &arg1); - ret.isPressed = arg1; - lua_pop(L, 1); - - olua_getfield(L, 2, "value"); - olua_check_number(L, -1, &arg2); - ret.value = arg2; - lua_pop(L, 1); - - olua_getfield(L, 2, "isAnalog"); - olua_check_bool(L, -1, &arg3); - ret.isAnalog = arg3; - lua_pop(L, 1); - - olua_pushcopy_object(L, ret, "cc.Controller.KeyStatus"); - - olua_endinvoke(L); - + olua_require(L, "cocos2d_types", luaopen_cocos2d_types); + if (!olua_getclass(L, "cc.Texture2D.PixelFormatInfo")) { + luaL_error(L, "class not found: cocos2d::Texture2D::PixelFormatInfo"); + } return 1; } +OLUA_END_DECLS -static int _cocos2d_Controller_KeyStatus___gc(lua_State *L) +static int _olua_fun_cocos2d_Controller_KeyStatus___gc(lua_State *L) { olua_startinvoke(L); @@ -11619,7 +12492,7 @@ static int _cocos2d_Controller_KeyStatus___gc(lua_State *L) return 0; } -static int _cocos2d_Controller_KeyStatus___olua_move(lua_State *L) +static int _olua_fun_cocos2d_Controller_KeyStatus___olua_move(lua_State *L) { olua_startinvoke(L); @@ -11631,7 +12504,7 @@ static int _cocos2d_Controller_KeyStatus___olua_move(lua_State *L) return 1; } -static int _cocos2d_Controller_KeyStatus_get_isAnalog(lua_State *L) +static int _olua_fun_cocos2d_Controller_KeyStatus_isAnalog$1(lua_State *L) { olua_startinvoke(L); @@ -11648,7 +12521,7 @@ static int _cocos2d_Controller_KeyStatus_get_isAnalog(lua_State *L) return num_ret; } -static int _cocos2d_Controller_KeyStatus_set_isAnalog(lua_State *L) +static int _olua_fun_cocos2d_Controller_KeyStatus_isAnalog$2(lua_State *L) { olua_startinvoke(L); @@ -11666,7 +12539,28 @@ static int _cocos2d_Controller_KeyStatus_set_isAnalog(lua_State *L) return 0; } -static int _cocos2d_Controller_KeyStatus_get_isPressed(lua_State *L) +static int _olua_fun_cocos2d_Controller_KeyStatus_isAnalog(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // bool isAnalog + return _olua_fun_cocos2d_Controller_KeyStatus_isAnalog$1(L); + } + + if (num_args == 1) { + // if ((olua_is_bool(L, 2))) { + // bool isAnalog + return _olua_fun_cocos2d_Controller_KeyStatus_isAnalog$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::Controller::KeyStatus::isAnalog' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_Controller_KeyStatus_isPressed$1(lua_State *L) { olua_startinvoke(L); @@ -11683,7 +12577,7 @@ static int _cocos2d_Controller_KeyStatus_get_isPressed(lua_State *L) return num_ret; } -static int _cocos2d_Controller_KeyStatus_set_isPressed(lua_State *L) +static int _olua_fun_cocos2d_Controller_KeyStatus_isPressed$2(lua_State *L) { olua_startinvoke(L); @@ -11701,7 +12595,28 @@ static int _cocos2d_Controller_KeyStatus_set_isPressed(lua_State *L) return 0; } -static int _cocos2d_Controller_KeyStatus_get_value(lua_State *L) +static int _olua_fun_cocos2d_Controller_KeyStatus_isPressed(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // bool isPressed + return _olua_fun_cocos2d_Controller_KeyStatus_isPressed$1(L); + } + + if (num_args == 1) { + // if ((olua_is_bool(L, 2))) { + // bool isPressed + return _olua_fun_cocos2d_Controller_KeyStatus_isPressed$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::Controller::KeyStatus::isPressed' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_Controller_KeyStatus_value$1(lua_State *L) { olua_startinvoke(L); @@ -11718,7 +12633,7 @@ static int _cocos2d_Controller_KeyStatus_get_value(lua_State *L) return num_ret; } -static int _cocos2d_Controller_KeyStatus_set_value(lua_State *L) +static int _olua_fun_cocos2d_Controller_KeyStatus_value$2(lua_State *L) { olua_startinvoke(L); @@ -11736,99 +12651,52 @@ static int _cocos2d_Controller_KeyStatus_set_value(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_Controller_KeyStatus(lua_State *L) +static int _olua_fun_cocos2d_Controller_KeyStatus_value(lua_State *L) { - oluacls_class(L, "cc.Controller.KeyStatus"); - oluacls_func(L, "__call", _cocos2d_Controller_KeyStatus___call); - oluacls_func(L, "__gc", _cocos2d_Controller_KeyStatus___gc); - oluacls_func(L, "__olua_move", _cocos2d_Controller_KeyStatus___olua_move); - oluacls_prop(L, "isAnalog", _cocos2d_Controller_KeyStatus_get_isAnalog, _cocos2d_Controller_KeyStatus_set_isAnalog); - oluacls_prop(L, "isPressed", _cocos2d_Controller_KeyStatus_get_isPressed, _cocos2d_Controller_KeyStatus_set_isPressed); - oluacls_prop(L, "value", _cocos2d_Controller_KeyStatus_get_value, _cocos2d_Controller_KeyStatus_set_value); + int num_args = lua_gettop(L) - 1; - return 1; -} -OLUA_END_DECLS + if (num_args == 0) { + // float value + return _olua_fun_cocos2d_Controller_KeyStatus_value$1(L); + } -#if CC_USE_NAVMESH -static int _cocos2d_NavMeshAgentParam___call(lua_State *L) -{ - olua_startinvoke(L); + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float value + return _olua_fun_cocos2d_Controller_KeyStatus_value$2(L); + // } + } - cocos2d::NavMeshAgentParam ret; + luaL_error(L, "method 'cocos2d::Controller::KeyStatus::value' not support '%d' arguments", num_args); - luaL_checktype(L, 2, LUA_TTABLE); + return 0; +} - float arg1 = 0; /** radius */ - float arg2 = 0; /** height */ - float arg3 = 0; /** maxAcceleration */ - float arg4 = 0; /** maxSpeed */ - float arg5 = 0; /** collisionQueryRange */ - float arg6 = 0; /** pathOptimizationRange */ - float arg7 = 0; /** separationWeight */ - unsigned char arg8 = 0; /** updateFlags */ - unsigned char arg9 = 0; /** obstacleAvoidanceType */ - unsigned char arg10 = 0; /** queryFilterType */ - - olua_getfield(L, 2, "radius"); - olua_check_number(L, -1, &arg1); - ret.radius = arg1; - lua_pop(L, 1); - - olua_getfield(L, 2, "height"); - olua_check_number(L, -1, &arg2); - ret.height = arg2; - lua_pop(L, 1); - - olua_getfield(L, 2, "maxAcceleration"); - olua_check_number(L, -1, &arg3); - ret.maxAcceleration = arg3; - lua_pop(L, 1); - - olua_getfield(L, 2, "maxSpeed"); - olua_check_number(L, -1, &arg4); - ret.maxSpeed = arg4; - lua_pop(L, 1); - - olua_getfield(L, 2, "collisionQueryRange"); - olua_check_number(L, -1, &arg5); - ret.collisionQueryRange = arg5; - lua_pop(L, 1); - - olua_getfield(L, 2, "pathOptimizationRange"); - olua_check_number(L, -1, &arg6); - ret.pathOptimizationRange = arg6; - lua_pop(L, 1); - - olua_getfield(L, 2, "separationWeight"); - olua_check_number(L, -1, &arg7); - ret.separationWeight = arg7; - lua_pop(L, 1); - - olua_getfield(L, 2, "updateFlags"); - olua_check_integer(L, -1, &arg8); - ret.updateFlags = arg8; - lua_pop(L, 1); - - olua_getfield(L, 2, "obstacleAvoidanceType"); - olua_check_integer(L, -1, &arg9); - ret.obstacleAvoidanceType = arg9; - lua_pop(L, 1); - - olua_getfield(L, 2, "queryFilterType"); - olua_check_integer(L, -1, &arg10); - ret.queryFilterType = arg10; - lua_pop(L, 1); - - olua_pushcopy_object(L, ret, "cc.NavMeshAgentParam"); +static int _olua_cls_cc_Controller_KeyStatus(lua_State *L) +{ + oluacls_class(L, "cc.Controller.KeyStatus"); + oluacls_func(L, "__gc", _olua_fun_cocos2d_Controller_KeyStatus___gc); + oluacls_func(L, "__olua_move", _olua_fun_cocos2d_Controller_KeyStatus___olua_move); + oluacls_prop(L, "isAnalog", _olua_fun_cocos2d_Controller_KeyStatus_isAnalog, _olua_fun_cocos2d_Controller_KeyStatus_isAnalog); + oluacls_prop(L, "isPressed", _olua_fun_cocos2d_Controller_KeyStatus_isPressed, _olua_fun_cocos2d_Controller_KeyStatus_isPressed); + oluacls_prop(L, "value", _olua_fun_cocos2d_Controller_KeyStatus_value, _olua_fun_cocos2d_Controller_KeyStatus_value); - olua_endinvoke(L); + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_Controller_KeyStatus(lua_State *L) +{ + olua_require(L, "cocos2d_types", luaopen_cocos2d_types); + if (!olua_getclass(L, "cc.Controller.KeyStatus")) { + luaL_error(L, "class not found: cocos2d::Controller::KeyStatus"); + } return 1; } +OLUA_END_DECLS -static int _cocos2d_NavMeshAgentParam___gc(lua_State *L) +#if CC_USE_NAVMESH +static int _olua_fun_cocos2d_NavMeshAgentParam___gc(lua_State *L) { olua_startinvoke(L); @@ -11840,7 +12708,7 @@ static int _cocos2d_NavMeshAgentParam___gc(lua_State *L) return 0; } -static int _cocos2d_NavMeshAgentParam___olua_move(lua_State *L) +static int _olua_fun_cocos2d_NavMeshAgentParam___olua_move(lua_State *L) { olua_startinvoke(L); @@ -11852,21 +12720,7 @@ static int _cocos2d_NavMeshAgentParam___olua_move(lua_State *L) return 1; } -static int _cocos2d_NavMeshAgentParam_new(lua_State *L) -{ - olua_startinvoke(L); - - // NavMeshAgentParam() - cocos2d::NavMeshAgentParam *ret = new cocos2d::NavMeshAgentParam(); - int num_ret = olua_push_object(L, ret, "cc.NavMeshAgentParam"); - olua_postnew(L, ret); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_NavMeshAgentParam_get_collisionQueryRange(lua_State *L) +static int _olua_fun_cocos2d_NavMeshAgentParam_collisionQueryRange$1(lua_State *L) { olua_startinvoke(L); @@ -11883,7 +12737,7 @@ static int _cocos2d_NavMeshAgentParam_get_collisionQueryRange(lua_State *L) return num_ret; } -static int _cocos2d_NavMeshAgentParam_set_collisionQueryRange(lua_State *L) +static int _olua_fun_cocos2d_NavMeshAgentParam_collisionQueryRange$2(lua_State *L) { olua_startinvoke(L); @@ -11901,7 +12755,28 @@ static int _cocos2d_NavMeshAgentParam_set_collisionQueryRange(lua_State *L) return 0; } -static int _cocos2d_NavMeshAgentParam_get_height(lua_State *L) +static int _olua_fun_cocos2d_NavMeshAgentParam_collisionQueryRange(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float collisionQueryRange + return _olua_fun_cocos2d_NavMeshAgentParam_collisionQueryRange$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float collisionQueryRange + return _olua_fun_cocos2d_NavMeshAgentParam_collisionQueryRange$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::NavMeshAgentParam::collisionQueryRange' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_NavMeshAgentParam_height$1(lua_State *L) { olua_startinvoke(L); @@ -11918,7 +12793,7 @@ static int _cocos2d_NavMeshAgentParam_get_height(lua_State *L) return num_ret; } -static int _cocos2d_NavMeshAgentParam_set_height(lua_State *L) +static int _olua_fun_cocos2d_NavMeshAgentParam_height$2(lua_State *L) { olua_startinvoke(L); @@ -11936,7 +12811,28 @@ static int _cocos2d_NavMeshAgentParam_set_height(lua_State *L) return 0; } -static int _cocos2d_NavMeshAgentParam_get_maxAcceleration(lua_State *L) +static int _olua_fun_cocos2d_NavMeshAgentParam_height(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float height + return _olua_fun_cocos2d_NavMeshAgentParam_height$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float height + return _olua_fun_cocos2d_NavMeshAgentParam_height$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::NavMeshAgentParam::height' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_NavMeshAgentParam_maxAcceleration$1(lua_State *L) { olua_startinvoke(L); @@ -11953,7 +12849,7 @@ static int _cocos2d_NavMeshAgentParam_get_maxAcceleration(lua_State *L) return num_ret; } -static int _cocos2d_NavMeshAgentParam_set_maxAcceleration(lua_State *L) +static int _olua_fun_cocos2d_NavMeshAgentParam_maxAcceleration$2(lua_State *L) { olua_startinvoke(L); @@ -11971,7 +12867,28 @@ static int _cocos2d_NavMeshAgentParam_set_maxAcceleration(lua_State *L) return 0; } -static int _cocos2d_NavMeshAgentParam_get_maxSpeed(lua_State *L) +static int _olua_fun_cocos2d_NavMeshAgentParam_maxAcceleration(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float maxAcceleration + return _olua_fun_cocos2d_NavMeshAgentParam_maxAcceleration$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float maxAcceleration + return _olua_fun_cocos2d_NavMeshAgentParam_maxAcceleration$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::NavMeshAgentParam::maxAcceleration' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_NavMeshAgentParam_maxSpeed$1(lua_State *L) { olua_startinvoke(L); @@ -11988,7 +12905,7 @@ static int _cocos2d_NavMeshAgentParam_get_maxSpeed(lua_State *L) return num_ret; } -static int _cocos2d_NavMeshAgentParam_set_maxSpeed(lua_State *L) +static int _olua_fun_cocos2d_NavMeshAgentParam_maxSpeed$2(lua_State *L) { olua_startinvoke(L); @@ -12006,7 +12923,42 @@ static int _cocos2d_NavMeshAgentParam_set_maxSpeed(lua_State *L) return 0; } -static int _cocos2d_NavMeshAgentParam_get_obstacleAvoidanceType(lua_State *L) +static int _olua_fun_cocos2d_NavMeshAgentParam_maxSpeed(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float maxSpeed + return _olua_fun_cocos2d_NavMeshAgentParam_maxSpeed$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float maxSpeed + return _olua_fun_cocos2d_NavMeshAgentParam_maxSpeed$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::NavMeshAgentParam::maxSpeed' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_NavMeshAgentParam_new(lua_State *L) +{ + olua_startinvoke(L); + + // cocos2d::NavMeshAgentParam() + cocos2d::NavMeshAgentParam *ret = new cocos2d::NavMeshAgentParam(); + int num_ret = olua_push_object(L, ret, "cc.NavMeshAgentParam"); + olua_postnew(L, ret); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_cocos2d_NavMeshAgentParam_obstacleAvoidanceType$1(lua_State *L) { olua_startinvoke(L); @@ -12023,7 +12975,7 @@ static int _cocos2d_NavMeshAgentParam_get_obstacleAvoidanceType(lua_State *L) return num_ret; } -static int _cocos2d_NavMeshAgentParam_set_obstacleAvoidanceType(lua_State *L) +static int _olua_fun_cocos2d_NavMeshAgentParam_obstacleAvoidanceType$2(lua_State *L) { olua_startinvoke(L); @@ -12041,7 +12993,28 @@ static int _cocos2d_NavMeshAgentParam_set_obstacleAvoidanceType(lua_State *L) return 0; } -static int _cocos2d_NavMeshAgentParam_get_pathOptimizationRange(lua_State *L) +static int _olua_fun_cocos2d_NavMeshAgentParam_obstacleAvoidanceType(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // unsigned char obstacleAvoidanceType + return _olua_fun_cocos2d_NavMeshAgentParam_obstacleAvoidanceType$1(L); + } + + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // unsigned char obstacleAvoidanceType + return _olua_fun_cocos2d_NavMeshAgentParam_obstacleAvoidanceType$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::NavMeshAgentParam::obstacleAvoidanceType' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_NavMeshAgentParam_pathOptimizationRange$1(lua_State *L) { olua_startinvoke(L); @@ -12058,7 +13031,7 @@ static int _cocos2d_NavMeshAgentParam_get_pathOptimizationRange(lua_State *L) return num_ret; } -static int _cocos2d_NavMeshAgentParam_set_pathOptimizationRange(lua_State *L) +static int _olua_fun_cocos2d_NavMeshAgentParam_pathOptimizationRange$2(lua_State *L) { olua_startinvoke(L); @@ -12076,7 +13049,28 @@ static int _cocos2d_NavMeshAgentParam_set_pathOptimizationRange(lua_State *L) return 0; } -static int _cocos2d_NavMeshAgentParam_get_queryFilterType(lua_State *L) +static int _olua_fun_cocos2d_NavMeshAgentParam_pathOptimizationRange(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float pathOptimizationRange + return _olua_fun_cocos2d_NavMeshAgentParam_pathOptimizationRange$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float pathOptimizationRange + return _olua_fun_cocos2d_NavMeshAgentParam_pathOptimizationRange$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::NavMeshAgentParam::pathOptimizationRange' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_NavMeshAgentParam_queryFilterType$1(lua_State *L) { olua_startinvoke(L); @@ -12093,7 +13087,7 @@ static int _cocos2d_NavMeshAgentParam_get_queryFilterType(lua_State *L) return num_ret; } -static int _cocos2d_NavMeshAgentParam_set_queryFilterType(lua_State *L) +static int _olua_fun_cocos2d_NavMeshAgentParam_queryFilterType$2(lua_State *L) { olua_startinvoke(L); @@ -12111,7 +13105,28 @@ static int _cocos2d_NavMeshAgentParam_set_queryFilterType(lua_State *L) return 0; } -static int _cocos2d_NavMeshAgentParam_get_radius(lua_State *L) +static int _olua_fun_cocos2d_NavMeshAgentParam_queryFilterType(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // unsigned char queryFilterType + return _olua_fun_cocos2d_NavMeshAgentParam_queryFilterType$1(L); + } + + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // unsigned char queryFilterType + return _olua_fun_cocos2d_NavMeshAgentParam_queryFilterType$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::NavMeshAgentParam::queryFilterType' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_NavMeshAgentParam_radius$1(lua_State *L) { olua_startinvoke(L); @@ -12128,7 +13143,7 @@ static int _cocos2d_NavMeshAgentParam_get_radius(lua_State *L) return num_ret; } -static int _cocos2d_NavMeshAgentParam_set_radius(lua_State *L) +static int _olua_fun_cocos2d_NavMeshAgentParam_radius$2(lua_State *L) { olua_startinvoke(L); @@ -12146,7 +13161,28 @@ static int _cocos2d_NavMeshAgentParam_set_radius(lua_State *L) return 0; } -static int _cocos2d_NavMeshAgentParam_get_separationWeight(lua_State *L) +static int _olua_fun_cocos2d_NavMeshAgentParam_radius(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float radius + return _olua_fun_cocos2d_NavMeshAgentParam_radius$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float radius + return _olua_fun_cocos2d_NavMeshAgentParam_radius$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::NavMeshAgentParam::radius' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_NavMeshAgentParam_separationWeight$1(lua_State *L) { olua_startinvoke(L); @@ -12163,7 +13199,7 @@ static int _cocos2d_NavMeshAgentParam_get_separationWeight(lua_State *L) return num_ret; } -static int _cocos2d_NavMeshAgentParam_set_separationWeight(lua_State *L) +static int _olua_fun_cocos2d_NavMeshAgentParam_separationWeight$2(lua_State *L) { olua_startinvoke(L); @@ -12181,7 +13217,28 @@ static int _cocos2d_NavMeshAgentParam_set_separationWeight(lua_State *L) return 0; } -static int _cocos2d_NavMeshAgentParam_get_updateFlags(lua_State *L) +static int _olua_fun_cocos2d_NavMeshAgentParam_separationWeight(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float separationWeight + return _olua_fun_cocos2d_NavMeshAgentParam_separationWeight$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float separationWeight + return _olua_fun_cocos2d_NavMeshAgentParam_separationWeight$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::NavMeshAgentParam::separationWeight' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_NavMeshAgentParam_updateFlags$1(lua_State *L) { olua_startinvoke(L); @@ -12198,7 +13255,7 @@ static int _cocos2d_NavMeshAgentParam_get_updateFlags(lua_State *L) return num_ret; } -static int _cocos2d_NavMeshAgentParam_set_updateFlags(lua_State *L) +static int _olua_fun_cocos2d_NavMeshAgentParam_updateFlags$2(lua_State *L) { olua_startinvoke(L); @@ -12216,60 +13273,61 @@ static int _cocos2d_NavMeshAgentParam_set_updateFlags(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_NavMeshAgentParam(lua_State *L) -{ - oluacls_class(L, "cc.NavMeshAgentParam"); - oluacls_func(L, "__call", _cocos2d_NavMeshAgentParam___call); - oluacls_func(L, "__gc", _cocos2d_NavMeshAgentParam___gc); - oluacls_func(L, "__olua_move", _cocos2d_NavMeshAgentParam___olua_move); - oluacls_func(L, "new", _cocos2d_NavMeshAgentParam_new); - oluacls_prop(L, "collisionQueryRange", _cocos2d_NavMeshAgentParam_get_collisionQueryRange, _cocos2d_NavMeshAgentParam_set_collisionQueryRange); - oluacls_prop(L, "height", _cocos2d_NavMeshAgentParam_get_height, _cocos2d_NavMeshAgentParam_set_height); - oluacls_prop(L, "maxAcceleration", _cocos2d_NavMeshAgentParam_get_maxAcceleration, _cocos2d_NavMeshAgentParam_set_maxAcceleration); - oluacls_prop(L, "maxSpeed", _cocos2d_NavMeshAgentParam_get_maxSpeed, _cocos2d_NavMeshAgentParam_set_maxSpeed); - oluacls_prop(L, "obstacleAvoidanceType", _cocos2d_NavMeshAgentParam_get_obstacleAvoidanceType, _cocos2d_NavMeshAgentParam_set_obstacleAvoidanceType); - oluacls_prop(L, "pathOptimizationRange", _cocos2d_NavMeshAgentParam_get_pathOptimizationRange, _cocos2d_NavMeshAgentParam_set_pathOptimizationRange); - oluacls_prop(L, "queryFilterType", _cocos2d_NavMeshAgentParam_get_queryFilterType, _cocos2d_NavMeshAgentParam_set_queryFilterType); - oluacls_prop(L, "radius", _cocos2d_NavMeshAgentParam_get_radius, _cocos2d_NavMeshAgentParam_set_radius); - oluacls_prop(L, "separationWeight", _cocos2d_NavMeshAgentParam_get_separationWeight, _cocos2d_NavMeshAgentParam_set_separationWeight); - oluacls_prop(L, "updateFlags", _cocos2d_NavMeshAgentParam_get_updateFlags, _cocos2d_NavMeshAgentParam_set_updateFlags); - - return 1; -} -OLUA_END_DECLS -#endif - -#if CC_USE_NAVMESH -static int _cocos2d_OffMeshLinkData___call(lua_State *L) +static int _olua_fun_cocos2d_NavMeshAgentParam_updateFlags(lua_State *L) { - olua_startinvoke(L); - - cocos2d::OffMeshLinkData ret; + int num_args = lua_gettop(L) - 1; - luaL_checktype(L, 2, LUA_TTABLE); + if (num_args == 0) { + // unsigned char updateFlags + return _olua_fun_cocos2d_NavMeshAgentParam_updateFlags$1(L); + } - cocos2d::Vec3 arg1; /** startPosition */ - cocos2d::Vec3 arg2; /** endPosition */ + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // unsigned char updateFlags + return _olua_fun_cocos2d_NavMeshAgentParam_updateFlags$2(L); + // } + } - olua_getfield(L, 2, "startPosition"); - olua_check_object(L, -1, &arg1, "cc.Vec3"); - ret.startPosition = arg1; - lua_pop(L, 1); + luaL_error(L, "method 'cocos2d::NavMeshAgentParam::updateFlags' not support '%d' arguments", num_args); - olua_getfield(L, 2, "endPosition"); - olua_check_object(L, -1, &arg2, "cc.Vec3"); - ret.endPosition = arg2; - lua_pop(L, 1); + return 0; +} - olua_pushcopy_object(L, ret, "cc.OffMeshLinkData"); +static int _olua_cls_cc_NavMeshAgentParam(lua_State *L) +{ + oluacls_class(L, "cc.NavMeshAgentParam"); + oluacls_func(L, "__gc", _olua_fun_cocos2d_NavMeshAgentParam___gc); + oluacls_func(L, "__olua_move", _olua_fun_cocos2d_NavMeshAgentParam___olua_move); + oluacls_func(L, "new", _olua_fun_cocos2d_NavMeshAgentParam_new); + oluacls_prop(L, "collisionQueryRange", _olua_fun_cocos2d_NavMeshAgentParam_collisionQueryRange, _olua_fun_cocos2d_NavMeshAgentParam_collisionQueryRange); + oluacls_prop(L, "height", _olua_fun_cocos2d_NavMeshAgentParam_height, _olua_fun_cocos2d_NavMeshAgentParam_height); + oluacls_prop(L, "maxAcceleration", _olua_fun_cocos2d_NavMeshAgentParam_maxAcceleration, _olua_fun_cocos2d_NavMeshAgentParam_maxAcceleration); + oluacls_prop(L, "maxSpeed", _olua_fun_cocos2d_NavMeshAgentParam_maxSpeed, _olua_fun_cocos2d_NavMeshAgentParam_maxSpeed); + oluacls_prop(L, "obstacleAvoidanceType", _olua_fun_cocos2d_NavMeshAgentParam_obstacleAvoidanceType, _olua_fun_cocos2d_NavMeshAgentParam_obstacleAvoidanceType); + oluacls_prop(L, "pathOptimizationRange", _olua_fun_cocos2d_NavMeshAgentParam_pathOptimizationRange, _olua_fun_cocos2d_NavMeshAgentParam_pathOptimizationRange); + oluacls_prop(L, "queryFilterType", _olua_fun_cocos2d_NavMeshAgentParam_queryFilterType, _olua_fun_cocos2d_NavMeshAgentParam_queryFilterType); + oluacls_prop(L, "radius", _olua_fun_cocos2d_NavMeshAgentParam_radius, _olua_fun_cocos2d_NavMeshAgentParam_radius); + oluacls_prop(L, "separationWeight", _olua_fun_cocos2d_NavMeshAgentParam_separationWeight, _olua_fun_cocos2d_NavMeshAgentParam_separationWeight); + oluacls_prop(L, "updateFlags", _olua_fun_cocos2d_NavMeshAgentParam_updateFlags, _olua_fun_cocos2d_NavMeshAgentParam_updateFlags); - olua_endinvoke(L); + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_NavMeshAgentParam(lua_State *L) +{ + olua_require(L, "cocos2d_types", luaopen_cocos2d_types); + if (!olua_getclass(L, "cc.NavMeshAgentParam")) { + luaL_error(L, "class not found: cocos2d::NavMeshAgentParam"); + } return 1; } +OLUA_END_DECLS +#endif -static int _cocos2d_OffMeshLinkData___gc(lua_State *L) +#if CC_USE_NAVMESH +static int _olua_fun_cocos2d_OffMeshLinkData___gc(lua_State *L) { olua_startinvoke(L); @@ -12281,7 +13339,7 @@ static int _cocos2d_OffMeshLinkData___gc(lua_State *L) return 0; } -static int _cocos2d_OffMeshLinkData___olua_move(lua_State *L) +static int _olua_fun_cocos2d_OffMeshLinkData___olua_move(lua_State *L) { olua_startinvoke(L); @@ -12293,7 +13351,7 @@ static int _cocos2d_OffMeshLinkData___olua_move(lua_State *L) return 1; } -static int _cocos2d_OffMeshLinkData_get_endPosition(lua_State *L) +static int _olua_fun_cocos2d_OffMeshLinkData_endPosition$1(lua_State *L) { olua_startinvoke(L); @@ -12303,32 +13361,53 @@ static int _cocos2d_OffMeshLinkData_get_endPosition(lua_State *L) // cocos2d::Vec3 endPosition cocos2d::Vec3 &ret = self->endPosition; - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec3"); + int num_ret = olua_copy_object(L, ret, "cc.Vec3"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_OffMeshLinkData_set_endPosition(lua_State *L) +static int _olua_fun_cocos2d_OffMeshLinkData_endPosition$2(lua_State *L) { olua_startinvoke(L); cocos2d::OffMeshLinkData *self = nullptr; - cocos2d::Vec3 arg1; /** endPosition */ + cocos2d::Vec3 *arg1; /** endPosition */ olua_to_object(L, 1, &self, "cc.OffMeshLinkData"); olua_check_object(L, 2, &arg1, "cc.Vec3"); // cocos2d::Vec3 endPosition - self->endPosition = arg1; + self->endPosition = *arg1; olua_endinvoke(L); return 0; } -static int _cocos2d_OffMeshLinkData_get_startPosition(lua_State *L) +static int _olua_fun_cocos2d_OffMeshLinkData_endPosition(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // cocos2d::Vec3 endPosition + return _olua_fun_cocos2d_OffMeshLinkData_endPosition$1(L); + } + + if (num_args == 1) { + // if ((olua_is_object(L, 2, "cc.Vec3"))) { + // cocos2d::Vec3 endPosition + return _olua_fun_cocos2d_OffMeshLinkData_endPosition$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::OffMeshLinkData::endPosition' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_OffMeshLinkData_startPosition$1(lua_State *L) { olua_startinvoke(L); @@ -12338,127 +13417,76 @@ static int _cocos2d_OffMeshLinkData_get_startPosition(lua_State *L) // cocos2d::Vec3 startPosition cocos2d::Vec3 &ret = self->startPosition; - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec3"); + int num_ret = olua_copy_object(L, ret, "cc.Vec3"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_OffMeshLinkData_set_startPosition(lua_State *L) +static int _olua_fun_cocos2d_OffMeshLinkData_startPosition$2(lua_State *L) { olua_startinvoke(L); cocos2d::OffMeshLinkData *self = nullptr; - cocos2d::Vec3 arg1; /** startPosition */ + cocos2d::Vec3 *arg1; /** startPosition */ olua_to_object(L, 1, &self, "cc.OffMeshLinkData"); olua_check_object(L, 2, &arg1, "cc.Vec3"); // cocos2d::Vec3 startPosition - self->startPosition = arg1; + self->startPosition = *arg1; olua_endinvoke(L); return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_OffMeshLinkData(lua_State *L) -{ - oluacls_class(L, "cc.OffMeshLinkData"); - oluacls_func(L, "__call", _cocos2d_OffMeshLinkData___call); - oluacls_func(L, "__gc", _cocos2d_OffMeshLinkData___gc); - oluacls_func(L, "__olua_move", _cocos2d_OffMeshLinkData___olua_move); - oluacls_prop(L, "endPosition", _cocos2d_OffMeshLinkData_get_endPosition, _cocos2d_OffMeshLinkData_set_endPosition); - oluacls_prop(L, "startPosition", _cocos2d_OffMeshLinkData_get_startPosition, _cocos2d_OffMeshLinkData_set_startPosition); - - return 1; -} -OLUA_END_DECLS -#endif - -static int _cocos2d_backend_BlendDescriptor___call(lua_State *L) +static int _olua_fun_cocos2d_OffMeshLinkData_startPosition(lua_State *L) { - olua_startinvoke(L); - - cocos2d::backend::BlendDescriptor ret; - - luaL_checktype(L, 2, LUA_TTABLE); - - cocos2d::backend::ColorWriteMask arg1 = (cocos2d::backend::ColorWriteMask)0; /** writeMask */ - bool arg2 = false; /** blendEnabled */ - cocos2d::backend::BlendOperation arg3 = (cocos2d::backend::BlendOperation)0; /** rgbBlendOperation */ - cocos2d::backend::BlendOperation arg4 = (cocos2d::backend::BlendOperation)0; /** alphaBlendOperation */ - cocos2d::backend::BlendFactor arg5 = (cocos2d::backend::BlendFactor)0; /** sourceRGBBlendFactor */ - cocos2d::backend::BlendFactor arg6 = (cocos2d::backend::BlendFactor)0; /** destinationRGBBlendFactor */ - cocos2d::backend::BlendFactor arg7 = (cocos2d::backend::BlendFactor)0; /** sourceAlphaBlendFactor */ - cocos2d::backend::BlendFactor arg8 = (cocos2d::backend::BlendFactor)0; /** destinationAlphaBlendFactor */ - - olua_getfield(L, 2, "writeMask"); - if (!olua_isnoneornil(L, -1)) { - olua_check_enum(L, -1, &arg1); - ret.writeMask = arg1; - } - lua_pop(L, 1); + int num_args = lua_gettop(L) - 1; - olua_getfield(L, 2, "blendEnabled"); - if (!olua_isnoneornil(L, -1)) { - olua_check_bool(L, -1, &arg2); - ret.blendEnabled = arg2; + if (num_args == 0) { + // cocos2d::Vec3 startPosition + return _olua_fun_cocos2d_OffMeshLinkData_startPosition$1(L); } - lua_pop(L, 1); - olua_getfield(L, 2, "rgbBlendOperation"); - if (!olua_isnoneornil(L, -1)) { - olua_check_enum(L, -1, &arg3); - ret.rgbBlendOperation = arg3; + if (num_args == 1) { + // if ((olua_is_object(L, 2, "cc.Vec3"))) { + // cocos2d::Vec3 startPosition + return _olua_fun_cocos2d_OffMeshLinkData_startPosition$2(L); + // } } - lua_pop(L, 1); - olua_getfield(L, 2, "alphaBlendOperation"); - if (!olua_isnoneornil(L, -1)) { - olua_check_enum(L, -1, &arg4); - ret.alphaBlendOperation = arg4; - } - lua_pop(L, 1); + luaL_error(L, "method 'cocos2d::OffMeshLinkData::startPosition' not support '%d' arguments", num_args); - olua_getfield(L, 2, "sourceRGBBlendFactor"); - if (!olua_isnoneornil(L, -1)) { - olua_check_enum(L, -1, &arg5); - ret.sourceRGBBlendFactor = arg5; - } - lua_pop(L, 1); + return 0; +} - olua_getfield(L, 2, "destinationRGBBlendFactor"); - if (!olua_isnoneornil(L, -1)) { - olua_check_enum(L, -1, &arg6); - ret.destinationRGBBlendFactor = arg6; - } - lua_pop(L, 1); +static int _olua_cls_cc_OffMeshLinkData(lua_State *L) +{ + oluacls_class(L, "cc.OffMeshLinkData"); + oluacls_func(L, "__gc", _olua_fun_cocos2d_OffMeshLinkData___gc); + oluacls_func(L, "__olua_move", _olua_fun_cocos2d_OffMeshLinkData___olua_move); + oluacls_prop(L, "endPosition", _olua_fun_cocos2d_OffMeshLinkData_endPosition, _olua_fun_cocos2d_OffMeshLinkData_endPosition); + oluacls_prop(L, "startPosition", _olua_fun_cocos2d_OffMeshLinkData_startPosition, _olua_fun_cocos2d_OffMeshLinkData_startPosition); - olua_getfield(L, 2, "sourceAlphaBlendFactor"); - if (!olua_isnoneornil(L, -1)) { - olua_check_enum(L, -1, &arg7); - ret.sourceAlphaBlendFactor = arg7; - } - lua_pop(L, 1); + return 1; +} - olua_getfield(L, 2, "destinationAlphaBlendFactor"); - if (!olua_isnoneornil(L, -1)) { - olua_check_enum(L, -1, &arg8); - ret.destinationAlphaBlendFactor = arg8; +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cc_OffMeshLinkData(lua_State *L) +{ + olua_require(L, "cocos2d_types", luaopen_cocos2d_types); + if (!olua_getclass(L, "cc.OffMeshLinkData")) { + luaL_error(L, "class not found: cocos2d::OffMeshLinkData"); } - lua_pop(L, 1); - - olua_pushcopy_object(L, ret, "ccb.BlendDescriptor"); - - olua_endinvoke(L); - return 1; } +OLUA_END_DECLS +#endif -static int _cocos2d_backend_BlendDescriptor___gc(lua_State *L) +static int _olua_fun_cocos2d_backend_BlendDescriptor___gc(lua_State *L) { olua_startinvoke(L); @@ -12470,7 +13498,7 @@ static int _cocos2d_backend_BlendDescriptor___gc(lua_State *L) return 0; } -static int _cocos2d_backend_BlendDescriptor___olua_move(lua_State *L) +static int _olua_fun_cocos2d_backend_BlendDescriptor___olua_move(lua_State *L) { olua_startinvoke(L); @@ -12482,7 +13510,7 @@ static int _cocos2d_backend_BlendDescriptor___olua_move(lua_State *L) return 1; } -static int _cocos2d_backend_BlendDescriptor_get_alphaBlendOperation(lua_State *L) +static int _olua_fun_cocos2d_backend_BlendDescriptor_alphaBlendOperation$1(lua_State *L) { olua_startinvoke(L); @@ -12490,7 +13518,7 @@ static int _cocos2d_backend_BlendDescriptor_get_alphaBlendOperation(lua_State *L olua_to_object(L, 1, &self, "ccb.BlendDescriptor"); - // @optional cocos2d::backend::BlendOperation alphaBlendOperation + // cocos2d::backend::BlendOperation alphaBlendOperation cocos2d::backend::BlendOperation ret = self->alphaBlendOperation; int num_ret = olua_push_enum(L, ret); @@ -12499,7 +13527,7 @@ static int _cocos2d_backend_BlendDescriptor_get_alphaBlendOperation(lua_State *L return num_ret; } -static int _cocos2d_backend_BlendDescriptor_set_alphaBlendOperation(lua_State *L) +static int _olua_fun_cocos2d_backend_BlendDescriptor_alphaBlendOperation$2(lua_State *L) { olua_startinvoke(L); @@ -12509,7 +13537,7 @@ static int _cocos2d_backend_BlendDescriptor_set_alphaBlendOperation(lua_State *L olua_to_object(L, 1, &self, "ccb.BlendDescriptor"); olua_check_enum(L, 2, &arg1); - // @optional cocos2d::backend::BlendOperation alphaBlendOperation + // cocos2d::backend::BlendOperation alphaBlendOperation self->alphaBlendOperation = arg1; olua_endinvoke(L); @@ -12517,7 +13545,28 @@ static int _cocos2d_backend_BlendDescriptor_set_alphaBlendOperation(lua_State *L return 0; } -static int _cocos2d_backend_BlendDescriptor_get_blendEnabled(lua_State *L) +static int _olua_fun_cocos2d_backend_BlendDescriptor_alphaBlendOperation(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // cocos2d::backend::BlendOperation alphaBlendOperation + return _olua_fun_cocos2d_backend_BlendDescriptor_alphaBlendOperation$1(L); + } + + if (num_args == 1) { + // if ((olua_is_enum(L, 2))) { + // cocos2d::backend::BlendOperation alphaBlendOperation + return _olua_fun_cocos2d_backend_BlendDescriptor_alphaBlendOperation$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::backend::BlendDescriptor::alphaBlendOperation' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_backend_BlendDescriptor_blendEnabled$1(lua_State *L) { olua_startinvoke(L); @@ -12525,7 +13574,7 @@ static int _cocos2d_backend_BlendDescriptor_get_blendEnabled(lua_State *L) olua_to_object(L, 1, &self, "ccb.BlendDescriptor"); - // @optional bool blendEnabled + // bool blendEnabled bool ret = self->blendEnabled; int num_ret = olua_push_bool(L, ret); @@ -12534,7 +13583,7 @@ static int _cocos2d_backend_BlendDescriptor_get_blendEnabled(lua_State *L) return num_ret; } -static int _cocos2d_backend_BlendDescriptor_set_blendEnabled(lua_State *L) +static int _olua_fun_cocos2d_backend_BlendDescriptor_blendEnabled$2(lua_State *L) { olua_startinvoke(L); @@ -12544,7 +13593,7 @@ static int _cocos2d_backend_BlendDescriptor_set_blendEnabled(lua_State *L) olua_to_object(L, 1, &self, "ccb.BlendDescriptor"); olua_check_bool(L, 2, &arg1); - // @optional bool blendEnabled + // bool blendEnabled self->blendEnabled = arg1; olua_endinvoke(L); @@ -12552,7 +13601,28 @@ static int _cocos2d_backend_BlendDescriptor_set_blendEnabled(lua_State *L) return 0; } -static int _cocos2d_backend_BlendDescriptor_get_destinationAlphaBlendFactor(lua_State *L) +static int _olua_fun_cocos2d_backend_BlendDescriptor_blendEnabled(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // bool blendEnabled + return _olua_fun_cocos2d_backend_BlendDescriptor_blendEnabled$1(L); + } + + if (num_args == 1) { + // if ((olua_is_bool(L, 2))) { + // bool blendEnabled + return _olua_fun_cocos2d_backend_BlendDescriptor_blendEnabled$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::backend::BlendDescriptor::blendEnabled' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_backend_BlendDescriptor_destinationAlphaBlendFactor$1(lua_State *L) { olua_startinvoke(L); @@ -12560,7 +13630,7 @@ static int _cocos2d_backend_BlendDescriptor_get_destinationAlphaBlendFactor(lua_ olua_to_object(L, 1, &self, "ccb.BlendDescriptor"); - // @optional cocos2d::backend::BlendFactor destinationAlphaBlendFactor + // cocos2d::backend::BlendFactor destinationAlphaBlendFactor cocos2d::backend::BlendFactor ret = self->destinationAlphaBlendFactor; int num_ret = olua_push_enum(L, ret); @@ -12569,7 +13639,7 @@ static int _cocos2d_backend_BlendDescriptor_get_destinationAlphaBlendFactor(lua_ return num_ret; } -static int _cocos2d_backend_BlendDescriptor_set_destinationAlphaBlendFactor(lua_State *L) +static int _olua_fun_cocos2d_backend_BlendDescriptor_destinationAlphaBlendFactor$2(lua_State *L) { olua_startinvoke(L); @@ -12579,7 +13649,7 @@ static int _cocos2d_backend_BlendDescriptor_set_destinationAlphaBlendFactor(lua_ olua_to_object(L, 1, &self, "ccb.BlendDescriptor"); olua_check_enum(L, 2, &arg1); - // @optional cocos2d::backend::BlendFactor destinationAlphaBlendFactor + // cocos2d::backend::BlendFactor destinationAlphaBlendFactor self->destinationAlphaBlendFactor = arg1; olua_endinvoke(L); @@ -12587,7 +13657,28 @@ static int _cocos2d_backend_BlendDescriptor_set_destinationAlphaBlendFactor(lua_ return 0; } -static int _cocos2d_backend_BlendDescriptor_get_destinationRGBBlendFactor(lua_State *L) +static int _olua_fun_cocos2d_backend_BlendDescriptor_destinationAlphaBlendFactor(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // cocos2d::backend::BlendFactor destinationAlphaBlendFactor + return _olua_fun_cocos2d_backend_BlendDescriptor_destinationAlphaBlendFactor$1(L); + } + + if (num_args == 1) { + // if ((olua_is_enum(L, 2))) { + // cocos2d::backend::BlendFactor destinationAlphaBlendFactor + return _olua_fun_cocos2d_backend_BlendDescriptor_destinationAlphaBlendFactor$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::backend::BlendDescriptor::destinationAlphaBlendFactor' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_backend_BlendDescriptor_destinationRGBBlendFactor$1(lua_State *L) { olua_startinvoke(L); @@ -12595,7 +13686,7 @@ static int _cocos2d_backend_BlendDescriptor_get_destinationRGBBlendFactor(lua_St olua_to_object(L, 1, &self, "ccb.BlendDescriptor"); - // @optional cocos2d::backend::BlendFactor destinationRGBBlendFactor + // cocos2d::backend::BlendFactor destinationRGBBlendFactor cocos2d::backend::BlendFactor ret = self->destinationRGBBlendFactor; int num_ret = olua_push_enum(L, ret); @@ -12604,7 +13695,7 @@ static int _cocos2d_backend_BlendDescriptor_get_destinationRGBBlendFactor(lua_St return num_ret; } -static int _cocos2d_backend_BlendDescriptor_set_destinationRGBBlendFactor(lua_State *L) +static int _olua_fun_cocos2d_backend_BlendDescriptor_destinationRGBBlendFactor$2(lua_State *L) { olua_startinvoke(L); @@ -12614,7 +13705,7 @@ static int _cocos2d_backend_BlendDescriptor_set_destinationRGBBlendFactor(lua_St olua_to_object(L, 1, &self, "ccb.BlendDescriptor"); olua_check_enum(L, 2, &arg1); - // @optional cocos2d::backend::BlendFactor destinationRGBBlendFactor + // cocos2d::backend::BlendFactor destinationRGBBlendFactor self->destinationRGBBlendFactor = arg1; olua_endinvoke(L); @@ -12622,7 +13713,28 @@ static int _cocos2d_backend_BlendDescriptor_set_destinationRGBBlendFactor(lua_St return 0; } -static int _cocos2d_backend_BlendDescriptor_get_rgbBlendOperation(lua_State *L) +static int _olua_fun_cocos2d_backend_BlendDescriptor_destinationRGBBlendFactor(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // cocos2d::backend::BlendFactor destinationRGBBlendFactor + return _olua_fun_cocos2d_backend_BlendDescriptor_destinationRGBBlendFactor$1(L); + } + + if (num_args == 1) { + // if ((olua_is_enum(L, 2))) { + // cocos2d::backend::BlendFactor destinationRGBBlendFactor + return _olua_fun_cocos2d_backend_BlendDescriptor_destinationRGBBlendFactor$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::backend::BlendDescriptor::destinationRGBBlendFactor' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_backend_BlendDescriptor_rgbBlendOperation$1(lua_State *L) { olua_startinvoke(L); @@ -12630,7 +13742,7 @@ static int _cocos2d_backend_BlendDescriptor_get_rgbBlendOperation(lua_State *L) olua_to_object(L, 1, &self, "ccb.BlendDescriptor"); - // @optional cocos2d::backend::BlendOperation rgbBlendOperation + // cocos2d::backend::BlendOperation rgbBlendOperation cocos2d::backend::BlendOperation ret = self->rgbBlendOperation; int num_ret = olua_push_enum(L, ret); @@ -12639,7 +13751,7 @@ static int _cocos2d_backend_BlendDescriptor_get_rgbBlendOperation(lua_State *L) return num_ret; } -static int _cocos2d_backend_BlendDescriptor_set_rgbBlendOperation(lua_State *L) +static int _olua_fun_cocos2d_backend_BlendDescriptor_rgbBlendOperation$2(lua_State *L) { olua_startinvoke(L); @@ -12649,7 +13761,7 @@ static int _cocos2d_backend_BlendDescriptor_set_rgbBlendOperation(lua_State *L) olua_to_object(L, 1, &self, "ccb.BlendDescriptor"); olua_check_enum(L, 2, &arg1); - // @optional cocos2d::backend::BlendOperation rgbBlendOperation + // cocos2d::backend::BlendOperation rgbBlendOperation self->rgbBlendOperation = arg1; olua_endinvoke(L); @@ -12657,7 +13769,28 @@ static int _cocos2d_backend_BlendDescriptor_set_rgbBlendOperation(lua_State *L) return 0; } -static int _cocos2d_backend_BlendDescriptor_get_sourceAlphaBlendFactor(lua_State *L) +static int _olua_fun_cocos2d_backend_BlendDescriptor_rgbBlendOperation(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // cocos2d::backend::BlendOperation rgbBlendOperation + return _olua_fun_cocos2d_backend_BlendDescriptor_rgbBlendOperation$1(L); + } + + if (num_args == 1) { + // if ((olua_is_enum(L, 2))) { + // cocos2d::backend::BlendOperation rgbBlendOperation + return _olua_fun_cocos2d_backend_BlendDescriptor_rgbBlendOperation$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::backend::BlendDescriptor::rgbBlendOperation' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_backend_BlendDescriptor_sourceAlphaBlendFactor$1(lua_State *L) { olua_startinvoke(L); @@ -12665,7 +13798,7 @@ static int _cocos2d_backend_BlendDescriptor_get_sourceAlphaBlendFactor(lua_State olua_to_object(L, 1, &self, "ccb.BlendDescriptor"); - // @optional cocos2d::backend::BlendFactor sourceAlphaBlendFactor + // cocos2d::backend::BlendFactor sourceAlphaBlendFactor cocos2d::backend::BlendFactor ret = self->sourceAlphaBlendFactor; int num_ret = olua_push_enum(L, ret); @@ -12674,7 +13807,7 @@ static int _cocos2d_backend_BlendDescriptor_get_sourceAlphaBlendFactor(lua_State return num_ret; } -static int _cocos2d_backend_BlendDescriptor_set_sourceAlphaBlendFactor(lua_State *L) +static int _olua_fun_cocos2d_backend_BlendDescriptor_sourceAlphaBlendFactor$2(lua_State *L) { olua_startinvoke(L); @@ -12684,7 +13817,7 @@ static int _cocos2d_backend_BlendDescriptor_set_sourceAlphaBlendFactor(lua_State olua_to_object(L, 1, &self, "ccb.BlendDescriptor"); olua_check_enum(L, 2, &arg1); - // @optional cocos2d::backend::BlendFactor sourceAlphaBlendFactor + // cocos2d::backend::BlendFactor sourceAlphaBlendFactor self->sourceAlphaBlendFactor = arg1; olua_endinvoke(L); @@ -12692,7 +13825,28 @@ static int _cocos2d_backend_BlendDescriptor_set_sourceAlphaBlendFactor(lua_State return 0; } -static int _cocos2d_backend_BlendDescriptor_get_sourceRGBBlendFactor(lua_State *L) +static int _olua_fun_cocos2d_backend_BlendDescriptor_sourceAlphaBlendFactor(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // cocos2d::backend::BlendFactor sourceAlphaBlendFactor + return _olua_fun_cocos2d_backend_BlendDescriptor_sourceAlphaBlendFactor$1(L); + } + + if (num_args == 1) { + // if ((olua_is_enum(L, 2))) { + // cocos2d::backend::BlendFactor sourceAlphaBlendFactor + return _olua_fun_cocos2d_backend_BlendDescriptor_sourceAlphaBlendFactor$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::backend::BlendDescriptor::sourceAlphaBlendFactor' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_backend_BlendDescriptor_sourceRGBBlendFactor$1(lua_State *L) { olua_startinvoke(L); @@ -12700,7 +13854,7 @@ static int _cocos2d_backend_BlendDescriptor_get_sourceRGBBlendFactor(lua_State * olua_to_object(L, 1, &self, "ccb.BlendDescriptor"); - // @optional cocos2d::backend::BlendFactor sourceRGBBlendFactor + // cocos2d::backend::BlendFactor sourceRGBBlendFactor cocos2d::backend::BlendFactor ret = self->sourceRGBBlendFactor; int num_ret = olua_push_enum(L, ret); @@ -12709,7 +13863,7 @@ static int _cocos2d_backend_BlendDescriptor_get_sourceRGBBlendFactor(lua_State * return num_ret; } -static int _cocos2d_backend_BlendDescriptor_set_sourceRGBBlendFactor(lua_State *L) +static int _olua_fun_cocos2d_backend_BlendDescriptor_sourceRGBBlendFactor$2(lua_State *L) { olua_startinvoke(L); @@ -12719,7 +13873,7 @@ static int _cocos2d_backend_BlendDescriptor_set_sourceRGBBlendFactor(lua_State * olua_to_object(L, 1, &self, "ccb.BlendDescriptor"); olua_check_enum(L, 2, &arg1); - // @optional cocos2d::backend::BlendFactor sourceRGBBlendFactor + // cocos2d::backend::BlendFactor sourceRGBBlendFactor self->sourceRGBBlendFactor = arg1; olua_endinvoke(L); @@ -12727,7 +13881,28 @@ static int _cocos2d_backend_BlendDescriptor_set_sourceRGBBlendFactor(lua_State * return 0; } -static int _cocos2d_backend_BlendDescriptor_get_writeMask(lua_State *L) +static int _olua_fun_cocos2d_backend_BlendDescriptor_sourceRGBBlendFactor(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // cocos2d::backend::BlendFactor sourceRGBBlendFactor + return _olua_fun_cocos2d_backend_BlendDescriptor_sourceRGBBlendFactor$1(L); + } + + if (num_args == 1) { + // if ((olua_is_enum(L, 2))) { + // cocos2d::backend::BlendFactor sourceRGBBlendFactor + return _olua_fun_cocos2d_backend_BlendDescriptor_sourceRGBBlendFactor$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::backend::BlendDescriptor::sourceRGBBlendFactor' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_backend_BlendDescriptor_writeMask$1(lua_State *L) { olua_startinvoke(L); @@ -12735,7 +13910,7 @@ static int _cocos2d_backend_BlendDescriptor_get_writeMask(lua_State *L) olua_to_object(L, 1, &self, "ccb.BlendDescriptor"); - // @optional cocos2d::backend::ColorWriteMask writeMask + // cocos2d::backend::ColorWriteMask writeMask cocos2d::backend::ColorWriteMask ret = self->writeMask; int num_ret = olua_push_enum(L, ret); @@ -12744,7 +13919,7 @@ static int _cocos2d_backend_BlendDescriptor_get_writeMask(lua_State *L) return num_ret; } -static int _cocos2d_backend_BlendDescriptor_set_writeMask(lua_State *L) +static int _olua_fun_cocos2d_backend_BlendDescriptor_writeMask$2(lua_State *L) { olua_startinvoke(L); @@ -12754,7 +13929,7 @@ static int _cocos2d_backend_BlendDescriptor_set_writeMask(lua_State *L) olua_to_object(L, 1, &self, "ccb.BlendDescriptor"); olua_check_enum(L, 2, &arg1); - // @optional cocos2d::backend::ColorWriteMask writeMask + // cocos2d::backend::ColorWriteMask writeMask self->writeMask = arg1; olua_endinvoke(L); @@ -12762,103 +13937,196 @@ static int _cocos2d_backend_BlendDescriptor_set_writeMask(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_backend_BlendDescriptor(lua_State *L) +static int _olua_fun_cocos2d_backend_BlendDescriptor_writeMask(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // cocos2d::backend::ColorWriteMask writeMask + return _olua_fun_cocos2d_backend_BlendDescriptor_writeMask$1(L); + } + + if (num_args == 1) { + // if ((olua_is_enum(L, 2))) { + // cocos2d::backend::ColorWriteMask writeMask + return _olua_fun_cocos2d_backend_BlendDescriptor_writeMask$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::backend::BlendDescriptor::writeMask' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_cls_ccb_BlendDescriptor(lua_State *L) { oluacls_class(L, "ccb.BlendDescriptor"); - oluacls_func(L, "__call", _cocos2d_backend_BlendDescriptor___call); - oluacls_func(L, "__gc", _cocos2d_backend_BlendDescriptor___gc); - oluacls_func(L, "__olua_move", _cocos2d_backend_BlendDescriptor___olua_move); - oluacls_prop(L, "alphaBlendOperation", _cocos2d_backend_BlendDescriptor_get_alphaBlendOperation, _cocos2d_backend_BlendDescriptor_set_alphaBlendOperation); - oluacls_prop(L, "blendEnabled", _cocos2d_backend_BlendDescriptor_get_blendEnabled, _cocos2d_backend_BlendDescriptor_set_blendEnabled); - oluacls_prop(L, "destinationAlphaBlendFactor", _cocos2d_backend_BlendDescriptor_get_destinationAlphaBlendFactor, _cocos2d_backend_BlendDescriptor_set_destinationAlphaBlendFactor); - oluacls_prop(L, "destinationRGBBlendFactor", _cocos2d_backend_BlendDescriptor_get_destinationRGBBlendFactor, _cocos2d_backend_BlendDescriptor_set_destinationRGBBlendFactor); - oluacls_prop(L, "rgbBlendOperation", _cocos2d_backend_BlendDescriptor_get_rgbBlendOperation, _cocos2d_backend_BlendDescriptor_set_rgbBlendOperation); - oluacls_prop(L, "sourceAlphaBlendFactor", _cocos2d_backend_BlendDescriptor_get_sourceAlphaBlendFactor, _cocos2d_backend_BlendDescriptor_set_sourceAlphaBlendFactor); - oluacls_prop(L, "sourceRGBBlendFactor", _cocos2d_backend_BlendDescriptor_get_sourceRGBBlendFactor, _cocos2d_backend_BlendDescriptor_set_sourceRGBBlendFactor); - oluacls_prop(L, "writeMask", _cocos2d_backend_BlendDescriptor_get_writeMask, _cocos2d_backend_BlendDescriptor_set_writeMask); + oluacls_func(L, "__gc", _olua_fun_cocos2d_backend_BlendDescriptor___gc); + oluacls_func(L, "__olua_move", _olua_fun_cocos2d_backend_BlendDescriptor___olua_move); + oluacls_prop(L, "alphaBlendOperation", _olua_fun_cocos2d_backend_BlendDescriptor_alphaBlendOperation, _olua_fun_cocos2d_backend_BlendDescriptor_alphaBlendOperation); + oluacls_prop(L, "blendEnabled", _olua_fun_cocos2d_backend_BlendDescriptor_blendEnabled, _olua_fun_cocos2d_backend_BlendDescriptor_blendEnabled); + oluacls_prop(L, "destinationAlphaBlendFactor", _olua_fun_cocos2d_backend_BlendDescriptor_destinationAlphaBlendFactor, _olua_fun_cocos2d_backend_BlendDescriptor_destinationAlphaBlendFactor); + oluacls_prop(L, "destinationRGBBlendFactor", _olua_fun_cocos2d_backend_BlendDescriptor_destinationRGBBlendFactor, _olua_fun_cocos2d_backend_BlendDescriptor_destinationRGBBlendFactor); + oluacls_prop(L, "rgbBlendOperation", _olua_fun_cocos2d_backend_BlendDescriptor_rgbBlendOperation, _olua_fun_cocos2d_backend_BlendDescriptor_rgbBlendOperation); + oluacls_prop(L, "sourceAlphaBlendFactor", _olua_fun_cocos2d_backend_BlendDescriptor_sourceAlphaBlendFactor, _olua_fun_cocos2d_backend_BlendDescriptor_sourceAlphaBlendFactor); + oluacls_prop(L, "sourceRGBBlendFactor", _olua_fun_cocos2d_backend_BlendDescriptor_sourceRGBBlendFactor, _olua_fun_cocos2d_backend_BlendDescriptor_sourceRGBBlendFactor); + oluacls_prop(L, "writeMask", _olua_fun_cocos2d_backend_BlendDescriptor_writeMask, _olua_fun_cocos2d_backend_BlendDescriptor_writeMask); + + return 1; +} + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccb_BlendDescriptor(lua_State *L) +{ + olua_require(L, "cocos2d_types", luaopen_cocos2d_types); + if (!olua_getclass(L, "ccb.BlendDescriptor")) { + luaL_error(L, "class not found: cocos2d::backend::BlendDescriptor"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_fun_cocos2d_backend_SamplerDescriptor___gc(lua_State *L) +{ + olua_startinvoke(L); + + auto self = (cocos2d::backend::SamplerDescriptor *)olua_toobj(L, 1, "ccb.SamplerDescriptor"); + olua_postgc(L, self); + + olua_endinvoke(L); + + return 0; +} + +static int _olua_fun_cocos2d_backend_SamplerDescriptor___olua_move(lua_State *L) +{ + olua_startinvoke(L); + + auto self = (cocos2d::backend::SamplerDescriptor *)olua_toobj(L, 1, "ccb.SamplerDescriptor"); + olua_push_object(L, self, "ccb.SamplerDescriptor"); + + olua_endinvoke(L); + + return 1; +} + +static int _olua_fun_cocos2d_backend_SamplerDescriptor_magFilter$1(lua_State *L) +{ + olua_startinvoke(L); + + cocos2d::backend::SamplerDescriptor *self = nullptr; + + olua_to_object(L, 1, &self, "ccb.SamplerDescriptor"); + + // cocos2d::backend::SamplerFilter magFilter + cocos2d::backend::SamplerFilter ret = self->magFilter; + int num_ret = olua_push_enum(L, ret); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_cocos2d_backend_SamplerDescriptor_magFilter$2(lua_State *L) +{ + olua_startinvoke(L); + + cocos2d::backend::SamplerDescriptor *self = nullptr; + cocos2d::backend::SamplerFilter arg1 = (cocos2d::backend::SamplerFilter)0; /** magFilter */ + + olua_to_object(L, 1, &self, "ccb.SamplerDescriptor"); + olua_check_enum(L, 2, &arg1); + + // cocos2d::backend::SamplerFilter magFilter + self->magFilter = arg1; + + olua_endinvoke(L); + + return 0; +} + +static int _olua_fun_cocos2d_backend_SamplerDescriptor_magFilter(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // cocos2d::backend::SamplerFilter magFilter + return _olua_fun_cocos2d_backend_SamplerDescriptor_magFilter$1(L); + } + + if (num_args == 1) { + // if ((olua_is_enum(L, 2))) { + // cocos2d::backend::SamplerFilter magFilter + return _olua_fun_cocos2d_backend_SamplerDescriptor_magFilter$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::backend::SamplerDescriptor::magFilter' not support '%d' arguments", num_args); - return 1; + return 0; } -OLUA_END_DECLS -static int _cocos2d_backend_SamplerDescriptor___call(lua_State *L) +static int _olua_fun_cocos2d_backend_SamplerDescriptor_minFilter$1(lua_State *L) { olua_startinvoke(L); - cocos2d::backend::SamplerDescriptor ret; - - luaL_checktype(L, 2, LUA_TTABLE); - - cocos2d::backend::SamplerFilter arg1 = (cocos2d::backend::SamplerFilter)0; /** magFilter */ - cocos2d::backend::SamplerFilter arg2 = (cocos2d::backend::SamplerFilter)0; /** minFilter */ - cocos2d::backend::SamplerAddressMode arg3 = (cocos2d::backend::SamplerAddressMode)0; /** sAddressMode */ - cocos2d::backend::SamplerAddressMode arg4 = (cocos2d::backend::SamplerAddressMode)0; /** tAddressMode */ - - olua_getfield(L, 2, "magFilter"); - if (!olua_isnoneornil(L, -1)) { - olua_check_enum(L, -1, &arg1); - ret.magFilter = arg1; - } - lua_pop(L, 1); - - olua_getfield(L, 2, "minFilter"); - if (!olua_isnoneornil(L, -1)) { - olua_check_enum(L, -1, &arg2); - ret.minFilter = arg2; - } - lua_pop(L, 1); - - olua_getfield(L, 2, "sAddressMode"); - if (!olua_isnoneornil(L, -1)) { - olua_check_enum(L, -1, &arg3); - ret.sAddressMode = arg3; - } - lua_pop(L, 1); + cocos2d::backend::SamplerDescriptor *self = nullptr; - olua_getfield(L, 2, "tAddressMode"); - if (!olua_isnoneornil(L, -1)) { - olua_check_enum(L, -1, &arg4); - ret.tAddressMode = arg4; - } - lua_pop(L, 1); + olua_to_object(L, 1, &self, "ccb.SamplerDescriptor"); - olua_pushcopy_object(L, ret, "ccb.SamplerDescriptor"); + // cocos2d::backend::SamplerFilter minFilter + cocos2d::backend::SamplerFilter ret = self->minFilter; + int num_ret = olua_push_enum(L, ret); olua_endinvoke(L); - return 1; + return num_ret; } -static int _cocos2d_backend_SamplerDescriptor___gc(lua_State *L) +static int _olua_fun_cocos2d_backend_SamplerDescriptor_minFilter$2(lua_State *L) { olua_startinvoke(L); - auto self = (cocos2d::backend::SamplerDescriptor *)olua_toobj(L, 1, "ccb.SamplerDescriptor"); - olua_postgc(L, self); + cocos2d::backend::SamplerDescriptor *self = nullptr; + cocos2d::backend::SamplerFilter arg1 = (cocos2d::backend::SamplerFilter)0; /** minFilter */ + + olua_to_object(L, 1, &self, "ccb.SamplerDescriptor"); + olua_check_enum(L, 2, &arg1); + + // cocos2d::backend::SamplerFilter minFilter + self->minFilter = arg1; olua_endinvoke(L); return 0; } -static int _cocos2d_backend_SamplerDescriptor___olua_move(lua_State *L) +static int _olua_fun_cocos2d_backend_SamplerDescriptor_minFilter(lua_State *L) { - olua_startinvoke(L); + int num_args = lua_gettop(L) - 1; - auto self = (cocos2d::backend::SamplerDescriptor *)olua_toobj(L, 1, "ccb.SamplerDescriptor"); - olua_push_object(L, self, "ccb.SamplerDescriptor"); + if (num_args == 0) { + // cocos2d::backend::SamplerFilter minFilter + return _olua_fun_cocos2d_backend_SamplerDescriptor_minFilter$1(L); + } - olua_endinvoke(L); + if (num_args == 1) { + // if ((olua_is_enum(L, 2))) { + // cocos2d::backend::SamplerFilter minFilter + return _olua_fun_cocos2d_backend_SamplerDescriptor_minFilter$2(L); + // } + } - return 1; + luaL_error(L, "method 'cocos2d::backend::SamplerDescriptor::minFilter' not support '%d' arguments", num_args); + + return 0; } -static int _cocos2d_backend_SamplerDescriptor_new$1(lua_State *L) +static int _olua_fun_cocos2d_backend_SamplerDescriptor_new$1(lua_State *L) { olua_startinvoke(L); - // SamplerDescriptor() + // cocos2d::backend::SamplerDescriptor() cocos2d::backend::SamplerDescriptor *ret = new cocos2d::backend::SamplerDescriptor(); int num_ret = olua_push_object(L, ret, "ccb.SamplerDescriptor"); olua_postnew(L, ret); @@ -12868,7 +14136,7 @@ static int _cocos2d_backend_SamplerDescriptor_new$1(lua_State *L) return num_ret; } -static int _cocos2d_backend_SamplerDescriptor_new$2(lua_State *L) +static int _olua_fun_cocos2d_backend_SamplerDescriptor_new$2(lua_State *L) { olua_startinvoke(L); @@ -12882,7 +14150,7 @@ static int _cocos2d_backend_SamplerDescriptor_new$2(lua_State *L) olua_check_enum(L, 3, &arg3); olua_check_enum(L, 4, &arg4); - // SamplerDescriptor(cocos2d::backend::SamplerFilter _magFilter, cocos2d::backend::SamplerFilter _minFilter, cocos2d::backend::SamplerAddressMode _sAddressMode, cocos2d::backend::SamplerAddressMode _tAddressMode) + // cocos2d::backend::SamplerDescriptor(cocos2d::backend::SamplerFilter _magFilter, cocos2d::backend::SamplerFilter _minFilter, cocos2d::backend::SamplerAddressMode _sAddressMode, cocos2d::backend::SamplerAddressMode _tAddressMode) cocos2d::backend::SamplerDescriptor *ret = new cocos2d::backend::SamplerDescriptor(arg1, arg2, arg3, arg4); int num_ret = olua_push_object(L, ret, "ccb.SamplerDescriptor"); olua_postnew(L, ret); @@ -12892,19 +14160,19 @@ static int _cocos2d_backend_SamplerDescriptor_new$2(lua_State *L) return num_ret; } -static int _cocos2d_backend_SamplerDescriptor_new(lua_State *L) +static int _olua_fun_cocos2d_backend_SamplerDescriptor_new(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 0) { - // SamplerDescriptor() - return _cocos2d_backend_SamplerDescriptor_new$1(L); + // cocos2d::backend::SamplerDescriptor() + return _olua_fun_cocos2d_backend_SamplerDescriptor_new$1(L); } if (num_args == 4) { // if ((olua_is_enum(L, 1)) && (olua_is_enum(L, 2)) && (olua_is_enum(L, 3)) && (olua_is_enum(L, 4))) { - // SamplerDescriptor(cocos2d::backend::SamplerFilter _magFilter, cocos2d::backend::SamplerFilter _minFilter, cocos2d::backend::SamplerAddressMode _sAddressMode, cocos2d::backend::SamplerAddressMode _tAddressMode) - return _cocos2d_backend_SamplerDescriptor_new$2(L); + // cocos2d::backend::SamplerDescriptor(cocos2d::backend::SamplerFilter _magFilter, cocos2d::backend::SamplerFilter _minFilter, cocos2d::backend::SamplerAddressMode _sAddressMode, cocos2d::backend::SamplerAddressMode _tAddressMode) + return _olua_fun_cocos2d_backend_SamplerDescriptor_new$2(L); // } } @@ -12913,7 +14181,7 @@ static int _cocos2d_backend_SamplerDescriptor_new(lua_State *L) return 0; } -static int _cocos2d_backend_SamplerDescriptor_get_magFilter(lua_State *L) +static int _olua_fun_cocos2d_backend_SamplerDescriptor_sAddressMode$1(lua_State *L) { olua_startinvoke(L); @@ -12921,8 +14189,8 @@ static int _cocos2d_backend_SamplerDescriptor_get_magFilter(lua_State *L) olua_to_object(L, 1, &self, "ccb.SamplerDescriptor"); - // @optional cocos2d::backend::SamplerFilter magFilter - cocos2d::backend::SamplerFilter ret = self->magFilter; + // cocos2d::backend::SamplerAddressMode sAddressMode + cocos2d::backend::SamplerAddressMode ret = self->sAddressMode; int num_ret = olua_push_enum(L, ret); olua_endinvoke(L); @@ -12930,60 +14198,46 @@ static int _cocos2d_backend_SamplerDescriptor_get_magFilter(lua_State *L) return num_ret; } -static int _cocos2d_backend_SamplerDescriptor_set_magFilter(lua_State *L) +static int _olua_fun_cocos2d_backend_SamplerDescriptor_sAddressMode$2(lua_State *L) { olua_startinvoke(L); cocos2d::backend::SamplerDescriptor *self = nullptr; - cocos2d::backend::SamplerFilter arg1 = (cocos2d::backend::SamplerFilter)0; /** magFilter */ + cocos2d::backend::SamplerAddressMode arg1 = (cocos2d::backend::SamplerAddressMode)0; /** sAddressMode */ olua_to_object(L, 1, &self, "ccb.SamplerDescriptor"); olua_check_enum(L, 2, &arg1); - // @optional cocos2d::backend::SamplerFilter magFilter - self->magFilter = arg1; + // cocos2d::backend::SamplerAddressMode sAddressMode + self->sAddressMode = arg1; olua_endinvoke(L); return 0; } -static int _cocos2d_backend_SamplerDescriptor_get_minFilter(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::backend::SamplerDescriptor *self = nullptr; - - olua_to_object(L, 1, &self, "ccb.SamplerDescriptor"); - - // @optional cocos2d::backend::SamplerFilter minFilter - cocos2d::backend::SamplerFilter ret = self->minFilter; - int num_ret = olua_push_enum(L, ret); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_backend_SamplerDescriptor_set_minFilter(lua_State *L) +static int _olua_fun_cocos2d_backend_SamplerDescriptor_sAddressMode(lua_State *L) { - olua_startinvoke(L); - - cocos2d::backend::SamplerDescriptor *self = nullptr; - cocos2d::backend::SamplerFilter arg1 = (cocos2d::backend::SamplerFilter)0; /** minFilter */ + int num_args = lua_gettop(L) - 1; - olua_to_object(L, 1, &self, "ccb.SamplerDescriptor"); - olua_check_enum(L, 2, &arg1); + if (num_args == 0) { + // cocos2d::backend::SamplerAddressMode sAddressMode + return _olua_fun_cocos2d_backend_SamplerDescriptor_sAddressMode$1(L); + } - // @optional cocos2d::backend::SamplerFilter minFilter - self->minFilter = arg1; + if (num_args == 1) { + // if ((olua_is_enum(L, 2))) { + // cocos2d::backend::SamplerAddressMode sAddressMode + return _olua_fun_cocos2d_backend_SamplerDescriptor_sAddressMode$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'cocos2d::backend::SamplerDescriptor::sAddressMode' not support '%d' arguments", num_args); return 0; } -static int _cocos2d_backend_SamplerDescriptor_get_sAddressMode(lua_State *L) +static int _olua_fun_cocos2d_backend_SamplerDescriptor_tAddressMode$1(lua_State *L) { olua_startinvoke(L); @@ -12991,8 +14245,8 @@ static int _cocos2d_backend_SamplerDescriptor_get_sAddressMode(lua_State *L) olua_to_object(L, 1, &self, "ccb.SamplerDescriptor"); - // @optional cocos2d::backend::SamplerAddressMode sAddressMode - cocos2d::backend::SamplerAddressMode ret = self->sAddressMode; + // cocos2d::backend::SamplerAddressMode tAddressMode + cocos2d::backend::SamplerAddressMode ret = self->tAddressMode; int num_ret = olua_push_enum(L, ret); olua_endinvoke(L); @@ -13000,109 +14254,71 @@ static int _cocos2d_backend_SamplerDescriptor_get_sAddressMode(lua_State *L) return num_ret; } -static int _cocos2d_backend_SamplerDescriptor_set_sAddressMode(lua_State *L) +static int _olua_fun_cocos2d_backend_SamplerDescriptor_tAddressMode$2(lua_State *L) { olua_startinvoke(L); cocos2d::backend::SamplerDescriptor *self = nullptr; - cocos2d::backend::SamplerAddressMode arg1 = (cocos2d::backend::SamplerAddressMode)0; /** sAddressMode */ + cocos2d::backend::SamplerAddressMode arg1 = (cocos2d::backend::SamplerAddressMode)0; /** tAddressMode */ olua_to_object(L, 1, &self, "ccb.SamplerDescriptor"); olua_check_enum(L, 2, &arg1); - // @optional cocos2d::backend::SamplerAddressMode sAddressMode - self->sAddressMode = arg1; + // cocos2d::backend::SamplerAddressMode tAddressMode + self->tAddressMode = arg1; olua_endinvoke(L); return 0; } -static int _cocos2d_backend_SamplerDescriptor_get_tAddressMode(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::backend::SamplerDescriptor *self = nullptr; - - olua_to_object(L, 1, &self, "ccb.SamplerDescriptor"); - - // @optional cocos2d::backend::SamplerAddressMode tAddressMode - cocos2d::backend::SamplerAddressMode ret = self->tAddressMode; - int num_ret = olua_push_enum(L, ret); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_backend_SamplerDescriptor_set_tAddressMode(lua_State *L) +static int _olua_fun_cocos2d_backend_SamplerDescriptor_tAddressMode(lua_State *L) { - olua_startinvoke(L); - - cocos2d::backend::SamplerDescriptor *self = nullptr; - cocos2d::backend::SamplerAddressMode arg1 = (cocos2d::backend::SamplerAddressMode)0; /** tAddressMode */ + int num_args = lua_gettop(L) - 1; - olua_to_object(L, 1, &self, "ccb.SamplerDescriptor"); - olua_check_enum(L, 2, &arg1); + if (num_args == 0) { + // cocos2d::backend::SamplerAddressMode tAddressMode + return _olua_fun_cocos2d_backend_SamplerDescriptor_tAddressMode$1(L); + } - // @optional cocos2d::backend::SamplerAddressMode tAddressMode - self->tAddressMode = arg1; + if (num_args == 1) { + // if ((olua_is_enum(L, 2))) { + // cocos2d::backend::SamplerAddressMode tAddressMode + return _olua_fun_cocos2d_backend_SamplerDescriptor_tAddressMode$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'cocos2d::backend::SamplerDescriptor::tAddressMode' not support '%d' arguments", num_args); return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_backend_SamplerDescriptor(lua_State *L) +static int _olua_cls_ccb_SamplerDescriptor(lua_State *L) { oluacls_class(L, "ccb.SamplerDescriptor"); - oluacls_func(L, "__call", _cocos2d_backend_SamplerDescriptor___call); - oluacls_func(L, "__gc", _cocos2d_backend_SamplerDescriptor___gc); - oluacls_func(L, "__olua_move", _cocos2d_backend_SamplerDescriptor___olua_move); - oluacls_func(L, "new", _cocos2d_backend_SamplerDescriptor_new); - oluacls_prop(L, "magFilter", _cocos2d_backend_SamplerDescriptor_get_magFilter, _cocos2d_backend_SamplerDescriptor_set_magFilter); - oluacls_prop(L, "minFilter", _cocos2d_backend_SamplerDescriptor_get_minFilter, _cocos2d_backend_SamplerDescriptor_set_minFilter); - oluacls_prop(L, "sAddressMode", _cocos2d_backend_SamplerDescriptor_get_sAddressMode, _cocos2d_backend_SamplerDescriptor_set_sAddressMode); - oluacls_prop(L, "tAddressMode", _cocos2d_backend_SamplerDescriptor_get_tAddressMode, _cocos2d_backend_SamplerDescriptor_set_tAddressMode); + oluacls_func(L, "__gc", _olua_fun_cocos2d_backend_SamplerDescriptor___gc); + oluacls_func(L, "__olua_move", _olua_fun_cocos2d_backend_SamplerDescriptor___olua_move); + oluacls_func(L, "new", _olua_fun_cocos2d_backend_SamplerDescriptor_new); + oluacls_prop(L, "magFilter", _olua_fun_cocos2d_backend_SamplerDescriptor_magFilter, _olua_fun_cocos2d_backend_SamplerDescriptor_magFilter); + oluacls_prop(L, "minFilter", _olua_fun_cocos2d_backend_SamplerDescriptor_minFilter, _olua_fun_cocos2d_backend_SamplerDescriptor_minFilter); + oluacls_prop(L, "sAddressMode", _olua_fun_cocos2d_backend_SamplerDescriptor_sAddressMode, _olua_fun_cocos2d_backend_SamplerDescriptor_sAddressMode); + oluacls_prop(L, "tAddressMode", _olua_fun_cocos2d_backend_SamplerDescriptor_tAddressMode, _olua_fun_cocos2d_backend_SamplerDescriptor_tAddressMode); return 1; } -OLUA_END_DECLS -static int _cocos2d_backend_TextureInfo___call(lua_State *L) +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccb_SamplerDescriptor(lua_State *L) { - olua_startinvoke(L); - - cocos2d::backend::TextureInfo ret; - - luaL_checktype(L, 2, LUA_TTABLE); - - std::vector arg1; /** slot */ - std::vector arg2; /** textures */ - - olua_getfield(L, 2, "slot"); - olua_check_array(L, -1, arg1, [L](uint32_t *arg1) { - olua_check_integer(L, -1, arg1); - }); - ret.slot = arg1; - lua_pop(L, 1); - - olua_getfield(L, 2, "textures"); - olua_check_array(L, -1, arg2, [L](cocos2d::backend::TextureBackend **arg1) { - olua_check_object(L, -1, arg1, "ccb.TextureBackend"); - }); - ret.textures = arg2; - lua_pop(L, 1); - - olua_pushcopy_object(L, ret, "ccb.TextureInfo"); - - olua_endinvoke(L); - + olua_require(L, "cocos2d_types", luaopen_cocos2d_types); + if (!olua_getclass(L, "ccb.SamplerDescriptor")) { + luaL_error(L, "class not found: cocos2d::backend::SamplerDescriptor"); + } return 1; } +OLUA_END_DECLS -static int _cocos2d_backend_TextureInfo___gc(lua_State *L) +static int _olua_fun_cocos2d_backend_TextureInfo___gc(lua_State *L) { olua_startinvoke(L); @@ -13114,7 +14330,7 @@ static int _cocos2d_backend_TextureInfo___gc(lua_State *L) return 0; } -static int _cocos2d_backend_TextureInfo___olua_move(lua_State *L) +static int _olua_fun_cocos2d_backend_TextureInfo___olua_move(lua_State *L) { olua_startinvoke(L); @@ -13126,7 +14342,7 @@ static int _cocos2d_backend_TextureInfo___olua_move(lua_State *L) return 1; } -static int _cocos2d_backend_TextureInfo_new$1(lua_State *L) +static int _olua_fun_cocos2d_backend_TextureInfo_new$1(lua_State *L) { olua_startinvoke(L); @@ -13140,7 +14356,7 @@ static int _cocos2d_backend_TextureInfo_new$1(lua_State *L) olua_check_object(L, -1, arg1, "ccb.TextureBackend"); }); - // TextureInfo(const std::vector &_slots, const std::vector _textures) + // cocos2d::backend::TextureInfo(const std::vector &_slots, const std::vector _textures) cocos2d::backend::TextureInfo *ret = new cocos2d::backend::TextureInfo(arg1, arg2); int num_ret = olua_push_object(L, ret, "ccb.TextureInfo"); olua_postnew(L, ret); @@ -13150,11 +14366,11 @@ static int _cocos2d_backend_TextureInfo_new$1(lua_State *L) return num_ret; } -static int _cocos2d_backend_TextureInfo_new$2(lua_State *L) +static int _olua_fun_cocos2d_backend_TextureInfo_new$2(lua_State *L) { olua_startinvoke(L); - // TextureInfo() + // cocos2d::backend::TextureInfo() cocos2d::backend::TextureInfo *ret = new cocos2d::backend::TextureInfo(); int num_ret = olua_push_object(L, ret, "ccb.TextureInfo"); olua_postnew(L, ret); @@ -13164,44 +14380,19 @@ static int _cocos2d_backend_TextureInfo_new$2(lua_State *L) return num_ret; } -static int _cocos2d_backend_TextureInfo_new$3(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::backend::TextureInfo arg1; /** */ - - olua_check_object(L, 1, &arg1, "ccb.TextureInfo"); - - // TextureInfo(const cocos2d::backend::TextureInfo &) - cocos2d::backend::TextureInfo *ret = new cocos2d::backend::TextureInfo(arg1); - int num_ret = olua_push_object(L, ret, "ccb.TextureInfo"); - olua_postnew(L, ret); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_backend_TextureInfo_new(lua_State *L) +static int _olua_fun_cocos2d_backend_TextureInfo_new(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 0) { - // TextureInfo() - return _cocos2d_backend_TextureInfo_new$2(L); - } - - if (num_args == 1) { - // if ((olua_is_object(L, 1, "ccb.TextureInfo"))) { - // TextureInfo(const cocos2d::backend::TextureInfo &) - return _cocos2d_backend_TextureInfo_new$3(L); - // } + // cocos2d::backend::TextureInfo() + return _olua_fun_cocos2d_backend_TextureInfo_new$2(L); } if (num_args == 2) { // if ((olua_is_array(L, 1)) && (olua_is_array(L, 2))) { - // TextureInfo(const std::vector &_slots, const std::vector _textures) - return _cocos2d_backend_TextureInfo_new$1(L); + // cocos2d::backend::TextureInfo(const std::vector &_slots, const std::vector _textures) + return _olua_fun_cocos2d_backend_TextureInfo_new$1(L); // } } @@ -13210,7 +14401,7 @@ static int _cocos2d_backend_TextureInfo_new(lua_State *L) return 0; } -static int _cocos2d_backend_TextureInfo_releaseTextures(lua_State *L) +static int _olua_fun_cocos2d_backend_TextureInfo_releaseTextures(lua_State *L) { olua_startinvoke(L); @@ -13226,7 +14417,7 @@ static int _cocos2d_backend_TextureInfo_releaseTextures(lua_State *L) return 0; } -static int _cocos2d_backend_TextureInfo_retainTextures(lua_State *L) +static int _olua_fun_cocos2d_backend_TextureInfo_retainTextures(lua_State *L) { olua_startinvoke(L); @@ -13242,7 +14433,7 @@ static int _cocos2d_backend_TextureInfo_retainTextures(lua_State *L) return 0; } -static int _cocos2d_backend_TextureInfo_get_slot(lua_State *L) +static int _olua_fun_cocos2d_backend_TextureInfo_slot$1(lua_State *L) { olua_startinvoke(L); @@ -13261,7 +14452,7 @@ static int _cocos2d_backend_TextureInfo_get_slot(lua_State *L) return num_ret; } -static int _cocos2d_backend_TextureInfo_set_slot(lua_State *L) +static int _olua_fun_cocos2d_backend_TextureInfo_slot$2(lua_State *L) { olua_startinvoke(L); @@ -13281,7 +14472,28 @@ static int _cocos2d_backend_TextureInfo_set_slot(lua_State *L) return 0; } -static int _cocos2d_backend_TextureInfo_get_textures(lua_State *L) +static int _olua_fun_cocos2d_backend_TextureInfo_slot(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // std::vector slot + return _olua_fun_cocos2d_backend_TextureInfo_slot$1(L); + } + + if (num_args == 1) { + // if ((olua_is_array(L, 2))) { + // std::vector slot + return _olua_fun_cocos2d_backend_TextureInfo_slot$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::backend::TextureInfo::slot' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_backend_TextureInfo_textures$1(lua_State *L) { olua_startinvoke(L); @@ -13300,7 +14512,7 @@ static int _cocos2d_backend_TextureInfo_get_textures(lua_State *L) return num_ret; } -static int _cocos2d_backend_TextureInfo_set_textures(lua_State *L) +static int _olua_fun_cocos2d_backend_TextureInfo_textures$2(lua_State *L) { olua_startinvoke(L); @@ -13320,70 +14532,53 @@ static int _cocos2d_backend_TextureInfo_set_textures(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_backend_TextureInfo(lua_State *L) -{ - oluacls_class(L, "ccb.TextureInfo"); - oluacls_func(L, "__call", _cocos2d_backend_TextureInfo___call); - oluacls_func(L, "__gc", _cocos2d_backend_TextureInfo___gc); - oluacls_func(L, "__olua_move", _cocos2d_backend_TextureInfo___olua_move); - oluacls_func(L, "new", _cocos2d_backend_TextureInfo_new); - oluacls_func(L, "releaseTextures", _cocos2d_backend_TextureInfo_releaseTextures); - oluacls_func(L, "retainTextures", _cocos2d_backend_TextureInfo_retainTextures); - oluacls_prop(L, "slot", _cocos2d_backend_TextureInfo_get_slot, _cocos2d_backend_TextureInfo_set_slot); - oluacls_prop(L, "textures", _cocos2d_backend_TextureInfo_get_textures, _cocos2d_backend_TextureInfo_set_textures); - - return 1; -} -OLUA_END_DECLS - -static int _cocos2d_backend_AttributeBindInfo___call(lua_State *L) +static int _olua_fun_cocos2d_backend_TextureInfo_textures(lua_State *L) { - olua_startinvoke(L); - - cocos2d::backend::AttributeBindInfo ret; - - luaL_checktype(L, 2, LUA_TTABLE); - - std::string arg1; /** attributeName */ - int arg2 = 0; /** location */ - int arg3 = 0; /** size */ - int arg4 = 0; /** type */ - - olua_getfield(L, 2, "attributeName"); - olua_check_string(L, -1, &arg1); - ret.attributeName = arg1; - lua_pop(L, 1); + int num_args = lua_gettop(L) - 1; - olua_getfield(L, 2, "location"); - if (!olua_isnoneornil(L, -1)) { - olua_check_integer(L, -1, &arg2); - ret.location = arg2; + if (num_args == 0) { + // std::vector textures + return _olua_fun_cocos2d_backend_TextureInfo_textures$1(L); } - lua_pop(L, 1); - olua_getfield(L, 2, "size"); - if (!olua_isnoneornil(L, -1)) { - olua_check_integer(L, -1, &arg3); - ret.size = arg3; + if (num_args == 1) { + // if ((olua_is_array(L, 2))) { + // std::vector textures + return _olua_fun_cocos2d_backend_TextureInfo_textures$2(L); + // } } - lua_pop(L, 1); - olua_getfield(L, 2, "type"); - if (!olua_isnoneornil(L, -1)) { - olua_check_integer(L, -1, &arg4); - ret.type = arg4; - } - lua_pop(L, 1); + luaL_error(L, "method 'cocos2d::backend::TextureInfo::textures' not support '%d' arguments", num_args); - olua_pushcopy_object(L, ret, "ccb.AttributeBindInfo"); + return 0; +} - olua_endinvoke(L); +static int _olua_cls_ccb_TextureInfo(lua_State *L) +{ + oluacls_class(L, "ccb.TextureInfo"); + oluacls_func(L, "__gc", _olua_fun_cocos2d_backend_TextureInfo___gc); + oluacls_func(L, "__olua_move", _olua_fun_cocos2d_backend_TextureInfo___olua_move); + oluacls_func(L, "new", _olua_fun_cocos2d_backend_TextureInfo_new); + oluacls_func(L, "releaseTextures", _olua_fun_cocos2d_backend_TextureInfo_releaseTextures); + oluacls_func(L, "retainTextures", _olua_fun_cocos2d_backend_TextureInfo_retainTextures); + oluacls_prop(L, "slot", _olua_fun_cocos2d_backend_TextureInfo_slot, _olua_fun_cocos2d_backend_TextureInfo_slot); + oluacls_prop(L, "textures", _olua_fun_cocos2d_backend_TextureInfo_textures, _olua_fun_cocos2d_backend_TextureInfo_textures); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccb_TextureInfo(lua_State *L) +{ + olua_require(L, "cocos2d_types", luaopen_cocos2d_types); + if (!olua_getclass(L, "ccb.TextureInfo")) { + luaL_error(L, "class not found: cocos2d::backend::TextureInfo"); + } return 1; } +OLUA_END_DECLS -static int _cocos2d_backend_AttributeBindInfo___gc(lua_State *L) +static int _olua_fun_cocos2d_backend_AttributeBindInfo___gc(lua_State *L) { olua_startinvoke(L); @@ -13395,7 +14590,7 @@ static int _cocos2d_backend_AttributeBindInfo___gc(lua_State *L) return 0; } -static int _cocos2d_backend_AttributeBindInfo___olua_move(lua_State *L) +static int _olua_fun_cocos2d_backend_AttributeBindInfo___olua_move(lua_State *L) { olua_startinvoke(L); @@ -13407,7 +14602,7 @@ static int _cocos2d_backend_AttributeBindInfo___olua_move(lua_State *L) return 1; } -static int _cocos2d_backend_AttributeBindInfo_get_attributeName(lua_State *L) +static int _olua_fun_cocos2d_backend_AttributeBindInfo_attributeName$1(lua_State *L) { olua_startinvoke(L); @@ -13424,7 +14619,7 @@ static int _cocos2d_backend_AttributeBindInfo_get_attributeName(lua_State *L) return num_ret; } -static int _cocos2d_backend_AttributeBindInfo_set_attributeName(lua_State *L) +static int _olua_fun_cocos2d_backend_AttributeBindInfo_attributeName$2(lua_State *L) { olua_startinvoke(L); @@ -13442,7 +14637,28 @@ static int _cocos2d_backend_AttributeBindInfo_set_attributeName(lua_State *L) return 0; } -static int _cocos2d_backend_AttributeBindInfo_get_location(lua_State *L) +static int _olua_fun_cocos2d_backend_AttributeBindInfo_attributeName(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // std::string attributeName + return _olua_fun_cocos2d_backend_AttributeBindInfo_attributeName$1(L); + } + + if (num_args == 1) { + // if ((olua_is_string(L, 2))) { + // std::string attributeName + return _olua_fun_cocos2d_backend_AttributeBindInfo_attributeName$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::backend::AttributeBindInfo::attributeName' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_backend_AttributeBindInfo_location$1(lua_State *L) { olua_startinvoke(L); @@ -13450,7 +14666,7 @@ static int _cocos2d_backend_AttributeBindInfo_get_location(lua_State *L) olua_to_object(L, 1, &self, "ccb.AttributeBindInfo"); - // @optional int location + // int location int ret = self->location; int num_ret = olua_push_integer(L, ret); @@ -13459,7 +14675,7 @@ static int _cocos2d_backend_AttributeBindInfo_get_location(lua_State *L) return num_ret; } -static int _cocos2d_backend_AttributeBindInfo_set_location(lua_State *L) +static int _olua_fun_cocos2d_backend_AttributeBindInfo_location$2(lua_State *L) { olua_startinvoke(L); @@ -13469,7 +14685,7 @@ static int _cocos2d_backend_AttributeBindInfo_set_location(lua_State *L) olua_to_object(L, 1, &self, "ccb.AttributeBindInfo"); olua_check_integer(L, 2, &arg1); - // @optional int location + // int location self->location = arg1; olua_endinvoke(L); @@ -13477,7 +14693,28 @@ static int _cocos2d_backend_AttributeBindInfo_set_location(lua_State *L) return 0; } -static int _cocos2d_backend_AttributeBindInfo_get_size(lua_State *L) +static int _olua_fun_cocos2d_backend_AttributeBindInfo_location(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // int location + return _olua_fun_cocos2d_backend_AttributeBindInfo_location$1(L); + } + + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // int location + return _olua_fun_cocos2d_backend_AttributeBindInfo_location$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::backend::AttributeBindInfo::location' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_backend_AttributeBindInfo_size$1(lua_State *L) { olua_startinvoke(L); @@ -13485,7 +14722,7 @@ static int _cocos2d_backend_AttributeBindInfo_get_size(lua_State *L) olua_to_object(L, 1, &self, "ccb.AttributeBindInfo"); - // @optional int size + // int size int ret = self->size; int num_ret = olua_push_integer(L, ret); @@ -13494,7 +14731,7 @@ static int _cocos2d_backend_AttributeBindInfo_get_size(lua_State *L) return num_ret; } -static int _cocos2d_backend_AttributeBindInfo_set_size(lua_State *L) +static int _olua_fun_cocos2d_backend_AttributeBindInfo_size$2(lua_State *L) { olua_startinvoke(L); @@ -13504,7 +14741,7 @@ static int _cocos2d_backend_AttributeBindInfo_set_size(lua_State *L) olua_to_object(L, 1, &self, "ccb.AttributeBindInfo"); olua_check_integer(L, 2, &arg1); - // @optional int size + // int size self->size = arg1; olua_endinvoke(L); @@ -13512,138 +14749,108 @@ static int _cocos2d_backend_AttributeBindInfo_set_size(lua_State *L) return 0; } -static int _cocos2d_backend_AttributeBindInfo_get_type(lua_State *L) +static int _olua_fun_cocos2d_backend_AttributeBindInfo_size(lua_State *L) { - olua_startinvoke(L); - - cocos2d::backend::AttributeBindInfo *self = nullptr; + int num_args = lua_gettop(L) - 1; - olua_to_object(L, 1, &self, "ccb.AttributeBindInfo"); + if (num_args == 0) { + // int size + return _olua_fun_cocos2d_backend_AttributeBindInfo_size$1(L); + } - // @optional int type - int ret = self->type; - int num_ret = olua_push_integer(L, ret); + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // int size + return _olua_fun_cocos2d_backend_AttributeBindInfo_size$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'cocos2d::backend::AttributeBindInfo::size' not support '%d' arguments", num_args); - return num_ret; + return 0; } -static int _cocos2d_backend_AttributeBindInfo_set_type(lua_State *L) +static int _olua_fun_cocos2d_backend_AttributeBindInfo_type$1(lua_State *L) { olua_startinvoke(L); cocos2d::backend::AttributeBindInfo *self = nullptr; - int arg1 = 0; /** type */ olua_to_object(L, 1, &self, "ccb.AttributeBindInfo"); - olua_check_integer(L, 2, &arg1); - // @optional int type - self->type = arg1; + // int type + int ret = self->type; + int num_ret = olua_push_integer(L, ret); olua_endinvoke(L); - return 0; -} - -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_backend_AttributeBindInfo(lua_State *L) -{ - oluacls_class(L, "ccb.AttributeBindInfo"); - oluacls_func(L, "__call", _cocos2d_backend_AttributeBindInfo___call); - oluacls_func(L, "__gc", _cocos2d_backend_AttributeBindInfo___gc); - oluacls_func(L, "__olua_move", _cocos2d_backend_AttributeBindInfo___olua_move); - oluacls_prop(L, "attributeName", _cocos2d_backend_AttributeBindInfo_get_attributeName, _cocos2d_backend_AttributeBindInfo_set_attributeName); - oluacls_prop(L, "location", _cocos2d_backend_AttributeBindInfo_get_location, _cocos2d_backend_AttributeBindInfo_set_location); - oluacls_prop(L, "size", _cocos2d_backend_AttributeBindInfo_get_size, _cocos2d_backend_AttributeBindInfo_set_size); - oluacls_prop(L, "type", _cocos2d_backend_AttributeBindInfo_get_type, _cocos2d_backend_AttributeBindInfo_set_type); - - return 1; + return num_ret; } -OLUA_END_DECLS -static int _cocos2d_backend_UniformInfo___call(lua_State *L) +static int _olua_fun_cocos2d_backend_AttributeBindInfo_type$2(lua_State *L) { olua_startinvoke(L); - cocos2d::backend::UniformInfo ret; - - luaL_checktype(L, 2, LUA_TTABLE); + cocos2d::backend::AttributeBindInfo *self = nullptr; + int arg1 = 0; /** type */ - int arg1 = 0; /** count */ - int arg2 = 0; /** location */ - unsigned int arg3 = 0; /** type */ - bool arg4 = false; /** isArray */ - unsigned int arg5 = 0; /** size */ - unsigned int arg6 = 0; /** bufferOffset */ - bool arg7 = false; /** isMatrix */ - bool arg8 = false; /** needConvert */ + olua_to_object(L, 1, &self, "ccb.AttributeBindInfo"); + olua_check_integer(L, 2, &arg1); - olua_getfield(L, 2, "count"); - if (!olua_isnoneornil(L, -1)) { - olua_check_integer(L, -1, &arg1); - ret.count = arg1; - } - lua_pop(L, 1); + // int type + self->type = arg1; - olua_getfield(L, 2, "location"); - if (!olua_isnoneornil(L, -1)) { - olua_check_integer(L, -1, &arg2); - ret.location = arg2; - } - lua_pop(L, 1); + olua_endinvoke(L); - olua_getfield(L, 2, "type"); - if (!olua_isnoneornil(L, -1)) { - olua_check_integer(L, -1, &arg3); - ret.type = arg3; - } - lua_pop(L, 1); + return 0; +} - olua_getfield(L, 2, "isArray"); - if (!olua_isnoneornil(L, -1)) { - olua_check_bool(L, -1, &arg4); - ret.isArray = arg4; - } - lua_pop(L, 1); +static int _olua_fun_cocos2d_backend_AttributeBindInfo_type(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; - olua_getfield(L, 2, "size"); - if (!olua_isnoneornil(L, -1)) { - olua_check_integer(L, -1, &arg5); - ret.size = arg5; + if (num_args == 0) { + // int type + return _olua_fun_cocos2d_backend_AttributeBindInfo_type$1(L); } - lua_pop(L, 1); - olua_getfield(L, 2, "bufferOffset"); - if (!olua_isnoneornil(L, -1)) { - olua_check_integer(L, -1, &arg6); - ret.bufferOffset = arg6; + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // int type + return _olua_fun_cocos2d_backend_AttributeBindInfo_type$2(L); + // } } - lua_pop(L, 1); - olua_getfield(L, 2, "isMatrix"); - if (!olua_isnoneornil(L, -1)) { - olua_check_bool(L, -1, &arg7); - ret.isMatrix = arg7; - } - lua_pop(L, 1); + luaL_error(L, "method 'cocos2d::backend::AttributeBindInfo::type' not support '%d' arguments", num_args); - olua_getfield(L, 2, "needConvert"); - if (!olua_isnoneornil(L, -1)) { - olua_check_bool(L, -1, &arg8); - ret.needConvert = arg8; - } - lua_pop(L, 1); + return 0; +} - olua_pushcopy_object(L, ret, "ccb.UniformInfo"); +static int _olua_cls_ccb_AttributeBindInfo(lua_State *L) +{ + oluacls_class(L, "ccb.AttributeBindInfo"); + oluacls_func(L, "__gc", _olua_fun_cocos2d_backend_AttributeBindInfo___gc); + oluacls_func(L, "__olua_move", _olua_fun_cocos2d_backend_AttributeBindInfo___olua_move); + oluacls_prop(L, "attributeName", _olua_fun_cocos2d_backend_AttributeBindInfo_attributeName, _olua_fun_cocos2d_backend_AttributeBindInfo_attributeName); + oluacls_prop(L, "location", _olua_fun_cocos2d_backend_AttributeBindInfo_location, _olua_fun_cocos2d_backend_AttributeBindInfo_location); + oluacls_prop(L, "size", _olua_fun_cocos2d_backend_AttributeBindInfo_size, _olua_fun_cocos2d_backend_AttributeBindInfo_size); + oluacls_prop(L, "type", _olua_fun_cocos2d_backend_AttributeBindInfo_type, _olua_fun_cocos2d_backend_AttributeBindInfo_type); - olua_endinvoke(L); + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccb_AttributeBindInfo(lua_State *L) +{ + olua_require(L, "cocos2d_types", luaopen_cocos2d_types); + if (!olua_getclass(L, "ccb.AttributeBindInfo")) { + luaL_error(L, "class not found: cocos2d::backend::AttributeBindInfo"); + } return 1; } +OLUA_END_DECLS -static int _cocos2d_backend_UniformInfo___gc(lua_State *L) +static int _olua_fun_cocos2d_backend_UniformInfo___gc(lua_State *L) { olua_startinvoke(L); @@ -13655,7 +14862,7 @@ static int _cocos2d_backend_UniformInfo___gc(lua_State *L) return 0; } -static int _cocos2d_backend_UniformInfo___olua_move(lua_State *L) +static int _olua_fun_cocos2d_backend_UniformInfo___olua_move(lua_State *L) { olua_startinvoke(L); @@ -13667,7 +14874,7 @@ static int _cocos2d_backend_UniformInfo___olua_move(lua_State *L) return 1; } -static int _cocos2d_backend_UniformInfo_get_bufferOffset(lua_State *L) +static int _olua_fun_cocos2d_backend_UniformInfo_bufferOffset$1(lua_State *L) { olua_startinvoke(L); @@ -13675,7 +14882,7 @@ static int _cocos2d_backend_UniformInfo_get_bufferOffset(lua_State *L) olua_to_object(L, 1, &self, "ccb.UniformInfo"); - // @optional unsigned int bufferOffset + // unsigned int bufferOffset unsigned int ret = self->bufferOffset; int num_ret = olua_push_integer(L, ret); @@ -13684,7 +14891,7 @@ static int _cocos2d_backend_UniformInfo_get_bufferOffset(lua_State *L) return num_ret; } -static int _cocos2d_backend_UniformInfo_set_bufferOffset(lua_State *L) +static int _olua_fun_cocos2d_backend_UniformInfo_bufferOffset$2(lua_State *L) { olua_startinvoke(L); @@ -13694,7 +14901,7 @@ static int _cocos2d_backend_UniformInfo_set_bufferOffset(lua_State *L) olua_to_object(L, 1, &self, "ccb.UniformInfo"); olua_check_integer(L, 2, &arg1); - // @optional unsigned int bufferOffset + // unsigned int bufferOffset self->bufferOffset = arg1; olua_endinvoke(L); @@ -13702,7 +14909,28 @@ static int _cocos2d_backend_UniformInfo_set_bufferOffset(lua_State *L) return 0; } -static int _cocos2d_backend_UniformInfo_get_count(lua_State *L) +static int _olua_fun_cocos2d_backend_UniformInfo_bufferOffset(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // unsigned int bufferOffset + return _olua_fun_cocos2d_backend_UniformInfo_bufferOffset$1(L); + } + + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // unsigned int bufferOffset + return _olua_fun_cocos2d_backend_UniformInfo_bufferOffset$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::backend::UniformInfo::bufferOffset' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_backend_UniformInfo_count$1(lua_State *L) { olua_startinvoke(L); @@ -13710,7 +14938,7 @@ static int _cocos2d_backend_UniformInfo_get_count(lua_State *L) olua_to_object(L, 1, &self, "ccb.UniformInfo"); - // @optional int count + // int count int ret = self->count; int num_ret = olua_push_integer(L, ret); @@ -13719,7 +14947,7 @@ static int _cocos2d_backend_UniformInfo_get_count(lua_State *L) return num_ret; } -static int _cocos2d_backend_UniformInfo_set_count(lua_State *L) +static int _olua_fun_cocos2d_backend_UniformInfo_count$2(lua_State *L) { olua_startinvoke(L); @@ -13729,7 +14957,7 @@ static int _cocos2d_backend_UniformInfo_set_count(lua_State *L) olua_to_object(L, 1, &self, "ccb.UniformInfo"); olua_check_integer(L, 2, &arg1); - // @optional int count + // int count self->count = arg1; olua_endinvoke(L); @@ -13737,7 +14965,28 @@ static int _cocos2d_backend_UniformInfo_set_count(lua_State *L) return 0; } -static int _cocos2d_backend_UniformInfo_get_isArray(lua_State *L) +static int _olua_fun_cocos2d_backend_UniformInfo_count(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // int count + return _olua_fun_cocos2d_backend_UniformInfo_count$1(L); + } + + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // int count + return _olua_fun_cocos2d_backend_UniformInfo_count$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::backend::UniformInfo::count' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_backend_UniformInfo_isArray$1(lua_State *L) { olua_startinvoke(L); @@ -13745,7 +14994,7 @@ static int _cocos2d_backend_UniformInfo_get_isArray(lua_State *L) olua_to_object(L, 1, &self, "ccb.UniformInfo"); - // @optional bool isArray + // bool isArray bool ret = self->isArray; int num_ret = olua_push_bool(L, ret); @@ -13754,7 +15003,7 @@ static int _cocos2d_backend_UniformInfo_get_isArray(lua_State *L) return num_ret; } -static int _cocos2d_backend_UniformInfo_set_isArray(lua_State *L) +static int _olua_fun_cocos2d_backend_UniformInfo_isArray$2(lua_State *L) { olua_startinvoke(L); @@ -13764,7 +15013,7 @@ static int _cocos2d_backend_UniformInfo_set_isArray(lua_State *L) olua_to_object(L, 1, &self, "ccb.UniformInfo"); olua_check_bool(L, 2, &arg1); - // @optional bool isArray + // bool isArray self->isArray = arg1; olua_endinvoke(L); @@ -13772,7 +15021,28 @@ static int _cocos2d_backend_UniformInfo_set_isArray(lua_State *L) return 0; } -static int _cocos2d_backend_UniformInfo_get_isMatrix(lua_State *L) +static int _olua_fun_cocos2d_backend_UniformInfo_isArray(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // bool isArray + return _olua_fun_cocos2d_backend_UniformInfo_isArray$1(L); + } + + if (num_args == 1) { + // if ((olua_is_bool(L, 2))) { + // bool isArray + return _olua_fun_cocos2d_backend_UniformInfo_isArray$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::backend::UniformInfo::isArray' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_backend_UniformInfo_isMatrix$1(lua_State *L) { olua_startinvoke(L); @@ -13780,7 +15050,7 @@ static int _cocos2d_backend_UniformInfo_get_isMatrix(lua_State *L) olua_to_object(L, 1, &self, "ccb.UniformInfo"); - // @optional bool isMatrix + // bool isMatrix bool ret = self->isMatrix; int num_ret = olua_push_bool(L, ret); @@ -13789,7 +15059,7 @@ static int _cocos2d_backend_UniformInfo_get_isMatrix(lua_State *L) return num_ret; } -static int _cocos2d_backend_UniformInfo_set_isMatrix(lua_State *L) +static int _olua_fun_cocos2d_backend_UniformInfo_isMatrix$2(lua_State *L) { olua_startinvoke(L); @@ -13799,7 +15069,7 @@ static int _cocos2d_backend_UniformInfo_set_isMatrix(lua_State *L) olua_to_object(L, 1, &self, "ccb.UniformInfo"); olua_check_bool(L, 2, &arg1); - // @optional bool isMatrix + // bool isMatrix self->isMatrix = arg1; olua_endinvoke(L); @@ -13807,7 +15077,28 @@ static int _cocos2d_backend_UniformInfo_set_isMatrix(lua_State *L) return 0; } -static int _cocos2d_backend_UniformInfo_get_location(lua_State *L) +static int _olua_fun_cocos2d_backend_UniformInfo_isMatrix(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // bool isMatrix + return _olua_fun_cocos2d_backend_UniformInfo_isMatrix$1(L); + } + + if (num_args == 1) { + // if ((olua_is_bool(L, 2))) { + // bool isMatrix + return _olua_fun_cocos2d_backend_UniformInfo_isMatrix$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::backend::UniformInfo::isMatrix' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_backend_UniformInfo_location$1(lua_State *L) { olua_startinvoke(L); @@ -13815,7 +15106,7 @@ static int _cocos2d_backend_UniformInfo_get_location(lua_State *L) olua_to_object(L, 1, &self, "ccb.UniformInfo"); - // @optional int location + // int location int ret = self->location; int num_ret = olua_push_integer(L, ret); @@ -13824,7 +15115,7 @@ static int _cocos2d_backend_UniformInfo_get_location(lua_State *L) return num_ret; } -static int _cocos2d_backend_UniformInfo_set_location(lua_State *L) +static int _olua_fun_cocos2d_backend_UniformInfo_location$2(lua_State *L) { olua_startinvoke(L); @@ -13834,7 +15125,7 @@ static int _cocos2d_backend_UniformInfo_set_location(lua_State *L) olua_to_object(L, 1, &self, "ccb.UniformInfo"); olua_check_integer(L, 2, &arg1); - // @optional int location + // int location self->location = arg1; olua_endinvoke(L); @@ -13842,7 +15133,28 @@ static int _cocos2d_backend_UniformInfo_set_location(lua_State *L) return 0; } -static int _cocos2d_backend_UniformInfo_get_needConvert(lua_State *L) +static int _olua_fun_cocos2d_backend_UniformInfo_location(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // int location + return _olua_fun_cocos2d_backend_UniformInfo_location$1(L); + } + + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // int location + return _olua_fun_cocos2d_backend_UniformInfo_location$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::backend::UniformInfo::location' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_backend_UniformInfo_needConvert$1(lua_State *L) { olua_startinvoke(L); @@ -13850,7 +15162,7 @@ static int _cocos2d_backend_UniformInfo_get_needConvert(lua_State *L) olua_to_object(L, 1, &self, "ccb.UniformInfo"); - // @optional bool needConvert + // bool needConvert bool ret = self->needConvert; int num_ret = olua_push_bool(L, ret); @@ -13859,7 +15171,7 @@ static int _cocos2d_backend_UniformInfo_get_needConvert(lua_State *L) return num_ret; } -static int _cocos2d_backend_UniformInfo_set_needConvert(lua_State *L) +static int _olua_fun_cocos2d_backend_UniformInfo_needConvert$2(lua_State *L) { olua_startinvoke(L); @@ -13869,7 +15181,7 @@ static int _cocos2d_backend_UniformInfo_set_needConvert(lua_State *L) olua_to_object(L, 1, &self, "ccb.UniformInfo"); olua_check_bool(L, 2, &arg1); - // @optional bool needConvert + // bool needConvert self->needConvert = arg1; olua_endinvoke(L); @@ -13877,7 +15189,28 @@ static int _cocos2d_backend_UniformInfo_set_needConvert(lua_State *L) return 0; } -static int _cocos2d_backend_UniformInfo_get_size(lua_State *L) +static int _olua_fun_cocos2d_backend_UniformInfo_needConvert(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // bool needConvert + return _olua_fun_cocos2d_backend_UniformInfo_needConvert$1(L); + } + + if (num_args == 1) { + // if ((olua_is_bool(L, 2))) { + // bool needConvert + return _olua_fun_cocos2d_backend_UniformInfo_needConvert$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::backend::UniformInfo::needConvert' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_backend_UniformInfo_size$1(lua_State *L) { olua_startinvoke(L); @@ -13885,7 +15218,7 @@ static int _cocos2d_backend_UniformInfo_get_size(lua_State *L) olua_to_object(L, 1, &self, "ccb.UniformInfo"); - // @optional unsigned int size + // unsigned int size unsigned int ret = self->size; int num_ret = olua_push_integer(L, ret); @@ -13894,7 +15227,7 @@ static int _cocos2d_backend_UniformInfo_get_size(lua_State *L) return num_ret; } -static int _cocos2d_backend_UniformInfo_set_size(lua_State *L) +static int _olua_fun_cocos2d_backend_UniformInfo_size$2(lua_State *L) { olua_startinvoke(L); @@ -13904,7 +15237,7 @@ static int _cocos2d_backend_UniformInfo_set_size(lua_State *L) olua_to_object(L, 1, &self, "ccb.UniformInfo"); olua_check_integer(L, 2, &arg1); - // @optional unsigned int size + // unsigned int size self->size = arg1; olua_endinvoke(L); @@ -13912,7 +15245,28 @@ static int _cocos2d_backend_UniformInfo_set_size(lua_State *L) return 0; } -static int _cocos2d_backend_UniformInfo_get_type(lua_State *L) +static int _olua_fun_cocos2d_backend_UniformInfo_size(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // unsigned int size + return _olua_fun_cocos2d_backend_UniformInfo_size$1(L); + } + + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // unsigned int size + return _olua_fun_cocos2d_backend_UniformInfo_size$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::backend::UniformInfo::size' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_backend_UniformInfo_type$1(lua_State *L) { olua_startinvoke(L); @@ -13920,7 +15274,7 @@ static int _cocos2d_backend_UniformInfo_get_type(lua_State *L) olua_to_object(L, 1, &self, "ccb.UniformInfo"); - // @optional unsigned int type + // unsigned int type unsigned int ret = self->type; int num_ret = olua_push_integer(L, ret); @@ -13929,7 +15283,7 @@ static int _cocos2d_backend_UniformInfo_get_type(lua_State *L) return num_ret; } -static int _cocos2d_backend_UniformInfo_set_type(lua_State *L) +static int _olua_fun_cocos2d_backend_UniformInfo_type$2(lua_State *L) { olua_startinvoke(L); @@ -13939,7 +15293,7 @@ static int _cocos2d_backend_UniformInfo_set_type(lua_State *L) olua_to_object(L, 1, &self, "ccb.UniformInfo"); olua_check_integer(L, 2, &arg1); - // @optional unsigned int type + // unsigned int type self->type = arg1; olua_endinvoke(L); @@ -13947,105 +15301,56 @@ static int _cocos2d_backend_UniformInfo_set_type(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_backend_UniformInfo(lua_State *L) -{ - oluacls_class(L, "ccb.UniformInfo"); - oluacls_func(L, "__call", _cocos2d_backend_UniformInfo___call); - oluacls_func(L, "__gc", _cocos2d_backend_UniformInfo___gc); - oluacls_func(L, "__olua_move", _cocos2d_backend_UniformInfo___olua_move); - oluacls_prop(L, "bufferOffset", _cocos2d_backend_UniformInfo_get_bufferOffset, _cocos2d_backend_UniformInfo_set_bufferOffset); - oluacls_prop(L, "count", _cocos2d_backend_UniformInfo_get_count, _cocos2d_backend_UniformInfo_set_count); - oluacls_prop(L, "isArray", _cocos2d_backend_UniformInfo_get_isArray, _cocos2d_backend_UniformInfo_set_isArray); - oluacls_prop(L, "isMatrix", _cocos2d_backend_UniformInfo_get_isMatrix, _cocos2d_backend_UniformInfo_set_isMatrix); - oluacls_prop(L, "location", _cocos2d_backend_UniformInfo_get_location, _cocos2d_backend_UniformInfo_set_location); - oluacls_prop(L, "needConvert", _cocos2d_backend_UniformInfo_get_needConvert, _cocos2d_backend_UniformInfo_set_needConvert); - oluacls_prop(L, "size", _cocos2d_backend_UniformInfo_get_size, _cocos2d_backend_UniformInfo_set_size); - oluacls_prop(L, "type", _cocos2d_backend_UniformInfo_get_type, _cocos2d_backend_UniformInfo_set_type); - - return 1; -} -OLUA_END_DECLS - -static int _cocos2d_backend_TextureDescriptor___call(lua_State *L) +static int _olua_fun_cocos2d_backend_UniformInfo_type(lua_State *L) { - olua_startinvoke(L); - - cocos2d::backend::TextureDescriptor ret; - - luaL_checktype(L, 2, LUA_TTABLE); - - cocos2d::backend::TextureType arg1 = (cocos2d::backend::TextureType)0; /** textureType */ - cocos2d::backend::PixelFormat arg2 = (cocos2d::backend::PixelFormat)0; /** textureFormat */ - cocos2d::backend::TextureUsage arg3 = (cocos2d::backend::TextureUsage)0; /** textureUsage */ - uint32_t arg4 = 0; /** width */ - uint32_t arg5 = 0; /** height */ - uint32_t arg6 = 0; /** depth */ - cocos2d::backend::SamplerDescriptor arg7; /** samplerDescriptor */ - int arg8 = 0; /** sampleCount */ - - olua_getfield(L, 2, "textureType"); - if (!olua_isnoneornil(L, -1)) { - olua_check_enum(L, -1, &arg1); - ret.textureType = arg1; - } - lua_pop(L, 1); + int num_args = lua_gettop(L) - 1; - olua_getfield(L, 2, "textureFormat"); - if (!olua_isnoneornil(L, -1)) { - olua_check_enum(L, -1, &arg2); - ret.textureFormat = arg2; + if (num_args == 0) { + // unsigned int type + return _olua_fun_cocos2d_backend_UniformInfo_type$1(L); } - lua_pop(L, 1); - olua_getfield(L, 2, "textureUsage"); - if (!olua_isnoneornil(L, -1)) { - olua_check_enum(L, -1, &arg3); - ret.textureUsage = arg3; + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // unsigned int type + return _olua_fun_cocos2d_backend_UniformInfo_type$2(L); + // } } - lua_pop(L, 1); - olua_getfield(L, 2, "width"); - if (!olua_isnoneornil(L, -1)) { - olua_check_integer(L, -1, &arg4); - ret.width = arg4; - } - lua_pop(L, 1); + luaL_error(L, "method 'cocos2d::backend::UniformInfo::type' not support '%d' arguments", num_args); - olua_getfield(L, 2, "height"); - if (!olua_isnoneornil(L, -1)) { - olua_check_integer(L, -1, &arg5); - ret.height = arg5; - } - lua_pop(L, 1); + return 0; +} - olua_getfield(L, 2, "depth"); - if (!olua_isnoneornil(L, -1)) { - olua_check_integer(L, -1, &arg6); - ret.depth = arg6; - } - lua_pop(L, 1); +static int _olua_cls_ccb_UniformInfo(lua_State *L) +{ + oluacls_class(L, "ccb.UniformInfo"); + oluacls_func(L, "__gc", _olua_fun_cocos2d_backend_UniformInfo___gc); + oluacls_func(L, "__olua_move", _olua_fun_cocos2d_backend_UniformInfo___olua_move); + oluacls_prop(L, "bufferOffset", _olua_fun_cocos2d_backend_UniformInfo_bufferOffset, _olua_fun_cocos2d_backend_UniformInfo_bufferOffset); + oluacls_prop(L, "count", _olua_fun_cocos2d_backend_UniformInfo_count, _olua_fun_cocos2d_backend_UniformInfo_count); + oluacls_prop(L, "isArray", _olua_fun_cocos2d_backend_UniformInfo_isArray, _olua_fun_cocos2d_backend_UniformInfo_isArray); + oluacls_prop(L, "isMatrix", _olua_fun_cocos2d_backend_UniformInfo_isMatrix, _olua_fun_cocos2d_backend_UniformInfo_isMatrix); + oluacls_prop(L, "location", _olua_fun_cocos2d_backend_UniformInfo_location, _olua_fun_cocos2d_backend_UniformInfo_location); + oluacls_prop(L, "needConvert", _olua_fun_cocos2d_backend_UniformInfo_needConvert, _olua_fun_cocos2d_backend_UniformInfo_needConvert); + oluacls_prop(L, "size", _olua_fun_cocos2d_backend_UniformInfo_size, _olua_fun_cocos2d_backend_UniformInfo_size); + oluacls_prop(L, "type", _olua_fun_cocos2d_backend_UniformInfo_type, _olua_fun_cocos2d_backend_UniformInfo_type); - olua_getfield(L, 2, "samplerDescriptor"); - olua_check_object(L, -1, &arg7, "ccb.SamplerDescriptor"); - ret.samplerDescriptor = arg7; - lua_pop(L, 1); + return 1; +} - olua_getfield(L, 2, "sampleCount"); - if (!olua_isnoneornil(L, -1)) { - olua_check_integer(L, -1, &arg8); - ret.sampleCount = arg8; +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccb_UniformInfo(lua_State *L) +{ + olua_require(L, "cocos2d_types", luaopen_cocos2d_types); + if (!olua_getclass(L, "ccb.UniformInfo")) { + luaL_error(L, "class not found: cocos2d::backend::UniformInfo"); } - lua_pop(L, 1); - - olua_pushcopy_object(L, ret, "ccb.TextureDescriptor"); - - olua_endinvoke(L); - return 1; } +OLUA_END_DECLS -static int _cocos2d_backend_TextureDescriptor___gc(lua_State *L) +static int _olua_fun_cocos2d_backend_TextureDescriptor___gc(lua_State *L) { olua_startinvoke(L); @@ -14057,7 +15362,7 @@ static int _cocos2d_backend_TextureDescriptor___gc(lua_State *L) return 0; } -static int _cocos2d_backend_TextureDescriptor___olua_move(lua_State *L) +static int _olua_fun_cocos2d_backend_TextureDescriptor___olua_move(lua_State *L) { olua_startinvoke(L); @@ -14069,7 +15374,7 @@ static int _cocos2d_backend_TextureDescriptor___olua_move(lua_State *L) return 1; } -static int _cocos2d_backend_TextureDescriptor_get_depth(lua_State *L) +static int _olua_fun_cocos2d_backend_TextureDescriptor_depth$1(lua_State *L) { olua_startinvoke(L); @@ -14077,7 +15382,7 @@ static int _cocos2d_backend_TextureDescriptor_get_depth(lua_State *L) olua_to_object(L, 1, &self, "ccb.TextureDescriptor"); - // @optional uint32_t depth + // uint32_t depth uint32_t ret = self->depth; int num_ret = olua_push_integer(L, ret); @@ -14086,7 +15391,7 @@ static int _cocos2d_backend_TextureDescriptor_get_depth(lua_State *L) return num_ret; } -static int _cocos2d_backend_TextureDescriptor_set_depth(lua_State *L) +static int _olua_fun_cocos2d_backend_TextureDescriptor_depth$2(lua_State *L) { olua_startinvoke(L); @@ -14096,7 +15401,7 @@ static int _cocos2d_backend_TextureDescriptor_set_depth(lua_State *L) olua_to_object(L, 1, &self, "ccb.TextureDescriptor"); olua_check_integer(L, 2, &arg1); - // @optional uint32_t depth + // uint32_t depth self->depth = arg1; olua_endinvoke(L); @@ -14104,7 +15409,28 @@ static int _cocos2d_backend_TextureDescriptor_set_depth(lua_State *L) return 0; } -static int _cocos2d_backend_TextureDescriptor_get_height(lua_State *L) +static int _olua_fun_cocos2d_backend_TextureDescriptor_depth(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // uint32_t depth + return _olua_fun_cocos2d_backend_TextureDescriptor_depth$1(L); + } + + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // uint32_t depth + return _olua_fun_cocos2d_backend_TextureDescriptor_depth$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::backend::TextureDescriptor::depth' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_backend_TextureDescriptor_height$1(lua_State *L) { olua_startinvoke(L); @@ -14112,7 +15438,7 @@ static int _cocos2d_backend_TextureDescriptor_get_height(lua_State *L) olua_to_object(L, 1, &self, "ccb.TextureDescriptor"); - // @optional uint32_t height + // uint32_t height uint32_t ret = self->height; int num_ret = olua_push_integer(L, ret); @@ -14121,7 +15447,7 @@ static int _cocos2d_backend_TextureDescriptor_get_height(lua_State *L) return num_ret; } -static int _cocos2d_backend_TextureDescriptor_set_height(lua_State *L) +static int _olua_fun_cocos2d_backend_TextureDescriptor_height$2(lua_State *L) { olua_startinvoke(L); @@ -14131,7 +15457,7 @@ static int _cocos2d_backend_TextureDescriptor_set_height(lua_State *L) olua_to_object(L, 1, &self, "ccb.TextureDescriptor"); olua_check_integer(L, 2, &arg1); - // @optional uint32_t height + // uint32_t height self->height = arg1; olua_endinvoke(L); @@ -14139,7 +15465,28 @@ static int _cocos2d_backend_TextureDescriptor_set_height(lua_State *L) return 0; } -static int _cocos2d_backend_TextureDescriptor_get_sampleCount(lua_State *L) +static int _olua_fun_cocos2d_backend_TextureDescriptor_height(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // uint32_t height + return _olua_fun_cocos2d_backend_TextureDescriptor_height$1(L); + } + + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // uint32_t height + return _olua_fun_cocos2d_backend_TextureDescriptor_height$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::backend::TextureDescriptor::height' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_backend_TextureDescriptor_sampleCount$1(lua_State *L) { olua_startinvoke(L); @@ -14147,7 +15494,7 @@ static int _cocos2d_backend_TextureDescriptor_get_sampleCount(lua_State *L) olua_to_object(L, 1, &self, "ccb.TextureDescriptor"); - // @optional int sampleCount + // int sampleCount int ret = self->sampleCount; int num_ret = olua_push_integer(L, ret); @@ -14156,7 +15503,7 @@ static int _cocos2d_backend_TextureDescriptor_get_sampleCount(lua_State *L) return num_ret; } -static int _cocos2d_backend_TextureDescriptor_set_sampleCount(lua_State *L) +static int _olua_fun_cocos2d_backend_TextureDescriptor_sampleCount$2(lua_State *L) { olua_startinvoke(L); @@ -14166,7 +15513,7 @@ static int _cocos2d_backend_TextureDescriptor_set_sampleCount(lua_State *L) olua_to_object(L, 1, &self, "ccb.TextureDescriptor"); olua_check_integer(L, 2, &arg1); - // @optional int sampleCount + // int sampleCount self->sampleCount = arg1; olua_endinvoke(L); @@ -14174,7 +15521,28 @@ static int _cocos2d_backend_TextureDescriptor_set_sampleCount(lua_State *L) return 0; } -static int _cocos2d_backend_TextureDescriptor_get_samplerDescriptor(lua_State *L) +static int _olua_fun_cocos2d_backend_TextureDescriptor_sampleCount(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // int sampleCount + return _olua_fun_cocos2d_backend_TextureDescriptor_sampleCount$1(L); + } + + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // int sampleCount + return _olua_fun_cocos2d_backend_TextureDescriptor_sampleCount$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::backend::TextureDescriptor::sampleCount' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_backend_TextureDescriptor_samplerDescriptor$1(lua_State *L) { olua_startinvoke(L); @@ -14184,32 +15552,53 @@ static int _cocos2d_backend_TextureDescriptor_get_samplerDescriptor(lua_State *L // cocos2d::backend::SamplerDescriptor samplerDescriptor cocos2d::backend::SamplerDescriptor &ret = self->samplerDescriptor; - int num_ret = olua_pushcopy_object(L, ret, "ccb.SamplerDescriptor"); + int num_ret = olua_copy_object(L, ret, "ccb.SamplerDescriptor"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_backend_TextureDescriptor_set_samplerDescriptor(lua_State *L) +static int _olua_fun_cocos2d_backend_TextureDescriptor_samplerDescriptor$2(lua_State *L) { olua_startinvoke(L); cocos2d::backend::TextureDescriptor *self = nullptr; - cocos2d::backend::SamplerDescriptor arg1; /** samplerDescriptor */ + cocos2d::backend::SamplerDescriptor *arg1; /** samplerDescriptor */ olua_to_object(L, 1, &self, "ccb.TextureDescriptor"); olua_check_object(L, 2, &arg1, "ccb.SamplerDescriptor"); // cocos2d::backend::SamplerDescriptor samplerDescriptor - self->samplerDescriptor = arg1; + self->samplerDescriptor = *arg1; olua_endinvoke(L); return 0; } -static int _cocos2d_backend_TextureDescriptor_get_textureFormat(lua_State *L) +static int _olua_fun_cocos2d_backend_TextureDescriptor_samplerDescriptor(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // cocos2d::backend::SamplerDescriptor samplerDescriptor + return _olua_fun_cocos2d_backend_TextureDescriptor_samplerDescriptor$1(L); + } + + if (num_args == 1) { + // if ((olua_is_object(L, 2, "ccb.SamplerDescriptor"))) { + // cocos2d::backend::SamplerDescriptor samplerDescriptor + return _olua_fun_cocos2d_backend_TextureDescriptor_samplerDescriptor$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::backend::TextureDescriptor::samplerDescriptor' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_backend_TextureDescriptor_textureFormat$1(lua_State *L) { olua_startinvoke(L); @@ -14217,7 +15606,7 @@ static int _cocos2d_backend_TextureDescriptor_get_textureFormat(lua_State *L) olua_to_object(L, 1, &self, "ccb.TextureDescriptor"); - // @optional cocos2d::backend::PixelFormat textureFormat + // cocos2d::backend::PixelFormat textureFormat cocos2d::backend::PixelFormat ret = self->textureFormat; int num_ret = olua_push_enum(L, ret); @@ -14226,7 +15615,7 @@ static int _cocos2d_backend_TextureDescriptor_get_textureFormat(lua_State *L) return num_ret; } -static int _cocos2d_backend_TextureDescriptor_set_textureFormat(lua_State *L) +static int _olua_fun_cocos2d_backend_TextureDescriptor_textureFormat$2(lua_State *L) { olua_startinvoke(L); @@ -14236,7 +15625,7 @@ static int _cocos2d_backend_TextureDescriptor_set_textureFormat(lua_State *L) olua_to_object(L, 1, &self, "ccb.TextureDescriptor"); olua_check_enum(L, 2, &arg1); - // @optional cocos2d::backend::PixelFormat textureFormat + // cocos2d::backend::PixelFormat textureFormat self->textureFormat = arg1; olua_endinvoke(L); @@ -14244,7 +15633,28 @@ static int _cocos2d_backend_TextureDescriptor_set_textureFormat(lua_State *L) return 0; } -static int _cocos2d_backend_TextureDescriptor_get_textureType(lua_State *L) +static int _olua_fun_cocos2d_backend_TextureDescriptor_textureFormat(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // cocos2d::backend::PixelFormat textureFormat + return _olua_fun_cocos2d_backend_TextureDescriptor_textureFormat$1(L); + } + + if (num_args == 1) { + // if ((olua_is_enum(L, 2))) { + // cocos2d::backend::PixelFormat textureFormat + return _olua_fun_cocos2d_backend_TextureDescriptor_textureFormat$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::backend::TextureDescriptor::textureFormat' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_backend_TextureDescriptor_textureType$1(lua_State *L) { olua_startinvoke(L); @@ -14252,7 +15662,7 @@ static int _cocos2d_backend_TextureDescriptor_get_textureType(lua_State *L) olua_to_object(L, 1, &self, "ccb.TextureDescriptor"); - // @optional cocos2d::backend::TextureType textureType + // cocos2d::backend::TextureType textureType cocos2d::backend::TextureType ret = self->textureType; int num_ret = olua_push_enum(L, ret); @@ -14261,7 +15671,7 @@ static int _cocos2d_backend_TextureDescriptor_get_textureType(lua_State *L) return num_ret; } -static int _cocos2d_backend_TextureDescriptor_set_textureType(lua_State *L) +static int _olua_fun_cocos2d_backend_TextureDescriptor_textureType$2(lua_State *L) { olua_startinvoke(L); @@ -14271,15 +15681,36 @@ static int _cocos2d_backend_TextureDescriptor_set_textureType(lua_State *L) olua_to_object(L, 1, &self, "ccb.TextureDescriptor"); olua_check_enum(L, 2, &arg1); - // @optional cocos2d::backend::TextureType textureType - self->textureType = arg1; + // cocos2d::backend::TextureType textureType + self->textureType = arg1; + + olua_endinvoke(L); + + return 0; +} + +static int _olua_fun_cocos2d_backend_TextureDescriptor_textureType(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // cocos2d::backend::TextureType textureType + return _olua_fun_cocos2d_backend_TextureDescriptor_textureType$1(L); + } + + if (num_args == 1) { + // if ((olua_is_enum(L, 2))) { + // cocos2d::backend::TextureType textureType + return _olua_fun_cocos2d_backend_TextureDescriptor_textureType$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'cocos2d::backend::TextureDescriptor::textureType' not support '%d' arguments", num_args); return 0; } -static int _cocos2d_backend_TextureDescriptor_get_textureUsage(lua_State *L) +static int _olua_fun_cocos2d_backend_TextureDescriptor_textureUsage$1(lua_State *L) { olua_startinvoke(L); @@ -14287,7 +15718,7 @@ static int _cocos2d_backend_TextureDescriptor_get_textureUsage(lua_State *L) olua_to_object(L, 1, &self, "ccb.TextureDescriptor"); - // @optional cocos2d::backend::TextureUsage textureUsage + // cocos2d::backend::TextureUsage textureUsage cocos2d::backend::TextureUsage ret = self->textureUsage; int num_ret = olua_push_enum(L, ret); @@ -14296,7 +15727,7 @@ static int _cocos2d_backend_TextureDescriptor_get_textureUsage(lua_State *L) return num_ret; } -static int _cocos2d_backend_TextureDescriptor_set_textureUsage(lua_State *L) +static int _olua_fun_cocos2d_backend_TextureDescriptor_textureUsage$2(lua_State *L) { olua_startinvoke(L); @@ -14306,7 +15737,7 @@ static int _cocos2d_backend_TextureDescriptor_set_textureUsage(lua_State *L) olua_to_object(L, 1, &self, "ccb.TextureDescriptor"); olua_check_enum(L, 2, &arg1); - // @optional cocos2d::backend::TextureUsage textureUsage + // cocos2d::backend::TextureUsage textureUsage self->textureUsage = arg1; olua_endinvoke(L); @@ -14314,7 +15745,28 @@ static int _cocos2d_backend_TextureDescriptor_set_textureUsage(lua_State *L) return 0; } -static int _cocos2d_backend_TextureDescriptor_get_width(lua_State *L) +static int _olua_fun_cocos2d_backend_TextureDescriptor_textureUsage(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // cocos2d::backend::TextureUsage textureUsage + return _olua_fun_cocos2d_backend_TextureDescriptor_textureUsage$1(L); + } + + if (num_args == 1) { + // if ((olua_is_enum(L, 2))) { + // cocos2d::backend::TextureUsage textureUsage + return _olua_fun_cocos2d_backend_TextureDescriptor_textureUsage$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::backend::TextureDescriptor::textureUsage' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_backend_TextureDescriptor_width$1(lua_State *L) { olua_startinvoke(L); @@ -14322,7 +15774,7 @@ static int _cocos2d_backend_TextureDescriptor_get_width(lua_State *L) olua_to_object(L, 1, &self, "ccb.TextureDescriptor"); - // @optional uint32_t width + // uint32_t width uint32_t ret = self->width; int num_ret = olua_push_integer(L, ret); @@ -14331,7 +15783,7 @@ static int _cocos2d_backend_TextureDescriptor_get_width(lua_State *L) return num_ret; } -static int _cocos2d_backend_TextureDescriptor_set_width(lua_State *L) +static int _olua_fun_cocos2d_backend_TextureDescriptor_width$2(lua_State *L) { olua_startinvoke(L); @@ -14341,7 +15793,7 @@ static int _cocos2d_backend_TextureDescriptor_set_width(lua_State *L) olua_to_object(L, 1, &self, "ccb.TextureDescriptor"); olua_check_integer(L, 2, &arg1); - // @optional uint32_t width + // uint32_t width self->width = arg1; olua_endinvoke(L); @@ -14349,91 +15801,56 @@ static int _cocos2d_backend_TextureDescriptor_set_width(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_backend_TextureDescriptor(lua_State *L) -{ - oluacls_class(L, "ccb.TextureDescriptor"); - oluacls_func(L, "__call", _cocos2d_backend_TextureDescriptor___call); - oluacls_func(L, "__gc", _cocos2d_backend_TextureDescriptor___gc); - oluacls_func(L, "__olua_move", _cocos2d_backend_TextureDescriptor___olua_move); - oluacls_prop(L, "depth", _cocos2d_backend_TextureDescriptor_get_depth, _cocos2d_backend_TextureDescriptor_set_depth); - oluacls_prop(L, "height", _cocos2d_backend_TextureDescriptor_get_height, _cocos2d_backend_TextureDescriptor_set_height); - oluacls_prop(L, "sampleCount", _cocos2d_backend_TextureDescriptor_get_sampleCount, _cocos2d_backend_TextureDescriptor_set_sampleCount); - oluacls_prop(L, "samplerDescriptor", _cocos2d_backend_TextureDescriptor_get_samplerDescriptor, _cocos2d_backend_TextureDescriptor_set_samplerDescriptor); - oluacls_prop(L, "textureFormat", _cocos2d_backend_TextureDescriptor_get_textureFormat, _cocos2d_backend_TextureDescriptor_set_textureFormat); - oluacls_prop(L, "textureType", _cocos2d_backend_TextureDescriptor_get_textureType, _cocos2d_backend_TextureDescriptor_set_textureType); - oluacls_prop(L, "textureUsage", _cocos2d_backend_TextureDescriptor_get_textureUsage, _cocos2d_backend_TextureDescriptor_set_textureUsage); - oluacls_prop(L, "width", _cocos2d_backend_TextureDescriptor_get_width, _cocos2d_backend_TextureDescriptor_set_width); - - return 1; -} -OLUA_END_DECLS - -static int _cocos2d_backend_StencilDescriptor___call(lua_State *L) +static int _olua_fun_cocos2d_backend_TextureDescriptor_width(lua_State *L) { - olua_startinvoke(L); - - cocos2d::backend::StencilDescriptor ret; - - luaL_checktype(L, 2, LUA_TTABLE); - - cocos2d::backend::StencilOperation arg1 = (cocos2d::backend::StencilOperation)0; /** stencilFailureOperation */ - cocos2d::backend::StencilOperation arg2 = (cocos2d::backend::StencilOperation)0; /** depthFailureOperation */ - cocos2d::backend::StencilOperation arg3 = (cocos2d::backend::StencilOperation)0; /** depthStencilPassOperation */ - cocos2d::backend::CompareFunction arg4 = (cocos2d::backend::CompareFunction)0; /** stencilCompareFunction */ - unsigned int arg5 = 0; /** readMask */ - unsigned int arg6 = 0; /** writeMask */ - - olua_getfield(L, 2, "stencilFailureOperation"); - if (!olua_isnoneornil(L, -1)) { - olua_check_enum(L, -1, &arg1); - ret.stencilFailureOperation = arg1; - } - lua_pop(L, 1); - - olua_getfield(L, 2, "depthFailureOperation"); - if (!olua_isnoneornil(L, -1)) { - olua_check_enum(L, -1, &arg2); - ret.depthFailureOperation = arg2; - } - lua_pop(L, 1); + int num_args = lua_gettop(L) - 1; - olua_getfield(L, 2, "depthStencilPassOperation"); - if (!olua_isnoneornil(L, -1)) { - olua_check_enum(L, -1, &arg3); - ret.depthStencilPassOperation = arg3; + if (num_args == 0) { + // uint32_t width + return _olua_fun_cocos2d_backend_TextureDescriptor_width$1(L); } - lua_pop(L, 1); - olua_getfield(L, 2, "stencilCompareFunction"); - if (!olua_isnoneornil(L, -1)) { - olua_check_enum(L, -1, &arg4); - ret.stencilCompareFunction = arg4; + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // uint32_t width + return _olua_fun_cocos2d_backend_TextureDescriptor_width$2(L); + // } } - lua_pop(L, 1); - olua_getfield(L, 2, "readMask"); - if (!olua_isnoneornil(L, -1)) { - olua_check_integer(L, -1, &arg5); - ret.readMask = arg5; - } - lua_pop(L, 1); + luaL_error(L, "method 'cocos2d::backend::TextureDescriptor::width' not support '%d' arguments", num_args); - olua_getfield(L, 2, "writeMask"); - if (!olua_isnoneornil(L, -1)) { - olua_check_integer(L, -1, &arg6); - ret.writeMask = arg6; - } - lua_pop(L, 1); + return 0; +} - olua_pushcopy_object(L, ret, "ccb.StencilDescriptor"); +static int _olua_cls_ccb_TextureDescriptor(lua_State *L) +{ + oluacls_class(L, "ccb.TextureDescriptor"); + oluacls_func(L, "__gc", _olua_fun_cocos2d_backend_TextureDescriptor___gc); + oluacls_func(L, "__olua_move", _olua_fun_cocos2d_backend_TextureDescriptor___olua_move); + oluacls_prop(L, "depth", _olua_fun_cocos2d_backend_TextureDescriptor_depth, _olua_fun_cocos2d_backend_TextureDescriptor_depth); + oluacls_prop(L, "height", _olua_fun_cocos2d_backend_TextureDescriptor_height, _olua_fun_cocos2d_backend_TextureDescriptor_height); + oluacls_prop(L, "sampleCount", _olua_fun_cocos2d_backend_TextureDescriptor_sampleCount, _olua_fun_cocos2d_backend_TextureDescriptor_sampleCount); + oluacls_prop(L, "samplerDescriptor", _olua_fun_cocos2d_backend_TextureDescriptor_samplerDescriptor, _olua_fun_cocos2d_backend_TextureDescriptor_samplerDescriptor); + oluacls_prop(L, "textureFormat", _olua_fun_cocos2d_backend_TextureDescriptor_textureFormat, _olua_fun_cocos2d_backend_TextureDescriptor_textureFormat); + oluacls_prop(L, "textureType", _olua_fun_cocos2d_backend_TextureDescriptor_textureType, _olua_fun_cocos2d_backend_TextureDescriptor_textureType); + oluacls_prop(L, "textureUsage", _olua_fun_cocos2d_backend_TextureDescriptor_textureUsage, _olua_fun_cocos2d_backend_TextureDescriptor_textureUsage); + oluacls_prop(L, "width", _olua_fun_cocos2d_backend_TextureDescriptor_width, _olua_fun_cocos2d_backend_TextureDescriptor_width); - olua_endinvoke(L); + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccb_TextureDescriptor(lua_State *L) +{ + olua_require(L, "cocos2d_types", luaopen_cocos2d_types); + if (!olua_getclass(L, "ccb.TextureDescriptor")) { + luaL_error(L, "class not found: cocos2d::backend::TextureDescriptor"); + } return 1; } +OLUA_END_DECLS -static int _cocos2d_backend_StencilDescriptor___gc(lua_State *L) +static int _olua_fun_cocos2d_backend_StencilDescriptor___gc(lua_State *L) { olua_startinvoke(L); @@ -14445,7 +15862,7 @@ static int _cocos2d_backend_StencilDescriptor___gc(lua_State *L) return 0; } -static int _cocos2d_backend_StencilDescriptor___olua_move(lua_State *L) +static int _olua_fun_cocos2d_backend_StencilDescriptor___olua_move(lua_State *L) { olua_startinvoke(L); @@ -14457,7 +15874,7 @@ static int _cocos2d_backend_StencilDescriptor___olua_move(lua_State *L) return 1; } -static int _cocos2d_backend_StencilDescriptor_get_depthFailureOperation(lua_State *L) +static int _olua_fun_cocos2d_backend_StencilDescriptor_depthFailureOperation$1(lua_State *L) { olua_startinvoke(L); @@ -14465,7 +15882,7 @@ static int _cocos2d_backend_StencilDescriptor_get_depthFailureOperation(lua_Stat olua_to_object(L, 1, &self, "ccb.StencilDescriptor"); - // @optional cocos2d::backend::StencilOperation depthFailureOperation + // cocos2d::backend::StencilOperation depthFailureOperation cocos2d::backend::StencilOperation ret = self->depthFailureOperation; int num_ret = olua_push_enum(L, ret); @@ -14474,7 +15891,7 @@ static int _cocos2d_backend_StencilDescriptor_get_depthFailureOperation(lua_Stat return num_ret; } -static int _cocos2d_backend_StencilDescriptor_set_depthFailureOperation(lua_State *L) +static int _olua_fun_cocos2d_backend_StencilDescriptor_depthFailureOperation$2(lua_State *L) { olua_startinvoke(L); @@ -14484,7 +15901,7 @@ static int _cocos2d_backend_StencilDescriptor_set_depthFailureOperation(lua_Stat olua_to_object(L, 1, &self, "ccb.StencilDescriptor"); olua_check_enum(L, 2, &arg1); - // @optional cocos2d::backend::StencilOperation depthFailureOperation + // cocos2d::backend::StencilOperation depthFailureOperation self->depthFailureOperation = arg1; olua_endinvoke(L); @@ -14492,7 +15909,28 @@ static int _cocos2d_backend_StencilDescriptor_set_depthFailureOperation(lua_Stat return 0; } -static int _cocos2d_backend_StencilDescriptor_get_depthStencilPassOperation(lua_State *L) +static int _olua_fun_cocos2d_backend_StencilDescriptor_depthFailureOperation(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // cocos2d::backend::StencilOperation depthFailureOperation + return _olua_fun_cocos2d_backend_StencilDescriptor_depthFailureOperation$1(L); + } + + if (num_args == 1) { + // if ((olua_is_enum(L, 2))) { + // cocos2d::backend::StencilOperation depthFailureOperation + return _olua_fun_cocos2d_backend_StencilDescriptor_depthFailureOperation$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::backend::StencilDescriptor::depthFailureOperation' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_backend_StencilDescriptor_depthStencilPassOperation$1(lua_State *L) { olua_startinvoke(L); @@ -14500,7 +15938,7 @@ static int _cocos2d_backend_StencilDescriptor_get_depthStencilPassOperation(lua_ olua_to_object(L, 1, &self, "ccb.StencilDescriptor"); - // @optional cocos2d::backend::StencilOperation depthStencilPassOperation + // cocos2d::backend::StencilOperation depthStencilPassOperation cocos2d::backend::StencilOperation ret = self->depthStencilPassOperation; int num_ret = olua_push_enum(L, ret); @@ -14509,7 +15947,7 @@ static int _cocos2d_backend_StencilDescriptor_get_depthStencilPassOperation(lua_ return num_ret; } -static int _cocos2d_backend_StencilDescriptor_set_depthStencilPassOperation(lua_State *L) +static int _olua_fun_cocos2d_backend_StencilDescriptor_depthStencilPassOperation$2(lua_State *L) { olua_startinvoke(L); @@ -14519,7 +15957,7 @@ static int _cocos2d_backend_StencilDescriptor_set_depthStencilPassOperation(lua_ olua_to_object(L, 1, &self, "ccb.StencilDescriptor"); olua_check_enum(L, 2, &arg1); - // @optional cocos2d::backend::StencilOperation depthStencilPassOperation + // cocos2d::backend::StencilOperation depthStencilPassOperation self->depthStencilPassOperation = arg1; olua_endinvoke(L); @@ -14527,7 +15965,28 @@ static int _cocos2d_backend_StencilDescriptor_set_depthStencilPassOperation(lua_ return 0; } -static int _cocos2d_backend_StencilDescriptor_get_readMask(lua_State *L) +static int _olua_fun_cocos2d_backend_StencilDescriptor_depthStencilPassOperation(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // cocos2d::backend::StencilOperation depthStencilPassOperation + return _olua_fun_cocos2d_backend_StencilDescriptor_depthStencilPassOperation$1(L); + } + + if (num_args == 1) { + // if ((olua_is_enum(L, 2))) { + // cocos2d::backend::StencilOperation depthStencilPassOperation + return _olua_fun_cocos2d_backend_StencilDescriptor_depthStencilPassOperation$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::backend::StencilDescriptor::depthStencilPassOperation' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_backend_StencilDescriptor_readMask$1(lua_State *L) { olua_startinvoke(L); @@ -14535,7 +15994,7 @@ static int _cocos2d_backend_StencilDescriptor_get_readMask(lua_State *L) olua_to_object(L, 1, &self, "ccb.StencilDescriptor"); - // @optional unsigned int readMask + // unsigned int readMask unsigned int ret = self->readMask; int num_ret = olua_push_integer(L, ret); @@ -14544,7 +16003,7 @@ static int _cocos2d_backend_StencilDescriptor_get_readMask(lua_State *L) return num_ret; } -static int _cocos2d_backend_StencilDescriptor_set_readMask(lua_State *L) +static int _olua_fun_cocos2d_backend_StencilDescriptor_readMask$2(lua_State *L) { olua_startinvoke(L); @@ -14554,7 +16013,7 @@ static int _cocos2d_backend_StencilDescriptor_set_readMask(lua_State *L) olua_to_object(L, 1, &self, "ccb.StencilDescriptor"); olua_check_integer(L, 2, &arg1); - // @optional unsigned int readMask + // unsigned int readMask self->readMask = arg1; olua_endinvoke(L); @@ -14562,7 +16021,28 @@ static int _cocos2d_backend_StencilDescriptor_set_readMask(lua_State *L) return 0; } -static int _cocos2d_backend_StencilDescriptor_get_stencilCompareFunction(lua_State *L) +static int _olua_fun_cocos2d_backend_StencilDescriptor_readMask(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // unsigned int readMask + return _olua_fun_cocos2d_backend_StencilDescriptor_readMask$1(L); + } + + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // unsigned int readMask + return _olua_fun_cocos2d_backend_StencilDescriptor_readMask$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::backend::StencilDescriptor::readMask' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_backend_StencilDescriptor_stencilCompareFunction$1(lua_State *L) { olua_startinvoke(L); @@ -14570,7 +16050,7 @@ static int _cocos2d_backend_StencilDescriptor_get_stencilCompareFunction(lua_Sta olua_to_object(L, 1, &self, "ccb.StencilDescriptor"); - // @optional cocos2d::backend::CompareFunction stencilCompareFunction + // cocos2d::backend::CompareFunction stencilCompareFunction cocos2d::backend::CompareFunction ret = self->stencilCompareFunction; int num_ret = olua_push_enum(L, ret); @@ -14579,7 +16059,7 @@ static int _cocos2d_backend_StencilDescriptor_get_stencilCompareFunction(lua_Sta return num_ret; } -static int _cocos2d_backend_StencilDescriptor_set_stencilCompareFunction(lua_State *L) +static int _olua_fun_cocos2d_backend_StencilDescriptor_stencilCompareFunction$2(lua_State *L) { olua_startinvoke(L); @@ -14589,7 +16069,7 @@ static int _cocos2d_backend_StencilDescriptor_set_stencilCompareFunction(lua_Sta olua_to_object(L, 1, &self, "ccb.StencilDescriptor"); olua_check_enum(L, 2, &arg1); - // @optional cocos2d::backend::CompareFunction stencilCompareFunction + // cocos2d::backend::CompareFunction stencilCompareFunction self->stencilCompareFunction = arg1; olua_endinvoke(L); @@ -14597,7 +16077,28 @@ static int _cocos2d_backend_StencilDescriptor_set_stencilCompareFunction(lua_Sta return 0; } -static int _cocos2d_backend_StencilDescriptor_get_stencilFailureOperation(lua_State *L) +static int _olua_fun_cocos2d_backend_StencilDescriptor_stencilCompareFunction(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // cocos2d::backend::CompareFunction stencilCompareFunction + return _olua_fun_cocos2d_backend_StencilDescriptor_stencilCompareFunction$1(L); + } + + if (num_args == 1) { + // if ((olua_is_enum(L, 2))) { + // cocos2d::backend::CompareFunction stencilCompareFunction + return _olua_fun_cocos2d_backend_StencilDescriptor_stencilCompareFunction$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::backend::StencilDescriptor::stencilCompareFunction' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_backend_StencilDescriptor_stencilFailureOperation$1(lua_State *L) { olua_startinvoke(L); @@ -14605,7 +16106,7 @@ static int _cocos2d_backend_StencilDescriptor_get_stencilFailureOperation(lua_St olua_to_object(L, 1, &self, "ccb.StencilDescriptor"); - // @optional cocos2d::backend::StencilOperation stencilFailureOperation + // cocos2d::backend::StencilOperation stencilFailureOperation cocos2d::backend::StencilOperation ret = self->stencilFailureOperation; int num_ret = olua_push_enum(L, ret); @@ -14614,7 +16115,7 @@ static int _cocos2d_backend_StencilDescriptor_get_stencilFailureOperation(lua_St return num_ret; } -static int _cocos2d_backend_StencilDescriptor_set_stencilFailureOperation(lua_State *L) +static int _olua_fun_cocos2d_backend_StencilDescriptor_stencilFailureOperation$2(lua_State *L) { olua_startinvoke(L); @@ -14624,7 +16125,7 @@ static int _cocos2d_backend_StencilDescriptor_set_stencilFailureOperation(lua_St olua_to_object(L, 1, &self, "ccb.StencilDescriptor"); olua_check_enum(L, 2, &arg1); - // @optional cocos2d::backend::StencilOperation stencilFailureOperation + // cocos2d::backend::StencilOperation stencilFailureOperation self->stencilFailureOperation = arg1; olua_endinvoke(L); @@ -14632,7 +16133,28 @@ static int _cocos2d_backend_StencilDescriptor_set_stencilFailureOperation(lua_St return 0; } -static int _cocos2d_backend_StencilDescriptor_get_writeMask(lua_State *L) +static int _olua_fun_cocos2d_backend_StencilDescriptor_stencilFailureOperation(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // cocos2d::backend::StencilOperation stencilFailureOperation + return _olua_fun_cocos2d_backend_StencilDescriptor_stencilFailureOperation$1(L); + } + + if (num_args == 1) { + // if ((olua_is_enum(L, 2))) { + // cocos2d::backend::StencilOperation stencilFailureOperation + return _olua_fun_cocos2d_backend_StencilDescriptor_stencilFailureOperation$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::backend::StencilDescriptor::stencilFailureOperation' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_backend_StencilDescriptor_writeMask$1(lua_State *L) { olua_startinvoke(L); @@ -14640,7 +16162,7 @@ static int _cocos2d_backend_StencilDescriptor_get_writeMask(lua_State *L) olua_to_object(L, 1, &self, "ccb.StencilDescriptor"); - // @optional unsigned int writeMask + // unsigned int writeMask unsigned int ret = self->writeMask; int num_ret = olua_push_integer(L, ret); @@ -14649,7 +16171,7 @@ static int _cocos2d_backend_StencilDescriptor_get_writeMask(lua_State *L) return num_ret; } -static int _cocos2d_backend_StencilDescriptor_set_writeMask(lua_State *L) +static int _olua_fun_cocos2d_backend_StencilDescriptor_writeMask$2(lua_State *L) { olua_startinvoke(L); @@ -14659,7 +16181,7 @@ static int _cocos2d_backend_StencilDescriptor_set_writeMask(lua_State *L) olua_to_object(L, 1, &self, "ccb.StencilDescriptor"); olua_check_integer(L, 2, &arg1); - // @optional unsigned int writeMask + // unsigned int writeMask self->writeMask = arg1; olua_endinvoke(L); @@ -14667,85 +16189,54 @@ static int _cocos2d_backend_StencilDescriptor_set_writeMask(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_backend_StencilDescriptor(lua_State *L) -{ - oluacls_class(L, "ccb.StencilDescriptor"); - oluacls_func(L, "__call", _cocos2d_backend_StencilDescriptor___call); - oluacls_func(L, "__gc", _cocos2d_backend_StencilDescriptor___gc); - oluacls_func(L, "__olua_move", _cocos2d_backend_StencilDescriptor___olua_move); - oluacls_prop(L, "depthFailureOperation", _cocos2d_backend_StencilDescriptor_get_depthFailureOperation, _cocos2d_backend_StencilDescriptor_set_depthFailureOperation); - oluacls_prop(L, "depthStencilPassOperation", _cocos2d_backend_StencilDescriptor_get_depthStencilPassOperation, _cocos2d_backend_StencilDescriptor_set_depthStencilPassOperation); - oluacls_prop(L, "readMask", _cocos2d_backend_StencilDescriptor_get_readMask, _cocos2d_backend_StencilDescriptor_set_readMask); - oluacls_prop(L, "stencilCompareFunction", _cocos2d_backend_StencilDescriptor_get_stencilCompareFunction, _cocos2d_backend_StencilDescriptor_set_stencilCompareFunction); - oluacls_prop(L, "stencilFailureOperation", _cocos2d_backend_StencilDescriptor_get_stencilFailureOperation, _cocos2d_backend_StencilDescriptor_set_stencilFailureOperation); - oluacls_prop(L, "writeMask", _cocos2d_backend_StencilDescriptor_get_writeMask, _cocos2d_backend_StencilDescriptor_set_writeMask); - - return 1; -} -OLUA_END_DECLS - -static int _cocos2d_backend_DepthStencilDescriptor___call(lua_State *L) +static int _olua_fun_cocos2d_backend_StencilDescriptor_writeMask(lua_State *L) { - olua_startinvoke(L); - - cocos2d::backend::DepthStencilDescriptor ret; - - luaL_checktype(L, 2, LUA_TTABLE); - - cocos2d::backend::CompareFunction arg1 = (cocos2d::backend::CompareFunction)0; /** depthCompareFunction */ - bool arg2 = false; /** depthWriteEnabled */ - bool arg3 = false; /** depthTestEnabled */ - bool arg4 = false; /** stencilTestEnabled */ - cocos2d::backend::StencilDescriptor arg5; /** backFaceStencil */ - cocos2d::backend::StencilDescriptor arg6; /** frontFaceStencil */ - - olua_getfield(L, 2, "depthCompareFunction"); - if (!olua_isnoneornil(L, -1)) { - olua_check_enum(L, -1, &arg1); - ret.depthCompareFunction = arg1; - } - lua_pop(L, 1); - - olua_getfield(L, 2, "depthWriteEnabled"); - if (!olua_isnoneornil(L, -1)) { - olua_check_bool(L, -1, &arg2); - ret.depthWriteEnabled = arg2; - } - lua_pop(L, 1); + int num_args = lua_gettop(L) - 1; - olua_getfield(L, 2, "depthTestEnabled"); - if (!olua_isnoneornil(L, -1)) { - olua_check_bool(L, -1, &arg3); - ret.depthTestEnabled = arg3; + if (num_args == 0) { + // unsigned int writeMask + return _olua_fun_cocos2d_backend_StencilDescriptor_writeMask$1(L); } - lua_pop(L, 1); - olua_getfield(L, 2, "stencilTestEnabled"); - if (!olua_isnoneornil(L, -1)) { - olua_check_bool(L, -1, &arg4); - ret.stencilTestEnabled = arg4; + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // unsigned int writeMask + return _olua_fun_cocos2d_backend_StencilDescriptor_writeMask$2(L); + // } } - lua_pop(L, 1); - olua_getfield(L, 2, "backFaceStencil"); - olua_check_object(L, -1, &arg5, "ccb.StencilDescriptor"); - ret.backFaceStencil = arg5; - lua_pop(L, 1); + luaL_error(L, "method 'cocos2d::backend::StencilDescriptor::writeMask' not support '%d' arguments", num_args); - olua_getfield(L, 2, "frontFaceStencil"); - olua_check_object(L, -1, &arg6, "ccb.StencilDescriptor"); - ret.frontFaceStencil = arg6; - lua_pop(L, 1); + return 0; +} - olua_pushcopy_object(L, ret, "ccb.DepthStencilDescriptor"); +static int _olua_cls_ccb_StencilDescriptor(lua_State *L) +{ + oluacls_class(L, "ccb.StencilDescriptor"); + oluacls_func(L, "__gc", _olua_fun_cocos2d_backend_StencilDescriptor___gc); + oluacls_func(L, "__olua_move", _olua_fun_cocos2d_backend_StencilDescriptor___olua_move); + oluacls_prop(L, "depthFailureOperation", _olua_fun_cocos2d_backend_StencilDescriptor_depthFailureOperation, _olua_fun_cocos2d_backend_StencilDescriptor_depthFailureOperation); + oluacls_prop(L, "depthStencilPassOperation", _olua_fun_cocos2d_backend_StencilDescriptor_depthStencilPassOperation, _olua_fun_cocos2d_backend_StencilDescriptor_depthStencilPassOperation); + oluacls_prop(L, "readMask", _olua_fun_cocos2d_backend_StencilDescriptor_readMask, _olua_fun_cocos2d_backend_StencilDescriptor_readMask); + oluacls_prop(L, "stencilCompareFunction", _olua_fun_cocos2d_backend_StencilDescriptor_stencilCompareFunction, _olua_fun_cocos2d_backend_StencilDescriptor_stencilCompareFunction); + oluacls_prop(L, "stencilFailureOperation", _olua_fun_cocos2d_backend_StencilDescriptor_stencilFailureOperation, _olua_fun_cocos2d_backend_StencilDescriptor_stencilFailureOperation); + oluacls_prop(L, "writeMask", _olua_fun_cocos2d_backend_StencilDescriptor_writeMask, _olua_fun_cocos2d_backend_StencilDescriptor_writeMask); - olua_endinvoke(L); + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccb_StencilDescriptor(lua_State *L) +{ + olua_require(L, "cocos2d_types", luaopen_cocos2d_types); + if (!olua_getclass(L, "ccb.StencilDescriptor")) { + luaL_error(L, "class not found: cocos2d::backend::StencilDescriptor"); + } return 1; } +OLUA_END_DECLS -static int _cocos2d_backend_DepthStencilDescriptor___gc(lua_State *L) +static int _olua_fun_cocos2d_backend_DepthStencilDescriptor___gc(lua_State *L) { olua_startinvoke(L); @@ -14757,7 +16248,7 @@ static int _cocos2d_backend_DepthStencilDescriptor___gc(lua_State *L) return 0; } -static int _cocos2d_backend_DepthStencilDescriptor___olua_move(lua_State *L) +static int _olua_fun_cocos2d_backend_DepthStencilDescriptor___olua_move(lua_State *L) { olua_startinvoke(L); @@ -14769,7 +16260,7 @@ static int _cocos2d_backend_DepthStencilDescriptor___olua_move(lua_State *L) return 1; } -static int _cocos2d_backend_DepthStencilDescriptor_get_backFaceStencil(lua_State *L) +static int _olua_fun_cocos2d_backend_DepthStencilDescriptor_backFaceStencil$1(lua_State *L) { olua_startinvoke(L); @@ -14779,32 +16270,53 @@ static int _cocos2d_backend_DepthStencilDescriptor_get_backFaceStencil(lua_State // cocos2d::backend::StencilDescriptor backFaceStencil cocos2d::backend::StencilDescriptor &ret = self->backFaceStencil; - int num_ret = olua_pushcopy_object(L, ret, "ccb.StencilDescriptor"); + int num_ret = olua_copy_object(L, ret, "ccb.StencilDescriptor"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_backend_DepthStencilDescriptor_set_backFaceStencil(lua_State *L) +static int _olua_fun_cocos2d_backend_DepthStencilDescriptor_backFaceStencil$2(lua_State *L) { olua_startinvoke(L); cocos2d::backend::DepthStencilDescriptor *self = nullptr; - cocos2d::backend::StencilDescriptor arg1; /** backFaceStencil */ + cocos2d::backend::StencilDescriptor *arg1; /** backFaceStencil */ olua_to_object(L, 1, &self, "ccb.DepthStencilDescriptor"); olua_check_object(L, 2, &arg1, "ccb.StencilDescriptor"); // cocos2d::backend::StencilDescriptor backFaceStencil - self->backFaceStencil = arg1; + self->backFaceStencil = *arg1; olua_endinvoke(L); return 0; } -static int _cocos2d_backend_DepthStencilDescriptor_get_depthCompareFunction(lua_State *L) +static int _olua_fun_cocos2d_backend_DepthStencilDescriptor_backFaceStencil(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // cocos2d::backend::StencilDescriptor backFaceStencil + return _olua_fun_cocos2d_backend_DepthStencilDescriptor_backFaceStencil$1(L); + } + + if (num_args == 1) { + // if ((olua_is_object(L, 2, "ccb.StencilDescriptor"))) { + // cocos2d::backend::StencilDescriptor backFaceStencil + return _olua_fun_cocos2d_backend_DepthStencilDescriptor_backFaceStencil$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::backend::DepthStencilDescriptor::backFaceStencil' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_backend_DepthStencilDescriptor_depthCompareFunction$1(lua_State *L) { olua_startinvoke(L); @@ -14812,7 +16324,7 @@ static int _cocos2d_backend_DepthStencilDescriptor_get_depthCompareFunction(lua_ olua_to_object(L, 1, &self, "ccb.DepthStencilDescriptor"); - // @optional cocos2d::backend::CompareFunction depthCompareFunction + // cocos2d::backend::CompareFunction depthCompareFunction cocos2d::backend::CompareFunction ret = self->depthCompareFunction; int num_ret = olua_push_enum(L, ret); @@ -14821,7 +16333,7 @@ static int _cocos2d_backend_DepthStencilDescriptor_get_depthCompareFunction(lua_ return num_ret; } -static int _cocos2d_backend_DepthStencilDescriptor_set_depthCompareFunction(lua_State *L) +static int _olua_fun_cocos2d_backend_DepthStencilDescriptor_depthCompareFunction$2(lua_State *L) { olua_startinvoke(L); @@ -14831,7 +16343,7 @@ static int _cocos2d_backend_DepthStencilDescriptor_set_depthCompareFunction(lua_ olua_to_object(L, 1, &self, "ccb.DepthStencilDescriptor"); olua_check_enum(L, 2, &arg1); - // @optional cocos2d::backend::CompareFunction depthCompareFunction + // cocos2d::backend::CompareFunction depthCompareFunction self->depthCompareFunction = arg1; olua_endinvoke(L); @@ -14839,7 +16351,28 @@ static int _cocos2d_backend_DepthStencilDescriptor_set_depthCompareFunction(lua_ return 0; } -static int _cocos2d_backend_DepthStencilDescriptor_get_depthTestEnabled(lua_State *L) +static int _olua_fun_cocos2d_backend_DepthStencilDescriptor_depthCompareFunction(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // cocos2d::backend::CompareFunction depthCompareFunction + return _olua_fun_cocos2d_backend_DepthStencilDescriptor_depthCompareFunction$1(L); + } + + if (num_args == 1) { + // if ((olua_is_enum(L, 2))) { + // cocos2d::backend::CompareFunction depthCompareFunction + return _olua_fun_cocos2d_backend_DepthStencilDescriptor_depthCompareFunction$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::backend::DepthStencilDescriptor::depthCompareFunction' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_backend_DepthStencilDescriptor_depthTestEnabled$1(lua_State *L) { olua_startinvoke(L); @@ -14847,7 +16380,7 @@ static int _cocos2d_backend_DepthStencilDescriptor_get_depthTestEnabled(lua_Stat olua_to_object(L, 1, &self, "ccb.DepthStencilDescriptor"); - // @optional bool depthTestEnabled + // bool depthTestEnabled bool ret = self->depthTestEnabled; int num_ret = olua_push_bool(L, ret); @@ -14856,7 +16389,7 @@ static int _cocos2d_backend_DepthStencilDescriptor_get_depthTestEnabled(lua_Stat return num_ret; } -static int _cocos2d_backend_DepthStencilDescriptor_set_depthTestEnabled(lua_State *L) +static int _olua_fun_cocos2d_backend_DepthStencilDescriptor_depthTestEnabled$2(lua_State *L) { olua_startinvoke(L); @@ -14866,7 +16399,7 @@ static int _cocos2d_backend_DepthStencilDescriptor_set_depthTestEnabled(lua_Stat olua_to_object(L, 1, &self, "ccb.DepthStencilDescriptor"); olua_check_bool(L, 2, &arg1); - // @optional bool depthTestEnabled + // bool depthTestEnabled self->depthTestEnabled = arg1; olua_endinvoke(L); @@ -14874,7 +16407,28 @@ static int _cocos2d_backend_DepthStencilDescriptor_set_depthTestEnabled(lua_Stat return 0; } -static int _cocos2d_backend_DepthStencilDescriptor_get_depthWriteEnabled(lua_State *L) +static int _olua_fun_cocos2d_backend_DepthStencilDescriptor_depthTestEnabled(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // bool depthTestEnabled + return _olua_fun_cocos2d_backend_DepthStencilDescriptor_depthTestEnabled$1(L); + } + + if (num_args == 1) { + // if ((olua_is_bool(L, 2))) { + // bool depthTestEnabled + return _olua_fun_cocos2d_backend_DepthStencilDescriptor_depthTestEnabled$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::backend::DepthStencilDescriptor::depthTestEnabled' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_backend_DepthStencilDescriptor_depthWriteEnabled$1(lua_State *L) { olua_startinvoke(L); @@ -14882,7 +16436,7 @@ static int _cocos2d_backend_DepthStencilDescriptor_get_depthWriteEnabled(lua_Sta olua_to_object(L, 1, &self, "ccb.DepthStencilDescriptor"); - // @optional bool depthWriteEnabled + // bool depthWriteEnabled bool ret = self->depthWriteEnabled; int num_ret = olua_push_bool(L, ret); @@ -14891,7 +16445,7 @@ static int _cocos2d_backend_DepthStencilDescriptor_get_depthWriteEnabled(lua_Sta return num_ret; } -static int _cocos2d_backend_DepthStencilDescriptor_set_depthWriteEnabled(lua_State *L) +static int _olua_fun_cocos2d_backend_DepthStencilDescriptor_depthWriteEnabled$2(lua_State *L) { olua_startinvoke(L); @@ -14901,7 +16455,7 @@ static int _cocos2d_backend_DepthStencilDescriptor_set_depthWriteEnabled(lua_Sta olua_to_object(L, 1, &self, "ccb.DepthStencilDescriptor"); olua_check_bool(L, 2, &arg1); - // @optional bool depthWriteEnabled + // bool depthWriteEnabled self->depthWriteEnabled = arg1; olua_endinvoke(L); @@ -14909,7 +16463,28 @@ static int _cocos2d_backend_DepthStencilDescriptor_set_depthWriteEnabled(lua_Sta return 0; } -static int _cocos2d_backend_DepthStencilDescriptor_get_frontFaceStencil(lua_State *L) +static int _olua_fun_cocos2d_backend_DepthStencilDescriptor_depthWriteEnabled(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // bool depthWriteEnabled + return _olua_fun_cocos2d_backend_DepthStencilDescriptor_depthWriteEnabled$1(L); + } + + if (num_args == 1) { + // if ((olua_is_bool(L, 2))) { + // bool depthWriteEnabled + return _olua_fun_cocos2d_backend_DepthStencilDescriptor_depthWriteEnabled$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::backend::DepthStencilDescriptor::depthWriteEnabled' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_backend_DepthStencilDescriptor_frontFaceStencil$1(lua_State *L) { olua_startinvoke(L); @@ -14919,32 +16494,53 @@ static int _cocos2d_backend_DepthStencilDescriptor_get_frontFaceStencil(lua_Stat // cocos2d::backend::StencilDescriptor frontFaceStencil cocos2d::backend::StencilDescriptor &ret = self->frontFaceStencil; - int num_ret = olua_pushcopy_object(L, ret, "ccb.StencilDescriptor"); + int num_ret = olua_copy_object(L, ret, "ccb.StencilDescriptor"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_backend_DepthStencilDescriptor_set_frontFaceStencil(lua_State *L) +static int _olua_fun_cocos2d_backend_DepthStencilDescriptor_frontFaceStencil$2(lua_State *L) { olua_startinvoke(L); cocos2d::backend::DepthStencilDescriptor *self = nullptr; - cocos2d::backend::StencilDescriptor arg1; /** frontFaceStencil */ + cocos2d::backend::StencilDescriptor *arg1; /** frontFaceStencil */ olua_to_object(L, 1, &self, "ccb.DepthStencilDescriptor"); olua_check_object(L, 2, &arg1, "ccb.StencilDescriptor"); // cocos2d::backend::StencilDescriptor frontFaceStencil - self->frontFaceStencil = arg1; + self->frontFaceStencil = *arg1; olua_endinvoke(L); return 0; } -static int _cocos2d_backend_DepthStencilDescriptor_get_stencilTestEnabled(lua_State *L) +static int _olua_fun_cocos2d_backend_DepthStencilDescriptor_frontFaceStencil(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // cocos2d::backend::StencilDescriptor frontFaceStencil + return _olua_fun_cocos2d_backend_DepthStencilDescriptor_frontFaceStencil$1(L); + } + + if (num_args == 1) { + // if ((olua_is_object(L, 2, "ccb.StencilDescriptor"))) { + // cocos2d::backend::StencilDescriptor frontFaceStencil + return _olua_fun_cocos2d_backend_DepthStencilDescriptor_frontFaceStencil$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::backend::DepthStencilDescriptor::frontFaceStencil' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_backend_DepthStencilDescriptor_stencilTestEnabled$1(lua_State *L) { olua_startinvoke(L); @@ -14952,7 +16548,7 @@ static int _cocos2d_backend_DepthStencilDescriptor_get_stencilTestEnabled(lua_St olua_to_object(L, 1, &self, "ccb.DepthStencilDescriptor"); - // @optional bool stencilTestEnabled + // bool stencilTestEnabled bool ret = self->stencilTestEnabled; int num_ret = olua_push_bool(L, ret); @@ -14961,7 +16557,7 @@ static int _cocos2d_backend_DepthStencilDescriptor_get_stencilTestEnabled(lua_St return num_ret; } -static int _cocos2d_backend_DepthStencilDescriptor_set_stencilTestEnabled(lua_State *L) +static int _olua_fun_cocos2d_backend_DepthStencilDescriptor_stencilTestEnabled$2(lua_State *L) { olua_startinvoke(L); @@ -14971,7 +16567,7 @@ static int _cocos2d_backend_DepthStencilDescriptor_set_stencilTestEnabled(lua_St olua_to_object(L, 1, &self, "ccb.DepthStencilDescriptor"); olua_check_bool(L, 2, &arg1); - // @optional bool stencilTestEnabled + // bool stencilTestEnabled self->stencilTestEnabled = arg1; olua_endinvoke(L); @@ -14979,79 +16575,54 @@ static int _cocos2d_backend_DepthStencilDescriptor_set_stencilTestEnabled(lua_St return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_backend_DepthStencilDescriptor(lua_State *L) -{ - oluacls_class(L, "ccb.DepthStencilDescriptor"); - oluacls_func(L, "__call", _cocos2d_backend_DepthStencilDescriptor___call); - oluacls_func(L, "__gc", _cocos2d_backend_DepthStencilDescriptor___gc); - oluacls_func(L, "__olua_move", _cocos2d_backend_DepthStencilDescriptor___olua_move); - oluacls_prop(L, "backFaceStencil", _cocos2d_backend_DepthStencilDescriptor_get_backFaceStencil, _cocos2d_backend_DepthStencilDescriptor_set_backFaceStencil); - oluacls_prop(L, "depthCompareFunction", _cocos2d_backend_DepthStencilDescriptor_get_depthCompareFunction, _cocos2d_backend_DepthStencilDescriptor_set_depthCompareFunction); - oluacls_prop(L, "depthTestEnabled", _cocos2d_backend_DepthStencilDescriptor_get_depthTestEnabled, _cocos2d_backend_DepthStencilDescriptor_set_depthTestEnabled); - oluacls_prop(L, "depthWriteEnabled", _cocos2d_backend_DepthStencilDescriptor_get_depthWriteEnabled, _cocos2d_backend_DepthStencilDescriptor_set_depthWriteEnabled); - oluacls_prop(L, "frontFaceStencil", _cocos2d_backend_DepthStencilDescriptor_get_frontFaceStencil, _cocos2d_backend_DepthStencilDescriptor_set_frontFaceStencil); - oluacls_prop(L, "stencilTestEnabled", _cocos2d_backend_DepthStencilDescriptor_get_stencilTestEnabled, _cocos2d_backend_DepthStencilDescriptor_set_stencilTestEnabled); - - return 1; -} -OLUA_END_DECLS - -static int _cocos2d_backend_VertexLayout_Attribute___call(lua_State *L) +static int _olua_fun_cocos2d_backend_DepthStencilDescriptor_stencilTestEnabled(lua_State *L) { - olua_startinvoke(L); - - cocos2d::backend::VertexLayout::Attribute ret; - - luaL_checktype(L, 2, LUA_TTABLE); - - std::string arg1; /** name */ - cocos2d::backend::VertexFormat arg2 = (cocos2d::backend::VertexFormat)0; /** format */ - std::size_t arg3 = 0; /** offset */ - std::size_t arg4 = 0; /** index */ - bool arg5 = false; /** needToBeNormallized */ - - olua_getfield(L, 2, "name"); - olua_check_string(L, -1, &arg1); - ret.name = arg1; - lua_pop(L, 1); + int num_args = lua_gettop(L) - 1; - olua_getfield(L, 2, "format"); - if (!olua_isnoneornil(L, -1)) { - olua_check_enum(L, -1, &arg2); - ret.format = arg2; + if (num_args == 0) { + // bool stencilTestEnabled + return _olua_fun_cocos2d_backend_DepthStencilDescriptor_stencilTestEnabled$1(L); } - lua_pop(L, 1); - olua_getfield(L, 2, "offset"); - if (!olua_isnoneornil(L, -1)) { - olua_check_integer(L, -1, &arg3); - ret.offset = arg3; + if (num_args == 1) { + // if ((olua_is_bool(L, 2))) { + // bool stencilTestEnabled + return _olua_fun_cocos2d_backend_DepthStencilDescriptor_stencilTestEnabled$2(L); + // } } - lua_pop(L, 1); - olua_getfield(L, 2, "index"); - if (!olua_isnoneornil(L, -1)) { - olua_check_integer(L, -1, &arg4); - ret.index = arg4; - } - lua_pop(L, 1); + luaL_error(L, "method 'cocos2d::backend::DepthStencilDescriptor::stencilTestEnabled' not support '%d' arguments", num_args); - olua_getfield(L, 2, "needToBeNormallized"); - if (!olua_isnoneornil(L, -1)) { - olua_check_bool(L, -1, &arg5); - ret.needToBeNormallized = arg5; - } - lua_pop(L, 1); + return 0; +} - olua_pushcopy_object(L, ret, "ccb.VertexLayout.Attribute"); +static int _olua_cls_ccb_DepthStencilDescriptor(lua_State *L) +{ + oluacls_class(L, "ccb.DepthStencilDescriptor"); + oluacls_func(L, "__gc", _olua_fun_cocos2d_backend_DepthStencilDescriptor___gc); + oluacls_func(L, "__olua_move", _olua_fun_cocos2d_backend_DepthStencilDescriptor___olua_move); + oluacls_prop(L, "backFaceStencil", _olua_fun_cocos2d_backend_DepthStencilDescriptor_backFaceStencil, _olua_fun_cocos2d_backend_DepthStencilDescriptor_backFaceStencil); + oluacls_prop(L, "depthCompareFunction", _olua_fun_cocos2d_backend_DepthStencilDescriptor_depthCompareFunction, _olua_fun_cocos2d_backend_DepthStencilDescriptor_depthCompareFunction); + oluacls_prop(L, "depthTestEnabled", _olua_fun_cocos2d_backend_DepthStencilDescriptor_depthTestEnabled, _olua_fun_cocos2d_backend_DepthStencilDescriptor_depthTestEnabled); + oluacls_prop(L, "depthWriteEnabled", _olua_fun_cocos2d_backend_DepthStencilDescriptor_depthWriteEnabled, _olua_fun_cocos2d_backend_DepthStencilDescriptor_depthWriteEnabled); + oluacls_prop(L, "frontFaceStencil", _olua_fun_cocos2d_backend_DepthStencilDescriptor_frontFaceStencil, _olua_fun_cocos2d_backend_DepthStencilDescriptor_frontFaceStencil); + oluacls_prop(L, "stencilTestEnabled", _olua_fun_cocos2d_backend_DepthStencilDescriptor_stencilTestEnabled, _olua_fun_cocos2d_backend_DepthStencilDescriptor_stencilTestEnabled); - olua_endinvoke(L); + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccb_DepthStencilDescriptor(lua_State *L) +{ + olua_require(L, "cocos2d_types", luaopen_cocos2d_types); + if (!olua_getclass(L, "ccb.DepthStencilDescriptor")) { + luaL_error(L, "class not found: cocos2d::backend::DepthStencilDescriptor"); + } return 1; } +OLUA_END_DECLS -static int _cocos2d_backend_VertexLayout_Attribute___gc(lua_State *L) +static int _olua_fun_cocos2d_backend_VertexLayout_Attribute___gc(lua_State *L) { olua_startinvoke(L); @@ -15063,7 +16634,7 @@ static int _cocos2d_backend_VertexLayout_Attribute___gc(lua_State *L) return 0; } -static int _cocos2d_backend_VertexLayout_Attribute___olua_move(lua_State *L) +static int _olua_fun_cocos2d_backend_VertexLayout_Attribute___olua_move(lua_State *L) { olua_startinvoke(L); @@ -15075,68 +16646,63 @@ static int _cocos2d_backend_VertexLayout_Attribute___olua_move(lua_State *L) return 1; } -static int _cocos2d_backend_VertexLayout_Attribute_new$1(lua_State *L) +static int _olua_fun_cocos2d_backend_VertexLayout_Attribute_format$1(lua_State *L) { olua_startinvoke(L); - // Attribute() - cocos2d::backend::VertexLayout::Attribute *ret = new cocos2d::backend::VertexLayout::Attribute(); - int num_ret = olua_push_object(L, ret, "ccb.VertexLayout.Attribute"); - olua_postnew(L, ret); + cocos2d::backend::VertexLayout::Attribute *self = nullptr; + + olua_to_object(L, 1, &self, "ccb.VertexLayout.Attribute"); + + // cocos2d::backend::VertexFormat format + cocos2d::backend::VertexFormat ret = self->format; + int num_ret = olua_push_enum(L, ret); olua_endinvoke(L); return num_ret; } -static int _cocos2d_backend_VertexLayout_Attribute_new$2(lua_State *L) +static int _olua_fun_cocos2d_backend_VertexLayout_Attribute_format$2(lua_State *L) { olua_startinvoke(L); - std::string arg1; /** _name */ - std::size_t arg2 = 0; /** _index */ - cocos2d::backend::VertexFormat arg3 = (cocos2d::backend::VertexFormat)0; /** _format */ - std::size_t arg4 = 0; /** _offset */ - bool arg5 = false; /** needToBeNormallized */ + cocos2d::backend::VertexLayout::Attribute *self = nullptr; + cocos2d::backend::VertexFormat arg1 = (cocos2d::backend::VertexFormat)0; /** format */ - olua_check_string(L, 1, &arg1); - olua_check_integer(L, 2, &arg2); - olua_check_enum(L, 3, &arg3); - olua_check_integer(L, 4, &arg4); - olua_check_bool(L, 5, &arg5); + olua_to_object(L, 1, &self, "ccb.VertexLayout.Attribute"); + olua_check_enum(L, 2, &arg1); - // Attribute(const std::string &_name, std::size_t _index, cocos2d::backend::VertexFormat _format, std::size_t _offset, bool needToBeNormallized) - cocos2d::backend::VertexLayout::Attribute *ret = new cocos2d::backend::VertexLayout::Attribute(arg1, arg2, arg3, arg4, arg5); - int num_ret = olua_push_object(L, ret, "ccb.VertexLayout.Attribute"); - olua_postnew(L, ret); + // cocos2d::backend::VertexFormat format + self->format = arg1; olua_endinvoke(L); - return num_ret; + return 0; } -static int _cocos2d_backend_VertexLayout_Attribute_new(lua_State *L) +static int _olua_fun_cocos2d_backend_VertexLayout_Attribute_format(lua_State *L) { - int num_args = lua_gettop(L); + int num_args = lua_gettop(L) - 1; if (num_args == 0) { - // Attribute() - return _cocos2d_backend_VertexLayout_Attribute_new$1(L); + // cocos2d::backend::VertexFormat format + return _olua_fun_cocos2d_backend_VertexLayout_Attribute_format$1(L); } - if (num_args == 5) { - // if ((olua_is_string(L, 1)) && (olua_is_integer(L, 2)) && (olua_is_enum(L, 3)) && (olua_is_integer(L, 4)) && (olua_is_bool(L, 5))) { - // Attribute(const std::string &_name, std::size_t _index, cocos2d::backend::VertexFormat _format, std::size_t _offset, bool needToBeNormallized) - return _cocos2d_backend_VertexLayout_Attribute_new$2(L); + if (num_args == 1) { + // if ((olua_is_enum(L, 2))) { + // cocos2d::backend::VertexFormat format + return _olua_fun_cocos2d_backend_VertexLayout_Attribute_format$2(L); // } } - luaL_error(L, "method 'cocos2d::backend::VertexLayout::Attribute::new' not support '%d' arguments", num_args); + luaL_error(L, "method 'cocos2d::backend::VertexLayout::Attribute::format' not support '%d' arguments", num_args); return 0; } -static int _cocos2d_backend_VertexLayout_Attribute_get_format(lua_State *L) +static int _olua_fun_cocos2d_backend_VertexLayout_Attribute_index$1(lua_State *L) { olua_startinvoke(L); @@ -15144,34 +16710,55 @@ static int _cocos2d_backend_VertexLayout_Attribute_get_format(lua_State *L) olua_to_object(L, 1, &self, "ccb.VertexLayout.Attribute"); - // @optional cocos2d::backend::VertexFormat format - cocos2d::backend::VertexFormat ret = self->format; - int num_ret = olua_push_enum(L, ret); + // std::size_t index + std::size_t ret = self->index; + int num_ret = olua_push_integer(L, ret); olua_endinvoke(L); return num_ret; } -static int _cocos2d_backend_VertexLayout_Attribute_set_format(lua_State *L) +static int _olua_fun_cocos2d_backend_VertexLayout_Attribute_index$2(lua_State *L) { olua_startinvoke(L); cocos2d::backend::VertexLayout::Attribute *self = nullptr; - cocos2d::backend::VertexFormat arg1 = (cocos2d::backend::VertexFormat)0; /** format */ + std::size_t arg1 = 0; /** index */ olua_to_object(L, 1, &self, "ccb.VertexLayout.Attribute"); - olua_check_enum(L, 2, &arg1); + olua_check_integer(L, 2, &arg1); - // @optional cocos2d::backend::VertexFormat format - self->format = arg1; + // std::size_t index + self->index = arg1; olua_endinvoke(L); return 0; } -static int _cocos2d_backend_VertexLayout_Attribute_get_index(lua_State *L) +static int _olua_fun_cocos2d_backend_VertexLayout_Attribute_index(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // std::size_t index + return _olua_fun_cocos2d_backend_VertexLayout_Attribute_index$1(L); + } + + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // std::size_t index + return _olua_fun_cocos2d_backend_VertexLayout_Attribute_index$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::backend::VertexLayout::Attribute::index' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_backend_VertexLayout_Attribute_name$1(lua_State *L) { olua_startinvoke(L); @@ -15179,34 +16766,55 @@ static int _cocos2d_backend_VertexLayout_Attribute_get_index(lua_State *L) olua_to_object(L, 1, &self, "ccb.VertexLayout.Attribute"); - // @optional std::size_t index - std::size_t ret = self->index; - int num_ret = olua_push_integer(L, ret); + // std::string name + std::string ret = self->name; + int num_ret = olua_push_string(L, ret); olua_endinvoke(L); return num_ret; } -static int _cocos2d_backend_VertexLayout_Attribute_set_index(lua_State *L) +static int _olua_fun_cocos2d_backend_VertexLayout_Attribute_name$2(lua_State *L) { olua_startinvoke(L); cocos2d::backend::VertexLayout::Attribute *self = nullptr; - std::size_t arg1 = 0; /** index */ + std::string arg1; /** name */ olua_to_object(L, 1, &self, "ccb.VertexLayout.Attribute"); - olua_check_integer(L, 2, &arg1); + olua_check_string(L, 2, &arg1); - // @optional std::size_t index - self->index = arg1; + // std::string name + self->name = arg1; olua_endinvoke(L); return 0; } -static int _cocos2d_backend_VertexLayout_Attribute_get_name(lua_State *L) +static int _olua_fun_cocos2d_backend_VertexLayout_Attribute_name(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // std::string name + return _olua_fun_cocos2d_backend_VertexLayout_Attribute_name$1(L); + } + + if (num_args == 1) { + // if ((olua_is_string(L, 2))) { + // std::string name + return _olua_fun_cocos2d_backend_VertexLayout_Attribute_name$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::backend::VertexLayout::Attribute::name' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_backend_VertexLayout_Attribute_needToBeNormallized$1(lua_State *L) { olua_startinvoke(L); @@ -15214,69 +16822,116 @@ static int _cocos2d_backend_VertexLayout_Attribute_get_name(lua_State *L) olua_to_object(L, 1, &self, "ccb.VertexLayout.Attribute"); - // std::string name - std::string ret = self->name; - int num_ret = olua_push_string(L, ret); + // bool needToBeNormallized + bool ret = self->needToBeNormallized; + int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); return num_ret; } -static int _cocos2d_backend_VertexLayout_Attribute_set_name(lua_State *L) +static int _olua_fun_cocos2d_backend_VertexLayout_Attribute_needToBeNormallized$2(lua_State *L) { olua_startinvoke(L); cocos2d::backend::VertexLayout::Attribute *self = nullptr; - std::string arg1; /** name */ + bool arg1 = false; /** needToBeNormallized */ olua_to_object(L, 1, &self, "ccb.VertexLayout.Attribute"); - olua_check_string(L, 2, &arg1); + olua_check_bool(L, 2, &arg1); - // std::string name - self->name = arg1; + // bool needToBeNormallized + self->needToBeNormallized = arg1; olua_endinvoke(L); return 0; } -static int _cocos2d_backend_VertexLayout_Attribute_get_needToBeNormallized(lua_State *L) +static int _olua_fun_cocos2d_backend_VertexLayout_Attribute_needToBeNormallized(lua_State *L) { - olua_startinvoke(L); + int num_args = lua_gettop(L) - 1; - cocos2d::backend::VertexLayout::Attribute *self = nullptr; + if (num_args == 0) { + // bool needToBeNormallized + return _olua_fun_cocos2d_backend_VertexLayout_Attribute_needToBeNormallized$1(L); + } - olua_to_object(L, 1, &self, "ccb.VertexLayout.Attribute"); + if (num_args == 1) { + // if ((olua_is_bool(L, 2))) { + // bool needToBeNormallized + return _olua_fun_cocos2d_backend_VertexLayout_Attribute_needToBeNormallized$2(L); + // } + } - // @optional bool needToBeNormallized - bool ret = self->needToBeNormallized; - int num_ret = olua_push_bool(L, ret); + luaL_error(L, "method 'cocos2d::backend::VertexLayout::Attribute::needToBeNormallized' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_backend_VertexLayout_Attribute_new$1(lua_State *L) +{ + olua_startinvoke(L); + + // cocos2d::backend::VertexLayout::Attribute() + cocos2d::backend::VertexLayout::Attribute *ret = new cocos2d::backend::VertexLayout::Attribute(); + int num_ret = olua_push_object(L, ret, "ccb.VertexLayout.Attribute"); + olua_postnew(L, ret); olua_endinvoke(L); return num_ret; } -static int _cocos2d_backend_VertexLayout_Attribute_set_needToBeNormallized(lua_State *L) +static int _olua_fun_cocos2d_backend_VertexLayout_Attribute_new$2(lua_State *L) { olua_startinvoke(L); - cocos2d::backend::VertexLayout::Attribute *self = nullptr; - bool arg1 = false; /** needToBeNormallized */ + std::string arg1; /** _name */ + std::size_t arg2 = 0; /** _index */ + cocos2d::backend::VertexFormat arg3 = (cocos2d::backend::VertexFormat)0; /** _format */ + std::size_t arg4 = 0; /** _offset */ + bool arg5 = false; /** needToBeNormallized */ - olua_to_object(L, 1, &self, "ccb.VertexLayout.Attribute"); - olua_check_bool(L, 2, &arg1); + olua_check_string(L, 1, &arg1); + olua_check_integer(L, 2, &arg2); + olua_check_enum(L, 3, &arg3); + olua_check_integer(L, 4, &arg4); + olua_check_bool(L, 5, &arg5); - // @optional bool needToBeNormallized - self->needToBeNormallized = arg1; + // cocos2d::backend::VertexLayout::Attribute(const std::string &_name, std::size_t _index, cocos2d::backend::VertexFormat _format, std::size_t _offset, bool needToBeNormallized) + cocos2d::backend::VertexLayout::Attribute *ret = new cocos2d::backend::VertexLayout::Attribute(arg1, arg2, arg3, arg4, arg5); + int num_ret = olua_push_object(L, ret, "ccb.VertexLayout.Attribute"); + olua_postnew(L, ret); olua_endinvoke(L); + return num_ret; +} + +static int _olua_fun_cocos2d_backend_VertexLayout_Attribute_new(lua_State *L) +{ + int num_args = lua_gettop(L); + + if (num_args == 0) { + // cocos2d::backend::VertexLayout::Attribute() + return _olua_fun_cocos2d_backend_VertexLayout_Attribute_new$1(L); + } + + if (num_args == 5) { + // if ((olua_is_string(L, 1)) && (olua_is_integer(L, 2)) && (olua_is_enum(L, 3)) && (olua_is_integer(L, 4)) && (olua_is_bool(L, 5))) { + // cocos2d::backend::VertexLayout::Attribute(const std::string &_name, std::size_t _index, cocos2d::backend::VertexFormat _format, std::size_t _offset, bool needToBeNormallized) + return _olua_fun_cocos2d_backend_VertexLayout_Attribute_new$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::backend::VertexLayout::Attribute::new' not support '%d' arguments", num_args); + return 0; } -static int _cocos2d_backend_VertexLayout_Attribute_get_offset(lua_State *L) +static int _olua_fun_cocos2d_backend_VertexLayout_Attribute_offset$1(lua_State *L) { olua_startinvoke(L); @@ -15284,7 +16939,7 @@ static int _cocos2d_backend_VertexLayout_Attribute_get_offset(lua_State *L) olua_to_object(L, 1, &self, "ccb.VertexLayout.Attribute"); - // @optional std::size_t offset + // std::size_t offset std::size_t ret = self->offset; int num_ret = olua_push_integer(L, ret); @@ -15293,7 +16948,7 @@ static int _cocos2d_backend_VertexLayout_Attribute_get_offset(lua_State *L) return num_ret; } -static int _cocos2d_backend_VertexLayout_Attribute_set_offset(lua_State *L) +static int _olua_fun_cocos2d_backend_VertexLayout_Attribute_offset$2(lua_State *L) { olua_startinvoke(L); @@ -15303,7 +16958,7 @@ static int _cocos2d_backend_VertexLayout_Attribute_set_offset(lua_State *L) olua_to_object(L, 1, &self, "ccb.VertexLayout.Attribute"); olua_check_integer(L, 2, &arg1); - // @optional std::size_t offset + // std::size_t offset self->offset = arg1; olua_endinvoke(L); @@ -15311,31 +16966,60 @@ static int _cocos2d_backend_VertexLayout_Attribute_set_offset(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_backend_VertexLayout_Attribute(lua_State *L) +static int _olua_fun_cocos2d_backend_VertexLayout_Attribute_offset(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // std::size_t offset + return _olua_fun_cocos2d_backend_VertexLayout_Attribute_offset$1(L); + } + + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // std::size_t offset + return _olua_fun_cocos2d_backend_VertexLayout_Attribute_offset$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::backend::VertexLayout::Attribute::offset' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_cls_ccb_VertexLayout_Attribute(lua_State *L) { oluacls_class(L, "ccb.VertexLayout.Attribute"); - oluacls_func(L, "__call", _cocos2d_backend_VertexLayout_Attribute___call); - oluacls_func(L, "__gc", _cocos2d_backend_VertexLayout_Attribute___gc); - oluacls_func(L, "__olua_move", _cocos2d_backend_VertexLayout_Attribute___olua_move); - oluacls_func(L, "new", _cocos2d_backend_VertexLayout_Attribute_new); - oluacls_prop(L, "format", _cocos2d_backend_VertexLayout_Attribute_get_format, _cocos2d_backend_VertexLayout_Attribute_set_format); - oluacls_prop(L, "index", _cocos2d_backend_VertexLayout_Attribute_get_index, _cocos2d_backend_VertexLayout_Attribute_set_index); - oluacls_prop(L, "name", _cocos2d_backend_VertexLayout_Attribute_get_name, _cocos2d_backend_VertexLayout_Attribute_set_name); - oluacls_prop(L, "needToBeNormallized", _cocos2d_backend_VertexLayout_Attribute_get_needToBeNormallized, _cocos2d_backend_VertexLayout_Attribute_set_needToBeNormallized); - oluacls_prop(L, "offset", _cocos2d_backend_VertexLayout_Attribute_get_offset, _cocos2d_backend_VertexLayout_Attribute_set_offset); + oluacls_func(L, "__gc", _olua_fun_cocos2d_backend_VertexLayout_Attribute___gc); + oluacls_func(L, "__olua_move", _olua_fun_cocos2d_backend_VertexLayout_Attribute___olua_move); + oluacls_func(L, "new", _olua_fun_cocos2d_backend_VertexLayout_Attribute_new); + oluacls_prop(L, "format", _olua_fun_cocos2d_backend_VertexLayout_Attribute_format, _olua_fun_cocos2d_backend_VertexLayout_Attribute_format); + oluacls_prop(L, "index", _olua_fun_cocos2d_backend_VertexLayout_Attribute_index, _olua_fun_cocos2d_backend_VertexLayout_Attribute_index); + oluacls_prop(L, "name", _olua_fun_cocos2d_backend_VertexLayout_Attribute_name, _olua_fun_cocos2d_backend_VertexLayout_Attribute_name); + oluacls_prop(L, "needToBeNormallized", _olua_fun_cocos2d_backend_VertexLayout_Attribute_needToBeNormallized, _olua_fun_cocos2d_backend_VertexLayout_Attribute_needToBeNormallized); + oluacls_prop(L, "offset", _olua_fun_cocos2d_backend_VertexLayout_Attribute_offset, _olua_fun_cocos2d_backend_VertexLayout_Attribute_offset); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccb_VertexLayout_Attribute(lua_State *L) +{ + olua_require(L, "cocos2d_types", luaopen_cocos2d_types); + if (!olua_getclass(L, "ccb.VertexLayout.Attribute")) { + luaL_error(L, "class not found: cocos2d::backend::VertexLayout::Attribute"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_types_VectorString___gc(lua_State *L) +static int _olua_fun_cocos2d_types_VectorString___gc(lua_State *L) { olua_startinvoke(L); cocos2d::types::VectorString *self = nullptr; - olua_to_object(L, 1, &self, "cc.VectorString"); + olua_to_object(L, 1, &self, "cc.types.VectorString"); // olua_Return __gc(lua_State *L) olua_Return ret = self->__gc(L); @@ -15345,14 +17029,14 @@ static int _cocos2d_types_VectorString___gc(lua_State *L) return (int)ret; } -static int _cocos2d_types_VectorString___index(lua_State *L) +static int _olua_fun_cocos2d_types_VectorString___index(lua_State *L) { olua_startinvoke(L); cocos2d::types::VectorString *self = nullptr; unsigned int arg1 = 0; /** idx */ - olua_to_object(L, 1, &self, "cc.VectorString"); + olua_to_object(L, 1, &self, "cc.types.VectorString"); olua_check_integer(L, 2, &arg1); // std::vector __index(unsigned int idx) @@ -15366,7 +17050,7 @@ static int _cocos2d_types_VectorString___index(lua_State *L) return num_ret; } -static int _cocos2d_types_VectorString___newindex(lua_State *L) +static int _olua_fun_cocos2d_types_VectorString___newindex(lua_State *L) { olua_startinvoke(L); @@ -15374,7 +17058,7 @@ static int _cocos2d_types_VectorString___newindex(lua_State *L) unsigned int arg1 = 0; /** idx */ std::vector arg2; /** v */ - olua_to_object(L, 1, &self, "cc.VectorString"); + olua_to_object(L, 1, &self, "cc.types.VectorString"); olua_check_integer(L, 2, &arg1); olua_check_array(L, 3, arg2, [L](std::string *arg1) { olua_check_string(L, -1, arg1); @@ -15388,39 +17072,53 @@ static int _cocos2d_types_VectorString___newindex(lua_State *L) return 0; } -static int _cocos2d_types_VectorString___olua_move(lua_State *L) +static int _olua_fun_cocos2d_types_VectorString___olua_move(lua_State *L) { olua_startinvoke(L); - auto self = (cocos2d::types::VectorString *)olua_toobj(L, 1, "cc.VectorString"); - olua_push_object(L, self, "cc.VectorString"); + auto self = (cocos2d::types::VectorString *)olua_toobj(L, 1, "cc.types.VectorString"); + olua_push_object(L, self, "cc.types.VectorString"); olua_endinvoke(L); return 1; } -static int _cocos2d_types_VectorString_assign(lua_State *L) +static int _olua_fun_cocos2d_types_VectorString_buffer(lua_State *L) { olua_startinvoke(L); cocos2d::types::VectorString *self = nullptr; - const char *arg1 = nullptr; /** data */ - size_t arg2 = 0; /** len */ - olua_to_object(L, 1, &self, "cc.VectorString"); - olua_check_string(L, 2, &arg1); - olua_check_integer(L, 3, &arg2); + olua_to_object(L, 1, &self, "cc.types.VectorString"); - // void assign(const char *data, size_t len) - self->assign(arg1, arg2); + // @getter @name(buffer) @type(void *) std::vector *buffer() + void *ret = self->buffer(); + int num_ret = olua_push_object(L, ret, "void *"); olua_endinvoke(L); - return 0; + return num_ret; +} + +static int _olua_fun_cocos2d_types_VectorString_length(lua_State *L) +{ + olua_startinvoke(L); + + cocos2d::types::VectorString *self = nullptr; + + olua_to_object(L, 1, &self, "cc.types.VectorString"); + + // @getter @name(length) size_t length() + size_t ret = self->length(); + int num_ret = olua_push_integer(L, ret); + + olua_endinvoke(L); + + return num_ret; } -static int _cocos2d_types_VectorString_create$1(lua_State *L) +static int _olua_fun_cocos2d_types_VectorString_new$1(lua_State *L) { olua_startinvoke(L); @@ -15430,7 +17128,7 @@ static int _cocos2d_types_VectorString_create$1(lua_State *L) // @postnew @name(new) static cocos2d::types::VectorString *create(@optional size_t len) cocos2d::types::VectorString *ret = cocos2d::types::VectorString::create(arg1); - int num_ret = olua_push_object(L, ret, "cc.VectorString"); + int num_ret = olua_push_object(L, ret, "cc.types.VectorString"); // insert code after call olua_postnew(L, ret); @@ -15440,13 +17138,13 @@ static int _cocos2d_types_VectorString_create$1(lua_State *L) return num_ret; } -static int _cocos2d_types_VectorString_create$2(lua_State *L) +static int _olua_fun_cocos2d_types_VectorString_new$2(lua_State *L) { olua_startinvoke(L); - // @postnew @name(new) static cocos2d::types::VectorString *create(@optional size_t len) + // @postnew @name(new) static cocos2d::types::VectorString *create() cocos2d::types::VectorString *ret = cocos2d::types::VectorString::create(); - int num_ret = olua_push_object(L, ret, "cc.VectorString"); + int num_ret = olua_push_object(L, ret, "cc.types.VectorString"); // insert code after call olua_postnew(L, ret); @@ -15456,28 +17154,28 @@ static int _cocos2d_types_VectorString_create$2(lua_State *L) return num_ret; } -static int _cocos2d_types_VectorString_create(lua_State *L) +static int _olua_fun_cocos2d_types_VectorString_new(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 0) { - // @postnew @name(new) static cocos2d::types::VectorString *create(@optional size_t len) - return _cocos2d_types_VectorString_create$2(L); + // @postnew @name(new) static cocos2d::types::VectorString *create() + return _olua_fun_cocos2d_types_VectorString_new$2(L); } if (num_args == 1) { // if ((olua_is_integer(L, 1))) { // @postnew @name(new) static cocos2d::types::VectorString *create(@optional size_t len) - return _cocos2d_types_VectorString_create$1(L); + return _olua_fun_cocos2d_types_VectorString_new$1(L); // } } - luaL_error(L, "method 'cocos2d::types::VectorString::create' not support '%d' arguments", num_args); + luaL_error(L, "method 'cocos2d::types::VectorString::new' not support '%d' arguments", num_args); return 0; } -static int _cocos2d_types_VectorString_slice$1(lua_State *L) +static int _olua_fun_cocos2d_types_VectorString_slice$1(lua_State *L) { olua_startinvoke(L); @@ -15485,13 +17183,13 @@ static int _cocos2d_types_VectorString_slice$1(lua_State *L) size_t arg1 = 0; /** from */ size_t arg2 = 0; /** to */ - olua_to_object(L, 1, &self, "cc.VectorString"); + olua_to_object(L, 1, &self, "cc.types.VectorString"); olua_check_integer(L, 2, &arg1); olua_check_integer(L, 3, &arg2); // @postnew cocos2d::types::VectorString *slice(size_t from, @optional size_t to) cocos2d::types::VectorString *ret = self->slice(arg1, arg2); - int num_ret = olua_push_object(L, ret, "cc.VectorString"); + int num_ret = olua_push_object(L, ret, "cc.types.VectorString"); // insert code after call olua_postnew(L, ret); @@ -15501,19 +17199,19 @@ static int _cocos2d_types_VectorString_slice$1(lua_State *L) return num_ret; } -static int _cocos2d_types_VectorString_slice$2(lua_State *L) +static int _olua_fun_cocos2d_types_VectorString_slice$2(lua_State *L) { olua_startinvoke(L); cocos2d::types::VectorString *self = nullptr; size_t arg1 = 0; /** from */ - olua_to_object(L, 1, &self, "cc.VectorString"); + olua_to_object(L, 1, &self, "cc.types.VectorString"); olua_check_integer(L, 2, &arg1); - // @postnew cocos2d::types::VectorString *slice(size_t from, @optional size_t to) + // @postnew cocos2d::types::VectorString *slice(size_t from) cocos2d::types::VectorString *ret = self->slice(arg1); - int num_ret = olua_push_object(L, ret, "cc.VectorString"); + int num_ret = olua_push_object(L, ret, "cc.types.VectorString"); // insert code after call olua_postnew(L, ret); @@ -15523,21 +17221,21 @@ static int _cocos2d_types_VectorString_slice$2(lua_State *L) return num_ret; } -static int _cocos2d_types_VectorString_slice(lua_State *L) +static int _olua_fun_cocos2d_types_VectorString_slice(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_integer(L, 2))) { - // @postnew cocos2d::types::VectorString *slice(size_t from, @optional size_t to) - return _cocos2d_types_VectorString_slice$2(L); + // @postnew cocos2d::types::VectorString *slice(size_t from) + return _olua_fun_cocos2d_types_VectorString_slice$2(L); // } } if (num_args == 2) { // if ((olua_is_integer(L, 2)) && (olua_is_integer(L, 3))) { // @postnew cocos2d::types::VectorString *slice(size_t from, @optional size_t to) - return _cocos2d_types_VectorString_slice$1(L); + return _olua_fun_cocos2d_types_VectorString_slice$1(L); // } } @@ -15546,7 +17244,7 @@ static int _cocos2d_types_VectorString_slice(lua_State *L) return 0; } -static int _cocos2d_types_VectorString_sub$1(lua_State *L) +static int _olua_fun_cocos2d_types_VectorString_sub$1(lua_State *L) { olua_startinvoke(L); @@ -15554,13 +17252,13 @@ static int _cocos2d_types_VectorString_sub$1(lua_State *L) size_t arg1 = 0; /** from */ size_t arg2 = 0; /** to */ - olua_to_object(L, 1, &self, "cc.VectorString"); + olua_to_object(L, 1, &self, "cc.types.VectorString"); olua_check_integer(L, 2, &arg1); olua_check_integer(L, 3, &arg2); // @postnew cocos2d::types::VectorString *sub(size_t from, @optional size_t to) cocos2d::types::VectorString *ret = self->sub(arg1, arg2); - int num_ret = olua_push_object(L, ret, "cc.VectorString"); + int num_ret = olua_push_object(L, ret, "cc.types.VectorString"); // insert code after call olua_postnew(L, ret); @@ -15570,19 +17268,19 @@ static int _cocos2d_types_VectorString_sub$1(lua_State *L) return num_ret; } -static int _cocos2d_types_VectorString_sub$2(lua_State *L) +static int _olua_fun_cocos2d_types_VectorString_sub$2(lua_State *L) { olua_startinvoke(L); cocos2d::types::VectorString *self = nullptr; size_t arg1 = 0; /** from */ - olua_to_object(L, 1, &self, "cc.VectorString"); + olua_to_object(L, 1, &self, "cc.types.VectorString"); olua_check_integer(L, 2, &arg1); - // @postnew cocos2d::types::VectorString *sub(size_t from, @optional size_t to) + // @postnew cocos2d::types::VectorString *sub(size_t from) cocos2d::types::VectorString *ret = self->sub(arg1); - int num_ret = olua_push_object(L, ret, "cc.VectorString"); + int num_ret = olua_push_object(L, ret, "cc.types.VectorString"); // insert code after call olua_postnew(L, ret); @@ -15592,21 +17290,21 @@ static int _cocos2d_types_VectorString_sub$2(lua_State *L) return num_ret; } -static int _cocos2d_types_VectorString_sub(lua_State *L) +static int _olua_fun_cocos2d_types_VectorString_sub(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_integer(L, 2))) { - // @postnew cocos2d::types::VectorString *sub(size_t from, @optional size_t to) - return _cocos2d_types_VectorString_sub$2(L); + // @postnew cocos2d::types::VectorString *sub(size_t from) + return _olua_fun_cocos2d_types_VectorString_sub$2(L); // } } if (num_args == 2) { // if ((olua_is_integer(L, 2)) && (olua_is_integer(L, 3))) { // @postnew cocos2d::types::VectorString *sub(size_t from, @optional size_t to) - return _cocos2d_types_VectorString_sub$1(L); + return _olua_fun_cocos2d_types_VectorString_sub$1(L); // } } @@ -15615,31 +17313,31 @@ static int _cocos2d_types_VectorString_sub(lua_State *L) return 0; } -static int _cocos2d_types_VectorString_take(lua_State *L) +static int _olua_fun_cocos2d_types_VectorString_take(lua_State *L) { olua_startinvoke(L); cocos2d::types::VectorString *self = nullptr; - olua_to_object(L, 1, &self, "cc.VectorString"); + olua_to_object(L, 1, &self, "cc.types.VectorString"); // cocos2d::types::VectorString *take() cocos2d::types::VectorString *ret = self->take(); - int num_ret = olua_push_object(L, ret, "cc.VectorString"); + int num_ret = olua_push_object(L, ret, "cc.types.VectorString"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_types_VectorString_tostring(lua_State *L) +static int _olua_fun_cocos2d_types_VectorString_tostring(lua_State *L) { olua_startinvoke(L); cocos2d::types::VectorString *self = nullptr; size_t arg2 = 0; /** len */ - olua_to_object(L, 1, &self, "cc.VectorString"); + olua_to_object(L, 1, &self, "cc.types.VectorString"); olua_check_integer(L, 2, &arg2); // olua_Return tostring(lua_State *L, size_t len) @@ -15650,106 +17348,103 @@ static int _cocos2d_types_VectorString_tostring(lua_State *L) return (int)ret; } -static int _cocos2d_types_VectorString_length(lua_State *L) +static int _olua_fun_cocos2d_types_VectorString_value$1(lua_State *L) { olua_startinvoke(L); cocos2d::types::VectorString *self = nullptr; - olua_to_object(L, 1, &self, "cc.VectorString"); + olua_to_object(L, 1, &self, "cc.types.VectorString"); - // @getter @name(length) size_t length() - size_t ret = self->length(); - int num_ret = olua_push_integer(L, ret); + // @getter @name(value) const std::vector &value() + const std::vector &ret = self->value(); + int num_ret = olua_push_array(L, ret, [L](std::string &arg1) { + olua_push_string(L, arg1); + }); olua_endinvoke(L); return num_ret; } -static int _cocos2d_types_VectorString_rawdata(lua_State *L) +static int _olua_fun_cocos2d_types_VectorString_value$2(lua_State *L) { olua_startinvoke(L); cocos2d::types::VectorString *self = nullptr; + std::vector arg1; /** v */ - olua_to_object(L, 1, &self, "cc.VectorString"); + olua_to_object(L, 1, &self, "cc.types.VectorString"); + olua_check_array(L, 2, arg1, [L](std::string *arg1) { + olua_check_string(L, -1, arg1); + }); - // @getter @name(rawdata) void *rawdata() - void *ret = self->rawdata(); - int num_ret = olua_push_object(L, ret, "void *"); + // @setter @name(value) void value(const std::vector &v) + self->value(arg1); olua_endinvoke(L); - return num_ret; + return 0; } -static int _cocos2d_types_VectorString_size(lua_State *L) +static int _olua_fun_cocos2d_types_VectorString_value(lua_State *L) { - olua_startinvoke(L); - - cocos2d::types::VectorString *self = nullptr; + int num_args = lua_gettop(L) - 1; - olua_to_object(L, 1, &self, "cc.VectorString"); + if (num_args == 0) { + // @getter @name(value) const std::vector &value() + return _olua_fun_cocos2d_types_VectorString_value$1(L); + } - // @getter @name(sizeof) size_t size() - size_t ret = self->size(); - int num_ret = olua_push_integer(L, ret); + if (num_args == 1) { + // if ((olua_is_array(L, 2))) { + // @setter @name(value) void value(const std::vector &v) + return _olua_fun_cocos2d_types_VectorString_value$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'cocos2d::types::VectorString::value' not support '%d' arguments", num_args); - return num_ret; + return 0; } -static int _cocos2d_types_VectorString_value(lua_State *L) +static int _olua_cls_cc_types_VectorString(lua_State *L) { - olua_startinvoke(L); - - cocos2d::types::VectorString *self = nullptr; - - olua_to_object(L, 1, &self, "cc.VectorString"); - - // @getter @name(value) const std::vector &value() - const std::vector &ret = self->value(); - int num_ret = olua_push_array(L, ret, [L](std::string &arg1) { - olua_push_string(L, arg1); - }); - - olua_endinvoke(L); + oluacls_class(L, "cc.types.VectorString"); + oluacls_func(L, "__gc", _olua_fun_cocos2d_types_VectorString___gc); + oluacls_func(L, "__index", _olua_fun_cocos2d_types_VectorString___index); + oluacls_func(L, "__newindex", _olua_fun_cocos2d_types_VectorString___newindex); + oluacls_func(L, "__olua_move", _olua_fun_cocos2d_types_VectorString___olua_move); + oluacls_func(L, "new", _olua_fun_cocos2d_types_VectorString_new); + oluacls_func(L, "slice", _olua_fun_cocos2d_types_VectorString_slice); + oluacls_func(L, "sub", _olua_fun_cocos2d_types_VectorString_sub); + oluacls_func(L, "take", _olua_fun_cocos2d_types_VectorString_take); + oluacls_func(L, "tostring", _olua_fun_cocos2d_types_VectorString_tostring); + oluacls_prop(L, "buffer", _olua_fun_cocos2d_types_VectorString_buffer, nullptr); + oluacls_prop(L, "length", _olua_fun_cocos2d_types_VectorString_length, nullptr); + oluacls_prop(L, "value", _olua_fun_cocos2d_types_VectorString_value, _olua_fun_cocos2d_types_VectorString_value); - return num_ret; + return 1; } OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_types_VectorString(lua_State *L) -{ - oluacls_class(L, "cc.VectorString"); - oluacls_func(L, "__gc", _cocos2d_types_VectorString___gc); - oluacls_func(L, "__index", _cocos2d_types_VectorString___index); - oluacls_func(L, "__newindex", _cocos2d_types_VectorString___newindex); - oluacls_func(L, "__olua_move", _cocos2d_types_VectorString___olua_move); - oluacls_func(L, "assign", _cocos2d_types_VectorString_assign); - oluacls_func(L, "new", _cocos2d_types_VectorString_create); - oluacls_func(L, "slice", _cocos2d_types_VectorString_slice); - oluacls_func(L, "sub", _cocos2d_types_VectorString_sub); - oluacls_func(L, "take", _cocos2d_types_VectorString_take); - oluacls_func(L, "tostring", _cocos2d_types_VectorString_tostring); - oluacls_prop(L, "length", _cocos2d_types_VectorString_length, _cocos2d_types_VectorString_length); - oluacls_prop(L, "rawdata", _cocos2d_types_VectorString_rawdata, nullptr); - oluacls_prop(L, "sizeof", _cocos2d_types_VectorString_size, nullptr); - oluacls_prop(L, "value", _cocos2d_types_VectorString_value, _cocos2d_types_VectorString_value); - +OLUA_LIB int luaopen_cc_types_VectorString(lua_State *L) +{ + olua_require(L, "cocos2d_types", luaopen_cocos2d_types); + if (!olua_getclass(L, "cc.types.VectorString")) { + luaL_error(L, "class not found: cocos2d::types::VectorString"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_types_VectorInt___gc(lua_State *L) +static int _olua_fun_cocos2d_types_VectorInt___gc(lua_State *L) { olua_startinvoke(L); cocos2d::types::VectorInt *self = nullptr; - olua_to_object(L, 1, &self, "cc.VectorInt"); + olua_to_object(L, 1, &self, "cc.types.VectorInt"); // olua_Return __gc(lua_State *L) olua_Return ret = self->__gc(L); @@ -15759,14 +17454,14 @@ static int _cocos2d_types_VectorInt___gc(lua_State *L) return (int)ret; } -static int _cocos2d_types_VectorInt___index(lua_State *L) +static int _olua_fun_cocos2d_types_VectorInt___index(lua_State *L) { olua_startinvoke(L); cocos2d::types::VectorInt *self = nullptr; unsigned int arg1 = 0; /** idx */ - olua_to_object(L, 1, &self, "cc.VectorInt"); + olua_to_object(L, 1, &self, "cc.types.VectorInt"); olua_check_integer(L, 2, &arg1); // std::vector __index(unsigned int idx) @@ -15780,7 +17475,7 @@ static int _cocos2d_types_VectorInt___index(lua_State *L) return num_ret; } -static int _cocos2d_types_VectorInt___newindex(lua_State *L) +static int _olua_fun_cocos2d_types_VectorInt___newindex(lua_State *L) { olua_startinvoke(L); @@ -15788,7 +17483,7 @@ static int _cocos2d_types_VectorInt___newindex(lua_State *L) unsigned int arg1 = 0; /** idx */ std::vector arg2; /** v */ - olua_to_object(L, 1, &self, "cc.VectorInt"); + olua_to_object(L, 1, &self, "cc.types.VectorInt"); olua_check_integer(L, 2, &arg1); olua_check_array(L, 3, arg2, [L](int *arg1) { olua_check_integer(L, -1, arg1); @@ -15802,39 +17497,53 @@ static int _cocos2d_types_VectorInt___newindex(lua_State *L) return 0; } -static int _cocos2d_types_VectorInt___olua_move(lua_State *L) +static int _olua_fun_cocos2d_types_VectorInt___olua_move(lua_State *L) +{ + olua_startinvoke(L); + + auto self = (cocos2d::types::VectorInt *)olua_toobj(L, 1, "cc.types.VectorInt"); + olua_push_object(L, self, "cc.types.VectorInt"); + + olua_endinvoke(L); + + return 1; +} + +static int _olua_fun_cocos2d_types_VectorInt_buffer(lua_State *L) { olua_startinvoke(L); - auto self = (cocos2d::types::VectorInt *)olua_toobj(L, 1, "cc.VectorInt"); - olua_push_object(L, self, "cc.VectorInt"); + cocos2d::types::VectorInt *self = nullptr; + + olua_to_object(L, 1, &self, "cc.types.VectorInt"); + + // @getter @name(buffer) @type(void *) std::vector *buffer() + void *ret = self->buffer(); + int num_ret = olua_push_object(L, ret, "void *"); olua_endinvoke(L); - return 1; + return num_ret; } -static int _cocos2d_types_VectorInt_assign(lua_State *L) +static int _olua_fun_cocos2d_types_VectorInt_length(lua_State *L) { olua_startinvoke(L); cocos2d::types::VectorInt *self = nullptr; - const char *arg1 = nullptr; /** data */ - size_t arg2 = 0; /** len */ - olua_to_object(L, 1, &self, "cc.VectorInt"); - olua_check_string(L, 2, &arg1); - olua_check_integer(L, 3, &arg2); + olua_to_object(L, 1, &self, "cc.types.VectorInt"); - // void assign(const char *data, size_t len) - self->assign(arg1, arg2); + // @getter @name(length) size_t length() + size_t ret = self->length(); + int num_ret = olua_push_integer(L, ret); olua_endinvoke(L); - return 0; + return num_ret; } -static int _cocos2d_types_VectorInt_create$1(lua_State *L) +static int _olua_fun_cocos2d_types_VectorInt_new$1(lua_State *L) { olua_startinvoke(L); @@ -15844,7 +17553,7 @@ static int _cocos2d_types_VectorInt_create$1(lua_State *L) // @postnew @name(new) static cocos2d::types::VectorInt *create(@optional size_t len) cocos2d::types::VectorInt *ret = cocos2d::types::VectorInt::create(arg1); - int num_ret = olua_push_object(L, ret, "cc.VectorInt"); + int num_ret = olua_push_object(L, ret, "cc.types.VectorInt"); // insert code after call olua_postnew(L, ret); @@ -15854,13 +17563,13 @@ static int _cocos2d_types_VectorInt_create$1(lua_State *L) return num_ret; } -static int _cocos2d_types_VectorInt_create$2(lua_State *L) +static int _olua_fun_cocos2d_types_VectorInt_new$2(lua_State *L) { olua_startinvoke(L); - // @postnew @name(new) static cocos2d::types::VectorInt *create(@optional size_t len) + // @postnew @name(new) static cocos2d::types::VectorInt *create() cocos2d::types::VectorInt *ret = cocos2d::types::VectorInt::create(); - int num_ret = olua_push_object(L, ret, "cc.VectorInt"); + int num_ret = olua_push_object(L, ret, "cc.types.VectorInt"); // insert code after call olua_postnew(L, ret); @@ -15870,28 +17579,28 @@ static int _cocos2d_types_VectorInt_create$2(lua_State *L) return num_ret; } -static int _cocos2d_types_VectorInt_create(lua_State *L) +static int _olua_fun_cocos2d_types_VectorInt_new(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 0) { - // @postnew @name(new) static cocos2d::types::VectorInt *create(@optional size_t len) - return _cocos2d_types_VectorInt_create$2(L); + // @postnew @name(new) static cocos2d::types::VectorInt *create() + return _olua_fun_cocos2d_types_VectorInt_new$2(L); } if (num_args == 1) { // if ((olua_is_integer(L, 1))) { // @postnew @name(new) static cocos2d::types::VectorInt *create(@optional size_t len) - return _cocos2d_types_VectorInt_create$1(L); + return _olua_fun_cocos2d_types_VectorInt_new$1(L); // } } - luaL_error(L, "method 'cocos2d::types::VectorInt::create' not support '%d' arguments", num_args); + luaL_error(L, "method 'cocos2d::types::VectorInt::new' not support '%d' arguments", num_args); return 0; } -static int _cocos2d_types_VectorInt_slice$1(lua_State *L) +static int _olua_fun_cocos2d_types_VectorInt_slice$1(lua_State *L) { olua_startinvoke(L); @@ -15899,13 +17608,13 @@ static int _cocos2d_types_VectorInt_slice$1(lua_State *L) size_t arg1 = 0; /** from */ size_t arg2 = 0; /** to */ - olua_to_object(L, 1, &self, "cc.VectorInt"); + olua_to_object(L, 1, &self, "cc.types.VectorInt"); olua_check_integer(L, 2, &arg1); olua_check_integer(L, 3, &arg2); // @postnew cocos2d::types::VectorInt *slice(size_t from, @optional size_t to) cocos2d::types::VectorInt *ret = self->slice(arg1, arg2); - int num_ret = olua_push_object(L, ret, "cc.VectorInt"); + int num_ret = olua_push_object(L, ret, "cc.types.VectorInt"); // insert code after call olua_postnew(L, ret); @@ -15915,19 +17624,19 @@ static int _cocos2d_types_VectorInt_slice$1(lua_State *L) return num_ret; } -static int _cocos2d_types_VectorInt_slice$2(lua_State *L) +static int _olua_fun_cocos2d_types_VectorInt_slice$2(lua_State *L) { olua_startinvoke(L); cocos2d::types::VectorInt *self = nullptr; size_t arg1 = 0; /** from */ - olua_to_object(L, 1, &self, "cc.VectorInt"); + olua_to_object(L, 1, &self, "cc.types.VectorInt"); olua_check_integer(L, 2, &arg1); - // @postnew cocos2d::types::VectorInt *slice(size_t from, @optional size_t to) + // @postnew cocos2d::types::VectorInt *slice(size_t from) cocos2d::types::VectorInt *ret = self->slice(arg1); - int num_ret = olua_push_object(L, ret, "cc.VectorInt"); + int num_ret = olua_push_object(L, ret, "cc.types.VectorInt"); // insert code after call olua_postnew(L, ret); @@ -15937,21 +17646,21 @@ static int _cocos2d_types_VectorInt_slice$2(lua_State *L) return num_ret; } -static int _cocos2d_types_VectorInt_slice(lua_State *L) +static int _olua_fun_cocos2d_types_VectorInt_slice(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_integer(L, 2))) { - // @postnew cocos2d::types::VectorInt *slice(size_t from, @optional size_t to) - return _cocos2d_types_VectorInt_slice$2(L); + // @postnew cocos2d::types::VectorInt *slice(size_t from) + return _olua_fun_cocos2d_types_VectorInt_slice$2(L); // } } if (num_args == 2) { // if ((olua_is_integer(L, 2)) && (olua_is_integer(L, 3))) { // @postnew cocos2d::types::VectorInt *slice(size_t from, @optional size_t to) - return _cocos2d_types_VectorInt_slice$1(L); + return _olua_fun_cocos2d_types_VectorInt_slice$1(L); // } } @@ -15960,7 +17669,7 @@ static int _cocos2d_types_VectorInt_slice(lua_State *L) return 0; } -static int _cocos2d_types_VectorInt_sub$1(lua_State *L) +static int _olua_fun_cocos2d_types_VectorInt_sub$1(lua_State *L) { olua_startinvoke(L); @@ -15968,13 +17677,13 @@ static int _cocos2d_types_VectorInt_sub$1(lua_State *L) size_t arg1 = 0; /** from */ size_t arg2 = 0; /** to */ - olua_to_object(L, 1, &self, "cc.VectorInt"); + olua_to_object(L, 1, &self, "cc.types.VectorInt"); olua_check_integer(L, 2, &arg1); olua_check_integer(L, 3, &arg2); // @postnew cocos2d::types::VectorInt *sub(size_t from, @optional size_t to) cocos2d::types::VectorInt *ret = self->sub(arg1, arg2); - int num_ret = olua_push_object(L, ret, "cc.VectorInt"); + int num_ret = olua_push_object(L, ret, "cc.types.VectorInt"); // insert code after call olua_postnew(L, ret); @@ -15984,19 +17693,19 @@ static int _cocos2d_types_VectorInt_sub$1(lua_State *L) return num_ret; } -static int _cocos2d_types_VectorInt_sub$2(lua_State *L) +static int _olua_fun_cocos2d_types_VectorInt_sub$2(lua_State *L) { olua_startinvoke(L); cocos2d::types::VectorInt *self = nullptr; size_t arg1 = 0; /** from */ - olua_to_object(L, 1, &self, "cc.VectorInt"); + olua_to_object(L, 1, &self, "cc.types.VectorInt"); olua_check_integer(L, 2, &arg1); - // @postnew cocos2d::types::VectorInt *sub(size_t from, @optional size_t to) + // @postnew cocos2d::types::VectorInt *sub(size_t from) cocos2d::types::VectorInt *ret = self->sub(arg1); - int num_ret = olua_push_object(L, ret, "cc.VectorInt"); + int num_ret = olua_push_object(L, ret, "cc.types.VectorInt"); // insert code after call olua_postnew(L, ret); @@ -16006,21 +17715,21 @@ static int _cocos2d_types_VectorInt_sub$2(lua_State *L) return num_ret; } -static int _cocos2d_types_VectorInt_sub(lua_State *L) +static int _olua_fun_cocos2d_types_VectorInt_sub(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_integer(L, 2))) { - // @postnew cocos2d::types::VectorInt *sub(size_t from, @optional size_t to) - return _cocos2d_types_VectorInt_sub$2(L); + // @postnew cocos2d::types::VectorInt *sub(size_t from) + return _olua_fun_cocos2d_types_VectorInt_sub$2(L); // } } if (num_args == 2) { // if ((olua_is_integer(L, 2)) && (olua_is_integer(L, 3))) { // @postnew cocos2d::types::VectorInt *sub(size_t from, @optional size_t to) - return _cocos2d_types_VectorInt_sub$1(L); + return _olua_fun_cocos2d_types_VectorInt_sub$1(L); // } } @@ -16029,31 +17738,31 @@ static int _cocos2d_types_VectorInt_sub(lua_State *L) return 0; } -static int _cocos2d_types_VectorInt_take(lua_State *L) +static int _olua_fun_cocos2d_types_VectorInt_take(lua_State *L) { olua_startinvoke(L); cocos2d::types::VectorInt *self = nullptr; - olua_to_object(L, 1, &self, "cc.VectorInt"); + olua_to_object(L, 1, &self, "cc.types.VectorInt"); // cocos2d::types::VectorInt *take() cocos2d::types::VectorInt *ret = self->take(); - int num_ret = olua_push_object(L, ret, "cc.VectorInt"); + int num_ret = olua_push_object(L, ret, "cc.types.VectorInt"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_types_VectorInt_tostring(lua_State *L) +static int _olua_fun_cocos2d_types_VectorInt_tostring(lua_State *L) { olua_startinvoke(L); cocos2d::types::VectorInt *self = nullptr; size_t arg2 = 0; /** len */ - olua_to_object(L, 1, &self, "cc.VectorInt"); + olua_to_object(L, 1, &self, "cc.types.VectorInt"); olua_check_integer(L, 2, &arg2); // olua_Return tostring(lua_State *L, size_t len) @@ -16064,106 +17773,103 @@ static int _cocos2d_types_VectorInt_tostring(lua_State *L) return (int)ret; } -static int _cocos2d_types_VectorInt_length(lua_State *L) +static int _olua_fun_cocos2d_types_VectorInt_value$1(lua_State *L) { olua_startinvoke(L); cocos2d::types::VectorInt *self = nullptr; - olua_to_object(L, 1, &self, "cc.VectorInt"); + olua_to_object(L, 1, &self, "cc.types.VectorInt"); - // @getter @name(length) size_t length() - size_t ret = self->length(); - int num_ret = olua_push_integer(L, ret); + // @getter @name(value) const std::vector &value() + const std::vector &ret = self->value(); + int num_ret = olua_push_array(L, ret, [L](int &arg1) { + olua_push_integer(L, arg1); + }); olua_endinvoke(L); return num_ret; } -static int _cocos2d_types_VectorInt_rawdata(lua_State *L) +static int _olua_fun_cocos2d_types_VectorInt_value$2(lua_State *L) { olua_startinvoke(L); cocos2d::types::VectorInt *self = nullptr; + std::vector arg1; /** v */ - olua_to_object(L, 1, &self, "cc.VectorInt"); + olua_to_object(L, 1, &self, "cc.types.VectorInt"); + olua_check_array(L, 2, arg1, [L](int *arg1) { + olua_check_integer(L, -1, arg1); + }); - // @getter @name(rawdata) void *rawdata() - void *ret = self->rawdata(); - int num_ret = olua_push_object(L, ret, "void *"); + // @setter @name(value) void value(const std::vector &v) + self->value(arg1); olua_endinvoke(L); - return num_ret; + return 0; } -static int _cocos2d_types_VectorInt_size(lua_State *L) +static int _olua_fun_cocos2d_types_VectorInt_value(lua_State *L) { - olua_startinvoke(L); - - cocos2d::types::VectorInt *self = nullptr; + int num_args = lua_gettop(L) - 1; - olua_to_object(L, 1, &self, "cc.VectorInt"); + if (num_args == 0) { + // @getter @name(value) const std::vector &value() + return _olua_fun_cocos2d_types_VectorInt_value$1(L); + } - // @getter @name(sizeof) size_t size() - size_t ret = self->size(); - int num_ret = olua_push_integer(L, ret); + if (num_args == 1) { + // if ((olua_is_array(L, 2))) { + // @setter @name(value) void value(const std::vector &v) + return _olua_fun_cocos2d_types_VectorInt_value$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'cocos2d::types::VectorInt::value' not support '%d' arguments", num_args); - return num_ret; + return 0; } -static int _cocos2d_types_VectorInt_value(lua_State *L) +static int _olua_cls_cc_types_VectorInt(lua_State *L) { - olua_startinvoke(L); - - cocos2d::types::VectorInt *self = nullptr; - - olua_to_object(L, 1, &self, "cc.VectorInt"); - - // @getter @name(value) const std::vector &value() - const std::vector &ret = self->value(); - int num_ret = olua_push_array(L, ret, [L](int &arg1) { - olua_push_integer(L, arg1); - }); + oluacls_class(L, "cc.types.VectorInt"); + oluacls_func(L, "__gc", _olua_fun_cocos2d_types_VectorInt___gc); + oluacls_func(L, "__index", _olua_fun_cocos2d_types_VectorInt___index); + oluacls_func(L, "__newindex", _olua_fun_cocos2d_types_VectorInt___newindex); + oluacls_func(L, "__olua_move", _olua_fun_cocos2d_types_VectorInt___olua_move); + oluacls_func(L, "new", _olua_fun_cocos2d_types_VectorInt_new); + oluacls_func(L, "slice", _olua_fun_cocos2d_types_VectorInt_slice); + oluacls_func(L, "sub", _olua_fun_cocos2d_types_VectorInt_sub); + oluacls_func(L, "take", _olua_fun_cocos2d_types_VectorInt_take); + oluacls_func(L, "tostring", _olua_fun_cocos2d_types_VectorInt_tostring); + oluacls_prop(L, "buffer", _olua_fun_cocos2d_types_VectorInt_buffer, nullptr); + oluacls_prop(L, "length", _olua_fun_cocos2d_types_VectorInt_length, nullptr); + oluacls_prop(L, "value", _olua_fun_cocos2d_types_VectorInt_value, _olua_fun_cocos2d_types_VectorInt_value); - olua_endinvoke(L); - - return num_ret; + return 1; } OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_types_VectorInt(lua_State *L) -{ - oluacls_class(L, "cc.VectorInt"); - oluacls_func(L, "__gc", _cocos2d_types_VectorInt___gc); - oluacls_func(L, "__index", _cocos2d_types_VectorInt___index); - oluacls_func(L, "__newindex", _cocos2d_types_VectorInt___newindex); - oluacls_func(L, "__olua_move", _cocos2d_types_VectorInt___olua_move); - oluacls_func(L, "assign", _cocos2d_types_VectorInt_assign); - oluacls_func(L, "new", _cocos2d_types_VectorInt_create); - oluacls_func(L, "slice", _cocos2d_types_VectorInt_slice); - oluacls_func(L, "sub", _cocos2d_types_VectorInt_sub); - oluacls_func(L, "take", _cocos2d_types_VectorInt_take); - oluacls_func(L, "tostring", _cocos2d_types_VectorInt_tostring); - oluacls_prop(L, "length", _cocos2d_types_VectorInt_length, _cocos2d_types_VectorInt_length); - oluacls_prop(L, "rawdata", _cocos2d_types_VectorInt_rawdata, nullptr); - oluacls_prop(L, "sizeof", _cocos2d_types_VectorInt_size, nullptr); - oluacls_prop(L, "value", _cocos2d_types_VectorInt_value, _cocos2d_types_VectorInt_value); - +OLUA_LIB int luaopen_cc_types_VectorInt(lua_State *L) +{ + olua_require(L, "cocos2d_types", luaopen_cocos2d_types); + if (!olua_getclass(L, "cc.types.VectorInt")) { + luaL_error(L, "class not found: cocos2d::types::VectorInt"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_types_ValueMap___gc(lua_State *L) +static int _olua_fun_cocos2d_types_ValueMap___gc(lua_State *L) { olua_startinvoke(L); cocos2d::types::ValueMap *self = nullptr; - olua_to_object(L, 1, &self, "cc.ValueMap"); + olua_to_object(L, 1, &self, "cc.types.ValueMap"); // olua_Return __gc(lua_State *L) olua_Return ret = self->__gc(L); @@ -16173,14 +17879,14 @@ static int _cocos2d_types_ValueMap___gc(lua_State *L) return (int)ret; } -static int _cocos2d_types_ValueMap___index(lua_State *L) +static int _olua_fun_cocos2d_types_ValueMap___index(lua_State *L) { olua_startinvoke(L); cocos2d::types::ValueMap *self = nullptr; unsigned int arg1 = 0; /** idx */ - olua_to_object(L, 1, &self, "cc.ValueMap"); + olua_to_object(L, 1, &self, "cc.types.ValueMap"); olua_check_integer(L, 2, &arg1); // cocos2d::ValueMap __index(unsigned int idx) @@ -16192,7 +17898,7 @@ static int _cocos2d_types_ValueMap___index(lua_State *L) return num_ret; } -static int _cocos2d_types_ValueMap___newindex(lua_State *L) +static int _olua_fun_cocos2d_types_ValueMap___newindex(lua_State *L) { olua_startinvoke(L); @@ -16200,7 +17906,7 @@ static int _cocos2d_types_ValueMap___newindex(lua_State *L) unsigned int arg1 = 0; /** idx */ cocos2d::ValueMap arg2; /** v */ - olua_to_object(L, 1, &self, "cc.ValueMap"); + olua_to_object(L, 1, &self, "cc.types.ValueMap"); olua_check_integer(L, 2, &arg1); olua_check_cocos2d_ValueMap(L, 3, &arg2); @@ -16212,39 +17918,53 @@ static int _cocos2d_types_ValueMap___newindex(lua_State *L) return 0; } -static int _cocos2d_types_ValueMap___olua_move(lua_State *L) +static int _olua_fun_cocos2d_types_ValueMap___olua_move(lua_State *L) { olua_startinvoke(L); - auto self = (cocos2d::types::ValueMap *)olua_toobj(L, 1, "cc.ValueMap"); - olua_push_object(L, self, "cc.ValueMap"); + auto self = (cocos2d::types::ValueMap *)olua_toobj(L, 1, "cc.types.ValueMap"); + olua_push_object(L, self, "cc.types.ValueMap"); olua_endinvoke(L); return 1; } -static int _cocos2d_types_ValueMap_assign(lua_State *L) +static int _olua_fun_cocos2d_types_ValueMap_buffer(lua_State *L) { olua_startinvoke(L); cocos2d::types::ValueMap *self = nullptr; - const char *arg1 = nullptr; /** data */ - size_t arg2 = 0; /** len */ - olua_to_object(L, 1, &self, "cc.ValueMap"); - olua_check_string(L, 2, &arg1); - olua_check_integer(L, 3, &arg2); + olua_to_object(L, 1, &self, "cc.types.ValueMap"); - // void assign(const char *data, size_t len) - self->assign(arg1, arg2); + // @getter @name(buffer) @type(void *) cocos2d::ValueMap *buffer() + void *ret = self->buffer(); + int num_ret = olua_push_object(L, ret, "void *"); olua_endinvoke(L); - return 0; + return num_ret; +} + +static int _olua_fun_cocos2d_types_ValueMap_length(lua_State *L) +{ + olua_startinvoke(L); + + cocos2d::types::ValueMap *self = nullptr; + + olua_to_object(L, 1, &self, "cc.types.ValueMap"); + + // @getter @name(length) size_t length() + size_t ret = self->length(); + int num_ret = olua_push_integer(L, ret); + + olua_endinvoke(L); + + return num_ret; } -static int _cocos2d_types_ValueMap_create$1(lua_State *L) +static int _olua_fun_cocos2d_types_ValueMap_new$1(lua_State *L) { olua_startinvoke(L); @@ -16254,7 +17974,7 @@ static int _cocos2d_types_ValueMap_create$1(lua_State *L) // @postnew @name(new) static cocos2d::types::ValueMap *create(@optional size_t len) cocos2d::types::ValueMap *ret = cocos2d::types::ValueMap::create(arg1); - int num_ret = olua_push_object(L, ret, "cc.ValueMap"); + int num_ret = olua_push_object(L, ret, "cc.types.ValueMap"); // insert code after call olua_postnew(L, ret); @@ -16264,13 +17984,13 @@ static int _cocos2d_types_ValueMap_create$1(lua_State *L) return num_ret; } -static int _cocos2d_types_ValueMap_create$2(lua_State *L) +static int _olua_fun_cocos2d_types_ValueMap_new$2(lua_State *L) { olua_startinvoke(L); - // @postnew @name(new) static cocos2d::types::ValueMap *create(@optional size_t len) + // @postnew @name(new) static cocos2d::types::ValueMap *create() cocos2d::types::ValueMap *ret = cocos2d::types::ValueMap::create(); - int num_ret = olua_push_object(L, ret, "cc.ValueMap"); + int num_ret = olua_push_object(L, ret, "cc.types.ValueMap"); // insert code after call olua_postnew(L, ret); @@ -16280,28 +18000,28 @@ static int _cocos2d_types_ValueMap_create$2(lua_State *L) return num_ret; } -static int _cocos2d_types_ValueMap_create(lua_State *L) +static int _olua_fun_cocos2d_types_ValueMap_new(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 0) { - // @postnew @name(new) static cocos2d::types::ValueMap *create(@optional size_t len) - return _cocos2d_types_ValueMap_create$2(L); + // @postnew @name(new) static cocos2d::types::ValueMap *create() + return _olua_fun_cocos2d_types_ValueMap_new$2(L); } if (num_args == 1) { // if ((olua_is_integer(L, 1))) { // @postnew @name(new) static cocos2d::types::ValueMap *create(@optional size_t len) - return _cocos2d_types_ValueMap_create$1(L); + return _olua_fun_cocos2d_types_ValueMap_new$1(L); // } } - luaL_error(L, "method 'cocos2d::types::ValueMap::create' not support '%d' arguments", num_args); + luaL_error(L, "method 'cocos2d::types::ValueMap::new' not support '%d' arguments", num_args); return 0; } -static int _cocos2d_types_ValueMap_slice$1(lua_State *L) +static int _olua_fun_cocos2d_types_ValueMap_slice$1(lua_State *L) { olua_startinvoke(L); @@ -16309,13 +18029,13 @@ static int _cocos2d_types_ValueMap_slice$1(lua_State *L) size_t arg1 = 0; /** from */ size_t arg2 = 0; /** to */ - olua_to_object(L, 1, &self, "cc.ValueMap"); + olua_to_object(L, 1, &self, "cc.types.ValueMap"); olua_check_integer(L, 2, &arg1); olua_check_integer(L, 3, &arg2); // @postnew cocos2d::types::ValueMap *slice(size_t from, @optional size_t to) cocos2d::types::ValueMap *ret = self->slice(arg1, arg2); - int num_ret = olua_push_object(L, ret, "cc.ValueMap"); + int num_ret = olua_push_object(L, ret, "cc.types.ValueMap"); // insert code after call olua_postnew(L, ret); @@ -16325,19 +18045,19 @@ static int _cocos2d_types_ValueMap_slice$1(lua_State *L) return num_ret; } -static int _cocos2d_types_ValueMap_slice$2(lua_State *L) +static int _olua_fun_cocos2d_types_ValueMap_slice$2(lua_State *L) { olua_startinvoke(L); cocos2d::types::ValueMap *self = nullptr; size_t arg1 = 0; /** from */ - olua_to_object(L, 1, &self, "cc.ValueMap"); + olua_to_object(L, 1, &self, "cc.types.ValueMap"); olua_check_integer(L, 2, &arg1); - // @postnew cocos2d::types::ValueMap *slice(size_t from, @optional size_t to) + // @postnew cocos2d::types::ValueMap *slice(size_t from) cocos2d::types::ValueMap *ret = self->slice(arg1); - int num_ret = olua_push_object(L, ret, "cc.ValueMap"); + int num_ret = olua_push_object(L, ret, "cc.types.ValueMap"); // insert code after call olua_postnew(L, ret); @@ -16347,21 +18067,21 @@ static int _cocos2d_types_ValueMap_slice$2(lua_State *L) return num_ret; } -static int _cocos2d_types_ValueMap_slice(lua_State *L) +static int _olua_fun_cocos2d_types_ValueMap_slice(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_integer(L, 2))) { - // @postnew cocos2d::types::ValueMap *slice(size_t from, @optional size_t to) - return _cocos2d_types_ValueMap_slice$2(L); + // @postnew cocos2d::types::ValueMap *slice(size_t from) + return _olua_fun_cocos2d_types_ValueMap_slice$2(L); // } } if (num_args == 2) { // if ((olua_is_integer(L, 2)) && (olua_is_integer(L, 3))) { // @postnew cocos2d::types::ValueMap *slice(size_t from, @optional size_t to) - return _cocos2d_types_ValueMap_slice$1(L); + return _olua_fun_cocos2d_types_ValueMap_slice$1(L); // } } @@ -16370,7 +18090,7 @@ static int _cocos2d_types_ValueMap_slice(lua_State *L) return 0; } -static int _cocos2d_types_ValueMap_sub$1(lua_State *L) +static int _olua_fun_cocos2d_types_ValueMap_sub$1(lua_State *L) { olua_startinvoke(L); @@ -16378,13 +18098,13 @@ static int _cocos2d_types_ValueMap_sub$1(lua_State *L) size_t arg1 = 0; /** from */ size_t arg2 = 0; /** to */ - olua_to_object(L, 1, &self, "cc.ValueMap"); + olua_to_object(L, 1, &self, "cc.types.ValueMap"); olua_check_integer(L, 2, &arg1); olua_check_integer(L, 3, &arg2); // @postnew cocos2d::types::ValueMap *sub(size_t from, @optional size_t to) cocos2d::types::ValueMap *ret = self->sub(arg1, arg2); - int num_ret = olua_push_object(L, ret, "cc.ValueMap"); + int num_ret = olua_push_object(L, ret, "cc.types.ValueMap"); // insert code after call olua_postnew(L, ret); @@ -16394,19 +18114,19 @@ static int _cocos2d_types_ValueMap_sub$1(lua_State *L) return num_ret; } -static int _cocos2d_types_ValueMap_sub$2(lua_State *L) +static int _olua_fun_cocos2d_types_ValueMap_sub$2(lua_State *L) { olua_startinvoke(L); cocos2d::types::ValueMap *self = nullptr; size_t arg1 = 0; /** from */ - olua_to_object(L, 1, &self, "cc.ValueMap"); + olua_to_object(L, 1, &self, "cc.types.ValueMap"); olua_check_integer(L, 2, &arg1); - // @postnew cocos2d::types::ValueMap *sub(size_t from, @optional size_t to) + // @postnew cocos2d::types::ValueMap *sub(size_t from) cocos2d::types::ValueMap *ret = self->sub(arg1); - int num_ret = olua_push_object(L, ret, "cc.ValueMap"); + int num_ret = olua_push_object(L, ret, "cc.types.ValueMap"); // insert code after call olua_postnew(L, ret); @@ -16416,21 +18136,21 @@ static int _cocos2d_types_ValueMap_sub$2(lua_State *L) return num_ret; } -static int _cocos2d_types_ValueMap_sub(lua_State *L) +static int _olua_fun_cocos2d_types_ValueMap_sub(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_integer(L, 2))) { - // @postnew cocos2d::types::ValueMap *sub(size_t from, @optional size_t to) - return _cocos2d_types_ValueMap_sub$2(L); + // @postnew cocos2d::types::ValueMap *sub(size_t from) + return _olua_fun_cocos2d_types_ValueMap_sub$2(L); // } } if (num_args == 2) { // if ((olua_is_integer(L, 2)) && (olua_is_integer(L, 3))) { // @postnew cocos2d::types::ValueMap *sub(size_t from, @optional size_t to) - return _cocos2d_types_ValueMap_sub$1(L); + return _olua_fun_cocos2d_types_ValueMap_sub$1(L); // } } @@ -16439,31 +18159,31 @@ static int _cocos2d_types_ValueMap_sub(lua_State *L) return 0; } -static int _cocos2d_types_ValueMap_take(lua_State *L) +static int _olua_fun_cocos2d_types_ValueMap_take(lua_State *L) { olua_startinvoke(L); cocos2d::types::ValueMap *self = nullptr; - olua_to_object(L, 1, &self, "cc.ValueMap"); + olua_to_object(L, 1, &self, "cc.types.ValueMap"); // cocos2d::types::ValueMap *take() cocos2d::types::ValueMap *ret = self->take(); - int num_ret = olua_push_object(L, ret, "cc.ValueMap"); + int num_ret = olua_push_object(L, ret, "cc.types.ValueMap"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_types_ValueMap_tostring(lua_State *L) +static int _olua_fun_cocos2d_types_ValueMap_tostring(lua_State *L) { olua_startinvoke(L); cocos2d::types::ValueMap *self = nullptr; size_t arg2 = 0; /** len */ - olua_to_object(L, 1, &self, "cc.ValueMap"); + olua_to_object(L, 1, &self, "cc.types.ValueMap"); olua_check_integer(L, 2, &arg2); // olua_Return tostring(lua_State *L, size_t len) @@ -16474,104 +18194,99 @@ static int _cocos2d_types_ValueMap_tostring(lua_State *L) return (int)ret; } -static int _cocos2d_types_ValueMap_length(lua_State *L) +static int _olua_fun_cocos2d_types_ValueMap_value$1(lua_State *L) { olua_startinvoke(L); cocos2d::types::ValueMap *self = nullptr; - olua_to_object(L, 1, &self, "cc.ValueMap"); + olua_to_object(L, 1, &self, "cc.types.ValueMap"); - // @getter @name(length) size_t length() - size_t ret = self->length(); - int num_ret = olua_push_integer(L, ret); + // @getter @name(value) const cocos2d::ValueMap &value() + const cocos2d::ValueMap &ret = self->value(); + int num_ret = olua_push_cocos2d_ValueMap(L, ret); olua_endinvoke(L); return num_ret; } -static int _cocos2d_types_ValueMap_rawdata(lua_State *L) +static int _olua_fun_cocos2d_types_ValueMap_value$2(lua_State *L) { olua_startinvoke(L); cocos2d::types::ValueMap *self = nullptr; + cocos2d::ValueMap arg1; /** v */ - olua_to_object(L, 1, &self, "cc.ValueMap"); + olua_to_object(L, 1, &self, "cc.types.ValueMap"); + olua_check_cocos2d_ValueMap(L, 2, &arg1); - // @getter @name(rawdata) void *rawdata() - void *ret = self->rawdata(); - int num_ret = olua_push_object(L, ret, "void *"); + // @setter @name(value) void value(const cocos2d::ValueMap &v) + self->value(arg1); olua_endinvoke(L); - return num_ret; + return 0; } -static int _cocos2d_types_ValueMap_size(lua_State *L) +static int _olua_fun_cocos2d_types_ValueMap_value(lua_State *L) { - olua_startinvoke(L); - - cocos2d::types::ValueMap *self = nullptr; + int num_args = lua_gettop(L) - 1; - olua_to_object(L, 1, &self, "cc.ValueMap"); + if (num_args == 0) { + // @getter @name(value) const cocos2d::ValueMap &value() + return _olua_fun_cocos2d_types_ValueMap_value$1(L); + } - // @getter @name(sizeof) size_t size() - size_t ret = self->size(); - int num_ret = olua_push_integer(L, ret); + if (num_args == 1) { + // if ((olua_is_cocos2d_ValueMap(L, 2))) { + // @setter @name(value) void value(const cocos2d::ValueMap &v) + return _olua_fun_cocos2d_types_ValueMap_value$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'cocos2d::types::ValueMap::value' not support '%d' arguments", num_args); - return num_ret; + return 0; } -static int _cocos2d_types_ValueMap_value(lua_State *L) +static int _olua_cls_cc_types_ValueMap(lua_State *L) { - olua_startinvoke(L); + oluacls_class(L, "cc.types.ValueMap"); + oluacls_func(L, "__gc", _olua_fun_cocos2d_types_ValueMap___gc); + oluacls_func(L, "__index", _olua_fun_cocos2d_types_ValueMap___index); + oluacls_func(L, "__newindex", _olua_fun_cocos2d_types_ValueMap___newindex); + oluacls_func(L, "__olua_move", _olua_fun_cocos2d_types_ValueMap___olua_move); + oluacls_func(L, "new", _olua_fun_cocos2d_types_ValueMap_new); + oluacls_func(L, "slice", _olua_fun_cocos2d_types_ValueMap_slice); + oluacls_func(L, "sub", _olua_fun_cocos2d_types_ValueMap_sub); + oluacls_func(L, "take", _olua_fun_cocos2d_types_ValueMap_take); + oluacls_func(L, "tostring", _olua_fun_cocos2d_types_ValueMap_tostring); + oluacls_prop(L, "buffer", _olua_fun_cocos2d_types_ValueMap_buffer, nullptr); + oluacls_prop(L, "length", _olua_fun_cocos2d_types_ValueMap_length, nullptr); + oluacls_prop(L, "value", _olua_fun_cocos2d_types_ValueMap_value, _olua_fun_cocos2d_types_ValueMap_value); - cocos2d::types::ValueMap *self = nullptr; - - olua_to_object(L, 1, &self, "cc.ValueMap"); - - // @getter @name(value) const cocos2d::ValueMap &value() - const cocos2d::ValueMap &ret = self->value(); - int num_ret = olua_push_cocos2d_ValueMap(L, ret); - - olua_endinvoke(L); - - return num_ret; + return 1; } OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_types_ValueMap(lua_State *L) -{ - oluacls_class(L, "cc.ValueMap"); - oluacls_func(L, "__gc", _cocos2d_types_ValueMap___gc); - oluacls_func(L, "__index", _cocos2d_types_ValueMap___index); - oluacls_func(L, "__newindex", _cocos2d_types_ValueMap___newindex); - oluacls_func(L, "__olua_move", _cocos2d_types_ValueMap___olua_move); - oluacls_func(L, "assign", _cocos2d_types_ValueMap_assign); - oluacls_func(L, "new", _cocos2d_types_ValueMap_create); - oluacls_func(L, "slice", _cocos2d_types_ValueMap_slice); - oluacls_func(L, "sub", _cocos2d_types_ValueMap_sub); - oluacls_func(L, "take", _cocos2d_types_ValueMap_take); - oluacls_func(L, "tostring", _cocos2d_types_ValueMap_tostring); - oluacls_prop(L, "length", _cocos2d_types_ValueMap_length, _cocos2d_types_ValueMap_length); - oluacls_prop(L, "rawdata", _cocos2d_types_ValueMap_rawdata, nullptr); - oluacls_prop(L, "sizeof", _cocos2d_types_ValueMap_size, nullptr); - oluacls_prop(L, "value", _cocos2d_types_ValueMap_value, _cocos2d_types_ValueMap_value); - +OLUA_LIB int luaopen_cc_types_ValueMap(lua_State *L) +{ + olua_require(L, "cocos2d_types", luaopen_cocos2d_types); + if (!olua_getclass(L, "cc.types.ValueMap")) { + luaL_error(L, "class not found: cocos2d::types::ValueMap"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_types_TMXTileFlags___gc(lua_State *L) +static int _olua_fun_cocos2d_types_TMXTileFlags___gc(lua_State *L) { olua_startinvoke(L); cocos2d::types::TMXTileFlags *self = nullptr; - olua_to_object(L, 1, &self, "cc.TMXTileFlags"); + olua_to_object(L, 1, &self, "cc.types.TMXTileFlags"); // olua_Return __gc(lua_State *L) olua_Return ret = self->__gc(L); @@ -16581,14 +18296,14 @@ static int _cocos2d_types_TMXTileFlags___gc(lua_State *L) return (int)ret; } -static int _cocos2d_types_TMXTileFlags___index(lua_State *L) +static int _olua_fun_cocos2d_types_TMXTileFlags___index(lua_State *L) { olua_startinvoke(L); cocos2d::types::TMXTileFlags *self = nullptr; unsigned int arg1 = 0; /** idx */ - olua_to_object(L, 1, &self, "cc.TMXTileFlags"); + olua_to_object(L, 1, &self, "cc.types.TMXTileFlags"); olua_check_integer(L, 2, &arg1); // cocos2d::TMXTileFlags __index(unsigned int idx) @@ -16600,7 +18315,7 @@ static int _cocos2d_types_TMXTileFlags___index(lua_State *L) return num_ret; } -static int _cocos2d_types_TMXTileFlags___newindex(lua_State *L) +static int _olua_fun_cocos2d_types_TMXTileFlags___newindex(lua_State *L) { olua_startinvoke(L); @@ -16608,7 +18323,7 @@ static int _cocos2d_types_TMXTileFlags___newindex(lua_State *L) unsigned int arg1 = 0; /** idx */ cocos2d::TMXTileFlags arg2 = (cocos2d::TMXTileFlags)0; /** v */ - olua_to_object(L, 1, &self, "cc.TMXTileFlags"); + olua_to_object(L, 1, &self, "cc.types.TMXTileFlags"); olua_check_integer(L, 2, &arg1); olua_check_enum(L, 3, &arg2); @@ -16620,39 +18335,53 @@ static int _cocos2d_types_TMXTileFlags___newindex(lua_State *L) return 0; } -static int _cocos2d_types_TMXTileFlags___olua_move(lua_State *L) +static int _olua_fun_cocos2d_types_TMXTileFlags___olua_move(lua_State *L) { olua_startinvoke(L); - auto self = (cocos2d::types::TMXTileFlags *)olua_toobj(L, 1, "cc.TMXTileFlags"); - olua_push_object(L, self, "cc.TMXTileFlags"); + auto self = (cocos2d::types::TMXTileFlags *)olua_toobj(L, 1, "cc.types.TMXTileFlags"); + olua_push_object(L, self, "cc.types.TMXTileFlags"); olua_endinvoke(L); return 1; } -static int _cocos2d_types_TMXTileFlags_assign(lua_State *L) +static int _olua_fun_cocos2d_types_TMXTileFlags_buffer(lua_State *L) { olua_startinvoke(L); cocos2d::types::TMXTileFlags *self = nullptr; - const char *arg1 = nullptr; /** data */ - size_t arg2 = 0; /** len */ - olua_to_object(L, 1, &self, "cc.TMXTileFlags"); - olua_check_string(L, 2, &arg1); - olua_check_integer(L, 3, &arg2); + olua_to_object(L, 1, &self, "cc.types.TMXTileFlags"); - // void assign(const char *data, size_t len) - self->assign(arg1, arg2); + // @getter @name(buffer) @type(void *) cocos2d::TMXTileFlags *buffer() + void *ret = self->buffer(); + int num_ret = olua_push_object(L, ret, "void *"); olua_endinvoke(L); - return 0; + return num_ret; +} + +static int _olua_fun_cocos2d_types_TMXTileFlags_length(lua_State *L) +{ + olua_startinvoke(L); + + cocos2d::types::TMXTileFlags *self = nullptr; + + olua_to_object(L, 1, &self, "cc.types.TMXTileFlags"); + + // @getter @name(length) size_t length() + size_t ret = self->length(); + int num_ret = olua_push_integer(L, ret); + + olua_endinvoke(L); + + return num_ret; } -static int _cocos2d_types_TMXTileFlags_create$1(lua_State *L) +static int _olua_fun_cocos2d_types_TMXTileFlags_new$1(lua_State *L) { olua_startinvoke(L); @@ -16662,7 +18391,7 @@ static int _cocos2d_types_TMXTileFlags_create$1(lua_State *L) // @postnew @name(new) static cocos2d::types::TMXTileFlags *create(@optional size_t len) cocos2d::types::TMXTileFlags *ret = cocos2d::types::TMXTileFlags::create(arg1); - int num_ret = olua_push_object(L, ret, "cc.TMXTileFlags"); + int num_ret = olua_push_object(L, ret, "cc.types.TMXTileFlags"); // insert code after call olua_postnew(L, ret); @@ -16672,13 +18401,13 @@ static int _cocos2d_types_TMXTileFlags_create$1(lua_State *L) return num_ret; } -static int _cocos2d_types_TMXTileFlags_create$2(lua_State *L) +static int _olua_fun_cocos2d_types_TMXTileFlags_new$2(lua_State *L) { olua_startinvoke(L); - // @postnew @name(new) static cocos2d::types::TMXTileFlags *create(@optional size_t len) + // @postnew @name(new) static cocos2d::types::TMXTileFlags *create() cocos2d::types::TMXTileFlags *ret = cocos2d::types::TMXTileFlags::create(); - int num_ret = olua_push_object(L, ret, "cc.TMXTileFlags"); + int num_ret = olua_push_object(L, ret, "cc.types.TMXTileFlags"); // insert code after call olua_postnew(L, ret); @@ -16688,28 +18417,28 @@ static int _cocos2d_types_TMXTileFlags_create$2(lua_State *L) return num_ret; } -static int _cocos2d_types_TMXTileFlags_create(lua_State *L) +static int _olua_fun_cocos2d_types_TMXTileFlags_new(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 0) { - // @postnew @name(new) static cocos2d::types::TMXTileFlags *create(@optional size_t len) - return _cocos2d_types_TMXTileFlags_create$2(L); + // @postnew @name(new) static cocos2d::types::TMXTileFlags *create() + return _olua_fun_cocos2d_types_TMXTileFlags_new$2(L); } if (num_args == 1) { // if ((olua_is_integer(L, 1))) { // @postnew @name(new) static cocos2d::types::TMXTileFlags *create(@optional size_t len) - return _cocos2d_types_TMXTileFlags_create$1(L); + return _olua_fun_cocos2d_types_TMXTileFlags_new$1(L); // } } - luaL_error(L, "method 'cocos2d::types::TMXTileFlags::create' not support '%d' arguments", num_args); + luaL_error(L, "method 'cocos2d::types::TMXTileFlags::new' not support '%d' arguments", num_args); return 0; } -static int _cocos2d_types_TMXTileFlags_slice$1(lua_State *L) +static int _olua_fun_cocos2d_types_TMXTileFlags_slice$1(lua_State *L) { olua_startinvoke(L); @@ -16717,13 +18446,13 @@ static int _cocos2d_types_TMXTileFlags_slice$1(lua_State *L) size_t arg1 = 0; /** from */ size_t arg2 = 0; /** to */ - olua_to_object(L, 1, &self, "cc.TMXTileFlags"); + olua_to_object(L, 1, &self, "cc.types.TMXTileFlags"); olua_check_integer(L, 2, &arg1); olua_check_integer(L, 3, &arg2); // @postnew cocos2d::types::TMXTileFlags *slice(size_t from, @optional size_t to) cocos2d::types::TMXTileFlags *ret = self->slice(arg1, arg2); - int num_ret = olua_push_object(L, ret, "cc.TMXTileFlags"); + int num_ret = olua_push_object(L, ret, "cc.types.TMXTileFlags"); // insert code after call olua_postnew(L, ret); @@ -16733,19 +18462,19 @@ static int _cocos2d_types_TMXTileFlags_slice$1(lua_State *L) return num_ret; } -static int _cocos2d_types_TMXTileFlags_slice$2(lua_State *L) +static int _olua_fun_cocos2d_types_TMXTileFlags_slice$2(lua_State *L) { olua_startinvoke(L); cocos2d::types::TMXTileFlags *self = nullptr; size_t arg1 = 0; /** from */ - olua_to_object(L, 1, &self, "cc.TMXTileFlags"); + olua_to_object(L, 1, &self, "cc.types.TMXTileFlags"); olua_check_integer(L, 2, &arg1); - // @postnew cocos2d::types::TMXTileFlags *slice(size_t from, @optional size_t to) + // @postnew cocos2d::types::TMXTileFlags *slice(size_t from) cocos2d::types::TMXTileFlags *ret = self->slice(arg1); - int num_ret = olua_push_object(L, ret, "cc.TMXTileFlags"); + int num_ret = olua_push_object(L, ret, "cc.types.TMXTileFlags"); // insert code after call olua_postnew(L, ret); @@ -16755,21 +18484,21 @@ static int _cocos2d_types_TMXTileFlags_slice$2(lua_State *L) return num_ret; } -static int _cocos2d_types_TMXTileFlags_slice(lua_State *L) +static int _olua_fun_cocos2d_types_TMXTileFlags_slice(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_integer(L, 2))) { - // @postnew cocos2d::types::TMXTileFlags *slice(size_t from, @optional size_t to) - return _cocos2d_types_TMXTileFlags_slice$2(L); + // @postnew cocos2d::types::TMXTileFlags *slice(size_t from) + return _olua_fun_cocos2d_types_TMXTileFlags_slice$2(L); // } } if (num_args == 2) { // if ((olua_is_integer(L, 2)) && (olua_is_integer(L, 3))) { // @postnew cocos2d::types::TMXTileFlags *slice(size_t from, @optional size_t to) - return _cocos2d_types_TMXTileFlags_slice$1(L); + return _olua_fun_cocos2d_types_TMXTileFlags_slice$1(L); // } } @@ -16778,7 +18507,7 @@ static int _cocos2d_types_TMXTileFlags_slice(lua_State *L) return 0; } -static int _cocos2d_types_TMXTileFlags_sub$1(lua_State *L) +static int _olua_fun_cocos2d_types_TMXTileFlags_sub$1(lua_State *L) { olua_startinvoke(L); @@ -16786,13 +18515,13 @@ static int _cocos2d_types_TMXTileFlags_sub$1(lua_State *L) size_t arg1 = 0; /** from */ size_t arg2 = 0; /** to */ - olua_to_object(L, 1, &self, "cc.TMXTileFlags"); + olua_to_object(L, 1, &self, "cc.types.TMXTileFlags"); olua_check_integer(L, 2, &arg1); olua_check_integer(L, 3, &arg2); // @postnew cocos2d::types::TMXTileFlags *sub(size_t from, @optional size_t to) cocos2d::types::TMXTileFlags *ret = self->sub(arg1, arg2); - int num_ret = olua_push_object(L, ret, "cc.TMXTileFlags"); + int num_ret = olua_push_object(L, ret, "cc.types.TMXTileFlags"); // insert code after call olua_postnew(L, ret); @@ -16802,19 +18531,19 @@ static int _cocos2d_types_TMXTileFlags_sub$1(lua_State *L) return num_ret; } -static int _cocos2d_types_TMXTileFlags_sub$2(lua_State *L) +static int _olua_fun_cocos2d_types_TMXTileFlags_sub$2(lua_State *L) { olua_startinvoke(L); cocos2d::types::TMXTileFlags *self = nullptr; size_t arg1 = 0; /** from */ - olua_to_object(L, 1, &self, "cc.TMXTileFlags"); + olua_to_object(L, 1, &self, "cc.types.TMXTileFlags"); olua_check_integer(L, 2, &arg1); - // @postnew cocos2d::types::TMXTileFlags *sub(size_t from, @optional size_t to) + // @postnew cocos2d::types::TMXTileFlags *sub(size_t from) cocos2d::types::TMXTileFlags *ret = self->sub(arg1); - int num_ret = olua_push_object(L, ret, "cc.TMXTileFlags"); + int num_ret = olua_push_object(L, ret, "cc.types.TMXTileFlags"); // insert code after call olua_postnew(L, ret); @@ -16824,21 +18553,21 @@ static int _cocos2d_types_TMXTileFlags_sub$2(lua_State *L) return num_ret; } -static int _cocos2d_types_TMXTileFlags_sub(lua_State *L) +static int _olua_fun_cocos2d_types_TMXTileFlags_sub(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_integer(L, 2))) { - // @postnew cocos2d::types::TMXTileFlags *sub(size_t from, @optional size_t to) - return _cocos2d_types_TMXTileFlags_sub$2(L); + // @postnew cocos2d::types::TMXTileFlags *sub(size_t from) + return _olua_fun_cocos2d_types_TMXTileFlags_sub$2(L); // } } if (num_args == 2) { // if ((olua_is_integer(L, 2)) && (olua_is_integer(L, 3))) { // @postnew cocos2d::types::TMXTileFlags *sub(size_t from, @optional size_t to) - return _cocos2d_types_TMXTileFlags_sub$1(L); + return _olua_fun_cocos2d_types_TMXTileFlags_sub$1(L); // } } @@ -16847,31 +18576,31 @@ static int _cocos2d_types_TMXTileFlags_sub(lua_State *L) return 0; } -static int _cocos2d_types_TMXTileFlags_take(lua_State *L) +static int _olua_fun_cocos2d_types_TMXTileFlags_take(lua_State *L) { olua_startinvoke(L); cocos2d::types::TMXTileFlags *self = nullptr; - olua_to_object(L, 1, &self, "cc.TMXTileFlags"); + olua_to_object(L, 1, &self, "cc.types.TMXTileFlags"); // cocos2d::types::TMXTileFlags *take() cocos2d::types::TMXTileFlags *ret = self->take(); - int num_ret = olua_push_object(L, ret, "cc.TMXTileFlags"); + int num_ret = olua_push_object(L, ret, "cc.types.TMXTileFlags"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_types_TMXTileFlags_tostring(lua_State *L) +static int _olua_fun_cocos2d_types_TMXTileFlags_tostring(lua_State *L) { olua_startinvoke(L); cocos2d::types::TMXTileFlags *self = nullptr; size_t arg2 = 0; /** len */ - olua_to_object(L, 1, &self, "cc.TMXTileFlags"); + olua_to_object(L, 1, &self, "cc.types.TMXTileFlags"); olua_check_integer(L, 2, &arg2); // olua_Return tostring(lua_State *L, size_t len) @@ -16882,104 +18611,99 @@ static int _cocos2d_types_TMXTileFlags_tostring(lua_State *L) return (int)ret; } -static int _cocos2d_types_TMXTileFlags_length(lua_State *L) +static int _olua_fun_cocos2d_types_TMXTileFlags_value$1(lua_State *L) { olua_startinvoke(L); cocos2d::types::TMXTileFlags *self = nullptr; - olua_to_object(L, 1, &self, "cc.TMXTileFlags"); + olua_to_object(L, 1, &self, "cc.types.TMXTileFlags"); - // @getter @name(length) size_t length() - size_t ret = self->length(); - int num_ret = olua_push_integer(L, ret); + // @getter @name(value) const cocos2d::TMXTileFlags &value() + const cocos2d::TMXTileFlags &ret = self->value(); + int num_ret = olua_push_enum(L, ret); olua_endinvoke(L); return num_ret; } -static int _cocos2d_types_TMXTileFlags_rawdata(lua_State *L) +static int _olua_fun_cocos2d_types_TMXTileFlags_value$2(lua_State *L) { olua_startinvoke(L); cocos2d::types::TMXTileFlags *self = nullptr; + cocos2d::TMXTileFlags arg1 = (cocos2d::TMXTileFlags)0; /** v */ - olua_to_object(L, 1, &self, "cc.TMXTileFlags"); + olua_to_object(L, 1, &self, "cc.types.TMXTileFlags"); + olua_check_enum(L, 2, &arg1); - // @getter @name(rawdata) void *rawdata() - void *ret = self->rawdata(); - int num_ret = olua_push_object(L, ret, "void *"); + // @setter @name(value) void value(const cocos2d::TMXTileFlags &v) + self->value(arg1); olua_endinvoke(L); - return num_ret; + return 0; } -static int _cocos2d_types_TMXTileFlags_size(lua_State *L) +static int _olua_fun_cocos2d_types_TMXTileFlags_value(lua_State *L) { - olua_startinvoke(L); - - cocos2d::types::TMXTileFlags *self = nullptr; + int num_args = lua_gettop(L) - 1; - olua_to_object(L, 1, &self, "cc.TMXTileFlags"); + if (num_args == 0) { + // @getter @name(value) const cocos2d::TMXTileFlags &value() + return _olua_fun_cocos2d_types_TMXTileFlags_value$1(L); + } - // @getter @name(sizeof) size_t size() - size_t ret = self->size(); - int num_ret = olua_push_integer(L, ret); + if (num_args == 1) { + // if ((olua_is_enum(L, 2))) { + // @setter @name(value) void value(const cocos2d::TMXTileFlags &v) + return _olua_fun_cocos2d_types_TMXTileFlags_value$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'cocos2d::types::TMXTileFlags::value' not support '%d' arguments", num_args); - return num_ret; + return 0; } -static int _cocos2d_types_TMXTileFlags_value(lua_State *L) +static int _olua_cls_cc_types_TMXTileFlags(lua_State *L) { - olua_startinvoke(L); + oluacls_class(L, "cc.types.TMXTileFlags"); + oluacls_func(L, "__gc", _olua_fun_cocos2d_types_TMXTileFlags___gc); + oluacls_func(L, "__index", _olua_fun_cocos2d_types_TMXTileFlags___index); + oluacls_func(L, "__newindex", _olua_fun_cocos2d_types_TMXTileFlags___newindex); + oluacls_func(L, "__olua_move", _olua_fun_cocos2d_types_TMXTileFlags___olua_move); + oluacls_func(L, "new", _olua_fun_cocos2d_types_TMXTileFlags_new); + oluacls_func(L, "slice", _olua_fun_cocos2d_types_TMXTileFlags_slice); + oluacls_func(L, "sub", _olua_fun_cocos2d_types_TMXTileFlags_sub); + oluacls_func(L, "take", _olua_fun_cocos2d_types_TMXTileFlags_take); + oluacls_func(L, "tostring", _olua_fun_cocos2d_types_TMXTileFlags_tostring); + oluacls_prop(L, "buffer", _olua_fun_cocos2d_types_TMXTileFlags_buffer, nullptr); + oluacls_prop(L, "length", _olua_fun_cocos2d_types_TMXTileFlags_length, nullptr); + oluacls_prop(L, "value", _olua_fun_cocos2d_types_TMXTileFlags_value, _olua_fun_cocos2d_types_TMXTileFlags_value); - cocos2d::types::TMXTileFlags *self = nullptr; - - olua_to_object(L, 1, &self, "cc.TMXTileFlags"); - - // @getter @name(value) const cocos2d::TMXTileFlags &value() - const cocos2d::TMXTileFlags &ret = self->value(); - int num_ret = olua_push_enum(L, ret); - - olua_endinvoke(L); - - return num_ret; + return 1; } OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_types_TMXTileFlags(lua_State *L) -{ - oluacls_class(L, "cc.TMXTileFlags"); - oluacls_func(L, "__gc", _cocos2d_types_TMXTileFlags___gc); - oluacls_func(L, "__index", _cocos2d_types_TMXTileFlags___index); - oluacls_func(L, "__newindex", _cocos2d_types_TMXTileFlags___newindex); - oluacls_func(L, "__olua_move", _cocos2d_types_TMXTileFlags___olua_move); - oluacls_func(L, "assign", _cocos2d_types_TMXTileFlags_assign); - oluacls_func(L, "new", _cocos2d_types_TMXTileFlags_create); - oluacls_func(L, "slice", _cocos2d_types_TMXTileFlags_slice); - oluacls_func(L, "sub", _cocos2d_types_TMXTileFlags_sub); - oluacls_func(L, "take", _cocos2d_types_TMXTileFlags_take); - oluacls_func(L, "tostring", _cocos2d_types_TMXTileFlags_tostring); - oluacls_prop(L, "length", _cocos2d_types_TMXTileFlags_length, _cocos2d_types_TMXTileFlags_length); - oluacls_prop(L, "rawdata", _cocos2d_types_TMXTileFlags_rawdata, nullptr); - oluacls_prop(L, "sizeof", _cocos2d_types_TMXTileFlags_size, nullptr); - oluacls_prop(L, "value", _cocos2d_types_TMXTileFlags_value, _cocos2d_types_TMXTileFlags_value); - +OLUA_LIB int luaopen_cc_types_TMXTileFlags(lua_State *L) +{ + olua_require(L, "cocos2d_types", luaopen_cocos2d_types); + if (!olua_getclass(L, "cc.types.TMXTileFlags")) { + luaL_error(L, "class not found: cocos2d::types::TMXTileFlags"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_types_Vec2Array___gc(lua_State *L) +static int _olua_fun_cocos2d_types_Vec2Array___gc(lua_State *L) { olua_startinvoke(L); cocos2d::types::Vec2Array *self = nullptr; - olua_to_object(L, 1, &self, "cc.Vec2Array"); + olua_to_object(L, 1, &self, "cc.types.Vec2Array"); // olua_Return __gc(lua_State *L) olua_Return ret = self->__gc(L); @@ -16989,78 +18713,92 @@ static int _cocos2d_types_Vec2Array___gc(lua_State *L) return (int)ret; } -static int _cocos2d_types_Vec2Array___index(lua_State *L) +static int _olua_fun_cocos2d_types_Vec2Array___index(lua_State *L) { olua_startinvoke(L); cocos2d::types::Vec2Array *self = nullptr; unsigned int arg1 = 0; /** idx */ - olua_to_object(L, 1, &self, "cc.Vec2Array"); + olua_to_object(L, 1, &self, "cc.types.Vec2Array"); olua_check_integer(L, 2, &arg1); // cocos2d::Vec2 __index(unsigned int idx) cocos2d::Vec2 ret = self->__index(arg1); - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec2"); + int num_ret = olua_copy_object(L, ret, "cc.Vec2"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_types_Vec2Array___newindex(lua_State *L) +static int _olua_fun_cocos2d_types_Vec2Array___newindex(lua_State *L) { olua_startinvoke(L); cocos2d::types::Vec2Array *self = nullptr; unsigned int arg1 = 0; /** idx */ - cocos2d::Vec2 arg2; /** v */ + cocos2d::Vec2 *arg2; /** v */ - olua_to_object(L, 1, &self, "cc.Vec2Array"); + olua_to_object(L, 1, &self, "cc.types.Vec2Array"); olua_check_integer(L, 2, &arg1); olua_check_object(L, 3, &arg2, "cc.Vec2"); // void __newindex(unsigned int idx, const cocos2d::Vec2 &v) - self->__newindex(arg1, arg2); + self->__newindex(arg1, *arg2); olua_endinvoke(L); return 0; } -static int _cocos2d_types_Vec2Array___olua_move(lua_State *L) +static int _olua_fun_cocos2d_types_Vec2Array___olua_move(lua_State *L) { olua_startinvoke(L); - auto self = (cocos2d::types::Vec2Array *)olua_toobj(L, 1, "cc.Vec2Array"); - olua_push_object(L, self, "cc.Vec2Array"); + auto self = (cocos2d::types::Vec2Array *)olua_toobj(L, 1, "cc.types.Vec2Array"); + olua_push_object(L, self, "cc.types.Vec2Array"); olua_endinvoke(L); return 1; } -static int _cocos2d_types_Vec2Array_assign(lua_State *L) +static int _olua_fun_cocos2d_types_Vec2Array_buffer(lua_State *L) { olua_startinvoke(L); cocos2d::types::Vec2Array *self = nullptr; - const char *arg1 = nullptr; /** data */ - size_t arg2 = 0; /** len */ - olua_to_object(L, 1, &self, "cc.Vec2Array"); - olua_check_string(L, 2, &arg1); - olua_check_integer(L, 3, &arg2); + olua_to_object(L, 1, &self, "cc.types.Vec2Array"); - // void assign(const char *data, size_t len) - self->assign(arg1, arg2); + // @getter @name(buffer) @type(void *) cocos2d::Vec2 *buffer() + void *ret = self->buffer(); + int num_ret = olua_push_object(L, ret, "void *"); olua_endinvoke(L); - return 0; + return num_ret; +} + +static int _olua_fun_cocos2d_types_Vec2Array_length(lua_State *L) +{ + olua_startinvoke(L); + + cocos2d::types::Vec2Array *self = nullptr; + + olua_to_object(L, 1, &self, "cc.types.Vec2Array"); + + // @getter @name(length) size_t length() + size_t ret = self->length(); + int num_ret = olua_push_integer(L, ret); + + olua_endinvoke(L); + + return num_ret; } -static int _cocos2d_types_Vec2Array_create$1(lua_State *L) +static int _olua_fun_cocos2d_types_Vec2Array_new$1(lua_State *L) { olua_startinvoke(L); @@ -17070,7 +18808,7 @@ static int _cocos2d_types_Vec2Array_create$1(lua_State *L) // @postnew @name(new) static cocos2d::types::Vec2Array *create(@optional size_t len) cocos2d::types::Vec2Array *ret = cocos2d::types::Vec2Array::create(arg1); - int num_ret = olua_push_object(L, ret, "cc.Vec2Array"); + int num_ret = olua_push_object(L, ret, "cc.types.Vec2Array"); // insert code after call olua_postnew(L, ret); @@ -17080,13 +18818,13 @@ static int _cocos2d_types_Vec2Array_create$1(lua_State *L) return num_ret; } -static int _cocos2d_types_Vec2Array_create$2(lua_State *L) +static int _olua_fun_cocos2d_types_Vec2Array_new$2(lua_State *L) { olua_startinvoke(L); - // @postnew @name(new) static cocos2d::types::Vec2Array *create(@optional size_t len) + // @postnew @name(new) static cocos2d::types::Vec2Array *create() cocos2d::types::Vec2Array *ret = cocos2d::types::Vec2Array::create(); - int num_ret = olua_push_object(L, ret, "cc.Vec2Array"); + int num_ret = olua_push_object(L, ret, "cc.types.Vec2Array"); // insert code after call olua_postnew(L, ret); @@ -17096,28 +18834,28 @@ static int _cocos2d_types_Vec2Array_create$2(lua_State *L) return num_ret; } -static int _cocos2d_types_Vec2Array_create(lua_State *L) +static int _olua_fun_cocos2d_types_Vec2Array_new(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 0) { - // @postnew @name(new) static cocos2d::types::Vec2Array *create(@optional size_t len) - return _cocos2d_types_Vec2Array_create$2(L); + // @postnew @name(new) static cocos2d::types::Vec2Array *create() + return _olua_fun_cocos2d_types_Vec2Array_new$2(L); } if (num_args == 1) { // if ((olua_is_integer(L, 1))) { // @postnew @name(new) static cocos2d::types::Vec2Array *create(@optional size_t len) - return _cocos2d_types_Vec2Array_create$1(L); + return _olua_fun_cocos2d_types_Vec2Array_new$1(L); // } } - luaL_error(L, "method 'cocos2d::types::Vec2Array::create' not support '%d' arguments", num_args); + luaL_error(L, "method 'cocos2d::types::Vec2Array::new' not support '%d' arguments", num_args); return 0; } -static int _cocos2d_types_Vec2Array_slice$1(lua_State *L) +static int _olua_fun_cocos2d_types_Vec2Array_slice$1(lua_State *L) { olua_startinvoke(L); @@ -17125,13 +18863,13 @@ static int _cocos2d_types_Vec2Array_slice$1(lua_State *L) size_t arg1 = 0; /** from */ size_t arg2 = 0; /** to */ - olua_to_object(L, 1, &self, "cc.Vec2Array"); + olua_to_object(L, 1, &self, "cc.types.Vec2Array"); olua_check_integer(L, 2, &arg1); olua_check_integer(L, 3, &arg2); // @postnew cocos2d::types::Vec2Array *slice(size_t from, @optional size_t to) cocos2d::types::Vec2Array *ret = self->slice(arg1, arg2); - int num_ret = olua_push_object(L, ret, "cc.Vec2Array"); + int num_ret = olua_push_object(L, ret, "cc.types.Vec2Array"); // insert code after call olua_postnew(L, ret); @@ -17141,19 +18879,19 @@ static int _cocos2d_types_Vec2Array_slice$1(lua_State *L) return num_ret; } -static int _cocos2d_types_Vec2Array_slice$2(lua_State *L) +static int _olua_fun_cocos2d_types_Vec2Array_slice$2(lua_State *L) { olua_startinvoke(L); cocos2d::types::Vec2Array *self = nullptr; size_t arg1 = 0; /** from */ - olua_to_object(L, 1, &self, "cc.Vec2Array"); + olua_to_object(L, 1, &self, "cc.types.Vec2Array"); olua_check_integer(L, 2, &arg1); - // @postnew cocos2d::types::Vec2Array *slice(size_t from, @optional size_t to) + // @postnew cocos2d::types::Vec2Array *slice(size_t from) cocos2d::types::Vec2Array *ret = self->slice(arg1); - int num_ret = olua_push_object(L, ret, "cc.Vec2Array"); + int num_ret = olua_push_object(L, ret, "cc.types.Vec2Array"); // insert code after call olua_postnew(L, ret); @@ -17163,21 +18901,21 @@ static int _cocos2d_types_Vec2Array_slice$2(lua_State *L) return num_ret; } -static int _cocos2d_types_Vec2Array_slice(lua_State *L) +static int _olua_fun_cocos2d_types_Vec2Array_slice(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_integer(L, 2))) { - // @postnew cocos2d::types::Vec2Array *slice(size_t from, @optional size_t to) - return _cocos2d_types_Vec2Array_slice$2(L); + // @postnew cocos2d::types::Vec2Array *slice(size_t from) + return _olua_fun_cocos2d_types_Vec2Array_slice$2(L); // } } if (num_args == 2) { // if ((olua_is_integer(L, 2)) && (olua_is_integer(L, 3))) { // @postnew cocos2d::types::Vec2Array *slice(size_t from, @optional size_t to) - return _cocos2d_types_Vec2Array_slice$1(L); + return _olua_fun_cocos2d_types_Vec2Array_slice$1(L); // } } @@ -17186,7 +18924,7 @@ static int _cocos2d_types_Vec2Array_slice(lua_State *L) return 0; } -static int _cocos2d_types_Vec2Array_sub$1(lua_State *L) +static int _olua_fun_cocos2d_types_Vec2Array_sub$1(lua_State *L) { olua_startinvoke(L); @@ -17194,13 +18932,13 @@ static int _cocos2d_types_Vec2Array_sub$1(lua_State *L) size_t arg1 = 0; /** from */ size_t arg2 = 0; /** to */ - olua_to_object(L, 1, &self, "cc.Vec2Array"); + olua_to_object(L, 1, &self, "cc.types.Vec2Array"); olua_check_integer(L, 2, &arg1); olua_check_integer(L, 3, &arg2); // @postnew cocos2d::types::Vec2Array *sub(size_t from, @optional size_t to) cocos2d::types::Vec2Array *ret = self->sub(arg1, arg2); - int num_ret = olua_push_object(L, ret, "cc.Vec2Array"); + int num_ret = olua_push_object(L, ret, "cc.types.Vec2Array"); // insert code after call olua_postnew(L, ret); @@ -17210,19 +18948,19 @@ static int _cocos2d_types_Vec2Array_sub$1(lua_State *L) return num_ret; } -static int _cocos2d_types_Vec2Array_sub$2(lua_State *L) +static int _olua_fun_cocos2d_types_Vec2Array_sub$2(lua_State *L) { olua_startinvoke(L); cocos2d::types::Vec2Array *self = nullptr; size_t arg1 = 0; /** from */ - olua_to_object(L, 1, &self, "cc.Vec2Array"); + olua_to_object(L, 1, &self, "cc.types.Vec2Array"); olua_check_integer(L, 2, &arg1); - // @postnew cocos2d::types::Vec2Array *sub(size_t from, @optional size_t to) + // @postnew cocos2d::types::Vec2Array *sub(size_t from) cocos2d::types::Vec2Array *ret = self->sub(arg1); - int num_ret = olua_push_object(L, ret, "cc.Vec2Array"); + int num_ret = olua_push_object(L, ret, "cc.types.Vec2Array"); // insert code after call olua_postnew(L, ret); @@ -17232,21 +18970,21 @@ static int _cocos2d_types_Vec2Array_sub$2(lua_State *L) return num_ret; } -static int _cocos2d_types_Vec2Array_sub(lua_State *L) +static int _olua_fun_cocos2d_types_Vec2Array_sub(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_integer(L, 2))) { - // @postnew cocos2d::types::Vec2Array *sub(size_t from, @optional size_t to) - return _cocos2d_types_Vec2Array_sub$2(L); + // @postnew cocos2d::types::Vec2Array *sub(size_t from) + return _olua_fun_cocos2d_types_Vec2Array_sub$2(L); // } } if (num_args == 2) { // if ((olua_is_integer(L, 2)) && (olua_is_integer(L, 3))) { // @postnew cocos2d::types::Vec2Array *sub(size_t from, @optional size_t to) - return _cocos2d_types_Vec2Array_sub$1(L); + return _olua_fun_cocos2d_types_Vec2Array_sub$1(L); // } } @@ -17255,31 +18993,31 @@ static int _cocos2d_types_Vec2Array_sub(lua_State *L) return 0; } -static int _cocos2d_types_Vec2Array_take(lua_State *L) +static int _olua_fun_cocos2d_types_Vec2Array_take(lua_State *L) { olua_startinvoke(L); cocos2d::types::Vec2Array *self = nullptr; - olua_to_object(L, 1, &self, "cc.Vec2Array"); + olua_to_object(L, 1, &self, "cc.types.Vec2Array"); // cocos2d::types::Vec2Array *take() cocos2d::types::Vec2Array *ret = self->take(); - int num_ret = olua_push_object(L, ret, "cc.Vec2Array"); + int num_ret = olua_push_object(L, ret, "cc.types.Vec2Array"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_types_Vec2Array_tostring(lua_State *L) +static int _olua_fun_cocos2d_types_Vec2Array_tostring(lua_State *L) { olua_startinvoke(L); cocos2d::types::Vec2Array *self = nullptr; size_t arg2 = 0; /** len */ - olua_to_object(L, 1, &self, "cc.Vec2Array"); + olua_to_object(L, 1, &self, "cc.types.Vec2Array"); olua_check_integer(L, 2, &arg2); // olua_Return tostring(lua_State *L, size_t len) @@ -17290,93 +19028,88 @@ static int _cocos2d_types_Vec2Array_tostring(lua_State *L) return (int)ret; } -static int _cocos2d_types_Vec2Array_length(lua_State *L) +static int _olua_fun_cocos2d_types_Vec2Array_value$1(lua_State *L) { olua_startinvoke(L); cocos2d::types::Vec2Array *self = nullptr; - olua_to_object(L, 1, &self, "cc.Vec2Array"); + olua_to_object(L, 1, &self, "cc.types.Vec2Array"); - // @getter @name(length) size_t length() - size_t ret = self->length(); - int num_ret = olua_push_integer(L, ret); + // @getter @name(value) const cocos2d::Vec2 &value() + const cocos2d::Vec2 &ret = self->value(); + int num_ret = olua_push_object(L, ret, "cc.Vec2"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_types_Vec2Array_rawdata(lua_State *L) +static int _olua_fun_cocos2d_types_Vec2Array_value$2(lua_State *L) { olua_startinvoke(L); cocos2d::types::Vec2Array *self = nullptr; + cocos2d::Vec2 *arg1; /** v */ - olua_to_object(L, 1, &self, "cc.Vec2Array"); + olua_to_object(L, 1, &self, "cc.types.Vec2Array"); + olua_check_object(L, 2, &arg1, "cc.Vec2"); - // @getter @name(rawdata) void *rawdata() - void *ret = self->rawdata(); - int num_ret = olua_push_object(L, ret, "void *"); + // @setter @name(value) void value(const cocos2d::Vec2 &v) + self->value(*arg1); olua_endinvoke(L); - return num_ret; + return 0; } -static int _cocos2d_types_Vec2Array_size(lua_State *L) +static int _olua_fun_cocos2d_types_Vec2Array_value(lua_State *L) { - olua_startinvoke(L); - - cocos2d::types::Vec2Array *self = nullptr; + int num_args = lua_gettop(L) - 1; - olua_to_object(L, 1, &self, "cc.Vec2Array"); + if (num_args == 0) { + // @getter @name(value) const cocos2d::Vec2 &value() + return _olua_fun_cocos2d_types_Vec2Array_value$1(L); + } - // @getter @name(sizeof) size_t size() - size_t ret = self->size(); - int num_ret = olua_push_integer(L, ret); + if (num_args == 1) { + // if ((olua_is_object(L, 2, "cc.Vec2"))) { + // @setter @name(value) void value(const cocos2d::Vec2 &v) + return _olua_fun_cocos2d_types_Vec2Array_value$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'cocos2d::types::Vec2Array::value' not support '%d' arguments", num_args); - return num_ret; + return 0; } -static int _cocos2d_types_Vec2Array_value(lua_State *L) +static int _olua_cls_cc_types_Vec2Array(lua_State *L) { - olua_startinvoke(L); - - cocos2d::types::Vec2Array *self = nullptr; - - olua_to_object(L, 1, &self, "cc.Vec2Array"); - - // @getter @name(value) const cocos2d::Vec2 &value() - const cocos2d::Vec2 &ret = self->value(); - int num_ret = olua_push_object(L, ret, "cc.Vec2"); - - olua_endinvoke(L); + oluacls_class(L, "cc.types.Vec2Array"); + oluacls_func(L, "__gc", _olua_fun_cocos2d_types_Vec2Array___gc); + oluacls_func(L, "__index", _olua_fun_cocos2d_types_Vec2Array___index); + oluacls_func(L, "__newindex", _olua_fun_cocos2d_types_Vec2Array___newindex); + oluacls_func(L, "__olua_move", _olua_fun_cocos2d_types_Vec2Array___olua_move); + oluacls_func(L, "new", _olua_fun_cocos2d_types_Vec2Array_new); + oluacls_func(L, "slice", _olua_fun_cocos2d_types_Vec2Array_slice); + oluacls_func(L, "sub", _olua_fun_cocos2d_types_Vec2Array_sub); + oluacls_func(L, "take", _olua_fun_cocos2d_types_Vec2Array_take); + oluacls_func(L, "tostring", _olua_fun_cocos2d_types_Vec2Array_tostring); + oluacls_prop(L, "buffer", _olua_fun_cocos2d_types_Vec2Array_buffer, nullptr); + oluacls_prop(L, "length", _olua_fun_cocos2d_types_Vec2Array_length, nullptr); + oluacls_prop(L, "value", _olua_fun_cocos2d_types_Vec2Array_value, _olua_fun_cocos2d_types_Vec2Array_value); - return num_ret; + return 1; } OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_types_Vec2Array(lua_State *L) -{ - oluacls_class(L, "cc.Vec2Array"); - oluacls_func(L, "__gc", _cocos2d_types_Vec2Array___gc); - oluacls_func(L, "__index", _cocos2d_types_Vec2Array___index); - oluacls_func(L, "__newindex", _cocos2d_types_Vec2Array___newindex); - oluacls_func(L, "__olua_move", _cocos2d_types_Vec2Array___olua_move); - oluacls_func(L, "assign", _cocos2d_types_Vec2Array_assign); - oluacls_func(L, "new", _cocos2d_types_Vec2Array_create); - oluacls_func(L, "slice", _cocos2d_types_Vec2Array_slice); - oluacls_func(L, "sub", _cocos2d_types_Vec2Array_sub); - oluacls_func(L, "take", _cocos2d_types_Vec2Array_take); - oluacls_func(L, "tostring", _cocos2d_types_Vec2Array_tostring); - oluacls_prop(L, "length", _cocos2d_types_Vec2Array_length, _cocos2d_types_Vec2Array_length); - oluacls_prop(L, "rawdata", _cocos2d_types_Vec2Array_rawdata, nullptr); - oluacls_prop(L, "sizeof", _cocos2d_types_Vec2Array_size, nullptr); - oluacls_prop(L, "value", _cocos2d_types_Vec2Array_value, _cocos2d_types_Vec2Array_value); - +OLUA_LIB int luaopen_cc_types_Vec2Array(lua_State *L) +{ + olua_require(L, "cocos2d_types", luaopen_cocos2d_types); + if (!olua_getclass(L, "cc.types.Vec2Array")) { + luaL_error(L, "class not found: cocos2d::types::Vec2Array"); + } return 1; } OLUA_END_DECLS @@ -17384,46 +19117,46 @@ OLUA_END_DECLS OLUA_BEGIN_DECLS OLUA_LIB int luaopen_cocos2d_types(lua_State *L) { - olua_require(L, "cc.Vec2", luaopen_cocos2d_Vec2); - olua_require(L, "cc.Vec3", luaopen_cocos2d_Vec3); - olua_require(L, "cc.Vec4", luaopen_cocos2d_Vec4); - olua_require(L, "cc.Size", luaopen_cocos2d_Size); - olua_require(L, "cc.Rect", luaopen_cocos2d_Rect); - olua_require(L, "cc.Bounds", luaopen_cocos2d_Bounds); - olua_require(L, "cc.Mat4", luaopen_cocos2d_Mat4); - olua_require(L, "cc.Viewport", luaopen_cocos2d_Viewport); - olua_require(L, "cc.ScissorRect", luaopen_cocos2d_ScissorRect); - olua_require(L, "cc.Quaternion", luaopen_cocos2d_Quaternion); - olua_require(L, "cc.AffineTransform", luaopen_cocos2d_AffineTransform); - olua_require(L, "cc.GLContextAttrs", luaopen_GLContextAttrs); - olua_require(L, "cc.Tex2F", luaopen_cocos2d_Tex2F); - olua_require(L, "cc.T2F_Quad", luaopen_cocos2d_T2F_Quad); - olua_require(L, "cc.ccBezierConfig", luaopen_cocos2d_ccBezierConfig); - olua_require(L, "cc.TTFConfig", luaopen_cocos2d_TTFConfig); - olua_require(L, "cc.BlendFunc", luaopen_cocos2d_BlendFunc); - olua_require(L, "cc.ui.Margin", luaopen_cocos2d_ui_Margin); - olua_require(L, "cc.ResourceData", luaopen_cocos2d_ResourceData); - olua_require(L, "cc.Quad3", luaopen_cocos2d_Quad3); - olua_require(L, "cc.Texture2D.PixelFormatInfo", luaopen_cocos2d_Texture2D_PixelFormatInfo); - olua_require(L, "cc.Controller.KeyStatus", luaopen_cocos2d_Controller_KeyStatus); + olua_require(L, "cc.Vec2", _olua_cls_cc_Vec2); + olua_require(L, "cc.Vec3", _olua_cls_cc_Vec3); + olua_require(L, "cc.Vec4", _olua_cls_cc_Vec4); + olua_require(L, "cc.Size", _olua_cls_cc_Size); + olua_require(L, "cc.Rect", _olua_cls_cc_Rect); + olua_require(L, "cc.Bounds", _olua_cls_cc_Bounds); + olua_require(L, "cc.Mat4", _olua_cls_cc_Mat4); + olua_require(L, "cc.Viewport", _olua_cls_cc_Viewport); + olua_require(L, "cc.ScissorRect", _olua_cls_cc_ScissorRect); + olua_require(L, "cc.Quaternion", _olua_cls_cc_Quaternion); + olua_require(L, "cc.AffineTransform", _olua_cls_cc_AffineTransform); + olua_require(L, "cc.GLContextAttrs", _olua_cls_cc_GLContextAttrs); + olua_require(L, "cc.Tex2F", _olua_cls_cc_Tex2F); + olua_require(L, "cc.T2F_Quad", _olua_cls_cc_T2F_Quad); + olua_require(L, "cc.ccBezierConfig", _olua_cls_cc_ccBezierConfig); + olua_require(L, "cc.TTFConfig", _olua_cls_cc_TTFConfig); + olua_require(L, "cc.BlendFunc", _olua_cls_cc_BlendFunc); + olua_require(L, "cc.ui.Margin", _olua_cls_cc_ui_Margin); + olua_require(L, "cc.ResourceData", _olua_cls_cc_ResourceData); + olua_require(L, "cc.Quad3", _olua_cls_cc_Quad3); + olua_require(L, "cc.Texture2D.PixelFormatInfo", _olua_cls_cc_Texture2D_PixelFormatInfo); + olua_require(L, "cc.Controller.KeyStatus", _olua_cls_cc_Controller_KeyStatus); #if CC_USE_NAVMESH - olua_require(L, "cc.NavMeshAgentParam", luaopen_cocos2d_NavMeshAgentParam); - olua_require(L, "cc.OffMeshLinkData", luaopen_cocos2d_OffMeshLinkData); + olua_require(L, "cc.NavMeshAgentParam", _olua_cls_cc_NavMeshAgentParam); + olua_require(L, "cc.OffMeshLinkData", _olua_cls_cc_OffMeshLinkData); #endif - olua_require(L, "ccb.BlendDescriptor", luaopen_cocos2d_backend_BlendDescriptor); - olua_require(L, "ccb.SamplerDescriptor", luaopen_cocos2d_backend_SamplerDescriptor); - olua_require(L, "ccb.TextureInfo", luaopen_cocos2d_backend_TextureInfo); - olua_require(L, "ccb.AttributeBindInfo", luaopen_cocos2d_backend_AttributeBindInfo); - olua_require(L, "ccb.UniformInfo", luaopen_cocos2d_backend_UniformInfo); - olua_require(L, "ccb.TextureDescriptor", luaopen_cocos2d_backend_TextureDescriptor); - olua_require(L, "ccb.StencilDescriptor", luaopen_cocos2d_backend_StencilDescriptor); - olua_require(L, "ccb.DepthStencilDescriptor", luaopen_cocos2d_backend_DepthStencilDescriptor); - olua_require(L, "ccb.VertexLayout.Attribute", luaopen_cocos2d_backend_VertexLayout_Attribute); - olua_require(L, "cc.VectorString", luaopen_cocos2d_types_VectorString); - olua_require(L, "cc.VectorInt", luaopen_cocos2d_types_VectorInt); - olua_require(L, "cc.ValueMap", luaopen_cocos2d_types_ValueMap); - olua_require(L, "cc.TMXTileFlags", luaopen_cocos2d_types_TMXTileFlags); - olua_require(L, "cc.Vec2Array", luaopen_cocos2d_types_Vec2Array); + olua_require(L, "ccb.BlendDescriptor", _olua_cls_ccb_BlendDescriptor); + olua_require(L, "ccb.SamplerDescriptor", _olua_cls_ccb_SamplerDescriptor); + olua_require(L, "ccb.TextureInfo", _olua_cls_ccb_TextureInfo); + olua_require(L, "ccb.AttributeBindInfo", _olua_cls_ccb_AttributeBindInfo); + olua_require(L, "ccb.UniformInfo", _olua_cls_ccb_UniformInfo); + olua_require(L, "ccb.TextureDescriptor", _olua_cls_ccb_TextureDescriptor); + olua_require(L, "ccb.StencilDescriptor", _olua_cls_ccb_StencilDescriptor); + olua_require(L, "ccb.DepthStencilDescriptor", _olua_cls_ccb_DepthStencilDescriptor); + olua_require(L, "ccb.VertexLayout.Attribute", _olua_cls_ccb_VertexLayout_Attribute); + olua_require(L, "cc.types.VectorString", _olua_cls_cc_types_VectorString); + olua_require(L, "cc.types.VectorInt", _olua_cls_cc_types_VectorInt); + olua_require(L, "cc.types.ValueMap", _olua_cls_cc_types_ValueMap); + olua_require(L, "cc.types.TMXTileFlags", _olua_cls_cc_types_TMXTileFlags); + olua_require(L, "cc.types.Vec2Array", _olua_cls_cc_types_Vec2Array); return 0; } diff --git a/frameworks/cclua/src/lua-bindings/lua_cocos2d_types.h b/frameworks/cclua/src/lua-bindings/lua_cocos2d_types.h index bdcda8cf..9e4d5d4a 100644 --- a/frameworks/cclua/src/lua-bindings/lua_cocos2d_types.h +++ b/frameworks/cclua/src/lua-bindings/lua_cocos2d_types.h @@ -1,5 +1,5 @@ // -// AUTO BUILD, DON'T MODIFY! +// AUTO GENERATED, DO NOT MODIFY! // #ifndef __AUTO_GEN_LUA_COCOS2D_TYPES_H__ #define __AUTO_GEN_LUA_COCOS2D_TYPES_H__ diff --git a/frameworks/cclua/src/lua-bindings/lua_cocos2d_ui.cpp b/frameworks/cclua/src/lua-bindings/lua_cocos2d_ui.cpp index 2346c9fa..34a0c2b2 100644 --- a/frameworks/cclua/src/lua-bindings/lua_cocos2d_ui.cpp +++ b/frameworks/cclua/src/lua-bindings/lua_cocos2d_ui.cpp @@ -1,5 +1,5 @@ // -// AUTO BUILD, DON'T MODIFY! +// AUTO GENERATED, DO NOT MODIFY! // #include "lua_cocos2d_ui.h" #include "lua-bindings/lua_cocos2d_types.h" @@ -9,8 +9,7 @@ #include "ui/UIScrollViewBar.h" #include "ui/UILayoutManager.h" -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ui_Widget_FocusDirection(lua_State *L) +static int _olua_cls_ccui_Widget_FocusDirection(lua_State *L) { oluacls_class(L, "ccui.Widget.FocusDirection"); oluacls_func(L, "__index", olua_indexerror); @@ -22,10 +21,19 @@ OLUA_LIB int luaopen_cocos2d_ui_Widget_FocusDirection(lua_State *L) return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ui_Widget_PositionType(lua_State *L) +OLUA_LIB int luaopen_ccui_Widget_FocusDirection(lua_State *L) +{ + olua_require(L, "cocos2d_ui", luaopen_cocos2d_ui); + if (!olua_getclass(L, "ccui.Widget.FocusDirection")) { + luaL_error(L, "class not found: cocos2d::ui::Widget::FocusDirection"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_ccui_Widget_PositionType(lua_State *L) { oluacls_class(L, "ccui.Widget.PositionType"); oluacls_func(L, "__index", olua_indexerror); @@ -35,10 +43,19 @@ OLUA_LIB int luaopen_cocos2d_ui_Widget_PositionType(lua_State *L) return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ui_Widget_SizeType(lua_State *L) +OLUA_LIB int luaopen_ccui_Widget_PositionType(lua_State *L) +{ + olua_require(L, "cocos2d_ui", luaopen_cocos2d_ui); + if (!olua_getclass(L, "ccui.Widget.PositionType")) { + luaL_error(L, "class not found: cocos2d::ui::Widget::PositionType"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_ccui_Widget_SizeType(lua_State *L) { oluacls_class(L, "ccui.Widget.SizeType"); oluacls_func(L, "__index", olua_indexerror); @@ -48,10 +65,19 @@ OLUA_LIB int luaopen_cocos2d_ui_Widget_SizeType(lua_State *L) return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ui_Widget_TouchEventType(lua_State *L) +OLUA_LIB int luaopen_ccui_Widget_SizeType(lua_State *L) +{ + olua_require(L, "cocos2d_ui", luaopen_cocos2d_ui); + if (!olua_getclass(L, "ccui.Widget.SizeType")) { + luaL_error(L, "class not found: cocos2d::ui::Widget::SizeType"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_ccui_Widget_TouchEventType(lua_State *L) { oluacls_class(L, "ccui.Widget.TouchEventType"); oluacls_func(L, "__index", olua_indexerror); @@ -63,10 +89,19 @@ OLUA_LIB int luaopen_cocos2d_ui_Widget_TouchEventType(lua_State *L) return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ui_Widget_TextureResType(lua_State *L) +OLUA_LIB int luaopen_ccui_Widget_TouchEventType(lua_State *L) +{ + olua_require(L, "cocos2d_ui", luaopen_cocos2d_ui); + if (!olua_getclass(L, "ccui.Widget.TouchEventType")) { + luaL_error(L, "class not found: cocos2d::ui::Widget::TouchEventType"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_ccui_Widget_TextureResType(lua_State *L) { oluacls_class(L, "ccui.Widget.TextureResType"); oluacls_func(L, "__index", olua_indexerror); @@ -76,10 +111,19 @@ OLUA_LIB int luaopen_cocos2d_ui_Widget_TextureResType(lua_State *L) return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ui_Widget_BrightStyle(lua_State *L) +OLUA_LIB int luaopen_ccui_Widget_TextureResType(lua_State *L) +{ + olua_require(L, "cocos2d_ui", luaopen_cocos2d_ui); + if (!olua_getclass(L, "ccui.Widget.TextureResType")) { + luaL_error(L, "class not found: cocos2d::ui::Widget::TextureResType"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_ccui_Widget_BrightStyle(lua_State *L) { oluacls_class(L, "ccui.Widget.BrightStyle"); oluacls_func(L, "__index", olua_indexerror); @@ -90,9 +134,19 @@ OLUA_LIB int luaopen_cocos2d_ui_Widget_BrightStyle(lua_State *L) return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccui_Widget_BrightStyle(lua_State *L) +{ + olua_require(L, "cocos2d_ui", luaopen_cocos2d_ui); + if (!olua_getclass(L, "ccui.Widget.BrightStyle")) { + luaL_error(L, "class not found: cocos2d::ui::Widget::BrightStyle"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_ui_Widget_ccWidgetTouchCallback___call(lua_State *L) +static int _olua_fun_cocos2d_ui_Widget_ccWidgetTouchCallback___call(lua_State *L) { olua_startinvoke(L); @@ -104,17 +158,26 @@ static int _cocos2d_ui_Widget_ccWidgetTouchCallback___call(lua_State *L) return 1; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ui_Widget_ccWidgetTouchCallback(lua_State *L) +static int _olua_cls_ccui_Widget_ccWidgetTouchCallback(lua_State *L) { oluacls_class(L, "ccui.Widget.ccWidgetTouchCallback"); - oluacls_func(L, "__call", _cocos2d_ui_Widget_ccWidgetTouchCallback___call); + oluacls_func(L, "__call", _olua_fun_cocos2d_ui_Widget_ccWidgetTouchCallback___call); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccui_Widget_ccWidgetTouchCallback(lua_State *L) +{ + olua_require(L, "cocos2d_ui", luaopen_cocos2d_ui); + if (!olua_getclass(L, "ccui.Widget.ccWidgetTouchCallback")) { + luaL_error(L, "class not found: cocos2d::ui::Widget::ccWidgetTouchCallback"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_ui_Widget_ccWidgetClickCallback___call(lua_State *L) +static int _olua_fun_cocos2d_ui_Widget_ccWidgetClickCallback___call(lua_State *L) { olua_startinvoke(L); @@ -126,17 +189,26 @@ static int _cocos2d_ui_Widget_ccWidgetClickCallback___call(lua_State *L) return 1; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ui_Widget_ccWidgetClickCallback(lua_State *L) +static int _olua_cls_ccui_Widget_ccWidgetClickCallback(lua_State *L) { oluacls_class(L, "ccui.Widget.ccWidgetClickCallback"); - oluacls_func(L, "__call", _cocos2d_ui_Widget_ccWidgetClickCallback___call); + oluacls_func(L, "__call", _olua_fun_cocos2d_ui_Widget_ccWidgetClickCallback___call); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccui_Widget_ccWidgetClickCallback(lua_State *L) +{ + olua_require(L, "cocos2d_ui", luaopen_cocos2d_ui); + if (!olua_getclass(L, "ccui.Widget.ccWidgetClickCallback")) { + luaL_error(L, "class not found: cocos2d::ui::Widget::ccWidgetClickCallback"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_ui_Widget_ccWidgetEventCallback___call(lua_State *L) +static int _olua_fun_cocos2d_ui_Widget_ccWidgetEventCallback___call(lua_State *L) { olua_startinvoke(L); @@ -148,17 +220,26 @@ static int _cocos2d_ui_Widget_ccWidgetEventCallback___call(lua_State *L) return 1; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ui_Widget_ccWidgetEventCallback(lua_State *L) +static int _olua_cls_ccui_Widget_ccWidgetEventCallback(lua_State *L) { oluacls_class(L, "ccui.Widget.ccWidgetEventCallback"); - oluacls_func(L, "__call", _cocos2d_ui_Widget_ccWidgetEventCallback___call); + oluacls_func(L, "__call", _olua_fun_cocos2d_ui_Widget_ccWidgetEventCallback___call); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccui_Widget_ccWidgetEventCallback(lua_State *L) +{ + olua_require(L, "cocos2d_ui", luaopen_cocos2d_ui); + if (!olua_getclass(L, "ccui.Widget.ccWidgetEventCallback")) { + luaL_error(L, "class not found: cocos2d::ui::Widget::ccWidgetEventCallback"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_ui_LayoutManager_doLayout(lua_State *L) +static int _olua_fun_cocos2d_ui_LayoutManager_doLayout(lua_State *L) { olua_startinvoke(L); @@ -176,17 +257,26 @@ static int _cocos2d_ui_LayoutManager_doLayout(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ui_LayoutManager(lua_State *L) +static int _olua_cls_ccui_LayoutManager(lua_State *L) { oluacls_class(L, "ccui.LayoutManager"); - oluacls_func(L, "doLayout", _cocos2d_ui_LayoutManager_doLayout); + oluacls_func(L, "doLayout", _olua_fun_cocos2d_ui_LayoutManager_doLayout); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccui_LayoutManager(lua_State *L) +{ + olua_require(L, "cocos2d_ui", luaopen_cocos2d_ui); + if (!olua_getclass(L, "ccui.LayoutManager")) { + luaL_error(L, "class not found: cocos2d::ui::LayoutManager"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_ui_LayoutParameterProtocol___gc(lua_State *L) +static int _olua_fun_cocos2d_ui_LayoutParameterProtocol___gc(lua_State *L) { olua_startinvoke(L); @@ -198,7 +288,7 @@ static int _cocos2d_ui_LayoutParameterProtocol___gc(lua_State *L) return 0; } -static int _cocos2d_ui_LayoutParameterProtocol___olua_move(lua_State *L) +static int _olua_fun_cocos2d_ui_LayoutParameterProtocol___olua_move(lua_State *L) { olua_startinvoke(L); @@ -210,7 +300,7 @@ static int _cocos2d_ui_LayoutParameterProtocol___olua_move(lua_State *L) return 1; } -static int _cocos2d_ui_LayoutParameterProtocol_getLayoutParameter(lua_State *L) +static int _olua_fun_cocos2d_ui_LayoutParameterProtocol_getLayoutParameter(lua_State *L) { olua_startinvoke(L); @@ -227,20 +317,29 @@ static int _cocos2d_ui_LayoutParameterProtocol_getLayoutParameter(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ui_LayoutParameterProtocol(lua_State *L) +static int _olua_cls_ccui_LayoutParameterProtocol(lua_State *L) { oluacls_class(L, "ccui.LayoutParameterProtocol"); - oluacls_func(L, "__gc", _cocos2d_ui_LayoutParameterProtocol___gc); - oluacls_func(L, "__olua_move", _cocos2d_ui_LayoutParameterProtocol___olua_move); - oluacls_func(L, "getLayoutParameter", _cocos2d_ui_LayoutParameterProtocol_getLayoutParameter); - oluacls_prop(L, "layoutParameter", _cocos2d_ui_LayoutParameterProtocol_getLayoutParameter, nullptr); + oluacls_func(L, "__gc", _olua_fun_cocos2d_ui_LayoutParameterProtocol___gc); + oluacls_func(L, "__olua_move", _olua_fun_cocos2d_ui_LayoutParameterProtocol___olua_move); + oluacls_func(L, "getLayoutParameter", _olua_fun_cocos2d_ui_LayoutParameterProtocol_getLayoutParameter); + oluacls_prop(L, "layoutParameter", _olua_fun_cocos2d_ui_LayoutParameterProtocol_getLayoutParameter, nullptr); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccui_LayoutParameterProtocol(lua_State *L) +{ + olua_require(L, "cocos2d_ui", luaopen_cocos2d_ui); + if (!olua_getclass(L, "ccui.LayoutParameterProtocol")) { + luaL_error(L, "class not found: cocos2d::ui::LayoutParameterProtocol"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_ui_LayoutProtocol___gc(lua_State *L) +static int _olua_fun_cocos2d_ui_LayoutProtocol___gc(lua_State *L) { olua_startinvoke(L); @@ -252,7 +351,7 @@ static int _cocos2d_ui_LayoutProtocol___gc(lua_State *L) return 0; } -static int _cocos2d_ui_LayoutProtocol___olua_move(lua_State *L) +static int _olua_fun_cocos2d_ui_LayoutProtocol___olua_move(lua_State *L) { olua_startinvoke(L); @@ -264,7 +363,7 @@ static int _cocos2d_ui_LayoutProtocol___olua_move(lua_State *L) return 1; } -static int _cocos2d_ui_LayoutProtocol_createLayoutManager(lua_State *L) +static int _olua_fun_cocos2d_ui_LayoutProtocol_createLayoutManager(lua_State *L) { olua_startinvoke(L); @@ -281,7 +380,7 @@ static int _cocos2d_ui_LayoutProtocol_createLayoutManager(lua_State *L) return num_ret; } -static int _cocos2d_ui_LayoutProtocol_doLayout(lua_State *L) +static int _olua_fun_cocos2d_ui_LayoutProtocol_doLayout(lua_State *L) { olua_startinvoke(L); @@ -297,7 +396,7 @@ static int _cocos2d_ui_LayoutProtocol_doLayout(lua_State *L) return 0; } -static int _cocos2d_ui_LayoutProtocol_getLayoutContentSize(lua_State *L) +static int _olua_fun_cocos2d_ui_LayoutProtocol_getLayoutContentSize(lua_State *L) { olua_startinvoke(L); @@ -307,14 +406,14 @@ static int _cocos2d_ui_LayoutProtocol_getLayoutContentSize(lua_State *L) // cocos2d::Size getLayoutContentSize() cocos2d::Size ret = self->getLayoutContentSize(); - int num_ret = olua_pushcopy_object(L, ret, "cc.Size"); + int num_ret = olua_copy_object(L, ret, "cc.Size"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_ui_LayoutProtocol_getLayoutElements(lua_State *L) +static int _olua_fun_cocos2d_ui_LayoutProtocol_getLayoutElements(lua_State *L) { olua_startinvoke(L); @@ -333,24 +432,33 @@ static int _cocos2d_ui_LayoutProtocol_getLayoutElements(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ui_LayoutProtocol(lua_State *L) +static int _olua_cls_ccui_LayoutProtocol(lua_State *L) { oluacls_class(L, "ccui.LayoutProtocol"); - oluacls_func(L, "__gc", _cocos2d_ui_LayoutProtocol___gc); - oluacls_func(L, "__olua_move", _cocos2d_ui_LayoutProtocol___olua_move); - oluacls_func(L, "createLayoutManager", _cocos2d_ui_LayoutProtocol_createLayoutManager); - oluacls_func(L, "doLayout", _cocos2d_ui_LayoutProtocol_doLayout); - oluacls_func(L, "getLayoutContentSize", _cocos2d_ui_LayoutProtocol_getLayoutContentSize); - oluacls_func(L, "getLayoutElements", _cocos2d_ui_LayoutProtocol_getLayoutElements); - oluacls_prop(L, "layoutContentSize", _cocos2d_ui_LayoutProtocol_getLayoutContentSize, nullptr); - oluacls_prop(L, "layoutElements", _cocos2d_ui_LayoutProtocol_getLayoutElements, nullptr); + oluacls_func(L, "__gc", _olua_fun_cocos2d_ui_LayoutProtocol___gc); + oluacls_func(L, "__olua_move", _olua_fun_cocos2d_ui_LayoutProtocol___olua_move); + oluacls_func(L, "createLayoutManager", _olua_fun_cocos2d_ui_LayoutProtocol_createLayoutManager); + oluacls_func(L, "doLayout", _olua_fun_cocos2d_ui_LayoutProtocol_doLayout); + oluacls_func(L, "getLayoutContentSize", _olua_fun_cocos2d_ui_LayoutProtocol_getLayoutContentSize); + oluacls_func(L, "getLayoutElements", _olua_fun_cocos2d_ui_LayoutProtocol_getLayoutElements); + oluacls_prop(L, "layoutContentSize", _olua_fun_cocos2d_ui_LayoutProtocol_getLayoutContentSize, nullptr); + oluacls_prop(L, "layoutElements", _olua_fun_cocos2d_ui_LayoutProtocol_getLayoutElements, nullptr); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccui_LayoutProtocol(lua_State *L) +{ + olua_require(L, "cocos2d_ui", luaopen_cocos2d_ui); + if (!olua_getclass(L, "ccui.LayoutProtocol")) { + luaL_error(L, "class not found: cocos2d::ui::LayoutProtocol"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_ui_Widget_addCCSEventListener(lua_State *L) +static int _olua_fun_cocos2d_ui_Widget_addCCSEventListener(lua_State *L) { olua_startinvoke(L); @@ -366,16 +474,17 @@ static int _cocos2d_ui_Widget_addCCSEventListener(lua_State *L) std::string cb_tag = "addCCSEventListener"; std::string cb_name; if (olua_isfunction(L, 2)) { - cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](cocos2d::Ref *arg1, int arg2) { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](cocos2d::Ref *cb_arg1, int cb_arg2) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); if (olua_contextequal(L, cb_ctx)) { int top = lua_gettop(L); - olua_push_object(L, arg1, "cc.Ref"); - olua_push_integer(L, arg2); + olua_push_object(L, cb_arg1, "cc.Ref"); + olua_push_integer(L, cb_arg2); olua_callback(L, cb_store, cb_name.c_str(), 2); @@ -395,7 +504,7 @@ static int _cocos2d_ui_Widget_addCCSEventListener(lua_State *L) return 0; } -static int _cocos2d_ui_Widget_addClickEventListener(lua_State *L) +static int _olua_fun_cocos2d_ui_Widget_addClickEventListener(lua_State *L) { olua_startinvoke(L); @@ -411,15 +520,16 @@ static int _cocos2d_ui_Widget_addClickEventListener(lua_State *L) std::string cb_tag = "addClickEventListener"; std::string cb_name; if (olua_isfunction(L, 2)) { - cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](cocos2d::Ref *arg1) { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](cocos2d::Ref *cb_arg1) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); if (olua_contextequal(L, cb_ctx)) { int top = lua_gettop(L); - olua_push_object(L, arg1, "cc.Ref"); + olua_push_object(L, cb_arg1, "cc.Ref"); olua_callback(L, cb_store, cb_name.c_str(), 1); @@ -439,7 +549,7 @@ static int _cocos2d_ui_Widget_addClickEventListener(lua_State *L) return 0; } -static int _cocos2d_ui_Widget_addTouchEventListener(lua_State *L) +static int _olua_fun_cocos2d_ui_Widget_addTouchEventListener(lua_State *L) { olua_startinvoke(L); @@ -455,16 +565,17 @@ static int _cocos2d_ui_Widget_addTouchEventListener(lua_State *L) std::string cb_tag = "addTouchEventListener"; std::string cb_name; if (olua_isfunction(L, 2)) { - cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](cocos2d::Ref *arg1, cocos2d::ui::Widget::TouchEventType arg2) { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](cocos2d::Ref *cb_arg1, cocos2d::ui::Widget::TouchEventType cb_arg2) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); if (olua_contextequal(L, cb_ctx)) { int top = lua_gettop(L); - olua_push_object(L, arg1, "cc.Ref"); - olua_push_enum(L, arg2); + olua_push_object(L, cb_arg1, "cc.Ref"); + olua_push_enum(L, cb_arg2); olua_callback(L, cb_store, cb_name.c_str(), 2); @@ -484,7 +595,7 @@ static int _cocos2d_ui_Widget_addTouchEventListener(lua_State *L) return 0; } -static int _cocos2d_ui_Widget_as(lua_State *L) +static int _olua_fun_cocos2d_ui_Widget_as(lua_State *L) { olua_startinvoke(L); @@ -512,7 +623,7 @@ static int _cocos2d_ui_Widget_as(lua_State *L) return 1; } -static int _cocos2d_ui_Widget_clone(lua_State *L) +static int _olua_fun_cocos2d_ui_Widget_clone(lua_State *L) { olua_startinvoke(L); @@ -529,7 +640,7 @@ static int _cocos2d_ui_Widget_clone(lua_State *L) return num_ret; } -static int _cocos2d_ui_Widget_create(lua_State *L) +static int _olua_fun_cocos2d_ui_Widget_create(lua_State *L) { olua_startinvoke(L); @@ -542,7 +653,7 @@ static int _cocos2d_ui_Widget_create(lua_State *L) return num_ret; } -static int _cocos2d_ui_Widget_dispatchFocusEvent(lua_State *L) +static int _olua_fun_cocos2d_ui_Widget_dispatchFocusEvent(lua_State *L) { olua_startinvoke(L); @@ -566,7 +677,7 @@ static int _cocos2d_ui_Widget_dispatchFocusEvent(lua_State *L) return 0; } -static int _cocos2d_ui_Widget_enableDpadNavigation(lua_State *L) +static int _olua_fun_cocos2d_ui_Widget_enableDpadNavigation(lua_State *L) { olua_startinvoke(L); @@ -582,7 +693,7 @@ static int _cocos2d_ui_Widget_enableDpadNavigation(lua_State *L) return 0; } -static int _cocos2d_ui_Widget_findNextFocusedWidget(lua_State *L) +static int _olua_fun_cocos2d_ui_Widget_findNextFocusedWidget(lua_State *L) { olua_startinvoke(L); @@ -605,7 +716,7 @@ static int _cocos2d_ui_Widget_findNextFocusedWidget(lua_State *L) return num_ret; } -static int _cocos2d_ui_Widget_getActionTag(lua_State *L) +static int _olua_fun_cocos2d_ui_Widget_getActionTag(lua_State *L) { olua_startinvoke(L); @@ -622,7 +733,7 @@ static int _cocos2d_ui_Widget_getActionTag(lua_State *L) return num_ret; } -static int _cocos2d_ui_Widget_getBottomBoundary(lua_State *L) +static int _olua_fun_cocos2d_ui_Widget_getBottomBoundary(lua_State *L) { olua_startinvoke(L); @@ -639,7 +750,7 @@ static int _cocos2d_ui_Widget_getBottomBoundary(lua_State *L) return num_ret; } -static int _cocos2d_ui_Widget_getCallbackName(lua_State *L) +static int _olua_fun_cocos2d_ui_Widget_getCallbackName(lua_State *L) { olua_startinvoke(L); @@ -656,7 +767,7 @@ static int _cocos2d_ui_Widget_getCallbackName(lua_State *L) return num_ret; } -static int _cocos2d_ui_Widget_getCallbackType(lua_State *L) +static int _olua_fun_cocos2d_ui_Widget_getCallbackType(lua_State *L) { olua_startinvoke(L); @@ -673,7 +784,7 @@ static int _cocos2d_ui_Widget_getCallbackType(lua_State *L) return num_ret; } -static int _cocos2d_ui_Widget_getCurrentFocusedWidget(lua_State *L) +static int _olua_fun_cocos2d_ui_Widget_getCurrentFocusedWidget(lua_State *L) { olua_startinvoke(L); @@ -686,7 +797,7 @@ static int _cocos2d_ui_Widget_getCurrentFocusedWidget(lua_State *L) return num_ret; } -static int _cocos2d_ui_Widget_getCustomSize(lua_State *L) +static int _olua_fun_cocos2d_ui_Widget_getCustomSize(lua_State *L) { olua_startinvoke(L); @@ -703,7 +814,7 @@ static int _cocos2d_ui_Widget_getCustomSize(lua_State *L) return num_ret; } -static int _cocos2d_ui_Widget_getLayoutParameter(lua_State *L) +static int _olua_fun_cocos2d_ui_Widget_getLayoutParameter(lua_State *L) { olua_startinvoke(L); @@ -720,7 +831,7 @@ static int _cocos2d_ui_Widget_getLayoutParameter(lua_State *L) return num_ret; } -static int _cocos2d_ui_Widget_getLayoutSize(lua_State *L) +static int _olua_fun_cocos2d_ui_Widget_getLayoutSize(lua_State *L) { olua_startinvoke(L); @@ -737,7 +848,7 @@ static int _cocos2d_ui_Widget_getLayoutSize(lua_State *L) return num_ret; } -static int _cocos2d_ui_Widget_getLeftBoundary(lua_State *L) +static int _olua_fun_cocos2d_ui_Widget_getLeftBoundary(lua_State *L) { olua_startinvoke(L); @@ -754,7 +865,7 @@ static int _cocos2d_ui_Widget_getLeftBoundary(lua_State *L) return num_ret; } -static int _cocos2d_ui_Widget_getPositionPercent(lua_State *L) +static int _olua_fun_cocos2d_ui_Widget_getPositionPercent(lua_State *L) { olua_startinvoke(L); @@ -771,7 +882,7 @@ static int _cocos2d_ui_Widget_getPositionPercent(lua_State *L) return num_ret; } -static int _cocos2d_ui_Widget_getPositionType(lua_State *L) +static int _olua_fun_cocos2d_ui_Widget_getPositionType(lua_State *L) { olua_startinvoke(L); @@ -788,7 +899,7 @@ static int _cocos2d_ui_Widget_getPositionType(lua_State *L) return num_ret; } -static int _cocos2d_ui_Widget_getRightBoundary(lua_State *L) +static int _olua_fun_cocos2d_ui_Widget_getRightBoundary(lua_State *L) { olua_startinvoke(L); @@ -805,7 +916,7 @@ static int _cocos2d_ui_Widget_getRightBoundary(lua_State *L) return num_ret; } -static int _cocos2d_ui_Widget_getSizePercent(lua_State *L) +static int _olua_fun_cocos2d_ui_Widget_getSizePercent(lua_State *L) { olua_startinvoke(L); @@ -822,7 +933,7 @@ static int _cocos2d_ui_Widget_getSizePercent(lua_State *L) return num_ret; } -static int _cocos2d_ui_Widget_getSizeType(lua_State *L) +static int _olua_fun_cocos2d_ui_Widget_getSizeType(lua_State *L) { olua_startinvoke(L); @@ -839,7 +950,7 @@ static int _cocos2d_ui_Widget_getSizeType(lua_State *L) return num_ret; } -static int _cocos2d_ui_Widget_getTopBoundary(lua_State *L) +static int _olua_fun_cocos2d_ui_Widget_getTopBoundary(lua_State *L) { olua_startinvoke(L); @@ -856,7 +967,7 @@ static int _cocos2d_ui_Widget_getTopBoundary(lua_State *L) return num_ret; } -static int _cocos2d_ui_Widget_getTouchBeganPosition(lua_State *L) +static int _olua_fun_cocos2d_ui_Widget_getTouchBeganPosition(lua_State *L) { olua_startinvoke(L); @@ -873,7 +984,7 @@ static int _cocos2d_ui_Widget_getTouchBeganPosition(lua_State *L) return num_ret; } -static int _cocos2d_ui_Widget_getTouchEndPosition(lua_State *L) +static int _olua_fun_cocos2d_ui_Widget_getTouchEndPosition(lua_State *L) { olua_startinvoke(L); @@ -890,7 +1001,7 @@ static int _cocos2d_ui_Widget_getTouchEndPosition(lua_State *L) return num_ret; } -static int _cocos2d_ui_Widget_getTouchMovePosition(lua_State *L) +static int _olua_fun_cocos2d_ui_Widget_getTouchMovePosition(lua_State *L) { olua_startinvoke(L); @@ -907,7 +1018,7 @@ static int _cocos2d_ui_Widget_getTouchMovePosition(lua_State *L) return num_ret; } -static int _cocos2d_ui_Widget_getVirtualRenderer(lua_State *L) +static int _olua_fun_cocos2d_ui_Widget_getVirtualRenderer(lua_State *L) { olua_startinvoke(L); @@ -927,7 +1038,7 @@ static int _cocos2d_ui_Widget_getVirtualRenderer(lua_State *L) return num_ret; } -static int _cocos2d_ui_Widget_getVirtualRendererSize(lua_State *L) +static int _olua_fun_cocos2d_ui_Widget_getVirtualRendererSize(lua_State *L) { olua_startinvoke(L); @@ -937,14 +1048,14 @@ static int _cocos2d_ui_Widget_getVirtualRendererSize(lua_State *L) // cocos2d::Size getVirtualRendererSize() cocos2d::Size ret = self->getVirtualRendererSize(); - int num_ret = olua_pushcopy_object(L, ret, "cc.Size"); + int num_ret = olua_copy_object(L, ret, "cc.Size"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_ui_Widget_getWorldPosition(lua_State *L) +static int _olua_fun_cocos2d_ui_Widget_getWorldPosition(lua_State *L) { olua_startinvoke(L); @@ -954,19 +1065,19 @@ static int _cocos2d_ui_Widget_getWorldPosition(lua_State *L) // cocos2d::Vec2 getWorldPosition() cocos2d::Vec2 ret = self->getWorldPosition(); - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec2"); + int num_ret = olua_copy_object(L, ret, "cc.Vec2"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_ui_Widget_hitTest(lua_State *L) +static int _olua_fun_cocos2d_ui_Widget_hitTest(lua_State *L) { olua_startinvoke(L); cocos2d::ui::Widget *self = nullptr; - cocos2d::Vec2 arg1; /** pt */ + cocos2d::Vec2 *arg1; /** pt */ cocos2d::Camera *arg2 = nullptr; /** camera */ cocos2d::Vec3 *arg3 = nullptr; /** p */ @@ -976,7 +1087,7 @@ static int _cocos2d_ui_Widget_hitTest(lua_State *L) olua_check_object(L, 4, &arg3, "cc.Vec3"); // bool hitTest(const cocos2d::Vec2 &pt, const cocos2d::Camera *camera, cocos2d::Vec3 *p) - bool ret = self->hitTest(arg1, arg2, arg3); + bool ret = self->hitTest(*arg1, arg2, arg3); int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); @@ -984,7 +1095,7 @@ static int _cocos2d_ui_Widget_hitTest(lua_State *L) return num_ret; } -static int _cocos2d_ui_Widget_ignoreContentAdaptWithSize(lua_State *L) +static int _olua_fun_cocos2d_ui_Widget_ignoreContentAdaptWithSize(lua_State *L) { olua_startinvoke(L); @@ -1002,7 +1113,7 @@ static int _cocos2d_ui_Widget_ignoreContentAdaptWithSize(lua_State *L) return 0; } -static int _cocos2d_ui_Widget_interceptTouchEvent(lua_State *L) +static int _olua_fun_cocos2d_ui_Widget_interceptTouchEvent(lua_State *L) { olua_startinvoke(L); @@ -1024,7 +1135,7 @@ static int _cocos2d_ui_Widget_interceptTouchEvent(lua_State *L) return 0; } -static int _cocos2d_ui_Widget_isBright(lua_State *L) +static int _olua_fun_cocos2d_ui_Widget_isBright(lua_State *L) { olua_startinvoke(L); @@ -1041,18 +1152,18 @@ static int _cocos2d_ui_Widget_isBright(lua_State *L) return num_ret; } -static int _cocos2d_ui_Widget_isClippingParentContainsPoint(lua_State *L) +static int _olua_fun_cocos2d_ui_Widget_isClippingParentContainsPoint(lua_State *L) { olua_startinvoke(L); cocos2d::ui::Widget *self = nullptr; - cocos2d::Vec2 arg1; /** pt */ + cocos2d::Vec2 *arg1; /** pt */ olua_to_object(L, 1, &self, "ccui.Widget"); olua_check_object(L, 2, &arg1, "cc.Vec2"); // bool isClippingParentContainsPoint(const cocos2d::Vec2 &pt) - bool ret = self->isClippingParentContainsPoint(arg1); + bool ret = self->isClippingParentContainsPoint(*arg1); int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); @@ -1060,7 +1171,7 @@ static int _cocos2d_ui_Widget_isClippingParentContainsPoint(lua_State *L) return num_ret; } -static int _cocos2d_ui_Widget_isEnabled(lua_State *L) +static int _olua_fun_cocos2d_ui_Widget_isEnabled(lua_State *L) { olua_startinvoke(L); @@ -1077,7 +1188,7 @@ static int _cocos2d_ui_Widget_isEnabled(lua_State *L) return num_ret; } -static int _cocos2d_ui_Widget_isFlippedX(lua_State *L) +static int _olua_fun_cocos2d_ui_Widget_isFlippedX(lua_State *L) { olua_startinvoke(L); @@ -1094,7 +1205,7 @@ static int _cocos2d_ui_Widget_isFlippedX(lua_State *L) return num_ret; } -static int _cocos2d_ui_Widget_isFlippedY(lua_State *L) +static int _olua_fun_cocos2d_ui_Widget_isFlippedY(lua_State *L) { olua_startinvoke(L); @@ -1111,7 +1222,7 @@ static int _cocos2d_ui_Widget_isFlippedY(lua_State *L) return num_ret; } -static int _cocos2d_ui_Widget_isFocusEnabled(lua_State *L) +static int _olua_fun_cocos2d_ui_Widget_isFocusEnabled(lua_State *L) { olua_startinvoke(L); @@ -1128,7 +1239,7 @@ static int _cocos2d_ui_Widget_isFocusEnabled(lua_State *L) return num_ret; } -static int _cocos2d_ui_Widget_isFocused(lua_State *L) +static int _olua_fun_cocos2d_ui_Widget_isFocused(lua_State *L) { olua_startinvoke(L); @@ -1145,7 +1256,7 @@ static int _cocos2d_ui_Widget_isFocused(lua_State *L) return num_ret; } -static int _cocos2d_ui_Widget_isHighlighted(lua_State *L) +static int _olua_fun_cocos2d_ui_Widget_isHighlighted(lua_State *L) { olua_startinvoke(L); @@ -1162,7 +1273,7 @@ static int _cocos2d_ui_Widget_isHighlighted(lua_State *L) return num_ret; } -static int _cocos2d_ui_Widget_isIgnoreContentAdaptWithSize(lua_State *L) +static int _olua_fun_cocos2d_ui_Widget_isIgnoreContentAdaptWithSize(lua_State *L) { olua_startinvoke(L); @@ -1179,7 +1290,7 @@ static int _cocos2d_ui_Widget_isIgnoreContentAdaptWithSize(lua_State *L) return num_ret; } -static int _cocos2d_ui_Widget_isLayoutComponentEnabled(lua_State *L) +static int _olua_fun_cocos2d_ui_Widget_isLayoutComponentEnabled(lua_State *L) { olua_startinvoke(L); @@ -1196,7 +1307,7 @@ static int _cocos2d_ui_Widget_isLayoutComponentEnabled(lua_State *L) return num_ret; } -static int _cocos2d_ui_Widget_isPropagateTouchEvents(lua_State *L) +static int _olua_fun_cocos2d_ui_Widget_isPropagateTouchEvents(lua_State *L) { olua_startinvoke(L); @@ -1213,7 +1324,7 @@ static int _cocos2d_ui_Widget_isPropagateTouchEvents(lua_State *L) return num_ret; } -static int _cocos2d_ui_Widget_isSwallowTouches(lua_State *L) +static int _olua_fun_cocos2d_ui_Widget_isSwallowTouches(lua_State *L) { olua_startinvoke(L); @@ -1230,7 +1341,7 @@ static int _cocos2d_ui_Widget_isSwallowTouches(lua_State *L) return num_ret; } -static int _cocos2d_ui_Widget_isTouchEnabled(lua_State *L) +static int _olua_fun_cocos2d_ui_Widget_isTouchEnabled(lua_State *L) { olua_startinvoke(L); @@ -1247,7 +1358,7 @@ static int _cocos2d_ui_Widget_isTouchEnabled(lua_State *L) return num_ret; } -static int _cocos2d_ui_Widget_isUnifySizeEnabled(lua_State *L) +static int _olua_fun_cocos2d_ui_Widget_isUnifySizeEnabled(lua_State *L) { olua_startinvoke(L); @@ -1264,11 +1375,11 @@ static int _cocos2d_ui_Widget_isUnifySizeEnabled(lua_State *L) return num_ret; } -static int _cocos2d_ui_Widget_new(lua_State *L) +static int _olua_fun_cocos2d_ui_Widget_new(lua_State *L) { olua_startinvoke(L); - // Widget() + // cocos2d::ui::Widget() cocos2d::ui::Widget *ret = new cocos2d::ui::Widget(); int num_ret = olua_push_object(L, ret, "ccui.Widget"); olua_postnew(L, ret); @@ -1278,7 +1389,7 @@ static int _cocos2d_ui_Widget_new(lua_State *L) return num_ret; } -static int _cocos2d_ui_Widget_onFocusChange(lua_State *L) +static int _olua_fun_cocos2d_ui_Widget_onFocusChange(lua_State *L) { olua_startinvoke(L); @@ -1302,7 +1413,192 @@ static int _cocos2d_ui_Widget_onFocusChange(lua_State *L) return 0; } -static int _cocos2d_ui_Widget_onTouchBegan(lua_State *L) +static int _olua_fun_cocos2d_ui_Widget_onFocusChanged$1(lua_State *L) +{ + olua_startinvoke(L); + + cocos2d::ui::Widget *self = nullptr; + + olua_to_object(L, 1, &self, "ccui.Widget"); + + void *cb_store = (void *)self; + std::string cb_tag = "onFocusChanged"; + olua_getcallback(L, cb_store, cb_tag.c_str(), OLUA_TAG_EQUAL); + + // std::function onFocusChanged + std::function ret = self->onFocusChanged; + int num_ret = olua_push_callback(L, &ret, "std.function"); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_cocos2d_ui_Widget_onFocusChanged$2(lua_State *L) +{ + olua_startinvoke(L); + + cocos2d::ui::Widget *self = nullptr; + std::function arg1; /** onFocusChanged */ + + olua_to_object(L, 1, &self, "ccui.Widget"); + if (!olua_isnoneornil(L, 2)) { + olua_check_callback(L, 2, &arg1, "std.function"); + } + + void *cb_store = (void *)self; + std::string cb_tag = "onFocusChanged"; + std::string cb_name; + if (olua_isfunction(L, 2)) { + cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + olua_Context cb_ctx = olua_context(L); + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](cocos2d::ui::Widget *cb_arg1, cocos2d::ui::Widget *cb_arg2) { + lua_State *L = olua_mainthread(NULL); + olua_checkhostthread(); + + if (olua_contextequal(L, cb_ctx)) { + int top = lua_gettop(L); + size_t last = olua_push_objpool(L); + olua_enable_objpool(L); + olua_push_object(L, cb_arg1, "ccui.Widget"); + olua_push_object(L, cb_arg2, "ccui.Widget"); + olua_disable_objpool(L); + + olua_callback(L, cb_store, cb_name.c_str(), 2); + + //pop stack value + olua_pop_objpool(L, last); + lua_settop(L, top); + } + }; + } else { + olua_removecallback(L, cb_store, cb_tag.c_str(), OLUA_TAG_EQUAL); + arg1 = nullptr; + } + + // std::function onFocusChanged + self->onFocusChanged = arg1; + + olua_endinvoke(L); + + return 0; +} + +static int _olua_fun_cocos2d_ui_Widget_onFocusChanged(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // std::function onFocusChanged + return _olua_fun_cocos2d_ui_Widget_onFocusChanged$1(L); + } + + if (num_args == 1) { + // if ((olua_is_callback(L, 2, "std.function") || olua_isnil(L, 2))) { + // std::function onFocusChanged + return _olua_fun_cocos2d_ui_Widget_onFocusChanged$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::ui::Widget::onFocusChanged' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_ui_Widget_onNextFocusedWidget$1(lua_State *L) +{ + olua_startinvoke(L); + + cocos2d::ui::Widget *self = nullptr; + + olua_to_object(L, 1, &self, "ccui.Widget"); + + void *cb_store = (void *)self; + std::string cb_tag = "onNextFocusedWidget"; + olua_getcallback(L, cb_store, cb_tag.c_str(), OLUA_TAG_EQUAL); + + // std::function onNextFocusedWidget + std::function ret = self->onNextFocusedWidget; + int num_ret = olua_push_callback(L, &ret, "std.function"); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_cocos2d_ui_Widget_onNextFocusedWidget$2(lua_State *L) +{ + olua_startinvoke(L); + + cocos2d::ui::Widget *self = nullptr; + std::function arg1; /** onNextFocusedWidget */ + + olua_to_object(L, 1, &self, "ccui.Widget"); + if (!olua_isnoneornil(L, 2)) { + olua_check_callback(L, 2, &arg1, "std.function"); + } + + void *cb_store = (void *)self; + std::string cb_tag = "onNextFocusedWidget"; + std::string cb_name; + if (olua_isfunction(L, 2)) { + cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + olua_Context cb_ctx = olua_context(L); + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](cocos2d::ui::Widget::FocusDirection cb_arg1) { + lua_State *L = olua_mainthread(NULL); + olua_checkhostthread(); + cocos2d::ui::Widget *ret = nullptr; /** ret */ + if (olua_contextequal(L, cb_ctx)) { + int top = lua_gettop(L); + olua_push_enum(L, cb_arg1); + + olua_callback(L, cb_store, cb_name.c_str(), 1); + + if (olua_is_object(L, -1, "ccui.Widget")) { + olua_check_object(L, -1, &ret, "ccui.Widget"); + } + + lua_settop(L, top); + } + return ret; + }; + } else { + olua_removecallback(L, cb_store, cb_tag.c_str(), OLUA_TAG_EQUAL); + arg1 = nullptr; + } + + // std::function onNextFocusedWidget + self->onNextFocusedWidget = arg1; + + olua_endinvoke(L); + + return 0; +} + +static int _olua_fun_cocos2d_ui_Widget_onNextFocusedWidget(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // std::function onNextFocusedWidget + return _olua_fun_cocos2d_ui_Widget_onNextFocusedWidget$1(L); + } + + if (num_args == 1) { + // if ((olua_is_callback(L, 2, "std.function") || olua_isnil(L, 2))) { + // std::function onNextFocusedWidget + return _olua_fun_cocos2d_ui_Widget_onNextFocusedWidget$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::ui::Widget::onNextFocusedWidget' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_ui_Widget_onTouchBegan(lua_State *L) { olua_startinvoke(L); @@ -1323,7 +1619,7 @@ static int _cocos2d_ui_Widget_onTouchBegan(lua_State *L) return num_ret; } -static int _cocos2d_ui_Widget_onTouchCancelled(lua_State *L) +static int _olua_fun_cocos2d_ui_Widget_onTouchCancelled(lua_State *L) { olua_startinvoke(L); @@ -1343,7 +1639,7 @@ static int _cocos2d_ui_Widget_onTouchCancelled(lua_State *L) return 0; } -static int _cocos2d_ui_Widget_onTouchEnded(lua_State *L) +static int _olua_fun_cocos2d_ui_Widget_onTouchEnded(lua_State *L) { olua_startinvoke(L); @@ -1363,7 +1659,7 @@ static int _cocos2d_ui_Widget_onTouchEnded(lua_State *L) return 0; } -static int _cocos2d_ui_Widget_onTouchMoved(lua_State *L) +static int _olua_fun_cocos2d_ui_Widget_onTouchMoved(lua_State *L) { olua_startinvoke(L); @@ -1383,7 +1679,7 @@ static int _cocos2d_ui_Widget_onTouchMoved(lua_State *L) return 0; } -static int _cocos2d_ui_Widget_propagateTouchEvent(lua_State *L) +static int _olua_fun_cocos2d_ui_Widget_propagateTouchEvent(lua_State *L) { olua_startinvoke(L); @@ -1405,7 +1701,7 @@ static int _cocos2d_ui_Widget_propagateTouchEvent(lua_State *L) return 0; } -static int _cocos2d_ui_Widget_requestFocus(lua_State *L) +static int _olua_fun_cocos2d_ui_Widget_requestFocus(lua_State *L) { olua_startinvoke(L); @@ -1421,7 +1717,7 @@ static int _cocos2d_ui_Widget_requestFocus(lua_State *L) return 0; } -static int _cocos2d_ui_Widget_setActionTag(lua_State *L) +static int _olua_fun_cocos2d_ui_Widget_setActionTag(lua_State *L) { olua_startinvoke(L); @@ -1439,7 +1735,7 @@ static int _cocos2d_ui_Widget_setActionTag(lua_State *L) return 0; } -static int _cocos2d_ui_Widget_setBright(lua_State *L) +static int _olua_fun_cocos2d_ui_Widget_setBright(lua_State *L) { olua_startinvoke(L); @@ -1457,7 +1753,7 @@ static int _cocos2d_ui_Widget_setBright(lua_State *L) return 0; } -static int _cocos2d_ui_Widget_setBrightStyle(lua_State *L) +static int _olua_fun_cocos2d_ui_Widget_setBrightStyle(lua_State *L) { olua_startinvoke(L); @@ -1475,7 +1771,7 @@ static int _cocos2d_ui_Widget_setBrightStyle(lua_State *L) return 0; } -static int _cocos2d_ui_Widget_setCallbackName(lua_State *L) +static int _olua_fun_cocos2d_ui_Widget_setCallbackName(lua_State *L) { olua_startinvoke(L); @@ -1493,7 +1789,7 @@ static int _cocos2d_ui_Widget_setCallbackName(lua_State *L) return 0; } -static int _cocos2d_ui_Widget_setCallbackType(lua_State *L) +static int _olua_fun_cocos2d_ui_Widget_setCallbackType(lua_State *L) { olua_startinvoke(L); @@ -1511,7 +1807,7 @@ static int _cocos2d_ui_Widget_setCallbackType(lua_State *L) return 0; } -static int _cocos2d_ui_Widget_setEnabled(lua_State *L) +static int _olua_fun_cocos2d_ui_Widget_setEnabled(lua_State *L) { olua_startinvoke(L); @@ -1529,7 +1825,7 @@ static int _cocos2d_ui_Widget_setEnabled(lua_State *L) return 0; } -static int _cocos2d_ui_Widget_setFlippedX(lua_State *L) +static int _olua_fun_cocos2d_ui_Widget_setFlippedX(lua_State *L) { olua_startinvoke(L); @@ -1547,7 +1843,7 @@ static int _cocos2d_ui_Widget_setFlippedX(lua_State *L) return 0; } -static int _cocos2d_ui_Widget_setFlippedY(lua_State *L) +static int _olua_fun_cocos2d_ui_Widget_setFlippedY(lua_State *L) { olua_startinvoke(L); @@ -1565,7 +1861,7 @@ static int _cocos2d_ui_Widget_setFlippedY(lua_State *L) return 0; } -static int _cocos2d_ui_Widget_setFocusEnabled(lua_State *L) +static int _olua_fun_cocos2d_ui_Widget_setFocusEnabled(lua_State *L) { olua_startinvoke(L); @@ -1583,7 +1879,7 @@ static int _cocos2d_ui_Widget_setFocusEnabled(lua_State *L) return 0; } -static int _cocos2d_ui_Widget_setFocused(lua_State *L) +static int _olua_fun_cocos2d_ui_Widget_setFocused(lua_State *L) { olua_startinvoke(L); @@ -1601,7 +1897,7 @@ static int _cocos2d_ui_Widget_setFocused(lua_State *L) return 0; } -static int _cocos2d_ui_Widget_setHighlighted(lua_State *L) +static int _olua_fun_cocos2d_ui_Widget_setHighlighted(lua_State *L) { olua_startinvoke(L); @@ -1619,7 +1915,7 @@ static int _cocos2d_ui_Widget_setHighlighted(lua_State *L) return 0; } -static int _cocos2d_ui_Widget_setLayoutComponentEnabled(lua_State *L) +static int _olua_fun_cocos2d_ui_Widget_setLayoutComponentEnabled(lua_State *L) { olua_startinvoke(L); @@ -1637,7 +1933,7 @@ static int _cocos2d_ui_Widget_setLayoutComponentEnabled(lua_State *L) return 0; } -static int _cocos2d_ui_Widget_setLayoutParameter(lua_State *L) +static int _olua_fun_cocos2d_ui_Widget_setLayoutParameter(lua_State *L) { olua_startinvoke(L); @@ -1655,25 +1951,25 @@ static int _cocos2d_ui_Widget_setLayoutParameter(lua_State *L) return 0; } -static int _cocos2d_ui_Widget_setPositionPercent(lua_State *L) +static int _olua_fun_cocos2d_ui_Widget_setPositionPercent(lua_State *L) { olua_startinvoke(L); cocos2d::ui::Widget *self = nullptr; - cocos2d::Vec2 arg1; /** percent */ + cocos2d::Vec2 *arg1; /** percent */ olua_to_object(L, 1, &self, "ccui.Widget"); olua_check_object(L, 2, &arg1, "cc.Vec2"); // void setPositionPercent(const cocos2d::Vec2 &percent) - self->setPositionPercent(arg1); + self->setPositionPercent(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_ui_Widget_setPositionType(lua_State *L) +static int _olua_fun_cocos2d_ui_Widget_setPositionType(lua_State *L) { olua_startinvoke(L); @@ -1691,7 +1987,7 @@ static int _cocos2d_ui_Widget_setPositionType(lua_State *L) return 0; } -static int _cocos2d_ui_Widget_setPropagateTouchEvents(lua_State *L) +static int _olua_fun_cocos2d_ui_Widget_setPropagateTouchEvents(lua_State *L) { olua_startinvoke(L); @@ -1709,25 +2005,25 @@ static int _cocos2d_ui_Widget_setPropagateTouchEvents(lua_State *L) return 0; } -static int _cocos2d_ui_Widget_setSizePercent(lua_State *L) +static int _olua_fun_cocos2d_ui_Widget_setSizePercent(lua_State *L) { olua_startinvoke(L); cocos2d::ui::Widget *self = nullptr; - cocos2d::Vec2 arg1; /** percent */ + cocos2d::Vec2 *arg1; /** percent */ olua_to_object(L, 1, &self, "ccui.Widget"); olua_check_object(L, 2, &arg1, "cc.Vec2"); // void setSizePercent(const cocos2d::Vec2 &percent) - self->setSizePercent(arg1); + self->setSizePercent(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_ui_Widget_setSizeType(lua_State *L) +static int _olua_fun_cocos2d_ui_Widget_setSizeType(lua_State *L) { olua_startinvoke(L); @@ -1745,7 +2041,7 @@ static int _cocos2d_ui_Widget_setSizeType(lua_State *L) return 0; } -static int _cocos2d_ui_Widget_setSwallowTouches(lua_State *L) +static int _olua_fun_cocos2d_ui_Widget_setSwallowTouches(lua_State *L) { olua_startinvoke(L); @@ -1763,7 +2059,7 @@ static int _cocos2d_ui_Widget_setSwallowTouches(lua_State *L) return 0; } -static int _cocos2d_ui_Widget_setTouchEnabled(lua_State *L) +static int _olua_fun_cocos2d_ui_Widget_setTouchEnabled(lua_State *L) { olua_startinvoke(L); @@ -1773,154 +2069,33 @@ static int _cocos2d_ui_Widget_setTouchEnabled(lua_State *L) olua_to_object(L, 1, &self, "ccui.Widget"); olua_check_bool(L, 2, &arg1); - // void setTouchEnabled(bool enabled) - self->setTouchEnabled(arg1); - - olua_endinvoke(L); - - return 0; -} - -static int _cocos2d_ui_Widget_setUnifySizeEnabled(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::ui::Widget *self = nullptr; - bool arg1 = false; /** enable */ - - olua_to_object(L, 1, &self, "ccui.Widget"); - olua_check_bool(L, 2, &arg1); - - // void setUnifySizeEnabled(bool enable) - self->setUnifySizeEnabled(arg1); - - olua_endinvoke(L); - - return 0; -} - -static int _cocos2d_ui_Widget_updateSizeAndPosition$1(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::ui::Widget *self = nullptr; - - olua_to_object(L, 1, &self, "ccui.Widget"); - - // void updateSizeAndPosition() - self->updateSizeAndPosition(); - - olua_endinvoke(L); - - return 0; -} - -static int _cocos2d_ui_Widget_updateSizeAndPosition$2(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::ui::Widget *self = nullptr; - cocos2d::Size arg1; /** parentSize */ - - olua_to_object(L, 1, &self, "ccui.Widget"); - olua_check_object(L, 2, &arg1, "cc.Size"); - - // void updateSizeAndPosition(const cocos2d::Size &parentSize) - self->updateSizeAndPosition(arg1); - - olua_endinvoke(L); - - return 0; -} - -static int _cocos2d_ui_Widget_updateSizeAndPosition(lua_State *L) -{ - int num_args = lua_gettop(L) - 1; - - if (num_args == 0) { - // void updateSizeAndPosition() - return _cocos2d_ui_Widget_updateSizeAndPosition$1(L); - } - - if (num_args == 1) { - // if ((olua_is_object(L, 2, "cc.Size"))) { - // void updateSizeAndPosition(const cocos2d::Size &parentSize) - return _cocos2d_ui_Widget_updateSizeAndPosition$2(L); - // } - } - - luaL_error(L, "method 'cocos2d::ui::Widget::updateSizeAndPosition' not support '%d' arguments", num_args); - - return 0; -} - -static int _cocos2d_ui_Widget_get_onFocusChanged(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::ui::Widget *self = nullptr; - - olua_to_object(L, 1, &self, "ccui.Widget"); - - void *cb_store = (void *)self; - std::string cb_tag = "onFocusChanged"; - olua_getcallback(L, cb_store, cb_tag.c_str(), OLUA_TAG_EQUAL); - - // @nullable std::function onFocusChanged - std::function ret = self->onFocusChanged; - int num_ret = olua_push_callback(L, &ret, "std.function"); + // void setTouchEnabled(bool enabled) + self->setTouchEnabled(arg1); olua_endinvoke(L); - return num_ret; + return 0; } -static int _cocos2d_ui_Widget_set_onFocusChanged(lua_State *L) +static int _olua_fun_cocos2d_ui_Widget_setUnifySizeEnabled(lua_State *L) { olua_startinvoke(L); cocos2d::ui::Widget *self = nullptr; - std::function arg1; /** onFocusChanged */ + bool arg1 = false; /** enable */ olua_to_object(L, 1, &self, "ccui.Widget"); - if (!olua_isnoneornil(L, 2)) { - olua_check_callback(L, 2, &arg1, "std.function"); - } - - void *cb_store = (void *)self; - std::string cb_tag = "onFocusChanged"; - std::string cb_name; - if (olua_isfunction(L, 2)) { - cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); - olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](cocos2d::ui::Widget *arg1, cocos2d::ui::Widget *arg2) { - lua_State *L = olua_mainthread(NULL); - olua_checkhostthread(); - - if (olua_contextequal(L, cb_ctx)) { - int top = lua_gettop(L); - olua_push_object(L, arg1, "ccui.Widget"); - olua_push_object(L, arg2, "ccui.Widget"); - - olua_callback(L, cb_store, cb_name.c_str(), 2); - - lua_settop(L, top); - } - }; - } else { - olua_removecallback(L, cb_store, cb_tag.c_str(), OLUA_TAG_EQUAL); - arg1 = nullptr; - } + olua_check_bool(L, 2, &arg1); - // @nullable std::function onFocusChanged - self->onFocusChanged = arg1; + // void setUnifySizeEnabled(bool enable) + self->setUnifySizeEnabled(arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_ui_Widget_get_onNextFocusedWidget(lua_State *L) +static int _olua_fun_cocos2d_ui_Widget_updateSizeAndPosition$1(lua_State *L) { olua_startinvoke(L); @@ -1928,191 +2103,184 @@ static int _cocos2d_ui_Widget_get_onNextFocusedWidget(lua_State *L) olua_to_object(L, 1, &self, "ccui.Widget"); - void *cb_store = (void *)self; - std::string cb_tag = "onNextFocusedWidget"; - olua_getcallback(L, cb_store, cb_tag.c_str(), OLUA_TAG_EQUAL); - - // @nullable @localvar std::function onNextFocusedWidget - std::function ret = self->onNextFocusedWidget; - int num_ret = olua_push_callback(L, &ret, "std.function"); + // void updateSizeAndPosition() + self->updateSizeAndPosition(); olua_endinvoke(L); - return num_ret; + return 0; } -static int _cocos2d_ui_Widget_set_onNextFocusedWidget(lua_State *L) +static int _olua_fun_cocos2d_ui_Widget_updateSizeAndPosition$2(lua_State *L) { olua_startinvoke(L); cocos2d::ui::Widget *self = nullptr; - std::function arg1; /** onNextFocusedWidget */ + cocos2d::Size *arg1; /** parentSize */ olua_to_object(L, 1, &self, "ccui.Widget"); - if (!olua_isnoneornil(L, 2)) { - olua_check_callback(L, 2, &arg1, "std.function"); - } + olua_check_object(L, 2, &arg1, "cc.Size"); - void *cb_store = (void *)self; - std::string cb_tag = "onNextFocusedWidget"; - std::string cb_name; - if (olua_isfunction(L, 2)) { - cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); - olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](cocos2d::ui::Widget::FocusDirection arg1) { - lua_State *L = olua_mainthread(NULL); - olua_checkhostthread(); - cocos2d::ui::Widget *ret = nullptr; /** ret */ - if (olua_contextequal(L, cb_ctx)) { - int top = lua_gettop(L); - olua_push_enum(L, arg1); + // void updateSizeAndPosition(const cocos2d::Size &parentSize) + self->updateSizeAndPosition(*arg1); - olua_callback(L, cb_store, cb_name.c_str(), 1); + olua_endinvoke(L); - if (olua_is_object(L, -1, "ccui.Widget")) { - olua_check_object(L, -1, &ret, "ccui.Widget"); - } + return 0; +} - lua_settop(L, top); - } - return ret; - }; - } else { - olua_removecallback(L, cb_store, cb_tag.c_str(), OLUA_TAG_EQUAL); - arg1 = nullptr; +static int _olua_fun_cocos2d_ui_Widget_updateSizeAndPosition(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // void updateSizeAndPosition() + return _olua_fun_cocos2d_ui_Widget_updateSizeAndPosition$1(L); } - // @nullable @localvar std::function onNextFocusedWidget - self->onNextFocusedWidget = arg1; + if (num_args == 1) { + // if ((olua_is_object(L, 2, "cc.Size"))) { + // void updateSizeAndPosition(const cocos2d::Size &parentSize) + return _olua_fun_cocos2d_ui_Widget_updateSizeAndPosition$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'cocos2d::ui::Widget::updateSizeAndPosition' not support '%d' arguments", num_args); return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ui_Widget(lua_State *L) +static int _olua_cls_ccui_Widget(lua_State *L) { oluacls_class(L, "ccui.Widget"); - oluacls_func(L, "addCCSEventListener", _cocos2d_ui_Widget_addCCSEventListener); - oluacls_func(L, "addClickEventListener", _cocos2d_ui_Widget_addClickEventListener); - oluacls_func(L, "addTouchEventListener", _cocos2d_ui_Widget_addTouchEventListener); - oluacls_func(L, "as", _cocos2d_ui_Widget_as); - oluacls_func(L, "clone", _cocos2d_ui_Widget_clone); - oluacls_func(L, "create", _cocos2d_ui_Widget_create); - oluacls_func(L, "dispatchFocusEvent", _cocos2d_ui_Widget_dispatchFocusEvent); - oluacls_func(L, "enableDpadNavigation", _cocos2d_ui_Widget_enableDpadNavigation); - oluacls_func(L, "findNextFocusedWidget", _cocos2d_ui_Widget_findNextFocusedWidget); - oluacls_func(L, "getActionTag", _cocos2d_ui_Widget_getActionTag); - oluacls_func(L, "getBottomBoundary", _cocos2d_ui_Widget_getBottomBoundary); - oluacls_func(L, "getCallbackName", _cocos2d_ui_Widget_getCallbackName); - oluacls_func(L, "getCallbackType", _cocos2d_ui_Widget_getCallbackType); - oluacls_func(L, "getCurrentFocusedWidget", _cocos2d_ui_Widget_getCurrentFocusedWidget); - oluacls_func(L, "getCustomSize", _cocos2d_ui_Widget_getCustomSize); - oluacls_func(L, "getLayoutParameter", _cocos2d_ui_Widget_getLayoutParameter); - oluacls_func(L, "getLayoutSize", _cocos2d_ui_Widget_getLayoutSize); - oluacls_func(L, "getLeftBoundary", _cocos2d_ui_Widget_getLeftBoundary); - oluacls_func(L, "getPositionPercent", _cocos2d_ui_Widget_getPositionPercent); - oluacls_func(L, "getPositionType", _cocos2d_ui_Widget_getPositionType); - oluacls_func(L, "getRightBoundary", _cocos2d_ui_Widget_getRightBoundary); - oluacls_func(L, "getSizePercent", _cocos2d_ui_Widget_getSizePercent); - oluacls_func(L, "getSizeType", _cocos2d_ui_Widget_getSizeType); - oluacls_func(L, "getTopBoundary", _cocos2d_ui_Widget_getTopBoundary); - oluacls_func(L, "getTouchBeganPosition", _cocos2d_ui_Widget_getTouchBeganPosition); - oluacls_func(L, "getTouchEndPosition", _cocos2d_ui_Widget_getTouchEndPosition); - oluacls_func(L, "getTouchMovePosition", _cocos2d_ui_Widget_getTouchMovePosition); - oluacls_func(L, "getVirtualRenderer", _cocos2d_ui_Widget_getVirtualRenderer); - oluacls_func(L, "getVirtualRendererSize", _cocos2d_ui_Widget_getVirtualRendererSize); - oluacls_func(L, "getWorldPosition", _cocos2d_ui_Widget_getWorldPosition); - oluacls_func(L, "hitTest", _cocos2d_ui_Widget_hitTest); - oluacls_func(L, "ignoreContentAdaptWithSize", _cocos2d_ui_Widget_ignoreContentAdaptWithSize); - oluacls_func(L, "interceptTouchEvent", _cocos2d_ui_Widget_interceptTouchEvent); - oluacls_func(L, "isBright", _cocos2d_ui_Widget_isBright); - oluacls_func(L, "isClippingParentContainsPoint", _cocos2d_ui_Widget_isClippingParentContainsPoint); - oluacls_func(L, "isEnabled", _cocos2d_ui_Widget_isEnabled); - oluacls_func(L, "isFlippedX", _cocos2d_ui_Widget_isFlippedX); - oluacls_func(L, "isFlippedY", _cocos2d_ui_Widget_isFlippedY); - oluacls_func(L, "isFocusEnabled", _cocos2d_ui_Widget_isFocusEnabled); - oluacls_func(L, "isFocused", _cocos2d_ui_Widget_isFocused); - oluacls_func(L, "isHighlighted", _cocos2d_ui_Widget_isHighlighted); - oluacls_func(L, "isIgnoreContentAdaptWithSize", _cocos2d_ui_Widget_isIgnoreContentAdaptWithSize); - oluacls_func(L, "isLayoutComponentEnabled", _cocos2d_ui_Widget_isLayoutComponentEnabled); - oluacls_func(L, "isPropagateTouchEvents", _cocos2d_ui_Widget_isPropagateTouchEvents); - oluacls_func(L, "isSwallowTouches", _cocos2d_ui_Widget_isSwallowTouches); - oluacls_func(L, "isTouchEnabled", _cocos2d_ui_Widget_isTouchEnabled); - oluacls_func(L, "isUnifySizeEnabled", _cocos2d_ui_Widget_isUnifySizeEnabled); - oluacls_func(L, "new", _cocos2d_ui_Widget_new); - oluacls_func(L, "onFocusChange", _cocos2d_ui_Widget_onFocusChange); - oluacls_func(L, "onTouchBegan", _cocos2d_ui_Widget_onTouchBegan); - oluacls_func(L, "onTouchCancelled", _cocos2d_ui_Widget_onTouchCancelled); - oluacls_func(L, "onTouchEnded", _cocos2d_ui_Widget_onTouchEnded); - oluacls_func(L, "onTouchMoved", _cocos2d_ui_Widget_onTouchMoved); - oluacls_func(L, "propagateTouchEvent", _cocos2d_ui_Widget_propagateTouchEvent); - oluacls_func(L, "requestFocus", _cocos2d_ui_Widget_requestFocus); - oluacls_func(L, "setActionTag", _cocos2d_ui_Widget_setActionTag); - oluacls_func(L, "setBright", _cocos2d_ui_Widget_setBright); - oluacls_func(L, "setBrightStyle", _cocos2d_ui_Widget_setBrightStyle); - oluacls_func(L, "setCallbackName", _cocos2d_ui_Widget_setCallbackName); - oluacls_func(L, "setCallbackType", _cocos2d_ui_Widget_setCallbackType); - oluacls_func(L, "setEnabled", _cocos2d_ui_Widget_setEnabled); - oluacls_func(L, "setFlippedX", _cocos2d_ui_Widget_setFlippedX); - oluacls_func(L, "setFlippedY", _cocos2d_ui_Widget_setFlippedY); - oluacls_func(L, "setFocusEnabled", _cocos2d_ui_Widget_setFocusEnabled); - oluacls_func(L, "setFocused", _cocos2d_ui_Widget_setFocused); - oluacls_func(L, "setHighlighted", _cocos2d_ui_Widget_setHighlighted); - oluacls_func(L, "setLayoutComponentEnabled", _cocos2d_ui_Widget_setLayoutComponentEnabled); - oluacls_func(L, "setLayoutParameter", _cocos2d_ui_Widget_setLayoutParameter); - oluacls_func(L, "setPositionPercent", _cocos2d_ui_Widget_setPositionPercent); - oluacls_func(L, "setPositionType", _cocos2d_ui_Widget_setPositionType); - oluacls_func(L, "setPropagateTouchEvents", _cocos2d_ui_Widget_setPropagateTouchEvents); - oluacls_func(L, "setSizePercent", _cocos2d_ui_Widget_setSizePercent); - oluacls_func(L, "setSizeType", _cocos2d_ui_Widget_setSizeType); - oluacls_func(L, "setSwallowTouches", _cocos2d_ui_Widget_setSwallowTouches); - oluacls_func(L, "setTouchEnabled", _cocos2d_ui_Widget_setTouchEnabled); - oluacls_func(L, "setUnifySizeEnabled", _cocos2d_ui_Widget_setUnifySizeEnabled); - oluacls_func(L, "updateSizeAndPosition", _cocos2d_ui_Widget_updateSizeAndPosition); - oluacls_prop(L, "actionTag", _cocos2d_ui_Widget_getActionTag, _cocos2d_ui_Widget_setActionTag); - oluacls_prop(L, "bottomBoundary", _cocos2d_ui_Widget_getBottomBoundary, nullptr); - oluacls_prop(L, "bright", _cocos2d_ui_Widget_isBright, _cocos2d_ui_Widget_setBright); - oluacls_prop(L, "callbackName", _cocos2d_ui_Widget_getCallbackName, _cocos2d_ui_Widget_setCallbackName); - oluacls_prop(L, "callbackType", _cocos2d_ui_Widget_getCallbackType, _cocos2d_ui_Widget_setCallbackType); - oluacls_prop(L, "currentFocusedWidget", _cocos2d_ui_Widget_getCurrentFocusedWidget, nullptr); - oluacls_prop(L, "customSize", _cocos2d_ui_Widget_getCustomSize, nullptr); - oluacls_prop(L, "enabled", _cocos2d_ui_Widget_isEnabled, _cocos2d_ui_Widget_setEnabled); - oluacls_prop(L, "flippedX", _cocos2d_ui_Widget_isFlippedX, _cocos2d_ui_Widget_setFlippedX); - oluacls_prop(L, "flippedY", _cocos2d_ui_Widget_isFlippedY, _cocos2d_ui_Widget_setFlippedY); - oluacls_prop(L, "focusEnabled", _cocos2d_ui_Widget_isFocusEnabled, _cocos2d_ui_Widget_setFocusEnabled); - oluacls_prop(L, "focused", _cocos2d_ui_Widget_isFocused, _cocos2d_ui_Widget_setFocused); - oluacls_prop(L, "highlighted", _cocos2d_ui_Widget_isHighlighted, _cocos2d_ui_Widget_setHighlighted); - oluacls_prop(L, "ignoreContentAdaptWithSize", _cocos2d_ui_Widget_isIgnoreContentAdaptWithSize, nullptr); - oluacls_prop(L, "layoutComponentEnabled", _cocos2d_ui_Widget_isLayoutComponentEnabled, _cocos2d_ui_Widget_setLayoutComponentEnabled); - oluacls_prop(L, "layoutParameter", _cocos2d_ui_Widget_getLayoutParameter, _cocos2d_ui_Widget_setLayoutParameter); - oluacls_prop(L, "layoutSize", _cocos2d_ui_Widget_getLayoutSize, nullptr); - oluacls_prop(L, "leftBoundary", _cocos2d_ui_Widget_getLeftBoundary, nullptr); - oluacls_prop(L, "positionPercent", _cocos2d_ui_Widget_getPositionPercent, _cocos2d_ui_Widget_setPositionPercent); - oluacls_prop(L, "positionType", _cocos2d_ui_Widget_getPositionType, _cocos2d_ui_Widget_setPositionType); - oluacls_prop(L, "propagateTouchEvents", _cocos2d_ui_Widget_isPropagateTouchEvents, _cocos2d_ui_Widget_setPropagateTouchEvents); - oluacls_prop(L, "rightBoundary", _cocos2d_ui_Widget_getRightBoundary, nullptr); - oluacls_prop(L, "sizePercent", _cocos2d_ui_Widget_getSizePercent, _cocos2d_ui_Widget_setSizePercent); - oluacls_prop(L, "sizeType", _cocos2d_ui_Widget_getSizeType, _cocos2d_ui_Widget_setSizeType); - oluacls_prop(L, "swallowTouches", _cocos2d_ui_Widget_isSwallowTouches, _cocos2d_ui_Widget_setSwallowTouches); - oluacls_prop(L, "topBoundary", _cocos2d_ui_Widget_getTopBoundary, nullptr); - oluacls_prop(L, "touchBeganPosition", _cocos2d_ui_Widget_getTouchBeganPosition, nullptr); - oluacls_prop(L, "touchEnabled", _cocos2d_ui_Widget_isTouchEnabled, _cocos2d_ui_Widget_setTouchEnabled); - oluacls_prop(L, "touchEndPosition", _cocos2d_ui_Widget_getTouchEndPosition, nullptr); - oluacls_prop(L, "touchMovePosition", _cocos2d_ui_Widget_getTouchMovePosition, nullptr); - oluacls_prop(L, "unifySizeEnabled", _cocos2d_ui_Widget_isUnifySizeEnabled, _cocos2d_ui_Widget_setUnifySizeEnabled); - oluacls_prop(L, "virtualRenderer", _cocos2d_ui_Widget_getVirtualRenderer, nullptr); - oluacls_prop(L, "virtualRendererSize", _cocos2d_ui_Widget_getVirtualRendererSize, nullptr); - oluacls_prop(L, "worldPosition", _cocos2d_ui_Widget_getWorldPosition, nullptr); - oluacls_prop(L, "onFocusChanged", _cocos2d_ui_Widget_get_onFocusChanged, _cocos2d_ui_Widget_set_onFocusChanged); - oluacls_prop(L, "onNextFocusedWidget", _cocos2d_ui_Widget_get_onNextFocusedWidget, _cocos2d_ui_Widget_set_onNextFocusedWidget); + oluacls_func(L, "addCCSEventListener", _olua_fun_cocos2d_ui_Widget_addCCSEventListener); + oluacls_func(L, "addClickEventListener", _olua_fun_cocos2d_ui_Widget_addClickEventListener); + oluacls_func(L, "addTouchEventListener", _olua_fun_cocos2d_ui_Widget_addTouchEventListener); + oluacls_func(L, "as", _olua_fun_cocos2d_ui_Widget_as); + oluacls_func(L, "clone", _olua_fun_cocos2d_ui_Widget_clone); + oluacls_func(L, "create", _olua_fun_cocos2d_ui_Widget_create); + oluacls_func(L, "dispatchFocusEvent", _olua_fun_cocos2d_ui_Widget_dispatchFocusEvent); + oluacls_func(L, "enableDpadNavigation", _olua_fun_cocos2d_ui_Widget_enableDpadNavigation); + oluacls_func(L, "findNextFocusedWidget", _olua_fun_cocos2d_ui_Widget_findNextFocusedWidget); + oluacls_func(L, "getActionTag", _olua_fun_cocos2d_ui_Widget_getActionTag); + oluacls_func(L, "getBottomBoundary", _olua_fun_cocos2d_ui_Widget_getBottomBoundary); + oluacls_func(L, "getCallbackName", _olua_fun_cocos2d_ui_Widget_getCallbackName); + oluacls_func(L, "getCallbackType", _olua_fun_cocos2d_ui_Widget_getCallbackType); + oluacls_func(L, "getCurrentFocusedWidget", _olua_fun_cocos2d_ui_Widget_getCurrentFocusedWidget); + oluacls_func(L, "getCustomSize", _olua_fun_cocos2d_ui_Widget_getCustomSize); + oluacls_func(L, "getLayoutParameter", _olua_fun_cocos2d_ui_Widget_getLayoutParameter); + oluacls_func(L, "getLayoutSize", _olua_fun_cocos2d_ui_Widget_getLayoutSize); + oluacls_func(L, "getLeftBoundary", _olua_fun_cocos2d_ui_Widget_getLeftBoundary); + oluacls_func(L, "getPositionPercent", _olua_fun_cocos2d_ui_Widget_getPositionPercent); + oluacls_func(L, "getPositionType", _olua_fun_cocos2d_ui_Widget_getPositionType); + oluacls_func(L, "getRightBoundary", _olua_fun_cocos2d_ui_Widget_getRightBoundary); + oluacls_func(L, "getSizePercent", _olua_fun_cocos2d_ui_Widget_getSizePercent); + oluacls_func(L, "getSizeType", _olua_fun_cocos2d_ui_Widget_getSizeType); + oluacls_func(L, "getTopBoundary", _olua_fun_cocos2d_ui_Widget_getTopBoundary); + oluacls_func(L, "getTouchBeganPosition", _olua_fun_cocos2d_ui_Widget_getTouchBeganPosition); + oluacls_func(L, "getTouchEndPosition", _olua_fun_cocos2d_ui_Widget_getTouchEndPosition); + oluacls_func(L, "getTouchMovePosition", _olua_fun_cocos2d_ui_Widget_getTouchMovePosition); + oluacls_func(L, "getVirtualRenderer", _olua_fun_cocos2d_ui_Widget_getVirtualRenderer); + oluacls_func(L, "getVirtualRendererSize", _olua_fun_cocos2d_ui_Widget_getVirtualRendererSize); + oluacls_func(L, "getWorldPosition", _olua_fun_cocos2d_ui_Widget_getWorldPosition); + oluacls_func(L, "hitTest", _olua_fun_cocos2d_ui_Widget_hitTest); + oluacls_func(L, "ignoreContentAdaptWithSize", _olua_fun_cocos2d_ui_Widget_ignoreContentAdaptWithSize); + oluacls_func(L, "interceptTouchEvent", _olua_fun_cocos2d_ui_Widget_interceptTouchEvent); + oluacls_func(L, "isBright", _olua_fun_cocos2d_ui_Widget_isBright); + oluacls_func(L, "isClippingParentContainsPoint", _olua_fun_cocos2d_ui_Widget_isClippingParentContainsPoint); + oluacls_func(L, "isEnabled", _olua_fun_cocos2d_ui_Widget_isEnabled); + oluacls_func(L, "isFlippedX", _olua_fun_cocos2d_ui_Widget_isFlippedX); + oluacls_func(L, "isFlippedY", _olua_fun_cocos2d_ui_Widget_isFlippedY); + oluacls_func(L, "isFocusEnabled", _olua_fun_cocos2d_ui_Widget_isFocusEnabled); + oluacls_func(L, "isFocused", _olua_fun_cocos2d_ui_Widget_isFocused); + oluacls_func(L, "isHighlighted", _olua_fun_cocos2d_ui_Widget_isHighlighted); + oluacls_func(L, "isIgnoreContentAdaptWithSize", _olua_fun_cocos2d_ui_Widget_isIgnoreContentAdaptWithSize); + oluacls_func(L, "isLayoutComponentEnabled", _olua_fun_cocos2d_ui_Widget_isLayoutComponentEnabled); + oluacls_func(L, "isPropagateTouchEvents", _olua_fun_cocos2d_ui_Widget_isPropagateTouchEvents); + oluacls_func(L, "isSwallowTouches", _olua_fun_cocos2d_ui_Widget_isSwallowTouches); + oluacls_func(L, "isTouchEnabled", _olua_fun_cocos2d_ui_Widget_isTouchEnabled); + oluacls_func(L, "isUnifySizeEnabled", _olua_fun_cocos2d_ui_Widget_isUnifySizeEnabled); + oluacls_func(L, "new", _olua_fun_cocos2d_ui_Widget_new); + oluacls_func(L, "onFocusChange", _olua_fun_cocos2d_ui_Widget_onFocusChange); + oluacls_func(L, "onTouchBegan", _olua_fun_cocos2d_ui_Widget_onTouchBegan); + oluacls_func(L, "onTouchCancelled", _olua_fun_cocos2d_ui_Widget_onTouchCancelled); + oluacls_func(L, "onTouchEnded", _olua_fun_cocos2d_ui_Widget_onTouchEnded); + oluacls_func(L, "onTouchMoved", _olua_fun_cocos2d_ui_Widget_onTouchMoved); + oluacls_func(L, "propagateTouchEvent", _olua_fun_cocos2d_ui_Widget_propagateTouchEvent); + oluacls_func(L, "requestFocus", _olua_fun_cocos2d_ui_Widget_requestFocus); + oluacls_func(L, "setActionTag", _olua_fun_cocos2d_ui_Widget_setActionTag); + oluacls_func(L, "setBright", _olua_fun_cocos2d_ui_Widget_setBright); + oluacls_func(L, "setBrightStyle", _olua_fun_cocos2d_ui_Widget_setBrightStyle); + oluacls_func(L, "setCallbackName", _olua_fun_cocos2d_ui_Widget_setCallbackName); + oluacls_func(L, "setCallbackType", _olua_fun_cocos2d_ui_Widget_setCallbackType); + oluacls_func(L, "setEnabled", _olua_fun_cocos2d_ui_Widget_setEnabled); + oluacls_func(L, "setFlippedX", _olua_fun_cocos2d_ui_Widget_setFlippedX); + oluacls_func(L, "setFlippedY", _olua_fun_cocos2d_ui_Widget_setFlippedY); + oluacls_func(L, "setFocusEnabled", _olua_fun_cocos2d_ui_Widget_setFocusEnabled); + oluacls_func(L, "setFocused", _olua_fun_cocos2d_ui_Widget_setFocused); + oluacls_func(L, "setHighlighted", _olua_fun_cocos2d_ui_Widget_setHighlighted); + oluacls_func(L, "setLayoutComponentEnabled", _olua_fun_cocos2d_ui_Widget_setLayoutComponentEnabled); + oluacls_func(L, "setLayoutParameter", _olua_fun_cocos2d_ui_Widget_setLayoutParameter); + oluacls_func(L, "setPositionPercent", _olua_fun_cocos2d_ui_Widget_setPositionPercent); + oluacls_func(L, "setPositionType", _olua_fun_cocos2d_ui_Widget_setPositionType); + oluacls_func(L, "setPropagateTouchEvents", _olua_fun_cocos2d_ui_Widget_setPropagateTouchEvents); + oluacls_func(L, "setSizePercent", _olua_fun_cocos2d_ui_Widget_setSizePercent); + oluacls_func(L, "setSizeType", _olua_fun_cocos2d_ui_Widget_setSizeType); + oluacls_func(L, "setSwallowTouches", _olua_fun_cocos2d_ui_Widget_setSwallowTouches); + oluacls_func(L, "setTouchEnabled", _olua_fun_cocos2d_ui_Widget_setTouchEnabled); + oluacls_func(L, "setUnifySizeEnabled", _olua_fun_cocos2d_ui_Widget_setUnifySizeEnabled); + oluacls_func(L, "updateSizeAndPosition", _olua_fun_cocos2d_ui_Widget_updateSizeAndPosition); + oluacls_prop(L, "actionTag", _olua_fun_cocos2d_ui_Widget_getActionTag, _olua_fun_cocos2d_ui_Widget_setActionTag); + oluacls_prop(L, "bottomBoundary", _olua_fun_cocos2d_ui_Widget_getBottomBoundary, nullptr); + oluacls_prop(L, "bright", _olua_fun_cocos2d_ui_Widget_isBright, _olua_fun_cocos2d_ui_Widget_setBright); + oluacls_prop(L, "callbackName", _olua_fun_cocos2d_ui_Widget_getCallbackName, _olua_fun_cocos2d_ui_Widget_setCallbackName); + oluacls_prop(L, "callbackType", _olua_fun_cocos2d_ui_Widget_getCallbackType, _olua_fun_cocos2d_ui_Widget_setCallbackType); + oluacls_prop(L, "currentFocusedWidget", _olua_fun_cocos2d_ui_Widget_getCurrentFocusedWidget, nullptr); + oluacls_prop(L, "customSize", _olua_fun_cocos2d_ui_Widget_getCustomSize, nullptr); + oluacls_prop(L, "enabled", _olua_fun_cocos2d_ui_Widget_isEnabled, _olua_fun_cocos2d_ui_Widget_setEnabled); + oluacls_prop(L, "flippedX", _olua_fun_cocos2d_ui_Widget_isFlippedX, _olua_fun_cocos2d_ui_Widget_setFlippedX); + oluacls_prop(L, "flippedY", _olua_fun_cocos2d_ui_Widget_isFlippedY, _olua_fun_cocos2d_ui_Widget_setFlippedY); + oluacls_prop(L, "focusEnabled", _olua_fun_cocos2d_ui_Widget_isFocusEnabled, _olua_fun_cocos2d_ui_Widget_setFocusEnabled); + oluacls_prop(L, "focused", _olua_fun_cocos2d_ui_Widget_isFocused, _olua_fun_cocos2d_ui_Widget_setFocused); + oluacls_prop(L, "highlighted", _olua_fun_cocos2d_ui_Widget_isHighlighted, _olua_fun_cocos2d_ui_Widget_setHighlighted); + oluacls_prop(L, "layoutComponentEnabled", _olua_fun_cocos2d_ui_Widget_isLayoutComponentEnabled, _olua_fun_cocos2d_ui_Widget_setLayoutComponentEnabled); + oluacls_prop(L, "layoutParameter", _olua_fun_cocos2d_ui_Widget_getLayoutParameter, _olua_fun_cocos2d_ui_Widget_setLayoutParameter); + oluacls_prop(L, "layoutSize", _olua_fun_cocos2d_ui_Widget_getLayoutSize, nullptr); + oluacls_prop(L, "leftBoundary", _olua_fun_cocos2d_ui_Widget_getLeftBoundary, nullptr); + oluacls_prop(L, "positionPercent", _olua_fun_cocos2d_ui_Widget_getPositionPercent, _olua_fun_cocos2d_ui_Widget_setPositionPercent); + oluacls_prop(L, "positionType", _olua_fun_cocos2d_ui_Widget_getPositionType, _olua_fun_cocos2d_ui_Widget_setPositionType); + oluacls_prop(L, "propagateTouchEvents", _olua_fun_cocos2d_ui_Widget_isPropagateTouchEvents, _olua_fun_cocos2d_ui_Widget_setPropagateTouchEvents); + oluacls_prop(L, "rightBoundary", _olua_fun_cocos2d_ui_Widget_getRightBoundary, nullptr); + oluacls_prop(L, "sizePercent", _olua_fun_cocos2d_ui_Widget_getSizePercent, _olua_fun_cocos2d_ui_Widget_setSizePercent); + oluacls_prop(L, "sizeType", _olua_fun_cocos2d_ui_Widget_getSizeType, _olua_fun_cocos2d_ui_Widget_setSizeType); + oluacls_prop(L, "swallowTouches", _olua_fun_cocos2d_ui_Widget_isSwallowTouches, _olua_fun_cocos2d_ui_Widget_setSwallowTouches); + oluacls_prop(L, "topBoundary", _olua_fun_cocos2d_ui_Widget_getTopBoundary, nullptr); + oluacls_prop(L, "touchBeganPosition", _olua_fun_cocos2d_ui_Widget_getTouchBeganPosition, nullptr); + oluacls_prop(L, "touchEnabled", _olua_fun_cocos2d_ui_Widget_isTouchEnabled, _olua_fun_cocos2d_ui_Widget_setTouchEnabled); + oluacls_prop(L, "touchEndPosition", _olua_fun_cocos2d_ui_Widget_getTouchEndPosition, nullptr); + oluacls_prop(L, "touchMovePosition", _olua_fun_cocos2d_ui_Widget_getTouchMovePosition, nullptr); + oluacls_prop(L, "unifySizeEnabled", _olua_fun_cocos2d_ui_Widget_isUnifySizeEnabled, _olua_fun_cocos2d_ui_Widget_setUnifySizeEnabled); + oluacls_prop(L, "virtualRenderer", _olua_fun_cocos2d_ui_Widget_getVirtualRenderer, nullptr); + oluacls_prop(L, "virtualRendererSize", _olua_fun_cocos2d_ui_Widget_getVirtualRendererSize, nullptr); + oluacls_prop(L, "worldPosition", _olua_fun_cocos2d_ui_Widget_getWorldPosition, nullptr); + oluacls_prop(L, "onFocusChanged", _olua_fun_cocos2d_ui_Widget_onFocusChanged, _olua_fun_cocos2d_ui_Widget_onFocusChanged); + oluacls_prop(L, "onNextFocusedWidget", _olua_fun_cocos2d_ui_Widget_onNextFocusedWidget, _olua_fun_cocos2d_ui_Widget_onNextFocusedWidget); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccui_Widget(lua_State *L) +{ + olua_require(L, "cocos2d_ui", luaopen_cocos2d_ui); + if (!olua_getclass(L, "ccui.Widget")) { + luaL_error(L, "class not found: cocos2d::ui::Widget"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_ui_Helper___gc(lua_State *L) +static int _olua_fun_cocos2d_ui_Helper___gc(lua_State *L) { olua_startinvoke(L); @@ -2124,7 +2292,7 @@ static int _cocos2d_ui_Helper___gc(lua_State *L) return 0; } -static int _cocos2d_ui_Helper___olua_move(lua_State *L) +static int _olua_fun_cocos2d_ui_Helper___olua_move(lua_State *L) { olua_startinvoke(L); @@ -2136,7 +2304,7 @@ static int _cocos2d_ui_Helper___olua_move(lua_State *L) return 1; } -static int _cocos2d_ui_Helper_changeLayoutSystemActiveState(lua_State *L) +static int _olua_fun_cocos2d_ui_Helper_changeLayoutSystemActiveState(lua_State *L) { olua_startinvoke(L); @@ -2152,7 +2320,7 @@ static int _cocos2d_ui_Helper_changeLayoutSystemActiveState(lua_State *L) return 0; } -static int _cocos2d_ui_Helper_convertBoundingBoxToScreen(lua_State *L) +static int _olua_fun_cocos2d_ui_Helper_convertBoundingBoxToScreen(lua_State *L) { olua_startinvoke(L); @@ -2162,14 +2330,14 @@ static int _cocos2d_ui_Helper_convertBoundingBoxToScreen(lua_State *L) // static cocos2d::Rect convertBoundingBoxToScreen(cocos2d::Node *node) cocos2d::Rect ret = cocos2d::ui::Helper::convertBoundingBoxToScreen(arg1); - int num_ret = olua_pushcopy_object(L, ret, "cc.Rect"); + int num_ret = olua_copy_object(L, ret, "cc.Rect"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_ui_Helper_doLayout(lua_State *L) +static int _olua_fun_cocos2d_ui_Helper_doLayout(lua_State *L) { olua_startinvoke(L); @@ -2185,7 +2353,7 @@ static int _cocos2d_ui_Helper_doLayout(lua_State *L) return 0; } -static int _cocos2d_ui_Helper_getSubStringOfUTF8String(lua_State *L) +static int _olua_fun_cocos2d_ui_Helper_getSubStringOfUTF8String(lua_State *L) { olua_startinvoke(L); @@ -2206,26 +2374,26 @@ static int _cocos2d_ui_Helper_getSubStringOfUTF8String(lua_State *L) return num_ret; } -static int _cocos2d_ui_Helper_restrictCapInsetRect(lua_State *L) +static int _olua_fun_cocos2d_ui_Helper_restrictCapInsetRect(lua_State *L) { olua_startinvoke(L); - cocos2d::Rect arg1; /** capInsets */ - cocos2d::Size arg2; /** textureSize */ + cocos2d::Rect *arg1; /** capInsets */ + cocos2d::Size *arg2; /** textureSize */ olua_check_object(L, 1, &arg1, "cc.Rect"); olua_check_object(L, 2, &arg2, "cc.Size"); // static cocos2d::Rect restrictCapInsetRect(const cocos2d::Rect &capInsets, const cocos2d::Size &textureSize) - cocos2d::Rect ret = cocos2d::ui::Helper::restrictCapInsetRect(arg1, arg2); - int num_ret = olua_pushcopy_object(L, ret, "cc.Rect"); + cocos2d::Rect ret = cocos2d::ui::Helper::restrictCapInsetRect(*arg1, *arg2); + int num_ret = olua_copy_object(L, ret, "cc.Rect"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_ui_Helper_seekActionWidgetByActionTag(lua_State *L) +static int _olua_fun_cocos2d_ui_Helper_seekActionWidgetByActionTag(lua_State *L) { olua_startinvoke(L); @@ -2244,7 +2412,7 @@ static int _cocos2d_ui_Helper_seekActionWidgetByActionTag(lua_State *L) return num_ret; } -static int _cocos2d_ui_Helper_seekWidgetByName(lua_State *L) +static int _olua_fun_cocos2d_ui_Helper_seekWidgetByName(lua_State *L) { olua_startinvoke(L); @@ -2263,7 +2431,7 @@ static int _cocos2d_ui_Helper_seekWidgetByName(lua_State *L) return num_ret; } -static int _cocos2d_ui_Helper_seekWidgetByTag(lua_State *L) +static int _olua_fun_cocos2d_ui_Helper_seekWidgetByTag(lua_State *L) { olua_startinvoke(L); @@ -2282,27 +2450,35 @@ static int _cocos2d_ui_Helper_seekWidgetByTag(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ui_Helper(lua_State *L) +static int _olua_cls_ccui_Helper(lua_State *L) { oluacls_class(L, "ccui.Helper"); - oluacls_func(L, "__gc", _cocos2d_ui_Helper___gc); - oluacls_func(L, "__olua_move", _cocos2d_ui_Helper___olua_move); - oluacls_func(L, "changeLayoutSystemActiveState", _cocos2d_ui_Helper_changeLayoutSystemActiveState); - oluacls_func(L, "convertBoundingBoxToScreen", _cocos2d_ui_Helper_convertBoundingBoxToScreen); - oluacls_func(L, "doLayout", _cocos2d_ui_Helper_doLayout); - oluacls_func(L, "getSubStringOfUTF8String", _cocos2d_ui_Helper_getSubStringOfUTF8String); - oluacls_func(L, "restrictCapInsetRect", _cocos2d_ui_Helper_restrictCapInsetRect); - oluacls_func(L, "seekActionWidgetByActionTag", _cocos2d_ui_Helper_seekActionWidgetByActionTag); - oluacls_func(L, "seekWidgetByName", _cocos2d_ui_Helper_seekWidgetByName); - oluacls_func(L, "seekWidgetByTag", _cocos2d_ui_Helper_seekWidgetByTag); + oluacls_func(L, "__gc", _olua_fun_cocos2d_ui_Helper___gc); + oluacls_func(L, "__olua_move", _olua_fun_cocos2d_ui_Helper___olua_move); + oluacls_func(L, "changeLayoutSystemActiveState", _olua_fun_cocos2d_ui_Helper_changeLayoutSystemActiveState); + oluacls_func(L, "convertBoundingBoxToScreen", _olua_fun_cocos2d_ui_Helper_convertBoundingBoxToScreen); + oluacls_func(L, "doLayout", _olua_fun_cocos2d_ui_Helper_doLayout); + oluacls_func(L, "getSubStringOfUTF8String", _olua_fun_cocos2d_ui_Helper_getSubStringOfUTF8String); + oluacls_func(L, "restrictCapInsetRect", _olua_fun_cocos2d_ui_Helper_restrictCapInsetRect); + oluacls_func(L, "seekActionWidgetByActionTag", _olua_fun_cocos2d_ui_Helper_seekActionWidgetByActionTag); + oluacls_func(L, "seekWidgetByName", _olua_fun_cocos2d_ui_Helper_seekWidgetByName); + oluacls_func(L, "seekWidgetByTag", _olua_fun_cocos2d_ui_Helper_seekWidgetByTag); return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ui_Scale9Sprite_State(lua_State *L) +OLUA_LIB int luaopen_ccui_Helper(lua_State *L) +{ + olua_require(L, "cocos2d_ui", luaopen_cocos2d_ui); + if (!olua_getclass(L, "ccui.Helper")) { + luaL_error(L, "class not found: cocos2d::ui::Helper"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_ccui_Scale9Sprite_State(lua_State *L) { oluacls_class(L, "ccui.Scale9Sprite.State"); oluacls_func(L, "__index", olua_indexerror); @@ -2312,10 +2488,19 @@ OLUA_LIB int luaopen_cocos2d_ui_Scale9Sprite_State(lua_State *L) return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ui_Scale9Sprite_RenderingType(lua_State *L) +OLUA_LIB int luaopen_ccui_Scale9Sprite_State(lua_State *L) +{ + olua_require(L, "cocos2d_ui", luaopen_cocos2d_ui); + if (!olua_getclass(L, "ccui.Scale9Sprite.State")) { + luaL_error(L, "class not found: cocos2d::ui::Scale9Sprite::State"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_ccui_Scale9Sprite_RenderingType(lua_State *L) { oluacls_class(L, "ccui.Scale9Sprite.RenderingType"); oluacls_func(L, "__index", olua_indexerror); @@ -2325,9 +2510,19 @@ OLUA_LIB int luaopen_cocos2d_ui_Scale9Sprite_RenderingType(lua_State *L) return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccui_Scale9Sprite_RenderingType(lua_State *L) +{ + olua_require(L, "cocos2d_ui", luaopen_cocos2d_ui); + if (!olua_getclass(L, "ccui.Scale9Sprite.RenderingType")) { + luaL_error(L, "class not found: cocos2d::ui::Scale9Sprite::RenderingType"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_ui_Scale9Sprite_copyTo(lua_State *L) +static int _olua_fun_cocos2d_ui_Scale9Sprite_copyTo(lua_State *L) { olua_startinvoke(L); @@ -2345,7 +2540,7 @@ static int _cocos2d_ui_Scale9Sprite_copyTo(lua_State *L) return 0; } -static int _cocos2d_ui_Scale9Sprite_create$1(lua_State *L) +static int _olua_fun_cocos2d_ui_Scale9Sprite_create$1(lua_State *L) { olua_startinvoke(L); @@ -2358,20 +2553,20 @@ static int _cocos2d_ui_Scale9Sprite_create$1(lua_State *L) return num_ret; } -static int _cocos2d_ui_Scale9Sprite_create$2(lua_State *L) +static int _olua_fun_cocos2d_ui_Scale9Sprite_create$2(lua_State *L) { olua_startinvoke(L); std::string arg1; /** file */ - cocos2d::Rect arg2; /** rect */ - cocos2d::Rect arg3; /** capInsets */ + cocos2d::Rect *arg2; /** rect */ + cocos2d::Rect *arg3; /** capInsets */ olua_check_string(L, 1, &arg1); olua_check_object(L, 2, &arg2, "cc.Rect"); olua_check_object(L, 3, &arg3, "cc.Rect"); // static cocos2d::ui::Scale9Sprite *create(const std::string &file, const cocos2d::Rect &rect, const cocos2d::Rect &capInsets) - cocos2d::ui::Scale9Sprite *ret = cocos2d::ui::Scale9Sprite::create(arg1, arg2, arg3); + cocos2d::ui::Scale9Sprite *ret = cocos2d::ui::Scale9Sprite::create(arg1, *arg2, *arg3); int num_ret = olua_push_object(L, ret, "ccui.Scale9Sprite"); olua_endinvoke(L); @@ -2379,18 +2574,18 @@ static int _cocos2d_ui_Scale9Sprite_create$2(lua_State *L) return num_ret; } -static int _cocos2d_ui_Scale9Sprite_create$3(lua_State *L) +static int _olua_fun_cocos2d_ui_Scale9Sprite_create$3(lua_State *L) { olua_startinvoke(L); - cocos2d::Rect arg1; /** capInsets */ + cocos2d::Rect *arg1; /** capInsets */ std::string arg2; /** file */ olua_check_object(L, 1, &arg1, "cc.Rect"); olua_check_string(L, 2, &arg2); // static cocos2d::ui::Scale9Sprite *create(const cocos2d::Rect &capInsets, const std::string &file) - cocos2d::ui::Scale9Sprite *ret = cocos2d::ui::Scale9Sprite::create(arg1, arg2); + cocos2d::ui::Scale9Sprite *ret = cocos2d::ui::Scale9Sprite::create(*arg1, arg2); int num_ret = olua_push_object(L, ret, "ccui.Scale9Sprite"); olua_endinvoke(L); @@ -2398,18 +2593,18 @@ static int _cocos2d_ui_Scale9Sprite_create$3(lua_State *L) return num_ret; } -static int _cocos2d_ui_Scale9Sprite_create$4(lua_State *L) +static int _olua_fun_cocos2d_ui_Scale9Sprite_create$4(lua_State *L) { olua_startinvoke(L); std::string arg1; /** file */ - cocos2d::Rect arg2; /** rect */ + cocos2d::Rect *arg2; /** rect */ olua_check_string(L, 1, &arg1); olua_check_object(L, 2, &arg2, "cc.Rect"); // static cocos2d::ui::Scale9Sprite *create(const std::string &file, const cocos2d::Rect &rect) - cocos2d::ui::Scale9Sprite *ret = cocos2d::ui::Scale9Sprite::create(arg1, arg2); + cocos2d::ui::Scale9Sprite *ret = cocos2d::ui::Scale9Sprite::create(arg1, *arg2); int num_ret = olua_push_object(L, ret, "ccui.Scale9Sprite"); olua_endinvoke(L); @@ -2417,7 +2612,7 @@ static int _cocos2d_ui_Scale9Sprite_create$4(lua_State *L) return num_ret; } -static int _cocos2d_ui_Scale9Sprite_create$5(lua_State *L) +static int _olua_fun_cocos2d_ui_Scale9Sprite_create$5(lua_State *L) { olua_startinvoke(L); @@ -2434,38 +2629,38 @@ static int _cocos2d_ui_Scale9Sprite_create$5(lua_State *L) return num_ret; } -static int _cocos2d_ui_Scale9Sprite_create(lua_State *L) +static int _olua_fun_cocos2d_ui_Scale9Sprite_create(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 0) { // static cocos2d::ui::Scale9Sprite *create() - return _cocos2d_ui_Scale9Sprite_create$1(L); + return _olua_fun_cocos2d_ui_Scale9Sprite_create$1(L); } if (num_args == 1) { // if ((olua_is_string(L, 1))) { // static cocos2d::ui::Scale9Sprite *create(const std::string &file) - return _cocos2d_ui_Scale9Sprite_create$5(L); + return _olua_fun_cocos2d_ui_Scale9Sprite_create$5(L); // } } if (num_args == 2) { if ((olua_is_object(L, 1, "cc.Rect")) && (olua_is_string(L, 2))) { // static cocos2d::ui::Scale9Sprite *create(const cocos2d::Rect &capInsets, const std::string &file) - return _cocos2d_ui_Scale9Sprite_create$3(L); + return _olua_fun_cocos2d_ui_Scale9Sprite_create$3(L); } // if ((olua_is_string(L, 1)) && (olua_is_object(L, 2, "cc.Rect"))) { // static cocos2d::ui::Scale9Sprite *create(const std::string &file, const cocos2d::Rect &rect) - return _cocos2d_ui_Scale9Sprite_create$4(L); + return _olua_fun_cocos2d_ui_Scale9Sprite_create$4(L); // } } if (num_args == 3) { // if ((olua_is_string(L, 1)) && (olua_is_object(L, 2, "cc.Rect")) && (olua_is_object(L, 3, "cc.Rect"))) { // static cocos2d::ui::Scale9Sprite *create(const std::string &file, const cocos2d::Rect &rect, const cocos2d::Rect &capInsets) - return _cocos2d_ui_Scale9Sprite_create$2(L); + return _olua_fun_cocos2d_ui_Scale9Sprite_create$2(L); // } } @@ -2474,7 +2669,7 @@ static int _cocos2d_ui_Scale9Sprite_create(lua_State *L) return 0; } -static int _cocos2d_ui_Scale9Sprite_createWithSpriteFrame$1(lua_State *L) +static int _olua_fun_cocos2d_ui_Scale9Sprite_createWithSpriteFrame$1(lua_State *L) { olua_startinvoke(L); @@ -2491,18 +2686,18 @@ static int _cocos2d_ui_Scale9Sprite_createWithSpriteFrame$1(lua_State *L) return num_ret; } -static int _cocos2d_ui_Scale9Sprite_createWithSpriteFrame$2(lua_State *L) +static int _olua_fun_cocos2d_ui_Scale9Sprite_createWithSpriteFrame$2(lua_State *L) { olua_startinvoke(L); cocos2d::SpriteFrame *arg1 = nullptr; /** spriteFrame */ - cocos2d::Rect arg2; /** capInsets */ + cocos2d::Rect *arg2; /** capInsets */ olua_check_object(L, 1, &arg1, "cc.SpriteFrame"); olua_check_object(L, 2, &arg2, "cc.Rect"); // static cocos2d::ui::Scale9Sprite *createWithSpriteFrame(cocos2d::SpriteFrame *spriteFrame, const cocos2d::Rect &capInsets) - cocos2d::ui::Scale9Sprite *ret = cocos2d::ui::Scale9Sprite::createWithSpriteFrame(arg1, arg2); + cocos2d::ui::Scale9Sprite *ret = cocos2d::ui::Scale9Sprite::createWithSpriteFrame(arg1, *arg2); int num_ret = olua_push_object(L, ret, "ccui.Scale9Sprite"); olua_endinvoke(L); @@ -2510,21 +2705,21 @@ static int _cocos2d_ui_Scale9Sprite_createWithSpriteFrame$2(lua_State *L) return num_ret; } -static int _cocos2d_ui_Scale9Sprite_createWithSpriteFrame(lua_State *L) +static int _olua_fun_cocos2d_ui_Scale9Sprite_createWithSpriteFrame(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 1) { // if ((olua_is_object(L, 1, "cc.SpriteFrame"))) { // static cocos2d::ui::Scale9Sprite *createWithSpriteFrame(cocos2d::SpriteFrame *spriteFrame) - return _cocos2d_ui_Scale9Sprite_createWithSpriteFrame$1(L); + return _olua_fun_cocos2d_ui_Scale9Sprite_createWithSpriteFrame$1(L); // } } if (num_args == 2) { // if ((olua_is_object(L, 1, "cc.SpriteFrame")) && (olua_is_object(L, 2, "cc.Rect"))) { // static cocos2d::ui::Scale9Sprite *createWithSpriteFrame(cocos2d::SpriteFrame *spriteFrame, const cocos2d::Rect &capInsets) - return _cocos2d_ui_Scale9Sprite_createWithSpriteFrame$2(L); + return _olua_fun_cocos2d_ui_Scale9Sprite_createWithSpriteFrame$2(L); // } } @@ -2533,7 +2728,7 @@ static int _cocos2d_ui_Scale9Sprite_createWithSpriteFrame(lua_State *L) return 0; } -static int _cocos2d_ui_Scale9Sprite_createWithSpriteFrameName$1(lua_State *L) +static int _olua_fun_cocos2d_ui_Scale9Sprite_createWithSpriteFrameName$1(lua_State *L) { olua_startinvoke(L); @@ -2550,18 +2745,18 @@ static int _cocos2d_ui_Scale9Sprite_createWithSpriteFrameName$1(lua_State *L) return num_ret; } -static int _cocos2d_ui_Scale9Sprite_createWithSpriteFrameName$2(lua_State *L) +static int _olua_fun_cocos2d_ui_Scale9Sprite_createWithSpriteFrameName$2(lua_State *L) { olua_startinvoke(L); std::string arg1; /** spriteFrameName */ - cocos2d::Rect arg2; /** capInsets */ + cocos2d::Rect *arg2; /** capInsets */ olua_check_string(L, 1, &arg1); olua_check_object(L, 2, &arg2, "cc.Rect"); // static cocos2d::ui::Scale9Sprite *createWithSpriteFrameName(const std::string &spriteFrameName, const cocos2d::Rect &capInsets) - cocos2d::ui::Scale9Sprite *ret = cocos2d::ui::Scale9Sprite::createWithSpriteFrameName(arg1, arg2); + cocos2d::ui::Scale9Sprite *ret = cocos2d::ui::Scale9Sprite::createWithSpriteFrameName(arg1, *arg2); int num_ret = olua_push_object(L, ret, "ccui.Scale9Sprite"); olua_endinvoke(L); @@ -2569,21 +2764,21 @@ static int _cocos2d_ui_Scale9Sprite_createWithSpriteFrameName$2(lua_State *L) return num_ret; } -static int _cocos2d_ui_Scale9Sprite_createWithSpriteFrameName(lua_State *L) +static int _olua_fun_cocos2d_ui_Scale9Sprite_createWithSpriteFrameName(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 1) { // if ((olua_is_string(L, 1))) { // static cocos2d::ui::Scale9Sprite *createWithSpriteFrameName(const std::string &spriteFrameName) - return _cocos2d_ui_Scale9Sprite_createWithSpriteFrameName$1(L); + return _olua_fun_cocos2d_ui_Scale9Sprite_createWithSpriteFrameName$1(L); // } } if (num_args == 2) { // if ((olua_is_string(L, 1)) && (olua_is_object(L, 2, "cc.Rect"))) { // static cocos2d::ui::Scale9Sprite *createWithSpriteFrameName(const std::string &spriteFrameName, const cocos2d::Rect &capInsets) - return _cocos2d_ui_Scale9Sprite_createWithSpriteFrameName$2(L); + return _olua_fun_cocos2d_ui_Scale9Sprite_createWithSpriteFrameName$2(L); // } } @@ -2592,7 +2787,7 @@ static int _cocos2d_ui_Scale9Sprite_createWithSpriteFrameName(lua_State *L) return 0; } -static int _cocos2d_ui_Scale9Sprite_getCapInsets(lua_State *L) +static int _olua_fun_cocos2d_ui_Scale9Sprite_getCapInsets(lua_State *L) { olua_startinvoke(L); @@ -2602,14 +2797,14 @@ static int _cocos2d_ui_Scale9Sprite_getCapInsets(lua_State *L) // cocos2d::Rect getCapInsets() cocos2d::Rect ret = self->getCapInsets(); - int num_ret = olua_pushcopy_object(L, ret, "cc.Rect"); + int num_ret = olua_copy_object(L, ret, "cc.Rect"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_ui_Scale9Sprite_getInsetBottom(lua_State *L) +static int _olua_fun_cocos2d_ui_Scale9Sprite_getInsetBottom(lua_State *L) { olua_startinvoke(L); @@ -2626,7 +2821,7 @@ static int _cocos2d_ui_Scale9Sprite_getInsetBottom(lua_State *L) return num_ret; } -static int _cocos2d_ui_Scale9Sprite_getInsetLeft(lua_State *L) +static int _olua_fun_cocos2d_ui_Scale9Sprite_getInsetLeft(lua_State *L) { olua_startinvoke(L); @@ -2643,7 +2838,7 @@ static int _cocos2d_ui_Scale9Sprite_getInsetLeft(lua_State *L) return num_ret; } -static int _cocos2d_ui_Scale9Sprite_getInsetRight(lua_State *L) +static int _olua_fun_cocos2d_ui_Scale9Sprite_getInsetRight(lua_State *L) { olua_startinvoke(L); @@ -2660,7 +2855,7 @@ static int _cocos2d_ui_Scale9Sprite_getInsetRight(lua_State *L) return num_ret; } -static int _cocos2d_ui_Scale9Sprite_getInsetTop(lua_State *L) +static int _olua_fun_cocos2d_ui_Scale9Sprite_getInsetTop(lua_State *L) { olua_startinvoke(L); @@ -2677,7 +2872,7 @@ static int _cocos2d_ui_Scale9Sprite_getInsetTop(lua_State *L) return num_ret; } -static int _cocos2d_ui_Scale9Sprite_getOriginalSize(lua_State *L) +static int _olua_fun_cocos2d_ui_Scale9Sprite_getOriginalSize(lua_State *L) { olua_startinvoke(L); @@ -2687,14 +2882,14 @@ static int _cocos2d_ui_Scale9Sprite_getOriginalSize(lua_State *L) // cocos2d::Size getOriginalSize() cocos2d::Size ret = self->getOriginalSize(); - int num_ret = olua_pushcopy_object(L, ret, "cc.Size"); + int num_ret = olua_copy_object(L, ret, "cc.Size"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_ui_Scale9Sprite_getPreferredSize(lua_State *L) +static int _olua_fun_cocos2d_ui_Scale9Sprite_getPreferredSize(lua_State *L) { olua_startinvoke(L); @@ -2704,14 +2899,14 @@ static int _cocos2d_ui_Scale9Sprite_getPreferredSize(lua_State *L) // cocos2d::Size getPreferredSize() cocos2d::Size ret = self->getPreferredSize(); - int num_ret = olua_pushcopy_object(L, ret, "cc.Size"); + int num_ret = olua_copy_object(L, ret, "cc.Size"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_ui_Scale9Sprite_getRenderingType(lua_State *L) +static int _olua_fun_cocos2d_ui_Scale9Sprite_getRenderingType(lua_State *L) { olua_startinvoke(L); @@ -2728,7 +2923,7 @@ static int _cocos2d_ui_Scale9Sprite_getRenderingType(lua_State *L) return num_ret; } -static int _cocos2d_ui_Scale9Sprite_getSprite(lua_State *L) +static int _olua_fun_cocos2d_ui_Scale9Sprite_getSprite(lua_State *L) { olua_startinvoke(L); @@ -2745,7 +2940,7 @@ static int _cocos2d_ui_Scale9Sprite_getSprite(lua_State *L) return num_ret; } -static int _cocos2d_ui_Scale9Sprite_getState(lua_State *L) +static int _olua_fun_cocos2d_ui_Scale9Sprite_getState(lua_State *L) { olua_startinvoke(L); @@ -2762,7 +2957,7 @@ static int _cocos2d_ui_Scale9Sprite_getState(lua_State *L) return num_ret; } -static int _cocos2d_ui_Scale9Sprite_init$1(lua_State *L) +static int _olua_fun_cocos2d_ui_Scale9Sprite_init$1(lua_State *L) { olua_startinvoke(L); @@ -2779,15 +2974,15 @@ static int _cocos2d_ui_Scale9Sprite_init$1(lua_State *L) return num_ret; } -static int _cocos2d_ui_Scale9Sprite_init$2(lua_State *L) +static int _olua_fun_cocos2d_ui_Scale9Sprite_init$2(lua_State *L) { olua_startinvoke(L); cocos2d::ui::Scale9Sprite *self = nullptr; cocos2d::Sprite *arg1 = nullptr; /** sprite */ - cocos2d::Rect arg2; /** rect */ + cocos2d::Rect *arg2; /** rect */ bool arg3 = false; /** rotated */ - cocos2d::Rect arg4; /** capInsets */ + cocos2d::Rect *arg4; /** capInsets */ olua_to_object(L, 1, &self, "ccui.Scale9Sprite"); olua_check_object(L, 2, &arg1, "cc.Sprite"); @@ -2796,7 +2991,7 @@ static int _cocos2d_ui_Scale9Sprite_init$2(lua_State *L) olua_check_object(L, 5, &arg4, "cc.Rect"); // bool init(cocos2d::Sprite *sprite, const cocos2d::Rect &rect, bool rotated, const cocos2d::Rect &capInsets) - bool ret = self->init(arg1, arg2, arg3, arg4); + bool ret = self->init(arg1, *arg2, arg3, *arg4); int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); @@ -2804,14 +2999,14 @@ static int _cocos2d_ui_Scale9Sprite_init$2(lua_State *L) return num_ret; } -static int _cocos2d_ui_Scale9Sprite_init$3(lua_State *L) +static int _olua_fun_cocos2d_ui_Scale9Sprite_init$3(lua_State *L) { olua_startinvoke(L); cocos2d::ui::Scale9Sprite *self = nullptr; cocos2d::Sprite *arg1 = nullptr; /** sprite */ - cocos2d::Rect arg2; /** rect */ - cocos2d::Rect arg3; /** capInsets */ + cocos2d::Rect *arg2; /** rect */ + cocos2d::Rect *arg3; /** capInsets */ olua_to_object(L, 1, &self, "ccui.Scale9Sprite"); olua_check_object(L, 2, &arg1, "cc.Sprite"); @@ -2819,7 +3014,7 @@ static int _cocos2d_ui_Scale9Sprite_init$3(lua_State *L) olua_check_object(L, 4, &arg3, "cc.Rect"); // bool init(cocos2d::Sprite *sprite, const cocos2d::Rect &rect, const cocos2d::Rect &capInsets) - bool ret = self->init(arg1, arg2, arg3); + bool ret = self->init(arg1, *arg2, *arg3); int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); @@ -2827,17 +3022,17 @@ static int _cocos2d_ui_Scale9Sprite_init$3(lua_State *L) return num_ret; } -static int _cocos2d_ui_Scale9Sprite_init$4(lua_State *L) +static int _olua_fun_cocos2d_ui_Scale9Sprite_init$4(lua_State *L) { olua_startinvoke(L); cocos2d::ui::Scale9Sprite *self = nullptr; cocos2d::Sprite *arg1 = nullptr; /** sprite */ - cocos2d::Rect arg2; /** rect */ + cocos2d::Rect *arg2; /** rect */ bool arg3 = false; /** rotated */ - cocos2d::Vec2 arg4; /** offset */ - cocos2d::Size arg5; /** originalSize */ - cocos2d::Rect arg6; /** capInsets */ + cocos2d::Vec2 *arg4; /** offset */ + cocos2d::Size *arg5; /** originalSize */ + cocos2d::Rect *arg6; /** capInsets */ olua_to_object(L, 1, &self, "ccui.Scale9Sprite"); olua_check_object(L, 2, &arg1, "cc.Sprite"); @@ -2848,7 +3043,7 @@ static int _cocos2d_ui_Scale9Sprite_init$4(lua_State *L) olua_check_object(L, 7, &arg6, "cc.Rect"); // bool init(cocos2d::Sprite *sprite, const cocos2d::Rect &rect, bool rotated, const cocos2d::Vec2 &offset, const cocos2d::Size &originalSize, const cocos2d::Rect &capInsets) - bool ret = self->init(arg1, arg2, arg3, arg4, arg5, arg6); + bool ret = self->init(arg1, *arg2, arg3, *arg4, *arg5, *arg6); int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); @@ -2856,33 +3051,33 @@ static int _cocos2d_ui_Scale9Sprite_init$4(lua_State *L) return num_ret; } -static int _cocos2d_ui_Scale9Sprite_init(lua_State *L) +static int _olua_fun_cocos2d_ui_Scale9Sprite_init(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 0) { // @using bool init() - return _cocos2d_ui_Scale9Sprite_init$1(L); + return _olua_fun_cocos2d_ui_Scale9Sprite_init$1(L); } if (num_args == 3) { // if ((olua_is_object(L, 2, "cc.Sprite")) && (olua_is_object(L, 3, "cc.Rect")) && (olua_is_object(L, 4, "cc.Rect"))) { // bool init(cocos2d::Sprite *sprite, const cocos2d::Rect &rect, const cocos2d::Rect &capInsets) - return _cocos2d_ui_Scale9Sprite_init$3(L); + return _olua_fun_cocos2d_ui_Scale9Sprite_init$3(L); // } } if (num_args == 4) { // if ((olua_is_object(L, 2, "cc.Sprite")) && (olua_is_object(L, 3, "cc.Rect")) && (olua_is_bool(L, 4)) && (olua_is_object(L, 5, "cc.Rect"))) { // bool init(cocos2d::Sprite *sprite, const cocos2d::Rect &rect, bool rotated, const cocos2d::Rect &capInsets) - return _cocos2d_ui_Scale9Sprite_init$2(L); + return _olua_fun_cocos2d_ui_Scale9Sprite_init$2(L); // } } if (num_args == 6) { // if ((olua_is_object(L, 2, "cc.Sprite")) && (olua_is_object(L, 3, "cc.Rect")) && (olua_is_bool(L, 4)) && (olua_is_object(L, 5, "cc.Vec2")) && (olua_is_object(L, 6, "cc.Size")) && (olua_is_object(L, 7, "cc.Rect"))) { // bool init(cocos2d::Sprite *sprite, const cocos2d::Rect &rect, bool rotated, const cocos2d::Vec2 &offset, const cocos2d::Size &originalSize, const cocos2d::Rect &capInsets) - return _cocos2d_ui_Scale9Sprite_init$4(L); + return _olua_fun_cocos2d_ui_Scale9Sprite_init$4(L); // } } @@ -2891,14 +3086,14 @@ static int _cocos2d_ui_Scale9Sprite_init(lua_State *L) return 0; } -static int _cocos2d_ui_Scale9Sprite_initWithFile$1(lua_State *L) +static int _olua_fun_cocos2d_ui_Scale9Sprite_initWithFile$1(lua_State *L) { olua_startinvoke(L); cocos2d::ui::Scale9Sprite *self = nullptr; std::string arg1; /** file */ - cocos2d::Rect arg2; /** rect */ - cocos2d::Rect arg3; /** capInsets */ + cocos2d::Rect *arg2; /** rect */ + cocos2d::Rect *arg3; /** capInsets */ olua_to_object(L, 1, &self, "ccui.Scale9Sprite"); olua_check_string(L, 2, &arg1); @@ -2906,7 +3101,7 @@ static int _cocos2d_ui_Scale9Sprite_initWithFile$1(lua_State *L) olua_check_object(L, 4, &arg3, "cc.Rect"); // bool initWithFile(const std::string &file, const cocos2d::Rect &rect, const cocos2d::Rect &capInsets) - bool ret = self->initWithFile(arg1, arg2, arg3); + bool ret = self->initWithFile(arg1, *arg2, *arg3); int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); @@ -2914,12 +3109,12 @@ static int _cocos2d_ui_Scale9Sprite_initWithFile$1(lua_State *L) return num_ret; } -static int _cocos2d_ui_Scale9Sprite_initWithFile$2(lua_State *L) +static int _olua_fun_cocos2d_ui_Scale9Sprite_initWithFile$2(lua_State *L) { olua_startinvoke(L); cocos2d::ui::Scale9Sprite *self = nullptr; - cocos2d::Rect arg1; /** capInsets */ + cocos2d::Rect *arg1; /** capInsets */ std::string arg2; /** file */ olua_to_object(L, 1, &self, "ccui.Scale9Sprite"); @@ -2927,7 +3122,7 @@ static int _cocos2d_ui_Scale9Sprite_initWithFile$2(lua_State *L) olua_check_string(L, 3, &arg2); // bool initWithFile(const cocos2d::Rect &capInsets, const std::string &file) - bool ret = self->initWithFile(arg1, arg2); + bool ret = self->initWithFile(*arg1, arg2); int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); @@ -2935,20 +3130,20 @@ static int _cocos2d_ui_Scale9Sprite_initWithFile$2(lua_State *L) return num_ret; } -static int _cocos2d_ui_Scale9Sprite_initWithFile$3(lua_State *L) +static int _olua_fun_cocos2d_ui_Scale9Sprite_initWithFile$3(lua_State *L) { olua_startinvoke(L); cocos2d::ui::Scale9Sprite *self = nullptr; std::string arg1; /** file */ - cocos2d::Rect arg2; /** rect */ + cocos2d::Rect *arg2; /** rect */ olua_to_object(L, 1, &self, "ccui.Scale9Sprite"); olua_check_string(L, 2, &arg1); olua_check_object(L, 3, &arg2, "cc.Rect"); // @using bool initWithFile(const std::string &file, const cocos2d::Rect &rect) - bool ret = self->initWithFile(arg1, arg2); + bool ret = self->initWithFile(arg1, *arg2); int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); @@ -2956,7 +3151,7 @@ static int _cocos2d_ui_Scale9Sprite_initWithFile$3(lua_State *L) return num_ret; } -static int _cocos2d_ui_Scale9Sprite_initWithFile$4(lua_State *L) +static int _olua_fun_cocos2d_ui_Scale9Sprite_initWithFile$4(lua_State *L) { olua_startinvoke(L); @@ -2975,33 +3170,33 @@ static int _cocos2d_ui_Scale9Sprite_initWithFile$4(lua_State *L) return num_ret; } -static int _cocos2d_ui_Scale9Sprite_initWithFile(lua_State *L) +static int _olua_fun_cocos2d_ui_Scale9Sprite_initWithFile(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_string(L, 2))) { // @using bool initWithFile(const std::string &file) - return _cocos2d_ui_Scale9Sprite_initWithFile$4(L); + return _olua_fun_cocos2d_ui_Scale9Sprite_initWithFile$4(L); // } } if (num_args == 2) { if ((olua_is_object(L, 2, "cc.Rect")) && (olua_is_string(L, 3))) { // bool initWithFile(const cocos2d::Rect &capInsets, const std::string &file) - return _cocos2d_ui_Scale9Sprite_initWithFile$2(L); + return _olua_fun_cocos2d_ui_Scale9Sprite_initWithFile$2(L); } // if ((olua_is_string(L, 2)) && (olua_is_object(L, 3, "cc.Rect"))) { // @using bool initWithFile(const std::string &file, const cocos2d::Rect &rect) - return _cocos2d_ui_Scale9Sprite_initWithFile$3(L); + return _olua_fun_cocos2d_ui_Scale9Sprite_initWithFile$3(L); // } } if (num_args == 3) { // if ((olua_is_string(L, 2)) && (olua_is_object(L, 3, "cc.Rect")) && (olua_is_object(L, 4, "cc.Rect"))) { // bool initWithFile(const std::string &file, const cocos2d::Rect &rect, const cocos2d::Rect &capInsets) - return _cocos2d_ui_Scale9Sprite_initWithFile$1(L); + return _olua_fun_cocos2d_ui_Scale9Sprite_initWithFile$1(L); // } } @@ -3010,20 +3205,20 @@ static int _cocos2d_ui_Scale9Sprite_initWithFile(lua_State *L) return 0; } -static int _cocos2d_ui_Scale9Sprite_initWithSpriteFrame$1(lua_State *L) +static int _olua_fun_cocos2d_ui_Scale9Sprite_initWithSpriteFrame$1(lua_State *L) { olua_startinvoke(L); cocos2d::ui::Scale9Sprite *self = nullptr; cocos2d::SpriteFrame *arg1 = nullptr; /** spriteFrame */ - cocos2d::Rect arg2; /** capInsets */ + cocos2d::Rect *arg2; /** capInsets */ olua_to_object(L, 1, &self, "ccui.Scale9Sprite"); olua_check_object(L, 2, &arg1, "cc.SpriteFrame"); olua_check_object(L, 3, &arg2, "cc.Rect"); // bool initWithSpriteFrame(cocos2d::SpriteFrame *spriteFrame, const cocos2d::Rect &capInsets) - bool ret = self->initWithSpriteFrame(arg1, arg2); + bool ret = self->initWithSpriteFrame(arg1, *arg2); int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); @@ -3031,7 +3226,7 @@ static int _cocos2d_ui_Scale9Sprite_initWithSpriteFrame$1(lua_State *L) return num_ret; } -static int _cocos2d_ui_Scale9Sprite_initWithSpriteFrame$2(lua_State *L) +static int _olua_fun_cocos2d_ui_Scale9Sprite_initWithSpriteFrame$2(lua_State *L) { olua_startinvoke(L); @@ -3050,21 +3245,21 @@ static int _cocos2d_ui_Scale9Sprite_initWithSpriteFrame$2(lua_State *L) return num_ret; } -static int _cocos2d_ui_Scale9Sprite_initWithSpriteFrame(lua_State *L) +static int _olua_fun_cocos2d_ui_Scale9Sprite_initWithSpriteFrame(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_object(L, 2, "cc.SpriteFrame"))) { // @using bool initWithSpriteFrame(cocos2d::SpriteFrame *spriteFrame) - return _cocos2d_ui_Scale9Sprite_initWithSpriteFrame$2(L); + return _olua_fun_cocos2d_ui_Scale9Sprite_initWithSpriteFrame$2(L); // } } if (num_args == 2) { // if ((olua_is_object(L, 2, "cc.SpriteFrame")) && (olua_is_object(L, 3, "cc.Rect"))) { // bool initWithSpriteFrame(cocos2d::SpriteFrame *spriteFrame, const cocos2d::Rect &capInsets) - return _cocos2d_ui_Scale9Sprite_initWithSpriteFrame$1(L); + return _olua_fun_cocos2d_ui_Scale9Sprite_initWithSpriteFrame$1(L); // } } @@ -3073,20 +3268,20 @@ static int _cocos2d_ui_Scale9Sprite_initWithSpriteFrame(lua_State *L) return 0; } -static int _cocos2d_ui_Scale9Sprite_initWithSpriteFrameName$1(lua_State *L) +static int _olua_fun_cocos2d_ui_Scale9Sprite_initWithSpriteFrameName$1(lua_State *L) { olua_startinvoke(L); cocos2d::ui::Scale9Sprite *self = nullptr; std::string arg1; /** spriteFrameName */ - cocos2d::Rect arg2; /** capInsets */ + cocos2d::Rect *arg2; /** capInsets */ olua_to_object(L, 1, &self, "ccui.Scale9Sprite"); olua_check_string(L, 2, &arg1); olua_check_object(L, 3, &arg2, "cc.Rect"); // bool initWithSpriteFrameName(const std::string &spriteFrameName, const cocos2d::Rect &capInsets) - bool ret = self->initWithSpriteFrameName(arg1, arg2); + bool ret = self->initWithSpriteFrameName(arg1, *arg2); int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); @@ -3094,7 +3289,7 @@ static int _cocos2d_ui_Scale9Sprite_initWithSpriteFrameName$1(lua_State *L) return num_ret; } -static int _cocos2d_ui_Scale9Sprite_initWithSpriteFrameName$2(lua_State *L) +static int _olua_fun_cocos2d_ui_Scale9Sprite_initWithSpriteFrameName$2(lua_State *L) { olua_startinvoke(L); @@ -3113,21 +3308,21 @@ static int _cocos2d_ui_Scale9Sprite_initWithSpriteFrameName$2(lua_State *L) return num_ret; } -static int _cocos2d_ui_Scale9Sprite_initWithSpriteFrameName(lua_State *L) +static int _olua_fun_cocos2d_ui_Scale9Sprite_initWithSpriteFrameName(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_string(L, 2))) { // @using bool initWithSpriteFrameName(const std::string &spriteFrameName) - return _cocos2d_ui_Scale9Sprite_initWithSpriteFrameName$2(L); + return _olua_fun_cocos2d_ui_Scale9Sprite_initWithSpriteFrameName$2(L); // } } if (num_args == 2) { // if ((olua_is_string(L, 2)) && (olua_is_object(L, 3, "cc.Rect"))) { // bool initWithSpriteFrameName(const std::string &spriteFrameName, const cocos2d::Rect &capInsets) - return _cocos2d_ui_Scale9Sprite_initWithSpriteFrameName$1(L); + return _olua_fun_cocos2d_ui_Scale9Sprite_initWithSpriteFrameName$1(L); // } } @@ -3136,7 +3331,7 @@ static int _cocos2d_ui_Scale9Sprite_initWithSpriteFrameName(lua_State *L) return 0; } -static int _cocos2d_ui_Scale9Sprite_isScale9Enabled(lua_State *L) +static int _olua_fun_cocos2d_ui_Scale9Sprite_isScale9Enabled(lua_State *L) { olua_startinvoke(L); @@ -3153,11 +3348,11 @@ static int _cocos2d_ui_Scale9Sprite_isScale9Enabled(lua_State *L) return num_ret; } -static int _cocos2d_ui_Scale9Sprite_new(lua_State *L) +static int _olua_fun_cocos2d_ui_Scale9Sprite_new(lua_State *L) { olua_startinvoke(L); - // Scale9Sprite() + // cocos2d::ui::Scale9Sprite() cocos2d::ui::Scale9Sprite *ret = new cocos2d::ui::Scale9Sprite(); int num_ret = olua_push_object(L, ret, "ccui.Scale9Sprite"); olua_postnew(L, ret); @@ -3167,7 +3362,7 @@ static int _cocos2d_ui_Scale9Sprite_new(lua_State *L) return num_ret; } -static int _cocos2d_ui_Scale9Sprite_resetRender(lua_State *L) +static int _olua_fun_cocos2d_ui_Scale9Sprite_resetRender(lua_State *L) { olua_startinvoke(L); @@ -3183,18 +3378,18 @@ static int _cocos2d_ui_Scale9Sprite_resetRender(lua_State *L) return 0; } -static int _cocos2d_ui_Scale9Sprite_resizableSpriteWithCapInsets(lua_State *L) +static int _olua_fun_cocos2d_ui_Scale9Sprite_resizableSpriteWithCapInsets(lua_State *L) { olua_startinvoke(L); cocos2d::ui::Scale9Sprite *self = nullptr; - cocos2d::Rect arg1; /** capInsets */ + cocos2d::Rect *arg1; /** capInsets */ olua_to_object(L, 1, &self, "ccui.Scale9Sprite"); olua_check_object(L, 2, &arg1, "cc.Rect"); // cocos2d::ui::Scale9Sprite *resizableSpriteWithCapInsets(const cocos2d::Rect &capInsets) - cocos2d::ui::Scale9Sprite *ret = self->resizableSpriteWithCapInsets(arg1); + cocos2d::ui::Scale9Sprite *ret = self->resizableSpriteWithCapInsets(*arg1); int num_ret = olua_push_object(L, ret, "ccui.Scale9Sprite"); olua_endinvoke(L); @@ -3202,25 +3397,25 @@ static int _cocos2d_ui_Scale9Sprite_resizableSpriteWithCapInsets(lua_State *L) return num_ret; } -static int _cocos2d_ui_Scale9Sprite_setCapInsets(lua_State *L) +static int _olua_fun_cocos2d_ui_Scale9Sprite_setCapInsets(lua_State *L) { olua_startinvoke(L); cocos2d::ui::Scale9Sprite *self = nullptr; - cocos2d::Rect arg1; /** insets */ + cocos2d::Rect *arg1; /** insets */ olua_to_object(L, 1, &self, "ccui.Scale9Sprite"); olua_check_object(L, 2, &arg1, "cc.Rect"); // void setCapInsets(const cocos2d::Rect &insets) - self->setCapInsets(arg1); + self->setCapInsets(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_ui_Scale9Sprite_setInsetBottom(lua_State *L) +static int _olua_fun_cocos2d_ui_Scale9Sprite_setInsetBottom(lua_State *L) { olua_startinvoke(L); @@ -3238,7 +3433,7 @@ static int _cocos2d_ui_Scale9Sprite_setInsetBottom(lua_State *L) return 0; } -static int _cocos2d_ui_Scale9Sprite_setInsetLeft(lua_State *L) +static int _olua_fun_cocos2d_ui_Scale9Sprite_setInsetLeft(lua_State *L) { olua_startinvoke(L); @@ -3256,7 +3451,7 @@ static int _cocos2d_ui_Scale9Sprite_setInsetLeft(lua_State *L) return 0; } -static int _cocos2d_ui_Scale9Sprite_setInsetRight(lua_State *L) +static int _olua_fun_cocos2d_ui_Scale9Sprite_setInsetRight(lua_State *L) { olua_startinvoke(L); @@ -3274,7 +3469,7 @@ static int _cocos2d_ui_Scale9Sprite_setInsetRight(lua_State *L) return 0; } -static int _cocos2d_ui_Scale9Sprite_setInsetTop(lua_State *L) +static int _olua_fun_cocos2d_ui_Scale9Sprite_setInsetTop(lua_State *L) { olua_startinvoke(L); @@ -3292,25 +3487,25 @@ static int _cocos2d_ui_Scale9Sprite_setInsetTop(lua_State *L) return 0; } -static int _cocos2d_ui_Scale9Sprite_setPreferredSize(lua_State *L) +static int _olua_fun_cocos2d_ui_Scale9Sprite_setPreferredSize(lua_State *L) { olua_startinvoke(L); cocos2d::ui::Scale9Sprite *self = nullptr; - cocos2d::Size arg1; /** size */ + cocos2d::Size *arg1; /** size */ olua_to_object(L, 1, &self, "ccui.Scale9Sprite"); olua_check_object(L, 2, &arg1, "cc.Size"); // void setPreferredSize(const cocos2d::Size &size) - self->setPreferredSize(arg1); + self->setPreferredSize(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_ui_Scale9Sprite_setRenderingType(lua_State *L) +static int _olua_fun_cocos2d_ui_Scale9Sprite_setRenderingType(lua_State *L) { olua_startinvoke(L); @@ -3328,7 +3523,7 @@ static int _cocos2d_ui_Scale9Sprite_setRenderingType(lua_State *L) return 0; } -static int _cocos2d_ui_Scale9Sprite_setScale9Enabled(lua_State *L) +static int _olua_fun_cocos2d_ui_Scale9Sprite_setScale9Enabled(lua_State *L) { olua_startinvoke(L); @@ -3346,27 +3541,27 @@ static int _cocos2d_ui_Scale9Sprite_setScale9Enabled(lua_State *L) return 0; } -static int _cocos2d_ui_Scale9Sprite_setSpriteFrame$1(lua_State *L) +static int _olua_fun_cocos2d_ui_Scale9Sprite_setSpriteFrame$1(lua_State *L) { olua_startinvoke(L); cocos2d::ui::Scale9Sprite *self = nullptr; cocos2d::SpriteFrame *arg1 = nullptr; /** spriteFrame */ - cocos2d::Rect arg2; /** capInsets */ + cocos2d::Rect *arg2; /** capInsets */ olua_to_object(L, 1, &self, "ccui.Scale9Sprite"); olua_check_object(L, 2, &arg1, "cc.SpriteFrame"); olua_check_object(L, 3, &arg2, "cc.Rect"); // void setSpriteFrame(cocos2d::SpriteFrame *spriteFrame, const cocos2d::Rect &capInsets) - self->setSpriteFrame(arg1, arg2); + self->setSpriteFrame(arg1, *arg2); olua_endinvoke(L); return 0; } -static int _cocos2d_ui_Scale9Sprite_setSpriteFrame$2(lua_State *L) +static int _olua_fun_cocos2d_ui_Scale9Sprite_setSpriteFrame$2(lua_State *L) { olua_startinvoke(L); @@ -3384,7 +3579,7 @@ static int _cocos2d_ui_Scale9Sprite_setSpriteFrame$2(lua_State *L) return 0; } -static int _cocos2d_ui_Scale9Sprite_setSpriteFrame$3(lua_State *L) +static int _olua_fun_cocos2d_ui_Scale9Sprite_setSpriteFrame$3(lua_State *L) { olua_startinvoke(L); @@ -3402,26 +3597,26 @@ static int _cocos2d_ui_Scale9Sprite_setSpriteFrame$3(lua_State *L) return 0; } -static int _cocos2d_ui_Scale9Sprite_setSpriteFrame(lua_State *L) +static int _olua_fun_cocos2d_ui_Scale9Sprite_setSpriteFrame(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { if ((olua_is_string(L, 2))) { // @using void setSpriteFrame(const std::string &spriteFrameName) - return _cocos2d_ui_Scale9Sprite_setSpriteFrame$2(L); + return _olua_fun_cocos2d_ui_Scale9Sprite_setSpriteFrame$2(L); } // if ((olua_is_object(L, 2, "cc.SpriteFrame"))) { // @using void setSpriteFrame(cocos2d::SpriteFrame *newFrame) - return _cocos2d_ui_Scale9Sprite_setSpriteFrame$3(L); + return _olua_fun_cocos2d_ui_Scale9Sprite_setSpriteFrame$3(L); // } } if (num_args == 2) { // if ((olua_is_object(L, 2, "cc.SpriteFrame")) && (olua_is_object(L, 3, "cc.Rect"))) { // void setSpriteFrame(cocos2d::SpriteFrame *spriteFrame, const cocos2d::Rect &capInsets) - return _cocos2d_ui_Scale9Sprite_setSpriteFrame$1(L); + return _olua_fun_cocos2d_ui_Scale9Sprite_setSpriteFrame$1(L); // } } @@ -3430,7 +3625,7 @@ static int _cocos2d_ui_Scale9Sprite_setSpriteFrame(lua_State *L) return 0; } -static int _cocos2d_ui_Scale9Sprite_setState(lua_State *L) +static int _olua_fun_cocos2d_ui_Scale9Sprite_setState(lua_State *L) { olua_startinvoke(L); @@ -3448,15 +3643,15 @@ static int _cocos2d_ui_Scale9Sprite_setState(lua_State *L) return 0; } -static int _cocos2d_ui_Scale9Sprite_updateWithSprite$1(lua_State *L) +static int _olua_fun_cocos2d_ui_Scale9Sprite_updateWithSprite$1(lua_State *L) { olua_startinvoke(L); cocos2d::ui::Scale9Sprite *self = nullptr; cocos2d::Sprite *arg1 = nullptr; /** sprite */ - cocos2d::Rect arg2; /** rect */ + cocos2d::Rect *arg2; /** rect */ bool arg3 = false; /** rotated */ - cocos2d::Rect arg4; /** capInsets */ + cocos2d::Rect *arg4; /** capInsets */ olua_to_object(L, 1, &self, "ccui.Scale9Sprite"); olua_check_object(L, 2, &arg1, "cc.Sprite"); @@ -3465,7 +3660,7 @@ static int _cocos2d_ui_Scale9Sprite_updateWithSprite$1(lua_State *L) olua_check_object(L, 5, &arg4, "cc.Rect"); // bool updateWithSprite(cocos2d::Sprite *sprite, const cocos2d::Rect &rect, bool rotated, const cocos2d::Rect &capInsets) - bool ret = self->updateWithSprite(arg1, arg2, arg3, arg4); + bool ret = self->updateWithSprite(arg1, *arg2, arg3, *arg4); int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); @@ -3473,17 +3668,17 @@ static int _cocos2d_ui_Scale9Sprite_updateWithSprite$1(lua_State *L) return num_ret; } -static int _cocos2d_ui_Scale9Sprite_updateWithSprite$2(lua_State *L) +static int _olua_fun_cocos2d_ui_Scale9Sprite_updateWithSprite$2(lua_State *L) { olua_startinvoke(L); cocos2d::ui::Scale9Sprite *self = nullptr; cocos2d::Sprite *arg1 = nullptr; /** sprite */ - cocos2d::Rect arg2; /** rect */ + cocos2d::Rect *arg2; /** rect */ bool arg3 = false; /** rotated */ - cocos2d::Vec2 arg4; /** offset */ - cocos2d::Size arg5; /** originalSize */ - cocos2d::Rect arg6; /** capInsets */ + cocos2d::Vec2 *arg4; /** offset */ + cocos2d::Size *arg5; /** originalSize */ + cocos2d::Rect *arg6; /** capInsets */ olua_to_object(L, 1, &self, "ccui.Scale9Sprite"); olua_check_object(L, 2, &arg1, "cc.Sprite"); @@ -3494,7 +3689,7 @@ static int _cocos2d_ui_Scale9Sprite_updateWithSprite$2(lua_State *L) olua_check_object(L, 7, &arg6, "cc.Rect"); // bool updateWithSprite(cocos2d::Sprite *sprite, const cocos2d::Rect &rect, bool rotated, const cocos2d::Vec2 &offset, const cocos2d::Size &originalSize, const cocos2d::Rect &capInsets) - bool ret = self->updateWithSprite(arg1, arg2, arg3, arg4, arg5, arg6); + bool ret = self->updateWithSprite(arg1, *arg2, arg3, *arg4, *arg5, *arg6); int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); @@ -3502,21 +3697,21 @@ static int _cocos2d_ui_Scale9Sprite_updateWithSprite$2(lua_State *L) return num_ret; } -static int _cocos2d_ui_Scale9Sprite_updateWithSprite(lua_State *L) +static int _olua_fun_cocos2d_ui_Scale9Sprite_updateWithSprite(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 4) { // if ((olua_is_object(L, 2, "cc.Sprite")) && (olua_is_object(L, 3, "cc.Rect")) && (olua_is_bool(L, 4)) && (olua_is_object(L, 5, "cc.Rect"))) { // bool updateWithSprite(cocos2d::Sprite *sprite, const cocos2d::Rect &rect, bool rotated, const cocos2d::Rect &capInsets) - return _cocos2d_ui_Scale9Sprite_updateWithSprite$1(L); + return _olua_fun_cocos2d_ui_Scale9Sprite_updateWithSprite$1(L); // } } if (num_args == 6) { // if ((olua_is_object(L, 2, "cc.Sprite")) && (olua_is_object(L, 3, "cc.Rect")) && (olua_is_bool(L, 4)) && (olua_is_object(L, 5, "cc.Vec2")) && (olua_is_object(L, 6, "cc.Size")) && (olua_is_object(L, 7, "cc.Rect"))) { // bool updateWithSprite(cocos2d::Sprite *sprite, const cocos2d::Rect &rect, bool rotated, const cocos2d::Vec2 &offset, const cocos2d::Size &originalSize, const cocos2d::Rect &capInsets) - return _cocos2d_ui_Scale9Sprite_updateWithSprite$2(L); + return _olua_fun_cocos2d_ui_Scale9Sprite_updateWithSprite$2(L); // } } @@ -3525,61 +3720,69 @@ static int _cocos2d_ui_Scale9Sprite_updateWithSprite(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ui_Scale9Sprite(lua_State *L) +static int _olua_cls_ccui_Scale9Sprite(lua_State *L) { oluacls_class(L, "ccui.Scale9Sprite"); - oluacls_func(L, "copyTo", _cocos2d_ui_Scale9Sprite_copyTo); - oluacls_func(L, "create", _cocos2d_ui_Scale9Sprite_create); - oluacls_func(L, "createWithSpriteFrame", _cocos2d_ui_Scale9Sprite_createWithSpriteFrame); - oluacls_func(L, "createWithSpriteFrameName", _cocos2d_ui_Scale9Sprite_createWithSpriteFrameName); - oluacls_func(L, "getCapInsets", _cocos2d_ui_Scale9Sprite_getCapInsets); - oluacls_func(L, "getInsetBottom", _cocos2d_ui_Scale9Sprite_getInsetBottom); - oluacls_func(L, "getInsetLeft", _cocos2d_ui_Scale9Sprite_getInsetLeft); - oluacls_func(L, "getInsetRight", _cocos2d_ui_Scale9Sprite_getInsetRight); - oluacls_func(L, "getInsetTop", _cocos2d_ui_Scale9Sprite_getInsetTop); - oluacls_func(L, "getOriginalSize", _cocos2d_ui_Scale9Sprite_getOriginalSize); - oluacls_func(L, "getPreferredSize", _cocos2d_ui_Scale9Sprite_getPreferredSize); - oluacls_func(L, "getRenderingType", _cocos2d_ui_Scale9Sprite_getRenderingType); - oluacls_func(L, "getSprite", _cocos2d_ui_Scale9Sprite_getSprite); - oluacls_func(L, "getState", _cocos2d_ui_Scale9Sprite_getState); - oluacls_func(L, "init", _cocos2d_ui_Scale9Sprite_init); - oluacls_func(L, "initWithFile", _cocos2d_ui_Scale9Sprite_initWithFile); - oluacls_func(L, "initWithSpriteFrame", _cocos2d_ui_Scale9Sprite_initWithSpriteFrame); - oluacls_func(L, "initWithSpriteFrameName", _cocos2d_ui_Scale9Sprite_initWithSpriteFrameName); - oluacls_func(L, "isScale9Enabled", _cocos2d_ui_Scale9Sprite_isScale9Enabled); - oluacls_func(L, "new", _cocos2d_ui_Scale9Sprite_new); - oluacls_func(L, "resetRender", _cocos2d_ui_Scale9Sprite_resetRender); - oluacls_func(L, "resizableSpriteWithCapInsets", _cocos2d_ui_Scale9Sprite_resizableSpriteWithCapInsets); - oluacls_func(L, "setCapInsets", _cocos2d_ui_Scale9Sprite_setCapInsets); - oluacls_func(L, "setInsetBottom", _cocos2d_ui_Scale9Sprite_setInsetBottom); - oluacls_func(L, "setInsetLeft", _cocos2d_ui_Scale9Sprite_setInsetLeft); - oluacls_func(L, "setInsetRight", _cocos2d_ui_Scale9Sprite_setInsetRight); - oluacls_func(L, "setInsetTop", _cocos2d_ui_Scale9Sprite_setInsetTop); - oluacls_func(L, "setPreferredSize", _cocos2d_ui_Scale9Sprite_setPreferredSize); - oluacls_func(L, "setRenderingType", _cocos2d_ui_Scale9Sprite_setRenderingType); - oluacls_func(L, "setScale9Enabled", _cocos2d_ui_Scale9Sprite_setScale9Enabled); - oluacls_func(L, "setSpriteFrame", _cocos2d_ui_Scale9Sprite_setSpriteFrame); - oluacls_func(L, "setState", _cocos2d_ui_Scale9Sprite_setState); - oluacls_func(L, "updateWithSprite", _cocos2d_ui_Scale9Sprite_updateWithSprite); - oluacls_prop(L, "capInsets", _cocos2d_ui_Scale9Sprite_getCapInsets, _cocos2d_ui_Scale9Sprite_setCapInsets); - oluacls_prop(L, "insetBottom", _cocos2d_ui_Scale9Sprite_getInsetBottom, _cocos2d_ui_Scale9Sprite_setInsetBottom); - oluacls_prop(L, "insetLeft", _cocos2d_ui_Scale9Sprite_getInsetLeft, _cocos2d_ui_Scale9Sprite_setInsetLeft); - oluacls_prop(L, "insetRight", _cocos2d_ui_Scale9Sprite_getInsetRight, _cocos2d_ui_Scale9Sprite_setInsetRight); - oluacls_prop(L, "insetTop", _cocos2d_ui_Scale9Sprite_getInsetTop, _cocos2d_ui_Scale9Sprite_setInsetTop); - oluacls_prop(L, "originalSize", _cocos2d_ui_Scale9Sprite_getOriginalSize, nullptr); - oluacls_prop(L, "preferredSize", _cocos2d_ui_Scale9Sprite_getPreferredSize, _cocos2d_ui_Scale9Sprite_setPreferredSize); - oluacls_prop(L, "renderingType", _cocos2d_ui_Scale9Sprite_getRenderingType, _cocos2d_ui_Scale9Sprite_setRenderingType); - oluacls_prop(L, "scale9Enabled", _cocos2d_ui_Scale9Sprite_isScale9Enabled, _cocos2d_ui_Scale9Sprite_setScale9Enabled); - oluacls_prop(L, "sprite", _cocos2d_ui_Scale9Sprite_getSprite, nullptr); - oluacls_prop(L, "state", _cocos2d_ui_Scale9Sprite_getState, _cocos2d_ui_Scale9Sprite_setState); + oluacls_func(L, "copyTo", _olua_fun_cocos2d_ui_Scale9Sprite_copyTo); + oluacls_func(L, "create", _olua_fun_cocos2d_ui_Scale9Sprite_create); + oluacls_func(L, "createWithSpriteFrame", _olua_fun_cocos2d_ui_Scale9Sprite_createWithSpriteFrame); + oluacls_func(L, "createWithSpriteFrameName", _olua_fun_cocos2d_ui_Scale9Sprite_createWithSpriteFrameName); + oluacls_func(L, "getCapInsets", _olua_fun_cocos2d_ui_Scale9Sprite_getCapInsets); + oluacls_func(L, "getInsetBottom", _olua_fun_cocos2d_ui_Scale9Sprite_getInsetBottom); + oluacls_func(L, "getInsetLeft", _olua_fun_cocos2d_ui_Scale9Sprite_getInsetLeft); + oluacls_func(L, "getInsetRight", _olua_fun_cocos2d_ui_Scale9Sprite_getInsetRight); + oluacls_func(L, "getInsetTop", _olua_fun_cocos2d_ui_Scale9Sprite_getInsetTop); + oluacls_func(L, "getOriginalSize", _olua_fun_cocos2d_ui_Scale9Sprite_getOriginalSize); + oluacls_func(L, "getPreferredSize", _olua_fun_cocos2d_ui_Scale9Sprite_getPreferredSize); + oluacls_func(L, "getRenderingType", _olua_fun_cocos2d_ui_Scale9Sprite_getRenderingType); + oluacls_func(L, "getSprite", _olua_fun_cocos2d_ui_Scale9Sprite_getSprite); + oluacls_func(L, "getState", _olua_fun_cocos2d_ui_Scale9Sprite_getState); + oluacls_func(L, "init", _olua_fun_cocos2d_ui_Scale9Sprite_init); + oluacls_func(L, "initWithFile", _olua_fun_cocos2d_ui_Scale9Sprite_initWithFile); + oluacls_func(L, "initWithSpriteFrame", _olua_fun_cocos2d_ui_Scale9Sprite_initWithSpriteFrame); + oluacls_func(L, "initWithSpriteFrameName", _olua_fun_cocos2d_ui_Scale9Sprite_initWithSpriteFrameName); + oluacls_func(L, "isScale9Enabled", _olua_fun_cocos2d_ui_Scale9Sprite_isScale9Enabled); + oluacls_func(L, "new", _olua_fun_cocos2d_ui_Scale9Sprite_new); + oluacls_func(L, "resetRender", _olua_fun_cocos2d_ui_Scale9Sprite_resetRender); + oluacls_func(L, "resizableSpriteWithCapInsets", _olua_fun_cocos2d_ui_Scale9Sprite_resizableSpriteWithCapInsets); + oluacls_func(L, "setCapInsets", _olua_fun_cocos2d_ui_Scale9Sprite_setCapInsets); + oluacls_func(L, "setInsetBottom", _olua_fun_cocos2d_ui_Scale9Sprite_setInsetBottom); + oluacls_func(L, "setInsetLeft", _olua_fun_cocos2d_ui_Scale9Sprite_setInsetLeft); + oluacls_func(L, "setInsetRight", _olua_fun_cocos2d_ui_Scale9Sprite_setInsetRight); + oluacls_func(L, "setInsetTop", _olua_fun_cocos2d_ui_Scale9Sprite_setInsetTop); + oluacls_func(L, "setPreferredSize", _olua_fun_cocos2d_ui_Scale9Sprite_setPreferredSize); + oluacls_func(L, "setRenderingType", _olua_fun_cocos2d_ui_Scale9Sprite_setRenderingType); + oluacls_func(L, "setScale9Enabled", _olua_fun_cocos2d_ui_Scale9Sprite_setScale9Enabled); + oluacls_func(L, "setSpriteFrame", _olua_fun_cocos2d_ui_Scale9Sprite_setSpriteFrame); + oluacls_func(L, "setState", _olua_fun_cocos2d_ui_Scale9Sprite_setState); + oluacls_func(L, "updateWithSprite", _olua_fun_cocos2d_ui_Scale9Sprite_updateWithSprite); + oluacls_prop(L, "capInsets", _olua_fun_cocos2d_ui_Scale9Sprite_getCapInsets, _olua_fun_cocos2d_ui_Scale9Sprite_setCapInsets); + oluacls_prop(L, "insetBottom", _olua_fun_cocos2d_ui_Scale9Sprite_getInsetBottom, _olua_fun_cocos2d_ui_Scale9Sprite_setInsetBottom); + oluacls_prop(L, "insetLeft", _olua_fun_cocos2d_ui_Scale9Sprite_getInsetLeft, _olua_fun_cocos2d_ui_Scale9Sprite_setInsetLeft); + oluacls_prop(L, "insetRight", _olua_fun_cocos2d_ui_Scale9Sprite_getInsetRight, _olua_fun_cocos2d_ui_Scale9Sprite_setInsetRight); + oluacls_prop(L, "insetTop", _olua_fun_cocos2d_ui_Scale9Sprite_getInsetTop, _olua_fun_cocos2d_ui_Scale9Sprite_setInsetTop); + oluacls_prop(L, "originalSize", _olua_fun_cocos2d_ui_Scale9Sprite_getOriginalSize, nullptr); + oluacls_prop(L, "preferredSize", _olua_fun_cocos2d_ui_Scale9Sprite_getPreferredSize, _olua_fun_cocos2d_ui_Scale9Sprite_setPreferredSize); + oluacls_prop(L, "renderingType", _olua_fun_cocos2d_ui_Scale9Sprite_getRenderingType, _olua_fun_cocos2d_ui_Scale9Sprite_setRenderingType); + oluacls_prop(L, "scale9Enabled", _olua_fun_cocos2d_ui_Scale9Sprite_isScale9Enabled, _olua_fun_cocos2d_ui_Scale9Sprite_setScale9Enabled); + oluacls_prop(L, "sprite", _olua_fun_cocos2d_ui_Scale9Sprite_getSprite, nullptr); + oluacls_prop(L, "state", _olua_fun_cocos2d_ui_Scale9Sprite_getState, _olua_fun_cocos2d_ui_Scale9Sprite_setState); return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ui_LayoutComponent_HorizontalEdge(lua_State *L) +OLUA_LIB int luaopen_ccui_Scale9Sprite(lua_State *L) +{ + olua_require(L, "cocos2d_ui", luaopen_cocos2d_ui); + if (!olua_getclass(L, "ccui.Scale9Sprite")) { + luaL_error(L, "class not found: cocos2d::ui::Scale9Sprite"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_ccui_LayoutComponent_HorizontalEdge(lua_State *L) { oluacls_class(L, "ccui.LayoutComponent.HorizontalEdge"); oluacls_func(L, "__index", olua_indexerror); @@ -3591,10 +3794,19 @@ OLUA_LIB int luaopen_cocos2d_ui_LayoutComponent_HorizontalEdge(lua_State *L) return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ui_LayoutComponent_VerticalEdge(lua_State *L) +OLUA_LIB int luaopen_ccui_LayoutComponent_HorizontalEdge(lua_State *L) +{ + olua_require(L, "cocos2d_ui", luaopen_cocos2d_ui); + if (!olua_getclass(L, "ccui.LayoutComponent.HorizontalEdge")) { + luaL_error(L, "class not found: cocos2d::ui::LayoutComponent::HorizontalEdge"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_ccui_LayoutComponent_VerticalEdge(lua_State *L) { oluacls_class(L, "ccui.LayoutComponent.VerticalEdge"); oluacls_func(L, "__index", olua_indexerror); @@ -3606,9 +3818,19 @@ OLUA_LIB int luaopen_cocos2d_ui_LayoutComponent_VerticalEdge(lua_State *L) return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccui_LayoutComponent_VerticalEdge(lua_State *L) +{ + olua_require(L, "cocos2d_ui", luaopen_cocos2d_ui); + if (!olua_getclass(L, "ccui.LayoutComponent.VerticalEdge")) { + luaL_error(L, "class not found: cocos2d::ui::LayoutComponent::VerticalEdge"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_ui_LayoutComponent_bindLayoutComponent(lua_State *L) +static int _olua_fun_cocos2d_ui_LayoutComponent_bindLayoutComponent(lua_State *L) { olua_startinvoke(L); @@ -3625,7 +3847,7 @@ static int _cocos2d_ui_LayoutComponent_bindLayoutComponent(lua_State *L) return num_ret; } -static int _cocos2d_ui_LayoutComponent_create(lua_State *L) +static int _olua_fun_cocos2d_ui_LayoutComponent_create(lua_State *L) { olua_startinvoke(L); @@ -3638,7 +3860,7 @@ static int _cocos2d_ui_LayoutComponent_create(lua_State *L) return num_ret; } -static int _cocos2d_ui_LayoutComponent_getAnchorPosition(lua_State *L) +static int _olua_fun_cocos2d_ui_LayoutComponent_getAnchorPosition(lua_State *L) { olua_startinvoke(L); @@ -3655,7 +3877,7 @@ static int _cocos2d_ui_LayoutComponent_getAnchorPosition(lua_State *L) return num_ret; } -static int _cocos2d_ui_LayoutComponent_getBottomMargin(lua_State *L) +static int _olua_fun_cocos2d_ui_LayoutComponent_getBottomMargin(lua_State *L) { olua_startinvoke(L); @@ -3672,7 +3894,7 @@ static int _cocos2d_ui_LayoutComponent_getBottomMargin(lua_State *L) return num_ret; } -static int _cocos2d_ui_LayoutComponent_getHorizontalEdge(lua_State *L) +static int _olua_fun_cocos2d_ui_LayoutComponent_getHorizontalEdge(lua_State *L) { olua_startinvoke(L); @@ -3689,7 +3911,7 @@ static int _cocos2d_ui_LayoutComponent_getHorizontalEdge(lua_State *L) return num_ret; } -static int _cocos2d_ui_LayoutComponent_getLeftMargin(lua_State *L) +static int _olua_fun_cocos2d_ui_LayoutComponent_getLeftMargin(lua_State *L) { olua_startinvoke(L); @@ -3706,7 +3928,7 @@ static int _cocos2d_ui_LayoutComponent_getLeftMargin(lua_State *L) return num_ret; } -static int _cocos2d_ui_LayoutComponent_getPercentContentSize(lua_State *L) +static int _olua_fun_cocos2d_ui_LayoutComponent_getPercentContentSize(lua_State *L) { olua_startinvoke(L); @@ -3716,14 +3938,14 @@ static int _cocos2d_ui_LayoutComponent_getPercentContentSize(lua_State *L) // cocos2d::Vec2 getPercentContentSize() cocos2d::Vec2 ret = self->getPercentContentSize(); - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec2"); + int num_ret = olua_copy_object(L, ret, "cc.Vec2"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_ui_LayoutComponent_getPercentHeight(lua_State *L) +static int _olua_fun_cocos2d_ui_LayoutComponent_getPercentHeight(lua_State *L) { olua_startinvoke(L); @@ -3740,7 +3962,7 @@ static int _cocos2d_ui_LayoutComponent_getPercentHeight(lua_State *L) return num_ret; } -static int _cocos2d_ui_LayoutComponent_getPercentWidth(lua_State *L) +static int _olua_fun_cocos2d_ui_LayoutComponent_getPercentWidth(lua_State *L) { olua_startinvoke(L); @@ -3757,7 +3979,7 @@ static int _cocos2d_ui_LayoutComponent_getPercentWidth(lua_State *L) return num_ret; } -static int _cocos2d_ui_LayoutComponent_getPosition(lua_State *L) +static int _olua_fun_cocos2d_ui_LayoutComponent_getPosition(lua_State *L) { olua_startinvoke(L); @@ -3774,7 +3996,7 @@ static int _cocos2d_ui_LayoutComponent_getPosition(lua_State *L) return num_ret; } -static int _cocos2d_ui_LayoutComponent_getPositionPercentX(lua_State *L) +static int _olua_fun_cocos2d_ui_LayoutComponent_getPositionPercentX(lua_State *L) { olua_startinvoke(L); @@ -3791,7 +4013,7 @@ static int _cocos2d_ui_LayoutComponent_getPositionPercentX(lua_State *L) return num_ret; } -static int _cocos2d_ui_LayoutComponent_getPositionPercentY(lua_State *L) +static int _olua_fun_cocos2d_ui_LayoutComponent_getPositionPercentY(lua_State *L) { olua_startinvoke(L); @@ -3808,7 +4030,7 @@ static int _cocos2d_ui_LayoutComponent_getPositionPercentY(lua_State *L) return num_ret; } -static int _cocos2d_ui_LayoutComponent_getRightMargin(lua_State *L) +static int _olua_fun_cocos2d_ui_LayoutComponent_getRightMargin(lua_State *L) { olua_startinvoke(L); @@ -3825,7 +4047,7 @@ static int _cocos2d_ui_LayoutComponent_getRightMargin(lua_State *L) return num_ret; } -static int _cocos2d_ui_LayoutComponent_getSize(lua_State *L) +static int _olua_fun_cocos2d_ui_LayoutComponent_getSize(lua_State *L) { olua_startinvoke(L); @@ -3842,7 +4064,7 @@ static int _cocos2d_ui_LayoutComponent_getSize(lua_State *L) return num_ret; } -static int _cocos2d_ui_LayoutComponent_getSizeHeight(lua_State *L) +static int _olua_fun_cocos2d_ui_LayoutComponent_getSizeHeight(lua_State *L) { olua_startinvoke(L); @@ -3859,7 +4081,7 @@ static int _cocos2d_ui_LayoutComponent_getSizeHeight(lua_State *L) return num_ret; } -static int _cocos2d_ui_LayoutComponent_getSizeWidth(lua_State *L) +static int _olua_fun_cocos2d_ui_LayoutComponent_getSizeWidth(lua_State *L) { olua_startinvoke(L); @@ -3876,7 +4098,7 @@ static int _cocos2d_ui_LayoutComponent_getSizeWidth(lua_State *L) return num_ret; } -static int _cocos2d_ui_LayoutComponent_getTopMargin(lua_State *L) +static int _olua_fun_cocos2d_ui_LayoutComponent_getTopMargin(lua_State *L) { olua_startinvoke(L); @@ -3893,7 +4115,7 @@ static int _cocos2d_ui_LayoutComponent_getTopMargin(lua_State *L) return num_ret; } -static int _cocos2d_ui_LayoutComponent_getUsingPercentContentSize(lua_State *L) +static int _olua_fun_cocos2d_ui_LayoutComponent_getUsingPercentContentSize(lua_State *L) { olua_startinvoke(L); @@ -3910,7 +4132,7 @@ static int _cocos2d_ui_LayoutComponent_getUsingPercentContentSize(lua_State *L) return num_ret; } -static int _cocos2d_ui_LayoutComponent_getVerticalEdge(lua_State *L) +static int _olua_fun_cocos2d_ui_LayoutComponent_getVerticalEdge(lua_State *L) { olua_startinvoke(L); @@ -3927,7 +4149,7 @@ static int _cocos2d_ui_LayoutComponent_getVerticalEdge(lua_State *L) return num_ret; } -static int _cocos2d_ui_LayoutComponent_isPercentHeightEnabled(lua_State *L) +static int _olua_fun_cocos2d_ui_LayoutComponent_isPercentHeightEnabled(lua_State *L) { olua_startinvoke(L); @@ -3944,7 +4166,7 @@ static int _cocos2d_ui_LayoutComponent_isPercentHeightEnabled(lua_State *L) return num_ret; } -static int _cocos2d_ui_LayoutComponent_isPercentWidthEnabled(lua_State *L) +static int _olua_fun_cocos2d_ui_LayoutComponent_isPercentWidthEnabled(lua_State *L) { olua_startinvoke(L); @@ -3961,7 +4183,7 @@ static int _cocos2d_ui_LayoutComponent_isPercentWidthEnabled(lua_State *L) return num_ret; } -static int _cocos2d_ui_LayoutComponent_isPositionPercentXEnabled(lua_State *L) +static int _olua_fun_cocos2d_ui_LayoutComponent_isPositionPercentXEnabled(lua_State *L) { olua_startinvoke(L); @@ -3978,7 +4200,7 @@ static int _cocos2d_ui_LayoutComponent_isPositionPercentXEnabled(lua_State *L) return num_ret; } -static int _cocos2d_ui_LayoutComponent_isPositionPercentYEnabled(lua_State *L) +static int _olua_fun_cocos2d_ui_LayoutComponent_isPositionPercentYEnabled(lua_State *L) { olua_startinvoke(L); @@ -3995,7 +4217,7 @@ static int _cocos2d_ui_LayoutComponent_isPositionPercentYEnabled(lua_State *L) return num_ret; } -static int _cocos2d_ui_LayoutComponent_isStretchHeightEnabled(lua_State *L) +static int _olua_fun_cocos2d_ui_LayoutComponent_isStretchHeightEnabled(lua_State *L) { olua_startinvoke(L); @@ -4012,7 +4234,7 @@ static int _cocos2d_ui_LayoutComponent_isStretchHeightEnabled(lua_State *L) return num_ret; } -static int _cocos2d_ui_LayoutComponent_isStretchWidthEnabled(lua_State *L) +static int _olua_fun_cocos2d_ui_LayoutComponent_isStretchWidthEnabled(lua_State *L) { olua_startinvoke(L); @@ -4029,11 +4251,11 @@ static int _cocos2d_ui_LayoutComponent_isStretchWidthEnabled(lua_State *L) return num_ret; } -static int _cocos2d_ui_LayoutComponent_new(lua_State *L) +static int _olua_fun_cocos2d_ui_LayoutComponent_new(lua_State *L) { olua_startinvoke(L); - // LayoutComponent() + // cocos2d::ui::LayoutComponent() cocos2d::ui::LayoutComponent *ret = new cocos2d::ui::LayoutComponent(); int num_ret = olua_push_object(L, ret, "ccui.LayoutComponent"); olua_postnew(L, ret); @@ -4043,7 +4265,7 @@ static int _cocos2d_ui_LayoutComponent_new(lua_State *L) return num_ret; } -static int _cocos2d_ui_LayoutComponent_refreshLayout(lua_State *L) +static int _olua_fun_cocos2d_ui_LayoutComponent_refreshLayout(lua_State *L) { olua_startinvoke(L); @@ -4059,7 +4281,7 @@ static int _cocos2d_ui_LayoutComponent_refreshLayout(lua_State *L) return 0; } -static int _cocos2d_ui_LayoutComponent_setActiveEnabled(lua_State *L) +static int _olua_fun_cocos2d_ui_LayoutComponent_setActiveEnabled(lua_State *L) { olua_startinvoke(L); @@ -4077,25 +4299,25 @@ static int _cocos2d_ui_LayoutComponent_setActiveEnabled(lua_State *L) return 0; } -static int _cocos2d_ui_LayoutComponent_setAnchorPosition(lua_State *L) +static int _olua_fun_cocos2d_ui_LayoutComponent_setAnchorPosition(lua_State *L) { olua_startinvoke(L); cocos2d::ui::LayoutComponent *self = nullptr; - cocos2d::Point arg1; /** point */ + cocos2d::Point *arg1; /** point */ olua_to_object(L, 1, &self, "ccui.LayoutComponent"); olua_check_object(L, 2, &arg1, "cc.Vec2"); // void setAnchorPosition(const cocos2d::Point &point) - self->setAnchorPosition(arg1); + self->setAnchorPosition(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_ui_LayoutComponent_setBottomMargin(lua_State *L) +static int _olua_fun_cocos2d_ui_LayoutComponent_setBottomMargin(lua_State *L) { olua_startinvoke(L); @@ -4113,7 +4335,7 @@ static int _cocos2d_ui_LayoutComponent_setBottomMargin(lua_State *L) return 0; } -static int _cocos2d_ui_LayoutComponent_setHorizontalEdge(lua_State *L) +static int _olua_fun_cocos2d_ui_LayoutComponent_setHorizontalEdge(lua_State *L) { olua_startinvoke(L); @@ -4131,7 +4353,7 @@ static int _cocos2d_ui_LayoutComponent_setHorizontalEdge(lua_State *L) return 0; } -static int _cocos2d_ui_LayoutComponent_setLeftMargin(lua_State *L) +static int _olua_fun_cocos2d_ui_LayoutComponent_setLeftMargin(lua_State *L) { olua_startinvoke(L); @@ -4149,25 +4371,25 @@ static int _cocos2d_ui_LayoutComponent_setLeftMargin(lua_State *L) return 0; } -static int _cocos2d_ui_LayoutComponent_setPercentContentSize(lua_State *L) +static int _olua_fun_cocos2d_ui_LayoutComponent_setPercentContentSize(lua_State *L) { olua_startinvoke(L); cocos2d::ui::LayoutComponent *self = nullptr; - cocos2d::Vec2 arg1; /** percent */ + cocos2d::Vec2 *arg1; /** percent */ olua_to_object(L, 1, &self, "ccui.LayoutComponent"); olua_check_object(L, 2, &arg1, "cc.Vec2"); // void setPercentContentSize(const cocos2d::Vec2 &percent) - self->setPercentContentSize(arg1); + self->setPercentContentSize(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_ui_LayoutComponent_setPercentHeight(lua_State *L) +static int _olua_fun_cocos2d_ui_LayoutComponent_setPercentHeight(lua_State *L) { olua_startinvoke(L); @@ -4185,7 +4407,7 @@ static int _cocos2d_ui_LayoutComponent_setPercentHeight(lua_State *L) return 0; } -static int _cocos2d_ui_LayoutComponent_setPercentHeightEnabled(lua_State *L) +static int _olua_fun_cocos2d_ui_LayoutComponent_setPercentHeightEnabled(lua_State *L) { olua_startinvoke(L); @@ -4203,7 +4425,7 @@ static int _cocos2d_ui_LayoutComponent_setPercentHeightEnabled(lua_State *L) return 0; } -static int _cocos2d_ui_LayoutComponent_setPercentOnlyEnabled(lua_State *L) +static int _olua_fun_cocos2d_ui_LayoutComponent_setPercentOnlyEnabled(lua_State *L) { olua_startinvoke(L); @@ -4221,7 +4443,7 @@ static int _cocos2d_ui_LayoutComponent_setPercentOnlyEnabled(lua_State *L) return 0; } -static int _cocos2d_ui_LayoutComponent_setPercentWidth(lua_State *L) +static int _olua_fun_cocos2d_ui_LayoutComponent_setPercentWidth(lua_State *L) { olua_startinvoke(L); @@ -4239,7 +4461,7 @@ static int _cocos2d_ui_LayoutComponent_setPercentWidth(lua_State *L) return 0; } -static int _cocos2d_ui_LayoutComponent_setPercentWidthEnabled(lua_State *L) +static int _olua_fun_cocos2d_ui_LayoutComponent_setPercentWidthEnabled(lua_State *L) { olua_startinvoke(L); @@ -4257,25 +4479,25 @@ static int _cocos2d_ui_LayoutComponent_setPercentWidthEnabled(lua_State *L) return 0; } -static int _cocos2d_ui_LayoutComponent_setPosition(lua_State *L) +static int _olua_fun_cocos2d_ui_LayoutComponent_setPosition(lua_State *L) { olua_startinvoke(L); cocos2d::ui::LayoutComponent *self = nullptr; - cocos2d::Point arg1; /** position */ + cocos2d::Point *arg1; /** position */ olua_to_object(L, 1, &self, "ccui.LayoutComponent"); olua_check_object(L, 2, &arg1, "cc.Vec2"); // void setPosition(const cocos2d::Point &position) - self->setPosition(arg1); + self->setPosition(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_ui_LayoutComponent_setPositionPercentX(lua_State *L) +static int _olua_fun_cocos2d_ui_LayoutComponent_setPositionPercentX(lua_State *L) { olua_startinvoke(L); @@ -4293,7 +4515,7 @@ static int _cocos2d_ui_LayoutComponent_setPositionPercentX(lua_State *L) return 0; } -static int _cocos2d_ui_LayoutComponent_setPositionPercentXEnabled(lua_State *L) +static int _olua_fun_cocos2d_ui_LayoutComponent_setPositionPercentXEnabled(lua_State *L) { olua_startinvoke(L); @@ -4311,7 +4533,7 @@ static int _cocos2d_ui_LayoutComponent_setPositionPercentXEnabled(lua_State *L) return 0; } -static int _cocos2d_ui_LayoutComponent_setPositionPercentY(lua_State *L) +static int _olua_fun_cocos2d_ui_LayoutComponent_setPositionPercentY(lua_State *L) { olua_startinvoke(L); @@ -4329,7 +4551,7 @@ static int _cocos2d_ui_LayoutComponent_setPositionPercentY(lua_State *L) return 0; } -static int _cocos2d_ui_LayoutComponent_setPositionPercentYEnabled(lua_State *L) +static int _olua_fun_cocos2d_ui_LayoutComponent_setPositionPercentYEnabled(lua_State *L) { olua_startinvoke(L); @@ -4347,7 +4569,7 @@ static int _cocos2d_ui_LayoutComponent_setPositionPercentYEnabled(lua_State *L) return 0; } -static int _cocos2d_ui_LayoutComponent_setRightMargin(lua_State *L) +static int _olua_fun_cocos2d_ui_LayoutComponent_setRightMargin(lua_State *L) { olua_startinvoke(L); @@ -4365,25 +4587,25 @@ static int _cocos2d_ui_LayoutComponent_setRightMargin(lua_State *L) return 0; } -static int _cocos2d_ui_LayoutComponent_setSize(lua_State *L) +static int _olua_fun_cocos2d_ui_LayoutComponent_setSize(lua_State *L) { olua_startinvoke(L); cocos2d::ui::LayoutComponent *self = nullptr; - cocos2d::Size arg1; /** size */ + cocos2d::Size *arg1; /** size */ olua_to_object(L, 1, &self, "ccui.LayoutComponent"); olua_check_object(L, 2, &arg1, "cc.Size"); // void setSize(const cocos2d::Size &size) - self->setSize(arg1); + self->setSize(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_ui_LayoutComponent_setSizeHeight(lua_State *L) +static int _olua_fun_cocos2d_ui_LayoutComponent_setSizeHeight(lua_State *L) { olua_startinvoke(L); @@ -4401,7 +4623,7 @@ static int _cocos2d_ui_LayoutComponent_setSizeHeight(lua_State *L) return 0; } -static int _cocos2d_ui_LayoutComponent_setSizeWidth(lua_State *L) +static int _olua_fun_cocos2d_ui_LayoutComponent_setSizeWidth(lua_State *L) { olua_startinvoke(L); @@ -4419,7 +4641,7 @@ static int _cocos2d_ui_LayoutComponent_setSizeWidth(lua_State *L) return 0; } -static int _cocos2d_ui_LayoutComponent_setStretchHeightEnabled(lua_State *L) +static int _olua_fun_cocos2d_ui_LayoutComponent_setStretchHeightEnabled(lua_State *L) { olua_startinvoke(L); @@ -4437,7 +4659,7 @@ static int _cocos2d_ui_LayoutComponent_setStretchHeightEnabled(lua_State *L) return 0; } -static int _cocos2d_ui_LayoutComponent_setStretchWidthEnabled(lua_State *L) +static int _olua_fun_cocos2d_ui_LayoutComponent_setStretchWidthEnabled(lua_State *L) { olua_startinvoke(L); @@ -4455,7 +4677,7 @@ static int _cocos2d_ui_LayoutComponent_setStretchWidthEnabled(lua_State *L) return 0; } -static int _cocos2d_ui_LayoutComponent_setTopMargin(lua_State *L) +static int _olua_fun_cocos2d_ui_LayoutComponent_setTopMargin(lua_State *L) { olua_startinvoke(L); @@ -4473,7 +4695,7 @@ static int _cocos2d_ui_LayoutComponent_setTopMargin(lua_State *L) return 0; } -static int _cocos2d_ui_LayoutComponent_setUsingPercentContentSize(lua_State *L) +static int _olua_fun_cocos2d_ui_LayoutComponent_setUsingPercentContentSize(lua_State *L) { olua_startinvoke(L); @@ -4491,7 +4713,7 @@ static int _cocos2d_ui_LayoutComponent_setUsingPercentContentSize(lua_State *L) return 0; } -static int _cocos2d_ui_LayoutComponent_setVerticalEdge(lua_State *L) +static int _olua_fun_cocos2d_ui_LayoutComponent_setVerticalEdge(lua_State *L) { olua_startinvoke(L); @@ -4509,92 +4731,100 @@ static int _cocos2d_ui_LayoutComponent_setVerticalEdge(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ui_LayoutComponent(lua_State *L) +static int _olua_cls_ccui_LayoutComponent(lua_State *L) { oluacls_class(L, "ccui.LayoutComponent"); - oluacls_func(L, "bindLayoutComponent", _cocos2d_ui_LayoutComponent_bindLayoutComponent); - oluacls_func(L, "create", _cocos2d_ui_LayoutComponent_create); - oluacls_func(L, "getAnchorPosition", _cocos2d_ui_LayoutComponent_getAnchorPosition); - oluacls_func(L, "getBottomMargin", _cocos2d_ui_LayoutComponent_getBottomMargin); - oluacls_func(L, "getHorizontalEdge", _cocos2d_ui_LayoutComponent_getHorizontalEdge); - oluacls_func(L, "getLeftMargin", _cocos2d_ui_LayoutComponent_getLeftMargin); - oluacls_func(L, "getPercentContentSize", _cocos2d_ui_LayoutComponent_getPercentContentSize); - oluacls_func(L, "getPercentHeight", _cocos2d_ui_LayoutComponent_getPercentHeight); - oluacls_func(L, "getPercentWidth", _cocos2d_ui_LayoutComponent_getPercentWidth); - oluacls_func(L, "getPosition", _cocos2d_ui_LayoutComponent_getPosition); - oluacls_func(L, "getPositionPercentX", _cocos2d_ui_LayoutComponent_getPositionPercentX); - oluacls_func(L, "getPositionPercentY", _cocos2d_ui_LayoutComponent_getPositionPercentY); - oluacls_func(L, "getRightMargin", _cocos2d_ui_LayoutComponent_getRightMargin); - oluacls_func(L, "getSize", _cocos2d_ui_LayoutComponent_getSize); - oluacls_func(L, "getSizeHeight", _cocos2d_ui_LayoutComponent_getSizeHeight); - oluacls_func(L, "getSizeWidth", _cocos2d_ui_LayoutComponent_getSizeWidth); - oluacls_func(L, "getTopMargin", _cocos2d_ui_LayoutComponent_getTopMargin); - oluacls_func(L, "getUsingPercentContentSize", _cocos2d_ui_LayoutComponent_getUsingPercentContentSize); - oluacls_func(L, "getVerticalEdge", _cocos2d_ui_LayoutComponent_getVerticalEdge); - oluacls_func(L, "isPercentHeightEnabled", _cocos2d_ui_LayoutComponent_isPercentHeightEnabled); - oluacls_func(L, "isPercentWidthEnabled", _cocos2d_ui_LayoutComponent_isPercentWidthEnabled); - oluacls_func(L, "isPositionPercentXEnabled", _cocos2d_ui_LayoutComponent_isPositionPercentXEnabled); - oluacls_func(L, "isPositionPercentYEnabled", _cocos2d_ui_LayoutComponent_isPositionPercentYEnabled); - oluacls_func(L, "isStretchHeightEnabled", _cocos2d_ui_LayoutComponent_isStretchHeightEnabled); - oluacls_func(L, "isStretchWidthEnabled", _cocos2d_ui_LayoutComponent_isStretchWidthEnabled); - oluacls_func(L, "new", _cocos2d_ui_LayoutComponent_new); - oluacls_func(L, "refreshLayout", _cocos2d_ui_LayoutComponent_refreshLayout); - oluacls_func(L, "setActiveEnabled", _cocos2d_ui_LayoutComponent_setActiveEnabled); - oluacls_func(L, "setAnchorPosition", _cocos2d_ui_LayoutComponent_setAnchorPosition); - oluacls_func(L, "setBottomMargin", _cocos2d_ui_LayoutComponent_setBottomMargin); - oluacls_func(L, "setHorizontalEdge", _cocos2d_ui_LayoutComponent_setHorizontalEdge); - oluacls_func(L, "setLeftMargin", _cocos2d_ui_LayoutComponent_setLeftMargin); - oluacls_func(L, "setPercentContentSize", _cocos2d_ui_LayoutComponent_setPercentContentSize); - oluacls_func(L, "setPercentHeight", _cocos2d_ui_LayoutComponent_setPercentHeight); - oluacls_func(L, "setPercentHeightEnabled", _cocos2d_ui_LayoutComponent_setPercentHeightEnabled); - oluacls_func(L, "setPercentOnlyEnabled", _cocos2d_ui_LayoutComponent_setPercentOnlyEnabled); - oluacls_func(L, "setPercentWidth", _cocos2d_ui_LayoutComponent_setPercentWidth); - oluacls_func(L, "setPercentWidthEnabled", _cocos2d_ui_LayoutComponent_setPercentWidthEnabled); - oluacls_func(L, "setPosition", _cocos2d_ui_LayoutComponent_setPosition); - oluacls_func(L, "setPositionPercentX", _cocos2d_ui_LayoutComponent_setPositionPercentX); - oluacls_func(L, "setPositionPercentXEnabled", _cocos2d_ui_LayoutComponent_setPositionPercentXEnabled); - oluacls_func(L, "setPositionPercentY", _cocos2d_ui_LayoutComponent_setPositionPercentY); - oluacls_func(L, "setPositionPercentYEnabled", _cocos2d_ui_LayoutComponent_setPositionPercentYEnabled); - oluacls_func(L, "setRightMargin", _cocos2d_ui_LayoutComponent_setRightMargin); - oluacls_func(L, "setSize", _cocos2d_ui_LayoutComponent_setSize); - oluacls_func(L, "setSizeHeight", _cocos2d_ui_LayoutComponent_setSizeHeight); - oluacls_func(L, "setSizeWidth", _cocos2d_ui_LayoutComponent_setSizeWidth); - oluacls_func(L, "setStretchHeightEnabled", _cocos2d_ui_LayoutComponent_setStretchHeightEnabled); - oluacls_func(L, "setStretchWidthEnabled", _cocos2d_ui_LayoutComponent_setStretchWidthEnabled); - oluacls_func(L, "setTopMargin", _cocos2d_ui_LayoutComponent_setTopMargin); - oluacls_func(L, "setUsingPercentContentSize", _cocos2d_ui_LayoutComponent_setUsingPercentContentSize); - oluacls_func(L, "setVerticalEdge", _cocos2d_ui_LayoutComponent_setVerticalEdge); - oluacls_prop(L, "anchorPosition", _cocos2d_ui_LayoutComponent_getAnchorPosition, _cocos2d_ui_LayoutComponent_setAnchorPosition); - oluacls_prop(L, "bottomMargin", _cocos2d_ui_LayoutComponent_getBottomMargin, _cocos2d_ui_LayoutComponent_setBottomMargin); - oluacls_prop(L, "horizontalEdge", _cocos2d_ui_LayoutComponent_getHorizontalEdge, _cocos2d_ui_LayoutComponent_setHorizontalEdge); - oluacls_prop(L, "leftMargin", _cocos2d_ui_LayoutComponent_getLeftMargin, _cocos2d_ui_LayoutComponent_setLeftMargin); - oluacls_prop(L, "percentContentSize", _cocos2d_ui_LayoutComponent_getPercentContentSize, _cocos2d_ui_LayoutComponent_setPercentContentSize); - oluacls_prop(L, "percentHeight", _cocos2d_ui_LayoutComponent_getPercentHeight, _cocos2d_ui_LayoutComponent_setPercentHeight); - oluacls_prop(L, "percentHeightEnabled", _cocos2d_ui_LayoutComponent_isPercentHeightEnabled, _cocos2d_ui_LayoutComponent_setPercentHeightEnabled); - oluacls_prop(L, "percentWidth", _cocos2d_ui_LayoutComponent_getPercentWidth, _cocos2d_ui_LayoutComponent_setPercentWidth); - oluacls_prop(L, "percentWidthEnabled", _cocos2d_ui_LayoutComponent_isPercentWidthEnabled, _cocos2d_ui_LayoutComponent_setPercentWidthEnabled); - oluacls_prop(L, "position", _cocos2d_ui_LayoutComponent_getPosition, _cocos2d_ui_LayoutComponent_setPosition); - oluacls_prop(L, "positionPercentX", _cocos2d_ui_LayoutComponent_getPositionPercentX, _cocos2d_ui_LayoutComponent_setPositionPercentX); - oluacls_prop(L, "positionPercentXEnabled", _cocos2d_ui_LayoutComponent_isPositionPercentXEnabled, _cocos2d_ui_LayoutComponent_setPositionPercentXEnabled); - oluacls_prop(L, "positionPercentY", _cocos2d_ui_LayoutComponent_getPositionPercentY, _cocos2d_ui_LayoutComponent_setPositionPercentY); - oluacls_prop(L, "positionPercentYEnabled", _cocos2d_ui_LayoutComponent_isPositionPercentYEnabled, _cocos2d_ui_LayoutComponent_setPositionPercentYEnabled); - oluacls_prop(L, "rightMargin", _cocos2d_ui_LayoutComponent_getRightMargin, _cocos2d_ui_LayoutComponent_setRightMargin); - oluacls_prop(L, "size", _cocos2d_ui_LayoutComponent_getSize, _cocos2d_ui_LayoutComponent_setSize); - oluacls_prop(L, "sizeHeight", _cocos2d_ui_LayoutComponent_getSizeHeight, _cocos2d_ui_LayoutComponent_setSizeHeight); - oluacls_prop(L, "sizeWidth", _cocos2d_ui_LayoutComponent_getSizeWidth, _cocos2d_ui_LayoutComponent_setSizeWidth); - oluacls_prop(L, "stretchHeightEnabled", _cocos2d_ui_LayoutComponent_isStretchHeightEnabled, _cocos2d_ui_LayoutComponent_setStretchHeightEnabled); - oluacls_prop(L, "stretchWidthEnabled", _cocos2d_ui_LayoutComponent_isStretchWidthEnabled, _cocos2d_ui_LayoutComponent_setStretchWidthEnabled); - oluacls_prop(L, "topMargin", _cocos2d_ui_LayoutComponent_getTopMargin, _cocos2d_ui_LayoutComponent_setTopMargin); - oluacls_prop(L, "usingPercentContentSize", _cocos2d_ui_LayoutComponent_getUsingPercentContentSize, _cocos2d_ui_LayoutComponent_setUsingPercentContentSize); - oluacls_prop(L, "verticalEdge", _cocos2d_ui_LayoutComponent_getVerticalEdge, _cocos2d_ui_LayoutComponent_setVerticalEdge); + oluacls_func(L, "bindLayoutComponent", _olua_fun_cocos2d_ui_LayoutComponent_bindLayoutComponent); + oluacls_func(L, "create", _olua_fun_cocos2d_ui_LayoutComponent_create); + oluacls_func(L, "getAnchorPosition", _olua_fun_cocos2d_ui_LayoutComponent_getAnchorPosition); + oluacls_func(L, "getBottomMargin", _olua_fun_cocos2d_ui_LayoutComponent_getBottomMargin); + oluacls_func(L, "getHorizontalEdge", _olua_fun_cocos2d_ui_LayoutComponent_getHorizontalEdge); + oluacls_func(L, "getLeftMargin", _olua_fun_cocos2d_ui_LayoutComponent_getLeftMargin); + oluacls_func(L, "getPercentContentSize", _olua_fun_cocos2d_ui_LayoutComponent_getPercentContentSize); + oluacls_func(L, "getPercentHeight", _olua_fun_cocos2d_ui_LayoutComponent_getPercentHeight); + oluacls_func(L, "getPercentWidth", _olua_fun_cocos2d_ui_LayoutComponent_getPercentWidth); + oluacls_func(L, "getPosition", _olua_fun_cocos2d_ui_LayoutComponent_getPosition); + oluacls_func(L, "getPositionPercentX", _olua_fun_cocos2d_ui_LayoutComponent_getPositionPercentX); + oluacls_func(L, "getPositionPercentY", _olua_fun_cocos2d_ui_LayoutComponent_getPositionPercentY); + oluacls_func(L, "getRightMargin", _olua_fun_cocos2d_ui_LayoutComponent_getRightMargin); + oluacls_func(L, "getSize", _olua_fun_cocos2d_ui_LayoutComponent_getSize); + oluacls_func(L, "getSizeHeight", _olua_fun_cocos2d_ui_LayoutComponent_getSizeHeight); + oluacls_func(L, "getSizeWidth", _olua_fun_cocos2d_ui_LayoutComponent_getSizeWidth); + oluacls_func(L, "getTopMargin", _olua_fun_cocos2d_ui_LayoutComponent_getTopMargin); + oluacls_func(L, "getUsingPercentContentSize", _olua_fun_cocos2d_ui_LayoutComponent_getUsingPercentContentSize); + oluacls_func(L, "getVerticalEdge", _olua_fun_cocos2d_ui_LayoutComponent_getVerticalEdge); + oluacls_func(L, "isPercentHeightEnabled", _olua_fun_cocos2d_ui_LayoutComponent_isPercentHeightEnabled); + oluacls_func(L, "isPercentWidthEnabled", _olua_fun_cocos2d_ui_LayoutComponent_isPercentWidthEnabled); + oluacls_func(L, "isPositionPercentXEnabled", _olua_fun_cocos2d_ui_LayoutComponent_isPositionPercentXEnabled); + oluacls_func(L, "isPositionPercentYEnabled", _olua_fun_cocos2d_ui_LayoutComponent_isPositionPercentYEnabled); + oluacls_func(L, "isStretchHeightEnabled", _olua_fun_cocos2d_ui_LayoutComponent_isStretchHeightEnabled); + oluacls_func(L, "isStretchWidthEnabled", _olua_fun_cocos2d_ui_LayoutComponent_isStretchWidthEnabled); + oluacls_func(L, "new", _olua_fun_cocos2d_ui_LayoutComponent_new); + oluacls_func(L, "refreshLayout", _olua_fun_cocos2d_ui_LayoutComponent_refreshLayout); + oluacls_func(L, "setActiveEnabled", _olua_fun_cocos2d_ui_LayoutComponent_setActiveEnabled); + oluacls_func(L, "setAnchorPosition", _olua_fun_cocos2d_ui_LayoutComponent_setAnchorPosition); + oluacls_func(L, "setBottomMargin", _olua_fun_cocos2d_ui_LayoutComponent_setBottomMargin); + oluacls_func(L, "setHorizontalEdge", _olua_fun_cocos2d_ui_LayoutComponent_setHorizontalEdge); + oluacls_func(L, "setLeftMargin", _olua_fun_cocos2d_ui_LayoutComponent_setLeftMargin); + oluacls_func(L, "setPercentContentSize", _olua_fun_cocos2d_ui_LayoutComponent_setPercentContentSize); + oluacls_func(L, "setPercentHeight", _olua_fun_cocos2d_ui_LayoutComponent_setPercentHeight); + oluacls_func(L, "setPercentHeightEnabled", _olua_fun_cocos2d_ui_LayoutComponent_setPercentHeightEnabled); + oluacls_func(L, "setPercentOnlyEnabled", _olua_fun_cocos2d_ui_LayoutComponent_setPercentOnlyEnabled); + oluacls_func(L, "setPercentWidth", _olua_fun_cocos2d_ui_LayoutComponent_setPercentWidth); + oluacls_func(L, "setPercentWidthEnabled", _olua_fun_cocos2d_ui_LayoutComponent_setPercentWidthEnabled); + oluacls_func(L, "setPosition", _olua_fun_cocos2d_ui_LayoutComponent_setPosition); + oluacls_func(L, "setPositionPercentX", _olua_fun_cocos2d_ui_LayoutComponent_setPositionPercentX); + oluacls_func(L, "setPositionPercentXEnabled", _olua_fun_cocos2d_ui_LayoutComponent_setPositionPercentXEnabled); + oluacls_func(L, "setPositionPercentY", _olua_fun_cocos2d_ui_LayoutComponent_setPositionPercentY); + oluacls_func(L, "setPositionPercentYEnabled", _olua_fun_cocos2d_ui_LayoutComponent_setPositionPercentYEnabled); + oluacls_func(L, "setRightMargin", _olua_fun_cocos2d_ui_LayoutComponent_setRightMargin); + oluacls_func(L, "setSize", _olua_fun_cocos2d_ui_LayoutComponent_setSize); + oluacls_func(L, "setSizeHeight", _olua_fun_cocos2d_ui_LayoutComponent_setSizeHeight); + oluacls_func(L, "setSizeWidth", _olua_fun_cocos2d_ui_LayoutComponent_setSizeWidth); + oluacls_func(L, "setStretchHeightEnabled", _olua_fun_cocos2d_ui_LayoutComponent_setStretchHeightEnabled); + oluacls_func(L, "setStretchWidthEnabled", _olua_fun_cocos2d_ui_LayoutComponent_setStretchWidthEnabled); + oluacls_func(L, "setTopMargin", _olua_fun_cocos2d_ui_LayoutComponent_setTopMargin); + oluacls_func(L, "setUsingPercentContentSize", _olua_fun_cocos2d_ui_LayoutComponent_setUsingPercentContentSize); + oluacls_func(L, "setVerticalEdge", _olua_fun_cocos2d_ui_LayoutComponent_setVerticalEdge); + oluacls_prop(L, "anchorPosition", _olua_fun_cocos2d_ui_LayoutComponent_getAnchorPosition, _olua_fun_cocos2d_ui_LayoutComponent_setAnchorPosition); + oluacls_prop(L, "bottomMargin", _olua_fun_cocos2d_ui_LayoutComponent_getBottomMargin, _olua_fun_cocos2d_ui_LayoutComponent_setBottomMargin); + oluacls_prop(L, "horizontalEdge", _olua_fun_cocos2d_ui_LayoutComponent_getHorizontalEdge, _olua_fun_cocos2d_ui_LayoutComponent_setHorizontalEdge); + oluacls_prop(L, "leftMargin", _olua_fun_cocos2d_ui_LayoutComponent_getLeftMargin, _olua_fun_cocos2d_ui_LayoutComponent_setLeftMargin); + oluacls_prop(L, "percentContentSize", _olua_fun_cocos2d_ui_LayoutComponent_getPercentContentSize, _olua_fun_cocos2d_ui_LayoutComponent_setPercentContentSize); + oluacls_prop(L, "percentHeight", _olua_fun_cocos2d_ui_LayoutComponent_getPercentHeight, _olua_fun_cocos2d_ui_LayoutComponent_setPercentHeight); + oluacls_prop(L, "percentHeightEnabled", _olua_fun_cocos2d_ui_LayoutComponent_isPercentHeightEnabled, _olua_fun_cocos2d_ui_LayoutComponent_setPercentHeightEnabled); + oluacls_prop(L, "percentWidth", _olua_fun_cocos2d_ui_LayoutComponent_getPercentWidth, _olua_fun_cocos2d_ui_LayoutComponent_setPercentWidth); + oluacls_prop(L, "percentWidthEnabled", _olua_fun_cocos2d_ui_LayoutComponent_isPercentWidthEnabled, _olua_fun_cocos2d_ui_LayoutComponent_setPercentWidthEnabled); + oluacls_prop(L, "position", _olua_fun_cocos2d_ui_LayoutComponent_getPosition, _olua_fun_cocos2d_ui_LayoutComponent_setPosition); + oluacls_prop(L, "positionPercentX", _olua_fun_cocos2d_ui_LayoutComponent_getPositionPercentX, _olua_fun_cocos2d_ui_LayoutComponent_setPositionPercentX); + oluacls_prop(L, "positionPercentXEnabled", _olua_fun_cocos2d_ui_LayoutComponent_isPositionPercentXEnabled, _olua_fun_cocos2d_ui_LayoutComponent_setPositionPercentXEnabled); + oluacls_prop(L, "positionPercentY", _olua_fun_cocos2d_ui_LayoutComponent_getPositionPercentY, _olua_fun_cocos2d_ui_LayoutComponent_setPositionPercentY); + oluacls_prop(L, "positionPercentYEnabled", _olua_fun_cocos2d_ui_LayoutComponent_isPositionPercentYEnabled, _olua_fun_cocos2d_ui_LayoutComponent_setPositionPercentYEnabled); + oluacls_prop(L, "rightMargin", _olua_fun_cocos2d_ui_LayoutComponent_getRightMargin, _olua_fun_cocos2d_ui_LayoutComponent_setRightMargin); + oluacls_prop(L, "size", _olua_fun_cocos2d_ui_LayoutComponent_getSize, _olua_fun_cocos2d_ui_LayoutComponent_setSize); + oluacls_prop(L, "sizeHeight", _olua_fun_cocos2d_ui_LayoutComponent_getSizeHeight, _olua_fun_cocos2d_ui_LayoutComponent_setSizeHeight); + oluacls_prop(L, "sizeWidth", _olua_fun_cocos2d_ui_LayoutComponent_getSizeWidth, _olua_fun_cocos2d_ui_LayoutComponent_setSizeWidth); + oluacls_prop(L, "stretchHeightEnabled", _olua_fun_cocos2d_ui_LayoutComponent_isStretchHeightEnabled, _olua_fun_cocos2d_ui_LayoutComponent_setStretchHeightEnabled); + oluacls_prop(L, "stretchWidthEnabled", _olua_fun_cocos2d_ui_LayoutComponent_isStretchWidthEnabled, _olua_fun_cocos2d_ui_LayoutComponent_setStretchWidthEnabled); + oluacls_prop(L, "topMargin", _olua_fun_cocos2d_ui_LayoutComponent_getTopMargin, _olua_fun_cocos2d_ui_LayoutComponent_setTopMargin); + oluacls_prop(L, "usingPercentContentSize", _olua_fun_cocos2d_ui_LayoutComponent_getUsingPercentContentSize, _olua_fun_cocos2d_ui_LayoutComponent_setUsingPercentContentSize); + oluacls_prop(L, "verticalEdge", _olua_fun_cocos2d_ui_LayoutComponent_getVerticalEdge, _olua_fun_cocos2d_ui_LayoutComponent_setVerticalEdge); return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ui_LayoutParameter_Type(lua_State *L) +OLUA_LIB int luaopen_ccui_LayoutComponent(lua_State *L) +{ + olua_require(L, "cocos2d_ui", luaopen_cocos2d_ui); + if (!olua_getclass(L, "ccui.LayoutComponent")) { + luaL_error(L, "class not found: cocos2d::ui::LayoutComponent"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_ccui_LayoutParameter_Type(lua_State *L) { oluacls_class(L, "ccui.LayoutParameter.Type"); oluacls_func(L, "__index", olua_indexerror); @@ -4605,9 +4835,19 @@ OLUA_LIB int luaopen_cocos2d_ui_LayoutParameter_Type(lua_State *L) return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccui_LayoutParameter_Type(lua_State *L) +{ + olua_require(L, "cocos2d_ui", luaopen_cocos2d_ui); + if (!olua_getclass(L, "ccui.LayoutParameter.Type")) { + luaL_error(L, "class not found: cocos2d::ui::LayoutParameter::Type"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_ui_LayoutParameter_clone(lua_State *L) +static int _olua_fun_cocos2d_ui_LayoutParameter_clone(lua_State *L) { olua_startinvoke(L); @@ -4624,7 +4864,7 @@ static int _cocos2d_ui_LayoutParameter_clone(lua_State *L) return num_ret; } -static int _cocos2d_ui_LayoutParameter_copyProperties(lua_State *L) +static int _olua_fun_cocos2d_ui_LayoutParameter_copyProperties(lua_State *L) { olua_startinvoke(L); @@ -4642,7 +4882,7 @@ static int _cocos2d_ui_LayoutParameter_copyProperties(lua_State *L) return 0; } -static int _cocos2d_ui_LayoutParameter_create(lua_State *L) +static int _olua_fun_cocos2d_ui_LayoutParameter_create(lua_State *L) { olua_startinvoke(L); @@ -4655,7 +4895,7 @@ static int _cocos2d_ui_LayoutParameter_create(lua_State *L) return num_ret; } -static int _cocos2d_ui_LayoutParameter_createCloneInstance(lua_State *L) +static int _olua_fun_cocos2d_ui_LayoutParameter_createCloneInstance(lua_State *L) { olua_startinvoke(L); @@ -4672,7 +4912,7 @@ static int _cocos2d_ui_LayoutParameter_createCloneInstance(lua_State *L) return num_ret; } -static int _cocos2d_ui_LayoutParameter_getLayoutType(lua_State *L) +static int _olua_fun_cocos2d_ui_LayoutParameter_getLayoutType(lua_State *L) { olua_startinvoke(L); @@ -4689,7 +4929,7 @@ static int _cocos2d_ui_LayoutParameter_getLayoutType(lua_State *L) return num_ret; } -static int _cocos2d_ui_LayoutParameter_getMargin(lua_State *L) +static int _olua_fun_cocos2d_ui_LayoutParameter_getMargin(lua_State *L) { olua_startinvoke(L); @@ -4706,11 +4946,11 @@ static int _cocos2d_ui_LayoutParameter_getMargin(lua_State *L) return num_ret; } -static int _cocos2d_ui_LayoutParameter_new(lua_State *L) +static int _olua_fun_cocos2d_ui_LayoutParameter_new(lua_State *L) { olua_startinvoke(L); - // LayoutParameter() + // cocos2d::ui::LayoutParameter() cocos2d::ui::LayoutParameter *ret = new cocos2d::ui::LayoutParameter(); int num_ret = olua_push_object(L, ret, "ccui.LayoutParameter"); olua_postnew(L, ret); @@ -4720,45 +4960,53 @@ static int _cocos2d_ui_LayoutParameter_new(lua_State *L) return num_ret; } -static int _cocos2d_ui_LayoutParameter_setMargin(lua_State *L) +static int _olua_fun_cocos2d_ui_LayoutParameter_setMargin(lua_State *L) { olua_startinvoke(L); cocos2d::ui::LayoutParameter *self = nullptr; - cocos2d::ui::Margin arg1; /** margin */ + cocos2d::ui::Margin *arg1; /** margin */ olua_to_object(L, 1, &self, "ccui.LayoutParameter"); olua_check_object(L, 2, &arg1, "cc.ui.Margin"); // void setMargin(const cocos2d::ui::Margin &margin) - self->setMargin(arg1); + self->setMargin(*arg1); olua_endinvoke(L); return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ui_LayoutParameter(lua_State *L) +static int _olua_cls_ccui_LayoutParameter(lua_State *L) { oluacls_class(L, "ccui.LayoutParameter"); - oluacls_func(L, "clone", _cocos2d_ui_LayoutParameter_clone); - oluacls_func(L, "copyProperties", _cocos2d_ui_LayoutParameter_copyProperties); - oluacls_func(L, "create", _cocos2d_ui_LayoutParameter_create); - oluacls_func(L, "createCloneInstance", _cocos2d_ui_LayoutParameter_createCloneInstance); - oluacls_func(L, "getLayoutType", _cocos2d_ui_LayoutParameter_getLayoutType); - oluacls_func(L, "getMargin", _cocos2d_ui_LayoutParameter_getMargin); - oluacls_func(L, "new", _cocos2d_ui_LayoutParameter_new); - oluacls_func(L, "setMargin", _cocos2d_ui_LayoutParameter_setMargin); - oluacls_prop(L, "layoutType", _cocos2d_ui_LayoutParameter_getLayoutType, nullptr); - oluacls_prop(L, "margin", _cocos2d_ui_LayoutParameter_getMargin, _cocos2d_ui_LayoutParameter_setMargin); + oluacls_func(L, "clone", _olua_fun_cocos2d_ui_LayoutParameter_clone); + oluacls_func(L, "copyProperties", _olua_fun_cocos2d_ui_LayoutParameter_copyProperties); + oluacls_func(L, "create", _olua_fun_cocos2d_ui_LayoutParameter_create); + oluacls_func(L, "createCloneInstance", _olua_fun_cocos2d_ui_LayoutParameter_createCloneInstance); + oluacls_func(L, "getLayoutType", _olua_fun_cocos2d_ui_LayoutParameter_getLayoutType); + oluacls_func(L, "getMargin", _olua_fun_cocos2d_ui_LayoutParameter_getMargin); + oluacls_func(L, "new", _olua_fun_cocos2d_ui_LayoutParameter_new); + oluacls_func(L, "setMargin", _olua_fun_cocos2d_ui_LayoutParameter_setMargin); + oluacls_prop(L, "layoutType", _olua_fun_cocos2d_ui_LayoutParameter_getLayoutType, nullptr); + oluacls_prop(L, "margin", _olua_fun_cocos2d_ui_LayoutParameter_getMargin, _olua_fun_cocos2d_ui_LayoutParameter_setMargin); return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ui_LinearLayoutParameter_LinearGravity(lua_State *L) +OLUA_LIB int luaopen_ccui_LayoutParameter(lua_State *L) +{ + olua_require(L, "cocos2d_ui", luaopen_cocos2d_ui); + if (!olua_getclass(L, "ccui.LayoutParameter")) { + luaL_error(L, "class not found: cocos2d::ui::LayoutParameter"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_ccui_LinearLayoutParameter_LinearGravity(lua_State *L) { oluacls_class(L, "ccui.LinearLayoutParameter.LinearGravity"); oluacls_func(L, "__index", olua_indexerror); @@ -4773,9 +5021,19 @@ OLUA_LIB int luaopen_cocos2d_ui_LinearLayoutParameter_LinearGravity(lua_State *L return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccui_LinearLayoutParameter_LinearGravity(lua_State *L) +{ + olua_require(L, "cocos2d_ui", luaopen_cocos2d_ui); + if (!olua_getclass(L, "ccui.LinearLayoutParameter.LinearGravity")) { + luaL_error(L, "class not found: cocos2d::ui::LinearLayoutParameter::LinearGravity"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_ui_LinearLayoutParameter_create(lua_State *L) +static int _olua_fun_cocos2d_ui_LinearLayoutParameter_create(lua_State *L) { olua_startinvoke(L); @@ -4788,7 +5046,7 @@ static int _cocos2d_ui_LinearLayoutParameter_create(lua_State *L) return num_ret; } -static int _cocos2d_ui_LinearLayoutParameter_getGravity(lua_State *L) +static int _olua_fun_cocos2d_ui_LinearLayoutParameter_getGravity(lua_State *L) { olua_startinvoke(L); @@ -4805,11 +5063,11 @@ static int _cocos2d_ui_LinearLayoutParameter_getGravity(lua_State *L) return num_ret; } -static int _cocos2d_ui_LinearLayoutParameter_new(lua_State *L) +static int _olua_fun_cocos2d_ui_LinearLayoutParameter_new(lua_State *L) { olua_startinvoke(L); - // LinearLayoutParameter() + // cocos2d::ui::LinearLayoutParameter() cocos2d::ui::LinearLayoutParameter *ret = new cocos2d::ui::LinearLayoutParameter(); int num_ret = olua_push_object(L, ret, "ccui.LinearLayoutParameter"); olua_postnew(L, ret); @@ -4819,7 +5077,7 @@ static int _cocos2d_ui_LinearLayoutParameter_new(lua_State *L) return num_ret; } -static int _cocos2d_ui_LinearLayoutParameter_setGravity(lua_State *L) +static int _olua_fun_cocos2d_ui_LinearLayoutParameter_setGravity(lua_State *L) { olua_startinvoke(L); @@ -4837,22 +5095,30 @@ static int _cocos2d_ui_LinearLayoutParameter_setGravity(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ui_LinearLayoutParameter(lua_State *L) +static int _olua_cls_ccui_LinearLayoutParameter(lua_State *L) { oluacls_class(L, "ccui.LinearLayoutParameter"); - oluacls_func(L, "create", _cocos2d_ui_LinearLayoutParameter_create); - oluacls_func(L, "getGravity", _cocos2d_ui_LinearLayoutParameter_getGravity); - oluacls_func(L, "new", _cocos2d_ui_LinearLayoutParameter_new); - oluacls_func(L, "setGravity", _cocos2d_ui_LinearLayoutParameter_setGravity); - oluacls_prop(L, "gravity", _cocos2d_ui_LinearLayoutParameter_getGravity, _cocos2d_ui_LinearLayoutParameter_setGravity); + oluacls_func(L, "create", _olua_fun_cocos2d_ui_LinearLayoutParameter_create); + oluacls_func(L, "getGravity", _olua_fun_cocos2d_ui_LinearLayoutParameter_getGravity); + oluacls_func(L, "new", _olua_fun_cocos2d_ui_LinearLayoutParameter_new); + oluacls_func(L, "setGravity", _olua_fun_cocos2d_ui_LinearLayoutParameter_setGravity); + oluacls_prop(L, "gravity", _olua_fun_cocos2d_ui_LinearLayoutParameter_getGravity, _olua_fun_cocos2d_ui_LinearLayoutParameter_setGravity); return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ui_RelativeLayoutParameter_RelativeAlign(lua_State *L) +OLUA_LIB int luaopen_ccui_LinearLayoutParameter(lua_State *L) +{ + olua_require(L, "cocos2d_ui", luaopen_cocos2d_ui); + if (!olua_getclass(L, "ccui.LinearLayoutParameter")) { + luaL_error(L, "class not found: cocos2d::ui::LinearLayoutParameter"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_ccui_RelativeLayoutParameter_RelativeAlign(lua_State *L) { oluacls_class(L, "ccui.RelativeLayoutParameter.RelativeAlign"); oluacls_func(L, "__index", olua_indexerror); @@ -4882,9 +5148,19 @@ OLUA_LIB int luaopen_cocos2d_ui_RelativeLayoutParameter_RelativeAlign(lua_State return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccui_RelativeLayoutParameter_RelativeAlign(lua_State *L) +{ + olua_require(L, "cocos2d_ui", luaopen_cocos2d_ui); + if (!olua_getclass(L, "ccui.RelativeLayoutParameter.RelativeAlign")) { + luaL_error(L, "class not found: cocos2d::ui::RelativeLayoutParameter::RelativeAlign"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_ui_RelativeLayoutParameter_create(lua_State *L) +static int _olua_fun_cocos2d_ui_RelativeLayoutParameter_create(lua_State *L) { olua_startinvoke(L); @@ -4897,7 +5173,7 @@ static int _cocos2d_ui_RelativeLayoutParameter_create(lua_State *L) return num_ret; } -static int _cocos2d_ui_RelativeLayoutParameter_getAlign(lua_State *L) +static int _olua_fun_cocos2d_ui_RelativeLayoutParameter_getAlign(lua_State *L) { olua_startinvoke(L); @@ -4914,7 +5190,7 @@ static int _cocos2d_ui_RelativeLayoutParameter_getAlign(lua_State *L) return num_ret; } -static int _cocos2d_ui_RelativeLayoutParameter_getRelativeName(lua_State *L) +static int _olua_fun_cocos2d_ui_RelativeLayoutParameter_getRelativeName(lua_State *L) { olua_startinvoke(L); @@ -4931,7 +5207,7 @@ static int _cocos2d_ui_RelativeLayoutParameter_getRelativeName(lua_State *L) return num_ret; } -static int _cocos2d_ui_RelativeLayoutParameter_getRelativeToWidgetName(lua_State *L) +static int _olua_fun_cocos2d_ui_RelativeLayoutParameter_getRelativeToWidgetName(lua_State *L) { olua_startinvoke(L); @@ -4948,11 +5224,11 @@ static int _cocos2d_ui_RelativeLayoutParameter_getRelativeToWidgetName(lua_State return num_ret; } -static int _cocos2d_ui_RelativeLayoutParameter_new(lua_State *L) +static int _olua_fun_cocos2d_ui_RelativeLayoutParameter_new(lua_State *L) { olua_startinvoke(L); - // RelativeLayoutParameter() + // cocos2d::ui::RelativeLayoutParameter() cocos2d::ui::RelativeLayoutParameter *ret = new cocos2d::ui::RelativeLayoutParameter(); int num_ret = olua_push_object(L, ret, "ccui.RelativeLayoutParameter"); olua_postnew(L, ret); @@ -4962,7 +5238,7 @@ static int _cocos2d_ui_RelativeLayoutParameter_new(lua_State *L) return num_ret; } -static int _cocos2d_ui_RelativeLayoutParameter_setAlign(lua_State *L) +static int _olua_fun_cocos2d_ui_RelativeLayoutParameter_setAlign(lua_State *L) { olua_startinvoke(L); @@ -4980,7 +5256,7 @@ static int _cocos2d_ui_RelativeLayoutParameter_setAlign(lua_State *L) return 0; } -static int _cocos2d_ui_RelativeLayoutParameter_setRelativeName(lua_State *L) +static int _olua_fun_cocos2d_ui_RelativeLayoutParameter_setRelativeName(lua_State *L) { olua_startinvoke(L); @@ -4998,7 +5274,7 @@ static int _cocos2d_ui_RelativeLayoutParameter_setRelativeName(lua_State *L) return 0; } -static int _cocos2d_ui_RelativeLayoutParameter_setRelativeToWidgetName(lua_State *L) +static int _olua_fun_cocos2d_ui_RelativeLayoutParameter_setRelativeToWidgetName(lua_State *L) { olua_startinvoke(L); @@ -5016,28 +5292,36 @@ static int _cocos2d_ui_RelativeLayoutParameter_setRelativeToWidgetName(lua_State return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ui_RelativeLayoutParameter(lua_State *L) +static int _olua_cls_ccui_RelativeLayoutParameter(lua_State *L) { oluacls_class(L, "ccui.RelativeLayoutParameter"); - oluacls_func(L, "create", _cocos2d_ui_RelativeLayoutParameter_create); - oluacls_func(L, "getAlign", _cocos2d_ui_RelativeLayoutParameter_getAlign); - oluacls_func(L, "getRelativeName", _cocos2d_ui_RelativeLayoutParameter_getRelativeName); - oluacls_func(L, "getRelativeToWidgetName", _cocos2d_ui_RelativeLayoutParameter_getRelativeToWidgetName); - oluacls_func(L, "new", _cocos2d_ui_RelativeLayoutParameter_new); - oluacls_func(L, "setAlign", _cocos2d_ui_RelativeLayoutParameter_setAlign); - oluacls_func(L, "setRelativeName", _cocos2d_ui_RelativeLayoutParameter_setRelativeName); - oluacls_func(L, "setRelativeToWidgetName", _cocos2d_ui_RelativeLayoutParameter_setRelativeToWidgetName); - oluacls_prop(L, "align", _cocos2d_ui_RelativeLayoutParameter_getAlign, _cocos2d_ui_RelativeLayoutParameter_setAlign); - oluacls_prop(L, "relativeName", _cocos2d_ui_RelativeLayoutParameter_getRelativeName, _cocos2d_ui_RelativeLayoutParameter_setRelativeName); - oluacls_prop(L, "relativeToWidgetName", _cocos2d_ui_RelativeLayoutParameter_getRelativeToWidgetName, _cocos2d_ui_RelativeLayoutParameter_setRelativeToWidgetName); + oluacls_func(L, "create", _olua_fun_cocos2d_ui_RelativeLayoutParameter_create); + oluacls_func(L, "getAlign", _olua_fun_cocos2d_ui_RelativeLayoutParameter_getAlign); + oluacls_func(L, "getRelativeName", _olua_fun_cocos2d_ui_RelativeLayoutParameter_getRelativeName); + oluacls_func(L, "getRelativeToWidgetName", _olua_fun_cocos2d_ui_RelativeLayoutParameter_getRelativeToWidgetName); + oluacls_func(L, "new", _olua_fun_cocos2d_ui_RelativeLayoutParameter_new); + oluacls_func(L, "setAlign", _olua_fun_cocos2d_ui_RelativeLayoutParameter_setAlign); + oluacls_func(L, "setRelativeName", _olua_fun_cocos2d_ui_RelativeLayoutParameter_setRelativeName); + oluacls_func(L, "setRelativeToWidgetName", _olua_fun_cocos2d_ui_RelativeLayoutParameter_setRelativeToWidgetName); + oluacls_prop(L, "align", _olua_fun_cocos2d_ui_RelativeLayoutParameter_getAlign, _olua_fun_cocos2d_ui_RelativeLayoutParameter_setAlign); + oluacls_prop(L, "relativeName", _olua_fun_cocos2d_ui_RelativeLayoutParameter_getRelativeName, _olua_fun_cocos2d_ui_RelativeLayoutParameter_setRelativeName); + oluacls_prop(L, "relativeToWidgetName", _olua_fun_cocos2d_ui_RelativeLayoutParameter_getRelativeToWidgetName, _olua_fun_cocos2d_ui_RelativeLayoutParameter_setRelativeToWidgetName); return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ui_Layout_Type(lua_State *L) +OLUA_LIB int luaopen_ccui_RelativeLayoutParameter(lua_State *L) +{ + olua_require(L, "cocos2d_ui", luaopen_cocos2d_ui); + if (!olua_getclass(L, "ccui.RelativeLayoutParameter")) { + luaL_error(L, "class not found: cocos2d::ui::RelativeLayoutParameter"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_ccui_Layout_Type(lua_State *L) { oluacls_class(L, "ccui.Layout.Type"); oluacls_func(L, "__index", olua_indexerror); @@ -5049,10 +5333,19 @@ OLUA_LIB int luaopen_cocos2d_ui_Layout_Type(lua_State *L) return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ui_Layout_ClippingType(lua_State *L) +OLUA_LIB int luaopen_ccui_Layout_Type(lua_State *L) +{ + olua_require(L, "cocos2d_ui", luaopen_cocos2d_ui); + if (!olua_getclass(L, "ccui.Layout.Type")) { + luaL_error(L, "class not found: cocos2d::ui::Layout::Type"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_ccui_Layout_ClippingType(lua_State *L) { oluacls_class(L, "ccui.Layout.ClippingType"); oluacls_func(L, "__index", olua_indexerror); @@ -5062,10 +5355,19 @@ OLUA_LIB int luaopen_cocos2d_ui_Layout_ClippingType(lua_State *L) return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ui_Layout_BackGroundColorType(lua_State *L) +OLUA_LIB int luaopen_ccui_Layout_ClippingType(lua_State *L) +{ + olua_require(L, "cocos2d_ui", luaopen_cocos2d_ui); + if (!olua_getclass(L, "ccui.Layout.ClippingType")) { + luaL_error(L, "class not found: cocos2d::ui::Layout::ClippingType"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_ccui_Layout_BackGroundColorType(lua_State *L) { oluacls_class(L, "ccui.Layout.BackGroundColorType"); oluacls_func(L, "__index", olua_indexerror); @@ -5076,9 +5378,19 @@ OLUA_LIB int luaopen_cocos2d_ui_Layout_BackGroundColorType(lua_State *L) return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccui_Layout_BackGroundColorType(lua_State *L) +{ + olua_require(L, "cocos2d_ui", luaopen_cocos2d_ui); + if (!olua_getclass(L, "ccui.Layout.BackGroundColorType")) { + luaL_error(L, "class not found: cocos2d::ui::Layout::BackGroundColorType"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_ui_Layout_as(lua_State *L) +static int _olua_fun_cocos2d_ui_Layout_as(lua_State *L) { olua_startinvoke(L); @@ -5110,7 +5422,7 @@ static int _cocos2d_ui_Layout_as(lua_State *L) return 1; } -static int _cocos2d_ui_Layout_create(lua_State *L) +static int _olua_fun_cocos2d_ui_Layout_create(lua_State *L) { olua_startinvoke(L); @@ -5123,7 +5435,7 @@ static int _cocos2d_ui_Layout_create(lua_State *L) return num_ret; } -static int _cocos2d_ui_Layout_createInstance(lua_State *L) +static int _olua_fun_cocos2d_ui_Layout_createInstance(lua_State *L) { olua_startinvoke(L); @@ -5136,7 +5448,7 @@ static int _cocos2d_ui_Layout_createInstance(lua_State *L) return num_ret; } -static int _cocos2d_ui_Layout_forceDoLayout(lua_State *L) +static int _olua_fun_cocos2d_ui_Layout_forceDoLayout(lua_State *L) { olua_startinvoke(L); @@ -5152,7 +5464,7 @@ static int _cocos2d_ui_Layout_forceDoLayout(lua_State *L) return 0; } -static int _cocos2d_ui_Layout_getBackGroundColor(lua_State *L) +static int _olua_fun_cocos2d_ui_Layout_getBackGroundColor(lua_State *L) { olua_startinvoke(L); @@ -5169,7 +5481,7 @@ static int _cocos2d_ui_Layout_getBackGroundColor(lua_State *L) return num_ret; } -static int _cocos2d_ui_Layout_getBackGroundColorOpacity(lua_State *L) +static int _olua_fun_cocos2d_ui_Layout_getBackGroundColorOpacity(lua_State *L) { olua_startinvoke(L); @@ -5186,7 +5498,7 @@ static int _cocos2d_ui_Layout_getBackGroundColorOpacity(lua_State *L) return num_ret; } -static int _cocos2d_ui_Layout_getBackGroundColorType(lua_State *L) +static int _olua_fun_cocos2d_ui_Layout_getBackGroundColorType(lua_State *L) { olua_startinvoke(L); @@ -5203,7 +5515,7 @@ static int _cocos2d_ui_Layout_getBackGroundColorType(lua_State *L) return num_ret; } -static int _cocos2d_ui_Layout_getBackGroundColorVector(lua_State *L) +static int _olua_fun_cocos2d_ui_Layout_getBackGroundColorVector(lua_State *L) { olua_startinvoke(L); @@ -5220,7 +5532,7 @@ static int _cocos2d_ui_Layout_getBackGroundColorVector(lua_State *L) return num_ret; } -static int _cocos2d_ui_Layout_getBackGroundEndColor(lua_State *L) +static int _olua_fun_cocos2d_ui_Layout_getBackGroundEndColor(lua_State *L) { olua_startinvoke(L); @@ -5237,7 +5549,7 @@ static int _cocos2d_ui_Layout_getBackGroundEndColor(lua_State *L) return num_ret; } -static int _cocos2d_ui_Layout_getBackGroundImageCapInsets(lua_State *L) +static int _olua_fun_cocos2d_ui_Layout_getBackGroundImageCapInsets(lua_State *L) { olua_startinvoke(L); @@ -5254,7 +5566,7 @@ static int _cocos2d_ui_Layout_getBackGroundImageCapInsets(lua_State *L) return num_ret; } -static int _cocos2d_ui_Layout_getBackGroundImageColor(lua_State *L) +static int _olua_fun_cocos2d_ui_Layout_getBackGroundImageColor(lua_State *L) { olua_startinvoke(L); @@ -5271,7 +5583,7 @@ static int _cocos2d_ui_Layout_getBackGroundImageColor(lua_State *L) return num_ret; } -static int _cocos2d_ui_Layout_getBackGroundImageOpacity(lua_State *L) +static int _olua_fun_cocos2d_ui_Layout_getBackGroundImageOpacity(lua_State *L) { olua_startinvoke(L); @@ -5288,7 +5600,7 @@ static int _cocos2d_ui_Layout_getBackGroundImageOpacity(lua_State *L) return num_ret; } -static int _cocos2d_ui_Layout_getBackGroundImageTextureSize(lua_State *L) +static int _olua_fun_cocos2d_ui_Layout_getBackGroundImageTextureSize(lua_State *L) { olua_startinvoke(L); @@ -5305,7 +5617,7 @@ static int _cocos2d_ui_Layout_getBackGroundImageTextureSize(lua_State *L) return num_ret; } -static int _cocos2d_ui_Layout_getBackGroundStartColor(lua_State *L) +static int _olua_fun_cocos2d_ui_Layout_getBackGroundStartColor(lua_State *L) { olua_startinvoke(L); @@ -5322,7 +5634,7 @@ static int _cocos2d_ui_Layout_getBackGroundStartColor(lua_State *L) return num_ret; } -static int _cocos2d_ui_Layout_getClippingType(lua_State *L) +static int _olua_fun_cocos2d_ui_Layout_getClippingType(lua_State *L) { olua_startinvoke(L); @@ -5339,7 +5651,7 @@ static int _cocos2d_ui_Layout_getClippingType(lua_State *L) return num_ret; } -static int _cocos2d_ui_Layout_getLayoutType(lua_State *L) +static int _olua_fun_cocos2d_ui_Layout_getLayoutType(lua_State *L) { olua_startinvoke(L); @@ -5356,7 +5668,7 @@ static int _cocos2d_ui_Layout_getLayoutType(lua_State *L) return num_ret; } -static int _cocos2d_ui_Layout_getRenderFile(lua_State *L) +static int _olua_fun_cocos2d_ui_Layout_getRenderFile(lua_State *L) { olua_startinvoke(L); @@ -5366,14 +5678,14 @@ static int _cocos2d_ui_Layout_getRenderFile(lua_State *L) // cocos2d::ResourceData getRenderFile() cocos2d::ResourceData ret = self->getRenderFile(); - int num_ret = olua_pushcopy_object(L, ret, "cc.ResourceData"); + int num_ret = olua_copy_object(L, ret, "cc.ResourceData"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_ui_Layout_isBackGroundImageScale9Enabled(lua_State *L) +static int _olua_fun_cocos2d_ui_Layout_isBackGroundImageScale9Enabled(lua_State *L) { olua_startinvoke(L); @@ -5390,24 +5702,72 @@ static int _cocos2d_ui_Layout_isBackGroundImageScale9Enabled(lua_State *L) return num_ret; } -static int _cocos2d_ui_Layout_isClippingEnabled(lua_State *L) +static int _olua_fun_cocos2d_ui_Layout_isClippingEnabled(lua_State *L) +{ + olua_startinvoke(L); + + cocos2d::ui::Layout *self = nullptr; + + olua_to_object(L, 1, &self, "ccui.Layout"); + + // bool isClippingEnabled() + bool ret = self->isClippingEnabled(); + int num_ret = olua_push_bool(L, ret); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_cocos2d_ui_Layout_isLoopFocus(lua_State *L) +{ + olua_startinvoke(L); + + cocos2d::ui::Layout *self = nullptr; + + olua_to_object(L, 1, &self, "ccui.Layout"); + + // bool isLoopFocus() + bool ret = self->isLoopFocus(); + int num_ret = olua_push_bool(L, ret); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_cocos2d_ui_Layout_isPassFocusToChild(lua_State *L) +{ + olua_startinvoke(L); + + cocos2d::ui::Layout *self = nullptr; + + olua_to_object(L, 1, &self, "ccui.Layout"); + + // bool isPassFocusToChild() + bool ret = self->isPassFocusToChild(); + int num_ret = olua_push_bool(L, ret); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_cocos2d_ui_Layout_new(lua_State *L) { olua_startinvoke(L); - cocos2d::ui::Layout *self = nullptr; - - olua_to_object(L, 1, &self, "ccui.Layout"); - - // bool isClippingEnabled() - bool ret = self->isClippingEnabled(); - int num_ret = olua_push_bool(L, ret); + // cocos2d::ui::Layout() + cocos2d::ui::Layout *ret = new cocos2d::ui::Layout(); + int num_ret = olua_push_object(L, ret, "ccui.Layout"); + olua_postnew(L, ret); olua_endinvoke(L); return num_ret; } -static int _cocos2d_ui_Layout_isLoopFocus(lua_State *L) +static int _olua_fun_cocos2d_ui_Layout_onPassFocusToChild$1(lua_State *L) { olua_startinvoke(L); @@ -5415,47 +5775,97 @@ static int _cocos2d_ui_Layout_isLoopFocus(lua_State *L) olua_to_object(L, 1, &self, "ccui.Layout"); - // bool isLoopFocus() - bool ret = self->isLoopFocus(); - int num_ret = olua_push_bool(L, ret); + void *cb_store = (void *)self; + std::string cb_tag = "onPassFocusToChild"; + olua_getcallback(L, cb_store, cb_tag.c_str(), OLUA_TAG_EQUAL); + + // std::function onPassFocusToChild + std::function ret = self->onPassFocusToChild; + int num_ret = olua_push_callback(L, &ret, "std.function"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_ui_Layout_isPassFocusToChild(lua_State *L) +static int _olua_fun_cocos2d_ui_Layout_onPassFocusToChild$2(lua_State *L) { olua_startinvoke(L); cocos2d::ui::Layout *self = nullptr; + std::function arg1; /** onPassFocusToChild */ olua_to_object(L, 1, &self, "ccui.Layout"); + if (!olua_isnoneornil(L, 2)) { + olua_check_callback(L, 2, &arg1, "std.function"); + } - // bool isPassFocusToChild() - bool ret = self->isPassFocusToChild(); - int num_ret = olua_push_bool(L, ret); + void *cb_store = (void *)self; + std::string cb_tag = "onPassFocusToChild"; + std::string cb_name; + if (olua_isfunction(L, 2)) { + cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + olua_Context cb_ctx = olua_context(L); + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](cocos2d::ui::Widget::FocusDirection cb_arg1, cocos2d::ui::Widget *cb_arg2) { + lua_State *L = olua_mainthread(NULL); + olua_checkhostthread(); + int ret = 0; /** ret */ + if (olua_contextequal(L, cb_ctx)) { + int top = lua_gettop(L); + size_t last = olua_push_objpool(L); + olua_enable_objpool(L); + olua_push_enum(L, cb_arg1); + olua_push_object(L, cb_arg2, "ccui.Widget"); + olua_disable_objpool(L); + + olua_callback(L, cb_store, cb_name.c_str(), 2); + + if (olua_is_integer(L, -1)) { + olua_check_integer(L, -1, &ret); + } + + //pop stack value + olua_pop_objpool(L, last); + lua_settop(L, top); + } + return ret; + }; + } else { + olua_removecallback(L, cb_store, cb_tag.c_str(), OLUA_TAG_EQUAL); + arg1 = nullptr; + } + + // std::function onPassFocusToChild + self->onPassFocusToChild = arg1; olua_endinvoke(L); - return num_ret; + return 0; } -static int _cocos2d_ui_Layout_new(lua_State *L) +static int _olua_fun_cocos2d_ui_Layout_onPassFocusToChild(lua_State *L) { - olua_startinvoke(L); + int num_args = lua_gettop(L) - 1; - // Layout() - cocos2d::ui::Layout *ret = new cocos2d::ui::Layout(); - int num_ret = olua_push_object(L, ret, "ccui.Layout"); - olua_postnew(L, ret); + if (num_args == 0) { + // std::function onPassFocusToChild + return _olua_fun_cocos2d_ui_Layout_onPassFocusToChild$1(L); + } - olua_endinvoke(L); + if (num_args == 1) { + // if ((olua_is_callback(L, 2, "std.function") || olua_isnil(L, 2))) { + // std::function onPassFocusToChild + return _olua_fun_cocos2d_ui_Layout_onPassFocusToChild$2(L); + // } + } - return num_ret; + luaL_error(L, "method 'cocos2d::ui::Layout::onPassFocusToChild' not support '%d' arguments", num_args); + + return 0; } -static int _cocos2d_ui_Layout_removeBackGroundImage(lua_State *L) +static int _olua_fun_cocos2d_ui_Layout_removeBackGroundImage(lua_State *L) { olua_startinvoke(L); @@ -5471,7 +5881,7 @@ static int _cocos2d_ui_Layout_removeBackGroundImage(lua_State *L) return 0; } -static int _cocos2d_ui_Layout_requestDoLayout(lua_State *L) +static int _olua_fun_cocos2d_ui_Layout_requestDoLayout(lua_State *L) { olua_startinvoke(L); @@ -5487,7 +5897,7 @@ static int _cocos2d_ui_Layout_requestDoLayout(lua_State *L) return 0; } -static int _cocos2d_ui_Layout_setBackGroundColor$1(lua_State *L) +static int _olua_fun_cocos2d_ui_Layout_setBackGroundColor$1(lua_State *L) { olua_startinvoke(L); @@ -5505,7 +5915,7 @@ static int _cocos2d_ui_Layout_setBackGroundColor$1(lua_State *L) return 0; } -static int _cocos2d_ui_Layout_setBackGroundColor$2(lua_State *L) +static int _olua_fun_cocos2d_ui_Layout_setBackGroundColor$2(lua_State *L) { olua_startinvoke(L); @@ -5525,21 +5935,21 @@ static int _cocos2d_ui_Layout_setBackGroundColor$2(lua_State *L) return 0; } -static int _cocos2d_ui_Layout_setBackGroundColor(lua_State *L) +static int _olua_fun_cocos2d_ui_Layout_setBackGroundColor(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_cocos2d_Color3B(L, 2))) { // void setBackGroundColor(const cocos2d::Color3B &color) - return _cocos2d_ui_Layout_setBackGroundColor$1(L); + return _olua_fun_cocos2d_ui_Layout_setBackGroundColor$1(L); // } } if (num_args == 2) { // if ((olua_is_cocos2d_Color3B(L, 2)) && (olua_is_cocos2d_Color3B(L, 3))) { // void setBackGroundColor(const cocos2d::Color3B &startColor, const cocos2d::Color3B &endColor) - return _cocos2d_ui_Layout_setBackGroundColor$2(L); + return _olua_fun_cocos2d_ui_Layout_setBackGroundColor$2(L); // } } @@ -5548,7 +5958,7 @@ static int _cocos2d_ui_Layout_setBackGroundColor(lua_State *L) return 0; } -static int _cocos2d_ui_Layout_setBackGroundColorOpacity(lua_State *L) +static int _olua_fun_cocos2d_ui_Layout_setBackGroundColorOpacity(lua_State *L) { olua_startinvoke(L); @@ -5566,7 +5976,7 @@ static int _cocos2d_ui_Layout_setBackGroundColorOpacity(lua_State *L) return 0; } -static int _cocos2d_ui_Layout_setBackGroundColorType(lua_State *L) +static int _olua_fun_cocos2d_ui_Layout_setBackGroundColorType(lua_State *L) { olua_startinvoke(L); @@ -5584,25 +5994,25 @@ static int _cocos2d_ui_Layout_setBackGroundColorType(lua_State *L) return 0; } -static int _cocos2d_ui_Layout_setBackGroundColorVector(lua_State *L) +static int _olua_fun_cocos2d_ui_Layout_setBackGroundColorVector(lua_State *L) { olua_startinvoke(L); cocos2d::ui::Layout *self = nullptr; - cocos2d::Vec2 arg1; /** vector */ + cocos2d::Vec2 *arg1; /** vector */ olua_to_object(L, 1, &self, "ccui.Layout"); olua_check_object(L, 2, &arg1, "cc.Vec2"); // void setBackGroundColorVector(const cocos2d::Vec2 &vector) - self->setBackGroundColorVector(arg1); + self->setBackGroundColorVector(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_ui_Layout_setBackGroundImage$1(lua_State *L) +static int _olua_fun_cocos2d_ui_Layout_setBackGroundImage$1(lua_State *L) { olua_startinvoke(L); @@ -5622,7 +6032,7 @@ static int _cocos2d_ui_Layout_setBackGroundImage$1(lua_State *L) return 0; } -static int _cocos2d_ui_Layout_setBackGroundImage$2(lua_State *L) +static int _olua_fun_cocos2d_ui_Layout_setBackGroundImage$2(lua_State *L) { olua_startinvoke(L); @@ -5632,7 +6042,7 @@ static int _cocos2d_ui_Layout_setBackGroundImage$2(lua_State *L) olua_to_object(L, 1, &self, "ccui.Layout"); olua_check_string(L, 2, &arg1); - // void setBackGroundImage(const std::string &fileName, @optional cocos2d::ui::Widget::TextureResType texType) + // void setBackGroundImage(const std::string &fileName) self->setBackGroundImage(arg1); olua_endinvoke(L); @@ -5640,21 +6050,21 @@ static int _cocos2d_ui_Layout_setBackGroundImage$2(lua_State *L) return 0; } -static int _cocos2d_ui_Layout_setBackGroundImage(lua_State *L) +static int _olua_fun_cocos2d_ui_Layout_setBackGroundImage(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_string(L, 2))) { - // void setBackGroundImage(const std::string &fileName, @optional cocos2d::ui::Widget::TextureResType texType) - return _cocos2d_ui_Layout_setBackGroundImage$2(L); + // void setBackGroundImage(const std::string &fileName) + return _olua_fun_cocos2d_ui_Layout_setBackGroundImage$2(L); // } } if (num_args == 2) { // if ((olua_is_string(L, 2)) && (olua_is_enum(L, 3))) { // void setBackGroundImage(const std::string &fileName, @optional cocos2d::ui::Widget::TextureResType texType) - return _cocos2d_ui_Layout_setBackGroundImage$1(L); + return _olua_fun_cocos2d_ui_Layout_setBackGroundImage$1(L); // } } @@ -5663,25 +6073,25 @@ static int _cocos2d_ui_Layout_setBackGroundImage(lua_State *L) return 0; } -static int _cocos2d_ui_Layout_setBackGroundImageCapInsets(lua_State *L) +static int _olua_fun_cocos2d_ui_Layout_setBackGroundImageCapInsets(lua_State *L) { olua_startinvoke(L); cocos2d::ui::Layout *self = nullptr; - cocos2d::Rect arg1; /** capInsets */ + cocos2d::Rect *arg1; /** capInsets */ olua_to_object(L, 1, &self, "ccui.Layout"); olua_check_object(L, 2, &arg1, "cc.Rect"); // void setBackGroundImageCapInsets(const cocos2d::Rect &capInsets) - self->setBackGroundImageCapInsets(arg1); + self->setBackGroundImageCapInsets(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_ui_Layout_setBackGroundImageColor(lua_State *L) +static int _olua_fun_cocos2d_ui_Layout_setBackGroundImageColor(lua_State *L) { olua_startinvoke(L); @@ -5699,7 +6109,7 @@ static int _cocos2d_ui_Layout_setBackGroundImageColor(lua_State *L) return 0; } -static int _cocos2d_ui_Layout_setBackGroundImageOpacity(lua_State *L) +static int _olua_fun_cocos2d_ui_Layout_setBackGroundImageOpacity(lua_State *L) { olua_startinvoke(L); @@ -5717,7 +6127,7 @@ static int _cocos2d_ui_Layout_setBackGroundImageOpacity(lua_State *L) return 0; } -static int _cocos2d_ui_Layout_setBackGroundImageScale9Enabled(lua_State *L) +static int _olua_fun_cocos2d_ui_Layout_setBackGroundImageScale9Enabled(lua_State *L) { olua_startinvoke(L); @@ -5735,7 +6145,7 @@ static int _cocos2d_ui_Layout_setBackGroundImageScale9Enabled(lua_State *L) return 0; } -static int _cocos2d_ui_Layout_setClippingEnabled(lua_State *L) +static int _olua_fun_cocos2d_ui_Layout_setClippingEnabled(lua_State *L) { olua_startinvoke(L); @@ -5753,7 +6163,7 @@ static int _cocos2d_ui_Layout_setClippingEnabled(lua_State *L) return 0; } -static int _cocos2d_ui_Layout_setClippingType(lua_State *L) +static int _olua_fun_cocos2d_ui_Layout_setClippingType(lua_State *L) { olua_startinvoke(L); @@ -5771,7 +6181,7 @@ static int _cocos2d_ui_Layout_setClippingType(lua_State *L) return 0; } -static int _cocos2d_ui_Layout_setLayoutType(lua_State *L) +static int _olua_fun_cocos2d_ui_Layout_setLayoutType(lua_State *L) { olua_startinvoke(L); @@ -5789,7 +6199,7 @@ static int _cocos2d_ui_Layout_setLayoutType(lua_State *L) return 0; } -static int _cocos2d_ui_Layout_setLoopFocus(lua_State *L) +static int _olua_fun_cocos2d_ui_Layout_setLoopFocus(lua_State *L) { olua_startinvoke(L); @@ -5807,7 +6217,7 @@ static int _cocos2d_ui_Layout_setLoopFocus(lua_State *L) return 0; } -static int _cocos2d_ui_Layout_setPassFocusToChild(lua_State *L) +static int _olua_fun_cocos2d_ui_Layout_setPassFocusToChild(lua_State *L) { olua_startinvoke(L); @@ -5825,143 +6235,81 @@ static int _cocos2d_ui_Layout_setPassFocusToChild(lua_State *L) return 0; } -static int _cocos2d_ui_Layout_get_onPassFocusToChild(lua_State *L) -{ - olua_startinvoke(L); - - cocos2d::ui::Layout *self = nullptr; - - olua_to_object(L, 1, &self, "ccui.Layout"); - - void *cb_store = (void *)self; - std::string cb_tag = "onPassFocusToChild"; - olua_getcallback(L, cb_store, cb_tag.c_str(), OLUA_TAG_EQUAL); - - // @nullable std::function onPassFocusToChild - std::function ret = self->onPassFocusToChild; - int num_ret = olua_push_callback(L, &ret, "std.function"); - - olua_endinvoke(L); - - return num_ret; -} - -static int _cocos2d_ui_Layout_set_onPassFocusToChild(lua_State *L) +static int _olua_cls_ccui_Layout(lua_State *L) { - olua_startinvoke(L); - - cocos2d::ui::Layout *self = nullptr; - std::function arg1; /** onPassFocusToChild */ - - olua_to_object(L, 1, &self, "ccui.Layout"); - if (!olua_isnoneornil(L, 2)) { - olua_check_callback(L, 2, &arg1, "std.function"); - } - - void *cb_store = (void *)self; - std::string cb_tag = "onPassFocusToChild"; - std::string cb_name; - if (olua_isfunction(L, 2)) { - cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); - olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](cocos2d::ui::Widget::FocusDirection arg1, cocos2d::ui::Widget *arg2) { - lua_State *L = olua_mainthread(NULL); - olua_checkhostthread(); - int ret = 0; /** ret */ - if (olua_contextequal(L, cb_ctx)) { - int top = lua_gettop(L); - olua_push_enum(L, arg1); - olua_push_object(L, arg2, "ccui.Widget"); - - olua_callback(L, cb_store, cb_name.c_str(), 2); - - if (olua_is_integer(L, -1)) { - olua_check_integer(L, -1, &ret); - } - - lua_settop(L, top); - } - return ret; - }; - } else { - olua_removecallback(L, cb_store, cb_tag.c_str(), OLUA_TAG_EQUAL); - arg1 = nullptr; - } - - // @nullable std::function onPassFocusToChild - self->onPassFocusToChild = arg1; - - olua_endinvoke(L); + oluacls_class(L, "ccui.Layout"); + oluacls_func(L, "as", _olua_fun_cocos2d_ui_Layout_as); + oluacls_func(L, "create", _olua_fun_cocos2d_ui_Layout_create); + oluacls_func(L, "createInstance", _olua_fun_cocos2d_ui_Layout_createInstance); + oluacls_func(L, "forceDoLayout", _olua_fun_cocos2d_ui_Layout_forceDoLayout); + oluacls_func(L, "getBackGroundColor", _olua_fun_cocos2d_ui_Layout_getBackGroundColor); + oluacls_func(L, "getBackGroundColorOpacity", _olua_fun_cocos2d_ui_Layout_getBackGroundColorOpacity); + oluacls_func(L, "getBackGroundColorType", _olua_fun_cocos2d_ui_Layout_getBackGroundColorType); + oluacls_func(L, "getBackGroundColorVector", _olua_fun_cocos2d_ui_Layout_getBackGroundColorVector); + oluacls_func(L, "getBackGroundEndColor", _olua_fun_cocos2d_ui_Layout_getBackGroundEndColor); + oluacls_func(L, "getBackGroundImageCapInsets", _olua_fun_cocos2d_ui_Layout_getBackGroundImageCapInsets); + oluacls_func(L, "getBackGroundImageColor", _olua_fun_cocos2d_ui_Layout_getBackGroundImageColor); + oluacls_func(L, "getBackGroundImageOpacity", _olua_fun_cocos2d_ui_Layout_getBackGroundImageOpacity); + oluacls_func(L, "getBackGroundImageTextureSize", _olua_fun_cocos2d_ui_Layout_getBackGroundImageTextureSize); + oluacls_func(L, "getBackGroundStartColor", _olua_fun_cocos2d_ui_Layout_getBackGroundStartColor); + oluacls_func(L, "getClippingType", _olua_fun_cocos2d_ui_Layout_getClippingType); + oluacls_func(L, "getLayoutType", _olua_fun_cocos2d_ui_Layout_getLayoutType); + oluacls_func(L, "getRenderFile", _olua_fun_cocos2d_ui_Layout_getRenderFile); + oluacls_func(L, "isBackGroundImageScale9Enabled", _olua_fun_cocos2d_ui_Layout_isBackGroundImageScale9Enabled); + oluacls_func(L, "isClippingEnabled", _olua_fun_cocos2d_ui_Layout_isClippingEnabled); + oluacls_func(L, "isLoopFocus", _olua_fun_cocos2d_ui_Layout_isLoopFocus); + oluacls_func(L, "isPassFocusToChild", _olua_fun_cocos2d_ui_Layout_isPassFocusToChild); + oluacls_func(L, "new", _olua_fun_cocos2d_ui_Layout_new); + oluacls_func(L, "removeBackGroundImage", _olua_fun_cocos2d_ui_Layout_removeBackGroundImage); + oluacls_func(L, "requestDoLayout", _olua_fun_cocos2d_ui_Layout_requestDoLayout); + oluacls_func(L, "setBackGroundColor", _olua_fun_cocos2d_ui_Layout_setBackGroundColor); + oluacls_func(L, "setBackGroundColorOpacity", _olua_fun_cocos2d_ui_Layout_setBackGroundColorOpacity); + oluacls_func(L, "setBackGroundColorType", _olua_fun_cocos2d_ui_Layout_setBackGroundColorType); + oluacls_func(L, "setBackGroundColorVector", _olua_fun_cocos2d_ui_Layout_setBackGroundColorVector); + oluacls_func(L, "setBackGroundImage", _olua_fun_cocos2d_ui_Layout_setBackGroundImage); + oluacls_func(L, "setBackGroundImageCapInsets", _olua_fun_cocos2d_ui_Layout_setBackGroundImageCapInsets); + oluacls_func(L, "setBackGroundImageColor", _olua_fun_cocos2d_ui_Layout_setBackGroundImageColor); + oluacls_func(L, "setBackGroundImageOpacity", _olua_fun_cocos2d_ui_Layout_setBackGroundImageOpacity); + oluacls_func(L, "setBackGroundImageScale9Enabled", _olua_fun_cocos2d_ui_Layout_setBackGroundImageScale9Enabled); + oluacls_func(L, "setClippingEnabled", _olua_fun_cocos2d_ui_Layout_setClippingEnabled); + oluacls_func(L, "setClippingType", _olua_fun_cocos2d_ui_Layout_setClippingType); + oluacls_func(L, "setLayoutType", _olua_fun_cocos2d_ui_Layout_setLayoutType); + oluacls_func(L, "setLoopFocus", _olua_fun_cocos2d_ui_Layout_setLoopFocus); + oluacls_func(L, "setPassFocusToChild", _olua_fun_cocos2d_ui_Layout_setPassFocusToChild); + oluacls_prop(L, "backGroundColor", _olua_fun_cocos2d_ui_Layout_getBackGroundColor, nullptr); + oluacls_prop(L, "backGroundColorOpacity", _olua_fun_cocos2d_ui_Layout_getBackGroundColorOpacity, _olua_fun_cocos2d_ui_Layout_setBackGroundColorOpacity); + oluacls_prop(L, "backGroundColorType", _olua_fun_cocos2d_ui_Layout_getBackGroundColorType, _olua_fun_cocos2d_ui_Layout_setBackGroundColorType); + oluacls_prop(L, "backGroundColorVector", _olua_fun_cocos2d_ui_Layout_getBackGroundColorVector, _olua_fun_cocos2d_ui_Layout_setBackGroundColorVector); + oluacls_prop(L, "backGroundEndColor", _olua_fun_cocos2d_ui_Layout_getBackGroundEndColor, nullptr); + oluacls_prop(L, "backGroundImageCapInsets", _olua_fun_cocos2d_ui_Layout_getBackGroundImageCapInsets, _olua_fun_cocos2d_ui_Layout_setBackGroundImageCapInsets); + oluacls_prop(L, "backGroundImageColor", _olua_fun_cocos2d_ui_Layout_getBackGroundImageColor, _olua_fun_cocos2d_ui_Layout_setBackGroundImageColor); + oluacls_prop(L, "backGroundImageOpacity", _olua_fun_cocos2d_ui_Layout_getBackGroundImageOpacity, _olua_fun_cocos2d_ui_Layout_setBackGroundImageOpacity); + oluacls_prop(L, "backGroundImageScale9Enabled", _olua_fun_cocos2d_ui_Layout_isBackGroundImageScale9Enabled, _olua_fun_cocos2d_ui_Layout_setBackGroundImageScale9Enabled); + oluacls_prop(L, "backGroundImageTextureSize", _olua_fun_cocos2d_ui_Layout_getBackGroundImageTextureSize, nullptr); + oluacls_prop(L, "backGroundStartColor", _olua_fun_cocos2d_ui_Layout_getBackGroundStartColor, nullptr); + oluacls_prop(L, "clippingEnabled", _olua_fun_cocos2d_ui_Layout_isClippingEnabled, _olua_fun_cocos2d_ui_Layout_setClippingEnabled); + oluacls_prop(L, "clippingType", _olua_fun_cocos2d_ui_Layout_getClippingType, _olua_fun_cocos2d_ui_Layout_setClippingType); + oluacls_prop(L, "layoutType", _olua_fun_cocos2d_ui_Layout_getLayoutType, _olua_fun_cocos2d_ui_Layout_setLayoutType); + oluacls_prop(L, "loopFocus", _olua_fun_cocos2d_ui_Layout_isLoopFocus, _olua_fun_cocos2d_ui_Layout_setLoopFocus); + oluacls_prop(L, "passFocusToChild", _olua_fun_cocos2d_ui_Layout_isPassFocusToChild, _olua_fun_cocos2d_ui_Layout_setPassFocusToChild); + oluacls_prop(L, "renderFile", _olua_fun_cocos2d_ui_Layout_getRenderFile, nullptr); + oluacls_prop(L, "onPassFocusToChild", _olua_fun_cocos2d_ui_Layout_onPassFocusToChild, _olua_fun_cocos2d_ui_Layout_onPassFocusToChild); - return 0; + return 1; } OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ui_Layout(lua_State *L) +OLUA_LIB int luaopen_ccui_Layout(lua_State *L) { - oluacls_class(L, "ccui.Layout"); - oluacls_func(L, "as", _cocos2d_ui_Layout_as); - oluacls_func(L, "create", _cocos2d_ui_Layout_create); - oluacls_func(L, "createInstance", _cocos2d_ui_Layout_createInstance); - oluacls_func(L, "forceDoLayout", _cocos2d_ui_Layout_forceDoLayout); - oluacls_func(L, "getBackGroundColor", _cocos2d_ui_Layout_getBackGroundColor); - oluacls_func(L, "getBackGroundColorOpacity", _cocos2d_ui_Layout_getBackGroundColorOpacity); - oluacls_func(L, "getBackGroundColorType", _cocos2d_ui_Layout_getBackGroundColorType); - oluacls_func(L, "getBackGroundColorVector", _cocos2d_ui_Layout_getBackGroundColorVector); - oluacls_func(L, "getBackGroundEndColor", _cocos2d_ui_Layout_getBackGroundEndColor); - oluacls_func(L, "getBackGroundImageCapInsets", _cocos2d_ui_Layout_getBackGroundImageCapInsets); - oluacls_func(L, "getBackGroundImageColor", _cocos2d_ui_Layout_getBackGroundImageColor); - oluacls_func(L, "getBackGroundImageOpacity", _cocos2d_ui_Layout_getBackGroundImageOpacity); - oluacls_func(L, "getBackGroundImageTextureSize", _cocos2d_ui_Layout_getBackGroundImageTextureSize); - oluacls_func(L, "getBackGroundStartColor", _cocos2d_ui_Layout_getBackGroundStartColor); - oluacls_func(L, "getClippingType", _cocos2d_ui_Layout_getClippingType); - oluacls_func(L, "getLayoutType", _cocos2d_ui_Layout_getLayoutType); - oluacls_func(L, "getRenderFile", _cocos2d_ui_Layout_getRenderFile); - oluacls_func(L, "isBackGroundImageScale9Enabled", _cocos2d_ui_Layout_isBackGroundImageScale9Enabled); - oluacls_func(L, "isClippingEnabled", _cocos2d_ui_Layout_isClippingEnabled); - oluacls_func(L, "isLoopFocus", _cocos2d_ui_Layout_isLoopFocus); - oluacls_func(L, "isPassFocusToChild", _cocos2d_ui_Layout_isPassFocusToChild); - oluacls_func(L, "new", _cocos2d_ui_Layout_new); - oluacls_func(L, "removeBackGroundImage", _cocos2d_ui_Layout_removeBackGroundImage); - oluacls_func(L, "requestDoLayout", _cocos2d_ui_Layout_requestDoLayout); - oluacls_func(L, "setBackGroundColor", _cocos2d_ui_Layout_setBackGroundColor); - oluacls_func(L, "setBackGroundColorOpacity", _cocos2d_ui_Layout_setBackGroundColorOpacity); - oluacls_func(L, "setBackGroundColorType", _cocos2d_ui_Layout_setBackGroundColorType); - oluacls_func(L, "setBackGroundColorVector", _cocos2d_ui_Layout_setBackGroundColorVector); - oluacls_func(L, "setBackGroundImage", _cocos2d_ui_Layout_setBackGroundImage); - oluacls_func(L, "setBackGroundImageCapInsets", _cocos2d_ui_Layout_setBackGroundImageCapInsets); - oluacls_func(L, "setBackGroundImageColor", _cocos2d_ui_Layout_setBackGroundImageColor); - oluacls_func(L, "setBackGroundImageOpacity", _cocos2d_ui_Layout_setBackGroundImageOpacity); - oluacls_func(L, "setBackGroundImageScale9Enabled", _cocos2d_ui_Layout_setBackGroundImageScale9Enabled); - oluacls_func(L, "setClippingEnabled", _cocos2d_ui_Layout_setClippingEnabled); - oluacls_func(L, "setClippingType", _cocos2d_ui_Layout_setClippingType); - oluacls_func(L, "setLayoutType", _cocos2d_ui_Layout_setLayoutType); - oluacls_func(L, "setLoopFocus", _cocos2d_ui_Layout_setLoopFocus); - oluacls_func(L, "setPassFocusToChild", _cocos2d_ui_Layout_setPassFocusToChild); - oluacls_prop(L, "backGroundColor", _cocos2d_ui_Layout_getBackGroundColor, _cocos2d_ui_Layout_setBackGroundColor); - oluacls_prop(L, "backGroundColorOpacity", _cocos2d_ui_Layout_getBackGroundColorOpacity, _cocos2d_ui_Layout_setBackGroundColorOpacity); - oluacls_prop(L, "backGroundColorType", _cocos2d_ui_Layout_getBackGroundColorType, _cocos2d_ui_Layout_setBackGroundColorType); - oluacls_prop(L, "backGroundColorVector", _cocos2d_ui_Layout_getBackGroundColorVector, _cocos2d_ui_Layout_setBackGroundColorVector); - oluacls_prop(L, "backGroundEndColor", _cocos2d_ui_Layout_getBackGroundEndColor, nullptr); - oluacls_prop(L, "backGroundImageCapInsets", _cocos2d_ui_Layout_getBackGroundImageCapInsets, _cocos2d_ui_Layout_setBackGroundImageCapInsets); - oluacls_prop(L, "backGroundImageColor", _cocos2d_ui_Layout_getBackGroundImageColor, _cocos2d_ui_Layout_setBackGroundImageColor); - oluacls_prop(L, "backGroundImageOpacity", _cocos2d_ui_Layout_getBackGroundImageOpacity, _cocos2d_ui_Layout_setBackGroundImageOpacity); - oluacls_prop(L, "backGroundImageScale9Enabled", _cocos2d_ui_Layout_isBackGroundImageScale9Enabled, _cocos2d_ui_Layout_setBackGroundImageScale9Enabled); - oluacls_prop(L, "backGroundImageTextureSize", _cocos2d_ui_Layout_getBackGroundImageTextureSize, nullptr); - oluacls_prop(L, "backGroundStartColor", _cocos2d_ui_Layout_getBackGroundStartColor, nullptr); - oluacls_prop(L, "clippingEnabled", _cocos2d_ui_Layout_isClippingEnabled, _cocos2d_ui_Layout_setClippingEnabled); - oluacls_prop(L, "clippingType", _cocos2d_ui_Layout_getClippingType, _cocos2d_ui_Layout_setClippingType); - oluacls_prop(L, "layoutType", _cocos2d_ui_Layout_getLayoutType, _cocos2d_ui_Layout_setLayoutType); - oluacls_prop(L, "loopFocus", _cocos2d_ui_Layout_isLoopFocus, _cocos2d_ui_Layout_setLoopFocus); - oluacls_prop(L, "passFocusToChild", _cocos2d_ui_Layout_isPassFocusToChild, _cocos2d_ui_Layout_setPassFocusToChild); - oluacls_prop(L, "renderFile", _cocos2d_ui_Layout_getRenderFile, nullptr); - oluacls_prop(L, "onPassFocusToChild", _cocos2d_ui_Layout_get_onPassFocusToChild, _cocos2d_ui_Layout_set_onPassFocusToChild); - + olua_require(L, "cocos2d_ui", luaopen_cocos2d_ui); + if (!olua_getclass(L, "ccui.Layout")) { + luaL_error(L, "class not found: cocos2d::ui::Layout"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_ui_HBox_create$1(lua_State *L) +static int _olua_fun_cocos2d_ui_HBox_create$1(lua_State *L) { olua_startinvoke(L); @@ -5974,16 +6322,16 @@ static int _cocos2d_ui_HBox_create$1(lua_State *L) return num_ret; } -static int _cocos2d_ui_HBox_create$2(lua_State *L) +static int _olua_fun_cocos2d_ui_HBox_create$2(lua_State *L) { olua_startinvoke(L); - cocos2d::Size arg1; /** size */ + cocos2d::Size *arg1; /** size */ olua_check_object(L, 1, &arg1, "cc.Size"); // static cocos2d::ui::HBox *create(const cocos2d::Size &size) - cocos2d::ui::HBox *ret = cocos2d::ui::HBox::create(arg1); + cocos2d::ui::HBox *ret = cocos2d::ui::HBox::create(*arg1); int num_ret = olua_push_object(L, ret, "ccui.HBox"); olua_endinvoke(L); @@ -5991,19 +6339,19 @@ static int _cocos2d_ui_HBox_create$2(lua_State *L) return num_ret; } -static int _cocos2d_ui_HBox_create(lua_State *L) +static int _olua_fun_cocos2d_ui_HBox_create(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 0) { // static cocos2d::ui::HBox *create() - return _cocos2d_ui_HBox_create$1(L); + return _olua_fun_cocos2d_ui_HBox_create$1(L); } if (num_args == 1) { // if ((olua_is_object(L, 1, "cc.Size"))) { // static cocos2d::ui::HBox *create(const cocos2d::Size &size) - return _cocos2d_ui_HBox_create$2(L); + return _olua_fun_cocos2d_ui_HBox_create$2(L); // } } @@ -6012,18 +6360,18 @@ static int _cocos2d_ui_HBox_create(lua_State *L) return 0; } -static int _cocos2d_ui_HBox_initWithSize(lua_State *L) +static int _olua_fun_cocos2d_ui_HBox_initWithSize(lua_State *L) { olua_startinvoke(L); cocos2d::ui::HBox *self = nullptr; - cocos2d::Size arg1; /** size */ + cocos2d::Size *arg1; /** size */ olua_to_object(L, 1, &self, "ccui.HBox"); olua_check_object(L, 2, &arg1, "cc.Size"); // bool initWithSize(const cocos2d::Size &size) - bool ret = self->initWithSize(arg1); + bool ret = self->initWithSize(*arg1); int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); @@ -6031,11 +6379,11 @@ static int _cocos2d_ui_HBox_initWithSize(lua_State *L) return num_ret; } -static int _cocos2d_ui_HBox_new(lua_State *L) +static int _olua_fun_cocos2d_ui_HBox_new(lua_State *L) { olua_startinvoke(L); - // HBox() + // cocos2d::ui::HBox() cocos2d::ui::HBox *ret = new cocos2d::ui::HBox(); int num_ret = olua_push_object(L, ret, "ccui.HBox"); olua_postnew(L, ret); @@ -6045,19 +6393,28 @@ static int _cocos2d_ui_HBox_new(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ui_HBox(lua_State *L) +static int _olua_cls_ccui_HBox(lua_State *L) { oluacls_class(L, "ccui.HBox"); - oluacls_func(L, "create", _cocos2d_ui_HBox_create); - oluacls_func(L, "initWithSize", _cocos2d_ui_HBox_initWithSize); - oluacls_func(L, "new", _cocos2d_ui_HBox_new); + oluacls_func(L, "create", _olua_fun_cocos2d_ui_HBox_create); + oluacls_func(L, "initWithSize", _olua_fun_cocos2d_ui_HBox_initWithSize); + oluacls_func(L, "new", _olua_fun_cocos2d_ui_HBox_new); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccui_HBox(lua_State *L) +{ + olua_require(L, "cocos2d_ui", luaopen_cocos2d_ui); + if (!olua_getclass(L, "ccui.HBox")) { + luaL_error(L, "class not found: cocos2d::ui::HBox"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_ui_VBox_create$1(lua_State *L) +static int _olua_fun_cocos2d_ui_VBox_create$1(lua_State *L) { olua_startinvoke(L); @@ -6070,16 +6427,16 @@ static int _cocos2d_ui_VBox_create$1(lua_State *L) return num_ret; } -static int _cocos2d_ui_VBox_create$2(lua_State *L) +static int _olua_fun_cocos2d_ui_VBox_create$2(lua_State *L) { olua_startinvoke(L); - cocos2d::Size arg1; /** size */ + cocos2d::Size *arg1; /** size */ olua_check_object(L, 1, &arg1, "cc.Size"); // static cocos2d::ui::VBox *create(const cocos2d::Size &size) - cocos2d::ui::VBox *ret = cocos2d::ui::VBox::create(arg1); + cocos2d::ui::VBox *ret = cocos2d::ui::VBox::create(*arg1); int num_ret = olua_push_object(L, ret, "ccui.VBox"); olua_endinvoke(L); @@ -6087,19 +6444,19 @@ static int _cocos2d_ui_VBox_create$2(lua_State *L) return num_ret; } -static int _cocos2d_ui_VBox_create(lua_State *L) +static int _olua_fun_cocos2d_ui_VBox_create(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 0) { // static cocos2d::ui::VBox *create() - return _cocos2d_ui_VBox_create$1(L); + return _olua_fun_cocos2d_ui_VBox_create$1(L); } if (num_args == 1) { // if ((olua_is_object(L, 1, "cc.Size"))) { // static cocos2d::ui::VBox *create(const cocos2d::Size &size) - return _cocos2d_ui_VBox_create$2(L); + return _olua_fun_cocos2d_ui_VBox_create$2(L); // } } @@ -6108,18 +6465,18 @@ static int _cocos2d_ui_VBox_create(lua_State *L) return 0; } -static int _cocos2d_ui_VBox_initWithSize(lua_State *L) +static int _olua_fun_cocos2d_ui_VBox_initWithSize(lua_State *L) { olua_startinvoke(L); cocos2d::ui::VBox *self = nullptr; - cocos2d::Size arg1; /** size */ + cocos2d::Size *arg1; /** size */ olua_to_object(L, 1, &self, "ccui.VBox"); olua_check_object(L, 2, &arg1, "cc.Size"); // bool initWithSize(const cocos2d::Size &size) - bool ret = self->initWithSize(arg1); + bool ret = self->initWithSize(*arg1); int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); @@ -6127,11 +6484,11 @@ static int _cocos2d_ui_VBox_initWithSize(lua_State *L) return num_ret; } -static int _cocos2d_ui_VBox_new(lua_State *L) +static int _olua_fun_cocos2d_ui_VBox_new(lua_State *L) { olua_startinvoke(L); - // VBox() + // cocos2d::ui::VBox() cocos2d::ui::VBox *ret = new cocos2d::ui::VBox(); int num_ret = olua_push_object(L, ret, "ccui.VBox"); olua_postnew(L, ret); @@ -6141,19 +6498,28 @@ static int _cocos2d_ui_VBox_new(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ui_VBox(lua_State *L) +static int _olua_cls_ccui_VBox(lua_State *L) { oluacls_class(L, "ccui.VBox"); - oluacls_func(L, "create", _cocos2d_ui_VBox_create); - oluacls_func(L, "initWithSize", _cocos2d_ui_VBox_initWithSize); - oluacls_func(L, "new", _cocos2d_ui_VBox_new); + oluacls_func(L, "create", _olua_fun_cocos2d_ui_VBox_create); + oluacls_func(L, "initWithSize", _olua_fun_cocos2d_ui_VBox_initWithSize); + oluacls_func(L, "new", _olua_fun_cocos2d_ui_VBox_new); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccui_VBox(lua_State *L) +{ + olua_require(L, "cocos2d_ui", luaopen_cocos2d_ui); + if (!olua_getclass(L, "ccui.VBox")) { + luaL_error(L, "class not found: cocos2d::ui::VBox"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_ui_RelativeBox_create$1(lua_State *L) +static int _olua_fun_cocos2d_ui_RelativeBox_create$1(lua_State *L) { olua_startinvoke(L); @@ -6166,16 +6532,16 @@ static int _cocos2d_ui_RelativeBox_create$1(lua_State *L) return num_ret; } -static int _cocos2d_ui_RelativeBox_create$2(lua_State *L) +static int _olua_fun_cocos2d_ui_RelativeBox_create$2(lua_State *L) { olua_startinvoke(L); - cocos2d::Size arg1; /** size */ + cocos2d::Size *arg1; /** size */ olua_check_object(L, 1, &arg1, "cc.Size"); // static cocos2d::ui::RelativeBox *create(const cocos2d::Size &size) - cocos2d::ui::RelativeBox *ret = cocos2d::ui::RelativeBox::create(arg1); + cocos2d::ui::RelativeBox *ret = cocos2d::ui::RelativeBox::create(*arg1); int num_ret = olua_push_object(L, ret, "ccui.RelativeBox"); olua_endinvoke(L); @@ -6183,19 +6549,19 @@ static int _cocos2d_ui_RelativeBox_create$2(lua_State *L) return num_ret; } -static int _cocos2d_ui_RelativeBox_create(lua_State *L) +static int _olua_fun_cocos2d_ui_RelativeBox_create(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 0) { // static cocos2d::ui::RelativeBox *create() - return _cocos2d_ui_RelativeBox_create$1(L); + return _olua_fun_cocos2d_ui_RelativeBox_create$1(L); } if (num_args == 1) { // if ((olua_is_object(L, 1, "cc.Size"))) { // static cocos2d::ui::RelativeBox *create(const cocos2d::Size &size) - return _cocos2d_ui_RelativeBox_create$2(L); + return _olua_fun_cocos2d_ui_RelativeBox_create$2(L); // } } @@ -6204,18 +6570,18 @@ static int _cocos2d_ui_RelativeBox_create(lua_State *L) return 0; } -static int _cocos2d_ui_RelativeBox_initWithSize(lua_State *L) +static int _olua_fun_cocos2d_ui_RelativeBox_initWithSize(lua_State *L) { olua_startinvoke(L); cocos2d::ui::RelativeBox *self = nullptr; - cocos2d::Size arg1; /** size */ + cocos2d::Size *arg1; /** size */ olua_to_object(L, 1, &self, "ccui.RelativeBox"); olua_check_object(L, 2, &arg1, "cc.Size"); // bool initWithSize(const cocos2d::Size &size) - bool ret = self->initWithSize(arg1); + bool ret = self->initWithSize(*arg1); int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); @@ -6223,11 +6589,11 @@ static int _cocos2d_ui_RelativeBox_initWithSize(lua_State *L) return num_ret; } -static int _cocos2d_ui_RelativeBox_new(lua_State *L) +static int _olua_fun_cocos2d_ui_RelativeBox_new(lua_State *L) { olua_startinvoke(L); - // RelativeBox() + // cocos2d::ui::RelativeBox() cocos2d::ui::RelativeBox *ret = new cocos2d::ui::RelativeBox(); int num_ret = olua_push_object(L, ret, "ccui.RelativeBox"); olua_postnew(L, ret); @@ -6237,20 +6603,29 @@ static int _cocos2d_ui_RelativeBox_new(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ui_RelativeBox(lua_State *L) +static int _olua_cls_ccui_RelativeBox(lua_State *L) { oluacls_class(L, "ccui.RelativeBox"); - oluacls_func(L, "create", _cocos2d_ui_RelativeBox_create); - oluacls_func(L, "initWithSize", _cocos2d_ui_RelativeBox_initWithSize); - oluacls_func(L, "new", _cocos2d_ui_RelativeBox_new); + oluacls_func(L, "create", _olua_fun_cocos2d_ui_RelativeBox_create); + oluacls_func(L, "initWithSize", _olua_fun_cocos2d_ui_RelativeBox_initWithSize); + oluacls_func(L, "new", _olua_fun_cocos2d_ui_RelativeBox_new); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccui_RelativeBox(lua_State *L) +{ + olua_require(L, "cocos2d_ui", luaopen_cocos2d_ui); + if (!olua_getclass(L, "ccui.RelativeBox")) { + luaL_error(L, "class not found: cocos2d::ui::RelativeBox"); + } return 1; } OLUA_END_DECLS #if defined(CCLUA_OS_IOS) || defined(CCLUA_OS_ANDROID) -static int _cocos2d_ui_WebView_ccWebViewCallback___call(lua_State *L) +static int _olua_fun_cocos2d_ui_WebView_ccWebViewCallback___call(lua_State *L) { olua_startinvoke(L); @@ -6262,19 +6637,28 @@ static int _cocos2d_ui_WebView_ccWebViewCallback___call(lua_State *L) return 1; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ui_WebView_ccWebViewCallback(lua_State *L) +static int _olua_cls_ccui_WebView_ccWebViewCallback(lua_State *L) { oluacls_class(L, "ccui.WebView.ccWebViewCallback"); - oluacls_func(L, "__call", _cocos2d_ui_WebView_ccWebViewCallback___call); + oluacls_func(L, "__call", _olua_fun_cocos2d_ui_WebView_ccWebViewCallback___call); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccui_WebView_ccWebViewCallback(lua_State *L) +{ + olua_require(L, "cocos2d_ui", luaopen_cocos2d_ui); + if (!olua_getclass(L, "ccui.WebView.ccWebViewCallback")) { + luaL_error(L, "class not found: cocos2d::ui::WebView::ccWebViewCallback"); + } return 1; } OLUA_END_DECLS #endif #if defined(CCLUA_OS_IOS) || defined(CCLUA_OS_ANDROID) -static int _cocos2d_ui_WebView_canGoBack(lua_State *L) +static int _olua_fun_cocos2d_ui_WebView_canGoBack(lua_State *L) { olua_startinvoke(L); @@ -6291,7 +6675,7 @@ static int _cocos2d_ui_WebView_canGoBack(lua_State *L) return num_ret; } -static int _cocos2d_ui_WebView_canGoForward(lua_State *L) +static int _olua_fun_cocos2d_ui_WebView_canGoForward(lua_State *L) { olua_startinvoke(L); @@ -6308,7 +6692,7 @@ static int _cocos2d_ui_WebView_canGoForward(lua_State *L) return num_ret; } -static int _cocos2d_ui_WebView_create(lua_State *L) +static int _olua_fun_cocos2d_ui_WebView_create(lua_State *L) { olua_startinvoke(L); @@ -6321,7 +6705,7 @@ static int _cocos2d_ui_WebView_create(lua_State *L) return num_ret; } -static int _cocos2d_ui_WebView_evaluateJS(lua_State *L) +static int _olua_fun_cocos2d_ui_WebView_evaluateJS(lua_State *L) { olua_startinvoke(L); @@ -6339,7 +6723,7 @@ static int _cocos2d_ui_WebView_evaluateJS(lua_State *L) return 0; } -static int _cocos2d_ui_WebView_getOnDidFailLoading(lua_State *L) +static int _olua_fun_cocos2d_ui_WebView_getOnDidFailLoading(lua_State *L) { olua_startinvoke(L); @@ -6351,7 +6735,7 @@ static int _cocos2d_ui_WebView_getOnDidFailLoading(lua_State *L) std::string cb_tag = "OnDidFailLoading"; olua_getcallback(L, cb_store, cb_tag.c_str(), OLUA_TAG_EQUAL); - // @localvar cocos2d::ui::WebView::ccWebViewCallback getOnDidFailLoading() + // cocos2d::ui::WebView::ccWebViewCallback getOnDidFailLoading() cocos2d::ui::WebView::ccWebViewCallback ret = self->getOnDidFailLoading(); int num_ret = olua_push_callback(L, &ret, "ccui.WebView.ccWebViewCallback"); @@ -6360,7 +6744,7 @@ static int _cocos2d_ui_WebView_getOnDidFailLoading(lua_State *L) return num_ret; } -static int _cocos2d_ui_WebView_getOnDidFinishLoading(lua_State *L) +static int _olua_fun_cocos2d_ui_WebView_getOnDidFinishLoading(lua_State *L) { olua_startinvoke(L); @@ -6372,7 +6756,7 @@ static int _cocos2d_ui_WebView_getOnDidFinishLoading(lua_State *L) std::string cb_tag = "OnDidFinishLoading"; olua_getcallback(L, cb_store, cb_tag.c_str(), OLUA_TAG_EQUAL); - // @localvar cocos2d::ui::WebView::ccWebViewCallback getOnDidFinishLoading() + // cocos2d::ui::WebView::ccWebViewCallback getOnDidFinishLoading() cocos2d::ui::WebView::ccWebViewCallback ret = self->getOnDidFinishLoading(); int num_ret = olua_push_callback(L, &ret, "ccui.WebView.ccWebViewCallback"); @@ -6381,7 +6765,7 @@ static int _cocos2d_ui_WebView_getOnDidFinishLoading(lua_State *L) return num_ret; } -static int _cocos2d_ui_WebView_getOnJSCallback(lua_State *L) +static int _olua_fun_cocos2d_ui_WebView_getOnJSCallback(lua_State *L) { olua_startinvoke(L); @@ -6393,7 +6777,7 @@ static int _cocos2d_ui_WebView_getOnJSCallback(lua_State *L) std::string cb_tag = "OnJSCallback"; olua_getcallback(L, cb_store, cb_tag.c_str(), OLUA_TAG_EQUAL); - // @localvar cocos2d::ui::WebView::ccWebViewCallback getOnJSCallback() + // cocos2d::ui::WebView::ccWebViewCallback getOnJSCallback() cocos2d::ui::WebView::ccWebViewCallback ret = self->getOnJSCallback(); int num_ret = olua_push_callback(L, &ret, "ccui.WebView.ccWebViewCallback"); @@ -6402,7 +6786,7 @@ static int _cocos2d_ui_WebView_getOnJSCallback(lua_State *L) return num_ret; } -static int _cocos2d_ui_WebView_getOnShouldStartLoading(lua_State *L) +static int _olua_fun_cocos2d_ui_WebView_getOnShouldStartLoading(lua_State *L) { olua_startinvoke(L); @@ -6414,7 +6798,7 @@ static int _cocos2d_ui_WebView_getOnShouldStartLoading(lua_State *L) std::string cb_tag = "OnShouldStartLoading"; olua_getcallback(L, cb_store, cb_tag.c_str(), OLUA_TAG_EQUAL); - // @localvar std::function getOnShouldStartLoading() + // std::function getOnShouldStartLoading() std::function ret = self->getOnShouldStartLoading(); int num_ret = olua_push_callback(L, &ret, "std.function"); @@ -6423,7 +6807,7 @@ static int _cocos2d_ui_WebView_getOnShouldStartLoading(lua_State *L) return num_ret; } -static int _cocos2d_ui_WebView_getOpacityWebView(lua_State *L) +static int _olua_fun_cocos2d_ui_WebView_getOpacityWebView(lua_State *L) { olua_startinvoke(L); @@ -6440,7 +6824,7 @@ static int _cocos2d_ui_WebView_getOpacityWebView(lua_State *L) return num_ret; } -static int _cocos2d_ui_WebView_goBack(lua_State *L) +static int _olua_fun_cocos2d_ui_WebView_goBack(lua_State *L) { olua_startinvoke(L); @@ -6456,7 +6840,7 @@ static int _cocos2d_ui_WebView_goBack(lua_State *L) return 0; } -static int _cocos2d_ui_WebView_goForward(lua_State *L) +static int _olua_fun_cocos2d_ui_WebView_goForward(lua_State *L) { olua_startinvoke(L); @@ -6472,7 +6856,7 @@ static int _cocos2d_ui_WebView_goForward(lua_State *L) return 0; } -static int _cocos2d_ui_WebView_loadData(lua_State *L) +static int _olua_fun_cocos2d_ui_WebView_loadData(lua_State *L) { olua_startinvoke(L); @@ -6496,7 +6880,7 @@ static int _cocos2d_ui_WebView_loadData(lua_State *L) return 0; } -static int _cocos2d_ui_WebView_loadFile(lua_State *L) +static int _olua_fun_cocos2d_ui_WebView_loadFile(lua_State *L) { olua_startinvoke(L); @@ -6514,7 +6898,7 @@ static int _cocos2d_ui_WebView_loadFile(lua_State *L) return 0; } -static int _cocos2d_ui_WebView_loadHTMLString$1(lua_State *L) +static int _olua_fun_cocos2d_ui_WebView_loadHTMLString$1(lua_State *L) { olua_startinvoke(L); @@ -6534,7 +6918,7 @@ static int _cocos2d_ui_WebView_loadHTMLString$1(lua_State *L) return 0; } -static int _cocos2d_ui_WebView_loadHTMLString$2(lua_State *L) +static int _olua_fun_cocos2d_ui_WebView_loadHTMLString$2(lua_State *L) { olua_startinvoke(L); @@ -6544,7 +6928,7 @@ static int _cocos2d_ui_WebView_loadHTMLString$2(lua_State *L) olua_to_object(L, 1, &self, "ccui.WebView"); olua_check_string(L, 2, &arg1); - // void loadHTMLString(const std::string &string, @optional const std::string &baseURL) + // void loadHTMLString(const std::string &string) self->loadHTMLString(arg1); olua_endinvoke(L); @@ -6552,21 +6936,21 @@ static int _cocos2d_ui_WebView_loadHTMLString$2(lua_State *L) return 0; } -static int _cocos2d_ui_WebView_loadHTMLString(lua_State *L) +static int _olua_fun_cocos2d_ui_WebView_loadHTMLString(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_string(L, 2))) { - // void loadHTMLString(const std::string &string, @optional const std::string &baseURL) - return _cocos2d_ui_WebView_loadHTMLString$2(L); + // void loadHTMLString(const std::string &string) + return _olua_fun_cocos2d_ui_WebView_loadHTMLString$2(L); // } } if (num_args == 2) { // if ((olua_is_string(L, 2)) && (olua_is_string(L, 3))) { // void loadHTMLString(const std::string &string, @optional const std::string &baseURL) - return _cocos2d_ui_WebView_loadHTMLString$1(L); + return _olua_fun_cocos2d_ui_WebView_loadHTMLString$1(L); // } } @@ -6575,7 +6959,7 @@ static int _cocos2d_ui_WebView_loadHTMLString(lua_State *L) return 0; } -static int _cocos2d_ui_WebView_loadURL$1(lua_State *L) +static int _olua_fun_cocos2d_ui_WebView_loadURL$1(lua_State *L) { olua_startinvoke(L); @@ -6593,7 +6977,7 @@ static int _cocos2d_ui_WebView_loadURL$1(lua_State *L) return 0; } -static int _cocos2d_ui_WebView_loadURL$2(lua_State *L) +static int _olua_fun_cocos2d_ui_WebView_loadURL$2(lua_State *L) { olua_startinvoke(L); @@ -6613,21 +6997,21 @@ static int _cocos2d_ui_WebView_loadURL$2(lua_State *L) return 0; } -static int _cocos2d_ui_WebView_loadURL(lua_State *L) +static int _olua_fun_cocos2d_ui_WebView_loadURL(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_string(L, 2))) { // void loadURL(const std::string &url) - return _cocos2d_ui_WebView_loadURL$1(L); + return _olua_fun_cocos2d_ui_WebView_loadURL$1(L); // } } if (num_args == 2) { // if ((olua_is_string(L, 2)) && (olua_is_bool(L, 3))) { // void loadURL(const std::string &url, bool cleanCachedData) - return _cocos2d_ui_WebView_loadURL$2(L); + return _olua_fun_cocos2d_ui_WebView_loadURL$2(L); // } } @@ -6636,11 +7020,11 @@ static int _cocos2d_ui_WebView_loadURL(lua_State *L) return 0; } -static int _cocos2d_ui_WebView_new(lua_State *L) +static int _olua_fun_cocos2d_ui_WebView_new(lua_State *L) { olua_startinvoke(L); - // WebView() + // cocos2d::ui::WebView() cocos2d::ui::WebView *ret = new cocos2d::ui::WebView(); int num_ret = olua_push_object(L, ret, "ccui.WebView"); olua_postnew(L, ret); @@ -6650,7 +7034,7 @@ static int _cocos2d_ui_WebView_new(lua_State *L) return num_ret; } -static int _cocos2d_ui_WebView_reload(lua_State *L) +static int _olua_fun_cocos2d_ui_WebView_reload(lua_State *L) { olua_startinvoke(L); @@ -6666,7 +7050,7 @@ static int _cocos2d_ui_WebView_reload(lua_State *L) return 0; } -static int _cocos2d_ui_WebView_setBackgroundTransparent(lua_State *L) +static int _olua_fun_cocos2d_ui_WebView_setBackgroundTransparent(lua_State *L) { olua_startinvoke(L); @@ -6682,7 +7066,7 @@ static int _cocos2d_ui_WebView_setBackgroundTransparent(lua_State *L) return 0; } -static int _cocos2d_ui_WebView_setBounces(lua_State *L) +static int _olua_fun_cocos2d_ui_WebView_setBounces(lua_State *L) { olua_startinvoke(L); @@ -6700,7 +7084,7 @@ static int _cocos2d_ui_WebView_setBounces(lua_State *L) return 0; } -static int _cocos2d_ui_WebView_setJavascriptInterfaceScheme(lua_State *L) +static int _olua_fun_cocos2d_ui_WebView_setJavascriptInterfaceScheme(lua_State *L) { olua_startinvoke(L); @@ -6718,7 +7102,7 @@ static int _cocos2d_ui_WebView_setJavascriptInterfaceScheme(lua_State *L) return 0; } -static int _cocos2d_ui_WebView_setOnDidFailLoading(lua_State *L) +static int _olua_fun_cocos2d_ui_WebView_setOnDidFailLoading(lua_State *L) { olua_startinvoke(L); @@ -6734,16 +7118,17 @@ static int _cocos2d_ui_WebView_setOnDidFailLoading(lua_State *L) std::string cb_tag = "OnDidFailLoading"; std::string cb_name; if (olua_isfunction(L, 2)) { - cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](cocos2d::ui::WebView *arg1, const std::string &arg2) { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](cocos2d::ui::WebView *cb_arg1, const std::string &cb_arg2) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); if (olua_contextequal(L, cb_ctx)) { int top = lua_gettop(L); - olua_push_object(L, arg1, "ccui.WebView"); - olua_push_string(L, arg2); + olua_push_object(L, cb_arg1, "ccui.WebView"); + olua_push_string(L, cb_arg2); olua_callback(L, cb_store, cb_name.c_str(), 2); @@ -6763,7 +7148,7 @@ static int _cocos2d_ui_WebView_setOnDidFailLoading(lua_State *L) return 0; } -static int _cocos2d_ui_WebView_setOnDidFinishLoading(lua_State *L) +static int _olua_fun_cocos2d_ui_WebView_setOnDidFinishLoading(lua_State *L) { olua_startinvoke(L); @@ -6779,16 +7164,17 @@ static int _cocos2d_ui_WebView_setOnDidFinishLoading(lua_State *L) std::string cb_tag = "OnDidFinishLoading"; std::string cb_name; if (olua_isfunction(L, 2)) { - cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](cocos2d::ui::WebView *arg1, const std::string &arg2) { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](cocos2d::ui::WebView *cb_arg1, const std::string &cb_arg2) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); if (olua_contextequal(L, cb_ctx)) { int top = lua_gettop(L); - olua_push_object(L, arg1, "ccui.WebView"); - olua_push_string(L, arg2); + olua_push_object(L, cb_arg1, "ccui.WebView"); + olua_push_string(L, cb_arg2); olua_callback(L, cb_store, cb_name.c_str(), 2); @@ -6808,7 +7194,7 @@ static int _cocos2d_ui_WebView_setOnDidFinishLoading(lua_State *L) return 0; } -static int _cocos2d_ui_WebView_setOnJSCallback(lua_State *L) +static int _olua_fun_cocos2d_ui_WebView_setOnJSCallback(lua_State *L) { olua_startinvoke(L); @@ -6824,16 +7210,17 @@ static int _cocos2d_ui_WebView_setOnJSCallback(lua_State *L) std::string cb_tag = "OnJSCallback"; std::string cb_name; if (olua_isfunction(L, 2)) { - cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](cocos2d::ui::WebView *arg1, const std::string &arg2) { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](cocos2d::ui::WebView *cb_arg1, const std::string &cb_arg2) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); if (olua_contextequal(L, cb_ctx)) { int top = lua_gettop(L); - olua_push_object(L, arg1, "ccui.WebView"); - olua_push_string(L, arg2); + olua_push_object(L, cb_arg1, "ccui.WebView"); + olua_push_string(L, cb_arg2); olua_callback(L, cb_store, cb_name.c_str(), 2); @@ -6853,7 +7240,7 @@ static int _cocos2d_ui_WebView_setOnJSCallback(lua_State *L) return 0; } -static int _cocos2d_ui_WebView_setOnShouldStartLoading(lua_State *L) +static int _olua_fun_cocos2d_ui_WebView_setOnShouldStartLoading(lua_State *L) { olua_startinvoke(L); @@ -6869,16 +7256,17 @@ static int _cocos2d_ui_WebView_setOnShouldStartLoading(lua_State *L) std::string cb_tag = "OnShouldStartLoading"; std::string cb_name; if (olua_isfunction(L, 2)) { - cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](cocos2d::ui::WebView *arg1, const std::string &arg2) { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](cocos2d::ui::WebView *cb_arg1, const std::string &cb_arg2) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); bool ret = false; /** ret */ if (olua_contextequal(L, cb_ctx)) { int top = lua_gettop(L); - olua_push_object(L, arg1, "ccui.WebView"); - olua_push_string(L, arg2); + olua_push_object(L, cb_arg1, "ccui.WebView"); + olua_push_string(L, cb_arg2); olua_callback(L, cb_store, cb_name.c_str(), 2); @@ -6903,7 +7291,7 @@ static int _cocos2d_ui_WebView_setOnShouldStartLoading(lua_State *L) return 0; } -static int _cocos2d_ui_WebView_setOpacityWebView(lua_State *L) +static int _olua_fun_cocos2d_ui_WebView_setOpacityWebView(lua_State *L) { olua_startinvoke(L); @@ -6921,7 +7309,7 @@ static int _cocos2d_ui_WebView_setOpacityWebView(lua_State *L) return 0; } -static int _cocos2d_ui_WebView_setScalesPageToFit(lua_State *L) +static int _olua_fun_cocos2d_ui_WebView_setScalesPageToFit(lua_State *L) { olua_startinvoke(L); @@ -6939,7 +7327,7 @@ static int _cocos2d_ui_WebView_setScalesPageToFit(lua_State *L) return 0; } -static int _cocos2d_ui_WebView_stopLoading(lua_State *L) +static int _olua_fun_cocos2d_ui_WebView_stopLoading(lua_State *L) { olua_startinvoke(L); @@ -6955,51 +7343,59 @@ static int _cocos2d_ui_WebView_stopLoading(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ui_WebView(lua_State *L) +static int _olua_cls_ccui_WebView(lua_State *L) { oluacls_class(L, "ccui.WebView"); - oluacls_func(L, "canGoBack", _cocos2d_ui_WebView_canGoBack); - oluacls_func(L, "canGoForward", _cocos2d_ui_WebView_canGoForward); - oluacls_func(L, "create", _cocos2d_ui_WebView_create); - oluacls_func(L, "evaluateJS", _cocos2d_ui_WebView_evaluateJS); - oluacls_func(L, "getOnDidFailLoading", _cocos2d_ui_WebView_getOnDidFailLoading); - oluacls_func(L, "getOnDidFinishLoading", _cocos2d_ui_WebView_getOnDidFinishLoading); - oluacls_func(L, "getOnJSCallback", _cocos2d_ui_WebView_getOnJSCallback); - oluacls_func(L, "getOnShouldStartLoading", _cocos2d_ui_WebView_getOnShouldStartLoading); - oluacls_func(L, "getOpacityWebView", _cocos2d_ui_WebView_getOpacityWebView); - oluacls_func(L, "goBack", _cocos2d_ui_WebView_goBack); - oluacls_func(L, "goForward", _cocos2d_ui_WebView_goForward); - oluacls_func(L, "loadData", _cocos2d_ui_WebView_loadData); - oluacls_func(L, "loadFile", _cocos2d_ui_WebView_loadFile); - oluacls_func(L, "loadHTMLString", _cocos2d_ui_WebView_loadHTMLString); - oluacls_func(L, "loadURL", _cocos2d_ui_WebView_loadURL); - oluacls_func(L, "new", _cocos2d_ui_WebView_new); - oluacls_func(L, "reload", _cocos2d_ui_WebView_reload); - oluacls_func(L, "setBackgroundTransparent", _cocos2d_ui_WebView_setBackgroundTransparent); - oluacls_func(L, "setBounces", _cocos2d_ui_WebView_setBounces); - oluacls_func(L, "setJavascriptInterfaceScheme", _cocos2d_ui_WebView_setJavascriptInterfaceScheme); - oluacls_func(L, "setOnDidFailLoading", _cocos2d_ui_WebView_setOnDidFailLoading); - oluacls_func(L, "setOnDidFinishLoading", _cocos2d_ui_WebView_setOnDidFinishLoading); - oluacls_func(L, "setOnJSCallback", _cocos2d_ui_WebView_setOnJSCallback); - oluacls_func(L, "setOnShouldStartLoading", _cocos2d_ui_WebView_setOnShouldStartLoading); - oluacls_func(L, "setOpacityWebView", _cocos2d_ui_WebView_setOpacityWebView); - oluacls_func(L, "setScalesPageToFit", _cocos2d_ui_WebView_setScalesPageToFit); - oluacls_func(L, "stopLoading", _cocos2d_ui_WebView_stopLoading); - oluacls_prop(L, "onDidFailLoading", _cocos2d_ui_WebView_getOnDidFailLoading, _cocos2d_ui_WebView_setOnDidFailLoading); - oluacls_prop(L, "onDidFinishLoading", _cocos2d_ui_WebView_getOnDidFinishLoading, _cocos2d_ui_WebView_setOnDidFinishLoading); - oluacls_prop(L, "onJSCallback", _cocos2d_ui_WebView_getOnJSCallback, _cocos2d_ui_WebView_setOnJSCallback); - oluacls_prop(L, "onShouldStartLoading", _cocos2d_ui_WebView_getOnShouldStartLoading, _cocos2d_ui_WebView_setOnShouldStartLoading); - oluacls_prop(L, "opacityWebView", _cocos2d_ui_WebView_getOpacityWebView, _cocos2d_ui_WebView_setOpacityWebView); + oluacls_func(L, "canGoBack", _olua_fun_cocos2d_ui_WebView_canGoBack); + oluacls_func(L, "canGoForward", _olua_fun_cocos2d_ui_WebView_canGoForward); + oluacls_func(L, "create", _olua_fun_cocos2d_ui_WebView_create); + oluacls_func(L, "evaluateJS", _olua_fun_cocos2d_ui_WebView_evaluateJS); + oluacls_func(L, "getOnDidFailLoading", _olua_fun_cocos2d_ui_WebView_getOnDidFailLoading); + oluacls_func(L, "getOnDidFinishLoading", _olua_fun_cocos2d_ui_WebView_getOnDidFinishLoading); + oluacls_func(L, "getOnJSCallback", _olua_fun_cocos2d_ui_WebView_getOnJSCallback); + oluacls_func(L, "getOnShouldStartLoading", _olua_fun_cocos2d_ui_WebView_getOnShouldStartLoading); + oluacls_func(L, "getOpacityWebView", _olua_fun_cocos2d_ui_WebView_getOpacityWebView); + oluacls_func(L, "goBack", _olua_fun_cocos2d_ui_WebView_goBack); + oluacls_func(L, "goForward", _olua_fun_cocos2d_ui_WebView_goForward); + oluacls_func(L, "loadData", _olua_fun_cocos2d_ui_WebView_loadData); + oluacls_func(L, "loadFile", _olua_fun_cocos2d_ui_WebView_loadFile); + oluacls_func(L, "loadHTMLString", _olua_fun_cocos2d_ui_WebView_loadHTMLString); + oluacls_func(L, "loadURL", _olua_fun_cocos2d_ui_WebView_loadURL); + oluacls_func(L, "new", _olua_fun_cocos2d_ui_WebView_new); + oluacls_func(L, "reload", _olua_fun_cocos2d_ui_WebView_reload); + oluacls_func(L, "setBackgroundTransparent", _olua_fun_cocos2d_ui_WebView_setBackgroundTransparent); + oluacls_func(L, "setBounces", _olua_fun_cocos2d_ui_WebView_setBounces); + oluacls_func(L, "setJavascriptInterfaceScheme", _olua_fun_cocos2d_ui_WebView_setJavascriptInterfaceScheme); + oluacls_func(L, "setOnDidFailLoading", _olua_fun_cocos2d_ui_WebView_setOnDidFailLoading); + oluacls_func(L, "setOnDidFinishLoading", _olua_fun_cocos2d_ui_WebView_setOnDidFinishLoading); + oluacls_func(L, "setOnJSCallback", _olua_fun_cocos2d_ui_WebView_setOnJSCallback); + oluacls_func(L, "setOnShouldStartLoading", _olua_fun_cocos2d_ui_WebView_setOnShouldStartLoading); + oluacls_func(L, "setOpacityWebView", _olua_fun_cocos2d_ui_WebView_setOpacityWebView); + oluacls_func(L, "setScalesPageToFit", _olua_fun_cocos2d_ui_WebView_setScalesPageToFit); + oluacls_func(L, "stopLoading", _olua_fun_cocos2d_ui_WebView_stopLoading); + oluacls_prop(L, "onDidFailLoading", _olua_fun_cocos2d_ui_WebView_getOnDidFailLoading, _olua_fun_cocos2d_ui_WebView_setOnDidFailLoading); + oluacls_prop(L, "onDidFinishLoading", _olua_fun_cocos2d_ui_WebView_getOnDidFinishLoading, _olua_fun_cocos2d_ui_WebView_setOnDidFinishLoading); + oluacls_prop(L, "onJSCallback", _olua_fun_cocos2d_ui_WebView_getOnJSCallback, _olua_fun_cocos2d_ui_WebView_setOnJSCallback); + oluacls_prop(L, "onShouldStartLoading", _olua_fun_cocos2d_ui_WebView_getOnShouldStartLoading, _olua_fun_cocos2d_ui_WebView_setOnShouldStartLoading); + oluacls_prop(L, "opacityWebView", _olua_fun_cocos2d_ui_WebView_getOpacityWebView, _olua_fun_cocos2d_ui_WebView_setOpacityWebView); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccui_WebView(lua_State *L) +{ + olua_require(L, "cocos2d_ui", luaopen_cocos2d_ui); + if (!olua_getclass(L, "ccui.WebView")) { + luaL_error(L, "class not found: cocos2d::ui::WebView"); + } return 1; } OLUA_END_DECLS #endif #if defined(CCLUA_OS_IOS) || defined(CCLUA_OS_ANDROID) -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ui_VideoPlayer_EventType(lua_State *L) +static int _olua_cls_ccui_VideoPlayer_EventType(lua_State *L) { oluacls_class(L, "ccui.VideoPlayer.EventType"); oluacls_func(L, "__index", olua_indexerror); @@ -7012,11 +7408,21 @@ OLUA_LIB int luaopen_cocos2d_ui_VideoPlayer_EventType(lua_State *L) return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccui_VideoPlayer_EventType(lua_State *L) +{ + olua_require(L, "cocos2d_ui", luaopen_cocos2d_ui); + if (!olua_getclass(L, "ccui.VideoPlayer.EventType")) { + luaL_error(L, "class not found: cocos2d::ui::VideoPlayer::EventType"); + } + return 1; +} OLUA_END_DECLS #endif #if defined(CCLUA_OS_IOS) || defined(CCLUA_OS_ANDROID) -static int _cocos2d_ui_VideoPlayer_ccVideoPlayerCallback___call(lua_State *L) +static int _olua_fun_cocos2d_ui_VideoPlayer_ccVideoPlayerCallback___call(lua_State *L) { olua_startinvoke(L); @@ -7028,20 +7434,28 @@ static int _cocos2d_ui_VideoPlayer_ccVideoPlayerCallback___call(lua_State *L) return 1; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ui_VideoPlayer_ccVideoPlayerCallback(lua_State *L) +static int _olua_cls_ccui_VideoPlayer_ccVideoPlayerCallback(lua_State *L) { oluacls_class(L, "ccui.VideoPlayer.ccVideoPlayerCallback"); - oluacls_func(L, "__call", _cocos2d_ui_VideoPlayer_ccVideoPlayerCallback___call); + oluacls_func(L, "__call", _olua_fun_cocos2d_ui_VideoPlayer_ccVideoPlayerCallback___call); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccui_VideoPlayer_ccVideoPlayerCallback(lua_State *L) +{ + olua_require(L, "cocos2d_ui", luaopen_cocos2d_ui); + if (!olua_getclass(L, "ccui.VideoPlayer.ccVideoPlayerCallback")) { + luaL_error(L, "class not found: cocos2d::ui::VideoPlayer::ccVideoPlayerCallback"); + } + return 1; +} OLUA_END_DECLS #endif #if defined(CCLUA_OS_IOS) || defined(CCLUA_OS_ANDROID) -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ui_VideoPlayer_StyleType(lua_State *L) +static int _olua_cls_ccui_VideoPlayer_StyleType(lua_State *L) { oluacls_class(L, "ccui.VideoPlayer.StyleType"); oluacls_func(L, "__index", olua_indexerror); @@ -7051,11 +7465,21 @@ OLUA_LIB int luaopen_cocos2d_ui_VideoPlayer_StyleType(lua_State *L) return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccui_VideoPlayer_StyleType(lua_State *L) +{ + olua_require(L, "cocos2d_ui", luaopen_cocos2d_ui); + if (!olua_getclass(L, "ccui.VideoPlayer.StyleType")) { + luaL_error(L, "class not found: cocos2d::ui::VideoPlayer::StyleType"); + } + return 1; +} OLUA_END_DECLS #endif #if defined(CCLUA_OS_IOS) || defined(CCLUA_OS_ANDROID) -static int _cocos2d_ui_VideoPlayer_addEventListener(lua_State *L) +static int _olua_fun_cocos2d_ui_VideoPlayer_addEventListener(lua_State *L) { olua_startinvoke(L); @@ -7067,16 +7491,17 @@ static int _cocos2d_ui_VideoPlayer_addEventListener(lua_State *L) void *cb_store = (void *)self; std::string cb_tag = "videoPlayerCallback"; - std::string cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + std::string cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](cocos2d::Ref *arg1, cocos2d::ui::VideoPlayer::EventType arg2) { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](cocos2d::Ref *cb_arg1, cocos2d::ui::VideoPlayer::EventType cb_arg2) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); if (olua_contextequal(L, cb_ctx)) { int top = lua_gettop(L); - olua_push_object(L, arg1, "cc.Ref"); - olua_push_enum(L, arg2); + olua_push_object(L, cb_arg1, "cc.Ref"); + olua_push_enum(L, cb_arg2); olua_callback(L, cb_store, cb_name.c_str(), 2); @@ -7092,7 +7517,7 @@ static int _cocos2d_ui_VideoPlayer_addEventListener(lua_State *L) return 0; } -static int _cocos2d_ui_VideoPlayer_create(lua_State *L) +static int _olua_fun_cocos2d_ui_VideoPlayer_create(lua_State *L) { olua_startinvoke(L); @@ -7105,7 +7530,7 @@ static int _cocos2d_ui_VideoPlayer_create(lua_State *L) return num_ret; } -static int _cocos2d_ui_VideoPlayer_getFileName(lua_State *L) +static int _olua_fun_cocos2d_ui_VideoPlayer_getFileName(lua_State *L) { olua_startinvoke(L); @@ -7122,7 +7547,7 @@ static int _cocos2d_ui_VideoPlayer_getFileName(lua_State *L) return num_ret; } -static int _cocos2d_ui_VideoPlayer_getURL(lua_State *L) +static int _olua_fun_cocos2d_ui_VideoPlayer_getURL(lua_State *L) { olua_startinvoke(L); @@ -7139,7 +7564,7 @@ static int _cocos2d_ui_VideoPlayer_getURL(lua_State *L) return num_ret; } -static int _cocos2d_ui_VideoPlayer_isFullScreenEnabled(lua_State *L) +static int _olua_fun_cocos2d_ui_VideoPlayer_isFullScreenEnabled(lua_State *L) { olua_startinvoke(L); @@ -7156,7 +7581,7 @@ static int _cocos2d_ui_VideoPlayer_isFullScreenEnabled(lua_State *L) return num_ret; } -static int _cocos2d_ui_VideoPlayer_isKeepAspectRatioEnabled(lua_State *L) +static int _olua_fun_cocos2d_ui_VideoPlayer_isKeepAspectRatioEnabled(lua_State *L) { olua_startinvoke(L); @@ -7173,7 +7598,7 @@ static int _cocos2d_ui_VideoPlayer_isKeepAspectRatioEnabled(lua_State *L) return num_ret; } -static int _cocos2d_ui_VideoPlayer_isLooping(lua_State *L) +static int _olua_fun_cocos2d_ui_VideoPlayer_isLooping(lua_State *L) { olua_startinvoke(L); @@ -7190,7 +7615,7 @@ static int _cocos2d_ui_VideoPlayer_isLooping(lua_State *L) return num_ret; } -static int _cocos2d_ui_VideoPlayer_isPlaying(lua_State *L) +static int _olua_fun_cocos2d_ui_VideoPlayer_isPlaying(lua_State *L) { olua_startinvoke(L); @@ -7207,7 +7632,7 @@ static int _cocos2d_ui_VideoPlayer_isPlaying(lua_State *L) return num_ret; } -static int _cocos2d_ui_VideoPlayer_isUserInputEnabled(lua_State *L) +static int _olua_fun_cocos2d_ui_VideoPlayer_isUserInputEnabled(lua_State *L) { olua_startinvoke(L); @@ -7224,11 +7649,11 @@ static int _cocos2d_ui_VideoPlayer_isUserInputEnabled(lua_State *L) return num_ret; } -static int _cocos2d_ui_VideoPlayer_new(lua_State *L) +static int _olua_fun_cocos2d_ui_VideoPlayer_new(lua_State *L) { olua_startinvoke(L); - // VideoPlayer() + // cocos2d::ui::VideoPlayer() cocos2d::ui::VideoPlayer *ret = new cocos2d::ui::VideoPlayer(); int num_ret = olua_push_object(L, ret, "ccui.VideoPlayer"); olua_postnew(L, ret); @@ -7238,7 +7663,7 @@ static int _cocos2d_ui_VideoPlayer_new(lua_State *L) return num_ret; } -static int _cocos2d_ui_VideoPlayer_onPlayEvent(lua_State *L) +static int _olua_fun_cocos2d_ui_VideoPlayer_onPlayEvent(lua_State *L) { olua_startinvoke(L); @@ -7256,7 +7681,7 @@ static int _cocos2d_ui_VideoPlayer_onPlayEvent(lua_State *L) return 0; } -static int _cocos2d_ui_VideoPlayer_play(lua_State *L) +static int _olua_fun_cocos2d_ui_VideoPlayer_play(lua_State *L) { olua_startinvoke(L); @@ -7272,7 +7697,7 @@ static int _cocos2d_ui_VideoPlayer_play(lua_State *L) return 0; } -static int _cocos2d_ui_VideoPlayer_seekTo(lua_State *L) +static int _olua_fun_cocos2d_ui_VideoPlayer_seekTo(lua_State *L) { olua_startinvoke(L); @@ -7290,7 +7715,7 @@ static int _cocos2d_ui_VideoPlayer_seekTo(lua_State *L) return 0; } -static int _cocos2d_ui_VideoPlayer_setFileName(lua_State *L) +static int _olua_fun_cocos2d_ui_VideoPlayer_setFileName(lua_State *L) { olua_startinvoke(L); @@ -7308,7 +7733,7 @@ static int _cocos2d_ui_VideoPlayer_setFileName(lua_State *L) return 0; } -static int _cocos2d_ui_VideoPlayer_setFullScreenEnabled(lua_State *L) +static int _olua_fun_cocos2d_ui_VideoPlayer_setFullScreenEnabled(lua_State *L) { olua_startinvoke(L); @@ -7326,7 +7751,7 @@ static int _cocos2d_ui_VideoPlayer_setFullScreenEnabled(lua_State *L) return 0; } -static int _cocos2d_ui_VideoPlayer_setKeepAspectRatioEnabled(lua_State *L) +static int _olua_fun_cocos2d_ui_VideoPlayer_setKeepAspectRatioEnabled(lua_State *L) { olua_startinvoke(L); @@ -7344,7 +7769,7 @@ static int _cocos2d_ui_VideoPlayer_setKeepAspectRatioEnabled(lua_State *L) return 0; } -static int _cocos2d_ui_VideoPlayer_setLooping(lua_State *L) +static int _olua_fun_cocos2d_ui_VideoPlayer_setLooping(lua_State *L) { olua_startinvoke(L); @@ -7362,7 +7787,7 @@ static int _cocos2d_ui_VideoPlayer_setLooping(lua_State *L) return 0; } -static int _cocos2d_ui_VideoPlayer_setStyle(lua_State *L) +static int _olua_fun_cocos2d_ui_VideoPlayer_setStyle(lua_State *L) { olua_startinvoke(L); @@ -7380,7 +7805,7 @@ static int _cocos2d_ui_VideoPlayer_setStyle(lua_State *L) return 0; } -static int _cocos2d_ui_VideoPlayer_setURL(lua_State *L) +static int _olua_fun_cocos2d_ui_VideoPlayer_setURL(lua_State *L) { olua_startinvoke(L); @@ -7398,7 +7823,7 @@ static int _cocos2d_ui_VideoPlayer_setURL(lua_State *L) return 0; } -static int _cocos2d_ui_VideoPlayer_setUserInputEnabled(lua_State *L) +static int _olua_fun_cocos2d_ui_VideoPlayer_setUserInputEnabled(lua_State *L) { olua_startinvoke(L); @@ -7416,7 +7841,7 @@ static int _cocos2d_ui_VideoPlayer_setUserInputEnabled(lua_State *L) return 0; } -static int _cocos2d_ui_VideoPlayer_stop(lua_State *L) +static int _olua_fun_cocos2d_ui_VideoPlayer_stop(lua_State *L) { olua_startinvoke(L); @@ -7432,45 +7857,54 @@ static int _cocos2d_ui_VideoPlayer_stop(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ui_VideoPlayer(lua_State *L) +static int _olua_cls_ccui_VideoPlayer(lua_State *L) { oluacls_class(L, "ccui.VideoPlayer"); - oluacls_func(L, "addEventListener", _cocos2d_ui_VideoPlayer_addEventListener); - oluacls_func(L, "create", _cocos2d_ui_VideoPlayer_create); - oluacls_func(L, "getFileName", _cocos2d_ui_VideoPlayer_getFileName); - oluacls_func(L, "getURL", _cocos2d_ui_VideoPlayer_getURL); - oluacls_func(L, "isFullScreenEnabled", _cocos2d_ui_VideoPlayer_isFullScreenEnabled); - oluacls_func(L, "isKeepAspectRatioEnabled", _cocos2d_ui_VideoPlayer_isKeepAspectRatioEnabled); - oluacls_func(L, "isLooping", _cocos2d_ui_VideoPlayer_isLooping); - oluacls_func(L, "isPlaying", _cocos2d_ui_VideoPlayer_isPlaying); - oluacls_func(L, "isUserInputEnabled", _cocos2d_ui_VideoPlayer_isUserInputEnabled); - oluacls_func(L, "new", _cocos2d_ui_VideoPlayer_new); - oluacls_func(L, "onPlayEvent", _cocos2d_ui_VideoPlayer_onPlayEvent); - oluacls_func(L, "play", _cocos2d_ui_VideoPlayer_play); - oluacls_func(L, "seekTo", _cocos2d_ui_VideoPlayer_seekTo); - oluacls_func(L, "setFileName", _cocos2d_ui_VideoPlayer_setFileName); - oluacls_func(L, "setFullScreenEnabled", _cocos2d_ui_VideoPlayer_setFullScreenEnabled); - oluacls_func(L, "setKeepAspectRatioEnabled", _cocos2d_ui_VideoPlayer_setKeepAspectRatioEnabled); - oluacls_func(L, "setLooping", _cocos2d_ui_VideoPlayer_setLooping); - oluacls_func(L, "setStyle", _cocos2d_ui_VideoPlayer_setStyle); - oluacls_func(L, "setURL", _cocos2d_ui_VideoPlayer_setURL); - oluacls_func(L, "setUserInputEnabled", _cocos2d_ui_VideoPlayer_setUserInputEnabled); - oluacls_func(L, "stop", _cocos2d_ui_VideoPlayer_stop); - oluacls_prop(L, "fileName", _cocos2d_ui_VideoPlayer_getFileName, _cocos2d_ui_VideoPlayer_setFileName); - oluacls_prop(L, "fullScreenEnabled", _cocos2d_ui_VideoPlayer_isFullScreenEnabled, _cocos2d_ui_VideoPlayer_setFullScreenEnabled); - oluacls_prop(L, "keepAspectRatioEnabled", _cocos2d_ui_VideoPlayer_isKeepAspectRatioEnabled, _cocos2d_ui_VideoPlayer_setKeepAspectRatioEnabled); - oluacls_prop(L, "looping", _cocos2d_ui_VideoPlayer_isLooping, _cocos2d_ui_VideoPlayer_setLooping); - oluacls_prop(L, "playing", _cocos2d_ui_VideoPlayer_isPlaying, nullptr); - oluacls_prop(L, "url", _cocos2d_ui_VideoPlayer_getURL, _cocos2d_ui_VideoPlayer_setURL); - oluacls_prop(L, "userInputEnabled", _cocos2d_ui_VideoPlayer_isUserInputEnabled, _cocos2d_ui_VideoPlayer_setUserInputEnabled); + oluacls_func(L, "addEventListener", _olua_fun_cocos2d_ui_VideoPlayer_addEventListener); + oluacls_func(L, "create", _olua_fun_cocos2d_ui_VideoPlayer_create); + oluacls_func(L, "getFileName", _olua_fun_cocos2d_ui_VideoPlayer_getFileName); + oluacls_func(L, "getURL", _olua_fun_cocos2d_ui_VideoPlayer_getURL); + oluacls_func(L, "isFullScreenEnabled", _olua_fun_cocos2d_ui_VideoPlayer_isFullScreenEnabled); + oluacls_func(L, "isKeepAspectRatioEnabled", _olua_fun_cocos2d_ui_VideoPlayer_isKeepAspectRatioEnabled); + oluacls_func(L, "isLooping", _olua_fun_cocos2d_ui_VideoPlayer_isLooping); + oluacls_func(L, "isPlaying", _olua_fun_cocos2d_ui_VideoPlayer_isPlaying); + oluacls_func(L, "isUserInputEnabled", _olua_fun_cocos2d_ui_VideoPlayer_isUserInputEnabled); + oluacls_func(L, "new", _olua_fun_cocos2d_ui_VideoPlayer_new); + oluacls_func(L, "onPlayEvent", _olua_fun_cocos2d_ui_VideoPlayer_onPlayEvent); + oluacls_func(L, "play", _olua_fun_cocos2d_ui_VideoPlayer_play); + oluacls_func(L, "seekTo", _olua_fun_cocos2d_ui_VideoPlayer_seekTo); + oluacls_func(L, "setFileName", _olua_fun_cocos2d_ui_VideoPlayer_setFileName); + oluacls_func(L, "setFullScreenEnabled", _olua_fun_cocos2d_ui_VideoPlayer_setFullScreenEnabled); + oluacls_func(L, "setKeepAspectRatioEnabled", _olua_fun_cocos2d_ui_VideoPlayer_setKeepAspectRatioEnabled); + oluacls_func(L, "setLooping", _olua_fun_cocos2d_ui_VideoPlayer_setLooping); + oluacls_func(L, "setStyle", _olua_fun_cocos2d_ui_VideoPlayer_setStyle); + oluacls_func(L, "setURL", _olua_fun_cocos2d_ui_VideoPlayer_setURL); + oluacls_func(L, "setUserInputEnabled", _olua_fun_cocos2d_ui_VideoPlayer_setUserInputEnabled); + oluacls_func(L, "stop", _olua_fun_cocos2d_ui_VideoPlayer_stop); + oluacls_prop(L, "fileName", _olua_fun_cocos2d_ui_VideoPlayer_getFileName, _olua_fun_cocos2d_ui_VideoPlayer_setFileName); + oluacls_prop(L, "fullScreenEnabled", _olua_fun_cocos2d_ui_VideoPlayer_isFullScreenEnabled, _olua_fun_cocos2d_ui_VideoPlayer_setFullScreenEnabled); + oluacls_prop(L, "keepAspectRatioEnabled", _olua_fun_cocos2d_ui_VideoPlayer_isKeepAspectRatioEnabled, _olua_fun_cocos2d_ui_VideoPlayer_setKeepAspectRatioEnabled); + oluacls_prop(L, "looping", _olua_fun_cocos2d_ui_VideoPlayer_isLooping, _olua_fun_cocos2d_ui_VideoPlayer_setLooping); + oluacls_prop(L, "playing", _olua_fun_cocos2d_ui_VideoPlayer_isPlaying, nullptr); + oluacls_prop(L, "url", _olua_fun_cocos2d_ui_VideoPlayer_getURL, _olua_fun_cocos2d_ui_VideoPlayer_setURL); + oluacls_prop(L, "userInputEnabled", _olua_fun_cocos2d_ui_VideoPlayer_isUserInputEnabled, _olua_fun_cocos2d_ui_VideoPlayer_setUserInputEnabled); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccui_VideoPlayer(lua_State *L) +{ + olua_require(L, "cocos2d_ui", luaopen_cocos2d_ui); + if (!olua_getclass(L, "ccui.VideoPlayer")) { + luaL_error(L, "class not found: cocos2d::ui::VideoPlayer"); + } return 1; } OLUA_END_DECLS #endif -static int _cocos2d_ui_AbstractCheckButton_getBackDisabledFile(lua_State *L) +static int _olua_fun_cocos2d_ui_AbstractCheckButton_getBackDisabledFile(lua_State *L) { olua_startinvoke(L); @@ -7480,14 +7914,14 @@ static int _cocos2d_ui_AbstractCheckButton_getBackDisabledFile(lua_State *L) // cocos2d::ResourceData getBackDisabledFile() cocos2d::ResourceData ret = self->getBackDisabledFile(); - int num_ret = olua_pushcopy_object(L, ret, "cc.ResourceData"); + int num_ret = olua_copy_object(L, ret, "cc.ResourceData"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_ui_AbstractCheckButton_getBackNormalFile(lua_State *L) +static int _olua_fun_cocos2d_ui_AbstractCheckButton_getBackNormalFile(lua_State *L) { olua_startinvoke(L); @@ -7497,14 +7931,14 @@ static int _cocos2d_ui_AbstractCheckButton_getBackNormalFile(lua_State *L) // cocos2d::ResourceData getBackNormalFile() cocos2d::ResourceData ret = self->getBackNormalFile(); - int num_ret = olua_pushcopy_object(L, ret, "cc.ResourceData"); + int num_ret = olua_copy_object(L, ret, "cc.ResourceData"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_ui_AbstractCheckButton_getBackPressedFile(lua_State *L) +static int _olua_fun_cocos2d_ui_AbstractCheckButton_getBackPressedFile(lua_State *L) { olua_startinvoke(L); @@ -7514,14 +7948,14 @@ static int _cocos2d_ui_AbstractCheckButton_getBackPressedFile(lua_State *L) // cocos2d::ResourceData getBackPressedFile() cocos2d::ResourceData ret = self->getBackPressedFile(); - int num_ret = olua_pushcopy_object(L, ret, "cc.ResourceData"); + int num_ret = olua_copy_object(L, ret, "cc.ResourceData"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_ui_AbstractCheckButton_getCrossDisabledFile(lua_State *L) +static int _olua_fun_cocos2d_ui_AbstractCheckButton_getCrossDisabledFile(lua_State *L) { olua_startinvoke(L); @@ -7531,14 +7965,14 @@ static int _cocos2d_ui_AbstractCheckButton_getCrossDisabledFile(lua_State *L) // cocos2d::ResourceData getCrossDisabledFile() cocos2d::ResourceData ret = self->getCrossDisabledFile(); - int num_ret = olua_pushcopy_object(L, ret, "cc.ResourceData"); + int num_ret = olua_copy_object(L, ret, "cc.ResourceData"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_ui_AbstractCheckButton_getCrossNormalFile(lua_State *L) +static int _olua_fun_cocos2d_ui_AbstractCheckButton_getCrossNormalFile(lua_State *L) { olua_startinvoke(L); @@ -7548,14 +7982,14 @@ static int _cocos2d_ui_AbstractCheckButton_getCrossNormalFile(lua_State *L) // cocos2d::ResourceData getCrossNormalFile() cocos2d::ResourceData ret = self->getCrossNormalFile(); - int num_ret = olua_pushcopy_object(L, ret, "cc.ResourceData"); + int num_ret = olua_copy_object(L, ret, "cc.ResourceData"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_ui_AbstractCheckButton_getRendererBackground(lua_State *L) +static int _olua_fun_cocos2d_ui_AbstractCheckButton_getRendererBackground(lua_State *L) { olua_startinvoke(L); @@ -7575,7 +8009,7 @@ static int _cocos2d_ui_AbstractCheckButton_getRendererBackground(lua_State *L) return num_ret; } -static int _cocos2d_ui_AbstractCheckButton_getRendererBackgroundDisabled(lua_State *L) +static int _olua_fun_cocos2d_ui_AbstractCheckButton_getRendererBackgroundDisabled(lua_State *L) { olua_startinvoke(L); @@ -7595,7 +8029,7 @@ static int _cocos2d_ui_AbstractCheckButton_getRendererBackgroundDisabled(lua_Sta return num_ret; } -static int _cocos2d_ui_AbstractCheckButton_getRendererBackgroundSelected(lua_State *L) +static int _olua_fun_cocos2d_ui_AbstractCheckButton_getRendererBackgroundSelected(lua_State *L) { olua_startinvoke(L); @@ -7615,7 +8049,7 @@ static int _cocos2d_ui_AbstractCheckButton_getRendererBackgroundSelected(lua_Sta return num_ret; } -static int _cocos2d_ui_AbstractCheckButton_getRendererFrontCross(lua_State *L) +static int _olua_fun_cocos2d_ui_AbstractCheckButton_getRendererFrontCross(lua_State *L) { olua_startinvoke(L); @@ -7635,7 +8069,7 @@ static int _cocos2d_ui_AbstractCheckButton_getRendererFrontCross(lua_State *L) return num_ret; } -static int _cocos2d_ui_AbstractCheckButton_getRendererFrontCrossDisabled(lua_State *L) +static int _olua_fun_cocos2d_ui_AbstractCheckButton_getRendererFrontCrossDisabled(lua_State *L) { olua_startinvoke(L); @@ -7655,7 +8089,7 @@ static int _cocos2d_ui_AbstractCheckButton_getRendererFrontCrossDisabled(lua_Sta return num_ret; } -static int _cocos2d_ui_AbstractCheckButton_getZoomScale(lua_State *L) +static int _olua_fun_cocos2d_ui_AbstractCheckButton_getZoomScale(lua_State *L) { olua_startinvoke(L); @@ -7672,7 +8106,7 @@ static int _cocos2d_ui_AbstractCheckButton_getZoomScale(lua_State *L) return num_ret; } -static int _cocos2d_ui_AbstractCheckButton_init$1(lua_State *L) +static int _olua_fun_cocos2d_ui_AbstractCheckButton_init$1(lua_State *L) { olua_startinvoke(L); @@ -7689,7 +8123,7 @@ static int _cocos2d_ui_AbstractCheckButton_init$1(lua_State *L) return num_ret; } -static int _cocos2d_ui_AbstractCheckButton_init$2(lua_State *L) +static int _olua_fun_cocos2d_ui_AbstractCheckButton_init$2(lua_State *L) { olua_startinvoke(L); @@ -7718,7 +8152,7 @@ static int _cocos2d_ui_AbstractCheckButton_init$2(lua_State *L) return num_ret; } -static int _cocos2d_ui_AbstractCheckButton_init$3(lua_State *L) +static int _olua_fun_cocos2d_ui_AbstractCheckButton_init$3(lua_State *L) { olua_startinvoke(L); @@ -7736,7 +8170,7 @@ static int _cocos2d_ui_AbstractCheckButton_init$3(lua_State *L) olua_check_string(L, 5, &arg4); olua_check_string(L, 6, &arg5); - // bool init(const std::string &backGround, const std::string &backGroundSelected, const std::string &cross, const std::string &backGroundDisabled, const std::string &frontCrossDisabled, @optional cocos2d::ui::Widget::TextureResType texType) + // bool init(const std::string &backGround, const std::string &backGroundSelected, const std::string &cross, const std::string &backGroundDisabled, const std::string &frontCrossDisabled) bool ret = self->init(arg1, arg2, arg3, arg4, arg5); int num_ret = olua_push_bool(L, ret); @@ -7745,26 +8179,26 @@ static int _cocos2d_ui_AbstractCheckButton_init$3(lua_State *L) return num_ret; } -static int _cocos2d_ui_AbstractCheckButton_init(lua_State *L) +static int _olua_fun_cocos2d_ui_AbstractCheckButton_init(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 0) { // @using bool init() - return _cocos2d_ui_AbstractCheckButton_init$1(L); + return _olua_fun_cocos2d_ui_AbstractCheckButton_init$1(L); } if (num_args == 5) { // if ((olua_is_string(L, 2)) && (olua_is_string(L, 3)) && (olua_is_string(L, 4)) && (olua_is_string(L, 5)) && (olua_is_string(L, 6))) { - // bool init(const std::string &backGround, const std::string &backGroundSelected, const std::string &cross, const std::string &backGroundDisabled, const std::string &frontCrossDisabled, @optional cocos2d::ui::Widget::TextureResType texType) - return _cocos2d_ui_AbstractCheckButton_init$3(L); + // bool init(const std::string &backGround, const std::string &backGroundSelected, const std::string &cross, const std::string &backGroundDisabled, const std::string &frontCrossDisabled) + return _olua_fun_cocos2d_ui_AbstractCheckButton_init$3(L); // } } if (num_args == 6) { // if ((olua_is_string(L, 2)) && (olua_is_string(L, 3)) && (olua_is_string(L, 4)) && (olua_is_string(L, 5)) && (olua_is_string(L, 6)) && (olua_is_enum(L, 7))) { // bool init(const std::string &backGround, const std::string &backGroundSelected, const std::string &cross, const std::string &backGroundDisabled, const std::string &frontCrossDisabled, @optional cocos2d::ui::Widget::TextureResType texType) - return _cocos2d_ui_AbstractCheckButton_init$2(L); + return _olua_fun_cocos2d_ui_AbstractCheckButton_init$2(L); // } } @@ -7773,7 +8207,7 @@ static int _cocos2d_ui_AbstractCheckButton_init(lua_State *L) return 0; } -static int _cocos2d_ui_AbstractCheckButton_isSelected(lua_State *L) +static int _olua_fun_cocos2d_ui_AbstractCheckButton_isSelected(lua_State *L) { olua_startinvoke(L); @@ -7790,7 +8224,7 @@ static int _cocos2d_ui_AbstractCheckButton_isSelected(lua_State *L) return num_ret; } -static int _cocos2d_ui_AbstractCheckButton_loadTextureBackGround$1(lua_State *L) +static int _olua_fun_cocos2d_ui_AbstractCheckButton_loadTextureBackGround$1(lua_State *L) { olua_startinvoke(L); @@ -7810,7 +8244,7 @@ static int _cocos2d_ui_AbstractCheckButton_loadTextureBackGround$1(lua_State *L) return 0; } -static int _cocos2d_ui_AbstractCheckButton_loadTextureBackGround$2(lua_State *L) +static int _olua_fun_cocos2d_ui_AbstractCheckButton_loadTextureBackGround$2(lua_State *L) { olua_startinvoke(L); @@ -7820,7 +8254,7 @@ static int _cocos2d_ui_AbstractCheckButton_loadTextureBackGround$2(lua_State *L) olua_to_object(L, 1, &self, "ccui.AbstractCheckButton"); olua_check_string(L, 2, &arg1); - // void loadTextureBackGround(const std::string &backGround, @optional cocos2d::ui::Widget::TextureResType type) + // void loadTextureBackGround(const std::string &backGround) self->loadTextureBackGround(arg1); olua_endinvoke(L); @@ -7828,21 +8262,21 @@ static int _cocos2d_ui_AbstractCheckButton_loadTextureBackGround$2(lua_State *L) return 0; } -static int _cocos2d_ui_AbstractCheckButton_loadTextureBackGround(lua_State *L) +static int _olua_fun_cocos2d_ui_AbstractCheckButton_loadTextureBackGround(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_string(L, 2))) { - // void loadTextureBackGround(const std::string &backGround, @optional cocos2d::ui::Widget::TextureResType type) - return _cocos2d_ui_AbstractCheckButton_loadTextureBackGround$2(L); + // void loadTextureBackGround(const std::string &backGround) + return _olua_fun_cocos2d_ui_AbstractCheckButton_loadTextureBackGround$2(L); // } } if (num_args == 2) { // if ((olua_is_string(L, 2)) && (olua_is_enum(L, 3))) { // void loadTextureBackGround(const std::string &backGround, @optional cocos2d::ui::Widget::TextureResType type) - return _cocos2d_ui_AbstractCheckButton_loadTextureBackGround$1(L); + return _olua_fun_cocos2d_ui_AbstractCheckButton_loadTextureBackGround$1(L); // } } @@ -7851,7 +8285,7 @@ static int _cocos2d_ui_AbstractCheckButton_loadTextureBackGround(lua_State *L) return 0; } -static int _cocos2d_ui_AbstractCheckButton_loadTextureBackGroundDisabled$1(lua_State *L) +static int _olua_fun_cocos2d_ui_AbstractCheckButton_loadTextureBackGroundDisabled$1(lua_State *L) { olua_startinvoke(L); @@ -7871,7 +8305,7 @@ static int _cocos2d_ui_AbstractCheckButton_loadTextureBackGroundDisabled$1(lua_S return 0; } -static int _cocos2d_ui_AbstractCheckButton_loadTextureBackGroundDisabled$2(lua_State *L) +static int _olua_fun_cocos2d_ui_AbstractCheckButton_loadTextureBackGroundDisabled$2(lua_State *L) { olua_startinvoke(L); @@ -7881,7 +8315,7 @@ static int _cocos2d_ui_AbstractCheckButton_loadTextureBackGroundDisabled$2(lua_S olua_to_object(L, 1, &self, "ccui.AbstractCheckButton"); olua_check_string(L, 2, &arg1); - // void loadTextureBackGroundDisabled(const std::string &backGroundDisabled, @optional cocos2d::ui::Widget::TextureResType texType) + // void loadTextureBackGroundDisabled(const std::string &backGroundDisabled) self->loadTextureBackGroundDisabled(arg1); olua_endinvoke(L); @@ -7889,21 +8323,21 @@ static int _cocos2d_ui_AbstractCheckButton_loadTextureBackGroundDisabled$2(lua_S return 0; } -static int _cocos2d_ui_AbstractCheckButton_loadTextureBackGroundDisabled(lua_State *L) +static int _olua_fun_cocos2d_ui_AbstractCheckButton_loadTextureBackGroundDisabled(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_string(L, 2))) { - // void loadTextureBackGroundDisabled(const std::string &backGroundDisabled, @optional cocos2d::ui::Widget::TextureResType texType) - return _cocos2d_ui_AbstractCheckButton_loadTextureBackGroundDisabled$2(L); + // void loadTextureBackGroundDisabled(const std::string &backGroundDisabled) + return _olua_fun_cocos2d_ui_AbstractCheckButton_loadTextureBackGroundDisabled$2(L); // } } if (num_args == 2) { // if ((olua_is_string(L, 2)) && (olua_is_enum(L, 3))) { // void loadTextureBackGroundDisabled(const std::string &backGroundDisabled, @optional cocos2d::ui::Widget::TextureResType texType) - return _cocos2d_ui_AbstractCheckButton_loadTextureBackGroundDisabled$1(L); + return _olua_fun_cocos2d_ui_AbstractCheckButton_loadTextureBackGroundDisabled$1(L); // } } @@ -7912,7 +8346,7 @@ static int _cocos2d_ui_AbstractCheckButton_loadTextureBackGroundDisabled(lua_Sta return 0; } -static int _cocos2d_ui_AbstractCheckButton_loadTextureBackGroundSelected$1(lua_State *L) +static int _olua_fun_cocos2d_ui_AbstractCheckButton_loadTextureBackGroundSelected$1(lua_State *L) { olua_startinvoke(L); @@ -7932,7 +8366,7 @@ static int _cocos2d_ui_AbstractCheckButton_loadTextureBackGroundSelected$1(lua_S return 0; } -static int _cocos2d_ui_AbstractCheckButton_loadTextureBackGroundSelected$2(lua_State *L) +static int _olua_fun_cocos2d_ui_AbstractCheckButton_loadTextureBackGroundSelected$2(lua_State *L) { olua_startinvoke(L); @@ -7942,7 +8376,7 @@ static int _cocos2d_ui_AbstractCheckButton_loadTextureBackGroundSelected$2(lua_S olua_to_object(L, 1, &self, "ccui.AbstractCheckButton"); olua_check_string(L, 2, &arg1); - // void loadTextureBackGroundSelected(const std::string &backGroundSelected, @optional cocos2d::ui::Widget::TextureResType texType) + // void loadTextureBackGroundSelected(const std::string &backGroundSelected) self->loadTextureBackGroundSelected(arg1); olua_endinvoke(L); @@ -7950,21 +8384,21 @@ static int _cocos2d_ui_AbstractCheckButton_loadTextureBackGroundSelected$2(lua_S return 0; } -static int _cocos2d_ui_AbstractCheckButton_loadTextureBackGroundSelected(lua_State *L) +static int _olua_fun_cocos2d_ui_AbstractCheckButton_loadTextureBackGroundSelected(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_string(L, 2))) { - // void loadTextureBackGroundSelected(const std::string &backGroundSelected, @optional cocos2d::ui::Widget::TextureResType texType) - return _cocos2d_ui_AbstractCheckButton_loadTextureBackGroundSelected$2(L); + // void loadTextureBackGroundSelected(const std::string &backGroundSelected) + return _olua_fun_cocos2d_ui_AbstractCheckButton_loadTextureBackGroundSelected$2(L); // } } if (num_args == 2) { // if ((olua_is_string(L, 2)) && (olua_is_enum(L, 3))) { // void loadTextureBackGroundSelected(const std::string &backGroundSelected, @optional cocos2d::ui::Widget::TextureResType texType) - return _cocos2d_ui_AbstractCheckButton_loadTextureBackGroundSelected$1(L); + return _olua_fun_cocos2d_ui_AbstractCheckButton_loadTextureBackGroundSelected$1(L); // } } @@ -7973,7 +8407,7 @@ static int _cocos2d_ui_AbstractCheckButton_loadTextureBackGroundSelected(lua_Sta return 0; } -static int _cocos2d_ui_AbstractCheckButton_loadTextureFrontCross$1(lua_State *L) +static int _olua_fun_cocos2d_ui_AbstractCheckButton_loadTextureFrontCross$1(lua_State *L) { olua_startinvoke(L); @@ -7993,7 +8427,7 @@ static int _cocos2d_ui_AbstractCheckButton_loadTextureFrontCross$1(lua_State *L) return 0; } -static int _cocos2d_ui_AbstractCheckButton_loadTextureFrontCross$2(lua_State *L) +static int _olua_fun_cocos2d_ui_AbstractCheckButton_loadTextureFrontCross$2(lua_State *L) { olua_startinvoke(L); @@ -8003,7 +8437,7 @@ static int _cocos2d_ui_AbstractCheckButton_loadTextureFrontCross$2(lua_State *L) olua_to_object(L, 1, &self, "ccui.AbstractCheckButton"); olua_check_string(L, 2, &arg1); - // void loadTextureFrontCross(const std::string &crossTextureName, @optional cocos2d::ui::Widget::TextureResType texType) + // void loadTextureFrontCross(const std::string &crossTextureName) self->loadTextureFrontCross(arg1); olua_endinvoke(L); @@ -8011,21 +8445,21 @@ static int _cocos2d_ui_AbstractCheckButton_loadTextureFrontCross$2(lua_State *L) return 0; } -static int _cocos2d_ui_AbstractCheckButton_loadTextureFrontCross(lua_State *L) +static int _olua_fun_cocos2d_ui_AbstractCheckButton_loadTextureFrontCross(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_string(L, 2))) { - // void loadTextureFrontCross(const std::string &crossTextureName, @optional cocos2d::ui::Widget::TextureResType texType) - return _cocos2d_ui_AbstractCheckButton_loadTextureFrontCross$2(L); + // void loadTextureFrontCross(const std::string &crossTextureName) + return _olua_fun_cocos2d_ui_AbstractCheckButton_loadTextureFrontCross$2(L); // } } if (num_args == 2) { // if ((olua_is_string(L, 2)) && (olua_is_enum(L, 3))) { // void loadTextureFrontCross(const std::string &crossTextureName, @optional cocos2d::ui::Widget::TextureResType texType) - return _cocos2d_ui_AbstractCheckButton_loadTextureFrontCross$1(L); + return _olua_fun_cocos2d_ui_AbstractCheckButton_loadTextureFrontCross$1(L); // } } @@ -8034,7 +8468,7 @@ static int _cocos2d_ui_AbstractCheckButton_loadTextureFrontCross(lua_State *L) return 0; } -static int _cocos2d_ui_AbstractCheckButton_loadTextureFrontCrossDisabled$1(lua_State *L) +static int _olua_fun_cocos2d_ui_AbstractCheckButton_loadTextureFrontCrossDisabled$1(lua_State *L) { olua_startinvoke(L); @@ -8054,7 +8488,7 @@ static int _cocos2d_ui_AbstractCheckButton_loadTextureFrontCrossDisabled$1(lua_S return 0; } -static int _cocos2d_ui_AbstractCheckButton_loadTextureFrontCrossDisabled$2(lua_State *L) +static int _olua_fun_cocos2d_ui_AbstractCheckButton_loadTextureFrontCrossDisabled$2(lua_State *L) { olua_startinvoke(L); @@ -8064,7 +8498,7 @@ static int _cocos2d_ui_AbstractCheckButton_loadTextureFrontCrossDisabled$2(lua_S olua_to_object(L, 1, &self, "ccui.AbstractCheckButton"); olua_check_string(L, 2, &arg1); - // void loadTextureFrontCrossDisabled(const std::string &frontCrossDisabled, @optional cocos2d::ui::Widget::TextureResType texType) + // void loadTextureFrontCrossDisabled(const std::string &frontCrossDisabled) self->loadTextureFrontCrossDisabled(arg1); olua_endinvoke(L); @@ -8072,21 +8506,21 @@ static int _cocos2d_ui_AbstractCheckButton_loadTextureFrontCrossDisabled$2(lua_S return 0; } -static int _cocos2d_ui_AbstractCheckButton_loadTextureFrontCrossDisabled(lua_State *L) +static int _olua_fun_cocos2d_ui_AbstractCheckButton_loadTextureFrontCrossDisabled(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_string(L, 2))) { - // void loadTextureFrontCrossDisabled(const std::string &frontCrossDisabled, @optional cocos2d::ui::Widget::TextureResType texType) - return _cocos2d_ui_AbstractCheckButton_loadTextureFrontCrossDisabled$2(L); + // void loadTextureFrontCrossDisabled(const std::string &frontCrossDisabled) + return _olua_fun_cocos2d_ui_AbstractCheckButton_loadTextureFrontCrossDisabled$2(L); // } } if (num_args == 2) { // if ((olua_is_string(L, 2)) && (olua_is_enum(L, 3))) { // void loadTextureFrontCrossDisabled(const std::string &frontCrossDisabled, @optional cocos2d::ui::Widget::TextureResType texType) - return _cocos2d_ui_AbstractCheckButton_loadTextureFrontCrossDisabled$1(L); + return _olua_fun_cocos2d_ui_AbstractCheckButton_loadTextureFrontCrossDisabled$1(L); // } } @@ -8095,7 +8529,7 @@ static int _cocos2d_ui_AbstractCheckButton_loadTextureFrontCrossDisabled(lua_Sta return 0; } -static int _cocos2d_ui_AbstractCheckButton_loadTextures$1(lua_State *L) +static int _olua_fun_cocos2d_ui_AbstractCheckButton_loadTextures$1(lua_State *L) { olua_startinvoke(L); @@ -8123,7 +8557,7 @@ static int _cocos2d_ui_AbstractCheckButton_loadTextures$1(lua_State *L) return 0; } -static int _cocos2d_ui_AbstractCheckButton_loadTextures$2(lua_State *L) +static int _olua_fun_cocos2d_ui_AbstractCheckButton_loadTextures$2(lua_State *L) { olua_startinvoke(L); @@ -8141,7 +8575,7 @@ static int _cocos2d_ui_AbstractCheckButton_loadTextures$2(lua_State *L) olua_check_string(L, 5, &arg4); olua_check_string(L, 6, &arg5); - // void loadTextures(const std::string &background, const std::string &backgroundSelected, const std::string &cross, const std::string &backgroundDisabled, const std::string &frontCrossDisabled, @optional cocos2d::ui::Widget::TextureResType texType) + // void loadTextures(const std::string &background, const std::string &backgroundSelected, const std::string &cross, const std::string &backgroundDisabled, const std::string &frontCrossDisabled) self->loadTextures(arg1, arg2, arg3, arg4, arg5); olua_endinvoke(L); @@ -8149,21 +8583,21 @@ static int _cocos2d_ui_AbstractCheckButton_loadTextures$2(lua_State *L) return 0; } -static int _cocos2d_ui_AbstractCheckButton_loadTextures(lua_State *L) +static int _olua_fun_cocos2d_ui_AbstractCheckButton_loadTextures(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 5) { // if ((olua_is_string(L, 2)) && (olua_is_string(L, 3)) && (olua_is_string(L, 4)) && (olua_is_string(L, 5)) && (olua_is_string(L, 6))) { - // void loadTextures(const std::string &background, const std::string &backgroundSelected, const std::string &cross, const std::string &backgroundDisabled, const std::string &frontCrossDisabled, @optional cocos2d::ui::Widget::TextureResType texType) - return _cocos2d_ui_AbstractCheckButton_loadTextures$2(L); + // void loadTextures(const std::string &background, const std::string &backgroundSelected, const std::string &cross, const std::string &backgroundDisabled, const std::string &frontCrossDisabled) + return _olua_fun_cocos2d_ui_AbstractCheckButton_loadTextures$2(L); // } } if (num_args == 6) { // if ((olua_is_string(L, 2)) && (olua_is_string(L, 3)) && (olua_is_string(L, 4)) && (olua_is_string(L, 5)) && (olua_is_string(L, 6)) && (olua_is_enum(L, 7))) { // void loadTextures(const std::string &background, const std::string &backgroundSelected, const std::string &cross, const std::string &backgroundDisabled, const std::string &frontCrossDisabled, @optional cocos2d::ui::Widget::TextureResType texType) - return _cocos2d_ui_AbstractCheckButton_loadTextures$1(L); + return _olua_fun_cocos2d_ui_AbstractCheckButton_loadTextures$1(L); // } } @@ -8172,7 +8606,7 @@ static int _cocos2d_ui_AbstractCheckButton_loadTextures(lua_State *L) return 0; } -static int _cocos2d_ui_AbstractCheckButton_setSelected(lua_State *L) +static int _olua_fun_cocos2d_ui_AbstractCheckButton_setSelected(lua_State *L) { olua_startinvoke(L); @@ -8190,7 +8624,7 @@ static int _cocos2d_ui_AbstractCheckButton_setSelected(lua_State *L) return 0; } -static int _cocos2d_ui_AbstractCheckButton_setZoomScale(lua_State *L) +static int _olua_fun_cocos2d_ui_AbstractCheckButton_setZoomScale(lua_State *L) { olua_startinvoke(L); @@ -8208,50 +8642,58 @@ static int _cocos2d_ui_AbstractCheckButton_setZoomScale(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ui_AbstractCheckButton(lua_State *L) +static int _olua_cls_ccui_AbstractCheckButton(lua_State *L) { oluacls_class(L, "ccui.AbstractCheckButton"); - oluacls_func(L, "getBackDisabledFile", _cocos2d_ui_AbstractCheckButton_getBackDisabledFile); - oluacls_func(L, "getBackNormalFile", _cocos2d_ui_AbstractCheckButton_getBackNormalFile); - oluacls_func(L, "getBackPressedFile", _cocos2d_ui_AbstractCheckButton_getBackPressedFile); - oluacls_func(L, "getCrossDisabledFile", _cocos2d_ui_AbstractCheckButton_getCrossDisabledFile); - oluacls_func(L, "getCrossNormalFile", _cocos2d_ui_AbstractCheckButton_getCrossNormalFile); - oluacls_func(L, "getRendererBackground", _cocos2d_ui_AbstractCheckButton_getRendererBackground); - oluacls_func(L, "getRendererBackgroundDisabled", _cocos2d_ui_AbstractCheckButton_getRendererBackgroundDisabled); - oluacls_func(L, "getRendererBackgroundSelected", _cocos2d_ui_AbstractCheckButton_getRendererBackgroundSelected); - oluacls_func(L, "getRendererFrontCross", _cocos2d_ui_AbstractCheckButton_getRendererFrontCross); - oluacls_func(L, "getRendererFrontCrossDisabled", _cocos2d_ui_AbstractCheckButton_getRendererFrontCrossDisabled); - oluacls_func(L, "getZoomScale", _cocos2d_ui_AbstractCheckButton_getZoomScale); - oluacls_func(L, "init", _cocos2d_ui_AbstractCheckButton_init); - oluacls_func(L, "isSelected", _cocos2d_ui_AbstractCheckButton_isSelected); - oluacls_func(L, "loadTextureBackGround", _cocos2d_ui_AbstractCheckButton_loadTextureBackGround); - oluacls_func(L, "loadTextureBackGroundDisabled", _cocos2d_ui_AbstractCheckButton_loadTextureBackGroundDisabled); - oluacls_func(L, "loadTextureBackGroundSelected", _cocos2d_ui_AbstractCheckButton_loadTextureBackGroundSelected); - oluacls_func(L, "loadTextureFrontCross", _cocos2d_ui_AbstractCheckButton_loadTextureFrontCross); - oluacls_func(L, "loadTextureFrontCrossDisabled", _cocos2d_ui_AbstractCheckButton_loadTextureFrontCrossDisabled); - oluacls_func(L, "loadTextures", _cocos2d_ui_AbstractCheckButton_loadTextures); - oluacls_func(L, "setSelected", _cocos2d_ui_AbstractCheckButton_setSelected); - oluacls_func(L, "setZoomScale", _cocos2d_ui_AbstractCheckButton_setZoomScale); - oluacls_prop(L, "backDisabledFile", _cocos2d_ui_AbstractCheckButton_getBackDisabledFile, nullptr); - oluacls_prop(L, "backNormalFile", _cocos2d_ui_AbstractCheckButton_getBackNormalFile, nullptr); - oluacls_prop(L, "backPressedFile", _cocos2d_ui_AbstractCheckButton_getBackPressedFile, nullptr); - oluacls_prop(L, "crossDisabledFile", _cocos2d_ui_AbstractCheckButton_getCrossDisabledFile, nullptr); - oluacls_prop(L, "crossNormalFile", _cocos2d_ui_AbstractCheckButton_getCrossNormalFile, nullptr); - oluacls_prop(L, "rendererBackground", _cocos2d_ui_AbstractCheckButton_getRendererBackground, nullptr); - oluacls_prop(L, "rendererBackgroundDisabled", _cocos2d_ui_AbstractCheckButton_getRendererBackgroundDisabled, nullptr); - oluacls_prop(L, "rendererBackgroundSelected", _cocos2d_ui_AbstractCheckButton_getRendererBackgroundSelected, nullptr); - oluacls_prop(L, "rendererFrontCross", _cocos2d_ui_AbstractCheckButton_getRendererFrontCross, nullptr); - oluacls_prop(L, "rendererFrontCrossDisabled", _cocos2d_ui_AbstractCheckButton_getRendererFrontCrossDisabled, nullptr); - oluacls_prop(L, "selected", _cocos2d_ui_AbstractCheckButton_isSelected, _cocos2d_ui_AbstractCheckButton_setSelected); - oluacls_prop(L, "zoomScale", _cocos2d_ui_AbstractCheckButton_getZoomScale, _cocos2d_ui_AbstractCheckButton_setZoomScale); + oluacls_func(L, "getBackDisabledFile", _olua_fun_cocos2d_ui_AbstractCheckButton_getBackDisabledFile); + oluacls_func(L, "getBackNormalFile", _olua_fun_cocos2d_ui_AbstractCheckButton_getBackNormalFile); + oluacls_func(L, "getBackPressedFile", _olua_fun_cocos2d_ui_AbstractCheckButton_getBackPressedFile); + oluacls_func(L, "getCrossDisabledFile", _olua_fun_cocos2d_ui_AbstractCheckButton_getCrossDisabledFile); + oluacls_func(L, "getCrossNormalFile", _olua_fun_cocos2d_ui_AbstractCheckButton_getCrossNormalFile); + oluacls_func(L, "getRendererBackground", _olua_fun_cocos2d_ui_AbstractCheckButton_getRendererBackground); + oluacls_func(L, "getRendererBackgroundDisabled", _olua_fun_cocos2d_ui_AbstractCheckButton_getRendererBackgroundDisabled); + oluacls_func(L, "getRendererBackgroundSelected", _olua_fun_cocos2d_ui_AbstractCheckButton_getRendererBackgroundSelected); + oluacls_func(L, "getRendererFrontCross", _olua_fun_cocos2d_ui_AbstractCheckButton_getRendererFrontCross); + oluacls_func(L, "getRendererFrontCrossDisabled", _olua_fun_cocos2d_ui_AbstractCheckButton_getRendererFrontCrossDisabled); + oluacls_func(L, "getZoomScale", _olua_fun_cocos2d_ui_AbstractCheckButton_getZoomScale); + oluacls_func(L, "init", _olua_fun_cocos2d_ui_AbstractCheckButton_init); + oluacls_func(L, "isSelected", _olua_fun_cocos2d_ui_AbstractCheckButton_isSelected); + oluacls_func(L, "loadTextureBackGround", _olua_fun_cocos2d_ui_AbstractCheckButton_loadTextureBackGround); + oluacls_func(L, "loadTextureBackGroundDisabled", _olua_fun_cocos2d_ui_AbstractCheckButton_loadTextureBackGroundDisabled); + oluacls_func(L, "loadTextureBackGroundSelected", _olua_fun_cocos2d_ui_AbstractCheckButton_loadTextureBackGroundSelected); + oluacls_func(L, "loadTextureFrontCross", _olua_fun_cocos2d_ui_AbstractCheckButton_loadTextureFrontCross); + oluacls_func(L, "loadTextureFrontCrossDisabled", _olua_fun_cocos2d_ui_AbstractCheckButton_loadTextureFrontCrossDisabled); + oluacls_func(L, "loadTextures", _olua_fun_cocos2d_ui_AbstractCheckButton_loadTextures); + oluacls_func(L, "setSelected", _olua_fun_cocos2d_ui_AbstractCheckButton_setSelected); + oluacls_func(L, "setZoomScale", _olua_fun_cocos2d_ui_AbstractCheckButton_setZoomScale); + oluacls_prop(L, "backDisabledFile", _olua_fun_cocos2d_ui_AbstractCheckButton_getBackDisabledFile, nullptr); + oluacls_prop(L, "backNormalFile", _olua_fun_cocos2d_ui_AbstractCheckButton_getBackNormalFile, nullptr); + oluacls_prop(L, "backPressedFile", _olua_fun_cocos2d_ui_AbstractCheckButton_getBackPressedFile, nullptr); + oluacls_prop(L, "crossDisabledFile", _olua_fun_cocos2d_ui_AbstractCheckButton_getCrossDisabledFile, nullptr); + oluacls_prop(L, "crossNormalFile", _olua_fun_cocos2d_ui_AbstractCheckButton_getCrossNormalFile, nullptr); + oluacls_prop(L, "rendererBackground", _olua_fun_cocos2d_ui_AbstractCheckButton_getRendererBackground, nullptr); + oluacls_prop(L, "rendererBackgroundDisabled", _olua_fun_cocos2d_ui_AbstractCheckButton_getRendererBackgroundDisabled, nullptr); + oluacls_prop(L, "rendererBackgroundSelected", _olua_fun_cocos2d_ui_AbstractCheckButton_getRendererBackgroundSelected, nullptr); + oluacls_prop(L, "rendererFrontCross", _olua_fun_cocos2d_ui_AbstractCheckButton_getRendererFrontCross, nullptr); + oluacls_prop(L, "rendererFrontCrossDisabled", _olua_fun_cocos2d_ui_AbstractCheckButton_getRendererFrontCrossDisabled, nullptr); + oluacls_prop(L, "selected", _olua_fun_cocos2d_ui_AbstractCheckButton_isSelected, _olua_fun_cocos2d_ui_AbstractCheckButton_setSelected); + oluacls_prop(L, "zoomScale", _olua_fun_cocos2d_ui_AbstractCheckButton_getZoomScale, _olua_fun_cocos2d_ui_AbstractCheckButton_setZoomScale); return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ui_TabHeader_EventType(lua_State *L) +OLUA_LIB int luaopen_ccui_AbstractCheckButton(lua_State *L) +{ + olua_require(L, "cocos2d_ui", luaopen_cocos2d_ui); + if (!olua_getclass(L, "ccui.AbstractCheckButton")) { + luaL_error(L, "class not found: cocos2d::ui::AbstractCheckButton"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_ccui_TabHeader_EventType(lua_State *L) { oluacls_class(L, "ccui.TabHeader.EventType"); oluacls_func(L, "__index", olua_indexerror); @@ -8261,9 +8703,19 @@ OLUA_LIB int luaopen_cocos2d_ui_TabHeader_EventType(lua_State *L) return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccui_TabHeader_EventType(lua_State *L) +{ + olua_require(L, "cocos2d_ui", luaopen_cocos2d_ui); + if (!olua_getclass(L, "ccui.TabHeader.EventType")) { + luaL_error(L, "class not found: cocos2d::ui::TabHeader::EventType"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_ui_TabHeader_create$1(lua_State *L) +static int _olua_fun_cocos2d_ui_TabHeader_create$1(lua_State *L) { olua_startinvoke(L); @@ -8276,7 +8728,7 @@ static int _cocos2d_ui_TabHeader_create$1(lua_State *L) return num_ret; } -static int _cocos2d_ui_TabHeader_create$2(lua_State *L) +static int _olua_fun_cocos2d_ui_TabHeader_create$2(lua_State *L) { olua_startinvoke(L); @@ -8299,28 +8751,20 @@ static int _cocos2d_ui_TabHeader_create$2(lua_State *L) return num_ret; } -static int _cocos2d_ui_TabHeader_create$3(lua_State *L) +static int _olua_fun_cocos2d_ui_TabHeader_create$3(lua_State *L) { olua_startinvoke(L); std::string arg1; /** titleStr */ std::string arg2; /** backGround */ - std::string arg3; /** backGroundSelected */ - std::string arg4; /** cross */ - std::string arg5; /** backGroundDisabled */ - std::string arg6; /** frontCrossDisabled */ - cocos2d::ui::Widget::TextureResType arg7 = (cocos2d::ui::Widget::TextureResType)0; /** texType */ + std::string arg3; /** cross */ olua_check_string(L, 1, &arg1); olua_check_string(L, 2, &arg2); olua_check_string(L, 3, &arg3); - olua_check_string(L, 4, &arg4); - olua_check_string(L, 5, &arg5); - olua_check_string(L, 6, &arg6); - olua_check_enum(L, 7, &arg7); - // static cocos2d::ui::TabHeader *create(const std::string &titleStr, const std::string &backGround, const std::string &backGroundSelected, const std::string &cross, const std::string &backGroundDisabled, const std::string &frontCrossDisabled, @optional cocos2d::ui::Widget::TextureResType texType) - cocos2d::ui::TabHeader *ret = cocos2d::ui::TabHeader::create(arg1, arg2, arg3, arg4, arg5, arg6, arg7); + // static cocos2d::ui::TabHeader *create(const std::string &titleStr, const std::string &backGround, const std::string &cross) + cocos2d::ui::TabHeader *ret = cocos2d::ui::TabHeader::create(arg1, arg2, arg3); int num_ret = olua_push_object(L, ret, "ccui.TabHeader"); olua_endinvoke(L); @@ -8328,20 +8772,28 @@ static int _cocos2d_ui_TabHeader_create$3(lua_State *L) return num_ret; } -static int _cocos2d_ui_TabHeader_create$4(lua_State *L) +static int _olua_fun_cocos2d_ui_TabHeader_create$4(lua_State *L) { olua_startinvoke(L); std::string arg1; /** titleStr */ std::string arg2; /** backGround */ - std::string arg3; /** cross */ + std::string arg3; /** backGroundSelected */ + std::string arg4; /** cross */ + std::string arg5; /** backGroundDisabled */ + std::string arg6; /** frontCrossDisabled */ + cocos2d::ui::Widget::TextureResType arg7 = (cocos2d::ui::Widget::TextureResType)0; /** texType */ olua_check_string(L, 1, &arg1); olua_check_string(L, 2, &arg2); olua_check_string(L, 3, &arg3); + olua_check_string(L, 4, &arg4); + olua_check_string(L, 5, &arg5); + olua_check_string(L, 6, &arg6); + olua_check_enum(L, 7, &arg7); - // static cocos2d::ui::TabHeader *create(const std::string &titleStr, const std::string &backGround, const std::string &cross, @optional cocos2d::ui::Widget::TextureResType texType) - cocos2d::ui::TabHeader *ret = cocos2d::ui::TabHeader::create(arg1, arg2, arg3); + // static cocos2d::ui::TabHeader *create(const std::string &titleStr, const std::string &backGround, const std::string &backGroundSelected, const std::string &cross, const std::string &backGroundDisabled, const std::string &frontCrossDisabled, @optional cocos2d::ui::Widget::TextureResType texType) + cocos2d::ui::TabHeader *ret = cocos2d::ui::TabHeader::create(arg1, arg2, arg3, arg4, arg5, arg6, arg7); int num_ret = olua_push_object(L, ret, "ccui.TabHeader"); olua_endinvoke(L); @@ -8349,7 +8801,7 @@ static int _cocos2d_ui_TabHeader_create$4(lua_State *L) return num_ret; } -static int _cocos2d_ui_TabHeader_create$5(lua_State *L) +static int _olua_fun_cocos2d_ui_TabHeader_create$5(lua_State *L) { olua_startinvoke(L); @@ -8367,7 +8819,7 @@ static int _cocos2d_ui_TabHeader_create$5(lua_State *L) olua_check_string(L, 5, &arg5); olua_check_string(L, 6, &arg6); - // static cocos2d::ui::TabHeader *create(const std::string &titleStr, const std::string &backGround, const std::string &backGroundSelected, const std::string &cross, const std::string &backGroundDisabled, const std::string &frontCrossDisabled, @optional cocos2d::ui::Widget::TextureResType texType) + // static cocos2d::ui::TabHeader *create(const std::string &titleStr, const std::string &backGround, const std::string &backGroundSelected, const std::string &cross, const std::string &backGroundDisabled, const std::string &frontCrossDisabled) cocos2d::ui::TabHeader *ret = cocos2d::ui::TabHeader::create(arg1, arg2, arg3, arg4, arg5, arg6); int num_ret = olua_push_object(L, ret, "ccui.TabHeader"); @@ -8376,40 +8828,40 @@ static int _cocos2d_ui_TabHeader_create$5(lua_State *L) return num_ret; } -static int _cocos2d_ui_TabHeader_create(lua_State *L) +static int _olua_fun_cocos2d_ui_TabHeader_create(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 0) { // static cocos2d::ui::TabHeader *create() - return _cocos2d_ui_TabHeader_create$1(L); + return _olua_fun_cocos2d_ui_TabHeader_create$1(L); } if (num_args == 3) { // if ((olua_is_string(L, 1)) && (olua_is_string(L, 2)) && (olua_is_string(L, 3))) { - // static cocos2d::ui::TabHeader *create(const std::string &titleStr, const std::string &backGround, const std::string &cross, @optional cocos2d::ui::Widget::TextureResType texType) - return _cocos2d_ui_TabHeader_create$4(L); + // static cocos2d::ui::TabHeader *create(const std::string &titleStr, const std::string &backGround, const std::string &cross) + return _olua_fun_cocos2d_ui_TabHeader_create$3(L); // } } if (num_args == 4) { // if ((olua_is_string(L, 1)) && (olua_is_string(L, 2)) && (olua_is_string(L, 3)) && (olua_is_enum(L, 4))) { // static cocos2d::ui::TabHeader *create(const std::string &titleStr, const std::string &backGround, const std::string &cross, @optional cocos2d::ui::Widget::TextureResType texType) - return _cocos2d_ui_TabHeader_create$2(L); + return _olua_fun_cocos2d_ui_TabHeader_create$2(L); // } } if (num_args == 6) { // if ((olua_is_string(L, 1)) && (olua_is_string(L, 2)) && (olua_is_string(L, 3)) && (olua_is_string(L, 4)) && (olua_is_string(L, 5)) && (olua_is_string(L, 6))) { - // static cocos2d::ui::TabHeader *create(const std::string &titleStr, const std::string &backGround, const std::string &backGroundSelected, const std::string &cross, const std::string &backGroundDisabled, const std::string &frontCrossDisabled, @optional cocos2d::ui::Widget::TextureResType texType) - return _cocos2d_ui_TabHeader_create$5(L); + // static cocos2d::ui::TabHeader *create(const std::string &titleStr, const std::string &backGround, const std::string &backGroundSelected, const std::string &cross, const std::string &backGroundDisabled, const std::string &frontCrossDisabled) + return _olua_fun_cocos2d_ui_TabHeader_create$5(L); // } } if (num_args == 7) { // if ((olua_is_string(L, 1)) && (olua_is_string(L, 2)) && (olua_is_string(L, 3)) && (olua_is_string(L, 4)) && (olua_is_string(L, 5)) && (olua_is_string(L, 6)) && (olua_is_enum(L, 7))) { // static cocos2d::ui::TabHeader *create(const std::string &titleStr, const std::string &backGround, const std::string &backGroundSelected, const std::string &cross, const std::string &backGroundDisabled, const std::string &frontCrossDisabled, @optional cocos2d::ui::Widget::TextureResType texType) - return _cocos2d_ui_TabHeader_create$3(L); + return _olua_fun_cocos2d_ui_TabHeader_create$4(L); // } } @@ -8418,7 +8870,7 @@ static int _cocos2d_ui_TabHeader_create(lua_State *L) return 0; } -static int _cocos2d_ui_TabHeader_getIndexInTabControl(lua_State *L) +static int _olua_fun_cocos2d_ui_TabHeader_getIndexInTabControl(lua_State *L) { olua_startinvoke(L); @@ -8435,7 +8887,7 @@ static int _cocos2d_ui_TabHeader_getIndexInTabControl(lua_State *L) return num_ret; } -static int _cocos2d_ui_TabHeader_getTitleColor(lua_State *L) +static int _olua_fun_cocos2d_ui_TabHeader_getTitleColor(lua_State *L) { olua_startinvoke(L); @@ -8452,7 +8904,7 @@ static int _cocos2d_ui_TabHeader_getTitleColor(lua_State *L) return num_ret; } -static int _cocos2d_ui_TabHeader_getTitleFontName(lua_State *L) +static int _olua_fun_cocos2d_ui_TabHeader_getTitleFontName(lua_State *L) { olua_startinvoke(L); @@ -8469,7 +8921,7 @@ static int _cocos2d_ui_TabHeader_getTitleFontName(lua_State *L) return num_ret; } -static int _cocos2d_ui_TabHeader_getTitleFontSize(lua_State *L) +static int _olua_fun_cocos2d_ui_TabHeader_getTitleFontSize(lua_State *L) { olua_startinvoke(L); @@ -8486,7 +8938,7 @@ static int _cocos2d_ui_TabHeader_getTitleFontSize(lua_State *L) return num_ret; } -static int _cocos2d_ui_TabHeader_getTitleRenderer(lua_State *L) +static int _olua_fun_cocos2d_ui_TabHeader_getTitleRenderer(lua_State *L) { olua_startinvoke(L); @@ -8506,7 +8958,7 @@ static int _cocos2d_ui_TabHeader_getTitleRenderer(lua_State *L) return num_ret; } -static int _cocos2d_ui_TabHeader_getTitleText(lua_State *L) +static int _olua_fun_cocos2d_ui_TabHeader_getTitleText(lua_State *L) { olua_startinvoke(L); @@ -8523,7 +8975,7 @@ static int _cocos2d_ui_TabHeader_getTitleText(lua_State *L) return num_ret; } -static int _cocos2d_ui_TabHeader_setTitleColor(lua_State *L) +static int _olua_fun_cocos2d_ui_TabHeader_setTitleColor(lua_State *L) { olua_startinvoke(L); @@ -8541,7 +8993,7 @@ static int _cocos2d_ui_TabHeader_setTitleColor(lua_State *L) return 0; } -static int _cocos2d_ui_TabHeader_setTitleFontName(lua_State *L) +static int _olua_fun_cocos2d_ui_TabHeader_setTitleFontName(lua_State *L) { olua_startinvoke(L); @@ -8559,7 +9011,7 @@ static int _cocos2d_ui_TabHeader_setTitleFontName(lua_State *L) return 0; } -static int _cocos2d_ui_TabHeader_setTitleFontSize(lua_State *L) +static int _olua_fun_cocos2d_ui_TabHeader_setTitleFontSize(lua_State *L) { olua_startinvoke(L); @@ -8577,7 +9029,7 @@ static int _cocos2d_ui_TabHeader_setTitleFontSize(lua_State *L) return 0; } -static int _cocos2d_ui_TabHeader_setTitleText(lua_State *L) +static int _olua_fun_cocos2d_ui_TabHeader_setTitleText(lua_State *L) { olua_startinvoke(L); @@ -8595,34 +9047,42 @@ static int _cocos2d_ui_TabHeader_setTitleText(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ui_TabHeader(lua_State *L) +static int _olua_cls_ccui_TabHeader(lua_State *L) { oluacls_class(L, "ccui.TabHeader"); - oluacls_func(L, "create", _cocos2d_ui_TabHeader_create); - oluacls_func(L, "getIndexInTabControl", _cocos2d_ui_TabHeader_getIndexInTabControl); - oluacls_func(L, "getTitleColor", _cocos2d_ui_TabHeader_getTitleColor); - oluacls_func(L, "getTitleFontName", _cocos2d_ui_TabHeader_getTitleFontName); - oluacls_func(L, "getTitleFontSize", _cocos2d_ui_TabHeader_getTitleFontSize); - oluacls_func(L, "getTitleRenderer", _cocos2d_ui_TabHeader_getTitleRenderer); - oluacls_func(L, "getTitleText", _cocos2d_ui_TabHeader_getTitleText); - oluacls_func(L, "setTitleColor", _cocos2d_ui_TabHeader_setTitleColor); - oluacls_func(L, "setTitleFontName", _cocos2d_ui_TabHeader_setTitleFontName); - oluacls_func(L, "setTitleFontSize", _cocos2d_ui_TabHeader_setTitleFontSize); - oluacls_func(L, "setTitleText", _cocos2d_ui_TabHeader_setTitleText); - oluacls_prop(L, "indexInTabControl", _cocos2d_ui_TabHeader_getIndexInTabControl, nullptr); - oluacls_prop(L, "titleColor", _cocos2d_ui_TabHeader_getTitleColor, _cocos2d_ui_TabHeader_setTitleColor); - oluacls_prop(L, "titleFontName", _cocos2d_ui_TabHeader_getTitleFontName, _cocos2d_ui_TabHeader_setTitleFontName); - oluacls_prop(L, "titleFontSize", _cocos2d_ui_TabHeader_getTitleFontSize, _cocos2d_ui_TabHeader_setTitleFontSize); - oluacls_prop(L, "titleRenderer", _cocos2d_ui_TabHeader_getTitleRenderer, nullptr); - oluacls_prop(L, "titleText", _cocos2d_ui_TabHeader_getTitleText, _cocos2d_ui_TabHeader_setTitleText); + oluacls_func(L, "create", _olua_fun_cocos2d_ui_TabHeader_create); + oluacls_func(L, "getIndexInTabControl", _olua_fun_cocos2d_ui_TabHeader_getIndexInTabControl); + oluacls_func(L, "getTitleColor", _olua_fun_cocos2d_ui_TabHeader_getTitleColor); + oluacls_func(L, "getTitleFontName", _olua_fun_cocos2d_ui_TabHeader_getTitleFontName); + oluacls_func(L, "getTitleFontSize", _olua_fun_cocos2d_ui_TabHeader_getTitleFontSize); + oluacls_func(L, "getTitleRenderer", _olua_fun_cocos2d_ui_TabHeader_getTitleRenderer); + oluacls_func(L, "getTitleText", _olua_fun_cocos2d_ui_TabHeader_getTitleText); + oluacls_func(L, "setTitleColor", _olua_fun_cocos2d_ui_TabHeader_setTitleColor); + oluacls_func(L, "setTitleFontName", _olua_fun_cocos2d_ui_TabHeader_setTitleFontName); + oluacls_func(L, "setTitleFontSize", _olua_fun_cocos2d_ui_TabHeader_setTitleFontSize); + oluacls_func(L, "setTitleText", _olua_fun_cocos2d_ui_TabHeader_setTitleText); + oluacls_prop(L, "indexInTabControl", _olua_fun_cocos2d_ui_TabHeader_getIndexInTabControl, nullptr); + oluacls_prop(L, "titleColor", _olua_fun_cocos2d_ui_TabHeader_getTitleColor, _olua_fun_cocos2d_ui_TabHeader_setTitleColor); + oluacls_prop(L, "titleFontName", _olua_fun_cocos2d_ui_TabHeader_getTitleFontName, _olua_fun_cocos2d_ui_TabHeader_setTitleFontName); + oluacls_prop(L, "titleFontSize", _olua_fun_cocos2d_ui_TabHeader_getTitleFontSize, _olua_fun_cocos2d_ui_TabHeader_setTitleFontSize); + oluacls_prop(L, "titleRenderer", _olua_fun_cocos2d_ui_TabHeader_getTitleRenderer, nullptr); + oluacls_prop(L, "titleText", _olua_fun_cocos2d_ui_TabHeader_getTitleText, _olua_fun_cocos2d_ui_TabHeader_setTitleText); return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ui_TabControl_Dock(lua_State *L) +OLUA_LIB int luaopen_ccui_TabHeader(lua_State *L) +{ + olua_require(L, "cocos2d_ui", luaopen_cocos2d_ui); + if (!olua_getclass(L, "ccui.TabHeader")) { + luaL_error(L, "class not found: cocos2d::ui::TabHeader"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_ccui_TabControl_Dock(lua_State *L) { oluacls_class(L, "ccui.TabControl.Dock"); oluacls_func(L, "__index", olua_indexerror); @@ -8634,10 +9094,19 @@ OLUA_LIB int luaopen_cocos2d_ui_TabControl_Dock(lua_State *L) return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ui_TabControl_EventType(lua_State *L) +OLUA_LIB int luaopen_ccui_TabControl_Dock(lua_State *L) +{ + olua_require(L, "cocos2d_ui", luaopen_cocos2d_ui); + if (!olua_getclass(L, "ccui.TabControl.Dock")) { + luaL_error(L, "class not found: cocos2d::ui::TabControl::Dock"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_ccui_TabControl_EventType(lua_State *L) { oluacls_class(L, "ccui.TabControl.EventType"); oluacls_func(L, "__index", olua_indexerror); @@ -8646,9 +9115,19 @@ OLUA_LIB int luaopen_cocos2d_ui_TabControl_EventType(lua_State *L) return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccui_TabControl_EventType(lua_State *L) +{ + olua_require(L, "cocos2d_ui", luaopen_cocos2d_ui); + if (!olua_getclass(L, "ccui.TabControl.EventType")) { + luaL_error(L, "class not found: cocos2d::ui::TabControl::EventType"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_ui_TabControl_ccTabControlCallback___call(lua_State *L) +static int _olua_fun_cocos2d_ui_TabControl_ccTabControlCallback___call(lua_State *L) { olua_startinvoke(L); @@ -8660,17 +9139,26 @@ static int _cocos2d_ui_TabControl_ccTabControlCallback___call(lua_State *L) return 1; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ui_TabControl_ccTabControlCallback(lua_State *L) +static int _olua_cls_ccui_TabControl_ccTabControlCallback(lua_State *L) { oluacls_class(L, "ccui.TabControl.ccTabControlCallback"); - oluacls_func(L, "__call", _cocos2d_ui_TabControl_ccTabControlCallback___call); + oluacls_func(L, "__call", _olua_fun_cocos2d_ui_TabControl_ccTabControlCallback___call); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccui_TabControl_ccTabControlCallback(lua_State *L) +{ + olua_require(L, "cocos2d_ui", luaopen_cocos2d_ui); + if (!olua_getclass(L, "ccui.TabControl.ccTabControlCallback")) { + luaL_error(L, "class not found: cocos2d::ui::TabControl::ccTabControlCallback"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_ui_TabControl_create(lua_State *L) +static int _olua_fun_cocos2d_ui_TabControl_create(lua_State *L) { olua_startinvoke(L); @@ -8683,7 +9171,7 @@ static int _cocos2d_ui_TabControl_create(lua_State *L) return num_ret; } -static int _cocos2d_ui_TabControl_getHeaderDockPlace(lua_State *L) +static int _olua_fun_cocos2d_ui_TabControl_getHeaderDockPlace(lua_State *L) { olua_startinvoke(L); @@ -8700,7 +9188,7 @@ static int _cocos2d_ui_TabControl_getHeaderDockPlace(lua_State *L) return num_ret; } -static int _cocos2d_ui_TabControl_getHeaderHeight(lua_State *L) +static int _olua_fun_cocos2d_ui_TabControl_getHeaderHeight(lua_State *L) { olua_startinvoke(L); @@ -8717,7 +9205,7 @@ static int _cocos2d_ui_TabControl_getHeaderHeight(lua_State *L) return num_ret; } -static int _cocos2d_ui_TabControl_getHeaderSelectedZoom(lua_State *L) +static int _olua_fun_cocos2d_ui_TabControl_getHeaderSelectedZoom(lua_State *L) { olua_startinvoke(L); @@ -8734,7 +9222,7 @@ static int _cocos2d_ui_TabControl_getHeaderSelectedZoom(lua_State *L) return num_ret; } -static int _cocos2d_ui_TabControl_getHeaderWidth(lua_State *L) +static int _olua_fun_cocos2d_ui_TabControl_getHeaderWidth(lua_State *L) { olua_startinvoke(L); @@ -8751,7 +9239,7 @@ static int _cocos2d_ui_TabControl_getHeaderWidth(lua_State *L) return num_ret; } -static int _cocos2d_ui_TabControl_getSelectedTabIndex(lua_State *L) +static int _olua_fun_cocos2d_ui_TabControl_getSelectedTabIndex(lua_State *L) { olua_startinvoke(L); @@ -8768,7 +9256,7 @@ static int _cocos2d_ui_TabControl_getSelectedTabIndex(lua_State *L) return num_ret; } -static int _cocos2d_ui_TabControl_getTabContainer(lua_State *L) +static int _olua_fun_cocos2d_ui_TabControl_getTabContainer(lua_State *L) { olua_startinvoke(L); @@ -8790,7 +9278,7 @@ static int _cocos2d_ui_TabControl_getTabContainer(lua_State *L) return num_ret; } -static int _cocos2d_ui_TabControl_getTabCount(lua_State *L) +static int _olua_fun_cocos2d_ui_TabControl_getTabCount(lua_State *L) { olua_startinvoke(L); @@ -8807,7 +9295,7 @@ static int _cocos2d_ui_TabControl_getTabCount(lua_State *L) return num_ret; } -static int _cocos2d_ui_TabControl_getTabHeader(lua_State *L) +static int _olua_fun_cocos2d_ui_TabControl_getTabHeader(lua_State *L) { olua_startinvoke(L); @@ -8829,7 +9317,7 @@ static int _cocos2d_ui_TabControl_getTabHeader(lua_State *L) return num_ret; } -static int _cocos2d_ui_TabControl_ignoreHeadersTextureSize(lua_State *L) +static int _olua_fun_cocos2d_ui_TabControl_ignoreHeadersTextureSize(lua_State *L) { olua_startinvoke(L); @@ -8847,7 +9335,7 @@ static int _cocos2d_ui_TabControl_ignoreHeadersTextureSize(lua_State *L) return 0; } -static int _cocos2d_ui_TabControl_indexOfTabHeader(lua_State *L) +static int _olua_fun_cocos2d_ui_TabControl_indexOfTabHeader(lua_State *L) { olua_startinvoke(L); @@ -8866,7 +9354,7 @@ static int _cocos2d_ui_TabControl_indexOfTabHeader(lua_State *L) return num_ret; } -static int _cocos2d_ui_TabControl_insertTab(lua_State *L) +static int _olua_fun_cocos2d_ui_TabControl_insertTab(lua_State *L) { olua_startinvoke(L); @@ -8892,7 +9380,7 @@ static int _cocos2d_ui_TabControl_insertTab(lua_State *L) return 0; } -static int _cocos2d_ui_TabControl_isIgnoreHeadersTextureSize(lua_State *L) +static int _olua_fun_cocos2d_ui_TabControl_isIgnoreHeadersTextureSize(lua_State *L) { olua_startinvoke(L); @@ -8909,7 +9397,7 @@ static int _cocos2d_ui_TabControl_isIgnoreHeadersTextureSize(lua_State *L) return num_ret; } -static int _cocos2d_ui_TabControl_removeTab(lua_State *L) +static int _olua_fun_cocos2d_ui_TabControl_removeTab(lua_State *L) { olua_startinvoke(L); @@ -8933,7 +9421,7 @@ static int _cocos2d_ui_TabControl_removeTab(lua_State *L) return 0; } -static int _cocos2d_ui_TabControl_setHeaderDockPlace(lua_State *L) +static int _olua_fun_cocos2d_ui_TabControl_setHeaderDockPlace(lua_State *L) { olua_startinvoke(L); @@ -8951,7 +9439,7 @@ static int _cocos2d_ui_TabControl_setHeaderDockPlace(lua_State *L) return 0; } -static int _cocos2d_ui_TabControl_setHeaderHeight(lua_State *L) +static int _olua_fun_cocos2d_ui_TabControl_setHeaderHeight(lua_State *L) { olua_startinvoke(L); @@ -8969,7 +9457,7 @@ static int _cocos2d_ui_TabControl_setHeaderHeight(lua_State *L) return 0; } -static int _cocos2d_ui_TabControl_setHeaderSelectedZoom(lua_State *L) +static int _olua_fun_cocos2d_ui_TabControl_setHeaderSelectedZoom(lua_State *L) { olua_startinvoke(L); @@ -8987,7 +9475,7 @@ static int _cocos2d_ui_TabControl_setHeaderSelectedZoom(lua_State *L) return 0; } -static int _cocos2d_ui_TabControl_setHeaderWidth(lua_State *L) +static int _olua_fun_cocos2d_ui_TabControl_setHeaderWidth(lua_State *L) { olua_startinvoke(L); @@ -9005,7 +9493,7 @@ static int _cocos2d_ui_TabControl_setHeaderWidth(lua_State *L) return 0; } -static int _cocos2d_ui_TabControl_setSelectTab$1(lua_State *L) +static int _olua_fun_cocos2d_ui_TabControl_setSelectTab$1(lua_State *L) { olua_startinvoke(L); @@ -9023,7 +9511,7 @@ static int _cocos2d_ui_TabControl_setSelectTab$1(lua_State *L) return 0; } -static int _cocos2d_ui_TabControl_setSelectTab$2(lua_State *L) +static int _olua_fun_cocos2d_ui_TabControl_setSelectTab$2(lua_State *L) { olua_startinvoke(L); @@ -9041,19 +9529,19 @@ static int _cocos2d_ui_TabControl_setSelectTab$2(lua_State *L) return 0; } -static int _cocos2d_ui_TabControl_setSelectTab(lua_State *L) +static int _olua_fun_cocos2d_ui_TabControl_setSelectTab(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { if ((olua_is_integer(L, 2))) { // void setSelectTab(int index) - return _cocos2d_ui_TabControl_setSelectTab$1(L); + return _olua_fun_cocos2d_ui_TabControl_setSelectTab$1(L); } // if ((olua_is_object(L, 2, "ccui.TabHeader"))) { // void setSelectTab(cocos2d::ui::TabHeader *tabHeader) - return _cocos2d_ui_TabControl_setSelectTab$2(L); + return _olua_fun_cocos2d_ui_TabControl_setSelectTab$2(L); // } } @@ -9062,7 +9550,7 @@ static int _cocos2d_ui_TabControl_setSelectTab(lua_State *L) return 0; } -static int _cocos2d_ui_TabControl_setTabChangedEventListener(lua_State *L) +static int _olua_fun_cocos2d_ui_TabControl_setTabChangedEventListener(lua_State *L) { olua_startinvoke(L); @@ -9078,16 +9566,17 @@ static int _cocos2d_ui_TabControl_setTabChangedEventListener(lua_State *L) std::string cb_tag = "tabChangedEventListener"; std::string cb_name; if (olua_isfunction(L, 2)) { - cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](int arg1, cocos2d::ui::TabControl::EventType arg2) { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](int cb_arg1, cocos2d::ui::TabControl::EventType cb_arg2) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); if (olua_contextequal(L, cb_ctx)) { int top = lua_gettop(L); - olua_push_integer(L, arg1); - olua_push_enum(L, arg2); + olua_push_integer(L, cb_arg1); + olua_push_enum(L, cb_arg2); olua_callback(L, cb_store, cb_name.c_str(), 2); @@ -9099,7 +9588,7 @@ static int _cocos2d_ui_TabControl_setTabChangedEventListener(lua_State *L) arg1 = nullptr; } - // void setTabChangedEventListener(@localvar @nullable const cocos2d::ui::TabControl::ccTabControlCallback &callback) + // void setTabChangedEventListener(@nullable const cocos2d::ui::TabControl::ccTabControlCallback &callback) self->setTabChangedEventListener(arg1); olua_endinvoke(L); @@ -9107,44 +9596,51 @@ static int _cocos2d_ui_TabControl_setTabChangedEventListener(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ui_TabControl(lua_State *L) +static int _olua_cls_ccui_TabControl(lua_State *L) { oluacls_class(L, "ccui.TabControl"); - oluacls_func(L, "create", _cocos2d_ui_TabControl_create); - oluacls_func(L, "getHeaderDockPlace", _cocos2d_ui_TabControl_getHeaderDockPlace); - oluacls_func(L, "getHeaderHeight", _cocos2d_ui_TabControl_getHeaderHeight); - oluacls_func(L, "getHeaderSelectedZoom", _cocos2d_ui_TabControl_getHeaderSelectedZoom); - oluacls_func(L, "getHeaderWidth", _cocos2d_ui_TabControl_getHeaderWidth); - oluacls_func(L, "getSelectedTabIndex", _cocos2d_ui_TabControl_getSelectedTabIndex); - oluacls_func(L, "getTabContainer", _cocos2d_ui_TabControl_getTabContainer); - oluacls_func(L, "getTabCount", _cocos2d_ui_TabControl_getTabCount); - oluacls_func(L, "getTabHeader", _cocos2d_ui_TabControl_getTabHeader); - oluacls_func(L, "ignoreHeadersTextureSize", _cocos2d_ui_TabControl_ignoreHeadersTextureSize); - oluacls_func(L, "indexOfTabHeader", _cocos2d_ui_TabControl_indexOfTabHeader); - oluacls_func(L, "insertTab", _cocos2d_ui_TabControl_insertTab); - oluacls_func(L, "isIgnoreHeadersTextureSize", _cocos2d_ui_TabControl_isIgnoreHeadersTextureSize); - oluacls_func(L, "removeTab", _cocos2d_ui_TabControl_removeTab); - oluacls_func(L, "setHeaderDockPlace", _cocos2d_ui_TabControl_setHeaderDockPlace); - oluacls_func(L, "setHeaderHeight", _cocos2d_ui_TabControl_setHeaderHeight); - oluacls_func(L, "setHeaderSelectedZoom", _cocos2d_ui_TabControl_setHeaderSelectedZoom); - oluacls_func(L, "setHeaderWidth", _cocos2d_ui_TabControl_setHeaderWidth); - oluacls_func(L, "setSelectTab", _cocos2d_ui_TabControl_setSelectTab); - oluacls_func(L, "setTabChangedEventListener", _cocos2d_ui_TabControl_setTabChangedEventListener); - oluacls_prop(L, "headerDockPlace", _cocos2d_ui_TabControl_getHeaderDockPlace, _cocos2d_ui_TabControl_setHeaderDockPlace); - oluacls_prop(L, "headerHeight", _cocos2d_ui_TabControl_getHeaderHeight, _cocos2d_ui_TabControl_setHeaderHeight); - oluacls_prop(L, "headerSelectedZoom", _cocos2d_ui_TabControl_getHeaderSelectedZoom, _cocos2d_ui_TabControl_setHeaderSelectedZoom); - oluacls_prop(L, "headerWidth", _cocos2d_ui_TabControl_getHeaderWidth, _cocos2d_ui_TabControl_setHeaderWidth); - oluacls_prop(L, "ignoreHeadersTextureSize", _cocos2d_ui_TabControl_isIgnoreHeadersTextureSize, nullptr); - oluacls_prop(L, "selectedTabIndex", _cocos2d_ui_TabControl_getSelectedTabIndex, nullptr); - oluacls_prop(L, "tabCount", _cocos2d_ui_TabControl_getTabCount, nullptr); + oluacls_func(L, "create", _olua_fun_cocos2d_ui_TabControl_create); + oluacls_func(L, "getHeaderDockPlace", _olua_fun_cocos2d_ui_TabControl_getHeaderDockPlace); + oluacls_func(L, "getHeaderHeight", _olua_fun_cocos2d_ui_TabControl_getHeaderHeight); + oluacls_func(L, "getHeaderSelectedZoom", _olua_fun_cocos2d_ui_TabControl_getHeaderSelectedZoom); + oluacls_func(L, "getHeaderWidth", _olua_fun_cocos2d_ui_TabControl_getHeaderWidth); + oluacls_func(L, "getSelectedTabIndex", _olua_fun_cocos2d_ui_TabControl_getSelectedTabIndex); + oluacls_func(L, "getTabContainer", _olua_fun_cocos2d_ui_TabControl_getTabContainer); + oluacls_func(L, "getTabCount", _olua_fun_cocos2d_ui_TabControl_getTabCount); + oluacls_func(L, "getTabHeader", _olua_fun_cocos2d_ui_TabControl_getTabHeader); + oluacls_func(L, "ignoreHeadersTextureSize", _olua_fun_cocos2d_ui_TabControl_ignoreHeadersTextureSize); + oluacls_func(L, "indexOfTabHeader", _olua_fun_cocos2d_ui_TabControl_indexOfTabHeader); + oluacls_func(L, "insertTab", _olua_fun_cocos2d_ui_TabControl_insertTab); + oluacls_func(L, "isIgnoreHeadersTextureSize", _olua_fun_cocos2d_ui_TabControl_isIgnoreHeadersTextureSize); + oluacls_func(L, "removeTab", _olua_fun_cocos2d_ui_TabControl_removeTab); + oluacls_func(L, "setHeaderDockPlace", _olua_fun_cocos2d_ui_TabControl_setHeaderDockPlace); + oluacls_func(L, "setHeaderHeight", _olua_fun_cocos2d_ui_TabControl_setHeaderHeight); + oluacls_func(L, "setHeaderSelectedZoom", _olua_fun_cocos2d_ui_TabControl_setHeaderSelectedZoom); + oluacls_func(L, "setHeaderWidth", _olua_fun_cocos2d_ui_TabControl_setHeaderWidth); + oluacls_func(L, "setSelectTab", _olua_fun_cocos2d_ui_TabControl_setSelectTab); + oluacls_func(L, "setTabChangedEventListener", _olua_fun_cocos2d_ui_TabControl_setTabChangedEventListener); + oluacls_prop(L, "headerDockPlace", _olua_fun_cocos2d_ui_TabControl_getHeaderDockPlace, _olua_fun_cocos2d_ui_TabControl_setHeaderDockPlace); + oluacls_prop(L, "headerHeight", _olua_fun_cocos2d_ui_TabControl_getHeaderHeight, _olua_fun_cocos2d_ui_TabControl_setHeaderHeight); + oluacls_prop(L, "headerSelectedZoom", _olua_fun_cocos2d_ui_TabControl_getHeaderSelectedZoom, _olua_fun_cocos2d_ui_TabControl_setHeaderSelectedZoom); + oluacls_prop(L, "headerWidth", _olua_fun_cocos2d_ui_TabControl_getHeaderWidth, _olua_fun_cocos2d_ui_TabControl_setHeaderWidth); + oluacls_prop(L, "selectedTabIndex", _olua_fun_cocos2d_ui_TabControl_getSelectedTabIndex, nullptr); + oluacls_prop(L, "tabCount", _olua_fun_cocos2d_ui_TabControl_getTabCount, nullptr); return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ui_ScrollView_Direction(lua_State *L) +OLUA_LIB int luaopen_ccui_TabControl(lua_State *L) +{ + olua_require(L, "cocos2d_ui", luaopen_cocos2d_ui); + if (!olua_getclass(L, "ccui.TabControl")) { + luaL_error(L, "class not found: cocos2d::ui::TabControl"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_ccui_ScrollView_Direction(lua_State *L) { oluacls_class(L, "ccui.ScrollView.Direction"); oluacls_func(L, "__index", olua_indexerror); @@ -9156,10 +9652,19 @@ OLUA_LIB int luaopen_cocos2d_ui_ScrollView_Direction(lua_State *L) return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ui_ScrollView_EventType(lua_State *L) +OLUA_LIB int luaopen_ccui_ScrollView_Direction(lua_State *L) +{ + olua_require(L, "cocos2d_ui", luaopen_cocos2d_ui); + if (!olua_getclass(L, "ccui.ScrollView.Direction")) { + luaL_error(L, "class not found: cocos2d::ui::ScrollView::Direction"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_ccui_ScrollView_EventType(lua_State *L) { oluacls_class(L, "ccui.ScrollView.EventType"); oluacls_func(L, "__index", olua_indexerror); @@ -9180,9 +9685,19 @@ OLUA_LIB int luaopen_cocos2d_ui_ScrollView_EventType(lua_State *L) return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccui_ScrollView_EventType(lua_State *L) +{ + olua_require(L, "cocos2d_ui", luaopen_cocos2d_ui); + if (!olua_getclass(L, "ccui.ScrollView.EventType")) { + luaL_error(L, "class not found: cocos2d::ui::ScrollView::EventType"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_ui_ScrollView_ccScrollViewCallback___call(lua_State *L) +static int _olua_fun_cocos2d_ui_ScrollView_ccScrollViewCallback___call(lua_State *L) { olua_startinvoke(L); @@ -9194,17 +9709,26 @@ static int _cocos2d_ui_ScrollView_ccScrollViewCallback___call(lua_State *L) return 1; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ui_ScrollView_ccScrollViewCallback(lua_State *L) +static int _olua_cls_ccui_ScrollView_ccScrollViewCallback(lua_State *L) { oluacls_class(L, "ccui.ScrollView.ccScrollViewCallback"); - oluacls_func(L, "__call", _cocos2d_ui_ScrollView_ccScrollViewCallback___call); + oluacls_func(L, "__call", _olua_fun_cocos2d_ui_ScrollView_ccScrollViewCallback___call); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccui_ScrollView_ccScrollViewCallback(lua_State *L) +{ + olua_require(L, "cocos2d_ui", luaopen_cocos2d_ui); + if (!olua_getclass(L, "ccui.ScrollView.ccScrollViewCallback")) { + luaL_error(L, "class not found: cocos2d::ui::ScrollView::ccScrollViewCallback"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_ui_ScrollView_addEventListener(lua_State *L) +static int _olua_fun_cocos2d_ui_ScrollView_addEventListener(lua_State *L) { olua_startinvoke(L); @@ -9216,16 +9740,17 @@ static int _cocos2d_ui_ScrollView_addEventListener(lua_State *L) void *cb_store = (void *)self; std::string cb_tag = "scrollViewCallback"; - std::string cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + std::string cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](cocos2d::Ref *arg1, cocos2d::ui::ScrollView::EventType arg2) { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](cocos2d::Ref *cb_arg1, cocos2d::ui::ScrollView::EventType cb_arg2) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); if (olua_contextequal(L, cb_ctx)) { int top = lua_gettop(L); - olua_push_object(L, arg1, "cc.Ref"); - olua_push_enum(L, arg2); + olua_push_object(L, cb_arg1, "cc.Ref"); + olua_push_enum(L, cb_arg2); olua_callback(L, cb_store, cb_name.c_str(), 2); @@ -9241,7 +9766,7 @@ static int _cocos2d_ui_ScrollView_addEventListener(lua_State *L) return 0; } -static int _cocos2d_ui_ScrollView_create(lua_State *L) +static int _olua_fun_cocos2d_ui_ScrollView_create(lua_State *L) { olua_startinvoke(L); @@ -9254,7 +9779,7 @@ static int _cocos2d_ui_ScrollView_create(lua_State *L) return num_ret; } -static int _cocos2d_ui_ScrollView_createInstance(lua_State *L) +static int _olua_fun_cocos2d_ui_ScrollView_createInstance(lua_State *L) { olua_startinvoke(L); @@ -9267,7 +9792,7 @@ static int _cocos2d_ui_ScrollView_createInstance(lua_State *L) return num_ret; } -static int _cocos2d_ui_ScrollView_getDirection(lua_State *L) +static int _olua_fun_cocos2d_ui_ScrollView_getDirection(lua_State *L) { olua_startinvoke(L); @@ -9284,7 +9809,7 @@ static int _cocos2d_ui_ScrollView_getDirection(lua_State *L) return num_ret; } -static int _cocos2d_ui_ScrollView_getInnerContainer(lua_State *L) +static int _olua_fun_cocos2d_ui_ScrollView_getInnerContainer(lua_State *L) { olua_startinvoke(L); @@ -9304,7 +9829,7 @@ static int _cocos2d_ui_ScrollView_getInnerContainer(lua_State *L) return num_ret; } -static int _cocos2d_ui_ScrollView_getInnerContainerPosition(lua_State *L) +static int _olua_fun_cocos2d_ui_ScrollView_getInnerContainerPosition(lua_State *L) { olua_startinvoke(L); @@ -9321,7 +9846,7 @@ static int _cocos2d_ui_ScrollView_getInnerContainerPosition(lua_State *L) return num_ret; } -static int _cocos2d_ui_ScrollView_getInnerContainerSize(lua_State *L) +static int _olua_fun_cocos2d_ui_ScrollView_getInnerContainerSize(lua_State *L) { olua_startinvoke(L); @@ -9338,7 +9863,7 @@ static int _cocos2d_ui_ScrollView_getInnerContainerSize(lua_State *L) return num_ret; } -static int _cocos2d_ui_ScrollView_getScrollBarAutoHideTime(lua_State *L) +static int _olua_fun_cocos2d_ui_ScrollView_getScrollBarAutoHideTime(lua_State *L) { olua_startinvoke(L); @@ -9355,7 +9880,7 @@ static int _cocos2d_ui_ScrollView_getScrollBarAutoHideTime(lua_State *L) return num_ret; } -static int _cocos2d_ui_ScrollView_getScrollBarColor(lua_State *L) +static int _olua_fun_cocos2d_ui_ScrollView_getScrollBarColor(lua_State *L) { olua_startinvoke(L); @@ -9372,7 +9897,7 @@ static int _cocos2d_ui_ScrollView_getScrollBarColor(lua_State *L) return num_ret; } -static int _cocos2d_ui_ScrollView_getScrollBarOpacity(lua_State *L) +static int _olua_fun_cocos2d_ui_ScrollView_getScrollBarOpacity(lua_State *L) { olua_startinvoke(L); @@ -9389,7 +9914,7 @@ static int _cocos2d_ui_ScrollView_getScrollBarOpacity(lua_State *L) return num_ret; } -static int _cocos2d_ui_ScrollView_getScrollBarPositionFromCornerForHorizontal(lua_State *L) +static int _olua_fun_cocos2d_ui_ScrollView_getScrollBarPositionFromCornerForHorizontal(lua_State *L) { olua_startinvoke(L); @@ -9399,14 +9924,14 @@ static int _cocos2d_ui_ScrollView_getScrollBarPositionFromCornerForHorizontal(lu // cocos2d::Vec2 getScrollBarPositionFromCornerForHorizontal() cocos2d::Vec2 ret = self->getScrollBarPositionFromCornerForHorizontal(); - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec2"); + int num_ret = olua_copy_object(L, ret, "cc.Vec2"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_ui_ScrollView_getScrollBarPositionFromCornerForVertical(lua_State *L) +static int _olua_fun_cocos2d_ui_ScrollView_getScrollBarPositionFromCornerForVertical(lua_State *L) { olua_startinvoke(L); @@ -9416,14 +9941,14 @@ static int _cocos2d_ui_ScrollView_getScrollBarPositionFromCornerForVertical(lua_ // cocos2d::Vec2 getScrollBarPositionFromCornerForVertical() cocos2d::Vec2 ret = self->getScrollBarPositionFromCornerForVertical(); - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec2"); + int num_ret = olua_copy_object(L, ret, "cc.Vec2"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_ui_ScrollView_getScrollBarWidth(lua_State *L) +static int _olua_fun_cocos2d_ui_ScrollView_getScrollBarWidth(lua_State *L) { olua_startinvoke(L); @@ -9440,7 +9965,7 @@ static int _cocos2d_ui_ScrollView_getScrollBarWidth(lua_State *L) return num_ret; } -static int _cocos2d_ui_ScrollView_getScrolledPercentBothDirection(lua_State *L) +static int _olua_fun_cocos2d_ui_ScrollView_getScrolledPercentBothDirection(lua_State *L) { olua_startinvoke(L); @@ -9450,14 +9975,14 @@ static int _cocos2d_ui_ScrollView_getScrolledPercentBothDirection(lua_State *L) // cocos2d::Vec2 getScrolledPercentBothDirection() cocos2d::Vec2 ret = self->getScrolledPercentBothDirection(); - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec2"); + int num_ret = olua_copy_object(L, ret, "cc.Vec2"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_ui_ScrollView_getScrolledPercentHorizontal(lua_State *L) +static int _olua_fun_cocos2d_ui_ScrollView_getScrolledPercentHorizontal(lua_State *L) { olua_startinvoke(L); @@ -9474,7 +9999,7 @@ static int _cocos2d_ui_ScrollView_getScrolledPercentHorizontal(lua_State *L) return num_ret; } -static int _cocos2d_ui_ScrollView_getScrolledPercentVertical(lua_State *L) +static int _olua_fun_cocos2d_ui_ScrollView_getScrolledPercentVertical(lua_State *L) { olua_startinvoke(L); @@ -9491,7 +10016,7 @@ static int _cocos2d_ui_ScrollView_getScrolledPercentVertical(lua_State *L) return num_ret; } -static int _cocos2d_ui_ScrollView_getTouchTotalTimeThreshold(lua_State *L) +static int _olua_fun_cocos2d_ui_ScrollView_getTouchTotalTimeThreshold(lua_State *L) { olua_startinvoke(L); @@ -9508,7 +10033,7 @@ static int _cocos2d_ui_ScrollView_getTouchTotalTimeThreshold(lua_State *L) return num_ret; } -static int _cocos2d_ui_ScrollView_isAutoScrolling(lua_State *L) +static int _olua_fun_cocos2d_ui_ScrollView_isAutoScrolling(lua_State *L) { olua_startinvoke(L); @@ -9525,7 +10050,7 @@ static int _cocos2d_ui_ScrollView_isAutoScrolling(lua_State *L) return num_ret; } -static int _cocos2d_ui_ScrollView_isBounceEnabled(lua_State *L) +static int _olua_fun_cocos2d_ui_ScrollView_isBounceEnabled(lua_State *L) { olua_startinvoke(L); @@ -9542,7 +10067,7 @@ static int _cocos2d_ui_ScrollView_isBounceEnabled(lua_State *L) return num_ret; } -static int _cocos2d_ui_ScrollView_isInertiaScrollEnabled(lua_State *L) +static int _olua_fun_cocos2d_ui_ScrollView_isInertiaScrollEnabled(lua_State *L) { olua_startinvoke(L); @@ -9559,7 +10084,7 @@ static int _cocos2d_ui_ScrollView_isInertiaScrollEnabled(lua_State *L) return num_ret; } -static int _cocos2d_ui_ScrollView_isScrollBarAutoHideEnabled(lua_State *L) +static int _olua_fun_cocos2d_ui_ScrollView_isScrollBarAutoHideEnabled(lua_State *L) { olua_startinvoke(L); @@ -9576,7 +10101,7 @@ static int _cocos2d_ui_ScrollView_isScrollBarAutoHideEnabled(lua_State *L) return num_ret; } -static int _cocos2d_ui_ScrollView_isScrollBarEnabled(lua_State *L) +static int _olua_fun_cocos2d_ui_ScrollView_isScrollBarEnabled(lua_State *L) { olua_startinvoke(L); @@ -9593,7 +10118,7 @@ static int _cocos2d_ui_ScrollView_isScrollBarEnabled(lua_State *L) return num_ret; } -static int _cocos2d_ui_ScrollView_isScrolling(lua_State *L) +static int _olua_fun_cocos2d_ui_ScrollView_isScrolling(lua_State *L) { olua_startinvoke(L); @@ -9610,7 +10135,7 @@ static int _cocos2d_ui_ScrollView_isScrolling(lua_State *L) return num_ret; } -static int _cocos2d_ui_ScrollView_jumpToBottom(lua_State *L) +static int _olua_fun_cocos2d_ui_ScrollView_jumpToBottom(lua_State *L) { olua_startinvoke(L); @@ -9626,7 +10151,7 @@ static int _cocos2d_ui_ScrollView_jumpToBottom(lua_State *L) return 0; } -static int _cocos2d_ui_ScrollView_jumpToBottomLeft(lua_State *L) +static int _olua_fun_cocos2d_ui_ScrollView_jumpToBottomLeft(lua_State *L) { olua_startinvoke(L); @@ -9642,7 +10167,7 @@ static int _cocos2d_ui_ScrollView_jumpToBottomLeft(lua_State *L) return 0; } -static int _cocos2d_ui_ScrollView_jumpToBottomRight(lua_State *L) +static int _olua_fun_cocos2d_ui_ScrollView_jumpToBottomRight(lua_State *L) { olua_startinvoke(L); @@ -9658,7 +10183,7 @@ static int _cocos2d_ui_ScrollView_jumpToBottomRight(lua_State *L) return 0; } -static int _cocos2d_ui_ScrollView_jumpToLeft(lua_State *L) +static int _olua_fun_cocos2d_ui_ScrollView_jumpToLeft(lua_State *L) { olua_startinvoke(L); @@ -9674,25 +10199,25 @@ static int _cocos2d_ui_ScrollView_jumpToLeft(lua_State *L) return 0; } -static int _cocos2d_ui_ScrollView_jumpToPercentBothDirection(lua_State *L) +static int _olua_fun_cocos2d_ui_ScrollView_jumpToPercentBothDirection(lua_State *L) { olua_startinvoke(L); cocos2d::ui::ScrollView *self = nullptr; - cocos2d::Vec2 arg1; /** percent */ + cocos2d::Vec2 *arg1; /** percent */ olua_to_object(L, 1, &self, "ccui.ScrollView"); olua_check_object(L, 2, &arg1, "cc.Vec2"); // void jumpToPercentBothDirection(const cocos2d::Vec2 &percent) - self->jumpToPercentBothDirection(arg1); + self->jumpToPercentBothDirection(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_ui_ScrollView_jumpToPercentHorizontal(lua_State *L) +static int _olua_fun_cocos2d_ui_ScrollView_jumpToPercentHorizontal(lua_State *L) { olua_startinvoke(L); @@ -9710,7 +10235,7 @@ static int _cocos2d_ui_ScrollView_jumpToPercentHorizontal(lua_State *L) return 0; } -static int _cocos2d_ui_ScrollView_jumpToPercentVertical(lua_State *L) +static int _olua_fun_cocos2d_ui_ScrollView_jumpToPercentVertical(lua_State *L) { olua_startinvoke(L); @@ -9728,7 +10253,7 @@ static int _cocos2d_ui_ScrollView_jumpToPercentVertical(lua_State *L) return 0; } -static int _cocos2d_ui_ScrollView_jumpToRight(lua_State *L) +static int _olua_fun_cocos2d_ui_ScrollView_jumpToRight(lua_State *L) { olua_startinvoke(L); @@ -9744,7 +10269,7 @@ static int _cocos2d_ui_ScrollView_jumpToRight(lua_State *L) return 0; } -static int _cocos2d_ui_ScrollView_jumpToTop(lua_State *L) +static int _olua_fun_cocos2d_ui_ScrollView_jumpToTop(lua_State *L) { olua_startinvoke(L); @@ -9760,7 +10285,7 @@ static int _cocos2d_ui_ScrollView_jumpToTop(lua_State *L) return 0; } -static int _cocos2d_ui_ScrollView_jumpToTopLeft(lua_State *L) +static int _olua_fun_cocos2d_ui_ScrollView_jumpToTopLeft(lua_State *L) { olua_startinvoke(L); @@ -9776,7 +10301,7 @@ static int _cocos2d_ui_ScrollView_jumpToTopLeft(lua_State *L) return 0; } -static int _cocos2d_ui_ScrollView_jumpToTopRight(lua_State *L) +static int _olua_fun_cocos2d_ui_ScrollView_jumpToTopRight(lua_State *L) { olua_startinvoke(L); @@ -9792,11 +10317,11 @@ static int _cocos2d_ui_ScrollView_jumpToTopRight(lua_State *L) return 0; } -static int _cocos2d_ui_ScrollView_new(lua_State *L) +static int _olua_fun_cocos2d_ui_ScrollView_new(lua_State *L) { olua_startinvoke(L); - // ScrollView() + // cocos2d::ui::ScrollView() cocos2d::ui::ScrollView *ret = new cocos2d::ui::ScrollView(); int num_ret = olua_push_object(L, ret, "ccui.ScrollView"); olua_postnew(L, ret); @@ -9806,7 +10331,7 @@ static int _cocos2d_ui_ScrollView_new(lua_State *L) return num_ret; } -static int _cocos2d_ui_ScrollView_scrollToBottom(lua_State *L) +static int _olua_fun_cocos2d_ui_ScrollView_scrollToBottom(lua_State *L) { olua_startinvoke(L); @@ -9826,7 +10351,7 @@ static int _cocos2d_ui_ScrollView_scrollToBottom(lua_State *L) return 0; } -static int _cocos2d_ui_ScrollView_scrollToBottomLeft(lua_State *L) +static int _olua_fun_cocos2d_ui_ScrollView_scrollToBottomLeft(lua_State *L) { olua_startinvoke(L); @@ -9846,7 +10371,7 @@ static int _cocos2d_ui_ScrollView_scrollToBottomLeft(lua_State *L) return 0; } -static int _cocos2d_ui_ScrollView_scrollToBottomRight(lua_State *L) +static int _olua_fun_cocos2d_ui_ScrollView_scrollToBottomRight(lua_State *L) { olua_startinvoke(L); @@ -9866,7 +10391,7 @@ static int _cocos2d_ui_ScrollView_scrollToBottomRight(lua_State *L) return 0; } -static int _cocos2d_ui_ScrollView_scrollToLeft(lua_State *L) +static int _olua_fun_cocos2d_ui_ScrollView_scrollToLeft(lua_State *L) { olua_startinvoke(L); @@ -9886,12 +10411,12 @@ static int _cocos2d_ui_ScrollView_scrollToLeft(lua_State *L) return 0; } -static int _cocos2d_ui_ScrollView_scrollToPercentBothDirection(lua_State *L) +static int _olua_fun_cocos2d_ui_ScrollView_scrollToPercentBothDirection(lua_State *L) { olua_startinvoke(L); cocos2d::ui::ScrollView *self = nullptr; - cocos2d::Vec2 arg1; /** percent */ + cocos2d::Vec2 *arg1; /** percent */ float arg2 = 0; /** timeInSec */ bool arg3 = false; /** attenuated */ @@ -9901,14 +10426,14 @@ static int _cocos2d_ui_ScrollView_scrollToPercentBothDirection(lua_State *L) olua_check_bool(L, 4, &arg3); // void scrollToPercentBothDirection(const cocos2d::Vec2 &percent, float timeInSec, bool attenuated) - self->scrollToPercentBothDirection(arg1, arg2, arg3); + self->scrollToPercentBothDirection(*arg1, arg2, arg3); olua_endinvoke(L); return 0; } -static int _cocos2d_ui_ScrollView_scrollToPercentHorizontal(lua_State *L) +static int _olua_fun_cocos2d_ui_ScrollView_scrollToPercentHorizontal(lua_State *L) { olua_startinvoke(L); @@ -9930,7 +10455,7 @@ static int _cocos2d_ui_ScrollView_scrollToPercentHorizontal(lua_State *L) return 0; } -static int _cocos2d_ui_ScrollView_scrollToPercentVertical(lua_State *L) +static int _olua_fun_cocos2d_ui_ScrollView_scrollToPercentVertical(lua_State *L) { olua_startinvoke(L); @@ -9952,7 +10477,7 @@ static int _cocos2d_ui_ScrollView_scrollToPercentVertical(lua_State *L) return 0; } -static int _cocos2d_ui_ScrollView_scrollToRight(lua_State *L) +static int _olua_fun_cocos2d_ui_ScrollView_scrollToRight(lua_State *L) { olua_startinvoke(L); @@ -9972,7 +10497,7 @@ static int _cocos2d_ui_ScrollView_scrollToRight(lua_State *L) return 0; } -static int _cocos2d_ui_ScrollView_scrollToTop(lua_State *L) +static int _olua_fun_cocos2d_ui_ScrollView_scrollToTop(lua_State *L) { olua_startinvoke(L); @@ -9992,7 +10517,7 @@ static int _cocos2d_ui_ScrollView_scrollToTop(lua_State *L) return 0; } -static int _cocos2d_ui_ScrollView_scrollToTopLeft(lua_State *L) +static int _olua_fun_cocos2d_ui_ScrollView_scrollToTopLeft(lua_State *L) { olua_startinvoke(L); @@ -10012,7 +10537,7 @@ static int _cocos2d_ui_ScrollView_scrollToTopLeft(lua_State *L) return 0; } -static int _cocos2d_ui_ScrollView_scrollToTopRight(lua_State *L) +static int _olua_fun_cocos2d_ui_ScrollView_scrollToTopRight(lua_State *L) { olua_startinvoke(L); @@ -10032,7 +10557,7 @@ static int _cocos2d_ui_ScrollView_scrollToTopRight(lua_State *L) return 0; } -static int _cocos2d_ui_ScrollView_setBounceEnabled(lua_State *L) +static int _olua_fun_cocos2d_ui_ScrollView_setBounceEnabled(lua_State *L) { olua_startinvoke(L); @@ -10050,7 +10575,7 @@ static int _cocos2d_ui_ScrollView_setBounceEnabled(lua_State *L) return 0; } -static int _cocos2d_ui_ScrollView_setDirection(lua_State *L) +static int _olua_fun_cocos2d_ui_ScrollView_setDirection(lua_State *L) { olua_startinvoke(L); @@ -10068,7 +10593,7 @@ static int _cocos2d_ui_ScrollView_setDirection(lua_State *L) return 0; } -static int _cocos2d_ui_ScrollView_setInertiaScrollEnabled(lua_State *L) +static int _olua_fun_cocos2d_ui_ScrollView_setInertiaScrollEnabled(lua_State *L) { olua_startinvoke(L); @@ -10086,43 +10611,43 @@ static int _cocos2d_ui_ScrollView_setInertiaScrollEnabled(lua_State *L) return 0; } -static int _cocos2d_ui_ScrollView_setInnerContainerPosition(lua_State *L) +static int _olua_fun_cocos2d_ui_ScrollView_setInnerContainerPosition(lua_State *L) { olua_startinvoke(L); cocos2d::ui::ScrollView *self = nullptr; - cocos2d::Vec2 arg1; /** pos */ + cocos2d::Vec2 *arg1; /** pos */ olua_to_object(L, 1, &self, "ccui.ScrollView"); olua_check_object(L, 2, &arg1, "cc.Vec2"); // void setInnerContainerPosition(const cocos2d::Vec2 &pos) - self->setInnerContainerPosition(arg1); + self->setInnerContainerPosition(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_ui_ScrollView_setInnerContainerSize(lua_State *L) +static int _olua_fun_cocos2d_ui_ScrollView_setInnerContainerSize(lua_State *L) { olua_startinvoke(L); cocos2d::ui::ScrollView *self = nullptr; - cocos2d::Size arg1; /** size */ + cocos2d::Size *arg1; /** size */ olua_to_object(L, 1, &self, "ccui.ScrollView"); olua_check_object(L, 2, &arg1, "cc.Size"); // void setInnerContainerSize(const cocos2d::Size &size) - self->setInnerContainerSize(arg1); + self->setInnerContainerSize(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_ui_ScrollView_setScrollBarAutoHideEnabled(lua_State *L) +static int _olua_fun_cocos2d_ui_ScrollView_setScrollBarAutoHideEnabled(lua_State *L) { olua_startinvoke(L); @@ -10140,7 +10665,7 @@ static int _cocos2d_ui_ScrollView_setScrollBarAutoHideEnabled(lua_State *L) return 0; } -static int _cocos2d_ui_ScrollView_setScrollBarAutoHideTime(lua_State *L) +static int _olua_fun_cocos2d_ui_ScrollView_setScrollBarAutoHideTime(lua_State *L) { olua_startinvoke(L); @@ -10158,7 +10683,7 @@ static int _cocos2d_ui_ScrollView_setScrollBarAutoHideTime(lua_State *L) return 0; } -static int _cocos2d_ui_ScrollView_setScrollBarColor(lua_State *L) +static int _olua_fun_cocos2d_ui_ScrollView_setScrollBarColor(lua_State *L) { olua_startinvoke(L); @@ -10176,7 +10701,7 @@ static int _cocos2d_ui_ScrollView_setScrollBarColor(lua_State *L) return 0; } -static int _cocos2d_ui_ScrollView_setScrollBarEnabled(lua_State *L) +static int _olua_fun_cocos2d_ui_ScrollView_setScrollBarEnabled(lua_State *L) { olua_startinvoke(L); @@ -10194,7 +10719,7 @@ static int _cocos2d_ui_ScrollView_setScrollBarEnabled(lua_State *L) return 0; } -static int _cocos2d_ui_ScrollView_setScrollBarOpacity(lua_State *L) +static int _olua_fun_cocos2d_ui_ScrollView_setScrollBarOpacity(lua_State *L) { olua_startinvoke(L); @@ -10212,61 +10737,61 @@ static int _cocos2d_ui_ScrollView_setScrollBarOpacity(lua_State *L) return 0; } -static int _cocos2d_ui_ScrollView_setScrollBarPositionFromCorner(lua_State *L) +static int _olua_fun_cocos2d_ui_ScrollView_setScrollBarPositionFromCorner(lua_State *L) { olua_startinvoke(L); cocos2d::ui::ScrollView *self = nullptr; - cocos2d::Vec2 arg1; /** positionFromCorner */ + cocos2d::Vec2 *arg1; /** positionFromCorner */ olua_to_object(L, 1, &self, "ccui.ScrollView"); olua_check_object(L, 2, &arg1, "cc.Vec2"); // void setScrollBarPositionFromCorner(const cocos2d::Vec2 &positionFromCorner) - self->setScrollBarPositionFromCorner(arg1); + self->setScrollBarPositionFromCorner(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_ui_ScrollView_setScrollBarPositionFromCornerForHorizontal(lua_State *L) +static int _olua_fun_cocos2d_ui_ScrollView_setScrollBarPositionFromCornerForHorizontal(lua_State *L) { olua_startinvoke(L); cocos2d::ui::ScrollView *self = nullptr; - cocos2d::Vec2 arg1; /** positionFromCorner */ + cocos2d::Vec2 *arg1; /** positionFromCorner */ olua_to_object(L, 1, &self, "ccui.ScrollView"); olua_check_object(L, 2, &arg1, "cc.Vec2"); // void setScrollBarPositionFromCornerForHorizontal(const cocos2d::Vec2 &positionFromCorner) - self->setScrollBarPositionFromCornerForHorizontal(arg1); + self->setScrollBarPositionFromCornerForHorizontal(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_ui_ScrollView_setScrollBarPositionFromCornerForVertical(lua_State *L) +static int _olua_fun_cocos2d_ui_ScrollView_setScrollBarPositionFromCornerForVertical(lua_State *L) { olua_startinvoke(L); cocos2d::ui::ScrollView *self = nullptr; - cocos2d::Vec2 arg1; /** positionFromCorner */ + cocos2d::Vec2 *arg1; /** positionFromCorner */ olua_to_object(L, 1, &self, "ccui.ScrollView"); olua_check_object(L, 2, &arg1, "cc.Vec2"); // void setScrollBarPositionFromCornerForVertical(const cocos2d::Vec2 &positionFromCorner) - self->setScrollBarPositionFromCornerForVertical(arg1); + self->setScrollBarPositionFromCornerForVertical(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_ui_ScrollView_setScrollBarWidth(lua_State *L) +static int _olua_fun_cocos2d_ui_ScrollView_setScrollBarWidth(lua_State *L) { olua_startinvoke(L); @@ -10284,7 +10809,7 @@ static int _cocos2d_ui_ScrollView_setScrollBarWidth(lua_State *L) return 0; } -static int _cocos2d_ui_ScrollView_setTouchTotalTimeThreshold(lua_State *L) +static int _olua_fun_cocos2d_ui_ScrollView_setTouchTotalTimeThreshold(lua_State *L) { olua_startinvoke(L); @@ -10302,7 +10827,7 @@ static int _cocos2d_ui_ScrollView_setTouchTotalTimeThreshold(lua_State *L) return 0; } -static int _cocos2d_ui_ScrollView_stopAutoScroll(lua_State *L) +static int _olua_fun_cocos2d_ui_ScrollView_stopAutoScroll(lua_State *L) { olua_startinvoke(L); @@ -10318,7 +10843,7 @@ static int _cocos2d_ui_ScrollView_stopAutoScroll(lua_State *L) return 0; } -static int _cocos2d_ui_ScrollView_stopOverallScroll(lua_State *L) +static int _olua_fun_cocos2d_ui_ScrollView_stopOverallScroll(lua_State *L) { olua_startinvoke(L); @@ -10334,7 +10859,7 @@ static int _cocos2d_ui_ScrollView_stopOverallScroll(lua_State *L) return 0; } -static int _cocos2d_ui_ScrollView_stopScroll(lua_State *L) +static int _olua_fun_cocos2d_ui_ScrollView_stopScroll(lua_State *L) { olua_startinvoke(L); @@ -10350,101 +10875,109 @@ static int _cocos2d_ui_ScrollView_stopScroll(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ui_ScrollView(lua_State *L) +static int _olua_cls_ccui_ScrollView(lua_State *L) { oluacls_class(L, "ccui.ScrollView"); - oluacls_func(L, "addEventListener", _cocos2d_ui_ScrollView_addEventListener); - oluacls_func(L, "create", _cocos2d_ui_ScrollView_create); - oluacls_func(L, "createInstance", _cocos2d_ui_ScrollView_createInstance); - oluacls_func(L, "getDirection", _cocos2d_ui_ScrollView_getDirection); - oluacls_func(L, "getInnerContainer", _cocos2d_ui_ScrollView_getInnerContainer); - oluacls_func(L, "getInnerContainerPosition", _cocos2d_ui_ScrollView_getInnerContainerPosition); - oluacls_func(L, "getInnerContainerSize", _cocos2d_ui_ScrollView_getInnerContainerSize); - oluacls_func(L, "getScrollBarAutoHideTime", _cocos2d_ui_ScrollView_getScrollBarAutoHideTime); - oluacls_func(L, "getScrollBarColor", _cocos2d_ui_ScrollView_getScrollBarColor); - oluacls_func(L, "getScrollBarOpacity", _cocos2d_ui_ScrollView_getScrollBarOpacity); - oluacls_func(L, "getScrollBarPositionFromCornerForHorizontal", _cocos2d_ui_ScrollView_getScrollBarPositionFromCornerForHorizontal); - oluacls_func(L, "getScrollBarPositionFromCornerForVertical", _cocos2d_ui_ScrollView_getScrollBarPositionFromCornerForVertical); - oluacls_func(L, "getScrollBarWidth", _cocos2d_ui_ScrollView_getScrollBarWidth); - oluacls_func(L, "getScrolledPercentBothDirection", _cocos2d_ui_ScrollView_getScrolledPercentBothDirection); - oluacls_func(L, "getScrolledPercentHorizontal", _cocos2d_ui_ScrollView_getScrolledPercentHorizontal); - oluacls_func(L, "getScrolledPercentVertical", _cocos2d_ui_ScrollView_getScrolledPercentVertical); - oluacls_func(L, "getTouchTotalTimeThreshold", _cocos2d_ui_ScrollView_getTouchTotalTimeThreshold); - oluacls_func(L, "isAutoScrolling", _cocos2d_ui_ScrollView_isAutoScrolling); - oluacls_func(L, "isBounceEnabled", _cocos2d_ui_ScrollView_isBounceEnabled); - oluacls_func(L, "isInertiaScrollEnabled", _cocos2d_ui_ScrollView_isInertiaScrollEnabled); - oluacls_func(L, "isScrollBarAutoHideEnabled", _cocos2d_ui_ScrollView_isScrollBarAutoHideEnabled); - oluacls_func(L, "isScrollBarEnabled", _cocos2d_ui_ScrollView_isScrollBarEnabled); - oluacls_func(L, "isScrolling", _cocos2d_ui_ScrollView_isScrolling); - oluacls_func(L, "jumpToBottom", _cocos2d_ui_ScrollView_jumpToBottom); - oluacls_func(L, "jumpToBottomLeft", _cocos2d_ui_ScrollView_jumpToBottomLeft); - oluacls_func(L, "jumpToBottomRight", _cocos2d_ui_ScrollView_jumpToBottomRight); - oluacls_func(L, "jumpToLeft", _cocos2d_ui_ScrollView_jumpToLeft); - oluacls_func(L, "jumpToPercentBothDirection", _cocos2d_ui_ScrollView_jumpToPercentBothDirection); - oluacls_func(L, "jumpToPercentHorizontal", _cocos2d_ui_ScrollView_jumpToPercentHorizontal); - oluacls_func(L, "jumpToPercentVertical", _cocos2d_ui_ScrollView_jumpToPercentVertical); - oluacls_func(L, "jumpToRight", _cocos2d_ui_ScrollView_jumpToRight); - oluacls_func(L, "jumpToTop", _cocos2d_ui_ScrollView_jumpToTop); - oluacls_func(L, "jumpToTopLeft", _cocos2d_ui_ScrollView_jumpToTopLeft); - oluacls_func(L, "jumpToTopRight", _cocos2d_ui_ScrollView_jumpToTopRight); - oluacls_func(L, "new", _cocos2d_ui_ScrollView_new); - oluacls_func(L, "scrollToBottom", _cocos2d_ui_ScrollView_scrollToBottom); - oluacls_func(L, "scrollToBottomLeft", _cocos2d_ui_ScrollView_scrollToBottomLeft); - oluacls_func(L, "scrollToBottomRight", _cocos2d_ui_ScrollView_scrollToBottomRight); - oluacls_func(L, "scrollToLeft", _cocos2d_ui_ScrollView_scrollToLeft); - oluacls_func(L, "scrollToPercentBothDirection", _cocos2d_ui_ScrollView_scrollToPercentBothDirection); - oluacls_func(L, "scrollToPercentHorizontal", _cocos2d_ui_ScrollView_scrollToPercentHorizontal); - oluacls_func(L, "scrollToPercentVertical", _cocos2d_ui_ScrollView_scrollToPercentVertical); - oluacls_func(L, "scrollToRight", _cocos2d_ui_ScrollView_scrollToRight); - oluacls_func(L, "scrollToTop", _cocos2d_ui_ScrollView_scrollToTop); - oluacls_func(L, "scrollToTopLeft", _cocos2d_ui_ScrollView_scrollToTopLeft); - oluacls_func(L, "scrollToTopRight", _cocos2d_ui_ScrollView_scrollToTopRight); - oluacls_func(L, "setBounceEnabled", _cocos2d_ui_ScrollView_setBounceEnabled); - oluacls_func(L, "setDirection", _cocos2d_ui_ScrollView_setDirection); - oluacls_func(L, "setInertiaScrollEnabled", _cocos2d_ui_ScrollView_setInertiaScrollEnabled); - oluacls_func(L, "setInnerContainerPosition", _cocos2d_ui_ScrollView_setInnerContainerPosition); - oluacls_func(L, "setInnerContainerSize", _cocos2d_ui_ScrollView_setInnerContainerSize); - oluacls_func(L, "setScrollBarAutoHideEnabled", _cocos2d_ui_ScrollView_setScrollBarAutoHideEnabled); - oluacls_func(L, "setScrollBarAutoHideTime", _cocos2d_ui_ScrollView_setScrollBarAutoHideTime); - oluacls_func(L, "setScrollBarColor", _cocos2d_ui_ScrollView_setScrollBarColor); - oluacls_func(L, "setScrollBarEnabled", _cocos2d_ui_ScrollView_setScrollBarEnabled); - oluacls_func(L, "setScrollBarOpacity", _cocos2d_ui_ScrollView_setScrollBarOpacity); - oluacls_func(L, "setScrollBarPositionFromCorner", _cocos2d_ui_ScrollView_setScrollBarPositionFromCorner); - oluacls_func(L, "setScrollBarPositionFromCornerForHorizontal", _cocos2d_ui_ScrollView_setScrollBarPositionFromCornerForHorizontal); - oluacls_func(L, "setScrollBarPositionFromCornerForVertical", _cocos2d_ui_ScrollView_setScrollBarPositionFromCornerForVertical); - oluacls_func(L, "setScrollBarWidth", _cocos2d_ui_ScrollView_setScrollBarWidth); - oluacls_func(L, "setTouchTotalTimeThreshold", _cocos2d_ui_ScrollView_setTouchTotalTimeThreshold); - oluacls_func(L, "stopAutoScroll", _cocos2d_ui_ScrollView_stopAutoScroll); - oluacls_func(L, "stopOverallScroll", _cocos2d_ui_ScrollView_stopOverallScroll); - oluacls_func(L, "stopScroll", _cocos2d_ui_ScrollView_stopScroll); - oluacls_prop(L, "autoScrolling", _cocos2d_ui_ScrollView_isAutoScrolling, nullptr); - oluacls_prop(L, "bounceEnabled", _cocos2d_ui_ScrollView_isBounceEnabled, _cocos2d_ui_ScrollView_setBounceEnabled); - oluacls_prop(L, "direction", _cocos2d_ui_ScrollView_getDirection, _cocos2d_ui_ScrollView_setDirection); - oluacls_prop(L, "inertiaScrollEnabled", _cocos2d_ui_ScrollView_isInertiaScrollEnabled, _cocos2d_ui_ScrollView_setInertiaScrollEnabled); - oluacls_prop(L, "innerContainer", _cocos2d_ui_ScrollView_getInnerContainer, nullptr); - oluacls_prop(L, "innerContainerPosition", _cocos2d_ui_ScrollView_getInnerContainerPosition, _cocos2d_ui_ScrollView_setInnerContainerPosition); - oluacls_prop(L, "innerContainerSize", _cocos2d_ui_ScrollView_getInnerContainerSize, _cocos2d_ui_ScrollView_setInnerContainerSize); - oluacls_prop(L, "scrollBarAutoHideEnabled", _cocos2d_ui_ScrollView_isScrollBarAutoHideEnabled, _cocos2d_ui_ScrollView_setScrollBarAutoHideEnabled); - oluacls_prop(L, "scrollBarAutoHideTime", _cocos2d_ui_ScrollView_getScrollBarAutoHideTime, _cocos2d_ui_ScrollView_setScrollBarAutoHideTime); - oluacls_prop(L, "scrollBarColor", _cocos2d_ui_ScrollView_getScrollBarColor, _cocos2d_ui_ScrollView_setScrollBarColor); - oluacls_prop(L, "scrollBarEnabled", _cocos2d_ui_ScrollView_isScrollBarEnabled, _cocos2d_ui_ScrollView_setScrollBarEnabled); - oluacls_prop(L, "scrollBarOpacity", _cocos2d_ui_ScrollView_getScrollBarOpacity, _cocos2d_ui_ScrollView_setScrollBarOpacity); - oluacls_prop(L, "scrollBarPositionFromCornerForHorizontal", _cocos2d_ui_ScrollView_getScrollBarPositionFromCornerForHorizontal, _cocos2d_ui_ScrollView_setScrollBarPositionFromCornerForHorizontal); - oluacls_prop(L, "scrollBarPositionFromCornerForVertical", _cocos2d_ui_ScrollView_getScrollBarPositionFromCornerForVertical, _cocos2d_ui_ScrollView_setScrollBarPositionFromCornerForVertical); - oluacls_prop(L, "scrollBarWidth", _cocos2d_ui_ScrollView_getScrollBarWidth, _cocos2d_ui_ScrollView_setScrollBarWidth); - oluacls_prop(L, "scrolledPercentBothDirection", _cocos2d_ui_ScrollView_getScrolledPercentBothDirection, nullptr); - oluacls_prop(L, "scrolledPercentHorizontal", _cocos2d_ui_ScrollView_getScrolledPercentHorizontal, nullptr); - oluacls_prop(L, "scrolledPercentVertical", _cocos2d_ui_ScrollView_getScrolledPercentVertical, nullptr); - oluacls_prop(L, "scrolling", _cocos2d_ui_ScrollView_isScrolling, nullptr); - oluacls_prop(L, "touchTotalTimeThreshold", _cocos2d_ui_ScrollView_getTouchTotalTimeThreshold, _cocos2d_ui_ScrollView_setTouchTotalTimeThreshold); + oluacls_func(L, "addEventListener", _olua_fun_cocos2d_ui_ScrollView_addEventListener); + oluacls_func(L, "create", _olua_fun_cocos2d_ui_ScrollView_create); + oluacls_func(L, "createInstance", _olua_fun_cocos2d_ui_ScrollView_createInstance); + oluacls_func(L, "getDirection", _olua_fun_cocos2d_ui_ScrollView_getDirection); + oluacls_func(L, "getInnerContainer", _olua_fun_cocos2d_ui_ScrollView_getInnerContainer); + oluacls_func(L, "getInnerContainerPosition", _olua_fun_cocos2d_ui_ScrollView_getInnerContainerPosition); + oluacls_func(L, "getInnerContainerSize", _olua_fun_cocos2d_ui_ScrollView_getInnerContainerSize); + oluacls_func(L, "getScrollBarAutoHideTime", _olua_fun_cocos2d_ui_ScrollView_getScrollBarAutoHideTime); + oluacls_func(L, "getScrollBarColor", _olua_fun_cocos2d_ui_ScrollView_getScrollBarColor); + oluacls_func(L, "getScrollBarOpacity", _olua_fun_cocos2d_ui_ScrollView_getScrollBarOpacity); + oluacls_func(L, "getScrollBarPositionFromCornerForHorizontal", _olua_fun_cocos2d_ui_ScrollView_getScrollBarPositionFromCornerForHorizontal); + oluacls_func(L, "getScrollBarPositionFromCornerForVertical", _olua_fun_cocos2d_ui_ScrollView_getScrollBarPositionFromCornerForVertical); + oluacls_func(L, "getScrollBarWidth", _olua_fun_cocos2d_ui_ScrollView_getScrollBarWidth); + oluacls_func(L, "getScrolledPercentBothDirection", _olua_fun_cocos2d_ui_ScrollView_getScrolledPercentBothDirection); + oluacls_func(L, "getScrolledPercentHorizontal", _olua_fun_cocos2d_ui_ScrollView_getScrolledPercentHorizontal); + oluacls_func(L, "getScrolledPercentVertical", _olua_fun_cocos2d_ui_ScrollView_getScrolledPercentVertical); + oluacls_func(L, "getTouchTotalTimeThreshold", _olua_fun_cocos2d_ui_ScrollView_getTouchTotalTimeThreshold); + oluacls_func(L, "isAutoScrolling", _olua_fun_cocos2d_ui_ScrollView_isAutoScrolling); + oluacls_func(L, "isBounceEnabled", _olua_fun_cocos2d_ui_ScrollView_isBounceEnabled); + oluacls_func(L, "isInertiaScrollEnabled", _olua_fun_cocos2d_ui_ScrollView_isInertiaScrollEnabled); + oluacls_func(L, "isScrollBarAutoHideEnabled", _olua_fun_cocos2d_ui_ScrollView_isScrollBarAutoHideEnabled); + oluacls_func(L, "isScrollBarEnabled", _olua_fun_cocos2d_ui_ScrollView_isScrollBarEnabled); + oluacls_func(L, "isScrolling", _olua_fun_cocos2d_ui_ScrollView_isScrolling); + oluacls_func(L, "jumpToBottom", _olua_fun_cocos2d_ui_ScrollView_jumpToBottom); + oluacls_func(L, "jumpToBottomLeft", _olua_fun_cocos2d_ui_ScrollView_jumpToBottomLeft); + oluacls_func(L, "jumpToBottomRight", _olua_fun_cocos2d_ui_ScrollView_jumpToBottomRight); + oluacls_func(L, "jumpToLeft", _olua_fun_cocos2d_ui_ScrollView_jumpToLeft); + oluacls_func(L, "jumpToPercentBothDirection", _olua_fun_cocos2d_ui_ScrollView_jumpToPercentBothDirection); + oluacls_func(L, "jumpToPercentHorizontal", _olua_fun_cocos2d_ui_ScrollView_jumpToPercentHorizontal); + oluacls_func(L, "jumpToPercentVertical", _olua_fun_cocos2d_ui_ScrollView_jumpToPercentVertical); + oluacls_func(L, "jumpToRight", _olua_fun_cocos2d_ui_ScrollView_jumpToRight); + oluacls_func(L, "jumpToTop", _olua_fun_cocos2d_ui_ScrollView_jumpToTop); + oluacls_func(L, "jumpToTopLeft", _olua_fun_cocos2d_ui_ScrollView_jumpToTopLeft); + oluacls_func(L, "jumpToTopRight", _olua_fun_cocos2d_ui_ScrollView_jumpToTopRight); + oluacls_func(L, "new", _olua_fun_cocos2d_ui_ScrollView_new); + oluacls_func(L, "scrollToBottom", _olua_fun_cocos2d_ui_ScrollView_scrollToBottom); + oluacls_func(L, "scrollToBottomLeft", _olua_fun_cocos2d_ui_ScrollView_scrollToBottomLeft); + oluacls_func(L, "scrollToBottomRight", _olua_fun_cocos2d_ui_ScrollView_scrollToBottomRight); + oluacls_func(L, "scrollToLeft", _olua_fun_cocos2d_ui_ScrollView_scrollToLeft); + oluacls_func(L, "scrollToPercentBothDirection", _olua_fun_cocos2d_ui_ScrollView_scrollToPercentBothDirection); + oluacls_func(L, "scrollToPercentHorizontal", _olua_fun_cocos2d_ui_ScrollView_scrollToPercentHorizontal); + oluacls_func(L, "scrollToPercentVertical", _olua_fun_cocos2d_ui_ScrollView_scrollToPercentVertical); + oluacls_func(L, "scrollToRight", _olua_fun_cocos2d_ui_ScrollView_scrollToRight); + oluacls_func(L, "scrollToTop", _olua_fun_cocos2d_ui_ScrollView_scrollToTop); + oluacls_func(L, "scrollToTopLeft", _olua_fun_cocos2d_ui_ScrollView_scrollToTopLeft); + oluacls_func(L, "scrollToTopRight", _olua_fun_cocos2d_ui_ScrollView_scrollToTopRight); + oluacls_func(L, "setBounceEnabled", _olua_fun_cocos2d_ui_ScrollView_setBounceEnabled); + oluacls_func(L, "setDirection", _olua_fun_cocos2d_ui_ScrollView_setDirection); + oluacls_func(L, "setInertiaScrollEnabled", _olua_fun_cocos2d_ui_ScrollView_setInertiaScrollEnabled); + oluacls_func(L, "setInnerContainerPosition", _olua_fun_cocos2d_ui_ScrollView_setInnerContainerPosition); + oluacls_func(L, "setInnerContainerSize", _olua_fun_cocos2d_ui_ScrollView_setInnerContainerSize); + oluacls_func(L, "setScrollBarAutoHideEnabled", _olua_fun_cocos2d_ui_ScrollView_setScrollBarAutoHideEnabled); + oluacls_func(L, "setScrollBarAutoHideTime", _olua_fun_cocos2d_ui_ScrollView_setScrollBarAutoHideTime); + oluacls_func(L, "setScrollBarColor", _olua_fun_cocos2d_ui_ScrollView_setScrollBarColor); + oluacls_func(L, "setScrollBarEnabled", _olua_fun_cocos2d_ui_ScrollView_setScrollBarEnabled); + oluacls_func(L, "setScrollBarOpacity", _olua_fun_cocos2d_ui_ScrollView_setScrollBarOpacity); + oluacls_func(L, "setScrollBarPositionFromCorner", _olua_fun_cocos2d_ui_ScrollView_setScrollBarPositionFromCorner); + oluacls_func(L, "setScrollBarPositionFromCornerForHorizontal", _olua_fun_cocos2d_ui_ScrollView_setScrollBarPositionFromCornerForHorizontal); + oluacls_func(L, "setScrollBarPositionFromCornerForVertical", _olua_fun_cocos2d_ui_ScrollView_setScrollBarPositionFromCornerForVertical); + oluacls_func(L, "setScrollBarWidth", _olua_fun_cocos2d_ui_ScrollView_setScrollBarWidth); + oluacls_func(L, "setTouchTotalTimeThreshold", _olua_fun_cocos2d_ui_ScrollView_setTouchTotalTimeThreshold); + oluacls_func(L, "stopAutoScroll", _olua_fun_cocos2d_ui_ScrollView_stopAutoScroll); + oluacls_func(L, "stopOverallScroll", _olua_fun_cocos2d_ui_ScrollView_stopOverallScroll); + oluacls_func(L, "stopScroll", _olua_fun_cocos2d_ui_ScrollView_stopScroll); + oluacls_prop(L, "autoScrolling", _olua_fun_cocos2d_ui_ScrollView_isAutoScrolling, nullptr); + oluacls_prop(L, "bounceEnabled", _olua_fun_cocos2d_ui_ScrollView_isBounceEnabled, _olua_fun_cocos2d_ui_ScrollView_setBounceEnabled); + oluacls_prop(L, "direction", _olua_fun_cocos2d_ui_ScrollView_getDirection, _olua_fun_cocos2d_ui_ScrollView_setDirection); + oluacls_prop(L, "inertiaScrollEnabled", _olua_fun_cocos2d_ui_ScrollView_isInertiaScrollEnabled, _olua_fun_cocos2d_ui_ScrollView_setInertiaScrollEnabled); + oluacls_prop(L, "innerContainer", _olua_fun_cocos2d_ui_ScrollView_getInnerContainer, nullptr); + oluacls_prop(L, "innerContainerPosition", _olua_fun_cocos2d_ui_ScrollView_getInnerContainerPosition, _olua_fun_cocos2d_ui_ScrollView_setInnerContainerPosition); + oluacls_prop(L, "innerContainerSize", _olua_fun_cocos2d_ui_ScrollView_getInnerContainerSize, _olua_fun_cocos2d_ui_ScrollView_setInnerContainerSize); + oluacls_prop(L, "scrollBarAutoHideEnabled", _olua_fun_cocos2d_ui_ScrollView_isScrollBarAutoHideEnabled, _olua_fun_cocos2d_ui_ScrollView_setScrollBarAutoHideEnabled); + oluacls_prop(L, "scrollBarAutoHideTime", _olua_fun_cocos2d_ui_ScrollView_getScrollBarAutoHideTime, _olua_fun_cocos2d_ui_ScrollView_setScrollBarAutoHideTime); + oluacls_prop(L, "scrollBarColor", _olua_fun_cocos2d_ui_ScrollView_getScrollBarColor, _olua_fun_cocos2d_ui_ScrollView_setScrollBarColor); + oluacls_prop(L, "scrollBarEnabled", _olua_fun_cocos2d_ui_ScrollView_isScrollBarEnabled, _olua_fun_cocos2d_ui_ScrollView_setScrollBarEnabled); + oluacls_prop(L, "scrollBarOpacity", _olua_fun_cocos2d_ui_ScrollView_getScrollBarOpacity, _olua_fun_cocos2d_ui_ScrollView_setScrollBarOpacity); + oluacls_prop(L, "scrollBarPositionFromCornerForHorizontal", _olua_fun_cocos2d_ui_ScrollView_getScrollBarPositionFromCornerForHorizontal, _olua_fun_cocos2d_ui_ScrollView_setScrollBarPositionFromCornerForHorizontal); + oluacls_prop(L, "scrollBarPositionFromCornerForVertical", _olua_fun_cocos2d_ui_ScrollView_getScrollBarPositionFromCornerForVertical, _olua_fun_cocos2d_ui_ScrollView_setScrollBarPositionFromCornerForVertical); + oluacls_prop(L, "scrollBarWidth", _olua_fun_cocos2d_ui_ScrollView_getScrollBarWidth, _olua_fun_cocos2d_ui_ScrollView_setScrollBarWidth); + oluacls_prop(L, "scrolledPercentBothDirection", _olua_fun_cocos2d_ui_ScrollView_getScrolledPercentBothDirection, nullptr); + oluacls_prop(L, "scrolledPercentHorizontal", _olua_fun_cocos2d_ui_ScrollView_getScrolledPercentHorizontal, nullptr); + oluacls_prop(L, "scrolledPercentVertical", _olua_fun_cocos2d_ui_ScrollView_getScrolledPercentVertical, nullptr); + oluacls_prop(L, "scrolling", _olua_fun_cocos2d_ui_ScrollView_isScrolling, nullptr); + oluacls_prop(L, "touchTotalTimeThreshold", _olua_fun_cocos2d_ui_ScrollView_getTouchTotalTimeThreshold, _olua_fun_cocos2d_ui_ScrollView_setTouchTotalTimeThreshold); return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ui_ListView_Gravity(lua_State *L) +OLUA_LIB int luaopen_ccui_ScrollView(lua_State *L) +{ + olua_require(L, "cocos2d_ui", luaopen_cocos2d_ui); + if (!olua_getclass(L, "ccui.ScrollView")) { + luaL_error(L, "class not found: cocos2d::ui::ScrollView"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_ccui_ListView_Gravity(lua_State *L) { oluacls_class(L, "ccui.ListView.Gravity"); oluacls_func(L, "__index", olua_indexerror); @@ -10458,10 +10991,19 @@ OLUA_LIB int luaopen_cocos2d_ui_ListView_Gravity(lua_State *L) return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ui_ListView_EventType(lua_State *L) +OLUA_LIB int luaopen_ccui_ListView_Gravity(lua_State *L) +{ + olua_require(L, "cocos2d_ui", luaopen_cocos2d_ui); + if (!olua_getclass(L, "ccui.ListView.Gravity")) { + luaL_error(L, "class not found: cocos2d::ui::ListView::Gravity"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_ccui_ListView_EventType(lua_State *L) { oluacls_class(L, "ccui.ListView.EventType"); oluacls_func(L, "__index", olua_indexerror); @@ -10471,10 +11013,19 @@ OLUA_LIB int luaopen_cocos2d_ui_ListView_EventType(lua_State *L) return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ui_ListView_MagneticType(lua_State *L) +OLUA_LIB int luaopen_ccui_ListView_EventType(lua_State *L) +{ + olua_require(L, "cocos2d_ui", luaopen_cocos2d_ui); + if (!olua_getclass(L, "ccui.ListView.EventType")) { + luaL_error(L, "class not found: cocos2d::ui::ListView::EventType"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_ccui_ListView_MagneticType(lua_State *L) { oluacls_class(L, "ccui.ListView.MagneticType"); oluacls_func(L, "__index", olua_indexerror); @@ -10489,9 +11040,19 @@ OLUA_LIB int luaopen_cocos2d_ui_ListView_MagneticType(lua_State *L) return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccui_ListView_MagneticType(lua_State *L) +{ + olua_require(L, "cocos2d_ui", luaopen_cocos2d_ui); + if (!olua_getclass(L, "ccui.ListView.MagneticType")) { + luaL_error(L, "class not found: cocos2d::ui::ListView::MagneticType"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_ui_ListView_ccListViewCallback___call(lua_State *L) +static int _olua_fun_cocos2d_ui_ListView_ccListViewCallback___call(lua_State *L) { olua_startinvoke(L); @@ -10503,17 +11064,26 @@ static int _cocos2d_ui_ListView_ccListViewCallback___call(lua_State *L) return 1; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ui_ListView_ccListViewCallback(lua_State *L) +static int _olua_cls_ccui_ListView_ccListViewCallback(lua_State *L) { oluacls_class(L, "ccui.ListView.ccListViewCallback"); - oluacls_func(L, "__call", _cocos2d_ui_ListView_ccListViewCallback___call); + oluacls_func(L, "__call", _olua_fun_cocos2d_ui_ListView_ccListViewCallback___call); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccui_ListView_ccListViewCallback(lua_State *L) +{ + olua_require(L, "cocos2d_ui", luaopen_cocos2d_ui); + if (!olua_getclass(L, "ccui.ListView.ccListViewCallback")) { + luaL_error(L, "class not found: cocos2d::ui::ListView::ccListViewCallback"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_ui_ListView_addEventListener$1(lua_State *L) +static int _olua_fun_cocos2d_ui_ListView_addEventListener$1(lua_State *L) { olua_startinvoke(L); @@ -10525,16 +11095,17 @@ static int _cocos2d_ui_ListView_addEventListener$1(lua_State *L) void *cb_store = (void *)self; std::string cb_tag = "ListViewCallback"; - std::string cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + std::string cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](cocos2d::Ref *arg1, cocos2d::ui::ListView::EventType arg2) { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](cocos2d::Ref *cb_arg1, cocos2d::ui::ListView::EventType cb_arg2) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); if (olua_contextequal(L, cb_ctx)) { int top = lua_gettop(L); - olua_push_object(L, arg1, "cc.Ref"); - olua_push_enum(L, arg2); + olua_push_object(L, cb_arg1, "cc.Ref"); + olua_push_enum(L, cb_arg2); olua_callback(L, cb_store, cb_name.c_str(), 2); @@ -10550,7 +11121,7 @@ static int _cocos2d_ui_ListView_addEventListener$1(lua_State *L) return 0; } -static int _cocos2d_ui_ListView_addEventListener$2(lua_State *L) +static int _olua_fun_cocos2d_ui_ListView_addEventListener$2(lua_State *L) { olua_startinvoke(L); @@ -10561,17 +11132,18 @@ static int _cocos2d_ui_ListView_addEventListener$2(lua_State *L) olua_check_callback(L, 2, &arg1, "ccui.ScrollView.ccScrollViewCallback"); void *cb_store = (void *)self; - std::string cb_tag = "ListViewCallback" + std::string(".using"); - std::string cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + std::string cb_tag = "scrollViewCallback" + std::string(".using"); + std::string cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](cocos2d::Ref *arg1, cocos2d::ui::ScrollView::EventType arg2) { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](cocos2d::Ref *cb_arg1, cocos2d::ui::ScrollView::EventType cb_arg2) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); if (olua_contextequal(L, cb_ctx)) { int top = lua_gettop(L); - olua_push_object(L, arg1, "cc.Ref"); - olua_push_enum(L, arg2); + olua_push_object(L, cb_arg1, "cc.Ref"); + olua_push_enum(L, cb_arg2); olua_callback(L, cb_store, cb_name.c_str(), 2); @@ -10587,19 +11159,19 @@ static int _cocos2d_ui_ListView_addEventListener$2(lua_State *L) return 0; } -static int _cocos2d_ui_ListView_addEventListener(lua_State *L) +static int _olua_fun_cocos2d_ui_ListView_addEventListener(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { if ((olua_is_callback(L, 2, "ccui.ListView.ccListViewCallback"))) { // void addEventListener(const cocos2d::ui::ListView::ccListViewCallback &callback) - return _cocos2d_ui_ListView_addEventListener$1(L); + return _olua_fun_cocos2d_ui_ListView_addEventListener$1(L); } // if ((olua_is_callback(L, 2, "ccui.ScrollView.ccScrollViewCallback"))) { // @using void addEventListener(const cocos2d::ui::ScrollView::ccScrollViewCallback &callback) - return _cocos2d_ui_ListView_addEventListener$2(L); + return _olua_fun_cocos2d_ui_ListView_addEventListener$2(L); // } } @@ -10608,7 +11180,7 @@ static int _cocos2d_ui_ListView_addEventListener(lua_State *L) return 0; } -static int _cocos2d_ui_ListView_create(lua_State *L) +static int _olua_fun_cocos2d_ui_ListView_create(lua_State *L) { olua_startinvoke(L); @@ -10621,7 +11193,7 @@ static int _cocos2d_ui_ListView_create(lua_State *L) return num_ret; } -static int _cocos2d_ui_ListView_createInstance(lua_State *L) +static int _olua_fun_cocos2d_ui_ListView_createInstance(lua_State *L) { olua_startinvoke(L); @@ -10634,7 +11206,7 @@ static int _cocos2d_ui_ListView_createInstance(lua_State *L) return num_ret; } -static int _cocos2d_ui_ListView_doLayout(lua_State *L) +static int _olua_fun_cocos2d_ui_ListView_doLayout(lua_State *L) { olua_startinvoke(L); @@ -10650,7 +11222,7 @@ static int _cocos2d_ui_ListView_doLayout(lua_State *L) return 0; } -static int _cocos2d_ui_ListView_getBottomPadding(lua_State *L) +static int _olua_fun_cocos2d_ui_ListView_getBottomPadding(lua_State *L) { olua_startinvoke(L); @@ -10667,7 +11239,7 @@ static int _cocos2d_ui_ListView_getBottomPadding(lua_State *L) return num_ret; } -static int _cocos2d_ui_ListView_getBottommostItemInCurrentView(lua_State *L) +static int _olua_fun_cocos2d_ui_ListView_getBottommostItemInCurrentView(lua_State *L) { olua_startinvoke(L); @@ -10684,7 +11256,7 @@ static int _cocos2d_ui_ListView_getBottommostItemInCurrentView(lua_State *L) return num_ret; } -static int _cocos2d_ui_ListView_getCenterItemInCurrentView(lua_State *L) +static int _olua_fun_cocos2d_ui_ListView_getCenterItemInCurrentView(lua_State *L) { olua_startinvoke(L); @@ -10701,20 +11273,20 @@ static int _cocos2d_ui_ListView_getCenterItemInCurrentView(lua_State *L) return num_ret; } -static int _cocos2d_ui_ListView_getClosestItemToPosition(lua_State *L) +static int _olua_fun_cocos2d_ui_ListView_getClosestItemToPosition(lua_State *L) { olua_startinvoke(L); cocos2d::ui::ListView *self = nullptr; - cocos2d::Vec2 arg1; /** targetPosition */ - cocos2d::Vec2 arg2; /** itemAnchorPoint */ + cocos2d::Vec2 *arg1; /** targetPosition */ + cocos2d::Vec2 *arg2; /** itemAnchorPoint */ olua_to_object(L, 1, &self, "ccui.ListView"); olua_check_object(L, 2, &arg1, "cc.Vec2"); olua_check_object(L, 3, &arg2, "cc.Vec2"); // cocos2d::ui::Widget *getClosestItemToPosition(const cocos2d::Vec2 &targetPosition, const cocos2d::Vec2 &itemAnchorPoint) - cocos2d::ui::Widget *ret = self->getClosestItemToPosition(arg1, arg2); + cocos2d::ui::Widget *ret = self->getClosestItemToPosition(*arg1, *arg2); int num_ret = olua_push_object(L, ret, "ccui.Widget"); olua_endinvoke(L); @@ -10722,20 +11294,20 @@ static int _cocos2d_ui_ListView_getClosestItemToPosition(lua_State *L) return num_ret; } -static int _cocos2d_ui_ListView_getClosestItemToPositionInCurrentView(lua_State *L) +static int _olua_fun_cocos2d_ui_ListView_getClosestItemToPositionInCurrentView(lua_State *L) { olua_startinvoke(L); cocos2d::ui::ListView *self = nullptr; - cocos2d::Vec2 arg1; /** positionRatioInView */ - cocos2d::Vec2 arg2; /** itemAnchorPoint */ + cocos2d::Vec2 *arg1; /** positionRatioInView */ + cocos2d::Vec2 *arg2; /** itemAnchorPoint */ olua_to_object(L, 1, &self, "ccui.ListView"); olua_check_object(L, 2, &arg1, "cc.Vec2"); olua_check_object(L, 3, &arg2, "cc.Vec2"); // cocos2d::ui::Widget *getClosestItemToPositionInCurrentView(const cocos2d::Vec2 &positionRatioInView, const cocos2d::Vec2 &itemAnchorPoint) - cocos2d::ui::Widget *ret = self->getClosestItemToPositionInCurrentView(arg1, arg2); + cocos2d::ui::Widget *ret = self->getClosestItemToPositionInCurrentView(*arg1, *arg2); int num_ret = olua_push_object(L, ret, "ccui.Widget"); olua_endinvoke(L); @@ -10743,7 +11315,7 @@ static int _cocos2d_ui_ListView_getClosestItemToPositionInCurrentView(lua_State return num_ret; } -static int _cocos2d_ui_ListView_getCurSelectedIndex(lua_State *L) +static int _olua_fun_cocos2d_ui_ListView_getCurSelectedIndex(lua_State *L) { olua_startinvoke(L); @@ -10760,7 +11332,7 @@ static int _cocos2d_ui_ListView_getCurSelectedIndex(lua_State *L) return num_ret; } -static int _cocos2d_ui_ListView_getIndex(lua_State *L) +static int _olua_fun_cocos2d_ui_ListView_getIndex(lua_State *L) { olua_startinvoke(L); @@ -10779,7 +11351,7 @@ static int _cocos2d_ui_ListView_getIndex(lua_State *L) return num_ret; } -static int _cocos2d_ui_ListView_getItem(lua_State *L) +static int _olua_fun_cocos2d_ui_ListView_getItem(lua_State *L) { olua_startinvoke(L); @@ -10801,7 +11373,7 @@ static int _cocos2d_ui_ListView_getItem(lua_State *L) return num_ret; } -static int _cocos2d_ui_ListView_getItems(lua_State *L) +static int _olua_fun_cocos2d_ui_ListView_getItems(lua_State *L) { olua_startinvoke(L); @@ -10823,7 +11395,7 @@ static int _cocos2d_ui_ListView_getItems(lua_State *L) return num_ret; } -static int _cocos2d_ui_ListView_getItemsMargin(lua_State *L) +static int _olua_fun_cocos2d_ui_ListView_getItemsMargin(lua_State *L) { olua_startinvoke(L); @@ -10840,7 +11412,7 @@ static int _cocos2d_ui_ListView_getItemsMargin(lua_State *L) return num_ret; } -static int _cocos2d_ui_ListView_getLeftPadding(lua_State *L) +static int _olua_fun_cocos2d_ui_ListView_getLeftPadding(lua_State *L) { olua_startinvoke(L); @@ -10857,7 +11429,7 @@ static int _cocos2d_ui_ListView_getLeftPadding(lua_State *L) return num_ret; } -static int _cocos2d_ui_ListView_getLeftmostItemInCurrentView(lua_State *L) +static int _olua_fun_cocos2d_ui_ListView_getLeftmostItemInCurrentView(lua_State *L) { olua_startinvoke(L); @@ -10874,7 +11446,7 @@ static int _cocos2d_ui_ListView_getLeftmostItemInCurrentView(lua_State *L) return num_ret; } -static int _cocos2d_ui_ListView_getMagneticAllowedOutOfBoundary(lua_State *L) +static int _olua_fun_cocos2d_ui_ListView_getMagneticAllowedOutOfBoundary(lua_State *L) { olua_startinvoke(L); @@ -10891,7 +11463,7 @@ static int _cocos2d_ui_ListView_getMagneticAllowedOutOfBoundary(lua_State *L) return num_ret; } -static int _cocos2d_ui_ListView_getMagneticType(lua_State *L) +static int _olua_fun_cocos2d_ui_ListView_getMagneticType(lua_State *L) { olua_startinvoke(L); @@ -10908,7 +11480,7 @@ static int _cocos2d_ui_ListView_getMagneticType(lua_State *L) return num_ret; } -static int _cocos2d_ui_ListView_getRightPadding(lua_State *L) +static int _olua_fun_cocos2d_ui_ListView_getRightPadding(lua_State *L) { olua_startinvoke(L); @@ -10925,7 +11497,7 @@ static int _cocos2d_ui_ListView_getRightPadding(lua_State *L) return num_ret; } -static int _cocos2d_ui_ListView_getRightmostItemInCurrentView(lua_State *L) +static int _olua_fun_cocos2d_ui_ListView_getRightmostItemInCurrentView(lua_State *L) { olua_startinvoke(L); @@ -10942,7 +11514,7 @@ static int _cocos2d_ui_ListView_getRightmostItemInCurrentView(lua_State *L) return num_ret; } -static int _cocos2d_ui_ListView_getScrollDuration(lua_State *L) +static int _olua_fun_cocos2d_ui_ListView_getScrollDuration(lua_State *L) { olua_startinvoke(L); @@ -10959,7 +11531,7 @@ static int _cocos2d_ui_ListView_getScrollDuration(lua_State *L) return num_ret; } -static int _cocos2d_ui_ListView_getTopPadding(lua_State *L) +static int _olua_fun_cocos2d_ui_ListView_getTopPadding(lua_State *L) { olua_startinvoke(L); @@ -10976,7 +11548,7 @@ static int _cocos2d_ui_ListView_getTopPadding(lua_State *L) return num_ret; } -static int _cocos2d_ui_ListView_getTopmostItemInCurrentView(lua_State *L) +static int _olua_fun_cocos2d_ui_ListView_getTopmostItemInCurrentView(lua_State *L) { olua_startinvoke(L); @@ -10993,7 +11565,7 @@ static int _cocos2d_ui_ListView_getTopmostItemInCurrentView(lua_State *L) return num_ret; } -static int _cocos2d_ui_ListView_insertCustomItem(lua_State *L) +static int _olua_fun_cocos2d_ui_ListView_insertCustomItem(lua_State *L) { olua_startinvoke(L); @@ -11016,7 +11588,7 @@ static int _cocos2d_ui_ListView_insertCustomItem(lua_State *L) return 0; } -static int _cocos2d_ui_ListView_insertDefaultItem(lua_State *L) +static int _olua_fun_cocos2d_ui_ListView_insertDefaultItem(lua_State *L) { olua_startinvoke(L); @@ -11034,14 +11606,14 @@ static int _cocos2d_ui_ListView_insertDefaultItem(lua_State *L) return 0; } -static int _cocos2d_ui_ListView_jumpToItem(lua_State *L) +static int _olua_fun_cocos2d_ui_ListView_jumpToItem(lua_State *L) { olua_startinvoke(L); cocos2d::ui::ListView *self = nullptr; ssize_t arg1 = 0; /** itemIndex */ - cocos2d::Vec2 arg2; /** positionRatioInView */ - cocos2d::Vec2 arg3; /** itemAnchorPoint */ + cocos2d::Vec2 *arg2; /** positionRatioInView */ + cocos2d::Vec2 *arg3; /** itemAnchorPoint */ olua_to_object(L, 1, &self, "ccui.ListView"); olua_check_integer(L, 2, &arg1); @@ -11049,18 +11621,18 @@ static int _cocos2d_ui_ListView_jumpToItem(lua_State *L) olua_check_object(L, 4, &arg3, "cc.Vec2"); // void jumpToItem(ssize_t itemIndex, const cocos2d::Vec2 &positionRatioInView, const cocos2d::Vec2 &itemAnchorPoint) - self->jumpToItem(arg1, arg2, arg3); + self->jumpToItem(arg1, *arg2, *arg3); olua_endinvoke(L); return 0; } -static int _cocos2d_ui_ListView_new(lua_State *L) +static int _olua_fun_cocos2d_ui_ListView_new(lua_State *L) { olua_startinvoke(L); - // ListView() + // cocos2d::ui::ListView() cocos2d::ui::ListView *ret = new cocos2d::ui::ListView(); int num_ret = olua_push_object(L, ret, "ccui.ListView"); olua_postnew(L, ret); @@ -11070,7 +11642,7 @@ static int _cocos2d_ui_ListView_new(lua_State *L) return num_ret; } -static int _cocos2d_ui_ListView_pushBackCustomItem(lua_State *L) +static int _olua_fun_cocos2d_ui_ListView_pushBackCustomItem(lua_State *L) { olua_startinvoke(L); @@ -11091,7 +11663,7 @@ static int _cocos2d_ui_ListView_pushBackCustomItem(lua_State *L) return 0; } -static int _cocos2d_ui_ListView_pushBackDefaultItem(lua_State *L) +static int _olua_fun_cocos2d_ui_ListView_pushBackDefaultItem(lua_State *L) { olua_startinvoke(L); @@ -11107,7 +11679,7 @@ static int _cocos2d_ui_ListView_pushBackDefaultItem(lua_State *L) return 0; } -static int _cocos2d_ui_ListView_removeAllItems(lua_State *L) +static int _olua_fun_cocos2d_ui_ListView_removeAllItems(lua_State *L) { olua_startinvoke(L); @@ -11129,7 +11701,7 @@ static int _cocos2d_ui_ListView_removeAllItems(lua_State *L) return 0; } -static int _cocos2d_ui_ListView_removeItem(lua_State *L) +static int _olua_fun_cocos2d_ui_ListView_removeItem(lua_State *L) { olua_startinvoke(L); @@ -11153,7 +11725,7 @@ static int _cocos2d_ui_ListView_removeItem(lua_State *L) return 0; } -static int _cocos2d_ui_ListView_removeLastItem(lua_State *L) +static int _olua_fun_cocos2d_ui_ListView_removeLastItem(lua_State *L) { olua_startinvoke(L); @@ -11175,14 +11747,14 @@ static int _cocos2d_ui_ListView_removeLastItem(lua_State *L) return 0; } -static int _cocos2d_ui_ListView_scrollToItem$1(lua_State *L) +static int _olua_fun_cocos2d_ui_ListView_scrollToItem$1(lua_State *L) { olua_startinvoke(L); cocos2d::ui::ListView *self = nullptr; ssize_t arg1 = 0; /** itemIndex */ - cocos2d::Vec2 arg2; /** positionRatioInView */ - cocos2d::Vec2 arg3; /** itemAnchorPoint */ + cocos2d::Vec2 *arg2; /** positionRatioInView */ + cocos2d::Vec2 *arg3; /** itemAnchorPoint */ olua_to_object(L, 1, &self, "ccui.ListView"); olua_check_integer(L, 2, &arg1); @@ -11190,21 +11762,21 @@ static int _cocos2d_ui_ListView_scrollToItem$1(lua_State *L) olua_check_object(L, 4, &arg3, "cc.Vec2"); // void scrollToItem(ssize_t itemIndex, const cocos2d::Vec2 &positionRatioInView, const cocos2d::Vec2 &itemAnchorPoint) - self->scrollToItem(arg1, arg2, arg3); + self->scrollToItem(arg1, *arg2, *arg3); olua_endinvoke(L); return 0; } -static int _cocos2d_ui_ListView_scrollToItem$2(lua_State *L) +static int _olua_fun_cocos2d_ui_ListView_scrollToItem$2(lua_State *L) { olua_startinvoke(L); cocos2d::ui::ListView *self = nullptr; ssize_t arg1 = 0; /** itemIndex */ - cocos2d::Vec2 arg2; /** positionRatioInView */ - cocos2d::Vec2 arg3; /** itemAnchorPoint */ + cocos2d::Vec2 *arg2; /** positionRatioInView */ + cocos2d::Vec2 *arg3; /** itemAnchorPoint */ float arg4 = 0; /** timeInSec */ olua_to_object(L, 1, &self, "ccui.ListView"); @@ -11214,28 +11786,28 @@ static int _cocos2d_ui_ListView_scrollToItem$2(lua_State *L) olua_check_number(L, 5, &arg4); // void scrollToItem(ssize_t itemIndex, const cocos2d::Vec2 &positionRatioInView, const cocos2d::Vec2 &itemAnchorPoint, float timeInSec) - self->scrollToItem(arg1, arg2, arg3, arg4); + self->scrollToItem(arg1, *arg2, *arg3, arg4); olua_endinvoke(L); return 0; } -static int _cocos2d_ui_ListView_scrollToItem(lua_State *L) +static int _olua_fun_cocos2d_ui_ListView_scrollToItem(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 3) { // if ((olua_is_integer(L, 2)) && (olua_is_object(L, 3, "cc.Vec2")) && (olua_is_object(L, 4, "cc.Vec2"))) { // void scrollToItem(ssize_t itemIndex, const cocos2d::Vec2 &positionRatioInView, const cocos2d::Vec2 &itemAnchorPoint) - return _cocos2d_ui_ListView_scrollToItem$1(L); + return _olua_fun_cocos2d_ui_ListView_scrollToItem$1(L); // } } if (num_args == 4) { // if ((olua_is_integer(L, 2)) && (olua_is_object(L, 3, "cc.Vec2")) && (olua_is_object(L, 4, "cc.Vec2")) && (olua_is_number(L, 5))) { // void scrollToItem(ssize_t itemIndex, const cocos2d::Vec2 &positionRatioInView, const cocos2d::Vec2 &itemAnchorPoint, float timeInSec) - return _cocos2d_ui_ListView_scrollToItem$2(L); + return _olua_fun_cocos2d_ui_ListView_scrollToItem$2(L); // } } @@ -11244,7 +11816,7 @@ static int _cocos2d_ui_ListView_scrollToItem(lua_State *L) return 0; } -static int _cocos2d_ui_ListView_setBottomPadding(lua_State *L) +static int _olua_fun_cocos2d_ui_ListView_setBottomPadding(lua_State *L) { olua_startinvoke(L); @@ -11262,7 +11834,7 @@ static int _cocos2d_ui_ListView_setBottomPadding(lua_State *L) return 0; } -static int _cocos2d_ui_ListView_setCurSelectedIndex(lua_State *L) +static int _olua_fun_cocos2d_ui_ListView_setCurSelectedIndex(lua_State *L) { olua_startinvoke(L); @@ -11280,7 +11852,7 @@ static int _cocos2d_ui_ListView_setCurSelectedIndex(lua_State *L) return 0; } -static int _cocos2d_ui_ListView_setGravity(lua_State *L) +static int _olua_fun_cocos2d_ui_ListView_setGravity(lua_State *L) { olua_startinvoke(L); @@ -11298,7 +11870,7 @@ static int _cocos2d_ui_ListView_setGravity(lua_State *L) return 0; } -static int _cocos2d_ui_ListView_setItemModel(lua_State *L) +static int _olua_fun_cocos2d_ui_ListView_setItemModel(lua_State *L) { olua_startinvoke(L); @@ -11316,7 +11888,7 @@ static int _cocos2d_ui_ListView_setItemModel(lua_State *L) return 0; } -static int _cocos2d_ui_ListView_setItemsMargin(lua_State *L) +static int _olua_fun_cocos2d_ui_ListView_setItemsMargin(lua_State *L) { olua_startinvoke(L); @@ -11334,7 +11906,7 @@ static int _cocos2d_ui_ListView_setItemsMargin(lua_State *L) return 0; } -static int _cocos2d_ui_ListView_setLeftPadding(lua_State *L) +static int _olua_fun_cocos2d_ui_ListView_setLeftPadding(lua_State *L) { olua_startinvoke(L); @@ -11352,7 +11924,7 @@ static int _cocos2d_ui_ListView_setLeftPadding(lua_State *L) return 0; } -static int _cocos2d_ui_ListView_setMagneticAllowedOutOfBoundary(lua_State *L) +static int _olua_fun_cocos2d_ui_ListView_setMagneticAllowedOutOfBoundary(lua_State *L) { olua_startinvoke(L); @@ -11370,7 +11942,7 @@ static int _cocos2d_ui_ListView_setMagneticAllowedOutOfBoundary(lua_State *L) return 0; } -static int _cocos2d_ui_ListView_setMagneticType(lua_State *L) +static int _olua_fun_cocos2d_ui_ListView_setMagneticType(lua_State *L) { olua_startinvoke(L); @@ -11388,7 +11960,7 @@ static int _cocos2d_ui_ListView_setMagneticType(lua_State *L) return 0; } -static int _cocos2d_ui_ListView_setPadding(lua_State *L) +static int _olua_fun_cocos2d_ui_ListView_setPadding(lua_State *L) { olua_startinvoke(L); @@ -11412,7 +11984,7 @@ static int _cocos2d_ui_ListView_setPadding(lua_State *L) return 0; } -static int _cocos2d_ui_ListView_setRightPadding(lua_State *L) +static int _olua_fun_cocos2d_ui_ListView_setRightPadding(lua_State *L) { olua_startinvoke(L); @@ -11430,7 +12002,7 @@ static int _cocos2d_ui_ListView_setRightPadding(lua_State *L) return 0; } -static int _cocos2d_ui_ListView_setScrollDuration(lua_State *L) +static int _olua_fun_cocos2d_ui_ListView_setScrollDuration(lua_State *L) { olua_startinvoke(L); @@ -11448,7 +12020,7 @@ static int _cocos2d_ui_ListView_setScrollDuration(lua_State *L) return 0; } -static int _cocos2d_ui_ListView_setTopPadding(lua_State *L) +static int _olua_fun_cocos2d_ui_ListView_setTopPadding(lua_State *L) { olua_startinvoke(L); @@ -11466,77 +12038,85 @@ static int _cocos2d_ui_ListView_setTopPadding(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ui_ListView(lua_State *L) +static int _olua_cls_ccui_ListView(lua_State *L) { oluacls_class(L, "ccui.ListView"); - oluacls_func(L, "addEventListener", _cocos2d_ui_ListView_addEventListener); - oluacls_func(L, "create", _cocos2d_ui_ListView_create); - oluacls_func(L, "createInstance", _cocos2d_ui_ListView_createInstance); - oluacls_func(L, "doLayout", _cocos2d_ui_ListView_doLayout); - oluacls_func(L, "getBottomPadding", _cocos2d_ui_ListView_getBottomPadding); - oluacls_func(L, "getBottommostItemInCurrentView", _cocos2d_ui_ListView_getBottommostItemInCurrentView); - oluacls_func(L, "getCenterItemInCurrentView", _cocos2d_ui_ListView_getCenterItemInCurrentView); - oluacls_func(L, "getClosestItemToPosition", _cocos2d_ui_ListView_getClosestItemToPosition); - oluacls_func(L, "getClosestItemToPositionInCurrentView", _cocos2d_ui_ListView_getClosestItemToPositionInCurrentView); - oluacls_func(L, "getCurSelectedIndex", _cocos2d_ui_ListView_getCurSelectedIndex); - oluacls_func(L, "getIndex", _cocos2d_ui_ListView_getIndex); - oluacls_func(L, "getItem", _cocos2d_ui_ListView_getItem); - oluacls_func(L, "getItems", _cocos2d_ui_ListView_getItems); - oluacls_func(L, "getItemsMargin", _cocos2d_ui_ListView_getItemsMargin); - oluacls_func(L, "getLeftPadding", _cocos2d_ui_ListView_getLeftPadding); - oluacls_func(L, "getLeftmostItemInCurrentView", _cocos2d_ui_ListView_getLeftmostItemInCurrentView); - oluacls_func(L, "getMagneticAllowedOutOfBoundary", _cocos2d_ui_ListView_getMagneticAllowedOutOfBoundary); - oluacls_func(L, "getMagneticType", _cocos2d_ui_ListView_getMagneticType); - oluacls_func(L, "getRightPadding", _cocos2d_ui_ListView_getRightPadding); - oluacls_func(L, "getRightmostItemInCurrentView", _cocos2d_ui_ListView_getRightmostItemInCurrentView); - oluacls_func(L, "getScrollDuration", _cocos2d_ui_ListView_getScrollDuration); - oluacls_func(L, "getTopPadding", _cocos2d_ui_ListView_getTopPadding); - oluacls_func(L, "getTopmostItemInCurrentView", _cocos2d_ui_ListView_getTopmostItemInCurrentView); - oluacls_func(L, "insertCustomItem", _cocos2d_ui_ListView_insertCustomItem); - oluacls_func(L, "insertDefaultItem", _cocos2d_ui_ListView_insertDefaultItem); - oluacls_func(L, "jumpToItem", _cocos2d_ui_ListView_jumpToItem); - oluacls_func(L, "new", _cocos2d_ui_ListView_new); - oluacls_func(L, "pushBackCustomItem", _cocos2d_ui_ListView_pushBackCustomItem); - oluacls_func(L, "pushBackDefaultItem", _cocos2d_ui_ListView_pushBackDefaultItem); - oluacls_func(L, "removeAllItems", _cocos2d_ui_ListView_removeAllItems); - oluacls_func(L, "removeItem", _cocos2d_ui_ListView_removeItem); - oluacls_func(L, "removeLastItem", _cocos2d_ui_ListView_removeLastItem); - oluacls_func(L, "scrollToItem", _cocos2d_ui_ListView_scrollToItem); - oluacls_func(L, "setBottomPadding", _cocos2d_ui_ListView_setBottomPadding); - oluacls_func(L, "setCurSelectedIndex", _cocos2d_ui_ListView_setCurSelectedIndex); - oluacls_func(L, "setGravity", _cocos2d_ui_ListView_setGravity); - oluacls_func(L, "setItemModel", _cocos2d_ui_ListView_setItemModel); - oluacls_func(L, "setItemsMargin", _cocos2d_ui_ListView_setItemsMargin); - oluacls_func(L, "setLeftPadding", _cocos2d_ui_ListView_setLeftPadding); - oluacls_func(L, "setMagneticAllowedOutOfBoundary", _cocos2d_ui_ListView_setMagneticAllowedOutOfBoundary); - oluacls_func(L, "setMagneticType", _cocos2d_ui_ListView_setMagneticType); - oluacls_func(L, "setPadding", _cocos2d_ui_ListView_setPadding); - oluacls_func(L, "setRightPadding", _cocos2d_ui_ListView_setRightPadding); - oluacls_func(L, "setScrollDuration", _cocos2d_ui_ListView_setScrollDuration); - oluacls_func(L, "setTopPadding", _cocos2d_ui_ListView_setTopPadding); - oluacls_prop(L, "bottomPadding", _cocos2d_ui_ListView_getBottomPadding, _cocos2d_ui_ListView_setBottomPadding); - oluacls_prop(L, "bottommostItemInCurrentView", _cocos2d_ui_ListView_getBottommostItemInCurrentView, nullptr); - oluacls_prop(L, "centerItemInCurrentView", _cocos2d_ui_ListView_getCenterItemInCurrentView, nullptr); - oluacls_prop(L, "curSelectedIndex", _cocos2d_ui_ListView_getCurSelectedIndex, _cocos2d_ui_ListView_setCurSelectedIndex); - oluacls_prop(L, "items", _cocos2d_ui_ListView_getItems, nullptr); - oluacls_prop(L, "itemsMargin", _cocos2d_ui_ListView_getItemsMargin, _cocos2d_ui_ListView_setItemsMargin); - oluacls_prop(L, "leftPadding", _cocos2d_ui_ListView_getLeftPadding, _cocos2d_ui_ListView_setLeftPadding); - oluacls_prop(L, "leftmostItemInCurrentView", _cocos2d_ui_ListView_getLeftmostItemInCurrentView, nullptr); - oluacls_prop(L, "magneticAllowedOutOfBoundary", _cocos2d_ui_ListView_getMagneticAllowedOutOfBoundary, _cocos2d_ui_ListView_setMagneticAllowedOutOfBoundary); - oluacls_prop(L, "magneticType", _cocos2d_ui_ListView_getMagneticType, _cocos2d_ui_ListView_setMagneticType); - oluacls_prop(L, "rightPadding", _cocos2d_ui_ListView_getRightPadding, _cocos2d_ui_ListView_setRightPadding); - oluacls_prop(L, "rightmostItemInCurrentView", _cocos2d_ui_ListView_getRightmostItemInCurrentView, nullptr); - oluacls_prop(L, "scrollDuration", _cocos2d_ui_ListView_getScrollDuration, _cocos2d_ui_ListView_setScrollDuration); - oluacls_prop(L, "topPadding", _cocos2d_ui_ListView_getTopPadding, _cocos2d_ui_ListView_setTopPadding); - oluacls_prop(L, "topmostItemInCurrentView", _cocos2d_ui_ListView_getTopmostItemInCurrentView, nullptr); + oluacls_func(L, "addEventListener", _olua_fun_cocos2d_ui_ListView_addEventListener); + oluacls_func(L, "create", _olua_fun_cocos2d_ui_ListView_create); + oluacls_func(L, "createInstance", _olua_fun_cocos2d_ui_ListView_createInstance); + oluacls_func(L, "doLayout", _olua_fun_cocos2d_ui_ListView_doLayout); + oluacls_func(L, "getBottomPadding", _olua_fun_cocos2d_ui_ListView_getBottomPadding); + oluacls_func(L, "getBottommostItemInCurrentView", _olua_fun_cocos2d_ui_ListView_getBottommostItemInCurrentView); + oluacls_func(L, "getCenterItemInCurrentView", _olua_fun_cocos2d_ui_ListView_getCenterItemInCurrentView); + oluacls_func(L, "getClosestItemToPosition", _olua_fun_cocos2d_ui_ListView_getClosestItemToPosition); + oluacls_func(L, "getClosestItemToPositionInCurrentView", _olua_fun_cocos2d_ui_ListView_getClosestItemToPositionInCurrentView); + oluacls_func(L, "getCurSelectedIndex", _olua_fun_cocos2d_ui_ListView_getCurSelectedIndex); + oluacls_func(L, "getIndex", _olua_fun_cocos2d_ui_ListView_getIndex); + oluacls_func(L, "getItem", _olua_fun_cocos2d_ui_ListView_getItem); + oluacls_func(L, "getItems", _olua_fun_cocos2d_ui_ListView_getItems); + oluacls_func(L, "getItemsMargin", _olua_fun_cocos2d_ui_ListView_getItemsMargin); + oluacls_func(L, "getLeftPadding", _olua_fun_cocos2d_ui_ListView_getLeftPadding); + oluacls_func(L, "getLeftmostItemInCurrentView", _olua_fun_cocos2d_ui_ListView_getLeftmostItemInCurrentView); + oluacls_func(L, "getMagneticAllowedOutOfBoundary", _olua_fun_cocos2d_ui_ListView_getMagneticAllowedOutOfBoundary); + oluacls_func(L, "getMagneticType", _olua_fun_cocos2d_ui_ListView_getMagneticType); + oluacls_func(L, "getRightPadding", _olua_fun_cocos2d_ui_ListView_getRightPadding); + oluacls_func(L, "getRightmostItemInCurrentView", _olua_fun_cocos2d_ui_ListView_getRightmostItemInCurrentView); + oluacls_func(L, "getScrollDuration", _olua_fun_cocos2d_ui_ListView_getScrollDuration); + oluacls_func(L, "getTopPadding", _olua_fun_cocos2d_ui_ListView_getTopPadding); + oluacls_func(L, "getTopmostItemInCurrentView", _olua_fun_cocos2d_ui_ListView_getTopmostItemInCurrentView); + oluacls_func(L, "insertCustomItem", _olua_fun_cocos2d_ui_ListView_insertCustomItem); + oluacls_func(L, "insertDefaultItem", _olua_fun_cocos2d_ui_ListView_insertDefaultItem); + oluacls_func(L, "jumpToItem", _olua_fun_cocos2d_ui_ListView_jumpToItem); + oluacls_func(L, "new", _olua_fun_cocos2d_ui_ListView_new); + oluacls_func(L, "pushBackCustomItem", _olua_fun_cocos2d_ui_ListView_pushBackCustomItem); + oluacls_func(L, "pushBackDefaultItem", _olua_fun_cocos2d_ui_ListView_pushBackDefaultItem); + oluacls_func(L, "removeAllItems", _olua_fun_cocos2d_ui_ListView_removeAllItems); + oluacls_func(L, "removeItem", _olua_fun_cocos2d_ui_ListView_removeItem); + oluacls_func(L, "removeLastItem", _olua_fun_cocos2d_ui_ListView_removeLastItem); + oluacls_func(L, "scrollToItem", _olua_fun_cocos2d_ui_ListView_scrollToItem); + oluacls_func(L, "setBottomPadding", _olua_fun_cocos2d_ui_ListView_setBottomPadding); + oluacls_func(L, "setCurSelectedIndex", _olua_fun_cocos2d_ui_ListView_setCurSelectedIndex); + oluacls_func(L, "setGravity", _olua_fun_cocos2d_ui_ListView_setGravity); + oluacls_func(L, "setItemModel", _olua_fun_cocos2d_ui_ListView_setItemModel); + oluacls_func(L, "setItemsMargin", _olua_fun_cocos2d_ui_ListView_setItemsMargin); + oluacls_func(L, "setLeftPadding", _olua_fun_cocos2d_ui_ListView_setLeftPadding); + oluacls_func(L, "setMagneticAllowedOutOfBoundary", _olua_fun_cocos2d_ui_ListView_setMagneticAllowedOutOfBoundary); + oluacls_func(L, "setMagneticType", _olua_fun_cocos2d_ui_ListView_setMagneticType); + oluacls_func(L, "setPadding", _olua_fun_cocos2d_ui_ListView_setPadding); + oluacls_func(L, "setRightPadding", _olua_fun_cocos2d_ui_ListView_setRightPadding); + oluacls_func(L, "setScrollDuration", _olua_fun_cocos2d_ui_ListView_setScrollDuration); + oluacls_func(L, "setTopPadding", _olua_fun_cocos2d_ui_ListView_setTopPadding); + oluacls_prop(L, "bottomPadding", _olua_fun_cocos2d_ui_ListView_getBottomPadding, _olua_fun_cocos2d_ui_ListView_setBottomPadding); + oluacls_prop(L, "bottommostItemInCurrentView", _olua_fun_cocos2d_ui_ListView_getBottommostItemInCurrentView, nullptr); + oluacls_prop(L, "centerItemInCurrentView", _olua_fun_cocos2d_ui_ListView_getCenterItemInCurrentView, nullptr); + oluacls_prop(L, "curSelectedIndex", _olua_fun_cocos2d_ui_ListView_getCurSelectedIndex, _olua_fun_cocos2d_ui_ListView_setCurSelectedIndex); + oluacls_prop(L, "items", _olua_fun_cocos2d_ui_ListView_getItems, nullptr); + oluacls_prop(L, "itemsMargin", _olua_fun_cocos2d_ui_ListView_getItemsMargin, _olua_fun_cocos2d_ui_ListView_setItemsMargin); + oluacls_prop(L, "leftPadding", _olua_fun_cocos2d_ui_ListView_getLeftPadding, _olua_fun_cocos2d_ui_ListView_setLeftPadding); + oluacls_prop(L, "leftmostItemInCurrentView", _olua_fun_cocos2d_ui_ListView_getLeftmostItemInCurrentView, nullptr); + oluacls_prop(L, "magneticAllowedOutOfBoundary", _olua_fun_cocos2d_ui_ListView_getMagneticAllowedOutOfBoundary, _olua_fun_cocos2d_ui_ListView_setMagneticAllowedOutOfBoundary); + oluacls_prop(L, "magneticType", _olua_fun_cocos2d_ui_ListView_getMagneticType, _olua_fun_cocos2d_ui_ListView_setMagneticType); + oluacls_prop(L, "rightPadding", _olua_fun_cocos2d_ui_ListView_getRightPadding, _olua_fun_cocos2d_ui_ListView_setRightPadding); + oluacls_prop(L, "rightmostItemInCurrentView", _olua_fun_cocos2d_ui_ListView_getRightmostItemInCurrentView, nullptr); + oluacls_prop(L, "scrollDuration", _olua_fun_cocos2d_ui_ListView_getScrollDuration, _olua_fun_cocos2d_ui_ListView_setScrollDuration); + oluacls_prop(L, "topPadding", _olua_fun_cocos2d_ui_ListView_getTopPadding, _olua_fun_cocos2d_ui_ListView_setTopPadding); + oluacls_prop(L, "topmostItemInCurrentView", _olua_fun_cocos2d_ui_ListView_getTopmostItemInCurrentView, nullptr); return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ui_LoadingBar_Direction(lua_State *L) +OLUA_LIB int luaopen_ccui_ListView(lua_State *L) +{ + olua_require(L, "cocos2d_ui", luaopen_cocos2d_ui); + if (!olua_getclass(L, "ccui.ListView")) { + luaL_error(L, "class not found: cocos2d::ui::ListView"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_ccui_LoadingBar_Direction(lua_State *L) { oluacls_class(L, "ccui.LoadingBar.Direction"); oluacls_func(L, "__index", olua_indexerror); @@ -11546,9 +12126,19 @@ OLUA_LIB int luaopen_cocos2d_ui_LoadingBar_Direction(lua_State *L) return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccui_LoadingBar_Direction(lua_State *L) +{ + olua_require(L, "cocos2d_ui", luaopen_cocos2d_ui); + if (!olua_getclass(L, "ccui.LoadingBar.Direction")) { + luaL_error(L, "class not found: cocos2d::ui::LoadingBar::Direction"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_ui_LoadingBar_create$1(lua_State *L) +static int _olua_fun_cocos2d_ui_LoadingBar_create$1(lua_State *L) { olua_startinvoke(L); @@ -11561,7 +12151,7 @@ static int _cocos2d_ui_LoadingBar_create$1(lua_State *L) return num_ret; } -static int _cocos2d_ui_LoadingBar_create$2(lua_State *L) +static int _olua_fun_cocos2d_ui_LoadingBar_create$2(lua_State *L) { olua_startinvoke(L); @@ -11580,20 +12170,16 @@ static int _cocos2d_ui_LoadingBar_create$2(lua_State *L) return num_ret; } -static int _cocos2d_ui_LoadingBar_create$3(lua_State *L) +static int _olua_fun_cocos2d_ui_LoadingBar_create$3(lua_State *L) { olua_startinvoke(L); std::string arg1; /** textureName */ - cocos2d::ui::Widget::TextureResType arg2 = (cocos2d::ui::Widget::TextureResType)0; /** texType */ - float arg3 = 0; /** percentage */ olua_check_string(L, 1, &arg1); - olua_check_enum(L, 2, &arg2); - olua_check_number(L, 3, &arg3); - // static cocos2d::ui::LoadingBar *create(const std::string &textureName, cocos2d::ui::Widget::TextureResType texType, @optional float percentage) - cocos2d::ui::LoadingBar *ret = cocos2d::ui::LoadingBar::create(arg1, arg2, arg3); + // static cocos2d::ui::LoadingBar *create(const std::string &textureName) + cocos2d::ui::LoadingBar *ret = cocos2d::ui::LoadingBar::create(arg1); int num_ret = olua_push_object(L, ret, "ccui.LoadingBar"); olua_endinvoke(L); @@ -11601,16 +12187,20 @@ static int _cocos2d_ui_LoadingBar_create$3(lua_State *L) return num_ret; } -static int _cocos2d_ui_LoadingBar_create$4(lua_State *L) +static int _olua_fun_cocos2d_ui_LoadingBar_create$4(lua_State *L) { olua_startinvoke(L); std::string arg1; /** textureName */ + cocos2d::ui::Widget::TextureResType arg2 = (cocos2d::ui::Widget::TextureResType)0; /** texType */ + float arg3 = 0; /** percentage */ olua_check_string(L, 1, &arg1); + olua_check_enum(L, 2, &arg2); + olua_check_number(L, 3, &arg3); - // static cocos2d::ui::LoadingBar *create(const std::string &textureName, @optional float percentage) - cocos2d::ui::LoadingBar *ret = cocos2d::ui::LoadingBar::create(arg1); + // static cocos2d::ui::LoadingBar *create(const std::string &textureName, cocos2d::ui::Widget::TextureResType texType, @optional float percentage) + cocos2d::ui::LoadingBar *ret = cocos2d::ui::LoadingBar::create(arg1, arg2, arg3); int num_ret = olua_push_object(L, ret, "ccui.LoadingBar"); olua_endinvoke(L); @@ -11618,7 +12208,7 @@ static int _cocos2d_ui_LoadingBar_create$4(lua_State *L) return num_ret; } -static int _cocos2d_ui_LoadingBar_create$5(lua_State *L) +static int _olua_fun_cocos2d_ui_LoadingBar_create$5(lua_State *L) { olua_startinvoke(L); @@ -11628,7 +12218,7 @@ static int _cocos2d_ui_LoadingBar_create$5(lua_State *L) olua_check_string(L, 1, &arg1); olua_check_enum(L, 2, &arg2); - // static cocos2d::ui::LoadingBar *create(const std::string &textureName, cocos2d::ui::Widget::TextureResType texType, @optional float percentage) + // static cocos2d::ui::LoadingBar *create(const std::string &textureName, cocos2d::ui::Widget::TextureResType texType) cocos2d::ui::LoadingBar *ret = cocos2d::ui::LoadingBar::create(arg1, arg2); int num_ret = olua_push_object(L, ret, "ccui.LoadingBar"); @@ -11637,38 +12227,38 @@ static int _cocos2d_ui_LoadingBar_create$5(lua_State *L) return num_ret; } -static int _cocos2d_ui_LoadingBar_create(lua_State *L) +static int _olua_fun_cocos2d_ui_LoadingBar_create(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 0) { // static cocos2d::ui::LoadingBar *create() - return _cocos2d_ui_LoadingBar_create$1(L); + return _olua_fun_cocos2d_ui_LoadingBar_create$1(L); } if (num_args == 1) { // if ((olua_is_string(L, 1))) { - // static cocos2d::ui::LoadingBar *create(const std::string &textureName, @optional float percentage) - return _cocos2d_ui_LoadingBar_create$4(L); + // static cocos2d::ui::LoadingBar *create(const std::string &textureName) + return _olua_fun_cocos2d_ui_LoadingBar_create$3(L); // } } if (num_args == 2) { if ((olua_is_string(L, 1)) && (olua_is_number(L, 2))) { // static cocos2d::ui::LoadingBar *create(const std::string &textureName, @optional float percentage) - return _cocos2d_ui_LoadingBar_create$2(L); + return _olua_fun_cocos2d_ui_LoadingBar_create$2(L); } // if ((olua_is_string(L, 1)) && (olua_is_enum(L, 2))) { - // static cocos2d::ui::LoadingBar *create(const std::string &textureName, cocos2d::ui::Widget::TextureResType texType, @optional float percentage) - return _cocos2d_ui_LoadingBar_create$5(L); + // static cocos2d::ui::LoadingBar *create(const std::string &textureName, cocos2d::ui::Widget::TextureResType texType) + return _olua_fun_cocos2d_ui_LoadingBar_create$5(L); // } } if (num_args == 3) { // if ((olua_is_string(L, 1)) && (olua_is_enum(L, 2)) && (olua_is_number(L, 3))) { // static cocos2d::ui::LoadingBar *create(const std::string &textureName, cocos2d::ui::Widget::TextureResType texType, @optional float percentage) - return _cocos2d_ui_LoadingBar_create$3(L); + return _olua_fun_cocos2d_ui_LoadingBar_create$4(L); // } } @@ -11677,7 +12267,7 @@ static int _cocos2d_ui_LoadingBar_create(lua_State *L) return 0; } -static int _cocos2d_ui_LoadingBar_createInstance(lua_State *L) +static int _olua_fun_cocos2d_ui_LoadingBar_createInstance(lua_State *L) { olua_startinvoke(L); @@ -11690,7 +12280,7 @@ static int _cocos2d_ui_LoadingBar_createInstance(lua_State *L) return num_ret; } -static int _cocos2d_ui_LoadingBar_getCapInsets(lua_State *L) +static int _olua_fun_cocos2d_ui_LoadingBar_getCapInsets(lua_State *L) { olua_startinvoke(L); @@ -11707,7 +12297,7 @@ static int _cocos2d_ui_LoadingBar_getCapInsets(lua_State *L) return num_ret; } -static int _cocos2d_ui_LoadingBar_getDirection(lua_State *L) +static int _olua_fun_cocos2d_ui_LoadingBar_getDirection(lua_State *L) { olua_startinvoke(L); @@ -11724,7 +12314,7 @@ static int _cocos2d_ui_LoadingBar_getDirection(lua_State *L) return num_ret; } -static int _cocos2d_ui_LoadingBar_getPercent(lua_State *L) +static int _olua_fun_cocos2d_ui_LoadingBar_getPercent(lua_State *L) { olua_startinvoke(L); @@ -11741,7 +12331,7 @@ static int _cocos2d_ui_LoadingBar_getPercent(lua_State *L) return num_ret; } -static int _cocos2d_ui_LoadingBar_getRenderFile(lua_State *L) +static int _olua_fun_cocos2d_ui_LoadingBar_getRenderFile(lua_State *L) { olua_startinvoke(L); @@ -11751,14 +12341,14 @@ static int _cocos2d_ui_LoadingBar_getRenderFile(lua_State *L) // cocos2d::ResourceData getRenderFile() cocos2d::ResourceData ret = self->getRenderFile(); - int num_ret = olua_pushcopy_object(L, ret, "cc.ResourceData"); + int num_ret = olua_copy_object(L, ret, "cc.ResourceData"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_ui_LoadingBar_isScale9Enabled(lua_State *L) +static int _olua_fun_cocos2d_ui_LoadingBar_isScale9Enabled(lua_State *L) { olua_startinvoke(L); @@ -11775,7 +12365,7 @@ static int _cocos2d_ui_LoadingBar_isScale9Enabled(lua_State *L) return num_ret; } -static int _cocos2d_ui_LoadingBar_loadTexture$1(lua_State *L) +static int _olua_fun_cocos2d_ui_LoadingBar_loadTexture$1(lua_State *L) { olua_startinvoke(L); @@ -11795,7 +12385,7 @@ static int _cocos2d_ui_LoadingBar_loadTexture$1(lua_State *L) return 0; } -static int _cocos2d_ui_LoadingBar_loadTexture$2(lua_State *L) +static int _olua_fun_cocos2d_ui_LoadingBar_loadTexture$2(lua_State *L) { olua_startinvoke(L); @@ -11805,7 +12395,7 @@ static int _cocos2d_ui_LoadingBar_loadTexture$2(lua_State *L) olua_to_object(L, 1, &self, "ccui.LoadingBar"); olua_check_string(L, 2, &arg1); - // void loadTexture(const std::string &texture, @optional cocos2d::ui::Widget::TextureResType texType) + // void loadTexture(const std::string &texture) self->loadTexture(arg1); olua_endinvoke(L); @@ -11813,21 +12403,21 @@ static int _cocos2d_ui_LoadingBar_loadTexture$2(lua_State *L) return 0; } -static int _cocos2d_ui_LoadingBar_loadTexture(lua_State *L) +static int _olua_fun_cocos2d_ui_LoadingBar_loadTexture(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_string(L, 2))) { - // void loadTexture(const std::string &texture, @optional cocos2d::ui::Widget::TextureResType texType) - return _cocos2d_ui_LoadingBar_loadTexture$2(L); + // void loadTexture(const std::string &texture) + return _olua_fun_cocos2d_ui_LoadingBar_loadTexture$2(L); // } } if (num_args == 2) { // if ((olua_is_string(L, 2)) && (olua_is_enum(L, 3))) { // void loadTexture(const std::string &texture, @optional cocos2d::ui::Widget::TextureResType texType) - return _cocos2d_ui_LoadingBar_loadTexture$1(L); + return _olua_fun_cocos2d_ui_LoadingBar_loadTexture$1(L); // } } @@ -11836,11 +12426,11 @@ static int _cocos2d_ui_LoadingBar_loadTexture(lua_State *L) return 0; } -static int _cocos2d_ui_LoadingBar_new(lua_State *L) +static int _olua_fun_cocos2d_ui_LoadingBar_new(lua_State *L) { olua_startinvoke(L); - // LoadingBar() + // cocos2d::ui::LoadingBar() cocos2d::ui::LoadingBar *ret = new cocos2d::ui::LoadingBar(); int num_ret = olua_push_object(L, ret, "ccui.LoadingBar"); olua_postnew(L, ret); @@ -11850,25 +12440,25 @@ static int _cocos2d_ui_LoadingBar_new(lua_State *L) return num_ret; } -static int _cocos2d_ui_LoadingBar_setCapInsets(lua_State *L) +static int _olua_fun_cocos2d_ui_LoadingBar_setCapInsets(lua_State *L) { olua_startinvoke(L); cocos2d::ui::LoadingBar *self = nullptr; - cocos2d::Rect arg1; /** capInsets */ + cocos2d::Rect *arg1; /** capInsets */ olua_to_object(L, 1, &self, "ccui.LoadingBar"); olua_check_object(L, 2, &arg1, "cc.Rect"); // void setCapInsets(const cocos2d::Rect &capInsets) - self->setCapInsets(arg1); + self->setCapInsets(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_ui_LoadingBar_setDirection(lua_State *L) +static int _olua_fun_cocos2d_ui_LoadingBar_setDirection(lua_State *L) { olua_startinvoke(L); @@ -11886,7 +12476,7 @@ static int _cocos2d_ui_LoadingBar_setDirection(lua_State *L) return 0; } -static int _cocos2d_ui_LoadingBar_setPercent(lua_State *L) +static int _olua_fun_cocos2d_ui_LoadingBar_setPercent(lua_State *L) { olua_startinvoke(L); @@ -11904,7 +12494,7 @@ static int _cocos2d_ui_LoadingBar_setPercent(lua_State *L) return 0; } -static int _cocos2d_ui_LoadingBar_setScale9Enabled(lua_State *L) +static int _olua_fun_cocos2d_ui_LoadingBar_setScale9Enabled(lua_State *L) { olua_startinvoke(L); @@ -11922,35 +12512,43 @@ static int _cocos2d_ui_LoadingBar_setScale9Enabled(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ui_LoadingBar(lua_State *L) +static int _olua_cls_ccui_LoadingBar(lua_State *L) { oluacls_class(L, "ccui.LoadingBar"); - oluacls_func(L, "create", _cocos2d_ui_LoadingBar_create); - oluacls_func(L, "createInstance", _cocos2d_ui_LoadingBar_createInstance); - oluacls_func(L, "getCapInsets", _cocos2d_ui_LoadingBar_getCapInsets); - oluacls_func(L, "getDirection", _cocos2d_ui_LoadingBar_getDirection); - oluacls_func(L, "getPercent", _cocos2d_ui_LoadingBar_getPercent); - oluacls_func(L, "getRenderFile", _cocos2d_ui_LoadingBar_getRenderFile); - oluacls_func(L, "isScale9Enabled", _cocos2d_ui_LoadingBar_isScale9Enabled); - oluacls_func(L, "loadTexture", _cocos2d_ui_LoadingBar_loadTexture); - oluacls_func(L, "new", _cocos2d_ui_LoadingBar_new); - oluacls_func(L, "setCapInsets", _cocos2d_ui_LoadingBar_setCapInsets); - oluacls_func(L, "setDirection", _cocos2d_ui_LoadingBar_setDirection); - oluacls_func(L, "setPercent", _cocos2d_ui_LoadingBar_setPercent); - oluacls_func(L, "setScale9Enabled", _cocos2d_ui_LoadingBar_setScale9Enabled); - oluacls_prop(L, "capInsets", _cocos2d_ui_LoadingBar_getCapInsets, _cocos2d_ui_LoadingBar_setCapInsets); - oluacls_prop(L, "direction", _cocos2d_ui_LoadingBar_getDirection, _cocos2d_ui_LoadingBar_setDirection); - oluacls_prop(L, "percent", _cocos2d_ui_LoadingBar_getPercent, _cocos2d_ui_LoadingBar_setPercent); - oluacls_prop(L, "renderFile", _cocos2d_ui_LoadingBar_getRenderFile, nullptr); - oluacls_prop(L, "scale9Enabled", _cocos2d_ui_LoadingBar_isScale9Enabled, _cocos2d_ui_LoadingBar_setScale9Enabled); + oluacls_func(L, "create", _olua_fun_cocos2d_ui_LoadingBar_create); + oluacls_func(L, "createInstance", _olua_fun_cocos2d_ui_LoadingBar_createInstance); + oluacls_func(L, "getCapInsets", _olua_fun_cocos2d_ui_LoadingBar_getCapInsets); + oluacls_func(L, "getDirection", _olua_fun_cocos2d_ui_LoadingBar_getDirection); + oluacls_func(L, "getPercent", _olua_fun_cocos2d_ui_LoadingBar_getPercent); + oluacls_func(L, "getRenderFile", _olua_fun_cocos2d_ui_LoadingBar_getRenderFile); + oluacls_func(L, "isScale9Enabled", _olua_fun_cocos2d_ui_LoadingBar_isScale9Enabled); + oluacls_func(L, "loadTexture", _olua_fun_cocos2d_ui_LoadingBar_loadTexture); + oluacls_func(L, "new", _olua_fun_cocos2d_ui_LoadingBar_new); + oluacls_func(L, "setCapInsets", _olua_fun_cocos2d_ui_LoadingBar_setCapInsets); + oluacls_func(L, "setDirection", _olua_fun_cocos2d_ui_LoadingBar_setDirection); + oluacls_func(L, "setPercent", _olua_fun_cocos2d_ui_LoadingBar_setPercent); + oluacls_func(L, "setScale9Enabled", _olua_fun_cocos2d_ui_LoadingBar_setScale9Enabled); + oluacls_prop(L, "capInsets", _olua_fun_cocos2d_ui_LoadingBar_getCapInsets, _olua_fun_cocos2d_ui_LoadingBar_setCapInsets); + oluacls_prop(L, "direction", _olua_fun_cocos2d_ui_LoadingBar_getDirection, _olua_fun_cocos2d_ui_LoadingBar_setDirection); + oluacls_prop(L, "percent", _olua_fun_cocos2d_ui_LoadingBar_getPercent, _olua_fun_cocos2d_ui_LoadingBar_setPercent); + oluacls_prop(L, "renderFile", _olua_fun_cocos2d_ui_LoadingBar_getRenderFile, nullptr); + oluacls_prop(L, "scale9Enabled", _olua_fun_cocos2d_ui_LoadingBar_isScale9Enabled, _olua_fun_cocos2d_ui_LoadingBar_setScale9Enabled); return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ui_PageView_EventType(lua_State *L) +OLUA_LIB int luaopen_ccui_LoadingBar(lua_State *L) +{ + olua_require(L, "cocos2d_ui", luaopen_cocos2d_ui); + if (!olua_getclass(L, "ccui.LoadingBar")) { + luaL_error(L, "class not found: cocos2d::ui::LoadingBar"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_ccui_PageView_EventType(lua_State *L) { oluacls_class(L, "ccui.PageView.EventType"); oluacls_func(L, "__index", olua_indexerror); @@ -11959,10 +12557,19 @@ OLUA_LIB int luaopen_cocos2d_ui_PageView_EventType(lua_State *L) return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ui_PageView_TouchDirection(lua_State *L) +OLUA_LIB int luaopen_ccui_PageView_EventType(lua_State *L) +{ + olua_require(L, "cocos2d_ui", luaopen_cocos2d_ui); + if (!olua_getclass(L, "ccui.PageView.EventType")) { + luaL_error(L, "class not found: cocos2d::ui::PageView::EventType"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_ccui_PageView_TouchDirection(lua_State *L) { oluacls_class(L, "ccui.PageView.TouchDirection"); oluacls_func(L, "__index", olua_indexerror); @@ -11974,9 +12581,19 @@ OLUA_LIB int luaopen_cocos2d_ui_PageView_TouchDirection(lua_State *L) return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccui_PageView_TouchDirection(lua_State *L) +{ + olua_require(L, "cocos2d_ui", luaopen_cocos2d_ui); + if (!olua_getclass(L, "ccui.PageView.TouchDirection")) { + luaL_error(L, "class not found: cocos2d::ui::PageView::TouchDirection"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_ui_PageView_ccPageViewCallback___call(lua_State *L) +static int _olua_fun_cocos2d_ui_PageView_ccPageViewCallback___call(lua_State *L) { olua_startinvoke(L); @@ -11988,17 +12605,26 @@ static int _cocos2d_ui_PageView_ccPageViewCallback___call(lua_State *L) return 1; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ui_PageView_ccPageViewCallback(lua_State *L) +static int _olua_cls_ccui_PageView_ccPageViewCallback(lua_State *L) { oluacls_class(L, "ccui.PageView.ccPageViewCallback"); - oluacls_func(L, "__call", _cocos2d_ui_PageView_ccPageViewCallback___call); + oluacls_func(L, "__call", _olua_fun_cocos2d_ui_PageView_ccPageViewCallback___call); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccui_PageView_ccPageViewCallback(lua_State *L) +{ + olua_require(L, "cocos2d_ui", luaopen_cocos2d_ui); + if (!olua_getclass(L, "ccui.PageView.ccPageViewCallback")) { + luaL_error(L, "class not found: cocos2d::ui::PageView::ccPageViewCallback"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_ui_PageView_addEventListener$1(lua_State *L) +static int _olua_fun_cocos2d_ui_PageView_addEventListener$1(lua_State *L) { olua_startinvoke(L); @@ -12010,16 +12636,17 @@ static int _cocos2d_ui_PageView_addEventListener$1(lua_State *L) void *cb_store = (void *)self; std::string cb_tag = "PageViewCallback"; - std::string cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + std::string cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](cocos2d::Ref *arg1, cocos2d::ui::PageView::EventType arg2) { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](cocos2d::Ref *cb_arg1, cocos2d::ui::PageView::EventType cb_arg2) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); if (olua_contextequal(L, cb_ctx)) { int top = lua_gettop(L); - olua_push_object(L, arg1, "cc.Ref"); - olua_push_enum(L, arg2); + olua_push_object(L, cb_arg1, "cc.Ref"); + olua_push_enum(L, cb_arg2); olua_callback(L, cb_store, cb_name.c_str(), 2); @@ -12035,7 +12662,7 @@ static int _cocos2d_ui_PageView_addEventListener$1(lua_State *L) return 0; } -static int _cocos2d_ui_PageView_addEventListener$2(lua_State *L) +static int _olua_fun_cocos2d_ui_PageView_addEventListener$2(lua_State *L) { olua_startinvoke(L); @@ -12046,17 +12673,18 @@ static int _cocos2d_ui_PageView_addEventListener$2(lua_State *L) olua_check_callback(L, 2, &arg1, "ccui.ScrollView.ccScrollViewCallback"); void *cb_store = (void *)self; - std::string cb_tag = "PageViewCallback" + std::string(".using"); - std::string cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + std::string cb_tag = "scrollViewCallback" + std::string(".using"); + std::string cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](cocos2d::Ref *arg1, cocos2d::ui::ScrollView::EventType arg2) { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](cocos2d::Ref *cb_arg1, cocos2d::ui::ScrollView::EventType cb_arg2) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); if (olua_contextequal(L, cb_ctx)) { int top = lua_gettop(L); - olua_push_object(L, arg1, "cc.Ref"); - olua_push_enum(L, arg2); + olua_push_object(L, cb_arg1, "cc.Ref"); + olua_push_enum(L, cb_arg2); olua_callback(L, cb_store, cb_name.c_str(), 2); @@ -12072,19 +12700,19 @@ static int _cocos2d_ui_PageView_addEventListener$2(lua_State *L) return 0; } -static int _cocos2d_ui_PageView_addEventListener(lua_State *L) +static int _olua_fun_cocos2d_ui_PageView_addEventListener(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { if ((olua_is_callback(L, 2, "ccui.PageView.ccPageViewCallback"))) { // void addEventListener(const cocos2d::ui::PageView::ccPageViewCallback &callback) - return _cocos2d_ui_PageView_addEventListener$1(L); + return _olua_fun_cocos2d_ui_PageView_addEventListener$1(L); } // if ((olua_is_callback(L, 2, "ccui.ScrollView.ccScrollViewCallback"))) { // @using void addEventListener(const cocos2d::ui::ScrollView::ccScrollViewCallback &callback) - return _cocos2d_ui_PageView_addEventListener$2(L); + return _olua_fun_cocos2d_ui_PageView_addEventListener$2(L); // } } @@ -12093,7 +12721,7 @@ static int _cocos2d_ui_PageView_addEventListener(lua_State *L) return 0; } -static int _cocos2d_ui_PageView_addPage(lua_State *L) +static int _olua_fun_cocos2d_ui_PageView_addPage(lua_State *L) { olua_startinvoke(L); @@ -12114,7 +12742,7 @@ static int _cocos2d_ui_PageView_addPage(lua_State *L) return 0; } -static int _cocos2d_ui_PageView_create(lua_State *L) +static int _olua_fun_cocos2d_ui_PageView_create(lua_State *L) { olua_startinvoke(L); @@ -12127,7 +12755,7 @@ static int _cocos2d_ui_PageView_create(lua_State *L) return num_ret; } -static int _cocos2d_ui_PageView_createInstance(lua_State *L) +static int _olua_fun_cocos2d_ui_PageView_createInstance(lua_State *L) { olua_startinvoke(L); @@ -12140,7 +12768,7 @@ static int _cocos2d_ui_PageView_createInstance(lua_State *L) return num_ret; } -static int _cocos2d_ui_PageView_getCurrentPageIndex(lua_State *L) +static int _olua_fun_cocos2d_ui_PageView_getCurrentPageIndex(lua_State *L) { olua_startinvoke(L); @@ -12157,7 +12785,7 @@ static int _cocos2d_ui_PageView_getCurrentPageIndex(lua_State *L) return num_ret; } -static int _cocos2d_ui_PageView_getIndicatorEnabled(lua_State *L) +static int _olua_fun_cocos2d_ui_PageView_getIndicatorEnabled(lua_State *L) { olua_startinvoke(L); @@ -12174,7 +12802,7 @@ static int _cocos2d_ui_PageView_getIndicatorEnabled(lua_State *L) return num_ret; } -static int _cocos2d_ui_PageView_getIndicatorIndexNodesColor(lua_State *L) +static int _olua_fun_cocos2d_ui_PageView_getIndicatorIndexNodesColor(lua_State *L) { olua_startinvoke(L); @@ -12191,7 +12819,7 @@ static int _cocos2d_ui_PageView_getIndicatorIndexNodesColor(lua_State *L) return num_ret; } -static int _cocos2d_ui_PageView_getIndicatorIndexNodesOpacity(lua_State *L) +static int _olua_fun_cocos2d_ui_PageView_getIndicatorIndexNodesOpacity(lua_State *L) { olua_startinvoke(L); @@ -12208,7 +12836,7 @@ static int _cocos2d_ui_PageView_getIndicatorIndexNodesOpacity(lua_State *L) return num_ret; } -static int _cocos2d_ui_PageView_getIndicatorIndexNodesScale(lua_State *L) +static int _olua_fun_cocos2d_ui_PageView_getIndicatorIndexNodesScale(lua_State *L) { olua_startinvoke(L); @@ -12225,7 +12853,7 @@ static int _cocos2d_ui_PageView_getIndicatorIndexNodesScale(lua_State *L) return num_ret; } -static int _cocos2d_ui_PageView_getIndicatorPosition(lua_State *L) +static int _olua_fun_cocos2d_ui_PageView_getIndicatorPosition(lua_State *L) { olua_startinvoke(L); @@ -12242,7 +12870,7 @@ static int _cocos2d_ui_PageView_getIndicatorPosition(lua_State *L) return num_ret; } -static int _cocos2d_ui_PageView_getIndicatorPositionAsAnchorPoint(lua_State *L) +static int _olua_fun_cocos2d_ui_PageView_getIndicatorPositionAsAnchorPoint(lua_State *L) { olua_startinvoke(L); @@ -12259,7 +12887,7 @@ static int _cocos2d_ui_PageView_getIndicatorPositionAsAnchorPoint(lua_State *L) return num_ret; } -static int _cocos2d_ui_PageView_getIndicatorSelectedIndexColor(lua_State *L) +static int _olua_fun_cocos2d_ui_PageView_getIndicatorSelectedIndexColor(lua_State *L) { olua_startinvoke(L); @@ -12276,7 +12904,7 @@ static int _cocos2d_ui_PageView_getIndicatorSelectedIndexColor(lua_State *L) return num_ret; } -static int _cocos2d_ui_PageView_getIndicatorSelectedIndexOpacity(lua_State *L) +static int _olua_fun_cocos2d_ui_PageView_getIndicatorSelectedIndexOpacity(lua_State *L) { olua_startinvoke(L); @@ -12293,7 +12921,7 @@ static int _cocos2d_ui_PageView_getIndicatorSelectedIndexOpacity(lua_State *L) return num_ret; } -static int _cocos2d_ui_PageView_getIndicatorSpaceBetweenIndexNodes(lua_State *L) +static int _olua_fun_cocos2d_ui_PageView_getIndicatorSpaceBetweenIndexNodes(lua_State *L) { olua_startinvoke(L); @@ -12310,7 +12938,7 @@ static int _cocos2d_ui_PageView_getIndicatorSpaceBetweenIndexNodes(lua_State *L) return num_ret; } -static int _cocos2d_ui_PageView_insertPage(lua_State *L) +static int _olua_fun_cocos2d_ui_PageView_insertPage(lua_State *L) { olua_startinvoke(L); @@ -12333,11 +12961,11 @@ static int _cocos2d_ui_PageView_insertPage(lua_State *L) return 0; } -static int _cocos2d_ui_PageView_new(lua_State *L) +static int _olua_fun_cocos2d_ui_PageView_new(lua_State *L) { olua_startinvoke(L); - // PageView() + // cocos2d::ui::PageView() cocos2d::ui::PageView *ret = new cocos2d::ui::PageView(); int num_ret = olua_push_object(L, ret, "ccui.PageView"); olua_postnew(L, ret); @@ -12347,7 +12975,7 @@ static int _cocos2d_ui_PageView_new(lua_State *L) return num_ret; } -static int _cocos2d_ui_PageView_removeAllPages(lua_State *L) +static int _olua_fun_cocos2d_ui_PageView_removeAllPages(lua_State *L) { olua_startinvoke(L); @@ -12366,7 +12994,7 @@ static int _cocos2d_ui_PageView_removeAllPages(lua_State *L) return 0; } -static int _cocos2d_ui_PageView_removePage(lua_State *L) +static int _olua_fun_cocos2d_ui_PageView_removePage(lua_State *L) { olua_startinvoke(L); @@ -12387,7 +13015,7 @@ static int _cocos2d_ui_PageView_removePage(lua_State *L) return 0; } -static int _cocos2d_ui_PageView_removePageAtIndex(lua_State *L) +static int _olua_fun_cocos2d_ui_PageView_removePageAtIndex(lua_State *L) { olua_startinvoke(L); @@ -12411,7 +13039,7 @@ static int _cocos2d_ui_PageView_removePageAtIndex(lua_State *L) return 0; } -static int _cocos2d_ui_PageView_scrollToItem$1(lua_State *L) +static int _olua_fun_cocos2d_ui_PageView_scrollToItem$1(lua_State *L) { olua_startinvoke(L); @@ -12429,7 +13057,7 @@ static int _cocos2d_ui_PageView_scrollToItem$1(lua_State *L) return 0; } -static int _cocos2d_ui_PageView_scrollToItem$2(lua_State *L) +static int _olua_fun_cocos2d_ui_PageView_scrollToItem$2(lua_State *L) { olua_startinvoke(L); @@ -12449,21 +13077,21 @@ static int _cocos2d_ui_PageView_scrollToItem$2(lua_State *L) return 0; } -static int _cocos2d_ui_PageView_scrollToItem(lua_State *L) +static int _olua_fun_cocos2d_ui_PageView_scrollToItem(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_integer(L, 2))) { // void scrollToItem(ssize_t itemIndex) - return _cocos2d_ui_PageView_scrollToItem$1(L); + return _olua_fun_cocos2d_ui_PageView_scrollToItem$1(L); // } } if (num_args == 2) { // if ((olua_is_integer(L, 2)) && (olua_is_number(L, 3))) { // void scrollToItem(ssize_t idx, float time) - return _cocos2d_ui_PageView_scrollToItem$2(L); + return _olua_fun_cocos2d_ui_PageView_scrollToItem$2(L); // } } @@ -12472,7 +13100,7 @@ static int _cocos2d_ui_PageView_scrollToItem(lua_State *L) return 0; } -static int _cocos2d_ui_PageView_scrollToPage$1(lua_State *L) +static int _olua_fun_cocos2d_ui_PageView_scrollToPage$1(lua_State *L) { olua_startinvoke(L); @@ -12490,7 +13118,7 @@ static int _cocos2d_ui_PageView_scrollToPage$1(lua_State *L) return 0; } -static int _cocos2d_ui_PageView_scrollToPage$2(lua_State *L) +static int _olua_fun_cocos2d_ui_PageView_scrollToPage$2(lua_State *L) { olua_startinvoke(L); @@ -12510,21 +13138,21 @@ static int _cocos2d_ui_PageView_scrollToPage$2(lua_State *L) return 0; } -static int _cocos2d_ui_PageView_scrollToPage(lua_State *L) +static int _olua_fun_cocos2d_ui_PageView_scrollToPage(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_integer(L, 2))) { // void scrollToPage(ssize_t idx) - return _cocos2d_ui_PageView_scrollToPage$1(L); + return _olua_fun_cocos2d_ui_PageView_scrollToPage$1(L); // } } if (num_args == 2) { // if ((olua_is_integer(L, 2)) && (olua_is_number(L, 3))) { // void scrollToPage(ssize_t idx, float time) - return _cocos2d_ui_PageView_scrollToPage$2(L); + return _olua_fun_cocos2d_ui_PageView_scrollToPage$2(L); // } } @@ -12533,7 +13161,7 @@ static int _cocos2d_ui_PageView_scrollToPage(lua_State *L) return 0; } -static int _cocos2d_ui_PageView_setAutoScrollStopEpsilon(lua_State *L) +static int _olua_fun_cocos2d_ui_PageView_setAutoScrollStopEpsilon(lua_State *L) { olua_startinvoke(L); @@ -12551,7 +13179,7 @@ static int _cocos2d_ui_PageView_setAutoScrollStopEpsilon(lua_State *L) return 0; } -static int _cocos2d_ui_PageView_setCurrentPageIndex(lua_State *L) +static int _olua_fun_cocos2d_ui_PageView_setCurrentPageIndex(lua_State *L) { olua_startinvoke(L); @@ -12569,7 +13197,7 @@ static int _cocos2d_ui_PageView_setCurrentPageIndex(lua_State *L) return 0; } -static int _cocos2d_ui_PageView_setIndicatorEnabled(lua_State *L) +static int _olua_fun_cocos2d_ui_PageView_setIndicatorEnabled(lua_State *L) { olua_startinvoke(L); @@ -12587,7 +13215,7 @@ static int _cocos2d_ui_PageView_setIndicatorEnabled(lua_State *L) return 0; } -static int _cocos2d_ui_PageView_setIndicatorIndexNodesColor(lua_State *L) +static int _olua_fun_cocos2d_ui_PageView_setIndicatorIndexNodesColor(lua_State *L) { olua_startinvoke(L); @@ -12605,7 +13233,7 @@ static int _cocos2d_ui_PageView_setIndicatorIndexNodesColor(lua_State *L) return 0; } -static int _cocos2d_ui_PageView_setIndicatorIndexNodesOpacity(lua_State *L) +static int _olua_fun_cocos2d_ui_PageView_setIndicatorIndexNodesOpacity(lua_State *L) { olua_startinvoke(L); @@ -12623,7 +13251,7 @@ static int _cocos2d_ui_PageView_setIndicatorIndexNodesOpacity(lua_State *L) return 0; } -static int _cocos2d_ui_PageView_setIndicatorIndexNodesScale(lua_State *L) +static int _olua_fun_cocos2d_ui_PageView_setIndicatorIndexNodesScale(lua_State *L) { olua_startinvoke(L); @@ -12641,7 +13269,7 @@ static int _cocos2d_ui_PageView_setIndicatorIndexNodesScale(lua_State *L) return 0; } -static int _cocos2d_ui_PageView_setIndicatorIndexNodesTexture$1(lua_State *L) +static int _olua_fun_cocos2d_ui_PageView_setIndicatorIndexNodesTexture$1(lua_State *L) { olua_startinvoke(L); @@ -12661,7 +13289,7 @@ static int _cocos2d_ui_PageView_setIndicatorIndexNodesTexture$1(lua_State *L) return 0; } -static int _cocos2d_ui_PageView_setIndicatorIndexNodesTexture$2(lua_State *L) +static int _olua_fun_cocos2d_ui_PageView_setIndicatorIndexNodesTexture$2(lua_State *L) { olua_startinvoke(L); @@ -12671,7 +13299,7 @@ static int _cocos2d_ui_PageView_setIndicatorIndexNodesTexture$2(lua_State *L) olua_to_object(L, 1, &self, "ccui.PageView"); olua_check_string(L, 2, &arg1); - // void setIndicatorIndexNodesTexture(const std::string &texName, @optional cocos2d::ui::Widget::TextureResType texType) + // void setIndicatorIndexNodesTexture(const std::string &texName) self->setIndicatorIndexNodesTexture(arg1); olua_endinvoke(L); @@ -12679,21 +13307,21 @@ static int _cocos2d_ui_PageView_setIndicatorIndexNodesTexture$2(lua_State *L) return 0; } -static int _cocos2d_ui_PageView_setIndicatorIndexNodesTexture(lua_State *L) +static int _olua_fun_cocos2d_ui_PageView_setIndicatorIndexNodesTexture(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_string(L, 2))) { - // void setIndicatorIndexNodesTexture(const std::string &texName, @optional cocos2d::ui::Widget::TextureResType texType) - return _cocos2d_ui_PageView_setIndicatorIndexNodesTexture$2(L); + // void setIndicatorIndexNodesTexture(const std::string &texName) + return _olua_fun_cocos2d_ui_PageView_setIndicatorIndexNodesTexture$2(L); // } } if (num_args == 2) { // if ((olua_is_string(L, 2)) && (olua_is_enum(L, 3))) { // void setIndicatorIndexNodesTexture(const std::string &texName, @optional cocos2d::ui::Widget::TextureResType texType) - return _cocos2d_ui_PageView_setIndicatorIndexNodesTexture$1(L); + return _olua_fun_cocos2d_ui_PageView_setIndicatorIndexNodesTexture$1(L); // } } @@ -12702,43 +13330,43 @@ static int _cocos2d_ui_PageView_setIndicatorIndexNodesTexture(lua_State *L) return 0; } -static int _cocos2d_ui_PageView_setIndicatorPosition(lua_State *L) +static int _olua_fun_cocos2d_ui_PageView_setIndicatorPosition(lua_State *L) { olua_startinvoke(L); cocos2d::ui::PageView *self = nullptr; - cocos2d::Vec2 arg1; /** position */ + cocos2d::Vec2 *arg1; /** position */ olua_to_object(L, 1, &self, "ccui.PageView"); olua_check_object(L, 2, &arg1, "cc.Vec2"); // void setIndicatorPosition(const cocos2d::Vec2 &position) - self->setIndicatorPosition(arg1); + self->setIndicatorPosition(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_ui_PageView_setIndicatorPositionAsAnchorPoint(lua_State *L) +static int _olua_fun_cocos2d_ui_PageView_setIndicatorPositionAsAnchorPoint(lua_State *L) { olua_startinvoke(L); cocos2d::ui::PageView *self = nullptr; - cocos2d::Vec2 arg1; /** positionAsAnchorPoint */ + cocos2d::Vec2 *arg1; /** positionAsAnchorPoint */ olua_to_object(L, 1, &self, "ccui.PageView"); olua_check_object(L, 2, &arg1, "cc.Vec2"); // void setIndicatorPositionAsAnchorPoint(const cocos2d::Vec2 &positionAsAnchorPoint) - self->setIndicatorPositionAsAnchorPoint(arg1); + self->setIndicatorPositionAsAnchorPoint(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_ui_PageView_setIndicatorSelectedIndexColor(lua_State *L) +static int _olua_fun_cocos2d_ui_PageView_setIndicatorSelectedIndexColor(lua_State *L) { olua_startinvoke(L); @@ -12756,7 +13384,7 @@ static int _cocos2d_ui_PageView_setIndicatorSelectedIndexColor(lua_State *L) return 0; } -static int _cocos2d_ui_PageView_setIndicatorSelectedIndexOpacity(lua_State *L) +static int _olua_fun_cocos2d_ui_PageView_setIndicatorSelectedIndexOpacity(lua_State *L) { olua_startinvoke(L); @@ -12774,7 +13402,7 @@ static int _cocos2d_ui_PageView_setIndicatorSelectedIndexOpacity(lua_State *L) return 0; } -static int _cocos2d_ui_PageView_setIndicatorSpaceBetweenIndexNodes(lua_State *L) +static int _olua_fun_cocos2d_ui_PageView_setIndicatorSpaceBetweenIndexNodes(lua_State *L) { olua_startinvoke(L); @@ -12792,60 +13420,68 @@ static int _cocos2d_ui_PageView_setIndicatorSpaceBetweenIndexNodes(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ui_PageView(lua_State *L) +static int _olua_cls_ccui_PageView(lua_State *L) { oluacls_class(L, "ccui.PageView"); - oluacls_func(L, "addEventListener", _cocos2d_ui_PageView_addEventListener); - oluacls_func(L, "addPage", _cocos2d_ui_PageView_addPage); - oluacls_func(L, "create", _cocos2d_ui_PageView_create); - oluacls_func(L, "createInstance", _cocos2d_ui_PageView_createInstance); - oluacls_func(L, "getCurrentPageIndex", _cocos2d_ui_PageView_getCurrentPageIndex); - oluacls_func(L, "getIndicatorEnabled", _cocos2d_ui_PageView_getIndicatorEnabled); - oluacls_func(L, "getIndicatorIndexNodesColor", _cocos2d_ui_PageView_getIndicatorIndexNodesColor); - oluacls_func(L, "getIndicatorIndexNodesOpacity", _cocos2d_ui_PageView_getIndicatorIndexNodesOpacity); - oluacls_func(L, "getIndicatorIndexNodesScale", _cocos2d_ui_PageView_getIndicatorIndexNodesScale); - oluacls_func(L, "getIndicatorPosition", _cocos2d_ui_PageView_getIndicatorPosition); - oluacls_func(L, "getIndicatorPositionAsAnchorPoint", _cocos2d_ui_PageView_getIndicatorPositionAsAnchorPoint); - oluacls_func(L, "getIndicatorSelectedIndexColor", _cocos2d_ui_PageView_getIndicatorSelectedIndexColor); - oluacls_func(L, "getIndicatorSelectedIndexOpacity", _cocos2d_ui_PageView_getIndicatorSelectedIndexOpacity); - oluacls_func(L, "getIndicatorSpaceBetweenIndexNodes", _cocos2d_ui_PageView_getIndicatorSpaceBetweenIndexNodes); - oluacls_func(L, "insertPage", _cocos2d_ui_PageView_insertPage); - oluacls_func(L, "new", _cocos2d_ui_PageView_new); - oluacls_func(L, "removeAllPages", _cocos2d_ui_PageView_removeAllPages); - oluacls_func(L, "removePage", _cocos2d_ui_PageView_removePage); - oluacls_func(L, "removePageAtIndex", _cocos2d_ui_PageView_removePageAtIndex); - oluacls_func(L, "scrollToItem", _cocos2d_ui_PageView_scrollToItem); - oluacls_func(L, "scrollToPage", _cocos2d_ui_PageView_scrollToPage); - oluacls_func(L, "setAutoScrollStopEpsilon", _cocos2d_ui_PageView_setAutoScrollStopEpsilon); - oluacls_func(L, "setCurrentPageIndex", _cocos2d_ui_PageView_setCurrentPageIndex); - oluacls_func(L, "setIndicatorEnabled", _cocos2d_ui_PageView_setIndicatorEnabled); - oluacls_func(L, "setIndicatorIndexNodesColor", _cocos2d_ui_PageView_setIndicatorIndexNodesColor); - oluacls_func(L, "setIndicatorIndexNodesOpacity", _cocos2d_ui_PageView_setIndicatorIndexNodesOpacity); - oluacls_func(L, "setIndicatorIndexNodesScale", _cocos2d_ui_PageView_setIndicatorIndexNodesScale); - oluacls_func(L, "setIndicatorIndexNodesTexture", _cocos2d_ui_PageView_setIndicatorIndexNodesTexture); - oluacls_func(L, "setIndicatorPosition", _cocos2d_ui_PageView_setIndicatorPosition); - oluacls_func(L, "setIndicatorPositionAsAnchorPoint", _cocos2d_ui_PageView_setIndicatorPositionAsAnchorPoint); - oluacls_func(L, "setIndicatorSelectedIndexColor", _cocos2d_ui_PageView_setIndicatorSelectedIndexColor); - oluacls_func(L, "setIndicatorSelectedIndexOpacity", _cocos2d_ui_PageView_setIndicatorSelectedIndexOpacity); - oluacls_func(L, "setIndicatorSpaceBetweenIndexNodes", _cocos2d_ui_PageView_setIndicatorSpaceBetweenIndexNodes); - oluacls_prop(L, "currentPageIndex", _cocos2d_ui_PageView_getCurrentPageIndex, _cocos2d_ui_PageView_setCurrentPageIndex); - oluacls_prop(L, "indicatorEnabled", _cocos2d_ui_PageView_getIndicatorEnabled, _cocos2d_ui_PageView_setIndicatorEnabled); - oluacls_prop(L, "indicatorIndexNodesColor", _cocos2d_ui_PageView_getIndicatorIndexNodesColor, _cocos2d_ui_PageView_setIndicatorIndexNodesColor); - oluacls_prop(L, "indicatorIndexNodesOpacity", _cocos2d_ui_PageView_getIndicatorIndexNodesOpacity, _cocos2d_ui_PageView_setIndicatorIndexNodesOpacity); - oluacls_prop(L, "indicatorIndexNodesScale", _cocos2d_ui_PageView_getIndicatorIndexNodesScale, _cocos2d_ui_PageView_setIndicatorIndexNodesScale); - oluacls_prop(L, "indicatorPosition", _cocos2d_ui_PageView_getIndicatorPosition, _cocos2d_ui_PageView_setIndicatorPosition); - oluacls_prop(L, "indicatorPositionAsAnchorPoint", _cocos2d_ui_PageView_getIndicatorPositionAsAnchorPoint, _cocos2d_ui_PageView_setIndicatorPositionAsAnchorPoint); - oluacls_prop(L, "indicatorSelectedIndexColor", _cocos2d_ui_PageView_getIndicatorSelectedIndexColor, _cocos2d_ui_PageView_setIndicatorSelectedIndexColor); - oluacls_prop(L, "indicatorSelectedIndexOpacity", _cocos2d_ui_PageView_getIndicatorSelectedIndexOpacity, _cocos2d_ui_PageView_setIndicatorSelectedIndexOpacity); - oluacls_prop(L, "indicatorSpaceBetweenIndexNodes", _cocos2d_ui_PageView_getIndicatorSpaceBetweenIndexNodes, _cocos2d_ui_PageView_setIndicatorSpaceBetweenIndexNodes); + oluacls_func(L, "addEventListener", _olua_fun_cocos2d_ui_PageView_addEventListener); + oluacls_func(L, "addPage", _olua_fun_cocos2d_ui_PageView_addPage); + oluacls_func(L, "create", _olua_fun_cocos2d_ui_PageView_create); + oluacls_func(L, "createInstance", _olua_fun_cocos2d_ui_PageView_createInstance); + oluacls_func(L, "getCurrentPageIndex", _olua_fun_cocos2d_ui_PageView_getCurrentPageIndex); + oluacls_func(L, "getIndicatorEnabled", _olua_fun_cocos2d_ui_PageView_getIndicatorEnabled); + oluacls_func(L, "getIndicatorIndexNodesColor", _olua_fun_cocos2d_ui_PageView_getIndicatorIndexNodesColor); + oluacls_func(L, "getIndicatorIndexNodesOpacity", _olua_fun_cocos2d_ui_PageView_getIndicatorIndexNodesOpacity); + oluacls_func(L, "getIndicatorIndexNodesScale", _olua_fun_cocos2d_ui_PageView_getIndicatorIndexNodesScale); + oluacls_func(L, "getIndicatorPosition", _olua_fun_cocos2d_ui_PageView_getIndicatorPosition); + oluacls_func(L, "getIndicatorPositionAsAnchorPoint", _olua_fun_cocos2d_ui_PageView_getIndicatorPositionAsAnchorPoint); + oluacls_func(L, "getIndicatorSelectedIndexColor", _olua_fun_cocos2d_ui_PageView_getIndicatorSelectedIndexColor); + oluacls_func(L, "getIndicatorSelectedIndexOpacity", _olua_fun_cocos2d_ui_PageView_getIndicatorSelectedIndexOpacity); + oluacls_func(L, "getIndicatorSpaceBetweenIndexNodes", _olua_fun_cocos2d_ui_PageView_getIndicatorSpaceBetweenIndexNodes); + oluacls_func(L, "insertPage", _olua_fun_cocos2d_ui_PageView_insertPage); + oluacls_func(L, "new", _olua_fun_cocos2d_ui_PageView_new); + oluacls_func(L, "removeAllPages", _olua_fun_cocos2d_ui_PageView_removeAllPages); + oluacls_func(L, "removePage", _olua_fun_cocos2d_ui_PageView_removePage); + oluacls_func(L, "removePageAtIndex", _olua_fun_cocos2d_ui_PageView_removePageAtIndex); + oluacls_func(L, "scrollToItem", _olua_fun_cocos2d_ui_PageView_scrollToItem); + oluacls_func(L, "scrollToPage", _olua_fun_cocos2d_ui_PageView_scrollToPage); + oluacls_func(L, "setAutoScrollStopEpsilon", _olua_fun_cocos2d_ui_PageView_setAutoScrollStopEpsilon); + oluacls_func(L, "setCurrentPageIndex", _olua_fun_cocos2d_ui_PageView_setCurrentPageIndex); + oluacls_func(L, "setIndicatorEnabled", _olua_fun_cocos2d_ui_PageView_setIndicatorEnabled); + oluacls_func(L, "setIndicatorIndexNodesColor", _olua_fun_cocos2d_ui_PageView_setIndicatorIndexNodesColor); + oluacls_func(L, "setIndicatorIndexNodesOpacity", _olua_fun_cocos2d_ui_PageView_setIndicatorIndexNodesOpacity); + oluacls_func(L, "setIndicatorIndexNodesScale", _olua_fun_cocos2d_ui_PageView_setIndicatorIndexNodesScale); + oluacls_func(L, "setIndicatorIndexNodesTexture", _olua_fun_cocos2d_ui_PageView_setIndicatorIndexNodesTexture); + oluacls_func(L, "setIndicatorPosition", _olua_fun_cocos2d_ui_PageView_setIndicatorPosition); + oluacls_func(L, "setIndicatorPositionAsAnchorPoint", _olua_fun_cocos2d_ui_PageView_setIndicatorPositionAsAnchorPoint); + oluacls_func(L, "setIndicatorSelectedIndexColor", _olua_fun_cocos2d_ui_PageView_setIndicatorSelectedIndexColor); + oluacls_func(L, "setIndicatorSelectedIndexOpacity", _olua_fun_cocos2d_ui_PageView_setIndicatorSelectedIndexOpacity); + oluacls_func(L, "setIndicatorSpaceBetweenIndexNodes", _olua_fun_cocos2d_ui_PageView_setIndicatorSpaceBetweenIndexNodes); + oluacls_prop(L, "currentPageIndex", _olua_fun_cocos2d_ui_PageView_getCurrentPageIndex, _olua_fun_cocos2d_ui_PageView_setCurrentPageIndex); + oluacls_prop(L, "indicatorEnabled", _olua_fun_cocos2d_ui_PageView_getIndicatorEnabled, _olua_fun_cocos2d_ui_PageView_setIndicatorEnabled); + oluacls_prop(L, "indicatorIndexNodesColor", _olua_fun_cocos2d_ui_PageView_getIndicatorIndexNodesColor, _olua_fun_cocos2d_ui_PageView_setIndicatorIndexNodesColor); + oluacls_prop(L, "indicatorIndexNodesOpacity", _olua_fun_cocos2d_ui_PageView_getIndicatorIndexNodesOpacity, _olua_fun_cocos2d_ui_PageView_setIndicatorIndexNodesOpacity); + oluacls_prop(L, "indicatorIndexNodesScale", _olua_fun_cocos2d_ui_PageView_getIndicatorIndexNodesScale, _olua_fun_cocos2d_ui_PageView_setIndicatorIndexNodesScale); + oluacls_prop(L, "indicatorPosition", _olua_fun_cocos2d_ui_PageView_getIndicatorPosition, _olua_fun_cocos2d_ui_PageView_setIndicatorPosition); + oluacls_prop(L, "indicatorPositionAsAnchorPoint", _olua_fun_cocos2d_ui_PageView_getIndicatorPositionAsAnchorPoint, _olua_fun_cocos2d_ui_PageView_setIndicatorPositionAsAnchorPoint); + oluacls_prop(L, "indicatorSelectedIndexColor", _olua_fun_cocos2d_ui_PageView_getIndicatorSelectedIndexColor, _olua_fun_cocos2d_ui_PageView_setIndicatorSelectedIndexColor); + oluacls_prop(L, "indicatorSelectedIndexOpacity", _olua_fun_cocos2d_ui_PageView_getIndicatorSelectedIndexOpacity, _olua_fun_cocos2d_ui_PageView_setIndicatorSelectedIndexOpacity); + oluacls_prop(L, "indicatorSpaceBetweenIndexNodes", _olua_fun_cocos2d_ui_PageView_getIndicatorSpaceBetweenIndexNodes, _olua_fun_cocos2d_ui_PageView_setIndicatorSpaceBetweenIndexNodes); return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ui_RichElement_Type(lua_State *L) +OLUA_LIB int luaopen_ccui_PageView(lua_State *L) +{ + olua_require(L, "cocos2d_ui", luaopen_cocos2d_ui); + if (!olua_getclass(L, "ccui.PageView")) { + luaL_error(L, "class not found: cocos2d::ui::PageView"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_ccui_RichElement_Type(lua_State *L) { oluacls_class(L, "ccui.RichElement.Type"); oluacls_func(L, "__index", olua_indexerror); @@ -12857,9 +13493,19 @@ OLUA_LIB int luaopen_cocos2d_ui_RichElement_Type(lua_State *L) return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccui_RichElement_Type(lua_State *L) +{ + olua_require(L, "cocos2d_ui", luaopen_cocos2d_ui); + if (!olua_getclass(L, "ccui.RichElement.Type")) { + luaL_error(L, "class not found: cocos2d::ui::RichElement::Type"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_ui_RichElement_equalType(lua_State *L) +static int _olua_fun_cocos2d_ui_RichElement_equalType(lua_State *L) { olua_startinvoke(L); @@ -12878,7 +13524,7 @@ static int _cocos2d_ui_RichElement_equalType(lua_State *L) return num_ret; } -static int _cocos2d_ui_RichElement_init(lua_State *L) +static int _olua_fun_cocos2d_ui_RichElement_init(lua_State *L) { olua_startinvoke(L); @@ -12901,11 +13547,11 @@ static int _cocos2d_ui_RichElement_init(lua_State *L) return num_ret; } -static int _cocos2d_ui_RichElement_new(lua_State *L) +static int _olua_fun_cocos2d_ui_RichElement_new(lua_State *L) { olua_startinvoke(L); - // RichElement() + // cocos2d::ui::RichElement() cocos2d::ui::RichElement *ret = new cocos2d::ui::RichElement(); int num_ret = olua_push_object(L, ret, "ccui.RichElement"); olua_postnew(L, ret); @@ -12915,7 +13561,7 @@ static int _cocos2d_ui_RichElement_new(lua_State *L) return num_ret; } -static int _cocos2d_ui_RichElement_setColor(lua_State *L) +static int _olua_fun_cocos2d_ui_RichElement_setColor(lua_State *L) { olua_startinvoke(L); @@ -12933,20 +13579,29 @@ static int _cocos2d_ui_RichElement_setColor(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ui_RichElement(lua_State *L) +static int _olua_cls_ccui_RichElement(lua_State *L) { oluacls_class(L, "ccui.RichElement"); - oluacls_func(L, "equalType", _cocos2d_ui_RichElement_equalType); - oluacls_func(L, "init", _cocos2d_ui_RichElement_init); - oluacls_func(L, "new", _cocos2d_ui_RichElement_new); - oluacls_func(L, "setColor", _cocos2d_ui_RichElement_setColor); + oluacls_func(L, "equalType", _olua_fun_cocos2d_ui_RichElement_equalType); + oluacls_func(L, "init", _olua_fun_cocos2d_ui_RichElement_init); + oluacls_func(L, "new", _olua_fun_cocos2d_ui_RichElement_new); + oluacls_func(L, "setColor", _olua_fun_cocos2d_ui_RichElement_setColor); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccui_RichElement(lua_State *L) +{ + olua_require(L, "cocos2d_ui", luaopen_cocos2d_ui); + if (!olua_getclass(L, "ccui.RichElement")) { + luaL_error(L, "class not found: cocos2d::ui::RichElement"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_ui_RichElementText_create$1(lua_State *L) +static int _olua_fun_cocos2d_ui_RichElementText_create$1(lua_State *L) { olua_startinvoke(L); @@ -12961,7 +13616,7 @@ static int _cocos2d_ui_RichElementText_create$1(lua_State *L) cocos2d::Color3B arg9; /** outlineColor */ int arg10 = 0; /** outlineSize */ cocos2d::Color3B arg11; /** shadowColor */ - cocos2d::Size arg12; /** shadowOffset */ + cocos2d::Size *arg12; /** shadowOffset */ int arg13 = 0; /** shadowBlurRadius */ cocos2d::Color3B arg14; /** glowColor */ @@ -12981,7 +13636,7 @@ static int _cocos2d_ui_RichElementText_create$1(lua_State *L) olua_check_cocos2d_Color3B(L, 14, &arg14); // static cocos2d::ui::RichElementText *create(int tag, const cocos2d::Color3B &color, uint8_t opacity, const std::string &text, const std::string &fontName, float fontSize, @optional uint32_t flags, @optional const std::string &url, @optional const cocos2d::Color3B &outlineColor, @optional int outlineSize, @optional const cocos2d::Color3B &shadowColor, @optional const cocos2d::Size &shadowOffset, @optional int shadowBlurRadius, @optional const cocos2d::Color3B &glowColor) - cocos2d::ui::RichElementText *ret = cocos2d::ui::RichElementText::create(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14); + cocos2d::ui::RichElementText *ret = cocos2d::ui::RichElementText::create(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, *arg12, arg13, arg14); int num_ret = olua_push_object(L, ret, "ccui.RichElementText"); olua_endinvoke(L); @@ -12989,7 +13644,7 @@ static int _cocos2d_ui_RichElementText_create$1(lua_State *L) return num_ret; } -static int _cocos2d_ui_RichElementText_create$2(lua_State *L) +static int _olua_fun_cocos2d_ui_RichElementText_create$2(lua_State *L) { olua_startinvoke(L); @@ -13007,7 +13662,7 @@ static int _cocos2d_ui_RichElementText_create$2(lua_State *L) olua_check_string(L, 5, &arg5); olua_check_number(L, 6, &arg6); - // static cocos2d::ui::RichElementText *create(int tag, const cocos2d::Color3B &color, uint8_t opacity, const std::string &text, const std::string &fontName, float fontSize, @optional uint32_t flags, @optional const std::string &url, @optional const cocos2d::Color3B &outlineColor, @optional int outlineSize, @optional const cocos2d::Color3B &shadowColor, @optional const cocos2d::Size &shadowOffset, @optional int shadowBlurRadius, @optional const cocos2d::Color3B &glowColor) + // static cocos2d::ui::RichElementText *create(int tag, const cocos2d::Color3B &color, uint8_t opacity, const std::string &text, const std::string &fontName, float fontSize) cocos2d::ui::RichElementText *ret = cocos2d::ui::RichElementText::create(arg1, arg2, arg3, arg4, arg5, arg6); int num_ret = olua_push_object(L, ret, "ccui.RichElementText"); @@ -13016,7 +13671,7 @@ static int _cocos2d_ui_RichElementText_create$2(lua_State *L) return num_ret; } -static int _cocos2d_ui_RichElementText_create$3(lua_State *L) +static int _olua_fun_cocos2d_ui_RichElementText_create$3(lua_State *L) { olua_startinvoke(L); @@ -13036,7 +13691,7 @@ static int _cocos2d_ui_RichElementText_create$3(lua_State *L) olua_check_number(L, 6, &arg6); olua_check_integer(L, 7, &arg7); - // static cocos2d::ui::RichElementText *create(int tag, const cocos2d::Color3B &color, uint8_t opacity, const std::string &text, const std::string &fontName, float fontSize, @optional uint32_t flags, @optional const std::string &url, @optional const cocos2d::Color3B &outlineColor, @optional int outlineSize, @optional const cocos2d::Color3B &shadowColor, @optional const cocos2d::Size &shadowOffset, @optional int shadowBlurRadius, @optional const cocos2d::Color3B &glowColor) + // static cocos2d::ui::RichElementText *create(int tag, const cocos2d::Color3B &color, uint8_t opacity, const std::string &text, const std::string &fontName, float fontSize, @optional uint32_t flags) cocos2d::ui::RichElementText *ret = cocos2d::ui::RichElementText::create(arg1, arg2, arg3, arg4, arg5, arg6, arg7); int num_ret = olua_push_object(L, ret, "ccui.RichElementText"); @@ -13045,7 +13700,7 @@ static int _cocos2d_ui_RichElementText_create$3(lua_State *L) return num_ret; } -static int _cocos2d_ui_RichElementText_create$4(lua_State *L) +static int _olua_fun_cocos2d_ui_RichElementText_create$4(lua_State *L) { olua_startinvoke(L); @@ -13067,7 +13722,7 @@ static int _cocos2d_ui_RichElementText_create$4(lua_State *L) olua_check_integer(L, 7, &arg7); olua_check_string(L, 8, &arg8); - // static cocos2d::ui::RichElementText *create(int tag, const cocos2d::Color3B &color, uint8_t opacity, const std::string &text, const std::string &fontName, float fontSize, @optional uint32_t flags, @optional const std::string &url, @optional const cocos2d::Color3B &outlineColor, @optional int outlineSize, @optional const cocos2d::Color3B &shadowColor, @optional const cocos2d::Size &shadowOffset, @optional int shadowBlurRadius, @optional const cocos2d::Color3B &glowColor) + // static cocos2d::ui::RichElementText *create(int tag, const cocos2d::Color3B &color, uint8_t opacity, const std::string &text, const std::string &fontName, float fontSize, @optional uint32_t flags, @optional const std::string &url) cocos2d::ui::RichElementText *ret = cocos2d::ui::RichElementText::create(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8); int num_ret = olua_push_object(L, ret, "ccui.RichElementText"); @@ -13076,7 +13731,7 @@ static int _cocos2d_ui_RichElementText_create$4(lua_State *L) return num_ret; } -static int _cocos2d_ui_RichElementText_create$5(lua_State *L) +static int _olua_fun_cocos2d_ui_RichElementText_create$5(lua_State *L) { olua_startinvoke(L); @@ -13100,7 +13755,7 @@ static int _cocos2d_ui_RichElementText_create$5(lua_State *L) olua_check_string(L, 8, &arg8); olua_check_cocos2d_Color3B(L, 9, &arg9); - // static cocos2d::ui::RichElementText *create(int tag, const cocos2d::Color3B &color, uint8_t opacity, const std::string &text, const std::string &fontName, float fontSize, @optional uint32_t flags, @optional const std::string &url, @optional const cocos2d::Color3B &outlineColor, @optional int outlineSize, @optional const cocos2d::Color3B &shadowColor, @optional const cocos2d::Size &shadowOffset, @optional int shadowBlurRadius, @optional const cocos2d::Color3B &glowColor) + // static cocos2d::ui::RichElementText *create(int tag, const cocos2d::Color3B &color, uint8_t opacity, const std::string &text, const std::string &fontName, float fontSize, @optional uint32_t flags, @optional const std::string &url, @optional const cocos2d::Color3B &outlineColor) cocos2d::ui::RichElementText *ret = cocos2d::ui::RichElementText::create(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9); int num_ret = olua_push_object(L, ret, "ccui.RichElementText"); @@ -13109,7 +13764,7 @@ static int _cocos2d_ui_RichElementText_create$5(lua_State *L) return num_ret; } -static int _cocos2d_ui_RichElementText_create$6(lua_State *L) +static int _olua_fun_cocos2d_ui_RichElementText_create$6(lua_State *L) { olua_startinvoke(L); @@ -13135,7 +13790,7 @@ static int _cocos2d_ui_RichElementText_create$6(lua_State *L) olua_check_cocos2d_Color3B(L, 9, &arg9); olua_check_integer(L, 10, &arg10); - // static cocos2d::ui::RichElementText *create(int tag, const cocos2d::Color3B &color, uint8_t opacity, const std::string &text, const std::string &fontName, float fontSize, @optional uint32_t flags, @optional const std::string &url, @optional const cocos2d::Color3B &outlineColor, @optional int outlineSize, @optional const cocos2d::Color3B &shadowColor, @optional const cocos2d::Size &shadowOffset, @optional int shadowBlurRadius, @optional const cocos2d::Color3B &glowColor) + // static cocos2d::ui::RichElementText *create(int tag, const cocos2d::Color3B &color, uint8_t opacity, const std::string &text, const std::string &fontName, float fontSize, @optional uint32_t flags, @optional const std::string &url, @optional const cocos2d::Color3B &outlineColor, @optional int outlineSize) cocos2d::ui::RichElementText *ret = cocos2d::ui::RichElementText::create(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10); int num_ret = olua_push_object(L, ret, "ccui.RichElementText"); @@ -13144,7 +13799,7 @@ static int _cocos2d_ui_RichElementText_create$6(lua_State *L) return num_ret; } -static int _cocos2d_ui_RichElementText_create$7(lua_State *L) +static int _olua_fun_cocos2d_ui_RichElementText_create$7(lua_State *L) { olua_startinvoke(L); @@ -13172,7 +13827,7 @@ static int _cocos2d_ui_RichElementText_create$7(lua_State *L) olua_check_integer(L, 10, &arg10); olua_check_cocos2d_Color3B(L, 11, &arg11); - // static cocos2d::ui::RichElementText *create(int tag, const cocos2d::Color3B &color, uint8_t opacity, const std::string &text, const std::string &fontName, float fontSize, @optional uint32_t flags, @optional const std::string &url, @optional const cocos2d::Color3B &outlineColor, @optional int outlineSize, @optional const cocos2d::Color3B &shadowColor, @optional const cocos2d::Size &shadowOffset, @optional int shadowBlurRadius, @optional const cocos2d::Color3B &glowColor) + // static cocos2d::ui::RichElementText *create(int tag, const cocos2d::Color3B &color, uint8_t opacity, const std::string &text, const std::string &fontName, float fontSize, @optional uint32_t flags, @optional const std::string &url, @optional const cocos2d::Color3B &outlineColor, @optional int outlineSize, @optional const cocos2d::Color3B &shadowColor) cocos2d::ui::RichElementText *ret = cocos2d::ui::RichElementText::create(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11); int num_ret = olua_push_object(L, ret, "ccui.RichElementText"); @@ -13181,7 +13836,7 @@ static int _cocos2d_ui_RichElementText_create$7(lua_State *L) return num_ret; } -static int _cocos2d_ui_RichElementText_create$8(lua_State *L) +static int _olua_fun_cocos2d_ui_RichElementText_create$8(lua_State *L) { olua_startinvoke(L); @@ -13196,7 +13851,7 @@ static int _cocos2d_ui_RichElementText_create$8(lua_State *L) cocos2d::Color3B arg9; /** outlineColor */ int arg10 = 0; /** outlineSize */ cocos2d::Color3B arg11; /** shadowColor */ - cocos2d::Size arg12; /** shadowOffset */ + cocos2d::Size *arg12; /** shadowOffset */ olua_check_integer(L, 1, &arg1); olua_check_cocos2d_Color3B(L, 2, &arg2); @@ -13211,8 +13866,8 @@ static int _cocos2d_ui_RichElementText_create$8(lua_State *L) olua_check_cocos2d_Color3B(L, 11, &arg11); olua_check_object(L, 12, &arg12, "cc.Size"); - // static cocos2d::ui::RichElementText *create(int tag, const cocos2d::Color3B &color, uint8_t opacity, const std::string &text, const std::string &fontName, float fontSize, @optional uint32_t flags, @optional const std::string &url, @optional const cocos2d::Color3B &outlineColor, @optional int outlineSize, @optional const cocos2d::Color3B &shadowColor, @optional const cocos2d::Size &shadowOffset, @optional int shadowBlurRadius, @optional const cocos2d::Color3B &glowColor) - cocos2d::ui::RichElementText *ret = cocos2d::ui::RichElementText::create(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12); + // static cocos2d::ui::RichElementText *create(int tag, const cocos2d::Color3B &color, uint8_t opacity, const std::string &text, const std::string &fontName, float fontSize, @optional uint32_t flags, @optional const std::string &url, @optional const cocos2d::Color3B &outlineColor, @optional int outlineSize, @optional const cocos2d::Color3B &shadowColor, @optional const cocos2d::Size &shadowOffset) + cocos2d::ui::RichElementText *ret = cocos2d::ui::RichElementText::create(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, *arg12); int num_ret = olua_push_object(L, ret, "ccui.RichElementText"); olua_endinvoke(L); @@ -13220,7 +13875,7 @@ static int _cocos2d_ui_RichElementText_create$8(lua_State *L) return num_ret; } -static int _cocos2d_ui_RichElementText_create$9(lua_State *L) +static int _olua_fun_cocos2d_ui_RichElementText_create$9(lua_State *L) { olua_startinvoke(L); @@ -13235,7 +13890,7 @@ static int _cocos2d_ui_RichElementText_create$9(lua_State *L) cocos2d::Color3B arg9; /** outlineColor */ int arg10 = 0; /** outlineSize */ cocos2d::Color3B arg11; /** shadowColor */ - cocos2d::Size arg12; /** shadowOffset */ + cocos2d::Size *arg12; /** shadowOffset */ int arg13 = 0; /** shadowBlurRadius */ olua_check_integer(L, 1, &arg1); @@ -13252,8 +13907,8 @@ static int _cocos2d_ui_RichElementText_create$9(lua_State *L) olua_check_object(L, 12, &arg12, "cc.Size"); olua_check_integer(L, 13, &arg13); - // static cocos2d::ui::RichElementText *create(int tag, const cocos2d::Color3B &color, uint8_t opacity, const std::string &text, const std::string &fontName, float fontSize, @optional uint32_t flags, @optional const std::string &url, @optional const cocos2d::Color3B &outlineColor, @optional int outlineSize, @optional const cocos2d::Color3B &shadowColor, @optional const cocos2d::Size &shadowOffset, @optional int shadowBlurRadius, @optional const cocos2d::Color3B &glowColor) - cocos2d::ui::RichElementText *ret = cocos2d::ui::RichElementText::create(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13); + // static cocos2d::ui::RichElementText *create(int tag, const cocos2d::Color3B &color, uint8_t opacity, const std::string &text, const std::string &fontName, float fontSize, @optional uint32_t flags, @optional const std::string &url, @optional const cocos2d::Color3B &outlineColor, @optional int outlineSize, @optional const cocos2d::Color3B &shadowColor, @optional const cocos2d::Size &shadowOffset, @optional int shadowBlurRadius) + cocos2d::ui::RichElementText *ret = cocos2d::ui::RichElementText::create(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, *arg12, arg13); int num_ret = olua_push_object(L, ret, "ccui.RichElementText"); olua_endinvoke(L); @@ -13261,70 +13916,70 @@ static int _cocos2d_ui_RichElementText_create$9(lua_State *L) return num_ret; } -static int _cocos2d_ui_RichElementText_create(lua_State *L) +static int _olua_fun_cocos2d_ui_RichElementText_create(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 6) { // if ((olua_is_integer(L, 1)) && (olua_is_cocos2d_Color3B(L, 2)) && (olua_is_integer(L, 3)) && (olua_is_string(L, 4)) && (olua_is_string(L, 5)) && (olua_is_number(L, 6))) { - // static cocos2d::ui::RichElementText *create(int tag, const cocos2d::Color3B &color, uint8_t opacity, const std::string &text, const std::string &fontName, float fontSize, @optional uint32_t flags, @optional const std::string &url, @optional const cocos2d::Color3B &outlineColor, @optional int outlineSize, @optional const cocos2d::Color3B &shadowColor, @optional const cocos2d::Size &shadowOffset, @optional int shadowBlurRadius, @optional const cocos2d::Color3B &glowColor) - return _cocos2d_ui_RichElementText_create$2(L); + // static cocos2d::ui::RichElementText *create(int tag, const cocos2d::Color3B &color, uint8_t opacity, const std::string &text, const std::string &fontName, float fontSize) + return _olua_fun_cocos2d_ui_RichElementText_create$2(L); // } } if (num_args == 7) { // if ((olua_is_integer(L, 1)) && (olua_is_cocos2d_Color3B(L, 2)) && (olua_is_integer(L, 3)) && (olua_is_string(L, 4)) && (olua_is_string(L, 5)) && (olua_is_number(L, 6)) && (olua_is_integer(L, 7))) { - // static cocos2d::ui::RichElementText *create(int tag, const cocos2d::Color3B &color, uint8_t opacity, const std::string &text, const std::string &fontName, float fontSize, @optional uint32_t flags, @optional const std::string &url, @optional const cocos2d::Color3B &outlineColor, @optional int outlineSize, @optional const cocos2d::Color3B &shadowColor, @optional const cocos2d::Size &shadowOffset, @optional int shadowBlurRadius, @optional const cocos2d::Color3B &glowColor) - return _cocos2d_ui_RichElementText_create$3(L); + // static cocos2d::ui::RichElementText *create(int tag, const cocos2d::Color3B &color, uint8_t opacity, const std::string &text, const std::string &fontName, float fontSize, @optional uint32_t flags) + return _olua_fun_cocos2d_ui_RichElementText_create$3(L); // } } if (num_args == 8) { // if ((olua_is_integer(L, 1)) && (olua_is_cocos2d_Color3B(L, 2)) && (olua_is_integer(L, 3)) && (olua_is_string(L, 4)) && (olua_is_string(L, 5)) && (olua_is_number(L, 6)) && (olua_is_integer(L, 7)) && (olua_is_string(L, 8))) { - // static cocos2d::ui::RichElementText *create(int tag, const cocos2d::Color3B &color, uint8_t opacity, const std::string &text, const std::string &fontName, float fontSize, @optional uint32_t flags, @optional const std::string &url, @optional const cocos2d::Color3B &outlineColor, @optional int outlineSize, @optional const cocos2d::Color3B &shadowColor, @optional const cocos2d::Size &shadowOffset, @optional int shadowBlurRadius, @optional const cocos2d::Color3B &glowColor) - return _cocos2d_ui_RichElementText_create$4(L); + // static cocos2d::ui::RichElementText *create(int tag, const cocos2d::Color3B &color, uint8_t opacity, const std::string &text, const std::string &fontName, float fontSize, @optional uint32_t flags, @optional const std::string &url) + return _olua_fun_cocos2d_ui_RichElementText_create$4(L); // } } if (num_args == 9) { // if ((olua_is_integer(L, 1)) && (olua_is_cocos2d_Color3B(L, 2)) && (olua_is_integer(L, 3)) && (olua_is_string(L, 4)) && (olua_is_string(L, 5)) && (olua_is_number(L, 6)) && (olua_is_integer(L, 7)) && (olua_is_string(L, 8)) && (olua_is_cocos2d_Color3B(L, 9))) { - // static cocos2d::ui::RichElementText *create(int tag, const cocos2d::Color3B &color, uint8_t opacity, const std::string &text, const std::string &fontName, float fontSize, @optional uint32_t flags, @optional const std::string &url, @optional const cocos2d::Color3B &outlineColor, @optional int outlineSize, @optional const cocos2d::Color3B &shadowColor, @optional const cocos2d::Size &shadowOffset, @optional int shadowBlurRadius, @optional const cocos2d::Color3B &glowColor) - return _cocos2d_ui_RichElementText_create$5(L); + // static cocos2d::ui::RichElementText *create(int tag, const cocos2d::Color3B &color, uint8_t opacity, const std::string &text, const std::string &fontName, float fontSize, @optional uint32_t flags, @optional const std::string &url, @optional const cocos2d::Color3B &outlineColor) + return _olua_fun_cocos2d_ui_RichElementText_create$5(L); // } } if (num_args == 10) { // if ((olua_is_integer(L, 1)) && (olua_is_cocos2d_Color3B(L, 2)) && (olua_is_integer(L, 3)) && (olua_is_string(L, 4)) && (olua_is_string(L, 5)) && (olua_is_number(L, 6)) && (olua_is_integer(L, 7)) && (olua_is_string(L, 8)) && (olua_is_cocos2d_Color3B(L, 9)) && (olua_is_integer(L, 10))) { - // static cocos2d::ui::RichElementText *create(int tag, const cocos2d::Color3B &color, uint8_t opacity, const std::string &text, const std::string &fontName, float fontSize, @optional uint32_t flags, @optional const std::string &url, @optional const cocos2d::Color3B &outlineColor, @optional int outlineSize, @optional const cocos2d::Color3B &shadowColor, @optional const cocos2d::Size &shadowOffset, @optional int shadowBlurRadius, @optional const cocos2d::Color3B &glowColor) - return _cocos2d_ui_RichElementText_create$6(L); + // static cocos2d::ui::RichElementText *create(int tag, const cocos2d::Color3B &color, uint8_t opacity, const std::string &text, const std::string &fontName, float fontSize, @optional uint32_t flags, @optional const std::string &url, @optional const cocos2d::Color3B &outlineColor, @optional int outlineSize) + return _olua_fun_cocos2d_ui_RichElementText_create$6(L); // } } if (num_args == 11) { // if ((olua_is_integer(L, 1)) && (olua_is_cocos2d_Color3B(L, 2)) && (olua_is_integer(L, 3)) && (olua_is_string(L, 4)) && (olua_is_string(L, 5)) && (olua_is_number(L, 6)) && (olua_is_integer(L, 7)) && (olua_is_string(L, 8)) && (olua_is_cocos2d_Color3B(L, 9)) && (olua_is_integer(L, 10)) && (olua_is_cocos2d_Color3B(L, 11))) { - // static cocos2d::ui::RichElementText *create(int tag, const cocos2d::Color3B &color, uint8_t opacity, const std::string &text, const std::string &fontName, float fontSize, @optional uint32_t flags, @optional const std::string &url, @optional const cocos2d::Color3B &outlineColor, @optional int outlineSize, @optional const cocos2d::Color3B &shadowColor, @optional const cocos2d::Size &shadowOffset, @optional int shadowBlurRadius, @optional const cocos2d::Color3B &glowColor) - return _cocos2d_ui_RichElementText_create$7(L); + // static cocos2d::ui::RichElementText *create(int tag, const cocos2d::Color3B &color, uint8_t opacity, const std::string &text, const std::string &fontName, float fontSize, @optional uint32_t flags, @optional const std::string &url, @optional const cocos2d::Color3B &outlineColor, @optional int outlineSize, @optional const cocos2d::Color3B &shadowColor) + return _olua_fun_cocos2d_ui_RichElementText_create$7(L); // } } if (num_args == 12) { // if ((olua_is_integer(L, 1)) && (olua_is_cocos2d_Color3B(L, 2)) && (olua_is_integer(L, 3)) && (olua_is_string(L, 4)) && (olua_is_string(L, 5)) && (olua_is_number(L, 6)) && (olua_is_integer(L, 7)) && (olua_is_string(L, 8)) && (olua_is_cocos2d_Color3B(L, 9)) && (olua_is_integer(L, 10)) && (olua_is_cocos2d_Color3B(L, 11)) && (olua_is_object(L, 12, "cc.Size"))) { - // static cocos2d::ui::RichElementText *create(int tag, const cocos2d::Color3B &color, uint8_t opacity, const std::string &text, const std::string &fontName, float fontSize, @optional uint32_t flags, @optional const std::string &url, @optional const cocos2d::Color3B &outlineColor, @optional int outlineSize, @optional const cocos2d::Color3B &shadowColor, @optional const cocos2d::Size &shadowOffset, @optional int shadowBlurRadius, @optional const cocos2d::Color3B &glowColor) - return _cocos2d_ui_RichElementText_create$8(L); + // static cocos2d::ui::RichElementText *create(int tag, const cocos2d::Color3B &color, uint8_t opacity, const std::string &text, const std::string &fontName, float fontSize, @optional uint32_t flags, @optional const std::string &url, @optional const cocos2d::Color3B &outlineColor, @optional int outlineSize, @optional const cocos2d::Color3B &shadowColor, @optional const cocos2d::Size &shadowOffset) + return _olua_fun_cocos2d_ui_RichElementText_create$8(L); // } } if (num_args == 13) { // if ((olua_is_integer(L, 1)) && (olua_is_cocos2d_Color3B(L, 2)) && (olua_is_integer(L, 3)) && (olua_is_string(L, 4)) && (olua_is_string(L, 5)) && (olua_is_number(L, 6)) && (olua_is_integer(L, 7)) && (olua_is_string(L, 8)) && (olua_is_cocos2d_Color3B(L, 9)) && (olua_is_integer(L, 10)) && (olua_is_cocos2d_Color3B(L, 11)) && (olua_is_object(L, 12, "cc.Size")) && (olua_is_integer(L, 13))) { - // static cocos2d::ui::RichElementText *create(int tag, const cocos2d::Color3B &color, uint8_t opacity, const std::string &text, const std::string &fontName, float fontSize, @optional uint32_t flags, @optional const std::string &url, @optional const cocos2d::Color3B &outlineColor, @optional int outlineSize, @optional const cocos2d::Color3B &shadowColor, @optional const cocos2d::Size &shadowOffset, @optional int shadowBlurRadius, @optional const cocos2d::Color3B &glowColor) - return _cocos2d_ui_RichElementText_create$9(L); + // static cocos2d::ui::RichElementText *create(int tag, const cocos2d::Color3B &color, uint8_t opacity, const std::string &text, const std::string &fontName, float fontSize, @optional uint32_t flags, @optional const std::string &url, @optional const cocos2d::Color3B &outlineColor, @optional int outlineSize, @optional const cocos2d::Color3B &shadowColor, @optional const cocos2d::Size &shadowOffset, @optional int shadowBlurRadius) + return _olua_fun_cocos2d_ui_RichElementText_create$9(L); // } } if (num_args == 14) { // if ((olua_is_integer(L, 1)) && (olua_is_cocos2d_Color3B(L, 2)) && (olua_is_integer(L, 3)) && (olua_is_string(L, 4)) && (olua_is_string(L, 5)) && (olua_is_number(L, 6)) && (olua_is_integer(L, 7)) && (olua_is_string(L, 8)) && (olua_is_cocos2d_Color3B(L, 9)) && (olua_is_integer(L, 10)) && (olua_is_cocos2d_Color3B(L, 11)) && (olua_is_object(L, 12, "cc.Size")) && (olua_is_integer(L, 13)) && (olua_is_cocos2d_Color3B(L, 14))) { // static cocos2d::ui::RichElementText *create(int tag, const cocos2d::Color3B &color, uint8_t opacity, const std::string &text, const std::string &fontName, float fontSize, @optional uint32_t flags, @optional const std::string &url, @optional const cocos2d::Color3B &outlineColor, @optional int outlineSize, @optional const cocos2d::Color3B &shadowColor, @optional const cocos2d::Size &shadowOffset, @optional int shadowBlurRadius, @optional const cocos2d::Color3B &glowColor) - return _cocos2d_ui_RichElementText_create$1(L); + return _olua_fun_cocos2d_ui_RichElementText_create$1(L); // } } @@ -13333,7 +13988,7 @@ static int _cocos2d_ui_RichElementText_create(lua_State *L) return 0; } -static int _cocos2d_ui_RichElementText_init$1(lua_State *L) +static int _olua_fun_cocos2d_ui_RichElementText_init$1(lua_State *L) { olua_startinvoke(L); @@ -13349,7 +14004,7 @@ static int _cocos2d_ui_RichElementText_init$1(lua_State *L) cocos2d::Color3B arg9; /** outlineColor */ int arg10 = 0; /** outlineSize */ cocos2d::Color3B arg11; /** shadowColor */ - cocos2d::Size arg12; /** shadowOffset */ + cocos2d::Size *arg12; /** shadowOffset */ int arg13 = 0; /** shadowBlurRadius */ cocos2d::Color3B arg14; /** glowColor */ @@ -13370,7 +14025,7 @@ static int _cocos2d_ui_RichElementText_init$1(lua_State *L) olua_check_cocos2d_Color3B(L, 15, &arg14); // bool init(int tag, const cocos2d::Color3B &color, uint8_t opacity, const std::string &text, const std::string &fontName, float fontSize, uint32_t flags, const std::string &url, @optional const cocos2d::Color3B &outlineColor, @optional int outlineSize, @optional const cocos2d::Color3B &shadowColor, @optional const cocos2d::Size &shadowOffset, @optional int shadowBlurRadius, @optional const cocos2d::Color3B &glowColor) - bool ret = self->init(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14); + bool ret = self->init(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, *arg12, arg13, arg14); int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); @@ -13378,7 +14033,7 @@ static int _cocos2d_ui_RichElementText_init$1(lua_State *L) return num_ret; } -static int _cocos2d_ui_RichElementText_init$2(lua_State *L) +static int _olua_fun_cocos2d_ui_RichElementText_init$2(lua_State *L) { olua_startinvoke(L); @@ -13402,7 +14057,7 @@ static int _cocos2d_ui_RichElementText_init$2(lua_State *L) olua_check_integer(L, 8, &arg7); olua_check_string(L, 9, &arg8); - // bool init(int tag, const cocos2d::Color3B &color, uint8_t opacity, const std::string &text, const std::string &fontName, float fontSize, uint32_t flags, const std::string &url, @optional const cocos2d::Color3B &outlineColor, @optional int outlineSize, @optional const cocos2d::Color3B &shadowColor, @optional const cocos2d::Size &shadowOffset, @optional int shadowBlurRadius, @optional const cocos2d::Color3B &glowColor) + // bool init(int tag, const cocos2d::Color3B &color, uint8_t opacity, const std::string &text, const std::string &fontName, float fontSize, uint32_t flags, const std::string &url) bool ret = self->init(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8); int num_ret = olua_push_bool(L, ret); @@ -13411,7 +14066,7 @@ static int _cocos2d_ui_RichElementText_init$2(lua_State *L) return num_ret; } -static int _cocos2d_ui_RichElementText_init$3(lua_State *L) +static int _olua_fun_cocos2d_ui_RichElementText_init$3(lua_State *L) { olua_startinvoke(L); @@ -13437,7 +14092,7 @@ static int _cocos2d_ui_RichElementText_init$3(lua_State *L) olua_check_string(L, 9, &arg8); olua_check_cocos2d_Color3B(L, 10, &arg9); - // bool init(int tag, const cocos2d::Color3B &color, uint8_t opacity, const std::string &text, const std::string &fontName, float fontSize, uint32_t flags, const std::string &url, @optional const cocos2d::Color3B &outlineColor, @optional int outlineSize, @optional const cocos2d::Color3B &shadowColor, @optional const cocos2d::Size &shadowOffset, @optional int shadowBlurRadius, @optional const cocos2d::Color3B &glowColor) + // bool init(int tag, const cocos2d::Color3B &color, uint8_t opacity, const std::string &text, const std::string &fontName, float fontSize, uint32_t flags, const std::string &url, @optional const cocos2d::Color3B &outlineColor) bool ret = self->init(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9); int num_ret = olua_push_bool(L, ret); @@ -13446,7 +14101,7 @@ static int _cocos2d_ui_RichElementText_init$3(lua_State *L) return num_ret; } -static int _cocos2d_ui_RichElementText_init$4(lua_State *L) +static int _olua_fun_cocos2d_ui_RichElementText_init$4(lua_State *L) { olua_startinvoke(L); @@ -13474,7 +14129,7 @@ static int _cocos2d_ui_RichElementText_init$4(lua_State *L) olua_check_cocos2d_Color3B(L, 10, &arg9); olua_check_integer(L, 11, &arg10); - // bool init(int tag, const cocos2d::Color3B &color, uint8_t opacity, const std::string &text, const std::string &fontName, float fontSize, uint32_t flags, const std::string &url, @optional const cocos2d::Color3B &outlineColor, @optional int outlineSize, @optional const cocos2d::Color3B &shadowColor, @optional const cocos2d::Size &shadowOffset, @optional int shadowBlurRadius, @optional const cocos2d::Color3B &glowColor) + // bool init(int tag, const cocos2d::Color3B &color, uint8_t opacity, const std::string &text, const std::string &fontName, float fontSize, uint32_t flags, const std::string &url, @optional const cocos2d::Color3B &outlineColor, @optional int outlineSize) bool ret = self->init(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10); int num_ret = olua_push_bool(L, ret); @@ -13483,7 +14138,7 @@ static int _cocos2d_ui_RichElementText_init$4(lua_State *L) return num_ret; } -static int _cocos2d_ui_RichElementText_init$5(lua_State *L) +static int _olua_fun_cocos2d_ui_RichElementText_init$5(lua_State *L) { olua_startinvoke(L); @@ -13513,7 +14168,7 @@ static int _cocos2d_ui_RichElementText_init$5(lua_State *L) olua_check_integer(L, 11, &arg10); olua_check_cocos2d_Color3B(L, 12, &arg11); - // bool init(int tag, const cocos2d::Color3B &color, uint8_t opacity, const std::string &text, const std::string &fontName, float fontSize, uint32_t flags, const std::string &url, @optional const cocos2d::Color3B &outlineColor, @optional int outlineSize, @optional const cocos2d::Color3B &shadowColor, @optional const cocos2d::Size &shadowOffset, @optional int shadowBlurRadius, @optional const cocos2d::Color3B &glowColor) + // bool init(int tag, const cocos2d::Color3B &color, uint8_t opacity, const std::string &text, const std::string &fontName, float fontSize, uint32_t flags, const std::string &url, @optional const cocos2d::Color3B &outlineColor, @optional int outlineSize, @optional const cocos2d::Color3B &shadowColor) bool ret = self->init(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11); int num_ret = olua_push_bool(L, ret); @@ -13522,7 +14177,7 @@ static int _cocos2d_ui_RichElementText_init$5(lua_State *L) return num_ret; } -static int _cocos2d_ui_RichElementText_init$6(lua_State *L) +static int _olua_fun_cocos2d_ui_RichElementText_init$6(lua_State *L) { olua_startinvoke(L); @@ -13538,7 +14193,7 @@ static int _cocos2d_ui_RichElementText_init$6(lua_State *L) cocos2d::Color3B arg9; /** outlineColor */ int arg10 = 0; /** outlineSize */ cocos2d::Color3B arg11; /** shadowColor */ - cocos2d::Size arg12; /** shadowOffset */ + cocos2d::Size *arg12; /** shadowOffset */ olua_to_object(L, 1, &self, "ccui.RichElementText"); olua_check_integer(L, 2, &arg1); @@ -13554,8 +14209,8 @@ static int _cocos2d_ui_RichElementText_init$6(lua_State *L) olua_check_cocos2d_Color3B(L, 12, &arg11); olua_check_object(L, 13, &arg12, "cc.Size"); - // bool init(int tag, const cocos2d::Color3B &color, uint8_t opacity, const std::string &text, const std::string &fontName, float fontSize, uint32_t flags, const std::string &url, @optional const cocos2d::Color3B &outlineColor, @optional int outlineSize, @optional const cocos2d::Color3B &shadowColor, @optional const cocos2d::Size &shadowOffset, @optional int shadowBlurRadius, @optional const cocos2d::Color3B &glowColor) - bool ret = self->init(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12); + // bool init(int tag, const cocos2d::Color3B &color, uint8_t opacity, const std::string &text, const std::string &fontName, float fontSize, uint32_t flags, const std::string &url, @optional const cocos2d::Color3B &outlineColor, @optional int outlineSize, @optional const cocos2d::Color3B &shadowColor, @optional const cocos2d::Size &shadowOffset) + bool ret = self->init(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, *arg12); int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); @@ -13563,7 +14218,7 @@ static int _cocos2d_ui_RichElementText_init$6(lua_State *L) return num_ret; } -static int _cocos2d_ui_RichElementText_init$7(lua_State *L) +static int _olua_fun_cocos2d_ui_RichElementText_init$7(lua_State *L) { olua_startinvoke(L); @@ -13579,7 +14234,7 @@ static int _cocos2d_ui_RichElementText_init$7(lua_State *L) cocos2d::Color3B arg9; /** outlineColor */ int arg10 = 0; /** outlineSize */ cocos2d::Color3B arg11; /** shadowColor */ - cocos2d::Size arg12; /** shadowOffset */ + cocos2d::Size *arg12; /** shadowOffset */ int arg13 = 0; /** shadowBlurRadius */ olua_to_object(L, 1, &self, "ccui.RichElementText"); @@ -13597,8 +14252,8 @@ static int _cocos2d_ui_RichElementText_init$7(lua_State *L) olua_check_object(L, 13, &arg12, "cc.Size"); olua_check_integer(L, 14, &arg13); - // bool init(int tag, const cocos2d::Color3B &color, uint8_t opacity, const std::string &text, const std::string &fontName, float fontSize, uint32_t flags, const std::string &url, @optional const cocos2d::Color3B &outlineColor, @optional int outlineSize, @optional const cocos2d::Color3B &shadowColor, @optional const cocos2d::Size &shadowOffset, @optional int shadowBlurRadius, @optional const cocos2d::Color3B &glowColor) - bool ret = self->init(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13); + // bool init(int tag, const cocos2d::Color3B &color, uint8_t opacity, const std::string &text, const std::string &fontName, float fontSize, uint32_t flags, const std::string &url, @optional const cocos2d::Color3B &outlineColor, @optional int outlineSize, @optional const cocos2d::Color3B &shadowColor, @optional const cocos2d::Size &shadowOffset, @optional int shadowBlurRadius) + bool ret = self->init(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, *arg12, arg13); int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); @@ -13606,56 +14261,56 @@ static int _cocos2d_ui_RichElementText_init$7(lua_State *L) return num_ret; } -static int _cocos2d_ui_RichElementText_init(lua_State *L) +static int _olua_fun_cocos2d_ui_RichElementText_init(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 8) { // if ((olua_is_integer(L, 2)) && (olua_is_cocos2d_Color3B(L, 3)) && (olua_is_integer(L, 4)) && (olua_is_string(L, 5)) && (olua_is_string(L, 6)) && (olua_is_number(L, 7)) && (olua_is_integer(L, 8)) && (olua_is_string(L, 9))) { - // bool init(int tag, const cocos2d::Color3B &color, uint8_t opacity, const std::string &text, const std::string &fontName, float fontSize, uint32_t flags, const std::string &url, @optional const cocos2d::Color3B &outlineColor, @optional int outlineSize, @optional const cocos2d::Color3B &shadowColor, @optional const cocos2d::Size &shadowOffset, @optional int shadowBlurRadius, @optional const cocos2d::Color3B &glowColor) - return _cocos2d_ui_RichElementText_init$2(L); + // bool init(int tag, const cocos2d::Color3B &color, uint8_t opacity, const std::string &text, const std::string &fontName, float fontSize, uint32_t flags, const std::string &url) + return _olua_fun_cocos2d_ui_RichElementText_init$2(L); // } } if (num_args == 9) { // if ((olua_is_integer(L, 2)) && (olua_is_cocos2d_Color3B(L, 3)) && (olua_is_integer(L, 4)) && (olua_is_string(L, 5)) && (olua_is_string(L, 6)) && (olua_is_number(L, 7)) && (olua_is_integer(L, 8)) && (olua_is_string(L, 9)) && (olua_is_cocos2d_Color3B(L, 10))) { - // bool init(int tag, const cocos2d::Color3B &color, uint8_t opacity, const std::string &text, const std::string &fontName, float fontSize, uint32_t flags, const std::string &url, @optional const cocos2d::Color3B &outlineColor, @optional int outlineSize, @optional const cocos2d::Color3B &shadowColor, @optional const cocos2d::Size &shadowOffset, @optional int shadowBlurRadius, @optional const cocos2d::Color3B &glowColor) - return _cocos2d_ui_RichElementText_init$3(L); + // bool init(int tag, const cocos2d::Color3B &color, uint8_t opacity, const std::string &text, const std::string &fontName, float fontSize, uint32_t flags, const std::string &url, @optional const cocos2d::Color3B &outlineColor) + return _olua_fun_cocos2d_ui_RichElementText_init$3(L); // } } if (num_args == 10) { // if ((olua_is_integer(L, 2)) && (olua_is_cocos2d_Color3B(L, 3)) && (olua_is_integer(L, 4)) && (olua_is_string(L, 5)) && (olua_is_string(L, 6)) && (olua_is_number(L, 7)) && (olua_is_integer(L, 8)) && (olua_is_string(L, 9)) && (olua_is_cocos2d_Color3B(L, 10)) && (olua_is_integer(L, 11))) { - // bool init(int tag, const cocos2d::Color3B &color, uint8_t opacity, const std::string &text, const std::string &fontName, float fontSize, uint32_t flags, const std::string &url, @optional const cocos2d::Color3B &outlineColor, @optional int outlineSize, @optional const cocos2d::Color3B &shadowColor, @optional const cocos2d::Size &shadowOffset, @optional int shadowBlurRadius, @optional const cocos2d::Color3B &glowColor) - return _cocos2d_ui_RichElementText_init$4(L); + // bool init(int tag, const cocos2d::Color3B &color, uint8_t opacity, const std::string &text, const std::string &fontName, float fontSize, uint32_t flags, const std::string &url, @optional const cocos2d::Color3B &outlineColor, @optional int outlineSize) + return _olua_fun_cocos2d_ui_RichElementText_init$4(L); // } } if (num_args == 11) { // if ((olua_is_integer(L, 2)) && (olua_is_cocos2d_Color3B(L, 3)) && (olua_is_integer(L, 4)) && (olua_is_string(L, 5)) && (olua_is_string(L, 6)) && (olua_is_number(L, 7)) && (olua_is_integer(L, 8)) && (olua_is_string(L, 9)) && (olua_is_cocos2d_Color3B(L, 10)) && (olua_is_integer(L, 11)) && (olua_is_cocos2d_Color3B(L, 12))) { - // bool init(int tag, const cocos2d::Color3B &color, uint8_t opacity, const std::string &text, const std::string &fontName, float fontSize, uint32_t flags, const std::string &url, @optional const cocos2d::Color3B &outlineColor, @optional int outlineSize, @optional const cocos2d::Color3B &shadowColor, @optional const cocos2d::Size &shadowOffset, @optional int shadowBlurRadius, @optional const cocos2d::Color3B &glowColor) - return _cocos2d_ui_RichElementText_init$5(L); + // bool init(int tag, const cocos2d::Color3B &color, uint8_t opacity, const std::string &text, const std::string &fontName, float fontSize, uint32_t flags, const std::string &url, @optional const cocos2d::Color3B &outlineColor, @optional int outlineSize, @optional const cocos2d::Color3B &shadowColor) + return _olua_fun_cocos2d_ui_RichElementText_init$5(L); // } } if (num_args == 12) { // if ((olua_is_integer(L, 2)) && (olua_is_cocos2d_Color3B(L, 3)) && (olua_is_integer(L, 4)) && (olua_is_string(L, 5)) && (olua_is_string(L, 6)) && (olua_is_number(L, 7)) && (olua_is_integer(L, 8)) && (olua_is_string(L, 9)) && (olua_is_cocos2d_Color3B(L, 10)) && (olua_is_integer(L, 11)) && (olua_is_cocos2d_Color3B(L, 12)) && (olua_is_object(L, 13, "cc.Size"))) { - // bool init(int tag, const cocos2d::Color3B &color, uint8_t opacity, const std::string &text, const std::string &fontName, float fontSize, uint32_t flags, const std::string &url, @optional const cocos2d::Color3B &outlineColor, @optional int outlineSize, @optional const cocos2d::Color3B &shadowColor, @optional const cocos2d::Size &shadowOffset, @optional int shadowBlurRadius, @optional const cocos2d::Color3B &glowColor) - return _cocos2d_ui_RichElementText_init$6(L); + // bool init(int tag, const cocos2d::Color3B &color, uint8_t opacity, const std::string &text, const std::string &fontName, float fontSize, uint32_t flags, const std::string &url, @optional const cocos2d::Color3B &outlineColor, @optional int outlineSize, @optional const cocos2d::Color3B &shadowColor, @optional const cocos2d::Size &shadowOffset) + return _olua_fun_cocos2d_ui_RichElementText_init$6(L); // } } if (num_args == 13) { // if ((olua_is_integer(L, 2)) && (olua_is_cocos2d_Color3B(L, 3)) && (olua_is_integer(L, 4)) && (olua_is_string(L, 5)) && (olua_is_string(L, 6)) && (olua_is_number(L, 7)) && (olua_is_integer(L, 8)) && (olua_is_string(L, 9)) && (olua_is_cocos2d_Color3B(L, 10)) && (olua_is_integer(L, 11)) && (olua_is_cocos2d_Color3B(L, 12)) && (olua_is_object(L, 13, "cc.Size")) && (olua_is_integer(L, 14))) { - // bool init(int tag, const cocos2d::Color3B &color, uint8_t opacity, const std::string &text, const std::string &fontName, float fontSize, uint32_t flags, const std::string &url, @optional const cocos2d::Color3B &outlineColor, @optional int outlineSize, @optional const cocos2d::Color3B &shadowColor, @optional const cocos2d::Size &shadowOffset, @optional int shadowBlurRadius, @optional const cocos2d::Color3B &glowColor) - return _cocos2d_ui_RichElementText_init$7(L); + // bool init(int tag, const cocos2d::Color3B &color, uint8_t opacity, const std::string &text, const std::string &fontName, float fontSize, uint32_t flags, const std::string &url, @optional const cocos2d::Color3B &outlineColor, @optional int outlineSize, @optional const cocos2d::Color3B &shadowColor, @optional const cocos2d::Size &shadowOffset, @optional int shadowBlurRadius) + return _olua_fun_cocos2d_ui_RichElementText_init$7(L); // } } if (num_args == 14) { // if ((olua_is_integer(L, 2)) && (olua_is_cocos2d_Color3B(L, 3)) && (olua_is_integer(L, 4)) && (olua_is_string(L, 5)) && (olua_is_string(L, 6)) && (olua_is_number(L, 7)) && (olua_is_integer(L, 8)) && (olua_is_string(L, 9)) && (olua_is_cocos2d_Color3B(L, 10)) && (olua_is_integer(L, 11)) && (olua_is_cocos2d_Color3B(L, 12)) && (olua_is_object(L, 13, "cc.Size")) && (olua_is_integer(L, 14)) && (olua_is_cocos2d_Color3B(L, 15))) { // bool init(int tag, const cocos2d::Color3B &color, uint8_t opacity, const std::string &text, const std::string &fontName, float fontSize, uint32_t flags, const std::string &url, @optional const cocos2d::Color3B &outlineColor, @optional int outlineSize, @optional const cocos2d::Color3B &shadowColor, @optional const cocos2d::Size &shadowOffset, @optional int shadowBlurRadius, @optional const cocos2d::Color3B &glowColor) - return _cocos2d_ui_RichElementText_init$1(L); + return _olua_fun_cocos2d_ui_RichElementText_init$1(L); // } } @@ -13664,11 +14319,11 @@ static int _cocos2d_ui_RichElementText_init(lua_State *L) return 0; } -static int _cocos2d_ui_RichElementText_new(lua_State *L) +static int _olua_fun_cocos2d_ui_RichElementText_new(lua_State *L) { olua_startinvoke(L); - // RichElementText() + // cocos2d::ui::RichElementText() cocos2d::ui::RichElementText *ret = new cocos2d::ui::RichElementText(); int num_ret = olua_push_object(L, ret, "ccui.RichElementText"); olua_postnew(L, ret); @@ -13678,19 +14333,28 @@ static int _cocos2d_ui_RichElementText_new(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ui_RichElementText(lua_State *L) +static int _olua_cls_ccui_RichElementText(lua_State *L) { oluacls_class(L, "ccui.RichElementText"); - oluacls_func(L, "create", _cocos2d_ui_RichElementText_create); - oluacls_func(L, "init", _cocos2d_ui_RichElementText_init); - oluacls_func(L, "new", _cocos2d_ui_RichElementText_new); + oluacls_func(L, "create", _olua_fun_cocos2d_ui_RichElementText_create); + oluacls_func(L, "init", _olua_fun_cocos2d_ui_RichElementText_init); + oluacls_func(L, "new", _olua_fun_cocos2d_ui_RichElementText_new); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccui_RichElementText(lua_State *L) +{ + olua_require(L, "cocos2d_ui", luaopen_cocos2d_ui); + if (!olua_getclass(L, "ccui.RichElementText")) { + luaL_error(L, "class not found: cocos2d::ui::RichElementText"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_ui_RichElementImage_create$1(lua_State *L) +static int _olua_fun_cocos2d_ui_RichElementImage_create$1(lua_State *L) { olua_startinvoke(L); @@ -13717,7 +14381,7 @@ static int _cocos2d_ui_RichElementImage_create$1(lua_State *L) return num_ret; } -static int _cocos2d_ui_RichElementImage_create$2(lua_State *L) +static int _olua_fun_cocos2d_ui_RichElementImage_create$2(lua_State *L) { olua_startinvoke(L); @@ -13731,7 +14395,7 @@ static int _cocos2d_ui_RichElementImage_create$2(lua_State *L) olua_check_integer(L, 3, &arg3); olua_check_string(L, 4, &arg4); - // static cocos2d::ui::RichElementImage *create(int tag, const cocos2d::Color3B &color, uint8_t opacity, const std::string &filePath, @optional const std::string &url, @optional cocos2d::ui::Widget::TextureResType texType) + // static cocos2d::ui::RichElementImage *create(int tag, const cocos2d::Color3B &color, uint8_t opacity, const std::string &filePath) cocos2d::ui::RichElementImage *ret = cocos2d::ui::RichElementImage::create(arg1, arg2, arg3, arg4); int num_ret = olua_push_object(L, ret, "ccui.RichElementImage"); @@ -13740,7 +14404,7 @@ static int _cocos2d_ui_RichElementImage_create$2(lua_State *L) return num_ret; } -static int _cocos2d_ui_RichElementImage_create$3(lua_State *L) +static int _olua_fun_cocos2d_ui_RichElementImage_create$3(lua_State *L) { olua_startinvoke(L); @@ -13756,7 +14420,7 @@ static int _cocos2d_ui_RichElementImage_create$3(lua_State *L) olua_check_string(L, 4, &arg4); olua_check_string(L, 5, &arg5); - // static cocos2d::ui::RichElementImage *create(int tag, const cocos2d::Color3B &color, uint8_t opacity, const std::string &filePath, @optional const std::string &url, @optional cocos2d::ui::Widget::TextureResType texType) + // static cocos2d::ui::RichElementImage *create(int tag, const cocos2d::Color3B &color, uint8_t opacity, const std::string &filePath, @optional const std::string &url) cocos2d::ui::RichElementImage *ret = cocos2d::ui::RichElementImage::create(arg1, arg2, arg3, arg4, arg5); int num_ret = olua_push_object(L, ret, "ccui.RichElementImage"); @@ -13765,28 +14429,28 @@ static int _cocos2d_ui_RichElementImage_create$3(lua_State *L) return num_ret; } -static int _cocos2d_ui_RichElementImage_create(lua_State *L) +static int _olua_fun_cocos2d_ui_RichElementImage_create(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 4) { // if ((olua_is_integer(L, 1)) && (olua_is_cocos2d_Color3B(L, 2)) && (olua_is_integer(L, 3)) && (olua_is_string(L, 4))) { - // static cocos2d::ui::RichElementImage *create(int tag, const cocos2d::Color3B &color, uint8_t opacity, const std::string &filePath, @optional const std::string &url, @optional cocos2d::ui::Widget::TextureResType texType) - return _cocos2d_ui_RichElementImage_create$2(L); + // static cocos2d::ui::RichElementImage *create(int tag, const cocos2d::Color3B &color, uint8_t opacity, const std::string &filePath) + return _olua_fun_cocos2d_ui_RichElementImage_create$2(L); // } } if (num_args == 5) { // if ((olua_is_integer(L, 1)) && (olua_is_cocos2d_Color3B(L, 2)) && (olua_is_integer(L, 3)) && (olua_is_string(L, 4)) && (olua_is_string(L, 5))) { - // static cocos2d::ui::RichElementImage *create(int tag, const cocos2d::Color3B &color, uint8_t opacity, const std::string &filePath, @optional const std::string &url, @optional cocos2d::ui::Widget::TextureResType texType) - return _cocos2d_ui_RichElementImage_create$3(L); + // static cocos2d::ui::RichElementImage *create(int tag, const cocos2d::Color3B &color, uint8_t opacity, const std::string &filePath, @optional const std::string &url) + return _olua_fun_cocos2d_ui_RichElementImage_create$3(L); // } } if (num_args == 6) { // if ((olua_is_integer(L, 1)) && (olua_is_cocos2d_Color3B(L, 2)) && (olua_is_integer(L, 3)) && (olua_is_string(L, 4)) && (olua_is_string(L, 5)) && (olua_is_enum(L, 6))) { // static cocos2d::ui::RichElementImage *create(int tag, const cocos2d::Color3B &color, uint8_t opacity, const std::string &filePath, @optional const std::string &url, @optional cocos2d::ui::Widget::TextureResType texType) - return _cocos2d_ui_RichElementImage_create$1(L); + return _olua_fun_cocos2d_ui_RichElementImage_create$1(L); // } } @@ -13795,7 +14459,7 @@ static int _cocos2d_ui_RichElementImage_create(lua_State *L) return 0; } -static int _cocos2d_ui_RichElementImage_init$1(lua_State *L) +static int _olua_fun_cocos2d_ui_RichElementImage_init$1(lua_State *L) { olua_startinvoke(L); @@ -13824,7 +14488,7 @@ static int _cocos2d_ui_RichElementImage_init$1(lua_State *L) return num_ret; } -static int _cocos2d_ui_RichElementImage_init$2(lua_State *L) +static int _olua_fun_cocos2d_ui_RichElementImage_init$2(lua_State *L) { olua_startinvoke(L); @@ -13840,7 +14504,7 @@ static int _cocos2d_ui_RichElementImage_init$2(lua_State *L) olua_check_integer(L, 4, &arg3); olua_check_string(L, 5, &arg4); - // bool init(int tag, const cocos2d::Color3B &color, uint8_t opacity, const std::string &filePath, @optional const std::string &url, @optional cocos2d::ui::Widget::TextureResType texType) + // bool init(int tag, const cocos2d::Color3B &color, uint8_t opacity, const std::string &filePath) bool ret = self->init(arg1, arg2, arg3, arg4); int num_ret = olua_push_bool(L, ret); @@ -13849,7 +14513,7 @@ static int _cocos2d_ui_RichElementImage_init$2(lua_State *L) return num_ret; } -static int _cocos2d_ui_RichElementImage_init$3(lua_State *L) +static int _olua_fun_cocos2d_ui_RichElementImage_init$3(lua_State *L) { olua_startinvoke(L); @@ -13867,7 +14531,7 @@ static int _cocos2d_ui_RichElementImage_init$3(lua_State *L) olua_check_string(L, 5, &arg4); olua_check_string(L, 6, &arg5); - // bool init(int tag, const cocos2d::Color3B &color, uint8_t opacity, const std::string &filePath, @optional const std::string &url, @optional cocos2d::ui::Widget::TextureResType texType) + // bool init(int tag, const cocos2d::Color3B &color, uint8_t opacity, const std::string &filePath, @optional const std::string &url) bool ret = self->init(arg1, arg2, arg3, arg4, arg5); int num_ret = olua_push_bool(L, ret); @@ -13876,28 +14540,28 @@ static int _cocos2d_ui_RichElementImage_init$3(lua_State *L) return num_ret; } -static int _cocos2d_ui_RichElementImage_init(lua_State *L) +static int _olua_fun_cocos2d_ui_RichElementImage_init(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 4) { // if ((olua_is_integer(L, 2)) && (olua_is_cocos2d_Color3B(L, 3)) && (olua_is_integer(L, 4)) && (olua_is_string(L, 5))) { - // bool init(int tag, const cocos2d::Color3B &color, uint8_t opacity, const std::string &filePath, @optional const std::string &url, @optional cocos2d::ui::Widget::TextureResType texType) - return _cocos2d_ui_RichElementImage_init$2(L); + // bool init(int tag, const cocos2d::Color3B &color, uint8_t opacity, const std::string &filePath) + return _olua_fun_cocos2d_ui_RichElementImage_init$2(L); // } } if (num_args == 5) { // if ((olua_is_integer(L, 2)) && (olua_is_cocos2d_Color3B(L, 3)) && (olua_is_integer(L, 4)) && (olua_is_string(L, 5)) && (olua_is_string(L, 6))) { - // bool init(int tag, const cocos2d::Color3B &color, uint8_t opacity, const std::string &filePath, @optional const std::string &url, @optional cocos2d::ui::Widget::TextureResType texType) - return _cocos2d_ui_RichElementImage_init$3(L); + // bool init(int tag, const cocos2d::Color3B &color, uint8_t opacity, const std::string &filePath, @optional const std::string &url) + return _olua_fun_cocos2d_ui_RichElementImage_init$3(L); // } } if (num_args == 6) { // if ((olua_is_integer(L, 2)) && (olua_is_cocos2d_Color3B(L, 3)) && (olua_is_integer(L, 4)) && (olua_is_string(L, 5)) && (olua_is_string(L, 6)) && (olua_is_enum(L, 7))) { // bool init(int tag, const cocos2d::Color3B &color, uint8_t opacity, const std::string &filePath, @optional const std::string &url, @optional cocos2d::ui::Widget::TextureResType texType) - return _cocos2d_ui_RichElementImage_init$1(L); + return _olua_fun_cocos2d_ui_RichElementImage_init$1(L); // } } @@ -13906,11 +14570,11 @@ static int _cocos2d_ui_RichElementImage_init(lua_State *L) return 0; } -static int _cocos2d_ui_RichElementImage_new(lua_State *L) +static int _olua_fun_cocos2d_ui_RichElementImage_new(lua_State *L) { olua_startinvoke(L); - // RichElementImage() + // cocos2d::ui::RichElementImage() cocos2d::ui::RichElementImage *ret = new cocos2d::ui::RichElementImage(); int num_ret = olua_push_object(L, ret, "ccui.RichElementImage"); olua_postnew(L, ret); @@ -13920,7 +14584,7 @@ static int _cocos2d_ui_RichElementImage_new(lua_State *L) return num_ret; } -static int _cocos2d_ui_RichElementImage_setHeight(lua_State *L) +static int _olua_fun_cocos2d_ui_RichElementImage_setHeight(lua_State *L) { olua_startinvoke(L); @@ -13938,7 +14602,7 @@ static int _cocos2d_ui_RichElementImage_setHeight(lua_State *L) return 0; } -static int _cocos2d_ui_RichElementImage_setUrl(lua_State *L) +static int _olua_fun_cocos2d_ui_RichElementImage_setUrl(lua_State *L) { olua_startinvoke(L); @@ -13956,7 +14620,7 @@ static int _cocos2d_ui_RichElementImage_setUrl(lua_State *L) return 0; } -static int _cocos2d_ui_RichElementImage_setWidth(lua_State *L) +static int _olua_fun_cocos2d_ui_RichElementImage_setWidth(lua_State *L) { olua_startinvoke(L); @@ -13974,22 +14638,31 @@ static int _cocos2d_ui_RichElementImage_setWidth(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ui_RichElementImage(lua_State *L) +static int _olua_cls_ccui_RichElementImage(lua_State *L) { oluacls_class(L, "ccui.RichElementImage"); - oluacls_func(L, "create", _cocos2d_ui_RichElementImage_create); - oluacls_func(L, "init", _cocos2d_ui_RichElementImage_init); - oluacls_func(L, "new", _cocos2d_ui_RichElementImage_new); - oluacls_func(L, "setHeight", _cocos2d_ui_RichElementImage_setHeight); - oluacls_func(L, "setUrl", _cocos2d_ui_RichElementImage_setUrl); - oluacls_func(L, "setWidth", _cocos2d_ui_RichElementImage_setWidth); + oluacls_func(L, "create", _olua_fun_cocos2d_ui_RichElementImage_create); + oluacls_func(L, "init", _olua_fun_cocos2d_ui_RichElementImage_init); + oluacls_func(L, "new", _olua_fun_cocos2d_ui_RichElementImage_new); + oluacls_func(L, "setHeight", _olua_fun_cocos2d_ui_RichElementImage_setHeight); + oluacls_func(L, "setUrl", _olua_fun_cocos2d_ui_RichElementImage_setUrl); + oluacls_func(L, "setWidth", _olua_fun_cocos2d_ui_RichElementImage_setWidth); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccui_RichElementImage(lua_State *L) +{ + olua_require(L, "cocos2d_ui", luaopen_cocos2d_ui); + if (!olua_getclass(L, "ccui.RichElementImage")) { + luaL_error(L, "class not found: cocos2d::ui::RichElementImage"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_ui_RichElementCustomNode_create(lua_State *L) +static int _olua_fun_cocos2d_ui_RichElementCustomNode_create(lua_State *L) { olua_startinvoke(L); @@ -14012,7 +14685,7 @@ static int _cocos2d_ui_RichElementCustomNode_create(lua_State *L) return num_ret; } -static int _cocos2d_ui_RichElementCustomNode_init(lua_State *L) +static int _olua_fun_cocos2d_ui_RichElementCustomNode_init(lua_State *L) { olua_startinvoke(L); @@ -14037,11 +14710,11 @@ static int _cocos2d_ui_RichElementCustomNode_init(lua_State *L) return num_ret; } -static int _cocos2d_ui_RichElementCustomNode_new(lua_State *L) +static int _olua_fun_cocos2d_ui_RichElementCustomNode_new(lua_State *L) { olua_startinvoke(L); - // RichElementCustomNode() + // cocos2d::ui::RichElementCustomNode() cocos2d::ui::RichElementCustomNode *ret = new cocos2d::ui::RichElementCustomNode(); int num_ret = olua_push_object(L, ret, "ccui.RichElementCustomNode"); olua_postnew(L, ret); @@ -14051,19 +14724,28 @@ static int _cocos2d_ui_RichElementCustomNode_new(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ui_RichElementCustomNode(lua_State *L) +static int _olua_cls_ccui_RichElementCustomNode(lua_State *L) { oluacls_class(L, "ccui.RichElementCustomNode"); - oluacls_func(L, "create", _cocos2d_ui_RichElementCustomNode_create); - oluacls_func(L, "init", _cocos2d_ui_RichElementCustomNode_init); - oluacls_func(L, "new", _cocos2d_ui_RichElementCustomNode_new); + oluacls_func(L, "create", _olua_fun_cocos2d_ui_RichElementCustomNode_create); + oluacls_func(L, "init", _olua_fun_cocos2d_ui_RichElementCustomNode_init); + oluacls_func(L, "new", _olua_fun_cocos2d_ui_RichElementCustomNode_new); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccui_RichElementCustomNode(lua_State *L) +{ + olua_require(L, "cocos2d_ui", luaopen_cocos2d_ui); + if (!olua_getclass(L, "ccui.RichElementCustomNode")) { + luaL_error(L, "class not found: cocos2d::ui::RichElementCustomNode"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_ui_RichElementNewLine_create(lua_State *L) +static int _olua_fun_cocos2d_ui_RichElementNewLine_create(lua_State *L) { olua_startinvoke(L); @@ -14084,11 +14766,11 @@ static int _cocos2d_ui_RichElementNewLine_create(lua_State *L) return num_ret; } -static int _cocos2d_ui_RichElementNewLine_new(lua_State *L) +static int _olua_fun_cocos2d_ui_RichElementNewLine_new(lua_State *L) { olua_startinvoke(L); - // RichElementNewLine() + // cocos2d::ui::RichElementNewLine() cocos2d::ui::RichElementNewLine *ret = new cocos2d::ui::RichElementNewLine(); int num_ret = olua_push_object(L, ret, "ccui.RichElementNewLine"); olua_postnew(L, ret); @@ -14098,19 +14780,27 @@ static int _cocos2d_ui_RichElementNewLine_new(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ui_RichElementNewLine(lua_State *L) +static int _olua_cls_ccui_RichElementNewLine(lua_State *L) { oluacls_class(L, "ccui.RichElementNewLine"); - oluacls_func(L, "create", _cocos2d_ui_RichElementNewLine_create); - oluacls_func(L, "new", _cocos2d_ui_RichElementNewLine_new); + oluacls_func(L, "create", _olua_fun_cocos2d_ui_RichElementNewLine_create); + oluacls_func(L, "new", _olua_fun_cocos2d_ui_RichElementNewLine_new); return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ui_RichText_WrapMode(lua_State *L) +OLUA_LIB int luaopen_ccui_RichElementNewLine(lua_State *L) +{ + olua_require(L, "cocos2d_ui", luaopen_cocos2d_ui); + if (!olua_getclass(L, "ccui.RichElementNewLine")) { + luaL_error(L, "class not found: cocos2d::ui::RichElementNewLine"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_ccui_RichText_WrapMode(lua_State *L) { oluacls_class(L, "ccui.RichText.WrapMode"); oluacls_func(L, "__index", olua_indexerror); @@ -14120,10 +14810,19 @@ OLUA_LIB int luaopen_cocos2d_ui_RichText_WrapMode(lua_State *L) return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccui_RichText_WrapMode(lua_State *L) +{ + olua_require(L, "cocos2d_ui", luaopen_cocos2d_ui); + if (!olua_getclass(L, "ccui.RichText.WrapMode")) { + luaL_error(L, "class not found: cocos2d::ui::RichText::WrapMode"); + } + return 1; +} OLUA_END_DECLS -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ui_RichText_HorizontalAlignment(lua_State *L) +static int _olua_cls_ccui_RichText_HorizontalAlignment(lua_State *L) { oluacls_class(L, "ccui.RichText.HorizontalAlignment"); oluacls_func(L, "__index", olua_indexerror); @@ -14134,9 +14833,19 @@ OLUA_LIB int luaopen_cocos2d_ui_RichText_HorizontalAlignment(lua_State *L) return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccui_RichText_HorizontalAlignment(lua_State *L) +{ + olua_require(L, "cocos2d_ui", luaopen_cocos2d_ui); + if (!olua_getclass(L, "ccui.RichText.HorizontalAlignment")) { + luaL_error(L, "class not found: cocos2d::ui::RichText::HorizontalAlignment"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_ui_RichText_OpenUrlHandler___call(lua_State *L) +static int _olua_fun_cocos2d_ui_RichText_OpenUrlHandler___call(lua_State *L) { olua_startinvoke(L); @@ -14148,17 +14857,26 @@ static int _cocos2d_ui_RichText_OpenUrlHandler___call(lua_State *L) return 1; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ui_RichText_OpenUrlHandler(lua_State *L) +static int _olua_cls_ccui_RichText_OpenUrlHandler(lua_State *L) { oluacls_class(L, "ccui.RichText.OpenUrlHandler"); - oluacls_func(L, "__call", _cocos2d_ui_RichText_OpenUrlHandler___call); + oluacls_func(L, "__call", _olua_fun_cocos2d_ui_RichText_OpenUrlHandler___call); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccui_RichText_OpenUrlHandler(lua_State *L) +{ + olua_require(L, "cocos2d_ui", luaopen_cocos2d_ui); + if (!olua_getclass(L, "ccui.RichText.OpenUrlHandler")) { + luaL_error(L, "class not found: cocos2d::ui::RichText::OpenUrlHandler"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_ui_RichText_color3BWithString(lua_State *L) +static int _olua_fun_cocos2d_ui_RichText_color3BWithString(lua_State *L) { olua_startinvoke(L); @@ -14177,7 +14895,7 @@ static int _cocos2d_ui_RichText_color3BWithString(lua_State *L) return num_ret; } -static int _cocos2d_ui_RichText_create(lua_State *L) +static int _olua_fun_cocos2d_ui_RichText_create(lua_State *L) { olua_startinvoke(L); @@ -14190,7 +14908,7 @@ static int _cocos2d_ui_RichText_create(lua_State *L) return num_ret; } -static int _cocos2d_ui_RichText_createWithXML$1(lua_State *L) +static int _olua_fun_cocos2d_ui_RichText_createWithXML$1(lua_State *L) { olua_startinvoke(L); @@ -14206,15 +14924,16 @@ static int _cocos2d_ui_RichText_createWithXML$1(lua_State *L) std::string cb_tag = "OpenUrlHandler"; std::string cb_name; if (olua_isfunction(L, 3)) { - cb_name = olua_setcallback(L, cb_store, 3, cb_tag.c_str(), OLUA_TAG_REPLACE); + cb_name = olua_setcallback(L, cb_store, 3, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg3 = [cb_store, cb_name, cb_ctx](const std::string &arg1) { + // lua_State *ML = olua_mainthread(L); + arg3 = [cb_store, cb_name, cb_ctx /*, ML */](const std::string &cb_arg1) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); if (olua_contextequal(L, cb_ctx)) { int top = lua_gettop(L); - olua_push_string(L, arg1); + olua_push_string(L, cb_arg1); olua_callback(L, cb_store, cb_name.c_str(), 1); @@ -14226,7 +14945,7 @@ static int _cocos2d_ui_RichText_createWithXML$1(lua_State *L) arg3 = nullptr; } - // static cocos2d::ui::RichText *createWithXML(const std::string &xml, @optional const cocos2d::ValueMap &defaults, @localvar @optional const cocos2d::ui::RichText::OpenUrlHandler &handleOpenUrl) + // static cocos2d::ui::RichText *createWithXML(const std::string &xml, @optional const cocos2d::ValueMap &defaults, @optional const cocos2d::ui::RichText::OpenUrlHandler &handleOpenUrl) cocos2d::ui::RichText *ret = cocos2d::ui::RichText::createWithXML(arg1, arg2, arg3); if (olua_pushobjstub(L, ret, cb_store, "ccui.RichText") == OLUA_OBJ_EXIST) { olua_removecallback(L, cb_store, cb_tag.c_str(), OLUA_TAG_EQUAL); @@ -14242,7 +14961,7 @@ static int _cocos2d_ui_RichText_createWithXML$1(lua_State *L) return 1; } -static int _cocos2d_ui_RichText_createWithXML$2(lua_State *L) +static int _olua_fun_cocos2d_ui_RichText_createWithXML$2(lua_State *L) { olua_startinvoke(L); @@ -14250,7 +14969,7 @@ static int _cocos2d_ui_RichText_createWithXML$2(lua_State *L) olua_check_string(L, 1, &arg1); - // static cocos2d::ui::RichText *createWithXML(const std::string &xml, @optional const cocos2d::ValueMap &defaults, @localvar @optional const cocos2d::ui::RichText::OpenUrlHandler &handleOpenUrl) + // static cocos2d::ui::RichText *createWithXML(const std::string &xml) cocos2d::ui::RichText *ret = cocos2d::ui::RichText::createWithXML(arg1); int num_ret = olua_push_object(L, ret, "ccui.RichText"); @@ -14259,7 +14978,7 @@ static int _cocos2d_ui_RichText_createWithXML$2(lua_State *L) return num_ret; } -static int _cocos2d_ui_RichText_createWithXML$3(lua_State *L) +static int _olua_fun_cocos2d_ui_RichText_createWithXML$3(lua_State *L) { olua_startinvoke(L); @@ -14269,7 +14988,7 @@ static int _cocos2d_ui_RichText_createWithXML$3(lua_State *L) olua_check_string(L, 1, &arg1); olua_check_cocos2d_ValueMap(L, 2, &arg2); - // static cocos2d::ui::RichText *createWithXML(const std::string &xml, @optional const cocos2d::ValueMap &defaults, @localvar @optional const cocos2d::ui::RichText::OpenUrlHandler &handleOpenUrl) + // static cocos2d::ui::RichText *createWithXML(const std::string &xml, @optional const cocos2d::ValueMap &defaults) cocos2d::ui::RichText *ret = cocos2d::ui::RichText::createWithXML(arg1, arg2); int num_ret = olua_push_object(L, ret, "ccui.RichText"); @@ -14278,28 +14997,28 @@ static int _cocos2d_ui_RichText_createWithXML$3(lua_State *L) return num_ret; } -static int _cocos2d_ui_RichText_createWithXML(lua_State *L) +static int _olua_fun_cocos2d_ui_RichText_createWithXML(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 1) { // if ((olua_is_string(L, 1))) { - // static cocos2d::ui::RichText *createWithXML(const std::string &xml, @optional const cocos2d::ValueMap &defaults, @localvar @optional const cocos2d::ui::RichText::OpenUrlHandler &handleOpenUrl) - return _cocos2d_ui_RichText_createWithXML$2(L); + // static cocos2d::ui::RichText *createWithXML(const std::string &xml) + return _olua_fun_cocos2d_ui_RichText_createWithXML$2(L); // } } if (num_args == 2) { // if ((olua_is_string(L, 1)) && (olua_is_cocos2d_ValueMap(L, 2))) { - // static cocos2d::ui::RichText *createWithXML(const std::string &xml, @optional const cocos2d::ValueMap &defaults, @localvar @optional const cocos2d::ui::RichText::OpenUrlHandler &handleOpenUrl) - return _cocos2d_ui_RichText_createWithXML$3(L); + // static cocos2d::ui::RichText *createWithXML(const std::string &xml, @optional const cocos2d::ValueMap &defaults) + return _olua_fun_cocos2d_ui_RichText_createWithXML$3(L); // } } if (num_args == 3) { // if ((olua_is_string(L, 1)) && (olua_is_cocos2d_ValueMap(L, 2)) && (olua_is_callback(L, 3, "ccui.RichText.OpenUrlHandler"))) { - // static cocos2d::ui::RichText *createWithXML(const std::string &xml, @optional const cocos2d::ValueMap &defaults, @localvar @optional const cocos2d::ui::RichText::OpenUrlHandler &handleOpenUrl) - return _cocos2d_ui_RichText_createWithXML$1(L); + // static cocos2d::ui::RichText *createWithXML(const std::string &xml, @optional const cocos2d::ValueMap &defaults, @optional const cocos2d::ui::RichText::OpenUrlHandler &handleOpenUrl) + return _olua_fun_cocos2d_ui_RichText_createWithXML$1(L); // } } @@ -14308,7 +15027,7 @@ static int _cocos2d_ui_RichText_createWithXML(lua_State *L) return 0; } -static int _cocos2d_ui_RichText_formatText(lua_State *L) +static int _olua_fun_cocos2d_ui_RichText_formatText(lua_State *L) { olua_startinvoke(L); @@ -14324,7 +15043,7 @@ static int _cocos2d_ui_RichText_formatText(lua_State *L) return 0; } -static int _cocos2d_ui_RichText_getAnchorFontColor(lua_State *L) +static int _olua_fun_cocos2d_ui_RichText_getAnchorFontColor(lua_State *L) { olua_startinvoke(L); @@ -14341,7 +15060,7 @@ static int _cocos2d_ui_RichText_getAnchorFontColor(lua_State *L) return num_ret; } -static int _cocos2d_ui_RichText_getAnchorFontColor3B(lua_State *L) +static int _olua_fun_cocos2d_ui_RichText_getAnchorFontColor3B(lua_State *L) { olua_startinvoke(L); @@ -14358,7 +15077,7 @@ static int _cocos2d_ui_RichText_getAnchorFontColor3B(lua_State *L) return num_ret; } -static int _cocos2d_ui_RichText_getAnchorTextGlowColor3B(lua_State *L) +static int _olua_fun_cocos2d_ui_RichText_getAnchorTextGlowColor3B(lua_State *L) { olua_startinvoke(L); @@ -14375,7 +15094,7 @@ static int _cocos2d_ui_RichText_getAnchorTextGlowColor3B(lua_State *L) return num_ret; } -static int _cocos2d_ui_RichText_getAnchorTextOutlineColor3B(lua_State *L) +static int _olua_fun_cocos2d_ui_RichText_getAnchorTextOutlineColor3B(lua_State *L) { olua_startinvoke(L); @@ -14392,7 +15111,7 @@ static int _cocos2d_ui_RichText_getAnchorTextOutlineColor3B(lua_State *L) return num_ret; } -static int _cocos2d_ui_RichText_getAnchorTextOutlineSize(lua_State *L) +static int _olua_fun_cocos2d_ui_RichText_getAnchorTextOutlineSize(lua_State *L) { olua_startinvoke(L); @@ -14409,7 +15128,7 @@ static int _cocos2d_ui_RichText_getAnchorTextOutlineSize(lua_State *L) return num_ret; } -static int _cocos2d_ui_RichText_getAnchorTextShadowBlurRadius(lua_State *L) +static int _olua_fun_cocos2d_ui_RichText_getAnchorTextShadowBlurRadius(lua_State *L) { olua_startinvoke(L); @@ -14426,7 +15145,7 @@ static int _cocos2d_ui_RichText_getAnchorTextShadowBlurRadius(lua_State *L) return num_ret; } -static int _cocos2d_ui_RichText_getAnchorTextShadowColor3B(lua_State *L) +static int _olua_fun_cocos2d_ui_RichText_getAnchorTextShadowColor3B(lua_State *L) { olua_startinvoke(L); @@ -14443,7 +15162,7 @@ static int _cocos2d_ui_RichText_getAnchorTextShadowColor3B(lua_State *L) return num_ret; } -static int _cocos2d_ui_RichText_getAnchorTextShadowOffset(lua_State *L) +static int _olua_fun_cocos2d_ui_RichText_getAnchorTextShadowOffset(lua_State *L) { olua_startinvoke(L); @@ -14453,14 +15172,14 @@ static int _cocos2d_ui_RichText_getAnchorTextShadowOffset(lua_State *L) // cocos2d::Size getAnchorTextShadowOffset() cocos2d::Size ret = self->getAnchorTextShadowOffset(); - int num_ret = olua_pushcopy_object(L, ret, "cc.Size"); + int num_ret = olua_copy_object(L, ret, "cc.Size"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_ui_RichText_getDefaults(lua_State *L) +static int _olua_fun_cocos2d_ui_RichText_getDefaults(lua_State *L) { olua_startinvoke(L); @@ -14477,7 +15196,7 @@ static int _cocos2d_ui_RichText_getDefaults(lua_State *L) return num_ret; } -static int _cocos2d_ui_RichText_getFontColor(lua_State *L) +static int _olua_fun_cocos2d_ui_RichText_getFontColor(lua_State *L) { olua_startinvoke(L); @@ -14494,7 +15213,7 @@ static int _cocos2d_ui_RichText_getFontColor(lua_State *L) return num_ret; } -static int _cocos2d_ui_RichText_getFontColor3B(lua_State *L) +static int _olua_fun_cocos2d_ui_RichText_getFontColor3B(lua_State *L) { olua_startinvoke(L); @@ -14511,7 +15230,7 @@ static int _cocos2d_ui_RichText_getFontColor3B(lua_State *L) return num_ret; } -static int _cocos2d_ui_RichText_getFontFace(lua_State *L) +static int _olua_fun_cocos2d_ui_RichText_getFontFace(lua_State *L) { olua_startinvoke(L); @@ -14528,7 +15247,7 @@ static int _cocos2d_ui_RichText_getFontFace(lua_State *L) return num_ret; } -static int _cocos2d_ui_RichText_getFontSize(lua_State *L) +static int _olua_fun_cocos2d_ui_RichText_getFontSize(lua_State *L) { olua_startinvoke(L); @@ -14545,7 +15264,7 @@ static int _cocos2d_ui_RichText_getFontSize(lua_State *L) return num_ret; } -static int _cocos2d_ui_RichText_getHorizontalAlignment(lua_State *L) +static int _olua_fun_cocos2d_ui_RichText_getHorizontalAlignment(lua_State *L) { olua_startinvoke(L); @@ -14562,7 +15281,7 @@ static int _cocos2d_ui_RichText_getHorizontalAlignment(lua_State *L) return num_ret; } -static int _cocos2d_ui_RichText_getWrapMode(lua_State *L) +static int _olua_fun_cocos2d_ui_RichText_getWrapMode(lua_State *L) { olua_startinvoke(L); @@ -14579,7 +15298,7 @@ static int _cocos2d_ui_RichText_getWrapMode(lua_State *L) return num_ret; } -static int _cocos2d_ui_RichText_insertElement(lua_State *L) +static int _olua_fun_cocos2d_ui_RichText_insertElement(lua_State *L) { olua_startinvoke(L); @@ -14599,7 +15318,7 @@ static int _cocos2d_ui_RichText_insertElement(lua_State *L) return 0; } -static int _cocos2d_ui_RichText_isAnchorTextBoldEnabled(lua_State *L) +static int _olua_fun_cocos2d_ui_RichText_isAnchorTextBoldEnabled(lua_State *L) { olua_startinvoke(L); @@ -14616,7 +15335,7 @@ static int _cocos2d_ui_RichText_isAnchorTextBoldEnabled(lua_State *L) return num_ret; } -static int _cocos2d_ui_RichText_isAnchorTextDelEnabled(lua_State *L) +static int _olua_fun_cocos2d_ui_RichText_isAnchorTextDelEnabled(lua_State *L) { olua_startinvoke(L); @@ -14633,7 +15352,7 @@ static int _cocos2d_ui_RichText_isAnchorTextDelEnabled(lua_State *L) return num_ret; } -static int _cocos2d_ui_RichText_isAnchorTextGlowEnabled(lua_State *L) +static int _olua_fun_cocos2d_ui_RichText_isAnchorTextGlowEnabled(lua_State *L) { olua_startinvoke(L); @@ -14650,7 +15369,7 @@ static int _cocos2d_ui_RichText_isAnchorTextGlowEnabled(lua_State *L) return num_ret; } -static int _cocos2d_ui_RichText_isAnchorTextItalicEnabled(lua_State *L) +static int _olua_fun_cocos2d_ui_RichText_isAnchorTextItalicEnabled(lua_State *L) { olua_startinvoke(L); @@ -14667,7 +15386,7 @@ static int _cocos2d_ui_RichText_isAnchorTextItalicEnabled(lua_State *L) return num_ret; } -static int _cocos2d_ui_RichText_isAnchorTextOutlineEnabled(lua_State *L) +static int _olua_fun_cocos2d_ui_RichText_isAnchorTextOutlineEnabled(lua_State *L) { olua_startinvoke(L); @@ -14684,7 +15403,7 @@ static int _cocos2d_ui_RichText_isAnchorTextOutlineEnabled(lua_State *L) return num_ret; } -static int _cocos2d_ui_RichText_isAnchorTextShadowEnabled(lua_State *L) +static int _olua_fun_cocos2d_ui_RichText_isAnchorTextShadowEnabled(lua_State *L) { olua_startinvoke(L); @@ -14701,7 +15420,7 @@ static int _cocos2d_ui_RichText_isAnchorTextShadowEnabled(lua_State *L) return num_ret; } -static int _cocos2d_ui_RichText_isAnchorTextUnderlineEnabled(lua_State *L) +static int _olua_fun_cocos2d_ui_RichText_isAnchorTextUnderlineEnabled(lua_State *L) { olua_startinvoke(L); @@ -14718,11 +15437,11 @@ static int _cocos2d_ui_RichText_isAnchorTextUnderlineEnabled(lua_State *L) return num_ret; } -static int _cocos2d_ui_RichText_new(lua_State *L) +static int _olua_fun_cocos2d_ui_RichText_new(lua_State *L) { olua_startinvoke(L); - // RichText() + // cocos2d::ui::RichText() cocos2d::ui::RichText *ret = new cocos2d::ui::RichText(); int num_ret = olua_push_object(L, ret, "ccui.RichText"); olua_postnew(L, ret); @@ -14732,7 +15451,7 @@ static int _cocos2d_ui_RichText_new(lua_State *L) return num_ret; } -static int _cocos2d_ui_RichText_openUrl(lua_State *L) +static int _olua_fun_cocos2d_ui_RichText_openUrl(lua_State *L) { olua_startinvoke(L); @@ -14750,7 +15469,7 @@ static int _cocos2d_ui_RichText_openUrl(lua_State *L) return 0; } -static int _cocos2d_ui_RichText_pushBackElement(lua_State *L) +static int _olua_fun_cocos2d_ui_RichText_pushBackElement(lua_State *L) { olua_startinvoke(L); @@ -14768,7 +15487,7 @@ static int _cocos2d_ui_RichText_pushBackElement(lua_State *L) return 0; } -static int _cocos2d_ui_RichText_removeElement$1(lua_State *L) +static int _olua_fun_cocos2d_ui_RichText_removeElement$1(lua_State *L) { olua_startinvoke(L); @@ -14786,7 +15505,7 @@ static int _cocos2d_ui_RichText_removeElement$1(lua_State *L) return 0; } -static int _cocos2d_ui_RichText_removeElement$2(lua_State *L) +static int _olua_fun_cocos2d_ui_RichText_removeElement$2(lua_State *L) { olua_startinvoke(L); @@ -14804,19 +15523,19 @@ static int _cocos2d_ui_RichText_removeElement$2(lua_State *L) return 0; } -static int _cocos2d_ui_RichText_removeElement(lua_State *L) +static int _olua_fun_cocos2d_ui_RichText_removeElement(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { if ((olua_is_integer(L, 2))) { // void removeElement(int index) - return _cocos2d_ui_RichText_removeElement$1(L); + return _olua_fun_cocos2d_ui_RichText_removeElement$1(L); } // if ((olua_is_object(L, 2, "ccui.RichElement"))) { // void removeElement(cocos2d::ui::RichElement *element) - return _cocos2d_ui_RichText_removeElement$2(L); + return _olua_fun_cocos2d_ui_RichText_removeElement$2(L); // } } @@ -14825,7 +15544,7 @@ static int _cocos2d_ui_RichText_removeElement(lua_State *L) return 0; } -static int _cocos2d_ui_RichText_removeTagDescription(lua_State *L) +static int _olua_fun_cocos2d_ui_RichText_removeTagDescription(lua_State *L) { olua_startinvoke(L); @@ -14841,7 +15560,7 @@ static int _cocos2d_ui_RichText_removeTagDescription(lua_State *L) return 0; } -static int _cocos2d_ui_RichText_setAnchorFontColor(lua_State *L) +static int _olua_fun_cocos2d_ui_RichText_setAnchorFontColor(lua_State *L) { olua_startinvoke(L); @@ -14859,7 +15578,7 @@ static int _cocos2d_ui_RichText_setAnchorFontColor(lua_State *L) return 0; } -static int _cocos2d_ui_RichText_setAnchorTextBold(lua_State *L) +static int _olua_fun_cocos2d_ui_RichText_setAnchorTextBold(lua_State *L) { olua_startinvoke(L); @@ -14877,7 +15596,7 @@ static int _cocos2d_ui_RichText_setAnchorTextBold(lua_State *L) return 0; } -static int _cocos2d_ui_RichText_setAnchorTextDel(lua_State *L) +static int _olua_fun_cocos2d_ui_RichText_setAnchorTextDel(lua_State *L) { olua_startinvoke(L); @@ -14895,7 +15614,7 @@ static int _cocos2d_ui_RichText_setAnchorTextDel(lua_State *L) return 0; } -static int _cocos2d_ui_RichText_setAnchorTextGlow$1(lua_State *L) +static int _olua_fun_cocos2d_ui_RichText_setAnchorTextGlow$1(lua_State *L) { olua_startinvoke(L); @@ -14915,7 +15634,7 @@ static int _cocos2d_ui_RichText_setAnchorTextGlow$1(lua_State *L) return 0; } -static int _cocos2d_ui_RichText_setAnchorTextGlow$2(lua_State *L) +static int _olua_fun_cocos2d_ui_RichText_setAnchorTextGlow$2(lua_State *L) { olua_startinvoke(L); @@ -14925,7 +15644,7 @@ static int _cocos2d_ui_RichText_setAnchorTextGlow$2(lua_State *L) olua_to_object(L, 1, &self, "ccui.RichText"); olua_check_bool(L, 2, &arg1); - // void setAnchorTextGlow(bool enable, @optional const cocos2d::Color3B &glowColor) + // void setAnchorTextGlow(bool enable) self->setAnchorTextGlow(arg1); olua_endinvoke(L); @@ -14933,21 +15652,21 @@ static int _cocos2d_ui_RichText_setAnchorTextGlow$2(lua_State *L) return 0; } -static int _cocos2d_ui_RichText_setAnchorTextGlow(lua_State *L) +static int _olua_fun_cocos2d_ui_RichText_setAnchorTextGlow(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_bool(L, 2))) { - // void setAnchorTextGlow(bool enable, @optional const cocos2d::Color3B &glowColor) - return _cocos2d_ui_RichText_setAnchorTextGlow$2(L); + // void setAnchorTextGlow(bool enable) + return _olua_fun_cocos2d_ui_RichText_setAnchorTextGlow$2(L); // } } if (num_args == 2) { // if ((olua_is_bool(L, 2)) && (olua_is_cocos2d_Color3B(L, 3))) { // void setAnchorTextGlow(bool enable, @optional const cocos2d::Color3B &glowColor) - return _cocos2d_ui_RichText_setAnchorTextGlow$1(L); + return _olua_fun_cocos2d_ui_RichText_setAnchorTextGlow$1(L); // } } @@ -14956,7 +15675,7 @@ static int _cocos2d_ui_RichText_setAnchorTextGlow(lua_State *L) return 0; } -static int _cocos2d_ui_RichText_setAnchorTextItalic(lua_State *L) +static int _olua_fun_cocos2d_ui_RichText_setAnchorTextItalic(lua_State *L) { olua_startinvoke(L); @@ -14974,7 +15693,7 @@ static int _cocos2d_ui_RichText_setAnchorTextItalic(lua_State *L) return 0; } -static int _cocos2d_ui_RichText_setAnchorTextOutline$1(lua_State *L) +static int _olua_fun_cocos2d_ui_RichText_setAnchorTextOutline$1(lua_State *L) { olua_startinvoke(L); @@ -14996,7 +15715,7 @@ static int _cocos2d_ui_RichText_setAnchorTextOutline$1(lua_State *L) return 0; } -static int _cocos2d_ui_RichText_setAnchorTextOutline$2(lua_State *L) +static int _olua_fun_cocos2d_ui_RichText_setAnchorTextOutline$2(lua_State *L) { olua_startinvoke(L); @@ -15006,7 +15725,7 @@ static int _cocos2d_ui_RichText_setAnchorTextOutline$2(lua_State *L) olua_to_object(L, 1, &self, "ccui.RichText"); olua_check_bool(L, 2, &arg1); - // void setAnchorTextOutline(bool enable, @optional const cocos2d::Color3B &outlineColor, @optional int outlineSize) + // void setAnchorTextOutline(bool enable) self->setAnchorTextOutline(arg1); olua_endinvoke(L); @@ -15014,7 +15733,7 @@ static int _cocos2d_ui_RichText_setAnchorTextOutline$2(lua_State *L) return 0; } -static int _cocos2d_ui_RichText_setAnchorTextOutline$3(lua_State *L) +static int _olua_fun_cocos2d_ui_RichText_setAnchorTextOutline$3(lua_State *L) { olua_startinvoke(L); @@ -15026,7 +15745,7 @@ static int _cocos2d_ui_RichText_setAnchorTextOutline$3(lua_State *L) olua_check_bool(L, 2, &arg1); olua_check_cocos2d_Color3B(L, 3, &arg2); - // void setAnchorTextOutline(bool enable, @optional const cocos2d::Color3B &outlineColor, @optional int outlineSize) + // void setAnchorTextOutline(bool enable, @optional const cocos2d::Color3B &outlineColor) self->setAnchorTextOutline(arg1, arg2); olua_endinvoke(L); @@ -15034,28 +15753,28 @@ static int _cocos2d_ui_RichText_setAnchorTextOutline$3(lua_State *L) return 0; } -static int _cocos2d_ui_RichText_setAnchorTextOutline(lua_State *L) +static int _olua_fun_cocos2d_ui_RichText_setAnchorTextOutline(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_bool(L, 2))) { - // void setAnchorTextOutline(bool enable, @optional const cocos2d::Color3B &outlineColor, @optional int outlineSize) - return _cocos2d_ui_RichText_setAnchorTextOutline$2(L); + // void setAnchorTextOutline(bool enable) + return _olua_fun_cocos2d_ui_RichText_setAnchorTextOutline$2(L); // } } if (num_args == 2) { // if ((olua_is_bool(L, 2)) && (olua_is_cocos2d_Color3B(L, 3))) { - // void setAnchorTextOutline(bool enable, @optional const cocos2d::Color3B &outlineColor, @optional int outlineSize) - return _cocos2d_ui_RichText_setAnchorTextOutline$3(L); + // void setAnchorTextOutline(bool enable, @optional const cocos2d::Color3B &outlineColor) + return _olua_fun_cocos2d_ui_RichText_setAnchorTextOutline$3(L); // } } if (num_args == 3) { // if ((olua_is_bool(L, 2)) && (olua_is_cocos2d_Color3B(L, 3)) && (olua_is_integer(L, 4))) { // void setAnchorTextOutline(bool enable, @optional const cocos2d::Color3B &outlineColor, @optional int outlineSize) - return _cocos2d_ui_RichText_setAnchorTextOutline$1(L); + return _olua_fun_cocos2d_ui_RichText_setAnchorTextOutline$1(L); // } } @@ -15064,14 +15783,14 @@ static int _cocos2d_ui_RichText_setAnchorTextOutline(lua_State *L) return 0; } -static int _cocos2d_ui_RichText_setAnchorTextShadow$1(lua_State *L) +static int _olua_fun_cocos2d_ui_RichText_setAnchorTextShadow$1(lua_State *L) { olua_startinvoke(L); cocos2d::ui::RichText *self = nullptr; bool arg1 = false; /** enable */ cocos2d::Color3B arg2; /** shadowColor */ - cocos2d::Size arg3; /** offset */ + cocos2d::Size *arg3; /** offset */ int arg4 = 0; /** blurRadius */ olua_to_object(L, 1, &self, "ccui.RichText"); @@ -15081,14 +15800,14 @@ static int _cocos2d_ui_RichText_setAnchorTextShadow$1(lua_State *L) olua_check_integer(L, 5, &arg4); // void setAnchorTextShadow(bool enable, @optional const cocos2d::Color3B &shadowColor, @optional const cocos2d::Size &offset, @optional int blurRadius) - self->setAnchorTextShadow(arg1, arg2, arg3, arg4); + self->setAnchorTextShadow(arg1, arg2, *arg3, arg4); olua_endinvoke(L); return 0; } -static int _cocos2d_ui_RichText_setAnchorTextShadow$2(lua_State *L) +static int _olua_fun_cocos2d_ui_RichText_setAnchorTextShadow$2(lua_State *L) { olua_startinvoke(L); @@ -15098,7 +15817,7 @@ static int _cocos2d_ui_RichText_setAnchorTextShadow$2(lua_State *L) olua_to_object(L, 1, &self, "ccui.RichText"); olua_check_bool(L, 2, &arg1); - // void setAnchorTextShadow(bool enable, @optional const cocos2d::Color3B &shadowColor, @optional const cocos2d::Size &offset, @optional int blurRadius) + // void setAnchorTextShadow(bool enable) self->setAnchorTextShadow(arg1); olua_endinvoke(L); @@ -15106,7 +15825,7 @@ static int _cocos2d_ui_RichText_setAnchorTextShadow$2(lua_State *L) return 0; } -static int _cocos2d_ui_RichText_setAnchorTextShadow$3(lua_State *L) +static int _olua_fun_cocos2d_ui_RichText_setAnchorTextShadow$3(lua_State *L) { olua_startinvoke(L); @@ -15118,7 +15837,7 @@ static int _cocos2d_ui_RichText_setAnchorTextShadow$3(lua_State *L) olua_check_bool(L, 2, &arg1); olua_check_cocos2d_Color3B(L, 3, &arg2); - // void setAnchorTextShadow(bool enable, @optional const cocos2d::Color3B &shadowColor, @optional const cocos2d::Size &offset, @optional int blurRadius) + // void setAnchorTextShadow(bool enable, @optional const cocos2d::Color3B &shadowColor) self->setAnchorTextShadow(arg1, arg2); olua_endinvoke(L); @@ -15126,57 +15845,57 @@ static int _cocos2d_ui_RichText_setAnchorTextShadow$3(lua_State *L) return 0; } -static int _cocos2d_ui_RichText_setAnchorTextShadow$4(lua_State *L) +static int _olua_fun_cocos2d_ui_RichText_setAnchorTextShadow$4(lua_State *L) { olua_startinvoke(L); cocos2d::ui::RichText *self = nullptr; bool arg1 = false; /** enable */ cocos2d::Color3B arg2; /** shadowColor */ - cocos2d::Size arg3; /** offset */ + cocos2d::Size *arg3; /** offset */ olua_to_object(L, 1, &self, "ccui.RichText"); olua_check_bool(L, 2, &arg1); olua_check_cocos2d_Color3B(L, 3, &arg2); olua_check_object(L, 4, &arg3, "cc.Size"); - // void setAnchorTextShadow(bool enable, @optional const cocos2d::Color3B &shadowColor, @optional const cocos2d::Size &offset, @optional int blurRadius) - self->setAnchorTextShadow(arg1, arg2, arg3); + // void setAnchorTextShadow(bool enable, @optional const cocos2d::Color3B &shadowColor, @optional const cocos2d::Size &offset) + self->setAnchorTextShadow(arg1, arg2, *arg3); olua_endinvoke(L); return 0; } -static int _cocos2d_ui_RichText_setAnchorTextShadow(lua_State *L) +static int _olua_fun_cocos2d_ui_RichText_setAnchorTextShadow(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_bool(L, 2))) { - // void setAnchorTextShadow(bool enable, @optional const cocos2d::Color3B &shadowColor, @optional const cocos2d::Size &offset, @optional int blurRadius) - return _cocos2d_ui_RichText_setAnchorTextShadow$2(L); + // void setAnchorTextShadow(bool enable) + return _olua_fun_cocos2d_ui_RichText_setAnchorTextShadow$2(L); // } } if (num_args == 2) { // if ((olua_is_bool(L, 2)) && (olua_is_cocos2d_Color3B(L, 3))) { - // void setAnchorTextShadow(bool enable, @optional const cocos2d::Color3B &shadowColor, @optional const cocos2d::Size &offset, @optional int blurRadius) - return _cocos2d_ui_RichText_setAnchorTextShadow$3(L); + // void setAnchorTextShadow(bool enable, @optional const cocos2d::Color3B &shadowColor) + return _olua_fun_cocos2d_ui_RichText_setAnchorTextShadow$3(L); // } } if (num_args == 3) { // if ((olua_is_bool(L, 2)) && (olua_is_cocos2d_Color3B(L, 3)) && (olua_is_object(L, 4, "cc.Size"))) { - // void setAnchorTextShadow(bool enable, @optional const cocos2d::Color3B &shadowColor, @optional const cocos2d::Size &offset, @optional int blurRadius) - return _cocos2d_ui_RichText_setAnchorTextShadow$4(L); + // void setAnchorTextShadow(bool enable, @optional const cocos2d::Color3B &shadowColor, @optional const cocos2d::Size &offset) + return _olua_fun_cocos2d_ui_RichText_setAnchorTextShadow$4(L); // } } if (num_args == 4) { // if ((olua_is_bool(L, 2)) && (olua_is_cocos2d_Color3B(L, 3)) && (olua_is_object(L, 4, "cc.Size")) && (olua_is_integer(L, 5))) { // void setAnchorTextShadow(bool enable, @optional const cocos2d::Color3B &shadowColor, @optional const cocos2d::Size &offset, @optional int blurRadius) - return _cocos2d_ui_RichText_setAnchorTextShadow$1(L); + return _olua_fun_cocos2d_ui_RichText_setAnchorTextShadow$1(L); // } } @@ -15185,7 +15904,7 @@ static int _cocos2d_ui_RichText_setAnchorTextShadow(lua_State *L) return 0; } -static int _cocos2d_ui_RichText_setAnchorTextUnderline(lua_State *L) +static int _olua_fun_cocos2d_ui_RichText_setAnchorTextUnderline(lua_State *L) { olua_startinvoke(L); @@ -15203,7 +15922,7 @@ static int _cocos2d_ui_RichText_setAnchorTextUnderline(lua_State *L) return 0; } -static int _cocos2d_ui_RichText_setDefaults(lua_State *L) +static int _olua_fun_cocos2d_ui_RichText_setDefaults(lua_State *L) { olua_startinvoke(L); @@ -15221,7 +15940,7 @@ static int _cocos2d_ui_RichText_setDefaults(lua_State *L) return 0; } -static int _cocos2d_ui_RichText_setFontColor(lua_State *L) +static int _olua_fun_cocos2d_ui_RichText_setFontColor(lua_State *L) { olua_startinvoke(L); @@ -15239,7 +15958,7 @@ static int _cocos2d_ui_RichText_setFontColor(lua_State *L) return 0; } -static int _cocos2d_ui_RichText_setFontFace(lua_State *L) +static int _olua_fun_cocos2d_ui_RichText_setFontFace(lua_State *L) { olua_startinvoke(L); @@ -15257,7 +15976,7 @@ static int _cocos2d_ui_RichText_setFontFace(lua_State *L) return 0; } -static int _cocos2d_ui_RichText_setFontSize(lua_State *L) +static int _olua_fun_cocos2d_ui_RichText_setFontSize(lua_State *L) { olua_startinvoke(L); @@ -15275,7 +15994,7 @@ static int _cocos2d_ui_RichText_setFontSize(lua_State *L) return 0; } -static int _cocos2d_ui_RichText_setHorizontalAlignment(lua_State *L) +static int _olua_fun_cocos2d_ui_RichText_setHorizontalAlignment(lua_State *L) { olua_startinvoke(L); @@ -15293,7 +16012,7 @@ static int _cocos2d_ui_RichText_setHorizontalAlignment(lua_State *L) return 0; } -static int _cocos2d_ui_RichText_setOpenUrlHandler(lua_State *L) +static int _olua_fun_cocos2d_ui_RichText_setOpenUrlHandler(lua_State *L) { olua_startinvoke(L); @@ -15305,15 +16024,16 @@ static int _cocos2d_ui_RichText_setOpenUrlHandler(lua_State *L) void *cb_store = (void *)self; std::string cb_tag = "OpenUrlHandler"; - std::string cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + std::string cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](const std::string &arg1) { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](const std::string &cb_arg1) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); if (olua_contextequal(L, cb_ctx)) { int top = lua_gettop(L); - olua_push_string(L, arg1); + olua_push_string(L, cb_arg1); olua_callback(L, cb_store, cb_name.c_str(), 1); @@ -15321,7 +16041,7 @@ static int _cocos2d_ui_RichText_setOpenUrlHandler(lua_State *L) } }; - // void setOpenUrlHandler(@localvar const cocos2d::ui::RichText::OpenUrlHandler &handleOpenUrl) + // void setOpenUrlHandler(const cocos2d::ui::RichText::OpenUrlHandler &handleOpenUrl) self->setOpenUrlHandler(arg1); olua_endinvoke(L); @@ -15329,7 +16049,7 @@ static int _cocos2d_ui_RichText_setOpenUrlHandler(lua_State *L) return 0; } -static int _cocos2d_ui_RichText_setVerticalSpace(lua_State *L) +static int _olua_fun_cocos2d_ui_RichText_setVerticalSpace(lua_State *L) { olua_startinvoke(L); @@ -15347,7 +16067,7 @@ static int _cocos2d_ui_RichText_setVerticalSpace(lua_State *L) return 0; } -static int _cocos2d_ui_RichText_setWrapMode(lua_State *L) +static int _olua_fun_cocos2d_ui_RichText_setWrapMode(lua_State *L) { olua_startinvoke(L); @@ -15365,7 +16085,7 @@ static int _cocos2d_ui_RichText_setWrapMode(lua_State *L) return 0; } -static int _cocos2d_ui_RichText_stringWithColor3B(lua_State *L) +static int _olua_fun_cocos2d_ui_RichText_stringWithColor3B(lua_State *L) { olua_startinvoke(L); @@ -15384,7 +16104,7 @@ static int _cocos2d_ui_RichText_stringWithColor3B(lua_State *L) return num_ret; } -static int _cocos2d_ui_RichText_stringWithColor4B(lua_State *L) +static int _olua_fun_cocos2d_ui_RichText_stringWithColor4B(lua_State *L) { olua_startinvoke(L); @@ -15403,82 +16123,81 @@ static int _cocos2d_ui_RichText_stringWithColor4B(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ui_RichText(lua_State *L) +static int _olua_cls_ccui_RichText(lua_State *L) { oluacls_class(L, "ccui.RichText"); - oluacls_func(L, "color3BWithString", _cocos2d_ui_RichText_color3BWithString); - oluacls_func(L, "create", _cocos2d_ui_RichText_create); - oluacls_func(L, "createWithXML", _cocos2d_ui_RichText_createWithXML); - oluacls_func(L, "formatText", _cocos2d_ui_RichText_formatText); - oluacls_func(L, "getAnchorFontColor", _cocos2d_ui_RichText_getAnchorFontColor); - oluacls_func(L, "getAnchorFontColor3B", _cocos2d_ui_RichText_getAnchorFontColor3B); - oluacls_func(L, "getAnchorTextGlowColor3B", _cocos2d_ui_RichText_getAnchorTextGlowColor3B); - oluacls_func(L, "getAnchorTextOutlineColor3B", _cocos2d_ui_RichText_getAnchorTextOutlineColor3B); - oluacls_func(L, "getAnchorTextOutlineSize", _cocos2d_ui_RichText_getAnchorTextOutlineSize); - oluacls_func(L, "getAnchorTextShadowBlurRadius", _cocos2d_ui_RichText_getAnchorTextShadowBlurRadius); - oluacls_func(L, "getAnchorTextShadowColor3B", _cocos2d_ui_RichText_getAnchorTextShadowColor3B); - oluacls_func(L, "getAnchorTextShadowOffset", _cocos2d_ui_RichText_getAnchorTextShadowOffset); - oluacls_func(L, "getDefaults", _cocos2d_ui_RichText_getDefaults); - oluacls_func(L, "getFontColor", _cocos2d_ui_RichText_getFontColor); - oluacls_func(L, "getFontColor3B", _cocos2d_ui_RichText_getFontColor3B); - oluacls_func(L, "getFontFace", _cocos2d_ui_RichText_getFontFace); - oluacls_func(L, "getFontSize", _cocos2d_ui_RichText_getFontSize); - oluacls_func(L, "getHorizontalAlignment", _cocos2d_ui_RichText_getHorizontalAlignment); - oluacls_func(L, "getWrapMode", _cocos2d_ui_RichText_getWrapMode); - oluacls_func(L, "insertElement", _cocos2d_ui_RichText_insertElement); - oluacls_func(L, "isAnchorTextBoldEnabled", _cocos2d_ui_RichText_isAnchorTextBoldEnabled); - oluacls_func(L, "isAnchorTextDelEnabled", _cocos2d_ui_RichText_isAnchorTextDelEnabled); - oluacls_func(L, "isAnchorTextGlowEnabled", _cocos2d_ui_RichText_isAnchorTextGlowEnabled); - oluacls_func(L, "isAnchorTextItalicEnabled", _cocos2d_ui_RichText_isAnchorTextItalicEnabled); - oluacls_func(L, "isAnchorTextOutlineEnabled", _cocos2d_ui_RichText_isAnchorTextOutlineEnabled); - oluacls_func(L, "isAnchorTextShadowEnabled", _cocos2d_ui_RichText_isAnchorTextShadowEnabled); - oluacls_func(L, "isAnchorTextUnderlineEnabled", _cocos2d_ui_RichText_isAnchorTextUnderlineEnabled); - oluacls_func(L, "new", _cocos2d_ui_RichText_new); - oluacls_func(L, "openUrl", _cocos2d_ui_RichText_openUrl); - oluacls_func(L, "pushBackElement", _cocos2d_ui_RichText_pushBackElement); - oluacls_func(L, "removeElement", _cocos2d_ui_RichText_removeElement); - oluacls_func(L, "removeTagDescription", _cocos2d_ui_RichText_removeTagDescription); - oluacls_func(L, "setAnchorFontColor", _cocos2d_ui_RichText_setAnchorFontColor); - oluacls_func(L, "setAnchorTextBold", _cocos2d_ui_RichText_setAnchorTextBold); - oluacls_func(L, "setAnchorTextDel", _cocos2d_ui_RichText_setAnchorTextDel); - oluacls_func(L, "setAnchorTextGlow", _cocos2d_ui_RichText_setAnchorTextGlow); - oluacls_func(L, "setAnchorTextItalic", _cocos2d_ui_RichText_setAnchorTextItalic); - oluacls_func(L, "setAnchorTextOutline", _cocos2d_ui_RichText_setAnchorTextOutline); - oluacls_func(L, "setAnchorTextShadow", _cocos2d_ui_RichText_setAnchorTextShadow); - oluacls_func(L, "setAnchorTextUnderline", _cocos2d_ui_RichText_setAnchorTextUnderline); - oluacls_func(L, "setDefaults", _cocos2d_ui_RichText_setDefaults); - oluacls_func(L, "setFontColor", _cocos2d_ui_RichText_setFontColor); - oluacls_func(L, "setFontFace", _cocos2d_ui_RichText_setFontFace); - oluacls_func(L, "setFontSize", _cocos2d_ui_RichText_setFontSize); - oluacls_func(L, "setHorizontalAlignment", _cocos2d_ui_RichText_setHorizontalAlignment); - oluacls_func(L, "setOpenUrlHandler", _cocos2d_ui_RichText_setOpenUrlHandler); - oluacls_func(L, "setVerticalSpace", _cocos2d_ui_RichText_setVerticalSpace); - oluacls_func(L, "setWrapMode", _cocos2d_ui_RichText_setWrapMode); - oluacls_func(L, "stringWithColor3B", _cocos2d_ui_RichText_stringWithColor3B); - oluacls_func(L, "stringWithColor4B", _cocos2d_ui_RichText_stringWithColor4B); - oluacls_prop(L, "anchorFontColor", _cocos2d_ui_RichText_getAnchorFontColor, _cocos2d_ui_RichText_setAnchorFontColor); - oluacls_prop(L, "anchorFontColor3B", _cocos2d_ui_RichText_getAnchorFontColor3B, nullptr); - oluacls_prop(L, "anchorTextBoldEnabled", _cocos2d_ui_RichText_isAnchorTextBoldEnabled, nullptr); - oluacls_prop(L, "anchorTextDelEnabled", _cocos2d_ui_RichText_isAnchorTextDelEnabled, nullptr); - oluacls_prop(L, "anchorTextGlowColor3B", _cocos2d_ui_RichText_getAnchorTextGlowColor3B, nullptr); - oluacls_prop(L, "anchorTextGlowEnabled", _cocos2d_ui_RichText_isAnchorTextGlowEnabled, nullptr); - oluacls_prop(L, "anchorTextItalicEnabled", _cocos2d_ui_RichText_isAnchorTextItalicEnabled, nullptr); - oluacls_prop(L, "anchorTextOutlineColor3B", _cocos2d_ui_RichText_getAnchorTextOutlineColor3B, nullptr); - oluacls_prop(L, "anchorTextOutlineEnabled", _cocos2d_ui_RichText_isAnchorTextOutlineEnabled, nullptr); - oluacls_prop(L, "anchorTextOutlineSize", _cocos2d_ui_RichText_getAnchorTextOutlineSize, nullptr); - oluacls_prop(L, "anchorTextShadowBlurRadius", _cocos2d_ui_RichText_getAnchorTextShadowBlurRadius, nullptr); - oluacls_prop(L, "anchorTextShadowColor3B", _cocos2d_ui_RichText_getAnchorTextShadowColor3B, nullptr); - oluacls_prop(L, "anchorTextShadowEnabled", _cocos2d_ui_RichText_isAnchorTextShadowEnabled, nullptr); - oluacls_prop(L, "anchorTextShadowOffset", _cocos2d_ui_RichText_getAnchorTextShadowOffset, nullptr); - oluacls_prop(L, "anchorTextUnderlineEnabled", _cocos2d_ui_RichText_isAnchorTextUnderlineEnabled, nullptr); - oluacls_prop(L, "defaults", _cocos2d_ui_RichText_getDefaults, _cocos2d_ui_RichText_setDefaults); - oluacls_prop(L, "fontColor", _cocos2d_ui_RichText_getFontColor, _cocos2d_ui_RichText_setFontColor); - oluacls_prop(L, "fontColor3B", _cocos2d_ui_RichText_getFontColor3B, nullptr); - oluacls_prop(L, "fontFace", _cocos2d_ui_RichText_getFontFace, _cocos2d_ui_RichText_setFontFace); - oluacls_prop(L, "fontSize", _cocos2d_ui_RichText_getFontSize, _cocos2d_ui_RichText_setFontSize); - oluacls_prop(L, "horizontalAlignment", _cocos2d_ui_RichText_getHorizontalAlignment, _cocos2d_ui_RichText_setHorizontalAlignment); - oluacls_prop(L, "wrapMode", _cocos2d_ui_RichText_getWrapMode, _cocos2d_ui_RichText_setWrapMode); + oluacls_func(L, "color3BWithString", _olua_fun_cocos2d_ui_RichText_color3BWithString); + oluacls_func(L, "create", _olua_fun_cocos2d_ui_RichText_create); + oluacls_func(L, "createWithXML", _olua_fun_cocos2d_ui_RichText_createWithXML); + oluacls_func(L, "formatText", _olua_fun_cocos2d_ui_RichText_formatText); + oluacls_func(L, "getAnchorFontColor", _olua_fun_cocos2d_ui_RichText_getAnchorFontColor); + oluacls_func(L, "getAnchorFontColor3B", _olua_fun_cocos2d_ui_RichText_getAnchorFontColor3B); + oluacls_func(L, "getAnchorTextGlowColor3B", _olua_fun_cocos2d_ui_RichText_getAnchorTextGlowColor3B); + oluacls_func(L, "getAnchorTextOutlineColor3B", _olua_fun_cocos2d_ui_RichText_getAnchorTextOutlineColor3B); + oluacls_func(L, "getAnchorTextOutlineSize", _olua_fun_cocos2d_ui_RichText_getAnchorTextOutlineSize); + oluacls_func(L, "getAnchorTextShadowBlurRadius", _olua_fun_cocos2d_ui_RichText_getAnchorTextShadowBlurRadius); + oluacls_func(L, "getAnchorTextShadowColor3B", _olua_fun_cocos2d_ui_RichText_getAnchorTextShadowColor3B); + oluacls_func(L, "getAnchorTextShadowOffset", _olua_fun_cocos2d_ui_RichText_getAnchorTextShadowOffset); + oluacls_func(L, "getDefaults", _olua_fun_cocos2d_ui_RichText_getDefaults); + oluacls_func(L, "getFontColor", _olua_fun_cocos2d_ui_RichText_getFontColor); + oluacls_func(L, "getFontColor3B", _olua_fun_cocos2d_ui_RichText_getFontColor3B); + oluacls_func(L, "getFontFace", _olua_fun_cocos2d_ui_RichText_getFontFace); + oluacls_func(L, "getFontSize", _olua_fun_cocos2d_ui_RichText_getFontSize); + oluacls_func(L, "getHorizontalAlignment", _olua_fun_cocos2d_ui_RichText_getHorizontalAlignment); + oluacls_func(L, "getWrapMode", _olua_fun_cocos2d_ui_RichText_getWrapMode); + oluacls_func(L, "insertElement", _olua_fun_cocos2d_ui_RichText_insertElement); + oluacls_func(L, "isAnchorTextBoldEnabled", _olua_fun_cocos2d_ui_RichText_isAnchorTextBoldEnabled); + oluacls_func(L, "isAnchorTextDelEnabled", _olua_fun_cocos2d_ui_RichText_isAnchorTextDelEnabled); + oluacls_func(L, "isAnchorTextGlowEnabled", _olua_fun_cocos2d_ui_RichText_isAnchorTextGlowEnabled); + oluacls_func(L, "isAnchorTextItalicEnabled", _olua_fun_cocos2d_ui_RichText_isAnchorTextItalicEnabled); + oluacls_func(L, "isAnchorTextOutlineEnabled", _olua_fun_cocos2d_ui_RichText_isAnchorTextOutlineEnabled); + oluacls_func(L, "isAnchorTextShadowEnabled", _olua_fun_cocos2d_ui_RichText_isAnchorTextShadowEnabled); + oluacls_func(L, "isAnchorTextUnderlineEnabled", _olua_fun_cocos2d_ui_RichText_isAnchorTextUnderlineEnabled); + oluacls_func(L, "new", _olua_fun_cocos2d_ui_RichText_new); + oluacls_func(L, "openUrl", _olua_fun_cocos2d_ui_RichText_openUrl); + oluacls_func(L, "pushBackElement", _olua_fun_cocos2d_ui_RichText_pushBackElement); + oluacls_func(L, "removeElement", _olua_fun_cocos2d_ui_RichText_removeElement); + oluacls_func(L, "removeTagDescription", _olua_fun_cocos2d_ui_RichText_removeTagDescription); + oluacls_func(L, "setAnchorFontColor", _olua_fun_cocos2d_ui_RichText_setAnchorFontColor); + oluacls_func(L, "setAnchorTextBold", _olua_fun_cocos2d_ui_RichText_setAnchorTextBold); + oluacls_func(L, "setAnchorTextDel", _olua_fun_cocos2d_ui_RichText_setAnchorTextDel); + oluacls_func(L, "setAnchorTextGlow", _olua_fun_cocos2d_ui_RichText_setAnchorTextGlow); + oluacls_func(L, "setAnchorTextItalic", _olua_fun_cocos2d_ui_RichText_setAnchorTextItalic); + oluacls_func(L, "setAnchorTextOutline", _olua_fun_cocos2d_ui_RichText_setAnchorTextOutline); + oluacls_func(L, "setAnchorTextShadow", _olua_fun_cocos2d_ui_RichText_setAnchorTextShadow); + oluacls_func(L, "setAnchorTextUnderline", _olua_fun_cocos2d_ui_RichText_setAnchorTextUnderline); + oluacls_func(L, "setDefaults", _olua_fun_cocos2d_ui_RichText_setDefaults); + oluacls_func(L, "setFontColor", _olua_fun_cocos2d_ui_RichText_setFontColor); + oluacls_func(L, "setFontFace", _olua_fun_cocos2d_ui_RichText_setFontFace); + oluacls_func(L, "setFontSize", _olua_fun_cocos2d_ui_RichText_setFontSize); + oluacls_func(L, "setHorizontalAlignment", _olua_fun_cocos2d_ui_RichText_setHorizontalAlignment); + oluacls_func(L, "setOpenUrlHandler", _olua_fun_cocos2d_ui_RichText_setOpenUrlHandler); + oluacls_func(L, "setVerticalSpace", _olua_fun_cocos2d_ui_RichText_setVerticalSpace); + oluacls_func(L, "setWrapMode", _olua_fun_cocos2d_ui_RichText_setWrapMode); + oluacls_func(L, "stringWithColor3B", _olua_fun_cocos2d_ui_RichText_stringWithColor3B); + oluacls_func(L, "stringWithColor4B", _olua_fun_cocos2d_ui_RichText_stringWithColor4B); + oluacls_prop(L, "anchorFontColor", _olua_fun_cocos2d_ui_RichText_getAnchorFontColor, _olua_fun_cocos2d_ui_RichText_setAnchorFontColor); + oluacls_prop(L, "anchorFontColor3B", _olua_fun_cocos2d_ui_RichText_getAnchorFontColor3B, nullptr); + oluacls_prop(L, "anchorTextBoldEnabled", _olua_fun_cocos2d_ui_RichText_isAnchorTextBoldEnabled, nullptr); + oluacls_prop(L, "anchorTextDelEnabled", _olua_fun_cocos2d_ui_RichText_isAnchorTextDelEnabled, nullptr); + oluacls_prop(L, "anchorTextGlowColor3B", _olua_fun_cocos2d_ui_RichText_getAnchorTextGlowColor3B, nullptr); + oluacls_prop(L, "anchorTextGlowEnabled", _olua_fun_cocos2d_ui_RichText_isAnchorTextGlowEnabled, nullptr); + oluacls_prop(L, "anchorTextItalicEnabled", _olua_fun_cocos2d_ui_RichText_isAnchorTextItalicEnabled, nullptr); + oluacls_prop(L, "anchorTextOutlineColor3B", _olua_fun_cocos2d_ui_RichText_getAnchorTextOutlineColor3B, nullptr); + oluacls_prop(L, "anchorTextOutlineEnabled", _olua_fun_cocos2d_ui_RichText_isAnchorTextOutlineEnabled, nullptr); + oluacls_prop(L, "anchorTextOutlineSize", _olua_fun_cocos2d_ui_RichText_getAnchorTextOutlineSize, nullptr); + oluacls_prop(L, "anchorTextShadowBlurRadius", _olua_fun_cocos2d_ui_RichText_getAnchorTextShadowBlurRadius, nullptr); + oluacls_prop(L, "anchorTextShadowColor3B", _olua_fun_cocos2d_ui_RichText_getAnchorTextShadowColor3B, nullptr); + oluacls_prop(L, "anchorTextShadowEnabled", _olua_fun_cocos2d_ui_RichText_isAnchorTextShadowEnabled, nullptr); + oluacls_prop(L, "anchorTextShadowOffset", _olua_fun_cocos2d_ui_RichText_getAnchorTextShadowOffset, nullptr); + oluacls_prop(L, "anchorTextUnderlineEnabled", _olua_fun_cocos2d_ui_RichText_isAnchorTextUnderlineEnabled, nullptr); + oluacls_prop(L, "defaults", _olua_fun_cocos2d_ui_RichText_getDefaults, _olua_fun_cocos2d_ui_RichText_setDefaults); + oluacls_prop(L, "fontColor", _olua_fun_cocos2d_ui_RichText_getFontColor, _olua_fun_cocos2d_ui_RichText_setFontColor); + oluacls_prop(L, "fontColor3B", _olua_fun_cocos2d_ui_RichText_getFontColor3B, nullptr); + oluacls_prop(L, "fontFace", _olua_fun_cocos2d_ui_RichText_getFontFace, _olua_fun_cocos2d_ui_RichText_setFontFace); + oluacls_prop(L, "fontSize", _olua_fun_cocos2d_ui_RichText_getFontSize, _olua_fun_cocos2d_ui_RichText_setFontSize); + oluacls_prop(L, "horizontalAlignment", _olua_fun_cocos2d_ui_RichText_getHorizontalAlignment, _olua_fun_cocos2d_ui_RichText_setHorizontalAlignment); + oluacls_prop(L, "wrapMode", _olua_fun_cocos2d_ui_RichText_getWrapMode, _olua_fun_cocos2d_ui_RichText_setWrapMode); oluacls_const(L, "KEY_ANCHOR_FONT_COLOR_STRING", cocos2d::ui::RichText::KEY_ANCHOR_FONT_COLOR_STRING); oluacls_const(L, "KEY_ANCHOR_TEXT_BOLD", cocos2d::ui::RichText::KEY_ANCHOR_TEXT_BOLD); oluacls_const(L, "KEY_ANCHOR_TEXT_GLOW_COLOR", cocos2d::ui::RichText::KEY_ANCHOR_TEXT_GLOW_COLOR); @@ -15521,9 +16240,19 @@ OLUA_LIB int luaopen_cocos2d_ui_RichText(lua_State *L) return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccui_RichText(lua_State *L) +{ + olua_require(L, "cocos2d_ui", luaopen_cocos2d_ui); + if (!olua_getclass(L, "ccui.RichText")) { + luaL_error(L, "class not found: cocos2d::ui::RichText"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_ui_ScrollViewBar_create(lua_State *L) +static int _olua_fun_cocos2d_ui_ScrollViewBar_create(lua_State *L) { olua_startinvoke(L); @@ -15542,7 +16271,7 @@ static int _cocos2d_ui_ScrollViewBar_create(lua_State *L) return num_ret; } -static int _cocos2d_ui_ScrollViewBar_getAutoHideTime(lua_State *L) +static int _olua_fun_cocos2d_ui_ScrollViewBar_getAutoHideTime(lua_State *L) { olua_startinvoke(L); @@ -15559,7 +16288,7 @@ static int _cocos2d_ui_ScrollViewBar_getAutoHideTime(lua_State *L) return num_ret; } -static int _cocos2d_ui_ScrollViewBar_getPositionFromCorner(lua_State *L) +static int _olua_fun_cocos2d_ui_ScrollViewBar_getPositionFromCorner(lua_State *L) { olua_startinvoke(L); @@ -15569,14 +16298,14 @@ static int _cocos2d_ui_ScrollViewBar_getPositionFromCorner(lua_State *L) // cocos2d::Vec2 getPositionFromCorner() cocos2d::Vec2 ret = self->getPositionFromCorner(); - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec2"); + int num_ret = olua_copy_object(L, ret, "cc.Vec2"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_ui_ScrollViewBar_getWidth(lua_State *L) +static int _olua_fun_cocos2d_ui_ScrollViewBar_getWidth(lua_State *L) { olua_startinvoke(L); @@ -15593,7 +16322,7 @@ static int _cocos2d_ui_ScrollViewBar_getWidth(lua_State *L) return num_ret; } -static int _cocos2d_ui_ScrollViewBar_isAutoHideEnabled(lua_State *L) +static int _olua_fun_cocos2d_ui_ScrollViewBar_isAutoHideEnabled(lua_State *L) { olua_startinvoke(L); @@ -15610,7 +16339,7 @@ static int _cocos2d_ui_ScrollViewBar_isAutoHideEnabled(lua_State *L) return num_ret; } -static int _cocos2d_ui_ScrollViewBar_new(lua_State *L) +static int _olua_fun_cocos2d_ui_ScrollViewBar_new(lua_State *L) { olua_startinvoke(L); @@ -15620,7 +16349,7 @@ static int _cocos2d_ui_ScrollViewBar_new(lua_State *L) olua_check_object(L, 1, &arg1, "ccui.ScrollView"); olua_check_enum(L, 2, &arg2); - // ScrollViewBar(cocos2d::ui::ScrollView *parent, cocos2d::ui::ScrollView::Direction direction) + // cocos2d::ui::ScrollViewBar(cocos2d::ui::ScrollView *parent, cocos2d::ui::ScrollView::Direction direction) cocos2d::ui::ScrollViewBar *ret = new cocos2d::ui::ScrollViewBar(arg1, arg2); int num_ret = olua_push_object(L, ret, "ccui.ScrollViewBar"); olua_postnew(L, ret); @@ -15630,25 +16359,25 @@ static int _cocos2d_ui_ScrollViewBar_new(lua_State *L) return num_ret; } -static int _cocos2d_ui_ScrollViewBar_onScrolled(lua_State *L) +static int _olua_fun_cocos2d_ui_ScrollViewBar_onScrolled(lua_State *L) { olua_startinvoke(L); cocos2d::ui::ScrollViewBar *self = nullptr; - cocos2d::Vec2 arg1; /** outOfBoundary */ + cocos2d::Vec2 *arg1; /** outOfBoundary */ olua_to_object(L, 1, &self, "ccui.ScrollViewBar"); olua_check_object(L, 2, &arg1, "cc.Vec2"); // void onScrolled(const cocos2d::Vec2 &outOfBoundary) - self->onScrolled(arg1); + self->onScrolled(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_ui_ScrollViewBar_onTouchBegan(lua_State *L) +static int _olua_fun_cocos2d_ui_ScrollViewBar_onTouchBegan(lua_State *L) { olua_startinvoke(L); @@ -15664,7 +16393,7 @@ static int _cocos2d_ui_ScrollViewBar_onTouchBegan(lua_State *L) return 0; } -static int _cocos2d_ui_ScrollViewBar_onTouchEnded(lua_State *L) +static int _olua_fun_cocos2d_ui_ScrollViewBar_onTouchEnded(lua_State *L) { olua_startinvoke(L); @@ -15680,7 +16409,7 @@ static int _cocos2d_ui_ScrollViewBar_onTouchEnded(lua_State *L) return 0; } -static int _cocos2d_ui_ScrollViewBar_setAutoHideEnabled(lua_State *L) +static int _olua_fun_cocos2d_ui_ScrollViewBar_setAutoHideEnabled(lua_State *L) { olua_startinvoke(L); @@ -15698,7 +16427,7 @@ static int _cocos2d_ui_ScrollViewBar_setAutoHideEnabled(lua_State *L) return 0; } -static int _cocos2d_ui_ScrollViewBar_setAutoHideTime(lua_State *L) +static int _olua_fun_cocos2d_ui_ScrollViewBar_setAutoHideTime(lua_State *L) { olua_startinvoke(L); @@ -15716,25 +16445,25 @@ static int _cocos2d_ui_ScrollViewBar_setAutoHideTime(lua_State *L) return 0; } -static int _cocos2d_ui_ScrollViewBar_setPositionFromCorner(lua_State *L) +static int _olua_fun_cocos2d_ui_ScrollViewBar_setPositionFromCorner(lua_State *L) { olua_startinvoke(L); cocos2d::ui::ScrollViewBar *self = nullptr; - cocos2d::Vec2 arg1; /** positionFromCorner */ + cocos2d::Vec2 *arg1; /** positionFromCorner */ olua_to_object(L, 1, &self, "ccui.ScrollViewBar"); olua_check_object(L, 2, &arg1, "cc.Vec2"); // void setPositionFromCorner(const cocos2d::Vec2 &positionFromCorner) - self->setPositionFromCorner(arg1); + self->setPositionFromCorner(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_ui_ScrollViewBar_setWidth(lua_State *L) +static int _olua_fun_cocos2d_ui_ScrollViewBar_setWidth(lua_State *L) { olua_startinvoke(L); @@ -15752,34 +16481,42 @@ static int _cocos2d_ui_ScrollViewBar_setWidth(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ui_ScrollViewBar(lua_State *L) +static int _olua_cls_ccui_ScrollViewBar(lua_State *L) { oluacls_class(L, "ccui.ScrollViewBar"); - oluacls_func(L, "create", _cocos2d_ui_ScrollViewBar_create); - oluacls_func(L, "getAutoHideTime", _cocos2d_ui_ScrollViewBar_getAutoHideTime); - oluacls_func(L, "getPositionFromCorner", _cocos2d_ui_ScrollViewBar_getPositionFromCorner); - oluacls_func(L, "getWidth", _cocos2d_ui_ScrollViewBar_getWidth); - oluacls_func(L, "isAutoHideEnabled", _cocos2d_ui_ScrollViewBar_isAutoHideEnabled); - oluacls_func(L, "new", _cocos2d_ui_ScrollViewBar_new); - oluacls_func(L, "onScrolled", _cocos2d_ui_ScrollViewBar_onScrolled); - oluacls_func(L, "onTouchBegan", _cocos2d_ui_ScrollViewBar_onTouchBegan); - oluacls_func(L, "onTouchEnded", _cocos2d_ui_ScrollViewBar_onTouchEnded); - oluacls_func(L, "setAutoHideEnabled", _cocos2d_ui_ScrollViewBar_setAutoHideEnabled); - oluacls_func(L, "setAutoHideTime", _cocos2d_ui_ScrollViewBar_setAutoHideTime); - oluacls_func(L, "setPositionFromCorner", _cocos2d_ui_ScrollViewBar_setPositionFromCorner); - oluacls_func(L, "setWidth", _cocos2d_ui_ScrollViewBar_setWidth); - oluacls_prop(L, "autoHideEnabled", _cocos2d_ui_ScrollViewBar_isAutoHideEnabled, _cocos2d_ui_ScrollViewBar_setAutoHideEnabled); - oluacls_prop(L, "autoHideTime", _cocos2d_ui_ScrollViewBar_getAutoHideTime, _cocos2d_ui_ScrollViewBar_setAutoHideTime); - oluacls_prop(L, "positionFromCorner", _cocos2d_ui_ScrollViewBar_getPositionFromCorner, _cocos2d_ui_ScrollViewBar_setPositionFromCorner); - oluacls_prop(L, "width", _cocos2d_ui_ScrollViewBar_getWidth, _cocos2d_ui_ScrollViewBar_setWidth); + oluacls_func(L, "create", _olua_fun_cocos2d_ui_ScrollViewBar_create); + oluacls_func(L, "getAutoHideTime", _olua_fun_cocos2d_ui_ScrollViewBar_getAutoHideTime); + oluacls_func(L, "getPositionFromCorner", _olua_fun_cocos2d_ui_ScrollViewBar_getPositionFromCorner); + oluacls_func(L, "getWidth", _olua_fun_cocos2d_ui_ScrollViewBar_getWidth); + oluacls_func(L, "isAutoHideEnabled", _olua_fun_cocos2d_ui_ScrollViewBar_isAutoHideEnabled); + oluacls_func(L, "new", _olua_fun_cocos2d_ui_ScrollViewBar_new); + oluacls_func(L, "onScrolled", _olua_fun_cocos2d_ui_ScrollViewBar_onScrolled); + oluacls_func(L, "onTouchBegan", _olua_fun_cocos2d_ui_ScrollViewBar_onTouchBegan); + oluacls_func(L, "onTouchEnded", _olua_fun_cocos2d_ui_ScrollViewBar_onTouchEnded); + oluacls_func(L, "setAutoHideEnabled", _olua_fun_cocos2d_ui_ScrollViewBar_setAutoHideEnabled); + oluacls_func(L, "setAutoHideTime", _olua_fun_cocos2d_ui_ScrollViewBar_setAutoHideTime); + oluacls_func(L, "setPositionFromCorner", _olua_fun_cocos2d_ui_ScrollViewBar_setPositionFromCorner); + oluacls_func(L, "setWidth", _olua_fun_cocos2d_ui_ScrollViewBar_setWidth); + oluacls_prop(L, "autoHideEnabled", _olua_fun_cocos2d_ui_ScrollViewBar_isAutoHideEnabled, _olua_fun_cocos2d_ui_ScrollViewBar_setAutoHideEnabled); + oluacls_prop(L, "autoHideTime", _olua_fun_cocos2d_ui_ScrollViewBar_getAutoHideTime, _olua_fun_cocos2d_ui_ScrollViewBar_setAutoHideTime); + oluacls_prop(L, "positionFromCorner", _olua_fun_cocos2d_ui_ScrollViewBar_getPositionFromCorner, _olua_fun_cocos2d_ui_ScrollViewBar_setPositionFromCorner); + oluacls_prop(L, "width", _olua_fun_cocos2d_ui_ScrollViewBar_getWidth, _olua_fun_cocos2d_ui_ScrollViewBar_setWidth); return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ui_Slider_EventType(lua_State *L) +OLUA_LIB int luaopen_ccui_ScrollViewBar(lua_State *L) +{ + olua_require(L, "cocos2d_ui", luaopen_cocos2d_ui); + if (!olua_getclass(L, "ccui.ScrollViewBar")) { + luaL_error(L, "class not found: cocos2d::ui::ScrollViewBar"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_ccui_Slider_EventType(lua_State *L) { oluacls_class(L, "ccui.Slider.EventType"); oluacls_func(L, "__index", olua_indexerror); @@ -15791,9 +16528,19 @@ OLUA_LIB int luaopen_cocos2d_ui_Slider_EventType(lua_State *L) return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccui_Slider_EventType(lua_State *L) +{ + olua_require(L, "cocos2d_ui", luaopen_cocos2d_ui); + if (!olua_getclass(L, "ccui.Slider.EventType")) { + luaL_error(L, "class not found: cocos2d::ui::Slider::EventType"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_ui_Slider_ccSliderCallback___call(lua_State *L) +static int _olua_fun_cocos2d_ui_Slider_ccSliderCallback___call(lua_State *L) { olua_startinvoke(L); @@ -15805,17 +16552,26 @@ static int _cocos2d_ui_Slider_ccSliderCallback___call(lua_State *L) return 1; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ui_Slider_ccSliderCallback(lua_State *L) +static int _olua_cls_ccui_Slider_ccSliderCallback(lua_State *L) { oluacls_class(L, "ccui.Slider.ccSliderCallback"); - oluacls_func(L, "__call", _cocos2d_ui_Slider_ccSliderCallback___call); + oluacls_func(L, "__call", _olua_fun_cocos2d_ui_Slider_ccSliderCallback___call); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccui_Slider_ccSliderCallback(lua_State *L) +{ + olua_require(L, "cocos2d_ui", luaopen_cocos2d_ui); + if (!olua_getclass(L, "ccui.Slider.ccSliderCallback")) { + luaL_error(L, "class not found: cocos2d::ui::Slider::ccSliderCallback"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_ui_Slider_addEventListener(lua_State *L) +static int _olua_fun_cocos2d_ui_Slider_addEventListener(lua_State *L) { olua_startinvoke(L); @@ -15827,16 +16583,17 @@ static int _cocos2d_ui_Slider_addEventListener(lua_State *L) void *cb_store = (void *)self; std::string cb_tag = "sliderCallback"; - std::string cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + std::string cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](cocos2d::Ref *arg1, cocos2d::ui::Slider::EventType arg2) { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](cocos2d::Ref *cb_arg1, cocos2d::ui::Slider::EventType cb_arg2) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); if (olua_contextequal(L, cb_ctx)) { int top = lua_gettop(L); - olua_push_object(L, arg1, "cc.Ref"); - olua_push_enum(L, arg2); + olua_push_object(L, cb_arg1, "cc.Ref"); + olua_push_enum(L, cb_arg2); olua_callback(L, cb_store, cb_name.c_str(), 2); @@ -15852,7 +16609,7 @@ static int _cocos2d_ui_Slider_addEventListener(lua_State *L) return 0; } -static int _cocos2d_ui_Slider_create$1(lua_State *L) +static int _olua_fun_cocos2d_ui_Slider_create$1(lua_State *L) { olua_startinvoke(L); @@ -15865,7 +16622,7 @@ static int _cocos2d_ui_Slider_create$1(lua_State *L) return num_ret; } -static int _cocos2d_ui_Slider_create$2(lua_State *L) +static int _olua_fun_cocos2d_ui_Slider_create$2(lua_State *L) { olua_startinvoke(L); @@ -15886,7 +16643,7 @@ static int _cocos2d_ui_Slider_create$2(lua_State *L) return num_ret; } -static int _cocos2d_ui_Slider_create$3(lua_State *L) +static int _olua_fun_cocos2d_ui_Slider_create$3(lua_State *L) { olua_startinvoke(L); @@ -15896,7 +16653,7 @@ static int _cocos2d_ui_Slider_create$3(lua_State *L) olua_check_string(L, 1, &arg1); olua_check_string(L, 2, &arg2); - // static cocos2d::ui::Slider *create(const std::string &barTextureName, const std::string &normalBallTextureName, @optional cocos2d::ui::Widget::TextureResType resType) + // static cocos2d::ui::Slider *create(const std::string &barTextureName, const std::string &normalBallTextureName) cocos2d::ui::Slider *ret = cocos2d::ui::Slider::create(arg1, arg2); int num_ret = olua_push_object(L, ret, "ccui.Slider"); @@ -15905,26 +16662,26 @@ static int _cocos2d_ui_Slider_create$3(lua_State *L) return num_ret; } -static int _cocos2d_ui_Slider_create(lua_State *L) +static int _olua_fun_cocos2d_ui_Slider_create(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 0) { // static cocos2d::ui::Slider *create() - return _cocos2d_ui_Slider_create$1(L); + return _olua_fun_cocos2d_ui_Slider_create$1(L); } if (num_args == 2) { // if ((olua_is_string(L, 1)) && (olua_is_string(L, 2))) { - // static cocos2d::ui::Slider *create(const std::string &barTextureName, const std::string &normalBallTextureName, @optional cocos2d::ui::Widget::TextureResType resType) - return _cocos2d_ui_Slider_create$3(L); + // static cocos2d::ui::Slider *create(const std::string &barTextureName, const std::string &normalBallTextureName) + return _olua_fun_cocos2d_ui_Slider_create$3(L); // } } if (num_args == 3) { // if ((olua_is_string(L, 1)) && (olua_is_string(L, 2)) && (olua_is_enum(L, 3))) { // static cocos2d::ui::Slider *create(const std::string &barTextureName, const std::string &normalBallTextureName, @optional cocos2d::ui::Widget::TextureResType resType) - return _cocos2d_ui_Slider_create$2(L); + return _olua_fun_cocos2d_ui_Slider_create$2(L); // } } @@ -15933,7 +16690,7 @@ static int _cocos2d_ui_Slider_create(lua_State *L) return 0; } -static int _cocos2d_ui_Slider_createInstance(lua_State *L) +static int _olua_fun_cocos2d_ui_Slider_createInstance(lua_State *L) { olua_startinvoke(L); @@ -15946,7 +16703,7 @@ static int _cocos2d_ui_Slider_createInstance(lua_State *L) return num_ret; } -static int _cocos2d_ui_Slider_getBackFile(lua_State *L) +static int _olua_fun_cocos2d_ui_Slider_getBackFile(lua_State *L) { olua_startinvoke(L); @@ -15956,14 +16713,14 @@ static int _cocos2d_ui_Slider_getBackFile(lua_State *L) // cocos2d::ResourceData getBackFile() cocos2d::ResourceData ret = self->getBackFile(); - int num_ret = olua_pushcopy_object(L, ret, "cc.ResourceData"); + int num_ret = olua_copy_object(L, ret, "cc.ResourceData"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_ui_Slider_getBallDisabledFile(lua_State *L) +static int _olua_fun_cocos2d_ui_Slider_getBallDisabledFile(lua_State *L) { olua_startinvoke(L); @@ -15973,14 +16730,14 @@ static int _cocos2d_ui_Slider_getBallDisabledFile(lua_State *L) // cocos2d::ResourceData getBallDisabledFile() cocos2d::ResourceData ret = self->getBallDisabledFile(); - int num_ret = olua_pushcopy_object(L, ret, "cc.ResourceData"); + int num_ret = olua_copy_object(L, ret, "cc.ResourceData"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_ui_Slider_getBallNormalFile(lua_State *L) +static int _olua_fun_cocos2d_ui_Slider_getBallNormalFile(lua_State *L) { olua_startinvoke(L); @@ -15990,14 +16747,14 @@ static int _cocos2d_ui_Slider_getBallNormalFile(lua_State *L) // cocos2d::ResourceData getBallNormalFile() cocos2d::ResourceData ret = self->getBallNormalFile(); - int num_ret = olua_pushcopy_object(L, ret, "cc.ResourceData"); + int num_ret = olua_copy_object(L, ret, "cc.ResourceData"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_ui_Slider_getBallPressedFile(lua_State *L) +static int _olua_fun_cocos2d_ui_Slider_getBallPressedFile(lua_State *L) { olua_startinvoke(L); @@ -16007,14 +16764,14 @@ static int _cocos2d_ui_Slider_getBallPressedFile(lua_State *L) // cocos2d::ResourceData getBallPressedFile() cocos2d::ResourceData ret = self->getBallPressedFile(); - int num_ret = olua_pushcopy_object(L, ret, "cc.ResourceData"); + int num_ret = olua_copy_object(L, ret, "cc.ResourceData"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_ui_Slider_getCapInsetsBarRenderer(lua_State *L) +static int _olua_fun_cocos2d_ui_Slider_getCapInsetsBarRenderer(lua_State *L) { olua_startinvoke(L); @@ -16031,7 +16788,7 @@ static int _cocos2d_ui_Slider_getCapInsetsBarRenderer(lua_State *L) return num_ret; } -static int _cocos2d_ui_Slider_getCapInsetsProgressBarRenderer(lua_State *L) +static int _olua_fun_cocos2d_ui_Slider_getCapInsetsProgressBarRenderer(lua_State *L) { olua_startinvoke(L); @@ -16048,7 +16805,7 @@ static int _cocos2d_ui_Slider_getCapInsetsProgressBarRenderer(lua_State *L) return num_ret; } -static int _cocos2d_ui_Slider_getMaxPercent(lua_State *L) +static int _olua_fun_cocos2d_ui_Slider_getMaxPercent(lua_State *L) { olua_startinvoke(L); @@ -16065,7 +16822,7 @@ static int _cocos2d_ui_Slider_getMaxPercent(lua_State *L) return num_ret; } -static int _cocos2d_ui_Slider_getPercent(lua_State *L) +static int _olua_fun_cocos2d_ui_Slider_getPercent(lua_State *L) { olua_startinvoke(L); @@ -16082,7 +16839,7 @@ static int _cocos2d_ui_Slider_getPercent(lua_State *L) return num_ret; } -static int _cocos2d_ui_Slider_getProgressBarFile(lua_State *L) +static int _olua_fun_cocos2d_ui_Slider_getProgressBarFile(lua_State *L) { olua_startinvoke(L); @@ -16092,14 +16849,14 @@ static int _cocos2d_ui_Slider_getProgressBarFile(lua_State *L) // cocos2d::ResourceData getProgressBarFile() cocos2d::ResourceData ret = self->getProgressBarFile(); - int num_ret = olua_pushcopy_object(L, ret, "cc.ResourceData"); + int num_ret = olua_copy_object(L, ret, "cc.ResourceData"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_ui_Slider_getSlidBallDisabledRenderer(lua_State *L) +static int _olua_fun_cocos2d_ui_Slider_getSlidBallDisabledRenderer(lua_State *L) { olua_startinvoke(L); @@ -16119,7 +16876,7 @@ static int _cocos2d_ui_Slider_getSlidBallDisabledRenderer(lua_State *L) return num_ret; } -static int _cocos2d_ui_Slider_getSlidBallNormalRenderer(lua_State *L) +static int _olua_fun_cocos2d_ui_Slider_getSlidBallNormalRenderer(lua_State *L) { olua_startinvoke(L); @@ -16139,7 +16896,7 @@ static int _cocos2d_ui_Slider_getSlidBallNormalRenderer(lua_State *L) return num_ret; } -static int _cocos2d_ui_Slider_getSlidBallPressedRenderer(lua_State *L) +static int _olua_fun_cocos2d_ui_Slider_getSlidBallPressedRenderer(lua_State *L) { olua_startinvoke(L); @@ -16159,7 +16916,7 @@ static int _cocos2d_ui_Slider_getSlidBallPressedRenderer(lua_State *L) return num_ret; } -static int _cocos2d_ui_Slider_getSlidBallRenderer(lua_State *L) +static int _olua_fun_cocos2d_ui_Slider_getSlidBallRenderer(lua_State *L) { olua_startinvoke(L); @@ -16179,7 +16936,7 @@ static int _cocos2d_ui_Slider_getSlidBallRenderer(lua_State *L) return num_ret; } -static int _cocos2d_ui_Slider_getZoomScale(lua_State *L) +static int _olua_fun_cocos2d_ui_Slider_getZoomScale(lua_State *L) { olua_startinvoke(L); @@ -16196,7 +16953,7 @@ static int _cocos2d_ui_Slider_getZoomScale(lua_State *L) return num_ret; } -static int _cocos2d_ui_Slider_isScale9Enabled(lua_State *L) +static int _olua_fun_cocos2d_ui_Slider_isScale9Enabled(lua_State *L) { olua_startinvoke(L); @@ -16213,7 +16970,7 @@ static int _cocos2d_ui_Slider_isScale9Enabled(lua_State *L) return num_ret; } -static int _cocos2d_ui_Slider_loadBarTexture$1(lua_State *L) +static int _olua_fun_cocos2d_ui_Slider_loadBarTexture$1(lua_State *L) { olua_startinvoke(L); @@ -16233,7 +16990,7 @@ static int _cocos2d_ui_Slider_loadBarTexture$1(lua_State *L) return 0; } -static int _cocos2d_ui_Slider_loadBarTexture$2(lua_State *L) +static int _olua_fun_cocos2d_ui_Slider_loadBarTexture$2(lua_State *L) { olua_startinvoke(L); @@ -16243,7 +17000,7 @@ static int _cocos2d_ui_Slider_loadBarTexture$2(lua_State *L) olua_to_object(L, 1, &self, "ccui.Slider"); olua_check_string(L, 2, &arg1); - // void loadBarTexture(const std::string &fileName, @optional cocos2d::ui::Widget::TextureResType resType) + // void loadBarTexture(const std::string &fileName) self->loadBarTexture(arg1); olua_endinvoke(L); @@ -16251,21 +17008,21 @@ static int _cocos2d_ui_Slider_loadBarTexture$2(lua_State *L) return 0; } -static int _cocos2d_ui_Slider_loadBarTexture(lua_State *L) +static int _olua_fun_cocos2d_ui_Slider_loadBarTexture(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_string(L, 2))) { - // void loadBarTexture(const std::string &fileName, @optional cocos2d::ui::Widget::TextureResType resType) - return _cocos2d_ui_Slider_loadBarTexture$2(L); + // void loadBarTexture(const std::string &fileName) + return _olua_fun_cocos2d_ui_Slider_loadBarTexture$2(L); // } } if (num_args == 2) { // if ((olua_is_string(L, 2)) && (olua_is_enum(L, 3))) { // void loadBarTexture(const std::string &fileName, @optional cocos2d::ui::Widget::TextureResType resType) - return _cocos2d_ui_Slider_loadBarTexture$1(L); + return _olua_fun_cocos2d_ui_Slider_loadBarTexture$1(L); // } } @@ -16274,7 +17031,7 @@ static int _cocos2d_ui_Slider_loadBarTexture(lua_State *L) return 0; } -static int _cocos2d_ui_Slider_loadProgressBarTexture$1(lua_State *L) +static int _olua_fun_cocos2d_ui_Slider_loadProgressBarTexture$1(lua_State *L) { olua_startinvoke(L); @@ -16294,7 +17051,7 @@ static int _cocos2d_ui_Slider_loadProgressBarTexture$1(lua_State *L) return 0; } -static int _cocos2d_ui_Slider_loadProgressBarTexture$2(lua_State *L) +static int _olua_fun_cocos2d_ui_Slider_loadProgressBarTexture$2(lua_State *L) { olua_startinvoke(L); @@ -16304,7 +17061,7 @@ static int _cocos2d_ui_Slider_loadProgressBarTexture$2(lua_State *L) olua_to_object(L, 1, &self, "ccui.Slider"); olua_check_string(L, 2, &arg1); - // void loadProgressBarTexture(const std::string &fileName, @optional cocos2d::ui::Widget::TextureResType resType) + // void loadProgressBarTexture(const std::string &fileName) self->loadProgressBarTexture(arg1); olua_endinvoke(L); @@ -16312,21 +17069,21 @@ static int _cocos2d_ui_Slider_loadProgressBarTexture$2(lua_State *L) return 0; } -static int _cocos2d_ui_Slider_loadProgressBarTexture(lua_State *L) +static int _olua_fun_cocos2d_ui_Slider_loadProgressBarTexture(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_string(L, 2))) { - // void loadProgressBarTexture(const std::string &fileName, @optional cocos2d::ui::Widget::TextureResType resType) - return _cocos2d_ui_Slider_loadProgressBarTexture$2(L); + // void loadProgressBarTexture(const std::string &fileName) + return _olua_fun_cocos2d_ui_Slider_loadProgressBarTexture$2(L); // } } if (num_args == 2) { // if ((olua_is_string(L, 2)) && (olua_is_enum(L, 3))) { // void loadProgressBarTexture(const std::string &fileName, @optional cocos2d::ui::Widget::TextureResType resType) - return _cocos2d_ui_Slider_loadProgressBarTexture$1(L); + return _olua_fun_cocos2d_ui_Slider_loadProgressBarTexture$1(L); // } } @@ -16335,7 +17092,7 @@ static int _cocos2d_ui_Slider_loadProgressBarTexture(lua_State *L) return 0; } -static int _cocos2d_ui_Slider_loadSlidBallTextureDisabled$1(lua_State *L) +static int _olua_fun_cocos2d_ui_Slider_loadSlidBallTextureDisabled$1(lua_State *L) { olua_startinvoke(L); @@ -16355,7 +17112,7 @@ static int _cocos2d_ui_Slider_loadSlidBallTextureDisabled$1(lua_State *L) return 0; } -static int _cocos2d_ui_Slider_loadSlidBallTextureDisabled$2(lua_State *L) +static int _olua_fun_cocos2d_ui_Slider_loadSlidBallTextureDisabled$2(lua_State *L) { olua_startinvoke(L); @@ -16365,7 +17122,7 @@ static int _cocos2d_ui_Slider_loadSlidBallTextureDisabled$2(lua_State *L) olua_to_object(L, 1, &self, "ccui.Slider"); olua_check_string(L, 2, &arg1); - // void loadSlidBallTextureDisabled(const std::string &disabled, @optional cocos2d::ui::Widget::TextureResType resType) + // void loadSlidBallTextureDisabled(const std::string &disabled) self->loadSlidBallTextureDisabled(arg1); olua_endinvoke(L); @@ -16373,21 +17130,21 @@ static int _cocos2d_ui_Slider_loadSlidBallTextureDisabled$2(lua_State *L) return 0; } -static int _cocos2d_ui_Slider_loadSlidBallTextureDisabled(lua_State *L) +static int _olua_fun_cocos2d_ui_Slider_loadSlidBallTextureDisabled(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_string(L, 2))) { - // void loadSlidBallTextureDisabled(const std::string &disabled, @optional cocos2d::ui::Widget::TextureResType resType) - return _cocos2d_ui_Slider_loadSlidBallTextureDisabled$2(L); + // void loadSlidBallTextureDisabled(const std::string &disabled) + return _olua_fun_cocos2d_ui_Slider_loadSlidBallTextureDisabled$2(L); // } } if (num_args == 2) { // if ((olua_is_string(L, 2)) && (olua_is_enum(L, 3))) { // void loadSlidBallTextureDisabled(const std::string &disabled, @optional cocos2d::ui::Widget::TextureResType resType) - return _cocos2d_ui_Slider_loadSlidBallTextureDisabled$1(L); + return _olua_fun_cocos2d_ui_Slider_loadSlidBallTextureDisabled$1(L); // } } @@ -16396,7 +17153,7 @@ static int _cocos2d_ui_Slider_loadSlidBallTextureDisabled(lua_State *L) return 0; } -static int _cocos2d_ui_Slider_loadSlidBallTextureNormal$1(lua_State *L) +static int _olua_fun_cocos2d_ui_Slider_loadSlidBallTextureNormal$1(lua_State *L) { olua_startinvoke(L); @@ -16416,7 +17173,7 @@ static int _cocos2d_ui_Slider_loadSlidBallTextureNormal$1(lua_State *L) return 0; } -static int _cocos2d_ui_Slider_loadSlidBallTextureNormal$2(lua_State *L) +static int _olua_fun_cocos2d_ui_Slider_loadSlidBallTextureNormal$2(lua_State *L) { olua_startinvoke(L); @@ -16426,7 +17183,7 @@ static int _cocos2d_ui_Slider_loadSlidBallTextureNormal$2(lua_State *L) olua_to_object(L, 1, &self, "ccui.Slider"); olua_check_string(L, 2, &arg1); - // void loadSlidBallTextureNormal(const std::string &normal, @optional cocos2d::ui::Widget::TextureResType resType) + // void loadSlidBallTextureNormal(const std::string &normal) self->loadSlidBallTextureNormal(arg1); olua_endinvoke(L); @@ -16434,21 +17191,21 @@ static int _cocos2d_ui_Slider_loadSlidBallTextureNormal$2(lua_State *L) return 0; } -static int _cocos2d_ui_Slider_loadSlidBallTextureNormal(lua_State *L) +static int _olua_fun_cocos2d_ui_Slider_loadSlidBallTextureNormal(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_string(L, 2))) { - // void loadSlidBallTextureNormal(const std::string &normal, @optional cocos2d::ui::Widget::TextureResType resType) - return _cocos2d_ui_Slider_loadSlidBallTextureNormal$2(L); + // void loadSlidBallTextureNormal(const std::string &normal) + return _olua_fun_cocos2d_ui_Slider_loadSlidBallTextureNormal$2(L); // } } if (num_args == 2) { // if ((olua_is_string(L, 2)) && (olua_is_enum(L, 3))) { // void loadSlidBallTextureNormal(const std::string &normal, @optional cocos2d::ui::Widget::TextureResType resType) - return _cocos2d_ui_Slider_loadSlidBallTextureNormal$1(L); + return _olua_fun_cocos2d_ui_Slider_loadSlidBallTextureNormal$1(L); // } } @@ -16457,7 +17214,7 @@ static int _cocos2d_ui_Slider_loadSlidBallTextureNormal(lua_State *L) return 0; } -static int _cocos2d_ui_Slider_loadSlidBallTexturePressed$1(lua_State *L) +static int _olua_fun_cocos2d_ui_Slider_loadSlidBallTexturePressed$1(lua_State *L) { olua_startinvoke(L); @@ -16477,7 +17234,7 @@ static int _cocos2d_ui_Slider_loadSlidBallTexturePressed$1(lua_State *L) return 0; } -static int _cocos2d_ui_Slider_loadSlidBallTexturePressed$2(lua_State *L) +static int _olua_fun_cocos2d_ui_Slider_loadSlidBallTexturePressed$2(lua_State *L) { olua_startinvoke(L); @@ -16487,7 +17244,7 @@ static int _cocos2d_ui_Slider_loadSlidBallTexturePressed$2(lua_State *L) olua_to_object(L, 1, &self, "ccui.Slider"); olua_check_string(L, 2, &arg1); - // void loadSlidBallTexturePressed(const std::string &pressed, @optional cocos2d::ui::Widget::TextureResType resType) + // void loadSlidBallTexturePressed(const std::string &pressed) self->loadSlidBallTexturePressed(arg1); olua_endinvoke(L); @@ -16495,21 +17252,21 @@ static int _cocos2d_ui_Slider_loadSlidBallTexturePressed$2(lua_State *L) return 0; } -static int _cocos2d_ui_Slider_loadSlidBallTexturePressed(lua_State *L) +static int _olua_fun_cocos2d_ui_Slider_loadSlidBallTexturePressed(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_string(L, 2))) { - // void loadSlidBallTexturePressed(const std::string &pressed, @optional cocos2d::ui::Widget::TextureResType resType) - return _cocos2d_ui_Slider_loadSlidBallTexturePressed$2(L); + // void loadSlidBallTexturePressed(const std::string &pressed) + return _olua_fun_cocos2d_ui_Slider_loadSlidBallTexturePressed$2(L); // } } if (num_args == 2) { // if ((olua_is_string(L, 2)) && (olua_is_enum(L, 3))) { // void loadSlidBallTexturePressed(const std::string &pressed, @optional cocos2d::ui::Widget::TextureResType resType) - return _cocos2d_ui_Slider_loadSlidBallTexturePressed$1(L); + return _olua_fun_cocos2d_ui_Slider_loadSlidBallTexturePressed$1(L); // } } @@ -16518,7 +17275,7 @@ static int _cocos2d_ui_Slider_loadSlidBallTexturePressed(lua_State *L) return 0; } -static int _cocos2d_ui_Slider_loadSlidBallTextures$1(lua_State *L) +static int _olua_fun_cocos2d_ui_Slider_loadSlidBallTextures$1(lua_State *L) { olua_startinvoke(L); @@ -16542,7 +17299,7 @@ static int _cocos2d_ui_Slider_loadSlidBallTextures$1(lua_State *L) return 0; } -static int _cocos2d_ui_Slider_loadSlidBallTextures$2(lua_State *L) +static int _olua_fun_cocos2d_ui_Slider_loadSlidBallTextures$2(lua_State *L) { olua_startinvoke(L); @@ -16552,7 +17309,7 @@ static int _cocos2d_ui_Slider_loadSlidBallTextures$2(lua_State *L) olua_to_object(L, 1, &self, "ccui.Slider"); olua_check_string(L, 2, &arg1); - // void loadSlidBallTextures(const std::string &normal, @optional const std::string &pressed, @optional const std::string &disabled, @optional cocos2d::ui::Widget::TextureResType texType) + // void loadSlidBallTextures(const std::string &normal) self->loadSlidBallTextures(arg1); olua_endinvoke(L); @@ -16560,7 +17317,7 @@ static int _cocos2d_ui_Slider_loadSlidBallTextures$2(lua_State *L) return 0; } -static int _cocos2d_ui_Slider_loadSlidBallTextures$3(lua_State *L) +static int _olua_fun_cocos2d_ui_Slider_loadSlidBallTextures$3(lua_State *L) { olua_startinvoke(L); @@ -16572,7 +17329,7 @@ static int _cocos2d_ui_Slider_loadSlidBallTextures$3(lua_State *L) olua_check_string(L, 2, &arg1); olua_check_string(L, 3, &arg2); - // void loadSlidBallTextures(const std::string &normal, @optional const std::string &pressed, @optional const std::string &disabled, @optional cocos2d::ui::Widget::TextureResType texType) + // void loadSlidBallTextures(const std::string &normal, @optional const std::string &pressed) self->loadSlidBallTextures(arg1, arg2); olua_endinvoke(L); @@ -16580,7 +17337,7 @@ static int _cocos2d_ui_Slider_loadSlidBallTextures$3(lua_State *L) return 0; } -static int _cocos2d_ui_Slider_loadSlidBallTextures$4(lua_State *L) +static int _olua_fun_cocos2d_ui_Slider_loadSlidBallTextures$4(lua_State *L) { olua_startinvoke(L); @@ -16594,7 +17351,7 @@ static int _cocos2d_ui_Slider_loadSlidBallTextures$4(lua_State *L) olua_check_string(L, 3, &arg2); olua_check_string(L, 4, &arg3); - // void loadSlidBallTextures(const std::string &normal, @optional const std::string &pressed, @optional const std::string &disabled, @optional cocos2d::ui::Widget::TextureResType texType) + // void loadSlidBallTextures(const std::string &normal, @optional const std::string &pressed, @optional const std::string &disabled) self->loadSlidBallTextures(arg1, arg2, arg3); olua_endinvoke(L); @@ -16602,35 +17359,35 @@ static int _cocos2d_ui_Slider_loadSlidBallTextures$4(lua_State *L) return 0; } -static int _cocos2d_ui_Slider_loadSlidBallTextures(lua_State *L) +static int _olua_fun_cocos2d_ui_Slider_loadSlidBallTextures(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_string(L, 2))) { - // void loadSlidBallTextures(const std::string &normal, @optional const std::string &pressed, @optional const std::string &disabled, @optional cocos2d::ui::Widget::TextureResType texType) - return _cocos2d_ui_Slider_loadSlidBallTextures$2(L); + // void loadSlidBallTextures(const std::string &normal) + return _olua_fun_cocos2d_ui_Slider_loadSlidBallTextures$2(L); // } } if (num_args == 2) { // if ((olua_is_string(L, 2)) && (olua_is_string(L, 3))) { - // void loadSlidBallTextures(const std::string &normal, @optional const std::string &pressed, @optional const std::string &disabled, @optional cocos2d::ui::Widget::TextureResType texType) - return _cocos2d_ui_Slider_loadSlidBallTextures$3(L); + // void loadSlidBallTextures(const std::string &normal, @optional const std::string &pressed) + return _olua_fun_cocos2d_ui_Slider_loadSlidBallTextures$3(L); // } } if (num_args == 3) { // if ((olua_is_string(L, 2)) && (olua_is_string(L, 3)) && (olua_is_string(L, 4))) { - // void loadSlidBallTextures(const std::string &normal, @optional const std::string &pressed, @optional const std::string &disabled, @optional cocos2d::ui::Widget::TextureResType texType) - return _cocos2d_ui_Slider_loadSlidBallTextures$4(L); + // void loadSlidBallTextures(const std::string &normal, @optional const std::string &pressed, @optional const std::string &disabled) + return _olua_fun_cocos2d_ui_Slider_loadSlidBallTextures$4(L); // } } if (num_args == 4) { // if ((olua_is_string(L, 2)) && (olua_is_string(L, 3)) && (olua_is_string(L, 4)) && (olua_is_enum(L, 5))) { // void loadSlidBallTextures(const std::string &normal, @optional const std::string &pressed, @optional const std::string &disabled, @optional cocos2d::ui::Widget::TextureResType texType) - return _cocos2d_ui_Slider_loadSlidBallTextures$1(L); + return _olua_fun_cocos2d_ui_Slider_loadSlidBallTextures$1(L); // } } @@ -16639,11 +17396,11 @@ static int _cocos2d_ui_Slider_loadSlidBallTextures(lua_State *L) return 0; } -static int _cocos2d_ui_Slider_new(lua_State *L) +static int _olua_fun_cocos2d_ui_Slider_new(lua_State *L) { olua_startinvoke(L); - // Slider() + // cocos2d::ui::Slider() cocos2d::ui::Slider *ret = new cocos2d::ui::Slider(); int num_ret = olua_push_object(L, ret, "ccui.Slider"); olua_postnew(L, ret); @@ -16653,61 +17410,61 @@ static int _cocos2d_ui_Slider_new(lua_State *L) return num_ret; } -static int _cocos2d_ui_Slider_setCapInsetProgressBarRenderer(lua_State *L) +static int _olua_fun_cocos2d_ui_Slider_setCapInsetProgressBarRenderer(lua_State *L) { olua_startinvoke(L); cocos2d::ui::Slider *self = nullptr; - cocos2d::Rect arg1; /** capInsets */ + cocos2d::Rect *arg1; /** capInsets */ olua_to_object(L, 1, &self, "ccui.Slider"); olua_check_object(L, 2, &arg1, "cc.Rect"); // void setCapInsetProgressBarRenderer(const cocos2d::Rect &capInsets) - self->setCapInsetProgressBarRenderer(arg1); + self->setCapInsetProgressBarRenderer(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_ui_Slider_setCapInsets(lua_State *L) +static int _olua_fun_cocos2d_ui_Slider_setCapInsets(lua_State *L) { olua_startinvoke(L); cocos2d::ui::Slider *self = nullptr; - cocos2d::Rect arg1; /** capInsets */ + cocos2d::Rect *arg1; /** capInsets */ olua_to_object(L, 1, &self, "ccui.Slider"); olua_check_object(L, 2, &arg1, "cc.Rect"); // void setCapInsets(const cocos2d::Rect &capInsets) - self->setCapInsets(arg1); + self->setCapInsets(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_ui_Slider_setCapInsetsBarRenderer(lua_State *L) +static int _olua_fun_cocos2d_ui_Slider_setCapInsetsBarRenderer(lua_State *L) { olua_startinvoke(L); cocos2d::ui::Slider *self = nullptr; - cocos2d::Rect arg1; /** capInsets */ + cocos2d::Rect *arg1; /** capInsets */ olua_to_object(L, 1, &self, "ccui.Slider"); olua_check_object(L, 2, &arg1, "cc.Rect"); // void setCapInsetsBarRenderer(const cocos2d::Rect &capInsets) - self->setCapInsetsBarRenderer(arg1); + self->setCapInsetsBarRenderer(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_ui_Slider_setMaxPercent(lua_State *L) +static int _olua_fun_cocos2d_ui_Slider_setMaxPercent(lua_State *L) { olua_startinvoke(L); @@ -16725,7 +17482,7 @@ static int _cocos2d_ui_Slider_setMaxPercent(lua_State *L) return 0; } -static int _cocos2d_ui_Slider_setPercent(lua_State *L) +static int _olua_fun_cocos2d_ui_Slider_setPercent(lua_State *L) { olua_startinvoke(L); @@ -16743,7 +17500,7 @@ static int _cocos2d_ui_Slider_setPercent(lua_State *L) return 0; } -static int _cocos2d_ui_Slider_setScale9Enabled(lua_State *L) +static int _olua_fun_cocos2d_ui_Slider_setScale9Enabled(lua_State *L) { olua_startinvoke(L); @@ -16761,7 +17518,7 @@ static int _cocos2d_ui_Slider_setScale9Enabled(lua_State *L) return 0; } -static int _cocos2d_ui_Slider_setZoomScale(lua_State *L) +static int _olua_fun_cocos2d_ui_Slider_setZoomScale(lua_State *L) { olua_startinvoke(L); @@ -16779,7 +17536,7 @@ static int _cocos2d_ui_Slider_setZoomScale(lua_State *L) return 0; } -static int _cocos2d_ui_Slider_updateVisualSlider(lua_State *L) +static int _olua_fun_cocos2d_ui_Slider_updateVisualSlider(lua_State *L) { olua_startinvoke(L); @@ -16795,65 +17552,73 @@ static int _cocos2d_ui_Slider_updateVisualSlider(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ui_Slider(lua_State *L) +static int _olua_cls_ccui_Slider(lua_State *L) { oluacls_class(L, "ccui.Slider"); - oluacls_func(L, "addEventListener", _cocos2d_ui_Slider_addEventListener); - oluacls_func(L, "create", _cocos2d_ui_Slider_create); - oluacls_func(L, "createInstance", _cocos2d_ui_Slider_createInstance); - oluacls_func(L, "getBackFile", _cocos2d_ui_Slider_getBackFile); - oluacls_func(L, "getBallDisabledFile", _cocos2d_ui_Slider_getBallDisabledFile); - oluacls_func(L, "getBallNormalFile", _cocos2d_ui_Slider_getBallNormalFile); - oluacls_func(L, "getBallPressedFile", _cocos2d_ui_Slider_getBallPressedFile); - oluacls_func(L, "getCapInsetsBarRenderer", _cocos2d_ui_Slider_getCapInsetsBarRenderer); - oluacls_func(L, "getCapInsetsProgressBarRenderer", _cocos2d_ui_Slider_getCapInsetsProgressBarRenderer); - oluacls_func(L, "getMaxPercent", _cocos2d_ui_Slider_getMaxPercent); - oluacls_func(L, "getPercent", _cocos2d_ui_Slider_getPercent); - oluacls_func(L, "getProgressBarFile", _cocos2d_ui_Slider_getProgressBarFile); - oluacls_func(L, "getSlidBallDisabledRenderer", _cocos2d_ui_Slider_getSlidBallDisabledRenderer); - oluacls_func(L, "getSlidBallNormalRenderer", _cocos2d_ui_Slider_getSlidBallNormalRenderer); - oluacls_func(L, "getSlidBallPressedRenderer", _cocos2d_ui_Slider_getSlidBallPressedRenderer); - oluacls_func(L, "getSlidBallRenderer", _cocos2d_ui_Slider_getSlidBallRenderer); - oluacls_func(L, "getZoomScale", _cocos2d_ui_Slider_getZoomScale); - oluacls_func(L, "isScale9Enabled", _cocos2d_ui_Slider_isScale9Enabled); - oluacls_func(L, "loadBarTexture", _cocos2d_ui_Slider_loadBarTexture); - oluacls_func(L, "loadProgressBarTexture", _cocos2d_ui_Slider_loadProgressBarTexture); - oluacls_func(L, "loadSlidBallTextureDisabled", _cocos2d_ui_Slider_loadSlidBallTextureDisabled); - oluacls_func(L, "loadSlidBallTextureNormal", _cocos2d_ui_Slider_loadSlidBallTextureNormal); - oluacls_func(L, "loadSlidBallTexturePressed", _cocos2d_ui_Slider_loadSlidBallTexturePressed); - oluacls_func(L, "loadSlidBallTextures", _cocos2d_ui_Slider_loadSlidBallTextures); - oluacls_func(L, "new", _cocos2d_ui_Slider_new); - oluacls_func(L, "setCapInsetProgressBarRenderer", _cocos2d_ui_Slider_setCapInsetProgressBarRenderer); - oluacls_func(L, "setCapInsets", _cocos2d_ui_Slider_setCapInsets); - oluacls_func(L, "setCapInsetsBarRenderer", _cocos2d_ui_Slider_setCapInsetsBarRenderer); - oluacls_func(L, "setMaxPercent", _cocos2d_ui_Slider_setMaxPercent); - oluacls_func(L, "setPercent", _cocos2d_ui_Slider_setPercent); - oluacls_func(L, "setScale9Enabled", _cocos2d_ui_Slider_setScale9Enabled); - oluacls_func(L, "setZoomScale", _cocos2d_ui_Slider_setZoomScale); - oluacls_func(L, "updateVisualSlider", _cocos2d_ui_Slider_updateVisualSlider); - oluacls_prop(L, "backFile", _cocos2d_ui_Slider_getBackFile, nullptr); - oluacls_prop(L, "ballDisabledFile", _cocos2d_ui_Slider_getBallDisabledFile, nullptr); - oluacls_prop(L, "ballNormalFile", _cocos2d_ui_Slider_getBallNormalFile, nullptr); - oluacls_prop(L, "ballPressedFile", _cocos2d_ui_Slider_getBallPressedFile, nullptr); - oluacls_prop(L, "capInsetsBarRenderer", _cocos2d_ui_Slider_getCapInsetsBarRenderer, _cocos2d_ui_Slider_setCapInsetsBarRenderer); - oluacls_prop(L, "capInsetsProgressBarRenderer", _cocos2d_ui_Slider_getCapInsetsProgressBarRenderer, nullptr); - oluacls_prop(L, "maxPercent", _cocos2d_ui_Slider_getMaxPercent, _cocos2d_ui_Slider_setMaxPercent); - oluacls_prop(L, "percent", _cocos2d_ui_Slider_getPercent, _cocos2d_ui_Slider_setPercent); - oluacls_prop(L, "progressBarFile", _cocos2d_ui_Slider_getProgressBarFile, nullptr); - oluacls_prop(L, "scale9Enabled", _cocos2d_ui_Slider_isScale9Enabled, _cocos2d_ui_Slider_setScale9Enabled); - oluacls_prop(L, "slidBallDisabledRenderer", _cocos2d_ui_Slider_getSlidBallDisabledRenderer, nullptr); - oluacls_prop(L, "slidBallNormalRenderer", _cocos2d_ui_Slider_getSlidBallNormalRenderer, nullptr); - oluacls_prop(L, "slidBallPressedRenderer", _cocos2d_ui_Slider_getSlidBallPressedRenderer, nullptr); - oluacls_prop(L, "slidBallRenderer", _cocos2d_ui_Slider_getSlidBallRenderer, nullptr); - oluacls_prop(L, "zoomScale", _cocos2d_ui_Slider_getZoomScale, _cocos2d_ui_Slider_setZoomScale); + oluacls_func(L, "addEventListener", _olua_fun_cocos2d_ui_Slider_addEventListener); + oluacls_func(L, "create", _olua_fun_cocos2d_ui_Slider_create); + oluacls_func(L, "createInstance", _olua_fun_cocos2d_ui_Slider_createInstance); + oluacls_func(L, "getBackFile", _olua_fun_cocos2d_ui_Slider_getBackFile); + oluacls_func(L, "getBallDisabledFile", _olua_fun_cocos2d_ui_Slider_getBallDisabledFile); + oluacls_func(L, "getBallNormalFile", _olua_fun_cocos2d_ui_Slider_getBallNormalFile); + oluacls_func(L, "getBallPressedFile", _olua_fun_cocos2d_ui_Slider_getBallPressedFile); + oluacls_func(L, "getCapInsetsBarRenderer", _olua_fun_cocos2d_ui_Slider_getCapInsetsBarRenderer); + oluacls_func(L, "getCapInsetsProgressBarRenderer", _olua_fun_cocos2d_ui_Slider_getCapInsetsProgressBarRenderer); + oluacls_func(L, "getMaxPercent", _olua_fun_cocos2d_ui_Slider_getMaxPercent); + oluacls_func(L, "getPercent", _olua_fun_cocos2d_ui_Slider_getPercent); + oluacls_func(L, "getProgressBarFile", _olua_fun_cocos2d_ui_Slider_getProgressBarFile); + oluacls_func(L, "getSlidBallDisabledRenderer", _olua_fun_cocos2d_ui_Slider_getSlidBallDisabledRenderer); + oluacls_func(L, "getSlidBallNormalRenderer", _olua_fun_cocos2d_ui_Slider_getSlidBallNormalRenderer); + oluacls_func(L, "getSlidBallPressedRenderer", _olua_fun_cocos2d_ui_Slider_getSlidBallPressedRenderer); + oluacls_func(L, "getSlidBallRenderer", _olua_fun_cocos2d_ui_Slider_getSlidBallRenderer); + oluacls_func(L, "getZoomScale", _olua_fun_cocos2d_ui_Slider_getZoomScale); + oluacls_func(L, "isScale9Enabled", _olua_fun_cocos2d_ui_Slider_isScale9Enabled); + oluacls_func(L, "loadBarTexture", _olua_fun_cocos2d_ui_Slider_loadBarTexture); + oluacls_func(L, "loadProgressBarTexture", _olua_fun_cocos2d_ui_Slider_loadProgressBarTexture); + oluacls_func(L, "loadSlidBallTextureDisabled", _olua_fun_cocos2d_ui_Slider_loadSlidBallTextureDisabled); + oluacls_func(L, "loadSlidBallTextureNormal", _olua_fun_cocos2d_ui_Slider_loadSlidBallTextureNormal); + oluacls_func(L, "loadSlidBallTexturePressed", _olua_fun_cocos2d_ui_Slider_loadSlidBallTexturePressed); + oluacls_func(L, "loadSlidBallTextures", _olua_fun_cocos2d_ui_Slider_loadSlidBallTextures); + oluacls_func(L, "new", _olua_fun_cocos2d_ui_Slider_new); + oluacls_func(L, "setCapInsetProgressBarRenderer", _olua_fun_cocos2d_ui_Slider_setCapInsetProgressBarRenderer); + oluacls_func(L, "setCapInsets", _olua_fun_cocos2d_ui_Slider_setCapInsets); + oluacls_func(L, "setCapInsetsBarRenderer", _olua_fun_cocos2d_ui_Slider_setCapInsetsBarRenderer); + oluacls_func(L, "setMaxPercent", _olua_fun_cocos2d_ui_Slider_setMaxPercent); + oluacls_func(L, "setPercent", _olua_fun_cocos2d_ui_Slider_setPercent); + oluacls_func(L, "setScale9Enabled", _olua_fun_cocos2d_ui_Slider_setScale9Enabled); + oluacls_func(L, "setZoomScale", _olua_fun_cocos2d_ui_Slider_setZoomScale); + oluacls_func(L, "updateVisualSlider", _olua_fun_cocos2d_ui_Slider_updateVisualSlider); + oluacls_prop(L, "backFile", _olua_fun_cocos2d_ui_Slider_getBackFile, nullptr); + oluacls_prop(L, "ballDisabledFile", _olua_fun_cocos2d_ui_Slider_getBallDisabledFile, nullptr); + oluacls_prop(L, "ballNormalFile", _olua_fun_cocos2d_ui_Slider_getBallNormalFile, nullptr); + oluacls_prop(L, "ballPressedFile", _olua_fun_cocos2d_ui_Slider_getBallPressedFile, nullptr); + oluacls_prop(L, "capInsetsBarRenderer", _olua_fun_cocos2d_ui_Slider_getCapInsetsBarRenderer, _olua_fun_cocos2d_ui_Slider_setCapInsetsBarRenderer); + oluacls_prop(L, "capInsetsProgressBarRenderer", _olua_fun_cocos2d_ui_Slider_getCapInsetsProgressBarRenderer, nullptr); + oluacls_prop(L, "maxPercent", _olua_fun_cocos2d_ui_Slider_getMaxPercent, _olua_fun_cocos2d_ui_Slider_setMaxPercent); + oluacls_prop(L, "percent", _olua_fun_cocos2d_ui_Slider_getPercent, _olua_fun_cocos2d_ui_Slider_setPercent); + oluacls_prop(L, "progressBarFile", _olua_fun_cocos2d_ui_Slider_getProgressBarFile, nullptr); + oluacls_prop(L, "scale9Enabled", _olua_fun_cocos2d_ui_Slider_isScale9Enabled, _olua_fun_cocos2d_ui_Slider_setScale9Enabled); + oluacls_prop(L, "slidBallDisabledRenderer", _olua_fun_cocos2d_ui_Slider_getSlidBallDisabledRenderer, nullptr); + oluacls_prop(L, "slidBallNormalRenderer", _olua_fun_cocos2d_ui_Slider_getSlidBallNormalRenderer, nullptr); + oluacls_prop(L, "slidBallPressedRenderer", _olua_fun_cocos2d_ui_Slider_getSlidBallPressedRenderer, nullptr); + oluacls_prop(L, "slidBallRenderer", _olua_fun_cocos2d_ui_Slider_getSlidBallRenderer, nullptr); + oluacls_prop(L, "zoomScale", _olua_fun_cocos2d_ui_Slider_getZoomScale, _olua_fun_cocos2d_ui_Slider_setZoomScale); return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ui_Text_Type(lua_State *L) +OLUA_LIB int luaopen_ccui_Slider(lua_State *L) +{ + olua_require(L, "cocos2d_ui", luaopen_cocos2d_ui); + if (!olua_getclass(L, "ccui.Slider")) { + luaL_error(L, "class not found: cocos2d::ui::Slider"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_ccui_Text_Type(lua_State *L) { oluacls_class(L, "ccui.Text.Type"); oluacls_func(L, "__index", olua_indexerror); @@ -16863,9 +17628,19 @@ OLUA_LIB int luaopen_cocos2d_ui_Text_Type(lua_State *L) return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccui_Text_Type(lua_State *L) +{ + olua_require(L, "cocos2d_ui", luaopen_cocos2d_ui); + if (!olua_getclass(L, "ccui.Text.Type")) { + luaL_error(L, "class not found: cocos2d::ui::Text::Type"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_ui_Text_as(lua_State *L) +static int _olua_fun_cocos2d_ui_Text_as(lua_State *L) { olua_startinvoke(L); @@ -16897,7 +17672,7 @@ static int _cocos2d_ui_Text_as(lua_State *L) return 1; } -static int _cocos2d_ui_Text_create$1(lua_State *L) +static int _olua_fun_cocos2d_ui_Text_create$1(lua_State *L) { olua_startinvoke(L); @@ -16910,7 +17685,7 @@ static int _cocos2d_ui_Text_create$1(lua_State *L) return num_ret; } -static int _cocos2d_ui_Text_create$2(lua_State *L) +static int _olua_fun_cocos2d_ui_Text_create$2(lua_State *L) { olua_startinvoke(L); @@ -16931,19 +17706,19 @@ static int _cocos2d_ui_Text_create$2(lua_State *L) return num_ret; } -static int _cocos2d_ui_Text_create(lua_State *L) +static int _olua_fun_cocos2d_ui_Text_create(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 0) { // static cocos2d::ui::Text *create() - return _cocos2d_ui_Text_create$1(L); + return _olua_fun_cocos2d_ui_Text_create$1(L); } if (num_args == 3) { // if ((olua_is_string(L, 1)) && (olua_is_string(L, 2)) && (olua_is_number(L, 3))) { // static cocos2d::ui::Text *create(const std::string &textContent, const std::string &fontName, float fontSize) - return _cocos2d_ui_Text_create$2(L); + return _olua_fun_cocos2d_ui_Text_create$2(L); // } } @@ -16952,7 +17727,7 @@ static int _cocos2d_ui_Text_create(lua_State *L) return 0; } -static int _cocos2d_ui_Text_createInstance(lua_State *L) +static int _olua_fun_cocos2d_ui_Text_createInstance(lua_State *L) { olua_startinvoke(L); @@ -16965,7 +17740,7 @@ static int _cocos2d_ui_Text_createInstance(lua_State *L) return num_ret; } -static int _cocos2d_ui_Text_disableEffect$1(lua_State *L) +static int _olua_fun_cocos2d_ui_Text_disableEffect$1(lua_State *L) { olua_startinvoke(L); @@ -16981,7 +17756,7 @@ static int _cocos2d_ui_Text_disableEffect$1(lua_State *L) return 0; } -static int _cocos2d_ui_Text_disableEffect$2(lua_State *L) +static int _olua_fun_cocos2d_ui_Text_disableEffect$2(lua_State *L) { olua_startinvoke(L); @@ -16999,19 +17774,19 @@ static int _cocos2d_ui_Text_disableEffect$2(lua_State *L) return 0; } -static int _cocos2d_ui_Text_disableEffect(lua_State *L) +static int _olua_fun_cocos2d_ui_Text_disableEffect(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 0) { // void disableEffect() - return _cocos2d_ui_Text_disableEffect$1(L); + return _olua_fun_cocos2d_ui_Text_disableEffect$1(L); } if (num_args == 1) { // if ((olua_is_enum(L, 2))) { // void disableEffect(cocos2d::LabelEffect effect) - return _cocos2d_ui_Text_disableEffect$2(L); + return _olua_fun_cocos2d_ui_Text_disableEffect$2(L); // } } @@ -17020,7 +17795,7 @@ static int _cocos2d_ui_Text_disableEffect(lua_State *L) return 0; } -static int _cocos2d_ui_Text_enableGlow(lua_State *L) +static int _olua_fun_cocos2d_ui_Text_enableGlow(lua_State *L) { olua_startinvoke(L); @@ -17038,7 +17813,7 @@ static int _cocos2d_ui_Text_enableGlow(lua_State *L) return 0; } -static int _cocos2d_ui_Text_enableOutline$1(lua_State *L) +static int _olua_fun_cocos2d_ui_Text_enableOutline$1(lua_State *L) { olua_startinvoke(L); @@ -17058,7 +17833,7 @@ static int _cocos2d_ui_Text_enableOutline$1(lua_State *L) return 0; } -static int _cocos2d_ui_Text_enableOutline$2(lua_State *L) +static int _olua_fun_cocos2d_ui_Text_enableOutline$2(lua_State *L) { olua_startinvoke(L); @@ -17068,7 +17843,7 @@ static int _cocos2d_ui_Text_enableOutline$2(lua_State *L) olua_to_object(L, 1, &self, "ccui.Text"); olua_check_cocos2d_Color4B(L, 2, &arg1); - // void enableOutline(const cocos2d::Color4B &outlineColor, @optional int outlineSize) + // void enableOutline(const cocos2d::Color4B &outlineColor) self->enableOutline(arg1); olua_endinvoke(L); @@ -17076,21 +17851,21 @@ static int _cocos2d_ui_Text_enableOutline$2(lua_State *L) return 0; } -static int _cocos2d_ui_Text_enableOutline(lua_State *L) +static int _olua_fun_cocos2d_ui_Text_enableOutline(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_cocos2d_Color4B(L, 2))) { - // void enableOutline(const cocos2d::Color4B &outlineColor, @optional int outlineSize) - return _cocos2d_ui_Text_enableOutline$2(L); + // void enableOutline(const cocos2d::Color4B &outlineColor) + return _olua_fun_cocos2d_ui_Text_enableOutline$2(L); // } } if (num_args == 2) { // if ((olua_is_cocos2d_Color4B(L, 2)) && (olua_is_integer(L, 3))) { // void enableOutline(const cocos2d::Color4B &outlineColor, @optional int outlineSize) - return _cocos2d_ui_Text_enableOutline$1(L); + return _olua_fun_cocos2d_ui_Text_enableOutline$1(L); // } } @@ -17099,13 +17874,13 @@ static int _cocos2d_ui_Text_enableOutline(lua_State *L) return 0; } -static int _cocos2d_ui_Text_enableShadow$1(lua_State *L) +static int _olua_fun_cocos2d_ui_Text_enableShadow$1(lua_State *L) { olua_startinvoke(L); cocos2d::ui::Text *self = nullptr; cocos2d::Color4B arg1; /** shadowColor */ - cocos2d::Size arg2; /** offset */ + cocos2d::Size *arg2; /** offset */ int arg3 = 0; /** blurRadius */ olua_to_object(L, 1, &self, "ccui.Text"); @@ -17114,14 +17889,14 @@ static int _cocos2d_ui_Text_enableShadow$1(lua_State *L) olua_check_integer(L, 4, &arg3); // void enableShadow(@optional const cocos2d::Color4B &shadowColor, @optional const cocos2d::Size &offset, @optional int blurRadius) - self->enableShadow(arg1, arg2, arg3); + self->enableShadow(arg1, *arg2, arg3); olua_endinvoke(L); return 0; } -static int _cocos2d_ui_Text_enableShadow$2(lua_State *L) +static int _olua_fun_cocos2d_ui_Text_enableShadow$2(lua_State *L) { olua_startinvoke(L); @@ -17129,7 +17904,7 @@ static int _cocos2d_ui_Text_enableShadow$2(lua_State *L) olua_to_object(L, 1, &self, "ccui.Text"); - // void enableShadow(@optional const cocos2d::Color4B &shadowColor, @optional const cocos2d::Size &offset, @optional int blurRadius) + // void enableShadow() self->enableShadow(); olua_endinvoke(L); @@ -17137,7 +17912,7 @@ static int _cocos2d_ui_Text_enableShadow$2(lua_State *L) return 0; } -static int _cocos2d_ui_Text_enableShadow$3(lua_State *L) +static int _olua_fun_cocos2d_ui_Text_enableShadow$3(lua_State *L) { olua_startinvoke(L); @@ -17147,7 +17922,7 @@ static int _cocos2d_ui_Text_enableShadow$3(lua_State *L) olua_to_object(L, 1, &self, "ccui.Text"); olua_check_cocos2d_Color4B(L, 2, &arg1); - // void enableShadow(@optional const cocos2d::Color4B &shadowColor, @optional const cocos2d::Size &offset, @optional int blurRadius) + // void enableShadow(@optional const cocos2d::Color4B &shadowColor) self->enableShadow(arg1); olua_endinvoke(L); @@ -17155,53 +17930,53 @@ static int _cocos2d_ui_Text_enableShadow$3(lua_State *L) return 0; } -static int _cocos2d_ui_Text_enableShadow$4(lua_State *L) +static int _olua_fun_cocos2d_ui_Text_enableShadow$4(lua_State *L) { olua_startinvoke(L); cocos2d::ui::Text *self = nullptr; cocos2d::Color4B arg1; /** shadowColor */ - cocos2d::Size arg2; /** offset */ + cocos2d::Size *arg2; /** offset */ olua_to_object(L, 1, &self, "ccui.Text"); olua_check_cocos2d_Color4B(L, 2, &arg1); olua_check_object(L, 3, &arg2, "cc.Size"); - // void enableShadow(@optional const cocos2d::Color4B &shadowColor, @optional const cocos2d::Size &offset, @optional int blurRadius) - self->enableShadow(arg1, arg2); + // void enableShadow(@optional const cocos2d::Color4B &shadowColor, @optional const cocos2d::Size &offset) + self->enableShadow(arg1, *arg2); olua_endinvoke(L); return 0; } -static int _cocos2d_ui_Text_enableShadow(lua_State *L) +static int _olua_fun_cocos2d_ui_Text_enableShadow(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 0) { - // void enableShadow(@optional const cocos2d::Color4B &shadowColor, @optional const cocos2d::Size &offset, @optional int blurRadius) - return _cocos2d_ui_Text_enableShadow$2(L); + // void enableShadow() + return _olua_fun_cocos2d_ui_Text_enableShadow$2(L); } if (num_args == 1) { // if ((olua_is_cocos2d_Color4B(L, 2))) { - // void enableShadow(@optional const cocos2d::Color4B &shadowColor, @optional const cocos2d::Size &offset, @optional int blurRadius) - return _cocos2d_ui_Text_enableShadow$3(L); + // void enableShadow(@optional const cocos2d::Color4B &shadowColor) + return _olua_fun_cocos2d_ui_Text_enableShadow$3(L); // } } if (num_args == 2) { // if ((olua_is_cocos2d_Color4B(L, 2)) && (olua_is_object(L, 3, "cc.Size"))) { - // void enableShadow(@optional const cocos2d::Color4B &shadowColor, @optional const cocos2d::Size &offset, @optional int blurRadius) - return _cocos2d_ui_Text_enableShadow$4(L); + // void enableShadow(@optional const cocos2d::Color4B &shadowColor, @optional const cocos2d::Size &offset) + return _olua_fun_cocos2d_ui_Text_enableShadow$4(L); // } } if (num_args == 3) { // if ((olua_is_cocos2d_Color4B(L, 2)) && (olua_is_object(L, 3, "cc.Size")) && (olua_is_integer(L, 4))) { // void enableShadow(@optional const cocos2d::Color4B &shadowColor, @optional const cocos2d::Size &offset, @optional int blurRadius) - return _cocos2d_ui_Text_enableShadow$1(L); + return _olua_fun_cocos2d_ui_Text_enableShadow$1(L); // } } @@ -17210,7 +17985,7 @@ static int _cocos2d_ui_Text_enableShadow(lua_State *L) return 0; } -static int _cocos2d_ui_Text_getAutoRenderSize(lua_State *L) +static int _olua_fun_cocos2d_ui_Text_getAutoRenderSize(lua_State *L) { olua_startinvoke(L); @@ -17220,14 +17995,14 @@ static int _cocos2d_ui_Text_getAutoRenderSize(lua_State *L) // cocos2d::Size getAutoRenderSize() cocos2d::Size ret = self->getAutoRenderSize(); - int num_ret = olua_pushcopy_object(L, ret, "cc.Size"); + int num_ret = olua_copy_object(L, ret, "cc.Size"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_ui_Text_getBlendFunc(lua_State *L) +static int _olua_fun_cocos2d_ui_Text_getBlendFunc(lua_State *L) { olua_startinvoke(L); @@ -17244,7 +18019,7 @@ static int _cocos2d_ui_Text_getBlendFunc(lua_State *L) return num_ret; } -static int _cocos2d_ui_Text_getEffectColor(lua_State *L) +static int _olua_fun_cocos2d_ui_Text_getEffectColor(lua_State *L) { olua_startinvoke(L); @@ -17261,7 +18036,7 @@ static int _cocos2d_ui_Text_getEffectColor(lua_State *L) return num_ret; } -static int _cocos2d_ui_Text_getFontName(lua_State *L) +static int _olua_fun_cocos2d_ui_Text_getFontName(lua_State *L) { olua_startinvoke(L); @@ -17278,7 +18053,7 @@ static int _cocos2d_ui_Text_getFontName(lua_State *L) return num_ret; } -static int _cocos2d_ui_Text_getFontSize(lua_State *L) +static int _olua_fun_cocos2d_ui_Text_getFontSize(lua_State *L) { olua_startinvoke(L); @@ -17295,7 +18070,7 @@ static int _cocos2d_ui_Text_getFontSize(lua_State *L) return num_ret; } -static int _cocos2d_ui_Text_getLabelEffectType(lua_State *L) +static int _olua_fun_cocos2d_ui_Text_getLabelEffectType(lua_State *L) { olua_startinvoke(L); @@ -17312,7 +18087,7 @@ static int _cocos2d_ui_Text_getLabelEffectType(lua_State *L) return num_ret; } -static int _cocos2d_ui_Text_getLetter(lua_State *L) +static int _olua_fun_cocos2d_ui_Text_getLetter(lua_State *L) { olua_startinvoke(L); @@ -17331,7 +18106,7 @@ static int _cocos2d_ui_Text_getLetter(lua_State *L) return num_ret; } -static int _cocos2d_ui_Text_getOutlineSize(lua_State *L) +static int _olua_fun_cocos2d_ui_Text_getOutlineSize(lua_State *L) { olua_startinvoke(L); @@ -17348,7 +18123,7 @@ static int _cocos2d_ui_Text_getOutlineSize(lua_State *L) return num_ret; } -static int _cocos2d_ui_Text_getShadowBlurRadius(lua_State *L) +static int _olua_fun_cocos2d_ui_Text_getShadowBlurRadius(lua_State *L) { olua_startinvoke(L); @@ -17365,7 +18140,7 @@ static int _cocos2d_ui_Text_getShadowBlurRadius(lua_State *L) return num_ret; } -static int _cocos2d_ui_Text_getShadowColor(lua_State *L) +static int _olua_fun_cocos2d_ui_Text_getShadowColor(lua_State *L) { olua_startinvoke(L); @@ -17382,7 +18157,7 @@ static int _cocos2d_ui_Text_getShadowColor(lua_State *L) return num_ret; } -static int _cocos2d_ui_Text_getShadowOffset(lua_State *L) +static int _olua_fun_cocos2d_ui_Text_getShadowOffset(lua_State *L) { olua_startinvoke(L); @@ -17392,14 +18167,14 @@ static int _cocos2d_ui_Text_getShadowOffset(lua_State *L) // cocos2d::Size getShadowOffset() cocos2d::Size ret = self->getShadowOffset(); - int num_ret = olua_pushcopy_object(L, ret, "cc.Size"); + int num_ret = olua_copy_object(L, ret, "cc.Size"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_ui_Text_getString(lua_State *L) +static int _olua_fun_cocos2d_ui_Text_getString(lua_State *L) { olua_startinvoke(L); @@ -17416,7 +18191,7 @@ static int _cocos2d_ui_Text_getString(lua_State *L) return num_ret; } -static int _cocos2d_ui_Text_getStringLength(lua_State *L) +static int _olua_fun_cocos2d_ui_Text_getStringLength(lua_State *L) { olua_startinvoke(L); @@ -17433,7 +18208,7 @@ static int _cocos2d_ui_Text_getStringLength(lua_State *L) return num_ret; } -static int _cocos2d_ui_Text_getTextAreaSize(lua_State *L) +static int _olua_fun_cocos2d_ui_Text_getTextAreaSize(lua_State *L) { olua_startinvoke(L); @@ -17450,7 +18225,7 @@ static int _cocos2d_ui_Text_getTextAreaSize(lua_State *L) return num_ret; } -static int _cocos2d_ui_Text_getTextColor(lua_State *L) +static int _olua_fun_cocos2d_ui_Text_getTextColor(lua_State *L) { olua_startinvoke(L); @@ -17467,7 +18242,7 @@ static int _cocos2d_ui_Text_getTextColor(lua_State *L) return num_ret; } -static int _cocos2d_ui_Text_getTextHorizontalAlignment(lua_State *L) +static int _olua_fun_cocos2d_ui_Text_getTextHorizontalAlignment(lua_State *L) { olua_startinvoke(L); @@ -17484,7 +18259,7 @@ static int _cocos2d_ui_Text_getTextHorizontalAlignment(lua_State *L) return num_ret; } -static int _cocos2d_ui_Text_getTextVerticalAlignment(lua_State *L) +static int _olua_fun_cocos2d_ui_Text_getTextVerticalAlignment(lua_State *L) { olua_startinvoke(L); @@ -17501,7 +18276,7 @@ static int _cocos2d_ui_Text_getTextVerticalAlignment(lua_State *L) return num_ret; } -static int _cocos2d_ui_Text_getType(lua_State *L) +static int _olua_fun_cocos2d_ui_Text_getType(lua_State *L) { olua_startinvoke(L); @@ -17518,7 +18293,7 @@ static int _cocos2d_ui_Text_getType(lua_State *L) return num_ret; } -static int _cocos2d_ui_Text_init$1(lua_State *L) +static int _olua_fun_cocos2d_ui_Text_init$1(lua_State *L) { olua_startinvoke(L); @@ -17535,7 +18310,7 @@ static int _cocos2d_ui_Text_init$1(lua_State *L) return num_ret; } -static int _cocos2d_ui_Text_init$2(lua_State *L) +static int _olua_fun_cocos2d_ui_Text_init$2(lua_State *L) { olua_startinvoke(L); @@ -17558,19 +18333,19 @@ static int _cocos2d_ui_Text_init$2(lua_State *L) return num_ret; } -static int _cocos2d_ui_Text_init(lua_State *L) +static int _olua_fun_cocos2d_ui_Text_init(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 0) { // @using bool init() - return _cocos2d_ui_Text_init$1(L); + return _olua_fun_cocos2d_ui_Text_init$1(L); } if (num_args == 3) { // if ((olua_is_string(L, 2)) && (olua_is_string(L, 3)) && (olua_is_number(L, 4))) { // bool init(const std::string &textContent, const std::string &fontName, float fontSize) - return _cocos2d_ui_Text_init$2(L); + return _olua_fun_cocos2d_ui_Text_init$2(L); // } } @@ -17579,7 +18354,7 @@ static int _cocos2d_ui_Text_init(lua_State *L) return 0; } -static int _cocos2d_ui_Text_isShadowEnabled(lua_State *L) +static int _olua_fun_cocos2d_ui_Text_isShadowEnabled(lua_State *L) { olua_startinvoke(L); @@ -17596,7 +18371,7 @@ static int _cocos2d_ui_Text_isShadowEnabled(lua_State *L) return num_ret; } -static int _cocos2d_ui_Text_isTouchScaleChangeEnabled(lua_State *L) +static int _olua_fun_cocos2d_ui_Text_isTouchScaleChangeEnabled(lua_State *L) { olua_startinvoke(L); @@ -17613,11 +18388,11 @@ static int _cocos2d_ui_Text_isTouchScaleChangeEnabled(lua_State *L) return num_ret; } -static int _cocos2d_ui_Text_new(lua_State *L) +static int _olua_fun_cocos2d_ui_Text_new(lua_State *L) { olua_startinvoke(L); - // Text() + // cocos2d::ui::Text() cocos2d::ui::Text *ret = new cocos2d::ui::Text(); int num_ret = olua_push_object(L, ret, "ccui.Text"); olua_postnew(L, ret); @@ -17627,25 +18402,25 @@ static int _cocos2d_ui_Text_new(lua_State *L) return num_ret; } -static int _cocos2d_ui_Text_setBlendFunc(lua_State *L) +static int _olua_fun_cocos2d_ui_Text_setBlendFunc(lua_State *L) { olua_startinvoke(L); cocos2d::ui::Text *self = nullptr; - cocos2d::BlendFunc arg1; /** blendFunc */ + cocos2d::BlendFunc *arg1; /** blendFunc */ olua_to_object(L, 1, &self, "ccui.Text"); olua_check_object(L, 2, &arg1, "cc.BlendFunc"); // void setBlendFunc(const cocos2d::BlendFunc &blendFunc) - self->setBlendFunc(arg1); + self->setBlendFunc(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_ui_Text_setFontName(lua_State *L) +static int _olua_fun_cocos2d_ui_Text_setFontName(lua_State *L) { olua_startinvoke(L); @@ -17663,7 +18438,7 @@ static int _cocos2d_ui_Text_setFontName(lua_State *L) return 0; } -static int _cocos2d_ui_Text_setFontSize(lua_State *L) +static int _olua_fun_cocos2d_ui_Text_setFontSize(lua_State *L) { olua_startinvoke(L); @@ -17681,7 +18456,7 @@ static int _cocos2d_ui_Text_setFontSize(lua_State *L) return 0; } -static int _cocos2d_ui_Text_setString(lua_State *L) +static int _olua_fun_cocos2d_ui_Text_setString(lua_State *L) { olua_startinvoke(L); @@ -17699,25 +18474,25 @@ static int _cocos2d_ui_Text_setString(lua_State *L) return 0; } -static int _cocos2d_ui_Text_setTextAreaSize(lua_State *L) +static int _olua_fun_cocos2d_ui_Text_setTextAreaSize(lua_State *L) { olua_startinvoke(L); cocos2d::ui::Text *self = nullptr; - cocos2d::Size arg1; /** size */ + cocos2d::Size *arg1; /** size */ olua_to_object(L, 1, &self, "ccui.Text"); olua_check_object(L, 2, &arg1, "cc.Size"); // void setTextAreaSize(const cocos2d::Size &size) - self->setTextAreaSize(arg1); + self->setTextAreaSize(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_ui_Text_setTextColor(lua_State *L) +static int _olua_fun_cocos2d_ui_Text_setTextColor(lua_State *L) { olua_startinvoke(L); @@ -17735,7 +18510,7 @@ static int _cocos2d_ui_Text_setTextColor(lua_State *L) return 0; } -static int _cocos2d_ui_Text_setTextHorizontalAlignment(lua_State *L) +static int _olua_fun_cocos2d_ui_Text_setTextHorizontalAlignment(lua_State *L) { olua_startinvoke(L); @@ -17753,7 +18528,7 @@ static int _cocos2d_ui_Text_setTextHorizontalAlignment(lua_State *L) return 0; } -static int _cocos2d_ui_Text_setTextVerticalAlignment(lua_State *L) +static int _olua_fun_cocos2d_ui_Text_setTextVerticalAlignment(lua_State *L) { olua_startinvoke(L); @@ -17771,7 +18546,7 @@ static int _cocos2d_ui_Text_setTextVerticalAlignment(lua_State *L) return 0; } -static int _cocos2d_ui_Text_setTouchScaleChangeEnabled(lua_State *L) +static int _olua_fun_cocos2d_ui_Text_setTouchScaleChangeEnabled(lua_State *L) { olua_startinvoke(L); @@ -17789,73 +18564,82 @@ static int _cocos2d_ui_Text_setTouchScaleChangeEnabled(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ui_Text(lua_State *L) +static int _olua_cls_ccui_Text(lua_State *L) { oluacls_class(L, "ccui.Text"); - oluacls_func(L, "as", _cocos2d_ui_Text_as); - oluacls_func(L, "create", _cocos2d_ui_Text_create); - oluacls_func(L, "createInstance", _cocos2d_ui_Text_createInstance); - oluacls_func(L, "disableEffect", _cocos2d_ui_Text_disableEffect); - oluacls_func(L, "enableGlow", _cocos2d_ui_Text_enableGlow); - oluacls_func(L, "enableOutline", _cocos2d_ui_Text_enableOutline); - oluacls_func(L, "enableShadow", _cocos2d_ui_Text_enableShadow); - oluacls_func(L, "getAutoRenderSize", _cocos2d_ui_Text_getAutoRenderSize); - oluacls_func(L, "getBlendFunc", _cocos2d_ui_Text_getBlendFunc); - oluacls_func(L, "getEffectColor", _cocos2d_ui_Text_getEffectColor); - oluacls_func(L, "getFontName", _cocos2d_ui_Text_getFontName); - oluacls_func(L, "getFontSize", _cocos2d_ui_Text_getFontSize); - oluacls_func(L, "getLabelEffectType", _cocos2d_ui_Text_getLabelEffectType); - oluacls_func(L, "getLetter", _cocos2d_ui_Text_getLetter); - oluacls_func(L, "getOutlineSize", _cocos2d_ui_Text_getOutlineSize); - oluacls_func(L, "getShadowBlurRadius", _cocos2d_ui_Text_getShadowBlurRadius); - oluacls_func(L, "getShadowColor", _cocos2d_ui_Text_getShadowColor); - oluacls_func(L, "getShadowOffset", _cocos2d_ui_Text_getShadowOffset); - oluacls_func(L, "getString", _cocos2d_ui_Text_getString); - oluacls_func(L, "getStringLength", _cocos2d_ui_Text_getStringLength); - oluacls_func(L, "getTextAreaSize", _cocos2d_ui_Text_getTextAreaSize); - oluacls_func(L, "getTextColor", _cocos2d_ui_Text_getTextColor); - oluacls_func(L, "getTextHorizontalAlignment", _cocos2d_ui_Text_getTextHorizontalAlignment); - oluacls_func(L, "getTextVerticalAlignment", _cocos2d_ui_Text_getTextVerticalAlignment); - oluacls_func(L, "getType", _cocos2d_ui_Text_getType); - oluacls_func(L, "init", _cocos2d_ui_Text_init); - oluacls_func(L, "isShadowEnabled", _cocos2d_ui_Text_isShadowEnabled); - oluacls_func(L, "isTouchScaleChangeEnabled", _cocos2d_ui_Text_isTouchScaleChangeEnabled); - oluacls_func(L, "new", _cocos2d_ui_Text_new); - oluacls_func(L, "setBlendFunc", _cocos2d_ui_Text_setBlendFunc); - oluacls_func(L, "setFontName", _cocos2d_ui_Text_setFontName); - oluacls_func(L, "setFontSize", _cocos2d_ui_Text_setFontSize); - oluacls_func(L, "setString", _cocos2d_ui_Text_setString); - oluacls_func(L, "setTextAreaSize", _cocos2d_ui_Text_setTextAreaSize); - oluacls_func(L, "setTextColor", _cocos2d_ui_Text_setTextColor); - oluacls_func(L, "setTextHorizontalAlignment", _cocos2d_ui_Text_setTextHorizontalAlignment); - oluacls_func(L, "setTextVerticalAlignment", _cocos2d_ui_Text_setTextVerticalAlignment); - oluacls_func(L, "setTouchScaleChangeEnabled", _cocos2d_ui_Text_setTouchScaleChangeEnabled); - oluacls_prop(L, "autoRenderSize", _cocos2d_ui_Text_getAutoRenderSize, nullptr); - oluacls_prop(L, "blendFunc", _cocos2d_ui_Text_getBlendFunc, _cocos2d_ui_Text_setBlendFunc); - oluacls_prop(L, "effectColor", _cocos2d_ui_Text_getEffectColor, nullptr); - oluacls_prop(L, "fontName", _cocos2d_ui_Text_getFontName, _cocos2d_ui_Text_setFontName); - oluacls_prop(L, "fontSize", _cocos2d_ui_Text_getFontSize, _cocos2d_ui_Text_setFontSize); - oluacls_prop(L, "labelEffectType", _cocos2d_ui_Text_getLabelEffectType, nullptr); - oluacls_prop(L, "outlineSize", _cocos2d_ui_Text_getOutlineSize, nullptr); - oluacls_prop(L, "shadowBlurRadius", _cocos2d_ui_Text_getShadowBlurRadius, nullptr); - oluacls_prop(L, "shadowColor", _cocos2d_ui_Text_getShadowColor, nullptr); - oluacls_prop(L, "shadowEnabled", _cocos2d_ui_Text_isShadowEnabled, nullptr); - oluacls_prop(L, "shadowOffset", _cocos2d_ui_Text_getShadowOffset, nullptr); - oluacls_prop(L, "string", _cocos2d_ui_Text_getString, _cocos2d_ui_Text_setString); - oluacls_prop(L, "stringLength", _cocos2d_ui_Text_getStringLength, nullptr); - oluacls_prop(L, "textAreaSize", _cocos2d_ui_Text_getTextAreaSize, _cocos2d_ui_Text_setTextAreaSize); - oluacls_prop(L, "textColor", _cocos2d_ui_Text_getTextColor, _cocos2d_ui_Text_setTextColor); - oluacls_prop(L, "textHorizontalAlignment", _cocos2d_ui_Text_getTextHorizontalAlignment, _cocos2d_ui_Text_setTextHorizontalAlignment); - oluacls_prop(L, "textVerticalAlignment", _cocos2d_ui_Text_getTextVerticalAlignment, _cocos2d_ui_Text_setTextVerticalAlignment); - oluacls_prop(L, "touchScaleChangeEnabled", _cocos2d_ui_Text_isTouchScaleChangeEnabled, _cocos2d_ui_Text_setTouchScaleChangeEnabled); - oluacls_prop(L, "type", _cocos2d_ui_Text_getType, nullptr); + oluacls_func(L, "as", _olua_fun_cocos2d_ui_Text_as); + oluacls_func(L, "create", _olua_fun_cocos2d_ui_Text_create); + oluacls_func(L, "createInstance", _olua_fun_cocos2d_ui_Text_createInstance); + oluacls_func(L, "disableEffect", _olua_fun_cocos2d_ui_Text_disableEffect); + oluacls_func(L, "enableGlow", _olua_fun_cocos2d_ui_Text_enableGlow); + oluacls_func(L, "enableOutline", _olua_fun_cocos2d_ui_Text_enableOutline); + oluacls_func(L, "enableShadow", _olua_fun_cocos2d_ui_Text_enableShadow); + oluacls_func(L, "getAutoRenderSize", _olua_fun_cocos2d_ui_Text_getAutoRenderSize); + oluacls_func(L, "getBlendFunc", _olua_fun_cocos2d_ui_Text_getBlendFunc); + oluacls_func(L, "getEffectColor", _olua_fun_cocos2d_ui_Text_getEffectColor); + oluacls_func(L, "getFontName", _olua_fun_cocos2d_ui_Text_getFontName); + oluacls_func(L, "getFontSize", _olua_fun_cocos2d_ui_Text_getFontSize); + oluacls_func(L, "getLabelEffectType", _olua_fun_cocos2d_ui_Text_getLabelEffectType); + oluacls_func(L, "getLetter", _olua_fun_cocos2d_ui_Text_getLetter); + oluacls_func(L, "getOutlineSize", _olua_fun_cocos2d_ui_Text_getOutlineSize); + oluacls_func(L, "getShadowBlurRadius", _olua_fun_cocos2d_ui_Text_getShadowBlurRadius); + oluacls_func(L, "getShadowColor", _olua_fun_cocos2d_ui_Text_getShadowColor); + oluacls_func(L, "getShadowOffset", _olua_fun_cocos2d_ui_Text_getShadowOffset); + oluacls_func(L, "getString", _olua_fun_cocos2d_ui_Text_getString); + oluacls_func(L, "getStringLength", _olua_fun_cocos2d_ui_Text_getStringLength); + oluacls_func(L, "getTextAreaSize", _olua_fun_cocos2d_ui_Text_getTextAreaSize); + oluacls_func(L, "getTextColor", _olua_fun_cocos2d_ui_Text_getTextColor); + oluacls_func(L, "getTextHorizontalAlignment", _olua_fun_cocos2d_ui_Text_getTextHorizontalAlignment); + oluacls_func(L, "getTextVerticalAlignment", _olua_fun_cocos2d_ui_Text_getTextVerticalAlignment); + oluacls_func(L, "getType", _olua_fun_cocos2d_ui_Text_getType); + oluacls_func(L, "init", _olua_fun_cocos2d_ui_Text_init); + oluacls_func(L, "isShadowEnabled", _olua_fun_cocos2d_ui_Text_isShadowEnabled); + oluacls_func(L, "isTouchScaleChangeEnabled", _olua_fun_cocos2d_ui_Text_isTouchScaleChangeEnabled); + oluacls_func(L, "new", _olua_fun_cocos2d_ui_Text_new); + oluacls_func(L, "setBlendFunc", _olua_fun_cocos2d_ui_Text_setBlendFunc); + oluacls_func(L, "setFontName", _olua_fun_cocos2d_ui_Text_setFontName); + oluacls_func(L, "setFontSize", _olua_fun_cocos2d_ui_Text_setFontSize); + oluacls_func(L, "setString", _olua_fun_cocos2d_ui_Text_setString); + oluacls_func(L, "setTextAreaSize", _olua_fun_cocos2d_ui_Text_setTextAreaSize); + oluacls_func(L, "setTextColor", _olua_fun_cocos2d_ui_Text_setTextColor); + oluacls_func(L, "setTextHorizontalAlignment", _olua_fun_cocos2d_ui_Text_setTextHorizontalAlignment); + oluacls_func(L, "setTextVerticalAlignment", _olua_fun_cocos2d_ui_Text_setTextVerticalAlignment); + oluacls_func(L, "setTouchScaleChangeEnabled", _olua_fun_cocos2d_ui_Text_setTouchScaleChangeEnabled); + oluacls_prop(L, "autoRenderSize", _olua_fun_cocos2d_ui_Text_getAutoRenderSize, nullptr); + oluacls_prop(L, "blendFunc", _olua_fun_cocos2d_ui_Text_getBlendFunc, _olua_fun_cocos2d_ui_Text_setBlendFunc); + oluacls_prop(L, "effectColor", _olua_fun_cocos2d_ui_Text_getEffectColor, nullptr); + oluacls_prop(L, "fontName", _olua_fun_cocos2d_ui_Text_getFontName, _olua_fun_cocos2d_ui_Text_setFontName); + oluacls_prop(L, "fontSize", _olua_fun_cocos2d_ui_Text_getFontSize, _olua_fun_cocos2d_ui_Text_setFontSize); + oluacls_prop(L, "labelEffectType", _olua_fun_cocos2d_ui_Text_getLabelEffectType, nullptr); + oluacls_prop(L, "outlineSize", _olua_fun_cocos2d_ui_Text_getOutlineSize, nullptr); + oluacls_prop(L, "shadowBlurRadius", _olua_fun_cocos2d_ui_Text_getShadowBlurRadius, nullptr); + oluacls_prop(L, "shadowColor", _olua_fun_cocos2d_ui_Text_getShadowColor, nullptr); + oluacls_prop(L, "shadowEnabled", _olua_fun_cocos2d_ui_Text_isShadowEnabled, nullptr); + oluacls_prop(L, "shadowOffset", _olua_fun_cocos2d_ui_Text_getShadowOffset, nullptr); + oluacls_prop(L, "string", _olua_fun_cocos2d_ui_Text_getString, _olua_fun_cocos2d_ui_Text_setString); + oluacls_prop(L, "stringLength", _olua_fun_cocos2d_ui_Text_getStringLength, nullptr); + oluacls_prop(L, "textAreaSize", _olua_fun_cocos2d_ui_Text_getTextAreaSize, _olua_fun_cocos2d_ui_Text_setTextAreaSize); + oluacls_prop(L, "textColor", _olua_fun_cocos2d_ui_Text_getTextColor, _olua_fun_cocos2d_ui_Text_setTextColor); + oluacls_prop(L, "textHorizontalAlignment", _olua_fun_cocos2d_ui_Text_getTextHorizontalAlignment, _olua_fun_cocos2d_ui_Text_setTextHorizontalAlignment); + oluacls_prop(L, "textVerticalAlignment", _olua_fun_cocos2d_ui_Text_getTextVerticalAlignment, _olua_fun_cocos2d_ui_Text_setTextVerticalAlignment); + oluacls_prop(L, "touchScaleChangeEnabled", _olua_fun_cocos2d_ui_Text_isTouchScaleChangeEnabled, _olua_fun_cocos2d_ui_Text_setTouchScaleChangeEnabled); + oluacls_prop(L, "type", _olua_fun_cocos2d_ui_Text_getType, nullptr); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccui_Text(lua_State *L) +{ + olua_require(L, "cocos2d_ui", luaopen_cocos2d_ui); + if (!olua_getclass(L, "ccui.Text")) { + luaL_error(L, "class not found: cocos2d::ui::Text"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_ui_TextAtlas_adaptRenderers(lua_State *L) +static int _olua_fun_cocos2d_ui_TextAtlas_adaptRenderers(lua_State *L) { olua_startinvoke(L); @@ -17871,7 +18655,7 @@ static int _cocos2d_ui_TextAtlas_adaptRenderers(lua_State *L) return 0; } -static int _cocos2d_ui_TextAtlas_create$1(lua_State *L) +static int _olua_fun_cocos2d_ui_TextAtlas_create$1(lua_State *L) { olua_startinvoke(L); @@ -17884,7 +18668,7 @@ static int _cocos2d_ui_TextAtlas_create$1(lua_State *L) return num_ret; } -static int _cocos2d_ui_TextAtlas_create$2(lua_State *L) +static int _olua_fun_cocos2d_ui_TextAtlas_create$2(lua_State *L) { olua_startinvoke(L); @@ -17909,19 +18693,19 @@ static int _cocos2d_ui_TextAtlas_create$2(lua_State *L) return num_ret; } -static int _cocos2d_ui_TextAtlas_create(lua_State *L) +static int _olua_fun_cocos2d_ui_TextAtlas_create(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 0) { // static cocos2d::ui::TextAtlas *create() - return _cocos2d_ui_TextAtlas_create$1(L); + return _olua_fun_cocos2d_ui_TextAtlas_create$1(L); } if (num_args == 5) { // if ((olua_is_string(L, 1)) && (olua_is_string(L, 2)) && (olua_is_integer(L, 3)) && (olua_is_integer(L, 4)) && (olua_is_string(L, 5))) { // static cocos2d::ui::TextAtlas *create(const std::string &stringValue, const std::string &charMapFile, int itemWidth, int itemHeight, const std::string &startCharMap) - return _cocos2d_ui_TextAtlas_create$2(L); + return _olua_fun_cocos2d_ui_TextAtlas_create$2(L); // } } @@ -17930,7 +18714,7 @@ static int _cocos2d_ui_TextAtlas_create(lua_State *L) return 0; } -static int _cocos2d_ui_TextAtlas_createInstance(lua_State *L) +static int _olua_fun_cocos2d_ui_TextAtlas_createInstance(lua_State *L) { olua_startinvoke(L); @@ -17943,7 +18727,7 @@ static int _cocos2d_ui_TextAtlas_createInstance(lua_State *L) return num_ret; } -static int _cocos2d_ui_TextAtlas_getRenderFile(lua_State *L) +static int _olua_fun_cocos2d_ui_TextAtlas_getRenderFile(lua_State *L) { olua_startinvoke(L); @@ -17953,14 +18737,14 @@ static int _cocos2d_ui_TextAtlas_getRenderFile(lua_State *L) // cocos2d::ResourceData getRenderFile() cocos2d::ResourceData ret = self->getRenderFile(); - int num_ret = olua_pushcopy_object(L, ret, "cc.ResourceData"); + int num_ret = olua_copy_object(L, ret, "cc.ResourceData"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_ui_TextAtlas_getString(lua_State *L) +static int _olua_fun_cocos2d_ui_TextAtlas_getString(lua_State *L) { olua_startinvoke(L); @@ -17977,7 +18761,7 @@ static int _cocos2d_ui_TextAtlas_getString(lua_State *L) return num_ret; } -static int _cocos2d_ui_TextAtlas_getStringLength(lua_State *L) +static int _olua_fun_cocos2d_ui_TextAtlas_getStringLength(lua_State *L) { olua_startinvoke(L); @@ -17994,11 +18778,11 @@ static int _cocos2d_ui_TextAtlas_getStringLength(lua_State *L) return num_ret; } -static int _cocos2d_ui_TextAtlas_new(lua_State *L) +static int _olua_fun_cocos2d_ui_TextAtlas_new(lua_State *L) { olua_startinvoke(L); - // TextAtlas() + // cocos2d::ui::TextAtlas() cocos2d::ui::TextAtlas *ret = new cocos2d::ui::TextAtlas(); int num_ret = olua_push_object(L, ret, "ccui.TextAtlas"); olua_postnew(L, ret); @@ -18008,7 +18792,7 @@ static int _cocos2d_ui_TextAtlas_new(lua_State *L) return num_ret; } -static int _cocos2d_ui_TextAtlas_setProperty(lua_State *L) +static int _olua_fun_cocos2d_ui_TextAtlas_setProperty(lua_State *L) { olua_startinvoke(L); @@ -18034,7 +18818,7 @@ static int _cocos2d_ui_TextAtlas_setProperty(lua_State *L) return 0; } -static int _cocos2d_ui_TextAtlas_setString(lua_State *L) +static int _olua_fun_cocos2d_ui_TextAtlas_setString(lua_State *L) { olua_startinvoke(L); @@ -18052,28 +18836,37 @@ static int _cocos2d_ui_TextAtlas_setString(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ui_TextAtlas(lua_State *L) +static int _olua_cls_ccui_TextAtlas(lua_State *L) { oluacls_class(L, "ccui.TextAtlas"); - oluacls_func(L, "adaptRenderers", _cocos2d_ui_TextAtlas_adaptRenderers); - oluacls_func(L, "create", _cocos2d_ui_TextAtlas_create); - oluacls_func(L, "createInstance", _cocos2d_ui_TextAtlas_createInstance); - oluacls_func(L, "getRenderFile", _cocos2d_ui_TextAtlas_getRenderFile); - oluacls_func(L, "getString", _cocos2d_ui_TextAtlas_getString); - oluacls_func(L, "getStringLength", _cocos2d_ui_TextAtlas_getStringLength); - oluacls_func(L, "new", _cocos2d_ui_TextAtlas_new); - oluacls_func(L, "setProperty", _cocos2d_ui_TextAtlas_setProperty); - oluacls_func(L, "setString", _cocos2d_ui_TextAtlas_setString); - oluacls_prop(L, "renderFile", _cocos2d_ui_TextAtlas_getRenderFile, nullptr); - oluacls_prop(L, "string", _cocos2d_ui_TextAtlas_getString, _cocos2d_ui_TextAtlas_setString); - oluacls_prop(L, "stringLength", _cocos2d_ui_TextAtlas_getStringLength, nullptr); + oluacls_func(L, "adaptRenderers", _olua_fun_cocos2d_ui_TextAtlas_adaptRenderers); + oluacls_func(L, "create", _olua_fun_cocos2d_ui_TextAtlas_create); + oluacls_func(L, "createInstance", _olua_fun_cocos2d_ui_TextAtlas_createInstance); + oluacls_func(L, "getRenderFile", _olua_fun_cocos2d_ui_TextAtlas_getRenderFile); + oluacls_func(L, "getString", _olua_fun_cocos2d_ui_TextAtlas_getString); + oluacls_func(L, "getStringLength", _olua_fun_cocos2d_ui_TextAtlas_getStringLength); + oluacls_func(L, "new", _olua_fun_cocos2d_ui_TextAtlas_new); + oluacls_func(L, "setProperty", _olua_fun_cocos2d_ui_TextAtlas_setProperty); + oluacls_func(L, "setString", _olua_fun_cocos2d_ui_TextAtlas_setString); + oluacls_prop(L, "renderFile", _olua_fun_cocos2d_ui_TextAtlas_getRenderFile, nullptr); + oluacls_prop(L, "string", _olua_fun_cocos2d_ui_TextAtlas_getString, _olua_fun_cocos2d_ui_TextAtlas_setString); + oluacls_prop(L, "stringLength", _olua_fun_cocos2d_ui_TextAtlas_getStringLength, nullptr); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccui_TextAtlas(lua_State *L) +{ + olua_require(L, "cocos2d_ui", luaopen_cocos2d_ui); + if (!olua_getclass(L, "ccui.TextAtlas")) { + luaL_error(L, "class not found: cocos2d::ui::TextAtlas"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_ui_TextBMFont_create$1(lua_State *L) +static int _olua_fun_cocos2d_ui_TextBMFont_create$1(lua_State *L) { olua_startinvoke(L); @@ -18086,7 +18879,7 @@ static int _cocos2d_ui_TextBMFont_create$1(lua_State *L) return num_ret; } -static int _cocos2d_ui_TextBMFont_create$2(lua_State *L) +static int _olua_fun_cocos2d_ui_TextBMFont_create$2(lua_State *L) { olua_startinvoke(L); @@ -18105,19 +18898,19 @@ static int _cocos2d_ui_TextBMFont_create$2(lua_State *L) return num_ret; } -static int _cocos2d_ui_TextBMFont_create(lua_State *L) +static int _olua_fun_cocos2d_ui_TextBMFont_create(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 0) { // static cocos2d::ui::TextBMFont *create() - return _cocos2d_ui_TextBMFont_create$1(L); + return _olua_fun_cocos2d_ui_TextBMFont_create$1(L); } if (num_args == 2) { // if ((olua_is_string(L, 1)) && (olua_is_string(L, 2))) { // static cocos2d::ui::TextBMFont *create(const std::string &text, const std::string &filename) - return _cocos2d_ui_TextBMFont_create$2(L); + return _olua_fun_cocos2d_ui_TextBMFont_create$2(L); // } } @@ -18126,7 +18919,7 @@ static int _cocos2d_ui_TextBMFont_create(lua_State *L) return 0; } -static int _cocos2d_ui_TextBMFont_createInstance(lua_State *L) +static int _olua_fun_cocos2d_ui_TextBMFont_createInstance(lua_State *L) { olua_startinvoke(L); @@ -18139,7 +18932,7 @@ static int _cocos2d_ui_TextBMFont_createInstance(lua_State *L) return num_ret; } -static int _cocos2d_ui_TextBMFont_getRenderFile(lua_State *L) +static int _olua_fun_cocos2d_ui_TextBMFont_getRenderFile(lua_State *L) { olua_startinvoke(L); @@ -18149,14 +18942,14 @@ static int _cocos2d_ui_TextBMFont_getRenderFile(lua_State *L) // cocos2d::ResourceData getRenderFile() cocos2d::ResourceData ret = self->getRenderFile(); - int num_ret = olua_pushcopy_object(L, ret, "cc.ResourceData"); + int num_ret = olua_copy_object(L, ret, "cc.ResourceData"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_ui_TextBMFont_getString(lua_State *L) +static int _olua_fun_cocos2d_ui_TextBMFont_getString(lua_State *L) { olua_startinvoke(L); @@ -18173,7 +18966,7 @@ static int _cocos2d_ui_TextBMFont_getString(lua_State *L) return num_ret; } -static int _cocos2d_ui_TextBMFont_getStringLength(lua_State *L) +static int _olua_fun_cocos2d_ui_TextBMFont_getStringLength(lua_State *L) { olua_startinvoke(L); @@ -18190,11 +18983,11 @@ static int _cocos2d_ui_TextBMFont_getStringLength(lua_State *L) return num_ret; } -static int _cocos2d_ui_TextBMFont_new(lua_State *L) +static int _olua_fun_cocos2d_ui_TextBMFont_new(lua_State *L) { olua_startinvoke(L); - // TextBMFont() + // cocos2d::ui::TextBMFont() cocos2d::ui::TextBMFont *ret = new cocos2d::ui::TextBMFont(); int num_ret = olua_push_object(L, ret, "ccui.TextBMFont"); olua_postnew(L, ret); @@ -18204,7 +18997,7 @@ static int _cocos2d_ui_TextBMFont_new(lua_State *L) return num_ret; } -static int _cocos2d_ui_TextBMFont_resetRender(lua_State *L) +static int _olua_fun_cocos2d_ui_TextBMFont_resetRender(lua_State *L) { olua_startinvoke(L); @@ -18220,7 +19013,7 @@ static int _cocos2d_ui_TextBMFont_resetRender(lua_State *L) return 0; } -static int _cocos2d_ui_TextBMFont_setFntFile(lua_State *L) +static int _olua_fun_cocos2d_ui_TextBMFont_setFntFile(lua_State *L) { olua_startinvoke(L); @@ -18238,7 +19031,7 @@ static int _cocos2d_ui_TextBMFont_setFntFile(lua_State *L) return 0; } -static int _cocos2d_ui_TextBMFont_setString(lua_State *L) +static int _olua_fun_cocos2d_ui_TextBMFont_setString(lua_State *L) { olua_startinvoke(L); @@ -18256,28 +19049,37 @@ static int _cocos2d_ui_TextBMFont_setString(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ui_TextBMFont(lua_State *L) +static int _olua_cls_ccui_TextBMFont(lua_State *L) { oluacls_class(L, "ccui.TextBMFont"); - oluacls_func(L, "create", _cocos2d_ui_TextBMFont_create); - oluacls_func(L, "createInstance", _cocos2d_ui_TextBMFont_createInstance); - oluacls_func(L, "getRenderFile", _cocos2d_ui_TextBMFont_getRenderFile); - oluacls_func(L, "getString", _cocos2d_ui_TextBMFont_getString); - oluacls_func(L, "getStringLength", _cocos2d_ui_TextBMFont_getStringLength); - oluacls_func(L, "new", _cocos2d_ui_TextBMFont_new); - oluacls_func(L, "resetRender", _cocos2d_ui_TextBMFont_resetRender); - oluacls_func(L, "setFntFile", _cocos2d_ui_TextBMFont_setFntFile); - oluacls_func(L, "setString", _cocos2d_ui_TextBMFont_setString); - oluacls_prop(L, "renderFile", _cocos2d_ui_TextBMFont_getRenderFile, nullptr); - oluacls_prop(L, "string", _cocos2d_ui_TextBMFont_getString, _cocos2d_ui_TextBMFont_setString); - oluacls_prop(L, "stringLength", _cocos2d_ui_TextBMFont_getStringLength, nullptr); + oluacls_func(L, "create", _olua_fun_cocos2d_ui_TextBMFont_create); + oluacls_func(L, "createInstance", _olua_fun_cocos2d_ui_TextBMFont_createInstance); + oluacls_func(L, "getRenderFile", _olua_fun_cocos2d_ui_TextBMFont_getRenderFile); + oluacls_func(L, "getString", _olua_fun_cocos2d_ui_TextBMFont_getString); + oluacls_func(L, "getStringLength", _olua_fun_cocos2d_ui_TextBMFont_getStringLength); + oluacls_func(L, "new", _olua_fun_cocos2d_ui_TextBMFont_new); + oluacls_func(L, "resetRender", _olua_fun_cocos2d_ui_TextBMFont_resetRender); + oluacls_func(L, "setFntFile", _olua_fun_cocos2d_ui_TextBMFont_setFntFile); + oluacls_func(L, "setString", _olua_fun_cocos2d_ui_TextBMFont_setString); + oluacls_prop(L, "renderFile", _olua_fun_cocos2d_ui_TextBMFont_getRenderFile, nullptr); + oluacls_prop(L, "string", _olua_fun_cocos2d_ui_TextBMFont_getString, _olua_fun_cocos2d_ui_TextBMFont_setString); + oluacls_prop(L, "stringLength", _olua_fun_cocos2d_ui_TextBMFont_getStringLength, nullptr); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccui_TextBMFont(lua_State *L) +{ + olua_require(L, "cocos2d_ui", luaopen_cocos2d_ui); + if (!olua_getclass(L, "ccui.TextBMFont")) { + luaL_error(L, "class not found: cocos2d::ui::TextBMFont"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_ui_UICCTextField_as(lua_State *L) +static int _olua_fun_cocos2d_ui_UICCTextField_as(lua_State *L) { olua_startinvoke(L); @@ -18317,7 +19119,7 @@ static int _cocos2d_ui_UICCTextField_as(lua_State *L) return 1; } -static int _cocos2d_ui_UICCTextField_closeIME(lua_State *L) +static int _olua_fun_cocos2d_ui_UICCTextField_closeIME(lua_State *L) { olua_startinvoke(L); @@ -18333,7 +19135,7 @@ static int _cocos2d_ui_UICCTextField_closeIME(lua_State *L) return 0; } -static int _cocos2d_ui_UICCTextField_create$1(lua_State *L) +static int _olua_fun_cocos2d_ui_UICCTextField_create$1(lua_State *L) { olua_startinvoke(L); @@ -18346,7 +19148,7 @@ static int _cocos2d_ui_UICCTextField_create$1(lua_State *L) return num_ret; } -static int _cocos2d_ui_UICCTextField_create$2(lua_State *L) +static int _olua_fun_cocos2d_ui_UICCTextField_create$2(lua_State *L) { olua_startinvoke(L); @@ -18367,19 +19169,19 @@ static int _cocos2d_ui_UICCTextField_create$2(lua_State *L) return num_ret; } -static int _cocos2d_ui_UICCTextField_create(lua_State *L) +static int _olua_fun_cocos2d_ui_UICCTextField_create(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 0) { // static cocos2d::ui::UICCTextField *create() - return _cocos2d_ui_UICCTextField_create$1(L); + return _olua_fun_cocos2d_ui_UICCTextField_create$1(L); } if (num_args == 3) { // if ((olua_is_string(L, 1)) && (olua_is_string(L, 2)) && (olua_is_number(L, 3))) { // static cocos2d::ui::UICCTextField *create(const std::string &placeholder, const std::string &fontName, float fontSize) - return _cocos2d_ui_UICCTextField_create$2(L); + return _olua_fun_cocos2d_ui_UICCTextField_create$2(L); // } } @@ -18388,7 +19190,7 @@ static int _cocos2d_ui_UICCTextField_create(lua_State *L) return 0; } -static int _cocos2d_ui_UICCTextField_getAttachWithIME(lua_State *L) +static int _olua_fun_cocos2d_ui_UICCTextField_getAttachWithIME(lua_State *L) { olua_startinvoke(L); @@ -18405,7 +19207,7 @@ static int _cocos2d_ui_UICCTextField_getAttachWithIME(lua_State *L) return num_ret; } -static int _cocos2d_ui_UICCTextField_getDeleteBackward(lua_State *L) +static int _olua_fun_cocos2d_ui_UICCTextField_getDeleteBackward(lua_State *L) { olua_startinvoke(L); @@ -18422,7 +19224,7 @@ static int _cocos2d_ui_UICCTextField_getDeleteBackward(lua_State *L) return num_ret; } -static int _cocos2d_ui_UICCTextField_getDetachWithIME(lua_State *L) +static int _olua_fun_cocos2d_ui_UICCTextField_getDetachWithIME(lua_State *L) { olua_startinvoke(L); @@ -18439,7 +19241,7 @@ static int _cocos2d_ui_UICCTextField_getDetachWithIME(lua_State *L) return num_ret; } -static int _cocos2d_ui_UICCTextField_getInsertText(lua_State *L) +static int _olua_fun_cocos2d_ui_UICCTextField_getInsertText(lua_State *L) { olua_startinvoke(L); @@ -18456,7 +19258,7 @@ static int _cocos2d_ui_UICCTextField_getInsertText(lua_State *L) return num_ret; } -static int _cocos2d_ui_UICCTextField_getMaxLength(lua_State *L) +static int _olua_fun_cocos2d_ui_UICCTextField_getMaxLength(lua_State *L) { olua_startinvoke(L); @@ -18473,7 +19275,7 @@ static int _cocos2d_ui_UICCTextField_getMaxLength(lua_State *L) return num_ret; } -static int _cocos2d_ui_UICCTextField_insertText(lua_State *L) +static int _olua_fun_cocos2d_ui_UICCTextField_insertText(lua_State *L) { olua_startinvoke(L); @@ -18493,7 +19295,7 @@ static int _cocos2d_ui_UICCTextField_insertText(lua_State *L) return 0; } -static int _cocos2d_ui_UICCTextField_isMaxLengthEnabled(lua_State *L) +static int _olua_fun_cocos2d_ui_UICCTextField_isMaxLengthEnabled(lua_State *L) { olua_startinvoke(L); @@ -18510,7 +19312,7 @@ static int _cocos2d_ui_UICCTextField_isMaxLengthEnabled(lua_State *L) return num_ret; } -static int _cocos2d_ui_UICCTextField_isPasswordEnabled(lua_State *L) +static int _olua_fun_cocos2d_ui_UICCTextField_isPasswordEnabled(lua_State *L) { olua_startinvoke(L); @@ -18527,11 +19329,11 @@ static int _cocos2d_ui_UICCTextField_isPasswordEnabled(lua_State *L) return num_ret; } -static int _cocos2d_ui_UICCTextField_new(lua_State *L) +static int _olua_fun_cocos2d_ui_UICCTextField_new(lua_State *L) { olua_startinvoke(L); - // UICCTextField() + // cocos2d::ui::UICCTextField() cocos2d::ui::UICCTextField *ret = new cocos2d::ui::UICCTextField(); int num_ret = olua_push_object(L, ret, "ccui.UICCTextField"); olua_postnew(L, ret); @@ -18541,7 +19343,7 @@ static int _cocos2d_ui_UICCTextField_new(lua_State *L) return num_ret; } -static int _cocos2d_ui_UICCTextField_onTextFieldAttachWithIME(lua_State *L) +static int _olua_fun_cocos2d_ui_UICCTextField_onTextFieldAttachWithIME(lua_State *L) { olua_startinvoke(L); @@ -18560,7 +19362,7 @@ static int _cocos2d_ui_UICCTextField_onTextFieldAttachWithIME(lua_State *L) return num_ret; } -static int _cocos2d_ui_UICCTextField_onTextFieldDeleteBackward(lua_State *L) +static int _olua_fun_cocos2d_ui_UICCTextField_onTextFieldDeleteBackward(lua_State *L) { olua_startinvoke(L); @@ -18583,7 +19385,7 @@ static int _cocos2d_ui_UICCTextField_onTextFieldDeleteBackward(lua_State *L) return num_ret; } -static int _cocos2d_ui_UICCTextField_onTextFieldDetachWithIME(lua_State *L) +static int _olua_fun_cocos2d_ui_UICCTextField_onTextFieldDetachWithIME(lua_State *L) { olua_startinvoke(L); @@ -18602,7 +19404,7 @@ static int _cocos2d_ui_UICCTextField_onTextFieldDetachWithIME(lua_State *L) return num_ret; } -static int _cocos2d_ui_UICCTextField_onTextFieldInsertText(lua_State *L) +static int _olua_fun_cocos2d_ui_UICCTextField_onTextFieldInsertText(lua_State *L) { olua_startinvoke(L); @@ -18625,14 +19427,14 @@ static int _cocos2d_ui_UICCTextField_onTextFieldInsertText(lua_State *L) return num_ret; } -static int _cocos2d_ui_UICCTextField_onVisit(lua_State *L) +static int _olua_fun_cocos2d_ui_UICCTextField_onVisit(lua_State *L) { olua_startinvoke(L); cocos2d::ui::UICCTextField *self = nullptr; cocos2d::TextFieldTTF *arg1 = nullptr; /** sender */ cocos2d::Renderer *arg2 = nullptr; /** renderer */ - cocos2d::Mat4 arg3; /** transform */ + cocos2d::Mat4 *arg3; /** transform */ uint32_t arg4 = 0; /** flags */ olua_to_object(L, 1, &self, "ccui.UICCTextField"); @@ -18642,7 +19444,7 @@ static int _cocos2d_ui_UICCTextField_onVisit(lua_State *L) olua_check_integer(L, 5, &arg4); // @copyfrom(cocos2d::TextFieldDelegate) bool onVisit(cocos2d::TextFieldTTF *sender, cocos2d::Renderer *renderer, const cocos2d::Mat4 &transform, uint32_t flags) - bool ret = self->onVisit(arg1, arg2, arg3, arg4); + bool ret = self->onVisit(arg1, arg2, *arg3, arg4); int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); @@ -18650,7 +19452,7 @@ static int _cocos2d_ui_UICCTextField_onVisit(lua_State *L) return num_ret; } -static int _cocos2d_ui_UICCTextField_openIME(lua_State *L) +static int _olua_fun_cocos2d_ui_UICCTextField_openIME(lua_State *L) { olua_startinvoke(L); @@ -18666,7 +19468,7 @@ static int _cocos2d_ui_UICCTextField_openIME(lua_State *L) return 0; } -static int _cocos2d_ui_UICCTextField_setAttachWithIME(lua_State *L) +static int _olua_fun_cocos2d_ui_UICCTextField_setAttachWithIME(lua_State *L) { olua_startinvoke(L); @@ -18684,7 +19486,7 @@ static int _cocos2d_ui_UICCTextField_setAttachWithIME(lua_State *L) return 0; } -static int _cocos2d_ui_UICCTextField_setDeleteBackward(lua_State *L) +static int _olua_fun_cocos2d_ui_UICCTextField_setDeleteBackward(lua_State *L) { olua_startinvoke(L); @@ -18702,7 +19504,7 @@ static int _cocos2d_ui_UICCTextField_setDeleteBackward(lua_State *L) return 0; } -static int _cocos2d_ui_UICCTextField_setDetachWithIME(lua_State *L) +static int _olua_fun_cocos2d_ui_UICCTextField_setDetachWithIME(lua_State *L) { olua_startinvoke(L); @@ -18720,7 +19522,7 @@ static int _cocos2d_ui_UICCTextField_setDetachWithIME(lua_State *L) return 0; } -static int _cocos2d_ui_UICCTextField_setInsertText(lua_State *L) +static int _olua_fun_cocos2d_ui_UICCTextField_setInsertText(lua_State *L) { olua_startinvoke(L); @@ -18738,7 +19540,7 @@ static int _cocos2d_ui_UICCTextField_setInsertText(lua_State *L) return 0; } -static int _cocos2d_ui_UICCTextField_setMaxLength(lua_State *L) +static int _olua_fun_cocos2d_ui_UICCTextField_setMaxLength(lua_State *L) { olua_startinvoke(L); @@ -18756,7 +19558,7 @@ static int _cocos2d_ui_UICCTextField_setMaxLength(lua_State *L) return 0; } -static int _cocos2d_ui_UICCTextField_setMaxLengthEnabled(lua_State *L) +static int _olua_fun_cocos2d_ui_UICCTextField_setMaxLengthEnabled(lua_State *L) { olua_startinvoke(L); @@ -18774,7 +19576,7 @@ static int _cocos2d_ui_UICCTextField_setMaxLengthEnabled(lua_State *L) return 0; } -static int _cocos2d_ui_UICCTextField_setPasswordEnabled(lua_State *L) +static int _olua_fun_cocos2d_ui_UICCTextField_setPasswordEnabled(lua_State *L) { olua_startinvoke(L); @@ -18792,7 +19594,7 @@ static int _cocos2d_ui_UICCTextField_setPasswordEnabled(lua_State *L) return 0; } -static int _cocos2d_ui_UICCTextField_setPasswordStyleText(lua_State *L) +static int _olua_fun_cocos2d_ui_UICCTextField_setPasswordStyleText(lua_State *L) { olua_startinvoke(L); @@ -18810,7 +19612,7 @@ static int _cocos2d_ui_UICCTextField_setPasswordStyleText(lua_State *L) return 0; } -static int _cocos2d_ui_UICCTextField_setPasswordText(lua_State *L) +static int _olua_fun_cocos2d_ui_UICCTextField_setPasswordText(lua_State *L) { olua_startinvoke(L); @@ -18828,51 +19630,58 @@ static int _cocos2d_ui_UICCTextField_setPasswordText(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ui_UICCTextField(lua_State *L) +static int _olua_cls_ccui_UICCTextField(lua_State *L) { oluacls_class(L, "ccui.UICCTextField"); - oluacls_func(L, "as", _cocos2d_ui_UICCTextField_as); - oluacls_func(L, "closeIME", _cocos2d_ui_UICCTextField_closeIME); - oluacls_func(L, "create", _cocos2d_ui_UICCTextField_create); - oluacls_func(L, "getAttachWithIME", _cocos2d_ui_UICCTextField_getAttachWithIME); - oluacls_func(L, "getDeleteBackward", _cocos2d_ui_UICCTextField_getDeleteBackward); - oluacls_func(L, "getDetachWithIME", _cocos2d_ui_UICCTextField_getDetachWithIME); - oluacls_func(L, "getInsertText", _cocos2d_ui_UICCTextField_getInsertText); - oluacls_func(L, "getMaxLength", _cocos2d_ui_UICCTextField_getMaxLength); - oluacls_func(L, "insertText", _cocos2d_ui_UICCTextField_insertText); - oluacls_func(L, "isMaxLengthEnabled", _cocos2d_ui_UICCTextField_isMaxLengthEnabled); - oluacls_func(L, "isPasswordEnabled", _cocos2d_ui_UICCTextField_isPasswordEnabled); - oluacls_func(L, "new", _cocos2d_ui_UICCTextField_new); - oluacls_func(L, "onTextFieldAttachWithIME", _cocos2d_ui_UICCTextField_onTextFieldAttachWithIME); - oluacls_func(L, "onTextFieldDeleteBackward", _cocos2d_ui_UICCTextField_onTextFieldDeleteBackward); - oluacls_func(L, "onTextFieldDetachWithIME", _cocos2d_ui_UICCTextField_onTextFieldDetachWithIME); - oluacls_func(L, "onTextFieldInsertText", _cocos2d_ui_UICCTextField_onTextFieldInsertText); - oluacls_func(L, "onVisit", _cocos2d_ui_UICCTextField_onVisit); - oluacls_func(L, "openIME", _cocos2d_ui_UICCTextField_openIME); - oluacls_func(L, "setAttachWithIME", _cocos2d_ui_UICCTextField_setAttachWithIME); - oluacls_func(L, "setDeleteBackward", _cocos2d_ui_UICCTextField_setDeleteBackward); - oluacls_func(L, "setDetachWithIME", _cocos2d_ui_UICCTextField_setDetachWithIME); - oluacls_func(L, "setInsertText", _cocos2d_ui_UICCTextField_setInsertText); - oluacls_func(L, "setMaxLength", _cocos2d_ui_UICCTextField_setMaxLength); - oluacls_func(L, "setMaxLengthEnabled", _cocos2d_ui_UICCTextField_setMaxLengthEnabled); - oluacls_func(L, "setPasswordEnabled", _cocos2d_ui_UICCTextField_setPasswordEnabled); - oluacls_func(L, "setPasswordStyleText", _cocos2d_ui_UICCTextField_setPasswordStyleText); - oluacls_func(L, "setPasswordText", _cocos2d_ui_UICCTextField_setPasswordText); - oluacls_prop(L, "attachWithIME", _cocos2d_ui_UICCTextField_getAttachWithIME, _cocos2d_ui_UICCTextField_setAttachWithIME); - oluacls_prop(L, "deleteBackward", _cocos2d_ui_UICCTextField_getDeleteBackward, _cocos2d_ui_UICCTextField_setDeleteBackward); - oluacls_prop(L, "detachWithIME", _cocos2d_ui_UICCTextField_getDetachWithIME, _cocos2d_ui_UICCTextField_setDetachWithIME); - oluacls_prop(L, "insertText", _cocos2d_ui_UICCTextField_getInsertText, _cocos2d_ui_UICCTextField_setInsertText); - oluacls_prop(L, "maxLength", _cocos2d_ui_UICCTextField_getMaxLength, _cocos2d_ui_UICCTextField_setMaxLength); - oluacls_prop(L, "maxLengthEnabled", _cocos2d_ui_UICCTextField_isMaxLengthEnabled, _cocos2d_ui_UICCTextField_setMaxLengthEnabled); - oluacls_prop(L, "passwordEnabled", _cocos2d_ui_UICCTextField_isPasswordEnabled, _cocos2d_ui_UICCTextField_setPasswordEnabled); + oluacls_func(L, "as", _olua_fun_cocos2d_ui_UICCTextField_as); + oluacls_func(L, "closeIME", _olua_fun_cocos2d_ui_UICCTextField_closeIME); + oluacls_func(L, "create", _olua_fun_cocos2d_ui_UICCTextField_create); + oluacls_func(L, "getAttachWithIME", _olua_fun_cocos2d_ui_UICCTextField_getAttachWithIME); + oluacls_func(L, "getDeleteBackward", _olua_fun_cocos2d_ui_UICCTextField_getDeleteBackward); + oluacls_func(L, "getDetachWithIME", _olua_fun_cocos2d_ui_UICCTextField_getDetachWithIME); + oluacls_func(L, "getInsertText", _olua_fun_cocos2d_ui_UICCTextField_getInsertText); + oluacls_func(L, "getMaxLength", _olua_fun_cocos2d_ui_UICCTextField_getMaxLength); + oluacls_func(L, "insertText", _olua_fun_cocos2d_ui_UICCTextField_insertText); + oluacls_func(L, "isMaxLengthEnabled", _olua_fun_cocos2d_ui_UICCTextField_isMaxLengthEnabled); + oluacls_func(L, "isPasswordEnabled", _olua_fun_cocos2d_ui_UICCTextField_isPasswordEnabled); + oluacls_func(L, "new", _olua_fun_cocos2d_ui_UICCTextField_new); + oluacls_func(L, "onTextFieldAttachWithIME", _olua_fun_cocos2d_ui_UICCTextField_onTextFieldAttachWithIME); + oluacls_func(L, "onTextFieldDeleteBackward", _olua_fun_cocos2d_ui_UICCTextField_onTextFieldDeleteBackward); + oluacls_func(L, "onTextFieldDetachWithIME", _olua_fun_cocos2d_ui_UICCTextField_onTextFieldDetachWithIME); + oluacls_func(L, "onTextFieldInsertText", _olua_fun_cocos2d_ui_UICCTextField_onTextFieldInsertText); + oluacls_func(L, "onVisit", _olua_fun_cocos2d_ui_UICCTextField_onVisit); + oluacls_func(L, "openIME", _olua_fun_cocos2d_ui_UICCTextField_openIME); + oluacls_func(L, "setAttachWithIME", _olua_fun_cocos2d_ui_UICCTextField_setAttachWithIME); + oluacls_func(L, "setDeleteBackward", _olua_fun_cocos2d_ui_UICCTextField_setDeleteBackward); + oluacls_func(L, "setDetachWithIME", _olua_fun_cocos2d_ui_UICCTextField_setDetachWithIME); + oluacls_func(L, "setInsertText", _olua_fun_cocos2d_ui_UICCTextField_setInsertText); + oluacls_func(L, "setMaxLength", _olua_fun_cocos2d_ui_UICCTextField_setMaxLength); + oluacls_func(L, "setMaxLengthEnabled", _olua_fun_cocos2d_ui_UICCTextField_setMaxLengthEnabled); + oluacls_func(L, "setPasswordEnabled", _olua_fun_cocos2d_ui_UICCTextField_setPasswordEnabled); + oluacls_func(L, "setPasswordStyleText", _olua_fun_cocos2d_ui_UICCTextField_setPasswordStyleText); + oluacls_func(L, "setPasswordText", _olua_fun_cocos2d_ui_UICCTextField_setPasswordText); + oluacls_prop(L, "attachWithIME", _olua_fun_cocos2d_ui_UICCTextField_getAttachWithIME, _olua_fun_cocos2d_ui_UICCTextField_setAttachWithIME); + oluacls_prop(L, "deleteBackward", _olua_fun_cocos2d_ui_UICCTextField_getDeleteBackward, _olua_fun_cocos2d_ui_UICCTextField_setDeleteBackward); + oluacls_prop(L, "detachWithIME", _olua_fun_cocos2d_ui_UICCTextField_getDetachWithIME, _olua_fun_cocos2d_ui_UICCTextField_setDetachWithIME); + oluacls_prop(L, "maxLength", _olua_fun_cocos2d_ui_UICCTextField_getMaxLength, _olua_fun_cocos2d_ui_UICCTextField_setMaxLength); + oluacls_prop(L, "maxLengthEnabled", _olua_fun_cocos2d_ui_UICCTextField_isMaxLengthEnabled, _olua_fun_cocos2d_ui_UICCTextField_setMaxLengthEnabled); + oluacls_prop(L, "passwordEnabled", _olua_fun_cocos2d_ui_UICCTextField_isPasswordEnabled, _olua_fun_cocos2d_ui_UICCTextField_setPasswordEnabled); return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ui_TextField_EventType(lua_State *L) +OLUA_LIB int luaopen_ccui_UICCTextField(lua_State *L) +{ + olua_require(L, "cocos2d_ui", luaopen_cocos2d_ui); + if (!olua_getclass(L, "ccui.UICCTextField")) { + luaL_error(L, "class not found: cocos2d::ui::UICCTextField"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_ccui_TextField_EventType(lua_State *L) { oluacls_class(L, "ccui.TextField.EventType"); oluacls_func(L, "__index", olua_indexerror); @@ -18884,9 +19693,19 @@ OLUA_LIB int luaopen_cocos2d_ui_TextField_EventType(lua_State *L) return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccui_TextField_EventType(lua_State *L) +{ + olua_require(L, "cocos2d_ui", luaopen_cocos2d_ui); + if (!olua_getclass(L, "ccui.TextField.EventType")) { + luaL_error(L, "class not found: cocos2d::ui::TextField::EventType"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_ui_TextField_ccTextFieldCallback___call(lua_State *L) +static int _olua_fun_cocos2d_ui_TextField_ccTextFieldCallback___call(lua_State *L) { olua_startinvoke(L); @@ -18898,17 +19717,26 @@ static int _cocos2d_ui_TextField_ccTextFieldCallback___call(lua_State *L) return 1; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ui_TextField_ccTextFieldCallback(lua_State *L) +static int _olua_cls_ccui_TextField_ccTextFieldCallback(lua_State *L) { oluacls_class(L, "ccui.TextField.ccTextFieldCallback"); - oluacls_func(L, "__call", _cocos2d_ui_TextField_ccTextFieldCallback___call); + oluacls_func(L, "__call", _olua_fun_cocos2d_ui_TextField_ccTextFieldCallback___call); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccui_TextField_ccTextFieldCallback(lua_State *L) +{ + olua_require(L, "cocos2d_ui", luaopen_cocos2d_ui); + if (!olua_getclass(L, "ccui.TextField.ccTextFieldCallback")) { + luaL_error(L, "class not found: cocos2d::ui::TextField::ccTextFieldCallback"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_ui_TextField_addEventListener(lua_State *L) +static int _olua_fun_cocos2d_ui_TextField_addEventListener(lua_State *L) { olua_startinvoke(L); @@ -18920,16 +19748,17 @@ static int _cocos2d_ui_TextField_addEventListener(lua_State *L) void *cb_store = (void *)self; std::string cb_tag = "textFieldCallback"; - std::string cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + std::string cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](cocos2d::Ref *arg1, cocos2d::ui::TextField::EventType arg2) { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](cocos2d::Ref *cb_arg1, cocos2d::ui::TextField::EventType cb_arg2) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); if (olua_contextequal(L, cb_ctx)) { int top = lua_gettop(L); - olua_push_object(L, arg1, "cc.Ref"); - olua_push_enum(L, arg2); + olua_push_object(L, cb_arg1, "cc.Ref"); + olua_push_enum(L, cb_arg2); olua_callback(L, cb_store, cb_name.c_str(), 2); @@ -18945,7 +19774,7 @@ static int _cocos2d_ui_TextField_addEventListener(lua_State *L) return 0; } -static int _cocos2d_ui_TextField_attachWithIME(lua_State *L) +static int _olua_fun_cocos2d_ui_TextField_attachWithIME(lua_State *L) { olua_startinvoke(L); @@ -18961,7 +19790,7 @@ static int _cocos2d_ui_TextField_attachWithIME(lua_State *L) return 0; } -static int _cocos2d_ui_TextField_create$1(lua_State *L) +static int _olua_fun_cocos2d_ui_TextField_create$1(lua_State *L) { olua_startinvoke(L); @@ -18974,7 +19803,7 @@ static int _cocos2d_ui_TextField_create$1(lua_State *L) return num_ret; } -static int _cocos2d_ui_TextField_create$2(lua_State *L) +static int _olua_fun_cocos2d_ui_TextField_create$2(lua_State *L) { olua_startinvoke(L); @@ -18995,19 +19824,19 @@ static int _cocos2d_ui_TextField_create$2(lua_State *L) return num_ret; } -static int _cocos2d_ui_TextField_create(lua_State *L) +static int _olua_fun_cocos2d_ui_TextField_create(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 0) { // static cocos2d::ui::TextField *create() - return _cocos2d_ui_TextField_create$1(L); + return _olua_fun_cocos2d_ui_TextField_create$1(L); } if (num_args == 3) { // if ((olua_is_string(L, 1)) && (olua_is_string(L, 2)) && (olua_is_integer(L, 3))) { // static cocos2d::ui::TextField *create(const std::string &placeholder, const std::string &fontName, int fontSize) - return _cocos2d_ui_TextField_create$2(L); + return _olua_fun_cocos2d_ui_TextField_create$2(L); // } } @@ -19016,7 +19845,7 @@ static int _cocos2d_ui_TextField_create(lua_State *L) return 0; } -static int _cocos2d_ui_TextField_createInstance(lua_State *L) +static int _olua_fun_cocos2d_ui_TextField_createInstance(lua_State *L) { olua_startinvoke(L); @@ -19029,7 +19858,7 @@ static int _cocos2d_ui_TextField_createInstance(lua_State *L) return num_ret; } -static int _cocos2d_ui_TextField_didNotSelectSelf(lua_State *L) +static int _olua_fun_cocos2d_ui_TextField_didNotSelectSelf(lua_State *L) { olua_startinvoke(L); @@ -19045,7 +19874,7 @@ static int _cocos2d_ui_TextField_didNotSelectSelf(lua_State *L) return 0; } -static int _cocos2d_ui_TextField_getAttachWithIME(lua_State *L) +static int _olua_fun_cocos2d_ui_TextField_getAttachWithIME(lua_State *L) { olua_startinvoke(L); @@ -19062,7 +19891,7 @@ static int _cocos2d_ui_TextField_getAttachWithIME(lua_State *L) return num_ret; } -static int _cocos2d_ui_TextField_getAutoRenderSize(lua_State *L) +static int _olua_fun_cocos2d_ui_TextField_getAutoRenderSize(lua_State *L) { olua_startinvoke(L); @@ -19072,14 +19901,14 @@ static int _cocos2d_ui_TextField_getAutoRenderSize(lua_State *L) // cocos2d::Size getAutoRenderSize() cocos2d::Size ret = self->getAutoRenderSize(); - int num_ret = olua_pushcopy_object(L, ret, "cc.Size"); + int num_ret = olua_copy_object(L, ret, "cc.Size"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_ui_TextField_getDeleteBackward(lua_State *L) +static int _olua_fun_cocos2d_ui_TextField_getDeleteBackward(lua_State *L) { olua_startinvoke(L); @@ -19096,7 +19925,7 @@ static int _cocos2d_ui_TextField_getDeleteBackward(lua_State *L) return num_ret; } -static int _cocos2d_ui_TextField_getDetachWithIME(lua_State *L) +static int _olua_fun_cocos2d_ui_TextField_getDetachWithIME(lua_State *L) { olua_startinvoke(L); @@ -19113,7 +19942,7 @@ static int _cocos2d_ui_TextField_getDetachWithIME(lua_State *L) return num_ret; } -static int _cocos2d_ui_TextField_getFontName(lua_State *L) +static int _olua_fun_cocos2d_ui_TextField_getFontName(lua_State *L) { olua_startinvoke(L); @@ -19130,7 +19959,7 @@ static int _cocos2d_ui_TextField_getFontName(lua_State *L) return num_ret; } -static int _cocos2d_ui_TextField_getFontSize(lua_State *L) +static int _olua_fun_cocos2d_ui_TextField_getFontSize(lua_State *L) { olua_startinvoke(L); @@ -19147,7 +19976,7 @@ static int _cocos2d_ui_TextField_getFontSize(lua_State *L) return num_ret; } -static int _cocos2d_ui_TextField_getInsertText(lua_State *L) +static int _olua_fun_cocos2d_ui_TextField_getInsertText(lua_State *L) { olua_startinvoke(L); @@ -19164,7 +19993,7 @@ static int _cocos2d_ui_TextField_getInsertText(lua_State *L) return num_ret; } -static int _cocos2d_ui_TextField_getMaxLength(lua_State *L) +static int _olua_fun_cocos2d_ui_TextField_getMaxLength(lua_State *L) { olua_startinvoke(L); @@ -19181,7 +20010,7 @@ static int _cocos2d_ui_TextField_getMaxLength(lua_State *L) return num_ret; } -static int _cocos2d_ui_TextField_getPasswordStyleText(lua_State *L) +static int _olua_fun_cocos2d_ui_TextField_getPasswordStyleText(lua_State *L) { olua_startinvoke(L); @@ -19198,7 +20027,7 @@ static int _cocos2d_ui_TextField_getPasswordStyleText(lua_State *L) return num_ret; } -static int _cocos2d_ui_TextField_getPlaceHolder(lua_State *L) +static int _olua_fun_cocos2d_ui_TextField_getPlaceHolder(lua_State *L) { olua_startinvoke(L); @@ -19215,7 +20044,7 @@ static int _cocos2d_ui_TextField_getPlaceHolder(lua_State *L) return num_ret; } -static int _cocos2d_ui_TextField_getPlaceHolderColor(lua_State *L) +static int _olua_fun_cocos2d_ui_TextField_getPlaceHolderColor(lua_State *L) { olua_startinvoke(L); @@ -19232,7 +20061,7 @@ static int _cocos2d_ui_TextField_getPlaceHolderColor(lua_State *L) return num_ret; } -static int _cocos2d_ui_TextField_getString(lua_State *L) +static int _olua_fun_cocos2d_ui_TextField_getString(lua_State *L) { olua_startinvoke(L); @@ -19249,7 +20078,7 @@ static int _cocos2d_ui_TextField_getString(lua_State *L) return num_ret; } -static int _cocos2d_ui_TextField_getStringLength(lua_State *L) +static int _olua_fun_cocos2d_ui_TextField_getStringLength(lua_State *L) { olua_startinvoke(L); @@ -19266,7 +20095,7 @@ static int _cocos2d_ui_TextField_getStringLength(lua_State *L) return num_ret; } -static int _cocos2d_ui_TextField_getTextColor(lua_State *L) +static int _olua_fun_cocos2d_ui_TextField_getTextColor(lua_State *L) { olua_startinvoke(L); @@ -19283,7 +20112,7 @@ static int _cocos2d_ui_TextField_getTextColor(lua_State *L) return num_ret; } -static int _cocos2d_ui_TextField_getTextHorizontalAlignment(lua_State *L) +static int _olua_fun_cocos2d_ui_TextField_getTextHorizontalAlignment(lua_State *L) { olua_startinvoke(L); @@ -19300,7 +20129,7 @@ static int _cocos2d_ui_TextField_getTextHorizontalAlignment(lua_State *L) return num_ret; } -static int _cocos2d_ui_TextField_getTextVerticalAlignment(lua_State *L) +static int _olua_fun_cocos2d_ui_TextField_getTextVerticalAlignment(lua_State *L) { olua_startinvoke(L); @@ -19317,7 +20146,7 @@ static int _cocos2d_ui_TextField_getTextVerticalAlignment(lua_State *L) return num_ret; } -static int _cocos2d_ui_TextField_getTouchSize(lua_State *L) +static int _olua_fun_cocos2d_ui_TextField_getTouchSize(lua_State *L) { olua_startinvoke(L); @@ -19327,14 +20156,14 @@ static int _cocos2d_ui_TextField_getTouchSize(lua_State *L) // cocos2d::Size getTouchSize() cocos2d::Size ret = self->getTouchSize(); - int num_ret = olua_pushcopy_object(L, ret, "cc.Size"); + int num_ret = olua_copy_object(L, ret, "cc.Size"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_ui_TextField_isMaxLengthEnabled(lua_State *L) +static int _olua_fun_cocos2d_ui_TextField_isMaxLengthEnabled(lua_State *L) { olua_startinvoke(L); @@ -19351,7 +20180,7 @@ static int _cocos2d_ui_TextField_isMaxLengthEnabled(lua_State *L) return num_ret; } -static int _cocos2d_ui_TextField_isPasswordEnabled(lua_State *L) +static int _olua_fun_cocos2d_ui_TextField_isPasswordEnabled(lua_State *L) { olua_startinvoke(L); @@ -19368,11 +20197,11 @@ static int _cocos2d_ui_TextField_isPasswordEnabled(lua_State *L) return num_ret; } -static int _cocos2d_ui_TextField_new(lua_State *L) +static int _olua_fun_cocos2d_ui_TextField_new(lua_State *L) { olua_startinvoke(L); - // TextField() + // cocos2d::ui::TextField() cocos2d::ui::TextField *ret = new cocos2d::ui::TextField(); int num_ret = olua_push_object(L, ret, "ccui.TextField"); olua_postnew(L, ret); @@ -19382,7 +20211,7 @@ static int _cocos2d_ui_TextField_new(lua_State *L) return num_ret; } -static int _cocos2d_ui_TextField_setAttachWithIME(lua_State *L) +static int _olua_fun_cocos2d_ui_TextField_setAttachWithIME(lua_State *L) { olua_startinvoke(L); @@ -19400,7 +20229,7 @@ static int _cocos2d_ui_TextField_setAttachWithIME(lua_State *L) return 0; } -static int _cocos2d_ui_TextField_setCursorChar(lua_State *L) +static int _olua_fun_cocos2d_ui_TextField_setCursorChar(lua_State *L) { olua_startinvoke(L); @@ -19418,7 +20247,7 @@ static int _cocos2d_ui_TextField_setCursorChar(lua_State *L) return 0; } -static int _cocos2d_ui_TextField_setCursorEnabled(lua_State *L) +static int _olua_fun_cocos2d_ui_TextField_setCursorEnabled(lua_State *L) { olua_startinvoke(L); @@ -19436,12 +20265,12 @@ static int _cocos2d_ui_TextField_setCursorEnabled(lua_State *L) return 0; } -static int _cocos2d_ui_TextField_setCursorFromPoint(lua_State *L) +static int _olua_fun_cocos2d_ui_TextField_setCursorFromPoint(lua_State *L) { olua_startinvoke(L); cocos2d::ui::TextField *self = nullptr; - cocos2d::Vec2 arg1; /** point */ + cocos2d::Vec2 *arg1; /** point */ cocos2d::Camera *arg2 = nullptr; /** camera */ olua_to_object(L, 1, &self, "ccui.TextField"); @@ -19449,14 +20278,14 @@ static int _cocos2d_ui_TextField_setCursorFromPoint(lua_State *L) olua_check_object(L, 3, &arg2, "cc.Camera"); // void setCursorFromPoint(const cocos2d::Vec2 &point, const cocos2d::Camera *camera) - self->setCursorFromPoint(arg1, arg2); + self->setCursorFromPoint(*arg1, arg2); olua_endinvoke(L); return 0; } -static int _cocos2d_ui_TextField_setCursorPosition(lua_State *L) +static int _olua_fun_cocos2d_ui_TextField_setCursorPosition(lua_State *L) { olua_startinvoke(L); @@ -19474,7 +20303,7 @@ static int _cocos2d_ui_TextField_setCursorPosition(lua_State *L) return 0; } -static int _cocos2d_ui_TextField_setDeleteBackward(lua_State *L) +static int _olua_fun_cocos2d_ui_TextField_setDeleteBackward(lua_State *L) { olua_startinvoke(L); @@ -19492,7 +20321,7 @@ static int _cocos2d_ui_TextField_setDeleteBackward(lua_State *L) return 0; } -static int _cocos2d_ui_TextField_setDetachWithIME(lua_State *L) +static int _olua_fun_cocos2d_ui_TextField_setDetachWithIME(lua_State *L) { olua_startinvoke(L); @@ -19510,7 +20339,7 @@ static int _cocos2d_ui_TextField_setDetachWithIME(lua_State *L) return 0; } -static int _cocos2d_ui_TextField_setFontName(lua_State *L) +static int _olua_fun_cocos2d_ui_TextField_setFontName(lua_State *L) { olua_startinvoke(L); @@ -19528,7 +20357,7 @@ static int _cocos2d_ui_TextField_setFontName(lua_State *L) return 0; } -static int _cocos2d_ui_TextField_setFontSize(lua_State *L) +static int _olua_fun_cocos2d_ui_TextField_setFontSize(lua_State *L) { olua_startinvoke(L); @@ -19546,7 +20375,7 @@ static int _cocos2d_ui_TextField_setFontSize(lua_State *L) return 0; } -static int _cocos2d_ui_TextField_setInsertText(lua_State *L) +static int _olua_fun_cocos2d_ui_TextField_setInsertText(lua_State *L) { olua_startinvoke(L); @@ -19564,7 +20393,7 @@ static int _cocos2d_ui_TextField_setInsertText(lua_State *L) return 0; } -static int _cocos2d_ui_TextField_setMaxLength(lua_State *L) +static int _olua_fun_cocos2d_ui_TextField_setMaxLength(lua_State *L) { olua_startinvoke(L); @@ -19582,7 +20411,7 @@ static int _cocos2d_ui_TextField_setMaxLength(lua_State *L) return 0; } -static int _cocos2d_ui_TextField_setMaxLengthEnabled(lua_State *L) +static int _olua_fun_cocos2d_ui_TextField_setMaxLengthEnabled(lua_State *L) { olua_startinvoke(L); @@ -19600,7 +20429,7 @@ static int _cocos2d_ui_TextField_setMaxLengthEnabled(lua_State *L) return 0; } -static int _cocos2d_ui_TextField_setPasswordEnabled(lua_State *L) +static int _olua_fun_cocos2d_ui_TextField_setPasswordEnabled(lua_State *L) { olua_startinvoke(L); @@ -19618,7 +20447,7 @@ static int _cocos2d_ui_TextField_setPasswordEnabled(lua_State *L) return 0; } -static int _cocos2d_ui_TextField_setPasswordStyleText(lua_State *L) +static int _olua_fun_cocos2d_ui_TextField_setPasswordStyleText(lua_State *L) { olua_startinvoke(L); @@ -19636,7 +20465,7 @@ static int _cocos2d_ui_TextField_setPasswordStyleText(lua_State *L) return 0; } -static int _cocos2d_ui_TextField_setPlaceHolder(lua_State *L) +static int _olua_fun_cocos2d_ui_TextField_setPlaceHolder(lua_State *L) { olua_startinvoke(L); @@ -19654,7 +20483,7 @@ static int _cocos2d_ui_TextField_setPlaceHolder(lua_State *L) return 0; } -static int _cocos2d_ui_TextField_setPlaceHolderColor$1(lua_State *L) +static int _olua_fun_cocos2d_ui_TextField_setPlaceHolderColor$1(lua_State *L) { olua_startinvoke(L); @@ -19672,7 +20501,7 @@ static int _cocos2d_ui_TextField_setPlaceHolderColor$1(lua_State *L) return 0; } -static int _cocos2d_ui_TextField_setPlaceHolderColor$2(lua_State *L) +static int _olua_fun_cocos2d_ui_TextField_setPlaceHolderColor$2(lua_State *L) { olua_startinvoke(L); @@ -19690,19 +20519,19 @@ static int _cocos2d_ui_TextField_setPlaceHolderColor$2(lua_State *L) return 0; } -static int _cocos2d_ui_TextField_setPlaceHolderColor(lua_State *L) +static int _olua_fun_cocos2d_ui_TextField_setPlaceHolderColor(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { if ((olua_is_cocos2d_Color3B(L, 2))) { // void setPlaceHolderColor(const cocos2d::Color3B &color) - return _cocos2d_ui_TextField_setPlaceHolderColor$1(L); + return _olua_fun_cocos2d_ui_TextField_setPlaceHolderColor$1(L); } // if ((olua_is_cocos2d_Color4B(L, 2))) { // void setPlaceHolderColor(const cocos2d::Color4B &color) - return _cocos2d_ui_TextField_setPlaceHolderColor$2(L); + return _olua_fun_cocos2d_ui_TextField_setPlaceHolderColor$2(L); // } } @@ -19711,7 +20540,7 @@ static int _cocos2d_ui_TextField_setPlaceHolderColor(lua_State *L) return 0; } -static int _cocos2d_ui_TextField_setString(lua_State *L) +static int _olua_fun_cocos2d_ui_TextField_setString(lua_State *L) { olua_startinvoke(L); @@ -19729,25 +20558,25 @@ static int _cocos2d_ui_TextField_setString(lua_State *L) return 0; } -static int _cocos2d_ui_TextField_setTextAreaSize(lua_State *L) +static int _olua_fun_cocos2d_ui_TextField_setTextAreaSize(lua_State *L) { olua_startinvoke(L); cocos2d::ui::TextField *self = nullptr; - cocos2d::Size arg1; /** size */ + cocos2d::Size *arg1; /** size */ olua_to_object(L, 1, &self, "ccui.TextField"); olua_check_object(L, 2, &arg1, "cc.Size"); // void setTextAreaSize(const cocos2d::Size &size) - self->setTextAreaSize(arg1); + self->setTextAreaSize(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_ui_TextField_setTextColor(lua_State *L) +static int _olua_fun_cocos2d_ui_TextField_setTextColor(lua_State *L) { olua_startinvoke(L); @@ -19765,7 +20594,7 @@ static int _cocos2d_ui_TextField_setTextColor(lua_State *L) return 0; } -static int _cocos2d_ui_TextField_setTextHorizontalAlignment(lua_State *L) +static int _olua_fun_cocos2d_ui_TextField_setTextHorizontalAlignment(lua_State *L) { olua_startinvoke(L); @@ -19783,7 +20612,7 @@ static int _cocos2d_ui_TextField_setTextHorizontalAlignment(lua_State *L) return 0; } -static int _cocos2d_ui_TextField_setTextVerticalAlignment(lua_State *L) +static int _olua_fun_cocos2d_ui_TextField_setTextVerticalAlignment(lua_State *L) { olua_startinvoke(L); @@ -19801,7 +20630,7 @@ static int _cocos2d_ui_TextField_setTextVerticalAlignment(lua_State *L) return 0; } -static int _cocos2d_ui_TextField_setTouchAreaEnabled(lua_State *L) +static int _olua_fun_cocos2d_ui_TextField_setTouchAreaEnabled(lua_State *L) { olua_startinvoke(L); @@ -19819,101 +20648,109 @@ static int _cocos2d_ui_TextField_setTouchAreaEnabled(lua_State *L) return 0; } -static int _cocos2d_ui_TextField_setTouchSize(lua_State *L) +static int _olua_fun_cocos2d_ui_TextField_setTouchSize(lua_State *L) { olua_startinvoke(L); cocos2d::ui::TextField *self = nullptr; - cocos2d::Size arg1; /** size */ + cocos2d::Size *arg1; /** size */ olua_to_object(L, 1, &self, "ccui.TextField"); olua_check_object(L, 2, &arg1, "cc.Size"); // void setTouchSize(const cocos2d::Size &size) - self->setTouchSize(arg1); + self->setTouchSize(*arg1); olua_endinvoke(L); return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ui_TextField(lua_State *L) +static int _olua_cls_ccui_TextField(lua_State *L) { oluacls_class(L, "ccui.TextField"); - oluacls_func(L, "addEventListener", _cocos2d_ui_TextField_addEventListener); - oluacls_func(L, "attachWithIME", _cocos2d_ui_TextField_attachWithIME); - oluacls_func(L, "create", _cocos2d_ui_TextField_create); - oluacls_func(L, "createInstance", _cocos2d_ui_TextField_createInstance); - oluacls_func(L, "didNotSelectSelf", _cocos2d_ui_TextField_didNotSelectSelf); - oluacls_func(L, "getAttachWithIME", _cocos2d_ui_TextField_getAttachWithIME); - oluacls_func(L, "getAutoRenderSize", _cocos2d_ui_TextField_getAutoRenderSize); - oluacls_func(L, "getDeleteBackward", _cocos2d_ui_TextField_getDeleteBackward); - oluacls_func(L, "getDetachWithIME", _cocos2d_ui_TextField_getDetachWithIME); - oluacls_func(L, "getFontName", _cocos2d_ui_TextField_getFontName); - oluacls_func(L, "getFontSize", _cocos2d_ui_TextField_getFontSize); - oluacls_func(L, "getInsertText", _cocos2d_ui_TextField_getInsertText); - oluacls_func(L, "getMaxLength", _cocos2d_ui_TextField_getMaxLength); - oluacls_func(L, "getPasswordStyleText", _cocos2d_ui_TextField_getPasswordStyleText); - oluacls_func(L, "getPlaceHolder", _cocos2d_ui_TextField_getPlaceHolder); - oluacls_func(L, "getPlaceHolderColor", _cocos2d_ui_TextField_getPlaceHolderColor); - oluacls_func(L, "getString", _cocos2d_ui_TextField_getString); - oluacls_func(L, "getStringLength", _cocos2d_ui_TextField_getStringLength); - oluacls_func(L, "getTextColor", _cocos2d_ui_TextField_getTextColor); - oluacls_func(L, "getTextHorizontalAlignment", _cocos2d_ui_TextField_getTextHorizontalAlignment); - oluacls_func(L, "getTextVerticalAlignment", _cocos2d_ui_TextField_getTextVerticalAlignment); - oluacls_func(L, "getTouchSize", _cocos2d_ui_TextField_getTouchSize); - oluacls_func(L, "isMaxLengthEnabled", _cocos2d_ui_TextField_isMaxLengthEnabled); - oluacls_func(L, "isPasswordEnabled", _cocos2d_ui_TextField_isPasswordEnabled); - oluacls_func(L, "new", _cocos2d_ui_TextField_new); - oluacls_func(L, "setAttachWithIME", _cocos2d_ui_TextField_setAttachWithIME); - oluacls_func(L, "setCursorChar", _cocos2d_ui_TextField_setCursorChar); - oluacls_func(L, "setCursorEnabled", _cocos2d_ui_TextField_setCursorEnabled); - oluacls_func(L, "setCursorFromPoint", _cocos2d_ui_TextField_setCursorFromPoint); - oluacls_func(L, "setCursorPosition", _cocos2d_ui_TextField_setCursorPosition); - oluacls_func(L, "setDeleteBackward", _cocos2d_ui_TextField_setDeleteBackward); - oluacls_func(L, "setDetachWithIME", _cocos2d_ui_TextField_setDetachWithIME); - oluacls_func(L, "setFontName", _cocos2d_ui_TextField_setFontName); - oluacls_func(L, "setFontSize", _cocos2d_ui_TextField_setFontSize); - oluacls_func(L, "setInsertText", _cocos2d_ui_TextField_setInsertText); - oluacls_func(L, "setMaxLength", _cocos2d_ui_TextField_setMaxLength); - oluacls_func(L, "setMaxLengthEnabled", _cocos2d_ui_TextField_setMaxLengthEnabled); - oluacls_func(L, "setPasswordEnabled", _cocos2d_ui_TextField_setPasswordEnabled); - oluacls_func(L, "setPasswordStyleText", _cocos2d_ui_TextField_setPasswordStyleText); - oluacls_func(L, "setPlaceHolder", _cocos2d_ui_TextField_setPlaceHolder); - oluacls_func(L, "setPlaceHolderColor", _cocos2d_ui_TextField_setPlaceHolderColor); - oluacls_func(L, "setString", _cocos2d_ui_TextField_setString); - oluacls_func(L, "setTextAreaSize", _cocos2d_ui_TextField_setTextAreaSize); - oluacls_func(L, "setTextColor", _cocos2d_ui_TextField_setTextColor); - oluacls_func(L, "setTextHorizontalAlignment", _cocos2d_ui_TextField_setTextHorizontalAlignment); - oluacls_func(L, "setTextVerticalAlignment", _cocos2d_ui_TextField_setTextVerticalAlignment); - oluacls_func(L, "setTouchAreaEnabled", _cocos2d_ui_TextField_setTouchAreaEnabled); - oluacls_func(L, "setTouchSize", _cocos2d_ui_TextField_setTouchSize); - oluacls_prop(L, "attachWithIME", _cocos2d_ui_TextField_getAttachWithIME, _cocos2d_ui_TextField_setAttachWithIME); - oluacls_prop(L, "autoRenderSize", _cocos2d_ui_TextField_getAutoRenderSize, nullptr); - oluacls_prop(L, "deleteBackward", _cocos2d_ui_TextField_getDeleteBackward, _cocos2d_ui_TextField_setDeleteBackward); - oluacls_prop(L, "detachWithIME", _cocos2d_ui_TextField_getDetachWithIME, _cocos2d_ui_TextField_setDetachWithIME); - oluacls_prop(L, "fontName", _cocos2d_ui_TextField_getFontName, _cocos2d_ui_TextField_setFontName); - oluacls_prop(L, "fontSize", _cocos2d_ui_TextField_getFontSize, _cocos2d_ui_TextField_setFontSize); - oluacls_prop(L, "insertText", _cocos2d_ui_TextField_getInsertText, _cocos2d_ui_TextField_setInsertText); - oluacls_prop(L, "maxLength", _cocos2d_ui_TextField_getMaxLength, _cocos2d_ui_TextField_setMaxLength); - oluacls_prop(L, "maxLengthEnabled", _cocos2d_ui_TextField_isMaxLengthEnabled, _cocos2d_ui_TextField_setMaxLengthEnabled); - oluacls_prop(L, "passwordEnabled", _cocos2d_ui_TextField_isPasswordEnabled, _cocos2d_ui_TextField_setPasswordEnabled); - oluacls_prop(L, "passwordStyleText", _cocos2d_ui_TextField_getPasswordStyleText, _cocos2d_ui_TextField_setPasswordStyleText); - oluacls_prop(L, "placeHolder", _cocos2d_ui_TextField_getPlaceHolder, _cocos2d_ui_TextField_setPlaceHolder); - oluacls_prop(L, "placeHolderColor", _cocos2d_ui_TextField_getPlaceHolderColor, _cocos2d_ui_TextField_setPlaceHolderColor); - oluacls_prop(L, "string", _cocos2d_ui_TextField_getString, _cocos2d_ui_TextField_setString); - oluacls_prop(L, "stringLength", _cocos2d_ui_TextField_getStringLength, nullptr); - oluacls_prop(L, "textColor", _cocos2d_ui_TextField_getTextColor, _cocos2d_ui_TextField_setTextColor); - oluacls_prop(L, "textHorizontalAlignment", _cocos2d_ui_TextField_getTextHorizontalAlignment, _cocos2d_ui_TextField_setTextHorizontalAlignment); - oluacls_prop(L, "textVerticalAlignment", _cocos2d_ui_TextField_getTextVerticalAlignment, _cocos2d_ui_TextField_setTextVerticalAlignment); - oluacls_prop(L, "touchSize", _cocos2d_ui_TextField_getTouchSize, _cocos2d_ui_TextField_setTouchSize); + oluacls_func(L, "addEventListener", _olua_fun_cocos2d_ui_TextField_addEventListener); + oluacls_func(L, "attachWithIME", _olua_fun_cocos2d_ui_TextField_attachWithIME); + oluacls_func(L, "create", _olua_fun_cocos2d_ui_TextField_create); + oluacls_func(L, "createInstance", _olua_fun_cocos2d_ui_TextField_createInstance); + oluacls_func(L, "didNotSelectSelf", _olua_fun_cocos2d_ui_TextField_didNotSelectSelf); + oluacls_func(L, "getAttachWithIME", _olua_fun_cocos2d_ui_TextField_getAttachWithIME); + oluacls_func(L, "getAutoRenderSize", _olua_fun_cocos2d_ui_TextField_getAutoRenderSize); + oluacls_func(L, "getDeleteBackward", _olua_fun_cocos2d_ui_TextField_getDeleteBackward); + oluacls_func(L, "getDetachWithIME", _olua_fun_cocos2d_ui_TextField_getDetachWithIME); + oluacls_func(L, "getFontName", _olua_fun_cocos2d_ui_TextField_getFontName); + oluacls_func(L, "getFontSize", _olua_fun_cocos2d_ui_TextField_getFontSize); + oluacls_func(L, "getInsertText", _olua_fun_cocos2d_ui_TextField_getInsertText); + oluacls_func(L, "getMaxLength", _olua_fun_cocos2d_ui_TextField_getMaxLength); + oluacls_func(L, "getPasswordStyleText", _olua_fun_cocos2d_ui_TextField_getPasswordStyleText); + oluacls_func(L, "getPlaceHolder", _olua_fun_cocos2d_ui_TextField_getPlaceHolder); + oluacls_func(L, "getPlaceHolderColor", _olua_fun_cocos2d_ui_TextField_getPlaceHolderColor); + oluacls_func(L, "getString", _olua_fun_cocos2d_ui_TextField_getString); + oluacls_func(L, "getStringLength", _olua_fun_cocos2d_ui_TextField_getStringLength); + oluacls_func(L, "getTextColor", _olua_fun_cocos2d_ui_TextField_getTextColor); + oluacls_func(L, "getTextHorizontalAlignment", _olua_fun_cocos2d_ui_TextField_getTextHorizontalAlignment); + oluacls_func(L, "getTextVerticalAlignment", _olua_fun_cocos2d_ui_TextField_getTextVerticalAlignment); + oluacls_func(L, "getTouchSize", _olua_fun_cocos2d_ui_TextField_getTouchSize); + oluacls_func(L, "isMaxLengthEnabled", _olua_fun_cocos2d_ui_TextField_isMaxLengthEnabled); + oluacls_func(L, "isPasswordEnabled", _olua_fun_cocos2d_ui_TextField_isPasswordEnabled); + oluacls_func(L, "new", _olua_fun_cocos2d_ui_TextField_new); + oluacls_func(L, "setAttachWithIME", _olua_fun_cocos2d_ui_TextField_setAttachWithIME); + oluacls_func(L, "setCursorChar", _olua_fun_cocos2d_ui_TextField_setCursorChar); + oluacls_func(L, "setCursorEnabled", _olua_fun_cocos2d_ui_TextField_setCursorEnabled); + oluacls_func(L, "setCursorFromPoint", _olua_fun_cocos2d_ui_TextField_setCursorFromPoint); + oluacls_func(L, "setCursorPosition", _olua_fun_cocos2d_ui_TextField_setCursorPosition); + oluacls_func(L, "setDeleteBackward", _olua_fun_cocos2d_ui_TextField_setDeleteBackward); + oluacls_func(L, "setDetachWithIME", _olua_fun_cocos2d_ui_TextField_setDetachWithIME); + oluacls_func(L, "setFontName", _olua_fun_cocos2d_ui_TextField_setFontName); + oluacls_func(L, "setFontSize", _olua_fun_cocos2d_ui_TextField_setFontSize); + oluacls_func(L, "setInsertText", _olua_fun_cocos2d_ui_TextField_setInsertText); + oluacls_func(L, "setMaxLength", _olua_fun_cocos2d_ui_TextField_setMaxLength); + oluacls_func(L, "setMaxLengthEnabled", _olua_fun_cocos2d_ui_TextField_setMaxLengthEnabled); + oluacls_func(L, "setPasswordEnabled", _olua_fun_cocos2d_ui_TextField_setPasswordEnabled); + oluacls_func(L, "setPasswordStyleText", _olua_fun_cocos2d_ui_TextField_setPasswordStyleText); + oluacls_func(L, "setPlaceHolder", _olua_fun_cocos2d_ui_TextField_setPlaceHolder); + oluacls_func(L, "setPlaceHolderColor", _olua_fun_cocos2d_ui_TextField_setPlaceHolderColor); + oluacls_func(L, "setString", _olua_fun_cocos2d_ui_TextField_setString); + oluacls_func(L, "setTextAreaSize", _olua_fun_cocos2d_ui_TextField_setTextAreaSize); + oluacls_func(L, "setTextColor", _olua_fun_cocos2d_ui_TextField_setTextColor); + oluacls_func(L, "setTextHorizontalAlignment", _olua_fun_cocos2d_ui_TextField_setTextHorizontalAlignment); + oluacls_func(L, "setTextVerticalAlignment", _olua_fun_cocos2d_ui_TextField_setTextVerticalAlignment); + oluacls_func(L, "setTouchAreaEnabled", _olua_fun_cocos2d_ui_TextField_setTouchAreaEnabled); + oluacls_func(L, "setTouchSize", _olua_fun_cocos2d_ui_TextField_setTouchSize); + oluacls_prop(L, "autoRenderSize", _olua_fun_cocos2d_ui_TextField_getAutoRenderSize, nullptr); + oluacls_prop(L, "deleteBackward", _olua_fun_cocos2d_ui_TextField_getDeleteBackward, _olua_fun_cocos2d_ui_TextField_setDeleteBackward); + oluacls_prop(L, "detachWithIME", _olua_fun_cocos2d_ui_TextField_getDetachWithIME, _olua_fun_cocos2d_ui_TextField_setDetachWithIME); + oluacls_prop(L, "fontName", _olua_fun_cocos2d_ui_TextField_getFontName, _olua_fun_cocos2d_ui_TextField_setFontName); + oluacls_prop(L, "fontSize", _olua_fun_cocos2d_ui_TextField_getFontSize, _olua_fun_cocos2d_ui_TextField_setFontSize); + oluacls_prop(L, "insertText", _olua_fun_cocos2d_ui_TextField_getInsertText, _olua_fun_cocos2d_ui_TextField_setInsertText); + oluacls_prop(L, "maxLength", _olua_fun_cocos2d_ui_TextField_getMaxLength, _olua_fun_cocos2d_ui_TextField_setMaxLength); + oluacls_prop(L, "maxLengthEnabled", _olua_fun_cocos2d_ui_TextField_isMaxLengthEnabled, _olua_fun_cocos2d_ui_TextField_setMaxLengthEnabled); + oluacls_prop(L, "passwordEnabled", _olua_fun_cocos2d_ui_TextField_isPasswordEnabled, _olua_fun_cocos2d_ui_TextField_setPasswordEnabled); + oluacls_prop(L, "passwordStyleText", _olua_fun_cocos2d_ui_TextField_getPasswordStyleText, _olua_fun_cocos2d_ui_TextField_setPasswordStyleText); + oluacls_prop(L, "placeHolder", _olua_fun_cocos2d_ui_TextField_getPlaceHolder, _olua_fun_cocos2d_ui_TextField_setPlaceHolder); + oluacls_prop(L, "placeHolderColor", _olua_fun_cocos2d_ui_TextField_getPlaceHolderColor, nullptr); + oluacls_prop(L, "string", _olua_fun_cocos2d_ui_TextField_getString, _olua_fun_cocos2d_ui_TextField_setString); + oluacls_prop(L, "stringLength", _olua_fun_cocos2d_ui_TextField_getStringLength, nullptr); + oluacls_prop(L, "textColor", _olua_fun_cocos2d_ui_TextField_getTextColor, _olua_fun_cocos2d_ui_TextField_setTextColor); + oluacls_prop(L, "textHorizontalAlignment", _olua_fun_cocos2d_ui_TextField_getTextHorizontalAlignment, _olua_fun_cocos2d_ui_TextField_setTextHorizontalAlignment); + oluacls_prop(L, "textVerticalAlignment", _olua_fun_cocos2d_ui_TextField_getTextVerticalAlignment, _olua_fun_cocos2d_ui_TextField_setTextVerticalAlignment); + oluacls_prop(L, "touchSize", _olua_fun_cocos2d_ui_TextField_getTouchSize, _olua_fun_cocos2d_ui_TextField_setTouchSize); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccui_TextField(lua_State *L) +{ + olua_require(L, "cocos2d_ui", luaopen_cocos2d_ui); + if (!olua_getclass(L, "ccui.TextField")) { + luaL_error(L, "class not found: cocos2d::ui::TextField"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_ui_Button_create$1(lua_State *L) +static int _olua_fun_cocos2d_ui_Button_create$1(lua_State *L) { olua_startinvoke(L); @@ -19926,7 +20763,7 @@ static int _cocos2d_ui_Button_create$1(lua_State *L) return num_ret; } -static int _cocos2d_ui_Button_create$2(lua_State *L) +static int _olua_fun_cocos2d_ui_Button_create$2(lua_State *L) { olua_startinvoke(L); @@ -19949,7 +20786,7 @@ static int _cocos2d_ui_Button_create$2(lua_State *L) return num_ret; } -static int _cocos2d_ui_Button_create$3(lua_State *L) +static int _olua_fun_cocos2d_ui_Button_create$3(lua_State *L) { olua_startinvoke(L); @@ -19957,7 +20794,7 @@ static int _cocos2d_ui_Button_create$3(lua_State *L) olua_check_string(L, 1, &arg1); - // static cocos2d::ui::Button *create(const std::string &normalImage, @optional const std::string &selectedImage, @optional const std::string &disableImage, @optional cocos2d::ui::Widget::TextureResType texType) + // static cocos2d::ui::Button *create(const std::string &normalImage) cocos2d::ui::Button *ret = cocos2d::ui::Button::create(arg1); int num_ret = olua_push_object(L, ret, "ccui.Button"); @@ -19966,7 +20803,7 @@ static int _cocos2d_ui_Button_create$3(lua_State *L) return num_ret; } -static int _cocos2d_ui_Button_create$4(lua_State *L) +static int _olua_fun_cocos2d_ui_Button_create$4(lua_State *L) { olua_startinvoke(L); @@ -19976,7 +20813,7 @@ static int _cocos2d_ui_Button_create$4(lua_State *L) olua_check_string(L, 1, &arg1); olua_check_string(L, 2, &arg2); - // static cocos2d::ui::Button *create(const std::string &normalImage, @optional const std::string &selectedImage, @optional const std::string &disableImage, @optional cocos2d::ui::Widget::TextureResType texType) + // static cocos2d::ui::Button *create(const std::string &normalImage, @optional const std::string &selectedImage) cocos2d::ui::Button *ret = cocos2d::ui::Button::create(arg1, arg2); int num_ret = olua_push_object(L, ret, "ccui.Button"); @@ -19985,7 +20822,7 @@ static int _cocos2d_ui_Button_create$4(lua_State *L) return num_ret; } -static int _cocos2d_ui_Button_create$5(lua_State *L) +static int _olua_fun_cocos2d_ui_Button_create$5(lua_State *L) { olua_startinvoke(L); @@ -19997,7 +20834,7 @@ static int _cocos2d_ui_Button_create$5(lua_State *L) olua_check_string(L, 2, &arg2); olua_check_string(L, 3, &arg3); - // static cocos2d::ui::Button *create(const std::string &normalImage, @optional const std::string &selectedImage, @optional const std::string &disableImage, @optional cocos2d::ui::Widget::TextureResType texType) + // static cocos2d::ui::Button *create(const std::string &normalImage, @optional const std::string &selectedImage, @optional const std::string &disableImage) cocos2d::ui::Button *ret = cocos2d::ui::Button::create(arg1, arg2, arg3); int num_ret = olua_push_object(L, ret, "ccui.Button"); @@ -20006,40 +20843,40 @@ static int _cocos2d_ui_Button_create$5(lua_State *L) return num_ret; } -static int _cocos2d_ui_Button_create(lua_State *L) +static int _olua_fun_cocos2d_ui_Button_create(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 0) { // static cocos2d::ui::Button *create() - return _cocos2d_ui_Button_create$1(L); + return _olua_fun_cocos2d_ui_Button_create$1(L); } if (num_args == 1) { // if ((olua_is_string(L, 1))) { - // static cocos2d::ui::Button *create(const std::string &normalImage, @optional const std::string &selectedImage, @optional const std::string &disableImage, @optional cocos2d::ui::Widget::TextureResType texType) - return _cocos2d_ui_Button_create$3(L); + // static cocos2d::ui::Button *create(const std::string &normalImage) + return _olua_fun_cocos2d_ui_Button_create$3(L); // } } if (num_args == 2) { // if ((olua_is_string(L, 1)) && (olua_is_string(L, 2))) { - // static cocos2d::ui::Button *create(const std::string &normalImage, @optional const std::string &selectedImage, @optional const std::string &disableImage, @optional cocos2d::ui::Widget::TextureResType texType) - return _cocos2d_ui_Button_create$4(L); + // static cocos2d::ui::Button *create(const std::string &normalImage, @optional const std::string &selectedImage) + return _olua_fun_cocos2d_ui_Button_create$4(L); // } } if (num_args == 3) { // if ((olua_is_string(L, 1)) && (olua_is_string(L, 2)) && (olua_is_string(L, 3))) { - // static cocos2d::ui::Button *create(const std::string &normalImage, @optional const std::string &selectedImage, @optional const std::string &disableImage, @optional cocos2d::ui::Widget::TextureResType texType) - return _cocos2d_ui_Button_create$5(L); + // static cocos2d::ui::Button *create(const std::string &normalImage, @optional const std::string &selectedImage, @optional const std::string &disableImage) + return _olua_fun_cocos2d_ui_Button_create$5(L); // } } if (num_args == 4) { // if ((olua_is_string(L, 1)) && (olua_is_string(L, 2)) && (olua_is_string(L, 3)) && (olua_is_enum(L, 4))) { // static cocos2d::ui::Button *create(const std::string &normalImage, @optional const std::string &selectedImage, @optional const std::string &disableImage, @optional cocos2d::ui::Widget::TextureResType texType) - return _cocos2d_ui_Button_create$2(L); + return _olua_fun_cocos2d_ui_Button_create$2(L); // } } @@ -20048,7 +20885,7 @@ static int _cocos2d_ui_Button_create(lua_State *L) return 0; } -static int _cocos2d_ui_Button_createInstance(lua_State *L) +static int _olua_fun_cocos2d_ui_Button_createInstance(lua_State *L) { olua_startinvoke(L); @@ -20061,7 +20898,7 @@ static int _cocos2d_ui_Button_createInstance(lua_State *L) return num_ret; } -static int _cocos2d_ui_Button_getCapInsetsDisabledRenderer(lua_State *L) +static int _olua_fun_cocos2d_ui_Button_getCapInsetsDisabledRenderer(lua_State *L) { olua_startinvoke(L); @@ -20078,7 +20915,7 @@ static int _cocos2d_ui_Button_getCapInsetsDisabledRenderer(lua_State *L) return num_ret; } -static int _cocos2d_ui_Button_getCapInsetsNormalRenderer(lua_State *L) +static int _olua_fun_cocos2d_ui_Button_getCapInsetsNormalRenderer(lua_State *L) { olua_startinvoke(L); @@ -20095,7 +20932,7 @@ static int _cocos2d_ui_Button_getCapInsetsNormalRenderer(lua_State *L) return num_ret; } -static int _cocos2d_ui_Button_getCapInsetsPressedRenderer(lua_State *L) +static int _olua_fun_cocos2d_ui_Button_getCapInsetsPressedRenderer(lua_State *L) { olua_startinvoke(L); @@ -20112,7 +20949,7 @@ static int _cocos2d_ui_Button_getCapInsetsPressedRenderer(lua_State *L) return num_ret; } -static int _cocos2d_ui_Button_getDisabledFile(lua_State *L) +static int _olua_fun_cocos2d_ui_Button_getDisabledFile(lua_State *L) { olua_startinvoke(L); @@ -20122,14 +20959,14 @@ static int _cocos2d_ui_Button_getDisabledFile(lua_State *L) // cocos2d::ResourceData getDisabledFile() cocos2d::ResourceData ret = self->getDisabledFile(); - int num_ret = olua_pushcopy_object(L, ret, "cc.ResourceData"); + int num_ret = olua_copy_object(L, ret, "cc.ResourceData"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_ui_Button_getNormalFile(lua_State *L) +static int _olua_fun_cocos2d_ui_Button_getNormalFile(lua_State *L) { olua_startinvoke(L); @@ -20139,14 +20976,14 @@ static int _cocos2d_ui_Button_getNormalFile(lua_State *L) // cocos2d::ResourceData getNormalFile() cocos2d::ResourceData ret = self->getNormalFile(); - int num_ret = olua_pushcopy_object(L, ret, "cc.ResourceData"); + int num_ret = olua_copy_object(L, ret, "cc.ResourceData"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_ui_Button_getNormalTextureSize(lua_State *L) +static int _olua_fun_cocos2d_ui_Button_getNormalTextureSize(lua_State *L) { olua_startinvoke(L); @@ -20156,14 +20993,14 @@ static int _cocos2d_ui_Button_getNormalTextureSize(lua_State *L) // cocos2d::Size getNormalTextureSize() cocos2d::Size ret = self->getNormalTextureSize(); - int num_ret = olua_pushcopy_object(L, ret, "cc.Size"); + int num_ret = olua_copy_object(L, ret, "cc.Size"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_ui_Button_getPressedFile(lua_State *L) +static int _olua_fun_cocos2d_ui_Button_getPressedFile(lua_State *L) { olua_startinvoke(L); @@ -20173,14 +21010,14 @@ static int _cocos2d_ui_Button_getPressedFile(lua_State *L) // cocos2d::ResourceData getPressedFile() cocos2d::ResourceData ret = self->getPressedFile(); - int num_ret = olua_pushcopy_object(L, ret, "cc.ResourceData"); + int num_ret = olua_copy_object(L, ret, "cc.ResourceData"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_ui_Button_getRendererClicked(lua_State *L) +static int _olua_fun_cocos2d_ui_Button_getRendererClicked(lua_State *L) { olua_startinvoke(L); @@ -20200,7 +21037,7 @@ static int _cocos2d_ui_Button_getRendererClicked(lua_State *L) return num_ret; } -static int _cocos2d_ui_Button_getRendererDisabled(lua_State *L) +static int _olua_fun_cocos2d_ui_Button_getRendererDisabled(lua_State *L) { olua_startinvoke(L); @@ -20220,7 +21057,7 @@ static int _cocos2d_ui_Button_getRendererDisabled(lua_State *L) return num_ret; } -static int _cocos2d_ui_Button_getRendererNormal(lua_State *L) +static int _olua_fun_cocos2d_ui_Button_getRendererNormal(lua_State *L) { olua_startinvoke(L); @@ -20240,7 +21077,7 @@ static int _cocos2d_ui_Button_getRendererNormal(lua_State *L) return num_ret; } -static int _cocos2d_ui_Button_getTitleColor(lua_State *L) +static int _olua_fun_cocos2d_ui_Button_getTitleColor(lua_State *L) { olua_startinvoke(L); @@ -20257,7 +21094,7 @@ static int _cocos2d_ui_Button_getTitleColor(lua_State *L) return num_ret; } -static int _cocos2d_ui_Button_getTitleFontName(lua_State *L) +static int _olua_fun_cocos2d_ui_Button_getTitleFontName(lua_State *L) { olua_startinvoke(L); @@ -20274,7 +21111,7 @@ static int _cocos2d_ui_Button_getTitleFontName(lua_State *L) return num_ret; } -static int _cocos2d_ui_Button_getTitleFontSize(lua_State *L) +static int _olua_fun_cocos2d_ui_Button_getTitleFontSize(lua_State *L) { olua_startinvoke(L); @@ -20291,7 +21128,7 @@ static int _cocos2d_ui_Button_getTitleFontSize(lua_State *L) return num_ret; } -static int _cocos2d_ui_Button_getTitleLabel(lua_State *L) +static int _olua_fun_cocos2d_ui_Button_getTitleLabel(lua_State *L) { olua_startinvoke(L); @@ -20311,7 +21148,7 @@ static int _cocos2d_ui_Button_getTitleLabel(lua_State *L) return num_ret; } -static int _cocos2d_ui_Button_getTitleRenderer(lua_State *L) +static int _olua_fun_cocos2d_ui_Button_getTitleRenderer(lua_State *L) { olua_startinvoke(L); @@ -20331,7 +21168,7 @@ static int _cocos2d_ui_Button_getTitleRenderer(lua_State *L) return num_ret; } -static int _cocos2d_ui_Button_getTitleText(lua_State *L) +static int _olua_fun_cocos2d_ui_Button_getTitleText(lua_State *L) { olua_startinvoke(L); @@ -20348,7 +21185,7 @@ static int _cocos2d_ui_Button_getTitleText(lua_State *L) return num_ret; } -static int _cocos2d_ui_Button_getZoomScale(lua_State *L) +static int _olua_fun_cocos2d_ui_Button_getZoomScale(lua_State *L) { olua_startinvoke(L); @@ -20365,7 +21202,7 @@ static int _cocos2d_ui_Button_getZoomScale(lua_State *L) return num_ret; } -static int _cocos2d_ui_Button_init$1(lua_State *L) +static int _olua_fun_cocos2d_ui_Button_init$1(lua_State *L) { olua_startinvoke(L); @@ -20382,7 +21219,7 @@ static int _cocos2d_ui_Button_init$1(lua_State *L) return num_ret; } -static int _cocos2d_ui_Button_init$2(lua_State *L) +static int _olua_fun_cocos2d_ui_Button_init$2(lua_State *L) { olua_startinvoke(L); @@ -20407,7 +21244,7 @@ static int _cocos2d_ui_Button_init$2(lua_State *L) return num_ret; } -static int _cocos2d_ui_Button_init$3(lua_State *L) +static int _olua_fun_cocos2d_ui_Button_init$3(lua_State *L) { olua_startinvoke(L); @@ -20417,7 +21254,7 @@ static int _cocos2d_ui_Button_init$3(lua_State *L) olua_to_object(L, 1, &self, "ccui.Button"); olua_check_string(L, 2, &arg1); - // bool init(const std::string &normalImage, @optional const std::string &selectedImage, @optional const std::string &disableImage, @optional cocos2d::ui::Widget::TextureResType texType) + // bool init(const std::string &normalImage) bool ret = self->init(arg1); int num_ret = olua_push_bool(L, ret); @@ -20426,7 +21263,7 @@ static int _cocos2d_ui_Button_init$3(lua_State *L) return num_ret; } -static int _cocos2d_ui_Button_init$4(lua_State *L) +static int _olua_fun_cocos2d_ui_Button_init$4(lua_State *L) { olua_startinvoke(L); @@ -20438,7 +21275,7 @@ static int _cocos2d_ui_Button_init$4(lua_State *L) olua_check_string(L, 2, &arg1); olua_check_string(L, 3, &arg2); - // bool init(const std::string &normalImage, @optional const std::string &selectedImage, @optional const std::string &disableImage, @optional cocos2d::ui::Widget::TextureResType texType) + // bool init(const std::string &normalImage, @optional const std::string &selectedImage) bool ret = self->init(arg1, arg2); int num_ret = olua_push_bool(L, ret); @@ -20447,7 +21284,7 @@ static int _cocos2d_ui_Button_init$4(lua_State *L) return num_ret; } -static int _cocos2d_ui_Button_init$5(lua_State *L) +static int _olua_fun_cocos2d_ui_Button_init$5(lua_State *L) { olua_startinvoke(L); @@ -20461,7 +21298,7 @@ static int _cocos2d_ui_Button_init$5(lua_State *L) olua_check_string(L, 3, &arg2); olua_check_string(L, 4, &arg3); - // bool init(const std::string &normalImage, @optional const std::string &selectedImage, @optional const std::string &disableImage, @optional cocos2d::ui::Widget::TextureResType texType) + // bool init(const std::string &normalImage, @optional const std::string &selectedImage, @optional const std::string &disableImage) bool ret = self->init(arg1, arg2, arg3); int num_ret = olua_push_bool(L, ret); @@ -20470,40 +21307,40 @@ static int _cocos2d_ui_Button_init$5(lua_State *L) return num_ret; } -static int _cocos2d_ui_Button_init(lua_State *L) +static int _olua_fun_cocos2d_ui_Button_init(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 0) { // @using bool init() - return _cocos2d_ui_Button_init$1(L); + return _olua_fun_cocos2d_ui_Button_init$1(L); } if (num_args == 1) { // if ((olua_is_string(L, 2))) { - // bool init(const std::string &normalImage, @optional const std::string &selectedImage, @optional const std::string &disableImage, @optional cocos2d::ui::Widget::TextureResType texType) - return _cocos2d_ui_Button_init$3(L); + // bool init(const std::string &normalImage) + return _olua_fun_cocos2d_ui_Button_init$3(L); // } } if (num_args == 2) { // if ((olua_is_string(L, 2)) && (olua_is_string(L, 3))) { - // bool init(const std::string &normalImage, @optional const std::string &selectedImage, @optional const std::string &disableImage, @optional cocos2d::ui::Widget::TextureResType texType) - return _cocos2d_ui_Button_init$4(L); + // bool init(const std::string &normalImage, @optional const std::string &selectedImage) + return _olua_fun_cocos2d_ui_Button_init$4(L); // } } if (num_args == 3) { // if ((olua_is_string(L, 2)) && (olua_is_string(L, 3)) && (olua_is_string(L, 4))) { - // bool init(const std::string &normalImage, @optional const std::string &selectedImage, @optional const std::string &disableImage, @optional cocos2d::ui::Widget::TextureResType texType) - return _cocos2d_ui_Button_init$5(L); + // bool init(const std::string &normalImage, @optional const std::string &selectedImage, @optional const std::string &disableImage) + return _olua_fun_cocos2d_ui_Button_init$5(L); // } } if (num_args == 4) { // if ((olua_is_string(L, 2)) && (olua_is_string(L, 3)) && (olua_is_string(L, 4)) && (olua_is_enum(L, 5))) { // bool init(const std::string &normalImage, @optional const std::string &selectedImage, @optional const std::string &disableImage, @optional cocos2d::ui::Widget::TextureResType texType) - return _cocos2d_ui_Button_init$2(L); + return _olua_fun_cocos2d_ui_Button_init$2(L); // } } @@ -20512,7 +21349,7 @@ static int _cocos2d_ui_Button_init(lua_State *L) return 0; } -static int _cocos2d_ui_Button_isScale9Enabled(lua_State *L) +static int _olua_fun_cocos2d_ui_Button_isScale9Enabled(lua_State *L) { olua_startinvoke(L); @@ -20529,7 +21366,7 @@ static int _cocos2d_ui_Button_isScale9Enabled(lua_State *L) return num_ret; } -static int _cocos2d_ui_Button_loadTextureDisabled$1(lua_State *L) +static int _olua_fun_cocos2d_ui_Button_loadTextureDisabled$1(lua_State *L) { olua_startinvoke(L); @@ -20549,7 +21386,7 @@ static int _cocos2d_ui_Button_loadTextureDisabled$1(lua_State *L) return 0; } -static int _cocos2d_ui_Button_loadTextureDisabled$2(lua_State *L) +static int _olua_fun_cocos2d_ui_Button_loadTextureDisabled$2(lua_State *L) { olua_startinvoke(L); @@ -20559,7 +21396,7 @@ static int _cocos2d_ui_Button_loadTextureDisabled$2(lua_State *L) olua_to_object(L, 1, &self, "ccui.Button"); olua_check_string(L, 2, &arg1); - // void loadTextureDisabled(const std::string &disabled, @optional cocos2d::ui::Widget::TextureResType texType) + // void loadTextureDisabled(const std::string &disabled) self->loadTextureDisabled(arg1); olua_endinvoke(L); @@ -20567,21 +21404,21 @@ static int _cocos2d_ui_Button_loadTextureDisabled$2(lua_State *L) return 0; } -static int _cocos2d_ui_Button_loadTextureDisabled(lua_State *L) +static int _olua_fun_cocos2d_ui_Button_loadTextureDisabled(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_string(L, 2))) { - // void loadTextureDisabled(const std::string &disabled, @optional cocos2d::ui::Widget::TextureResType texType) - return _cocos2d_ui_Button_loadTextureDisabled$2(L); + // void loadTextureDisabled(const std::string &disabled) + return _olua_fun_cocos2d_ui_Button_loadTextureDisabled$2(L); // } } if (num_args == 2) { // if ((olua_is_string(L, 2)) && (olua_is_enum(L, 3))) { // void loadTextureDisabled(const std::string &disabled, @optional cocos2d::ui::Widget::TextureResType texType) - return _cocos2d_ui_Button_loadTextureDisabled$1(L); + return _olua_fun_cocos2d_ui_Button_loadTextureDisabled$1(L); // } } @@ -20590,7 +21427,7 @@ static int _cocos2d_ui_Button_loadTextureDisabled(lua_State *L) return 0; } -static int _cocos2d_ui_Button_loadTextureNormal$1(lua_State *L) +static int _olua_fun_cocos2d_ui_Button_loadTextureNormal$1(lua_State *L) { olua_startinvoke(L); @@ -20610,7 +21447,7 @@ static int _cocos2d_ui_Button_loadTextureNormal$1(lua_State *L) return 0; } -static int _cocos2d_ui_Button_loadTextureNormal$2(lua_State *L) +static int _olua_fun_cocos2d_ui_Button_loadTextureNormal$2(lua_State *L) { olua_startinvoke(L); @@ -20620,7 +21457,7 @@ static int _cocos2d_ui_Button_loadTextureNormal$2(lua_State *L) olua_to_object(L, 1, &self, "ccui.Button"); olua_check_string(L, 2, &arg1); - // void loadTextureNormal(const std::string &normal, @optional cocos2d::ui::Widget::TextureResType texType) + // void loadTextureNormal(const std::string &normal) self->loadTextureNormal(arg1); olua_endinvoke(L); @@ -20628,21 +21465,21 @@ static int _cocos2d_ui_Button_loadTextureNormal$2(lua_State *L) return 0; } -static int _cocos2d_ui_Button_loadTextureNormal(lua_State *L) +static int _olua_fun_cocos2d_ui_Button_loadTextureNormal(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_string(L, 2))) { - // void loadTextureNormal(const std::string &normal, @optional cocos2d::ui::Widget::TextureResType texType) - return _cocos2d_ui_Button_loadTextureNormal$2(L); + // void loadTextureNormal(const std::string &normal) + return _olua_fun_cocos2d_ui_Button_loadTextureNormal$2(L); // } } if (num_args == 2) { // if ((olua_is_string(L, 2)) && (olua_is_enum(L, 3))) { // void loadTextureNormal(const std::string &normal, @optional cocos2d::ui::Widget::TextureResType texType) - return _cocos2d_ui_Button_loadTextureNormal$1(L); + return _olua_fun_cocos2d_ui_Button_loadTextureNormal$1(L); // } } @@ -20651,7 +21488,7 @@ static int _cocos2d_ui_Button_loadTextureNormal(lua_State *L) return 0; } -static int _cocos2d_ui_Button_loadTexturePressed$1(lua_State *L) +static int _olua_fun_cocos2d_ui_Button_loadTexturePressed$1(lua_State *L) { olua_startinvoke(L); @@ -20671,7 +21508,7 @@ static int _cocos2d_ui_Button_loadTexturePressed$1(lua_State *L) return 0; } -static int _cocos2d_ui_Button_loadTexturePressed$2(lua_State *L) +static int _olua_fun_cocos2d_ui_Button_loadTexturePressed$2(lua_State *L) { olua_startinvoke(L); @@ -20681,7 +21518,7 @@ static int _cocos2d_ui_Button_loadTexturePressed$2(lua_State *L) olua_to_object(L, 1, &self, "ccui.Button"); olua_check_string(L, 2, &arg1); - // void loadTexturePressed(const std::string &selected, @optional cocos2d::ui::Widget::TextureResType texType) + // void loadTexturePressed(const std::string &selected) self->loadTexturePressed(arg1); olua_endinvoke(L); @@ -20689,21 +21526,21 @@ static int _cocos2d_ui_Button_loadTexturePressed$2(lua_State *L) return 0; } -static int _cocos2d_ui_Button_loadTexturePressed(lua_State *L) +static int _olua_fun_cocos2d_ui_Button_loadTexturePressed(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_string(L, 2))) { - // void loadTexturePressed(const std::string &selected, @optional cocos2d::ui::Widget::TextureResType texType) - return _cocos2d_ui_Button_loadTexturePressed$2(L); + // void loadTexturePressed(const std::string &selected) + return _olua_fun_cocos2d_ui_Button_loadTexturePressed$2(L); // } } if (num_args == 2) { // if ((olua_is_string(L, 2)) && (olua_is_enum(L, 3))) { // void loadTexturePressed(const std::string &selected, @optional cocos2d::ui::Widget::TextureResType texType) - return _cocos2d_ui_Button_loadTexturePressed$1(L); + return _olua_fun_cocos2d_ui_Button_loadTexturePressed$1(L); // } } @@ -20712,7 +21549,7 @@ static int _cocos2d_ui_Button_loadTexturePressed(lua_State *L) return 0; } -static int _cocos2d_ui_Button_loadTextures$1(lua_State *L) +static int _olua_fun_cocos2d_ui_Button_loadTextures$1(lua_State *L) { olua_startinvoke(L); @@ -20736,7 +21573,7 @@ static int _cocos2d_ui_Button_loadTextures$1(lua_State *L) return 0; } -static int _cocos2d_ui_Button_loadTextures$2(lua_State *L) +static int _olua_fun_cocos2d_ui_Button_loadTextures$2(lua_State *L) { olua_startinvoke(L); @@ -20748,7 +21585,7 @@ static int _cocos2d_ui_Button_loadTextures$2(lua_State *L) olua_check_string(L, 2, &arg1); olua_check_string(L, 3, &arg2); - // void loadTextures(const std::string &normal, const std::string &selected, @optional const std::string &disabled, @optional cocos2d::ui::Widget::TextureResType texType) + // void loadTextures(const std::string &normal, const std::string &selected) self->loadTextures(arg1, arg2); olua_endinvoke(L); @@ -20756,7 +21593,7 @@ static int _cocos2d_ui_Button_loadTextures$2(lua_State *L) return 0; } -static int _cocos2d_ui_Button_loadTextures$3(lua_State *L) +static int _olua_fun_cocos2d_ui_Button_loadTextures$3(lua_State *L) { olua_startinvoke(L); @@ -20770,7 +21607,7 @@ static int _cocos2d_ui_Button_loadTextures$3(lua_State *L) olua_check_string(L, 3, &arg2); olua_check_string(L, 4, &arg3); - // void loadTextures(const std::string &normal, const std::string &selected, @optional const std::string &disabled, @optional cocos2d::ui::Widget::TextureResType texType) + // void loadTextures(const std::string &normal, const std::string &selected, @optional const std::string &disabled) self->loadTextures(arg1, arg2, arg3); olua_endinvoke(L); @@ -20778,28 +21615,28 @@ static int _cocos2d_ui_Button_loadTextures$3(lua_State *L) return 0; } -static int _cocos2d_ui_Button_loadTextures(lua_State *L) +static int _olua_fun_cocos2d_ui_Button_loadTextures(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 2) { // if ((olua_is_string(L, 2)) && (olua_is_string(L, 3))) { - // void loadTextures(const std::string &normal, const std::string &selected, @optional const std::string &disabled, @optional cocos2d::ui::Widget::TextureResType texType) - return _cocos2d_ui_Button_loadTextures$2(L); + // void loadTextures(const std::string &normal, const std::string &selected) + return _olua_fun_cocos2d_ui_Button_loadTextures$2(L); // } } if (num_args == 3) { // if ((olua_is_string(L, 2)) && (olua_is_string(L, 3)) && (olua_is_string(L, 4))) { - // void loadTextures(const std::string &normal, const std::string &selected, @optional const std::string &disabled, @optional cocos2d::ui::Widget::TextureResType texType) - return _cocos2d_ui_Button_loadTextures$3(L); + // void loadTextures(const std::string &normal, const std::string &selected, @optional const std::string &disabled) + return _olua_fun_cocos2d_ui_Button_loadTextures$3(L); // } } if (num_args == 4) { // if ((olua_is_string(L, 2)) && (olua_is_string(L, 3)) && (olua_is_string(L, 4)) && (olua_is_enum(L, 5))) { // void loadTextures(const std::string &normal, const std::string &selected, @optional const std::string &disabled, @optional cocos2d::ui::Widget::TextureResType texType) - return _cocos2d_ui_Button_loadTextures$1(L); + return _olua_fun_cocos2d_ui_Button_loadTextures$1(L); // } } @@ -20808,11 +21645,11 @@ static int _cocos2d_ui_Button_loadTextures(lua_State *L) return 0; } -static int _cocos2d_ui_Button_new(lua_State *L) +static int _olua_fun_cocos2d_ui_Button_new(lua_State *L) { olua_startinvoke(L); - // Button() + // cocos2d::ui::Button() cocos2d::ui::Button *ret = new cocos2d::ui::Button(); int num_ret = olua_push_object(L, ret, "ccui.Button"); olua_postnew(L, ret); @@ -20822,7 +21659,7 @@ static int _cocos2d_ui_Button_new(lua_State *L) return num_ret; } -static int _cocos2d_ui_Button_resetDisabledRender(lua_State *L) +static int _olua_fun_cocos2d_ui_Button_resetDisabledRender(lua_State *L) { olua_startinvoke(L); @@ -20838,7 +21675,7 @@ static int _cocos2d_ui_Button_resetDisabledRender(lua_State *L) return 0; } -static int _cocos2d_ui_Button_resetNormalRender(lua_State *L) +static int _olua_fun_cocos2d_ui_Button_resetNormalRender(lua_State *L) { olua_startinvoke(L); @@ -20854,7 +21691,7 @@ static int _cocos2d_ui_Button_resetNormalRender(lua_State *L) return 0; } -static int _cocos2d_ui_Button_resetPressedRender(lua_State *L) +static int _olua_fun_cocos2d_ui_Button_resetPressedRender(lua_State *L) { olua_startinvoke(L); @@ -20870,79 +21707,79 @@ static int _cocos2d_ui_Button_resetPressedRender(lua_State *L) return 0; } -static int _cocos2d_ui_Button_setCapInsets(lua_State *L) +static int _olua_fun_cocos2d_ui_Button_setCapInsets(lua_State *L) { olua_startinvoke(L); cocos2d::ui::Button *self = nullptr; - cocos2d::Rect arg1; /** capInsets */ + cocos2d::Rect *arg1; /** capInsets */ olua_to_object(L, 1, &self, "ccui.Button"); olua_check_object(L, 2, &arg1, "cc.Rect"); // void setCapInsets(const cocos2d::Rect &capInsets) - self->setCapInsets(arg1); + self->setCapInsets(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_ui_Button_setCapInsetsDisabledRenderer(lua_State *L) +static int _olua_fun_cocos2d_ui_Button_setCapInsetsDisabledRenderer(lua_State *L) { olua_startinvoke(L); cocos2d::ui::Button *self = nullptr; - cocos2d::Rect arg1; /** capInsets */ + cocos2d::Rect *arg1; /** capInsets */ olua_to_object(L, 1, &self, "ccui.Button"); olua_check_object(L, 2, &arg1, "cc.Rect"); // void setCapInsetsDisabledRenderer(const cocos2d::Rect &capInsets) - self->setCapInsetsDisabledRenderer(arg1); + self->setCapInsetsDisabledRenderer(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_ui_Button_setCapInsetsNormalRenderer(lua_State *L) +static int _olua_fun_cocos2d_ui_Button_setCapInsetsNormalRenderer(lua_State *L) { olua_startinvoke(L); cocos2d::ui::Button *self = nullptr; - cocos2d::Rect arg1; /** capInsets */ + cocos2d::Rect *arg1; /** capInsets */ olua_to_object(L, 1, &self, "ccui.Button"); olua_check_object(L, 2, &arg1, "cc.Rect"); // void setCapInsetsNormalRenderer(const cocos2d::Rect &capInsets) - self->setCapInsetsNormalRenderer(arg1); + self->setCapInsetsNormalRenderer(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_ui_Button_setCapInsetsPressedRenderer(lua_State *L) +static int _olua_fun_cocos2d_ui_Button_setCapInsetsPressedRenderer(lua_State *L) { olua_startinvoke(L); cocos2d::ui::Button *self = nullptr; - cocos2d::Rect arg1; /** capInsets */ + cocos2d::Rect *arg1; /** capInsets */ olua_to_object(L, 1, &self, "ccui.Button"); olua_check_object(L, 2, &arg1, "cc.Rect"); // void setCapInsetsPressedRenderer(const cocos2d::Rect &capInsets) - self->setCapInsetsPressedRenderer(arg1); + self->setCapInsetsPressedRenderer(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_ui_Button_setPressedActionEnabled(lua_State *L) +static int _olua_fun_cocos2d_ui_Button_setPressedActionEnabled(lua_State *L) { olua_startinvoke(L); @@ -20960,7 +21797,7 @@ static int _cocos2d_ui_Button_setPressedActionEnabled(lua_State *L) return 0; } -static int _cocos2d_ui_Button_setScale9Enabled(lua_State *L) +static int _olua_fun_cocos2d_ui_Button_setScale9Enabled(lua_State *L) { olua_startinvoke(L); @@ -20978,7 +21815,7 @@ static int _cocos2d_ui_Button_setScale9Enabled(lua_State *L) return 0; } -static int _cocos2d_ui_Button_setTitleAlignment$1(lua_State *L) +static int _olua_fun_cocos2d_ui_Button_setTitleAlignment$1(lua_State *L) { olua_startinvoke(L); @@ -20996,7 +21833,7 @@ static int _cocos2d_ui_Button_setTitleAlignment$1(lua_State *L) return 0; } -static int _cocos2d_ui_Button_setTitleAlignment$2(lua_State *L) +static int _olua_fun_cocos2d_ui_Button_setTitleAlignment$2(lua_State *L) { olua_startinvoke(L); @@ -21016,21 +21853,21 @@ static int _cocos2d_ui_Button_setTitleAlignment$2(lua_State *L) return 0; } -static int _cocos2d_ui_Button_setTitleAlignment(lua_State *L) +static int _olua_fun_cocos2d_ui_Button_setTitleAlignment(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_enum(L, 2))) { // void setTitleAlignment(cocos2d::TextHAlignment hAlignment) - return _cocos2d_ui_Button_setTitleAlignment$1(L); + return _olua_fun_cocos2d_ui_Button_setTitleAlignment$1(L); // } } if (num_args == 2) { // if ((olua_is_enum(L, 2)) && (olua_is_enum(L, 3))) { // void setTitleAlignment(cocos2d::TextHAlignment hAlignment, cocos2d::TextVAlignment vAlignment) - return _cocos2d_ui_Button_setTitleAlignment$2(L); + return _olua_fun_cocos2d_ui_Button_setTitleAlignment$2(L); // } } @@ -21039,7 +21876,7 @@ static int _cocos2d_ui_Button_setTitleAlignment(lua_State *L) return 0; } -static int _cocos2d_ui_Button_setTitleColor(lua_State *L) +static int _olua_fun_cocos2d_ui_Button_setTitleColor(lua_State *L) { olua_startinvoke(L); @@ -21057,7 +21894,7 @@ static int _cocos2d_ui_Button_setTitleColor(lua_State *L) return 0; } -static int _cocos2d_ui_Button_setTitleFontName(lua_State *L) +static int _olua_fun_cocos2d_ui_Button_setTitleFontName(lua_State *L) { olua_startinvoke(L); @@ -21075,7 +21912,7 @@ static int _cocos2d_ui_Button_setTitleFontName(lua_State *L) return 0; } -static int _cocos2d_ui_Button_setTitleFontSize(lua_State *L) +static int _olua_fun_cocos2d_ui_Button_setTitleFontSize(lua_State *L) { olua_startinvoke(L); @@ -21093,7 +21930,7 @@ static int _cocos2d_ui_Button_setTitleFontSize(lua_State *L) return 0; } -static int _cocos2d_ui_Button_setTitleLabel(lua_State *L) +static int _olua_fun_cocos2d_ui_Button_setTitleLabel(lua_State *L) { olua_startinvoke(L); @@ -21114,7 +21951,7 @@ static int _cocos2d_ui_Button_setTitleLabel(lua_State *L) return 0; } -static int _cocos2d_ui_Button_setTitleText(lua_State *L) +static int _olua_fun_cocos2d_ui_Button_setTitleText(lua_State *L) { olua_startinvoke(L); @@ -21132,7 +21969,7 @@ static int _cocos2d_ui_Button_setTitleText(lua_State *L) return 0; } -static int _cocos2d_ui_Button_setZoomScale(lua_State *L) +static int _olua_fun_cocos2d_ui_Button_setZoomScale(lua_State *L) { olua_startinvoke(L); @@ -21150,77 +21987,85 @@ static int _cocos2d_ui_Button_setZoomScale(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ui_Button(lua_State *L) +static int _olua_cls_ccui_Button(lua_State *L) { oluacls_class(L, "ccui.Button"); - oluacls_func(L, "create", _cocos2d_ui_Button_create); - oluacls_func(L, "createInstance", _cocos2d_ui_Button_createInstance); - oluacls_func(L, "getCapInsetsDisabledRenderer", _cocos2d_ui_Button_getCapInsetsDisabledRenderer); - oluacls_func(L, "getCapInsetsNormalRenderer", _cocos2d_ui_Button_getCapInsetsNormalRenderer); - oluacls_func(L, "getCapInsetsPressedRenderer", _cocos2d_ui_Button_getCapInsetsPressedRenderer); - oluacls_func(L, "getDisabledFile", _cocos2d_ui_Button_getDisabledFile); - oluacls_func(L, "getNormalFile", _cocos2d_ui_Button_getNormalFile); - oluacls_func(L, "getNormalTextureSize", _cocos2d_ui_Button_getNormalTextureSize); - oluacls_func(L, "getPressedFile", _cocos2d_ui_Button_getPressedFile); - oluacls_func(L, "getRendererClicked", _cocos2d_ui_Button_getRendererClicked); - oluacls_func(L, "getRendererDisabled", _cocos2d_ui_Button_getRendererDisabled); - oluacls_func(L, "getRendererNormal", _cocos2d_ui_Button_getRendererNormal); - oluacls_func(L, "getTitleColor", _cocos2d_ui_Button_getTitleColor); - oluacls_func(L, "getTitleFontName", _cocos2d_ui_Button_getTitleFontName); - oluacls_func(L, "getTitleFontSize", _cocos2d_ui_Button_getTitleFontSize); - oluacls_func(L, "getTitleLabel", _cocos2d_ui_Button_getTitleLabel); - oluacls_func(L, "getTitleRenderer", _cocos2d_ui_Button_getTitleRenderer); - oluacls_func(L, "getTitleText", _cocos2d_ui_Button_getTitleText); - oluacls_func(L, "getZoomScale", _cocos2d_ui_Button_getZoomScale); - oluacls_func(L, "init", _cocos2d_ui_Button_init); - oluacls_func(L, "isScale9Enabled", _cocos2d_ui_Button_isScale9Enabled); - oluacls_func(L, "loadTextureDisabled", _cocos2d_ui_Button_loadTextureDisabled); - oluacls_func(L, "loadTextureNormal", _cocos2d_ui_Button_loadTextureNormal); - oluacls_func(L, "loadTexturePressed", _cocos2d_ui_Button_loadTexturePressed); - oluacls_func(L, "loadTextures", _cocos2d_ui_Button_loadTextures); - oluacls_func(L, "new", _cocos2d_ui_Button_new); - oluacls_func(L, "resetDisabledRender", _cocos2d_ui_Button_resetDisabledRender); - oluacls_func(L, "resetNormalRender", _cocos2d_ui_Button_resetNormalRender); - oluacls_func(L, "resetPressedRender", _cocos2d_ui_Button_resetPressedRender); - oluacls_func(L, "setCapInsets", _cocos2d_ui_Button_setCapInsets); - oluacls_func(L, "setCapInsetsDisabledRenderer", _cocos2d_ui_Button_setCapInsetsDisabledRenderer); - oluacls_func(L, "setCapInsetsNormalRenderer", _cocos2d_ui_Button_setCapInsetsNormalRenderer); - oluacls_func(L, "setCapInsetsPressedRenderer", _cocos2d_ui_Button_setCapInsetsPressedRenderer); - oluacls_func(L, "setPressedActionEnabled", _cocos2d_ui_Button_setPressedActionEnabled); - oluacls_func(L, "setScale9Enabled", _cocos2d_ui_Button_setScale9Enabled); - oluacls_func(L, "setTitleAlignment", _cocos2d_ui_Button_setTitleAlignment); - oluacls_func(L, "setTitleColor", _cocos2d_ui_Button_setTitleColor); - oluacls_func(L, "setTitleFontName", _cocos2d_ui_Button_setTitleFontName); - oluacls_func(L, "setTitleFontSize", _cocos2d_ui_Button_setTitleFontSize); - oluacls_func(L, "setTitleLabel", _cocos2d_ui_Button_setTitleLabel); - oluacls_func(L, "setTitleText", _cocos2d_ui_Button_setTitleText); - oluacls_func(L, "setZoomScale", _cocos2d_ui_Button_setZoomScale); - oluacls_prop(L, "capInsetsDisabledRenderer", _cocos2d_ui_Button_getCapInsetsDisabledRenderer, _cocos2d_ui_Button_setCapInsetsDisabledRenderer); - oluacls_prop(L, "capInsetsNormalRenderer", _cocos2d_ui_Button_getCapInsetsNormalRenderer, _cocos2d_ui_Button_setCapInsetsNormalRenderer); - oluacls_prop(L, "capInsetsPressedRenderer", _cocos2d_ui_Button_getCapInsetsPressedRenderer, _cocos2d_ui_Button_setCapInsetsPressedRenderer); - oluacls_prop(L, "disabledFile", _cocos2d_ui_Button_getDisabledFile, nullptr); - oluacls_prop(L, "normalFile", _cocos2d_ui_Button_getNormalFile, nullptr); - oluacls_prop(L, "normalTextureSize", _cocos2d_ui_Button_getNormalTextureSize, nullptr); - oluacls_prop(L, "pressedFile", _cocos2d_ui_Button_getPressedFile, nullptr); - oluacls_prop(L, "rendererClicked", _cocos2d_ui_Button_getRendererClicked, nullptr); - oluacls_prop(L, "rendererDisabled", _cocos2d_ui_Button_getRendererDisabled, nullptr); - oluacls_prop(L, "rendererNormal", _cocos2d_ui_Button_getRendererNormal, nullptr); - oluacls_prop(L, "scale9Enabled", _cocos2d_ui_Button_isScale9Enabled, _cocos2d_ui_Button_setScale9Enabled); - oluacls_prop(L, "titleColor", _cocos2d_ui_Button_getTitleColor, _cocos2d_ui_Button_setTitleColor); - oluacls_prop(L, "titleFontName", _cocos2d_ui_Button_getTitleFontName, _cocos2d_ui_Button_setTitleFontName); - oluacls_prop(L, "titleFontSize", _cocos2d_ui_Button_getTitleFontSize, _cocos2d_ui_Button_setTitleFontSize); - oluacls_prop(L, "titleLabel", _cocos2d_ui_Button_getTitleLabel, _cocos2d_ui_Button_setTitleLabel); - oluacls_prop(L, "titleRenderer", _cocos2d_ui_Button_getTitleRenderer, nullptr); - oluacls_prop(L, "titleText", _cocos2d_ui_Button_getTitleText, _cocos2d_ui_Button_setTitleText); - oluacls_prop(L, "zoomScale", _cocos2d_ui_Button_getZoomScale, _cocos2d_ui_Button_setZoomScale); + oluacls_func(L, "create", _olua_fun_cocos2d_ui_Button_create); + oluacls_func(L, "createInstance", _olua_fun_cocos2d_ui_Button_createInstance); + oluacls_func(L, "getCapInsetsDisabledRenderer", _olua_fun_cocos2d_ui_Button_getCapInsetsDisabledRenderer); + oluacls_func(L, "getCapInsetsNormalRenderer", _olua_fun_cocos2d_ui_Button_getCapInsetsNormalRenderer); + oluacls_func(L, "getCapInsetsPressedRenderer", _olua_fun_cocos2d_ui_Button_getCapInsetsPressedRenderer); + oluacls_func(L, "getDisabledFile", _olua_fun_cocos2d_ui_Button_getDisabledFile); + oluacls_func(L, "getNormalFile", _olua_fun_cocos2d_ui_Button_getNormalFile); + oluacls_func(L, "getNormalTextureSize", _olua_fun_cocos2d_ui_Button_getNormalTextureSize); + oluacls_func(L, "getPressedFile", _olua_fun_cocos2d_ui_Button_getPressedFile); + oluacls_func(L, "getRendererClicked", _olua_fun_cocos2d_ui_Button_getRendererClicked); + oluacls_func(L, "getRendererDisabled", _olua_fun_cocos2d_ui_Button_getRendererDisabled); + oluacls_func(L, "getRendererNormal", _olua_fun_cocos2d_ui_Button_getRendererNormal); + oluacls_func(L, "getTitleColor", _olua_fun_cocos2d_ui_Button_getTitleColor); + oluacls_func(L, "getTitleFontName", _olua_fun_cocos2d_ui_Button_getTitleFontName); + oluacls_func(L, "getTitleFontSize", _olua_fun_cocos2d_ui_Button_getTitleFontSize); + oluacls_func(L, "getTitleLabel", _olua_fun_cocos2d_ui_Button_getTitleLabel); + oluacls_func(L, "getTitleRenderer", _olua_fun_cocos2d_ui_Button_getTitleRenderer); + oluacls_func(L, "getTitleText", _olua_fun_cocos2d_ui_Button_getTitleText); + oluacls_func(L, "getZoomScale", _olua_fun_cocos2d_ui_Button_getZoomScale); + oluacls_func(L, "init", _olua_fun_cocos2d_ui_Button_init); + oluacls_func(L, "isScale9Enabled", _olua_fun_cocos2d_ui_Button_isScale9Enabled); + oluacls_func(L, "loadTextureDisabled", _olua_fun_cocos2d_ui_Button_loadTextureDisabled); + oluacls_func(L, "loadTextureNormal", _olua_fun_cocos2d_ui_Button_loadTextureNormal); + oluacls_func(L, "loadTexturePressed", _olua_fun_cocos2d_ui_Button_loadTexturePressed); + oluacls_func(L, "loadTextures", _olua_fun_cocos2d_ui_Button_loadTextures); + oluacls_func(L, "new", _olua_fun_cocos2d_ui_Button_new); + oluacls_func(L, "resetDisabledRender", _olua_fun_cocos2d_ui_Button_resetDisabledRender); + oluacls_func(L, "resetNormalRender", _olua_fun_cocos2d_ui_Button_resetNormalRender); + oluacls_func(L, "resetPressedRender", _olua_fun_cocos2d_ui_Button_resetPressedRender); + oluacls_func(L, "setCapInsets", _olua_fun_cocos2d_ui_Button_setCapInsets); + oluacls_func(L, "setCapInsetsDisabledRenderer", _olua_fun_cocos2d_ui_Button_setCapInsetsDisabledRenderer); + oluacls_func(L, "setCapInsetsNormalRenderer", _olua_fun_cocos2d_ui_Button_setCapInsetsNormalRenderer); + oluacls_func(L, "setCapInsetsPressedRenderer", _olua_fun_cocos2d_ui_Button_setCapInsetsPressedRenderer); + oluacls_func(L, "setPressedActionEnabled", _olua_fun_cocos2d_ui_Button_setPressedActionEnabled); + oluacls_func(L, "setScale9Enabled", _olua_fun_cocos2d_ui_Button_setScale9Enabled); + oluacls_func(L, "setTitleAlignment", _olua_fun_cocos2d_ui_Button_setTitleAlignment); + oluacls_func(L, "setTitleColor", _olua_fun_cocos2d_ui_Button_setTitleColor); + oluacls_func(L, "setTitleFontName", _olua_fun_cocos2d_ui_Button_setTitleFontName); + oluacls_func(L, "setTitleFontSize", _olua_fun_cocos2d_ui_Button_setTitleFontSize); + oluacls_func(L, "setTitleLabel", _olua_fun_cocos2d_ui_Button_setTitleLabel); + oluacls_func(L, "setTitleText", _olua_fun_cocos2d_ui_Button_setTitleText); + oluacls_func(L, "setZoomScale", _olua_fun_cocos2d_ui_Button_setZoomScale); + oluacls_prop(L, "capInsetsDisabledRenderer", _olua_fun_cocos2d_ui_Button_getCapInsetsDisabledRenderer, _olua_fun_cocos2d_ui_Button_setCapInsetsDisabledRenderer); + oluacls_prop(L, "capInsetsNormalRenderer", _olua_fun_cocos2d_ui_Button_getCapInsetsNormalRenderer, _olua_fun_cocos2d_ui_Button_setCapInsetsNormalRenderer); + oluacls_prop(L, "capInsetsPressedRenderer", _olua_fun_cocos2d_ui_Button_getCapInsetsPressedRenderer, _olua_fun_cocos2d_ui_Button_setCapInsetsPressedRenderer); + oluacls_prop(L, "disabledFile", _olua_fun_cocos2d_ui_Button_getDisabledFile, nullptr); + oluacls_prop(L, "normalFile", _olua_fun_cocos2d_ui_Button_getNormalFile, nullptr); + oluacls_prop(L, "normalTextureSize", _olua_fun_cocos2d_ui_Button_getNormalTextureSize, nullptr); + oluacls_prop(L, "pressedFile", _olua_fun_cocos2d_ui_Button_getPressedFile, nullptr); + oluacls_prop(L, "rendererClicked", _olua_fun_cocos2d_ui_Button_getRendererClicked, nullptr); + oluacls_prop(L, "rendererDisabled", _olua_fun_cocos2d_ui_Button_getRendererDisabled, nullptr); + oluacls_prop(L, "rendererNormal", _olua_fun_cocos2d_ui_Button_getRendererNormal, nullptr); + oluacls_prop(L, "scale9Enabled", _olua_fun_cocos2d_ui_Button_isScale9Enabled, _olua_fun_cocos2d_ui_Button_setScale9Enabled); + oluacls_prop(L, "titleColor", _olua_fun_cocos2d_ui_Button_getTitleColor, _olua_fun_cocos2d_ui_Button_setTitleColor); + oluacls_prop(L, "titleFontName", _olua_fun_cocos2d_ui_Button_getTitleFontName, _olua_fun_cocos2d_ui_Button_setTitleFontName); + oluacls_prop(L, "titleFontSize", _olua_fun_cocos2d_ui_Button_getTitleFontSize, _olua_fun_cocos2d_ui_Button_setTitleFontSize); + oluacls_prop(L, "titleLabel", _olua_fun_cocos2d_ui_Button_getTitleLabel, _olua_fun_cocos2d_ui_Button_setTitleLabel); + oluacls_prop(L, "titleRenderer", _olua_fun_cocos2d_ui_Button_getTitleRenderer, nullptr); + oluacls_prop(L, "titleText", _olua_fun_cocos2d_ui_Button_getTitleText, _olua_fun_cocos2d_ui_Button_setTitleText); + oluacls_prop(L, "zoomScale", _olua_fun_cocos2d_ui_Button_getZoomScale, _olua_fun_cocos2d_ui_Button_setZoomScale); return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ui_CheckBox_EventType(lua_State *L) +OLUA_LIB int luaopen_ccui_Button(lua_State *L) +{ + olua_require(L, "cocos2d_ui", luaopen_cocos2d_ui); + if (!olua_getclass(L, "ccui.Button")) { + luaL_error(L, "class not found: cocos2d::ui::Button"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_ccui_CheckBox_EventType(lua_State *L) { oluacls_class(L, "ccui.CheckBox.EventType"); oluacls_func(L, "__index", olua_indexerror); @@ -21230,9 +22075,19 @@ OLUA_LIB int luaopen_cocos2d_ui_CheckBox_EventType(lua_State *L) return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccui_CheckBox_EventType(lua_State *L) +{ + olua_require(L, "cocos2d_ui", luaopen_cocos2d_ui); + if (!olua_getclass(L, "ccui.CheckBox.EventType")) { + luaL_error(L, "class not found: cocos2d::ui::CheckBox::EventType"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_ui_CheckBox_ccCheckBoxCallback___call(lua_State *L) +static int _olua_fun_cocos2d_ui_CheckBox_ccCheckBoxCallback___call(lua_State *L) { olua_startinvoke(L); @@ -21244,17 +22099,26 @@ static int _cocos2d_ui_CheckBox_ccCheckBoxCallback___call(lua_State *L) return 1; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ui_CheckBox_ccCheckBoxCallback(lua_State *L) +static int _olua_cls_ccui_CheckBox_ccCheckBoxCallback(lua_State *L) { oluacls_class(L, "ccui.CheckBox.ccCheckBoxCallback"); - oluacls_func(L, "__call", _cocos2d_ui_CheckBox_ccCheckBoxCallback___call); + oluacls_func(L, "__call", _olua_fun_cocos2d_ui_CheckBox_ccCheckBoxCallback___call); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccui_CheckBox_ccCheckBoxCallback(lua_State *L) +{ + olua_require(L, "cocos2d_ui", luaopen_cocos2d_ui); + if (!olua_getclass(L, "ccui.CheckBox.ccCheckBoxCallback")) { + luaL_error(L, "class not found: cocos2d::ui::CheckBox::ccCheckBoxCallback"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_ui_CheckBox_addEventListener(lua_State *L) +static int _olua_fun_cocos2d_ui_CheckBox_addEventListener(lua_State *L) { olua_startinvoke(L); @@ -21266,16 +22130,17 @@ static int _cocos2d_ui_CheckBox_addEventListener(lua_State *L) void *cb_store = (void *)self; std::string cb_tag = "checkBoxCallback"; - std::string cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + std::string cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](cocos2d::Ref *arg1, cocos2d::ui::CheckBox::EventType arg2) { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](cocos2d::Ref *cb_arg1, cocos2d::ui::CheckBox::EventType cb_arg2) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); if (olua_contextequal(L, cb_ctx)) { int top = lua_gettop(L); - olua_push_object(L, arg1, "cc.Ref"); - olua_push_enum(L, arg2); + olua_push_object(L, cb_arg1, "cc.Ref"); + olua_push_enum(L, cb_arg2); olua_callback(L, cb_store, cb_name.c_str(), 2); @@ -21291,7 +22156,7 @@ static int _cocos2d_ui_CheckBox_addEventListener(lua_State *L) return 0; } -static int _cocos2d_ui_CheckBox_create$1(lua_State *L) +static int _olua_fun_cocos2d_ui_CheckBox_create$1(lua_State *L) { olua_startinvoke(L); @@ -21304,7 +22169,7 @@ static int _cocos2d_ui_CheckBox_create$1(lua_State *L) return num_ret; } -static int _cocos2d_ui_CheckBox_create$2(lua_State *L) +static int _olua_fun_cocos2d_ui_CheckBox_create$2(lua_State *L) { olua_startinvoke(L); @@ -21331,20 +22196,24 @@ static int _cocos2d_ui_CheckBox_create$2(lua_State *L) return num_ret; } -static int _cocos2d_ui_CheckBox_create$3(lua_State *L) +static int _olua_fun_cocos2d_ui_CheckBox_create$3(lua_State *L) { olua_startinvoke(L); std::string arg1; /** backGround */ - std::string arg2; /** cross */ - cocos2d::ui::Widget::TextureResType arg3 = (cocos2d::ui::Widget::TextureResType)0; /** texType */ + std::string arg2; /** backGroundSelected */ + std::string arg3; /** cross */ + std::string arg4; /** backGroundDisabled */ + std::string arg5; /** frontCrossDisabled */ olua_check_string(L, 1, &arg1); olua_check_string(L, 2, &arg2); - olua_check_enum(L, 3, &arg3); + olua_check_string(L, 3, &arg3); + olua_check_string(L, 4, &arg4); + olua_check_string(L, 5, &arg5); - // static cocos2d::ui::CheckBox *create(const std::string &backGround, const std::string &cross, @optional cocos2d::ui::Widget::TextureResType texType) - cocos2d::ui::CheckBox *ret = cocos2d::ui::CheckBox::create(arg1, arg2, arg3); + // static cocos2d::ui::CheckBox *create(const std::string &backGround, const std::string &backGroundSelected, const std::string &cross, const std::string &backGroundDisabled, const std::string &frontCrossDisabled) + cocos2d::ui::CheckBox *ret = cocos2d::ui::CheckBox::create(arg1, arg2, arg3, arg4, arg5); int num_ret = olua_push_object(L, ret, "ccui.CheckBox"); olua_endinvoke(L); @@ -21352,24 +22221,20 @@ static int _cocos2d_ui_CheckBox_create$3(lua_State *L) return num_ret; } -static int _cocos2d_ui_CheckBox_create$4(lua_State *L) +static int _olua_fun_cocos2d_ui_CheckBox_create$4(lua_State *L) { olua_startinvoke(L); std::string arg1; /** backGround */ - std::string arg2; /** backGroundSelected */ - std::string arg3; /** cross */ - std::string arg4; /** backGroundDisabled */ - std::string arg5; /** frontCrossDisabled */ + std::string arg2; /** cross */ + cocos2d::ui::Widget::TextureResType arg3 = (cocos2d::ui::Widget::TextureResType)0; /** texType */ olua_check_string(L, 1, &arg1); olua_check_string(L, 2, &arg2); - olua_check_string(L, 3, &arg3); - olua_check_string(L, 4, &arg4); - olua_check_string(L, 5, &arg5); + olua_check_enum(L, 3, &arg3); - // static cocos2d::ui::CheckBox *create(const std::string &backGround, const std::string &backGroundSelected, const std::string &cross, const std::string &backGroundDisabled, const std::string &frontCrossDisabled, @optional cocos2d::ui::Widget::TextureResType texType) - cocos2d::ui::CheckBox *ret = cocos2d::ui::CheckBox::create(arg1, arg2, arg3, arg4, arg5); + // static cocos2d::ui::CheckBox *create(const std::string &backGround, const std::string &cross, @optional cocos2d::ui::Widget::TextureResType texType) + cocos2d::ui::CheckBox *ret = cocos2d::ui::CheckBox::create(arg1, arg2, arg3); int num_ret = olua_push_object(L, ret, "ccui.CheckBox"); olua_endinvoke(L); @@ -21377,7 +22242,7 @@ static int _cocos2d_ui_CheckBox_create$4(lua_State *L) return num_ret; } -static int _cocos2d_ui_CheckBox_create$5(lua_State *L) +static int _olua_fun_cocos2d_ui_CheckBox_create$5(lua_State *L) { olua_startinvoke(L); @@ -21387,7 +22252,7 @@ static int _cocos2d_ui_CheckBox_create$5(lua_State *L) olua_check_string(L, 1, &arg1); olua_check_string(L, 2, &arg2); - // static cocos2d::ui::CheckBox *create(const std::string &backGround, const std::string &cross, @optional cocos2d::ui::Widget::TextureResType texType) + // static cocos2d::ui::CheckBox *create(const std::string &backGround, const std::string &cross) cocos2d::ui::CheckBox *ret = cocos2d::ui::CheckBox::create(arg1, arg2); int num_ret = olua_push_object(L, ret, "ccui.CheckBox"); @@ -21396,40 +22261,40 @@ static int _cocos2d_ui_CheckBox_create$5(lua_State *L) return num_ret; } -static int _cocos2d_ui_CheckBox_create(lua_State *L) +static int _olua_fun_cocos2d_ui_CheckBox_create(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 0) { // static cocos2d::ui::CheckBox *create() - return _cocos2d_ui_CheckBox_create$1(L); + return _olua_fun_cocos2d_ui_CheckBox_create$1(L); } if (num_args == 2) { // if ((olua_is_string(L, 1)) && (olua_is_string(L, 2))) { - // static cocos2d::ui::CheckBox *create(const std::string &backGround, const std::string &cross, @optional cocos2d::ui::Widget::TextureResType texType) - return _cocos2d_ui_CheckBox_create$5(L); + // static cocos2d::ui::CheckBox *create(const std::string &backGround, const std::string &cross) + return _olua_fun_cocos2d_ui_CheckBox_create$5(L); // } } if (num_args == 3) { // if ((olua_is_string(L, 1)) && (olua_is_string(L, 2)) && (olua_is_enum(L, 3))) { // static cocos2d::ui::CheckBox *create(const std::string &backGround, const std::string &cross, @optional cocos2d::ui::Widget::TextureResType texType) - return _cocos2d_ui_CheckBox_create$3(L); + return _olua_fun_cocos2d_ui_CheckBox_create$4(L); // } } if (num_args == 5) { // if ((olua_is_string(L, 1)) && (olua_is_string(L, 2)) && (olua_is_string(L, 3)) && (olua_is_string(L, 4)) && (olua_is_string(L, 5))) { - // static cocos2d::ui::CheckBox *create(const std::string &backGround, const std::string &backGroundSelected, const std::string &cross, const std::string &backGroundDisabled, const std::string &frontCrossDisabled, @optional cocos2d::ui::Widget::TextureResType texType) - return _cocos2d_ui_CheckBox_create$4(L); + // static cocos2d::ui::CheckBox *create(const std::string &backGround, const std::string &backGroundSelected, const std::string &cross, const std::string &backGroundDisabled, const std::string &frontCrossDisabled) + return _olua_fun_cocos2d_ui_CheckBox_create$3(L); // } } if (num_args == 6) { // if ((olua_is_string(L, 1)) && (olua_is_string(L, 2)) && (olua_is_string(L, 3)) && (olua_is_string(L, 4)) && (olua_is_string(L, 5)) && (olua_is_enum(L, 6))) { // static cocos2d::ui::CheckBox *create(const std::string &backGround, const std::string &backGroundSelected, const std::string &cross, const std::string &backGroundDisabled, const std::string &frontCrossDisabled, @optional cocos2d::ui::Widget::TextureResType texType) - return _cocos2d_ui_CheckBox_create$2(L); + return _olua_fun_cocos2d_ui_CheckBox_create$2(L); // } } @@ -21438,7 +22303,7 @@ static int _cocos2d_ui_CheckBox_create(lua_State *L) return 0; } -static int _cocos2d_ui_CheckBox_createInstance(lua_State *L) +static int _olua_fun_cocos2d_ui_CheckBox_createInstance(lua_State *L) { olua_startinvoke(L); @@ -21451,11 +22316,11 @@ static int _cocos2d_ui_CheckBox_createInstance(lua_State *L) return num_ret; } -static int _cocos2d_ui_CheckBox_new(lua_State *L) +static int _olua_fun_cocos2d_ui_CheckBox_new(lua_State *L) { olua_startinvoke(L); - // CheckBox() + // cocos2d::ui::CheckBox() cocos2d::ui::CheckBox *ret = new cocos2d::ui::CheckBox(); int num_ret = olua_push_object(L, ret, "ccui.CheckBox"); olua_postnew(L, ret); @@ -21465,21 +22330,29 @@ static int _cocos2d_ui_CheckBox_new(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ui_CheckBox(lua_State *L) +static int _olua_cls_ccui_CheckBox(lua_State *L) { oluacls_class(L, "ccui.CheckBox"); - oluacls_func(L, "addEventListener", _cocos2d_ui_CheckBox_addEventListener); - oluacls_func(L, "create", _cocos2d_ui_CheckBox_create); - oluacls_func(L, "createInstance", _cocos2d_ui_CheckBox_createInstance); - oluacls_func(L, "new", _cocos2d_ui_CheckBox_new); + oluacls_func(L, "addEventListener", _olua_fun_cocos2d_ui_CheckBox_addEventListener); + oluacls_func(L, "create", _olua_fun_cocos2d_ui_CheckBox_create); + oluacls_func(L, "createInstance", _olua_fun_cocos2d_ui_CheckBox_createInstance); + oluacls_func(L, "new", _olua_fun_cocos2d_ui_CheckBox_new); return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ui_RadioButton_EventType(lua_State *L) +OLUA_LIB int luaopen_ccui_CheckBox(lua_State *L) +{ + olua_require(L, "cocos2d_ui", luaopen_cocos2d_ui); + if (!olua_getclass(L, "ccui.CheckBox")) { + luaL_error(L, "class not found: cocos2d::ui::CheckBox"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_ccui_RadioButton_EventType(lua_State *L) { oluacls_class(L, "ccui.RadioButton.EventType"); oluacls_func(L, "__index", olua_indexerror); @@ -21489,9 +22362,19 @@ OLUA_LIB int luaopen_cocos2d_ui_RadioButton_EventType(lua_State *L) return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccui_RadioButton_EventType(lua_State *L) +{ + olua_require(L, "cocos2d_ui", luaopen_cocos2d_ui); + if (!olua_getclass(L, "ccui.RadioButton.EventType")) { + luaL_error(L, "class not found: cocos2d::ui::RadioButton::EventType"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_ui_RadioButton_ccRadioButtonCallback___call(lua_State *L) +static int _olua_fun_cocos2d_ui_RadioButton_ccRadioButtonCallback___call(lua_State *L) { olua_startinvoke(L); @@ -21503,17 +22386,26 @@ static int _cocos2d_ui_RadioButton_ccRadioButtonCallback___call(lua_State *L) return 1; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ui_RadioButton_ccRadioButtonCallback(lua_State *L) +static int _olua_cls_ccui_RadioButton_ccRadioButtonCallback(lua_State *L) { oluacls_class(L, "ccui.RadioButton.ccRadioButtonCallback"); - oluacls_func(L, "__call", _cocos2d_ui_RadioButton_ccRadioButtonCallback___call); + oluacls_func(L, "__call", _olua_fun_cocos2d_ui_RadioButton_ccRadioButtonCallback___call); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccui_RadioButton_ccRadioButtonCallback(lua_State *L) +{ + olua_require(L, "cocos2d_ui", luaopen_cocos2d_ui); + if (!olua_getclass(L, "ccui.RadioButton.ccRadioButtonCallback")) { + luaL_error(L, "class not found: cocos2d::ui::RadioButton::ccRadioButtonCallback"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_ui_RadioButton_addEventListener(lua_State *L) +static int _olua_fun_cocos2d_ui_RadioButton_addEventListener(lua_State *L) { olua_startinvoke(L); @@ -21525,16 +22417,17 @@ static int _cocos2d_ui_RadioButton_addEventListener(lua_State *L) void *cb_store = (void *)self; std::string cb_tag = "radioButtonCallback"; - std::string cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + std::string cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](cocos2d::ui::RadioButton *arg1, cocos2d::ui::RadioButton::EventType arg2) { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](cocos2d::ui::RadioButton *cb_arg1, cocos2d::ui::RadioButton::EventType cb_arg2) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); if (olua_contextequal(L, cb_ctx)) { int top = lua_gettop(L); - olua_push_object(L, arg1, "ccui.RadioButton"); - olua_push_enum(L, arg2); + olua_push_object(L, cb_arg1, "ccui.RadioButton"); + olua_push_enum(L, cb_arg2); olua_callback(L, cb_store, cb_name.c_str(), 2); @@ -21550,7 +22443,7 @@ static int _cocos2d_ui_RadioButton_addEventListener(lua_State *L) return 0; } -static int _cocos2d_ui_RadioButton_create$1(lua_State *L) +static int _olua_fun_cocos2d_ui_RadioButton_create$1(lua_State *L) { olua_startinvoke(L); @@ -21563,7 +22456,7 @@ static int _cocos2d_ui_RadioButton_create$1(lua_State *L) return num_ret; } -static int _cocos2d_ui_RadioButton_create$2(lua_State *L) +static int _olua_fun_cocos2d_ui_RadioButton_create$2(lua_State *L) { olua_startinvoke(L); @@ -21590,20 +22483,24 @@ static int _cocos2d_ui_RadioButton_create$2(lua_State *L) return num_ret; } -static int _cocos2d_ui_RadioButton_create$3(lua_State *L) +static int _olua_fun_cocos2d_ui_RadioButton_create$3(lua_State *L) { olua_startinvoke(L); std::string arg1; /** backGround */ - std::string arg2; /** cross */ - cocos2d::ui::Widget::TextureResType arg3 = (cocos2d::ui::Widget::TextureResType)0; /** texType */ + std::string arg2; /** backGroundSelected */ + std::string arg3; /** cross */ + std::string arg4; /** backGroundDisabled */ + std::string arg5; /** frontCrossDisabled */ olua_check_string(L, 1, &arg1); olua_check_string(L, 2, &arg2); - olua_check_enum(L, 3, &arg3); + olua_check_string(L, 3, &arg3); + olua_check_string(L, 4, &arg4); + olua_check_string(L, 5, &arg5); - // static cocos2d::ui::RadioButton *create(const std::string &backGround, const std::string &cross, @optional cocos2d::ui::Widget::TextureResType texType) - cocos2d::ui::RadioButton *ret = cocos2d::ui::RadioButton::create(arg1, arg2, arg3); + // static cocos2d::ui::RadioButton *create(const std::string &backGround, const std::string &backGroundSelected, const std::string &cross, const std::string &backGroundDisabled, const std::string &frontCrossDisabled) + cocos2d::ui::RadioButton *ret = cocos2d::ui::RadioButton::create(arg1, arg2, arg3, arg4, arg5); int num_ret = olua_push_object(L, ret, "ccui.RadioButton"); olua_endinvoke(L); @@ -21611,24 +22508,20 @@ static int _cocos2d_ui_RadioButton_create$3(lua_State *L) return num_ret; } -static int _cocos2d_ui_RadioButton_create$4(lua_State *L) +static int _olua_fun_cocos2d_ui_RadioButton_create$4(lua_State *L) { olua_startinvoke(L); std::string arg1; /** backGround */ - std::string arg2; /** backGroundSelected */ - std::string arg3; /** cross */ - std::string arg4; /** backGroundDisabled */ - std::string arg5; /** frontCrossDisabled */ + std::string arg2; /** cross */ + cocos2d::ui::Widget::TextureResType arg3 = (cocos2d::ui::Widget::TextureResType)0; /** texType */ olua_check_string(L, 1, &arg1); olua_check_string(L, 2, &arg2); - olua_check_string(L, 3, &arg3); - olua_check_string(L, 4, &arg4); - olua_check_string(L, 5, &arg5); + olua_check_enum(L, 3, &arg3); - // static cocos2d::ui::RadioButton *create(const std::string &backGround, const std::string &backGroundSelected, const std::string &cross, const std::string &backGroundDisabled, const std::string &frontCrossDisabled, @optional cocos2d::ui::Widget::TextureResType texType) - cocos2d::ui::RadioButton *ret = cocos2d::ui::RadioButton::create(arg1, arg2, arg3, arg4, arg5); + // static cocos2d::ui::RadioButton *create(const std::string &backGround, const std::string &cross, @optional cocos2d::ui::Widget::TextureResType texType) + cocos2d::ui::RadioButton *ret = cocos2d::ui::RadioButton::create(arg1, arg2, arg3); int num_ret = olua_push_object(L, ret, "ccui.RadioButton"); olua_endinvoke(L); @@ -21636,7 +22529,7 @@ static int _cocos2d_ui_RadioButton_create$4(lua_State *L) return num_ret; } -static int _cocos2d_ui_RadioButton_create$5(lua_State *L) +static int _olua_fun_cocos2d_ui_RadioButton_create$5(lua_State *L) { olua_startinvoke(L); @@ -21646,7 +22539,7 @@ static int _cocos2d_ui_RadioButton_create$5(lua_State *L) olua_check_string(L, 1, &arg1); olua_check_string(L, 2, &arg2); - // static cocos2d::ui::RadioButton *create(const std::string &backGround, const std::string &cross, @optional cocos2d::ui::Widget::TextureResType texType) + // static cocos2d::ui::RadioButton *create(const std::string &backGround, const std::string &cross) cocos2d::ui::RadioButton *ret = cocos2d::ui::RadioButton::create(arg1, arg2); int num_ret = olua_push_object(L, ret, "ccui.RadioButton"); @@ -21655,40 +22548,40 @@ static int _cocos2d_ui_RadioButton_create$5(lua_State *L) return num_ret; } -static int _cocos2d_ui_RadioButton_create(lua_State *L) +static int _olua_fun_cocos2d_ui_RadioButton_create(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 0) { // static cocos2d::ui::RadioButton *create() - return _cocos2d_ui_RadioButton_create$1(L); + return _olua_fun_cocos2d_ui_RadioButton_create$1(L); } if (num_args == 2) { // if ((olua_is_string(L, 1)) && (olua_is_string(L, 2))) { - // static cocos2d::ui::RadioButton *create(const std::string &backGround, const std::string &cross, @optional cocos2d::ui::Widget::TextureResType texType) - return _cocos2d_ui_RadioButton_create$5(L); + // static cocos2d::ui::RadioButton *create(const std::string &backGround, const std::string &cross) + return _olua_fun_cocos2d_ui_RadioButton_create$5(L); // } } if (num_args == 3) { // if ((olua_is_string(L, 1)) && (olua_is_string(L, 2)) && (olua_is_enum(L, 3))) { // static cocos2d::ui::RadioButton *create(const std::string &backGround, const std::string &cross, @optional cocos2d::ui::Widget::TextureResType texType) - return _cocos2d_ui_RadioButton_create$3(L); + return _olua_fun_cocos2d_ui_RadioButton_create$4(L); // } } if (num_args == 5) { // if ((olua_is_string(L, 1)) && (olua_is_string(L, 2)) && (olua_is_string(L, 3)) && (olua_is_string(L, 4)) && (olua_is_string(L, 5))) { - // static cocos2d::ui::RadioButton *create(const std::string &backGround, const std::string &backGroundSelected, const std::string &cross, const std::string &backGroundDisabled, const std::string &frontCrossDisabled, @optional cocos2d::ui::Widget::TextureResType texType) - return _cocos2d_ui_RadioButton_create$4(L); + // static cocos2d::ui::RadioButton *create(const std::string &backGround, const std::string &backGroundSelected, const std::string &cross, const std::string &backGroundDisabled, const std::string &frontCrossDisabled) + return _olua_fun_cocos2d_ui_RadioButton_create$3(L); // } } if (num_args == 6) { // if ((olua_is_string(L, 1)) && (olua_is_string(L, 2)) && (olua_is_string(L, 3)) && (olua_is_string(L, 4)) && (olua_is_string(L, 5)) && (olua_is_enum(L, 6))) { // static cocos2d::ui::RadioButton *create(const std::string &backGround, const std::string &backGroundSelected, const std::string &cross, const std::string &backGroundDisabled, const std::string &frontCrossDisabled, @optional cocos2d::ui::Widget::TextureResType texType) - return _cocos2d_ui_RadioButton_create$2(L); + return _olua_fun_cocos2d_ui_RadioButton_create$2(L); // } } @@ -21697,7 +22590,7 @@ static int _cocos2d_ui_RadioButton_create(lua_State *L) return 0; } -static int _cocos2d_ui_RadioButton_createInstance(lua_State *L) +static int _olua_fun_cocos2d_ui_RadioButton_createInstance(lua_State *L) { olua_startinvoke(L); @@ -21710,11 +22603,11 @@ static int _cocos2d_ui_RadioButton_createInstance(lua_State *L) return num_ret; } -static int _cocos2d_ui_RadioButton_new(lua_State *L) +static int _olua_fun_cocos2d_ui_RadioButton_new(lua_State *L) { olua_startinvoke(L); - // RadioButton() + // cocos2d::ui::RadioButton() cocos2d::ui::RadioButton *ret = new cocos2d::ui::RadioButton(); int num_ret = olua_push_object(L, ret, "ccui.RadioButton"); olua_postnew(L, ret); @@ -21724,21 +22617,29 @@ static int _cocos2d_ui_RadioButton_new(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ui_RadioButton(lua_State *L) +static int _olua_cls_ccui_RadioButton(lua_State *L) { oluacls_class(L, "ccui.RadioButton"); - oluacls_func(L, "addEventListener", _cocos2d_ui_RadioButton_addEventListener); - oluacls_func(L, "create", _cocos2d_ui_RadioButton_create); - oluacls_func(L, "createInstance", _cocos2d_ui_RadioButton_createInstance); - oluacls_func(L, "new", _cocos2d_ui_RadioButton_new); + oluacls_func(L, "addEventListener", _olua_fun_cocos2d_ui_RadioButton_addEventListener); + oluacls_func(L, "create", _olua_fun_cocos2d_ui_RadioButton_create); + oluacls_func(L, "createInstance", _olua_fun_cocos2d_ui_RadioButton_createInstance); + oluacls_func(L, "new", _olua_fun_cocos2d_ui_RadioButton_new); return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ui_RadioButtonGroup_EventType(lua_State *L) +OLUA_LIB int luaopen_ccui_RadioButton(lua_State *L) +{ + olua_require(L, "cocos2d_ui", luaopen_cocos2d_ui); + if (!olua_getclass(L, "ccui.RadioButton")) { + luaL_error(L, "class not found: cocos2d::ui::RadioButton"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_ccui_RadioButtonGroup_EventType(lua_State *L) { oluacls_class(L, "ccui.RadioButtonGroup.EventType"); oluacls_func(L, "__index", olua_indexerror); @@ -21747,9 +22648,19 @@ OLUA_LIB int luaopen_cocos2d_ui_RadioButtonGroup_EventType(lua_State *L) return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccui_RadioButtonGroup_EventType(lua_State *L) +{ + olua_require(L, "cocos2d_ui", luaopen_cocos2d_ui); + if (!olua_getclass(L, "ccui.RadioButtonGroup.EventType")) { + luaL_error(L, "class not found: cocos2d::ui::RadioButtonGroup::EventType"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_ui_RadioButtonGroup_ccRadioButtonGroupCallback___call(lua_State *L) +static int _olua_fun_cocos2d_ui_RadioButtonGroup_ccRadioButtonGroupCallback___call(lua_State *L) { olua_startinvoke(L); @@ -21761,17 +22672,26 @@ static int _cocos2d_ui_RadioButtonGroup_ccRadioButtonGroupCallback___call(lua_St return 1; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ui_RadioButtonGroup_ccRadioButtonGroupCallback(lua_State *L) +static int _olua_cls_ccui_RadioButtonGroup_ccRadioButtonGroupCallback(lua_State *L) { oluacls_class(L, "ccui.RadioButtonGroup.ccRadioButtonGroupCallback"); - oluacls_func(L, "__call", _cocos2d_ui_RadioButtonGroup_ccRadioButtonGroupCallback___call); + oluacls_func(L, "__call", _olua_fun_cocos2d_ui_RadioButtonGroup_ccRadioButtonGroupCallback___call); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccui_RadioButtonGroup_ccRadioButtonGroupCallback(lua_State *L) +{ + olua_require(L, "cocos2d_ui", luaopen_cocos2d_ui); + if (!olua_getclass(L, "ccui.RadioButtonGroup.ccRadioButtonGroupCallback")) { + luaL_error(L, "class not found: cocos2d::ui::RadioButtonGroup::ccRadioButtonGroupCallback"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_ui_RadioButtonGroup_addEventListener(lua_State *L) +static int _olua_fun_cocos2d_ui_RadioButtonGroup_addEventListener(lua_State *L) { olua_startinvoke(L); @@ -21783,17 +22703,18 @@ static int _cocos2d_ui_RadioButtonGroup_addEventListener(lua_State *L) void *cb_store = (void *)self; std::string cb_tag = "radioButtonCallback"; - std::string cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + std::string cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](cocos2d::ui::RadioButton *arg1, int arg2, cocos2d::ui::RadioButtonGroup::EventType arg3) { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](cocos2d::ui::RadioButton *cb_arg1, int cb_arg2, cocos2d::ui::RadioButtonGroup::EventType cb_arg3) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); if (olua_contextequal(L, cb_ctx)) { int top = lua_gettop(L); - olua_push_object(L, arg1, "ccui.RadioButton"); - olua_push_integer(L, arg2); - olua_push_enum(L, arg3); + olua_push_object(L, cb_arg1, "ccui.RadioButton"); + olua_push_integer(L, cb_arg2); + olua_push_enum(L, cb_arg3); olua_callback(L, cb_store, cb_name.c_str(), 3); @@ -21809,7 +22730,7 @@ static int _cocos2d_ui_RadioButtonGroup_addEventListener(lua_State *L) return 0; } -static int _cocos2d_ui_RadioButtonGroup_addRadioButton(lua_State *L) +static int _olua_fun_cocos2d_ui_RadioButtonGroup_addRadioButton(lua_State *L) { olua_startinvoke(L); @@ -21827,7 +22748,7 @@ static int _cocos2d_ui_RadioButtonGroup_addRadioButton(lua_State *L) return 0; } -static int _cocos2d_ui_RadioButtonGroup_create(lua_State *L) +static int _olua_fun_cocos2d_ui_RadioButtonGroup_create(lua_State *L) { olua_startinvoke(L); @@ -21840,7 +22761,7 @@ static int _cocos2d_ui_RadioButtonGroup_create(lua_State *L) return num_ret; } -static int _cocos2d_ui_RadioButtonGroup_getNumberOfRadioButtons(lua_State *L) +static int _olua_fun_cocos2d_ui_RadioButtonGroup_getNumberOfRadioButtons(lua_State *L) { olua_startinvoke(L); @@ -21857,7 +22778,7 @@ static int _cocos2d_ui_RadioButtonGroup_getNumberOfRadioButtons(lua_State *L) return num_ret; } -static int _cocos2d_ui_RadioButtonGroup_getRadioButtonByIndex(lua_State *L) +static int _olua_fun_cocos2d_ui_RadioButtonGroup_getRadioButtonByIndex(lua_State *L) { olua_startinvoke(L); @@ -21876,7 +22797,7 @@ static int _cocos2d_ui_RadioButtonGroup_getRadioButtonByIndex(lua_State *L) return num_ret; } -static int _cocos2d_ui_RadioButtonGroup_getSelectedButtonIndex(lua_State *L) +static int _olua_fun_cocos2d_ui_RadioButtonGroup_getSelectedButtonIndex(lua_State *L) { olua_startinvoke(L); @@ -21893,7 +22814,7 @@ static int _cocos2d_ui_RadioButtonGroup_getSelectedButtonIndex(lua_State *L) return num_ret; } -static int _cocos2d_ui_RadioButtonGroup_isAllowedNoSelection(lua_State *L) +static int _olua_fun_cocos2d_ui_RadioButtonGroup_isAllowedNoSelection(lua_State *L) { olua_startinvoke(L); @@ -21910,11 +22831,11 @@ static int _cocos2d_ui_RadioButtonGroup_isAllowedNoSelection(lua_State *L) return num_ret; } -static int _cocos2d_ui_RadioButtonGroup_new(lua_State *L) +static int _olua_fun_cocos2d_ui_RadioButtonGroup_new(lua_State *L) { olua_startinvoke(L); - // RadioButtonGroup() + // cocos2d::ui::RadioButtonGroup() cocos2d::ui::RadioButtonGroup *ret = new cocos2d::ui::RadioButtonGroup(); int num_ret = olua_push_object(L, ret, "ccui.RadioButtonGroup"); olua_postnew(L, ret); @@ -21924,7 +22845,7 @@ static int _cocos2d_ui_RadioButtonGroup_new(lua_State *L) return num_ret; } -static int _cocos2d_ui_RadioButtonGroup_removeAllRadioButtons(lua_State *L) +static int _olua_fun_cocos2d_ui_RadioButtonGroup_removeAllRadioButtons(lua_State *L) { olua_startinvoke(L); @@ -21940,7 +22861,7 @@ static int _cocos2d_ui_RadioButtonGroup_removeAllRadioButtons(lua_State *L) return 0; } -static int _cocos2d_ui_RadioButtonGroup_removeRadioButton(lua_State *L) +static int _olua_fun_cocos2d_ui_RadioButtonGroup_removeRadioButton(lua_State *L) { olua_startinvoke(L); @@ -21958,7 +22879,7 @@ static int _cocos2d_ui_RadioButtonGroup_removeRadioButton(lua_State *L) return 0; } -static int _cocos2d_ui_RadioButtonGroup_setAllowedNoSelection(lua_State *L) +static int _olua_fun_cocos2d_ui_RadioButtonGroup_setAllowedNoSelection(lua_State *L) { olua_startinvoke(L); @@ -21976,7 +22897,7 @@ static int _cocos2d_ui_RadioButtonGroup_setAllowedNoSelection(lua_State *L) return 0; } -static int _cocos2d_ui_RadioButtonGroup_setSelectedButton$1(lua_State *L) +static int _olua_fun_cocos2d_ui_RadioButtonGroup_setSelectedButton$1(lua_State *L) { olua_startinvoke(L); @@ -21994,7 +22915,7 @@ static int _cocos2d_ui_RadioButtonGroup_setSelectedButton$1(lua_State *L) return 0; } -static int _cocos2d_ui_RadioButtonGroup_setSelectedButton$2(lua_State *L) +static int _olua_fun_cocos2d_ui_RadioButtonGroup_setSelectedButton$2(lua_State *L) { olua_startinvoke(L); @@ -22012,19 +22933,19 @@ static int _cocos2d_ui_RadioButtonGroup_setSelectedButton$2(lua_State *L) return 0; } -static int _cocos2d_ui_RadioButtonGroup_setSelectedButton(lua_State *L) +static int _olua_fun_cocos2d_ui_RadioButtonGroup_setSelectedButton(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { if ((olua_is_integer(L, 2))) { // void setSelectedButton(int index) - return _cocos2d_ui_RadioButtonGroup_setSelectedButton$1(L); + return _olua_fun_cocos2d_ui_RadioButtonGroup_setSelectedButton$1(L); } // if ((olua_is_object(L, 2, "ccui.RadioButton"))) { // void setSelectedButton(cocos2d::ui::RadioButton *radioButton) - return _cocos2d_ui_RadioButtonGroup_setSelectedButton$2(L); + return _olua_fun_cocos2d_ui_RadioButtonGroup_setSelectedButton$2(L); // } } @@ -22033,7 +22954,7 @@ static int _cocos2d_ui_RadioButtonGroup_setSelectedButton(lua_State *L) return 0; } -static int _cocos2d_ui_RadioButtonGroup_setSelectedButtonWithoutEvent$1(lua_State *L) +static int _olua_fun_cocos2d_ui_RadioButtonGroup_setSelectedButtonWithoutEvent$1(lua_State *L) { olua_startinvoke(L); @@ -22051,7 +22972,7 @@ static int _cocos2d_ui_RadioButtonGroup_setSelectedButtonWithoutEvent$1(lua_Stat return 0; } -static int _cocos2d_ui_RadioButtonGroup_setSelectedButtonWithoutEvent$2(lua_State *L) +static int _olua_fun_cocos2d_ui_RadioButtonGroup_setSelectedButtonWithoutEvent$2(lua_State *L) { olua_startinvoke(L); @@ -22069,19 +22990,19 @@ static int _cocos2d_ui_RadioButtonGroup_setSelectedButtonWithoutEvent$2(lua_Stat return 0; } -static int _cocos2d_ui_RadioButtonGroup_setSelectedButtonWithoutEvent(lua_State *L) +static int _olua_fun_cocos2d_ui_RadioButtonGroup_setSelectedButtonWithoutEvent(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { if ((olua_is_integer(L, 2))) { // void setSelectedButtonWithoutEvent(int index) - return _cocos2d_ui_RadioButtonGroup_setSelectedButtonWithoutEvent$1(L); + return _olua_fun_cocos2d_ui_RadioButtonGroup_setSelectedButtonWithoutEvent$1(L); } // if ((olua_is_object(L, 2, "ccui.RadioButton"))) { // void setSelectedButtonWithoutEvent(cocos2d::ui::RadioButton *radioButton) - return _cocos2d_ui_RadioButtonGroup_setSelectedButtonWithoutEvent$2(L); + return _olua_fun_cocos2d_ui_RadioButtonGroup_setSelectedButtonWithoutEvent$2(L); // } } @@ -22090,32 +23011,41 @@ static int _cocos2d_ui_RadioButtonGroup_setSelectedButtonWithoutEvent(lua_State return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ui_RadioButtonGroup(lua_State *L) +static int _olua_cls_ccui_RadioButtonGroup(lua_State *L) { oluacls_class(L, "ccui.RadioButtonGroup"); - oluacls_func(L, "addEventListener", _cocos2d_ui_RadioButtonGroup_addEventListener); - oluacls_func(L, "addRadioButton", _cocos2d_ui_RadioButtonGroup_addRadioButton); - oluacls_func(L, "create", _cocos2d_ui_RadioButtonGroup_create); - oluacls_func(L, "getNumberOfRadioButtons", _cocos2d_ui_RadioButtonGroup_getNumberOfRadioButtons); - oluacls_func(L, "getRadioButtonByIndex", _cocos2d_ui_RadioButtonGroup_getRadioButtonByIndex); - oluacls_func(L, "getSelectedButtonIndex", _cocos2d_ui_RadioButtonGroup_getSelectedButtonIndex); - oluacls_func(L, "isAllowedNoSelection", _cocos2d_ui_RadioButtonGroup_isAllowedNoSelection); - oluacls_func(L, "new", _cocos2d_ui_RadioButtonGroup_new); - oluacls_func(L, "removeAllRadioButtons", _cocos2d_ui_RadioButtonGroup_removeAllRadioButtons); - oluacls_func(L, "removeRadioButton", _cocos2d_ui_RadioButtonGroup_removeRadioButton); - oluacls_func(L, "setAllowedNoSelection", _cocos2d_ui_RadioButtonGroup_setAllowedNoSelection); - oluacls_func(L, "setSelectedButton", _cocos2d_ui_RadioButtonGroup_setSelectedButton); - oluacls_func(L, "setSelectedButtonWithoutEvent", _cocos2d_ui_RadioButtonGroup_setSelectedButtonWithoutEvent); - oluacls_prop(L, "allowedNoSelection", _cocos2d_ui_RadioButtonGroup_isAllowedNoSelection, _cocos2d_ui_RadioButtonGroup_setAllowedNoSelection); - oluacls_prop(L, "numberOfRadioButtons", _cocos2d_ui_RadioButtonGroup_getNumberOfRadioButtons, nullptr); - oluacls_prop(L, "selectedButtonIndex", _cocos2d_ui_RadioButtonGroup_getSelectedButtonIndex, nullptr); + oluacls_func(L, "addEventListener", _olua_fun_cocos2d_ui_RadioButtonGroup_addEventListener); + oluacls_func(L, "addRadioButton", _olua_fun_cocos2d_ui_RadioButtonGroup_addRadioButton); + oluacls_func(L, "create", _olua_fun_cocos2d_ui_RadioButtonGroup_create); + oluacls_func(L, "getNumberOfRadioButtons", _olua_fun_cocos2d_ui_RadioButtonGroup_getNumberOfRadioButtons); + oluacls_func(L, "getRadioButtonByIndex", _olua_fun_cocos2d_ui_RadioButtonGroup_getRadioButtonByIndex); + oluacls_func(L, "getSelectedButtonIndex", _olua_fun_cocos2d_ui_RadioButtonGroup_getSelectedButtonIndex); + oluacls_func(L, "isAllowedNoSelection", _olua_fun_cocos2d_ui_RadioButtonGroup_isAllowedNoSelection); + oluacls_func(L, "new", _olua_fun_cocos2d_ui_RadioButtonGroup_new); + oluacls_func(L, "removeAllRadioButtons", _olua_fun_cocos2d_ui_RadioButtonGroup_removeAllRadioButtons); + oluacls_func(L, "removeRadioButton", _olua_fun_cocos2d_ui_RadioButtonGroup_removeRadioButton); + oluacls_func(L, "setAllowedNoSelection", _olua_fun_cocos2d_ui_RadioButtonGroup_setAllowedNoSelection); + oluacls_func(L, "setSelectedButton", _olua_fun_cocos2d_ui_RadioButtonGroup_setSelectedButton); + oluacls_func(L, "setSelectedButtonWithoutEvent", _olua_fun_cocos2d_ui_RadioButtonGroup_setSelectedButtonWithoutEvent); + oluacls_prop(L, "allowedNoSelection", _olua_fun_cocos2d_ui_RadioButtonGroup_isAllowedNoSelection, _olua_fun_cocos2d_ui_RadioButtonGroup_setAllowedNoSelection); + oluacls_prop(L, "numberOfRadioButtons", _olua_fun_cocos2d_ui_RadioButtonGroup_getNumberOfRadioButtons, nullptr); + oluacls_prop(L, "selectedButtonIndex", _olua_fun_cocos2d_ui_RadioButtonGroup_getSelectedButtonIndex, nullptr); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccui_RadioButtonGroup(lua_State *L) +{ + olua_require(L, "cocos2d_ui", luaopen_cocos2d_ui); + if (!olua_getclass(L, "ccui.RadioButtonGroup")) { + luaL_error(L, "class not found: cocos2d::ui::RadioButtonGroup"); + } return 1; } OLUA_END_DECLS -static int _cocos2d_ui_ImageView_as(lua_State *L) +static int _olua_fun_cocos2d_ui_ImageView_as(lua_State *L) { olua_startinvoke(L); @@ -22147,7 +23077,7 @@ static int _cocos2d_ui_ImageView_as(lua_State *L) return 1; } -static int _cocos2d_ui_ImageView_create$1(lua_State *L) +static int _olua_fun_cocos2d_ui_ImageView_create$1(lua_State *L) { olua_startinvoke(L); @@ -22160,7 +23090,7 @@ static int _cocos2d_ui_ImageView_create$1(lua_State *L) return num_ret; } -static int _cocos2d_ui_ImageView_create$2(lua_State *L) +static int _olua_fun_cocos2d_ui_ImageView_create$2(lua_State *L) { olua_startinvoke(L); @@ -22179,7 +23109,7 @@ static int _cocos2d_ui_ImageView_create$2(lua_State *L) return num_ret; } -static int _cocos2d_ui_ImageView_create$3(lua_State *L) +static int _olua_fun_cocos2d_ui_ImageView_create$3(lua_State *L) { olua_startinvoke(L); @@ -22187,7 +23117,7 @@ static int _cocos2d_ui_ImageView_create$3(lua_State *L) olua_check_string(L, 1, &arg1); - // static cocos2d::ui::ImageView *create(const std::string &imageFileName, @optional cocos2d::ui::Widget::TextureResType texType) + // static cocos2d::ui::ImageView *create(const std::string &imageFileName) cocos2d::ui::ImageView *ret = cocos2d::ui::ImageView::create(arg1); int num_ret = olua_push_object(L, ret, "ccui.ImageView"); @@ -22196,26 +23126,26 @@ static int _cocos2d_ui_ImageView_create$3(lua_State *L) return num_ret; } -static int _cocos2d_ui_ImageView_create(lua_State *L) +static int _olua_fun_cocos2d_ui_ImageView_create(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 0) { // static cocos2d::ui::ImageView *create() - return _cocos2d_ui_ImageView_create$1(L); + return _olua_fun_cocos2d_ui_ImageView_create$1(L); } if (num_args == 1) { // if ((olua_is_string(L, 1))) { - // static cocos2d::ui::ImageView *create(const std::string &imageFileName, @optional cocos2d::ui::Widget::TextureResType texType) - return _cocos2d_ui_ImageView_create$3(L); + // static cocos2d::ui::ImageView *create(const std::string &imageFileName) + return _olua_fun_cocos2d_ui_ImageView_create$3(L); // } } if (num_args == 2) { // if ((olua_is_string(L, 1)) && (olua_is_enum(L, 2))) { // static cocos2d::ui::ImageView *create(const std::string &imageFileName, @optional cocos2d::ui::Widget::TextureResType texType) - return _cocos2d_ui_ImageView_create$2(L); + return _olua_fun_cocos2d_ui_ImageView_create$2(L); // } } @@ -22224,7 +23154,7 @@ static int _cocos2d_ui_ImageView_create(lua_State *L) return 0; } -static int _cocos2d_ui_ImageView_createInstance(lua_State *L) +static int _olua_fun_cocos2d_ui_ImageView_createInstance(lua_State *L) { olua_startinvoke(L); @@ -22237,7 +23167,7 @@ static int _cocos2d_ui_ImageView_createInstance(lua_State *L) return num_ret; } -static int _cocos2d_ui_ImageView_getBlendFunc(lua_State *L) +static int _olua_fun_cocos2d_ui_ImageView_getBlendFunc(lua_State *L) { olua_startinvoke(L); @@ -22254,7 +23184,7 @@ static int _cocos2d_ui_ImageView_getBlendFunc(lua_State *L) return num_ret; } -static int _cocos2d_ui_ImageView_getCapInsets(lua_State *L) +static int _olua_fun_cocos2d_ui_ImageView_getCapInsets(lua_State *L) { olua_startinvoke(L); @@ -22271,7 +23201,7 @@ static int _cocos2d_ui_ImageView_getCapInsets(lua_State *L) return num_ret; } -static int _cocos2d_ui_ImageView_getRenderFile(lua_State *L) +static int _olua_fun_cocos2d_ui_ImageView_getRenderFile(lua_State *L) { olua_startinvoke(L); @@ -22281,14 +23211,14 @@ static int _cocos2d_ui_ImageView_getRenderFile(lua_State *L) // cocos2d::ResourceData getRenderFile() cocos2d::ResourceData ret = self->getRenderFile(); - int num_ret = olua_pushcopy_object(L, ret, "cc.ResourceData"); + int num_ret = olua_copy_object(L, ret, "cc.ResourceData"); olua_endinvoke(L); return num_ret; } -static int _cocos2d_ui_ImageView_init$1(lua_State *L) +static int _olua_fun_cocos2d_ui_ImageView_init$1(lua_State *L) { olua_startinvoke(L); @@ -22305,7 +23235,7 @@ static int _cocos2d_ui_ImageView_init$1(lua_State *L) return num_ret; } -static int _cocos2d_ui_ImageView_init$2(lua_State *L) +static int _olua_fun_cocos2d_ui_ImageView_init$2(lua_State *L) { olua_startinvoke(L); @@ -22326,7 +23256,7 @@ static int _cocos2d_ui_ImageView_init$2(lua_State *L) return num_ret; } -static int _cocos2d_ui_ImageView_init$3(lua_State *L) +static int _olua_fun_cocos2d_ui_ImageView_init$3(lua_State *L) { olua_startinvoke(L); @@ -22336,7 +23266,7 @@ static int _cocos2d_ui_ImageView_init$3(lua_State *L) olua_to_object(L, 1, &self, "ccui.ImageView"); olua_check_string(L, 2, &arg1); - // bool init(const std::string &imageFileName, @optional cocos2d::ui::Widget::TextureResType texType) + // bool init(const std::string &imageFileName) bool ret = self->init(arg1); int num_ret = olua_push_bool(L, ret); @@ -22345,26 +23275,26 @@ static int _cocos2d_ui_ImageView_init$3(lua_State *L) return num_ret; } -static int _cocos2d_ui_ImageView_init(lua_State *L) +static int _olua_fun_cocos2d_ui_ImageView_init(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 0) { // @using bool init() - return _cocos2d_ui_ImageView_init$1(L); + return _olua_fun_cocos2d_ui_ImageView_init$1(L); } if (num_args == 1) { // if ((olua_is_string(L, 2))) { - // bool init(const std::string &imageFileName, @optional cocos2d::ui::Widget::TextureResType texType) - return _cocos2d_ui_ImageView_init$3(L); + // bool init(const std::string &imageFileName) + return _olua_fun_cocos2d_ui_ImageView_init$3(L); // } } if (num_args == 2) { // if ((olua_is_string(L, 2)) && (olua_is_enum(L, 3))) { // bool init(const std::string &imageFileName, @optional cocos2d::ui::Widget::TextureResType texType) - return _cocos2d_ui_ImageView_init$2(L); + return _olua_fun_cocos2d_ui_ImageView_init$2(L); // } } @@ -22373,7 +23303,7 @@ static int _cocos2d_ui_ImageView_init(lua_State *L) return 0; } -static int _cocos2d_ui_ImageView_isScale9Enabled(lua_State *L) +static int _olua_fun_cocos2d_ui_ImageView_isScale9Enabled(lua_State *L) { olua_startinvoke(L); @@ -22390,7 +23320,7 @@ static int _cocos2d_ui_ImageView_isScale9Enabled(lua_State *L) return num_ret; } -static int _cocos2d_ui_ImageView_loadTexture$1(lua_State *L) +static int _olua_fun_cocos2d_ui_ImageView_loadTexture$1(lua_State *L) { olua_startinvoke(L); @@ -22410,7 +23340,7 @@ static int _cocos2d_ui_ImageView_loadTexture$1(lua_State *L) return 0; } -static int _cocos2d_ui_ImageView_loadTexture$2(lua_State *L) +static int _olua_fun_cocos2d_ui_ImageView_loadTexture$2(lua_State *L) { olua_startinvoke(L); @@ -22420,7 +23350,7 @@ static int _cocos2d_ui_ImageView_loadTexture$2(lua_State *L) olua_to_object(L, 1, &self, "ccui.ImageView"); olua_check_string(L, 2, &arg1); - // void loadTexture(const std::string &fileName, @optional cocos2d::ui::Widget::TextureResType texType) + // void loadTexture(const std::string &fileName) self->loadTexture(arg1); olua_endinvoke(L); @@ -22428,21 +23358,21 @@ static int _cocos2d_ui_ImageView_loadTexture$2(lua_State *L) return 0; } -static int _cocos2d_ui_ImageView_loadTexture(lua_State *L) +static int _olua_fun_cocos2d_ui_ImageView_loadTexture(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_string(L, 2))) { - // void loadTexture(const std::string &fileName, @optional cocos2d::ui::Widget::TextureResType texType) - return _cocos2d_ui_ImageView_loadTexture$2(L); + // void loadTexture(const std::string &fileName) + return _olua_fun_cocos2d_ui_ImageView_loadTexture$2(L); // } } if (num_args == 2) { // if ((olua_is_string(L, 2)) && (olua_is_enum(L, 3))) { // void loadTexture(const std::string &fileName, @optional cocos2d::ui::Widget::TextureResType texType) - return _cocos2d_ui_ImageView_loadTexture$1(L); + return _olua_fun_cocos2d_ui_ImageView_loadTexture$1(L); // } } @@ -22451,11 +23381,11 @@ static int _cocos2d_ui_ImageView_loadTexture(lua_State *L) return 0; } -static int _cocos2d_ui_ImageView_new(lua_State *L) +static int _olua_fun_cocos2d_ui_ImageView_new(lua_State *L) { olua_startinvoke(L); - // ImageView() + // cocos2d::ui::ImageView() cocos2d::ui::ImageView *ret = new cocos2d::ui::ImageView(); int num_ret = olua_push_object(L, ret, "ccui.ImageView"); olua_postnew(L, ret); @@ -22465,43 +23395,43 @@ static int _cocos2d_ui_ImageView_new(lua_State *L) return num_ret; } -static int _cocos2d_ui_ImageView_setBlendFunc(lua_State *L) +static int _olua_fun_cocos2d_ui_ImageView_setBlendFunc(lua_State *L) { olua_startinvoke(L); cocos2d::ui::ImageView *self = nullptr; - cocos2d::BlendFunc arg1; /** blendFunc */ + cocos2d::BlendFunc *arg1; /** blendFunc */ olua_to_object(L, 1, &self, "ccui.ImageView"); olua_check_object(L, 2, &arg1, "cc.BlendFunc"); // void setBlendFunc(const cocos2d::BlendFunc &blendFunc) - self->setBlendFunc(arg1); + self->setBlendFunc(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_ui_ImageView_setCapInsets(lua_State *L) +static int _olua_fun_cocos2d_ui_ImageView_setCapInsets(lua_State *L) { olua_startinvoke(L); cocos2d::ui::ImageView *self = nullptr; - cocos2d::Rect arg1; /** capInsets */ + cocos2d::Rect *arg1; /** capInsets */ olua_to_object(L, 1, &self, "ccui.ImageView"); olua_check_object(L, 2, &arg1, "cc.Rect"); // void setCapInsets(const cocos2d::Rect &capInsets) - self->setCapInsets(arg1); + self->setCapInsets(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_ui_ImageView_setScale9Enabled(lua_State *L) +static int _olua_fun_cocos2d_ui_ImageView_setScale9Enabled(lua_State *L) { olua_startinvoke(L); @@ -22519,53 +23449,61 @@ static int _cocos2d_ui_ImageView_setScale9Enabled(lua_State *L) return 0; } -static int _cocos2d_ui_ImageView_setTextureRect(lua_State *L) +static int _olua_fun_cocos2d_ui_ImageView_setTextureRect(lua_State *L) { olua_startinvoke(L); cocos2d::ui::ImageView *self = nullptr; - cocos2d::Rect arg1; /** rect */ + cocos2d::Rect *arg1; /** rect */ olua_to_object(L, 1, &self, "ccui.ImageView"); olua_check_object(L, 2, &arg1, "cc.Rect"); // void setTextureRect(const cocos2d::Rect &rect) - self->setTextureRect(arg1); + self->setTextureRect(*arg1); olua_endinvoke(L); return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ui_ImageView(lua_State *L) +static int _olua_cls_ccui_ImageView(lua_State *L) { oluacls_class(L, "ccui.ImageView"); - oluacls_func(L, "as", _cocos2d_ui_ImageView_as); - oluacls_func(L, "create", _cocos2d_ui_ImageView_create); - oluacls_func(L, "createInstance", _cocos2d_ui_ImageView_createInstance); - oluacls_func(L, "getBlendFunc", _cocos2d_ui_ImageView_getBlendFunc); - oluacls_func(L, "getCapInsets", _cocos2d_ui_ImageView_getCapInsets); - oluacls_func(L, "getRenderFile", _cocos2d_ui_ImageView_getRenderFile); - oluacls_func(L, "init", _cocos2d_ui_ImageView_init); - oluacls_func(L, "isScale9Enabled", _cocos2d_ui_ImageView_isScale9Enabled); - oluacls_func(L, "loadTexture", _cocos2d_ui_ImageView_loadTexture); - oluacls_func(L, "new", _cocos2d_ui_ImageView_new); - oluacls_func(L, "setBlendFunc", _cocos2d_ui_ImageView_setBlendFunc); - oluacls_func(L, "setCapInsets", _cocos2d_ui_ImageView_setCapInsets); - oluacls_func(L, "setScale9Enabled", _cocos2d_ui_ImageView_setScale9Enabled); - oluacls_func(L, "setTextureRect", _cocos2d_ui_ImageView_setTextureRect); - oluacls_prop(L, "blendFunc", _cocos2d_ui_ImageView_getBlendFunc, _cocos2d_ui_ImageView_setBlendFunc); - oluacls_prop(L, "capInsets", _cocos2d_ui_ImageView_getCapInsets, _cocos2d_ui_ImageView_setCapInsets); - oluacls_prop(L, "renderFile", _cocos2d_ui_ImageView_getRenderFile, nullptr); - oluacls_prop(L, "scale9Enabled", _cocos2d_ui_ImageView_isScale9Enabled, _cocos2d_ui_ImageView_setScale9Enabled); + oluacls_func(L, "as", _olua_fun_cocos2d_ui_ImageView_as); + oluacls_func(L, "create", _olua_fun_cocos2d_ui_ImageView_create); + oluacls_func(L, "createInstance", _olua_fun_cocos2d_ui_ImageView_createInstance); + oluacls_func(L, "getBlendFunc", _olua_fun_cocos2d_ui_ImageView_getBlendFunc); + oluacls_func(L, "getCapInsets", _olua_fun_cocos2d_ui_ImageView_getCapInsets); + oluacls_func(L, "getRenderFile", _olua_fun_cocos2d_ui_ImageView_getRenderFile); + oluacls_func(L, "init", _olua_fun_cocos2d_ui_ImageView_init); + oluacls_func(L, "isScale9Enabled", _olua_fun_cocos2d_ui_ImageView_isScale9Enabled); + oluacls_func(L, "loadTexture", _olua_fun_cocos2d_ui_ImageView_loadTexture); + oluacls_func(L, "new", _olua_fun_cocos2d_ui_ImageView_new); + oluacls_func(L, "setBlendFunc", _olua_fun_cocos2d_ui_ImageView_setBlendFunc); + oluacls_func(L, "setCapInsets", _olua_fun_cocos2d_ui_ImageView_setCapInsets); + oluacls_func(L, "setScale9Enabled", _olua_fun_cocos2d_ui_ImageView_setScale9Enabled); + oluacls_func(L, "setTextureRect", _olua_fun_cocos2d_ui_ImageView_setTextureRect); + oluacls_prop(L, "blendFunc", _olua_fun_cocos2d_ui_ImageView_getBlendFunc, _olua_fun_cocos2d_ui_ImageView_setBlendFunc); + oluacls_prop(L, "capInsets", _olua_fun_cocos2d_ui_ImageView_getCapInsets, _olua_fun_cocos2d_ui_ImageView_setCapInsets); + oluacls_prop(L, "renderFile", _olua_fun_cocos2d_ui_ImageView_getRenderFile, nullptr); + oluacls_prop(L, "scale9Enabled", _olua_fun_cocos2d_ui_ImageView_isScale9Enabled, _olua_fun_cocos2d_ui_ImageView_setScale9Enabled); return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ui_EditBoxDelegate_EditBoxEndAction(lua_State *L) +OLUA_LIB int luaopen_ccui_ImageView(lua_State *L) +{ + olua_require(L, "cocos2d_ui", luaopen_cocos2d_ui); + if (!olua_getclass(L, "ccui.ImageView")) { + luaL_error(L, "class not found: cocos2d::ui::ImageView"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_ccui_EditBoxDelegate_EditBoxEndAction(lua_State *L) { oluacls_class(L, "ccui.EditBoxDelegate.EditBoxEndAction"); oluacls_func(L, "__index", olua_indexerror); @@ -22577,9 +23515,19 @@ OLUA_LIB int luaopen_cocos2d_ui_EditBoxDelegate_EditBoxEndAction(lua_State *L) return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccui_EditBoxDelegate_EditBoxEndAction(lua_State *L) +{ + olua_require(L, "cocos2d_ui", luaopen_cocos2d_ui); + if (!olua_getclass(L, "ccui.EditBoxDelegate.EditBoxEndAction")) { + luaL_error(L, "class not found: cocos2d::ui::EditBoxDelegate::EditBoxEndAction"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_ui_EditBoxDelegate___gc(lua_State *L) +static int _olua_fun_cocos2d_ui_EditBoxDelegate___gc(lua_State *L) { olua_startinvoke(L); @@ -22591,7 +23539,7 @@ static int _cocos2d_ui_EditBoxDelegate___gc(lua_State *L) return 0; } -static int _cocos2d_ui_EditBoxDelegate___olua_move(lua_State *L) +static int _olua_fun_cocos2d_ui_EditBoxDelegate___olua_move(lua_State *L) { olua_startinvoke(L); @@ -22603,17 +23551,17 @@ static int _cocos2d_ui_EditBoxDelegate___olua_move(lua_State *L) return 1; } -static int _cocos2d_ui_EditBoxDelegate_editBoxEditingDidBegin(lua_State *L) +static int _olua_fun_cocos2d_ui_EditBoxDelegate_editBoxEditingDidBegin(lua_State *L) { olua_startinvoke(L); cocos2d::ui::EditBoxDelegate *self = nullptr; - cocos2d::ui::EditBox *arg1 = nullptr; /** */ + cocos2d::ui::EditBox *arg1 = nullptr; /** arg1 */ olua_to_object(L, 1, &self, "ccui.EditBoxDelegate"); olua_check_object(L, 2, &arg1, "ccui.EditBox"); - // void editBoxEditingDidBegin(cocos2d::ui::EditBox *) + // void editBoxEditingDidBegin(cocos2d::ui::EditBox *arg1) self->editBoxEditingDidBegin(arg1); olua_endinvoke(L); @@ -22621,19 +23569,19 @@ static int _cocos2d_ui_EditBoxDelegate_editBoxEditingDidBegin(lua_State *L) return 0; } -static int _cocos2d_ui_EditBoxDelegate_editBoxEditingDidEndWithAction(lua_State *L) +static int _olua_fun_cocos2d_ui_EditBoxDelegate_editBoxEditingDidEndWithAction(lua_State *L) { olua_startinvoke(L); cocos2d::ui::EditBoxDelegate *self = nullptr; - cocos2d::ui::EditBox *arg1 = nullptr; /** */ - cocos2d::ui::EditBoxDelegate::EditBoxEndAction arg2 = (cocos2d::ui::EditBoxDelegate::EditBoxEndAction)0; /** */ + cocos2d::ui::EditBox *arg1 = nullptr; /** arg1 */ + cocos2d::ui::EditBoxDelegate::EditBoxEndAction arg2 = (cocos2d::ui::EditBoxDelegate::EditBoxEndAction)0; /** arg2 */ olua_to_object(L, 1, &self, "ccui.EditBoxDelegate"); olua_check_object(L, 2, &arg1, "ccui.EditBox"); olua_check_enum(L, 3, &arg2); - // void editBoxEditingDidEndWithAction(cocos2d::ui::EditBox *, cocos2d::ui::EditBoxDelegate::EditBoxEndAction ) + // void editBoxEditingDidEndWithAction(cocos2d::ui::EditBox *arg1, cocos2d::ui::EditBoxDelegate::EditBoxEndAction arg2) self->editBoxEditingDidEndWithAction(arg1, arg2); olua_endinvoke(L); @@ -22641,7 +23589,7 @@ static int _cocos2d_ui_EditBoxDelegate_editBoxEditingDidEndWithAction(lua_State return 0; } -static int _cocos2d_ui_EditBoxDelegate_editBoxReturn(lua_State *L) +static int _olua_fun_cocos2d_ui_EditBoxDelegate_editBoxReturn(lua_State *L) { olua_startinvoke(L); @@ -22659,19 +23607,19 @@ static int _cocos2d_ui_EditBoxDelegate_editBoxReturn(lua_State *L) return 0; } -static int _cocos2d_ui_EditBoxDelegate_editBoxTextChanged(lua_State *L) +static int _olua_fun_cocos2d_ui_EditBoxDelegate_editBoxTextChanged(lua_State *L) { olua_startinvoke(L); cocos2d::ui::EditBoxDelegate *self = nullptr; - cocos2d::ui::EditBox *arg1 = nullptr; /** */ - std::string arg2; /** */ + cocos2d::ui::EditBox *arg1 = nullptr; /** arg1 */ + std::string arg2; /** arg2 */ olua_to_object(L, 1, &self, "ccui.EditBoxDelegate"); olua_check_object(L, 2, &arg1, "ccui.EditBox"); olua_check_string(L, 3, &arg2); - // void editBoxTextChanged(cocos2d::ui::EditBox *, const std::string &) + // void editBoxTextChanged(cocos2d::ui::EditBox *arg1, const std::string &arg2) self->editBoxTextChanged(arg1, arg2); olua_endinvoke(L); @@ -22679,26 +23627,35 @@ static int _cocos2d_ui_EditBoxDelegate_editBoxTextChanged(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ui_EditBoxDelegate(lua_State *L) +static int _olua_cls_ccui_EditBoxDelegate(lua_State *L) { oluacls_class(L, "ccui.EditBoxDelegate"); - oluacls_func(L, "__gc", _cocos2d_ui_EditBoxDelegate___gc); - oluacls_func(L, "__olua_move", _cocos2d_ui_EditBoxDelegate___olua_move); - oluacls_func(L, "editBoxEditingDidBegin", _cocos2d_ui_EditBoxDelegate_editBoxEditingDidBegin); - oluacls_func(L, "editBoxEditingDidEndWithAction", _cocos2d_ui_EditBoxDelegate_editBoxEditingDidEndWithAction); - oluacls_func(L, "editBoxReturn", _cocos2d_ui_EditBoxDelegate_editBoxReturn); - oluacls_func(L, "editBoxTextChanged", _cocos2d_ui_EditBoxDelegate_editBoxTextChanged); + oluacls_func(L, "__gc", _olua_fun_cocos2d_ui_EditBoxDelegate___gc); + oluacls_func(L, "__olua_move", _olua_fun_cocos2d_ui_EditBoxDelegate___olua_move); + oluacls_func(L, "editBoxEditingDidBegin", _olua_fun_cocos2d_ui_EditBoxDelegate_editBoxEditingDidBegin); + oluacls_func(L, "editBoxEditingDidEndWithAction", _olua_fun_cocos2d_ui_EditBoxDelegate_editBoxEditingDidEndWithAction); + oluacls_func(L, "editBoxReturn", _olua_fun_cocos2d_ui_EditBoxDelegate_editBoxReturn); + oluacls_func(L, "editBoxTextChanged", _olua_fun_cocos2d_ui_EditBoxDelegate_editBoxTextChanged); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccui_EditBoxDelegate(lua_State *L) +{ + olua_require(L, "cocos2d_ui", luaopen_cocos2d_ui); + if (!olua_getclass(L, "ccui.EditBoxDelegate")) { + luaL_error(L, "class not found: cocos2d::ui::EditBoxDelegate"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_ui_LuaEditBoxDelegate_new(lua_State *L) +static int _olua_fun_cocos2d_ui_LuaEditBoxDelegate_new(lua_State *L) { olua_startinvoke(L); - // LuaEditBoxDelegate() + // cocos2d::ui::LuaEditBoxDelegate() cocos2d::ui::LuaEditBoxDelegate *ret = new cocos2d::ui::LuaEditBoxDelegate(); int num_ret = olua_push_object(L, ret, "ccui.LuaEditBoxDelegate"); olua_postnew(L, ret); @@ -22708,7 +23665,7 @@ static int _cocos2d_ui_LuaEditBoxDelegate_new(lua_State *L) return num_ret; } -static int _cocos2d_ui_LuaEditBoxDelegate_get_onEditingDidBegin(lua_State *L) +static int _olua_fun_cocos2d_ui_LuaEditBoxDelegate_onEditingDidBegin$1(lua_State *L) { olua_startinvoke(L); @@ -22720,7 +23677,7 @@ static int _cocos2d_ui_LuaEditBoxDelegate_get_onEditingDidBegin(lua_State *L) std::string cb_tag = "onEditingDidBegin"; olua_getcallback(L, cb_store, cb_tag.c_str(), OLUA_TAG_EQUAL); - // @nullable @localvar std::function onEditingDidBegin + // std::function onEditingDidBegin std::function ret = self->onEditingDidBegin; int num_ret = olua_push_callback(L, &ret, "std.function"); @@ -22729,7 +23686,7 @@ static int _cocos2d_ui_LuaEditBoxDelegate_get_onEditingDidBegin(lua_State *L) return num_ret; } -static int _cocos2d_ui_LuaEditBoxDelegate_set_onEditingDidBegin(lua_State *L) +static int _olua_fun_cocos2d_ui_LuaEditBoxDelegate_onEditingDidBegin$2(lua_State *L) { olua_startinvoke(L); @@ -22745,9 +23702,10 @@ static int _cocos2d_ui_LuaEditBoxDelegate_set_onEditingDidBegin(lua_State *L) std::string cb_tag = "onEditingDidBegin"; std::string cb_name; if (olua_isfunction(L, 2)) { - cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](cocos2d::ui::EditBox *arg1) { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](cocos2d::ui::EditBox *cb_arg1) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); @@ -22755,7 +23713,7 @@ static int _cocos2d_ui_LuaEditBoxDelegate_set_onEditingDidBegin(lua_State *L) int top = lua_gettop(L); size_t last = olua_push_objpool(L); olua_enable_objpool(L); - olua_push_object(L, arg1, "ccui.EditBox"); + olua_push_object(L, cb_arg1, "ccui.EditBox"); olua_disable_objpool(L); olua_callback(L, cb_store, cb_name.c_str(), 1); @@ -22770,7 +23728,7 @@ static int _cocos2d_ui_LuaEditBoxDelegate_set_onEditingDidBegin(lua_State *L) arg1 = nullptr; } - // @nullable @localvar std::function onEditingDidBegin + // std::function onEditingDidBegin self->onEditingDidBegin = arg1; olua_endinvoke(L); @@ -22778,7 +23736,28 @@ static int _cocos2d_ui_LuaEditBoxDelegate_set_onEditingDidBegin(lua_State *L) return 0; } -static int _cocos2d_ui_LuaEditBoxDelegate_get_onEditingDidEndWithAction(lua_State *L) +static int _olua_fun_cocos2d_ui_LuaEditBoxDelegate_onEditingDidBegin(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // std::function onEditingDidBegin + return _olua_fun_cocos2d_ui_LuaEditBoxDelegate_onEditingDidBegin$1(L); + } + + if (num_args == 1) { + // if ((olua_is_callback(L, 2, "std.function") || olua_isnil(L, 2))) { + // std::function onEditingDidBegin + return _olua_fun_cocos2d_ui_LuaEditBoxDelegate_onEditingDidBegin$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::ui::LuaEditBoxDelegate::onEditingDidBegin' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_ui_LuaEditBoxDelegate_onEditingDidEndWithAction$1(lua_State *L) { olua_startinvoke(L); @@ -22790,7 +23769,7 @@ static int _cocos2d_ui_LuaEditBoxDelegate_get_onEditingDidEndWithAction(lua_Stat std::string cb_tag = "onEditingDidEndWithAction"; olua_getcallback(L, cb_store, cb_tag.c_str(), OLUA_TAG_EQUAL); - // @nullable @localvar std::function onEditingDidEndWithAction + // std::function onEditingDidEndWithAction std::function ret = self->onEditingDidEndWithAction; int num_ret = olua_push_callback(L, &ret, "std.function"); @@ -22799,7 +23778,7 @@ static int _cocos2d_ui_LuaEditBoxDelegate_get_onEditingDidEndWithAction(lua_Stat return num_ret; } -static int _cocos2d_ui_LuaEditBoxDelegate_set_onEditingDidEndWithAction(lua_State *L) +static int _olua_fun_cocos2d_ui_LuaEditBoxDelegate_onEditingDidEndWithAction$2(lua_State *L) { olua_startinvoke(L); @@ -22815,9 +23794,10 @@ static int _cocos2d_ui_LuaEditBoxDelegate_set_onEditingDidEndWithAction(lua_Stat std::string cb_tag = "onEditingDidEndWithAction"; std::string cb_name; if (olua_isfunction(L, 2)) { - cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](cocos2d::ui::EditBox *arg1, cocos2d::ui::EditBoxDelegate::EditBoxEndAction arg2) { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](cocos2d::ui::EditBox *cb_arg1, cocos2d::ui::EditBoxDelegate::EditBoxEndAction cb_arg2) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); @@ -22825,8 +23805,8 @@ static int _cocos2d_ui_LuaEditBoxDelegate_set_onEditingDidEndWithAction(lua_Stat int top = lua_gettop(L); size_t last = olua_push_objpool(L); olua_enable_objpool(L); - olua_push_object(L, arg1, "ccui.EditBox"); - olua_push_enum(L, arg2); + olua_push_object(L, cb_arg1, "ccui.EditBox"); + olua_push_enum(L, cb_arg2); olua_disable_objpool(L); olua_callback(L, cb_store, cb_name.c_str(), 2); @@ -22841,7 +23821,7 @@ static int _cocos2d_ui_LuaEditBoxDelegate_set_onEditingDidEndWithAction(lua_Stat arg1 = nullptr; } - // @nullable @localvar std::function onEditingDidEndWithAction + // std::function onEditingDidEndWithAction self->onEditingDidEndWithAction = arg1; olua_endinvoke(L); @@ -22849,7 +23829,28 @@ static int _cocos2d_ui_LuaEditBoxDelegate_set_onEditingDidEndWithAction(lua_Stat return 0; } -static int _cocos2d_ui_LuaEditBoxDelegate_get_onReturn(lua_State *L) +static int _olua_fun_cocos2d_ui_LuaEditBoxDelegate_onEditingDidEndWithAction(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // std::function onEditingDidEndWithAction + return _olua_fun_cocos2d_ui_LuaEditBoxDelegate_onEditingDidEndWithAction$1(L); + } + + if (num_args == 1) { + // if ((olua_is_callback(L, 2, "std.function") || olua_isnil(L, 2))) { + // std::function onEditingDidEndWithAction + return _olua_fun_cocos2d_ui_LuaEditBoxDelegate_onEditingDidEndWithAction$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::ui::LuaEditBoxDelegate::onEditingDidEndWithAction' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_ui_LuaEditBoxDelegate_onReturn$1(lua_State *L) { olua_startinvoke(L); @@ -22861,7 +23862,7 @@ static int _cocos2d_ui_LuaEditBoxDelegate_get_onReturn(lua_State *L) std::string cb_tag = "onReturn"; olua_getcallback(L, cb_store, cb_tag.c_str(), OLUA_TAG_EQUAL); - // @nullable @localvar std::function onReturn + // std::function onReturn std::function ret = self->onReturn; int num_ret = olua_push_callback(L, &ret, "std.function"); @@ -22870,7 +23871,7 @@ static int _cocos2d_ui_LuaEditBoxDelegate_get_onReturn(lua_State *L) return num_ret; } -static int _cocos2d_ui_LuaEditBoxDelegate_set_onReturn(lua_State *L) +static int _olua_fun_cocos2d_ui_LuaEditBoxDelegate_onReturn$2(lua_State *L) { olua_startinvoke(L); @@ -22886,9 +23887,10 @@ static int _cocos2d_ui_LuaEditBoxDelegate_set_onReturn(lua_State *L) std::string cb_tag = "onReturn"; std::string cb_name; if (olua_isfunction(L, 2)) { - cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](cocos2d::ui::EditBox *arg1) { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](cocos2d::ui::EditBox *cb_arg1) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); @@ -22896,7 +23898,7 @@ static int _cocos2d_ui_LuaEditBoxDelegate_set_onReturn(lua_State *L) int top = lua_gettop(L); size_t last = olua_push_objpool(L); olua_enable_objpool(L); - olua_push_object(L, arg1, "ccui.EditBox"); + olua_push_object(L, cb_arg1, "ccui.EditBox"); olua_disable_objpool(L); olua_callback(L, cb_store, cb_name.c_str(), 1); @@ -22911,7 +23913,7 @@ static int _cocos2d_ui_LuaEditBoxDelegate_set_onReturn(lua_State *L) arg1 = nullptr; } - // @nullable @localvar std::function onReturn + // std::function onReturn self->onReturn = arg1; olua_endinvoke(L); @@ -22919,7 +23921,28 @@ static int _cocos2d_ui_LuaEditBoxDelegate_set_onReturn(lua_State *L) return 0; } -static int _cocos2d_ui_LuaEditBoxDelegate_get_onTextChanged(lua_State *L) +static int _olua_fun_cocos2d_ui_LuaEditBoxDelegate_onReturn(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // std::function onReturn + return _olua_fun_cocos2d_ui_LuaEditBoxDelegate_onReturn$1(L); + } + + if (num_args == 1) { + // if ((olua_is_callback(L, 2, "std.function") || olua_isnil(L, 2))) { + // std::function onReturn + return _olua_fun_cocos2d_ui_LuaEditBoxDelegate_onReturn$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::ui::LuaEditBoxDelegate::onReturn' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_cocos2d_ui_LuaEditBoxDelegate_onTextChanged$1(lua_State *L) { olua_startinvoke(L); @@ -22931,7 +23954,7 @@ static int _cocos2d_ui_LuaEditBoxDelegate_get_onTextChanged(lua_State *L) std::string cb_tag = "onTextChanged"; olua_getcallback(L, cb_store, cb_tag.c_str(), OLUA_TAG_EQUAL); - // @nullable @localvar std::function onTextChanged + // std::function onTextChanged std::function ret = self->onTextChanged; int num_ret = olua_push_callback(L, &ret, "std.function"); @@ -22940,7 +23963,7 @@ static int _cocos2d_ui_LuaEditBoxDelegate_get_onTextChanged(lua_State *L) return num_ret; } -static int _cocos2d_ui_LuaEditBoxDelegate_set_onTextChanged(lua_State *L) +static int _olua_fun_cocos2d_ui_LuaEditBoxDelegate_onTextChanged$2(lua_State *L) { olua_startinvoke(L); @@ -22956,9 +23979,10 @@ static int _cocos2d_ui_LuaEditBoxDelegate_set_onTextChanged(lua_State *L) std::string cb_tag = "onTextChanged"; std::string cb_name; if (olua_isfunction(L, 2)) { - cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](cocos2d::ui::EditBox *arg1, const std::string &arg2) { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](cocos2d::ui::EditBox *cb_arg1, const std::string &cb_arg2) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); @@ -22966,8 +23990,8 @@ static int _cocos2d_ui_LuaEditBoxDelegate_set_onTextChanged(lua_State *L) int top = lua_gettop(L); size_t last = olua_push_objpool(L); olua_enable_objpool(L); - olua_push_object(L, arg1, "ccui.EditBox"); - olua_push_string(L, arg2); + olua_push_object(L, cb_arg1, "ccui.EditBox"); + olua_push_string(L, cb_arg2); olua_disable_objpool(L); olua_callback(L, cb_store, cb_name.c_str(), 2); @@ -22982,7 +24006,7 @@ static int _cocos2d_ui_LuaEditBoxDelegate_set_onTextChanged(lua_State *L) arg1 = nullptr; } - // @nullable @localvar std::function onTextChanged + // std::function onTextChanged self->onTextChanged = arg1; olua_endinvoke(L); @@ -22990,22 +24014,51 @@ static int _cocos2d_ui_LuaEditBoxDelegate_set_onTextChanged(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ui_LuaEditBoxDelegate(lua_State *L) +static int _olua_fun_cocos2d_ui_LuaEditBoxDelegate_onTextChanged(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // std::function onTextChanged + return _olua_fun_cocos2d_ui_LuaEditBoxDelegate_onTextChanged$1(L); + } + + if (num_args == 1) { + // if ((olua_is_callback(L, 2, "std.function") || olua_isnil(L, 2))) { + // std::function onTextChanged + return _olua_fun_cocos2d_ui_LuaEditBoxDelegate_onTextChanged$2(L); + // } + } + + luaL_error(L, "method 'cocos2d::ui::LuaEditBoxDelegate::onTextChanged' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_cls_ccui_LuaEditBoxDelegate(lua_State *L) { oluacls_class(L, "ccui.LuaEditBoxDelegate"); - oluacls_func(L, "new", _cocos2d_ui_LuaEditBoxDelegate_new); - oluacls_prop(L, "onEditingDidBegin", _cocos2d_ui_LuaEditBoxDelegate_get_onEditingDidBegin, _cocos2d_ui_LuaEditBoxDelegate_set_onEditingDidBegin); - oluacls_prop(L, "onEditingDidEndWithAction", _cocos2d_ui_LuaEditBoxDelegate_get_onEditingDidEndWithAction, _cocos2d_ui_LuaEditBoxDelegate_set_onEditingDidEndWithAction); - oluacls_prop(L, "onReturn", _cocos2d_ui_LuaEditBoxDelegate_get_onReturn, _cocos2d_ui_LuaEditBoxDelegate_set_onReturn); - oluacls_prop(L, "onTextChanged", _cocos2d_ui_LuaEditBoxDelegate_get_onTextChanged, _cocos2d_ui_LuaEditBoxDelegate_set_onTextChanged); + oluacls_func(L, "new", _olua_fun_cocos2d_ui_LuaEditBoxDelegate_new); + oluacls_prop(L, "onEditingDidBegin", _olua_fun_cocos2d_ui_LuaEditBoxDelegate_onEditingDidBegin, _olua_fun_cocos2d_ui_LuaEditBoxDelegate_onEditingDidBegin); + oluacls_prop(L, "onEditingDidEndWithAction", _olua_fun_cocos2d_ui_LuaEditBoxDelegate_onEditingDidEndWithAction, _olua_fun_cocos2d_ui_LuaEditBoxDelegate_onEditingDidEndWithAction); + oluacls_prop(L, "onReturn", _olua_fun_cocos2d_ui_LuaEditBoxDelegate_onReturn, _olua_fun_cocos2d_ui_LuaEditBoxDelegate_onReturn); + oluacls_prop(L, "onTextChanged", _olua_fun_cocos2d_ui_LuaEditBoxDelegate_onTextChanged, _olua_fun_cocos2d_ui_LuaEditBoxDelegate_onTextChanged); return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ui_EditBox_KeyboardReturnType(lua_State *L) +OLUA_LIB int luaopen_ccui_LuaEditBoxDelegate(lua_State *L) +{ + olua_require(L, "cocos2d_ui", luaopen_cocos2d_ui); + if (!olua_getclass(L, "ccui.LuaEditBoxDelegate")) { + luaL_error(L, "class not found: cocos2d::ui::LuaEditBoxDelegate"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_ccui_EditBox_KeyboardReturnType(lua_State *L) { oluacls_class(L, "ccui.EditBox.KeyboardReturnType"); oluacls_func(L, "__index", olua_indexerror); @@ -23019,10 +24072,19 @@ OLUA_LIB int luaopen_cocos2d_ui_EditBox_KeyboardReturnType(lua_State *L) return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ui_EditBox_InputMode(lua_State *L) +OLUA_LIB int luaopen_ccui_EditBox_KeyboardReturnType(lua_State *L) +{ + olua_require(L, "cocos2d_ui", luaopen_cocos2d_ui); + if (!olua_getclass(L, "ccui.EditBox.KeyboardReturnType")) { + luaL_error(L, "class not found: cocos2d::ui::EditBox::KeyboardReturnType"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_ccui_EditBox_InputMode(lua_State *L) { oluacls_class(L, "ccui.EditBox.InputMode"); oluacls_func(L, "__index", olua_indexerror); @@ -23037,10 +24099,19 @@ OLUA_LIB int luaopen_cocos2d_ui_EditBox_InputMode(lua_State *L) return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ui_EditBox_InputFlag(lua_State *L) +OLUA_LIB int luaopen_ccui_EditBox_InputMode(lua_State *L) +{ + olua_require(L, "cocos2d_ui", luaopen_cocos2d_ui); + if (!olua_getclass(L, "ccui.EditBox.InputMode")) { + luaL_error(L, "class not found: cocos2d::ui::EditBox::InputMode"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_ccui_EditBox_InputFlag(lua_State *L) { oluacls_class(L, "ccui.EditBox.InputFlag"); oluacls_func(L, "__index", olua_indexerror); @@ -23054,9 +24125,19 @@ OLUA_LIB int luaopen_cocos2d_ui_EditBox_InputFlag(lua_State *L) return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccui_EditBox_InputFlag(lua_State *L) +{ + olua_require(L, "cocos2d_ui", luaopen_cocos2d_ui); + if (!olua_getclass(L, "ccui.EditBox.InputFlag")) { + luaL_error(L, "class not found: cocos2d::ui::EditBox::InputFlag"); + } + return 1; +} OLUA_END_DECLS -static int _cocos2d_ui_EditBox_as(lua_State *L) +static int _olua_fun_cocos2d_ui_EditBox_as(lua_State *L) { olua_startinvoke(L); @@ -23088,7 +24169,7 @@ static int _cocos2d_ui_EditBox_as(lua_State *L) return 1; } -static int _cocos2d_ui_EditBox_attachWithIME(lua_State *L) +static int _olua_fun_cocos2d_ui_EditBox_attachWithIME(lua_State *L) { olua_startinvoke(L); @@ -23105,11 +24186,11 @@ static int _cocos2d_ui_EditBox_attachWithIME(lua_State *L) return num_ret; } -static int _cocos2d_ui_EditBox_create$1(lua_State *L) +static int _olua_fun_cocos2d_ui_EditBox_create$1(lua_State *L) { olua_startinvoke(L); - cocos2d::Size arg1; /** size */ + cocos2d::Size *arg1; /** size */ cocos2d::ui::Scale9Sprite *arg2 = nullptr; /** normalSprite */ cocos2d::ui::Scale9Sprite *arg3 = nullptr; /** pressedSprite */ cocos2d::ui::Scale9Sprite *arg4 = nullptr; /** disabledSprite */ @@ -23120,7 +24201,7 @@ static int _cocos2d_ui_EditBox_create$1(lua_State *L) olua_check_object(L, 4, &arg4, "ccui.Scale9Sprite"); // static cocos2d::ui::EditBox *create(const cocos2d::Size &size, cocos2d::ui::Scale9Sprite *normalSprite, @optional cocos2d::ui::Scale9Sprite *pressedSprite, @optional cocos2d::ui::Scale9Sprite *disabledSprite) - cocos2d::ui::EditBox *ret = cocos2d::ui::EditBox::create(arg1, arg2, arg3, arg4); + cocos2d::ui::EditBox *ret = cocos2d::ui::EditBox::create(*arg1, arg2, arg3, arg4); int num_ret = olua_push_object(L, ret, "ccui.EditBox"); olua_endinvoke(L); @@ -23128,20 +24209,18 @@ static int _cocos2d_ui_EditBox_create$1(lua_State *L) return num_ret; } -static int _cocos2d_ui_EditBox_create$2(lua_State *L) +static int _olua_fun_cocos2d_ui_EditBox_create$2(lua_State *L) { olua_startinvoke(L); - cocos2d::Size arg1; /** size */ - std::string arg2; /** normalImage */ - cocos2d::ui::Widget::TextureResType arg3 = (cocos2d::ui::Widget::TextureResType)0; /** texType */ + cocos2d::Size *arg1; /** size */ + cocos2d::ui::Scale9Sprite *arg2 = nullptr; /** normalSprite */ olua_check_object(L, 1, &arg1, "cc.Size"); - olua_check_string(L, 2, &arg2); - olua_check_enum(L, 3, &arg3); + olua_check_object(L, 2, &arg2, "ccui.Scale9Sprite"); - // static cocos2d::ui::EditBox *create(const cocos2d::Size &size, const std::string &normalImage, cocos2d::ui::Widget::TextureResType texType) - cocos2d::ui::EditBox *ret = cocos2d::ui::EditBox::create(arg1, arg2, arg3); + // static cocos2d::ui::EditBox *create(const cocos2d::Size &size, cocos2d::ui::Scale9Sprite *normalSprite) + cocos2d::ui::EditBox *ret = cocos2d::ui::EditBox::create(*arg1, arg2); int num_ret = olua_push_object(L, ret, "ccui.EditBox"); olua_endinvoke(L); @@ -23149,24 +24228,20 @@ static int _cocos2d_ui_EditBox_create$2(lua_State *L) return num_ret; } -static int _cocos2d_ui_EditBox_create$3(lua_State *L) +static int _olua_fun_cocos2d_ui_EditBox_create$3(lua_State *L) { olua_startinvoke(L); - cocos2d::Size arg1; /** size */ - std::string arg2; /** normalImage */ - std::string arg3; /** pressedImage */ - std::string arg4; /** disabledImage */ - cocos2d::ui::Widget::TextureResType arg5 = (cocos2d::ui::Widget::TextureResType)0; /** texType */ + cocos2d::Size *arg1; /** size */ + cocos2d::ui::Scale9Sprite *arg2 = nullptr; /** normalSprite */ + cocos2d::ui::Scale9Sprite *arg3 = nullptr; /** pressedSprite */ olua_check_object(L, 1, &arg1, "cc.Size"); - olua_check_string(L, 2, &arg2); - olua_check_string(L, 3, &arg3); - olua_check_string(L, 4, &arg4); - olua_check_enum(L, 5, &arg5); + olua_check_object(L, 2, &arg2, "ccui.Scale9Sprite"); + olua_check_object(L, 3, &arg3, "ccui.Scale9Sprite"); - // static cocos2d::ui::EditBox *create(const cocos2d::Size &size, const std::string &normalImage, @optional const std::string &pressedImage, @optional const std::string &disabledImage, @optional cocos2d::ui::Widget::TextureResType texType) - cocos2d::ui::EditBox *ret = cocos2d::ui::EditBox::create(arg1, arg2, arg3, arg4, arg5); + // static cocos2d::ui::EditBox *create(const cocos2d::Size &size, cocos2d::ui::Scale9Sprite *normalSprite, @optional cocos2d::ui::Scale9Sprite *pressedSprite) + cocos2d::ui::EditBox *ret = cocos2d::ui::EditBox::create(*arg1, arg2, arg3); int num_ret = olua_push_object(L, ret, "ccui.EditBox"); olua_endinvoke(L); @@ -23174,18 +24249,20 @@ static int _cocos2d_ui_EditBox_create$3(lua_State *L) return num_ret; } -static int _cocos2d_ui_EditBox_create$4(lua_State *L) +static int _olua_fun_cocos2d_ui_EditBox_create$4(lua_State *L) { olua_startinvoke(L); - cocos2d::Size arg1; /** size */ - cocos2d::ui::Scale9Sprite *arg2 = nullptr; /** normalSprite */ + cocos2d::Size *arg1; /** size */ + std::string arg2; /** normalImage */ + cocos2d::ui::Widget::TextureResType arg3 = (cocos2d::ui::Widget::TextureResType)0; /** texType */ olua_check_object(L, 1, &arg1, "cc.Size"); - olua_check_object(L, 2, &arg2, "ccui.Scale9Sprite"); + olua_check_string(L, 2, &arg2); + olua_check_enum(L, 3, &arg3); - // static cocos2d::ui::EditBox *create(const cocos2d::Size &size, cocos2d::ui::Scale9Sprite *normalSprite, @optional cocos2d::ui::Scale9Sprite *pressedSprite, @optional cocos2d::ui::Scale9Sprite *disabledSprite) - cocos2d::ui::EditBox *ret = cocos2d::ui::EditBox::create(arg1, arg2); + // static cocos2d::ui::EditBox *create(const cocos2d::Size &size, const std::string &normalImage, cocos2d::ui::Widget::TextureResType texType) + cocos2d::ui::EditBox *ret = cocos2d::ui::EditBox::create(*arg1, arg2, arg3); int num_ret = olua_push_object(L, ret, "ccui.EditBox"); olua_endinvoke(L); @@ -23193,20 +24270,24 @@ static int _cocos2d_ui_EditBox_create$4(lua_State *L) return num_ret; } -static int _cocos2d_ui_EditBox_create$5(lua_State *L) +static int _olua_fun_cocos2d_ui_EditBox_create$5(lua_State *L) { olua_startinvoke(L); - cocos2d::Size arg1; /** size */ - cocos2d::ui::Scale9Sprite *arg2 = nullptr; /** normalSprite */ - cocos2d::ui::Scale9Sprite *arg3 = nullptr; /** pressedSprite */ + cocos2d::Size *arg1; /** size */ + std::string arg2; /** normalImage */ + std::string arg3; /** pressedImage */ + std::string arg4; /** disabledImage */ + cocos2d::ui::Widget::TextureResType arg5 = (cocos2d::ui::Widget::TextureResType)0; /** texType */ olua_check_object(L, 1, &arg1, "cc.Size"); - olua_check_object(L, 2, &arg2, "ccui.Scale9Sprite"); - olua_check_object(L, 3, &arg3, "ccui.Scale9Sprite"); + olua_check_string(L, 2, &arg2); + olua_check_string(L, 3, &arg3); + olua_check_string(L, 4, &arg4); + olua_check_enum(L, 5, &arg5); - // static cocos2d::ui::EditBox *create(const cocos2d::Size &size, cocos2d::ui::Scale9Sprite *normalSprite, @optional cocos2d::ui::Scale9Sprite *pressedSprite, @optional cocos2d::ui::Scale9Sprite *disabledSprite) - cocos2d::ui::EditBox *ret = cocos2d::ui::EditBox::create(arg1, arg2, arg3); + // static cocos2d::ui::EditBox *create(const cocos2d::Size &size, const std::string &normalImage, @optional const std::string &pressedImage, @optional const std::string &disabledImage, @optional cocos2d::ui::Widget::TextureResType texType) + cocos2d::ui::EditBox *ret = cocos2d::ui::EditBox::create(*arg1, arg2, arg3, arg4, arg5); int num_ret = olua_push_object(L, ret, "ccui.EditBox"); olua_endinvoke(L); @@ -23214,18 +24295,18 @@ static int _cocos2d_ui_EditBox_create$5(lua_State *L) return num_ret; } -static int _cocos2d_ui_EditBox_create$6(lua_State *L) +static int _olua_fun_cocos2d_ui_EditBox_create$6(lua_State *L) { olua_startinvoke(L); - cocos2d::Size arg1; /** size */ + cocos2d::Size *arg1; /** size */ std::string arg2; /** normalImage */ olua_check_object(L, 1, &arg1, "cc.Size"); olua_check_string(L, 2, &arg2); - // static cocos2d::ui::EditBox *create(const cocos2d::Size &size, const std::string &normalImage, @optional const std::string &pressedImage, @optional const std::string &disabledImage, @optional cocos2d::ui::Widget::TextureResType texType) - cocos2d::ui::EditBox *ret = cocos2d::ui::EditBox::create(arg1, arg2); + // static cocos2d::ui::EditBox *create(const cocos2d::Size &size, const std::string &normalImage) + cocos2d::ui::EditBox *ret = cocos2d::ui::EditBox::create(*arg1, arg2); int num_ret = olua_push_object(L, ret, "ccui.EditBox"); olua_endinvoke(L); @@ -23233,11 +24314,11 @@ static int _cocos2d_ui_EditBox_create$6(lua_State *L) return num_ret; } -static int _cocos2d_ui_EditBox_create$7(lua_State *L) +static int _olua_fun_cocos2d_ui_EditBox_create$7(lua_State *L) { olua_startinvoke(L); - cocos2d::Size arg1; /** size */ + cocos2d::Size *arg1; /** size */ std::string arg2; /** normalImage */ std::string arg3; /** pressedImage */ @@ -23245,8 +24326,8 @@ static int _cocos2d_ui_EditBox_create$7(lua_State *L) olua_check_string(L, 2, &arg2); olua_check_string(L, 3, &arg3); - // static cocos2d::ui::EditBox *create(const cocos2d::Size &size, const std::string &normalImage, @optional const std::string &pressedImage, @optional const std::string &disabledImage, @optional cocos2d::ui::Widget::TextureResType texType) - cocos2d::ui::EditBox *ret = cocos2d::ui::EditBox::create(arg1, arg2, arg3); + // static cocos2d::ui::EditBox *create(const cocos2d::Size &size, const std::string &normalImage, @optional const std::string &pressedImage) + cocos2d::ui::EditBox *ret = cocos2d::ui::EditBox::create(*arg1, arg2, arg3); int num_ret = olua_push_object(L, ret, "ccui.EditBox"); olua_endinvoke(L); @@ -23254,11 +24335,11 @@ static int _cocos2d_ui_EditBox_create$7(lua_State *L) return num_ret; } -static int _cocos2d_ui_EditBox_create$8(lua_State *L) +static int _olua_fun_cocos2d_ui_EditBox_create$8(lua_State *L) { olua_startinvoke(L); - cocos2d::Size arg1; /** size */ + cocos2d::Size *arg1; /** size */ std::string arg2; /** normalImage */ std::string arg3; /** pressedImage */ std::string arg4; /** disabledImage */ @@ -23268,8 +24349,8 @@ static int _cocos2d_ui_EditBox_create$8(lua_State *L) olua_check_string(L, 3, &arg3); olua_check_string(L, 4, &arg4); - // static cocos2d::ui::EditBox *create(const cocos2d::Size &size, const std::string &normalImage, @optional const std::string &pressedImage, @optional const std::string &disabledImage, @optional cocos2d::ui::Widget::TextureResType texType) - cocos2d::ui::EditBox *ret = cocos2d::ui::EditBox::create(arg1, arg2, arg3, arg4); + // static cocos2d::ui::EditBox *create(const cocos2d::Size &size, const std::string &normalImage, @optional const std::string &pressedImage, @optional const std::string &disabledImage) + cocos2d::ui::EditBox *ret = cocos2d::ui::EditBox::create(*arg1, arg2, arg3, arg4); int num_ret = olua_push_object(L, ret, "ccui.EditBox"); olua_endinvoke(L); @@ -23277,55 +24358,55 @@ static int _cocos2d_ui_EditBox_create$8(lua_State *L) return num_ret; } -static int _cocos2d_ui_EditBox_create(lua_State *L) +static int _olua_fun_cocos2d_ui_EditBox_create(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 2) { if ((olua_is_object(L, 1, "cc.Size")) && (olua_is_object(L, 2, "ccui.Scale9Sprite"))) { - // static cocos2d::ui::EditBox *create(const cocos2d::Size &size, cocos2d::ui::Scale9Sprite *normalSprite, @optional cocos2d::ui::Scale9Sprite *pressedSprite, @optional cocos2d::ui::Scale9Sprite *disabledSprite) - return _cocos2d_ui_EditBox_create$4(L); + // static cocos2d::ui::EditBox *create(const cocos2d::Size &size, cocos2d::ui::Scale9Sprite *normalSprite) + return _olua_fun_cocos2d_ui_EditBox_create$2(L); } // if ((olua_is_object(L, 1, "cc.Size")) && (olua_is_string(L, 2))) { - // static cocos2d::ui::EditBox *create(const cocos2d::Size &size, const std::string &normalImage, @optional const std::string &pressedImage, @optional const std::string &disabledImage, @optional cocos2d::ui::Widget::TextureResType texType) - return _cocos2d_ui_EditBox_create$6(L); + // static cocos2d::ui::EditBox *create(const cocos2d::Size &size, const std::string &normalImage) + return _olua_fun_cocos2d_ui_EditBox_create$6(L); // } } if (num_args == 3) { - if ((olua_is_object(L, 1, "cc.Size")) && (olua_is_string(L, 2)) && (olua_is_enum(L, 3))) { - // static cocos2d::ui::EditBox *create(const cocos2d::Size &size, const std::string &normalImage, cocos2d::ui::Widget::TextureResType texType) - return _cocos2d_ui_EditBox_create$2(L); + if ((olua_is_object(L, 1, "cc.Size")) && (olua_is_object(L, 2, "ccui.Scale9Sprite")) && (olua_is_object(L, 3, "ccui.Scale9Sprite"))) { + // static cocos2d::ui::EditBox *create(const cocos2d::Size &size, cocos2d::ui::Scale9Sprite *normalSprite, @optional cocos2d::ui::Scale9Sprite *pressedSprite) + return _olua_fun_cocos2d_ui_EditBox_create$3(L); } - if ((olua_is_object(L, 1, "cc.Size")) && (olua_is_object(L, 2, "ccui.Scale9Sprite")) && (olua_is_object(L, 3, "ccui.Scale9Sprite"))) { - // static cocos2d::ui::EditBox *create(const cocos2d::Size &size, cocos2d::ui::Scale9Sprite *normalSprite, @optional cocos2d::ui::Scale9Sprite *pressedSprite, @optional cocos2d::ui::Scale9Sprite *disabledSprite) - return _cocos2d_ui_EditBox_create$5(L); + if ((olua_is_object(L, 1, "cc.Size")) && (olua_is_string(L, 2)) && (olua_is_enum(L, 3))) { + // static cocos2d::ui::EditBox *create(const cocos2d::Size &size, const std::string &normalImage, cocos2d::ui::Widget::TextureResType texType) + return _olua_fun_cocos2d_ui_EditBox_create$4(L); } // if ((olua_is_object(L, 1, "cc.Size")) && (olua_is_string(L, 2)) && (olua_is_string(L, 3))) { - // static cocos2d::ui::EditBox *create(const cocos2d::Size &size, const std::string &normalImage, @optional const std::string &pressedImage, @optional const std::string &disabledImage, @optional cocos2d::ui::Widget::TextureResType texType) - return _cocos2d_ui_EditBox_create$7(L); + // static cocos2d::ui::EditBox *create(const cocos2d::Size &size, const std::string &normalImage, @optional const std::string &pressedImage) + return _olua_fun_cocos2d_ui_EditBox_create$7(L); // } } if (num_args == 4) { if ((olua_is_object(L, 1, "cc.Size")) && (olua_is_object(L, 2, "ccui.Scale9Sprite")) && (olua_is_object(L, 3, "ccui.Scale9Sprite")) && (olua_is_object(L, 4, "ccui.Scale9Sprite"))) { // static cocos2d::ui::EditBox *create(const cocos2d::Size &size, cocos2d::ui::Scale9Sprite *normalSprite, @optional cocos2d::ui::Scale9Sprite *pressedSprite, @optional cocos2d::ui::Scale9Sprite *disabledSprite) - return _cocos2d_ui_EditBox_create$1(L); + return _olua_fun_cocos2d_ui_EditBox_create$1(L); } // if ((olua_is_object(L, 1, "cc.Size")) && (olua_is_string(L, 2)) && (olua_is_string(L, 3)) && (olua_is_string(L, 4))) { - // static cocos2d::ui::EditBox *create(const cocos2d::Size &size, const std::string &normalImage, @optional const std::string &pressedImage, @optional const std::string &disabledImage, @optional cocos2d::ui::Widget::TextureResType texType) - return _cocos2d_ui_EditBox_create$8(L); + // static cocos2d::ui::EditBox *create(const cocos2d::Size &size, const std::string &normalImage, @optional const std::string &pressedImage, @optional const std::string &disabledImage) + return _olua_fun_cocos2d_ui_EditBox_create$8(L); // } } if (num_args == 5) { // if ((olua_is_object(L, 1, "cc.Size")) && (olua_is_string(L, 2)) && (olua_is_string(L, 3)) && (olua_is_string(L, 4)) && (olua_is_enum(L, 5))) { // static cocos2d::ui::EditBox *create(const cocos2d::Size &size, const std::string &normalImage, @optional const std::string &pressedImage, @optional const std::string &disabledImage, @optional cocos2d::ui::Widget::TextureResType texType) - return _cocos2d_ui_EditBox_create$3(L); + return _olua_fun_cocos2d_ui_EditBox_create$5(L); // } } @@ -23334,7 +24415,7 @@ static int _cocos2d_ui_EditBox_create(lua_State *L) return 0; } -static int _cocos2d_ui_EditBox_detachWithIME(lua_State *L) +static int _olua_fun_cocos2d_ui_EditBox_detachWithIME(lua_State *L) { olua_startinvoke(L); @@ -23351,7 +24432,7 @@ static int _cocos2d_ui_EditBox_detachWithIME(lua_State *L) return num_ret; } -static int _cocos2d_ui_EditBox_getCapInsetsDisabledRenderer(lua_State *L) +static int _olua_fun_cocos2d_ui_EditBox_getCapInsetsDisabledRenderer(lua_State *L) { olua_startinvoke(L); @@ -23368,7 +24449,7 @@ static int _cocos2d_ui_EditBox_getCapInsetsDisabledRenderer(lua_State *L) return num_ret; } -static int _cocos2d_ui_EditBox_getCapInsetsNormalRenderer(lua_State *L) +static int _olua_fun_cocos2d_ui_EditBox_getCapInsetsNormalRenderer(lua_State *L) { olua_startinvoke(L); @@ -23385,7 +24466,7 @@ static int _cocos2d_ui_EditBox_getCapInsetsNormalRenderer(lua_State *L) return num_ret; } -static int _cocos2d_ui_EditBox_getCapInsetsPressedRenderer(lua_State *L) +static int _olua_fun_cocos2d_ui_EditBox_getCapInsetsPressedRenderer(lua_State *L) { olua_startinvoke(L); @@ -23402,7 +24483,7 @@ static int _cocos2d_ui_EditBox_getCapInsetsPressedRenderer(lua_State *L) return num_ret; } -static int _cocos2d_ui_EditBox_getDelegate(lua_State *L) +static int _olua_fun_cocos2d_ui_EditBox_getDelegate(lua_State *L) { olua_startinvoke(L); @@ -23422,7 +24503,7 @@ static int _cocos2d_ui_EditBox_getDelegate(lua_State *L) return num_ret; } -static int _cocos2d_ui_EditBox_getFontColor(lua_State *L) +static int _olua_fun_cocos2d_ui_EditBox_getFontColor(lua_State *L) { olua_startinvoke(L); @@ -23439,7 +24520,7 @@ static int _cocos2d_ui_EditBox_getFontColor(lua_State *L) return num_ret; } -static int _cocos2d_ui_EditBox_getFontName(lua_State *L) +static int _olua_fun_cocos2d_ui_EditBox_getFontName(lua_State *L) { olua_startinvoke(L); @@ -23456,7 +24537,7 @@ static int _cocos2d_ui_EditBox_getFontName(lua_State *L) return num_ret; } -static int _cocos2d_ui_EditBox_getFontSize(lua_State *L) +static int _olua_fun_cocos2d_ui_EditBox_getFontSize(lua_State *L) { olua_startinvoke(L); @@ -23473,7 +24554,7 @@ static int _cocos2d_ui_EditBox_getFontSize(lua_State *L) return num_ret; } -static int _cocos2d_ui_EditBox_getInputFlag(lua_State *L) +static int _olua_fun_cocos2d_ui_EditBox_getInputFlag(lua_State *L) { olua_startinvoke(L); @@ -23490,7 +24571,7 @@ static int _cocos2d_ui_EditBox_getInputFlag(lua_State *L) return num_ret; } -static int _cocos2d_ui_EditBox_getInputMode(lua_State *L) +static int _olua_fun_cocos2d_ui_EditBox_getInputMode(lua_State *L) { olua_startinvoke(L); @@ -23507,7 +24588,7 @@ static int _cocos2d_ui_EditBox_getInputMode(lua_State *L) return num_ret; } -static int _cocos2d_ui_EditBox_getMaxLength(lua_State *L) +static int _olua_fun_cocos2d_ui_EditBox_getMaxLength(lua_State *L) { olua_startinvoke(L); @@ -23524,7 +24605,7 @@ static int _cocos2d_ui_EditBox_getMaxLength(lua_State *L) return num_ret; } -static int _cocos2d_ui_EditBox_getPlaceHolder(lua_State *L) +static int _olua_fun_cocos2d_ui_EditBox_getPlaceHolder(lua_State *L) { olua_startinvoke(L); @@ -23541,7 +24622,7 @@ static int _cocos2d_ui_EditBox_getPlaceHolder(lua_State *L) return num_ret; } -static int _cocos2d_ui_EditBox_getPlaceholderFontColor(lua_State *L) +static int _olua_fun_cocos2d_ui_EditBox_getPlaceholderFontColor(lua_State *L) { olua_startinvoke(L); @@ -23558,7 +24639,7 @@ static int _cocos2d_ui_EditBox_getPlaceholderFontColor(lua_State *L) return num_ret; } -static int _cocos2d_ui_EditBox_getPlaceholderFontName(lua_State *L) +static int _olua_fun_cocos2d_ui_EditBox_getPlaceholderFontName(lua_State *L) { olua_startinvoke(L); @@ -23575,7 +24656,7 @@ static int _cocos2d_ui_EditBox_getPlaceholderFontName(lua_State *L) return num_ret; } -static int _cocos2d_ui_EditBox_getPlaceholderFontSize(lua_State *L) +static int _olua_fun_cocos2d_ui_EditBox_getPlaceholderFontSize(lua_State *L) { olua_startinvoke(L); @@ -23592,7 +24673,7 @@ static int _cocos2d_ui_EditBox_getPlaceholderFontSize(lua_State *L) return num_ret; } -static int _cocos2d_ui_EditBox_getReturnType(lua_State *L) +static int _olua_fun_cocos2d_ui_EditBox_getReturnType(lua_State *L) { olua_startinvoke(L); @@ -23609,7 +24690,7 @@ static int _cocos2d_ui_EditBox_getReturnType(lua_State *L) return num_ret; } -static int _cocos2d_ui_EditBox_getText(lua_State *L) +static int _olua_fun_cocos2d_ui_EditBox_getText(lua_State *L) { olua_startinvoke(L); @@ -23626,7 +24707,7 @@ static int _cocos2d_ui_EditBox_getText(lua_State *L) return num_ret; } -static int _cocos2d_ui_EditBox_getTextHorizontalAlignment(lua_State *L) +static int _olua_fun_cocos2d_ui_EditBox_getTextHorizontalAlignment(lua_State *L) { olua_startinvoke(L); @@ -23643,12 +24724,12 @@ static int _cocos2d_ui_EditBox_getTextHorizontalAlignment(lua_State *L) return num_ret; } -static int _cocos2d_ui_EditBox_initWithSizeAndBackgroundSprite$1(lua_State *L) +static int _olua_fun_cocos2d_ui_EditBox_initWithSizeAndBackgroundSprite$1(lua_State *L) { olua_startinvoke(L); cocos2d::ui::EditBox *self = nullptr; - cocos2d::Size arg1; /** size */ + cocos2d::Size *arg1; /** size */ std::string arg2; /** normal9SpriteBg */ cocos2d::ui::Widget::TextureResType arg3 = (cocos2d::ui::Widget::TextureResType)0; /** texType */ @@ -23658,7 +24739,7 @@ static int _cocos2d_ui_EditBox_initWithSizeAndBackgroundSprite$1(lua_State *L) olua_check_enum(L, 4, &arg3); // bool initWithSizeAndBackgroundSprite(const cocos2d::Size &size, const std::string &normal9SpriteBg, @optional cocos2d::ui::Widget::TextureResType texType) - bool ret = self->initWithSizeAndBackgroundSprite(arg1, arg2, arg3); + bool ret = self->initWithSizeAndBackgroundSprite(*arg1, arg2, arg3); int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); @@ -23666,20 +24747,20 @@ static int _cocos2d_ui_EditBox_initWithSizeAndBackgroundSprite$1(lua_State *L) return num_ret; } -static int _cocos2d_ui_EditBox_initWithSizeAndBackgroundSprite$2(lua_State *L) +static int _olua_fun_cocos2d_ui_EditBox_initWithSizeAndBackgroundSprite$2(lua_State *L) { olua_startinvoke(L); cocos2d::ui::EditBox *self = nullptr; - cocos2d::Size arg1; /** size */ - cocos2d::ui::Scale9Sprite *arg2 = nullptr; /** normal9SpriteBg */ + cocos2d::Size *arg1; /** size */ + std::string arg2; /** normal9SpriteBg */ olua_to_object(L, 1, &self, "ccui.EditBox"); olua_check_object(L, 2, &arg1, "cc.Size"); - olua_check_object(L, 3, &arg2, "ccui.Scale9Sprite"); + olua_check_string(L, 3, &arg2); - // bool initWithSizeAndBackgroundSprite(const cocos2d::Size &size, cocos2d::ui::Scale9Sprite *normal9SpriteBg) - bool ret = self->initWithSizeAndBackgroundSprite(arg1, arg2); + // bool initWithSizeAndBackgroundSprite(const cocos2d::Size &size, const std::string &normal9SpriteBg) + bool ret = self->initWithSizeAndBackgroundSprite(*arg1, arg2); int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); @@ -23687,24 +24768,20 @@ static int _cocos2d_ui_EditBox_initWithSizeAndBackgroundSprite$2(lua_State *L) return num_ret; } -static int _cocos2d_ui_EditBox_initWithSizeAndBackgroundSprite$3(lua_State *L) +static int _olua_fun_cocos2d_ui_EditBox_initWithSizeAndBackgroundSprite$3(lua_State *L) { olua_startinvoke(L); cocos2d::ui::EditBox *self = nullptr; - cocos2d::Size arg1; /** size */ - cocos2d::ui::Scale9Sprite *arg2 = nullptr; /** normalSprite */ - cocos2d::ui::Scale9Sprite *arg3 = nullptr; /** pressedSprite */ - cocos2d::ui::Scale9Sprite *arg4 = nullptr; /** disabledSprite */ + cocos2d::Size *arg1; /** size */ + cocos2d::ui::Scale9Sprite *arg2 = nullptr; /** normal9SpriteBg */ olua_to_object(L, 1, &self, "ccui.EditBox"); olua_check_object(L, 2, &arg1, "cc.Size"); olua_check_object(L, 3, &arg2, "ccui.Scale9Sprite"); - olua_check_object(L, 4, &arg3, "ccui.Scale9Sprite"); - olua_check_object(L, 5, &arg4, "ccui.Scale9Sprite"); - // bool initWithSizeAndBackgroundSprite(const cocos2d::Size &size, cocos2d::ui::Scale9Sprite *normalSprite, cocos2d::ui::Scale9Sprite *pressedSprite, cocos2d::ui::Scale9Sprite *disabledSprite) - bool ret = self->initWithSizeAndBackgroundSprite(arg1, arg2, arg3, arg4); + // bool initWithSizeAndBackgroundSprite(const cocos2d::Size &size, cocos2d::ui::Scale9Sprite *normal9SpriteBg) + bool ret = self->initWithSizeAndBackgroundSprite(*arg1, arg2); int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); @@ -23712,20 +24789,24 @@ static int _cocos2d_ui_EditBox_initWithSizeAndBackgroundSprite$3(lua_State *L) return num_ret; } -static int _cocos2d_ui_EditBox_initWithSizeAndBackgroundSprite$4(lua_State *L) +static int _olua_fun_cocos2d_ui_EditBox_initWithSizeAndBackgroundSprite$4(lua_State *L) { olua_startinvoke(L); cocos2d::ui::EditBox *self = nullptr; - cocos2d::Size arg1; /** size */ - std::string arg2; /** normal9SpriteBg */ + cocos2d::Size *arg1; /** size */ + cocos2d::ui::Scale9Sprite *arg2 = nullptr; /** normalSprite */ + cocos2d::ui::Scale9Sprite *arg3 = nullptr; /** pressedSprite */ + cocos2d::ui::Scale9Sprite *arg4 = nullptr; /** disabledSprite */ olua_to_object(L, 1, &self, "ccui.EditBox"); olua_check_object(L, 2, &arg1, "cc.Size"); - olua_check_string(L, 3, &arg2); + olua_check_object(L, 3, &arg2, "ccui.Scale9Sprite"); + olua_check_object(L, 4, &arg3, "ccui.Scale9Sprite"); + olua_check_object(L, 5, &arg4, "ccui.Scale9Sprite"); - // bool initWithSizeAndBackgroundSprite(const cocos2d::Size &size, const std::string &normal9SpriteBg, @optional cocos2d::ui::Widget::TextureResType texType) - bool ret = self->initWithSizeAndBackgroundSprite(arg1, arg2); + // bool initWithSizeAndBackgroundSprite(const cocos2d::Size &size, cocos2d::ui::Scale9Sprite *normalSprite, cocos2d::ui::Scale9Sprite *pressedSprite, cocos2d::ui::Scale9Sprite *disabledSprite) + bool ret = self->initWithSizeAndBackgroundSprite(*arg1, arg2, arg3, arg4); int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); @@ -23733,33 +24814,33 @@ static int _cocos2d_ui_EditBox_initWithSizeAndBackgroundSprite$4(lua_State *L) return num_ret; } -static int _cocos2d_ui_EditBox_initWithSizeAndBackgroundSprite(lua_State *L) +static int _olua_fun_cocos2d_ui_EditBox_initWithSizeAndBackgroundSprite(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 2) { - if ((olua_is_object(L, 2, "cc.Size")) && (olua_is_object(L, 3, "ccui.Scale9Sprite"))) { - // bool initWithSizeAndBackgroundSprite(const cocos2d::Size &size, cocos2d::ui::Scale9Sprite *normal9SpriteBg) - return _cocos2d_ui_EditBox_initWithSizeAndBackgroundSprite$2(L); + if ((olua_is_object(L, 2, "cc.Size")) && (olua_is_string(L, 3))) { + // bool initWithSizeAndBackgroundSprite(const cocos2d::Size &size, const std::string &normal9SpriteBg) + return _olua_fun_cocos2d_ui_EditBox_initWithSizeAndBackgroundSprite$2(L); } - // if ((olua_is_object(L, 2, "cc.Size")) && (olua_is_string(L, 3))) { - // bool initWithSizeAndBackgroundSprite(const cocos2d::Size &size, const std::string &normal9SpriteBg, @optional cocos2d::ui::Widget::TextureResType texType) - return _cocos2d_ui_EditBox_initWithSizeAndBackgroundSprite$4(L); + // if ((olua_is_object(L, 2, "cc.Size")) && (olua_is_object(L, 3, "ccui.Scale9Sprite"))) { + // bool initWithSizeAndBackgroundSprite(const cocos2d::Size &size, cocos2d::ui::Scale9Sprite *normal9SpriteBg) + return _olua_fun_cocos2d_ui_EditBox_initWithSizeAndBackgroundSprite$3(L); // } } if (num_args == 3) { // if ((olua_is_object(L, 2, "cc.Size")) && (olua_is_string(L, 3)) && (olua_is_enum(L, 4))) { // bool initWithSizeAndBackgroundSprite(const cocos2d::Size &size, const std::string &normal9SpriteBg, @optional cocos2d::ui::Widget::TextureResType texType) - return _cocos2d_ui_EditBox_initWithSizeAndBackgroundSprite$1(L); + return _olua_fun_cocos2d_ui_EditBox_initWithSizeAndBackgroundSprite$1(L); // } } if (num_args == 4) { // if ((olua_is_object(L, 2, "cc.Size")) && (olua_is_object(L, 3, "ccui.Scale9Sprite")) && (olua_is_object(L, 4, "ccui.Scale9Sprite")) && (olua_is_object(L, 5, "ccui.Scale9Sprite"))) { // bool initWithSizeAndBackgroundSprite(const cocos2d::Size &size, cocos2d::ui::Scale9Sprite *normalSprite, cocos2d::ui::Scale9Sprite *pressedSprite, cocos2d::ui::Scale9Sprite *disabledSprite) - return _cocos2d_ui_EditBox_initWithSizeAndBackgroundSprite$3(L); + return _olua_fun_cocos2d_ui_EditBox_initWithSizeAndBackgroundSprite$4(L); // } } @@ -23768,12 +24849,12 @@ static int _cocos2d_ui_EditBox_initWithSizeAndBackgroundSprite(lua_State *L) return 0; } -static int _cocos2d_ui_EditBox_initWithSizeAndTexture$1(lua_State *L) +static int _olua_fun_cocos2d_ui_EditBox_initWithSizeAndTexture$1(lua_State *L) { olua_startinvoke(L); cocos2d::ui::EditBox *self = nullptr; - cocos2d::Size arg1; /** size */ + cocos2d::Size *arg1; /** size */ std::string arg2; /** normalImage */ std::string arg3; /** pressedImage */ std::string arg4; /** disabledImage */ @@ -23787,7 +24868,7 @@ static int _cocos2d_ui_EditBox_initWithSizeAndTexture$1(lua_State *L) olua_check_enum(L, 6, &arg5); // bool initWithSizeAndTexture(const cocos2d::Size &size, const std::string &normalImage, @optional const std::string &pressedImage, @optional const std::string &disabledImage, @optional cocos2d::ui::Widget::TextureResType texType) - bool ret = self->initWithSizeAndTexture(arg1, arg2, arg3, arg4, arg5); + bool ret = self->initWithSizeAndTexture(*arg1, arg2, arg3, arg4, arg5); int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); @@ -23795,20 +24876,20 @@ static int _cocos2d_ui_EditBox_initWithSizeAndTexture$1(lua_State *L) return num_ret; } -static int _cocos2d_ui_EditBox_initWithSizeAndTexture$2(lua_State *L) +static int _olua_fun_cocos2d_ui_EditBox_initWithSizeAndTexture$2(lua_State *L) { olua_startinvoke(L); cocos2d::ui::EditBox *self = nullptr; - cocos2d::Size arg1; /** size */ + cocos2d::Size *arg1; /** size */ std::string arg2; /** normalImage */ olua_to_object(L, 1, &self, "ccui.EditBox"); olua_check_object(L, 2, &arg1, "cc.Size"); olua_check_string(L, 3, &arg2); - // bool initWithSizeAndTexture(const cocos2d::Size &size, const std::string &normalImage, @optional const std::string &pressedImage, @optional const std::string &disabledImage, @optional cocos2d::ui::Widget::TextureResType texType) - bool ret = self->initWithSizeAndTexture(arg1, arg2); + // bool initWithSizeAndTexture(const cocos2d::Size &size, const std::string &normalImage) + bool ret = self->initWithSizeAndTexture(*arg1, arg2); int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); @@ -23816,12 +24897,12 @@ static int _cocos2d_ui_EditBox_initWithSizeAndTexture$2(lua_State *L) return num_ret; } -static int _cocos2d_ui_EditBox_initWithSizeAndTexture$3(lua_State *L) +static int _olua_fun_cocos2d_ui_EditBox_initWithSizeAndTexture$3(lua_State *L) { olua_startinvoke(L); cocos2d::ui::EditBox *self = nullptr; - cocos2d::Size arg1; /** size */ + cocos2d::Size *arg1; /** size */ std::string arg2; /** normalImage */ std::string arg3; /** pressedImage */ @@ -23830,8 +24911,8 @@ static int _cocos2d_ui_EditBox_initWithSizeAndTexture$3(lua_State *L) olua_check_string(L, 3, &arg2); olua_check_string(L, 4, &arg3); - // bool initWithSizeAndTexture(const cocos2d::Size &size, const std::string &normalImage, @optional const std::string &pressedImage, @optional const std::string &disabledImage, @optional cocos2d::ui::Widget::TextureResType texType) - bool ret = self->initWithSizeAndTexture(arg1, arg2, arg3); + // bool initWithSizeAndTexture(const cocos2d::Size &size, const std::string &normalImage, @optional const std::string &pressedImage) + bool ret = self->initWithSizeAndTexture(*arg1, arg2, arg3); int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); @@ -23839,12 +24920,12 @@ static int _cocos2d_ui_EditBox_initWithSizeAndTexture$3(lua_State *L) return num_ret; } -static int _cocos2d_ui_EditBox_initWithSizeAndTexture$4(lua_State *L) +static int _olua_fun_cocos2d_ui_EditBox_initWithSizeAndTexture$4(lua_State *L) { olua_startinvoke(L); cocos2d::ui::EditBox *self = nullptr; - cocos2d::Size arg1; /** size */ + cocos2d::Size *arg1; /** size */ std::string arg2; /** normalImage */ std::string arg3; /** pressedImage */ std::string arg4; /** disabledImage */ @@ -23855,8 +24936,8 @@ static int _cocos2d_ui_EditBox_initWithSizeAndTexture$4(lua_State *L) olua_check_string(L, 4, &arg3); olua_check_string(L, 5, &arg4); - // bool initWithSizeAndTexture(const cocos2d::Size &size, const std::string &normalImage, @optional const std::string &pressedImage, @optional const std::string &disabledImage, @optional cocos2d::ui::Widget::TextureResType texType) - bool ret = self->initWithSizeAndTexture(arg1, arg2, arg3, arg4); + // bool initWithSizeAndTexture(const cocos2d::Size &size, const std::string &normalImage, @optional const std::string &pressedImage, @optional const std::string &disabledImage) + bool ret = self->initWithSizeAndTexture(*arg1, arg2, arg3, arg4); int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); @@ -23864,35 +24945,35 @@ static int _cocos2d_ui_EditBox_initWithSizeAndTexture$4(lua_State *L) return num_ret; } -static int _cocos2d_ui_EditBox_initWithSizeAndTexture(lua_State *L) +static int _olua_fun_cocos2d_ui_EditBox_initWithSizeAndTexture(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 2) { // if ((olua_is_object(L, 2, "cc.Size")) && (olua_is_string(L, 3))) { - // bool initWithSizeAndTexture(const cocos2d::Size &size, const std::string &normalImage, @optional const std::string &pressedImage, @optional const std::string &disabledImage, @optional cocos2d::ui::Widget::TextureResType texType) - return _cocos2d_ui_EditBox_initWithSizeAndTexture$2(L); + // bool initWithSizeAndTexture(const cocos2d::Size &size, const std::string &normalImage) + return _olua_fun_cocos2d_ui_EditBox_initWithSizeAndTexture$2(L); // } } if (num_args == 3) { // if ((olua_is_object(L, 2, "cc.Size")) && (olua_is_string(L, 3)) && (olua_is_string(L, 4))) { - // bool initWithSizeAndTexture(const cocos2d::Size &size, const std::string &normalImage, @optional const std::string &pressedImage, @optional const std::string &disabledImage, @optional cocos2d::ui::Widget::TextureResType texType) - return _cocos2d_ui_EditBox_initWithSizeAndTexture$3(L); + // bool initWithSizeAndTexture(const cocos2d::Size &size, const std::string &normalImage, @optional const std::string &pressedImage) + return _olua_fun_cocos2d_ui_EditBox_initWithSizeAndTexture$3(L); // } } if (num_args == 4) { // if ((olua_is_object(L, 2, "cc.Size")) && (olua_is_string(L, 3)) && (olua_is_string(L, 4)) && (olua_is_string(L, 5))) { - // bool initWithSizeAndTexture(const cocos2d::Size &size, const std::string &normalImage, @optional const std::string &pressedImage, @optional const std::string &disabledImage, @optional cocos2d::ui::Widget::TextureResType texType) - return _cocos2d_ui_EditBox_initWithSizeAndTexture$4(L); + // bool initWithSizeAndTexture(const cocos2d::Size &size, const std::string &normalImage, @optional const std::string &pressedImage, @optional const std::string &disabledImage) + return _olua_fun_cocos2d_ui_EditBox_initWithSizeAndTexture$4(L); // } } if (num_args == 5) { // if ((olua_is_object(L, 2, "cc.Size")) && (olua_is_string(L, 3)) && (olua_is_string(L, 4)) && (olua_is_string(L, 5)) && (olua_is_enum(L, 6))) { // bool initWithSizeAndTexture(const cocos2d::Size &size, const std::string &normalImage, @optional const std::string &pressedImage, @optional const std::string &disabledImage, @optional cocos2d::ui::Widget::TextureResType texType) - return _cocos2d_ui_EditBox_initWithSizeAndTexture$1(L); + return _olua_fun_cocos2d_ui_EditBox_initWithSizeAndTexture$1(L); // } } @@ -23901,7 +24982,7 @@ static int _cocos2d_ui_EditBox_initWithSizeAndTexture(lua_State *L) return 0; } -static int _cocos2d_ui_EditBox_loadTextureDisabled$1(lua_State *L) +static int _olua_fun_cocos2d_ui_EditBox_loadTextureDisabled$1(lua_State *L) { olua_startinvoke(L); @@ -23921,7 +25002,7 @@ static int _cocos2d_ui_EditBox_loadTextureDisabled$1(lua_State *L) return 0; } -static int _cocos2d_ui_EditBox_loadTextureDisabled$2(lua_State *L) +static int _olua_fun_cocos2d_ui_EditBox_loadTextureDisabled$2(lua_State *L) { olua_startinvoke(L); @@ -23931,7 +25012,7 @@ static int _cocos2d_ui_EditBox_loadTextureDisabled$2(lua_State *L) olua_to_object(L, 1, &self, "ccui.EditBox"); olua_check_string(L, 2, &arg1); - // void loadTextureDisabled(const std::string &disabled, @optional cocos2d::ui::Widget::TextureResType texType) + // void loadTextureDisabled(const std::string &disabled) self->loadTextureDisabled(arg1); olua_endinvoke(L); @@ -23939,21 +25020,21 @@ static int _cocos2d_ui_EditBox_loadTextureDisabled$2(lua_State *L) return 0; } -static int _cocos2d_ui_EditBox_loadTextureDisabled(lua_State *L) +static int _olua_fun_cocos2d_ui_EditBox_loadTextureDisabled(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_string(L, 2))) { - // void loadTextureDisabled(const std::string &disabled, @optional cocos2d::ui::Widget::TextureResType texType) - return _cocos2d_ui_EditBox_loadTextureDisabled$2(L); + // void loadTextureDisabled(const std::string &disabled) + return _olua_fun_cocos2d_ui_EditBox_loadTextureDisabled$2(L); // } } if (num_args == 2) { // if ((olua_is_string(L, 2)) && (olua_is_enum(L, 3))) { // void loadTextureDisabled(const std::string &disabled, @optional cocos2d::ui::Widget::TextureResType texType) - return _cocos2d_ui_EditBox_loadTextureDisabled$1(L); + return _olua_fun_cocos2d_ui_EditBox_loadTextureDisabled$1(L); // } } @@ -23962,7 +25043,7 @@ static int _cocos2d_ui_EditBox_loadTextureDisabled(lua_State *L) return 0; } -static int _cocos2d_ui_EditBox_loadTextureNormal$1(lua_State *L) +static int _olua_fun_cocos2d_ui_EditBox_loadTextureNormal$1(lua_State *L) { olua_startinvoke(L); @@ -23982,7 +25063,7 @@ static int _cocos2d_ui_EditBox_loadTextureNormal$1(lua_State *L) return 0; } -static int _cocos2d_ui_EditBox_loadTextureNormal$2(lua_State *L) +static int _olua_fun_cocos2d_ui_EditBox_loadTextureNormal$2(lua_State *L) { olua_startinvoke(L); @@ -23992,7 +25073,7 @@ static int _cocos2d_ui_EditBox_loadTextureNormal$2(lua_State *L) olua_to_object(L, 1, &self, "ccui.EditBox"); olua_check_string(L, 2, &arg1); - // void loadTextureNormal(const std::string &normal, @optional cocos2d::ui::Widget::TextureResType texType) + // void loadTextureNormal(const std::string &normal) self->loadTextureNormal(arg1); olua_endinvoke(L); @@ -24000,21 +25081,21 @@ static int _cocos2d_ui_EditBox_loadTextureNormal$2(lua_State *L) return 0; } -static int _cocos2d_ui_EditBox_loadTextureNormal(lua_State *L) +static int _olua_fun_cocos2d_ui_EditBox_loadTextureNormal(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_string(L, 2))) { - // void loadTextureNormal(const std::string &normal, @optional cocos2d::ui::Widget::TextureResType texType) - return _cocos2d_ui_EditBox_loadTextureNormal$2(L); + // void loadTextureNormal(const std::string &normal) + return _olua_fun_cocos2d_ui_EditBox_loadTextureNormal$2(L); // } } if (num_args == 2) { // if ((olua_is_string(L, 2)) && (olua_is_enum(L, 3))) { // void loadTextureNormal(const std::string &normal, @optional cocos2d::ui::Widget::TextureResType texType) - return _cocos2d_ui_EditBox_loadTextureNormal$1(L); + return _olua_fun_cocos2d_ui_EditBox_loadTextureNormal$1(L); // } } @@ -24023,7 +25104,7 @@ static int _cocos2d_ui_EditBox_loadTextureNormal(lua_State *L) return 0; } -static int _cocos2d_ui_EditBox_loadTexturePressed$1(lua_State *L) +static int _olua_fun_cocos2d_ui_EditBox_loadTexturePressed$1(lua_State *L) { olua_startinvoke(L); @@ -24043,7 +25124,7 @@ static int _cocos2d_ui_EditBox_loadTexturePressed$1(lua_State *L) return 0; } -static int _cocos2d_ui_EditBox_loadTexturePressed$2(lua_State *L) +static int _olua_fun_cocos2d_ui_EditBox_loadTexturePressed$2(lua_State *L) { olua_startinvoke(L); @@ -24053,7 +25134,7 @@ static int _cocos2d_ui_EditBox_loadTexturePressed$2(lua_State *L) olua_to_object(L, 1, &self, "ccui.EditBox"); olua_check_string(L, 2, &arg1); - // void loadTexturePressed(const std::string &pressed, @optional cocos2d::ui::Widget::TextureResType texType) + // void loadTexturePressed(const std::string &pressed) self->loadTexturePressed(arg1); olua_endinvoke(L); @@ -24061,21 +25142,21 @@ static int _cocos2d_ui_EditBox_loadTexturePressed$2(lua_State *L) return 0; } -static int _cocos2d_ui_EditBox_loadTexturePressed(lua_State *L) +static int _olua_fun_cocos2d_ui_EditBox_loadTexturePressed(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_string(L, 2))) { - // void loadTexturePressed(const std::string &pressed, @optional cocos2d::ui::Widget::TextureResType texType) - return _cocos2d_ui_EditBox_loadTexturePressed$2(L); + // void loadTexturePressed(const std::string &pressed) + return _olua_fun_cocos2d_ui_EditBox_loadTexturePressed$2(L); // } } if (num_args == 2) { // if ((olua_is_string(L, 2)) && (olua_is_enum(L, 3))) { // void loadTexturePressed(const std::string &pressed, @optional cocos2d::ui::Widget::TextureResType texType) - return _cocos2d_ui_EditBox_loadTexturePressed$1(L); + return _olua_fun_cocos2d_ui_EditBox_loadTexturePressed$1(L); // } } @@ -24084,7 +25165,7 @@ static int _cocos2d_ui_EditBox_loadTexturePressed(lua_State *L) return 0; } -static int _cocos2d_ui_EditBox_loadTextures$1(lua_State *L) +static int _olua_fun_cocos2d_ui_EditBox_loadTextures$1(lua_State *L) { olua_startinvoke(L); @@ -24108,7 +25189,7 @@ static int _cocos2d_ui_EditBox_loadTextures$1(lua_State *L) return 0; } -static int _cocos2d_ui_EditBox_loadTextures$2(lua_State *L) +static int _olua_fun_cocos2d_ui_EditBox_loadTextures$2(lua_State *L) { olua_startinvoke(L); @@ -24120,7 +25201,7 @@ static int _cocos2d_ui_EditBox_loadTextures$2(lua_State *L) olua_check_string(L, 2, &arg1); olua_check_string(L, 3, &arg2); - // void loadTextures(const std::string &normal, const std::string &pressed, @optional const std::string &disabled, @optional cocos2d::ui::Widget::TextureResType texType) + // void loadTextures(const std::string &normal, const std::string &pressed) self->loadTextures(arg1, arg2); olua_endinvoke(L); @@ -24128,7 +25209,7 @@ static int _cocos2d_ui_EditBox_loadTextures$2(lua_State *L) return 0; } -static int _cocos2d_ui_EditBox_loadTextures$3(lua_State *L) +static int _olua_fun_cocos2d_ui_EditBox_loadTextures$3(lua_State *L) { olua_startinvoke(L); @@ -24142,7 +25223,7 @@ static int _cocos2d_ui_EditBox_loadTextures$3(lua_State *L) olua_check_string(L, 3, &arg2); olua_check_string(L, 4, &arg3); - // void loadTextures(const std::string &normal, const std::string &pressed, @optional const std::string &disabled, @optional cocos2d::ui::Widget::TextureResType texType) + // void loadTextures(const std::string &normal, const std::string &pressed, @optional const std::string &disabled) self->loadTextures(arg1, arg2, arg3); olua_endinvoke(L); @@ -24150,28 +25231,28 @@ static int _cocos2d_ui_EditBox_loadTextures$3(lua_State *L) return 0; } -static int _cocos2d_ui_EditBox_loadTextures(lua_State *L) +static int _olua_fun_cocos2d_ui_EditBox_loadTextures(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 2) { // if ((olua_is_string(L, 2)) && (olua_is_string(L, 3))) { - // void loadTextures(const std::string &normal, const std::string &pressed, @optional const std::string &disabled, @optional cocos2d::ui::Widget::TextureResType texType) - return _cocos2d_ui_EditBox_loadTextures$2(L); + // void loadTextures(const std::string &normal, const std::string &pressed) + return _olua_fun_cocos2d_ui_EditBox_loadTextures$2(L); // } } if (num_args == 3) { // if ((olua_is_string(L, 2)) && (olua_is_string(L, 3)) && (olua_is_string(L, 4))) { - // void loadTextures(const std::string &normal, const std::string &pressed, @optional const std::string &disabled, @optional cocos2d::ui::Widget::TextureResType texType) - return _cocos2d_ui_EditBox_loadTextures$3(L); + // void loadTextures(const std::string &normal, const std::string &pressed, @optional const std::string &disabled) + return _olua_fun_cocos2d_ui_EditBox_loadTextures$3(L); // } } if (num_args == 4) { // if ((olua_is_string(L, 2)) && (olua_is_string(L, 3)) && (olua_is_string(L, 4)) && (olua_is_enum(L, 5))) { // void loadTextures(const std::string &normal, const std::string &pressed, @optional const std::string &disabled, @optional cocos2d::ui::Widget::TextureResType texType) - return _cocos2d_ui_EditBox_loadTextures$1(L); + return _olua_fun_cocos2d_ui_EditBox_loadTextures$1(L); // } } @@ -24180,11 +25261,11 @@ static int _cocos2d_ui_EditBox_loadTextures(lua_State *L) return 0; } -static int _cocos2d_ui_EditBox_new(lua_State *L) +static int _olua_fun_cocos2d_ui_EditBox_new(lua_State *L) { olua_startinvoke(L); - // EditBox() + // cocos2d::ui::EditBox() cocos2d::ui::EditBox *ret = new cocos2d::ui::EditBox(); int num_ret = olua_push_object(L, ret, "ccui.EditBox"); olua_postnew(L, ret); @@ -24194,7 +25275,7 @@ static int _cocos2d_ui_EditBox_new(lua_State *L) return num_ret; } -static int _cocos2d_ui_EditBox_openKeyboard(lua_State *L) +static int _olua_fun_cocos2d_ui_EditBox_openKeyboard(lua_State *L) { olua_startinvoke(L); @@ -24210,79 +25291,79 @@ static int _cocos2d_ui_EditBox_openKeyboard(lua_State *L) return 0; } -static int _cocos2d_ui_EditBox_setCapInsets(lua_State *L) +static int _olua_fun_cocos2d_ui_EditBox_setCapInsets(lua_State *L) { olua_startinvoke(L); cocos2d::ui::EditBox *self = nullptr; - cocos2d::Rect arg1; /** capInsets */ + cocos2d::Rect *arg1; /** capInsets */ olua_to_object(L, 1, &self, "ccui.EditBox"); olua_check_object(L, 2, &arg1, "cc.Rect"); // void setCapInsets(const cocos2d::Rect &capInsets) - self->setCapInsets(arg1); + self->setCapInsets(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_ui_EditBox_setCapInsetsDisabledRenderer(lua_State *L) +static int _olua_fun_cocos2d_ui_EditBox_setCapInsetsDisabledRenderer(lua_State *L) { olua_startinvoke(L); cocos2d::ui::EditBox *self = nullptr; - cocos2d::Rect arg1; /** capInsets */ + cocos2d::Rect *arg1; /** capInsets */ olua_to_object(L, 1, &self, "ccui.EditBox"); olua_check_object(L, 2, &arg1, "cc.Rect"); // void setCapInsetsDisabledRenderer(const cocos2d::Rect &capInsets) - self->setCapInsetsDisabledRenderer(arg1); + self->setCapInsetsDisabledRenderer(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_ui_EditBox_setCapInsetsNormalRenderer(lua_State *L) +static int _olua_fun_cocos2d_ui_EditBox_setCapInsetsNormalRenderer(lua_State *L) { olua_startinvoke(L); cocos2d::ui::EditBox *self = nullptr; - cocos2d::Rect arg1; /** capInsets */ + cocos2d::Rect *arg1; /** capInsets */ olua_to_object(L, 1, &self, "ccui.EditBox"); olua_check_object(L, 2, &arg1, "cc.Rect"); // void setCapInsetsNormalRenderer(const cocos2d::Rect &capInsets) - self->setCapInsetsNormalRenderer(arg1); + self->setCapInsetsNormalRenderer(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_ui_EditBox_setCapInsetsPressedRenderer(lua_State *L) +static int _olua_fun_cocos2d_ui_EditBox_setCapInsetsPressedRenderer(lua_State *L) { olua_startinvoke(L); cocos2d::ui::EditBox *self = nullptr; - cocos2d::Rect arg1; /** capInsets */ + cocos2d::Rect *arg1; /** capInsets */ olua_to_object(L, 1, &self, "ccui.EditBox"); olua_check_object(L, 2, &arg1, "cc.Rect"); // void setCapInsetsPressedRenderer(const cocos2d::Rect &capInsets) - self->setCapInsetsPressedRenderer(arg1); + self->setCapInsetsPressedRenderer(*arg1); olua_endinvoke(L); return 0; } -static int _cocos2d_ui_EditBox_setDelegate(lua_State *L) +static int _olua_fun_cocos2d_ui_EditBox_setDelegate(lua_State *L) { olua_startinvoke(L); @@ -24303,7 +25384,7 @@ static int _cocos2d_ui_EditBox_setDelegate(lua_State *L) return 0; } -static int _cocos2d_ui_EditBox_setFont(lua_State *L) +static int _olua_fun_cocos2d_ui_EditBox_setFont(lua_State *L) { olua_startinvoke(L); @@ -24323,7 +25404,7 @@ static int _cocos2d_ui_EditBox_setFont(lua_State *L) return 0; } -static int _cocos2d_ui_EditBox_setFontColor$1(lua_State *L) +static int _olua_fun_cocos2d_ui_EditBox_setFontColor$1(lua_State *L) { olua_startinvoke(L); @@ -24341,7 +25422,7 @@ static int _cocos2d_ui_EditBox_setFontColor$1(lua_State *L) return 0; } -static int _cocos2d_ui_EditBox_setFontColor$2(lua_State *L) +static int _olua_fun_cocos2d_ui_EditBox_setFontColor$2(lua_State *L) { olua_startinvoke(L); @@ -24359,19 +25440,19 @@ static int _cocos2d_ui_EditBox_setFontColor$2(lua_State *L) return 0; } -static int _cocos2d_ui_EditBox_setFontColor(lua_State *L) +static int _olua_fun_cocos2d_ui_EditBox_setFontColor(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { if ((olua_is_cocos2d_Color3B(L, 2))) { // void setFontColor(const cocos2d::Color3B &color) - return _cocos2d_ui_EditBox_setFontColor$1(L); + return _olua_fun_cocos2d_ui_EditBox_setFontColor$1(L); } // if ((olua_is_cocos2d_Color4B(L, 2))) { // void setFontColor(const cocos2d::Color4B &color) - return _cocos2d_ui_EditBox_setFontColor$2(L); + return _olua_fun_cocos2d_ui_EditBox_setFontColor$2(L); // } } @@ -24380,7 +25461,7 @@ static int _cocos2d_ui_EditBox_setFontColor(lua_State *L) return 0; } -static int _cocos2d_ui_EditBox_setFontName(lua_State *L) +static int _olua_fun_cocos2d_ui_EditBox_setFontName(lua_State *L) { olua_startinvoke(L); @@ -24398,7 +25479,7 @@ static int _cocos2d_ui_EditBox_setFontName(lua_State *L) return 0; } -static int _cocos2d_ui_EditBox_setFontSize(lua_State *L) +static int _olua_fun_cocos2d_ui_EditBox_setFontSize(lua_State *L) { olua_startinvoke(L); @@ -24416,7 +25497,7 @@ static int _cocos2d_ui_EditBox_setFontSize(lua_State *L) return 0; } -static int _cocos2d_ui_EditBox_setInputFlag(lua_State *L) +static int _olua_fun_cocos2d_ui_EditBox_setInputFlag(lua_State *L) { olua_startinvoke(L); @@ -24434,7 +25515,7 @@ static int _cocos2d_ui_EditBox_setInputFlag(lua_State *L) return 0; } -static int _cocos2d_ui_EditBox_setInputMode(lua_State *L) +static int _olua_fun_cocos2d_ui_EditBox_setInputMode(lua_State *L) { olua_startinvoke(L); @@ -24452,7 +25533,7 @@ static int _cocos2d_ui_EditBox_setInputMode(lua_State *L) return 0; } -static int _cocos2d_ui_EditBox_setMaxLength(lua_State *L) +static int _olua_fun_cocos2d_ui_EditBox_setMaxLength(lua_State *L) { olua_startinvoke(L); @@ -24470,7 +25551,7 @@ static int _cocos2d_ui_EditBox_setMaxLength(lua_State *L) return 0; } -static int _cocos2d_ui_EditBox_setPlaceHolder(lua_State *L) +static int _olua_fun_cocos2d_ui_EditBox_setPlaceHolder(lua_State *L) { olua_startinvoke(L); @@ -24488,7 +25569,7 @@ static int _cocos2d_ui_EditBox_setPlaceHolder(lua_State *L) return 0; } -static int _cocos2d_ui_EditBox_setPlaceholderFont(lua_State *L) +static int _olua_fun_cocos2d_ui_EditBox_setPlaceholderFont(lua_State *L) { olua_startinvoke(L); @@ -24508,7 +25589,7 @@ static int _cocos2d_ui_EditBox_setPlaceholderFont(lua_State *L) return 0; } -static int _cocos2d_ui_EditBox_setPlaceholderFontColor$1(lua_State *L) +static int _olua_fun_cocos2d_ui_EditBox_setPlaceholderFontColor$1(lua_State *L) { olua_startinvoke(L); @@ -24526,7 +25607,7 @@ static int _cocos2d_ui_EditBox_setPlaceholderFontColor$1(lua_State *L) return 0; } -static int _cocos2d_ui_EditBox_setPlaceholderFontColor$2(lua_State *L) +static int _olua_fun_cocos2d_ui_EditBox_setPlaceholderFontColor$2(lua_State *L) { olua_startinvoke(L); @@ -24544,19 +25625,19 @@ static int _cocos2d_ui_EditBox_setPlaceholderFontColor$2(lua_State *L) return 0; } -static int _cocos2d_ui_EditBox_setPlaceholderFontColor(lua_State *L) +static int _olua_fun_cocos2d_ui_EditBox_setPlaceholderFontColor(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { if ((olua_is_cocos2d_Color3B(L, 2))) { // void setPlaceholderFontColor(const cocos2d::Color3B &color) - return _cocos2d_ui_EditBox_setPlaceholderFontColor$1(L); + return _olua_fun_cocos2d_ui_EditBox_setPlaceholderFontColor$1(L); } // if ((olua_is_cocos2d_Color4B(L, 2))) { // void setPlaceholderFontColor(const cocos2d::Color4B &color) - return _cocos2d_ui_EditBox_setPlaceholderFontColor$2(L); + return _olua_fun_cocos2d_ui_EditBox_setPlaceholderFontColor$2(L); // } } @@ -24565,7 +25646,7 @@ static int _cocos2d_ui_EditBox_setPlaceholderFontColor(lua_State *L) return 0; } -static int _cocos2d_ui_EditBox_setPlaceholderFontName(lua_State *L) +static int _olua_fun_cocos2d_ui_EditBox_setPlaceholderFontName(lua_State *L) { olua_startinvoke(L); @@ -24583,7 +25664,7 @@ static int _cocos2d_ui_EditBox_setPlaceholderFontName(lua_State *L) return 0; } -static int _cocos2d_ui_EditBox_setPlaceholderFontSize(lua_State *L) +static int _olua_fun_cocos2d_ui_EditBox_setPlaceholderFontSize(lua_State *L) { olua_startinvoke(L); @@ -24601,7 +25682,7 @@ static int _cocos2d_ui_EditBox_setPlaceholderFontSize(lua_State *L) return 0; } -static int _cocos2d_ui_EditBox_setReturnType(lua_State *L) +static int _olua_fun_cocos2d_ui_EditBox_setReturnType(lua_State *L) { olua_startinvoke(L); @@ -24619,7 +25700,7 @@ static int _cocos2d_ui_EditBox_setReturnType(lua_State *L) return 0; } -static int _cocos2d_ui_EditBox_setText(lua_State *L) +static int _olua_fun_cocos2d_ui_EditBox_setText(lua_State *L) { olua_startinvoke(L); @@ -24637,7 +25718,7 @@ static int _cocos2d_ui_EditBox_setText(lua_State *L) return 0; } -static int _cocos2d_ui_EditBox_setTextHorizontalAlignment(lua_State *L) +static int _olua_fun_cocos2d_ui_EditBox_setTextHorizontalAlignment(lua_State *L) { olua_startinvoke(L); @@ -24655,77 +25736,86 @@ static int _cocos2d_ui_EditBox_setTextHorizontalAlignment(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cocos2d_ui_EditBox(lua_State *L) +static int _olua_cls_ccui_EditBox(lua_State *L) { oluacls_class(L, "ccui.EditBox"); - oluacls_func(L, "as", _cocos2d_ui_EditBox_as); - oluacls_func(L, "attachWithIME", _cocos2d_ui_EditBox_attachWithIME); - oluacls_func(L, "create", _cocos2d_ui_EditBox_create); - oluacls_func(L, "detachWithIME", _cocos2d_ui_EditBox_detachWithIME); - oluacls_func(L, "getCapInsetsDisabledRenderer", _cocos2d_ui_EditBox_getCapInsetsDisabledRenderer); - oluacls_func(L, "getCapInsetsNormalRenderer", _cocos2d_ui_EditBox_getCapInsetsNormalRenderer); - oluacls_func(L, "getCapInsetsPressedRenderer", _cocos2d_ui_EditBox_getCapInsetsPressedRenderer); - oluacls_func(L, "getDelegate", _cocos2d_ui_EditBox_getDelegate); - oluacls_func(L, "getFontColor", _cocos2d_ui_EditBox_getFontColor); - oluacls_func(L, "getFontName", _cocos2d_ui_EditBox_getFontName); - oluacls_func(L, "getFontSize", _cocos2d_ui_EditBox_getFontSize); - oluacls_func(L, "getInputFlag", _cocos2d_ui_EditBox_getInputFlag); - oluacls_func(L, "getInputMode", _cocos2d_ui_EditBox_getInputMode); - oluacls_func(L, "getMaxLength", _cocos2d_ui_EditBox_getMaxLength); - oluacls_func(L, "getPlaceHolder", _cocos2d_ui_EditBox_getPlaceHolder); - oluacls_func(L, "getPlaceholderFontColor", _cocos2d_ui_EditBox_getPlaceholderFontColor); - oluacls_func(L, "getPlaceholderFontName", _cocos2d_ui_EditBox_getPlaceholderFontName); - oluacls_func(L, "getPlaceholderFontSize", _cocos2d_ui_EditBox_getPlaceholderFontSize); - oluacls_func(L, "getReturnType", _cocos2d_ui_EditBox_getReturnType); - oluacls_func(L, "getText", _cocos2d_ui_EditBox_getText); - oluacls_func(L, "getTextHorizontalAlignment", _cocos2d_ui_EditBox_getTextHorizontalAlignment); - oluacls_func(L, "initWithSizeAndBackgroundSprite", _cocos2d_ui_EditBox_initWithSizeAndBackgroundSprite); - oluacls_func(L, "initWithSizeAndTexture", _cocos2d_ui_EditBox_initWithSizeAndTexture); - oluacls_func(L, "loadTextureDisabled", _cocos2d_ui_EditBox_loadTextureDisabled); - oluacls_func(L, "loadTextureNormal", _cocos2d_ui_EditBox_loadTextureNormal); - oluacls_func(L, "loadTexturePressed", _cocos2d_ui_EditBox_loadTexturePressed); - oluacls_func(L, "loadTextures", _cocos2d_ui_EditBox_loadTextures); - oluacls_func(L, "new", _cocos2d_ui_EditBox_new); - oluacls_func(L, "openKeyboard", _cocos2d_ui_EditBox_openKeyboard); - oluacls_func(L, "setCapInsets", _cocos2d_ui_EditBox_setCapInsets); - oluacls_func(L, "setCapInsetsDisabledRenderer", _cocos2d_ui_EditBox_setCapInsetsDisabledRenderer); - oluacls_func(L, "setCapInsetsNormalRenderer", _cocos2d_ui_EditBox_setCapInsetsNormalRenderer); - oluacls_func(L, "setCapInsetsPressedRenderer", _cocos2d_ui_EditBox_setCapInsetsPressedRenderer); - oluacls_func(L, "setDelegate", _cocos2d_ui_EditBox_setDelegate); - oluacls_func(L, "setFont", _cocos2d_ui_EditBox_setFont); - oluacls_func(L, "setFontColor", _cocos2d_ui_EditBox_setFontColor); - oluacls_func(L, "setFontName", _cocos2d_ui_EditBox_setFontName); - oluacls_func(L, "setFontSize", _cocos2d_ui_EditBox_setFontSize); - oluacls_func(L, "setInputFlag", _cocos2d_ui_EditBox_setInputFlag); - oluacls_func(L, "setInputMode", _cocos2d_ui_EditBox_setInputMode); - oluacls_func(L, "setMaxLength", _cocos2d_ui_EditBox_setMaxLength); - oluacls_func(L, "setPlaceHolder", _cocos2d_ui_EditBox_setPlaceHolder); - oluacls_func(L, "setPlaceholderFont", _cocos2d_ui_EditBox_setPlaceholderFont); - oluacls_func(L, "setPlaceholderFontColor", _cocos2d_ui_EditBox_setPlaceholderFontColor); - oluacls_func(L, "setPlaceholderFontName", _cocos2d_ui_EditBox_setPlaceholderFontName); - oluacls_func(L, "setPlaceholderFontSize", _cocos2d_ui_EditBox_setPlaceholderFontSize); - oluacls_func(L, "setReturnType", _cocos2d_ui_EditBox_setReturnType); - oluacls_func(L, "setText", _cocos2d_ui_EditBox_setText); - oluacls_func(L, "setTextHorizontalAlignment", _cocos2d_ui_EditBox_setTextHorizontalAlignment); - oluacls_prop(L, "capInsetsDisabledRenderer", _cocos2d_ui_EditBox_getCapInsetsDisabledRenderer, _cocos2d_ui_EditBox_setCapInsetsDisabledRenderer); - oluacls_prop(L, "capInsetsNormalRenderer", _cocos2d_ui_EditBox_getCapInsetsNormalRenderer, _cocos2d_ui_EditBox_setCapInsetsNormalRenderer); - oluacls_prop(L, "capInsetsPressedRenderer", _cocos2d_ui_EditBox_getCapInsetsPressedRenderer, _cocos2d_ui_EditBox_setCapInsetsPressedRenderer); - oluacls_prop(L, "delegate", _cocos2d_ui_EditBox_getDelegate, _cocos2d_ui_EditBox_setDelegate); - oluacls_prop(L, "fontColor", _cocos2d_ui_EditBox_getFontColor, _cocos2d_ui_EditBox_setFontColor); - oluacls_prop(L, "fontName", _cocos2d_ui_EditBox_getFontName, _cocos2d_ui_EditBox_setFontName); - oluacls_prop(L, "fontSize", _cocos2d_ui_EditBox_getFontSize, _cocos2d_ui_EditBox_setFontSize); - oluacls_prop(L, "inputFlag", _cocos2d_ui_EditBox_getInputFlag, _cocos2d_ui_EditBox_setInputFlag); - oluacls_prop(L, "inputMode", _cocos2d_ui_EditBox_getInputMode, _cocos2d_ui_EditBox_setInputMode); - oluacls_prop(L, "maxLength", _cocos2d_ui_EditBox_getMaxLength, _cocos2d_ui_EditBox_setMaxLength); - oluacls_prop(L, "placeHolder", _cocos2d_ui_EditBox_getPlaceHolder, _cocos2d_ui_EditBox_setPlaceHolder); - oluacls_prop(L, "placeholderFontColor", _cocos2d_ui_EditBox_getPlaceholderFontColor, _cocos2d_ui_EditBox_setPlaceholderFontColor); - oluacls_prop(L, "placeholderFontName", _cocos2d_ui_EditBox_getPlaceholderFontName, _cocos2d_ui_EditBox_setPlaceholderFontName); - oluacls_prop(L, "placeholderFontSize", _cocos2d_ui_EditBox_getPlaceholderFontSize, _cocos2d_ui_EditBox_setPlaceholderFontSize); - oluacls_prop(L, "returnType", _cocos2d_ui_EditBox_getReturnType, _cocos2d_ui_EditBox_setReturnType); - oluacls_prop(L, "text", _cocos2d_ui_EditBox_getText, _cocos2d_ui_EditBox_setText); - oluacls_prop(L, "textHorizontalAlignment", _cocos2d_ui_EditBox_getTextHorizontalAlignment, _cocos2d_ui_EditBox_setTextHorizontalAlignment); + oluacls_func(L, "as", _olua_fun_cocos2d_ui_EditBox_as); + oluacls_func(L, "attachWithIME", _olua_fun_cocos2d_ui_EditBox_attachWithIME); + oluacls_func(L, "create", _olua_fun_cocos2d_ui_EditBox_create); + oluacls_func(L, "detachWithIME", _olua_fun_cocos2d_ui_EditBox_detachWithIME); + oluacls_func(L, "getCapInsetsDisabledRenderer", _olua_fun_cocos2d_ui_EditBox_getCapInsetsDisabledRenderer); + oluacls_func(L, "getCapInsetsNormalRenderer", _olua_fun_cocos2d_ui_EditBox_getCapInsetsNormalRenderer); + oluacls_func(L, "getCapInsetsPressedRenderer", _olua_fun_cocos2d_ui_EditBox_getCapInsetsPressedRenderer); + oluacls_func(L, "getDelegate", _olua_fun_cocos2d_ui_EditBox_getDelegate); + oluacls_func(L, "getFontColor", _olua_fun_cocos2d_ui_EditBox_getFontColor); + oluacls_func(L, "getFontName", _olua_fun_cocos2d_ui_EditBox_getFontName); + oluacls_func(L, "getFontSize", _olua_fun_cocos2d_ui_EditBox_getFontSize); + oluacls_func(L, "getInputFlag", _olua_fun_cocos2d_ui_EditBox_getInputFlag); + oluacls_func(L, "getInputMode", _olua_fun_cocos2d_ui_EditBox_getInputMode); + oluacls_func(L, "getMaxLength", _olua_fun_cocos2d_ui_EditBox_getMaxLength); + oluacls_func(L, "getPlaceHolder", _olua_fun_cocos2d_ui_EditBox_getPlaceHolder); + oluacls_func(L, "getPlaceholderFontColor", _olua_fun_cocos2d_ui_EditBox_getPlaceholderFontColor); + oluacls_func(L, "getPlaceholderFontName", _olua_fun_cocos2d_ui_EditBox_getPlaceholderFontName); + oluacls_func(L, "getPlaceholderFontSize", _olua_fun_cocos2d_ui_EditBox_getPlaceholderFontSize); + oluacls_func(L, "getReturnType", _olua_fun_cocos2d_ui_EditBox_getReturnType); + oluacls_func(L, "getText", _olua_fun_cocos2d_ui_EditBox_getText); + oluacls_func(L, "getTextHorizontalAlignment", _olua_fun_cocos2d_ui_EditBox_getTextHorizontalAlignment); + oluacls_func(L, "initWithSizeAndBackgroundSprite", _olua_fun_cocos2d_ui_EditBox_initWithSizeAndBackgroundSprite); + oluacls_func(L, "initWithSizeAndTexture", _olua_fun_cocos2d_ui_EditBox_initWithSizeAndTexture); + oluacls_func(L, "loadTextureDisabled", _olua_fun_cocos2d_ui_EditBox_loadTextureDisabled); + oluacls_func(L, "loadTextureNormal", _olua_fun_cocos2d_ui_EditBox_loadTextureNormal); + oluacls_func(L, "loadTexturePressed", _olua_fun_cocos2d_ui_EditBox_loadTexturePressed); + oluacls_func(L, "loadTextures", _olua_fun_cocos2d_ui_EditBox_loadTextures); + oluacls_func(L, "new", _olua_fun_cocos2d_ui_EditBox_new); + oluacls_func(L, "openKeyboard", _olua_fun_cocos2d_ui_EditBox_openKeyboard); + oluacls_func(L, "setCapInsets", _olua_fun_cocos2d_ui_EditBox_setCapInsets); + oluacls_func(L, "setCapInsetsDisabledRenderer", _olua_fun_cocos2d_ui_EditBox_setCapInsetsDisabledRenderer); + oluacls_func(L, "setCapInsetsNormalRenderer", _olua_fun_cocos2d_ui_EditBox_setCapInsetsNormalRenderer); + oluacls_func(L, "setCapInsetsPressedRenderer", _olua_fun_cocos2d_ui_EditBox_setCapInsetsPressedRenderer); + oluacls_func(L, "setDelegate", _olua_fun_cocos2d_ui_EditBox_setDelegate); + oluacls_func(L, "setFont", _olua_fun_cocos2d_ui_EditBox_setFont); + oluacls_func(L, "setFontColor", _olua_fun_cocos2d_ui_EditBox_setFontColor); + oluacls_func(L, "setFontName", _olua_fun_cocos2d_ui_EditBox_setFontName); + oluacls_func(L, "setFontSize", _olua_fun_cocos2d_ui_EditBox_setFontSize); + oluacls_func(L, "setInputFlag", _olua_fun_cocos2d_ui_EditBox_setInputFlag); + oluacls_func(L, "setInputMode", _olua_fun_cocos2d_ui_EditBox_setInputMode); + oluacls_func(L, "setMaxLength", _olua_fun_cocos2d_ui_EditBox_setMaxLength); + oluacls_func(L, "setPlaceHolder", _olua_fun_cocos2d_ui_EditBox_setPlaceHolder); + oluacls_func(L, "setPlaceholderFont", _olua_fun_cocos2d_ui_EditBox_setPlaceholderFont); + oluacls_func(L, "setPlaceholderFontColor", _olua_fun_cocos2d_ui_EditBox_setPlaceholderFontColor); + oluacls_func(L, "setPlaceholderFontName", _olua_fun_cocos2d_ui_EditBox_setPlaceholderFontName); + oluacls_func(L, "setPlaceholderFontSize", _olua_fun_cocos2d_ui_EditBox_setPlaceholderFontSize); + oluacls_func(L, "setReturnType", _olua_fun_cocos2d_ui_EditBox_setReturnType); + oluacls_func(L, "setText", _olua_fun_cocos2d_ui_EditBox_setText); + oluacls_func(L, "setTextHorizontalAlignment", _olua_fun_cocos2d_ui_EditBox_setTextHorizontalAlignment); + oluacls_prop(L, "capInsetsDisabledRenderer", _olua_fun_cocos2d_ui_EditBox_getCapInsetsDisabledRenderer, _olua_fun_cocos2d_ui_EditBox_setCapInsetsDisabledRenderer); + oluacls_prop(L, "capInsetsNormalRenderer", _olua_fun_cocos2d_ui_EditBox_getCapInsetsNormalRenderer, _olua_fun_cocos2d_ui_EditBox_setCapInsetsNormalRenderer); + oluacls_prop(L, "capInsetsPressedRenderer", _olua_fun_cocos2d_ui_EditBox_getCapInsetsPressedRenderer, _olua_fun_cocos2d_ui_EditBox_setCapInsetsPressedRenderer); + oluacls_prop(L, "delegate", _olua_fun_cocos2d_ui_EditBox_getDelegate, _olua_fun_cocos2d_ui_EditBox_setDelegate); + oluacls_prop(L, "fontColor", _olua_fun_cocos2d_ui_EditBox_getFontColor, nullptr); + oluacls_prop(L, "fontName", _olua_fun_cocos2d_ui_EditBox_getFontName, _olua_fun_cocos2d_ui_EditBox_setFontName); + oluacls_prop(L, "fontSize", _olua_fun_cocos2d_ui_EditBox_getFontSize, _olua_fun_cocos2d_ui_EditBox_setFontSize); + oluacls_prop(L, "inputFlag", _olua_fun_cocos2d_ui_EditBox_getInputFlag, _olua_fun_cocos2d_ui_EditBox_setInputFlag); + oluacls_prop(L, "inputMode", _olua_fun_cocos2d_ui_EditBox_getInputMode, _olua_fun_cocos2d_ui_EditBox_setInputMode); + oluacls_prop(L, "maxLength", _olua_fun_cocos2d_ui_EditBox_getMaxLength, _olua_fun_cocos2d_ui_EditBox_setMaxLength); + oluacls_prop(L, "placeHolder", _olua_fun_cocos2d_ui_EditBox_getPlaceHolder, _olua_fun_cocos2d_ui_EditBox_setPlaceHolder); + oluacls_prop(L, "placeholderFontColor", _olua_fun_cocos2d_ui_EditBox_getPlaceholderFontColor, nullptr); + oluacls_prop(L, "placeholderFontName", _olua_fun_cocos2d_ui_EditBox_getPlaceholderFontName, _olua_fun_cocos2d_ui_EditBox_setPlaceholderFontName); + oluacls_prop(L, "placeholderFontSize", _olua_fun_cocos2d_ui_EditBox_getPlaceholderFontSize, _olua_fun_cocos2d_ui_EditBox_setPlaceholderFontSize); + oluacls_prop(L, "returnType", _olua_fun_cocos2d_ui_EditBox_getReturnType, _olua_fun_cocos2d_ui_EditBox_setReturnType); + oluacls_prop(L, "text", _olua_fun_cocos2d_ui_EditBox_getText, _olua_fun_cocos2d_ui_EditBox_setText); + oluacls_prop(L, "textHorizontalAlignment", _olua_fun_cocos2d_ui_EditBox_getTextHorizontalAlignment, _olua_fun_cocos2d_ui_EditBox_setTextHorizontalAlignment); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_ccui_EditBox(lua_State *L) +{ + olua_require(L, "cocos2d_ui", luaopen_cocos2d_ui); + if (!olua_getclass(L, "ccui.EditBox")) { + luaL_error(L, "class not found: cocos2d::ui::EditBox"); + } return 1; } OLUA_END_DECLS @@ -24733,109 +25823,109 @@ OLUA_END_DECLS OLUA_BEGIN_DECLS OLUA_LIB int luaopen_cocos2d_ui(lua_State *L) { - olua_require(L, "ccui.Widget.FocusDirection", luaopen_cocos2d_ui_Widget_FocusDirection); - olua_require(L, "ccui.Widget.PositionType", luaopen_cocos2d_ui_Widget_PositionType); - olua_require(L, "ccui.Widget.SizeType", luaopen_cocos2d_ui_Widget_SizeType); - olua_require(L, "ccui.Widget.TouchEventType", luaopen_cocos2d_ui_Widget_TouchEventType); - olua_require(L, "ccui.Widget.TextureResType", luaopen_cocos2d_ui_Widget_TextureResType); - olua_require(L, "ccui.Widget.BrightStyle", luaopen_cocos2d_ui_Widget_BrightStyle); - olua_require(L, "ccui.Widget.ccWidgetTouchCallback", luaopen_cocos2d_ui_Widget_ccWidgetTouchCallback); - olua_require(L, "ccui.Widget.ccWidgetClickCallback", luaopen_cocos2d_ui_Widget_ccWidgetClickCallback); - olua_require(L, "ccui.Widget.ccWidgetEventCallback", luaopen_cocos2d_ui_Widget_ccWidgetEventCallback); - olua_require(L, "ccui.LayoutManager", luaopen_cocos2d_ui_LayoutManager); - olua_require(L, "ccui.LayoutParameterProtocol", luaopen_cocos2d_ui_LayoutParameterProtocol); - olua_require(L, "ccui.LayoutProtocol", luaopen_cocos2d_ui_LayoutProtocol); - olua_require(L, "ccui.Widget", luaopen_cocos2d_ui_Widget); - olua_require(L, "ccui.Helper", luaopen_cocos2d_ui_Helper); - olua_require(L, "ccui.Scale9Sprite.State", luaopen_cocos2d_ui_Scale9Sprite_State); - olua_require(L, "ccui.Scale9Sprite.RenderingType", luaopen_cocos2d_ui_Scale9Sprite_RenderingType); - olua_require(L, "ccui.Scale9Sprite", luaopen_cocos2d_ui_Scale9Sprite); - olua_require(L, "ccui.LayoutComponent.HorizontalEdge", luaopen_cocos2d_ui_LayoutComponent_HorizontalEdge); - olua_require(L, "ccui.LayoutComponent.VerticalEdge", luaopen_cocos2d_ui_LayoutComponent_VerticalEdge); - olua_require(L, "ccui.LayoutComponent", luaopen_cocos2d_ui_LayoutComponent); - olua_require(L, "ccui.LayoutParameter.Type", luaopen_cocos2d_ui_LayoutParameter_Type); - olua_require(L, "ccui.LayoutParameter", luaopen_cocos2d_ui_LayoutParameter); - olua_require(L, "ccui.LinearLayoutParameter.LinearGravity", luaopen_cocos2d_ui_LinearLayoutParameter_LinearGravity); - olua_require(L, "ccui.LinearLayoutParameter", luaopen_cocos2d_ui_LinearLayoutParameter); - olua_require(L, "ccui.RelativeLayoutParameter.RelativeAlign", luaopen_cocos2d_ui_RelativeLayoutParameter_RelativeAlign); - olua_require(L, "ccui.RelativeLayoutParameter", luaopen_cocos2d_ui_RelativeLayoutParameter); - olua_require(L, "ccui.Layout.Type", luaopen_cocos2d_ui_Layout_Type); - olua_require(L, "ccui.Layout.ClippingType", luaopen_cocos2d_ui_Layout_ClippingType); - olua_require(L, "ccui.Layout.BackGroundColorType", luaopen_cocos2d_ui_Layout_BackGroundColorType); - olua_require(L, "ccui.Layout", luaopen_cocos2d_ui_Layout); - olua_require(L, "ccui.HBox", luaopen_cocos2d_ui_HBox); - olua_require(L, "ccui.VBox", luaopen_cocos2d_ui_VBox); - olua_require(L, "ccui.RelativeBox", luaopen_cocos2d_ui_RelativeBox); + olua_require(L, "ccui.Widget.FocusDirection", _olua_cls_ccui_Widget_FocusDirection); + olua_require(L, "ccui.Widget.PositionType", _olua_cls_ccui_Widget_PositionType); + olua_require(L, "ccui.Widget.SizeType", _olua_cls_ccui_Widget_SizeType); + olua_require(L, "ccui.Widget.TouchEventType", _olua_cls_ccui_Widget_TouchEventType); + olua_require(L, "ccui.Widget.TextureResType", _olua_cls_ccui_Widget_TextureResType); + olua_require(L, "ccui.Widget.BrightStyle", _olua_cls_ccui_Widget_BrightStyle); + olua_require(L, "ccui.Widget.ccWidgetTouchCallback", _olua_cls_ccui_Widget_ccWidgetTouchCallback); + olua_require(L, "ccui.Widget.ccWidgetClickCallback", _olua_cls_ccui_Widget_ccWidgetClickCallback); + olua_require(L, "ccui.Widget.ccWidgetEventCallback", _olua_cls_ccui_Widget_ccWidgetEventCallback); + olua_require(L, "ccui.LayoutManager", _olua_cls_ccui_LayoutManager); + olua_require(L, "ccui.LayoutParameterProtocol", _olua_cls_ccui_LayoutParameterProtocol); + olua_require(L, "ccui.LayoutProtocol", _olua_cls_ccui_LayoutProtocol); + olua_require(L, "ccui.Widget", _olua_cls_ccui_Widget); + olua_require(L, "ccui.Helper", _olua_cls_ccui_Helper); + olua_require(L, "ccui.Scale9Sprite.State", _olua_cls_ccui_Scale9Sprite_State); + olua_require(L, "ccui.Scale9Sprite.RenderingType", _olua_cls_ccui_Scale9Sprite_RenderingType); + olua_require(L, "ccui.Scale9Sprite", _olua_cls_ccui_Scale9Sprite); + olua_require(L, "ccui.LayoutComponent.HorizontalEdge", _olua_cls_ccui_LayoutComponent_HorizontalEdge); + olua_require(L, "ccui.LayoutComponent.VerticalEdge", _olua_cls_ccui_LayoutComponent_VerticalEdge); + olua_require(L, "ccui.LayoutComponent", _olua_cls_ccui_LayoutComponent); + olua_require(L, "ccui.LayoutParameter.Type", _olua_cls_ccui_LayoutParameter_Type); + olua_require(L, "ccui.LayoutParameter", _olua_cls_ccui_LayoutParameter); + olua_require(L, "ccui.LinearLayoutParameter.LinearGravity", _olua_cls_ccui_LinearLayoutParameter_LinearGravity); + olua_require(L, "ccui.LinearLayoutParameter", _olua_cls_ccui_LinearLayoutParameter); + olua_require(L, "ccui.RelativeLayoutParameter.RelativeAlign", _olua_cls_ccui_RelativeLayoutParameter_RelativeAlign); + olua_require(L, "ccui.RelativeLayoutParameter", _olua_cls_ccui_RelativeLayoutParameter); + olua_require(L, "ccui.Layout.Type", _olua_cls_ccui_Layout_Type); + olua_require(L, "ccui.Layout.ClippingType", _olua_cls_ccui_Layout_ClippingType); + olua_require(L, "ccui.Layout.BackGroundColorType", _olua_cls_ccui_Layout_BackGroundColorType); + olua_require(L, "ccui.Layout", _olua_cls_ccui_Layout); + olua_require(L, "ccui.HBox", _olua_cls_ccui_HBox); + olua_require(L, "ccui.VBox", _olua_cls_ccui_VBox); + olua_require(L, "ccui.RelativeBox", _olua_cls_ccui_RelativeBox); #if defined(CCLUA_OS_IOS) || defined(CCLUA_OS_ANDROID) - olua_require(L, "ccui.WebView.ccWebViewCallback", luaopen_cocos2d_ui_WebView_ccWebViewCallback); - olua_require(L, "ccui.WebView", luaopen_cocos2d_ui_WebView); - olua_require(L, "ccui.VideoPlayer.EventType", luaopen_cocos2d_ui_VideoPlayer_EventType); - olua_require(L, "ccui.VideoPlayer.ccVideoPlayerCallback", luaopen_cocos2d_ui_VideoPlayer_ccVideoPlayerCallback); - olua_require(L, "ccui.VideoPlayer.StyleType", luaopen_cocos2d_ui_VideoPlayer_StyleType); - olua_require(L, "ccui.VideoPlayer", luaopen_cocos2d_ui_VideoPlayer); + olua_require(L, "ccui.WebView.ccWebViewCallback", _olua_cls_ccui_WebView_ccWebViewCallback); + olua_require(L, "ccui.WebView", _olua_cls_ccui_WebView); + olua_require(L, "ccui.VideoPlayer.EventType", _olua_cls_ccui_VideoPlayer_EventType); + olua_require(L, "ccui.VideoPlayer.ccVideoPlayerCallback", _olua_cls_ccui_VideoPlayer_ccVideoPlayerCallback); + olua_require(L, "ccui.VideoPlayer.StyleType", _olua_cls_ccui_VideoPlayer_StyleType); + olua_require(L, "ccui.VideoPlayer", _olua_cls_ccui_VideoPlayer); #endif - olua_require(L, "ccui.AbstractCheckButton", luaopen_cocos2d_ui_AbstractCheckButton); - olua_require(L, "ccui.TabHeader.EventType", luaopen_cocos2d_ui_TabHeader_EventType); - olua_require(L, "ccui.TabHeader", luaopen_cocos2d_ui_TabHeader); - olua_require(L, "ccui.TabControl.Dock", luaopen_cocos2d_ui_TabControl_Dock); - olua_require(L, "ccui.TabControl.EventType", luaopen_cocos2d_ui_TabControl_EventType); - olua_require(L, "ccui.TabControl.ccTabControlCallback", luaopen_cocos2d_ui_TabControl_ccTabControlCallback); - olua_require(L, "ccui.TabControl", luaopen_cocos2d_ui_TabControl); - olua_require(L, "ccui.ScrollView.Direction", luaopen_cocos2d_ui_ScrollView_Direction); - olua_require(L, "ccui.ScrollView.EventType", luaopen_cocos2d_ui_ScrollView_EventType); - olua_require(L, "ccui.ScrollView.ccScrollViewCallback", luaopen_cocos2d_ui_ScrollView_ccScrollViewCallback); - olua_require(L, "ccui.ScrollView", luaopen_cocos2d_ui_ScrollView); - olua_require(L, "ccui.ListView.Gravity", luaopen_cocos2d_ui_ListView_Gravity); - olua_require(L, "ccui.ListView.EventType", luaopen_cocos2d_ui_ListView_EventType); - olua_require(L, "ccui.ListView.MagneticType", luaopen_cocos2d_ui_ListView_MagneticType); - olua_require(L, "ccui.ListView.ccListViewCallback", luaopen_cocos2d_ui_ListView_ccListViewCallback); - olua_require(L, "ccui.ListView", luaopen_cocos2d_ui_ListView); - olua_require(L, "ccui.LoadingBar.Direction", luaopen_cocos2d_ui_LoadingBar_Direction); - olua_require(L, "ccui.LoadingBar", luaopen_cocos2d_ui_LoadingBar); - olua_require(L, "ccui.PageView.EventType", luaopen_cocos2d_ui_PageView_EventType); - olua_require(L, "ccui.PageView.TouchDirection", luaopen_cocos2d_ui_PageView_TouchDirection); - olua_require(L, "ccui.PageView.ccPageViewCallback", luaopen_cocos2d_ui_PageView_ccPageViewCallback); - olua_require(L, "ccui.PageView", luaopen_cocos2d_ui_PageView); - olua_require(L, "ccui.RichElement.Type", luaopen_cocos2d_ui_RichElement_Type); - olua_require(L, "ccui.RichElement", luaopen_cocos2d_ui_RichElement); - olua_require(L, "ccui.RichElementText", luaopen_cocos2d_ui_RichElementText); - olua_require(L, "ccui.RichElementImage", luaopen_cocos2d_ui_RichElementImage); - olua_require(L, "ccui.RichElementCustomNode", luaopen_cocos2d_ui_RichElementCustomNode); - olua_require(L, "ccui.RichElementNewLine", luaopen_cocos2d_ui_RichElementNewLine); - olua_require(L, "ccui.RichText.WrapMode", luaopen_cocos2d_ui_RichText_WrapMode); - olua_require(L, "ccui.RichText.HorizontalAlignment", luaopen_cocos2d_ui_RichText_HorizontalAlignment); - olua_require(L, "ccui.RichText.OpenUrlHandler", luaopen_cocos2d_ui_RichText_OpenUrlHandler); - olua_require(L, "ccui.RichText", luaopen_cocos2d_ui_RichText); - olua_require(L, "ccui.ScrollViewBar", luaopen_cocos2d_ui_ScrollViewBar); - olua_require(L, "ccui.Slider.EventType", luaopen_cocos2d_ui_Slider_EventType); - olua_require(L, "ccui.Slider.ccSliderCallback", luaopen_cocos2d_ui_Slider_ccSliderCallback); - olua_require(L, "ccui.Slider", luaopen_cocos2d_ui_Slider); - olua_require(L, "ccui.Text.Type", luaopen_cocos2d_ui_Text_Type); - olua_require(L, "ccui.Text", luaopen_cocos2d_ui_Text); - olua_require(L, "ccui.TextAtlas", luaopen_cocos2d_ui_TextAtlas); - olua_require(L, "ccui.TextBMFont", luaopen_cocos2d_ui_TextBMFont); - olua_require(L, "ccui.UICCTextField", luaopen_cocos2d_ui_UICCTextField); - olua_require(L, "ccui.TextField.EventType", luaopen_cocos2d_ui_TextField_EventType); - olua_require(L, "ccui.TextField.ccTextFieldCallback", luaopen_cocos2d_ui_TextField_ccTextFieldCallback); - olua_require(L, "ccui.TextField", luaopen_cocos2d_ui_TextField); - olua_require(L, "ccui.Button", luaopen_cocos2d_ui_Button); - olua_require(L, "ccui.CheckBox.EventType", luaopen_cocos2d_ui_CheckBox_EventType); - olua_require(L, "ccui.CheckBox.ccCheckBoxCallback", luaopen_cocos2d_ui_CheckBox_ccCheckBoxCallback); - olua_require(L, "ccui.CheckBox", luaopen_cocos2d_ui_CheckBox); - olua_require(L, "ccui.RadioButton.EventType", luaopen_cocos2d_ui_RadioButton_EventType); - olua_require(L, "ccui.RadioButton.ccRadioButtonCallback", luaopen_cocos2d_ui_RadioButton_ccRadioButtonCallback); - olua_require(L, "ccui.RadioButton", luaopen_cocos2d_ui_RadioButton); - olua_require(L, "ccui.RadioButtonGroup.EventType", luaopen_cocos2d_ui_RadioButtonGroup_EventType); - olua_require(L, "ccui.RadioButtonGroup.ccRadioButtonGroupCallback", luaopen_cocos2d_ui_RadioButtonGroup_ccRadioButtonGroupCallback); - olua_require(L, "ccui.RadioButtonGroup", luaopen_cocos2d_ui_RadioButtonGroup); - olua_require(L, "ccui.ImageView", luaopen_cocos2d_ui_ImageView); - olua_require(L, "ccui.EditBoxDelegate.EditBoxEndAction", luaopen_cocos2d_ui_EditBoxDelegate_EditBoxEndAction); - olua_require(L, "ccui.EditBoxDelegate", luaopen_cocos2d_ui_EditBoxDelegate); - olua_require(L, "ccui.LuaEditBoxDelegate", luaopen_cocos2d_ui_LuaEditBoxDelegate); - olua_require(L, "ccui.EditBox.KeyboardReturnType", luaopen_cocos2d_ui_EditBox_KeyboardReturnType); - olua_require(L, "ccui.EditBox.InputMode", luaopen_cocos2d_ui_EditBox_InputMode); - olua_require(L, "ccui.EditBox.InputFlag", luaopen_cocos2d_ui_EditBox_InputFlag); - olua_require(L, "ccui.EditBox", luaopen_cocos2d_ui_EditBox); + olua_require(L, "ccui.AbstractCheckButton", _olua_cls_ccui_AbstractCheckButton); + olua_require(L, "ccui.TabHeader.EventType", _olua_cls_ccui_TabHeader_EventType); + olua_require(L, "ccui.TabHeader", _olua_cls_ccui_TabHeader); + olua_require(L, "ccui.TabControl.Dock", _olua_cls_ccui_TabControl_Dock); + olua_require(L, "ccui.TabControl.EventType", _olua_cls_ccui_TabControl_EventType); + olua_require(L, "ccui.TabControl.ccTabControlCallback", _olua_cls_ccui_TabControl_ccTabControlCallback); + olua_require(L, "ccui.TabControl", _olua_cls_ccui_TabControl); + olua_require(L, "ccui.ScrollView.Direction", _olua_cls_ccui_ScrollView_Direction); + olua_require(L, "ccui.ScrollView.EventType", _olua_cls_ccui_ScrollView_EventType); + olua_require(L, "ccui.ScrollView.ccScrollViewCallback", _olua_cls_ccui_ScrollView_ccScrollViewCallback); + olua_require(L, "ccui.ScrollView", _olua_cls_ccui_ScrollView); + olua_require(L, "ccui.ListView.Gravity", _olua_cls_ccui_ListView_Gravity); + olua_require(L, "ccui.ListView.EventType", _olua_cls_ccui_ListView_EventType); + olua_require(L, "ccui.ListView.MagneticType", _olua_cls_ccui_ListView_MagneticType); + olua_require(L, "ccui.ListView.ccListViewCallback", _olua_cls_ccui_ListView_ccListViewCallback); + olua_require(L, "ccui.ListView", _olua_cls_ccui_ListView); + olua_require(L, "ccui.LoadingBar.Direction", _olua_cls_ccui_LoadingBar_Direction); + olua_require(L, "ccui.LoadingBar", _olua_cls_ccui_LoadingBar); + olua_require(L, "ccui.PageView.EventType", _olua_cls_ccui_PageView_EventType); + olua_require(L, "ccui.PageView.TouchDirection", _olua_cls_ccui_PageView_TouchDirection); + olua_require(L, "ccui.PageView.ccPageViewCallback", _olua_cls_ccui_PageView_ccPageViewCallback); + olua_require(L, "ccui.PageView", _olua_cls_ccui_PageView); + olua_require(L, "ccui.RichElement.Type", _olua_cls_ccui_RichElement_Type); + olua_require(L, "ccui.RichElement", _olua_cls_ccui_RichElement); + olua_require(L, "ccui.RichElementText", _olua_cls_ccui_RichElementText); + olua_require(L, "ccui.RichElementImage", _olua_cls_ccui_RichElementImage); + olua_require(L, "ccui.RichElementCustomNode", _olua_cls_ccui_RichElementCustomNode); + olua_require(L, "ccui.RichElementNewLine", _olua_cls_ccui_RichElementNewLine); + olua_require(L, "ccui.RichText.WrapMode", _olua_cls_ccui_RichText_WrapMode); + olua_require(L, "ccui.RichText.HorizontalAlignment", _olua_cls_ccui_RichText_HorizontalAlignment); + olua_require(L, "ccui.RichText.OpenUrlHandler", _olua_cls_ccui_RichText_OpenUrlHandler); + olua_require(L, "ccui.RichText", _olua_cls_ccui_RichText); + olua_require(L, "ccui.ScrollViewBar", _olua_cls_ccui_ScrollViewBar); + olua_require(L, "ccui.Slider.EventType", _olua_cls_ccui_Slider_EventType); + olua_require(L, "ccui.Slider.ccSliderCallback", _olua_cls_ccui_Slider_ccSliderCallback); + olua_require(L, "ccui.Slider", _olua_cls_ccui_Slider); + olua_require(L, "ccui.Text.Type", _olua_cls_ccui_Text_Type); + olua_require(L, "ccui.Text", _olua_cls_ccui_Text); + olua_require(L, "ccui.TextAtlas", _olua_cls_ccui_TextAtlas); + olua_require(L, "ccui.TextBMFont", _olua_cls_ccui_TextBMFont); + olua_require(L, "ccui.UICCTextField", _olua_cls_ccui_UICCTextField); + olua_require(L, "ccui.TextField.EventType", _olua_cls_ccui_TextField_EventType); + olua_require(L, "ccui.TextField.ccTextFieldCallback", _olua_cls_ccui_TextField_ccTextFieldCallback); + olua_require(L, "ccui.TextField", _olua_cls_ccui_TextField); + olua_require(L, "ccui.Button", _olua_cls_ccui_Button); + olua_require(L, "ccui.CheckBox.EventType", _olua_cls_ccui_CheckBox_EventType); + olua_require(L, "ccui.CheckBox.ccCheckBoxCallback", _olua_cls_ccui_CheckBox_ccCheckBoxCallback); + olua_require(L, "ccui.CheckBox", _olua_cls_ccui_CheckBox); + olua_require(L, "ccui.RadioButton.EventType", _olua_cls_ccui_RadioButton_EventType); + olua_require(L, "ccui.RadioButton.ccRadioButtonCallback", _olua_cls_ccui_RadioButton_ccRadioButtonCallback); + olua_require(L, "ccui.RadioButton", _olua_cls_ccui_RadioButton); + olua_require(L, "ccui.RadioButtonGroup.EventType", _olua_cls_ccui_RadioButtonGroup_EventType); + olua_require(L, "ccui.RadioButtonGroup.ccRadioButtonGroupCallback", _olua_cls_ccui_RadioButtonGroup_ccRadioButtonGroupCallback); + olua_require(L, "ccui.RadioButtonGroup", _olua_cls_ccui_RadioButtonGroup); + olua_require(L, "ccui.ImageView", _olua_cls_ccui_ImageView); + olua_require(L, "ccui.EditBoxDelegate.EditBoxEndAction", _olua_cls_ccui_EditBoxDelegate_EditBoxEndAction); + olua_require(L, "ccui.EditBoxDelegate", _olua_cls_ccui_EditBoxDelegate); + olua_require(L, "ccui.LuaEditBoxDelegate", _olua_cls_ccui_LuaEditBoxDelegate); + olua_require(L, "ccui.EditBox.KeyboardReturnType", _olua_cls_ccui_EditBox_KeyboardReturnType); + olua_require(L, "ccui.EditBox.InputMode", _olua_cls_ccui_EditBox_InputMode); + olua_require(L, "ccui.EditBox.InputFlag", _olua_cls_ccui_EditBox_InputFlag); + olua_require(L, "ccui.EditBox", _olua_cls_ccui_EditBox); return 0; } diff --git a/frameworks/cclua/src/lua-bindings/lua_cocos2d_ui.h b/frameworks/cclua/src/lua-bindings/lua_cocos2d_ui.h index 47558427..83b706e8 100644 --- a/frameworks/cclua/src/lua-bindings/lua_cocos2d_ui.h +++ b/frameworks/cclua/src/lua-bindings/lua_cocos2d_ui.h @@ -1,5 +1,5 @@ // -// AUTO BUILD, DON'T MODIFY! +// AUTO GENERATED, DO NOT MODIFY! // #ifndef __AUTO_GEN_LUA_COCOS2D_UI_H__ #define __AUTO_GEN_LUA_COCOS2D_UI_H__ diff --git a/frameworks/cclua/src/lua-bindings/lua_dragonbones.cpp b/frameworks/cclua/src/lua-bindings/lua_dragonbones.cpp index 95b479e9..ad4f1b94 100644 --- a/frameworks/cclua/src/lua-bindings/lua_dragonbones.cpp +++ b/frameworks/cclua/src/lua-bindings/lua_dragonbones.cpp @@ -1,5 +1,5 @@ // -// AUTO BUILD, DON'T MODIFY! +// AUTO GENERATED, DO NOT MODIFY! // #include "lua_dragonbones.h" #include "lua-bindings/lua_cocos2d_types.h" @@ -7,47 +7,7 @@ #include "cocos2d.h" #include "CCDragonBonesHeaders.h" -static int _dragonBones_Rectangle___call(lua_State *L) -{ - olua_startinvoke(L); - - dragonBones::Rectangle ret; - - luaL_checktype(L, 2, LUA_TTABLE); - - float arg1 = 0; /** x */ - float arg2 = 0; /** y */ - float arg3 = 0; /** width */ - float arg4 = 0; /** height */ - - olua_getfield(L, 2, "x"); - olua_check_number(L, -1, &arg1); - ret.x = arg1; - lua_pop(L, 1); - - olua_getfield(L, 2, "y"); - olua_check_number(L, -1, &arg2); - ret.y = arg2; - lua_pop(L, 1); - - olua_getfield(L, 2, "width"); - olua_check_number(L, -1, &arg3); - ret.width = arg3; - lua_pop(L, 1); - - olua_getfield(L, 2, "height"); - olua_check_number(L, -1, &arg4); - ret.height = arg4; - lua_pop(L, 1); - - olua_pushcopy_object(L, ret, "db.Rectangle"); - - olua_endinvoke(L); - - return 1; -} - -static int _dragonBones_Rectangle___gc(lua_State *L) +static int _olua_fun_dragonBones_Rectangle___gc(lua_State *L) { olua_startinvoke(L); @@ -59,7 +19,7 @@ static int _dragonBones_Rectangle___gc(lua_State *L) return 0; } -static int _dragonBones_Rectangle___olua_move(lua_State *L) +static int _olua_fun_dragonBones_Rectangle___olua_move(lua_State *L) { olua_startinvoke(L); @@ -71,7 +31,7 @@ static int _dragonBones_Rectangle___olua_move(lua_State *L) return 1; } -static int _dragonBones_Rectangle_clear(lua_State *L) +static int _olua_fun_dragonBones_Rectangle_clear(lua_State *L) { olua_startinvoke(L); @@ -87,95 +47,77 @@ static int _dragonBones_Rectangle_clear(lua_State *L) return 0; } -static int _dragonBones_Rectangle_new$1(lua_State *L) +static int _olua_fun_dragonBones_Rectangle_height$1(lua_State *L) { olua_startinvoke(L); - // Rectangle() - dragonBones::Rectangle *ret = new dragonBones::Rectangle(); - int num_ret = olua_push_object(L, ret, "db.Rectangle"); - olua_postnew(L, ret); + dragonBones::Rectangle *self = nullptr; + + olua_to_object(L, 1, &self, "db.Rectangle"); + + // float height + float ret = self->height; + int num_ret = olua_push_number(L, ret); olua_endinvoke(L); return num_ret; } -static int _dragonBones_Rectangle_new$2(lua_State *L) +static int _olua_fun_dragonBones_Rectangle_height$2(lua_State *L) { olua_startinvoke(L); - dragonBones::Rectangle arg1; /** value */ + dragonBones::Rectangle *self = nullptr; + float arg1 = 0; /** height */ - olua_check_object(L, 1, &arg1, "db.Rectangle"); + olua_to_object(L, 1, &self, "db.Rectangle"); + olua_check_number(L, 2, &arg1); - // Rectangle(const dragonBones::Rectangle &value) - dragonBones::Rectangle *ret = new dragonBones::Rectangle(arg1); - int num_ret = olua_push_object(L, ret, "db.Rectangle"); - olua_postnew(L, ret); + // float height + self->height = arg1; olua_endinvoke(L); - return num_ret; + return 0; } -static int _dragonBones_Rectangle_new(lua_State *L) +static int _olua_fun_dragonBones_Rectangle_height(lua_State *L) { - int num_args = lua_gettop(L); + int num_args = lua_gettop(L) - 1; if (num_args == 0) { - // Rectangle() - return _dragonBones_Rectangle_new$1(L); + // float height + return _olua_fun_dragonBones_Rectangle_height$1(L); } if (num_args == 1) { - // if ((olua_is_object(L, 1, "db.Rectangle"))) { - // Rectangle(const dragonBones::Rectangle &value) - return _dragonBones_Rectangle_new$2(L); + // if ((olua_is_number(L, 2))) { + // float height + return _olua_fun_dragonBones_Rectangle_height$2(L); // } } - luaL_error(L, "method 'dragonBones::Rectangle::new' not support '%d' arguments", num_args); + luaL_error(L, "method 'dragonBones::Rectangle::height' not support '%d' arguments", num_args); return 0; } -static int _dragonBones_Rectangle_get_height(lua_State *L) +static int _olua_fun_dragonBones_Rectangle_new(lua_State *L) { olua_startinvoke(L); - dragonBones::Rectangle *self = nullptr; - - olua_to_object(L, 1, &self, "db.Rectangle"); - - // float height - float ret = self->height; - int num_ret = olua_push_number(L, ret); + // dragonBones::Rectangle() + dragonBones::Rectangle *ret = new dragonBones::Rectangle(); + int num_ret = olua_push_object(L, ret, "db.Rectangle"); + olua_postnew(L, ret); olua_endinvoke(L); return num_ret; } -static int _dragonBones_Rectangle_set_height(lua_State *L) -{ - olua_startinvoke(L); - - dragonBones::Rectangle *self = nullptr; - float arg1 = 0; /** height */ - - olua_to_object(L, 1, &self, "db.Rectangle"); - olua_check_number(L, 2, &arg1); - - // float height - self->height = arg1; - - olua_endinvoke(L); - - return 0; -} - -static int _dragonBones_Rectangle_get_width(lua_State *L) +static int _olua_fun_dragonBones_Rectangle_width$1(lua_State *L) { olua_startinvoke(L); @@ -192,7 +134,7 @@ static int _dragonBones_Rectangle_get_width(lua_State *L) return num_ret; } -static int _dragonBones_Rectangle_set_width(lua_State *L) +static int _olua_fun_dragonBones_Rectangle_width$2(lua_State *L) { olua_startinvoke(L); @@ -210,7 +152,28 @@ static int _dragonBones_Rectangle_set_width(lua_State *L) return 0; } -static int _dragonBones_Rectangle_get_x(lua_State *L) +static int _olua_fun_dragonBones_Rectangle_width(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float width + return _olua_fun_dragonBones_Rectangle_width$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float width + return _olua_fun_dragonBones_Rectangle_width$2(L); + // } + } + + luaL_error(L, "method 'dragonBones::Rectangle::width' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_dragonBones_Rectangle_x$1(lua_State *L) { olua_startinvoke(L); @@ -227,7 +190,7 @@ static int _dragonBones_Rectangle_get_x(lua_State *L) return num_ret; } -static int _dragonBones_Rectangle_set_x(lua_State *L) +static int _olua_fun_dragonBones_Rectangle_x$2(lua_State *L) { olua_startinvoke(L); @@ -245,7 +208,28 @@ static int _dragonBones_Rectangle_set_x(lua_State *L) return 0; } -static int _dragonBones_Rectangle_get_y(lua_State *L) +static int _olua_fun_dragonBones_Rectangle_x(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float x + return _olua_fun_dragonBones_Rectangle_x$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float x + return _olua_fun_dragonBones_Rectangle_x$2(L); + // } + } + + luaL_error(L, "method 'dragonBones::Rectangle::x' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_dragonBones_Rectangle_y$1(lua_State *L) { olua_startinvoke(L); @@ -262,7 +246,7 @@ static int _dragonBones_Rectangle_get_y(lua_State *L) return num_ret; } -static int _dragonBones_Rectangle_set_y(lua_State *L) +static int _olua_fun_dragonBones_Rectangle_y$2(lua_State *L) { olua_startinvoke(L); @@ -280,26 +264,54 @@ static int _dragonBones_Rectangle_set_y(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_dragonBones_Rectangle(lua_State *L) +static int _olua_fun_dragonBones_Rectangle_y(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float y + return _olua_fun_dragonBones_Rectangle_y$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float y + return _olua_fun_dragonBones_Rectangle_y$2(L); + // } + } + + luaL_error(L, "method 'dragonBones::Rectangle::y' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_cls_db_Rectangle(lua_State *L) { oluacls_class(L, "db.Rectangle"); - oluacls_func(L, "__call", _dragonBones_Rectangle___call); - oluacls_func(L, "__gc", _dragonBones_Rectangle___gc); - oluacls_func(L, "__olua_move", _dragonBones_Rectangle___olua_move); - oluacls_func(L, "clear", _dragonBones_Rectangle_clear); - oluacls_func(L, "new", _dragonBones_Rectangle_new); - oluacls_prop(L, "height", _dragonBones_Rectangle_get_height, _dragonBones_Rectangle_set_height); - oluacls_prop(L, "width", _dragonBones_Rectangle_get_width, _dragonBones_Rectangle_set_width); - oluacls_prop(L, "x", _dragonBones_Rectangle_get_x, _dragonBones_Rectangle_set_x); - oluacls_prop(L, "y", _dragonBones_Rectangle_get_y, _dragonBones_Rectangle_set_y); + oluacls_func(L, "__gc", _olua_fun_dragonBones_Rectangle___gc); + oluacls_func(L, "__olua_move", _olua_fun_dragonBones_Rectangle___olua_move); + oluacls_func(L, "clear", _olua_fun_dragonBones_Rectangle_clear); + oluacls_func(L, "new", _olua_fun_dragonBones_Rectangle_new); + oluacls_prop(L, "height", _olua_fun_dragonBones_Rectangle_height, _olua_fun_dragonBones_Rectangle_height); + oluacls_prop(L, "width", _olua_fun_dragonBones_Rectangle_width, _olua_fun_dragonBones_Rectangle_width); + oluacls_prop(L, "x", _olua_fun_dragonBones_Rectangle_x, _olua_fun_dragonBones_Rectangle_x); + oluacls_prop(L, "y", _olua_fun_dragonBones_Rectangle_y, _olua_fun_dragonBones_Rectangle_y); return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_dragonBones_BinaryOffset(lua_State *L) +OLUA_LIB int luaopen_db_Rectangle(lua_State *L) +{ + olua_require(L, "dragonbones", luaopen_dragonbones); + if (!olua_getclass(L, "db.Rectangle")) { + luaL_error(L, "class not found: dragonBones::Rectangle"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_db_BinaryOffset(lua_State *L) { oluacls_class(L, "db.BinaryOffset"); oluacls_func(L, "__index", olua_indexerror); @@ -330,10 +342,19 @@ OLUA_LIB int luaopen_dragonBones_BinaryOffset(lua_State *L) return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_dragonBones_ArmatureType(lua_State *L) +OLUA_LIB int luaopen_db_BinaryOffset(lua_State *L) +{ + olua_require(L, "dragonbones", luaopen_dragonbones); + if (!olua_getclass(L, "db.BinaryOffset")) { + luaL_error(L, "class not found: dragonBones::BinaryOffset"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_db_ArmatureType(lua_State *L) { oluacls_class(L, "db.ArmatureType"); oluacls_func(L, "__index", olua_indexerror); @@ -344,10 +365,19 @@ OLUA_LIB int luaopen_dragonBones_ArmatureType(lua_State *L) return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_dragonBones_OffsetMode(lua_State *L) +OLUA_LIB int luaopen_db_ArmatureType(lua_State *L) +{ + olua_require(L, "dragonbones", luaopen_dragonbones); + if (!olua_getclass(L, "db.ArmatureType")) { + luaL_error(L, "class not found: dragonBones::ArmatureType"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_db_OffsetMode(lua_State *L) { oluacls_class(L, "db.OffsetMode"); oluacls_func(L, "__index", olua_indexerror); @@ -358,10 +388,19 @@ OLUA_LIB int luaopen_dragonBones_OffsetMode(lua_State *L) return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_dragonBones_DisplayType(lua_State *L) +OLUA_LIB int luaopen_db_OffsetMode(lua_State *L) +{ + olua_require(L, "dragonbones", luaopen_dragonbones); + if (!olua_getclass(L, "db.OffsetMode")) { + luaL_error(L, "class not found: dragonBones::OffsetMode"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_db_DisplayType(lua_State *L) { oluacls_class(L, "db.DisplayType"); oluacls_func(L, "__index", olua_indexerror); @@ -374,10 +413,19 @@ OLUA_LIB int luaopen_dragonBones_DisplayType(lua_State *L) return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_dragonBones_BoundingBoxType(lua_State *L) +OLUA_LIB int luaopen_db_DisplayType(lua_State *L) +{ + olua_require(L, "dragonbones", luaopen_dragonbones); + if (!olua_getclass(L, "db.DisplayType")) { + luaL_error(L, "class not found: dragonBones::DisplayType"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_db_BoundingBoxType(lua_State *L) { oluacls_class(L, "db.BoundingBoxType"); oluacls_func(L, "__index", olua_indexerror); @@ -388,10 +436,19 @@ OLUA_LIB int luaopen_dragonBones_BoundingBoxType(lua_State *L) return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_dragonBones_ActionType(lua_State *L) +OLUA_LIB int luaopen_db_BoundingBoxType(lua_State *L) +{ + olua_require(L, "dragonbones", luaopen_dragonbones); + if (!olua_getclass(L, "db.BoundingBoxType")) { + luaL_error(L, "class not found: dragonBones::BoundingBoxType"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_db_ActionType(lua_State *L) { oluacls_class(L, "db.ActionType"); oluacls_func(L, "__index", olua_indexerror); @@ -402,10 +459,19 @@ OLUA_LIB int luaopen_dragonBones_ActionType(lua_State *L) return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_dragonBones_BlendMode(lua_State *L) +OLUA_LIB int luaopen_db_ActionType(lua_State *L) +{ + olua_require(L, "dragonbones", luaopen_dragonbones); + if (!olua_getclass(L, "db.ActionType")) { + luaL_error(L, "class not found: dragonBones::ActionType"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_db_BlendMode(lua_State *L) { oluacls_class(L, "db.BlendMode"); oluacls_func(L, "__index", olua_indexerror); @@ -427,10 +493,19 @@ OLUA_LIB int luaopen_dragonBones_BlendMode(lua_State *L) return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_dragonBones_TweenType(lua_State *L) +OLUA_LIB int luaopen_db_BlendMode(lua_State *L) +{ + olua_require(L, "dragonbones", luaopen_dragonbones); + if (!olua_getclass(L, "db.BlendMode")) { + luaL_error(L, "class not found: dragonBones::BlendMode"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_db_TweenType(lua_State *L) { oluacls_class(L, "db.TweenType"); oluacls_func(L, "__index", olua_indexerror); @@ -444,10 +519,19 @@ OLUA_LIB int luaopen_dragonBones_TweenType(lua_State *L) return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_dragonBones_TimelineType(lua_State *L) +OLUA_LIB int luaopen_db_TweenType(lua_State *L) +{ + olua_require(L, "dragonbones", luaopen_dragonbones); + if (!olua_getclass(L, "db.TweenType")) { + luaL_error(L, "class not found: dragonBones::TweenType"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_db_TimelineType(lua_State *L) { oluacls_class(L, "db.TimelineType"); oluacls_func(L, "__index", olua_indexerror); @@ -467,10 +551,19 @@ OLUA_LIB int luaopen_dragonBones_TimelineType(lua_State *L) return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_dragonBones_AnimationFadeOutMode(lua_State *L) +OLUA_LIB int luaopen_db_TimelineType(lua_State *L) +{ + olua_require(L, "dragonbones", luaopen_dragonbones); + if (!olua_getclass(L, "db.TimelineType")) { + luaL_error(L, "class not found: dragonBones::TimelineType"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_db_AnimationFadeOutMode(lua_State *L) { oluacls_class(L, "db.AnimationFadeOutMode"); oluacls_func(L, "__index", olua_indexerror); @@ -484,10 +577,19 @@ OLUA_LIB int luaopen_dragonBones_AnimationFadeOutMode(lua_State *L) return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_dragonBones_TextureFormat(lua_State *L) +OLUA_LIB int luaopen_db_AnimationFadeOutMode(lua_State *L) +{ + olua_require(L, "dragonbones", luaopen_dragonbones); + if (!olua_getclass(L, "db.AnimationFadeOutMode")) { + luaL_error(L, "class not found: dragonBones::AnimationFadeOutMode"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_db_TextureFormat(lua_State *L) { oluacls_class(L, "db.TextureFormat"); oluacls_func(L, "__index", olua_indexerror); @@ -502,9 +604,19 @@ OLUA_LIB int luaopen_dragonBones_TextureFormat(lua_State *L) return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_db_TextureFormat(lua_State *L) +{ + olua_require(L, "dragonbones", luaopen_dragonbones); + if (!olua_getclass(L, "db.TextureFormat")) { + luaL_error(L, "class not found: dragonBones::TextureFormat"); + } + return 1; +} OLUA_END_DECLS -static int _dragonBones_DragonBones___gc(lua_State *L) +static int _olua_fun_dragonBones_DragonBones___gc(lua_State *L) { olua_startinvoke(L); @@ -516,7 +628,7 @@ static int _dragonBones_DragonBones___gc(lua_State *L) return 0; } -static int _dragonBones_DragonBones___olua_move(lua_State *L) +static int _olua_fun_dragonBones_DragonBones___olua_move(lua_State *L) { olua_startinvoke(L); @@ -528,7 +640,7 @@ static int _dragonBones_DragonBones___olua_move(lua_State *L) return 1; } -static int _dragonBones_DragonBones_advanceTime(lua_State *L) +static int _olua_fun_dragonBones_DragonBones_advanceTime(lua_State *L) { olua_startinvoke(L); @@ -546,7 +658,7 @@ static int _dragonBones_DragonBones_advanceTime(lua_State *L) return 0; } -static int _dragonBones_DragonBones_bufferEvent(lua_State *L) +static int _olua_fun_dragonBones_DragonBones_bufferEvent(lua_State *L) { olua_startinvoke(L); @@ -564,7 +676,7 @@ static int _dragonBones_DragonBones_bufferEvent(lua_State *L) return 0; } -static int _dragonBones_DragonBones_bufferObject(lua_State *L) +static int _olua_fun_dragonBones_DragonBones_bufferObject(lua_State *L) { olua_startinvoke(L); @@ -582,64 +694,62 @@ static int _dragonBones_DragonBones_bufferObject(lua_State *L) return 0; } -static int _dragonBones_DragonBones_getClock(lua_State *L) +static int _olua_fun_dragonBones_DragonBones_debug$1(lua_State *L) { olua_startinvoke(L); - dragonBones::DragonBones *self = nullptr; - - olua_to_object(L, 1, &self, "db.DragonBones"); - - // dragonBones::WorldClock *getClock() - dragonBones::WorldClock *ret = self->getClock(); - int num_ret = olua_push_object(L, ret, "db.WorldClock"); + // static bool debug + bool ret = dragonBones::DragonBones::debug; + int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); return num_ret; } -static int _dragonBones_DragonBones_getEventManager(lua_State *L) +static int _olua_fun_dragonBones_DragonBones_debug$2(lua_State *L) { olua_startinvoke(L); - dragonBones::DragonBones *self = nullptr; + bool arg1 = false; /** debug */ - olua_to_object(L, 1, &self, "db.DragonBones"); + olua_check_bool(L, 1, &arg1); - // dragonBones::IEventDispatcher *getEventManager() - dragonBones::IEventDispatcher *ret = self->getEventManager(); - int num_ret = olua_push_object(L, ret, "db.IEventDispatcher"); + // static bool debug + dragonBones::DragonBones::debug = arg1; olua_endinvoke(L); - return num_ret; + return 0; } -static int _dragonBones_DragonBones_new(lua_State *L) +static int _olua_fun_dragonBones_DragonBones_debug(lua_State *L) { - olua_startinvoke(L); - - dragonBones::IEventDispatcher *arg1 = nullptr; /** eventManager */ + int num_args = lua_gettop(L); - olua_check_object(L, 1, &arg1, "db.IEventDispatcher"); + if (num_args == 0) { + // static bool debug + return _olua_fun_dragonBones_DragonBones_debug$1(L); + } - // DragonBones(dragonBones::IEventDispatcher *eventManager) - dragonBones::DragonBones *ret = new dragonBones::DragonBones(arg1); - int num_ret = olua_push_object(L, ret, "db.DragonBones"); - olua_postnew(L, ret); + if (num_args == 1) { + // if ((olua_is_bool(L, 1))) { + // static bool debug + return _olua_fun_dragonBones_DragonBones_debug$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'dragonBones::DragonBones::debug' not support '%d' arguments", num_args); - return num_ret; + return 0; } -static int _dragonBones_DragonBones_get_debug(lua_State *L) +static int _olua_fun_dragonBones_DragonBones_debugDraw$1(lua_State *L) { olua_startinvoke(L); - // static bool debug - bool ret = dragonBones::DragonBones::debug; + // static bool debugDraw + bool ret = dragonBones::DragonBones::debugDraw; int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); @@ -647,52 +757,96 @@ static int _dragonBones_DragonBones_get_debug(lua_State *L) return num_ret; } -static int _dragonBones_DragonBones_set_debug(lua_State *L) +static int _olua_fun_dragonBones_DragonBones_debugDraw$2(lua_State *L) { olua_startinvoke(L); - bool arg1 = false; /** debug */ + bool arg1 = false; /** debugDraw */ olua_check_bool(L, 1, &arg1); - // static bool debug - dragonBones::DragonBones::debug = arg1; + // static bool debugDraw + dragonBones::DragonBones::debugDraw = arg1; olua_endinvoke(L); return 0; } -static int _dragonBones_DragonBones_get_debugDraw(lua_State *L) +static int _olua_fun_dragonBones_DragonBones_debugDraw(lua_State *L) { - olua_startinvoke(L); + int num_args = lua_gettop(L); - // static bool debugDraw - bool ret = dragonBones::DragonBones::debugDraw; - int num_ret = olua_push_bool(L, ret); + if (num_args == 0) { + // static bool debugDraw + return _olua_fun_dragonBones_DragonBones_debugDraw$1(L); + } - olua_endinvoke(L); + if (num_args == 1) { + // if ((olua_is_bool(L, 1))) { + // static bool debugDraw + return _olua_fun_dragonBones_DragonBones_debugDraw$2(L); + // } + } - return num_ret; + luaL_error(L, "method 'dragonBones::DragonBones::debugDraw' not support '%d' arguments", num_args); + + return 0; } -static int _dragonBones_DragonBones_set_debugDraw(lua_State *L) +static int _olua_fun_dragonBones_DragonBones_getClock(lua_State *L) { olua_startinvoke(L); - bool arg1 = false; /** debugDraw */ + dragonBones::DragonBones *self = nullptr; - olua_check_bool(L, 1, &arg1); + olua_to_object(L, 1, &self, "db.DragonBones"); - // static bool debugDraw - dragonBones::DragonBones::debugDraw = arg1; + // dragonBones::WorldClock *getClock() + dragonBones::WorldClock *ret = self->getClock(); + int num_ret = olua_push_object(L, ret, "db.WorldClock"); olua_endinvoke(L); - return 0; + return num_ret; +} + +static int _olua_fun_dragonBones_DragonBones_getEventManager(lua_State *L) +{ + olua_startinvoke(L); + + dragonBones::DragonBones *self = nullptr; + + olua_to_object(L, 1, &self, "db.DragonBones"); + + // dragonBones::IEventDispatcher *getEventManager() + dragonBones::IEventDispatcher *ret = self->getEventManager(); + int num_ret = olua_push_object(L, ret, "db.IEventDispatcher"); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_dragonBones_DragonBones_new(lua_State *L) +{ + olua_startinvoke(L); + + dragonBones::IEventDispatcher *arg1 = nullptr; /** eventManager */ + + olua_check_object(L, 1, &arg1, "db.IEventDispatcher"); + + // dragonBones::DragonBones(dragonBones::IEventDispatcher *eventManager) + dragonBones::DragonBones *ret = new dragonBones::DragonBones(arg1); + int num_ret = olua_push_object(L, ret, "db.DragonBones"); + olua_postnew(L, ret); + + olua_endinvoke(L); + + return num_ret; } -static int _dragonBones_DragonBones_get_webAssembly(lua_State *L) +static int _olua_fun_dragonBones_DragonBones_webAssembly$1(lua_State *L) { olua_startinvoke(L); @@ -705,7 +859,7 @@ static int _dragonBones_DragonBones_get_webAssembly(lua_State *L) return num_ret; } -static int _dragonBones_DragonBones_set_webAssembly(lua_State *L) +static int _olua_fun_dragonBones_DragonBones_webAssembly$2(lua_State *L) { olua_startinvoke(L); @@ -721,7 +875,28 @@ static int _dragonBones_DragonBones_set_webAssembly(lua_State *L) return 0; } -static int _dragonBones_DragonBones_get_yDown(lua_State *L) +static int _olua_fun_dragonBones_DragonBones_webAssembly(lua_State *L) +{ + int num_args = lua_gettop(L); + + if (num_args == 0) { + // static bool webAssembly + return _olua_fun_dragonBones_DragonBones_webAssembly$1(L); + } + + if (num_args == 1) { + // if ((olua_is_bool(L, 1))) { + // static bool webAssembly + return _olua_fun_dragonBones_DragonBones_webAssembly$2(L); + // } + } + + luaL_error(L, "method 'dragonBones::DragonBones::webAssembly' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_dragonBones_DragonBones_yDown$1(lua_State *L) { olua_startinvoke(L); @@ -734,7 +909,7 @@ static int _dragonBones_DragonBones_get_yDown(lua_State *L) return num_ret; } -static int _dragonBones_DragonBones_set_yDown(lua_State *L) +static int _olua_fun_dragonBones_DragonBones_yDown$2(lua_State *L) { olua_startinvoke(L); @@ -750,53 +925,61 @@ static int _dragonBones_DragonBones_set_yDown(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_dragonBones_DragonBones(lua_State *L) -{ - oluacls_class(L, "db.DragonBones"); - oluacls_func(L, "__gc", _dragonBones_DragonBones___gc); - oluacls_func(L, "__olua_move", _dragonBones_DragonBones___olua_move); - oluacls_func(L, "advanceTime", _dragonBones_DragonBones_advanceTime); - oluacls_func(L, "bufferEvent", _dragonBones_DragonBones_bufferEvent); - oluacls_func(L, "bufferObject", _dragonBones_DragonBones_bufferObject); - oluacls_func(L, "getClock", _dragonBones_DragonBones_getClock); - oluacls_func(L, "getEventManager", _dragonBones_DragonBones_getEventManager); - oluacls_func(L, "new", _dragonBones_DragonBones_new); - oluacls_prop(L, "clock", _dragonBones_DragonBones_getClock, nullptr); - oluacls_prop(L, "eventManager", _dragonBones_DragonBones_getEventManager, nullptr); - oluacls_prop(L, "debug", _dragonBones_DragonBones_get_debug, _dragonBones_DragonBones_set_debug); - oluacls_prop(L, "debugDraw", _dragonBones_DragonBones_get_debugDraw, _dragonBones_DragonBones_set_debugDraw); - oluacls_prop(L, "webAssembly", _dragonBones_DragonBones_get_webAssembly, _dragonBones_DragonBones_set_webAssembly); - oluacls_prop(L, "yDown", _dragonBones_DragonBones_get_yDown, _dragonBones_DragonBones_set_yDown); - oluacls_const(L, "VEISION", dragonBones::DragonBones::VEISION); - - return 1; -} -OLUA_END_DECLS - -static int _dragonBones_BaseObject___call(lua_State *L) +static int _olua_fun_dragonBones_DragonBones_yDown(lua_State *L) { - olua_startinvoke(L); + int num_args = lua_gettop(L); - dragonBones::BaseObject ret; + if (num_args == 0) { + // static bool yDown + return _olua_fun_dragonBones_DragonBones_yDown$1(L); + } - luaL_checktype(L, 2, LUA_TTABLE); + if (num_args == 1) { + // if ((olua_is_bool(L, 1))) { + // static bool yDown + return _olua_fun_dragonBones_DragonBones_yDown$2(L); + // } + } - unsigned int arg1 = 0; /** hashCode */ + luaL_error(L, "method 'dragonBones::DragonBones::yDown' not support '%d' arguments", num_args); - olua_getfield(L, 2, "hashCode"); - olua_check_integer(L, -1, &arg1); - ret.hashCode = arg1; - lua_pop(L, 1); + return 0; +} - olua_pushcopy_object(L, ret, "db.BaseObject"); +static int _olua_cls_db_DragonBones(lua_State *L) +{ + oluacls_class(L, "db.DragonBones"); + oluacls_func(L, "__gc", _olua_fun_dragonBones_DragonBones___gc); + oluacls_func(L, "__olua_move", _olua_fun_dragonBones_DragonBones___olua_move); + oluacls_func(L, "advanceTime", _olua_fun_dragonBones_DragonBones_advanceTime); + oluacls_func(L, "bufferEvent", _olua_fun_dragonBones_DragonBones_bufferEvent); + oluacls_func(L, "bufferObject", _olua_fun_dragonBones_DragonBones_bufferObject); + oluacls_func(L, "getClock", _olua_fun_dragonBones_DragonBones_getClock); + oluacls_func(L, "getEventManager", _olua_fun_dragonBones_DragonBones_getEventManager); + oluacls_func(L, "new", _olua_fun_dragonBones_DragonBones_new); + oluacls_prop(L, "clock", _olua_fun_dragonBones_DragonBones_getClock, nullptr); + oluacls_prop(L, "eventManager", _olua_fun_dragonBones_DragonBones_getEventManager, nullptr); + oluacls_prop(L, "debug", _olua_fun_dragonBones_DragonBones_debug, _olua_fun_dragonBones_DragonBones_debug); + oluacls_prop(L, "debugDraw", _olua_fun_dragonBones_DragonBones_debugDraw, _olua_fun_dragonBones_DragonBones_debugDraw); + oluacls_prop(L, "webAssembly", _olua_fun_dragonBones_DragonBones_webAssembly, _olua_fun_dragonBones_DragonBones_webAssembly); + oluacls_prop(L, "yDown", _olua_fun_dragonBones_DragonBones_yDown, _olua_fun_dragonBones_DragonBones_yDown); + oluacls_const(L, "VEISION", dragonBones::DragonBones::VEISION); - olua_endinvoke(L); + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_db_DragonBones(lua_State *L) +{ + olua_require(L, "dragonbones", luaopen_dragonbones); + if (!olua_getclass(L, "db.DragonBones")) { + luaL_error(L, "class not found: dragonBones::DragonBones"); + } return 1; } +OLUA_END_DECLS -static int _dragonBones_BaseObject___gc(lua_State *L) +static int _olua_fun_dragonBones_BaseObject___gc(lua_State *L) { olua_startinvoke(L); @@ -808,7 +991,7 @@ static int _dragonBones_BaseObject___gc(lua_State *L) return 0; } -static int _dragonBones_BaseObject___olua_move(lua_State *L) +static int _olua_fun_dragonBones_BaseObject___olua_move(lua_State *L) { olua_startinvoke(L); @@ -820,7 +1003,7 @@ static int _dragonBones_BaseObject___olua_move(lua_State *L) return 1; } -static int _dragonBones_BaseObject_clearPool$1(lua_State *L) +static int _olua_fun_dragonBones_BaseObject_clearPool$1(lua_State *L) { olua_startinvoke(L); @@ -836,11 +1019,11 @@ static int _dragonBones_BaseObject_clearPool$1(lua_State *L) return 0; } -static int _dragonBones_BaseObject_clearPool$2(lua_State *L) +static int _olua_fun_dragonBones_BaseObject_clearPool$2(lua_State *L) { olua_startinvoke(L); - // static void clearPool(@optional std::size_t classTypeIndex) + // static void clearPool() dragonBones::BaseObject::clearPool(); olua_endinvoke(L); @@ -848,19 +1031,19 @@ static int _dragonBones_BaseObject_clearPool$2(lua_State *L) return 0; } -static int _dragonBones_BaseObject_clearPool(lua_State *L) +static int _olua_fun_dragonBones_BaseObject_clearPool(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 0) { - // static void clearPool(@optional std::size_t classTypeIndex) - return _dragonBones_BaseObject_clearPool$2(L); + // static void clearPool() + return _olua_fun_dragonBones_BaseObject_clearPool$2(L); } if (num_args == 1) { // if ((olua_is_integer(L, 1))) { // static void clearPool(@optional std::size_t classTypeIndex) - return _dragonBones_BaseObject_clearPool$1(L); + return _olua_fun_dragonBones_BaseObject_clearPool$1(L); // } } @@ -869,7 +1052,7 @@ static int _dragonBones_BaseObject_clearPool(lua_State *L) return 0; } -static int _dragonBones_BaseObject_getClassTypeIndex(lua_State *L) +static int _olua_fun_dragonBones_BaseObject_getClassTypeIndex(lua_State *L) { olua_startinvoke(L); @@ -886,7 +1069,24 @@ static int _dragonBones_BaseObject_getClassTypeIndex(lua_State *L) return num_ret; } -static int _dragonBones_BaseObject_returnToPool(lua_State *L) +static int _olua_fun_dragonBones_BaseObject_hashCode(lua_State *L) +{ + olua_startinvoke(L); + + dragonBones::BaseObject *self = nullptr; + + olua_to_object(L, 1, &self, "db.BaseObject"); + + // @readonly const unsigned int hashCode + const unsigned int ret = self->hashCode; + int num_ret = olua_push_integer(L, ret); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_dragonBones_BaseObject_returnToPool(lua_State *L) { olua_startinvoke(L); @@ -902,7 +1102,7 @@ static int _dragonBones_BaseObject_returnToPool(lua_State *L) return 0; } -static int _dragonBones_BaseObject_setMaxCount(lua_State *L) +static int _olua_fun_dragonBones_BaseObject_setMaxCount(lua_State *L) { olua_startinvoke(L); @@ -920,208 +1120,188 @@ static int _dragonBones_BaseObject_setMaxCount(lua_State *L) return 0; } -static int _dragonBones_BaseObject_get_hashCode(lua_State *L) +static int _olua_cls_db_BaseObject(lua_State *L) { - olua_startinvoke(L); - - dragonBones::BaseObject *self = nullptr; - - olua_to_object(L, 1, &self, "db.BaseObject"); - - // @readonly const unsigned int hashCode - const unsigned int ret = self->hashCode; - int num_ret = olua_push_integer(L, ret); - - olua_endinvoke(L); + oluacls_class(L, "db.BaseObject"); + oluacls_func(L, "__gc", _olua_fun_dragonBones_BaseObject___gc); + oluacls_func(L, "__olua_move", _olua_fun_dragonBones_BaseObject___olua_move); + oluacls_func(L, "clearPool", _olua_fun_dragonBones_BaseObject_clearPool); + oluacls_func(L, "getClassTypeIndex", _olua_fun_dragonBones_BaseObject_getClassTypeIndex); + oluacls_func(L, "returnToPool", _olua_fun_dragonBones_BaseObject_returnToPool); + oluacls_func(L, "setMaxCount", _olua_fun_dragonBones_BaseObject_setMaxCount); + oluacls_prop(L, "classTypeIndex", _olua_fun_dragonBones_BaseObject_getClassTypeIndex, nullptr); + oluacls_prop(L, "hashCode", _olua_fun_dragonBones_BaseObject_hashCode, nullptr); - return num_ret; + return 1; } OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_dragonBones_BaseObject(lua_State *L) +OLUA_LIB int luaopen_db_BaseObject(lua_State *L) { - oluacls_class(L, "db.BaseObject"); - oluacls_func(L, "__call", _dragonBones_BaseObject___call); - oluacls_func(L, "__gc", _dragonBones_BaseObject___gc); - oluacls_func(L, "__olua_move", _dragonBones_BaseObject___olua_move); - oluacls_func(L, "clearPool", _dragonBones_BaseObject_clearPool); - oluacls_func(L, "getClassTypeIndex", _dragonBones_BaseObject_getClassTypeIndex); - oluacls_func(L, "returnToPool", _dragonBones_BaseObject_returnToPool); - oluacls_func(L, "setMaxCount", _dragonBones_BaseObject_setMaxCount); - oluacls_prop(L, "classTypeIndex", _dragonBones_BaseObject_getClassTypeIndex, nullptr); - oluacls_prop(L, "hashCode", _dragonBones_BaseObject_get_hashCode, nullptr); - + olua_require(L, "dragonbones", luaopen_dragonbones); + if (!olua_getclass(L, "db.BaseObject")) { + luaL_error(L, "class not found: dragonBones::BaseObject"); + } return 1; } OLUA_END_DECLS -static int _dragonBones_EventObject_actionDataToInstance(lua_State *L) +static int _olua_fun_dragonBones_EventObject_COMPLETE$1(lua_State *L) { olua_startinvoke(L); - dragonBones::ActionData *arg1 = nullptr; /** data */ - dragonBones::EventObject *arg2 = nullptr; /** instance */ - dragonBones::Armature *arg3 = nullptr; /** armature */ - - olua_check_object(L, 1, &arg1, "db.ActionData"); - olua_check_object(L, 2, &arg2, "db.EventObject"); - olua_check_object(L, 3, &arg3, "db.Armature"); - - // static void actionDataToInstance(const dragonBones::ActionData *data, dragonBones::EventObject *instance, dragonBones::Armature *armature) - dragonBones::EventObject::actionDataToInstance(arg1, arg2, arg3); + // static const char *COMPLETE + const char *ret = dragonBones::EventObject::COMPLETE; + int num_ret = olua_push_string(L, ret); olua_endinvoke(L); - return 0; + return num_ret; } -static int _dragonBones_EventObject_getAnimationState(lua_State *L) +static int _olua_fun_dragonBones_EventObject_COMPLETE$2(lua_State *L) { olua_startinvoke(L); - dragonBones::EventObject *self = nullptr; + const char *arg1 = nullptr; /** COMPLETE */ - olua_to_object(L, 1, &self, "db.EventObject"); + olua_check_string(L, 1, &arg1); - // dragonBones::AnimationState *getAnimationState() - dragonBones::AnimationState *ret = self->getAnimationState(); - int num_ret = olua_push_object(L, ret, "db.AnimationState"); + // static const char *COMPLETE + dragonBones::EventObject::COMPLETE = arg1; olua_endinvoke(L); - return num_ret; + return 0; } -static int _dragonBones_EventObject_getArmature(lua_State *L) +static int _olua_fun_dragonBones_EventObject_COMPLETE(lua_State *L) { - olua_startinvoke(L); - - dragonBones::EventObject *self = nullptr; + int num_args = lua_gettop(L); - olua_to_object(L, 1, &self, "db.EventObject"); + if (num_args == 0) { + // static const char *COMPLETE + return _olua_fun_dragonBones_EventObject_COMPLETE$1(L); + } - // dragonBones::Armature *getArmature() - dragonBones::Armature *ret = self->getArmature(); - int num_ret = olua_push_object(L, ret, "db.Armature"); + if (num_args == 1) { + // if ((olua_is_string(L, 1))) { + // static const char *COMPLETE + return _olua_fun_dragonBones_EventObject_COMPLETE$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'dragonBones::EventObject::COMPLETE' not support '%d' arguments", num_args); - return num_ret; + return 0; } -static int _dragonBones_EventObject_getBone(lua_State *L) +static int _olua_fun_dragonBones_EventObject_FADE_IN$1(lua_State *L) { olua_startinvoke(L); - dragonBones::EventObject *self = nullptr; - - olua_to_object(L, 1, &self, "db.EventObject"); - - // dragonBones::Bone *getBone() - dragonBones::Bone *ret = self->getBone(); - int num_ret = olua_push_object(L, ret, "db.Bone"); + // static const char *FADE_IN + const char *ret = dragonBones::EventObject::FADE_IN; + int num_ret = olua_push_string(L, ret); olua_endinvoke(L); return num_ret; } -static int _dragonBones_EventObject_getData(lua_State *L) +static int _olua_fun_dragonBones_EventObject_FADE_IN$2(lua_State *L) { olua_startinvoke(L); - dragonBones::EventObject *self = nullptr; + const char *arg1 = nullptr; /** FADE_IN */ - olua_to_object(L, 1, &self, "db.EventObject"); + olua_check_string(L, 1, &arg1); - // dragonBones::UserData *getData() - dragonBones::UserData *ret = self->getData(); - int num_ret = olua_push_object(L, ret, "db.UserData"); + // static const char *FADE_IN + dragonBones::EventObject::FADE_IN = arg1; olua_endinvoke(L); - return num_ret; + return 0; } -static int _dragonBones_EventObject_getSlot(lua_State *L) +static int _olua_fun_dragonBones_EventObject_FADE_IN(lua_State *L) { - olua_startinvoke(L); - - dragonBones::EventObject *self = nullptr; + int num_args = lua_gettop(L); - olua_to_object(L, 1, &self, "db.EventObject"); + if (num_args == 0) { + // static const char *FADE_IN + return _olua_fun_dragonBones_EventObject_FADE_IN$1(L); + } - // dragonBones::Slot *getSlot() - dragonBones::Slot *ret = self->getSlot(); - int num_ret = olua_push_object(L, ret, "db.Slot"); + if (num_args == 1) { + // if ((olua_is_string(L, 1))) { + // static const char *FADE_IN + return _olua_fun_dragonBones_EventObject_FADE_IN$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'dragonBones::EventObject::FADE_IN' not support '%d' arguments", num_args); - return num_ret; + return 0; } -static int _dragonBones_EventObject_getTypeIndex(lua_State *L) +static int _olua_fun_dragonBones_EventObject_FADE_IN_COMPLETE$1(lua_State *L) { olua_startinvoke(L); - // static std::size_t getTypeIndex() - std::size_t ret = dragonBones::EventObject::getTypeIndex(); - int num_ret = olua_push_integer(L, ret); + // static const char *FADE_IN_COMPLETE + const char *ret = dragonBones::EventObject::FADE_IN_COMPLETE; + int num_ret = olua_push_string(L, ret); olua_endinvoke(L); return num_ret; } -static int _dragonBones_EventObject_new(lua_State *L) +static int _olua_fun_dragonBones_EventObject_FADE_IN_COMPLETE$2(lua_State *L) { olua_startinvoke(L); - // EventObject() - dragonBones::EventObject *ret = new dragonBones::EventObject(); - int num_ret = olua_push_object(L, ret, "db.EventObject"); - olua_postnew(L, ret); - - olua_endinvoke(L); - - return num_ret; -} + const char *arg1 = nullptr; /** FADE_IN_COMPLETE */ -static int _dragonBones_EventObject_get_COMPLETE(lua_State *L) -{ - olua_startinvoke(L); + olua_check_string(L, 1, &arg1); - // static const char *COMPLETE - const char *ret = dragonBones::EventObject::COMPLETE; - int num_ret = olua_push_string(L, ret); + // static const char *FADE_IN_COMPLETE + dragonBones::EventObject::FADE_IN_COMPLETE = arg1; olua_endinvoke(L); - return num_ret; + return 0; } -static int _dragonBones_EventObject_set_COMPLETE(lua_State *L) +static int _olua_fun_dragonBones_EventObject_FADE_IN_COMPLETE(lua_State *L) { - olua_startinvoke(L); - - const char *arg1 = nullptr; /** COMPLETE */ + int num_args = lua_gettop(L); - olua_check_string(L, 1, &arg1); + if (num_args == 0) { + // static const char *FADE_IN_COMPLETE + return _olua_fun_dragonBones_EventObject_FADE_IN_COMPLETE$1(L); + } - // static const char *COMPLETE - dragonBones::EventObject::COMPLETE = arg1; + if (num_args == 1) { + // if ((olua_is_string(L, 1))) { + // static const char *FADE_IN_COMPLETE + return _olua_fun_dragonBones_EventObject_FADE_IN_COMPLETE$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'dragonBones::EventObject::FADE_IN_COMPLETE' not support '%d' arguments", num_args); return 0; } -static int _dragonBones_EventObject_get_FADE_IN(lua_State *L) +static int _olua_fun_dragonBones_EventObject_FADE_OUT$1(lua_State *L) { olua_startinvoke(L); - // static const char *FADE_IN - const char *ret = dragonBones::EventObject::FADE_IN; + // static const char *FADE_OUT + const char *ret = dragonBones::EventObject::FADE_OUT; int num_ret = olua_push_string(L, ret); olua_endinvoke(L); @@ -1129,57 +1309,49 @@ static int _dragonBones_EventObject_get_FADE_IN(lua_State *L) return num_ret; } -static int _dragonBones_EventObject_set_FADE_IN(lua_State *L) +static int _olua_fun_dragonBones_EventObject_FADE_OUT$2(lua_State *L) { olua_startinvoke(L); - const char *arg1 = nullptr; /** FADE_IN */ + const char *arg1 = nullptr; /** FADE_OUT */ olua_check_string(L, 1, &arg1); - // static const char *FADE_IN - dragonBones::EventObject::FADE_IN = arg1; + // static const char *FADE_OUT + dragonBones::EventObject::FADE_OUT = arg1; olua_endinvoke(L); return 0; } -static int _dragonBones_EventObject_get_FADE_IN_COMPLETE(lua_State *L) +static int _olua_fun_dragonBones_EventObject_FADE_OUT(lua_State *L) { - olua_startinvoke(L); + int num_args = lua_gettop(L); - // static const char *FADE_IN_COMPLETE - const char *ret = dragonBones::EventObject::FADE_IN_COMPLETE; - int num_ret = olua_push_string(L, ret); + if (num_args == 0) { + // static const char *FADE_OUT + return _olua_fun_dragonBones_EventObject_FADE_OUT$1(L); + } - olua_endinvoke(L); - - return num_ret; -} - -static int _dragonBones_EventObject_set_FADE_IN_COMPLETE(lua_State *L) -{ - olua_startinvoke(L); - - const char *arg1 = nullptr; /** FADE_IN_COMPLETE */ - - olua_check_string(L, 1, &arg1); - - // static const char *FADE_IN_COMPLETE - dragonBones::EventObject::FADE_IN_COMPLETE = arg1; + if (num_args == 1) { + // if ((olua_is_string(L, 1))) { + // static const char *FADE_OUT + return _olua_fun_dragonBones_EventObject_FADE_OUT$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'dragonBones::EventObject::FADE_OUT' not support '%d' arguments", num_args); return 0; } -static int _dragonBones_EventObject_get_FADE_OUT(lua_State *L) +static int _olua_fun_dragonBones_EventObject_FADE_OUT_COMPLETE$1(lua_State *L) { olua_startinvoke(L); - // static const char *FADE_OUT - const char *ret = dragonBones::EventObject::FADE_OUT; + // static const char *FADE_OUT_COMPLETE + const char *ret = dragonBones::EventObject::FADE_OUT_COMPLETE; int num_ret = olua_push_string(L, ret); olua_endinvoke(L); @@ -1187,52 +1359,44 @@ static int _dragonBones_EventObject_get_FADE_OUT(lua_State *L) return num_ret; } -static int _dragonBones_EventObject_set_FADE_OUT(lua_State *L) +static int _olua_fun_dragonBones_EventObject_FADE_OUT_COMPLETE$2(lua_State *L) { olua_startinvoke(L); - const char *arg1 = nullptr; /** FADE_OUT */ + const char *arg1 = nullptr; /** FADE_OUT_COMPLETE */ olua_check_string(L, 1, &arg1); - // static const char *FADE_OUT - dragonBones::EventObject::FADE_OUT = arg1; - - olua_endinvoke(L); - - return 0; -} - -static int _dragonBones_EventObject_get_FADE_OUT_COMPLETE(lua_State *L) -{ - olua_startinvoke(L); - // static const char *FADE_OUT_COMPLETE - const char *ret = dragonBones::EventObject::FADE_OUT_COMPLETE; - int num_ret = olua_push_string(L, ret); + dragonBones::EventObject::FADE_OUT_COMPLETE = arg1; olua_endinvoke(L); - return num_ret; + return 0; } -static int _dragonBones_EventObject_set_FADE_OUT_COMPLETE(lua_State *L) +static int _olua_fun_dragonBones_EventObject_FADE_OUT_COMPLETE(lua_State *L) { - olua_startinvoke(L); - - const char *arg1 = nullptr; /** FADE_OUT_COMPLETE */ + int num_args = lua_gettop(L); - olua_check_string(L, 1, &arg1); + if (num_args == 0) { + // static const char *FADE_OUT_COMPLETE + return _olua_fun_dragonBones_EventObject_FADE_OUT_COMPLETE$1(L); + } - // static const char *FADE_OUT_COMPLETE - dragonBones::EventObject::FADE_OUT_COMPLETE = arg1; + if (num_args == 1) { + // if ((olua_is_string(L, 1))) { + // static const char *FADE_OUT_COMPLETE + return _olua_fun_dragonBones_EventObject_FADE_OUT_COMPLETE$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'dragonBones::EventObject::FADE_OUT_COMPLETE' not support '%d' arguments", num_args); return 0; } -static int _dragonBones_EventObject_get_FRAME_EVENT(lua_State *L) +static int _olua_fun_dragonBones_EventObject_FRAME_EVENT$1(lua_State *L) { olua_startinvoke(L); @@ -1245,7 +1409,7 @@ static int _dragonBones_EventObject_get_FRAME_EVENT(lua_State *L) return num_ret; } -static int _dragonBones_EventObject_set_FRAME_EVENT(lua_State *L) +static int _olua_fun_dragonBones_EventObject_FRAME_EVENT$2(lua_State *L) { olua_startinvoke(L); @@ -1261,7 +1425,28 @@ static int _dragonBones_EventObject_set_FRAME_EVENT(lua_State *L) return 0; } -static int _dragonBones_EventObject_get_LOOP_COMPLETE(lua_State *L) +static int _olua_fun_dragonBones_EventObject_FRAME_EVENT(lua_State *L) +{ + int num_args = lua_gettop(L); + + if (num_args == 0) { + // static const char *FRAME_EVENT + return _olua_fun_dragonBones_EventObject_FRAME_EVENT$1(L); + } + + if (num_args == 1) { + // if ((olua_is_string(L, 1))) { + // static const char *FRAME_EVENT + return _olua_fun_dragonBones_EventObject_FRAME_EVENT$2(L); + // } + } + + luaL_error(L, "method 'dragonBones::EventObject::FRAME_EVENT' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_dragonBones_EventObject_LOOP_COMPLETE$1(lua_State *L) { olua_startinvoke(L); @@ -1274,7 +1459,7 @@ static int _dragonBones_EventObject_get_LOOP_COMPLETE(lua_State *L) return num_ret; } -static int _dragonBones_EventObject_set_LOOP_COMPLETE(lua_State *L) +static int _olua_fun_dragonBones_EventObject_LOOP_COMPLETE$2(lua_State *L) { olua_startinvoke(L); @@ -1290,7 +1475,28 @@ static int _dragonBones_EventObject_set_LOOP_COMPLETE(lua_State *L) return 0; } -static int _dragonBones_EventObject_get_SOUND_EVENT(lua_State *L) +static int _olua_fun_dragonBones_EventObject_LOOP_COMPLETE(lua_State *L) +{ + int num_args = lua_gettop(L); + + if (num_args == 0) { + // static const char *LOOP_COMPLETE + return _olua_fun_dragonBones_EventObject_LOOP_COMPLETE$1(L); + } + + if (num_args == 1) { + // if ((olua_is_string(L, 1))) { + // static const char *LOOP_COMPLETE + return _olua_fun_dragonBones_EventObject_LOOP_COMPLETE$2(L); + // } + } + + luaL_error(L, "method 'dragonBones::EventObject::LOOP_COMPLETE' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_dragonBones_EventObject_SOUND_EVENT$1(lua_State *L) { olua_startinvoke(L); @@ -1303,7 +1509,7 @@ static int _dragonBones_EventObject_get_SOUND_EVENT(lua_State *L) return num_ret; } -static int _dragonBones_EventObject_set_SOUND_EVENT(lua_State *L) +static int _olua_fun_dragonBones_EventObject_SOUND_EVENT$2(lua_State *L) { olua_startinvoke(L); @@ -1319,7 +1525,28 @@ static int _dragonBones_EventObject_set_SOUND_EVENT(lua_State *L) return 0; } -static int _dragonBones_EventObject_get_START(lua_State *L) +static int _olua_fun_dragonBones_EventObject_SOUND_EVENT(lua_State *L) +{ + int num_args = lua_gettop(L); + + if (num_args == 0) { + // static const char *SOUND_EVENT + return _olua_fun_dragonBones_EventObject_SOUND_EVENT$1(L); + } + + if (num_args == 1) { + // if ((olua_is_string(L, 1))) { + // static const char *SOUND_EVENT + return _olua_fun_dragonBones_EventObject_SOUND_EVENT$2(L); + // } + } + + luaL_error(L, "method 'dragonBones::EventObject::SOUND_EVENT' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_dragonBones_EventObject_START$1(lua_State *L) { olua_startinvoke(L); @@ -1332,7 +1559,7 @@ static int _dragonBones_EventObject_get_START(lua_State *L) return num_ret; } -static int _dragonBones_EventObject_set_START(lua_State *L) +static int _olua_fun_dragonBones_EventObject_START$2(lua_State *L) { olua_startinvoke(L); @@ -1348,7 +1575,28 @@ static int _dragonBones_EventObject_set_START(lua_State *L) return 0; } -static int _dragonBones_EventObject_get_actionData(lua_State *L) +static int _olua_fun_dragonBones_EventObject_START(lua_State *L) +{ + int num_args = lua_gettop(L); + + if (num_args == 0) { + // static const char *START + return _olua_fun_dragonBones_EventObject_START$1(L); + } + + if (num_args == 1) { + // if ((olua_is_string(L, 1))) { + // static const char *START + return _olua_fun_dragonBones_EventObject_START$2(L); + // } + } + + luaL_error(L, "method 'dragonBones::EventObject::START' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_dragonBones_EventObject_actionData$1(lua_State *L) { olua_startinvoke(L); @@ -1365,7 +1613,7 @@ static int _dragonBones_EventObject_get_actionData(lua_State *L) return num_ret; } -static int _dragonBones_EventObject_set_actionData(lua_State *L) +static int _olua_fun_dragonBones_EventObject_actionData$2(lua_State *L) { olua_startinvoke(L); @@ -1383,7 +1631,48 @@ static int _dragonBones_EventObject_set_actionData(lua_State *L) return 0; } -static int _dragonBones_EventObject_get_animationState(lua_State *L) +static int _olua_fun_dragonBones_EventObject_actionData(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // const dragonBones::ActionData *actionData + return _olua_fun_dragonBones_EventObject_actionData$1(L); + } + + if (num_args == 1) { + // if ((olua_is_object(L, 2, "db.ActionData"))) { + // const dragonBones::ActionData *actionData + return _olua_fun_dragonBones_EventObject_actionData$2(L); + // } + } + + luaL_error(L, "method 'dragonBones::EventObject::actionData' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_dragonBones_EventObject_actionDataToInstance(lua_State *L) +{ + olua_startinvoke(L); + + dragonBones::ActionData *arg1 = nullptr; /** data */ + dragonBones::EventObject *arg2 = nullptr; /** instance */ + dragonBones::Armature *arg3 = nullptr; /** armature */ + + olua_check_object(L, 1, &arg1, "db.ActionData"); + olua_check_object(L, 2, &arg2, "db.EventObject"); + olua_check_object(L, 3, &arg3, "db.Armature"); + + // static void actionDataToInstance(const dragonBones::ActionData *data, dragonBones::EventObject *instance, dragonBones::Armature *armature) + dragonBones::EventObject::actionDataToInstance(arg1, arg2, arg3); + + olua_endinvoke(L); + + return 0; +} + +static int _olua_fun_dragonBones_EventObject_animationState$1(lua_State *L) { olua_startinvoke(L); @@ -1400,7 +1689,7 @@ static int _dragonBones_EventObject_get_animationState(lua_State *L) return num_ret; } -static int _dragonBones_EventObject_set_animationState(lua_State *L) +static int _olua_fun_dragonBones_EventObject_animationState$2(lua_State *L) { olua_startinvoke(L); @@ -1418,7 +1707,28 @@ static int _dragonBones_EventObject_set_animationState(lua_State *L) return 0; } -static int _dragonBones_EventObject_get_armature(lua_State *L) +static int _olua_fun_dragonBones_EventObject_animationState(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // dragonBones::AnimationState *animationState + return _olua_fun_dragonBones_EventObject_animationState$1(L); + } + + if (num_args == 1) { + // if ((olua_is_object(L, 2, "db.AnimationState"))) { + // dragonBones::AnimationState *animationState + return _olua_fun_dragonBones_EventObject_animationState$2(L); + // } + } + + luaL_error(L, "method 'dragonBones::EventObject::animationState' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_dragonBones_EventObject_armature$1(lua_State *L) { olua_startinvoke(L); @@ -1435,7 +1745,7 @@ static int _dragonBones_EventObject_get_armature(lua_State *L) return num_ret; } -static int _dragonBones_EventObject_set_armature(lua_State *L) +static int _olua_fun_dragonBones_EventObject_armature$2(lua_State *L) { olua_startinvoke(L); @@ -1453,7 +1763,28 @@ static int _dragonBones_EventObject_set_armature(lua_State *L) return 0; } -static int _dragonBones_EventObject_get_bone(lua_State *L) +static int _olua_fun_dragonBones_EventObject_armature(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // dragonBones::Armature *armature + return _olua_fun_dragonBones_EventObject_armature$1(L); + } + + if (num_args == 1) { + // if ((olua_is_object(L, 2, "db.Armature"))) { + // dragonBones::Armature *armature + return _olua_fun_dragonBones_EventObject_armature$2(L); + // } + } + + luaL_error(L, "method 'dragonBones::EventObject::armature' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_dragonBones_EventObject_bone$1(lua_State *L) { olua_startinvoke(L); @@ -1470,7 +1801,7 @@ static int _dragonBones_EventObject_get_bone(lua_State *L) return num_ret; } -static int _dragonBones_EventObject_set_bone(lua_State *L) +static int _olua_fun_dragonBones_EventObject_bone$2(lua_State *L) { olua_startinvoke(L); @@ -1488,7 +1819,28 @@ static int _dragonBones_EventObject_set_bone(lua_State *L) return 0; } -static int _dragonBones_EventObject_get_data(lua_State *L) +static int _olua_fun_dragonBones_EventObject_bone(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // dragonBones::Bone *bone + return _olua_fun_dragonBones_EventObject_bone$1(L); + } + + if (num_args == 1) { + // if ((olua_is_object(L, 2, "db.Bone"))) { + // dragonBones::Bone *bone + return _olua_fun_dragonBones_EventObject_bone$2(L); + // } + } + + luaL_error(L, "method 'dragonBones::EventObject::bone' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_dragonBones_EventObject_data$1(lua_State *L) { olua_startinvoke(L); @@ -1505,7 +1857,7 @@ static int _dragonBones_EventObject_get_data(lua_State *L) return num_ret; } -static int _dragonBones_EventObject_set_data(lua_State *L) +static int _olua_fun_dragonBones_EventObject_data$2(lua_State *L) { olua_startinvoke(L); @@ -1523,7 +1875,28 @@ static int _dragonBones_EventObject_set_data(lua_State *L) return 0; } -static int _dragonBones_EventObject_get_name(lua_State *L) +static int _olua_fun_dragonBones_EventObject_data(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // dragonBones::UserData *data + return _olua_fun_dragonBones_EventObject_data$1(L); + } + + if (num_args == 1) { + // if ((olua_is_object(L, 2, "db.UserData"))) { + // dragonBones::UserData *data + return _olua_fun_dragonBones_EventObject_data$2(L); + // } + } + + luaL_error(L, "method 'dragonBones::EventObject::data' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_dragonBones_EventObject_getAnimationState(lua_State *L) { olua_startinvoke(L); @@ -1531,34 +1904,33 @@ static int _dragonBones_EventObject_get_name(lua_State *L) olua_to_object(L, 1, &self, "db.EventObject"); - // std::string name - std::string ret = self->name; - int num_ret = olua_push_string(L, ret); + // dragonBones::AnimationState *getAnimationState() + dragonBones::AnimationState *ret = self->getAnimationState(); + int num_ret = olua_push_object(L, ret, "db.AnimationState"); olua_endinvoke(L); return num_ret; } -static int _dragonBones_EventObject_set_name(lua_State *L) +static int _olua_fun_dragonBones_EventObject_getArmature(lua_State *L) { olua_startinvoke(L); dragonBones::EventObject *self = nullptr; - std::string arg1; /** name */ olua_to_object(L, 1, &self, "db.EventObject"); - olua_check_string(L, 2, &arg1); - // std::string name - self->name = arg1; + // dragonBones::Armature *getArmature() + dragonBones::Armature *ret = self->getArmature(); + int num_ret = olua_push_object(L, ret, "db.Armature"); olua_endinvoke(L); - return 0; + return num_ret; } -static int _dragonBones_EventObject_get_slot(lua_State *L) +static int _olua_fun_dragonBones_EventObject_getBone(lua_State *L) { olua_startinvoke(L); @@ -1566,34 +1938,33 @@ static int _dragonBones_EventObject_get_slot(lua_State *L) olua_to_object(L, 1, &self, "db.EventObject"); - // dragonBones::Slot *slot - dragonBones::Slot *ret = self->slot; - int num_ret = olua_push_object(L, ret, "db.Slot"); + // dragonBones::Bone *getBone() + dragonBones::Bone *ret = self->getBone(); + int num_ret = olua_push_object(L, ret, "db.Bone"); olua_endinvoke(L); return num_ret; } -static int _dragonBones_EventObject_set_slot(lua_State *L) +static int _olua_fun_dragonBones_EventObject_getData(lua_State *L) { olua_startinvoke(L); dragonBones::EventObject *self = nullptr; - dragonBones::Slot *arg1 = nullptr; /** slot */ olua_to_object(L, 1, &self, "db.EventObject"); - olua_check_object(L, 2, &arg1, "db.Slot"); - // dragonBones::Slot *slot - self->slot = arg1; + // dragonBones::UserData *getData() + dragonBones::UserData *ret = self->getData(); + int num_ret = olua_push_object(L, ret, "db.UserData"); olua_endinvoke(L); - return 0; + return num_ret; } -static int _dragonBones_EventObject_get_time(lua_State *L) +static int _olua_fun_dragonBones_EventObject_getSlot(lua_State *L) { olua_startinvoke(L); @@ -1601,34 +1972,29 @@ static int _dragonBones_EventObject_get_time(lua_State *L) olua_to_object(L, 1, &self, "db.EventObject"); - // float time - float ret = self->time; - int num_ret = olua_push_number(L, ret); + // dragonBones::Slot *getSlot() + dragonBones::Slot *ret = self->getSlot(); + int num_ret = olua_push_object(L, ret, "db.Slot"); olua_endinvoke(L); return num_ret; } -static int _dragonBones_EventObject_set_time(lua_State *L) +static int _olua_fun_dragonBones_EventObject_getTypeIndex(lua_State *L) { olua_startinvoke(L); - dragonBones::EventObject *self = nullptr; - float arg1 = 0; /** time */ - - olua_to_object(L, 1, &self, "db.EventObject"); - olua_check_number(L, 2, &arg1); - - // float time - self->time = arg1; + // static std::size_t getTypeIndex() + std::size_t ret = dragonBones::EventObject::getTypeIndex(); + int num_ret = olua_push_integer(L, ret); olua_endinvoke(L); - return 0; + return num_ret; } -static int _dragonBones_EventObject_get_type(lua_State *L) +static int _olua_fun_dragonBones_EventObject_name$1(lua_State *L) { olua_startinvoke(L); @@ -1636,8 +2002,8 @@ static int _dragonBones_EventObject_get_type(lua_State *L) olua_to_object(L, 1, &self, "db.EventObject"); - // std::string type - std::string ret = self->type; + // std::string name + std::string ret = self->name; int num_ret = olua_push_string(L, ret); olua_endinvoke(L); @@ -1645,66 +2011,273 @@ static int _dragonBones_EventObject_get_type(lua_State *L) return num_ret; } -static int _dragonBones_EventObject_set_type(lua_State *L) +static int _olua_fun_dragonBones_EventObject_name$2(lua_State *L) { olua_startinvoke(L); dragonBones::EventObject *self = nullptr; - std::string arg1; /** type */ + std::string arg1; /** name */ olua_to_object(L, 1, &self, "db.EventObject"); olua_check_string(L, 2, &arg1); - // std::string type - self->type = arg1; + // std::string name + self->name = arg1; olua_endinvoke(L); return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_dragonBones_EventObject(lua_State *L) +static int _olua_fun_dragonBones_EventObject_name(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // std::string name + return _olua_fun_dragonBones_EventObject_name$1(L); + } + + if (num_args == 1) { + // if ((olua_is_string(L, 2))) { + // std::string name + return _olua_fun_dragonBones_EventObject_name$2(L); + // } + } + + luaL_error(L, "method 'dragonBones::EventObject::name' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_dragonBones_EventObject_new(lua_State *L) +{ + olua_startinvoke(L); + + // dragonBones::EventObject() + dragonBones::EventObject *ret = new dragonBones::EventObject(); + int num_ret = olua_push_object(L, ret, "db.EventObject"); + olua_postnew(L, ret); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_dragonBones_EventObject_slot$1(lua_State *L) +{ + olua_startinvoke(L); + + dragonBones::EventObject *self = nullptr; + + olua_to_object(L, 1, &self, "db.EventObject"); + + // dragonBones::Slot *slot + dragonBones::Slot *ret = self->slot; + int num_ret = olua_push_object(L, ret, "db.Slot"); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_dragonBones_EventObject_slot$2(lua_State *L) +{ + olua_startinvoke(L); + + dragonBones::EventObject *self = nullptr; + dragonBones::Slot *arg1 = nullptr; /** slot */ + + olua_to_object(L, 1, &self, "db.EventObject"); + olua_check_object(L, 2, &arg1, "db.Slot"); + + // dragonBones::Slot *slot + self->slot = arg1; + + olua_endinvoke(L); + + return 0; +} + +static int _olua_fun_dragonBones_EventObject_slot(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // dragonBones::Slot *slot + return _olua_fun_dragonBones_EventObject_slot$1(L); + } + + if (num_args == 1) { + // if ((olua_is_object(L, 2, "db.Slot"))) { + // dragonBones::Slot *slot + return _olua_fun_dragonBones_EventObject_slot$2(L); + // } + } + + luaL_error(L, "method 'dragonBones::EventObject::slot' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_dragonBones_EventObject_time$1(lua_State *L) +{ + olua_startinvoke(L); + + dragonBones::EventObject *self = nullptr; + + olua_to_object(L, 1, &self, "db.EventObject"); + + // float time + float ret = self->time; + int num_ret = olua_push_number(L, ret); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_dragonBones_EventObject_time$2(lua_State *L) +{ + olua_startinvoke(L); + + dragonBones::EventObject *self = nullptr; + float arg1 = 0; /** time */ + + olua_to_object(L, 1, &self, "db.EventObject"); + olua_check_number(L, 2, &arg1); + + // float time + self->time = arg1; + + olua_endinvoke(L); + + return 0; +} + +static int _olua_fun_dragonBones_EventObject_time(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float time + return _olua_fun_dragonBones_EventObject_time$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float time + return _olua_fun_dragonBones_EventObject_time$2(L); + // } + } + + luaL_error(L, "method 'dragonBones::EventObject::time' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_dragonBones_EventObject_type$1(lua_State *L) +{ + olua_startinvoke(L); + + dragonBones::EventObject *self = nullptr; + + olua_to_object(L, 1, &self, "db.EventObject"); + + // std::string type + std::string ret = self->type; + int num_ret = olua_push_string(L, ret); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_dragonBones_EventObject_type$2(lua_State *L) +{ + olua_startinvoke(L); + + dragonBones::EventObject *self = nullptr; + std::string arg1; /** type */ + + olua_to_object(L, 1, &self, "db.EventObject"); + olua_check_string(L, 2, &arg1); + + // std::string type + self->type = arg1; + + olua_endinvoke(L); + + return 0; +} + +static int _olua_fun_dragonBones_EventObject_type(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // std::string type + return _olua_fun_dragonBones_EventObject_type$1(L); + } + + if (num_args == 1) { + // if ((olua_is_string(L, 2))) { + // std::string type + return _olua_fun_dragonBones_EventObject_type$2(L); + // } + } + + luaL_error(L, "method 'dragonBones::EventObject::type' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_cls_db_EventObject(lua_State *L) { oluacls_class(L, "db.EventObject"); - oluacls_func(L, "actionDataToInstance", _dragonBones_EventObject_actionDataToInstance); - oluacls_func(L, "getAnimationState", _dragonBones_EventObject_getAnimationState); - oluacls_func(L, "getArmature", _dragonBones_EventObject_getArmature); - oluacls_func(L, "getBone", _dragonBones_EventObject_getBone); - oluacls_func(L, "getData", _dragonBones_EventObject_getData); - oluacls_func(L, "getSlot", _dragonBones_EventObject_getSlot); - oluacls_func(L, "getTypeIndex", _dragonBones_EventObject_getTypeIndex); - oluacls_func(L, "new", _dragonBones_EventObject_new); - oluacls_prop(L, "animationState", _dragonBones_EventObject_getAnimationState, nullptr); - oluacls_prop(L, "armature", _dragonBones_EventObject_getArmature, nullptr); - oluacls_prop(L, "bone", _dragonBones_EventObject_getBone, nullptr); - oluacls_prop(L, "data", _dragonBones_EventObject_getData, nullptr); - oluacls_prop(L, "slot", _dragonBones_EventObject_getSlot, nullptr); - oluacls_prop(L, "typeIndex", _dragonBones_EventObject_getTypeIndex, nullptr); - oluacls_prop(L, "COMPLETE", _dragonBones_EventObject_get_COMPLETE, _dragonBones_EventObject_set_COMPLETE); - oluacls_prop(L, "FADE_IN", _dragonBones_EventObject_get_FADE_IN, _dragonBones_EventObject_set_FADE_IN); - oluacls_prop(L, "FADE_IN_COMPLETE", _dragonBones_EventObject_get_FADE_IN_COMPLETE, _dragonBones_EventObject_set_FADE_IN_COMPLETE); - oluacls_prop(L, "FADE_OUT", _dragonBones_EventObject_get_FADE_OUT, _dragonBones_EventObject_set_FADE_OUT); - oluacls_prop(L, "FADE_OUT_COMPLETE", _dragonBones_EventObject_get_FADE_OUT_COMPLETE, _dragonBones_EventObject_set_FADE_OUT_COMPLETE); - oluacls_prop(L, "FRAME_EVENT", _dragonBones_EventObject_get_FRAME_EVENT, _dragonBones_EventObject_set_FRAME_EVENT); - oluacls_prop(L, "LOOP_COMPLETE", _dragonBones_EventObject_get_LOOP_COMPLETE, _dragonBones_EventObject_set_LOOP_COMPLETE); - oluacls_prop(L, "SOUND_EVENT", _dragonBones_EventObject_get_SOUND_EVENT, _dragonBones_EventObject_set_SOUND_EVENT); - oluacls_prop(L, "START", _dragonBones_EventObject_get_START, _dragonBones_EventObject_set_START); - oluacls_prop(L, "actionData", _dragonBones_EventObject_get_actionData, _dragonBones_EventObject_set_actionData); - oluacls_prop(L, "animationState", _dragonBones_EventObject_get_animationState, _dragonBones_EventObject_set_animationState); - oluacls_prop(L, "armature", _dragonBones_EventObject_get_armature, _dragonBones_EventObject_set_armature); - oluacls_prop(L, "bone", _dragonBones_EventObject_get_bone, _dragonBones_EventObject_set_bone); - oluacls_prop(L, "data", _dragonBones_EventObject_get_data, _dragonBones_EventObject_set_data); - oluacls_prop(L, "name", _dragonBones_EventObject_get_name, _dragonBones_EventObject_set_name); - oluacls_prop(L, "slot", _dragonBones_EventObject_get_slot, _dragonBones_EventObject_set_slot); - oluacls_prop(L, "time", _dragonBones_EventObject_get_time, _dragonBones_EventObject_set_time); - oluacls_prop(L, "type", _dragonBones_EventObject_get_type, _dragonBones_EventObject_set_type); + oluacls_func(L, "actionDataToInstance", _olua_fun_dragonBones_EventObject_actionDataToInstance); + oluacls_func(L, "getAnimationState", _olua_fun_dragonBones_EventObject_getAnimationState); + oluacls_func(L, "getArmature", _olua_fun_dragonBones_EventObject_getArmature); + oluacls_func(L, "getBone", _olua_fun_dragonBones_EventObject_getBone); + oluacls_func(L, "getData", _olua_fun_dragonBones_EventObject_getData); + oluacls_func(L, "getSlot", _olua_fun_dragonBones_EventObject_getSlot); + oluacls_func(L, "getTypeIndex", _olua_fun_dragonBones_EventObject_getTypeIndex); + oluacls_func(L, "new", _olua_fun_dragonBones_EventObject_new); + oluacls_prop(L, "typeIndex", _olua_fun_dragonBones_EventObject_getTypeIndex, nullptr); + oluacls_prop(L, "COMPLETE", _olua_fun_dragonBones_EventObject_COMPLETE, _olua_fun_dragonBones_EventObject_COMPLETE); + oluacls_prop(L, "FADE_IN", _olua_fun_dragonBones_EventObject_FADE_IN, _olua_fun_dragonBones_EventObject_FADE_IN); + oluacls_prop(L, "FADE_IN_COMPLETE", _olua_fun_dragonBones_EventObject_FADE_IN_COMPLETE, _olua_fun_dragonBones_EventObject_FADE_IN_COMPLETE); + oluacls_prop(L, "FADE_OUT", _olua_fun_dragonBones_EventObject_FADE_OUT, _olua_fun_dragonBones_EventObject_FADE_OUT); + oluacls_prop(L, "FADE_OUT_COMPLETE", _olua_fun_dragonBones_EventObject_FADE_OUT_COMPLETE, _olua_fun_dragonBones_EventObject_FADE_OUT_COMPLETE); + oluacls_prop(L, "FRAME_EVENT", _olua_fun_dragonBones_EventObject_FRAME_EVENT, _olua_fun_dragonBones_EventObject_FRAME_EVENT); + oluacls_prop(L, "LOOP_COMPLETE", _olua_fun_dragonBones_EventObject_LOOP_COMPLETE, _olua_fun_dragonBones_EventObject_LOOP_COMPLETE); + oluacls_prop(L, "SOUND_EVENT", _olua_fun_dragonBones_EventObject_SOUND_EVENT, _olua_fun_dragonBones_EventObject_SOUND_EVENT); + oluacls_prop(L, "START", _olua_fun_dragonBones_EventObject_START, _olua_fun_dragonBones_EventObject_START); + oluacls_prop(L, "actionData", _olua_fun_dragonBones_EventObject_actionData, _olua_fun_dragonBones_EventObject_actionData); + oluacls_prop(L, "animationState", _olua_fun_dragonBones_EventObject_animationState, _olua_fun_dragonBones_EventObject_animationState); + oluacls_prop(L, "armature", _olua_fun_dragonBones_EventObject_armature, _olua_fun_dragonBones_EventObject_armature); + oluacls_prop(L, "bone", _olua_fun_dragonBones_EventObject_bone, _olua_fun_dragonBones_EventObject_bone); + oluacls_prop(L, "data", _olua_fun_dragonBones_EventObject_data, _olua_fun_dragonBones_EventObject_data); + oluacls_prop(L, "name", _olua_fun_dragonBones_EventObject_name, _olua_fun_dragonBones_EventObject_name); + oluacls_prop(L, "slot", _olua_fun_dragonBones_EventObject_slot, _olua_fun_dragonBones_EventObject_slot); + oluacls_prop(L, "time", _olua_fun_dragonBones_EventObject_time, _olua_fun_dragonBones_EventObject_time); + oluacls_prop(L, "type", _olua_fun_dragonBones_EventObject_type, _olua_fun_dragonBones_EventObject_type); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_db_EventObject(lua_State *L) +{ + olua_require(L, "dragonbones", luaopen_dragonbones); + if (!olua_getclass(L, "db.EventObject")) { + luaL_error(L, "class not found: dragonBones::EventObject"); + } return 1; } OLUA_END_DECLS -static int _dragonBones_TransformObject_getArmature(lua_State *L) +static int _olua_fun_dragonBones_TransformObject_getArmature(lua_State *L) { olua_startinvoke(L); @@ -1721,7 +2294,7 @@ static int _dragonBones_TransformObject_getArmature(lua_State *L) return num_ret; } -static int _dragonBones_TransformObject_updateGlobalTransform(lua_State *L) +static int _olua_fun_dragonBones_TransformObject_updateGlobalTransform(lua_State *L) { olua_startinvoke(L); @@ -1737,7 +2310,7 @@ static int _dragonBones_TransformObject_updateGlobalTransform(lua_State *L) return 0; } -static int _dragonBones_TransformObject_get_userData(lua_State *L) +static int _olua_fun_dragonBones_TransformObject_userData$1(lua_State *L) { olua_startinvoke(L); @@ -1754,7 +2327,7 @@ static int _dragonBones_TransformObject_get_userData(lua_State *L) return num_ret; } -static int _dragonBones_TransformObject_set_userData(lua_State *L) +static int _olua_fun_dragonBones_TransformObject_userData$2(lua_State *L) { olua_startinvoke(L); @@ -1772,72 +2345,50 @@ static int _dragonBones_TransformObject_set_userData(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_dragonBones_TransformObject(lua_State *L) -{ - oluacls_class(L, "db.TransformObject"); - oluacls_func(L, "getArmature", _dragonBones_TransformObject_getArmature); - oluacls_func(L, "updateGlobalTransform", _dragonBones_TransformObject_updateGlobalTransform); - oluacls_prop(L, "armature", _dragonBones_TransformObject_getArmature, nullptr); - oluacls_prop(L, "userData", _dragonBones_TransformObject_get_userData, _dragonBones_TransformObject_set_userData); - - return 1; -} -OLUA_END_DECLS - -static int _dragonBones_Point___call(lua_State *L) +static int _olua_fun_dragonBones_TransformObject_userData(lua_State *L) { - olua_startinvoke(L); - - dragonBones::Point ret; - - luaL_checktype(L, 2, LUA_TTABLE); - - dragonBones::Point arg1; /** helpPointA */ - dragonBones::Point arg2; /** helpPointB */ - dragonBones::Point arg3; /** helpPointC */ - dragonBones::Point arg4; /** helpPointD */ - float arg5 = 0; /** x */ - float arg6 = 0; /** y */ - - olua_getfield(L, 2, "helpPointA"); - olua_check_object(L, -1, &arg1, "db.Point"); - ret.helpPointA = arg1; - lua_pop(L, 1); - - olua_getfield(L, 2, "helpPointB"); - olua_check_object(L, -1, &arg2, "db.Point"); - ret.helpPointB = arg2; - lua_pop(L, 1); + int num_args = lua_gettop(L) - 1; - olua_getfield(L, 2, "helpPointC"); - olua_check_object(L, -1, &arg3, "db.Point"); - ret.helpPointC = arg3; - lua_pop(L, 1); + if (num_args == 0) { + // void *userData + return _olua_fun_dragonBones_TransformObject_userData$1(L); + } - olua_getfield(L, 2, "helpPointD"); - olua_check_object(L, -1, &arg4, "db.Point"); - ret.helpPointD = arg4; - lua_pop(L, 1); + if (num_args == 1) { + // if ((olua_is_object(L, 2, "void *"))) { + // void *userData + return _olua_fun_dragonBones_TransformObject_userData$2(L); + // } + } - olua_getfield(L, 2, "x"); - olua_check_number(L, -1, &arg5); - ret.x = arg5; - lua_pop(L, 1); + luaL_error(L, "method 'dragonBones::TransformObject::userData' not support '%d' arguments", num_args); - olua_getfield(L, 2, "y"); - olua_check_number(L, -1, &arg6); - ret.y = arg6; - lua_pop(L, 1); + return 0; +} - olua_pushcopy_object(L, ret, "db.Point"); +static int _olua_cls_db_TransformObject(lua_State *L) +{ + oluacls_class(L, "db.TransformObject"); + oluacls_func(L, "getArmature", _olua_fun_dragonBones_TransformObject_getArmature); + oluacls_func(L, "updateGlobalTransform", _olua_fun_dragonBones_TransformObject_updateGlobalTransform); + oluacls_prop(L, "armature", _olua_fun_dragonBones_TransformObject_getArmature, nullptr); + oluacls_prop(L, "userData", _olua_fun_dragonBones_TransformObject_userData, _olua_fun_dragonBones_TransformObject_userData); - olua_endinvoke(L); + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_db_TransformObject(lua_State *L) +{ + olua_require(L, "dragonbones", luaopen_dragonbones); + if (!olua_getclass(L, "db.TransformObject")) { + luaL_error(L, "class not found: dragonBones::TransformObject"); + } return 1; } +OLUA_END_DECLS -static int _dragonBones_Point___gc(lua_State *L) +static int _olua_fun_dragonBones_Point___gc(lua_State *L) { olua_startinvoke(L); @@ -1849,7 +2400,7 @@ static int _dragonBones_Point___gc(lua_State *L) return 0; } -static int _dragonBones_Point___olua_move(lua_State *L) +static int _olua_fun_dragonBones_Point___olua_move(lua_State *L) { olua_startinvoke(L); @@ -1861,7 +2412,7 @@ static int _dragonBones_Point___olua_move(lua_State *L) return 1; } -static int _dragonBones_Point_clear(lua_State *L) +static int _olua_fun_dragonBones_Point_clear(lua_State *L) { olua_startinvoke(L); @@ -1877,7 +2428,7 @@ static int _dragonBones_Point_clear(lua_State *L) return 0; } -static int _dragonBones_Point_getHelpPointA(lua_State *L) +static int _olua_fun_dragonBones_Point_getHelpPointA(lua_State *L) { olua_startinvoke(L); @@ -1890,7 +2441,7 @@ static int _dragonBones_Point_getHelpPointA(lua_State *L) return num_ret; } -static int _dragonBones_Point_getHelpPointB(lua_State *L) +static int _olua_fun_dragonBones_Point_getHelpPointB(lua_State *L) { olua_startinvoke(L); @@ -1903,7 +2454,7 @@ static int _dragonBones_Point_getHelpPointB(lua_State *L) return num_ret; } -static int _dragonBones_Point_getHelpPointC(lua_State *L) +static int _olua_fun_dragonBones_Point_getHelpPointC(lua_State *L) { olua_startinvoke(L); @@ -1916,7 +2467,7 @@ static int _dragonBones_Point_getHelpPointC(lua_State *L) return num_ret; } -static int _dragonBones_Point_getHelpPointD(lua_State *L) +static int _olua_fun_dragonBones_Point_getHelpPointD(lua_State *L) { olua_startinvoke(L); @@ -1929,176 +2480,221 @@ static int _dragonBones_Point_getHelpPointD(lua_State *L) return num_ret; } -static int _dragonBones_Point_new$1(lua_State *L) +static int _olua_fun_dragonBones_Point_helpPointA$1(lua_State *L) { olua_startinvoke(L); - // Point() - dragonBones::Point *ret = new dragonBones::Point(); - int num_ret = olua_push_object(L, ret, "db.Point"); - olua_postnew(L, ret); + // static dragonBones::Point helpPointA + dragonBones::Point &ret = dragonBones::Point::helpPointA; + int num_ret = olua_copy_object(L, ret, "db.Point"); olua_endinvoke(L); return num_ret; } -static int _dragonBones_Point_new$2(lua_State *L) +static int _olua_fun_dragonBones_Point_helpPointA$2(lua_State *L) { olua_startinvoke(L); - dragonBones::Point arg1; /** value */ + dragonBones::Point *arg1; /** helpPointA */ olua_check_object(L, 1, &arg1, "db.Point"); - // Point(const dragonBones::Point &value) - dragonBones::Point *ret = new dragonBones::Point(arg1); - int num_ret = olua_push_object(L, ret, "db.Point"); - olua_postnew(L, ret); + // static dragonBones::Point helpPointA + dragonBones::Point::helpPointA = *arg1; olua_endinvoke(L); - return num_ret; + return 0; } -static int _dragonBones_Point_new(lua_State *L) +static int _olua_fun_dragonBones_Point_helpPointA(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 0) { - // Point() - return _dragonBones_Point_new$1(L); + // static dragonBones::Point helpPointA + return _olua_fun_dragonBones_Point_helpPointA$1(L); } if (num_args == 1) { // if ((olua_is_object(L, 1, "db.Point"))) { - // Point(const dragonBones::Point &value) - return _dragonBones_Point_new$2(L); + // static dragonBones::Point helpPointA + return _olua_fun_dragonBones_Point_helpPointA$2(L); // } } - luaL_error(L, "method 'dragonBones::Point::new' not support '%d' arguments", num_args); + luaL_error(L, "method 'dragonBones::Point::helpPointA' not support '%d' arguments", num_args); return 0; } -static int _dragonBones_Point_get_helpPointA(lua_State *L) +static int _olua_fun_dragonBones_Point_helpPointB$1(lua_State *L) { olua_startinvoke(L); - // static dragonBones::Point helpPointA - dragonBones::Point &ret = dragonBones::Point::helpPointA; - int num_ret = olua_pushcopy_object(L, ret, "db.Point"); + // static dragonBones::Point helpPointB + dragonBones::Point &ret = dragonBones::Point::helpPointB; + int num_ret = olua_copy_object(L, ret, "db.Point"); olua_endinvoke(L); return num_ret; } -static int _dragonBones_Point_set_helpPointA(lua_State *L) +static int _olua_fun_dragonBones_Point_helpPointB$2(lua_State *L) { olua_startinvoke(L); - dragonBones::Point arg1; /** helpPointA */ + dragonBones::Point *arg1; /** helpPointB */ olua_check_object(L, 1, &arg1, "db.Point"); - // static dragonBones::Point helpPointA - dragonBones::Point::helpPointA = arg1; - - olua_endinvoke(L); - - return 0; -} - -static int _dragonBones_Point_get_helpPointB(lua_State *L) -{ - olua_startinvoke(L); - // static dragonBones::Point helpPointB - dragonBones::Point &ret = dragonBones::Point::helpPointB; - int num_ret = olua_pushcopy_object(L, ret, "db.Point"); + dragonBones::Point::helpPointB = *arg1; olua_endinvoke(L); - return num_ret; + return 0; } -static int _dragonBones_Point_set_helpPointB(lua_State *L) +static int _olua_fun_dragonBones_Point_helpPointB(lua_State *L) { - olua_startinvoke(L); - - dragonBones::Point arg1; /** helpPointB */ + int num_args = lua_gettop(L); - olua_check_object(L, 1, &arg1, "db.Point"); + if (num_args == 0) { + // static dragonBones::Point helpPointB + return _olua_fun_dragonBones_Point_helpPointB$1(L); + } - // static dragonBones::Point helpPointB - dragonBones::Point::helpPointB = arg1; + if (num_args == 1) { + // if ((olua_is_object(L, 1, "db.Point"))) { + // static dragonBones::Point helpPointB + return _olua_fun_dragonBones_Point_helpPointB$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'dragonBones::Point::helpPointB' not support '%d' arguments", num_args); return 0; } -static int _dragonBones_Point_get_helpPointC(lua_State *L) +static int _olua_fun_dragonBones_Point_helpPointC$1(lua_State *L) { olua_startinvoke(L); // static dragonBones::Point helpPointC dragonBones::Point &ret = dragonBones::Point::helpPointC; - int num_ret = olua_pushcopy_object(L, ret, "db.Point"); + int num_ret = olua_copy_object(L, ret, "db.Point"); olua_endinvoke(L); return num_ret; } -static int _dragonBones_Point_set_helpPointC(lua_State *L) +static int _olua_fun_dragonBones_Point_helpPointC$2(lua_State *L) { olua_startinvoke(L); - dragonBones::Point arg1; /** helpPointC */ + dragonBones::Point *arg1; /** helpPointC */ olua_check_object(L, 1, &arg1, "db.Point"); // static dragonBones::Point helpPointC - dragonBones::Point::helpPointC = arg1; + dragonBones::Point::helpPointC = *arg1; olua_endinvoke(L); return 0; } -static int _dragonBones_Point_get_helpPointD(lua_State *L) +static int _olua_fun_dragonBones_Point_helpPointC(lua_State *L) { - olua_startinvoke(L); - - // static dragonBones::Point helpPointD - dragonBones::Point &ret = dragonBones::Point::helpPointD; - int num_ret = olua_pushcopy_object(L, ret, "db.Point"); + int num_args = lua_gettop(L); - olua_endinvoke(L); + if (num_args == 0) { + // static dragonBones::Point helpPointC + return _olua_fun_dragonBones_Point_helpPointC$1(L); + } - return num_ret; + if (num_args == 1) { + // if ((olua_is_object(L, 1, "db.Point"))) { + // static dragonBones::Point helpPointC + return _olua_fun_dragonBones_Point_helpPointC$2(L); + // } + } + + luaL_error(L, "method 'dragonBones::Point::helpPointC' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_dragonBones_Point_helpPointD$1(lua_State *L) +{ + olua_startinvoke(L); + + // static dragonBones::Point helpPointD + dragonBones::Point &ret = dragonBones::Point::helpPointD; + int num_ret = olua_copy_object(L, ret, "db.Point"); + + olua_endinvoke(L); + + return num_ret; } -static int _dragonBones_Point_set_helpPointD(lua_State *L) +static int _olua_fun_dragonBones_Point_helpPointD$2(lua_State *L) { olua_startinvoke(L); - dragonBones::Point arg1; /** helpPointD */ + dragonBones::Point *arg1; /** helpPointD */ olua_check_object(L, 1, &arg1, "db.Point"); // static dragonBones::Point helpPointD - dragonBones::Point::helpPointD = arg1; + dragonBones::Point::helpPointD = *arg1; olua_endinvoke(L); return 0; } -static int _dragonBones_Point_get_x(lua_State *L) +static int _olua_fun_dragonBones_Point_helpPointD(lua_State *L) +{ + int num_args = lua_gettop(L); + + if (num_args == 0) { + // static dragonBones::Point helpPointD + return _olua_fun_dragonBones_Point_helpPointD$1(L); + } + + if (num_args == 1) { + // if ((olua_is_object(L, 1, "db.Point"))) { + // static dragonBones::Point helpPointD + return _olua_fun_dragonBones_Point_helpPointD$2(L); + // } + } + + luaL_error(L, "method 'dragonBones::Point::helpPointD' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_dragonBones_Point_new(lua_State *L) +{ + olua_startinvoke(L); + + // dragonBones::Point() + dragonBones::Point *ret = new dragonBones::Point(); + int num_ret = olua_push_object(L, ret, "db.Point"); + olua_postnew(L, ret); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_dragonBones_Point_x$1(lua_State *L) { olua_startinvoke(L); @@ -2115,7 +2711,7 @@ static int _dragonBones_Point_get_x(lua_State *L) return num_ret; } -static int _dragonBones_Point_set_x(lua_State *L) +static int _olua_fun_dragonBones_Point_x$2(lua_State *L) { olua_startinvoke(L); @@ -2133,7 +2729,28 @@ static int _dragonBones_Point_set_x(lua_State *L) return 0; } -static int _dragonBones_Point_get_y(lua_State *L) +static int _olua_fun_dragonBones_Point_x(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float x + return _olua_fun_dragonBones_Point_x$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float x + return _olua_fun_dragonBones_Point_x$2(L); + // } + } + + luaL_error(L, "method 'dragonBones::Point::x' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_dragonBones_Point_y$1(lua_State *L) { olua_startinvoke(L); @@ -2150,7 +2767,7 @@ static int _dragonBones_Point_get_y(lua_State *L) return num_ret; } -static int _dragonBones_Point_set_y(lua_State *L) +static int _olua_fun_dragonBones_Point_y$2(lua_State *L) { olua_startinvoke(L); @@ -2168,69 +2785,60 @@ static int _dragonBones_Point_set_y(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_dragonBones_Point(lua_State *L) -{ - oluacls_class(L, "db.Point"); - oluacls_func(L, "__call", _dragonBones_Point___call); - oluacls_func(L, "__gc", _dragonBones_Point___gc); - oluacls_func(L, "__olua_move", _dragonBones_Point___olua_move); - oluacls_func(L, "clear", _dragonBones_Point_clear); - oluacls_func(L, "getHelpPointA", _dragonBones_Point_getHelpPointA); - oluacls_func(L, "getHelpPointB", _dragonBones_Point_getHelpPointB); - oluacls_func(L, "getHelpPointC", _dragonBones_Point_getHelpPointC); - oluacls_func(L, "getHelpPointD", _dragonBones_Point_getHelpPointD); - oluacls_func(L, "new", _dragonBones_Point_new); - oluacls_prop(L, "helpPointA", _dragonBones_Point_getHelpPointA, nullptr); - oluacls_prop(L, "helpPointB", _dragonBones_Point_getHelpPointB, nullptr); - oluacls_prop(L, "helpPointC", _dragonBones_Point_getHelpPointC, nullptr); - oluacls_prop(L, "helpPointD", _dragonBones_Point_getHelpPointD, nullptr); - oluacls_prop(L, "helpPointA", _dragonBones_Point_get_helpPointA, _dragonBones_Point_set_helpPointA); - oluacls_prop(L, "helpPointB", _dragonBones_Point_get_helpPointB, _dragonBones_Point_set_helpPointB); - oluacls_prop(L, "helpPointC", _dragonBones_Point_get_helpPointC, _dragonBones_Point_set_helpPointC); - oluacls_prop(L, "helpPointD", _dragonBones_Point_get_helpPointD, _dragonBones_Point_set_helpPointD); - oluacls_prop(L, "x", _dragonBones_Point_get_x, _dragonBones_Point_set_x); - oluacls_prop(L, "y", _dragonBones_Point_get_y, _dragonBones_Point_set_y); - - return 1; -} -OLUA_END_DECLS - -static int _dragonBones_ConstraintData_getBone(lua_State *L) +static int _olua_fun_dragonBones_Point_y(lua_State *L) { - olua_startinvoke(L); - - dragonBones::ConstraintData *self = nullptr; + int num_args = lua_gettop(L) - 1; - olua_to_object(L, 1, &self, "db.ConstraintData"); + if (num_args == 0) { + // float y + return _olua_fun_dragonBones_Point_y$1(L); + } - // const dragonBones::BoneData *getBone() - const dragonBones::BoneData *ret = self->getBone(); - int num_ret = olua_push_object(L, ret, "db.BoneData"); + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float y + return _olua_fun_dragonBones_Point_y$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'dragonBones::Point::y' not support '%d' arguments", num_args); - return num_ret; + return 0; } -static int _dragonBones_ConstraintData_getRoot(lua_State *L) +static int _olua_cls_db_Point(lua_State *L) { - olua_startinvoke(L); - - dragonBones::ConstraintData *self = nullptr; - - olua_to_object(L, 1, &self, "db.ConstraintData"); - - // const dragonBones::BoneData *getRoot() - const dragonBones::BoneData *ret = self->getRoot(); - int num_ret = olua_push_object(L, ret, "db.BoneData"); + oluacls_class(L, "db.Point"); + oluacls_func(L, "__gc", _olua_fun_dragonBones_Point___gc); + oluacls_func(L, "__olua_move", _olua_fun_dragonBones_Point___olua_move); + oluacls_func(L, "clear", _olua_fun_dragonBones_Point_clear); + oluacls_func(L, "getHelpPointA", _olua_fun_dragonBones_Point_getHelpPointA); + oluacls_func(L, "getHelpPointB", _olua_fun_dragonBones_Point_getHelpPointB); + oluacls_func(L, "getHelpPointC", _olua_fun_dragonBones_Point_getHelpPointC); + oluacls_func(L, "getHelpPointD", _olua_fun_dragonBones_Point_getHelpPointD); + oluacls_func(L, "new", _olua_fun_dragonBones_Point_new); + oluacls_prop(L, "helpPointA", _olua_fun_dragonBones_Point_helpPointA, _olua_fun_dragonBones_Point_helpPointA); + oluacls_prop(L, "helpPointB", _olua_fun_dragonBones_Point_helpPointB, _olua_fun_dragonBones_Point_helpPointB); + oluacls_prop(L, "helpPointC", _olua_fun_dragonBones_Point_helpPointC, _olua_fun_dragonBones_Point_helpPointC); + oluacls_prop(L, "helpPointD", _olua_fun_dragonBones_Point_helpPointD, _olua_fun_dragonBones_Point_helpPointD); + oluacls_prop(L, "x", _olua_fun_dragonBones_Point_x, _olua_fun_dragonBones_Point_x); + oluacls_prop(L, "y", _olua_fun_dragonBones_Point_y, _olua_fun_dragonBones_Point_y); - olua_endinvoke(L); + return 1; +} - return num_ret; +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_db_Point(lua_State *L) +{ + olua_require(L, "dragonbones", luaopen_dragonbones); + if (!olua_getclass(L, "db.Point")) { + luaL_error(L, "class not found: dragonBones::Point"); + } + return 1; } +OLUA_END_DECLS -static int _dragonBones_ConstraintData_getTarget(lua_State *L) +static int _olua_fun_dragonBones_ConstraintData_bone$1(lua_State *L) { olua_startinvoke(L); @@ -2238,8 +2846,8 @@ static int _dragonBones_ConstraintData_getTarget(lua_State *L) olua_to_object(L, 1, &self, "db.ConstraintData"); - // const dragonBones::BoneData *getTarget() - const dragonBones::BoneData *ret = self->getTarget(); + // const dragonBones::BoneData *bone + const dragonBones::BoneData *ret = self->bone; int num_ret = olua_push_object(L, ret, "db.BoneData"); olua_endinvoke(L); @@ -2247,61 +2855,63 @@ static int _dragonBones_ConstraintData_getTarget(lua_State *L) return num_ret; } -static int _dragonBones_ConstraintData_setBone(lua_State *L) +static int _olua_fun_dragonBones_ConstraintData_bone$2(lua_State *L) { olua_startinvoke(L); dragonBones::ConstraintData *self = nullptr; - dragonBones::BoneData *arg1 = nullptr; /** value */ + dragonBones::BoneData *arg1 = nullptr; /** bone */ olua_to_object(L, 1, &self, "db.ConstraintData"); olua_check_object(L, 2, &arg1, "db.BoneData"); - // void setBone(const dragonBones::BoneData *value) - self->setBone(arg1); + // const dragonBones::BoneData *bone + self->bone = arg1; olua_endinvoke(L); return 0; } -static int _dragonBones_ConstraintData_setRoot(lua_State *L) +static int _olua_fun_dragonBones_ConstraintData_bone(lua_State *L) { - olua_startinvoke(L); - - dragonBones::ConstraintData *self = nullptr; - dragonBones::BoneData *arg1 = nullptr; /** value */ + int num_args = lua_gettop(L) - 1; - olua_to_object(L, 1, &self, "db.ConstraintData"); - olua_check_object(L, 2, &arg1, "db.BoneData"); + if (num_args == 0) { + // const dragonBones::BoneData *bone + return _olua_fun_dragonBones_ConstraintData_bone$1(L); + } - // void setRoot(const dragonBones::BoneData *value) - self->setRoot(arg1); + if (num_args == 1) { + // if ((olua_is_object(L, 2, "db.BoneData"))) { + // const dragonBones::BoneData *bone + return _olua_fun_dragonBones_ConstraintData_bone$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'dragonBones::ConstraintData::bone' not support '%d' arguments", num_args); return 0; } -static int _dragonBones_ConstraintData_setTarget(lua_State *L) +static int _olua_fun_dragonBones_ConstraintData_getBone(lua_State *L) { olua_startinvoke(L); dragonBones::ConstraintData *self = nullptr; - dragonBones::BoneData *arg1 = nullptr; /** value */ olua_to_object(L, 1, &self, "db.ConstraintData"); - olua_check_object(L, 2, &arg1, "db.BoneData"); - // void setTarget(const dragonBones::BoneData *value) - self->setTarget(arg1); + // const dragonBones::BoneData *getBone() + const dragonBones::BoneData *ret = self->getBone(); + int num_ret = olua_push_object(L, ret, "db.BoneData"); olua_endinvoke(L); - return 0; + return num_ret; } -static int _dragonBones_ConstraintData_get_bone(lua_State *L) +static int _olua_fun_dragonBones_ConstraintData_getRoot(lua_State *L) { olua_startinvoke(L); @@ -2309,8 +2919,8 @@ static int _dragonBones_ConstraintData_get_bone(lua_State *L) olua_to_object(L, 1, &self, "db.ConstraintData"); - // const dragonBones::BoneData *bone - const dragonBones::BoneData *ret = self->bone; + // const dragonBones::BoneData *getRoot() + const dragonBones::BoneData *ret = self->getRoot(); int num_ret = olua_push_object(L, ret, "db.BoneData"); olua_endinvoke(L); @@ -2318,25 +2928,24 @@ static int _dragonBones_ConstraintData_get_bone(lua_State *L) return num_ret; } -static int _dragonBones_ConstraintData_set_bone(lua_State *L) +static int _olua_fun_dragonBones_ConstraintData_getTarget(lua_State *L) { olua_startinvoke(L); dragonBones::ConstraintData *self = nullptr; - dragonBones::BoneData *arg1 = nullptr; /** bone */ olua_to_object(L, 1, &self, "db.ConstraintData"); - olua_check_object(L, 2, &arg1, "db.BoneData"); - // const dragonBones::BoneData *bone - self->bone = arg1; + // const dragonBones::BoneData *getTarget() + const dragonBones::BoneData *ret = self->getTarget(); + int num_ret = olua_push_object(L, ret, "db.BoneData"); olua_endinvoke(L); - return 0; + return num_ret; } -static int _dragonBones_ConstraintData_get_name(lua_State *L) +static int _olua_fun_dragonBones_ConstraintData_name$1(lua_State *L) { olua_startinvoke(L); @@ -2353,7 +2962,7 @@ static int _dragonBones_ConstraintData_get_name(lua_State *L) return num_ret; } -static int _dragonBones_ConstraintData_set_name(lua_State *L) +static int _olua_fun_dragonBones_ConstraintData_name$2(lua_State *L) { olua_startinvoke(L); @@ -2371,7 +2980,28 @@ static int _dragonBones_ConstraintData_set_name(lua_State *L) return 0; } -static int _dragonBones_ConstraintData_get_order(lua_State *L) +static int _olua_fun_dragonBones_ConstraintData_name(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // std::string name + return _olua_fun_dragonBones_ConstraintData_name$1(L); + } + + if (num_args == 1) { + // if ((olua_is_string(L, 2))) { + // std::string name + return _olua_fun_dragonBones_ConstraintData_name$2(L); + // } + } + + luaL_error(L, "method 'dragonBones::ConstraintData::name' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_dragonBones_ConstraintData_order$1(lua_State *L) { olua_startinvoke(L); @@ -2388,7 +3018,7 @@ static int _dragonBones_ConstraintData_get_order(lua_State *L) return num_ret; } -static int _dragonBones_ConstraintData_set_order(lua_State *L) +static int _olua_fun_dragonBones_ConstraintData_order$2(lua_State *L) { olua_startinvoke(L); @@ -2406,7 +3036,28 @@ static int _dragonBones_ConstraintData_set_order(lua_State *L) return 0; } -static int _dragonBones_ConstraintData_get_root(lua_State *L) +static int _olua_fun_dragonBones_ConstraintData_order(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // int order + return _olua_fun_dragonBones_ConstraintData_order$1(L); + } + + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // int order + return _olua_fun_dragonBones_ConstraintData_order$2(L); + // } + } + + luaL_error(L, "method 'dragonBones::ConstraintData::order' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_dragonBones_ConstraintData_root$1(lua_State *L) { olua_startinvoke(L); @@ -2423,7 +3074,7 @@ static int _dragonBones_ConstraintData_get_root(lua_State *L) return num_ret; } -static int _dragonBones_ConstraintData_set_root(lua_State *L) +static int _olua_fun_dragonBones_ConstraintData_root$2(lua_State *L) { olua_startinvoke(L); @@ -2441,127 +3092,250 @@ static int _dragonBones_ConstraintData_set_root(lua_State *L) return 0; } -static int _dragonBones_ConstraintData_get_target(lua_State *L) +static int _olua_fun_dragonBones_ConstraintData_root(lua_State *L) { - olua_startinvoke(L); - - dragonBones::ConstraintData *self = nullptr; + int num_args = lua_gettop(L) - 1; - olua_to_object(L, 1, &self, "db.ConstraintData"); + if (num_args == 0) { + // const dragonBones::BoneData *root + return _olua_fun_dragonBones_ConstraintData_root$1(L); + } - // const dragonBones::BoneData *target - const dragonBones::BoneData *ret = self->target; - int num_ret = olua_push_object(L, ret, "db.BoneData"); + if (num_args == 1) { + // if ((olua_is_object(L, 2, "db.BoneData"))) { + // const dragonBones::BoneData *root + return _olua_fun_dragonBones_ConstraintData_root$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'dragonBones::ConstraintData::root' not support '%d' arguments", num_args); - return num_ret; + return 0; } -static int _dragonBones_ConstraintData_set_target(lua_State *L) +static int _olua_fun_dragonBones_ConstraintData_setBone(lua_State *L) { olua_startinvoke(L); dragonBones::ConstraintData *self = nullptr; - dragonBones::BoneData *arg1 = nullptr; /** target */ + dragonBones::BoneData *arg1 = nullptr; /** value */ olua_to_object(L, 1, &self, "db.ConstraintData"); olua_check_object(L, 2, &arg1, "db.BoneData"); - // const dragonBones::BoneData *target - self->target = arg1; + // void setBone(const dragonBones::BoneData *value) + self->setBone(arg1); olua_endinvoke(L); return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_dragonBones_ConstraintData(lua_State *L) +static int _olua_fun_dragonBones_ConstraintData_setRoot(lua_State *L) { - oluacls_class(L, "db.ConstraintData"); - oluacls_func(L, "getBone", _dragonBones_ConstraintData_getBone); - oluacls_func(L, "getRoot", _dragonBones_ConstraintData_getRoot); - oluacls_func(L, "getTarget", _dragonBones_ConstraintData_getTarget); - oluacls_func(L, "setBone", _dragonBones_ConstraintData_setBone); - oluacls_func(L, "setRoot", _dragonBones_ConstraintData_setRoot); - oluacls_func(L, "setTarget", _dragonBones_ConstraintData_setTarget); - oluacls_prop(L, "bone", _dragonBones_ConstraintData_getBone, _dragonBones_ConstraintData_setBone); - oluacls_prop(L, "root", _dragonBones_ConstraintData_getRoot, _dragonBones_ConstraintData_setRoot); - oluacls_prop(L, "target", _dragonBones_ConstraintData_getTarget, _dragonBones_ConstraintData_setTarget); - oluacls_prop(L, "bone", _dragonBones_ConstraintData_get_bone, _dragonBones_ConstraintData_set_bone); - oluacls_prop(L, "name", _dragonBones_ConstraintData_get_name, _dragonBones_ConstraintData_set_name); - oluacls_prop(L, "order", _dragonBones_ConstraintData_get_order, _dragonBones_ConstraintData_set_order); - oluacls_prop(L, "root", _dragonBones_ConstraintData_get_root, _dragonBones_ConstraintData_set_root); - oluacls_prop(L, "target", _dragonBones_ConstraintData_get_target, _dragonBones_ConstraintData_set_target); + olua_startinvoke(L); - return 1; -} -OLUA_END_DECLS + dragonBones::ConstraintData *self = nullptr; + dragonBones::BoneData *arg1 = nullptr; /** value */ -static int _dragonBones_IKConstraintData_getTypeIndex(lua_State *L) -{ - olua_startinvoke(L); + olua_to_object(L, 1, &self, "db.ConstraintData"); + olua_check_object(L, 2, &arg1, "db.BoneData"); - // static std::size_t getTypeIndex() - std::size_t ret = dragonBones::IKConstraintData::getTypeIndex(); - int num_ret = olua_push_integer(L, ret); + // void setRoot(const dragonBones::BoneData *value) + self->setRoot(arg1); olua_endinvoke(L); - return num_ret; + return 0; } -static int _dragonBones_IKConstraintData_new(lua_State *L) +static int _olua_fun_dragonBones_ConstraintData_setTarget(lua_State *L) { olua_startinvoke(L); - // IKConstraintData() - dragonBones::IKConstraintData *ret = new dragonBones::IKConstraintData(); - int num_ret = olua_push_object(L, ret, "db.IKConstraintData"); - olua_postnew(L, ret); + dragonBones::ConstraintData *self = nullptr; + dragonBones::BoneData *arg1 = nullptr; /** value */ + + olua_to_object(L, 1, &self, "db.ConstraintData"); + olua_check_object(L, 2, &arg1, "db.BoneData"); + + // void setTarget(const dragonBones::BoneData *value) + self->setTarget(arg1); olua_endinvoke(L); - return num_ret; + return 0; } -static int _dragonBones_IKConstraintData_get_bendPositive(lua_State *L) +static int _olua_fun_dragonBones_ConstraintData_target$1(lua_State *L) { olua_startinvoke(L); - dragonBones::IKConstraintData *self = nullptr; + dragonBones::ConstraintData *self = nullptr; - olua_to_object(L, 1, &self, "db.IKConstraintData"); + olua_to_object(L, 1, &self, "db.ConstraintData"); - // bool bendPositive - bool ret = self->bendPositive; - int num_ret = olua_push_bool(L, ret); + // const dragonBones::BoneData *target + const dragonBones::BoneData *ret = self->target; + int num_ret = olua_push_object(L, ret, "db.BoneData"); olua_endinvoke(L); return num_ret; } -static int _dragonBones_IKConstraintData_set_bendPositive(lua_State *L) +static int _olua_fun_dragonBones_ConstraintData_target$2(lua_State *L) { olua_startinvoke(L); - dragonBones::IKConstraintData *self = nullptr; - bool arg1 = false; /** bendPositive */ + dragonBones::ConstraintData *self = nullptr; + dragonBones::BoneData *arg1 = nullptr; /** target */ - olua_to_object(L, 1, &self, "db.IKConstraintData"); - olua_check_bool(L, 2, &arg1); + olua_to_object(L, 1, &self, "db.ConstraintData"); + olua_check_object(L, 2, &arg1, "db.BoneData"); - // bool bendPositive - self->bendPositive = arg1; + // const dragonBones::BoneData *target + self->target = arg1; olua_endinvoke(L); return 0; } -static int _dragonBones_IKConstraintData_get_scaleEnabled(lua_State *L) +static int _olua_fun_dragonBones_ConstraintData_target(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // const dragonBones::BoneData *target + return _olua_fun_dragonBones_ConstraintData_target$1(L); + } + + if (num_args == 1) { + // if ((olua_is_object(L, 2, "db.BoneData"))) { + // const dragonBones::BoneData *target + return _olua_fun_dragonBones_ConstraintData_target$2(L); + // } + } + + luaL_error(L, "method 'dragonBones::ConstraintData::target' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_cls_db_ConstraintData(lua_State *L) +{ + oluacls_class(L, "db.ConstraintData"); + oluacls_func(L, "getBone", _olua_fun_dragonBones_ConstraintData_getBone); + oluacls_func(L, "getRoot", _olua_fun_dragonBones_ConstraintData_getRoot); + oluacls_func(L, "getTarget", _olua_fun_dragonBones_ConstraintData_getTarget); + oluacls_func(L, "setBone", _olua_fun_dragonBones_ConstraintData_setBone); + oluacls_func(L, "setRoot", _olua_fun_dragonBones_ConstraintData_setRoot); + oluacls_func(L, "setTarget", _olua_fun_dragonBones_ConstraintData_setTarget); + oluacls_prop(L, "bone", _olua_fun_dragonBones_ConstraintData_bone, _olua_fun_dragonBones_ConstraintData_bone); + oluacls_prop(L, "name", _olua_fun_dragonBones_ConstraintData_name, _olua_fun_dragonBones_ConstraintData_name); + oluacls_prop(L, "order", _olua_fun_dragonBones_ConstraintData_order, _olua_fun_dragonBones_ConstraintData_order); + oluacls_prop(L, "root", _olua_fun_dragonBones_ConstraintData_root, _olua_fun_dragonBones_ConstraintData_root); + oluacls_prop(L, "target", _olua_fun_dragonBones_ConstraintData_target, _olua_fun_dragonBones_ConstraintData_target); + + return 1; +} + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_db_ConstraintData(lua_State *L) +{ + olua_require(L, "dragonbones", luaopen_dragonbones); + if (!olua_getclass(L, "db.ConstraintData")) { + luaL_error(L, "class not found: dragonBones::ConstraintData"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_fun_dragonBones_IKConstraintData_bendPositive$1(lua_State *L) +{ + olua_startinvoke(L); + + dragonBones::IKConstraintData *self = nullptr; + + olua_to_object(L, 1, &self, "db.IKConstraintData"); + + // bool bendPositive + bool ret = self->bendPositive; + int num_ret = olua_push_bool(L, ret); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_dragonBones_IKConstraintData_bendPositive$2(lua_State *L) +{ + olua_startinvoke(L); + + dragonBones::IKConstraintData *self = nullptr; + bool arg1 = false; /** bendPositive */ + + olua_to_object(L, 1, &self, "db.IKConstraintData"); + olua_check_bool(L, 2, &arg1); + + // bool bendPositive + self->bendPositive = arg1; + + olua_endinvoke(L); + + return 0; +} + +static int _olua_fun_dragonBones_IKConstraintData_bendPositive(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // bool bendPositive + return _olua_fun_dragonBones_IKConstraintData_bendPositive$1(L); + } + + if (num_args == 1) { + // if ((olua_is_bool(L, 2))) { + // bool bendPositive + return _olua_fun_dragonBones_IKConstraintData_bendPositive$2(L); + // } + } + + luaL_error(L, "method 'dragonBones::IKConstraintData::bendPositive' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_dragonBones_IKConstraintData_getTypeIndex(lua_State *L) +{ + olua_startinvoke(L); + + // static std::size_t getTypeIndex() + std::size_t ret = dragonBones::IKConstraintData::getTypeIndex(); + int num_ret = olua_push_integer(L, ret); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_dragonBones_IKConstraintData_new(lua_State *L) +{ + olua_startinvoke(L); + + // dragonBones::IKConstraintData() + dragonBones::IKConstraintData *ret = new dragonBones::IKConstraintData(); + int num_ret = olua_push_object(L, ret, "db.IKConstraintData"); + olua_postnew(L, ret); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_dragonBones_IKConstraintData_scaleEnabled$1(lua_State *L) { olua_startinvoke(L); @@ -2578,7 +3352,7 @@ static int _dragonBones_IKConstraintData_get_scaleEnabled(lua_State *L) return num_ret; } -static int _dragonBones_IKConstraintData_set_scaleEnabled(lua_State *L) +static int _olua_fun_dragonBones_IKConstraintData_scaleEnabled$2(lua_State *L) { olua_startinvoke(L); @@ -2596,7 +3370,28 @@ static int _dragonBones_IKConstraintData_set_scaleEnabled(lua_State *L) return 0; } -static int _dragonBones_IKConstraintData_get_weight(lua_State *L) +static int _olua_fun_dragonBones_IKConstraintData_scaleEnabled(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // bool scaleEnabled + return _olua_fun_dragonBones_IKConstraintData_scaleEnabled$1(L); + } + + if (num_args == 1) { + // if ((olua_is_bool(L, 2))) { + // bool scaleEnabled + return _olua_fun_dragonBones_IKConstraintData_scaleEnabled$2(L); + // } + } + + luaL_error(L, "method 'dragonBones::IKConstraintData::scaleEnabled' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_dragonBones_IKConstraintData_weight$1(lua_State *L) { olua_startinvoke(L); @@ -2613,7 +3408,7 @@ static int _dragonBones_IKConstraintData_get_weight(lua_State *L) return num_ret; } -static int _dragonBones_IKConstraintData_set_weight(lua_State *L) +static int _olua_fun_dragonBones_IKConstraintData_weight$2(lua_State *L) { olua_startinvoke(L); @@ -2631,22 +3426,52 @@ static int _dragonBones_IKConstraintData_set_weight(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_dragonBones_IKConstraintData(lua_State *L) +static int _olua_fun_dragonBones_IKConstraintData_weight(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float weight + return _olua_fun_dragonBones_IKConstraintData_weight$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float weight + return _olua_fun_dragonBones_IKConstraintData_weight$2(L); + // } + } + + luaL_error(L, "method 'dragonBones::IKConstraintData::weight' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_cls_db_IKConstraintData(lua_State *L) { oluacls_class(L, "db.IKConstraintData"); - oluacls_func(L, "getTypeIndex", _dragonBones_IKConstraintData_getTypeIndex); - oluacls_func(L, "new", _dragonBones_IKConstraintData_new); - oluacls_prop(L, "typeIndex", _dragonBones_IKConstraintData_getTypeIndex, nullptr); - oluacls_prop(L, "bendPositive", _dragonBones_IKConstraintData_get_bendPositive, _dragonBones_IKConstraintData_set_bendPositive); - oluacls_prop(L, "scaleEnabled", _dragonBones_IKConstraintData_get_scaleEnabled, _dragonBones_IKConstraintData_set_scaleEnabled); - oluacls_prop(L, "weight", _dragonBones_IKConstraintData_get_weight, _dragonBones_IKConstraintData_set_weight); + oluacls_func(L, "getTypeIndex", _olua_fun_dragonBones_IKConstraintData_getTypeIndex); + oluacls_func(L, "new", _olua_fun_dragonBones_IKConstraintData_new); + oluacls_prop(L, "typeIndex", _olua_fun_dragonBones_IKConstraintData_getTypeIndex, nullptr); + oluacls_prop(L, "bendPositive", _olua_fun_dragonBones_IKConstraintData_bendPositive, _olua_fun_dragonBones_IKConstraintData_bendPositive); + oluacls_prop(L, "scaleEnabled", _olua_fun_dragonBones_IKConstraintData_scaleEnabled, _olua_fun_dragonBones_IKConstraintData_scaleEnabled); + oluacls_prop(L, "weight", _olua_fun_dragonBones_IKConstraintData_weight, _olua_fun_dragonBones_IKConstraintData_weight); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_db_IKConstraintData(lua_State *L) +{ + olua_require(L, "dragonbones", luaopen_dragonbones); + if (!olua_getclass(L, "db.IKConstraintData")) { + luaL_error(L, "class not found: dragonBones::IKConstraintData"); + } return 1; } OLUA_END_DECLS -static int _dragonBones_TimelineData_getType(lua_State *L) +static int _olua_fun_dragonBones_TimelineData_frameIndicesOffset$1(lua_State *L) { olua_startinvoke(L); @@ -2654,8 +3479,8 @@ static int _dragonBones_TimelineData_getType(lua_State *L) olua_to_object(L, 1, &self, "db.TimelineData"); - // int getType() - int ret = self->getType(); + // int frameIndicesOffset + int ret = self->frameIndicesOffset; int num_ret = olua_push_integer(L, ret); olua_endinvoke(L); @@ -2663,61 +3488,68 @@ static int _dragonBones_TimelineData_getType(lua_State *L) return num_ret; } -static int _dragonBones_TimelineData_getTypeIndex(lua_State *L) +static int _olua_fun_dragonBones_TimelineData_frameIndicesOffset$2(lua_State *L) { olua_startinvoke(L); - // static std::size_t getTypeIndex() - std::size_t ret = dragonBones::TimelineData::getTypeIndex(); - int num_ret = olua_push_integer(L, ret); + dragonBones::TimelineData *self = nullptr; + int arg1 = 0; /** frameIndicesOffset */ + + olua_to_object(L, 1, &self, "db.TimelineData"); + olua_check_integer(L, 2, &arg1); + + // int frameIndicesOffset + self->frameIndicesOffset = arg1; olua_endinvoke(L); - return num_ret; + return 0; } -static int _dragonBones_TimelineData_new(lua_State *L) +static int _olua_fun_dragonBones_TimelineData_frameIndicesOffset(lua_State *L) { - olua_startinvoke(L); + int num_args = lua_gettop(L) - 1; - // TimelineData() - dragonBones::TimelineData *ret = new dragonBones::TimelineData(); - int num_ret = olua_push_object(L, ret, "db.TimelineData"); - olua_postnew(L, ret); + if (num_args == 0) { + // int frameIndicesOffset + return _olua_fun_dragonBones_TimelineData_frameIndicesOffset$1(L); + } - olua_endinvoke(L); + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // int frameIndicesOffset + return _olua_fun_dragonBones_TimelineData_frameIndicesOffset$2(L); + // } + } - return num_ret; + luaL_error(L, "method 'dragonBones::TimelineData::frameIndicesOffset' not support '%d' arguments", num_args); + + return 0; } -static int _dragonBones_TimelineData_setType(lua_State *L) +static int _olua_fun_dragonBones_TimelineData_getType(lua_State *L) { olua_startinvoke(L); dragonBones::TimelineData *self = nullptr; - int arg1 = 0; /** value */ olua_to_object(L, 1, &self, "db.TimelineData"); - olua_check_integer(L, 2, &arg1); - // void setType(int value) - self->setType(arg1); + // int getType() + int ret = self->getType(); + int num_ret = olua_push_integer(L, ret); olua_endinvoke(L); - return 0; + return num_ret; } -static int _dragonBones_TimelineData_get_frameIndicesOffset(lua_State *L) +static int _olua_fun_dragonBones_TimelineData_getTypeIndex(lua_State *L) { olua_startinvoke(L); - dragonBones::TimelineData *self = nullptr; - - olua_to_object(L, 1, &self, "db.TimelineData"); - - // int frameIndicesOffset - int ret = self->frameIndicesOffset; + // static std::size_t getTypeIndex() + std::size_t ret = dragonBones::TimelineData::getTypeIndex(); int num_ret = olua_push_integer(L, ret); olua_endinvoke(L); @@ -2725,25 +3557,21 @@ static int _dragonBones_TimelineData_get_frameIndicesOffset(lua_State *L) return num_ret; } -static int _dragonBones_TimelineData_set_frameIndicesOffset(lua_State *L) +static int _olua_fun_dragonBones_TimelineData_new(lua_State *L) { olua_startinvoke(L); - dragonBones::TimelineData *self = nullptr; - int arg1 = 0; /** frameIndicesOffset */ - - olua_to_object(L, 1, &self, "db.TimelineData"); - olua_check_integer(L, 2, &arg1); - - // int frameIndicesOffset - self->frameIndicesOffset = arg1; + // dragonBones::TimelineData() + dragonBones::TimelineData *ret = new dragonBones::TimelineData(); + int num_ret = olua_push_object(L, ret, "db.TimelineData"); + olua_postnew(L, ret); olua_endinvoke(L); - return 0; + return num_ret; } -static int _dragonBones_TimelineData_get_offset(lua_State *L) +static int _olua_fun_dragonBones_TimelineData_offset$1(lua_State *L) { olua_startinvoke(L); @@ -2760,7 +3588,7 @@ static int _dragonBones_TimelineData_get_offset(lua_State *L) return num_ret; } -static int _dragonBones_TimelineData_set_offset(lua_State *L) +static int _olua_fun_dragonBones_TimelineData_offset$2(lua_State *L) { olua_startinvoke(L); @@ -2778,7 +3606,46 @@ static int _dragonBones_TimelineData_set_offset(lua_State *L) return 0; } -static int _dragonBones_TimelineData_get_type(lua_State *L) +static int _olua_fun_dragonBones_TimelineData_offset(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // unsigned int offset + return _olua_fun_dragonBones_TimelineData_offset$1(L); + } + + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // unsigned int offset + return _olua_fun_dragonBones_TimelineData_offset$2(L); + // } + } + + luaL_error(L, "method 'dragonBones::TimelineData::offset' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_dragonBones_TimelineData_setType(lua_State *L) +{ + olua_startinvoke(L); + + dragonBones::TimelineData *self = nullptr; + int arg1 = 0; /** value */ + + olua_to_object(L, 1, &self, "db.TimelineData"); + olua_check_integer(L, 2, &arg1); + + // void setType(int value) + self->setType(arg1); + + olua_endinvoke(L); + + return 0; +} + +static int _olua_fun_dragonBones_TimelineData_type$1(lua_State *L) { olua_startinvoke(L); @@ -2795,7 +3662,7 @@ static int _dragonBones_TimelineData_get_type(lua_State *L) return num_ret; } -static int _dragonBones_TimelineData_set_type(lua_State *L) +static int _olua_fun_dragonBones_TimelineData_type$2(lua_State *L) { olua_startinvoke(L); @@ -2813,25 +3680,54 @@ static int _dragonBones_TimelineData_set_type(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_dragonBones_TimelineData(lua_State *L) +static int _olua_fun_dragonBones_TimelineData_type(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // dragonBones::TimelineType type + return _olua_fun_dragonBones_TimelineData_type$1(L); + } + + if (num_args == 1) { + // if ((olua_is_enum(L, 2))) { + // dragonBones::TimelineType type + return _olua_fun_dragonBones_TimelineData_type$2(L); + // } + } + + luaL_error(L, "method 'dragonBones::TimelineData::type' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_cls_db_TimelineData(lua_State *L) { oluacls_class(L, "db.TimelineData"); - oluacls_func(L, "getType", _dragonBones_TimelineData_getType); - oluacls_func(L, "getTypeIndex", _dragonBones_TimelineData_getTypeIndex); - oluacls_func(L, "new", _dragonBones_TimelineData_new); - oluacls_func(L, "setType", _dragonBones_TimelineData_setType); - oluacls_prop(L, "type", _dragonBones_TimelineData_getType, _dragonBones_TimelineData_setType); - oluacls_prop(L, "typeIndex", _dragonBones_TimelineData_getTypeIndex, nullptr); - oluacls_prop(L, "frameIndicesOffset", _dragonBones_TimelineData_get_frameIndicesOffset, _dragonBones_TimelineData_set_frameIndicesOffset); - oluacls_prop(L, "offset", _dragonBones_TimelineData_get_offset, _dragonBones_TimelineData_set_offset); - oluacls_prop(L, "type", _dragonBones_TimelineData_get_type, _dragonBones_TimelineData_set_type); + oluacls_func(L, "getType", _olua_fun_dragonBones_TimelineData_getType); + oluacls_func(L, "getTypeIndex", _olua_fun_dragonBones_TimelineData_getTypeIndex); + oluacls_func(L, "new", _olua_fun_dragonBones_TimelineData_new); + oluacls_func(L, "setType", _olua_fun_dragonBones_TimelineData_setType); + oluacls_prop(L, "typeIndex", _olua_fun_dragonBones_TimelineData_getTypeIndex, nullptr); + oluacls_prop(L, "frameIndicesOffset", _olua_fun_dragonBones_TimelineData_frameIndicesOffset, _olua_fun_dragonBones_TimelineData_frameIndicesOffset); + oluacls_prop(L, "offset", _olua_fun_dragonBones_TimelineData_offset, _olua_fun_dragonBones_TimelineData_offset); + oluacls_prop(L, "type", _olua_fun_dragonBones_TimelineData_type, _olua_fun_dragonBones_TimelineData_type); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_db_TimelineData(lua_State *L) +{ + olua_require(L, "dragonbones", luaopen_dragonbones); + if (!olua_getclass(L, "db.TimelineData")) { + luaL_error(L, "class not found: dragonBones::TimelineData"); + } return 1; } OLUA_END_DECLS -static int _dragonBones_IAnimatable___gc(lua_State *L) +static int _olua_fun_dragonBones_IAnimatable___gc(lua_State *L) { olua_startinvoke(L); @@ -2843,7 +3739,7 @@ static int _dragonBones_IAnimatable___gc(lua_State *L) return 0; } -static int _dragonBones_IAnimatable___olua_move(lua_State *L) +static int _olua_fun_dragonBones_IAnimatable___olua_move(lua_State *L) { olua_startinvoke(L); @@ -2855,7 +3751,7 @@ static int _dragonBones_IAnimatable___olua_move(lua_State *L) return 1; } -static int _dragonBones_IAnimatable_advanceTime(lua_State *L) +static int _olua_fun_dragonBones_IAnimatable_advanceTime(lua_State *L) { olua_startinvoke(L); @@ -2873,7 +3769,7 @@ static int _dragonBones_IAnimatable_advanceTime(lua_State *L) return 0; } -static int _dragonBones_IAnimatable_getClock(lua_State *L) +static int _olua_fun_dragonBones_IAnimatable_getClock(lua_State *L) { olua_startinvoke(L); @@ -2890,7 +3786,7 @@ static int _dragonBones_IAnimatable_getClock(lua_State *L) return num_ret; } -static int _dragonBones_IAnimatable_setClock(lua_State *L) +static int _olua_fun_dragonBones_IAnimatable_setClock(lua_State *L) { olua_startinvoke(L); @@ -2908,22 +3804,31 @@ static int _dragonBones_IAnimatable_setClock(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_dragonBones_IAnimatable(lua_State *L) +static int _olua_cls_db_IAnimatable(lua_State *L) { oluacls_class(L, "db.IAnimatable"); - oluacls_func(L, "__gc", _dragonBones_IAnimatable___gc); - oluacls_func(L, "__olua_move", _dragonBones_IAnimatable___olua_move); - oluacls_func(L, "advanceTime", _dragonBones_IAnimatable_advanceTime); - oluacls_func(L, "getClock", _dragonBones_IAnimatable_getClock); - oluacls_func(L, "setClock", _dragonBones_IAnimatable_setClock); - oluacls_prop(L, "clock", _dragonBones_IAnimatable_getClock, _dragonBones_IAnimatable_setClock); + oluacls_func(L, "__gc", _olua_fun_dragonBones_IAnimatable___gc); + oluacls_func(L, "__olua_move", _olua_fun_dragonBones_IAnimatable___olua_move); + oluacls_func(L, "advanceTime", _olua_fun_dragonBones_IAnimatable_advanceTime); + oluacls_func(L, "getClock", _olua_fun_dragonBones_IAnimatable_getClock); + oluacls_func(L, "setClock", _olua_fun_dragonBones_IAnimatable_setClock); + oluacls_prop(L, "clock", _olua_fun_dragonBones_IAnimatable_getClock, _olua_fun_dragonBones_IAnimatable_setClock); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_db_IAnimatable(lua_State *L) +{ + olua_require(L, "dragonbones", luaopen_dragonbones); + if (!olua_getclass(L, "db.IAnimatable")) { + luaL_error(L, "class not found: dragonBones::IAnimatable"); + } return 1; } OLUA_END_DECLS -static int _dragonBones_WorldClock_add(lua_State *L) +static int _olua_fun_dragonBones_WorldClock_add(lua_State *L) { olua_startinvoke(L); @@ -2941,7 +3846,7 @@ static int _dragonBones_WorldClock_add(lua_State *L) return 0; } -static int _dragonBones_WorldClock_clear(lua_State *L) +static int _olua_fun_dragonBones_WorldClock_clear(lua_State *L) { olua_startinvoke(L); @@ -2957,7 +3862,57 @@ static int _dragonBones_WorldClock_clear(lua_State *L) return 0; } -static int _dragonBones_WorldClock_contains(lua_State *L) +static int _olua_fun_dragonBones_WorldClock_clock$1(lua_State *L) +{ + olua_startinvoke(L); + + // static dragonBones::WorldClock clock + dragonBones::WorldClock &ret = dragonBones::WorldClock::clock; + int num_ret = olua_copy_object(L, ret, "db.WorldClock"); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_dragonBones_WorldClock_clock$2(lua_State *L) +{ + olua_startinvoke(L); + + dragonBones::WorldClock *arg1; /** clock */ + + olua_check_object(L, 1, &arg1, "db.WorldClock"); + + // static dragonBones::WorldClock clock + dragonBones::WorldClock::clock = *arg1; + + olua_endinvoke(L); + + return 0; +} + +static int _olua_fun_dragonBones_WorldClock_clock(lua_State *L) +{ + int num_args = lua_gettop(L); + + if (num_args == 0) { + // static dragonBones::WorldClock clock + return _olua_fun_dragonBones_WorldClock_clock$1(L); + } + + if (num_args == 1) { + // if ((olua_is_object(L, 1, "db.WorldClock"))) { + // static dragonBones::WorldClock clock + return _olua_fun_dragonBones_WorldClock_clock$2(L); + // } + } + + luaL_error(L, "method 'dragonBones::WorldClock::clock' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_dragonBones_WorldClock_contains(lua_State *L) { olua_startinvoke(L); @@ -2976,7 +3931,7 @@ static int _dragonBones_WorldClock_contains(lua_State *L) return num_ret; } -static int _dragonBones_WorldClock_getStaticClock(lua_State *L) +static int _olua_fun_dragonBones_WorldClock_getStaticClock(lua_State *L) { olua_startinvoke(L); @@ -2989,7 +3944,7 @@ static int _dragonBones_WorldClock_getStaticClock(lua_State *L) return num_ret; } -static int _dragonBones_WorldClock_new$1(lua_State *L) +static int _olua_fun_dragonBones_WorldClock_new$1(lua_State *L) { olua_startinvoke(L); @@ -2997,7 +3952,7 @@ static int _dragonBones_WorldClock_new$1(lua_State *L) olua_check_number(L, 1, &arg1); - // WorldClock(@optional float timeValue) + // dragonBones::WorldClock(@optional float timeValue) dragonBones::WorldClock *ret = new dragonBones::WorldClock(arg1); int num_ret = olua_push_object(L, ret, "db.WorldClock"); olua_postnew(L, ret); @@ -3007,11 +3962,11 @@ static int _dragonBones_WorldClock_new$1(lua_State *L) return num_ret; } -static int _dragonBones_WorldClock_new$2(lua_State *L) +static int _olua_fun_dragonBones_WorldClock_new$2(lua_State *L) { olua_startinvoke(L); - // WorldClock(@optional float timeValue) + // dragonBones::WorldClock() dragonBones::WorldClock *ret = new dragonBones::WorldClock(); int num_ret = olua_push_object(L, ret, "db.WorldClock"); olua_postnew(L, ret); @@ -3021,19 +3976,19 @@ static int _dragonBones_WorldClock_new$2(lua_State *L) return num_ret; } -static int _dragonBones_WorldClock_new(lua_State *L) +static int _olua_fun_dragonBones_WorldClock_new(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 0) { - // WorldClock(@optional float timeValue) - return _dragonBones_WorldClock_new$2(L); + // dragonBones::WorldClock() + return _olua_fun_dragonBones_WorldClock_new$2(L); } if (num_args == 1) { // if ((olua_is_number(L, 1))) { - // WorldClock(@optional float timeValue) - return _dragonBones_WorldClock_new$1(L); + // dragonBones::WorldClock(@optional float timeValue) + return _olua_fun_dragonBones_WorldClock_new$1(L); // } } @@ -3042,7 +3997,7 @@ static int _dragonBones_WorldClock_new(lua_State *L) return 0; } -static int _dragonBones_WorldClock_remove(lua_State *L) +static int _olua_fun_dragonBones_WorldClock_remove(lua_State *L) { olua_startinvoke(L); @@ -3060,18 +4015,7 @@ static int _dragonBones_WorldClock_remove(lua_State *L) return 0; } -static int _dragonBones_WorldClock_get_clock(lua_State *L) -{ - olua_startinvoke(L); - - olua_pushobj(L, &dragonBones::WorldClock::clock); - - olua_endinvoke(L); - - return 1; -} - -static int _dragonBones_WorldClock_get_time(lua_State *L) +static int _olua_fun_dragonBones_WorldClock_time$1(lua_State *L) { olua_startinvoke(L); @@ -3088,7 +4032,7 @@ static int _dragonBones_WorldClock_get_time(lua_State *L) return num_ret; } -static int _dragonBones_WorldClock_set_time(lua_State *L) +static int _olua_fun_dragonBones_WorldClock_time$2(lua_State *L) { olua_startinvoke(L); @@ -3106,7 +4050,28 @@ static int _dragonBones_WorldClock_set_time(lua_State *L) return 0; } -static int _dragonBones_WorldClock_get_timeScale(lua_State *L) +static int _olua_fun_dragonBones_WorldClock_time(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float time + return _olua_fun_dragonBones_WorldClock_time$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float time + return _olua_fun_dragonBones_WorldClock_time$2(L); + // } + } + + luaL_error(L, "method 'dragonBones::WorldClock::time' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_dragonBones_WorldClock_timeScale$1(lua_State *L) { olua_startinvoke(L); @@ -3123,7 +4088,7 @@ static int _dragonBones_WorldClock_get_timeScale(lua_State *L) return num_ret; } -static int _dragonBones_WorldClock_set_timeScale(lua_State *L) +static int _olua_fun_dragonBones_WorldClock_timeScale$2(lua_State *L) { olua_startinvoke(L); @@ -3141,26 +4106,56 @@ static int _dragonBones_WorldClock_set_timeScale(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_dragonBones_WorldClock(lua_State *L) +static int _olua_fun_dragonBones_WorldClock_timeScale(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float timeScale + return _olua_fun_dragonBones_WorldClock_timeScale$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float timeScale + return _olua_fun_dragonBones_WorldClock_timeScale$2(L); + // } + } + + luaL_error(L, "method 'dragonBones::WorldClock::timeScale' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_cls_db_WorldClock(lua_State *L) { oluacls_class(L, "db.WorldClock"); - oluacls_func(L, "add", _dragonBones_WorldClock_add); - oluacls_func(L, "clear", _dragonBones_WorldClock_clear); - oluacls_func(L, "contains", _dragonBones_WorldClock_contains); - oluacls_func(L, "getStaticClock", _dragonBones_WorldClock_getStaticClock); - oluacls_func(L, "new", _dragonBones_WorldClock_new); - oluacls_func(L, "remove", _dragonBones_WorldClock_remove); - oluacls_prop(L, "clock", _dragonBones_WorldClock_get_clock, nullptr); - oluacls_prop(L, "staticClock", _dragonBones_WorldClock_getStaticClock, nullptr); - oluacls_prop(L, "time", _dragonBones_WorldClock_get_time, _dragonBones_WorldClock_set_time); - oluacls_prop(L, "timeScale", _dragonBones_WorldClock_get_timeScale, _dragonBones_WorldClock_set_timeScale); + oluacls_func(L, "add", _olua_fun_dragonBones_WorldClock_add); + oluacls_func(L, "clear", _olua_fun_dragonBones_WorldClock_clear); + oluacls_func(L, "contains", _olua_fun_dragonBones_WorldClock_contains); + oluacls_func(L, "getStaticClock", _olua_fun_dragonBones_WorldClock_getStaticClock); + oluacls_func(L, "new", _olua_fun_dragonBones_WorldClock_new); + oluacls_func(L, "remove", _olua_fun_dragonBones_WorldClock_remove); + oluacls_prop(L, "staticClock", _olua_fun_dragonBones_WorldClock_getStaticClock, nullptr); + oluacls_prop(L, "clock", _olua_fun_dragonBones_WorldClock_clock, _olua_fun_dragonBones_WorldClock_clock); + oluacls_prop(L, "time", _olua_fun_dragonBones_WorldClock_time, _olua_fun_dragonBones_WorldClock_time); + oluacls_prop(L, "timeScale", _olua_fun_dragonBones_WorldClock_timeScale, _olua_fun_dragonBones_WorldClock_timeScale); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_db_WorldClock(lua_State *L) +{ + olua_require(L, "dragonbones", luaopen_dragonbones); + if (!olua_getclass(L, "db.WorldClock")) { + luaL_error(L, "class not found: dragonBones::WorldClock"); + } return 1; } OLUA_END_DECLS -static int _dragonBones_Slot_containsPoint(lua_State *L) +static int _olua_fun_dragonBones_Slot_containsPoint(lua_State *L) { olua_startinvoke(L); @@ -3181,7 +4176,63 @@ static int _dragonBones_Slot_containsPoint(lua_State *L) return num_ret; } -static int _dragonBones_Slot_getBoundingBoxData(lua_State *L) +static int _olua_fun_dragonBones_Slot_displayController$1(lua_State *L) +{ + olua_startinvoke(L); + + dragonBones::Slot *self = nullptr; + + olua_to_object(L, 1, &self, "db.Slot"); + + // std::string displayController + std::string ret = self->displayController; + int num_ret = olua_push_string(L, ret); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_dragonBones_Slot_displayController$2(lua_State *L) +{ + olua_startinvoke(L); + + dragonBones::Slot *self = nullptr; + std::string arg1; /** displayController */ + + olua_to_object(L, 1, &self, "db.Slot"); + olua_check_string(L, 2, &arg1); + + // std::string displayController + self->displayController = arg1; + + olua_endinvoke(L); + + return 0; +} + +static int _olua_fun_dragonBones_Slot_displayController(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // std::string displayController + return _olua_fun_dragonBones_Slot_displayController$1(L); + } + + if (num_args == 1) { + // if ((olua_is_string(L, 2))) { + // std::string displayController + return _olua_fun_dragonBones_Slot_displayController$2(L); + // } + } + + luaL_error(L, "method 'dragonBones::Slot::displayController' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_dragonBones_Slot_getBoundingBoxData(lua_State *L) { olua_startinvoke(L); @@ -3198,7 +4249,7 @@ static int _dragonBones_Slot_getBoundingBoxData(lua_State *L) return num_ret; } -static int _dragonBones_Slot_getChildArmature(lua_State *L) +static int _olua_fun_dragonBones_Slot_getChildArmature(lua_State *L) { olua_startinvoke(L); @@ -3215,7 +4266,7 @@ static int _dragonBones_Slot_getChildArmature(lua_State *L) return num_ret; } -static int _dragonBones_Slot_getDisplay(lua_State *L) +static int _olua_fun_dragonBones_Slot_getDisplay(lua_State *L) { olua_startinvoke(L); @@ -3232,7 +4283,7 @@ static int _dragonBones_Slot_getDisplay(lua_State *L) return num_ret; } -static int _dragonBones_Slot_getDisplayIndex(lua_State *L) +static int _olua_fun_dragonBones_Slot_getDisplayIndex(lua_State *L) { olua_startinvoke(L); @@ -3249,7 +4300,7 @@ static int _dragonBones_Slot_getDisplayIndex(lua_State *L) return num_ret; } -static int _dragonBones_Slot_getMeshDisplay(lua_State *L) +static int _olua_fun_dragonBones_Slot_getMeshDisplay(lua_State *L) { olua_startinvoke(L); @@ -3266,7 +4317,7 @@ static int _dragonBones_Slot_getMeshDisplay(lua_State *L) return num_ret; } -static int _dragonBones_Slot_getName(lua_State *L) +static int _olua_fun_dragonBones_Slot_getName(lua_State *L) { olua_startinvoke(L); @@ -3283,7 +4334,7 @@ static int _dragonBones_Slot_getName(lua_State *L) return num_ret; } -static int _dragonBones_Slot_getParent(lua_State *L) +static int _olua_fun_dragonBones_Slot_getParent(lua_State *L) { olua_startinvoke(L); @@ -3300,7 +4351,7 @@ static int _dragonBones_Slot_getParent(lua_State *L) return num_ret; } -static int _dragonBones_Slot_getRawDisplay(lua_State *L) +static int _olua_fun_dragonBones_Slot_getRawDisplay(lua_State *L) { olua_startinvoke(L); @@ -3317,7 +4368,7 @@ static int _dragonBones_Slot_getRawDisplay(lua_State *L) return num_ret; } -static int _dragonBones_Slot_getSlotData(lua_State *L) +static int _olua_fun_dragonBones_Slot_getSlotData(lua_State *L) { olua_startinvoke(L); @@ -3334,7 +4385,7 @@ static int _dragonBones_Slot_getSlotData(lua_State *L) return num_ret; } -static int _dragonBones_Slot_getVisible(lua_State *L) +static int _olua_fun_dragonBones_Slot_getVisible(lua_State *L) { olua_startinvoke(L); @@ -3351,7 +4402,7 @@ static int _dragonBones_Slot_getVisible(lua_State *L) return num_ret; } -static int _dragonBones_Slot_init(lua_State *L) +static int _olua_fun_dragonBones_Slot_init(lua_State *L) { olua_startinvoke(L); @@ -3375,7 +4426,7 @@ static int _dragonBones_Slot_init(lua_State *L) return 0; } -static int _dragonBones_Slot_intersectsSegment$1(lua_State *L) +static int _olua_fun_dragonBones_Slot_intersectsSegment$1(lua_State *L) { olua_startinvoke(L); @@ -3406,7 +4457,7 @@ static int _dragonBones_Slot_intersectsSegment$1(lua_State *L) return num_ret; } -static int _dragonBones_Slot_intersectsSegment$2(lua_State *L) +static int _olua_fun_dragonBones_Slot_intersectsSegment$2(lua_State *L) { olua_startinvoke(L); @@ -3422,7 +4473,7 @@ static int _dragonBones_Slot_intersectsSegment$2(lua_State *L) olua_check_number(L, 4, &arg3); olua_check_number(L, 5, &arg4); - // int intersectsSegment(float xA, float yA, float xB, float yB, @optional dragonBones::Point *intersectionPointA, @optional dragonBones::Point *intersectionPointB, @optional dragonBones::Point *normalRadians) + // int intersectsSegment(float xA, float yA, float xB, float yB) int ret = self->intersectsSegment(arg1, arg2, arg3, arg4); int num_ret = olua_push_integer(L, ret); @@ -3431,7 +4482,7 @@ static int _dragonBones_Slot_intersectsSegment$2(lua_State *L) return num_ret; } -static int _dragonBones_Slot_intersectsSegment$3(lua_State *L) +static int _olua_fun_dragonBones_Slot_intersectsSegment$3(lua_State *L) { olua_startinvoke(L); @@ -3449,7 +4500,7 @@ static int _dragonBones_Slot_intersectsSegment$3(lua_State *L) olua_check_number(L, 5, &arg4); olua_check_object(L, 6, &arg5, "db.Point"); - // int intersectsSegment(float xA, float yA, float xB, float yB, @optional dragonBones::Point *intersectionPointA, @optional dragonBones::Point *intersectionPointB, @optional dragonBones::Point *normalRadians) + // int intersectsSegment(float xA, float yA, float xB, float yB, @optional dragonBones::Point *intersectionPointA) int ret = self->intersectsSegment(arg1, arg2, arg3, arg4, arg5); int num_ret = olua_push_integer(L, ret); @@ -3458,7 +4509,7 @@ static int _dragonBones_Slot_intersectsSegment$3(lua_State *L) return num_ret; } -static int _dragonBones_Slot_intersectsSegment$4(lua_State *L) +static int _olua_fun_dragonBones_Slot_intersectsSegment$4(lua_State *L) { olua_startinvoke(L); @@ -3478,7 +4529,7 @@ static int _dragonBones_Slot_intersectsSegment$4(lua_State *L) olua_check_object(L, 6, &arg5, "db.Point"); olua_check_object(L, 7, &arg6, "db.Point"); - // int intersectsSegment(float xA, float yA, float xB, float yB, @optional dragonBones::Point *intersectionPointA, @optional dragonBones::Point *intersectionPointB, @optional dragonBones::Point *normalRadians) + // int intersectsSegment(float xA, float yA, float xB, float yB, @optional dragonBones::Point *intersectionPointA, @optional dragonBones::Point *intersectionPointB) int ret = self->intersectsSegment(arg1, arg2, arg3, arg4, arg5, arg6); int num_ret = olua_push_integer(L, ret); @@ -3487,35 +4538,35 @@ static int _dragonBones_Slot_intersectsSegment$4(lua_State *L) return num_ret; } -static int _dragonBones_Slot_intersectsSegment(lua_State *L) +static int _olua_fun_dragonBones_Slot_intersectsSegment(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 4) { // if ((olua_is_number(L, 2)) && (olua_is_number(L, 3)) && (olua_is_number(L, 4)) && (olua_is_number(L, 5))) { - // int intersectsSegment(float xA, float yA, float xB, float yB, @optional dragonBones::Point *intersectionPointA, @optional dragonBones::Point *intersectionPointB, @optional dragonBones::Point *normalRadians) - return _dragonBones_Slot_intersectsSegment$2(L); + // int intersectsSegment(float xA, float yA, float xB, float yB) + return _olua_fun_dragonBones_Slot_intersectsSegment$2(L); // } } if (num_args == 5) { // if ((olua_is_number(L, 2)) && (olua_is_number(L, 3)) && (olua_is_number(L, 4)) && (olua_is_number(L, 5)) && (olua_is_object(L, 6, "db.Point"))) { - // int intersectsSegment(float xA, float yA, float xB, float yB, @optional dragonBones::Point *intersectionPointA, @optional dragonBones::Point *intersectionPointB, @optional dragonBones::Point *normalRadians) - return _dragonBones_Slot_intersectsSegment$3(L); + // int intersectsSegment(float xA, float yA, float xB, float yB, @optional dragonBones::Point *intersectionPointA) + return _olua_fun_dragonBones_Slot_intersectsSegment$3(L); // } } if (num_args == 6) { // if ((olua_is_number(L, 2)) && (olua_is_number(L, 3)) && (olua_is_number(L, 4)) && (olua_is_number(L, 5)) && (olua_is_object(L, 6, "db.Point")) && (olua_is_object(L, 7, "db.Point"))) { - // int intersectsSegment(float xA, float yA, float xB, float yB, @optional dragonBones::Point *intersectionPointA, @optional dragonBones::Point *intersectionPointB, @optional dragonBones::Point *normalRadians) - return _dragonBones_Slot_intersectsSegment$4(L); + // int intersectsSegment(float xA, float yA, float xB, float yB, @optional dragonBones::Point *intersectionPointA, @optional dragonBones::Point *intersectionPointB) + return _olua_fun_dragonBones_Slot_intersectsSegment$4(L); // } } if (num_args == 7) { // if ((olua_is_number(L, 2)) && (olua_is_number(L, 3)) && (olua_is_number(L, 4)) && (olua_is_number(L, 5)) && (olua_is_object(L, 6, "db.Point")) && (olua_is_object(L, 7, "db.Point")) && (olua_is_object(L, 8, "db.Point"))) { // int intersectsSegment(float xA, float yA, float xB, float yB, @optional dragonBones::Point *intersectionPointA, @optional dragonBones::Point *intersectionPointB, @optional dragonBones::Point *normalRadians) - return _dragonBones_Slot_intersectsSegment$1(L); + return _olua_fun_dragonBones_Slot_intersectsSegment$1(L); // } } @@ -3524,7 +4575,7 @@ static int _dragonBones_Slot_intersectsSegment(lua_State *L) return 0; } -static int _dragonBones_Slot_invalidUpdate(lua_State *L) +static int _olua_fun_dragonBones_Slot_invalidUpdate(lua_State *L) { olua_startinvoke(L); @@ -3540,7 +4591,7 @@ static int _dragonBones_Slot_invalidUpdate(lua_State *L) return 0; } -static int _dragonBones_Slot_replaceDisplayData(lua_State *L) +static int _olua_fun_dragonBones_Slot_replaceDisplayData(lua_State *L) { olua_startinvoke(L); @@ -3560,7 +4611,7 @@ static int _dragonBones_Slot_replaceDisplayData(lua_State *L) return 0; } -static int _dragonBones_Slot_setChildArmature(lua_State *L) +static int _olua_fun_dragonBones_Slot_setChildArmature(lua_State *L) { olua_startinvoke(L); @@ -3578,7 +4629,7 @@ static int _dragonBones_Slot_setChildArmature(lua_State *L) return 0; } -static int _dragonBones_Slot_setDisplay(lua_State *L) +static int _olua_fun_dragonBones_Slot_setDisplay(lua_State *L) { olua_startinvoke(L); @@ -3598,7 +4649,7 @@ static int _dragonBones_Slot_setDisplay(lua_State *L) return 0; } -static int _dragonBones_Slot_setDisplayIndex(lua_State *L) +static int _olua_fun_dragonBones_Slot_setDisplayIndex(lua_State *L) { olua_startinvoke(L); @@ -3616,7 +4667,7 @@ static int _dragonBones_Slot_setDisplayIndex(lua_State *L) return 0; } -static int _dragonBones_Slot_setVisible(lua_State *L) +static int _olua_fun_dragonBones_Slot_setVisible(lua_State *L) { olua_startinvoke(L); @@ -3634,7 +4685,7 @@ static int _dragonBones_Slot_setVisible(lua_State *L) return 0; } -static int _dragonBones_Slot_update(lua_State *L) +static int _olua_fun_dragonBones_Slot_update(lua_State *L) { olua_startinvoke(L); @@ -3652,7 +4703,7 @@ static int _dragonBones_Slot_update(lua_State *L) return 0; } -static int _dragonBones_Slot_updateTransformAndMatrix(lua_State *L) +static int _olua_fun_dragonBones_Slot_updateTransformAndMatrix(lua_State *L) { olua_startinvoke(L); @@ -3668,82 +4719,56 @@ static int _dragonBones_Slot_updateTransformAndMatrix(lua_State *L) return 0; } -static int _dragonBones_Slot_get_displayController(lua_State *L) -{ - olua_startinvoke(L); - - dragonBones::Slot *self = nullptr; - - olua_to_object(L, 1, &self, "db.Slot"); - - // std::string displayController - std::string ret = self->displayController; - int num_ret = olua_push_string(L, ret); - - olua_endinvoke(L); - - return num_ret; -} - -static int _dragonBones_Slot_set_displayController(lua_State *L) +static int _olua_cls_db_Slot(lua_State *L) { - olua_startinvoke(L); - - dragonBones::Slot *self = nullptr; - std::string arg1; /** displayController */ - - olua_to_object(L, 1, &self, "db.Slot"); - olua_check_string(L, 2, &arg1); - - // std::string displayController - self->displayController = arg1; - - olua_endinvoke(L); + oluacls_class(L, "db.Slot"); + oluacls_func(L, "containsPoint", _olua_fun_dragonBones_Slot_containsPoint); + oluacls_func(L, "getBoundingBoxData", _olua_fun_dragonBones_Slot_getBoundingBoxData); + oluacls_func(L, "getChildArmature", _olua_fun_dragonBones_Slot_getChildArmature); + oluacls_func(L, "getDisplay", _olua_fun_dragonBones_Slot_getDisplay); + oluacls_func(L, "getDisplayIndex", _olua_fun_dragonBones_Slot_getDisplayIndex); + oluacls_func(L, "getMeshDisplay", _olua_fun_dragonBones_Slot_getMeshDisplay); + oluacls_func(L, "getName", _olua_fun_dragonBones_Slot_getName); + oluacls_func(L, "getParent", _olua_fun_dragonBones_Slot_getParent); + oluacls_func(L, "getRawDisplay", _olua_fun_dragonBones_Slot_getRawDisplay); + oluacls_func(L, "getSlotData", _olua_fun_dragonBones_Slot_getSlotData); + oluacls_func(L, "getVisible", _olua_fun_dragonBones_Slot_getVisible); + oluacls_func(L, "init", _olua_fun_dragonBones_Slot_init); + oluacls_func(L, "intersectsSegment", _olua_fun_dragonBones_Slot_intersectsSegment); + oluacls_func(L, "invalidUpdate", _olua_fun_dragonBones_Slot_invalidUpdate); + oluacls_func(L, "replaceDisplayData", _olua_fun_dragonBones_Slot_replaceDisplayData); + oluacls_func(L, "setChildArmature", _olua_fun_dragonBones_Slot_setChildArmature); + oluacls_func(L, "setDisplay", _olua_fun_dragonBones_Slot_setDisplay); + oluacls_func(L, "setDisplayIndex", _olua_fun_dragonBones_Slot_setDisplayIndex); + oluacls_func(L, "setVisible", _olua_fun_dragonBones_Slot_setVisible); + oluacls_func(L, "update", _olua_fun_dragonBones_Slot_update); + oluacls_func(L, "updateTransformAndMatrix", _olua_fun_dragonBones_Slot_updateTransformAndMatrix); + oluacls_prop(L, "boundingBoxData", _olua_fun_dragonBones_Slot_getBoundingBoxData, nullptr); + oluacls_prop(L, "childArmature", _olua_fun_dragonBones_Slot_getChildArmature, _olua_fun_dragonBones_Slot_setChildArmature); + oluacls_prop(L, "displayIndex", _olua_fun_dragonBones_Slot_getDisplayIndex, _olua_fun_dragonBones_Slot_setDisplayIndex); + oluacls_prop(L, "meshDisplay", _olua_fun_dragonBones_Slot_getMeshDisplay, nullptr); + oluacls_prop(L, "name", _olua_fun_dragonBones_Slot_getName, nullptr); + oluacls_prop(L, "parent", _olua_fun_dragonBones_Slot_getParent, nullptr); + oluacls_prop(L, "rawDisplay", _olua_fun_dragonBones_Slot_getRawDisplay, nullptr); + oluacls_prop(L, "slotData", _olua_fun_dragonBones_Slot_getSlotData, nullptr); + oluacls_prop(L, "visible", _olua_fun_dragonBones_Slot_getVisible, _olua_fun_dragonBones_Slot_setVisible); + oluacls_prop(L, "displayController", _olua_fun_dragonBones_Slot_displayController, _olua_fun_dragonBones_Slot_displayController); - return 0; + return 1; } OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_dragonBones_Slot(lua_State *L) +OLUA_LIB int luaopen_db_Slot(lua_State *L) { - oluacls_class(L, "db.Slot"); - oluacls_func(L, "containsPoint", _dragonBones_Slot_containsPoint); - oluacls_func(L, "getBoundingBoxData", _dragonBones_Slot_getBoundingBoxData); - oluacls_func(L, "getChildArmature", _dragonBones_Slot_getChildArmature); - oluacls_func(L, "getDisplay", _dragonBones_Slot_getDisplay); - oluacls_func(L, "getDisplayIndex", _dragonBones_Slot_getDisplayIndex); - oluacls_func(L, "getMeshDisplay", _dragonBones_Slot_getMeshDisplay); - oluacls_func(L, "getName", _dragonBones_Slot_getName); - oluacls_func(L, "getParent", _dragonBones_Slot_getParent); - oluacls_func(L, "getRawDisplay", _dragonBones_Slot_getRawDisplay); - oluacls_func(L, "getSlotData", _dragonBones_Slot_getSlotData); - oluacls_func(L, "getVisible", _dragonBones_Slot_getVisible); - oluacls_func(L, "init", _dragonBones_Slot_init); - oluacls_func(L, "intersectsSegment", _dragonBones_Slot_intersectsSegment); - oluacls_func(L, "invalidUpdate", _dragonBones_Slot_invalidUpdate); - oluacls_func(L, "replaceDisplayData", _dragonBones_Slot_replaceDisplayData); - oluacls_func(L, "setChildArmature", _dragonBones_Slot_setChildArmature); - oluacls_func(L, "setDisplay", _dragonBones_Slot_setDisplay); - oluacls_func(L, "setDisplayIndex", _dragonBones_Slot_setDisplayIndex); - oluacls_func(L, "setVisible", _dragonBones_Slot_setVisible); - oluacls_func(L, "update", _dragonBones_Slot_update); - oluacls_func(L, "updateTransformAndMatrix", _dragonBones_Slot_updateTransformAndMatrix); - oluacls_prop(L, "boundingBoxData", _dragonBones_Slot_getBoundingBoxData, nullptr); - oluacls_prop(L, "childArmature", _dragonBones_Slot_getChildArmature, _dragonBones_Slot_setChildArmature); - oluacls_prop(L, "displayIndex", _dragonBones_Slot_getDisplayIndex, _dragonBones_Slot_setDisplayIndex); - oluacls_prop(L, "meshDisplay", _dragonBones_Slot_getMeshDisplay, nullptr); - oluacls_prop(L, "name", _dragonBones_Slot_getName, nullptr); - oluacls_prop(L, "parent", _dragonBones_Slot_getParent, nullptr); - oluacls_prop(L, "rawDisplay", _dragonBones_Slot_getRawDisplay, nullptr); - oluacls_prop(L, "slotData", _dragonBones_Slot_getSlotData, nullptr); - oluacls_prop(L, "visible", _dragonBones_Slot_getVisible, _dragonBones_Slot_setVisible); - oluacls_prop(L, "displayController", _dragonBones_Slot_get_displayController, _dragonBones_Slot_set_displayController); - + olua_require(L, "dragonbones", luaopen_dragonbones); + if (!olua_getclass(L, "db.Slot")) { + luaL_error(L, "class not found: dragonBones::Slot"); + } return 1; } OLUA_END_DECLS -static int _dragonBones_Bone_contains(lua_State *L) +static int _olua_fun_dragonBones_Bone_contains(lua_State *L) { olua_startinvoke(L); @@ -3762,7 +4787,7 @@ static int _dragonBones_Bone_contains(lua_State *L) return num_ret; } -static int _dragonBones_Bone_getBoneData(lua_State *L) +static int _olua_fun_dragonBones_Bone_getBoneData(lua_State *L) { olua_startinvoke(L); @@ -3779,7 +4804,7 @@ static int _dragonBones_Bone_getBoneData(lua_State *L) return num_ret; } -static int _dragonBones_Bone_getName(lua_State *L) +static int _olua_fun_dragonBones_Bone_getName(lua_State *L) { olua_startinvoke(L); @@ -3796,7 +4821,7 @@ static int _dragonBones_Bone_getName(lua_State *L) return num_ret; } -static int _dragonBones_Bone_getOffsetMode(lua_State *L) +static int _olua_fun_dragonBones_Bone_getOffsetMode(lua_State *L) { olua_startinvoke(L); @@ -3813,7 +4838,7 @@ static int _dragonBones_Bone_getOffsetMode(lua_State *L) return num_ret; } -static int _dragonBones_Bone_getParent(lua_State *L) +static int _olua_fun_dragonBones_Bone_getParent(lua_State *L) { olua_startinvoke(L); @@ -3830,7 +4855,7 @@ static int _dragonBones_Bone_getParent(lua_State *L) return num_ret; } -static int _dragonBones_Bone_getTypeIndex(lua_State *L) +static int _olua_fun_dragonBones_Bone_getTypeIndex(lua_State *L) { olua_startinvoke(L); @@ -3843,7 +4868,7 @@ static int _dragonBones_Bone_getTypeIndex(lua_State *L) return num_ret; } -static int _dragonBones_Bone_getVisible(lua_State *L) +static int _olua_fun_dragonBones_Bone_getVisible(lua_State *L) { olua_startinvoke(L); @@ -3860,7 +4885,7 @@ static int _dragonBones_Bone_getVisible(lua_State *L) return num_ret; } -static int _dragonBones_Bone_init(lua_State *L) +static int _olua_fun_dragonBones_Bone_init(lua_State *L) { olua_startinvoke(L); @@ -3880,7 +4905,7 @@ static int _dragonBones_Bone_init(lua_State *L) return 0; } -static int _dragonBones_Bone_invalidUpdate(lua_State *L) +static int _olua_fun_dragonBones_Bone_invalidUpdate(lua_State *L) { olua_startinvoke(L); @@ -3896,11 +4921,11 @@ static int _dragonBones_Bone_invalidUpdate(lua_State *L) return 0; } -static int _dragonBones_Bone_new(lua_State *L) +static int _olua_fun_dragonBones_Bone_new(lua_State *L) { olua_startinvoke(L); - // Bone() + // dragonBones::Bone() dragonBones::Bone *ret = new dragonBones::Bone(); int num_ret = olua_push_object(L, ret, "db.Bone"); olua_postnew(L, ret); @@ -3910,142 +4935,171 @@ static int _dragonBones_Bone_new(lua_State *L) return num_ret; } -static int _dragonBones_Bone_setOffsetMode(lua_State *L) +static int _olua_fun_dragonBones_Bone_offsetMode$1(lua_State *L) { olua_startinvoke(L); dragonBones::Bone *self = nullptr; - int arg1 = 0; /** value */ olua_to_object(L, 1, &self, "db.Bone"); - olua_check_integer(L, 2, &arg1); - // void setOffsetMode(int value) - self->setOffsetMode(arg1); + // dragonBones::OffsetMode offsetMode + dragonBones::OffsetMode ret = self->offsetMode; + int num_ret = olua_push_enum(L, ret); olua_endinvoke(L); - return 0; + return num_ret; } -static int _dragonBones_Bone_setVisible(lua_State *L) +static int _olua_fun_dragonBones_Bone_offsetMode$2(lua_State *L) { olua_startinvoke(L); dragonBones::Bone *self = nullptr; - bool arg1 = false; /** value */ + dragonBones::OffsetMode arg1 = (dragonBones::OffsetMode)0; /** offsetMode */ olua_to_object(L, 1, &self, "db.Bone"); - olua_check_bool(L, 2, &arg1); + olua_check_enum(L, 2, &arg1); - // void setVisible(bool value) - self->setVisible(arg1); + // dragonBones::OffsetMode offsetMode + self->offsetMode = arg1; olua_endinvoke(L); return 0; } -static int _dragonBones_Bone_update(lua_State *L) +static int _olua_fun_dragonBones_Bone_offsetMode(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // dragonBones::OffsetMode offsetMode + return _olua_fun_dragonBones_Bone_offsetMode$1(L); + } + + if (num_args == 1) { + // if ((olua_is_enum(L, 2))) { + // dragonBones::OffsetMode offsetMode + return _olua_fun_dragonBones_Bone_offsetMode$2(L); + // } + } + + luaL_error(L, "method 'dragonBones::Bone::offsetMode' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_dragonBones_Bone_setOffsetMode(lua_State *L) { olua_startinvoke(L); dragonBones::Bone *self = nullptr; - int arg1 = 0; /** cacheFrameIndex */ + int arg1 = 0; /** value */ olua_to_object(L, 1, &self, "db.Bone"); olua_check_integer(L, 2, &arg1); - // void update(int cacheFrameIndex) - self->update(arg1); + // void setOffsetMode(int value) + self->setOffsetMode(arg1); olua_endinvoke(L); return 0; } -static int _dragonBones_Bone_updateByConstraint(lua_State *L) +static int _olua_fun_dragonBones_Bone_setVisible(lua_State *L) { olua_startinvoke(L); dragonBones::Bone *self = nullptr; + bool arg1 = false; /** value */ olua_to_object(L, 1, &self, "db.Bone"); + olua_check_bool(L, 2, &arg1); - // void updateByConstraint() - self->updateByConstraint(); + // void setVisible(bool value) + self->setVisible(arg1); olua_endinvoke(L); return 0; } -static int _dragonBones_Bone_get_offsetMode(lua_State *L) +static int _olua_fun_dragonBones_Bone_update(lua_State *L) { olua_startinvoke(L); dragonBones::Bone *self = nullptr; + int arg1 = 0; /** cacheFrameIndex */ olua_to_object(L, 1, &self, "db.Bone"); + olua_check_integer(L, 2, &arg1); - // dragonBones::OffsetMode offsetMode - dragonBones::OffsetMode ret = self->offsetMode; - int num_ret = olua_push_enum(L, ret); + // void update(int cacheFrameIndex) + self->update(arg1); olua_endinvoke(L); - return num_ret; + return 0; } -static int _dragonBones_Bone_set_offsetMode(lua_State *L) +static int _olua_fun_dragonBones_Bone_updateByConstraint(lua_State *L) { olua_startinvoke(L); dragonBones::Bone *self = nullptr; - dragonBones::OffsetMode arg1 = (dragonBones::OffsetMode)0; /** offsetMode */ olua_to_object(L, 1, &self, "db.Bone"); - olua_check_enum(L, 2, &arg1); - // dragonBones::OffsetMode offsetMode - self->offsetMode = arg1; + // void updateByConstraint() + self->updateByConstraint(); olua_endinvoke(L); return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_dragonBones_Bone(lua_State *L) +static int _olua_cls_db_Bone(lua_State *L) { oluacls_class(L, "db.Bone"); - oluacls_func(L, "contains", _dragonBones_Bone_contains); - oluacls_func(L, "getBoneData", _dragonBones_Bone_getBoneData); - oluacls_func(L, "getName", _dragonBones_Bone_getName); - oluacls_func(L, "getOffsetMode", _dragonBones_Bone_getOffsetMode); - oluacls_func(L, "getParent", _dragonBones_Bone_getParent); - oluacls_func(L, "getTypeIndex", _dragonBones_Bone_getTypeIndex); - oluacls_func(L, "getVisible", _dragonBones_Bone_getVisible); - oluacls_func(L, "init", _dragonBones_Bone_init); - oluacls_func(L, "invalidUpdate", _dragonBones_Bone_invalidUpdate); - oluacls_func(L, "new", _dragonBones_Bone_new); - oluacls_func(L, "setOffsetMode", _dragonBones_Bone_setOffsetMode); - oluacls_func(L, "setVisible", _dragonBones_Bone_setVisible); - oluacls_func(L, "update", _dragonBones_Bone_update); - oluacls_func(L, "updateByConstraint", _dragonBones_Bone_updateByConstraint); - oluacls_prop(L, "boneData", _dragonBones_Bone_getBoneData, nullptr); - oluacls_prop(L, "name", _dragonBones_Bone_getName, nullptr); - oluacls_prop(L, "offsetMode", _dragonBones_Bone_getOffsetMode, _dragonBones_Bone_setOffsetMode); - oluacls_prop(L, "parent", _dragonBones_Bone_getParent, nullptr); - oluacls_prop(L, "typeIndex", _dragonBones_Bone_getTypeIndex, nullptr); - oluacls_prop(L, "visible", _dragonBones_Bone_getVisible, _dragonBones_Bone_setVisible); - oluacls_prop(L, "offsetMode", _dragonBones_Bone_get_offsetMode, _dragonBones_Bone_set_offsetMode); + oluacls_func(L, "contains", _olua_fun_dragonBones_Bone_contains); + oluacls_func(L, "getBoneData", _olua_fun_dragonBones_Bone_getBoneData); + oluacls_func(L, "getName", _olua_fun_dragonBones_Bone_getName); + oluacls_func(L, "getOffsetMode", _olua_fun_dragonBones_Bone_getOffsetMode); + oluacls_func(L, "getParent", _olua_fun_dragonBones_Bone_getParent); + oluacls_func(L, "getTypeIndex", _olua_fun_dragonBones_Bone_getTypeIndex); + oluacls_func(L, "getVisible", _olua_fun_dragonBones_Bone_getVisible); + oluacls_func(L, "init", _olua_fun_dragonBones_Bone_init); + oluacls_func(L, "invalidUpdate", _olua_fun_dragonBones_Bone_invalidUpdate); + oluacls_func(L, "new", _olua_fun_dragonBones_Bone_new); + oluacls_func(L, "setOffsetMode", _olua_fun_dragonBones_Bone_setOffsetMode); + oluacls_func(L, "setVisible", _olua_fun_dragonBones_Bone_setVisible); + oluacls_func(L, "update", _olua_fun_dragonBones_Bone_update); + oluacls_func(L, "updateByConstraint", _olua_fun_dragonBones_Bone_updateByConstraint); + oluacls_prop(L, "boneData", _olua_fun_dragonBones_Bone_getBoneData, nullptr); + oluacls_prop(L, "name", _olua_fun_dragonBones_Bone_getName, nullptr); + oluacls_prop(L, "parent", _olua_fun_dragonBones_Bone_getParent, nullptr); + oluacls_prop(L, "typeIndex", _olua_fun_dragonBones_Bone_getTypeIndex, nullptr); + oluacls_prop(L, "visible", _olua_fun_dragonBones_Bone_getVisible, _olua_fun_dragonBones_Bone_setVisible); + oluacls_prop(L, "offsetMode", _olua_fun_dragonBones_Bone_offsetMode, _olua_fun_dragonBones_Bone_offsetMode); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_db_Bone(lua_State *L) +{ + olua_require(L, "dragonbones", luaopen_dragonbones); + if (!olua_getclass(L, "db.Bone")) { + luaL_error(L, "class not found: dragonBones::Bone"); + } return 1; } OLUA_END_DECLS -static int _dragonBones_DisplayData_getParent(lua_State *L) +static int _olua_fun_dragonBones_DisplayData_getParent(lua_State *L) { olua_startinvoke(L); @@ -4062,7 +5116,7 @@ static int _dragonBones_DisplayData_getParent(lua_State *L) return num_ret; } -static int _dragonBones_DisplayData_getType(lua_State *L) +static int _olua_fun_dragonBones_DisplayData_getType(lua_State *L) { olua_startinvoke(L); @@ -4079,78 +5133,63 @@ static int _dragonBones_DisplayData_getType(lua_State *L) return num_ret; } -static int _dragonBones_DisplayData_setParent(lua_State *L) +static int _olua_fun_dragonBones_DisplayData_name$1(lua_State *L) { olua_startinvoke(L); dragonBones::DisplayData *self = nullptr; - dragonBones::SkinData *arg1 = nullptr; /** value */ olua_to_object(L, 1, &self, "db.DisplayData"); - olua_check_object(L, 2, &arg1, "db.SkinData"); - // void setParent(dragonBones::SkinData *value) - self->setParent(arg1); + // std::string name + std::string ret = self->name; + int num_ret = olua_push_string(L, ret); olua_endinvoke(L); - return 0; + return num_ret; } -static int _dragonBones_DisplayData_setType(lua_State *L) +static int _olua_fun_dragonBones_DisplayData_name$2(lua_State *L) { olua_startinvoke(L); dragonBones::DisplayData *self = nullptr; - int arg1 = 0; /** value */ + std::string arg1; /** name */ olua_to_object(L, 1, &self, "db.DisplayData"); - olua_check_integer(L, 2, &arg1); + olua_check_string(L, 2, &arg1); - // void setType(int value) - self->setType(arg1); + // std::string name + self->name = arg1; olua_endinvoke(L); return 0; } -static int _dragonBones_DisplayData_get_name(lua_State *L) +static int _olua_fun_dragonBones_DisplayData_name(lua_State *L) { - olua_startinvoke(L); + int num_args = lua_gettop(L) - 1; - dragonBones::DisplayData *self = nullptr; + if (num_args == 0) { + // std::string name + return _olua_fun_dragonBones_DisplayData_name$1(L); + } - olua_to_object(L, 1, &self, "db.DisplayData"); - - // std::string name - std::string ret = self->name; - int num_ret = olua_push_string(L, ret); - - olua_endinvoke(L); - - return num_ret; -} - -static int _dragonBones_DisplayData_set_name(lua_State *L) -{ - olua_startinvoke(L); - - dragonBones::DisplayData *self = nullptr; - std::string arg1; /** name */ - - olua_to_object(L, 1, &self, "db.DisplayData"); - olua_check_string(L, 2, &arg1); - - // std::string name - self->name = arg1; + if (num_args == 1) { + // if ((olua_is_string(L, 2))) { + // std::string name + return _olua_fun_dragonBones_DisplayData_name$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'dragonBones::DisplayData::name' not support '%d' arguments", num_args); return 0; } -static int _dragonBones_DisplayData_get_parent(lua_State *L) +static int _olua_fun_dragonBones_DisplayData_parent$1(lua_State *L) { olua_startinvoke(L); @@ -4167,7 +5206,7 @@ static int _dragonBones_DisplayData_get_parent(lua_State *L) return num_ret; } -static int _dragonBones_DisplayData_set_parent(lua_State *L) +static int _olua_fun_dragonBones_DisplayData_parent$2(lua_State *L) { olua_startinvoke(L); @@ -4185,7 +5224,28 @@ static int _dragonBones_DisplayData_set_parent(lua_State *L) return 0; } -static int _dragonBones_DisplayData_get_path(lua_State *L) +static int _olua_fun_dragonBones_DisplayData_parent(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // dragonBones::SkinData *parent + return _olua_fun_dragonBones_DisplayData_parent$1(L); + } + + if (num_args == 1) { + // if ((olua_is_object(L, 2, "db.SkinData"))) { + // dragonBones::SkinData *parent + return _olua_fun_dragonBones_DisplayData_parent$2(L); + // } + } + + luaL_error(L, "method 'dragonBones::DisplayData::parent' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_dragonBones_DisplayData_path$1(lua_State *L) { olua_startinvoke(L); @@ -4202,7 +5262,7 @@ static int _dragonBones_DisplayData_get_path(lua_State *L) return num_ret; } -static int _dragonBones_DisplayData_set_path(lua_State *L) +static int _olua_fun_dragonBones_DisplayData_path$2(lua_State *L) { olua_startinvoke(L); @@ -4220,112 +5280,146 @@ static int _dragonBones_DisplayData_set_path(lua_State *L) return 0; } -static int _dragonBones_DisplayData_get_type(lua_State *L) +static int _olua_fun_dragonBones_DisplayData_path(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // std::string path + return _olua_fun_dragonBones_DisplayData_path$1(L); + } + + if (num_args == 1) { + // if ((olua_is_string(L, 2))) { + // std::string path + return _olua_fun_dragonBones_DisplayData_path$2(L); + // } + } + + luaL_error(L, "method 'dragonBones::DisplayData::path' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_dragonBones_DisplayData_setParent(lua_State *L) { olua_startinvoke(L); dragonBones::DisplayData *self = nullptr; + dragonBones::SkinData *arg1 = nullptr; /** value */ olua_to_object(L, 1, &self, "db.DisplayData"); + olua_check_object(L, 2, &arg1, "db.SkinData"); - // dragonBones::DisplayType type - dragonBones::DisplayType ret = self->type; - int num_ret = olua_push_enum(L, ret); + // void setParent(dragonBones::SkinData *value) + self->setParent(arg1); olua_endinvoke(L); - return num_ret; + return 0; } -static int _dragonBones_DisplayData_set_type(lua_State *L) +static int _olua_fun_dragonBones_DisplayData_setType(lua_State *L) { olua_startinvoke(L); dragonBones::DisplayData *self = nullptr; - dragonBones::DisplayType arg1 = (dragonBones::DisplayType)0; /** type */ + int arg1 = 0; /** value */ olua_to_object(L, 1, &self, "db.DisplayData"); - olua_check_enum(L, 2, &arg1); + olua_check_integer(L, 2, &arg1); - // dragonBones::DisplayType type - self->type = arg1; + // void setType(int value) + self->setType(arg1); olua_endinvoke(L); return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_dragonBones_DisplayData(lua_State *L) -{ - oluacls_class(L, "db.DisplayData"); - oluacls_func(L, "getParent", _dragonBones_DisplayData_getParent); - oluacls_func(L, "getType", _dragonBones_DisplayData_getType); - oluacls_func(L, "setParent", _dragonBones_DisplayData_setParent); - oluacls_func(L, "setType", _dragonBones_DisplayData_setType); - oluacls_prop(L, "parent", _dragonBones_DisplayData_getParent, _dragonBones_DisplayData_setParent); - oluacls_prop(L, "type", _dragonBones_DisplayData_getType, _dragonBones_DisplayData_setType); - oluacls_prop(L, "name", _dragonBones_DisplayData_get_name, _dragonBones_DisplayData_set_name); - oluacls_prop(L, "parent", _dragonBones_DisplayData_get_parent, _dragonBones_DisplayData_set_parent); - oluacls_prop(L, "path", _dragonBones_DisplayData_get_path, _dragonBones_DisplayData_set_path); - oluacls_prop(L, "type", _dragonBones_DisplayData_get_type, _dragonBones_DisplayData_set_type); - - return 1; -} -OLUA_END_DECLS - -static int _dragonBones_ActionData_getBone(lua_State *L) +static int _olua_fun_dragonBones_DisplayData_type$1(lua_State *L) { olua_startinvoke(L); - dragonBones::ActionData *self = nullptr; + dragonBones::DisplayData *self = nullptr; - olua_to_object(L, 1, &self, "db.ActionData"); + olua_to_object(L, 1, &self, "db.DisplayData"); - // const dragonBones::BoneData *getBone() - const dragonBones::BoneData *ret = self->getBone(); - int num_ret = olua_push_object(L, ret, "db.BoneData"); + // dragonBones::DisplayType type + dragonBones::DisplayType ret = self->type; + int num_ret = olua_push_enum(L, ret); olua_endinvoke(L); return num_ret; } -static int _dragonBones_ActionData_getData(lua_State *L) +static int _olua_fun_dragonBones_DisplayData_type$2(lua_State *L) { olua_startinvoke(L); - dragonBones::ActionData *self = nullptr; + dragonBones::DisplayData *self = nullptr; + dragonBones::DisplayType arg1 = (dragonBones::DisplayType)0; /** type */ - olua_to_object(L, 1, &self, "db.ActionData"); + olua_to_object(L, 1, &self, "db.DisplayData"); + olua_check_enum(L, 2, &arg1); - // const dragonBones::UserData *getData() - const dragonBones::UserData *ret = self->getData(); - int num_ret = olua_push_object(L, ret, "db.UserData"); + // dragonBones::DisplayType type + self->type = arg1; olua_endinvoke(L); - return num_ret; + return 0; } -static int _dragonBones_ActionData_getSlot(lua_State *L) +static int _olua_fun_dragonBones_DisplayData_type(lua_State *L) { - olua_startinvoke(L); + int num_args = lua_gettop(L) - 1; - dragonBones::ActionData *self = nullptr; + if (num_args == 0) { + // dragonBones::DisplayType type + return _olua_fun_dragonBones_DisplayData_type$1(L); + } - olua_to_object(L, 1, &self, "db.ActionData"); + if (num_args == 1) { + // if ((olua_is_enum(L, 2))) { + // dragonBones::DisplayType type + return _olua_fun_dragonBones_DisplayData_type$2(L); + // } + } - // const dragonBones::SlotData *getSlot() - const dragonBones::SlotData *ret = self->getSlot(); - int num_ret = olua_push_object(L, ret, "db.SlotData"); + luaL_error(L, "method 'dragonBones::DisplayData::type' not support '%d' arguments", num_args); - olua_endinvoke(L); + return 0; +} - return num_ret; +static int _olua_cls_db_DisplayData(lua_State *L) +{ + oluacls_class(L, "db.DisplayData"); + oluacls_func(L, "getParent", _olua_fun_dragonBones_DisplayData_getParent); + oluacls_func(L, "getType", _olua_fun_dragonBones_DisplayData_getType); + oluacls_func(L, "setParent", _olua_fun_dragonBones_DisplayData_setParent); + oluacls_func(L, "setType", _olua_fun_dragonBones_DisplayData_setType); + oluacls_prop(L, "name", _olua_fun_dragonBones_DisplayData_name, _olua_fun_dragonBones_DisplayData_name); + oluacls_prop(L, "parent", _olua_fun_dragonBones_DisplayData_parent, _olua_fun_dragonBones_DisplayData_parent); + oluacls_prop(L, "path", _olua_fun_dragonBones_DisplayData_path, _olua_fun_dragonBones_DisplayData_path); + oluacls_prop(L, "type", _olua_fun_dragonBones_DisplayData_type, _olua_fun_dragonBones_DisplayData_type); + + return 1; +} + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_db_DisplayData(lua_State *L) +{ + olua_require(L, "dragonbones", luaopen_dragonbones); + if (!olua_getclass(L, "db.DisplayData")) { + luaL_error(L, "class not found: dragonBones::DisplayData"); + } + return 1; } +OLUA_END_DECLS -static int _dragonBones_ActionData_getType(lua_State *L) +static int _olua_fun_dragonBones_ActionData_bone$1(lua_State *L) { olua_startinvoke(L); @@ -4333,115 +5427,128 @@ static int _dragonBones_ActionData_getType(lua_State *L) olua_to_object(L, 1, &self, "db.ActionData"); - // int getType() - int ret = self->getType(); - int num_ret = olua_push_integer(L, ret); + // const dragonBones::BoneData *bone + const dragonBones::BoneData *ret = self->bone; + int num_ret = olua_push_object(L, ret, "db.BoneData"); olua_endinvoke(L); return num_ret; } -static int _dragonBones_ActionData_getTypeIndex(lua_State *L) +static int _olua_fun_dragonBones_ActionData_bone$2(lua_State *L) { olua_startinvoke(L); - // static std::size_t getTypeIndex() - std::size_t ret = dragonBones::ActionData::getTypeIndex(); - int num_ret = olua_push_integer(L, ret); + dragonBones::ActionData *self = nullptr; + dragonBones::BoneData *arg1 = nullptr; /** bone */ + + olua_to_object(L, 1, &self, "db.ActionData"); + olua_check_object(L, 2, &arg1, "db.BoneData"); + + // const dragonBones::BoneData *bone + self->bone = arg1; olua_endinvoke(L); - return num_ret; + return 0; } -static int _dragonBones_ActionData_new(lua_State *L) +static int _olua_fun_dragonBones_ActionData_bone(lua_State *L) { - olua_startinvoke(L); + int num_args = lua_gettop(L) - 1; - // ActionData() - dragonBones::ActionData *ret = new dragonBones::ActionData(); - int num_ret = olua_push_object(L, ret, "db.ActionData"); - olua_postnew(L, ret); + if (num_args == 0) { + // const dragonBones::BoneData *bone + return _olua_fun_dragonBones_ActionData_bone$1(L); + } - olua_endinvoke(L); + if (num_args == 1) { + // if ((olua_is_object(L, 2, "db.BoneData"))) { + // const dragonBones::BoneData *bone + return _olua_fun_dragonBones_ActionData_bone$2(L); + // } + } - return num_ret; + luaL_error(L, "method 'dragonBones::ActionData::bone' not support '%d' arguments", num_args); + + return 0; } -static int _dragonBones_ActionData_setBone(lua_State *L) +static int _olua_fun_dragonBones_ActionData_data$1(lua_State *L) { olua_startinvoke(L); dragonBones::ActionData *self = nullptr; - dragonBones::BoneData *arg1 = nullptr; /** value */ olua_to_object(L, 1, &self, "db.ActionData"); - olua_check_object(L, 2, &arg1, "db.BoneData"); - // void setBone(const dragonBones::BoneData *value) - self->setBone(arg1); + // dragonBones::UserData *data + dragonBones::UserData *ret = self->data; + int num_ret = olua_push_object(L, ret, "db.UserData"); olua_endinvoke(L); - return 0; + return num_ret; } -static int _dragonBones_ActionData_setData(lua_State *L) +static int _olua_fun_dragonBones_ActionData_data$2(lua_State *L) { olua_startinvoke(L); dragonBones::ActionData *self = nullptr; - dragonBones::UserData *arg1 = nullptr; /** value */ + dragonBones::UserData *arg1 = nullptr; /** data */ olua_to_object(L, 1, &self, "db.ActionData"); olua_check_object(L, 2, &arg1, "db.UserData"); - // void setData(dragonBones::UserData *value) - self->setData(arg1); + // dragonBones::UserData *data + self->data = arg1; olua_endinvoke(L); return 0; } -static int _dragonBones_ActionData_setSlot(lua_State *L) +static int _olua_fun_dragonBones_ActionData_data(lua_State *L) { - olua_startinvoke(L); - - dragonBones::ActionData *self = nullptr; - dragonBones::SlotData *arg1 = nullptr; /** value */ + int num_args = lua_gettop(L) - 1; - olua_to_object(L, 1, &self, "db.ActionData"); - olua_check_object(L, 2, &arg1, "db.SlotData"); + if (num_args == 0) { + // dragonBones::UserData *data + return _olua_fun_dragonBones_ActionData_data$1(L); + } - // void setSlot(const dragonBones::SlotData *value) - self->setSlot(arg1); + if (num_args == 1) { + // if ((olua_is_object(L, 2, "db.UserData"))) { + // dragonBones::UserData *data + return _olua_fun_dragonBones_ActionData_data$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'dragonBones::ActionData::data' not support '%d' arguments", num_args); return 0; } -static int _dragonBones_ActionData_setType(lua_State *L) +static int _olua_fun_dragonBones_ActionData_getBone(lua_State *L) { olua_startinvoke(L); dragonBones::ActionData *self = nullptr; - int arg1 = 0; /** value */ olua_to_object(L, 1, &self, "db.ActionData"); - olua_check_integer(L, 2, &arg1); - // void setType(int value) - self->setType(arg1); + // const dragonBones::BoneData *getBone() + const dragonBones::BoneData *ret = self->getBone(); + int num_ret = olua_push_object(L, ret, "db.BoneData"); olua_endinvoke(L); - return 0; + return num_ret; } -static int _dragonBones_ActionData_get_bone(lua_State *L) +static int _olua_fun_dragonBones_ActionData_getData(lua_State *L) { olua_startinvoke(L); @@ -4449,34 +5556,33 @@ static int _dragonBones_ActionData_get_bone(lua_State *L) olua_to_object(L, 1, &self, "db.ActionData"); - // const dragonBones::BoneData *bone - const dragonBones::BoneData *ret = self->bone; - int num_ret = olua_push_object(L, ret, "db.BoneData"); + // const dragonBones::UserData *getData() + const dragonBones::UserData *ret = self->getData(); + int num_ret = olua_push_object(L, ret, "db.UserData"); olua_endinvoke(L); return num_ret; } -static int _dragonBones_ActionData_set_bone(lua_State *L) +static int _olua_fun_dragonBones_ActionData_getSlot(lua_State *L) { olua_startinvoke(L); dragonBones::ActionData *self = nullptr; - dragonBones::BoneData *arg1 = nullptr; /** bone */ olua_to_object(L, 1, &self, "db.ActionData"); - olua_check_object(L, 2, &arg1, "db.BoneData"); - // const dragonBones::BoneData *bone - self->bone = arg1; + // const dragonBones::SlotData *getSlot() + const dragonBones::SlotData *ret = self->getSlot(); + int num_ret = olua_push_object(L, ret, "db.SlotData"); olua_endinvoke(L); - return 0; + return num_ret; } -static int _dragonBones_ActionData_get_data(lua_State *L) +static int _olua_fun_dragonBones_ActionData_getType(lua_State *L) { olua_startinvoke(L); @@ -4484,34 +5590,29 @@ static int _dragonBones_ActionData_get_data(lua_State *L) olua_to_object(L, 1, &self, "db.ActionData"); - // dragonBones::UserData *data - dragonBones::UserData *ret = self->data; - int num_ret = olua_push_object(L, ret, "db.UserData"); + // int getType() + int ret = self->getType(); + int num_ret = olua_push_integer(L, ret); olua_endinvoke(L); return num_ret; } -static int _dragonBones_ActionData_set_data(lua_State *L) +static int _olua_fun_dragonBones_ActionData_getTypeIndex(lua_State *L) { olua_startinvoke(L); - dragonBones::ActionData *self = nullptr; - dragonBones::UserData *arg1 = nullptr; /** data */ - - olua_to_object(L, 1, &self, "db.ActionData"); - olua_check_object(L, 2, &arg1, "db.UserData"); - - // dragonBones::UserData *data - self->data = arg1; + // static std::size_t getTypeIndex() + std::size_t ret = dragonBones::ActionData::getTypeIndex(); + int num_ret = olua_push_integer(L, ret); olua_endinvoke(L); - return 0; + return num_ret; } -static int _dragonBones_ActionData_get_name(lua_State *L) +static int _olua_fun_dragonBones_ActionData_name$1(lua_State *L) { olua_startinvoke(L); @@ -4528,7 +5629,7 @@ static int _dragonBones_ActionData_get_name(lua_State *L) return num_ret; } -static int _dragonBones_ActionData_set_name(lua_State *L) +static int _olua_fun_dragonBones_ActionData_name$2(lua_State *L) { olua_startinvoke(L); @@ -4546,30 +5647,137 @@ static int _dragonBones_ActionData_set_name(lua_State *L) return 0; } -static int _dragonBones_ActionData_get_slot(lua_State *L) +static int _olua_fun_dragonBones_ActionData_name(lua_State *L) { - olua_startinvoke(L); - - dragonBones::ActionData *self = nullptr; + int num_args = lua_gettop(L) - 1; - olua_to_object(L, 1, &self, "db.ActionData"); + if (num_args == 0) { + // std::string name + return _olua_fun_dragonBones_ActionData_name$1(L); + } - // const dragonBones::SlotData *slot - const dragonBones::SlotData *ret = self->slot; - int num_ret = olua_push_object(L, ret, "db.SlotData"); + if (num_args == 1) { + // if ((olua_is_string(L, 2))) { + // std::string name + return _olua_fun_dragonBones_ActionData_name$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'dragonBones::ActionData::name' not support '%d' arguments", num_args); - return num_ret; + return 0; } -static int _dragonBones_ActionData_set_slot(lua_State *L) +static int _olua_fun_dragonBones_ActionData_new(lua_State *L) { olua_startinvoke(L); - dragonBones::ActionData *self = nullptr; - dragonBones::SlotData *arg1 = nullptr; /** slot */ - + // dragonBones::ActionData() + dragonBones::ActionData *ret = new dragonBones::ActionData(); + int num_ret = olua_push_object(L, ret, "db.ActionData"); + olua_postnew(L, ret); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_dragonBones_ActionData_setBone(lua_State *L) +{ + olua_startinvoke(L); + + dragonBones::ActionData *self = nullptr; + dragonBones::BoneData *arg1 = nullptr; /** value */ + + olua_to_object(L, 1, &self, "db.ActionData"); + olua_check_object(L, 2, &arg1, "db.BoneData"); + + // void setBone(const dragonBones::BoneData *value) + self->setBone(arg1); + + olua_endinvoke(L); + + return 0; +} + +static int _olua_fun_dragonBones_ActionData_setData(lua_State *L) +{ + olua_startinvoke(L); + + dragonBones::ActionData *self = nullptr; + dragonBones::UserData *arg1 = nullptr; /** value */ + + olua_to_object(L, 1, &self, "db.ActionData"); + olua_check_object(L, 2, &arg1, "db.UserData"); + + // void setData(dragonBones::UserData *value) + self->setData(arg1); + + olua_endinvoke(L); + + return 0; +} + +static int _olua_fun_dragonBones_ActionData_setSlot(lua_State *L) +{ + olua_startinvoke(L); + + dragonBones::ActionData *self = nullptr; + dragonBones::SlotData *arg1 = nullptr; /** value */ + + olua_to_object(L, 1, &self, "db.ActionData"); + olua_check_object(L, 2, &arg1, "db.SlotData"); + + // void setSlot(const dragonBones::SlotData *value) + self->setSlot(arg1); + + olua_endinvoke(L); + + return 0; +} + +static int _olua_fun_dragonBones_ActionData_setType(lua_State *L) +{ + olua_startinvoke(L); + + dragonBones::ActionData *self = nullptr; + int arg1 = 0; /** value */ + + olua_to_object(L, 1, &self, "db.ActionData"); + olua_check_integer(L, 2, &arg1); + + // void setType(int value) + self->setType(arg1); + + olua_endinvoke(L); + + return 0; +} + +static int _olua_fun_dragonBones_ActionData_slot$1(lua_State *L) +{ + olua_startinvoke(L); + + dragonBones::ActionData *self = nullptr; + + olua_to_object(L, 1, &self, "db.ActionData"); + + // const dragonBones::SlotData *slot + const dragonBones::SlotData *ret = self->slot; + int num_ret = olua_push_object(L, ret, "db.SlotData"); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_dragonBones_ActionData_slot$2(lua_State *L) +{ + olua_startinvoke(L); + + dragonBones::ActionData *self = nullptr; + dragonBones::SlotData *arg1 = nullptr; /** slot */ + olua_to_object(L, 1, &self, "db.ActionData"); olua_check_object(L, 2, &arg1, "db.SlotData"); @@ -4581,7 +5789,28 @@ static int _dragonBones_ActionData_set_slot(lua_State *L) return 0; } -static int _dragonBones_ActionData_get_type(lua_State *L) +static int _olua_fun_dragonBones_ActionData_slot(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // const dragonBones::SlotData *slot + return _olua_fun_dragonBones_ActionData_slot$1(L); + } + + if (num_args == 1) { + // if ((olua_is_object(L, 2, "db.SlotData"))) { + // const dragonBones::SlotData *slot + return _olua_fun_dragonBones_ActionData_slot$2(L); + // } + } + + luaL_error(L, "method 'dragonBones::ActionData::slot' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_dragonBones_ActionData_type$1(lua_State *L) { olua_startinvoke(L); @@ -4598,7 +5827,7 @@ static int _dragonBones_ActionData_get_type(lua_State *L) return num_ret; } -static int _dragonBones_ActionData_set_type(lua_State *L) +static int _olua_fun_dragonBones_ActionData_type$2(lua_State *L) { olua_startinvoke(L); @@ -4616,36 +5845,62 @@ static int _dragonBones_ActionData_set_type(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_dragonBones_ActionData(lua_State *L) +static int _olua_fun_dragonBones_ActionData_type(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // dragonBones::ActionType type + return _olua_fun_dragonBones_ActionData_type$1(L); + } + + if (num_args == 1) { + // if ((olua_is_enum(L, 2))) { + // dragonBones::ActionType type + return _olua_fun_dragonBones_ActionData_type$2(L); + // } + } + + luaL_error(L, "method 'dragonBones::ActionData::type' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_cls_db_ActionData(lua_State *L) { oluacls_class(L, "db.ActionData"); - oluacls_func(L, "getBone", _dragonBones_ActionData_getBone); - oluacls_func(L, "getData", _dragonBones_ActionData_getData); - oluacls_func(L, "getSlot", _dragonBones_ActionData_getSlot); - oluacls_func(L, "getType", _dragonBones_ActionData_getType); - oluacls_func(L, "getTypeIndex", _dragonBones_ActionData_getTypeIndex); - oluacls_func(L, "new", _dragonBones_ActionData_new); - oluacls_func(L, "setBone", _dragonBones_ActionData_setBone); - oluacls_func(L, "setData", _dragonBones_ActionData_setData); - oluacls_func(L, "setSlot", _dragonBones_ActionData_setSlot); - oluacls_func(L, "setType", _dragonBones_ActionData_setType); - oluacls_prop(L, "bone", _dragonBones_ActionData_getBone, _dragonBones_ActionData_setBone); - oluacls_prop(L, "data", _dragonBones_ActionData_getData, _dragonBones_ActionData_setData); - oluacls_prop(L, "slot", _dragonBones_ActionData_getSlot, _dragonBones_ActionData_setSlot); - oluacls_prop(L, "type", _dragonBones_ActionData_getType, _dragonBones_ActionData_setType); - oluacls_prop(L, "typeIndex", _dragonBones_ActionData_getTypeIndex, nullptr); - oluacls_prop(L, "bone", _dragonBones_ActionData_get_bone, _dragonBones_ActionData_set_bone); - oluacls_prop(L, "data", _dragonBones_ActionData_get_data, _dragonBones_ActionData_set_data); - oluacls_prop(L, "name", _dragonBones_ActionData_get_name, _dragonBones_ActionData_set_name); - oluacls_prop(L, "slot", _dragonBones_ActionData_get_slot, _dragonBones_ActionData_set_slot); - oluacls_prop(L, "type", _dragonBones_ActionData_get_type, _dragonBones_ActionData_set_type); + oluacls_func(L, "getBone", _olua_fun_dragonBones_ActionData_getBone); + oluacls_func(L, "getData", _olua_fun_dragonBones_ActionData_getData); + oluacls_func(L, "getSlot", _olua_fun_dragonBones_ActionData_getSlot); + oluacls_func(L, "getType", _olua_fun_dragonBones_ActionData_getType); + oluacls_func(L, "getTypeIndex", _olua_fun_dragonBones_ActionData_getTypeIndex); + oluacls_func(L, "new", _olua_fun_dragonBones_ActionData_new); + oluacls_func(L, "setBone", _olua_fun_dragonBones_ActionData_setBone); + oluacls_func(L, "setData", _olua_fun_dragonBones_ActionData_setData); + oluacls_func(L, "setSlot", _olua_fun_dragonBones_ActionData_setSlot); + oluacls_func(L, "setType", _olua_fun_dragonBones_ActionData_setType); + oluacls_prop(L, "typeIndex", _olua_fun_dragonBones_ActionData_getTypeIndex, nullptr); + oluacls_prop(L, "bone", _olua_fun_dragonBones_ActionData_bone, _olua_fun_dragonBones_ActionData_bone); + oluacls_prop(L, "data", _olua_fun_dragonBones_ActionData_data, _olua_fun_dragonBones_ActionData_data); + oluacls_prop(L, "name", _olua_fun_dragonBones_ActionData_name, _olua_fun_dragonBones_ActionData_name); + oluacls_prop(L, "slot", _olua_fun_dragonBones_ActionData_slot, _olua_fun_dragonBones_ActionData_slot); + oluacls_prop(L, "type", _olua_fun_dragonBones_ActionData_type, _olua_fun_dragonBones_ActionData_type); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_db_ActionData(lua_State *L) +{ + olua_require(L, "dragonbones", luaopen_dragonbones); + if (!olua_getclass(L, "db.ActionData")) { + luaL_error(L, "class not found: dragonBones::ActionData"); + } + return 1; +} OLUA_END_DECLS -static int _dragonBones_UserData_addFloat(lua_State *L) +static int _olua_fun_dragonBones_UserData_addFloat(lua_State *L) { olua_startinvoke(L); @@ -4663,7 +5918,7 @@ static int _dragonBones_UserData_addFloat(lua_State *L) return 0; } -static int _dragonBones_UserData_addInt(lua_State *L) +static int _olua_fun_dragonBones_UserData_addInt(lua_State *L) { olua_startinvoke(L); @@ -4681,7 +5936,7 @@ static int _dragonBones_UserData_addInt(lua_State *L) return 0; } -static int _dragonBones_UserData_addString(lua_State *L) +static int _olua_fun_dragonBones_UserData_addString(lua_State *L) { olua_startinvoke(L); @@ -4699,7 +5954,67 @@ static int _dragonBones_UserData_addString(lua_State *L) return 0; } -static int _dragonBones_UserData_getFloat(lua_State *L) +static int _olua_fun_dragonBones_UserData_floats$1(lua_State *L) +{ + olua_startinvoke(L); + + dragonBones::UserData *self = nullptr; + + olua_to_object(L, 1, &self, "db.UserData"); + + // std::vector floats + std::vector &ret = self->floats; + int num_ret = olua_push_array(L, ret, [L](float &arg1) { + olua_push_number(L, arg1); + }); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_dragonBones_UserData_floats$2(lua_State *L) +{ + olua_startinvoke(L); + + dragonBones::UserData *self = nullptr; + std::vector arg1; /** floats */ + + olua_to_object(L, 1, &self, "db.UserData"); + olua_check_array(L, 2, arg1, [L](float *arg1) { + olua_check_number(L, -1, arg1); + }); + + // std::vector floats + self->floats = arg1; + + olua_endinvoke(L); + + return 0; +} + +static int _olua_fun_dragonBones_UserData_floats(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // std::vector floats + return _olua_fun_dragonBones_UserData_floats$1(L); + } + + if (num_args == 1) { + // if ((olua_is_array(L, 2))) { + // std::vector floats + return _olua_fun_dragonBones_UserData_floats$2(L); + // } + } + + luaL_error(L, "method 'dragonBones::UserData::floats' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_dragonBones_UserData_getFloat(lua_State *L) { olua_startinvoke(L); @@ -4718,7 +6033,7 @@ static int _dragonBones_UserData_getFloat(lua_State *L) return num_ret; } -static int _dragonBones_UserData_getFloats(lua_State *L) +static int _olua_fun_dragonBones_UserData_getFloats(lua_State *L) { olua_startinvoke(L); @@ -4737,7 +6052,7 @@ static int _dragonBones_UserData_getFloats(lua_State *L) return num_ret; } -static int _dragonBones_UserData_getInt(lua_State *L) +static int _olua_fun_dragonBones_UserData_getInt(lua_State *L) { olua_startinvoke(L); @@ -4756,7 +6071,7 @@ static int _dragonBones_UserData_getInt(lua_State *L) return num_ret; } -static int _dragonBones_UserData_getInts(lua_State *L) +static int _olua_fun_dragonBones_UserData_getInts(lua_State *L) { olua_startinvoke(L); @@ -4775,7 +6090,7 @@ static int _dragonBones_UserData_getInts(lua_State *L) return num_ret; } -static int _dragonBones_UserData_getString(lua_State *L) +static int _olua_fun_dragonBones_UserData_getString(lua_State *L) { olua_startinvoke(L); @@ -4794,7 +6109,7 @@ static int _dragonBones_UserData_getString(lua_State *L) return num_ret; } -static int _dragonBones_UserData_getStrings(lua_State *L) +static int _olua_fun_dragonBones_UserData_getStrings(lua_State *L) { olua_startinvoke(L); @@ -4813,7 +6128,7 @@ static int _dragonBones_UserData_getStrings(lua_State *L) return num_ret; } -static int _dragonBones_UserData_getTypeIndex(lua_State *L) +static int _olua_fun_dragonBones_UserData_getTypeIndex(lua_State *L) { olua_startinvoke(L); @@ -4826,21 +6141,7 @@ static int _dragonBones_UserData_getTypeIndex(lua_State *L) return num_ret; } -static int _dragonBones_UserData_new(lua_State *L) -{ - olua_startinvoke(L); - - // UserData() - dragonBones::UserData *ret = new dragonBones::UserData(); - int num_ret = olua_push_object(L, ret, "db.UserData"); - olua_postnew(L, ret); - - olua_endinvoke(L); - - return num_ret; -} - -static int _dragonBones_UserData_get_floats(lua_State *L) +static int _olua_fun_dragonBones_UserData_ints$1(lua_State *L) { olua_startinvoke(L); @@ -4848,10 +6149,10 @@ static int _dragonBones_UserData_get_floats(lua_State *L) olua_to_object(L, 1, &self, "db.UserData"); - // std::vector floats - std::vector &ret = self->floats; - int num_ret = olua_push_array(L, ret, [L](float &arg1) { - olua_push_number(L, arg1); + // std::vector ints + std::vector &ret = self->ints; + int num_ret = olua_push_array(L, ret, [L](int &arg1) { + olua_push_integer(L, arg1); }); olua_endinvoke(L); @@ -4859,66 +6160,62 @@ static int _dragonBones_UserData_get_floats(lua_State *L) return num_ret; } -static int _dragonBones_UserData_set_floats(lua_State *L) +static int _olua_fun_dragonBones_UserData_ints$2(lua_State *L) { olua_startinvoke(L); dragonBones::UserData *self = nullptr; - std::vector arg1; /** floats */ + std::vector arg1; /** ints */ olua_to_object(L, 1, &self, "db.UserData"); - olua_check_array(L, 2, arg1, [L](float *arg1) { - olua_check_number(L, -1, arg1); + olua_check_array(L, 2, arg1, [L](int *arg1) { + olua_check_integer(L, -1, arg1); }); - // std::vector floats - self->floats = arg1; + // std::vector ints + self->ints = arg1; olua_endinvoke(L); return 0; } -static int _dragonBones_UserData_get_ints(lua_State *L) +static int _olua_fun_dragonBones_UserData_ints(lua_State *L) { - olua_startinvoke(L); - - dragonBones::UserData *self = nullptr; + int num_args = lua_gettop(L) - 1; - olua_to_object(L, 1, &self, "db.UserData"); + if (num_args == 0) { + // std::vector ints + return _olua_fun_dragonBones_UserData_ints$1(L); + } - // std::vector ints - std::vector &ret = self->ints; - int num_ret = olua_push_array(L, ret, [L](int &arg1) { - olua_push_integer(L, arg1); - }); + if (num_args == 1) { + // if ((olua_is_array(L, 2))) { + // std::vector ints + return _olua_fun_dragonBones_UserData_ints$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'dragonBones::UserData::ints' not support '%d' arguments", num_args); - return num_ret; + return 0; } -static int _dragonBones_UserData_set_ints(lua_State *L) +static int _olua_fun_dragonBones_UserData_new(lua_State *L) { olua_startinvoke(L); - dragonBones::UserData *self = nullptr; - std::vector arg1; /** ints */ - - olua_to_object(L, 1, &self, "db.UserData"); - olua_check_array(L, 2, arg1, [L](int *arg1) { - olua_check_integer(L, -1, arg1); - }); - - // std::vector ints - self->ints = arg1; + // dragonBones::UserData() + dragonBones::UserData *ret = new dragonBones::UserData(); + int num_ret = olua_push_object(L, ret, "db.UserData"); + olua_postnew(L, ret); olua_endinvoke(L); - return 0; + return num_ret; } -static int _dragonBones_UserData_get_strings(lua_State *L) +static int _olua_fun_dragonBones_UserData_strings$1(lua_State *L) { olua_startinvoke(L); @@ -4937,7 +6234,7 @@ static int _dragonBones_UserData_get_strings(lua_State *L) return num_ret; } -static int _dragonBones_UserData_set_strings(lua_State *L) +static int _olua_fun_dragonBones_UserData_strings$2(lua_State *L) { olua_startinvoke(L); @@ -4957,34 +6254,117 @@ static int _dragonBones_UserData_set_strings(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_dragonBones_UserData(lua_State *L) +static int _olua_fun_dragonBones_UserData_strings(lua_State *L) { - oluacls_class(L, "db.UserData"); - oluacls_func(L, "addFloat", _dragonBones_UserData_addFloat); - oluacls_func(L, "addInt", _dragonBones_UserData_addInt); - oluacls_func(L, "addString", _dragonBones_UserData_addString); - oluacls_func(L, "getFloat", _dragonBones_UserData_getFloat); - oluacls_func(L, "getFloats", _dragonBones_UserData_getFloats); - oluacls_func(L, "getInt", _dragonBones_UserData_getInt); - oluacls_func(L, "getInts", _dragonBones_UserData_getInts); - oluacls_func(L, "getString", _dragonBones_UserData_getString); - oluacls_func(L, "getStrings", _dragonBones_UserData_getStrings); - oluacls_func(L, "getTypeIndex", _dragonBones_UserData_getTypeIndex); - oluacls_func(L, "new", _dragonBones_UserData_new); - oluacls_prop(L, "floats", _dragonBones_UserData_getFloats, nullptr); - oluacls_prop(L, "ints", _dragonBones_UserData_getInts, nullptr); - oluacls_prop(L, "strings", _dragonBones_UserData_getStrings, nullptr); - oluacls_prop(L, "typeIndex", _dragonBones_UserData_getTypeIndex, nullptr); - oluacls_prop(L, "floats", _dragonBones_UserData_get_floats, _dragonBones_UserData_set_floats); - oluacls_prop(L, "ints", _dragonBones_UserData_get_ints, _dragonBones_UserData_set_ints); - oluacls_prop(L, "strings", _dragonBones_UserData_get_strings, _dragonBones_UserData_set_strings); + int num_args = lua_gettop(L) - 1; - return 1; -} -OLUA_END_DECLS + if (num_args == 0) { + // std::vector strings + return _olua_fun_dragonBones_UserData_strings$1(L); + } -static int _dragonBones_BoundingBoxData_containsPoint(lua_State *L) + if (num_args == 1) { + // if ((olua_is_array(L, 2))) { + // std::vector strings + return _olua_fun_dragonBones_UserData_strings$2(L); + // } + } + + luaL_error(L, "method 'dragonBones::UserData::strings' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_cls_db_UserData(lua_State *L) +{ + oluacls_class(L, "db.UserData"); + oluacls_func(L, "addFloat", _olua_fun_dragonBones_UserData_addFloat); + oluacls_func(L, "addInt", _olua_fun_dragonBones_UserData_addInt); + oluacls_func(L, "addString", _olua_fun_dragonBones_UserData_addString); + oluacls_func(L, "getFloat", _olua_fun_dragonBones_UserData_getFloat); + oluacls_func(L, "getFloats", _olua_fun_dragonBones_UserData_getFloats); + oluacls_func(L, "getInt", _olua_fun_dragonBones_UserData_getInt); + oluacls_func(L, "getInts", _olua_fun_dragonBones_UserData_getInts); + oluacls_func(L, "getString", _olua_fun_dragonBones_UserData_getString); + oluacls_func(L, "getStrings", _olua_fun_dragonBones_UserData_getStrings); + oluacls_func(L, "getTypeIndex", _olua_fun_dragonBones_UserData_getTypeIndex); + oluacls_func(L, "new", _olua_fun_dragonBones_UserData_new); + oluacls_prop(L, "typeIndex", _olua_fun_dragonBones_UserData_getTypeIndex, nullptr); + oluacls_prop(L, "floats", _olua_fun_dragonBones_UserData_floats, _olua_fun_dragonBones_UserData_floats); + oluacls_prop(L, "ints", _olua_fun_dragonBones_UserData_ints, _olua_fun_dragonBones_UserData_ints); + oluacls_prop(L, "strings", _olua_fun_dragonBones_UserData_strings, _olua_fun_dragonBones_UserData_strings); + + return 1; +} + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_db_UserData(lua_State *L) +{ + olua_require(L, "dragonbones", luaopen_dragonbones); + if (!olua_getclass(L, "db.UserData")) { + luaL_error(L, "class not found: dragonBones::UserData"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_fun_dragonBones_BoundingBoxData_color$1(lua_State *L) +{ + olua_startinvoke(L); + + dragonBones::BoundingBoxData *self = nullptr; + + olua_to_object(L, 1, &self, "db.BoundingBoxData"); + + // unsigned int color + unsigned int ret = self->color; + int num_ret = olua_push_integer(L, ret); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_dragonBones_BoundingBoxData_color$2(lua_State *L) +{ + olua_startinvoke(L); + + dragonBones::BoundingBoxData *self = nullptr; + unsigned int arg1 = 0; /** color */ + + olua_to_object(L, 1, &self, "db.BoundingBoxData"); + olua_check_integer(L, 2, &arg1); + + // unsigned int color + self->color = arg1; + + olua_endinvoke(L); + + return 0; +} + +static int _olua_fun_dragonBones_BoundingBoxData_color(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // unsigned int color + return _olua_fun_dragonBones_BoundingBoxData_color$1(L); + } + + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // unsigned int color + return _olua_fun_dragonBones_BoundingBoxData_color$2(L); + // } + } + + luaL_error(L, "method 'dragonBones::BoundingBoxData::color' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_dragonBones_BoundingBoxData_containsPoint(lua_State *L) { olua_startinvoke(L); @@ -5005,7 +6385,7 @@ static int _dragonBones_BoundingBoxData_containsPoint(lua_State *L) return num_ret; } -static int _dragonBones_BoundingBoxData_getType(lua_State *L) +static int _olua_fun_dragonBones_BoundingBoxData_getType(lua_State *L) { olua_startinvoke(L); @@ -5022,7 +6402,63 @@ static int _dragonBones_BoundingBoxData_getType(lua_State *L) return num_ret; } -static int _dragonBones_BoundingBoxData_intersectsSegment$1(lua_State *L) +static int _olua_fun_dragonBones_BoundingBoxData_height$1(lua_State *L) +{ + olua_startinvoke(L); + + dragonBones::BoundingBoxData *self = nullptr; + + olua_to_object(L, 1, &self, "db.BoundingBoxData"); + + // float height + float ret = self->height; + int num_ret = olua_push_number(L, ret); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_dragonBones_BoundingBoxData_height$2(lua_State *L) +{ + olua_startinvoke(L); + + dragonBones::BoundingBoxData *self = nullptr; + float arg1 = 0; /** height */ + + olua_to_object(L, 1, &self, "db.BoundingBoxData"); + olua_check_number(L, 2, &arg1); + + // float height + self->height = arg1; + + olua_endinvoke(L); + + return 0; +} + +static int _olua_fun_dragonBones_BoundingBoxData_height(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float height + return _olua_fun_dragonBones_BoundingBoxData_height$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float height + return _olua_fun_dragonBones_BoundingBoxData_height$2(L); + // } + } + + luaL_error(L, "method 'dragonBones::BoundingBoxData::height' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_dragonBones_BoundingBoxData_intersectsSegment$1(lua_State *L) { olua_startinvoke(L); @@ -5053,7 +6489,7 @@ static int _dragonBones_BoundingBoxData_intersectsSegment$1(lua_State *L) return num_ret; } -static int _dragonBones_BoundingBoxData_intersectsSegment$2(lua_State *L) +static int _olua_fun_dragonBones_BoundingBoxData_intersectsSegment$2(lua_State *L) { olua_startinvoke(L); @@ -5069,7 +6505,7 @@ static int _dragonBones_BoundingBoxData_intersectsSegment$2(lua_State *L) olua_check_number(L, 4, &arg3); olua_check_number(L, 5, &arg4); - // int intersectsSegment(float xA, float yA, float xB, float yB, @optional dragonBones::Point *intersectionPointA, @optional dragonBones::Point *intersectionPointB, @optional dragonBones::Point *normalRadians) + // int intersectsSegment(float xA, float yA, float xB, float yB) int ret = self->intersectsSegment(arg1, arg2, arg3, arg4); int num_ret = olua_push_integer(L, ret); @@ -5078,7 +6514,7 @@ static int _dragonBones_BoundingBoxData_intersectsSegment$2(lua_State *L) return num_ret; } -static int _dragonBones_BoundingBoxData_intersectsSegment$3(lua_State *L) +static int _olua_fun_dragonBones_BoundingBoxData_intersectsSegment$3(lua_State *L) { olua_startinvoke(L); @@ -5096,7 +6532,7 @@ static int _dragonBones_BoundingBoxData_intersectsSegment$3(lua_State *L) olua_check_number(L, 5, &arg4); olua_check_object(L, 6, &arg5, "db.Point"); - // int intersectsSegment(float xA, float yA, float xB, float yB, @optional dragonBones::Point *intersectionPointA, @optional dragonBones::Point *intersectionPointB, @optional dragonBones::Point *normalRadians) + // int intersectsSegment(float xA, float yA, float xB, float yB, @optional dragonBones::Point *intersectionPointA) int ret = self->intersectsSegment(arg1, arg2, arg3, arg4, arg5); int num_ret = olua_push_integer(L, ret); @@ -5105,7 +6541,7 @@ static int _dragonBones_BoundingBoxData_intersectsSegment$3(lua_State *L) return num_ret; } -static int _dragonBones_BoundingBoxData_intersectsSegment$4(lua_State *L) +static int _olua_fun_dragonBones_BoundingBoxData_intersectsSegment$4(lua_State *L) { olua_startinvoke(L); @@ -5125,7 +6561,7 @@ static int _dragonBones_BoundingBoxData_intersectsSegment$4(lua_State *L) olua_check_object(L, 6, &arg5, "db.Point"); olua_check_object(L, 7, &arg6, "db.Point"); - // int intersectsSegment(float xA, float yA, float xB, float yB, @optional dragonBones::Point *intersectionPointA, @optional dragonBones::Point *intersectionPointB, @optional dragonBones::Point *normalRadians) + // int intersectsSegment(float xA, float yA, float xB, float yB, @optional dragonBones::Point *intersectionPointA, @optional dragonBones::Point *intersectionPointB) int ret = self->intersectsSegment(arg1, arg2, arg3, arg4, arg5, arg6); int num_ret = olua_push_integer(L, ret); @@ -5134,35 +6570,35 @@ static int _dragonBones_BoundingBoxData_intersectsSegment$4(lua_State *L) return num_ret; } -static int _dragonBones_BoundingBoxData_intersectsSegment(lua_State *L) +static int _olua_fun_dragonBones_BoundingBoxData_intersectsSegment(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 4) { // if ((olua_is_number(L, 2)) && (olua_is_number(L, 3)) && (olua_is_number(L, 4)) && (olua_is_number(L, 5))) { - // int intersectsSegment(float xA, float yA, float xB, float yB, @optional dragonBones::Point *intersectionPointA, @optional dragonBones::Point *intersectionPointB, @optional dragonBones::Point *normalRadians) - return _dragonBones_BoundingBoxData_intersectsSegment$2(L); + // int intersectsSegment(float xA, float yA, float xB, float yB) + return _olua_fun_dragonBones_BoundingBoxData_intersectsSegment$2(L); // } } if (num_args == 5) { // if ((olua_is_number(L, 2)) && (olua_is_number(L, 3)) && (olua_is_number(L, 4)) && (olua_is_number(L, 5)) && (olua_is_object(L, 6, "db.Point"))) { - // int intersectsSegment(float xA, float yA, float xB, float yB, @optional dragonBones::Point *intersectionPointA, @optional dragonBones::Point *intersectionPointB, @optional dragonBones::Point *normalRadians) - return _dragonBones_BoundingBoxData_intersectsSegment$3(L); + // int intersectsSegment(float xA, float yA, float xB, float yB, @optional dragonBones::Point *intersectionPointA) + return _olua_fun_dragonBones_BoundingBoxData_intersectsSegment$3(L); // } } if (num_args == 6) { // if ((olua_is_number(L, 2)) && (olua_is_number(L, 3)) && (olua_is_number(L, 4)) && (olua_is_number(L, 5)) && (olua_is_object(L, 6, "db.Point")) && (olua_is_object(L, 7, "db.Point"))) { - // int intersectsSegment(float xA, float yA, float xB, float yB, @optional dragonBones::Point *intersectionPointA, @optional dragonBones::Point *intersectionPointB, @optional dragonBones::Point *normalRadians) - return _dragonBones_BoundingBoxData_intersectsSegment$4(L); + // int intersectsSegment(float xA, float yA, float xB, float yB, @optional dragonBones::Point *intersectionPointA, @optional dragonBones::Point *intersectionPointB) + return _olua_fun_dragonBones_BoundingBoxData_intersectsSegment$4(L); // } } if (num_args == 7) { // if ((olua_is_number(L, 2)) && (olua_is_number(L, 3)) && (olua_is_number(L, 4)) && (olua_is_number(L, 5)) && (olua_is_object(L, 6, "db.Point")) && (olua_is_object(L, 7, "db.Point")) && (olua_is_object(L, 8, "db.Point"))) { // int intersectsSegment(float xA, float yA, float xB, float yB, @optional dragonBones::Point *intersectionPointA, @optional dragonBones::Point *intersectionPointB, @optional dragonBones::Point *normalRadians) - return _dragonBones_BoundingBoxData_intersectsSegment$1(L); + return _olua_fun_dragonBones_BoundingBoxData_intersectsSegment$1(L); // } } @@ -5171,7 +6607,7 @@ static int _dragonBones_BoundingBoxData_intersectsSegment(lua_State *L) return 0; } -static int _dragonBones_BoundingBoxData_setType(lua_State *L) +static int _olua_fun_dragonBones_BoundingBoxData_setType(lua_State *L) { olua_startinvoke(L); @@ -5189,7 +6625,7 @@ static int _dragonBones_BoundingBoxData_setType(lua_State *L) return 0; } -static int _dragonBones_BoundingBoxData_get_color(lua_State *L) +static int _olua_fun_dragonBones_BoundingBoxData_type$1(lua_State *L) { olua_startinvoke(L); @@ -5197,34 +6633,55 @@ static int _dragonBones_BoundingBoxData_get_color(lua_State *L) olua_to_object(L, 1, &self, "db.BoundingBoxData"); - // unsigned int color - unsigned int ret = self->color; - int num_ret = olua_push_integer(L, ret); + // dragonBones::BoundingBoxType type + dragonBones::BoundingBoxType ret = self->type; + int num_ret = olua_push_enum(L, ret); olua_endinvoke(L); return num_ret; } -static int _dragonBones_BoundingBoxData_set_color(lua_State *L) +static int _olua_fun_dragonBones_BoundingBoxData_type$2(lua_State *L) { olua_startinvoke(L); dragonBones::BoundingBoxData *self = nullptr; - unsigned int arg1 = 0; /** color */ + dragonBones::BoundingBoxType arg1 = (dragonBones::BoundingBoxType)0; /** type */ olua_to_object(L, 1, &self, "db.BoundingBoxData"); - olua_check_integer(L, 2, &arg1); + olua_check_enum(L, 2, &arg1); - // unsigned int color - self->color = arg1; + // dragonBones::BoundingBoxType type + self->type = arg1; olua_endinvoke(L); return 0; } -static int _dragonBones_BoundingBoxData_get_height(lua_State *L) +static int _olua_fun_dragonBones_BoundingBoxData_type(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // dragonBones::BoundingBoxType type + return _olua_fun_dragonBones_BoundingBoxData_type$1(L); + } + + if (num_args == 1) { + // if ((olua_is_enum(L, 2))) { + // dragonBones::BoundingBoxType type + return _olua_fun_dragonBones_BoundingBoxData_type$2(L); + // } + } + + luaL_error(L, "method 'dragonBones::BoundingBoxData::type' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_dragonBones_BoundingBoxData_width$1(lua_State *L) { olua_startinvoke(L); @@ -5232,8 +6689,8 @@ static int _dragonBones_BoundingBoxData_get_height(lua_State *L) olua_to_object(L, 1, &self, "db.BoundingBoxData"); - // float height - float ret = self->height; + // float width + float ret = self->width; int num_ret = olua_push_number(L, ret); olua_endinvoke(L); @@ -5241,113 +6698,128 @@ static int _dragonBones_BoundingBoxData_get_height(lua_State *L) return num_ret; } -static int _dragonBones_BoundingBoxData_set_height(lua_State *L) +static int _olua_fun_dragonBones_BoundingBoxData_width$2(lua_State *L) { olua_startinvoke(L); dragonBones::BoundingBoxData *self = nullptr; - float arg1 = 0; /** height */ + float arg1 = 0; /** width */ olua_to_object(L, 1, &self, "db.BoundingBoxData"); olua_check_number(L, 2, &arg1); - // float height - self->height = arg1; + // float width + self->width = arg1; olua_endinvoke(L); return 0; } -static int _dragonBones_BoundingBoxData_get_type(lua_State *L) +static int _olua_fun_dragonBones_BoundingBoxData_width(lua_State *L) { - olua_startinvoke(L); - - dragonBones::BoundingBoxData *self = nullptr; + int num_args = lua_gettop(L) - 1; - olua_to_object(L, 1, &self, "db.BoundingBoxData"); + if (num_args == 0) { + // float width + return _olua_fun_dragonBones_BoundingBoxData_width$1(L); + } - // dragonBones::BoundingBoxType type - dragonBones::BoundingBoxType ret = self->type; - int num_ret = olua_push_enum(L, ret); + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float width + return _olua_fun_dragonBones_BoundingBoxData_width$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'dragonBones::BoundingBoxData::width' not support '%d' arguments", num_args); - return num_ret; + return 0; } -static int _dragonBones_BoundingBoxData_set_type(lua_State *L) +static int _olua_cls_db_BoundingBoxData(lua_State *L) { - olua_startinvoke(L); - - dragonBones::BoundingBoxData *self = nullptr; - dragonBones::BoundingBoxType arg1 = (dragonBones::BoundingBoxType)0; /** type */ - - olua_to_object(L, 1, &self, "db.BoundingBoxData"); - olua_check_enum(L, 2, &arg1); - - // dragonBones::BoundingBoxType type - self->type = arg1; + oluacls_class(L, "db.BoundingBoxData"); + oluacls_func(L, "containsPoint", _olua_fun_dragonBones_BoundingBoxData_containsPoint); + oluacls_func(L, "getType", _olua_fun_dragonBones_BoundingBoxData_getType); + oluacls_func(L, "intersectsSegment", _olua_fun_dragonBones_BoundingBoxData_intersectsSegment); + oluacls_func(L, "setType", _olua_fun_dragonBones_BoundingBoxData_setType); + oluacls_prop(L, "color", _olua_fun_dragonBones_BoundingBoxData_color, _olua_fun_dragonBones_BoundingBoxData_color); + oluacls_prop(L, "height", _olua_fun_dragonBones_BoundingBoxData_height, _olua_fun_dragonBones_BoundingBoxData_height); + oluacls_prop(L, "type", _olua_fun_dragonBones_BoundingBoxData_type, _olua_fun_dragonBones_BoundingBoxData_type); + oluacls_prop(L, "width", _olua_fun_dragonBones_BoundingBoxData_width, _olua_fun_dragonBones_BoundingBoxData_width); - olua_endinvoke(L); + return 1; +} - return 0; +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_db_BoundingBoxData(lua_State *L) +{ + olua_require(L, "dragonbones", luaopen_dragonbones); + if (!olua_getclass(L, "db.BoundingBoxData")) { + luaL_error(L, "class not found: dragonBones::BoundingBoxData"); + } + return 1; } +OLUA_END_DECLS -static int _dragonBones_BoundingBoxData_get_width(lua_State *L) +static int _olua_fun_dragonBones_BoundingBoxDisplayData_boundingBox$1(lua_State *L) { olua_startinvoke(L); - dragonBones::BoundingBoxData *self = nullptr; + dragonBones::BoundingBoxDisplayData *self = nullptr; - olua_to_object(L, 1, &self, "db.BoundingBoxData"); + olua_to_object(L, 1, &self, "db.BoundingBoxDisplayData"); - // float width - float ret = self->width; - int num_ret = olua_push_number(L, ret); + // dragonBones::BoundingBoxData *boundingBox + dragonBones::BoundingBoxData *ret = self->boundingBox; + int num_ret = olua_push_object(L, ret, "db.BoundingBoxData"); olua_endinvoke(L); return num_ret; } -static int _dragonBones_BoundingBoxData_set_width(lua_State *L) +static int _olua_fun_dragonBones_BoundingBoxDisplayData_boundingBox$2(lua_State *L) { olua_startinvoke(L); - dragonBones::BoundingBoxData *self = nullptr; - float arg1 = 0; /** width */ + dragonBones::BoundingBoxDisplayData *self = nullptr; + dragonBones::BoundingBoxData *arg1 = nullptr; /** boundingBox */ - olua_to_object(L, 1, &self, "db.BoundingBoxData"); - olua_check_number(L, 2, &arg1); + olua_to_object(L, 1, &self, "db.BoundingBoxDisplayData"); + olua_check_object(L, 2, &arg1, "db.BoundingBoxData"); - // float width - self->width = arg1; + // dragonBones::BoundingBoxData *boundingBox + self->boundingBox = arg1; olua_endinvoke(L); return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_dragonBones_BoundingBoxData(lua_State *L) +static int _olua_fun_dragonBones_BoundingBoxDisplayData_boundingBox(lua_State *L) { - oluacls_class(L, "db.BoundingBoxData"); - oluacls_func(L, "containsPoint", _dragonBones_BoundingBoxData_containsPoint); - oluacls_func(L, "getType", _dragonBones_BoundingBoxData_getType); - oluacls_func(L, "intersectsSegment", _dragonBones_BoundingBoxData_intersectsSegment); - oluacls_func(L, "setType", _dragonBones_BoundingBoxData_setType); - oluacls_prop(L, "type", _dragonBones_BoundingBoxData_getType, _dragonBones_BoundingBoxData_setType); - oluacls_prop(L, "color", _dragonBones_BoundingBoxData_get_color, _dragonBones_BoundingBoxData_set_color); - oluacls_prop(L, "height", _dragonBones_BoundingBoxData_get_height, _dragonBones_BoundingBoxData_set_height); - oluacls_prop(L, "type", _dragonBones_BoundingBoxData_get_type, _dragonBones_BoundingBoxData_set_type); - oluacls_prop(L, "width", _dragonBones_BoundingBoxData_get_width, _dragonBones_BoundingBoxData_set_width); + int num_args = lua_gettop(L) - 1; - return 1; + if (num_args == 0) { + // dragonBones::BoundingBoxData *boundingBox + return _olua_fun_dragonBones_BoundingBoxDisplayData_boundingBox$1(L); + } + + if (num_args == 1) { + // if ((olua_is_object(L, 2, "db.BoundingBoxData"))) { + // dragonBones::BoundingBoxData *boundingBox + return _olua_fun_dragonBones_BoundingBoxDisplayData_boundingBox$2(L); + // } + } + + luaL_error(L, "method 'dragonBones::BoundingBoxDisplayData::boundingBox' not support '%d' arguments", num_args); + + return 0; } -OLUA_END_DECLS -static int _dragonBones_BoundingBoxDisplayData_getBoundingBox(lua_State *L) +static int _olua_fun_dragonBones_BoundingBoxDisplayData_getBoundingBox(lua_State *L) { olua_startinvoke(L); @@ -5364,7 +6836,7 @@ static int _dragonBones_BoundingBoxDisplayData_getBoundingBox(lua_State *L) return num_ret; } -static int _dragonBones_BoundingBoxDisplayData_getTypeIndex(lua_State *L) +static int _olua_fun_dragonBones_BoundingBoxDisplayData_getTypeIndex(lua_State *L) { olua_startinvoke(L); @@ -5377,11 +6849,11 @@ static int _dragonBones_BoundingBoxDisplayData_getTypeIndex(lua_State *L) return num_ret; } -static int _dragonBones_BoundingBoxDisplayData_new(lua_State *L) +static int _olua_fun_dragonBones_BoundingBoxDisplayData_new(lua_State *L) { olua_startinvoke(L); - // BoundingBoxDisplayData() + // dragonBones::BoundingBoxDisplayData() dragonBones::BoundingBoxDisplayData *ret = new dragonBones::BoundingBoxDisplayData(); int num_ret = olua_push_object(L, ret, "db.BoundingBoxDisplayData"); olua_postnew(L, ret); @@ -5391,7 +6863,7 @@ static int _dragonBones_BoundingBoxDisplayData_new(lua_State *L) return num_ret; } -static int _dragonBones_BoundingBoxDisplayData_setBoundingBox(lua_State *L) +static int _olua_fun_dragonBones_BoundingBoxDisplayData_setBoundingBox(lua_State *L) { olua_startinvoke(L); @@ -5409,85 +6881,87 @@ static int _dragonBones_BoundingBoxDisplayData_setBoundingBox(lua_State *L) return 0; } -static int _dragonBones_BoundingBoxDisplayData_get_boundingBox(lua_State *L) +static int _olua_cls_db_BoundingBoxDisplayData(lua_State *L) +{ + oluacls_class(L, "db.BoundingBoxDisplayData"); + oluacls_func(L, "getBoundingBox", _olua_fun_dragonBones_BoundingBoxDisplayData_getBoundingBox); + oluacls_func(L, "getTypeIndex", _olua_fun_dragonBones_BoundingBoxDisplayData_getTypeIndex); + oluacls_func(L, "new", _olua_fun_dragonBones_BoundingBoxDisplayData_new); + oluacls_func(L, "setBoundingBox", _olua_fun_dragonBones_BoundingBoxDisplayData_setBoundingBox); + oluacls_prop(L, "typeIndex", _olua_fun_dragonBones_BoundingBoxDisplayData_getTypeIndex, nullptr); + oluacls_prop(L, "boundingBox", _olua_fun_dragonBones_BoundingBoxDisplayData_boundingBox, _olua_fun_dragonBones_BoundingBoxDisplayData_boundingBox); + + return 1; +} + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_db_BoundingBoxDisplayData(lua_State *L) +{ + olua_require(L, "dragonbones", luaopen_dragonbones); + if (!olua_getclass(L, "db.BoundingBoxDisplayData")) { + luaL_error(L, "class not found: dragonBones::BoundingBoxDisplayData"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_fun_dragonBones_CanvasData_aabb$1(lua_State *L) { olua_startinvoke(L); - dragonBones::BoundingBoxDisplayData *self = nullptr; + dragonBones::CanvasData *self = nullptr; - olua_to_object(L, 1, &self, "db.BoundingBoxDisplayData"); + olua_to_object(L, 1, &self, "db.CanvasData"); - // dragonBones::BoundingBoxData *boundingBox - dragonBones::BoundingBoxData *ret = self->boundingBox; - int num_ret = olua_push_object(L, ret, "db.BoundingBoxData"); + // dragonBones::Rectangle aabb + dragonBones::Rectangle &ret = self->aabb; + int num_ret = olua_copy_object(L, ret, "db.Rectangle"); olua_endinvoke(L); return num_ret; } -static int _dragonBones_BoundingBoxDisplayData_set_boundingBox(lua_State *L) +static int _olua_fun_dragonBones_CanvasData_aabb$2(lua_State *L) { olua_startinvoke(L); - dragonBones::BoundingBoxDisplayData *self = nullptr; - dragonBones::BoundingBoxData *arg1 = nullptr; /** boundingBox */ + dragonBones::CanvasData *self = nullptr; + dragonBones::Rectangle *arg1; /** aabb */ - olua_to_object(L, 1, &self, "db.BoundingBoxDisplayData"); - olua_check_object(L, 2, &arg1, "db.BoundingBoxData"); + olua_to_object(L, 1, &self, "db.CanvasData"); + olua_check_object(L, 2, &arg1, "db.Rectangle"); - // dragonBones::BoundingBoxData *boundingBox - self->boundingBox = arg1; + // dragonBones::Rectangle aabb + self->aabb = *arg1; olua_endinvoke(L); return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_dragonBones_BoundingBoxDisplayData(lua_State *L) -{ - oluacls_class(L, "db.BoundingBoxDisplayData"); - oluacls_func(L, "getBoundingBox", _dragonBones_BoundingBoxDisplayData_getBoundingBox); - oluacls_func(L, "getTypeIndex", _dragonBones_BoundingBoxDisplayData_getTypeIndex); - oluacls_func(L, "new", _dragonBones_BoundingBoxDisplayData_new); - oluacls_func(L, "setBoundingBox", _dragonBones_BoundingBoxDisplayData_setBoundingBox); - oluacls_prop(L, "boundingBox", _dragonBones_BoundingBoxDisplayData_getBoundingBox, _dragonBones_BoundingBoxDisplayData_setBoundingBox); - oluacls_prop(L, "typeIndex", _dragonBones_BoundingBoxDisplayData_getTypeIndex, nullptr); - oluacls_prop(L, "boundingBox", _dragonBones_BoundingBoxDisplayData_get_boundingBox, _dragonBones_BoundingBoxDisplayData_set_boundingBox); - - return 1; -} -OLUA_END_DECLS - -static int _dragonBones_CanvasData_getTypeIndex(lua_State *L) +static int _olua_fun_dragonBones_CanvasData_aabb(lua_State *L) { - olua_startinvoke(L); - - // static std::size_t getTypeIndex() - std::size_t ret = dragonBones::CanvasData::getTypeIndex(); - int num_ret = olua_push_integer(L, ret); - - olua_endinvoke(L); - - return num_ret; -} + int num_args = lua_gettop(L) - 1; -static int _dragonBones_CanvasData_new(lua_State *L) -{ - olua_startinvoke(L); + if (num_args == 0) { + // dragonBones::Rectangle aabb + return _olua_fun_dragonBones_CanvasData_aabb$1(L); + } - // CanvasData() - dragonBones::CanvasData *ret = new dragonBones::CanvasData(); - int num_ret = olua_push_object(L, ret, "db.CanvasData"); - olua_postnew(L, ret); + if (num_args == 1) { + // if ((olua_is_object(L, 2, "db.Rectangle"))) { + // dragonBones::Rectangle aabb + return _olua_fun_dragonBones_CanvasData_aabb$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'dragonBones::CanvasData::aabb' not support '%d' arguments", num_args); - return num_ret; + return 0; } -static int _dragonBones_CanvasData_get_aabb(lua_State *L) +static int _olua_fun_dragonBones_CanvasData_color$1(lua_State *L) { olua_startinvoke(L); @@ -5495,69 +6969,68 @@ static int _dragonBones_CanvasData_get_aabb(lua_State *L) olua_to_object(L, 1, &self, "db.CanvasData"); - // dragonBones::Rectangle aabb - dragonBones::Rectangle &ret = self->aabb; - int num_ret = olua_pushcopy_object(L, ret, "db.Rectangle"); + // unsigned int color + unsigned int ret = self->color; + int num_ret = olua_push_integer(L, ret); olua_endinvoke(L); return num_ret; } -static int _dragonBones_CanvasData_set_aabb(lua_State *L) +static int _olua_fun_dragonBones_CanvasData_color$2(lua_State *L) { olua_startinvoke(L); dragonBones::CanvasData *self = nullptr; - dragonBones::Rectangle arg1; /** aabb */ + unsigned int arg1 = 0; /** color */ olua_to_object(L, 1, &self, "db.CanvasData"); - olua_check_object(L, 2, &arg1, "db.Rectangle"); + olua_check_integer(L, 2, &arg1); - // dragonBones::Rectangle aabb - self->aabb = arg1; + // unsigned int color + self->color = arg1; olua_endinvoke(L); return 0; } -static int _dragonBones_CanvasData_get_color(lua_State *L) +static int _olua_fun_dragonBones_CanvasData_color(lua_State *L) { - olua_startinvoke(L); - - dragonBones::CanvasData *self = nullptr; + int num_args = lua_gettop(L) - 1; - olua_to_object(L, 1, &self, "db.CanvasData"); + if (num_args == 0) { + // unsigned int color + return _olua_fun_dragonBones_CanvasData_color$1(L); + } - // unsigned int color - unsigned int ret = self->color; - int num_ret = olua_push_integer(L, ret); + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // unsigned int color + return _olua_fun_dragonBones_CanvasData_color$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'dragonBones::CanvasData::color' not support '%d' arguments", num_args); - return num_ret; + return 0; } -static int _dragonBones_CanvasData_set_color(lua_State *L) +static int _olua_fun_dragonBones_CanvasData_getTypeIndex(lua_State *L) { olua_startinvoke(L); - dragonBones::CanvasData *self = nullptr; - unsigned int arg1 = 0; /** color */ - - olua_to_object(L, 1, &self, "db.CanvasData"); - olua_check_integer(L, 2, &arg1); - - // unsigned int color - self->color = arg1; + // static std::size_t getTypeIndex() + std::size_t ret = dragonBones::CanvasData::getTypeIndex(); + int num_ret = olua_push_integer(L, ret); olua_endinvoke(L); - return 0; + return num_ret; } -static int _dragonBones_CanvasData_get_hasBackground(lua_State *L) +static int _olua_fun_dragonBones_CanvasData_hasBackground$1(lua_State *L) { olua_startinvoke(L); @@ -5574,7 +7047,7 @@ static int _dragonBones_CanvasData_get_hasBackground(lua_State *L) return num_ret; } -static int _dragonBones_CanvasData_set_hasBackground(lua_State *L) +static int _olua_fun_dragonBones_CanvasData_hasBackground$2(lua_State *L) { olua_startinvoke(L); @@ -5592,22 +7065,66 @@ static int _dragonBones_CanvasData_set_hasBackground(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_dragonBones_CanvasData(lua_State *L) +static int _olua_fun_dragonBones_CanvasData_hasBackground(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // bool hasBackground + return _olua_fun_dragonBones_CanvasData_hasBackground$1(L); + } + + if (num_args == 1) { + // if ((olua_is_bool(L, 2))) { + // bool hasBackground + return _olua_fun_dragonBones_CanvasData_hasBackground$2(L); + // } + } + + luaL_error(L, "method 'dragonBones::CanvasData::hasBackground' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_dragonBones_CanvasData_new(lua_State *L) +{ + olua_startinvoke(L); + + // dragonBones::CanvasData() + dragonBones::CanvasData *ret = new dragonBones::CanvasData(); + int num_ret = olua_push_object(L, ret, "db.CanvasData"); + olua_postnew(L, ret); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_cls_db_CanvasData(lua_State *L) { oluacls_class(L, "db.CanvasData"); - oluacls_func(L, "getTypeIndex", _dragonBones_CanvasData_getTypeIndex); - oluacls_func(L, "new", _dragonBones_CanvasData_new); - oluacls_prop(L, "typeIndex", _dragonBones_CanvasData_getTypeIndex, nullptr); - oluacls_prop(L, "aabb", _dragonBones_CanvasData_get_aabb, _dragonBones_CanvasData_set_aabb); - oluacls_prop(L, "color", _dragonBones_CanvasData_get_color, _dragonBones_CanvasData_set_color); - oluacls_prop(L, "hasBackground", _dragonBones_CanvasData_get_hasBackground, _dragonBones_CanvasData_set_hasBackground); + oluacls_func(L, "getTypeIndex", _olua_fun_dragonBones_CanvasData_getTypeIndex); + oluacls_func(L, "new", _olua_fun_dragonBones_CanvasData_new); + oluacls_prop(L, "typeIndex", _olua_fun_dragonBones_CanvasData_getTypeIndex, nullptr); + oluacls_prop(L, "aabb", _olua_fun_dragonBones_CanvasData_aabb, _olua_fun_dragonBones_CanvasData_aabb); + oluacls_prop(L, "color", _olua_fun_dragonBones_CanvasData_color, _olua_fun_dragonBones_CanvasData_color); + oluacls_prop(L, "hasBackground", _olua_fun_dragonBones_CanvasData_hasBackground, _olua_fun_dragonBones_CanvasData_hasBackground); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_db_CanvasData(lua_State *L) +{ + olua_require(L, "dragonbones", luaopen_dragonbones); + if (!olua_getclass(L, "db.CanvasData")) { + luaL_error(L, "class not found: dragonBones::CanvasData"); + } return 1; } OLUA_END_DECLS -static int _dragonBones_TextureAtlasData_addTexture(lua_State *L) +static int _olua_fun_dragonBones_TextureAtlasData_addTexture(lua_State *L) { olua_startinvoke(L); @@ -5625,7 +7142,7 @@ static int _dragonBones_TextureAtlasData_addTexture(lua_State *L) return 0; } -static int _dragonBones_TextureAtlasData_createTexture(lua_State *L) +static int _olua_fun_dragonBones_TextureAtlasData_autoSearch$1(lua_State *L) { olua_startinvoke(L); @@ -5633,35 +7150,55 @@ static int _dragonBones_TextureAtlasData_createTexture(lua_State *L) olua_to_object(L, 1, &self, "db.TextureAtlasData"); - // dragonBones::TextureData *createTexture() - dragonBones::TextureData *ret = self->createTexture(); - int num_ret = olua_push_object(L, ret, "db.TextureData"); + // bool autoSearch + bool ret = self->autoSearch; + int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); return num_ret; } -static int _dragonBones_TextureAtlasData_getTexture(lua_State *L) +static int _olua_fun_dragonBones_TextureAtlasData_autoSearch$2(lua_State *L) { olua_startinvoke(L); dragonBones::TextureAtlasData *self = nullptr; - std::string arg1; /** textureName */ + bool arg1 = false; /** autoSearch */ olua_to_object(L, 1, &self, "db.TextureAtlasData"); - olua_check_string(L, 2, &arg1); + olua_check_bool(L, 2, &arg1); - // dragonBones::TextureData *getTexture(const std::string &textureName) - dragonBones::TextureData *ret = self->getTexture(arg1); - int num_ret = olua_push_object(L, ret, "db.TextureData"); + // bool autoSearch + self->autoSearch = arg1; olua_endinvoke(L); - return num_ret; + return 0; +} + +static int _olua_fun_dragonBones_TextureAtlasData_autoSearch(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // bool autoSearch + return _olua_fun_dragonBones_TextureAtlasData_autoSearch$1(L); + } + + if (num_args == 1) { + // if ((olua_is_bool(L, 2))) { + // bool autoSearch + return _olua_fun_dragonBones_TextureAtlasData_autoSearch$2(L); + // } + } + + luaL_error(L, "method 'dragonBones::TextureAtlasData::autoSearch' not support '%d' arguments", num_args); + + return 0; } -static int _dragonBones_TextureAtlasData_getTextures(lua_State *L) +static int _olua_fun_dragonBones_TextureAtlasData_createTexture(lua_State *L) { olua_startinvoke(L); @@ -5669,19 +7206,16 @@ static int _dragonBones_TextureAtlasData_getTextures(lua_State *L) olua_to_object(L, 1, &self, "db.TextureAtlasData"); - // const std::map &getTextures() - const std::map &ret = self->getTextures(); - int num_ret = olua_push_map(L, ret, [L](std::string &arg1, dragonBones::TextureData *arg2) { - olua_push_string(L, arg1); - olua_push_object(L, arg2, "db.TextureData"); - }); + // dragonBones::TextureData *createTexture() + dragonBones::TextureData *ret = self->createTexture(); + int num_ret = olua_push_object(L, ret, "db.TextureData"); olua_endinvoke(L); return num_ret; } -static int _dragonBones_TextureAtlasData_get_autoSearch(lua_State *L) +static int _olua_fun_dragonBones_TextureAtlasData_format$1(lua_State *L) { olua_startinvoke(L); @@ -5689,69 +7223,94 @@ static int _dragonBones_TextureAtlasData_get_autoSearch(lua_State *L) olua_to_object(L, 1, &self, "db.TextureAtlasData"); - // bool autoSearch - bool ret = self->autoSearch; - int num_ret = olua_push_bool(L, ret); + // dragonBones::TextureFormat format + dragonBones::TextureFormat ret = self->format; + int num_ret = olua_push_enum(L, ret); olua_endinvoke(L); return num_ret; } -static int _dragonBones_TextureAtlasData_set_autoSearch(lua_State *L) +static int _olua_fun_dragonBones_TextureAtlasData_format$2(lua_State *L) { olua_startinvoke(L); dragonBones::TextureAtlasData *self = nullptr; - bool arg1 = false; /** autoSearch */ + dragonBones::TextureFormat arg1 = (dragonBones::TextureFormat)0; /** format */ olua_to_object(L, 1, &self, "db.TextureAtlasData"); - olua_check_bool(L, 2, &arg1); + olua_check_enum(L, 2, &arg1); - // bool autoSearch - self->autoSearch = arg1; + // dragonBones::TextureFormat format + self->format = arg1; olua_endinvoke(L); return 0; } -static int _dragonBones_TextureAtlasData_get_format(lua_State *L) +static int _olua_fun_dragonBones_TextureAtlasData_format(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // dragonBones::TextureFormat format + return _olua_fun_dragonBones_TextureAtlasData_format$1(L); + } + + if (num_args == 1) { + // if ((olua_is_enum(L, 2))) { + // dragonBones::TextureFormat format + return _olua_fun_dragonBones_TextureAtlasData_format$2(L); + // } + } + + luaL_error(L, "method 'dragonBones::TextureAtlasData::format' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_dragonBones_TextureAtlasData_getTexture(lua_State *L) { olua_startinvoke(L); dragonBones::TextureAtlasData *self = nullptr; + std::string arg1; /** textureName */ olua_to_object(L, 1, &self, "db.TextureAtlasData"); + olua_check_string(L, 2, &arg1); - // dragonBones::TextureFormat format - dragonBones::TextureFormat ret = self->format; - int num_ret = olua_push_enum(L, ret); + // dragonBones::TextureData *getTexture(const std::string &textureName) + dragonBones::TextureData *ret = self->getTexture(arg1); + int num_ret = olua_push_object(L, ret, "db.TextureData"); olua_endinvoke(L); return num_ret; } -static int _dragonBones_TextureAtlasData_set_format(lua_State *L) +static int _olua_fun_dragonBones_TextureAtlasData_getTextures(lua_State *L) { olua_startinvoke(L); dragonBones::TextureAtlasData *self = nullptr; - dragonBones::TextureFormat arg1 = (dragonBones::TextureFormat)0; /** format */ olua_to_object(L, 1, &self, "db.TextureAtlasData"); - olua_check_enum(L, 2, &arg1); - // dragonBones::TextureFormat format - self->format = arg1; + // const std::map &getTextures() + const std::map &ret = self->getTextures(); + int num_ret = olua_push_map(L, ret, [L](std::string &arg1, dragonBones::TextureData *arg2) { + olua_push_string(L, arg1); + olua_push_object(L, arg2, "db.TextureData"); + }); olua_endinvoke(L); - return 0; + return num_ret; } -static int _dragonBones_TextureAtlasData_get_height(lua_State *L) +static int _olua_fun_dragonBones_TextureAtlasData_height$1(lua_State *L) { olua_startinvoke(L); @@ -5768,7 +7327,7 @@ static int _dragonBones_TextureAtlasData_get_height(lua_State *L) return num_ret; } -static int _dragonBones_TextureAtlasData_set_height(lua_State *L) +static int _olua_fun_dragonBones_TextureAtlasData_height$2(lua_State *L) { olua_startinvoke(L); @@ -5786,7 +7345,28 @@ static int _dragonBones_TextureAtlasData_set_height(lua_State *L) return 0; } -static int _dragonBones_TextureAtlasData_get_imagePath(lua_State *L) +static int _olua_fun_dragonBones_TextureAtlasData_height(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // unsigned int height + return _olua_fun_dragonBones_TextureAtlasData_height$1(L); + } + + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // unsigned int height + return _olua_fun_dragonBones_TextureAtlasData_height$2(L); + // } + } + + luaL_error(L, "method 'dragonBones::TextureAtlasData::height' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_dragonBones_TextureAtlasData_imagePath$1(lua_State *L) { olua_startinvoke(L); @@ -5803,7 +7383,7 @@ static int _dragonBones_TextureAtlasData_get_imagePath(lua_State *L) return num_ret; } -static int _dragonBones_TextureAtlasData_set_imagePath(lua_State *L) +static int _olua_fun_dragonBones_TextureAtlasData_imagePath$2(lua_State *L) { olua_startinvoke(L); @@ -5821,7 +7401,28 @@ static int _dragonBones_TextureAtlasData_set_imagePath(lua_State *L) return 0; } -static int _dragonBones_TextureAtlasData_get_name(lua_State *L) +static int _olua_fun_dragonBones_TextureAtlasData_imagePath(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // std::string imagePath + return _olua_fun_dragonBones_TextureAtlasData_imagePath$1(L); + } + + if (num_args == 1) { + // if ((olua_is_string(L, 2))) { + // std::string imagePath + return _olua_fun_dragonBones_TextureAtlasData_imagePath$2(L); + // } + } + + luaL_error(L, "method 'dragonBones::TextureAtlasData::imagePath' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_dragonBones_TextureAtlasData_name$1(lua_State *L) { olua_startinvoke(L); @@ -5838,7 +7439,7 @@ static int _dragonBones_TextureAtlasData_get_name(lua_State *L) return num_ret; } -static int _dragonBones_TextureAtlasData_set_name(lua_State *L) +static int _olua_fun_dragonBones_TextureAtlasData_name$2(lua_State *L) { olua_startinvoke(L); @@ -5856,7 +7457,28 @@ static int _dragonBones_TextureAtlasData_set_name(lua_State *L) return 0; } -static int _dragonBones_TextureAtlasData_get_scale(lua_State *L) +static int _olua_fun_dragonBones_TextureAtlasData_name(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // std::string name + return _olua_fun_dragonBones_TextureAtlasData_name$1(L); + } + + if (num_args == 1) { + // if ((olua_is_string(L, 2))) { + // std::string name + return _olua_fun_dragonBones_TextureAtlasData_name$2(L); + // } + } + + luaL_error(L, "method 'dragonBones::TextureAtlasData::name' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_dragonBones_TextureAtlasData_scale$1(lua_State *L) { olua_startinvoke(L); @@ -5873,7 +7495,7 @@ static int _dragonBones_TextureAtlasData_get_scale(lua_State *L) return num_ret; } -static int _dragonBones_TextureAtlasData_set_scale(lua_State *L) +static int _olua_fun_dragonBones_TextureAtlasData_scale$2(lua_State *L) { olua_startinvoke(L); @@ -5891,15 +7513,36 @@ static int _dragonBones_TextureAtlasData_set_scale(lua_State *L) return 0; } -static int _dragonBones_TextureAtlasData_get_textures(lua_State *L) +static int _olua_fun_dragonBones_TextureAtlasData_scale(lua_State *L) { - olua_startinvoke(L); - - dragonBones::TextureAtlasData *self = nullptr; + int num_args = lua_gettop(L) - 1; - olua_to_object(L, 1, &self, "db.TextureAtlasData"); + if (num_args == 0) { + // float scale + return _olua_fun_dragonBones_TextureAtlasData_scale$1(L); + } - // std::map textures + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float scale + return _olua_fun_dragonBones_TextureAtlasData_scale$2(L); + // } + } + + luaL_error(L, "method 'dragonBones::TextureAtlasData::scale' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_dragonBones_TextureAtlasData_textures$1(lua_State *L) +{ + olua_startinvoke(L); + + dragonBones::TextureAtlasData *self = nullptr; + + olua_to_object(L, 1, &self, "db.TextureAtlasData"); + + // std::map textures std::map &ret = self->textures; int num_ret = olua_push_map(L, ret, [L](std::string &arg1, dragonBones::TextureData *arg2) { olua_push_string(L, arg1); @@ -5911,7 +7554,7 @@ static int _dragonBones_TextureAtlasData_get_textures(lua_State *L) return num_ret; } -static int _dragonBones_TextureAtlasData_set_textures(lua_State *L) +static int _olua_fun_dragonBones_TextureAtlasData_textures$2(lua_State *L) { olua_startinvoke(L); @@ -5932,7 +7575,28 @@ static int _dragonBones_TextureAtlasData_set_textures(lua_State *L) return 0; } -static int _dragonBones_TextureAtlasData_get_width(lua_State *L) +static int _olua_fun_dragonBones_TextureAtlasData_textures(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // std::map textures + return _olua_fun_dragonBones_TextureAtlasData_textures$1(L); + } + + if (num_args == 1) { + // if ((olua_is_map(L, 2))) { + // std::map textures + return _olua_fun_dragonBones_TextureAtlasData_textures$2(L); + // } + } + + luaL_error(L, "method 'dragonBones::TextureAtlasData::textures' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_dragonBones_TextureAtlasData_width$1(lua_State *L) { olua_startinvoke(L); @@ -5949,7 +7613,7 @@ static int _dragonBones_TextureAtlasData_get_width(lua_State *L) return num_ret; } -static int _dragonBones_TextureAtlasData_set_width(lua_State *L) +static int _olua_fun_dragonBones_TextureAtlasData_width$2(lua_State *L) { olua_startinvoke(L); @@ -5967,29 +7631,58 @@ static int _dragonBones_TextureAtlasData_set_width(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_dragonBones_TextureAtlasData(lua_State *L) +static int _olua_fun_dragonBones_TextureAtlasData_width(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // unsigned int width + return _olua_fun_dragonBones_TextureAtlasData_width$1(L); + } + + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // unsigned int width + return _olua_fun_dragonBones_TextureAtlasData_width$2(L); + // } + } + + luaL_error(L, "method 'dragonBones::TextureAtlasData::width' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_cls_db_TextureAtlasData(lua_State *L) { oluacls_class(L, "db.TextureAtlasData"); - oluacls_func(L, "addTexture", _dragonBones_TextureAtlasData_addTexture); - oluacls_func(L, "createTexture", _dragonBones_TextureAtlasData_createTexture); - oluacls_func(L, "getTexture", _dragonBones_TextureAtlasData_getTexture); - oluacls_func(L, "getTextures", _dragonBones_TextureAtlasData_getTextures); - oluacls_prop(L, "textures", _dragonBones_TextureAtlasData_getTextures, nullptr); - oluacls_prop(L, "autoSearch", _dragonBones_TextureAtlasData_get_autoSearch, _dragonBones_TextureAtlasData_set_autoSearch); - oluacls_prop(L, "format", _dragonBones_TextureAtlasData_get_format, _dragonBones_TextureAtlasData_set_format); - oluacls_prop(L, "height", _dragonBones_TextureAtlasData_get_height, _dragonBones_TextureAtlasData_set_height); - oluacls_prop(L, "imagePath", _dragonBones_TextureAtlasData_get_imagePath, _dragonBones_TextureAtlasData_set_imagePath); - oluacls_prop(L, "name", _dragonBones_TextureAtlasData_get_name, _dragonBones_TextureAtlasData_set_name); - oluacls_prop(L, "scale", _dragonBones_TextureAtlasData_get_scale, _dragonBones_TextureAtlasData_set_scale); - oluacls_prop(L, "textures", _dragonBones_TextureAtlasData_get_textures, _dragonBones_TextureAtlasData_set_textures); - oluacls_prop(L, "width", _dragonBones_TextureAtlasData_get_width, _dragonBones_TextureAtlasData_set_width); + oluacls_func(L, "addTexture", _olua_fun_dragonBones_TextureAtlasData_addTexture); + oluacls_func(L, "createTexture", _olua_fun_dragonBones_TextureAtlasData_createTexture); + oluacls_func(L, "getTexture", _olua_fun_dragonBones_TextureAtlasData_getTexture); + oluacls_func(L, "getTextures", _olua_fun_dragonBones_TextureAtlasData_getTextures); + oluacls_prop(L, "autoSearch", _olua_fun_dragonBones_TextureAtlasData_autoSearch, _olua_fun_dragonBones_TextureAtlasData_autoSearch); + oluacls_prop(L, "format", _olua_fun_dragonBones_TextureAtlasData_format, _olua_fun_dragonBones_TextureAtlasData_format); + oluacls_prop(L, "height", _olua_fun_dragonBones_TextureAtlasData_height, _olua_fun_dragonBones_TextureAtlasData_height); + oluacls_prop(L, "imagePath", _olua_fun_dragonBones_TextureAtlasData_imagePath, _olua_fun_dragonBones_TextureAtlasData_imagePath); + oluacls_prop(L, "name", _olua_fun_dragonBones_TextureAtlasData_name, _olua_fun_dragonBones_TextureAtlasData_name); + oluacls_prop(L, "scale", _olua_fun_dragonBones_TextureAtlasData_scale, _olua_fun_dragonBones_TextureAtlasData_scale); + oluacls_prop(L, "textures", _olua_fun_dragonBones_TextureAtlasData_textures, _olua_fun_dragonBones_TextureAtlasData_textures); + oluacls_prop(L, "width", _olua_fun_dragonBones_TextureAtlasData_width, _olua_fun_dragonBones_TextureAtlasData_width); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_db_TextureAtlasData(lua_State *L) +{ + olua_require(L, "dragonbones", luaopen_dragonbones); + if (!olua_getclass(L, "db.TextureAtlasData")) { + luaL_error(L, "class not found: dragonBones::TextureAtlasData"); + } return 1; } OLUA_END_DECLS -static int _dragonBones_TextureData_createRectangle(lua_State *L) +static int _olua_fun_dragonBones_TextureData_createRectangle(lua_State *L) { olua_startinvoke(L); @@ -6002,7 +7695,7 @@ static int _dragonBones_TextureData_createRectangle(lua_State *L) return num_ret; } -static int _dragonBones_TextureData_getFrame(lua_State *L) +static int _olua_fun_dragonBones_TextureData_frame$1(lua_State *L) { olua_startinvoke(L); @@ -6010,8 +7703,8 @@ static int _dragonBones_TextureData_getFrame(lua_State *L) olua_to_object(L, 1, &self, "db.TextureData"); - // const dragonBones::Rectangle *getFrame() - const dragonBones::Rectangle *ret = self->getFrame(); + // dragonBones::Rectangle *frame + dragonBones::Rectangle *ret = self->frame; int num_ret = olua_push_object(L, ret, "db.Rectangle"); olua_endinvoke(L); @@ -6019,77 +7712,63 @@ static int _dragonBones_TextureData_getFrame(lua_State *L) return num_ret; } -static int _dragonBones_TextureData_getParent(lua_State *L) -{ - olua_startinvoke(L); - - dragonBones::TextureData *self = nullptr; - - olua_to_object(L, 1, &self, "db.TextureData"); - - // const dragonBones::TextureAtlasData *getParent() - const dragonBones::TextureAtlasData *ret = self->getParent(); - int num_ret = olua_push_object(L, ret, "db.TextureAtlasData"); - - olua_endinvoke(L); - - return num_ret; -} - -static int _dragonBones_TextureData_getRegion(lua_State *L) +static int _olua_fun_dragonBones_TextureData_frame$2(lua_State *L) { olua_startinvoke(L); dragonBones::TextureData *self = nullptr; + dragonBones::Rectangle *arg1 = nullptr; /** frame */ olua_to_object(L, 1, &self, "db.TextureData"); + olua_check_object(L, 2, &arg1, "db.Rectangle"); - // dragonBones::Rectangle *getRegion() - dragonBones::Rectangle *ret = self->getRegion(); - int num_ret = olua_push_object(L, ret, "db.Rectangle"); + // dragonBones::Rectangle *frame + self->frame = arg1; olua_endinvoke(L); - return num_ret; + return 0; } -static int _dragonBones_TextureData_setFrame(lua_State *L) +static int _olua_fun_dragonBones_TextureData_frame(lua_State *L) { - olua_startinvoke(L); - - dragonBones::TextureData *self = nullptr; - dragonBones::Rectangle *arg1 = nullptr; /** value */ + int num_args = lua_gettop(L) - 1; - olua_to_object(L, 1, &self, "db.TextureData"); - olua_check_object(L, 2, &arg1, "db.Rectangle"); + if (num_args == 0) { + // dragonBones::Rectangle *frame + return _olua_fun_dragonBones_TextureData_frame$1(L); + } - // void setFrame(dragonBones::Rectangle *value) - self->setFrame(arg1); + if (num_args == 1) { + // if ((olua_is_object(L, 2, "db.Rectangle"))) { + // dragonBones::Rectangle *frame + return _olua_fun_dragonBones_TextureData_frame$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'dragonBones::TextureData::frame' not support '%d' arguments", num_args); return 0; } -static int _dragonBones_TextureData_setParent(lua_State *L) +static int _olua_fun_dragonBones_TextureData_getFrame(lua_State *L) { olua_startinvoke(L); dragonBones::TextureData *self = nullptr; - dragonBones::TextureAtlasData *arg1 = nullptr; /** value */ olua_to_object(L, 1, &self, "db.TextureData"); - olua_check_object(L, 2, &arg1, "db.TextureAtlasData"); - // void setParent(dragonBones::TextureAtlasData *value) - self->setParent(arg1); + // const dragonBones::Rectangle *getFrame() + const dragonBones::Rectangle *ret = self->getFrame(); + int num_ret = olua_push_object(L, ret, "db.Rectangle"); olua_endinvoke(L); - return 0; + return num_ret; } -static int _dragonBones_TextureData_get_frame(lua_State *L) +static int _olua_fun_dragonBones_TextureData_getParent(lua_State *L) { olua_startinvoke(L); @@ -6097,34 +7776,33 @@ static int _dragonBones_TextureData_get_frame(lua_State *L) olua_to_object(L, 1, &self, "db.TextureData"); - // dragonBones::Rectangle *frame - dragonBones::Rectangle *ret = self->frame; - int num_ret = olua_push_object(L, ret, "db.Rectangle"); + // const dragonBones::TextureAtlasData *getParent() + const dragonBones::TextureAtlasData *ret = self->getParent(); + int num_ret = olua_push_object(L, ret, "db.TextureAtlasData"); olua_endinvoke(L); return num_ret; } -static int _dragonBones_TextureData_set_frame(lua_State *L) +static int _olua_fun_dragonBones_TextureData_getRegion(lua_State *L) { olua_startinvoke(L); dragonBones::TextureData *self = nullptr; - dragonBones::Rectangle *arg1 = nullptr; /** frame */ olua_to_object(L, 1, &self, "db.TextureData"); - olua_check_object(L, 2, &arg1, "db.Rectangle"); - // dragonBones::Rectangle *frame - self->frame = arg1; + // dragonBones::Rectangle *getRegion() + dragonBones::Rectangle *ret = self->getRegion(); + int num_ret = olua_push_object(L, ret, "db.Rectangle"); olua_endinvoke(L); - return 0; + return num_ret; } -static int _dragonBones_TextureData_get_name(lua_State *L) +static int _olua_fun_dragonBones_TextureData_name$1(lua_State *L) { olua_startinvoke(L); @@ -6141,7 +7819,7 @@ static int _dragonBones_TextureData_get_name(lua_State *L) return num_ret; } -static int _dragonBones_TextureData_set_name(lua_State *L) +static int _olua_fun_dragonBones_TextureData_name$2(lua_State *L) { olua_startinvoke(L); @@ -6159,7 +7837,28 @@ static int _dragonBones_TextureData_set_name(lua_State *L) return 0; } -static int _dragonBones_TextureData_get_parent(lua_State *L) +static int _olua_fun_dragonBones_TextureData_name(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // std::string name + return _olua_fun_dragonBones_TextureData_name$1(L); + } + + if (num_args == 1) { + // if ((olua_is_string(L, 2))) { + // std::string name + return _olua_fun_dragonBones_TextureData_name$2(L); + // } + } + + luaL_error(L, "method 'dragonBones::TextureData::name' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_dragonBones_TextureData_parent$1(lua_State *L) { olua_startinvoke(L); @@ -6176,7 +7875,7 @@ static int _dragonBones_TextureData_get_parent(lua_State *L) return num_ret; } -static int _dragonBones_TextureData_set_parent(lua_State *L) +static int _olua_fun_dragonBones_TextureData_parent$2(lua_State *L) { olua_startinvoke(L); @@ -6194,7 +7893,28 @@ static int _dragonBones_TextureData_set_parent(lua_State *L) return 0; } -static int _dragonBones_TextureData_get_region(lua_State *L) +static int _olua_fun_dragonBones_TextureData_parent(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // dragonBones::TextureAtlasData *parent + return _olua_fun_dragonBones_TextureData_parent$1(L); + } + + if (num_args == 1) { + // if ((olua_is_object(L, 2, "db.TextureAtlasData"))) { + // dragonBones::TextureAtlasData *parent + return _olua_fun_dragonBones_TextureData_parent$2(L); + // } + } + + luaL_error(L, "method 'dragonBones::TextureData::parent' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_dragonBones_TextureData_region$1(lua_State *L) { olua_startinvoke(L); @@ -6204,32 +7924,53 @@ static int _dragonBones_TextureData_get_region(lua_State *L) // dragonBones::Rectangle region dragonBones::Rectangle &ret = self->region; - int num_ret = olua_pushcopy_object(L, ret, "db.Rectangle"); + int num_ret = olua_copy_object(L, ret, "db.Rectangle"); olua_endinvoke(L); return num_ret; } -static int _dragonBones_TextureData_set_region(lua_State *L) +static int _olua_fun_dragonBones_TextureData_region$2(lua_State *L) { olua_startinvoke(L); dragonBones::TextureData *self = nullptr; - dragonBones::Rectangle arg1; /** region */ + dragonBones::Rectangle *arg1; /** region */ olua_to_object(L, 1, &self, "db.TextureData"); olua_check_object(L, 2, &arg1, "db.Rectangle"); // dragonBones::Rectangle region - self->region = arg1; + self->region = *arg1; olua_endinvoke(L); return 0; } -static int _dragonBones_TextureData_get_rotated(lua_State *L) +static int _olua_fun_dragonBones_TextureData_region(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // dragonBones::Rectangle region + return _olua_fun_dragonBones_TextureData_region$1(L); + } + + if (num_args == 1) { + // if ((olua_is_object(L, 2, "db.Rectangle"))) { + // dragonBones::Rectangle region + return _olua_fun_dragonBones_TextureData_region$2(L); + // } + } + + luaL_error(L, "method 'dragonBones::TextureData::region' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_dragonBones_TextureData_rotated$1(lua_State *L) { olua_startinvoke(L); @@ -6246,7 +7987,7 @@ static int _dragonBones_TextureData_get_rotated(lua_State *L) return num_ret; } -static int _dragonBones_TextureData_set_rotated(lua_State *L) +static int _olua_fun_dragonBones_TextureData_rotated$2(lua_State *L) { olua_startinvoke(L); @@ -6264,306 +8005,319 @@ static int _dragonBones_TextureData_set_rotated(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_dragonBones_TextureData(lua_State *L) +static int _olua_fun_dragonBones_TextureData_rotated(lua_State *L) { - oluacls_class(L, "db.TextureData"); - oluacls_func(L, "createRectangle", _dragonBones_TextureData_createRectangle); - oluacls_func(L, "getFrame", _dragonBones_TextureData_getFrame); - oluacls_func(L, "getParent", _dragonBones_TextureData_getParent); - oluacls_func(L, "getRegion", _dragonBones_TextureData_getRegion); - oluacls_func(L, "setFrame", _dragonBones_TextureData_setFrame); - oluacls_func(L, "setParent", _dragonBones_TextureData_setParent); - oluacls_prop(L, "frame", _dragonBones_TextureData_getFrame, _dragonBones_TextureData_setFrame); - oluacls_prop(L, "parent", _dragonBones_TextureData_getParent, _dragonBones_TextureData_setParent); - oluacls_prop(L, "region", _dragonBones_TextureData_getRegion, nullptr); - oluacls_prop(L, "frame", _dragonBones_TextureData_get_frame, _dragonBones_TextureData_set_frame); - oluacls_prop(L, "name", _dragonBones_TextureData_get_name, _dragonBones_TextureData_set_name); - oluacls_prop(L, "parent", _dragonBones_TextureData_get_parent, _dragonBones_TextureData_set_parent); - oluacls_prop(L, "region", _dragonBones_TextureData_get_region, _dragonBones_TextureData_set_region); - oluacls_prop(L, "rotated", _dragonBones_TextureData_get_rotated, _dragonBones_TextureData_set_rotated); + int num_args = lua_gettop(L) - 1; - return 1; + if (num_args == 0) { + // bool rotated + return _olua_fun_dragonBones_TextureData_rotated$1(L); + } + + if (num_args == 1) { + // if ((olua_is_bool(L, 2))) { + // bool rotated + return _olua_fun_dragonBones_TextureData_rotated$2(L); + // } + } + + luaL_error(L, "method 'dragonBones::TextureData::rotated' not support '%d' arguments", num_args); + + return 0; } -OLUA_END_DECLS -static int _dragonBones_ArmatureData_addAction(lua_State *L) +static int _olua_fun_dragonBones_TextureData_setFrame(lua_State *L) { olua_startinvoke(L); - dragonBones::ArmatureData *self = nullptr; - dragonBones::ActionData *arg1 = nullptr; /** value */ - bool arg2 = false; /** isDefault */ + dragonBones::TextureData *self = nullptr; + dragonBones::Rectangle *arg1 = nullptr; /** value */ - olua_to_object(L, 1, &self, "db.ArmatureData"); - olua_check_object(L, 2, &arg1, "db.ActionData"); - olua_check_bool(L, 3, &arg2); + olua_to_object(L, 1, &self, "db.TextureData"); + olua_check_object(L, 2, &arg1, "db.Rectangle"); - // void addAction(dragonBones::ActionData *value, bool isDefault) - self->addAction(arg1, arg2); + // void setFrame(dragonBones::Rectangle *value) + self->setFrame(arg1); olua_endinvoke(L); return 0; } -static int _dragonBones_ArmatureData_addAnimation(lua_State *L) +static int _olua_fun_dragonBones_TextureData_setParent(lua_State *L) { olua_startinvoke(L); - dragonBones::ArmatureData *self = nullptr; - dragonBones::AnimationData *arg1 = nullptr; /** value */ + dragonBones::TextureData *self = nullptr; + dragonBones::TextureAtlasData *arg1 = nullptr; /** value */ - olua_to_object(L, 1, &self, "db.ArmatureData"); - olua_check_object(L, 2, &arg1, "db.AnimationData"); + olua_to_object(L, 1, &self, "db.TextureData"); + olua_check_object(L, 2, &arg1, "db.TextureAtlasData"); - // void addAnimation(dragonBones::AnimationData *value) - self->addAnimation(arg1); + // void setParent(dragonBones::TextureAtlasData *value) + self->setParent(arg1); olua_endinvoke(L); return 0; } -static int _dragonBones_ArmatureData_addBone(lua_State *L) +static int _olua_cls_db_TextureData(lua_State *L) { - olua_startinvoke(L); - - dragonBones::ArmatureData *self = nullptr; - dragonBones::BoneData *arg1 = nullptr; /** value */ - - olua_to_object(L, 1, &self, "db.ArmatureData"); - olua_check_object(L, 2, &arg1, "db.BoneData"); - - // void addBone(dragonBones::BoneData *value) - self->addBone(arg1); + oluacls_class(L, "db.TextureData"); + oluacls_func(L, "createRectangle", _olua_fun_dragonBones_TextureData_createRectangle); + oluacls_func(L, "getFrame", _olua_fun_dragonBones_TextureData_getFrame); + oluacls_func(L, "getParent", _olua_fun_dragonBones_TextureData_getParent); + oluacls_func(L, "getRegion", _olua_fun_dragonBones_TextureData_getRegion); + oluacls_func(L, "setFrame", _olua_fun_dragonBones_TextureData_setFrame); + oluacls_func(L, "setParent", _olua_fun_dragonBones_TextureData_setParent); + oluacls_prop(L, "frame", _olua_fun_dragonBones_TextureData_frame, _olua_fun_dragonBones_TextureData_frame); + oluacls_prop(L, "name", _olua_fun_dragonBones_TextureData_name, _olua_fun_dragonBones_TextureData_name); + oluacls_prop(L, "parent", _olua_fun_dragonBones_TextureData_parent, _olua_fun_dragonBones_TextureData_parent); + oluacls_prop(L, "region", _olua_fun_dragonBones_TextureData_region, _olua_fun_dragonBones_TextureData_region); + oluacls_prop(L, "rotated", _olua_fun_dragonBones_TextureData_rotated, _olua_fun_dragonBones_TextureData_rotated); - olua_endinvoke(L); + return 1; +} - return 0; +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_db_TextureData(lua_State *L) +{ + olua_require(L, "dragonbones", luaopen_dragonbones); + if (!olua_getclass(L, "db.TextureData")) { + luaL_error(L, "class not found: dragonBones::TextureData"); + } + return 1; } +OLUA_END_DECLS -static int _dragonBones_ArmatureData_addConstraint(lua_State *L) +static int _olua_fun_dragonBones_ArmatureData_aabb$1(lua_State *L) { olua_startinvoke(L); dragonBones::ArmatureData *self = nullptr; - dragonBones::ConstraintData *arg1 = nullptr; /** value */ olua_to_object(L, 1, &self, "db.ArmatureData"); - olua_check_object(L, 2, &arg1, "db.ConstraintData"); - // void addConstraint(dragonBones::ConstraintData *value) - self->addConstraint(arg1); + // dragonBones::Rectangle aabb + dragonBones::Rectangle &ret = self->aabb; + int num_ret = olua_copy_object(L, ret, "db.Rectangle"); olua_endinvoke(L); - return 0; + return num_ret; } -static int _dragonBones_ArmatureData_addSkin(lua_State *L) +static int _olua_fun_dragonBones_ArmatureData_aabb$2(lua_State *L) { olua_startinvoke(L); dragonBones::ArmatureData *self = nullptr; - dragonBones::SkinData *arg1 = nullptr; /** value */ + dragonBones::Rectangle *arg1; /** aabb */ olua_to_object(L, 1, &self, "db.ArmatureData"); - olua_check_object(L, 2, &arg1, "db.SkinData"); + olua_check_object(L, 2, &arg1, "db.Rectangle"); - // void addSkin(dragonBones::SkinData *value) - self->addSkin(arg1); + // dragonBones::Rectangle aabb + self->aabb = *arg1; olua_endinvoke(L); return 0; } -static int _dragonBones_ArmatureData_addSlot(lua_State *L) +static int _olua_fun_dragonBones_ArmatureData_aabb(lua_State *L) { - olua_startinvoke(L); - - dragonBones::ArmatureData *self = nullptr; - dragonBones::SlotData *arg1 = nullptr; /** value */ + int num_args = lua_gettop(L) - 1; - olua_to_object(L, 1, &self, "db.ArmatureData"); - olua_check_object(L, 2, &arg1, "db.SlotData"); + if (num_args == 0) { + // dragonBones::Rectangle aabb + return _olua_fun_dragonBones_ArmatureData_aabb$1(L); + } - // void addSlot(dragonBones::SlotData *value) - self->addSlot(arg1); + if (num_args == 1) { + // if ((olua_is_object(L, 2, "db.Rectangle"))) { + // dragonBones::Rectangle aabb + return _olua_fun_dragonBones_ArmatureData_aabb$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'dragonBones::ArmatureData::aabb' not support '%d' arguments", num_args); return 0; } -static int _dragonBones_ArmatureData_cacheFrames(lua_State *L) +static int _olua_fun_dragonBones_ArmatureData_actions$1(lua_State *L) { olua_startinvoke(L); dragonBones::ArmatureData *self = nullptr; - unsigned int arg1 = 0; /** frameRate */ olua_to_object(L, 1, &self, "db.ArmatureData"); - olua_check_integer(L, 2, &arg1); - // void cacheFrames(unsigned int frameRate) - self->cacheFrames(arg1); + // std::vector actions + std::vector &ret = self->actions; + int num_ret = olua_push_array(L, ret, [L](dragonBones::ActionData *arg1) { + olua_push_object(L, arg1, "db.ActionData"); + }); olua_endinvoke(L); - return 0; + return num_ret; } -static int _dragonBones_ArmatureData_getAABB(lua_State *L) +static int _olua_fun_dragonBones_ArmatureData_actions$2(lua_State *L) { olua_startinvoke(L); dragonBones::ArmatureData *self = nullptr; + std::vector arg1; /** actions */ olua_to_object(L, 1, &self, "db.ArmatureData"); + olua_check_array(L, 2, arg1, [L](dragonBones::ActionData **arg1) { + olua_check_object(L, -1, arg1, "db.ActionData"); + }); - // dragonBones::Rectangle *getAABB() - dragonBones::Rectangle *ret = self->getAABB(); - int num_ret = olua_push_object(L, ret, "db.Rectangle"); + // std::vector actions + self->actions = arg1; olua_endinvoke(L); - return num_ret; + return 0; } -static int _dragonBones_ArmatureData_getActions(lua_State *L) +static int _olua_fun_dragonBones_ArmatureData_actions(lua_State *L) { - olua_startinvoke(L); - - dragonBones::ArmatureData *self = nullptr; + int num_args = lua_gettop(L) - 1; - olua_to_object(L, 1, &self, "db.ArmatureData"); + if (num_args == 0) { + // std::vector actions + return _olua_fun_dragonBones_ArmatureData_actions$1(L); + } - // const std::vector &getActions() - const std::vector &ret = self->getActions(); - int num_ret = olua_push_array(L, ret, [L](dragonBones::ActionData *arg1) { - olua_push_object(L, arg1, "db.ActionData"); - }); + if (num_args == 1) { + // if ((olua_is_array(L, 2))) { + // std::vector actions + return _olua_fun_dragonBones_ArmatureData_actions$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'dragonBones::ArmatureData::actions' not support '%d' arguments", num_args); - return num_ret; + return 0; } -static int _dragonBones_ArmatureData_getAnimation(lua_State *L) +static int _olua_fun_dragonBones_ArmatureData_addAction(lua_State *L) { olua_startinvoke(L); dragonBones::ArmatureData *self = nullptr; - std::string arg1; /** animationName */ + dragonBones::ActionData *arg1 = nullptr; /** value */ + bool arg2 = false; /** isDefault */ olua_to_object(L, 1, &self, "db.ArmatureData"); - olua_check_string(L, 2, &arg1); + olua_check_object(L, 2, &arg1, "db.ActionData"); + olua_check_bool(L, 3, &arg2); - // dragonBones::AnimationData *getAnimation(const std::string &animationName) - dragonBones::AnimationData *ret = self->getAnimation(arg1); - int num_ret = olua_push_object(L, ret, "db.AnimationData"); + // void addAction(dragonBones::ActionData *value, bool isDefault) + self->addAction(arg1, arg2); olua_endinvoke(L); - return num_ret; + return 0; } -static int _dragonBones_ArmatureData_getAnimationNames(lua_State *L) +static int _olua_fun_dragonBones_ArmatureData_addAnimation(lua_State *L) { olua_startinvoke(L); dragonBones::ArmatureData *self = nullptr; + dragonBones::AnimationData *arg1 = nullptr; /** value */ olua_to_object(L, 1, &self, "db.ArmatureData"); + olua_check_object(L, 2, &arg1, "db.AnimationData"); - // const std::vector &getAnimationNames() - const std::vector &ret = self->getAnimationNames(); - int num_ret = olua_push_array(L, ret, [L](std::string &arg1) { - olua_push_string(L, arg1); - }); + // void addAnimation(dragonBones::AnimationData *value) + self->addAnimation(arg1); olua_endinvoke(L); - return num_ret; + return 0; } -static int _dragonBones_ArmatureData_getBone(lua_State *L) +static int _olua_fun_dragonBones_ArmatureData_addBone(lua_State *L) { olua_startinvoke(L); dragonBones::ArmatureData *self = nullptr; - std::string arg1; /** boneName */ + dragonBones::BoneData *arg1 = nullptr; /** value */ olua_to_object(L, 1, &self, "db.ArmatureData"); - olua_check_string(L, 2, &arg1); + olua_check_object(L, 2, &arg1, "db.BoneData"); - // dragonBones::BoneData *getBone(const std::string &boneName) - dragonBones::BoneData *ret = self->getBone(arg1); - int num_ret = olua_push_object(L, ret, "db.BoneData"); + // void addBone(dragonBones::BoneData *value) + self->addBone(arg1); olua_endinvoke(L); - return num_ret; + return 0; } -static int _dragonBones_ArmatureData_getConstraint(lua_State *L) +static int _olua_fun_dragonBones_ArmatureData_addConstraint(lua_State *L) { olua_startinvoke(L); dragonBones::ArmatureData *self = nullptr; - std::string arg1; /** constraintName */ + dragonBones::ConstraintData *arg1 = nullptr; /** value */ olua_to_object(L, 1, &self, "db.ArmatureData"); - olua_check_string(L, 2, &arg1); + olua_check_object(L, 2, &arg1, "db.ConstraintData"); - // dragonBones::ConstraintData *getConstraint(const std::string &constraintName) - dragonBones::ConstraintData *ret = self->getConstraint(arg1); - int num_ret = olua_push_object(L, ret, "db.ConstraintData"); + // void addConstraint(dragonBones::ConstraintData *value) + self->addConstraint(arg1); olua_endinvoke(L); - return num_ret; + return 0; } -static int _dragonBones_ArmatureData_getDefaultActions(lua_State *L) +static int _olua_fun_dragonBones_ArmatureData_addSkin(lua_State *L) { olua_startinvoke(L); dragonBones::ArmatureData *self = nullptr; + dragonBones::SkinData *arg1 = nullptr; /** value */ olua_to_object(L, 1, &self, "db.ArmatureData"); + olua_check_object(L, 2, &arg1, "db.SkinData"); - // const std::vector &getDefaultActions() - const std::vector &ret = self->getDefaultActions(); - int num_ret = olua_push_array(L, ret, [L](dragonBones::ActionData *arg1) { - olua_push_object(L, arg1, "db.ActionData"); - }); + // void addSkin(dragonBones::SkinData *value) + self->addSkin(arg1); olua_endinvoke(L); - return num_ret; + return 0; } -static int _dragonBones_ArmatureData_getDefaultAnimation(lua_State *L) +static int _olua_fun_dragonBones_ArmatureData_addSlot(lua_State *L) { olua_startinvoke(L); dragonBones::ArmatureData *self = nullptr; + dragonBones::SlotData *arg1 = nullptr; /** value */ olua_to_object(L, 1, &self, "db.ArmatureData"); + olua_check_object(L, 2, &arg1, "db.SlotData"); - // dragonBones::AnimationData *getDefaultAnimation() - dragonBones::AnimationData *ret = self->getDefaultAnimation(); - int num_ret = olua_push_object(L, ret, "db.AnimationData"); + // void addSlot(dragonBones::SlotData *value) + self->addSlot(arg1); olua_endinvoke(L); - return num_ret; + return 0; } -static int _dragonBones_ArmatureData_getDefaultSkin(lua_State *L) +static int _olua_fun_dragonBones_ArmatureData_animationNames$1(lua_State *L) { olua_startinvoke(L); @@ -6571,90 +8325,121 @@ static int _dragonBones_ArmatureData_getDefaultSkin(lua_State *L) olua_to_object(L, 1, &self, "db.ArmatureData"); - // dragonBones::SkinData *getDefaultSkin() - dragonBones::SkinData *ret = self->getDefaultSkin(); - int num_ret = olua_push_object(L, ret, "db.SkinData"); + // std::vector animationNames + std::vector &ret = self->animationNames; + int num_ret = olua_push_array(L, ret, [L](std::string &arg1) { + olua_push_string(L, arg1); + }); olua_endinvoke(L); return num_ret; } -static int _dragonBones_ArmatureData_getParent(lua_State *L) +static int _olua_fun_dragonBones_ArmatureData_animationNames$2(lua_State *L) { olua_startinvoke(L); dragonBones::ArmatureData *self = nullptr; + std::vector arg1; /** animationNames */ olua_to_object(L, 1, &self, "db.ArmatureData"); + olua_check_array(L, 2, arg1, [L](std::string *arg1) { + olua_check_string(L, -1, arg1); + }); - // const dragonBones::DragonBonesData *getParent() - const dragonBones::DragonBonesData *ret = self->getParent(); - int num_ret = olua_push_object(L, ret, "db.DragonBonesData"); + // std::vector animationNames + self->animationNames = arg1; olua_endinvoke(L); - return num_ret; + return 0; } -static int _dragonBones_ArmatureData_getSkin(lua_State *L) +static int _olua_fun_dragonBones_ArmatureData_animationNames(lua_State *L) { - olua_startinvoke(L); - - dragonBones::ArmatureData *self = nullptr; - std::string arg1; /** skinName */ + int num_args = lua_gettop(L) - 1; - olua_to_object(L, 1, &self, "db.ArmatureData"); - olua_check_string(L, 2, &arg1); + if (num_args == 0) { + // std::vector animationNames + return _olua_fun_dragonBones_ArmatureData_animationNames$1(L); + } - // dragonBones::SkinData *getSkin(const std::string &skinName) - dragonBones::SkinData *ret = self->getSkin(arg1); - int num_ret = olua_push_object(L, ret, "db.SkinData"); + if (num_args == 1) { + // if ((olua_is_array(L, 2))) { + // std::vector animationNames + return _olua_fun_dragonBones_ArmatureData_animationNames$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'dragonBones::ArmatureData::animationNames' not support '%d' arguments", num_args); - return num_ret; + return 0; } -static int _dragonBones_ArmatureData_getSlot(lua_State *L) +static int _olua_fun_dragonBones_ArmatureData_animations$1(lua_State *L) { olua_startinvoke(L); dragonBones::ArmatureData *self = nullptr; - std::string arg1; /** slotName */ olua_to_object(L, 1, &self, "db.ArmatureData"); - olua_check_string(L, 2, &arg1); - // dragonBones::SlotData *getSlot(const std::string &slotName) - dragonBones::SlotData *ret = self->getSlot(arg1); - int num_ret = olua_push_object(L, ret, "db.SlotData"); + // std::map animations + std::map &ret = self->animations; + int num_ret = olua_push_map(L, ret, [L](std::string &arg1, dragonBones::AnimationData *arg2) { + olua_push_string(L, arg1); + olua_push_object(L, arg2, "db.AnimationData"); + }); olua_endinvoke(L); return num_ret; } -static int _dragonBones_ArmatureData_getSortedBones(lua_State *L) +static int _olua_fun_dragonBones_ArmatureData_animations$2(lua_State *L) { olua_startinvoke(L); dragonBones::ArmatureData *self = nullptr; + std::map arg1; /** animations */ olua_to_object(L, 1, &self, "db.ArmatureData"); - - // const std::vector &getSortedBones() - const std::vector &ret = self->getSortedBones(); - int num_ret = olua_push_array(L, ret, [L](dragonBones::BoneData *arg1) { - olua_push_object(L, arg1, "db.BoneData"); + olua_check_map(L, 2, arg1, [L](std::string *arg1, dragonBones::AnimationData **arg2) { + olua_check_string(L, -1, arg1); + olua_check_object(L, -2, arg2, "db.AnimationData"); }); + // std::map animations + self->animations = arg1; + olua_endinvoke(L); - return num_ret; + return 0; +} + +static int _olua_fun_dragonBones_ArmatureData_animations(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // std::map animations + return _olua_fun_dragonBones_ArmatureData_animations$1(L); + } + + if (num_args == 1) { + // if ((olua_is_map(L, 2))) { + // std::map animations + return _olua_fun_dragonBones_ArmatureData_animations$2(L); + // } + } + + luaL_error(L, "method 'dragonBones::ArmatureData::animations' not support '%d' arguments", num_args); + + return 0; } -static int _dragonBones_ArmatureData_getSortedSlots(lua_State *L) +static int _olua_fun_dragonBones_ArmatureData_bones$1(lua_State *L) { olua_startinvoke(L); @@ -6662,10 +8447,11 @@ static int _dragonBones_ArmatureData_getSortedSlots(lua_State *L) olua_to_object(L, 1, &self, "db.ArmatureData"); - // const std::vector &getSortedSlots() - const std::vector &ret = self->getSortedSlots(); - int num_ret = olua_push_array(L, ret, [L](dragonBones::SlotData *arg1) { - olua_push_object(L, arg1, "db.SlotData"); + // std::map bones + std::map &ret = self->bones; + int num_ret = olua_push_map(L, ret, [L](std::string &arg1, dragonBones::BoneData *arg2) { + olua_push_string(L, arg1); + olua_push_object(L, arg2, "db.BoneData"); }); olua_endinvoke(L); @@ -6673,29 +8459,58 @@ static int _dragonBones_ArmatureData_getSortedSlots(lua_State *L) return num_ret; } -static int _dragonBones_ArmatureData_getType(lua_State *L) +static int _olua_fun_dragonBones_ArmatureData_bones$2(lua_State *L) { olua_startinvoke(L); dragonBones::ArmatureData *self = nullptr; + std::map arg1; /** bones */ olua_to_object(L, 1, &self, "db.ArmatureData"); + olua_check_map(L, 2, arg1, [L](std::string *arg1, dragonBones::BoneData **arg2) { + olua_check_string(L, -1, arg1); + olua_check_object(L, -2, arg2, "db.BoneData"); + }); - // int getType() - int ret = self->getType(); - int num_ret = olua_push_integer(L, ret); + // std::map bones + self->bones = arg1; olua_endinvoke(L); - return num_ret; + return 0; +} + +static int _olua_fun_dragonBones_ArmatureData_bones(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // std::map bones + return _olua_fun_dragonBones_ArmatureData_bones$1(L); + } + + if (num_args == 1) { + // if ((olua_is_map(L, 2))) { + // std::map bones + return _olua_fun_dragonBones_ArmatureData_bones$2(L); + // } + } + + luaL_error(L, "method 'dragonBones::ArmatureData::bones' not support '%d' arguments", num_args); + + return 0; } -static int _dragonBones_ArmatureData_getTypeIndex(lua_State *L) +static int _olua_fun_dragonBones_ArmatureData_cacheFrameRate$1(lua_State *L) { olua_startinvoke(L); - // static std::size_t getTypeIndex() - std::size_t ret = dragonBones::ArmatureData::getTypeIndex(); + dragonBones::ArmatureData *self = nullptr; + + olua_to_object(L, 1, &self, "db.ArmatureData"); + + // unsigned int cacheFrameRate + unsigned int ret = self->cacheFrameRate; int num_ret = olua_push_integer(L, ret); olua_endinvoke(L); @@ -6703,179 +8518,182 @@ static int _dragonBones_ArmatureData_getTypeIndex(lua_State *L) return num_ret; } -static int _dragonBones_ArmatureData_getUserData(lua_State *L) +static int _olua_fun_dragonBones_ArmatureData_cacheFrameRate$2(lua_State *L) { olua_startinvoke(L); dragonBones::ArmatureData *self = nullptr; + unsigned int arg1 = 0; /** cacheFrameRate */ olua_to_object(L, 1, &self, "db.ArmatureData"); + olua_check_integer(L, 2, &arg1); - // const dragonBones::UserData *getUserData() - const dragonBones::UserData *ret = self->getUserData(); - int num_ret = olua_push_object(L, ret, "db.UserData"); + // unsigned int cacheFrameRate + self->cacheFrameRate = arg1; olua_endinvoke(L); - return num_ret; + return 0; } -static int _dragonBones_ArmatureData_new(lua_State *L) +static int _olua_fun_dragonBones_ArmatureData_cacheFrameRate(lua_State *L) { - olua_startinvoke(L); + int num_args = lua_gettop(L) - 1; - // ArmatureData() - dragonBones::ArmatureData *ret = new dragonBones::ArmatureData(); - int num_ret = olua_push_object(L, ret, "db.ArmatureData"); - olua_postnew(L, ret); + if (num_args == 0) { + // unsigned int cacheFrameRate + return _olua_fun_dragonBones_ArmatureData_cacheFrameRate$1(L); + } - olua_endinvoke(L); + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // unsigned int cacheFrameRate + return _olua_fun_dragonBones_ArmatureData_cacheFrameRate$2(L); + // } + } - return num_ret; + luaL_error(L, "method 'dragonBones::ArmatureData::cacheFrameRate' not support '%d' arguments", num_args); + + return 0; } -static int _dragonBones_ArmatureData_setDefaultAnimation(lua_State *L) +static int _olua_fun_dragonBones_ArmatureData_cacheFrames(lua_State *L) { olua_startinvoke(L); dragonBones::ArmatureData *self = nullptr; - dragonBones::AnimationData *arg1 = nullptr; /** value */ + unsigned int arg1 = 0; /** frameRate */ olua_to_object(L, 1, &self, "db.ArmatureData"); - olua_check_object(L, 2, &arg1, "db.AnimationData"); + olua_check_integer(L, 2, &arg1); - // void setDefaultAnimation(dragonBones::AnimationData *value) - self->setDefaultAnimation(arg1); + // void cacheFrames(unsigned int frameRate) + self->cacheFrames(arg1); olua_endinvoke(L); return 0; } -static int _dragonBones_ArmatureData_setDefaultSkin(lua_State *L) +static int _olua_fun_dragonBones_ArmatureData_canvas$1(lua_State *L) { olua_startinvoke(L); dragonBones::ArmatureData *self = nullptr; - dragonBones::SkinData *arg1 = nullptr; /** value */ olua_to_object(L, 1, &self, "db.ArmatureData"); - olua_check_object(L, 2, &arg1, "db.SkinData"); - // void setDefaultSkin(dragonBones::SkinData *value) - self->setDefaultSkin(arg1); + // dragonBones::CanvasData *canvas + dragonBones::CanvasData *ret = self->canvas; + int num_ret = olua_push_object(L, ret, "db.CanvasData"); olua_endinvoke(L); - return 0; + return num_ret; } -static int _dragonBones_ArmatureData_setParent(lua_State *L) +static int _olua_fun_dragonBones_ArmatureData_canvas$2(lua_State *L) { olua_startinvoke(L); dragonBones::ArmatureData *self = nullptr; - dragonBones::DragonBonesData *arg1 = nullptr; /** value */ + dragonBones::CanvasData *arg1 = nullptr; /** canvas */ olua_to_object(L, 1, &self, "db.ArmatureData"); - olua_check_object(L, 2, &arg1, "db.DragonBonesData"); + olua_check_object(L, 2, &arg1, "db.CanvasData"); - // void setParent(dragonBones::DragonBonesData *value) - self->setParent(arg1); + // dragonBones::CanvasData *canvas + self->canvas = arg1; olua_endinvoke(L); return 0; } -static int _dragonBones_ArmatureData_setType(lua_State *L) +static int _olua_fun_dragonBones_ArmatureData_canvas(lua_State *L) { - olua_startinvoke(L); - - dragonBones::ArmatureData *self = nullptr; - int arg1 = 0; /** value */ + int num_args = lua_gettop(L) - 1; - olua_to_object(L, 1, &self, "db.ArmatureData"); - olua_check_integer(L, 2, &arg1); + if (num_args == 0) { + // dragonBones::CanvasData *canvas + return _olua_fun_dragonBones_ArmatureData_canvas$1(L); + } - // void setType(int value) - self->setType(arg1); + if (num_args == 1) { + // if ((olua_is_object(L, 2, "db.CanvasData"))) { + // dragonBones::CanvasData *canvas + return _olua_fun_dragonBones_ArmatureData_canvas$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'dragonBones::ArmatureData::canvas' not support '%d' arguments", num_args); return 0; } -static int _dragonBones_ArmatureData_setUserData(lua_State *L) +static int _olua_fun_dragonBones_ArmatureData_constraints$1(lua_State *L) { olua_startinvoke(L); dragonBones::ArmatureData *self = nullptr; - dragonBones::UserData *arg1 = nullptr; /** value */ olua_to_object(L, 1, &self, "db.ArmatureData"); - olua_check_object(L, 2, &arg1, "db.UserData"); - // void setUserData(dragonBones::UserData *value) - self->setUserData(arg1); + // std::map constraints + std::map &ret = self->constraints; + int num_ret = olua_push_map(L, ret, [L](std::string &arg1, dragonBones::ConstraintData *arg2) { + olua_push_string(L, arg1); + olua_push_object(L, arg2, "db.ConstraintData"); + }); olua_endinvoke(L); - return 0; + return num_ret; } -static int _dragonBones_ArmatureData_sortBones(lua_State *L) +static int _olua_fun_dragonBones_ArmatureData_constraints$2(lua_State *L) { olua_startinvoke(L); dragonBones::ArmatureData *self = nullptr; + std::map arg1; /** constraints */ olua_to_object(L, 1, &self, "db.ArmatureData"); + olua_check_map(L, 2, arg1, [L](std::string *arg1, dragonBones::ConstraintData **arg2) { + olua_check_string(L, -1, arg1); + olua_check_object(L, -2, arg2, "db.ConstraintData"); + }); - // void sortBones() - self->sortBones(); + // std::map constraints + self->constraints = arg1; olua_endinvoke(L); return 0; } -static int _dragonBones_ArmatureData_get_aabb(lua_State *L) -{ - olua_startinvoke(L); - - dragonBones::ArmatureData *self = nullptr; - - olua_to_object(L, 1, &self, "db.ArmatureData"); - - // dragonBones::Rectangle aabb - dragonBones::Rectangle &ret = self->aabb; - int num_ret = olua_pushcopy_object(L, ret, "db.Rectangle"); - - olua_endinvoke(L); - - return num_ret; -} - -static int _dragonBones_ArmatureData_set_aabb(lua_State *L) +static int _olua_fun_dragonBones_ArmatureData_constraints(lua_State *L) { - olua_startinvoke(L); - - dragonBones::ArmatureData *self = nullptr; - dragonBones::Rectangle arg1; /** aabb */ + int num_args = lua_gettop(L) - 1; - olua_to_object(L, 1, &self, "db.ArmatureData"); - olua_check_object(L, 2, &arg1, "db.Rectangle"); + if (num_args == 0) { + // std::map constraints + return _olua_fun_dragonBones_ArmatureData_constraints$1(L); + } - // dragonBones::Rectangle aabb - self->aabb = arg1; + if (num_args == 1) { + // if ((olua_is_map(L, 2))) { + // std::map constraints + return _olua_fun_dragonBones_ArmatureData_constraints$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'dragonBones::ArmatureData::constraints' not support '%d' arguments", num_args); return 0; } -static int _dragonBones_ArmatureData_get_actions(lua_State *L) +static int _olua_fun_dragonBones_ArmatureData_defaultActions$1(lua_State *L) { olua_startinvoke(L); @@ -6883,8 +8701,8 @@ static int _dragonBones_ArmatureData_get_actions(lua_State *L) olua_to_object(L, 1, &self, "db.ArmatureData"); - // std::vector actions - std::vector &ret = self->actions; + // std::vector defaultActions + std::vector &ret = self->defaultActions; int num_ret = olua_push_array(L, ret, [L](dragonBones::ActionData *arg1) { olua_push_object(L, arg1, "db.ActionData"); }); @@ -6894,107 +8712,104 @@ static int _dragonBones_ArmatureData_get_actions(lua_State *L) return num_ret; } -static int _dragonBones_ArmatureData_set_actions(lua_State *L) +static int _olua_fun_dragonBones_ArmatureData_defaultActions$2(lua_State *L) { olua_startinvoke(L); dragonBones::ArmatureData *self = nullptr; - std::vector arg1; /** actions */ + std::vector arg1; /** defaultActions */ olua_to_object(L, 1, &self, "db.ArmatureData"); olua_check_array(L, 2, arg1, [L](dragonBones::ActionData **arg1) { olua_check_object(L, -1, arg1, "db.ActionData"); }); - // std::vector actions - self->actions = arg1; + // std::vector defaultActions + self->defaultActions = arg1; olua_endinvoke(L); return 0; } -static int _dragonBones_ArmatureData_get_animationNames(lua_State *L) +static int _olua_fun_dragonBones_ArmatureData_defaultActions(lua_State *L) { - olua_startinvoke(L); - - dragonBones::ArmatureData *self = nullptr; + int num_args = lua_gettop(L) - 1; - olua_to_object(L, 1, &self, "db.ArmatureData"); + if (num_args == 0) { + // std::vector defaultActions + return _olua_fun_dragonBones_ArmatureData_defaultActions$1(L); + } - // std::vector animationNames - std::vector &ret = self->animationNames; - int num_ret = olua_push_array(L, ret, [L](std::string &arg1) { - olua_push_string(L, arg1); - }); + if (num_args == 1) { + // if ((olua_is_array(L, 2))) { + // std::vector defaultActions + return _olua_fun_dragonBones_ArmatureData_defaultActions$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'dragonBones::ArmatureData::defaultActions' not support '%d' arguments", num_args); - return num_ret; + return 0; } -static int _dragonBones_ArmatureData_set_animationNames(lua_State *L) +static int _olua_fun_dragonBones_ArmatureData_defaultAnimation$1(lua_State *L) { olua_startinvoke(L); dragonBones::ArmatureData *self = nullptr; - std::vector arg1; /** animationNames */ olua_to_object(L, 1, &self, "db.ArmatureData"); - olua_check_array(L, 2, arg1, [L](std::string *arg1) { - olua_check_string(L, -1, arg1); - }); - // std::vector animationNames - self->animationNames = arg1; + // dragonBones::AnimationData *defaultAnimation + dragonBones::AnimationData *ret = self->defaultAnimation; + int num_ret = olua_push_object(L, ret, "db.AnimationData"); olua_endinvoke(L); - return 0; + return num_ret; } -static int _dragonBones_ArmatureData_get_animations(lua_State *L) +static int _olua_fun_dragonBones_ArmatureData_defaultAnimation$2(lua_State *L) { olua_startinvoke(L); dragonBones::ArmatureData *self = nullptr; + dragonBones::AnimationData *arg1 = nullptr; /** defaultAnimation */ olua_to_object(L, 1, &self, "db.ArmatureData"); + olua_check_object(L, 2, &arg1, "db.AnimationData"); - // std::map animations - std::map &ret = self->animations; - int num_ret = olua_push_map(L, ret, [L](std::string &arg1, dragonBones::AnimationData *arg2) { - olua_push_string(L, arg1); - olua_push_object(L, arg2, "db.AnimationData"); - }); + // dragonBones::AnimationData *defaultAnimation + self->defaultAnimation = arg1; olua_endinvoke(L); - return num_ret; + return 0; } -static int _dragonBones_ArmatureData_set_animations(lua_State *L) +static int _olua_fun_dragonBones_ArmatureData_defaultAnimation(lua_State *L) { - olua_startinvoke(L); - - dragonBones::ArmatureData *self = nullptr; - std::map arg1; /** animations */ + int num_args = lua_gettop(L) - 1; - olua_to_object(L, 1, &self, "db.ArmatureData"); - olua_check_map(L, 2, arg1, [L](std::string *arg1, dragonBones::AnimationData **arg2) { - olua_check_string(L, -1, arg1); - olua_check_object(L, -2, arg2, "db.AnimationData"); - }); + if (num_args == 0) { + // dragonBones::AnimationData *defaultAnimation + return _olua_fun_dragonBones_ArmatureData_defaultAnimation$1(L); + } - // std::map animations - self->animations = arg1; + if (num_args == 1) { + // if ((olua_is_object(L, 2, "db.AnimationData"))) { + // dragonBones::AnimationData *defaultAnimation + return _olua_fun_dragonBones_ArmatureData_defaultAnimation$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'dragonBones::ArmatureData::defaultAnimation' not support '%d' arguments", num_args); return 0; } -static int _dragonBones_ArmatureData_get_bones(lua_State *L) +static int _olua_fun_dragonBones_ArmatureData_defaultSkin$1(lua_State *L) { olua_startinvoke(L); @@ -7002,40 +8817,55 @@ static int _dragonBones_ArmatureData_get_bones(lua_State *L) olua_to_object(L, 1, &self, "db.ArmatureData"); - // std::map bones - std::map &ret = self->bones; - int num_ret = olua_push_map(L, ret, [L](std::string &arg1, dragonBones::BoneData *arg2) { - olua_push_string(L, arg1); - olua_push_object(L, arg2, "db.BoneData"); - }); + // dragonBones::SkinData *defaultSkin + dragonBones::SkinData *ret = self->defaultSkin; + int num_ret = olua_push_object(L, ret, "db.SkinData"); olua_endinvoke(L); return num_ret; } -static int _dragonBones_ArmatureData_set_bones(lua_State *L) +static int _olua_fun_dragonBones_ArmatureData_defaultSkin$2(lua_State *L) { olua_startinvoke(L); dragonBones::ArmatureData *self = nullptr; - std::map arg1; /** bones */ + dragonBones::SkinData *arg1 = nullptr; /** defaultSkin */ olua_to_object(L, 1, &self, "db.ArmatureData"); - olua_check_map(L, 2, arg1, [L](std::string *arg1, dragonBones::BoneData **arg2) { - olua_check_string(L, -1, arg1); - olua_check_object(L, -2, arg2, "db.BoneData"); - }); + olua_check_object(L, 2, &arg1, "db.SkinData"); - // std::map bones - self->bones = arg1; + // dragonBones::SkinData *defaultSkin + self->defaultSkin = arg1; olua_endinvoke(L); return 0; } -static int _dragonBones_ArmatureData_get_cacheFrameRate(lua_State *L) +static int _olua_fun_dragonBones_ArmatureData_defaultSkin(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // dragonBones::SkinData *defaultSkin + return _olua_fun_dragonBones_ArmatureData_defaultSkin$1(L); + } + + if (num_args == 1) { + // if ((olua_is_object(L, 2, "db.SkinData"))) { + // dragonBones::SkinData *defaultSkin + return _olua_fun_dragonBones_ArmatureData_defaultSkin$2(L); + // } + } + + luaL_error(L, "method 'dragonBones::ArmatureData::defaultSkin' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_dragonBones_ArmatureData_frameRate$1(lua_State *L) { olua_startinvoke(L); @@ -7043,8 +8873,8 @@ static int _dragonBones_ArmatureData_get_cacheFrameRate(lua_State *L) olua_to_object(L, 1, &self, "db.ArmatureData"); - // unsigned int cacheFrameRate - unsigned int ret = self->cacheFrameRate; + // unsigned int frameRate + unsigned int ret = self->frameRate; int num_ret = olua_push_integer(L, ret); olua_endinvoke(L); @@ -7052,60 +8882,63 @@ static int _dragonBones_ArmatureData_get_cacheFrameRate(lua_State *L) return num_ret; } -static int _dragonBones_ArmatureData_set_cacheFrameRate(lua_State *L) +static int _olua_fun_dragonBones_ArmatureData_frameRate$2(lua_State *L) { olua_startinvoke(L); dragonBones::ArmatureData *self = nullptr; - unsigned int arg1 = 0; /** cacheFrameRate */ + unsigned int arg1 = 0; /** frameRate */ olua_to_object(L, 1, &self, "db.ArmatureData"); olua_check_integer(L, 2, &arg1); - // unsigned int cacheFrameRate - self->cacheFrameRate = arg1; + // unsigned int frameRate + self->frameRate = arg1; olua_endinvoke(L); return 0; } -static int _dragonBones_ArmatureData_get_canvas(lua_State *L) +static int _olua_fun_dragonBones_ArmatureData_frameRate(lua_State *L) { - olua_startinvoke(L); - - dragonBones::ArmatureData *self = nullptr; + int num_args = lua_gettop(L) - 1; - olua_to_object(L, 1, &self, "db.ArmatureData"); + if (num_args == 0) { + // unsigned int frameRate + return _olua_fun_dragonBones_ArmatureData_frameRate$1(L); + } - // dragonBones::CanvasData *canvas - dragonBones::CanvasData *ret = self->canvas; - int num_ret = olua_push_object(L, ret, "db.CanvasData"); + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // unsigned int frameRate + return _olua_fun_dragonBones_ArmatureData_frameRate$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'dragonBones::ArmatureData::frameRate' not support '%d' arguments", num_args); - return num_ret; + return 0; } -static int _dragonBones_ArmatureData_set_canvas(lua_State *L) +static int _olua_fun_dragonBones_ArmatureData_getAABB(lua_State *L) { olua_startinvoke(L); dragonBones::ArmatureData *self = nullptr; - dragonBones::CanvasData *arg1 = nullptr; /** canvas */ olua_to_object(L, 1, &self, "db.ArmatureData"); - olua_check_object(L, 2, &arg1, "db.CanvasData"); - // dragonBones::CanvasData *canvas - self->canvas = arg1; + // dragonBones::Rectangle *getAABB() + dragonBones::Rectangle *ret = self->getAABB(); + int num_ret = olua_push_object(L, ret, "db.Rectangle"); olua_endinvoke(L); - return 0; + return num_ret; } -static int _dragonBones_ArmatureData_get_constraints(lua_State *L) +static int _olua_fun_dragonBones_ArmatureData_getActions(lua_State *L) { olua_startinvoke(L); @@ -7113,11 +8946,10 @@ static int _dragonBones_ArmatureData_get_constraints(lua_State *L) olua_to_object(L, 1, &self, "db.ArmatureData"); - // std::map constraints - std::map &ret = self->constraints; - int num_ret = olua_push_map(L, ret, [L](std::string &arg1, dragonBones::ConstraintData *arg2) { - olua_push_string(L, arg1); - olua_push_object(L, arg2, "db.ConstraintData"); + // const std::vector &getActions() + const std::vector &ret = self->getActions(); + int num_ret = olua_push_array(L, ret, [L](dragonBones::ActionData *arg1) { + olua_push_object(L, arg1, "db.ActionData"); }); olua_endinvoke(L); @@ -7125,28 +8957,26 @@ static int _dragonBones_ArmatureData_get_constraints(lua_State *L) return num_ret; } -static int _dragonBones_ArmatureData_set_constraints(lua_State *L) +static int _olua_fun_dragonBones_ArmatureData_getAnimation(lua_State *L) { olua_startinvoke(L); dragonBones::ArmatureData *self = nullptr; - std::map arg1; /** constraints */ + std::string arg1; /** animationName */ olua_to_object(L, 1, &self, "db.ArmatureData"); - olua_check_map(L, 2, arg1, [L](std::string *arg1, dragonBones::ConstraintData **arg2) { - olua_check_string(L, -1, arg1); - olua_check_object(L, -2, arg2, "db.ConstraintData"); - }); + olua_check_string(L, 2, &arg1); - // std::map constraints - self->constraints = arg1; + // dragonBones::AnimationData *getAnimation(const std::string &animationName) + dragonBones::AnimationData *ret = self->getAnimation(arg1); + int num_ret = olua_push_object(L, ret, "db.AnimationData"); olua_endinvoke(L); - return 0; + return num_ret; } -static int _dragonBones_ArmatureData_get_defaultActions(lua_State *L) +static int _olua_fun_dragonBones_ArmatureData_getAnimationNames(lua_State *L) { olua_startinvoke(L); @@ -7154,10 +8984,10 @@ static int _dragonBones_ArmatureData_get_defaultActions(lua_State *L) olua_to_object(L, 1, &self, "db.ArmatureData"); - // std::vector defaultActions - std::vector &ret = self->defaultActions; - int num_ret = olua_push_array(L, ret, [L](dragonBones::ActionData *arg1) { - olua_push_object(L, arg1, "db.ActionData"); + // const std::vector &getAnimationNames() + const std::vector &ret = self->getAnimationNames(); + int num_ret = olua_push_array(L, ret, [L](std::string &arg1) { + olua_push_string(L, arg1); }); olua_endinvoke(L); @@ -7165,62 +8995,64 @@ static int _dragonBones_ArmatureData_get_defaultActions(lua_State *L) return num_ret; } -static int _dragonBones_ArmatureData_set_defaultActions(lua_State *L) +static int _olua_fun_dragonBones_ArmatureData_getBone(lua_State *L) { olua_startinvoke(L); dragonBones::ArmatureData *self = nullptr; - std::vector arg1; /** defaultActions */ + std::string arg1; /** boneName */ olua_to_object(L, 1, &self, "db.ArmatureData"); - olua_check_array(L, 2, arg1, [L](dragonBones::ActionData **arg1) { - olua_check_object(L, -1, arg1, "db.ActionData"); - }); + olua_check_string(L, 2, &arg1); - // std::vector defaultActions - self->defaultActions = arg1; + // dragonBones::BoneData *getBone(const std::string &boneName) + dragonBones::BoneData *ret = self->getBone(arg1); + int num_ret = olua_push_object(L, ret, "db.BoneData"); olua_endinvoke(L); - return 0; + return num_ret; } -static int _dragonBones_ArmatureData_get_defaultAnimation(lua_State *L) +static int _olua_fun_dragonBones_ArmatureData_getConstraint(lua_State *L) { olua_startinvoke(L); dragonBones::ArmatureData *self = nullptr; + std::string arg1; /** constraintName */ olua_to_object(L, 1, &self, "db.ArmatureData"); + olua_check_string(L, 2, &arg1); - // dragonBones::AnimationData *defaultAnimation - dragonBones::AnimationData *ret = self->defaultAnimation; - int num_ret = olua_push_object(L, ret, "db.AnimationData"); + // dragonBones::ConstraintData *getConstraint(const std::string &constraintName) + dragonBones::ConstraintData *ret = self->getConstraint(arg1); + int num_ret = olua_push_object(L, ret, "db.ConstraintData"); olua_endinvoke(L); return num_ret; } -static int _dragonBones_ArmatureData_set_defaultAnimation(lua_State *L) +static int _olua_fun_dragonBones_ArmatureData_getDefaultActions(lua_State *L) { olua_startinvoke(L); dragonBones::ArmatureData *self = nullptr; - dragonBones::AnimationData *arg1 = nullptr; /** defaultAnimation */ olua_to_object(L, 1, &self, "db.ArmatureData"); - olua_check_object(L, 2, &arg1, "db.AnimationData"); - // dragonBones::AnimationData *defaultAnimation - self->defaultAnimation = arg1; + // const std::vector &getDefaultActions() + const std::vector &ret = self->getDefaultActions(); + int num_ret = olua_push_array(L, ret, [L](dragonBones::ActionData *arg1) { + olua_push_object(L, arg1, "db.ActionData"); + }); olua_endinvoke(L); - return 0; + return num_ret; } -static int _dragonBones_ArmatureData_get_defaultSkin(lua_State *L) +static int _olua_fun_dragonBones_ArmatureData_getDefaultAnimation(lua_State *L) { olua_startinvoke(L); @@ -7228,34 +9060,33 @@ static int _dragonBones_ArmatureData_get_defaultSkin(lua_State *L) olua_to_object(L, 1, &self, "db.ArmatureData"); - // dragonBones::SkinData *defaultSkin - dragonBones::SkinData *ret = self->defaultSkin; - int num_ret = olua_push_object(L, ret, "db.SkinData"); + // dragonBones::AnimationData *getDefaultAnimation() + dragonBones::AnimationData *ret = self->getDefaultAnimation(); + int num_ret = olua_push_object(L, ret, "db.AnimationData"); olua_endinvoke(L); return num_ret; } -static int _dragonBones_ArmatureData_set_defaultSkin(lua_State *L) +static int _olua_fun_dragonBones_ArmatureData_getDefaultSkin(lua_State *L) { olua_startinvoke(L); dragonBones::ArmatureData *self = nullptr; - dragonBones::SkinData *arg1 = nullptr; /** defaultSkin */ olua_to_object(L, 1, &self, "db.ArmatureData"); - olua_check_object(L, 2, &arg1, "db.SkinData"); - // dragonBones::SkinData *defaultSkin - self->defaultSkin = arg1; + // dragonBones::SkinData *getDefaultSkin() + dragonBones::SkinData *ret = self->getDefaultSkin(); + int num_ret = olua_push_object(L, ret, "db.SkinData"); olua_endinvoke(L); - return 0; + return num_ret; } -static int _dragonBones_ArmatureData_get_frameRate(lua_State *L) +static int _olua_fun_dragonBones_ArmatureData_getParent(lua_State *L) { olua_startinvoke(L); @@ -7263,69 +9094,73 @@ static int _dragonBones_ArmatureData_get_frameRate(lua_State *L) olua_to_object(L, 1, &self, "db.ArmatureData"); - // unsigned int frameRate - unsigned int ret = self->frameRate; - int num_ret = olua_push_integer(L, ret); + // const dragonBones::DragonBonesData *getParent() + const dragonBones::DragonBonesData *ret = self->getParent(); + int num_ret = olua_push_object(L, ret, "db.DragonBonesData"); olua_endinvoke(L); return num_ret; } -static int _dragonBones_ArmatureData_set_frameRate(lua_State *L) +static int _olua_fun_dragonBones_ArmatureData_getSkin(lua_State *L) { olua_startinvoke(L); dragonBones::ArmatureData *self = nullptr; - unsigned int arg1 = 0; /** frameRate */ + std::string arg1; /** skinName */ olua_to_object(L, 1, &self, "db.ArmatureData"); - olua_check_integer(L, 2, &arg1); + olua_check_string(L, 2, &arg1); - // unsigned int frameRate - self->frameRate = arg1; + // dragonBones::SkinData *getSkin(const std::string &skinName) + dragonBones::SkinData *ret = self->getSkin(arg1); + int num_ret = olua_push_object(L, ret, "db.SkinData"); olua_endinvoke(L); - return 0; + return num_ret; } -static int _dragonBones_ArmatureData_get_name(lua_State *L) +static int _olua_fun_dragonBones_ArmatureData_getSlot(lua_State *L) { olua_startinvoke(L); dragonBones::ArmatureData *self = nullptr; + std::string arg1; /** slotName */ olua_to_object(L, 1, &self, "db.ArmatureData"); + olua_check_string(L, 2, &arg1); - // std::string name - std::string ret = self->name; - int num_ret = olua_push_string(L, ret); + // dragonBones::SlotData *getSlot(const std::string &slotName) + dragonBones::SlotData *ret = self->getSlot(arg1); + int num_ret = olua_push_object(L, ret, "db.SlotData"); olua_endinvoke(L); return num_ret; } -static int _dragonBones_ArmatureData_set_name(lua_State *L) +static int _olua_fun_dragonBones_ArmatureData_getSortedBones(lua_State *L) { olua_startinvoke(L); dragonBones::ArmatureData *self = nullptr; - std::string arg1; /** name */ olua_to_object(L, 1, &self, "db.ArmatureData"); - olua_check_string(L, 2, &arg1); - // std::string name - self->name = arg1; + // const std::vector &getSortedBones() + const std::vector &ret = self->getSortedBones(); + int num_ret = olua_push_array(L, ret, [L](dragonBones::BoneData *arg1) { + olua_push_object(L, arg1, "db.BoneData"); + }); olua_endinvoke(L); - return 0; + return num_ret; } -static int _dragonBones_ArmatureData_get_parent(lua_State *L) +static int _olua_fun_dragonBones_ArmatureData_getSortedSlots(lua_State *L) { olua_startinvoke(L); @@ -7333,69 +9168,65 @@ static int _dragonBones_ArmatureData_get_parent(lua_State *L) olua_to_object(L, 1, &self, "db.ArmatureData"); - // dragonBones::DragonBonesData *parent - dragonBones::DragonBonesData *ret = self->parent; - int num_ret = olua_push_object(L, ret, "db.DragonBonesData"); + // const std::vector &getSortedSlots() + const std::vector &ret = self->getSortedSlots(); + int num_ret = olua_push_array(L, ret, [L](dragonBones::SlotData *arg1) { + olua_push_object(L, arg1, "db.SlotData"); + }); olua_endinvoke(L); return num_ret; } -static int _dragonBones_ArmatureData_set_parent(lua_State *L) +static int _olua_fun_dragonBones_ArmatureData_getType(lua_State *L) { olua_startinvoke(L); dragonBones::ArmatureData *self = nullptr; - dragonBones::DragonBonesData *arg1 = nullptr; /** parent */ olua_to_object(L, 1, &self, "db.ArmatureData"); - olua_check_object(L, 2, &arg1, "db.DragonBonesData"); - // dragonBones::DragonBonesData *parent - self->parent = arg1; + // int getType() + int ret = self->getType(); + int num_ret = olua_push_integer(L, ret); olua_endinvoke(L); - return 0; + return num_ret; } -static int _dragonBones_ArmatureData_get_scale(lua_State *L) +static int _olua_fun_dragonBones_ArmatureData_getTypeIndex(lua_State *L) { olua_startinvoke(L); - dragonBones::ArmatureData *self = nullptr; - - olua_to_object(L, 1, &self, "db.ArmatureData"); - - // float scale - float ret = self->scale; - int num_ret = olua_push_number(L, ret); + // static std::size_t getTypeIndex() + std::size_t ret = dragonBones::ArmatureData::getTypeIndex(); + int num_ret = olua_push_integer(L, ret); olua_endinvoke(L); return num_ret; } -static int _dragonBones_ArmatureData_set_scale(lua_State *L) +static int _olua_fun_dragonBones_ArmatureData_getUserData(lua_State *L) { olua_startinvoke(L); dragonBones::ArmatureData *self = nullptr; - float arg1 = 0; /** scale */ olua_to_object(L, 1, &self, "db.ArmatureData"); - olua_check_number(L, 2, &arg1); - // float scale - self->scale = arg1; + // const dragonBones::UserData *getUserData() + const dragonBones::UserData *ret = self->getUserData(); + int num_ret = olua_push_object(L, ret, "db.UserData"); olua_endinvoke(L); - return 0; + return num_ret; } -static int _dragonBones_ArmatureData_get_skins(lua_State *L) +static int _olua_fun_dragonBones_ArmatureData_name$1(lua_State *L) { olua_startinvoke(L); @@ -7403,120 +9234,125 @@ static int _dragonBones_ArmatureData_get_skins(lua_State *L) olua_to_object(L, 1, &self, "db.ArmatureData"); - // std::map skins - std::map &ret = self->skins; - int num_ret = olua_push_map(L, ret, [L](std::string &arg1, dragonBones::SkinData *arg2) { - olua_push_string(L, arg1); - olua_push_object(L, arg2, "db.SkinData"); - }); + // std::string name + std::string ret = self->name; + int num_ret = olua_push_string(L, ret); olua_endinvoke(L); return num_ret; } -static int _dragonBones_ArmatureData_set_skins(lua_State *L) +static int _olua_fun_dragonBones_ArmatureData_name$2(lua_State *L) { olua_startinvoke(L); dragonBones::ArmatureData *self = nullptr; - std::map arg1; /** skins */ + std::string arg1; /** name */ olua_to_object(L, 1, &self, "db.ArmatureData"); - olua_check_map(L, 2, arg1, [L](std::string *arg1, dragonBones::SkinData **arg2) { - olua_check_string(L, -1, arg1); - olua_check_object(L, -2, arg2, "db.SkinData"); - }); + olua_check_string(L, 2, &arg1); - // std::map skins - self->skins = arg1; + // std::string name + self->name = arg1; olua_endinvoke(L); return 0; } -static int _dragonBones_ArmatureData_get_slots(lua_State *L) +static int _olua_fun_dragonBones_ArmatureData_name(lua_State *L) { - olua_startinvoke(L); + int num_args = lua_gettop(L) - 1; - dragonBones::ArmatureData *self = nullptr; + if (num_args == 0) { + // std::string name + return _olua_fun_dragonBones_ArmatureData_name$1(L); + } - olua_to_object(L, 1, &self, "db.ArmatureData"); + if (num_args == 1) { + // if ((olua_is_string(L, 2))) { + // std::string name + return _olua_fun_dragonBones_ArmatureData_name$2(L); + // } + } - // std::map slots - std::map &ret = self->slots; - int num_ret = olua_push_map(L, ret, [L](std::string &arg1, dragonBones::SlotData *arg2) { - olua_push_string(L, arg1); - olua_push_object(L, arg2, "db.SlotData"); - }); + luaL_error(L, "method 'dragonBones::ArmatureData::name' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_dragonBones_ArmatureData_new(lua_State *L) +{ + olua_startinvoke(L); + + // dragonBones::ArmatureData() + dragonBones::ArmatureData *ret = new dragonBones::ArmatureData(); + int num_ret = olua_push_object(L, ret, "db.ArmatureData"); + olua_postnew(L, ret); olua_endinvoke(L); return num_ret; } -static int _dragonBones_ArmatureData_set_slots(lua_State *L) +static int _olua_fun_dragonBones_ArmatureData_parent$1(lua_State *L) { olua_startinvoke(L); dragonBones::ArmatureData *self = nullptr; - std::map arg1; /** slots */ olua_to_object(L, 1, &self, "db.ArmatureData"); - olua_check_map(L, 2, arg1, [L](std::string *arg1, dragonBones::SlotData **arg2) { - olua_check_string(L, -1, arg1); - olua_check_object(L, -2, arg2, "db.SlotData"); - }); - // std::map slots - self->slots = arg1; + // dragonBones::DragonBonesData *parent + dragonBones::DragonBonesData *ret = self->parent; + int num_ret = olua_push_object(L, ret, "db.DragonBonesData"); olua_endinvoke(L); - return 0; + return num_ret; } -static int _dragonBones_ArmatureData_get_sortedBones(lua_State *L) +static int _olua_fun_dragonBones_ArmatureData_parent$2(lua_State *L) { olua_startinvoke(L); dragonBones::ArmatureData *self = nullptr; + dragonBones::DragonBonesData *arg1 = nullptr; /** parent */ olua_to_object(L, 1, &self, "db.ArmatureData"); + olua_check_object(L, 2, &arg1, "db.DragonBonesData"); - // std::vector sortedBones - std::vector &ret = self->sortedBones; - int num_ret = olua_push_array(L, ret, [L](dragonBones::BoneData *arg1) { - olua_push_object(L, arg1, "db.BoneData"); - }); + // dragonBones::DragonBonesData *parent + self->parent = arg1; olua_endinvoke(L); - return num_ret; + return 0; } -static int _dragonBones_ArmatureData_set_sortedBones(lua_State *L) +static int _olua_fun_dragonBones_ArmatureData_parent(lua_State *L) { - olua_startinvoke(L); - - dragonBones::ArmatureData *self = nullptr; - std::vector arg1; /** sortedBones */ + int num_args = lua_gettop(L) - 1; - olua_to_object(L, 1, &self, "db.ArmatureData"); - olua_check_array(L, 2, arg1, [L](dragonBones::BoneData **arg1) { - olua_check_object(L, -1, arg1, "db.BoneData"); - }); + if (num_args == 0) { + // dragonBones::DragonBonesData *parent + return _olua_fun_dragonBones_ArmatureData_parent$1(L); + } - // std::vector sortedBones - self->sortedBones = arg1; + if (num_args == 1) { + // if ((olua_is_object(L, 2, "db.DragonBonesData"))) { + // dragonBones::DragonBonesData *parent + return _olua_fun_dragonBones_ArmatureData_parent$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'dragonBones::ArmatureData::parent' not support '%d' arguments", num_args); return 0; } -static int _dragonBones_ArmatureData_get_sortedSlots(lua_State *L) +static int _olua_fun_dragonBones_ArmatureData_scale$1(lua_State *L) { olua_startinvoke(L); @@ -7524,227 +9360,1522 @@ static int _dragonBones_ArmatureData_get_sortedSlots(lua_State *L) olua_to_object(L, 1, &self, "db.ArmatureData"); - // std::vector sortedSlots - std::vector &ret = self->sortedSlots; - int num_ret = olua_push_array(L, ret, [L](dragonBones::SlotData *arg1) { - olua_push_object(L, arg1, "db.SlotData"); - }); + // float scale + float ret = self->scale; + int num_ret = olua_push_number(L, ret); olua_endinvoke(L); return num_ret; } -static int _dragonBones_ArmatureData_set_sortedSlots(lua_State *L) +static int _olua_fun_dragonBones_ArmatureData_scale$2(lua_State *L) { olua_startinvoke(L); dragonBones::ArmatureData *self = nullptr; - std::vector arg1; /** sortedSlots */ + float arg1 = 0; /** scale */ olua_to_object(L, 1, &self, "db.ArmatureData"); - olua_check_array(L, 2, arg1, [L](dragonBones::SlotData **arg1) { - olua_check_object(L, -1, arg1, "db.SlotData"); - }); + olua_check_number(L, 2, &arg1); - // std::vector sortedSlots - self->sortedSlots = arg1; + // float scale + self->scale = arg1; olua_endinvoke(L); return 0; } -static int _dragonBones_ArmatureData_get_type(lua_State *L) +static int _olua_fun_dragonBones_ArmatureData_scale(lua_State *L) { - olua_startinvoke(L); - - dragonBones::ArmatureData *self = nullptr; + int num_args = lua_gettop(L) - 1; - olua_to_object(L, 1, &self, "db.ArmatureData"); + if (num_args == 0) { + // float scale + return _olua_fun_dragonBones_ArmatureData_scale$1(L); + } - // dragonBones::ArmatureType type - dragonBones::ArmatureType ret = self->type; - int num_ret = olua_push_enum(L, ret); + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float scale + return _olua_fun_dragonBones_ArmatureData_scale$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'dragonBones::ArmatureData::scale' not support '%d' arguments", num_args); - return num_ret; + return 0; } -static int _dragonBones_ArmatureData_set_type(lua_State *L) +static int _olua_fun_dragonBones_ArmatureData_setDefaultAnimation(lua_State *L) { olua_startinvoke(L); dragonBones::ArmatureData *self = nullptr; - dragonBones::ArmatureType arg1 = (dragonBones::ArmatureType)0; /** type */ + dragonBones::AnimationData *arg1 = nullptr; /** value */ olua_to_object(L, 1, &self, "db.ArmatureData"); - olua_check_enum(L, 2, &arg1); + olua_check_object(L, 2, &arg1, "db.AnimationData"); - // dragonBones::ArmatureType type - self->type = arg1; + // void setDefaultAnimation(dragonBones::AnimationData *value) + self->setDefaultAnimation(arg1); olua_endinvoke(L); return 0; } -static int _dragonBones_ArmatureData_get_userData(lua_State *L) +static int _olua_fun_dragonBones_ArmatureData_setDefaultSkin(lua_State *L) { olua_startinvoke(L); dragonBones::ArmatureData *self = nullptr; + dragonBones::SkinData *arg1 = nullptr; /** value */ olua_to_object(L, 1, &self, "db.ArmatureData"); + olua_check_object(L, 2, &arg1, "db.SkinData"); - // dragonBones::UserData *userData - dragonBones::UserData *ret = self->userData; - int num_ret = olua_push_object(L, ret, "db.UserData"); + // void setDefaultSkin(dragonBones::SkinData *value) + self->setDefaultSkin(arg1); olua_endinvoke(L); - return num_ret; + return 0; } -static int _dragonBones_ArmatureData_set_userData(lua_State *L) +static int _olua_fun_dragonBones_ArmatureData_setParent(lua_State *L) { olua_startinvoke(L); dragonBones::ArmatureData *self = nullptr; - dragonBones::UserData *arg1 = nullptr; /** userData */ + dragonBones::DragonBonesData *arg1 = nullptr; /** value */ olua_to_object(L, 1, &self, "db.ArmatureData"); - olua_check_object(L, 2, &arg1, "db.UserData"); + olua_check_object(L, 2, &arg1, "db.DragonBonesData"); - // dragonBones::UserData *userData - self->userData = arg1; + // void setParent(dragonBones::DragonBonesData *value) + self->setParent(arg1); + + olua_endinvoke(L); + + return 0; +} + +static int _olua_fun_dragonBones_ArmatureData_setType(lua_State *L) +{ + olua_startinvoke(L); + + dragonBones::ArmatureData *self = nullptr; + int arg1 = 0; /** value */ + + olua_to_object(L, 1, &self, "db.ArmatureData"); + olua_check_integer(L, 2, &arg1); + + // void setType(int value) + self->setType(arg1); + + olua_endinvoke(L); + + return 0; +} + +static int _olua_fun_dragonBones_ArmatureData_setUserData(lua_State *L) +{ + olua_startinvoke(L); + + dragonBones::ArmatureData *self = nullptr; + dragonBones::UserData *arg1 = nullptr; /** value */ + + olua_to_object(L, 1, &self, "db.ArmatureData"); + olua_check_object(L, 2, &arg1, "db.UserData"); + + // void setUserData(dragonBones::UserData *value) + self->setUserData(arg1); + + olua_endinvoke(L); + + return 0; +} + +static int _olua_fun_dragonBones_ArmatureData_skins$1(lua_State *L) +{ + olua_startinvoke(L); + + dragonBones::ArmatureData *self = nullptr; + + olua_to_object(L, 1, &self, "db.ArmatureData"); + + // std::map skins + std::map &ret = self->skins; + int num_ret = olua_push_map(L, ret, [L](std::string &arg1, dragonBones::SkinData *arg2) { + olua_push_string(L, arg1); + olua_push_object(L, arg2, "db.SkinData"); + }); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_dragonBones_ArmatureData_skins$2(lua_State *L) +{ + olua_startinvoke(L); + + dragonBones::ArmatureData *self = nullptr; + std::map arg1; /** skins */ + + olua_to_object(L, 1, &self, "db.ArmatureData"); + olua_check_map(L, 2, arg1, [L](std::string *arg1, dragonBones::SkinData **arg2) { + olua_check_string(L, -1, arg1); + olua_check_object(L, -2, arg2, "db.SkinData"); + }); + + // std::map skins + self->skins = arg1; + + olua_endinvoke(L); + + return 0; +} + +static int _olua_fun_dragonBones_ArmatureData_skins(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // std::map skins + return _olua_fun_dragonBones_ArmatureData_skins$1(L); + } + + if (num_args == 1) { + // if ((olua_is_map(L, 2))) { + // std::map skins + return _olua_fun_dragonBones_ArmatureData_skins$2(L); + // } + } + + luaL_error(L, "method 'dragonBones::ArmatureData::skins' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_dragonBones_ArmatureData_slots$1(lua_State *L) +{ + olua_startinvoke(L); + + dragonBones::ArmatureData *self = nullptr; + + olua_to_object(L, 1, &self, "db.ArmatureData"); + + // std::map slots + std::map &ret = self->slots; + int num_ret = olua_push_map(L, ret, [L](std::string &arg1, dragonBones::SlotData *arg2) { + olua_push_string(L, arg1); + olua_push_object(L, arg2, "db.SlotData"); + }); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_dragonBones_ArmatureData_slots$2(lua_State *L) +{ + olua_startinvoke(L); + + dragonBones::ArmatureData *self = nullptr; + std::map arg1; /** slots */ + + olua_to_object(L, 1, &self, "db.ArmatureData"); + olua_check_map(L, 2, arg1, [L](std::string *arg1, dragonBones::SlotData **arg2) { + olua_check_string(L, -1, arg1); + olua_check_object(L, -2, arg2, "db.SlotData"); + }); + + // std::map slots + self->slots = arg1; + + olua_endinvoke(L); + + return 0; +} + +static int _olua_fun_dragonBones_ArmatureData_slots(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // std::map slots + return _olua_fun_dragonBones_ArmatureData_slots$1(L); + } + + if (num_args == 1) { + // if ((olua_is_map(L, 2))) { + // std::map slots + return _olua_fun_dragonBones_ArmatureData_slots$2(L); + // } + } + + luaL_error(L, "method 'dragonBones::ArmatureData::slots' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_dragonBones_ArmatureData_sortBones(lua_State *L) +{ + olua_startinvoke(L); + + dragonBones::ArmatureData *self = nullptr; + + olua_to_object(L, 1, &self, "db.ArmatureData"); + + // void sortBones() + self->sortBones(); + + olua_endinvoke(L); + + return 0; +} + +static int _olua_fun_dragonBones_ArmatureData_sortedBones$1(lua_State *L) +{ + olua_startinvoke(L); + + dragonBones::ArmatureData *self = nullptr; + + olua_to_object(L, 1, &self, "db.ArmatureData"); + + // std::vector sortedBones + std::vector &ret = self->sortedBones; + int num_ret = olua_push_array(L, ret, [L](dragonBones::BoneData *arg1) { + olua_push_object(L, arg1, "db.BoneData"); + }); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_dragonBones_ArmatureData_sortedBones$2(lua_State *L) +{ + olua_startinvoke(L); + + dragonBones::ArmatureData *self = nullptr; + std::vector arg1; /** sortedBones */ + + olua_to_object(L, 1, &self, "db.ArmatureData"); + olua_check_array(L, 2, arg1, [L](dragonBones::BoneData **arg1) { + olua_check_object(L, -1, arg1, "db.BoneData"); + }); + + // std::vector sortedBones + self->sortedBones = arg1; + + olua_endinvoke(L); + + return 0; +} + +static int _olua_fun_dragonBones_ArmatureData_sortedBones(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // std::vector sortedBones + return _olua_fun_dragonBones_ArmatureData_sortedBones$1(L); + } + + if (num_args == 1) { + // if ((olua_is_array(L, 2))) { + // std::vector sortedBones + return _olua_fun_dragonBones_ArmatureData_sortedBones$2(L); + // } + } + + luaL_error(L, "method 'dragonBones::ArmatureData::sortedBones' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_dragonBones_ArmatureData_sortedSlots$1(lua_State *L) +{ + olua_startinvoke(L); + + dragonBones::ArmatureData *self = nullptr; + + olua_to_object(L, 1, &self, "db.ArmatureData"); + + // std::vector sortedSlots + std::vector &ret = self->sortedSlots; + int num_ret = olua_push_array(L, ret, [L](dragonBones::SlotData *arg1) { + olua_push_object(L, arg1, "db.SlotData"); + }); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_dragonBones_ArmatureData_sortedSlots$2(lua_State *L) +{ + olua_startinvoke(L); + + dragonBones::ArmatureData *self = nullptr; + std::vector arg1; /** sortedSlots */ + + olua_to_object(L, 1, &self, "db.ArmatureData"); + olua_check_array(L, 2, arg1, [L](dragonBones::SlotData **arg1) { + olua_check_object(L, -1, arg1, "db.SlotData"); + }); + + // std::vector sortedSlots + self->sortedSlots = arg1; + + olua_endinvoke(L); + + return 0; +} + +static int _olua_fun_dragonBones_ArmatureData_sortedSlots(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // std::vector sortedSlots + return _olua_fun_dragonBones_ArmatureData_sortedSlots$1(L); + } + + if (num_args == 1) { + // if ((olua_is_array(L, 2))) { + // std::vector sortedSlots + return _olua_fun_dragonBones_ArmatureData_sortedSlots$2(L); + // } + } + + luaL_error(L, "method 'dragonBones::ArmatureData::sortedSlots' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_dragonBones_ArmatureData_type$1(lua_State *L) +{ + olua_startinvoke(L); + + dragonBones::ArmatureData *self = nullptr; + + olua_to_object(L, 1, &self, "db.ArmatureData"); + + // dragonBones::ArmatureType type + dragonBones::ArmatureType ret = self->type; + int num_ret = olua_push_enum(L, ret); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_dragonBones_ArmatureData_type$2(lua_State *L) +{ + olua_startinvoke(L); + + dragonBones::ArmatureData *self = nullptr; + dragonBones::ArmatureType arg1 = (dragonBones::ArmatureType)0; /** type */ + + olua_to_object(L, 1, &self, "db.ArmatureData"); + olua_check_enum(L, 2, &arg1); + + // dragonBones::ArmatureType type + self->type = arg1; + + olua_endinvoke(L); + + return 0; +} + +static int _olua_fun_dragonBones_ArmatureData_type(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // dragonBones::ArmatureType type + return _olua_fun_dragonBones_ArmatureData_type$1(L); + } + + if (num_args == 1) { + // if ((olua_is_enum(L, 2))) { + // dragonBones::ArmatureType type + return _olua_fun_dragonBones_ArmatureData_type$2(L); + // } + } + + luaL_error(L, "method 'dragonBones::ArmatureData::type' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_dragonBones_ArmatureData_userData$1(lua_State *L) +{ + olua_startinvoke(L); + + dragonBones::ArmatureData *self = nullptr; + + olua_to_object(L, 1, &self, "db.ArmatureData"); + + // dragonBones::UserData *userData + dragonBones::UserData *ret = self->userData; + int num_ret = olua_push_object(L, ret, "db.UserData"); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_dragonBones_ArmatureData_userData$2(lua_State *L) +{ + olua_startinvoke(L); + + dragonBones::ArmatureData *self = nullptr; + dragonBones::UserData *arg1 = nullptr; /** userData */ + + olua_to_object(L, 1, &self, "db.ArmatureData"); + olua_check_object(L, 2, &arg1, "db.UserData"); + + // dragonBones::UserData *userData + self->userData = arg1; + + olua_endinvoke(L); + + return 0; +} + +static int _olua_fun_dragonBones_ArmatureData_userData(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // dragonBones::UserData *userData + return _olua_fun_dragonBones_ArmatureData_userData$1(L); + } + + if (num_args == 1) { + // if ((olua_is_object(L, 2, "db.UserData"))) { + // dragonBones::UserData *userData + return _olua_fun_dragonBones_ArmatureData_userData$2(L); + // } + } + + luaL_error(L, "method 'dragonBones::ArmatureData::userData' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_cls_db_ArmatureData(lua_State *L) +{ + oluacls_class(L, "db.ArmatureData"); + oluacls_func(L, "addAction", _olua_fun_dragonBones_ArmatureData_addAction); + oluacls_func(L, "addAnimation", _olua_fun_dragonBones_ArmatureData_addAnimation); + oluacls_func(L, "addBone", _olua_fun_dragonBones_ArmatureData_addBone); + oluacls_func(L, "addConstraint", _olua_fun_dragonBones_ArmatureData_addConstraint); + oluacls_func(L, "addSkin", _olua_fun_dragonBones_ArmatureData_addSkin); + oluacls_func(L, "addSlot", _olua_fun_dragonBones_ArmatureData_addSlot); + oluacls_func(L, "cacheFrames", _olua_fun_dragonBones_ArmatureData_cacheFrames); + oluacls_func(L, "getAABB", _olua_fun_dragonBones_ArmatureData_getAABB); + oluacls_func(L, "getActions", _olua_fun_dragonBones_ArmatureData_getActions); + oluacls_func(L, "getAnimation", _olua_fun_dragonBones_ArmatureData_getAnimation); + oluacls_func(L, "getAnimationNames", _olua_fun_dragonBones_ArmatureData_getAnimationNames); + oluacls_func(L, "getBone", _olua_fun_dragonBones_ArmatureData_getBone); + oluacls_func(L, "getConstraint", _olua_fun_dragonBones_ArmatureData_getConstraint); + oluacls_func(L, "getDefaultActions", _olua_fun_dragonBones_ArmatureData_getDefaultActions); + oluacls_func(L, "getDefaultAnimation", _olua_fun_dragonBones_ArmatureData_getDefaultAnimation); + oluacls_func(L, "getDefaultSkin", _olua_fun_dragonBones_ArmatureData_getDefaultSkin); + oluacls_func(L, "getParent", _olua_fun_dragonBones_ArmatureData_getParent); + oluacls_func(L, "getSkin", _olua_fun_dragonBones_ArmatureData_getSkin); + oluacls_func(L, "getSlot", _olua_fun_dragonBones_ArmatureData_getSlot); + oluacls_func(L, "getSortedBones", _olua_fun_dragonBones_ArmatureData_getSortedBones); + oluacls_func(L, "getSortedSlots", _olua_fun_dragonBones_ArmatureData_getSortedSlots); + oluacls_func(L, "getType", _olua_fun_dragonBones_ArmatureData_getType); + oluacls_func(L, "getTypeIndex", _olua_fun_dragonBones_ArmatureData_getTypeIndex); + oluacls_func(L, "getUserData", _olua_fun_dragonBones_ArmatureData_getUserData); + oluacls_func(L, "new", _olua_fun_dragonBones_ArmatureData_new); + oluacls_func(L, "setDefaultAnimation", _olua_fun_dragonBones_ArmatureData_setDefaultAnimation); + oluacls_func(L, "setDefaultSkin", _olua_fun_dragonBones_ArmatureData_setDefaultSkin); + oluacls_func(L, "setParent", _olua_fun_dragonBones_ArmatureData_setParent); + oluacls_func(L, "setType", _olua_fun_dragonBones_ArmatureData_setType); + oluacls_func(L, "setUserData", _olua_fun_dragonBones_ArmatureData_setUserData); + oluacls_func(L, "sortBones", _olua_fun_dragonBones_ArmatureData_sortBones); + oluacls_prop(L, "typeIndex", _olua_fun_dragonBones_ArmatureData_getTypeIndex, nullptr); + oluacls_prop(L, "aabb", _olua_fun_dragonBones_ArmatureData_aabb, _olua_fun_dragonBones_ArmatureData_aabb); + oluacls_prop(L, "actions", _olua_fun_dragonBones_ArmatureData_actions, _olua_fun_dragonBones_ArmatureData_actions); + oluacls_prop(L, "animationNames", _olua_fun_dragonBones_ArmatureData_animationNames, _olua_fun_dragonBones_ArmatureData_animationNames); + oluacls_prop(L, "animations", _olua_fun_dragonBones_ArmatureData_animations, _olua_fun_dragonBones_ArmatureData_animations); + oluacls_prop(L, "bones", _olua_fun_dragonBones_ArmatureData_bones, _olua_fun_dragonBones_ArmatureData_bones); + oluacls_prop(L, "cacheFrameRate", _olua_fun_dragonBones_ArmatureData_cacheFrameRate, _olua_fun_dragonBones_ArmatureData_cacheFrameRate); + oluacls_prop(L, "canvas", _olua_fun_dragonBones_ArmatureData_canvas, _olua_fun_dragonBones_ArmatureData_canvas); + oluacls_prop(L, "constraints", _olua_fun_dragonBones_ArmatureData_constraints, _olua_fun_dragonBones_ArmatureData_constraints); + oluacls_prop(L, "defaultActions", _olua_fun_dragonBones_ArmatureData_defaultActions, _olua_fun_dragonBones_ArmatureData_defaultActions); + oluacls_prop(L, "defaultAnimation", _olua_fun_dragonBones_ArmatureData_defaultAnimation, _olua_fun_dragonBones_ArmatureData_defaultAnimation); + oluacls_prop(L, "defaultSkin", _olua_fun_dragonBones_ArmatureData_defaultSkin, _olua_fun_dragonBones_ArmatureData_defaultSkin); + oluacls_prop(L, "frameRate", _olua_fun_dragonBones_ArmatureData_frameRate, _olua_fun_dragonBones_ArmatureData_frameRate); + oluacls_prop(L, "name", _olua_fun_dragonBones_ArmatureData_name, _olua_fun_dragonBones_ArmatureData_name); + oluacls_prop(L, "parent", _olua_fun_dragonBones_ArmatureData_parent, _olua_fun_dragonBones_ArmatureData_parent); + oluacls_prop(L, "scale", _olua_fun_dragonBones_ArmatureData_scale, _olua_fun_dragonBones_ArmatureData_scale); + oluacls_prop(L, "skins", _olua_fun_dragonBones_ArmatureData_skins, _olua_fun_dragonBones_ArmatureData_skins); + oluacls_prop(L, "slots", _olua_fun_dragonBones_ArmatureData_slots, _olua_fun_dragonBones_ArmatureData_slots); + oluacls_prop(L, "sortedBones", _olua_fun_dragonBones_ArmatureData_sortedBones, _olua_fun_dragonBones_ArmatureData_sortedBones); + oluacls_prop(L, "sortedSlots", _olua_fun_dragonBones_ArmatureData_sortedSlots, _olua_fun_dragonBones_ArmatureData_sortedSlots); + oluacls_prop(L, "type", _olua_fun_dragonBones_ArmatureData_type, _olua_fun_dragonBones_ArmatureData_type); + oluacls_prop(L, "userData", _olua_fun_dragonBones_ArmatureData_userData, _olua_fun_dragonBones_ArmatureData_userData); + + return 1; +} + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_db_ArmatureData(lua_State *L) +{ + olua_require(L, "dragonbones", luaopen_dragonbones); + if (!olua_getclass(L, "db.ArmatureData")) { + luaL_error(L, "class not found: dragonBones::ArmatureData"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_fun_dragonBones_SkinData_addDisplay(lua_State *L) +{ + olua_startinvoke(L); + + dragonBones::SkinData *self = nullptr; + std::string arg1; /** slotName */ + dragonBones::DisplayData *arg2 = nullptr; /** value */ + + olua_to_object(L, 1, &self, "db.SkinData"); + olua_check_string(L, 2, &arg1); + olua_check_object(L, 3, &arg2, "db.DisplayData"); + + // void addDisplay(const std::string &slotName, dragonBones::DisplayData *value) + self->addDisplay(arg1, arg2); + + olua_endinvoke(L); + + return 0; +} + +static int _olua_fun_dragonBones_SkinData_getDisplay(lua_State *L) +{ + olua_startinvoke(L); + + dragonBones::SkinData *self = nullptr; + std::string arg1; /** slotName */ + std::string arg2; /** displayName */ + + olua_to_object(L, 1, &self, "db.SkinData"); + olua_check_string(L, 2, &arg1); + olua_check_string(L, 3, &arg2); + + // dragonBones::DisplayData *getDisplay(const std::string &slotName, const std::string &displayName) + dragonBones::DisplayData *ret = self->getDisplay(arg1, arg2); + int num_ret = olua_push_object(L, ret, "db.DisplayData"); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_dragonBones_SkinData_getTypeIndex(lua_State *L) +{ + olua_startinvoke(L); + + // static std::size_t getTypeIndex() + std::size_t ret = dragonBones::SkinData::getTypeIndex(); + int num_ret = olua_push_integer(L, ret); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_dragonBones_SkinData_name$1(lua_State *L) +{ + olua_startinvoke(L); + + dragonBones::SkinData *self = nullptr; + + olua_to_object(L, 1, &self, "db.SkinData"); + + // std::string name + std::string ret = self->name; + int num_ret = olua_push_string(L, ret); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_dragonBones_SkinData_name$2(lua_State *L) +{ + olua_startinvoke(L); + + dragonBones::SkinData *self = nullptr; + std::string arg1; /** name */ + + olua_to_object(L, 1, &self, "db.SkinData"); + olua_check_string(L, 2, &arg1); + + // std::string name + self->name = arg1; + + olua_endinvoke(L); + + return 0; +} + +static int _olua_fun_dragonBones_SkinData_name(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // std::string name + return _olua_fun_dragonBones_SkinData_name$1(L); + } + + if (num_args == 1) { + // if ((olua_is_string(L, 2))) { + // std::string name + return _olua_fun_dragonBones_SkinData_name$2(L); + // } + } + + luaL_error(L, "method 'dragonBones::SkinData::name' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_dragonBones_SkinData_new(lua_State *L) +{ + olua_startinvoke(L); + + // dragonBones::SkinData() + dragonBones::SkinData *ret = new dragonBones::SkinData(); + int num_ret = olua_push_object(L, ret, "db.SkinData"); + olua_postnew(L, ret); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_dragonBones_SkinData_parent$1(lua_State *L) +{ + olua_startinvoke(L); + + dragonBones::SkinData *self = nullptr; + + olua_to_object(L, 1, &self, "db.SkinData"); + + // dragonBones::ArmatureData *parent + dragonBones::ArmatureData *ret = self->parent; + int num_ret = olua_push_object(L, ret, "db.ArmatureData"); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_dragonBones_SkinData_parent$2(lua_State *L) +{ + olua_startinvoke(L); + + dragonBones::SkinData *self = nullptr; + dragonBones::ArmatureData *arg1 = nullptr; /** parent */ + + olua_to_object(L, 1, &self, "db.SkinData"); + olua_check_object(L, 2, &arg1, "db.ArmatureData"); + + // dragonBones::ArmatureData *parent + self->parent = arg1; + + olua_endinvoke(L); + + return 0; +} + +static int _olua_fun_dragonBones_SkinData_parent(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // dragonBones::ArmatureData *parent + return _olua_fun_dragonBones_SkinData_parent$1(L); + } + + if (num_args == 1) { + // if ((olua_is_object(L, 2, "db.ArmatureData"))) { + // dragonBones::ArmatureData *parent + return _olua_fun_dragonBones_SkinData_parent$2(L); + // } + } + + luaL_error(L, "method 'dragonBones::SkinData::parent' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_cls_db_SkinData(lua_State *L) +{ + oluacls_class(L, "db.SkinData"); + oluacls_func(L, "addDisplay", _olua_fun_dragonBones_SkinData_addDisplay); + oluacls_func(L, "getDisplay", _olua_fun_dragonBones_SkinData_getDisplay); + oluacls_func(L, "getTypeIndex", _olua_fun_dragonBones_SkinData_getTypeIndex); + oluacls_func(L, "new", _olua_fun_dragonBones_SkinData_new); + oluacls_prop(L, "typeIndex", _olua_fun_dragonBones_SkinData_getTypeIndex, nullptr); + oluacls_prop(L, "name", _olua_fun_dragonBones_SkinData_name, _olua_fun_dragonBones_SkinData_name); + oluacls_prop(L, "parent", _olua_fun_dragonBones_SkinData_parent, _olua_fun_dragonBones_SkinData_parent); + + return 1; +} + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_db_SkinData(lua_State *L) +{ + olua_require(L, "dragonbones", luaopen_dragonbones); + if (!olua_getclass(L, "db.SkinData")) { + luaL_error(L, "class not found: dragonBones::SkinData"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_fun_dragonBones_BoneData_getParent(lua_State *L) +{ + olua_startinvoke(L); + + dragonBones::BoneData *self = nullptr; + + olua_to_object(L, 1, &self, "db.BoneData"); + + // const dragonBones::BoneData *getParent() + const dragonBones::BoneData *ret = self->getParent(); + int num_ret = olua_push_object(L, ret, "db.BoneData"); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_dragonBones_BoneData_getTypeIndex(lua_State *L) +{ + olua_startinvoke(L); + + // static std::size_t getTypeIndex() + std::size_t ret = dragonBones::BoneData::getTypeIndex(); + int num_ret = olua_push_integer(L, ret); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_dragonBones_BoneData_getUserData(lua_State *L) +{ + olua_startinvoke(L); + + dragonBones::BoneData *self = nullptr; + + olua_to_object(L, 1, &self, "db.BoneData"); + + // const dragonBones::UserData *getUserData() + const dragonBones::UserData *ret = self->getUserData(); + int num_ret = olua_push_object(L, ret, "db.UserData"); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_dragonBones_BoneData_inheritReflection$1(lua_State *L) +{ + olua_startinvoke(L); + + dragonBones::BoneData *self = nullptr; + + olua_to_object(L, 1, &self, "db.BoneData"); + + // bool inheritReflection + bool ret = self->inheritReflection; + int num_ret = olua_push_bool(L, ret); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_dragonBones_BoneData_inheritReflection$2(lua_State *L) +{ + olua_startinvoke(L); + + dragonBones::BoneData *self = nullptr; + bool arg1 = false; /** inheritReflection */ + + olua_to_object(L, 1, &self, "db.BoneData"); + olua_check_bool(L, 2, &arg1); + + // bool inheritReflection + self->inheritReflection = arg1; + + olua_endinvoke(L); + + return 0; +} + +static int _olua_fun_dragonBones_BoneData_inheritReflection(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // bool inheritReflection + return _olua_fun_dragonBones_BoneData_inheritReflection$1(L); + } + + if (num_args == 1) { + // if ((olua_is_bool(L, 2))) { + // bool inheritReflection + return _olua_fun_dragonBones_BoneData_inheritReflection$2(L); + // } + } + + luaL_error(L, "method 'dragonBones::BoneData::inheritReflection' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_dragonBones_BoneData_inheritRotation$1(lua_State *L) +{ + olua_startinvoke(L); + + dragonBones::BoneData *self = nullptr; + + olua_to_object(L, 1, &self, "db.BoneData"); + + // bool inheritRotation + bool ret = self->inheritRotation; + int num_ret = olua_push_bool(L, ret); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_dragonBones_BoneData_inheritRotation$2(lua_State *L) +{ + olua_startinvoke(L); + + dragonBones::BoneData *self = nullptr; + bool arg1 = false; /** inheritRotation */ + + olua_to_object(L, 1, &self, "db.BoneData"); + olua_check_bool(L, 2, &arg1); + + // bool inheritRotation + self->inheritRotation = arg1; + + olua_endinvoke(L); + + return 0; +} + +static int _olua_fun_dragonBones_BoneData_inheritRotation(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // bool inheritRotation + return _olua_fun_dragonBones_BoneData_inheritRotation$1(L); + } + + if (num_args == 1) { + // if ((olua_is_bool(L, 2))) { + // bool inheritRotation + return _olua_fun_dragonBones_BoneData_inheritRotation$2(L); + // } + } + + luaL_error(L, "method 'dragonBones::BoneData::inheritRotation' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_dragonBones_BoneData_inheritScale$1(lua_State *L) +{ + olua_startinvoke(L); + + dragonBones::BoneData *self = nullptr; + + olua_to_object(L, 1, &self, "db.BoneData"); + + // bool inheritScale + bool ret = self->inheritScale; + int num_ret = olua_push_bool(L, ret); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_dragonBones_BoneData_inheritScale$2(lua_State *L) +{ + olua_startinvoke(L); + + dragonBones::BoneData *self = nullptr; + bool arg1 = false; /** inheritScale */ + + olua_to_object(L, 1, &self, "db.BoneData"); + olua_check_bool(L, 2, &arg1); + + // bool inheritScale + self->inheritScale = arg1; + + olua_endinvoke(L); + + return 0; +} + +static int _olua_fun_dragonBones_BoneData_inheritScale(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // bool inheritScale + return _olua_fun_dragonBones_BoneData_inheritScale$1(L); + } + + if (num_args == 1) { + // if ((olua_is_bool(L, 2))) { + // bool inheritScale + return _olua_fun_dragonBones_BoneData_inheritScale$2(L); + // } + } + + luaL_error(L, "method 'dragonBones::BoneData::inheritScale' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_dragonBones_BoneData_inheritTranslation$1(lua_State *L) +{ + olua_startinvoke(L); + + dragonBones::BoneData *self = nullptr; + + olua_to_object(L, 1, &self, "db.BoneData"); + + // bool inheritTranslation + bool ret = self->inheritTranslation; + int num_ret = olua_push_bool(L, ret); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_dragonBones_BoneData_inheritTranslation$2(lua_State *L) +{ + olua_startinvoke(L); + + dragonBones::BoneData *self = nullptr; + bool arg1 = false; /** inheritTranslation */ + + olua_to_object(L, 1, &self, "db.BoneData"); + olua_check_bool(L, 2, &arg1); + + // bool inheritTranslation + self->inheritTranslation = arg1; + + olua_endinvoke(L); + + return 0; +} + +static int _olua_fun_dragonBones_BoneData_inheritTranslation(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // bool inheritTranslation + return _olua_fun_dragonBones_BoneData_inheritTranslation$1(L); + } + + if (num_args == 1) { + // if ((olua_is_bool(L, 2))) { + // bool inheritTranslation + return _olua_fun_dragonBones_BoneData_inheritTranslation$2(L); + // } + } + + luaL_error(L, "method 'dragonBones::BoneData::inheritTranslation' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_dragonBones_BoneData_length$1(lua_State *L) +{ + olua_startinvoke(L); + + dragonBones::BoneData *self = nullptr; + + olua_to_object(L, 1, &self, "db.BoneData"); + + // float length + float ret = self->length; + int num_ret = olua_push_number(L, ret); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_dragonBones_BoneData_length$2(lua_State *L) +{ + olua_startinvoke(L); + + dragonBones::BoneData *self = nullptr; + float arg1 = 0; /** length */ + + olua_to_object(L, 1, &self, "db.BoneData"); + olua_check_number(L, 2, &arg1); + + // float length + self->length = arg1; + + olua_endinvoke(L); + + return 0; +} + +static int _olua_fun_dragonBones_BoneData_length(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float length + return _olua_fun_dragonBones_BoneData_length$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float length + return _olua_fun_dragonBones_BoneData_length$2(L); + // } + } + + luaL_error(L, "method 'dragonBones::BoneData::length' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_dragonBones_BoneData_name$1(lua_State *L) +{ + olua_startinvoke(L); + + dragonBones::BoneData *self = nullptr; + + olua_to_object(L, 1, &self, "db.BoneData"); + + // std::string name + std::string ret = self->name; + int num_ret = olua_push_string(L, ret); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_dragonBones_BoneData_name$2(lua_State *L) +{ + olua_startinvoke(L); + + dragonBones::BoneData *self = nullptr; + std::string arg1; /** name */ + + olua_to_object(L, 1, &self, "db.BoneData"); + olua_check_string(L, 2, &arg1); + + // std::string name + self->name = arg1; + + olua_endinvoke(L); + + return 0; +} + +static int _olua_fun_dragonBones_BoneData_name(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // std::string name + return _olua_fun_dragonBones_BoneData_name$1(L); + } + + if (num_args == 1) { + // if ((olua_is_string(L, 2))) { + // std::string name + return _olua_fun_dragonBones_BoneData_name$2(L); + // } + } + + luaL_error(L, "method 'dragonBones::BoneData::name' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_dragonBones_BoneData_new(lua_State *L) +{ + olua_startinvoke(L); + + // dragonBones::BoneData() + dragonBones::BoneData *ret = new dragonBones::BoneData(); + int num_ret = olua_push_object(L, ret, "db.BoneData"); + olua_postnew(L, ret); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_dragonBones_BoneData_parent$1(lua_State *L) +{ + olua_startinvoke(L); + + dragonBones::BoneData *self = nullptr; + + olua_to_object(L, 1, &self, "db.BoneData"); + + // dragonBones::BoneData *parent + dragonBones::BoneData *ret = self->parent; + int num_ret = olua_push_object(L, ret, "db.BoneData"); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_dragonBones_BoneData_parent$2(lua_State *L) +{ + olua_startinvoke(L); + + dragonBones::BoneData *self = nullptr; + dragonBones::BoneData *arg1 = nullptr; /** parent */ + + olua_to_object(L, 1, &self, "db.BoneData"); + olua_check_object(L, 2, &arg1, "db.BoneData"); + + // dragonBones::BoneData *parent + self->parent = arg1; olua_endinvoke(L); return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_dragonBones_ArmatureData(lua_State *L) +static int _olua_fun_dragonBones_BoneData_parent(lua_State *L) { - oluacls_class(L, "db.ArmatureData"); - oluacls_func(L, "addAction", _dragonBones_ArmatureData_addAction); - oluacls_func(L, "addAnimation", _dragonBones_ArmatureData_addAnimation); - oluacls_func(L, "addBone", _dragonBones_ArmatureData_addBone); - oluacls_func(L, "addConstraint", _dragonBones_ArmatureData_addConstraint); - oluacls_func(L, "addSkin", _dragonBones_ArmatureData_addSkin); - oluacls_func(L, "addSlot", _dragonBones_ArmatureData_addSlot); - oluacls_func(L, "cacheFrames", _dragonBones_ArmatureData_cacheFrames); - oluacls_func(L, "getAABB", _dragonBones_ArmatureData_getAABB); - oluacls_func(L, "getActions", _dragonBones_ArmatureData_getActions); - oluacls_func(L, "getAnimation", _dragonBones_ArmatureData_getAnimation); - oluacls_func(L, "getAnimationNames", _dragonBones_ArmatureData_getAnimationNames); - oluacls_func(L, "getBone", _dragonBones_ArmatureData_getBone); - oluacls_func(L, "getConstraint", _dragonBones_ArmatureData_getConstraint); - oluacls_func(L, "getDefaultActions", _dragonBones_ArmatureData_getDefaultActions); - oluacls_func(L, "getDefaultAnimation", _dragonBones_ArmatureData_getDefaultAnimation); - oluacls_func(L, "getDefaultSkin", _dragonBones_ArmatureData_getDefaultSkin); - oluacls_func(L, "getParent", _dragonBones_ArmatureData_getParent); - oluacls_func(L, "getSkin", _dragonBones_ArmatureData_getSkin); - oluacls_func(L, "getSlot", _dragonBones_ArmatureData_getSlot); - oluacls_func(L, "getSortedBones", _dragonBones_ArmatureData_getSortedBones); - oluacls_func(L, "getSortedSlots", _dragonBones_ArmatureData_getSortedSlots); - oluacls_func(L, "getType", _dragonBones_ArmatureData_getType); - oluacls_func(L, "getTypeIndex", _dragonBones_ArmatureData_getTypeIndex); - oluacls_func(L, "getUserData", _dragonBones_ArmatureData_getUserData); - oluacls_func(L, "new", _dragonBones_ArmatureData_new); - oluacls_func(L, "setDefaultAnimation", _dragonBones_ArmatureData_setDefaultAnimation); - oluacls_func(L, "setDefaultSkin", _dragonBones_ArmatureData_setDefaultSkin); - oluacls_func(L, "setParent", _dragonBones_ArmatureData_setParent); - oluacls_func(L, "setType", _dragonBones_ArmatureData_setType); - oluacls_func(L, "setUserData", _dragonBones_ArmatureData_setUserData); - oluacls_func(L, "sortBones", _dragonBones_ArmatureData_sortBones); - oluacls_prop(L, "aabb", _dragonBones_ArmatureData_getAABB, nullptr); - oluacls_prop(L, "actions", _dragonBones_ArmatureData_getActions, nullptr); - oluacls_prop(L, "animationNames", _dragonBones_ArmatureData_getAnimationNames, nullptr); - oluacls_prop(L, "defaultActions", _dragonBones_ArmatureData_getDefaultActions, nullptr); - oluacls_prop(L, "defaultAnimation", _dragonBones_ArmatureData_getDefaultAnimation, _dragonBones_ArmatureData_setDefaultAnimation); - oluacls_prop(L, "defaultSkin", _dragonBones_ArmatureData_getDefaultSkin, _dragonBones_ArmatureData_setDefaultSkin); - oluacls_prop(L, "parent", _dragonBones_ArmatureData_getParent, _dragonBones_ArmatureData_setParent); - oluacls_prop(L, "sortedBones", _dragonBones_ArmatureData_getSortedBones, nullptr); - oluacls_prop(L, "sortedSlots", _dragonBones_ArmatureData_getSortedSlots, nullptr); - oluacls_prop(L, "type", _dragonBones_ArmatureData_getType, _dragonBones_ArmatureData_setType); - oluacls_prop(L, "typeIndex", _dragonBones_ArmatureData_getTypeIndex, nullptr); - oluacls_prop(L, "userData", _dragonBones_ArmatureData_getUserData, _dragonBones_ArmatureData_setUserData); - oluacls_prop(L, "aabb", _dragonBones_ArmatureData_get_aabb, _dragonBones_ArmatureData_set_aabb); - oluacls_prop(L, "actions", _dragonBones_ArmatureData_get_actions, _dragonBones_ArmatureData_set_actions); - oluacls_prop(L, "animationNames", _dragonBones_ArmatureData_get_animationNames, _dragonBones_ArmatureData_set_animationNames); - oluacls_prop(L, "animations", _dragonBones_ArmatureData_get_animations, _dragonBones_ArmatureData_set_animations); - oluacls_prop(L, "bones", _dragonBones_ArmatureData_get_bones, _dragonBones_ArmatureData_set_bones); - oluacls_prop(L, "cacheFrameRate", _dragonBones_ArmatureData_get_cacheFrameRate, _dragonBones_ArmatureData_set_cacheFrameRate); - oluacls_prop(L, "canvas", _dragonBones_ArmatureData_get_canvas, _dragonBones_ArmatureData_set_canvas); - oluacls_prop(L, "constraints", _dragonBones_ArmatureData_get_constraints, _dragonBones_ArmatureData_set_constraints); - oluacls_prop(L, "defaultActions", _dragonBones_ArmatureData_get_defaultActions, _dragonBones_ArmatureData_set_defaultActions); - oluacls_prop(L, "defaultAnimation", _dragonBones_ArmatureData_get_defaultAnimation, _dragonBones_ArmatureData_set_defaultAnimation); - oluacls_prop(L, "defaultSkin", _dragonBones_ArmatureData_get_defaultSkin, _dragonBones_ArmatureData_set_defaultSkin); - oluacls_prop(L, "frameRate", _dragonBones_ArmatureData_get_frameRate, _dragonBones_ArmatureData_set_frameRate); - oluacls_prop(L, "name", _dragonBones_ArmatureData_get_name, _dragonBones_ArmatureData_set_name); - oluacls_prop(L, "parent", _dragonBones_ArmatureData_get_parent, _dragonBones_ArmatureData_set_parent); - oluacls_prop(L, "scale", _dragonBones_ArmatureData_get_scale, _dragonBones_ArmatureData_set_scale); - oluacls_prop(L, "skins", _dragonBones_ArmatureData_get_skins, _dragonBones_ArmatureData_set_skins); - oluacls_prop(L, "slots", _dragonBones_ArmatureData_get_slots, _dragonBones_ArmatureData_set_slots); - oluacls_prop(L, "sortedBones", _dragonBones_ArmatureData_get_sortedBones, _dragonBones_ArmatureData_set_sortedBones); - oluacls_prop(L, "sortedSlots", _dragonBones_ArmatureData_get_sortedSlots, _dragonBones_ArmatureData_set_sortedSlots); - oluacls_prop(L, "type", _dragonBones_ArmatureData_get_type, _dragonBones_ArmatureData_set_type); - oluacls_prop(L, "userData", _dragonBones_ArmatureData_get_userData, _dragonBones_ArmatureData_set_userData); + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // dragonBones::BoneData *parent + return _olua_fun_dragonBones_BoneData_parent$1(L); + } + + if (num_args == 1) { + // if ((olua_is_object(L, 2, "db.BoneData"))) { + // dragonBones::BoneData *parent + return _olua_fun_dragonBones_BoneData_parent$2(L); + // } + } + + luaL_error(L, "method 'dragonBones::BoneData::parent' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_dragonBones_BoneData_setParent(lua_State *L) +{ + olua_startinvoke(L); + + dragonBones::BoneData *self = nullptr; + dragonBones::BoneData *arg1 = nullptr; /** value */ + + olua_to_object(L, 1, &self, "db.BoneData"); + olua_check_object(L, 2, &arg1, "db.BoneData"); + + // void setParent(dragonBones::BoneData *value) + self->setParent(arg1); + + olua_endinvoke(L); + + return 0; +} + +static int _olua_fun_dragonBones_BoneData_setUserData(lua_State *L) +{ + olua_startinvoke(L); + + dragonBones::BoneData *self = nullptr; + dragonBones::UserData *arg1 = nullptr; /** value */ + + olua_to_object(L, 1, &self, "db.BoneData"); + olua_check_object(L, 2, &arg1, "db.UserData"); + + // void setUserData(dragonBones::UserData *value) + self->setUserData(arg1); + + olua_endinvoke(L); + + return 0; +} + +static int _olua_fun_dragonBones_BoneData_userData$1(lua_State *L) +{ + olua_startinvoke(L); + + dragonBones::BoneData *self = nullptr; + + olua_to_object(L, 1, &self, "db.BoneData"); + + // dragonBones::UserData *userData + dragonBones::UserData *ret = self->userData; + int num_ret = olua_push_object(L, ret, "db.UserData"); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_dragonBones_BoneData_userData$2(lua_State *L) +{ + olua_startinvoke(L); + + dragonBones::BoneData *self = nullptr; + dragonBones::UserData *arg1 = nullptr; /** userData */ + + olua_to_object(L, 1, &self, "db.BoneData"); + olua_check_object(L, 2, &arg1, "db.UserData"); + + // dragonBones::UserData *userData + self->userData = arg1; + + olua_endinvoke(L); + + return 0; +} + +static int _olua_fun_dragonBones_BoneData_userData(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // dragonBones::UserData *userData + return _olua_fun_dragonBones_BoneData_userData$1(L); + } + + if (num_args == 1) { + // if ((olua_is_object(L, 2, "db.UserData"))) { + // dragonBones::UserData *userData + return _olua_fun_dragonBones_BoneData_userData$2(L); + // } + } + + luaL_error(L, "method 'dragonBones::BoneData::userData' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_cls_db_BoneData(lua_State *L) +{ + oluacls_class(L, "db.BoneData"); + oluacls_func(L, "getParent", _olua_fun_dragonBones_BoneData_getParent); + oluacls_func(L, "getTypeIndex", _olua_fun_dragonBones_BoneData_getTypeIndex); + oluacls_func(L, "getUserData", _olua_fun_dragonBones_BoneData_getUserData); + oluacls_func(L, "new", _olua_fun_dragonBones_BoneData_new); + oluacls_func(L, "setParent", _olua_fun_dragonBones_BoneData_setParent); + oluacls_func(L, "setUserData", _olua_fun_dragonBones_BoneData_setUserData); + oluacls_prop(L, "typeIndex", _olua_fun_dragonBones_BoneData_getTypeIndex, nullptr); + oluacls_prop(L, "inheritReflection", _olua_fun_dragonBones_BoneData_inheritReflection, _olua_fun_dragonBones_BoneData_inheritReflection); + oluacls_prop(L, "inheritRotation", _olua_fun_dragonBones_BoneData_inheritRotation, _olua_fun_dragonBones_BoneData_inheritRotation); + oluacls_prop(L, "inheritScale", _olua_fun_dragonBones_BoneData_inheritScale, _olua_fun_dragonBones_BoneData_inheritScale); + oluacls_prop(L, "inheritTranslation", _olua_fun_dragonBones_BoneData_inheritTranslation, _olua_fun_dragonBones_BoneData_inheritTranslation); + oluacls_prop(L, "length", _olua_fun_dragonBones_BoneData_length, _olua_fun_dragonBones_BoneData_length); + oluacls_prop(L, "name", _olua_fun_dragonBones_BoneData_name, _olua_fun_dragonBones_BoneData_name); + oluacls_prop(L, "parent", _olua_fun_dragonBones_BoneData_parent, _olua_fun_dragonBones_BoneData_parent); + oluacls_prop(L, "userData", _olua_fun_dragonBones_BoneData_userData, _olua_fun_dragonBones_BoneData_userData); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_db_BoneData(lua_State *L) +{ + olua_require(L, "dragonbones", luaopen_dragonbones); + if (!olua_getclass(L, "db.BoneData")) { + luaL_error(L, "class not found: dragonBones::BoneData"); + } return 1; } OLUA_END_DECLS -static int _dragonBones_SkinData_addDisplay(lua_State *L) +static int _olua_fun_dragonBones_SlotData_blendMode$1(lua_State *L) { olua_startinvoke(L); - dragonBones::SkinData *self = nullptr; - std::string arg1; /** slotName */ - dragonBones::DisplayData *arg2 = nullptr; /** value */ + dragonBones::SlotData *self = nullptr; - olua_to_object(L, 1, &self, "db.SkinData"); - olua_check_string(L, 2, &arg1); - olua_check_object(L, 3, &arg2, "db.DisplayData"); + olua_to_object(L, 1, &self, "db.SlotData"); - // void addDisplay(const std::string &slotName, dragonBones::DisplayData *value) - self->addDisplay(arg1, arg2); + // dragonBones::BlendMode blendMode + dragonBones::BlendMode ret = self->blendMode; + int num_ret = olua_push_enum(L, ret); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_dragonBones_SlotData_blendMode$2(lua_State *L) +{ + olua_startinvoke(L); + + dragonBones::SlotData *self = nullptr; + dragonBones::BlendMode arg1 = (dragonBones::BlendMode)0; /** blendMode */ + + olua_to_object(L, 1, &self, "db.SlotData"); + olua_check_enum(L, 2, &arg1); + + // dragonBones::BlendMode blendMode + self->blendMode = arg1; olua_endinvoke(L); return 0; } -static int _dragonBones_SkinData_getDisplay(lua_State *L) +static int _olua_fun_dragonBones_SlotData_blendMode(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // dragonBones::BlendMode blendMode + return _olua_fun_dragonBones_SlotData_blendMode$1(L); + } + + if (num_args == 1) { + // if ((olua_is_enum(L, 2))) { + // dragonBones::BlendMode blendMode + return _olua_fun_dragonBones_SlotData_blendMode$2(L); + // } + } + + luaL_error(L, "method 'dragonBones::SlotData::blendMode' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_dragonBones_SlotData_displayIndex$1(lua_State *L) { olua_startinvoke(L); - dragonBones::SkinData *self = nullptr; - std::string arg1; /** slotName */ - std::string arg2; /** displayName */ + dragonBones::SlotData *self = nullptr; - olua_to_object(L, 1, &self, "db.SkinData"); - olua_check_string(L, 2, &arg1); - olua_check_string(L, 3, &arg2); + olua_to_object(L, 1, &self, "db.SlotData"); - // dragonBones::DisplayData *getDisplay(const std::string &slotName, const std::string &displayName) - dragonBones::DisplayData *ret = self->getDisplay(arg1, arg2); - int num_ret = olua_push_object(L, ret, "db.DisplayData"); + // int displayIndex + int ret = self->displayIndex; + int num_ret = olua_push_integer(L, ret); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_dragonBones_SlotData_displayIndex$2(lua_State *L) +{ + olua_startinvoke(L); + + dragonBones::SlotData *self = nullptr; + int arg1 = 0; /** displayIndex */ + + olua_to_object(L, 1, &self, "db.SlotData"); + olua_check_integer(L, 2, &arg1); + + // int displayIndex + self->displayIndex = arg1; + + olua_endinvoke(L); + + return 0; +} + +static int _olua_fun_dragonBones_SlotData_displayIndex(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // int displayIndex + return _olua_fun_dragonBones_SlotData_displayIndex$1(L); + } + + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // int displayIndex + return _olua_fun_dragonBones_SlotData_displayIndex$2(L); + // } + } + + luaL_error(L, "method 'dragonBones::SlotData::displayIndex' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_dragonBones_SlotData_getBlendMode(lua_State *L) +{ + olua_startinvoke(L); + + dragonBones::SlotData *self = nullptr; + + olua_to_object(L, 1, &self, "db.SlotData"); + + // int getBlendMode() + int ret = self->getBlendMode(); + int num_ret = olua_push_integer(L, ret); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_dragonBones_SlotData_getParent(lua_State *L) +{ + olua_startinvoke(L); + + dragonBones::SlotData *self = nullptr; + + olua_to_object(L, 1, &self, "db.SlotData"); + + // const dragonBones::BoneData *getParent() + const dragonBones::BoneData *ret = self->getParent(); + int num_ret = olua_push_object(L, ret, "db.BoneData"); olua_endinvoke(L); return num_ret; } -static int _dragonBones_SkinData_getTypeIndex(lua_State *L) +static int _olua_fun_dragonBones_SlotData_getTypeIndex(lua_State *L) { olua_startinvoke(L); // static std::size_t getTypeIndex() - std::size_t ret = dragonBones::SkinData::getTypeIndex(); + std::size_t ret = dragonBones::SlotData::getTypeIndex(); int num_ret = olua_push_integer(L, ret); olua_endinvoke(L); @@ -7752,27 +10883,30 @@ static int _dragonBones_SkinData_getTypeIndex(lua_State *L) return num_ret; } -static int _dragonBones_SkinData_new(lua_State *L) +static int _olua_fun_dragonBones_SlotData_getUserData(lua_State *L) { olua_startinvoke(L); - // SkinData() - dragonBones::SkinData *ret = new dragonBones::SkinData(); - int num_ret = olua_push_object(L, ret, "db.SkinData"); - olua_postnew(L, ret); + dragonBones::SlotData *self = nullptr; + + olua_to_object(L, 1, &self, "db.SlotData"); + + // const dragonBones::UserData *getUserData() + const dragonBones::UserData *ret = self->getUserData(); + int num_ret = olua_push_object(L, ret, "db.UserData"); olua_endinvoke(L); return num_ret; } -static int _dragonBones_SkinData_get_name(lua_State *L) +static int _olua_fun_dragonBones_SlotData_name$1(lua_State *L) { olua_startinvoke(L); - dragonBones::SkinData *self = nullptr; + dragonBones::SlotData *self = nullptr; - olua_to_object(L, 1, &self, "db.SkinData"); + olua_to_object(L, 1, &self, "db.SlotData"); // std::string name std::string ret = self->name; @@ -7783,14 +10917,14 @@ static int _dragonBones_SkinData_get_name(lua_State *L) return num_ret; } -static int _dragonBones_SkinData_set_name(lua_State *L) +static int _olua_fun_dragonBones_SlotData_name$2(lua_State *L) { olua_startinvoke(L); - dragonBones::SkinData *self = nullptr; + dragonBones::SlotData *self = nullptr; std::string arg1; /** name */ - olua_to_object(L, 1, &self, "db.SkinData"); + olua_to_object(L, 1, &self, "db.SlotData"); olua_check_string(L, 2, &arg1); // std::string name @@ -7801,67 +10935,51 @@ static int _dragonBones_SkinData_set_name(lua_State *L) return 0; } -static int _dragonBones_SkinData_get_parent(lua_State *L) +static int _olua_fun_dragonBones_SlotData_name(lua_State *L) { - olua_startinvoke(L); - - dragonBones::SkinData *self = nullptr; + int num_args = lua_gettop(L) - 1; - olua_to_object(L, 1, &self, "db.SkinData"); + if (num_args == 0) { + // std::string name + return _olua_fun_dragonBones_SlotData_name$1(L); + } - // dragonBones::ArmatureData *parent - dragonBones::ArmatureData *ret = self->parent; - int num_ret = olua_push_object(L, ret, "db.ArmatureData"); + if (num_args == 1) { + // if ((olua_is_string(L, 2))) { + // std::string name + return _olua_fun_dragonBones_SlotData_name$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'dragonBones::SlotData::name' not support '%d' arguments", num_args); - return num_ret; + return 0; } -static int _dragonBones_SkinData_set_parent(lua_State *L) +static int _olua_fun_dragonBones_SlotData_new(lua_State *L) { olua_startinvoke(L); - dragonBones::SkinData *self = nullptr; - dragonBones::ArmatureData *arg1 = nullptr; /** parent */ - - olua_to_object(L, 1, &self, "db.SkinData"); - olua_check_object(L, 2, &arg1, "db.ArmatureData"); - - // dragonBones::ArmatureData *parent - self->parent = arg1; + // dragonBones::SlotData() + dragonBones::SlotData *ret = new dragonBones::SlotData(); + int num_ret = olua_push_object(L, ret, "db.SlotData"); + olua_postnew(L, ret); olua_endinvoke(L); - return 0; -} - -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_dragonBones_SkinData(lua_State *L) -{ - oluacls_class(L, "db.SkinData"); - oluacls_func(L, "addDisplay", _dragonBones_SkinData_addDisplay); - oluacls_func(L, "getDisplay", _dragonBones_SkinData_getDisplay); - oluacls_func(L, "getTypeIndex", _dragonBones_SkinData_getTypeIndex); - oluacls_func(L, "new", _dragonBones_SkinData_new); - oluacls_prop(L, "typeIndex", _dragonBones_SkinData_getTypeIndex, nullptr); - oluacls_prop(L, "name", _dragonBones_SkinData_get_name, _dragonBones_SkinData_set_name); - oluacls_prop(L, "parent", _dragonBones_SkinData_get_parent, _dragonBones_SkinData_set_parent); - - return 1; + return num_ret; } -OLUA_END_DECLS -static int _dragonBones_BoneData_getParent(lua_State *L) +static int _olua_fun_dragonBones_SlotData_parent$1(lua_State *L) { olua_startinvoke(L); - dragonBones::BoneData *self = nullptr; + dragonBones::SlotData *self = nullptr; - olua_to_object(L, 1, &self, "db.BoneData"); + olua_to_object(L, 1, &self, "db.SlotData"); - // const dragonBones::BoneData *getParent() - const dragonBones::BoneData *ret = self->getParent(); + // dragonBones::BoneData *parent + dragonBones::BoneData *ret = self->parent; int num_ret = olua_push_object(L, ret, "db.BoneData"); olua_endinvoke(L); @@ -7869,58 +10987,71 @@ static int _dragonBones_BoneData_getParent(lua_State *L) return num_ret; } -static int _dragonBones_BoneData_getTypeIndex(lua_State *L) +static int _olua_fun_dragonBones_SlotData_parent$2(lua_State *L) { olua_startinvoke(L); - // static std::size_t getTypeIndex() - std::size_t ret = dragonBones::BoneData::getTypeIndex(); - int num_ret = olua_push_integer(L, ret); + dragonBones::SlotData *self = nullptr; + dragonBones::BoneData *arg1 = nullptr; /** parent */ + + olua_to_object(L, 1, &self, "db.SlotData"); + olua_check_object(L, 2, &arg1, "db.BoneData"); + + // dragonBones::BoneData *parent + self->parent = arg1; olua_endinvoke(L); - return num_ret; + return 0; } -static int _dragonBones_BoneData_getUserData(lua_State *L) +static int _olua_fun_dragonBones_SlotData_parent(lua_State *L) { - olua_startinvoke(L); - - dragonBones::BoneData *self = nullptr; + int num_args = lua_gettop(L) - 1; - olua_to_object(L, 1, &self, "db.BoneData"); + if (num_args == 0) { + // dragonBones::BoneData *parent + return _olua_fun_dragonBones_SlotData_parent$1(L); + } - // const dragonBones::UserData *getUserData() - const dragonBones::UserData *ret = self->getUserData(); - int num_ret = olua_push_object(L, ret, "db.UserData"); + if (num_args == 1) { + // if ((olua_is_object(L, 2, "db.BoneData"))) { + // dragonBones::BoneData *parent + return _olua_fun_dragonBones_SlotData_parent$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'dragonBones::SlotData::parent' not support '%d' arguments", num_args); - return num_ret; + return 0; } -static int _dragonBones_BoneData_new(lua_State *L) +static int _olua_fun_dragonBones_SlotData_setBlendMode(lua_State *L) { olua_startinvoke(L); - // BoneData() - dragonBones::BoneData *ret = new dragonBones::BoneData(); - int num_ret = olua_push_object(L, ret, "db.BoneData"); - olua_postnew(L, ret); + dragonBones::SlotData *self = nullptr; + int arg1 = 0; /** value */ + + olua_to_object(L, 1, &self, "db.SlotData"); + olua_check_integer(L, 2, &arg1); + + // void setBlendMode(int value) + self->setBlendMode(arg1); olua_endinvoke(L); - return num_ret; + return 0; } -static int _dragonBones_BoneData_setParent(lua_State *L) +static int _olua_fun_dragonBones_SlotData_setParent(lua_State *L) { olua_startinvoke(L); - dragonBones::BoneData *self = nullptr; + dragonBones::SlotData *self = nullptr; dragonBones::BoneData *arg1 = nullptr; /** value */ - olua_to_object(L, 1, &self, "db.BoneData"); + olua_to_object(L, 1, &self, "db.SlotData"); olua_check_object(L, 2, &arg1, "db.BoneData"); // void setParent(dragonBones::BoneData *value) @@ -7931,14 +11062,14 @@ static int _dragonBones_BoneData_setParent(lua_State *L) return 0; } -static int _dragonBones_BoneData_setUserData(lua_State *L) +static int _olua_fun_dragonBones_SlotData_setUserData(lua_State *L) { olua_startinvoke(L); - dragonBones::BoneData *self = nullptr; + dragonBones::SlotData *self = nullptr; dragonBones::UserData *arg1 = nullptr; /** value */ - olua_to_object(L, 1, &self, "db.BoneData"); + olua_to_object(L, 1, &self, "db.SlotData"); olua_check_object(L, 2, &arg1, "db.UserData"); // void setUserData(dragonBones::UserData *value) @@ -7949,86 +11080,161 @@ static int _dragonBones_BoneData_setUserData(lua_State *L) return 0; } -static int _dragonBones_BoneData_get_inheritReflection(lua_State *L) +static int _olua_fun_dragonBones_SlotData_userData$1(lua_State *L) { olua_startinvoke(L); - dragonBones::BoneData *self = nullptr; + dragonBones::SlotData *self = nullptr; - olua_to_object(L, 1, &self, "db.BoneData"); + olua_to_object(L, 1, &self, "db.SlotData"); - // bool inheritReflection - bool ret = self->inheritReflection; - int num_ret = olua_push_bool(L, ret); + // dragonBones::UserData *userData + dragonBones::UserData *ret = self->userData; + int num_ret = olua_push_object(L, ret, "db.UserData"); olua_endinvoke(L); return num_ret; } -static int _dragonBones_BoneData_set_inheritReflection(lua_State *L) +static int _olua_fun_dragonBones_SlotData_userData$2(lua_State *L) { olua_startinvoke(L); - dragonBones::BoneData *self = nullptr; - bool arg1 = false; /** inheritReflection */ + dragonBones::SlotData *self = nullptr; + dragonBones::UserData *arg1 = nullptr; /** userData */ - olua_to_object(L, 1, &self, "db.BoneData"); - olua_check_bool(L, 2, &arg1); + olua_to_object(L, 1, &self, "db.SlotData"); + olua_check_object(L, 2, &arg1, "db.UserData"); - // bool inheritReflection - self->inheritReflection = arg1; + // dragonBones::UserData *userData + self->userData = arg1; olua_endinvoke(L); return 0; } -static int _dragonBones_BoneData_get_inheritRotation(lua_State *L) +static int _olua_fun_dragonBones_SlotData_userData(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // dragonBones::UserData *userData + return _olua_fun_dragonBones_SlotData_userData$1(L); + } + + if (num_args == 1) { + // if ((olua_is_object(L, 2, "db.UserData"))) { + // dragonBones::UserData *userData + return _olua_fun_dragonBones_SlotData_userData$2(L); + // } + } + + luaL_error(L, "method 'dragonBones::SlotData::userData' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_dragonBones_SlotData_zOrder$1(lua_State *L) { olua_startinvoke(L); - dragonBones::BoneData *self = nullptr; + dragonBones::SlotData *self = nullptr; - olua_to_object(L, 1, &self, "db.BoneData"); + olua_to_object(L, 1, &self, "db.SlotData"); - // bool inheritRotation - bool ret = self->inheritRotation; - int num_ret = olua_push_bool(L, ret); + // int zOrder + int ret = self->zOrder; + int num_ret = olua_push_integer(L, ret); olua_endinvoke(L); return num_ret; } -static int _dragonBones_BoneData_set_inheritRotation(lua_State *L) +static int _olua_fun_dragonBones_SlotData_zOrder$2(lua_State *L) { olua_startinvoke(L); - dragonBones::BoneData *self = nullptr; - bool arg1 = false; /** inheritRotation */ + dragonBones::SlotData *self = nullptr; + int arg1 = 0; /** zOrder */ - olua_to_object(L, 1, &self, "db.BoneData"); - olua_check_bool(L, 2, &arg1); + olua_to_object(L, 1, &self, "db.SlotData"); + olua_check_integer(L, 2, &arg1); - // bool inheritRotation - self->inheritRotation = arg1; + // int zOrder + self->zOrder = arg1; olua_endinvoke(L); return 0; } -static int _dragonBones_BoneData_get_inheritScale(lua_State *L) +static int _olua_fun_dragonBones_SlotData_zOrder(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // int zOrder + return _olua_fun_dragonBones_SlotData_zOrder$1(L); + } + + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // int zOrder + return _olua_fun_dragonBones_SlotData_zOrder$2(L); + // } + } + + luaL_error(L, "method 'dragonBones::SlotData::zOrder' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_cls_db_SlotData(lua_State *L) +{ + oluacls_class(L, "db.SlotData"); + oluacls_func(L, "getBlendMode", _olua_fun_dragonBones_SlotData_getBlendMode); + oluacls_func(L, "getParent", _olua_fun_dragonBones_SlotData_getParent); + oluacls_func(L, "getTypeIndex", _olua_fun_dragonBones_SlotData_getTypeIndex); + oluacls_func(L, "getUserData", _olua_fun_dragonBones_SlotData_getUserData); + oluacls_func(L, "new", _olua_fun_dragonBones_SlotData_new); + oluacls_func(L, "setBlendMode", _olua_fun_dragonBones_SlotData_setBlendMode); + oluacls_func(L, "setParent", _olua_fun_dragonBones_SlotData_setParent); + oluacls_func(L, "setUserData", _olua_fun_dragonBones_SlotData_setUserData); + oluacls_prop(L, "typeIndex", _olua_fun_dragonBones_SlotData_getTypeIndex, nullptr); + oluacls_prop(L, "blendMode", _olua_fun_dragonBones_SlotData_blendMode, _olua_fun_dragonBones_SlotData_blendMode); + oluacls_prop(L, "displayIndex", _olua_fun_dragonBones_SlotData_displayIndex, _olua_fun_dragonBones_SlotData_displayIndex); + oluacls_prop(L, "name", _olua_fun_dragonBones_SlotData_name, _olua_fun_dragonBones_SlotData_name); + oluacls_prop(L, "parent", _olua_fun_dragonBones_SlotData_parent, _olua_fun_dragonBones_SlotData_parent); + oluacls_prop(L, "userData", _olua_fun_dragonBones_SlotData_userData, _olua_fun_dragonBones_SlotData_userData); + oluacls_prop(L, "zOrder", _olua_fun_dragonBones_SlotData_zOrder, _olua_fun_dragonBones_SlotData_zOrder); + + return 1; +} + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_db_SlotData(lua_State *L) +{ + olua_require(L, "dragonbones", luaopen_dragonbones); + if (!olua_getclass(L, "db.SlotData")) { + luaL_error(L, "class not found: dragonBones::SlotData"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_fun_dragonBones_AnimationState_actionEnabled$1(lua_State *L) { olua_startinvoke(L); - dragonBones::BoneData *self = nullptr; + dragonBones::AnimationState *self = nullptr; - olua_to_object(L, 1, &self, "db.BoneData"); + olua_to_object(L, 1, &self, "db.AnimationState"); - // bool inheritScale - bool ret = self->inheritScale; + // bool actionEnabled + bool ret = self->actionEnabled; int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); @@ -8036,687 +11242,684 @@ static int _dragonBones_BoneData_get_inheritScale(lua_State *L) return num_ret; } -static int _dragonBones_BoneData_set_inheritScale(lua_State *L) +static int _olua_fun_dragonBones_AnimationState_actionEnabled$2(lua_State *L) { olua_startinvoke(L); - dragonBones::BoneData *self = nullptr; - bool arg1 = false; /** inheritScale */ + dragonBones::AnimationState *self = nullptr; + bool arg1 = false; /** actionEnabled */ - olua_to_object(L, 1, &self, "db.BoneData"); + olua_to_object(L, 1, &self, "db.AnimationState"); olua_check_bool(L, 2, &arg1); - // bool inheritScale - self->inheritScale = arg1; + // bool actionEnabled + self->actionEnabled = arg1; olua_endinvoke(L); return 0; } -static int _dragonBones_BoneData_get_inheritTranslation(lua_State *L) +static int _olua_fun_dragonBones_AnimationState_actionEnabled(lua_State *L) { - olua_startinvoke(L); - - dragonBones::BoneData *self = nullptr; + int num_args = lua_gettop(L) - 1; - olua_to_object(L, 1, &self, "db.BoneData"); + if (num_args == 0) { + // bool actionEnabled + return _olua_fun_dragonBones_AnimationState_actionEnabled$1(L); + } - // bool inheritTranslation - bool ret = self->inheritTranslation; - int num_ret = olua_push_bool(L, ret); + if (num_args == 1) { + // if ((olua_is_bool(L, 2))) { + // bool actionEnabled + return _olua_fun_dragonBones_AnimationState_actionEnabled$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'dragonBones::AnimationState::actionEnabled' not support '%d' arguments", num_args); - return num_ret; + return 0; } -static int _dragonBones_BoneData_set_inheritTranslation(lua_State *L) +static int _olua_fun_dragonBones_AnimationState_addBoneMask$1(lua_State *L) { olua_startinvoke(L); - dragonBones::BoneData *self = nullptr; - bool arg1 = false; /** inheritTranslation */ + dragonBones::AnimationState *self = nullptr; + std::string arg1; /** boneName */ + bool arg2 = false; /** recursive */ - olua_to_object(L, 1, &self, "db.BoneData"); - olua_check_bool(L, 2, &arg1); + olua_to_object(L, 1, &self, "db.AnimationState"); + olua_check_string(L, 2, &arg1); + olua_check_bool(L, 3, &arg2); - // bool inheritTranslation - self->inheritTranslation = arg1; + // void addBoneMask(const std::string &boneName, @optional bool recursive) + self->addBoneMask(arg1, arg2); olua_endinvoke(L); return 0; } -static int _dragonBones_BoneData_get_length(lua_State *L) +static int _olua_fun_dragonBones_AnimationState_addBoneMask$2(lua_State *L) { olua_startinvoke(L); - dragonBones::BoneData *self = nullptr; - - olua_to_object(L, 1, &self, "db.BoneData"); + dragonBones::AnimationState *self = nullptr; + std::string arg1; /** boneName */ - // float length - float ret = self->length; - int num_ret = olua_push_number(L, ret); + olua_to_object(L, 1, &self, "db.AnimationState"); + olua_check_string(L, 2, &arg1); + + // void addBoneMask(const std::string &boneName) + self->addBoneMask(arg1); olua_endinvoke(L); - return num_ret; + return 0; } -static int _dragonBones_BoneData_set_length(lua_State *L) +static int _olua_fun_dragonBones_AnimationState_addBoneMask(lua_State *L) { - olua_startinvoke(L); - - dragonBones::BoneData *self = nullptr; - float arg1 = 0; /** length */ + int num_args = lua_gettop(L) - 1; - olua_to_object(L, 1, &self, "db.BoneData"); - olua_check_number(L, 2, &arg1); + if (num_args == 1) { + // if ((olua_is_string(L, 2))) { + // void addBoneMask(const std::string &boneName) + return _olua_fun_dragonBones_AnimationState_addBoneMask$2(L); + // } + } - // float length - self->length = arg1; + if (num_args == 2) { + // if ((olua_is_string(L, 2)) && (olua_is_bool(L, 3))) { + // void addBoneMask(const std::string &boneName, @optional bool recursive) + return _olua_fun_dragonBones_AnimationState_addBoneMask$1(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'dragonBones::AnimationState::addBoneMask' not support '%d' arguments", num_args); return 0; } -static int _dragonBones_BoneData_get_name(lua_State *L) +static int _olua_fun_dragonBones_AnimationState_additiveBlending$1(lua_State *L) { olua_startinvoke(L); - dragonBones::BoneData *self = nullptr; + dragonBones::AnimationState *self = nullptr; - olua_to_object(L, 1, &self, "db.BoneData"); + olua_to_object(L, 1, &self, "db.AnimationState"); - // std::string name - std::string ret = self->name; - int num_ret = olua_push_string(L, ret); + // bool additiveBlending + bool ret = self->additiveBlending; + int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); return num_ret; } -static int _dragonBones_BoneData_set_name(lua_State *L) +static int _olua_fun_dragonBones_AnimationState_additiveBlending$2(lua_State *L) { olua_startinvoke(L); - dragonBones::BoneData *self = nullptr; - std::string arg1; /** name */ + dragonBones::AnimationState *self = nullptr; + bool arg1 = false; /** additiveBlending */ - olua_to_object(L, 1, &self, "db.BoneData"); - olua_check_string(L, 2, &arg1); + olua_to_object(L, 1, &self, "db.AnimationState"); + olua_check_bool(L, 2, &arg1); - // std::string name - self->name = arg1; + // bool additiveBlending + self->additiveBlending = arg1; olua_endinvoke(L); return 0; } -static int _dragonBones_BoneData_get_parent(lua_State *L) +static int _olua_fun_dragonBones_AnimationState_additiveBlending(lua_State *L) { - olua_startinvoke(L); - - dragonBones::BoneData *self = nullptr; + int num_args = lua_gettop(L) - 1; - olua_to_object(L, 1, &self, "db.BoneData"); + if (num_args == 0) { + // bool additiveBlending + return _olua_fun_dragonBones_AnimationState_additiveBlending$1(L); + } - // dragonBones::BoneData *parent - dragonBones::BoneData *ret = self->parent; - int num_ret = olua_push_object(L, ret, "db.BoneData"); + if (num_args == 1) { + // if ((olua_is_bool(L, 2))) { + // bool additiveBlending + return _olua_fun_dragonBones_AnimationState_additiveBlending$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'dragonBones::AnimationState::additiveBlending' not support '%d' arguments", num_args); - return num_ret; + return 0; } -static int _dragonBones_BoneData_set_parent(lua_State *L) +static int _olua_fun_dragonBones_AnimationState_advanceTime(lua_State *L) { olua_startinvoke(L); - dragonBones::BoneData *self = nullptr; - dragonBones::BoneData *arg1 = nullptr; /** parent */ + dragonBones::AnimationState *self = nullptr; + float arg1 = 0; /** passedTime */ + float arg2 = 0; /** cacheFrameRate */ - olua_to_object(L, 1, &self, "db.BoneData"); - olua_check_object(L, 2, &arg1, "db.BoneData"); + olua_to_object(L, 1, &self, "db.AnimationState"); + olua_check_number(L, 2, &arg1); + olua_check_number(L, 3, &arg2); - // dragonBones::BoneData *parent - self->parent = arg1; + // void advanceTime(float passedTime, float cacheFrameRate) + self->advanceTime(arg1, arg2); olua_endinvoke(L); return 0; } -static int _dragonBones_BoneData_get_userData(lua_State *L) +static int _olua_fun_dragonBones_AnimationState_autoFadeOutTime$1(lua_State *L) { olua_startinvoke(L); - dragonBones::BoneData *self = nullptr; + dragonBones::AnimationState *self = nullptr; - olua_to_object(L, 1, &self, "db.BoneData"); + olua_to_object(L, 1, &self, "db.AnimationState"); - // dragonBones::UserData *userData - dragonBones::UserData *ret = self->userData; - int num_ret = olua_push_object(L, ret, "db.UserData"); + // float autoFadeOutTime + float ret = self->autoFadeOutTime; + int num_ret = olua_push_number(L, ret); olua_endinvoke(L); return num_ret; } -static int _dragonBones_BoneData_set_userData(lua_State *L) +static int _olua_fun_dragonBones_AnimationState_autoFadeOutTime$2(lua_State *L) { olua_startinvoke(L); - dragonBones::BoneData *self = nullptr; - dragonBones::UserData *arg1 = nullptr; /** userData */ + dragonBones::AnimationState *self = nullptr; + float arg1 = 0; /** autoFadeOutTime */ - olua_to_object(L, 1, &self, "db.BoneData"); - olua_check_object(L, 2, &arg1, "db.UserData"); + olua_to_object(L, 1, &self, "db.AnimationState"); + olua_check_number(L, 2, &arg1); - // dragonBones::UserData *userData - self->userData = arg1; + // float autoFadeOutTime + self->autoFadeOutTime = arg1; olua_endinvoke(L); return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_dragonBones_BoneData(lua_State *L) +static int _olua_fun_dragonBones_AnimationState_autoFadeOutTime(lua_State *L) { - oluacls_class(L, "db.BoneData"); - oluacls_func(L, "getParent", _dragonBones_BoneData_getParent); - oluacls_func(L, "getTypeIndex", _dragonBones_BoneData_getTypeIndex); - oluacls_func(L, "getUserData", _dragonBones_BoneData_getUserData); - oluacls_func(L, "new", _dragonBones_BoneData_new); - oluacls_func(L, "setParent", _dragonBones_BoneData_setParent); - oluacls_func(L, "setUserData", _dragonBones_BoneData_setUserData); - oluacls_prop(L, "parent", _dragonBones_BoneData_getParent, _dragonBones_BoneData_setParent); - oluacls_prop(L, "typeIndex", _dragonBones_BoneData_getTypeIndex, nullptr); - oluacls_prop(L, "userData", _dragonBones_BoneData_getUserData, _dragonBones_BoneData_setUserData); - oluacls_prop(L, "inheritReflection", _dragonBones_BoneData_get_inheritReflection, _dragonBones_BoneData_set_inheritReflection); - oluacls_prop(L, "inheritRotation", _dragonBones_BoneData_get_inheritRotation, _dragonBones_BoneData_set_inheritRotation); - oluacls_prop(L, "inheritScale", _dragonBones_BoneData_get_inheritScale, _dragonBones_BoneData_set_inheritScale); - oluacls_prop(L, "inheritTranslation", _dragonBones_BoneData_get_inheritTranslation, _dragonBones_BoneData_set_inheritTranslation); - oluacls_prop(L, "length", _dragonBones_BoneData_get_length, _dragonBones_BoneData_set_length); - oluacls_prop(L, "name", _dragonBones_BoneData_get_name, _dragonBones_BoneData_set_name); - oluacls_prop(L, "parent", _dragonBones_BoneData_get_parent, _dragonBones_BoneData_set_parent); - oluacls_prop(L, "userData", _dragonBones_BoneData_get_userData, _dragonBones_BoneData_set_userData); + int num_args = lua_gettop(L) - 1; - return 1; + if (num_args == 0) { + // float autoFadeOutTime + return _olua_fun_dragonBones_AnimationState_autoFadeOutTime$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float autoFadeOutTime + return _olua_fun_dragonBones_AnimationState_autoFadeOutTime$2(L); + // } + } + + luaL_error(L, "method 'dragonBones::AnimationState::autoFadeOutTime' not support '%d' arguments", num_args); + + return 0; } -OLUA_END_DECLS -static int _dragonBones_SlotData_getBlendMode(lua_State *L) +static int _olua_fun_dragonBones_AnimationState_containsBoneMask(lua_State *L) { olua_startinvoke(L); - dragonBones::SlotData *self = nullptr; + dragonBones::AnimationState *self = nullptr; + std::string arg1; /** boneName */ - olua_to_object(L, 1, &self, "db.SlotData"); + olua_to_object(L, 1, &self, "db.AnimationState"); + olua_check_string(L, 2, &arg1); - // int getBlendMode() - int ret = self->getBlendMode(); - int num_ret = olua_push_integer(L, ret); + // bool containsBoneMask(const std::string &boneName) + bool ret = self->containsBoneMask(arg1); + int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); return num_ret; } -static int _dragonBones_SlotData_getParent(lua_State *L) +static int _olua_fun_dragonBones_AnimationState_displayControl$1(lua_State *L) { olua_startinvoke(L); - dragonBones::SlotData *self = nullptr; + dragonBones::AnimationState *self = nullptr; - olua_to_object(L, 1, &self, "db.SlotData"); + olua_to_object(L, 1, &self, "db.AnimationState"); - // const dragonBones::BoneData *getParent() - const dragonBones::BoneData *ret = self->getParent(); - int num_ret = olua_push_object(L, ret, "db.BoneData"); + // bool displayControl + bool ret = self->displayControl; + int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); return num_ret; } -static int _dragonBones_SlotData_getTypeIndex(lua_State *L) +static int _olua_fun_dragonBones_AnimationState_displayControl$2(lua_State *L) { olua_startinvoke(L); - // static std::size_t getTypeIndex() - std::size_t ret = dragonBones::SlotData::getTypeIndex(); - int num_ret = olua_push_integer(L, ret); + dragonBones::AnimationState *self = nullptr; + bool arg1 = false; /** displayControl */ + + olua_to_object(L, 1, &self, "db.AnimationState"); + olua_check_bool(L, 2, &arg1); + + // bool displayControl + self->displayControl = arg1; olua_endinvoke(L); - return num_ret; + return 0; } -static int _dragonBones_SlotData_getUserData(lua_State *L) +static int _olua_fun_dragonBones_AnimationState_displayControl(lua_State *L) { - olua_startinvoke(L); - - dragonBones::SlotData *self = nullptr; + int num_args = lua_gettop(L) - 1; - olua_to_object(L, 1, &self, "db.SlotData"); + if (num_args == 0) { + // bool displayControl + return _olua_fun_dragonBones_AnimationState_displayControl$1(L); + } - // const dragonBones::UserData *getUserData() - const dragonBones::UserData *ret = self->getUserData(); - int num_ret = olua_push_object(L, ret, "db.UserData"); + if (num_args == 1) { + // if ((olua_is_bool(L, 2))) { + // bool displayControl + return _olua_fun_dragonBones_AnimationState_displayControl$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'dragonBones::AnimationState::displayControl' not support '%d' arguments", num_args); - return num_ret; + return 0; } -static int _dragonBones_SlotData_new(lua_State *L) +static int _olua_fun_dragonBones_AnimationState_fadeOut$1(lua_State *L) { olua_startinvoke(L); - // SlotData() - dragonBones::SlotData *ret = new dragonBones::SlotData(); - int num_ret = olua_push_object(L, ret, "db.SlotData"); - olua_postnew(L, ret); + dragonBones::AnimationState *self = nullptr; + float arg1 = 0; /** fadeOutTime */ + bool arg2 = false; /** pausePlayhead */ + + olua_to_object(L, 1, &self, "db.AnimationState"); + olua_check_number(L, 2, &arg1); + olua_check_bool(L, 3, &arg2); + + // void fadeOut(float fadeOutTime, @optional bool pausePlayhead) + self->fadeOut(arg1, arg2); olua_endinvoke(L); - return num_ret; + return 0; } -static int _dragonBones_SlotData_setBlendMode(lua_State *L) +static int _olua_fun_dragonBones_AnimationState_fadeOut$2(lua_State *L) { olua_startinvoke(L); - dragonBones::SlotData *self = nullptr; - int arg1 = 0; /** value */ + dragonBones::AnimationState *self = nullptr; + float arg1 = 0; /** fadeOutTime */ - olua_to_object(L, 1, &self, "db.SlotData"); - olua_check_integer(L, 2, &arg1); + olua_to_object(L, 1, &self, "db.AnimationState"); + olua_check_number(L, 2, &arg1); - // void setBlendMode(int value) - self->setBlendMode(arg1); + // void fadeOut(float fadeOutTime) + self->fadeOut(arg1); olua_endinvoke(L); return 0; } -static int _dragonBones_SlotData_setParent(lua_State *L) +static int _olua_fun_dragonBones_AnimationState_fadeOut(lua_State *L) { - olua_startinvoke(L); - - dragonBones::SlotData *self = nullptr; - dragonBones::BoneData *arg1 = nullptr; /** value */ + int num_args = lua_gettop(L) - 1; - olua_to_object(L, 1, &self, "db.SlotData"); - olua_check_object(L, 2, &arg1, "db.BoneData"); + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // void fadeOut(float fadeOutTime) + return _olua_fun_dragonBones_AnimationState_fadeOut$2(L); + // } + } - // void setParent(dragonBones::BoneData *value) - self->setParent(arg1); + if (num_args == 2) { + // if ((olua_is_number(L, 2)) && (olua_is_bool(L, 3))) { + // void fadeOut(float fadeOutTime, @optional bool pausePlayhead) + return _olua_fun_dragonBones_AnimationState_fadeOut$1(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'dragonBones::AnimationState::fadeOut' not support '%d' arguments", num_args); return 0; } -static int _dragonBones_SlotData_setUserData(lua_State *L) +static int _olua_fun_dragonBones_AnimationState_fadeTotalTime$1(lua_State *L) { olua_startinvoke(L); - dragonBones::SlotData *self = nullptr; - dragonBones::UserData *arg1 = nullptr; /** value */ + dragonBones::AnimationState *self = nullptr; - olua_to_object(L, 1, &self, "db.SlotData"); - olua_check_object(L, 2, &arg1, "db.UserData"); + olua_to_object(L, 1, &self, "db.AnimationState"); - // void setUserData(dragonBones::UserData *value) - self->setUserData(arg1); + // float fadeTotalTime + float ret = self->fadeTotalTime; + int num_ret = olua_push_number(L, ret); olua_endinvoke(L); - return 0; + return num_ret; } -static int _dragonBones_SlotData_get_blendMode(lua_State *L) +static int _olua_fun_dragonBones_AnimationState_fadeTotalTime$2(lua_State *L) { olua_startinvoke(L); - dragonBones::SlotData *self = nullptr; + dragonBones::AnimationState *self = nullptr; + float arg1 = 0; /** fadeTotalTime */ - olua_to_object(L, 1, &self, "db.SlotData"); + olua_to_object(L, 1, &self, "db.AnimationState"); + olua_check_number(L, 2, &arg1); - // dragonBones::BlendMode blendMode - dragonBones::BlendMode ret = self->blendMode; - int num_ret = olua_push_enum(L, ret); + // float fadeTotalTime + self->fadeTotalTime = arg1; olua_endinvoke(L); - return num_ret; + return 0; } -static int _dragonBones_SlotData_set_blendMode(lua_State *L) +static int _olua_fun_dragonBones_AnimationState_fadeTotalTime(lua_State *L) { - olua_startinvoke(L); - - dragonBones::SlotData *self = nullptr; - dragonBones::BlendMode arg1 = (dragonBones::BlendMode)0; /** blendMode */ + int num_args = lua_gettop(L) - 1; - olua_to_object(L, 1, &self, "db.SlotData"); - olua_check_enum(L, 2, &arg1); + if (num_args == 0) { + // float fadeTotalTime + return _olua_fun_dragonBones_AnimationState_fadeTotalTime$1(L); + } - // dragonBones::BlendMode blendMode - self->blendMode = arg1; + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float fadeTotalTime + return _olua_fun_dragonBones_AnimationState_fadeTotalTime$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'dragonBones::AnimationState::fadeTotalTime' not support '%d' arguments", num_args); return 0; } -static int _dragonBones_SlotData_get_displayIndex(lua_State *L) +static int _olua_fun_dragonBones_AnimationState_getAnimationData(lua_State *L) { olua_startinvoke(L); - dragonBones::SlotData *self = nullptr; + dragonBones::AnimationState *self = nullptr; - olua_to_object(L, 1, &self, "db.SlotData"); + olua_to_object(L, 1, &self, "db.AnimationState"); - // int displayIndex - int ret = self->displayIndex; - int num_ret = olua_push_integer(L, ret); + // const dragonBones::AnimationData *getAnimationData() + const dragonBones::AnimationData *ret = self->getAnimationData(); + int num_ret = olua_push_object(L, ret, "db.AnimationData"); olua_endinvoke(L); return num_ret; } -static int _dragonBones_SlotData_set_displayIndex(lua_State *L) +static int _olua_fun_dragonBones_AnimationState_getCurrentPlayTimes(lua_State *L) { olua_startinvoke(L); - dragonBones::SlotData *self = nullptr; - int arg1 = 0; /** displayIndex */ + dragonBones::AnimationState *self = nullptr; - olua_to_object(L, 1, &self, "db.SlotData"); - olua_check_integer(L, 2, &arg1); + olua_to_object(L, 1, &self, "db.AnimationState"); - // int displayIndex - self->displayIndex = arg1; + // unsigned int getCurrentPlayTimes() + unsigned int ret = self->getCurrentPlayTimes(); + int num_ret = olua_push_integer(L, ret); olua_endinvoke(L); - return 0; + return num_ret; } -static int _dragonBones_SlotData_get_name(lua_State *L) +static int _olua_fun_dragonBones_AnimationState_getCurrentTime(lua_State *L) { olua_startinvoke(L); - dragonBones::SlotData *self = nullptr; + dragonBones::AnimationState *self = nullptr; - olua_to_object(L, 1, &self, "db.SlotData"); + olua_to_object(L, 1, &self, "db.AnimationState"); - // std::string name - std::string ret = self->name; - int num_ret = olua_push_string(L, ret); + // float getCurrentTime() + float ret = self->getCurrentTime(); + int num_ret = olua_push_number(L, ret); olua_endinvoke(L); return num_ret; } -static int _dragonBones_SlotData_set_name(lua_State *L) +static int _olua_fun_dragonBones_AnimationState_getName(lua_State *L) { olua_startinvoke(L); - dragonBones::SlotData *self = nullptr; - std::string arg1; /** name */ + dragonBones::AnimationState *self = nullptr; - olua_to_object(L, 1, &self, "db.SlotData"); - olua_check_string(L, 2, &arg1); + olua_to_object(L, 1, &self, "db.AnimationState"); - // std::string name - self->name = arg1; + // const std::string &getName() + const std::string &ret = self->getName(); + int num_ret = olua_push_string(L, ret); olua_endinvoke(L); - return 0; + return num_ret; } -static int _dragonBones_SlotData_get_parent(lua_State *L) +static int _olua_fun_dragonBones_AnimationState_getTotalTime(lua_State *L) { olua_startinvoke(L); - dragonBones::SlotData *self = nullptr; + dragonBones::AnimationState *self = nullptr; - olua_to_object(L, 1, &self, "db.SlotData"); + olua_to_object(L, 1, &self, "db.AnimationState"); - // dragonBones::BoneData *parent - dragonBones::BoneData *ret = self->parent; - int num_ret = olua_push_object(L, ret, "db.BoneData"); + // float getTotalTime() + float ret = self->getTotalTime(); + int num_ret = olua_push_number(L, ret); olua_endinvoke(L); return num_ret; } -static int _dragonBones_SlotData_set_parent(lua_State *L) +static int _olua_fun_dragonBones_AnimationState_getTypeIndex(lua_State *L) { olua_startinvoke(L); - dragonBones::SlotData *self = nullptr; - dragonBones::BoneData *arg1 = nullptr; /** parent */ - - olua_to_object(L, 1, &self, "db.SlotData"); - olua_check_object(L, 2, &arg1, "db.BoneData"); - - // dragonBones::BoneData *parent - self->parent = arg1; + // static std::size_t getTypeIndex() + std::size_t ret = dragonBones::AnimationState::getTypeIndex(); + int num_ret = olua_push_integer(L, ret); olua_endinvoke(L); - return 0; + return num_ret; } -static int _dragonBones_SlotData_get_userData(lua_State *L) +static int _olua_fun_dragonBones_AnimationState_group$1(lua_State *L) { olua_startinvoke(L); - dragonBones::SlotData *self = nullptr; + dragonBones::AnimationState *self = nullptr; - olua_to_object(L, 1, &self, "db.SlotData"); + olua_to_object(L, 1, &self, "db.AnimationState"); - // dragonBones::UserData *userData - dragonBones::UserData *ret = self->userData; - int num_ret = olua_push_object(L, ret, "db.UserData"); + // std::string group + std::string ret = self->group; + int num_ret = olua_push_string(L, ret); olua_endinvoke(L); return num_ret; } -static int _dragonBones_SlotData_set_userData(lua_State *L) +static int _olua_fun_dragonBones_AnimationState_group$2(lua_State *L) { olua_startinvoke(L); - dragonBones::SlotData *self = nullptr; - dragonBones::UserData *arg1 = nullptr; /** userData */ + dragonBones::AnimationState *self = nullptr; + std::string arg1; /** group */ - olua_to_object(L, 1, &self, "db.SlotData"); - olua_check_object(L, 2, &arg1, "db.UserData"); + olua_to_object(L, 1, &self, "db.AnimationState"); + olua_check_string(L, 2, &arg1); - // dragonBones::UserData *userData - self->userData = arg1; + // std::string group + self->group = arg1; olua_endinvoke(L); return 0; } -static int _dragonBones_SlotData_get_zOrder(lua_State *L) +static int _olua_fun_dragonBones_AnimationState_group(lua_State *L) { - olua_startinvoke(L); - - dragonBones::SlotData *self = nullptr; + int num_args = lua_gettop(L) - 1; - olua_to_object(L, 1, &self, "db.SlotData"); + if (num_args == 0) { + // std::string group + return _olua_fun_dragonBones_AnimationState_group$1(L); + } - // int zOrder - int ret = self->zOrder; - int num_ret = olua_push_integer(L, ret); + if (num_args == 1) { + // if ((olua_is_string(L, 2))) { + // std::string group + return _olua_fun_dragonBones_AnimationState_group$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'dragonBones::AnimationState::group' not support '%d' arguments", num_args); - return num_ret; + return 0; } -static int _dragonBones_SlotData_set_zOrder(lua_State *L) +static int _olua_fun_dragonBones_AnimationState_init(lua_State *L) { olua_startinvoke(L); - dragonBones::SlotData *self = nullptr; - int arg1 = 0; /** zOrder */ + dragonBones::AnimationState *self = nullptr; + dragonBones::Armature *arg1 = nullptr; /** armature */ + dragonBones::AnimationData *arg2 = nullptr; /** animationData */ + dragonBones::AnimationConfig *arg3 = nullptr; /** animationConfig */ - olua_to_object(L, 1, &self, "db.SlotData"); - olua_check_integer(L, 2, &arg1); + olua_to_object(L, 1, &self, "db.AnimationState"); + olua_check_object(L, 2, &arg1, "db.Armature"); + olua_check_object(L, 3, &arg2, "db.AnimationData"); + olua_check_object(L, 4, &arg3, "db.AnimationConfig"); - // int zOrder - self->zOrder = arg1; + // void init(dragonBones::Armature *armature, dragonBones::AnimationData *animationData, dragonBones::AnimationConfig *animationConfig) + self->init(arg1, arg2, arg3); olua_endinvoke(L); return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_dragonBones_SlotData(lua_State *L) -{ - oluacls_class(L, "db.SlotData"); - oluacls_func(L, "getBlendMode", _dragonBones_SlotData_getBlendMode); - oluacls_func(L, "getParent", _dragonBones_SlotData_getParent); - oluacls_func(L, "getTypeIndex", _dragonBones_SlotData_getTypeIndex); - oluacls_func(L, "getUserData", _dragonBones_SlotData_getUserData); - oluacls_func(L, "new", _dragonBones_SlotData_new); - oluacls_func(L, "setBlendMode", _dragonBones_SlotData_setBlendMode); - oluacls_func(L, "setParent", _dragonBones_SlotData_setParent); - oluacls_func(L, "setUserData", _dragonBones_SlotData_setUserData); - oluacls_prop(L, "blendMode", _dragonBones_SlotData_getBlendMode, _dragonBones_SlotData_setBlendMode); - oluacls_prop(L, "parent", _dragonBones_SlotData_getParent, _dragonBones_SlotData_setParent); - oluacls_prop(L, "typeIndex", _dragonBones_SlotData_getTypeIndex, nullptr); - oluacls_prop(L, "userData", _dragonBones_SlotData_getUserData, _dragonBones_SlotData_setUserData); - oluacls_prop(L, "blendMode", _dragonBones_SlotData_get_blendMode, _dragonBones_SlotData_set_blendMode); - oluacls_prop(L, "displayIndex", _dragonBones_SlotData_get_displayIndex, _dragonBones_SlotData_set_displayIndex); - oluacls_prop(L, "name", _dragonBones_SlotData_get_name, _dragonBones_SlotData_set_name); - oluacls_prop(L, "parent", _dragonBones_SlotData_get_parent, _dragonBones_SlotData_set_parent); - oluacls_prop(L, "userData", _dragonBones_SlotData_get_userData, _dragonBones_SlotData_set_userData); - oluacls_prop(L, "zOrder", _dragonBones_SlotData_get_zOrder, _dragonBones_SlotData_set_zOrder); - - return 1; -} -OLUA_END_DECLS - -static int _dragonBones_AnimationState_addBoneMask$1(lua_State *L) +static int _olua_fun_dragonBones_AnimationState_isCompleted(lua_State *L) { olua_startinvoke(L); dragonBones::AnimationState *self = nullptr; - std::string arg1; /** boneName */ - bool arg2 = false; /** recursive */ olua_to_object(L, 1, &self, "db.AnimationState"); - olua_check_string(L, 2, &arg1); - olua_check_bool(L, 3, &arg2); - // void addBoneMask(const std::string &boneName, @optional bool recursive) - self->addBoneMask(arg1, arg2); + // bool isCompleted() + bool ret = self->isCompleted(); + int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); - return 0; + return num_ret; } -static int _dragonBones_AnimationState_addBoneMask$2(lua_State *L) +static int _olua_fun_dragonBones_AnimationState_isFadeComplete(lua_State *L) { olua_startinvoke(L); dragonBones::AnimationState *self = nullptr; - std::string arg1; /** boneName */ olua_to_object(L, 1, &self, "db.AnimationState"); - olua_check_string(L, 2, &arg1); - // void addBoneMask(const std::string &boneName, @optional bool recursive) - self->addBoneMask(arg1); + // bool isFadeComplete() + bool ret = self->isFadeComplete(); + int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); - return 0; + return num_ret; } -static int _dragonBones_AnimationState_addBoneMask(lua_State *L) +static int _olua_fun_dragonBones_AnimationState_isFadeIn(lua_State *L) { - int num_args = lua_gettop(L) - 1; + olua_startinvoke(L); - if (num_args == 1) { - // if ((olua_is_string(L, 2))) { - // void addBoneMask(const std::string &boneName, @optional bool recursive) - return _dragonBones_AnimationState_addBoneMask$2(L); - // } - } + dragonBones::AnimationState *self = nullptr; - if (num_args == 2) { - // if ((olua_is_string(L, 2)) && (olua_is_bool(L, 3))) { - // void addBoneMask(const std::string &boneName, @optional bool recursive) - return _dragonBones_AnimationState_addBoneMask$1(L); - // } - } + olua_to_object(L, 1, &self, "db.AnimationState"); - luaL_error(L, "method 'dragonBones::AnimationState::addBoneMask' not support '%d' arguments", num_args); + // bool isFadeIn() + bool ret = self->isFadeIn(); + int num_ret = olua_push_bool(L, ret); - return 0; + olua_endinvoke(L); + + return num_ret; } -static int _dragonBones_AnimationState_advanceTime(lua_State *L) +static int _olua_fun_dragonBones_AnimationState_isFadeOut(lua_State *L) { olua_startinvoke(L); dragonBones::AnimationState *self = nullptr; - float arg1 = 0; /** passedTime */ - float arg2 = 0; /** cacheFrameRate */ olua_to_object(L, 1, &self, "db.AnimationState"); - olua_check_number(L, 2, &arg1); - olua_check_number(L, 3, &arg2); - // void advanceTime(float passedTime, float cacheFrameRate) - self->advanceTime(arg1, arg2); + // bool isFadeOut() + bool ret = self->isFadeOut(); + int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); - return 0; + return num_ret; } -static int _dragonBones_AnimationState_containsBoneMask(lua_State *L) +static int _olua_fun_dragonBones_AnimationState_isPlaying(lua_State *L) { olua_startinvoke(L); dragonBones::AnimationState *self = nullptr; - std::string arg1; /** boneName */ olua_to_object(L, 1, &self, "db.AnimationState"); - olua_check_string(L, 2, &arg1); - // bool containsBoneMask(const std::string &boneName) - bool ret = self->containsBoneMask(arg1); + // bool isPlaying() + bool ret = self->isPlaying(); int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); @@ -8724,68 +11927,63 @@ static int _dragonBones_AnimationState_containsBoneMask(lua_State *L) return num_ret; } -static int _dragonBones_AnimationState_fadeOut$1(lua_State *L) +static int _olua_fun_dragonBones_AnimationState_layer$1(lua_State *L) { olua_startinvoke(L); dragonBones::AnimationState *self = nullptr; - float arg1 = 0; /** fadeOutTime */ - bool arg2 = false; /** pausePlayhead */ olua_to_object(L, 1, &self, "db.AnimationState"); - olua_check_number(L, 2, &arg1); - olua_check_bool(L, 3, &arg2); - // void fadeOut(float fadeOutTime, @optional bool pausePlayhead) - self->fadeOut(arg1, arg2); + // unsigned int layer + unsigned int ret = self->layer; + int num_ret = olua_push_integer(L, ret); olua_endinvoke(L); - return 0; + return num_ret; } -static int _dragonBones_AnimationState_fadeOut$2(lua_State *L) +static int _olua_fun_dragonBones_AnimationState_layer$2(lua_State *L) { olua_startinvoke(L); dragonBones::AnimationState *self = nullptr; - float arg1 = 0; /** fadeOutTime */ + unsigned int arg1 = 0; /** layer */ olua_to_object(L, 1, &self, "db.AnimationState"); - olua_check_number(L, 2, &arg1); + olua_check_integer(L, 2, &arg1); - // void fadeOut(float fadeOutTime, @optional bool pausePlayhead) - self->fadeOut(arg1); + // unsigned int layer + self->layer = arg1; olua_endinvoke(L); return 0; } -static int _dragonBones_AnimationState_fadeOut(lua_State *L) +static int _olua_fun_dragonBones_AnimationState_layer(lua_State *L) { int num_args = lua_gettop(L) - 1; - if (num_args == 1) { - // if ((olua_is_number(L, 2))) { - // void fadeOut(float fadeOutTime, @optional bool pausePlayhead) - return _dragonBones_AnimationState_fadeOut$2(L); - // } + if (num_args == 0) { + // unsigned int layer + return _olua_fun_dragonBones_AnimationState_layer$1(L); } - if (num_args == 2) { - // if ((olua_is_number(L, 2)) && (olua_is_bool(L, 3))) { - // void fadeOut(float fadeOutTime, @optional bool pausePlayhead) - return _dragonBones_AnimationState_fadeOut$1(L); + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // unsigned int layer + return _olua_fun_dragonBones_AnimationState_layer$2(L); // } } - luaL_error(L, "method 'dragonBones::AnimationState::fadeOut' not support '%d' arguments", num_args); + luaL_error(L, "method 'dragonBones::AnimationState::layer' not support '%d' arguments", num_args); return 0; } -static int _dragonBones_AnimationState_getAnimationData(lua_State *L) +static int _olua_fun_dragonBones_AnimationState_name$1(lua_State *L) { olua_startinvoke(L); @@ -8793,33 +11991,69 @@ static int _dragonBones_AnimationState_getAnimationData(lua_State *L) olua_to_object(L, 1, &self, "db.AnimationState"); - // const dragonBones::AnimationData *getAnimationData() - const dragonBones::AnimationData *ret = self->getAnimationData(); - int num_ret = olua_push_object(L, ret, "db.AnimationData"); + // std::string name + std::string ret = self->name; + int num_ret = olua_push_string(L, ret); olua_endinvoke(L); - return num_ret; + return num_ret; +} + +static int _olua_fun_dragonBones_AnimationState_name$2(lua_State *L) +{ + olua_startinvoke(L); + + dragonBones::AnimationState *self = nullptr; + std::string arg1; /** name */ + + olua_to_object(L, 1, &self, "db.AnimationState"); + olua_check_string(L, 2, &arg1); + + // std::string name + self->name = arg1; + + olua_endinvoke(L); + + return 0; +} + +static int _olua_fun_dragonBones_AnimationState_name(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // std::string name + return _olua_fun_dragonBones_AnimationState_name$1(L); + } + + if (num_args == 1) { + // if ((olua_is_string(L, 2))) { + // std::string name + return _olua_fun_dragonBones_AnimationState_name$2(L); + // } + } + + luaL_error(L, "method 'dragonBones::AnimationState::name' not support '%d' arguments", num_args); + + return 0; } -static int _dragonBones_AnimationState_getCurrentPlayTimes(lua_State *L) +static int _olua_fun_dragonBones_AnimationState_new(lua_State *L) { olua_startinvoke(L); - dragonBones::AnimationState *self = nullptr; - - olua_to_object(L, 1, &self, "db.AnimationState"); - - // unsigned int getCurrentPlayTimes() - unsigned int ret = self->getCurrentPlayTimes(); - int num_ret = olua_push_integer(L, ret); + // dragonBones::AnimationState() + dragonBones::AnimationState *ret = new dragonBones::AnimationState(); + int num_ret = olua_push_object(L, ret, "db.AnimationState"); + olua_postnew(L, ret); olua_endinvoke(L); return num_ret; } -static int _dragonBones_AnimationState_getCurrentTime(lua_State *L) +static int _olua_fun_dragonBones_AnimationState_play(lua_State *L) { olua_startinvoke(L); @@ -8827,16 +12061,15 @@ static int _dragonBones_AnimationState_getCurrentTime(lua_State *L) olua_to_object(L, 1, &self, "db.AnimationState"); - // float getCurrentTime() - float ret = self->getCurrentTime(); - int num_ret = olua_push_number(L, ret); + // void play() + self->play(); olua_endinvoke(L); - return num_ret; + return 0; } -static int _dragonBones_AnimationState_getName(lua_State *L) +static int _olua_fun_dragonBones_AnimationState_playTimes$1(lua_State *L) { olua_startinvoke(L); @@ -8844,119 +12077,132 @@ static int _dragonBones_AnimationState_getName(lua_State *L) olua_to_object(L, 1, &self, "db.AnimationState"); - // const std::string &getName() - const std::string &ret = self->getName(); - int num_ret = olua_push_string(L, ret); + // unsigned int playTimes + unsigned int ret = self->playTimes; + int num_ret = olua_push_integer(L, ret); olua_endinvoke(L); return num_ret; } -static int _dragonBones_AnimationState_getTotalTime(lua_State *L) +static int _olua_fun_dragonBones_AnimationState_playTimes$2(lua_State *L) { olua_startinvoke(L); dragonBones::AnimationState *self = nullptr; + unsigned int arg1 = 0; /** playTimes */ olua_to_object(L, 1, &self, "db.AnimationState"); + olua_check_integer(L, 2, &arg1); - // float getTotalTime() - float ret = self->getTotalTime(); - int num_ret = olua_push_number(L, ret); + // unsigned int playTimes + self->playTimes = arg1; olua_endinvoke(L); - return num_ret; + return 0; } -static int _dragonBones_AnimationState_getTypeIndex(lua_State *L) +static int _olua_fun_dragonBones_AnimationState_playTimes(lua_State *L) { - olua_startinvoke(L); + int num_args = lua_gettop(L) - 1; - // static std::size_t getTypeIndex() - std::size_t ret = dragonBones::AnimationState::getTypeIndex(); - int num_ret = olua_push_integer(L, ret); + if (num_args == 0) { + // unsigned int playTimes + return _olua_fun_dragonBones_AnimationState_playTimes$1(L); + } - olua_endinvoke(L); + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // unsigned int playTimes + return _olua_fun_dragonBones_AnimationState_playTimes$2(L); + // } + } - return num_ret; + luaL_error(L, "method 'dragonBones::AnimationState::playTimes' not support '%d' arguments", num_args); + + return 0; } -static int _dragonBones_AnimationState_init(lua_State *L) +static int _olua_fun_dragonBones_AnimationState_removeAllBoneMask(lua_State *L) { olua_startinvoke(L); dragonBones::AnimationState *self = nullptr; - dragonBones::Armature *arg1 = nullptr; /** armature */ - dragonBones::AnimationData *arg2 = nullptr; /** animationData */ - dragonBones::AnimationConfig *arg3 = nullptr; /** animationConfig */ olua_to_object(L, 1, &self, "db.AnimationState"); - olua_check_object(L, 2, &arg1, "db.Armature"); - olua_check_object(L, 3, &arg2, "db.AnimationData"); - olua_check_object(L, 4, &arg3, "db.AnimationConfig"); - // void init(dragonBones::Armature *armature, dragonBones::AnimationData *animationData, dragonBones::AnimationConfig *animationConfig) - self->init(arg1, arg2, arg3); + // void removeAllBoneMask() + self->removeAllBoneMask(); olua_endinvoke(L); return 0; } -static int _dragonBones_AnimationState_isCompleted(lua_State *L) +static int _olua_fun_dragonBones_AnimationState_removeBoneMask$1(lua_State *L) { olua_startinvoke(L); dragonBones::AnimationState *self = nullptr; + std::string arg1; /** boneName */ + bool arg2 = false; /** recursive */ olua_to_object(L, 1, &self, "db.AnimationState"); + olua_check_string(L, 2, &arg1); + olua_check_bool(L, 3, &arg2); - // bool isCompleted() - bool ret = self->isCompleted(); - int num_ret = olua_push_bool(L, ret); + // void removeBoneMask(const std::string &boneName, @optional bool recursive) + self->removeBoneMask(arg1, arg2); olua_endinvoke(L); - return num_ret; + return 0; } -static int _dragonBones_AnimationState_isFadeComplete(lua_State *L) +static int _olua_fun_dragonBones_AnimationState_removeBoneMask$2(lua_State *L) { olua_startinvoke(L); dragonBones::AnimationState *self = nullptr; + std::string arg1; /** boneName */ olua_to_object(L, 1, &self, "db.AnimationState"); + olua_check_string(L, 2, &arg1); - // bool isFadeComplete() - bool ret = self->isFadeComplete(); - int num_ret = olua_push_bool(L, ret); + // void removeBoneMask(const std::string &boneName) + self->removeBoneMask(arg1); olua_endinvoke(L); - return num_ret; + return 0; } -static int _dragonBones_AnimationState_isFadeIn(lua_State *L) +static int _olua_fun_dragonBones_AnimationState_removeBoneMask(lua_State *L) { - olua_startinvoke(L); - - dragonBones::AnimationState *self = nullptr; + int num_args = lua_gettop(L) - 1; - olua_to_object(L, 1, &self, "db.AnimationState"); + if (num_args == 1) { + // if ((olua_is_string(L, 2))) { + // void removeBoneMask(const std::string &boneName) + return _olua_fun_dragonBones_AnimationState_removeBoneMask$2(L); + // } + } - // bool isFadeIn() - bool ret = self->isFadeIn(); - int num_ret = olua_push_bool(L, ret); + if (num_args == 2) { + // if ((olua_is_string(L, 2)) && (olua_is_bool(L, 3))) { + // void removeBoneMask(const std::string &boneName, @optional bool recursive) + return _olua_fun_dragonBones_AnimationState_removeBoneMask$1(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'dragonBones::AnimationState::removeBoneMask' not support '%d' arguments", num_args); - return num_ret; + return 0; } -static int _dragonBones_AnimationState_isFadeOut(lua_State *L) +static int _olua_fun_dragonBones_AnimationState_resetToPose$1(lua_State *L) { olua_startinvoke(L); @@ -8964,8 +12210,8 @@ static int _dragonBones_AnimationState_isFadeOut(lua_State *L) olua_to_object(L, 1, &self, "db.AnimationState"); - // bool isFadeOut() - bool ret = self->isFadeOut(); + // bool resetToPose + bool ret = self->resetToPose; int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); @@ -8973,54 +12219,64 @@ static int _dragonBones_AnimationState_isFadeOut(lua_State *L) return num_ret; } -static int _dragonBones_AnimationState_isPlaying(lua_State *L) +static int _olua_fun_dragonBones_AnimationState_resetToPose$2(lua_State *L) { olua_startinvoke(L); dragonBones::AnimationState *self = nullptr; + bool arg1 = false; /** resetToPose */ olua_to_object(L, 1, &self, "db.AnimationState"); + olua_check_bool(L, 2, &arg1); - // bool isPlaying() - bool ret = self->isPlaying(); - int num_ret = olua_push_bool(L, ret); + // bool resetToPose + self->resetToPose = arg1; olua_endinvoke(L); - return num_ret; + return 0; } -static int _dragonBones_AnimationState_new(lua_State *L) +static int _olua_fun_dragonBones_AnimationState_resetToPose(lua_State *L) { - olua_startinvoke(L); + int num_args = lua_gettop(L) - 1; - // AnimationState() - dragonBones::AnimationState *ret = new dragonBones::AnimationState(); - int num_ret = olua_push_object(L, ret, "db.AnimationState"); - olua_postnew(L, ret); + if (num_args == 0) { + // bool resetToPose + return _olua_fun_dragonBones_AnimationState_resetToPose$1(L); + } - olua_endinvoke(L); + if (num_args == 1) { + // if ((olua_is_bool(L, 2))) { + // bool resetToPose + return _olua_fun_dragonBones_AnimationState_resetToPose$2(L); + // } + } - return num_ret; + luaL_error(L, "method 'dragonBones::AnimationState::resetToPose' not support '%d' arguments", num_args); + + return 0; } -static int _dragonBones_AnimationState_play(lua_State *L) +static int _olua_fun_dragonBones_AnimationState_setCurrentTime(lua_State *L) { olua_startinvoke(L); dragonBones::AnimationState *self = nullptr; + float arg1 = 0; /** value */ olua_to_object(L, 1, &self, "db.AnimationState"); + olua_check_number(L, 2, &arg1); - // void play() - self->play(); + // void setCurrentTime(float value) + self->setCurrentTime(arg1); olua_endinvoke(L); return 0; } -static int _dragonBones_AnimationState_removeAllBoneMask(lua_State *L) +static int _olua_fun_dragonBones_AnimationState_stop(lua_State *L) { olua_startinvoke(L); @@ -9028,662 +12284,774 @@ static int _dragonBones_AnimationState_removeAllBoneMask(lua_State *L) olua_to_object(L, 1, &self, "db.AnimationState"); - // void removeAllBoneMask() - self->removeAllBoneMask(); + // void stop() + self->stop(); olua_endinvoke(L); return 0; } -static int _dragonBones_AnimationState_removeBoneMask$1(lua_State *L) +static int _olua_fun_dragonBones_AnimationState_timeScale$1(lua_State *L) { olua_startinvoke(L); dragonBones::AnimationState *self = nullptr; - std::string arg1; /** boneName */ - bool arg2 = false; /** recursive */ olua_to_object(L, 1, &self, "db.AnimationState"); - olua_check_string(L, 2, &arg1); - olua_check_bool(L, 3, &arg2); - // void removeBoneMask(const std::string &boneName, @optional bool recursive) - self->removeBoneMask(arg1, arg2); + // float timeScale + float ret = self->timeScale; + int num_ret = olua_push_number(L, ret); olua_endinvoke(L); - return 0; + return num_ret; } -static int _dragonBones_AnimationState_removeBoneMask$2(lua_State *L) +static int _olua_fun_dragonBones_AnimationState_timeScale$2(lua_State *L) { olua_startinvoke(L); dragonBones::AnimationState *self = nullptr; - std::string arg1; /** boneName */ + float arg1 = 0; /** timeScale */ olua_to_object(L, 1, &self, "db.AnimationState"); - olua_check_string(L, 2, &arg1); + olua_check_number(L, 2, &arg1); - // void removeBoneMask(const std::string &boneName, @optional bool recursive) - self->removeBoneMask(arg1); + // float timeScale + self->timeScale = arg1; olua_endinvoke(L); return 0; } -static int _dragonBones_AnimationState_removeBoneMask(lua_State *L) +static int _olua_fun_dragonBones_AnimationState_timeScale(lua_State *L) { int num_args = lua_gettop(L) - 1; - if (num_args == 1) { - // if ((olua_is_string(L, 2))) { - // void removeBoneMask(const std::string &boneName, @optional bool recursive) - return _dragonBones_AnimationState_removeBoneMask$2(L); - // } + if (num_args == 0) { + // float timeScale + return _olua_fun_dragonBones_AnimationState_timeScale$1(L); } - if (num_args == 2) { - // if ((olua_is_string(L, 2)) && (olua_is_bool(L, 3))) { - // void removeBoneMask(const std::string &boneName, @optional bool recursive) - return _dragonBones_AnimationState_removeBoneMask$1(L); + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float timeScale + return _olua_fun_dragonBones_AnimationState_timeScale$2(L); // } } - luaL_error(L, "method 'dragonBones::AnimationState::removeBoneMask' not support '%d' arguments", num_args); + luaL_error(L, "method 'dragonBones::AnimationState::timeScale' not support '%d' arguments", num_args); return 0; } -static int _dragonBones_AnimationState_setCurrentTime(lua_State *L) +static int _olua_fun_dragonBones_AnimationState_weight$1(lua_State *L) { olua_startinvoke(L); dragonBones::AnimationState *self = nullptr; - float arg1 = 0; /** value */ olua_to_object(L, 1, &self, "db.AnimationState"); - olua_check_number(L, 2, &arg1); - // void setCurrentTime(float value) - self->setCurrentTime(arg1); + // float weight + float ret = self->weight; + int num_ret = olua_push_number(L, ret); olua_endinvoke(L); - return 0; + return num_ret; } -static int _dragonBones_AnimationState_stop(lua_State *L) +static int _olua_fun_dragonBones_AnimationState_weight$2(lua_State *L) { olua_startinvoke(L); dragonBones::AnimationState *self = nullptr; + float arg1 = 0; /** weight */ olua_to_object(L, 1, &self, "db.AnimationState"); + olua_check_number(L, 2, &arg1); - // void stop() - self->stop(); + // float weight + self->weight = arg1; olua_endinvoke(L); return 0; } -static int _dragonBones_AnimationState_get_actionEnabled(lua_State *L) +static int _olua_fun_dragonBones_AnimationState_weight(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float weight + return _olua_fun_dragonBones_AnimationState_weight$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float weight + return _olua_fun_dragonBones_AnimationState_weight$2(L); + // } + } + + luaL_error(L, "method 'dragonBones::AnimationState::weight' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_cls_db_AnimationState(lua_State *L) +{ + oluacls_class(L, "db.AnimationState"); + oluacls_func(L, "addBoneMask", _olua_fun_dragonBones_AnimationState_addBoneMask); + oluacls_func(L, "advanceTime", _olua_fun_dragonBones_AnimationState_advanceTime); + oluacls_func(L, "containsBoneMask", _olua_fun_dragonBones_AnimationState_containsBoneMask); + oluacls_func(L, "fadeOut", _olua_fun_dragonBones_AnimationState_fadeOut); + oluacls_func(L, "getAnimationData", _olua_fun_dragonBones_AnimationState_getAnimationData); + oluacls_func(L, "getCurrentPlayTimes", _olua_fun_dragonBones_AnimationState_getCurrentPlayTimes); + oluacls_func(L, "getCurrentTime", _olua_fun_dragonBones_AnimationState_getCurrentTime); + oluacls_func(L, "getName", _olua_fun_dragonBones_AnimationState_getName); + oluacls_func(L, "getTotalTime", _olua_fun_dragonBones_AnimationState_getTotalTime); + oluacls_func(L, "getTypeIndex", _olua_fun_dragonBones_AnimationState_getTypeIndex); + oluacls_func(L, "init", _olua_fun_dragonBones_AnimationState_init); + oluacls_func(L, "isCompleted", _olua_fun_dragonBones_AnimationState_isCompleted); + oluacls_func(L, "isFadeComplete", _olua_fun_dragonBones_AnimationState_isFadeComplete); + oluacls_func(L, "isFadeIn", _olua_fun_dragonBones_AnimationState_isFadeIn); + oluacls_func(L, "isFadeOut", _olua_fun_dragonBones_AnimationState_isFadeOut); + oluacls_func(L, "isPlaying", _olua_fun_dragonBones_AnimationState_isPlaying); + oluacls_func(L, "new", _olua_fun_dragonBones_AnimationState_new); + oluacls_func(L, "play", _olua_fun_dragonBones_AnimationState_play); + oluacls_func(L, "removeAllBoneMask", _olua_fun_dragonBones_AnimationState_removeAllBoneMask); + oluacls_func(L, "removeBoneMask", _olua_fun_dragonBones_AnimationState_removeBoneMask); + oluacls_func(L, "setCurrentTime", _olua_fun_dragonBones_AnimationState_setCurrentTime); + oluacls_func(L, "stop", _olua_fun_dragonBones_AnimationState_stop); + oluacls_prop(L, "animationData", _olua_fun_dragonBones_AnimationState_getAnimationData, nullptr); + oluacls_prop(L, "completed", _olua_fun_dragonBones_AnimationState_isCompleted, nullptr); + oluacls_prop(L, "currentPlayTimes", _olua_fun_dragonBones_AnimationState_getCurrentPlayTimes, nullptr); + oluacls_prop(L, "currentTime", _olua_fun_dragonBones_AnimationState_getCurrentTime, _olua_fun_dragonBones_AnimationState_setCurrentTime); + oluacls_prop(L, "fadeComplete", _olua_fun_dragonBones_AnimationState_isFadeComplete, nullptr); + oluacls_prop(L, "fadeIn", _olua_fun_dragonBones_AnimationState_isFadeIn, nullptr); + oluacls_prop(L, "playing", _olua_fun_dragonBones_AnimationState_isPlaying, nullptr); + oluacls_prop(L, "totalTime", _olua_fun_dragonBones_AnimationState_getTotalTime, nullptr); + oluacls_prop(L, "typeIndex", _olua_fun_dragonBones_AnimationState_getTypeIndex, nullptr); + oluacls_prop(L, "actionEnabled", _olua_fun_dragonBones_AnimationState_actionEnabled, _olua_fun_dragonBones_AnimationState_actionEnabled); + oluacls_prop(L, "additiveBlending", _olua_fun_dragonBones_AnimationState_additiveBlending, _olua_fun_dragonBones_AnimationState_additiveBlending); + oluacls_prop(L, "autoFadeOutTime", _olua_fun_dragonBones_AnimationState_autoFadeOutTime, _olua_fun_dragonBones_AnimationState_autoFadeOutTime); + oluacls_prop(L, "displayControl", _olua_fun_dragonBones_AnimationState_displayControl, _olua_fun_dragonBones_AnimationState_displayControl); + oluacls_prop(L, "fadeTotalTime", _olua_fun_dragonBones_AnimationState_fadeTotalTime, _olua_fun_dragonBones_AnimationState_fadeTotalTime); + oluacls_prop(L, "group", _olua_fun_dragonBones_AnimationState_group, _olua_fun_dragonBones_AnimationState_group); + oluacls_prop(L, "layer", _olua_fun_dragonBones_AnimationState_layer, _olua_fun_dragonBones_AnimationState_layer); + oluacls_prop(L, "name", _olua_fun_dragonBones_AnimationState_name, _olua_fun_dragonBones_AnimationState_name); + oluacls_prop(L, "playTimes", _olua_fun_dragonBones_AnimationState_playTimes, _olua_fun_dragonBones_AnimationState_playTimes); + oluacls_prop(L, "resetToPose", _olua_fun_dragonBones_AnimationState_resetToPose, _olua_fun_dragonBones_AnimationState_resetToPose); + oluacls_prop(L, "timeScale", _olua_fun_dragonBones_AnimationState_timeScale, _olua_fun_dragonBones_AnimationState_timeScale); + oluacls_prop(L, "weight", _olua_fun_dragonBones_AnimationState_weight, _olua_fun_dragonBones_AnimationState_weight); + + return 1; +} + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_db_AnimationState(lua_State *L) +{ + olua_require(L, "dragonbones", luaopen_dragonbones); + if (!olua_getclass(L, "db.AnimationState")) { + luaL_error(L, "class not found: dragonBones::AnimationState"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_fun_dragonBones_AnimationData_actionTimeline$1(lua_State *L) { olua_startinvoke(L); - dragonBones::AnimationState *self = nullptr; + dragonBones::AnimationData *self = nullptr; - olua_to_object(L, 1, &self, "db.AnimationState"); + olua_to_object(L, 1, &self, "db.AnimationData"); - // bool actionEnabled - bool ret = self->actionEnabled; - int num_ret = olua_push_bool(L, ret); + // dragonBones::TimelineData *actionTimeline + dragonBones::TimelineData *ret = self->actionTimeline; + int num_ret = olua_push_object(L, ret, "db.TimelineData"); olua_endinvoke(L); return num_ret; } -static int _dragonBones_AnimationState_set_actionEnabled(lua_State *L) +static int _olua_fun_dragonBones_AnimationData_actionTimeline$2(lua_State *L) { olua_startinvoke(L); - dragonBones::AnimationState *self = nullptr; - bool arg1 = false; /** actionEnabled */ + dragonBones::AnimationData *self = nullptr; + dragonBones::TimelineData *arg1 = nullptr; /** actionTimeline */ - olua_to_object(L, 1, &self, "db.AnimationState"); - olua_check_bool(L, 2, &arg1); + olua_to_object(L, 1, &self, "db.AnimationData"); + olua_check_object(L, 2, &arg1, "db.TimelineData"); - // bool actionEnabled - self->actionEnabled = arg1; + // dragonBones::TimelineData *actionTimeline + self->actionTimeline = arg1; olua_endinvoke(L); return 0; } -static int _dragonBones_AnimationState_get_additiveBlending(lua_State *L) +static int _olua_fun_dragonBones_AnimationData_actionTimeline(lua_State *L) { - olua_startinvoke(L); - - dragonBones::AnimationState *self = nullptr; + int num_args = lua_gettop(L) - 1; - olua_to_object(L, 1, &self, "db.AnimationState"); + if (num_args == 0) { + // dragonBones::TimelineData *actionTimeline + return _olua_fun_dragonBones_AnimationData_actionTimeline$1(L); + } - // bool additiveBlending - bool ret = self->additiveBlending; - int num_ret = olua_push_bool(L, ret); + if (num_args == 1) { + // if ((olua_is_object(L, 2, "db.TimelineData"))) { + // dragonBones::TimelineData *actionTimeline + return _olua_fun_dragonBones_AnimationData_actionTimeline$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'dragonBones::AnimationData::actionTimeline' not support '%d' arguments", num_args); - return num_ret; + return 0; } -static int _dragonBones_AnimationState_set_additiveBlending(lua_State *L) +static int _olua_fun_dragonBones_AnimationData_addBoneTimeline(lua_State *L) { olua_startinvoke(L); - dragonBones::AnimationState *self = nullptr; - bool arg1 = false; /** additiveBlending */ + dragonBones::AnimationData *self = nullptr; + dragonBones::BoneData *arg1 = nullptr; /** bone */ + dragonBones::TimelineData *arg2 = nullptr; /** value */ - olua_to_object(L, 1, &self, "db.AnimationState"); - olua_check_bool(L, 2, &arg1); + olua_to_object(L, 1, &self, "db.AnimationData"); + olua_check_object(L, 2, &arg1, "db.BoneData"); + olua_check_object(L, 3, &arg2, "db.TimelineData"); - // bool additiveBlending - self->additiveBlending = arg1; + // void addBoneTimeline(dragonBones::BoneData *bone, dragonBones::TimelineData *value) + self->addBoneTimeline(arg1, arg2); olua_endinvoke(L); return 0; } -static int _dragonBones_AnimationState_get_autoFadeOutTime(lua_State *L) +static int _olua_fun_dragonBones_AnimationData_addConstraintTimeline(lua_State *L) { olua_startinvoke(L); - dragonBones::AnimationState *self = nullptr; + dragonBones::AnimationData *self = nullptr; + dragonBones::ConstraintData *arg1 = nullptr; /** constraint */ + dragonBones::TimelineData *arg2 = nullptr; /** value */ - olua_to_object(L, 1, &self, "db.AnimationState"); + olua_to_object(L, 1, &self, "db.AnimationData"); + olua_check_object(L, 2, &arg1, "db.ConstraintData"); + olua_check_object(L, 3, &arg2, "db.TimelineData"); - // float autoFadeOutTime - float ret = self->autoFadeOutTime; - int num_ret = olua_push_number(L, ret); + // void addConstraintTimeline(dragonBones::ConstraintData *constraint, dragonBones::TimelineData *value) + self->addConstraintTimeline(arg1, arg2); olua_endinvoke(L); - return num_ret; + return 0; } -static int _dragonBones_AnimationState_set_autoFadeOutTime(lua_State *L) +static int _olua_fun_dragonBones_AnimationData_addSlotTimeline(lua_State *L) { olua_startinvoke(L); - dragonBones::AnimationState *self = nullptr; - float arg1 = 0; /** autoFadeOutTime */ + dragonBones::AnimationData *self = nullptr; + dragonBones::SlotData *arg1 = nullptr; /** slot */ + dragonBones::TimelineData *arg2 = nullptr; /** value */ - olua_to_object(L, 1, &self, "db.AnimationState"); - olua_check_number(L, 2, &arg1); + olua_to_object(L, 1, &self, "db.AnimationData"); + olua_check_object(L, 2, &arg1, "db.SlotData"); + olua_check_object(L, 3, &arg2, "db.TimelineData"); - // float autoFadeOutTime - self->autoFadeOutTime = arg1; + // void addSlotTimeline(dragonBones::SlotData *slot, dragonBones::TimelineData *value) + self->addSlotTimeline(arg1, arg2); olua_endinvoke(L); return 0; } -static int _dragonBones_AnimationState_get_displayControl(lua_State *L) +static int _olua_fun_dragonBones_AnimationData_cacheFrameRate$1(lua_State *L) { olua_startinvoke(L); - dragonBones::AnimationState *self = nullptr; + dragonBones::AnimationData *self = nullptr; - olua_to_object(L, 1, &self, "db.AnimationState"); + olua_to_object(L, 1, &self, "db.AnimationData"); - // bool displayControl - bool ret = self->displayControl; - int num_ret = olua_push_bool(L, ret); + // float cacheFrameRate + float ret = self->cacheFrameRate; + int num_ret = olua_push_number(L, ret); olua_endinvoke(L); return num_ret; } -static int _dragonBones_AnimationState_set_displayControl(lua_State *L) +static int _olua_fun_dragonBones_AnimationData_cacheFrameRate$2(lua_State *L) { olua_startinvoke(L); - dragonBones::AnimationState *self = nullptr; - bool arg1 = false; /** displayControl */ + dragonBones::AnimationData *self = nullptr; + float arg1 = 0; /** cacheFrameRate */ - olua_to_object(L, 1, &self, "db.AnimationState"); - olua_check_bool(L, 2, &arg1); + olua_to_object(L, 1, &self, "db.AnimationData"); + olua_check_number(L, 2, &arg1); - // bool displayControl - self->displayControl = arg1; + // float cacheFrameRate + self->cacheFrameRate = arg1; olua_endinvoke(L); return 0; } -static int _dragonBones_AnimationState_get_fadeTotalTime(lua_State *L) +static int _olua_fun_dragonBones_AnimationData_cacheFrameRate(lua_State *L) { - olua_startinvoke(L); - - dragonBones::AnimationState *self = nullptr; + int num_args = lua_gettop(L) - 1; - olua_to_object(L, 1, &self, "db.AnimationState"); + if (num_args == 0) { + // float cacheFrameRate + return _olua_fun_dragonBones_AnimationData_cacheFrameRate$1(L); + } - // float fadeTotalTime - float ret = self->fadeTotalTime; - int num_ret = olua_push_number(L, ret); + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float cacheFrameRate + return _olua_fun_dragonBones_AnimationData_cacheFrameRate$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'dragonBones::AnimationData::cacheFrameRate' not support '%d' arguments", num_args); - return num_ret; + return 0; } -static int _dragonBones_AnimationState_set_fadeTotalTime(lua_State *L) +static int _olua_fun_dragonBones_AnimationData_cacheFrames(lua_State *L) { olua_startinvoke(L); - dragonBones::AnimationState *self = nullptr; - float arg1 = 0; /** fadeTotalTime */ + dragonBones::AnimationData *self = nullptr; + unsigned int arg1 = 0; /** frameRate */ - olua_to_object(L, 1, &self, "db.AnimationState"); - olua_check_number(L, 2, &arg1); + olua_to_object(L, 1, &self, "db.AnimationData"); + olua_check_integer(L, 2, &arg1); - // float fadeTotalTime - self->fadeTotalTime = arg1; + // void cacheFrames(unsigned int frameRate) + self->cacheFrames(arg1); olua_endinvoke(L); return 0; } -static int _dragonBones_AnimationState_get_group(lua_State *L) +static int _olua_fun_dragonBones_AnimationData_cachedFrames$1(lua_State *L) { olua_startinvoke(L); - dragonBones::AnimationState *self = nullptr; + dragonBones::AnimationData *self = nullptr; - olua_to_object(L, 1, &self, "db.AnimationState"); + olua_to_object(L, 1, &self, "db.AnimationData"); - // std::string group - std::string ret = self->group; - int num_ret = olua_push_string(L, ret); + // std::vector cachedFrames + std::vector &ret = self->cachedFrames; + int num_ret = olua_push_array(L, ret, [L](bool &arg1) { + olua_push_bool(L, arg1); + }); olua_endinvoke(L); return num_ret; } -static int _dragonBones_AnimationState_set_group(lua_State *L) +static int _olua_fun_dragonBones_AnimationData_cachedFrames$2(lua_State *L) { olua_startinvoke(L); - dragonBones::AnimationState *self = nullptr; - std::string arg1; /** group */ + dragonBones::AnimationData *self = nullptr; + std::vector arg1; /** cachedFrames */ - olua_to_object(L, 1, &self, "db.AnimationState"); - olua_check_string(L, 2, &arg1); + olua_to_object(L, 1, &self, "db.AnimationData"); + olua_check_array(L, 2, arg1, [L](bool *arg1) { + olua_check_bool(L, -1, arg1); + }); - // std::string group - self->group = arg1; + // std::vector cachedFrames + self->cachedFrames = arg1; olua_endinvoke(L); return 0; } -static int _dragonBones_AnimationState_get_layer(lua_State *L) +static int _olua_fun_dragonBones_AnimationData_cachedFrames(lua_State *L) { - olua_startinvoke(L); - - dragonBones::AnimationState *self = nullptr; + int num_args = lua_gettop(L) - 1; - olua_to_object(L, 1, &self, "db.AnimationState"); + if (num_args == 0) { + // std::vector cachedFrames + return _olua_fun_dragonBones_AnimationData_cachedFrames$1(L); + } - // unsigned int layer - unsigned int ret = self->layer; - int num_ret = olua_push_integer(L, ret); + if (num_args == 1) { + // if ((olua_is_array(L, 2))) { + // std::vector cachedFrames + return _olua_fun_dragonBones_AnimationData_cachedFrames$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'dragonBones::AnimationData::cachedFrames' not support '%d' arguments", num_args); - return num_ret; + return 0; } -static int _dragonBones_AnimationState_set_layer(lua_State *L) +static int _olua_fun_dragonBones_AnimationData_duration$1(lua_State *L) { olua_startinvoke(L); - dragonBones::AnimationState *self = nullptr; - unsigned int arg1 = 0; /** layer */ + dragonBones::AnimationData *self = nullptr; - olua_to_object(L, 1, &self, "db.AnimationState"); - olua_check_integer(L, 2, &arg1); + olua_to_object(L, 1, &self, "db.AnimationData"); - // unsigned int layer - self->layer = arg1; + // float duration + float ret = self->duration; + int num_ret = olua_push_number(L, ret); olua_endinvoke(L); - return 0; + return num_ret; } -static int _dragonBones_AnimationState_get_name(lua_State *L) +static int _olua_fun_dragonBones_AnimationData_duration$2(lua_State *L) { olua_startinvoke(L); - dragonBones::AnimationState *self = nullptr; + dragonBones::AnimationData *self = nullptr; + float arg1 = 0; /** duration */ - olua_to_object(L, 1, &self, "db.AnimationState"); + olua_to_object(L, 1, &self, "db.AnimationData"); + olua_check_number(L, 2, &arg1); - // std::string name - std::string ret = self->name; - int num_ret = olua_push_string(L, ret); + // float duration + self->duration = arg1; olua_endinvoke(L); - return num_ret; + return 0; } -static int _dragonBones_AnimationState_set_name(lua_State *L) +static int _olua_fun_dragonBones_AnimationData_duration(lua_State *L) { - olua_startinvoke(L); - - dragonBones::AnimationState *self = nullptr; - std::string arg1; /** name */ + int num_args = lua_gettop(L) - 1; - olua_to_object(L, 1, &self, "db.AnimationState"); - olua_check_string(L, 2, &arg1); + if (num_args == 0) { + // float duration + return _olua_fun_dragonBones_AnimationData_duration$1(L); + } - // std::string name - self->name = arg1; + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float duration + return _olua_fun_dragonBones_AnimationData_duration$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'dragonBones::AnimationData::duration' not support '%d' arguments", num_args); return 0; } -static int _dragonBones_AnimationState_get_playTimes(lua_State *L) +static int _olua_fun_dragonBones_AnimationData_fadeInTime$1(lua_State *L) { olua_startinvoke(L); - dragonBones::AnimationState *self = nullptr; + dragonBones::AnimationData *self = nullptr; - olua_to_object(L, 1, &self, "db.AnimationState"); + olua_to_object(L, 1, &self, "db.AnimationData"); - // unsigned int playTimes - unsigned int ret = self->playTimes; - int num_ret = olua_push_integer(L, ret); + // float fadeInTime + float ret = self->fadeInTime; + int num_ret = olua_push_number(L, ret); olua_endinvoke(L); return num_ret; } -static int _dragonBones_AnimationState_set_playTimes(lua_State *L) +static int _olua_fun_dragonBones_AnimationData_fadeInTime$2(lua_State *L) { olua_startinvoke(L); - dragonBones::AnimationState *self = nullptr; - unsigned int arg1 = 0; /** playTimes */ + dragonBones::AnimationData *self = nullptr; + float arg1 = 0; /** fadeInTime */ - olua_to_object(L, 1, &self, "db.AnimationState"); - olua_check_integer(L, 2, &arg1); + olua_to_object(L, 1, &self, "db.AnimationData"); + olua_check_number(L, 2, &arg1); - // unsigned int playTimes - self->playTimes = arg1; + // float fadeInTime + self->fadeInTime = arg1; olua_endinvoke(L); return 0; } -static int _dragonBones_AnimationState_get_resetToPose(lua_State *L) +static int _olua_fun_dragonBones_AnimationData_fadeInTime(lua_State *L) { - olua_startinvoke(L); - - dragonBones::AnimationState *self = nullptr; + int num_args = lua_gettop(L) - 1; - olua_to_object(L, 1, &self, "db.AnimationState"); + if (num_args == 0) { + // float fadeInTime + return _olua_fun_dragonBones_AnimationData_fadeInTime$1(L); + } - // bool resetToPose - bool ret = self->resetToPose; - int num_ret = olua_push_bool(L, ret); + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float fadeInTime + return _olua_fun_dragonBones_AnimationData_fadeInTime$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'dragonBones::AnimationData::fadeInTime' not support '%d' arguments", num_args); - return num_ret; + return 0; } -static int _dragonBones_AnimationState_set_resetToPose(lua_State *L) +static int _olua_fun_dragonBones_AnimationData_frameCount$1(lua_State *L) { olua_startinvoke(L); - dragonBones::AnimationState *self = nullptr; - bool arg1 = false; /** resetToPose */ + dragonBones::AnimationData *self = nullptr; - olua_to_object(L, 1, &self, "db.AnimationState"); - olua_check_bool(L, 2, &arg1); + olua_to_object(L, 1, &self, "db.AnimationData"); - // bool resetToPose - self->resetToPose = arg1; + // unsigned int frameCount + unsigned int ret = self->frameCount; + int num_ret = olua_push_integer(L, ret); olua_endinvoke(L); - return 0; + return num_ret; } -static int _dragonBones_AnimationState_get_timeScale(lua_State *L) +static int _olua_fun_dragonBones_AnimationData_frameCount$2(lua_State *L) { olua_startinvoke(L); - dragonBones::AnimationState *self = nullptr; + dragonBones::AnimationData *self = nullptr; + unsigned int arg1 = 0; /** frameCount */ - olua_to_object(L, 1, &self, "db.AnimationState"); + olua_to_object(L, 1, &self, "db.AnimationData"); + olua_check_integer(L, 2, &arg1); - // float timeScale - float ret = self->timeScale; - int num_ret = olua_push_number(L, ret); + // unsigned int frameCount + self->frameCount = arg1; olua_endinvoke(L); - return num_ret; + return 0; } -static int _dragonBones_AnimationState_set_timeScale(lua_State *L) +static int _olua_fun_dragonBones_AnimationData_frameCount(lua_State *L) { - olua_startinvoke(L); - - dragonBones::AnimationState *self = nullptr; - float arg1 = 0; /** timeScale */ + int num_args = lua_gettop(L) - 1; - olua_to_object(L, 1, &self, "db.AnimationState"); - olua_check_number(L, 2, &arg1); + if (num_args == 0) { + // unsigned int frameCount + return _olua_fun_dragonBones_AnimationData_frameCount$1(L); + } - // float timeScale - self->timeScale = arg1; + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // unsigned int frameCount + return _olua_fun_dragonBones_AnimationData_frameCount$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'dragonBones::AnimationData::frameCount' not support '%d' arguments", num_args); return 0; } -static int _dragonBones_AnimationState_get_weight(lua_State *L) +static int _olua_fun_dragonBones_AnimationData_frameFloatOffset$1(lua_State *L) { olua_startinvoke(L); - dragonBones::AnimationState *self = nullptr; - - olua_to_object(L, 1, &self, "db.AnimationState"); + dragonBones::AnimationData *self = nullptr; - // float weight - float ret = self->weight; - int num_ret = olua_push_number(L, ret); + olua_to_object(L, 1, &self, "db.AnimationData"); + + // unsigned int frameFloatOffset + unsigned int ret = self->frameFloatOffset; + int num_ret = olua_push_integer(L, ret); olua_endinvoke(L); return num_ret; } -static int _dragonBones_AnimationState_set_weight(lua_State *L) +static int _olua_fun_dragonBones_AnimationData_frameFloatOffset$2(lua_State *L) { olua_startinvoke(L); - dragonBones::AnimationState *self = nullptr; - float arg1 = 0; /** weight */ + dragonBones::AnimationData *self = nullptr; + unsigned int arg1 = 0; /** frameFloatOffset */ - olua_to_object(L, 1, &self, "db.AnimationState"); - olua_check_number(L, 2, &arg1); + olua_to_object(L, 1, &self, "db.AnimationData"); + olua_check_integer(L, 2, &arg1); - // float weight - self->weight = arg1; + // unsigned int frameFloatOffset + self->frameFloatOffset = arg1; olua_endinvoke(L); return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_dragonBones_AnimationState(lua_State *L) +static int _olua_fun_dragonBones_AnimationData_frameFloatOffset(lua_State *L) { - oluacls_class(L, "db.AnimationState"); - oluacls_func(L, "addBoneMask", _dragonBones_AnimationState_addBoneMask); - oluacls_func(L, "advanceTime", _dragonBones_AnimationState_advanceTime); - oluacls_func(L, "containsBoneMask", _dragonBones_AnimationState_containsBoneMask); - oluacls_func(L, "fadeOut", _dragonBones_AnimationState_fadeOut); - oluacls_func(L, "getAnimationData", _dragonBones_AnimationState_getAnimationData); - oluacls_func(L, "getCurrentPlayTimes", _dragonBones_AnimationState_getCurrentPlayTimes); - oluacls_func(L, "getCurrentTime", _dragonBones_AnimationState_getCurrentTime); - oluacls_func(L, "getName", _dragonBones_AnimationState_getName); - oluacls_func(L, "getTotalTime", _dragonBones_AnimationState_getTotalTime); - oluacls_func(L, "getTypeIndex", _dragonBones_AnimationState_getTypeIndex); - oluacls_func(L, "init", _dragonBones_AnimationState_init); - oluacls_func(L, "isCompleted", _dragonBones_AnimationState_isCompleted); - oluacls_func(L, "isFadeComplete", _dragonBones_AnimationState_isFadeComplete); - oluacls_func(L, "isFadeIn", _dragonBones_AnimationState_isFadeIn); - oluacls_func(L, "isFadeOut", _dragonBones_AnimationState_isFadeOut); - oluacls_func(L, "isPlaying", _dragonBones_AnimationState_isPlaying); - oluacls_func(L, "new", _dragonBones_AnimationState_new); - oluacls_func(L, "play", _dragonBones_AnimationState_play); - oluacls_func(L, "removeAllBoneMask", _dragonBones_AnimationState_removeAllBoneMask); - oluacls_func(L, "removeBoneMask", _dragonBones_AnimationState_removeBoneMask); - oluacls_func(L, "setCurrentTime", _dragonBones_AnimationState_setCurrentTime); - oluacls_func(L, "stop", _dragonBones_AnimationState_stop); - oluacls_prop(L, "animationData", _dragonBones_AnimationState_getAnimationData, nullptr); - oluacls_prop(L, "completed", _dragonBones_AnimationState_isCompleted, nullptr); - oluacls_prop(L, "currentPlayTimes", _dragonBones_AnimationState_getCurrentPlayTimes, nullptr); - oluacls_prop(L, "currentTime", _dragonBones_AnimationState_getCurrentTime, _dragonBones_AnimationState_setCurrentTime); - oluacls_prop(L, "fadeComplete", _dragonBones_AnimationState_isFadeComplete, nullptr); - oluacls_prop(L, "fadeIn", _dragonBones_AnimationState_isFadeIn, nullptr); - oluacls_prop(L, "fadeOut", _dragonBones_AnimationState_isFadeOut, nullptr); - oluacls_prop(L, "name", _dragonBones_AnimationState_getName, nullptr); - oluacls_prop(L, "playing", _dragonBones_AnimationState_isPlaying, nullptr); - oluacls_prop(L, "totalTime", _dragonBones_AnimationState_getTotalTime, nullptr); - oluacls_prop(L, "typeIndex", _dragonBones_AnimationState_getTypeIndex, nullptr); - oluacls_prop(L, "actionEnabled", _dragonBones_AnimationState_get_actionEnabled, _dragonBones_AnimationState_set_actionEnabled); - oluacls_prop(L, "additiveBlending", _dragonBones_AnimationState_get_additiveBlending, _dragonBones_AnimationState_set_additiveBlending); - oluacls_prop(L, "autoFadeOutTime", _dragonBones_AnimationState_get_autoFadeOutTime, _dragonBones_AnimationState_set_autoFadeOutTime); - oluacls_prop(L, "displayControl", _dragonBones_AnimationState_get_displayControl, _dragonBones_AnimationState_set_displayControl); - oluacls_prop(L, "fadeTotalTime", _dragonBones_AnimationState_get_fadeTotalTime, _dragonBones_AnimationState_set_fadeTotalTime); - oluacls_prop(L, "group", _dragonBones_AnimationState_get_group, _dragonBones_AnimationState_set_group); - oluacls_prop(L, "layer", _dragonBones_AnimationState_get_layer, _dragonBones_AnimationState_set_layer); - oluacls_prop(L, "name", _dragonBones_AnimationState_get_name, _dragonBones_AnimationState_set_name); - oluacls_prop(L, "playTimes", _dragonBones_AnimationState_get_playTimes, _dragonBones_AnimationState_set_playTimes); - oluacls_prop(L, "resetToPose", _dragonBones_AnimationState_get_resetToPose, _dragonBones_AnimationState_set_resetToPose); - oluacls_prop(L, "timeScale", _dragonBones_AnimationState_get_timeScale, _dragonBones_AnimationState_set_timeScale); - oluacls_prop(L, "weight", _dragonBones_AnimationState_get_weight, _dragonBones_AnimationState_set_weight); + int num_args = lua_gettop(L) - 1; - return 1; + if (num_args == 0) { + // unsigned int frameFloatOffset + return _olua_fun_dragonBones_AnimationData_frameFloatOffset$1(L); + } + + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // unsigned int frameFloatOffset + return _olua_fun_dragonBones_AnimationData_frameFloatOffset$2(L); + // } + } + + luaL_error(L, "method 'dragonBones::AnimationData::frameFloatOffset' not support '%d' arguments", num_args); + + return 0; } -OLUA_END_DECLS -static int _dragonBones_AnimationData_addBoneTimeline(lua_State *L) +static int _olua_fun_dragonBones_AnimationData_frameIntOffset$1(lua_State *L) { olua_startinvoke(L); dragonBones::AnimationData *self = nullptr; - dragonBones::BoneData *arg1 = nullptr; /** bone */ - dragonBones::TimelineData *arg2 = nullptr; /** value */ olua_to_object(L, 1, &self, "db.AnimationData"); - olua_check_object(L, 2, &arg1, "db.BoneData"); - olua_check_object(L, 3, &arg2, "db.TimelineData"); - // void addBoneTimeline(dragonBones::BoneData *bone, dragonBones::TimelineData *value) - self->addBoneTimeline(arg1, arg2); + // unsigned int frameIntOffset + unsigned int ret = self->frameIntOffset; + int num_ret = olua_push_integer(L, ret); olua_endinvoke(L); - return 0; + return num_ret; } -static int _dragonBones_AnimationData_addConstraintTimeline(lua_State *L) +static int _olua_fun_dragonBones_AnimationData_frameIntOffset$2(lua_State *L) { olua_startinvoke(L); dragonBones::AnimationData *self = nullptr; - dragonBones::ConstraintData *arg1 = nullptr; /** constraint */ - dragonBones::TimelineData *arg2 = nullptr; /** value */ + unsigned int arg1 = 0; /** frameIntOffset */ olua_to_object(L, 1, &self, "db.AnimationData"); - olua_check_object(L, 2, &arg1, "db.ConstraintData"); - olua_check_object(L, 3, &arg2, "db.TimelineData"); + olua_check_integer(L, 2, &arg1); - // void addConstraintTimeline(dragonBones::ConstraintData *constraint, dragonBones::TimelineData *value) - self->addConstraintTimeline(arg1, arg2); + // unsigned int frameIntOffset + self->frameIntOffset = arg1; olua_endinvoke(L); return 0; } -static int _dragonBones_AnimationData_addSlotTimeline(lua_State *L) +static int _olua_fun_dragonBones_AnimationData_frameIntOffset(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // unsigned int frameIntOffset + return _olua_fun_dragonBones_AnimationData_frameIntOffset$1(L); + } + + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // unsigned int frameIntOffset + return _olua_fun_dragonBones_AnimationData_frameIntOffset$2(L); + // } + } + + luaL_error(L, "method 'dragonBones::AnimationData::frameIntOffset' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_dragonBones_AnimationData_frameOffset$1(lua_State *L) { olua_startinvoke(L); dragonBones::AnimationData *self = nullptr; - dragonBones::SlotData *arg1 = nullptr; /** slot */ - dragonBones::TimelineData *arg2 = nullptr; /** value */ olua_to_object(L, 1, &self, "db.AnimationData"); - olua_check_object(L, 2, &arg1, "db.SlotData"); - olua_check_object(L, 3, &arg2, "db.TimelineData"); - // void addSlotTimeline(dragonBones::SlotData *slot, dragonBones::TimelineData *value) - self->addSlotTimeline(arg1, arg2); + // unsigned int frameOffset + unsigned int ret = self->frameOffset; + int num_ret = olua_push_integer(L, ret); olua_endinvoke(L); - return 0; + return num_ret; } -static int _dragonBones_AnimationData_cacheFrames(lua_State *L) +static int _olua_fun_dragonBones_AnimationData_frameOffset$2(lua_State *L) { olua_startinvoke(L); dragonBones::AnimationData *self = nullptr; - unsigned int arg1 = 0; /** frameRate */ + unsigned int arg1 = 0; /** frameOffset */ olua_to_object(L, 1, &self, "db.AnimationData"); olua_check_integer(L, 2, &arg1); - // void cacheFrames(unsigned int frameRate) - self->cacheFrames(arg1); + // unsigned int frameOffset + self->frameOffset = arg1; olua_endinvoke(L); return 0; } -static int _dragonBones_AnimationData_getActionTimeline(lua_State *L) +static int _olua_fun_dragonBones_AnimationData_frameOffset(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // unsigned int frameOffset + return _olua_fun_dragonBones_AnimationData_frameOffset$1(L); + } + + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // unsigned int frameOffset + return _olua_fun_dragonBones_AnimationData_frameOffset$2(L); + // } + } + + luaL_error(L, "method 'dragonBones::AnimationData::frameOffset' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_dragonBones_AnimationData_getActionTimeline(lua_State *L) { olua_startinvoke(L); @@ -9700,7 +13068,7 @@ static int _dragonBones_AnimationData_getActionTimeline(lua_State *L) return num_ret; } -static int _dragonBones_AnimationData_getParent(lua_State *L) +static int _olua_fun_dragonBones_AnimationData_getParent(lua_State *L) { olua_startinvoke(L); @@ -9717,7 +13085,7 @@ static int _dragonBones_AnimationData_getParent(lua_State *L) return num_ret; } -static int _dragonBones_AnimationData_getTypeIndex(lua_State *L) +static int _olua_fun_dragonBones_AnimationData_getTypeIndex(lua_State *L) { olua_startinvoke(L); @@ -9730,7 +13098,7 @@ static int _dragonBones_AnimationData_getTypeIndex(lua_State *L) return num_ret; } -static int _dragonBones_AnimationData_getZOrderTimeline(lua_State *L) +static int _olua_fun_dragonBones_AnimationData_getZOrderTimeline(lua_State *L) { olua_startinvoke(L); @@ -9747,75 +13115,77 @@ static int _dragonBones_AnimationData_getZOrderTimeline(lua_State *L) return num_ret; } -static int _dragonBones_AnimationData_new(lua_State *L) +static int _olua_fun_dragonBones_AnimationData_name$1(lua_State *L) { olua_startinvoke(L); - // AnimationData() - dragonBones::AnimationData *ret = new dragonBones::AnimationData(); - int num_ret = olua_push_object(L, ret, "db.AnimationData"); - olua_postnew(L, ret); + dragonBones::AnimationData *self = nullptr; + + olua_to_object(L, 1, &self, "db.AnimationData"); + + // std::string name + std::string ret = self->name; + int num_ret = olua_push_string(L, ret); olua_endinvoke(L); return num_ret; } -static int _dragonBones_AnimationData_setActionTimeline(lua_State *L) +static int _olua_fun_dragonBones_AnimationData_name$2(lua_State *L) { olua_startinvoke(L); dragonBones::AnimationData *self = nullptr; - dragonBones::TimelineData *arg1 = nullptr; /** pactionTimeline */ + std::string arg1; /** name */ olua_to_object(L, 1, &self, "db.AnimationData"); - olua_check_object(L, 2, &arg1, "db.TimelineData"); + olua_check_string(L, 2, &arg1); - // void setActionTimeline(dragonBones::TimelineData *pactionTimeline) - self->setActionTimeline(arg1); + // std::string name + self->name = arg1; olua_endinvoke(L); return 0; } -static int _dragonBones_AnimationData_setParent(lua_State *L) +static int _olua_fun_dragonBones_AnimationData_name(lua_State *L) { - olua_startinvoke(L); - - dragonBones::AnimationData *self = nullptr; - dragonBones::ArmatureData *arg1 = nullptr; /** value */ + int num_args = lua_gettop(L) - 1; - olua_to_object(L, 1, &self, "db.AnimationData"); - olua_check_object(L, 2, &arg1, "db.ArmatureData"); + if (num_args == 0) { + // std::string name + return _olua_fun_dragonBones_AnimationData_name$1(L); + } - // void setParent(dragonBones::ArmatureData *value) - self->setParent(arg1); + if (num_args == 1) { + // if ((olua_is_string(L, 2))) { + // std::string name + return _olua_fun_dragonBones_AnimationData_name$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'dragonBones::AnimationData::name' not support '%d' arguments", num_args); return 0; } -static int _dragonBones_AnimationData_setZOrderTimeline(lua_State *L) +static int _olua_fun_dragonBones_AnimationData_new(lua_State *L) { olua_startinvoke(L); - dragonBones::AnimationData *self = nullptr; - dragonBones::TimelineData *arg1 = nullptr; /** value */ - - olua_to_object(L, 1, &self, "db.AnimationData"); - olua_check_object(L, 2, &arg1, "db.TimelineData"); - - // void setZOrderTimeline(dragonBones::TimelineData *value) - self->setZOrderTimeline(arg1); + // dragonBones::AnimationData() + dragonBones::AnimationData *ret = new dragonBones::AnimationData(); + int num_ret = olua_push_object(L, ret, "db.AnimationData"); + olua_postnew(L, ret); olua_endinvoke(L); - return 0; + return num_ret; } -static int _dragonBones_AnimationData_get_actionTimeline(lua_State *L) +static int _olua_fun_dragonBones_AnimationData_parent$1(lua_State *L) { olua_startinvoke(L); @@ -9823,34 +13193,55 @@ static int _dragonBones_AnimationData_get_actionTimeline(lua_State *L) olua_to_object(L, 1, &self, "db.AnimationData"); - // dragonBones::TimelineData *actionTimeline - dragonBones::TimelineData *ret = self->actionTimeline; - int num_ret = olua_push_object(L, ret, "db.TimelineData"); + // dragonBones::ArmatureData *parent + dragonBones::ArmatureData *ret = self->parent; + int num_ret = olua_push_object(L, ret, "db.ArmatureData"); olua_endinvoke(L); return num_ret; } -static int _dragonBones_AnimationData_set_actionTimeline(lua_State *L) +static int _olua_fun_dragonBones_AnimationData_parent$2(lua_State *L) { olua_startinvoke(L); dragonBones::AnimationData *self = nullptr; - dragonBones::TimelineData *arg1 = nullptr; /** actionTimeline */ + dragonBones::ArmatureData *arg1 = nullptr; /** parent */ olua_to_object(L, 1, &self, "db.AnimationData"); - olua_check_object(L, 2, &arg1, "db.TimelineData"); + olua_check_object(L, 2, &arg1, "db.ArmatureData"); - // dragonBones::TimelineData *actionTimeline - self->actionTimeline = arg1; + // dragonBones::ArmatureData *parent + self->parent = arg1; olua_endinvoke(L); return 0; } -static int _dragonBones_AnimationData_get_cacheFrameRate(lua_State *L) +static int _olua_fun_dragonBones_AnimationData_parent(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // dragonBones::ArmatureData *parent + return _olua_fun_dragonBones_AnimationData_parent$1(L); + } + + if (num_args == 1) { + // if ((olua_is_object(L, 2, "db.ArmatureData"))) { + // dragonBones::ArmatureData *parent + return _olua_fun_dragonBones_AnimationData_parent$2(L); + // } + } + + luaL_error(L, "method 'dragonBones::AnimationData::parent' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_dragonBones_AnimationData_playTimes$1(lua_State *L) { olua_startinvoke(L); @@ -9858,34 +13249,55 @@ static int _dragonBones_AnimationData_get_cacheFrameRate(lua_State *L) olua_to_object(L, 1, &self, "db.AnimationData"); - // float cacheFrameRate - float ret = self->cacheFrameRate; - int num_ret = olua_push_number(L, ret); + // unsigned int playTimes + unsigned int ret = self->playTimes; + int num_ret = olua_push_integer(L, ret); olua_endinvoke(L); return num_ret; } -static int _dragonBones_AnimationData_set_cacheFrameRate(lua_State *L) +static int _olua_fun_dragonBones_AnimationData_playTimes$2(lua_State *L) { olua_startinvoke(L); dragonBones::AnimationData *self = nullptr; - float arg1 = 0; /** cacheFrameRate */ + unsigned int arg1 = 0; /** playTimes */ olua_to_object(L, 1, &self, "db.AnimationData"); - olua_check_number(L, 2, &arg1); + olua_check_integer(L, 2, &arg1); - // float cacheFrameRate - self->cacheFrameRate = arg1; + // unsigned int playTimes + self->playTimes = arg1; olua_endinvoke(L); return 0; } -static int _dragonBones_AnimationData_get_cachedFrames(lua_State *L) +static int _olua_fun_dragonBones_AnimationData_playTimes(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // unsigned int playTimes + return _olua_fun_dragonBones_AnimationData_playTimes$1(L); + } + + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // unsigned int playTimes + return _olua_fun_dragonBones_AnimationData_playTimes$2(L); + // } + } + + luaL_error(L, "method 'dragonBones::AnimationData::playTimes' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_dragonBones_AnimationData_scale$1(lua_State *L) { olua_startinvoke(L); @@ -9893,108 +13305,109 @@ static int _dragonBones_AnimationData_get_cachedFrames(lua_State *L) olua_to_object(L, 1, &self, "db.AnimationData"); - // std::vector cachedFrames - std::vector &ret = self->cachedFrames; - int num_ret = olua_push_array(L, ret, [L](bool &arg1) { - olua_push_bool(L, arg1); - }); + // float scale + float ret = self->scale; + int num_ret = olua_push_number(L, ret); olua_endinvoke(L); return num_ret; } -static int _dragonBones_AnimationData_set_cachedFrames(lua_State *L) +static int _olua_fun_dragonBones_AnimationData_scale$2(lua_State *L) { olua_startinvoke(L); dragonBones::AnimationData *self = nullptr; - std::vector arg1; /** cachedFrames */ + float arg1 = 0; /** scale */ olua_to_object(L, 1, &self, "db.AnimationData"); - olua_check_array(L, 2, arg1, [L](bool *arg1) { - olua_check_bool(L, -1, arg1); - }); + olua_check_number(L, 2, &arg1); - // std::vector cachedFrames - self->cachedFrames = arg1; + // float scale + self->scale = arg1; olua_endinvoke(L); return 0; } -static int _dragonBones_AnimationData_get_duration(lua_State *L) +static int _olua_fun_dragonBones_AnimationData_scale(lua_State *L) { - olua_startinvoke(L); - - dragonBones::AnimationData *self = nullptr; + int num_args = lua_gettop(L) - 1; - olua_to_object(L, 1, &self, "db.AnimationData"); + if (num_args == 0) { + // float scale + return _olua_fun_dragonBones_AnimationData_scale$1(L); + } - // float duration - float ret = self->duration; - int num_ret = olua_push_number(L, ret); + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float scale + return _olua_fun_dragonBones_AnimationData_scale$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'dragonBones::AnimationData::scale' not support '%d' arguments", num_args); - return num_ret; + return 0; } -static int _dragonBones_AnimationData_set_duration(lua_State *L) +static int _olua_fun_dragonBones_AnimationData_setActionTimeline(lua_State *L) { olua_startinvoke(L); dragonBones::AnimationData *self = nullptr; - float arg1 = 0; /** duration */ + dragonBones::TimelineData *arg1 = nullptr; /** pactionTimeline */ olua_to_object(L, 1, &self, "db.AnimationData"); - olua_check_number(L, 2, &arg1); + olua_check_object(L, 2, &arg1, "db.TimelineData"); - // float duration - self->duration = arg1; + // void setActionTimeline(dragonBones::TimelineData *pactionTimeline) + self->setActionTimeline(arg1); olua_endinvoke(L); return 0; } -static int _dragonBones_AnimationData_get_fadeInTime(lua_State *L) +static int _olua_fun_dragonBones_AnimationData_setParent(lua_State *L) { olua_startinvoke(L); dragonBones::AnimationData *self = nullptr; + dragonBones::ArmatureData *arg1 = nullptr; /** value */ olua_to_object(L, 1, &self, "db.AnimationData"); + olua_check_object(L, 2, &arg1, "db.ArmatureData"); - // float fadeInTime - float ret = self->fadeInTime; - int num_ret = olua_push_number(L, ret); + // void setParent(dragonBones::ArmatureData *value) + self->setParent(arg1); olua_endinvoke(L); - return num_ret; + return 0; } -static int _dragonBones_AnimationData_set_fadeInTime(lua_State *L) +static int _olua_fun_dragonBones_AnimationData_setZOrderTimeline(lua_State *L) { olua_startinvoke(L); dragonBones::AnimationData *self = nullptr; - float arg1 = 0; /** fadeInTime */ + dragonBones::TimelineData *arg1 = nullptr; /** value */ olua_to_object(L, 1, &self, "db.AnimationData"); - olua_check_number(L, 2, &arg1); + olua_check_object(L, 2, &arg1, "db.TimelineData"); - // float fadeInTime - self->fadeInTime = arg1; + // void setZOrderTimeline(dragonBones::TimelineData *value) + self->setZOrderTimeline(arg1); olua_endinvoke(L); return 0; } -static int _dragonBones_AnimationData_get_frameCount(lua_State *L) +static int _olua_fun_dragonBones_AnimationData_zOrderTimeline$1(lua_State *L) { olua_startinvoke(L); @@ -10002,253 +13415,299 @@ static int _dragonBones_AnimationData_get_frameCount(lua_State *L) olua_to_object(L, 1, &self, "db.AnimationData"); - // unsigned int frameCount - unsigned int ret = self->frameCount; - int num_ret = olua_push_integer(L, ret); + // dragonBones::TimelineData *zOrderTimeline + dragonBones::TimelineData *ret = self->zOrderTimeline; + int num_ret = olua_push_object(L, ret, "db.TimelineData"); olua_endinvoke(L); return num_ret; } -static int _dragonBones_AnimationData_set_frameCount(lua_State *L) +static int _olua_fun_dragonBones_AnimationData_zOrderTimeline$2(lua_State *L) { olua_startinvoke(L); dragonBones::AnimationData *self = nullptr; - unsigned int arg1 = 0; /** frameCount */ + dragonBones::TimelineData *arg1 = nullptr; /** zOrderTimeline */ olua_to_object(L, 1, &self, "db.AnimationData"); - olua_check_integer(L, 2, &arg1); + olua_check_object(L, 2, &arg1, "db.TimelineData"); - // unsigned int frameCount - self->frameCount = arg1; + // dragonBones::TimelineData *zOrderTimeline + self->zOrderTimeline = arg1; olua_endinvoke(L); return 0; } -static int _dragonBones_AnimationData_get_frameFloatOffset(lua_State *L) +static int _olua_fun_dragonBones_AnimationData_zOrderTimeline(lua_State *L) { - olua_startinvoke(L); - - dragonBones::AnimationData *self = nullptr; + int num_args = lua_gettop(L) - 1; - olua_to_object(L, 1, &self, "db.AnimationData"); + if (num_args == 0) { + // dragonBones::TimelineData *zOrderTimeline + return _olua_fun_dragonBones_AnimationData_zOrderTimeline$1(L); + } - // unsigned int frameFloatOffset - unsigned int ret = self->frameFloatOffset; - int num_ret = olua_push_integer(L, ret); + if (num_args == 1) { + // if ((olua_is_object(L, 2, "db.TimelineData"))) { + // dragonBones::TimelineData *zOrderTimeline + return _olua_fun_dragonBones_AnimationData_zOrderTimeline$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'dragonBones::AnimationData::zOrderTimeline' not support '%d' arguments", num_args); - return num_ret; + return 0; } -static int _dragonBones_AnimationData_set_frameFloatOffset(lua_State *L) +static int _olua_cls_db_AnimationData(lua_State *L) { - olua_startinvoke(L); - - dragonBones::AnimationData *self = nullptr; - unsigned int arg1 = 0; /** frameFloatOffset */ - - olua_to_object(L, 1, &self, "db.AnimationData"); - olua_check_integer(L, 2, &arg1); - - // unsigned int frameFloatOffset - self->frameFloatOffset = arg1; + oluacls_class(L, "db.AnimationData"); + oluacls_func(L, "addBoneTimeline", _olua_fun_dragonBones_AnimationData_addBoneTimeline); + oluacls_func(L, "addConstraintTimeline", _olua_fun_dragonBones_AnimationData_addConstraintTimeline); + oluacls_func(L, "addSlotTimeline", _olua_fun_dragonBones_AnimationData_addSlotTimeline); + oluacls_func(L, "cacheFrames", _olua_fun_dragonBones_AnimationData_cacheFrames); + oluacls_func(L, "getActionTimeline", _olua_fun_dragonBones_AnimationData_getActionTimeline); + oluacls_func(L, "getParent", _olua_fun_dragonBones_AnimationData_getParent); + oluacls_func(L, "getTypeIndex", _olua_fun_dragonBones_AnimationData_getTypeIndex); + oluacls_func(L, "getZOrderTimeline", _olua_fun_dragonBones_AnimationData_getZOrderTimeline); + oluacls_func(L, "new", _olua_fun_dragonBones_AnimationData_new); + oluacls_func(L, "setActionTimeline", _olua_fun_dragonBones_AnimationData_setActionTimeline); + oluacls_func(L, "setParent", _olua_fun_dragonBones_AnimationData_setParent); + oluacls_func(L, "setZOrderTimeline", _olua_fun_dragonBones_AnimationData_setZOrderTimeline); + oluacls_prop(L, "typeIndex", _olua_fun_dragonBones_AnimationData_getTypeIndex, nullptr); + oluacls_prop(L, "actionTimeline", _olua_fun_dragonBones_AnimationData_actionTimeline, _olua_fun_dragonBones_AnimationData_actionTimeline); + oluacls_prop(L, "cacheFrameRate", _olua_fun_dragonBones_AnimationData_cacheFrameRate, _olua_fun_dragonBones_AnimationData_cacheFrameRate); + oluacls_prop(L, "cachedFrames", _olua_fun_dragonBones_AnimationData_cachedFrames, _olua_fun_dragonBones_AnimationData_cachedFrames); + oluacls_prop(L, "duration", _olua_fun_dragonBones_AnimationData_duration, _olua_fun_dragonBones_AnimationData_duration); + oluacls_prop(L, "fadeInTime", _olua_fun_dragonBones_AnimationData_fadeInTime, _olua_fun_dragonBones_AnimationData_fadeInTime); + oluacls_prop(L, "frameCount", _olua_fun_dragonBones_AnimationData_frameCount, _olua_fun_dragonBones_AnimationData_frameCount); + oluacls_prop(L, "frameFloatOffset", _olua_fun_dragonBones_AnimationData_frameFloatOffset, _olua_fun_dragonBones_AnimationData_frameFloatOffset); + oluacls_prop(L, "frameIntOffset", _olua_fun_dragonBones_AnimationData_frameIntOffset, _olua_fun_dragonBones_AnimationData_frameIntOffset); + oluacls_prop(L, "frameOffset", _olua_fun_dragonBones_AnimationData_frameOffset, _olua_fun_dragonBones_AnimationData_frameOffset); + oluacls_prop(L, "name", _olua_fun_dragonBones_AnimationData_name, _olua_fun_dragonBones_AnimationData_name); + oluacls_prop(L, "parent", _olua_fun_dragonBones_AnimationData_parent, _olua_fun_dragonBones_AnimationData_parent); + oluacls_prop(L, "playTimes", _olua_fun_dragonBones_AnimationData_playTimes, _olua_fun_dragonBones_AnimationData_playTimes); + oluacls_prop(L, "scale", _olua_fun_dragonBones_AnimationData_scale, _olua_fun_dragonBones_AnimationData_scale); + oluacls_prop(L, "zOrderTimeline", _olua_fun_dragonBones_AnimationData_zOrderTimeline, _olua_fun_dragonBones_AnimationData_zOrderTimeline); - olua_endinvoke(L); + return 1; +} - return 0; +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_db_AnimationData(lua_State *L) +{ + olua_require(L, "dragonbones", luaopen_dragonbones); + if (!olua_getclass(L, "db.AnimationData")) { + luaL_error(L, "class not found: dragonBones::AnimationData"); + } + return 1; } +OLUA_END_DECLS -static int _dragonBones_AnimationData_get_frameIntOffset(lua_State *L) +static int _olua_fun_dragonBones_AnimationConfig_actionEnabled$1(lua_State *L) { olua_startinvoke(L); - dragonBones::AnimationData *self = nullptr; + dragonBones::AnimationConfig *self = nullptr; - olua_to_object(L, 1, &self, "db.AnimationData"); + olua_to_object(L, 1, &self, "db.AnimationConfig"); - // unsigned int frameIntOffset - unsigned int ret = self->frameIntOffset; - int num_ret = olua_push_integer(L, ret); + // bool actionEnabled + bool ret = self->actionEnabled; + int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); return num_ret; } -static int _dragonBones_AnimationData_set_frameIntOffset(lua_State *L) +static int _olua_fun_dragonBones_AnimationConfig_actionEnabled$2(lua_State *L) { olua_startinvoke(L); - dragonBones::AnimationData *self = nullptr; - unsigned int arg1 = 0; /** frameIntOffset */ + dragonBones::AnimationConfig *self = nullptr; + bool arg1 = false; /** actionEnabled */ - olua_to_object(L, 1, &self, "db.AnimationData"); - olua_check_integer(L, 2, &arg1); + olua_to_object(L, 1, &self, "db.AnimationConfig"); + olua_check_bool(L, 2, &arg1); - // unsigned int frameIntOffset - self->frameIntOffset = arg1; + // bool actionEnabled + self->actionEnabled = arg1; olua_endinvoke(L); return 0; } -static int _dragonBones_AnimationData_get_frameOffset(lua_State *L) +static int _olua_fun_dragonBones_AnimationConfig_actionEnabled(lua_State *L) { - olua_startinvoke(L); - - dragonBones::AnimationData *self = nullptr; + int num_args = lua_gettop(L) - 1; - olua_to_object(L, 1, &self, "db.AnimationData"); + if (num_args == 0) { + // bool actionEnabled + return _olua_fun_dragonBones_AnimationConfig_actionEnabled$1(L); + } - // unsigned int frameOffset - unsigned int ret = self->frameOffset; - int num_ret = olua_push_integer(L, ret); + if (num_args == 1) { + // if ((olua_is_bool(L, 2))) { + // bool actionEnabled + return _olua_fun_dragonBones_AnimationConfig_actionEnabled$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'dragonBones::AnimationConfig::actionEnabled' not support '%d' arguments", num_args); - return num_ret; + return 0; } -static int _dragonBones_AnimationData_set_frameOffset(lua_State *L) +static int _olua_fun_dragonBones_AnimationConfig_addBoneMask(lua_State *L) { olua_startinvoke(L); - dragonBones::AnimationData *self = nullptr; - unsigned int arg1 = 0; /** frameOffset */ + dragonBones::AnimationConfig *self = nullptr; + dragonBones::Armature *arg1 = nullptr; /** armature */ + std::string arg2; /** boneName */ + bool arg3 = false; /** recursive */ - olua_to_object(L, 1, &self, "db.AnimationData"); - olua_check_integer(L, 2, &arg1); + olua_to_object(L, 1, &self, "db.AnimationConfig"); + olua_check_object(L, 2, &arg1, "db.Armature"); + olua_check_string(L, 3, &arg2); + olua_check_bool(L, 4, &arg3); - // unsigned int frameOffset - self->frameOffset = arg1; + // void addBoneMask(dragonBones::Armature *armature, const std::string &boneName, bool recursive) + self->addBoneMask(arg1, arg2, arg3); olua_endinvoke(L); return 0; } -static int _dragonBones_AnimationData_get_name(lua_State *L) +static int _olua_fun_dragonBones_AnimationConfig_additiveBlending$1(lua_State *L) { olua_startinvoke(L); - dragonBones::AnimationData *self = nullptr; + dragonBones::AnimationConfig *self = nullptr; - olua_to_object(L, 1, &self, "db.AnimationData"); + olua_to_object(L, 1, &self, "db.AnimationConfig"); - // std::string name - std::string ret = self->name; - int num_ret = olua_push_string(L, ret); + // bool additiveBlending + bool ret = self->additiveBlending; + int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); return num_ret; } -static int _dragonBones_AnimationData_set_name(lua_State *L) +static int _olua_fun_dragonBones_AnimationConfig_additiveBlending$2(lua_State *L) { olua_startinvoke(L); - dragonBones::AnimationData *self = nullptr; - std::string arg1; /** name */ + dragonBones::AnimationConfig *self = nullptr; + bool arg1 = false; /** additiveBlending */ - olua_to_object(L, 1, &self, "db.AnimationData"); - olua_check_string(L, 2, &arg1); + olua_to_object(L, 1, &self, "db.AnimationConfig"); + olua_check_bool(L, 2, &arg1); - // std::string name - self->name = arg1; + // bool additiveBlending + self->additiveBlending = arg1; olua_endinvoke(L); return 0; } -static int _dragonBones_AnimationData_get_parent(lua_State *L) +static int _olua_fun_dragonBones_AnimationConfig_additiveBlending(lua_State *L) { - olua_startinvoke(L); - - dragonBones::AnimationData *self = nullptr; + int num_args = lua_gettop(L) - 1; - olua_to_object(L, 1, &self, "db.AnimationData"); + if (num_args == 0) { + // bool additiveBlending + return _olua_fun_dragonBones_AnimationConfig_additiveBlending$1(L); + } - // dragonBones::ArmatureData *parent - dragonBones::ArmatureData *ret = self->parent; - int num_ret = olua_push_object(L, ret, "db.ArmatureData"); + if (num_args == 1) { + // if ((olua_is_bool(L, 2))) { + // bool additiveBlending + return _olua_fun_dragonBones_AnimationConfig_additiveBlending$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'dragonBones::AnimationConfig::additiveBlending' not support '%d' arguments", num_args); - return num_ret; + return 0; } -static int _dragonBones_AnimationData_set_parent(lua_State *L) +static int _olua_fun_dragonBones_AnimationConfig_animation$1(lua_State *L) { olua_startinvoke(L); - dragonBones::AnimationData *self = nullptr; - dragonBones::ArmatureData *arg1 = nullptr; /** parent */ + dragonBones::AnimationConfig *self = nullptr; - olua_to_object(L, 1, &self, "db.AnimationData"); - olua_check_object(L, 2, &arg1, "db.ArmatureData"); + olua_to_object(L, 1, &self, "db.AnimationConfig"); - // dragonBones::ArmatureData *parent - self->parent = arg1; + // std::string animation + std::string ret = self->animation; + int num_ret = olua_push_string(L, ret); olua_endinvoke(L); - return 0; + return num_ret; } -static int _dragonBones_AnimationData_get_playTimes(lua_State *L) +static int _olua_fun_dragonBones_AnimationConfig_animation$2(lua_State *L) { olua_startinvoke(L); - dragonBones::AnimationData *self = nullptr; + dragonBones::AnimationConfig *self = nullptr; + std::string arg1; /** animation */ - olua_to_object(L, 1, &self, "db.AnimationData"); + olua_to_object(L, 1, &self, "db.AnimationConfig"); + olua_check_string(L, 2, &arg1); - // unsigned int playTimes - unsigned int ret = self->playTimes; - int num_ret = olua_push_integer(L, ret); + // std::string animation + self->animation = arg1; olua_endinvoke(L); - return num_ret; + return 0; } -static int _dragonBones_AnimationData_set_playTimes(lua_State *L) +static int _olua_fun_dragonBones_AnimationConfig_animation(lua_State *L) { - olua_startinvoke(L); - - dragonBones::AnimationData *self = nullptr; - unsigned int arg1 = 0; /** playTimes */ + int num_args = lua_gettop(L) - 1; - olua_to_object(L, 1, &self, "db.AnimationData"); - olua_check_integer(L, 2, &arg1); + if (num_args == 0) { + // std::string animation + return _olua_fun_dragonBones_AnimationConfig_animation$1(L); + } - // unsigned int playTimes - self->playTimes = arg1; + if (num_args == 1) { + // if ((olua_is_string(L, 2))) { + // std::string animation + return _olua_fun_dragonBones_AnimationConfig_animation$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'dragonBones::AnimationConfig::animation' not support '%d' arguments", num_args); return 0; } -static int _dragonBones_AnimationData_get_scale(lua_State *L) +static int _olua_fun_dragonBones_AnimationConfig_autoFadeOutTime$1(lua_State *L) { olua_startinvoke(L); - dragonBones::AnimationData *self = nullptr; + dragonBones::AnimationConfig *self = nullptr; - olua_to_object(L, 1, &self, "db.AnimationData"); + olua_to_object(L, 1, &self, "db.AnimationConfig"); - // float scale - float ret = self->scale; + // float autoFadeOutTime + float ret = self->autoFadeOutTime; int num_ret = olua_push_number(L, ret); olua_endinvoke(L); @@ -10256,121 +13715,106 @@ static int _dragonBones_AnimationData_get_scale(lua_State *L) return num_ret; } -static int _dragonBones_AnimationData_set_scale(lua_State *L) +static int _olua_fun_dragonBones_AnimationConfig_autoFadeOutTime$2(lua_State *L) { olua_startinvoke(L); - dragonBones::AnimationData *self = nullptr; - float arg1 = 0; /** scale */ + dragonBones::AnimationConfig *self = nullptr; + float arg1 = 0; /** autoFadeOutTime */ - olua_to_object(L, 1, &self, "db.AnimationData"); + olua_to_object(L, 1, &self, "db.AnimationConfig"); olua_check_number(L, 2, &arg1); - // float scale - self->scale = arg1; + // float autoFadeOutTime + self->autoFadeOutTime = arg1; olua_endinvoke(L); return 0; } -static int _dragonBones_AnimationData_get_zOrderTimeline(lua_State *L) +static int _olua_fun_dragonBones_AnimationConfig_autoFadeOutTime(lua_State *L) { - olua_startinvoke(L); - - dragonBones::AnimationData *self = nullptr; + int num_args = lua_gettop(L) - 1; - olua_to_object(L, 1, &self, "db.AnimationData"); + if (num_args == 0) { + // float autoFadeOutTime + return _olua_fun_dragonBones_AnimationConfig_autoFadeOutTime$1(L); + } - // dragonBones::TimelineData *zOrderTimeline - dragonBones::TimelineData *ret = self->zOrderTimeline; - int num_ret = olua_push_object(L, ret, "db.TimelineData"); + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float autoFadeOutTime + return _olua_fun_dragonBones_AnimationConfig_autoFadeOutTime$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'dragonBones::AnimationConfig::autoFadeOutTime' not support '%d' arguments", num_args); - return num_ret; + return 0; } -static int _dragonBones_AnimationData_set_zOrderTimeline(lua_State *L) +static int _olua_fun_dragonBones_AnimationConfig_boneMask$1(lua_State *L) { olua_startinvoke(L); - dragonBones::AnimationData *self = nullptr; - dragonBones::TimelineData *arg1 = nullptr; /** zOrderTimeline */ + dragonBones::AnimationConfig *self = nullptr; - olua_to_object(L, 1, &self, "db.AnimationData"); - olua_check_object(L, 2, &arg1, "db.TimelineData"); + olua_to_object(L, 1, &self, "db.AnimationConfig"); - // dragonBones::TimelineData *zOrderTimeline - self->zOrderTimeline = arg1; + // std::vector boneMask + std::vector &ret = self->boneMask; + int num_ret = olua_push_array(L, ret, [L](std::string &arg1) { + olua_push_string(L, arg1); + }); olua_endinvoke(L); - return 0; + return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_dragonBones_AnimationData(lua_State *L) +static int _olua_fun_dragonBones_AnimationConfig_boneMask$2(lua_State *L) { - oluacls_class(L, "db.AnimationData"); - oluacls_func(L, "addBoneTimeline", _dragonBones_AnimationData_addBoneTimeline); - oluacls_func(L, "addConstraintTimeline", _dragonBones_AnimationData_addConstraintTimeline); - oluacls_func(L, "addSlotTimeline", _dragonBones_AnimationData_addSlotTimeline); - oluacls_func(L, "cacheFrames", _dragonBones_AnimationData_cacheFrames); - oluacls_func(L, "getActionTimeline", _dragonBones_AnimationData_getActionTimeline); - oluacls_func(L, "getParent", _dragonBones_AnimationData_getParent); - oluacls_func(L, "getTypeIndex", _dragonBones_AnimationData_getTypeIndex); - oluacls_func(L, "getZOrderTimeline", _dragonBones_AnimationData_getZOrderTimeline); - oluacls_func(L, "new", _dragonBones_AnimationData_new); - oluacls_func(L, "setActionTimeline", _dragonBones_AnimationData_setActionTimeline); - oluacls_func(L, "setParent", _dragonBones_AnimationData_setParent); - oluacls_func(L, "setZOrderTimeline", _dragonBones_AnimationData_setZOrderTimeline); - oluacls_prop(L, "actionTimeline", _dragonBones_AnimationData_getActionTimeline, _dragonBones_AnimationData_setActionTimeline); - oluacls_prop(L, "parent", _dragonBones_AnimationData_getParent, _dragonBones_AnimationData_setParent); - oluacls_prop(L, "typeIndex", _dragonBones_AnimationData_getTypeIndex, nullptr); - oluacls_prop(L, "zOrderTimeline", _dragonBones_AnimationData_getZOrderTimeline, _dragonBones_AnimationData_setZOrderTimeline); - oluacls_prop(L, "actionTimeline", _dragonBones_AnimationData_get_actionTimeline, _dragonBones_AnimationData_set_actionTimeline); - oluacls_prop(L, "cacheFrameRate", _dragonBones_AnimationData_get_cacheFrameRate, _dragonBones_AnimationData_set_cacheFrameRate); - oluacls_prop(L, "cachedFrames", _dragonBones_AnimationData_get_cachedFrames, _dragonBones_AnimationData_set_cachedFrames); - oluacls_prop(L, "duration", _dragonBones_AnimationData_get_duration, _dragonBones_AnimationData_set_duration); - oluacls_prop(L, "fadeInTime", _dragonBones_AnimationData_get_fadeInTime, _dragonBones_AnimationData_set_fadeInTime); - oluacls_prop(L, "frameCount", _dragonBones_AnimationData_get_frameCount, _dragonBones_AnimationData_set_frameCount); - oluacls_prop(L, "frameFloatOffset", _dragonBones_AnimationData_get_frameFloatOffset, _dragonBones_AnimationData_set_frameFloatOffset); - oluacls_prop(L, "frameIntOffset", _dragonBones_AnimationData_get_frameIntOffset, _dragonBones_AnimationData_set_frameIntOffset); - oluacls_prop(L, "frameOffset", _dragonBones_AnimationData_get_frameOffset, _dragonBones_AnimationData_set_frameOffset); - oluacls_prop(L, "name", _dragonBones_AnimationData_get_name, _dragonBones_AnimationData_set_name); - oluacls_prop(L, "parent", _dragonBones_AnimationData_get_parent, _dragonBones_AnimationData_set_parent); - oluacls_prop(L, "playTimes", _dragonBones_AnimationData_get_playTimes, _dragonBones_AnimationData_set_playTimes); - oluacls_prop(L, "scale", _dragonBones_AnimationData_get_scale, _dragonBones_AnimationData_set_scale); - oluacls_prop(L, "zOrderTimeline", _dragonBones_AnimationData_get_zOrderTimeline, _dragonBones_AnimationData_set_zOrderTimeline); + olua_startinvoke(L); + + dragonBones::AnimationConfig *self = nullptr; + std::vector arg1; /** boneMask */ + + olua_to_object(L, 1, &self, "db.AnimationConfig"); + olua_check_array(L, 2, arg1, [L](std::string *arg1) { + olua_check_string(L, -1, arg1); + }); + + // std::vector boneMask + self->boneMask = arg1; + + olua_endinvoke(L); - return 1; + return 0; } -OLUA_END_DECLS -static int _dragonBones_AnimationConfig_addBoneMask(lua_State *L) +static int _olua_fun_dragonBones_AnimationConfig_boneMask(lua_State *L) { - olua_startinvoke(L); - - dragonBones::AnimationConfig *self = nullptr; - dragonBones::Armature *arg1 = nullptr; /** armature */ - std::string arg2; /** boneName */ - bool arg3 = false; /** recursive */ + int num_args = lua_gettop(L) - 1; - olua_to_object(L, 1, &self, "db.AnimationConfig"); - olua_check_object(L, 2, &arg1, "db.Armature"); - olua_check_string(L, 3, &arg2); - olua_check_bool(L, 4, &arg3); + if (num_args == 0) { + // std::vector boneMask + return _olua_fun_dragonBones_AnimationConfig_boneMask$1(L); + } - // void addBoneMask(dragonBones::Armature *armature, const std::string &boneName, bool recursive) - self->addBoneMask(arg1, arg2, arg3); + if (num_args == 1) { + // if ((olua_is_array(L, 2))) { + // std::vector boneMask + return _olua_fun_dragonBones_AnimationConfig_boneMask$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'dragonBones::AnimationConfig::boneMask' not support '%d' arguments", num_args); return 0; } -static int _dragonBones_AnimationConfig_clear(lua_State *L) +static int _olua_fun_dragonBones_AnimationConfig_clear(lua_State *L) { olua_startinvoke(L); @@ -10386,7 +13830,7 @@ static int _dragonBones_AnimationConfig_clear(lua_State *L) return 0; } -static int _dragonBones_AnimationConfig_containsBoneMask(lua_State *L) +static int _olua_fun_dragonBones_AnimationConfig_containsBoneMask(lua_State *L) { olua_startinvoke(L); @@ -10405,7 +13849,7 @@ static int _dragonBones_AnimationConfig_containsBoneMask(lua_State *L) return num_ret; } -static int _dragonBones_AnimationConfig_copyFrom(lua_State *L) +static int _olua_fun_dragonBones_AnimationConfig_copyFrom(lua_State *L) { olua_startinvoke(L); @@ -10423,7 +13867,7 @@ static int _dragonBones_AnimationConfig_copyFrom(lua_State *L) return 0; } -static int _dragonBones_AnimationConfig_getFadeInTweenType(lua_State *L) +static int _olua_fun_dragonBones_AnimationConfig_displayControl$1(lua_State *L) { olua_startinvoke(L); @@ -10431,33 +13875,55 @@ static int _dragonBones_AnimationConfig_getFadeInTweenType(lua_State *L) olua_to_object(L, 1, &self, "db.AnimationConfig"); - // int getFadeInTweenType() - int ret = self->getFadeInTweenType(); - int num_ret = olua_push_integer(L, ret); + // bool displayControl + bool ret = self->displayControl; + int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); return num_ret; } -static int _dragonBones_AnimationConfig_getFadeOutMode(lua_State *L) +static int _olua_fun_dragonBones_AnimationConfig_displayControl$2(lua_State *L) { olua_startinvoke(L); dragonBones::AnimationConfig *self = nullptr; + bool arg1 = false; /** displayControl */ olua_to_object(L, 1, &self, "db.AnimationConfig"); + olua_check_bool(L, 2, &arg1); - // int getFadeOutMode() - int ret = self->getFadeOutMode(); - int num_ret = olua_push_integer(L, ret); + // bool displayControl + self->displayControl = arg1; olua_endinvoke(L); - return num_ret; + return 0; +} + +static int _olua_fun_dragonBones_AnimationConfig_displayControl(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // bool displayControl + return _olua_fun_dragonBones_AnimationConfig_displayControl$1(L); + } + + if (num_args == 1) { + // if ((olua_is_bool(L, 2))) { + // bool displayControl + return _olua_fun_dragonBones_AnimationConfig_displayControl$2(L); + // } + } + + luaL_error(L, "method 'dragonBones::AnimationConfig::displayControl' not support '%d' arguments", num_args); + + return 0; } -static int _dragonBones_AnimationConfig_getFadeOutTweenType(lua_State *L) +static int _olua_fun_dragonBones_AnimationConfig_duration$1(lua_State *L) { olua_startinvoke(L); @@ -10465,154 +13931,167 @@ static int _dragonBones_AnimationConfig_getFadeOutTweenType(lua_State *L) olua_to_object(L, 1, &self, "db.AnimationConfig"); - // int getFadeOutTweenType() - int ret = self->getFadeOutTweenType(); - int num_ret = olua_push_integer(L, ret); + // float duration + float ret = self->duration; + int num_ret = olua_push_number(L, ret); olua_endinvoke(L); return num_ret; } -static int _dragonBones_AnimationConfig_getTypeIndex(lua_State *L) +static int _olua_fun_dragonBones_AnimationConfig_duration$2(lua_State *L) { olua_startinvoke(L); - // static std::size_t getTypeIndex() - std::size_t ret = dragonBones::AnimationConfig::getTypeIndex(); - int num_ret = olua_push_integer(L, ret); + dragonBones::AnimationConfig *self = nullptr; + float arg1 = 0; /** duration */ + + olua_to_object(L, 1, &self, "db.AnimationConfig"); + olua_check_number(L, 2, &arg1); + + // float duration + self->duration = arg1; olua_endinvoke(L); - return num_ret; + return 0; } -static int _dragonBones_AnimationConfig_new(lua_State *L) +static int _olua_fun_dragonBones_AnimationConfig_duration(lua_State *L) { - olua_startinvoke(L); + int num_args = lua_gettop(L) - 1; - // AnimationConfig() - dragonBones::AnimationConfig *ret = new dragonBones::AnimationConfig(); - int num_ret = olua_push_object(L, ret, "db.AnimationConfig"); - olua_postnew(L, ret); + if (num_args == 0) { + // float duration + return _olua_fun_dragonBones_AnimationConfig_duration$1(L); + } - olua_endinvoke(L); + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float duration + return _olua_fun_dragonBones_AnimationConfig_duration$2(L); + // } + } - return num_ret; + luaL_error(L, "method 'dragonBones::AnimationConfig::duration' not support '%d' arguments", num_args); + + return 0; } -static int _dragonBones_AnimationConfig_removeBoneMask(lua_State *L) +static int _olua_fun_dragonBones_AnimationConfig_fadeInTime$1(lua_State *L) { olua_startinvoke(L); dragonBones::AnimationConfig *self = nullptr; - dragonBones::Armature *arg1 = nullptr; /** armature */ - std::string arg2; /** boneName */ - bool arg3 = false; /** recursive */ olua_to_object(L, 1, &self, "db.AnimationConfig"); - olua_check_object(L, 2, &arg1, "db.Armature"); - olua_check_string(L, 3, &arg2); - olua_check_bool(L, 4, &arg3); - // void removeBoneMask(dragonBones::Armature *armature, const std::string &boneName, bool recursive) - self->removeBoneMask(arg1, arg2, arg3); + // float fadeInTime + float ret = self->fadeInTime; + int num_ret = olua_push_number(L, ret); olua_endinvoke(L); - return 0; + return num_ret; } -static int _dragonBones_AnimationConfig_setFadeInTweenType(lua_State *L) +static int _olua_fun_dragonBones_AnimationConfig_fadeInTime$2(lua_State *L) { olua_startinvoke(L); dragonBones::AnimationConfig *self = nullptr; - int arg1 = 0; /** value */ + float arg1 = 0; /** fadeInTime */ olua_to_object(L, 1, &self, "db.AnimationConfig"); - olua_check_integer(L, 2, &arg1); + olua_check_number(L, 2, &arg1); - // void setFadeInTweenType(int value) - self->setFadeInTweenType(arg1); + // float fadeInTime + self->fadeInTime = arg1; olua_endinvoke(L); return 0; } -static int _dragonBones_AnimationConfig_setFadeOutMode(lua_State *L) +static int _olua_fun_dragonBones_AnimationConfig_fadeInTime(lua_State *L) { - olua_startinvoke(L); - - dragonBones::AnimationConfig *self = nullptr; - int arg1 = 0; /** value */ + int num_args = lua_gettop(L) - 1; - olua_to_object(L, 1, &self, "db.AnimationConfig"); - olua_check_integer(L, 2, &arg1); + if (num_args == 0) { + // float fadeInTime + return _olua_fun_dragonBones_AnimationConfig_fadeInTime$1(L); + } - // void setFadeOutMode(int value) - self->setFadeOutMode(arg1); + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float fadeInTime + return _olua_fun_dragonBones_AnimationConfig_fadeInTime$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'dragonBones::AnimationConfig::fadeInTime' not support '%d' arguments", num_args); return 0; } -static int _dragonBones_AnimationConfig_setFadeOutTweenType(lua_State *L) +static int _olua_fun_dragonBones_AnimationConfig_fadeInTweenType$1(lua_State *L) { olua_startinvoke(L); dragonBones::AnimationConfig *self = nullptr; - int arg1 = 0; /** value */ olua_to_object(L, 1, &self, "db.AnimationConfig"); - olua_check_integer(L, 2, &arg1); - // void setFadeOutTweenType(int value) - self->setFadeOutTweenType(arg1); + // dragonBones::TweenType fadeInTweenType + dragonBones::TweenType ret = self->fadeInTweenType; + int num_ret = olua_push_enum(L, ret); olua_endinvoke(L); - return 0; + return num_ret; } -static int _dragonBones_AnimationConfig_get_actionEnabled(lua_State *L) +static int _olua_fun_dragonBones_AnimationConfig_fadeInTweenType$2(lua_State *L) { olua_startinvoke(L); dragonBones::AnimationConfig *self = nullptr; + dragonBones::TweenType arg1 = (dragonBones::TweenType)0; /** fadeInTweenType */ olua_to_object(L, 1, &self, "db.AnimationConfig"); + olua_check_enum(L, 2, &arg1); - // bool actionEnabled - bool ret = self->actionEnabled; - int num_ret = olua_push_bool(L, ret); + // dragonBones::TweenType fadeInTweenType + self->fadeInTweenType = arg1; olua_endinvoke(L); - return num_ret; + return 0; } -static int _dragonBones_AnimationConfig_set_actionEnabled(lua_State *L) +static int _olua_fun_dragonBones_AnimationConfig_fadeInTweenType(lua_State *L) { - olua_startinvoke(L); - - dragonBones::AnimationConfig *self = nullptr; - bool arg1 = false; /** actionEnabled */ + int num_args = lua_gettop(L) - 1; - olua_to_object(L, 1, &self, "db.AnimationConfig"); - olua_check_bool(L, 2, &arg1); + if (num_args == 0) { + // dragonBones::TweenType fadeInTweenType + return _olua_fun_dragonBones_AnimationConfig_fadeInTweenType$1(L); + } - // bool actionEnabled - self->actionEnabled = arg1; + if (num_args == 1) { + // if ((olua_is_enum(L, 2))) { + // dragonBones::TweenType fadeInTweenType + return _olua_fun_dragonBones_AnimationConfig_fadeInTweenType$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'dragonBones::AnimationConfig::fadeInTweenType' not support '%d' arguments", num_args); return 0; } -static int _dragonBones_AnimationConfig_get_additiveBlending(lua_State *L) +static int _olua_fun_dragonBones_AnimationConfig_fadeOutMode$1(lua_State *L) { olua_startinvoke(L); @@ -10620,34 +14099,55 @@ static int _dragonBones_AnimationConfig_get_additiveBlending(lua_State *L) olua_to_object(L, 1, &self, "db.AnimationConfig"); - // bool additiveBlending - bool ret = self->additiveBlending; - int num_ret = olua_push_bool(L, ret); + // dragonBones::AnimationFadeOutMode fadeOutMode + dragonBones::AnimationFadeOutMode ret = self->fadeOutMode; + int num_ret = olua_push_enum(L, ret); olua_endinvoke(L); return num_ret; } -static int _dragonBones_AnimationConfig_set_additiveBlending(lua_State *L) +static int _olua_fun_dragonBones_AnimationConfig_fadeOutMode$2(lua_State *L) { olua_startinvoke(L); dragonBones::AnimationConfig *self = nullptr; - bool arg1 = false; /** additiveBlending */ + dragonBones::AnimationFadeOutMode arg1 = (dragonBones::AnimationFadeOutMode)0; /** fadeOutMode */ olua_to_object(L, 1, &self, "db.AnimationConfig"); - olua_check_bool(L, 2, &arg1); + olua_check_enum(L, 2, &arg1); - // bool additiveBlending - self->additiveBlending = arg1; + // dragonBones::AnimationFadeOutMode fadeOutMode + self->fadeOutMode = arg1; olua_endinvoke(L); return 0; } -static int _dragonBones_AnimationConfig_get_animation(lua_State *L) +static int _olua_fun_dragonBones_AnimationConfig_fadeOutMode(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // dragonBones::AnimationFadeOutMode fadeOutMode + return _olua_fun_dragonBones_AnimationConfig_fadeOutMode$1(L); + } + + if (num_args == 1) { + // if ((olua_is_enum(L, 2))) { + // dragonBones::AnimationFadeOutMode fadeOutMode + return _olua_fun_dragonBones_AnimationConfig_fadeOutMode$2(L); + // } + } + + luaL_error(L, "method 'dragonBones::AnimationConfig::fadeOutMode' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_dragonBones_AnimationConfig_fadeOutTime$1(lua_State *L) { olua_startinvoke(L); @@ -10655,34 +14155,55 @@ static int _dragonBones_AnimationConfig_get_animation(lua_State *L) olua_to_object(L, 1, &self, "db.AnimationConfig"); - // std::string animation - std::string ret = self->animation; - int num_ret = olua_push_string(L, ret); + // float fadeOutTime + float ret = self->fadeOutTime; + int num_ret = olua_push_number(L, ret); olua_endinvoke(L); return num_ret; } -static int _dragonBones_AnimationConfig_set_animation(lua_State *L) +static int _olua_fun_dragonBones_AnimationConfig_fadeOutTime$2(lua_State *L) { olua_startinvoke(L); dragonBones::AnimationConfig *self = nullptr; - std::string arg1; /** animation */ + float arg1 = 0; /** fadeOutTime */ olua_to_object(L, 1, &self, "db.AnimationConfig"); - olua_check_string(L, 2, &arg1); + olua_check_number(L, 2, &arg1); - // std::string animation - self->animation = arg1; + // float fadeOutTime + self->fadeOutTime = arg1; olua_endinvoke(L); return 0; } -static int _dragonBones_AnimationConfig_get_autoFadeOutTime(lua_State *L) +static int _olua_fun_dragonBones_AnimationConfig_fadeOutTime(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float fadeOutTime + return _olua_fun_dragonBones_AnimationConfig_fadeOutTime$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float fadeOutTime + return _olua_fun_dragonBones_AnimationConfig_fadeOutTime$2(L); + // } + } + + luaL_error(L, "method 'dragonBones::AnimationConfig::fadeOutTime' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_dragonBones_AnimationConfig_fadeOutTweenType$1(lua_State *L) { olua_startinvoke(L); @@ -10690,73 +14211,72 @@ static int _dragonBones_AnimationConfig_get_autoFadeOutTime(lua_State *L) olua_to_object(L, 1, &self, "db.AnimationConfig"); - // float autoFadeOutTime - float ret = self->autoFadeOutTime; - int num_ret = olua_push_number(L, ret); + // dragonBones::TweenType fadeOutTweenType + dragonBones::TweenType ret = self->fadeOutTweenType; + int num_ret = olua_push_enum(L, ret); olua_endinvoke(L); return num_ret; } -static int _dragonBones_AnimationConfig_set_autoFadeOutTime(lua_State *L) +static int _olua_fun_dragonBones_AnimationConfig_fadeOutTweenType$2(lua_State *L) { olua_startinvoke(L); dragonBones::AnimationConfig *self = nullptr; - float arg1 = 0; /** autoFadeOutTime */ + dragonBones::TweenType arg1 = (dragonBones::TweenType)0; /** fadeOutTweenType */ olua_to_object(L, 1, &self, "db.AnimationConfig"); - olua_check_number(L, 2, &arg1); + olua_check_enum(L, 2, &arg1); - // float autoFadeOutTime - self->autoFadeOutTime = arg1; + // dragonBones::TweenType fadeOutTweenType + self->fadeOutTweenType = arg1; olua_endinvoke(L); return 0; } -static int _dragonBones_AnimationConfig_get_boneMask(lua_State *L) +static int _olua_fun_dragonBones_AnimationConfig_fadeOutTweenType(lua_State *L) { - olua_startinvoke(L); - - dragonBones::AnimationConfig *self = nullptr; + int num_args = lua_gettop(L) - 1; - olua_to_object(L, 1, &self, "db.AnimationConfig"); + if (num_args == 0) { + // dragonBones::TweenType fadeOutTweenType + return _olua_fun_dragonBones_AnimationConfig_fadeOutTweenType$1(L); + } - // std::vector boneMask - std::vector &ret = self->boneMask; - int num_ret = olua_push_array(L, ret, [L](std::string &arg1) { - olua_push_string(L, arg1); - }); + if (num_args == 1) { + // if ((olua_is_enum(L, 2))) { + // dragonBones::TweenType fadeOutTweenType + return _olua_fun_dragonBones_AnimationConfig_fadeOutTweenType$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'dragonBones::AnimationConfig::fadeOutTweenType' not support '%d' arguments", num_args); - return num_ret; + return 0; } -static int _dragonBones_AnimationConfig_set_boneMask(lua_State *L) +static int _olua_fun_dragonBones_AnimationConfig_getFadeInTweenType(lua_State *L) { olua_startinvoke(L); dragonBones::AnimationConfig *self = nullptr; - std::vector arg1; /** boneMask */ olua_to_object(L, 1, &self, "db.AnimationConfig"); - olua_check_array(L, 2, arg1, [L](std::string *arg1) { - olua_check_string(L, -1, arg1); - }); - // std::vector boneMask - self->boneMask = arg1; + // int getFadeInTweenType() + int ret = self->getFadeInTweenType(); + int num_ret = olua_push_integer(L, ret); olua_endinvoke(L); - return 0; + return num_ret; } -static int _dragonBones_AnimationConfig_get_displayControl(lua_State *L) +static int _olua_fun_dragonBones_AnimationConfig_getFadeOutMode(lua_State *L) { olua_startinvoke(L); @@ -10764,104 +14284,102 @@ static int _dragonBones_AnimationConfig_get_displayControl(lua_State *L) olua_to_object(L, 1, &self, "db.AnimationConfig"); - // bool displayControl - bool ret = self->displayControl; - int num_ret = olua_push_bool(L, ret); + // int getFadeOutMode() + int ret = self->getFadeOutMode(); + int num_ret = olua_push_integer(L, ret); olua_endinvoke(L); return num_ret; } -static int _dragonBones_AnimationConfig_set_displayControl(lua_State *L) +static int _olua_fun_dragonBones_AnimationConfig_getFadeOutTweenType(lua_State *L) { olua_startinvoke(L); dragonBones::AnimationConfig *self = nullptr; - bool arg1 = false; /** displayControl */ olua_to_object(L, 1, &self, "db.AnimationConfig"); - olua_check_bool(L, 2, &arg1); - // bool displayControl - self->displayControl = arg1; + // int getFadeOutTweenType() + int ret = self->getFadeOutTweenType(); + int num_ret = olua_push_integer(L, ret); olua_endinvoke(L); - return 0; + return num_ret; } -static int _dragonBones_AnimationConfig_get_duration(lua_State *L) +static int _olua_fun_dragonBones_AnimationConfig_getTypeIndex(lua_State *L) { olua_startinvoke(L); - dragonBones::AnimationConfig *self = nullptr; - - olua_to_object(L, 1, &self, "db.AnimationConfig"); - - // float duration - float ret = self->duration; - int num_ret = olua_push_number(L, ret); + // static std::size_t getTypeIndex() + std::size_t ret = dragonBones::AnimationConfig::getTypeIndex(); + int num_ret = olua_push_integer(L, ret); olua_endinvoke(L); return num_ret; } -static int _dragonBones_AnimationConfig_set_duration(lua_State *L) +static int _olua_fun_dragonBones_AnimationConfig_group$1(lua_State *L) { olua_startinvoke(L); dragonBones::AnimationConfig *self = nullptr; - float arg1 = 0; /** duration */ olua_to_object(L, 1, &self, "db.AnimationConfig"); - olua_check_number(L, 2, &arg1); - // float duration - self->duration = arg1; + // std::string group + std::string ret = self->group; + int num_ret = olua_push_string(L, ret); olua_endinvoke(L); - return 0; + return num_ret; } -static int _dragonBones_AnimationConfig_get_fadeInTime(lua_State *L) +static int _olua_fun_dragonBones_AnimationConfig_group$2(lua_State *L) { olua_startinvoke(L); dragonBones::AnimationConfig *self = nullptr; + std::string arg1; /** group */ olua_to_object(L, 1, &self, "db.AnimationConfig"); + olua_check_string(L, 2, &arg1); - // float fadeInTime - float ret = self->fadeInTime; - int num_ret = olua_push_number(L, ret); + // std::string group + self->group = arg1; olua_endinvoke(L); - return num_ret; + return 0; } -static int _dragonBones_AnimationConfig_set_fadeInTime(lua_State *L) +static int _olua_fun_dragonBones_AnimationConfig_group(lua_State *L) { - olua_startinvoke(L); - - dragonBones::AnimationConfig *self = nullptr; - float arg1 = 0; /** fadeInTime */ + int num_args = lua_gettop(L) - 1; - olua_to_object(L, 1, &self, "db.AnimationConfig"); - olua_check_number(L, 2, &arg1); + if (num_args == 0) { + // std::string group + return _olua_fun_dragonBones_AnimationConfig_group$1(L); + } - // float fadeInTime - self->fadeInTime = arg1; + if (num_args == 1) { + // if ((olua_is_string(L, 2))) { + // std::string group + return _olua_fun_dragonBones_AnimationConfig_group$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'dragonBones::AnimationConfig::group' not support '%d' arguments", num_args); return 0; } -static int _dragonBones_AnimationConfig_get_fadeInTweenType(lua_State *L) +static int _olua_fun_dragonBones_AnimationConfig_layer$1(lua_State *L) { olua_startinvoke(L); @@ -10869,34 +14387,55 @@ static int _dragonBones_AnimationConfig_get_fadeInTweenType(lua_State *L) olua_to_object(L, 1, &self, "db.AnimationConfig"); - // dragonBones::TweenType fadeInTweenType - dragonBones::TweenType ret = self->fadeInTweenType; - int num_ret = olua_push_enum(L, ret); + // int layer + int ret = self->layer; + int num_ret = olua_push_integer(L, ret); olua_endinvoke(L); return num_ret; } -static int _dragonBones_AnimationConfig_set_fadeInTweenType(lua_State *L) +static int _olua_fun_dragonBones_AnimationConfig_layer$2(lua_State *L) { olua_startinvoke(L); dragonBones::AnimationConfig *self = nullptr; - dragonBones::TweenType arg1 = (dragonBones::TweenType)0; /** fadeInTweenType */ + int arg1 = 0; /** layer */ olua_to_object(L, 1, &self, "db.AnimationConfig"); - olua_check_enum(L, 2, &arg1); + olua_check_integer(L, 2, &arg1); - // dragonBones::TweenType fadeInTweenType - self->fadeInTweenType = arg1; + // int layer + self->layer = arg1; olua_endinvoke(L); return 0; } -static int _dragonBones_AnimationConfig_get_fadeOutMode(lua_State *L) +static int _olua_fun_dragonBones_AnimationConfig_layer(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // int layer + return _olua_fun_dragonBones_AnimationConfig_layer$1(L); + } + + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // int layer + return _olua_fun_dragonBones_AnimationConfig_layer$2(L); + // } + } + + luaL_error(L, "method 'dragonBones::AnimationConfig::layer' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_dragonBones_AnimationConfig_name$1(lua_State *L) { olua_startinvoke(L); @@ -10904,104 +14443,125 @@ static int _dragonBones_AnimationConfig_get_fadeOutMode(lua_State *L) olua_to_object(L, 1, &self, "db.AnimationConfig"); - // dragonBones::AnimationFadeOutMode fadeOutMode - dragonBones::AnimationFadeOutMode ret = self->fadeOutMode; - int num_ret = olua_push_enum(L, ret); + // std::string name + std::string ret = self->name; + int num_ret = olua_push_string(L, ret); olua_endinvoke(L); return num_ret; } -static int _dragonBones_AnimationConfig_set_fadeOutMode(lua_State *L) +static int _olua_fun_dragonBones_AnimationConfig_name$2(lua_State *L) { olua_startinvoke(L); dragonBones::AnimationConfig *self = nullptr; - dragonBones::AnimationFadeOutMode arg1 = (dragonBones::AnimationFadeOutMode)0; /** fadeOutMode */ + std::string arg1; /** name */ olua_to_object(L, 1, &self, "db.AnimationConfig"); - olua_check_enum(L, 2, &arg1); + olua_check_string(L, 2, &arg1); - // dragonBones::AnimationFadeOutMode fadeOutMode - self->fadeOutMode = arg1; + // std::string name + self->name = arg1; olua_endinvoke(L); return 0; } -static int _dragonBones_AnimationConfig_get_fadeOutTime(lua_State *L) +static int _olua_fun_dragonBones_AnimationConfig_name(lua_State *L) { - olua_startinvoke(L); + int num_args = lua_gettop(L) - 1; - dragonBones::AnimationConfig *self = nullptr; + if (num_args == 0) { + // std::string name + return _olua_fun_dragonBones_AnimationConfig_name$1(L); + } - olua_to_object(L, 1, &self, "db.AnimationConfig"); + if (num_args == 1) { + // if ((olua_is_string(L, 2))) { + // std::string name + return _olua_fun_dragonBones_AnimationConfig_name$2(L); + // } + } - // float fadeOutTime - float ret = self->fadeOutTime; - int num_ret = olua_push_number(L, ret); + luaL_error(L, "method 'dragonBones::AnimationConfig::name' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_dragonBones_AnimationConfig_new(lua_State *L) +{ + olua_startinvoke(L); + + // dragonBones::AnimationConfig() + dragonBones::AnimationConfig *ret = new dragonBones::AnimationConfig(); + int num_ret = olua_push_object(L, ret, "db.AnimationConfig"); + olua_postnew(L, ret); olua_endinvoke(L); return num_ret; } -static int _dragonBones_AnimationConfig_set_fadeOutTime(lua_State *L) +static int _olua_fun_dragonBones_AnimationConfig_pauseFadeIn$1(lua_State *L) { olua_startinvoke(L); dragonBones::AnimationConfig *self = nullptr; - float arg1 = 0; /** fadeOutTime */ olua_to_object(L, 1, &self, "db.AnimationConfig"); - olua_check_number(L, 2, &arg1); - // float fadeOutTime - self->fadeOutTime = arg1; + // bool pauseFadeIn + bool ret = self->pauseFadeIn; + int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); - return 0; + return num_ret; } -static int _dragonBones_AnimationConfig_get_fadeOutTweenType(lua_State *L) +static int _olua_fun_dragonBones_AnimationConfig_pauseFadeIn$2(lua_State *L) { olua_startinvoke(L); dragonBones::AnimationConfig *self = nullptr; + bool arg1 = false; /** pauseFadeIn */ olua_to_object(L, 1, &self, "db.AnimationConfig"); + olua_check_bool(L, 2, &arg1); - // dragonBones::TweenType fadeOutTweenType - dragonBones::TweenType ret = self->fadeOutTweenType; - int num_ret = olua_push_enum(L, ret); + // bool pauseFadeIn + self->pauseFadeIn = arg1; olua_endinvoke(L); - return num_ret; + return 0; } -static int _dragonBones_AnimationConfig_set_fadeOutTweenType(lua_State *L) +static int _olua_fun_dragonBones_AnimationConfig_pauseFadeIn(lua_State *L) { - olua_startinvoke(L); - - dragonBones::AnimationConfig *self = nullptr; - dragonBones::TweenType arg1 = (dragonBones::TweenType)0; /** fadeOutTweenType */ + int num_args = lua_gettop(L) - 1; - olua_to_object(L, 1, &self, "db.AnimationConfig"); - olua_check_enum(L, 2, &arg1); + if (num_args == 0) { + // bool pauseFadeIn + return _olua_fun_dragonBones_AnimationConfig_pauseFadeIn$1(L); + } - // dragonBones::TweenType fadeOutTweenType - self->fadeOutTweenType = arg1; + if (num_args == 1) { + // if ((olua_is_bool(L, 2))) { + // bool pauseFadeIn + return _olua_fun_dragonBones_AnimationConfig_pauseFadeIn$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'dragonBones::AnimationConfig::pauseFadeIn' not support '%d' arguments", num_args); return 0; } -static int _dragonBones_AnimationConfig_get_group(lua_State *L) +static int _olua_fun_dragonBones_AnimationConfig_pauseFadeOut$1(lua_State *L) { olua_startinvoke(L); @@ -11009,104 +14569,111 @@ static int _dragonBones_AnimationConfig_get_group(lua_State *L) olua_to_object(L, 1, &self, "db.AnimationConfig"); - // std::string group - std::string ret = self->group; - int num_ret = olua_push_string(L, ret); + // bool pauseFadeOut + bool ret = self->pauseFadeOut; + int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); return num_ret; } -static int _dragonBones_AnimationConfig_set_group(lua_State *L) +static int _olua_fun_dragonBones_AnimationConfig_pauseFadeOut$2(lua_State *L) { olua_startinvoke(L); dragonBones::AnimationConfig *self = nullptr; - std::string arg1; /** group */ + bool arg1 = false; /** pauseFadeOut */ olua_to_object(L, 1, &self, "db.AnimationConfig"); - olua_check_string(L, 2, &arg1); + olua_check_bool(L, 2, &arg1); - // std::string group - self->group = arg1; + // bool pauseFadeOut + self->pauseFadeOut = arg1; olua_endinvoke(L); return 0; } -static int _dragonBones_AnimationConfig_get_layer(lua_State *L) +static int _olua_fun_dragonBones_AnimationConfig_pauseFadeOut(lua_State *L) { - olua_startinvoke(L); - - dragonBones::AnimationConfig *self = nullptr; + int num_args = lua_gettop(L) - 1; - olua_to_object(L, 1, &self, "db.AnimationConfig"); + if (num_args == 0) { + // bool pauseFadeOut + return _olua_fun_dragonBones_AnimationConfig_pauseFadeOut$1(L); + } - // int layer - int ret = self->layer; - int num_ret = olua_push_integer(L, ret); + if (num_args == 1) { + // if ((olua_is_bool(L, 2))) { + // bool pauseFadeOut + return _olua_fun_dragonBones_AnimationConfig_pauseFadeOut$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'dragonBones::AnimationConfig::pauseFadeOut' not support '%d' arguments", num_args); - return num_ret; + return 0; } -static int _dragonBones_AnimationConfig_set_layer(lua_State *L) +static int _olua_fun_dragonBones_AnimationConfig_playTimes$1(lua_State *L) { olua_startinvoke(L); dragonBones::AnimationConfig *self = nullptr; - int arg1 = 0; /** layer */ olua_to_object(L, 1, &self, "db.AnimationConfig"); - olua_check_integer(L, 2, &arg1); - // int layer - self->layer = arg1; + // int playTimes + int ret = self->playTimes; + int num_ret = olua_push_integer(L, ret); olua_endinvoke(L); - return 0; + return num_ret; } -static int _dragonBones_AnimationConfig_get_name(lua_State *L) +static int _olua_fun_dragonBones_AnimationConfig_playTimes$2(lua_State *L) { olua_startinvoke(L); dragonBones::AnimationConfig *self = nullptr; + int arg1 = 0; /** playTimes */ olua_to_object(L, 1, &self, "db.AnimationConfig"); + olua_check_integer(L, 2, &arg1); - // std::string name - std::string ret = self->name; - int num_ret = olua_push_string(L, ret); + // int playTimes + self->playTimes = arg1; olua_endinvoke(L); - return num_ret; + return 0; } -static int _dragonBones_AnimationConfig_set_name(lua_State *L) +static int _olua_fun_dragonBones_AnimationConfig_playTimes(lua_State *L) { - olua_startinvoke(L); - - dragonBones::AnimationConfig *self = nullptr; - std::string arg1; /** name */ + int num_args = lua_gettop(L) - 1; - olua_to_object(L, 1, &self, "db.AnimationConfig"); - olua_check_string(L, 2, &arg1); + if (num_args == 0) { + // int playTimes + return _olua_fun_dragonBones_AnimationConfig_playTimes$1(L); + } - // std::string name - self->name = arg1; + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // int playTimes + return _olua_fun_dragonBones_AnimationConfig_playTimes$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'dragonBones::AnimationConfig::playTimes' not support '%d' arguments", num_args); return 0; } -static int _dragonBones_AnimationConfig_get_pauseFadeIn(lua_State *L) +static int _olua_fun_dragonBones_AnimationConfig_position$1(lua_State *L) { olua_startinvoke(L); @@ -11114,69 +14681,77 @@ static int _dragonBones_AnimationConfig_get_pauseFadeIn(lua_State *L) olua_to_object(L, 1, &self, "db.AnimationConfig"); - // bool pauseFadeIn - bool ret = self->pauseFadeIn; - int num_ret = olua_push_bool(L, ret); + // float position + float ret = self->position; + int num_ret = olua_push_number(L, ret); olua_endinvoke(L); return num_ret; } -static int _dragonBones_AnimationConfig_set_pauseFadeIn(lua_State *L) +static int _olua_fun_dragonBones_AnimationConfig_position$2(lua_State *L) { olua_startinvoke(L); dragonBones::AnimationConfig *self = nullptr; - bool arg1 = false; /** pauseFadeIn */ + float arg1 = 0; /** position */ olua_to_object(L, 1, &self, "db.AnimationConfig"); - olua_check_bool(L, 2, &arg1); + olua_check_number(L, 2, &arg1); - // bool pauseFadeIn - self->pauseFadeIn = arg1; + // float position + self->position = arg1; olua_endinvoke(L); return 0; } -static int _dragonBones_AnimationConfig_get_pauseFadeOut(lua_State *L) +static int _olua_fun_dragonBones_AnimationConfig_position(lua_State *L) { - olua_startinvoke(L); - - dragonBones::AnimationConfig *self = nullptr; + int num_args = lua_gettop(L) - 1; - olua_to_object(L, 1, &self, "db.AnimationConfig"); + if (num_args == 0) { + // float position + return _olua_fun_dragonBones_AnimationConfig_position$1(L); + } - // bool pauseFadeOut - bool ret = self->pauseFadeOut; - int num_ret = olua_push_bool(L, ret); + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float position + return _olua_fun_dragonBones_AnimationConfig_position$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'dragonBones::AnimationConfig::position' not support '%d' arguments", num_args); - return num_ret; + return 0; } -static int _dragonBones_AnimationConfig_set_pauseFadeOut(lua_State *L) +static int _olua_fun_dragonBones_AnimationConfig_removeBoneMask(lua_State *L) { olua_startinvoke(L); dragonBones::AnimationConfig *self = nullptr; - bool arg1 = false; /** pauseFadeOut */ + dragonBones::Armature *arg1 = nullptr; /** armature */ + std::string arg2; /** boneName */ + bool arg3 = false; /** recursive */ olua_to_object(L, 1, &self, "db.AnimationConfig"); - olua_check_bool(L, 2, &arg1); + olua_check_object(L, 2, &arg1, "db.Armature"); + olua_check_string(L, 3, &arg2); + olua_check_bool(L, 4, &arg3); - // bool pauseFadeOut - self->pauseFadeOut = arg1; + // void removeBoneMask(dragonBones::Armature *armature, const std::string &boneName, bool recursive) + self->removeBoneMask(arg1, arg2, arg3); olua_endinvoke(L); return 0; } -static int _dragonBones_AnimationConfig_get_playTimes(lua_State *L) +static int _olua_fun_dragonBones_AnimationConfig_resetToPose$1(lua_State *L) { olua_startinvoke(L); @@ -11184,104 +14759,109 @@ static int _dragonBones_AnimationConfig_get_playTimes(lua_State *L) olua_to_object(L, 1, &self, "db.AnimationConfig"); - // int playTimes - int ret = self->playTimes; - int num_ret = olua_push_integer(L, ret); + // bool resetToPose + bool ret = self->resetToPose; + int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); return num_ret; } -static int _dragonBones_AnimationConfig_set_playTimes(lua_State *L) +static int _olua_fun_dragonBones_AnimationConfig_resetToPose$2(lua_State *L) { olua_startinvoke(L); dragonBones::AnimationConfig *self = nullptr; - int arg1 = 0; /** playTimes */ + bool arg1 = false; /** resetToPose */ olua_to_object(L, 1, &self, "db.AnimationConfig"); - olua_check_integer(L, 2, &arg1); + olua_check_bool(L, 2, &arg1); - // int playTimes - self->playTimes = arg1; + // bool resetToPose + self->resetToPose = arg1; olua_endinvoke(L); return 0; } -static int _dragonBones_AnimationConfig_get_position(lua_State *L) +static int _olua_fun_dragonBones_AnimationConfig_resetToPose(lua_State *L) { - olua_startinvoke(L); - - dragonBones::AnimationConfig *self = nullptr; + int num_args = lua_gettop(L) - 1; - olua_to_object(L, 1, &self, "db.AnimationConfig"); + if (num_args == 0) { + // bool resetToPose + return _olua_fun_dragonBones_AnimationConfig_resetToPose$1(L); + } - // float position - float ret = self->position; - int num_ret = olua_push_number(L, ret); + if (num_args == 1) { + // if ((olua_is_bool(L, 2))) { + // bool resetToPose + return _olua_fun_dragonBones_AnimationConfig_resetToPose$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'dragonBones::AnimationConfig::resetToPose' not support '%d' arguments", num_args); - return num_ret; + return 0; } -static int _dragonBones_AnimationConfig_set_position(lua_State *L) +static int _olua_fun_dragonBones_AnimationConfig_setFadeInTweenType(lua_State *L) { olua_startinvoke(L); dragonBones::AnimationConfig *self = nullptr; - float arg1 = 0; /** position */ + int arg1 = 0; /** value */ olua_to_object(L, 1, &self, "db.AnimationConfig"); - olua_check_number(L, 2, &arg1); + olua_check_integer(L, 2, &arg1); - // float position - self->position = arg1; + // void setFadeInTweenType(int value) + self->setFadeInTweenType(arg1); olua_endinvoke(L); return 0; } -static int _dragonBones_AnimationConfig_get_resetToPose(lua_State *L) +static int _olua_fun_dragonBones_AnimationConfig_setFadeOutMode(lua_State *L) { olua_startinvoke(L); dragonBones::AnimationConfig *self = nullptr; + int arg1 = 0; /** value */ olua_to_object(L, 1, &self, "db.AnimationConfig"); + olua_check_integer(L, 2, &arg1); - // bool resetToPose - bool ret = self->resetToPose; - int num_ret = olua_push_bool(L, ret); + // void setFadeOutMode(int value) + self->setFadeOutMode(arg1); olua_endinvoke(L); - return num_ret; + return 0; } -static int _dragonBones_AnimationConfig_set_resetToPose(lua_State *L) +static int _olua_fun_dragonBones_AnimationConfig_setFadeOutTweenType(lua_State *L) { olua_startinvoke(L); dragonBones::AnimationConfig *self = nullptr; - bool arg1 = false; /** resetToPose */ + int arg1 = 0; /** value */ olua_to_object(L, 1, &self, "db.AnimationConfig"); - olua_check_bool(L, 2, &arg1); + olua_check_integer(L, 2, &arg1); - // bool resetToPose - self->resetToPose = arg1; + // void setFadeOutTweenType(int value) + self->setFadeOutTweenType(arg1); olua_endinvoke(L); return 0; } -static int _dragonBones_AnimationConfig_get_timeScale(lua_State *L) +static int _olua_fun_dragonBones_AnimationConfig_timeScale$1(lua_State *L) { olua_startinvoke(L); @@ -11298,7 +14878,7 @@ static int _dragonBones_AnimationConfig_get_timeScale(lua_State *L) return num_ret; } -static int _dragonBones_AnimationConfig_set_timeScale(lua_State *L) +static int _olua_fun_dragonBones_AnimationConfig_timeScale$2(lua_State *L) { olua_startinvoke(L); @@ -11316,7 +14896,28 @@ static int _dragonBones_AnimationConfig_set_timeScale(lua_State *L) return 0; } -static int _dragonBones_AnimationConfig_get_weight(lua_State *L) +static int _olua_fun_dragonBones_AnimationConfig_timeScale(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float timeScale + return _olua_fun_dragonBones_AnimationConfig_timeScale$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float timeScale + return _olua_fun_dragonBones_AnimationConfig_timeScale$2(L); + // } + } + + luaL_error(L, "method 'dragonBones::AnimationConfig::timeScale' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_dragonBones_AnimationConfig_weight$1(lua_State *L) { olua_startinvoke(L); @@ -11333,7 +14934,7 @@ static int _dragonBones_AnimationConfig_get_weight(lua_State *L) return num_ret; } -static int _dragonBones_AnimationConfig_set_weight(lua_State *L) +static int _olua_fun_dragonBones_AnimationConfig_weight$2(lua_State *L) { olua_startinvoke(L); @@ -11351,173 +14952,100 @@ static int _dragonBones_AnimationConfig_set_weight(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_dragonBones_AnimationConfig(lua_State *L) -{ - oluacls_class(L, "db.AnimationConfig"); - oluacls_func(L, "addBoneMask", _dragonBones_AnimationConfig_addBoneMask); - oluacls_func(L, "clear", _dragonBones_AnimationConfig_clear); - oluacls_func(L, "containsBoneMask", _dragonBones_AnimationConfig_containsBoneMask); - oluacls_func(L, "copyFrom", _dragonBones_AnimationConfig_copyFrom); - oluacls_func(L, "getFadeInTweenType", _dragonBones_AnimationConfig_getFadeInTweenType); - oluacls_func(L, "getFadeOutMode", _dragonBones_AnimationConfig_getFadeOutMode); - oluacls_func(L, "getFadeOutTweenType", _dragonBones_AnimationConfig_getFadeOutTweenType); - oluacls_func(L, "getTypeIndex", _dragonBones_AnimationConfig_getTypeIndex); - oluacls_func(L, "new", _dragonBones_AnimationConfig_new); - oluacls_func(L, "removeBoneMask", _dragonBones_AnimationConfig_removeBoneMask); - oluacls_func(L, "setFadeInTweenType", _dragonBones_AnimationConfig_setFadeInTweenType); - oluacls_func(L, "setFadeOutMode", _dragonBones_AnimationConfig_setFadeOutMode); - oluacls_func(L, "setFadeOutTweenType", _dragonBones_AnimationConfig_setFadeOutTweenType); - oluacls_prop(L, "fadeInTweenType", _dragonBones_AnimationConfig_getFadeInTweenType, _dragonBones_AnimationConfig_setFadeInTweenType); - oluacls_prop(L, "fadeOutMode", _dragonBones_AnimationConfig_getFadeOutMode, _dragonBones_AnimationConfig_setFadeOutMode); - oluacls_prop(L, "fadeOutTweenType", _dragonBones_AnimationConfig_getFadeOutTweenType, _dragonBones_AnimationConfig_setFadeOutTweenType); - oluacls_prop(L, "typeIndex", _dragonBones_AnimationConfig_getTypeIndex, nullptr); - oluacls_prop(L, "actionEnabled", _dragonBones_AnimationConfig_get_actionEnabled, _dragonBones_AnimationConfig_set_actionEnabled); - oluacls_prop(L, "additiveBlending", _dragonBones_AnimationConfig_get_additiveBlending, _dragonBones_AnimationConfig_set_additiveBlending); - oluacls_prop(L, "animation", _dragonBones_AnimationConfig_get_animation, _dragonBones_AnimationConfig_set_animation); - oluacls_prop(L, "autoFadeOutTime", _dragonBones_AnimationConfig_get_autoFadeOutTime, _dragonBones_AnimationConfig_set_autoFadeOutTime); - oluacls_prop(L, "boneMask", _dragonBones_AnimationConfig_get_boneMask, _dragonBones_AnimationConfig_set_boneMask); - oluacls_prop(L, "displayControl", _dragonBones_AnimationConfig_get_displayControl, _dragonBones_AnimationConfig_set_displayControl); - oluacls_prop(L, "duration", _dragonBones_AnimationConfig_get_duration, _dragonBones_AnimationConfig_set_duration); - oluacls_prop(L, "fadeInTime", _dragonBones_AnimationConfig_get_fadeInTime, _dragonBones_AnimationConfig_set_fadeInTime); - oluacls_prop(L, "fadeInTweenType", _dragonBones_AnimationConfig_get_fadeInTweenType, _dragonBones_AnimationConfig_set_fadeInTweenType); - oluacls_prop(L, "fadeOutMode", _dragonBones_AnimationConfig_get_fadeOutMode, _dragonBones_AnimationConfig_set_fadeOutMode); - oluacls_prop(L, "fadeOutTime", _dragonBones_AnimationConfig_get_fadeOutTime, _dragonBones_AnimationConfig_set_fadeOutTime); - oluacls_prop(L, "fadeOutTweenType", _dragonBones_AnimationConfig_get_fadeOutTweenType, _dragonBones_AnimationConfig_set_fadeOutTweenType); - oluacls_prop(L, "group", _dragonBones_AnimationConfig_get_group, _dragonBones_AnimationConfig_set_group); - oluacls_prop(L, "layer", _dragonBones_AnimationConfig_get_layer, _dragonBones_AnimationConfig_set_layer); - oluacls_prop(L, "name", _dragonBones_AnimationConfig_get_name, _dragonBones_AnimationConfig_set_name); - oluacls_prop(L, "pauseFadeIn", _dragonBones_AnimationConfig_get_pauseFadeIn, _dragonBones_AnimationConfig_set_pauseFadeIn); - oluacls_prop(L, "pauseFadeOut", _dragonBones_AnimationConfig_get_pauseFadeOut, _dragonBones_AnimationConfig_set_pauseFadeOut); - oluacls_prop(L, "playTimes", _dragonBones_AnimationConfig_get_playTimes, _dragonBones_AnimationConfig_set_playTimes); - oluacls_prop(L, "position", _dragonBones_AnimationConfig_get_position, _dragonBones_AnimationConfig_set_position); - oluacls_prop(L, "resetToPose", _dragonBones_AnimationConfig_get_resetToPose, _dragonBones_AnimationConfig_set_resetToPose); - oluacls_prop(L, "timeScale", _dragonBones_AnimationConfig_get_timeScale, _dragonBones_AnimationConfig_set_timeScale); - oluacls_prop(L, "weight", _dragonBones_AnimationConfig_get_weight, _dragonBones_AnimationConfig_set_weight); - - return 1; -} -OLUA_END_DECLS - -static int _dragonBones_DragonBonesData_addArmature(lua_State *L) +static int _olua_fun_dragonBones_AnimationConfig_weight(lua_State *L) { - olua_startinvoke(L); - - dragonBones::DragonBonesData *self = nullptr; - dragonBones::ArmatureData *arg1 = nullptr; /** value */ + int num_args = lua_gettop(L) - 1; - olua_to_object(L, 1, &self, "db.DragonBonesData"); - olua_check_object(L, 2, &arg1, "db.ArmatureData"); + if (num_args == 0) { + // float weight + return _olua_fun_dragonBones_AnimationConfig_weight$1(L); + } - // void addArmature(dragonBones::ArmatureData *value) - self->addArmature(arg1); + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float weight + return _olua_fun_dragonBones_AnimationConfig_weight$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'dragonBones::AnimationConfig::weight' not support '%d' arguments", num_args); return 0; } -static int _dragonBones_DragonBonesData_getArmature(lua_State *L) -{ - olua_startinvoke(L); - - dragonBones::DragonBonesData *self = nullptr; - std::string arg1; /** armatureName */ - - olua_to_object(L, 1, &self, "db.DragonBonesData"); - olua_check_string(L, 2, &arg1); - - // dragonBones::ArmatureData *getArmature(const std::string &armatureName) - dragonBones::ArmatureData *ret = self->getArmature(arg1); - int num_ret = olua_push_object(L, ret, "db.ArmatureData"); - - olua_endinvoke(L); - - return num_ret; -} - -static int _dragonBones_DragonBonesData_getArmatureNames(lua_State *L) -{ - olua_startinvoke(L); - - dragonBones::DragonBonesData *self = nullptr; - - olua_to_object(L, 1, &self, "db.DragonBonesData"); - - // const std::vector &getArmatureNames() - const std::vector &ret = self->getArmatureNames(); - int num_ret = olua_push_array(L, ret, [L](std::string &arg1) { - olua_push_string(L, arg1); - }); - - olua_endinvoke(L); - - return num_ret; -} - -static int _dragonBones_DragonBonesData_getTypeIndex(lua_State *L) -{ - olua_startinvoke(L); - - // static std::size_t getTypeIndex() - std::size_t ret = dragonBones::DragonBonesData::getTypeIndex(); - int num_ret = olua_push_integer(L, ret); - - olua_endinvoke(L); - - return num_ret; -} - -static int _dragonBones_DragonBonesData_getUserData(lua_State *L) +static int _olua_cls_db_AnimationConfig(lua_State *L) { - olua_startinvoke(L); - - dragonBones::DragonBonesData *self = nullptr; - - olua_to_object(L, 1, &self, "db.DragonBonesData"); - - // const dragonBones::UserData *getUserData() - const dragonBones::UserData *ret = self->getUserData(); - int num_ret = olua_push_object(L, ret, "db.UserData"); - - olua_endinvoke(L); + oluacls_class(L, "db.AnimationConfig"); + oluacls_func(L, "addBoneMask", _olua_fun_dragonBones_AnimationConfig_addBoneMask); + oluacls_func(L, "clear", _olua_fun_dragonBones_AnimationConfig_clear); + oluacls_func(L, "containsBoneMask", _olua_fun_dragonBones_AnimationConfig_containsBoneMask); + oluacls_func(L, "copyFrom", _olua_fun_dragonBones_AnimationConfig_copyFrom); + oluacls_func(L, "getFadeInTweenType", _olua_fun_dragonBones_AnimationConfig_getFadeInTweenType); + oluacls_func(L, "getFadeOutMode", _olua_fun_dragonBones_AnimationConfig_getFadeOutMode); + oluacls_func(L, "getFadeOutTweenType", _olua_fun_dragonBones_AnimationConfig_getFadeOutTweenType); + oluacls_func(L, "getTypeIndex", _olua_fun_dragonBones_AnimationConfig_getTypeIndex); + oluacls_func(L, "new", _olua_fun_dragonBones_AnimationConfig_new); + oluacls_func(L, "removeBoneMask", _olua_fun_dragonBones_AnimationConfig_removeBoneMask); + oluacls_func(L, "setFadeInTweenType", _olua_fun_dragonBones_AnimationConfig_setFadeInTweenType); + oluacls_func(L, "setFadeOutMode", _olua_fun_dragonBones_AnimationConfig_setFadeOutMode); + oluacls_func(L, "setFadeOutTweenType", _olua_fun_dragonBones_AnimationConfig_setFadeOutTweenType); + oluacls_prop(L, "typeIndex", _olua_fun_dragonBones_AnimationConfig_getTypeIndex, nullptr); + oluacls_prop(L, "actionEnabled", _olua_fun_dragonBones_AnimationConfig_actionEnabled, _olua_fun_dragonBones_AnimationConfig_actionEnabled); + oluacls_prop(L, "additiveBlending", _olua_fun_dragonBones_AnimationConfig_additiveBlending, _olua_fun_dragonBones_AnimationConfig_additiveBlending); + oluacls_prop(L, "animation", _olua_fun_dragonBones_AnimationConfig_animation, _olua_fun_dragonBones_AnimationConfig_animation); + oluacls_prop(L, "autoFadeOutTime", _olua_fun_dragonBones_AnimationConfig_autoFadeOutTime, _olua_fun_dragonBones_AnimationConfig_autoFadeOutTime); + oluacls_prop(L, "boneMask", _olua_fun_dragonBones_AnimationConfig_boneMask, _olua_fun_dragonBones_AnimationConfig_boneMask); + oluacls_prop(L, "displayControl", _olua_fun_dragonBones_AnimationConfig_displayControl, _olua_fun_dragonBones_AnimationConfig_displayControl); + oluacls_prop(L, "duration", _olua_fun_dragonBones_AnimationConfig_duration, _olua_fun_dragonBones_AnimationConfig_duration); + oluacls_prop(L, "fadeInTime", _olua_fun_dragonBones_AnimationConfig_fadeInTime, _olua_fun_dragonBones_AnimationConfig_fadeInTime); + oluacls_prop(L, "fadeInTweenType", _olua_fun_dragonBones_AnimationConfig_fadeInTweenType, _olua_fun_dragonBones_AnimationConfig_fadeInTweenType); + oluacls_prop(L, "fadeOutMode", _olua_fun_dragonBones_AnimationConfig_fadeOutMode, _olua_fun_dragonBones_AnimationConfig_fadeOutMode); + oluacls_prop(L, "fadeOutTime", _olua_fun_dragonBones_AnimationConfig_fadeOutTime, _olua_fun_dragonBones_AnimationConfig_fadeOutTime); + oluacls_prop(L, "fadeOutTweenType", _olua_fun_dragonBones_AnimationConfig_fadeOutTweenType, _olua_fun_dragonBones_AnimationConfig_fadeOutTweenType); + oluacls_prop(L, "group", _olua_fun_dragonBones_AnimationConfig_group, _olua_fun_dragonBones_AnimationConfig_group); + oluacls_prop(L, "layer", _olua_fun_dragonBones_AnimationConfig_layer, _olua_fun_dragonBones_AnimationConfig_layer); + oluacls_prop(L, "name", _olua_fun_dragonBones_AnimationConfig_name, _olua_fun_dragonBones_AnimationConfig_name); + oluacls_prop(L, "pauseFadeIn", _olua_fun_dragonBones_AnimationConfig_pauseFadeIn, _olua_fun_dragonBones_AnimationConfig_pauseFadeIn); + oluacls_prop(L, "pauseFadeOut", _olua_fun_dragonBones_AnimationConfig_pauseFadeOut, _olua_fun_dragonBones_AnimationConfig_pauseFadeOut); + oluacls_prop(L, "playTimes", _olua_fun_dragonBones_AnimationConfig_playTimes, _olua_fun_dragonBones_AnimationConfig_playTimes); + oluacls_prop(L, "position", _olua_fun_dragonBones_AnimationConfig_position, _olua_fun_dragonBones_AnimationConfig_position); + oluacls_prop(L, "resetToPose", _olua_fun_dragonBones_AnimationConfig_resetToPose, _olua_fun_dragonBones_AnimationConfig_resetToPose); + oluacls_prop(L, "timeScale", _olua_fun_dragonBones_AnimationConfig_timeScale, _olua_fun_dragonBones_AnimationConfig_timeScale); + oluacls_prop(L, "weight", _olua_fun_dragonBones_AnimationConfig_weight, _olua_fun_dragonBones_AnimationConfig_weight); - return num_ret; + return 1; } -static int _dragonBones_DragonBonesData_new(lua_State *L) +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_db_AnimationConfig(lua_State *L) { - olua_startinvoke(L); - - // DragonBonesData() - dragonBones::DragonBonesData *ret = new dragonBones::DragonBonesData(); - int num_ret = olua_push_object(L, ret, "db.DragonBonesData"); - olua_postnew(L, ret); - - olua_endinvoke(L); - - return num_ret; + olua_require(L, "dragonbones", luaopen_dragonbones); + if (!olua_getclass(L, "db.AnimationConfig")) { + luaL_error(L, "class not found: dragonBones::AnimationConfig"); + } + return 1; } +OLUA_END_DECLS -static int _dragonBones_DragonBonesData_setUserData(lua_State *L) +static int _olua_fun_dragonBones_DragonBonesData_addArmature(lua_State *L) { olua_startinvoke(L); dragonBones::DragonBonesData *self = nullptr; - dragonBones::UserData *arg1 = nullptr; /** value */ + dragonBones::ArmatureData *arg1 = nullptr; /** value */ olua_to_object(L, 1, &self, "db.DragonBonesData"); - olua_check_object(L, 2, &arg1, "db.UserData"); + olua_check_object(L, 2, &arg1, "db.ArmatureData"); - // void setUserData(dragonBones::UserData *value) - self->setUserData(arg1); + // void addArmature(dragonBones::ArmatureData *value) + self->addArmature(arg1); olua_endinvoke(L); return 0; } -static int _dragonBones_DragonBonesData_get_armatureNames(lua_State *L) +static int _olua_fun_dragonBones_DragonBonesData_armatureNames$1(lua_State *L) { olua_startinvoke(L); @@ -11536,7 +15064,7 @@ static int _dragonBones_DragonBonesData_get_armatureNames(lua_State *L) return num_ret; } -static int _dragonBones_DragonBonesData_set_armatureNames(lua_State *L) +static int _olua_fun_dragonBones_DragonBonesData_armatureNames$2(lua_State *L) { olua_startinvoke(L); @@ -11556,7 +15084,28 @@ static int _dragonBones_DragonBonesData_set_armatureNames(lua_State *L) return 0; } -static int _dragonBones_DragonBonesData_get_armatures(lua_State *L) +static int _olua_fun_dragonBones_DragonBonesData_armatureNames(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // std::vector armatureNames + return _olua_fun_dragonBones_DragonBonesData_armatureNames$1(L); + } + + if (num_args == 1) { + // if ((olua_is_array(L, 2))) { + // std::vector armatureNames + return _olua_fun_dragonBones_DragonBonesData_armatureNames$2(L); + // } + } + + luaL_error(L, "method 'dragonBones::DragonBonesData::armatureNames' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_dragonBones_DragonBonesData_armatures$1(lua_State *L) { olua_startinvoke(L); @@ -11576,7 +15125,7 @@ static int _dragonBones_DragonBonesData_get_armatures(lua_State *L) return num_ret; } -static int _dragonBones_DragonBonesData_set_armatures(lua_State *L) +static int _olua_fun_dragonBones_DragonBonesData_armatures$2(lua_State *L) { olua_startinvoke(L); @@ -11597,7 +15146,28 @@ static int _dragonBones_DragonBonesData_set_armatures(lua_State *L) return 0; } -static int _dragonBones_DragonBonesData_get_autoSearch(lua_State *L) +static int _olua_fun_dragonBones_DragonBonesData_armatures(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // std::map armatures + return _olua_fun_dragonBones_DragonBonesData_armatures$1(L); + } + + if (num_args == 1) { + // if ((olua_is_map(L, 2))) { + // std::map armatures + return _olua_fun_dragonBones_DragonBonesData_armatures$2(L); + // } + } + + luaL_error(L, "method 'dragonBones::DragonBonesData::armatures' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_dragonBones_DragonBonesData_autoSearch$1(lua_State *L) { olua_startinvoke(L); @@ -11614,7 +15184,7 @@ static int _dragonBones_DragonBonesData_get_autoSearch(lua_State *L) return num_ret; } -static int _dragonBones_DragonBonesData_set_autoSearch(lua_State *L) +static int _olua_fun_dragonBones_DragonBonesData_autoSearch$2(lua_State *L) { olua_startinvoke(L); @@ -11632,7 +15202,28 @@ static int _dragonBones_DragonBonesData_set_autoSearch(lua_State *L) return 0; } -static int _dragonBones_DragonBonesData_get_binary(lua_State *L) +static int _olua_fun_dragonBones_DragonBonesData_autoSearch(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // bool autoSearch + return _olua_fun_dragonBones_DragonBonesData_autoSearch$1(L); + } + + if (num_args == 1) { + // if ((olua_is_bool(L, 2))) { + // bool autoSearch + return _olua_fun_dragonBones_DragonBonesData_autoSearch$2(L); + // } + } + + luaL_error(L, "method 'dragonBones::DragonBonesData::autoSearch' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_dragonBones_DragonBonesData_binary$1(lua_State *L) { olua_startinvoke(L); @@ -11649,7 +15240,7 @@ static int _dragonBones_DragonBonesData_get_binary(lua_State *L) return num_ret; } -static int _dragonBones_DragonBonesData_set_binary(lua_State *L) +static int _olua_fun_dragonBones_DragonBonesData_binary$2(lua_State *L) { olua_startinvoke(L); @@ -11667,7 +15258,28 @@ static int _dragonBones_DragonBonesData_set_binary(lua_State *L) return 0; } -static int _dragonBones_DragonBonesData_get_cachedFrames(lua_State *L) +static int _olua_fun_dragonBones_DragonBonesData_binary(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // const char *binary + return _olua_fun_dragonBones_DragonBonesData_binary$1(L); + } + + if (num_args == 1) { + // if ((olua_is_string(L, 2))) { + // const char *binary + return _olua_fun_dragonBones_DragonBonesData_binary$2(L); + // } + } + + luaL_error(L, "method 'dragonBones::DragonBonesData::binary' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_dragonBones_DragonBonesData_cachedFrames$1(lua_State *L) { olua_startinvoke(L); @@ -11686,7 +15298,7 @@ static int _dragonBones_DragonBonesData_get_cachedFrames(lua_State *L) return num_ret; } -static int _dragonBones_DragonBonesData_set_cachedFrames(lua_State *L) +static int _olua_fun_dragonBones_DragonBonesData_cachedFrames$2(lua_State *L) { olua_startinvoke(L); @@ -11698,15 +15310,36 @@ static int _dragonBones_DragonBonesData_set_cachedFrames(lua_State *L) olua_check_number(L, -1, arg1); }); - // std::vector cachedFrames - self->cachedFrames = arg1; + // std::vector cachedFrames + self->cachedFrames = arg1; + + olua_endinvoke(L); + + return 0; +} + +static int _olua_fun_dragonBones_DragonBonesData_cachedFrames(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // std::vector cachedFrames + return _olua_fun_dragonBones_DragonBonesData_cachedFrames$1(L); + } - olua_endinvoke(L); + if (num_args == 1) { + // if ((olua_is_array(L, 2))) { + // std::vector cachedFrames + return _olua_fun_dragonBones_DragonBonesData_cachedFrames$2(L); + // } + } + + luaL_error(L, "method 'dragonBones::DragonBonesData::cachedFrames' not support '%d' arguments", num_args); return 0; } -static int _dragonBones_DragonBonesData_get_floatArray(lua_State *L) +static int _olua_fun_dragonBones_DragonBonesData_floatArray$1(lua_State *L) { olua_startinvoke(L); @@ -11716,14 +15349,14 @@ static int _dragonBones_DragonBonesData_get_floatArray(lua_State *L) // const float *floatArray const float *ret = self->floatArray; - int num_ret = olua_push_pointer(L, ret, "olua.float"); + int num_ret = olua_push_valueptr(L, ret, "olua.float"); olua_endinvoke(L); return num_ret; } -static int _dragonBones_DragonBonesData_set_floatArray(lua_State *L) +static int _olua_fun_dragonBones_DragonBonesData_floatArray$2(lua_State *L) { olua_startinvoke(L); @@ -11731,7 +15364,7 @@ static int _dragonBones_DragonBonesData_set_floatArray(lua_State *L) float *arg1 = nullptr; /** floatArray */ olua_to_object(L, 1, &self, "db.DragonBonesData"); - olua_check_pointer(L, 2, &arg1, "olua.float"); + olua_check_valueptr(L, 2, &arg1, "olua.float"); // const float *floatArray self->floatArray = arg1; @@ -11741,7 +15374,28 @@ static int _dragonBones_DragonBonesData_set_floatArray(lua_State *L) return 0; } -static int _dragonBones_DragonBonesData_get_frameArray(lua_State *L) +static int _olua_fun_dragonBones_DragonBonesData_floatArray(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // const float *floatArray + return _olua_fun_dragonBones_DragonBonesData_floatArray$1(L); + } + + if (num_args == 1) { + // if ((olua_is_valueptr(L, 2, "olua.float"))) { + // const float *floatArray + return _olua_fun_dragonBones_DragonBonesData_floatArray$2(L); + // } + } + + luaL_error(L, "method 'dragonBones::DragonBonesData::floatArray' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_dragonBones_DragonBonesData_frameArray$1(lua_State *L) { olua_startinvoke(L); @@ -11751,14 +15405,14 @@ static int _dragonBones_DragonBonesData_get_frameArray(lua_State *L) // const int16_t *frameArray const int16_t *ret = self->frameArray; - int num_ret = olua_push_pointer(L, ret, "olua.int16_t"); + int num_ret = olua_push_valueptr(L, ret, "olua.int16"); olua_endinvoke(L); return num_ret; } -static int _dragonBones_DragonBonesData_set_frameArray(lua_State *L) +static int _olua_fun_dragonBones_DragonBonesData_frameArray$2(lua_State *L) { olua_startinvoke(L); @@ -11766,7 +15420,7 @@ static int _dragonBones_DragonBonesData_set_frameArray(lua_State *L) int16_t *arg1 = nullptr; /** frameArray */ olua_to_object(L, 1, &self, "db.DragonBonesData"); - olua_check_pointer(L, 2, &arg1, "olua.int16_t"); + olua_check_valueptr(L, 2, &arg1, "olua.int16"); // const int16_t *frameArray self->frameArray = arg1; @@ -11776,7 +15430,28 @@ static int _dragonBones_DragonBonesData_set_frameArray(lua_State *L) return 0; } -static int _dragonBones_DragonBonesData_get_frameFloatArray(lua_State *L) +static int _olua_fun_dragonBones_DragonBonesData_frameArray(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // const int16_t *frameArray + return _olua_fun_dragonBones_DragonBonesData_frameArray$1(L); + } + + if (num_args == 1) { + // if ((olua_is_valueptr(L, 2, "olua.int16"))) { + // const int16_t *frameArray + return _olua_fun_dragonBones_DragonBonesData_frameArray$2(L); + // } + } + + luaL_error(L, "method 'dragonBones::DragonBonesData::frameArray' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_dragonBones_DragonBonesData_frameFloatArray$1(lua_State *L) { olua_startinvoke(L); @@ -11786,14 +15461,14 @@ static int _dragonBones_DragonBonesData_get_frameFloatArray(lua_State *L) // const float *frameFloatArray const float *ret = self->frameFloatArray; - int num_ret = olua_push_pointer(L, ret, "olua.float"); + int num_ret = olua_push_valueptr(L, ret, "olua.float"); olua_endinvoke(L); return num_ret; } -static int _dragonBones_DragonBonesData_set_frameFloatArray(lua_State *L) +static int _olua_fun_dragonBones_DragonBonesData_frameFloatArray$2(lua_State *L) { olua_startinvoke(L); @@ -11801,7 +15476,7 @@ static int _dragonBones_DragonBonesData_set_frameFloatArray(lua_State *L) float *arg1 = nullptr; /** frameFloatArray */ olua_to_object(L, 1, &self, "db.DragonBonesData"); - olua_check_pointer(L, 2, &arg1, "olua.float"); + olua_check_valueptr(L, 2, &arg1, "olua.float"); // const float *frameFloatArray self->frameFloatArray = arg1; @@ -11811,7 +15486,28 @@ static int _dragonBones_DragonBonesData_set_frameFloatArray(lua_State *L) return 0; } -static int _dragonBones_DragonBonesData_get_frameIndices(lua_State *L) +static int _olua_fun_dragonBones_DragonBonesData_frameFloatArray(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // const float *frameFloatArray + return _olua_fun_dragonBones_DragonBonesData_frameFloatArray$1(L); + } + + if (num_args == 1) { + // if ((olua_is_valueptr(L, 2, "olua.float"))) { + // const float *frameFloatArray + return _olua_fun_dragonBones_DragonBonesData_frameFloatArray$2(L); + // } + } + + luaL_error(L, "method 'dragonBones::DragonBonesData::frameFloatArray' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_dragonBones_DragonBonesData_frameIndices$1(lua_State *L) { olua_startinvoke(L); @@ -11830,7 +15526,7 @@ static int _dragonBones_DragonBonesData_get_frameIndices(lua_State *L) return num_ret; } -static int _dragonBones_DragonBonesData_set_frameIndices(lua_State *L) +static int _olua_fun_dragonBones_DragonBonesData_frameIndices$2(lua_State *L) { olua_startinvoke(L); @@ -11850,7 +15546,28 @@ static int _dragonBones_DragonBonesData_set_frameIndices(lua_State *L) return 0; } -static int _dragonBones_DragonBonesData_get_frameIntArray(lua_State *L) +static int _olua_fun_dragonBones_DragonBonesData_frameIndices(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // std::vector frameIndices + return _olua_fun_dragonBones_DragonBonesData_frameIndices$1(L); + } + + if (num_args == 1) { + // if ((olua_is_array(L, 2))) { + // std::vector frameIndices + return _olua_fun_dragonBones_DragonBonesData_frameIndices$2(L); + // } + } + + luaL_error(L, "method 'dragonBones::DragonBonesData::frameIndices' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_dragonBones_DragonBonesData_frameIntArray$1(lua_State *L) { olua_startinvoke(L); @@ -11860,14 +15577,14 @@ static int _dragonBones_DragonBonesData_get_frameIntArray(lua_State *L) // const int16_t *frameIntArray const int16_t *ret = self->frameIntArray; - int num_ret = olua_push_pointer(L, ret, "olua.int16_t"); + int num_ret = olua_push_valueptr(L, ret, "olua.int16"); olua_endinvoke(L); return num_ret; } -static int _dragonBones_DragonBonesData_set_frameIntArray(lua_State *L) +static int _olua_fun_dragonBones_DragonBonesData_frameIntArray$2(lua_State *L) { olua_startinvoke(L); @@ -11875,7 +15592,7 @@ static int _dragonBones_DragonBonesData_set_frameIntArray(lua_State *L) int16_t *arg1 = nullptr; /** frameIntArray */ olua_to_object(L, 1, &self, "db.DragonBonesData"); - olua_check_pointer(L, 2, &arg1, "olua.int16_t"); + olua_check_valueptr(L, 2, &arg1, "olua.int16"); // const int16_t *frameIntArray self->frameIntArray = arg1; @@ -11885,7 +15602,28 @@ static int _dragonBones_DragonBonesData_set_frameIntArray(lua_State *L) return 0; } -static int _dragonBones_DragonBonesData_get_frameRate(lua_State *L) +static int _olua_fun_dragonBones_DragonBonesData_frameIntArray(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // const int16_t *frameIntArray + return _olua_fun_dragonBones_DragonBonesData_frameIntArray$1(L); + } + + if (num_args == 1) { + // if ((olua_is_valueptr(L, 2, "olua.int16"))) { + // const int16_t *frameIntArray + return _olua_fun_dragonBones_DragonBonesData_frameIntArray$2(L); + // } + } + + luaL_error(L, "method 'dragonBones::DragonBonesData::frameIntArray' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_dragonBones_DragonBonesData_frameRate$1(lua_State *L) { olua_startinvoke(L); @@ -11902,7 +15640,7 @@ static int _dragonBones_DragonBonesData_get_frameRate(lua_State *L) return num_ret; } -static int _dragonBones_DragonBonesData_set_frameRate(lua_State *L) +static int _olua_fun_dragonBones_DragonBonesData_frameRate$2(lua_State *L) { olua_startinvoke(L); @@ -11920,7 +15658,96 @@ static int _dragonBones_DragonBonesData_set_frameRate(lua_State *L) return 0; } -static int _dragonBones_DragonBonesData_get_intArray(lua_State *L) +static int _olua_fun_dragonBones_DragonBonesData_frameRate(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // unsigned int frameRate + return _olua_fun_dragonBones_DragonBonesData_frameRate$1(L); + } + + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // unsigned int frameRate + return _olua_fun_dragonBones_DragonBonesData_frameRate$2(L); + // } + } + + luaL_error(L, "method 'dragonBones::DragonBonesData::frameRate' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_dragonBones_DragonBonesData_getArmature(lua_State *L) +{ + olua_startinvoke(L); + + dragonBones::DragonBonesData *self = nullptr; + std::string arg1; /** armatureName */ + + olua_to_object(L, 1, &self, "db.DragonBonesData"); + olua_check_string(L, 2, &arg1); + + // dragonBones::ArmatureData *getArmature(const std::string &armatureName) + dragonBones::ArmatureData *ret = self->getArmature(arg1); + int num_ret = olua_push_object(L, ret, "db.ArmatureData"); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_dragonBones_DragonBonesData_getArmatureNames(lua_State *L) +{ + olua_startinvoke(L); + + dragonBones::DragonBonesData *self = nullptr; + + olua_to_object(L, 1, &self, "db.DragonBonesData"); + + // const std::vector &getArmatureNames() + const std::vector &ret = self->getArmatureNames(); + int num_ret = olua_push_array(L, ret, [L](std::string &arg1) { + olua_push_string(L, arg1); + }); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_dragonBones_DragonBonesData_getTypeIndex(lua_State *L) +{ + olua_startinvoke(L); + + // static std::size_t getTypeIndex() + std::size_t ret = dragonBones::DragonBonesData::getTypeIndex(); + int num_ret = olua_push_integer(L, ret); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_dragonBones_DragonBonesData_getUserData(lua_State *L) +{ + olua_startinvoke(L); + + dragonBones::DragonBonesData *self = nullptr; + + olua_to_object(L, 1, &self, "db.DragonBonesData"); + + // const dragonBones::UserData *getUserData() + const dragonBones::UserData *ret = self->getUserData(); + int num_ret = olua_push_object(L, ret, "db.UserData"); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_dragonBones_DragonBonesData_intArray$1(lua_State *L) { olua_startinvoke(L); @@ -11930,14 +15757,14 @@ static int _dragonBones_DragonBonesData_get_intArray(lua_State *L) // const int16_t *intArray const int16_t *ret = self->intArray; - int num_ret = olua_push_pointer(L, ret, "olua.int16_t"); + int num_ret = olua_push_valueptr(L, ret, "olua.int16"); olua_endinvoke(L); return num_ret; } -static int _dragonBones_DragonBonesData_set_intArray(lua_State *L) +static int _olua_fun_dragonBones_DragonBonesData_intArray$2(lua_State *L) { olua_startinvoke(L); @@ -11945,7 +15772,7 @@ static int _dragonBones_DragonBonesData_set_intArray(lua_State *L) int16_t *arg1 = nullptr; /** intArray */ olua_to_object(L, 1, &self, "db.DragonBonesData"); - olua_check_pointer(L, 2, &arg1, "olua.int16_t"); + olua_check_valueptr(L, 2, &arg1, "olua.int16"); // const int16_t *intArray self->intArray = arg1; @@ -11955,7 +15782,28 @@ static int _dragonBones_DragonBonesData_set_intArray(lua_State *L) return 0; } -static int _dragonBones_DragonBonesData_get_name(lua_State *L) +static int _olua_fun_dragonBones_DragonBonesData_intArray(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // const int16_t *intArray + return _olua_fun_dragonBones_DragonBonesData_intArray$1(L); + } + + if (num_args == 1) { + // if ((olua_is_valueptr(L, 2, "olua.int16"))) { + // const int16_t *intArray + return _olua_fun_dragonBones_DragonBonesData_intArray$2(L); + // } + } + + luaL_error(L, "method 'dragonBones::DragonBonesData::intArray' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_dragonBones_DragonBonesData_name$1(lua_State *L) { olua_startinvoke(L); @@ -11972,7 +15820,7 @@ static int _dragonBones_DragonBonesData_get_name(lua_State *L) return num_ret; } -static int _dragonBones_DragonBonesData_set_name(lua_State *L) +static int _olua_fun_dragonBones_DragonBonesData_name$2(lua_State *L) { olua_startinvoke(L); @@ -11990,7 +15838,60 @@ static int _dragonBones_DragonBonesData_set_name(lua_State *L) return 0; } -static int _dragonBones_DragonBonesData_get_timelineArray(lua_State *L) +static int _olua_fun_dragonBones_DragonBonesData_name(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // std::string name + return _olua_fun_dragonBones_DragonBonesData_name$1(L); + } + + if (num_args == 1) { + // if ((olua_is_string(L, 2))) { + // std::string name + return _olua_fun_dragonBones_DragonBonesData_name$2(L); + // } + } + + luaL_error(L, "method 'dragonBones::DragonBonesData::name' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_dragonBones_DragonBonesData_new(lua_State *L) +{ + olua_startinvoke(L); + + // dragonBones::DragonBonesData() + dragonBones::DragonBonesData *ret = new dragonBones::DragonBonesData(); + int num_ret = olua_push_object(L, ret, "db.DragonBonesData"); + olua_postnew(L, ret); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_dragonBones_DragonBonesData_setUserData(lua_State *L) +{ + olua_startinvoke(L); + + dragonBones::DragonBonesData *self = nullptr; + dragonBones::UserData *arg1 = nullptr; /** value */ + + olua_to_object(L, 1, &self, "db.DragonBonesData"); + olua_check_object(L, 2, &arg1, "db.UserData"); + + // void setUserData(dragonBones::UserData *value) + self->setUserData(arg1); + + olua_endinvoke(L); + + return 0; +} + +static int _olua_fun_dragonBones_DragonBonesData_timelineArray$1(lua_State *L) { olua_startinvoke(L); @@ -12000,14 +15901,14 @@ static int _dragonBones_DragonBonesData_get_timelineArray(lua_State *L) // const uint16_t *timelineArray const uint16_t *ret = self->timelineArray; - int num_ret = olua_push_pointer(L, ret, "olua.uint16_t"); + int num_ret = olua_push_valueptr(L, ret, "olua.uint16"); olua_endinvoke(L); return num_ret; } -static int _dragonBones_DragonBonesData_set_timelineArray(lua_State *L) +static int _olua_fun_dragonBones_DragonBonesData_timelineArray$2(lua_State *L) { olua_startinvoke(L); @@ -12015,7 +15916,7 @@ static int _dragonBones_DragonBonesData_set_timelineArray(lua_State *L) uint16_t *arg1 = nullptr; /** timelineArray */ olua_to_object(L, 1, &self, "db.DragonBonesData"); - olua_check_pointer(L, 2, &arg1, "olua.uint16_t"); + olua_check_valueptr(L, 2, &arg1, "olua.uint16"); // const uint16_t *timelineArray self->timelineArray = arg1; @@ -12025,7 +15926,28 @@ static int _dragonBones_DragonBonesData_set_timelineArray(lua_State *L) return 0; } -static int _dragonBones_DragonBonesData_get_userData(lua_State *L) +static int _olua_fun_dragonBones_DragonBonesData_timelineArray(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // const uint16_t *timelineArray + return _olua_fun_dragonBones_DragonBonesData_timelineArray$1(L); + } + + if (num_args == 1) { + // if ((olua_is_valueptr(L, 2, "olua.uint16"))) { + // const uint16_t *timelineArray + return _olua_fun_dragonBones_DragonBonesData_timelineArray$2(L); + // } + } + + luaL_error(L, "method 'dragonBones::DragonBonesData::timelineArray' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_dragonBones_DragonBonesData_userData$1(lua_State *L) { olua_startinvoke(L); @@ -12042,7 +15964,7 @@ static int _dragonBones_DragonBonesData_get_userData(lua_State *L) return num_ret; } -static int _dragonBones_DragonBonesData_set_userData(lua_State *L) +static int _olua_fun_dragonBones_DragonBonesData_userData$2(lua_State *L) { olua_startinvoke(L); @@ -12060,7 +15982,28 @@ static int _dragonBones_DragonBonesData_set_userData(lua_State *L) return 0; } -static int _dragonBones_DragonBonesData_get_version(lua_State *L) +static int _olua_fun_dragonBones_DragonBonesData_userData(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // dragonBones::UserData *userData + return _olua_fun_dragonBones_DragonBonesData_userData$1(L); + } + + if (num_args == 1) { + // if ((olua_is_object(L, 2, "db.UserData"))) { + // dragonBones::UserData *userData + return _olua_fun_dragonBones_DragonBonesData_userData$2(L); + // } + } + + luaL_error(L, "method 'dragonBones::DragonBonesData::userData' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_dragonBones_DragonBonesData_version$1(lua_State *L) { olua_startinvoke(L); @@ -12077,7 +16020,7 @@ static int _dragonBones_DragonBonesData_get_version(lua_State *L) return num_ret; } -static int _dragonBones_DragonBonesData_set_version(lua_State *L) +static int _olua_fun_dragonBones_DragonBonesData_version$2(lua_State *L) { olua_startinvoke(L); @@ -12087,72 +16030,78 @@ static int _dragonBones_DragonBonesData_set_version(lua_State *L) olua_to_object(L, 1, &self, "db.DragonBonesData"); olua_check_string(L, 2, &arg1); - // std::string version - self->version = arg1; + // std::string version + self->version = arg1; + + olua_endinvoke(L); + + return 0; +} + +static int _olua_fun_dragonBones_DragonBonesData_version(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // std::string version + return _olua_fun_dragonBones_DragonBonesData_version$1(L); + } + + if (num_args == 1) { + // if ((olua_is_string(L, 2))) { + // std::string version + return _olua_fun_dragonBones_DragonBonesData_version$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'dragonBones::DragonBonesData::version' not support '%d' arguments", num_args); return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_dragonBones_DragonBonesData(lua_State *L) +static int _olua_cls_db_DragonBonesData(lua_State *L) { oluacls_class(L, "db.DragonBonesData"); - oluacls_func(L, "addArmature", _dragonBones_DragonBonesData_addArmature); - oluacls_func(L, "getArmature", _dragonBones_DragonBonesData_getArmature); - oluacls_func(L, "getArmatureNames", _dragonBones_DragonBonesData_getArmatureNames); - oluacls_func(L, "getTypeIndex", _dragonBones_DragonBonesData_getTypeIndex); - oluacls_func(L, "getUserData", _dragonBones_DragonBonesData_getUserData); - oluacls_func(L, "new", _dragonBones_DragonBonesData_new); - oluacls_func(L, "setUserData", _dragonBones_DragonBonesData_setUserData); - oluacls_prop(L, "armatureNames", _dragonBones_DragonBonesData_getArmatureNames, nullptr); - oluacls_prop(L, "typeIndex", _dragonBones_DragonBonesData_getTypeIndex, nullptr); - oluacls_prop(L, "userData", _dragonBones_DragonBonesData_getUserData, _dragonBones_DragonBonesData_setUserData); - oluacls_prop(L, "armatureNames", _dragonBones_DragonBonesData_get_armatureNames, _dragonBones_DragonBonesData_set_armatureNames); - oluacls_prop(L, "armatures", _dragonBones_DragonBonesData_get_armatures, _dragonBones_DragonBonesData_set_armatures); - oluacls_prop(L, "autoSearch", _dragonBones_DragonBonesData_get_autoSearch, _dragonBones_DragonBonesData_set_autoSearch); - oluacls_prop(L, "binary", _dragonBones_DragonBonesData_get_binary, _dragonBones_DragonBonesData_set_binary); - oluacls_prop(L, "cachedFrames", _dragonBones_DragonBonesData_get_cachedFrames, _dragonBones_DragonBonesData_set_cachedFrames); - oluacls_prop(L, "floatArray", _dragonBones_DragonBonesData_get_floatArray, _dragonBones_DragonBonesData_set_floatArray); - oluacls_prop(L, "frameArray", _dragonBones_DragonBonesData_get_frameArray, _dragonBones_DragonBonesData_set_frameArray); - oluacls_prop(L, "frameFloatArray", _dragonBones_DragonBonesData_get_frameFloatArray, _dragonBones_DragonBonesData_set_frameFloatArray); - oluacls_prop(L, "frameIndices", _dragonBones_DragonBonesData_get_frameIndices, _dragonBones_DragonBonesData_set_frameIndices); - oluacls_prop(L, "frameIntArray", _dragonBones_DragonBonesData_get_frameIntArray, _dragonBones_DragonBonesData_set_frameIntArray); - oluacls_prop(L, "frameRate", _dragonBones_DragonBonesData_get_frameRate, _dragonBones_DragonBonesData_set_frameRate); - oluacls_prop(L, "intArray", _dragonBones_DragonBonesData_get_intArray, _dragonBones_DragonBonesData_set_intArray); - oluacls_prop(L, "name", _dragonBones_DragonBonesData_get_name, _dragonBones_DragonBonesData_set_name); - oluacls_prop(L, "timelineArray", _dragonBones_DragonBonesData_get_timelineArray, _dragonBones_DragonBonesData_set_timelineArray); - oluacls_prop(L, "userData", _dragonBones_DragonBonesData_get_userData, _dragonBones_DragonBonesData_set_userData); - oluacls_prop(L, "version", _dragonBones_DragonBonesData_get_version, _dragonBones_DragonBonesData_set_version); + oluacls_func(L, "addArmature", _olua_fun_dragonBones_DragonBonesData_addArmature); + oluacls_func(L, "getArmature", _olua_fun_dragonBones_DragonBonesData_getArmature); + oluacls_func(L, "getArmatureNames", _olua_fun_dragonBones_DragonBonesData_getArmatureNames); + oluacls_func(L, "getTypeIndex", _olua_fun_dragonBones_DragonBonesData_getTypeIndex); + oluacls_func(L, "getUserData", _olua_fun_dragonBones_DragonBonesData_getUserData); + oluacls_func(L, "new", _olua_fun_dragonBones_DragonBonesData_new); + oluacls_func(L, "setUserData", _olua_fun_dragonBones_DragonBonesData_setUserData); + oluacls_prop(L, "typeIndex", _olua_fun_dragonBones_DragonBonesData_getTypeIndex, nullptr); + oluacls_prop(L, "armatureNames", _olua_fun_dragonBones_DragonBonesData_armatureNames, _olua_fun_dragonBones_DragonBonesData_armatureNames); + oluacls_prop(L, "armatures", _olua_fun_dragonBones_DragonBonesData_armatures, _olua_fun_dragonBones_DragonBonesData_armatures); + oluacls_prop(L, "autoSearch", _olua_fun_dragonBones_DragonBonesData_autoSearch, _olua_fun_dragonBones_DragonBonesData_autoSearch); + oluacls_prop(L, "binary", _olua_fun_dragonBones_DragonBonesData_binary, _olua_fun_dragonBones_DragonBonesData_binary); + oluacls_prop(L, "cachedFrames", _olua_fun_dragonBones_DragonBonesData_cachedFrames, _olua_fun_dragonBones_DragonBonesData_cachedFrames); + oluacls_prop(L, "floatArray", _olua_fun_dragonBones_DragonBonesData_floatArray, _olua_fun_dragonBones_DragonBonesData_floatArray); + oluacls_prop(L, "frameArray", _olua_fun_dragonBones_DragonBonesData_frameArray, _olua_fun_dragonBones_DragonBonesData_frameArray); + oluacls_prop(L, "frameFloatArray", _olua_fun_dragonBones_DragonBonesData_frameFloatArray, _olua_fun_dragonBones_DragonBonesData_frameFloatArray); + oluacls_prop(L, "frameIndices", _olua_fun_dragonBones_DragonBonesData_frameIndices, _olua_fun_dragonBones_DragonBonesData_frameIndices); + oluacls_prop(L, "frameIntArray", _olua_fun_dragonBones_DragonBonesData_frameIntArray, _olua_fun_dragonBones_DragonBonesData_frameIntArray); + oluacls_prop(L, "frameRate", _olua_fun_dragonBones_DragonBonesData_frameRate, _olua_fun_dragonBones_DragonBonesData_frameRate); + oluacls_prop(L, "intArray", _olua_fun_dragonBones_DragonBonesData_intArray, _olua_fun_dragonBones_DragonBonesData_intArray); + oluacls_prop(L, "name", _olua_fun_dragonBones_DragonBonesData_name, _olua_fun_dragonBones_DragonBonesData_name); + oluacls_prop(L, "timelineArray", _olua_fun_dragonBones_DragonBonesData_timelineArray, _olua_fun_dragonBones_DragonBonesData_timelineArray); + oluacls_prop(L, "userData", _olua_fun_dragonBones_DragonBonesData_userData, _olua_fun_dragonBones_DragonBonesData_userData); + oluacls_prop(L, "version", _olua_fun_dragonBones_DragonBonesData_version, _olua_fun_dragonBones_DragonBonesData_version); return 1; } -OLUA_END_DECLS -static int _dragonBones_BaseFactory___call(lua_State *L) +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_db_DragonBonesData(lua_State *L) { - olua_startinvoke(L); - - dragonBones::BaseFactory ret; - - luaL_checktype(L, 2, LUA_TTABLE); - - bool arg1 = false; /** autoSearch */ - - olua_getfield(L, 2, "autoSearch"); - olua_check_bool(L, -1, &arg1); - ret.autoSearch = arg1; - lua_pop(L, 1); - - olua_pushcopy_object(L, ret, "db.BaseFactory"); - - olua_endinvoke(L); - + olua_require(L, "dragonbones", luaopen_dragonbones); + if (!olua_getclass(L, "db.DragonBonesData")) { + luaL_error(L, "class not found: dragonBones::DragonBonesData"); + } return 1; } +OLUA_END_DECLS -static int _dragonBones_BaseFactory___gc(lua_State *L) +static int _olua_fun_dragonBones_BaseFactory___gc(lua_State *L) { olua_startinvoke(L); @@ -12164,7 +16113,7 @@ static int _dragonBones_BaseFactory___gc(lua_State *L) return 0; } -static int _dragonBones_BaseFactory___olua_move(lua_State *L) +static int _olua_fun_dragonBones_BaseFactory___olua_move(lua_State *L) { olua_startinvoke(L); @@ -12176,7 +16125,7 @@ static int _dragonBones_BaseFactory___olua_move(lua_State *L) return 1; } -static int _dragonBones_BaseFactory_addDragonBonesData$1(lua_State *L) +static int _olua_fun_dragonBones_BaseFactory_addDragonBonesData$1(lua_State *L) { olua_startinvoke(L); @@ -12196,7 +16145,7 @@ static int _dragonBones_BaseFactory_addDragonBonesData$1(lua_State *L) return 0; } -static int _dragonBones_BaseFactory_addDragonBonesData$2(lua_State *L) +static int _olua_fun_dragonBones_BaseFactory_addDragonBonesData$2(lua_State *L) { olua_startinvoke(L); @@ -12206,7 +16155,7 @@ static int _dragonBones_BaseFactory_addDragonBonesData$2(lua_State *L) olua_to_object(L, 1, &self, "db.BaseFactory"); olua_check_object(L, 2, &arg1, "db.DragonBonesData"); - // void addDragonBonesData(dragonBones::DragonBonesData *data, @optional const std::string &name) + // void addDragonBonesData(dragonBones::DragonBonesData *data) self->addDragonBonesData(arg1); olua_endinvoke(L); @@ -12214,21 +16163,21 @@ static int _dragonBones_BaseFactory_addDragonBonesData$2(lua_State *L) return 0; } -static int _dragonBones_BaseFactory_addDragonBonesData(lua_State *L) +static int _olua_fun_dragonBones_BaseFactory_addDragonBonesData(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_object(L, 2, "db.DragonBonesData"))) { - // void addDragonBonesData(dragonBones::DragonBonesData *data, @optional const std::string &name) - return _dragonBones_BaseFactory_addDragonBonesData$2(L); + // void addDragonBonesData(dragonBones::DragonBonesData *data) + return _olua_fun_dragonBones_BaseFactory_addDragonBonesData$2(L); // } } if (num_args == 2) { // if ((olua_is_object(L, 2, "db.DragonBonesData")) && (olua_is_string(L, 3))) { // void addDragonBonesData(dragonBones::DragonBonesData *data, @optional const std::string &name) - return _dragonBones_BaseFactory_addDragonBonesData$1(L); + return _olua_fun_dragonBones_BaseFactory_addDragonBonesData$1(L); // } } @@ -12237,7 +16186,7 @@ static int _dragonBones_BaseFactory_addDragonBonesData(lua_State *L) return 0; } -static int _dragonBones_BaseFactory_addTextureAtlasData$1(lua_State *L) +static int _olua_fun_dragonBones_BaseFactory_addTextureAtlasData$1(lua_State *L) { olua_startinvoke(L); @@ -12257,7 +16206,7 @@ static int _dragonBones_BaseFactory_addTextureAtlasData$1(lua_State *L) return 0; } -static int _dragonBones_BaseFactory_addTextureAtlasData$2(lua_State *L) +static int _olua_fun_dragonBones_BaseFactory_addTextureAtlasData$2(lua_State *L) { olua_startinvoke(L); @@ -12267,7 +16216,7 @@ static int _dragonBones_BaseFactory_addTextureAtlasData$2(lua_State *L) olua_to_object(L, 1, &self, "db.BaseFactory"); olua_check_object(L, 2, &arg1, "db.TextureAtlasData"); - // void addTextureAtlasData(dragonBones::TextureAtlasData *data, @optional const std::string &name) + // void addTextureAtlasData(dragonBones::TextureAtlasData *data) self->addTextureAtlasData(arg1); olua_endinvoke(L); @@ -12275,21 +16224,21 @@ static int _dragonBones_BaseFactory_addTextureAtlasData$2(lua_State *L) return 0; } -static int _dragonBones_BaseFactory_addTextureAtlasData(lua_State *L) +static int _olua_fun_dragonBones_BaseFactory_addTextureAtlasData(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_object(L, 2, "db.TextureAtlasData"))) { - // void addTextureAtlasData(dragonBones::TextureAtlasData *data, @optional const std::string &name) - return _dragonBones_BaseFactory_addTextureAtlasData$2(L); + // void addTextureAtlasData(dragonBones::TextureAtlasData *data) + return _olua_fun_dragonBones_BaseFactory_addTextureAtlasData$2(L); // } } if (num_args == 2) { // if ((olua_is_object(L, 2, "db.TextureAtlasData")) && (olua_is_string(L, 3))) { // void addTextureAtlasData(dragonBones::TextureAtlasData *data, @optional const std::string &name) - return _dragonBones_BaseFactory_addTextureAtlasData$1(L); + return _olua_fun_dragonBones_BaseFactory_addTextureAtlasData$1(L); // } } @@ -12298,7 +16247,63 @@ static int _dragonBones_BaseFactory_addTextureAtlasData(lua_State *L) return 0; } -static int _dragonBones_BaseFactory_buildArmature$1(lua_State *L) +static int _olua_fun_dragonBones_BaseFactory_autoSearch$1(lua_State *L) +{ + olua_startinvoke(L); + + dragonBones::BaseFactory *self = nullptr; + + olua_to_object(L, 1, &self, "db.BaseFactory"); + + // bool autoSearch + bool ret = self->autoSearch; + int num_ret = olua_push_bool(L, ret); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_dragonBones_BaseFactory_autoSearch$2(lua_State *L) +{ + olua_startinvoke(L); + + dragonBones::BaseFactory *self = nullptr; + bool arg1 = false; /** autoSearch */ + + olua_to_object(L, 1, &self, "db.BaseFactory"); + olua_check_bool(L, 2, &arg1); + + // bool autoSearch + self->autoSearch = arg1; + + olua_endinvoke(L); + + return 0; +} + +static int _olua_fun_dragonBones_BaseFactory_autoSearch(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // bool autoSearch + return _olua_fun_dragonBones_BaseFactory_autoSearch$1(L); + } + + if (num_args == 1) { + // if ((olua_is_bool(L, 2))) { + // bool autoSearch + return _olua_fun_dragonBones_BaseFactory_autoSearch$2(L); + // } + } + + luaL_error(L, "method 'dragonBones::BaseFactory::autoSearch' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_dragonBones_BaseFactory_buildArmature$1(lua_State *L) { olua_startinvoke(L); @@ -12323,7 +16328,7 @@ static int _dragonBones_BaseFactory_buildArmature$1(lua_State *L) return num_ret; } -static int _dragonBones_BaseFactory_buildArmature$2(lua_State *L) +static int _olua_fun_dragonBones_BaseFactory_buildArmature$2(lua_State *L) { olua_startinvoke(L); @@ -12333,7 +16338,7 @@ static int _dragonBones_BaseFactory_buildArmature$2(lua_State *L) olua_to_object(L, 1, &self, "db.BaseFactory"); olua_check_string(L, 2, &arg1); - // dragonBones::Armature *buildArmature(const std::string &armatureName, @optional const std::string &dragonBonesName, @optional const std::string &skinName, @optional const std::string &textureAtlasName) + // dragonBones::Armature *buildArmature(const std::string &armatureName) dragonBones::Armature *ret = self->buildArmature(arg1); int num_ret = olua_push_object(L, ret, "db.Armature"); @@ -12342,7 +16347,7 @@ static int _dragonBones_BaseFactory_buildArmature$2(lua_State *L) return num_ret; } -static int _dragonBones_BaseFactory_buildArmature$3(lua_State *L) +static int _olua_fun_dragonBones_BaseFactory_buildArmature$3(lua_State *L) { olua_startinvoke(L); @@ -12354,7 +16359,7 @@ static int _dragonBones_BaseFactory_buildArmature$3(lua_State *L) olua_check_string(L, 2, &arg1); olua_check_string(L, 3, &arg2); - // dragonBones::Armature *buildArmature(const std::string &armatureName, @optional const std::string &dragonBonesName, @optional const std::string &skinName, @optional const std::string &textureAtlasName) + // dragonBones::Armature *buildArmature(const std::string &armatureName, @optional const std::string &dragonBonesName) dragonBones::Armature *ret = self->buildArmature(arg1, arg2); int num_ret = olua_push_object(L, ret, "db.Armature"); @@ -12363,7 +16368,7 @@ static int _dragonBones_BaseFactory_buildArmature$3(lua_State *L) return num_ret; } -static int _dragonBones_BaseFactory_buildArmature$4(lua_State *L) +static int _olua_fun_dragonBones_BaseFactory_buildArmature$4(lua_State *L) { olua_startinvoke(L); @@ -12377,7 +16382,7 @@ static int _dragonBones_BaseFactory_buildArmature$4(lua_State *L) olua_check_string(L, 3, &arg2); olua_check_string(L, 4, &arg3); - // dragonBones::Armature *buildArmature(const std::string &armatureName, @optional const std::string &dragonBonesName, @optional const std::string &skinName, @optional const std::string &textureAtlasName) + // dragonBones::Armature *buildArmature(const std::string &armatureName, @optional const std::string &dragonBonesName, @optional const std::string &skinName) dragonBones::Armature *ret = self->buildArmature(arg1, arg2, arg3); int num_ret = olua_push_object(L, ret, "db.Armature"); @@ -12386,35 +16391,35 @@ static int _dragonBones_BaseFactory_buildArmature$4(lua_State *L) return num_ret; } -static int _dragonBones_BaseFactory_buildArmature(lua_State *L) +static int _olua_fun_dragonBones_BaseFactory_buildArmature(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_string(L, 2))) { - // dragonBones::Armature *buildArmature(const std::string &armatureName, @optional const std::string &dragonBonesName, @optional const std::string &skinName, @optional const std::string &textureAtlasName) - return _dragonBones_BaseFactory_buildArmature$2(L); + // dragonBones::Armature *buildArmature(const std::string &armatureName) + return _olua_fun_dragonBones_BaseFactory_buildArmature$2(L); // } } if (num_args == 2) { // if ((olua_is_string(L, 2)) && (olua_is_string(L, 3))) { - // dragonBones::Armature *buildArmature(const std::string &armatureName, @optional const std::string &dragonBonesName, @optional const std::string &skinName, @optional const std::string &textureAtlasName) - return _dragonBones_BaseFactory_buildArmature$3(L); + // dragonBones::Armature *buildArmature(const std::string &armatureName, @optional const std::string &dragonBonesName) + return _olua_fun_dragonBones_BaseFactory_buildArmature$3(L); // } } if (num_args == 3) { // if ((olua_is_string(L, 2)) && (olua_is_string(L, 3)) && (olua_is_string(L, 4))) { - // dragonBones::Armature *buildArmature(const std::string &armatureName, @optional const std::string &dragonBonesName, @optional const std::string &skinName, @optional const std::string &textureAtlasName) - return _dragonBones_BaseFactory_buildArmature$4(L); + // dragonBones::Armature *buildArmature(const std::string &armatureName, @optional const std::string &dragonBonesName, @optional const std::string &skinName) + return _olua_fun_dragonBones_BaseFactory_buildArmature$4(L); // } } if (num_args == 4) { // if ((olua_is_string(L, 2)) && (olua_is_string(L, 3)) && (olua_is_string(L, 4)) && (olua_is_string(L, 5))) { // dragonBones::Armature *buildArmature(const std::string &armatureName, @optional const std::string &dragonBonesName, @optional const std::string &skinName, @optional const std::string &textureAtlasName) - return _dragonBones_BaseFactory_buildArmature$1(L); + return _olua_fun_dragonBones_BaseFactory_buildArmature$1(L); // } } @@ -12423,7 +16428,7 @@ static int _dragonBones_BaseFactory_buildArmature(lua_State *L) return 0; } -static int _dragonBones_BaseFactory_changeSkin$1(lua_State *L) +static int _olua_fun_dragonBones_BaseFactory_changeSkin$1(lua_State *L) { olua_startinvoke(L); @@ -12435,7 +16440,7 @@ static int _dragonBones_BaseFactory_changeSkin$1(lua_State *L) olua_to_object(L, 1, &self, "db.BaseFactory"); olua_check_object(L, 2, &arg1, "db.Armature"); olua_check_object(L, 3, &arg2, "db.SkinData"); - olua_check_pointer(L, 4, &arg3, "cc.VectorString"); + olua_check_valueptr(L, 4, &arg3, "cc.types.VectorString"); // bool changeSkin(dragonBones::Armature *armature, dragonBones::SkinData *skin, @optional const std::vector *exclude) bool ret = self->changeSkin(arg1, arg2, arg3); @@ -12446,7 +16451,7 @@ static int _dragonBones_BaseFactory_changeSkin$1(lua_State *L) return num_ret; } -static int _dragonBones_BaseFactory_changeSkin$2(lua_State *L) +static int _olua_fun_dragonBones_BaseFactory_changeSkin$2(lua_State *L) { olua_startinvoke(L); @@ -12458,7 +16463,7 @@ static int _dragonBones_BaseFactory_changeSkin$2(lua_State *L) olua_check_object(L, 2, &arg1, "db.Armature"); olua_check_object(L, 3, &arg2, "db.SkinData"); - // bool changeSkin(dragonBones::Armature *armature, dragonBones::SkinData *skin, @optional const std::vector *exclude) + // bool changeSkin(dragonBones::Armature *armature, dragonBones::SkinData *skin) bool ret = self->changeSkin(arg1, arg2); int num_ret = olua_push_bool(L, ret); @@ -12467,21 +16472,21 @@ static int _dragonBones_BaseFactory_changeSkin$2(lua_State *L) return num_ret; } -static int _dragonBones_BaseFactory_changeSkin(lua_State *L) +static int _olua_fun_dragonBones_BaseFactory_changeSkin(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 2) { // if ((olua_is_object(L, 2, "db.Armature")) && (olua_is_object(L, 3, "db.SkinData"))) { - // bool changeSkin(dragonBones::Armature *armature, dragonBones::SkinData *skin, @optional const std::vector *exclude) - return _dragonBones_BaseFactory_changeSkin$2(L); + // bool changeSkin(dragonBones::Armature *armature, dragonBones::SkinData *skin) + return _olua_fun_dragonBones_BaseFactory_changeSkin$2(L); // } } if (num_args == 3) { - // if ((olua_is_object(L, 2, "db.Armature")) && (olua_is_object(L, 3, "db.SkinData")) && (olua_is_pointer(L, 4, "cc.VectorString"))) { + // if ((olua_is_object(L, 2, "db.Armature")) && (olua_is_object(L, 3, "db.SkinData")) && (olua_is_valueptr(L, 4, "cc.types.VectorString"))) { // bool changeSkin(dragonBones::Armature *armature, dragonBones::SkinData *skin, @optional const std::vector *exclude) - return _dragonBones_BaseFactory_changeSkin$1(L); + return _olua_fun_dragonBones_BaseFactory_changeSkin$1(L); // } } @@ -12490,7 +16495,7 @@ static int _dragonBones_BaseFactory_changeSkin(lua_State *L) return 0; } -static int _dragonBones_BaseFactory_clear$1(lua_State *L) +static int _olua_fun_dragonBones_BaseFactory_clear$1(lua_State *L) { olua_startinvoke(L); @@ -12508,7 +16513,7 @@ static int _dragonBones_BaseFactory_clear$1(lua_State *L) return 0; } -static int _dragonBones_BaseFactory_clear$2(lua_State *L) +static int _olua_fun_dragonBones_BaseFactory_clear$2(lua_State *L) { olua_startinvoke(L); @@ -12516,7 +16521,7 @@ static int _dragonBones_BaseFactory_clear$2(lua_State *L) olua_to_object(L, 1, &self, "db.BaseFactory"); - // void clear(@optional bool disposeData) + // void clear() self->clear(); olua_endinvoke(L); @@ -12524,19 +16529,19 @@ static int _dragonBones_BaseFactory_clear$2(lua_State *L) return 0; } -static int _dragonBones_BaseFactory_clear(lua_State *L) +static int _olua_fun_dragonBones_BaseFactory_clear(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 0) { - // void clear(@optional bool disposeData) - return _dragonBones_BaseFactory_clear$2(L); + // void clear() + return _olua_fun_dragonBones_BaseFactory_clear$2(L); } if (num_args == 1) { // if ((olua_is_bool(L, 2))) { // void clear(@optional bool disposeData) - return _dragonBones_BaseFactory_clear$1(L); + return _olua_fun_dragonBones_BaseFactory_clear$1(L); // } } @@ -12545,7 +16550,7 @@ static int _dragonBones_BaseFactory_clear(lua_State *L) return 0; } -static int _dragonBones_BaseFactory_getAllDragonBonesData(lua_State *L) +static int _olua_fun_dragonBones_BaseFactory_getAllDragonBonesData(lua_State *L) { olua_startinvoke(L); @@ -12565,7 +16570,7 @@ static int _dragonBones_BaseFactory_getAllDragonBonesData(lua_State *L) return num_ret; } -static int _dragonBones_BaseFactory_getArmatureData$1(lua_State *L) +static int _olua_fun_dragonBones_BaseFactory_getArmatureData$1(lua_State *L) { olua_startinvoke(L); @@ -12586,7 +16591,7 @@ static int _dragonBones_BaseFactory_getArmatureData$1(lua_State *L) return num_ret; } -static int _dragonBones_BaseFactory_getArmatureData$2(lua_State *L) +static int _olua_fun_dragonBones_BaseFactory_getArmatureData$2(lua_State *L) { olua_startinvoke(L); @@ -12596,7 +16601,7 @@ static int _dragonBones_BaseFactory_getArmatureData$2(lua_State *L) olua_to_object(L, 1, &self, "db.BaseFactory"); olua_check_string(L, 2, &arg1); - // dragonBones::ArmatureData *getArmatureData(const std::string &name, @optional const std::string &dragonBonesName) + // dragonBones::ArmatureData *getArmatureData(const std::string &name) dragonBones::ArmatureData *ret = self->getArmatureData(arg1); int num_ret = olua_push_object(L, ret, "db.ArmatureData"); @@ -12605,21 +16610,21 @@ static int _dragonBones_BaseFactory_getArmatureData$2(lua_State *L) return num_ret; } -static int _dragonBones_BaseFactory_getArmatureData(lua_State *L) +static int _olua_fun_dragonBones_BaseFactory_getArmatureData(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_string(L, 2))) { - // dragonBones::ArmatureData *getArmatureData(const std::string &name, @optional const std::string &dragonBonesName) - return _dragonBones_BaseFactory_getArmatureData$2(L); + // dragonBones::ArmatureData *getArmatureData(const std::string &name) + return _olua_fun_dragonBones_BaseFactory_getArmatureData$2(L); // } } if (num_args == 2) { // if ((olua_is_string(L, 2)) && (olua_is_string(L, 3))) { // dragonBones::ArmatureData *getArmatureData(const std::string &name, @optional const std::string &dragonBonesName) - return _dragonBones_BaseFactory_getArmatureData$1(L); + return _olua_fun_dragonBones_BaseFactory_getArmatureData$1(L); // } } @@ -12628,7 +16633,7 @@ static int _dragonBones_BaseFactory_getArmatureData(lua_State *L) return 0; } -static int _dragonBones_BaseFactory_getClock(lua_State *L) +static int _olua_fun_dragonBones_BaseFactory_getClock(lua_State *L) { olua_startinvoke(L); @@ -12645,7 +16650,7 @@ static int _dragonBones_BaseFactory_getClock(lua_State *L) return num_ret; } -static int _dragonBones_BaseFactory_getDragonBonesData(lua_State *L) +static int _olua_fun_dragonBones_BaseFactory_getDragonBonesData(lua_State *L) { olua_startinvoke(L); @@ -12664,7 +16669,7 @@ static int _dragonBones_BaseFactory_getDragonBonesData(lua_State *L) return num_ret; } -static int _dragonBones_BaseFactory_parseDragonBonesData$1(lua_State *L) +static int _olua_fun_dragonBones_BaseFactory_parseDragonBonesData$1(lua_State *L) { olua_startinvoke(L); @@ -12687,7 +16692,7 @@ static int _dragonBones_BaseFactory_parseDragonBonesData$1(lua_State *L) return num_ret; } -static int _dragonBones_BaseFactory_parseDragonBonesData$2(lua_State *L) +static int _olua_fun_dragonBones_BaseFactory_parseDragonBonesData$2(lua_State *L) { olua_startinvoke(L); @@ -12697,7 +16702,7 @@ static int _dragonBones_BaseFactory_parseDragonBonesData$2(lua_State *L) olua_to_object(L, 1, &self, "db.BaseFactory"); olua_check_string(L, 2, &arg1); - // dragonBones::DragonBonesData *parseDragonBonesData(const char *rawData, @optional const std::string &name, @optional float scale) + // dragonBones::DragonBonesData *parseDragonBonesData(const char *rawData) dragonBones::DragonBonesData *ret = self->parseDragonBonesData(arg1); int num_ret = olua_push_object(L, ret, "db.DragonBonesData"); @@ -12706,7 +16711,7 @@ static int _dragonBones_BaseFactory_parseDragonBonesData$2(lua_State *L) return num_ret; } -static int _dragonBones_BaseFactory_parseDragonBonesData$3(lua_State *L) +static int _olua_fun_dragonBones_BaseFactory_parseDragonBonesData$3(lua_State *L) { olua_startinvoke(L); @@ -12718,7 +16723,7 @@ static int _dragonBones_BaseFactory_parseDragonBonesData$3(lua_State *L) olua_check_string(L, 2, &arg1); olua_check_string(L, 3, &arg2); - // dragonBones::DragonBonesData *parseDragonBonesData(const char *rawData, @optional const std::string &name, @optional float scale) + // dragonBones::DragonBonesData *parseDragonBonesData(const char *rawData, @optional const std::string &name) dragonBones::DragonBonesData *ret = self->parseDragonBonesData(arg1, arg2); int num_ret = olua_push_object(L, ret, "db.DragonBonesData"); @@ -12727,28 +16732,28 @@ static int _dragonBones_BaseFactory_parseDragonBonesData$3(lua_State *L) return num_ret; } -static int _dragonBones_BaseFactory_parseDragonBonesData(lua_State *L) +static int _olua_fun_dragonBones_BaseFactory_parseDragonBonesData(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_string(L, 2))) { - // dragonBones::DragonBonesData *parseDragonBonesData(const char *rawData, @optional const std::string &name, @optional float scale) - return _dragonBones_BaseFactory_parseDragonBonesData$2(L); + // dragonBones::DragonBonesData *parseDragonBonesData(const char *rawData) + return _olua_fun_dragonBones_BaseFactory_parseDragonBonesData$2(L); // } } if (num_args == 2) { // if ((olua_is_string(L, 2)) && (olua_is_string(L, 3))) { - // dragonBones::DragonBonesData *parseDragonBonesData(const char *rawData, @optional const std::string &name, @optional float scale) - return _dragonBones_BaseFactory_parseDragonBonesData$3(L); + // dragonBones::DragonBonesData *parseDragonBonesData(const char *rawData, @optional const std::string &name) + return _olua_fun_dragonBones_BaseFactory_parseDragonBonesData$3(L); // } } if (num_args == 3) { // if ((olua_is_string(L, 2)) && (olua_is_string(L, 3)) && (olua_is_number(L, 4))) { // dragonBones::DragonBonesData *parseDragonBonesData(const char *rawData, @optional const std::string &name, @optional float scale) - return _dragonBones_BaseFactory_parseDragonBonesData$1(L); + return _olua_fun_dragonBones_BaseFactory_parseDragonBonesData$1(L); // } } @@ -12757,7 +16762,7 @@ static int _dragonBones_BaseFactory_parseDragonBonesData(lua_State *L) return 0; } -static int _dragonBones_BaseFactory_parseTextureAtlasData$1(lua_State *L) +static int _olua_fun_dragonBones_BaseFactory_parseTextureAtlasData$1(lua_State *L) { olua_startinvoke(L); @@ -12782,7 +16787,7 @@ static int _dragonBones_BaseFactory_parseTextureAtlasData$1(lua_State *L) return num_ret; } -static int _dragonBones_BaseFactory_parseTextureAtlasData$2(lua_State *L) +static int _olua_fun_dragonBones_BaseFactory_parseTextureAtlasData$2(lua_State *L) { olua_startinvoke(L); @@ -12794,7 +16799,7 @@ static int _dragonBones_BaseFactory_parseTextureAtlasData$2(lua_State *L) olua_check_string(L, 2, &arg1); olua_check_object(L, 3, &arg2, "void *"); - // dragonBones::TextureAtlasData *parseTextureAtlasData(const char *rawData, void *textureAtlas, @optional const std::string &name, @optional float scale) + // dragonBones::TextureAtlasData *parseTextureAtlasData(const char *rawData, void *textureAtlas) dragonBones::TextureAtlasData *ret = self->parseTextureAtlasData(arg1, arg2); int num_ret = olua_push_object(L, ret, "db.TextureAtlasData"); @@ -12803,7 +16808,7 @@ static int _dragonBones_BaseFactory_parseTextureAtlasData$2(lua_State *L) return num_ret; } -static int _dragonBones_BaseFactory_parseTextureAtlasData$3(lua_State *L) +static int _olua_fun_dragonBones_BaseFactory_parseTextureAtlasData$3(lua_State *L) { olua_startinvoke(L); @@ -12817,7 +16822,7 @@ static int _dragonBones_BaseFactory_parseTextureAtlasData$3(lua_State *L) olua_check_object(L, 3, &arg2, "void *"); olua_check_string(L, 4, &arg3); - // dragonBones::TextureAtlasData *parseTextureAtlasData(const char *rawData, void *textureAtlas, @optional const std::string &name, @optional float scale) + // dragonBones::TextureAtlasData *parseTextureAtlasData(const char *rawData, void *textureAtlas, @optional const std::string &name) dragonBones::TextureAtlasData *ret = self->parseTextureAtlasData(arg1, arg2, arg3); int num_ret = olua_push_object(L, ret, "db.TextureAtlasData"); @@ -12826,28 +16831,28 @@ static int _dragonBones_BaseFactory_parseTextureAtlasData$3(lua_State *L) return num_ret; } -static int _dragonBones_BaseFactory_parseTextureAtlasData(lua_State *L) +static int _olua_fun_dragonBones_BaseFactory_parseTextureAtlasData(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 2) { // if ((olua_is_string(L, 2)) && (olua_is_object(L, 3, "void *"))) { - // dragonBones::TextureAtlasData *parseTextureAtlasData(const char *rawData, void *textureAtlas, @optional const std::string &name, @optional float scale) - return _dragonBones_BaseFactory_parseTextureAtlasData$2(L); + // dragonBones::TextureAtlasData *parseTextureAtlasData(const char *rawData, void *textureAtlas) + return _olua_fun_dragonBones_BaseFactory_parseTextureAtlasData$2(L); // } } if (num_args == 3) { // if ((olua_is_string(L, 2)) && (olua_is_object(L, 3, "void *")) && (olua_is_string(L, 4))) { - // dragonBones::TextureAtlasData *parseTextureAtlasData(const char *rawData, void *textureAtlas, @optional const std::string &name, @optional float scale) - return _dragonBones_BaseFactory_parseTextureAtlasData$3(L); + // dragonBones::TextureAtlasData *parseTextureAtlasData(const char *rawData, void *textureAtlas, @optional const std::string &name) + return _olua_fun_dragonBones_BaseFactory_parseTextureAtlasData$3(L); // } } if (num_args == 4) { // if ((olua_is_string(L, 2)) && (olua_is_object(L, 3, "void *")) && (olua_is_string(L, 4)) && (olua_is_number(L, 5))) { // dragonBones::TextureAtlasData *parseTextureAtlasData(const char *rawData, void *textureAtlas, @optional const std::string &name, @optional float scale) - return _dragonBones_BaseFactory_parseTextureAtlasData$1(L); + return _olua_fun_dragonBones_BaseFactory_parseTextureAtlasData$1(L); // } } @@ -12856,7 +16861,7 @@ static int _dragonBones_BaseFactory_parseTextureAtlasData(lua_State *L) return 0; } -static int _dragonBones_BaseFactory_removeDragonBonesData$1(lua_State *L) +static int _olua_fun_dragonBones_BaseFactory_removeDragonBonesData$1(lua_State *L) { olua_startinvoke(L); @@ -12876,7 +16881,7 @@ static int _dragonBones_BaseFactory_removeDragonBonesData$1(lua_State *L) return 0; } -static int _dragonBones_BaseFactory_removeDragonBonesData$2(lua_State *L) +static int _olua_fun_dragonBones_BaseFactory_removeDragonBonesData$2(lua_State *L) { olua_startinvoke(L); @@ -12886,7 +16891,7 @@ static int _dragonBones_BaseFactory_removeDragonBonesData$2(lua_State *L) olua_to_object(L, 1, &self, "db.BaseFactory"); olua_check_string(L, 2, &arg1); - // void removeDragonBonesData(const std::string &name, @optional bool disposeData) + // void removeDragonBonesData(const std::string &name) self->removeDragonBonesData(arg1); olua_endinvoke(L); @@ -12894,21 +16899,21 @@ static int _dragonBones_BaseFactory_removeDragonBonesData$2(lua_State *L) return 0; } -static int _dragonBones_BaseFactory_removeDragonBonesData(lua_State *L) +static int _olua_fun_dragonBones_BaseFactory_removeDragonBonesData(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_string(L, 2))) { - // void removeDragonBonesData(const std::string &name, @optional bool disposeData) - return _dragonBones_BaseFactory_removeDragonBonesData$2(L); + // void removeDragonBonesData(const std::string &name) + return _olua_fun_dragonBones_BaseFactory_removeDragonBonesData$2(L); // } } if (num_args == 2) { // if ((olua_is_string(L, 2)) && (olua_is_bool(L, 3))) { // void removeDragonBonesData(const std::string &name, @optional bool disposeData) - return _dragonBones_BaseFactory_removeDragonBonesData$1(L); + return _olua_fun_dragonBones_BaseFactory_removeDragonBonesData$1(L); // } } @@ -12917,7 +16922,7 @@ static int _dragonBones_BaseFactory_removeDragonBonesData(lua_State *L) return 0; } -static int _dragonBones_BaseFactory_removeTextureAtlasData$1(lua_State *L) +static int _olua_fun_dragonBones_BaseFactory_removeTextureAtlasData$1(lua_State *L) { olua_startinvoke(L); @@ -12937,7 +16942,7 @@ static int _dragonBones_BaseFactory_removeTextureAtlasData$1(lua_State *L) return 0; } -static int _dragonBones_BaseFactory_removeTextureAtlasData$2(lua_State *L) +static int _olua_fun_dragonBones_BaseFactory_removeTextureAtlasData$2(lua_State *L) { olua_startinvoke(L); @@ -12947,7 +16952,7 @@ static int _dragonBones_BaseFactory_removeTextureAtlasData$2(lua_State *L) olua_to_object(L, 1, &self, "db.BaseFactory"); olua_check_string(L, 2, &arg1); - // void removeTextureAtlasData(const std::string &name, @optional bool disposeData) + // void removeTextureAtlasData(const std::string &name) self->removeTextureAtlasData(arg1); olua_endinvoke(L); @@ -12955,21 +16960,21 @@ static int _dragonBones_BaseFactory_removeTextureAtlasData$2(lua_State *L) return 0; } -static int _dragonBones_BaseFactory_removeTextureAtlasData(lua_State *L) +static int _olua_fun_dragonBones_BaseFactory_removeTextureAtlasData(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_string(L, 2))) { - // void removeTextureAtlasData(const std::string &name, @optional bool disposeData) - return _dragonBones_BaseFactory_removeTextureAtlasData$2(L); + // void removeTextureAtlasData(const std::string &name) + return _olua_fun_dragonBones_BaseFactory_removeTextureAtlasData$2(L); // } } if (num_args == 2) { // if ((olua_is_string(L, 2)) && (olua_is_bool(L, 3))) { // void removeTextureAtlasData(const std::string &name, @optional bool disposeData) - return _dragonBones_BaseFactory_removeTextureAtlasData$1(L); + return _olua_fun_dragonBones_BaseFactory_removeTextureAtlasData$1(L); // } } @@ -12978,7 +16983,7 @@ static int _dragonBones_BaseFactory_removeTextureAtlasData(lua_State *L) return 0; } -static int _dragonBones_BaseFactory_replaceAnimation$1(lua_State *L) +static int _olua_fun_dragonBones_BaseFactory_replaceAnimation$1(lua_State *L) { olua_startinvoke(L); @@ -13001,7 +17006,7 @@ static int _dragonBones_BaseFactory_replaceAnimation$1(lua_State *L) return num_ret; } -static int _dragonBones_BaseFactory_replaceAnimation$2(lua_State *L) +static int _olua_fun_dragonBones_BaseFactory_replaceAnimation$2(lua_State *L) { olua_startinvoke(L); @@ -13013,7 +17018,7 @@ static int _dragonBones_BaseFactory_replaceAnimation$2(lua_State *L) olua_check_object(L, 2, &arg1, "db.Armature"); olua_check_object(L, 3, &arg2, "db.ArmatureData"); - // bool replaceAnimation(dragonBones::Armature *armature, dragonBones::ArmatureData *armatureData, @optional bool isReplaceAll) + // bool replaceAnimation(dragonBones::Armature *armature, dragonBones::ArmatureData *armatureData) bool ret = self->replaceAnimation(arg1, arg2); int num_ret = olua_push_bool(L, ret); @@ -13022,21 +17027,21 @@ static int _dragonBones_BaseFactory_replaceAnimation$2(lua_State *L) return num_ret; } -static int _dragonBones_BaseFactory_replaceAnimation(lua_State *L) +static int _olua_fun_dragonBones_BaseFactory_replaceAnimation(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 2) { // if ((olua_is_object(L, 2, "db.Armature")) && (olua_is_object(L, 3, "db.ArmatureData"))) { - // bool replaceAnimation(dragonBones::Armature *armature, dragonBones::ArmatureData *armatureData, @optional bool isReplaceAll) - return _dragonBones_BaseFactory_replaceAnimation$2(L); + // bool replaceAnimation(dragonBones::Armature *armature, dragonBones::ArmatureData *armatureData) + return _olua_fun_dragonBones_BaseFactory_replaceAnimation$2(L); // } } if (num_args == 3) { // if ((olua_is_object(L, 2, "db.Armature")) && (olua_is_object(L, 3, "db.ArmatureData")) && (olua_is_bool(L, 4))) { // bool replaceAnimation(dragonBones::Armature *armature, dragonBones::ArmatureData *armatureData, @optional bool isReplaceAll) - return _dragonBones_BaseFactory_replaceAnimation$1(L); + return _olua_fun_dragonBones_BaseFactory_replaceAnimation$1(L); // } } @@ -13045,7 +17050,7 @@ static int _dragonBones_BaseFactory_replaceAnimation(lua_State *L) return 0; } -static int _dragonBones_BaseFactory_replaceDisplay(lua_State *L) +static int _olua_fun_dragonBones_BaseFactory_replaceDisplay(lua_State *L) { olua_startinvoke(L); @@ -13067,7 +17072,7 @@ static int _dragonBones_BaseFactory_replaceDisplay(lua_State *L) return 0; } -static int _dragonBones_BaseFactory_replaceSkin$1(lua_State *L) +static int _olua_fun_dragonBones_BaseFactory_replaceSkin$1(lua_State *L) { olua_startinvoke(L); @@ -13081,7 +17086,7 @@ static int _dragonBones_BaseFactory_replaceSkin$1(lua_State *L) olua_check_object(L, 2, &arg1, "db.Armature"); olua_check_object(L, 3, &arg2, "db.SkinData"); olua_check_bool(L, 4, &arg3); - olua_check_pointer(L, 5, &arg4, "cc.VectorString"); + olua_check_valueptr(L, 5, &arg4, "cc.types.VectorString"); // bool replaceSkin(dragonBones::Armature *armature, dragonBones::SkinData *skin, @optional bool isOverride, @optional const std::vector *exclude) bool ret = self->replaceSkin(arg1, arg2, arg3, arg4); @@ -13092,7 +17097,7 @@ static int _dragonBones_BaseFactory_replaceSkin$1(lua_State *L) return num_ret; } -static int _dragonBones_BaseFactory_replaceSkin$2(lua_State *L) +static int _olua_fun_dragonBones_BaseFactory_replaceSkin$2(lua_State *L) { olua_startinvoke(L); @@ -13104,7 +17109,7 @@ static int _dragonBones_BaseFactory_replaceSkin$2(lua_State *L) olua_check_object(L, 2, &arg1, "db.Armature"); olua_check_object(L, 3, &arg2, "db.SkinData"); - // bool replaceSkin(dragonBones::Armature *armature, dragonBones::SkinData *skin, @optional bool isOverride, @optional const std::vector *exclude) + // bool replaceSkin(dragonBones::Armature *armature, dragonBones::SkinData *skin) bool ret = self->replaceSkin(arg1, arg2); int num_ret = olua_push_bool(L, ret); @@ -13113,7 +17118,7 @@ static int _dragonBones_BaseFactory_replaceSkin$2(lua_State *L) return num_ret; } -static int _dragonBones_BaseFactory_replaceSkin$3(lua_State *L) +static int _olua_fun_dragonBones_BaseFactory_replaceSkin$3(lua_State *L) { olua_startinvoke(L); @@ -13127,7 +17132,7 @@ static int _dragonBones_BaseFactory_replaceSkin$3(lua_State *L) olua_check_object(L, 3, &arg2, "db.SkinData"); olua_check_bool(L, 4, &arg3); - // bool replaceSkin(dragonBones::Armature *armature, dragonBones::SkinData *skin, @optional bool isOverride, @optional const std::vector *exclude) + // bool replaceSkin(dragonBones::Armature *armature, dragonBones::SkinData *skin, @optional bool isOverride) bool ret = self->replaceSkin(arg1, arg2, arg3); int num_ret = olua_push_bool(L, ret); @@ -13136,28 +17141,28 @@ static int _dragonBones_BaseFactory_replaceSkin$3(lua_State *L) return num_ret; } -static int _dragonBones_BaseFactory_replaceSkin(lua_State *L) +static int _olua_fun_dragonBones_BaseFactory_replaceSkin(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 2) { // if ((olua_is_object(L, 2, "db.Armature")) && (olua_is_object(L, 3, "db.SkinData"))) { - // bool replaceSkin(dragonBones::Armature *armature, dragonBones::SkinData *skin, @optional bool isOverride, @optional const std::vector *exclude) - return _dragonBones_BaseFactory_replaceSkin$2(L); + // bool replaceSkin(dragonBones::Armature *armature, dragonBones::SkinData *skin) + return _olua_fun_dragonBones_BaseFactory_replaceSkin$2(L); // } } if (num_args == 3) { // if ((olua_is_object(L, 2, "db.Armature")) && (olua_is_object(L, 3, "db.SkinData")) && (olua_is_bool(L, 4))) { - // bool replaceSkin(dragonBones::Armature *armature, dragonBones::SkinData *skin, @optional bool isOverride, @optional const std::vector *exclude) - return _dragonBones_BaseFactory_replaceSkin$3(L); + // bool replaceSkin(dragonBones::Armature *armature, dragonBones::SkinData *skin, @optional bool isOverride) + return _olua_fun_dragonBones_BaseFactory_replaceSkin$3(L); // } } if (num_args == 4) { - // if ((olua_is_object(L, 2, "db.Armature")) && (olua_is_object(L, 3, "db.SkinData")) && (olua_is_bool(L, 4)) && (olua_is_pointer(L, 5, "cc.VectorString"))) { + // if ((olua_is_object(L, 2, "db.Armature")) && (olua_is_object(L, 3, "db.SkinData")) && (olua_is_bool(L, 4)) && (olua_is_valueptr(L, 5, "cc.types.VectorString"))) { // bool replaceSkin(dragonBones::Armature *armature, dragonBones::SkinData *skin, @optional bool isOverride, @optional const std::vector *exclude) - return _dragonBones_BaseFactory_replaceSkin$1(L); + return _olua_fun_dragonBones_BaseFactory_replaceSkin$1(L); // } } @@ -13166,7 +17171,7 @@ static int _dragonBones_BaseFactory_replaceSkin(lua_State *L) return 0; } -static int _dragonBones_BaseFactory_replaceSlotDisplay$1(lua_State *L) +static int _olua_fun_dragonBones_BaseFactory_replaceSlotDisplay$1(lua_State *L) { olua_startinvoke(L); @@ -13195,7 +17200,7 @@ static int _dragonBones_BaseFactory_replaceSlotDisplay$1(lua_State *L) return num_ret; } -static int _dragonBones_BaseFactory_replaceSlotDisplay$2(lua_State *L) +static int _olua_fun_dragonBones_BaseFactory_replaceSlotDisplay$2(lua_State *L) { olua_startinvoke(L); @@ -13213,7 +17218,7 @@ static int _dragonBones_BaseFactory_replaceSlotDisplay$2(lua_State *L) olua_check_string(L, 5, &arg4); olua_check_object(L, 6, &arg5, "db.Slot"); - // bool replaceSlotDisplay(const std::string &dragonBonesName, const std::string &armatureName, const std::string &slotName, const std::string &displayName, dragonBones::Slot *slot, @optional int displayIndex) + // bool replaceSlotDisplay(const std::string &dragonBonesName, const std::string &armatureName, const std::string &slotName, const std::string &displayName, dragonBones::Slot *slot) bool ret = self->replaceSlotDisplay(arg1, arg2, arg3, arg4, arg5); int num_ret = olua_push_bool(L, ret); @@ -13222,21 +17227,21 @@ static int _dragonBones_BaseFactory_replaceSlotDisplay$2(lua_State *L) return num_ret; } -static int _dragonBones_BaseFactory_replaceSlotDisplay(lua_State *L) +static int _olua_fun_dragonBones_BaseFactory_replaceSlotDisplay(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 5) { // if ((olua_is_string(L, 2)) && (olua_is_string(L, 3)) && (olua_is_string(L, 4)) && (olua_is_string(L, 5)) && (olua_is_object(L, 6, "db.Slot"))) { - // bool replaceSlotDisplay(const std::string &dragonBonesName, const std::string &armatureName, const std::string &slotName, const std::string &displayName, dragonBones::Slot *slot, @optional int displayIndex) - return _dragonBones_BaseFactory_replaceSlotDisplay$2(L); + // bool replaceSlotDisplay(const std::string &dragonBonesName, const std::string &armatureName, const std::string &slotName, const std::string &displayName, dragonBones::Slot *slot) + return _olua_fun_dragonBones_BaseFactory_replaceSlotDisplay$2(L); // } } if (num_args == 6) { // if ((olua_is_string(L, 2)) && (olua_is_string(L, 3)) && (olua_is_string(L, 4)) && (olua_is_string(L, 5)) && (olua_is_object(L, 6, "db.Slot")) && (olua_is_integer(L, 7))) { // bool replaceSlotDisplay(const std::string &dragonBonesName, const std::string &armatureName, const std::string &slotName, const std::string &displayName, dragonBones::Slot *slot, @optional int displayIndex) - return _dragonBones_BaseFactory_replaceSlotDisplay$1(L); + return _olua_fun_dragonBones_BaseFactory_replaceSlotDisplay$1(L); // } } @@ -13245,7 +17250,7 @@ static int _dragonBones_BaseFactory_replaceSlotDisplay(lua_State *L) return 0; } -static int _dragonBones_BaseFactory_replaceSlotDisplayList(lua_State *L) +static int _olua_fun_dragonBones_BaseFactory_replaceSlotDisplayList(lua_State *L) { olua_startinvoke(L); @@ -13270,121 +17275,125 @@ static int _dragonBones_BaseFactory_replaceSlotDisplayList(lua_State *L) return num_ret; } -static int _dragonBones_BaseFactory_get_autoSearch(lua_State *L) +static int _olua_cls_db_BaseFactory(lua_State *L) { - olua_startinvoke(L); - - dragonBones::BaseFactory *self = nullptr; - - olua_to_object(L, 1, &self, "db.BaseFactory"); - - // bool autoSearch - bool ret = self->autoSearch; - int num_ret = olua_push_bool(L, ret); + oluacls_class(L, "db.BaseFactory"); + oluacls_func(L, "__gc", _olua_fun_dragonBones_BaseFactory___gc); + oluacls_func(L, "__olua_move", _olua_fun_dragonBones_BaseFactory___olua_move); + oluacls_func(L, "addDragonBonesData", _olua_fun_dragonBones_BaseFactory_addDragonBonesData); + oluacls_func(L, "addTextureAtlasData", _olua_fun_dragonBones_BaseFactory_addTextureAtlasData); + oluacls_func(L, "buildArmature", _olua_fun_dragonBones_BaseFactory_buildArmature); + oluacls_func(L, "changeSkin", _olua_fun_dragonBones_BaseFactory_changeSkin); + oluacls_func(L, "clear", _olua_fun_dragonBones_BaseFactory_clear); + oluacls_func(L, "getAllDragonBonesData", _olua_fun_dragonBones_BaseFactory_getAllDragonBonesData); + oluacls_func(L, "getArmatureData", _olua_fun_dragonBones_BaseFactory_getArmatureData); + oluacls_func(L, "getClock", _olua_fun_dragonBones_BaseFactory_getClock); + oluacls_func(L, "getDragonBonesData", _olua_fun_dragonBones_BaseFactory_getDragonBonesData); + oluacls_func(L, "parseDragonBonesData", _olua_fun_dragonBones_BaseFactory_parseDragonBonesData); + oluacls_func(L, "parseTextureAtlasData", _olua_fun_dragonBones_BaseFactory_parseTextureAtlasData); + oluacls_func(L, "removeDragonBonesData", _olua_fun_dragonBones_BaseFactory_removeDragonBonesData); + oluacls_func(L, "removeTextureAtlasData", _olua_fun_dragonBones_BaseFactory_removeTextureAtlasData); + oluacls_func(L, "replaceAnimation", _olua_fun_dragonBones_BaseFactory_replaceAnimation); + oluacls_func(L, "replaceDisplay", _olua_fun_dragonBones_BaseFactory_replaceDisplay); + oluacls_func(L, "replaceSkin", _olua_fun_dragonBones_BaseFactory_replaceSkin); + oluacls_func(L, "replaceSlotDisplay", _olua_fun_dragonBones_BaseFactory_replaceSlotDisplay); + oluacls_func(L, "replaceSlotDisplayList", _olua_fun_dragonBones_BaseFactory_replaceSlotDisplayList); + oluacls_prop(L, "allDragonBonesData", _olua_fun_dragonBones_BaseFactory_getAllDragonBonesData, nullptr); + oluacls_prop(L, "clock", _olua_fun_dragonBones_BaseFactory_getClock, nullptr); + oluacls_prop(L, "autoSearch", _olua_fun_dragonBones_BaseFactory_autoSearch, _olua_fun_dragonBones_BaseFactory_autoSearch); - olua_endinvoke(L); + return 1; +} - return num_ret; +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_db_BaseFactory(lua_State *L) +{ + olua_require(L, "dragonbones", luaopen_dragonbones); + if (!olua_getclass(L, "db.BaseFactory")) { + luaL_error(L, "class not found: dragonBones::BaseFactory"); + } + return 1; } +OLUA_END_DECLS -static int _dragonBones_BaseFactory_set_autoSearch(lua_State *L) +static int _olua_fun_dragonBones_Armature_as(lua_State *L) { olua_startinvoke(L); - dragonBones::BaseFactory *self = nullptr; - bool arg1 = false; /** autoSearch */ - - olua_to_object(L, 1, &self, "db.BaseFactory"); - olua_check_bool(L, 2, &arg1); + dragonBones::Armature *self = nullptr; + const char *arg1 = nullptr; /** cls */ - // bool autoSearch - self->autoSearch = arg1; + olua_to_object(L, 1, &self, "db.Armature"); + olua_check_string(L, 2, &arg1); - olua_endinvoke(L); + do { + if (olua_isa(L, 1, arg1)) { + lua_pushvalue(L, 1); + break; + } + if (olua_strequal(arg1, "db.BaseObject")) { + olua_pushobj_as(L, 1, self, "as.db.BaseObject"); + break; + } - return 0; -} + luaL_error(L, "'dragonBones::Armature' can't cast to '%s'", arg1); + } while (0); -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_dragonBones_BaseFactory(lua_State *L) -{ - oluacls_class(L, "db.BaseFactory"); - oluacls_func(L, "__call", _dragonBones_BaseFactory___call); - oluacls_func(L, "__gc", _dragonBones_BaseFactory___gc); - oluacls_func(L, "__olua_move", _dragonBones_BaseFactory___olua_move); - oluacls_func(L, "addDragonBonesData", _dragonBones_BaseFactory_addDragonBonesData); - oluacls_func(L, "addTextureAtlasData", _dragonBones_BaseFactory_addTextureAtlasData); - oluacls_func(L, "buildArmature", _dragonBones_BaseFactory_buildArmature); - oluacls_func(L, "changeSkin", _dragonBones_BaseFactory_changeSkin); - oluacls_func(L, "clear", _dragonBones_BaseFactory_clear); - oluacls_func(L, "getAllDragonBonesData", _dragonBones_BaseFactory_getAllDragonBonesData); - oluacls_func(L, "getArmatureData", _dragonBones_BaseFactory_getArmatureData); - oluacls_func(L, "getClock", _dragonBones_BaseFactory_getClock); - oluacls_func(L, "getDragonBonesData", _dragonBones_BaseFactory_getDragonBonesData); - oluacls_func(L, "parseDragonBonesData", _dragonBones_BaseFactory_parseDragonBonesData); - oluacls_func(L, "parseTextureAtlasData", _dragonBones_BaseFactory_parseTextureAtlasData); - oluacls_func(L, "removeDragonBonesData", _dragonBones_BaseFactory_removeDragonBonesData); - oluacls_func(L, "removeTextureAtlasData", _dragonBones_BaseFactory_removeTextureAtlasData); - oluacls_func(L, "replaceAnimation", _dragonBones_BaseFactory_replaceAnimation); - oluacls_func(L, "replaceDisplay", _dragonBones_BaseFactory_replaceDisplay); - oluacls_func(L, "replaceSkin", _dragonBones_BaseFactory_replaceSkin); - oluacls_func(L, "replaceSlotDisplay", _dragonBones_BaseFactory_replaceSlotDisplay); - oluacls_func(L, "replaceSlotDisplayList", _dragonBones_BaseFactory_replaceSlotDisplayList); - oluacls_prop(L, "allDragonBonesData", _dragonBones_BaseFactory_getAllDragonBonesData, nullptr); - oluacls_prop(L, "clock", _dragonBones_BaseFactory_getClock, nullptr); - oluacls_prop(L, "autoSearch", _dragonBones_BaseFactory_get_autoSearch, _dragonBones_BaseFactory_set_autoSearch); + olua_endinvoke(L); return 1; } -OLUA_END_DECLS -static int _dragonBones_Armature_advanceTime(lua_State *L) +static int _olua_fun_dragonBones_Armature_clearPool$1(lua_State *L) { olua_startinvoke(L); - dragonBones::Armature *self = nullptr; - float arg1 = 0; /** passedTime */ + std::size_t arg1 = 0; /** classTypeIndex */ - olua_to_object(L, 1, &self, "db.Armature"); - olua_check_number(L, 2, &arg1); + olua_check_integer(L, 1, &arg1); - // void advanceTime(float passedTime) - self->advanceTime(arg1); + // @copyfrom(dragonBones::BaseObject) static void clearPool(@optional std::size_t classTypeIndex) + dragonBones::Armature::clearPool(arg1); olua_endinvoke(L); return 0; } -static int _dragonBones_Armature_as(lua_State *L) +static int _olua_fun_dragonBones_Armature_clearPool$2(lua_State *L) { olua_startinvoke(L); - dragonBones::Armature *self = nullptr; - const char *arg1 = nullptr; /** cls */ + // @copyfrom(dragonBones::BaseObject) static void clearPool() + dragonBones::Armature::clearPool(); - olua_to_object(L, 1, &self, "db.Armature"); - olua_check_string(L, 2, &arg1); + olua_endinvoke(L); - do { - if (olua_isa(L, 1, arg1)) { - lua_pushvalue(L, 1); - break; - } - if (olua_strequal(arg1, "db.IAnimatable")) { - olua_pushobj_as(L, 1, self, "as.db.IAnimatable"); - break; - } + return 0; +} - luaL_error(L, "'dragonBones::Armature' can't cast to '%s'", arg1); - } while (0); +static int _olua_fun_dragonBones_Armature_clearPool(lua_State *L) +{ + int num_args = lua_gettop(L); - olua_endinvoke(L); + if (num_args == 0) { + // @copyfrom(dragonBones::BaseObject) static void clearPool() + return _olua_fun_dragonBones_Armature_clearPool$2(L); + } - return 1; + if (num_args == 1) { + // if ((olua_is_integer(L, 1))) { + // @copyfrom(dragonBones::BaseObject) static void clearPool(@optional std::size_t classTypeIndex) + return _olua_fun_dragonBones_Armature_clearPool$1(L); + // } + } + + luaL_error(L, "method 'dragonBones::Armature::clearPool' not support '%d' arguments", num_args); + + return 0; } -static int _dragonBones_Armature_containsPoint(lua_State *L) +static int _olua_fun_dragonBones_Armature_containsPoint(lua_State *L) { olua_startinvoke(L); @@ -13405,7 +17414,7 @@ static int _dragonBones_Armature_containsPoint(lua_State *L) return num_ret; } -static int _dragonBones_Armature_dispose(lua_State *L) +static int _olua_fun_dragonBones_Armature_dispose(lua_State *L) { olua_startinvoke(L); @@ -13421,7 +17430,7 @@ static int _dragonBones_Armature_dispose(lua_State *L) return 0; } -static int _dragonBones_Armature_getAnimatable(lua_State *L) +static int _olua_fun_dragonBones_Armature_getAnimatable(lua_State *L) { olua_startinvoke(L); @@ -13438,7 +17447,7 @@ static int _dragonBones_Armature_getAnimatable(lua_State *L) return num_ret; } -static int _dragonBones_Armature_getAnimation(lua_State *L) +static int _olua_fun_dragonBones_Armature_getAnimation(lua_State *L) { olua_startinvoke(L); @@ -13455,7 +17464,7 @@ static int _dragonBones_Armature_getAnimation(lua_State *L) return num_ret; } -static int _dragonBones_Armature_getArmatureData(lua_State *L) +static int _olua_fun_dragonBones_Armature_getArmatureData(lua_State *L) { olua_startinvoke(L); @@ -13472,7 +17481,7 @@ static int _dragonBones_Armature_getArmatureData(lua_State *L) return num_ret; } -static int _dragonBones_Armature_getBone(lua_State *L) +static int _olua_fun_dragonBones_Armature_getBone(lua_State *L) { olua_startinvoke(L); @@ -13491,7 +17500,7 @@ static int _dragonBones_Armature_getBone(lua_State *L) return num_ret; } -static int _dragonBones_Armature_getBoneByDisplay(lua_State *L) +static int _olua_fun_dragonBones_Armature_getBoneByDisplay(lua_State *L) { olua_startinvoke(L); @@ -13510,7 +17519,7 @@ static int _dragonBones_Armature_getBoneByDisplay(lua_State *L) return num_ret; } -static int _dragonBones_Armature_getBones(lua_State *L) +static int _olua_fun_dragonBones_Armature_getBones(lua_State *L) { olua_startinvoke(L); @@ -13529,7 +17538,7 @@ static int _dragonBones_Armature_getBones(lua_State *L) return num_ret; } -static int _dragonBones_Armature_getCacheFrameRate(lua_State *L) +static int _olua_fun_dragonBones_Armature_getCacheFrameRate(lua_State *L) { olua_startinvoke(L); @@ -13546,7 +17555,7 @@ static int _dragonBones_Armature_getCacheFrameRate(lua_State *L) return num_ret; } -static int _dragonBones_Armature_getClock(lua_State *L) +static int _olua_fun_dragonBones_Armature_getClassTypeIndex(lua_State *L) { olua_startinvoke(L); @@ -13554,16 +17563,16 @@ static int _dragonBones_Armature_getClock(lua_State *L) olua_to_object(L, 1, &self, "db.Armature"); - // dragonBones::WorldClock *getClock() - dragonBones::WorldClock *ret = self->getClock(); - int num_ret = olua_push_object(L, ret, "db.WorldClock"); + // std::size_t getClassTypeIndex() + std::size_t ret = self->getClassTypeIndex(); + int num_ret = olua_push_integer(L, ret); olua_endinvoke(L); return num_ret; } -static int _dragonBones_Armature_getDisplay(lua_State *L) +static int _olua_fun_dragonBones_Armature_getDisplay(lua_State *L) { olua_startinvoke(L); @@ -13580,7 +17589,7 @@ static int _dragonBones_Armature_getDisplay(lua_State *L) return num_ret; } -static int _dragonBones_Armature_getEventDispatcher(lua_State *L) +static int _olua_fun_dragonBones_Armature_getEventDispatcher(lua_State *L) { olua_startinvoke(L); @@ -13597,7 +17606,7 @@ static int _dragonBones_Armature_getEventDispatcher(lua_State *L) return num_ret; } -static int _dragonBones_Armature_getFlipX(lua_State *L) +static int _olua_fun_dragonBones_Armature_getFlipX(lua_State *L) { olua_startinvoke(L); @@ -13614,7 +17623,7 @@ static int _dragonBones_Armature_getFlipX(lua_State *L) return num_ret; } -static int _dragonBones_Armature_getFlipY(lua_State *L) +static int _olua_fun_dragonBones_Armature_getFlipY(lua_State *L) { olua_startinvoke(L); @@ -13631,7 +17640,7 @@ static int _dragonBones_Armature_getFlipY(lua_State *L) return num_ret; } -static int _dragonBones_Armature_getName(lua_State *L) +static int _olua_fun_dragonBones_Armature_getName(lua_State *L) { olua_startinvoke(L); @@ -13648,7 +17657,7 @@ static int _dragonBones_Armature_getName(lua_State *L) return num_ret; } -static int _dragonBones_Armature_getParent(lua_State *L) +static int _olua_fun_dragonBones_Armature_getParent(lua_State *L) { olua_startinvoke(L); @@ -13665,7 +17674,7 @@ static int _dragonBones_Armature_getParent(lua_State *L) return num_ret; } -static int _dragonBones_Armature_getProxy(lua_State *L) +static int _olua_fun_dragonBones_Armature_getProxy(lua_State *L) { olua_startinvoke(L); @@ -13682,7 +17691,7 @@ static int _dragonBones_Armature_getProxy(lua_State *L) return num_ret; } -static int _dragonBones_Armature_getReplacedTexture(lua_State *L) +static int _olua_fun_dragonBones_Armature_getReplacedTexture(lua_State *L) { olua_startinvoke(L); @@ -13699,7 +17708,7 @@ static int _dragonBones_Armature_getReplacedTexture(lua_State *L) return num_ret; } -static int _dragonBones_Armature_getSlot(lua_State *L) +static int _olua_fun_dragonBones_Armature_getSlot(lua_State *L) { olua_startinvoke(L); @@ -13718,7 +17727,7 @@ static int _dragonBones_Armature_getSlot(lua_State *L) return num_ret; } -static int _dragonBones_Armature_getSlotByDisplay(lua_State *L) +static int _olua_fun_dragonBones_Armature_getSlotByDisplay(lua_State *L) { olua_startinvoke(L); @@ -13737,7 +17746,7 @@ static int _dragonBones_Armature_getSlotByDisplay(lua_State *L) return num_ret; } -static int _dragonBones_Armature_getSlots(lua_State *L) +static int _olua_fun_dragonBones_Armature_getSlots(lua_State *L) { olua_startinvoke(L); @@ -13756,7 +17765,7 @@ static int _dragonBones_Armature_getSlots(lua_State *L) return num_ret; } -static int _dragonBones_Armature_getTypeIndex(lua_State *L) +static int _olua_fun_dragonBones_Armature_getTypeIndex(lua_State *L) { olua_startinvoke(L); @@ -13764,12 +17773,85 @@ static int _dragonBones_Armature_getTypeIndex(lua_State *L) std::size_t ret = dragonBones::Armature::getTypeIndex(); int num_ret = olua_push_integer(L, ret); - olua_endinvoke(L); + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_dragonBones_Armature_hashCode(lua_State *L) +{ + olua_startinvoke(L); + + dragonBones::Armature *self = nullptr; + + olua_to_object(L, 1, &self, "db.Armature"); + + // @readonly @copyfrom(dragonBones::BaseObject) const unsigned int hashCode + const unsigned int ret = self->hashCode; + int num_ret = olua_push_integer(L, ret); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_dragonBones_Armature_inheritAnimation$1(lua_State *L) +{ + olua_startinvoke(L); + + dragonBones::Armature *self = nullptr; + + olua_to_object(L, 1, &self, "db.Armature"); + + // bool inheritAnimation + bool ret = self->inheritAnimation; + int num_ret = olua_push_bool(L, ret); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_dragonBones_Armature_inheritAnimation$2(lua_State *L) +{ + olua_startinvoke(L); + + dragonBones::Armature *self = nullptr; + bool arg1 = false; /** inheritAnimation */ + + olua_to_object(L, 1, &self, "db.Armature"); + olua_check_bool(L, 2, &arg1); + + // bool inheritAnimation + self->inheritAnimation = arg1; + + olua_endinvoke(L); + + return 0; +} + +static int _olua_fun_dragonBones_Armature_inheritAnimation(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // bool inheritAnimation + return _olua_fun_dragonBones_Armature_inheritAnimation$1(L); + } + + if (num_args == 1) { + // if ((olua_is_bool(L, 2))) { + // bool inheritAnimation + return _olua_fun_dragonBones_Armature_inheritAnimation$2(L); + // } + } - return num_ret; + luaL_error(L, "method 'dragonBones::Armature::inheritAnimation' not support '%d' arguments", num_args); + + return 0; } -static int _dragonBones_Armature_init(lua_State *L) +static int _olua_fun_dragonBones_Armature_init(lua_State *L) { olua_startinvoke(L); @@ -13793,7 +17875,7 @@ static int _dragonBones_Armature_init(lua_State *L) return 0; } -static int _dragonBones_Armature_intersectsSegment$1(lua_State *L) +static int _olua_fun_dragonBones_Armature_intersectsSegment$1(lua_State *L) { olua_startinvoke(L); @@ -13824,7 +17906,7 @@ static int _dragonBones_Armature_intersectsSegment$1(lua_State *L) return num_ret; } -static int _dragonBones_Armature_intersectsSegment$2(lua_State *L) +static int _olua_fun_dragonBones_Armature_intersectsSegment$2(lua_State *L) { olua_startinvoke(L); @@ -13840,7 +17922,7 @@ static int _dragonBones_Armature_intersectsSegment$2(lua_State *L) olua_check_number(L, 4, &arg3); olua_check_number(L, 5, &arg4); - // dragonBones::Slot *intersectsSegment(float xA, float yA, float xB, float yB, @optional dragonBones::Point *intersectionPointA, @optional dragonBones::Point *intersectionPointB, @optional dragonBones::Point *normalRadians) + // dragonBones::Slot *intersectsSegment(float xA, float yA, float xB, float yB) dragonBones::Slot *ret = self->intersectsSegment(arg1, arg2, arg3, arg4); int num_ret = olua_push_object(L, ret, "db.Slot"); @@ -13849,7 +17931,7 @@ static int _dragonBones_Armature_intersectsSegment$2(lua_State *L) return num_ret; } -static int _dragonBones_Armature_intersectsSegment$3(lua_State *L) +static int _olua_fun_dragonBones_Armature_intersectsSegment$3(lua_State *L) { olua_startinvoke(L); @@ -13867,7 +17949,7 @@ static int _dragonBones_Armature_intersectsSegment$3(lua_State *L) olua_check_number(L, 5, &arg4); olua_check_object(L, 6, &arg5, "db.Point"); - // dragonBones::Slot *intersectsSegment(float xA, float yA, float xB, float yB, @optional dragonBones::Point *intersectionPointA, @optional dragonBones::Point *intersectionPointB, @optional dragonBones::Point *normalRadians) + // dragonBones::Slot *intersectsSegment(float xA, float yA, float xB, float yB, @optional dragonBones::Point *intersectionPointA) dragonBones::Slot *ret = self->intersectsSegment(arg1, arg2, arg3, arg4, arg5); int num_ret = olua_push_object(L, ret, "db.Slot"); @@ -13876,7 +17958,7 @@ static int _dragonBones_Armature_intersectsSegment$3(lua_State *L) return num_ret; } -static int _dragonBones_Armature_intersectsSegment$4(lua_State *L) +static int _olua_fun_dragonBones_Armature_intersectsSegment$4(lua_State *L) { olua_startinvoke(L); @@ -13896,7 +17978,7 @@ static int _dragonBones_Armature_intersectsSegment$4(lua_State *L) olua_check_object(L, 6, &arg5, "db.Point"); olua_check_object(L, 7, &arg6, "db.Point"); - // dragonBones::Slot *intersectsSegment(float xA, float yA, float xB, float yB, @optional dragonBones::Point *intersectionPointA, @optional dragonBones::Point *intersectionPointB, @optional dragonBones::Point *normalRadians) + // dragonBones::Slot *intersectsSegment(float xA, float yA, float xB, float yB, @optional dragonBones::Point *intersectionPointA, @optional dragonBones::Point *intersectionPointB) dragonBones::Slot *ret = self->intersectsSegment(arg1, arg2, arg3, arg4, arg5, arg6); int num_ret = olua_push_object(L, ret, "db.Slot"); @@ -13905,35 +17987,35 @@ static int _dragonBones_Armature_intersectsSegment$4(lua_State *L) return num_ret; } -static int _dragonBones_Armature_intersectsSegment(lua_State *L) +static int _olua_fun_dragonBones_Armature_intersectsSegment(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 4) { // if ((olua_is_number(L, 2)) && (olua_is_number(L, 3)) && (olua_is_number(L, 4)) && (olua_is_number(L, 5))) { - // dragonBones::Slot *intersectsSegment(float xA, float yA, float xB, float yB, @optional dragonBones::Point *intersectionPointA, @optional dragonBones::Point *intersectionPointB, @optional dragonBones::Point *normalRadians) - return _dragonBones_Armature_intersectsSegment$2(L); + // dragonBones::Slot *intersectsSegment(float xA, float yA, float xB, float yB) + return _olua_fun_dragonBones_Armature_intersectsSegment$2(L); // } } if (num_args == 5) { // if ((olua_is_number(L, 2)) && (olua_is_number(L, 3)) && (olua_is_number(L, 4)) && (olua_is_number(L, 5)) && (olua_is_object(L, 6, "db.Point"))) { - // dragonBones::Slot *intersectsSegment(float xA, float yA, float xB, float yB, @optional dragonBones::Point *intersectionPointA, @optional dragonBones::Point *intersectionPointB, @optional dragonBones::Point *normalRadians) - return _dragonBones_Armature_intersectsSegment$3(L); + // dragonBones::Slot *intersectsSegment(float xA, float yA, float xB, float yB, @optional dragonBones::Point *intersectionPointA) + return _olua_fun_dragonBones_Armature_intersectsSegment$3(L); // } } if (num_args == 6) { // if ((olua_is_number(L, 2)) && (olua_is_number(L, 3)) && (olua_is_number(L, 4)) && (olua_is_number(L, 5)) && (olua_is_object(L, 6, "db.Point")) && (olua_is_object(L, 7, "db.Point"))) { - // dragonBones::Slot *intersectsSegment(float xA, float yA, float xB, float yB, @optional dragonBones::Point *intersectionPointA, @optional dragonBones::Point *intersectionPointB, @optional dragonBones::Point *normalRadians) - return _dragonBones_Armature_intersectsSegment$4(L); + // dragonBones::Slot *intersectsSegment(float xA, float yA, float xB, float yB, @optional dragonBones::Point *intersectionPointA, @optional dragonBones::Point *intersectionPointB) + return _olua_fun_dragonBones_Armature_intersectsSegment$4(L); // } } if (num_args == 7) { // if ((olua_is_number(L, 2)) && (olua_is_number(L, 3)) && (olua_is_number(L, 4)) && (olua_is_number(L, 5)) && (olua_is_object(L, 6, "db.Point")) && (olua_is_object(L, 7, "db.Point")) && (olua_is_object(L, 8, "db.Point"))) { // dragonBones::Slot *intersectsSegment(float xA, float yA, float xB, float yB, @optional dragonBones::Point *intersectionPointA, @optional dragonBones::Point *intersectionPointB, @optional dragonBones::Point *normalRadians) - return _dragonBones_Armature_intersectsSegment$1(L); + return _olua_fun_dragonBones_Armature_intersectsSegment$1(L); // } } @@ -13942,7 +18024,7 @@ static int _dragonBones_Armature_intersectsSegment(lua_State *L) return 0; } -static int _dragonBones_Armature_invalidUpdate$1(lua_State *L) +static int _olua_fun_dragonBones_Armature_invalidUpdate$1(lua_State *L) { olua_startinvoke(L); @@ -13962,7 +18044,7 @@ static int _dragonBones_Armature_invalidUpdate$1(lua_State *L) return 0; } -static int _dragonBones_Armature_invalidUpdate$2(lua_State *L) +static int _olua_fun_dragonBones_Armature_invalidUpdate$2(lua_State *L) { olua_startinvoke(L); @@ -13970,7 +18052,7 @@ static int _dragonBones_Armature_invalidUpdate$2(lua_State *L) olua_to_object(L, 1, &self, "db.Armature"); - // void invalidUpdate(@optional const std::string &boneName, @optional bool updateSlot) + // void invalidUpdate() self->invalidUpdate(); olua_endinvoke(L); @@ -13978,7 +18060,7 @@ static int _dragonBones_Armature_invalidUpdate$2(lua_State *L) return 0; } -static int _dragonBones_Armature_invalidUpdate$3(lua_State *L) +static int _olua_fun_dragonBones_Armature_invalidUpdate$3(lua_State *L) { olua_startinvoke(L); @@ -13988,7 +18070,7 @@ static int _dragonBones_Armature_invalidUpdate$3(lua_State *L) olua_to_object(L, 1, &self, "db.Armature"); olua_check_string(L, 2, &arg1); - // void invalidUpdate(@optional const std::string &boneName, @optional bool updateSlot) + // void invalidUpdate(@optional const std::string &boneName) self->invalidUpdate(arg1); olua_endinvoke(L); @@ -13996,26 +18078,26 @@ static int _dragonBones_Armature_invalidUpdate$3(lua_State *L) return 0; } -static int _dragonBones_Armature_invalidUpdate(lua_State *L) +static int _olua_fun_dragonBones_Armature_invalidUpdate(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 0) { - // void invalidUpdate(@optional const std::string &boneName, @optional bool updateSlot) - return _dragonBones_Armature_invalidUpdate$2(L); + // void invalidUpdate() + return _olua_fun_dragonBones_Armature_invalidUpdate$2(L); } if (num_args == 1) { // if ((olua_is_string(L, 2))) { - // void invalidUpdate(@optional const std::string &boneName, @optional bool updateSlot) - return _dragonBones_Armature_invalidUpdate$3(L); + // void invalidUpdate(@optional const std::string &boneName) + return _olua_fun_dragonBones_Armature_invalidUpdate$3(L); // } } if (num_args == 2) { // if ((olua_is_string(L, 2)) && (olua_is_bool(L, 3))) { // void invalidUpdate(@optional const std::string &boneName, @optional bool updateSlot) - return _dragonBones_Armature_invalidUpdate$1(L); + return _olua_fun_dragonBones_Armature_invalidUpdate$1(L); // } } @@ -14024,11 +18106,11 @@ static int _dragonBones_Armature_invalidUpdate(lua_State *L) return 0; } -static int _dragonBones_Armature_new(lua_State *L) +static int _olua_fun_dragonBones_Armature_new(lua_State *L) { olua_startinvoke(L); - // Armature() + // dragonBones::Armature() dragonBones::Armature *ret = new dragonBones::Armature(); int num_ret = olua_push_object(L, ret, "db.Armature"); olua_postnew(L, ret); @@ -14038,43 +18120,41 @@ static int _dragonBones_Armature_new(lua_State *L) return num_ret; } -static int _dragonBones_Armature_setCacheFrameRate(lua_State *L) +static int _olua_fun_dragonBones_Armature_returnToPool(lua_State *L) { olua_startinvoke(L); dragonBones::Armature *self = nullptr; - unsigned int arg1 = 0; /** value */ olua_to_object(L, 1, &self, "db.Armature"); - olua_check_integer(L, 2, &arg1); - // void setCacheFrameRate(unsigned int value) - self->setCacheFrameRate(arg1); + // @copyfrom(dragonBones::BaseObject) void returnToPool() + self->returnToPool(); olua_endinvoke(L); return 0; } -static int _dragonBones_Armature_setClock(lua_State *L) +static int _olua_fun_dragonBones_Armature_setCacheFrameRate(lua_State *L) { olua_startinvoke(L); dragonBones::Armature *self = nullptr; - dragonBones::WorldClock *arg1 = nullptr; /** value */ + unsigned int arg1 = 0; /** value */ olua_to_object(L, 1, &self, "db.Armature"); - olua_check_object(L, 2, &arg1, "db.WorldClock"); + olua_check_integer(L, 2, &arg1); - // void setClock(dragonBones::WorldClock *value) - self->setClock(arg1); + // void setCacheFrameRate(unsigned int value) + self->setCacheFrameRate(arg1); olua_endinvoke(L); return 0; } -static int _dragonBones_Armature_setFlipX(lua_State *L) +static int _olua_fun_dragonBones_Armature_setFlipX(lua_State *L) { olua_startinvoke(L); @@ -14092,7 +18172,7 @@ static int _dragonBones_Armature_setFlipX(lua_State *L) return 0; } -static int _dragonBones_Armature_setFlipY(lua_State *L) +static int _olua_fun_dragonBones_Armature_setFlipY(lua_State *L) { olua_startinvoke(L); @@ -14110,60 +18190,43 @@ static int _dragonBones_Armature_setFlipY(lua_State *L) return 0; } -static int _dragonBones_Armature_setReplacedTexture(lua_State *L) +static int _olua_fun_dragonBones_Armature_setMaxCount(lua_State *L) { olua_startinvoke(L); - dragonBones::Armature *self = nullptr; - void *arg1 = nullptr; /** value */ + std::size_t arg1 = 0; /** classTypeIndex */ + unsigned int arg2 = 0; /** maxCount */ - olua_to_object(L, 1, &self, "db.Armature"); - olua_check_object(L, 2, &arg1, "void *"); + olua_check_integer(L, 1, &arg1); + olua_check_integer(L, 2, &arg2); - // void setReplacedTexture(void *value) - self->setReplacedTexture(arg1); + // @copyfrom(dragonBones::BaseObject) static void setMaxCount(std::size_t classTypeIndex, unsigned int maxCount) + dragonBones::Armature::setMaxCount(arg1, arg2); olua_endinvoke(L); return 0; } -static int _dragonBones_Armature_get_inheritAnimation(lua_State *L) -{ - olua_startinvoke(L); - - dragonBones::Armature *self = nullptr; - - olua_to_object(L, 1, &self, "db.Armature"); - - // bool inheritAnimation - bool ret = self->inheritAnimation; - int num_ret = olua_push_bool(L, ret); - - olua_endinvoke(L); - - return num_ret; -} - -static int _dragonBones_Armature_set_inheritAnimation(lua_State *L) +static int _olua_fun_dragonBones_Armature_setReplacedTexture(lua_State *L) { olua_startinvoke(L); dragonBones::Armature *self = nullptr; - bool arg1 = false; /** inheritAnimation */ + void *arg1 = nullptr; /** value */ olua_to_object(L, 1, &self, "db.Armature"); - olua_check_bool(L, 2, &arg1); + olua_check_object(L, 2, &arg1, "void *"); - // bool inheritAnimation - self->inheritAnimation = arg1; + // void setReplacedTexture(void *value) + self->setReplacedTexture(arg1); olua_endinvoke(L); return 0; } -static int _dragonBones_Armature_get_userData(lua_State *L) +static int _olua_fun_dragonBones_Armature_userData$1(lua_State *L) { olua_startinvoke(L); @@ -14180,7 +18243,7 @@ static int _dragonBones_Armature_get_userData(lua_State *L) return num_ret; } -static int _dragonBones_Armature_set_userData(lua_State *L) +static int _olua_fun_dragonBones_Armature_userData$2(lua_State *L) { olua_startinvoke(L); @@ -14198,67 +18261,98 @@ static int _dragonBones_Armature_set_userData(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_dragonBones_Armature(lua_State *L) -{ - oluacls_class(L, "db.Armature"); - oluacls_func(L, "advanceTime", _dragonBones_Armature_advanceTime); - oluacls_func(L, "as", _dragonBones_Armature_as); - oluacls_func(L, "containsPoint", _dragonBones_Armature_containsPoint); - oluacls_func(L, "dispose", _dragonBones_Armature_dispose); - oluacls_func(L, "getAnimatable", _dragonBones_Armature_getAnimatable); - oluacls_func(L, "getAnimation", _dragonBones_Armature_getAnimation); - oluacls_func(L, "getArmatureData", _dragonBones_Armature_getArmatureData); - oluacls_func(L, "getBone", _dragonBones_Armature_getBone); - oluacls_func(L, "getBoneByDisplay", _dragonBones_Armature_getBoneByDisplay); - oluacls_func(L, "getBones", _dragonBones_Armature_getBones); - oluacls_func(L, "getCacheFrameRate", _dragonBones_Armature_getCacheFrameRate); - oluacls_func(L, "getClock", _dragonBones_Armature_getClock); - oluacls_func(L, "getDisplay", _dragonBones_Armature_getDisplay); - oluacls_func(L, "getEventDispatcher", _dragonBones_Armature_getEventDispatcher); - oluacls_func(L, "getFlipX", _dragonBones_Armature_getFlipX); - oluacls_func(L, "getFlipY", _dragonBones_Armature_getFlipY); - oluacls_func(L, "getName", _dragonBones_Armature_getName); - oluacls_func(L, "getParent", _dragonBones_Armature_getParent); - oluacls_func(L, "getProxy", _dragonBones_Armature_getProxy); - oluacls_func(L, "getReplacedTexture", _dragonBones_Armature_getReplacedTexture); - oluacls_func(L, "getSlot", _dragonBones_Armature_getSlot); - oluacls_func(L, "getSlotByDisplay", _dragonBones_Armature_getSlotByDisplay); - oluacls_func(L, "getSlots", _dragonBones_Armature_getSlots); - oluacls_func(L, "getTypeIndex", _dragonBones_Armature_getTypeIndex); - oluacls_func(L, "init", _dragonBones_Armature_init); - oluacls_func(L, "intersectsSegment", _dragonBones_Armature_intersectsSegment); - oluacls_func(L, "invalidUpdate", _dragonBones_Armature_invalidUpdate); - oluacls_func(L, "new", _dragonBones_Armature_new); - oluacls_func(L, "setCacheFrameRate", _dragonBones_Armature_setCacheFrameRate); - oluacls_func(L, "setClock", _dragonBones_Armature_setClock); - oluacls_func(L, "setFlipX", _dragonBones_Armature_setFlipX); - oluacls_func(L, "setFlipY", _dragonBones_Armature_setFlipY); - oluacls_func(L, "setReplacedTexture", _dragonBones_Armature_setReplacedTexture); - oluacls_prop(L, "animatable", _dragonBones_Armature_getAnimatable, nullptr); - oluacls_prop(L, "animation", _dragonBones_Armature_getAnimation, nullptr); - oluacls_prop(L, "armatureData", _dragonBones_Armature_getArmatureData, nullptr); - oluacls_prop(L, "bones", _dragonBones_Armature_getBones, nullptr); - oluacls_prop(L, "cacheFrameRate", _dragonBones_Armature_getCacheFrameRate, _dragonBones_Armature_setCacheFrameRate); - oluacls_prop(L, "clock", _dragonBones_Armature_getClock, _dragonBones_Armature_setClock); - oluacls_prop(L, "display", _dragonBones_Armature_getDisplay, nullptr); - oluacls_prop(L, "eventDispatcher", _dragonBones_Armature_getEventDispatcher, nullptr); - oluacls_prop(L, "flipX", _dragonBones_Armature_getFlipX, _dragonBones_Armature_setFlipX); - oluacls_prop(L, "flipY", _dragonBones_Armature_getFlipY, _dragonBones_Armature_setFlipY); - oluacls_prop(L, "name", _dragonBones_Armature_getName, nullptr); - oluacls_prop(L, "parent", _dragonBones_Armature_getParent, nullptr); - oluacls_prop(L, "proxy", _dragonBones_Armature_getProxy, nullptr); - oluacls_prop(L, "replacedTexture", _dragonBones_Armature_getReplacedTexture, _dragonBones_Armature_setReplacedTexture); - oluacls_prop(L, "slots", _dragonBones_Armature_getSlots, nullptr); - oluacls_prop(L, "typeIndex", _dragonBones_Armature_getTypeIndex, nullptr); - oluacls_prop(L, "inheritAnimation", _dragonBones_Armature_get_inheritAnimation, _dragonBones_Armature_set_inheritAnimation); - oluacls_prop(L, "userData", _dragonBones_Armature_get_userData, _dragonBones_Armature_set_userData); +static int _olua_fun_dragonBones_Armature_userData(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // void *userData + return _olua_fun_dragonBones_Armature_userData$1(L); + } + + if (num_args == 1) { + // if ((olua_is_object(L, 2, "void *"))) { + // void *userData + return _olua_fun_dragonBones_Armature_userData$2(L); + // } + } + + luaL_error(L, "method 'dragonBones::Armature::userData' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_cls_db_Armature(lua_State *L) +{ + oluacls_class(L, "db.Armature"); + oluacls_func(L, "as", _olua_fun_dragonBones_Armature_as); + oluacls_func(L, "clearPool", _olua_fun_dragonBones_Armature_clearPool); + oluacls_func(L, "containsPoint", _olua_fun_dragonBones_Armature_containsPoint); + oluacls_func(L, "dispose", _olua_fun_dragonBones_Armature_dispose); + oluacls_func(L, "getAnimatable", _olua_fun_dragonBones_Armature_getAnimatable); + oluacls_func(L, "getAnimation", _olua_fun_dragonBones_Armature_getAnimation); + oluacls_func(L, "getArmatureData", _olua_fun_dragonBones_Armature_getArmatureData); + oluacls_func(L, "getBone", _olua_fun_dragonBones_Armature_getBone); + oluacls_func(L, "getBoneByDisplay", _olua_fun_dragonBones_Armature_getBoneByDisplay); + oluacls_func(L, "getBones", _olua_fun_dragonBones_Armature_getBones); + oluacls_func(L, "getCacheFrameRate", _olua_fun_dragonBones_Armature_getCacheFrameRate); + oluacls_func(L, "getClassTypeIndex", _olua_fun_dragonBones_Armature_getClassTypeIndex); + oluacls_func(L, "getDisplay", _olua_fun_dragonBones_Armature_getDisplay); + oluacls_func(L, "getEventDispatcher", _olua_fun_dragonBones_Armature_getEventDispatcher); + oluacls_func(L, "getFlipX", _olua_fun_dragonBones_Armature_getFlipX); + oluacls_func(L, "getFlipY", _olua_fun_dragonBones_Armature_getFlipY); + oluacls_func(L, "getName", _olua_fun_dragonBones_Armature_getName); + oluacls_func(L, "getParent", _olua_fun_dragonBones_Armature_getParent); + oluacls_func(L, "getProxy", _olua_fun_dragonBones_Armature_getProxy); + oluacls_func(L, "getReplacedTexture", _olua_fun_dragonBones_Armature_getReplacedTexture); + oluacls_func(L, "getSlot", _olua_fun_dragonBones_Armature_getSlot); + oluacls_func(L, "getSlotByDisplay", _olua_fun_dragonBones_Armature_getSlotByDisplay); + oluacls_func(L, "getSlots", _olua_fun_dragonBones_Armature_getSlots); + oluacls_func(L, "getTypeIndex", _olua_fun_dragonBones_Armature_getTypeIndex); + oluacls_func(L, "init", _olua_fun_dragonBones_Armature_init); + oluacls_func(L, "intersectsSegment", _olua_fun_dragonBones_Armature_intersectsSegment); + oluacls_func(L, "invalidUpdate", _olua_fun_dragonBones_Armature_invalidUpdate); + oluacls_func(L, "new", _olua_fun_dragonBones_Armature_new); + oluacls_func(L, "returnToPool", _olua_fun_dragonBones_Armature_returnToPool); + oluacls_func(L, "setCacheFrameRate", _olua_fun_dragonBones_Armature_setCacheFrameRate); + oluacls_func(L, "setFlipX", _olua_fun_dragonBones_Armature_setFlipX); + oluacls_func(L, "setFlipY", _olua_fun_dragonBones_Armature_setFlipY); + oluacls_func(L, "setMaxCount", _olua_fun_dragonBones_Armature_setMaxCount); + oluacls_func(L, "setReplacedTexture", _olua_fun_dragonBones_Armature_setReplacedTexture); + oluacls_prop(L, "animatable", _olua_fun_dragonBones_Armature_getAnimatable, nullptr); + oluacls_prop(L, "animation", _olua_fun_dragonBones_Armature_getAnimation, nullptr); + oluacls_prop(L, "armatureData", _olua_fun_dragonBones_Armature_getArmatureData, nullptr); + oluacls_prop(L, "bones", _olua_fun_dragonBones_Armature_getBones, nullptr); + oluacls_prop(L, "cacheFrameRate", _olua_fun_dragonBones_Armature_getCacheFrameRate, _olua_fun_dragonBones_Armature_setCacheFrameRate); + oluacls_prop(L, "classTypeIndex", _olua_fun_dragonBones_Armature_getClassTypeIndex, nullptr); + oluacls_prop(L, "display", _olua_fun_dragonBones_Armature_getDisplay, nullptr); + oluacls_prop(L, "eventDispatcher", _olua_fun_dragonBones_Armature_getEventDispatcher, nullptr); + oluacls_prop(L, "flipX", _olua_fun_dragonBones_Armature_getFlipX, _olua_fun_dragonBones_Armature_setFlipX); + oluacls_prop(L, "flipY", _olua_fun_dragonBones_Armature_getFlipY, _olua_fun_dragonBones_Armature_setFlipY); + oluacls_prop(L, "name", _olua_fun_dragonBones_Armature_getName, nullptr); + oluacls_prop(L, "parent", _olua_fun_dragonBones_Armature_getParent, nullptr); + oluacls_prop(L, "proxy", _olua_fun_dragonBones_Armature_getProxy, nullptr); + oluacls_prop(L, "replacedTexture", _olua_fun_dragonBones_Armature_getReplacedTexture, _olua_fun_dragonBones_Armature_setReplacedTexture); + oluacls_prop(L, "slots", _olua_fun_dragonBones_Armature_getSlots, nullptr); + oluacls_prop(L, "typeIndex", _olua_fun_dragonBones_Armature_getTypeIndex, nullptr); + oluacls_prop(L, "inheritAnimation", _olua_fun_dragonBones_Armature_inheritAnimation, _olua_fun_dragonBones_Armature_inheritAnimation); + oluacls_prop(L, "userData", _olua_fun_dragonBones_Armature_userData, _olua_fun_dragonBones_Armature_userData); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_db_Armature(lua_State *L) +{ + olua_require(L, "dragonbones", luaopen_dragonbones); + if (!olua_getclass(L, "db.Armature")) { + luaL_error(L, "class not found: dragonBones::Armature"); + } + return 1; +} OLUA_END_DECLS -static int _dragonBones_Animation_advanceTime(lua_State *L) +static int _olua_fun_dragonBones_Animation_advanceTime(lua_State *L) { olua_startinvoke(L); @@ -14276,7 +18370,7 @@ static int _dragonBones_Animation_advanceTime(lua_State *L) return 0; } -static int _dragonBones_Animation_fadeIn$1(lua_State *L) +static int _olua_fun_dragonBones_Animation_fadeIn$1(lua_State *L) { olua_startinvoke(L); @@ -14305,7 +18399,7 @@ static int _dragonBones_Animation_fadeIn$1(lua_State *L) return num_ret; } -static int _dragonBones_Animation_fadeIn$2(lua_State *L) +static int _olua_fun_dragonBones_Animation_fadeIn$2(lua_State *L) { olua_startinvoke(L); @@ -14315,7 +18409,7 @@ static int _dragonBones_Animation_fadeIn$2(lua_State *L) olua_to_object(L, 1, &self, "db.Animation"); olua_check_string(L, 2, &arg1); - // dragonBones::AnimationState *fadeIn(const std::string &animationName, @optional float fadeInTime, @optional int playTimes, @optional int layer, @optional const std::string &group, @optional dragonBones::AnimationFadeOutMode fadeOutMode) + // dragonBones::AnimationState *fadeIn(const std::string &animationName) dragonBones::AnimationState *ret = self->fadeIn(arg1); int num_ret = olua_push_object(L, ret, "db.AnimationState"); @@ -14324,7 +18418,7 @@ static int _dragonBones_Animation_fadeIn$2(lua_State *L) return num_ret; } -static int _dragonBones_Animation_fadeIn$3(lua_State *L) +static int _olua_fun_dragonBones_Animation_fadeIn$3(lua_State *L) { olua_startinvoke(L); @@ -14336,7 +18430,7 @@ static int _dragonBones_Animation_fadeIn$3(lua_State *L) olua_check_string(L, 2, &arg1); olua_check_number(L, 3, &arg2); - // dragonBones::AnimationState *fadeIn(const std::string &animationName, @optional float fadeInTime, @optional int playTimes, @optional int layer, @optional const std::string &group, @optional dragonBones::AnimationFadeOutMode fadeOutMode) + // dragonBones::AnimationState *fadeIn(const std::string &animationName, @optional float fadeInTime) dragonBones::AnimationState *ret = self->fadeIn(arg1, arg2); int num_ret = olua_push_object(L, ret, "db.AnimationState"); @@ -14345,7 +18439,7 @@ static int _dragonBones_Animation_fadeIn$3(lua_State *L) return num_ret; } -static int _dragonBones_Animation_fadeIn$4(lua_State *L) +static int _olua_fun_dragonBones_Animation_fadeIn$4(lua_State *L) { olua_startinvoke(L); @@ -14359,7 +18453,7 @@ static int _dragonBones_Animation_fadeIn$4(lua_State *L) olua_check_number(L, 3, &arg2); olua_check_integer(L, 4, &arg3); - // dragonBones::AnimationState *fadeIn(const std::string &animationName, @optional float fadeInTime, @optional int playTimes, @optional int layer, @optional const std::string &group, @optional dragonBones::AnimationFadeOutMode fadeOutMode) + // dragonBones::AnimationState *fadeIn(const std::string &animationName, @optional float fadeInTime, @optional int playTimes) dragonBones::AnimationState *ret = self->fadeIn(arg1, arg2, arg3); int num_ret = olua_push_object(L, ret, "db.AnimationState"); @@ -14368,7 +18462,7 @@ static int _dragonBones_Animation_fadeIn$4(lua_State *L) return num_ret; } -static int _dragonBones_Animation_fadeIn$5(lua_State *L) +static int _olua_fun_dragonBones_Animation_fadeIn$5(lua_State *L) { olua_startinvoke(L); @@ -14384,7 +18478,7 @@ static int _dragonBones_Animation_fadeIn$5(lua_State *L) olua_check_integer(L, 4, &arg3); olua_check_integer(L, 5, &arg4); - // dragonBones::AnimationState *fadeIn(const std::string &animationName, @optional float fadeInTime, @optional int playTimes, @optional int layer, @optional const std::string &group, @optional dragonBones::AnimationFadeOutMode fadeOutMode) + // dragonBones::AnimationState *fadeIn(const std::string &animationName, @optional float fadeInTime, @optional int playTimes, @optional int layer) dragonBones::AnimationState *ret = self->fadeIn(arg1, arg2, arg3, arg4); int num_ret = olua_push_object(L, ret, "db.AnimationState"); @@ -14393,7 +18487,7 @@ static int _dragonBones_Animation_fadeIn$5(lua_State *L) return num_ret; } -static int _dragonBones_Animation_fadeIn$6(lua_State *L) +static int _olua_fun_dragonBones_Animation_fadeIn$6(lua_State *L) { olua_startinvoke(L); @@ -14411,7 +18505,7 @@ static int _dragonBones_Animation_fadeIn$6(lua_State *L) olua_check_integer(L, 5, &arg4); olua_check_string(L, 6, &arg5); - // dragonBones::AnimationState *fadeIn(const std::string &animationName, @optional float fadeInTime, @optional int playTimes, @optional int layer, @optional const std::string &group, @optional dragonBones::AnimationFadeOutMode fadeOutMode) + // dragonBones::AnimationState *fadeIn(const std::string &animationName, @optional float fadeInTime, @optional int playTimes, @optional int layer, @optional const std::string &group) dragonBones::AnimationState *ret = self->fadeIn(arg1, arg2, arg3, arg4, arg5); int num_ret = olua_push_object(L, ret, "db.AnimationState"); @@ -14420,49 +18514,49 @@ static int _dragonBones_Animation_fadeIn$6(lua_State *L) return num_ret; } -static int _dragonBones_Animation_fadeIn(lua_State *L) +static int _olua_fun_dragonBones_Animation_fadeIn(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_string(L, 2))) { - // dragonBones::AnimationState *fadeIn(const std::string &animationName, @optional float fadeInTime, @optional int playTimes, @optional int layer, @optional const std::string &group, @optional dragonBones::AnimationFadeOutMode fadeOutMode) - return _dragonBones_Animation_fadeIn$2(L); + // dragonBones::AnimationState *fadeIn(const std::string &animationName) + return _olua_fun_dragonBones_Animation_fadeIn$2(L); // } } if (num_args == 2) { // if ((olua_is_string(L, 2)) && (olua_is_number(L, 3))) { - // dragonBones::AnimationState *fadeIn(const std::string &animationName, @optional float fadeInTime, @optional int playTimes, @optional int layer, @optional const std::string &group, @optional dragonBones::AnimationFadeOutMode fadeOutMode) - return _dragonBones_Animation_fadeIn$3(L); + // dragonBones::AnimationState *fadeIn(const std::string &animationName, @optional float fadeInTime) + return _olua_fun_dragonBones_Animation_fadeIn$3(L); // } } if (num_args == 3) { // if ((olua_is_string(L, 2)) && (olua_is_number(L, 3)) && (olua_is_integer(L, 4))) { - // dragonBones::AnimationState *fadeIn(const std::string &animationName, @optional float fadeInTime, @optional int playTimes, @optional int layer, @optional const std::string &group, @optional dragonBones::AnimationFadeOutMode fadeOutMode) - return _dragonBones_Animation_fadeIn$4(L); + // dragonBones::AnimationState *fadeIn(const std::string &animationName, @optional float fadeInTime, @optional int playTimes) + return _olua_fun_dragonBones_Animation_fadeIn$4(L); // } } if (num_args == 4) { // if ((olua_is_string(L, 2)) && (olua_is_number(L, 3)) && (olua_is_integer(L, 4)) && (olua_is_integer(L, 5))) { - // dragonBones::AnimationState *fadeIn(const std::string &animationName, @optional float fadeInTime, @optional int playTimes, @optional int layer, @optional const std::string &group, @optional dragonBones::AnimationFadeOutMode fadeOutMode) - return _dragonBones_Animation_fadeIn$5(L); + // dragonBones::AnimationState *fadeIn(const std::string &animationName, @optional float fadeInTime, @optional int playTimes, @optional int layer) + return _olua_fun_dragonBones_Animation_fadeIn$5(L); // } } if (num_args == 5) { // if ((olua_is_string(L, 2)) && (olua_is_number(L, 3)) && (olua_is_integer(L, 4)) && (olua_is_integer(L, 5)) && (olua_is_string(L, 6))) { - // dragonBones::AnimationState *fadeIn(const std::string &animationName, @optional float fadeInTime, @optional int playTimes, @optional int layer, @optional const std::string &group, @optional dragonBones::AnimationFadeOutMode fadeOutMode) - return _dragonBones_Animation_fadeIn$6(L); + // dragonBones::AnimationState *fadeIn(const std::string &animationName, @optional float fadeInTime, @optional int playTimes, @optional int layer, @optional const std::string &group) + return _olua_fun_dragonBones_Animation_fadeIn$6(L); // } } if (num_args == 6) { // if ((olua_is_string(L, 2)) && (olua_is_number(L, 3)) && (olua_is_integer(L, 4)) && (olua_is_integer(L, 5)) && (olua_is_string(L, 6)) && (olua_is_enum(L, 7))) { // dragonBones::AnimationState *fadeIn(const std::string &animationName, @optional float fadeInTime, @optional int playTimes, @optional int layer, @optional const std::string &group, @optional dragonBones::AnimationFadeOutMode fadeOutMode) - return _dragonBones_Animation_fadeIn$1(L); + return _olua_fun_dragonBones_Animation_fadeIn$1(L); // } } @@ -14471,7 +18565,7 @@ static int _dragonBones_Animation_fadeIn(lua_State *L) return 0; } -static int _dragonBones_Animation_getAnimationConfig(lua_State *L) +static int _olua_fun_dragonBones_Animation_getAnimationConfig(lua_State *L) { olua_startinvoke(L); @@ -14488,7 +18582,7 @@ static int _dragonBones_Animation_getAnimationConfig(lua_State *L) return num_ret; } -static int _dragonBones_Animation_getAnimationNames(lua_State *L) +static int _olua_fun_dragonBones_Animation_getAnimationNames(lua_State *L) { olua_startinvoke(L); @@ -14507,7 +18601,7 @@ static int _dragonBones_Animation_getAnimationNames(lua_State *L) return num_ret; } -static int _dragonBones_Animation_getAnimations(lua_State *L) +static int _olua_fun_dragonBones_Animation_getAnimations(lua_State *L) { olua_startinvoke(L); @@ -14527,7 +18621,7 @@ static int _dragonBones_Animation_getAnimations(lua_State *L) return num_ret; } -static int _dragonBones_Animation_getLastAnimationName(lua_State *L) +static int _olua_fun_dragonBones_Animation_getLastAnimationName(lua_State *L) { olua_startinvoke(L); @@ -14544,7 +18638,7 @@ static int _dragonBones_Animation_getLastAnimationName(lua_State *L) return num_ret; } -static int _dragonBones_Animation_getLastAnimationState(lua_State *L) +static int _olua_fun_dragonBones_Animation_getLastAnimationState(lua_State *L) { olua_startinvoke(L); @@ -14561,7 +18655,7 @@ static int _dragonBones_Animation_getLastAnimationState(lua_State *L) return num_ret; } -static int _dragonBones_Animation_getState(lua_State *L) +static int _olua_fun_dragonBones_Animation_getState(lua_State *L) { olua_startinvoke(L); @@ -14580,7 +18674,7 @@ static int _dragonBones_Animation_getState(lua_State *L) return num_ret; } -static int _dragonBones_Animation_getStates(lua_State *L) +static int _olua_fun_dragonBones_Animation_getStates(lua_State *L) { olua_startinvoke(L); @@ -14599,7 +18693,7 @@ static int _dragonBones_Animation_getStates(lua_State *L) return num_ret; } -static int _dragonBones_Animation_getTypeIndex(lua_State *L) +static int _olua_fun_dragonBones_Animation_getTypeIndex(lua_State *L) { olua_startinvoke(L); @@ -14612,7 +18706,7 @@ static int _dragonBones_Animation_getTypeIndex(lua_State *L) return num_ret; } -static int _dragonBones_Animation_gotoAndPlayByFrame$1(lua_State *L) +static int _olua_fun_dragonBones_Animation_gotoAndPlayByFrame$1(lua_State *L) { olua_startinvoke(L); @@ -14635,7 +18729,7 @@ static int _dragonBones_Animation_gotoAndPlayByFrame$1(lua_State *L) return num_ret; } -static int _dragonBones_Animation_gotoAndPlayByFrame$2(lua_State *L) +static int _olua_fun_dragonBones_Animation_gotoAndPlayByFrame$2(lua_State *L) { olua_startinvoke(L); @@ -14645,7 +18739,7 @@ static int _dragonBones_Animation_gotoAndPlayByFrame$2(lua_State *L) olua_to_object(L, 1, &self, "db.Animation"); olua_check_string(L, 2, &arg1); - // dragonBones::AnimationState *gotoAndPlayByFrame(const std::string &animationName, @optional unsigned int frame, @optional int playTimes) + // dragonBones::AnimationState *gotoAndPlayByFrame(const std::string &animationName) dragonBones::AnimationState *ret = self->gotoAndPlayByFrame(arg1); int num_ret = olua_push_object(L, ret, "db.AnimationState"); @@ -14654,7 +18748,7 @@ static int _dragonBones_Animation_gotoAndPlayByFrame$2(lua_State *L) return num_ret; } -static int _dragonBones_Animation_gotoAndPlayByFrame$3(lua_State *L) +static int _olua_fun_dragonBones_Animation_gotoAndPlayByFrame$3(lua_State *L) { olua_startinvoke(L); @@ -14666,7 +18760,7 @@ static int _dragonBones_Animation_gotoAndPlayByFrame$3(lua_State *L) olua_check_string(L, 2, &arg1); olua_check_integer(L, 3, &arg2); - // dragonBones::AnimationState *gotoAndPlayByFrame(const std::string &animationName, @optional unsigned int frame, @optional int playTimes) + // dragonBones::AnimationState *gotoAndPlayByFrame(const std::string &animationName, @optional unsigned int frame) dragonBones::AnimationState *ret = self->gotoAndPlayByFrame(arg1, arg2); int num_ret = olua_push_object(L, ret, "db.AnimationState"); @@ -14675,28 +18769,28 @@ static int _dragonBones_Animation_gotoAndPlayByFrame$3(lua_State *L) return num_ret; } -static int _dragonBones_Animation_gotoAndPlayByFrame(lua_State *L) +static int _olua_fun_dragonBones_Animation_gotoAndPlayByFrame(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_string(L, 2))) { - // dragonBones::AnimationState *gotoAndPlayByFrame(const std::string &animationName, @optional unsigned int frame, @optional int playTimes) - return _dragonBones_Animation_gotoAndPlayByFrame$2(L); + // dragonBones::AnimationState *gotoAndPlayByFrame(const std::string &animationName) + return _olua_fun_dragonBones_Animation_gotoAndPlayByFrame$2(L); // } } if (num_args == 2) { // if ((olua_is_string(L, 2)) && (olua_is_integer(L, 3))) { - // dragonBones::AnimationState *gotoAndPlayByFrame(const std::string &animationName, @optional unsigned int frame, @optional int playTimes) - return _dragonBones_Animation_gotoAndPlayByFrame$3(L); + // dragonBones::AnimationState *gotoAndPlayByFrame(const std::string &animationName, @optional unsigned int frame) + return _olua_fun_dragonBones_Animation_gotoAndPlayByFrame$3(L); // } } if (num_args == 3) { // if ((olua_is_string(L, 2)) && (olua_is_integer(L, 3)) && (olua_is_integer(L, 4))) { // dragonBones::AnimationState *gotoAndPlayByFrame(const std::string &animationName, @optional unsigned int frame, @optional int playTimes) - return _dragonBones_Animation_gotoAndPlayByFrame$1(L); + return _olua_fun_dragonBones_Animation_gotoAndPlayByFrame$1(L); // } } @@ -14705,7 +18799,7 @@ static int _dragonBones_Animation_gotoAndPlayByFrame(lua_State *L) return 0; } -static int _dragonBones_Animation_gotoAndPlayByProgress$1(lua_State *L) +static int _olua_fun_dragonBones_Animation_gotoAndPlayByProgress$1(lua_State *L) { olua_startinvoke(L); @@ -14728,7 +18822,7 @@ static int _dragonBones_Animation_gotoAndPlayByProgress$1(lua_State *L) return num_ret; } -static int _dragonBones_Animation_gotoAndPlayByProgress$2(lua_State *L) +static int _olua_fun_dragonBones_Animation_gotoAndPlayByProgress$2(lua_State *L) { olua_startinvoke(L); @@ -14738,7 +18832,7 @@ static int _dragonBones_Animation_gotoAndPlayByProgress$2(lua_State *L) olua_to_object(L, 1, &self, "db.Animation"); olua_check_string(L, 2, &arg1); - // dragonBones::AnimationState *gotoAndPlayByProgress(const std::string &animationName, @optional float progress, @optional int playTimes) + // dragonBones::AnimationState *gotoAndPlayByProgress(const std::string &animationName) dragonBones::AnimationState *ret = self->gotoAndPlayByProgress(arg1); int num_ret = olua_push_object(L, ret, "db.AnimationState"); @@ -14747,7 +18841,7 @@ static int _dragonBones_Animation_gotoAndPlayByProgress$2(lua_State *L) return num_ret; } -static int _dragonBones_Animation_gotoAndPlayByProgress$3(lua_State *L) +static int _olua_fun_dragonBones_Animation_gotoAndPlayByProgress$3(lua_State *L) { olua_startinvoke(L); @@ -14759,7 +18853,7 @@ static int _dragonBones_Animation_gotoAndPlayByProgress$3(lua_State *L) olua_check_string(L, 2, &arg1); olua_check_number(L, 3, &arg2); - // dragonBones::AnimationState *gotoAndPlayByProgress(const std::string &animationName, @optional float progress, @optional int playTimes) + // dragonBones::AnimationState *gotoAndPlayByProgress(const std::string &animationName, @optional float progress) dragonBones::AnimationState *ret = self->gotoAndPlayByProgress(arg1, arg2); int num_ret = olua_push_object(L, ret, "db.AnimationState"); @@ -14768,28 +18862,28 @@ static int _dragonBones_Animation_gotoAndPlayByProgress$3(lua_State *L) return num_ret; } -static int _dragonBones_Animation_gotoAndPlayByProgress(lua_State *L) +static int _olua_fun_dragonBones_Animation_gotoAndPlayByProgress(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_string(L, 2))) { - // dragonBones::AnimationState *gotoAndPlayByProgress(const std::string &animationName, @optional float progress, @optional int playTimes) - return _dragonBones_Animation_gotoAndPlayByProgress$2(L); + // dragonBones::AnimationState *gotoAndPlayByProgress(const std::string &animationName) + return _olua_fun_dragonBones_Animation_gotoAndPlayByProgress$2(L); // } } if (num_args == 2) { // if ((olua_is_string(L, 2)) && (olua_is_number(L, 3))) { - // dragonBones::AnimationState *gotoAndPlayByProgress(const std::string &animationName, @optional float progress, @optional int playTimes) - return _dragonBones_Animation_gotoAndPlayByProgress$3(L); + // dragonBones::AnimationState *gotoAndPlayByProgress(const std::string &animationName, @optional float progress) + return _olua_fun_dragonBones_Animation_gotoAndPlayByProgress$3(L); // } } if (num_args == 3) { // if ((olua_is_string(L, 2)) && (olua_is_number(L, 3)) && (olua_is_integer(L, 4))) { // dragonBones::AnimationState *gotoAndPlayByProgress(const std::string &animationName, @optional float progress, @optional int playTimes) - return _dragonBones_Animation_gotoAndPlayByProgress$1(L); + return _olua_fun_dragonBones_Animation_gotoAndPlayByProgress$1(L); // } } @@ -14798,7 +18892,7 @@ static int _dragonBones_Animation_gotoAndPlayByProgress(lua_State *L) return 0; } -static int _dragonBones_Animation_gotoAndPlayByTime$1(lua_State *L) +static int _olua_fun_dragonBones_Animation_gotoAndPlayByTime$1(lua_State *L) { olua_startinvoke(L); @@ -14821,7 +18915,7 @@ static int _dragonBones_Animation_gotoAndPlayByTime$1(lua_State *L) return num_ret; } -static int _dragonBones_Animation_gotoAndPlayByTime$2(lua_State *L) +static int _olua_fun_dragonBones_Animation_gotoAndPlayByTime$2(lua_State *L) { olua_startinvoke(L); @@ -14831,7 +18925,7 @@ static int _dragonBones_Animation_gotoAndPlayByTime$2(lua_State *L) olua_to_object(L, 1, &self, "db.Animation"); olua_check_string(L, 2, &arg1); - // dragonBones::AnimationState *gotoAndPlayByTime(const std::string &animationName, @optional float time, @optional int playTimes) + // dragonBones::AnimationState *gotoAndPlayByTime(const std::string &animationName) dragonBones::AnimationState *ret = self->gotoAndPlayByTime(arg1); int num_ret = olua_push_object(L, ret, "db.AnimationState"); @@ -14840,7 +18934,7 @@ static int _dragonBones_Animation_gotoAndPlayByTime$2(lua_State *L) return num_ret; } -static int _dragonBones_Animation_gotoAndPlayByTime$3(lua_State *L) +static int _olua_fun_dragonBones_Animation_gotoAndPlayByTime$3(lua_State *L) { olua_startinvoke(L); @@ -14852,7 +18946,7 @@ static int _dragonBones_Animation_gotoAndPlayByTime$3(lua_State *L) olua_check_string(L, 2, &arg1); olua_check_number(L, 3, &arg2); - // dragonBones::AnimationState *gotoAndPlayByTime(const std::string &animationName, @optional float time, @optional int playTimes) + // dragonBones::AnimationState *gotoAndPlayByTime(const std::string &animationName, @optional float time) dragonBones::AnimationState *ret = self->gotoAndPlayByTime(arg1, arg2); int num_ret = olua_push_object(L, ret, "db.AnimationState"); @@ -14861,28 +18955,28 @@ static int _dragonBones_Animation_gotoAndPlayByTime$3(lua_State *L) return num_ret; } -static int _dragonBones_Animation_gotoAndPlayByTime(lua_State *L) +static int _olua_fun_dragonBones_Animation_gotoAndPlayByTime(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_string(L, 2))) { - // dragonBones::AnimationState *gotoAndPlayByTime(const std::string &animationName, @optional float time, @optional int playTimes) - return _dragonBones_Animation_gotoAndPlayByTime$2(L); + // dragonBones::AnimationState *gotoAndPlayByTime(const std::string &animationName) + return _olua_fun_dragonBones_Animation_gotoAndPlayByTime$2(L); // } } if (num_args == 2) { // if ((olua_is_string(L, 2)) && (olua_is_number(L, 3))) { - // dragonBones::AnimationState *gotoAndPlayByTime(const std::string &animationName, @optional float time, @optional int playTimes) - return _dragonBones_Animation_gotoAndPlayByTime$3(L); + // dragonBones::AnimationState *gotoAndPlayByTime(const std::string &animationName, @optional float time) + return _olua_fun_dragonBones_Animation_gotoAndPlayByTime$3(L); // } } if (num_args == 3) { // if ((olua_is_string(L, 2)) && (olua_is_number(L, 3)) && (olua_is_integer(L, 4))) { // dragonBones::AnimationState *gotoAndPlayByTime(const std::string &animationName, @optional float time, @optional int playTimes) - return _dragonBones_Animation_gotoAndPlayByTime$1(L); + return _olua_fun_dragonBones_Animation_gotoAndPlayByTime$1(L); // } } @@ -14891,7 +18985,7 @@ static int _dragonBones_Animation_gotoAndPlayByTime(lua_State *L) return 0; } -static int _dragonBones_Animation_gotoAndStopByFrame$1(lua_State *L) +static int _olua_fun_dragonBones_Animation_gotoAndStopByFrame$1(lua_State *L) { olua_startinvoke(L); @@ -14912,7 +19006,7 @@ static int _dragonBones_Animation_gotoAndStopByFrame$1(lua_State *L) return num_ret; } -static int _dragonBones_Animation_gotoAndStopByFrame$2(lua_State *L) +static int _olua_fun_dragonBones_Animation_gotoAndStopByFrame$2(lua_State *L) { olua_startinvoke(L); @@ -14922,7 +19016,7 @@ static int _dragonBones_Animation_gotoAndStopByFrame$2(lua_State *L) olua_to_object(L, 1, &self, "db.Animation"); olua_check_string(L, 2, &arg1); - // dragonBones::AnimationState *gotoAndStopByFrame(const std::string &animationName, @optional unsigned int frame) + // dragonBones::AnimationState *gotoAndStopByFrame(const std::string &animationName) dragonBones::AnimationState *ret = self->gotoAndStopByFrame(arg1); int num_ret = olua_push_object(L, ret, "db.AnimationState"); @@ -14931,21 +19025,21 @@ static int _dragonBones_Animation_gotoAndStopByFrame$2(lua_State *L) return num_ret; } -static int _dragonBones_Animation_gotoAndStopByFrame(lua_State *L) +static int _olua_fun_dragonBones_Animation_gotoAndStopByFrame(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_string(L, 2))) { - // dragonBones::AnimationState *gotoAndStopByFrame(const std::string &animationName, @optional unsigned int frame) - return _dragonBones_Animation_gotoAndStopByFrame$2(L); + // dragonBones::AnimationState *gotoAndStopByFrame(const std::string &animationName) + return _olua_fun_dragonBones_Animation_gotoAndStopByFrame$2(L); // } } if (num_args == 2) { // if ((olua_is_string(L, 2)) && (olua_is_integer(L, 3))) { // dragonBones::AnimationState *gotoAndStopByFrame(const std::string &animationName, @optional unsigned int frame) - return _dragonBones_Animation_gotoAndStopByFrame$1(L); + return _olua_fun_dragonBones_Animation_gotoAndStopByFrame$1(L); // } } @@ -14954,7 +19048,7 @@ static int _dragonBones_Animation_gotoAndStopByFrame(lua_State *L) return 0; } -static int _dragonBones_Animation_gotoAndStopByProgress$1(lua_State *L) +static int _olua_fun_dragonBones_Animation_gotoAndStopByProgress$1(lua_State *L) { olua_startinvoke(L); @@ -14975,7 +19069,7 @@ static int _dragonBones_Animation_gotoAndStopByProgress$1(lua_State *L) return num_ret; } -static int _dragonBones_Animation_gotoAndStopByProgress$2(lua_State *L) +static int _olua_fun_dragonBones_Animation_gotoAndStopByProgress$2(lua_State *L) { olua_startinvoke(L); @@ -14985,7 +19079,7 @@ static int _dragonBones_Animation_gotoAndStopByProgress$2(lua_State *L) olua_to_object(L, 1, &self, "db.Animation"); olua_check_string(L, 2, &arg1); - // dragonBones::AnimationState *gotoAndStopByProgress(const std::string &animationName, @optional float progress) + // dragonBones::AnimationState *gotoAndStopByProgress(const std::string &animationName) dragonBones::AnimationState *ret = self->gotoAndStopByProgress(arg1); int num_ret = olua_push_object(L, ret, "db.AnimationState"); @@ -14994,21 +19088,21 @@ static int _dragonBones_Animation_gotoAndStopByProgress$2(lua_State *L) return num_ret; } -static int _dragonBones_Animation_gotoAndStopByProgress(lua_State *L) +static int _olua_fun_dragonBones_Animation_gotoAndStopByProgress(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_string(L, 2))) { - // dragonBones::AnimationState *gotoAndStopByProgress(const std::string &animationName, @optional float progress) - return _dragonBones_Animation_gotoAndStopByProgress$2(L); + // dragonBones::AnimationState *gotoAndStopByProgress(const std::string &animationName) + return _olua_fun_dragonBones_Animation_gotoAndStopByProgress$2(L); // } } if (num_args == 2) { // if ((olua_is_string(L, 2)) && (olua_is_number(L, 3))) { // dragonBones::AnimationState *gotoAndStopByProgress(const std::string &animationName, @optional float progress) - return _dragonBones_Animation_gotoAndStopByProgress$1(L); + return _olua_fun_dragonBones_Animation_gotoAndStopByProgress$1(L); // } } @@ -15017,7 +19111,7 @@ static int _dragonBones_Animation_gotoAndStopByProgress(lua_State *L) return 0; } -static int _dragonBones_Animation_gotoAndStopByTime$1(lua_State *L) +static int _olua_fun_dragonBones_Animation_gotoAndStopByTime$1(lua_State *L) { olua_startinvoke(L); @@ -15038,7 +19132,7 @@ static int _dragonBones_Animation_gotoAndStopByTime$1(lua_State *L) return num_ret; } -static int _dragonBones_Animation_gotoAndStopByTime$2(lua_State *L) +static int _olua_fun_dragonBones_Animation_gotoAndStopByTime$2(lua_State *L) { olua_startinvoke(L); @@ -15048,7 +19142,7 @@ static int _dragonBones_Animation_gotoAndStopByTime$2(lua_State *L) olua_to_object(L, 1, &self, "db.Animation"); olua_check_string(L, 2, &arg1); - // dragonBones::AnimationState *gotoAndStopByTime(const std::string &animationName, @optional float time) + // dragonBones::AnimationState *gotoAndStopByTime(const std::string &animationName) dragonBones::AnimationState *ret = self->gotoAndStopByTime(arg1); int num_ret = olua_push_object(L, ret, "db.AnimationState"); @@ -15057,21 +19151,21 @@ static int _dragonBones_Animation_gotoAndStopByTime$2(lua_State *L) return num_ret; } -static int _dragonBones_Animation_gotoAndStopByTime(lua_State *L) +static int _olua_fun_dragonBones_Animation_gotoAndStopByTime(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_string(L, 2))) { - // dragonBones::AnimationState *gotoAndStopByTime(const std::string &animationName, @optional float time) - return _dragonBones_Animation_gotoAndStopByTime$2(L); + // dragonBones::AnimationState *gotoAndStopByTime(const std::string &animationName) + return _olua_fun_dragonBones_Animation_gotoAndStopByTime$2(L); // } } if (num_args == 2) { // if ((olua_is_string(L, 2)) && (olua_is_number(L, 3))) { // dragonBones::AnimationState *gotoAndStopByTime(const std::string &animationName, @optional float time) - return _dragonBones_Animation_gotoAndStopByTime$1(L); + return _olua_fun_dragonBones_Animation_gotoAndStopByTime$1(L); // } } @@ -15080,7 +19174,7 @@ static int _dragonBones_Animation_gotoAndStopByTime(lua_State *L) return 0; } -static int _dragonBones_Animation_hasAnimation(lua_State *L) +static int _olua_fun_dragonBones_Animation_hasAnimation(lua_State *L) { olua_startinvoke(L); @@ -15099,7 +19193,7 @@ static int _dragonBones_Animation_hasAnimation(lua_State *L) return num_ret; } -static int _dragonBones_Animation_init(lua_State *L) +static int _olua_fun_dragonBones_Animation_init(lua_State *L) { olua_startinvoke(L); @@ -15117,7 +19211,7 @@ static int _dragonBones_Animation_init(lua_State *L) return 0; } -static int _dragonBones_Animation_isCompleted(lua_State *L) +static int _olua_fun_dragonBones_Animation_isCompleted(lua_State *L) { olua_startinvoke(L); @@ -15134,7 +19228,7 @@ static int _dragonBones_Animation_isCompleted(lua_State *L) return num_ret; } -static int _dragonBones_Animation_isPlaying(lua_State *L) +static int _olua_fun_dragonBones_Animation_isPlaying(lua_State *L) { olua_startinvoke(L); @@ -15151,11 +19245,11 @@ static int _dragonBones_Animation_isPlaying(lua_State *L) return num_ret; } -static int _dragonBones_Animation_new(lua_State *L) +static int _olua_fun_dragonBones_Animation_new(lua_State *L) { olua_startinvoke(L); - // Animation() + // dragonBones::Animation() dragonBones::Animation *ret = new dragonBones::Animation(); int num_ret = olua_push_object(L, ret, "db.Animation"); olua_postnew(L, ret); @@ -15165,7 +19259,7 @@ static int _dragonBones_Animation_new(lua_State *L) return num_ret; } -static int _dragonBones_Animation_play$1(lua_State *L) +static int _olua_fun_dragonBones_Animation_play$1(lua_State *L) { olua_startinvoke(L); @@ -15186,7 +19280,7 @@ static int _dragonBones_Animation_play$1(lua_State *L) return num_ret; } -static int _dragonBones_Animation_play$2(lua_State *L) +static int _olua_fun_dragonBones_Animation_play$2(lua_State *L) { olua_startinvoke(L); @@ -15194,7 +19288,7 @@ static int _dragonBones_Animation_play$2(lua_State *L) olua_to_object(L, 1, &self, "db.Animation"); - // dragonBones::AnimationState *play(@optional const std::string &animationName, @optional int playTimes) + // dragonBones::AnimationState *play() dragonBones::AnimationState *ret = self->play(); int num_ret = olua_push_object(L, ret, "db.AnimationState"); @@ -15203,7 +19297,7 @@ static int _dragonBones_Animation_play$2(lua_State *L) return num_ret; } -static int _dragonBones_Animation_play$3(lua_State *L) +static int _olua_fun_dragonBones_Animation_play$3(lua_State *L) { olua_startinvoke(L); @@ -15213,7 +19307,7 @@ static int _dragonBones_Animation_play$3(lua_State *L) olua_to_object(L, 1, &self, "db.Animation"); olua_check_string(L, 2, &arg1); - // dragonBones::AnimationState *play(@optional const std::string &animationName, @optional int playTimes) + // dragonBones::AnimationState *play(@optional const std::string &animationName) dragonBones::AnimationState *ret = self->play(arg1); int num_ret = olua_push_object(L, ret, "db.AnimationState"); @@ -15222,26 +19316,26 @@ static int _dragonBones_Animation_play$3(lua_State *L) return num_ret; } -static int _dragonBones_Animation_play(lua_State *L) +static int _olua_fun_dragonBones_Animation_play(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 0) { - // dragonBones::AnimationState *play(@optional const std::string &animationName, @optional int playTimes) - return _dragonBones_Animation_play$2(L); + // dragonBones::AnimationState *play() + return _olua_fun_dragonBones_Animation_play$2(L); } if (num_args == 1) { // if ((olua_is_string(L, 2))) { - // dragonBones::AnimationState *play(@optional const std::string &animationName, @optional int playTimes) - return _dragonBones_Animation_play$3(L); + // dragonBones::AnimationState *play(@optional const std::string &animationName) + return _olua_fun_dragonBones_Animation_play$3(L); // } } if (num_args == 2) { // if ((olua_is_string(L, 2)) && (olua_is_integer(L, 3))) { // dragonBones::AnimationState *play(@optional const std::string &animationName, @optional int playTimes) - return _dragonBones_Animation_play$1(L); + return _olua_fun_dragonBones_Animation_play$1(L); // } } @@ -15250,7 +19344,7 @@ static int _dragonBones_Animation_play(lua_State *L) return 0; } -static int _dragonBones_Animation_playConfig(lua_State *L) +static int _olua_fun_dragonBones_Animation_playConfig(lua_State *L) { olua_startinvoke(L); @@ -15269,7 +19363,7 @@ static int _dragonBones_Animation_playConfig(lua_State *L) return num_ret; } -static int _dragonBones_Animation_reset(lua_State *L) +static int _olua_fun_dragonBones_Animation_reset(lua_State *L) { olua_startinvoke(L); @@ -15285,7 +19379,7 @@ static int _dragonBones_Animation_reset(lua_State *L) return 0; } -static int _dragonBones_Animation_setAnimations(lua_State *L) +static int _olua_fun_dragonBones_Animation_setAnimations(lua_State *L) { olua_startinvoke(L); @@ -15306,7 +19400,7 @@ static int _dragonBones_Animation_setAnimations(lua_State *L) return 0; } -static int _dragonBones_Animation_stop(lua_State *L) +static int _olua_fun_dragonBones_Animation_stop(lua_State *L) { olua_startinvoke(L); @@ -15324,7 +19418,7 @@ static int _dragonBones_Animation_stop(lua_State *L) return 0; } -static int _dragonBones_Animation_get_timeScale(lua_State *L) +static int _olua_fun_dragonBones_Animation_timeScale$1(lua_State *L) { olua_startinvoke(L); @@ -15341,7 +19435,7 @@ static int _dragonBones_Animation_get_timeScale(lua_State *L) return num_ret; } -static int _dragonBones_Animation_set_timeScale(lua_State *L) +static int _olua_fun_dragonBones_Animation_timeScale$2(lua_State *L) { olua_startinvoke(L); @@ -15359,52 +19453,82 @@ static int _dragonBones_Animation_set_timeScale(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_dragonBones_Animation(lua_State *L) +static int _olua_fun_dragonBones_Animation_timeScale(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float timeScale + return _olua_fun_dragonBones_Animation_timeScale$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float timeScale + return _olua_fun_dragonBones_Animation_timeScale$2(L); + // } + } + + luaL_error(L, "method 'dragonBones::Animation::timeScale' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_cls_db_Animation(lua_State *L) { oluacls_class(L, "db.Animation"); - oluacls_func(L, "advanceTime", _dragonBones_Animation_advanceTime); - oluacls_func(L, "fadeIn", _dragonBones_Animation_fadeIn); - oluacls_func(L, "getAnimationConfig", _dragonBones_Animation_getAnimationConfig); - oluacls_func(L, "getAnimationNames", _dragonBones_Animation_getAnimationNames); - oluacls_func(L, "getAnimations", _dragonBones_Animation_getAnimations); - oluacls_func(L, "getLastAnimationName", _dragonBones_Animation_getLastAnimationName); - oluacls_func(L, "getLastAnimationState", _dragonBones_Animation_getLastAnimationState); - oluacls_func(L, "getState", _dragonBones_Animation_getState); - oluacls_func(L, "getStates", _dragonBones_Animation_getStates); - oluacls_func(L, "getTypeIndex", _dragonBones_Animation_getTypeIndex); - oluacls_func(L, "gotoAndPlayByFrame", _dragonBones_Animation_gotoAndPlayByFrame); - oluacls_func(L, "gotoAndPlayByProgress", _dragonBones_Animation_gotoAndPlayByProgress); - oluacls_func(L, "gotoAndPlayByTime", _dragonBones_Animation_gotoAndPlayByTime); - oluacls_func(L, "gotoAndStopByFrame", _dragonBones_Animation_gotoAndStopByFrame); - oluacls_func(L, "gotoAndStopByProgress", _dragonBones_Animation_gotoAndStopByProgress); - oluacls_func(L, "gotoAndStopByTime", _dragonBones_Animation_gotoAndStopByTime); - oluacls_func(L, "hasAnimation", _dragonBones_Animation_hasAnimation); - oluacls_func(L, "init", _dragonBones_Animation_init); - oluacls_func(L, "isCompleted", _dragonBones_Animation_isCompleted); - oluacls_func(L, "isPlaying", _dragonBones_Animation_isPlaying); - oluacls_func(L, "new", _dragonBones_Animation_new); - oluacls_func(L, "play", _dragonBones_Animation_play); - oluacls_func(L, "playConfig", _dragonBones_Animation_playConfig); - oluacls_func(L, "reset", _dragonBones_Animation_reset); - oluacls_func(L, "setAnimations", _dragonBones_Animation_setAnimations); - oluacls_func(L, "stop", _dragonBones_Animation_stop); - oluacls_prop(L, "animationConfig", _dragonBones_Animation_getAnimationConfig, nullptr); - oluacls_prop(L, "animationNames", _dragonBones_Animation_getAnimationNames, nullptr); - oluacls_prop(L, "animations", _dragonBones_Animation_getAnimations, _dragonBones_Animation_setAnimations); - oluacls_prop(L, "completed", _dragonBones_Animation_isCompleted, nullptr); - oluacls_prop(L, "lastAnimationName", _dragonBones_Animation_getLastAnimationName, nullptr); - oluacls_prop(L, "lastAnimationState", _dragonBones_Animation_getLastAnimationState, nullptr); - oluacls_prop(L, "playing", _dragonBones_Animation_isPlaying, nullptr); - oluacls_prop(L, "states", _dragonBones_Animation_getStates, nullptr); - oluacls_prop(L, "typeIndex", _dragonBones_Animation_getTypeIndex, nullptr); - oluacls_prop(L, "timeScale", _dragonBones_Animation_get_timeScale, _dragonBones_Animation_set_timeScale); + oluacls_func(L, "advanceTime", _olua_fun_dragonBones_Animation_advanceTime); + oluacls_func(L, "fadeIn", _olua_fun_dragonBones_Animation_fadeIn); + oluacls_func(L, "getAnimationConfig", _olua_fun_dragonBones_Animation_getAnimationConfig); + oluacls_func(L, "getAnimationNames", _olua_fun_dragonBones_Animation_getAnimationNames); + oluacls_func(L, "getAnimations", _olua_fun_dragonBones_Animation_getAnimations); + oluacls_func(L, "getLastAnimationName", _olua_fun_dragonBones_Animation_getLastAnimationName); + oluacls_func(L, "getLastAnimationState", _olua_fun_dragonBones_Animation_getLastAnimationState); + oluacls_func(L, "getState", _olua_fun_dragonBones_Animation_getState); + oluacls_func(L, "getStates", _olua_fun_dragonBones_Animation_getStates); + oluacls_func(L, "getTypeIndex", _olua_fun_dragonBones_Animation_getTypeIndex); + oluacls_func(L, "gotoAndPlayByFrame", _olua_fun_dragonBones_Animation_gotoAndPlayByFrame); + oluacls_func(L, "gotoAndPlayByProgress", _olua_fun_dragonBones_Animation_gotoAndPlayByProgress); + oluacls_func(L, "gotoAndPlayByTime", _olua_fun_dragonBones_Animation_gotoAndPlayByTime); + oluacls_func(L, "gotoAndStopByFrame", _olua_fun_dragonBones_Animation_gotoAndStopByFrame); + oluacls_func(L, "gotoAndStopByProgress", _olua_fun_dragonBones_Animation_gotoAndStopByProgress); + oluacls_func(L, "gotoAndStopByTime", _olua_fun_dragonBones_Animation_gotoAndStopByTime); + oluacls_func(L, "hasAnimation", _olua_fun_dragonBones_Animation_hasAnimation); + oluacls_func(L, "init", _olua_fun_dragonBones_Animation_init); + oluacls_func(L, "isCompleted", _olua_fun_dragonBones_Animation_isCompleted); + oluacls_func(L, "isPlaying", _olua_fun_dragonBones_Animation_isPlaying); + oluacls_func(L, "new", _olua_fun_dragonBones_Animation_new); + oluacls_func(L, "play", _olua_fun_dragonBones_Animation_play); + oluacls_func(L, "playConfig", _olua_fun_dragonBones_Animation_playConfig); + oluacls_func(L, "reset", _olua_fun_dragonBones_Animation_reset); + oluacls_func(L, "setAnimations", _olua_fun_dragonBones_Animation_setAnimations); + oluacls_func(L, "stop", _olua_fun_dragonBones_Animation_stop); + oluacls_prop(L, "animationConfig", _olua_fun_dragonBones_Animation_getAnimationConfig, nullptr); + oluacls_prop(L, "animationNames", _olua_fun_dragonBones_Animation_getAnimationNames, nullptr); + oluacls_prop(L, "animations", _olua_fun_dragonBones_Animation_getAnimations, _olua_fun_dragonBones_Animation_setAnimations); + oluacls_prop(L, "completed", _olua_fun_dragonBones_Animation_isCompleted, nullptr); + oluacls_prop(L, "lastAnimationName", _olua_fun_dragonBones_Animation_getLastAnimationName, nullptr); + oluacls_prop(L, "lastAnimationState", _olua_fun_dragonBones_Animation_getLastAnimationState, nullptr); + oluacls_prop(L, "playing", _olua_fun_dragonBones_Animation_isPlaying, nullptr); + oluacls_prop(L, "states", _olua_fun_dragonBones_Animation_getStates, nullptr); + oluacls_prop(L, "typeIndex", _olua_fun_dragonBones_Animation_getTypeIndex, nullptr); + oluacls_prop(L, "timeScale", _olua_fun_dragonBones_Animation_timeScale, _olua_fun_dragonBones_Animation_timeScale); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_db_Animation(lua_State *L) +{ + olua_require(L, "dragonbones", luaopen_dragonbones); + if (!olua_getclass(L, "db.Animation")) { + luaL_error(L, "class not found: dragonBones::Animation"); + } return 1; } OLUA_END_DECLS -static int _dragonBones_CCFactory_buildArmatureDisplay$1(lua_State *L) +static int _olua_fun_dragonBones_CCFactory_buildArmatureDisplay$1(lua_State *L) { olua_startinvoke(L); @@ -15429,7 +19553,7 @@ static int _dragonBones_CCFactory_buildArmatureDisplay$1(lua_State *L) return num_ret; } -static int _dragonBones_CCFactory_buildArmatureDisplay$2(lua_State *L) +static int _olua_fun_dragonBones_CCFactory_buildArmatureDisplay$2(lua_State *L) { olua_startinvoke(L); @@ -15439,7 +19563,7 @@ static int _dragonBones_CCFactory_buildArmatureDisplay$2(lua_State *L) olua_to_object(L, 1, &self, "db.Factory"); olua_check_string(L, 2, &arg1); - // dragonBones::CCArmatureDisplay *buildArmatureDisplay(const std::string &armatureName, @optional const std::string &dragonBonesName, @optional const std::string &skinName, @optional const std::string &textureAtlasName) + // dragonBones::CCArmatureDisplay *buildArmatureDisplay(const std::string &armatureName) dragonBones::CCArmatureDisplay *ret = self->buildArmatureDisplay(arg1); int num_ret = olua_push_object(L, ret, "db.ArmatureDisplay"); @@ -15448,7 +19572,7 @@ static int _dragonBones_CCFactory_buildArmatureDisplay$2(lua_State *L) return num_ret; } -static int _dragonBones_CCFactory_buildArmatureDisplay$3(lua_State *L) +static int _olua_fun_dragonBones_CCFactory_buildArmatureDisplay$3(lua_State *L) { olua_startinvoke(L); @@ -15460,7 +19584,7 @@ static int _dragonBones_CCFactory_buildArmatureDisplay$3(lua_State *L) olua_check_string(L, 2, &arg1); olua_check_string(L, 3, &arg2); - // dragonBones::CCArmatureDisplay *buildArmatureDisplay(const std::string &armatureName, @optional const std::string &dragonBonesName, @optional const std::string &skinName, @optional const std::string &textureAtlasName) + // dragonBones::CCArmatureDisplay *buildArmatureDisplay(const std::string &armatureName, @optional const std::string &dragonBonesName) dragonBones::CCArmatureDisplay *ret = self->buildArmatureDisplay(arg1, arg2); int num_ret = olua_push_object(L, ret, "db.ArmatureDisplay"); @@ -15469,7 +19593,7 @@ static int _dragonBones_CCFactory_buildArmatureDisplay$3(lua_State *L) return num_ret; } -static int _dragonBones_CCFactory_buildArmatureDisplay$4(lua_State *L) +static int _olua_fun_dragonBones_CCFactory_buildArmatureDisplay$4(lua_State *L) { olua_startinvoke(L); @@ -15483,7 +19607,7 @@ static int _dragonBones_CCFactory_buildArmatureDisplay$4(lua_State *L) olua_check_string(L, 3, &arg2); olua_check_string(L, 4, &arg3); - // dragonBones::CCArmatureDisplay *buildArmatureDisplay(const std::string &armatureName, @optional const std::string &dragonBonesName, @optional const std::string &skinName, @optional const std::string &textureAtlasName) + // dragonBones::CCArmatureDisplay *buildArmatureDisplay(const std::string &armatureName, @optional const std::string &dragonBonesName, @optional const std::string &skinName) dragonBones::CCArmatureDisplay *ret = self->buildArmatureDisplay(arg1, arg2, arg3); int num_ret = olua_push_object(L, ret, "db.ArmatureDisplay"); @@ -15492,35 +19616,35 @@ static int _dragonBones_CCFactory_buildArmatureDisplay$4(lua_State *L) return num_ret; } -static int _dragonBones_CCFactory_buildArmatureDisplay(lua_State *L) +static int _olua_fun_dragonBones_CCFactory_buildArmatureDisplay(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_string(L, 2))) { - // dragonBones::CCArmatureDisplay *buildArmatureDisplay(const std::string &armatureName, @optional const std::string &dragonBonesName, @optional const std::string &skinName, @optional const std::string &textureAtlasName) - return _dragonBones_CCFactory_buildArmatureDisplay$2(L); + // dragonBones::CCArmatureDisplay *buildArmatureDisplay(const std::string &armatureName) + return _olua_fun_dragonBones_CCFactory_buildArmatureDisplay$2(L); // } } if (num_args == 2) { // if ((olua_is_string(L, 2)) && (olua_is_string(L, 3))) { - // dragonBones::CCArmatureDisplay *buildArmatureDisplay(const std::string &armatureName, @optional const std::string &dragonBonesName, @optional const std::string &skinName, @optional const std::string &textureAtlasName) - return _dragonBones_CCFactory_buildArmatureDisplay$3(L); + // dragonBones::CCArmatureDisplay *buildArmatureDisplay(const std::string &armatureName, @optional const std::string &dragonBonesName) + return _olua_fun_dragonBones_CCFactory_buildArmatureDisplay$3(L); // } } if (num_args == 3) { // if ((olua_is_string(L, 2)) && (olua_is_string(L, 3)) && (olua_is_string(L, 4))) { - // dragonBones::CCArmatureDisplay *buildArmatureDisplay(const std::string &armatureName, @optional const std::string &dragonBonesName, @optional const std::string &skinName, @optional const std::string &textureAtlasName) - return _dragonBones_CCFactory_buildArmatureDisplay$4(L); + // dragonBones::CCArmatureDisplay *buildArmatureDisplay(const std::string &armatureName, @optional const std::string &dragonBonesName, @optional const std::string &skinName) + return _olua_fun_dragonBones_CCFactory_buildArmatureDisplay$4(L); // } } if (num_args == 4) { // if ((olua_is_string(L, 2)) && (olua_is_string(L, 3)) && (olua_is_string(L, 4)) && (olua_is_string(L, 5))) { // dragonBones::CCArmatureDisplay *buildArmatureDisplay(const std::string &armatureName, @optional const std::string &dragonBonesName, @optional const std::string &skinName, @optional const std::string &textureAtlasName) - return _dragonBones_CCFactory_buildArmatureDisplay$1(L); + return _olua_fun_dragonBones_CCFactory_buildArmatureDisplay$1(L); // } } @@ -15529,7 +19653,7 @@ static int _dragonBones_CCFactory_buildArmatureDisplay(lua_State *L) return 0; } -static int _dragonBones_CCFactory_getClock(lua_State *L) +static int _olua_fun_dragonBones_CCFactory_getClock(lua_State *L) { olua_startinvoke(L); @@ -15542,7 +19666,7 @@ static int _dragonBones_CCFactory_getClock(lua_State *L) return num_ret; } -static int _dragonBones_CCFactory_getFactory(lua_State *L) +static int _olua_fun_dragonBones_CCFactory_getFactory(lua_State *L) { olua_startinvoke(L); @@ -15555,7 +19679,7 @@ static int _dragonBones_CCFactory_getFactory(lua_State *L) return num_ret; } -static int _dragonBones_CCFactory_getSoundEventManager(lua_State *L) +static int _olua_fun_dragonBones_CCFactory_getSoundEventManager(lua_State *L) { olua_startinvoke(L); @@ -15572,7 +19696,7 @@ static int _dragonBones_CCFactory_getSoundEventManager(lua_State *L) return num_ret; } -static int _dragonBones_CCFactory_getTextureDisplay$1(lua_State *L) +static int _olua_fun_dragonBones_CCFactory_getTextureDisplay$1(lua_State *L) { olua_startinvoke(L); @@ -15593,7 +19717,7 @@ static int _dragonBones_CCFactory_getTextureDisplay$1(lua_State *L) return num_ret; } -static int _dragonBones_CCFactory_getTextureDisplay$2(lua_State *L) +static int _olua_fun_dragonBones_CCFactory_getTextureDisplay$2(lua_State *L) { olua_startinvoke(L); @@ -15603,7 +19727,7 @@ static int _dragonBones_CCFactory_getTextureDisplay$2(lua_State *L) olua_to_object(L, 1, &self, "db.Factory"); olua_check_string(L, 2, &arg1); - // cocos2d::Sprite *getTextureDisplay(const std::string &textureName, @optional const std::string &dragonBonesName) + // cocos2d::Sprite *getTextureDisplay(const std::string &textureName) cocos2d::Sprite *ret = self->getTextureDisplay(arg1); int num_ret = olua_push_object(L, ret, "cc.Sprite"); @@ -15612,21 +19736,21 @@ static int _dragonBones_CCFactory_getTextureDisplay$2(lua_State *L) return num_ret; } -static int _dragonBones_CCFactory_getTextureDisplay(lua_State *L) +static int _olua_fun_dragonBones_CCFactory_getTextureDisplay(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_string(L, 2))) { - // cocos2d::Sprite *getTextureDisplay(const std::string &textureName, @optional const std::string &dragonBonesName) - return _dragonBones_CCFactory_getTextureDisplay$2(L); + // cocos2d::Sprite *getTextureDisplay(const std::string &textureName) + return _olua_fun_dragonBones_CCFactory_getTextureDisplay$2(L); // } } if (num_args == 2) { // if ((olua_is_string(L, 2)) && (olua_is_string(L, 3))) { // cocos2d::Sprite *getTextureDisplay(const std::string &textureName, @optional const std::string &dragonBonesName) - return _dragonBones_CCFactory_getTextureDisplay$1(L); + return _olua_fun_dragonBones_CCFactory_getTextureDisplay$1(L); // } } @@ -15635,7 +19759,7 @@ static int _dragonBones_CCFactory_getTextureDisplay(lua_State *L) return 0; } -static int _dragonBones_CCFactory_loadDragonBonesData$1(lua_State *L) +static int _olua_fun_dragonBones_CCFactory_loadDragonBonesData$1(lua_State *L) { olua_startinvoke(L); @@ -15658,7 +19782,7 @@ static int _dragonBones_CCFactory_loadDragonBonesData$1(lua_State *L) return num_ret; } -static int _dragonBones_CCFactory_loadDragonBonesData$2(lua_State *L) +static int _olua_fun_dragonBones_CCFactory_loadDragonBonesData$2(lua_State *L) { olua_startinvoke(L); @@ -15668,7 +19792,7 @@ static int _dragonBones_CCFactory_loadDragonBonesData$2(lua_State *L) olua_to_object(L, 1, &self, "db.Factory"); olua_check_string(L, 2, &arg1); - // dragonBones::DragonBonesData *loadDragonBonesData(const std::string &filePath, @optional const std::string &name, @optional float scale) + // dragonBones::DragonBonesData *loadDragonBonesData(const std::string &filePath) dragonBones::DragonBonesData *ret = self->loadDragonBonesData(arg1); int num_ret = olua_push_object(L, ret, "db.DragonBonesData"); @@ -15677,7 +19801,7 @@ static int _dragonBones_CCFactory_loadDragonBonesData$2(lua_State *L) return num_ret; } -static int _dragonBones_CCFactory_loadDragonBonesData$3(lua_State *L) +static int _olua_fun_dragonBones_CCFactory_loadDragonBonesData$3(lua_State *L) { olua_startinvoke(L); @@ -15689,7 +19813,7 @@ static int _dragonBones_CCFactory_loadDragonBonesData$3(lua_State *L) olua_check_string(L, 2, &arg1); olua_check_string(L, 3, &arg2); - // dragonBones::DragonBonesData *loadDragonBonesData(const std::string &filePath, @optional const std::string &name, @optional float scale) + // dragonBones::DragonBonesData *loadDragonBonesData(const std::string &filePath, @optional const std::string &name) dragonBones::DragonBonesData *ret = self->loadDragonBonesData(arg1, arg2); int num_ret = olua_push_object(L, ret, "db.DragonBonesData"); @@ -15698,28 +19822,28 @@ static int _dragonBones_CCFactory_loadDragonBonesData$3(lua_State *L) return num_ret; } -static int _dragonBones_CCFactory_loadDragonBonesData(lua_State *L) +static int _olua_fun_dragonBones_CCFactory_loadDragonBonesData(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_string(L, 2))) { - // dragonBones::DragonBonesData *loadDragonBonesData(const std::string &filePath, @optional const std::string &name, @optional float scale) - return _dragonBones_CCFactory_loadDragonBonesData$2(L); + // dragonBones::DragonBonesData *loadDragonBonesData(const std::string &filePath) + return _olua_fun_dragonBones_CCFactory_loadDragonBonesData$2(L); // } } if (num_args == 2) { // if ((olua_is_string(L, 2)) && (olua_is_string(L, 3))) { - // dragonBones::DragonBonesData *loadDragonBonesData(const std::string &filePath, @optional const std::string &name, @optional float scale) - return _dragonBones_CCFactory_loadDragonBonesData$3(L); + // dragonBones::DragonBonesData *loadDragonBonesData(const std::string &filePath, @optional const std::string &name) + return _olua_fun_dragonBones_CCFactory_loadDragonBonesData$3(L); // } } if (num_args == 3) { // if ((olua_is_string(L, 2)) && (olua_is_string(L, 3)) && (olua_is_number(L, 4))) { // dragonBones::DragonBonesData *loadDragonBonesData(const std::string &filePath, @optional const std::string &name, @optional float scale) - return _dragonBones_CCFactory_loadDragonBonesData$1(L); + return _olua_fun_dragonBones_CCFactory_loadDragonBonesData$1(L); // } } @@ -15728,7 +19852,7 @@ static int _dragonBones_CCFactory_loadDragonBonesData(lua_State *L) return 0; } -static int _dragonBones_CCFactory_loadTextureAtlasData$1(lua_State *L) +static int _olua_fun_dragonBones_CCFactory_loadTextureAtlasData$1(lua_State *L) { olua_startinvoke(L); @@ -15751,7 +19875,7 @@ static int _dragonBones_CCFactory_loadTextureAtlasData$1(lua_State *L) return num_ret; } -static int _dragonBones_CCFactory_loadTextureAtlasData$2(lua_State *L) +static int _olua_fun_dragonBones_CCFactory_loadTextureAtlasData$2(lua_State *L) { olua_startinvoke(L); @@ -15761,7 +19885,7 @@ static int _dragonBones_CCFactory_loadTextureAtlasData$2(lua_State *L) olua_to_object(L, 1, &self, "db.Factory"); olua_check_string(L, 2, &arg1); - // dragonBones::TextureAtlasData *loadTextureAtlasData(const std::string &filePath, @optional const std::string &name, @optional float scale) + // dragonBones::TextureAtlasData *loadTextureAtlasData(const std::string &filePath) dragonBones::TextureAtlasData *ret = self->loadTextureAtlasData(arg1); int num_ret = olua_push_object(L, ret, "db.TextureAtlasData"); @@ -15770,7 +19894,7 @@ static int _dragonBones_CCFactory_loadTextureAtlasData$2(lua_State *L) return num_ret; } -static int _dragonBones_CCFactory_loadTextureAtlasData$3(lua_State *L) +static int _olua_fun_dragonBones_CCFactory_loadTextureAtlasData$3(lua_State *L) { olua_startinvoke(L); @@ -15782,7 +19906,7 @@ static int _dragonBones_CCFactory_loadTextureAtlasData$3(lua_State *L) olua_check_string(L, 2, &arg1); olua_check_string(L, 3, &arg2); - // dragonBones::TextureAtlasData *loadTextureAtlasData(const std::string &filePath, @optional const std::string &name, @optional float scale) + // dragonBones::TextureAtlasData *loadTextureAtlasData(const std::string &filePath, @optional const std::string &name) dragonBones::TextureAtlasData *ret = self->loadTextureAtlasData(arg1, arg2); int num_ret = olua_push_object(L, ret, "db.TextureAtlasData"); @@ -15791,28 +19915,28 @@ static int _dragonBones_CCFactory_loadTextureAtlasData$3(lua_State *L) return num_ret; } -static int _dragonBones_CCFactory_loadTextureAtlasData(lua_State *L) +static int _olua_fun_dragonBones_CCFactory_loadTextureAtlasData(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_string(L, 2))) { - // dragonBones::TextureAtlasData *loadTextureAtlasData(const std::string &filePath, @optional const std::string &name, @optional float scale) - return _dragonBones_CCFactory_loadTextureAtlasData$2(L); + // dragonBones::TextureAtlasData *loadTextureAtlasData(const std::string &filePath) + return _olua_fun_dragonBones_CCFactory_loadTextureAtlasData$2(L); // } } if (num_args == 2) { // if ((olua_is_string(L, 2)) && (olua_is_string(L, 3))) { - // dragonBones::TextureAtlasData *loadTextureAtlasData(const std::string &filePath, @optional const std::string &name, @optional float scale) - return _dragonBones_CCFactory_loadTextureAtlasData$3(L); + // dragonBones::TextureAtlasData *loadTextureAtlasData(const std::string &filePath, @optional const std::string &name) + return _olua_fun_dragonBones_CCFactory_loadTextureAtlasData$3(L); // } } if (num_args == 3) { // if ((olua_is_string(L, 2)) && (olua_is_string(L, 3)) && (olua_is_number(L, 4))) { // dragonBones::TextureAtlasData *loadTextureAtlasData(const std::string &filePath, @optional const std::string &name, @optional float scale) - return _dragonBones_CCFactory_loadTextureAtlasData$1(L); + return _olua_fun_dragonBones_CCFactory_loadTextureAtlasData$1(L); // } } @@ -15821,11 +19945,11 @@ static int _dragonBones_CCFactory_loadTextureAtlasData(lua_State *L) return 0; } -static int _dragonBones_CCFactory_new(lua_State *L) +static int _olua_fun_dragonBones_CCFactory_new(lua_State *L) { olua_startinvoke(L); - // CCFactory() + // dragonBones::CCFactory() dragonBones::CCFactory *ret = new dragonBones::CCFactory(); int num_ret = olua_push_object(L, ret, "db.Factory"); olua_postnew(L, ret); @@ -15835,27 +19959,36 @@ static int _dragonBones_CCFactory_new(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_dragonBones_CCFactory(lua_State *L) +static int _olua_cls_db_Factory(lua_State *L) { oluacls_class(L, "db.Factory"); - oluacls_func(L, "buildArmatureDisplay", _dragonBones_CCFactory_buildArmatureDisplay); - oluacls_func(L, "getClock", _dragonBones_CCFactory_getClock); - oluacls_func(L, "getFactory", _dragonBones_CCFactory_getFactory); - oluacls_func(L, "getSoundEventManager", _dragonBones_CCFactory_getSoundEventManager); - oluacls_func(L, "getTextureDisplay", _dragonBones_CCFactory_getTextureDisplay); - oluacls_func(L, "loadDragonBonesData", _dragonBones_CCFactory_loadDragonBonesData); - oluacls_func(L, "loadTextureAtlasData", _dragonBones_CCFactory_loadTextureAtlasData); - oluacls_func(L, "new", _dragonBones_CCFactory_new); - oluacls_prop(L, "clock", _dragonBones_CCFactory_getClock, nullptr); - oluacls_prop(L, "factory", _dragonBones_CCFactory_getFactory, nullptr); - oluacls_prop(L, "soundEventManager", _dragonBones_CCFactory_getSoundEventManager, nullptr); + oluacls_func(L, "buildArmatureDisplay", _olua_fun_dragonBones_CCFactory_buildArmatureDisplay); + oluacls_func(L, "getClock", _olua_fun_dragonBones_CCFactory_getClock); + oluacls_func(L, "getFactory", _olua_fun_dragonBones_CCFactory_getFactory); + oluacls_func(L, "getSoundEventManager", _olua_fun_dragonBones_CCFactory_getSoundEventManager); + oluacls_func(L, "getTextureDisplay", _olua_fun_dragonBones_CCFactory_getTextureDisplay); + oluacls_func(L, "loadDragonBonesData", _olua_fun_dragonBones_CCFactory_loadDragonBonesData); + oluacls_func(L, "loadTextureAtlasData", _olua_fun_dragonBones_CCFactory_loadTextureAtlasData); + oluacls_func(L, "new", _olua_fun_dragonBones_CCFactory_new); + oluacls_prop(L, "clock", _olua_fun_dragonBones_CCFactory_getClock, nullptr); + oluacls_prop(L, "factory", _olua_fun_dragonBones_CCFactory_getFactory, nullptr); + oluacls_prop(L, "soundEventManager", _olua_fun_dragonBones_CCFactory_getSoundEventManager, nullptr); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_db_Factory(lua_State *L) +{ + olua_require(L, "dragonbones", luaopen_dragonbones); + if (!olua_getclass(L, "db.Factory")) { + luaL_error(L, "class not found: dragonBones::CCFactory"); + } + return 1; +} OLUA_END_DECLS -static int _dragonBones_IEventDispatcher___gc(lua_State *L) +static int _olua_fun_dragonBones_IEventDispatcher___gc(lua_State *L) { olua_startinvoke(L); @@ -15867,7 +20000,7 @@ static int _dragonBones_IEventDispatcher___gc(lua_State *L) return 0; } -static int _dragonBones_IEventDispatcher___olua_move(lua_State *L) +static int _olua_fun_dragonBones_IEventDispatcher___olua_move(lua_State *L) { olua_startinvoke(L); @@ -15879,7 +20012,7 @@ static int _dragonBones_IEventDispatcher___olua_move(lua_State *L) return 1; } -static int _dragonBones_IEventDispatcher_addDBEventListener(lua_State *L) +static int _olua_fun_dragonBones_IEventDispatcher_addDBEventListener(lua_State *L) { olua_startinvoke(L); @@ -15893,9 +20026,10 @@ static int _dragonBones_IEventDispatcher_addDBEventListener(lua_State *L) void *cb_store = (void *)self; std::string cb_tag = "addDBEventListener"; - std::string cb_name = olua_setcallback(L, cb_store, 3, cb_tag.c_str(), OLUA_TAG_REPLACE); + std::string cb_name = olua_setcallback(L, cb_store, 3, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg2 = [cb_store, cb_name, cb_ctx](dragonBones::EventObject *arg1) { + // lua_State *ML = olua_mainthread(L); + arg2 = [cb_store, cb_name, cb_ctx /*, ML */](dragonBones::EventObject *cb_arg1) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); @@ -15903,7 +20037,7 @@ static int _dragonBones_IEventDispatcher_addDBEventListener(lua_State *L) int top = lua_gettop(L); size_t last = olua_push_objpool(L); olua_enable_objpool(L); - olua_push_object(L, arg1, "db.EventObject"); + olua_push_object(L, cb_arg1, "db.EventObject"); olua_disable_objpool(L); olua_callback(L, cb_store, cb_name.c_str(), 1); @@ -15914,7 +20048,7 @@ static int _dragonBones_IEventDispatcher_addDBEventListener(lua_State *L) } }; - // void addDBEventListener(const std::string &type, @localvar const std::function &listener) + // void addDBEventListener(const std::string &type, const std::function &listener) self->addDBEventListener(arg1, arg2); olua_endinvoke(L); @@ -15922,7 +20056,7 @@ static int _dragonBones_IEventDispatcher_addDBEventListener(lua_State *L) return 0; } -static int _dragonBones_IEventDispatcher_dispatchDBEvent(lua_State *L) +static int _olua_fun_dragonBones_IEventDispatcher_dispatchDBEvent(lua_State *L) { olua_startinvoke(L); @@ -15942,7 +20076,7 @@ static int _dragonBones_IEventDispatcher_dispatchDBEvent(lua_State *L) return 0; } -static int _dragonBones_IEventDispatcher_hasDBEventListener(lua_State *L) +static int _olua_fun_dragonBones_IEventDispatcher_hasDBEventListener(lua_State *L) { olua_startinvoke(L); @@ -15961,7 +20095,7 @@ static int _dragonBones_IEventDispatcher_hasDBEventListener(lua_State *L) return num_ret; } -static int _dragonBones_IEventDispatcher_removeDBEventListener(lua_State *L) +static int _olua_fun_dragonBones_IEventDispatcher_removeDBEventListener(lua_State *L) { olua_startinvoke(L); @@ -15975,9 +20109,10 @@ static int _dragonBones_IEventDispatcher_removeDBEventListener(lua_State *L) void *cb_store = (void *)self; std::string cb_tag = "removeDBEventListener"; - std::string cb_name = olua_setcallback(L, cb_store, 3, cb_tag.c_str(), OLUA_TAG_REPLACE); + std::string cb_name = olua_setcallback(L, cb_store, 3, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg2 = [cb_store, cb_name, cb_ctx](dragonBones::EventObject *arg1) { + // lua_State *ML = olua_mainthread(L); + arg2 = [cb_store, cb_name, cb_ctx /*, ML */](dragonBones::EventObject *cb_arg1) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); @@ -15985,7 +20120,7 @@ static int _dragonBones_IEventDispatcher_removeDBEventListener(lua_State *L) int top = lua_gettop(L); size_t last = olua_push_objpool(L); olua_enable_objpool(L); - olua_push_object(L, arg1, "db.EventObject"); + olua_push_object(L, cb_arg1, "db.EventObject"); olua_disable_objpool(L); olua_callback(L, cb_store, cb_name.c_str(), 1); @@ -15996,7 +20131,7 @@ static int _dragonBones_IEventDispatcher_removeDBEventListener(lua_State *L) } }; - // void removeDBEventListener(const std::string &type, @localvar const std::function &listener) + // void removeDBEventListener(const std::string &type, const std::function &listener) self->removeDBEventListener(arg1, arg2); olua_endinvoke(L); @@ -16004,22 +20139,31 @@ static int _dragonBones_IEventDispatcher_removeDBEventListener(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_dragonBones_IEventDispatcher(lua_State *L) +static int _olua_cls_db_IEventDispatcher(lua_State *L) { oluacls_class(L, "db.IEventDispatcher"); - oluacls_func(L, "__gc", _dragonBones_IEventDispatcher___gc); - oluacls_func(L, "__olua_move", _dragonBones_IEventDispatcher___olua_move); - oluacls_func(L, "addDBEventListener", _dragonBones_IEventDispatcher_addDBEventListener); - oluacls_func(L, "dispatchDBEvent", _dragonBones_IEventDispatcher_dispatchDBEvent); - oluacls_func(L, "hasDBEventListener", _dragonBones_IEventDispatcher_hasDBEventListener); - oluacls_func(L, "removeDBEventListener", _dragonBones_IEventDispatcher_removeDBEventListener); + oluacls_func(L, "__gc", _olua_fun_dragonBones_IEventDispatcher___gc); + oluacls_func(L, "__olua_move", _olua_fun_dragonBones_IEventDispatcher___olua_move); + oluacls_func(L, "addDBEventListener", _olua_fun_dragonBones_IEventDispatcher_addDBEventListener); + oluacls_func(L, "dispatchDBEvent", _olua_fun_dragonBones_IEventDispatcher_dispatchDBEvent); + oluacls_func(L, "hasDBEventListener", _olua_fun_dragonBones_IEventDispatcher_hasDBEventListener); + oluacls_func(L, "removeDBEventListener", _olua_fun_dragonBones_IEventDispatcher_removeDBEventListener); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_db_IEventDispatcher(lua_State *L) +{ + olua_require(L, "dragonbones", luaopen_dragonbones); + if (!olua_getclass(L, "db.IEventDispatcher")) { + luaL_error(L, "class not found: dragonBones::IEventDispatcher"); + } return 1; } OLUA_END_DECLS -static int _dragonBones_IArmatureProxy_dbClear(lua_State *L) +static int _olua_fun_dragonBones_IArmatureProxy_dbClear(lua_State *L) { olua_startinvoke(L); @@ -16035,7 +20179,7 @@ static int _dragonBones_IArmatureProxy_dbClear(lua_State *L) return 0; } -static int _dragonBones_IArmatureProxy_dbInit(lua_State *L) +static int _olua_fun_dragonBones_IArmatureProxy_dbInit(lua_State *L) { olua_startinvoke(L); @@ -16053,7 +20197,7 @@ static int _dragonBones_IArmatureProxy_dbInit(lua_State *L) return 0; } -static int _dragonBones_IArmatureProxy_dbUpdate(lua_State *L) +static int _olua_fun_dragonBones_IArmatureProxy_dbUpdate(lua_State *L) { olua_startinvoke(L); @@ -16069,7 +20213,7 @@ static int _dragonBones_IArmatureProxy_dbUpdate(lua_State *L) return 0; } -static int _dragonBones_IArmatureProxy_dispose(lua_State *L) +static int _olua_fun_dragonBones_IArmatureProxy_dispose(lua_State *L) { olua_startinvoke(L); @@ -16087,7 +20231,7 @@ static int _dragonBones_IArmatureProxy_dispose(lua_State *L) return 0; } -static int _dragonBones_IArmatureProxy_getAnimation(lua_State *L) +static int _olua_fun_dragonBones_IArmatureProxy_getAnimation(lua_State *L) { olua_startinvoke(L); @@ -16104,7 +20248,7 @@ static int _dragonBones_IArmatureProxy_getAnimation(lua_State *L) return num_ret; } -static int _dragonBones_IArmatureProxy_getArmature(lua_State *L) +static int _olua_fun_dragonBones_IArmatureProxy_getArmature(lua_State *L) { olua_startinvoke(L); @@ -16121,24 +20265,33 @@ static int _dragonBones_IArmatureProxy_getArmature(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_dragonBones_IArmatureProxy(lua_State *L) +static int _olua_cls_db_IArmatureProxy(lua_State *L) { oluacls_class(L, "db.IArmatureProxy"); - oluacls_func(L, "dbClear", _dragonBones_IArmatureProxy_dbClear); - oluacls_func(L, "dbInit", _dragonBones_IArmatureProxy_dbInit); - oluacls_func(L, "dbUpdate", _dragonBones_IArmatureProxy_dbUpdate); - oluacls_func(L, "dispose", _dragonBones_IArmatureProxy_dispose); - oluacls_func(L, "getAnimation", _dragonBones_IArmatureProxy_getAnimation); - oluacls_func(L, "getArmature", _dragonBones_IArmatureProxy_getArmature); - oluacls_prop(L, "animation", _dragonBones_IArmatureProxy_getAnimation, nullptr); - oluacls_prop(L, "armature", _dragonBones_IArmatureProxy_getArmature, nullptr); + oluacls_func(L, "dbClear", _olua_fun_dragonBones_IArmatureProxy_dbClear); + oluacls_func(L, "dbInit", _olua_fun_dragonBones_IArmatureProxy_dbInit); + oluacls_func(L, "dbUpdate", _olua_fun_dragonBones_IArmatureProxy_dbUpdate); + oluacls_func(L, "dispose", _olua_fun_dragonBones_IArmatureProxy_dispose); + oluacls_func(L, "getAnimation", _olua_fun_dragonBones_IArmatureProxy_getAnimation); + oluacls_func(L, "getArmature", _olua_fun_dragonBones_IArmatureProxy_getArmature); + oluacls_prop(L, "animation", _olua_fun_dragonBones_IArmatureProxy_getAnimation, nullptr); + oluacls_prop(L, "armature", _olua_fun_dragonBones_IArmatureProxy_getArmature, nullptr); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_db_IArmatureProxy(lua_State *L) +{ + olua_require(L, "dragonbones", luaopen_dragonbones); + if (!olua_getclass(L, "db.IArmatureProxy")) { + luaL_error(L, "class not found: dragonBones::IArmatureProxy"); + } return 1; } OLUA_END_DECLS -static int _dragonBones_CCArmatureDisplay_addDBEventListener(lua_State *L) +static int _olua_fun_dragonBones_CCArmatureDisplay_addDBEventListener(lua_State *L) { olua_startinvoke(L); @@ -16152,9 +20305,10 @@ static int _dragonBones_CCArmatureDisplay_addDBEventListener(lua_State *L) void *cb_store = (void *)self; std::string cb_tag = (arg1); - std::string cb_name = olua_setcallback(L, cb_store, 3, cb_tag.c_str(), OLUA_TAG_NEW); + std::string cb_name = olua_setcallback(L, cb_store, 3, cb_tag.c_str(), OLUA_TAG_NEW); olua_Context cb_ctx = olua_context(L); - arg2 = [cb_store, cb_name, cb_ctx](dragonBones::EventObject *arg1) { + // lua_State *ML = olua_mainthread(L); + arg2 = [cb_store, cb_name, cb_ctx /*, ML */](dragonBones::EventObject *cb_arg1) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); @@ -16162,7 +20316,7 @@ static int _dragonBones_CCArmatureDisplay_addDBEventListener(lua_State *L) int top = lua_gettop(L); size_t last = olua_push_objpool(L); olua_enable_objpool(L); - olua_push_object(L, arg1, "db.EventObject"); + olua_push_object(L, cb_arg1, "db.EventObject"); olua_disable_objpool(L); olua_callback(L, cb_store, cb_name.c_str(), 1); @@ -16173,7 +20327,7 @@ static int _dragonBones_CCArmatureDisplay_addDBEventListener(lua_State *L) } }; - // void addDBEventListener(const std::string &type, @localvar const std::function &listener) + // void addDBEventListener(const std::string &type, const std::function &listener) self->addDBEventListener(arg1, arg2); olua_endinvoke(L); @@ -16181,7 +20335,7 @@ static int _dragonBones_CCArmatureDisplay_addDBEventListener(lua_State *L) return 0; } -static int _dragonBones_CCArmatureDisplay_as(lua_State *L) +static int _olua_fun_dragonBones_CCArmatureDisplay_as(lua_State *L) { olua_startinvoke(L); @@ -16213,7 +20367,7 @@ static int _dragonBones_CCArmatureDisplay_as(lua_State *L) return 1; } -static int _dragonBones_CCArmatureDisplay_create(lua_State *L) +static int _olua_fun_dragonBones_CCArmatureDisplay_create(lua_State *L) { olua_startinvoke(L); @@ -16226,7 +20380,7 @@ static int _dragonBones_CCArmatureDisplay_create(lua_State *L) return num_ret; } -static int _dragonBones_CCArmatureDisplay_dbClear(lua_State *L) +static int _olua_fun_dragonBones_CCArmatureDisplay_dbClear(lua_State *L) { olua_startinvoke(L); @@ -16242,7 +20396,7 @@ static int _dragonBones_CCArmatureDisplay_dbClear(lua_State *L) return 0; } -static int _dragonBones_CCArmatureDisplay_dbInit(lua_State *L) +static int _olua_fun_dragonBones_CCArmatureDisplay_dbInit(lua_State *L) { olua_startinvoke(L); @@ -16260,7 +20414,7 @@ static int _dragonBones_CCArmatureDisplay_dbInit(lua_State *L) return 0; } -static int _dragonBones_CCArmatureDisplay_dbUpdate(lua_State *L) +static int _olua_fun_dragonBones_CCArmatureDisplay_dbUpdate(lua_State *L) { olua_startinvoke(L); @@ -16276,7 +20430,63 @@ static int _dragonBones_CCArmatureDisplay_dbUpdate(lua_State *L) return 0; } -static int _dragonBones_CCArmatureDisplay_dispatchDBEvent(lua_State *L) +static int _olua_fun_dragonBones_CCArmatureDisplay_debugDraw$1(lua_State *L) +{ + olua_startinvoke(L); + + dragonBones::CCArmatureDisplay *self = nullptr; + + olua_to_object(L, 1, &self, "db.ArmatureDisplay"); + + // bool debugDraw + bool ret = self->debugDraw; + int num_ret = olua_push_bool(L, ret); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_dragonBones_CCArmatureDisplay_debugDraw$2(lua_State *L) +{ + olua_startinvoke(L); + + dragonBones::CCArmatureDisplay *self = nullptr; + bool arg1 = false; /** debugDraw */ + + olua_to_object(L, 1, &self, "db.ArmatureDisplay"); + olua_check_bool(L, 2, &arg1); + + // bool debugDraw + self->debugDraw = arg1; + + olua_endinvoke(L); + + return 0; +} + +static int _olua_fun_dragonBones_CCArmatureDisplay_debugDraw(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // bool debugDraw + return _olua_fun_dragonBones_CCArmatureDisplay_debugDraw$1(L); + } + + if (num_args == 1) { + // if ((olua_is_bool(L, 2))) { + // bool debugDraw + return _olua_fun_dragonBones_CCArmatureDisplay_debugDraw$2(L); + // } + } + + luaL_error(L, "method 'dragonBones::CCArmatureDisplay::debugDraw' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_dragonBones_CCArmatureDisplay_dispatchDBEvent(lua_State *L) { olua_startinvoke(L); @@ -16296,7 +20506,7 @@ static int _dragonBones_CCArmatureDisplay_dispatchDBEvent(lua_State *L) return 0; } -static int _dragonBones_CCArmatureDisplay_dispose$1(lua_State *L) +static int _olua_fun_dragonBones_CCArmatureDisplay_dispose$1(lua_State *L) { olua_startinvoke(L); @@ -16314,7 +20524,7 @@ static int _dragonBones_CCArmatureDisplay_dispose$1(lua_State *L) return 0; } -static int _dragonBones_CCArmatureDisplay_dispose$2(lua_State *L) +static int _olua_fun_dragonBones_CCArmatureDisplay_dispose$2(lua_State *L) { olua_startinvoke(L); @@ -16322,7 +20532,7 @@ static int _dragonBones_CCArmatureDisplay_dispose$2(lua_State *L) olua_to_object(L, 1, &self, "db.ArmatureDisplay"); - // void dispose(@optional bool disposeProxy) + // void dispose() self->dispose(); olua_endinvoke(L); @@ -16330,19 +20540,19 @@ static int _dragonBones_CCArmatureDisplay_dispose$2(lua_State *L) return 0; } -static int _dragonBones_CCArmatureDisplay_dispose(lua_State *L) +static int _olua_fun_dragonBones_CCArmatureDisplay_dispose(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 0) { - // void dispose(@optional bool disposeProxy) - return _dragonBones_CCArmatureDisplay_dispose$2(L); + // void dispose() + return _olua_fun_dragonBones_CCArmatureDisplay_dispose$2(L); } if (num_args == 1) { // if ((olua_is_bool(L, 2))) { // void dispose(@optional bool disposeProxy) - return _dragonBones_CCArmatureDisplay_dispose$1(L); + return _olua_fun_dragonBones_CCArmatureDisplay_dispose$1(L); // } } @@ -16351,7 +20561,7 @@ static int _dragonBones_CCArmatureDisplay_dispose(lua_State *L) return 0; } -static int _dragonBones_CCArmatureDisplay_getAnimation(lua_State *L) +static int _olua_fun_dragonBones_CCArmatureDisplay_getAnimation(lua_State *L) { olua_startinvoke(L); @@ -16368,7 +20578,7 @@ static int _dragonBones_CCArmatureDisplay_getAnimation(lua_State *L) return num_ret; } -static int _dragonBones_CCArmatureDisplay_getArmature(lua_State *L) +static int _olua_fun_dragonBones_CCArmatureDisplay_getArmature(lua_State *L) { olua_startinvoke(L); @@ -16385,7 +20595,7 @@ static int _dragonBones_CCArmatureDisplay_getArmature(lua_State *L) return num_ret; } -static int _dragonBones_CCArmatureDisplay_hasDBEventListener(lua_State *L) +static int _olua_fun_dragonBones_CCArmatureDisplay_hasDBEventListener(lua_State *L) { olua_startinvoke(L); @@ -16404,11 +20614,11 @@ static int _dragonBones_CCArmatureDisplay_hasDBEventListener(lua_State *L) return num_ret; } -static int _dragonBones_CCArmatureDisplay_new(lua_State *L) +static int _olua_fun_dragonBones_CCArmatureDisplay_new(lua_State *L) { olua_startinvoke(L); - // CCArmatureDisplay() + // dragonBones::CCArmatureDisplay() dragonBones::CCArmatureDisplay *ret = new dragonBones::CCArmatureDisplay(); int num_ret = olua_push_object(L, ret, "db.ArmatureDisplay"); olua_postnew(L, ret); @@ -16418,7 +20628,7 @@ static int _dragonBones_CCArmatureDisplay_new(lua_State *L) return num_ret; } -static int _dragonBones_CCArmatureDisplay_removeDBEventListener(lua_State *L) +static int _olua_fun_dragonBones_CCArmatureDisplay_removeDBEventListener(lua_State *L) { olua_startinvoke(L); @@ -16436,7 +20646,7 @@ static int _dragonBones_CCArmatureDisplay_removeDBEventListener(lua_State *L) void *cb_store = (void *)self; olua_removecallback(L, cb_store, cb_tag.c_str(), OLUA_TAG_EQUAL); - // void removeDBEventListener(const std::string &type, @localvar @nullable const std::function &listener) + // void removeDBEventListener(const std::string &type, @nullable const std::function &listener) self->removeDBEventListener(arg1, arg2); olua_endinvoke(L); @@ -16444,62 +20654,36 @@ static int _dragonBones_CCArmatureDisplay_removeDBEventListener(lua_State *L) return 0; } -static int _dragonBones_CCArmatureDisplay_get_debugDraw(lua_State *L) -{ - olua_startinvoke(L); - - dragonBones::CCArmatureDisplay *self = nullptr; - - olua_to_object(L, 1, &self, "db.ArmatureDisplay"); - - // bool debugDraw - bool ret = self->debugDraw; - int num_ret = olua_push_bool(L, ret); - - olua_endinvoke(L); - - return num_ret; -} - -static int _dragonBones_CCArmatureDisplay_set_debugDraw(lua_State *L) +static int _olua_cls_db_ArmatureDisplay(lua_State *L) { - olua_startinvoke(L); - - dragonBones::CCArmatureDisplay *self = nullptr; - bool arg1 = false; /** debugDraw */ - - olua_to_object(L, 1, &self, "db.ArmatureDisplay"); - olua_check_bool(L, 2, &arg1); - - // bool debugDraw - self->debugDraw = arg1; - - olua_endinvoke(L); + oluacls_class(L, "db.ArmatureDisplay"); + oluacls_func(L, "addDBEventListener", _olua_fun_dragonBones_CCArmatureDisplay_addDBEventListener); + oluacls_func(L, "as", _olua_fun_dragonBones_CCArmatureDisplay_as); + oluacls_func(L, "create", _olua_fun_dragonBones_CCArmatureDisplay_create); + oluacls_func(L, "dbClear", _olua_fun_dragonBones_CCArmatureDisplay_dbClear); + oluacls_func(L, "dbInit", _olua_fun_dragonBones_CCArmatureDisplay_dbInit); + oluacls_func(L, "dbUpdate", _olua_fun_dragonBones_CCArmatureDisplay_dbUpdate); + oluacls_func(L, "dispatchDBEvent", _olua_fun_dragonBones_CCArmatureDisplay_dispatchDBEvent); + oluacls_func(L, "dispose", _olua_fun_dragonBones_CCArmatureDisplay_dispose); + oluacls_func(L, "getAnimation", _olua_fun_dragonBones_CCArmatureDisplay_getAnimation); + oluacls_func(L, "getArmature", _olua_fun_dragonBones_CCArmatureDisplay_getArmature); + oluacls_func(L, "hasDBEventListener", _olua_fun_dragonBones_CCArmatureDisplay_hasDBEventListener); + oluacls_func(L, "new", _olua_fun_dragonBones_CCArmatureDisplay_new); + oluacls_func(L, "removeDBEventListener", _olua_fun_dragonBones_CCArmatureDisplay_removeDBEventListener); + oluacls_prop(L, "animation", _olua_fun_dragonBones_CCArmatureDisplay_getAnimation, nullptr); + oluacls_prop(L, "armature", _olua_fun_dragonBones_CCArmatureDisplay_getArmature, nullptr); + oluacls_prop(L, "debugDraw", _olua_fun_dragonBones_CCArmatureDisplay_debugDraw, _olua_fun_dragonBones_CCArmatureDisplay_debugDraw); - return 0; + return 1; } OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_dragonBones_CCArmatureDisplay(lua_State *L) +OLUA_LIB int luaopen_db_ArmatureDisplay(lua_State *L) { - oluacls_class(L, "db.ArmatureDisplay"); - oluacls_func(L, "addDBEventListener", _dragonBones_CCArmatureDisplay_addDBEventListener); - oluacls_func(L, "as", _dragonBones_CCArmatureDisplay_as); - oluacls_func(L, "create", _dragonBones_CCArmatureDisplay_create); - oluacls_func(L, "dbClear", _dragonBones_CCArmatureDisplay_dbClear); - oluacls_func(L, "dbInit", _dragonBones_CCArmatureDisplay_dbInit); - oluacls_func(L, "dbUpdate", _dragonBones_CCArmatureDisplay_dbUpdate); - oluacls_func(L, "dispatchDBEvent", _dragonBones_CCArmatureDisplay_dispatchDBEvent); - oluacls_func(L, "dispose", _dragonBones_CCArmatureDisplay_dispose); - oluacls_func(L, "getAnimation", _dragonBones_CCArmatureDisplay_getAnimation); - oluacls_func(L, "getArmature", _dragonBones_CCArmatureDisplay_getArmature); - oluacls_func(L, "hasDBEventListener", _dragonBones_CCArmatureDisplay_hasDBEventListener); - oluacls_func(L, "new", _dragonBones_CCArmatureDisplay_new); - oluacls_func(L, "removeDBEventListener", _dragonBones_CCArmatureDisplay_removeDBEventListener); - oluacls_prop(L, "animation", _dragonBones_CCArmatureDisplay_getAnimation, nullptr); - oluacls_prop(L, "armature", _dragonBones_CCArmatureDisplay_getArmature, nullptr); - oluacls_prop(L, "debugDraw", _dragonBones_CCArmatureDisplay_get_debugDraw, _dragonBones_CCArmatureDisplay_set_debugDraw); - + olua_require(L, "dragonbones", luaopen_dragonbones); + if (!olua_getclass(L, "db.ArmatureDisplay")) { + luaL_error(L, "class not found: dragonBones::CCArmatureDisplay"); + } return 1; } OLUA_END_DECLS @@ -16507,53 +20691,53 @@ OLUA_END_DECLS OLUA_BEGIN_DECLS OLUA_LIB int luaopen_dragonbones(lua_State *L) { - olua_require(L, "db.Rectangle", luaopen_dragonBones_Rectangle); - olua_require(L, "db.BinaryOffset", luaopen_dragonBones_BinaryOffset); - olua_require(L, "db.ArmatureType", luaopen_dragonBones_ArmatureType); - olua_require(L, "db.OffsetMode", luaopen_dragonBones_OffsetMode); - olua_require(L, "db.DisplayType", luaopen_dragonBones_DisplayType); - olua_require(L, "db.BoundingBoxType", luaopen_dragonBones_BoundingBoxType); - olua_require(L, "db.ActionType", luaopen_dragonBones_ActionType); - olua_require(L, "db.BlendMode", luaopen_dragonBones_BlendMode); - olua_require(L, "db.TweenType", luaopen_dragonBones_TweenType); - olua_require(L, "db.TimelineType", luaopen_dragonBones_TimelineType); - olua_require(L, "db.AnimationFadeOutMode", luaopen_dragonBones_AnimationFadeOutMode); - olua_require(L, "db.TextureFormat", luaopen_dragonBones_TextureFormat); - olua_require(L, "db.DragonBones", luaopen_dragonBones_DragonBones); - olua_require(L, "db.BaseObject", luaopen_dragonBones_BaseObject); - olua_require(L, "db.EventObject", luaopen_dragonBones_EventObject); - olua_require(L, "db.TransformObject", luaopen_dragonBones_TransformObject); - olua_require(L, "db.Point", luaopen_dragonBones_Point); - olua_require(L, "db.ConstraintData", luaopen_dragonBones_ConstraintData); - olua_require(L, "db.IKConstraintData", luaopen_dragonBones_IKConstraintData); - olua_require(L, "db.TimelineData", luaopen_dragonBones_TimelineData); - olua_require(L, "db.IAnimatable", luaopen_dragonBones_IAnimatable); - olua_require(L, "db.WorldClock", luaopen_dragonBones_WorldClock); - olua_require(L, "db.Slot", luaopen_dragonBones_Slot); - olua_require(L, "db.Bone", luaopen_dragonBones_Bone); - olua_require(L, "db.DisplayData", luaopen_dragonBones_DisplayData); - olua_require(L, "db.ActionData", luaopen_dragonBones_ActionData); - olua_require(L, "db.UserData", luaopen_dragonBones_UserData); - olua_require(L, "db.BoundingBoxData", luaopen_dragonBones_BoundingBoxData); - olua_require(L, "db.BoundingBoxDisplayData", luaopen_dragonBones_BoundingBoxDisplayData); - olua_require(L, "db.CanvasData", luaopen_dragonBones_CanvasData); - olua_require(L, "db.TextureAtlasData", luaopen_dragonBones_TextureAtlasData); - olua_require(L, "db.TextureData", luaopen_dragonBones_TextureData); - olua_require(L, "db.ArmatureData", luaopen_dragonBones_ArmatureData); - olua_require(L, "db.SkinData", luaopen_dragonBones_SkinData); - olua_require(L, "db.BoneData", luaopen_dragonBones_BoneData); - olua_require(L, "db.SlotData", luaopen_dragonBones_SlotData); - olua_require(L, "db.AnimationState", luaopen_dragonBones_AnimationState); - olua_require(L, "db.AnimationData", luaopen_dragonBones_AnimationData); - olua_require(L, "db.AnimationConfig", luaopen_dragonBones_AnimationConfig); - olua_require(L, "db.DragonBonesData", luaopen_dragonBones_DragonBonesData); - olua_require(L, "db.BaseFactory", luaopen_dragonBones_BaseFactory); - olua_require(L, "db.Armature", luaopen_dragonBones_Armature); - olua_require(L, "db.Animation", luaopen_dragonBones_Animation); - olua_require(L, "db.Factory", luaopen_dragonBones_CCFactory); - olua_require(L, "db.IEventDispatcher", luaopen_dragonBones_IEventDispatcher); - olua_require(L, "db.IArmatureProxy", luaopen_dragonBones_IArmatureProxy); - olua_require(L, "db.ArmatureDisplay", luaopen_dragonBones_CCArmatureDisplay); + olua_require(L, "db.Rectangle", _olua_cls_db_Rectangle); + olua_require(L, "db.BinaryOffset", _olua_cls_db_BinaryOffset); + olua_require(L, "db.ArmatureType", _olua_cls_db_ArmatureType); + olua_require(L, "db.OffsetMode", _olua_cls_db_OffsetMode); + olua_require(L, "db.DisplayType", _olua_cls_db_DisplayType); + olua_require(L, "db.BoundingBoxType", _olua_cls_db_BoundingBoxType); + olua_require(L, "db.ActionType", _olua_cls_db_ActionType); + olua_require(L, "db.BlendMode", _olua_cls_db_BlendMode); + olua_require(L, "db.TweenType", _olua_cls_db_TweenType); + olua_require(L, "db.TimelineType", _olua_cls_db_TimelineType); + olua_require(L, "db.AnimationFadeOutMode", _olua_cls_db_AnimationFadeOutMode); + olua_require(L, "db.TextureFormat", _olua_cls_db_TextureFormat); + olua_require(L, "db.DragonBones", _olua_cls_db_DragonBones); + olua_require(L, "db.BaseObject", _olua_cls_db_BaseObject); + olua_require(L, "db.EventObject", _olua_cls_db_EventObject); + olua_require(L, "db.TransformObject", _olua_cls_db_TransformObject); + olua_require(L, "db.Point", _olua_cls_db_Point); + olua_require(L, "db.ConstraintData", _olua_cls_db_ConstraintData); + olua_require(L, "db.IKConstraintData", _olua_cls_db_IKConstraintData); + olua_require(L, "db.TimelineData", _olua_cls_db_TimelineData); + olua_require(L, "db.IAnimatable", _olua_cls_db_IAnimatable); + olua_require(L, "db.WorldClock", _olua_cls_db_WorldClock); + olua_require(L, "db.Slot", _olua_cls_db_Slot); + olua_require(L, "db.Bone", _olua_cls_db_Bone); + olua_require(L, "db.DisplayData", _olua_cls_db_DisplayData); + olua_require(L, "db.ActionData", _olua_cls_db_ActionData); + olua_require(L, "db.UserData", _olua_cls_db_UserData); + olua_require(L, "db.BoundingBoxData", _olua_cls_db_BoundingBoxData); + olua_require(L, "db.BoundingBoxDisplayData", _olua_cls_db_BoundingBoxDisplayData); + olua_require(L, "db.CanvasData", _olua_cls_db_CanvasData); + olua_require(L, "db.TextureAtlasData", _olua_cls_db_TextureAtlasData); + olua_require(L, "db.TextureData", _olua_cls_db_TextureData); + olua_require(L, "db.ArmatureData", _olua_cls_db_ArmatureData); + olua_require(L, "db.SkinData", _olua_cls_db_SkinData); + olua_require(L, "db.BoneData", _olua_cls_db_BoneData); + olua_require(L, "db.SlotData", _olua_cls_db_SlotData); + olua_require(L, "db.AnimationState", _olua_cls_db_AnimationState); + olua_require(L, "db.AnimationData", _olua_cls_db_AnimationData); + olua_require(L, "db.AnimationConfig", _olua_cls_db_AnimationConfig); + olua_require(L, "db.DragonBonesData", _olua_cls_db_DragonBonesData); + olua_require(L, "db.BaseFactory", _olua_cls_db_BaseFactory); + olua_require(L, "db.Armature", _olua_cls_db_Armature); + olua_require(L, "db.Animation", _olua_cls_db_Animation); + olua_require(L, "db.Factory", _olua_cls_db_Factory); + olua_require(L, "db.IEventDispatcher", _olua_cls_db_IEventDispatcher); + olua_require(L, "db.IArmatureProxy", _olua_cls_db_IArmatureProxy); + olua_require(L, "db.ArmatureDisplay", _olua_cls_db_ArmatureDisplay); cclua::runtime::registerFeature("dragonbones", true); diff --git a/frameworks/cclua/src/lua-bindings/lua_dragonbones.h b/frameworks/cclua/src/lua-bindings/lua_dragonbones.h index e96bc316..3c4f6c75 100644 --- a/frameworks/cclua/src/lua-bindings/lua_dragonbones.h +++ b/frameworks/cclua/src/lua-bindings/lua_dragonbones.h @@ -1,5 +1,5 @@ // -// AUTO BUILD, DON'T MODIFY! +// AUTO GENERATED, DO NOT MODIFY! // #ifndef __AUTO_GEN_LUA_DRAGONBONES_H__ #define __AUTO_GEN_LUA_DRAGONBONES_H__ diff --git a/frameworks/cclua/src/lua-bindings/lua_fairygui.cpp b/frameworks/cclua/src/lua-bindings/lua_fairygui.cpp index 62739371..bc09cdef 100644 --- a/frameworks/cclua/src/lua-bindings/lua_fairygui.cpp +++ b/frameworks/cclua/src/lua-bindings/lua_fairygui.cpp @@ -1,5 +1,5 @@ // -// AUTO BUILD, DON'T MODIFY! +// AUTO GENERATED, DO NOT MODIFY! // #include "lua_fairygui.h" #include "lua-bindings/lua_cocos2d_types.h" @@ -30,7 +30,7 @@ void olua_check_fairygui_EventTag(lua_State *L, int idx, fairygui::EventTag *val } } -static int _fairygui_VectorTreeNode___gc(lua_State *L) +static int _olua_fun_fairygui_VectorTreeNode___gc(lua_State *L) { olua_startinvoke(L); @@ -46,7 +46,7 @@ static int _fairygui_VectorTreeNode___gc(lua_State *L) return (int)ret; } -static int _fairygui_VectorTreeNode___index(lua_State *L) +static int _olua_fun_fairygui_VectorTreeNode___index(lua_State *L) { olua_startinvoke(L); @@ -67,7 +67,7 @@ static int _fairygui_VectorTreeNode___index(lua_State *L) return num_ret; } -static int _fairygui_VectorTreeNode___newindex(lua_State *L) +static int _olua_fun_fairygui_VectorTreeNode___newindex(lua_State *L) { olua_startinvoke(L); @@ -89,7 +89,7 @@ static int _fairygui_VectorTreeNode___newindex(lua_State *L) return 0; } -static int _fairygui_VectorTreeNode___olua_move(lua_State *L) +static int _olua_fun_fairygui_VectorTreeNode___olua_move(lua_State *L) { olua_startinvoke(L); @@ -101,27 +101,41 @@ static int _fairygui_VectorTreeNode___olua_move(lua_State *L) return 1; } -static int _fairygui_VectorTreeNode_assign(lua_State *L) +static int _olua_fun_fairygui_VectorTreeNode_buffer(lua_State *L) { olua_startinvoke(L); fairygui::VectorTreeNode *self = nullptr; - const char *arg1 = nullptr; /** data */ - size_t arg2 = 0; /** len */ olua_to_object(L, 1, &self, "fgui.VectorTreeNode"); - olua_check_string(L, 2, &arg1); - olua_check_integer(L, 3, &arg2); - // void assign(const char *data, size_t len) - self->assign(arg1, arg2); + // @getter @name(buffer) @type(void *) std::vector *buffer() + void *ret = self->buffer(); + int num_ret = olua_push_object(L, ret, "void *"); olua_endinvoke(L); - return 0; + return num_ret; +} + +static int _olua_fun_fairygui_VectorTreeNode_length(lua_State *L) +{ + olua_startinvoke(L); + + fairygui::VectorTreeNode *self = nullptr; + + olua_to_object(L, 1, &self, "fgui.VectorTreeNode"); + + // @getter @name(length) size_t length() + size_t ret = self->length(); + int num_ret = olua_push_integer(L, ret); + + olua_endinvoke(L); + + return num_ret; } -static int _fairygui_VectorTreeNode_create$1(lua_State *L) +static int _olua_fun_fairygui_VectorTreeNode_new$1(lua_State *L) { olua_startinvoke(L); @@ -141,11 +155,11 @@ static int _fairygui_VectorTreeNode_create$1(lua_State *L) return num_ret; } -static int _fairygui_VectorTreeNode_create$2(lua_State *L) +static int _olua_fun_fairygui_VectorTreeNode_new$2(lua_State *L) { olua_startinvoke(L); - // @postnew @name(new) static fairygui::VectorTreeNode *create(@optional size_t len) + // @postnew @name(new) static fairygui::VectorTreeNode *create() fairygui::VectorTreeNode *ret = fairygui::VectorTreeNode::create(); int num_ret = olua_push_object(L, ret, "fgui.VectorTreeNode"); @@ -157,28 +171,28 @@ static int _fairygui_VectorTreeNode_create$2(lua_State *L) return num_ret; } -static int _fairygui_VectorTreeNode_create(lua_State *L) +static int _olua_fun_fairygui_VectorTreeNode_new(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 0) { - // @postnew @name(new) static fairygui::VectorTreeNode *create(@optional size_t len) - return _fairygui_VectorTreeNode_create$2(L); + // @postnew @name(new) static fairygui::VectorTreeNode *create() + return _olua_fun_fairygui_VectorTreeNode_new$2(L); } if (num_args == 1) { // if ((olua_is_integer(L, 1))) { // @postnew @name(new) static fairygui::VectorTreeNode *create(@optional size_t len) - return _fairygui_VectorTreeNode_create$1(L); + return _olua_fun_fairygui_VectorTreeNode_new$1(L); // } } - luaL_error(L, "method 'fairygui::VectorTreeNode::create' not support '%d' arguments", num_args); + luaL_error(L, "method 'fairygui::VectorTreeNode::new' not support '%d' arguments", num_args); return 0; } -static int _fairygui_VectorTreeNode_slice$1(lua_State *L) +static int _olua_fun_fairygui_VectorTreeNode_slice$1(lua_State *L) { olua_startinvoke(L); @@ -202,7 +216,7 @@ static int _fairygui_VectorTreeNode_slice$1(lua_State *L) return num_ret; } -static int _fairygui_VectorTreeNode_slice$2(lua_State *L) +static int _olua_fun_fairygui_VectorTreeNode_slice$2(lua_State *L) { olua_startinvoke(L); @@ -212,7 +226,7 @@ static int _fairygui_VectorTreeNode_slice$2(lua_State *L) olua_to_object(L, 1, &self, "fgui.VectorTreeNode"); olua_check_integer(L, 2, &arg1); - // @postnew fairygui::VectorTreeNode *slice(size_t from, @optional size_t to) + // @postnew fairygui::VectorTreeNode *slice(size_t from) fairygui::VectorTreeNode *ret = self->slice(arg1); int num_ret = olua_push_object(L, ret, "fgui.VectorTreeNode"); @@ -224,21 +238,21 @@ static int _fairygui_VectorTreeNode_slice$2(lua_State *L) return num_ret; } -static int _fairygui_VectorTreeNode_slice(lua_State *L) +static int _olua_fun_fairygui_VectorTreeNode_slice(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_integer(L, 2))) { - // @postnew fairygui::VectorTreeNode *slice(size_t from, @optional size_t to) - return _fairygui_VectorTreeNode_slice$2(L); + // @postnew fairygui::VectorTreeNode *slice(size_t from) + return _olua_fun_fairygui_VectorTreeNode_slice$2(L); // } } if (num_args == 2) { // if ((olua_is_integer(L, 2)) && (olua_is_integer(L, 3))) { // @postnew fairygui::VectorTreeNode *slice(size_t from, @optional size_t to) - return _fairygui_VectorTreeNode_slice$1(L); + return _olua_fun_fairygui_VectorTreeNode_slice$1(L); // } } @@ -247,7 +261,7 @@ static int _fairygui_VectorTreeNode_slice(lua_State *L) return 0; } -static int _fairygui_VectorTreeNode_sub$1(lua_State *L) +static int _olua_fun_fairygui_VectorTreeNode_sub$1(lua_State *L) { olua_startinvoke(L); @@ -271,7 +285,7 @@ static int _fairygui_VectorTreeNode_sub$1(lua_State *L) return num_ret; } -static int _fairygui_VectorTreeNode_sub$2(lua_State *L) +static int _olua_fun_fairygui_VectorTreeNode_sub$2(lua_State *L) { olua_startinvoke(L); @@ -281,7 +295,7 @@ static int _fairygui_VectorTreeNode_sub$2(lua_State *L) olua_to_object(L, 1, &self, "fgui.VectorTreeNode"); olua_check_integer(L, 2, &arg1); - // @postnew fairygui::VectorTreeNode *sub(size_t from, @optional size_t to) + // @postnew fairygui::VectorTreeNode *sub(size_t from) fairygui::VectorTreeNode *ret = self->sub(arg1); int num_ret = olua_push_object(L, ret, "fgui.VectorTreeNode"); @@ -293,21 +307,21 @@ static int _fairygui_VectorTreeNode_sub$2(lua_State *L) return num_ret; } -static int _fairygui_VectorTreeNode_sub(lua_State *L) +static int _olua_fun_fairygui_VectorTreeNode_sub(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_integer(L, 2))) { - // @postnew fairygui::VectorTreeNode *sub(size_t from, @optional size_t to) - return _fairygui_VectorTreeNode_sub$2(L); + // @postnew fairygui::VectorTreeNode *sub(size_t from) + return _olua_fun_fairygui_VectorTreeNode_sub$2(L); // } } if (num_args == 2) { // if ((olua_is_integer(L, 2)) && (olua_is_integer(L, 3))) { // @postnew fairygui::VectorTreeNode *sub(size_t from, @optional size_t to) - return _fairygui_VectorTreeNode_sub$1(L); + return _olua_fun_fairygui_VectorTreeNode_sub$1(L); // } } @@ -316,7 +330,7 @@ static int _fairygui_VectorTreeNode_sub(lua_State *L) return 0; } -static int _fairygui_VectorTreeNode_take(lua_State *L) +static int _olua_fun_fairygui_VectorTreeNode_take(lua_State *L) { olua_startinvoke(L); @@ -333,7 +347,7 @@ static int _fairygui_VectorTreeNode_take(lua_State *L) return num_ret; } -static int _fairygui_VectorTreeNode_tostring(lua_State *L) +static int _olua_fun_fairygui_VectorTreeNode_tostring(lua_State *L) { olua_startinvoke(L); @@ -351,24 +365,7 @@ static int _fairygui_VectorTreeNode_tostring(lua_State *L) return (int)ret; } -static int _fairygui_VectorTreeNode_length(lua_State *L) -{ - olua_startinvoke(L); - - fairygui::VectorTreeNode *self = nullptr; - - olua_to_object(L, 1, &self, "fgui.VectorTreeNode"); - - // @getter @name(length) size_t length() - size_t ret = self->length(); - int num_ret = olua_push_integer(L, ret); - - olua_endinvoke(L); - - return num_ret; -} - -static int _fairygui_VectorTreeNode_rawdata(lua_State *L) +static int _olua_fun_fairygui_VectorTreeNode_value$1(lua_State *L) { olua_startinvoke(L); @@ -376,115 +373,89 @@ static int _fairygui_VectorTreeNode_rawdata(lua_State *L) olua_to_object(L, 1, &self, "fgui.VectorTreeNode"); - // @getter @name(rawdata) void *rawdata() - void *ret = self->rawdata(); - int num_ret = olua_push_object(L, ret, "void *"); + // @getter @name(value) const std::vector &value() + const std::vector &ret = self->value(); + int num_ret = olua_push_array(L, ret, [L](fairygui::GTreeNode *arg1) { + olua_push_object(L, arg1, "fgui.GTreeNode"); + }); olua_endinvoke(L); return num_ret; } -static int _fairygui_VectorTreeNode_size(lua_State *L) +static int _olua_fun_fairygui_VectorTreeNode_value$2(lua_State *L) { olua_startinvoke(L); fairygui::VectorTreeNode *self = nullptr; + std::vector arg1; /** v */ olua_to_object(L, 1, &self, "fgui.VectorTreeNode"); + olua_check_array(L, 2, arg1, [L](fairygui::GTreeNode **arg1) { + olua_check_object(L, -1, arg1, "fgui.GTreeNode"); + }); - // @getter @name(sizeof) size_t size() - size_t ret = self->size(); - int num_ret = olua_push_integer(L, ret); + // @setter @name(value) void value(const std::vector &v) + self->value(arg1); olua_endinvoke(L); - return num_ret; + return 0; } -static int _fairygui_VectorTreeNode_value(lua_State *L) +static int _olua_fun_fairygui_VectorTreeNode_value(lua_State *L) { - olua_startinvoke(L); - - fairygui::VectorTreeNode *self = nullptr; + int num_args = lua_gettop(L) - 1; - olua_to_object(L, 1, &self, "fgui.VectorTreeNode"); + if (num_args == 0) { + // @getter @name(value) const std::vector &value() + return _olua_fun_fairygui_VectorTreeNode_value$1(L); + } - // @getter @name(value) const std::vector &value() - const std::vector &ret = self->value(); - int num_ret = olua_push_array(L, ret, [L](fairygui::GTreeNode *arg1) { - olua_push_object(L, arg1, "fgui.GTreeNode"); - }); + if (num_args == 1) { + // if ((olua_is_array(L, 2))) { + // @setter @name(value) void value(const std::vector &v) + return _olua_fun_fairygui_VectorTreeNode_value$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'fairygui::VectorTreeNode::value' not support '%d' arguments", num_args); - return num_ret; + return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_fairygui_VectorTreeNode(lua_State *L) +static int _olua_cls_fgui_VectorTreeNode(lua_State *L) { oluacls_class(L, "fgui.VectorTreeNode"); - oluacls_func(L, "__gc", _fairygui_VectorTreeNode___gc); - oluacls_func(L, "__index", _fairygui_VectorTreeNode___index); - oluacls_func(L, "__newindex", _fairygui_VectorTreeNode___newindex); - oluacls_func(L, "__olua_move", _fairygui_VectorTreeNode___olua_move); - oluacls_func(L, "assign", _fairygui_VectorTreeNode_assign); - oluacls_func(L, "new", _fairygui_VectorTreeNode_create); - oluacls_func(L, "slice", _fairygui_VectorTreeNode_slice); - oluacls_func(L, "sub", _fairygui_VectorTreeNode_sub); - oluacls_func(L, "take", _fairygui_VectorTreeNode_take); - oluacls_func(L, "tostring", _fairygui_VectorTreeNode_tostring); - oluacls_prop(L, "length", _fairygui_VectorTreeNode_length, _fairygui_VectorTreeNode_length); - oluacls_prop(L, "rawdata", _fairygui_VectorTreeNode_rawdata, nullptr); - oluacls_prop(L, "sizeof", _fairygui_VectorTreeNode_size, nullptr); - oluacls_prop(L, "value", _fairygui_VectorTreeNode_value, _fairygui_VectorTreeNode_value); + oluacls_func(L, "__gc", _olua_fun_fairygui_VectorTreeNode___gc); + oluacls_func(L, "__index", _olua_fun_fairygui_VectorTreeNode___index); + oluacls_func(L, "__newindex", _olua_fun_fairygui_VectorTreeNode___newindex); + oluacls_func(L, "__olua_move", _olua_fun_fairygui_VectorTreeNode___olua_move); + oluacls_func(L, "new", _olua_fun_fairygui_VectorTreeNode_new); + oluacls_func(L, "slice", _olua_fun_fairygui_VectorTreeNode_slice); + oluacls_func(L, "sub", _olua_fun_fairygui_VectorTreeNode_sub); + oluacls_func(L, "take", _olua_fun_fairygui_VectorTreeNode_take); + oluacls_func(L, "tostring", _olua_fun_fairygui_VectorTreeNode_tostring); + oluacls_prop(L, "buffer", _olua_fun_fairygui_VectorTreeNode_buffer, nullptr); + oluacls_prop(L, "length", _olua_fun_fairygui_VectorTreeNode_length, nullptr); + oluacls_prop(L, "value", _olua_fun_fairygui_VectorTreeNode_value, _olua_fun_fairygui_VectorTreeNode_value); return 1; } -OLUA_END_DECLS -static int _fairygui_Margin___call(lua_State *L) +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_fgui_VectorTreeNode(lua_State *L) { - olua_startinvoke(L); - - fairygui::Margin ret; - - luaL_checktype(L, 2, LUA_TTABLE); - - float arg1 = 0; /** left */ - float arg2 = 0; /** top */ - float arg3 = 0; /** right */ - float arg4 = 0; /** bottom */ - - olua_getfield(L, 2, "left"); - olua_check_number(L, -1, &arg1); - ret.left = arg1; - lua_pop(L, 1); - - olua_getfield(L, 2, "top"); - olua_check_number(L, -1, &arg2); - ret.top = arg2; - lua_pop(L, 1); - - olua_getfield(L, 2, "right"); - olua_check_number(L, -1, &arg3); - ret.right = arg3; - lua_pop(L, 1); - - olua_getfield(L, 2, "bottom"); - olua_check_number(L, -1, &arg4); - ret.bottom = arg4; - lua_pop(L, 1); - - olua_pushcopy_object(L, ret, "fgui.Margin"); - - olua_endinvoke(L); - + olua_require(L, "fairygui", luaopen_fairygui); + if (!olua_getclass(L, "fgui.VectorTreeNode")) { + luaL_error(L, "class not found: fairygui::VectorTreeNode"); + } return 1; } +OLUA_END_DECLS -static int _fairygui_Margin___gc(lua_State *L) +static int _olua_fun_fairygui_Margin___gc(lua_State *L) { olua_startinvoke(L); @@ -496,7 +467,7 @@ static int _fairygui_Margin___gc(lua_State *L) return 0; } -static int _fairygui_Margin___olua_move(lua_State *L) +static int _olua_fun_fairygui_Margin___olua_move(lua_State *L) { olua_startinvoke(L); @@ -508,134 +479,82 @@ static int _fairygui_Margin___olua_move(lua_State *L) return 1; } -static int _fairygui_Margin_equals(lua_State *L) +static int _olua_fun_fairygui_Margin_bottom$1(lua_State *L) { olua_startinvoke(L); fairygui::Margin *self = nullptr; - fairygui::Margin arg1; /** target */ olua_to_object(L, 1, &self, "fgui.Margin"); - olua_check_object(L, 2, &arg1, "fgui.Margin"); - - // bool equals(const fairygui::Margin &target) - bool ret = self->equals(arg1); - int num_ret = olua_push_bool(L, ret); - - olua_endinvoke(L); - - return num_ret; -} - -static int _fairygui_Margin_new$1(lua_State *L) -{ - olua_startinvoke(L); - - // Margin() - fairygui::Margin *ret = new fairygui::Margin(); - int num_ret = olua_push_object(L, ret, "fgui.Margin"); - olua_postnew(L, ret); - - olua_endinvoke(L); - - return num_ret; -} - -static int _fairygui_Margin_new$2(lua_State *L) -{ - olua_startinvoke(L); - - float arg1 = 0; /** l */ - float arg2 = 0; /** t */ - float arg3 = 0; /** r */ - float arg4 = 0; /** b */ - - olua_check_number(L, 1, &arg1); - olua_check_number(L, 2, &arg2); - olua_check_number(L, 3, &arg3); - olua_check_number(L, 4, &arg4); - // Margin(float l, float t, float r, float b) - fairygui::Margin *ret = new fairygui::Margin(arg1, arg2, arg3, arg4); - int num_ret = olua_push_object(L, ret, "fgui.Margin"); - olua_postnew(L, ret); + // float bottom + float ret = self->bottom; + int num_ret = olua_push_number(L, ret); olua_endinvoke(L); return num_ret; } -static int _fairygui_Margin_new$3(lua_State *L) +static int _olua_fun_fairygui_Margin_bottom$2(lua_State *L) { olua_startinvoke(L); - fairygui::Margin arg1; /** other */ + fairygui::Margin *self = nullptr; + float arg1 = 0; /** bottom */ - olua_check_object(L, 1, &arg1, "fgui.Margin"); + olua_to_object(L, 1, &self, "fgui.Margin"); + olua_check_number(L, 2, &arg1); - // Margin(const fairygui::Margin &other) - fairygui::Margin *ret = new fairygui::Margin(arg1); - int num_ret = olua_push_object(L, ret, "fgui.Margin"); - olua_postnew(L, ret); + // float bottom + self->bottom = arg1; olua_endinvoke(L); - return num_ret; + return 0; } -static int _fairygui_Margin_new(lua_State *L) +static int _olua_fun_fairygui_Margin_bottom(lua_State *L) { - int num_args = lua_gettop(L); + int num_args = lua_gettop(L) - 1; if (num_args == 0) { - // Margin() - return _fairygui_Margin_new$1(L); + // float bottom + return _olua_fun_fairygui_Margin_bottom$1(L); } if (num_args == 1) { - // if ((olua_is_object(L, 1, "fgui.Margin"))) { - // Margin(const fairygui::Margin &other) - return _fairygui_Margin_new$3(L); - // } - } - - if (num_args == 4) { - // if ((olua_is_number(L, 1)) && (olua_is_number(L, 2)) && (olua_is_number(L, 3)) && (olua_is_number(L, 4))) { - // Margin(float l, float t, float r, float b) - return _fairygui_Margin_new$2(L); + // if ((olua_is_number(L, 2))) { + // float bottom + return _olua_fun_fairygui_Margin_bottom$2(L); // } } - luaL_error(L, "method 'fairygui::Margin::new' not support '%d' arguments", num_args); + luaL_error(L, "method 'fairygui::Margin::bottom' not support '%d' arguments", num_args); return 0; } -static int _fairygui_Margin_setMargin(lua_State *L) +static int _olua_fun_fairygui_Margin_equals(lua_State *L) { olua_startinvoke(L); fairygui::Margin *self = nullptr; - float arg1 = 0; /** l */ - float arg2 = 0; /** t */ - float arg3 = 0; /** r */ - float arg4 = 0; /** b */ + fairygui::Margin *arg1; /** target */ olua_to_object(L, 1, &self, "fgui.Margin"); - olua_check_number(L, 2, &arg1); - olua_check_number(L, 3, &arg2); - olua_check_number(L, 4, &arg3); - olua_check_number(L, 5, &arg4); + olua_check_object(L, 2, &arg1, "fgui.Margin"); - // void setMargin(float l, float t, float r, float b) - self->setMargin(arg1, arg2, arg3, arg4); + // bool equals(const fairygui::Margin &target) + bool ret = self->equals(*arg1); + int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); - return 0; + return num_ret; } -static int _fairygui_Margin_get_bottom(lua_State *L) +static int _olua_fun_fairygui_Margin_left$1(lua_State *L) { olua_startinvoke(L); @@ -643,8 +562,8 @@ static int _fairygui_Margin_get_bottom(lua_State *L) olua_to_object(L, 1, &self, "fgui.Margin"); - // float bottom - float ret = self->bottom; + // float left + float ret = self->left; int num_ret = olua_push_number(L, ret); olua_endinvoke(L); @@ -652,60 +571,105 @@ static int _fairygui_Margin_get_bottom(lua_State *L) return num_ret; } -static int _fairygui_Margin_set_bottom(lua_State *L) +static int _olua_fun_fairygui_Margin_left$2(lua_State *L) { olua_startinvoke(L); fairygui::Margin *self = nullptr; - float arg1 = 0; /** bottom */ + float arg1 = 0; /** left */ olua_to_object(L, 1, &self, "fgui.Margin"); olua_check_number(L, 2, &arg1); - // float bottom - self->bottom = arg1; + // float left + self->left = arg1; olua_endinvoke(L); return 0; } -static int _fairygui_Margin_get_left(lua_State *L) +static int _olua_fun_fairygui_Margin_left(lua_State *L) { - olua_startinvoke(L); + int num_args = lua_gettop(L) - 1; - fairygui::Margin *self = nullptr; + if (num_args == 0) { + // float left + return _olua_fun_fairygui_Margin_left$1(L); + } - olua_to_object(L, 1, &self, "fgui.Margin"); + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float left + return _olua_fun_fairygui_Margin_left$2(L); + // } + } - // float left - float ret = self->left; - int num_ret = olua_push_number(L, ret); + luaL_error(L, "method 'fairygui::Margin::left' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_fairygui_Margin_new$1(lua_State *L) +{ + olua_startinvoke(L); + + // fairygui::Margin() + fairygui::Margin *ret = new fairygui::Margin(); + int num_ret = olua_push_object(L, ret, "fgui.Margin"); + olua_postnew(L, ret); olua_endinvoke(L); return num_ret; } -static int _fairygui_Margin_set_left(lua_State *L) +static int _olua_fun_fairygui_Margin_new$2(lua_State *L) { olua_startinvoke(L); - fairygui::Margin *self = nullptr; - float arg1 = 0; /** left */ + float arg1 = 0; /** l */ + float arg2 = 0; /** t */ + float arg3 = 0; /** r */ + float arg4 = 0; /** b */ - olua_to_object(L, 1, &self, "fgui.Margin"); - olua_check_number(L, 2, &arg1); + olua_check_number(L, 1, &arg1); + olua_check_number(L, 2, &arg2); + olua_check_number(L, 3, &arg3); + olua_check_number(L, 4, &arg4); - // float left - self->left = arg1; + // fairygui::Margin(float l, float t, float r, float b) + fairygui::Margin *ret = new fairygui::Margin(arg1, arg2, arg3, arg4); + int num_ret = olua_push_object(L, ret, "fgui.Margin"); + olua_postnew(L, ret); olua_endinvoke(L); + return num_ret; +} + +static int _olua_fun_fairygui_Margin_new(lua_State *L) +{ + int num_args = lua_gettop(L); + + if (num_args == 0) { + // fairygui::Margin() + return _olua_fun_fairygui_Margin_new$1(L); + } + + if (num_args == 4) { + // if ((olua_is_number(L, 1)) && (olua_is_number(L, 2)) && (olua_is_number(L, 3)) && (olua_is_number(L, 4))) { + // fairygui::Margin(float l, float t, float r, float b) + return _olua_fun_fairygui_Margin_new$2(L); + // } + } + + luaL_error(L, "method 'fairygui::Margin::new' not support '%d' arguments", num_args); + return 0; } -static int _fairygui_Margin_get_right(lua_State *L) +static int _olua_fun_fairygui_Margin_right$1(lua_State *L) { olua_startinvoke(L); @@ -722,7 +686,7 @@ static int _fairygui_Margin_get_right(lua_State *L) return num_ret; } -static int _fairygui_Margin_set_right(lua_State *L) +static int _olua_fun_fairygui_Margin_right$2(lua_State *L) { olua_startinvoke(L); @@ -740,102 +704,136 @@ static int _fairygui_Margin_set_right(lua_State *L) return 0; } -static int _fairygui_Margin_get_top(lua_State *L) +static int _olua_fun_fairygui_Margin_right(lua_State *L) { - olua_startinvoke(L); - - fairygui::Margin *self = nullptr; + int num_args = lua_gettop(L) - 1; - olua_to_object(L, 1, &self, "fgui.Margin"); + if (num_args == 0) { + // float right + return _olua_fun_fairygui_Margin_right$1(L); + } - // float top - float ret = self->top; - int num_ret = olua_push_number(L, ret); + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float right + return _olua_fun_fairygui_Margin_right$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'fairygui::Margin::right' not support '%d' arguments", num_args); - return num_ret; + return 0; } -static int _fairygui_Margin_set_top(lua_State *L) +static int _olua_fun_fairygui_Margin_setMargin(lua_State *L) { olua_startinvoke(L); fairygui::Margin *self = nullptr; - float arg1 = 0; /** top */ + float arg1 = 0; /** l */ + float arg2 = 0; /** t */ + float arg3 = 0; /** r */ + float arg4 = 0; /** b */ olua_to_object(L, 1, &self, "fgui.Margin"); olua_check_number(L, 2, &arg1); + olua_check_number(L, 3, &arg2); + olua_check_number(L, 4, &arg3); + olua_check_number(L, 5, &arg4); - // float top - self->top = arg1; + // void setMargin(float l, float t, float r, float b) + self->setMargin(arg1, arg2, arg3, arg4); olua_endinvoke(L); return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_fairygui_Margin(lua_State *L) +static int _olua_fun_fairygui_Margin_top$1(lua_State *L) { - oluacls_class(L, "fgui.Margin"); - oluacls_func(L, "__call", _fairygui_Margin___call); - oluacls_func(L, "__gc", _fairygui_Margin___gc); - oluacls_func(L, "__olua_move", _fairygui_Margin___olua_move); - oluacls_func(L, "equals", _fairygui_Margin_equals); - oluacls_func(L, "new", _fairygui_Margin_new); - oluacls_func(L, "setMargin", _fairygui_Margin_setMargin); - oluacls_prop(L, "bottom", _fairygui_Margin_get_bottom, _fairygui_Margin_set_bottom); - oluacls_prop(L, "left", _fairygui_Margin_get_left, _fairygui_Margin_set_left); - oluacls_prop(L, "right", _fairygui_Margin_get_right, _fairygui_Margin_set_right); - oluacls_prop(L, "top", _fairygui_Margin_get_top, _fairygui_Margin_set_top); - oluacls_const(L, "ZERO", &fairygui::Margin::ZERO); + olua_startinvoke(L); - return 1; + fairygui::Margin *self = nullptr; + + olua_to_object(L, 1, &self, "fgui.Margin"); + + // float top + float ret = self->top; + int num_ret = olua_push_number(L, ret); + + olua_endinvoke(L); + + return num_ret; } -OLUA_END_DECLS -static int _fairygui_HtmlParseOptions___call(lua_State *L) +static int _olua_fun_fairygui_Margin_top$2(lua_State *L) { olua_startinvoke(L); - fairygui::HtmlParseOptions ret; + fairygui::Margin *self = nullptr; + float arg1 = 0; /** top */ - luaL_checktype(L, 2, LUA_TTABLE); + olua_to_object(L, 1, &self, "fgui.Margin"); + olua_check_number(L, 2, &arg1); - bool arg1 = false; /** defaultLinkUnderline */ - cocos2d::Color3B arg2; /** defaultLinkColor */ - bool arg3 = false; /** linkUnderline */ - cocos2d::Color3B arg4; /** linkColor */ + // float top + self->top = arg1; - olua_getfield(L, 2, "defaultLinkUnderline"); - olua_check_bool(L, -1, &arg1); - ret.defaultLinkUnderline = arg1; - lua_pop(L, 1); + olua_endinvoke(L); - olua_getfield(L, 2, "defaultLinkColor"); - olua_check_cocos2d_Color3B(L, -1, &arg2); - ret.defaultLinkColor = arg2; - lua_pop(L, 1); + return 0; +} - olua_getfield(L, 2, "linkUnderline"); - olua_check_bool(L, -1, &arg3); - ret.linkUnderline = arg3; - lua_pop(L, 1); +static int _olua_fun_fairygui_Margin_top(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; - olua_getfield(L, 2, "linkColor"); - olua_check_cocos2d_Color3B(L, -1, &arg4); - ret.linkColor = arg4; - lua_pop(L, 1); + if (num_args == 0) { + // float top + return _olua_fun_fairygui_Margin_top$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float top + return _olua_fun_fairygui_Margin_top$2(L); + // } + } - olua_pushcopy_object(L, ret, "fgui.HtmlParseOptions"); + luaL_error(L, "method 'fairygui::Margin::top' not support '%d' arguments", num_args); - olua_endinvoke(L); + return 0; +} + +static int _olua_cls_fgui_Margin(lua_State *L) +{ + oluacls_class(L, "fgui.Margin"); + oluacls_func(L, "__gc", _olua_fun_fairygui_Margin___gc); + oluacls_func(L, "__olua_move", _olua_fun_fairygui_Margin___olua_move); + oluacls_func(L, "equals", _olua_fun_fairygui_Margin_equals); + oluacls_func(L, "new", _olua_fun_fairygui_Margin_new); + oluacls_func(L, "setMargin", _olua_fun_fairygui_Margin_setMargin); + oluacls_prop(L, "bottom", _olua_fun_fairygui_Margin_bottom, _olua_fun_fairygui_Margin_bottom); + oluacls_prop(L, "left", _olua_fun_fairygui_Margin_left, _olua_fun_fairygui_Margin_left); + oluacls_prop(L, "right", _olua_fun_fairygui_Margin_right, _olua_fun_fairygui_Margin_right); + oluacls_prop(L, "top", _olua_fun_fairygui_Margin_top, _olua_fun_fairygui_Margin_top); + oluacls_const(L, "ZERO", &fairygui::Margin::ZERO); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_fgui_Margin(lua_State *L) +{ + olua_require(L, "fairygui", luaopen_fairygui); + if (!olua_getclass(L, "fgui.Margin")) { + luaL_error(L, "class not found: fairygui::Margin"); + } return 1; } +OLUA_END_DECLS -static int _fairygui_HtmlParseOptions___gc(lua_State *L) +static int _olua_fun_fairygui_HtmlParseOptions___gc(lua_State *L) { olua_startinvoke(L); @@ -847,7 +845,7 @@ static int _fairygui_HtmlParseOptions___gc(lua_State *L) return 0; } -static int _fairygui_HtmlParseOptions___olua_move(lua_State *L) +static int _olua_fun_fairygui_HtmlParseOptions___olua_move(lua_State *L) { olua_startinvoke(L); @@ -859,21 +857,7 @@ static int _fairygui_HtmlParseOptions___olua_move(lua_State *L) return 1; } -static int _fairygui_HtmlParseOptions_new(lua_State *L) -{ - olua_startinvoke(L); - - // HtmlParseOptions() - fairygui::HtmlParseOptions *ret = new fairygui::HtmlParseOptions(); - int num_ret = olua_push_object(L, ret, "fgui.HtmlParseOptions"); - olua_postnew(L, ret); - - olua_endinvoke(L); - - return num_ret; -} - -static int _fairygui_HtmlParseOptions_get_defaultLinkColor(lua_State *L) +static int _olua_fun_fairygui_HtmlParseOptions_defaultLinkColor$1(lua_State *L) { olua_startinvoke(L); @@ -886,7 +870,7 @@ static int _fairygui_HtmlParseOptions_get_defaultLinkColor(lua_State *L) return num_ret; } -static int _fairygui_HtmlParseOptions_set_defaultLinkColor(lua_State *L) +static int _olua_fun_fairygui_HtmlParseOptions_defaultLinkColor$2(lua_State *L) { olua_startinvoke(L); @@ -902,7 +886,28 @@ static int _fairygui_HtmlParseOptions_set_defaultLinkColor(lua_State *L) return 0; } -static int _fairygui_HtmlParseOptions_get_defaultLinkUnderline(lua_State *L) +static int _olua_fun_fairygui_HtmlParseOptions_defaultLinkColor(lua_State *L) +{ + int num_args = lua_gettop(L); + + if (num_args == 0) { + // static cocos2d::Color3B defaultLinkColor + return _olua_fun_fairygui_HtmlParseOptions_defaultLinkColor$1(L); + } + + if (num_args == 1) { + // if ((olua_is_cocos2d_Color3B(L, 1))) { + // static cocos2d::Color3B defaultLinkColor + return _olua_fun_fairygui_HtmlParseOptions_defaultLinkColor$2(L); + // } + } + + luaL_error(L, "method 'fairygui::HtmlParseOptions::defaultLinkColor' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_fairygui_HtmlParseOptions_defaultLinkUnderline$1(lua_State *L) { olua_startinvoke(L); @@ -915,7 +920,7 @@ static int _fairygui_HtmlParseOptions_get_defaultLinkUnderline(lua_State *L) return num_ret; } -static int _fairygui_HtmlParseOptions_set_defaultLinkUnderline(lua_State *L) +static int _olua_fun_fairygui_HtmlParseOptions_defaultLinkUnderline$2(lua_State *L) { olua_startinvoke(L); @@ -931,7 +936,28 @@ static int _fairygui_HtmlParseOptions_set_defaultLinkUnderline(lua_State *L) return 0; } -static int _fairygui_HtmlParseOptions_get_linkColor(lua_State *L) +static int _olua_fun_fairygui_HtmlParseOptions_defaultLinkUnderline(lua_State *L) +{ + int num_args = lua_gettop(L); + + if (num_args == 0) { + // static bool defaultLinkUnderline + return _olua_fun_fairygui_HtmlParseOptions_defaultLinkUnderline$1(L); + } + + if (num_args == 1) { + // if ((olua_is_bool(L, 1))) { + // static bool defaultLinkUnderline + return _olua_fun_fairygui_HtmlParseOptions_defaultLinkUnderline$2(L); + // } + } + + luaL_error(L, "method 'fairygui::HtmlParseOptions::defaultLinkUnderline' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_fairygui_HtmlParseOptions_linkColor$1(lua_State *L) { olua_startinvoke(L); @@ -948,7 +974,7 @@ static int _fairygui_HtmlParseOptions_get_linkColor(lua_State *L) return num_ret; } -static int _fairygui_HtmlParseOptions_set_linkColor(lua_State *L) +static int _olua_fun_fairygui_HtmlParseOptions_linkColor$2(lua_State *L) { olua_startinvoke(L); @@ -966,7 +992,28 @@ static int _fairygui_HtmlParseOptions_set_linkColor(lua_State *L) return 0; } -static int _fairygui_HtmlParseOptions_get_linkUnderline(lua_State *L) +static int _olua_fun_fairygui_HtmlParseOptions_linkColor(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // cocos2d::Color3B linkColor + return _olua_fun_fairygui_HtmlParseOptions_linkColor$1(L); + } + + if (num_args == 1) { + // if ((olua_is_cocos2d_Color3B(L, 2))) { + // cocos2d::Color3B linkColor + return _olua_fun_fairygui_HtmlParseOptions_linkColor$2(L); + // } + } + + luaL_error(L, "method 'fairygui::HtmlParseOptions::linkColor' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_fairygui_HtmlParseOptions_linkUnderline$1(lua_State *L) { olua_startinvoke(L); @@ -983,7 +1030,7 @@ static int _fairygui_HtmlParseOptions_get_linkUnderline(lua_State *L) return num_ret; } -static int _fairygui_HtmlParseOptions_set_linkUnderline(lua_State *L) +static int _olua_fun_fairygui_HtmlParseOptions_linkUnderline$2(lua_State *L) { olua_startinvoke(L); @@ -1001,80 +1048,67 @@ static int _fairygui_HtmlParseOptions_set_linkUnderline(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_fairygui_HtmlParseOptions(lua_State *L) +static int _olua_fun_fairygui_HtmlParseOptions_linkUnderline(lua_State *L) { - oluacls_class(L, "fgui.HtmlParseOptions"); - oluacls_func(L, "__call", _fairygui_HtmlParseOptions___call); - oluacls_func(L, "__gc", _fairygui_HtmlParseOptions___gc); - oluacls_func(L, "__olua_move", _fairygui_HtmlParseOptions___olua_move); - oluacls_func(L, "new", _fairygui_HtmlParseOptions_new); - oluacls_prop(L, "defaultLinkColor", _fairygui_HtmlParseOptions_get_defaultLinkColor, _fairygui_HtmlParseOptions_set_defaultLinkColor); - oluacls_prop(L, "defaultLinkUnderline", _fairygui_HtmlParseOptions_get_defaultLinkUnderline, _fairygui_HtmlParseOptions_set_defaultLinkUnderline); - oluacls_prop(L, "linkColor", _fairygui_HtmlParseOptions_get_linkColor, _fairygui_HtmlParseOptions_set_linkColor); - oluacls_prop(L, "linkUnderline", _fairygui_HtmlParseOptions_get_linkUnderline, _fairygui_HtmlParseOptions_set_linkUnderline); + int num_args = lua_gettop(L) - 1; - return 1; + if (num_args == 0) { + // bool linkUnderline + return _olua_fun_fairygui_HtmlParseOptions_linkUnderline$1(L); + } + + if (num_args == 1) { + // if ((olua_is_bool(L, 2))) { + // bool linkUnderline + return _olua_fun_fairygui_HtmlParseOptions_linkUnderline$2(L); + // } + } + + luaL_error(L, "method 'fairygui::HtmlParseOptions::linkUnderline' not support '%d' arguments", num_args); + + return 0; } -OLUA_END_DECLS -static int _fairygui_TweenValue___call(lua_State *L) +static int _olua_fun_fairygui_HtmlParseOptions_new(lua_State *L) { olua_startinvoke(L); - fairygui::TweenValue ret; - - luaL_checktype(L, 2, LUA_TTABLE); - - float arg1 = 0; /** x */ - float arg2 = 0; /** y */ - float arg3 = 0; /** z */ - float arg4 = 0; /** w */ - double arg5 = 0; /** d */ + // fairygui::HtmlParseOptions() + fairygui::HtmlParseOptions *ret = new fairygui::HtmlParseOptions(); + int num_ret = olua_push_object(L, ret, "fgui.HtmlParseOptions"); + olua_postnew(L, ret); - olua_getfield(L, 2, "x"); - if (!olua_isnoneornil(L, -1)) { - olua_check_number(L, -1, &arg1); - ret.x = arg1; - } - lua_pop(L, 1); + olua_endinvoke(L); - olua_getfield(L, 2, "y"); - if (!olua_isnoneornil(L, -1)) { - olua_check_number(L, -1, &arg2); - ret.y = arg2; - } - lua_pop(L, 1); + return num_ret; +} - olua_getfield(L, 2, "z"); - if (!olua_isnoneornil(L, -1)) { - olua_check_number(L, -1, &arg3); - ret.z = arg3; - } - lua_pop(L, 1); +static int _olua_cls_fgui_HtmlParseOptions(lua_State *L) +{ + oluacls_class(L, "fgui.HtmlParseOptions"); + oluacls_func(L, "__gc", _olua_fun_fairygui_HtmlParseOptions___gc); + oluacls_func(L, "__olua_move", _olua_fun_fairygui_HtmlParseOptions___olua_move); + oluacls_func(L, "new", _olua_fun_fairygui_HtmlParseOptions_new); + oluacls_prop(L, "defaultLinkColor", _olua_fun_fairygui_HtmlParseOptions_defaultLinkColor, _olua_fun_fairygui_HtmlParseOptions_defaultLinkColor); + oluacls_prop(L, "defaultLinkUnderline", _olua_fun_fairygui_HtmlParseOptions_defaultLinkUnderline, _olua_fun_fairygui_HtmlParseOptions_defaultLinkUnderline); + oluacls_prop(L, "linkColor", _olua_fun_fairygui_HtmlParseOptions_linkColor, _olua_fun_fairygui_HtmlParseOptions_linkColor); + oluacls_prop(L, "linkUnderline", _olua_fun_fairygui_HtmlParseOptions_linkUnderline, _olua_fun_fairygui_HtmlParseOptions_linkUnderline); - olua_getfield(L, 2, "w"); - if (!olua_isnoneornil(L, -1)) { - olua_check_number(L, -1, &arg4); - ret.w = arg4; - } - lua_pop(L, 1); + return 1; +} - olua_getfield(L, 2, "d"); - if (!olua_isnoneornil(L, -1)) { - olua_check_number(L, -1, &arg5); - ret.d = arg5; +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_fgui_HtmlParseOptions(lua_State *L) +{ + olua_require(L, "fairygui", luaopen_fairygui); + if (!olua_getclass(L, "fgui.HtmlParseOptions")) { + luaL_error(L, "class not found: fairygui::HtmlParseOptions"); } - lua_pop(L, 1); - - olua_pushcopy_object(L, ret, "fgui.TweenValue"); - - olua_endinvoke(L); - return 1; } +OLUA_END_DECLS -static int _fairygui_TweenValue___gc(lua_State *L) +static int _olua_fun_fairygui_TweenValue___gc(lua_State *L) { olua_startinvoke(L); @@ -1086,7 +1120,7 @@ static int _fairygui_TweenValue___gc(lua_State *L) return 0; } -static int _fairygui_TweenValue___olua_move(lua_State *L) +static int _olua_fun_fairygui_TweenValue___olua_move(lua_State *L) { olua_startinvoke(L); @@ -1098,7 +1132,63 @@ static int _fairygui_TweenValue___olua_move(lua_State *L) return 1; } -static int _fairygui_TweenValue_getColor(lua_State *L) +static int _olua_fun_fairygui_TweenValue_d$1(lua_State *L) +{ + olua_startinvoke(L); + + fairygui::TweenValue *self = nullptr; + + olua_to_object(L, 1, &self, "fgui.TweenValue"); + + // double d + double ret = self->d; + int num_ret = olua_push_number(L, ret); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_fairygui_TweenValue_d$2(lua_State *L) +{ + olua_startinvoke(L); + + fairygui::TweenValue *self = nullptr; + double arg1 = 0; /** d */ + + olua_to_object(L, 1, &self, "fgui.TweenValue"); + olua_check_number(L, 2, &arg1); + + // double d + self->d = arg1; + + olua_endinvoke(L); + + return 0; +} + +static int _olua_fun_fairygui_TweenValue_d(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // double d + return _olua_fun_fairygui_TweenValue_d$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // double d + return _olua_fun_fairygui_TweenValue_d$2(L); + // } + } + + luaL_error(L, "method 'fairygui::TweenValue::d' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_fairygui_TweenValue_getColor(lua_State *L) { olua_startinvoke(L); @@ -1115,7 +1205,7 @@ static int _fairygui_TweenValue_getColor(lua_State *L) return num_ret; } -static int _fairygui_TweenValue_getVec2(lua_State *L) +static int _olua_fun_fairygui_TweenValue_getVec2(lua_State *L) { olua_startinvoke(L); @@ -1125,14 +1215,14 @@ static int _fairygui_TweenValue_getVec2(lua_State *L) // cocos2d::Vec2 getVec2() cocos2d::Vec2 ret = self->getVec2(); - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec2"); + int num_ret = olua_copy_object(L, ret, "cc.Vec2"); olua_endinvoke(L); return num_ret; } -static int _fairygui_TweenValue_getVec3(lua_State *L) +static int _olua_fun_fairygui_TweenValue_getVec3(lua_State *L) { olua_startinvoke(L); @@ -1142,14 +1232,14 @@ static int _fairygui_TweenValue_getVec3(lua_State *L) // cocos2d::Vec3 getVec3() cocos2d::Vec3 ret = self->getVec3(); - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec3"); + int num_ret = olua_copy_object(L, ret, "cc.Vec3"); olua_endinvoke(L); return num_ret; } -static int _fairygui_TweenValue_getVec4(lua_State *L) +static int _olua_fun_fairygui_TweenValue_getVec4(lua_State *L) { olua_startinvoke(L); @@ -1159,18 +1249,18 @@ static int _fairygui_TweenValue_getVec4(lua_State *L) // cocos2d::Vec4 getVec4() cocos2d::Vec4 ret = self->getVec4(); - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec4"); + int num_ret = olua_copy_object(L, ret, "cc.Vec4"); olua_endinvoke(L); return num_ret; } -static int _fairygui_TweenValue_new(lua_State *L) +static int _olua_fun_fairygui_TweenValue_new(lua_State *L) { olua_startinvoke(L); - // TweenValue() + // fairygui::TweenValue() fairygui::TweenValue *ret = new fairygui::TweenValue(); int num_ret = olua_push_object(L, ret, "fgui.TweenValue"); olua_postnew(L, ret); @@ -1180,7 +1270,7 @@ static int _fairygui_TweenValue_new(lua_State *L) return num_ret; } -static int _fairygui_TweenValue_setColor(lua_State *L) +static int _olua_fun_fairygui_TweenValue_setColor(lua_State *L) { olua_startinvoke(L); @@ -1198,61 +1288,61 @@ static int _fairygui_TweenValue_setColor(lua_State *L) return 0; } -static int _fairygui_TweenValue_setVec2(lua_State *L) +static int _olua_fun_fairygui_TweenValue_setVec2(lua_State *L) { olua_startinvoke(L); fairygui::TweenValue *self = nullptr; - cocos2d::Vec2 arg1; /** value */ + cocos2d::Vec2 *arg1; /** value */ olua_to_object(L, 1, &self, "fgui.TweenValue"); olua_check_object(L, 2, &arg1, "cc.Vec2"); // void setVec2(const cocos2d::Vec2 &value) - self->setVec2(arg1); + self->setVec2(*arg1); olua_endinvoke(L); return 0; } -static int _fairygui_TweenValue_setVec3(lua_State *L) +static int _olua_fun_fairygui_TweenValue_setVec3(lua_State *L) { olua_startinvoke(L); fairygui::TweenValue *self = nullptr; - cocos2d::Vec3 arg1; /** value */ + cocos2d::Vec3 *arg1; /** value */ olua_to_object(L, 1, &self, "fgui.TweenValue"); olua_check_object(L, 2, &arg1, "cc.Vec3"); // void setVec3(const cocos2d::Vec3 &value) - self->setVec3(arg1); + self->setVec3(*arg1); olua_endinvoke(L); return 0; } -static int _fairygui_TweenValue_setVec4(lua_State *L) +static int _olua_fun_fairygui_TweenValue_setVec4(lua_State *L) { olua_startinvoke(L); fairygui::TweenValue *self = nullptr; - cocos2d::Vec4 arg1; /** value */ + cocos2d::Vec4 *arg1; /** value */ olua_to_object(L, 1, &self, "fgui.TweenValue"); olua_check_object(L, 2, &arg1, "cc.Vec4"); // void setVec4(const cocos2d::Vec4 &value) - self->setVec4(arg1); + self->setVec4(*arg1); olua_endinvoke(L); return 0; } -static int _fairygui_TweenValue_setZero(lua_State *L) +static int _olua_fun_fairygui_TweenValue_setZero(lua_State *L) { olua_startinvoke(L); @@ -1268,7 +1358,7 @@ static int _fairygui_TweenValue_setZero(lua_State *L) return 0; } -static int _fairygui_TweenValue_get_d(lua_State *L) +static int _olua_fun_fairygui_TweenValue_w$1(lua_State *L) { olua_startinvoke(L); @@ -1276,8 +1366,8 @@ static int _fairygui_TweenValue_get_d(lua_State *L) olua_to_object(L, 1, &self, "fgui.TweenValue"); - // @optional double d - double ret = self->d; + // float w + float ret = self->w; int num_ret = olua_push_number(L, ret); olua_endinvoke(L); @@ -1285,25 +1375,46 @@ static int _fairygui_TweenValue_get_d(lua_State *L) return num_ret; } -static int _fairygui_TweenValue_set_d(lua_State *L) +static int _olua_fun_fairygui_TweenValue_w$2(lua_State *L) { olua_startinvoke(L); fairygui::TweenValue *self = nullptr; - double arg1 = 0; /** d */ + float arg1 = 0; /** w */ olua_to_object(L, 1, &self, "fgui.TweenValue"); olua_check_number(L, 2, &arg1); - // @optional double d - self->d = arg1; + // float w + self->w = arg1; olua_endinvoke(L); return 0; } -static int _fairygui_TweenValue_get_w(lua_State *L) +static int _olua_fun_fairygui_TweenValue_w(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float w + return _olua_fun_fairygui_TweenValue_w$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float w + return _olua_fun_fairygui_TweenValue_w$2(L); + // } + } + + luaL_error(L, "method 'fairygui::TweenValue::w' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_fairygui_TweenValue_x$1(lua_State *L) { olua_startinvoke(L); @@ -1311,8 +1422,8 @@ static int _fairygui_TweenValue_get_w(lua_State *L) olua_to_object(L, 1, &self, "fgui.TweenValue"); - // @optional float w - float ret = self->w; + // float x + float ret = self->x; int num_ret = olua_push_number(L, ret); olua_endinvoke(L); @@ -1320,25 +1431,46 @@ static int _fairygui_TweenValue_get_w(lua_State *L) return num_ret; } -static int _fairygui_TweenValue_set_w(lua_State *L) +static int _olua_fun_fairygui_TweenValue_x$2(lua_State *L) { olua_startinvoke(L); fairygui::TweenValue *self = nullptr; - float arg1 = 0; /** w */ + float arg1 = 0; /** x */ olua_to_object(L, 1, &self, "fgui.TweenValue"); olua_check_number(L, 2, &arg1); - // @optional float w - self->w = arg1; + // float x + self->x = arg1; olua_endinvoke(L); return 0; } -static int _fairygui_TweenValue_get_x(lua_State *L) +static int _olua_fun_fairygui_TweenValue_x(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float x + return _olua_fun_fairygui_TweenValue_x$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float x + return _olua_fun_fairygui_TweenValue_x$2(L); + // } + } + + luaL_error(L, "method 'fairygui::TweenValue::x' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_fairygui_TweenValue_y$1(lua_State *L) { olua_startinvoke(L); @@ -1346,8 +1478,8 @@ static int _fairygui_TweenValue_get_x(lua_State *L) olua_to_object(L, 1, &self, "fgui.TweenValue"); - // @optional float x - float ret = self->x; + // float y + float ret = self->y; int num_ret = olua_push_number(L, ret); olua_endinvoke(L); @@ -1355,60 +1487,46 @@ static int _fairygui_TweenValue_get_x(lua_State *L) return num_ret; } -static int _fairygui_TweenValue_set_x(lua_State *L) +static int _olua_fun_fairygui_TweenValue_y$2(lua_State *L) { olua_startinvoke(L); fairygui::TweenValue *self = nullptr; - float arg1 = 0; /** x */ + float arg1 = 0; /** y */ olua_to_object(L, 1, &self, "fgui.TweenValue"); olua_check_number(L, 2, &arg1); - // @optional float x - self->x = arg1; + // float y + self->y = arg1; olua_endinvoke(L); return 0; } -static int _fairygui_TweenValue_get_y(lua_State *L) +static int _olua_fun_fairygui_TweenValue_y(lua_State *L) { - olua_startinvoke(L); + int num_args = lua_gettop(L) - 1; - fairygui::TweenValue *self = nullptr; - - olua_to_object(L, 1, &self, "fgui.TweenValue"); - - // @optional float y - float ret = self->y; - int num_ret = olua_push_number(L, ret); - - olua_endinvoke(L); - - return num_ret; -} - -static int _fairygui_TweenValue_set_y(lua_State *L) -{ - olua_startinvoke(L); - - fairygui::TweenValue *self = nullptr; - float arg1 = 0; /** y */ - - olua_to_object(L, 1, &self, "fgui.TweenValue"); - olua_check_number(L, 2, &arg1); + if (num_args == 0) { + // float y + return _olua_fun_fairygui_TweenValue_y$1(L); + } - // @optional float y - self->y = arg1; + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float y + return _olua_fun_fairygui_TweenValue_y$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'fairygui::TweenValue::y' not support '%d' arguments", num_args); return 0; } -static int _fairygui_TweenValue_get_z(lua_State *L) +static int _olua_fun_fairygui_TweenValue_z$1(lua_State *L) { olua_startinvoke(L); @@ -1416,7 +1534,7 @@ static int _fairygui_TweenValue_get_z(lua_State *L) olua_to_object(L, 1, &self, "fgui.TweenValue"); - // @optional float z + // float z float ret = self->z; int num_ret = olua_push_number(L, ret); @@ -1425,7 +1543,7 @@ static int _fairygui_TweenValue_get_z(lua_State *L) return num_ret; } -static int _fairygui_TweenValue_set_z(lua_State *L) +static int _olua_fun_fairygui_TweenValue_z$2(lua_State *L) { olua_startinvoke(L); @@ -1435,7 +1553,7 @@ static int _fairygui_TweenValue_set_z(lua_State *L) olua_to_object(L, 1, &self, "fgui.TweenValue"); olua_check_number(L, 2, &arg1); - // @optional float z + // float z self->z = arg1; olua_endinvoke(L); @@ -1443,38 +1561,67 @@ static int _fairygui_TweenValue_set_z(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_fairygui_TweenValue(lua_State *L) +static int _olua_fun_fairygui_TweenValue_z(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float z + return _olua_fun_fairygui_TweenValue_z$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float z + return _olua_fun_fairygui_TweenValue_z$2(L); + // } + } + + luaL_error(L, "method 'fairygui::TweenValue::z' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_cls_fgui_TweenValue(lua_State *L) { oluacls_class(L, "fgui.TweenValue"); - oluacls_func(L, "__call", _fairygui_TweenValue___call); - oluacls_func(L, "__gc", _fairygui_TweenValue___gc); - oluacls_func(L, "__olua_move", _fairygui_TweenValue___olua_move); - oluacls_func(L, "getColor", _fairygui_TweenValue_getColor); - oluacls_func(L, "getVec2", _fairygui_TweenValue_getVec2); - oluacls_func(L, "getVec3", _fairygui_TweenValue_getVec3); - oluacls_func(L, "getVec4", _fairygui_TweenValue_getVec4); - oluacls_func(L, "new", _fairygui_TweenValue_new); - oluacls_func(L, "setColor", _fairygui_TweenValue_setColor); - oluacls_func(L, "setVec2", _fairygui_TweenValue_setVec2); - oluacls_func(L, "setVec3", _fairygui_TweenValue_setVec3); - oluacls_func(L, "setVec4", _fairygui_TweenValue_setVec4); - oluacls_func(L, "setZero", _fairygui_TweenValue_setZero); - oluacls_prop(L, "color", _fairygui_TweenValue_getColor, _fairygui_TweenValue_setColor); - oluacls_prop(L, "vec2", _fairygui_TweenValue_getVec2, _fairygui_TweenValue_setVec2); - oluacls_prop(L, "vec3", _fairygui_TweenValue_getVec3, _fairygui_TweenValue_setVec3); - oluacls_prop(L, "vec4", _fairygui_TweenValue_getVec4, _fairygui_TweenValue_setVec4); - oluacls_prop(L, "d", _fairygui_TweenValue_get_d, _fairygui_TweenValue_set_d); - oluacls_prop(L, "w", _fairygui_TweenValue_get_w, _fairygui_TweenValue_set_w); - oluacls_prop(L, "x", _fairygui_TweenValue_get_x, _fairygui_TweenValue_set_x); - oluacls_prop(L, "y", _fairygui_TweenValue_get_y, _fairygui_TweenValue_set_y); - oluacls_prop(L, "z", _fairygui_TweenValue_get_z, _fairygui_TweenValue_set_z); + oluacls_func(L, "__gc", _olua_fun_fairygui_TweenValue___gc); + oluacls_func(L, "__olua_move", _olua_fun_fairygui_TweenValue___olua_move); + oluacls_func(L, "getColor", _olua_fun_fairygui_TweenValue_getColor); + oluacls_func(L, "getVec2", _olua_fun_fairygui_TweenValue_getVec2); + oluacls_func(L, "getVec3", _olua_fun_fairygui_TweenValue_getVec3); + oluacls_func(L, "getVec4", _olua_fun_fairygui_TweenValue_getVec4); + oluacls_func(L, "new", _olua_fun_fairygui_TweenValue_new); + oluacls_func(L, "setColor", _olua_fun_fairygui_TweenValue_setColor); + oluacls_func(L, "setVec2", _olua_fun_fairygui_TweenValue_setVec2); + oluacls_func(L, "setVec3", _olua_fun_fairygui_TweenValue_setVec3); + oluacls_func(L, "setVec4", _olua_fun_fairygui_TweenValue_setVec4); + oluacls_func(L, "setZero", _olua_fun_fairygui_TweenValue_setZero); + oluacls_prop(L, "color", _olua_fun_fairygui_TweenValue_getColor, _olua_fun_fairygui_TweenValue_setColor); + oluacls_prop(L, "vec2", _olua_fun_fairygui_TweenValue_getVec2, _olua_fun_fairygui_TweenValue_setVec2); + oluacls_prop(L, "vec3", _olua_fun_fairygui_TweenValue_getVec3, _olua_fun_fairygui_TweenValue_setVec3); + oluacls_prop(L, "vec4", _olua_fun_fairygui_TweenValue_getVec4, _olua_fun_fairygui_TweenValue_setVec4); + oluacls_prop(L, "d", _olua_fun_fairygui_TweenValue_d, _olua_fun_fairygui_TweenValue_d); + oluacls_prop(L, "w", _olua_fun_fairygui_TweenValue_w, _olua_fun_fairygui_TweenValue_w); + oluacls_prop(L, "x", _olua_fun_fairygui_TweenValue_x, _olua_fun_fairygui_TweenValue_x); + oluacls_prop(L, "y", _olua_fun_fairygui_TweenValue_y, _olua_fun_fairygui_TweenValue_y); + oluacls_prop(L, "z", _olua_fun_fairygui_TweenValue_z, _olua_fun_fairygui_TweenValue_z); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_fgui_TweenValue(lua_State *L) +{ + olua_require(L, "fairygui", luaopen_fairygui); + if (!olua_getclass(L, "fgui.TweenValue")) { + luaL_error(L, "class not found: fairygui::TweenValue"); + } + return 1; +} OLUA_END_DECLS -static int _fairygui_UIEventType___gc(lua_State *L) +static int _olua_fun_fairygui_UIEventType___gc(lua_State *L) { olua_startinvoke(L); @@ -1486,7 +1633,7 @@ static int _fairygui_UIEventType___gc(lua_State *L) return 0; } -static int _fairygui_UIEventType___olua_move(lua_State *L) +static int _olua_fun_fairygui_UIEventType___olua_move(lua_State *L) { olua_startinvoke(L); @@ -1498,13 +1645,12 @@ static int _fairygui_UIEventType___olua_move(lua_State *L) return 1; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_fairygui_UIEventType(lua_State *L) +static int _olua_cls_fgui_UIEventType(lua_State *L) { oluacls_class(L, "fgui.UIEventType"); oluacls_func(L, "__index", olua_indexerror); - oluacls_func(L, "__gc", _fairygui_UIEventType___gc); - oluacls_func(L, "__olua_move", _fairygui_UIEventType___olua_move); + oluacls_func(L, "__gc", _olua_fun_fairygui_UIEventType___gc); + oluacls_func(L, "__olua_move", _olua_fun_fairygui_UIEventType___olua_move); oluacls_const(L, "Changed", fairygui::UIEventType::Changed); oluacls_const(L, "Click", fairygui::UIEventType::Click); oluacls_const(L, "ClickItem", fairygui::UIEventType::ClickItem); @@ -1538,9 +1684,19 @@ OLUA_LIB int luaopen_fairygui_UIEventType(lua_State *L) return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_fgui_UIEventType(lua_State *L) +{ + olua_require(L, "fairygui", luaopen_fairygui); + if (!olua_getclass(L, "fgui.UIEventType")) { + luaL_error(L, "class not found: fairygui::UIEventType"); + } + return 1; +} OLUA_END_DECLS -static int _fairygui_EventCallback___call(lua_State *L) +static int _olua_fun_fairygui_EventCallback___call(lua_State *L) { olua_startinvoke(L); @@ -1552,12 +1708,21 @@ static int _fairygui_EventCallback___call(lua_State *L) return 1; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_fairygui_EventCallback(lua_State *L) +static int _olua_cls_fgui_EventCallback(lua_State *L) { oluacls_class(L, "fgui.EventCallback"); - oluacls_func(L, "__call", _fairygui_EventCallback___call); + oluacls_func(L, "__call", _olua_fun_fairygui_EventCallback___call); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_fgui_EventCallback(lua_State *L) +{ + olua_require(L, "fairygui", luaopen_fairygui); + if (!olua_getclass(L, "fgui.EventCallback")) { + luaL_error(L, "class not found: fairygui::EventCallback"); + } return 1; } OLUA_END_DECLS @@ -1583,7 +1748,7 @@ static std::string makeListenerTag(lua_State *L, lua_Integer type, int tagidx) return std::string(buf); } -static int _fairygui_UIEventDispatcher_addEventListener$1(lua_State *L) +static int _olua_fun_fairygui_UIEventDispatcher_addEventListener$1(lua_State *L) { olua_startinvoke(L); @@ -1597,9 +1762,10 @@ static int _fairygui_UIEventDispatcher_addEventListener$1(lua_State *L) void *cb_store = (void *)self; std::string cb_tag = makeListenerTag(L, arg1, 0); - std::string cb_name = olua_setcallback(L, cb_store, 3, cb_tag.c_str(), OLUA_TAG_NEW); + std::string cb_name = olua_setcallback(L, cb_store, 3, cb_tag.c_str(), OLUA_TAG_NEW); olua_Context cb_ctx = olua_context(L); - arg2 = [cb_store, cb_name, cb_ctx](fairygui::EventContext *arg1) { + // lua_State *ML = olua_mainthread(L); + arg2 = [cb_store, cb_name, cb_ctx /*, ML */](fairygui::EventContext *cb_arg1) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); @@ -1607,7 +1773,7 @@ static int _fairygui_UIEventDispatcher_addEventListener$1(lua_State *L) int top = lua_gettop(L); size_t last = olua_push_objpool(L); olua_enable_objpool(L); - olua_push_object(L, arg1, "fgui.EventContext"); + olua_push_object(L, cb_arg1, "fgui.EventContext"); olua_disable_objpool(L); olua_callback(L, cb_store, cb_name.c_str(), 1); @@ -1618,7 +1784,7 @@ static int _fairygui_UIEventDispatcher_addEventListener$1(lua_State *L) } }; - // void addEventListener(int eventType, @localvar const fairygui::EventCallback &callback) + // void addEventListener(int eventType, const fairygui::EventCallback &callback) self->addEventListener(arg1, arg2); olua_endinvoke(L); @@ -1626,7 +1792,7 @@ static int _fairygui_UIEventDispatcher_addEventListener$1(lua_State *L) return 0; } -static int _fairygui_UIEventDispatcher_addEventListener$2(lua_State *L) +static int _olua_fun_fairygui_UIEventDispatcher_addEventListener$2(lua_State *L) { olua_startinvoke(L); @@ -1642,9 +1808,10 @@ static int _fairygui_UIEventDispatcher_addEventListener$2(lua_State *L) void *cb_store = (void *)self; std::string cb_tag = makeListenerTag(L, arg1, 4); - std::string cb_name = olua_setcallback(L, cb_store, 3, cb_tag.c_str(), OLUA_TAG_NEW); + std::string cb_name = olua_setcallback(L, cb_store, 3, cb_tag.c_str(), OLUA_TAG_NEW); olua_Context cb_ctx = olua_context(L); - arg2 = [cb_store, cb_name, cb_ctx](fairygui::EventContext *arg1) { + // lua_State *ML = olua_mainthread(L); + arg2 = [cb_store, cb_name, cb_ctx /*, ML */](fairygui::EventContext *cb_arg1) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); @@ -1652,7 +1819,7 @@ static int _fairygui_UIEventDispatcher_addEventListener$2(lua_State *L) int top = lua_gettop(L); size_t last = olua_push_objpool(L); olua_enable_objpool(L); - olua_push_object(L, arg1, "fgui.EventContext"); + olua_push_object(L, cb_arg1, "fgui.EventContext"); olua_disable_objpool(L); olua_callback(L, cb_store, cb_name.c_str(), 1); @@ -1663,7 +1830,7 @@ static int _fairygui_UIEventDispatcher_addEventListener$2(lua_State *L) } }; - // void addEventListener(int eventType, @localvar const fairygui::EventCallback &callback, const fairygui::EventTag &tag) + // void addEventListener(int eventType, const fairygui::EventCallback &callback, const fairygui::EventTag &tag) self->addEventListener(arg1, arg2, arg3); olua_endinvoke(L); @@ -1671,21 +1838,21 @@ static int _fairygui_UIEventDispatcher_addEventListener$2(lua_State *L) return 0; } -static int _fairygui_UIEventDispatcher_addEventListener(lua_State *L) +static int _olua_fun_fairygui_UIEventDispatcher_addEventListener(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 2) { // if ((olua_is_integer(L, 2)) && (olua_is_callback(L, 3, "fgui.EventCallback"))) { - // void addEventListener(int eventType, @localvar const fairygui::EventCallback &callback) - return _fairygui_UIEventDispatcher_addEventListener$1(L); + // void addEventListener(int eventType, const fairygui::EventCallback &callback) + return _olua_fun_fairygui_UIEventDispatcher_addEventListener$1(L); // } } if (num_args == 3) { // if ((olua_is_integer(L, 2)) && (olua_is_callback(L, 3, "fgui.EventCallback")) && (olua_is_fairygui_EventTag(L, 4))) { - // void addEventListener(int eventType, @localvar const fairygui::EventCallback &callback, const fairygui::EventTag &tag) - return _fairygui_UIEventDispatcher_addEventListener$2(L); + // void addEventListener(int eventType, const fairygui::EventCallback &callback, const fairygui::EventTag &tag) + return _olua_fun_fairygui_UIEventDispatcher_addEventListener$2(L); // } } @@ -1694,7 +1861,7 @@ static int _fairygui_UIEventDispatcher_addEventListener(lua_State *L) return 0; } -static int _fairygui_UIEventDispatcher_bubbleEvent$1(lua_State *L) +static int _olua_fun_fairygui_UIEventDispatcher_bubbleEvent$1(lua_State *L) { olua_startinvoke(L); @@ -1717,7 +1884,7 @@ static int _fairygui_UIEventDispatcher_bubbleEvent$1(lua_State *L) return num_ret; } -static int _fairygui_UIEventDispatcher_bubbleEvent$2(lua_State *L) +static int _olua_fun_fairygui_UIEventDispatcher_bubbleEvent$2(lua_State *L) { olua_startinvoke(L); @@ -1727,7 +1894,7 @@ static int _fairygui_UIEventDispatcher_bubbleEvent$2(lua_State *L) olua_to_object(L, 1, &self, "fgui.UIEventDispatcher"); olua_check_integer(L, 2, &arg1); - // bool bubbleEvent(int eventType, @optional void *data, @optional const cocos2d::Value &dataValue) + // bool bubbleEvent(int eventType) bool ret = self->bubbleEvent(arg1); int num_ret = olua_push_bool(L, ret); @@ -1736,7 +1903,7 @@ static int _fairygui_UIEventDispatcher_bubbleEvent$2(lua_State *L) return num_ret; } -static int _fairygui_UIEventDispatcher_bubbleEvent$3(lua_State *L) +static int _olua_fun_fairygui_UIEventDispatcher_bubbleEvent$3(lua_State *L) { olua_startinvoke(L); @@ -1748,7 +1915,7 @@ static int _fairygui_UIEventDispatcher_bubbleEvent$3(lua_State *L) olua_check_integer(L, 2, &arg1); olua_check_object(L, 3, &arg2, "void *"); - // bool bubbleEvent(int eventType, @optional void *data, @optional const cocos2d::Value &dataValue) + // bool bubbleEvent(int eventType, @optional void *data) bool ret = self->bubbleEvent(arg1, arg2); int num_ret = olua_push_bool(L, ret); @@ -1757,28 +1924,28 @@ static int _fairygui_UIEventDispatcher_bubbleEvent$3(lua_State *L) return num_ret; } -static int _fairygui_UIEventDispatcher_bubbleEvent(lua_State *L) +static int _olua_fun_fairygui_UIEventDispatcher_bubbleEvent(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_integer(L, 2))) { - // bool bubbleEvent(int eventType, @optional void *data, @optional const cocos2d::Value &dataValue) - return _fairygui_UIEventDispatcher_bubbleEvent$2(L); + // bool bubbleEvent(int eventType) + return _olua_fun_fairygui_UIEventDispatcher_bubbleEvent$2(L); // } } if (num_args == 2) { // if ((olua_is_integer(L, 2)) && (olua_is_object(L, 3, "void *"))) { - // bool bubbleEvent(int eventType, @optional void *data, @optional const cocos2d::Value &dataValue) - return _fairygui_UIEventDispatcher_bubbleEvent$3(L); + // bool bubbleEvent(int eventType, @optional void *data) + return _olua_fun_fairygui_UIEventDispatcher_bubbleEvent$3(L); // } } if (num_args == 3) { // if ((olua_is_integer(L, 2)) && (olua_is_object(L, 3, "void *")) && (olua_is_cocos2d_Value(L, 4))) { // bool bubbleEvent(int eventType, @optional void *data, @optional const cocos2d::Value &dataValue) - return _fairygui_UIEventDispatcher_bubbleEvent$1(L); + return _olua_fun_fairygui_UIEventDispatcher_bubbleEvent$1(L); // } } @@ -1787,7 +1954,7 @@ static int _fairygui_UIEventDispatcher_bubbleEvent(lua_State *L) return 0; } -static int _fairygui_UIEventDispatcher_dispatchEvent$1(lua_State *L) +static int _olua_fun_fairygui_UIEventDispatcher_dispatchEvent$1(lua_State *L) { olua_startinvoke(L); @@ -1810,7 +1977,7 @@ static int _fairygui_UIEventDispatcher_dispatchEvent$1(lua_State *L) return num_ret; } -static int _fairygui_UIEventDispatcher_dispatchEvent$2(lua_State *L) +static int _olua_fun_fairygui_UIEventDispatcher_dispatchEvent$2(lua_State *L) { olua_startinvoke(L); @@ -1820,7 +1987,7 @@ static int _fairygui_UIEventDispatcher_dispatchEvent$2(lua_State *L) olua_to_object(L, 1, &self, "fgui.UIEventDispatcher"); olua_check_integer(L, 2, &arg1); - // bool dispatchEvent(int eventType, @optional void *data, @optional const cocos2d::Value &dataValue) + // bool dispatchEvent(int eventType) bool ret = self->dispatchEvent(arg1); int num_ret = olua_push_bool(L, ret); @@ -1829,7 +1996,7 @@ static int _fairygui_UIEventDispatcher_dispatchEvent$2(lua_State *L) return num_ret; } -static int _fairygui_UIEventDispatcher_dispatchEvent$3(lua_State *L) +static int _olua_fun_fairygui_UIEventDispatcher_dispatchEvent$3(lua_State *L) { olua_startinvoke(L); @@ -1841,7 +2008,7 @@ static int _fairygui_UIEventDispatcher_dispatchEvent$3(lua_State *L) olua_check_integer(L, 2, &arg1); olua_check_object(L, 3, &arg2, "void *"); - // bool dispatchEvent(int eventType, @optional void *data, @optional const cocos2d::Value &dataValue) + // bool dispatchEvent(int eventType, @optional void *data) bool ret = self->dispatchEvent(arg1, arg2); int num_ret = olua_push_bool(L, ret); @@ -1850,28 +2017,28 @@ static int _fairygui_UIEventDispatcher_dispatchEvent$3(lua_State *L) return num_ret; } -static int _fairygui_UIEventDispatcher_dispatchEvent(lua_State *L) +static int _olua_fun_fairygui_UIEventDispatcher_dispatchEvent(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_integer(L, 2))) { - // bool dispatchEvent(int eventType, @optional void *data, @optional const cocos2d::Value &dataValue) - return _fairygui_UIEventDispatcher_dispatchEvent$2(L); + // bool dispatchEvent(int eventType) + return _olua_fun_fairygui_UIEventDispatcher_dispatchEvent$2(L); // } } if (num_args == 2) { // if ((olua_is_integer(L, 2)) && (olua_is_object(L, 3, "void *"))) { - // bool dispatchEvent(int eventType, @optional void *data, @optional const cocos2d::Value &dataValue) - return _fairygui_UIEventDispatcher_dispatchEvent$3(L); + // bool dispatchEvent(int eventType, @optional void *data) + return _olua_fun_fairygui_UIEventDispatcher_dispatchEvent$3(L); // } } if (num_args == 3) { // if ((olua_is_integer(L, 2)) && (olua_is_object(L, 3, "void *")) && (olua_is_cocos2d_Value(L, 4))) { // bool dispatchEvent(int eventType, @optional void *data, @optional const cocos2d::Value &dataValue) - return _fairygui_UIEventDispatcher_dispatchEvent$1(L); + return _olua_fun_fairygui_UIEventDispatcher_dispatchEvent$1(L); // } } @@ -1880,7 +2047,7 @@ static int _fairygui_UIEventDispatcher_dispatchEvent(lua_State *L) return 0; } -static int _fairygui_UIEventDispatcher_hasEventListener$1(lua_State *L) +static int _olua_fun_fairygui_UIEventDispatcher_hasEventListener$1(lua_State *L) { olua_startinvoke(L); @@ -1899,7 +2066,7 @@ static int _fairygui_UIEventDispatcher_hasEventListener$1(lua_State *L) return num_ret; } -static int _fairygui_UIEventDispatcher_hasEventListener$2(lua_State *L) +static int _olua_fun_fairygui_UIEventDispatcher_hasEventListener$2(lua_State *L) { olua_startinvoke(L); @@ -1920,21 +2087,21 @@ static int _fairygui_UIEventDispatcher_hasEventListener$2(lua_State *L) return num_ret; } -static int _fairygui_UIEventDispatcher_hasEventListener(lua_State *L) +static int _olua_fun_fairygui_UIEventDispatcher_hasEventListener(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_integer(L, 2))) { // bool hasEventListener(int eventType) - return _fairygui_UIEventDispatcher_hasEventListener$1(L); + return _olua_fun_fairygui_UIEventDispatcher_hasEventListener$1(L); // } } if (num_args == 2) { // if ((olua_is_integer(L, 2)) && (olua_is_fairygui_EventTag(L, 3))) { // bool hasEventListener(int eventType, const fairygui::EventTag &tag) - return _fairygui_UIEventDispatcher_hasEventListener$2(L); + return _olua_fun_fairygui_UIEventDispatcher_hasEventListener$2(L); // } } @@ -1943,7 +2110,7 @@ static int _fairygui_UIEventDispatcher_hasEventListener(lua_State *L) return 0; } -static int _fairygui_UIEventDispatcher_isDispatchingEvent(lua_State *L) +static int _olua_fun_fairygui_UIEventDispatcher_isDispatchingEvent(lua_State *L) { olua_startinvoke(L); @@ -1962,11 +2129,11 @@ static int _fairygui_UIEventDispatcher_isDispatchingEvent(lua_State *L) return num_ret; } -static int _fairygui_UIEventDispatcher_new(lua_State *L) +static int _olua_fun_fairygui_UIEventDispatcher_new(lua_State *L) { olua_startinvoke(L); - // UIEventDispatcher() + // fairygui::UIEventDispatcher() fairygui::UIEventDispatcher *ret = new fairygui::UIEventDispatcher(); int num_ret = olua_push_object(L, ret, "fgui.UIEventDispatcher"); olua_postnew(L, ret); @@ -1976,7 +2143,7 @@ static int _fairygui_UIEventDispatcher_new(lua_State *L) return num_ret; } -static int _fairygui_UIEventDispatcher_removeEventListener$1(lua_State *L) +static int _olua_fun_fairygui_UIEventDispatcher_removeEventListener$1(lua_State *L) { olua_startinvoke(L); @@ -1998,7 +2165,7 @@ static int _fairygui_UIEventDispatcher_removeEventListener$1(lua_State *L) return 0; } -static int _fairygui_UIEventDispatcher_removeEventListener$2(lua_State *L) +static int _olua_fun_fairygui_UIEventDispatcher_removeEventListener$2(lua_State *L) { olua_startinvoke(L); @@ -2022,21 +2189,21 @@ static int _fairygui_UIEventDispatcher_removeEventListener$2(lua_State *L) return 0; } -static int _fairygui_UIEventDispatcher_removeEventListener(lua_State *L) +static int _olua_fun_fairygui_UIEventDispatcher_removeEventListener(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_integer(L, 2))) { // void removeEventListener(int eventType) - return _fairygui_UIEventDispatcher_removeEventListener$1(L); + return _olua_fun_fairygui_UIEventDispatcher_removeEventListener$1(L); // } } if (num_args == 2) { // if ((olua_is_integer(L, 2)) && (olua_is_fairygui_EventTag(L, 3))) { // void removeEventListener(int eventType, const fairygui::EventTag &tag) - return _fairygui_UIEventDispatcher_removeEventListener$2(L); + return _olua_fun_fairygui_UIEventDispatcher_removeEventListener$2(L); // } } @@ -2045,7 +2212,7 @@ static int _fairygui_UIEventDispatcher_removeEventListener(lua_State *L) return 0; } -static int _fairygui_UIEventDispatcher_removeEventListeners(lua_State *L) +static int _olua_fun_fairygui_UIEventDispatcher_removeEventListeners(lua_State *L) { olua_startinvoke(L); @@ -2065,24 +2232,33 @@ static int _fairygui_UIEventDispatcher_removeEventListeners(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_fairygui_UIEventDispatcher(lua_State *L) +static int _olua_cls_fgui_UIEventDispatcher(lua_State *L) { oluacls_class(L, "fgui.UIEventDispatcher"); - oluacls_func(L, "addEventListener", _fairygui_UIEventDispatcher_addEventListener); - oluacls_func(L, "bubbleEvent", _fairygui_UIEventDispatcher_bubbleEvent); - oluacls_func(L, "dispatchEvent", _fairygui_UIEventDispatcher_dispatchEvent); - oluacls_func(L, "hasEventListener", _fairygui_UIEventDispatcher_hasEventListener); - oluacls_func(L, "isDispatchingEvent", _fairygui_UIEventDispatcher_isDispatchingEvent); - oluacls_func(L, "new", _fairygui_UIEventDispatcher_new); - oluacls_func(L, "removeEventListener", _fairygui_UIEventDispatcher_removeEventListener); - oluacls_func(L, "removeEventListeners", _fairygui_UIEventDispatcher_removeEventListeners); + oluacls_func(L, "addEventListener", _olua_fun_fairygui_UIEventDispatcher_addEventListener); + oluacls_func(L, "bubbleEvent", _olua_fun_fairygui_UIEventDispatcher_bubbleEvent); + oluacls_func(L, "dispatchEvent", _olua_fun_fairygui_UIEventDispatcher_dispatchEvent); + oluacls_func(L, "hasEventListener", _olua_fun_fairygui_UIEventDispatcher_hasEventListener); + oluacls_func(L, "isDispatchingEvent", _olua_fun_fairygui_UIEventDispatcher_isDispatchingEvent); + oluacls_func(L, "new", _olua_fun_fairygui_UIEventDispatcher_new); + oluacls_func(L, "removeEventListener", _olua_fun_fairygui_UIEventDispatcher_removeEventListener); + oluacls_func(L, "removeEventListeners", _olua_fun_fairygui_UIEventDispatcher_removeEventListeners); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_fgui_UIEventDispatcher(lua_State *L) +{ + olua_require(L, "fairygui", luaopen_fairygui); + if (!olua_getclass(L, "fgui.UIEventDispatcher")) { + luaL_error(L, "class not found: fairygui::UIEventDispatcher"); + } return 1; } OLUA_END_DECLS -static int _fairygui_EventContext___gc(lua_State *L) +static int _olua_fun_fairygui_EventContext___gc(lua_State *L) { olua_startinvoke(L); @@ -2094,7 +2270,7 @@ static int _fairygui_EventContext___gc(lua_State *L) return 0; } -static int _fairygui_EventContext___olua_move(lua_State *L) +static int _olua_fun_fairygui_EventContext___olua_move(lua_State *L) { olua_startinvoke(L); @@ -2106,7 +2282,7 @@ static int _fairygui_EventContext___olua_move(lua_State *L) return 1; } -static int _fairygui_EventContext_captureTouch(lua_State *L) +static int _olua_fun_fairygui_EventContext_captureTouch(lua_State *L) { olua_startinvoke(L); @@ -2122,7 +2298,7 @@ static int _fairygui_EventContext_captureTouch(lua_State *L) return 0; } -static int _fairygui_EventContext_getData(lua_State *L) +static int _olua_fun_fairygui_EventContext_getData(lua_State *L) { olua_startinvoke(L); @@ -2139,7 +2315,7 @@ static int _fairygui_EventContext_getData(lua_State *L) return num_ret; } -static int _fairygui_EventContext_getDataValue(lua_State *L) +static int _olua_fun_fairygui_EventContext_getDataValue(lua_State *L) { olua_startinvoke(L); @@ -2156,7 +2332,7 @@ static int _fairygui_EventContext_getDataValue(lua_State *L) return num_ret; } -static int _fairygui_EventContext_getInput(lua_State *L) +static int _olua_fun_fairygui_EventContext_getInput(lua_State *L) { olua_startinvoke(L); @@ -2173,7 +2349,7 @@ static int _fairygui_EventContext_getInput(lua_State *L) return num_ret; } -static int _fairygui_EventContext_getSender(lua_State *L) +static int _olua_fun_fairygui_EventContext_getSender(lua_State *L) { olua_startinvoke(L); @@ -2190,7 +2366,7 @@ static int _fairygui_EventContext_getSender(lua_State *L) return num_ret; } -static int _fairygui_EventContext_getType(lua_State *L) +static int _olua_fun_fairygui_EventContext_getType(lua_State *L) { olua_startinvoke(L); @@ -2207,7 +2383,7 @@ static int _fairygui_EventContext_getType(lua_State *L) return num_ret; } -static int _fairygui_EventContext_isDefaultPrevented(lua_State *L) +static int _olua_fun_fairygui_EventContext_isDefaultPrevented(lua_State *L) { olua_startinvoke(L); @@ -2224,11 +2400,11 @@ static int _fairygui_EventContext_isDefaultPrevented(lua_State *L) return num_ret; } -static int _fairygui_EventContext_new(lua_State *L) +static int _olua_fun_fairygui_EventContext_new(lua_State *L) { olua_startinvoke(L); - // EventContext() + // fairygui::EventContext() fairygui::EventContext *ret = new fairygui::EventContext(); int num_ret = olua_push_object(L, ret, "fgui.EventContext"); olua_postnew(L, ret); @@ -2238,7 +2414,7 @@ static int _fairygui_EventContext_new(lua_State *L) return num_ret; } -static int _fairygui_EventContext_preventDefault(lua_State *L) +static int _olua_fun_fairygui_EventContext_preventDefault(lua_State *L) { olua_startinvoke(L); @@ -2254,7 +2430,7 @@ static int _fairygui_EventContext_preventDefault(lua_State *L) return 0; } -static int _fairygui_EventContext_stopPropagation(lua_State *L) +static int _olua_fun_fairygui_EventContext_stopPropagation(lua_State *L) { olua_startinvoke(L); @@ -2270,7 +2446,7 @@ static int _fairygui_EventContext_stopPropagation(lua_State *L) return 0; } -static int _fairygui_EventContext_uncaptureTouch(lua_State *L) +static int _olua_fun_fairygui_EventContext_uncaptureTouch(lua_State *L) { olua_startinvoke(L); @@ -2286,35 +2462,44 @@ static int _fairygui_EventContext_uncaptureTouch(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_fairygui_EventContext(lua_State *L) +static int _olua_cls_fgui_EventContext(lua_State *L) { oluacls_class(L, "fgui.EventContext"); - oluacls_func(L, "__gc", _fairygui_EventContext___gc); - oluacls_func(L, "__olua_move", _fairygui_EventContext___olua_move); - oluacls_func(L, "captureTouch", _fairygui_EventContext_captureTouch); - oluacls_func(L, "getData", _fairygui_EventContext_getData); - oluacls_func(L, "getDataValue", _fairygui_EventContext_getDataValue); - oluacls_func(L, "getInput", _fairygui_EventContext_getInput); - oluacls_func(L, "getSender", _fairygui_EventContext_getSender); - oluacls_func(L, "getType", _fairygui_EventContext_getType); - oluacls_func(L, "isDefaultPrevented", _fairygui_EventContext_isDefaultPrevented); - oluacls_func(L, "new", _fairygui_EventContext_new); - oluacls_func(L, "preventDefault", _fairygui_EventContext_preventDefault); - oluacls_func(L, "stopPropagation", _fairygui_EventContext_stopPropagation); - oluacls_func(L, "uncaptureTouch", _fairygui_EventContext_uncaptureTouch); - oluacls_prop(L, "data", _fairygui_EventContext_getData, nullptr); - oluacls_prop(L, "dataValue", _fairygui_EventContext_getDataValue, nullptr); - oluacls_prop(L, "defaultPrevented", _fairygui_EventContext_isDefaultPrevented, nullptr); - oluacls_prop(L, "input", _fairygui_EventContext_getInput, nullptr); - oluacls_prop(L, "sender", _fairygui_EventContext_getSender, nullptr); - oluacls_prop(L, "type", _fairygui_EventContext_getType, nullptr); + oluacls_func(L, "__gc", _olua_fun_fairygui_EventContext___gc); + oluacls_func(L, "__olua_move", _olua_fun_fairygui_EventContext___olua_move); + oluacls_func(L, "captureTouch", _olua_fun_fairygui_EventContext_captureTouch); + oluacls_func(L, "getData", _olua_fun_fairygui_EventContext_getData); + oluacls_func(L, "getDataValue", _olua_fun_fairygui_EventContext_getDataValue); + oluacls_func(L, "getInput", _olua_fun_fairygui_EventContext_getInput); + oluacls_func(L, "getSender", _olua_fun_fairygui_EventContext_getSender); + oluacls_func(L, "getType", _olua_fun_fairygui_EventContext_getType); + oluacls_func(L, "isDefaultPrevented", _olua_fun_fairygui_EventContext_isDefaultPrevented); + oluacls_func(L, "new", _olua_fun_fairygui_EventContext_new); + oluacls_func(L, "preventDefault", _olua_fun_fairygui_EventContext_preventDefault); + oluacls_func(L, "stopPropagation", _olua_fun_fairygui_EventContext_stopPropagation); + oluacls_func(L, "uncaptureTouch", _olua_fun_fairygui_EventContext_uncaptureTouch); + oluacls_prop(L, "data", _olua_fun_fairygui_EventContext_getData, nullptr); + oluacls_prop(L, "dataValue", _olua_fun_fairygui_EventContext_getDataValue, nullptr); + oluacls_prop(L, "defaultPrevented", _olua_fun_fairygui_EventContext_isDefaultPrevented, nullptr); + oluacls_prop(L, "input", _olua_fun_fairygui_EventContext_getInput, nullptr); + oluacls_prop(L, "sender", _olua_fun_fairygui_EventContext_getSender, nullptr); + oluacls_prop(L, "type", _olua_fun_fairygui_EventContext_getType, nullptr); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_fgui_EventContext(lua_State *L) +{ + olua_require(L, "fairygui", luaopen_fairygui); + if (!olua_getclass(L, "fgui.EventContext")) { + luaL_error(L, "class not found: fairygui::EventContext"); + } + return 1; +} OLUA_END_DECLS -static int _fairygui_IHitTest___gc(lua_State *L) +static int _olua_fun_fairygui_IHitTest___gc(lua_State *L) { olua_startinvoke(L); @@ -2326,7 +2511,7 @@ static int _fairygui_IHitTest___gc(lua_State *L) return 0; } -static int _fairygui_IHitTest___olua_move(lua_State *L) +static int _olua_fun_fairygui_IHitTest___olua_move(lua_State *L) { olua_startinvoke(L); @@ -2338,20 +2523,20 @@ static int _fairygui_IHitTest___olua_move(lua_State *L) return 1; } -static int _fairygui_IHitTest_hitTest(lua_State *L) +static int _olua_fun_fairygui_IHitTest_hitTest(lua_State *L) { olua_startinvoke(L); fairygui::IHitTest *self = nullptr; fairygui::GComponent *arg1 = nullptr; /** obj */ - cocos2d::Vec2 arg2; /** localPoint */ + cocos2d::Vec2 *arg2; /** localPoint */ olua_to_object(L, 1, &self, "fgui.IHitTest"); olua_check_object(L, 2, &arg1, "fgui.GComponent"); olua_check_object(L, 3, &arg2, "cc.Vec2"); // bool hitTest(fairygui::GComponent *obj, const cocos2d::Vec2 &localPoint) - bool ret = self->hitTest(arg1, arg2); + bool ret = self->hitTest(arg1, *arg2); int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); @@ -2359,19 +2544,28 @@ static int _fairygui_IHitTest_hitTest(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_fairygui_IHitTest(lua_State *L) +static int _olua_cls_fgui_IHitTest(lua_State *L) { oluacls_class(L, "fgui.IHitTest"); - oluacls_func(L, "__gc", _fairygui_IHitTest___gc); - oluacls_func(L, "__olua_move", _fairygui_IHitTest___olua_move); - oluacls_func(L, "hitTest", _fairygui_IHitTest_hitTest); + oluacls_func(L, "__gc", _olua_fun_fairygui_IHitTest___gc); + oluacls_func(L, "__olua_move", _olua_fun_fairygui_IHitTest___olua_move); + oluacls_func(L, "hitTest", _olua_fun_fairygui_IHitTest_hitTest); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_fgui_IHitTest(lua_State *L) +{ + olua_require(L, "fairygui", luaopen_fairygui); + if (!olua_getclass(L, "fgui.IHitTest")) { + luaL_error(L, "class not found: fairygui::IHitTest"); + } return 1; } OLUA_END_DECLS -static int _fairygui_PixelHitTest_new(lua_State *L) +static int _olua_fun_fairygui_PixelHitTest_new(lua_State *L) { olua_startinvoke(L); @@ -2383,7 +2577,7 @@ static int _fairygui_PixelHitTest_new(lua_State *L) olua_check_integer(L, 2, &arg2); olua_check_integer(L, 3, &arg3); - // PixelHitTest(fairygui::PixelHitTestData *data, int offsetX, int offsetY) + // fairygui::PixelHitTest(fairygui::PixelHitTestData *data, int offsetX, int offsetY) fairygui::PixelHitTest *ret = new fairygui::PixelHitTest(arg1, arg2, arg3); int num_ret = olua_push_object(L, ret, "fgui.PixelHitTest"); olua_postnew(L, ret); @@ -2393,7 +2587,7 @@ static int _fairygui_PixelHitTest_new(lua_State *L) return num_ret; } -static int _fairygui_PixelHitTest_get_offsetX(lua_State *L) +static int _olua_fun_fairygui_PixelHitTest_offsetX$1(lua_State *L) { olua_startinvoke(L); @@ -2410,7 +2604,7 @@ static int _fairygui_PixelHitTest_get_offsetX(lua_State *L) return num_ret; } -static int _fairygui_PixelHitTest_set_offsetX(lua_State *L) +static int _olua_fun_fairygui_PixelHitTest_offsetX$2(lua_State *L) { olua_startinvoke(L); @@ -2428,7 +2622,28 @@ static int _fairygui_PixelHitTest_set_offsetX(lua_State *L) return 0; } -static int _fairygui_PixelHitTest_get_offsetY(lua_State *L) +static int _olua_fun_fairygui_PixelHitTest_offsetX(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // int offsetX + return _olua_fun_fairygui_PixelHitTest_offsetX$1(L); + } + + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // int offsetX + return _olua_fun_fairygui_PixelHitTest_offsetX$2(L); + // } + } + + luaL_error(L, "method 'fairygui::PixelHitTest::offsetX' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_fairygui_PixelHitTest_offsetY$1(lua_State *L) { olua_startinvoke(L); @@ -2445,7 +2660,7 @@ static int _fairygui_PixelHitTest_get_offsetY(lua_State *L) return num_ret; } -static int _fairygui_PixelHitTest_set_offsetY(lua_State *L) +static int _olua_fun_fairygui_PixelHitTest_offsetY$2(lua_State *L) { olua_startinvoke(L); @@ -2463,7 +2678,28 @@ static int _fairygui_PixelHitTest_set_offsetY(lua_State *L) return 0; } -static int _fairygui_PixelHitTest_get_scaleX(lua_State *L) +static int _olua_fun_fairygui_PixelHitTest_offsetY(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // int offsetY + return _olua_fun_fairygui_PixelHitTest_offsetY$1(L); + } + + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // int offsetY + return _olua_fun_fairygui_PixelHitTest_offsetY$2(L); + // } + } + + luaL_error(L, "method 'fairygui::PixelHitTest::offsetY' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_fairygui_PixelHitTest_scaleX$1(lua_State *L) { olua_startinvoke(L); @@ -2480,7 +2716,7 @@ static int _fairygui_PixelHitTest_get_scaleX(lua_State *L) return num_ret; } -static int _fairygui_PixelHitTest_set_scaleX(lua_State *L) +static int _olua_fun_fairygui_PixelHitTest_scaleX$2(lua_State *L) { olua_startinvoke(L); @@ -2498,7 +2734,28 @@ static int _fairygui_PixelHitTest_set_scaleX(lua_State *L) return 0; } -static int _fairygui_PixelHitTest_get_scaleY(lua_State *L) +static int _olua_fun_fairygui_PixelHitTest_scaleX(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float scaleX + return _olua_fun_fairygui_PixelHitTest_scaleX$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float scaleX + return _olua_fun_fairygui_PixelHitTest_scaleX$2(L); + // } + } + + luaL_error(L, "method 'fairygui::PixelHitTest::scaleX' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_fairygui_PixelHitTest_scaleY$1(lua_State *L) { olua_startinvoke(L); @@ -2515,7 +2772,7 @@ static int _fairygui_PixelHitTest_get_scaleY(lua_State *L) return num_ret; } -static int _fairygui_PixelHitTest_set_scaleY(lua_State *L) +static int _olua_fun_fairygui_PixelHitTest_scaleY$2(lua_State *L) { olua_startinvoke(L); @@ -2533,61 +2790,51 @@ static int _fairygui_PixelHitTest_set_scaleY(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_fairygui_PixelHitTest(lua_State *L) -{ - oluacls_class(L, "fgui.PixelHitTest"); - oluacls_func(L, "new", _fairygui_PixelHitTest_new); - oluacls_prop(L, "offsetX", _fairygui_PixelHitTest_get_offsetX, _fairygui_PixelHitTest_set_offsetX); - oluacls_prop(L, "offsetY", _fairygui_PixelHitTest_get_offsetY, _fairygui_PixelHitTest_set_offsetY); - oluacls_prop(L, "scaleX", _fairygui_PixelHitTest_get_scaleX, _fairygui_PixelHitTest_set_scaleX); - oluacls_prop(L, "scaleY", _fairygui_PixelHitTest_get_scaleY, _fairygui_PixelHitTest_set_scaleY); - - return 1; -} -OLUA_END_DECLS - -static int _fairygui_PixelHitTestData___call(lua_State *L) +static int _olua_fun_fairygui_PixelHitTest_scaleY(lua_State *L) { - olua_startinvoke(L); - - fairygui::PixelHitTestData ret; - - luaL_checktype(L, 2, LUA_TTABLE); - - int arg1 = 0; /** pixelWidth */ - float arg2 = 0; /** scale */ - unsigned char *arg3 = nullptr; /** pixels */ - size_t arg4 = 0; /** pixelsLength */ + int num_args = lua_gettop(L) - 1; - olua_getfield(L, 2, "pixelWidth"); - olua_check_integer(L, -1, &arg1); - ret.pixelWidth = arg1; - lua_pop(L, 1); + if (num_args == 0) { + // float scaleY + return _olua_fun_fairygui_PixelHitTest_scaleY$1(L); + } - olua_getfield(L, 2, "scale"); - olua_check_number(L, -1, &arg2); - ret.scale = arg2; - lua_pop(L, 1); + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float scaleY + return _olua_fun_fairygui_PixelHitTest_scaleY$2(L); + // } + } - olua_getfield(L, 2, "pixels"); - olua_check_string(L, -1, &arg3); - ret.pixels = arg3; - lua_pop(L, 1); + luaL_error(L, "method 'fairygui::PixelHitTest::scaleY' not support '%d' arguments", num_args); - olua_getfield(L, 2, "pixelsLength"); - olua_check_integer(L, -1, &arg4); - ret.pixelsLength = arg4; - lua_pop(L, 1); + return 0; +} - olua_pushcopy_object(L, ret, "fgui.PixelHitTestData"); +static int _olua_cls_fgui_PixelHitTest(lua_State *L) +{ + oluacls_class(L, "fgui.PixelHitTest"); + oluacls_func(L, "new", _olua_fun_fairygui_PixelHitTest_new); + oluacls_prop(L, "offsetX", _olua_fun_fairygui_PixelHitTest_offsetX, _olua_fun_fairygui_PixelHitTest_offsetX); + oluacls_prop(L, "offsetY", _olua_fun_fairygui_PixelHitTest_offsetY, _olua_fun_fairygui_PixelHitTest_offsetY); + oluacls_prop(L, "scaleX", _olua_fun_fairygui_PixelHitTest_scaleX, _olua_fun_fairygui_PixelHitTest_scaleX); + oluacls_prop(L, "scaleY", _olua_fun_fairygui_PixelHitTest_scaleY, _olua_fun_fairygui_PixelHitTest_scaleY); - olua_endinvoke(L); + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_fgui_PixelHitTest(lua_State *L) +{ + olua_require(L, "fairygui", luaopen_fairygui); + if (!olua_getclass(L, "fgui.PixelHitTest")) { + luaL_error(L, "class not found: fairygui::PixelHitTest"); + } return 1; } +OLUA_END_DECLS -static int _fairygui_PixelHitTestData___gc(lua_State *L) +static int _olua_fun_fairygui_PixelHitTestData___gc(lua_State *L) { olua_startinvoke(L); @@ -2599,7 +2846,7 @@ static int _fairygui_PixelHitTestData___gc(lua_State *L) return 0; } -static int _fairygui_PixelHitTestData___olua_move(lua_State *L) +static int _olua_fun_fairygui_PixelHitTestData___olua_move(lua_State *L) { olua_startinvoke(L); @@ -2611,11 +2858,11 @@ static int _fairygui_PixelHitTestData___olua_move(lua_State *L) return 1; } -static int _fairygui_PixelHitTestData_new(lua_State *L) +static int _olua_fun_fairygui_PixelHitTestData_new(lua_State *L) { olua_startinvoke(L); - // PixelHitTestData() + // fairygui::PixelHitTestData() fairygui::PixelHitTestData *ret = new fairygui::PixelHitTestData(); int num_ret = olua_push_object(L, ret, "fgui.PixelHitTestData"); olua_postnew(L, ret); @@ -2625,7 +2872,7 @@ static int _fairygui_PixelHitTestData_new(lua_State *L) return num_ret; } -static int _fairygui_PixelHitTestData_get_pixelWidth(lua_State *L) +static int _olua_fun_fairygui_PixelHitTestData_pixelWidth$1(lua_State *L) { olua_startinvoke(L); @@ -2642,7 +2889,7 @@ static int _fairygui_PixelHitTestData_get_pixelWidth(lua_State *L) return num_ret; } -static int _fairygui_PixelHitTestData_set_pixelWidth(lua_State *L) +static int _olua_fun_fairygui_PixelHitTestData_pixelWidth$2(lua_State *L) { olua_startinvoke(L); @@ -2660,7 +2907,28 @@ static int _fairygui_PixelHitTestData_set_pixelWidth(lua_State *L) return 0; } -static int _fairygui_PixelHitTestData_get_pixels(lua_State *L) +static int _olua_fun_fairygui_PixelHitTestData_pixelWidth(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // int pixelWidth + return _olua_fun_fairygui_PixelHitTestData_pixelWidth$1(L); + } + + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // int pixelWidth + return _olua_fun_fairygui_PixelHitTestData_pixelWidth$2(L); + // } + } + + luaL_error(L, "method 'fairygui::PixelHitTestData::pixelWidth' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_fairygui_PixelHitTestData_pixels$1(lua_State *L) { olua_startinvoke(L); @@ -2677,7 +2945,7 @@ static int _fairygui_PixelHitTestData_get_pixels(lua_State *L) return num_ret; } -static int _fairygui_PixelHitTestData_set_pixels(lua_State *L) +static int _olua_fun_fairygui_PixelHitTestData_pixels$2(lua_State *L) { olua_startinvoke(L); @@ -2695,7 +2963,28 @@ static int _fairygui_PixelHitTestData_set_pixels(lua_State *L) return 0; } -static int _fairygui_PixelHitTestData_get_pixelsLength(lua_State *L) +static int _olua_fun_fairygui_PixelHitTestData_pixels(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // unsigned char *pixels + return _olua_fun_fairygui_PixelHitTestData_pixels$1(L); + } + + if (num_args == 1) { + // if ((olua_is_string(L, 2))) { + // unsigned char *pixels + return _olua_fun_fairygui_PixelHitTestData_pixels$2(L); + // } + } + + luaL_error(L, "method 'fairygui::PixelHitTestData::pixels' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_fairygui_PixelHitTestData_pixelsLength$1(lua_State *L) { olua_startinvoke(L); @@ -2712,7 +3001,7 @@ static int _fairygui_PixelHitTestData_get_pixelsLength(lua_State *L) return num_ret; } -static int _fairygui_PixelHitTestData_set_pixelsLength(lua_State *L) +static int _olua_fun_fairygui_PixelHitTestData_pixelsLength$2(lua_State *L) { olua_startinvoke(L); @@ -2730,7 +3019,28 @@ static int _fairygui_PixelHitTestData_set_pixelsLength(lua_State *L) return 0; } -static int _fairygui_PixelHitTestData_get_scale(lua_State *L) +static int _olua_fun_fairygui_PixelHitTestData_pixelsLength(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // size_t pixelsLength + return _olua_fun_fairygui_PixelHitTestData_pixelsLength$1(L); + } + + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // size_t pixelsLength + return _olua_fun_fairygui_PixelHitTestData_pixelsLength$2(L); + // } + } + + luaL_error(L, "method 'fairygui::PixelHitTestData::pixelsLength' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_fairygui_PixelHitTestData_scale$1(lua_State *L) { olua_startinvoke(L); @@ -2747,7 +3057,7 @@ static int _fairygui_PixelHitTestData_get_scale(lua_State *L) return num_ret; } -static int _fairygui_PixelHitTestData_set_scale(lua_State *L) +static int _olua_fun_fairygui_PixelHitTestData_scale$2(lua_State *L) { olua_startinvoke(L); @@ -2765,46 +3075,84 @@ static int _fairygui_PixelHitTestData_set_scale(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_fairygui_PixelHitTestData(lua_State *L) +static int _olua_fun_fairygui_PixelHitTestData_scale(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float scale + return _olua_fun_fairygui_PixelHitTestData_scale$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float scale + return _olua_fun_fairygui_PixelHitTestData_scale$2(L); + // } + } + + luaL_error(L, "method 'fairygui::PixelHitTestData::scale' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_cls_fgui_PixelHitTestData(lua_State *L) { oluacls_class(L, "fgui.PixelHitTestData"); - oluacls_func(L, "__call", _fairygui_PixelHitTestData___call); - oluacls_func(L, "__gc", _fairygui_PixelHitTestData___gc); - oluacls_func(L, "__olua_move", _fairygui_PixelHitTestData___olua_move); - oluacls_func(L, "new", _fairygui_PixelHitTestData_new); - oluacls_prop(L, "pixelWidth", _fairygui_PixelHitTestData_get_pixelWidth, _fairygui_PixelHitTestData_set_pixelWidth); - oluacls_prop(L, "pixels", _fairygui_PixelHitTestData_get_pixels, _fairygui_PixelHitTestData_set_pixels); - oluacls_prop(L, "pixelsLength", _fairygui_PixelHitTestData_get_pixelsLength, _fairygui_PixelHitTestData_set_pixelsLength); - oluacls_prop(L, "scale", _fairygui_PixelHitTestData_get_scale, _fairygui_PixelHitTestData_set_scale); + oluacls_func(L, "__gc", _olua_fun_fairygui_PixelHitTestData___gc); + oluacls_func(L, "__olua_move", _olua_fun_fairygui_PixelHitTestData___olua_move); + oluacls_func(L, "new", _olua_fun_fairygui_PixelHitTestData_new); + oluacls_prop(L, "pixelWidth", _olua_fun_fairygui_PixelHitTestData_pixelWidth, _olua_fun_fairygui_PixelHitTestData_pixelWidth); + oluacls_prop(L, "pixels", _olua_fun_fairygui_PixelHitTestData_pixels, _olua_fun_fairygui_PixelHitTestData_pixels); + oluacls_prop(L, "pixelsLength", _olua_fun_fairygui_PixelHitTestData_pixelsLength, _olua_fun_fairygui_PixelHitTestData_pixelsLength); + oluacls_prop(L, "scale", _olua_fun_fairygui_PixelHitTestData_scale, _olua_fun_fairygui_PixelHitTestData_scale); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_fgui_PixelHitTestData(lua_State *L) +{ + olua_require(L, "fairygui", luaopen_fairygui); + if (!olua_getclass(L, "fgui.PixelHitTestData")) { + luaL_error(L, "class not found: fairygui::PixelHitTestData"); + } return 1; } OLUA_END_DECLS -static int _fairygui_InputProcessor_CaptureEventCallback___call(lua_State *L) +static int _olua_fun_fairygui_InputProcessor_CaptureEventCallback___call(lua_State *L) { olua_startinvoke(L); luaL_checktype(L, -1, LUA_TFUNCTION); - olua_push_callback(L, (fairygui::InputProcessor::CaptureEventCallback *)nullptr, "fgui.InputProcessor::CaptureEventCallback"); + olua_push_callback(L, (fairygui::InputProcessor::CaptureEventCallback *)nullptr, "fgui.InputProcessor.CaptureEventCallback"); olua_endinvoke(L); return 1; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_fairygui_InputProcessor_CaptureEventCallback(lua_State *L) +static int _olua_cls_fgui_InputProcessor_CaptureEventCallback(lua_State *L) { - oluacls_class(L, "fgui.InputProcessor::CaptureEventCallback"); - oluacls_func(L, "__call", _fairygui_InputProcessor_CaptureEventCallback___call); + oluacls_class(L, "fgui.InputProcessor.CaptureEventCallback"); + oluacls_func(L, "__call", _olua_fun_fairygui_InputProcessor_CaptureEventCallback___call); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_fgui_InputProcessor_CaptureEventCallback(lua_State *L) +{ + olua_require(L, "fairygui", luaopen_fairygui); + if (!olua_getclass(L, "fgui.InputProcessor.CaptureEventCallback")) { + luaL_error(L, "class not found: fairygui::InputProcessor::CaptureEventCallback"); + } return 1; } OLUA_END_DECLS -static int _fairygui_InputProcessor___gc(lua_State *L) +static int _olua_fun_fairygui_InputProcessor___gc(lua_State *L) { olua_startinvoke(L); @@ -2816,7 +3164,7 @@ static int _fairygui_InputProcessor___gc(lua_State *L) return 0; } -static int _fairygui_InputProcessor___olua_move(lua_State *L) +static int _olua_fun_fairygui_InputProcessor___olua_move(lua_State *L) { olua_startinvoke(L); @@ -2828,7 +3176,7 @@ static int _fairygui_InputProcessor___olua_move(lua_State *L) return 1; } -static int _fairygui_InputProcessor_addTouchMonitor(lua_State *L) +static int _olua_fun_fairygui_InputProcessor_addTouchMonitor(lua_State *L) { olua_startinvoke(L); @@ -2848,7 +3196,7 @@ static int _fairygui_InputProcessor_addTouchMonitor(lua_State *L) return 0; } -static int _fairygui_InputProcessor_cancelClick(lua_State *L) +static int _olua_fun_fairygui_InputProcessor_cancelClick(lua_State *L) { olua_startinvoke(L); @@ -2866,7 +3214,7 @@ static int _fairygui_InputProcessor_cancelClick(lua_State *L) return 0; } -static int _fairygui_InputProcessor_disableDefaultTouchEvent(lua_State *L) +static int _olua_fun_fairygui_InputProcessor_disableDefaultTouchEvent(lua_State *L) { olua_startinvoke(L); @@ -2882,7 +3230,7 @@ static int _fairygui_InputProcessor_disableDefaultTouchEvent(lua_State *L) return 0; } -static int _fairygui_InputProcessor_getRecentInput(lua_State *L) +static int _olua_fun_fairygui_InputProcessor_getRecentInput(lua_State *L) { olua_startinvoke(L); @@ -2899,7 +3247,7 @@ static int _fairygui_InputProcessor_getRecentInput(lua_State *L) return num_ret; } -static int _fairygui_InputProcessor_getTouchPosition(lua_State *L) +static int _olua_fun_fairygui_InputProcessor_getTouchPosition(lua_State *L) { olua_startinvoke(L); @@ -2911,14 +3259,14 @@ static int _fairygui_InputProcessor_getTouchPosition(lua_State *L) // cocos2d::Vec2 getTouchPosition(int touchId) cocos2d::Vec2 ret = self->getTouchPosition(arg1); - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec2"); + int num_ret = olua_copy_object(L, ret, "cc.Vec2"); olua_endinvoke(L); return num_ret; } -static int _fairygui_InputProcessor_isTouchOnUI(lua_State *L) +static int _olua_fun_fairygui_InputProcessor_isTouchOnUI(lua_State *L) { olua_startinvoke(L); @@ -2931,7 +3279,7 @@ static int _fairygui_InputProcessor_isTouchOnUI(lua_State *L) return num_ret; } -static int _fairygui_InputProcessor_new(lua_State *L) +static int _olua_fun_fairygui_InputProcessor_new(lua_State *L) { olua_startinvoke(L); @@ -2939,7 +3287,7 @@ static int _fairygui_InputProcessor_new(lua_State *L) olua_check_object(L, 1, &arg1, "fgui.GComponent"); - // InputProcessor(fairygui::GComponent *owner) + // fairygui::InputProcessor(fairygui::GComponent *owner) fairygui::InputProcessor *ret = new fairygui::InputProcessor(arg1); int num_ret = olua_push_object(L, ret, "fgui.InputProcessor"); olua_postnew(L, ret); @@ -2949,7 +3297,7 @@ static int _fairygui_InputProcessor_new(lua_State *L) return num_ret; } -static int _fairygui_InputProcessor_removeTouchMonitor(lua_State *L) +static int _olua_fun_fairygui_InputProcessor_removeTouchMonitor(lua_State *L) { olua_startinvoke(L); @@ -2967,7 +3315,7 @@ static int _fairygui_InputProcessor_removeTouchMonitor(lua_State *L) return 0; } -static int _fairygui_InputProcessor_setCaptureCallback(lua_State *L) +static int _olua_fun_fairygui_InputProcessor_setCaptureCallback(lua_State *L) { olua_startinvoke(L); @@ -2976,22 +3324,23 @@ static int _fairygui_InputProcessor_setCaptureCallback(lua_State *L) olua_to_object(L, 1, &self, "fgui.InputProcessor"); if (!olua_isnoneornil(L, 2)) { - olua_check_callback(L, 2, &arg1, "fgui.InputProcessor::CaptureEventCallback"); + olua_check_callback(L, 2, &arg1, "fgui.InputProcessor.CaptureEventCallback"); } void *cb_store = (void *)self; std::string cb_tag = "CaptureCallback"; std::string cb_name; if (olua_isfunction(L, 2)) { - cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](int arg1) { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](int cb_arg1) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); if (olua_contextequal(L, cb_ctx)) { int top = lua_gettop(L); - olua_push_integer(L, arg1); + olua_push_integer(L, cb_arg1); olua_callback(L, cb_store, cb_name.c_str(), 1); @@ -3003,7 +3352,7 @@ static int _fairygui_InputProcessor_setCaptureCallback(lua_State *L) arg1 = nullptr; } - // void setCaptureCallback(@localvar @nullable fairygui::InputProcessor::CaptureEventCallback value) + // void setCaptureCallback(@nullable fairygui::InputProcessor::CaptureEventCallback value) self->setCaptureCallback(arg1); olua_endinvoke(L); @@ -3011,7 +3360,7 @@ static int _fairygui_InputProcessor_setCaptureCallback(lua_State *L) return 0; } -static int _fairygui_InputProcessor_simulateClick$1(lua_State *L) +static int _olua_fun_fairygui_InputProcessor_simulateClick$1(lua_State *L) { olua_startinvoke(L); @@ -3031,7 +3380,7 @@ static int _fairygui_InputProcessor_simulateClick$1(lua_State *L) return 0; } -static int _fairygui_InputProcessor_simulateClick$2(lua_State *L) +static int _olua_fun_fairygui_InputProcessor_simulateClick$2(lua_State *L) { olua_startinvoke(L); @@ -3041,7 +3390,7 @@ static int _fairygui_InputProcessor_simulateClick$2(lua_State *L) olua_to_object(L, 1, &self, "fgui.InputProcessor"); olua_check_object(L, 2, &arg1, "fgui.GObject"); - // void simulateClick(fairygui::GObject *target, @optional int touchId) + // void simulateClick(fairygui::GObject *target) self->simulateClick(arg1); olua_endinvoke(L); @@ -3049,21 +3398,21 @@ static int _fairygui_InputProcessor_simulateClick$2(lua_State *L) return 0; } -static int _fairygui_InputProcessor_simulateClick(lua_State *L) +static int _olua_fun_fairygui_InputProcessor_simulateClick(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_object(L, 2, "fgui.GObject"))) { - // void simulateClick(fairygui::GObject *target, @optional int touchId) - return _fairygui_InputProcessor_simulateClick$2(L); + // void simulateClick(fairygui::GObject *target) + return _olua_fun_fairygui_InputProcessor_simulateClick$2(L); // } } if (num_args == 2) { // if ((olua_is_object(L, 2, "fgui.GObject")) && (olua_is_integer(L, 3))) { // void simulateClick(fairygui::GObject *target, @optional int touchId) - return _fairygui_InputProcessor_simulateClick$1(L); + return _olua_fun_fairygui_InputProcessor_simulateClick$1(L); // } } @@ -3072,7 +3421,7 @@ static int _fairygui_InputProcessor_simulateClick(lua_State *L) return 0; } -static int _fairygui_InputProcessor_touchDown(lua_State *L) +static int _olua_fun_fairygui_InputProcessor_touchDown(lua_State *L) { olua_startinvoke(L); @@ -3093,7 +3442,7 @@ static int _fairygui_InputProcessor_touchDown(lua_State *L) return num_ret; } -static int _fairygui_InputProcessor_touchMove(lua_State *L) +static int _olua_fun_fairygui_InputProcessor_touchMove(lua_State *L) { olua_startinvoke(L); @@ -3113,7 +3462,7 @@ static int _fairygui_InputProcessor_touchMove(lua_State *L) return 0; } -static int _fairygui_InputProcessor_touchUp(lua_State *L) +static int _olua_fun_fairygui_InputProcessor_touchUp(lua_State *L) { olua_startinvoke(L); @@ -3133,33 +3482,42 @@ static int _fairygui_InputProcessor_touchUp(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_fairygui_InputProcessor(lua_State *L) +static int _olua_cls_fgui_InputProcessor(lua_State *L) { oluacls_class(L, "fgui.InputProcessor"); - oluacls_func(L, "__gc", _fairygui_InputProcessor___gc); - oluacls_func(L, "__olua_move", _fairygui_InputProcessor___olua_move); - oluacls_func(L, "addTouchMonitor", _fairygui_InputProcessor_addTouchMonitor); - oluacls_func(L, "cancelClick", _fairygui_InputProcessor_cancelClick); - oluacls_func(L, "disableDefaultTouchEvent", _fairygui_InputProcessor_disableDefaultTouchEvent); - oluacls_func(L, "getRecentInput", _fairygui_InputProcessor_getRecentInput); - oluacls_func(L, "getTouchPosition", _fairygui_InputProcessor_getTouchPosition); - oluacls_func(L, "isTouchOnUI", _fairygui_InputProcessor_isTouchOnUI); - oluacls_func(L, "new", _fairygui_InputProcessor_new); - oluacls_func(L, "removeTouchMonitor", _fairygui_InputProcessor_removeTouchMonitor); - oluacls_func(L, "setCaptureCallback", _fairygui_InputProcessor_setCaptureCallback); - oluacls_func(L, "simulateClick", _fairygui_InputProcessor_simulateClick); - oluacls_func(L, "touchDown", _fairygui_InputProcessor_touchDown); - oluacls_func(L, "touchMove", _fairygui_InputProcessor_touchMove); - oluacls_func(L, "touchUp", _fairygui_InputProcessor_touchUp); - oluacls_prop(L, "recentInput", _fairygui_InputProcessor_getRecentInput, nullptr); - oluacls_prop(L, "touchOnUI", _fairygui_InputProcessor_isTouchOnUI, nullptr); + oluacls_func(L, "__gc", _olua_fun_fairygui_InputProcessor___gc); + oluacls_func(L, "__olua_move", _olua_fun_fairygui_InputProcessor___olua_move); + oluacls_func(L, "addTouchMonitor", _olua_fun_fairygui_InputProcessor_addTouchMonitor); + oluacls_func(L, "cancelClick", _olua_fun_fairygui_InputProcessor_cancelClick); + oluacls_func(L, "disableDefaultTouchEvent", _olua_fun_fairygui_InputProcessor_disableDefaultTouchEvent); + oluacls_func(L, "getRecentInput", _olua_fun_fairygui_InputProcessor_getRecentInput); + oluacls_func(L, "getTouchPosition", _olua_fun_fairygui_InputProcessor_getTouchPosition); + oluacls_func(L, "isTouchOnUI", _olua_fun_fairygui_InputProcessor_isTouchOnUI); + oluacls_func(L, "new", _olua_fun_fairygui_InputProcessor_new); + oluacls_func(L, "removeTouchMonitor", _olua_fun_fairygui_InputProcessor_removeTouchMonitor); + oluacls_func(L, "setCaptureCallback", _olua_fun_fairygui_InputProcessor_setCaptureCallback); + oluacls_func(L, "simulateClick", _olua_fun_fairygui_InputProcessor_simulateClick); + oluacls_func(L, "touchDown", _olua_fun_fairygui_InputProcessor_touchDown); + oluacls_func(L, "touchMove", _olua_fun_fairygui_InputProcessor_touchMove); + oluacls_func(L, "touchUp", _olua_fun_fairygui_InputProcessor_touchUp); + oluacls_prop(L, "recentInput", _olua_fun_fairygui_InputProcessor_getRecentInput, nullptr); + oluacls_prop(L, "touchOnUI", _olua_fun_fairygui_InputProcessor_isTouchOnUI, nullptr); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_fgui_InputProcessor(lua_State *L) +{ + olua_require(L, "fairygui", luaopen_fairygui); + if (!olua_getclass(L, "fgui.InputProcessor")) { + luaL_error(L, "class not found: fairygui::InputProcessor"); + } return 1; } OLUA_END_DECLS -static int _fairygui_InputEvent___gc(lua_State *L) +static int _olua_fun_fairygui_InputEvent___gc(lua_State *L) { olua_startinvoke(L); @@ -3171,7 +3529,7 @@ static int _fairygui_InputEvent___gc(lua_State *L) return 0; } -static int _fairygui_InputEvent___olua_move(lua_State *L) +static int _olua_fun_fairygui_InputEvent___olua_move(lua_State *L) { olua_startinvoke(L); @@ -3183,7 +3541,7 @@ static int _fairygui_InputEvent___olua_move(lua_State *L) return 1; } -static int _fairygui_InputEvent_getButton(lua_State *L) +static int _olua_fun_fairygui_InputEvent_getButton(lua_State *L) { olua_startinvoke(L); @@ -3200,7 +3558,7 @@ static int _fairygui_InputEvent_getButton(lua_State *L) return num_ret; } -static int _fairygui_InputEvent_getKeyCode(lua_State *L) +static int _olua_fun_fairygui_InputEvent_getKeyCode(lua_State *L) { olua_startinvoke(L); @@ -3217,7 +3575,7 @@ static int _fairygui_InputEvent_getKeyCode(lua_State *L) return num_ret; } -static int _fairygui_InputEvent_getMouseWheelDelta(lua_State *L) +static int _olua_fun_fairygui_InputEvent_getMouseWheelDelta(lua_State *L) { olua_startinvoke(L); @@ -3234,7 +3592,7 @@ static int _fairygui_InputEvent_getMouseWheelDelta(lua_State *L) return num_ret; } -static int _fairygui_InputEvent_getPosition(lua_State *L) +static int _olua_fun_fairygui_InputEvent_getPosition(lua_State *L) { olua_startinvoke(L); @@ -3251,7 +3609,7 @@ static int _fairygui_InputEvent_getPosition(lua_State *L) return num_ret; } -static int _fairygui_InputEvent_getProcessor(lua_State *L) +static int _olua_fun_fairygui_InputEvent_getProcessor(lua_State *L) { olua_startinvoke(L); @@ -3268,7 +3626,7 @@ static int _fairygui_InputEvent_getProcessor(lua_State *L) return num_ret; } -static int _fairygui_InputEvent_getTarget(lua_State *L) +static int _olua_fun_fairygui_InputEvent_getTarget(lua_State *L) { olua_startinvoke(L); @@ -3285,7 +3643,7 @@ static int _fairygui_InputEvent_getTarget(lua_State *L) return num_ret; } -static int _fairygui_InputEvent_getTouch(lua_State *L) +static int _olua_fun_fairygui_InputEvent_getTouch(lua_State *L) { olua_startinvoke(L); @@ -3302,7 +3660,7 @@ static int _fairygui_InputEvent_getTouch(lua_State *L) return num_ret; } -static int _fairygui_InputEvent_getTouchId(lua_State *L) +static int _olua_fun_fairygui_InputEvent_getTouchId(lua_State *L) { olua_startinvoke(L); @@ -3319,7 +3677,7 @@ static int _fairygui_InputEvent_getTouchId(lua_State *L) return num_ret; } -static int _fairygui_InputEvent_getX(lua_State *L) +static int _olua_fun_fairygui_InputEvent_getX(lua_State *L) { olua_startinvoke(L); @@ -3336,7 +3694,7 @@ static int _fairygui_InputEvent_getX(lua_State *L) return num_ret; } -static int _fairygui_InputEvent_getY(lua_State *L) +static int _olua_fun_fairygui_InputEvent_getY(lua_State *L) { olua_startinvoke(L); @@ -3353,7 +3711,7 @@ static int _fairygui_InputEvent_getY(lua_State *L) return num_ret; } -static int _fairygui_InputEvent_isAltDown(lua_State *L) +static int _olua_fun_fairygui_InputEvent_isAltDown(lua_State *L) { olua_startinvoke(L); @@ -3370,7 +3728,7 @@ static int _fairygui_InputEvent_isAltDown(lua_State *L) return num_ret; } -static int _fairygui_InputEvent_isCtrlDown(lua_State *L) +static int _olua_fun_fairygui_InputEvent_isCtrlDown(lua_State *L) { olua_startinvoke(L); @@ -3387,7 +3745,7 @@ static int _fairygui_InputEvent_isCtrlDown(lua_State *L) return num_ret; } -static int _fairygui_InputEvent_isDoubleClick(lua_State *L) +static int _olua_fun_fairygui_InputEvent_isDoubleClick(lua_State *L) { olua_startinvoke(L); @@ -3404,7 +3762,7 @@ static int _fairygui_InputEvent_isDoubleClick(lua_State *L) return num_ret; } -static int _fairygui_InputEvent_isShiftDown(lua_State *L) +static int _olua_fun_fairygui_InputEvent_isShiftDown(lua_State *L) { olua_startinvoke(L); @@ -3421,11 +3779,11 @@ static int _fairygui_InputEvent_isShiftDown(lua_State *L) return num_ret; } -static int _fairygui_InputEvent_new(lua_State *L) +static int _olua_fun_fairygui_InputEvent_new(lua_State *L) { olua_startinvoke(L); - // InputEvent() + // fairygui::InputEvent() fairygui::InputEvent *ret = new fairygui::InputEvent(); int num_ret = olua_push_object(L, ret, "fgui.InputEvent"); olua_postnew(L, ret); @@ -3435,165 +3793,56 @@ static int _fairygui_InputEvent_new(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_fairygui_InputEvent(lua_State *L) +static int _olua_cls_fgui_InputEvent(lua_State *L) { oluacls_class(L, "fgui.InputEvent"); - oluacls_func(L, "__gc", _fairygui_InputEvent___gc); - oluacls_func(L, "__olua_move", _fairygui_InputEvent___olua_move); - oluacls_func(L, "getButton", _fairygui_InputEvent_getButton); - oluacls_func(L, "getKeyCode", _fairygui_InputEvent_getKeyCode); - oluacls_func(L, "getMouseWheelDelta", _fairygui_InputEvent_getMouseWheelDelta); - oluacls_func(L, "getPosition", _fairygui_InputEvent_getPosition); - oluacls_func(L, "getProcessor", _fairygui_InputEvent_getProcessor); - oluacls_func(L, "getTarget", _fairygui_InputEvent_getTarget); - oluacls_func(L, "getTouch", _fairygui_InputEvent_getTouch); - oluacls_func(L, "getTouchId", _fairygui_InputEvent_getTouchId); - oluacls_func(L, "getX", _fairygui_InputEvent_getX); - oluacls_func(L, "getY", _fairygui_InputEvent_getY); - oluacls_func(L, "isAltDown", _fairygui_InputEvent_isAltDown); - oluacls_func(L, "isCtrlDown", _fairygui_InputEvent_isCtrlDown); - oluacls_func(L, "isDoubleClick", _fairygui_InputEvent_isDoubleClick); - oluacls_func(L, "isShiftDown", _fairygui_InputEvent_isShiftDown); - oluacls_func(L, "new", _fairygui_InputEvent_new); - oluacls_prop(L, "altDown", _fairygui_InputEvent_isAltDown, nullptr); - oluacls_prop(L, "button", _fairygui_InputEvent_getButton, nullptr); - oluacls_prop(L, "ctrlDown", _fairygui_InputEvent_isCtrlDown, nullptr); - oluacls_prop(L, "doubleClick", _fairygui_InputEvent_isDoubleClick, nullptr); - oluacls_prop(L, "keyCode", _fairygui_InputEvent_getKeyCode, nullptr); - oluacls_prop(L, "mouseWheelDelta", _fairygui_InputEvent_getMouseWheelDelta, nullptr); - oluacls_prop(L, "position", _fairygui_InputEvent_getPosition, nullptr); - oluacls_prop(L, "processor", _fairygui_InputEvent_getProcessor, nullptr); - oluacls_prop(L, "shiftDown", _fairygui_InputEvent_isShiftDown, nullptr); - oluacls_prop(L, "target", _fairygui_InputEvent_getTarget, nullptr); - oluacls_prop(L, "touch", _fairygui_InputEvent_getTouch, nullptr); - oluacls_prop(L, "touchId", _fairygui_InputEvent_getTouchId, nullptr); - oluacls_prop(L, "x", _fairygui_InputEvent_getX, nullptr); - oluacls_prop(L, "y", _fairygui_InputEvent_getY, nullptr); + oluacls_func(L, "__gc", _olua_fun_fairygui_InputEvent___gc); + oluacls_func(L, "__olua_move", _olua_fun_fairygui_InputEvent___olua_move); + oluacls_func(L, "getButton", _olua_fun_fairygui_InputEvent_getButton); + oluacls_func(L, "getKeyCode", _olua_fun_fairygui_InputEvent_getKeyCode); + oluacls_func(L, "getMouseWheelDelta", _olua_fun_fairygui_InputEvent_getMouseWheelDelta); + oluacls_func(L, "getPosition", _olua_fun_fairygui_InputEvent_getPosition); + oluacls_func(L, "getProcessor", _olua_fun_fairygui_InputEvent_getProcessor); + oluacls_func(L, "getTarget", _olua_fun_fairygui_InputEvent_getTarget); + oluacls_func(L, "getTouch", _olua_fun_fairygui_InputEvent_getTouch); + oluacls_func(L, "getTouchId", _olua_fun_fairygui_InputEvent_getTouchId); + oluacls_func(L, "getX", _olua_fun_fairygui_InputEvent_getX); + oluacls_func(L, "getY", _olua_fun_fairygui_InputEvent_getY); + oluacls_func(L, "isAltDown", _olua_fun_fairygui_InputEvent_isAltDown); + oluacls_func(L, "isCtrlDown", _olua_fun_fairygui_InputEvent_isCtrlDown); + oluacls_func(L, "isDoubleClick", _olua_fun_fairygui_InputEvent_isDoubleClick); + oluacls_func(L, "isShiftDown", _olua_fun_fairygui_InputEvent_isShiftDown); + oluacls_func(L, "new", _olua_fun_fairygui_InputEvent_new); + oluacls_prop(L, "altDown", _olua_fun_fairygui_InputEvent_isAltDown, nullptr); + oluacls_prop(L, "button", _olua_fun_fairygui_InputEvent_getButton, nullptr); + oluacls_prop(L, "ctrlDown", _olua_fun_fairygui_InputEvent_isCtrlDown, nullptr); + oluacls_prop(L, "doubleClick", _olua_fun_fairygui_InputEvent_isDoubleClick, nullptr); + oluacls_prop(L, "keyCode", _olua_fun_fairygui_InputEvent_getKeyCode, nullptr); + oluacls_prop(L, "mouseWheelDelta", _olua_fun_fairygui_InputEvent_getMouseWheelDelta, nullptr); + oluacls_prop(L, "position", _olua_fun_fairygui_InputEvent_getPosition, nullptr); + oluacls_prop(L, "processor", _olua_fun_fairygui_InputEvent_getProcessor, nullptr); + oluacls_prop(L, "shiftDown", _olua_fun_fairygui_InputEvent_isShiftDown, nullptr); + oluacls_prop(L, "target", _olua_fun_fairygui_InputEvent_getTarget, nullptr); + oluacls_prop(L, "touch", _olua_fun_fairygui_InputEvent_getTouch, nullptr); + oluacls_prop(L, "touchId", _olua_fun_fairygui_InputEvent_getTouchId, nullptr); + oluacls_prop(L, "x", _olua_fun_fairygui_InputEvent_getX, nullptr); + oluacls_prop(L, "y", _olua_fun_fairygui_InputEvent_getY, nullptr); return 1; } -OLUA_END_DECLS -static int _fairygui_TextFormat___call(lua_State *L) +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_fgui_InputEvent(lua_State *L) { - olua_startinvoke(L); - - fairygui::TextFormat ret; - - luaL_checktype(L, 2, LUA_TTABLE); - - std::string arg1; /** face */ - float arg2 = 0; /** fontSize */ - cocos2d::Color3B arg3; /** color */ - bool arg4 = false; /** bold */ - bool arg5 = false; /** italics */ - bool arg6 = false; /** underline */ - int arg7 = 0; /** lineSpacing */ - int arg8 = 0; /** letterSpacing */ - cocos2d::TextHAlignment arg9 = (cocos2d::TextHAlignment)0; /** align */ - cocos2d::TextVAlignment arg10 = (cocos2d::TextVAlignment)0; /** verticalAlign */ - int arg11 = 0; /** effect */ - cocos2d::Color3B arg12; /** outlineColor */ - int arg13 = 0; /** outlineSize */ - cocos2d::Color3B arg14; /** shadowColor */ - cocos2d::Size arg15; /** shadowOffset */ - int arg16 = 0; /** shadowBlurRadius */ - cocos2d::Color3B arg17; /** glowColor */ - - olua_getfield(L, 2, "face"); - olua_check_string(L, -1, &arg1); - ret.face = arg1; - lua_pop(L, 1); - - olua_getfield(L, 2, "fontSize"); - olua_check_number(L, -1, &arg2); - ret.fontSize = arg2; - lua_pop(L, 1); - - olua_getfield(L, 2, "color"); - olua_check_cocos2d_Color3B(L, -1, &arg3); - ret.color = arg3; - lua_pop(L, 1); - - olua_getfield(L, 2, "bold"); - olua_check_bool(L, -1, &arg4); - ret.bold = arg4; - lua_pop(L, 1); - - olua_getfield(L, 2, "italics"); - olua_check_bool(L, -1, &arg5); - ret.italics = arg5; - lua_pop(L, 1); - - olua_getfield(L, 2, "underline"); - olua_check_bool(L, -1, &arg6); - ret.underline = arg6; - lua_pop(L, 1); - - olua_getfield(L, 2, "lineSpacing"); - olua_check_integer(L, -1, &arg7); - ret.lineSpacing = arg7; - lua_pop(L, 1); - - olua_getfield(L, 2, "letterSpacing"); - olua_check_integer(L, -1, &arg8); - ret.letterSpacing = arg8; - lua_pop(L, 1); - - olua_getfield(L, 2, "align"); - olua_check_enum(L, -1, &arg9); - ret.align = arg9; - lua_pop(L, 1); - - olua_getfield(L, 2, "verticalAlign"); - olua_check_enum(L, -1, &arg10); - ret.verticalAlign = arg10; - lua_pop(L, 1); - - olua_getfield(L, 2, "effect"); - olua_check_integer(L, -1, &arg11); - ret.effect = arg11; - lua_pop(L, 1); - - olua_getfield(L, 2, "outlineColor"); - olua_check_cocos2d_Color3B(L, -1, &arg12); - ret.outlineColor = arg12; - lua_pop(L, 1); - - olua_getfield(L, 2, "outlineSize"); - olua_check_integer(L, -1, &arg13); - ret.outlineSize = arg13; - lua_pop(L, 1); - - olua_getfield(L, 2, "shadowColor"); - olua_check_cocos2d_Color3B(L, -1, &arg14); - ret.shadowColor = arg14; - lua_pop(L, 1); - - olua_getfield(L, 2, "shadowOffset"); - olua_check_object(L, -1, &arg15, "cc.Size"); - ret.shadowOffset = arg15; - lua_pop(L, 1); - - olua_getfield(L, 2, "shadowBlurRadius"); - olua_check_integer(L, -1, &arg16); - ret.shadowBlurRadius = arg16; - lua_pop(L, 1); - - olua_getfield(L, 2, "glowColor"); - olua_check_cocos2d_Color3B(L, -1, &arg17); - ret.glowColor = arg17; - lua_pop(L, 1); - - olua_pushcopy_object(L, ret, "fgui.TextFormat"); - - olua_endinvoke(L); - + olua_require(L, "fairygui", luaopen_fairygui); + if (!olua_getclass(L, "fgui.InputEvent")) { + luaL_error(L, "class not found: fairygui::InputEvent"); + } return 1; } +OLUA_END_DECLS -static int _fairygui_TextFormat___gc(lua_State *L) +static int _olua_fun_fairygui_TextFormat___gc(lua_State *L) { olua_startinvoke(L); @@ -3605,7 +3854,7 @@ static int _fairygui_TextFormat___gc(lua_State *L) return 0; } -static int _fairygui_TextFormat___olua_move(lua_State *L) +static int _olua_fun_fairygui_TextFormat___olua_move(lua_State *L) { olua_startinvoke(L); @@ -3617,133 +3866,119 @@ static int _fairygui_TextFormat___olua_move(lua_State *L) return 1; } -static int _fairygui_TextFormat_disableEffect(lua_State *L) +static int _olua_fun_fairygui_TextFormat_align$1(lua_State *L) { olua_startinvoke(L); fairygui::TextFormat *self = nullptr; - int arg1 = 0; /** effectFlag */ olua_to_object(L, 1, &self, "fgui.TextFormat"); - olua_check_integer(L, 2, &arg1); - // void disableEffect(int effectFlag) - self->disableEffect(arg1); + // cocos2d::TextHAlignment align + cocos2d::TextHAlignment ret = self->align; + int num_ret = olua_push_enum(L, ret); olua_endinvoke(L); - return 0; + return num_ret; } -static int _fairygui_TextFormat_enableEffect(lua_State *L) +static int _olua_fun_fairygui_TextFormat_align$2(lua_State *L) { olua_startinvoke(L); fairygui::TextFormat *self = nullptr; - int arg1 = 0; /** effectFlag */ + cocos2d::TextHAlignment arg1 = (cocos2d::TextHAlignment)0; /** align */ olua_to_object(L, 1, &self, "fgui.TextFormat"); - olua_check_integer(L, 2, &arg1); + olua_check_enum(L, 2, &arg1); - // void enableEffect(int effectFlag) - self->enableEffect(arg1); + // cocos2d::TextHAlignment align + self->align = arg1; olua_endinvoke(L); return 0; } -static int _fairygui_TextFormat_hasEffect(lua_State *L) +static int _olua_fun_fairygui_TextFormat_align(lua_State *L) { - olua_startinvoke(L); - - fairygui::TextFormat *self = nullptr; - int arg1 = 0; /** effectFlag */ + int num_args = lua_gettop(L) - 1; - olua_to_object(L, 1, &self, "fgui.TextFormat"); - olua_check_integer(L, 2, &arg1); + if (num_args == 0) { + // cocos2d::TextHAlignment align + return _olua_fun_fairygui_TextFormat_align$1(L); + } - // bool hasEffect(int effectFlag) - bool ret = self->hasEffect(arg1); - int num_ret = olua_push_bool(L, ret); + if (num_args == 1) { + // if ((olua_is_enum(L, 2))) { + // cocos2d::TextHAlignment align + return _olua_fun_fairygui_TextFormat_align$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'fairygui::TextFormat::align' not support '%d' arguments", num_args); - return num_ret; + return 0; } -static int _fairygui_TextFormat_new$1(lua_State *L) +static int _olua_fun_fairygui_TextFormat_bold$1(lua_State *L) { olua_startinvoke(L); - // TextFormat() - fairygui::TextFormat *ret = new fairygui::TextFormat(); - int num_ret = olua_push_object(L, ret, "fgui.TextFormat"); - olua_postnew(L, ret); + fairygui::TextFormat *self = nullptr; + + olua_to_object(L, 1, &self, "fgui.TextFormat"); + + // bool bold + bool ret = self->bold; + int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); return num_ret; } -static int _fairygui_TextFormat_new$2(lua_State *L) +static int _olua_fun_fairygui_TextFormat_bold$2(lua_State *L) { olua_startinvoke(L); - fairygui::TextFormat arg1; /** other */ + fairygui::TextFormat *self = nullptr; + bool arg1 = false; /** bold */ - olua_check_object(L, 1, &arg1, "fgui.TextFormat"); + olua_to_object(L, 1, &self, "fgui.TextFormat"); + olua_check_bool(L, 2, &arg1); - // TextFormat(const fairygui::TextFormat &other) - fairygui::TextFormat *ret = new fairygui::TextFormat(arg1); - int num_ret = olua_push_object(L, ret, "fgui.TextFormat"); - olua_postnew(L, ret); + // bool bold + self->bold = arg1; olua_endinvoke(L); - return num_ret; + return 0; } -static int _fairygui_TextFormat_new(lua_State *L) +static int _olua_fun_fairygui_TextFormat_bold(lua_State *L) { - int num_args = lua_gettop(L); + int num_args = lua_gettop(L) - 1; if (num_args == 0) { - // TextFormat() - return _fairygui_TextFormat_new$1(L); + // bool bold + return _olua_fun_fairygui_TextFormat_bold$1(L); } if (num_args == 1) { - // if ((olua_is_object(L, 1, "fgui.TextFormat"))) { - // TextFormat(const fairygui::TextFormat &other) - return _fairygui_TextFormat_new$2(L); + // if ((olua_is_bool(L, 2))) { + // bool bold + return _olua_fun_fairygui_TextFormat_bold$2(L); // } } - luaL_error(L, "method 'fairygui::TextFormat::new' not support '%d' arguments", num_args); - - return 0; -} - -static int _fairygui_TextFormat_setFormat(lua_State *L) -{ - olua_startinvoke(L); - - fairygui::TextFormat *self = nullptr; - fairygui::TextFormat arg1; /** format */ - - olua_to_object(L, 1, &self, "fgui.TextFormat"); - olua_check_object(L, 2, &arg1, "fgui.TextFormat"); - - // void setFormat(const fairygui::TextFormat &format) - self->setFormat(arg1); - - olua_endinvoke(L); + luaL_error(L, "method 'fairygui::TextFormat::bold' not support '%d' arguments", num_args); return 0; } -static int _fairygui_TextFormat_get_align(lua_State *L) +static int _olua_fun_fairygui_TextFormat_color$1(lua_State *L) { olua_startinvoke(L); @@ -3751,69 +3986,73 @@ static int _fairygui_TextFormat_get_align(lua_State *L) olua_to_object(L, 1, &self, "fgui.TextFormat"); - // cocos2d::TextHAlignment align - cocos2d::TextHAlignment ret = self->align; - int num_ret = olua_push_enum(L, ret); + // cocos2d::Color3B color + cocos2d::Color3B &ret = self->color; + int num_ret = olua_push_cocos2d_Color3B(L, ret); olua_endinvoke(L); return num_ret; } -static int _fairygui_TextFormat_set_align(lua_State *L) +static int _olua_fun_fairygui_TextFormat_color$2(lua_State *L) { olua_startinvoke(L); fairygui::TextFormat *self = nullptr; - cocos2d::TextHAlignment arg1 = (cocos2d::TextHAlignment)0; /** align */ + cocos2d::Color3B arg1; /** color */ olua_to_object(L, 1, &self, "fgui.TextFormat"); - olua_check_enum(L, 2, &arg1); + olua_check_cocos2d_Color3B(L, 2, &arg1); - // cocos2d::TextHAlignment align - self->align = arg1; + // cocos2d::Color3B color + self->color = arg1; olua_endinvoke(L); return 0; } -static int _fairygui_TextFormat_get_bold(lua_State *L) +static int _olua_fun_fairygui_TextFormat_color(lua_State *L) { - olua_startinvoke(L); - - fairygui::TextFormat *self = nullptr; + int num_args = lua_gettop(L) - 1; - olua_to_object(L, 1, &self, "fgui.TextFormat"); + if (num_args == 0) { + // cocos2d::Color3B color + return _olua_fun_fairygui_TextFormat_color$1(L); + } - // bool bold - bool ret = self->bold; - int num_ret = olua_push_bool(L, ret); + if (num_args == 1) { + // if ((olua_is_cocos2d_Color3B(L, 2))) { + // cocos2d::Color3B color + return _olua_fun_fairygui_TextFormat_color$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'fairygui::TextFormat::color' not support '%d' arguments", num_args); - return num_ret; + return 0; } -static int _fairygui_TextFormat_set_bold(lua_State *L) +static int _olua_fun_fairygui_TextFormat_disableEffect(lua_State *L) { olua_startinvoke(L); fairygui::TextFormat *self = nullptr; - bool arg1 = false; /** bold */ + int arg1 = 0; /** effectFlag */ olua_to_object(L, 1, &self, "fgui.TextFormat"); - olua_check_bool(L, 2, &arg1); + olua_check_integer(L, 2, &arg1); - // bool bold - self->bold = arg1; + // void disableEffect(int effectFlag) + self->disableEffect(arg1); olua_endinvoke(L); return 0; } -static int _fairygui_TextFormat_get_color(lua_State *L) +static int _olua_fun_fairygui_TextFormat_effect$1(lua_State *L) { olua_startinvoke(L); @@ -3821,69 +4060,73 @@ static int _fairygui_TextFormat_get_color(lua_State *L) olua_to_object(L, 1, &self, "fgui.TextFormat"); - // cocos2d::Color3B color - cocos2d::Color3B &ret = self->color; - int num_ret = olua_push_cocos2d_Color3B(L, ret); + // int effect + int ret = self->effect; + int num_ret = olua_push_integer(L, ret); olua_endinvoke(L); return num_ret; } -static int _fairygui_TextFormat_set_color(lua_State *L) +static int _olua_fun_fairygui_TextFormat_effect$2(lua_State *L) { olua_startinvoke(L); fairygui::TextFormat *self = nullptr; - cocos2d::Color3B arg1; /** color */ + int arg1 = 0; /** effect */ olua_to_object(L, 1, &self, "fgui.TextFormat"); - olua_check_cocos2d_Color3B(L, 2, &arg1); + olua_check_integer(L, 2, &arg1); - // cocos2d::Color3B color - self->color = arg1; + // int effect + self->effect = arg1; olua_endinvoke(L); return 0; } -static int _fairygui_TextFormat_get_effect(lua_State *L) +static int _olua_fun_fairygui_TextFormat_effect(lua_State *L) { - olua_startinvoke(L); - - fairygui::TextFormat *self = nullptr; + int num_args = lua_gettop(L) - 1; - olua_to_object(L, 1, &self, "fgui.TextFormat"); + if (num_args == 0) { + // int effect + return _olua_fun_fairygui_TextFormat_effect$1(L); + } - // int effect - int ret = self->effect; - int num_ret = olua_push_integer(L, ret); + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // int effect + return _olua_fun_fairygui_TextFormat_effect$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'fairygui::TextFormat::effect' not support '%d' arguments", num_args); - return num_ret; + return 0; } -static int _fairygui_TextFormat_set_effect(lua_State *L) +static int _olua_fun_fairygui_TextFormat_enableEffect(lua_State *L) { olua_startinvoke(L); fairygui::TextFormat *self = nullptr; - int arg1 = 0; /** effect */ + int arg1 = 0; /** effectFlag */ olua_to_object(L, 1, &self, "fgui.TextFormat"); olua_check_integer(L, 2, &arg1); - // int effect - self->effect = arg1; + // void enableEffect(int effectFlag) + self->enableEffect(arg1); olua_endinvoke(L); return 0; } -static int _fairygui_TextFormat_get_face(lua_State *L) +static int _olua_fun_fairygui_TextFormat_face$1(lua_State *L) { olua_startinvoke(L); @@ -3900,7 +4143,7 @@ static int _fairygui_TextFormat_get_face(lua_State *L) return num_ret; } -static int _fairygui_TextFormat_set_face(lua_State *L) +static int _olua_fun_fairygui_TextFormat_face$2(lua_State *L) { olua_startinvoke(L); @@ -3918,7 +4161,28 @@ static int _fairygui_TextFormat_set_face(lua_State *L) return 0; } -static int _fairygui_TextFormat_get_fontSize(lua_State *L) +static int _olua_fun_fairygui_TextFormat_face(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // std::string face + return _olua_fun_fairygui_TextFormat_face$1(L); + } + + if (num_args == 1) { + // if ((olua_is_string(L, 2))) { + // std::string face + return _olua_fun_fairygui_TextFormat_face$2(L); + // } + } + + luaL_error(L, "method 'fairygui::TextFormat::face' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_fairygui_TextFormat_fontSize$1(lua_State *L) { olua_startinvoke(L); @@ -3935,7 +4199,7 @@ static int _fairygui_TextFormat_get_fontSize(lua_State *L) return num_ret; } -static int _fairygui_TextFormat_set_fontSize(lua_State *L) +static int _olua_fun_fairygui_TextFormat_fontSize$2(lua_State *L) { olua_startinvoke(L); @@ -3953,7 +4217,28 @@ static int _fairygui_TextFormat_set_fontSize(lua_State *L) return 0; } -static int _fairygui_TextFormat_get_glowColor(lua_State *L) +static int _olua_fun_fairygui_TextFormat_fontSize(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float fontSize + return _olua_fun_fairygui_TextFormat_fontSize$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float fontSize + return _olua_fun_fairygui_TextFormat_fontSize$2(L); + // } + } + + luaL_error(L, "method 'fairygui::TextFormat::fontSize' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_fairygui_TextFormat_glowColor$1(lua_State *L) { olua_startinvoke(L); @@ -3970,7 +4255,7 @@ static int _fairygui_TextFormat_get_glowColor(lua_State *L) return num_ret; } -static int _fairygui_TextFormat_set_glowColor(lua_State *L) +static int _olua_fun_fairygui_TextFormat_glowColor$2(lua_State *L) { olua_startinvoke(L); @@ -3988,16 +4273,39 @@ static int _fairygui_TextFormat_set_glowColor(lua_State *L) return 0; } -static int _fairygui_TextFormat_get_italics(lua_State *L) +static int _olua_fun_fairygui_TextFormat_glowColor(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // cocos2d::Color3B glowColor + return _olua_fun_fairygui_TextFormat_glowColor$1(L); + } + + if (num_args == 1) { + // if ((olua_is_cocos2d_Color3B(L, 2))) { + // cocos2d::Color3B glowColor + return _olua_fun_fairygui_TextFormat_glowColor$2(L); + // } + } + + luaL_error(L, "method 'fairygui::TextFormat::glowColor' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_fairygui_TextFormat_hasEffect(lua_State *L) { olua_startinvoke(L); fairygui::TextFormat *self = nullptr; + int arg1 = 0; /** effectFlag */ olua_to_object(L, 1, &self, "fgui.TextFormat"); + olua_check_integer(L, 2, &arg1); - // bool italics - bool ret = self->italics; + // bool hasEffect(int effectFlag) + bool ret = self->hasEffect(arg1); int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); @@ -4005,33 +4313,71 @@ static int _fairygui_TextFormat_get_italics(lua_State *L) return num_ret; } -static int _fairygui_TextFormat_set_italics(lua_State *L) +static int _olua_fun_fairygui_TextFormat_italics$1(lua_State *L) { olua_startinvoke(L); fairygui::TextFormat *self = nullptr; - bool arg1 = false; /** italics */ olua_to_object(L, 1, &self, "fgui.TextFormat"); - olua_check_bool(L, 2, &arg1); // bool italics - self->italics = arg1; + bool ret = self->italics; + int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); - return 0; + return num_ret; } -static int _fairygui_TextFormat_get_letterSpacing(lua_State *L) +static int _olua_fun_fairygui_TextFormat_italics$2(lua_State *L) { olua_startinvoke(L); fairygui::TextFormat *self = nullptr; + bool arg1 = false; /** italics */ olua_to_object(L, 1, &self, "fgui.TextFormat"); + olua_check_bool(L, 2, &arg1); - // int letterSpacing + // bool italics + self->italics = arg1; + + olua_endinvoke(L); + + return 0; +} + +static int _olua_fun_fairygui_TextFormat_italics(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // bool italics + return _olua_fun_fairygui_TextFormat_italics$1(L); + } + + if (num_args == 1) { + // if ((olua_is_bool(L, 2))) { + // bool italics + return _olua_fun_fairygui_TextFormat_italics$2(L); + // } + } + + luaL_error(L, "method 'fairygui::TextFormat::italics' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_fairygui_TextFormat_letterSpacing$1(lua_State *L) +{ + olua_startinvoke(L); + + fairygui::TextFormat *self = nullptr; + + olua_to_object(L, 1, &self, "fgui.TextFormat"); + + // int letterSpacing int ret = self->letterSpacing; int num_ret = olua_push_integer(L, ret); @@ -4040,7 +4386,7 @@ static int _fairygui_TextFormat_get_letterSpacing(lua_State *L) return num_ret; } -static int _fairygui_TextFormat_set_letterSpacing(lua_State *L) +static int _olua_fun_fairygui_TextFormat_letterSpacing$2(lua_State *L) { olua_startinvoke(L); @@ -4058,7 +4404,28 @@ static int _fairygui_TextFormat_set_letterSpacing(lua_State *L) return 0; } -static int _fairygui_TextFormat_get_lineSpacing(lua_State *L) +static int _olua_fun_fairygui_TextFormat_letterSpacing(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // int letterSpacing + return _olua_fun_fairygui_TextFormat_letterSpacing$1(L); + } + + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // int letterSpacing + return _olua_fun_fairygui_TextFormat_letterSpacing$2(L); + // } + } + + luaL_error(L, "method 'fairygui::TextFormat::letterSpacing' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_fairygui_TextFormat_lineSpacing$1(lua_State *L) { olua_startinvoke(L); @@ -4075,7 +4442,7 @@ static int _fairygui_TextFormat_get_lineSpacing(lua_State *L) return num_ret; } -static int _fairygui_TextFormat_set_lineSpacing(lua_State *L) +static int _olua_fun_fairygui_TextFormat_lineSpacing$2(lua_State *L) { olua_startinvoke(L); @@ -4093,7 +4460,42 @@ static int _fairygui_TextFormat_set_lineSpacing(lua_State *L) return 0; } -static int _fairygui_TextFormat_get_outlineColor(lua_State *L) +static int _olua_fun_fairygui_TextFormat_lineSpacing(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // int lineSpacing + return _olua_fun_fairygui_TextFormat_lineSpacing$1(L); + } + + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // int lineSpacing + return _olua_fun_fairygui_TextFormat_lineSpacing$2(L); + // } + } + + luaL_error(L, "method 'fairygui::TextFormat::lineSpacing' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_fairygui_TextFormat_new(lua_State *L) +{ + olua_startinvoke(L); + + // fairygui::TextFormat() + fairygui::TextFormat *ret = new fairygui::TextFormat(); + int num_ret = olua_push_object(L, ret, "fgui.TextFormat"); + olua_postnew(L, ret); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_fairygui_TextFormat_outlineColor$1(lua_State *L) { olua_startinvoke(L); @@ -4110,7 +4512,7 @@ static int _fairygui_TextFormat_get_outlineColor(lua_State *L) return num_ret; } -static int _fairygui_TextFormat_set_outlineColor(lua_State *L) +static int _olua_fun_fairygui_TextFormat_outlineColor$2(lua_State *L) { olua_startinvoke(L); @@ -4128,7 +4530,28 @@ static int _fairygui_TextFormat_set_outlineColor(lua_State *L) return 0; } -static int _fairygui_TextFormat_get_outlineSize(lua_State *L) +static int _olua_fun_fairygui_TextFormat_outlineColor(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // cocos2d::Color3B outlineColor + return _olua_fun_fairygui_TextFormat_outlineColor$1(L); + } + + if (num_args == 1) { + // if ((olua_is_cocos2d_Color3B(L, 2))) { + // cocos2d::Color3B outlineColor + return _olua_fun_fairygui_TextFormat_outlineColor$2(L); + // } + } + + luaL_error(L, "method 'fairygui::TextFormat::outlineColor' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_fairygui_TextFormat_outlineSize$1(lua_State *L) { olua_startinvoke(L); @@ -4145,7 +4568,7 @@ static int _fairygui_TextFormat_get_outlineSize(lua_State *L) return num_ret; } -static int _fairygui_TextFormat_set_outlineSize(lua_State *L) +static int _olua_fun_fairygui_TextFormat_outlineSize$2(lua_State *L) { olua_startinvoke(L); @@ -4163,7 +4586,46 @@ static int _fairygui_TextFormat_set_outlineSize(lua_State *L) return 0; } -static int _fairygui_TextFormat_get_shadowBlurRadius(lua_State *L) +static int _olua_fun_fairygui_TextFormat_outlineSize(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // int outlineSize + return _olua_fun_fairygui_TextFormat_outlineSize$1(L); + } + + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // int outlineSize + return _olua_fun_fairygui_TextFormat_outlineSize$2(L); + // } + } + + luaL_error(L, "method 'fairygui::TextFormat::outlineSize' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_fairygui_TextFormat_setFormat(lua_State *L) +{ + olua_startinvoke(L); + + fairygui::TextFormat *self = nullptr; + fairygui::TextFormat *arg1; /** format */ + + olua_to_object(L, 1, &self, "fgui.TextFormat"); + olua_check_object(L, 2, &arg1, "fgui.TextFormat"); + + // void setFormat(const fairygui::TextFormat &format) + self->setFormat(*arg1); + + olua_endinvoke(L); + + return 0; +} + +static int _olua_fun_fairygui_TextFormat_shadowBlurRadius$1(lua_State *L) { olua_startinvoke(L); @@ -4180,7 +4642,7 @@ static int _fairygui_TextFormat_get_shadowBlurRadius(lua_State *L) return num_ret; } -static int _fairygui_TextFormat_set_shadowBlurRadius(lua_State *L) +static int _olua_fun_fairygui_TextFormat_shadowBlurRadius$2(lua_State *L) { olua_startinvoke(L); @@ -4198,7 +4660,28 @@ static int _fairygui_TextFormat_set_shadowBlurRadius(lua_State *L) return 0; } -static int _fairygui_TextFormat_get_shadowColor(lua_State *L) +static int _olua_fun_fairygui_TextFormat_shadowBlurRadius(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // int shadowBlurRadius + return _olua_fun_fairygui_TextFormat_shadowBlurRadius$1(L); + } + + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // int shadowBlurRadius + return _olua_fun_fairygui_TextFormat_shadowBlurRadius$2(L); + // } + } + + luaL_error(L, "method 'fairygui::TextFormat::shadowBlurRadius' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_fairygui_TextFormat_shadowColor$1(lua_State *L) { olua_startinvoke(L); @@ -4215,7 +4698,7 @@ static int _fairygui_TextFormat_get_shadowColor(lua_State *L) return num_ret; } -static int _fairygui_TextFormat_set_shadowColor(lua_State *L) +static int _olua_fun_fairygui_TextFormat_shadowColor$2(lua_State *L) { olua_startinvoke(L); @@ -4233,7 +4716,28 @@ static int _fairygui_TextFormat_set_shadowColor(lua_State *L) return 0; } -static int _fairygui_TextFormat_get_shadowOffset(lua_State *L) +static int _olua_fun_fairygui_TextFormat_shadowColor(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // cocos2d::Color3B shadowColor + return _olua_fun_fairygui_TextFormat_shadowColor$1(L); + } + + if (num_args == 1) { + // if ((olua_is_cocos2d_Color3B(L, 2))) { + // cocos2d::Color3B shadowColor + return _olua_fun_fairygui_TextFormat_shadowColor$2(L); + // } + } + + luaL_error(L, "method 'fairygui::TextFormat::shadowColor' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_fairygui_TextFormat_shadowOffset$1(lua_State *L) { olua_startinvoke(L); @@ -4243,32 +4747,53 @@ static int _fairygui_TextFormat_get_shadowOffset(lua_State *L) // cocos2d::Size shadowOffset cocos2d::Size &ret = self->shadowOffset; - int num_ret = olua_pushcopy_object(L, ret, "cc.Size"); + int num_ret = olua_copy_object(L, ret, "cc.Size"); olua_endinvoke(L); return num_ret; } -static int _fairygui_TextFormat_set_shadowOffset(lua_State *L) +static int _olua_fun_fairygui_TextFormat_shadowOffset$2(lua_State *L) { olua_startinvoke(L); fairygui::TextFormat *self = nullptr; - cocos2d::Size arg1; /** shadowOffset */ + cocos2d::Size *arg1; /** shadowOffset */ olua_to_object(L, 1, &self, "fgui.TextFormat"); olua_check_object(L, 2, &arg1, "cc.Size"); // cocos2d::Size shadowOffset - self->shadowOffset = arg1; + self->shadowOffset = *arg1; olua_endinvoke(L); return 0; } -static int _fairygui_TextFormat_get_underline(lua_State *L) +static int _olua_fun_fairygui_TextFormat_shadowOffset(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // cocos2d::Size shadowOffset + return _olua_fun_fairygui_TextFormat_shadowOffset$1(L); + } + + if (num_args == 1) { + // if ((olua_is_object(L, 2, "cc.Size"))) { + // cocos2d::Size shadowOffset + return _olua_fun_fairygui_TextFormat_shadowOffset$2(L); + // } + } + + luaL_error(L, "method 'fairygui::TextFormat::shadowOffset' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_fairygui_TextFormat_underline$1(lua_State *L) { olua_startinvoke(L); @@ -4285,7 +4810,7 @@ static int _fairygui_TextFormat_get_underline(lua_State *L) return num_ret; } -static int _fairygui_TextFormat_set_underline(lua_State *L) +static int _olua_fun_fairygui_TextFormat_underline$2(lua_State *L) { olua_startinvoke(L); @@ -4303,7 +4828,28 @@ static int _fairygui_TextFormat_set_underline(lua_State *L) return 0; } -static int _fairygui_TextFormat_get_verticalAlign(lua_State *L) +static int _olua_fun_fairygui_TextFormat_underline(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // bool underline + return _olua_fun_fairygui_TextFormat_underline$1(L); + } + + if (num_args == 1) { + // if ((olua_is_bool(L, 2))) { + // bool underline + return _olua_fun_fairygui_TextFormat_underline$2(L); + // } + } + + luaL_error(L, "method 'fairygui::TextFormat::underline' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_fairygui_TextFormat_verticalAlign$1(lua_State *L) { olua_startinvoke(L); @@ -4320,7 +4866,7 @@ static int _fairygui_TextFormat_get_verticalAlign(lua_State *L) return num_ret; } -static int _fairygui_TextFormat_set_verticalAlign(lua_State *L) +static int _olua_fun_fairygui_TextFormat_verticalAlign$2(lua_State *L) { olua_startinvoke(L); @@ -4338,45 +4884,73 @@ static int _fairygui_TextFormat_set_verticalAlign(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_fairygui_TextFormat(lua_State *L) +static int _olua_fun_fairygui_TextFormat_verticalAlign(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // cocos2d::TextVAlignment verticalAlign + return _olua_fun_fairygui_TextFormat_verticalAlign$1(L); + } + + if (num_args == 1) { + // if ((olua_is_enum(L, 2))) { + // cocos2d::TextVAlignment verticalAlign + return _olua_fun_fairygui_TextFormat_verticalAlign$2(L); + // } + } + + luaL_error(L, "method 'fairygui::TextFormat::verticalAlign' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_cls_fgui_TextFormat(lua_State *L) { oluacls_class(L, "fgui.TextFormat"); - oluacls_func(L, "__call", _fairygui_TextFormat___call); - oluacls_func(L, "__gc", _fairygui_TextFormat___gc); - oluacls_func(L, "__olua_move", _fairygui_TextFormat___olua_move); - oluacls_func(L, "disableEffect", _fairygui_TextFormat_disableEffect); - oluacls_func(L, "enableEffect", _fairygui_TextFormat_enableEffect); - oluacls_func(L, "hasEffect", _fairygui_TextFormat_hasEffect); - oluacls_func(L, "new", _fairygui_TextFormat_new); - oluacls_func(L, "setFormat", _fairygui_TextFormat_setFormat); - oluacls_prop(L, "align", _fairygui_TextFormat_get_align, _fairygui_TextFormat_set_align); - oluacls_prop(L, "bold", _fairygui_TextFormat_get_bold, _fairygui_TextFormat_set_bold); - oluacls_prop(L, "color", _fairygui_TextFormat_get_color, _fairygui_TextFormat_set_color); - oluacls_prop(L, "effect", _fairygui_TextFormat_get_effect, _fairygui_TextFormat_set_effect); - oluacls_prop(L, "face", _fairygui_TextFormat_get_face, _fairygui_TextFormat_set_face); - oluacls_prop(L, "fontSize", _fairygui_TextFormat_get_fontSize, _fairygui_TextFormat_set_fontSize); - oluacls_prop(L, "glowColor", _fairygui_TextFormat_get_glowColor, _fairygui_TextFormat_set_glowColor); - oluacls_prop(L, "italics", _fairygui_TextFormat_get_italics, _fairygui_TextFormat_set_italics); - oluacls_prop(L, "letterSpacing", _fairygui_TextFormat_get_letterSpacing, _fairygui_TextFormat_set_letterSpacing); - oluacls_prop(L, "lineSpacing", _fairygui_TextFormat_get_lineSpacing, _fairygui_TextFormat_set_lineSpacing); - oluacls_prop(L, "outlineColor", _fairygui_TextFormat_get_outlineColor, _fairygui_TextFormat_set_outlineColor); - oluacls_prop(L, "outlineSize", _fairygui_TextFormat_get_outlineSize, _fairygui_TextFormat_set_outlineSize); - oluacls_prop(L, "shadowBlurRadius", _fairygui_TextFormat_get_shadowBlurRadius, _fairygui_TextFormat_set_shadowBlurRadius); - oluacls_prop(L, "shadowColor", _fairygui_TextFormat_get_shadowColor, _fairygui_TextFormat_set_shadowColor); - oluacls_prop(L, "shadowOffset", _fairygui_TextFormat_get_shadowOffset, _fairygui_TextFormat_set_shadowOffset); - oluacls_prop(L, "underline", _fairygui_TextFormat_get_underline, _fairygui_TextFormat_set_underline); - oluacls_prop(L, "verticalAlign", _fairygui_TextFormat_get_verticalAlign, _fairygui_TextFormat_set_verticalAlign); + oluacls_func(L, "__gc", _olua_fun_fairygui_TextFormat___gc); + oluacls_func(L, "__olua_move", _olua_fun_fairygui_TextFormat___olua_move); + oluacls_func(L, "disableEffect", _olua_fun_fairygui_TextFormat_disableEffect); + oluacls_func(L, "enableEffect", _olua_fun_fairygui_TextFormat_enableEffect); + oluacls_func(L, "hasEffect", _olua_fun_fairygui_TextFormat_hasEffect); + oluacls_func(L, "new", _olua_fun_fairygui_TextFormat_new); + oluacls_func(L, "setFormat", _olua_fun_fairygui_TextFormat_setFormat); + oluacls_prop(L, "align", _olua_fun_fairygui_TextFormat_align, _olua_fun_fairygui_TextFormat_align); + oluacls_prop(L, "bold", _olua_fun_fairygui_TextFormat_bold, _olua_fun_fairygui_TextFormat_bold); + oluacls_prop(L, "color", _olua_fun_fairygui_TextFormat_color, _olua_fun_fairygui_TextFormat_color); + oluacls_prop(L, "effect", _olua_fun_fairygui_TextFormat_effect, _olua_fun_fairygui_TextFormat_effect); + oluacls_prop(L, "face", _olua_fun_fairygui_TextFormat_face, _olua_fun_fairygui_TextFormat_face); + oluacls_prop(L, "fontSize", _olua_fun_fairygui_TextFormat_fontSize, _olua_fun_fairygui_TextFormat_fontSize); + oluacls_prop(L, "glowColor", _olua_fun_fairygui_TextFormat_glowColor, _olua_fun_fairygui_TextFormat_glowColor); + oluacls_prop(L, "italics", _olua_fun_fairygui_TextFormat_italics, _olua_fun_fairygui_TextFormat_italics); + oluacls_prop(L, "letterSpacing", _olua_fun_fairygui_TextFormat_letterSpacing, _olua_fun_fairygui_TextFormat_letterSpacing); + oluacls_prop(L, "lineSpacing", _olua_fun_fairygui_TextFormat_lineSpacing, _olua_fun_fairygui_TextFormat_lineSpacing); + oluacls_prop(L, "outlineColor", _olua_fun_fairygui_TextFormat_outlineColor, _olua_fun_fairygui_TextFormat_outlineColor); + oluacls_prop(L, "outlineSize", _olua_fun_fairygui_TextFormat_outlineSize, _olua_fun_fairygui_TextFormat_outlineSize); + oluacls_prop(L, "shadowBlurRadius", _olua_fun_fairygui_TextFormat_shadowBlurRadius, _olua_fun_fairygui_TextFormat_shadowBlurRadius); + oluacls_prop(L, "shadowColor", _olua_fun_fairygui_TextFormat_shadowColor, _olua_fun_fairygui_TextFormat_shadowColor); + oluacls_prop(L, "shadowOffset", _olua_fun_fairygui_TextFormat_shadowOffset, _olua_fun_fairygui_TextFormat_shadowOffset); + oluacls_prop(L, "underline", _olua_fun_fairygui_TextFormat_underline, _olua_fun_fairygui_TextFormat_underline); + oluacls_prop(L, "verticalAlign", _olua_fun_fairygui_TextFormat_verticalAlign, _olua_fun_fairygui_TextFormat_verticalAlign); oluacls_const(L, "GLOW", fairygui::TextFormat::GLOW); oluacls_const(L, "OUTLINE", fairygui::TextFormat::OUTLINE); oluacls_const(L, "SHADOW", fairygui::TextFormat::SHADOW); return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_fairygui_EaseType(lua_State *L) +OLUA_LIB int luaopen_fgui_TextFormat(lua_State *L) +{ + olua_require(L, "fairygui", luaopen_fairygui); + if (!olua_getclass(L, "fgui.TextFormat")) { + luaL_error(L, "class not found: fairygui::TextFormat"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_fgui_EaseType(lua_State *L) { oluacls_class(L, "fgui.EaseType"); oluacls_func(L, "__index", olua_indexerror); @@ -4416,9 +4990,19 @@ OLUA_LIB int luaopen_fairygui_EaseType(lua_State *L) return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_fgui_EaseType(lua_State *L) +{ + olua_require(L, "fairygui", luaopen_fairygui); + if (!olua_getclass(L, "fgui.EaseType")) { + luaL_error(L, "class not found: fairygui::EaseType"); + } + return 1; +} OLUA_END_DECLS -static int _fairygui_EaseManager___gc(lua_State *L) +static int _olua_fun_fairygui_EaseManager___gc(lua_State *L) { olua_startinvoke(L); @@ -4430,7 +5014,7 @@ static int _fairygui_EaseManager___gc(lua_State *L) return 0; } -static int _fairygui_EaseManager___olua_move(lua_State *L) +static int _olua_fun_fairygui_EaseManager___olua_move(lua_State *L) { olua_startinvoke(L); @@ -4442,7 +5026,7 @@ static int _fairygui_EaseManager___olua_move(lua_State *L) return 1; } -static int _fairygui_EaseManager_evaluate(lua_State *L) +static int _olua_fun_fairygui_EaseManager_evaluate(lua_State *L) { olua_startinvoke(L); @@ -4467,20 +5051,28 @@ static int _fairygui_EaseManager_evaluate(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_fairygui_EaseManager(lua_State *L) +static int _olua_cls_fgui_EaseManager(lua_State *L) { oluacls_class(L, "fgui.EaseManager"); - oluacls_func(L, "__gc", _fairygui_EaseManager___gc); - oluacls_func(L, "__olua_move", _fairygui_EaseManager___olua_move); - oluacls_func(L, "evaluate", _fairygui_EaseManager_evaluate); + oluacls_func(L, "__gc", _olua_fun_fairygui_EaseManager___gc); + oluacls_func(L, "__olua_move", _olua_fun_fairygui_EaseManager___olua_move); + oluacls_func(L, "evaluate", _olua_fun_fairygui_EaseManager_evaluate); return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_fairygui_TweenPropType(lua_State *L) +OLUA_LIB int luaopen_fgui_EaseManager(lua_State *L) +{ + olua_require(L, "fairygui", luaopen_fairygui); + if (!olua_getclass(L, "fgui.EaseManager")) { + luaL_error(L, "class not found: fairygui::EaseManager"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_fgui_TweenPropType(lua_State *L) { oluacls_class(L, "fgui.TweenPropType"); oluacls_func(L, "__index", olua_indexerror); @@ -4501,9 +5093,19 @@ OLUA_LIB int luaopen_fairygui_TweenPropType(lua_State *L) return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_fgui_TweenPropType(lua_State *L) +{ + olua_require(L, "fairygui", luaopen_fairygui); + if (!olua_getclass(L, "fgui.TweenPropType")) { + luaL_error(L, "class not found: fairygui::TweenPropType"); + } + return 1; +} OLUA_END_DECLS -static int _fairygui_GPath___gc(lua_State *L) +static int _olua_fun_fairygui_GPath___gc(lua_State *L) { olua_startinvoke(L); @@ -4515,7 +5117,7 @@ static int _fairygui_GPath___gc(lua_State *L) return 0; } -static int _fairygui_GPath___olua_move(lua_State *L) +static int _olua_fun_fairygui_GPath___olua_move(lua_State *L) { olua_startinvoke(L); @@ -4527,62 +5129,89 @@ static int _fairygui_GPath___olua_move(lua_State *L) return 1; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_fairygui_GPath(lua_State *L) +static int _olua_cls_fgui_GPath(lua_State *L) { oluacls_class(L, "fgui.GPath"); - oluacls_func(L, "__gc", _fairygui_GPath___gc); - oluacls_func(L, "__olua_move", _fairygui_GPath___olua_move); + oluacls_func(L, "__gc", _olua_fun_fairygui_GPath___gc); + oluacls_func(L, "__olua_move", _olua_fun_fairygui_GPath___olua_move); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_fgui_GPath(lua_State *L) +{ + olua_require(L, "fairygui", luaopen_fairygui); + if (!olua_getclass(L, "fgui.GPath")) { + luaL_error(L, "class not found: fairygui::GPath"); + } return 1; } OLUA_END_DECLS -static int _fairygui_GTweener_GTweenCallback___call(lua_State *L) +static int _olua_fun_fairygui_GTweener_GTweenCallback___call(lua_State *L) { olua_startinvoke(L); luaL_checktype(L, -1, LUA_TFUNCTION); - olua_push_callback(L, (fairygui::GTweener::GTweenCallback *)nullptr, "fgui.GTweener::GTweenCallback"); + olua_push_callback(L, (fairygui::GTweener::GTweenCallback *)nullptr, "fgui.GTweener.GTweenCallback"); olua_endinvoke(L); return 1; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_fairygui_GTweener_GTweenCallback(lua_State *L) +static int _olua_cls_fgui_GTweener_GTweenCallback(lua_State *L) { - oluacls_class(L, "fgui.GTweener::GTweenCallback"); - oluacls_func(L, "__call", _fairygui_GTweener_GTweenCallback___call); + oluacls_class(L, "fgui.GTweener.GTweenCallback"); + oluacls_func(L, "__call", _olua_fun_fairygui_GTweener_GTweenCallback___call); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_fgui_GTweener_GTweenCallback(lua_State *L) +{ + olua_require(L, "fairygui", luaopen_fairygui); + if (!olua_getclass(L, "fgui.GTweener.GTweenCallback")) { + luaL_error(L, "class not found: fairygui::GTweener::GTweenCallback"); + } return 1; } OLUA_END_DECLS -static int _fairygui_GTweener_GTweenCallback0___call(lua_State *L) +static int _olua_fun_fairygui_GTweener_GTweenCallback0___call(lua_State *L) { olua_startinvoke(L); luaL_checktype(L, -1, LUA_TFUNCTION); - olua_push_callback(L, (fairygui::GTweener::GTweenCallback0 *)nullptr, "fgui.GTweener::GTweenCallback0"); + olua_push_callback(L, (fairygui::GTweener::GTweenCallback0 *)nullptr, "fgui.GTweener.GTweenCallback0"); olua_endinvoke(L); return 1; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_fairygui_GTweener_GTweenCallback0(lua_State *L) +static int _olua_cls_fgui_GTweener_GTweenCallback0(lua_State *L) { - oluacls_class(L, "fgui.GTweener::GTweenCallback0"); - oluacls_func(L, "__call", _fairygui_GTweener_GTweenCallback0___call); + oluacls_class(L, "fgui.GTweener.GTweenCallback0"); + oluacls_func(L, "__call", _olua_fun_fairygui_GTweener_GTweenCallback0___call); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_fgui_GTweener_GTweenCallback0(lua_State *L) +{ + olua_require(L, "fairygui", luaopen_fairygui); + if (!olua_getclass(L, "fgui.GTweener.GTweenCallback0")) { + luaL_error(L, "class not found: fairygui::GTweener::GTweenCallback0"); + } + return 1; +} OLUA_END_DECLS -static int _fairygui_GTweener_allCompleted(lua_State *L) +static int _olua_fun_fairygui_GTweener_allCompleted(lua_State *L) { olua_startinvoke(L); @@ -4599,7 +5228,7 @@ static int _fairygui_GTweener_allCompleted(lua_State *L) return num_ret; } -static int _fairygui_GTweener_getDelay(lua_State *L) +static int _olua_fun_fairygui_GTweener_deltaValue$1(lua_State *L) { olua_startinvoke(L); @@ -4607,39 +5236,151 @@ static int _fairygui_GTweener_getDelay(lua_State *L) olua_to_object(L, 1, &self, "fgui.GTweener"); - // float getDelay() - float ret = self->getDelay(); - int num_ret = olua_push_number(L, ret); + // fairygui::TweenValue deltaValue + fairygui::TweenValue &ret = self->deltaValue; + int num_ret = olua_copy_object(L, ret, "fgui.TweenValue"); olua_endinvoke(L); return num_ret; } -static int _fairygui_GTweener_getDuration(lua_State *L) +static int _olua_fun_fairygui_GTweener_deltaValue$2(lua_State *L) { olua_startinvoke(L); fairygui::GTweener *self = nullptr; + fairygui::TweenValue *arg1; /** deltaValue */ olua_to_object(L, 1, &self, "fgui.GTweener"); + olua_check_object(L, 2, &arg1, "fgui.TweenValue"); - // float getDuration() - float ret = self->getDuration(); - int num_ret = olua_push_number(L, ret); + // fairygui::TweenValue deltaValue + self->deltaValue = *arg1; olua_endinvoke(L); - return num_ret; + return 0; } -static int _fairygui_GTweener_getNormalizedTime(lua_State *L) +static int _olua_fun_fairygui_GTweener_deltaValue(lua_State *L) { - olua_startinvoke(L); + int num_args = lua_gettop(L) - 1; - fairygui::GTweener *self = nullptr; + if (num_args == 0) { + // fairygui::TweenValue deltaValue + return _olua_fun_fairygui_GTweener_deltaValue$1(L); + } - olua_to_object(L, 1, &self, "fgui.GTweener"); + if (num_args == 1) { + // if ((olua_is_object(L, 2, "fgui.TweenValue"))) { + // fairygui::TweenValue deltaValue + return _olua_fun_fairygui_GTweener_deltaValue$2(L); + // } + } + + luaL_error(L, "method 'fairygui::GTweener::deltaValue' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_fairygui_GTweener_endValue$1(lua_State *L) +{ + olua_startinvoke(L); + + fairygui::GTweener *self = nullptr; + + olua_to_object(L, 1, &self, "fgui.GTweener"); + + // fairygui::TweenValue endValue + fairygui::TweenValue &ret = self->endValue; + int num_ret = olua_copy_object(L, ret, "fgui.TweenValue"); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_fairygui_GTweener_endValue$2(lua_State *L) +{ + olua_startinvoke(L); + + fairygui::GTweener *self = nullptr; + fairygui::TweenValue *arg1; /** endValue */ + + olua_to_object(L, 1, &self, "fgui.GTweener"); + olua_check_object(L, 2, &arg1, "fgui.TweenValue"); + + // fairygui::TweenValue endValue + self->endValue = *arg1; + + olua_endinvoke(L); + + return 0; +} + +static int _olua_fun_fairygui_GTweener_endValue(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // fairygui::TweenValue endValue + return _olua_fun_fairygui_GTweener_endValue$1(L); + } + + if (num_args == 1) { + // if ((olua_is_object(L, 2, "fgui.TweenValue"))) { + // fairygui::TweenValue endValue + return _olua_fun_fairygui_GTweener_endValue$2(L); + // } + } + + luaL_error(L, "method 'fairygui::GTweener::endValue' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_fairygui_GTweener_getDelay(lua_State *L) +{ + olua_startinvoke(L); + + fairygui::GTweener *self = nullptr; + + olua_to_object(L, 1, &self, "fgui.GTweener"); + + // float getDelay() + float ret = self->getDelay(); + int num_ret = olua_push_number(L, ret); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_fairygui_GTweener_getDuration(lua_State *L) +{ + olua_startinvoke(L); + + fairygui::GTweener *self = nullptr; + + olua_to_object(L, 1, &self, "fgui.GTweener"); + + // float getDuration() + float ret = self->getDuration(); + int num_ret = olua_push_number(L, ret); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_fairygui_GTweener_getNormalizedTime(lua_State *L) +{ + olua_startinvoke(L); + + fairygui::GTweener *self = nullptr; + + olua_to_object(L, 1, &self, "fgui.GTweener"); // float getNormalizedTime() float ret = self->getNormalizedTime(); @@ -4650,7 +5391,7 @@ static int _fairygui_GTweener_getNormalizedTime(lua_State *L) return num_ret; } -static int _fairygui_GTweener_getRepeat(lua_State *L) +static int _olua_fun_fairygui_GTweener_getRepeat(lua_State *L) { olua_startinvoke(L); @@ -4667,7 +5408,7 @@ static int _fairygui_GTweener_getRepeat(lua_State *L) return num_ret; } -static int _fairygui_GTweener_getTarget(lua_State *L) +static int _olua_fun_fairygui_GTweener_getTarget(lua_State *L) { olua_startinvoke(L); @@ -4684,7 +5425,7 @@ static int _fairygui_GTweener_getTarget(lua_State *L) return num_ret; } -static int _fairygui_GTweener_getUserData(lua_State *L) +static int _olua_fun_fairygui_GTweener_getUserData(lua_State *L) { olua_startinvoke(L); @@ -4701,7 +5442,7 @@ static int _fairygui_GTweener_getUserData(lua_State *L) return num_ret; } -static int _fairygui_GTweener_isCompleted(lua_State *L) +static int _olua_fun_fairygui_GTweener_isCompleted(lua_State *L) { olua_startinvoke(L); @@ -4718,7 +5459,7 @@ static int _fairygui_GTweener_isCompleted(lua_State *L) return num_ret; } -static int _fairygui_GTweener_kill$1(lua_State *L) +static int _olua_fun_fairygui_GTweener_kill$1(lua_State *L) { olua_startinvoke(L); @@ -4736,7 +5477,7 @@ static int _fairygui_GTweener_kill$1(lua_State *L) return 0; } -static int _fairygui_GTweener_kill$2(lua_State *L) +static int _olua_fun_fairygui_GTweener_kill$2(lua_State *L) { olua_startinvoke(L); @@ -4744,7 +5485,7 @@ static int _fairygui_GTweener_kill$2(lua_State *L) olua_to_object(L, 1, &self, "fgui.GTweener"); - // void kill(@optional bool complete) + // void kill() self->kill(); olua_endinvoke(L); @@ -4752,19 +5493,19 @@ static int _fairygui_GTweener_kill$2(lua_State *L) return 0; } -static int _fairygui_GTweener_kill(lua_State *L) +static int _olua_fun_fairygui_GTweener_kill(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 0) { - // void kill(@optional bool complete) - return _fairygui_GTweener_kill$2(L); + // void kill() + return _olua_fun_fairygui_GTweener_kill$2(L); } if (num_args == 1) { // if ((olua_is_bool(L, 2))) { // void kill(@optional bool complete) - return _fairygui_GTweener_kill$1(L); + return _olua_fun_fairygui_GTweener_kill$1(L); // } } @@ -4773,11 +5514,11 @@ static int _fairygui_GTweener_kill(lua_State *L) return 0; } -static int _fairygui_GTweener_new(lua_State *L) +static int _olua_fun_fairygui_GTweener_new(lua_State *L) { olua_startinvoke(L); - // GTweener() + // fairygui::GTweener() fairygui::GTweener *ret = new fairygui::GTweener(); int num_ret = olua_push_object(L, ret, "fgui.GTweener"); olua_postnew(L, ret); @@ -4787,7 +5528,7 @@ static int _fairygui_GTweener_new(lua_State *L) return num_ret; } -static int _fairygui_GTweener_onComplete(lua_State *L) +static int _olua_fun_fairygui_GTweener_onComplete(lua_State *L) { olua_startinvoke(L); @@ -4795,13 +5536,14 @@ static int _fairygui_GTweener_onComplete(lua_State *L) fairygui::GTweener::GTweenCallback0 arg1; /** callback */ olua_to_object(L, 1, &self, "fgui.GTweener"); - olua_check_callback(L, 2, &arg1, "fgui.GTweener::GTweenCallback0"); + olua_check_callback(L, 2, &arg1, "fgui.GTweener.GTweenCallback0"); void *cb_store = (void *)self; std::string cb_tag = "onComplete"; - std::string cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + std::string cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx]() { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */]() { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); @@ -4823,7 +5565,7 @@ static int _fairygui_GTweener_onComplete(lua_State *L) return num_ret; } -static int _fairygui_GTweener_onComplete1(lua_State *L) +static int _olua_fun_fairygui_GTweener_onComplete1(lua_State *L) { olua_startinvoke(L); @@ -4831,19 +5573,20 @@ static int _fairygui_GTweener_onComplete1(lua_State *L) fairygui::GTweener::GTweenCallback arg1; /** callback */ olua_to_object(L, 1, &self, "fgui.GTweener"); - olua_check_callback(L, 2, &arg1, "fgui.GTweener::GTweenCallback"); + olua_check_callback(L, 2, &arg1, "fgui.GTweener.GTweenCallback"); void *cb_store = (void *)self; std::string cb_tag = "onComplete1"; - std::string cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + std::string cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](fairygui::GTweener *arg1) { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](fairygui::GTweener *cb_arg1) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); if (olua_contextequal(L, cb_ctx)) { int top = lua_gettop(L); - olua_push_object(L, arg1, "fgui.GTweener"); + olua_push_object(L, cb_arg1, "fgui.GTweener"); olua_callback(L, cb_store, cb_name.c_str(), 1); @@ -4860,7 +5603,7 @@ static int _fairygui_GTweener_onComplete1(lua_State *L) return num_ret; } -static int _fairygui_GTweener_onStart(lua_State *L) +static int _olua_fun_fairygui_GTweener_onStart(lua_State *L) { olua_startinvoke(L); @@ -4868,19 +5611,20 @@ static int _fairygui_GTweener_onStart(lua_State *L) fairygui::GTweener::GTweenCallback arg1; /** callback */ olua_to_object(L, 1, &self, "fgui.GTweener"); - olua_check_callback(L, 2, &arg1, "fgui.GTweener::GTweenCallback"); + olua_check_callback(L, 2, &arg1, "fgui.GTweener.GTweenCallback"); void *cb_store = (void *)self; std::string cb_tag = "onStart"; - std::string cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + std::string cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](fairygui::GTweener *arg1) { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](fairygui::GTweener *cb_arg1) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); if (olua_contextequal(L, cb_ctx)) { int top = lua_gettop(L); - olua_push_object(L, arg1, "fgui.GTweener"); + olua_push_object(L, cb_arg1, "fgui.GTweener"); olua_callback(L, cb_store, cb_name.c_str(), 1); @@ -4897,7 +5641,7 @@ static int _fairygui_GTweener_onStart(lua_State *L) return num_ret; } -static int _fairygui_GTweener_onUpdate(lua_State *L) +static int _olua_fun_fairygui_GTweener_onUpdate(lua_State *L) { olua_startinvoke(L); @@ -4905,19 +5649,20 @@ static int _fairygui_GTweener_onUpdate(lua_State *L) fairygui::GTweener::GTweenCallback arg1; /** callback */ olua_to_object(L, 1, &self, "fgui.GTweener"); - olua_check_callback(L, 2, &arg1, "fgui.GTweener::GTweenCallback"); + olua_check_callback(L, 2, &arg1, "fgui.GTweener.GTweenCallback"); void *cb_store = (void *)self; std::string cb_tag = "onUpdate"; - std::string cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + std::string cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](fairygui::GTweener *arg1) { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](fairygui::GTweener *cb_arg1) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); if (olua_contextequal(L, cb_ctx)) { int top = lua_gettop(L); - olua_push_object(L, arg1, "fgui.GTweener"); + olua_push_object(L, cb_arg1, "fgui.GTweener"); olua_callback(L, cb_store, cb_name.c_str(), 1); @@ -4934,7 +5679,7 @@ static int _fairygui_GTweener_onUpdate(lua_State *L) return num_ret; } -static int _fairygui_GTweener_seek(lua_State *L) +static int _olua_fun_fairygui_GTweener_seek(lua_State *L) { olua_startinvoke(L); @@ -4952,7 +5697,7 @@ static int _fairygui_GTweener_seek(lua_State *L) return 0; } -static int _fairygui_GTweener_setBreakpoint(lua_State *L) +static int _olua_fun_fairygui_GTweener_setBreakpoint(lua_State *L) { olua_startinvoke(L); @@ -4971,7 +5716,7 @@ static int _fairygui_GTweener_setBreakpoint(lua_State *L) return num_ret; } -static int _fairygui_GTweener_setDelay(lua_State *L) +static int _olua_fun_fairygui_GTweener_setDelay(lua_State *L) { olua_startinvoke(L); @@ -4990,7 +5735,7 @@ static int _fairygui_GTweener_setDelay(lua_State *L) return num_ret; } -static int _fairygui_GTweener_setDuration(lua_State *L) +static int _olua_fun_fairygui_GTweener_setDuration(lua_State *L) { olua_startinvoke(L); @@ -5009,7 +5754,7 @@ static int _fairygui_GTweener_setDuration(lua_State *L) return num_ret; } -static int _fairygui_GTweener_setEase(lua_State *L) +static int _olua_fun_fairygui_GTweener_setEase(lua_State *L) { olua_startinvoke(L); @@ -5028,7 +5773,7 @@ static int _fairygui_GTweener_setEase(lua_State *L) return num_ret; } -static int _fairygui_GTweener_setEaseOvershootOrAmplitude(lua_State *L) +static int _olua_fun_fairygui_GTweener_setEaseOvershootOrAmplitude(lua_State *L) { olua_startinvoke(L); @@ -5047,7 +5792,7 @@ static int _fairygui_GTweener_setEaseOvershootOrAmplitude(lua_State *L) return num_ret; } -static int _fairygui_GTweener_setEasePeriod(lua_State *L) +static int _olua_fun_fairygui_GTweener_setEasePeriod(lua_State *L) { olua_startinvoke(L); @@ -5066,7 +5811,7 @@ static int _fairygui_GTweener_setEasePeriod(lua_State *L) return num_ret; } -static int _fairygui_GTweener_setPath(lua_State *L) +static int _olua_fun_fairygui_GTweener_setPath(lua_State *L) { olua_startinvoke(L); @@ -5085,7 +5830,7 @@ static int _fairygui_GTweener_setPath(lua_State *L) return num_ret; } -static int _fairygui_GTweener_setPaused(lua_State *L) +static int _olua_fun_fairygui_GTweener_setPaused(lua_State *L) { olua_startinvoke(L); @@ -5104,19 +5849,19 @@ static int _fairygui_GTweener_setPaused(lua_State *L) return num_ret; } -static int _fairygui_GTweener_setRepeat$1(lua_State *L) +static int _olua_fun_fairygui_GTweener_setRepeat$1(lua_State *L) { olua_startinvoke(L); fairygui::GTweener *self = nullptr; - int arg1 = 0; /** repeat */ + int arg1 = 0; /** repeat_ */ bool arg2 = false; /** yoyo */ olua_to_object(L, 1, &self, "fgui.GTweener"); olua_check_integer(L, 2, &arg1); olua_check_bool(L, 3, &arg2); - // fairygui::GTweener *setRepeat(int repeat, @optional bool yoyo) + // fairygui::GTweener *setRepeat(int repeat_, @optional bool yoyo) fairygui::GTweener *ret = self->setRepeat(arg1, arg2); int num_ret = olua_push_object(L, ret, "fgui.GTweener"); @@ -5125,17 +5870,17 @@ static int _fairygui_GTweener_setRepeat$1(lua_State *L) return num_ret; } -static int _fairygui_GTweener_setRepeat$2(lua_State *L) +static int _olua_fun_fairygui_GTweener_setRepeat$2(lua_State *L) { olua_startinvoke(L); fairygui::GTweener *self = nullptr; - int arg1 = 0; /** repeat */ + int arg1 = 0; /** repeat_ */ olua_to_object(L, 1, &self, "fgui.GTweener"); olua_check_integer(L, 2, &arg1); - // fairygui::GTweener *setRepeat(int repeat, @optional bool yoyo) + // fairygui::GTweener *setRepeat(int repeat_) fairygui::GTweener *ret = self->setRepeat(arg1); int num_ret = olua_push_object(L, ret, "fgui.GTweener"); @@ -5144,21 +5889,21 @@ static int _fairygui_GTweener_setRepeat$2(lua_State *L) return num_ret; } -static int _fairygui_GTweener_setRepeat(lua_State *L) +static int _olua_fun_fairygui_GTweener_setRepeat(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_integer(L, 2))) { - // fairygui::GTweener *setRepeat(int repeat, @optional bool yoyo) - return _fairygui_GTweener_setRepeat$2(L); + // fairygui::GTweener *setRepeat(int repeat_) + return _olua_fun_fairygui_GTweener_setRepeat$2(L); // } } if (num_args == 2) { // if ((olua_is_integer(L, 2)) && (olua_is_bool(L, 3))) { - // fairygui::GTweener *setRepeat(int repeat, @optional bool yoyo) - return _fairygui_GTweener_setRepeat$1(L); + // fairygui::GTweener *setRepeat(int repeat_, @optional bool yoyo) + return _olua_fun_fairygui_GTweener_setRepeat$1(L); // } } @@ -5167,7 +5912,7 @@ static int _fairygui_GTweener_setRepeat(lua_State *L) return 0; } -static int _fairygui_GTweener_setSnapping(lua_State *L) +static int _olua_fun_fairygui_GTweener_setSnapping(lua_State *L) { olua_startinvoke(L); @@ -5186,7 +5931,7 @@ static int _fairygui_GTweener_setSnapping(lua_State *L) return num_ret; } -static int _fairygui_GTweener_setTarget$1(lua_State *L) +static int _olua_fun_fairygui_GTweener_setTarget$1(lua_State *L) { olua_startinvoke(L); @@ -5205,7 +5950,7 @@ static int _fairygui_GTweener_setTarget$1(lua_State *L) return num_ret; } -static int _fairygui_GTweener_setTarget$2(lua_State *L) +static int _olua_fun_fairygui_GTweener_setTarget$2(lua_State *L) { olua_startinvoke(L); @@ -5226,21 +5971,21 @@ static int _fairygui_GTweener_setTarget$2(lua_State *L) return num_ret; } -static int _fairygui_GTweener_setTarget(lua_State *L) +static int _olua_fun_fairygui_GTweener_setTarget(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_object(L, 2, "cc.Ref"))) { // fairygui::GTweener *setTarget(cocos2d::Ref *target) - return _fairygui_GTweener_setTarget$1(L); + return _olua_fun_fairygui_GTweener_setTarget$1(L); // } } if (num_args == 2) { // if ((olua_is_object(L, 2, "cc.Ref")) && (olua_is_enum(L, 3))) { // fairygui::GTweener *setTarget(cocos2d::Ref *target, fairygui::TweenPropType propType) - return _fairygui_GTweener_setTarget$2(L); + return _olua_fun_fairygui_GTweener_setTarget$2(L); // } } @@ -5249,7 +5994,7 @@ static int _fairygui_GTweener_setTarget(lua_State *L) return 0; } -static int _fairygui_GTweener_setTargetAny(lua_State *L) +static int _olua_fun_fairygui_GTweener_setTargetAny(lua_State *L) { olua_startinvoke(L); @@ -5268,7 +6013,7 @@ static int _fairygui_GTweener_setTargetAny(lua_State *L) return num_ret; } -static int _fairygui_GTweener_setTimeScale(lua_State *L) +static int _olua_fun_fairygui_GTweener_setTimeScale(lua_State *L) { olua_startinvoke(L); @@ -5287,7 +6032,7 @@ static int _fairygui_GTweener_setTimeScale(lua_State *L) return num_ret; } -static int _fairygui_GTweener_setUserData(lua_State *L) +static int _olua_fun_fairygui_GTweener_setUserData(lua_State *L) { olua_startinvoke(L); @@ -5306,7 +6051,7 @@ static int _fairygui_GTweener_setUserData(lua_State *L) return num_ret; } -static int _fairygui_GTweener_get_deltaValue(lua_State *L) +static int _olua_fun_fairygui_GTweener_startValue$1(lua_State *L) { olua_startinvoke(L); @@ -5314,69 +6059,55 @@ static int _fairygui_GTweener_get_deltaValue(lua_State *L) olua_to_object(L, 1, &self, "fgui.GTweener"); - // fairygui::TweenValue deltaValue - fairygui::TweenValue &ret = self->deltaValue; - int num_ret = olua_pushcopy_object(L, ret, "fgui.TweenValue"); + // fairygui::TweenValue startValue + fairygui::TweenValue &ret = self->startValue; + int num_ret = olua_copy_object(L, ret, "fgui.TweenValue"); olua_endinvoke(L); return num_ret; } -static int _fairygui_GTweener_set_deltaValue(lua_State *L) +static int _olua_fun_fairygui_GTweener_startValue$2(lua_State *L) { olua_startinvoke(L); fairygui::GTweener *self = nullptr; - fairygui::TweenValue arg1; /** deltaValue */ + fairygui::TweenValue *arg1; /** startValue */ olua_to_object(L, 1, &self, "fgui.GTweener"); olua_check_object(L, 2, &arg1, "fgui.TweenValue"); - // fairygui::TweenValue deltaValue - self->deltaValue = arg1; + // fairygui::TweenValue startValue + self->startValue = *arg1; olua_endinvoke(L); return 0; } -static int _fairygui_GTweener_get_endValue(lua_State *L) -{ - olua_startinvoke(L); - - fairygui::GTweener *self = nullptr; - - olua_to_object(L, 1, &self, "fgui.GTweener"); - - // fairygui::TweenValue endValue - fairygui::TweenValue &ret = self->endValue; - int num_ret = olua_pushcopy_object(L, ret, "fgui.TweenValue"); - - olua_endinvoke(L); - - return num_ret; -} - -static int _fairygui_GTweener_set_endValue(lua_State *L) +static int _olua_fun_fairygui_GTweener_startValue(lua_State *L) { - olua_startinvoke(L); - - fairygui::GTweener *self = nullptr; - fairygui::TweenValue arg1; /** endValue */ + int num_args = lua_gettop(L) - 1; - olua_to_object(L, 1, &self, "fgui.GTweener"); - olua_check_object(L, 2, &arg1, "fgui.TweenValue"); + if (num_args == 0) { + // fairygui::TweenValue startValue + return _olua_fun_fairygui_GTweener_startValue$1(L); + } - // fairygui::TweenValue endValue - self->endValue = arg1; + if (num_args == 1) { + // if ((olua_is_object(L, 2, "fgui.TweenValue"))) { + // fairygui::TweenValue startValue + return _olua_fun_fairygui_GTweener_startValue$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'fairygui::GTweener::startValue' not support '%d' arguments", num_args); return 0; } -static int _fairygui_GTweener_get_startValue(lua_State *L) +static int _olua_fun_fairygui_GTweener_value$1(lua_State *L) { olua_startinvoke(L); @@ -5384,113 +6115,108 @@ static int _fairygui_GTweener_get_startValue(lua_State *L) olua_to_object(L, 1, &self, "fgui.GTweener"); - // fairygui::TweenValue startValue - fairygui::TweenValue &ret = self->startValue; - int num_ret = olua_pushcopy_object(L, ret, "fgui.TweenValue"); + // fairygui::TweenValue value + fairygui::TweenValue &ret = self->value; + int num_ret = olua_copy_object(L, ret, "fgui.TweenValue"); olua_endinvoke(L); return num_ret; } -static int _fairygui_GTweener_set_startValue(lua_State *L) +static int _olua_fun_fairygui_GTweener_value$2(lua_State *L) { olua_startinvoke(L); fairygui::GTweener *self = nullptr; - fairygui::TweenValue arg1; /** startValue */ + fairygui::TweenValue *arg1; /** value */ olua_to_object(L, 1, &self, "fgui.GTweener"); olua_check_object(L, 2, &arg1, "fgui.TweenValue"); - // fairygui::TweenValue startValue - self->startValue = arg1; + // fairygui::TweenValue value + self->value = *arg1; olua_endinvoke(L); return 0; } -static int _fairygui_GTweener_get_value(lua_State *L) +static int _olua_fun_fairygui_GTweener_value(lua_State *L) { - olua_startinvoke(L); - - fairygui::GTweener *self = nullptr; + int num_args = lua_gettop(L) - 1; - olua_to_object(L, 1, &self, "fgui.GTweener"); + if (num_args == 0) { + // fairygui::TweenValue value + return _olua_fun_fairygui_GTweener_value$1(L); + } - // fairygui::TweenValue value - fairygui::TweenValue &ret = self->value; - int num_ret = olua_pushcopy_object(L, ret, "fgui.TweenValue"); + if (num_args == 1) { + // if ((olua_is_object(L, 2, "fgui.TweenValue"))) { + // fairygui::TweenValue value + return _olua_fun_fairygui_GTweener_value$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'fairygui::GTweener::value' not support '%d' arguments", num_args); - return num_ret; + return 0; } -static int _fairygui_GTweener_set_value(lua_State *L) +static int _olua_cls_fgui_GTweener(lua_State *L) { - olua_startinvoke(L); - - fairygui::GTweener *self = nullptr; - fairygui::TweenValue arg1; /** value */ - - olua_to_object(L, 1, &self, "fgui.GTweener"); - olua_check_object(L, 2, &arg1, "fgui.TweenValue"); - - // fairygui::TweenValue value - self->value = arg1; - - olua_endinvoke(L); + oluacls_class(L, "fgui.GTweener"); + oluacls_func(L, "allCompleted", _olua_fun_fairygui_GTweener_allCompleted); + oluacls_func(L, "getDelay", _olua_fun_fairygui_GTweener_getDelay); + oluacls_func(L, "getDuration", _olua_fun_fairygui_GTweener_getDuration); + oluacls_func(L, "getNormalizedTime", _olua_fun_fairygui_GTweener_getNormalizedTime); + oluacls_func(L, "getRepeat", _olua_fun_fairygui_GTweener_getRepeat); + oluacls_func(L, "getTarget", _olua_fun_fairygui_GTweener_getTarget); + oluacls_func(L, "getUserData", _olua_fun_fairygui_GTweener_getUserData); + oluacls_func(L, "isCompleted", _olua_fun_fairygui_GTweener_isCompleted); + oluacls_func(L, "kill", _olua_fun_fairygui_GTweener_kill); + oluacls_func(L, "new", _olua_fun_fairygui_GTweener_new); + oluacls_func(L, "onComplete", _olua_fun_fairygui_GTweener_onComplete); + oluacls_func(L, "onComplete1", _olua_fun_fairygui_GTweener_onComplete1); + oluacls_func(L, "onStart", _olua_fun_fairygui_GTweener_onStart); + oluacls_func(L, "onUpdate", _olua_fun_fairygui_GTweener_onUpdate); + oluacls_func(L, "seek", _olua_fun_fairygui_GTweener_seek); + oluacls_func(L, "setBreakpoint", _olua_fun_fairygui_GTweener_setBreakpoint); + oluacls_func(L, "setDelay", _olua_fun_fairygui_GTweener_setDelay); + oluacls_func(L, "setDuration", _olua_fun_fairygui_GTweener_setDuration); + oluacls_func(L, "setEase", _olua_fun_fairygui_GTweener_setEase); + oluacls_func(L, "setEaseOvershootOrAmplitude", _olua_fun_fairygui_GTweener_setEaseOvershootOrAmplitude); + oluacls_func(L, "setEasePeriod", _olua_fun_fairygui_GTweener_setEasePeriod); + oluacls_func(L, "setPath", _olua_fun_fairygui_GTweener_setPath); + oluacls_func(L, "setPaused", _olua_fun_fairygui_GTweener_setPaused); + oluacls_func(L, "setRepeat", _olua_fun_fairygui_GTweener_setRepeat); + oluacls_func(L, "setSnapping", _olua_fun_fairygui_GTweener_setSnapping); + oluacls_func(L, "setTarget", _olua_fun_fairygui_GTweener_setTarget); + oluacls_func(L, "setTargetAny", _olua_fun_fairygui_GTweener_setTargetAny); + oluacls_func(L, "setTimeScale", _olua_fun_fairygui_GTweener_setTimeScale); + oluacls_func(L, "setUserData", _olua_fun_fairygui_GTweener_setUserData); + oluacls_prop(L, "completed", _olua_fun_fairygui_GTweener_isCompleted, nullptr); + oluacls_prop(L, "delay", _olua_fun_fairygui_GTweener_getDelay, _olua_fun_fairygui_GTweener_setDelay); + oluacls_prop(L, "duration", _olua_fun_fairygui_GTweener_getDuration, _olua_fun_fairygui_GTweener_setDuration); + oluacls_prop(L, "normalizedTime", _olua_fun_fairygui_GTweener_getNormalizedTime, nullptr); + oluacls_prop(L, "repeat", _olua_fun_fairygui_GTweener_getRepeat, nullptr); + oluacls_prop(L, "target", _olua_fun_fairygui_GTweener_getTarget, nullptr); + oluacls_prop(L, "userData", _olua_fun_fairygui_GTweener_getUserData, _olua_fun_fairygui_GTweener_setUserData); + oluacls_prop(L, "deltaValue", _olua_fun_fairygui_GTweener_deltaValue, _olua_fun_fairygui_GTweener_deltaValue); + oluacls_prop(L, "endValue", _olua_fun_fairygui_GTweener_endValue, _olua_fun_fairygui_GTweener_endValue); + oluacls_prop(L, "startValue", _olua_fun_fairygui_GTweener_startValue, _olua_fun_fairygui_GTweener_startValue); + oluacls_prop(L, "value", _olua_fun_fairygui_GTweener_value, _olua_fun_fairygui_GTweener_value); - return 0; + return 1; } OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_fairygui_GTweener(lua_State *L) +OLUA_LIB int luaopen_fgui_GTweener(lua_State *L) { - oluacls_class(L, "fgui.GTweener"); - oluacls_func(L, "allCompleted", _fairygui_GTweener_allCompleted); - oluacls_func(L, "getDelay", _fairygui_GTweener_getDelay); - oluacls_func(L, "getDuration", _fairygui_GTweener_getDuration); - oluacls_func(L, "getNormalizedTime", _fairygui_GTweener_getNormalizedTime); - oluacls_func(L, "getRepeat", _fairygui_GTweener_getRepeat); - oluacls_func(L, "getTarget", _fairygui_GTweener_getTarget); - oluacls_func(L, "getUserData", _fairygui_GTweener_getUserData); - oluacls_func(L, "isCompleted", _fairygui_GTweener_isCompleted); - oluacls_func(L, "kill", _fairygui_GTweener_kill); - oluacls_func(L, "new", _fairygui_GTweener_new); - oluacls_func(L, "onComplete", _fairygui_GTweener_onComplete); - oluacls_func(L, "onComplete1", _fairygui_GTweener_onComplete1); - oluacls_func(L, "onStart", _fairygui_GTweener_onStart); - oluacls_func(L, "onUpdate", _fairygui_GTweener_onUpdate); - oluacls_func(L, "seek", _fairygui_GTweener_seek); - oluacls_func(L, "setBreakpoint", _fairygui_GTweener_setBreakpoint); - oluacls_func(L, "setDelay", _fairygui_GTweener_setDelay); - oluacls_func(L, "setDuration", _fairygui_GTweener_setDuration); - oluacls_func(L, "setEase", _fairygui_GTweener_setEase); - oluacls_func(L, "setEaseOvershootOrAmplitude", _fairygui_GTweener_setEaseOvershootOrAmplitude); - oluacls_func(L, "setEasePeriod", _fairygui_GTweener_setEasePeriod); - oluacls_func(L, "setPath", _fairygui_GTweener_setPath); - oluacls_func(L, "setPaused", _fairygui_GTweener_setPaused); - oluacls_func(L, "setRepeat", _fairygui_GTweener_setRepeat); - oluacls_func(L, "setSnapping", _fairygui_GTweener_setSnapping); - oluacls_func(L, "setTarget", _fairygui_GTweener_setTarget); - oluacls_func(L, "setTargetAny", _fairygui_GTweener_setTargetAny); - oluacls_func(L, "setTimeScale", _fairygui_GTweener_setTimeScale); - oluacls_func(L, "setUserData", _fairygui_GTweener_setUserData); - oluacls_prop(L, "completed", _fairygui_GTweener_isCompleted, nullptr); - oluacls_prop(L, "delay", _fairygui_GTweener_getDelay, _fairygui_GTweener_setDelay); - oluacls_prop(L, "duration", _fairygui_GTweener_getDuration, _fairygui_GTweener_setDuration); - oluacls_prop(L, "normalizedTime", _fairygui_GTweener_getNormalizedTime, nullptr); - oluacls_prop(L, "repeat", _fairygui_GTweener_getRepeat, _fairygui_GTweener_setRepeat); - oluacls_prop(L, "target", _fairygui_GTweener_getTarget, _fairygui_GTweener_setTarget); - oluacls_prop(L, "userData", _fairygui_GTweener_getUserData, _fairygui_GTweener_setUserData); - oluacls_prop(L, "deltaValue", _fairygui_GTweener_get_deltaValue, _fairygui_GTweener_set_deltaValue); - oluacls_prop(L, "endValue", _fairygui_GTweener_get_endValue, _fairygui_GTweener_set_endValue); - oluacls_prop(L, "startValue", _fairygui_GTweener_get_startValue, _fairygui_GTweener_set_startValue); - oluacls_prop(L, "value", _fairygui_GTweener_get_value, _fairygui_GTweener_set_value); - + olua_require(L, "fairygui", luaopen_fairygui); + if (!olua_getclass(L, "fgui.GTweener")) { + luaL_error(L, "class not found: fairygui::GTweener"); + } return 1; } OLUA_END_DECLS @@ -5506,7 +6232,7 @@ static bool should_del_tweener_ref(lua_State *L, int idx) return false; } -static int _fairygui_GTween___gc(lua_State *L) +static int _olua_fun_fairygui_GTween___gc(lua_State *L) { olua_startinvoke(L); @@ -5518,7 +6244,7 @@ static int _fairygui_GTween___gc(lua_State *L) return 0; } -static int _fairygui_GTween___olua_move(lua_State *L) +static int _olua_fun_fairygui_GTween___olua_move(lua_State *L) { olua_startinvoke(L); @@ -5530,7 +6256,7 @@ static int _fairygui_GTween___olua_move(lua_State *L) return 1; } -static int _fairygui_GTween_clean(lua_State *L) +static int _olua_fun_fairygui_GTween_clean(lua_State *L) { olua_startinvoke(L); @@ -5547,7 +6273,7 @@ static int _fairygui_GTween_clean(lua_State *L) return 0; } -static int _fairygui_GTween_delayedCall(lua_State *L) +static int _olua_fun_fairygui_GTween_delayedCall(lua_State *L) { olua_startinvoke(L); @@ -5570,7 +6296,7 @@ static int _fairygui_GTween_delayedCall(lua_State *L) return num_ret; } -static int _fairygui_GTween_getTween$1(lua_State *L) +static int _olua_fun_fairygui_GTween_getTween$1(lua_State *L) { olua_startinvoke(L); @@ -5587,7 +6313,7 @@ static int _fairygui_GTween_getTween$1(lua_State *L) return num_ret; } -static int _fairygui_GTween_getTween$2(lua_State *L) +static int _olua_fun_fairygui_GTween_getTween$2(lua_State *L) { olua_startinvoke(L); @@ -5606,21 +6332,21 @@ static int _fairygui_GTween_getTween$2(lua_State *L) return num_ret; } -static int _fairygui_GTween_getTween(lua_State *L) +static int _olua_fun_fairygui_GTween_getTween(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 1) { // if ((olua_is_object(L, 1, "cc.Ref"))) { // static fairygui::GTweener *getTween(cocos2d::Ref *target) - return _fairygui_GTween_getTween$1(L); + return _olua_fun_fairygui_GTween_getTween$1(L); // } } if (num_args == 2) { // if ((olua_is_object(L, 1, "cc.Ref")) && (olua_is_enum(L, 2))) { // static fairygui::GTweener *getTween(cocos2d::Ref *target, fairygui::TweenPropType propType) - return _fairygui_GTween_getTween$2(L); + return _olua_fun_fairygui_GTween_getTween$2(L); // } } @@ -5629,7 +6355,7 @@ static int _fairygui_GTween_getTween(lua_State *L) return 0; } -static int _fairygui_GTween_isTweening$1(lua_State *L) +static int _olua_fun_fairygui_GTween_isTweening$1(lua_State *L) { olua_startinvoke(L); @@ -5646,7 +6372,7 @@ static int _fairygui_GTween_isTweening$1(lua_State *L) return num_ret; } -static int _fairygui_GTween_isTweening$2(lua_State *L) +static int _olua_fun_fairygui_GTween_isTweening$2(lua_State *L) { olua_startinvoke(L); @@ -5665,21 +6391,21 @@ static int _fairygui_GTween_isTweening$2(lua_State *L) return num_ret; } -static int _fairygui_GTween_isTweening(lua_State *L) +static int _olua_fun_fairygui_GTween_isTweening(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 1) { // if ((olua_is_object(L, 1, "cc.Ref"))) { // static bool isTweening(cocos2d::Ref *target) - return _fairygui_GTween_isTweening$1(L); + return _olua_fun_fairygui_GTween_isTweening$1(L); // } } if (num_args == 2) { // if ((olua_is_object(L, 1, "cc.Ref")) && (olua_is_enum(L, 2))) { // static bool isTweening(cocos2d::Ref *target, fairygui::TweenPropType propType) - return _fairygui_GTween_isTweening$2(L); + return _olua_fun_fairygui_GTween_isTweening$2(L); // } } @@ -5688,7 +6414,7 @@ static int _fairygui_GTween_isTweening(lua_State *L) return 0; } -static int _fairygui_GTween_kill$1(lua_State *L) +static int _olua_fun_fairygui_GTween_kill$1(lua_State *L) { olua_startinvoke(L); @@ -5709,7 +6435,7 @@ static int _fairygui_GTween_kill$1(lua_State *L) return 0; } -static int _fairygui_GTween_kill$2(lua_State *L) +static int _olua_fun_fairygui_GTween_kill$2(lua_State *L) { olua_startinvoke(L); @@ -5732,7 +6458,7 @@ static int _fairygui_GTween_kill$2(lua_State *L) return 0; } -static int _fairygui_GTween_kill$3(lua_State *L) +static int _olua_fun_fairygui_GTween_kill$3(lua_State *L) { olua_startinvoke(L); @@ -5757,28 +6483,28 @@ static int _fairygui_GTween_kill$3(lua_State *L) return 0; } -static int _fairygui_GTween_kill(lua_State *L) +static int _olua_fun_fairygui_GTween_kill(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 1) { // if ((olua_is_object(L, 1, "cc.Ref"))) { // static void kill(cocos2d::Ref *target) - return _fairygui_GTween_kill$1(L); + return _olua_fun_fairygui_GTween_kill$1(L); // } } if (num_args == 2) { // if ((olua_is_object(L, 1, "cc.Ref")) && (olua_is_bool(L, 2))) { // static void kill(cocos2d::Ref *target, bool complete) - return _fairygui_GTween_kill$2(L); + return _olua_fun_fairygui_GTween_kill$2(L); // } } if (num_args == 3) { // if ((olua_is_object(L, 1, "cc.Ref")) && (olua_is_enum(L, 2)) && (olua_is_bool(L, 3))) { // static void kill(cocos2d::Ref *target, fairygui::TweenPropType propType, bool complete) - return _fairygui_GTween_kill$3(L); + return _olua_fun_fairygui_GTween_kill$3(L); // } } @@ -5787,11 +6513,11 @@ static int _fairygui_GTween_kill(lua_State *L) return 0; } -static int _fairygui_GTween_shake(lua_State *L) +static int _olua_fun_fairygui_GTween_shake(lua_State *L) { olua_startinvoke(L); - cocos2d::Vec2 arg1; /** startValue */ + cocos2d::Vec2 *arg1; /** startValue */ float arg2 = 0; /** amplitude */ float arg3 = 0; /** duration */ @@ -5800,7 +6526,7 @@ static int _fairygui_GTween_shake(lua_State *L) olua_check_number(L, 3, &arg3); // static fairygui::GTweener *shake(const cocos2d::Vec2 &startValue, float amplitude, float duration) - fairygui::GTweener *ret = fairygui::GTween::shake(arg1, arg2, arg3); + fairygui::GTweener *ret = fairygui::GTween::shake(*arg1, arg2, arg3); int num_ret = olua_push_object(L, ret, "fgui.GTweener"); // insert code after call @@ -5814,7 +6540,7 @@ static int _fairygui_GTween_shake(lua_State *L) return num_ret; } -static int _fairygui_GTween_to$1(lua_State *L) +static int _olua_fun_fairygui_GTween_to$1(lua_State *L) { olua_startinvoke(L); @@ -5841,12 +6567,12 @@ static int _fairygui_GTween_to$1(lua_State *L) return num_ret; } -static int _fairygui_GTween_to$2(lua_State *L) +static int _olua_fun_fairygui_GTween_to$2(lua_State *L) { olua_startinvoke(L); - cocos2d::Vec2 arg1; /** startValue */ - cocos2d::Vec2 arg2; /** endValue */ + cocos2d::Vec2 *arg1; /** startValue */ + cocos2d::Vec2 *arg2; /** endValue */ float arg3 = 0; /** duration */ olua_check_object(L, 1, &arg1, "cc.Vec2"); @@ -5854,7 +6580,7 @@ static int _fairygui_GTween_to$2(lua_State *L) olua_check_number(L, 3, &arg3); // static fairygui::GTweener *to(const cocos2d::Vec2 &startValue, const cocos2d::Vec2 &endValue, float duration) - fairygui::GTweener *ret = fairygui::GTween::to(arg1, arg2, arg3); + fairygui::GTweener *ret = fairygui::GTween::to(*arg1, *arg2, arg3); int num_ret = olua_push_object(L, ret, "fgui.GTweener"); // insert code after call @@ -5868,12 +6594,12 @@ static int _fairygui_GTween_to$2(lua_State *L) return num_ret; } -static int _fairygui_GTween_to$3(lua_State *L) +static int _olua_fun_fairygui_GTween_to$3(lua_State *L) { olua_startinvoke(L); - cocos2d::Vec3 arg1; /** startValue */ - cocos2d::Vec3 arg2; /** endValue */ + cocos2d::Vec3 *arg1; /** startValue */ + cocos2d::Vec3 *arg2; /** endValue */ float arg3 = 0; /** duration */ olua_check_object(L, 1, &arg1, "cc.Vec3"); @@ -5881,7 +6607,7 @@ static int _fairygui_GTween_to$3(lua_State *L) olua_check_number(L, 3, &arg3); // static fairygui::GTweener *to(const cocos2d::Vec3 &startValue, const cocos2d::Vec3 &endValue, float duration) - fairygui::GTweener *ret = fairygui::GTween::to(arg1, arg2, arg3); + fairygui::GTweener *ret = fairygui::GTween::to(*arg1, *arg2, arg3); int num_ret = olua_push_object(L, ret, "fgui.GTweener"); // insert code after call @@ -5895,12 +6621,12 @@ static int _fairygui_GTween_to$3(lua_State *L) return num_ret; } -static int _fairygui_GTween_to$4(lua_State *L) +static int _olua_fun_fairygui_GTween_to$4(lua_State *L) { olua_startinvoke(L); - cocos2d::Vec4 arg1; /** startValue */ - cocos2d::Vec4 arg2; /** endValue */ + cocos2d::Vec4 *arg1; /** startValue */ + cocos2d::Vec4 *arg2; /** endValue */ float arg3 = 0; /** duration */ olua_check_object(L, 1, &arg1, "cc.Vec4"); @@ -5908,7 +6634,7 @@ static int _fairygui_GTween_to$4(lua_State *L) olua_check_number(L, 3, &arg3); // static fairygui::GTweener *to(const cocos2d::Vec4 &startValue, const cocos2d::Vec4 &endValue, float duration) - fairygui::GTweener *ret = fairygui::GTween::to(arg1, arg2, arg3); + fairygui::GTweener *ret = fairygui::GTween::to(*arg1, *arg2, arg3); int num_ret = olua_push_object(L, ret, "fgui.GTweener"); // insert code after call @@ -5922,7 +6648,7 @@ static int _fairygui_GTween_to$4(lua_State *L) return num_ret; } -static int _fairygui_GTween_to$5(lua_State *L) +static int _olua_fun_fairygui_GTween_to$5(lua_State *L) { olua_startinvoke(L); @@ -5949,34 +6675,34 @@ static int _fairygui_GTween_to$5(lua_State *L) return num_ret; } -static int _fairygui_GTween_to(lua_State *L) +static int _olua_fun_fairygui_GTween_to(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 3) { if ((olua_is_object(L, 1, "cc.Vec4")) && (olua_is_object(L, 2, "cc.Vec4")) && (olua_is_number(L, 3))) { // static fairygui::GTweener *to(const cocos2d::Vec4 &startValue, const cocos2d::Vec4 &endValue, float duration) - return _fairygui_GTween_to$4(L); + return _olua_fun_fairygui_GTween_to$4(L); } if ((olua_is_object(L, 1, "cc.Vec3")) && (olua_is_object(L, 2, "cc.Vec3")) && (olua_is_number(L, 3))) { // static fairygui::GTweener *to(const cocos2d::Vec3 &startValue, const cocos2d::Vec3 &endValue, float duration) - return _fairygui_GTween_to$3(L); + return _olua_fun_fairygui_GTween_to$3(L); } if ((olua_is_object(L, 1, "cc.Vec2")) && (olua_is_object(L, 2, "cc.Vec2")) && (olua_is_number(L, 3))) { // static fairygui::GTweener *to(const cocos2d::Vec2 &startValue, const cocos2d::Vec2 &endValue, float duration) - return _fairygui_GTween_to$2(L); + return _olua_fun_fairygui_GTween_to$2(L); } if ((olua_is_number(L, 1)) && (olua_is_number(L, 2)) && (olua_is_number(L, 3))) { // static fairygui::GTweener *to(float startValue, float endValue, float duration) - return _fairygui_GTween_to$1(L); + return _olua_fun_fairygui_GTween_to$1(L); } // if ((olua_is_cocos2d_Color4B(L, 1)) && (olua_is_cocos2d_Color4B(L, 2)) && (olua_is_number(L, 3))) { // static fairygui::GTweener *to(const cocos2d::Color4B &startValue, const cocos2d::Color4B &endValue, float duration) - return _fairygui_GTween_to$5(L); + return _olua_fun_fairygui_GTween_to$5(L); // } } @@ -5985,7 +6711,7 @@ static int _fairygui_GTween_to(lua_State *L) return 0; } -static int _fairygui_GTween_toColor(lua_State *L) +static int _olua_fun_fairygui_GTween_toColor(lua_State *L) { olua_startinvoke(L); @@ -6012,7 +6738,7 @@ static int _fairygui_GTween_toColor(lua_State *L) return num_ret; } -static int _fairygui_GTween_toDouble(lua_State *L) +static int _olua_fun_fairygui_GTween_toDouble(lua_State *L) { olua_startinvoke(L); @@ -6039,27 +6765,36 @@ static int _fairygui_GTween_toDouble(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_fairygui_GTween(lua_State *L) +static int _olua_cls_fgui_GTween(lua_State *L) { oluacls_class(L, "fgui.GTween"); - oluacls_func(L, "__gc", _fairygui_GTween___gc); - oluacls_func(L, "__olua_move", _fairygui_GTween___olua_move); - oluacls_func(L, "clean", _fairygui_GTween_clean); - oluacls_func(L, "delayedCall", _fairygui_GTween_delayedCall); - oluacls_func(L, "getTween", _fairygui_GTween_getTween); - oluacls_func(L, "isTweening", _fairygui_GTween_isTweening); - oluacls_func(L, "kill", _fairygui_GTween_kill); - oluacls_func(L, "shake", _fairygui_GTween_shake); - oluacls_func(L, "to", _fairygui_GTween_to); - oluacls_func(L, "toColor", _fairygui_GTween_toColor); - oluacls_func(L, "toDouble", _fairygui_GTween_toDouble); + oluacls_func(L, "__gc", _olua_fun_fairygui_GTween___gc); + oluacls_func(L, "__olua_move", _olua_fun_fairygui_GTween___olua_move); + oluacls_func(L, "clean", _olua_fun_fairygui_GTween_clean); + oluacls_func(L, "delayedCall", _olua_fun_fairygui_GTween_delayedCall); + oluacls_func(L, "getTween", _olua_fun_fairygui_GTween_getTween); + oluacls_func(L, "isTweening", _olua_fun_fairygui_GTween_isTweening); + oluacls_func(L, "kill", _olua_fun_fairygui_GTween_kill); + oluacls_func(L, "shake", _olua_fun_fairygui_GTween_shake); + oluacls_func(L, "to", _olua_fun_fairygui_GTween_to); + oluacls_func(L, "toColor", _olua_fun_fairygui_GTween_toColor); + oluacls_func(L, "toDouble", _olua_fun_fairygui_GTween_toDouble); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_fgui_GTween(lua_State *L) +{ + olua_require(L, "fairygui", luaopen_fairygui); + if (!olua_getclass(L, "fgui.GTween")) { + luaL_error(L, "class not found: fairygui::GTween"); + } return 1; } OLUA_END_DECLS -static int _fairygui_UIPackage_addPackage(lua_State *L) +static int _olua_fun_fairygui_UIPackage_addPackage(lua_State *L) { olua_startinvoke(L); @@ -6076,7 +6811,7 @@ static int _fairygui_UIPackage_addPackage(lua_State *L) return num_ret; } -static int _fairygui_UIPackage_createObject(lua_State *L) +static int _olua_fun_fairygui_UIPackage_createObject(lua_State *L) { olua_startinvoke(L); @@ -6095,7 +6830,7 @@ static int _fairygui_UIPackage_createObject(lua_State *L) return num_ret; } -static int _fairygui_UIPackage_createObjectFromURL(lua_State *L) +static int _olua_fun_fairygui_UIPackage_createObjectFromURL(lua_State *L) { olua_startinvoke(L); @@ -6112,7 +6847,7 @@ static int _fairygui_UIPackage_createObjectFromURL(lua_State *L) return num_ret; } -static int _fairygui_UIPackage_getBranch(lua_State *L) +static int _olua_fun_fairygui_UIPackage_getBranch(lua_State *L) { olua_startinvoke(L); @@ -6125,7 +6860,7 @@ static int _fairygui_UIPackage_getBranch(lua_State *L) return num_ret; } -static int _fairygui_UIPackage_getById(lua_State *L) +static int _olua_fun_fairygui_UIPackage_getById(lua_State *L) { olua_startinvoke(L); @@ -6142,7 +6877,7 @@ static int _fairygui_UIPackage_getById(lua_State *L) return num_ret; } -static int _fairygui_UIPackage_getByName(lua_State *L) +static int _olua_fun_fairygui_UIPackage_getByName(lua_State *L) { olua_startinvoke(L); @@ -6159,7 +6894,7 @@ static int _fairygui_UIPackage_getByName(lua_State *L) return num_ret; } -static int _fairygui_UIPackage_getEmptyTexture(lua_State *L) +static int _olua_fun_fairygui_UIPackage_getEmptyTexture(lua_State *L) { olua_startinvoke(L); @@ -6172,7 +6907,7 @@ static int _fairygui_UIPackage_getEmptyTexture(lua_State *L) return num_ret; } -static int _fairygui_UIPackage_getId(lua_State *L) +static int _olua_fun_fairygui_UIPackage_getId(lua_State *L) { olua_startinvoke(L); @@ -6189,7 +6924,7 @@ static int _fairygui_UIPackage_getId(lua_State *L) return num_ret; } -static int _fairygui_UIPackage_getItem(lua_State *L) +static int _olua_fun_fairygui_UIPackage_getItem(lua_State *L) { olua_startinvoke(L); @@ -6208,7 +6943,7 @@ static int _fairygui_UIPackage_getItem(lua_State *L) return num_ret; } -static int _fairygui_UIPackage_getItemAsset$1(lua_State *L) +static int _olua_fun_fairygui_UIPackage_getItemAsset$1(lua_State *L) { olua_startinvoke(L); @@ -6229,18 +6964,18 @@ static int _fairygui_UIPackage_getItemAsset$1(lua_State *L) return num_ret; } -static int _fairygui_UIPackage_getItemAsset$2(lua_State *L) +static int _olua_fun_fairygui_UIPackage_getItemAsset$2(lua_State *L) { olua_startinvoke(L); - fairygui::UIPackage *self = nullptr; - fairygui::PackageItem *arg1 = nullptr; /** item */ + std::string arg1; /** pkgName */ + std::string arg2; /** resName */ - olua_to_object(L, 1, &self, "fgui.UIPackage"); - olua_check_object(L, 2, &arg1, "fgui.PackageItem"); + olua_check_string(L, 1, &arg1); + olua_check_string(L, 2, &arg2); - // void *getItemAsset(fairygui::PackageItem *item) - void *ret = self->getItemAsset(arg1); + // static void *getItemAsset(const std::string &pkgName, const std::string &resName) + void *ret = fairygui::UIPackage::getItemAsset(arg1, arg2); int num_ret = olua_push_object(L, ret, "void *"); olua_endinvoke(L); @@ -6248,18 +6983,18 @@ static int _fairygui_UIPackage_getItemAsset$2(lua_State *L) return num_ret; } -static int _fairygui_UIPackage_getItemAsset$3(lua_State *L) +static int _olua_fun_fairygui_UIPackage_getItemAsset$3(lua_State *L) { olua_startinvoke(L); - std::string arg1; /** pkgName */ - std::string arg2; /** resName */ + fairygui::UIPackage *self = nullptr; + fairygui::PackageItem *arg1 = nullptr; /** item */ - olua_check_string(L, 1, &arg1); - olua_check_string(L, 2, &arg2); + olua_to_object(L, 1, &self, "fgui.UIPackage"); + olua_check_object(L, 2, &arg1, "fgui.PackageItem"); - // static void *getItemAsset(const std::string &pkgName, const std::string &resName, @optional fairygui::PackageItemType type) - void *ret = fairygui::UIPackage::getItemAsset(arg1, arg2); + // void *getItemAsset(fairygui::PackageItem *item) + void *ret = self->getItemAsset(arg1); int num_ret = olua_push_object(L, ret, "void *"); olua_endinvoke(L); @@ -6267,28 +7002,28 @@ static int _fairygui_UIPackage_getItemAsset$3(lua_State *L) return num_ret; } -static int _fairygui_UIPackage_getItemAsset(lua_State *L) +static int _olua_fun_fairygui_UIPackage_getItemAsset(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 1) { // if ((olua_is_object(L, 2, "fgui.PackageItem"))) { // void *getItemAsset(fairygui::PackageItem *item) - return _fairygui_UIPackage_getItemAsset$2(L); + return _olua_fun_fairygui_UIPackage_getItemAsset$3(L); // } } if (num_args == 2) { // if ((olua_is_string(L, 1)) && (olua_is_string(L, 2))) { - // static void *getItemAsset(const std::string &pkgName, const std::string &resName, @optional fairygui::PackageItemType type) - return _fairygui_UIPackage_getItemAsset$3(L); + // static void *getItemAsset(const std::string &pkgName, const std::string &resName) + return _olua_fun_fairygui_UIPackage_getItemAsset$2(L); // } } if (num_args == 3) { // if ((olua_is_string(L, 1)) && (olua_is_string(L, 2)) && (olua_is_enum(L, 3))) { // static void *getItemAsset(const std::string &pkgName, const std::string &resName, @optional fairygui::PackageItemType type) - return _fairygui_UIPackage_getItemAsset$1(L); + return _olua_fun_fairygui_UIPackage_getItemAsset$1(L); // } } @@ -6297,7 +7032,7 @@ static int _fairygui_UIPackage_getItemAsset(lua_State *L) return 0; } -static int _fairygui_UIPackage_getItemAssetByURL$1(lua_State *L) +static int _olua_fun_fairygui_UIPackage_getItemAssetByURL$1(lua_State *L) { olua_startinvoke(L); @@ -6316,7 +7051,7 @@ static int _fairygui_UIPackage_getItemAssetByURL$1(lua_State *L) return num_ret; } -static int _fairygui_UIPackage_getItemAssetByURL$2(lua_State *L) +static int _olua_fun_fairygui_UIPackage_getItemAssetByURL$2(lua_State *L) { olua_startinvoke(L); @@ -6324,7 +7059,7 @@ static int _fairygui_UIPackage_getItemAssetByURL$2(lua_State *L) olua_check_string(L, 1, &arg1); - // static void *getItemAssetByURL(const std::string &url, @optional fairygui::PackageItemType type) + // static void *getItemAssetByURL(const std::string &url) void *ret = fairygui::UIPackage::getItemAssetByURL(arg1); int num_ret = olua_push_object(L, ret, "void *"); @@ -6333,21 +7068,21 @@ static int _fairygui_UIPackage_getItemAssetByURL$2(lua_State *L) return num_ret; } -static int _fairygui_UIPackage_getItemAssetByURL(lua_State *L) +static int _olua_fun_fairygui_UIPackage_getItemAssetByURL(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 1) { // if ((olua_is_string(L, 1))) { - // static void *getItemAssetByURL(const std::string &url, @optional fairygui::PackageItemType type) - return _fairygui_UIPackage_getItemAssetByURL$2(L); + // static void *getItemAssetByURL(const std::string &url) + return _olua_fun_fairygui_UIPackage_getItemAssetByURL$2(L); // } } if (num_args == 2) { // if ((olua_is_string(L, 1)) && (olua_is_enum(L, 2))) { // static void *getItemAssetByURL(const std::string &url, @optional fairygui::PackageItemType type) - return _fairygui_UIPackage_getItemAssetByURL$1(L); + return _olua_fun_fairygui_UIPackage_getItemAssetByURL$1(L); // } } @@ -6356,7 +7091,7 @@ static int _fairygui_UIPackage_getItemAssetByURL(lua_State *L) return 0; } -static int _fairygui_UIPackage_getItemByName(lua_State *L) +static int _olua_fun_fairygui_UIPackage_getItemByName(lua_State *L) { olua_startinvoke(L); @@ -6375,7 +7110,7 @@ static int _fairygui_UIPackage_getItemByName(lua_State *L) return num_ret; } -static int _fairygui_UIPackage_getItemByURL(lua_State *L) +static int _olua_fun_fairygui_UIPackage_getItemByURL(lua_State *L) { olua_startinvoke(L); @@ -6392,7 +7127,7 @@ static int _fairygui_UIPackage_getItemByURL(lua_State *L) return num_ret; } -static int _fairygui_UIPackage_getItemURL(lua_State *L) +static int _olua_fun_fairygui_UIPackage_getItemURL(lua_State *L) { olua_startinvoke(L); @@ -6411,7 +7146,7 @@ static int _fairygui_UIPackage_getItemURL(lua_State *L) return num_ret; } -static int _fairygui_UIPackage_getName(lua_State *L) +static int _olua_fun_fairygui_UIPackage_getName(lua_State *L) { olua_startinvoke(L); @@ -6428,7 +7163,7 @@ static int _fairygui_UIPackage_getName(lua_State *L) return num_ret; } -static int _fairygui_UIPackage_getVar(lua_State *L) +static int _olua_fun_fairygui_UIPackage_getVar(lua_State *L) { olua_startinvoke(L); @@ -6445,11 +7180,11 @@ static int _fairygui_UIPackage_getVar(lua_State *L) return num_ret; } -static int _fairygui_UIPackage_new(lua_State *L) +static int _olua_fun_fairygui_UIPackage_new(lua_State *L) { olua_startinvoke(L); - // UIPackage() + // fairygui::UIPackage() fairygui::UIPackage *ret = new fairygui::UIPackage(); int num_ret = olua_push_object(L, ret, "fgui.UIPackage"); olua_postnew(L, ret); @@ -6459,7 +7194,7 @@ static int _fairygui_UIPackage_new(lua_State *L) return num_ret; } -static int _fairygui_UIPackage_normalizeURL(lua_State *L) +static int _olua_fun_fairygui_UIPackage_normalizeURL(lua_State *L) { olua_startinvoke(L); @@ -6476,7 +7211,7 @@ static int _fairygui_UIPackage_normalizeURL(lua_State *L) return num_ret; } -static int _fairygui_UIPackage_removeAllPackages(lua_State *L) +static int _olua_fun_fairygui_UIPackage_removeAllPackages(lua_State *L) { olua_startinvoke(L); @@ -6488,7 +7223,7 @@ static int _fairygui_UIPackage_removeAllPackages(lua_State *L) return 0; } -static int _fairygui_UIPackage_removePackage(lua_State *L) +static int _olua_fun_fairygui_UIPackage_removePackage(lua_State *L) { olua_startinvoke(L); @@ -6504,7 +7239,7 @@ static int _fairygui_UIPackage_removePackage(lua_State *L) return 0; } -static int _fairygui_UIPackage_setBranch(lua_State *L) +static int _olua_fun_fairygui_UIPackage_setBranch(lua_State *L) { olua_startinvoke(L); @@ -6520,7 +7255,7 @@ static int _fairygui_UIPackage_setBranch(lua_State *L) return 0; } -static int _fairygui_UIPackage_setVar(lua_State *L) +static int _olua_fun_fairygui_UIPackage_setVar(lua_State *L) { olua_startinvoke(L); @@ -6538,60 +7273,52 @@ static int _fairygui_UIPackage_setVar(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_fairygui_UIPackage(lua_State *L) +static int _olua_cls_fgui_UIPackage(lua_State *L) { oluacls_class(L, "fgui.UIPackage"); - oluacls_func(L, "addPackage", _fairygui_UIPackage_addPackage); - oluacls_func(L, "createObject", _fairygui_UIPackage_createObject); - oluacls_func(L, "createObjectFromURL", _fairygui_UIPackage_createObjectFromURL); - oluacls_func(L, "getBranch", _fairygui_UIPackage_getBranch); - oluacls_func(L, "getById", _fairygui_UIPackage_getById); - oluacls_func(L, "getByName", _fairygui_UIPackage_getByName); - oluacls_func(L, "getEmptyTexture", _fairygui_UIPackage_getEmptyTexture); - oluacls_func(L, "getId", _fairygui_UIPackage_getId); - oluacls_func(L, "getItem", _fairygui_UIPackage_getItem); - oluacls_func(L, "getItemAsset", _fairygui_UIPackage_getItemAsset); - oluacls_func(L, "getItemAssetByURL", _fairygui_UIPackage_getItemAssetByURL); - oluacls_func(L, "getItemByName", _fairygui_UIPackage_getItemByName); - oluacls_func(L, "getItemByURL", _fairygui_UIPackage_getItemByURL); - oluacls_func(L, "getItemURL", _fairygui_UIPackage_getItemURL); - oluacls_func(L, "getName", _fairygui_UIPackage_getName); - oluacls_func(L, "getVar", _fairygui_UIPackage_getVar); - oluacls_func(L, "new", _fairygui_UIPackage_new); - oluacls_func(L, "normalizeURL", _fairygui_UIPackage_normalizeURL); - oluacls_func(L, "removeAllPackages", _fairygui_UIPackage_removeAllPackages); - oluacls_func(L, "removePackage", _fairygui_UIPackage_removePackage); - oluacls_func(L, "setBranch", _fairygui_UIPackage_setBranch); - oluacls_func(L, "setVar", _fairygui_UIPackage_setVar); - oluacls_prop(L, "branch", _fairygui_UIPackage_getBranch, _fairygui_UIPackage_setBranch); - oluacls_prop(L, "emptyTexture", _fairygui_UIPackage_getEmptyTexture, nullptr); - oluacls_prop(L, "id", _fairygui_UIPackage_getId, nullptr); - oluacls_prop(L, "name", _fairygui_UIPackage_getName, nullptr); + oluacls_func(L, "addPackage", _olua_fun_fairygui_UIPackage_addPackage); + oluacls_func(L, "createObject", _olua_fun_fairygui_UIPackage_createObject); + oluacls_func(L, "createObjectFromURL", _olua_fun_fairygui_UIPackage_createObjectFromURL); + oluacls_func(L, "getBranch", _olua_fun_fairygui_UIPackage_getBranch); + oluacls_func(L, "getById", _olua_fun_fairygui_UIPackage_getById); + oluacls_func(L, "getByName", _olua_fun_fairygui_UIPackage_getByName); + oluacls_func(L, "getEmptyTexture", _olua_fun_fairygui_UIPackage_getEmptyTexture); + oluacls_func(L, "getId", _olua_fun_fairygui_UIPackage_getId); + oluacls_func(L, "getItem", _olua_fun_fairygui_UIPackage_getItem); + oluacls_func(L, "getItemAsset", _olua_fun_fairygui_UIPackage_getItemAsset); + oluacls_func(L, "getItemAssetByURL", _olua_fun_fairygui_UIPackage_getItemAssetByURL); + oluacls_func(L, "getItemByName", _olua_fun_fairygui_UIPackage_getItemByName); + oluacls_func(L, "getItemByURL", _olua_fun_fairygui_UIPackage_getItemByURL); + oluacls_func(L, "getItemURL", _olua_fun_fairygui_UIPackage_getItemURL); + oluacls_func(L, "getName", _olua_fun_fairygui_UIPackage_getName); + oluacls_func(L, "getVar", _olua_fun_fairygui_UIPackage_getVar); + oluacls_func(L, "new", _olua_fun_fairygui_UIPackage_new); + oluacls_func(L, "normalizeURL", _olua_fun_fairygui_UIPackage_normalizeURL); + oluacls_func(L, "removeAllPackages", _olua_fun_fairygui_UIPackage_removeAllPackages); + oluacls_func(L, "removePackage", _olua_fun_fairygui_UIPackage_removePackage); + oluacls_func(L, "setBranch", _olua_fun_fairygui_UIPackage_setBranch); + oluacls_func(L, "setVar", _olua_fun_fairygui_UIPackage_setVar); + oluacls_prop(L, "branch", _olua_fun_fairygui_UIPackage_getBranch, _olua_fun_fairygui_UIPackage_setBranch); + oluacls_prop(L, "emptyTexture", _olua_fun_fairygui_UIPackage_getEmptyTexture, nullptr); + oluacls_prop(L, "id", _olua_fun_fairygui_UIPackage_getId, nullptr); + oluacls_prop(L, "name", _olua_fun_fairygui_UIPackage_getName, nullptr); oluacls_const(L, "URL_PREFIX", fairygui::UIPackage::URL_PREFIX); return 1; } -OLUA_END_DECLS -static int _fairygui_PackageItem_getBranch(lua_State *L) +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_fgui_UIPackage(lua_State *L) { - olua_startinvoke(L); - - fairygui::PackageItem *self = nullptr; - - olua_to_object(L, 1, &self, "fgui.PackageItem"); - - // fairygui::PackageItem *getBranch() - fairygui::PackageItem *ret = self->getBranch(); - int num_ret = olua_push_object(L, ret, "fgui.PackageItem"); - - olua_endinvoke(L); - - return num_ret; + olua_require(L, "fairygui", luaopen_fairygui); + if (!olua_getclass(L, "fgui.UIPackage")) { + luaL_error(L, "class not found: fairygui::UIPackage"); + } + return 1; } +OLUA_END_DECLS -static int _fairygui_PackageItem_getHighResolution(lua_State *L) +static int _olua_fun_fairygui_PackageItem_animation$1(lua_State *L) { olua_startinvoke(L); @@ -6599,46 +7326,55 @@ static int _fairygui_PackageItem_getHighResolution(lua_State *L) olua_to_object(L, 1, &self, "fgui.PackageItem"); - // fairygui::PackageItem *getHighResolution() - fairygui::PackageItem *ret = self->getHighResolution(); - int num_ret = olua_push_object(L, ret, "fgui.PackageItem"); + // cocos2d::Animation *animation + cocos2d::Animation *ret = self->animation; + int num_ret = olua_push_object(L, ret, "cc.Animation"); olua_endinvoke(L); return num_ret; } -static int _fairygui_PackageItem_load(lua_State *L) +static int _olua_fun_fairygui_PackageItem_animation$2(lua_State *L) { olua_startinvoke(L); fairygui::PackageItem *self = nullptr; + cocos2d::Animation *arg1 = nullptr; /** animation */ olua_to_object(L, 1, &self, "fgui.PackageItem"); + olua_check_object(L, 2, &arg1, "cc.Animation"); - // void load() - self->load(); + // cocos2d::Animation *animation + self->animation = arg1; olua_endinvoke(L); return 0; } -static int _fairygui_PackageItem_new(lua_State *L) +static int _olua_fun_fairygui_PackageItem_animation(lua_State *L) { - olua_startinvoke(L); + int num_args = lua_gettop(L) - 1; - // PackageItem() - fairygui::PackageItem *ret = new fairygui::PackageItem(); - int num_ret = olua_push_object(L, ret, "fgui.PackageItem"); - olua_postnew(L, ret); + if (num_args == 0) { + // cocos2d::Animation *animation + return _olua_fun_fairygui_PackageItem_animation$1(L); + } - olua_endinvoke(L); + if (num_args == 1) { + // if ((olua_is_object(L, 2, "cc.Animation"))) { + // cocos2d::Animation *animation + return _olua_fun_fairygui_PackageItem_animation$2(L); + // } + } - return num_ret; + luaL_error(L, "method 'fairygui::PackageItem::animation' not support '%d' arguments", num_args); + + return 0; } -static int _fairygui_PackageItem_get_animation(lua_State *L) +static int _olua_fun_fairygui_PackageItem_branches$1(lua_State *L) { olua_startinvoke(L); @@ -6646,69 +7382,55 @@ static int _fairygui_PackageItem_get_animation(lua_State *L) olua_to_object(L, 1, &self, "fgui.PackageItem"); - // cocos2d::Animation *animation - cocos2d::Animation *ret = self->animation; - int num_ret = olua_push_object(L, ret, "cc.Animation"); + // std::vector *branches + std::vector *ret = self->branches; + int num_ret = olua_push_valueptr(L, ret, "cc.types.VectorString"); olua_endinvoke(L); return num_ret; } -static int _fairygui_PackageItem_set_animation(lua_State *L) +static int _olua_fun_fairygui_PackageItem_branches$2(lua_State *L) { olua_startinvoke(L); fairygui::PackageItem *self = nullptr; - cocos2d::Animation *arg1 = nullptr; /** animation */ + std::vector *arg1 = nullptr; /** branches */ olua_to_object(L, 1, &self, "fgui.PackageItem"); - olua_check_object(L, 2, &arg1, "cc.Animation"); + olua_check_valueptr(L, 2, &arg1, "cc.types.VectorString"); - // cocos2d::Animation *animation - self->animation = arg1; + // std::vector *branches + self->branches = arg1; olua_endinvoke(L); return 0; } -static int _fairygui_PackageItem_get_branches(lua_State *L) +static int _olua_fun_fairygui_PackageItem_branches(lua_State *L) { - olua_startinvoke(L); - - fairygui::PackageItem *self = nullptr; - - olua_to_object(L, 1, &self, "fgui.PackageItem"); - - // std::vector *branches - std::vector *ret = self->branches; - int num_ret = olua_push_pointer(L, ret, "cc.VectorString"); - - olua_endinvoke(L); - - return num_ret; -} - -static int _fairygui_PackageItem_set_branches(lua_State *L) -{ - olua_startinvoke(L); - - fairygui::PackageItem *self = nullptr; - std::vector *arg1 = nullptr; /** branches */ + int num_args = lua_gettop(L) - 1; - olua_to_object(L, 1, &self, "fgui.PackageItem"); - olua_check_pointer(L, 2, &arg1, "cc.VectorString"); + if (num_args == 0) { + // std::vector *branches + return _olua_fun_fairygui_PackageItem_branches$1(L); + } - // std::vector *branches - self->branches = arg1; + if (num_args == 1) { + // if ((olua_is_valueptr(L, 2, "cc.types.VectorString"))) { + // std::vector *branches + return _olua_fun_fairygui_PackageItem_branches$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'fairygui::PackageItem::branches' not support '%d' arguments", num_args); return 0; } -static int _fairygui_PackageItem_get_delayPerUnit(lua_State *L) +static int _olua_fun_fairygui_PackageItem_delayPerUnit$1(lua_State *L) { olua_startinvoke(L); @@ -6725,7 +7447,7 @@ static int _fairygui_PackageItem_get_delayPerUnit(lua_State *L) return num_ret; } -static int _fairygui_PackageItem_set_delayPerUnit(lua_State *L) +static int _olua_fun_fairygui_PackageItem_delayPerUnit$2(lua_State *L) { olua_startinvoke(L); @@ -6743,7 +7465,28 @@ static int _fairygui_PackageItem_set_delayPerUnit(lua_State *L) return 0; } -static int _fairygui_PackageItem_get_file(lua_State *L) +static int _olua_fun_fairygui_PackageItem_delayPerUnit(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float delayPerUnit + return _olua_fun_fairygui_PackageItem_delayPerUnit$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float delayPerUnit + return _olua_fun_fairygui_PackageItem_delayPerUnit$2(L); + // } + } + + luaL_error(L, "method 'fairygui::PackageItem::delayPerUnit' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_fairygui_PackageItem_file$1(lua_State *L) { olua_startinvoke(L); @@ -6760,7 +7503,7 @@ static int _fairygui_PackageItem_get_file(lua_State *L) return num_ret; } -static int _fairygui_PackageItem_set_file(lua_State *L) +static int _olua_fun_fairygui_PackageItem_file$2(lua_State *L) { olua_startinvoke(L); @@ -6778,7 +7521,28 @@ static int _fairygui_PackageItem_set_file(lua_State *L) return 0; } -static int _fairygui_PackageItem_get_height(lua_State *L) +static int _olua_fun_fairygui_PackageItem_file(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // std::string file + return _olua_fun_fairygui_PackageItem_file$1(L); + } + + if (num_args == 1) { + // if ((olua_is_string(L, 2))) { + // std::string file + return _olua_fun_fairygui_PackageItem_file$2(L); + // } + } + + luaL_error(L, "method 'fairygui::PackageItem::file' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_fairygui_PackageItem_getBranch(lua_State *L) { olua_startinvoke(L); @@ -6786,34 +7550,33 @@ static int _fairygui_PackageItem_get_height(lua_State *L) olua_to_object(L, 1, &self, "fgui.PackageItem"); - // int height - int ret = self->height; - int num_ret = olua_push_integer(L, ret); + // fairygui::PackageItem *getBranch() + fairygui::PackageItem *ret = self->getBranch(); + int num_ret = olua_push_object(L, ret, "fgui.PackageItem"); olua_endinvoke(L); return num_ret; } -static int _fairygui_PackageItem_set_height(lua_State *L) +static int _olua_fun_fairygui_PackageItem_getHighResolution(lua_State *L) { olua_startinvoke(L); fairygui::PackageItem *self = nullptr; - int arg1 = 0; /** height */ olua_to_object(L, 1, &self, "fgui.PackageItem"); - olua_check_integer(L, 2, &arg1); - // int height - self->height = arg1; + // fairygui::PackageItem *getHighResolution() + fairygui::PackageItem *ret = self->getHighResolution(); + int num_ret = olua_push_object(L, ret, "fgui.PackageItem"); olua_endinvoke(L); - return 0; + return num_ret; } -static int _fairygui_PackageItem_get_highResolution(lua_State *L) +static int _olua_fun_fairygui_PackageItem_height$1(lua_State *L) { olua_startinvoke(L); @@ -6821,34 +7584,55 @@ static int _fairygui_PackageItem_get_highResolution(lua_State *L) olua_to_object(L, 1, &self, "fgui.PackageItem"); - // std::vector *highResolution - std::vector *ret = self->highResolution; - int num_ret = olua_push_pointer(L, ret, "cc.VectorString"); + // int height + int ret = self->height; + int num_ret = olua_push_integer(L, ret); olua_endinvoke(L); return num_ret; } -static int _fairygui_PackageItem_set_highResolution(lua_State *L) +static int _olua_fun_fairygui_PackageItem_height$2(lua_State *L) { olua_startinvoke(L); fairygui::PackageItem *self = nullptr; - std::vector *arg1 = nullptr; /** highResolution */ + int arg1 = 0; /** height */ olua_to_object(L, 1, &self, "fgui.PackageItem"); - olua_check_pointer(L, 2, &arg1, "cc.VectorString"); + olua_check_integer(L, 2, &arg1); - // std::vector *highResolution - self->highResolution = arg1; + // int height + self->height = arg1; olua_endinvoke(L); return 0; } -static int _fairygui_PackageItem_get_id(lua_State *L) +static int _olua_fun_fairygui_PackageItem_height(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // int height + return _olua_fun_fairygui_PackageItem_height$1(L); + } + + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // int height + return _olua_fun_fairygui_PackageItem_height$2(L); + // } + } + + luaL_error(L, "method 'fairygui::PackageItem::height' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_fairygui_PackageItem_id$1(lua_State *L) { olua_startinvoke(L); @@ -6865,7 +7649,7 @@ static int _fairygui_PackageItem_get_id(lua_State *L) return num_ret; } -static int _fairygui_PackageItem_set_id(lua_State *L) +static int _olua_fun_fairygui_PackageItem_id$2(lua_State *L) { olua_startinvoke(L); @@ -6883,7 +7667,44 @@ static int _fairygui_PackageItem_set_id(lua_State *L) return 0; } -static int _fairygui_PackageItem_get_name(lua_State *L) +static int _olua_fun_fairygui_PackageItem_id(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // std::string id + return _olua_fun_fairygui_PackageItem_id$1(L); + } + + if (num_args == 1) { + // if ((olua_is_string(L, 2))) { + // std::string id + return _olua_fun_fairygui_PackageItem_id$2(L); + // } + } + + luaL_error(L, "method 'fairygui::PackageItem::id' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_fairygui_PackageItem_load(lua_State *L) +{ + olua_startinvoke(L); + + fairygui::PackageItem *self = nullptr; + + olua_to_object(L, 1, &self, "fgui.PackageItem"); + + // void load() + self->load(); + + olua_endinvoke(L); + + return 0; +} + +static int _olua_fun_fairygui_PackageItem_name$1(lua_State *L) { olua_startinvoke(L); @@ -6900,7 +7721,7 @@ static int _fairygui_PackageItem_get_name(lua_State *L) return num_ret; } -static int _fairygui_PackageItem_set_name(lua_State *L) +static int _olua_fun_fairygui_PackageItem_name$2(lua_State *L) { olua_startinvoke(L); @@ -6918,7 +7739,42 @@ static int _fairygui_PackageItem_set_name(lua_State *L) return 0; } -static int _fairygui_PackageItem_get_objectType(lua_State *L) +static int _olua_fun_fairygui_PackageItem_name(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // std::string name + return _olua_fun_fairygui_PackageItem_name$1(L); + } + + if (num_args == 1) { + // if ((olua_is_string(L, 2))) { + // std::string name + return _olua_fun_fairygui_PackageItem_name$2(L); + // } + } + + luaL_error(L, "method 'fairygui::PackageItem::name' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_fairygui_PackageItem_new(lua_State *L) +{ + olua_startinvoke(L); + + // fairygui::PackageItem() + fairygui::PackageItem *ret = new fairygui::PackageItem(); + int num_ret = olua_push_object(L, ret, "fgui.PackageItem"); + olua_postnew(L, ret); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_fairygui_PackageItem_objectType$1(lua_State *L) { olua_startinvoke(L); @@ -6935,7 +7791,7 @@ static int _fairygui_PackageItem_get_objectType(lua_State *L) return num_ret; } -static int _fairygui_PackageItem_set_objectType(lua_State *L) +static int _olua_fun_fairygui_PackageItem_objectType$2(lua_State *L) { olua_startinvoke(L); @@ -6953,7 +7809,28 @@ static int _fairygui_PackageItem_set_objectType(lua_State *L) return 0; } -static int _fairygui_PackageItem_get_owner(lua_State *L) +static int _olua_fun_fairygui_PackageItem_objectType(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // fairygui::ObjectType objectType + return _olua_fun_fairygui_PackageItem_objectType$1(L); + } + + if (num_args == 1) { + // if ((olua_is_enum(L, 2))) { + // fairygui::ObjectType objectType + return _olua_fun_fairygui_PackageItem_objectType$2(L); + // } + } + + luaL_error(L, "method 'fairygui::PackageItem::objectType' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_fairygui_PackageItem_owner$1(lua_State *L) { olua_startinvoke(L); @@ -6970,7 +7847,7 @@ static int _fairygui_PackageItem_get_owner(lua_State *L) return num_ret; } -static int _fairygui_PackageItem_set_owner(lua_State *L) +static int _olua_fun_fairygui_PackageItem_owner$2(lua_State *L) { olua_startinvoke(L); @@ -6988,7 +7865,28 @@ static int _fairygui_PackageItem_set_owner(lua_State *L) return 0; } -static int _fairygui_PackageItem_get_repeatDelay(lua_State *L) +static int _olua_fun_fairygui_PackageItem_owner(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // fairygui::UIPackage *owner + return _olua_fun_fairygui_PackageItem_owner$1(L); + } + + if (num_args == 1) { + // if ((olua_is_object(L, 2, "fgui.UIPackage"))) { + // fairygui::UIPackage *owner + return _olua_fun_fairygui_PackageItem_owner$2(L); + // } + } + + luaL_error(L, "method 'fairygui::PackageItem::owner' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_fairygui_PackageItem_repeatDelay$1(lua_State *L) { olua_startinvoke(L); @@ -7005,7 +7903,7 @@ static int _fairygui_PackageItem_get_repeatDelay(lua_State *L) return num_ret; } -static int _fairygui_PackageItem_set_repeatDelay(lua_State *L) +static int _olua_fun_fairygui_PackageItem_repeatDelay$2(lua_State *L) { olua_startinvoke(L); @@ -7023,7 +7921,28 @@ static int _fairygui_PackageItem_set_repeatDelay(lua_State *L) return 0; } -static int _fairygui_PackageItem_get_scaleByTile(lua_State *L) +static int _olua_fun_fairygui_PackageItem_repeatDelay(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float repeatDelay + return _olua_fun_fairygui_PackageItem_repeatDelay$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float repeatDelay + return _olua_fun_fairygui_PackageItem_repeatDelay$2(L); + // } + } + + luaL_error(L, "method 'fairygui::PackageItem::repeatDelay' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_fairygui_PackageItem_scaleByTile$1(lua_State *L) { olua_startinvoke(L); @@ -7040,7 +7959,7 @@ static int _fairygui_PackageItem_get_scaleByTile(lua_State *L) return num_ret; } -static int _fairygui_PackageItem_set_scaleByTile(lua_State *L) +static int _olua_fun_fairygui_PackageItem_scaleByTile$2(lua_State *L) { olua_startinvoke(L); @@ -7058,7 +7977,28 @@ static int _fairygui_PackageItem_set_scaleByTile(lua_State *L) return 0; } -static int _fairygui_PackageItem_get_skeletonAnchor(lua_State *L) +static int _olua_fun_fairygui_PackageItem_scaleByTile(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // bool scaleByTile + return _olua_fun_fairygui_PackageItem_scaleByTile$1(L); + } + + if (num_args == 1) { + // if ((olua_is_bool(L, 2))) { + // bool scaleByTile + return _olua_fun_fairygui_PackageItem_scaleByTile$2(L); + // } + } + + luaL_error(L, "method 'fairygui::PackageItem::scaleByTile' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_fairygui_PackageItem_skeletonAnchor$1(lua_State *L) { olua_startinvoke(L); @@ -7075,7 +8015,7 @@ static int _fairygui_PackageItem_get_skeletonAnchor(lua_State *L) return num_ret; } -static int _fairygui_PackageItem_set_skeletonAnchor(lua_State *L) +static int _olua_fun_fairygui_PackageItem_skeletonAnchor$2(lua_State *L) { olua_startinvoke(L); @@ -7093,7 +8033,28 @@ static int _fairygui_PackageItem_set_skeletonAnchor(lua_State *L) return 0; } -static int _fairygui_PackageItem_get_spriteFrame(lua_State *L) +static int _olua_fun_fairygui_PackageItem_skeletonAnchor(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // cocos2d::Vec2 *skeletonAnchor + return _olua_fun_fairygui_PackageItem_skeletonAnchor$1(L); + } + + if (num_args == 1) { + // if ((olua_is_object(L, 2, "cc.Vec2"))) { + // cocos2d::Vec2 *skeletonAnchor + return _olua_fun_fairygui_PackageItem_skeletonAnchor$2(L); + // } + } + + luaL_error(L, "method 'fairygui::PackageItem::skeletonAnchor' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_fairygui_PackageItem_spriteFrame$1(lua_State *L) { olua_startinvoke(L); @@ -7110,7 +8071,7 @@ static int _fairygui_PackageItem_get_spriteFrame(lua_State *L) return num_ret; } -static int _fairygui_PackageItem_set_spriteFrame(lua_State *L) +static int _olua_fun_fairygui_PackageItem_spriteFrame$2(lua_State *L) { olua_startinvoke(L); @@ -7128,7 +8089,28 @@ static int _fairygui_PackageItem_set_spriteFrame(lua_State *L) return 0; } -static int _fairygui_PackageItem_get_swing(lua_State *L) +static int _olua_fun_fairygui_PackageItem_spriteFrame(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // cocos2d::SpriteFrame *spriteFrame + return _olua_fun_fairygui_PackageItem_spriteFrame$1(L); + } + + if (num_args == 1) { + // if ((olua_is_object(L, 2, "cc.SpriteFrame"))) { + // cocos2d::SpriteFrame *spriteFrame + return _olua_fun_fairygui_PackageItem_spriteFrame$2(L); + // } + } + + luaL_error(L, "method 'fairygui::PackageItem::spriteFrame' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_fairygui_PackageItem_swing$1(lua_State *L) { olua_startinvoke(L); @@ -7145,7 +8127,7 @@ static int _fairygui_PackageItem_get_swing(lua_State *L) return num_ret; } -static int _fairygui_PackageItem_set_swing(lua_State *L) +static int _olua_fun_fairygui_PackageItem_swing$2(lua_State *L) { olua_startinvoke(L); @@ -7163,7 +8145,28 @@ static int _fairygui_PackageItem_set_swing(lua_State *L) return 0; } -static int _fairygui_PackageItem_get_texture(lua_State *L) +static int _olua_fun_fairygui_PackageItem_swing(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // bool swing + return _olua_fun_fairygui_PackageItem_swing$1(L); + } + + if (num_args == 1) { + // if ((olua_is_bool(L, 2))) { + // bool swing + return _olua_fun_fairygui_PackageItem_swing$2(L); + // } + } + + luaL_error(L, "method 'fairygui::PackageItem::swing' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_fairygui_PackageItem_texture$1(lua_State *L) { olua_startinvoke(L); @@ -7180,7 +8183,7 @@ static int _fairygui_PackageItem_get_texture(lua_State *L) return num_ret; } -static int _fairygui_PackageItem_set_texture(lua_State *L) +static int _olua_fun_fairygui_PackageItem_texture$2(lua_State *L) { olua_startinvoke(L); @@ -7198,9 +8201,30 @@ static int _fairygui_PackageItem_set_texture(lua_State *L) return 0; } -static int _fairygui_PackageItem_get_tileGridIndice(lua_State *L) +static int _olua_fun_fairygui_PackageItem_texture(lua_State *L) { - olua_startinvoke(L); + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // cocos2d::Texture2D *texture + return _olua_fun_fairygui_PackageItem_texture$1(L); + } + + if (num_args == 1) { + // if ((olua_is_object(L, 2, "cc.Texture2D"))) { + // cocos2d::Texture2D *texture + return _olua_fun_fairygui_PackageItem_texture$2(L); + // } + } + + luaL_error(L, "method 'fairygui::PackageItem::texture' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_fairygui_PackageItem_tileGridIndice$1(lua_State *L) +{ + olua_startinvoke(L); fairygui::PackageItem *self = nullptr; @@ -7215,7 +8239,7 @@ static int _fairygui_PackageItem_get_tileGridIndice(lua_State *L) return num_ret; } -static int _fairygui_PackageItem_set_tileGridIndice(lua_State *L) +static int _olua_fun_fairygui_PackageItem_tileGridIndice$2(lua_State *L) { olua_startinvoke(L); @@ -7233,7 +8257,28 @@ static int _fairygui_PackageItem_set_tileGridIndice(lua_State *L) return 0; } -static int _fairygui_PackageItem_get_translated(lua_State *L) +static int _olua_fun_fairygui_PackageItem_tileGridIndice(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // int tileGridIndice + return _olua_fun_fairygui_PackageItem_tileGridIndice$1(L); + } + + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // int tileGridIndice + return _olua_fun_fairygui_PackageItem_tileGridIndice$2(L); + // } + } + + luaL_error(L, "method 'fairygui::PackageItem::tileGridIndice' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_fairygui_PackageItem_translated$1(lua_State *L) { olua_startinvoke(L); @@ -7250,7 +8295,7 @@ static int _fairygui_PackageItem_get_translated(lua_State *L) return num_ret; } -static int _fairygui_PackageItem_set_translated(lua_State *L) +static int _olua_fun_fairygui_PackageItem_translated$2(lua_State *L) { olua_startinvoke(L); @@ -7268,7 +8313,28 @@ static int _fairygui_PackageItem_set_translated(lua_State *L) return 0; } -static int _fairygui_PackageItem_get_type(lua_State *L) +static int _olua_fun_fairygui_PackageItem_translated(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // bool translated + return _olua_fun_fairygui_PackageItem_translated$1(L); + } + + if (num_args == 1) { + // if ((olua_is_bool(L, 2))) { + // bool translated + return _olua_fun_fairygui_PackageItem_translated$2(L); + // } + } + + luaL_error(L, "method 'fairygui::PackageItem::translated' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_fairygui_PackageItem_type$1(lua_State *L) { olua_startinvoke(L); @@ -7285,7 +8351,7 @@ static int _fairygui_PackageItem_get_type(lua_State *L) return num_ret; } -static int _fairygui_PackageItem_set_type(lua_State *L) +static int _olua_fun_fairygui_PackageItem_type$2(lua_State *L) { olua_startinvoke(L); @@ -7303,7 +8369,28 @@ static int _fairygui_PackageItem_set_type(lua_State *L) return 0; } -static int _fairygui_PackageItem_get_width(lua_State *L) +static int _olua_fun_fairygui_PackageItem_type(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // fairygui::PackageItemType type + return _olua_fun_fairygui_PackageItem_type$1(L); + } + + if (num_args == 1) { + // if ((olua_is_enum(L, 2))) { + // fairygui::PackageItemType type + return _olua_fun_fairygui_PackageItem_type$2(L); + // } + } + + luaL_error(L, "method 'fairygui::PackageItem::type' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_fairygui_PackageItem_width$1(lua_State *L) { olua_startinvoke(L); @@ -7320,7 +8407,7 @@ static int _fairygui_PackageItem_get_width(lua_State *L) return num_ret; } -static int _fairygui_PackageItem_set_width(lua_State *L) +static int _olua_fun_fairygui_PackageItem_width$2(lua_State *L) { olua_startinvoke(L); @@ -7338,43 +8425,71 @@ static int _fairygui_PackageItem_set_width(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_fairygui_PackageItem(lua_State *L) +static int _olua_fun_fairygui_PackageItem_width(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // int width + return _olua_fun_fairygui_PackageItem_width$1(L); + } + + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // int width + return _olua_fun_fairygui_PackageItem_width$2(L); + // } + } + + luaL_error(L, "method 'fairygui::PackageItem::width' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_cls_fgui_PackageItem(lua_State *L) { oluacls_class(L, "fgui.PackageItem"); - oluacls_func(L, "getBranch", _fairygui_PackageItem_getBranch); - oluacls_func(L, "getHighResolution", _fairygui_PackageItem_getHighResolution); - oluacls_func(L, "load", _fairygui_PackageItem_load); - oluacls_func(L, "new", _fairygui_PackageItem_new); - oluacls_prop(L, "branch", _fairygui_PackageItem_getBranch, nullptr); - oluacls_prop(L, "highResolution", _fairygui_PackageItem_getHighResolution, nullptr); - oluacls_prop(L, "animation", _fairygui_PackageItem_get_animation, _fairygui_PackageItem_set_animation); - oluacls_prop(L, "branches", _fairygui_PackageItem_get_branches, _fairygui_PackageItem_set_branches); - oluacls_prop(L, "delayPerUnit", _fairygui_PackageItem_get_delayPerUnit, _fairygui_PackageItem_set_delayPerUnit); - oluacls_prop(L, "file", _fairygui_PackageItem_get_file, _fairygui_PackageItem_set_file); - oluacls_prop(L, "height", _fairygui_PackageItem_get_height, _fairygui_PackageItem_set_height); - oluacls_prop(L, "highResolution", _fairygui_PackageItem_get_highResolution, _fairygui_PackageItem_set_highResolution); - oluacls_prop(L, "id", _fairygui_PackageItem_get_id, _fairygui_PackageItem_set_id); - oluacls_prop(L, "name", _fairygui_PackageItem_get_name, _fairygui_PackageItem_set_name); - oluacls_prop(L, "objectType", _fairygui_PackageItem_get_objectType, _fairygui_PackageItem_set_objectType); - oluacls_prop(L, "owner", _fairygui_PackageItem_get_owner, _fairygui_PackageItem_set_owner); - oluacls_prop(L, "repeatDelay", _fairygui_PackageItem_get_repeatDelay, _fairygui_PackageItem_set_repeatDelay); - oluacls_prop(L, "scaleByTile", _fairygui_PackageItem_get_scaleByTile, _fairygui_PackageItem_set_scaleByTile); - oluacls_prop(L, "skeletonAnchor", _fairygui_PackageItem_get_skeletonAnchor, _fairygui_PackageItem_set_skeletonAnchor); - oluacls_prop(L, "spriteFrame", _fairygui_PackageItem_get_spriteFrame, _fairygui_PackageItem_set_spriteFrame); - oluacls_prop(L, "swing", _fairygui_PackageItem_get_swing, _fairygui_PackageItem_set_swing); - oluacls_prop(L, "texture", _fairygui_PackageItem_get_texture, _fairygui_PackageItem_set_texture); - oluacls_prop(L, "tileGridIndice", _fairygui_PackageItem_get_tileGridIndice, _fairygui_PackageItem_set_tileGridIndice); - oluacls_prop(L, "translated", _fairygui_PackageItem_get_translated, _fairygui_PackageItem_set_translated); - oluacls_prop(L, "type", _fairygui_PackageItem_get_type, _fairygui_PackageItem_set_type); - oluacls_prop(L, "width", _fairygui_PackageItem_get_width, _fairygui_PackageItem_set_width); + oluacls_func(L, "getBranch", _olua_fun_fairygui_PackageItem_getBranch); + oluacls_func(L, "getHighResolution", _olua_fun_fairygui_PackageItem_getHighResolution); + oluacls_func(L, "load", _olua_fun_fairygui_PackageItem_load); + oluacls_func(L, "new", _olua_fun_fairygui_PackageItem_new); + oluacls_prop(L, "branch", _olua_fun_fairygui_PackageItem_getBranch, nullptr); + oluacls_prop(L, "highResolution", _olua_fun_fairygui_PackageItem_getHighResolution, nullptr); + oluacls_prop(L, "animation", _olua_fun_fairygui_PackageItem_animation, _olua_fun_fairygui_PackageItem_animation); + oluacls_prop(L, "branches", _olua_fun_fairygui_PackageItem_branches, _olua_fun_fairygui_PackageItem_branches); + oluacls_prop(L, "delayPerUnit", _olua_fun_fairygui_PackageItem_delayPerUnit, _olua_fun_fairygui_PackageItem_delayPerUnit); + oluacls_prop(L, "file", _olua_fun_fairygui_PackageItem_file, _olua_fun_fairygui_PackageItem_file); + oluacls_prop(L, "height", _olua_fun_fairygui_PackageItem_height, _olua_fun_fairygui_PackageItem_height); + oluacls_prop(L, "id", _olua_fun_fairygui_PackageItem_id, _olua_fun_fairygui_PackageItem_id); + oluacls_prop(L, "name", _olua_fun_fairygui_PackageItem_name, _olua_fun_fairygui_PackageItem_name); + oluacls_prop(L, "objectType", _olua_fun_fairygui_PackageItem_objectType, _olua_fun_fairygui_PackageItem_objectType); + oluacls_prop(L, "owner", _olua_fun_fairygui_PackageItem_owner, _olua_fun_fairygui_PackageItem_owner); + oluacls_prop(L, "repeatDelay", _olua_fun_fairygui_PackageItem_repeatDelay, _olua_fun_fairygui_PackageItem_repeatDelay); + oluacls_prop(L, "scaleByTile", _olua_fun_fairygui_PackageItem_scaleByTile, _olua_fun_fairygui_PackageItem_scaleByTile); + oluacls_prop(L, "skeletonAnchor", _olua_fun_fairygui_PackageItem_skeletonAnchor, _olua_fun_fairygui_PackageItem_skeletonAnchor); + oluacls_prop(L, "spriteFrame", _olua_fun_fairygui_PackageItem_spriteFrame, _olua_fun_fairygui_PackageItem_spriteFrame); + oluacls_prop(L, "swing", _olua_fun_fairygui_PackageItem_swing, _olua_fun_fairygui_PackageItem_swing); + oluacls_prop(L, "texture", _olua_fun_fairygui_PackageItem_texture, _olua_fun_fairygui_PackageItem_texture); + oluacls_prop(L, "tileGridIndice", _olua_fun_fairygui_PackageItem_tileGridIndice, _olua_fun_fairygui_PackageItem_tileGridIndice); + oluacls_prop(L, "translated", _olua_fun_fairygui_PackageItem_translated, _olua_fun_fairygui_PackageItem_translated); + oluacls_prop(L, "type", _olua_fun_fairygui_PackageItem_type, _olua_fun_fairygui_PackageItem_type); + oluacls_prop(L, "width", _olua_fun_fairygui_PackageItem_width, _olua_fun_fairygui_PackageItem_width); return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_fairygui_PackageItemType(lua_State *L) +OLUA_LIB int luaopen_fgui_PackageItem(lua_State *L) +{ + olua_require(L, "fairygui", luaopen_fairygui); + if (!olua_getclass(L, "fgui.PackageItem")) { + luaL_error(L, "class not found: fairygui::PackageItem"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_fgui_PackageItemType(lua_State *L) { oluacls_class(L, "fgui.PackageItemType"); oluacls_func(L, "__index", olua_indexerror); @@ -7393,10 +8508,19 @@ OLUA_LIB int luaopen_fairygui_PackageItemType(lua_State *L) return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_fairygui_ObjectType(lua_State *L) +OLUA_LIB int luaopen_fgui_PackageItemType(lua_State *L) +{ + olua_require(L, "fairygui", luaopen_fairygui); + if (!olua_getclass(L, "fgui.PackageItemType")) { + luaL_error(L, "class not found: fairygui::PackageItemType"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_fgui_ObjectType(lua_State *L) { oluacls_class(L, "fgui.ObjectType"); oluacls_func(L, "__index", olua_indexerror); @@ -7423,10 +8547,19 @@ OLUA_LIB int luaopen_fairygui_ObjectType(lua_State *L) return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_fairygui_ButtonMode(lua_State *L) +OLUA_LIB int luaopen_fgui_ObjectType(lua_State *L) +{ + olua_require(L, "fairygui", luaopen_fairygui); + if (!olua_getclass(L, "fgui.ObjectType")) { + luaL_error(L, "class not found: fairygui::ObjectType"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_fgui_ButtonMode(lua_State *L) { oluacls_class(L, "fgui.ButtonMode"); oluacls_func(L, "__index", olua_indexerror); @@ -7437,10 +8570,19 @@ OLUA_LIB int luaopen_fairygui_ButtonMode(lua_State *L) return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_fairygui_ChildrenRenderOrder(lua_State *L) +OLUA_LIB int luaopen_fgui_ButtonMode(lua_State *L) +{ + olua_require(L, "fairygui", luaopen_fairygui); + if (!olua_getclass(L, "fgui.ButtonMode")) { + luaL_error(L, "class not found: fairygui::ButtonMode"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_fgui_ChildrenRenderOrder(lua_State *L) { oluacls_class(L, "fgui.ChildrenRenderOrder"); oluacls_func(L, "__index", olua_indexerror); @@ -7451,10 +8593,19 @@ OLUA_LIB int luaopen_fairygui_ChildrenRenderOrder(lua_State *L) return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_fairygui_OverflowType(lua_State *L) +OLUA_LIB int luaopen_fgui_ChildrenRenderOrder(lua_State *L) +{ + olua_require(L, "fairygui", luaopen_fairygui); + if (!olua_getclass(L, "fgui.ChildrenRenderOrder")) { + luaL_error(L, "class not found: fairygui::ChildrenRenderOrder"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_fgui_OverflowType(lua_State *L) { oluacls_class(L, "fgui.OverflowType"); oluacls_func(L, "__index", olua_indexerror); @@ -7465,10 +8616,19 @@ OLUA_LIB int luaopen_fairygui_OverflowType(lua_State *L) return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_fairygui_ScrollType(lua_State *L) +OLUA_LIB int luaopen_fgui_OverflowType(lua_State *L) +{ + olua_require(L, "fairygui", luaopen_fairygui); + if (!olua_getclass(L, "fgui.OverflowType")) { + luaL_error(L, "class not found: fairygui::OverflowType"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_fgui_ScrollType(lua_State *L) { oluacls_class(L, "fgui.ScrollType"); oluacls_func(L, "__index", olua_indexerror); @@ -7479,10 +8639,19 @@ OLUA_LIB int luaopen_fairygui_ScrollType(lua_State *L) return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_fairygui_ScrollBarDisplayType(lua_State *L) +OLUA_LIB int luaopen_fgui_ScrollType(lua_State *L) +{ + olua_require(L, "fairygui", luaopen_fairygui); + if (!olua_getclass(L, "fgui.ScrollType")) { + luaL_error(L, "class not found: fairygui::ScrollType"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_fgui_ScrollBarDisplayType(lua_State *L) { oluacls_class(L, "fgui.ScrollBarDisplayType"); oluacls_func(L, "__index", olua_indexerror); @@ -7494,10 +8663,19 @@ OLUA_LIB int luaopen_fairygui_ScrollBarDisplayType(lua_State *L) return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_fairygui_LoaderFillType(lua_State *L) +OLUA_LIB int luaopen_fgui_ScrollBarDisplayType(lua_State *L) +{ + olua_require(L, "fairygui", luaopen_fairygui); + if (!olua_getclass(L, "fgui.ScrollBarDisplayType")) { + luaL_error(L, "class not found: fairygui::ScrollBarDisplayType"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_fgui_LoaderFillType(lua_State *L) { oluacls_class(L, "fgui.LoaderFillType"); oluacls_func(L, "__index", olua_indexerror); @@ -7511,10 +8689,19 @@ OLUA_LIB int luaopen_fairygui_LoaderFillType(lua_State *L) return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_fairygui_ProgressTitleType(lua_State *L) +OLUA_LIB int luaopen_fgui_LoaderFillType(lua_State *L) +{ + olua_require(L, "fairygui", luaopen_fairygui); + if (!olua_getclass(L, "fgui.LoaderFillType")) { + luaL_error(L, "class not found: fairygui::LoaderFillType"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_fgui_ProgressTitleType(lua_State *L) { oluacls_class(L, "fgui.ProgressTitleType"); oluacls_func(L, "__index", olua_indexerror); @@ -7526,10 +8713,19 @@ OLUA_LIB int luaopen_fairygui_ProgressTitleType(lua_State *L) return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_fairygui_ListLayoutType(lua_State *L) +OLUA_LIB int luaopen_fgui_ProgressTitleType(lua_State *L) +{ + olua_require(L, "fairygui", luaopen_fairygui); + if (!olua_getclass(L, "fgui.ProgressTitleType")) { + luaL_error(L, "class not found: fairygui::ProgressTitleType"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_fgui_ListLayoutType(lua_State *L) { oluacls_class(L, "fgui.ListLayoutType"); oluacls_func(L, "__index", olua_indexerror); @@ -7542,10 +8738,19 @@ OLUA_LIB int luaopen_fairygui_ListLayoutType(lua_State *L) return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_fairygui_ListSelectionMode(lua_State *L) +OLUA_LIB int luaopen_fgui_ListLayoutType(lua_State *L) +{ + olua_require(L, "fairygui", luaopen_fairygui); + if (!olua_getclass(L, "fgui.ListLayoutType")) { + luaL_error(L, "class not found: fairygui::ListLayoutType"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_fgui_ListSelectionMode(lua_State *L) { oluacls_class(L, "fgui.ListSelectionMode"); oluacls_func(L, "__index", olua_indexerror); @@ -7557,10 +8762,19 @@ OLUA_LIB int luaopen_fairygui_ListSelectionMode(lua_State *L) return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_fairygui_GroupLayoutType(lua_State *L) +OLUA_LIB int luaopen_fgui_ListSelectionMode(lua_State *L) +{ + olua_require(L, "fairygui", luaopen_fairygui); + if (!olua_getclass(L, "fgui.ListSelectionMode")) { + luaL_error(L, "class not found: fairygui::ListSelectionMode"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_fgui_GroupLayoutType(lua_State *L) { oluacls_class(L, "fgui.GroupLayoutType"); oluacls_func(L, "__index", olua_indexerror); @@ -7571,10 +8785,19 @@ OLUA_LIB int luaopen_fairygui_GroupLayoutType(lua_State *L) return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_fairygui_PopupDirection(lua_State *L) +OLUA_LIB int luaopen_fgui_GroupLayoutType(lua_State *L) +{ + olua_require(L, "fairygui", luaopen_fairygui); + if (!olua_getclass(L, "fgui.GroupLayoutType")) { + luaL_error(L, "class not found: fairygui::GroupLayoutType"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_fgui_PopupDirection(lua_State *L) { oluacls_class(L, "fgui.PopupDirection"); oluacls_func(L, "__index", olua_indexerror); @@ -7585,10 +8808,19 @@ OLUA_LIB int luaopen_fairygui_PopupDirection(lua_State *L) return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_fairygui_AutoSizeType(lua_State *L) +OLUA_LIB int luaopen_fgui_PopupDirection(lua_State *L) +{ + olua_require(L, "fairygui", luaopen_fairygui); + if (!olua_getclass(L, "fgui.PopupDirection")) { + luaL_error(L, "class not found: fairygui::PopupDirection"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_fgui_AutoSizeType(lua_State *L) { oluacls_class(L, "fgui.AutoSizeType"); oluacls_func(L, "__index", olua_indexerror); @@ -7600,10 +8832,19 @@ OLUA_LIB int luaopen_fairygui_AutoSizeType(lua_State *L) return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_fairygui_FlipType(lua_State *L) +OLUA_LIB int luaopen_fgui_AutoSizeType(lua_State *L) +{ + olua_require(L, "fairygui", luaopen_fairygui); + if (!olua_getclass(L, "fgui.AutoSizeType")) { + luaL_error(L, "class not found: fairygui::AutoSizeType"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_fgui_FlipType(lua_State *L) { oluacls_class(L, "fgui.FlipType"); oluacls_func(L, "__index", olua_indexerror); @@ -7615,10 +8856,19 @@ OLUA_LIB int luaopen_fairygui_FlipType(lua_State *L) return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_fairygui_TransitionActionType(lua_State *L) +OLUA_LIB int luaopen_fgui_FlipType(lua_State *L) +{ + olua_require(L, "fairygui", luaopen_fairygui); + if (!olua_getclass(L, "fgui.FlipType")) { + luaL_error(L, "class not found: fairygui::FlipType"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_fgui_TransitionActionType(lua_State *L) { oluacls_class(L, "fgui.TransitionActionType"); oluacls_func(L, "__index", olua_indexerror); @@ -7643,10 +8893,19 @@ OLUA_LIB int luaopen_fairygui_TransitionActionType(lua_State *L) return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_fairygui_FillMethod(lua_State *L) +OLUA_LIB int luaopen_fgui_TransitionActionType(lua_State *L) +{ + olua_require(L, "fairygui", luaopen_fairygui); + if (!olua_getclass(L, "fgui.TransitionActionType")) { + luaL_error(L, "class not found: fairygui::TransitionActionType"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_fgui_FillMethod(lua_State *L) { oluacls_class(L, "fgui.FillMethod"); oluacls_func(L, "__index", olua_indexerror); @@ -7660,10 +8919,19 @@ OLUA_LIB int luaopen_fairygui_FillMethod(lua_State *L) return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_fairygui_FillOrigin(lua_State *L) +OLUA_LIB int luaopen_fgui_FillMethod(lua_State *L) +{ + olua_require(L, "fairygui", luaopen_fairygui); + if (!olua_getclass(L, "fgui.FillMethod")) { + luaL_error(L, "class not found: fairygui::FillMethod"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_fgui_FillOrigin(lua_State *L) { oluacls_class(L, "fgui.FillOrigin"); oluacls_func(L, "__index", olua_indexerror); @@ -7675,10 +8943,19 @@ OLUA_LIB int luaopen_fairygui_FillOrigin(lua_State *L) return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_fairygui_ObjectPropID(lua_State *L) +OLUA_LIB int luaopen_fgui_FillOrigin(lua_State *L) +{ + olua_require(L, "fairygui", luaopen_fairygui); + if (!olua_getclass(L, "fgui.FillOrigin")) { + luaL_error(L, "class not found: fairygui::FillOrigin"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_fgui_ObjectPropID(lua_State *L) { oluacls_class(L, "fgui.ObjectPropID"); oluacls_func(L, "__index", olua_indexerror); @@ -7696,9 +8973,19 @@ OLUA_LIB int luaopen_fairygui_ObjectPropID(lua_State *L) return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_fgui_ObjectPropID(lua_State *L) +{ + olua_require(L, "fairygui", luaopen_fairygui); + if (!olua_getclass(L, "fgui.ObjectPropID")) { + luaL_error(L, "class not found: fairygui::ObjectPropID"); + } + return 1; +} OLUA_END_DECLS -static int _fairygui_GController_getPageCount(lua_State *L) +static int _olua_fun_fairygui_GController_autoRadioGroupDepth$1(lua_State *L) { olua_startinvoke(L); @@ -7706,62 +8993,174 @@ static int _fairygui_GController_getPageCount(lua_State *L) olua_to_object(L, 1, &self, "fgui.GController"); - // int getPageCount() - int ret = self->getPageCount(); - int num_ret = olua_push_integer(L, ret); + // bool autoRadioGroupDepth + bool ret = self->autoRadioGroupDepth; + int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); return num_ret; } -static int _fairygui_GController_getPageId(lua_State *L) +static int _olua_fun_fairygui_GController_autoRadioGroupDepth$2(lua_State *L) { olua_startinvoke(L); fairygui::GController *self = nullptr; - int arg1 = 0; /** index */ + bool arg1 = false; /** autoRadioGroupDepth */ olua_to_object(L, 1, &self, "fgui.GController"); - olua_check_integer(L, 2, &arg1); + olua_check_bool(L, 2, &arg1); - // const std::string &getPageId(int index) - const std::string &ret = self->getPageId(arg1); - int num_ret = olua_push_string(L, ret); + // bool autoRadioGroupDepth + self->autoRadioGroupDepth = arg1; olua_endinvoke(L); - return num_ret; + return 0; +} + +static int _olua_fun_fairygui_GController_autoRadioGroupDepth(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // bool autoRadioGroupDepth + return _olua_fun_fairygui_GController_autoRadioGroupDepth$1(L); + } + + if (num_args == 1) { + // if ((olua_is_bool(L, 2))) { + // bool autoRadioGroupDepth + return _olua_fun_fairygui_GController_autoRadioGroupDepth$2(L); + // } + } + + luaL_error(L, "method 'fairygui::GController::autoRadioGroupDepth' not support '%d' arguments", num_args); + + return 0; } -static int _fairygui_GController_getPageIndexById(lua_State *L) +static int _olua_fun_fairygui_GController_changing$1(lua_State *L) { olua_startinvoke(L); fairygui::GController *self = nullptr; - std::string arg1; /** value */ olua_to_object(L, 1, &self, "fgui.GController"); - olua_check_string(L, 2, &arg1); - // int getPageIndexById(const std::string &value) - int ret = self->getPageIndexById(arg1); - int num_ret = olua_push_integer(L, ret); + // bool changing + bool ret = self->changing; + int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); return num_ret; } -static int _fairygui_GController_getPageNameById(lua_State *L) +static int _olua_fun_fairygui_GController_changing$2(lua_State *L) { olua_startinvoke(L); fairygui::GController *self = nullptr; - std::string arg1; /** value */ + bool arg1 = false; /** changing */ olua_to_object(L, 1, &self, "fgui.GController"); - olua_check_string(L, 2, &arg1); + olua_check_bool(L, 2, &arg1); + + // bool changing + self->changing = arg1; + + olua_endinvoke(L); + + return 0; +} + +static int _olua_fun_fairygui_GController_changing(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // bool changing + return _olua_fun_fairygui_GController_changing$1(L); + } + + if (num_args == 1) { + // if ((olua_is_bool(L, 2))) { + // bool changing + return _olua_fun_fairygui_GController_changing$2(L); + // } + } + + luaL_error(L, "method 'fairygui::GController::changing' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_fairygui_GController_getPageCount(lua_State *L) +{ + olua_startinvoke(L); + + fairygui::GController *self = nullptr; + + olua_to_object(L, 1, &self, "fgui.GController"); + + // int getPageCount() + int ret = self->getPageCount(); + int num_ret = olua_push_integer(L, ret); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_fairygui_GController_getPageId(lua_State *L) +{ + olua_startinvoke(L); + + fairygui::GController *self = nullptr; + int arg1 = 0; /** index */ + + olua_to_object(L, 1, &self, "fgui.GController"); + olua_check_integer(L, 2, &arg1); + + // const std::string &getPageId(int index) + const std::string &ret = self->getPageId(arg1); + int num_ret = olua_push_string(L, ret); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_fairygui_GController_getPageIndexById(lua_State *L) +{ + olua_startinvoke(L); + + fairygui::GController *self = nullptr; + std::string arg1; /** value */ + + olua_to_object(L, 1, &self, "fgui.GController"); + olua_check_string(L, 2, &arg1); + + // int getPageIndexById(const std::string &value) + int ret = self->getPageIndexById(arg1); + int num_ret = olua_push_integer(L, ret); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_fairygui_GController_getPageNameById(lua_State *L) +{ + olua_startinvoke(L); + + fairygui::GController *self = nullptr; + std::string arg1; /** value */ + + olua_to_object(L, 1, &self, "fgui.GController"); + olua_check_string(L, 2, &arg1); // const std::string &getPageNameById(const std::string &value) const std::string &ret = self->getPageNameById(arg1); @@ -7772,7 +9171,7 @@ static int _fairygui_GController_getPageNameById(lua_State *L) return num_ret; } -static int _fairygui_GController_getParent(lua_State *L) +static int _olua_fun_fairygui_GController_getParent(lua_State *L) { olua_startinvoke(L); @@ -7789,7 +9188,7 @@ static int _fairygui_GController_getParent(lua_State *L) return num_ret; } -static int _fairygui_GController_getPreviousPage(lua_State *L) +static int _olua_fun_fairygui_GController_getPreviousPage(lua_State *L) { olua_startinvoke(L); @@ -7806,7 +9205,7 @@ static int _fairygui_GController_getPreviousPage(lua_State *L) return num_ret; } -static int _fairygui_GController_getPreviousPageId(lua_State *L) +static int _olua_fun_fairygui_GController_getPreviousPageId(lua_State *L) { olua_startinvoke(L); @@ -7823,7 +9222,7 @@ static int _fairygui_GController_getPreviousPageId(lua_State *L) return num_ret; } -static int _fairygui_GController_getPrevisousIndex(lua_State *L) +static int _olua_fun_fairygui_GController_getPrevisousIndex(lua_State *L) { olua_startinvoke(L); @@ -7840,7 +9239,7 @@ static int _fairygui_GController_getPrevisousIndex(lua_State *L) return num_ret; } -static int _fairygui_GController_getSelectedIndex(lua_State *L) +static int _olua_fun_fairygui_GController_getSelectedIndex(lua_State *L) { olua_startinvoke(L); @@ -7857,7 +9256,7 @@ static int _fairygui_GController_getSelectedIndex(lua_State *L) return num_ret; } -static int _fairygui_GController_getSelectedPage(lua_State *L) +static int _olua_fun_fairygui_GController_getSelectedPage(lua_State *L) { olua_startinvoke(L); @@ -7874,7 +9273,7 @@ static int _fairygui_GController_getSelectedPage(lua_State *L) return num_ret; } -static int _fairygui_GController_getSelectedPageId(lua_State *L) +static int _olua_fun_fairygui_GController_getSelectedPageId(lua_State *L) { olua_startinvoke(L); @@ -7891,7 +9290,7 @@ static int _fairygui_GController_getSelectedPageId(lua_State *L) return num_ret; } -static int _fairygui_GController_hasPage(lua_State *L) +static int _olua_fun_fairygui_GController_hasPage(lua_State *L) { olua_startinvoke(L); @@ -7910,11 +9309,67 @@ static int _fairygui_GController_hasPage(lua_State *L) return num_ret; } -static int _fairygui_GController_new(lua_State *L) +static int _olua_fun_fairygui_GController_name$1(lua_State *L) +{ + olua_startinvoke(L); + + fairygui::GController *self = nullptr; + + olua_to_object(L, 1, &self, "fgui.GController"); + + // std::string name + std::string ret = self->name; + int num_ret = olua_push_string(L, ret); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_fairygui_GController_name$2(lua_State *L) +{ + olua_startinvoke(L); + + fairygui::GController *self = nullptr; + std::string arg1; /** name */ + + olua_to_object(L, 1, &self, "fgui.GController"); + olua_check_string(L, 2, &arg1); + + // std::string name + self->name = arg1; + + olua_endinvoke(L); + + return 0; +} + +static int _olua_fun_fairygui_GController_name(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // std::string name + return _olua_fun_fairygui_GController_name$1(L); + } + + if (num_args == 1) { + // if ((olua_is_string(L, 2))) { + // std::string name + return _olua_fun_fairygui_GController_name$2(L); + // } + } + + luaL_error(L, "method 'fairygui::GController::name' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_fairygui_GController_new(lua_State *L) { olua_startinvoke(L); - // GController() + // fairygui::GController() fairygui::GController *ret = new fairygui::GController(); int num_ret = olua_push_object(L, ret, "fgui.GController"); olua_postnew(L, ret); @@ -7924,7 +9379,7 @@ static int _fairygui_GController_new(lua_State *L) return num_ret; } -static int _fairygui_GController_runActions(lua_State *L) +static int _olua_fun_fairygui_GController_runActions(lua_State *L) { olua_startinvoke(L); @@ -7940,7 +9395,7 @@ static int _fairygui_GController_runActions(lua_State *L) return 0; } -static int _fairygui_GController_setOppositePageId(lua_State *L) +static int _olua_fun_fairygui_GController_setOppositePageId(lua_State *L) { olua_startinvoke(L); @@ -7958,7 +9413,7 @@ static int _fairygui_GController_setOppositePageId(lua_State *L) return 0; } -static int _fairygui_GController_setParent(lua_State *L) +static int _olua_fun_fairygui_GController_setParent(lua_State *L) { olua_startinvoke(L); @@ -7976,7 +9431,7 @@ static int _fairygui_GController_setParent(lua_State *L) return 0; } -static int _fairygui_GController_setSelectedIndex$1(lua_State *L) +static int _olua_fun_fairygui_GController_setSelectedIndex$1(lua_State *L) { olua_startinvoke(L); @@ -7996,7 +9451,7 @@ static int _fairygui_GController_setSelectedIndex$1(lua_State *L) return 0; } -static int _fairygui_GController_setSelectedIndex$2(lua_State *L) +static int _olua_fun_fairygui_GController_setSelectedIndex$2(lua_State *L) { olua_startinvoke(L); @@ -8006,7 +9461,7 @@ static int _fairygui_GController_setSelectedIndex$2(lua_State *L) olua_to_object(L, 1, &self, "fgui.GController"); olua_check_integer(L, 2, &arg1); - // void setSelectedIndex(int value, @optional bool triggerEvent) + // void setSelectedIndex(int value) self->setSelectedIndex(arg1); olua_endinvoke(L); @@ -8014,21 +9469,21 @@ static int _fairygui_GController_setSelectedIndex$2(lua_State *L) return 0; } -static int _fairygui_GController_setSelectedIndex(lua_State *L) +static int _olua_fun_fairygui_GController_setSelectedIndex(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_integer(L, 2))) { - // void setSelectedIndex(int value, @optional bool triggerEvent) - return _fairygui_GController_setSelectedIndex$2(L); + // void setSelectedIndex(int value) + return _olua_fun_fairygui_GController_setSelectedIndex$2(L); // } } if (num_args == 2) { // if ((olua_is_integer(L, 2)) && (olua_is_bool(L, 3))) { // void setSelectedIndex(int value, @optional bool triggerEvent) - return _fairygui_GController_setSelectedIndex$1(L); + return _olua_fun_fairygui_GController_setSelectedIndex$1(L); // } } @@ -8037,7 +9492,7 @@ static int _fairygui_GController_setSelectedIndex(lua_State *L) return 0; } -static int _fairygui_GController_setSelectedPage$1(lua_State *L) +static int _olua_fun_fairygui_GController_setSelectedPage$1(lua_State *L) { olua_startinvoke(L); @@ -8057,7 +9512,7 @@ static int _fairygui_GController_setSelectedPage$1(lua_State *L) return 0; } -static int _fairygui_GController_setSelectedPage$2(lua_State *L) +static int _olua_fun_fairygui_GController_setSelectedPage$2(lua_State *L) { olua_startinvoke(L); @@ -8067,7 +9522,7 @@ static int _fairygui_GController_setSelectedPage$2(lua_State *L) olua_to_object(L, 1, &self, "fgui.GController"); olua_check_string(L, 2, &arg1); - // void setSelectedPage(const std::string &value, @optional bool triggerEvent) + // void setSelectedPage(const std::string &value) self->setSelectedPage(arg1); olua_endinvoke(L); @@ -8075,21 +9530,21 @@ static int _fairygui_GController_setSelectedPage$2(lua_State *L) return 0; } -static int _fairygui_GController_setSelectedPage(lua_State *L) +static int _olua_fun_fairygui_GController_setSelectedPage(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_string(L, 2))) { - // void setSelectedPage(const std::string &value, @optional bool triggerEvent) - return _fairygui_GController_setSelectedPage$2(L); + // void setSelectedPage(const std::string &value) + return _olua_fun_fairygui_GController_setSelectedPage$2(L); // } } if (num_args == 2) { // if ((olua_is_string(L, 2)) && (olua_is_bool(L, 3))) { // void setSelectedPage(const std::string &value, @optional bool triggerEvent) - return _fairygui_GController_setSelectedPage$1(L); + return _olua_fun_fairygui_GController_setSelectedPage$1(L); // } } @@ -8098,7 +9553,7 @@ static int _fairygui_GController_setSelectedPage(lua_State *L) return 0; } -static int _fairygui_GController_setSelectedPageId$1(lua_State *L) +static int _olua_fun_fairygui_GController_setSelectedPageId$1(lua_State *L) { olua_startinvoke(L); @@ -8118,7 +9573,7 @@ static int _fairygui_GController_setSelectedPageId$1(lua_State *L) return 0; } -static int _fairygui_GController_setSelectedPageId$2(lua_State *L) +static int _olua_fun_fairygui_GController_setSelectedPageId$2(lua_State *L) { olua_startinvoke(L); @@ -8128,7 +9583,7 @@ static int _fairygui_GController_setSelectedPageId$2(lua_State *L) olua_to_object(L, 1, &self, "fgui.GController"); olua_check_string(L, 2, &arg1); - // void setSelectedPageId(const std::string &value, @optional bool triggerEvent) + // void setSelectedPageId(const std::string &value) self->setSelectedPageId(arg1); olua_endinvoke(L); @@ -8136,21 +9591,21 @@ static int _fairygui_GController_setSelectedPageId$2(lua_State *L) return 0; } -static int _fairygui_GController_setSelectedPageId(lua_State *L) +static int _olua_fun_fairygui_GController_setSelectedPageId(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_string(L, 2))) { - // void setSelectedPageId(const std::string &value, @optional bool triggerEvent) - return _fairygui_GController_setSelectedPageId$2(L); + // void setSelectedPageId(const std::string &value) + return _olua_fun_fairygui_GController_setSelectedPageId$2(L); // } } if (num_args == 2) { // if ((olua_is_string(L, 2)) && (olua_is_bool(L, 3))) { // void setSelectedPageId(const std::string &value, @optional bool triggerEvent) - return _fairygui_GController_setSelectedPageId$1(L); + return _olua_fun_fairygui_GController_setSelectedPageId$1(L); // } } @@ -8159,151 +9614,55 @@ static int _fairygui_GController_setSelectedPageId(lua_State *L) return 0; } -static int _fairygui_GController_get_autoRadioGroupDepth(lua_State *L) -{ - olua_startinvoke(L); - - fairygui::GController *self = nullptr; - - olua_to_object(L, 1, &self, "fgui.GController"); - - // bool autoRadioGroupDepth - bool ret = self->autoRadioGroupDepth; - int num_ret = olua_push_bool(L, ret); - - olua_endinvoke(L); - - return num_ret; -} - -static int _fairygui_GController_set_autoRadioGroupDepth(lua_State *L) -{ - olua_startinvoke(L); - - fairygui::GController *self = nullptr; - bool arg1 = false; /** autoRadioGroupDepth */ - - olua_to_object(L, 1, &self, "fgui.GController"); - olua_check_bool(L, 2, &arg1); - - // bool autoRadioGroupDepth - self->autoRadioGroupDepth = arg1; - - olua_endinvoke(L); - - return 0; -} - -static int _fairygui_GController_get_changing(lua_State *L) -{ - olua_startinvoke(L); - - fairygui::GController *self = nullptr; - - olua_to_object(L, 1, &self, "fgui.GController"); - - // bool changing - bool ret = self->changing; - int num_ret = olua_push_bool(L, ret); - - olua_endinvoke(L); - - return num_ret; -} - -static int _fairygui_GController_set_changing(lua_State *L) -{ - olua_startinvoke(L); - - fairygui::GController *self = nullptr; - bool arg1 = false; /** changing */ - - olua_to_object(L, 1, &self, "fgui.GController"); - olua_check_bool(L, 2, &arg1); - - // bool changing - self->changing = arg1; - - olua_endinvoke(L); - - return 0; -} - -static int _fairygui_GController_get_name(lua_State *L) -{ - olua_startinvoke(L); - - fairygui::GController *self = nullptr; - - olua_to_object(L, 1, &self, "fgui.GController"); - - // std::string name - std::string ret = self->name; - int num_ret = olua_push_string(L, ret); - - olua_endinvoke(L); - - return num_ret; -} - -static int _fairygui_GController_set_name(lua_State *L) +static int _olua_cls_fgui_GController(lua_State *L) { - olua_startinvoke(L); - - fairygui::GController *self = nullptr; - std::string arg1; /** name */ - - olua_to_object(L, 1, &self, "fgui.GController"); - olua_check_string(L, 2, &arg1); - - // std::string name - self->name = arg1; - - olua_endinvoke(L); + oluacls_class(L, "fgui.GController"); + oluacls_func(L, "getPageCount", _olua_fun_fairygui_GController_getPageCount); + oluacls_func(L, "getPageId", _olua_fun_fairygui_GController_getPageId); + oluacls_func(L, "getPageIndexById", _olua_fun_fairygui_GController_getPageIndexById); + oluacls_func(L, "getPageNameById", _olua_fun_fairygui_GController_getPageNameById); + oluacls_func(L, "getParent", _olua_fun_fairygui_GController_getParent); + oluacls_func(L, "getPreviousPage", _olua_fun_fairygui_GController_getPreviousPage); + oluacls_func(L, "getPreviousPageId", _olua_fun_fairygui_GController_getPreviousPageId); + oluacls_func(L, "getPrevisousIndex", _olua_fun_fairygui_GController_getPrevisousIndex); + oluacls_func(L, "getSelectedIndex", _olua_fun_fairygui_GController_getSelectedIndex); + oluacls_func(L, "getSelectedPage", _olua_fun_fairygui_GController_getSelectedPage); + oluacls_func(L, "getSelectedPageId", _olua_fun_fairygui_GController_getSelectedPageId); + oluacls_func(L, "hasPage", _olua_fun_fairygui_GController_hasPage); + oluacls_func(L, "new", _olua_fun_fairygui_GController_new); + oluacls_func(L, "runActions", _olua_fun_fairygui_GController_runActions); + oluacls_func(L, "setOppositePageId", _olua_fun_fairygui_GController_setOppositePageId); + oluacls_func(L, "setParent", _olua_fun_fairygui_GController_setParent); + oluacls_func(L, "setSelectedIndex", _olua_fun_fairygui_GController_setSelectedIndex); + oluacls_func(L, "setSelectedPage", _olua_fun_fairygui_GController_setSelectedPage); + oluacls_func(L, "setSelectedPageId", _olua_fun_fairygui_GController_setSelectedPageId); + oluacls_prop(L, "pageCount", _olua_fun_fairygui_GController_getPageCount, nullptr); + oluacls_prop(L, "parent", _olua_fun_fairygui_GController_getParent, _olua_fun_fairygui_GController_setParent); + oluacls_prop(L, "previousPage", _olua_fun_fairygui_GController_getPreviousPage, nullptr); + oluacls_prop(L, "previousPageId", _olua_fun_fairygui_GController_getPreviousPageId, nullptr); + oluacls_prop(L, "previsousIndex", _olua_fun_fairygui_GController_getPrevisousIndex, nullptr); + oluacls_prop(L, "selectedIndex", _olua_fun_fairygui_GController_getSelectedIndex, nullptr); + oluacls_prop(L, "selectedPage", _olua_fun_fairygui_GController_getSelectedPage, nullptr); + oluacls_prop(L, "selectedPageId", _olua_fun_fairygui_GController_getSelectedPageId, nullptr); + oluacls_prop(L, "autoRadioGroupDepth", _olua_fun_fairygui_GController_autoRadioGroupDepth, _olua_fun_fairygui_GController_autoRadioGroupDepth); + oluacls_prop(L, "changing", _olua_fun_fairygui_GController_changing, _olua_fun_fairygui_GController_changing); + oluacls_prop(L, "name", _olua_fun_fairygui_GController_name, _olua_fun_fairygui_GController_name); - return 0; + return 1; } OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_fairygui_GController(lua_State *L) +OLUA_LIB int luaopen_fgui_GController(lua_State *L) { - oluacls_class(L, "fgui.GController"); - oluacls_func(L, "getPageCount", _fairygui_GController_getPageCount); - oluacls_func(L, "getPageId", _fairygui_GController_getPageId); - oluacls_func(L, "getPageIndexById", _fairygui_GController_getPageIndexById); - oluacls_func(L, "getPageNameById", _fairygui_GController_getPageNameById); - oluacls_func(L, "getParent", _fairygui_GController_getParent); - oluacls_func(L, "getPreviousPage", _fairygui_GController_getPreviousPage); - oluacls_func(L, "getPreviousPageId", _fairygui_GController_getPreviousPageId); - oluacls_func(L, "getPrevisousIndex", _fairygui_GController_getPrevisousIndex); - oluacls_func(L, "getSelectedIndex", _fairygui_GController_getSelectedIndex); - oluacls_func(L, "getSelectedPage", _fairygui_GController_getSelectedPage); - oluacls_func(L, "getSelectedPageId", _fairygui_GController_getSelectedPageId); - oluacls_func(L, "hasPage", _fairygui_GController_hasPage); - oluacls_func(L, "new", _fairygui_GController_new); - oluacls_func(L, "runActions", _fairygui_GController_runActions); - oluacls_func(L, "setOppositePageId", _fairygui_GController_setOppositePageId); - oluacls_func(L, "setParent", _fairygui_GController_setParent); - oluacls_func(L, "setSelectedIndex", _fairygui_GController_setSelectedIndex); - oluacls_func(L, "setSelectedPage", _fairygui_GController_setSelectedPage); - oluacls_func(L, "setSelectedPageId", _fairygui_GController_setSelectedPageId); - oluacls_prop(L, "pageCount", _fairygui_GController_getPageCount, nullptr); - oluacls_prop(L, "parent", _fairygui_GController_getParent, _fairygui_GController_setParent); - oluacls_prop(L, "previousPage", _fairygui_GController_getPreviousPage, nullptr); - oluacls_prop(L, "previousPageId", _fairygui_GController_getPreviousPageId, nullptr); - oluacls_prop(L, "previsousIndex", _fairygui_GController_getPrevisousIndex, nullptr); - oluacls_prop(L, "selectedIndex", _fairygui_GController_getSelectedIndex, _fairygui_GController_setSelectedIndex); - oluacls_prop(L, "selectedPage", _fairygui_GController_getSelectedPage, _fairygui_GController_setSelectedPage); - oluacls_prop(L, "selectedPageId", _fairygui_GController_getSelectedPageId, _fairygui_GController_setSelectedPageId); - oluacls_prop(L, "autoRadioGroupDepth", _fairygui_GController_get_autoRadioGroupDepth, _fairygui_GController_set_autoRadioGroupDepth); - oluacls_prop(L, "changing", _fairygui_GController_get_changing, _fairygui_GController_set_changing); - oluacls_prop(L, "name", _fairygui_GController_get_name, _fairygui_GController_set_name); - + olua_require(L, "fairygui", luaopen_fairygui); + if (!olua_getclass(L, "fgui.GController")) { + luaL_error(L, "class not found: fairygui::GController"); + } return 1; } OLUA_END_DECLS -static int _fairygui_GObject_addClickListener$1(lua_State *L) +static int _olua_fun_fairygui_GObject_addClickListener$1(lua_State *L) { olua_startinvoke(L); @@ -8315,9 +9674,10 @@ static int _fairygui_GObject_addClickListener$1(lua_State *L) void *cb_store = (void *)self; std::string cb_tag = makeListenerTag(L, fairygui::UIEventType::Click, 0); - std::string cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_NEW); + std::string cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_NEW); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](fairygui::EventContext *arg1) { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](fairygui::EventContext *cb_arg1) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); @@ -8325,7 +9685,7 @@ static int _fairygui_GObject_addClickListener$1(lua_State *L) int top = lua_gettop(L); size_t last = olua_push_objpool(L); olua_enable_objpool(L); - olua_push_object(L, arg1, "fgui.EventContext"); + olua_push_object(L, cb_arg1, "fgui.EventContext"); olua_disable_objpool(L); olua_callback(L, cb_store, cb_name.c_str(), 1); @@ -8336,7 +9696,7 @@ static int _fairygui_GObject_addClickListener$1(lua_State *L) } }; - // void addClickListener(@localvar const fairygui::EventCallback &callback) + // void addClickListener(const fairygui::EventCallback &callback) self->addClickListener(arg1); olua_endinvoke(L); @@ -8344,7 +9704,7 @@ static int _fairygui_GObject_addClickListener$1(lua_State *L) return 0; } -static int _fairygui_GObject_addClickListener$2(lua_State *L) +static int _olua_fun_fairygui_GObject_addClickListener$2(lua_State *L) { olua_startinvoke(L); @@ -8357,10 +9717,11 @@ static int _fairygui_GObject_addClickListener$2(lua_State *L) olua_check_fairygui_EventTag(L, 3, &arg2); void *cb_store = (void *)self; - std::string cb_tag = makeListenerTag(L, fairygui::UIEventType::Click, 3); - std::string cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_NEW); + std::string cb_tag = makeListenerTag(L, fairygui::UIEventType::Click, 0); + std::string cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_NEW); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](fairygui::EventContext *arg1) { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](fairygui::EventContext *cb_arg1) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); @@ -8368,7 +9729,7 @@ static int _fairygui_GObject_addClickListener$2(lua_State *L) int top = lua_gettop(L); size_t last = olua_push_objpool(L); olua_enable_objpool(L); - olua_push_object(L, arg1, "fgui.EventContext"); + olua_push_object(L, cb_arg1, "fgui.EventContext"); olua_disable_objpool(L); olua_callback(L, cb_store, cb_name.c_str(), 1); @@ -8379,7 +9740,7 @@ static int _fairygui_GObject_addClickListener$2(lua_State *L) } }; - // void addClickListener(@localvar const fairygui::EventCallback &callback, const fairygui::EventTag &tag) + // void addClickListener(const fairygui::EventCallback &callback, const fairygui::EventTag &tag) self->addClickListener(arg1, arg2); olua_endinvoke(L); @@ -8387,21 +9748,21 @@ static int _fairygui_GObject_addClickListener$2(lua_State *L) return 0; } -static int _fairygui_GObject_addClickListener(lua_State *L) +static int _olua_fun_fairygui_GObject_addClickListener(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_callback(L, 2, "fgui.EventCallback"))) { - // void addClickListener(@localvar const fairygui::EventCallback &callback) - return _fairygui_GObject_addClickListener$1(L); + // void addClickListener(const fairygui::EventCallback &callback) + return _olua_fun_fairygui_GObject_addClickListener$1(L); // } } if (num_args == 2) { // if ((olua_is_callback(L, 2, "fgui.EventCallback")) && (olua_is_fairygui_EventTag(L, 3))) { - // void addClickListener(@localvar const fairygui::EventCallback &callback, const fairygui::EventTag &tag) - return _fairygui_GObject_addClickListener$2(L); + // void addClickListener(const fairygui::EventCallback &callback, const fairygui::EventTag &tag) + return _olua_fun_fairygui_GObject_addClickListener$2(L); // } } @@ -8410,7 +9771,7 @@ static int _fairygui_GObject_addClickListener(lua_State *L) return 0; } -static int _fairygui_GObject_addDisplayLock(lua_State *L) +static int _olua_fun_fairygui_GObject_addDisplayLock(lua_State *L) { olua_startinvoke(L); @@ -8427,7 +9788,7 @@ static int _fairygui_GObject_addDisplayLock(lua_State *L) return num_ret; } -static int _fairygui_GObject_addRelation$1(lua_State *L) +static int _olua_fun_fairygui_GObject_addRelation$1(lua_State *L) { olua_startinvoke(L); @@ -8449,7 +9810,7 @@ static int _fairygui_GObject_addRelation$1(lua_State *L) return 0; } -static int _fairygui_GObject_addRelation$2(lua_State *L) +static int _olua_fun_fairygui_GObject_addRelation$2(lua_State *L) { olua_startinvoke(L); @@ -8461,7 +9822,7 @@ static int _fairygui_GObject_addRelation$2(lua_State *L) olua_check_object(L, 2, &arg1, "fgui.GObject"); olua_check_enum(L, 3, &arg2); - // void addRelation(fairygui::GObject *target, fairygui::RelationType relationType, @optional bool usePercent) + // void addRelation(fairygui::GObject *target, fairygui::RelationType relationType) self->addRelation(arg1, arg2); olua_endinvoke(L); @@ -8469,21 +9830,21 @@ static int _fairygui_GObject_addRelation$2(lua_State *L) return 0; } -static int _fairygui_GObject_addRelation(lua_State *L) +static int _olua_fun_fairygui_GObject_addRelation(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 2) { // if ((olua_is_object(L, 2, "fgui.GObject")) && (olua_is_enum(L, 3))) { - // void addRelation(fairygui::GObject *target, fairygui::RelationType relationType, @optional bool usePercent) - return _fairygui_GObject_addRelation$2(L); + // void addRelation(fairygui::GObject *target, fairygui::RelationType relationType) + return _olua_fun_fairygui_GObject_addRelation$2(L); // } } if (num_args == 3) { // if ((olua_is_object(L, 2, "fgui.GObject")) && (olua_is_enum(L, 3)) && (olua_is_bool(L, 4))) { // void addRelation(fairygui::GObject *target, fairygui::RelationType relationType, @optional bool usePercent) - return _fairygui_GObject_addRelation$1(L); + return _olua_fun_fairygui_GObject_addRelation$1(L); // } } @@ -8492,7 +9853,7 @@ static int _fairygui_GObject_addRelation(lua_State *L) return 0; } -static int _fairygui_GObject_center$1(lua_State *L) +static int _olua_fun_fairygui_GObject_center$1(lua_State *L) { olua_startinvoke(L); @@ -8515,7 +9876,7 @@ static int _fairygui_GObject_center$1(lua_State *L) return 0; } -static int _fairygui_GObject_center$2(lua_State *L) +static int _olua_fun_fairygui_GObject_center$2(lua_State *L) { olua_startinvoke(L); @@ -8528,7 +9889,7 @@ static int _fairygui_GObject_center$2(lua_State *L) luaL_error(L, "UIRoot and parent are both nullptr"); } - // void center(@optional bool restraint) + // void center() self->center(); olua_endinvoke(L); @@ -8536,19 +9897,19 @@ static int _fairygui_GObject_center$2(lua_State *L) return 0; } -static int _fairygui_GObject_center(lua_State *L) +static int _olua_fun_fairygui_GObject_center(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 0) { - // void center(@optional bool restraint) - return _fairygui_GObject_center$2(L); + // void center() + return _olua_fun_fairygui_GObject_center$2(L); } if (num_args == 1) { // if ((olua_is_bool(L, 2))) { // void center(@optional bool restraint) - return _fairygui_GObject_center$1(L); + return _olua_fun_fairygui_GObject_center$1(L); // } } @@ -8557,7 +9918,7 @@ static int _fairygui_GObject_center(lua_State *L) return 0; } -static int _fairygui_GObject_checkGearController(lua_State *L) +static int _olua_fun_fairygui_GObject_checkGearController(lua_State *L) { olua_startinvoke(L); @@ -8578,7 +9939,7 @@ static int _fairygui_GObject_checkGearController(lua_State *L) return num_ret; } -static int _fairygui_GObject_create(lua_State *L) +static int _olua_fun_fairygui_GObject_create(lua_State *L) { olua_startinvoke(L); @@ -8591,7 +9952,7 @@ static int _fairygui_GObject_create(lua_State *L) return num_ret; } -static int _fairygui_GObject_displayObject(lua_State *L) +static int _olua_fun_fairygui_GObject_displayObject(lua_State *L) { olua_startinvoke(L); @@ -8611,7 +9972,7 @@ static int _fairygui_GObject_displayObject(lua_State *L) return num_ret; } -static int _fairygui_GObject_findParent(lua_State *L) +static int _olua_fun_fairygui_GObject_findParent(lua_State *L) { olua_startinvoke(L); @@ -8628,7 +9989,7 @@ static int _fairygui_GObject_findParent(lua_State *L) return num_ret; } -static int _fairygui_GObject_getAlpha(lua_State *L) +static int _olua_fun_fairygui_GObject_getAlpha(lua_State *L) { olua_startinvoke(L); @@ -8645,7 +10006,7 @@ static int _fairygui_GObject_getAlpha(lua_State *L) return num_ret; } -static int _fairygui_GObject_getCustomData(lua_State *L) +static int _olua_fun_fairygui_GObject_getCustomData(lua_State *L) { olua_startinvoke(L); @@ -8662,7 +10023,7 @@ static int _fairygui_GObject_getCustomData(lua_State *L) return num_ret; } -static int _fairygui_GObject_getData(lua_State *L) +static int _olua_fun_fairygui_GObject_getData(lua_State *L) { olua_startinvoke(L); @@ -8679,7 +10040,7 @@ static int _fairygui_GObject_getData(lua_State *L) return num_ret; } -static int _fairygui_GObject_getDragBounds(lua_State *L) +static int _olua_fun_fairygui_GObject_getDragBounds(lua_State *L) { olua_startinvoke(L); @@ -8696,7 +10057,7 @@ static int _fairygui_GObject_getDragBounds(lua_State *L) return num_ret; } -static int _fairygui_GObject_getDraggingObject(lua_State *L) +static int _olua_fun_fairygui_GObject_getDraggingObject(lua_State *L) { olua_startinvoke(L); @@ -8709,7 +10070,7 @@ static int _fairygui_GObject_getDraggingObject(lua_State *L) return num_ret; } -static int _fairygui_GObject_getGear(lua_State *L) +static int _olua_fun_fairygui_GObject_getGear(lua_State *L) { olua_startinvoke(L); @@ -8728,7 +10089,7 @@ static int _fairygui_GObject_getGear(lua_State *L) return num_ret; } -static int _fairygui_GObject_getGroup(lua_State *L) +static int _olua_fun_fairygui_GObject_getGroup(lua_State *L) { olua_startinvoke(L); @@ -8748,7 +10109,7 @@ static int _fairygui_GObject_getGroup(lua_State *L) return num_ret; } -static int _fairygui_GObject_getHeight(lua_State *L) +static int _olua_fun_fairygui_GObject_getHeight(lua_State *L) { olua_startinvoke(L); @@ -8765,7 +10126,7 @@ static int _fairygui_GObject_getHeight(lua_State *L) return num_ret; } -static int _fairygui_GObject_getIcon(lua_State *L) +static int _olua_fun_fairygui_GObject_getIcon(lua_State *L) { olua_startinvoke(L); @@ -8782,7 +10143,7 @@ static int _fairygui_GObject_getIcon(lua_State *L) return num_ret; } -static int _fairygui_GObject_getPackageItem(lua_State *L) +static int _olua_fun_fairygui_GObject_getPackageItem(lua_State *L) { olua_startinvoke(L); @@ -8799,7 +10160,7 @@ static int _fairygui_GObject_getPackageItem(lua_State *L) return num_ret; } -static int _fairygui_GObject_getParent(lua_State *L) +static int _olua_fun_fairygui_GObject_getParent(lua_State *L) { olua_startinvoke(L); @@ -8816,7 +10177,7 @@ static int _fairygui_GObject_getParent(lua_State *L) return num_ret; } -static int _fairygui_GObject_getPivot(lua_State *L) +static int _olua_fun_fairygui_GObject_getPivot(lua_State *L) { olua_startinvoke(L); @@ -8833,7 +10194,7 @@ static int _fairygui_GObject_getPivot(lua_State *L) return num_ret; } -static int _fairygui_GObject_getPosition(lua_State *L) +static int _olua_fun_fairygui_GObject_getPosition(lua_State *L) { olua_startinvoke(L); @@ -8850,7 +10211,7 @@ static int _fairygui_GObject_getPosition(lua_State *L) return num_ret; } -static int _fairygui_GObject_getProp(lua_State *L) +static int _olua_fun_fairygui_GObject_getProp(lua_State *L) { olua_startinvoke(L); @@ -8869,7 +10230,7 @@ static int _fairygui_GObject_getProp(lua_State *L) return num_ret; } -static int _fairygui_GObject_getResourceURL(lua_State *L) +static int _olua_fun_fairygui_GObject_getResourceURL(lua_State *L) { olua_startinvoke(L); @@ -8886,7 +10247,7 @@ static int _fairygui_GObject_getResourceURL(lua_State *L) return num_ret; } -static int _fairygui_GObject_getRoot(lua_State *L) +static int _olua_fun_fairygui_GObject_getRoot(lua_State *L) { olua_startinvoke(L); @@ -8903,7 +10264,7 @@ static int _fairygui_GObject_getRoot(lua_State *L) return num_ret; } -static int _fairygui_GObject_getRotation(lua_State *L) +static int _olua_fun_fairygui_GObject_getRotation(lua_State *L) { olua_startinvoke(L); @@ -8920,7 +10281,7 @@ static int _fairygui_GObject_getRotation(lua_State *L) return num_ret; } -static int _fairygui_GObject_getScale(lua_State *L) +static int _olua_fun_fairygui_GObject_getScale(lua_State *L) { olua_startinvoke(L); @@ -8937,7 +10298,7 @@ static int _fairygui_GObject_getScale(lua_State *L) return num_ret; } -static int _fairygui_GObject_getScaleX(lua_State *L) +static int _olua_fun_fairygui_GObject_getScaleX(lua_State *L) { olua_startinvoke(L); @@ -8954,7 +10315,7 @@ static int _fairygui_GObject_getScaleX(lua_State *L) return num_ret; } -static int _fairygui_GObject_getScaleY(lua_State *L) +static int _olua_fun_fairygui_GObject_getScaleY(lua_State *L) { olua_startinvoke(L); @@ -8971,7 +10332,7 @@ static int _fairygui_GObject_getScaleY(lua_State *L) return num_ret; } -static int _fairygui_GObject_getSize(lua_State *L) +static int _olua_fun_fairygui_GObject_getSize(lua_State *L) { olua_startinvoke(L); @@ -8988,7 +10349,7 @@ static int _fairygui_GObject_getSize(lua_State *L) return num_ret; } -static int _fairygui_GObject_getSkewX(lua_State *L) +static int _olua_fun_fairygui_GObject_getSkewX(lua_State *L) { olua_startinvoke(L); @@ -9005,7 +10366,7 @@ static int _fairygui_GObject_getSkewX(lua_State *L) return num_ret; } -static int _fairygui_GObject_getSkewY(lua_State *L) +static int _olua_fun_fairygui_GObject_getSkewY(lua_State *L) { olua_startinvoke(L); @@ -9022,7 +10383,7 @@ static int _fairygui_GObject_getSkewY(lua_State *L) return num_ret; } -static int _fairygui_GObject_getSortingOrder(lua_State *L) +static int _olua_fun_fairygui_GObject_getSortingOrder(lua_State *L) { olua_startinvoke(L); @@ -9039,7 +10400,7 @@ static int _fairygui_GObject_getSortingOrder(lua_State *L) return num_ret; } -static int _fairygui_GObject_getText(lua_State *L) +static int _olua_fun_fairygui_GObject_getText(lua_State *L) { olua_startinvoke(L); @@ -9056,7 +10417,7 @@ static int _fairygui_GObject_getText(lua_State *L) return num_ret; } -static int _fairygui_GObject_getTooltips(lua_State *L) +static int _olua_fun_fairygui_GObject_getTooltips(lua_State *L) { olua_startinvoke(L); @@ -9073,7 +10434,7 @@ static int _fairygui_GObject_getTooltips(lua_State *L) return num_ret; } -static int _fairygui_GObject_getWidth(lua_State *L) +static int _olua_fun_fairygui_GObject_getWidth(lua_State *L) { olua_startinvoke(L); @@ -9090,7 +10451,7 @@ static int _fairygui_GObject_getWidth(lua_State *L) return num_ret; } -static int _fairygui_GObject_getX(lua_State *L) +static int _olua_fun_fairygui_GObject_getX(lua_State *L) { olua_startinvoke(L); @@ -9107,7 +10468,7 @@ static int _fairygui_GObject_getX(lua_State *L) return num_ret; } -static int _fairygui_GObject_getXMin(lua_State *L) +static int _olua_fun_fairygui_GObject_getXMin(lua_State *L) { olua_startinvoke(L); @@ -9124,7 +10485,7 @@ static int _fairygui_GObject_getXMin(lua_State *L) return num_ret; } -static int _fairygui_GObject_getY(lua_State *L) +static int _olua_fun_fairygui_GObject_getY(lua_State *L) { olua_startinvoke(L); @@ -9141,7 +10502,7 @@ static int _fairygui_GObject_getY(lua_State *L) return num_ret; } -static int _fairygui_GObject_getYMin(lua_State *L) +static int _olua_fun_fairygui_GObject_getYMin(lua_State *L) { olua_startinvoke(L); @@ -9158,64 +10519,64 @@ static int _fairygui_GObject_getYMin(lua_State *L) return num_ret; } -static int _fairygui_GObject_globalToLocal$1(lua_State *L) +static int _olua_fun_fairygui_GObject_globalToLocal$1(lua_State *L) { olua_startinvoke(L); fairygui::GObject *self = nullptr; - cocos2d::Vec2 arg1; /** pt */ + cocos2d::Vec2 *arg1; /** pt */ olua_to_object(L, 1, &self, "fgui.GObject"); olua_check_object(L, 2, &arg1, "cc.Vec2"); // cocos2d::Vec2 globalToLocal(const cocos2d::Vec2 &pt) - cocos2d::Vec2 ret = self->globalToLocal(arg1); - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec2"); + cocos2d::Vec2 ret = self->globalToLocal(*arg1); + int num_ret = olua_copy_object(L, ret, "cc.Vec2"); olua_endinvoke(L); return num_ret; } -static int _fairygui_GObject_globalToLocal$2(lua_State *L) +static int _olua_fun_fairygui_GObject_globalToLocal$2(lua_State *L) { olua_startinvoke(L); fairygui::GObject *self = nullptr; - cocos2d::Vec2 arg1; /** pt */ + cocos2d::Rect *arg1; /** rect */ olua_to_object(L, 1, &self, "fgui.GObject"); - olua_pack_object(L, 2, &arg1); + olua_check_object(L, 2, &arg1, "cc.Rect"); - // cocos2d::Vec2 globalToLocal(@pack const cocos2d::Vec2 &pt) - cocos2d::Vec2 ret = self->globalToLocal(arg1); - int num_ret = olua_unpack_object(L, &ret); + // cocos2d::Rect globalToLocal(const cocos2d::Rect &rect) + cocos2d::Rect ret = self->globalToLocal(*arg1); + int num_ret = olua_copy_object(L, ret, "cc.Rect"); olua_endinvoke(L); return num_ret; } -static int _fairygui_GObject_globalToLocal$3(lua_State *L) +static int _olua_fun_fairygui_GObject_globalToLocal$3(lua_State *L) { olua_startinvoke(L); fairygui::GObject *self = nullptr; - cocos2d::Rect arg1; /** rect */ + cocos2d::Vec2 arg1; /** pt */ olua_to_object(L, 1, &self, "fgui.GObject"); - olua_check_object(L, 2, &arg1, "cc.Rect"); + olua_pack_object(L, 2, &arg1); - // cocos2d::Rect globalToLocal(const cocos2d::Rect &rect) - cocos2d::Rect ret = self->globalToLocal(arg1); - int num_ret = olua_pushcopy_object(L, ret, "cc.Rect"); + // @unpack cocos2d::Vec2 globalToLocal(@pack const cocos2d::Vec2 &pt) + cocos2d::Vec2 ret = self->globalToLocal(arg1); + int num_ret = olua_unpack_object(L, &ret); olua_endinvoke(L); return num_ret; } -static int _fairygui_GObject_globalToLocal$4(lua_State *L) +static int _olua_fun_fairygui_GObject_globalToLocal$4(lua_State *L) { olua_startinvoke(L); @@ -9225,7 +10586,7 @@ static int _fairygui_GObject_globalToLocal$4(lua_State *L) olua_to_object(L, 1, &self, "fgui.GObject"); olua_pack_object(L, 2, &arg1); - // cocos2d::Rect globalToLocal(@pack const cocos2d::Rect &rect) + // @unpack cocos2d::Rect globalToLocal(@pack const cocos2d::Rect &rect) cocos2d::Rect ret = self->globalToLocal(arg1); int num_ret = olua_unpack_object(L, &ret); @@ -9234,33 +10595,33 @@ static int _fairygui_GObject_globalToLocal$4(lua_State *L) return num_ret; } -static int _fairygui_GObject_globalToLocal(lua_State *L) +static int _olua_fun_fairygui_GObject_globalToLocal(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { if ((olua_is_object(L, 2, "cc.Rect"))) { // cocos2d::Rect globalToLocal(const cocos2d::Rect &rect) - return _fairygui_GObject_globalToLocal$3(L); + return _olua_fun_fairygui_GObject_globalToLocal$2(L); } // if ((olua_is_object(L, 2, "cc.Vec2"))) { // cocos2d::Vec2 globalToLocal(const cocos2d::Vec2 &pt) - return _fairygui_GObject_globalToLocal$1(L); + return _olua_fun_fairygui_GObject_globalToLocal$1(L); // } } if (num_args == 2) { // if ((olua_canpack_object(L, 2, (cocos2d::Vec2 *)nullptr))) { - // cocos2d::Vec2 globalToLocal(@pack const cocos2d::Vec2 &pt) - return _fairygui_GObject_globalToLocal$2(L); + // @unpack cocos2d::Vec2 globalToLocal(@pack const cocos2d::Vec2 &pt) + return _olua_fun_fairygui_GObject_globalToLocal$3(L); // } } if (num_args == 4) { // if ((olua_canpack_object(L, 2, (cocos2d::Rect *)nullptr))) { - // cocos2d::Rect globalToLocal(@pack const cocos2d::Rect &rect) - return _fairygui_GObject_globalToLocal$4(L); + // @unpack cocos2d::Rect globalToLocal(@pack const cocos2d::Rect &rect) + return _olua_fun_fairygui_GObject_globalToLocal$4(L); // } } @@ -9269,12 +10630,12 @@ static int _fairygui_GObject_globalToLocal(lua_State *L) return 0; } -static int _fairygui_GObject_hitTest(lua_State *L) +static int _olua_fun_fairygui_GObject_hitTest(lua_State *L) { olua_startinvoke(L); fairygui::GObject *self = nullptr; - cocos2d::Vec2 arg1; /** worldPoint */ + cocos2d::Vec2 *arg1; /** worldPoint */ cocos2d::Camera *arg2 = nullptr; /** camera */ olua_to_object(L, 1, &self, "fgui.GObject"); @@ -9282,7 +10643,7 @@ static int _fairygui_GObject_hitTest(lua_State *L) olua_check_object(L, 3, &arg2, "cc.Camera"); // fairygui::GObject *hitTest(const cocos2d::Vec2 &worldPoint, const cocos2d::Camera *camera) - fairygui::GObject *ret = self->hitTest(arg1, arg2); + fairygui::GObject *ret = self->hitTest(*arg1, arg2); int num_ret = olua_push_object(L, ret, "fgui.GObject"); olua_endinvoke(L); @@ -9290,7 +10651,119 @@ static int _fairygui_GObject_hitTest(lua_State *L) return num_ret; } -static int _fairygui_GObject_isDraggable(lua_State *L) +static int _olua_fun_fairygui_GObject_id$1(lua_State *L) +{ + olua_startinvoke(L); + + fairygui::GObject *self = nullptr; + + olua_to_object(L, 1, &self, "fgui.GObject"); + + // std::string id + std::string ret = self->id; + int num_ret = olua_push_string(L, ret); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_fairygui_GObject_id$2(lua_State *L) +{ + olua_startinvoke(L); + + fairygui::GObject *self = nullptr; + std::string arg1; /** id */ + + olua_to_object(L, 1, &self, "fgui.GObject"); + olua_check_string(L, 2, &arg1); + + // std::string id + self->id = arg1; + + olua_endinvoke(L); + + return 0; +} + +static int _olua_fun_fairygui_GObject_id(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // std::string id + return _olua_fun_fairygui_GObject_id$1(L); + } + + if (num_args == 1) { + // if ((olua_is_string(L, 2))) { + // std::string id + return _olua_fun_fairygui_GObject_id$2(L); + // } + } + + luaL_error(L, "method 'fairygui::GObject::id' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_fairygui_GObject_initSize$1(lua_State *L) +{ + olua_startinvoke(L); + + fairygui::GObject *self = nullptr; + + olua_to_object(L, 1, &self, "fgui.GObject"); + + // cocos2d::Size initSize + cocos2d::Size &ret = self->initSize; + int num_ret = olua_copy_object(L, ret, "cc.Size"); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_fairygui_GObject_initSize$2(lua_State *L) +{ + olua_startinvoke(L); + + fairygui::GObject *self = nullptr; + cocos2d::Size *arg1; /** initSize */ + + olua_to_object(L, 1, &self, "fgui.GObject"); + olua_check_object(L, 2, &arg1, "cc.Size"); + + // cocos2d::Size initSize + self->initSize = *arg1; + + olua_endinvoke(L); + + return 0; +} + +static int _olua_fun_fairygui_GObject_initSize(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // cocos2d::Size initSize + return _olua_fun_fairygui_GObject_initSize$1(L); + } + + if (num_args == 1) { + // if ((olua_is_object(L, 2, "cc.Size"))) { + // cocos2d::Size initSize + return _olua_fun_fairygui_GObject_initSize$2(L); + // } + } + + luaL_error(L, "method 'fairygui::GObject::initSize' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_fairygui_GObject_isDraggable(lua_State *L) { olua_startinvoke(L); @@ -9307,7 +10780,7 @@ static int _fairygui_GObject_isDraggable(lua_State *L) return num_ret; } -static int _fairygui_GObject_isGrayed(lua_State *L) +static int _olua_fun_fairygui_GObject_isGrayed(lua_State *L) { olua_startinvoke(L); @@ -9324,7 +10797,7 @@ static int _fairygui_GObject_isGrayed(lua_State *L) return num_ret; } -static int _fairygui_GObject_isPivotAsAnchor(lua_State *L) +static int _olua_fun_fairygui_GObject_isPivotAsAnchor(lua_State *L) { olua_startinvoke(L); @@ -9341,7 +10814,7 @@ static int _fairygui_GObject_isPivotAsAnchor(lua_State *L) return num_ret; } -static int _fairygui_GObject_isPixelSnapping(lua_State *L) +static int _olua_fun_fairygui_GObject_isPixelSnapping(lua_State *L) { olua_startinvoke(L); @@ -9358,7 +10831,7 @@ static int _fairygui_GObject_isPixelSnapping(lua_State *L) return num_ret; } -static int _fairygui_GObject_isTouchable(lua_State *L) +static int _olua_fun_fairygui_GObject_isTouchable(lua_State *L) { olua_startinvoke(L); @@ -9375,7 +10848,7 @@ static int _fairygui_GObject_isTouchable(lua_State *L) return num_ret; } -static int _fairygui_GObject_isVisible(lua_State *L) +static int _olua_fun_fairygui_GObject_isVisible(lua_State *L) { olua_startinvoke(L); @@ -9392,64 +10865,64 @@ static int _fairygui_GObject_isVisible(lua_State *L) return num_ret; } -static int _fairygui_GObject_localToGlobal$1(lua_State *L) +static int _olua_fun_fairygui_GObject_localToGlobal$1(lua_State *L) { olua_startinvoke(L); fairygui::GObject *self = nullptr; - cocos2d::Vec2 arg1; /** pt */ + cocos2d::Vec2 *arg1; /** pt */ olua_to_object(L, 1, &self, "fgui.GObject"); olua_check_object(L, 2, &arg1, "cc.Vec2"); // cocos2d::Vec2 localToGlobal(const cocos2d::Vec2 &pt) - cocos2d::Vec2 ret = self->localToGlobal(arg1); - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec2"); + cocos2d::Vec2 ret = self->localToGlobal(*arg1); + int num_ret = olua_copy_object(L, ret, "cc.Vec2"); olua_endinvoke(L); return num_ret; } -static int _fairygui_GObject_localToGlobal$2(lua_State *L) +static int _olua_fun_fairygui_GObject_localToGlobal$2(lua_State *L) { olua_startinvoke(L); fairygui::GObject *self = nullptr; - cocos2d::Vec2 arg1; /** pt */ + cocos2d::Rect *arg1; /** rect */ olua_to_object(L, 1, &self, "fgui.GObject"); - olua_pack_object(L, 2, &arg1); + olua_check_object(L, 2, &arg1, "cc.Rect"); - // cocos2d::Vec2 localToGlobal(@pack const cocos2d::Vec2 &pt) - cocos2d::Vec2 ret = self->localToGlobal(arg1); - int num_ret = olua_unpack_object(L, &ret); + // cocos2d::Rect localToGlobal(const cocos2d::Rect &rect) + cocos2d::Rect ret = self->localToGlobal(*arg1); + int num_ret = olua_copy_object(L, ret, "cc.Rect"); olua_endinvoke(L); return num_ret; } -static int _fairygui_GObject_localToGlobal$3(lua_State *L) +static int _olua_fun_fairygui_GObject_localToGlobal$3(lua_State *L) { olua_startinvoke(L); fairygui::GObject *self = nullptr; - cocos2d::Rect arg1; /** rect */ + cocos2d::Vec2 arg1; /** pt */ olua_to_object(L, 1, &self, "fgui.GObject"); - olua_check_object(L, 2, &arg1, "cc.Rect"); + olua_pack_object(L, 2, &arg1); - // cocos2d::Rect localToGlobal(const cocos2d::Rect &rect) - cocos2d::Rect ret = self->localToGlobal(arg1); - int num_ret = olua_pushcopy_object(L, ret, "cc.Rect"); + // @unpack cocos2d::Vec2 localToGlobal(@pack const cocos2d::Vec2 &pt) + cocos2d::Vec2 ret = self->localToGlobal(arg1); + int num_ret = olua_unpack_object(L, &ret); olua_endinvoke(L); return num_ret; } -static int _fairygui_GObject_localToGlobal$4(lua_State *L) +static int _olua_fun_fairygui_GObject_localToGlobal$4(lua_State *L) { olua_startinvoke(L); @@ -9459,7 +10932,7 @@ static int _fairygui_GObject_localToGlobal$4(lua_State *L) olua_to_object(L, 1, &self, "fgui.GObject"); olua_pack_object(L, 2, &arg1); - // cocos2d::Rect localToGlobal(@pack const cocos2d::Rect &rect) + // @unpack cocos2d::Rect localToGlobal(@pack const cocos2d::Rect &rect) cocos2d::Rect ret = self->localToGlobal(arg1); int num_ret = olua_unpack_object(L, &ret); @@ -9468,33 +10941,33 @@ static int _fairygui_GObject_localToGlobal$4(lua_State *L) return num_ret; } -static int _fairygui_GObject_localToGlobal(lua_State *L) +static int _olua_fun_fairygui_GObject_localToGlobal(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { if ((olua_is_object(L, 2, "cc.Rect"))) { // cocos2d::Rect localToGlobal(const cocos2d::Rect &rect) - return _fairygui_GObject_localToGlobal$3(L); + return _olua_fun_fairygui_GObject_localToGlobal$2(L); } // if ((olua_is_object(L, 2, "cc.Vec2"))) { // cocos2d::Vec2 localToGlobal(const cocos2d::Vec2 &pt) - return _fairygui_GObject_localToGlobal$1(L); + return _olua_fun_fairygui_GObject_localToGlobal$1(L); // } } if (num_args == 2) { // if ((olua_canpack_object(L, 2, (cocos2d::Vec2 *)nullptr))) { - // cocos2d::Vec2 localToGlobal(@pack const cocos2d::Vec2 &pt) - return _fairygui_GObject_localToGlobal$2(L); + // @unpack cocos2d::Vec2 localToGlobal(@pack const cocos2d::Vec2 &pt) + return _olua_fun_fairygui_GObject_localToGlobal$3(L); // } } if (num_args == 4) { // if ((olua_canpack_object(L, 2, (cocos2d::Rect *)nullptr))) { - // cocos2d::Rect localToGlobal(@pack const cocos2d::Rect &rect) - return _fairygui_GObject_localToGlobal$4(L); + // @unpack cocos2d::Rect localToGlobal(@pack const cocos2d::Rect &rect) + return _olua_fun_fairygui_GObject_localToGlobal$4(L); // } } @@ -9503,7 +10976,7 @@ static int _fairygui_GObject_localToGlobal(lua_State *L) return 0; } -static int _fairygui_GObject_makeFullScreen(lua_State *L) +static int _olua_fun_fairygui_GObject_makeFullScreen(lua_State *L) { olua_startinvoke(L); @@ -9524,11 +10997,179 @@ static int _fairygui_GObject_makeFullScreen(lua_State *L) return 0; } -static int _fairygui_GObject_new(lua_State *L) +static int _olua_fun_fairygui_GObject_maxSize$1(lua_State *L) +{ + olua_startinvoke(L); + + fairygui::GObject *self = nullptr; + + olua_to_object(L, 1, &self, "fgui.GObject"); + + // cocos2d::Size maxSize + cocos2d::Size &ret = self->maxSize; + int num_ret = olua_copy_object(L, ret, "cc.Size"); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_fairygui_GObject_maxSize$2(lua_State *L) +{ + olua_startinvoke(L); + + fairygui::GObject *self = nullptr; + cocos2d::Size *arg1; /** maxSize */ + + olua_to_object(L, 1, &self, "fgui.GObject"); + olua_check_object(L, 2, &arg1, "cc.Size"); + + // cocos2d::Size maxSize + self->maxSize = *arg1; + + olua_endinvoke(L); + + return 0; +} + +static int _olua_fun_fairygui_GObject_maxSize(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // cocos2d::Size maxSize + return _olua_fun_fairygui_GObject_maxSize$1(L); + } + + if (num_args == 1) { + // if ((olua_is_object(L, 2, "cc.Size"))) { + // cocos2d::Size maxSize + return _olua_fun_fairygui_GObject_maxSize$2(L); + // } + } + + luaL_error(L, "method 'fairygui::GObject::maxSize' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_fairygui_GObject_minSize$1(lua_State *L) +{ + olua_startinvoke(L); + + fairygui::GObject *self = nullptr; + + olua_to_object(L, 1, &self, "fgui.GObject"); + + // cocos2d::Size minSize + cocos2d::Size &ret = self->minSize; + int num_ret = olua_copy_object(L, ret, "cc.Size"); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_fairygui_GObject_minSize$2(lua_State *L) +{ + olua_startinvoke(L); + + fairygui::GObject *self = nullptr; + cocos2d::Size *arg1; /** minSize */ + + olua_to_object(L, 1, &self, "fgui.GObject"); + olua_check_object(L, 2, &arg1, "cc.Size"); + + // cocos2d::Size minSize + self->minSize = *arg1; + + olua_endinvoke(L); + + return 0; +} + +static int _olua_fun_fairygui_GObject_minSize(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // cocos2d::Size minSize + return _olua_fun_fairygui_GObject_minSize$1(L); + } + + if (num_args == 1) { + // if ((olua_is_object(L, 2, "cc.Size"))) { + // cocos2d::Size minSize + return _olua_fun_fairygui_GObject_minSize$2(L); + // } + } + + luaL_error(L, "method 'fairygui::GObject::minSize' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_fairygui_GObject_name$1(lua_State *L) +{ + olua_startinvoke(L); + + fairygui::GObject *self = nullptr; + + olua_to_object(L, 1, &self, "fgui.GObject"); + + // std::string name + std::string ret = self->name; + int num_ret = olua_push_string(L, ret); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_fairygui_GObject_name$2(lua_State *L) +{ + olua_startinvoke(L); + + fairygui::GObject *self = nullptr; + std::string arg1; /** name */ + + olua_to_object(L, 1, &self, "fgui.GObject"); + olua_check_string(L, 2, &arg1); + + // std::string name + self->name = arg1; + + olua_endinvoke(L); + + return 0; +} + +static int _olua_fun_fairygui_GObject_name(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // std::string name + return _olua_fun_fairygui_GObject_name$1(L); + } + + if (num_args == 1) { + // if ((olua_is_string(L, 2))) { + // std::string name + return _olua_fun_fairygui_GObject_name$2(L); + // } + } + + luaL_error(L, "method 'fairygui::GObject::name' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_fairygui_GObject_new(lua_State *L) { olua_startinvoke(L); - // GObject() + // fairygui::GObject() fairygui::GObject *ret = new fairygui::GObject(); int num_ret = olua_push_object(L, ret, "fgui.GObject"); olua_postnew(L, ret); @@ -9538,7 +11179,7 @@ static int _fairygui_GObject_new(lua_State *L) return num_ret; } -static int _fairygui_GObject_onStage(lua_State *L) +static int _olua_fun_fairygui_GObject_onStage(lua_State *L) { olua_startinvoke(L); @@ -9555,7 +11196,7 @@ static int _fairygui_GObject_onStage(lua_State *L) return num_ret; } -static int _fairygui_GObject_relations(lua_State *L) +static int _olua_fun_fairygui_GObject_relations(lua_State *L) { olua_startinvoke(L); @@ -9572,7 +11213,7 @@ static int _fairygui_GObject_relations(lua_State *L) return num_ret; } -static int _fairygui_GObject_releaseDisplayLock(lua_State *L) +static int _olua_fun_fairygui_GObject_releaseDisplayLock(lua_State *L) { olua_startinvoke(L); @@ -9590,7 +11231,7 @@ static int _fairygui_GObject_releaseDisplayLock(lua_State *L) return 0; } -static int _fairygui_GObject_removeClickListener(lua_State *L) +static int _olua_fun_fairygui_GObject_removeClickListener(lua_State *L) { olua_startinvoke(L); @@ -9612,7 +11253,7 @@ static int _fairygui_GObject_removeClickListener(lua_State *L) return 0; } -static int _fairygui_GObject_removeFromParent(lua_State *L) +static int _olua_fun_fairygui_GObject_removeFromParent(lua_State *L) { olua_startinvoke(L); @@ -9628,7 +11269,7 @@ static int _fairygui_GObject_removeFromParent(lua_State *L) return 0; } -static int _fairygui_GObject_removeRelation(lua_State *L) +static int _olua_fun_fairygui_GObject_removeRelation(lua_State *L) { olua_startinvoke(L); @@ -9648,7 +11289,7 @@ static int _fairygui_GObject_removeRelation(lua_State *L) return 0; } -static int _fairygui_GObject_setAlpha(lua_State *L) +static int _olua_fun_fairygui_GObject_setAlpha(lua_State *L) { olua_startinvoke(L); @@ -9666,7 +11307,7 @@ static int _fairygui_GObject_setAlpha(lua_State *L) return 0; } -static int _fairygui_GObject_setCustomData(lua_State *L) +static int _olua_fun_fairygui_GObject_setCustomData(lua_State *L) { olua_startinvoke(L); @@ -9684,7 +11325,7 @@ static int _fairygui_GObject_setCustomData(lua_State *L) return 0; } -static int _fairygui_GObject_setData(lua_State *L) +static int _olua_fun_fairygui_GObject_setData(lua_State *L) { olua_startinvoke(L); @@ -9702,25 +11343,25 @@ static int _fairygui_GObject_setData(lua_State *L) return 0; } -static int _fairygui_GObject_setDragBounds(lua_State *L) +static int _olua_fun_fairygui_GObject_setDragBounds(lua_State *L) { olua_startinvoke(L); fairygui::GObject *self = nullptr; - cocos2d::Rect arg1; /** value */ + cocos2d::Rect *arg1; /** value */ olua_to_object(L, 1, &self, "fgui.GObject"); olua_check_object(L, 2, &arg1, "cc.Rect"); // void setDragBounds(const cocos2d::Rect &value) - self->setDragBounds(arg1); + self->setDragBounds(*arg1); olua_endinvoke(L); return 0; } -static int _fairygui_GObject_setDraggable(lua_State *L) +static int _olua_fun_fairygui_GObject_setDraggable(lua_State *L) { olua_startinvoke(L); @@ -9738,7 +11379,7 @@ static int _fairygui_GObject_setDraggable(lua_State *L) return 0; } -static int _fairygui_GObject_setGrayed(lua_State *L) +static int _olua_fun_fairygui_GObject_setGrayed(lua_State *L) { olua_startinvoke(L); @@ -9756,7 +11397,7 @@ static int _fairygui_GObject_setGrayed(lua_State *L) return 0; } -static int _fairygui_GObject_setGroup(lua_State *L) +static int _olua_fun_fairygui_GObject_setGroup(lua_State *L) { olua_startinvoke(L); @@ -9777,7 +11418,7 @@ static int _fairygui_GObject_setGroup(lua_State *L) return 0; } -static int _fairygui_GObject_setHeight(lua_State *L) +static int _olua_fun_fairygui_GObject_setHeight(lua_State *L) { olua_startinvoke(L); @@ -9795,7 +11436,7 @@ static int _fairygui_GObject_setHeight(lua_State *L) return 0; } -static int _fairygui_GObject_setIcon(lua_State *L) +static int _olua_fun_fairygui_GObject_setIcon(lua_State *L) { olua_startinvoke(L); @@ -9813,7 +11454,7 @@ static int _fairygui_GObject_setIcon(lua_State *L) return 0; } -static int _fairygui_GObject_setPivot$1(lua_State *L) +static int _olua_fun_fairygui_GObject_setPivot$1(lua_State *L) { olua_startinvoke(L); @@ -9835,7 +11476,7 @@ static int _fairygui_GObject_setPivot$1(lua_State *L) return 0; } -static int _fairygui_GObject_setPivot$2(lua_State *L) +static int _olua_fun_fairygui_GObject_setPivot$2(lua_State *L) { olua_startinvoke(L); @@ -9847,7 +11488,7 @@ static int _fairygui_GObject_setPivot$2(lua_State *L) olua_check_number(L, 2, &arg1); olua_check_number(L, 3, &arg2); - // void setPivot(float xv, float yv, @optional bool asAnchor) + // void setPivot(float xv, float yv) self->setPivot(arg1, arg2); olua_endinvoke(L); @@ -9855,21 +11496,21 @@ static int _fairygui_GObject_setPivot$2(lua_State *L) return 0; } -static int _fairygui_GObject_setPivot(lua_State *L) +static int _olua_fun_fairygui_GObject_setPivot(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 2) { // if ((olua_is_number(L, 2)) && (olua_is_number(L, 3))) { - // void setPivot(float xv, float yv, @optional bool asAnchor) - return _fairygui_GObject_setPivot$2(L); + // void setPivot(float xv, float yv) + return _olua_fun_fairygui_GObject_setPivot$2(L); // } } if (num_args == 3) { // if ((olua_is_number(L, 2)) && (olua_is_number(L, 3)) && (olua_is_bool(L, 4))) { // void setPivot(float xv, float yv, @optional bool asAnchor) - return _fairygui_GObject_setPivot$1(L); + return _olua_fun_fairygui_GObject_setPivot$1(L); // } } @@ -9878,7 +11519,7 @@ static int _fairygui_GObject_setPivot(lua_State *L) return 0; } -static int _fairygui_GObject_setPixelSnapping(lua_State *L) +static int _olua_fun_fairygui_GObject_setPixelSnapping(lua_State *L) { olua_startinvoke(L); @@ -9896,7 +11537,7 @@ static int _fairygui_GObject_setPixelSnapping(lua_State *L) return 0; } -static int _fairygui_GObject_setPosition(lua_State *L) +static int _olua_fun_fairygui_GObject_setPosition(lua_State *L) { olua_startinvoke(L); @@ -9916,7 +11557,7 @@ static int _fairygui_GObject_setPosition(lua_State *L) return 0; } -static int _fairygui_GObject_setProp(lua_State *L) +static int _olua_fun_fairygui_GObject_setProp(lua_State *L) { olua_startinvoke(L); @@ -9936,7 +11577,7 @@ static int _fairygui_GObject_setProp(lua_State *L) return 0; } -static int _fairygui_GObject_setRotation(lua_State *L) +static int _olua_fun_fairygui_GObject_setRotation(lua_State *L) { olua_startinvoke(L); @@ -9954,7 +11595,7 @@ static int _fairygui_GObject_setRotation(lua_State *L) return 0; } -static int _fairygui_GObject_setScale(lua_State *L) +static int _olua_fun_fairygui_GObject_setScale(lua_State *L) { olua_startinvoke(L); @@ -9974,7 +11615,7 @@ static int _fairygui_GObject_setScale(lua_State *L) return 0; } -static int _fairygui_GObject_setScaleX(lua_State *L) +static int _olua_fun_fairygui_GObject_setScaleX(lua_State *L) { olua_startinvoke(L); @@ -9992,7 +11633,7 @@ static int _fairygui_GObject_setScaleX(lua_State *L) return 0; } -static int _fairygui_GObject_setScaleY(lua_State *L) +static int _olua_fun_fairygui_GObject_setScaleY(lua_State *L) { olua_startinvoke(L); @@ -10010,7 +11651,7 @@ static int _fairygui_GObject_setScaleY(lua_State *L) return 0; } -static int _fairygui_GObject_setSize$1(lua_State *L) +static int _olua_fun_fairygui_GObject_setSize$1(lua_State *L) { olua_startinvoke(L); @@ -10032,7 +11673,7 @@ static int _fairygui_GObject_setSize$1(lua_State *L) return 0; } -static int _fairygui_GObject_setSize$2(lua_State *L) +static int _olua_fun_fairygui_GObject_setSize$2(lua_State *L) { olua_startinvoke(L); @@ -10044,7 +11685,7 @@ static int _fairygui_GObject_setSize$2(lua_State *L) olua_check_number(L, 2, &arg1); olua_check_number(L, 3, &arg2); - // void setSize(float wv, float hv, @optional bool ignorePivot) + // void setSize(float wv, float hv) self->setSize(arg1, arg2); olua_endinvoke(L); @@ -10052,21 +11693,21 @@ static int _fairygui_GObject_setSize$2(lua_State *L) return 0; } -static int _fairygui_GObject_setSize(lua_State *L) +static int _olua_fun_fairygui_GObject_setSize(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 2) { // if ((olua_is_number(L, 2)) && (olua_is_number(L, 3))) { - // void setSize(float wv, float hv, @optional bool ignorePivot) - return _fairygui_GObject_setSize$2(L); + // void setSize(float wv, float hv) + return _olua_fun_fairygui_GObject_setSize$2(L); // } } if (num_args == 3) { // if ((olua_is_number(L, 2)) && (olua_is_number(L, 3)) && (olua_is_bool(L, 4))) { // void setSize(float wv, float hv, @optional bool ignorePivot) - return _fairygui_GObject_setSize$1(L); + return _olua_fun_fairygui_GObject_setSize$1(L); // } } @@ -10075,7 +11716,7 @@ static int _fairygui_GObject_setSize(lua_State *L) return 0; } -static int _fairygui_GObject_setSkewX(lua_State *L) +static int _olua_fun_fairygui_GObject_setSkewX(lua_State *L) { olua_startinvoke(L); @@ -10093,7 +11734,7 @@ static int _fairygui_GObject_setSkewX(lua_State *L) return 0; } -static int _fairygui_GObject_setSkewY(lua_State *L) +static int _olua_fun_fairygui_GObject_setSkewY(lua_State *L) { olua_startinvoke(L); @@ -10111,7 +11752,7 @@ static int _fairygui_GObject_setSkewY(lua_State *L) return 0; } -static int _fairygui_GObject_setSortingOrder(lua_State *L) +static int _olua_fun_fairygui_GObject_setSortingOrder(lua_State *L) { olua_startinvoke(L); @@ -10129,7 +11770,7 @@ static int _fairygui_GObject_setSortingOrder(lua_State *L) return 0; } -static int _fairygui_GObject_setText(lua_State *L) +static int _olua_fun_fairygui_GObject_setText(lua_State *L) { olua_startinvoke(L); @@ -10147,7 +11788,7 @@ static int _fairygui_GObject_setText(lua_State *L) return 0; } -static int _fairygui_GObject_setTooltips(lua_State *L) +static int _olua_fun_fairygui_GObject_setTooltips(lua_State *L) { olua_startinvoke(L); @@ -10165,7 +11806,7 @@ static int _fairygui_GObject_setTooltips(lua_State *L) return 0; } -static int _fairygui_GObject_setTouchable(lua_State *L) +static int _olua_fun_fairygui_GObject_setTouchable(lua_State *L) { olua_startinvoke(L); @@ -10183,7 +11824,7 @@ static int _fairygui_GObject_setTouchable(lua_State *L) return 0; } -static int _fairygui_GObject_setVisible(lua_State *L) +static int _olua_fun_fairygui_GObject_setVisible(lua_State *L) { olua_startinvoke(L); @@ -10201,7 +11842,7 @@ static int _fairygui_GObject_setVisible(lua_State *L) return 0; } -static int _fairygui_GObject_setWidth(lua_State *L) +static int _olua_fun_fairygui_GObject_setWidth(lua_State *L) { olua_startinvoke(L); @@ -10219,7 +11860,7 @@ static int _fairygui_GObject_setWidth(lua_State *L) return 0; } -static int _fairygui_GObject_setX(lua_State *L) +static int _olua_fun_fairygui_GObject_setX(lua_State *L) { olua_startinvoke(L); @@ -10237,7 +11878,7 @@ static int _fairygui_GObject_setX(lua_State *L) return 0; } -static int _fairygui_GObject_setXMin(lua_State *L) +static int _olua_fun_fairygui_GObject_setXMin(lua_State *L) { olua_startinvoke(L); @@ -10255,7 +11896,7 @@ static int _fairygui_GObject_setXMin(lua_State *L) return 0; } -static int _fairygui_GObject_setY(lua_State *L) +static int _olua_fun_fairygui_GObject_setY(lua_State *L) { olua_startinvoke(L); @@ -10273,7 +11914,7 @@ static int _fairygui_GObject_setY(lua_State *L) return 0; } -static int _fairygui_GObject_setYMin(lua_State *L) +static int _olua_fun_fairygui_GObject_setYMin(lua_State *L) { olua_startinvoke(L); @@ -10291,335 +11932,199 @@ static int _fairygui_GObject_setYMin(lua_State *L) return 0; } -static int _fairygui_GObject_startDrag$1(lua_State *L) +static int _olua_fun_fairygui_GObject_sourceSize$1(lua_State *L) { olua_startinvoke(L); fairygui::GObject *self = nullptr; - int arg1 = 0; /** touchId */ olua_to_object(L, 1, &self, "fgui.GObject"); - olua_check_integer(L, 2, &arg1); - // void startDrag(@optional int touchId) - self->startDrag(arg1); + // cocos2d::Size sourceSize + cocos2d::Size &ret = self->sourceSize; + int num_ret = olua_copy_object(L, ret, "cc.Size"); olua_endinvoke(L); - return 0; + return num_ret; } -static int _fairygui_GObject_startDrag$2(lua_State *L) +static int _olua_fun_fairygui_GObject_sourceSize$2(lua_State *L) { olua_startinvoke(L); fairygui::GObject *self = nullptr; + cocos2d::Size *arg1; /** sourceSize */ olua_to_object(L, 1, &self, "fgui.GObject"); + olua_check_object(L, 2, &arg1, "cc.Size"); - // void startDrag(@optional int touchId) - self->startDrag(); + // cocos2d::Size sourceSize + self->sourceSize = *arg1; olua_endinvoke(L); return 0; } -static int _fairygui_GObject_startDrag(lua_State *L) +static int _olua_fun_fairygui_GObject_sourceSize(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 0) { - // void startDrag(@optional int touchId) - return _fairygui_GObject_startDrag$2(L); + // cocos2d::Size sourceSize + return _olua_fun_fairygui_GObject_sourceSize$1(L); } if (num_args == 1) { - // if ((olua_is_integer(L, 2))) { - // void startDrag(@optional int touchId) - return _fairygui_GObject_startDrag$1(L); + // if ((olua_is_object(L, 2, "cc.Size"))) { + // cocos2d::Size sourceSize + return _olua_fun_fairygui_GObject_sourceSize$2(L); // } } - luaL_error(L, "method 'fairygui::GObject::startDrag' not support '%d' arguments", num_args); + luaL_error(L, "method 'fairygui::GObject::sourceSize' not support '%d' arguments", num_args); return 0; } -static int _fairygui_GObject_stopDrag(lua_State *L) +static int _olua_fun_fairygui_GObject_startDrag$1(lua_State *L) { olua_startinvoke(L); fairygui::GObject *self = nullptr; + int arg1 = 0; /** touchId */ olua_to_object(L, 1, &self, "fgui.GObject"); + olua_check_integer(L, 2, &arg1); - // void stopDrag() - self->stopDrag(); + // void startDrag(@optional int touchId) + self->startDrag(arg1); olua_endinvoke(L); return 0; } -static int _fairygui_GObject_transformRect$1(lua_State *L) -{ - olua_startinvoke(L); - - fairygui::GObject *self = nullptr; - cocos2d::Rect arg1; /** rect */ - fairygui::GObject *arg2 = nullptr; /** targetSpace */ - - olua_to_object(L, 1, &self, "fgui.GObject"); - olua_check_object(L, 2, &arg1, "cc.Rect"); - olua_check_object(L, 3, &arg2, "fgui.GObject"); - - // cocos2d::Rect transformRect(const cocos2d::Rect &rect, fairygui::GObject *targetSpace) - cocos2d::Rect ret = self->transformRect(arg1, arg2); - int num_ret = olua_pushcopy_object(L, ret, "cc.Rect"); - - olua_endinvoke(L); - - return num_ret; -} - -static int _fairygui_GObject_transformRect$2(lua_State *L) +static int _olua_fun_fairygui_GObject_startDrag$2(lua_State *L) { olua_startinvoke(L); fairygui::GObject *self = nullptr; - cocos2d::Rect arg1; /** rect */ - fairygui::GObject *arg2 = nullptr; /** targetSpace */ olua_to_object(L, 1, &self, "fgui.GObject"); - olua_pack_object(L, 2, &arg1); - olua_check_object(L, 6, &arg2, "fgui.GObject"); - // cocos2d::Rect transformRect(@pack const cocos2d::Rect &rect, fairygui::GObject *targetSpace) - cocos2d::Rect ret = self->transformRect(arg1, arg2); - int num_ret = olua_unpack_object(L, &ret); + // void startDrag() + self->startDrag(); olua_endinvoke(L); - return num_ret; + return 0; } -static int _fairygui_GObject_transformRect(lua_State *L) +static int _olua_fun_fairygui_GObject_startDrag(lua_State *L) { int num_args = lua_gettop(L) - 1; - if (num_args == 2) { - // if ((olua_is_object(L, 2, "cc.Rect")) && (olua_is_object(L, 3, "fgui.GObject"))) { - // cocos2d::Rect transformRect(const cocos2d::Rect &rect, fairygui::GObject *targetSpace) - return _fairygui_GObject_transformRect$1(L); - // } + if (num_args == 0) { + // void startDrag() + return _olua_fun_fairygui_GObject_startDrag$2(L); } - if (num_args == 5) { - // if ((olua_canpack_object(L, 2, (cocos2d::Rect *)nullptr)) && (olua_is_object(L, 6, "fgui.GObject"))) { - // cocos2d::Rect transformRect(@pack const cocos2d::Rect &rect, fairygui::GObject *targetSpace) - return _fairygui_GObject_transformRect$2(L); + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // void startDrag(@optional int touchId) + return _olua_fun_fairygui_GObject_startDrag$1(L); // } } - luaL_error(L, "method 'fairygui::GObject::transformRect' not support '%d' arguments", num_args); - - return 0; -} - -static int _fairygui_GObject_treeNode(lua_State *L) -{ - olua_startinvoke(L); - - fairygui::GObject *self = nullptr; - - olua_to_object(L, 1, &self, "fgui.GObject"); - - // fairygui::GTreeNode *treeNode() - fairygui::GTreeNode *ret = self->treeNode(); - int num_ret = olua_push_object(L, ret, "fgui.GTreeNode"); - - olua_endinvoke(L); - - return num_ret; -} - -static int _fairygui_GObject_get_id(lua_State *L) -{ - olua_startinvoke(L); - - fairygui::GObject *self = nullptr; - - olua_to_object(L, 1, &self, "fgui.GObject"); - - // std::string id - std::string ret = self->id; - int num_ret = olua_push_string(L, ret); - - olua_endinvoke(L); - - return num_ret; -} - -static int _fairygui_GObject_set_id(lua_State *L) -{ - olua_startinvoke(L); - - fairygui::GObject *self = nullptr; - std::string arg1; /** id */ - - olua_to_object(L, 1, &self, "fgui.GObject"); - olua_check_string(L, 2, &arg1); - - // std::string id - self->id = arg1; - - olua_endinvoke(L); - - return 0; -} - -static int _fairygui_GObject_get_initSize(lua_State *L) -{ - olua_startinvoke(L); - - fairygui::GObject *self = nullptr; - - olua_to_object(L, 1, &self, "fgui.GObject"); - - // cocos2d::Size initSize - cocos2d::Size &ret = self->initSize; - int num_ret = olua_pushcopy_object(L, ret, "cc.Size"); - - olua_endinvoke(L); - - return num_ret; -} - -static int _fairygui_GObject_set_initSize(lua_State *L) -{ - olua_startinvoke(L); - - fairygui::GObject *self = nullptr; - cocos2d::Size arg1; /** initSize */ - - olua_to_object(L, 1, &self, "fgui.GObject"); - olua_check_object(L, 2, &arg1, "cc.Size"); - - // cocos2d::Size initSize - self->initSize = arg1; - - olua_endinvoke(L); + luaL_error(L, "method 'fairygui::GObject::startDrag' not support '%d' arguments", num_args); return 0; } -static int _fairygui_GObject_get_maxSize(lua_State *L) -{ - olua_startinvoke(L); - - fairygui::GObject *self = nullptr; - - olua_to_object(L, 1, &self, "fgui.GObject"); - - // cocos2d::Size maxSize - cocos2d::Size &ret = self->maxSize; - int num_ret = olua_pushcopy_object(L, ret, "cc.Size"); - - olua_endinvoke(L); - - return num_ret; -} - -static int _fairygui_GObject_set_maxSize(lua_State *L) +static int _olua_fun_fairygui_GObject_stopDrag(lua_State *L) { olua_startinvoke(L); fairygui::GObject *self = nullptr; - cocos2d::Size arg1; /** maxSize */ olua_to_object(L, 1, &self, "fgui.GObject"); - olua_check_object(L, 2, &arg1, "cc.Size"); - // cocos2d::Size maxSize - self->maxSize = arg1; + // void stopDrag() + self->stopDrag(); olua_endinvoke(L); return 0; } -static int _fairygui_GObject_get_minSize(lua_State *L) +static int _olua_fun_fairygui_GObject_transformRect$1(lua_State *L) { olua_startinvoke(L); fairygui::GObject *self = nullptr; + cocos2d::Rect *arg1; /** rect */ + fairygui::GObject *arg2 = nullptr; /** targetSpace */ olua_to_object(L, 1, &self, "fgui.GObject"); + olua_check_object(L, 2, &arg1, "cc.Rect"); + olua_check_object(L, 3, &arg2, "fgui.GObject"); - // cocos2d::Size minSize - cocos2d::Size &ret = self->minSize; - int num_ret = olua_pushcopy_object(L, ret, "cc.Size"); + // cocos2d::Rect transformRect(const cocos2d::Rect &rect, fairygui::GObject *targetSpace) + cocos2d::Rect ret = self->transformRect(*arg1, arg2); + int num_ret = olua_copy_object(L, ret, "cc.Rect"); olua_endinvoke(L); return num_ret; } -static int _fairygui_GObject_set_minSize(lua_State *L) -{ - olua_startinvoke(L); - - fairygui::GObject *self = nullptr; - cocos2d::Size arg1; /** minSize */ - - olua_to_object(L, 1, &self, "fgui.GObject"); - olua_check_object(L, 2, &arg1, "cc.Size"); - - // cocos2d::Size minSize - self->minSize = arg1; - - olua_endinvoke(L); - - return 0; -} - -static int _fairygui_GObject_get_name(lua_State *L) +static int _olua_fun_fairygui_GObject_transformRect$2(lua_State *L) { olua_startinvoke(L); fairygui::GObject *self = nullptr; + cocos2d::Rect arg1; /** rect */ + fairygui::GObject *arg2 = nullptr; /** targetSpace */ olua_to_object(L, 1, &self, "fgui.GObject"); + olua_pack_object(L, 2, &arg1); + olua_check_object(L, 6, &arg2, "fgui.GObject"); - // std::string name - std::string ret = self->name; - int num_ret = olua_push_string(L, ret); + // @unpack cocos2d::Rect transformRect(@pack const cocos2d::Rect &rect, fairygui::GObject *targetSpace) + cocos2d::Rect ret = self->transformRect(arg1, arg2); + int num_ret = olua_unpack_object(L, &ret); olua_endinvoke(L); return num_ret; } -static int _fairygui_GObject_set_name(lua_State *L) +static int _olua_fun_fairygui_GObject_transformRect(lua_State *L) { - olua_startinvoke(L); - - fairygui::GObject *self = nullptr; - std::string arg1; /** name */ + int num_args = lua_gettop(L) - 1; - olua_to_object(L, 1, &self, "fgui.GObject"); - olua_check_string(L, 2, &arg1); + if (num_args == 2) { + // if ((olua_is_object(L, 2, "cc.Rect")) && (olua_is_object(L, 3, "fgui.GObject"))) { + // cocos2d::Rect transformRect(const cocos2d::Rect &rect, fairygui::GObject *targetSpace) + return _olua_fun_fairygui_GObject_transformRect$1(L); + // } + } - // std::string name - self->name = arg1; + if (num_args == 5) { + // if ((olua_canpack_object(L, 2, (cocos2d::Rect *)nullptr)) && (olua_is_object(L, 6, "fgui.GObject"))) { + // @unpack cocos2d::Rect transformRect(@pack const cocos2d::Rect &rect, fairygui::GObject *targetSpace) + return _olua_fun_fairygui_GObject_transformRect$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'fairygui::GObject::transformRect' not support '%d' arguments", num_args); return 0; } -static int _fairygui_GObject_get_sourceSize(lua_State *L) +static int _olua_fun_fairygui_GObject_treeNode(lua_State *L) { olua_startinvoke(L); @@ -10627,176 +12132,167 @@ static int _fairygui_GObject_get_sourceSize(lua_State *L) olua_to_object(L, 1, &self, "fgui.GObject"); - // cocos2d::Size sourceSize - cocos2d::Size &ret = self->sourceSize; - int num_ret = olua_pushcopy_object(L, ret, "cc.Size"); + // fairygui::GTreeNode *treeNode() + fairygui::GTreeNode *ret = self->treeNode(); + int num_ret = olua_push_object(L, ret, "fgui.GTreeNode"); olua_endinvoke(L); return num_ret; } -static int _fairygui_GObject_set_sourceSize(lua_State *L) +static int _olua_cls_fgui_GObject(lua_State *L) { - olua_startinvoke(L); - - fairygui::GObject *self = nullptr; - cocos2d::Size arg1; /** sourceSize */ - - olua_to_object(L, 1, &self, "fgui.GObject"); - olua_check_object(L, 2, &arg1, "cc.Size"); - - // cocos2d::Size sourceSize - self->sourceSize = arg1; - - olua_endinvoke(L); + oluacls_class(L, "fgui.GObject"); + oluacls_func(L, "addClickListener", _olua_fun_fairygui_GObject_addClickListener); + oluacls_func(L, "addDisplayLock", _olua_fun_fairygui_GObject_addDisplayLock); + oluacls_func(L, "addRelation", _olua_fun_fairygui_GObject_addRelation); + oluacls_func(L, "center", _olua_fun_fairygui_GObject_center); + oluacls_func(L, "checkGearController", _olua_fun_fairygui_GObject_checkGearController); + oluacls_func(L, "create", _olua_fun_fairygui_GObject_create); + oluacls_func(L, "findParent", _olua_fun_fairygui_GObject_findParent); + oluacls_func(L, "getAlpha", _olua_fun_fairygui_GObject_getAlpha); + oluacls_func(L, "getCustomData", _olua_fun_fairygui_GObject_getCustomData); + oluacls_func(L, "getData", _olua_fun_fairygui_GObject_getData); + oluacls_func(L, "getDragBounds", _olua_fun_fairygui_GObject_getDragBounds); + oluacls_func(L, "getDraggingObject", _olua_fun_fairygui_GObject_getDraggingObject); + oluacls_func(L, "getGear", _olua_fun_fairygui_GObject_getGear); + oluacls_func(L, "getGroup", _olua_fun_fairygui_GObject_getGroup); + oluacls_func(L, "getHeight", _olua_fun_fairygui_GObject_getHeight); + oluacls_func(L, "getIcon", _olua_fun_fairygui_GObject_getIcon); + oluacls_func(L, "getPackageItem", _olua_fun_fairygui_GObject_getPackageItem); + oluacls_func(L, "getParent", _olua_fun_fairygui_GObject_getParent); + oluacls_func(L, "getPivot", _olua_fun_fairygui_GObject_getPivot); + oluacls_func(L, "getPosition", _olua_fun_fairygui_GObject_getPosition); + oluacls_func(L, "getProp", _olua_fun_fairygui_GObject_getProp); + oluacls_func(L, "getResourceURL", _olua_fun_fairygui_GObject_getResourceURL); + oluacls_func(L, "getRoot", _olua_fun_fairygui_GObject_getRoot); + oluacls_func(L, "getRotation", _olua_fun_fairygui_GObject_getRotation); + oluacls_func(L, "getScale", _olua_fun_fairygui_GObject_getScale); + oluacls_func(L, "getScaleX", _olua_fun_fairygui_GObject_getScaleX); + oluacls_func(L, "getScaleY", _olua_fun_fairygui_GObject_getScaleY); + oluacls_func(L, "getSize", _olua_fun_fairygui_GObject_getSize); + oluacls_func(L, "getSkewX", _olua_fun_fairygui_GObject_getSkewX); + oluacls_func(L, "getSkewY", _olua_fun_fairygui_GObject_getSkewY); + oluacls_func(L, "getSortingOrder", _olua_fun_fairygui_GObject_getSortingOrder); + oluacls_func(L, "getText", _olua_fun_fairygui_GObject_getText); + oluacls_func(L, "getTooltips", _olua_fun_fairygui_GObject_getTooltips); + oluacls_func(L, "getWidth", _olua_fun_fairygui_GObject_getWidth); + oluacls_func(L, "getX", _olua_fun_fairygui_GObject_getX); + oluacls_func(L, "getXMin", _olua_fun_fairygui_GObject_getXMin); + oluacls_func(L, "getY", _olua_fun_fairygui_GObject_getY); + oluacls_func(L, "getYMin", _olua_fun_fairygui_GObject_getYMin); + oluacls_func(L, "globalToLocal", _olua_fun_fairygui_GObject_globalToLocal); + oluacls_func(L, "hitTest", _olua_fun_fairygui_GObject_hitTest); + oluacls_func(L, "isDraggable", _olua_fun_fairygui_GObject_isDraggable); + oluacls_func(L, "isGrayed", _olua_fun_fairygui_GObject_isGrayed); + oluacls_func(L, "isPivotAsAnchor", _olua_fun_fairygui_GObject_isPivotAsAnchor); + oluacls_func(L, "isPixelSnapping", _olua_fun_fairygui_GObject_isPixelSnapping); + oluacls_func(L, "isTouchable", _olua_fun_fairygui_GObject_isTouchable); + oluacls_func(L, "isVisible", _olua_fun_fairygui_GObject_isVisible); + oluacls_func(L, "localToGlobal", _olua_fun_fairygui_GObject_localToGlobal); + oluacls_func(L, "makeFullScreen", _olua_fun_fairygui_GObject_makeFullScreen); + oluacls_func(L, "new", _olua_fun_fairygui_GObject_new); + oluacls_func(L, "onStage", _olua_fun_fairygui_GObject_onStage); + oluacls_func(L, "releaseDisplayLock", _olua_fun_fairygui_GObject_releaseDisplayLock); + oluacls_func(L, "removeClickListener", _olua_fun_fairygui_GObject_removeClickListener); + oluacls_func(L, "removeFromParent", _olua_fun_fairygui_GObject_removeFromParent); + oluacls_func(L, "removeRelation", _olua_fun_fairygui_GObject_removeRelation); + oluacls_func(L, "setAlpha", _olua_fun_fairygui_GObject_setAlpha); + oluacls_func(L, "setCustomData", _olua_fun_fairygui_GObject_setCustomData); + oluacls_func(L, "setData", _olua_fun_fairygui_GObject_setData); + oluacls_func(L, "setDragBounds", _olua_fun_fairygui_GObject_setDragBounds); + oluacls_func(L, "setDraggable", _olua_fun_fairygui_GObject_setDraggable); + oluacls_func(L, "setGrayed", _olua_fun_fairygui_GObject_setGrayed); + oluacls_func(L, "setGroup", _olua_fun_fairygui_GObject_setGroup); + oluacls_func(L, "setHeight", _olua_fun_fairygui_GObject_setHeight); + oluacls_func(L, "setIcon", _olua_fun_fairygui_GObject_setIcon); + oluacls_func(L, "setPivot", _olua_fun_fairygui_GObject_setPivot); + oluacls_func(L, "setPixelSnapping", _olua_fun_fairygui_GObject_setPixelSnapping); + oluacls_func(L, "setPosition", _olua_fun_fairygui_GObject_setPosition); + oluacls_func(L, "setProp", _olua_fun_fairygui_GObject_setProp); + oluacls_func(L, "setRotation", _olua_fun_fairygui_GObject_setRotation); + oluacls_func(L, "setScale", _olua_fun_fairygui_GObject_setScale); + oluacls_func(L, "setScaleX", _olua_fun_fairygui_GObject_setScaleX); + oluacls_func(L, "setScaleY", _olua_fun_fairygui_GObject_setScaleY); + oluacls_func(L, "setSize", _olua_fun_fairygui_GObject_setSize); + oluacls_func(L, "setSkewX", _olua_fun_fairygui_GObject_setSkewX); + oluacls_func(L, "setSkewY", _olua_fun_fairygui_GObject_setSkewY); + oluacls_func(L, "setSortingOrder", _olua_fun_fairygui_GObject_setSortingOrder); + oluacls_func(L, "setText", _olua_fun_fairygui_GObject_setText); + oluacls_func(L, "setTooltips", _olua_fun_fairygui_GObject_setTooltips); + oluacls_func(L, "setTouchable", _olua_fun_fairygui_GObject_setTouchable); + oluacls_func(L, "setVisible", _olua_fun_fairygui_GObject_setVisible); + oluacls_func(L, "setWidth", _olua_fun_fairygui_GObject_setWidth); + oluacls_func(L, "setX", _olua_fun_fairygui_GObject_setX); + oluacls_func(L, "setXMin", _olua_fun_fairygui_GObject_setXMin); + oluacls_func(L, "setY", _olua_fun_fairygui_GObject_setY); + oluacls_func(L, "setYMin", _olua_fun_fairygui_GObject_setYMin); + oluacls_func(L, "startDrag", _olua_fun_fairygui_GObject_startDrag); + oluacls_func(L, "stopDrag", _olua_fun_fairygui_GObject_stopDrag); + oluacls_func(L, "transformRect", _olua_fun_fairygui_GObject_transformRect); + oluacls_func(L, "treeNode", _olua_fun_fairygui_GObject_treeNode); + oluacls_prop(L, "alpha", _olua_fun_fairygui_GObject_getAlpha, _olua_fun_fairygui_GObject_setAlpha); + oluacls_prop(L, "customData", _olua_fun_fairygui_GObject_getCustomData, _olua_fun_fairygui_GObject_setCustomData); + oluacls_prop(L, "data", _olua_fun_fairygui_GObject_getData, _olua_fun_fairygui_GObject_setData); + oluacls_prop(L, "displayObject", _olua_fun_fairygui_GObject_displayObject, nullptr); + oluacls_prop(L, "dragBounds", _olua_fun_fairygui_GObject_getDragBounds, _olua_fun_fairygui_GObject_setDragBounds); + oluacls_prop(L, "draggable", _olua_fun_fairygui_GObject_isDraggable, _olua_fun_fairygui_GObject_setDraggable); + oluacls_prop(L, "draggingObject", _olua_fun_fairygui_GObject_getDraggingObject, nullptr); + oluacls_prop(L, "grayed", _olua_fun_fairygui_GObject_isGrayed, _olua_fun_fairygui_GObject_setGrayed); + oluacls_prop(L, "group", _olua_fun_fairygui_GObject_getGroup, _olua_fun_fairygui_GObject_setGroup); + oluacls_prop(L, "height", _olua_fun_fairygui_GObject_getHeight, _olua_fun_fairygui_GObject_setHeight); + oluacls_prop(L, "icon", _olua_fun_fairygui_GObject_getIcon, _olua_fun_fairygui_GObject_setIcon); + oluacls_prop(L, "packageItem", _olua_fun_fairygui_GObject_getPackageItem, nullptr); + oluacls_prop(L, "parent", _olua_fun_fairygui_GObject_getParent, nullptr); + oluacls_prop(L, "pivot", _olua_fun_fairygui_GObject_getPivot, nullptr); + oluacls_prop(L, "pivotAsAnchor", _olua_fun_fairygui_GObject_isPivotAsAnchor, nullptr); + oluacls_prop(L, "pixelSnapping", _olua_fun_fairygui_GObject_isPixelSnapping, _olua_fun_fairygui_GObject_setPixelSnapping); + oluacls_prop(L, "relations", _olua_fun_fairygui_GObject_relations, nullptr); + oluacls_prop(L, "resourceURL", _olua_fun_fairygui_GObject_getResourceURL, nullptr); + oluacls_prop(L, "root", _olua_fun_fairygui_GObject_getRoot, nullptr); + oluacls_prop(L, "rotation", _olua_fun_fairygui_GObject_getRotation, _olua_fun_fairygui_GObject_setRotation); + oluacls_prop(L, "scaleX", _olua_fun_fairygui_GObject_getScaleX, _olua_fun_fairygui_GObject_setScaleX); + oluacls_prop(L, "scaleY", _olua_fun_fairygui_GObject_getScaleY, _olua_fun_fairygui_GObject_setScaleY); + oluacls_prop(L, "size", _olua_fun_fairygui_GObject_getSize, nullptr); + oluacls_prop(L, "skewX", _olua_fun_fairygui_GObject_getSkewX, _olua_fun_fairygui_GObject_setSkewX); + oluacls_prop(L, "skewY", _olua_fun_fairygui_GObject_getSkewY, _olua_fun_fairygui_GObject_setSkewY); + oluacls_prop(L, "sortingOrder", _olua_fun_fairygui_GObject_getSortingOrder, _olua_fun_fairygui_GObject_setSortingOrder); + oluacls_prop(L, "text", _olua_fun_fairygui_GObject_getText, _olua_fun_fairygui_GObject_setText); + oluacls_prop(L, "tooltips", _olua_fun_fairygui_GObject_getTooltips, _olua_fun_fairygui_GObject_setTooltips); + oluacls_prop(L, "touchable", _olua_fun_fairygui_GObject_isTouchable, _olua_fun_fairygui_GObject_setTouchable); + oluacls_prop(L, "visible", _olua_fun_fairygui_GObject_isVisible, _olua_fun_fairygui_GObject_setVisible); + oluacls_prop(L, "width", _olua_fun_fairygui_GObject_getWidth, _olua_fun_fairygui_GObject_setWidth); + oluacls_prop(L, "x", _olua_fun_fairygui_GObject_getX, _olua_fun_fairygui_GObject_setX); + oluacls_prop(L, "xMin", _olua_fun_fairygui_GObject_getXMin, _olua_fun_fairygui_GObject_setXMin); + oluacls_prop(L, "y", _olua_fun_fairygui_GObject_getY, _olua_fun_fairygui_GObject_setY); + oluacls_prop(L, "yMin", _olua_fun_fairygui_GObject_getYMin, _olua_fun_fairygui_GObject_setYMin); + oluacls_prop(L, "id", _olua_fun_fairygui_GObject_id, _olua_fun_fairygui_GObject_id); + oluacls_prop(L, "initSize", _olua_fun_fairygui_GObject_initSize, _olua_fun_fairygui_GObject_initSize); + oluacls_prop(L, "maxSize", _olua_fun_fairygui_GObject_maxSize, _olua_fun_fairygui_GObject_maxSize); + oluacls_prop(L, "minSize", _olua_fun_fairygui_GObject_minSize, _olua_fun_fairygui_GObject_minSize); + oluacls_prop(L, "name", _olua_fun_fairygui_GObject_name, _olua_fun_fairygui_GObject_name); + oluacls_prop(L, "sourceSize", _olua_fun_fairygui_GObject_sourceSize, _olua_fun_fairygui_GObject_sourceSize); - return 0; + return 1; } OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_fairygui_GObject(lua_State *L) +OLUA_LIB int luaopen_fgui_GObject(lua_State *L) { - oluacls_class(L, "fgui.GObject"); - oluacls_func(L, "addClickListener", _fairygui_GObject_addClickListener); - oluacls_func(L, "addDisplayLock", _fairygui_GObject_addDisplayLock); - oluacls_func(L, "addRelation", _fairygui_GObject_addRelation); - oluacls_func(L, "center", _fairygui_GObject_center); - oluacls_func(L, "checkGearController", _fairygui_GObject_checkGearController); - oluacls_func(L, "create", _fairygui_GObject_create); - oluacls_func(L, "displayObject", _fairygui_GObject_displayObject); - oluacls_func(L, "findParent", _fairygui_GObject_findParent); - oluacls_func(L, "getAlpha", _fairygui_GObject_getAlpha); - oluacls_func(L, "getCustomData", _fairygui_GObject_getCustomData); - oluacls_func(L, "getData", _fairygui_GObject_getData); - oluacls_func(L, "getDragBounds", _fairygui_GObject_getDragBounds); - oluacls_func(L, "getDraggingObject", _fairygui_GObject_getDraggingObject); - oluacls_func(L, "getGear", _fairygui_GObject_getGear); - oluacls_func(L, "getGroup", _fairygui_GObject_getGroup); - oluacls_func(L, "getHeight", _fairygui_GObject_getHeight); - oluacls_func(L, "getIcon", _fairygui_GObject_getIcon); - oluacls_func(L, "getPackageItem", _fairygui_GObject_getPackageItem); - oluacls_func(L, "getParent", _fairygui_GObject_getParent); - oluacls_func(L, "getPivot", _fairygui_GObject_getPivot); - oluacls_func(L, "getPosition", _fairygui_GObject_getPosition); - oluacls_func(L, "getProp", _fairygui_GObject_getProp); - oluacls_func(L, "getResourceURL", _fairygui_GObject_getResourceURL); - oluacls_func(L, "getRoot", _fairygui_GObject_getRoot); - oluacls_func(L, "getRotation", _fairygui_GObject_getRotation); - oluacls_func(L, "getScale", _fairygui_GObject_getScale); - oluacls_func(L, "getScaleX", _fairygui_GObject_getScaleX); - oluacls_func(L, "getScaleY", _fairygui_GObject_getScaleY); - oluacls_func(L, "getSize", _fairygui_GObject_getSize); - oluacls_func(L, "getSkewX", _fairygui_GObject_getSkewX); - oluacls_func(L, "getSkewY", _fairygui_GObject_getSkewY); - oluacls_func(L, "getSortingOrder", _fairygui_GObject_getSortingOrder); - oluacls_func(L, "getText", _fairygui_GObject_getText); - oluacls_func(L, "getTooltips", _fairygui_GObject_getTooltips); - oluacls_func(L, "getWidth", _fairygui_GObject_getWidth); - oluacls_func(L, "getX", _fairygui_GObject_getX); - oluacls_func(L, "getXMin", _fairygui_GObject_getXMin); - oluacls_func(L, "getY", _fairygui_GObject_getY); - oluacls_func(L, "getYMin", _fairygui_GObject_getYMin); - oluacls_func(L, "globalToLocal", _fairygui_GObject_globalToLocal); - oluacls_func(L, "hitTest", _fairygui_GObject_hitTest); - oluacls_func(L, "isDraggable", _fairygui_GObject_isDraggable); - oluacls_func(L, "isGrayed", _fairygui_GObject_isGrayed); - oluacls_func(L, "isPivotAsAnchor", _fairygui_GObject_isPivotAsAnchor); - oluacls_func(L, "isPixelSnapping", _fairygui_GObject_isPixelSnapping); - oluacls_func(L, "isTouchable", _fairygui_GObject_isTouchable); - oluacls_func(L, "isVisible", _fairygui_GObject_isVisible); - oluacls_func(L, "localToGlobal", _fairygui_GObject_localToGlobal); - oluacls_func(L, "makeFullScreen", _fairygui_GObject_makeFullScreen); - oluacls_func(L, "new", _fairygui_GObject_new); - oluacls_func(L, "onStage", _fairygui_GObject_onStage); - oluacls_func(L, "relations", _fairygui_GObject_relations); - oluacls_func(L, "releaseDisplayLock", _fairygui_GObject_releaseDisplayLock); - oluacls_func(L, "removeClickListener", _fairygui_GObject_removeClickListener); - oluacls_func(L, "removeFromParent", _fairygui_GObject_removeFromParent); - oluacls_func(L, "removeRelation", _fairygui_GObject_removeRelation); - oluacls_func(L, "setAlpha", _fairygui_GObject_setAlpha); - oluacls_func(L, "setCustomData", _fairygui_GObject_setCustomData); - oluacls_func(L, "setData", _fairygui_GObject_setData); - oluacls_func(L, "setDragBounds", _fairygui_GObject_setDragBounds); - oluacls_func(L, "setDraggable", _fairygui_GObject_setDraggable); - oluacls_func(L, "setGrayed", _fairygui_GObject_setGrayed); - oluacls_func(L, "setGroup", _fairygui_GObject_setGroup); - oluacls_func(L, "setHeight", _fairygui_GObject_setHeight); - oluacls_func(L, "setIcon", _fairygui_GObject_setIcon); - oluacls_func(L, "setPivot", _fairygui_GObject_setPivot); - oluacls_func(L, "setPixelSnapping", _fairygui_GObject_setPixelSnapping); - oluacls_func(L, "setPosition", _fairygui_GObject_setPosition); - oluacls_func(L, "setProp", _fairygui_GObject_setProp); - oluacls_func(L, "setRotation", _fairygui_GObject_setRotation); - oluacls_func(L, "setScale", _fairygui_GObject_setScale); - oluacls_func(L, "setScaleX", _fairygui_GObject_setScaleX); - oluacls_func(L, "setScaleY", _fairygui_GObject_setScaleY); - oluacls_func(L, "setSize", _fairygui_GObject_setSize); - oluacls_func(L, "setSkewX", _fairygui_GObject_setSkewX); - oluacls_func(L, "setSkewY", _fairygui_GObject_setSkewY); - oluacls_func(L, "setSortingOrder", _fairygui_GObject_setSortingOrder); - oluacls_func(L, "setText", _fairygui_GObject_setText); - oluacls_func(L, "setTooltips", _fairygui_GObject_setTooltips); - oluacls_func(L, "setTouchable", _fairygui_GObject_setTouchable); - oluacls_func(L, "setVisible", _fairygui_GObject_setVisible); - oluacls_func(L, "setWidth", _fairygui_GObject_setWidth); - oluacls_func(L, "setX", _fairygui_GObject_setX); - oluacls_func(L, "setXMin", _fairygui_GObject_setXMin); - oluacls_func(L, "setY", _fairygui_GObject_setY); - oluacls_func(L, "setYMin", _fairygui_GObject_setYMin); - oluacls_func(L, "startDrag", _fairygui_GObject_startDrag); - oluacls_func(L, "stopDrag", _fairygui_GObject_stopDrag); - oluacls_func(L, "transformRect", _fairygui_GObject_transformRect); - oluacls_func(L, "treeNode", _fairygui_GObject_treeNode); - oluacls_prop(L, "alpha", _fairygui_GObject_getAlpha, _fairygui_GObject_setAlpha); - oluacls_prop(L, "customData", _fairygui_GObject_getCustomData, _fairygui_GObject_setCustomData); - oluacls_prop(L, "data", _fairygui_GObject_getData, _fairygui_GObject_setData); - oluacls_prop(L, "displayObject", _fairygui_GObject_displayObject, nullptr); - oluacls_prop(L, "dragBounds", _fairygui_GObject_getDragBounds, _fairygui_GObject_setDragBounds); - oluacls_prop(L, "draggable", _fairygui_GObject_isDraggable, _fairygui_GObject_setDraggable); - oluacls_prop(L, "draggingObject", _fairygui_GObject_getDraggingObject, nullptr); - oluacls_prop(L, "grayed", _fairygui_GObject_isGrayed, _fairygui_GObject_setGrayed); - oluacls_prop(L, "group", _fairygui_GObject_getGroup, _fairygui_GObject_setGroup); - oluacls_prop(L, "height", _fairygui_GObject_getHeight, _fairygui_GObject_setHeight); - oluacls_prop(L, "icon", _fairygui_GObject_getIcon, _fairygui_GObject_setIcon); - oluacls_prop(L, "packageItem", _fairygui_GObject_getPackageItem, nullptr); - oluacls_prop(L, "parent", _fairygui_GObject_getParent, nullptr); - oluacls_prop(L, "pivotAsAnchor", _fairygui_GObject_isPivotAsAnchor, nullptr); - oluacls_prop(L, "pixelSnapping", _fairygui_GObject_isPixelSnapping, _fairygui_GObject_setPixelSnapping); - oluacls_prop(L, "relations", _fairygui_GObject_relations, nullptr); - oluacls_prop(L, "resourceURL", _fairygui_GObject_getResourceURL, nullptr); - oluacls_prop(L, "root", _fairygui_GObject_getRoot, nullptr); - oluacls_prop(L, "rotation", _fairygui_GObject_getRotation, _fairygui_GObject_setRotation); - oluacls_prop(L, "scaleX", _fairygui_GObject_getScaleX, _fairygui_GObject_setScaleX); - oluacls_prop(L, "scaleY", _fairygui_GObject_getScaleY, _fairygui_GObject_setScaleY); - oluacls_prop(L, "skewX", _fairygui_GObject_getSkewX, _fairygui_GObject_setSkewX); - oluacls_prop(L, "skewY", _fairygui_GObject_getSkewY, _fairygui_GObject_setSkewY); - oluacls_prop(L, "sortingOrder", _fairygui_GObject_getSortingOrder, _fairygui_GObject_setSortingOrder); - oluacls_prop(L, "text", _fairygui_GObject_getText, _fairygui_GObject_setText); - oluacls_prop(L, "tooltips", _fairygui_GObject_getTooltips, _fairygui_GObject_setTooltips); - oluacls_prop(L, "touchable", _fairygui_GObject_isTouchable, _fairygui_GObject_setTouchable); - oluacls_prop(L, "visible", _fairygui_GObject_isVisible, _fairygui_GObject_setVisible); - oluacls_prop(L, "width", _fairygui_GObject_getWidth, _fairygui_GObject_setWidth); - oluacls_prop(L, "x", _fairygui_GObject_getX, _fairygui_GObject_setX); - oluacls_prop(L, "xMin", _fairygui_GObject_getXMin, _fairygui_GObject_setXMin); - oluacls_prop(L, "y", _fairygui_GObject_getY, _fairygui_GObject_setY); - oluacls_prop(L, "yMin", _fairygui_GObject_getYMin, _fairygui_GObject_setYMin); - oluacls_prop(L, "id", _fairygui_GObject_get_id, _fairygui_GObject_set_id); - oluacls_prop(L, "initSize", _fairygui_GObject_get_initSize, _fairygui_GObject_set_initSize); - oluacls_prop(L, "maxSize", _fairygui_GObject_get_maxSize, _fairygui_GObject_set_maxSize); - oluacls_prop(L, "minSize", _fairygui_GObject_get_minSize, _fairygui_GObject_set_minSize); - oluacls_prop(L, "name", _fairygui_GObject_get_name, _fairygui_GObject_set_name); - oluacls_prop(L, "sourceSize", _fairygui_GObject_get_sourceSize, _fairygui_GObject_set_sourceSize); - + olua_require(L, "fairygui", luaopen_fairygui); + if (!olua_getclass(L, "fgui.GObject")) { + luaL_error(L, "class not found: fairygui::GObject"); + } return 1; } OLUA_END_DECLS -static int _fairygui_GComponent_getController(lua_State *L); -static int _fairygui_GComponent_getTransition(lua_State *L); -static int _fairygui_GComponent_getChild(lua_State *L); +static int _olua_fun_fairygui_GComponent_getController(lua_State *L); +static int _olua_fun_fairygui_GComponent_getTransition(lua_State *L); +static int _olua_fun_fairygui_GComponent_getChild(lua_State *L); -static int _fairygui_GComponent___index(lua_State *L) +static int _olua_fun_fairygui_GComponent___index(lua_State *L) { olua_startinvoke(L); @@ -10826,7 +12322,7 @@ static int _fairygui_GComponent___index(lua_State *L) } } -static int _fairygui_GComponent_addChild(lua_State *L) +static int _olua_fun_fairygui_GComponent_addChild(lua_State *L) { olua_startinvoke(L); @@ -10848,7 +12344,7 @@ static int _fairygui_GComponent_addChild(lua_State *L) return num_ret; } -static int _fairygui_GComponent_addChildAt(lua_State *L) +static int _olua_fun_fairygui_GComponent_addChildAt(lua_State *L) { olua_startinvoke(L); @@ -10872,7 +12368,7 @@ static int _fairygui_GComponent_addChildAt(lua_State *L) return num_ret; } -static int _fairygui_GComponent_addController(lua_State *L) +static int _olua_fun_fairygui_GComponent_addController(lua_State *L) { olua_startinvoke(L); @@ -10893,7 +12389,7 @@ static int _fairygui_GComponent_addController(lua_State *L) return 0; } -static int _fairygui_GComponent_adjustRadioGroupDepth(lua_State *L) +static int _olua_fun_fairygui_GComponent_adjustRadioGroupDepth(lua_State *L) { olua_startinvoke(L); @@ -10913,7 +12409,7 @@ static int _fairygui_GComponent_adjustRadioGroupDepth(lua_State *L) return 0; } -static int _fairygui_GComponent_applyAllControllers(lua_State *L) +static int _olua_fun_fairygui_GComponent_applyAllControllers(lua_State *L) { olua_startinvoke(L); @@ -10929,7 +12425,7 @@ static int _fairygui_GComponent_applyAllControllers(lua_State *L) return 0; } -static int _fairygui_GComponent_applyController(lua_State *L) +static int _olua_fun_fairygui_GComponent_applyController(lua_State *L) { olua_startinvoke(L); @@ -10947,7 +12443,7 @@ static int _fairygui_GComponent_applyController(lua_State *L) return 0; } -static int _fairygui_GComponent_childSortingOrderChanged(lua_State *L) +static int _olua_fun_fairygui_GComponent_childSortingOrderChanged(lua_State *L) { olua_startinvoke(L); @@ -10969,7 +12465,7 @@ static int _fairygui_GComponent_childSortingOrderChanged(lua_State *L) return 0; } -static int _fairygui_GComponent_childStateChanged(lua_State *L) +static int _olua_fun_fairygui_GComponent_childStateChanged(lua_State *L) { olua_startinvoke(L); @@ -10987,7 +12483,7 @@ static int _fairygui_GComponent_childStateChanged(lua_State *L) return 0; } -static int _fairygui_GComponent_create(lua_State *L) +static int _olua_fun_fairygui_GComponent_create(lua_State *L) { olua_startinvoke(L); @@ -11000,7 +12496,7 @@ static int _fairygui_GComponent_create(lua_State *L) return num_ret; } -static int _fairygui_GComponent_ensureBoundsCorrect(lua_State *L) +static int _olua_fun_fairygui_GComponent_ensureBoundsCorrect(lua_State *L) { olua_startinvoke(L); @@ -11016,7 +12512,7 @@ static int _fairygui_GComponent_ensureBoundsCorrect(lua_State *L) return 0; } -static int _fairygui_GComponent_getApexIndex(lua_State *L) +static int _olua_fun_fairygui_GComponent_getApexIndex(lua_State *L) { olua_startinvoke(L); @@ -11033,7 +12529,7 @@ static int _fairygui_GComponent_getApexIndex(lua_State *L) return num_ret; } -static int _fairygui_GComponent_getBaseUserData(lua_State *L) +static int _olua_fun_fairygui_GComponent_getBaseUserData(lua_State *L) { olua_startinvoke(L); @@ -11050,7 +12546,7 @@ static int _fairygui_GComponent_getBaseUserData(lua_State *L) return num_ret; } -static int _fairygui_GComponent_getChild(lua_State *L) +static int _olua_fun_fairygui_GComponent_getChild(lua_State *L) { olua_startinvoke(L); @@ -11072,7 +12568,7 @@ static int _fairygui_GComponent_getChild(lua_State *L) return num_ret; } -static int _fairygui_GComponent_getChildAt(lua_State *L) +static int _olua_fun_fairygui_GComponent_getChildAt(lua_State *L) { olua_startinvoke(L); @@ -11094,7 +12590,7 @@ static int _fairygui_GComponent_getChildAt(lua_State *L) return num_ret; } -static int _fairygui_GComponent_getChildById(lua_State *L) +static int _olua_fun_fairygui_GComponent_getChildById(lua_State *L) { olua_startinvoke(L); @@ -11116,54 +12612,26 @@ static int _fairygui_GComponent_getChildById(lua_State *L) return num_ret; } -static int _fairygui_GComponent_resolve(lua_State *L) +static int _olua_fun_fairygui_GComponent_getChildByPath(lua_State *L) { olua_startinvoke(L); - auto self = olua_toobj(L, 1); - const char *name = olua_checkstring(L, 2); - char type = '.'; - while (true) { - const char *sep = strpbrk(name, ".~#"); - if (sep == name) { - type = *sep; - ++name; - continue; - } - if (!sep) { - sep = name + strlen(name); - } - if (type == '#') { - lua_pushcfunction(L, _fairygui_GComponent_getController); - } else if (type == '~') { - lua_pushcfunction(L, _fairygui_GComponent_getTransition); - } else { - lua_pushcfunction(L, _fairygui_GComponent_getChild); - } - olua_pushobj(L, self); - lua_pushlstring(L, name, sep - name); - lua_call(L, 2, 1); + fairygui::GComponent *self = nullptr; + std::string arg1; /** path */ - if (type != '.' || *sep == '\0') { - olua_endinvoke(L); + olua_to_object(L, 1, &self, "fgui.GComponent"); + olua_check_string(L, 2, &arg1); - return 1; - } else if (olua_isa(L, -1)) { - self = olua_toobj(L, -1); - name = sep; - } else { - olua_endinvoke(L); - - return 0; - } - } + // fairygui::GObject *getChildByPath(const std::string &path) + fairygui::GObject *ret = self->getChildByPath(arg1); + int num_ret = olua_push_object(L, ret, "fgui.GObject"); olua_endinvoke(L); - return 0; + return num_ret; } -static int _fairygui_GComponent_getChildInGroup(lua_State *L) +static int _olua_fun_fairygui_GComponent_getChildInGroup(lua_State *L) { olua_startinvoke(L); @@ -11187,7 +12655,7 @@ static int _fairygui_GComponent_getChildInGroup(lua_State *L) return num_ret; } -static int _fairygui_GComponent_getChildIndex(lua_State *L) +static int _olua_fun_fairygui_GComponent_getChildIndex(lua_State *L) { olua_startinvoke(L); @@ -11206,7 +12674,7 @@ static int _fairygui_GComponent_getChildIndex(lua_State *L) return num_ret; } -static int _fairygui_GComponent_getChildren(lua_State *L) +static int _olua_fun_fairygui_GComponent_getChildren(lua_State *L) { olua_startinvoke(L); @@ -11228,7 +12696,7 @@ static int _fairygui_GComponent_getChildren(lua_State *L) return num_ret; } -static int _fairygui_GComponent_getChildrenRenderOrder(lua_State *L) +static int _olua_fun_fairygui_GComponent_getChildrenRenderOrder(lua_State *L) { olua_startinvoke(L); @@ -11245,7 +12713,7 @@ static int _fairygui_GComponent_getChildrenRenderOrder(lua_State *L) return num_ret; } -static int _fairygui_GComponent_getController(lua_State *L) +static int _olua_fun_fairygui_GComponent_getController(lua_State *L) { olua_startinvoke(L); @@ -11267,7 +12735,7 @@ static int _fairygui_GComponent_getController(lua_State *L) return num_ret; } -static int _fairygui_GComponent_getControllerAt(lua_State *L) +static int _olua_fun_fairygui_GComponent_getControllerAt(lua_State *L) { olua_startinvoke(L); @@ -11289,7 +12757,7 @@ static int _fairygui_GComponent_getControllerAt(lua_State *L) return num_ret; } -static int _fairygui_GComponent_getControllers(lua_State *L) +static int _olua_fun_fairygui_GComponent_getControllers(lua_State *L) { olua_startinvoke(L); @@ -11311,7 +12779,7 @@ static int _fairygui_GComponent_getControllers(lua_State *L) return num_ret; } -static int _fairygui_GComponent_getFirstChildInView(lua_State *L) +static int _olua_fun_fairygui_GComponent_getFirstChildInView(lua_State *L) { olua_startinvoke(L); @@ -11328,7 +12796,7 @@ static int _fairygui_GComponent_getFirstChildInView(lua_State *L) return num_ret; } -static int _fairygui_GComponent_getHitArea(lua_State *L) +static int _olua_fun_fairygui_GComponent_getHitArea(lua_State *L) { olua_startinvoke(L); @@ -11345,7 +12813,7 @@ static int _fairygui_GComponent_getHitArea(lua_State *L) return num_ret; } -static int _fairygui_GComponent_getMargin(lua_State *L) +static int _olua_fun_fairygui_GComponent_getMargin(lua_State *L) { olua_startinvoke(L); @@ -11362,7 +12830,7 @@ static int _fairygui_GComponent_getMargin(lua_State *L) return num_ret; } -static int _fairygui_GComponent_getMask(lua_State *L) +static int _olua_fun_fairygui_GComponent_getMask(lua_State *L) { olua_startinvoke(L); @@ -11382,7 +12850,7 @@ static int _fairygui_GComponent_getMask(lua_State *L) return num_ret; } -static int _fairygui_GComponent_getOpaque(lua_State *L) +static int _olua_fun_fairygui_GComponent_getOpaque(lua_State *L) { olua_startinvoke(L); @@ -11399,7 +12867,7 @@ static int _fairygui_GComponent_getOpaque(lua_State *L) return num_ret; } -static int _fairygui_GComponent_getScrollPane(lua_State *L) +static int _olua_fun_fairygui_GComponent_getScrollPane(lua_State *L) { olua_startinvoke(L); @@ -11416,26 +12884,26 @@ static int _fairygui_GComponent_getScrollPane(lua_State *L) return num_ret; } -static int _fairygui_GComponent_getSnappingPosition(lua_State *L) +static int _olua_fun_fairygui_GComponent_getSnappingPosition(lua_State *L) { olua_startinvoke(L); fairygui::GComponent *self = nullptr; - cocos2d::Vec2 arg1; /** pt */ + cocos2d::Vec2 *arg1; /** pt */ olua_to_object(L, 1, &self, "fgui.GComponent"); olua_check_object(L, 2, &arg1, "cc.Vec2"); // cocos2d::Vec2 getSnappingPosition(const cocos2d::Vec2 &pt) - cocos2d::Vec2 ret = self->getSnappingPosition(arg1); - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec2"); + cocos2d::Vec2 ret = self->getSnappingPosition(*arg1); + int num_ret = olua_copy_object(L, ret, "cc.Vec2"); olua_endinvoke(L); return num_ret; } -static int _fairygui_GComponent_getTransition(lua_State *L) +static int _olua_fun_fairygui_GComponent_getTransition(lua_State *L) { olua_startinvoke(L); @@ -11457,7 +12925,7 @@ static int _fairygui_GComponent_getTransition(lua_State *L) return num_ret; } -static int _fairygui_GComponent_getTransitionAt(lua_State *L) +static int _olua_fun_fairygui_GComponent_getTransitionAt(lua_State *L) { olua_startinvoke(L); @@ -11479,7 +12947,7 @@ static int _fairygui_GComponent_getTransitionAt(lua_State *L) return num_ret; } -static int _fairygui_GComponent_getTransitions(lua_State *L) +static int _olua_fun_fairygui_GComponent_getTransitions(lua_State *L) { olua_startinvoke(L); @@ -11501,7 +12969,7 @@ static int _fairygui_GComponent_getTransitions(lua_State *L) return num_ret; } -static int _fairygui_GComponent_getViewHeight(lua_State *L) +static int _olua_fun_fairygui_GComponent_getViewHeight(lua_State *L) { olua_startinvoke(L); @@ -11518,7 +12986,7 @@ static int _fairygui_GComponent_getViewHeight(lua_State *L) return num_ret; } -static int _fairygui_GComponent_getViewWidth(lua_State *L) +static int _olua_fun_fairygui_GComponent_getViewWidth(lua_State *L) { olua_startinvoke(L); @@ -11535,7 +13003,7 @@ static int _fairygui_GComponent_getViewWidth(lua_State *L) return num_ret; } -static int _fairygui_GComponent_isAncestorOf(lua_State *L) +static int _olua_fun_fairygui_GComponent_isAncestorOf(lua_State *L) { olua_startinvoke(L); @@ -11554,7 +13022,7 @@ static int _fairygui_GComponent_isAncestorOf(lua_State *L) return num_ret; } -static int _fairygui_GComponent_isChildInView(lua_State *L) +static int _olua_fun_fairygui_GComponent_isChildInView(lua_State *L) { olua_startinvoke(L); @@ -11573,11 +13041,11 @@ static int _fairygui_GComponent_isChildInView(lua_State *L) return num_ret; } -static int _fairygui_GComponent_new(lua_State *L) +static int _olua_fun_fairygui_GComponent_new(lua_State *L) { olua_startinvoke(L); - // GComponent() + // fairygui::GComponent() fairygui::GComponent *ret = new fairygui::GComponent(); int num_ret = olua_push_object(L, ret, "fgui.GComponent"); olua_postnew(L, ret); @@ -11587,7 +13055,7 @@ static int _fairygui_GComponent_new(lua_State *L) return num_ret; } -static int _fairygui_GComponent_numChildren(lua_State *L) +static int _olua_fun_fairygui_GComponent_numChildren(lua_State *L) { olua_startinvoke(L); @@ -11604,7 +13072,7 @@ static int _fairygui_GComponent_numChildren(lua_State *L) return num_ret; } -static int _fairygui_GComponent_removeChild(lua_State *L) +static int _olua_fun_fairygui_GComponent_removeChild(lua_State *L) { olua_startinvoke(L); @@ -11625,7 +13093,7 @@ static int _fairygui_GComponent_removeChild(lua_State *L) return 0; } -static int _fairygui_GComponent_removeChildAt(lua_State *L) +static int _olua_fun_fairygui_GComponent_removeChildAt(lua_State *L) { olua_startinvoke(L); @@ -11649,7 +13117,7 @@ static int _fairygui_GComponent_removeChildAt(lua_State *L) return 0; } -static int _fairygui_GComponent_removeChildren$1(lua_State *L) +static int _olua_fun_fairygui_GComponent_removeChildren$1(lua_State *L) { olua_startinvoke(L); @@ -11671,7 +13139,7 @@ static int _fairygui_GComponent_removeChildren$1(lua_State *L) return 0; } -static int _fairygui_GComponent_removeChildren$2(lua_State *L) +static int _olua_fun_fairygui_GComponent_removeChildren$2(lua_State *L) { olua_startinvoke(L); @@ -11697,19 +13165,19 @@ static int _fairygui_GComponent_removeChildren$2(lua_State *L) return 0; } -static int _fairygui_GComponent_removeChildren(lua_State *L) +static int _olua_fun_fairygui_GComponent_removeChildren(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 0) { // @delref(children ~) void removeChildren() - return _fairygui_GComponent_removeChildren$1(L); + return _olua_fun_fairygui_GComponent_removeChildren$1(L); } if (num_args == 2) { // if ((olua_is_integer(L, 2)) && (olua_is_integer(L, 3))) { // @delref(children ~) void removeChildren(int beginIndex, int endIndex) - return _fairygui_GComponent_removeChildren$2(L); + return _olua_fun_fairygui_GComponent_removeChildren$2(L); // } } @@ -11718,7 +13186,7 @@ static int _fairygui_GComponent_removeChildren(lua_State *L) return 0; } -static int _fairygui_GComponent_removeController(lua_State *L) +static int _olua_fun_fairygui_GComponent_removeController(lua_State *L) { olua_startinvoke(L); @@ -11739,7 +13207,54 @@ static int _fairygui_GComponent_removeController(lua_State *L) return 0; } -static int _fairygui_GComponent_setApexIndex(lua_State *L) +static int _olua_fun_fairygui_GComponent_resolve(lua_State *L) +{ + olua_startinvoke(L); + + auto self = olua_toobj(L, 1); + const char *name = olua_checkstring(L, 2); + char type = '.'; + while (true) { + const char *sep = strpbrk(name, ".~#"); + if (sep == name) { + type = *sep; + ++name; + continue; + } + if (!sep) { + sep = name + strlen(name); + } + if (type == '#') { + lua_pushcfunction(L, _olua_fun_fairygui_GComponent_getController); + } else if (type == '~') { + lua_pushcfunction(L, _olua_fun_fairygui_GComponent_getTransition); + } else { + lua_pushcfunction(L, _olua_fun_fairygui_GComponent_getChild); + } + olua_pushobj(L, self); + lua_pushlstring(L, name, sep - name); + lua_call(L, 2, 1); + + if (type != '.' || *sep == '\0') { + olua_endinvoke(L); + + return 1; + } else if (olua_isa(L, -1)) { + self = olua_toobj(L, -1); + name = sep; + } else { + olua_endinvoke(L); + + return 0; + } + } + + olua_endinvoke(L); + + return 0; +} + +static int _olua_fun_fairygui_GComponent_setApexIndex(lua_State *L) { olua_startinvoke(L); @@ -11757,7 +13272,7 @@ static int _fairygui_GComponent_setApexIndex(lua_State *L) return 0; } -static int _fairygui_GComponent_setBoundsChangedFlag(lua_State *L) +static int _olua_fun_fairygui_GComponent_setBoundsChangedFlag(lua_State *L) { olua_startinvoke(L); @@ -11773,7 +13288,7 @@ static int _fairygui_GComponent_setBoundsChangedFlag(lua_State *L) return 0; } -static int _fairygui_GComponent_setChildIndex(lua_State *L) +static int _olua_fun_fairygui_GComponent_setChildIndex(lua_State *L) { olua_startinvoke(L); @@ -11793,7 +13308,7 @@ static int _fairygui_GComponent_setChildIndex(lua_State *L) return 0; } -static int _fairygui_GComponent_setChildIndexBefore(lua_State *L) +static int _olua_fun_fairygui_GComponent_setChildIndexBefore(lua_State *L) { olua_startinvoke(L); @@ -11814,7 +13329,7 @@ static int _fairygui_GComponent_setChildIndexBefore(lua_State *L) return num_ret; } -static int _fairygui_GComponent_setChildrenRenderOrder(lua_State *L) +static int _olua_fun_fairygui_GComponent_setChildrenRenderOrder(lua_State *L) { olua_startinvoke(L); @@ -11832,7 +13347,7 @@ static int _fairygui_GComponent_setChildrenRenderOrder(lua_State *L) return 0; } -static int _fairygui_GComponent_setHitArea(lua_State *L) +static int _olua_fun_fairygui_GComponent_setHitArea(lua_State *L) { olua_startinvoke(L); @@ -11850,25 +13365,25 @@ static int _fairygui_GComponent_setHitArea(lua_State *L) return 0; } -static int _fairygui_GComponent_setMargin(lua_State *L) +static int _olua_fun_fairygui_GComponent_setMargin(lua_State *L) { olua_startinvoke(L); fairygui::GComponent *self = nullptr; - fairygui::Margin arg1; /** value */ + fairygui::Margin *arg1; /** value */ olua_to_object(L, 1, &self, "fgui.GComponent"); olua_check_object(L, 2, &arg1, "fgui.Margin"); // void setMargin(const fairygui::Margin &value) - self->setMargin(arg1); + self->setMargin(*arg1); olua_endinvoke(L); return 0; } -static int _fairygui_GComponent_setMask$1(lua_State *L) +static int _olua_fun_fairygui_GComponent_setMask$1(lua_State *L) { olua_startinvoke(L); @@ -11891,7 +13406,7 @@ static int _fairygui_GComponent_setMask$1(lua_State *L) return 0; } -static int _fairygui_GComponent_setMask$2(lua_State *L) +static int _olua_fun_fairygui_GComponent_setMask$2(lua_State *L) { olua_startinvoke(L); @@ -11901,7 +13416,7 @@ static int _fairygui_GComponent_setMask$2(lua_State *L) olua_to_object(L, 1, &self, "fgui.GComponent"); olua_check_object(L, 2, &arg1, "cc.Node"); - // void setMask(@addref(^) cocos2d::Node *value, @optional bool inverted) + // void setMask(@addref(^) cocos2d::Node *value) self->setMask(arg1); // insert code after call @@ -11912,21 +13427,21 @@ static int _fairygui_GComponent_setMask$2(lua_State *L) return 0; } -static int _fairygui_GComponent_setMask(lua_State *L) +static int _olua_fun_fairygui_GComponent_setMask(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_object(L, 2, "cc.Node"))) { - // void setMask(@addref(^) cocos2d::Node *value, @optional bool inverted) - return _fairygui_GComponent_setMask$2(L); + // void setMask(@addref(^) cocos2d::Node *value) + return _olua_fun_fairygui_GComponent_setMask$2(L); // } } if (num_args == 2) { // if ((olua_is_object(L, 2, "cc.Node")) && (olua_is_bool(L, 3))) { // void setMask(@addref(^) cocos2d::Node *value, @optional bool inverted) - return _fairygui_GComponent_setMask$1(L); + return _olua_fun_fairygui_GComponent_setMask$1(L); // } } @@ -11935,7 +13450,7 @@ static int _fairygui_GComponent_setMask(lua_State *L) return 0; } -static int _fairygui_GComponent_setOpaque(lua_State *L) +static int _olua_fun_fairygui_GComponent_setOpaque(lua_State *L) { olua_startinvoke(L); @@ -11953,7 +13468,7 @@ static int _fairygui_GComponent_setOpaque(lua_State *L) return 0; } -static int _fairygui_GComponent_setViewHeight(lua_State *L) +static int _olua_fun_fairygui_GComponent_setViewHeight(lua_State *L) { olua_startinvoke(L); @@ -11971,7 +13486,7 @@ static int _fairygui_GComponent_setViewHeight(lua_State *L) return 0; } -static int _fairygui_GComponent_setViewWidth(lua_State *L) +static int _olua_fun_fairygui_GComponent_setViewWidth(lua_State *L) { olua_startinvoke(L); @@ -11989,7 +13504,7 @@ static int _fairygui_GComponent_setViewWidth(lua_State *L) return 0; } -static int _fairygui_GComponent_swapChildren(lua_State *L) +static int _olua_fun_fairygui_GComponent_swapChildren(lua_State *L) { olua_startinvoke(L); @@ -12009,7 +13524,7 @@ static int _fairygui_GComponent_swapChildren(lua_State *L) return 0; } -static int _fairygui_GComponent_swapChildrenAt(lua_State *L) +static int _olua_fun_fairygui_GComponent_swapChildrenAt(lua_State *L) { olua_startinvoke(L); @@ -12029,89 +13544,97 @@ static int _fairygui_GComponent_swapChildrenAt(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_fairygui_GComponent(lua_State *L) +static int _olua_cls_fgui_GComponent(lua_State *L) { oluacls_class(L, "fgui.GComponent"); - oluacls_func(L, "__index", _fairygui_GComponent___index); - oluacls_func(L, "addChild", _fairygui_GComponent_addChild); - oluacls_func(L, "addChildAt", _fairygui_GComponent_addChildAt); - oluacls_func(L, "addController", _fairygui_GComponent_addController); - oluacls_func(L, "adjustRadioGroupDepth", _fairygui_GComponent_adjustRadioGroupDepth); - oluacls_func(L, "applyAllControllers", _fairygui_GComponent_applyAllControllers); - oluacls_func(L, "applyController", _fairygui_GComponent_applyController); - oluacls_func(L, "childSortingOrderChanged", _fairygui_GComponent_childSortingOrderChanged); - oluacls_func(L, "childStateChanged", _fairygui_GComponent_childStateChanged); - oluacls_func(L, "create", _fairygui_GComponent_create); - oluacls_func(L, "ensureBoundsCorrect", _fairygui_GComponent_ensureBoundsCorrect); - oluacls_func(L, "getApexIndex", _fairygui_GComponent_getApexIndex); - oluacls_func(L, "getBaseUserData", _fairygui_GComponent_getBaseUserData); - oluacls_func(L, "getChild", _fairygui_GComponent_getChild); - oluacls_func(L, "getChildAt", _fairygui_GComponent_getChildAt); - oluacls_func(L, "getChildById", _fairygui_GComponent_getChildById); - oluacls_func(L, "getChildByPath", _fairygui_GComponent_resolve); - oluacls_func(L, "getChildInGroup", _fairygui_GComponent_getChildInGroup); - oluacls_func(L, "getChildIndex", _fairygui_GComponent_getChildIndex); - oluacls_func(L, "getChildren", _fairygui_GComponent_getChildren); - oluacls_func(L, "getChildrenRenderOrder", _fairygui_GComponent_getChildrenRenderOrder); - oluacls_func(L, "getController", _fairygui_GComponent_getController); - oluacls_func(L, "getControllerAt", _fairygui_GComponent_getControllerAt); - oluacls_func(L, "getControllers", _fairygui_GComponent_getControllers); - oluacls_func(L, "getFirstChildInView", _fairygui_GComponent_getFirstChildInView); - oluacls_func(L, "getHitArea", _fairygui_GComponent_getHitArea); - oluacls_func(L, "getMargin", _fairygui_GComponent_getMargin); - oluacls_func(L, "getMask", _fairygui_GComponent_getMask); - oluacls_func(L, "getOpaque", _fairygui_GComponent_getOpaque); - oluacls_func(L, "getScrollPane", _fairygui_GComponent_getScrollPane); - oluacls_func(L, "getSnappingPosition", _fairygui_GComponent_getSnappingPosition); - oluacls_func(L, "getTransition", _fairygui_GComponent_getTransition); - oluacls_func(L, "getTransitionAt", _fairygui_GComponent_getTransitionAt); - oluacls_func(L, "getTransitions", _fairygui_GComponent_getTransitions); - oluacls_func(L, "getViewHeight", _fairygui_GComponent_getViewHeight); - oluacls_func(L, "getViewWidth", _fairygui_GComponent_getViewWidth); - oluacls_func(L, "isAncestorOf", _fairygui_GComponent_isAncestorOf); - oluacls_func(L, "isChildInView", _fairygui_GComponent_isChildInView); - oluacls_func(L, "new", _fairygui_GComponent_new); - oluacls_func(L, "numChildren", _fairygui_GComponent_numChildren); - oluacls_func(L, "removeChild", _fairygui_GComponent_removeChild); - oluacls_func(L, "removeChildAt", _fairygui_GComponent_removeChildAt); - oluacls_func(L, "removeChildren", _fairygui_GComponent_removeChildren); - oluacls_func(L, "removeController", _fairygui_GComponent_removeController); - oluacls_func(L, "resolve", _fairygui_GComponent_resolve); - oluacls_func(L, "setApexIndex", _fairygui_GComponent_setApexIndex); - oluacls_func(L, "setBoundsChangedFlag", _fairygui_GComponent_setBoundsChangedFlag); - oluacls_func(L, "setChildIndex", _fairygui_GComponent_setChildIndex); - oluacls_func(L, "setChildIndexBefore", _fairygui_GComponent_setChildIndexBefore); - oluacls_func(L, "setChildrenRenderOrder", _fairygui_GComponent_setChildrenRenderOrder); - oluacls_func(L, "setHitArea", _fairygui_GComponent_setHitArea); - oluacls_func(L, "setMargin", _fairygui_GComponent_setMargin); - oluacls_func(L, "setMask", _fairygui_GComponent_setMask); - oluacls_func(L, "setOpaque", _fairygui_GComponent_setOpaque); - oluacls_func(L, "setViewHeight", _fairygui_GComponent_setViewHeight); - oluacls_func(L, "setViewWidth", _fairygui_GComponent_setViewWidth); - oluacls_func(L, "swapChildren", _fairygui_GComponent_swapChildren); - oluacls_func(L, "swapChildrenAt", _fairygui_GComponent_swapChildrenAt); - oluacls_prop(L, "apexIndex", _fairygui_GComponent_getApexIndex, _fairygui_GComponent_setApexIndex); - oluacls_prop(L, "baseUserData", _fairygui_GComponent_getBaseUserData, nullptr); - oluacls_prop(L, "children", _fairygui_GComponent_getChildren, nullptr); - oluacls_prop(L, "childrenRenderOrder", _fairygui_GComponent_getChildrenRenderOrder, _fairygui_GComponent_setChildrenRenderOrder); - oluacls_prop(L, "controllers", _fairygui_GComponent_getControllers, nullptr); - oluacls_prop(L, "firstChildInView", _fairygui_GComponent_getFirstChildInView, nullptr); - oluacls_prop(L, "hitArea", _fairygui_GComponent_getHitArea, _fairygui_GComponent_setHitArea); - oluacls_prop(L, "margin", _fairygui_GComponent_getMargin, _fairygui_GComponent_setMargin); - oluacls_prop(L, "mask", _fairygui_GComponent_getMask, _fairygui_GComponent_setMask); - oluacls_prop(L, "numChildren", _fairygui_GComponent_numChildren, nullptr); - oluacls_prop(L, "opaque", _fairygui_GComponent_getOpaque, _fairygui_GComponent_setOpaque); - oluacls_prop(L, "scrollPane", _fairygui_GComponent_getScrollPane, nullptr); - oluacls_prop(L, "transitions", _fairygui_GComponent_getTransitions, nullptr); - oluacls_prop(L, "viewHeight", _fairygui_GComponent_getViewHeight, _fairygui_GComponent_setViewHeight); - oluacls_prop(L, "viewWidth", _fairygui_GComponent_getViewWidth, _fairygui_GComponent_setViewWidth); + oluacls_func(L, "__index", _olua_fun_fairygui_GComponent___index); + oluacls_func(L, "addChild", _olua_fun_fairygui_GComponent_addChild); + oluacls_func(L, "addChildAt", _olua_fun_fairygui_GComponent_addChildAt); + oluacls_func(L, "addController", _olua_fun_fairygui_GComponent_addController); + oluacls_func(L, "adjustRadioGroupDepth", _olua_fun_fairygui_GComponent_adjustRadioGroupDepth); + oluacls_func(L, "applyAllControllers", _olua_fun_fairygui_GComponent_applyAllControllers); + oluacls_func(L, "applyController", _olua_fun_fairygui_GComponent_applyController); + oluacls_func(L, "childSortingOrderChanged", _olua_fun_fairygui_GComponent_childSortingOrderChanged); + oluacls_func(L, "childStateChanged", _olua_fun_fairygui_GComponent_childStateChanged); + oluacls_func(L, "create", _olua_fun_fairygui_GComponent_create); + oluacls_func(L, "ensureBoundsCorrect", _olua_fun_fairygui_GComponent_ensureBoundsCorrect); + oluacls_func(L, "getApexIndex", _olua_fun_fairygui_GComponent_getApexIndex); + oluacls_func(L, "getBaseUserData", _olua_fun_fairygui_GComponent_getBaseUserData); + oluacls_func(L, "getChild", _olua_fun_fairygui_GComponent_getChild); + oluacls_func(L, "getChildAt", _olua_fun_fairygui_GComponent_getChildAt); + oluacls_func(L, "getChildById", _olua_fun_fairygui_GComponent_getChildById); + oluacls_func(L, "getChildByPath", _olua_fun_fairygui_GComponent_getChildByPath); + oluacls_func(L, "getChildInGroup", _olua_fun_fairygui_GComponent_getChildInGroup); + oluacls_func(L, "getChildIndex", _olua_fun_fairygui_GComponent_getChildIndex); + oluacls_func(L, "getChildren", _olua_fun_fairygui_GComponent_getChildren); + oluacls_func(L, "getChildrenRenderOrder", _olua_fun_fairygui_GComponent_getChildrenRenderOrder); + oluacls_func(L, "getController", _olua_fun_fairygui_GComponent_getController); + oluacls_func(L, "getControllerAt", _olua_fun_fairygui_GComponent_getControllerAt); + oluacls_func(L, "getControllers", _olua_fun_fairygui_GComponent_getControllers); + oluacls_func(L, "getFirstChildInView", _olua_fun_fairygui_GComponent_getFirstChildInView); + oluacls_func(L, "getHitArea", _olua_fun_fairygui_GComponent_getHitArea); + oluacls_func(L, "getMargin", _olua_fun_fairygui_GComponent_getMargin); + oluacls_func(L, "getMask", _olua_fun_fairygui_GComponent_getMask); + oluacls_func(L, "getOpaque", _olua_fun_fairygui_GComponent_getOpaque); + oluacls_func(L, "getScrollPane", _olua_fun_fairygui_GComponent_getScrollPane); + oluacls_func(L, "getSnappingPosition", _olua_fun_fairygui_GComponent_getSnappingPosition); + oluacls_func(L, "getTransition", _olua_fun_fairygui_GComponent_getTransition); + oluacls_func(L, "getTransitionAt", _olua_fun_fairygui_GComponent_getTransitionAt); + oluacls_func(L, "getTransitions", _olua_fun_fairygui_GComponent_getTransitions); + oluacls_func(L, "getViewHeight", _olua_fun_fairygui_GComponent_getViewHeight); + oluacls_func(L, "getViewWidth", _olua_fun_fairygui_GComponent_getViewWidth); + oluacls_func(L, "isAncestorOf", _olua_fun_fairygui_GComponent_isAncestorOf); + oluacls_func(L, "isChildInView", _olua_fun_fairygui_GComponent_isChildInView); + oluacls_func(L, "new", _olua_fun_fairygui_GComponent_new); + oluacls_func(L, "removeChild", _olua_fun_fairygui_GComponent_removeChild); + oluacls_func(L, "removeChildAt", _olua_fun_fairygui_GComponent_removeChildAt); + oluacls_func(L, "removeChildren", _olua_fun_fairygui_GComponent_removeChildren); + oluacls_func(L, "removeController", _olua_fun_fairygui_GComponent_removeController); + oluacls_func(L, "resolve", _olua_fun_fairygui_GComponent_resolve); + oluacls_func(L, "setApexIndex", _olua_fun_fairygui_GComponent_setApexIndex); + oluacls_func(L, "setBoundsChangedFlag", _olua_fun_fairygui_GComponent_setBoundsChangedFlag); + oluacls_func(L, "setChildIndex", _olua_fun_fairygui_GComponent_setChildIndex); + oluacls_func(L, "setChildIndexBefore", _olua_fun_fairygui_GComponent_setChildIndexBefore); + oluacls_func(L, "setChildrenRenderOrder", _olua_fun_fairygui_GComponent_setChildrenRenderOrder); + oluacls_func(L, "setHitArea", _olua_fun_fairygui_GComponent_setHitArea); + oluacls_func(L, "setMargin", _olua_fun_fairygui_GComponent_setMargin); + oluacls_func(L, "setMask", _olua_fun_fairygui_GComponent_setMask); + oluacls_func(L, "setOpaque", _olua_fun_fairygui_GComponent_setOpaque); + oluacls_func(L, "setViewHeight", _olua_fun_fairygui_GComponent_setViewHeight); + oluacls_func(L, "setViewWidth", _olua_fun_fairygui_GComponent_setViewWidth); + oluacls_func(L, "swapChildren", _olua_fun_fairygui_GComponent_swapChildren); + oluacls_func(L, "swapChildrenAt", _olua_fun_fairygui_GComponent_swapChildrenAt); + oluacls_prop(L, "apexIndex", _olua_fun_fairygui_GComponent_getApexIndex, _olua_fun_fairygui_GComponent_setApexIndex); + oluacls_prop(L, "baseUserData", _olua_fun_fairygui_GComponent_getBaseUserData, nullptr); + oluacls_prop(L, "children", _olua_fun_fairygui_GComponent_getChildren, nullptr); + oluacls_prop(L, "childrenRenderOrder", _olua_fun_fairygui_GComponent_getChildrenRenderOrder, _olua_fun_fairygui_GComponent_setChildrenRenderOrder); + oluacls_prop(L, "controllers", _olua_fun_fairygui_GComponent_getControllers, nullptr); + oluacls_prop(L, "firstChildInView", _olua_fun_fairygui_GComponent_getFirstChildInView, nullptr); + oluacls_prop(L, "hitArea", _olua_fun_fairygui_GComponent_getHitArea, _olua_fun_fairygui_GComponent_setHitArea); + oluacls_prop(L, "margin", _olua_fun_fairygui_GComponent_getMargin, _olua_fun_fairygui_GComponent_setMargin); + oluacls_prop(L, "mask", _olua_fun_fairygui_GComponent_getMask, nullptr); + oluacls_prop(L, "numChildren", _olua_fun_fairygui_GComponent_numChildren, nullptr); + oluacls_prop(L, "opaque", _olua_fun_fairygui_GComponent_getOpaque, _olua_fun_fairygui_GComponent_setOpaque); + oluacls_prop(L, "scrollPane", _olua_fun_fairygui_GComponent_getScrollPane, nullptr); + oluacls_prop(L, "transitions", _olua_fun_fairygui_GComponent_getTransitions, nullptr); + oluacls_prop(L, "viewHeight", _olua_fun_fairygui_GComponent_getViewHeight, _olua_fun_fairygui_GComponent_setViewHeight); + oluacls_prop(L, "viewWidth", _olua_fun_fairygui_GComponent_getViewWidth, _olua_fun_fairygui_GComponent_setViewWidth); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_fgui_GComponent(lua_State *L) +{ + olua_require(L, "fairygui", luaopen_fairygui); + if (!olua_getclass(L, "fgui.GComponent")) { + luaL_error(L, "class not found: fairygui::GComponent"); + } return 1; } OLUA_END_DECLS -static int _fairygui_GRoot_bringToFront(lua_State *L) +static int _olua_fun_fairygui_GRoot_bringToFront(lua_State *L) { olua_startinvoke(L); @@ -12129,7 +13652,7 @@ static int _fairygui_GRoot_bringToFront(lua_State *L) return 0; } -static int _fairygui_GRoot_closeAllExceptModals(lua_State *L) +static int _olua_fun_fairygui_GRoot_closeAllExceptModals(lua_State *L) { olua_startinvoke(L); @@ -12145,7 +13668,7 @@ static int _fairygui_GRoot_closeAllExceptModals(lua_State *L) return 0; } -static int _fairygui_GRoot_closeAllWindows(lua_State *L) +static int _olua_fun_fairygui_GRoot_closeAllWindows(lua_State *L) { olua_startinvoke(L); @@ -12161,7 +13684,7 @@ static int _fairygui_GRoot_closeAllWindows(lua_State *L) return 0; } -static int _fairygui_GRoot_closeModalWait(lua_State *L) +static int _olua_fun_fairygui_GRoot_closeModalWait(lua_State *L) { olua_startinvoke(L); @@ -12177,7 +13700,57 @@ static int _fairygui_GRoot_closeModalWait(lua_State *L) return 0; } -static int _fairygui_GRoot_create$1(lua_State *L) +static int _olua_fun_fairygui_GRoot_contentScaleLevel$1(lua_State *L) +{ + olua_startinvoke(L); + + // static int contentScaleLevel + int ret = fairygui::GRoot::contentScaleLevel; + int num_ret = olua_push_integer(L, ret); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_fairygui_GRoot_contentScaleLevel$2(lua_State *L) +{ + olua_startinvoke(L); + + int arg1 = 0; /** contentScaleLevel */ + + olua_check_integer(L, 1, &arg1); + + // static int contentScaleLevel + fairygui::GRoot::contentScaleLevel = arg1; + + olua_endinvoke(L); + + return 0; +} + +static int _olua_fun_fairygui_GRoot_contentScaleLevel(lua_State *L) +{ + int num_args = lua_gettop(L); + + if (num_args == 0) { + // static int contentScaleLevel + return _olua_fun_fairygui_GRoot_contentScaleLevel$1(L); + } + + if (num_args == 1) { + // if ((olua_is_integer(L, 1))) { + // static int contentScaleLevel + return _olua_fun_fairygui_GRoot_contentScaleLevel$2(L); + // } + } + + luaL_error(L, "method 'fairygui::GRoot::contentScaleLevel' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_fairygui_GRoot_create$1(lua_State *L) { olua_startinvoke(L); @@ -12202,7 +13775,7 @@ static int _fairygui_GRoot_create$1(lua_State *L) return num_ret; } -static int _fairygui_GRoot_create$2(lua_State *L) +static int _olua_fun_fairygui_GRoot_create$2(lua_State *L) { olua_startinvoke(L); @@ -12210,7 +13783,7 @@ static int _fairygui_GRoot_create$2(lua_State *L) olua_check_object(L, 1, &arg1, "cc.Scene"); - // static fairygui::GRoot *create(cocos2d::Scene *scene, @optional int zOrder) + // static fairygui::GRoot *create(cocos2d::Scene *scene) fairygui::GRoot *ret = fairygui::GRoot::create(arg1); int num_ret = olua_push_object(L, ret, "fgui.GRoot"); @@ -12225,21 +13798,21 @@ static int _fairygui_GRoot_create$2(lua_State *L) return num_ret; } -static int _fairygui_GRoot_create(lua_State *L) +static int _olua_fun_fairygui_GRoot_create(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 1) { // if ((olua_is_object(L, 1, "cc.Scene"))) { - // static fairygui::GRoot *create(cocos2d::Scene *scene, @optional int zOrder) - return _fairygui_GRoot_create$2(L); + // static fairygui::GRoot *create(cocos2d::Scene *scene) + return _olua_fun_fairygui_GRoot_create$2(L); // } } if (num_args == 2) { // if ((olua_is_object(L, 1, "cc.Scene")) && (olua_is_integer(L, 2))) { // static fairygui::GRoot *create(cocos2d::Scene *scene, @optional int zOrder) - return _fairygui_GRoot_create$1(L); + return _olua_fun_fairygui_GRoot_create$1(L); // } } @@ -12248,7 +13821,7 @@ static int _fairygui_GRoot_create(lua_State *L) return 0; } -static int _fairygui_GRoot_getInputProcessor(lua_State *L) +static int _olua_fun_fairygui_GRoot_getInputProcessor(lua_State *L) { olua_startinvoke(L); @@ -12268,7 +13841,7 @@ static int _fairygui_GRoot_getInputProcessor(lua_State *L) return num_ret; } -static int _fairygui_GRoot_getInstance(lua_State *L) +static int _olua_fun_fairygui_GRoot_getInstance(lua_State *L) { olua_startinvoke(L); @@ -12281,7 +13854,7 @@ static int _fairygui_GRoot_getInstance(lua_State *L) return num_ret; } -static int _fairygui_GRoot_getModalLayer(lua_State *L) +static int _olua_fun_fairygui_GRoot_getModalLayer(lua_State *L) { olua_startinvoke(L); @@ -12301,7 +13874,7 @@ static int _fairygui_GRoot_getModalLayer(lua_State *L) return num_ret; } -static int _fairygui_GRoot_getModalWaitingPane(lua_State *L) +static int _olua_fun_fairygui_GRoot_getModalWaitingPane(lua_State *L) { olua_startinvoke(L); @@ -12321,7 +13894,7 @@ static int _fairygui_GRoot_getModalWaitingPane(lua_State *L) return num_ret; } -static int _fairygui_GRoot_getPoupPosition(lua_State *L) +static int _olua_fun_fairygui_GRoot_getPoupPosition(lua_State *L) { olua_startinvoke(L); @@ -12337,14 +13910,14 @@ static int _fairygui_GRoot_getPoupPosition(lua_State *L) // cocos2d::Vec2 getPoupPosition(fairygui::GObject *popup, fairygui::GObject *target, fairygui::PopupDirection dir) cocos2d::Vec2 ret = self->getPoupPosition(arg1, arg2, arg3); - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec2"); + int num_ret = olua_copy_object(L, ret, "cc.Vec2"); olua_endinvoke(L); return num_ret; } -static int _fairygui_GRoot_getSoundVolumeScale(lua_State *L) +static int _olua_fun_fairygui_GRoot_getSoundVolumeScale(lua_State *L) { olua_startinvoke(L); @@ -12361,7 +13934,7 @@ static int _fairygui_GRoot_getSoundVolumeScale(lua_State *L) return num_ret; } -static int _fairygui_GRoot_getTopWindow(lua_State *L) +static int _olua_fun_fairygui_GRoot_getTopWindow(lua_State *L) { olua_startinvoke(L); @@ -12381,7 +13954,7 @@ static int _fairygui_GRoot_getTopWindow(lua_State *L) return num_ret; } -static int _fairygui_GRoot_getTouchPosition(lua_State *L) +static int _olua_fun_fairygui_GRoot_getTouchPosition(lua_State *L) { olua_startinvoke(L); @@ -12393,14 +13966,14 @@ static int _fairygui_GRoot_getTouchPosition(lua_State *L) // cocos2d::Vec2 getTouchPosition(int touchId) cocos2d::Vec2 ret = self->getTouchPosition(arg1); - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec2"); + int num_ret = olua_copy_object(L, ret, "cc.Vec2"); olua_endinvoke(L); return num_ret; } -static int _fairygui_GRoot_getTouchTarget(lua_State *L) +static int _olua_fun_fairygui_GRoot_getTouchTarget(lua_State *L) { olua_startinvoke(L); @@ -12417,7 +13990,7 @@ static int _fairygui_GRoot_getTouchTarget(lua_State *L) return num_ret; } -static int _fairygui_GRoot_hasAnyPopup(lua_State *L) +static int _olua_fun_fairygui_GRoot_hasAnyPopup(lua_State *L) { olua_startinvoke(L); @@ -12434,7 +14007,7 @@ static int _fairygui_GRoot_hasAnyPopup(lua_State *L) return num_ret; } -static int _fairygui_GRoot_hasModalWindow(lua_State *L) +static int _olua_fun_fairygui_GRoot_hasModalWindow(lua_State *L) { olua_startinvoke(L); @@ -12451,7 +14024,7 @@ static int _fairygui_GRoot_hasModalWindow(lua_State *L) return num_ret; } -static int _fairygui_GRoot_hidePopup$1(lua_State *L) +static int _olua_fun_fairygui_GRoot_hidePopup$1(lua_State *L) { olua_startinvoke(L); @@ -12473,7 +14046,7 @@ static int _fairygui_GRoot_hidePopup$1(lua_State *L) return 0; } -static int _fairygui_GRoot_hidePopup$2(lua_State *L) +static int _olua_fun_fairygui_GRoot_hidePopup$2(lua_State *L) { olua_startinvoke(L); @@ -12497,19 +14070,19 @@ static int _fairygui_GRoot_hidePopup$2(lua_State *L) return 0; } -static int _fairygui_GRoot_hidePopup(lua_State *L) +static int _olua_fun_fairygui_GRoot_hidePopup(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 0) { // @delref(children ~) void hidePopup() - return _fairygui_GRoot_hidePopup$1(L); + return _olua_fun_fairygui_GRoot_hidePopup$1(L); } if (num_args == 1) { // if ((olua_is_object(L, 2, "fgui.GObject"))) { // @delref(children ~) void hidePopup(fairygui::GObject *popup) - return _fairygui_GRoot_hidePopup$2(L); + return _olua_fun_fairygui_GRoot_hidePopup$2(L); // } } @@ -12518,7 +14091,7 @@ static int _fairygui_GRoot_hidePopup(lua_State *L) return 0; } -static int _fairygui_GRoot_hideTooltips(lua_State *L) +static int _olua_fun_fairygui_GRoot_hideTooltips(lua_State *L) { olua_startinvoke(L); @@ -12534,7 +14107,7 @@ static int _fairygui_GRoot_hideTooltips(lua_State *L) return 0; } -static int _fairygui_GRoot_hideWindow(lua_State *L) +static int _olua_fun_fairygui_GRoot_hideWindow(lua_State *L) { olua_startinvoke(L); @@ -12563,7 +14136,7 @@ static int _fairygui_GRoot_hideWindow(lua_State *L) return 0; } -static int _fairygui_GRoot_hideWindowImmediately(lua_State *L) +static int _olua_fun_fairygui_GRoot_hideWindowImmediately(lua_State *L) { olua_startinvoke(L); @@ -12592,7 +14165,7 @@ static int _fairygui_GRoot_hideWindowImmediately(lua_State *L) return 0; } -static int _fairygui_GRoot_isModalWaiting(lua_State *L) +static int _olua_fun_fairygui_GRoot_isModalWaiting(lua_State *L) { olua_startinvoke(L); @@ -12609,7 +14182,7 @@ static int _fairygui_GRoot_isModalWaiting(lua_State *L) return num_ret; } -static int _fairygui_GRoot_isSoundEnabled(lua_State *L) +static int _olua_fun_fairygui_GRoot_isSoundEnabled(lua_State *L) { olua_startinvoke(L); @@ -12626,11 +14199,11 @@ static int _fairygui_GRoot_isSoundEnabled(lua_State *L) return num_ret; } -static int _fairygui_GRoot_new(lua_State *L) +static int _olua_fun_fairygui_GRoot_new(lua_State *L) { olua_startinvoke(L); - // GRoot() + // fairygui::GRoot() fairygui::GRoot *ret = new fairygui::GRoot(); int num_ret = olua_push_object(L, ret, "fgui.GRoot"); olua_postnew(L, ret); @@ -12640,7 +14213,7 @@ static int _fairygui_GRoot_new(lua_State *L) return num_ret; } -static int _fairygui_GRoot_playSound$1(lua_State *L) +static int _olua_fun_fairygui_GRoot_playSound$1(lua_State *L) { olua_startinvoke(L); @@ -12660,7 +14233,7 @@ static int _fairygui_GRoot_playSound$1(lua_State *L) return 0; } -static int _fairygui_GRoot_playSound$2(lua_State *L) +static int _olua_fun_fairygui_GRoot_playSound$2(lua_State *L) { olua_startinvoke(L); @@ -12670,7 +14243,7 @@ static int _fairygui_GRoot_playSound$2(lua_State *L) olua_to_object(L, 1, &self, "fgui.GRoot"); olua_check_string(L, 2, &arg1); - // void playSound(const std::string &url, @optional float volumeScale) + // void playSound(const std::string &url) self->playSound(arg1); olua_endinvoke(L); @@ -12678,21 +14251,21 @@ static int _fairygui_GRoot_playSound$2(lua_State *L) return 0; } -static int _fairygui_GRoot_playSound(lua_State *L) +static int _olua_fun_fairygui_GRoot_playSound(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_string(L, 2))) { - // void playSound(const std::string &url, @optional float volumeScale) - return _fairygui_GRoot_playSound$2(L); + // void playSound(const std::string &url) + return _olua_fun_fairygui_GRoot_playSound$2(L); // } } if (num_args == 2) { // if ((olua_is_string(L, 2)) && (olua_is_number(L, 3))) { // void playSound(const std::string &url, @optional float volumeScale) - return _fairygui_GRoot_playSound$1(L); + return _olua_fun_fairygui_GRoot_playSound$1(L); // } } @@ -12701,26 +14274,26 @@ static int _fairygui_GRoot_playSound(lua_State *L) return 0; } -static int _fairygui_GRoot_rootToWorld$1(lua_State *L) +static int _olua_fun_fairygui_GRoot_rootToWorld$1(lua_State *L) { olua_startinvoke(L); fairygui::GRoot *self = nullptr; - cocos2d::Vec2 arg1; /** pt */ + cocos2d::Vec2 *arg1; /** pt */ olua_to_object(L, 1, &self, "fgui.GRoot"); olua_check_object(L, 2, &arg1, "cc.Vec2"); // cocos2d::Vec2 rootToWorld(const cocos2d::Vec2 &pt) - cocos2d::Vec2 ret = self->rootToWorld(arg1); - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec2"); + cocos2d::Vec2 ret = self->rootToWorld(*arg1); + int num_ret = olua_copy_object(L, ret, "cc.Vec2"); olua_endinvoke(L); return num_ret; } -static int _fairygui_GRoot_rootToWorld$2(lua_State *L) +static int _olua_fun_fairygui_GRoot_rootToWorld$2(lua_State *L) { olua_startinvoke(L); @@ -12730,7 +14303,7 @@ static int _fairygui_GRoot_rootToWorld$2(lua_State *L) olua_to_object(L, 1, &self, "fgui.GRoot"); olua_pack_object(L, 2, &arg1); - // cocos2d::Vec2 rootToWorld(@pack const cocos2d::Vec2 &pt) + // @unpack cocos2d::Vec2 rootToWorld(@pack const cocos2d::Vec2 &pt) cocos2d::Vec2 ret = self->rootToWorld(arg1); int num_ret = olua_unpack_object(L, &ret); @@ -12739,21 +14312,21 @@ static int _fairygui_GRoot_rootToWorld$2(lua_State *L) return num_ret; } -static int _fairygui_GRoot_rootToWorld(lua_State *L) +static int _olua_fun_fairygui_GRoot_rootToWorld(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_object(L, 2, "cc.Vec2"))) { // cocos2d::Vec2 rootToWorld(const cocos2d::Vec2 &pt) - return _fairygui_GRoot_rootToWorld$1(L); + return _olua_fun_fairygui_GRoot_rootToWorld$1(L); // } } if (num_args == 2) { // if ((olua_canpack_object(L, 2, (cocos2d::Vec2 *)nullptr))) { - // cocos2d::Vec2 rootToWorld(@pack const cocos2d::Vec2 &pt) - return _fairygui_GRoot_rootToWorld$2(L); + // @unpack cocos2d::Vec2 rootToWorld(@pack const cocos2d::Vec2 &pt) + return _olua_fun_fairygui_GRoot_rootToWorld$2(L); // } } @@ -12762,7 +14335,7 @@ static int _fairygui_GRoot_rootToWorld(lua_State *L) return 0; } -static int _fairygui_GRoot_setNotAsUIRoot(lua_State *L) +static int _olua_fun_fairygui_GRoot_setNotAsUIRoot(lua_State *L) { olua_startinvoke(L); @@ -12778,7 +14351,7 @@ static int _fairygui_GRoot_setNotAsUIRoot(lua_State *L) return 0; } -static int _fairygui_GRoot_setSoundEnabled(lua_State *L) +static int _olua_fun_fairygui_GRoot_setSoundEnabled(lua_State *L) { olua_startinvoke(L); @@ -12796,7 +14369,7 @@ static int _fairygui_GRoot_setSoundEnabled(lua_State *L) return 0; } -static int _fairygui_GRoot_setSoundVolumeScale(lua_State *L) +static int _olua_fun_fairygui_GRoot_setSoundVolumeScale(lua_State *L) { olua_startinvoke(L); @@ -12814,7 +14387,7 @@ static int _fairygui_GRoot_setSoundVolumeScale(lua_State *L) return 0; } -static int _fairygui_GRoot_showModalWait(lua_State *L) +static int _olua_fun_fairygui_GRoot_showModalWait(lua_State *L) { olua_startinvoke(L); @@ -12830,7 +14403,7 @@ static int _fairygui_GRoot_showModalWait(lua_State *L) return 0; } -static int _fairygui_GRoot_showPopup$1(lua_State *L) +static int _olua_fun_fairygui_GRoot_showPopup$1(lua_State *L) { olua_startinvoke(L); @@ -12855,7 +14428,7 @@ static int _fairygui_GRoot_showPopup$1(lua_State *L) return 0; } -static int _fairygui_GRoot_showPopup$2(lua_State *L) +static int _olua_fun_fairygui_GRoot_showPopup$2(lua_State *L) { olua_startinvoke(L); @@ -12884,21 +14457,21 @@ static int _fairygui_GRoot_showPopup$2(lua_State *L) return 0; } -static int _fairygui_GRoot_showPopup(lua_State *L) +static int _olua_fun_fairygui_GRoot_showPopup(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_object(L, 2, "fgui.GObject"))) { // @delref(children ~) void showPopup(@addref(children |) fairygui::GObject *popup) - return _fairygui_GRoot_showPopup$1(L); + return _olua_fun_fairygui_GRoot_showPopup$1(L); // } } if (num_args == 3) { // if ((olua_is_object(L, 2, "fgui.GObject")) && (olua_is_object(L, 3, "fgui.GObject")) && (olua_is_enum(L, 4))) { // @delref(children ~) void showPopup(@addref(children |) fairygui::GObject *popup, fairygui::GObject *target, fairygui::PopupDirection dir) - return _fairygui_GRoot_showPopup$2(L); + return _olua_fun_fairygui_GRoot_showPopup$2(L); // } } @@ -12907,7 +14480,7 @@ static int _fairygui_GRoot_showPopup(lua_State *L) return 0; } -static int _fairygui_GRoot_showTooltips(lua_State *L) +static int _olua_fun_fairygui_GRoot_showTooltips(lua_State *L) { olua_startinvoke(L); @@ -12925,7 +14498,7 @@ static int _fairygui_GRoot_showTooltips(lua_State *L) return 0; } -static int _fairygui_GRoot_showTooltipsWin(lua_State *L) +static int _olua_fun_fairygui_GRoot_showTooltipsWin(lua_State *L) { olua_startinvoke(L); @@ -12943,7 +14516,7 @@ static int _fairygui_GRoot_showTooltipsWin(lua_State *L) return 0; } -static int _fairygui_GRoot_showWindow(lua_State *L) +static int _olua_fun_fairygui_GRoot_showWindow(lua_State *L) { olua_startinvoke(L); @@ -12968,7 +14541,7 @@ static int _fairygui_GRoot_showWindow(lua_State *L) return 0; } -static int _fairygui_GRoot_togglePopup$1(lua_State *L) +static int _olua_fun_fairygui_GRoot_togglePopup$1(lua_State *L) { olua_startinvoke(L); @@ -12993,7 +14566,7 @@ static int _fairygui_GRoot_togglePopup$1(lua_State *L) return 0; } -static int _fairygui_GRoot_togglePopup$2(lua_State *L) +static int _olua_fun_fairygui_GRoot_togglePopup$2(lua_State *L) { olua_startinvoke(L); @@ -13022,21 +14595,21 @@ static int _fairygui_GRoot_togglePopup$2(lua_State *L) return 0; } -static int _fairygui_GRoot_togglePopup(lua_State *L) +static int _olua_fun_fairygui_GRoot_togglePopup(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_object(L, 2, "fgui.GObject"))) { // @delref(children ~) void togglePopup(@addref(children |) fairygui::GObject *popup) - return _fairygui_GRoot_togglePopup$1(L); + return _olua_fun_fairygui_GRoot_togglePopup$1(L); // } } if (num_args == 3) { // if ((olua_is_object(L, 2, "fgui.GObject")) && (olua_is_object(L, 3, "fgui.GObject")) && (olua_is_enum(L, 4))) { // @delref(children ~) void togglePopup(@addref(children |) fairygui::GObject *popup, fairygui::GObject *target, fairygui::PopupDirection dir) - return _fairygui_GRoot_togglePopup$2(L); + return _olua_fun_fairygui_GRoot_togglePopup$2(L); // } } @@ -13045,26 +14618,26 @@ static int _fairygui_GRoot_togglePopup(lua_State *L) return 0; } -static int _fairygui_GRoot_worldToRoot$1(lua_State *L) +static int _olua_fun_fairygui_GRoot_worldToRoot$1(lua_State *L) { olua_startinvoke(L); fairygui::GRoot *self = nullptr; - cocos2d::Vec2 arg1; /** pt */ + cocos2d::Vec2 *arg1; /** pt */ olua_to_object(L, 1, &self, "fgui.GRoot"); olua_check_object(L, 2, &arg1, "cc.Vec2"); // cocos2d::Vec2 worldToRoot(const cocos2d::Vec2 &pt) - cocos2d::Vec2 ret = self->worldToRoot(arg1); - int num_ret = olua_pushcopy_object(L, ret, "cc.Vec2"); + cocos2d::Vec2 ret = self->worldToRoot(*arg1); + int num_ret = olua_copy_object(L, ret, "cc.Vec2"); olua_endinvoke(L); return num_ret; } -static int _fairygui_GRoot_worldToRoot$2(lua_State *L) +static int _olua_fun_fairygui_GRoot_worldToRoot$2(lua_State *L) { olua_startinvoke(L); @@ -13074,7 +14647,7 @@ static int _fairygui_GRoot_worldToRoot$2(lua_State *L) olua_to_object(L, 1, &self, "fgui.GRoot"); olua_pack_object(L, 2, &arg1); - // cocos2d::Vec2 worldToRoot(@pack const cocos2d::Vec2 &pt) + // @unpack cocos2d::Vec2 worldToRoot(@pack const cocos2d::Vec2 &pt) cocos2d::Vec2 ret = self->worldToRoot(arg1); int num_ret = olua_unpack_object(L, &ret); @@ -13083,21 +14656,21 @@ static int _fairygui_GRoot_worldToRoot$2(lua_State *L) return num_ret; } -static int _fairygui_GRoot_worldToRoot(lua_State *L) +static int _olua_fun_fairygui_GRoot_worldToRoot(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_object(L, 2, "cc.Vec2"))) { // cocos2d::Vec2 worldToRoot(const cocos2d::Vec2 &pt) - return _fairygui_GRoot_worldToRoot$1(L); + return _olua_fun_fairygui_GRoot_worldToRoot$1(L); // } } if (num_args == 2) { // if ((olua_canpack_object(L, 2, (cocos2d::Vec2 *)nullptr))) { - // cocos2d::Vec2 worldToRoot(@pack const cocos2d::Vec2 &pt) - return _fairygui_GRoot_worldToRoot$2(L); + // @unpack cocos2d::Vec2 worldToRoot(@pack const cocos2d::Vec2 &pt) + return _olua_fun_fairygui_GRoot_worldToRoot$2(L); // } } @@ -13106,91 +14679,71 @@ static int _fairygui_GRoot_worldToRoot(lua_State *L) return 0; } -static int _fairygui_GRoot_get_contentScaleLevel(lua_State *L) -{ - olua_startinvoke(L); - - // static int contentScaleLevel - int ret = fairygui::GRoot::contentScaleLevel; - int num_ret = olua_push_integer(L, ret); - - olua_endinvoke(L); - - return num_ret; -} - -static int _fairygui_GRoot_set_contentScaleLevel(lua_State *L) +static int _olua_cls_fgui_GRoot(lua_State *L) { - olua_startinvoke(L); - - int arg1 = 0; /** contentScaleLevel */ - - olua_check_integer(L, 1, &arg1); - - // static int contentScaleLevel - fairygui::GRoot::contentScaleLevel = arg1; - - olua_endinvoke(L); + oluacls_class(L, "fgui.GRoot"); + oluacls_func(L, "bringToFront", _olua_fun_fairygui_GRoot_bringToFront); + oluacls_func(L, "closeAllExceptModals", _olua_fun_fairygui_GRoot_closeAllExceptModals); + oluacls_func(L, "closeAllWindows", _olua_fun_fairygui_GRoot_closeAllWindows); + oluacls_func(L, "closeModalWait", _olua_fun_fairygui_GRoot_closeModalWait); + oluacls_func(L, "create", _olua_fun_fairygui_GRoot_create); + oluacls_func(L, "getInputProcessor", _olua_fun_fairygui_GRoot_getInputProcessor); + oluacls_func(L, "getInstance", _olua_fun_fairygui_GRoot_getInstance); + oluacls_func(L, "getModalLayer", _olua_fun_fairygui_GRoot_getModalLayer); + oluacls_func(L, "getModalWaitingPane", _olua_fun_fairygui_GRoot_getModalWaitingPane); + oluacls_func(L, "getPoupPosition", _olua_fun_fairygui_GRoot_getPoupPosition); + oluacls_func(L, "getSoundVolumeScale", _olua_fun_fairygui_GRoot_getSoundVolumeScale); + oluacls_func(L, "getTopWindow", _olua_fun_fairygui_GRoot_getTopWindow); + oluacls_func(L, "getTouchPosition", _olua_fun_fairygui_GRoot_getTouchPosition); + oluacls_func(L, "getTouchTarget", _olua_fun_fairygui_GRoot_getTouchTarget); + oluacls_func(L, "hasAnyPopup", _olua_fun_fairygui_GRoot_hasAnyPopup); + oluacls_func(L, "hasModalWindow", _olua_fun_fairygui_GRoot_hasModalWindow); + oluacls_func(L, "hidePopup", _olua_fun_fairygui_GRoot_hidePopup); + oluacls_func(L, "hideTooltips", _olua_fun_fairygui_GRoot_hideTooltips); + oluacls_func(L, "hideWindow", _olua_fun_fairygui_GRoot_hideWindow); + oluacls_func(L, "hideWindowImmediately", _olua_fun_fairygui_GRoot_hideWindowImmediately); + oluacls_func(L, "isModalWaiting", _olua_fun_fairygui_GRoot_isModalWaiting); + oluacls_func(L, "isSoundEnabled", _olua_fun_fairygui_GRoot_isSoundEnabled); + oluacls_func(L, "new", _olua_fun_fairygui_GRoot_new); + oluacls_func(L, "playSound", _olua_fun_fairygui_GRoot_playSound); + oluacls_func(L, "rootToWorld", _olua_fun_fairygui_GRoot_rootToWorld); + oluacls_func(L, "setNotAsUIRoot", _olua_fun_fairygui_GRoot_setNotAsUIRoot); + oluacls_func(L, "setSoundEnabled", _olua_fun_fairygui_GRoot_setSoundEnabled); + oluacls_func(L, "setSoundVolumeScale", _olua_fun_fairygui_GRoot_setSoundVolumeScale); + oluacls_func(L, "showModalWait", _olua_fun_fairygui_GRoot_showModalWait); + oluacls_func(L, "showPopup", _olua_fun_fairygui_GRoot_showPopup); + oluacls_func(L, "showTooltips", _olua_fun_fairygui_GRoot_showTooltips); + oluacls_func(L, "showTooltipsWin", _olua_fun_fairygui_GRoot_showTooltipsWin); + oluacls_func(L, "showWindow", _olua_fun_fairygui_GRoot_showWindow); + oluacls_func(L, "togglePopup", _olua_fun_fairygui_GRoot_togglePopup); + oluacls_func(L, "worldToRoot", _olua_fun_fairygui_GRoot_worldToRoot); + oluacls_prop(L, "UIRoot", _olua_fun_fairygui_GRoot_getInstance, nullptr); + oluacls_prop(L, "inputProcessor", _olua_fun_fairygui_GRoot_getInputProcessor, nullptr); + oluacls_prop(L, "instance", _olua_fun_fairygui_GRoot_getInstance, nullptr); + oluacls_prop(L, "modalLayer", _olua_fun_fairygui_GRoot_getModalLayer, nullptr); + oluacls_prop(L, "modalWaiting", _olua_fun_fairygui_GRoot_isModalWaiting, nullptr); + oluacls_prop(L, "modalWaitingPane", _olua_fun_fairygui_GRoot_getModalWaitingPane, nullptr); + oluacls_prop(L, "soundEnabled", _olua_fun_fairygui_GRoot_isSoundEnabled, _olua_fun_fairygui_GRoot_setSoundEnabled); + oluacls_prop(L, "soundVolumeScale", _olua_fun_fairygui_GRoot_getSoundVolumeScale, _olua_fun_fairygui_GRoot_setSoundVolumeScale); + oluacls_prop(L, "topWindow", _olua_fun_fairygui_GRoot_getTopWindow, nullptr); + oluacls_prop(L, "touchTarget", _olua_fun_fairygui_GRoot_getTouchTarget, nullptr); + oluacls_prop(L, "contentScaleLevel", _olua_fun_fairygui_GRoot_contentScaleLevel, _olua_fun_fairygui_GRoot_contentScaleLevel); - return 0; + return 1; } OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_fairygui_GRoot(lua_State *L) +OLUA_LIB int luaopen_fgui_GRoot(lua_State *L) { - oluacls_class(L, "fgui.GRoot"); - oluacls_func(L, "bringToFront", _fairygui_GRoot_bringToFront); - oluacls_func(L, "closeAllExceptModals", _fairygui_GRoot_closeAllExceptModals); - oluacls_func(L, "closeAllWindows", _fairygui_GRoot_closeAllWindows); - oluacls_func(L, "closeModalWait", _fairygui_GRoot_closeModalWait); - oluacls_func(L, "create", _fairygui_GRoot_create); - oluacls_func(L, "getInputProcessor", _fairygui_GRoot_getInputProcessor); - oluacls_func(L, "getInstance", _fairygui_GRoot_getInstance); - oluacls_func(L, "getModalLayer", _fairygui_GRoot_getModalLayer); - oluacls_func(L, "getModalWaitingPane", _fairygui_GRoot_getModalWaitingPane); - oluacls_func(L, "getPoupPosition", _fairygui_GRoot_getPoupPosition); - oluacls_func(L, "getSoundVolumeScale", _fairygui_GRoot_getSoundVolumeScale); - oluacls_func(L, "getTopWindow", _fairygui_GRoot_getTopWindow); - oluacls_func(L, "getTouchPosition", _fairygui_GRoot_getTouchPosition); - oluacls_func(L, "getTouchTarget", _fairygui_GRoot_getTouchTarget); - oluacls_func(L, "hasAnyPopup", _fairygui_GRoot_hasAnyPopup); - oluacls_func(L, "hasModalWindow", _fairygui_GRoot_hasModalWindow); - oluacls_func(L, "hidePopup", _fairygui_GRoot_hidePopup); - oluacls_func(L, "hideTooltips", _fairygui_GRoot_hideTooltips); - oluacls_func(L, "hideWindow", _fairygui_GRoot_hideWindow); - oluacls_func(L, "hideWindowImmediately", _fairygui_GRoot_hideWindowImmediately); - oluacls_func(L, "isModalWaiting", _fairygui_GRoot_isModalWaiting); - oluacls_func(L, "isSoundEnabled", _fairygui_GRoot_isSoundEnabled); - oluacls_func(L, "new", _fairygui_GRoot_new); - oluacls_func(L, "playSound", _fairygui_GRoot_playSound); - oluacls_func(L, "rootToWorld", _fairygui_GRoot_rootToWorld); - oluacls_func(L, "setNotAsUIRoot", _fairygui_GRoot_setNotAsUIRoot); - oluacls_func(L, "setSoundEnabled", _fairygui_GRoot_setSoundEnabled); - oluacls_func(L, "setSoundVolumeScale", _fairygui_GRoot_setSoundVolumeScale); - oluacls_func(L, "showModalWait", _fairygui_GRoot_showModalWait); - oluacls_func(L, "showPopup", _fairygui_GRoot_showPopup); - oluacls_func(L, "showTooltips", _fairygui_GRoot_showTooltips); - oluacls_func(L, "showTooltipsWin", _fairygui_GRoot_showTooltipsWin); - oluacls_func(L, "showWindow", _fairygui_GRoot_showWindow); - oluacls_func(L, "togglePopup", _fairygui_GRoot_togglePopup); - oluacls_func(L, "worldToRoot", _fairygui_GRoot_worldToRoot); - oluacls_prop(L, "UIRoot", _fairygui_GRoot_getInstance, nullptr); - oluacls_prop(L, "inputProcessor", _fairygui_GRoot_getInputProcessor, nullptr); - oluacls_prop(L, "instance", _fairygui_GRoot_getInstance, nullptr); - oluacls_prop(L, "modalLayer", _fairygui_GRoot_getModalLayer, nullptr); - oluacls_prop(L, "modalWaiting", _fairygui_GRoot_isModalWaiting, nullptr); - oluacls_prop(L, "modalWaitingPane", _fairygui_GRoot_getModalWaitingPane, nullptr); - oluacls_prop(L, "soundEnabled", _fairygui_GRoot_isSoundEnabled, _fairygui_GRoot_setSoundEnabled); - oluacls_prop(L, "soundVolumeScale", _fairygui_GRoot_getSoundVolumeScale, _fairygui_GRoot_setSoundVolumeScale); - oluacls_prop(L, "topWindow", _fairygui_GRoot_getTopWindow, nullptr); - oluacls_prop(L, "touchTarget", _fairygui_GRoot_getTouchTarget, nullptr); - oluacls_prop(L, "contentScaleLevel", _fairygui_GRoot_get_contentScaleLevel, _fairygui_GRoot_set_contentScaleLevel); - + olua_require(L, "fairygui", luaopen_fairygui); + if (!olua_getclass(L, "fgui.GRoot")) { + luaL_error(L, "class not found: fairygui::GRoot"); + } return 1; } OLUA_END_DECLS -static int _fairygui_GGroup_create(lua_State *L) +static int _olua_fun_fairygui_GGroup_create(lua_State *L) { olua_startinvoke(L); @@ -13203,7 +14756,7 @@ static int _fairygui_GGroup_create(lua_State *L) return num_ret; } -static int _fairygui_GGroup_getColumnGap(lua_State *L) +static int _olua_fun_fairygui_GGroup_getColumnGap(lua_State *L) { olua_startinvoke(L); @@ -13220,7 +14773,7 @@ static int _fairygui_GGroup_getColumnGap(lua_State *L) return num_ret; } -static int _fairygui_GGroup_getLayout(lua_State *L) +static int _olua_fun_fairygui_GGroup_getLayout(lua_State *L) { olua_startinvoke(L); @@ -13237,7 +14790,7 @@ static int _fairygui_GGroup_getLayout(lua_State *L) return num_ret; } -static int _fairygui_GGroup_getLineGap(lua_State *L) +static int _olua_fun_fairygui_GGroup_getLineGap(lua_State *L) { olua_startinvoke(L); @@ -13254,7 +14807,7 @@ static int _fairygui_GGroup_getLineGap(lua_State *L) return num_ret; } -static int _fairygui_GGroup_getMainGridIndex(lua_State *L) +static int _olua_fun_fairygui_GGroup_getMainGridIndex(lua_State *L) { olua_startinvoke(L); @@ -13271,7 +14824,7 @@ static int _fairygui_GGroup_getMainGridIndex(lua_State *L) return num_ret; } -static int _fairygui_GGroup_getMainGridMinSize(lua_State *L) +static int _olua_fun_fairygui_GGroup_getMainGridMinSize(lua_State *L) { olua_startinvoke(L); @@ -13288,7 +14841,7 @@ static int _fairygui_GGroup_getMainGridMinSize(lua_State *L) return num_ret; } -static int _fairygui_GGroup_isAutoSizeDisabled(lua_State *L) +static int _olua_fun_fairygui_GGroup_isAutoSizeDisabled(lua_State *L) { olua_startinvoke(L); @@ -13305,7 +14858,7 @@ static int _fairygui_GGroup_isAutoSizeDisabled(lua_State *L) return num_ret; } -static int _fairygui_GGroup_isExcludeInvisibles(lua_State *L) +static int _olua_fun_fairygui_GGroup_isExcludeInvisibles(lua_State *L) { olua_startinvoke(L); @@ -13322,7 +14875,7 @@ static int _fairygui_GGroup_isExcludeInvisibles(lua_State *L) return num_ret; } -static int _fairygui_GGroup_moveChildren(lua_State *L) +static int _olua_fun_fairygui_GGroup_moveChildren(lua_State *L) { olua_startinvoke(L); @@ -13342,11 +14895,11 @@ static int _fairygui_GGroup_moveChildren(lua_State *L) return 0; } -static int _fairygui_GGroup_new(lua_State *L) +static int _olua_fun_fairygui_GGroup_new(lua_State *L) { olua_startinvoke(L); - // GGroup() + // fairygui::GGroup() fairygui::GGroup *ret = new fairygui::GGroup(); int num_ret = olua_push_object(L, ret, "fgui.GGroup"); olua_postnew(L, ret); @@ -13356,7 +14909,7 @@ static int _fairygui_GGroup_new(lua_State *L) return num_ret; } -static int _fairygui_GGroup_resizeChildren(lua_State *L) +static int _olua_fun_fairygui_GGroup_resizeChildren(lua_State *L) { olua_startinvoke(L); @@ -13376,7 +14929,7 @@ static int _fairygui_GGroup_resizeChildren(lua_State *L) return 0; } -static int _fairygui_GGroup_setAutoSizeDisabled(lua_State *L) +static int _olua_fun_fairygui_GGroup_setAutoSizeDisabled(lua_State *L) { olua_startinvoke(L); @@ -13394,7 +14947,7 @@ static int _fairygui_GGroup_setAutoSizeDisabled(lua_State *L) return 0; } -static int _fairygui_GGroup_setBoundsChangedFlag$1(lua_State *L) +static int _olua_fun_fairygui_GGroup_setBoundsChangedFlag$1(lua_State *L) { olua_startinvoke(L); @@ -13412,7 +14965,7 @@ static int _fairygui_GGroup_setBoundsChangedFlag$1(lua_State *L) return 0; } -static int _fairygui_GGroup_setBoundsChangedFlag$2(lua_State *L) +static int _olua_fun_fairygui_GGroup_setBoundsChangedFlag$2(lua_State *L) { olua_startinvoke(L); @@ -13420,7 +14973,7 @@ static int _fairygui_GGroup_setBoundsChangedFlag$2(lua_State *L) olua_to_object(L, 1, &self, "fgui.GGroup"); - // void setBoundsChangedFlag(@optional bool positionChangedOnly) + // void setBoundsChangedFlag() self->setBoundsChangedFlag(); olua_endinvoke(L); @@ -13428,19 +14981,19 @@ static int _fairygui_GGroup_setBoundsChangedFlag$2(lua_State *L) return 0; } -static int _fairygui_GGroup_setBoundsChangedFlag(lua_State *L) +static int _olua_fun_fairygui_GGroup_setBoundsChangedFlag(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 0) { - // void setBoundsChangedFlag(@optional bool positionChangedOnly) - return _fairygui_GGroup_setBoundsChangedFlag$2(L); + // void setBoundsChangedFlag() + return _olua_fun_fairygui_GGroup_setBoundsChangedFlag$2(L); } if (num_args == 1) { // if ((olua_is_bool(L, 2))) { // void setBoundsChangedFlag(@optional bool positionChangedOnly) - return _fairygui_GGroup_setBoundsChangedFlag$1(L); + return _olua_fun_fairygui_GGroup_setBoundsChangedFlag$1(L); // } } @@ -13449,7 +15002,7 @@ static int _fairygui_GGroup_setBoundsChangedFlag(lua_State *L) return 0; } -static int _fairygui_GGroup_setColumnGap(lua_State *L) +static int _olua_fun_fairygui_GGroup_setColumnGap(lua_State *L) { olua_startinvoke(L); @@ -13467,7 +15020,7 @@ static int _fairygui_GGroup_setColumnGap(lua_State *L) return 0; } -static int _fairygui_GGroup_setExcludeInvisibles(lua_State *L) +static int _olua_fun_fairygui_GGroup_setExcludeInvisibles(lua_State *L) { olua_startinvoke(L); @@ -13485,7 +15038,7 @@ static int _fairygui_GGroup_setExcludeInvisibles(lua_State *L) return 0; } -static int _fairygui_GGroup_setLayout(lua_State *L) +static int _olua_fun_fairygui_GGroup_setLayout(lua_State *L) { olua_startinvoke(L); @@ -13503,7 +15056,7 @@ static int _fairygui_GGroup_setLayout(lua_State *L) return 0; } -static int _fairygui_GGroup_setLineGap(lua_State *L) +static int _olua_fun_fairygui_GGroup_setLineGap(lua_State *L) { olua_startinvoke(L); @@ -13521,7 +15074,7 @@ static int _fairygui_GGroup_setLineGap(lua_State *L) return 0; } -static int _fairygui_GGroup_setMainGridIndex(lua_State *L) +static int _olua_fun_fairygui_GGroup_setMainGridIndex(lua_State *L) { olua_startinvoke(L); @@ -13539,7 +15092,7 @@ static int _fairygui_GGroup_setMainGridIndex(lua_State *L) return 0; } -static int _fairygui_GGroup_setMainGridMinSize(lua_State *L) +static int _olua_fun_fairygui_GGroup_setMainGridMinSize(lua_State *L) { olua_startinvoke(L); @@ -13557,42 +15110,51 @@ static int _fairygui_GGroup_setMainGridMinSize(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_fairygui_GGroup(lua_State *L) +static int _olua_cls_fgui_GGroup(lua_State *L) { oluacls_class(L, "fgui.GGroup"); - oluacls_func(L, "create", _fairygui_GGroup_create); - oluacls_func(L, "getColumnGap", _fairygui_GGroup_getColumnGap); - oluacls_func(L, "getLayout", _fairygui_GGroup_getLayout); - oluacls_func(L, "getLineGap", _fairygui_GGroup_getLineGap); - oluacls_func(L, "getMainGridIndex", _fairygui_GGroup_getMainGridIndex); - oluacls_func(L, "getMainGridMinSize", _fairygui_GGroup_getMainGridMinSize); - oluacls_func(L, "isAutoSizeDisabled", _fairygui_GGroup_isAutoSizeDisabled); - oluacls_func(L, "isExcludeInvisibles", _fairygui_GGroup_isExcludeInvisibles); - oluacls_func(L, "moveChildren", _fairygui_GGroup_moveChildren); - oluacls_func(L, "new", _fairygui_GGroup_new); - oluacls_func(L, "resizeChildren", _fairygui_GGroup_resizeChildren); - oluacls_func(L, "setAutoSizeDisabled", _fairygui_GGroup_setAutoSizeDisabled); - oluacls_func(L, "setBoundsChangedFlag", _fairygui_GGroup_setBoundsChangedFlag); - oluacls_func(L, "setColumnGap", _fairygui_GGroup_setColumnGap); - oluacls_func(L, "setExcludeInvisibles", _fairygui_GGroup_setExcludeInvisibles); - oluacls_func(L, "setLayout", _fairygui_GGroup_setLayout); - oluacls_func(L, "setLineGap", _fairygui_GGroup_setLineGap); - oluacls_func(L, "setMainGridIndex", _fairygui_GGroup_setMainGridIndex); - oluacls_func(L, "setMainGridMinSize", _fairygui_GGroup_setMainGridMinSize); - oluacls_prop(L, "autoSizeDisabled", _fairygui_GGroup_isAutoSizeDisabled, _fairygui_GGroup_setAutoSizeDisabled); - oluacls_prop(L, "columnGap", _fairygui_GGroup_getColumnGap, _fairygui_GGroup_setColumnGap); - oluacls_prop(L, "excludeInvisibles", _fairygui_GGroup_isExcludeInvisibles, _fairygui_GGroup_setExcludeInvisibles); - oluacls_prop(L, "layout", _fairygui_GGroup_getLayout, _fairygui_GGroup_setLayout); - oluacls_prop(L, "lineGap", _fairygui_GGroup_getLineGap, _fairygui_GGroup_setLineGap); - oluacls_prop(L, "mainGridIndex", _fairygui_GGroup_getMainGridIndex, _fairygui_GGroup_setMainGridIndex); - oluacls_prop(L, "mainGridMinSize", _fairygui_GGroup_getMainGridMinSize, _fairygui_GGroup_setMainGridMinSize); + oluacls_func(L, "create", _olua_fun_fairygui_GGroup_create); + oluacls_func(L, "getColumnGap", _olua_fun_fairygui_GGroup_getColumnGap); + oluacls_func(L, "getLayout", _olua_fun_fairygui_GGroup_getLayout); + oluacls_func(L, "getLineGap", _olua_fun_fairygui_GGroup_getLineGap); + oluacls_func(L, "getMainGridIndex", _olua_fun_fairygui_GGroup_getMainGridIndex); + oluacls_func(L, "getMainGridMinSize", _olua_fun_fairygui_GGroup_getMainGridMinSize); + oluacls_func(L, "isAutoSizeDisabled", _olua_fun_fairygui_GGroup_isAutoSizeDisabled); + oluacls_func(L, "isExcludeInvisibles", _olua_fun_fairygui_GGroup_isExcludeInvisibles); + oluacls_func(L, "moveChildren", _olua_fun_fairygui_GGroup_moveChildren); + oluacls_func(L, "new", _olua_fun_fairygui_GGroup_new); + oluacls_func(L, "resizeChildren", _olua_fun_fairygui_GGroup_resizeChildren); + oluacls_func(L, "setAutoSizeDisabled", _olua_fun_fairygui_GGroup_setAutoSizeDisabled); + oluacls_func(L, "setBoundsChangedFlag", _olua_fun_fairygui_GGroup_setBoundsChangedFlag); + oluacls_func(L, "setColumnGap", _olua_fun_fairygui_GGroup_setColumnGap); + oluacls_func(L, "setExcludeInvisibles", _olua_fun_fairygui_GGroup_setExcludeInvisibles); + oluacls_func(L, "setLayout", _olua_fun_fairygui_GGroup_setLayout); + oluacls_func(L, "setLineGap", _olua_fun_fairygui_GGroup_setLineGap); + oluacls_func(L, "setMainGridIndex", _olua_fun_fairygui_GGroup_setMainGridIndex); + oluacls_func(L, "setMainGridMinSize", _olua_fun_fairygui_GGroup_setMainGridMinSize); + oluacls_prop(L, "autoSizeDisabled", _olua_fun_fairygui_GGroup_isAutoSizeDisabled, _olua_fun_fairygui_GGroup_setAutoSizeDisabled); + oluacls_prop(L, "columnGap", _olua_fun_fairygui_GGroup_getColumnGap, _olua_fun_fairygui_GGroup_setColumnGap); + oluacls_prop(L, "excludeInvisibles", _olua_fun_fairygui_GGroup_isExcludeInvisibles, _olua_fun_fairygui_GGroup_setExcludeInvisibles); + oluacls_prop(L, "layout", _olua_fun_fairygui_GGroup_getLayout, _olua_fun_fairygui_GGroup_setLayout); + oluacls_prop(L, "lineGap", _olua_fun_fairygui_GGroup_getLineGap, _olua_fun_fairygui_GGroup_setLineGap); + oluacls_prop(L, "mainGridIndex", _olua_fun_fairygui_GGroup_getMainGridIndex, _olua_fun_fairygui_GGroup_setMainGridIndex); + oluacls_prop(L, "mainGridMinSize", _olua_fun_fairygui_GGroup_getMainGridMinSize, _olua_fun_fairygui_GGroup_setMainGridMinSize); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_fgui_GGroup(lua_State *L) +{ + olua_require(L, "fairygui", luaopen_fairygui); + if (!olua_getclass(L, "fgui.GGroup")) { + luaL_error(L, "class not found: fairygui::GGroup"); + } return 1; } OLUA_END_DECLS -static int _fairygui_GScrollBar_create(lua_State *L) +static int _olua_fun_fairygui_GScrollBar_create(lua_State *L) { olua_startinvoke(L); @@ -13605,7 +15167,7 @@ static int _fairygui_GScrollBar_create(lua_State *L) return num_ret; } -static int _fairygui_GScrollBar_getMinSize(lua_State *L) +static int _olua_fun_fairygui_GScrollBar_getMinSize(lua_State *L) { olua_startinvoke(L); @@ -13622,11 +15184,11 @@ static int _fairygui_GScrollBar_getMinSize(lua_State *L) return num_ret; } -static int _fairygui_GScrollBar_new(lua_State *L) +static int _olua_fun_fairygui_GScrollBar_new(lua_State *L) { olua_startinvoke(L); - // GScrollBar() + // fairygui::GScrollBar() fairygui::GScrollBar *ret = new fairygui::GScrollBar(); int num_ret = olua_push_object(L, ret, "fgui.GScrollBar"); olua_postnew(L, ret); @@ -13636,7 +15198,7 @@ static int _fairygui_GScrollBar_new(lua_State *L) return num_ret; } -static int _fairygui_GScrollBar_setDisplayPerc(lua_State *L) +static int _olua_fun_fairygui_GScrollBar_setDisplayPerc(lua_State *L) { olua_startinvoke(L); @@ -13654,7 +15216,7 @@ static int _fairygui_GScrollBar_setDisplayPerc(lua_State *L) return 0; } -static int _fairygui_GScrollBar_setScrollPane(lua_State *L) +static int _olua_fun_fairygui_GScrollBar_setScrollPane(lua_State *L) { olua_startinvoke(L); @@ -13674,7 +15236,7 @@ static int _fairygui_GScrollBar_setScrollPane(lua_State *L) return 0; } -static int _fairygui_GScrollBar_setScrollPerc(lua_State *L) +static int _olua_fun_fairygui_GScrollBar_setScrollPerc(lua_State *L) { olua_startinvoke(L); @@ -13692,23 +15254,32 @@ static int _fairygui_GScrollBar_setScrollPerc(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_fairygui_GScrollBar(lua_State *L) +static int _olua_cls_fgui_GScrollBar(lua_State *L) { oluacls_class(L, "fgui.GScrollBar"); - oluacls_func(L, "create", _fairygui_GScrollBar_create); - oluacls_func(L, "getMinSize", _fairygui_GScrollBar_getMinSize); - oluacls_func(L, "new", _fairygui_GScrollBar_new); - oluacls_func(L, "setDisplayPerc", _fairygui_GScrollBar_setDisplayPerc); - oluacls_func(L, "setScrollPane", _fairygui_GScrollBar_setScrollPane); - oluacls_func(L, "setScrollPerc", _fairygui_GScrollBar_setScrollPerc); - oluacls_prop(L, "minSize", _fairygui_GScrollBar_getMinSize, nullptr); + oluacls_func(L, "create", _olua_fun_fairygui_GScrollBar_create); + oluacls_func(L, "getMinSize", _olua_fun_fairygui_GScrollBar_getMinSize); + oluacls_func(L, "new", _olua_fun_fairygui_GScrollBar_new); + oluacls_func(L, "setDisplayPerc", _olua_fun_fairygui_GScrollBar_setDisplayPerc); + oluacls_func(L, "setScrollPane", _olua_fun_fairygui_GScrollBar_setScrollPane); + oluacls_func(L, "setScrollPerc", _olua_fun_fairygui_GScrollBar_setScrollPerc); + oluacls_prop(L, "minSize", _olua_fun_fairygui_GScrollBar_getMinSize, nullptr); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_fgui_GScrollBar(lua_State *L) +{ + olua_require(L, "fairygui", luaopen_fairygui); + if (!olua_getclass(L, "fgui.GScrollBar")) { + luaL_error(L, "class not found: fairygui::GScrollBar"); + } return 1; } OLUA_END_DECLS -static int _fairygui_GLoader_create(lua_State *L) +static int _olua_fun_fairygui_GLoader_create(lua_State *L) { olua_startinvoke(L); @@ -13721,7 +15292,7 @@ static int _fairygui_GLoader_create(lua_State *L) return num_ret; } -static int _fairygui_GLoader_getAlign(lua_State *L) +static int _olua_fun_fairygui_GLoader_getAlign(lua_State *L) { olua_startinvoke(L); @@ -13738,7 +15309,7 @@ static int _fairygui_GLoader_getAlign(lua_State *L) return num_ret; } -static int _fairygui_GLoader_getAutoSize(lua_State *L) +static int _olua_fun_fairygui_GLoader_getAutoSize(lua_State *L) { olua_startinvoke(L); @@ -13755,7 +15326,7 @@ static int _fairygui_GLoader_getAutoSize(lua_State *L) return num_ret; } -static int _fairygui_GLoader_getColor(lua_State *L) +static int _olua_fun_fairygui_GLoader_getColor(lua_State *L) { olua_startinvoke(L); @@ -13772,7 +15343,7 @@ static int _fairygui_GLoader_getColor(lua_State *L) return num_ret; } -static int _fairygui_GLoader_getComponent(lua_State *L) +static int _olua_fun_fairygui_GLoader_getComponent(lua_State *L) { olua_startinvoke(L); @@ -13792,7 +15363,7 @@ static int _fairygui_GLoader_getComponent(lua_State *L) return num_ret; } -static int _fairygui_GLoader_getContentSize(lua_State *L) +static int _olua_fun_fairygui_GLoader_getContentSize(lua_State *L) { olua_startinvoke(L); @@ -13809,7 +15380,7 @@ static int _fairygui_GLoader_getContentSize(lua_State *L) return num_ret; } -static int _fairygui_GLoader_getFill(lua_State *L) +static int _olua_fun_fairygui_GLoader_getFill(lua_State *L) { olua_startinvoke(L); @@ -13826,7 +15397,7 @@ static int _fairygui_GLoader_getFill(lua_State *L) return num_ret; } -static int _fairygui_GLoader_getFillAmount(lua_State *L) +static int _olua_fun_fairygui_GLoader_getFillAmount(lua_State *L) { olua_startinvoke(L); @@ -13843,7 +15414,7 @@ static int _fairygui_GLoader_getFillAmount(lua_State *L) return num_ret; } -static int _fairygui_GLoader_getFillMethod(lua_State *L) +static int _olua_fun_fairygui_GLoader_getFillMethod(lua_State *L) { olua_startinvoke(L); @@ -13860,7 +15431,7 @@ static int _fairygui_GLoader_getFillMethod(lua_State *L) return num_ret; } -static int _fairygui_GLoader_getFillOrigin(lua_State *L) +static int _olua_fun_fairygui_GLoader_getFillOrigin(lua_State *L) { olua_startinvoke(L); @@ -13877,7 +15448,7 @@ static int _fairygui_GLoader_getFillOrigin(lua_State *L) return num_ret; } -static int _fairygui_GLoader_getFrame(lua_State *L) +static int _olua_fun_fairygui_GLoader_getFrame(lua_State *L) { olua_startinvoke(L); @@ -13894,7 +15465,7 @@ static int _fairygui_GLoader_getFrame(lua_State *L) return num_ret; } -static int _fairygui_GLoader_getURL(lua_State *L) +static int _olua_fun_fairygui_GLoader_getURL(lua_State *L) { olua_startinvoke(L); @@ -13911,7 +15482,7 @@ static int _fairygui_GLoader_getURL(lua_State *L) return num_ret; } -static int _fairygui_GLoader_getVerticalAlign(lua_State *L) +static int _olua_fun_fairygui_GLoader_getVerticalAlign(lua_State *L) { olua_startinvoke(L); @@ -13928,7 +15499,7 @@ static int _fairygui_GLoader_getVerticalAlign(lua_State *L) return num_ret; } -static int _fairygui_GLoader_isFillClockwise(lua_State *L) +static int _olua_fun_fairygui_GLoader_isFillClockwise(lua_State *L) { olua_startinvoke(L); @@ -13945,7 +15516,7 @@ static int _fairygui_GLoader_isFillClockwise(lua_State *L) return num_ret; } -static int _fairygui_GLoader_isPlaying(lua_State *L) +static int _olua_fun_fairygui_GLoader_isPlaying(lua_State *L) { olua_startinvoke(L); @@ -13962,7 +15533,7 @@ static int _fairygui_GLoader_isPlaying(lua_State *L) return num_ret; } -static int _fairygui_GLoader_isShrinkOnly(lua_State *L) +static int _olua_fun_fairygui_GLoader_isShrinkOnly(lua_State *L) { olua_startinvoke(L); @@ -13979,11 +15550,11 @@ static int _fairygui_GLoader_isShrinkOnly(lua_State *L) return num_ret; } -static int _fairygui_GLoader_new(lua_State *L) +static int _olua_fun_fairygui_GLoader_new(lua_State *L) { olua_startinvoke(L); - // GLoader() + // fairygui::GLoader() fairygui::GLoader *ret = new fairygui::GLoader(); int num_ret = olua_push_object(L, ret, "fgui.GLoader"); olua_postnew(L, ret); @@ -13993,7 +15564,7 @@ static int _fairygui_GLoader_new(lua_State *L) return num_ret; } -static int _fairygui_GLoader_setAlign(lua_State *L) +static int _olua_fun_fairygui_GLoader_setAlign(lua_State *L) { olua_startinvoke(L); @@ -14011,7 +15582,7 @@ static int _fairygui_GLoader_setAlign(lua_State *L) return 0; } -static int _fairygui_GLoader_setAutoSize(lua_State *L) +static int _olua_fun_fairygui_GLoader_setAutoSize(lua_State *L) { olua_startinvoke(L); @@ -14029,7 +15600,7 @@ static int _fairygui_GLoader_setAutoSize(lua_State *L) return 0; } -static int _fairygui_GLoader_setColor(lua_State *L) +static int _olua_fun_fairygui_GLoader_setColor(lua_State *L) { olua_startinvoke(L); @@ -14047,7 +15618,7 @@ static int _fairygui_GLoader_setColor(lua_State *L) return 0; } -static int _fairygui_GLoader_setFill(lua_State *L) +static int _olua_fun_fairygui_GLoader_setFill(lua_State *L) { olua_startinvoke(L); @@ -14065,7 +15636,7 @@ static int _fairygui_GLoader_setFill(lua_State *L) return 0; } -static int _fairygui_GLoader_setFillAmount(lua_State *L) +static int _olua_fun_fairygui_GLoader_setFillAmount(lua_State *L) { olua_startinvoke(L); @@ -14083,7 +15654,7 @@ static int _fairygui_GLoader_setFillAmount(lua_State *L) return 0; } -static int _fairygui_GLoader_setFillClockwise(lua_State *L) +static int _olua_fun_fairygui_GLoader_setFillClockwise(lua_State *L) { olua_startinvoke(L); @@ -14101,7 +15672,7 @@ static int _fairygui_GLoader_setFillClockwise(lua_State *L) return 0; } -static int _fairygui_GLoader_setFillMethod(lua_State *L) +static int _olua_fun_fairygui_GLoader_setFillMethod(lua_State *L) { olua_startinvoke(L); @@ -14119,7 +15690,7 @@ static int _fairygui_GLoader_setFillMethod(lua_State *L) return 0; } -static int _fairygui_GLoader_setFillOrigin(lua_State *L) +static int _olua_fun_fairygui_GLoader_setFillOrigin(lua_State *L) { olua_startinvoke(L); @@ -14137,7 +15708,7 @@ static int _fairygui_GLoader_setFillOrigin(lua_State *L) return 0; } -static int _fairygui_GLoader_setFrame(lua_State *L) +static int _olua_fun_fairygui_GLoader_setFrame(lua_State *L) { olua_startinvoke(L); @@ -14155,7 +15726,7 @@ static int _fairygui_GLoader_setFrame(lua_State *L) return 0; } -static int _fairygui_GLoader_setPlaying(lua_State *L) +static int _olua_fun_fairygui_GLoader_setPlaying(lua_State *L) { olua_startinvoke(L); @@ -14173,7 +15744,7 @@ static int _fairygui_GLoader_setPlaying(lua_State *L) return 0; } -static int _fairygui_GLoader_setShrinkOnly(lua_State *L) +static int _olua_fun_fairygui_GLoader_setShrinkOnly(lua_State *L) { olua_startinvoke(L); @@ -14191,7 +15762,7 @@ static int _fairygui_GLoader_setShrinkOnly(lua_State *L) return 0; } -static int _fairygui_GLoader_setURL(lua_State *L) +static int _olua_fun_fairygui_GLoader_setURL(lua_State *L) { olua_startinvoke(L); @@ -14209,7 +15780,7 @@ static int _fairygui_GLoader_setURL(lua_State *L) return 0; } -static int _fairygui_GLoader_setVerticalAlign(lua_State *L) +static int _olua_fun_fairygui_GLoader_setVerticalAlign(lua_State *L) { olua_startinvoke(L); @@ -14227,61 +15798,70 @@ static int _fairygui_GLoader_setVerticalAlign(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_fairygui_GLoader(lua_State *L) +static int _olua_cls_fgui_GLoader(lua_State *L) { oluacls_class(L, "fgui.GLoader"); - oluacls_func(L, "create", _fairygui_GLoader_create); - oluacls_func(L, "getAlign", _fairygui_GLoader_getAlign); - oluacls_func(L, "getAutoSize", _fairygui_GLoader_getAutoSize); - oluacls_func(L, "getColor", _fairygui_GLoader_getColor); - oluacls_func(L, "getComponent", _fairygui_GLoader_getComponent); - oluacls_func(L, "getContentSize", _fairygui_GLoader_getContentSize); - oluacls_func(L, "getFill", _fairygui_GLoader_getFill); - oluacls_func(L, "getFillAmount", _fairygui_GLoader_getFillAmount); - oluacls_func(L, "getFillMethod", _fairygui_GLoader_getFillMethod); - oluacls_func(L, "getFillOrigin", _fairygui_GLoader_getFillOrigin); - oluacls_func(L, "getFrame", _fairygui_GLoader_getFrame); - oluacls_func(L, "getURL", _fairygui_GLoader_getURL); - oluacls_func(L, "getVerticalAlign", _fairygui_GLoader_getVerticalAlign); - oluacls_func(L, "isFillClockwise", _fairygui_GLoader_isFillClockwise); - oluacls_func(L, "isPlaying", _fairygui_GLoader_isPlaying); - oluacls_func(L, "isShrinkOnly", _fairygui_GLoader_isShrinkOnly); - oluacls_func(L, "new", _fairygui_GLoader_new); - oluacls_func(L, "setAlign", _fairygui_GLoader_setAlign); - oluacls_func(L, "setAutoSize", _fairygui_GLoader_setAutoSize); - oluacls_func(L, "setColor", _fairygui_GLoader_setColor); - oluacls_func(L, "setFill", _fairygui_GLoader_setFill); - oluacls_func(L, "setFillAmount", _fairygui_GLoader_setFillAmount); - oluacls_func(L, "setFillClockwise", _fairygui_GLoader_setFillClockwise); - oluacls_func(L, "setFillMethod", _fairygui_GLoader_setFillMethod); - oluacls_func(L, "setFillOrigin", _fairygui_GLoader_setFillOrigin); - oluacls_func(L, "setFrame", _fairygui_GLoader_setFrame); - oluacls_func(L, "setPlaying", _fairygui_GLoader_setPlaying); - oluacls_func(L, "setShrinkOnly", _fairygui_GLoader_setShrinkOnly); - oluacls_func(L, "setURL", _fairygui_GLoader_setURL); - oluacls_func(L, "setVerticalAlign", _fairygui_GLoader_setVerticalAlign); - oluacls_prop(L, "align", _fairygui_GLoader_getAlign, _fairygui_GLoader_setAlign); - oluacls_prop(L, "autoSize", _fairygui_GLoader_getAutoSize, _fairygui_GLoader_setAutoSize); - oluacls_prop(L, "color", _fairygui_GLoader_getColor, _fairygui_GLoader_setColor); - oluacls_prop(L, "component", _fairygui_GLoader_getComponent, nullptr); - oluacls_prop(L, "contentSize", _fairygui_GLoader_getContentSize, nullptr); - oluacls_prop(L, "fill", _fairygui_GLoader_getFill, _fairygui_GLoader_setFill); - oluacls_prop(L, "fillAmount", _fairygui_GLoader_getFillAmount, _fairygui_GLoader_setFillAmount); - oluacls_prop(L, "fillClockwise", _fairygui_GLoader_isFillClockwise, _fairygui_GLoader_setFillClockwise); - oluacls_prop(L, "fillMethod", _fairygui_GLoader_getFillMethod, _fairygui_GLoader_setFillMethod); - oluacls_prop(L, "fillOrigin", _fairygui_GLoader_getFillOrigin, _fairygui_GLoader_setFillOrigin); - oluacls_prop(L, "frame", _fairygui_GLoader_getFrame, _fairygui_GLoader_setFrame); - oluacls_prop(L, "playing", _fairygui_GLoader_isPlaying, _fairygui_GLoader_setPlaying); - oluacls_prop(L, "shrinkOnly", _fairygui_GLoader_isShrinkOnly, _fairygui_GLoader_setShrinkOnly); - oluacls_prop(L, "url", _fairygui_GLoader_getURL, _fairygui_GLoader_setURL); - oluacls_prop(L, "verticalAlign", _fairygui_GLoader_getVerticalAlign, _fairygui_GLoader_setVerticalAlign); + oluacls_func(L, "create", _olua_fun_fairygui_GLoader_create); + oluacls_func(L, "getAlign", _olua_fun_fairygui_GLoader_getAlign); + oluacls_func(L, "getAutoSize", _olua_fun_fairygui_GLoader_getAutoSize); + oluacls_func(L, "getColor", _olua_fun_fairygui_GLoader_getColor); + oluacls_func(L, "getComponent", _olua_fun_fairygui_GLoader_getComponent); + oluacls_func(L, "getContentSize", _olua_fun_fairygui_GLoader_getContentSize); + oluacls_func(L, "getFill", _olua_fun_fairygui_GLoader_getFill); + oluacls_func(L, "getFillAmount", _olua_fun_fairygui_GLoader_getFillAmount); + oluacls_func(L, "getFillMethod", _olua_fun_fairygui_GLoader_getFillMethod); + oluacls_func(L, "getFillOrigin", _olua_fun_fairygui_GLoader_getFillOrigin); + oluacls_func(L, "getFrame", _olua_fun_fairygui_GLoader_getFrame); + oluacls_func(L, "getURL", _olua_fun_fairygui_GLoader_getURL); + oluacls_func(L, "getVerticalAlign", _olua_fun_fairygui_GLoader_getVerticalAlign); + oluacls_func(L, "isFillClockwise", _olua_fun_fairygui_GLoader_isFillClockwise); + oluacls_func(L, "isPlaying", _olua_fun_fairygui_GLoader_isPlaying); + oluacls_func(L, "isShrinkOnly", _olua_fun_fairygui_GLoader_isShrinkOnly); + oluacls_func(L, "new", _olua_fun_fairygui_GLoader_new); + oluacls_func(L, "setAlign", _olua_fun_fairygui_GLoader_setAlign); + oluacls_func(L, "setAutoSize", _olua_fun_fairygui_GLoader_setAutoSize); + oluacls_func(L, "setColor", _olua_fun_fairygui_GLoader_setColor); + oluacls_func(L, "setFill", _olua_fun_fairygui_GLoader_setFill); + oluacls_func(L, "setFillAmount", _olua_fun_fairygui_GLoader_setFillAmount); + oluacls_func(L, "setFillClockwise", _olua_fun_fairygui_GLoader_setFillClockwise); + oluacls_func(L, "setFillMethod", _olua_fun_fairygui_GLoader_setFillMethod); + oluacls_func(L, "setFillOrigin", _olua_fun_fairygui_GLoader_setFillOrigin); + oluacls_func(L, "setFrame", _olua_fun_fairygui_GLoader_setFrame); + oluacls_func(L, "setPlaying", _olua_fun_fairygui_GLoader_setPlaying); + oluacls_func(L, "setShrinkOnly", _olua_fun_fairygui_GLoader_setShrinkOnly); + oluacls_func(L, "setURL", _olua_fun_fairygui_GLoader_setURL); + oluacls_func(L, "setVerticalAlign", _olua_fun_fairygui_GLoader_setVerticalAlign); + oluacls_prop(L, "align", _olua_fun_fairygui_GLoader_getAlign, _olua_fun_fairygui_GLoader_setAlign); + oluacls_prop(L, "autoSize", _olua_fun_fairygui_GLoader_getAutoSize, _olua_fun_fairygui_GLoader_setAutoSize); + oluacls_prop(L, "color", _olua_fun_fairygui_GLoader_getColor, _olua_fun_fairygui_GLoader_setColor); + oluacls_prop(L, "component", _olua_fun_fairygui_GLoader_getComponent, nullptr); + oluacls_prop(L, "contentSize", _olua_fun_fairygui_GLoader_getContentSize, nullptr); + oluacls_prop(L, "fill", _olua_fun_fairygui_GLoader_getFill, _olua_fun_fairygui_GLoader_setFill); + oluacls_prop(L, "fillAmount", _olua_fun_fairygui_GLoader_getFillAmount, _olua_fun_fairygui_GLoader_setFillAmount); + oluacls_prop(L, "fillClockwise", _olua_fun_fairygui_GLoader_isFillClockwise, _olua_fun_fairygui_GLoader_setFillClockwise); + oluacls_prop(L, "fillMethod", _olua_fun_fairygui_GLoader_getFillMethod, _olua_fun_fairygui_GLoader_setFillMethod); + oluacls_prop(L, "fillOrigin", _olua_fun_fairygui_GLoader_getFillOrigin, _olua_fun_fairygui_GLoader_setFillOrigin); + oluacls_prop(L, "frame", _olua_fun_fairygui_GLoader_getFrame, _olua_fun_fairygui_GLoader_setFrame); + oluacls_prop(L, "playing", _olua_fun_fairygui_GLoader_isPlaying, _olua_fun_fairygui_GLoader_setPlaying); + oluacls_prop(L, "shrinkOnly", _olua_fun_fairygui_GLoader_isShrinkOnly, _olua_fun_fairygui_GLoader_setShrinkOnly); + oluacls_prop(L, "url", _olua_fun_fairygui_GLoader_getURL, _olua_fun_fairygui_GLoader_setURL); + oluacls_prop(L, "verticalAlign", _olua_fun_fairygui_GLoader_getVerticalAlign, _olua_fun_fairygui_GLoader_setVerticalAlign); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_fgui_GLoader(lua_State *L) +{ + olua_require(L, "fairygui", luaopen_fairygui); + if (!olua_getclass(L, "fgui.GLoader")) { + luaL_error(L, "class not found: fairygui::GLoader"); + } + return 1; +} OLUA_END_DECLS -static int _fairygui_GLoader3D_create(lua_State *L) +static int _olua_fun_fairygui_GLoader3D_create(lua_State *L) { olua_startinvoke(L); @@ -14294,7 +15874,7 @@ static int _fairygui_GLoader3D_create(lua_State *L) return num_ret; } -static int _fairygui_GLoader3D_getAlign(lua_State *L) +static int _olua_fun_fairygui_GLoader3D_getAlign(lua_State *L) { olua_startinvoke(L); @@ -14311,7 +15891,7 @@ static int _fairygui_GLoader3D_getAlign(lua_State *L) return num_ret; } -static int _fairygui_GLoader3D_getAnimationName(lua_State *L) +static int _olua_fun_fairygui_GLoader3D_getAnimationName(lua_State *L) { olua_startinvoke(L); @@ -14328,7 +15908,7 @@ static int _fairygui_GLoader3D_getAnimationName(lua_State *L) return num_ret; } -static int _fairygui_GLoader3D_getAutoSize(lua_State *L) +static int _olua_fun_fairygui_GLoader3D_getAutoSize(lua_State *L) { olua_startinvoke(L); @@ -14345,7 +15925,7 @@ static int _fairygui_GLoader3D_getAutoSize(lua_State *L) return num_ret; } -static int _fairygui_GLoader3D_getColor(lua_State *L) +static int _olua_fun_fairygui_GLoader3D_getColor(lua_State *L) { olua_startinvoke(L); @@ -14362,7 +15942,7 @@ static int _fairygui_GLoader3D_getColor(lua_State *L) return num_ret; } -static int _fairygui_GLoader3D_getContent(lua_State *L) +static int _olua_fun_fairygui_GLoader3D_getContent(lua_State *L) { olua_startinvoke(L); @@ -14382,7 +15962,7 @@ static int _fairygui_GLoader3D_getContent(lua_State *L) return num_ret; } -static int _fairygui_GLoader3D_getFill(lua_State *L) +static int _olua_fun_fairygui_GLoader3D_getFill(lua_State *L) { olua_startinvoke(L); @@ -14399,7 +15979,7 @@ static int _fairygui_GLoader3D_getFill(lua_State *L) return num_ret; } -static int _fairygui_GLoader3D_getFrame(lua_State *L) +static int _olua_fun_fairygui_GLoader3D_getFrame(lua_State *L) { olua_startinvoke(L); @@ -14416,7 +15996,7 @@ static int _fairygui_GLoader3D_getFrame(lua_State *L) return num_ret; } -static int _fairygui_GLoader3D_getLoop(lua_State *L) +static int _olua_fun_fairygui_GLoader3D_getLoop(lua_State *L) { olua_startinvoke(L); @@ -14433,7 +16013,7 @@ static int _fairygui_GLoader3D_getLoop(lua_State *L) return num_ret; } -static int _fairygui_GLoader3D_getSkinName(lua_State *L) +static int _olua_fun_fairygui_GLoader3D_getSkinName(lua_State *L) { olua_startinvoke(L); @@ -14450,7 +16030,7 @@ static int _fairygui_GLoader3D_getSkinName(lua_State *L) return num_ret; } -static int _fairygui_GLoader3D_getURL(lua_State *L) +static int _olua_fun_fairygui_GLoader3D_getURL(lua_State *L) { olua_startinvoke(L); @@ -14467,7 +16047,7 @@ static int _fairygui_GLoader3D_getURL(lua_State *L) return num_ret; } -static int _fairygui_GLoader3D_getVerticalAlign(lua_State *L) +static int _olua_fun_fairygui_GLoader3D_getVerticalAlign(lua_State *L) { olua_startinvoke(L); @@ -14484,7 +16064,7 @@ static int _fairygui_GLoader3D_getVerticalAlign(lua_State *L) return num_ret; } -static int _fairygui_GLoader3D_isPlaying(lua_State *L) +static int _olua_fun_fairygui_GLoader3D_isPlaying(lua_State *L) { olua_startinvoke(L); @@ -14501,7 +16081,7 @@ static int _fairygui_GLoader3D_isPlaying(lua_State *L) return num_ret; } -static int _fairygui_GLoader3D_isShrinkOnly(lua_State *L) +static int _olua_fun_fairygui_GLoader3D_isShrinkOnly(lua_State *L) { olua_startinvoke(L); @@ -14518,11 +16098,11 @@ static int _fairygui_GLoader3D_isShrinkOnly(lua_State *L) return num_ret; } -static int _fairygui_GLoader3D_new(lua_State *L) +static int _olua_fun_fairygui_GLoader3D_new(lua_State *L) { olua_startinvoke(L); - // GLoader3D() + // fairygui::GLoader3D() fairygui::GLoader3D *ret = new fairygui::GLoader3D(); int num_ret = olua_push_object(L, ret, "fgui.GLoader3D"); olua_postnew(L, ret); @@ -14532,7 +16112,7 @@ static int _fairygui_GLoader3D_new(lua_State *L) return num_ret; } -static int _fairygui_GLoader3D_setAlign(lua_State *L) +static int _olua_fun_fairygui_GLoader3D_setAlign(lua_State *L) { olua_startinvoke(L); @@ -14550,7 +16130,7 @@ static int _fairygui_GLoader3D_setAlign(lua_State *L) return 0; } -static int _fairygui_GLoader3D_setAnimationName(lua_State *L) +static int _olua_fun_fairygui_GLoader3D_setAnimationName(lua_State *L) { olua_startinvoke(L); @@ -14568,7 +16148,7 @@ static int _fairygui_GLoader3D_setAnimationName(lua_State *L) return 0; } -static int _fairygui_GLoader3D_setAutoSize(lua_State *L) +static int _olua_fun_fairygui_GLoader3D_setAutoSize(lua_State *L) { olua_startinvoke(L); @@ -14586,7 +16166,7 @@ static int _fairygui_GLoader3D_setAutoSize(lua_State *L) return 0; } -static int _fairygui_GLoader3D_setColor(lua_State *L) +static int _olua_fun_fairygui_GLoader3D_setColor(lua_State *L) { olua_startinvoke(L); @@ -14604,7 +16184,7 @@ static int _fairygui_GLoader3D_setColor(lua_State *L) return 0; } -static int _fairygui_GLoader3D_setContent(lua_State *L) +static int _olua_fun_fairygui_GLoader3D_setContent(lua_State *L) { olua_startinvoke(L); @@ -14625,7 +16205,7 @@ static int _fairygui_GLoader3D_setContent(lua_State *L) return 0; } -static int _fairygui_GLoader3D_setFill(lua_State *L) +static int _olua_fun_fairygui_GLoader3D_setFill(lua_State *L) { olua_startinvoke(L); @@ -14643,7 +16223,7 @@ static int _fairygui_GLoader3D_setFill(lua_State *L) return 0; } -static int _fairygui_GLoader3D_setFrame(lua_State *L) +static int _olua_fun_fairygui_GLoader3D_setFrame(lua_State *L) { olua_startinvoke(L); @@ -14661,7 +16241,7 @@ static int _fairygui_GLoader3D_setFrame(lua_State *L) return 0; } -static int _fairygui_GLoader3D_setLoop(lua_State *L) +static int _olua_fun_fairygui_GLoader3D_setLoop(lua_State *L) { olua_startinvoke(L); @@ -14679,7 +16259,7 @@ static int _fairygui_GLoader3D_setLoop(lua_State *L) return 0; } -static int _fairygui_GLoader3D_setPlaying(lua_State *L) +static int _olua_fun_fairygui_GLoader3D_setPlaying(lua_State *L) { olua_startinvoke(L); @@ -14697,7 +16277,7 @@ static int _fairygui_GLoader3D_setPlaying(lua_State *L) return 0; } -static int _fairygui_GLoader3D_setShrinkOnly(lua_State *L) +static int _olua_fun_fairygui_GLoader3D_setShrinkOnly(lua_State *L) { olua_startinvoke(L); @@ -14715,7 +16295,7 @@ static int _fairygui_GLoader3D_setShrinkOnly(lua_State *L) return 0; } -static int _fairygui_GLoader3D_setSkinName(lua_State *L) +static int _olua_fun_fairygui_GLoader3D_setSkinName(lua_State *L) { olua_startinvoke(L); @@ -14733,7 +16313,7 @@ static int _fairygui_GLoader3D_setSkinName(lua_State *L) return 0; } -static int _fairygui_GLoader3D_setURL(lua_State *L) +static int _olua_fun_fairygui_GLoader3D_setURL(lua_State *L) { olua_startinvoke(L); @@ -14751,7 +16331,7 @@ static int _fairygui_GLoader3D_setURL(lua_State *L) return 0; } -static int _fairygui_GLoader3D_setVerticalAlign(lua_State *L) +static int _olua_fun_fairygui_GLoader3D_setVerticalAlign(lua_State *L) { olua_startinvoke(L); @@ -14769,57 +16349,66 @@ static int _fairygui_GLoader3D_setVerticalAlign(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_fairygui_GLoader3D(lua_State *L) +static int _olua_cls_fgui_GLoader3D(lua_State *L) { oluacls_class(L, "fgui.GLoader3D"); - oluacls_func(L, "create", _fairygui_GLoader3D_create); - oluacls_func(L, "getAlign", _fairygui_GLoader3D_getAlign); - oluacls_func(L, "getAnimationName", _fairygui_GLoader3D_getAnimationName); - oluacls_func(L, "getAutoSize", _fairygui_GLoader3D_getAutoSize); - oluacls_func(L, "getColor", _fairygui_GLoader3D_getColor); - oluacls_func(L, "getContent", _fairygui_GLoader3D_getContent); - oluacls_func(L, "getFill", _fairygui_GLoader3D_getFill); - oluacls_func(L, "getFrame", _fairygui_GLoader3D_getFrame); - oluacls_func(L, "getLoop", _fairygui_GLoader3D_getLoop); - oluacls_func(L, "getSkinName", _fairygui_GLoader3D_getSkinName); - oluacls_func(L, "getURL", _fairygui_GLoader3D_getURL); - oluacls_func(L, "getVerticalAlign", _fairygui_GLoader3D_getVerticalAlign); - oluacls_func(L, "isPlaying", _fairygui_GLoader3D_isPlaying); - oluacls_func(L, "isShrinkOnly", _fairygui_GLoader3D_isShrinkOnly); - oluacls_func(L, "new", _fairygui_GLoader3D_new); - oluacls_func(L, "setAlign", _fairygui_GLoader3D_setAlign); - oluacls_func(L, "setAnimationName", _fairygui_GLoader3D_setAnimationName); - oluacls_func(L, "setAutoSize", _fairygui_GLoader3D_setAutoSize); - oluacls_func(L, "setColor", _fairygui_GLoader3D_setColor); - oluacls_func(L, "setContent", _fairygui_GLoader3D_setContent); - oluacls_func(L, "setFill", _fairygui_GLoader3D_setFill); - oluacls_func(L, "setFrame", _fairygui_GLoader3D_setFrame); - oluacls_func(L, "setLoop", _fairygui_GLoader3D_setLoop); - oluacls_func(L, "setPlaying", _fairygui_GLoader3D_setPlaying); - oluacls_func(L, "setShrinkOnly", _fairygui_GLoader3D_setShrinkOnly); - oluacls_func(L, "setSkinName", _fairygui_GLoader3D_setSkinName); - oluacls_func(L, "setURL", _fairygui_GLoader3D_setURL); - oluacls_func(L, "setVerticalAlign", _fairygui_GLoader3D_setVerticalAlign); - oluacls_prop(L, "align", _fairygui_GLoader3D_getAlign, _fairygui_GLoader3D_setAlign); - oluacls_prop(L, "animationName", _fairygui_GLoader3D_getAnimationName, _fairygui_GLoader3D_setAnimationName); - oluacls_prop(L, "autoSize", _fairygui_GLoader3D_getAutoSize, _fairygui_GLoader3D_setAutoSize); - oluacls_prop(L, "color", _fairygui_GLoader3D_getColor, _fairygui_GLoader3D_setColor); - oluacls_prop(L, "content", _fairygui_GLoader3D_getContent, _fairygui_GLoader3D_setContent); - oluacls_prop(L, "fill", _fairygui_GLoader3D_getFill, _fairygui_GLoader3D_setFill); - oluacls_prop(L, "frame", _fairygui_GLoader3D_getFrame, _fairygui_GLoader3D_setFrame); - oluacls_prop(L, "loop", _fairygui_GLoader3D_getLoop, _fairygui_GLoader3D_setLoop); - oluacls_prop(L, "playing", _fairygui_GLoader3D_isPlaying, _fairygui_GLoader3D_setPlaying); - oluacls_prop(L, "shrinkOnly", _fairygui_GLoader3D_isShrinkOnly, _fairygui_GLoader3D_setShrinkOnly); - oluacls_prop(L, "skinName", _fairygui_GLoader3D_getSkinName, _fairygui_GLoader3D_setSkinName); - oluacls_prop(L, "url", _fairygui_GLoader3D_getURL, _fairygui_GLoader3D_setURL); - oluacls_prop(L, "verticalAlign", _fairygui_GLoader3D_getVerticalAlign, _fairygui_GLoader3D_setVerticalAlign); + oluacls_func(L, "create", _olua_fun_fairygui_GLoader3D_create); + oluacls_func(L, "getAlign", _olua_fun_fairygui_GLoader3D_getAlign); + oluacls_func(L, "getAnimationName", _olua_fun_fairygui_GLoader3D_getAnimationName); + oluacls_func(L, "getAutoSize", _olua_fun_fairygui_GLoader3D_getAutoSize); + oluacls_func(L, "getColor", _olua_fun_fairygui_GLoader3D_getColor); + oluacls_func(L, "getContent", _olua_fun_fairygui_GLoader3D_getContent); + oluacls_func(L, "getFill", _olua_fun_fairygui_GLoader3D_getFill); + oluacls_func(L, "getFrame", _olua_fun_fairygui_GLoader3D_getFrame); + oluacls_func(L, "getLoop", _olua_fun_fairygui_GLoader3D_getLoop); + oluacls_func(L, "getSkinName", _olua_fun_fairygui_GLoader3D_getSkinName); + oluacls_func(L, "getURL", _olua_fun_fairygui_GLoader3D_getURL); + oluacls_func(L, "getVerticalAlign", _olua_fun_fairygui_GLoader3D_getVerticalAlign); + oluacls_func(L, "isPlaying", _olua_fun_fairygui_GLoader3D_isPlaying); + oluacls_func(L, "isShrinkOnly", _olua_fun_fairygui_GLoader3D_isShrinkOnly); + oluacls_func(L, "new", _olua_fun_fairygui_GLoader3D_new); + oluacls_func(L, "setAlign", _olua_fun_fairygui_GLoader3D_setAlign); + oluacls_func(L, "setAnimationName", _olua_fun_fairygui_GLoader3D_setAnimationName); + oluacls_func(L, "setAutoSize", _olua_fun_fairygui_GLoader3D_setAutoSize); + oluacls_func(L, "setColor", _olua_fun_fairygui_GLoader3D_setColor); + oluacls_func(L, "setContent", _olua_fun_fairygui_GLoader3D_setContent); + oluacls_func(L, "setFill", _olua_fun_fairygui_GLoader3D_setFill); + oluacls_func(L, "setFrame", _olua_fun_fairygui_GLoader3D_setFrame); + oluacls_func(L, "setLoop", _olua_fun_fairygui_GLoader3D_setLoop); + oluacls_func(L, "setPlaying", _olua_fun_fairygui_GLoader3D_setPlaying); + oluacls_func(L, "setShrinkOnly", _olua_fun_fairygui_GLoader3D_setShrinkOnly); + oluacls_func(L, "setSkinName", _olua_fun_fairygui_GLoader3D_setSkinName); + oluacls_func(L, "setURL", _olua_fun_fairygui_GLoader3D_setURL); + oluacls_func(L, "setVerticalAlign", _olua_fun_fairygui_GLoader3D_setVerticalAlign); + oluacls_prop(L, "align", _olua_fun_fairygui_GLoader3D_getAlign, _olua_fun_fairygui_GLoader3D_setAlign); + oluacls_prop(L, "animationName", _olua_fun_fairygui_GLoader3D_getAnimationName, _olua_fun_fairygui_GLoader3D_setAnimationName); + oluacls_prop(L, "autoSize", _olua_fun_fairygui_GLoader3D_getAutoSize, _olua_fun_fairygui_GLoader3D_setAutoSize); + oluacls_prop(L, "color", _olua_fun_fairygui_GLoader3D_getColor, _olua_fun_fairygui_GLoader3D_setColor); + oluacls_prop(L, "content", _olua_fun_fairygui_GLoader3D_getContent, _olua_fun_fairygui_GLoader3D_setContent); + oluacls_prop(L, "fill", _olua_fun_fairygui_GLoader3D_getFill, _olua_fun_fairygui_GLoader3D_setFill); + oluacls_prop(L, "frame", _olua_fun_fairygui_GLoader3D_getFrame, _olua_fun_fairygui_GLoader3D_setFrame); + oluacls_prop(L, "loop", _olua_fun_fairygui_GLoader3D_getLoop, _olua_fun_fairygui_GLoader3D_setLoop); + oluacls_prop(L, "playing", _olua_fun_fairygui_GLoader3D_isPlaying, _olua_fun_fairygui_GLoader3D_setPlaying); + oluacls_prop(L, "shrinkOnly", _olua_fun_fairygui_GLoader3D_isShrinkOnly, _olua_fun_fairygui_GLoader3D_setShrinkOnly); + oluacls_prop(L, "skinName", _olua_fun_fairygui_GLoader3D_getSkinName, _olua_fun_fairygui_GLoader3D_setSkinName); + oluacls_prop(L, "url", _olua_fun_fairygui_GLoader3D_getURL, _olua_fun_fairygui_GLoader3D_setURL); + oluacls_prop(L, "verticalAlign", _olua_fun_fairygui_GLoader3D_getVerticalAlign, _olua_fun_fairygui_GLoader3D_setVerticalAlign); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_fgui_GLoader3D(lua_State *L) +{ + olua_require(L, "fairygui", luaopen_fairygui); + if (!olua_getclass(L, "fgui.GLoader3D")) { + luaL_error(L, "class not found: fairygui::GLoader3D"); + } return 1; } OLUA_END_DECLS -static int _fairygui_GTextField_applyTextFormat(lua_State *L) +static int _olua_fun_fairygui_GTextField_applyTextFormat(lua_State *L) { olua_startinvoke(L); @@ -14835,7 +16424,7 @@ static int _fairygui_GTextField_applyTextFormat(lua_State *L) return 0; } -static int _fairygui_GTextField_flushVars(lua_State *L) +static int _olua_fun_fairygui_GTextField_flushVars(lua_State *L) { olua_startinvoke(L); @@ -14851,7 +16440,7 @@ static int _fairygui_GTextField_flushVars(lua_State *L) return 0; } -static int _fairygui_GTextField_getAutoSize(lua_State *L) +static int _olua_fun_fairygui_GTextField_getAutoSize(lua_State *L) { olua_startinvoke(L); @@ -14868,7 +16457,7 @@ static int _fairygui_GTextField_getAutoSize(lua_State *L) return num_ret; } -static int _fairygui_GTextField_getColor(lua_State *L) +static int _olua_fun_fairygui_GTextField_getColor(lua_State *L) { olua_startinvoke(L); @@ -14885,7 +16474,7 @@ static int _fairygui_GTextField_getColor(lua_State *L) return num_ret; } -static int _fairygui_GTextField_getFontSize(lua_State *L) +static int _olua_fun_fairygui_GTextField_getFontSize(lua_State *L) { olua_startinvoke(L); @@ -14902,7 +16491,7 @@ static int _fairygui_GTextField_getFontSize(lua_State *L) return num_ret; } -static int _fairygui_GTextField_getOutlineColor(lua_State *L) +static int _olua_fun_fairygui_GTextField_getOutlineColor(lua_State *L) { olua_startinvoke(L); @@ -14919,7 +16508,7 @@ static int _fairygui_GTextField_getOutlineColor(lua_State *L) return num_ret; } -static int _fairygui_GTextField_getTemplateVars(lua_State *L) +static int _olua_fun_fairygui_GTextField_getTemplateVars(lua_State *L) { olua_startinvoke(L); @@ -14929,14 +16518,14 @@ static int _fairygui_GTextField_getTemplateVars(lua_State *L) // cocos2d::ValueMap *getTemplateVars() cocos2d::ValueMap *ret = self->getTemplateVars(); - int num_ret = olua_push_pointer(L, ret, "cc.ValueMap"); + int num_ret = olua_push_valueptr(L, ret, "cc.types.ValueMap"); olua_endinvoke(L); return num_ret; } -static int _fairygui_GTextField_getTextFormat(lua_State *L) +static int _olua_fun_fairygui_GTextField_getTextFormat(lua_State *L) { olua_startinvoke(L); @@ -14953,7 +16542,7 @@ static int _fairygui_GTextField_getTextFormat(lua_State *L) return num_ret; } -static int _fairygui_GTextField_getTextSize(lua_State *L) +static int _olua_fun_fairygui_GTextField_getTextSize(lua_State *L) { olua_startinvoke(L); @@ -14970,7 +16559,7 @@ static int _fairygui_GTextField_getTextSize(lua_State *L) return num_ret; } -static int _fairygui_GTextField_isSingleLine(lua_State *L) +static int _olua_fun_fairygui_GTextField_isSingleLine(lua_State *L) { olua_startinvoke(L); @@ -14987,7 +16576,7 @@ static int _fairygui_GTextField_isSingleLine(lua_State *L) return num_ret; } -static int _fairygui_GTextField_isUBBEnabled(lua_State *L) +static int _olua_fun_fairygui_GTextField_isUBBEnabled(lua_State *L) { olua_startinvoke(L); @@ -15004,7 +16593,7 @@ static int _fairygui_GTextField_isUBBEnabled(lua_State *L) return num_ret; } -static int _fairygui_GTextField_setAutoSize(lua_State *L) +static int _olua_fun_fairygui_GTextField_setAutoSize(lua_State *L) { olua_startinvoke(L); @@ -15022,7 +16611,7 @@ static int _fairygui_GTextField_setAutoSize(lua_State *L) return 0; } -static int _fairygui_GTextField_setColor(lua_State *L) +static int _olua_fun_fairygui_GTextField_setColor(lua_State *L) { olua_startinvoke(L); @@ -15040,7 +16629,7 @@ static int _fairygui_GTextField_setColor(lua_State *L) return 0; } -static int _fairygui_GTextField_setFontSize(lua_State *L) +static int _olua_fun_fairygui_GTextField_setFontSize(lua_State *L) { olua_startinvoke(L); @@ -15058,7 +16647,7 @@ static int _fairygui_GTextField_setFontSize(lua_State *L) return 0; } -static int _fairygui_GTextField_setOutlineColor(lua_State *L) +static int _olua_fun_fairygui_GTextField_setOutlineColor(lua_State *L) { olua_startinvoke(L); @@ -15076,7 +16665,7 @@ static int _fairygui_GTextField_setOutlineColor(lua_State *L) return 0; } -static int _fairygui_GTextField_setSingleLine(lua_State *L) +static int _olua_fun_fairygui_GTextField_setSingleLine(lua_State *L) { olua_startinvoke(L); @@ -15094,7 +16683,7 @@ static int _fairygui_GTextField_setSingleLine(lua_State *L) return 0; } -static int _fairygui_GTextField_setTemplateVars(lua_State *L) +static int _olua_fun_fairygui_GTextField_setTemplateVars(lua_State *L) { olua_startinvoke(L); @@ -15102,7 +16691,7 @@ static int _fairygui_GTextField_setTemplateVars(lua_State *L) cocos2d::ValueMap *arg1 = nullptr; /** value */ olua_to_object(L, 1, &self, "fgui.GTextField"); - olua_check_pointer(L, 2, &arg1, "cc.ValueMap"); + olua_check_valueptr(L, 2, &arg1, "cc.types.ValueMap"); // void setTemplateVars(cocos2d::ValueMap *value) self->setTemplateVars(arg1); @@ -15112,7 +16701,7 @@ static int _fairygui_GTextField_setTemplateVars(lua_State *L) return 0; } -static int _fairygui_GTextField_setUBBEnabled(lua_State *L) +static int _olua_fun_fairygui_GTextField_setUBBEnabled(lua_State *L) { olua_startinvoke(L); @@ -15130,7 +16719,7 @@ static int _fairygui_GTextField_setUBBEnabled(lua_State *L) return 0; } -static int _fairygui_GTextField_setVar(lua_State *L) +static int _olua_fun_fairygui_GTextField_setVar(lua_State *L) { olua_startinvoke(L); @@ -15151,44 +16740,53 @@ static int _fairygui_GTextField_setVar(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_fairygui_GTextField(lua_State *L) +static int _olua_cls_fgui_GTextField(lua_State *L) { oluacls_class(L, "fgui.GTextField"); - oluacls_func(L, "applyTextFormat", _fairygui_GTextField_applyTextFormat); - oluacls_func(L, "flushVars", _fairygui_GTextField_flushVars); - oluacls_func(L, "getAutoSize", _fairygui_GTextField_getAutoSize); - oluacls_func(L, "getColor", _fairygui_GTextField_getColor); - oluacls_func(L, "getFontSize", _fairygui_GTextField_getFontSize); - oluacls_func(L, "getOutlineColor", _fairygui_GTextField_getOutlineColor); - oluacls_func(L, "getTemplateVars", _fairygui_GTextField_getTemplateVars); - oluacls_func(L, "getTextFormat", _fairygui_GTextField_getTextFormat); - oluacls_func(L, "getTextSize", _fairygui_GTextField_getTextSize); - oluacls_func(L, "isSingleLine", _fairygui_GTextField_isSingleLine); - oluacls_func(L, "isUBBEnabled", _fairygui_GTextField_isUBBEnabled); - oluacls_func(L, "setAutoSize", _fairygui_GTextField_setAutoSize); - oluacls_func(L, "setColor", _fairygui_GTextField_setColor); - oluacls_func(L, "setFontSize", _fairygui_GTextField_setFontSize); - oluacls_func(L, "setOutlineColor", _fairygui_GTextField_setOutlineColor); - oluacls_func(L, "setSingleLine", _fairygui_GTextField_setSingleLine); - oluacls_func(L, "setTemplateVars", _fairygui_GTextField_setTemplateVars); - oluacls_func(L, "setUBBEnabled", _fairygui_GTextField_setUBBEnabled); - oluacls_func(L, "setVar", _fairygui_GTextField_setVar); - oluacls_prop(L, "autoSize", _fairygui_GTextField_getAutoSize, _fairygui_GTextField_setAutoSize); - oluacls_prop(L, "color", _fairygui_GTextField_getColor, _fairygui_GTextField_setColor); - oluacls_prop(L, "fontSize", _fairygui_GTextField_getFontSize, _fairygui_GTextField_setFontSize); - oluacls_prop(L, "outlineColor", _fairygui_GTextField_getOutlineColor, _fairygui_GTextField_setOutlineColor); - oluacls_prop(L, "singleLine", _fairygui_GTextField_isSingleLine, _fairygui_GTextField_setSingleLine); - oluacls_prop(L, "templateVars", _fairygui_GTextField_getTemplateVars, _fairygui_GTextField_setTemplateVars); - oluacls_prop(L, "textFormat", _fairygui_GTextField_getTextFormat, nullptr); - oluacls_prop(L, "textSize", _fairygui_GTextField_getTextSize, nullptr); - oluacls_prop(L, "ubbEnabled", _fairygui_GTextField_isUBBEnabled, _fairygui_GTextField_setUBBEnabled); + oluacls_func(L, "applyTextFormat", _olua_fun_fairygui_GTextField_applyTextFormat); + oluacls_func(L, "flushVars", _olua_fun_fairygui_GTextField_flushVars); + oluacls_func(L, "getAutoSize", _olua_fun_fairygui_GTextField_getAutoSize); + oluacls_func(L, "getColor", _olua_fun_fairygui_GTextField_getColor); + oluacls_func(L, "getFontSize", _olua_fun_fairygui_GTextField_getFontSize); + oluacls_func(L, "getOutlineColor", _olua_fun_fairygui_GTextField_getOutlineColor); + oluacls_func(L, "getTemplateVars", _olua_fun_fairygui_GTextField_getTemplateVars); + oluacls_func(L, "getTextFormat", _olua_fun_fairygui_GTextField_getTextFormat); + oluacls_func(L, "getTextSize", _olua_fun_fairygui_GTextField_getTextSize); + oluacls_func(L, "isSingleLine", _olua_fun_fairygui_GTextField_isSingleLine); + oluacls_func(L, "isUBBEnabled", _olua_fun_fairygui_GTextField_isUBBEnabled); + oluacls_func(L, "setAutoSize", _olua_fun_fairygui_GTextField_setAutoSize); + oluacls_func(L, "setColor", _olua_fun_fairygui_GTextField_setColor); + oluacls_func(L, "setFontSize", _olua_fun_fairygui_GTextField_setFontSize); + oluacls_func(L, "setOutlineColor", _olua_fun_fairygui_GTextField_setOutlineColor); + oluacls_func(L, "setSingleLine", _olua_fun_fairygui_GTextField_setSingleLine); + oluacls_func(L, "setTemplateVars", _olua_fun_fairygui_GTextField_setTemplateVars); + oluacls_func(L, "setUBBEnabled", _olua_fun_fairygui_GTextField_setUBBEnabled); + oluacls_func(L, "setVar", _olua_fun_fairygui_GTextField_setVar); + oluacls_prop(L, "autoSize", _olua_fun_fairygui_GTextField_getAutoSize, _olua_fun_fairygui_GTextField_setAutoSize); + oluacls_prop(L, "color", _olua_fun_fairygui_GTextField_getColor, _olua_fun_fairygui_GTextField_setColor); + oluacls_prop(L, "fontSize", _olua_fun_fairygui_GTextField_getFontSize, _olua_fun_fairygui_GTextField_setFontSize); + oluacls_prop(L, "outlineColor", _olua_fun_fairygui_GTextField_getOutlineColor, _olua_fun_fairygui_GTextField_setOutlineColor); + oluacls_prop(L, "singleLine", _olua_fun_fairygui_GTextField_isSingleLine, _olua_fun_fairygui_GTextField_setSingleLine); + oluacls_prop(L, "templateVars", _olua_fun_fairygui_GTextField_getTemplateVars, _olua_fun_fairygui_GTextField_setTemplateVars); + oluacls_prop(L, "textFormat", _olua_fun_fairygui_GTextField_getTextFormat, nullptr); + oluacls_prop(L, "textSize", _olua_fun_fairygui_GTextField_getTextSize, nullptr); + oluacls_prop(L, "ubbEnabled", _olua_fun_fairygui_GTextField_isUBBEnabled, _olua_fun_fairygui_GTextField_setUBBEnabled); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_fgui_GTextField(lua_State *L) +{ + olua_require(L, "fairygui", luaopen_fairygui); + if (!olua_getclass(L, "fgui.GTextField")) { + luaL_error(L, "class not found: fairygui::GTextField"); + } return 1; } OLUA_END_DECLS -static int _fairygui_GBasicTextField_create(lua_State *L) +static int _olua_fun_fairygui_GBasicTextField_create(lua_State *L) { olua_startinvoke(L); @@ -15201,11 +16799,11 @@ static int _fairygui_GBasicTextField_create(lua_State *L) return num_ret; } -static int _fairygui_GBasicTextField_new(lua_State *L) +static int _olua_fun_fairygui_GBasicTextField_new(lua_State *L) { olua_startinvoke(L); - // GBasicTextField() + // fairygui::GBasicTextField() fairygui::GBasicTextField *ret = new fairygui::GBasicTextField(); int num_ret = olua_push_object(L, ret, "fgui.GBasicTextField"); olua_postnew(L, ret); @@ -15215,18 +16813,27 @@ static int _fairygui_GBasicTextField_new(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_fairygui_GBasicTextField(lua_State *L) +static int _olua_cls_fgui_GBasicTextField(lua_State *L) { oluacls_class(L, "fgui.GBasicTextField"); - oluacls_func(L, "create", _fairygui_GBasicTextField_create); - oluacls_func(L, "new", _fairygui_GBasicTextField_new); + oluacls_func(L, "create", _olua_fun_fairygui_GBasicTextField_create); + oluacls_func(L, "new", _olua_fun_fairygui_GBasicTextField_new); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_fgui_GBasicTextField(lua_State *L) +{ + olua_require(L, "fairygui", luaopen_fairygui); + if (!olua_getclass(L, "fgui.GBasicTextField")) { + luaL_error(L, "class not found: fairygui::GBasicTextField"); + } return 1; } OLUA_END_DECLS -static int _fairygui_GGraph_create(lua_State *L) +static int _olua_fun_fairygui_GGraph_create(lua_State *L) { olua_startinvoke(L); @@ -15239,7 +16846,7 @@ static int _fairygui_GGraph_create(lua_State *L) return num_ret; } -static int _fairygui_GGraph_drawEllipse(lua_State *L) +static int _olua_fun_fairygui_GGraph_drawEllipse(lua_State *L) { olua_startinvoke(L); @@ -15265,7 +16872,7 @@ static int _fairygui_GGraph_drawEllipse(lua_State *L) return 0; } -static int _fairygui_GGraph_drawPolygon(lua_State *L) +static int _olua_fun_fairygui_GGraph_drawPolygon(lua_State *L) { olua_startinvoke(L); @@ -15291,7 +16898,7 @@ static int _fairygui_GGraph_drawPolygon(lua_State *L) return 0; } -static int _fairygui_GGraph_drawRect(lua_State *L) +static int _olua_fun_fairygui_GGraph_drawRect(lua_State *L) { olua_startinvoke(L); @@ -15317,7 +16924,7 @@ static int _fairygui_GGraph_drawRect(lua_State *L) return 0; } -static int _fairygui_GGraph_drawRegularPolygon$1(lua_State *L) +static int _olua_fun_fairygui_GGraph_drawRegularPolygon$1(lua_State *L) { olua_startinvoke(L); @@ -15336,7 +16943,7 @@ static int _fairygui_GGraph_drawRegularPolygon$1(lua_State *L) olua_check_cocos2d_Color4F(L, 4, &arg3); olua_check_integer(L, 5, &arg4); olua_check_number(L, 6, &arg5); - olua_check_pointer(L, 7, &arg6, "olua.float"); + olua_check_valueptr(L, 7, &arg6, "olua.float"); olua_check_integer(L, 8, &arg7); // void drawRegularPolygon(int lineSize, const cocos2d::Color4F &lineColor, const cocos2d::Color4F &fillColor, int sides, @optional float startAngle, @optional const float *distances, @optional int distanceCount) @@ -15347,7 +16954,7 @@ static int _fairygui_GGraph_drawRegularPolygon$1(lua_State *L) return 0; } -static int _fairygui_GGraph_drawRegularPolygon$2(lua_State *L) +static int _olua_fun_fairygui_GGraph_drawRegularPolygon$2(lua_State *L) { olua_startinvoke(L); @@ -15363,7 +16970,7 @@ static int _fairygui_GGraph_drawRegularPolygon$2(lua_State *L) olua_check_cocos2d_Color4F(L, 4, &arg3); olua_check_integer(L, 5, &arg4); - // void drawRegularPolygon(int lineSize, const cocos2d::Color4F &lineColor, const cocos2d::Color4F &fillColor, int sides, @optional float startAngle, @optional const float *distances, @optional int distanceCount) + // void drawRegularPolygon(int lineSize, const cocos2d::Color4F &lineColor, const cocos2d::Color4F &fillColor, int sides) self->drawRegularPolygon(arg1, arg2, arg3, arg4); olua_endinvoke(L); @@ -15371,7 +16978,7 @@ static int _fairygui_GGraph_drawRegularPolygon$2(lua_State *L) return 0; } -static int _fairygui_GGraph_drawRegularPolygon$3(lua_State *L) +static int _olua_fun_fairygui_GGraph_drawRegularPolygon$3(lua_State *L) { olua_startinvoke(L); @@ -15389,7 +16996,7 @@ static int _fairygui_GGraph_drawRegularPolygon$3(lua_State *L) olua_check_integer(L, 5, &arg4); olua_check_number(L, 6, &arg5); - // void drawRegularPolygon(int lineSize, const cocos2d::Color4F &lineColor, const cocos2d::Color4F &fillColor, int sides, @optional float startAngle, @optional const float *distances, @optional int distanceCount) + // void drawRegularPolygon(int lineSize, const cocos2d::Color4F &lineColor, const cocos2d::Color4F &fillColor, int sides, @optional float startAngle) self->drawRegularPolygon(arg1, arg2, arg3, arg4, arg5); olua_endinvoke(L); @@ -15397,7 +17004,7 @@ static int _fairygui_GGraph_drawRegularPolygon$3(lua_State *L) return 0; } -static int _fairygui_GGraph_drawRegularPolygon$4(lua_State *L) +static int _olua_fun_fairygui_GGraph_drawRegularPolygon$4(lua_State *L) { olua_startinvoke(L); @@ -15415,9 +17022,9 @@ static int _fairygui_GGraph_drawRegularPolygon$4(lua_State *L) olua_check_cocos2d_Color4F(L, 4, &arg3); olua_check_integer(L, 5, &arg4); olua_check_number(L, 6, &arg5); - olua_check_pointer(L, 7, &arg6, "olua.float"); + olua_check_valueptr(L, 7, &arg6, "olua.float"); - // void drawRegularPolygon(int lineSize, const cocos2d::Color4F &lineColor, const cocos2d::Color4F &fillColor, int sides, @optional float startAngle, @optional const float *distances, @optional int distanceCount) + // void drawRegularPolygon(int lineSize, const cocos2d::Color4F &lineColor, const cocos2d::Color4F &fillColor, int sides, @optional float startAngle, @optional const float *distances) self->drawRegularPolygon(arg1, arg2, arg3, arg4, arg5, arg6); olua_endinvoke(L); @@ -15425,35 +17032,35 @@ static int _fairygui_GGraph_drawRegularPolygon$4(lua_State *L) return 0; } -static int _fairygui_GGraph_drawRegularPolygon(lua_State *L) +static int _olua_fun_fairygui_GGraph_drawRegularPolygon(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 4) { // if ((olua_is_integer(L, 2)) && (olua_is_cocos2d_Color4F(L, 3)) && (olua_is_cocos2d_Color4F(L, 4)) && (olua_is_integer(L, 5))) { - // void drawRegularPolygon(int lineSize, const cocos2d::Color4F &lineColor, const cocos2d::Color4F &fillColor, int sides, @optional float startAngle, @optional const float *distances, @optional int distanceCount) - return _fairygui_GGraph_drawRegularPolygon$2(L); + // void drawRegularPolygon(int lineSize, const cocos2d::Color4F &lineColor, const cocos2d::Color4F &fillColor, int sides) + return _olua_fun_fairygui_GGraph_drawRegularPolygon$2(L); // } } if (num_args == 5) { // if ((olua_is_integer(L, 2)) && (olua_is_cocos2d_Color4F(L, 3)) && (olua_is_cocos2d_Color4F(L, 4)) && (olua_is_integer(L, 5)) && (olua_is_number(L, 6))) { - // void drawRegularPolygon(int lineSize, const cocos2d::Color4F &lineColor, const cocos2d::Color4F &fillColor, int sides, @optional float startAngle, @optional const float *distances, @optional int distanceCount) - return _fairygui_GGraph_drawRegularPolygon$3(L); + // void drawRegularPolygon(int lineSize, const cocos2d::Color4F &lineColor, const cocos2d::Color4F &fillColor, int sides, @optional float startAngle) + return _olua_fun_fairygui_GGraph_drawRegularPolygon$3(L); // } } if (num_args == 6) { - // if ((olua_is_integer(L, 2)) && (olua_is_cocos2d_Color4F(L, 3)) && (olua_is_cocos2d_Color4F(L, 4)) && (olua_is_integer(L, 5)) && (olua_is_number(L, 6)) && (olua_is_pointer(L, 7, "olua.float"))) { - // void drawRegularPolygon(int lineSize, const cocos2d::Color4F &lineColor, const cocos2d::Color4F &fillColor, int sides, @optional float startAngle, @optional const float *distances, @optional int distanceCount) - return _fairygui_GGraph_drawRegularPolygon$4(L); + // if ((olua_is_integer(L, 2)) && (olua_is_cocos2d_Color4F(L, 3)) && (olua_is_cocos2d_Color4F(L, 4)) && (olua_is_integer(L, 5)) && (olua_is_number(L, 6)) && (olua_is_valueptr(L, 7, "olua.float"))) { + // void drawRegularPolygon(int lineSize, const cocos2d::Color4F &lineColor, const cocos2d::Color4F &fillColor, int sides, @optional float startAngle, @optional const float *distances) + return _olua_fun_fairygui_GGraph_drawRegularPolygon$4(L); // } } if (num_args == 7) { - // if ((olua_is_integer(L, 2)) && (olua_is_cocos2d_Color4F(L, 3)) && (olua_is_cocos2d_Color4F(L, 4)) && (olua_is_integer(L, 5)) && (olua_is_number(L, 6)) && (olua_is_pointer(L, 7, "olua.float")) && (olua_is_integer(L, 8))) { + // if ((olua_is_integer(L, 2)) && (olua_is_cocos2d_Color4F(L, 3)) && (olua_is_cocos2d_Color4F(L, 4)) && (olua_is_integer(L, 5)) && (olua_is_number(L, 6)) && (olua_is_valueptr(L, 7, "olua.float")) && (olua_is_integer(L, 8))) { // void drawRegularPolygon(int lineSize, const cocos2d::Color4F &lineColor, const cocos2d::Color4F &fillColor, int sides, @optional float startAngle, @optional const float *distances, @optional int distanceCount) - return _fairygui_GGraph_drawRegularPolygon$1(L); + return _olua_fun_fairygui_GGraph_drawRegularPolygon$1(L); // } } @@ -15462,7 +17069,7 @@ static int _fairygui_GGraph_drawRegularPolygon(lua_State *L) return 0; } -static int _fairygui_GGraph_getColor(lua_State *L) +static int _olua_fun_fairygui_GGraph_getColor(lua_State *L) { olua_startinvoke(L); @@ -15479,7 +17086,7 @@ static int _fairygui_GGraph_getColor(lua_State *L) return num_ret; } -static int _fairygui_GGraph_isEmpty(lua_State *L) +static int _olua_fun_fairygui_GGraph_isEmpty(lua_State *L) { olua_startinvoke(L); @@ -15496,11 +17103,11 @@ static int _fairygui_GGraph_isEmpty(lua_State *L) return num_ret; } -static int _fairygui_GGraph_new(lua_State *L) +static int _olua_fun_fairygui_GGraph_new(lua_State *L) { olua_startinvoke(L); - // GGraph() + // fairygui::GGraph() fairygui::GGraph *ret = new fairygui::GGraph(); int num_ret = olua_push_object(L, ret, "fgui.GGraph"); olua_postnew(L, ret); @@ -15510,7 +17117,7 @@ static int _fairygui_GGraph_new(lua_State *L) return num_ret; } -static int _fairygui_GGraph_setColor(lua_State *L) +static int _olua_fun_fairygui_GGraph_setColor(lua_State *L) { olua_startinvoke(L); @@ -15528,27 +17135,36 @@ static int _fairygui_GGraph_setColor(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_fairygui_GGraph(lua_State *L) +static int _olua_cls_fgui_GGraph(lua_State *L) { oluacls_class(L, "fgui.GGraph"); - oluacls_func(L, "create", _fairygui_GGraph_create); - oluacls_func(L, "drawEllipse", _fairygui_GGraph_drawEllipse); - oluacls_func(L, "drawPolygon", _fairygui_GGraph_drawPolygon); - oluacls_func(L, "drawRect", _fairygui_GGraph_drawRect); - oluacls_func(L, "drawRegularPolygon", _fairygui_GGraph_drawRegularPolygon); - oluacls_func(L, "getColor", _fairygui_GGraph_getColor); - oluacls_func(L, "isEmpty", _fairygui_GGraph_isEmpty); - oluacls_func(L, "new", _fairygui_GGraph_new); - oluacls_func(L, "setColor", _fairygui_GGraph_setColor); - oluacls_prop(L, "color", _fairygui_GGraph_getColor, _fairygui_GGraph_setColor); - oluacls_prop(L, "empty", _fairygui_GGraph_isEmpty, nullptr); + oluacls_func(L, "create", _olua_fun_fairygui_GGraph_create); + oluacls_func(L, "drawEllipse", _olua_fun_fairygui_GGraph_drawEllipse); + oluacls_func(L, "drawPolygon", _olua_fun_fairygui_GGraph_drawPolygon); + oluacls_func(L, "drawRect", _olua_fun_fairygui_GGraph_drawRect); + oluacls_func(L, "drawRegularPolygon", _olua_fun_fairygui_GGraph_drawRegularPolygon); + oluacls_func(L, "getColor", _olua_fun_fairygui_GGraph_getColor); + oluacls_func(L, "isEmpty", _olua_fun_fairygui_GGraph_isEmpty); + oluacls_func(L, "new", _olua_fun_fairygui_GGraph_new); + oluacls_func(L, "setColor", _olua_fun_fairygui_GGraph_setColor); + oluacls_prop(L, "color", _olua_fun_fairygui_GGraph_getColor, _olua_fun_fairygui_GGraph_setColor); + oluacls_prop(L, "empty", _olua_fun_fairygui_GGraph_isEmpty, nullptr); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_fgui_GGraph(lua_State *L) +{ + olua_require(L, "fairygui", luaopen_fairygui); + if (!olua_getclass(L, "fgui.GGraph")) { + luaL_error(L, "class not found: fairygui::GGraph"); + } return 1; } OLUA_END_DECLS -static int _fairygui_GButton_create(lua_State *L) +static int _olua_fun_fairygui_GButton_create(lua_State *L) { olua_startinvoke(L); @@ -15561,7 +17177,7 @@ static int _fairygui_GButton_create(lua_State *L) return num_ret; } -static int _fairygui_GButton_getRelatedController(lua_State *L) +static int _olua_fun_fairygui_GButton_getRelatedController(lua_State *L) { olua_startinvoke(L); @@ -15581,7 +17197,7 @@ static int _fairygui_GButton_getRelatedController(lua_State *L) return num_ret; } -static int _fairygui_GButton_getSelectedIcon(lua_State *L) +static int _olua_fun_fairygui_GButton_getSelectedIcon(lua_State *L) { olua_startinvoke(L); @@ -15598,7 +17214,7 @@ static int _fairygui_GButton_getSelectedIcon(lua_State *L) return num_ret; } -static int _fairygui_GButton_getSelectedTitle(lua_State *L) +static int _olua_fun_fairygui_GButton_getSelectedTitle(lua_State *L) { olua_startinvoke(L); @@ -15615,7 +17231,7 @@ static int _fairygui_GButton_getSelectedTitle(lua_State *L) return num_ret; } -static int _fairygui_GButton_getTextField(lua_State *L) +static int _olua_fun_fairygui_GButton_getTextField(lua_State *L) { olua_startinvoke(L); @@ -15635,7 +17251,7 @@ static int _fairygui_GButton_getTextField(lua_State *L) return num_ret; } -static int _fairygui_GButton_getTitle(lua_State *L) +static int _olua_fun_fairygui_GButton_getTitle(lua_State *L) { olua_startinvoke(L); @@ -15652,7 +17268,7 @@ static int _fairygui_GButton_getTitle(lua_State *L) return num_ret; } -static int _fairygui_GButton_getTitleColor(lua_State *L) +static int _olua_fun_fairygui_GButton_getTitleColor(lua_State *L) { olua_startinvoke(L); @@ -15669,7 +17285,7 @@ static int _fairygui_GButton_getTitleColor(lua_State *L) return num_ret; } -static int _fairygui_GButton_getTitleFontSize(lua_State *L) +static int _olua_fun_fairygui_GButton_getTitleFontSize(lua_State *L) { olua_startinvoke(L); @@ -15686,7 +17302,7 @@ static int _fairygui_GButton_getTitleFontSize(lua_State *L) return num_ret; } -static int _fairygui_GButton_isChangeStateOnClick(lua_State *L) +static int _olua_fun_fairygui_GButton_isChangeStateOnClick(lua_State *L) { olua_startinvoke(L); @@ -15703,7 +17319,7 @@ static int _fairygui_GButton_isChangeStateOnClick(lua_State *L) return num_ret; } -static int _fairygui_GButton_isSelected(lua_State *L) +static int _olua_fun_fairygui_GButton_isSelected(lua_State *L) { olua_startinvoke(L); @@ -15720,11 +17336,11 @@ static int _fairygui_GButton_isSelected(lua_State *L) return num_ret; } -static int _fairygui_GButton_new(lua_State *L) +static int _olua_fun_fairygui_GButton_new(lua_State *L) { olua_startinvoke(L); - // GButton() + // fairygui::GButton() fairygui::GButton *ret = new fairygui::GButton(); int num_ret = olua_push_object(L, ret, "fgui.GButton"); olua_postnew(L, ret); @@ -15734,7 +17350,7 @@ static int _fairygui_GButton_new(lua_State *L) return num_ret; } -static int _fairygui_GButton_setChangeStateOnClick(lua_State *L) +static int _olua_fun_fairygui_GButton_setChangeStateOnClick(lua_State *L) { olua_startinvoke(L); @@ -15752,7 +17368,7 @@ static int _fairygui_GButton_setChangeStateOnClick(lua_State *L) return 0; } -static int _fairygui_GButton_setRelatedController(lua_State *L) +static int _olua_fun_fairygui_GButton_setRelatedController(lua_State *L) { olua_startinvoke(L); @@ -15773,7 +17389,7 @@ static int _fairygui_GButton_setRelatedController(lua_State *L) return 0; } -static int _fairygui_GButton_setSelected(lua_State *L) +static int _olua_fun_fairygui_GButton_setSelected(lua_State *L) { olua_startinvoke(L); @@ -15791,7 +17407,7 @@ static int _fairygui_GButton_setSelected(lua_State *L) return 0; } -static int _fairygui_GButton_setSelectedIcon(lua_State *L) +static int _olua_fun_fairygui_GButton_setSelectedIcon(lua_State *L) { olua_startinvoke(L); @@ -15809,7 +17425,7 @@ static int _fairygui_GButton_setSelectedIcon(lua_State *L) return 0; } -static int _fairygui_GButton_setSelectedTitle(lua_State *L) +static int _olua_fun_fairygui_GButton_setSelectedTitle(lua_State *L) { olua_startinvoke(L); @@ -15827,7 +17443,7 @@ static int _fairygui_GButton_setSelectedTitle(lua_State *L) return 0; } -static int _fairygui_GButton_setTitle(lua_State *L) +static int _olua_fun_fairygui_GButton_setTitle(lua_State *L) { olua_startinvoke(L); @@ -15845,7 +17461,7 @@ static int _fairygui_GButton_setTitle(lua_State *L) return 0; } -static int _fairygui_GButton_setTitleColor(lua_State *L) +static int _olua_fun_fairygui_GButton_setTitleColor(lua_State *L) { olua_startinvoke(L); @@ -15863,7 +17479,7 @@ static int _fairygui_GButton_setTitleColor(lua_State *L) return 0; } -static int _fairygui_GButton_setTitleFontSize(lua_State *L) +static int _olua_fun_fairygui_GButton_setTitleFontSize(lua_State *L) { olua_startinvoke(L); @@ -15881,38 +17497,37 @@ static int _fairygui_GButton_setTitleFontSize(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_fairygui_GButton(lua_State *L) +static int _olua_cls_fgui_GButton(lua_State *L) { oluacls_class(L, "fgui.GButton"); - oluacls_func(L, "create", _fairygui_GButton_create); - oluacls_func(L, "getRelatedController", _fairygui_GButton_getRelatedController); - oluacls_func(L, "getSelectedIcon", _fairygui_GButton_getSelectedIcon); - oluacls_func(L, "getSelectedTitle", _fairygui_GButton_getSelectedTitle); - oluacls_func(L, "getTextField", _fairygui_GButton_getTextField); - oluacls_func(L, "getTitle", _fairygui_GButton_getTitle); - oluacls_func(L, "getTitleColor", _fairygui_GButton_getTitleColor); - oluacls_func(L, "getTitleFontSize", _fairygui_GButton_getTitleFontSize); - oluacls_func(L, "isChangeStateOnClick", _fairygui_GButton_isChangeStateOnClick); - oluacls_func(L, "isSelected", _fairygui_GButton_isSelected); - oluacls_func(L, "new", _fairygui_GButton_new); - oluacls_func(L, "setChangeStateOnClick", _fairygui_GButton_setChangeStateOnClick); - oluacls_func(L, "setRelatedController", _fairygui_GButton_setRelatedController); - oluacls_func(L, "setSelected", _fairygui_GButton_setSelected); - oluacls_func(L, "setSelectedIcon", _fairygui_GButton_setSelectedIcon); - oluacls_func(L, "setSelectedTitle", _fairygui_GButton_setSelectedTitle); - oluacls_func(L, "setTitle", _fairygui_GButton_setTitle); - oluacls_func(L, "setTitleColor", _fairygui_GButton_setTitleColor); - oluacls_func(L, "setTitleFontSize", _fairygui_GButton_setTitleFontSize); - oluacls_prop(L, "changeStateOnClick", _fairygui_GButton_isChangeStateOnClick, _fairygui_GButton_setChangeStateOnClick); - oluacls_prop(L, "relatedController", _fairygui_GButton_getRelatedController, _fairygui_GButton_setRelatedController); - oluacls_prop(L, "selected", _fairygui_GButton_isSelected, _fairygui_GButton_setSelected); - oluacls_prop(L, "selectedIcon", _fairygui_GButton_getSelectedIcon, _fairygui_GButton_setSelectedIcon); - oluacls_prop(L, "selectedTitle", _fairygui_GButton_getSelectedTitle, _fairygui_GButton_setSelectedTitle); - oluacls_prop(L, "textField", _fairygui_GButton_getTextField, nullptr); - oluacls_prop(L, "title", _fairygui_GButton_getTitle, _fairygui_GButton_setTitle); - oluacls_prop(L, "titleColor", _fairygui_GButton_getTitleColor, _fairygui_GButton_setTitleColor); - oluacls_prop(L, "titleFontSize", _fairygui_GButton_getTitleFontSize, _fairygui_GButton_setTitleFontSize); + oluacls_func(L, "create", _olua_fun_fairygui_GButton_create); + oluacls_func(L, "getRelatedController", _olua_fun_fairygui_GButton_getRelatedController); + oluacls_func(L, "getSelectedIcon", _olua_fun_fairygui_GButton_getSelectedIcon); + oluacls_func(L, "getSelectedTitle", _olua_fun_fairygui_GButton_getSelectedTitle); + oluacls_func(L, "getTextField", _olua_fun_fairygui_GButton_getTextField); + oluacls_func(L, "getTitle", _olua_fun_fairygui_GButton_getTitle); + oluacls_func(L, "getTitleColor", _olua_fun_fairygui_GButton_getTitleColor); + oluacls_func(L, "getTitleFontSize", _olua_fun_fairygui_GButton_getTitleFontSize); + oluacls_func(L, "isChangeStateOnClick", _olua_fun_fairygui_GButton_isChangeStateOnClick); + oluacls_func(L, "isSelected", _olua_fun_fairygui_GButton_isSelected); + oluacls_func(L, "new", _olua_fun_fairygui_GButton_new); + oluacls_func(L, "setChangeStateOnClick", _olua_fun_fairygui_GButton_setChangeStateOnClick); + oluacls_func(L, "setRelatedController", _olua_fun_fairygui_GButton_setRelatedController); + oluacls_func(L, "setSelected", _olua_fun_fairygui_GButton_setSelected); + oluacls_func(L, "setSelectedIcon", _olua_fun_fairygui_GButton_setSelectedIcon); + oluacls_func(L, "setSelectedTitle", _olua_fun_fairygui_GButton_setSelectedTitle); + oluacls_func(L, "setTitle", _olua_fun_fairygui_GButton_setTitle); + oluacls_func(L, "setTitleColor", _olua_fun_fairygui_GButton_setTitleColor); + oluacls_func(L, "setTitleFontSize", _olua_fun_fairygui_GButton_setTitleFontSize); + oluacls_prop(L, "changeStateOnClick", _olua_fun_fairygui_GButton_isChangeStateOnClick, _olua_fun_fairygui_GButton_setChangeStateOnClick); + oluacls_prop(L, "relatedController", _olua_fun_fairygui_GButton_getRelatedController, _olua_fun_fairygui_GButton_setRelatedController); + oluacls_prop(L, "selected", _olua_fun_fairygui_GButton_isSelected, _olua_fun_fairygui_GButton_setSelected); + oluacls_prop(L, "selectedIcon", _olua_fun_fairygui_GButton_getSelectedIcon, _olua_fun_fairygui_GButton_setSelectedIcon); + oluacls_prop(L, "selectedTitle", _olua_fun_fairygui_GButton_getSelectedTitle, _olua_fun_fairygui_GButton_setSelectedTitle); + oluacls_prop(L, "textField", _olua_fun_fairygui_GButton_getTextField, nullptr); + oluacls_prop(L, "title", _olua_fun_fairygui_GButton_getTitle, _olua_fun_fairygui_GButton_setTitle); + oluacls_prop(L, "titleColor", _olua_fun_fairygui_GButton_getTitleColor, _olua_fun_fairygui_GButton_setTitleColor); + oluacls_prop(L, "titleFontSize", _olua_fun_fairygui_GButton_getTitleFontSize, _olua_fun_fairygui_GButton_setTitleFontSize); oluacls_const(L, "DISABLED", fairygui::GButton::DISABLED); oluacls_const(L, "DOWN", fairygui::GButton::DOWN); oluacls_const(L, "OVER", fairygui::GButton::OVER); @@ -15922,9 +17537,19 @@ OLUA_LIB int luaopen_fairygui_GButton(lua_State *L) return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_fgui_GButton(lua_State *L) +{ + olua_require(L, "fairygui", luaopen_fairygui); + if (!olua_getclass(L, "fgui.GButton")) { + luaL_error(L, "class not found: fairygui::GButton"); + } + return 1; +} OLUA_END_DECLS -static int _fairygui_GImage_create(lua_State *L) +static int _olua_fun_fairygui_GImage_create(lua_State *L) { olua_startinvoke(L); @@ -15937,7 +17562,7 @@ static int _fairygui_GImage_create(lua_State *L) return num_ret; } -static int _fairygui_GImage_getColor(lua_State *L) +static int _olua_fun_fairygui_GImage_getColor(lua_State *L) { olua_startinvoke(L); @@ -15954,7 +17579,7 @@ static int _fairygui_GImage_getColor(lua_State *L) return num_ret; } -static int _fairygui_GImage_getFillAmount(lua_State *L) +static int _olua_fun_fairygui_GImage_getFillAmount(lua_State *L) { olua_startinvoke(L); @@ -15971,7 +17596,7 @@ static int _fairygui_GImage_getFillAmount(lua_State *L) return num_ret; } -static int _fairygui_GImage_getFillMethod(lua_State *L) +static int _olua_fun_fairygui_GImage_getFillMethod(lua_State *L) { olua_startinvoke(L); @@ -15988,7 +17613,7 @@ static int _fairygui_GImage_getFillMethod(lua_State *L) return num_ret; } -static int _fairygui_GImage_getFillOrigin(lua_State *L) +static int _olua_fun_fairygui_GImage_getFillOrigin(lua_State *L) { olua_startinvoke(L); @@ -16005,7 +17630,7 @@ static int _fairygui_GImage_getFillOrigin(lua_State *L) return num_ret; } -static int _fairygui_GImage_getFlip(lua_State *L) +static int _olua_fun_fairygui_GImage_getFlip(lua_State *L) { olua_startinvoke(L); @@ -16022,7 +17647,7 @@ static int _fairygui_GImage_getFlip(lua_State *L) return num_ret; } -static int _fairygui_GImage_isFillClockwise(lua_State *L) +static int _olua_fun_fairygui_GImage_isFillClockwise(lua_State *L) { olua_startinvoke(L); @@ -16039,11 +17664,11 @@ static int _fairygui_GImage_isFillClockwise(lua_State *L) return num_ret; } -static int _fairygui_GImage_new(lua_State *L) +static int _olua_fun_fairygui_GImage_new(lua_State *L) { olua_startinvoke(L); - // GImage() + // fairygui::GImage() fairygui::GImage *ret = new fairygui::GImage(); int num_ret = olua_push_object(L, ret, "fgui.GImage"); olua_postnew(L, ret); @@ -16053,7 +17678,7 @@ static int _fairygui_GImage_new(lua_State *L) return num_ret; } -static int _fairygui_GImage_setColor(lua_State *L) +static int _olua_fun_fairygui_GImage_setColor(lua_State *L) { olua_startinvoke(L); @@ -16071,7 +17696,7 @@ static int _fairygui_GImage_setColor(lua_State *L) return 0; } -static int _fairygui_GImage_setFillAmount(lua_State *L) +static int _olua_fun_fairygui_GImage_setFillAmount(lua_State *L) { olua_startinvoke(L); @@ -16089,7 +17714,7 @@ static int _fairygui_GImage_setFillAmount(lua_State *L) return 0; } -static int _fairygui_GImage_setFillClockwise(lua_State *L) +static int _olua_fun_fairygui_GImage_setFillClockwise(lua_State *L) { olua_startinvoke(L); @@ -16107,7 +17732,7 @@ static int _fairygui_GImage_setFillClockwise(lua_State *L) return 0; } -static int _fairygui_GImage_setFillMethod(lua_State *L) +static int _olua_fun_fairygui_GImage_setFillMethod(lua_State *L) { olua_startinvoke(L); @@ -16125,7 +17750,7 @@ static int _fairygui_GImage_setFillMethod(lua_State *L) return 0; } -static int _fairygui_GImage_setFillOrigin(lua_State *L) +static int _olua_fun_fairygui_GImage_setFillOrigin(lua_State *L) { olua_startinvoke(L); @@ -16143,7 +17768,7 @@ static int _fairygui_GImage_setFillOrigin(lua_State *L) return 0; } -static int _fairygui_GImage_setFlip(lua_State *L) +static int _olua_fun_fairygui_GImage_setFlip(lua_State *L) { olua_startinvoke(L); @@ -16161,36 +17786,45 @@ static int _fairygui_GImage_setFlip(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_fairygui_GImage(lua_State *L) +static int _olua_cls_fgui_GImage(lua_State *L) { oluacls_class(L, "fgui.GImage"); - oluacls_func(L, "create", _fairygui_GImage_create); - oluacls_func(L, "getColor", _fairygui_GImage_getColor); - oluacls_func(L, "getFillAmount", _fairygui_GImage_getFillAmount); - oluacls_func(L, "getFillMethod", _fairygui_GImage_getFillMethod); - oluacls_func(L, "getFillOrigin", _fairygui_GImage_getFillOrigin); - oluacls_func(L, "getFlip", _fairygui_GImage_getFlip); - oluacls_func(L, "isFillClockwise", _fairygui_GImage_isFillClockwise); - oluacls_func(L, "new", _fairygui_GImage_new); - oluacls_func(L, "setColor", _fairygui_GImage_setColor); - oluacls_func(L, "setFillAmount", _fairygui_GImage_setFillAmount); - oluacls_func(L, "setFillClockwise", _fairygui_GImage_setFillClockwise); - oluacls_func(L, "setFillMethod", _fairygui_GImage_setFillMethod); - oluacls_func(L, "setFillOrigin", _fairygui_GImage_setFillOrigin); - oluacls_func(L, "setFlip", _fairygui_GImage_setFlip); - oluacls_prop(L, "color", _fairygui_GImage_getColor, _fairygui_GImage_setColor); - oluacls_prop(L, "fillAmount", _fairygui_GImage_getFillAmount, _fairygui_GImage_setFillAmount); - oluacls_prop(L, "fillClockwise", _fairygui_GImage_isFillClockwise, _fairygui_GImage_setFillClockwise); - oluacls_prop(L, "fillMethod", _fairygui_GImage_getFillMethod, _fairygui_GImage_setFillMethod); - oluacls_prop(L, "fillOrigin", _fairygui_GImage_getFillOrigin, _fairygui_GImage_setFillOrigin); - oluacls_prop(L, "flip", _fairygui_GImage_getFlip, _fairygui_GImage_setFlip); + oluacls_func(L, "create", _olua_fun_fairygui_GImage_create); + oluacls_func(L, "getColor", _olua_fun_fairygui_GImage_getColor); + oluacls_func(L, "getFillAmount", _olua_fun_fairygui_GImage_getFillAmount); + oluacls_func(L, "getFillMethod", _olua_fun_fairygui_GImage_getFillMethod); + oluacls_func(L, "getFillOrigin", _olua_fun_fairygui_GImage_getFillOrigin); + oluacls_func(L, "getFlip", _olua_fun_fairygui_GImage_getFlip); + oluacls_func(L, "isFillClockwise", _olua_fun_fairygui_GImage_isFillClockwise); + oluacls_func(L, "new", _olua_fun_fairygui_GImage_new); + oluacls_func(L, "setColor", _olua_fun_fairygui_GImage_setColor); + oluacls_func(L, "setFillAmount", _olua_fun_fairygui_GImage_setFillAmount); + oluacls_func(L, "setFillClockwise", _olua_fun_fairygui_GImage_setFillClockwise); + oluacls_func(L, "setFillMethod", _olua_fun_fairygui_GImage_setFillMethod); + oluacls_func(L, "setFillOrigin", _olua_fun_fairygui_GImage_setFillOrigin); + oluacls_func(L, "setFlip", _olua_fun_fairygui_GImage_setFlip); + oluacls_prop(L, "color", _olua_fun_fairygui_GImage_getColor, _olua_fun_fairygui_GImage_setColor); + oluacls_prop(L, "fillAmount", _olua_fun_fairygui_GImage_getFillAmount, _olua_fun_fairygui_GImage_setFillAmount); + oluacls_prop(L, "fillClockwise", _olua_fun_fairygui_GImage_isFillClockwise, _olua_fun_fairygui_GImage_setFillClockwise); + oluacls_prop(L, "fillMethod", _olua_fun_fairygui_GImage_getFillMethod, _olua_fun_fairygui_GImage_setFillMethod); + oluacls_prop(L, "fillOrigin", _olua_fun_fairygui_GImage_getFillOrigin, _olua_fun_fairygui_GImage_setFillOrigin); + oluacls_prop(L, "flip", _olua_fun_fairygui_GImage_getFlip, _olua_fun_fairygui_GImage_setFlip); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_fgui_GImage(lua_State *L) +{ + olua_require(L, "fairygui", luaopen_fairygui); + if (!olua_getclass(L, "fgui.GImage")) { + luaL_error(L, "class not found: fairygui::GImage"); + } + return 1; +} OLUA_END_DECLS -static int _fairygui_GLabel_create(lua_State *L) +static int _olua_fun_fairygui_GLabel_create(lua_State *L) { olua_startinvoke(L); @@ -16203,7 +17837,7 @@ static int _fairygui_GLabel_create(lua_State *L) return num_ret; } -static int _fairygui_GLabel_getTextField(lua_State *L) +static int _olua_fun_fairygui_GLabel_getTextField(lua_State *L) { olua_startinvoke(L); @@ -16223,7 +17857,7 @@ static int _fairygui_GLabel_getTextField(lua_State *L) return num_ret; } -static int _fairygui_GLabel_getTitle(lua_State *L) +static int _olua_fun_fairygui_GLabel_getTitle(lua_State *L) { olua_startinvoke(L); @@ -16240,7 +17874,7 @@ static int _fairygui_GLabel_getTitle(lua_State *L) return num_ret; } -static int _fairygui_GLabel_getTitleColor(lua_State *L) +static int _olua_fun_fairygui_GLabel_getTitleColor(lua_State *L) { olua_startinvoke(L); @@ -16257,7 +17891,7 @@ static int _fairygui_GLabel_getTitleColor(lua_State *L) return num_ret; } -static int _fairygui_GLabel_getTitleFontSize(lua_State *L) +static int _olua_fun_fairygui_GLabel_getTitleFontSize(lua_State *L) { olua_startinvoke(L); @@ -16274,11 +17908,11 @@ static int _fairygui_GLabel_getTitleFontSize(lua_State *L) return num_ret; } -static int _fairygui_GLabel_new(lua_State *L) +static int _olua_fun_fairygui_GLabel_new(lua_State *L) { olua_startinvoke(L); - // GLabel() + // fairygui::GLabel() fairygui::GLabel *ret = new fairygui::GLabel(); int num_ret = olua_push_object(L, ret, "fgui.GLabel"); olua_postnew(L, ret); @@ -16288,7 +17922,7 @@ static int _fairygui_GLabel_new(lua_State *L) return num_ret; } -static int _fairygui_GLabel_setTitle(lua_State *L) +static int _olua_fun_fairygui_GLabel_setTitle(lua_State *L) { olua_startinvoke(L); @@ -16306,7 +17940,7 @@ static int _fairygui_GLabel_setTitle(lua_State *L) return 0; } -static int _fairygui_GLabel_setTitleColor(lua_State *L) +static int _olua_fun_fairygui_GLabel_setTitleColor(lua_State *L) { olua_startinvoke(L); @@ -16324,7 +17958,7 @@ static int _fairygui_GLabel_setTitleColor(lua_State *L) return 0; } -static int _fairygui_GLabel_setTitleFontSize(lua_State *L) +static int _olua_fun_fairygui_GLabel_setTitleFontSize(lua_State *L) { olua_startinvoke(L); @@ -16342,73 +17976,100 @@ static int _fairygui_GLabel_setTitleFontSize(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_fairygui_GLabel(lua_State *L) +static int _olua_cls_fgui_GLabel(lua_State *L) { oluacls_class(L, "fgui.GLabel"); - oluacls_func(L, "create", _fairygui_GLabel_create); - oluacls_func(L, "getTextField", _fairygui_GLabel_getTextField); - oluacls_func(L, "getTitle", _fairygui_GLabel_getTitle); - oluacls_func(L, "getTitleColor", _fairygui_GLabel_getTitleColor); - oluacls_func(L, "getTitleFontSize", _fairygui_GLabel_getTitleFontSize); - oluacls_func(L, "new", _fairygui_GLabel_new); - oluacls_func(L, "setTitle", _fairygui_GLabel_setTitle); - oluacls_func(L, "setTitleColor", _fairygui_GLabel_setTitleColor); - oluacls_func(L, "setTitleFontSize", _fairygui_GLabel_setTitleFontSize); - oluacls_prop(L, "textField", _fairygui_GLabel_getTextField, nullptr); - oluacls_prop(L, "title", _fairygui_GLabel_getTitle, _fairygui_GLabel_setTitle); - oluacls_prop(L, "titleColor", _fairygui_GLabel_getTitleColor, _fairygui_GLabel_setTitleColor); - oluacls_prop(L, "titleFontSize", _fairygui_GLabel_getTitleFontSize, _fairygui_GLabel_setTitleFontSize); + oluacls_func(L, "create", _olua_fun_fairygui_GLabel_create); + oluacls_func(L, "getTextField", _olua_fun_fairygui_GLabel_getTextField); + oluacls_func(L, "getTitle", _olua_fun_fairygui_GLabel_getTitle); + oluacls_func(L, "getTitleColor", _olua_fun_fairygui_GLabel_getTitleColor); + oluacls_func(L, "getTitleFontSize", _olua_fun_fairygui_GLabel_getTitleFontSize); + oluacls_func(L, "new", _olua_fun_fairygui_GLabel_new); + oluacls_func(L, "setTitle", _olua_fun_fairygui_GLabel_setTitle); + oluacls_func(L, "setTitleColor", _olua_fun_fairygui_GLabel_setTitleColor); + oluacls_func(L, "setTitleFontSize", _olua_fun_fairygui_GLabel_setTitleFontSize); + oluacls_prop(L, "textField", _olua_fun_fairygui_GLabel_getTextField, nullptr); + oluacls_prop(L, "title", _olua_fun_fairygui_GLabel_getTitle, _olua_fun_fairygui_GLabel_setTitle); + oluacls_prop(L, "titleColor", _olua_fun_fairygui_GLabel_getTitleColor, _olua_fun_fairygui_GLabel_setTitleColor); + oluacls_prop(L, "titleFontSize", _olua_fun_fairygui_GLabel_getTitleFontSize, _olua_fun_fairygui_GLabel_setTitleFontSize); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_fgui_GLabel(lua_State *L) +{ + olua_require(L, "fairygui", luaopen_fairygui); + if (!olua_getclass(L, "fgui.GLabel")) { + luaL_error(L, "class not found: fairygui::GLabel"); + } return 1; } OLUA_END_DECLS -static int _fairygui_GList_ListItemRenderer___call(lua_State *L) +static int _olua_fun_fairygui_GList_ListItemRenderer___call(lua_State *L) { olua_startinvoke(L); luaL_checktype(L, -1, LUA_TFUNCTION); - olua_push_callback(L, (fairygui::GList::ListItemRenderer *)nullptr, "fgui.GList::ListItemRenderer"); + olua_push_callback(L, (fairygui::GList::ListItemRenderer *)nullptr, "fgui.GList.ListItemRenderer"); olua_endinvoke(L); return 1; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_fairygui_GList_ListItemRenderer(lua_State *L) +static int _olua_cls_fgui_GList_ListItemRenderer(lua_State *L) { - oluacls_class(L, "fgui.GList::ListItemRenderer"); - oluacls_func(L, "__call", _fairygui_GList_ListItemRenderer___call); + oluacls_class(L, "fgui.GList.ListItemRenderer"); + oluacls_func(L, "__call", _olua_fun_fairygui_GList_ListItemRenderer___call); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_fgui_GList_ListItemRenderer(lua_State *L) +{ + olua_require(L, "fairygui", luaopen_fairygui); + if (!olua_getclass(L, "fgui.GList.ListItemRenderer")) { + luaL_error(L, "class not found: fairygui::GList::ListItemRenderer"); + } return 1; } OLUA_END_DECLS -static int _fairygui_GList_ListItemProvider___call(lua_State *L) +static int _olua_fun_fairygui_GList_ListItemProvider___call(lua_State *L) { olua_startinvoke(L); luaL_checktype(L, -1, LUA_TFUNCTION); - olua_push_callback(L, (fairygui::GList::ListItemProvider *)nullptr, "fgui.GList::ListItemProvider"); + olua_push_callback(L, (fairygui::GList::ListItemProvider *)nullptr, "fgui.GList.ListItemProvider"); olua_endinvoke(L); return 1; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_fairygui_GList_ListItemProvider(lua_State *L) +static int _olua_cls_fgui_GList_ListItemProvider(lua_State *L) { - oluacls_class(L, "fgui.GList::ListItemProvider"); - oluacls_func(L, "__call", _fairygui_GList_ListItemProvider___call); + oluacls_class(L, "fgui.GList.ListItemProvider"); + oluacls_func(L, "__call", _olua_fun_fairygui_GList_ListItemProvider___call); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_fgui_GList_ListItemProvider(lua_State *L) +{ + olua_require(L, "fairygui", luaopen_fairygui); + if (!olua_getclass(L, "fgui.GList.ListItemProvider")) { + luaL_error(L, "class not found: fairygui::GList::ListItemProvider"); + } return 1; } OLUA_END_DECLS -static int _fairygui_GList_addItemFromPool$1(lua_State *L) +static int _olua_fun_fairygui_GList_addItemFromPool$1(lua_State *L) { olua_startinvoke(L); @@ -16428,7 +18089,7 @@ static int _fairygui_GList_addItemFromPool$1(lua_State *L) return num_ret; } -static int _fairygui_GList_addItemFromPool$2(lua_State *L) +static int _olua_fun_fairygui_GList_addItemFromPool$2(lua_State *L) { olua_startinvoke(L); @@ -16450,19 +18111,19 @@ static int _fairygui_GList_addItemFromPool$2(lua_State *L) return num_ret; } -static int _fairygui_GList_addItemFromPool(lua_State *L) +static int _olua_fun_fairygui_GList_addItemFromPool(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 0) { // @addref(children |) fairygui::GObject *addItemFromPool() - return _fairygui_GList_addItemFromPool$1(L); + return _olua_fun_fairygui_GList_addItemFromPool$1(L); } if (num_args == 1) { // if ((olua_is_string(L, 2))) { // @addref(children |) fairygui::GObject *addItemFromPool(const std::string &url) - return _fairygui_GList_addItemFromPool$2(L); + return _olua_fun_fairygui_GList_addItemFromPool$2(L); // } } @@ -16471,7 +18132,7 @@ static int _fairygui_GList_addItemFromPool(lua_State *L) return 0; } -static int _fairygui_GList_addSelection(lua_State *L) +static int _olua_fun_fairygui_GList_addSelection(lua_State *L) { olua_startinvoke(L); @@ -16491,7 +18152,7 @@ static int _fairygui_GList_addSelection(lua_State *L) return 0; } -static int _fairygui_GList_childIndexToItemIndex(lua_State *L) +static int _olua_fun_fairygui_GList_childIndexToItemIndex(lua_State *L) { olua_startinvoke(L); @@ -16510,7 +18171,7 @@ static int _fairygui_GList_childIndexToItemIndex(lua_State *L) return num_ret; } -static int _fairygui_GList_clearSelection(lua_State *L) +static int _olua_fun_fairygui_GList_clearSelection(lua_State *L) { olua_startinvoke(L); @@ -16526,7 +18187,7 @@ static int _fairygui_GList_clearSelection(lua_State *L) return 0; } -static int _fairygui_GList_create(lua_State *L) +static int _olua_fun_fairygui_GList_create(lua_State *L) { olua_startinvoke(L); @@ -16539,7 +18200,7 @@ static int _fairygui_GList_create(lua_State *L) return num_ret; } -static int _fairygui_GList_getAlign(lua_State *L) +static int _olua_fun_fairygui_GList_foldInvisibleItems$1(lua_State *L) { olua_startinvoke(L); @@ -16547,39 +18208,95 @@ static int _fairygui_GList_getAlign(lua_State *L) olua_to_object(L, 1, &self, "fgui.GList"); - // cocos2d::TextHAlignment getAlign() - cocos2d::TextHAlignment ret = self->getAlign(); - int num_ret = olua_push_enum(L, ret); + // bool foldInvisibleItems + bool ret = self->foldInvisibleItems; + int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); return num_ret; } -static int _fairygui_GList_getAutoResizeItem(lua_State *L) +static int _olua_fun_fairygui_GList_foldInvisibleItems$2(lua_State *L) { olua_startinvoke(L); fairygui::GList *self = nullptr; + bool arg1 = false; /** foldInvisibleItems */ olua_to_object(L, 1, &self, "fgui.GList"); + olua_check_bool(L, 2, &arg1); - // bool getAutoResizeItem() - bool ret = self->getAutoResizeItem(); - int num_ret = olua_push_bool(L, ret); + // bool foldInvisibleItems + self->foldInvisibleItems = arg1; olua_endinvoke(L); - return num_ret; + return 0; } -static int _fairygui_GList_getColumnCount(lua_State *L) +static int _olua_fun_fairygui_GList_foldInvisibleItems(lua_State *L) { - olua_startinvoke(L); + int num_args = lua_gettop(L) - 1; - fairygui::GList *self = nullptr; + if (num_args == 0) { + // bool foldInvisibleItems + return _olua_fun_fairygui_GList_foldInvisibleItems$1(L); + } - olua_to_object(L, 1, &self, "fgui.GList"); + if (num_args == 1) { + // if ((olua_is_bool(L, 2))) { + // bool foldInvisibleItems + return _olua_fun_fairygui_GList_foldInvisibleItems$2(L); + // } + } + + luaL_error(L, "method 'fairygui::GList::foldInvisibleItems' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_fairygui_GList_getAlign(lua_State *L) +{ + olua_startinvoke(L); + + fairygui::GList *self = nullptr; + + olua_to_object(L, 1, &self, "fgui.GList"); + + // cocos2d::TextHAlignment getAlign() + cocos2d::TextHAlignment ret = self->getAlign(); + int num_ret = olua_push_enum(L, ret); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_fairygui_GList_getAutoResizeItem(lua_State *L) +{ + olua_startinvoke(L); + + fairygui::GList *self = nullptr; + + olua_to_object(L, 1, &self, "fgui.GList"); + + // bool getAutoResizeItem() + bool ret = self->getAutoResizeItem(); + int num_ret = olua_push_bool(L, ret); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_fairygui_GList_getColumnCount(lua_State *L) +{ + olua_startinvoke(L); + + fairygui::GList *self = nullptr; + + olua_to_object(L, 1, &self, "fgui.GList"); // int getColumnCount() int ret = self->getColumnCount(); @@ -16590,7 +18307,7 @@ static int _fairygui_GList_getColumnCount(lua_State *L) return num_ret; } -static int _fairygui_GList_getColumnGap(lua_State *L) +static int _olua_fun_fairygui_GList_getColumnGap(lua_State *L) { olua_startinvoke(L); @@ -16607,7 +18324,7 @@ static int _fairygui_GList_getColumnGap(lua_State *L) return num_ret; } -static int _fairygui_GList_getDefaultItem(lua_State *L) +static int _olua_fun_fairygui_GList_getDefaultItem(lua_State *L) { olua_startinvoke(L); @@ -16624,7 +18341,7 @@ static int _fairygui_GList_getDefaultItem(lua_State *L) return num_ret; } -static int _fairygui_GList_getFromPool$1(lua_State *L) +static int _olua_fun_fairygui_GList_getFromPool$1(lua_State *L) { olua_startinvoke(L); @@ -16641,7 +18358,7 @@ static int _fairygui_GList_getFromPool$1(lua_State *L) return num_ret; } -static int _fairygui_GList_getFromPool$2(lua_State *L) +static int _olua_fun_fairygui_GList_getFromPool$2(lua_State *L) { olua_startinvoke(L); @@ -16660,19 +18377,19 @@ static int _fairygui_GList_getFromPool$2(lua_State *L) return num_ret; } -static int _fairygui_GList_getFromPool(lua_State *L) +static int _olua_fun_fairygui_GList_getFromPool(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 0) { // fairygui::GObject *getFromPool() - return _fairygui_GList_getFromPool$1(L); + return _olua_fun_fairygui_GList_getFromPool$1(L); } if (num_args == 1) { // if ((olua_is_string(L, 2))) { // fairygui::GObject *getFromPool(const std::string &url) - return _fairygui_GList_getFromPool$2(L); + return _olua_fun_fairygui_GList_getFromPool$2(L); // } } @@ -16681,7 +18398,7 @@ static int _fairygui_GList_getFromPool(lua_State *L) return 0; } -static int _fairygui_GList_getLayout(lua_State *L) +static int _olua_fun_fairygui_GList_getLayout(lua_State *L) { olua_startinvoke(L); @@ -16698,7 +18415,7 @@ static int _fairygui_GList_getLayout(lua_State *L) return num_ret; } -static int _fairygui_GList_getLineCount(lua_State *L) +static int _olua_fun_fairygui_GList_getLineCount(lua_State *L) { olua_startinvoke(L); @@ -16715,7 +18432,7 @@ static int _fairygui_GList_getLineCount(lua_State *L) return num_ret; } -static int _fairygui_GList_getLineGap(lua_State *L) +static int _olua_fun_fairygui_GList_getLineGap(lua_State *L) { olua_startinvoke(L); @@ -16732,7 +18449,7 @@ static int _fairygui_GList_getLineGap(lua_State *L) return num_ret; } -static int _fairygui_GList_getNumItems(lua_State *L) +static int _olua_fun_fairygui_GList_getNumItems(lua_State *L) { olua_startinvoke(L); @@ -16749,7 +18466,7 @@ static int _fairygui_GList_getNumItems(lua_State *L) return num_ret; } -static int _fairygui_GList_getSelectedIndex(lua_State *L) +static int _olua_fun_fairygui_GList_getSelectedIndex(lua_State *L) { olua_startinvoke(L); @@ -16766,7 +18483,7 @@ static int _fairygui_GList_getSelectedIndex(lua_State *L) return num_ret; } -static int _fairygui_GList_getSelection(lua_State *L) +static int _olua_fun_fairygui_GList_getSelection(lua_State *L) { olua_startinvoke(L); @@ -16774,7 +18491,7 @@ static int _fairygui_GList_getSelection(lua_State *L) std::vector *arg1 = nullptr; /** result */ olua_to_object(L, 1, &self, "fgui.GList"); - olua_check_pointer(L, 2, &arg1, "cc.VectorInt"); + olua_check_valueptr(L, 2, &arg1, "cc.types.VectorInt"); // void getSelection(std::vector &result) self->getSelection(*arg1); @@ -16784,7 +18501,7 @@ static int _fairygui_GList_getSelection(lua_State *L) return 0; } -static int _fairygui_GList_getSelectionController(lua_State *L) +static int _olua_fun_fairygui_GList_getSelectionController(lua_State *L) { olua_startinvoke(L); @@ -16804,7 +18521,7 @@ static int _fairygui_GList_getSelectionController(lua_State *L) return num_ret; } -static int _fairygui_GList_getSelectionMode(lua_State *L) +static int _olua_fun_fairygui_GList_getSelectionMode(lua_State *L) { olua_startinvoke(L); @@ -16821,7 +18538,7 @@ static int _fairygui_GList_getSelectionMode(lua_State *L) return num_ret; } -static int _fairygui_GList_getVerticalAlign(lua_State *L) +static int _olua_fun_fairygui_GList_getVerticalAlign(lua_State *L) { olua_startinvoke(L); @@ -16838,7 +18555,7 @@ static int _fairygui_GList_getVerticalAlign(lua_State *L) return num_ret; } -static int _fairygui_GList_handleArrowKey(lua_State *L) +static int _olua_fun_fairygui_GList_handleArrowKey(lua_State *L) { olua_startinvoke(L); @@ -16856,7 +18573,7 @@ static int _fairygui_GList_handleArrowKey(lua_State *L) return 0; } -static int _fairygui_GList_isVirtual(lua_State *L) +static int _olua_fun_fairygui_GList_isVirtual(lua_State *L) { olua_startinvoke(L); @@ -16873,7 +18590,7 @@ static int _fairygui_GList_isVirtual(lua_State *L) return num_ret; } -static int _fairygui_GList_itemIndexToChildIndex(lua_State *L) +static int _olua_fun_fairygui_GList_itemIndexToChildIndex(lua_State *L) { olua_startinvoke(L); @@ -16892,11 +18609,196 @@ static int _fairygui_GList_itemIndexToChildIndex(lua_State *L) return num_ret; } -static int _fairygui_GList_new(lua_State *L) +static int _olua_fun_fairygui_GList_itemProvider$1(lua_State *L) +{ + olua_startinvoke(L); + + fairygui::GList *self = nullptr; + + olua_to_object(L, 1, &self, "fgui.GList"); + + void *cb_store = (void *)self; + std::string cb_tag = "itemProvider"; + olua_getcallback(L, cb_store, cb_tag.c_str(), OLUA_TAG_EQUAL); + + // fairygui::GList::ListItemProvider itemProvider + fairygui::GList::ListItemProvider ret = self->itemProvider; + int num_ret = olua_push_callback(L, &ret, "fgui.GList.ListItemProvider"); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_fairygui_GList_itemProvider$2(lua_State *L) +{ + olua_startinvoke(L); + + fairygui::GList *self = nullptr; + fairygui::GList::ListItemProvider arg1; /** itemProvider */ + + olua_to_object(L, 1, &self, "fgui.GList"); + if (!olua_isnoneornil(L, 2)) { + olua_check_callback(L, 2, &arg1, "fgui.GList.ListItemProvider"); + } + + void *cb_store = (void *)self; + std::string cb_tag = "itemProvider"; + std::string cb_name; + if (olua_isfunction(L, 2)) { + cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + olua_Context cb_ctx = olua_context(L); + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](int cb_arg1) { + lua_State *L = olua_mainthread(NULL); + olua_checkhostthread(); + std::string ret; /** ret */ + if (olua_contextequal(L, cb_ctx)) { + int top = lua_gettop(L); + olua_push_integer(L, cb_arg1); + + olua_callback(L, cb_store, cb_name.c_str(), 1); + + if (olua_is_string(L, -1)) { + olua_check_string(L, -1, &ret); + } + + lua_settop(L, top); + } + return ret; + }; + } else { + olua_removecallback(L, cb_store, cb_tag.c_str(), OLUA_TAG_EQUAL); + arg1 = nullptr; + } + + // fairygui::GList::ListItemProvider itemProvider + self->itemProvider = arg1; + + olua_endinvoke(L); + + return 0; +} + +static int _olua_fun_fairygui_GList_itemProvider(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // fairygui::GList::ListItemProvider itemProvider + return _olua_fun_fairygui_GList_itemProvider$1(L); + } + + if (num_args == 1) { + // if ((olua_is_callback(L, 2, "fgui.GList.ListItemProvider") || olua_isnil(L, 2))) { + // fairygui::GList::ListItemProvider itemProvider + return _olua_fun_fairygui_GList_itemProvider$2(L); + // } + } + + luaL_error(L, "method 'fairygui::GList::itemProvider' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_fairygui_GList_itemRenderer$1(lua_State *L) +{ + olua_startinvoke(L); + + fairygui::GList *self = nullptr; + + olua_to_object(L, 1, &self, "fgui.GList"); + + void *cb_store = (void *)self; + std::string cb_tag = "itemRenderer"; + olua_getcallback(L, cb_store, cb_tag.c_str(), OLUA_TAG_EQUAL); + + // fairygui::GList::ListItemRenderer itemRenderer + fairygui::GList::ListItemRenderer ret = self->itemRenderer; + int num_ret = olua_push_callback(L, &ret, "fgui.GList.ListItemRenderer"); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_fairygui_GList_itemRenderer$2(lua_State *L) +{ + olua_startinvoke(L); + + fairygui::GList *self = nullptr; + fairygui::GList::ListItemRenderer arg1; /** itemRenderer */ + + olua_to_object(L, 1, &self, "fgui.GList"); + if (!olua_isnoneornil(L, 2)) { + olua_check_callback(L, 2, &arg1, "fgui.GList.ListItemRenderer"); + } + + void *cb_store = (void *)self; + std::string cb_tag = "itemRenderer"; + std::string cb_name; + if (olua_isfunction(L, 2)) { + cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + olua_Context cb_ctx = olua_context(L); + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](int cb_arg1, fairygui::GObject *cb_arg2) { + lua_State *L = olua_mainthread(NULL); + olua_checkhostthread(); + + if (olua_contextequal(L, cb_ctx)) { + int top = lua_gettop(L); + size_t last = olua_push_objpool(L); + olua_enable_objpool(L); + olua_push_integer(L, cb_arg1); + olua_push_object(L, cb_arg2, "fgui.GObject"); + olua_disable_objpool(L); + + olua_callback(L, cb_store, cb_name.c_str(), 2); + + //pop stack value + olua_pop_objpool(L, last); + lua_settop(L, top); + } + }; + } else { + olua_removecallback(L, cb_store, cb_tag.c_str(), OLUA_TAG_EQUAL); + arg1 = nullptr; + } + + // fairygui::GList::ListItemRenderer itemRenderer + self->itemRenderer = arg1; + + olua_endinvoke(L); + + return 0; +} + +static int _olua_fun_fairygui_GList_itemRenderer(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // fairygui::GList::ListItemRenderer itemRenderer + return _olua_fun_fairygui_GList_itemRenderer$1(L); + } + + if (num_args == 1) { + // if ((olua_is_callback(L, 2, "fgui.GList.ListItemRenderer") || olua_isnil(L, 2))) { + // fairygui::GList::ListItemRenderer itemRenderer + return _olua_fun_fairygui_GList_itemRenderer$2(L); + // } + } + + luaL_error(L, "method 'fairygui::GList::itemRenderer' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_fairygui_GList_new(lua_State *L) { olua_startinvoke(L); - // GList() + // fairygui::GList() fairygui::GList *ret = new fairygui::GList(); int num_ret = olua_push_object(L, ret, "fgui.GList"); olua_postnew(L, ret); @@ -16906,7 +18808,7 @@ static int _fairygui_GList_new(lua_State *L) return num_ret; } -static int _fairygui_GList_refreshVirtualList(lua_State *L) +static int _olua_fun_fairygui_GList_refreshVirtualList(lua_State *L) { olua_startinvoke(L); @@ -16922,7 +18824,7 @@ static int _fairygui_GList_refreshVirtualList(lua_State *L) return 0; } -static int _fairygui_GList_removeChildToPool(lua_State *L) +static int _olua_fun_fairygui_GList_removeChildToPool(lua_State *L) { olua_startinvoke(L); @@ -16943,7 +18845,7 @@ static int _fairygui_GList_removeChildToPool(lua_State *L) return 0; } -static int _fairygui_GList_removeChildToPoolAt(lua_State *L) +static int _olua_fun_fairygui_GList_removeChildToPoolAt(lua_State *L) { olua_startinvoke(L); @@ -16967,7 +18869,7 @@ static int _fairygui_GList_removeChildToPoolAt(lua_State *L) return 0; } -static int _fairygui_GList_removeChildrenToPool$1(lua_State *L) +static int _olua_fun_fairygui_GList_removeChildrenToPool$1(lua_State *L) { olua_startinvoke(L); @@ -16989,7 +18891,7 @@ static int _fairygui_GList_removeChildrenToPool$1(lua_State *L) return 0; } -static int _fairygui_GList_removeChildrenToPool$2(lua_State *L) +static int _olua_fun_fairygui_GList_removeChildrenToPool$2(lua_State *L) { olua_startinvoke(L); @@ -17015,19 +18917,19 @@ static int _fairygui_GList_removeChildrenToPool$2(lua_State *L) return 0; } -static int _fairygui_GList_removeChildrenToPool(lua_State *L) +static int _olua_fun_fairygui_GList_removeChildrenToPool(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 0) { // @delref(children ~) void removeChildrenToPool() - return _fairygui_GList_removeChildrenToPool$1(L); + return _olua_fun_fairygui_GList_removeChildrenToPool$1(L); } if (num_args == 2) { // if ((olua_is_integer(L, 2)) && (olua_is_integer(L, 3))) { // @delref(children ~) void removeChildrenToPool(int beginIndex, int endIndex) - return _fairygui_GList_removeChildrenToPool$2(L); + return _olua_fun_fairygui_GList_removeChildrenToPool$2(L); // } } @@ -17036,7 +18938,7 @@ static int _fairygui_GList_removeChildrenToPool(lua_State *L) return 0; } -static int _fairygui_GList_removeSelection(lua_State *L) +static int _olua_fun_fairygui_GList_removeSelection(lua_State *L) { olua_startinvoke(L); @@ -17054,7 +18956,7 @@ static int _fairygui_GList_removeSelection(lua_State *L) return 0; } -static int _fairygui_GList_resizeToFit$1(lua_State *L) +static int _olua_fun_fairygui_GList_resizeToFit$1(lua_State *L) { olua_startinvoke(L); @@ -17072,7 +18974,7 @@ static int _fairygui_GList_resizeToFit$1(lua_State *L) return 0; } -static int _fairygui_GList_resizeToFit$2(lua_State *L) +static int _olua_fun_fairygui_GList_resizeToFit$2(lua_State *L) { olua_startinvoke(L); @@ -17092,21 +18994,21 @@ static int _fairygui_GList_resizeToFit$2(lua_State *L) return 0; } -static int _fairygui_GList_resizeToFit(lua_State *L) +static int _olua_fun_fairygui_GList_resizeToFit(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_integer(L, 2))) { // void resizeToFit(int itemCount) - return _fairygui_GList_resizeToFit$1(L); + return _olua_fun_fairygui_GList_resizeToFit$1(L); // } } if (num_args == 2) { // if ((olua_is_integer(L, 2)) && (olua_is_integer(L, 3))) { // void resizeToFit(int itemCount, int minSize) - return _fairygui_GList_resizeToFit$2(L); + return _olua_fun_fairygui_GList_resizeToFit$2(L); // } } @@ -17115,7 +19017,7 @@ static int _fairygui_GList_resizeToFit(lua_State *L) return 0; } -static int _fairygui_GList_returnToPool(lua_State *L) +static int _olua_fun_fairygui_GList_returnToPool(lua_State *L) { olua_startinvoke(L); @@ -17136,7 +19038,63 @@ static int _fairygui_GList_returnToPool(lua_State *L) return 0; } -static int _fairygui_GList_scrollToView$1(lua_State *L) +static int _olua_fun_fairygui_GList_scrollItemToViewOnClick$1(lua_State *L) +{ + olua_startinvoke(L); + + fairygui::GList *self = nullptr; + + olua_to_object(L, 1, &self, "fgui.GList"); + + // bool scrollItemToViewOnClick + bool ret = self->scrollItemToViewOnClick; + int num_ret = olua_push_bool(L, ret); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_fairygui_GList_scrollItemToViewOnClick$2(lua_State *L) +{ + olua_startinvoke(L); + + fairygui::GList *self = nullptr; + bool arg1 = false; /** scrollItemToViewOnClick */ + + olua_to_object(L, 1, &self, "fgui.GList"); + olua_check_bool(L, 2, &arg1); + + // bool scrollItemToViewOnClick + self->scrollItemToViewOnClick = arg1; + + olua_endinvoke(L); + + return 0; +} + +static int _olua_fun_fairygui_GList_scrollItemToViewOnClick(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // bool scrollItemToViewOnClick + return _olua_fun_fairygui_GList_scrollItemToViewOnClick$1(L); + } + + if (num_args == 1) { + // if ((olua_is_bool(L, 2))) { + // bool scrollItemToViewOnClick + return _olua_fun_fairygui_GList_scrollItemToViewOnClick$2(L); + // } + } + + luaL_error(L, "method 'fairygui::GList::scrollItemToViewOnClick' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_fairygui_GList_scrollToView$1(lua_State *L) { olua_startinvoke(L); @@ -17158,7 +19116,7 @@ static int _fairygui_GList_scrollToView$1(lua_State *L) return 0; } -static int _fairygui_GList_scrollToView$2(lua_State *L) +static int _olua_fun_fairygui_GList_scrollToView$2(lua_State *L) { olua_startinvoke(L); @@ -17168,7 +19126,7 @@ static int _fairygui_GList_scrollToView$2(lua_State *L) olua_to_object(L, 1, &self, "fgui.GList"); olua_check_integer(L, 2, &arg1); - // void scrollToView(int index, @optional bool ani, @optional bool setFirst) + // void scrollToView(int index) self->scrollToView(arg1); olua_endinvoke(L); @@ -17176,7 +19134,7 @@ static int _fairygui_GList_scrollToView$2(lua_State *L) return 0; } -static int _fairygui_GList_scrollToView$3(lua_State *L) +static int _olua_fun_fairygui_GList_scrollToView$3(lua_State *L) { olua_startinvoke(L); @@ -17188,7 +19146,7 @@ static int _fairygui_GList_scrollToView$3(lua_State *L) olua_check_integer(L, 2, &arg1); olua_check_bool(L, 3, &arg2); - // void scrollToView(int index, @optional bool ani, @optional bool setFirst) + // void scrollToView(int index, @optional bool ani) self->scrollToView(arg1, arg2); olua_endinvoke(L); @@ -17196,28 +19154,28 @@ static int _fairygui_GList_scrollToView$3(lua_State *L) return 0; } -static int _fairygui_GList_scrollToView(lua_State *L) +static int _olua_fun_fairygui_GList_scrollToView(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_integer(L, 2))) { - // void scrollToView(int index, @optional bool ani, @optional bool setFirst) - return _fairygui_GList_scrollToView$2(L); + // void scrollToView(int index) + return _olua_fun_fairygui_GList_scrollToView$2(L); // } } if (num_args == 2) { // if ((olua_is_integer(L, 2)) && (olua_is_bool(L, 3))) { - // void scrollToView(int index, @optional bool ani, @optional bool setFirst) - return _fairygui_GList_scrollToView$3(L); + // void scrollToView(int index, @optional bool ani) + return _olua_fun_fairygui_GList_scrollToView$3(L); // } } if (num_args == 3) { // if ((olua_is_integer(L, 2)) && (olua_is_bool(L, 3)) && (olua_is_bool(L, 4))) { // void scrollToView(int index, @optional bool ani, @optional bool setFirst) - return _fairygui_GList_scrollToView$1(L); + return _olua_fun_fairygui_GList_scrollToView$1(L); // } } @@ -17226,7 +19184,7 @@ static int _fairygui_GList_scrollToView(lua_State *L) return 0; } -static int _fairygui_GList_selectAll(lua_State *L) +static int _olua_fun_fairygui_GList_selectAll(lua_State *L) { olua_startinvoke(L); @@ -17242,7 +19200,7 @@ static int _fairygui_GList_selectAll(lua_State *L) return 0; } -static int _fairygui_GList_selectReverse(lua_State *L) +static int _olua_fun_fairygui_GList_selectReverse(lua_State *L) { olua_startinvoke(L); @@ -17258,7 +19216,7 @@ static int _fairygui_GList_selectReverse(lua_State *L) return 0; } -static int _fairygui_GList_setAlign(lua_State *L) +static int _olua_fun_fairygui_GList_setAlign(lua_State *L) { olua_startinvoke(L); @@ -17276,7 +19234,7 @@ static int _fairygui_GList_setAlign(lua_State *L) return 0; } -static int _fairygui_GList_setAutoResizeItem(lua_State *L) +static int _olua_fun_fairygui_GList_setAutoResizeItem(lua_State *L) { olua_startinvoke(L); @@ -17294,7 +19252,7 @@ static int _fairygui_GList_setAutoResizeItem(lua_State *L) return 0; } -static int _fairygui_GList_setColumnCount(lua_State *L) +static int _olua_fun_fairygui_GList_setColumnCount(lua_State *L) { olua_startinvoke(L); @@ -17312,7 +19270,7 @@ static int _fairygui_GList_setColumnCount(lua_State *L) return 0; } -static int _fairygui_GList_setColumnGap(lua_State *L) +static int _olua_fun_fairygui_GList_setColumnGap(lua_State *L) { olua_startinvoke(L); @@ -17330,7 +19288,7 @@ static int _fairygui_GList_setColumnGap(lua_State *L) return 0; } -static int _fairygui_GList_setDefaultItem(lua_State *L) +static int _olua_fun_fairygui_GList_setDefaultItem(lua_State *L) { olua_startinvoke(L); @@ -17348,7 +19306,7 @@ static int _fairygui_GList_setDefaultItem(lua_State *L) return 0; } -static int _fairygui_GList_setLayout(lua_State *L) +static int _olua_fun_fairygui_GList_setLayout(lua_State *L) { olua_startinvoke(L); @@ -17366,7 +19324,7 @@ static int _fairygui_GList_setLayout(lua_State *L) return 0; } -static int _fairygui_GList_setLineCount(lua_State *L) +static int _olua_fun_fairygui_GList_setLineCount(lua_State *L) { olua_startinvoke(L); @@ -17384,7 +19342,7 @@ static int _fairygui_GList_setLineCount(lua_State *L) return 0; } -static int _fairygui_GList_setLineGap(lua_State *L) +static int _olua_fun_fairygui_GList_setLineGap(lua_State *L) { olua_startinvoke(L); @@ -17402,7 +19360,7 @@ static int _fairygui_GList_setLineGap(lua_State *L) return 0; } -static int _fairygui_GList_setNumItems(lua_State *L) +static int _olua_fun_fairygui_GList_setNumItems(lua_State *L) { olua_startinvoke(L); @@ -17426,7 +19384,7 @@ static int _fairygui_GList_setNumItems(lua_State *L) return 0; } -static int _fairygui_GList_setSelectedIndex(lua_State *L) +static int _olua_fun_fairygui_GList_setSelectedIndex(lua_State *L) { olua_startinvoke(L); @@ -17444,7 +19402,7 @@ static int _fairygui_GList_setSelectedIndex(lua_State *L) return 0; } -static int _fairygui_GList_setSelectionController(lua_State *L) +static int _olua_fun_fairygui_GList_setSelectionController(lua_State *L) { olua_startinvoke(L); @@ -17465,7 +19423,7 @@ static int _fairygui_GList_setSelectionController(lua_State *L) return 0; } -static int _fairygui_GList_setSelectionMode(lua_State *L) +static int _olua_fun_fairygui_GList_setSelectionMode(lua_State *L) { olua_startinvoke(L); @@ -17483,7 +19441,7 @@ static int _fairygui_GList_setSelectionMode(lua_State *L) return 0; } -static int _fairygui_GList_setVerticalAlign(lua_State *L) +static int _olua_fun_fairygui_GList_setVerticalAlign(lua_State *L) { olua_startinvoke(L); @@ -17501,7 +19459,7 @@ static int _fairygui_GList_setVerticalAlign(lua_State *L) return 0; } -static int _fairygui_GList_setVirtual(lua_State *L) +static int _olua_fun_fairygui_GList_setVirtual(lua_State *L) { olua_startinvoke(L); @@ -17523,7 +19481,7 @@ static int _fairygui_GList_setVirtual(lua_State *L) return 0; } -static int _fairygui_GList_setVirtualAndLoop(lua_State *L) +static int _olua_fun_fairygui_GList_setVirtualAndLoop(lua_State *L) { olua_startinvoke(L); @@ -17545,294 +19503,92 @@ static int _fairygui_GList_setVirtualAndLoop(lua_State *L) return 0; } -static int _fairygui_GList_get_foldInvisibleItems(lua_State *L) +static int _olua_cls_fgui_GList(lua_State *L) { - olua_startinvoke(L); - - fairygui::GList *self = nullptr; - - olua_to_object(L, 1, &self, "fgui.GList"); - - // bool foldInvisibleItems - bool ret = self->foldInvisibleItems; - int num_ret = olua_push_bool(L, ret); - - olua_endinvoke(L); + oluacls_class(L, "fgui.GList"); + oluacls_func(L, "addItemFromPool", _olua_fun_fairygui_GList_addItemFromPool); + oluacls_func(L, "addSelection", _olua_fun_fairygui_GList_addSelection); + oluacls_func(L, "childIndexToItemIndex", _olua_fun_fairygui_GList_childIndexToItemIndex); + oluacls_func(L, "clearSelection", _olua_fun_fairygui_GList_clearSelection); + oluacls_func(L, "create", _olua_fun_fairygui_GList_create); + oluacls_func(L, "getAlign", _olua_fun_fairygui_GList_getAlign); + oluacls_func(L, "getAutoResizeItem", _olua_fun_fairygui_GList_getAutoResizeItem); + oluacls_func(L, "getColumnCount", _olua_fun_fairygui_GList_getColumnCount); + oluacls_func(L, "getColumnGap", _olua_fun_fairygui_GList_getColumnGap); + oluacls_func(L, "getDefaultItem", _olua_fun_fairygui_GList_getDefaultItem); + oluacls_func(L, "getFromPool", _olua_fun_fairygui_GList_getFromPool); + oluacls_func(L, "getLayout", _olua_fun_fairygui_GList_getLayout); + oluacls_func(L, "getLineCount", _olua_fun_fairygui_GList_getLineCount); + oluacls_func(L, "getLineGap", _olua_fun_fairygui_GList_getLineGap); + oluacls_func(L, "getNumItems", _olua_fun_fairygui_GList_getNumItems); + oluacls_func(L, "getSelectedIndex", _olua_fun_fairygui_GList_getSelectedIndex); + oluacls_func(L, "getSelection", _olua_fun_fairygui_GList_getSelection); + oluacls_func(L, "getSelectionController", _olua_fun_fairygui_GList_getSelectionController); + oluacls_func(L, "getSelectionMode", _olua_fun_fairygui_GList_getSelectionMode); + oluacls_func(L, "getVerticalAlign", _olua_fun_fairygui_GList_getVerticalAlign); + oluacls_func(L, "handleArrowKey", _olua_fun_fairygui_GList_handleArrowKey); + oluacls_func(L, "isVirtual", _olua_fun_fairygui_GList_isVirtual); + oluacls_func(L, "itemIndexToChildIndex", _olua_fun_fairygui_GList_itemIndexToChildIndex); + oluacls_func(L, "new", _olua_fun_fairygui_GList_new); + oluacls_func(L, "refreshVirtualList", _olua_fun_fairygui_GList_refreshVirtualList); + oluacls_func(L, "removeChildToPool", _olua_fun_fairygui_GList_removeChildToPool); + oluacls_func(L, "removeChildToPoolAt", _olua_fun_fairygui_GList_removeChildToPoolAt); + oluacls_func(L, "removeChildrenToPool", _olua_fun_fairygui_GList_removeChildrenToPool); + oluacls_func(L, "removeSelection", _olua_fun_fairygui_GList_removeSelection); + oluacls_func(L, "resizeToFit", _olua_fun_fairygui_GList_resizeToFit); + oluacls_func(L, "returnToPool", _olua_fun_fairygui_GList_returnToPool); + oluacls_func(L, "scrollToView", _olua_fun_fairygui_GList_scrollToView); + oluacls_func(L, "selectAll", _olua_fun_fairygui_GList_selectAll); + oluacls_func(L, "selectReverse", _olua_fun_fairygui_GList_selectReverse); + oluacls_func(L, "setAlign", _olua_fun_fairygui_GList_setAlign); + oluacls_func(L, "setAutoResizeItem", _olua_fun_fairygui_GList_setAutoResizeItem); + oluacls_func(L, "setColumnCount", _olua_fun_fairygui_GList_setColumnCount); + oluacls_func(L, "setColumnGap", _olua_fun_fairygui_GList_setColumnGap); + oluacls_func(L, "setDefaultItem", _olua_fun_fairygui_GList_setDefaultItem); + oluacls_func(L, "setLayout", _olua_fun_fairygui_GList_setLayout); + oluacls_func(L, "setLineCount", _olua_fun_fairygui_GList_setLineCount); + oluacls_func(L, "setLineGap", _olua_fun_fairygui_GList_setLineGap); + oluacls_func(L, "setNumItems", _olua_fun_fairygui_GList_setNumItems); + oluacls_func(L, "setSelectedIndex", _olua_fun_fairygui_GList_setSelectedIndex); + oluacls_func(L, "setSelectionController", _olua_fun_fairygui_GList_setSelectionController); + oluacls_func(L, "setSelectionMode", _olua_fun_fairygui_GList_setSelectionMode); + oluacls_func(L, "setVerticalAlign", _olua_fun_fairygui_GList_setVerticalAlign); + oluacls_func(L, "setVirtual", _olua_fun_fairygui_GList_setVirtual); + oluacls_func(L, "setVirtualAndLoop", _olua_fun_fairygui_GList_setVirtualAndLoop); + oluacls_prop(L, "align", _olua_fun_fairygui_GList_getAlign, _olua_fun_fairygui_GList_setAlign); + oluacls_prop(L, "autoResizeItem", _olua_fun_fairygui_GList_getAutoResizeItem, _olua_fun_fairygui_GList_setAutoResizeItem); + oluacls_prop(L, "columnCount", _olua_fun_fairygui_GList_getColumnCount, _olua_fun_fairygui_GList_setColumnCount); + oluacls_prop(L, "columnGap", _olua_fun_fairygui_GList_getColumnGap, _olua_fun_fairygui_GList_setColumnGap); + oluacls_prop(L, "defaultItem", _olua_fun_fairygui_GList_getDefaultItem, _olua_fun_fairygui_GList_setDefaultItem); + oluacls_prop(L, "layout", _olua_fun_fairygui_GList_getLayout, _olua_fun_fairygui_GList_setLayout); + oluacls_prop(L, "lineCount", _olua_fun_fairygui_GList_getLineCount, _olua_fun_fairygui_GList_setLineCount); + oluacls_prop(L, "lineGap", _olua_fun_fairygui_GList_getLineGap, _olua_fun_fairygui_GList_setLineGap); + oluacls_prop(L, "numItems", _olua_fun_fairygui_GList_getNumItems, _olua_fun_fairygui_GList_setNumItems); + oluacls_prop(L, "selectedIndex", _olua_fun_fairygui_GList_getSelectedIndex, _olua_fun_fairygui_GList_setSelectedIndex); + oluacls_prop(L, "selectionController", _olua_fun_fairygui_GList_getSelectionController, _olua_fun_fairygui_GList_setSelectionController); + oluacls_prop(L, "selectionMode", _olua_fun_fairygui_GList_getSelectionMode, _olua_fun_fairygui_GList_setSelectionMode); + oluacls_prop(L, "verticalAlign", _olua_fun_fairygui_GList_getVerticalAlign, _olua_fun_fairygui_GList_setVerticalAlign); + oluacls_prop(L, "virtual", _olua_fun_fairygui_GList_isVirtual, _olua_fun_fairygui_GList_setVirtual); + oluacls_prop(L, "foldInvisibleItems", _olua_fun_fairygui_GList_foldInvisibleItems, _olua_fun_fairygui_GList_foldInvisibleItems); + oluacls_prop(L, "itemProvider", _olua_fun_fairygui_GList_itemProvider, _olua_fun_fairygui_GList_itemProvider); + oluacls_prop(L, "itemRenderer", _olua_fun_fairygui_GList_itemRenderer, _olua_fun_fairygui_GList_itemRenderer); + oluacls_prop(L, "scrollItemToViewOnClick", _olua_fun_fairygui_GList_scrollItemToViewOnClick, _olua_fun_fairygui_GList_scrollItemToViewOnClick); - return num_ret; + return 1; } -static int _fairygui_GList_set_foldInvisibleItems(lua_State *L) +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_fgui_GList(lua_State *L) { - olua_startinvoke(L); - - fairygui::GList *self = nullptr; - bool arg1 = false; /** foldInvisibleItems */ - - olua_to_object(L, 1, &self, "fgui.GList"); - olua_check_bool(L, 2, &arg1); - - // bool foldInvisibleItems - self->foldInvisibleItems = arg1; - - olua_endinvoke(L); - - return 0; -} - -static int _fairygui_GList_get_itemProvider(lua_State *L) -{ - olua_startinvoke(L); - - fairygui::GList *self = nullptr; - - olua_to_object(L, 1, &self, "fgui.GList"); - - void *cb_store = (void *)self; - std::string cb_tag = "itemProvider"; - olua_getcallback(L, cb_store, cb_tag.c_str(), OLUA_TAG_EQUAL); - - // @nullable @localvar fairygui::GList::ListItemProvider itemProvider - fairygui::GList::ListItemProvider ret = self->itemProvider; - int num_ret = olua_push_callback(L, &ret, "fgui.GList::ListItemProvider"); - - olua_endinvoke(L); - - return num_ret; -} - -static int _fairygui_GList_set_itemProvider(lua_State *L) -{ - olua_startinvoke(L); - - fairygui::GList *self = nullptr; - fairygui::GList::ListItemProvider arg1; /** itemProvider */ - - olua_to_object(L, 1, &self, "fgui.GList"); - if (!olua_isnoneornil(L, 2)) { - olua_check_callback(L, 2, &arg1, "fgui.GList::ListItemProvider"); - } - - void *cb_store = (void *)self; - std::string cb_tag = "itemProvider"; - std::string cb_name; - if (olua_isfunction(L, 2)) { - cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); - olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](int arg1) { - lua_State *L = olua_mainthread(NULL); - olua_checkhostthread(); - std::string ret; /** ret */ - if (olua_contextequal(L, cb_ctx)) { - int top = lua_gettop(L); - olua_push_integer(L, arg1); - - olua_callback(L, cb_store, cb_name.c_str(), 1); - - if (olua_is_string(L, -1)) { - olua_check_string(L, -1, &ret); - } - - lua_settop(L, top); - } - return ret; - }; - } else { - olua_removecallback(L, cb_store, cb_tag.c_str(), OLUA_TAG_EQUAL); - arg1 = nullptr; - } - - // @nullable @localvar fairygui::GList::ListItemProvider itemProvider - self->itemProvider = arg1; - - olua_endinvoke(L); - - return 0; -} - -static int _fairygui_GList_get_itemRenderer(lua_State *L) -{ - olua_startinvoke(L); - - fairygui::GList *self = nullptr; - - olua_to_object(L, 1, &self, "fgui.GList"); - - void *cb_store = (void *)self; - std::string cb_tag = "itemRenderer"; - olua_getcallback(L, cb_store, cb_tag.c_str(), OLUA_TAG_EQUAL); - - // @nullable fairygui::GList::ListItemRenderer itemRenderer - fairygui::GList::ListItemRenderer ret = self->itemRenderer; - int num_ret = olua_push_callback(L, &ret, "fgui.GList::ListItemRenderer"); - - olua_endinvoke(L); - - return num_ret; -} - -static int _fairygui_GList_set_itemRenderer(lua_State *L) -{ - olua_startinvoke(L); - - fairygui::GList *self = nullptr; - fairygui::GList::ListItemRenderer arg1; /** itemRenderer */ - - olua_to_object(L, 1, &self, "fgui.GList"); - if (!olua_isnoneornil(L, 2)) { - olua_check_callback(L, 2, &arg1, "fgui.GList::ListItemRenderer"); - } - - void *cb_store = (void *)self; - std::string cb_tag = "itemRenderer"; - std::string cb_name; - if (olua_isfunction(L, 2)) { - cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); - olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](int arg1, fairygui::GObject *arg2) { - lua_State *L = olua_mainthread(NULL); - olua_checkhostthread(); - - if (olua_contextequal(L, cb_ctx)) { - int top = lua_gettop(L); - olua_push_integer(L, arg1); - olua_push_object(L, arg2, "fgui.GObject"); - - // insert code before call - olua_pushobj(L, (fairygui::GComponent *)cb_store); - olua_addref(L, -1, "children", top + 2, OLUA_REF_MULTI); - lua_pop(L, 1); - - olua_callback(L, cb_store, cb_name.c_str(), 2); - - lua_settop(L, top); - } - }; - } else { - olua_removecallback(L, cb_store, cb_tag.c_str(), OLUA_TAG_EQUAL); - arg1 = nullptr; + olua_require(L, "fairygui", luaopen_fairygui); + if (!olua_getclass(L, "fgui.GList")) { + luaL_error(L, "class not found: fairygui::GList"); } - - // @nullable fairygui::GList::ListItemRenderer itemRenderer - self->itemRenderer = arg1; - - olua_endinvoke(L); - - return 0; -} - -static int _fairygui_GList_get_scrollItemToViewOnClick(lua_State *L) -{ - olua_startinvoke(L); - - fairygui::GList *self = nullptr; - - olua_to_object(L, 1, &self, "fgui.GList"); - - // bool scrollItemToViewOnClick - bool ret = self->scrollItemToViewOnClick; - int num_ret = olua_push_bool(L, ret); - - olua_endinvoke(L); - - return num_ret; -} - -static int _fairygui_GList_set_scrollItemToViewOnClick(lua_State *L) -{ - olua_startinvoke(L); - - fairygui::GList *self = nullptr; - bool arg1 = false; /** scrollItemToViewOnClick */ - - olua_to_object(L, 1, &self, "fgui.GList"); - olua_check_bool(L, 2, &arg1); - - // bool scrollItemToViewOnClick - self->scrollItemToViewOnClick = arg1; - - olua_endinvoke(L); - - return 0; -} - -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_fairygui_GList(lua_State *L) -{ - oluacls_class(L, "fgui.GList"); - oluacls_func(L, "addItemFromPool", _fairygui_GList_addItemFromPool); - oluacls_func(L, "addSelection", _fairygui_GList_addSelection); - oluacls_func(L, "childIndexToItemIndex", _fairygui_GList_childIndexToItemIndex); - oluacls_func(L, "clearSelection", _fairygui_GList_clearSelection); - oluacls_func(L, "create", _fairygui_GList_create); - oluacls_func(L, "getAlign", _fairygui_GList_getAlign); - oluacls_func(L, "getAutoResizeItem", _fairygui_GList_getAutoResizeItem); - oluacls_func(L, "getColumnCount", _fairygui_GList_getColumnCount); - oluacls_func(L, "getColumnGap", _fairygui_GList_getColumnGap); - oluacls_func(L, "getDefaultItem", _fairygui_GList_getDefaultItem); - oluacls_func(L, "getFromPool", _fairygui_GList_getFromPool); - oluacls_func(L, "getLayout", _fairygui_GList_getLayout); - oluacls_func(L, "getLineCount", _fairygui_GList_getLineCount); - oluacls_func(L, "getLineGap", _fairygui_GList_getLineGap); - oluacls_func(L, "getNumItems", _fairygui_GList_getNumItems); - oluacls_func(L, "getSelectedIndex", _fairygui_GList_getSelectedIndex); - oluacls_func(L, "getSelection", _fairygui_GList_getSelection); - oluacls_func(L, "getSelectionController", _fairygui_GList_getSelectionController); - oluacls_func(L, "getSelectionMode", _fairygui_GList_getSelectionMode); - oluacls_func(L, "getVerticalAlign", _fairygui_GList_getVerticalAlign); - oluacls_func(L, "handleArrowKey", _fairygui_GList_handleArrowKey); - oluacls_func(L, "isVirtual", _fairygui_GList_isVirtual); - oluacls_func(L, "itemIndexToChildIndex", _fairygui_GList_itemIndexToChildIndex); - oluacls_func(L, "new", _fairygui_GList_new); - oluacls_func(L, "refreshVirtualList", _fairygui_GList_refreshVirtualList); - oluacls_func(L, "removeChildToPool", _fairygui_GList_removeChildToPool); - oluacls_func(L, "removeChildToPoolAt", _fairygui_GList_removeChildToPoolAt); - oluacls_func(L, "removeChildrenToPool", _fairygui_GList_removeChildrenToPool); - oluacls_func(L, "removeSelection", _fairygui_GList_removeSelection); - oluacls_func(L, "resizeToFit", _fairygui_GList_resizeToFit); - oluacls_func(L, "returnToPool", _fairygui_GList_returnToPool); - oluacls_func(L, "scrollToView", _fairygui_GList_scrollToView); - oluacls_func(L, "selectAll", _fairygui_GList_selectAll); - oluacls_func(L, "selectReverse", _fairygui_GList_selectReverse); - oluacls_func(L, "setAlign", _fairygui_GList_setAlign); - oluacls_func(L, "setAutoResizeItem", _fairygui_GList_setAutoResizeItem); - oluacls_func(L, "setColumnCount", _fairygui_GList_setColumnCount); - oluacls_func(L, "setColumnGap", _fairygui_GList_setColumnGap); - oluacls_func(L, "setDefaultItem", _fairygui_GList_setDefaultItem); - oluacls_func(L, "setLayout", _fairygui_GList_setLayout); - oluacls_func(L, "setLineCount", _fairygui_GList_setLineCount); - oluacls_func(L, "setLineGap", _fairygui_GList_setLineGap); - oluacls_func(L, "setNumItems", _fairygui_GList_setNumItems); - oluacls_func(L, "setSelectedIndex", _fairygui_GList_setSelectedIndex); - oluacls_func(L, "setSelectionController", _fairygui_GList_setSelectionController); - oluacls_func(L, "setSelectionMode", _fairygui_GList_setSelectionMode); - oluacls_func(L, "setVerticalAlign", _fairygui_GList_setVerticalAlign); - oluacls_func(L, "setVirtual", _fairygui_GList_setVirtual); - oluacls_func(L, "setVirtualAndLoop", _fairygui_GList_setVirtualAndLoop); - oluacls_prop(L, "align", _fairygui_GList_getAlign, _fairygui_GList_setAlign); - oluacls_prop(L, "autoResizeItem", _fairygui_GList_getAutoResizeItem, _fairygui_GList_setAutoResizeItem); - oluacls_prop(L, "columnCount", _fairygui_GList_getColumnCount, _fairygui_GList_setColumnCount); - oluacls_prop(L, "columnGap", _fairygui_GList_getColumnGap, _fairygui_GList_setColumnGap); - oluacls_prop(L, "defaultItem", _fairygui_GList_getDefaultItem, _fairygui_GList_setDefaultItem); - oluacls_prop(L, "layout", _fairygui_GList_getLayout, _fairygui_GList_setLayout); - oluacls_prop(L, "lineCount", _fairygui_GList_getLineCount, _fairygui_GList_setLineCount); - oluacls_prop(L, "lineGap", _fairygui_GList_getLineGap, _fairygui_GList_setLineGap); - oluacls_prop(L, "numItems", _fairygui_GList_getNumItems, _fairygui_GList_setNumItems); - oluacls_prop(L, "selectedIndex", _fairygui_GList_getSelectedIndex, _fairygui_GList_setSelectedIndex); - oluacls_prop(L, "selectionController", _fairygui_GList_getSelectionController, _fairygui_GList_setSelectionController); - oluacls_prop(L, "selectionMode", _fairygui_GList_getSelectionMode, _fairygui_GList_setSelectionMode); - oluacls_prop(L, "verticalAlign", _fairygui_GList_getVerticalAlign, _fairygui_GList_setVerticalAlign); - oluacls_prop(L, "virtual", _fairygui_GList_isVirtual, _fairygui_GList_setVirtual); - oluacls_prop(L, "foldInvisibleItems", _fairygui_GList_get_foldInvisibleItems, _fairygui_GList_set_foldInvisibleItems); - oluacls_prop(L, "itemProvider", _fairygui_GList_get_itemProvider, _fairygui_GList_set_itemProvider); - oluacls_prop(L, "itemRenderer", _fairygui_GList_get_itemRenderer, _fairygui_GList_set_itemRenderer); - oluacls_prop(L, "scrollItemToViewOnClick", _fairygui_GList_get_scrollItemToViewOnClick, _fairygui_GList_set_scrollItemToViewOnClick); - return 1; } OLUA_END_DECLS -static int _fairygui_GMovieClip_advance(lua_State *L) +static int _olua_fun_fairygui_GMovieClip_advance(lua_State *L) { olua_startinvoke(L); @@ -17850,7 +19606,7 @@ static int _fairygui_GMovieClip_advance(lua_State *L) return 0; } -static int _fairygui_GMovieClip_create(lua_State *L) +static int _olua_fun_fairygui_GMovieClip_create(lua_State *L) { olua_startinvoke(L); @@ -17863,7 +19619,7 @@ static int _fairygui_GMovieClip_create(lua_State *L) return num_ret; } -static int _fairygui_GMovieClip_getColor(lua_State *L) +static int _olua_fun_fairygui_GMovieClip_getColor(lua_State *L) { olua_startinvoke(L); @@ -17880,7 +19636,7 @@ static int _fairygui_GMovieClip_getColor(lua_State *L) return num_ret; } -static int _fairygui_GMovieClip_getFlip(lua_State *L) +static int _olua_fun_fairygui_GMovieClip_getFlip(lua_State *L) { olua_startinvoke(L); @@ -17897,7 +19653,7 @@ static int _fairygui_GMovieClip_getFlip(lua_State *L) return num_ret; } -static int _fairygui_GMovieClip_getFrame(lua_State *L) +static int _olua_fun_fairygui_GMovieClip_getFrame(lua_State *L) { olua_startinvoke(L); @@ -17914,7 +19670,7 @@ static int _fairygui_GMovieClip_getFrame(lua_State *L) return num_ret; } -static int _fairygui_GMovieClip_getTimeScale(lua_State *L) +static int _olua_fun_fairygui_GMovieClip_getTimeScale(lua_State *L) { olua_startinvoke(L); @@ -17931,7 +19687,7 @@ static int _fairygui_GMovieClip_getTimeScale(lua_State *L) return num_ret; } -static int _fairygui_GMovieClip_isPlaying(lua_State *L) +static int _olua_fun_fairygui_GMovieClip_isPlaying(lua_State *L) { olua_startinvoke(L); @@ -17948,11 +19704,11 @@ static int _fairygui_GMovieClip_isPlaying(lua_State *L) return num_ret; } -static int _fairygui_GMovieClip_new(lua_State *L) +static int _olua_fun_fairygui_GMovieClip_new(lua_State *L) { olua_startinvoke(L); - // GMovieClip() + // fairygui::GMovieClip() fairygui::GMovieClip *ret = new fairygui::GMovieClip(); int num_ret = olua_push_object(L, ret, "fgui.GMovieClip"); olua_postnew(L, ret); @@ -17962,7 +19718,7 @@ static int _fairygui_GMovieClip_new(lua_State *L) return num_ret; } -static int _fairygui_GMovieClip_setColor(lua_State *L) +static int _olua_fun_fairygui_GMovieClip_setColor(lua_State *L) { olua_startinvoke(L); @@ -17980,7 +19736,7 @@ static int _fairygui_GMovieClip_setColor(lua_State *L) return 0; } -static int _fairygui_GMovieClip_setFlip(lua_State *L) +static int _olua_fun_fairygui_GMovieClip_setFlip(lua_State *L) { olua_startinvoke(L); @@ -17998,7 +19754,7 @@ static int _fairygui_GMovieClip_setFlip(lua_State *L) return 0; } -static int _fairygui_GMovieClip_setFrame(lua_State *L) +static int _olua_fun_fairygui_GMovieClip_setFrame(lua_State *L) { olua_startinvoke(L); @@ -18016,13 +19772,13 @@ static int _fairygui_GMovieClip_setFrame(lua_State *L) return 0; } -static int _fairygui_GMovieClip_setPlaySettings$1(lua_State *L) +static int _olua_fun_fairygui_GMovieClip_setPlaySettings$1(lua_State *L) { olua_startinvoke(L); fairygui::GMovieClip *self = nullptr; int arg1 = 0; /** start */ - int arg2 = 0; /** end */ + int arg2 = 0; /** end_ */ int arg3 = 0; /** times */ int arg4 = 0; /** endAt */ std::function arg5; /** completeCallback */ @@ -18038,9 +19794,10 @@ static int _fairygui_GMovieClip_setPlaySettings$1(lua_State *L) std::string cb_tag = "PlaySettings"; std::string cb_name; if (olua_isfunction(L, 6)) { - cb_name = olua_setcallback(L, cb_store, 6, cb_tag.c_str(), OLUA_TAG_REPLACE); + cb_name = olua_setcallback(L, cb_store, 6, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg5 = [cb_store, cb_name, cb_ctx]() { + // lua_State *ML = olua_mainthread(L); + arg5 = [cb_store, cb_name, cb_ctx /*, ML */]() { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); @@ -18057,7 +19814,7 @@ static int _fairygui_GMovieClip_setPlaySettings$1(lua_State *L) arg5 = nullptr; } - // void setPlaySettings(@optional int start, @optional int end, @optional int times, @optional int endAt, @localvar @optional std::function completeCallback) + // void setPlaySettings(@optional int start, @optional int end_, @optional int times, @optional int endAt, @optional std::function completeCallback) self->setPlaySettings(arg1, arg2, arg3, arg4, arg5); olua_endinvoke(L); @@ -18065,7 +19822,7 @@ static int _fairygui_GMovieClip_setPlaySettings$1(lua_State *L) return 0; } -static int _fairygui_GMovieClip_setPlaySettings$2(lua_State *L) +static int _olua_fun_fairygui_GMovieClip_setPlaySettings$2(lua_State *L) { olua_startinvoke(L); @@ -18073,7 +19830,7 @@ static int _fairygui_GMovieClip_setPlaySettings$2(lua_State *L) olua_to_object(L, 1, &self, "fgui.GMovieClip"); - // void setPlaySettings(@optional int start, @optional int end, @optional int times, @optional int endAt, @localvar @optional std::function completeCallback) + // void setPlaySettings() self->setPlaySettings(); olua_endinvoke(L); @@ -18081,7 +19838,7 @@ static int _fairygui_GMovieClip_setPlaySettings$2(lua_State *L) return 0; } -static int _fairygui_GMovieClip_setPlaySettings$3(lua_State *L) +static int _olua_fun_fairygui_GMovieClip_setPlaySettings$3(lua_State *L) { olua_startinvoke(L); @@ -18091,7 +19848,7 @@ static int _fairygui_GMovieClip_setPlaySettings$3(lua_State *L) olua_to_object(L, 1, &self, "fgui.GMovieClip"); olua_check_integer(L, 2, &arg1); - // void setPlaySettings(@optional int start, @optional int end, @optional int times, @optional int endAt, @localvar @optional std::function completeCallback) + // void setPlaySettings(@optional int start) self->setPlaySettings(arg1); olua_endinvoke(L); @@ -18099,19 +19856,19 @@ static int _fairygui_GMovieClip_setPlaySettings$3(lua_State *L) return 0; } -static int _fairygui_GMovieClip_setPlaySettings$4(lua_State *L) +static int _olua_fun_fairygui_GMovieClip_setPlaySettings$4(lua_State *L) { olua_startinvoke(L); fairygui::GMovieClip *self = nullptr; int arg1 = 0; /** start */ - int arg2 = 0; /** end */ + int arg2 = 0; /** end_ */ olua_to_object(L, 1, &self, "fgui.GMovieClip"); olua_check_integer(L, 2, &arg1); olua_check_integer(L, 3, &arg2); - // void setPlaySettings(@optional int start, @optional int end, @optional int times, @optional int endAt, @localvar @optional std::function completeCallback) + // void setPlaySettings(@optional int start, @optional int end_) self->setPlaySettings(arg1, arg2); olua_endinvoke(L); @@ -18119,13 +19876,13 @@ static int _fairygui_GMovieClip_setPlaySettings$4(lua_State *L) return 0; } -static int _fairygui_GMovieClip_setPlaySettings$5(lua_State *L) +static int _olua_fun_fairygui_GMovieClip_setPlaySettings$5(lua_State *L) { olua_startinvoke(L); fairygui::GMovieClip *self = nullptr; int arg1 = 0; /** start */ - int arg2 = 0; /** end */ + int arg2 = 0; /** end_ */ int arg3 = 0; /** times */ olua_to_object(L, 1, &self, "fgui.GMovieClip"); @@ -18133,7 +19890,7 @@ static int _fairygui_GMovieClip_setPlaySettings$5(lua_State *L) olua_check_integer(L, 3, &arg2); olua_check_integer(L, 4, &arg3); - // void setPlaySettings(@optional int start, @optional int end, @optional int times, @optional int endAt, @localvar @optional std::function completeCallback) + // void setPlaySettings(@optional int start, @optional int end_, @optional int times) self->setPlaySettings(arg1, arg2, arg3); olua_endinvoke(L); @@ -18141,13 +19898,13 @@ static int _fairygui_GMovieClip_setPlaySettings$5(lua_State *L) return 0; } -static int _fairygui_GMovieClip_setPlaySettings$6(lua_State *L) +static int _olua_fun_fairygui_GMovieClip_setPlaySettings$6(lua_State *L) { olua_startinvoke(L); fairygui::GMovieClip *self = nullptr; int arg1 = 0; /** start */ - int arg2 = 0; /** end */ + int arg2 = 0; /** end_ */ int arg3 = 0; /** times */ int arg4 = 0; /** endAt */ @@ -18157,7 +19914,7 @@ static int _fairygui_GMovieClip_setPlaySettings$6(lua_State *L) olua_check_integer(L, 4, &arg3); olua_check_integer(L, 5, &arg4); - // void setPlaySettings(@optional int start, @optional int end, @optional int times, @optional int endAt, @localvar @optional std::function completeCallback) + // void setPlaySettings(@optional int start, @optional int end_, @optional int times, @optional int endAt) self->setPlaySettings(arg1, arg2, arg3, arg4); olua_endinvoke(L); @@ -18165,47 +19922,47 @@ static int _fairygui_GMovieClip_setPlaySettings$6(lua_State *L) return 0; } -static int _fairygui_GMovieClip_setPlaySettings(lua_State *L) +static int _olua_fun_fairygui_GMovieClip_setPlaySettings(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 0) { - // void setPlaySettings(@optional int start, @optional int end, @optional int times, @optional int endAt, @localvar @optional std::function completeCallback) - return _fairygui_GMovieClip_setPlaySettings$2(L); + // void setPlaySettings() + return _olua_fun_fairygui_GMovieClip_setPlaySettings$2(L); } if (num_args == 1) { // if ((olua_is_integer(L, 2))) { - // void setPlaySettings(@optional int start, @optional int end, @optional int times, @optional int endAt, @localvar @optional std::function completeCallback) - return _fairygui_GMovieClip_setPlaySettings$3(L); + // void setPlaySettings(@optional int start) + return _olua_fun_fairygui_GMovieClip_setPlaySettings$3(L); // } } if (num_args == 2) { // if ((olua_is_integer(L, 2)) && (olua_is_integer(L, 3))) { - // void setPlaySettings(@optional int start, @optional int end, @optional int times, @optional int endAt, @localvar @optional std::function completeCallback) - return _fairygui_GMovieClip_setPlaySettings$4(L); + // void setPlaySettings(@optional int start, @optional int end_) + return _olua_fun_fairygui_GMovieClip_setPlaySettings$4(L); // } } if (num_args == 3) { // if ((olua_is_integer(L, 2)) && (olua_is_integer(L, 3)) && (olua_is_integer(L, 4))) { - // void setPlaySettings(@optional int start, @optional int end, @optional int times, @optional int endAt, @localvar @optional std::function completeCallback) - return _fairygui_GMovieClip_setPlaySettings$5(L); + // void setPlaySettings(@optional int start, @optional int end_, @optional int times) + return _olua_fun_fairygui_GMovieClip_setPlaySettings$5(L); // } } if (num_args == 4) { // if ((olua_is_integer(L, 2)) && (olua_is_integer(L, 3)) && (olua_is_integer(L, 4)) && (olua_is_integer(L, 5))) { - // void setPlaySettings(@optional int start, @optional int end, @optional int times, @optional int endAt, @localvar @optional std::function completeCallback) - return _fairygui_GMovieClip_setPlaySettings$6(L); + // void setPlaySettings(@optional int start, @optional int end_, @optional int times, @optional int endAt) + return _olua_fun_fairygui_GMovieClip_setPlaySettings$6(L); // } } if (num_args == 5) { // if ((olua_is_integer(L, 2)) && (olua_is_integer(L, 3)) && (olua_is_integer(L, 4)) && (olua_is_integer(L, 5)) && (olua_is_callback(L, 6, "std.function"))) { - // void setPlaySettings(@optional int start, @optional int end, @optional int times, @optional int endAt, @localvar @optional std::function completeCallback) - return _fairygui_GMovieClip_setPlaySettings$1(L); + // void setPlaySettings(@optional int start, @optional int end_, @optional int times, @optional int endAt, @optional std::function completeCallback) + return _olua_fun_fairygui_GMovieClip_setPlaySettings$1(L); // } } @@ -18214,7 +19971,7 @@ static int _fairygui_GMovieClip_setPlaySettings(lua_State *L) return 0; } -static int _fairygui_GMovieClip_setPlaying(lua_State *L) +static int _olua_fun_fairygui_GMovieClip_setPlaying(lua_State *L) { olua_startinvoke(L); @@ -18232,7 +19989,7 @@ static int _fairygui_GMovieClip_setPlaying(lua_State *L) return 0; } -static int _fairygui_GMovieClip_setTimeScale(lua_State *L) +static int _olua_fun_fairygui_GMovieClip_setTimeScale(lua_State *L) { olua_startinvoke(L); @@ -18250,35 +20007,44 @@ static int _fairygui_GMovieClip_setTimeScale(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_fairygui_GMovieClip(lua_State *L) +static int _olua_cls_fgui_GMovieClip(lua_State *L) { oluacls_class(L, "fgui.GMovieClip"); - oluacls_func(L, "advance", _fairygui_GMovieClip_advance); - oluacls_func(L, "create", _fairygui_GMovieClip_create); - oluacls_func(L, "getColor", _fairygui_GMovieClip_getColor); - oluacls_func(L, "getFlip", _fairygui_GMovieClip_getFlip); - oluacls_func(L, "getFrame", _fairygui_GMovieClip_getFrame); - oluacls_func(L, "getTimeScale", _fairygui_GMovieClip_getTimeScale); - oluacls_func(L, "isPlaying", _fairygui_GMovieClip_isPlaying); - oluacls_func(L, "new", _fairygui_GMovieClip_new); - oluacls_func(L, "setColor", _fairygui_GMovieClip_setColor); - oluacls_func(L, "setFlip", _fairygui_GMovieClip_setFlip); - oluacls_func(L, "setFrame", _fairygui_GMovieClip_setFrame); - oluacls_func(L, "setPlaySettings", _fairygui_GMovieClip_setPlaySettings); - oluacls_func(L, "setPlaying", _fairygui_GMovieClip_setPlaying); - oluacls_func(L, "setTimeScale", _fairygui_GMovieClip_setTimeScale); - oluacls_prop(L, "color", _fairygui_GMovieClip_getColor, _fairygui_GMovieClip_setColor); - oluacls_prop(L, "flip", _fairygui_GMovieClip_getFlip, _fairygui_GMovieClip_setFlip); - oluacls_prop(L, "frame", _fairygui_GMovieClip_getFrame, _fairygui_GMovieClip_setFrame); - oluacls_prop(L, "playing", _fairygui_GMovieClip_isPlaying, _fairygui_GMovieClip_setPlaying); - oluacls_prop(L, "timeScale", _fairygui_GMovieClip_getTimeScale, _fairygui_GMovieClip_setTimeScale); + oluacls_func(L, "advance", _olua_fun_fairygui_GMovieClip_advance); + oluacls_func(L, "create", _olua_fun_fairygui_GMovieClip_create); + oluacls_func(L, "getColor", _olua_fun_fairygui_GMovieClip_getColor); + oluacls_func(L, "getFlip", _olua_fun_fairygui_GMovieClip_getFlip); + oluacls_func(L, "getFrame", _olua_fun_fairygui_GMovieClip_getFrame); + oluacls_func(L, "getTimeScale", _olua_fun_fairygui_GMovieClip_getTimeScale); + oluacls_func(L, "isPlaying", _olua_fun_fairygui_GMovieClip_isPlaying); + oluacls_func(L, "new", _olua_fun_fairygui_GMovieClip_new); + oluacls_func(L, "setColor", _olua_fun_fairygui_GMovieClip_setColor); + oluacls_func(L, "setFlip", _olua_fun_fairygui_GMovieClip_setFlip); + oluacls_func(L, "setFrame", _olua_fun_fairygui_GMovieClip_setFrame); + oluacls_func(L, "setPlaySettings", _olua_fun_fairygui_GMovieClip_setPlaySettings); + oluacls_func(L, "setPlaying", _olua_fun_fairygui_GMovieClip_setPlaying); + oluacls_func(L, "setTimeScale", _olua_fun_fairygui_GMovieClip_setTimeScale); + oluacls_prop(L, "color", _olua_fun_fairygui_GMovieClip_getColor, _olua_fun_fairygui_GMovieClip_setColor); + oluacls_prop(L, "flip", _olua_fun_fairygui_GMovieClip_getFlip, _olua_fun_fairygui_GMovieClip_setFlip); + oluacls_prop(L, "frame", _olua_fun_fairygui_GMovieClip_getFrame, _olua_fun_fairygui_GMovieClip_setFrame); + oluacls_prop(L, "playing", _olua_fun_fairygui_GMovieClip_isPlaying, _olua_fun_fairygui_GMovieClip_setPlaying); + oluacls_prop(L, "timeScale", _olua_fun_fairygui_GMovieClip_getTimeScale, _olua_fun_fairygui_GMovieClip_setTimeScale); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_fgui_GMovieClip(lua_State *L) +{ + olua_require(L, "fairygui", luaopen_fairygui); + if (!olua_getclass(L, "fgui.GMovieClip")) { + luaL_error(L, "class not found: fairygui::GMovieClip"); + } return 1; } OLUA_END_DECLS -static int _fairygui_GProgressBar_create(lua_State *L) +static int _olua_fun_fairygui_GProgressBar_create(lua_State *L) { olua_startinvoke(L); @@ -18291,7 +20057,7 @@ static int _fairygui_GProgressBar_create(lua_State *L) return num_ret; } -static int _fairygui_GProgressBar_getMax(lua_State *L) +static int _olua_fun_fairygui_GProgressBar_getMax(lua_State *L) { olua_startinvoke(L); @@ -18308,7 +20074,7 @@ static int _fairygui_GProgressBar_getMax(lua_State *L) return num_ret; } -static int _fairygui_GProgressBar_getMin(lua_State *L) +static int _olua_fun_fairygui_GProgressBar_getMin(lua_State *L) { olua_startinvoke(L); @@ -18325,7 +20091,7 @@ static int _fairygui_GProgressBar_getMin(lua_State *L) return num_ret; } -static int _fairygui_GProgressBar_getTitleType(lua_State *L) +static int _olua_fun_fairygui_GProgressBar_getTitleType(lua_State *L) { olua_startinvoke(L); @@ -18342,7 +20108,7 @@ static int _fairygui_GProgressBar_getTitleType(lua_State *L) return num_ret; } -static int _fairygui_GProgressBar_getValue(lua_State *L) +static int _olua_fun_fairygui_GProgressBar_getValue(lua_State *L) { olua_startinvoke(L); @@ -18359,11 +20125,11 @@ static int _fairygui_GProgressBar_getValue(lua_State *L) return num_ret; } -static int _fairygui_GProgressBar_new(lua_State *L) +static int _olua_fun_fairygui_GProgressBar_new(lua_State *L) { olua_startinvoke(L); - // GProgressBar() + // fairygui::GProgressBar() fairygui::GProgressBar *ret = new fairygui::GProgressBar(); int num_ret = olua_push_object(L, ret, "fgui.GProgressBar"); olua_postnew(L, ret); @@ -18373,7 +20139,7 @@ static int _fairygui_GProgressBar_new(lua_State *L) return num_ret; } -static int _fairygui_GProgressBar_setMax(lua_State *L) +static int _olua_fun_fairygui_GProgressBar_setMax(lua_State *L) { olua_startinvoke(L); @@ -18391,7 +20157,7 @@ static int _fairygui_GProgressBar_setMax(lua_State *L) return 0; } -static int _fairygui_GProgressBar_setMin(lua_State *L) +static int _olua_fun_fairygui_GProgressBar_setMin(lua_State *L) { olua_startinvoke(L); @@ -18409,7 +20175,7 @@ static int _fairygui_GProgressBar_setMin(lua_State *L) return 0; } -static int _fairygui_GProgressBar_setTitleType(lua_State *L) +static int _olua_fun_fairygui_GProgressBar_setTitleType(lua_State *L) { olua_startinvoke(L); @@ -18427,7 +20193,7 @@ static int _fairygui_GProgressBar_setTitleType(lua_State *L) return 0; } -static int _fairygui_GProgressBar_setValue(lua_State *L) +static int _olua_fun_fairygui_GProgressBar_setValue(lua_State *L) { olua_startinvoke(L); @@ -18445,7 +20211,7 @@ static int _fairygui_GProgressBar_setValue(lua_State *L) return 0; } -static int _fairygui_GProgressBar_tweenValue(lua_State *L) +static int _olua_fun_fairygui_GProgressBar_tweenValue(lua_State *L) { olua_startinvoke(L); @@ -18465,7 +20231,7 @@ static int _fairygui_GProgressBar_tweenValue(lua_State *L) return 0; } -static int _fairygui_GProgressBar_update(lua_State *L) +static int _olua_fun_fairygui_GProgressBar_update(lua_State *L) { olua_startinvoke(L); @@ -18483,32 +20249,41 @@ static int _fairygui_GProgressBar_update(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_fairygui_GProgressBar(lua_State *L) +static int _olua_cls_fgui_GProgressBar(lua_State *L) { oluacls_class(L, "fgui.GProgressBar"); - oluacls_func(L, "create", _fairygui_GProgressBar_create); - oluacls_func(L, "getMax", _fairygui_GProgressBar_getMax); - oluacls_func(L, "getMin", _fairygui_GProgressBar_getMin); - oluacls_func(L, "getTitleType", _fairygui_GProgressBar_getTitleType); - oluacls_func(L, "getValue", _fairygui_GProgressBar_getValue); - oluacls_func(L, "new", _fairygui_GProgressBar_new); - oluacls_func(L, "setMax", _fairygui_GProgressBar_setMax); - oluacls_func(L, "setMin", _fairygui_GProgressBar_setMin); - oluacls_func(L, "setTitleType", _fairygui_GProgressBar_setTitleType); - oluacls_func(L, "setValue", _fairygui_GProgressBar_setValue); - oluacls_func(L, "tweenValue", _fairygui_GProgressBar_tweenValue); - oluacls_func(L, "update", _fairygui_GProgressBar_update); - oluacls_prop(L, "max", _fairygui_GProgressBar_getMax, _fairygui_GProgressBar_setMax); - oluacls_prop(L, "min", _fairygui_GProgressBar_getMin, _fairygui_GProgressBar_setMin); - oluacls_prop(L, "titleType", _fairygui_GProgressBar_getTitleType, _fairygui_GProgressBar_setTitleType); - oluacls_prop(L, "value", _fairygui_GProgressBar_getValue, _fairygui_GProgressBar_setValue); + oluacls_func(L, "create", _olua_fun_fairygui_GProgressBar_create); + oluacls_func(L, "getMax", _olua_fun_fairygui_GProgressBar_getMax); + oluacls_func(L, "getMin", _olua_fun_fairygui_GProgressBar_getMin); + oluacls_func(L, "getTitleType", _olua_fun_fairygui_GProgressBar_getTitleType); + oluacls_func(L, "getValue", _olua_fun_fairygui_GProgressBar_getValue); + oluacls_func(L, "new", _olua_fun_fairygui_GProgressBar_new); + oluacls_func(L, "setMax", _olua_fun_fairygui_GProgressBar_setMax); + oluacls_func(L, "setMin", _olua_fun_fairygui_GProgressBar_setMin); + oluacls_func(L, "setTitleType", _olua_fun_fairygui_GProgressBar_setTitleType); + oluacls_func(L, "setValue", _olua_fun_fairygui_GProgressBar_setValue); + oluacls_func(L, "tweenValue", _olua_fun_fairygui_GProgressBar_tweenValue); + oluacls_func(L, "update", _olua_fun_fairygui_GProgressBar_update); + oluacls_prop(L, "max", _olua_fun_fairygui_GProgressBar_getMax, _olua_fun_fairygui_GProgressBar_setMax); + oluacls_prop(L, "min", _olua_fun_fairygui_GProgressBar_getMin, _olua_fun_fairygui_GProgressBar_setMin); + oluacls_prop(L, "titleType", _olua_fun_fairygui_GProgressBar_getTitleType, _olua_fun_fairygui_GProgressBar_setTitleType); + oluacls_prop(L, "value", _olua_fun_fairygui_GProgressBar_getValue, _olua_fun_fairygui_GProgressBar_setValue); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_fgui_GProgressBar(lua_State *L) +{ + olua_require(L, "fairygui", luaopen_fairygui); + if (!olua_getclass(L, "fgui.GProgressBar")) { + luaL_error(L, "class not found: fairygui::GProgressBar"); + } return 1; } OLUA_END_DECLS -static int _fairygui_GComboBox_create(lua_State *L) +static int _olua_fun_fairygui_GComboBox_create(lua_State *L) { olua_startinvoke(L); @@ -18521,7 +20296,7 @@ static int _fairygui_GComboBox_create(lua_State *L) return num_ret; } -static int _fairygui_GComboBox_getDropdown(lua_State *L) +static int _olua_fun_fairygui_GComboBox_getDropdown(lua_State *L) { olua_startinvoke(L); @@ -18541,7 +20316,7 @@ static int _fairygui_GComboBox_getDropdown(lua_State *L) return num_ret; } -static int _fairygui_GComboBox_getIcons(lua_State *L) +static int _olua_fun_fairygui_GComboBox_getIcons(lua_State *L) { olua_startinvoke(L); @@ -18551,14 +20326,14 @@ static int _fairygui_GComboBox_getIcons(lua_State *L) // std::vector &getIcons() std::vector &ret = self->getIcons(); - int num_ret = olua_push_pointer(L, &ret, "cc.VectorString"); + int num_ret = olua_push_valueptr(L, &ret, "cc.types.VectorString"); olua_endinvoke(L); return num_ret; } -static int _fairygui_GComboBox_getItems(lua_State *L) +static int _olua_fun_fairygui_GComboBox_getItems(lua_State *L) { olua_startinvoke(L); @@ -18568,14 +20343,14 @@ static int _fairygui_GComboBox_getItems(lua_State *L) // std::vector &getItems() std::vector &ret = self->getItems(); - int num_ret = olua_push_pointer(L, &ret, "cc.VectorString"); + int num_ret = olua_push_valueptr(L, &ret, "cc.types.VectorString"); olua_endinvoke(L); return num_ret; } -static int _fairygui_GComboBox_getSelectedIndex(lua_State *L) +static int _olua_fun_fairygui_GComboBox_getSelectedIndex(lua_State *L) { olua_startinvoke(L); @@ -18592,7 +20367,7 @@ static int _fairygui_GComboBox_getSelectedIndex(lua_State *L) return num_ret; } -static int _fairygui_GComboBox_getSelectionController(lua_State *L) +static int _olua_fun_fairygui_GComboBox_getSelectionController(lua_State *L) { olua_startinvoke(L); @@ -18612,7 +20387,7 @@ static int _fairygui_GComboBox_getSelectionController(lua_State *L) return num_ret; } -static int _fairygui_GComboBox_getTextField(lua_State *L) +static int _olua_fun_fairygui_GComboBox_getTextField(lua_State *L) { olua_startinvoke(L); @@ -18632,7 +20407,7 @@ static int _fairygui_GComboBox_getTextField(lua_State *L) return num_ret; } -static int _fairygui_GComboBox_getTitle(lua_State *L) +static int _olua_fun_fairygui_GComboBox_getTitle(lua_State *L) { olua_startinvoke(L); @@ -18649,7 +20424,7 @@ static int _fairygui_GComboBox_getTitle(lua_State *L) return num_ret; } -static int _fairygui_GComboBox_getTitleColor(lua_State *L) +static int _olua_fun_fairygui_GComboBox_getTitleColor(lua_State *L) { olua_startinvoke(L); @@ -18666,7 +20441,7 @@ static int _fairygui_GComboBox_getTitleColor(lua_State *L) return num_ret; } -static int _fairygui_GComboBox_getTitleFontSize(lua_State *L) +static int _olua_fun_fairygui_GComboBox_getTitleFontSize(lua_State *L) { olua_startinvoke(L); @@ -18683,7 +20458,7 @@ static int _fairygui_GComboBox_getTitleFontSize(lua_State *L) return num_ret; } -static int _fairygui_GComboBox_getValue(lua_State *L) +static int _olua_fun_fairygui_GComboBox_getValue(lua_State *L) { olua_startinvoke(L); @@ -18700,7 +20475,7 @@ static int _fairygui_GComboBox_getValue(lua_State *L) return num_ret; } -static int _fairygui_GComboBox_getValues(lua_State *L) +static int _olua_fun_fairygui_GComboBox_getValues(lua_State *L) { olua_startinvoke(L); @@ -18710,18 +20485,18 @@ static int _fairygui_GComboBox_getValues(lua_State *L) // std::vector &getValues() std::vector &ret = self->getValues(); - int num_ret = olua_push_pointer(L, &ret, "cc.VectorString"); + int num_ret = olua_push_valueptr(L, &ret, "cc.types.VectorString"); olua_endinvoke(L); return num_ret; } -static int _fairygui_GComboBox_new(lua_State *L) +static int _olua_fun_fairygui_GComboBox_new(lua_State *L) { olua_startinvoke(L); - // GComboBox() + // fairygui::GComboBox() fairygui::GComboBox *ret = new fairygui::GComboBox(); int num_ret = olua_push_object(L, ret, "fgui.GComboBox"); olua_postnew(L, ret); @@ -18731,7 +20506,63 @@ static int _fairygui_GComboBox_new(lua_State *L) return num_ret; } -static int _fairygui_GComboBox_refresh(lua_State *L) +static int _olua_fun_fairygui_GComboBox_popupDirection$1(lua_State *L) +{ + olua_startinvoke(L); + + fairygui::GComboBox *self = nullptr; + + olua_to_object(L, 1, &self, "fgui.GComboBox"); + + // fairygui::PopupDirection popupDirection + fairygui::PopupDirection ret = self->popupDirection; + int num_ret = olua_push_enum(L, ret); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_fairygui_GComboBox_popupDirection$2(lua_State *L) +{ + olua_startinvoke(L); + + fairygui::GComboBox *self = nullptr; + fairygui::PopupDirection arg1 = (fairygui::PopupDirection)0; /** popupDirection */ + + olua_to_object(L, 1, &self, "fgui.GComboBox"); + olua_check_enum(L, 2, &arg1); + + // fairygui::PopupDirection popupDirection + self->popupDirection = arg1; + + olua_endinvoke(L); + + return 0; +} + +static int _olua_fun_fairygui_GComboBox_popupDirection(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // fairygui::PopupDirection popupDirection + return _olua_fun_fairygui_GComboBox_popupDirection$1(L); + } + + if (num_args == 1) { + // if ((olua_is_enum(L, 2))) { + // fairygui::PopupDirection popupDirection + return _olua_fun_fairygui_GComboBox_popupDirection$2(L); + // } + } + + luaL_error(L, "method 'fairygui::GComboBox::popupDirection' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_fairygui_GComboBox_refresh(lua_State *L) { olua_startinvoke(L); @@ -18747,7 +20578,7 @@ static int _fairygui_GComboBox_refresh(lua_State *L) return 0; } -static int _fairygui_GComboBox_setSelectedIndex(lua_State *L) +static int _olua_fun_fairygui_GComboBox_setSelectedIndex(lua_State *L) { olua_startinvoke(L); @@ -18765,7 +20596,7 @@ static int _fairygui_GComboBox_setSelectedIndex(lua_State *L) return 0; } -static int _fairygui_GComboBox_setSelectionController(lua_State *L) +static int _olua_fun_fairygui_GComboBox_setSelectionController(lua_State *L) { olua_startinvoke(L); @@ -18786,7 +20617,7 @@ static int _fairygui_GComboBox_setSelectionController(lua_State *L) return 0; } -static int _fairygui_GComboBox_setTitle(lua_State *L) +static int _olua_fun_fairygui_GComboBox_setTitle(lua_State *L) { olua_startinvoke(L); @@ -18804,7 +20635,7 @@ static int _fairygui_GComboBox_setTitle(lua_State *L) return 0; } -static int _fairygui_GComboBox_setTitleColor(lua_State *L) +static int _olua_fun_fairygui_GComboBox_setTitleColor(lua_State *L) { olua_startinvoke(L); @@ -18822,7 +20653,7 @@ static int _fairygui_GComboBox_setTitleColor(lua_State *L) return 0; } -static int _fairygui_GComboBox_setTitleFontSize(lua_State *L) +static int _olua_fun_fairygui_GComboBox_setTitleFontSize(lua_State *L) { olua_startinvoke(L); @@ -18840,7 +20671,7 @@ static int _fairygui_GComboBox_setTitleFontSize(lua_State *L) return 0; } -static int _fairygui_GComboBox_setValue(lua_State *L) +static int _olua_fun_fairygui_GComboBox_setValue(lua_State *L) { olua_startinvoke(L); @@ -18858,7 +20689,7 @@ static int _fairygui_GComboBox_setValue(lua_State *L) return 0; } -static int _fairygui_GComboBox_get_popupDirection(lua_State *L) +static int _olua_fun_fairygui_GComboBox_visibleItemCount$1(lua_State *L) { olua_startinvoke(L); @@ -18866,111 +20697,106 @@ static int _fairygui_GComboBox_get_popupDirection(lua_State *L) olua_to_object(L, 1, &self, "fgui.GComboBox"); - // fairygui::PopupDirection popupDirection - fairygui::PopupDirection ret = self->popupDirection; - int num_ret = olua_push_enum(L, ret); + // int visibleItemCount + int ret = self->visibleItemCount; + int num_ret = olua_push_integer(L, ret); olua_endinvoke(L); return num_ret; } -static int _fairygui_GComboBox_set_popupDirection(lua_State *L) +static int _olua_fun_fairygui_GComboBox_visibleItemCount$2(lua_State *L) { olua_startinvoke(L); fairygui::GComboBox *self = nullptr; - fairygui::PopupDirection arg1 = (fairygui::PopupDirection)0; /** popupDirection */ + int arg1 = 0; /** visibleItemCount */ olua_to_object(L, 1, &self, "fgui.GComboBox"); - olua_check_enum(L, 2, &arg1); + olua_check_integer(L, 2, &arg1); - // fairygui::PopupDirection popupDirection - self->popupDirection = arg1; + // int visibleItemCount + self->visibleItemCount = arg1; olua_endinvoke(L); return 0; } -static int _fairygui_GComboBox_get_visibleItemCount(lua_State *L) +static int _olua_fun_fairygui_GComboBox_visibleItemCount(lua_State *L) { - olua_startinvoke(L); + int num_args = lua_gettop(L) - 1; - fairygui::GComboBox *self = nullptr; + if (num_args == 0) { + // int visibleItemCount + return _olua_fun_fairygui_GComboBox_visibleItemCount$1(L); + } - olua_to_object(L, 1, &self, "fgui.GComboBox"); + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // int visibleItemCount + return _olua_fun_fairygui_GComboBox_visibleItemCount$2(L); + // } + } - // int visibleItemCount - int ret = self->visibleItemCount; - int num_ret = olua_push_integer(L, ret); - - olua_endinvoke(L); + luaL_error(L, "method 'fairygui::GComboBox::visibleItemCount' not support '%d' arguments", num_args); - return num_ret; + return 0; } -static int _fairygui_GComboBox_set_visibleItemCount(lua_State *L) +static int _olua_cls_fgui_GComboBox(lua_State *L) { - olua_startinvoke(L); - - fairygui::GComboBox *self = nullptr; - int arg1 = 0; /** visibleItemCount */ - - olua_to_object(L, 1, &self, "fgui.GComboBox"); - olua_check_integer(L, 2, &arg1); - - // int visibleItemCount - self->visibleItemCount = arg1; - - olua_endinvoke(L); + oluacls_class(L, "fgui.GComboBox"); + oluacls_func(L, "create", _olua_fun_fairygui_GComboBox_create); + oluacls_func(L, "getDropdown", _olua_fun_fairygui_GComboBox_getDropdown); + oluacls_func(L, "getIcons", _olua_fun_fairygui_GComboBox_getIcons); + oluacls_func(L, "getItems", _olua_fun_fairygui_GComboBox_getItems); + oluacls_func(L, "getSelectedIndex", _olua_fun_fairygui_GComboBox_getSelectedIndex); + oluacls_func(L, "getSelectionController", _olua_fun_fairygui_GComboBox_getSelectionController); + oluacls_func(L, "getTextField", _olua_fun_fairygui_GComboBox_getTextField); + oluacls_func(L, "getTitle", _olua_fun_fairygui_GComboBox_getTitle); + oluacls_func(L, "getTitleColor", _olua_fun_fairygui_GComboBox_getTitleColor); + oluacls_func(L, "getTitleFontSize", _olua_fun_fairygui_GComboBox_getTitleFontSize); + oluacls_func(L, "getValue", _olua_fun_fairygui_GComboBox_getValue); + oluacls_func(L, "getValues", _olua_fun_fairygui_GComboBox_getValues); + oluacls_func(L, "new", _olua_fun_fairygui_GComboBox_new); + oluacls_func(L, "refresh", _olua_fun_fairygui_GComboBox_refresh); + oluacls_func(L, "setSelectedIndex", _olua_fun_fairygui_GComboBox_setSelectedIndex); + oluacls_func(L, "setSelectionController", _olua_fun_fairygui_GComboBox_setSelectionController); + oluacls_func(L, "setTitle", _olua_fun_fairygui_GComboBox_setTitle); + oluacls_func(L, "setTitleColor", _olua_fun_fairygui_GComboBox_setTitleColor); + oluacls_func(L, "setTitleFontSize", _olua_fun_fairygui_GComboBox_setTitleFontSize); + oluacls_func(L, "setValue", _olua_fun_fairygui_GComboBox_setValue); + oluacls_prop(L, "dropdown", _olua_fun_fairygui_GComboBox_getDropdown, nullptr); + oluacls_prop(L, "icons", _olua_fun_fairygui_GComboBox_getIcons, nullptr); + oluacls_prop(L, "items", _olua_fun_fairygui_GComboBox_getItems, nullptr); + oluacls_prop(L, "selectedIndex", _olua_fun_fairygui_GComboBox_getSelectedIndex, _olua_fun_fairygui_GComboBox_setSelectedIndex); + oluacls_prop(L, "selectionController", _olua_fun_fairygui_GComboBox_getSelectionController, _olua_fun_fairygui_GComboBox_setSelectionController); + oluacls_prop(L, "textField", _olua_fun_fairygui_GComboBox_getTextField, nullptr); + oluacls_prop(L, "title", _olua_fun_fairygui_GComboBox_getTitle, _olua_fun_fairygui_GComboBox_setTitle); + oluacls_prop(L, "titleColor", _olua_fun_fairygui_GComboBox_getTitleColor, _olua_fun_fairygui_GComboBox_setTitleColor); + oluacls_prop(L, "titleFontSize", _olua_fun_fairygui_GComboBox_getTitleFontSize, _olua_fun_fairygui_GComboBox_setTitleFontSize); + oluacls_prop(L, "value", _olua_fun_fairygui_GComboBox_getValue, _olua_fun_fairygui_GComboBox_setValue); + oluacls_prop(L, "values", _olua_fun_fairygui_GComboBox_getValues, nullptr); + oluacls_prop(L, "popupDirection", _olua_fun_fairygui_GComboBox_popupDirection, _olua_fun_fairygui_GComboBox_popupDirection); + oluacls_prop(L, "visibleItemCount", _olua_fun_fairygui_GComboBox_visibleItemCount, _olua_fun_fairygui_GComboBox_visibleItemCount); - return 0; + return 1; } OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_fairygui_GComboBox(lua_State *L) +OLUA_LIB int luaopen_fgui_GComboBox(lua_State *L) { - oluacls_class(L, "fgui.GComboBox"); - oluacls_func(L, "create", _fairygui_GComboBox_create); - oluacls_func(L, "getDropdown", _fairygui_GComboBox_getDropdown); - oluacls_func(L, "getIcons", _fairygui_GComboBox_getIcons); - oluacls_func(L, "getItems", _fairygui_GComboBox_getItems); - oluacls_func(L, "getSelectedIndex", _fairygui_GComboBox_getSelectedIndex); - oluacls_func(L, "getSelectionController", _fairygui_GComboBox_getSelectionController); - oluacls_func(L, "getTextField", _fairygui_GComboBox_getTextField); - oluacls_func(L, "getTitle", _fairygui_GComboBox_getTitle); - oluacls_func(L, "getTitleColor", _fairygui_GComboBox_getTitleColor); - oluacls_func(L, "getTitleFontSize", _fairygui_GComboBox_getTitleFontSize); - oluacls_func(L, "getValue", _fairygui_GComboBox_getValue); - oluacls_func(L, "getValues", _fairygui_GComboBox_getValues); - oluacls_func(L, "new", _fairygui_GComboBox_new); - oluacls_func(L, "refresh", _fairygui_GComboBox_refresh); - oluacls_func(L, "setSelectedIndex", _fairygui_GComboBox_setSelectedIndex); - oluacls_func(L, "setSelectionController", _fairygui_GComboBox_setSelectionController); - oluacls_func(L, "setTitle", _fairygui_GComboBox_setTitle); - oluacls_func(L, "setTitleColor", _fairygui_GComboBox_setTitleColor); - oluacls_func(L, "setTitleFontSize", _fairygui_GComboBox_setTitleFontSize); - oluacls_func(L, "setValue", _fairygui_GComboBox_setValue); - oluacls_prop(L, "dropdown", _fairygui_GComboBox_getDropdown, nullptr); - oluacls_prop(L, "icons", _fairygui_GComboBox_getIcons, nullptr); - oluacls_prop(L, "items", _fairygui_GComboBox_getItems, nullptr); - oluacls_prop(L, "selectedIndex", _fairygui_GComboBox_getSelectedIndex, _fairygui_GComboBox_setSelectedIndex); - oluacls_prop(L, "selectionController", _fairygui_GComboBox_getSelectionController, _fairygui_GComboBox_setSelectionController); - oluacls_prop(L, "textField", _fairygui_GComboBox_getTextField, nullptr); - oluacls_prop(L, "title", _fairygui_GComboBox_getTitle, _fairygui_GComboBox_setTitle); - oluacls_prop(L, "titleColor", _fairygui_GComboBox_getTitleColor, _fairygui_GComboBox_setTitleColor); - oluacls_prop(L, "titleFontSize", _fairygui_GComboBox_getTitleFontSize, _fairygui_GComboBox_setTitleFontSize); - oluacls_prop(L, "value", _fairygui_GComboBox_getValue, _fairygui_GComboBox_setValue); - oluacls_prop(L, "values", _fairygui_GComboBox_getValues, nullptr); - oluacls_prop(L, "popupDirection", _fairygui_GComboBox_get_popupDirection, _fairygui_GComboBox_set_popupDirection); - oluacls_prop(L, "visibleItemCount", _fairygui_GComboBox_get_visibleItemCount, _fairygui_GComboBox_set_visibleItemCount); - + olua_require(L, "fairygui", luaopen_fairygui); + if (!olua_getclass(L, "fgui.GComboBox")) { + luaL_error(L, "class not found: fairygui::GComboBox"); + } return 1; } OLUA_END_DECLS -static int _fairygui_GRichTextField_create(lua_State *L) +static int _olua_fun_fairygui_GRichTextField_create(lua_State *L) { olua_startinvoke(L); @@ -18983,7 +20809,7 @@ static int _fairygui_GRichTextField_create(lua_State *L) return num_ret; } -static int _fairygui_GRichTextField_getControl(lua_State *L) +static int _olua_fun_fairygui_GRichTextField_getControl(lua_State *L) { olua_startinvoke(L); @@ -19002,11 +20828,11 @@ static int _fairygui_GRichTextField_getControl(lua_State *L) return num_ret; } -static int _fairygui_GRichTextField_new(lua_State *L) +static int _olua_fun_fairygui_GRichTextField_new(lua_State *L) { olua_startinvoke(L); - // GRichTextField() + // fairygui::GRichTextField() fairygui::GRichTextField *ret = new fairygui::GRichTextField(); int num_ret = olua_push_object(L, ret, "fgui.GRichTextField"); olua_postnew(L, ret); @@ -19016,19 +20842,140 @@ static int _fairygui_GRichTextField_new(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_fairygui_GRichTextField(lua_State *L) +static int _olua_cls_fgui_GRichTextField(lua_State *L) { oluacls_class(L, "fgui.GRichTextField"); - oluacls_func(L, "create", _fairygui_GRichTextField_create); - oluacls_func(L, "getControl", _fairygui_GRichTextField_getControl); - oluacls_func(L, "new", _fairygui_GRichTextField_new); + oluacls_func(L, "create", _olua_fun_fairygui_GRichTextField_create); + oluacls_func(L, "getControl", _olua_fun_fairygui_GRichTextField_getControl); + oluacls_func(L, "new", _olua_fun_fairygui_GRichTextField_new); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_fgui_GRichTextField(lua_State *L) +{ + olua_require(L, "fairygui", luaopen_fairygui); + if (!olua_getclass(L, "fgui.GRichTextField")) { + luaL_error(L, "class not found: fairygui::GRichTextField"); + } + return 1; +} OLUA_END_DECLS -static int _fairygui_GSlider_create(lua_State *L) +static int _olua_fun_fairygui_GSlider_canDrag$1(lua_State *L) +{ + olua_startinvoke(L); + + fairygui::GSlider *self = nullptr; + + olua_to_object(L, 1, &self, "fgui.GSlider"); + + // bool canDrag + bool ret = self->canDrag; + int num_ret = olua_push_bool(L, ret); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_fairygui_GSlider_canDrag$2(lua_State *L) +{ + olua_startinvoke(L); + + fairygui::GSlider *self = nullptr; + bool arg1 = false; /** canDrag */ + + olua_to_object(L, 1, &self, "fgui.GSlider"); + olua_check_bool(L, 2, &arg1); + + // bool canDrag + self->canDrag = arg1; + + olua_endinvoke(L); + + return 0; +} + +static int _olua_fun_fairygui_GSlider_canDrag(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // bool canDrag + return _olua_fun_fairygui_GSlider_canDrag$1(L); + } + + if (num_args == 1) { + // if ((olua_is_bool(L, 2))) { + // bool canDrag + return _olua_fun_fairygui_GSlider_canDrag$2(L); + // } + } + + luaL_error(L, "method 'fairygui::GSlider::canDrag' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_fairygui_GSlider_changeOnClick$1(lua_State *L) +{ + olua_startinvoke(L); + + fairygui::GSlider *self = nullptr; + + olua_to_object(L, 1, &self, "fgui.GSlider"); + + // bool changeOnClick + bool ret = self->changeOnClick; + int num_ret = olua_push_bool(L, ret); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_fairygui_GSlider_changeOnClick$2(lua_State *L) +{ + olua_startinvoke(L); + + fairygui::GSlider *self = nullptr; + bool arg1 = false; /** changeOnClick */ + + olua_to_object(L, 1, &self, "fgui.GSlider"); + olua_check_bool(L, 2, &arg1); + + // bool changeOnClick + self->changeOnClick = arg1; + + olua_endinvoke(L); + + return 0; +} + +static int _olua_fun_fairygui_GSlider_changeOnClick(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // bool changeOnClick + return _olua_fun_fairygui_GSlider_changeOnClick$1(L); + } + + if (num_args == 1) { + // if ((olua_is_bool(L, 2))) { + // bool changeOnClick + return _olua_fun_fairygui_GSlider_changeOnClick$2(L); + // } + } + + luaL_error(L, "method 'fairygui::GSlider::changeOnClick' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_fairygui_GSlider_create(lua_State *L) { olua_startinvoke(L); @@ -19041,7 +20988,7 @@ static int _fairygui_GSlider_create(lua_State *L) return num_ret; } -static int _fairygui_GSlider_getMax(lua_State *L) +static int _olua_fun_fairygui_GSlider_getMax(lua_State *L) { olua_startinvoke(L); @@ -19058,7 +21005,7 @@ static int _fairygui_GSlider_getMax(lua_State *L) return num_ret; } -static int _fairygui_GSlider_getMin(lua_State *L) +static int _olua_fun_fairygui_GSlider_getMin(lua_State *L) { olua_startinvoke(L); @@ -19075,7 +21022,7 @@ static int _fairygui_GSlider_getMin(lua_State *L) return num_ret; } -static int _fairygui_GSlider_getTitleType(lua_State *L) +static int _olua_fun_fairygui_GSlider_getTitleType(lua_State *L) { olua_startinvoke(L); @@ -19092,7 +21039,7 @@ static int _fairygui_GSlider_getTitleType(lua_State *L) return num_ret; } -static int _fairygui_GSlider_getValue(lua_State *L) +static int _olua_fun_fairygui_GSlider_getValue(lua_State *L) { olua_startinvoke(L); @@ -19109,7 +21056,7 @@ static int _fairygui_GSlider_getValue(lua_State *L) return num_ret; } -static int _fairygui_GSlider_getWholeNumbers(lua_State *L) +static int _olua_fun_fairygui_GSlider_getWholeNumbers(lua_State *L) { olua_startinvoke(L); @@ -19126,11 +21073,11 @@ static int _fairygui_GSlider_getWholeNumbers(lua_State *L) return num_ret; } -static int _fairygui_GSlider_new(lua_State *L) +static int _olua_fun_fairygui_GSlider_new(lua_State *L) { olua_startinvoke(L); - // GSlider() + // fairygui::GSlider() fairygui::GSlider *ret = new fairygui::GSlider(); int num_ret = olua_push_object(L, ret, "fgui.GSlider"); olua_postnew(L, ret); @@ -19140,7 +21087,7 @@ static int _fairygui_GSlider_new(lua_State *L) return num_ret; } -static int _fairygui_GSlider_setMax(lua_State *L) +static int _olua_fun_fairygui_GSlider_setMax(lua_State *L) { olua_startinvoke(L); @@ -19158,7 +21105,7 @@ static int _fairygui_GSlider_setMax(lua_State *L) return 0; } -static int _fairygui_GSlider_setMin(lua_State *L) +static int _olua_fun_fairygui_GSlider_setMin(lua_State *L) { olua_startinvoke(L); @@ -19176,7 +21123,7 @@ static int _fairygui_GSlider_setMin(lua_State *L) return 0; } -static int _fairygui_GSlider_setTitleType(lua_State *L) +static int _olua_fun_fairygui_GSlider_setTitleType(lua_State *L) { olua_startinvoke(L); @@ -19194,7 +21141,7 @@ static int _fairygui_GSlider_setTitleType(lua_State *L) return 0; } -static int _fairygui_GSlider_setValue(lua_State *L) +static int _olua_fun_fairygui_GSlider_setValue(lua_State *L) { olua_startinvoke(L); @@ -19212,7 +21159,7 @@ static int _fairygui_GSlider_setValue(lua_State *L) return 0; } -static int _fairygui_GSlider_setWholeNumbers(lua_State *L) +static int _olua_fun_fairygui_GSlider_setWholeNumbers(lua_State *L) { olua_startinvoke(L); @@ -19230,105 +21177,44 @@ static int _fairygui_GSlider_setWholeNumbers(lua_State *L) return 0; } -static int _fairygui_GSlider_get_canDrag(lua_State *L) -{ - olua_startinvoke(L); - - fairygui::GSlider *self = nullptr; - - olua_to_object(L, 1, &self, "fgui.GSlider"); - - // bool canDrag - bool ret = self->canDrag; - int num_ret = olua_push_bool(L, ret); - - olua_endinvoke(L); - - return num_ret; -} - -static int _fairygui_GSlider_set_canDrag(lua_State *L) -{ - olua_startinvoke(L); - - fairygui::GSlider *self = nullptr; - bool arg1 = false; /** canDrag */ - - olua_to_object(L, 1, &self, "fgui.GSlider"); - olua_check_bool(L, 2, &arg1); - - // bool canDrag - self->canDrag = arg1; - - olua_endinvoke(L); - - return 0; -} - -static int _fairygui_GSlider_get_changeOnClick(lua_State *L) -{ - olua_startinvoke(L); - - fairygui::GSlider *self = nullptr; - - olua_to_object(L, 1, &self, "fgui.GSlider"); - - // bool changeOnClick - bool ret = self->changeOnClick; - int num_ret = olua_push_bool(L, ret); - - olua_endinvoke(L); - - return num_ret; -} - -static int _fairygui_GSlider_set_changeOnClick(lua_State *L) +static int _olua_cls_fgui_GSlider(lua_State *L) { - olua_startinvoke(L); - - fairygui::GSlider *self = nullptr; - bool arg1 = false; /** changeOnClick */ - - olua_to_object(L, 1, &self, "fgui.GSlider"); - olua_check_bool(L, 2, &arg1); - - // bool changeOnClick - self->changeOnClick = arg1; - - olua_endinvoke(L); + oluacls_class(L, "fgui.GSlider"); + oluacls_func(L, "create", _olua_fun_fairygui_GSlider_create); + oluacls_func(L, "getMax", _olua_fun_fairygui_GSlider_getMax); + oluacls_func(L, "getMin", _olua_fun_fairygui_GSlider_getMin); + oluacls_func(L, "getTitleType", _olua_fun_fairygui_GSlider_getTitleType); + oluacls_func(L, "getValue", _olua_fun_fairygui_GSlider_getValue); + oluacls_func(L, "getWholeNumbers", _olua_fun_fairygui_GSlider_getWholeNumbers); + oluacls_func(L, "new", _olua_fun_fairygui_GSlider_new); + oluacls_func(L, "setMax", _olua_fun_fairygui_GSlider_setMax); + oluacls_func(L, "setMin", _olua_fun_fairygui_GSlider_setMin); + oluacls_func(L, "setTitleType", _olua_fun_fairygui_GSlider_setTitleType); + oluacls_func(L, "setValue", _olua_fun_fairygui_GSlider_setValue); + oluacls_func(L, "setWholeNumbers", _olua_fun_fairygui_GSlider_setWholeNumbers); + oluacls_prop(L, "max", _olua_fun_fairygui_GSlider_getMax, _olua_fun_fairygui_GSlider_setMax); + oluacls_prop(L, "min", _olua_fun_fairygui_GSlider_getMin, _olua_fun_fairygui_GSlider_setMin); + oluacls_prop(L, "titleType", _olua_fun_fairygui_GSlider_getTitleType, _olua_fun_fairygui_GSlider_setTitleType); + oluacls_prop(L, "value", _olua_fun_fairygui_GSlider_getValue, _olua_fun_fairygui_GSlider_setValue); + oluacls_prop(L, "wholeNumbers", _olua_fun_fairygui_GSlider_getWholeNumbers, _olua_fun_fairygui_GSlider_setWholeNumbers); + oluacls_prop(L, "canDrag", _olua_fun_fairygui_GSlider_canDrag, _olua_fun_fairygui_GSlider_canDrag); + oluacls_prop(L, "changeOnClick", _olua_fun_fairygui_GSlider_changeOnClick, _olua_fun_fairygui_GSlider_changeOnClick); - return 0; + return 1; } OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_fairygui_GSlider(lua_State *L) +OLUA_LIB int luaopen_fgui_GSlider(lua_State *L) { - oluacls_class(L, "fgui.GSlider"); - oluacls_func(L, "create", _fairygui_GSlider_create); - oluacls_func(L, "getMax", _fairygui_GSlider_getMax); - oluacls_func(L, "getMin", _fairygui_GSlider_getMin); - oluacls_func(L, "getTitleType", _fairygui_GSlider_getTitleType); - oluacls_func(L, "getValue", _fairygui_GSlider_getValue); - oluacls_func(L, "getWholeNumbers", _fairygui_GSlider_getWholeNumbers); - oluacls_func(L, "new", _fairygui_GSlider_new); - oluacls_func(L, "setMax", _fairygui_GSlider_setMax); - oluacls_func(L, "setMin", _fairygui_GSlider_setMin); - oluacls_func(L, "setTitleType", _fairygui_GSlider_setTitleType); - oluacls_func(L, "setValue", _fairygui_GSlider_setValue); - oluacls_func(L, "setWholeNumbers", _fairygui_GSlider_setWholeNumbers); - oluacls_prop(L, "max", _fairygui_GSlider_getMax, _fairygui_GSlider_setMax); - oluacls_prop(L, "min", _fairygui_GSlider_getMin, _fairygui_GSlider_setMin); - oluacls_prop(L, "titleType", _fairygui_GSlider_getTitleType, _fairygui_GSlider_setTitleType); - oluacls_prop(L, "value", _fairygui_GSlider_getValue, _fairygui_GSlider_setValue); - oluacls_prop(L, "wholeNumbers", _fairygui_GSlider_getWholeNumbers, _fairygui_GSlider_setWholeNumbers); - oluacls_prop(L, "canDrag", _fairygui_GSlider_get_canDrag, _fairygui_GSlider_set_canDrag); - oluacls_prop(L, "changeOnClick", _fairygui_GSlider_get_changeOnClick, _fairygui_GSlider_set_changeOnClick); - + olua_require(L, "fairygui", luaopen_fairygui); + if (!olua_getclass(L, "fgui.GSlider")) { + luaL_error(L, "class not found: fairygui::GSlider"); + } return 1; } OLUA_END_DECLS -static int _fairygui_GTextInput_create(lua_State *L) +static int _olua_fun_fairygui_GTextInput_create(lua_State *L) { olua_startinvoke(L); @@ -19341,11 +21227,11 @@ static int _fairygui_GTextInput_create(lua_State *L) return num_ret; } -static int _fairygui_GTextInput_new(lua_State *L) +static int _olua_fun_fairygui_GTextInput_new(lua_State *L) { olua_startinvoke(L); - // GTextInput() + // fairygui::GTextInput() fairygui::GTextInput *ret = new fairygui::GTextInput(); int num_ret = olua_push_object(L, ret, "fgui.GTextInput"); olua_postnew(L, ret); @@ -19355,7 +21241,7 @@ static int _fairygui_GTextInput_new(lua_State *L) return num_ret; } -static int _fairygui_GTextInput_setKeyboardType(lua_State *L) +static int _olua_fun_fairygui_GTextInput_setKeyboardType(lua_State *L) { olua_startinvoke(L); @@ -19373,7 +21259,7 @@ static int _fairygui_GTextInput_setKeyboardType(lua_State *L) return 0; } -static int _fairygui_GTextInput_setMaxLength(lua_State *L) +static int _olua_fun_fairygui_GTextInput_setMaxLength(lua_State *L) { olua_startinvoke(L); @@ -19391,7 +21277,7 @@ static int _fairygui_GTextInput_setMaxLength(lua_State *L) return 0; } -static int _fairygui_GTextInput_setPassword(lua_State *L) +static int _olua_fun_fairygui_GTextInput_setPassword(lua_State *L) { olua_startinvoke(L); @@ -19409,7 +21295,7 @@ static int _fairygui_GTextInput_setPassword(lua_State *L) return 0; } -static int _fairygui_GTextInput_setPrompt(lua_State *L) +static int _olua_fun_fairygui_GTextInput_setPrompt(lua_State *L) { olua_startinvoke(L); @@ -19427,7 +21313,7 @@ static int _fairygui_GTextInput_setPrompt(lua_State *L) return 0; } -static int _fairygui_GTextInput_setRestrict(lua_State *L) +static int _olua_fun_fairygui_GTextInput_setRestrict(lua_State *L) { olua_startinvoke(L); @@ -19445,23 +21331,32 @@ static int _fairygui_GTextInput_setRestrict(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_fairygui_GTextInput(lua_State *L) +static int _olua_cls_fgui_GTextInput(lua_State *L) { oluacls_class(L, "fgui.GTextInput"); - oluacls_func(L, "create", _fairygui_GTextInput_create); - oluacls_func(L, "new", _fairygui_GTextInput_new); - oluacls_func(L, "setKeyboardType", _fairygui_GTextInput_setKeyboardType); - oluacls_func(L, "setMaxLength", _fairygui_GTextInput_setMaxLength); - oluacls_func(L, "setPassword", _fairygui_GTextInput_setPassword); - oluacls_func(L, "setPrompt", _fairygui_GTextInput_setPrompt); - oluacls_func(L, "setRestrict", _fairygui_GTextInput_setRestrict); + oluacls_func(L, "create", _olua_fun_fairygui_GTextInput_create); + oluacls_func(L, "new", _olua_fun_fairygui_GTextInput_new); + oluacls_func(L, "setKeyboardType", _olua_fun_fairygui_GTextInput_setKeyboardType); + oluacls_func(L, "setMaxLength", _olua_fun_fairygui_GTextInput_setMaxLength); + oluacls_func(L, "setPassword", _olua_fun_fairygui_GTextInput_setPassword); + oluacls_func(L, "setPrompt", _olua_fun_fairygui_GTextInput_setPrompt); + oluacls_func(L, "setRestrict", _olua_fun_fairygui_GTextInput_setRestrict); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_fgui_GTextInput(lua_State *L) +{ + olua_require(L, "fairygui", luaopen_fairygui); + if (!olua_getclass(L, "fgui.GTextInput")) { + luaL_error(L, "class not found: fairygui::GTextInput"); + } return 1; } OLUA_END_DECLS -static int _fairygui_PopupMenu_addItem(lua_State *L) +static int _olua_fun_fairygui_PopupMenu_addItem(lua_State *L) { olua_startinvoke(L); @@ -19479,9 +21374,10 @@ static int _fairygui_PopupMenu_addItem(lua_State *L) void *cb_store = (void *)olua_newobjstub(L, "fgui.GButton"); std::string cb_tag = makeListenerTag(L, fairygui::UIEventType::ClickMenu, 0); - std::string cb_name = olua_setcallback(L, cb_store, 3, cb_tag.c_str(), OLUA_TAG_REPLACE); + std::string cb_name = olua_setcallback(L, cb_store, 3, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg2 = [cb_store, cb_name, cb_ctx](fairygui::EventContext *arg1) { + // lua_State *ML = olua_mainthread(L); + arg2 = [cb_store, cb_name, cb_ctx /*, ML */](fairygui::EventContext *cb_arg1) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); @@ -19489,7 +21385,7 @@ static int _fairygui_PopupMenu_addItem(lua_State *L) int top = lua_gettop(L); size_t last = olua_push_objpool(L); olua_enable_objpool(L); - olua_push_object(L, arg1, "fgui.EventContext"); + olua_push_object(L, cb_arg1, "fgui.EventContext"); olua_disable_objpool(L); olua_callback(L, cb_store, cb_name.c_str(), 1); @@ -19500,7 +21396,7 @@ static int _fairygui_PopupMenu_addItem(lua_State *L) } }; - // @addref(children | parent) fairygui::GButton *addItem(const std::string &caption, @localvar fairygui::EventCallback callback) + // @addref(children | parent) fairygui::GButton *addItem(const std::string &caption, fairygui::EventCallback callback) fairygui::GButton *ret = self->addItem(arg1, arg2); if (olua_pushobjstub(L, ret, cb_store, "fgui.GButton") == OLUA_OBJ_EXIST) { olua_removecallback(L, cb_store, cb_tag.c_str(), OLUA_TAG_EQUAL); @@ -19519,7 +21415,7 @@ static int _fairygui_PopupMenu_addItem(lua_State *L) return 1; } -static int _fairygui_PopupMenu_addItemAt(lua_State *L) +static int _olua_fun_fairygui_PopupMenu_addItemAt(lua_State *L) { olua_startinvoke(L); @@ -19539,9 +21435,10 @@ static int _fairygui_PopupMenu_addItemAt(lua_State *L) void *cb_store = (void *)olua_newobjstub(L, "fgui.GButton"); std::string cb_tag = makeListenerTag(L, fairygui::UIEventType::ClickMenu, 0); - std::string cb_name = olua_setcallback(L, cb_store, 4, cb_tag.c_str(), OLUA_TAG_REPLACE); + std::string cb_name = olua_setcallback(L, cb_store, 4, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg3 = [cb_store, cb_name, cb_ctx](fairygui::EventContext *arg1) { + // lua_State *ML = olua_mainthread(L); + arg3 = [cb_store, cb_name, cb_ctx /*, ML */](fairygui::EventContext *cb_arg1) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); @@ -19549,7 +21446,7 @@ static int _fairygui_PopupMenu_addItemAt(lua_State *L) int top = lua_gettop(L); size_t last = olua_push_objpool(L); olua_enable_objpool(L); - olua_push_object(L, arg1, "fgui.EventContext"); + olua_push_object(L, cb_arg1, "fgui.EventContext"); olua_disable_objpool(L); olua_callback(L, cb_store, cb_name.c_str(), 1); @@ -19560,7 +21457,7 @@ static int _fairygui_PopupMenu_addItemAt(lua_State *L) } }; - // @addref(children | parent) fairygui::GButton *addItemAt(const std::string &caption, int index, @localvar fairygui::EventCallback callback) + // @addref(children | parent) fairygui::GButton *addItemAt(const std::string &caption, int index, fairygui::EventCallback callback) fairygui::GButton *ret = self->addItemAt(arg1, arg2, arg3); if (olua_pushobjstub(L, ret, cb_store, "fgui.GButton") == OLUA_OBJ_EXIST) { olua_removecallback(L, cb_store, cb_tag.c_str(), OLUA_TAG_EQUAL); @@ -19579,7 +21476,7 @@ static int _fairygui_PopupMenu_addItemAt(lua_State *L) return 1; } -static int _fairygui_PopupMenu_addSeperator(lua_State *L) +static int _olua_fun_fairygui_PopupMenu_addSeperator(lua_State *L) { olua_startinvoke(L); @@ -19595,7 +21492,7 @@ static int _fairygui_PopupMenu_addSeperator(lua_State *L) return 0; } -static int _fairygui_PopupMenu_clearItems(lua_State *L) +static int _olua_fun_fairygui_PopupMenu_clearItems(lua_State *L) { olua_startinvoke(L); @@ -19619,7 +21516,7 @@ static int _fairygui_PopupMenu_clearItems(lua_State *L) return 0; } -static int _fairygui_PopupMenu_create$1(lua_State *L) +static int _olua_fun_fairygui_PopupMenu_create$1(lua_State *L) { olua_startinvoke(L); @@ -19636,7 +21533,7 @@ static int _fairygui_PopupMenu_create$1(lua_State *L) return num_ret; } -static int _fairygui_PopupMenu_create$2(lua_State *L) +static int _olua_fun_fairygui_PopupMenu_create$2(lua_State *L) { olua_startinvoke(L); @@ -19649,19 +21546,19 @@ static int _fairygui_PopupMenu_create$2(lua_State *L) return num_ret; } -static int _fairygui_PopupMenu_create(lua_State *L) +static int _olua_fun_fairygui_PopupMenu_create(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 0) { // static fairygui::PopupMenu *create() - return _fairygui_PopupMenu_create$2(L); + return _olua_fun_fairygui_PopupMenu_create$2(L); } if (num_args == 1) { // if ((olua_is_string(L, 1))) { // static fairygui::PopupMenu *create(const std::string &resourceURL) - return _fairygui_PopupMenu_create$1(L); + return _olua_fun_fairygui_PopupMenu_create$1(L); // } } @@ -19670,7 +21567,7 @@ static int _fairygui_PopupMenu_create(lua_State *L) return 0; } -static int _fairygui_PopupMenu_getContentPane(lua_State *L) +static int _olua_fun_fairygui_PopupMenu_getContentPane(lua_State *L) { olua_startinvoke(L); @@ -19690,7 +21587,7 @@ static int _fairygui_PopupMenu_getContentPane(lua_State *L) return num_ret; } -static int _fairygui_PopupMenu_getItemCount(lua_State *L) +static int _olua_fun_fairygui_PopupMenu_getItemCount(lua_State *L) { olua_startinvoke(L); @@ -19707,7 +21604,7 @@ static int _fairygui_PopupMenu_getItemCount(lua_State *L) return num_ret; } -static int _fairygui_PopupMenu_getItemName(lua_State *L) +static int _olua_fun_fairygui_PopupMenu_getItemName(lua_State *L) { olua_startinvoke(L); @@ -19726,7 +21623,7 @@ static int _fairygui_PopupMenu_getItemName(lua_State *L) return num_ret; } -static int _fairygui_PopupMenu_getList(lua_State *L) +static int _olua_fun_fairygui_PopupMenu_getList(lua_State *L) { olua_startinvoke(L); @@ -19746,7 +21643,7 @@ static int _fairygui_PopupMenu_getList(lua_State *L) return num_ret; } -static int _fairygui_PopupMenu_isItemChecked(lua_State *L) +static int _olua_fun_fairygui_PopupMenu_isItemChecked(lua_State *L) { olua_startinvoke(L); @@ -19765,11 +21662,11 @@ static int _fairygui_PopupMenu_isItemChecked(lua_State *L) return num_ret; } -static int _fairygui_PopupMenu_new(lua_State *L) +static int _olua_fun_fairygui_PopupMenu_new(lua_State *L) { olua_startinvoke(L); - // PopupMenu() + // fairygui::PopupMenu() fairygui::PopupMenu *ret = new fairygui::PopupMenu(); int num_ret = olua_push_object(L, ret, "fgui.PopupMenu"); olua_postnew(L, ret); @@ -19779,7 +21676,7 @@ static int _fairygui_PopupMenu_new(lua_State *L) return num_ret; } -static int _fairygui_PopupMenu_removeItem(lua_State *L) +static int _olua_fun_fairygui_PopupMenu_removeItem(lua_State *L) { olua_startinvoke(L); @@ -19806,7 +21703,7 @@ static int _fairygui_PopupMenu_removeItem(lua_State *L) return num_ret; } -static int _fairygui_PopupMenu_setItemCheckable(lua_State *L) +static int _olua_fun_fairygui_PopupMenu_setItemCheckable(lua_State *L) { olua_startinvoke(L); @@ -19826,7 +21723,7 @@ static int _fairygui_PopupMenu_setItemCheckable(lua_State *L) return 0; } -static int _fairygui_PopupMenu_setItemChecked(lua_State *L) +static int _olua_fun_fairygui_PopupMenu_setItemChecked(lua_State *L) { olua_startinvoke(L); @@ -19846,7 +21743,7 @@ static int _fairygui_PopupMenu_setItemChecked(lua_State *L) return 0; } -static int _fairygui_PopupMenu_setItemGrayed(lua_State *L) +static int _olua_fun_fairygui_PopupMenu_setItemGrayed(lua_State *L) { olua_startinvoke(L); @@ -19866,7 +21763,7 @@ static int _fairygui_PopupMenu_setItemGrayed(lua_State *L) return 0; } -static int _fairygui_PopupMenu_setItemText(lua_State *L) +static int _olua_fun_fairygui_PopupMenu_setItemText(lua_State *L) { olua_startinvoke(L); @@ -19886,7 +21783,7 @@ static int _fairygui_PopupMenu_setItemText(lua_State *L) return 0; } -static int _fairygui_PopupMenu_setItemVisible(lua_State *L) +static int _olua_fun_fairygui_PopupMenu_setItemVisible(lua_State *L) { olua_startinvoke(L); @@ -19906,7 +21803,7 @@ static int _fairygui_PopupMenu_setItemVisible(lua_State *L) return 0; } -static int _fairygui_PopupMenu_show$1(lua_State *L) +static int _olua_fun_fairygui_PopupMenu_show$1(lua_State *L) { olua_startinvoke(L); @@ -19927,7 +21824,7 @@ static int _fairygui_PopupMenu_show$1(lua_State *L) int parent = lua_gettop(L); olua_startcmpref(L, parent, "children"); - // @delref(children ~ parent)@addref(children | parent) void show() + // @delref(children ~ parent) @addref(children | parent) void show() self->show(); // insert code after call @@ -19939,7 +21836,7 @@ static int _fairygui_PopupMenu_show$1(lua_State *L) return 0; } -static int _fairygui_PopupMenu_show$2(lua_State *L) +static int _olua_fun_fairygui_PopupMenu_show$2(lua_State *L) { olua_startinvoke(L); @@ -19964,7 +21861,7 @@ static int _fairygui_PopupMenu_show$2(lua_State *L) int parent = lua_gettop(L); olua_startcmpref(L, parent, "children"); - // @delref(children ~ parent)@addref(children | parent) void show(fairygui::GObject *target, fairygui::PopupDirection dir) + // @delref(children ~ parent) @addref(children | parent) void show(fairygui::GObject *target, fairygui::PopupDirection dir) self->show(arg1, arg2); // insert code after call @@ -19976,19 +21873,19 @@ static int _fairygui_PopupMenu_show$2(lua_State *L) return 0; } -static int _fairygui_PopupMenu_show(lua_State *L) +static int _olua_fun_fairygui_PopupMenu_show(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 0) { - // @delref(children ~ parent)@addref(children | parent) void show() - return _fairygui_PopupMenu_show$1(L); + // @delref(children ~ parent) @addref(children | parent) void show() + return _olua_fun_fairygui_PopupMenu_show$1(L); } if (num_args == 2) { // if ((olua_is_object(L, 2, "fgui.GObject")) && (olua_is_enum(L, 3))) { - // @delref(children ~ parent)@addref(children | parent) void show(fairygui::GObject *target, fairygui::PopupDirection dir) - return _fairygui_PopupMenu_show$2(L); + // @delref(children ~ parent) @addref(children | parent) void show(fairygui::GObject *target, fairygui::PopupDirection dir) + return _olua_fun_fairygui_PopupMenu_show$2(L); // } } @@ -19997,37 +21894,46 @@ static int _fairygui_PopupMenu_show(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_fairygui_PopupMenu(lua_State *L) +static int _olua_cls_fgui_PopupMenu(lua_State *L) { oluacls_class(L, "fgui.PopupMenu"); - oluacls_func(L, "addItem", _fairygui_PopupMenu_addItem); - oluacls_func(L, "addItemAt", _fairygui_PopupMenu_addItemAt); - oluacls_func(L, "addSeperator", _fairygui_PopupMenu_addSeperator); - oluacls_func(L, "clearItems", _fairygui_PopupMenu_clearItems); - oluacls_func(L, "create", _fairygui_PopupMenu_create); - oluacls_func(L, "getContentPane", _fairygui_PopupMenu_getContentPane); - oluacls_func(L, "getItemCount", _fairygui_PopupMenu_getItemCount); - oluacls_func(L, "getItemName", _fairygui_PopupMenu_getItemName); - oluacls_func(L, "getList", _fairygui_PopupMenu_getList); - oluacls_func(L, "isItemChecked", _fairygui_PopupMenu_isItemChecked); - oluacls_func(L, "new", _fairygui_PopupMenu_new); - oluacls_func(L, "removeItem", _fairygui_PopupMenu_removeItem); - oluacls_func(L, "setItemCheckable", _fairygui_PopupMenu_setItemCheckable); - oluacls_func(L, "setItemChecked", _fairygui_PopupMenu_setItemChecked); - oluacls_func(L, "setItemGrayed", _fairygui_PopupMenu_setItemGrayed); - oluacls_func(L, "setItemText", _fairygui_PopupMenu_setItemText); - oluacls_func(L, "setItemVisible", _fairygui_PopupMenu_setItemVisible); - oluacls_func(L, "show", _fairygui_PopupMenu_show); - oluacls_prop(L, "contentPane", _fairygui_PopupMenu_getContentPane, nullptr); - oluacls_prop(L, "itemCount", _fairygui_PopupMenu_getItemCount, nullptr); - oluacls_prop(L, "list", _fairygui_PopupMenu_getList, nullptr); + oluacls_func(L, "addItem", _olua_fun_fairygui_PopupMenu_addItem); + oluacls_func(L, "addItemAt", _olua_fun_fairygui_PopupMenu_addItemAt); + oluacls_func(L, "addSeperator", _olua_fun_fairygui_PopupMenu_addSeperator); + oluacls_func(L, "clearItems", _olua_fun_fairygui_PopupMenu_clearItems); + oluacls_func(L, "create", _olua_fun_fairygui_PopupMenu_create); + oluacls_func(L, "getContentPane", _olua_fun_fairygui_PopupMenu_getContentPane); + oluacls_func(L, "getItemCount", _olua_fun_fairygui_PopupMenu_getItemCount); + oluacls_func(L, "getItemName", _olua_fun_fairygui_PopupMenu_getItemName); + oluacls_func(L, "getList", _olua_fun_fairygui_PopupMenu_getList); + oluacls_func(L, "isItemChecked", _olua_fun_fairygui_PopupMenu_isItemChecked); + oluacls_func(L, "new", _olua_fun_fairygui_PopupMenu_new); + oluacls_func(L, "removeItem", _olua_fun_fairygui_PopupMenu_removeItem); + oluacls_func(L, "setItemCheckable", _olua_fun_fairygui_PopupMenu_setItemCheckable); + oluacls_func(L, "setItemChecked", _olua_fun_fairygui_PopupMenu_setItemChecked); + oluacls_func(L, "setItemGrayed", _olua_fun_fairygui_PopupMenu_setItemGrayed); + oluacls_func(L, "setItemText", _olua_fun_fairygui_PopupMenu_setItemText); + oluacls_func(L, "setItemVisible", _olua_fun_fairygui_PopupMenu_setItemVisible); + oluacls_func(L, "show", _olua_fun_fairygui_PopupMenu_show); + oluacls_prop(L, "contentPane", _olua_fun_fairygui_PopupMenu_getContentPane, nullptr); + oluacls_prop(L, "itemCount", _olua_fun_fairygui_PopupMenu_getItemCount, nullptr); + oluacls_prop(L, "list", _olua_fun_fairygui_PopupMenu_getList, nullptr); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_fgui_PopupMenu(lua_State *L) +{ + olua_require(L, "fairygui", luaopen_fairygui); + if (!olua_getclass(L, "fgui.PopupMenu")) { + luaL_error(L, "class not found: fairygui::PopupMenu"); + } return 1; } OLUA_END_DECLS -static int _fairygui_Relations___gc(lua_State *L) +static int _olua_fun_fairygui_Relations___gc(lua_State *L) { olua_startinvoke(L); @@ -20039,7 +21945,7 @@ static int _fairygui_Relations___gc(lua_State *L) return 0; } -static int _fairygui_Relations___olua_move(lua_State *L) +static int _olua_fun_fairygui_Relations___olua_move(lua_State *L) { olua_startinvoke(L); @@ -20051,7 +21957,7 @@ static int _fairygui_Relations___olua_move(lua_State *L) return 1; } -static int _fairygui_Relations_add$1(lua_State *L) +static int _olua_fun_fairygui_Relations_add$1(lua_State *L) { olua_startinvoke(L); @@ -20071,7 +21977,7 @@ static int _fairygui_Relations_add$1(lua_State *L) return 0; } -static int _fairygui_Relations_add$2(lua_State *L) +static int _olua_fun_fairygui_Relations_add$2(lua_State *L) { olua_startinvoke(L); @@ -20093,21 +21999,21 @@ static int _fairygui_Relations_add$2(lua_State *L) return 0; } -static int _fairygui_Relations_add(lua_State *L) +static int _olua_fun_fairygui_Relations_add(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 2) { // if ((olua_is_object(L, 2, "fgui.GObject")) && (olua_is_enum(L, 3))) { // void add(fairygui::GObject *target, fairygui::RelationType relationType) - return _fairygui_Relations_add$1(L); + return _olua_fun_fairygui_Relations_add$1(L); // } } if (num_args == 3) { // if ((olua_is_object(L, 2, "fgui.GObject")) && (olua_is_enum(L, 3)) && (olua_is_bool(L, 4))) { // void add(fairygui::GObject *target, fairygui::RelationType relationType, bool usePercent) - return _fairygui_Relations_add$2(L); + return _olua_fun_fairygui_Relations_add$2(L); // } } @@ -20116,7 +22022,7 @@ static int _fairygui_Relations_add(lua_State *L) return 0; } -static int _fairygui_Relations_clearAll(lua_State *L) +static int _olua_fun_fairygui_Relations_clearAll(lua_State *L) { olua_startinvoke(L); @@ -20132,7 +22038,7 @@ static int _fairygui_Relations_clearAll(lua_State *L) return 0; } -static int _fairygui_Relations_clearFor(lua_State *L) +static int _olua_fun_fairygui_Relations_clearFor(lua_State *L) { olua_startinvoke(L); @@ -20150,7 +22056,7 @@ static int _fairygui_Relations_clearFor(lua_State *L) return 0; } -static int _fairygui_Relations_contains(lua_State *L) +static int _olua_fun_fairygui_Relations_contains(lua_State *L) { olua_startinvoke(L); @@ -20169,7 +22075,7 @@ static int _fairygui_Relations_contains(lua_State *L) return num_ret; } -static int _fairygui_Relations_copyFrom(lua_State *L) +static int _olua_fun_fairygui_Relations_copyFrom(lua_State *L) { olua_startinvoke(L); @@ -20182,7 +22088,63 @@ static int _fairygui_Relations_copyFrom(lua_State *L) return 0; } -static int _fairygui_Relations_isEmpty(lua_State *L) +static int _olua_fun_fairygui_Relations_handling$1(lua_State *L) +{ + olua_startinvoke(L); + + fairygui::Relations *self = nullptr; + + olua_to_object(L, 1, &self, "fgui.Relations"); + + // fairygui::GObject *handling + fairygui::GObject *ret = self->handling; + int num_ret = olua_push_object(L, ret, "fgui.GObject"); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_fairygui_Relations_handling$2(lua_State *L) +{ + olua_startinvoke(L); + + fairygui::Relations *self = nullptr; + fairygui::GObject *arg1 = nullptr; /** handling */ + + olua_to_object(L, 1, &self, "fgui.Relations"); + olua_check_object(L, 2, &arg1, "fgui.GObject"); + + // fairygui::GObject *handling + self->handling = arg1; + + olua_endinvoke(L); + + return 0; +} + +static int _olua_fun_fairygui_Relations_handling(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // fairygui::GObject *handling + return _olua_fun_fairygui_Relations_handling$1(L); + } + + if (num_args == 1) { + // if ((olua_is_object(L, 2, "fgui.GObject"))) { + // fairygui::GObject *handling + return _olua_fun_fairygui_Relations_handling$2(L); + // } + } + + luaL_error(L, "method 'fairygui::Relations::handling' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_fairygui_Relations_isEmpty(lua_State *L) { olua_startinvoke(L); @@ -20199,7 +22161,7 @@ static int _fairygui_Relations_isEmpty(lua_State *L) return num_ret; } -static int _fairygui_Relations_new(lua_State *L) +static int _olua_fun_fairygui_Relations_new(lua_State *L) { olua_startinvoke(L); @@ -20207,7 +22169,7 @@ static int _fairygui_Relations_new(lua_State *L) olua_check_object(L, 1, &arg1, "fgui.GObject"); - // Relations(fairygui::GObject *owner) + // fairygui::Relations(fairygui::GObject *owner) fairygui::Relations *ret = new fairygui::Relations(arg1); int num_ret = olua_push_object(L, ret, "fgui.Relations"); olua_postnew(L, ret); @@ -20217,7 +22179,7 @@ static int _fairygui_Relations_new(lua_State *L) return num_ret; } -static int _fairygui_Relations_onOwnerSizeChanged(lua_State *L) +static int _olua_fun_fairygui_Relations_onOwnerSizeChanged(lua_State *L) { olua_startinvoke(L); @@ -20239,7 +22201,7 @@ static int _fairygui_Relations_onOwnerSizeChanged(lua_State *L) return 0; } -static int _fairygui_Relations_remove(lua_State *L) +static int _olua_fun_fairygui_Relations_remove(lua_State *L) { olua_startinvoke(L); @@ -20259,65 +22221,38 @@ static int _fairygui_Relations_remove(lua_State *L) return 0; } -static int _fairygui_Relations_get_handling(lua_State *L) +static int _olua_cls_fgui_Relations(lua_State *L) { - olua_startinvoke(L); - - fairygui::Relations *self = nullptr; - - olua_to_object(L, 1, &self, "fgui.Relations"); - - // fairygui::GObject *handling - fairygui::GObject *ret = self->handling; - int num_ret = olua_push_object(L, ret, "fgui.GObject"); - - olua_endinvoke(L); - - return num_ret; -} - -static int _fairygui_Relations_set_handling(lua_State *L) -{ - olua_startinvoke(L); - - fairygui::Relations *self = nullptr; - fairygui::GObject *arg1 = nullptr; /** handling */ - - olua_to_object(L, 1, &self, "fgui.Relations"); - olua_check_object(L, 2, &arg1, "fgui.GObject"); - - // fairygui::GObject *handling - self->handling = arg1; - - olua_endinvoke(L); + oluacls_class(L, "fgui.Relations"); + oluacls_func(L, "__gc", _olua_fun_fairygui_Relations___gc); + oluacls_func(L, "__olua_move", _olua_fun_fairygui_Relations___olua_move); + oluacls_func(L, "add", _olua_fun_fairygui_Relations_add); + oluacls_func(L, "clearAll", _olua_fun_fairygui_Relations_clearAll); + oluacls_func(L, "clearFor", _olua_fun_fairygui_Relations_clearFor); + oluacls_func(L, "contains", _olua_fun_fairygui_Relations_contains); + oluacls_func(L, "copyFrom", _olua_fun_fairygui_Relations_copyFrom); + oluacls_func(L, "isEmpty", _olua_fun_fairygui_Relations_isEmpty); + oluacls_func(L, "new", _olua_fun_fairygui_Relations_new); + oluacls_func(L, "onOwnerSizeChanged", _olua_fun_fairygui_Relations_onOwnerSizeChanged); + oluacls_func(L, "remove", _olua_fun_fairygui_Relations_remove); + oluacls_prop(L, "empty", _olua_fun_fairygui_Relations_isEmpty, nullptr); + oluacls_prop(L, "handling", _olua_fun_fairygui_Relations_handling, _olua_fun_fairygui_Relations_handling); - return 0; + return 1; } OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_fairygui_Relations(lua_State *L) +OLUA_LIB int luaopen_fgui_Relations(lua_State *L) { - oluacls_class(L, "fgui.Relations"); - oluacls_func(L, "__gc", _fairygui_Relations___gc); - oluacls_func(L, "__olua_move", _fairygui_Relations___olua_move); - oluacls_func(L, "add", _fairygui_Relations_add); - oluacls_func(L, "clearAll", _fairygui_Relations_clearAll); - oluacls_func(L, "clearFor", _fairygui_Relations_clearFor); - oluacls_func(L, "contains", _fairygui_Relations_contains); - oluacls_func(L, "copyFrom", _fairygui_Relations_copyFrom); - oluacls_func(L, "isEmpty", _fairygui_Relations_isEmpty); - oluacls_func(L, "new", _fairygui_Relations_new); - oluacls_func(L, "onOwnerSizeChanged", _fairygui_Relations_onOwnerSizeChanged); - oluacls_func(L, "remove", _fairygui_Relations_remove); - oluacls_prop(L, "empty", _fairygui_Relations_isEmpty, nullptr); - oluacls_prop(L, "handling", _fairygui_Relations_get_handling, _fairygui_Relations_set_handling); - + olua_require(L, "fairygui", luaopen_fairygui); + if (!olua_getclass(L, "fgui.Relations")) { + luaL_error(L, "class not found: fairygui::Relations"); + } return 1; } OLUA_END_DECLS -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_fairygui_RelationType(lua_State *L) +static int _olua_cls_fgui_RelationType(lua_State *L) { oluacls_class(L, "fgui.RelationType"); oluacls_func(L, "__index", olua_indexerror); @@ -20350,9 +22285,19 @@ OLUA_LIB int luaopen_fairygui_RelationType(lua_State *L) return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_fgui_RelationType(lua_State *L) +{ + olua_require(L, "fairygui", luaopen_fairygui); + if (!olua_getclass(L, "fgui.RelationType")) { + luaL_error(L, "class not found: fairygui::RelationType"); + } + return 1; +} OLUA_END_DECLS -static int _fairygui_RelationItem___gc(lua_State *L) +static int _olua_fun_fairygui_RelationItem___gc(lua_State *L) { olua_startinvoke(L); @@ -20364,7 +22309,7 @@ static int _fairygui_RelationItem___gc(lua_State *L) return 0; } -static int _fairygui_RelationItem___olua_move(lua_State *L) +static int _olua_fun_fairygui_RelationItem___olua_move(lua_State *L) { olua_startinvoke(L); @@ -20376,7 +22321,7 @@ static int _fairygui_RelationItem___olua_move(lua_State *L) return 1; } -static int _fairygui_RelationItem_add(lua_State *L) +static int _olua_fun_fairygui_RelationItem_add(lua_State *L) { olua_startinvoke(L); @@ -20396,7 +22341,7 @@ static int _fairygui_RelationItem_add(lua_State *L) return 0; } -static int _fairygui_RelationItem_applyOnSelfSizeChanged(lua_State *L) +static int _olua_fun_fairygui_RelationItem_applyOnSelfSizeChanged(lua_State *L) { olua_startinvoke(L); @@ -20418,7 +22363,7 @@ static int _fairygui_RelationItem_applyOnSelfSizeChanged(lua_State *L) return 0; } -static int _fairygui_RelationItem_copyFrom(lua_State *L) +static int _olua_fun_fairygui_RelationItem_copyFrom(lua_State *L) { olua_startinvoke(L); @@ -20431,7 +22376,7 @@ static int _fairygui_RelationItem_copyFrom(lua_State *L) return 0; } -static int _fairygui_RelationItem_getTarget(lua_State *L) +static int _olua_fun_fairygui_RelationItem_getTarget(lua_State *L) { olua_startinvoke(L); @@ -20451,7 +22396,7 @@ static int _fairygui_RelationItem_getTarget(lua_State *L) return num_ret; } -static int _fairygui_RelationItem_internalAdd(lua_State *L) +static int _olua_fun_fairygui_RelationItem_internalAdd(lua_State *L) { olua_startinvoke(L); @@ -20471,7 +22416,7 @@ static int _fairygui_RelationItem_internalAdd(lua_State *L) return 0; } -static int _fairygui_RelationItem_isEmpty(lua_State *L) +static int _olua_fun_fairygui_RelationItem_isEmpty(lua_State *L) { olua_startinvoke(L); @@ -20488,7 +22433,7 @@ static int _fairygui_RelationItem_isEmpty(lua_State *L) return num_ret; } -static int _fairygui_RelationItem_new(lua_State *L) +static int _olua_fun_fairygui_RelationItem_new(lua_State *L) { olua_startinvoke(L); @@ -20496,7 +22441,7 @@ static int _fairygui_RelationItem_new(lua_State *L) olua_check_object(L, 1, &arg1, "fgui.GObject"); - // RelationItem(fairygui::GObject *owner) + // fairygui::RelationItem(fairygui::GObject *owner) fairygui::RelationItem *ret = new fairygui::RelationItem(arg1); int num_ret = olua_push_object(L, ret, "fgui.RelationItem"); olua_postnew(L, ret); @@ -20506,7 +22451,7 @@ static int _fairygui_RelationItem_new(lua_State *L) return num_ret; } -static int _fairygui_RelationItem_remove(lua_State *L) +static int _olua_fun_fairygui_RelationItem_remove(lua_State *L) { olua_startinvoke(L); @@ -20524,7 +22469,7 @@ static int _fairygui_RelationItem_remove(lua_State *L) return 0; } -static int _fairygui_RelationItem_setTarget(lua_State *L) +static int _olua_fun_fairygui_RelationItem_setTarget(lua_State *L) { olua_startinvoke(L); @@ -20545,29 +22490,38 @@ static int _fairygui_RelationItem_setTarget(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_fairygui_RelationItem(lua_State *L) +static int _olua_cls_fgui_RelationItem(lua_State *L) { oluacls_class(L, "fgui.RelationItem"); - oluacls_func(L, "__gc", _fairygui_RelationItem___gc); - oluacls_func(L, "__olua_move", _fairygui_RelationItem___olua_move); - oluacls_func(L, "add", _fairygui_RelationItem_add); - oluacls_func(L, "applyOnSelfSizeChanged", _fairygui_RelationItem_applyOnSelfSizeChanged); - oluacls_func(L, "copyFrom", _fairygui_RelationItem_copyFrom); - oluacls_func(L, "getTarget", _fairygui_RelationItem_getTarget); - oluacls_func(L, "internalAdd", _fairygui_RelationItem_internalAdd); - oluacls_func(L, "isEmpty", _fairygui_RelationItem_isEmpty); - oluacls_func(L, "new", _fairygui_RelationItem_new); - oluacls_func(L, "remove", _fairygui_RelationItem_remove); - oluacls_func(L, "setTarget", _fairygui_RelationItem_setTarget); - oluacls_prop(L, "empty", _fairygui_RelationItem_isEmpty, nullptr); - oluacls_prop(L, "target", _fairygui_RelationItem_getTarget, _fairygui_RelationItem_setTarget); + oluacls_func(L, "__gc", _olua_fun_fairygui_RelationItem___gc); + oluacls_func(L, "__olua_move", _olua_fun_fairygui_RelationItem___olua_move); + oluacls_func(L, "add", _olua_fun_fairygui_RelationItem_add); + oluacls_func(L, "applyOnSelfSizeChanged", _olua_fun_fairygui_RelationItem_applyOnSelfSizeChanged); + oluacls_func(L, "copyFrom", _olua_fun_fairygui_RelationItem_copyFrom); + oluacls_func(L, "getTarget", _olua_fun_fairygui_RelationItem_getTarget); + oluacls_func(L, "internalAdd", _olua_fun_fairygui_RelationItem_internalAdd); + oluacls_func(L, "isEmpty", _olua_fun_fairygui_RelationItem_isEmpty); + oluacls_func(L, "new", _olua_fun_fairygui_RelationItem_new); + oluacls_func(L, "remove", _olua_fun_fairygui_RelationItem_remove); + oluacls_func(L, "setTarget", _olua_fun_fairygui_RelationItem_setTarget); + oluacls_prop(L, "empty", _olua_fun_fairygui_RelationItem_isEmpty, nullptr); + oluacls_prop(L, "target", _olua_fun_fairygui_RelationItem_getTarget, _olua_fun_fairygui_RelationItem_setTarget); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_fgui_RelationItem(lua_State *L) +{ + olua_require(L, "fairygui", luaopen_fairygui); + if (!olua_getclass(L, "fgui.RelationItem")) { + luaL_error(L, "class not found: fairygui::RelationItem"); + } return 1; } OLUA_END_DECLS -static int _fairygui_ScrollPane_cancelDragging(lua_State *L) +static int _olua_fun_fairygui_ScrollPane_cancelDragging(lua_State *L) { olua_startinvoke(L); @@ -20583,7 +22537,7 @@ static int _fairygui_ScrollPane_cancelDragging(lua_State *L) return 0; } -static int _fairygui_ScrollPane_getContentSize(lua_State *L) +static int _olua_fun_fairygui_ScrollPane_getContentSize(lua_State *L) { olua_startinvoke(L); @@ -20600,7 +22554,7 @@ static int _fairygui_ScrollPane_getContentSize(lua_State *L) return num_ret; } -static int _fairygui_ScrollPane_getDecelerationRate(lua_State *L) +static int _olua_fun_fairygui_ScrollPane_getDecelerationRate(lua_State *L) { olua_startinvoke(L); @@ -20617,7 +22571,7 @@ static int _fairygui_ScrollPane_getDecelerationRate(lua_State *L) return num_ret; } -static int _fairygui_ScrollPane_getDraggingPane(lua_State *L) +static int _olua_fun_fairygui_ScrollPane_getDraggingPane(lua_State *L) { olua_startinvoke(L); @@ -20630,7 +22584,7 @@ static int _fairygui_ScrollPane_getDraggingPane(lua_State *L) return num_ret; } -static int _fairygui_ScrollPane_getFooter(lua_State *L) +static int _olua_fun_fairygui_ScrollPane_getFooter(lua_State *L) { olua_startinvoke(L); @@ -20650,7 +22604,7 @@ static int _fairygui_ScrollPane_getFooter(lua_State *L) return num_ret; } -static int _fairygui_ScrollPane_getHeader(lua_State *L) +static int _olua_fun_fairygui_ScrollPane_getHeader(lua_State *L) { olua_startinvoke(L); @@ -20670,7 +22624,7 @@ static int _fairygui_ScrollPane_getHeader(lua_State *L) return num_ret; } -static int _fairygui_ScrollPane_getHzScrollBar(lua_State *L) +static int _olua_fun_fairygui_ScrollPane_getHzScrollBar(lua_State *L) { olua_startinvoke(L); @@ -20690,7 +22644,7 @@ static int _fairygui_ScrollPane_getHzScrollBar(lua_State *L) return num_ret; } -static int _fairygui_ScrollPane_getOwner(lua_State *L) +static int _olua_fun_fairygui_ScrollPane_getOwner(lua_State *L) { olua_startinvoke(L); @@ -20710,7 +22664,7 @@ static int _fairygui_ScrollPane_getOwner(lua_State *L) return num_ret; } -static int _fairygui_ScrollPane_getPageController(lua_State *L) +static int _olua_fun_fairygui_ScrollPane_getPageController(lua_State *L) { olua_startinvoke(L); @@ -20730,7 +22684,7 @@ static int _fairygui_ScrollPane_getPageController(lua_State *L) return num_ret; } -static int _fairygui_ScrollPane_getPageX(lua_State *L) +static int _olua_fun_fairygui_ScrollPane_getPageX(lua_State *L) { olua_startinvoke(L); @@ -20747,7 +22701,7 @@ static int _fairygui_ScrollPane_getPageX(lua_State *L) return num_ret; } -static int _fairygui_ScrollPane_getPageY(lua_State *L) +static int _olua_fun_fairygui_ScrollPane_getPageY(lua_State *L) { olua_startinvoke(L); @@ -20764,7 +22718,7 @@ static int _fairygui_ScrollPane_getPageY(lua_State *L) return num_ret; } -static int _fairygui_ScrollPane_getPercX(lua_State *L) +static int _olua_fun_fairygui_ScrollPane_getPercX(lua_State *L) { olua_startinvoke(L); @@ -20781,7 +22735,7 @@ static int _fairygui_ScrollPane_getPercX(lua_State *L) return num_ret; } -static int _fairygui_ScrollPane_getPercY(lua_State *L) +static int _olua_fun_fairygui_ScrollPane_getPercY(lua_State *L) { olua_startinvoke(L); @@ -20798,7 +22752,7 @@ static int _fairygui_ScrollPane_getPercY(lua_State *L) return num_ret; } -static int _fairygui_ScrollPane_getPosX(lua_State *L) +static int _olua_fun_fairygui_ScrollPane_getPosX(lua_State *L) { olua_startinvoke(L); @@ -20815,7 +22769,7 @@ static int _fairygui_ScrollPane_getPosX(lua_State *L) return num_ret; } -static int _fairygui_ScrollPane_getPosY(lua_State *L) +static int _olua_fun_fairygui_ScrollPane_getPosY(lua_State *L) { olua_startinvoke(L); @@ -20832,7 +22786,7 @@ static int _fairygui_ScrollPane_getPosY(lua_State *L) return num_ret; } -static int _fairygui_ScrollPane_getScrollStep(lua_State *L) +static int _olua_fun_fairygui_ScrollPane_getScrollStep(lua_State *L) { olua_startinvoke(L); @@ -20849,7 +22803,7 @@ static int _fairygui_ScrollPane_getScrollStep(lua_State *L) return num_ret; } -static int _fairygui_ScrollPane_getScrollingPosX(lua_State *L) +static int _olua_fun_fairygui_ScrollPane_getScrollingPosX(lua_State *L) { olua_startinvoke(L); @@ -20866,7 +22820,7 @@ static int _fairygui_ScrollPane_getScrollingPosX(lua_State *L) return num_ret; } -static int _fairygui_ScrollPane_getScrollingPosY(lua_State *L) +static int _olua_fun_fairygui_ScrollPane_getScrollingPosY(lua_State *L) { olua_startinvoke(L); @@ -20883,7 +22837,7 @@ static int _fairygui_ScrollPane_getScrollingPosY(lua_State *L) return num_ret; } -static int _fairygui_ScrollPane_getViewSize(lua_State *L) +static int _olua_fun_fairygui_ScrollPane_getViewSize(lua_State *L) { olua_startinvoke(L); @@ -20900,7 +22854,7 @@ static int _fairygui_ScrollPane_getViewSize(lua_State *L) return num_ret; } -static int _fairygui_ScrollPane_getVtScrollBar(lua_State *L) +static int _olua_fun_fairygui_ScrollPane_getVtScrollBar(lua_State *L) { olua_startinvoke(L); @@ -20920,7 +22874,7 @@ static int _fairygui_ScrollPane_getVtScrollBar(lua_State *L) return num_ret; } -static int _fairygui_ScrollPane_isBottomMost(lua_State *L) +static int _olua_fun_fairygui_ScrollPane_isBottomMost(lua_State *L) { olua_startinvoke(L); @@ -20937,7 +22891,7 @@ static int _fairygui_ScrollPane_isBottomMost(lua_State *L) return num_ret; } -static int _fairygui_ScrollPane_isBouncebackEffect(lua_State *L) +static int _olua_fun_fairygui_ScrollPane_isBouncebackEffect(lua_State *L) { olua_startinvoke(L); @@ -20954,7 +22908,7 @@ static int _fairygui_ScrollPane_isBouncebackEffect(lua_State *L) return num_ret; } -static int _fairygui_ScrollPane_isChildInView(lua_State *L) +static int _olua_fun_fairygui_ScrollPane_isChildInView(lua_State *L) { olua_startinvoke(L); @@ -20973,7 +22927,7 @@ static int _fairygui_ScrollPane_isChildInView(lua_State *L) return num_ret; } -static int _fairygui_ScrollPane_isInertiaDisabled(lua_State *L) +static int _olua_fun_fairygui_ScrollPane_isInertiaDisabled(lua_State *L) { olua_startinvoke(L); @@ -20990,7 +22944,7 @@ static int _fairygui_ScrollPane_isInertiaDisabled(lua_State *L) return num_ret; } -static int _fairygui_ScrollPane_isMouseWheelEnabled(lua_State *L) +static int _olua_fun_fairygui_ScrollPane_isMouseWheelEnabled(lua_State *L) { olua_startinvoke(L); @@ -21007,7 +22961,7 @@ static int _fairygui_ScrollPane_isMouseWheelEnabled(lua_State *L) return num_ret; } -static int _fairygui_ScrollPane_isPageMode(lua_State *L) +static int _olua_fun_fairygui_ScrollPane_isPageMode(lua_State *L) { olua_startinvoke(L); @@ -21024,7 +22978,7 @@ static int _fairygui_ScrollPane_isPageMode(lua_State *L) return num_ret; } -static int _fairygui_ScrollPane_isRightMost(lua_State *L) +static int _olua_fun_fairygui_ScrollPane_isRightMost(lua_State *L) { olua_startinvoke(L); @@ -21041,7 +22995,7 @@ static int _fairygui_ScrollPane_isRightMost(lua_State *L) return num_ret; } -static int _fairygui_ScrollPane_isSnapToItem(lua_State *L) +static int _olua_fun_fairygui_ScrollPane_isSnapToItem(lua_State *L) { olua_startinvoke(L); @@ -21058,7 +23012,7 @@ static int _fairygui_ScrollPane_isSnapToItem(lua_State *L) return num_ret; } -static int _fairygui_ScrollPane_isTouchEffect(lua_State *L) +static int _olua_fun_fairygui_ScrollPane_isTouchEffect(lua_State *L) { olua_startinvoke(L); @@ -21075,7 +23029,7 @@ static int _fairygui_ScrollPane_isTouchEffect(lua_State *L) return num_ret; } -static int _fairygui_ScrollPane_lockFooter(lua_State *L) +static int _olua_fun_fairygui_ScrollPane_lockFooter(lua_State *L) { olua_startinvoke(L); @@ -21093,7 +23047,7 @@ static int _fairygui_ScrollPane_lockFooter(lua_State *L) return 0; } -static int _fairygui_ScrollPane_lockHeader(lua_State *L) +static int _olua_fun_fairygui_ScrollPane_lockHeader(lua_State *L) { olua_startinvoke(L); @@ -21111,7 +23065,7 @@ static int _fairygui_ScrollPane_lockHeader(lua_State *L) return 0; } -static int _fairygui_ScrollPane_new(lua_State *L) +static int _olua_fun_fairygui_ScrollPane_new(lua_State *L) { olua_startinvoke(L); @@ -21119,7 +23073,7 @@ static int _fairygui_ScrollPane_new(lua_State *L) olua_check_object(L, 1, &arg1, "fgui.GComponent"); - // ScrollPane(fairygui::GComponent *owner) + // fairygui::ScrollPane(fairygui::GComponent *owner) fairygui::ScrollPane *ret = new fairygui::ScrollPane(arg1); int num_ret = olua_push_object(L, ret, "fgui.ScrollPane"); olua_postnew(L, ret); @@ -21129,7 +23083,7 @@ static int _fairygui_ScrollPane_new(lua_State *L) return num_ret; } -static int _fairygui_ScrollPane_scrollBottom$1(lua_State *L) +static int _olua_fun_fairygui_ScrollPane_scrollBottom$1(lua_State *L) { olua_startinvoke(L); @@ -21147,7 +23101,7 @@ static int _fairygui_ScrollPane_scrollBottom$1(lua_State *L) return 0; } -static int _fairygui_ScrollPane_scrollBottom$2(lua_State *L) +static int _olua_fun_fairygui_ScrollPane_scrollBottom$2(lua_State *L) { olua_startinvoke(L); @@ -21155,7 +23109,7 @@ static int _fairygui_ScrollPane_scrollBottom$2(lua_State *L) olua_to_object(L, 1, &self, "fgui.ScrollPane"); - // void scrollBottom(@optional bool ani) + // void scrollBottom() self->scrollBottom(); olua_endinvoke(L); @@ -21163,19 +23117,19 @@ static int _fairygui_ScrollPane_scrollBottom$2(lua_State *L) return 0; } -static int _fairygui_ScrollPane_scrollBottom(lua_State *L) +static int _olua_fun_fairygui_ScrollPane_scrollBottom(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 0) { - // void scrollBottom(@optional bool ani) - return _fairygui_ScrollPane_scrollBottom$2(L); + // void scrollBottom() + return _olua_fun_fairygui_ScrollPane_scrollBottom$2(L); } if (num_args == 1) { // if ((olua_is_bool(L, 2))) { // void scrollBottom(@optional bool ani) - return _fairygui_ScrollPane_scrollBottom$1(L); + return _olua_fun_fairygui_ScrollPane_scrollBottom$1(L); // } } @@ -21184,7 +23138,7 @@ static int _fairygui_ScrollPane_scrollBottom(lua_State *L) return 0; } -static int _fairygui_ScrollPane_scrollDown$1(lua_State *L) +static int _olua_fun_fairygui_ScrollPane_scrollDown$1(lua_State *L) { olua_startinvoke(L); @@ -21204,7 +23158,7 @@ static int _fairygui_ScrollPane_scrollDown$1(lua_State *L) return 0; } -static int _fairygui_ScrollPane_scrollDown$2(lua_State *L) +static int _olua_fun_fairygui_ScrollPane_scrollDown$2(lua_State *L) { olua_startinvoke(L); @@ -21212,7 +23166,7 @@ static int _fairygui_ScrollPane_scrollDown$2(lua_State *L) olua_to_object(L, 1, &self, "fgui.ScrollPane"); - // void scrollDown(@optional float ratio, @optional bool ani) + // void scrollDown() self->scrollDown(); olua_endinvoke(L); @@ -21220,7 +23174,7 @@ static int _fairygui_ScrollPane_scrollDown$2(lua_State *L) return 0; } -static int _fairygui_ScrollPane_scrollDown$3(lua_State *L) +static int _olua_fun_fairygui_ScrollPane_scrollDown$3(lua_State *L) { olua_startinvoke(L); @@ -21230,7 +23184,7 @@ static int _fairygui_ScrollPane_scrollDown$3(lua_State *L) olua_to_object(L, 1, &self, "fgui.ScrollPane"); olua_check_number(L, 2, &arg1); - // void scrollDown(@optional float ratio, @optional bool ani) + // void scrollDown(@optional float ratio) self->scrollDown(arg1); olua_endinvoke(L); @@ -21238,26 +23192,26 @@ static int _fairygui_ScrollPane_scrollDown$3(lua_State *L) return 0; } -static int _fairygui_ScrollPane_scrollDown(lua_State *L) +static int _olua_fun_fairygui_ScrollPane_scrollDown(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 0) { - // void scrollDown(@optional float ratio, @optional bool ani) - return _fairygui_ScrollPane_scrollDown$2(L); + // void scrollDown() + return _olua_fun_fairygui_ScrollPane_scrollDown$2(L); } if (num_args == 1) { // if ((olua_is_number(L, 2))) { - // void scrollDown(@optional float ratio, @optional bool ani) - return _fairygui_ScrollPane_scrollDown$3(L); + // void scrollDown(@optional float ratio) + return _olua_fun_fairygui_ScrollPane_scrollDown$3(L); // } } if (num_args == 2) { // if ((olua_is_number(L, 2)) && (olua_is_bool(L, 3))) { // void scrollDown(@optional float ratio, @optional bool ani) - return _fairygui_ScrollPane_scrollDown$1(L); + return _olua_fun_fairygui_ScrollPane_scrollDown$1(L); // } } @@ -21266,7 +23220,7 @@ static int _fairygui_ScrollPane_scrollDown(lua_State *L) return 0; } -static int _fairygui_ScrollPane_scrollLeft$1(lua_State *L) +static int _olua_fun_fairygui_ScrollPane_scrollLeft$1(lua_State *L) { olua_startinvoke(L); @@ -21286,7 +23240,7 @@ static int _fairygui_ScrollPane_scrollLeft$1(lua_State *L) return 0; } -static int _fairygui_ScrollPane_scrollLeft$2(lua_State *L) +static int _olua_fun_fairygui_ScrollPane_scrollLeft$2(lua_State *L) { olua_startinvoke(L); @@ -21294,7 +23248,7 @@ static int _fairygui_ScrollPane_scrollLeft$2(lua_State *L) olua_to_object(L, 1, &self, "fgui.ScrollPane"); - // void scrollLeft(@optional float ratio, @optional bool ani) + // void scrollLeft() self->scrollLeft(); olua_endinvoke(L); @@ -21302,7 +23256,7 @@ static int _fairygui_ScrollPane_scrollLeft$2(lua_State *L) return 0; } -static int _fairygui_ScrollPane_scrollLeft$3(lua_State *L) +static int _olua_fun_fairygui_ScrollPane_scrollLeft$3(lua_State *L) { olua_startinvoke(L); @@ -21312,7 +23266,7 @@ static int _fairygui_ScrollPane_scrollLeft$3(lua_State *L) olua_to_object(L, 1, &self, "fgui.ScrollPane"); olua_check_number(L, 2, &arg1); - // void scrollLeft(@optional float ratio, @optional bool ani) + // void scrollLeft(@optional float ratio) self->scrollLeft(arg1); olua_endinvoke(L); @@ -21320,26 +23274,26 @@ static int _fairygui_ScrollPane_scrollLeft$3(lua_State *L) return 0; } -static int _fairygui_ScrollPane_scrollLeft(lua_State *L) +static int _olua_fun_fairygui_ScrollPane_scrollLeft(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 0) { - // void scrollLeft(@optional float ratio, @optional bool ani) - return _fairygui_ScrollPane_scrollLeft$2(L); + // void scrollLeft() + return _olua_fun_fairygui_ScrollPane_scrollLeft$2(L); } if (num_args == 1) { // if ((olua_is_number(L, 2))) { - // void scrollLeft(@optional float ratio, @optional bool ani) - return _fairygui_ScrollPane_scrollLeft$3(L); + // void scrollLeft(@optional float ratio) + return _olua_fun_fairygui_ScrollPane_scrollLeft$3(L); // } } if (num_args == 2) { // if ((olua_is_number(L, 2)) && (olua_is_bool(L, 3))) { // void scrollLeft(@optional float ratio, @optional bool ani) - return _fairygui_ScrollPane_scrollLeft$1(L); + return _olua_fun_fairygui_ScrollPane_scrollLeft$1(L); // } } @@ -21348,7 +23302,7 @@ static int _fairygui_ScrollPane_scrollLeft(lua_State *L) return 0; } -static int _fairygui_ScrollPane_scrollRight$1(lua_State *L) +static int _olua_fun_fairygui_ScrollPane_scrollRight$1(lua_State *L) { olua_startinvoke(L); @@ -21368,7 +23322,7 @@ static int _fairygui_ScrollPane_scrollRight$1(lua_State *L) return 0; } -static int _fairygui_ScrollPane_scrollRight$2(lua_State *L) +static int _olua_fun_fairygui_ScrollPane_scrollRight$2(lua_State *L) { olua_startinvoke(L); @@ -21376,7 +23330,7 @@ static int _fairygui_ScrollPane_scrollRight$2(lua_State *L) olua_to_object(L, 1, &self, "fgui.ScrollPane"); - // void scrollRight(@optional float ratio, @optional bool ani) + // void scrollRight() self->scrollRight(); olua_endinvoke(L); @@ -21384,7 +23338,7 @@ static int _fairygui_ScrollPane_scrollRight$2(lua_State *L) return 0; } -static int _fairygui_ScrollPane_scrollRight$3(lua_State *L) +static int _olua_fun_fairygui_ScrollPane_scrollRight$3(lua_State *L) { olua_startinvoke(L); @@ -21394,7 +23348,7 @@ static int _fairygui_ScrollPane_scrollRight$3(lua_State *L) olua_to_object(L, 1, &self, "fgui.ScrollPane"); olua_check_number(L, 2, &arg1); - // void scrollRight(@optional float ratio, @optional bool ani) + // void scrollRight(@optional float ratio) self->scrollRight(arg1); olua_endinvoke(L); @@ -21402,26 +23356,26 @@ static int _fairygui_ScrollPane_scrollRight$3(lua_State *L) return 0; } -static int _fairygui_ScrollPane_scrollRight(lua_State *L) +static int _olua_fun_fairygui_ScrollPane_scrollRight(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 0) { - // void scrollRight(@optional float ratio, @optional bool ani) - return _fairygui_ScrollPane_scrollRight$2(L); + // void scrollRight() + return _olua_fun_fairygui_ScrollPane_scrollRight$2(L); } if (num_args == 1) { // if ((olua_is_number(L, 2))) { - // void scrollRight(@optional float ratio, @optional bool ani) - return _fairygui_ScrollPane_scrollRight$3(L); + // void scrollRight(@optional float ratio) + return _olua_fun_fairygui_ScrollPane_scrollRight$3(L); // } } if (num_args == 2) { // if ((olua_is_number(L, 2)) && (olua_is_bool(L, 3))) { // void scrollRight(@optional float ratio, @optional bool ani) - return _fairygui_ScrollPane_scrollRight$1(L); + return _olua_fun_fairygui_ScrollPane_scrollRight$1(L); // } } @@ -21430,7 +23384,7 @@ static int _fairygui_ScrollPane_scrollRight(lua_State *L) return 0; } -static int _fairygui_ScrollPane_scrollToView$1(lua_State *L) +static int _olua_fun_fairygui_ScrollPane_scrollToView$1(lua_State *L) { olua_startinvoke(L); @@ -21452,141 +23406,141 @@ static int _fairygui_ScrollPane_scrollToView$1(lua_State *L) return 0; } -static int _fairygui_ScrollPane_scrollToView$2(lua_State *L) +static int _olua_fun_fairygui_ScrollPane_scrollToView$2(lua_State *L) { olua_startinvoke(L); fairygui::ScrollPane *self = nullptr; - cocos2d::Rect arg1; /** rect */ - bool arg2 = false; /** ani */ - bool arg3 = false; /** setFirst */ + fairygui::GObject *arg1 = nullptr; /** obj */ olua_to_object(L, 1, &self, "fgui.ScrollPane"); - olua_check_object(L, 2, &arg1, "cc.Rect"); - olua_check_bool(L, 3, &arg2); - olua_check_bool(L, 4, &arg3); + olua_check_object(L, 2, &arg1, "fgui.GObject"); - // void scrollToView(const cocos2d::Rect &rect, @optional bool ani, @optional bool setFirst) - self->scrollToView(arg1, arg2, arg3); + // void scrollToView(fairygui::GObject *obj) + self->scrollToView(arg1); olua_endinvoke(L); return 0; } -static int _fairygui_ScrollPane_scrollToView$3(lua_State *L) +static int _olua_fun_fairygui_ScrollPane_scrollToView$3(lua_State *L) { olua_startinvoke(L); fairygui::ScrollPane *self = nullptr; fairygui::GObject *arg1 = nullptr; /** obj */ + bool arg2 = false; /** ani */ olua_to_object(L, 1, &self, "fgui.ScrollPane"); olua_check_object(L, 2, &arg1, "fgui.GObject"); + olua_check_bool(L, 3, &arg2); - // void scrollToView(fairygui::GObject *obj, @optional bool ani, @optional bool setFirst) - self->scrollToView(arg1); + // void scrollToView(fairygui::GObject *obj, @optional bool ani) + self->scrollToView(arg1, arg2); olua_endinvoke(L); return 0; } -static int _fairygui_ScrollPane_scrollToView$4(lua_State *L) +static int _olua_fun_fairygui_ScrollPane_scrollToView$4(lua_State *L) { olua_startinvoke(L); fairygui::ScrollPane *self = nullptr; - fairygui::GObject *arg1 = nullptr; /** obj */ + cocos2d::Rect *arg1; /** rect */ bool arg2 = false; /** ani */ + bool arg3 = false; /** setFirst */ olua_to_object(L, 1, &self, "fgui.ScrollPane"); - olua_check_object(L, 2, &arg1, "fgui.GObject"); + olua_check_object(L, 2, &arg1, "cc.Rect"); olua_check_bool(L, 3, &arg2); + olua_check_bool(L, 4, &arg3); - // void scrollToView(fairygui::GObject *obj, @optional bool ani, @optional bool setFirst) - self->scrollToView(arg1, arg2); + // void scrollToView(const cocos2d::Rect &rect, @optional bool ani, @optional bool setFirst) + self->scrollToView(*arg1, arg2, arg3); olua_endinvoke(L); return 0; } -static int _fairygui_ScrollPane_scrollToView$5(lua_State *L) +static int _olua_fun_fairygui_ScrollPane_scrollToView$5(lua_State *L) { olua_startinvoke(L); fairygui::ScrollPane *self = nullptr; - cocos2d::Rect arg1; /** rect */ + cocos2d::Rect *arg1; /** rect */ olua_to_object(L, 1, &self, "fgui.ScrollPane"); olua_check_object(L, 2, &arg1, "cc.Rect"); - // void scrollToView(const cocos2d::Rect &rect, @optional bool ani, @optional bool setFirst) - self->scrollToView(arg1); + // void scrollToView(const cocos2d::Rect &rect) + self->scrollToView(*arg1); olua_endinvoke(L); return 0; } -static int _fairygui_ScrollPane_scrollToView$6(lua_State *L) +static int _olua_fun_fairygui_ScrollPane_scrollToView$6(lua_State *L) { olua_startinvoke(L); fairygui::ScrollPane *self = nullptr; - cocos2d::Rect arg1; /** rect */ + cocos2d::Rect *arg1; /** rect */ bool arg2 = false; /** ani */ olua_to_object(L, 1, &self, "fgui.ScrollPane"); olua_check_object(L, 2, &arg1, "cc.Rect"); olua_check_bool(L, 3, &arg2); - // void scrollToView(const cocos2d::Rect &rect, @optional bool ani, @optional bool setFirst) - self->scrollToView(arg1, arg2); + // void scrollToView(const cocos2d::Rect &rect, @optional bool ani) + self->scrollToView(*arg1, arg2); olua_endinvoke(L); return 0; } -static int _fairygui_ScrollPane_scrollToView(lua_State *L) +static int _olua_fun_fairygui_ScrollPane_scrollToView(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { if ((olua_is_object(L, 2, "cc.Rect"))) { - // void scrollToView(const cocos2d::Rect &rect, @optional bool ani, @optional bool setFirst) - return _fairygui_ScrollPane_scrollToView$5(L); + // void scrollToView(const cocos2d::Rect &rect) + return _olua_fun_fairygui_ScrollPane_scrollToView$5(L); } // if ((olua_is_object(L, 2, "fgui.GObject"))) { - // void scrollToView(fairygui::GObject *obj, @optional bool ani, @optional bool setFirst) - return _fairygui_ScrollPane_scrollToView$3(L); + // void scrollToView(fairygui::GObject *obj) + return _olua_fun_fairygui_ScrollPane_scrollToView$2(L); // } } if (num_args == 2) { if ((olua_is_object(L, 2, "cc.Rect")) && (olua_is_bool(L, 3))) { - // void scrollToView(const cocos2d::Rect &rect, @optional bool ani, @optional bool setFirst) - return _fairygui_ScrollPane_scrollToView$6(L); + // void scrollToView(const cocos2d::Rect &rect, @optional bool ani) + return _olua_fun_fairygui_ScrollPane_scrollToView$6(L); } // if ((olua_is_object(L, 2, "fgui.GObject")) && (olua_is_bool(L, 3))) { - // void scrollToView(fairygui::GObject *obj, @optional bool ani, @optional bool setFirst) - return _fairygui_ScrollPane_scrollToView$4(L); + // void scrollToView(fairygui::GObject *obj, @optional bool ani) + return _olua_fun_fairygui_ScrollPane_scrollToView$3(L); // } } if (num_args == 3) { if ((olua_is_object(L, 2, "cc.Rect")) && (olua_is_bool(L, 3)) && (olua_is_bool(L, 4))) { // void scrollToView(const cocos2d::Rect &rect, @optional bool ani, @optional bool setFirst) - return _fairygui_ScrollPane_scrollToView$2(L); + return _olua_fun_fairygui_ScrollPane_scrollToView$4(L); } // if ((olua_is_object(L, 2, "fgui.GObject")) && (olua_is_bool(L, 3)) && (olua_is_bool(L, 4))) { // void scrollToView(fairygui::GObject *obj, @optional bool ani, @optional bool setFirst) - return _fairygui_ScrollPane_scrollToView$1(L); + return _olua_fun_fairygui_ScrollPane_scrollToView$1(L); // } } @@ -21595,7 +23549,7 @@ static int _fairygui_ScrollPane_scrollToView(lua_State *L) return 0; } -static int _fairygui_ScrollPane_scrollTop$1(lua_State *L) +static int _olua_fun_fairygui_ScrollPane_scrollTop$1(lua_State *L) { olua_startinvoke(L); @@ -21613,7 +23567,7 @@ static int _fairygui_ScrollPane_scrollTop$1(lua_State *L) return 0; } -static int _fairygui_ScrollPane_scrollTop$2(lua_State *L) +static int _olua_fun_fairygui_ScrollPane_scrollTop$2(lua_State *L) { olua_startinvoke(L); @@ -21621,7 +23575,7 @@ static int _fairygui_ScrollPane_scrollTop$2(lua_State *L) olua_to_object(L, 1, &self, "fgui.ScrollPane"); - // void scrollTop(@optional bool ani) + // void scrollTop() self->scrollTop(); olua_endinvoke(L); @@ -21629,19 +23583,19 @@ static int _fairygui_ScrollPane_scrollTop$2(lua_State *L) return 0; } -static int _fairygui_ScrollPane_scrollTop(lua_State *L) +static int _olua_fun_fairygui_ScrollPane_scrollTop(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 0) { - // void scrollTop(@optional bool ani) - return _fairygui_ScrollPane_scrollTop$2(L); + // void scrollTop() + return _olua_fun_fairygui_ScrollPane_scrollTop$2(L); } if (num_args == 1) { // if ((olua_is_bool(L, 2))) { // void scrollTop(@optional bool ani) - return _fairygui_ScrollPane_scrollTop$1(L); + return _olua_fun_fairygui_ScrollPane_scrollTop$1(L); // } } @@ -21650,7 +23604,7 @@ static int _fairygui_ScrollPane_scrollTop(lua_State *L) return 0; } -static int _fairygui_ScrollPane_scrollUp$1(lua_State *L) +static int _olua_fun_fairygui_ScrollPane_scrollUp$1(lua_State *L) { olua_startinvoke(L); @@ -21670,7 +23624,7 @@ static int _fairygui_ScrollPane_scrollUp$1(lua_State *L) return 0; } -static int _fairygui_ScrollPane_scrollUp$2(lua_State *L) +static int _olua_fun_fairygui_ScrollPane_scrollUp$2(lua_State *L) { olua_startinvoke(L); @@ -21678,7 +23632,7 @@ static int _fairygui_ScrollPane_scrollUp$2(lua_State *L) olua_to_object(L, 1, &self, "fgui.ScrollPane"); - // void scrollUp(@optional float ratio, @optional bool ani) + // void scrollUp() self->scrollUp(); olua_endinvoke(L); @@ -21686,7 +23640,7 @@ static int _fairygui_ScrollPane_scrollUp$2(lua_State *L) return 0; } -static int _fairygui_ScrollPane_scrollUp$3(lua_State *L) +static int _olua_fun_fairygui_ScrollPane_scrollUp$3(lua_State *L) { olua_startinvoke(L); @@ -21696,7 +23650,7 @@ static int _fairygui_ScrollPane_scrollUp$3(lua_State *L) olua_to_object(L, 1, &self, "fgui.ScrollPane"); olua_check_number(L, 2, &arg1); - // void scrollUp(@optional float ratio, @optional bool ani) + // void scrollUp(@optional float ratio) self->scrollUp(arg1); olua_endinvoke(L); @@ -21704,26 +23658,26 @@ static int _fairygui_ScrollPane_scrollUp$3(lua_State *L) return 0; } -static int _fairygui_ScrollPane_scrollUp(lua_State *L) +static int _olua_fun_fairygui_ScrollPane_scrollUp(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 0) { - // void scrollUp(@optional float ratio, @optional bool ani) - return _fairygui_ScrollPane_scrollUp$2(L); + // void scrollUp() + return _olua_fun_fairygui_ScrollPane_scrollUp$2(L); } if (num_args == 1) { // if ((olua_is_number(L, 2))) { - // void scrollUp(@optional float ratio, @optional bool ani) - return _fairygui_ScrollPane_scrollUp$3(L); + // void scrollUp(@optional float ratio) + return _olua_fun_fairygui_ScrollPane_scrollUp$3(L); // } } if (num_args == 2) { // if ((olua_is_number(L, 2)) && (olua_is_bool(L, 3))) { // void scrollUp(@optional float ratio, @optional bool ani) - return _fairygui_ScrollPane_scrollUp$1(L); + return _olua_fun_fairygui_ScrollPane_scrollUp$1(L); // } } @@ -21732,7 +23686,7 @@ static int _fairygui_ScrollPane_scrollUp(lua_State *L) return 0; } -static int _fairygui_ScrollPane_setBouncebackEffect(lua_State *L) +static int _olua_fun_fairygui_ScrollPane_setBouncebackEffect(lua_State *L) { olua_startinvoke(L); @@ -21750,7 +23704,7 @@ static int _fairygui_ScrollPane_setBouncebackEffect(lua_State *L) return 0; } -static int _fairygui_ScrollPane_setDecelerationRate(lua_State *L) +static int _olua_fun_fairygui_ScrollPane_setDecelerationRate(lua_State *L) { olua_startinvoke(L); @@ -21768,7 +23722,7 @@ static int _fairygui_ScrollPane_setDecelerationRate(lua_State *L) return 0; } -static int _fairygui_ScrollPane_setInertiaDisabled(lua_State *L) +static int _olua_fun_fairygui_ScrollPane_setInertiaDisabled(lua_State *L) { olua_startinvoke(L); @@ -21786,7 +23740,7 @@ static int _fairygui_ScrollPane_setInertiaDisabled(lua_State *L) return 0; } -static int _fairygui_ScrollPane_setMouseWheelEnabled(lua_State *L) +static int _olua_fun_fairygui_ScrollPane_setMouseWheelEnabled(lua_State *L) { olua_startinvoke(L); @@ -21804,7 +23758,7 @@ static int _fairygui_ScrollPane_setMouseWheelEnabled(lua_State *L) return 0; } -static int _fairygui_ScrollPane_setPageController(lua_State *L) +static int _olua_fun_fairygui_ScrollPane_setPageController(lua_State *L) { olua_startinvoke(L); @@ -21825,7 +23779,7 @@ static int _fairygui_ScrollPane_setPageController(lua_State *L) return 0; } -static int _fairygui_ScrollPane_setPageMode(lua_State *L) +static int _olua_fun_fairygui_ScrollPane_setPageMode(lua_State *L) { olua_startinvoke(L); @@ -21843,7 +23797,7 @@ static int _fairygui_ScrollPane_setPageMode(lua_State *L) return 0; } -static int _fairygui_ScrollPane_setPageX$1(lua_State *L) +static int _olua_fun_fairygui_ScrollPane_setPageX$1(lua_State *L) { olua_startinvoke(L); @@ -21863,7 +23817,7 @@ static int _fairygui_ScrollPane_setPageX$1(lua_State *L) return 0; } -static int _fairygui_ScrollPane_setPageX$2(lua_State *L) +static int _olua_fun_fairygui_ScrollPane_setPageX$2(lua_State *L) { olua_startinvoke(L); @@ -21873,7 +23827,7 @@ static int _fairygui_ScrollPane_setPageX$2(lua_State *L) olua_to_object(L, 1, &self, "fgui.ScrollPane"); olua_check_integer(L, 2, &arg1); - // void setPageX(int value, @optional bool ani) + // void setPageX(int value) self->setPageX(arg1); olua_endinvoke(L); @@ -21881,21 +23835,21 @@ static int _fairygui_ScrollPane_setPageX$2(lua_State *L) return 0; } -static int _fairygui_ScrollPane_setPageX(lua_State *L) +static int _olua_fun_fairygui_ScrollPane_setPageX(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_integer(L, 2))) { - // void setPageX(int value, @optional bool ani) - return _fairygui_ScrollPane_setPageX$2(L); + // void setPageX(int value) + return _olua_fun_fairygui_ScrollPane_setPageX$2(L); // } } if (num_args == 2) { // if ((olua_is_integer(L, 2)) && (olua_is_bool(L, 3))) { // void setPageX(int value, @optional bool ani) - return _fairygui_ScrollPane_setPageX$1(L); + return _olua_fun_fairygui_ScrollPane_setPageX$1(L); // } } @@ -21904,7 +23858,7 @@ static int _fairygui_ScrollPane_setPageX(lua_State *L) return 0; } -static int _fairygui_ScrollPane_setPageY$1(lua_State *L) +static int _olua_fun_fairygui_ScrollPane_setPageY$1(lua_State *L) { olua_startinvoke(L); @@ -21924,7 +23878,7 @@ static int _fairygui_ScrollPane_setPageY$1(lua_State *L) return 0; } -static int _fairygui_ScrollPane_setPageY$2(lua_State *L) +static int _olua_fun_fairygui_ScrollPane_setPageY$2(lua_State *L) { olua_startinvoke(L); @@ -21934,7 +23888,7 @@ static int _fairygui_ScrollPane_setPageY$2(lua_State *L) olua_to_object(L, 1, &self, "fgui.ScrollPane"); olua_check_integer(L, 2, &arg1); - // void setPageY(int value, @optional bool ani) + // void setPageY(int value) self->setPageY(arg1); olua_endinvoke(L); @@ -21942,21 +23896,21 @@ static int _fairygui_ScrollPane_setPageY$2(lua_State *L) return 0; } -static int _fairygui_ScrollPane_setPageY(lua_State *L) +static int _olua_fun_fairygui_ScrollPane_setPageY(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_integer(L, 2))) { - // void setPageY(int value, @optional bool ani) - return _fairygui_ScrollPane_setPageY$2(L); + // void setPageY(int value) + return _olua_fun_fairygui_ScrollPane_setPageY$2(L); // } } if (num_args == 2) { // if ((olua_is_integer(L, 2)) && (olua_is_bool(L, 3))) { // void setPageY(int value, @optional bool ani) - return _fairygui_ScrollPane_setPageY$1(L); + return _olua_fun_fairygui_ScrollPane_setPageY$1(L); // } } @@ -21965,7 +23919,7 @@ static int _fairygui_ScrollPane_setPageY(lua_State *L) return 0; } -static int _fairygui_ScrollPane_setPercX$1(lua_State *L) +static int _olua_fun_fairygui_ScrollPane_setPercX$1(lua_State *L) { olua_startinvoke(L); @@ -21985,7 +23939,7 @@ static int _fairygui_ScrollPane_setPercX$1(lua_State *L) return 0; } -static int _fairygui_ScrollPane_setPercX$2(lua_State *L) +static int _olua_fun_fairygui_ScrollPane_setPercX$2(lua_State *L) { olua_startinvoke(L); @@ -21995,7 +23949,7 @@ static int _fairygui_ScrollPane_setPercX$2(lua_State *L) olua_to_object(L, 1, &self, "fgui.ScrollPane"); olua_check_number(L, 2, &arg1); - // void setPercX(float value, @optional bool ani) + // void setPercX(float value) self->setPercX(arg1); olua_endinvoke(L); @@ -22003,21 +23957,21 @@ static int _fairygui_ScrollPane_setPercX$2(lua_State *L) return 0; } -static int _fairygui_ScrollPane_setPercX(lua_State *L) +static int _olua_fun_fairygui_ScrollPane_setPercX(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_number(L, 2))) { - // void setPercX(float value, @optional bool ani) - return _fairygui_ScrollPane_setPercX$2(L); + // void setPercX(float value) + return _olua_fun_fairygui_ScrollPane_setPercX$2(L); // } } if (num_args == 2) { // if ((olua_is_number(L, 2)) && (olua_is_bool(L, 3))) { // void setPercX(float value, @optional bool ani) - return _fairygui_ScrollPane_setPercX$1(L); + return _olua_fun_fairygui_ScrollPane_setPercX$1(L); // } } @@ -22026,7 +23980,7 @@ static int _fairygui_ScrollPane_setPercX(lua_State *L) return 0; } -static int _fairygui_ScrollPane_setPercY$1(lua_State *L) +static int _olua_fun_fairygui_ScrollPane_setPercY$1(lua_State *L) { olua_startinvoke(L); @@ -22046,7 +24000,7 @@ static int _fairygui_ScrollPane_setPercY$1(lua_State *L) return 0; } -static int _fairygui_ScrollPane_setPercY$2(lua_State *L) +static int _olua_fun_fairygui_ScrollPane_setPercY$2(lua_State *L) { olua_startinvoke(L); @@ -22056,7 +24010,7 @@ static int _fairygui_ScrollPane_setPercY$2(lua_State *L) olua_to_object(L, 1, &self, "fgui.ScrollPane"); olua_check_number(L, 2, &arg1); - // void setPercY(float value, @optional bool ani) + // void setPercY(float value) self->setPercY(arg1); olua_endinvoke(L); @@ -22064,21 +24018,21 @@ static int _fairygui_ScrollPane_setPercY$2(lua_State *L) return 0; } -static int _fairygui_ScrollPane_setPercY(lua_State *L) +static int _olua_fun_fairygui_ScrollPane_setPercY(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_number(L, 2))) { - // void setPercY(float value, @optional bool ani) - return _fairygui_ScrollPane_setPercY$2(L); + // void setPercY(float value) + return _olua_fun_fairygui_ScrollPane_setPercY$2(L); // } } if (num_args == 2) { // if ((olua_is_number(L, 2)) && (olua_is_bool(L, 3))) { // void setPercY(float value, @optional bool ani) - return _fairygui_ScrollPane_setPercY$1(L); + return _olua_fun_fairygui_ScrollPane_setPercY$1(L); // } } @@ -22087,7 +24041,7 @@ static int _fairygui_ScrollPane_setPercY(lua_State *L) return 0; } -static int _fairygui_ScrollPane_setPosX$1(lua_State *L) +static int _olua_fun_fairygui_ScrollPane_setPosX$1(lua_State *L) { olua_startinvoke(L); @@ -22107,7 +24061,7 @@ static int _fairygui_ScrollPane_setPosX$1(lua_State *L) return 0; } -static int _fairygui_ScrollPane_setPosX$2(lua_State *L) +static int _olua_fun_fairygui_ScrollPane_setPosX$2(lua_State *L) { olua_startinvoke(L); @@ -22117,7 +24071,7 @@ static int _fairygui_ScrollPane_setPosX$2(lua_State *L) olua_to_object(L, 1, &self, "fgui.ScrollPane"); olua_check_number(L, 2, &arg1); - // void setPosX(float value, @optional bool ani) + // void setPosX(float value) self->setPosX(arg1); olua_endinvoke(L); @@ -22125,21 +24079,21 @@ static int _fairygui_ScrollPane_setPosX$2(lua_State *L) return 0; } -static int _fairygui_ScrollPane_setPosX(lua_State *L) +static int _olua_fun_fairygui_ScrollPane_setPosX(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_number(L, 2))) { - // void setPosX(float value, @optional bool ani) - return _fairygui_ScrollPane_setPosX$2(L); + // void setPosX(float value) + return _olua_fun_fairygui_ScrollPane_setPosX$2(L); // } } if (num_args == 2) { // if ((olua_is_number(L, 2)) && (olua_is_bool(L, 3))) { // void setPosX(float value, @optional bool ani) - return _fairygui_ScrollPane_setPosX$1(L); + return _olua_fun_fairygui_ScrollPane_setPosX$1(L); // } } @@ -22148,7 +24102,7 @@ static int _fairygui_ScrollPane_setPosX(lua_State *L) return 0; } -static int _fairygui_ScrollPane_setPosY$1(lua_State *L) +static int _olua_fun_fairygui_ScrollPane_setPosY$1(lua_State *L) { olua_startinvoke(L); @@ -22168,7 +24122,7 @@ static int _fairygui_ScrollPane_setPosY$1(lua_State *L) return 0; } -static int _fairygui_ScrollPane_setPosY$2(lua_State *L) +static int _olua_fun_fairygui_ScrollPane_setPosY$2(lua_State *L) { olua_startinvoke(L); @@ -22178,7 +24132,7 @@ static int _fairygui_ScrollPane_setPosY$2(lua_State *L) olua_to_object(L, 1, &self, "fgui.ScrollPane"); olua_check_number(L, 2, &arg1); - // void setPosY(float value, @optional bool ani) + // void setPosY(float value) self->setPosY(arg1); olua_endinvoke(L); @@ -22186,21 +24140,21 @@ static int _fairygui_ScrollPane_setPosY$2(lua_State *L) return 0; } -static int _fairygui_ScrollPane_setPosY(lua_State *L) +static int _olua_fun_fairygui_ScrollPane_setPosY(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_number(L, 2))) { - // void setPosY(float value, @optional bool ani) - return _fairygui_ScrollPane_setPosY$2(L); + // void setPosY(float value) + return _olua_fun_fairygui_ScrollPane_setPosY$2(L); // } } if (num_args == 2) { // if ((olua_is_number(L, 2)) && (olua_is_bool(L, 3))) { // void setPosY(float value, @optional bool ani) - return _fairygui_ScrollPane_setPosY$1(L); + return _olua_fun_fairygui_ScrollPane_setPosY$1(L); // } } @@ -22209,7 +24163,7 @@ static int _fairygui_ScrollPane_setPosY(lua_State *L) return 0; } -static int _fairygui_ScrollPane_setScrollStep(lua_State *L) +static int _olua_fun_fairygui_ScrollPane_setScrollStep(lua_State *L) { olua_startinvoke(L); @@ -22227,7 +24181,7 @@ static int _fairygui_ScrollPane_setScrollStep(lua_State *L) return 0; } -static int _fairygui_ScrollPane_setSnapToItem(lua_State *L) +static int _olua_fun_fairygui_ScrollPane_setSnapToItem(lua_State *L) { olua_startinvoke(L); @@ -22245,7 +24199,7 @@ static int _fairygui_ScrollPane_setSnapToItem(lua_State *L) return 0; } -static int _fairygui_ScrollPane_setTouchEffect(lua_State *L) +static int _olua_fun_fairygui_ScrollPane_setTouchEffect(lua_State *L) { olua_startinvoke(L); @@ -22263,141 +24217,168 @@ static int _fairygui_ScrollPane_setTouchEffect(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_fairygui_ScrollPane(lua_State *L) +static int _olua_cls_fgui_ScrollPane(lua_State *L) { oluacls_class(L, "fgui.ScrollPane"); - oluacls_func(L, "cancelDragging", _fairygui_ScrollPane_cancelDragging); - oluacls_func(L, "getContentSize", _fairygui_ScrollPane_getContentSize); - oluacls_func(L, "getDecelerationRate", _fairygui_ScrollPane_getDecelerationRate); - oluacls_func(L, "getDraggingPane", _fairygui_ScrollPane_getDraggingPane); - oluacls_func(L, "getFooter", _fairygui_ScrollPane_getFooter); - oluacls_func(L, "getHeader", _fairygui_ScrollPane_getHeader); - oluacls_func(L, "getHzScrollBar", _fairygui_ScrollPane_getHzScrollBar); - oluacls_func(L, "getOwner", _fairygui_ScrollPane_getOwner); - oluacls_func(L, "getPageController", _fairygui_ScrollPane_getPageController); - oluacls_func(L, "getPageX", _fairygui_ScrollPane_getPageX); - oluacls_func(L, "getPageY", _fairygui_ScrollPane_getPageY); - oluacls_func(L, "getPercX", _fairygui_ScrollPane_getPercX); - oluacls_func(L, "getPercY", _fairygui_ScrollPane_getPercY); - oluacls_func(L, "getPosX", _fairygui_ScrollPane_getPosX); - oluacls_func(L, "getPosY", _fairygui_ScrollPane_getPosY); - oluacls_func(L, "getScrollStep", _fairygui_ScrollPane_getScrollStep); - oluacls_func(L, "getScrollingPosX", _fairygui_ScrollPane_getScrollingPosX); - oluacls_func(L, "getScrollingPosY", _fairygui_ScrollPane_getScrollingPosY); - oluacls_func(L, "getViewSize", _fairygui_ScrollPane_getViewSize); - oluacls_func(L, "getVtScrollBar", _fairygui_ScrollPane_getVtScrollBar); - oluacls_func(L, "isBottomMost", _fairygui_ScrollPane_isBottomMost); - oluacls_func(L, "isBouncebackEffect", _fairygui_ScrollPane_isBouncebackEffect); - oluacls_func(L, "isChildInView", _fairygui_ScrollPane_isChildInView); - oluacls_func(L, "isInertiaDisabled", _fairygui_ScrollPane_isInertiaDisabled); - oluacls_func(L, "isMouseWheelEnabled", _fairygui_ScrollPane_isMouseWheelEnabled); - oluacls_func(L, "isPageMode", _fairygui_ScrollPane_isPageMode); - oluacls_func(L, "isRightMost", _fairygui_ScrollPane_isRightMost); - oluacls_func(L, "isSnapToItem", _fairygui_ScrollPane_isSnapToItem); - oluacls_func(L, "isTouchEffect", _fairygui_ScrollPane_isTouchEffect); - oluacls_func(L, "lockFooter", _fairygui_ScrollPane_lockFooter); - oluacls_func(L, "lockHeader", _fairygui_ScrollPane_lockHeader); - oluacls_func(L, "new", _fairygui_ScrollPane_new); - oluacls_func(L, "scrollBottom", _fairygui_ScrollPane_scrollBottom); - oluacls_func(L, "scrollDown", _fairygui_ScrollPane_scrollDown); - oluacls_func(L, "scrollLeft", _fairygui_ScrollPane_scrollLeft); - oluacls_func(L, "scrollRight", _fairygui_ScrollPane_scrollRight); - oluacls_func(L, "scrollToView", _fairygui_ScrollPane_scrollToView); - oluacls_func(L, "scrollTop", _fairygui_ScrollPane_scrollTop); - oluacls_func(L, "scrollUp", _fairygui_ScrollPane_scrollUp); - oluacls_func(L, "setBouncebackEffect", _fairygui_ScrollPane_setBouncebackEffect); - oluacls_func(L, "setDecelerationRate", _fairygui_ScrollPane_setDecelerationRate); - oluacls_func(L, "setInertiaDisabled", _fairygui_ScrollPane_setInertiaDisabled); - oluacls_func(L, "setMouseWheelEnabled", _fairygui_ScrollPane_setMouseWheelEnabled); - oluacls_func(L, "setPageController", _fairygui_ScrollPane_setPageController); - oluacls_func(L, "setPageMode", _fairygui_ScrollPane_setPageMode); - oluacls_func(L, "setPageX", _fairygui_ScrollPane_setPageX); - oluacls_func(L, "setPageY", _fairygui_ScrollPane_setPageY); - oluacls_func(L, "setPercX", _fairygui_ScrollPane_setPercX); - oluacls_func(L, "setPercY", _fairygui_ScrollPane_setPercY); - oluacls_func(L, "setPosX", _fairygui_ScrollPane_setPosX); - oluacls_func(L, "setPosY", _fairygui_ScrollPane_setPosY); - oluacls_func(L, "setScrollStep", _fairygui_ScrollPane_setScrollStep); - oluacls_func(L, "setSnapToItem", _fairygui_ScrollPane_setSnapToItem); - oluacls_func(L, "setTouchEffect", _fairygui_ScrollPane_setTouchEffect); - oluacls_prop(L, "bottomMost", _fairygui_ScrollPane_isBottomMost, nullptr); - oluacls_prop(L, "bouncebackEffect", _fairygui_ScrollPane_isBouncebackEffect, _fairygui_ScrollPane_setBouncebackEffect); - oluacls_prop(L, "contentSize", _fairygui_ScrollPane_getContentSize, nullptr); - oluacls_prop(L, "decelerationRate", _fairygui_ScrollPane_getDecelerationRate, _fairygui_ScrollPane_setDecelerationRate); - oluacls_prop(L, "draggingPane", _fairygui_ScrollPane_getDraggingPane, nullptr); - oluacls_prop(L, "footer", _fairygui_ScrollPane_getFooter, nullptr); - oluacls_prop(L, "header", _fairygui_ScrollPane_getHeader, nullptr); - oluacls_prop(L, "hzScrollBar", _fairygui_ScrollPane_getHzScrollBar, nullptr); - oluacls_prop(L, "inertiaDisabled", _fairygui_ScrollPane_isInertiaDisabled, _fairygui_ScrollPane_setInertiaDisabled); - oluacls_prop(L, "mouseWheelEnabled", _fairygui_ScrollPane_isMouseWheelEnabled, _fairygui_ScrollPane_setMouseWheelEnabled); - oluacls_prop(L, "owner", _fairygui_ScrollPane_getOwner, nullptr); - oluacls_prop(L, "pageController", _fairygui_ScrollPane_getPageController, _fairygui_ScrollPane_setPageController); - oluacls_prop(L, "pageMode", _fairygui_ScrollPane_isPageMode, _fairygui_ScrollPane_setPageMode); - oluacls_prop(L, "pageX", _fairygui_ScrollPane_getPageX, _fairygui_ScrollPane_setPageX); - oluacls_prop(L, "pageY", _fairygui_ScrollPane_getPageY, _fairygui_ScrollPane_setPageY); - oluacls_prop(L, "percX", _fairygui_ScrollPane_getPercX, _fairygui_ScrollPane_setPercX); - oluacls_prop(L, "percY", _fairygui_ScrollPane_getPercY, _fairygui_ScrollPane_setPercY); - oluacls_prop(L, "posX", _fairygui_ScrollPane_getPosX, _fairygui_ScrollPane_setPosX); - oluacls_prop(L, "posY", _fairygui_ScrollPane_getPosY, _fairygui_ScrollPane_setPosY); - oluacls_prop(L, "rightMost", _fairygui_ScrollPane_isRightMost, nullptr); - oluacls_prop(L, "scrollStep", _fairygui_ScrollPane_getScrollStep, _fairygui_ScrollPane_setScrollStep); - oluacls_prop(L, "scrollingPosX", _fairygui_ScrollPane_getScrollingPosX, nullptr); - oluacls_prop(L, "scrollingPosY", _fairygui_ScrollPane_getScrollingPosY, nullptr); - oluacls_prop(L, "snapToItem", _fairygui_ScrollPane_isSnapToItem, _fairygui_ScrollPane_setSnapToItem); - oluacls_prop(L, "touchEffect", _fairygui_ScrollPane_isTouchEffect, _fairygui_ScrollPane_setTouchEffect); - oluacls_prop(L, "viewSize", _fairygui_ScrollPane_getViewSize, nullptr); - oluacls_prop(L, "vtScrollBar", _fairygui_ScrollPane_getVtScrollBar, nullptr); + oluacls_func(L, "cancelDragging", _olua_fun_fairygui_ScrollPane_cancelDragging); + oluacls_func(L, "getContentSize", _olua_fun_fairygui_ScrollPane_getContentSize); + oluacls_func(L, "getDecelerationRate", _olua_fun_fairygui_ScrollPane_getDecelerationRate); + oluacls_func(L, "getDraggingPane", _olua_fun_fairygui_ScrollPane_getDraggingPane); + oluacls_func(L, "getFooter", _olua_fun_fairygui_ScrollPane_getFooter); + oluacls_func(L, "getHeader", _olua_fun_fairygui_ScrollPane_getHeader); + oluacls_func(L, "getHzScrollBar", _olua_fun_fairygui_ScrollPane_getHzScrollBar); + oluacls_func(L, "getOwner", _olua_fun_fairygui_ScrollPane_getOwner); + oluacls_func(L, "getPageController", _olua_fun_fairygui_ScrollPane_getPageController); + oluacls_func(L, "getPageX", _olua_fun_fairygui_ScrollPane_getPageX); + oluacls_func(L, "getPageY", _olua_fun_fairygui_ScrollPane_getPageY); + oluacls_func(L, "getPercX", _olua_fun_fairygui_ScrollPane_getPercX); + oluacls_func(L, "getPercY", _olua_fun_fairygui_ScrollPane_getPercY); + oluacls_func(L, "getPosX", _olua_fun_fairygui_ScrollPane_getPosX); + oluacls_func(L, "getPosY", _olua_fun_fairygui_ScrollPane_getPosY); + oluacls_func(L, "getScrollStep", _olua_fun_fairygui_ScrollPane_getScrollStep); + oluacls_func(L, "getScrollingPosX", _olua_fun_fairygui_ScrollPane_getScrollingPosX); + oluacls_func(L, "getScrollingPosY", _olua_fun_fairygui_ScrollPane_getScrollingPosY); + oluacls_func(L, "getViewSize", _olua_fun_fairygui_ScrollPane_getViewSize); + oluacls_func(L, "getVtScrollBar", _olua_fun_fairygui_ScrollPane_getVtScrollBar); + oluacls_func(L, "isBottomMost", _olua_fun_fairygui_ScrollPane_isBottomMost); + oluacls_func(L, "isBouncebackEffect", _olua_fun_fairygui_ScrollPane_isBouncebackEffect); + oluacls_func(L, "isChildInView", _olua_fun_fairygui_ScrollPane_isChildInView); + oluacls_func(L, "isInertiaDisabled", _olua_fun_fairygui_ScrollPane_isInertiaDisabled); + oluacls_func(L, "isMouseWheelEnabled", _olua_fun_fairygui_ScrollPane_isMouseWheelEnabled); + oluacls_func(L, "isPageMode", _olua_fun_fairygui_ScrollPane_isPageMode); + oluacls_func(L, "isRightMost", _olua_fun_fairygui_ScrollPane_isRightMost); + oluacls_func(L, "isSnapToItem", _olua_fun_fairygui_ScrollPane_isSnapToItem); + oluacls_func(L, "isTouchEffect", _olua_fun_fairygui_ScrollPane_isTouchEffect); + oluacls_func(L, "lockFooter", _olua_fun_fairygui_ScrollPane_lockFooter); + oluacls_func(L, "lockHeader", _olua_fun_fairygui_ScrollPane_lockHeader); + oluacls_func(L, "new", _olua_fun_fairygui_ScrollPane_new); + oluacls_func(L, "scrollBottom", _olua_fun_fairygui_ScrollPane_scrollBottom); + oluacls_func(L, "scrollDown", _olua_fun_fairygui_ScrollPane_scrollDown); + oluacls_func(L, "scrollLeft", _olua_fun_fairygui_ScrollPane_scrollLeft); + oluacls_func(L, "scrollRight", _olua_fun_fairygui_ScrollPane_scrollRight); + oluacls_func(L, "scrollToView", _olua_fun_fairygui_ScrollPane_scrollToView); + oluacls_func(L, "scrollTop", _olua_fun_fairygui_ScrollPane_scrollTop); + oluacls_func(L, "scrollUp", _olua_fun_fairygui_ScrollPane_scrollUp); + oluacls_func(L, "setBouncebackEffect", _olua_fun_fairygui_ScrollPane_setBouncebackEffect); + oluacls_func(L, "setDecelerationRate", _olua_fun_fairygui_ScrollPane_setDecelerationRate); + oluacls_func(L, "setInertiaDisabled", _olua_fun_fairygui_ScrollPane_setInertiaDisabled); + oluacls_func(L, "setMouseWheelEnabled", _olua_fun_fairygui_ScrollPane_setMouseWheelEnabled); + oluacls_func(L, "setPageController", _olua_fun_fairygui_ScrollPane_setPageController); + oluacls_func(L, "setPageMode", _olua_fun_fairygui_ScrollPane_setPageMode); + oluacls_func(L, "setPageX", _olua_fun_fairygui_ScrollPane_setPageX); + oluacls_func(L, "setPageY", _olua_fun_fairygui_ScrollPane_setPageY); + oluacls_func(L, "setPercX", _olua_fun_fairygui_ScrollPane_setPercX); + oluacls_func(L, "setPercY", _olua_fun_fairygui_ScrollPane_setPercY); + oluacls_func(L, "setPosX", _olua_fun_fairygui_ScrollPane_setPosX); + oluacls_func(L, "setPosY", _olua_fun_fairygui_ScrollPane_setPosY); + oluacls_func(L, "setScrollStep", _olua_fun_fairygui_ScrollPane_setScrollStep); + oluacls_func(L, "setSnapToItem", _olua_fun_fairygui_ScrollPane_setSnapToItem); + oluacls_func(L, "setTouchEffect", _olua_fun_fairygui_ScrollPane_setTouchEffect); + oluacls_prop(L, "bottomMost", _olua_fun_fairygui_ScrollPane_isBottomMost, nullptr); + oluacls_prop(L, "bouncebackEffect", _olua_fun_fairygui_ScrollPane_isBouncebackEffect, _olua_fun_fairygui_ScrollPane_setBouncebackEffect); + oluacls_prop(L, "contentSize", _olua_fun_fairygui_ScrollPane_getContentSize, nullptr); + oluacls_prop(L, "decelerationRate", _olua_fun_fairygui_ScrollPane_getDecelerationRate, _olua_fun_fairygui_ScrollPane_setDecelerationRate); + oluacls_prop(L, "draggingPane", _olua_fun_fairygui_ScrollPane_getDraggingPane, nullptr); + oluacls_prop(L, "footer", _olua_fun_fairygui_ScrollPane_getFooter, nullptr); + oluacls_prop(L, "header", _olua_fun_fairygui_ScrollPane_getHeader, nullptr); + oluacls_prop(L, "hzScrollBar", _olua_fun_fairygui_ScrollPane_getHzScrollBar, nullptr); + oluacls_prop(L, "inertiaDisabled", _olua_fun_fairygui_ScrollPane_isInertiaDisabled, _olua_fun_fairygui_ScrollPane_setInertiaDisabled); + oluacls_prop(L, "mouseWheelEnabled", _olua_fun_fairygui_ScrollPane_isMouseWheelEnabled, _olua_fun_fairygui_ScrollPane_setMouseWheelEnabled); + oluacls_prop(L, "owner", _olua_fun_fairygui_ScrollPane_getOwner, nullptr); + oluacls_prop(L, "pageController", _olua_fun_fairygui_ScrollPane_getPageController, _olua_fun_fairygui_ScrollPane_setPageController); + oluacls_prop(L, "pageMode", _olua_fun_fairygui_ScrollPane_isPageMode, _olua_fun_fairygui_ScrollPane_setPageMode); + oluacls_prop(L, "pageX", _olua_fun_fairygui_ScrollPane_getPageX, nullptr); + oluacls_prop(L, "pageY", _olua_fun_fairygui_ScrollPane_getPageY, nullptr); + oluacls_prop(L, "percX", _olua_fun_fairygui_ScrollPane_getPercX, nullptr); + oluacls_prop(L, "percY", _olua_fun_fairygui_ScrollPane_getPercY, nullptr); + oluacls_prop(L, "posX", _olua_fun_fairygui_ScrollPane_getPosX, nullptr); + oluacls_prop(L, "posY", _olua_fun_fairygui_ScrollPane_getPosY, nullptr); + oluacls_prop(L, "rightMost", _olua_fun_fairygui_ScrollPane_isRightMost, nullptr); + oluacls_prop(L, "scrollStep", _olua_fun_fairygui_ScrollPane_getScrollStep, _olua_fun_fairygui_ScrollPane_setScrollStep); + oluacls_prop(L, "scrollingPosX", _olua_fun_fairygui_ScrollPane_getScrollingPosX, nullptr); + oluacls_prop(L, "scrollingPosY", _olua_fun_fairygui_ScrollPane_getScrollingPosY, nullptr); + oluacls_prop(L, "snapToItem", _olua_fun_fairygui_ScrollPane_isSnapToItem, _olua_fun_fairygui_ScrollPane_setSnapToItem); + oluacls_prop(L, "touchEffect", _olua_fun_fairygui_ScrollPane_isTouchEffect, _olua_fun_fairygui_ScrollPane_setTouchEffect); + oluacls_prop(L, "viewSize", _olua_fun_fairygui_ScrollPane_getViewSize, nullptr); + oluacls_prop(L, "vtScrollBar", _olua_fun_fairygui_ScrollPane_getVtScrollBar, nullptr); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_fgui_ScrollPane(lua_State *L) +{ + olua_require(L, "fairygui", luaopen_fairygui); + if (!olua_getclass(L, "fgui.ScrollPane")) { + luaL_error(L, "class not found: fairygui::ScrollPane"); + } + return 1; +} OLUA_END_DECLS -static int _fairygui_Transition_PlayCompleteCallback___call(lua_State *L) +static int _olua_fun_fairygui_Transition_PlayCompleteCallback___call(lua_State *L) { olua_startinvoke(L); luaL_checktype(L, -1, LUA_TFUNCTION); - olua_push_callback(L, (fairygui::Transition::PlayCompleteCallback *)nullptr, "fgui.Transition::PlayCompleteCallback"); + olua_push_callback(L, (fairygui::Transition::PlayCompleteCallback *)nullptr, "fgui.Transition.PlayCompleteCallback"); olua_endinvoke(L); return 1; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_fairygui_Transition_PlayCompleteCallback(lua_State *L) +static int _olua_cls_fgui_Transition_PlayCompleteCallback(lua_State *L) { - oluacls_class(L, "fgui.Transition::PlayCompleteCallback"); - oluacls_func(L, "__call", _fairygui_Transition_PlayCompleteCallback___call); + oluacls_class(L, "fgui.Transition.PlayCompleteCallback"); + oluacls_func(L, "__call", _olua_fun_fairygui_Transition_PlayCompleteCallback___call); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_fgui_Transition_PlayCompleteCallback(lua_State *L) +{ + olua_require(L, "fairygui", luaopen_fairygui); + if (!olua_getclass(L, "fgui.Transition.PlayCompleteCallback")) { + luaL_error(L, "class not found: fairygui::Transition::PlayCompleteCallback"); + } return 1; } OLUA_END_DECLS -static int _fairygui_Transition_TransitionHook___call(lua_State *L) +static int _olua_fun_fairygui_Transition_TransitionHook___call(lua_State *L) { olua_startinvoke(L); luaL_checktype(L, -1, LUA_TFUNCTION); - olua_push_callback(L, (fairygui::Transition::TransitionHook *)nullptr, "fgui.Transition::TransitionHook"); + olua_push_callback(L, (fairygui::Transition::TransitionHook *)nullptr, "fgui.Transition.TransitionHook"); olua_endinvoke(L); return 1; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_fairygui_Transition_TransitionHook(lua_State *L) +static int _olua_cls_fgui_Transition_TransitionHook(lua_State *L) { - oluacls_class(L, "fgui.Transition::TransitionHook"); - oluacls_func(L, "__call", _fairygui_Transition_TransitionHook___call); + oluacls_class(L, "fgui.Transition.TransitionHook"); + oluacls_func(L, "__call", _olua_fun_fairygui_Transition_TransitionHook___call); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_fgui_Transition_TransitionHook(lua_State *L) +{ + olua_require(L, "fairygui", luaopen_fairygui); + if (!olua_getclass(L, "fgui.Transition.TransitionHook")) { + luaL_error(L, "class not found: fairygui::Transition::TransitionHook"); + } return 1; } OLUA_END_DECLS -static int _fairygui_Transition_changePlayTimes(lua_State *L) +static int _olua_fun_fairygui_Transition_changePlayTimes(lua_State *L) { olua_startinvoke(L); @@ -22415,7 +24396,7 @@ static int _fairygui_Transition_changePlayTimes(lua_State *L) return 0; } -static int _fairygui_Transition_clearHooks(lua_State *L) +static int _olua_fun_fairygui_Transition_clearHooks(lua_State *L) { olua_startinvoke(L); @@ -22435,7 +24416,7 @@ static int _fairygui_Transition_clearHooks(lua_State *L) return 0; } -static int _fairygui_Transition_getLabelTime(lua_State *L) +static int _olua_fun_fairygui_Transition_getLabelTime(lua_State *L) { olua_startinvoke(L); @@ -22454,7 +24435,7 @@ static int _fairygui_Transition_getLabelTime(lua_State *L) return num_ret; } -static int _fairygui_Transition_getOwner(lua_State *L) +static int _olua_fun_fairygui_Transition_getOwner(lua_State *L) { olua_startinvoke(L); @@ -22474,7 +24455,7 @@ static int _fairygui_Transition_getOwner(lua_State *L) return num_ret; } -static int _fairygui_Transition_getTimeScale(lua_State *L) +static int _olua_fun_fairygui_Transition_getTimeScale(lua_State *L) { olua_startinvoke(L); @@ -22491,7 +24472,7 @@ static int _fairygui_Transition_getTimeScale(lua_State *L) return num_ret; } -static int _fairygui_Transition_isPlaying(lua_State *L) +static int _olua_fun_fairygui_Transition_isPlaying(lua_State *L) { olua_startinvoke(L); @@ -22508,7 +24489,63 @@ static int _fairygui_Transition_isPlaying(lua_State *L) return num_ret; } -static int _fairygui_Transition_new(lua_State *L) +static int _olua_fun_fairygui_Transition_name$1(lua_State *L) +{ + olua_startinvoke(L); + + fairygui::Transition *self = nullptr; + + olua_to_object(L, 1, &self, "fgui.Transition"); + + // std::string name + std::string ret = self->name; + int num_ret = olua_push_string(L, ret); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_fairygui_Transition_name$2(lua_State *L) +{ + olua_startinvoke(L); + + fairygui::Transition *self = nullptr; + std::string arg1; /** name */ + + olua_to_object(L, 1, &self, "fgui.Transition"); + olua_check_string(L, 2, &arg1); + + // std::string name + self->name = arg1; + + olua_endinvoke(L); + + return 0; +} + +static int _olua_fun_fairygui_Transition_name(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // std::string name + return _olua_fun_fairygui_Transition_name$1(L); + } + + if (num_args == 1) { + // if ((olua_is_string(L, 2))) { + // std::string name + return _olua_fun_fairygui_Transition_name$2(L); + // } + } + + luaL_error(L, "method 'fairygui::Transition::name' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_fairygui_Transition_new(lua_State *L) { olua_startinvoke(L); @@ -22516,7 +24553,7 @@ static int _fairygui_Transition_new(lua_State *L) olua_check_object(L, 1, &arg1, "fgui.GComponent"); - // Transition(fairygui::GComponent *owner) + // fairygui::Transition(fairygui::GComponent *owner) fairygui::Transition *ret = new fairygui::Transition(arg1); int num_ret = olua_push_object(L, ret, "fgui.Transition"); olua_postnew(L, ret); @@ -22526,7 +24563,7 @@ static int _fairygui_Transition_new(lua_State *L) return num_ret; } -static int _fairygui_Transition_onOwnerAddedToStage(lua_State *L) +static int _olua_fun_fairygui_Transition_onOwnerAddedToStage(lua_State *L) { olua_startinvoke(L); @@ -22542,7 +24579,7 @@ static int _fairygui_Transition_onOwnerAddedToStage(lua_State *L) return 0; } -static int _fairygui_Transition_onOwnerRemovedFromStage(lua_State *L) +static int _olua_fun_fairygui_Transition_onOwnerRemovedFromStage(lua_State *L) { olua_startinvoke(L); @@ -22558,7 +24595,7 @@ static int _fairygui_Transition_onOwnerRemovedFromStage(lua_State *L) return 0; } -static int _fairygui_Transition_play$1(lua_State *L) +static int _olua_fun_fairygui_Transition_play$1(lua_State *L) { olua_startinvoke(L); @@ -22566,15 +24603,16 @@ static int _fairygui_Transition_play$1(lua_State *L) fairygui::Transition::PlayCompleteCallback arg1; /** callback */ olua_to_object(L, 1, &self, "fgui.Transition"); - olua_check_callback(L, 2, &arg1, "fgui.Transition::PlayCompleteCallback"); + olua_check_callback(L, 2, &arg1, "fgui.Transition.PlayCompleteCallback"); void *cb_store = (void *)self; std::string cb_tag = "play"; std::string cb_name; if (olua_isfunction(L, 2)) { - cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx]() { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */]() { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); @@ -22591,7 +24629,7 @@ static int _fairygui_Transition_play$1(lua_State *L) arg1 = nullptr; } - // void play(@localvar @optional fairygui::Transition::PlayCompleteCallback callback) + // void play(@optional fairygui::Transition::PlayCompleteCallback callback) self->play(arg1); olua_endinvoke(L); @@ -22599,7 +24637,23 @@ static int _fairygui_Transition_play$1(lua_State *L) return 0; } -static int _fairygui_Transition_play$2(lua_State *L) +static int _olua_fun_fairygui_Transition_play$2(lua_State *L) +{ + olua_startinvoke(L); + + fairygui::Transition *self = nullptr; + + olua_to_object(L, 1, &self, "fgui.Transition"); + + // void play() + self->play(); + + olua_endinvoke(L); + + return 0; +} + +static int _olua_fun_fairygui_Transition_play$3(lua_State *L) { olua_startinvoke(L); @@ -22611,15 +24665,16 @@ static int _fairygui_Transition_play$2(lua_State *L) olua_to_object(L, 1, &self, "fgui.Transition"); olua_check_integer(L, 2, &arg1); olua_check_number(L, 3, &arg2); - olua_check_callback(L, 4, &arg3, "fgui.Transition::PlayCompleteCallback"); + olua_check_callback(L, 4, &arg3, "fgui.Transition.PlayCompleteCallback"); void *cb_store = (void *)self; std::string cb_tag = "play"; std::string cb_name; if (olua_isfunction(L, 4)) { - cb_name = olua_setcallback(L, cb_store, 4, cb_tag.c_str(), OLUA_TAG_REPLACE); + cb_name = olua_setcallback(L, cb_store, 4, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg3 = [cb_store, cb_name, cb_ctx]() { + // lua_State *ML = olua_mainthread(L); + arg3 = [cb_store, cb_name, cb_ctx /*, ML */]() { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); @@ -22636,7 +24691,7 @@ static int _fairygui_Transition_play$2(lua_State *L) arg3 = nullptr; } - // void play(int times, float delay, @localvar @optional fairygui::Transition::PlayCompleteCallback callback) + // void play(int times, float delay, @optional fairygui::Transition::PlayCompleteCallback callback) self->play(arg1, arg2, arg3); olua_endinvoke(L); @@ -22644,7 +24699,27 @@ static int _fairygui_Transition_play$2(lua_State *L) return 0; } -static int _fairygui_Transition_play$3(lua_State *L) +static int _olua_fun_fairygui_Transition_play$4(lua_State *L) +{ + olua_startinvoke(L); + + fairygui::Transition *self = nullptr; + int arg1 = 0; /** times */ + float arg2 = 0; /** delay */ + + olua_to_object(L, 1, &self, "fgui.Transition"); + olua_check_integer(L, 2, &arg1); + olua_check_number(L, 3, &arg2); + + // void play(int times, float delay) + self->play(arg1, arg2); + + olua_endinvoke(L); + + return 0; +} + +static int _olua_fun_fairygui_Transition_play$5(lua_State *L) { olua_startinvoke(L); @@ -22660,15 +24735,16 @@ static int _fairygui_Transition_play$3(lua_State *L) olua_check_number(L, 3, &arg2); olua_check_number(L, 4, &arg3); olua_check_number(L, 5, &arg4); - olua_check_callback(L, 6, &arg5, "fgui.Transition::PlayCompleteCallback"); + olua_check_callback(L, 6, &arg5, "fgui.Transition.PlayCompleteCallback"); void *cb_store = (void *)self; std::string cb_tag = "play"; std::string cb_name; if (olua_isfunction(L, 6)) { - cb_name = olua_setcallback(L, cb_store, 6, cb_tag.c_str(), OLUA_TAG_REPLACE); + cb_name = olua_setcallback(L, cb_store, 6, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg5 = [cb_store, cb_name, cb_ctx]() { + // lua_State *ML = olua_mainthread(L); + arg5 = [cb_store, cb_name, cb_ctx /*, ML */]() { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); @@ -22685,7 +24761,7 @@ static int _fairygui_Transition_play$3(lua_State *L) arg5 = nullptr; } - // void play(int times, float delay, float startTime, float endTime, @localvar @optional fairygui::Transition::PlayCompleteCallback callback) + // void play(int times, float delay, float startTime, float endTime, @optional fairygui::Transition::PlayCompleteCallback callback) self->play(arg1, arg2, arg3, arg4, arg5); olua_endinvoke(L); @@ -22693,43 +24769,7 @@ static int _fairygui_Transition_play$3(lua_State *L) return 0; } -static int _fairygui_Transition_play$4(lua_State *L) -{ - olua_startinvoke(L); - - fairygui::Transition *self = nullptr; - - olua_to_object(L, 1, &self, "fgui.Transition"); - - // void play(@localvar @optional fairygui::Transition::PlayCompleteCallback callback) - self->play(); - - olua_endinvoke(L); - - return 0; -} - -static int _fairygui_Transition_play$5(lua_State *L) -{ - olua_startinvoke(L); - - fairygui::Transition *self = nullptr; - int arg1 = 0; /** times */ - float arg2 = 0; /** delay */ - - olua_to_object(L, 1, &self, "fgui.Transition"); - olua_check_integer(L, 2, &arg1); - olua_check_number(L, 3, &arg2); - - // void play(int times, float delay, @localvar @optional fairygui::Transition::PlayCompleteCallback callback) - self->play(arg1, arg2); - - olua_endinvoke(L); - - return 0; -} - -static int _fairygui_Transition_play$6(lua_State *L) +static int _olua_fun_fairygui_Transition_play$6(lua_State *L) { olua_startinvoke(L); @@ -22745,7 +24785,7 @@ static int _fairygui_Transition_play$6(lua_State *L) olua_check_number(L, 4, &arg3); olua_check_number(L, 5, &arg4); - // void play(int times, float delay, float startTime, float endTime, @localvar @optional fairygui::Transition::PlayCompleteCallback callback) + // void play(int times, float delay, float startTime, float endTime) self->play(arg1, arg2, arg3, arg4); olua_endinvoke(L); @@ -22753,47 +24793,47 @@ static int _fairygui_Transition_play$6(lua_State *L) return 0; } -static int _fairygui_Transition_play(lua_State *L) +static int _olua_fun_fairygui_Transition_play(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 0) { - // void play(@localvar @optional fairygui::Transition::PlayCompleteCallback callback) - return _fairygui_Transition_play$4(L); + // void play() + return _olua_fun_fairygui_Transition_play$2(L); } if (num_args == 1) { - // if ((olua_is_callback(L, 2, "fgui.Transition::PlayCompleteCallback"))) { - // void play(@localvar @optional fairygui::Transition::PlayCompleteCallback callback) - return _fairygui_Transition_play$1(L); + // if ((olua_is_callback(L, 2, "fgui.Transition.PlayCompleteCallback"))) { + // void play(@optional fairygui::Transition::PlayCompleteCallback callback) + return _olua_fun_fairygui_Transition_play$1(L); // } } if (num_args == 2) { // if ((olua_is_integer(L, 2)) && (olua_is_number(L, 3))) { - // void play(int times, float delay, @localvar @optional fairygui::Transition::PlayCompleteCallback callback) - return _fairygui_Transition_play$5(L); + // void play(int times, float delay) + return _olua_fun_fairygui_Transition_play$4(L); // } } if (num_args == 3) { - // if ((olua_is_integer(L, 2)) && (olua_is_number(L, 3)) && (olua_is_callback(L, 4, "fgui.Transition::PlayCompleteCallback"))) { - // void play(int times, float delay, @localvar @optional fairygui::Transition::PlayCompleteCallback callback) - return _fairygui_Transition_play$2(L); + // if ((olua_is_integer(L, 2)) && (olua_is_number(L, 3)) && (olua_is_callback(L, 4, "fgui.Transition.PlayCompleteCallback"))) { + // void play(int times, float delay, @optional fairygui::Transition::PlayCompleteCallback callback) + return _olua_fun_fairygui_Transition_play$3(L); // } } if (num_args == 4) { // if ((olua_is_integer(L, 2)) && (olua_is_number(L, 3)) && (olua_is_number(L, 4)) && (olua_is_number(L, 5))) { - // void play(int times, float delay, float startTime, float endTime, @localvar @optional fairygui::Transition::PlayCompleteCallback callback) - return _fairygui_Transition_play$6(L); + // void play(int times, float delay, float startTime, float endTime) + return _olua_fun_fairygui_Transition_play$6(L); // } } if (num_args == 5) { - // if ((olua_is_integer(L, 2)) && (olua_is_number(L, 3)) && (olua_is_number(L, 4)) && (olua_is_number(L, 5)) && (olua_is_callback(L, 6, "fgui.Transition::PlayCompleteCallback"))) { - // void play(int times, float delay, float startTime, float endTime, @localvar @optional fairygui::Transition::PlayCompleteCallback callback) - return _fairygui_Transition_play$3(L); + // if ((olua_is_integer(L, 2)) && (olua_is_number(L, 3)) && (olua_is_number(L, 4)) && (olua_is_number(L, 5)) && (olua_is_callback(L, 6, "fgui.Transition.PlayCompleteCallback"))) { + // void play(int times, float delay, float startTime, float endTime, @optional fairygui::Transition::PlayCompleteCallback callback) + return _olua_fun_fairygui_Transition_play$5(L); // } } @@ -22802,7 +24842,7 @@ static int _fairygui_Transition_play(lua_State *L) return 0; } -static int _fairygui_Transition_playReverse$1(lua_State *L) +static int _olua_fun_fairygui_Transition_playReverse$1(lua_State *L) { olua_startinvoke(L); @@ -22810,15 +24850,16 @@ static int _fairygui_Transition_playReverse$1(lua_State *L) fairygui::Transition::PlayCompleteCallback arg1; /** callback */ olua_to_object(L, 1, &self, "fgui.Transition"); - olua_check_callback(L, 2, &arg1, "fgui.Transition::PlayCompleteCallback"); + olua_check_callback(L, 2, &arg1, "fgui.Transition.PlayCompleteCallback"); void *cb_store = (void *)self; std::string cb_tag = "playReverse"; std::string cb_name; if (olua_isfunction(L, 2)) { - cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx]() { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */]() { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); @@ -22835,7 +24876,7 @@ static int _fairygui_Transition_playReverse$1(lua_State *L) arg1 = nullptr; } - // void playReverse(@localvar @optional fairygui::Transition::PlayCompleteCallback callback) + // void playReverse(@optional fairygui::Transition::PlayCompleteCallback callback) self->playReverse(arg1); olua_endinvoke(L); @@ -22843,7 +24884,23 @@ static int _fairygui_Transition_playReverse$1(lua_State *L) return 0; } -static int _fairygui_Transition_playReverse$2(lua_State *L) +static int _olua_fun_fairygui_Transition_playReverse$2(lua_State *L) +{ + olua_startinvoke(L); + + fairygui::Transition *self = nullptr; + + olua_to_object(L, 1, &self, "fgui.Transition"); + + // void playReverse() + self->playReverse(); + + olua_endinvoke(L); + + return 0; +} + +static int _olua_fun_fairygui_Transition_playReverse$3(lua_State *L) { olua_startinvoke(L); @@ -22855,15 +24912,16 @@ static int _fairygui_Transition_playReverse$2(lua_State *L) olua_to_object(L, 1, &self, "fgui.Transition"); olua_check_integer(L, 2, &arg1); olua_check_number(L, 3, &arg2); - olua_check_callback(L, 4, &arg3, "fgui.Transition::PlayCompleteCallback"); + olua_check_callback(L, 4, &arg3, "fgui.Transition.PlayCompleteCallback"); void *cb_store = (void *)self; std::string cb_tag = "playReverse"; std::string cb_name; if (olua_isfunction(L, 4)) { - cb_name = olua_setcallback(L, cb_store, 4, cb_tag.c_str(), OLUA_TAG_REPLACE); + cb_name = olua_setcallback(L, cb_store, 4, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg3 = [cb_store, cb_name, cb_ctx]() { + // lua_State *ML = olua_mainthread(L); + arg3 = [cb_store, cb_name, cb_ctx /*, ML */]() { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); @@ -22880,7 +24938,7 @@ static int _fairygui_Transition_playReverse$2(lua_State *L) arg3 = nullptr; } - // void playReverse(int times, float delay, @localvar @optional fairygui::Transition::PlayCompleteCallback callback) + // void playReverse(int times, float delay, @optional fairygui::Transition::PlayCompleteCallback callback) self->playReverse(arg1, arg2, arg3); olua_endinvoke(L); @@ -22888,35 +24946,19 @@ static int _fairygui_Transition_playReverse$2(lua_State *L) return 0; } -static int _fairygui_Transition_playReverse$3(lua_State *L) +static int _olua_fun_fairygui_Transition_playReverse$4(lua_State *L) { olua_startinvoke(L); fairygui::Transition *self = nullptr; - - olua_to_object(L, 1, &self, "fgui.Transition"); - - // void playReverse(@localvar @optional fairygui::Transition::PlayCompleteCallback callback) - self->playReverse(); - - olua_endinvoke(L); - - return 0; -} - -static int _fairygui_Transition_playReverse$4(lua_State *L) -{ - olua_startinvoke(L); - - fairygui::Transition *self = nullptr; - int arg1 = 0; /** times */ - float arg2 = 0; /** delay */ + int arg1 = 0; /** times */ + float arg2 = 0; /** delay */ olua_to_object(L, 1, &self, "fgui.Transition"); olua_check_integer(L, 2, &arg1); olua_check_number(L, 3, &arg2); - // void playReverse(int times, float delay, @localvar @optional fairygui::Transition::PlayCompleteCallback callback) + // void playReverse(int times, float delay) self->playReverse(arg1, arg2); olua_endinvoke(L); @@ -22924,33 +24966,33 @@ static int _fairygui_Transition_playReverse$4(lua_State *L) return 0; } -static int _fairygui_Transition_playReverse(lua_State *L) +static int _olua_fun_fairygui_Transition_playReverse(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 0) { - // void playReverse(@localvar @optional fairygui::Transition::PlayCompleteCallback callback) - return _fairygui_Transition_playReverse$3(L); + // void playReverse() + return _olua_fun_fairygui_Transition_playReverse$2(L); } if (num_args == 1) { - // if ((olua_is_callback(L, 2, "fgui.Transition::PlayCompleteCallback"))) { - // void playReverse(@localvar @optional fairygui::Transition::PlayCompleteCallback callback) - return _fairygui_Transition_playReverse$1(L); + // if ((olua_is_callback(L, 2, "fgui.Transition.PlayCompleteCallback"))) { + // void playReverse(@optional fairygui::Transition::PlayCompleteCallback callback) + return _olua_fun_fairygui_Transition_playReverse$1(L); // } } if (num_args == 2) { // if ((olua_is_integer(L, 2)) && (olua_is_number(L, 3))) { - // void playReverse(int times, float delay, @localvar @optional fairygui::Transition::PlayCompleteCallback callback) - return _fairygui_Transition_playReverse$4(L); + // void playReverse(int times, float delay) + return _olua_fun_fairygui_Transition_playReverse$4(L); // } } if (num_args == 3) { - // if ((olua_is_integer(L, 2)) && (olua_is_number(L, 3)) && (olua_is_callback(L, 4, "fgui.Transition::PlayCompleteCallback"))) { - // void playReverse(int times, float delay, @localvar @optional fairygui::Transition::PlayCompleteCallback callback) - return _fairygui_Transition_playReverse$2(L); + // if ((olua_is_integer(L, 2)) && (olua_is_number(L, 3)) && (olua_is_callback(L, 4, "fgui.Transition.PlayCompleteCallback"))) { + // void playReverse(int times, float delay, @optional fairygui::Transition::PlayCompleteCallback callback) + return _olua_fun_fairygui_Transition_playReverse$3(L); // } } @@ -22959,7 +25001,7 @@ static int _fairygui_Transition_playReverse(lua_State *L) return 0; } -static int _fairygui_Transition_setAutoPlay(lua_State *L) +static int _olua_fun_fairygui_Transition_setAutoPlay(lua_State *L) { olua_startinvoke(L); @@ -22981,7 +25023,7 @@ static int _fairygui_Transition_setAutoPlay(lua_State *L) return 0; } -static int _fairygui_Transition_setDuration(lua_State *L) +static int _olua_fun_fairygui_Transition_setDuration(lua_State *L) { olua_startinvoke(L); @@ -23001,7 +25043,7 @@ static int _fairygui_Transition_setDuration(lua_State *L) return 0; } -static int _fairygui_Transition_setHook(lua_State *L) +static int _olua_fun_fairygui_Transition_setHook(lua_State *L) { olua_startinvoke(L); @@ -23012,16 +25054,17 @@ static int _fairygui_Transition_setHook(lua_State *L) olua_to_object(L, 1, &self, "fgui.Transition"); olua_check_string(L, 2, &arg1); if (!olua_isnoneornil(L, 3)) { - olua_check_callback(L, 3, &arg2, "fgui.Transition::TransitionHook"); + olua_check_callback(L, 3, &arg2, "fgui.Transition.TransitionHook"); } void *cb_store = (void *)self; std::string cb_tag = ("hook." + arg1); std::string cb_name; if (olua_isfunction(L, 3)) { - cb_name = olua_setcallback(L, cb_store, 3, cb_tag.c_str(), OLUA_TAG_REPLACE); + cb_name = olua_setcallback(L, cb_store, 3, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg2 = [cb_store, cb_name, cb_ctx]() { + // lua_State *ML = olua_mainthread(L); + arg2 = [cb_store, cb_name, cb_ctx /*, ML */]() { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); @@ -23038,7 +25081,7 @@ static int _fairygui_Transition_setHook(lua_State *L) arg2 = nullptr; } - // void setHook(const std::string &label, @localvar @nullable fairygui::Transition::TransitionHook callback) + // void setHook(const std::string &label, @nullable fairygui::Transition::TransitionHook callback) self->setHook(arg1, arg2); olua_endinvoke(L); @@ -23046,7 +25089,7 @@ static int _fairygui_Transition_setHook(lua_State *L) return 0; } -static int _fairygui_Transition_setPaused(lua_State *L) +static int _olua_fun_fairygui_Transition_setPaused(lua_State *L) { olua_startinvoke(L); @@ -23064,7 +25107,7 @@ static int _fairygui_Transition_setPaused(lua_State *L) return 0; } -static int _fairygui_Transition_setTarget(lua_State *L) +static int _olua_fun_fairygui_Transition_setTarget(lua_State *L) { olua_startinvoke(L); @@ -23084,7 +25127,7 @@ static int _fairygui_Transition_setTarget(lua_State *L) return 0; } -static int _fairygui_Transition_setTimeScale(lua_State *L) +static int _olua_fun_fairygui_Transition_setTimeScale(lua_State *L) { olua_startinvoke(L); @@ -23102,7 +25145,7 @@ static int _fairygui_Transition_setTimeScale(lua_State *L) return 0; } -static int _fairygui_Transition_setValue(lua_State *L) +static int _olua_fun_fairygui_Transition_setValue(lua_State *L) { olua_startinvoke(L); @@ -23122,7 +25165,7 @@ static int _fairygui_Transition_setValue(lua_State *L) return 0; } -static int _fairygui_Transition_stop$1(lua_State *L) +static int _olua_fun_fairygui_Transition_stop$1(lua_State *L) { olua_startinvoke(L); @@ -23138,7 +25181,7 @@ static int _fairygui_Transition_stop$1(lua_State *L) return 0; } -static int _fairygui_Transition_stop$2(lua_State *L) +static int _olua_fun_fairygui_Transition_stop$2(lua_State *L) { olua_startinvoke(L); @@ -23158,19 +25201,19 @@ static int _fairygui_Transition_stop$2(lua_State *L) return 0; } -static int _fairygui_Transition_stop(lua_State *L) +static int _olua_fun_fairygui_Transition_stop(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 0) { // void stop() - return _fairygui_Transition_stop$1(L); + return _olua_fun_fairygui_Transition_stop$1(L); } if (num_args == 2) { // if ((olua_is_bool(L, 2)) && (olua_is_bool(L, 3))) { // void stop(bool setToComplete, bool processCallback) - return _fairygui_Transition_stop$2(L); + return _olua_fun_fairygui_Transition_stop$2(L); // } } @@ -23179,7 +25222,7 @@ static int _fairygui_Transition_stop(lua_State *L) return 0; } -static int _fairygui_Transition_updateFromRelations(lua_State *L) +static int _olua_fun_fairygui_Transition_updateFromRelations(lua_State *L) { olua_startinvoke(L); @@ -23201,75 +25244,49 @@ static int _fairygui_Transition_updateFromRelations(lua_State *L) return 0; } -static int _fairygui_Transition_get_name(lua_State *L) +static int _olua_cls_fgui_Transition(lua_State *L) { - olua_startinvoke(L); - - fairygui::Transition *self = nullptr; - - olua_to_object(L, 1, &self, "fgui.Transition"); - - // std::string name - std::string ret = self->name; - int num_ret = olua_push_string(L, ret); - - olua_endinvoke(L); - - return num_ret; -} - -static int _fairygui_Transition_set_name(lua_State *L) -{ - olua_startinvoke(L); - - fairygui::Transition *self = nullptr; - std::string arg1; /** name */ - - olua_to_object(L, 1, &self, "fgui.Transition"); - olua_check_string(L, 2, &arg1); - - // std::string name - self->name = arg1; - - olua_endinvoke(L); + oluacls_class(L, "fgui.Transition"); + oluacls_func(L, "changePlayTimes", _olua_fun_fairygui_Transition_changePlayTimes); + oluacls_func(L, "clearHooks", _olua_fun_fairygui_Transition_clearHooks); + oluacls_func(L, "getLabelTime", _olua_fun_fairygui_Transition_getLabelTime); + oluacls_func(L, "getOwner", _olua_fun_fairygui_Transition_getOwner); + oluacls_func(L, "getTimeScale", _olua_fun_fairygui_Transition_getTimeScale); + oluacls_func(L, "isPlaying", _olua_fun_fairygui_Transition_isPlaying); + oluacls_func(L, "new", _olua_fun_fairygui_Transition_new); + oluacls_func(L, "onOwnerAddedToStage", _olua_fun_fairygui_Transition_onOwnerAddedToStage); + oluacls_func(L, "onOwnerRemovedFromStage", _olua_fun_fairygui_Transition_onOwnerRemovedFromStage); + oluacls_func(L, "play", _olua_fun_fairygui_Transition_play); + oluacls_func(L, "playReverse", _olua_fun_fairygui_Transition_playReverse); + oluacls_func(L, "setAutoPlay", _olua_fun_fairygui_Transition_setAutoPlay); + oluacls_func(L, "setDuration", _olua_fun_fairygui_Transition_setDuration); + oluacls_func(L, "setHook", _olua_fun_fairygui_Transition_setHook); + oluacls_func(L, "setPaused", _olua_fun_fairygui_Transition_setPaused); + oluacls_func(L, "setTarget", _olua_fun_fairygui_Transition_setTarget); + oluacls_func(L, "setTimeScale", _olua_fun_fairygui_Transition_setTimeScale); + oluacls_func(L, "setValue", _olua_fun_fairygui_Transition_setValue); + oluacls_func(L, "stop", _olua_fun_fairygui_Transition_stop); + oluacls_func(L, "updateFromRelations", _olua_fun_fairygui_Transition_updateFromRelations); + oluacls_prop(L, "owner", _olua_fun_fairygui_Transition_getOwner, nullptr); + oluacls_prop(L, "playing", _olua_fun_fairygui_Transition_isPlaying, nullptr); + oluacls_prop(L, "timeScale", _olua_fun_fairygui_Transition_getTimeScale, _olua_fun_fairygui_Transition_setTimeScale); + oluacls_prop(L, "name", _olua_fun_fairygui_Transition_name, _olua_fun_fairygui_Transition_name); - return 0; + return 1; } OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_fairygui_Transition(lua_State *L) +OLUA_LIB int luaopen_fgui_Transition(lua_State *L) { - oluacls_class(L, "fgui.Transition"); - oluacls_func(L, "changePlayTimes", _fairygui_Transition_changePlayTimes); - oluacls_func(L, "clearHooks", _fairygui_Transition_clearHooks); - oluacls_func(L, "getLabelTime", _fairygui_Transition_getLabelTime); - oluacls_func(L, "getOwner", _fairygui_Transition_getOwner); - oluacls_func(L, "getTimeScale", _fairygui_Transition_getTimeScale); - oluacls_func(L, "isPlaying", _fairygui_Transition_isPlaying); - oluacls_func(L, "new", _fairygui_Transition_new); - oluacls_func(L, "onOwnerAddedToStage", _fairygui_Transition_onOwnerAddedToStage); - oluacls_func(L, "onOwnerRemovedFromStage", _fairygui_Transition_onOwnerRemovedFromStage); - oluacls_func(L, "play", _fairygui_Transition_play); - oluacls_func(L, "playReverse", _fairygui_Transition_playReverse); - oluacls_func(L, "setAutoPlay", _fairygui_Transition_setAutoPlay); - oluacls_func(L, "setDuration", _fairygui_Transition_setDuration); - oluacls_func(L, "setHook", _fairygui_Transition_setHook); - oluacls_func(L, "setPaused", _fairygui_Transition_setPaused); - oluacls_func(L, "setTarget", _fairygui_Transition_setTarget); - oluacls_func(L, "setTimeScale", _fairygui_Transition_setTimeScale); - oluacls_func(L, "setValue", _fairygui_Transition_setValue); - oluacls_func(L, "stop", _fairygui_Transition_stop); - oluacls_func(L, "updateFromRelations", _fairygui_Transition_updateFromRelations); - oluacls_prop(L, "owner", _fairygui_Transition_getOwner, nullptr); - oluacls_prop(L, "playing", _fairygui_Transition_isPlaying, nullptr); - oluacls_prop(L, "timeScale", _fairygui_Transition_getTimeScale, _fairygui_Transition_setTimeScale); - oluacls_prop(L, "name", _fairygui_Transition_get_name, _fairygui_Transition_set_name); - + olua_require(L, "fairygui", luaopen_fairygui); + if (!olua_getclass(L, "fgui.Transition")) { + luaL_error(L, "class not found: fairygui::Transition"); + } return 1; } OLUA_END_DECLS -static int _fairygui_UIConfig___gc(lua_State *L) +static int _olua_fun_fairygui_UIConfig___gc(lua_State *L) { olua_startinvoke(L); @@ -23281,7 +25298,7 @@ static int _fairygui_UIConfig___gc(lua_State *L) return 0; } -static int _fairygui_UIConfig___olua_move(lua_State *L) +static int _olua_fun_fairygui_UIConfig___olua_move(lua_State *L) { olua_startinvoke(L); @@ -23293,142 +25310,107 @@ static int _fairygui_UIConfig___olua_move(lua_State *L) return 1; } -static int _fairygui_UIConfig_getRealFontName$1(lua_State *L) +static int _olua_fun_fairygui_UIConfig_bringWindowToFrontOnClick$1(lua_State *L) { olua_startinvoke(L); - std::string arg1; /** aliasName */ - bool *arg2 = nullptr; /** isTTF */ - - olua_check_string(L, 1, &arg1); - olua_check_pointer(L, 2, &arg2, "olua.bool"); - - // static const std::string &getRealFontName(const std::string &aliasName, @optional bool *isTTF) - const std::string &ret = fairygui::UIConfig::getRealFontName(arg1, arg2); - int num_ret = olua_push_string(L, ret); + // static bool bringWindowToFrontOnClick + bool ret = fairygui::UIConfig::bringWindowToFrontOnClick; + int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); return num_ret; } -static int _fairygui_UIConfig_getRealFontName$2(lua_State *L) +static int _olua_fun_fairygui_UIConfig_bringWindowToFrontOnClick$2(lua_State *L) { olua_startinvoke(L); - std::string arg1; /** aliasName */ + bool arg1 = false; /** bringWindowToFrontOnClick */ - olua_check_string(L, 1, &arg1); + olua_check_bool(L, 1, &arg1); - // static const std::string &getRealFontName(const std::string &aliasName, @optional bool *isTTF) - const std::string &ret = fairygui::UIConfig::getRealFontName(arg1); - int num_ret = olua_push_string(L, ret); + // static bool bringWindowToFrontOnClick + fairygui::UIConfig::bringWindowToFrontOnClick = arg1; olua_endinvoke(L); - return num_ret; + return 0; } -static int _fairygui_UIConfig_getRealFontName(lua_State *L) +static int _olua_fun_fairygui_UIConfig_bringWindowToFrontOnClick(lua_State *L) { int num_args = lua_gettop(L); - if (num_args == 1) { - // if ((olua_is_string(L, 1))) { - // static const std::string &getRealFontName(const std::string &aliasName, @optional bool *isTTF) - return _fairygui_UIConfig_getRealFontName$2(L); - // } + if (num_args == 0) { + // static bool bringWindowToFrontOnClick + return _olua_fun_fairygui_UIConfig_bringWindowToFrontOnClick$1(L); } - if (num_args == 2) { - // if ((olua_is_string(L, 1)) && (olua_is_pointer(L, 2, "olua.bool"))) { - // static const std::string &getRealFontName(const std::string &aliasName, @optional bool *isTTF) - return _fairygui_UIConfig_getRealFontName$1(L); + if (num_args == 1) { + // if ((olua_is_bool(L, 1))) { + // static bool bringWindowToFrontOnClick + return _olua_fun_fairygui_UIConfig_bringWindowToFrontOnClick$2(L); // } } - luaL_error(L, "method 'fairygui::UIConfig::getRealFontName' not support '%d' arguments", num_args); - - return 0; -} - -static int _fairygui_UIConfig_registerFont(lua_State *L) -{ - olua_startinvoke(L); - - std::string arg1; /** aliasName */ - std::string arg2; /** realName */ - - olua_check_string(L, 1, &arg1); - olua_check_string(L, 2, &arg2); - - // static void registerFont(const std::string &aliasName, const std::string &realName) - fairygui::UIConfig::registerFont(arg1, arg2); - - olua_endinvoke(L); + luaL_error(L, "method 'fairygui::UIConfig::bringWindowToFrontOnClick' not support '%d' arguments", num_args); return 0; } -static int _fairygui_UIConfig_get_bringWindowToFrontOnClick(lua_State *L) +static int _olua_fun_fairygui_UIConfig_buttonSound$1(lua_State *L) { olua_startinvoke(L); - // static bool bringWindowToFrontOnClick - bool ret = fairygui::UIConfig::bringWindowToFrontOnClick; - int num_ret = olua_push_bool(L, ret); + // static std::string buttonSound + std::string ret = fairygui::UIConfig::buttonSound; + int num_ret = olua_push_string(L, ret); olua_endinvoke(L); return num_ret; } -static int _fairygui_UIConfig_set_bringWindowToFrontOnClick(lua_State *L) +static int _olua_fun_fairygui_UIConfig_buttonSound$2(lua_State *L) { olua_startinvoke(L); - bool arg1 = false; /** bringWindowToFrontOnClick */ - - olua_check_bool(L, 1, &arg1); - - // static bool bringWindowToFrontOnClick - fairygui::UIConfig::bringWindowToFrontOnClick = arg1; - - olua_endinvoke(L); - - return 0; -} + std::string arg1; /** buttonSound */ -static int _fairygui_UIConfig_get_buttonSound(lua_State *L) -{ - olua_startinvoke(L); + olua_check_string(L, 1, &arg1); // static std::string buttonSound - std::string ret = fairygui::UIConfig::buttonSound; - int num_ret = olua_push_string(L, ret); + fairygui::UIConfig::buttonSound = arg1; olua_endinvoke(L); - return num_ret; + return 0; } -static int _fairygui_UIConfig_set_buttonSound(lua_State *L) +static int _olua_fun_fairygui_UIConfig_buttonSound(lua_State *L) { - olua_startinvoke(L); - - std::string arg1; /** buttonSound */ + int num_args = lua_gettop(L); - olua_check_string(L, 1, &arg1); + if (num_args == 0) { + // static std::string buttonSound + return _olua_fun_fairygui_UIConfig_buttonSound$1(L); + } - // static std::string buttonSound - fairygui::UIConfig::buttonSound = arg1; + if (num_args == 1) { + // if ((olua_is_string(L, 1))) { + // static std::string buttonSound + return _olua_fun_fairygui_UIConfig_buttonSound$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'fairygui::UIConfig::buttonSound' not support '%d' arguments", num_args); return 0; } -static int _fairygui_UIConfig_get_buttonSoundVolumeScale(lua_State *L) +static int _olua_fun_fairygui_UIConfig_buttonSoundVolumeScale$1(lua_State *L) { olua_startinvoke(L); @@ -23441,7 +25423,7 @@ static int _fairygui_UIConfig_get_buttonSoundVolumeScale(lua_State *L) return num_ret; } -static int _fairygui_UIConfig_set_buttonSoundVolumeScale(lua_State *L) +static int _olua_fun_fairygui_UIConfig_buttonSoundVolumeScale$2(lua_State *L) { olua_startinvoke(L); @@ -23457,7 +25439,28 @@ static int _fairygui_UIConfig_set_buttonSoundVolumeScale(lua_State *L) return 0; } -static int _fairygui_UIConfig_get_clickDragSensitivity(lua_State *L) +static int _olua_fun_fairygui_UIConfig_buttonSoundVolumeScale(lua_State *L) +{ + int num_args = lua_gettop(L); + + if (num_args == 0) { + // static float buttonSoundVolumeScale + return _olua_fun_fairygui_UIConfig_buttonSoundVolumeScale$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 1))) { + // static float buttonSoundVolumeScale + return _olua_fun_fairygui_UIConfig_buttonSoundVolumeScale$2(L); + // } + } + + luaL_error(L, "method 'fairygui::UIConfig::buttonSoundVolumeScale' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_fairygui_UIConfig_clickDragSensitivity$1(lua_State *L) { olua_startinvoke(L); @@ -23470,7 +25473,7 @@ static int _fairygui_UIConfig_get_clickDragSensitivity(lua_State *L) return num_ret; } -static int _fairygui_UIConfig_set_clickDragSensitivity(lua_State *L) +static int _olua_fun_fairygui_UIConfig_clickDragSensitivity$2(lua_State *L) { olua_startinvoke(L); @@ -23486,7 +25489,28 @@ static int _fairygui_UIConfig_set_clickDragSensitivity(lua_State *L) return 0; } -static int _fairygui_UIConfig_get_defaultComboBoxVisibleItemCount(lua_State *L) +static int _olua_fun_fairygui_UIConfig_clickDragSensitivity(lua_State *L) +{ + int num_args = lua_gettop(L); + + if (num_args == 0) { + // static int clickDragSensitivity + return _olua_fun_fairygui_UIConfig_clickDragSensitivity$1(L); + } + + if (num_args == 1) { + // if ((olua_is_integer(L, 1))) { + // static int clickDragSensitivity + return _olua_fun_fairygui_UIConfig_clickDragSensitivity$2(L); + // } + } + + luaL_error(L, "method 'fairygui::UIConfig::clickDragSensitivity' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_fairygui_UIConfig_defaultComboBoxVisibleItemCount$1(lua_State *L) { olua_startinvoke(L); @@ -23499,7 +25523,7 @@ static int _fairygui_UIConfig_get_defaultComboBoxVisibleItemCount(lua_State *L) return num_ret; } -static int _fairygui_UIConfig_set_defaultComboBoxVisibleItemCount(lua_State *L) +static int _olua_fun_fairygui_UIConfig_defaultComboBoxVisibleItemCount$2(lua_State *L) { olua_startinvoke(L); @@ -23515,7 +25539,28 @@ static int _fairygui_UIConfig_set_defaultComboBoxVisibleItemCount(lua_State *L) return 0; } -static int _fairygui_UIConfig_get_defaultFont(lua_State *L) +static int _olua_fun_fairygui_UIConfig_defaultComboBoxVisibleItemCount(lua_State *L) +{ + int num_args = lua_gettop(L); + + if (num_args == 0) { + // static int defaultComboBoxVisibleItemCount + return _olua_fun_fairygui_UIConfig_defaultComboBoxVisibleItemCount$1(L); + } + + if (num_args == 1) { + // if ((olua_is_integer(L, 1))) { + // static int defaultComboBoxVisibleItemCount + return _olua_fun_fairygui_UIConfig_defaultComboBoxVisibleItemCount$2(L); + // } + } + + luaL_error(L, "method 'fairygui::UIConfig::defaultComboBoxVisibleItemCount' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_fairygui_UIConfig_defaultFont$1(lua_State *L) { olua_startinvoke(L); @@ -23528,7 +25573,7 @@ static int _fairygui_UIConfig_get_defaultFont(lua_State *L) return num_ret; } -static int _fairygui_UIConfig_set_defaultFont(lua_State *L) +static int _olua_fun_fairygui_UIConfig_defaultFont$2(lua_State *L) { olua_startinvoke(L); @@ -23544,7 +25589,28 @@ static int _fairygui_UIConfig_set_defaultFont(lua_State *L) return 0; } -static int _fairygui_UIConfig_get_defaultScrollBarDisplay(lua_State *L) +static int _olua_fun_fairygui_UIConfig_defaultFont(lua_State *L) +{ + int num_args = lua_gettop(L); + + if (num_args == 0) { + // static std::string defaultFont + return _olua_fun_fairygui_UIConfig_defaultFont$1(L); + } + + if (num_args == 1) { + // if ((olua_is_string(L, 1))) { + // static std::string defaultFont + return _olua_fun_fairygui_UIConfig_defaultFont$2(L); + // } + } + + luaL_error(L, "method 'fairygui::UIConfig::defaultFont' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_fairygui_UIConfig_defaultScrollBarDisplay$1(lua_State *L) { olua_startinvoke(L); @@ -23557,7 +25623,7 @@ static int _fairygui_UIConfig_get_defaultScrollBarDisplay(lua_State *L) return num_ret; } -static int _fairygui_UIConfig_set_defaultScrollBarDisplay(lua_State *L) +static int _olua_fun_fairygui_UIConfig_defaultScrollBarDisplay$2(lua_State *L) { olua_startinvoke(L); @@ -23573,7 +25639,28 @@ static int _fairygui_UIConfig_set_defaultScrollBarDisplay(lua_State *L) return 0; } -static int _fairygui_UIConfig_get_defaultScrollBounceEffect(lua_State *L) +static int _olua_fun_fairygui_UIConfig_defaultScrollBarDisplay(lua_State *L) +{ + int num_args = lua_gettop(L); + + if (num_args == 0) { + // static fairygui::ScrollBarDisplayType defaultScrollBarDisplay + return _olua_fun_fairygui_UIConfig_defaultScrollBarDisplay$1(L); + } + + if (num_args == 1) { + // if ((olua_is_enum(L, 1))) { + // static fairygui::ScrollBarDisplayType defaultScrollBarDisplay + return _olua_fun_fairygui_UIConfig_defaultScrollBarDisplay$2(L); + // } + } + + luaL_error(L, "method 'fairygui::UIConfig::defaultScrollBarDisplay' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_fairygui_UIConfig_defaultScrollBounceEffect$1(lua_State *L) { olua_startinvoke(L); @@ -23586,7 +25673,7 @@ static int _fairygui_UIConfig_get_defaultScrollBounceEffect(lua_State *L) return num_ret; } -static int _fairygui_UIConfig_set_defaultScrollBounceEffect(lua_State *L) +static int _olua_fun_fairygui_UIConfig_defaultScrollBounceEffect$2(lua_State *L) { olua_startinvoke(L); @@ -23602,7 +25689,28 @@ static int _fairygui_UIConfig_set_defaultScrollBounceEffect(lua_State *L) return 0; } -static int _fairygui_UIConfig_get_defaultScrollDecelerationRate(lua_State *L) +static int _olua_fun_fairygui_UIConfig_defaultScrollBounceEffect(lua_State *L) +{ + int num_args = lua_gettop(L); + + if (num_args == 0) { + // static bool defaultScrollBounceEffect + return _olua_fun_fairygui_UIConfig_defaultScrollBounceEffect$1(L); + } + + if (num_args == 1) { + // if ((olua_is_bool(L, 1))) { + // static bool defaultScrollBounceEffect + return _olua_fun_fairygui_UIConfig_defaultScrollBounceEffect$2(L); + // } + } + + luaL_error(L, "method 'fairygui::UIConfig::defaultScrollBounceEffect' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_fairygui_UIConfig_defaultScrollDecelerationRate$1(lua_State *L) { olua_startinvoke(L); @@ -23615,7 +25723,7 @@ static int _fairygui_UIConfig_get_defaultScrollDecelerationRate(lua_State *L) return num_ret; } -static int _fairygui_UIConfig_set_defaultScrollDecelerationRate(lua_State *L) +static int _olua_fun_fairygui_UIConfig_defaultScrollDecelerationRate$2(lua_State *L) { olua_startinvoke(L); @@ -23631,7 +25739,28 @@ static int _fairygui_UIConfig_set_defaultScrollDecelerationRate(lua_State *L) return 0; } -static int _fairygui_UIConfig_get_defaultScrollStep(lua_State *L) +static int _olua_fun_fairygui_UIConfig_defaultScrollDecelerationRate(lua_State *L) +{ + int num_args = lua_gettop(L); + + if (num_args == 0) { + // static float defaultScrollDecelerationRate + return _olua_fun_fairygui_UIConfig_defaultScrollDecelerationRate$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 1))) { + // static float defaultScrollDecelerationRate + return _olua_fun_fairygui_UIConfig_defaultScrollDecelerationRate$2(L); + // } + } + + luaL_error(L, "method 'fairygui::UIConfig::defaultScrollDecelerationRate' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_fairygui_UIConfig_defaultScrollStep$1(lua_State *L) { olua_startinvoke(L); @@ -23644,7 +25773,7 @@ static int _fairygui_UIConfig_get_defaultScrollStep(lua_State *L) return num_ret; } -static int _fairygui_UIConfig_set_defaultScrollStep(lua_State *L) +static int _olua_fun_fairygui_UIConfig_defaultScrollStep$2(lua_State *L) { olua_startinvoke(L); @@ -23660,7 +25789,28 @@ static int _fairygui_UIConfig_set_defaultScrollStep(lua_State *L) return 0; } -static int _fairygui_UIConfig_get_defaultScrollTouchEffect(lua_State *L) +static int _olua_fun_fairygui_UIConfig_defaultScrollStep(lua_State *L) +{ + int num_args = lua_gettop(L); + + if (num_args == 0) { + // static int defaultScrollStep + return _olua_fun_fairygui_UIConfig_defaultScrollStep$1(L); + } + + if (num_args == 1) { + // if ((olua_is_integer(L, 1))) { + // static int defaultScrollStep + return _olua_fun_fairygui_UIConfig_defaultScrollStep$2(L); + // } + } + + luaL_error(L, "method 'fairygui::UIConfig::defaultScrollStep' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_fairygui_UIConfig_defaultScrollTouchEffect$1(lua_State *L) { olua_startinvoke(L); @@ -23673,7 +25823,7 @@ static int _fairygui_UIConfig_get_defaultScrollTouchEffect(lua_State *L) return num_ret; } -static int _fairygui_UIConfig_set_defaultScrollTouchEffect(lua_State *L) +static int _olua_fun_fairygui_UIConfig_defaultScrollTouchEffect$2(lua_State *L) { olua_startinvoke(L); @@ -23689,7 +25839,87 @@ static int _fairygui_UIConfig_set_defaultScrollTouchEffect(lua_State *L) return 0; } -static int _fairygui_UIConfig_get_globalModalWaiting(lua_State *L) +static int _olua_fun_fairygui_UIConfig_defaultScrollTouchEffect(lua_State *L) +{ + int num_args = lua_gettop(L); + + if (num_args == 0) { + // static bool defaultScrollTouchEffect + return _olua_fun_fairygui_UIConfig_defaultScrollTouchEffect$1(L); + } + + if (num_args == 1) { + // if ((olua_is_bool(L, 1))) { + // static bool defaultScrollTouchEffect + return _olua_fun_fairygui_UIConfig_defaultScrollTouchEffect$2(L); + // } + } + + luaL_error(L, "method 'fairygui::UIConfig::defaultScrollTouchEffect' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_fairygui_UIConfig_getRealFontName$1(lua_State *L) +{ + olua_startinvoke(L); + + std::string arg1; /** aliasName */ + bool *arg2 = nullptr; /** isTTF */ + + olua_check_string(L, 1, &arg1); + olua_check_valueptr(L, 2, &arg2, "olua.bool"); + + // static const std::string &getRealFontName(const std::string &aliasName, @optional bool *isTTF) + const std::string &ret = fairygui::UIConfig::getRealFontName(arg1, arg2); + int num_ret = olua_push_string(L, ret); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_fairygui_UIConfig_getRealFontName$2(lua_State *L) +{ + olua_startinvoke(L); + + std::string arg1; /** aliasName */ + + olua_check_string(L, 1, &arg1); + + // static const std::string &getRealFontName(const std::string &aliasName) + const std::string &ret = fairygui::UIConfig::getRealFontName(arg1); + int num_ret = olua_push_string(L, ret); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_fairygui_UIConfig_getRealFontName(lua_State *L) +{ + int num_args = lua_gettop(L); + + if (num_args == 1) { + // if ((olua_is_string(L, 1))) { + // static const std::string &getRealFontName(const std::string &aliasName) + return _olua_fun_fairygui_UIConfig_getRealFontName$2(L); + // } + } + + if (num_args == 2) { + // if ((olua_is_string(L, 1)) && (olua_is_valueptr(L, 2, "olua.bool"))) { + // static const std::string &getRealFontName(const std::string &aliasName, @optional bool *isTTF) + return _olua_fun_fairygui_UIConfig_getRealFontName$1(L); + // } + } + + luaL_error(L, "method 'fairygui::UIConfig::getRealFontName' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_fairygui_UIConfig_globalModalWaiting$1(lua_State *L) { olua_startinvoke(L); @@ -23702,7 +25932,7 @@ static int _fairygui_UIConfig_get_globalModalWaiting(lua_State *L) return num_ret; } -static int _fairygui_UIConfig_set_globalModalWaiting(lua_State *L) +static int _olua_fun_fairygui_UIConfig_globalModalWaiting$2(lua_State *L) { olua_startinvoke(L); @@ -23718,7 +25948,28 @@ static int _fairygui_UIConfig_set_globalModalWaiting(lua_State *L) return 0; } -static int _fairygui_UIConfig_get_horizontalScrollBar(lua_State *L) +static int _olua_fun_fairygui_UIConfig_globalModalWaiting(lua_State *L) +{ + int num_args = lua_gettop(L); + + if (num_args == 0) { + // static std::string globalModalWaiting + return _olua_fun_fairygui_UIConfig_globalModalWaiting$1(L); + } + + if (num_args == 1) { + // if ((olua_is_string(L, 1))) { + // static std::string globalModalWaiting + return _olua_fun_fairygui_UIConfig_globalModalWaiting$2(L); + // } + } + + luaL_error(L, "method 'fairygui::UIConfig::globalModalWaiting' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_fairygui_UIConfig_horizontalScrollBar$1(lua_State *L) { olua_startinvoke(L); @@ -23731,7 +25982,7 @@ static int _fairygui_UIConfig_get_horizontalScrollBar(lua_State *L) return num_ret; } -static int _fairygui_UIConfig_set_horizontalScrollBar(lua_State *L) +static int _olua_fun_fairygui_UIConfig_horizontalScrollBar$2(lua_State *L) { olua_startinvoke(L); @@ -23747,7 +25998,28 @@ static int _fairygui_UIConfig_set_horizontalScrollBar(lua_State *L) return 0; } -static int _fairygui_UIConfig_get_modalLayerColor(lua_State *L) +static int _olua_fun_fairygui_UIConfig_horizontalScrollBar(lua_State *L) +{ + int num_args = lua_gettop(L); + + if (num_args == 0) { + // static std::string horizontalScrollBar + return _olua_fun_fairygui_UIConfig_horizontalScrollBar$1(L); + } + + if (num_args == 1) { + // if ((olua_is_string(L, 1))) { + // static std::string horizontalScrollBar + return _olua_fun_fairygui_UIConfig_horizontalScrollBar$2(L); + // } + } + + luaL_error(L, "method 'fairygui::UIConfig::horizontalScrollBar' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_fairygui_UIConfig_modalLayerColor$1(lua_State *L) { olua_startinvoke(L); @@ -23760,7 +26032,7 @@ static int _fairygui_UIConfig_get_modalLayerColor(lua_State *L) return num_ret; } -static int _fairygui_UIConfig_set_modalLayerColor(lua_State *L) +static int _olua_fun_fairygui_UIConfig_modalLayerColor$2(lua_State *L) { olua_startinvoke(L); @@ -23776,7 +26048,28 @@ static int _fairygui_UIConfig_set_modalLayerColor(lua_State *L) return 0; } -static int _fairygui_UIConfig_get_popupMenu(lua_State *L) +static int _olua_fun_fairygui_UIConfig_modalLayerColor(lua_State *L) +{ + int num_args = lua_gettop(L); + + if (num_args == 0) { + // static cocos2d::Color4F modalLayerColor + return _olua_fun_fairygui_UIConfig_modalLayerColor$1(L); + } + + if (num_args == 1) { + // if ((olua_is_cocos2d_Color4F(L, 1))) { + // static cocos2d::Color4F modalLayerColor + return _olua_fun_fairygui_UIConfig_modalLayerColor$2(L); + // } + } + + luaL_error(L, "method 'fairygui::UIConfig::modalLayerColor' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_fairygui_UIConfig_popupMenu$1(lua_State *L) { olua_startinvoke(L); @@ -23789,7 +26082,7 @@ static int _fairygui_UIConfig_get_popupMenu(lua_State *L) return num_ret; } -static int _fairygui_UIConfig_set_popupMenu(lua_State *L) +static int _olua_fun_fairygui_UIConfig_popupMenu$2(lua_State *L) { olua_startinvoke(L); @@ -23805,7 +26098,28 @@ static int _fairygui_UIConfig_set_popupMenu(lua_State *L) return 0; } -static int _fairygui_UIConfig_get_popupMenu_seperator(lua_State *L) +static int _olua_fun_fairygui_UIConfig_popupMenu(lua_State *L) +{ + int num_args = lua_gettop(L); + + if (num_args == 0) { + // static std::string popupMenu + return _olua_fun_fairygui_UIConfig_popupMenu$1(L); + } + + if (num_args == 1) { + // if ((olua_is_string(L, 1))) { + // static std::string popupMenu + return _olua_fun_fairygui_UIConfig_popupMenu$2(L); + // } + } + + luaL_error(L, "method 'fairygui::UIConfig::popupMenu' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_fairygui_UIConfig_popupMenu_seperator$1(lua_State *L) { olua_startinvoke(L); @@ -23818,7 +26132,7 @@ static int _fairygui_UIConfig_get_popupMenu_seperator(lua_State *L) return num_ret; } -static int _fairygui_UIConfig_set_popupMenu_seperator(lua_State *L) +static int _olua_fun_fairygui_UIConfig_popupMenu_seperator$2(lua_State *L) { olua_startinvoke(L); @@ -23834,7 +26148,46 @@ static int _fairygui_UIConfig_set_popupMenu_seperator(lua_State *L) return 0; } -static int _fairygui_UIConfig_get_tooltipsWin(lua_State *L) +static int _olua_fun_fairygui_UIConfig_popupMenu_seperator(lua_State *L) +{ + int num_args = lua_gettop(L); + + if (num_args == 0) { + // static std::string popupMenu_seperator + return _olua_fun_fairygui_UIConfig_popupMenu_seperator$1(L); + } + + if (num_args == 1) { + // if ((olua_is_string(L, 1))) { + // static std::string popupMenu_seperator + return _olua_fun_fairygui_UIConfig_popupMenu_seperator$2(L); + // } + } + + luaL_error(L, "method 'fairygui::UIConfig::popupMenu_seperator' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_fairygui_UIConfig_registerFont(lua_State *L) +{ + olua_startinvoke(L); + + std::string arg1; /** aliasName */ + std::string arg2; /** realName */ + + olua_check_string(L, 1, &arg1); + olua_check_string(L, 2, &arg2); + + // static void registerFont(const std::string &aliasName, const std::string &realName) + fairygui::UIConfig::registerFont(arg1, arg2); + + olua_endinvoke(L); + + return 0; +} + +static int _olua_fun_fairygui_UIConfig_tooltipsWin$1(lua_State *L) { olua_startinvoke(L); @@ -23847,7 +26200,7 @@ static int _fairygui_UIConfig_get_tooltipsWin(lua_State *L) return num_ret; } -static int _fairygui_UIConfig_set_tooltipsWin(lua_State *L) +static int _olua_fun_fairygui_UIConfig_tooltipsWin$2(lua_State *L) { olua_startinvoke(L); @@ -23863,7 +26216,28 @@ static int _fairygui_UIConfig_set_tooltipsWin(lua_State *L) return 0; } -static int _fairygui_UIConfig_get_touchDragSensitivity(lua_State *L) +static int _olua_fun_fairygui_UIConfig_tooltipsWin(lua_State *L) +{ + int num_args = lua_gettop(L); + + if (num_args == 0) { + // static std::string tooltipsWin + return _olua_fun_fairygui_UIConfig_tooltipsWin$1(L); + } + + if (num_args == 1) { + // if ((olua_is_string(L, 1))) { + // static std::string tooltipsWin + return _olua_fun_fairygui_UIConfig_tooltipsWin$2(L); + // } + } + + luaL_error(L, "method 'fairygui::UIConfig::tooltipsWin' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_fairygui_UIConfig_touchDragSensitivity$1(lua_State *L) { olua_startinvoke(L); @@ -23876,7 +26250,7 @@ static int _fairygui_UIConfig_get_touchDragSensitivity(lua_State *L) return num_ret; } -static int _fairygui_UIConfig_set_touchDragSensitivity(lua_State *L) +static int _olua_fun_fairygui_UIConfig_touchDragSensitivity$2(lua_State *L) { olua_startinvoke(L); @@ -23892,7 +26266,28 @@ static int _fairygui_UIConfig_set_touchDragSensitivity(lua_State *L) return 0; } -static int _fairygui_UIConfig_get_touchScrollSensitivity(lua_State *L) +static int _olua_fun_fairygui_UIConfig_touchDragSensitivity(lua_State *L) +{ + int num_args = lua_gettop(L); + + if (num_args == 0) { + // static int touchDragSensitivity + return _olua_fun_fairygui_UIConfig_touchDragSensitivity$1(L); + } + + if (num_args == 1) { + // if ((olua_is_integer(L, 1))) { + // static int touchDragSensitivity + return _olua_fun_fairygui_UIConfig_touchDragSensitivity$2(L); + // } + } + + luaL_error(L, "method 'fairygui::UIConfig::touchDragSensitivity' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_fairygui_UIConfig_touchScrollSensitivity$1(lua_State *L) { olua_startinvoke(L); @@ -23905,7 +26300,7 @@ static int _fairygui_UIConfig_get_touchScrollSensitivity(lua_State *L) return num_ret; } -static int _fairygui_UIConfig_set_touchScrollSensitivity(lua_State *L) +static int _olua_fun_fairygui_UIConfig_touchScrollSensitivity$2(lua_State *L) { olua_startinvoke(L); @@ -23921,7 +26316,28 @@ static int _fairygui_UIConfig_set_touchScrollSensitivity(lua_State *L) return 0; } -static int _fairygui_UIConfig_get_verticalScrollBar(lua_State *L) +static int _olua_fun_fairygui_UIConfig_touchScrollSensitivity(lua_State *L) +{ + int num_args = lua_gettop(L); + + if (num_args == 0) { + // static int touchScrollSensitivity + return _olua_fun_fairygui_UIConfig_touchScrollSensitivity$1(L); + } + + if (num_args == 1) { + // if ((olua_is_integer(L, 1))) { + // static int touchScrollSensitivity + return _olua_fun_fairygui_UIConfig_touchScrollSensitivity$2(L); + // } + } + + luaL_error(L, "method 'fairygui::UIConfig::touchScrollSensitivity' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_fairygui_UIConfig_verticalScrollBar$1(lua_State *L) { olua_startinvoke(L); @@ -23934,7 +26350,7 @@ static int _fairygui_UIConfig_get_verticalScrollBar(lua_State *L) return num_ret; } -static int _fairygui_UIConfig_set_verticalScrollBar(lua_State *L) +static int _olua_fun_fairygui_UIConfig_verticalScrollBar$2(lua_State *L) { olua_startinvoke(L); @@ -23950,7 +26366,28 @@ static int _fairygui_UIConfig_set_verticalScrollBar(lua_State *L) return 0; } -static int _fairygui_UIConfig_get_windowModalWaiting(lua_State *L) +static int _olua_fun_fairygui_UIConfig_verticalScrollBar(lua_State *L) +{ + int num_args = lua_gettop(L); + + if (num_args == 0) { + // static std::string verticalScrollBar + return _olua_fun_fairygui_UIConfig_verticalScrollBar$1(L); + } + + if (num_args == 1) { + // if ((olua_is_string(L, 1))) { + // static std::string verticalScrollBar + return _olua_fun_fairygui_UIConfig_verticalScrollBar$2(L); + // } + } + + luaL_error(L, "method 'fairygui::UIConfig::verticalScrollBar' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_fairygui_UIConfig_windowModalWaiting$1(lua_State *L) { olua_startinvoke(L); @@ -23963,7 +26400,7 @@ static int _fairygui_UIConfig_get_windowModalWaiting(lua_State *L) return num_ret; } -static int _fairygui_UIConfig_set_windowModalWaiting(lua_State *L) +static int _olua_fun_fairygui_UIConfig_windowModalWaiting$2(lua_State *L) { olua_startinvoke(L); @@ -23979,41 +26416,71 @@ static int _fairygui_UIConfig_set_windowModalWaiting(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_fairygui_UIConfig(lua_State *L) +static int _olua_fun_fairygui_UIConfig_windowModalWaiting(lua_State *L) +{ + int num_args = lua_gettop(L); + + if (num_args == 0) { + // static std::string windowModalWaiting + return _olua_fun_fairygui_UIConfig_windowModalWaiting$1(L); + } + + if (num_args == 1) { + // if ((olua_is_string(L, 1))) { + // static std::string windowModalWaiting + return _olua_fun_fairygui_UIConfig_windowModalWaiting$2(L); + // } + } + + luaL_error(L, "method 'fairygui::UIConfig::windowModalWaiting' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_cls_fgui_UIConfig(lua_State *L) { oluacls_class(L, "fgui.UIConfig"); - oluacls_func(L, "__gc", _fairygui_UIConfig___gc); - oluacls_func(L, "__olua_move", _fairygui_UIConfig___olua_move); - oluacls_func(L, "getRealFontName", _fairygui_UIConfig_getRealFontName); - oluacls_func(L, "registerFont", _fairygui_UIConfig_registerFont); - oluacls_prop(L, "bringWindowToFrontOnClick", _fairygui_UIConfig_get_bringWindowToFrontOnClick, _fairygui_UIConfig_set_bringWindowToFrontOnClick); - oluacls_prop(L, "buttonSound", _fairygui_UIConfig_get_buttonSound, _fairygui_UIConfig_set_buttonSound); - oluacls_prop(L, "buttonSoundVolumeScale", _fairygui_UIConfig_get_buttonSoundVolumeScale, _fairygui_UIConfig_set_buttonSoundVolumeScale); - oluacls_prop(L, "clickDragSensitivity", _fairygui_UIConfig_get_clickDragSensitivity, _fairygui_UIConfig_set_clickDragSensitivity); - oluacls_prop(L, "defaultComboBoxVisibleItemCount", _fairygui_UIConfig_get_defaultComboBoxVisibleItemCount, _fairygui_UIConfig_set_defaultComboBoxVisibleItemCount); - oluacls_prop(L, "defaultFont", _fairygui_UIConfig_get_defaultFont, _fairygui_UIConfig_set_defaultFont); - oluacls_prop(L, "defaultScrollBarDisplay", _fairygui_UIConfig_get_defaultScrollBarDisplay, _fairygui_UIConfig_set_defaultScrollBarDisplay); - oluacls_prop(L, "defaultScrollBounceEffect", _fairygui_UIConfig_get_defaultScrollBounceEffect, _fairygui_UIConfig_set_defaultScrollBounceEffect); - oluacls_prop(L, "defaultScrollDecelerationRate", _fairygui_UIConfig_get_defaultScrollDecelerationRate, _fairygui_UIConfig_set_defaultScrollDecelerationRate); - oluacls_prop(L, "defaultScrollStep", _fairygui_UIConfig_get_defaultScrollStep, _fairygui_UIConfig_set_defaultScrollStep); - oluacls_prop(L, "defaultScrollTouchEffect", _fairygui_UIConfig_get_defaultScrollTouchEffect, _fairygui_UIConfig_set_defaultScrollTouchEffect); - oluacls_prop(L, "globalModalWaiting", _fairygui_UIConfig_get_globalModalWaiting, _fairygui_UIConfig_set_globalModalWaiting); - oluacls_prop(L, "horizontalScrollBar", _fairygui_UIConfig_get_horizontalScrollBar, _fairygui_UIConfig_set_horizontalScrollBar); - oluacls_prop(L, "modalLayerColor", _fairygui_UIConfig_get_modalLayerColor, _fairygui_UIConfig_set_modalLayerColor); - oluacls_prop(L, "popupMenu", _fairygui_UIConfig_get_popupMenu, _fairygui_UIConfig_set_popupMenu); - oluacls_prop(L, "popupMenu_seperator", _fairygui_UIConfig_get_popupMenu_seperator, _fairygui_UIConfig_set_popupMenu_seperator); - oluacls_prop(L, "tooltipsWin", _fairygui_UIConfig_get_tooltipsWin, _fairygui_UIConfig_set_tooltipsWin); - oluacls_prop(L, "touchDragSensitivity", _fairygui_UIConfig_get_touchDragSensitivity, _fairygui_UIConfig_set_touchDragSensitivity); - oluacls_prop(L, "touchScrollSensitivity", _fairygui_UIConfig_get_touchScrollSensitivity, _fairygui_UIConfig_set_touchScrollSensitivity); - oluacls_prop(L, "verticalScrollBar", _fairygui_UIConfig_get_verticalScrollBar, _fairygui_UIConfig_set_verticalScrollBar); - oluacls_prop(L, "windowModalWaiting", _fairygui_UIConfig_get_windowModalWaiting, _fairygui_UIConfig_set_windowModalWaiting); + oluacls_func(L, "__gc", _olua_fun_fairygui_UIConfig___gc); + oluacls_func(L, "__olua_move", _olua_fun_fairygui_UIConfig___olua_move); + oluacls_func(L, "getRealFontName", _olua_fun_fairygui_UIConfig_getRealFontName); + oluacls_func(L, "registerFont", _olua_fun_fairygui_UIConfig_registerFont); + oluacls_prop(L, "bringWindowToFrontOnClick", _olua_fun_fairygui_UIConfig_bringWindowToFrontOnClick, _olua_fun_fairygui_UIConfig_bringWindowToFrontOnClick); + oluacls_prop(L, "buttonSound", _olua_fun_fairygui_UIConfig_buttonSound, _olua_fun_fairygui_UIConfig_buttonSound); + oluacls_prop(L, "buttonSoundVolumeScale", _olua_fun_fairygui_UIConfig_buttonSoundVolumeScale, _olua_fun_fairygui_UIConfig_buttonSoundVolumeScale); + oluacls_prop(L, "clickDragSensitivity", _olua_fun_fairygui_UIConfig_clickDragSensitivity, _olua_fun_fairygui_UIConfig_clickDragSensitivity); + oluacls_prop(L, "defaultComboBoxVisibleItemCount", _olua_fun_fairygui_UIConfig_defaultComboBoxVisibleItemCount, _olua_fun_fairygui_UIConfig_defaultComboBoxVisibleItemCount); + oluacls_prop(L, "defaultFont", _olua_fun_fairygui_UIConfig_defaultFont, _olua_fun_fairygui_UIConfig_defaultFont); + oluacls_prop(L, "defaultScrollBarDisplay", _olua_fun_fairygui_UIConfig_defaultScrollBarDisplay, _olua_fun_fairygui_UIConfig_defaultScrollBarDisplay); + oluacls_prop(L, "defaultScrollBounceEffect", _olua_fun_fairygui_UIConfig_defaultScrollBounceEffect, _olua_fun_fairygui_UIConfig_defaultScrollBounceEffect); + oluacls_prop(L, "defaultScrollDecelerationRate", _olua_fun_fairygui_UIConfig_defaultScrollDecelerationRate, _olua_fun_fairygui_UIConfig_defaultScrollDecelerationRate); + oluacls_prop(L, "defaultScrollStep", _olua_fun_fairygui_UIConfig_defaultScrollStep, _olua_fun_fairygui_UIConfig_defaultScrollStep); + oluacls_prop(L, "defaultScrollTouchEffect", _olua_fun_fairygui_UIConfig_defaultScrollTouchEffect, _olua_fun_fairygui_UIConfig_defaultScrollTouchEffect); + oluacls_prop(L, "globalModalWaiting", _olua_fun_fairygui_UIConfig_globalModalWaiting, _olua_fun_fairygui_UIConfig_globalModalWaiting); + oluacls_prop(L, "horizontalScrollBar", _olua_fun_fairygui_UIConfig_horizontalScrollBar, _olua_fun_fairygui_UIConfig_horizontalScrollBar); + oluacls_prop(L, "modalLayerColor", _olua_fun_fairygui_UIConfig_modalLayerColor, _olua_fun_fairygui_UIConfig_modalLayerColor); + oluacls_prop(L, "popupMenu", _olua_fun_fairygui_UIConfig_popupMenu, _olua_fun_fairygui_UIConfig_popupMenu); + oluacls_prop(L, "popupMenu_seperator", _olua_fun_fairygui_UIConfig_popupMenu_seperator, _olua_fun_fairygui_UIConfig_popupMenu_seperator); + oluacls_prop(L, "tooltipsWin", _olua_fun_fairygui_UIConfig_tooltipsWin, _olua_fun_fairygui_UIConfig_tooltipsWin); + oluacls_prop(L, "touchDragSensitivity", _olua_fun_fairygui_UIConfig_touchDragSensitivity, _olua_fun_fairygui_UIConfig_touchDragSensitivity); + oluacls_prop(L, "touchScrollSensitivity", _olua_fun_fairygui_UIConfig_touchScrollSensitivity, _olua_fun_fairygui_UIConfig_touchScrollSensitivity); + oluacls_prop(L, "verticalScrollBar", _olua_fun_fairygui_UIConfig_verticalScrollBar, _olua_fun_fairygui_UIConfig_verticalScrollBar); + oluacls_prop(L, "windowModalWaiting", _olua_fun_fairygui_UIConfig_windowModalWaiting, _olua_fun_fairygui_UIConfig_windowModalWaiting); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_fgui_UIConfig(lua_State *L) +{ + olua_require(L, "fairygui", luaopen_fairygui); + if (!olua_getclass(L, "fgui.UIConfig")) { + luaL_error(L, "class not found: fairygui::UIConfig"); + } + return 1; +} OLUA_END_DECLS -static int _fairygui_IUISource_getFileName(lua_State *L) +static int _olua_fun_fairygui_IUISource_getFileName(lua_State *L) { olua_startinvoke(L); @@ -24030,7 +26497,7 @@ static int _fairygui_IUISource_getFileName(lua_State *L) return num_ret; } -static int _fairygui_IUISource_isLoaded(lua_State *L) +static int _olua_fun_fairygui_IUISource_isLoaded(lua_State *L) { olua_startinvoke(L); @@ -24047,7 +26514,7 @@ static int _fairygui_IUISource_isLoaded(lua_State *L) return num_ret; } -static int _fairygui_IUISource_load(lua_State *L) +static int _olua_fun_fairygui_IUISource_load(lua_State *L) { olua_startinvoke(L); @@ -24063,9 +26530,10 @@ static int _fairygui_IUISource_load(lua_State *L) std::string cb_tag = "load"; std::string cb_name; if (olua_isfunction(L, 2)) { - cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx]() { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */]() { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); @@ -24082,7 +26550,7 @@ static int _fairygui_IUISource_load(lua_State *L) arg1 = nullptr; } - // void load(@localvar @nullable std::function callback) + // void load(@nullable std::function callback) self->load(arg1); olua_endinvoke(L); @@ -24090,7 +26558,7 @@ static int _fairygui_IUISource_load(lua_State *L) return 0; } -static int _fairygui_IUISource_setFileName(lua_State *L) +static int _olua_fun_fairygui_IUISource_setFileName(lua_State *L) { olua_startinvoke(L); @@ -24108,22 +26576,31 @@ static int _fairygui_IUISource_setFileName(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_fairygui_IUISource(lua_State *L) +static int _olua_cls_fgui_IUISource(lua_State *L) { oluacls_class(L, "fgui.IUISource"); - oluacls_func(L, "getFileName", _fairygui_IUISource_getFileName); - oluacls_func(L, "isLoaded", _fairygui_IUISource_isLoaded); - oluacls_func(L, "load", _fairygui_IUISource_load); - oluacls_func(L, "setFileName", _fairygui_IUISource_setFileName); - oluacls_prop(L, "fileName", _fairygui_IUISource_getFileName, _fairygui_IUISource_setFileName); - oluacls_prop(L, "loaded", _fairygui_IUISource_isLoaded, nullptr); + oluacls_func(L, "getFileName", _olua_fun_fairygui_IUISource_getFileName); + oluacls_func(L, "isLoaded", _olua_fun_fairygui_IUISource_isLoaded); + oluacls_func(L, "load", _olua_fun_fairygui_IUISource_load); + oluacls_func(L, "setFileName", _olua_fun_fairygui_IUISource_setFileName); + oluacls_prop(L, "fileName", _olua_fun_fairygui_IUISource_getFileName, _olua_fun_fairygui_IUISource_setFileName); + oluacls_prop(L, "loaded", _olua_fun_fairygui_IUISource_isLoaded, nullptr); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_fgui_IUISource(lua_State *L) +{ + olua_require(L, "fairygui", luaopen_fairygui); + if (!olua_getclass(L, "fgui.IUISource")) { + luaL_error(L, "class not found: fairygui::IUISource"); + } return 1; } OLUA_END_DECLS -static int _fairygui_UISource_create(lua_State *L) +static int _olua_fun_fairygui_UISource_create(lua_State *L) { olua_startinvoke(L); @@ -24136,7 +26613,7 @@ static int _fairygui_UISource_create(lua_State *L) return num_ret; } -static int _fairygui_UISource_loadComplete(lua_State *L) +static int _olua_fun_fairygui_UISource_loadComplete(lua_State *L) { olua_startinvoke(L); @@ -24152,18 +26629,27 @@ static int _fairygui_UISource_loadComplete(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_fairygui_UISource(lua_State *L) +static int _olua_cls_fgui_UISource(lua_State *L) { oluacls_class(L, "fgui.UISource"); - oluacls_func(L, "create", _fairygui_UISource_create); - oluacls_func(L, "loadComplete", _fairygui_UISource_loadComplete); + oluacls_func(L, "create", _olua_fun_fairygui_UISource_create); + oluacls_func(L, "loadComplete", _olua_fun_fairygui_UISource_loadComplete); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_fgui_UISource(lua_State *L) +{ + olua_require(L, "fairygui", luaopen_fairygui); + if (!olua_getclass(L, "fgui.UISource")) { + luaL_error(L, "class not found: fairygui::UISource"); + } return 1; } OLUA_END_DECLS -static int _fairygui_Window_addUISource(lua_State *L) +static int _olua_fun_fairygui_Window_addUISource(lua_State *L) { olua_startinvoke(L); @@ -24181,7 +26667,7 @@ static int _fairygui_Window_addUISource(lua_State *L) return 0; } -static int _fairygui_Window_bringToFront(lua_State *L) +static int _olua_fun_fairygui_Window_bringToFront(lua_State *L) { olua_startinvoke(L); @@ -24197,7 +26683,7 @@ static int _fairygui_Window_bringToFront(lua_State *L) return 0; } -static int _fairygui_Window_closeModalWait$1(lua_State *L) +static int _olua_fun_fairygui_Window_closeModalWait$1(lua_State *L) { olua_startinvoke(L); @@ -24214,7 +26700,7 @@ static int _fairygui_Window_closeModalWait$1(lua_State *L) return num_ret; } -static int _fairygui_Window_closeModalWait$2(lua_State *L) +static int _olua_fun_fairygui_Window_closeModalWait$2(lua_State *L) { olua_startinvoke(L); @@ -24233,19 +26719,19 @@ static int _fairygui_Window_closeModalWait$2(lua_State *L) return num_ret; } -static int _fairygui_Window_closeModalWait(lua_State *L) +static int _olua_fun_fairygui_Window_closeModalWait(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 0) { // bool closeModalWait() - return _fairygui_Window_closeModalWait$1(L); + return _olua_fun_fairygui_Window_closeModalWait$1(L); } if (num_args == 1) { // if ((olua_is_integer(L, 2))) { // bool closeModalWait(int requestingCmd) - return _fairygui_Window_closeModalWait$2(L); + return _olua_fun_fairygui_Window_closeModalWait$2(L); // } } @@ -24254,7 +26740,7 @@ static int _fairygui_Window_closeModalWait(lua_State *L) return 0; } -static int _fairygui_Window_create(lua_State *L) +static int _olua_fun_fairygui_Window_create(lua_State *L) { olua_startinvoke(L); @@ -24267,7 +26753,7 @@ static int _fairygui_Window_create(lua_State *L) return num_ret; } -static int _fairygui_Window_getCloseButton(lua_State *L) +static int _olua_fun_fairygui_Window_getCloseButton(lua_State *L) { olua_startinvoke(L); @@ -24287,7 +26773,7 @@ static int _fairygui_Window_getCloseButton(lua_State *L) return num_ret; } -static int _fairygui_Window_getContentArea(lua_State *L) +static int _olua_fun_fairygui_Window_getContentArea(lua_State *L) { olua_startinvoke(L); @@ -24307,7 +26793,7 @@ static int _fairygui_Window_getContentArea(lua_State *L) return num_ret; } -static int _fairygui_Window_getContentPane(lua_State *L) +static int _olua_fun_fairygui_Window_getContentPane(lua_State *L) { olua_startinvoke(L); @@ -24327,7 +26813,7 @@ static int _fairygui_Window_getContentPane(lua_State *L) return num_ret; } -static int _fairygui_Window_getDragArea(lua_State *L) +static int _olua_fun_fairygui_Window_getDragArea(lua_State *L) { olua_startinvoke(L); @@ -24347,7 +26833,7 @@ static int _fairygui_Window_getDragArea(lua_State *L) return num_ret; } -static int _fairygui_Window_getFrame(lua_State *L) +static int _olua_fun_fairygui_Window_getFrame(lua_State *L) { olua_startinvoke(L); @@ -24367,7 +26853,7 @@ static int _fairygui_Window_getFrame(lua_State *L) return num_ret; } -static int _fairygui_Window_getModalWaitingPane(lua_State *L) +static int _olua_fun_fairygui_Window_getModalWaitingPane(lua_State *L) { olua_startinvoke(L); @@ -24387,7 +26873,7 @@ static int _fairygui_Window_getModalWaitingPane(lua_State *L) return num_ret; } -static int _fairygui_Window_hide(lua_State *L) +static int _olua_fun_fairygui_Window_hide(lua_State *L) { olua_startinvoke(L); @@ -24415,7 +26901,7 @@ static int _fairygui_Window_hide(lua_State *L) return 0; } -static int _fairygui_Window_hideImmediately(lua_State *L) +static int _olua_fun_fairygui_Window_hideImmediately(lua_State *L) { olua_startinvoke(L); @@ -24443,7 +26929,7 @@ static int _fairygui_Window_hideImmediately(lua_State *L) return 0; } -static int _fairygui_Window_initWindow(lua_State *L) +static int _olua_fun_fairygui_Window_initWindow(lua_State *L) { olua_startinvoke(L); @@ -24459,7 +26945,7 @@ static int _fairygui_Window_initWindow(lua_State *L) return 0; } -static int _fairygui_Window_isBringToFrontOnClick(lua_State *L) +static int _olua_fun_fairygui_Window_isBringToFrontOnClick(lua_State *L) { olua_startinvoke(L); @@ -24476,7 +26962,7 @@ static int _fairygui_Window_isBringToFrontOnClick(lua_State *L) return num_ret; } -static int _fairygui_Window_isModal(lua_State *L) +static int _olua_fun_fairygui_Window_isModal(lua_State *L) { olua_startinvoke(L); @@ -24493,7 +26979,7 @@ static int _fairygui_Window_isModal(lua_State *L) return num_ret; } -static int _fairygui_Window_isShowing(lua_State *L) +static int _olua_fun_fairygui_Window_isShowing(lua_State *L) { olua_startinvoke(L); @@ -24510,7 +26996,7 @@ static int _fairygui_Window_isShowing(lua_State *L) return num_ret; } -static int _fairygui_Window_isTop(lua_State *L) +static int _olua_fun_fairygui_Window_isTop(lua_State *L) { olua_startinvoke(L); @@ -24527,11 +27013,11 @@ static int _fairygui_Window_isTop(lua_State *L) return num_ret; } -static int _fairygui_Window_new(lua_State *L) +static int _olua_fun_fairygui_Window_new(lua_State *L) { olua_startinvoke(L); - // Window() + // fairygui::Window() fairygui::Window *ret = new fairygui::Window(); int num_ret = olua_push_object(L, ret, "fgui.Window"); olua_postnew(L, ret); @@ -24541,7 +27027,7 @@ static int _fairygui_Window_new(lua_State *L) return num_ret; } -static int _fairygui_Window_setBringToFrontOnClick(lua_State *L) +static int _olua_fun_fairygui_Window_setBringToFrontOnClick(lua_State *L) { olua_startinvoke(L); @@ -24559,7 +27045,7 @@ static int _fairygui_Window_setBringToFrontOnClick(lua_State *L) return 0; } -static int _fairygui_Window_setCloseButton(lua_State *L) +static int _olua_fun_fairygui_Window_setCloseButton(lua_State *L) { olua_startinvoke(L); @@ -24580,7 +27066,7 @@ static int _fairygui_Window_setCloseButton(lua_State *L) return 0; } -static int _fairygui_Window_setContentArea(lua_State *L) +static int _olua_fun_fairygui_Window_setContentArea(lua_State *L) { olua_startinvoke(L); @@ -24601,7 +27087,7 @@ static int _fairygui_Window_setContentArea(lua_State *L) return 0; } -static int _fairygui_Window_setContentPane(lua_State *L) +static int _olua_fun_fairygui_Window_setContentPane(lua_State *L) { olua_startinvoke(L); @@ -24622,7 +27108,7 @@ static int _fairygui_Window_setContentPane(lua_State *L) return 0; } -static int _fairygui_Window_setDragArea(lua_State *L) +static int _olua_fun_fairygui_Window_setDragArea(lua_State *L) { olua_startinvoke(L); @@ -24643,7 +27129,7 @@ static int _fairygui_Window_setDragArea(lua_State *L) return 0; } -static int _fairygui_Window_setModal(lua_State *L) +static int _olua_fun_fairygui_Window_setModal(lua_State *L) { olua_startinvoke(L); @@ -24661,7 +27147,7 @@ static int _fairygui_Window_setModal(lua_State *L) return 0; } -static int _fairygui_Window_show(lua_State *L) +static int _olua_fun_fairygui_Window_show(lua_State *L) { olua_startinvoke(L); @@ -24678,7 +27164,7 @@ static int _fairygui_Window_show(lua_State *L) int parent = lua_gettop(L); olua_startcmpref(L, parent, "children"); - // @delref(children ~ parent)@addref(children | parent) void show() + // @delref(children ~ parent) @addref(children | parent) void show() self->show(); // insert code after call @@ -24690,7 +27176,7 @@ static int _fairygui_Window_show(lua_State *L) return 0; } -static int _fairygui_Window_showModalWait$1(lua_State *L) +static int _olua_fun_fairygui_Window_showModalWait$1(lua_State *L) { olua_startinvoke(L); @@ -24706,7 +27192,7 @@ static int _fairygui_Window_showModalWait$1(lua_State *L) return 0; } -static int _fairygui_Window_showModalWait$2(lua_State *L) +static int _olua_fun_fairygui_Window_showModalWait$2(lua_State *L) { olua_startinvoke(L); @@ -24724,19 +27210,19 @@ static int _fairygui_Window_showModalWait$2(lua_State *L) return 0; } -static int _fairygui_Window_showModalWait(lua_State *L) +static int _olua_fun_fairygui_Window_showModalWait(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 0) { // void showModalWait() - return _fairygui_Window_showModalWait$1(L); + return _olua_fun_fairygui_Window_showModalWait$1(L); } if (num_args == 1) { // if ((olua_is_integer(L, 2))) { // void showModalWait(int requestingCmd) - return _fairygui_Window_showModalWait$2(L); + return _olua_fun_fairygui_Window_showModalWait$2(L); // } } @@ -24745,7 +27231,7 @@ static int _fairygui_Window_showModalWait(lua_State *L) return 0; } -static int _fairygui_Window_toggleStatus(lua_State *L) +static int _olua_fun_fairygui_Window_toggleStatus(lua_State *L) { olua_startinvoke(L); @@ -24761,53 +27247,62 @@ static int _fairygui_Window_toggleStatus(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_fairygui_Window(lua_State *L) +static int _olua_cls_fgui_Window(lua_State *L) { oluacls_class(L, "fgui.Window"); - oluacls_func(L, "addUISource", _fairygui_Window_addUISource); - oluacls_func(L, "bringToFront", _fairygui_Window_bringToFront); - oluacls_func(L, "closeModalWait", _fairygui_Window_closeModalWait); - oluacls_func(L, "create", _fairygui_Window_create); - oluacls_func(L, "getCloseButton", _fairygui_Window_getCloseButton); - oluacls_func(L, "getContentArea", _fairygui_Window_getContentArea); - oluacls_func(L, "getContentPane", _fairygui_Window_getContentPane); - oluacls_func(L, "getDragArea", _fairygui_Window_getDragArea); - oluacls_func(L, "getFrame", _fairygui_Window_getFrame); - oluacls_func(L, "getModalWaitingPane", _fairygui_Window_getModalWaitingPane); - oluacls_func(L, "hide", _fairygui_Window_hide); - oluacls_func(L, "hideImmediately", _fairygui_Window_hideImmediately); - oluacls_func(L, "initWindow", _fairygui_Window_initWindow); - oluacls_func(L, "isBringToFrontOnClick", _fairygui_Window_isBringToFrontOnClick); - oluacls_func(L, "isModal", _fairygui_Window_isModal); - oluacls_func(L, "isShowing", _fairygui_Window_isShowing); - oluacls_func(L, "isTop", _fairygui_Window_isTop); - oluacls_func(L, "new", _fairygui_Window_new); - oluacls_func(L, "setBringToFrontOnClick", _fairygui_Window_setBringToFrontOnClick); - oluacls_func(L, "setCloseButton", _fairygui_Window_setCloseButton); - oluacls_func(L, "setContentArea", _fairygui_Window_setContentArea); - oluacls_func(L, "setContentPane", _fairygui_Window_setContentPane); - oluacls_func(L, "setDragArea", _fairygui_Window_setDragArea); - oluacls_func(L, "setModal", _fairygui_Window_setModal); - oluacls_func(L, "show", _fairygui_Window_show); - oluacls_func(L, "showModalWait", _fairygui_Window_showModalWait); - oluacls_func(L, "toggleStatus", _fairygui_Window_toggleStatus); - oluacls_prop(L, "bringToFrontOnClick", _fairygui_Window_isBringToFrontOnClick, _fairygui_Window_setBringToFrontOnClick); - oluacls_prop(L, "closeButton", _fairygui_Window_getCloseButton, _fairygui_Window_setCloseButton); - oluacls_prop(L, "contentArea", _fairygui_Window_getContentArea, _fairygui_Window_setContentArea); - oluacls_prop(L, "contentPane", _fairygui_Window_getContentPane, _fairygui_Window_setContentPane); - oluacls_prop(L, "dragArea", _fairygui_Window_getDragArea, _fairygui_Window_setDragArea); - oluacls_prop(L, "frame", _fairygui_Window_getFrame, nullptr); - oluacls_prop(L, "modal", _fairygui_Window_isModal, _fairygui_Window_setModal); - oluacls_prop(L, "modalWaitingPane", _fairygui_Window_getModalWaitingPane, nullptr); - oluacls_prop(L, "showing", _fairygui_Window_isShowing, nullptr); - oluacls_prop(L, "top", _fairygui_Window_isTop, nullptr); + oluacls_func(L, "addUISource", _olua_fun_fairygui_Window_addUISource); + oluacls_func(L, "bringToFront", _olua_fun_fairygui_Window_bringToFront); + oluacls_func(L, "closeModalWait", _olua_fun_fairygui_Window_closeModalWait); + oluacls_func(L, "create", _olua_fun_fairygui_Window_create); + oluacls_func(L, "getCloseButton", _olua_fun_fairygui_Window_getCloseButton); + oluacls_func(L, "getContentArea", _olua_fun_fairygui_Window_getContentArea); + oluacls_func(L, "getContentPane", _olua_fun_fairygui_Window_getContentPane); + oluacls_func(L, "getDragArea", _olua_fun_fairygui_Window_getDragArea); + oluacls_func(L, "getFrame", _olua_fun_fairygui_Window_getFrame); + oluacls_func(L, "getModalWaitingPane", _olua_fun_fairygui_Window_getModalWaitingPane); + oluacls_func(L, "hide", _olua_fun_fairygui_Window_hide); + oluacls_func(L, "hideImmediately", _olua_fun_fairygui_Window_hideImmediately); + oluacls_func(L, "initWindow", _olua_fun_fairygui_Window_initWindow); + oluacls_func(L, "isBringToFrontOnClick", _olua_fun_fairygui_Window_isBringToFrontOnClick); + oluacls_func(L, "isModal", _olua_fun_fairygui_Window_isModal); + oluacls_func(L, "isShowing", _olua_fun_fairygui_Window_isShowing); + oluacls_func(L, "isTop", _olua_fun_fairygui_Window_isTop); + oluacls_func(L, "new", _olua_fun_fairygui_Window_new); + oluacls_func(L, "setBringToFrontOnClick", _olua_fun_fairygui_Window_setBringToFrontOnClick); + oluacls_func(L, "setCloseButton", _olua_fun_fairygui_Window_setCloseButton); + oluacls_func(L, "setContentArea", _olua_fun_fairygui_Window_setContentArea); + oluacls_func(L, "setContentPane", _olua_fun_fairygui_Window_setContentPane); + oluacls_func(L, "setDragArea", _olua_fun_fairygui_Window_setDragArea); + oluacls_func(L, "setModal", _olua_fun_fairygui_Window_setModal); + oluacls_func(L, "show", _olua_fun_fairygui_Window_show); + oluacls_func(L, "showModalWait", _olua_fun_fairygui_Window_showModalWait); + oluacls_func(L, "toggleStatus", _olua_fun_fairygui_Window_toggleStatus); + oluacls_prop(L, "bringToFrontOnClick", _olua_fun_fairygui_Window_isBringToFrontOnClick, _olua_fun_fairygui_Window_setBringToFrontOnClick); + oluacls_prop(L, "closeButton", _olua_fun_fairygui_Window_getCloseButton, _olua_fun_fairygui_Window_setCloseButton); + oluacls_prop(L, "contentArea", _olua_fun_fairygui_Window_getContentArea, _olua_fun_fairygui_Window_setContentArea); + oluacls_prop(L, "contentPane", _olua_fun_fairygui_Window_getContentPane, _olua_fun_fairygui_Window_setContentPane); + oluacls_prop(L, "dragArea", _olua_fun_fairygui_Window_getDragArea, _olua_fun_fairygui_Window_setDragArea); + oluacls_prop(L, "frame", _olua_fun_fairygui_Window_getFrame, nullptr); + oluacls_prop(L, "modal", _olua_fun_fairygui_Window_isModal, _olua_fun_fairygui_Window_setModal); + oluacls_prop(L, "modalWaitingPane", _olua_fun_fairygui_Window_getModalWaitingPane, nullptr); + oluacls_prop(L, "showing", _olua_fun_fairygui_Window_isShowing, nullptr); + oluacls_prop(L, "top", _olua_fun_fairygui_Window_isTop, nullptr); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_fgui_Window(lua_State *L) +{ + olua_require(L, "fairygui", luaopen_fairygui); + if (!olua_getclass(L, "fgui.Window")) { + luaL_error(L, "class not found: fairygui::Window"); + } return 1; } OLUA_END_DECLS -static int _fairygui_DragDropManager___gc(lua_State *L) +static int _olua_fun_fairygui_DragDropManager___gc(lua_State *L) { olua_startinvoke(L); @@ -24819,7 +27314,7 @@ static int _fairygui_DragDropManager___gc(lua_State *L) return 0; } -static int _fairygui_DragDropManager___olua_move(lua_State *L) +static int _olua_fun_fairygui_DragDropManager___olua_move(lua_State *L) { olua_startinvoke(L); @@ -24831,7 +27326,7 @@ static int _fairygui_DragDropManager___olua_move(lua_State *L) return 1; } -static int _fairygui_DragDropManager_cancel(lua_State *L) +static int _olua_fun_fairygui_DragDropManager_cancel(lua_State *L) { olua_startinvoke(L); @@ -24847,7 +27342,7 @@ static int _fairygui_DragDropManager_cancel(lua_State *L) return 0; } -static int _fairygui_DragDropManager_getAgent(lua_State *L) +static int _olua_fun_fairygui_DragDropManager_getAgent(lua_State *L) { olua_startinvoke(L); @@ -24864,7 +27359,7 @@ static int _fairygui_DragDropManager_getAgent(lua_State *L) return num_ret; } -static int _fairygui_DragDropManager_getInstance(lua_State *L) +static int _olua_fun_fairygui_DragDropManager_getInstance(lua_State *L) { olua_startinvoke(L); @@ -24877,7 +27372,7 @@ static int _fairygui_DragDropManager_getInstance(lua_State *L) return num_ret; } -static int _fairygui_DragDropManager_isDragging(lua_State *L) +static int _olua_fun_fairygui_DragDropManager_isDragging(lua_State *L) { olua_startinvoke(L); @@ -24894,11 +27389,11 @@ static int _fairygui_DragDropManager_isDragging(lua_State *L) return num_ret; } -static int _fairygui_DragDropManager_new(lua_State *L) +static int _olua_fun_fairygui_DragDropManager_new(lua_State *L) { olua_startinvoke(L); - // DragDropManager() + // fairygui::DragDropManager() fairygui::DragDropManager *ret = new fairygui::DragDropManager(); int num_ret = olua_push_object(L, ret, "fgui.DragDropManager"); olua_postnew(L, ret); @@ -24908,7 +27403,7 @@ static int _fairygui_DragDropManager_new(lua_State *L) return num_ret; } -static int _fairygui_DragDropManager_startDrag$1(lua_State *L) +static int _olua_fun_fairygui_DragDropManager_startDrag$1(lua_State *L) { olua_startinvoke(L); @@ -24930,7 +27425,7 @@ static int _fairygui_DragDropManager_startDrag$1(lua_State *L) return 0; } -static int _fairygui_DragDropManager_startDrag$2(lua_State *L) +static int _olua_fun_fairygui_DragDropManager_startDrag$2(lua_State *L) { olua_startinvoke(L); @@ -24940,7 +27435,7 @@ static int _fairygui_DragDropManager_startDrag$2(lua_State *L) olua_to_object(L, 1, &self, "fgui.DragDropManager"); olua_check_string(L, 2, &arg1); - // void startDrag(const std::string &icon, @optional const cocos2d::Value &sourceData, @optional int touchPointID) + // void startDrag(const std::string &icon) self->startDrag(arg1); olua_endinvoke(L); @@ -24948,7 +27443,7 @@ static int _fairygui_DragDropManager_startDrag$2(lua_State *L) return 0; } -static int _fairygui_DragDropManager_startDrag$3(lua_State *L) +static int _olua_fun_fairygui_DragDropManager_startDrag$3(lua_State *L) { olua_startinvoke(L); @@ -24960,7 +27455,7 @@ static int _fairygui_DragDropManager_startDrag$3(lua_State *L) olua_check_string(L, 2, &arg1); olua_check_cocos2d_Value(L, 3, &arg2); - // void startDrag(const std::string &icon, @optional const cocos2d::Value &sourceData, @optional int touchPointID) + // void startDrag(const std::string &icon, @optional const cocos2d::Value &sourceData) self->startDrag(arg1, arg2); olua_endinvoke(L); @@ -24968,28 +27463,28 @@ static int _fairygui_DragDropManager_startDrag$3(lua_State *L) return 0; } -static int _fairygui_DragDropManager_startDrag(lua_State *L) +static int _olua_fun_fairygui_DragDropManager_startDrag(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_string(L, 2))) { - // void startDrag(const std::string &icon, @optional const cocos2d::Value &sourceData, @optional int touchPointID) - return _fairygui_DragDropManager_startDrag$2(L); + // void startDrag(const std::string &icon) + return _olua_fun_fairygui_DragDropManager_startDrag$2(L); // } } if (num_args == 2) { // if ((olua_is_string(L, 2)) && (olua_is_cocos2d_Value(L, 3))) { - // void startDrag(const std::string &icon, @optional const cocos2d::Value &sourceData, @optional int touchPointID) - return _fairygui_DragDropManager_startDrag$3(L); + // void startDrag(const std::string &icon, @optional const cocos2d::Value &sourceData) + return _olua_fun_fairygui_DragDropManager_startDrag$3(L); // } } if (num_args == 3) { // if ((olua_is_string(L, 2)) && (olua_is_cocos2d_Value(L, 3)) && (olua_is_integer(L, 4))) { // void startDrag(const std::string &icon, @optional const cocos2d::Value &sourceData, @optional int touchPointID) - return _fairygui_DragDropManager_startDrag$1(L); + return _olua_fun_fairygui_DragDropManager_startDrag$1(L); // } } @@ -24998,71 +27493,98 @@ static int _fairygui_DragDropManager_startDrag(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_fairygui_DragDropManager(lua_State *L) +static int _olua_cls_fgui_DragDropManager(lua_State *L) { oluacls_class(L, "fgui.DragDropManager"); - oluacls_func(L, "__gc", _fairygui_DragDropManager___gc); - oluacls_func(L, "__olua_move", _fairygui_DragDropManager___olua_move); - oluacls_func(L, "cancel", _fairygui_DragDropManager_cancel); - oluacls_func(L, "getAgent", _fairygui_DragDropManager_getAgent); - oluacls_func(L, "getInstance", _fairygui_DragDropManager_getInstance); - oluacls_func(L, "isDragging", _fairygui_DragDropManager_isDragging); - oluacls_func(L, "new", _fairygui_DragDropManager_new); - oluacls_func(L, "startDrag", _fairygui_DragDropManager_startDrag); - oluacls_prop(L, "agent", _fairygui_DragDropManager_getAgent, nullptr); - oluacls_prop(L, "dragging", _fairygui_DragDropManager_isDragging, nullptr); - oluacls_prop(L, "instance", _fairygui_DragDropManager_getInstance, nullptr); + oluacls_func(L, "__gc", _olua_fun_fairygui_DragDropManager___gc); + oluacls_func(L, "__olua_move", _olua_fun_fairygui_DragDropManager___olua_move); + oluacls_func(L, "cancel", _olua_fun_fairygui_DragDropManager_cancel); + oluacls_func(L, "getAgent", _olua_fun_fairygui_DragDropManager_getAgent); + oluacls_func(L, "getInstance", _olua_fun_fairygui_DragDropManager_getInstance); + oluacls_func(L, "isDragging", _olua_fun_fairygui_DragDropManager_isDragging); + oluacls_func(L, "new", _olua_fun_fairygui_DragDropManager_new); + oluacls_func(L, "startDrag", _olua_fun_fairygui_DragDropManager_startDrag); + oluacls_prop(L, "agent", _olua_fun_fairygui_DragDropManager_getAgent, nullptr); + oluacls_prop(L, "dragging", _olua_fun_fairygui_DragDropManager_isDragging, nullptr); + oluacls_prop(L, "instance", _olua_fun_fairygui_DragDropManager_getInstance, nullptr); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_fgui_DragDropManager(lua_State *L) +{ + olua_require(L, "fairygui", luaopen_fairygui); + if (!olua_getclass(L, "fgui.DragDropManager")) { + luaL_error(L, "class not found: fairygui::DragDropManager"); + } + return 1; +} OLUA_END_DECLS -static int _fairygui_UIObjectFactory_GLoaderCreator___call(lua_State *L) +static int _olua_fun_fairygui_UIObjectFactory_GLoaderCreator___call(lua_State *L) { olua_startinvoke(L); luaL_checktype(L, -1, LUA_TFUNCTION); - olua_push_callback(L, (fairygui::UIObjectFactory::GLoaderCreator *)nullptr, "fgui.UIObjectFactory::GLoaderCreator"); + olua_push_callback(L, (fairygui::UIObjectFactory::GLoaderCreator *)nullptr, "fgui.UIObjectFactory.GLoaderCreator"); olua_endinvoke(L); return 1; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_fairygui_UIObjectFactory_GLoaderCreator(lua_State *L) +static int _olua_cls_fgui_UIObjectFactory_GLoaderCreator(lua_State *L) { - oluacls_class(L, "fgui.UIObjectFactory::GLoaderCreator"); - oluacls_func(L, "__call", _fairygui_UIObjectFactory_GLoaderCreator___call); + oluacls_class(L, "fgui.UIObjectFactory.GLoaderCreator"); + oluacls_func(L, "__call", _olua_fun_fairygui_UIObjectFactory_GLoaderCreator___call); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_fgui_UIObjectFactory_GLoaderCreator(lua_State *L) +{ + olua_require(L, "fairygui", luaopen_fairygui); + if (!olua_getclass(L, "fgui.UIObjectFactory.GLoaderCreator")) { + luaL_error(L, "class not found: fairygui::UIObjectFactory::GLoaderCreator"); + } return 1; } OLUA_END_DECLS -static int _fairygui_UIObjectFactory_GComponentCreator___call(lua_State *L) +static int _olua_fun_fairygui_UIObjectFactory_GComponentCreator___call(lua_State *L) { olua_startinvoke(L); luaL_checktype(L, -1, LUA_TFUNCTION); - olua_push_callback(L, (fairygui::UIObjectFactory::GComponentCreator *)nullptr, "fgui.UIObjectFactory::GComponentCreator"); + olua_push_callback(L, (fairygui::UIObjectFactory::GComponentCreator *)nullptr, "fgui.UIObjectFactory.GComponentCreator"); olua_endinvoke(L); return 1; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_fairygui_UIObjectFactory_GComponentCreator(lua_State *L) +static int _olua_cls_fgui_UIObjectFactory_GComponentCreator(lua_State *L) { - oluacls_class(L, "fgui.UIObjectFactory::GComponentCreator"); - oluacls_func(L, "__call", _fairygui_UIObjectFactory_GComponentCreator___call); + oluacls_class(L, "fgui.UIObjectFactory.GComponentCreator"); + oluacls_func(L, "__call", _olua_fun_fairygui_UIObjectFactory_GComponentCreator___call); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_fgui_UIObjectFactory_GComponentCreator(lua_State *L) +{ + olua_require(L, "fairygui", luaopen_fairygui); + if (!olua_getclass(L, "fgui.UIObjectFactory.GComponentCreator")) { + luaL_error(L, "class not found: fairygui::UIObjectFactory::GComponentCreator"); + } return 1; } OLUA_END_DECLS -static int _fairygui_UIObjectFactory___gc(lua_State *L) +static int _olua_fun_fairygui_UIObjectFactory___gc(lua_State *L) { olua_startinvoke(L); @@ -25074,7 +27596,7 @@ static int _fairygui_UIObjectFactory___gc(lua_State *L) return 0; } -static int _fairygui_UIObjectFactory___olua_move(lua_State *L) +static int _olua_fun_fairygui_UIObjectFactory___olua_move(lua_State *L) { olua_startinvoke(L); @@ -25086,7 +27608,7 @@ static int _fairygui_UIObjectFactory___olua_move(lua_State *L) return 1; } -static int _fairygui_UIObjectFactory_newObject$1(lua_State *L) +static int _olua_fun_fairygui_UIObjectFactory_newObject$1(lua_State *L) { olua_startinvoke(L); @@ -25103,7 +27625,7 @@ static int _fairygui_UIObjectFactory_newObject$1(lua_State *L) return num_ret; } -static int _fairygui_UIObjectFactory_newObject$2(lua_State *L) +static int _olua_fun_fairygui_UIObjectFactory_newObject$2(lua_State *L) { olua_startinvoke(L); @@ -25120,19 +27642,19 @@ static int _fairygui_UIObjectFactory_newObject$2(lua_State *L) return num_ret; } -static int _fairygui_UIObjectFactory_newObject(lua_State *L) +static int _olua_fun_fairygui_UIObjectFactory_newObject(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 1) { if ((olua_is_object(L, 1, "fgui.PackageItem"))) { // static fairygui::GObject *newObject(fairygui::PackageItem *pi) - return _fairygui_UIObjectFactory_newObject$1(L); + return _olua_fun_fairygui_UIObjectFactory_newObject$1(L); } // if ((olua_is_enum(L, 1))) { // static fairygui::GObject *newObject(fairygui::ObjectType type) - return _fairygui_UIObjectFactory_newObject$2(L); + return _olua_fun_fairygui_UIObjectFactory_newObject$2(L); // } } @@ -25141,19 +27663,20 @@ static int _fairygui_UIObjectFactory_newObject(lua_State *L) return 0; } -static int _fairygui_UIObjectFactory_setLoaderExtension(lua_State *L) +static int _olua_fun_fairygui_UIObjectFactory_setLoaderExtension(lua_State *L) { olua_startinvoke(L); fairygui::UIObjectFactory::GLoaderCreator arg1; /** creator */ - olua_check_callback(L, 1, &arg1, "fgui.UIObjectFactory::GLoaderCreator"); + olua_check_callback(L, 1, &arg1, "fgui.UIObjectFactory.GLoaderCreator"); void *cb_store = (void *)olua_pushclassobj(L, "fgui.UIObjectFactory"); std::string cb_tag = "LoaderExtension"; - std::string cb_name = olua_setcallback(L, cb_store, 1, cb_tag.c_str(), OLUA_TAG_REPLACE); + std::string cb_name = olua_setcallback(L, cb_store, 1, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx]() { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */]() { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); fairygui::GLoader *ret = nullptr; /** ret */ @@ -25171,7 +27694,7 @@ static int _fairygui_UIObjectFactory_setLoaderExtension(lua_State *L) return ret; }; - // static void setLoaderExtension(@localvar fairygui::UIObjectFactory::GLoaderCreator creator) + // static void setLoaderExtension(fairygui::UIObjectFactory::GLoaderCreator creator) fairygui::UIObjectFactory::setLoaderExtension(arg1); olua_endinvoke(L); @@ -25179,7 +27702,7 @@ static int _fairygui_UIObjectFactory_setLoaderExtension(lua_State *L) return 0; } -static int _fairygui_UIObjectFactory_setPackageItemExtension(lua_State *L) +static int _olua_fun_fairygui_UIObjectFactory_setPackageItemExtension(lua_State *L) { olua_startinvoke(L); @@ -25187,13 +27710,14 @@ static int _fairygui_UIObjectFactory_setPackageItemExtension(lua_State *L) fairygui::UIObjectFactory::GComponentCreator arg2; /** creator */ olua_check_string(L, 1, &arg1); - olua_check_callback(L, 2, &arg2, "fgui.UIObjectFactory::GComponentCreator"); + olua_check_callback(L, 2, &arg2, "fgui.UIObjectFactory.GComponentCreator"); void *cb_store = (void *)olua_pushclassobj(L, "fgui.UIObjectFactory"); std::string cb_tag = "PackageItemExtension"; - std::string cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + std::string cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg2 = [cb_store, cb_name, cb_ctx]() { + // lua_State *ML = olua_mainthread(L); + arg2 = [cb_store, cb_name, cb_ctx /*, ML */]() { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); fairygui::GComponent *ret = nullptr; /** ret */ @@ -25211,7 +27735,7 @@ static int _fairygui_UIObjectFactory_setPackageItemExtension(lua_State *L) return ret; }; - // static void setPackageItemExtension(const std::string &url, @localvar fairygui::UIObjectFactory::GComponentCreator creator) + // static void setPackageItemExtension(const std::string &url, fairygui::UIObjectFactory::GComponentCreator creator) fairygui::UIObjectFactory::setPackageItemExtension(arg1, arg2); olua_endinvoke(L); @@ -25219,21 +27743,30 @@ static int _fairygui_UIObjectFactory_setPackageItemExtension(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_fairygui_UIObjectFactory(lua_State *L) +static int _olua_cls_fgui_UIObjectFactory(lua_State *L) { oluacls_class(L, "fgui.UIObjectFactory"); - oluacls_func(L, "__gc", _fairygui_UIObjectFactory___gc); - oluacls_func(L, "__olua_move", _fairygui_UIObjectFactory___olua_move); - oluacls_func(L, "newObject", _fairygui_UIObjectFactory_newObject); - oluacls_func(L, "setLoaderExtension", _fairygui_UIObjectFactory_setLoaderExtension); - oluacls_func(L, "setPackageItemExtension", _fairygui_UIObjectFactory_setPackageItemExtension); + oluacls_func(L, "__gc", _olua_fun_fairygui_UIObjectFactory___gc); + oluacls_func(L, "__olua_move", _olua_fun_fairygui_UIObjectFactory___olua_move); + oluacls_func(L, "newObject", _olua_fun_fairygui_UIObjectFactory_newObject); + oluacls_func(L, "setLoaderExtension", _olua_fun_fairygui_UIObjectFactory_setLoaderExtension); + oluacls_func(L, "setPackageItemExtension", _olua_fun_fairygui_UIObjectFactory_setPackageItemExtension); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_fgui_UIObjectFactory(lua_State *L) +{ + olua_require(L, "fairygui", luaopen_fairygui); + if (!olua_getclass(L, "fgui.UIObjectFactory")) { + luaL_error(L, "class not found: fairygui::UIObjectFactory"); + } return 1; } OLUA_END_DECLS -static int _fairygui_GearBase___gc(lua_State *L) +static int _olua_fun_fairygui_GearBase___gc(lua_State *L) { olua_startinvoke(L); @@ -25245,7 +27778,7 @@ static int _fairygui_GearBase___gc(lua_State *L) return 0; } -static int _fairygui_GearBase___olua_move(lua_State *L) +static int _olua_fun_fairygui_GearBase___olua_move(lua_State *L) { olua_startinvoke(L); @@ -25257,7 +27790,7 @@ static int _fairygui_GearBase___olua_move(lua_State *L) return 1; } -static int _fairygui_GearBase_create(lua_State *L) +static int _olua_fun_fairygui_GearBase_create(lua_State *L) { olua_startinvoke(L); @@ -25276,68 +27809,98 @@ static int _fairygui_GearBase_create(lua_State *L) return num_ret; } -static int _fairygui_GearBase_new(lua_State *L) +static int _olua_fun_fairygui_GearBase_disableAllTweenEffect$1(lua_State *L) { olua_startinvoke(L); - fairygui::GObject *arg1 = nullptr; /** owner */ - - olua_check_object(L, 1, &arg1, "fgui.GObject"); - - // GearBase(fairygui::GObject *owner) - fairygui::GearBase *ret = new fairygui::GearBase(arg1); - int num_ret = olua_push_object(L, ret, "fgui.GearBase"); - olua_postnew(L, ret); + // static bool disableAllTweenEffect + bool ret = fairygui::GearBase::disableAllTweenEffect; + int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); return num_ret; } -static int _fairygui_GearBase_get_disableAllTweenEffect(lua_State *L) +static int _olua_fun_fairygui_GearBase_disableAllTweenEffect$2(lua_State *L) { olua_startinvoke(L); + bool arg1 = false; /** disableAllTweenEffect */ + + olua_check_bool(L, 1, &arg1); + // static bool disableAllTweenEffect - bool ret = fairygui::GearBase::disableAllTweenEffect; - int num_ret = olua_push_bool(L, ret); + fairygui::GearBase::disableAllTweenEffect = arg1; + + olua_endinvoke(L); + + return 0; +} + +static int _olua_fun_fairygui_GearBase_disableAllTweenEffect(lua_State *L) +{ + int num_args = lua_gettop(L); + + if (num_args == 0) { + // static bool disableAllTweenEffect + return _olua_fun_fairygui_GearBase_disableAllTweenEffect$1(L); + } + + if (num_args == 1) { + // if ((olua_is_bool(L, 1))) { + // static bool disableAllTweenEffect + return _olua_fun_fairygui_GearBase_disableAllTweenEffect$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'fairygui::GearBase::disableAllTweenEffect' not support '%d' arguments", num_args); - return num_ret; + return 0; } -static int _fairygui_GearBase_set_disableAllTweenEffect(lua_State *L) +static int _olua_fun_fairygui_GearBase_new(lua_State *L) { olua_startinvoke(L); - bool arg1 = false; /** disableAllTweenEffect */ + fairygui::GObject *arg1 = nullptr; /** owner */ - olua_check_bool(L, 1, &arg1); + olua_check_object(L, 1, &arg1, "fgui.GObject"); - // static bool disableAllTweenEffect - fairygui::GearBase::disableAllTweenEffect = arg1; + // fairygui::GearBase(fairygui::GObject *owner) + fairygui::GearBase *ret = new fairygui::GearBase(arg1); + int num_ret = olua_push_object(L, ret, "fgui.GearBase"); + olua_postnew(L, ret); olua_endinvoke(L); - return 0; + return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_fairygui_GearBase(lua_State *L) +static int _olua_cls_fgui_GearBase(lua_State *L) { oluacls_class(L, "fgui.GearBase"); - oluacls_func(L, "__gc", _fairygui_GearBase___gc); - oluacls_func(L, "__olua_move", _fairygui_GearBase___olua_move); - oluacls_func(L, "create", _fairygui_GearBase_create); - oluacls_func(L, "new", _fairygui_GearBase_new); - oluacls_prop(L, "disableAllTweenEffect", _fairygui_GearBase_get_disableAllTweenEffect, _fairygui_GearBase_set_disableAllTweenEffect); + oluacls_func(L, "__gc", _olua_fun_fairygui_GearBase___gc); + oluacls_func(L, "__olua_move", _olua_fun_fairygui_GearBase___olua_move); + oluacls_func(L, "create", _olua_fun_fairygui_GearBase_create); + oluacls_func(L, "new", _olua_fun_fairygui_GearBase_new); + oluacls_prop(L, "disableAllTweenEffect", _olua_fun_fairygui_GearBase_disableAllTweenEffect, _olua_fun_fairygui_GearBase_disableAllTweenEffect); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_fgui_GearBase(lua_State *L) +{ + olua_require(L, "fairygui", luaopen_fairygui); + if (!olua_getclass(L, "fgui.GearBase")) { + luaL_error(L, "class not found: fairygui::GearBase"); + } return 1; } OLUA_END_DECLS -static int _fairygui_GTreeNode_addChild(lua_State *L) +static int _olua_fun_fairygui_GTreeNode_addChild(lua_State *L) { olua_startinvoke(L); @@ -25359,7 +27922,7 @@ static int _fairygui_GTreeNode_addChild(lua_State *L) return num_ret; } -static int _fairygui_GTreeNode_addChildAt(lua_State *L) +static int _olua_fun_fairygui_GTreeNode_addChildAt(lua_State *L) { olua_startinvoke(L); @@ -25383,7 +27946,7 @@ static int _fairygui_GTreeNode_addChildAt(lua_State *L) return num_ret; } -static int _fairygui_GTreeNode_create$1(lua_State *L) +static int _olua_fun_fairygui_GTreeNode_create$1(lua_State *L) { olua_startinvoke(L); @@ -25402,11 +27965,11 @@ static int _fairygui_GTreeNode_create$1(lua_State *L) return num_ret; } -static int _fairygui_GTreeNode_create$2(lua_State *L) +static int _olua_fun_fairygui_GTreeNode_create$2(lua_State *L) { olua_startinvoke(L); - // static fairygui::GTreeNode *create(@optional bool isFolder, @optional const std::string &resURL) + // static fairygui::GTreeNode *create() fairygui::GTreeNode *ret = fairygui::GTreeNode::create(); int num_ret = olua_push_object(L, ret, "fgui.GTreeNode"); @@ -25415,7 +27978,7 @@ static int _fairygui_GTreeNode_create$2(lua_State *L) return num_ret; } -static int _fairygui_GTreeNode_create$3(lua_State *L) +static int _olua_fun_fairygui_GTreeNode_create$3(lua_State *L) { olua_startinvoke(L); @@ -25423,7 +27986,7 @@ static int _fairygui_GTreeNode_create$3(lua_State *L) olua_check_bool(L, 1, &arg1); - // static fairygui::GTreeNode *create(@optional bool isFolder, @optional const std::string &resURL) + // static fairygui::GTreeNode *create(@optional bool isFolder) fairygui::GTreeNode *ret = fairygui::GTreeNode::create(arg1); int num_ret = olua_push_object(L, ret, "fgui.GTreeNode"); @@ -25432,26 +27995,26 @@ static int _fairygui_GTreeNode_create$3(lua_State *L) return num_ret; } -static int _fairygui_GTreeNode_create(lua_State *L) +static int _olua_fun_fairygui_GTreeNode_create(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 0) { - // static fairygui::GTreeNode *create(@optional bool isFolder, @optional const std::string &resURL) - return _fairygui_GTreeNode_create$2(L); + // static fairygui::GTreeNode *create() + return _olua_fun_fairygui_GTreeNode_create$2(L); } if (num_args == 1) { // if ((olua_is_bool(L, 1))) { - // static fairygui::GTreeNode *create(@optional bool isFolder, @optional const std::string &resURL) - return _fairygui_GTreeNode_create$3(L); + // static fairygui::GTreeNode *create(@optional bool isFolder) + return _olua_fun_fairygui_GTreeNode_create$3(L); // } } if (num_args == 2) { // if ((olua_is_bool(L, 1)) && (olua_is_string(L, 2))) { // static fairygui::GTreeNode *create(@optional bool isFolder, @optional const std::string &resURL) - return _fairygui_GTreeNode_create$1(L); + return _olua_fun_fairygui_GTreeNode_create$1(L); // } } @@ -25460,7 +28023,7 @@ static int _fairygui_GTreeNode_create(lua_State *L) return 0; } -static int _fairygui_GTreeNode_getCell(lua_State *L) +static int _olua_fun_fairygui_GTreeNode_getCell(lua_State *L) { olua_startinvoke(L); @@ -25480,7 +28043,7 @@ static int _fairygui_GTreeNode_getCell(lua_State *L) return num_ret; } -static int _fairygui_GTreeNode_getChildAt(lua_State *L) +static int _olua_fun_fairygui_GTreeNode_getChildAt(lua_State *L) { olua_startinvoke(L); @@ -25502,7 +28065,7 @@ static int _fairygui_GTreeNode_getChildAt(lua_State *L) return num_ret; } -static int _fairygui_GTreeNode_getChildIndex(lua_State *L) +static int _olua_fun_fairygui_GTreeNode_getChildIndex(lua_State *L) { olua_startinvoke(L); @@ -25521,7 +28084,7 @@ static int _fairygui_GTreeNode_getChildIndex(lua_State *L) return num_ret; } -static int _fairygui_GTreeNode_getData(lua_State *L) +static int _olua_fun_fairygui_GTreeNode_getData(lua_State *L) { olua_startinvoke(L); @@ -25538,7 +28101,7 @@ static int _fairygui_GTreeNode_getData(lua_State *L) return num_ret; } -static int _fairygui_GTreeNode_getIcon(lua_State *L) +static int _olua_fun_fairygui_GTreeNode_getIcon(lua_State *L) { olua_startinvoke(L); @@ -25555,7 +28118,7 @@ static int _fairygui_GTreeNode_getIcon(lua_State *L) return num_ret; } -static int _fairygui_GTreeNode_getNextSibling(lua_State *L) +static int _olua_fun_fairygui_GTreeNode_getNextSibling(lua_State *L) { olua_startinvoke(L); @@ -25575,7 +28138,7 @@ static int _fairygui_GTreeNode_getNextSibling(lua_State *L) return num_ret; } -static int _fairygui_GTreeNode_getParent(lua_State *L) +static int _olua_fun_fairygui_GTreeNode_getParent(lua_State *L) { olua_startinvoke(L); @@ -25592,7 +28155,7 @@ static int _fairygui_GTreeNode_getParent(lua_State *L) return num_ret; } -static int _fairygui_GTreeNode_getPrevSibling(lua_State *L) +static int _olua_fun_fairygui_GTreeNode_getPrevSibling(lua_State *L) { olua_startinvoke(L); @@ -25612,7 +28175,7 @@ static int _fairygui_GTreeNode_getPrevSibling(lua_State *L) return num_ret; } -static int _fairygui_GTreeNode_getText(lua_State *L) +static int _olua_fun_fairygui_GTreeNode_getText(lua_State *L) { olua_startinvoke(L); @@ -25629,7 +28192,7 @@ static int _fairygui_GTreeNode_getText(lua_State *L) return num_ret; } -static int _fairygui_GTreeNode_getTree(lua_State *L) +static int _olua_fun_fairygui_GTreeNode_getTree(lua_State *L) { olua_startinvoke(L); @@ -25646,7 +28209,7 @@ static int _fairygui_GTreeNode_getTree(lua_State *L) return num_ret; } -static int _fairygui_GTreeNode_isExpanded(lua_State *L) +static int _olua_fun_fairygui_GTreeNode_isExpanded(lua_State *L) { olua_startinvoke(L); @@ -25663,7 +28226,7 @@ static int _fairygui_GTreeNode_isExpanded(lua_State *L) return num_ret; } -static int _fairygui_GTreeNode_isFolder(lua_State *L) +static int _olua_fun_fairygui_GTreeNode_isFolder(lua_State *L) { olua_startinvoke(L); @@ -25680,11 +28243,11 @@ static int _fairygui_GTreeNode_isFolder(lua_State *L) return num_ret; } -static int _fairygui_GTreeNode_new(lua_State *L) +static int _olua_fun_fairygui_GTreeNode_new(lua_State *L) { olua_startinvoke(L); - // GTreeNode() + // fairygui::GTreeNode() fairygui::GTreeNode *ret = new fairygui::GTreeNode(); int num_ret = olua_push_object(L, ret, "fgui.GTreeNode"); olua_postnew(L, ret); @@ -25694,7 +28257,7 @@ static int _fairygui_GTreeNode_new(lua_State *L) return num_ret; } -static int _fairygui_GTreeNode_numChildren(lua_State *L) +static int _olua_fun_fairygui_GTreeNode_numChildren(lua_State *L) { olua_startinvoke(L); @@ -25711,7 +28274,7 @@ static int _fairygui_GTreeNode_numChildren(lua_State *L) return num_ret; } -static int _fairygui_GTreeNode_removeChild(lua_State *L) +static int _olua_fun_fairygui_GTreeNode_removeChild(lua_State *L) { olua_startinvoke(L); @@ -25732,7 +28295,7 @@ static int _fairygui_GTreeNode_removeChild(lua_State *L) return 0; } -static int _fairygui_GTreeNode_removeChildAt(lua_State *L) +static int _olua_fun_fairygui_GTreeNode_removeChildAt(lua_State *L) { olua_startinvoke(L); @@ -25756,7 +28319,7 @@ static int _fairygui_GTreeNode_removeChildAt(lua_State *L) return 0; } -static int _fairygui_GTreeNode_removeChildren$1(lua_State *L) +static int _olua_fun_fairygui_GTreeNode_removeChildren$1(lua_State *L) { olua_startinvoke(L); @@ -25778,7 +28341,7 @@ static int _fairygui_GTreeNode_removeChildren$1(lua_State *L) return 0; } -static int _fairygui_GTreeNode_removeChildren$2(lua_State *L) +static int _olua_fun_fairygui_GTreeNode_removeChildren$2(lua_State *L) { olua_startinvoke(L); @@ -25804,19 +28367,19 @@ static int _fairygui_GTreeNode_removeChildren$2(lua_State *L) return 0; } -static int _fairygui_GTreeNode_removeChildren(lua_State *L) +static int _olua_fun_fairygui_GTreeNode_removeChildren(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 0) { // @delref(children ~) void removeChildren() - return _fairygui_GTreeNode_removeChildren$1(L); + return _olua_fun_fairygui_GTreeNode_removeChildren$1(L); } if (num_args == 2) { // if ((olua_is_integer(L, 2)) && (olua_is_integer(L, 3))) { // @delref(children ~) void removeChildren(int beginIndex, int endIndex) - return _fairygui_GTreeNode_removeChildren$2(L); + return _olua_fun_fairygui_GTreeNode_removeChildren$2(L); // } } @@ -25825,7 +28388,7 @@ static int _fairygui_GTreeNode_removeChildren(lua_State *L) return 0; } -static int _fairygui_GTreeNode_setChildIndex(lua_State *L) +static int _olua_fun_fairygui_GTreeNode_setChildIndex(lua_State *L) { olua_startinvoke(L); @@ -25845,7 +28408,7 @@ static int _fairygui_GTreeNode_setChildIndex(lua_State *L) return 0; } -static int _fairygui_GTreeNode_setChildIndexBefore(lua_State *L) +static int _olua_fun_fairygui_GTreeNode_setChildIndexBefore(lua_State *L) { olua_startinvoke(L); @@ -25866,7 +28429,7 @@ static int _fairygui_GTreeNode_setChildIndexBefore(lua_State *L) return num_ret; } -static int _fairygui_GTreeNode_setData(lua_State *L) +static int _olua_fun_fairygui_GTreeNode_setData(lua_State *L) { olua_startinvoke(L); @@ -25884,7 +28447,7 @@ static int _fairygui_GTreeNode_setData(lua_State *L) return 0; } -static int _fairygui_GTreeNode_setExpaned(lua_State *L) +static int _olua_fun_fairygui_GTreeNode_setExpaned(lua_State *L) { olua_startinvoke(L); @@ -25902,7 +28465,7 @@ static int _fairygui_GTreeNode_setExpaned(lua_State *L) return 0; } -static int _fairygui_GTreeNode_setIcon(lua_State *L) +static int _olua_fun_fairygui_GTreeNode_setIcon(lua_State *L) { olua_startinvoke(L); @@ -25920,7 +28483,7 @@ static int _fairygui_GTreeNode_setIcon(lua_State *L) return 0; } -static int _fairygui_GTreeNode_setText(lua_State *L) +static int _olua_fun_fairygui_GTreeNode_setText(lua_State *L) { olua_startinvoke(L); @@ -25938,7 +28501,7 @@ static int _fairygui_GTreeNode_setText(lua_State *L) return 0; } -static int _fairygui_GTreeNode_swapChildren(lua_State *L) +static int _olua_fun_fairygui_GTreeNode_swapChildren(lua_State *L) { olua_startinvoke(L); @@ -25958,7 +28521,7 @@ static int _fairygui_GTreeNode_swapChildren(lua_State *L) return 0; } -static int _fairygui_GTreeNode_swapChildrenAt(lua_State *L) +static int _olua_fun_fairygui_GTreeNode_swapChildrenAt(lua_State *L) { olua_startinvoke(L); @@ -25978,99 +28541,125 @@ static int _fairygui_GTreeNode_swapChildrenAt(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_fairygui_GTreeNode(lua_State *L) +static int _olua_cls_fgui_GTreeNode(lua_State *L) { oluacls_class(L, "fgui.GTreeNode"); - oluacls_func(L, "addChild", _fairygui_GTreeNode_addChild); - oluacls_func(L, "addChildAt", _fairygui_GTreeNode_addChildAt); - oluacls_func(L, "create", _fairygui_GTreeNode_create); - oluacls_func(L, "getCell", _fairygui_GTreeNode_getCell); - oluacls_func(L, "getChildAt", _fairygui_GTreeNode_getChildAt); - oluacls_func(L, "getChildIndex", _fairygui_GTreeNode_getChildIndex); - oluacls_func(L, "getData", _fairygui_GTreeNode_getData); - oluacls_func(L, "getIcon", _fairygui_GTreeNode_getIcon); - oluacls_func(L, "getNextSibling", _fairygui_GTreeNode_getNextSibling); - oluacls_func(L, "getParent", _fairygui_GTreeNode_getParent); - oluacls_func(L, "getPrevSibling", _fairygui_GTreeNode_getPrevSibling); - oluacls_func(L, "getText", _fairygui_GTreeNode_getText); - oluacls_func(L, "getTree", _fairygui_GTreeNode_getTree); - oluacls_func(L, "isExpanded", _fairygui_GTreeNode_isExpanded); - oluacls_func(L, "isFolder", _fairygui_GTreeNode_isFolder); - oluacls_func(L, "new", _fairygui_GTreeNode_new); - oluacls_func(L, "numChildren", _fairygui_GTreeNode_numChildren); - oluacls_func(L, "removeChild", _fairygui_GTreeNode_removeChild); - oluacls_func(L, "removeChildAt", _fairygui_GTreeNode_removeChildAt); - oluacls_func(L, "removeChildren", _fairygui_GTreeNode_removeChildren); - oluacls_func(L, "setChildIndex", _fairygui_GTreeNode_setChildIndex); - oluacls_func(L, "setChildIndexBefore", _fairygui_GTreeNode_setChildIndexBefore); - oluacls_func(L, "setData", _fairygui_GTreeNode_setData); - oluacls_func(L, "setExpaned", _fairygui_GTreeNode_setExpaned); - oluacls_func(L, "setIcon", _fairygui_GTreeNode_setIcon); - oluacls_func(L, "setText", _fairygui_GTreeNode_setText); - oluacls_func(L, "swapChildren", _fairygui_GTreeNode_swapChildren); - oluacls_func(L, "swapChildrenAt", _fairygui_GTreeNode_swapChildrenAt); - oluacls_prop(L, "cell", _fairygui_GTreeNode_getCell, nullptr); - oluacls_prop(L, "data", _fairygui_GTreeNode_getData, _fairygui_GTreeNode_setData); - oluacls_prop(L, "expanded", _fairygui_GTreeNode_isExpanded, nullptr); - oluacls_prop(L, "folder", _fairygui_GTreeNode_isFolder, nullptr); - oluacls_prop(L, "icon", _fairygui_GTreeNode_getIcon, _fairygui_GTreeNode_setIcon); - oluacls_prop(L, "nextSibling", _fairygui_GTreeNode_getNextSibling, nullptr); - oluacls_prop(L, "numChildren", _fairygui_GTreeNode_numChildren, nullptr); - oluacls_prop(L, "parent", _fairygui_GTreeNode_getParent, nullptr); - oluacls_prop(L, "prevSibling", _fairygui_GTreeNode_getPrevSibling, nullptr); - oluacls_prop(L, "text", _fairygui_GTreeNode_getText, _fairygui_GTreeNode_setText); - oluacls_prop(L, "tree", _fairygui_GTreeNode_getTree, nullptr); + oluacls_func(L, "addChild", _olua_fun_fairygui_GTreeNode_addChild); + oluacls_func(L, "addChildAt", _olua_fun_fairygui_GTreeNode_addChildAt); + oluacls_func(L, "create", _olua_fun_fairygui_GTreeNode_create); + oluacls_func(L, "getCell", _olua_fun_fairygui_GTreeNode_getCell); + oluacls_func(L, "getChildAt", _olua_fun_fairygui_GTreeNode_getChildAt); + oluacls_func(L, "getChildIndex", _olua_fun_fairygui_GTreeNode_getChildIndex); + oluacls_func(L, "getData", _olua_fun_fairygui_GTreeNode_getData); + oluacls_func(L, "getIcon", _olua_fun_fairygui_GTreeNode_getIcon); + oluacls_func(L, "getNextSibling", _olua_fun_fairygui_GTreeNode_getNextSibling); + oluacls_func(L, "getParent", _olua_fun_fairygui_GTreeNode_getParent); + oluacls_func(L, "getPrevSibling", _olua_fun_fairygui_GTreeNode_getPrevSibling); + oluacls_func(L, "getText", _olua_fun_fairygui_GTreeNode_getText); + oluacls_func(L, "getTree", _olua_fun_fairygui_GTreeNode_getTree); + oluacls_func(L, "isExpanded", _olua_fun_fairygui_GTreeNode_isExpanded); + oluacls_func(L, "isFolder", _olua_fun_fairygui_GTreeNode_isFolder); + oluacls_func(L, "new", _olua_fun_fairygui_GTreeNode_new); + oluacls_func(L, "removeChild", _olua_fun_fairygui_GTreeNode_removeChild); + oluacls_func(L, "removeChildAt", _olua_fun_fairygui_GTreeNode_removeChildAt); + oluacls_func(L, "removeChildren", _olua_fun_fairygui_GTreeNode_removeChildren); + oluacls_func(L, "setChildIndex", _olua_fun_fairygui_GTreeNode_setChildIndex); + oluacls_func(L, "setChildIndexBefore", _olua_fun_fairygui_GTreeNode_setChildIndexBefore); + oluacls_func(L, "setData", _olua_fun_fairygui_GTreeNode_setData); + oluacls_func(L, "setExpaned", _olua_fun_fairygui_GTreeNode_setExpaned); + oluacls_func(L, "setIcon", _olua_fun_fairygui_GTreeNode_setIcon); + oluacls_func(L, "setText", _olua_fun_fairygui_GTreeNode_setText); + oluacls_func(L, "swapChildren", _olua_fun_fairygui_GTreeNode_swapChildren); + oluacls_func(L, "swapChildrenAt", _olua_fun_fairygui_GTreeNode_swapChildrenAt); + oluacls_prop(L, "cell", _olua_fun_fairygui_GTreeNode_getCell, nullptr); + oluacls_prop(L, "data", _olua_fun_fairygui_GTreeNode_getData, _olua_fun_fairygui_GTreeNode_setData); + oluacls_prop(L, "expanded", _olua_fun_fairygui_GTreeNode_isExpanded, nullptr); + oluacls_prop(L, "folder", _olua_fun_fairygui_GTreeNode_isFolder, nullptr); + oluacls_prop(L, "icon", _olua_fun_fairygui_GTreeNode_getIcon, _olua_fun_fairygui_GTreeNode_setIcon); + oluacls_prop(L, "nextSibling", _olua_fun_fairygui_GTreeNode_getNextSibling, nullptr); + oluacls_prop(L, "numChildren", _olua_fun_fairygui_GTreeNode_numChildren, nullptr); + oluacls_prop(L, "parent", _olua_fun_fairygui_GTreeNode_getParent, nullptr); + oluacls_prop(L, "prevSibling", _olua_fun_fairygui_GTreeNode_getPrevSibling, nullptr); + oluacls_prop(L, "text", _olua_fun_fairygui_GTreeNode_getText, _olua_fun_fairygui_GTreeNode_setText); + oluacls_prop(L, "tree", _olua_fun_fairygui_GTreeNode_getTree, nullptr); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_fgui_GTreeNode(lua_State *L) +{ + olua_require(L, "fairygui", luaopen_fairygui); + if (!olua_getclass(L, "fgui.GTreeNode")) { + luaL_error(L, "class not found: fairygui::GTreeNode"); + } return 1; } OLUA_END_DECLS -static int _fairygui_GTree_TreeNodeRenderFunction___call(lua_State *L) +static int _olua_fun_fairygui_GTree_TreeNodeRenderFunction___call(lua_State *L) { olua_startinvoke(L); luaL_checktype(L, -1, LUA_TFUNCTION); - olua_push_callback(L, (fairygui::GTree::TreeNodeRenderFunction *)nullptr, "fgui.GTree::TreeNodeRenderFunction"); + olua_push_callback(L, (fairygui::GTree::TreeNodeRenderFunction *)nullptr, "fgui.GTree.TreeNodeRenderFunction"); olua_endinvoke(L); return 1; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_fairygui_GTree_TreeNodeRenderFunction(lua_State *L) +static int _olua_cls_fgui_GTree_TreeNodeRenderFunction(lua_State *L) { - oluacls_class(L, "fgui.GTree::TreeNodeRenderFunction"); - oluacls_func(L, "__call", _fairygui_GTree_TreeNodeRenderFunction___call); + oluacls_class(L, "fgui.GTree.TreeNodeRenderFunction"); + oluacls_func(L, "__call", _olua_fun_fairygui_GTree_TreeNodeRenderFunction___call); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_fgui_GTree_TreeNodeRenderFunction(lua_State *L) +{ + olua_require(L, "fairygui", luaopen_fairygui); + if (!olua_getclass(L, "fgui.GTree.TreeNodeRenderFunction")) { + luaL_error(L, "class not found: fairygui::GTree::TreeNodeRenderFunction"); + } + return 1; +} OLUA_END_DECLS -static int _fairygui_GTree_TreeNodeWillExpandFunction___call(lua_State *L) +static int _olua_fun_fairygui_GTree_TreeNodeWillExpandFunction___call(lua_State *L) { olua_startinvoke(L); luaL_checktype(L, -1, LUA_TFUNCTION); - olua_push_callback(L, (fairygui::GTree::TreeNodeWillExpandFunction *)nullptr, "fgui.GTree::TreeNodeWillExpandFunction"); + olua_push_callback(L, (fairygui::GTree::TreeNodeWillExpandFunction *)nullptr, "fgui.GTree.TreeNodeWillExpandFunction"); olua_endinvoke(L); return 1; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_fairygui_GTree_TreeNodeWillExpandFunction(lua_State *L) +static int _olua_cls_fgui_GTree_TreeNodeWillExpandFunction(lua_State *L) { - oluacls_class(L, "fgui.GTree::TreeNodeWillExpandFunction"); - oluacls_func(L, "__call", _fairygui_GTree_TreeNodeWillExpandFunction___call); + oluacls_class(L, "fgui.GTree.TreeNodeWillExpandFunction"); + oluacls_func(L, "__call", _olua_fun_fairygui_GTree_TreeNodeWillExpandFunction___call); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_fgui_GTree_TreeNodeWillExpandFunction(lua_State *L) +{ + olua_require(L, "fairygui", luaopen_fairygui); + if (!olua_getclass(L, "fgui.GTree.TreeNodeWillExpandFunction")) { + luaL_error(L, "class not found: fairygui::GTree::TreeNodeWillExpandFunction"); + } return 1; } OLUA_END_DECLS -static int _fairygui_GTree_collapseAll(lua_State *L) +static int _olua_fun_fairygui_GTree_collapseAll(lua_State *L) { olua_startinvoke(L); @@ -26088,7 +28677,7 @@ static int _fairygui_GTree_collapseAll(lua_State *L) return 0; } -static int _fairygui_GTree_create(lua_State *L) +static int _olua_fun_fairygui_GTree_create(lua_State *L) { olua_startinvoke(L); @@ -26101,7 +28690,7 @@ static int _fairygui_GTree_create(lua_State *L) return num_ret; } -static int _fairygui_GTree_expandAll(lua_State *L) +static int _olua_fun_fairygui_GTree_expandAll(lua_State *L) { olua_startinvoke(L); @@ -26119,7 +28708,7 @@ static int _fairygui_GTree_expandAll(lua_State *L) return 0; } -static int _fairygui_GTree_getClickToExpand(lua_State *L) +static int _olua_fun_fairygui_GTree_getClickToExpand(lua_State *L) { olua_startinvoke(L); @@ -26136,7 +28725,7 @@ static int _fairygui_GTree_getClickToExpand(lua_State *L) return num_ret; } -static int _fairygui_GTree_getIndent(lua_State *L) +static int _olua_fun_fairygui_GTree_getIndent(lua_State *L) { olua_startinvoke(L); @@ -26153,7 +28742,7 @@ static int _fairygui_GTree_getIndent(lua_State *L) return num_ret; } -static int _fairygui_GTree_getRootNode(lua_State *L) +static int _olua_fun_fairygui_GTree_getRootNode(lua_State *L) { olua_startinvoke(L); @@ -26173,7 +28762,7 @@ static int _fairygui_GTree_getRootNode(lua_State *L) return num_ret; } -static int _fairygui_GTree_getSelectedNode(lua_State *L) +static int _olua_fun_fairygui_GTree_getSelectedNode(lua_State *L) { olua_startinvoke(L); @@ -26193,7 +28782,7 @@ static int _fairygui_GTree_getSelectedNode(lua_State *L) return num_ret; } -static int _fairygui_GTree_getSelectedNodes(lua_State *L) +static int _olua_fun_fairygui_GTree_getSelectedNodes(lua_State *L) { olua_startinvoke(L); @@ -26201,7 +28790,7 @@ static int _fairygui_GTree_getSelectedNodes(lua_State *L) std::vector *arg1 = nullptr; /** result */ olua_to_object(L, 1, &self, "fgui.GTree"); - olua_check_pointer(L, 2, &arg1, "fgui.VectorTreeNode"); + olua_check_valueptr(L, 2, &arg1, "fgui.VectorTreeNode"); // void getSelectedNodes(@addref(nodes |) std::vector &result) self->getSelectedNodes(*arg1); @@ -26218,11 +28807,11 @@ static int _fairygui_GTree_getSelectedNodes(lua_State *L) return 0; } -static int _fairygui_GTree_new(lua_State *L) +static int _olua_fun_fairygui_GTree_new(lua_State *L) { olua_startinvoke(L); - // GTree() + // fairygui::GTree() fairygui::GTree *ret = new fairygui::GTree(); int num_ret = olua_push_object(L, ret, "fgui.GTree"); olua_postnew(L, ret); @@ -26232,7 +28821,7 @@ static int _fairygui_GTree_new(lua_State *L) return num_ret; } -static int _fairygui_GTree_selectNode$1(lua_State *L) +static int _olua_fun_fairygui_GTree_selectNode$1(lua_State *L) { olua_startinvoke(L); @@ -26252,7 +28841,7 @@ static int _fairygui_GTree_selectNode$1(lua_State *L) return 0; } -static int _fairygui_GTree_selectNode$2(lua_State *L) +static int _olua_fun_fairygui_GTree_selectNode$2(lua_State *L) { olua_startinvoke(L); @@ -26262,7 +28851,7 @@ static int _fairygui_GTree_selectNode$2(lua_State *L) olua_to_object(L, 1, &self, "fgui.GTree"); olua_check_object(L, 2, &arg1, "fgui.GTreeNode"); - // void selectNode(fairygui::GTreeNode *node, @optional bool scrollItToView) + // void selectNode(fairygui::GTreeNode *node) self->selectNode(arg1); olua_endinvoke(L); @@ -26270,21 +28859,21 @@ static int _fairygui_GTree_selectNode$2(lua_State *L) return 0; } -static int _fairygui_GTree_selectNode(lua_State *L) +static int _olua_fun_fairygui_GTree_selectNode(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_object(L, 2, "fgui.GTreeNode"))) { - // void selectNode(fairygui::GTreeNode *node, @optional bool scrollItToView) - return _fairygui_GTree_selectNode$2(L); + // void selectNode(fairygui::GTreeNode *node) + return _olua_fun_fairygui_GTree_selectNode$2(L); // } } if (num_args == 2) { // if ((olua_is_object(L, 2, "fgui.GTreeNode")) && (olua_is_bool(L, 3))) { // void selectNode(fairygui::GTreeNode *node, @optional bool scrollItToView) - return _fairygui_GTree_selectNode$1(L); + return _olua_fun_fairygui_GTree_selectNode$1(L); // } } @@ -26293,7 +28882,7 @@ static int _fairygui_GTree_selectNode(lua_State *L) return 0; } -static int _fairygui_GTree_setClickToExpand(lua_State *L) +static int _olua_fun_fairygui_GTree_setClickToExpand(lua_State *L) { olua_startinvoke(L); @@ -26311,7 +28900,7 @@ static int _fairygui_GTree_setClickToExpand(lua_State *L) return 0; } -static int _fairygui_GTree_setIndent(lua_State *L) +static int _olua_fun_fairygui_GTree_setIndent(lua_State *L) { olua_startinvoke(L); @@ -26329,25 +28918,7 @@ static int _fairygui_GTree_setIndent(lua_State *L) return 0; } -static int _fairygui_GTree_unselectNode(lua_State *L) -{ - olua_startinvoke(L); - - fairygui::GTree *self = nullptr; - fairygui::GTreeNode *arg1 = nullptr; /** node */ - - olua_to_object(L, 1, &self, "fgui.GTree"); - olua_check_object(L, 2, &arg1, "fgui.GTreeNode"); - - // void unselectNode(fairygui::GTreeNode *node) - self->unselectNode(arg1); - - olua_endinvoke(L); - - return 0; -} - -static int _fairygui_GTree_get_treeNodeRender(lua_State *L) +static int _olua_fun_fairygui_GTree_treeNodeRender$1(lua_State *L) { olua_startinvoke(L); @@ -26359,16 +28930,16 @@ static int _fairygui_GTree_get_treeNodeRender(lua_State *L) std::string cb_tag = "treeNodeRender"; olua_getcallback(L, cb_store, cb_tag.c_str(), OLUA_TAG_EQUAL); - // @nullable fairygui::GTree::TreeNodeRenderFunction treeNodeRender + // fairygui::GTree::TreeNodeRenderFunction treeNodeRender fairygui::GTree::TreeNodeRenderFunction ret = self->treeNodeRender; - int num_ret = olua_push_callback(L, &ret, "fgui.GTree::TreeNodeRenderFunction"); + int num_ret = olua_push_callback(L, &ret, "fgui.GTree.TreeNodeRenderFunction"); olua_endinvoke(L); return num_ret; } -static int _fairygui_GTree_set_treeNodeRender(lua_State *L) +static int _olua_fun_fairygui_GTree_treeNodeRender$2(lua_State *L) { olua_startinvoke(L); @@ -26377,32 +28948,32 @@ static int _fairygui_GTree_set_treeNodeRender(lua_State *L) olua_to_object(L, 1, &self, "fgui.GTree"); if (!olua_isnoneornil(L, 2)) { - olua_check_callback(L, 2, &arg1, "fgui.GTree::TreeNodeRenderFunction"); + olua_check_callback(L, 2, &arg1, "fgui.GTree.TreeNodeRenderFunction"); } void *cb_store = (void *)self; std::string cb_tag = "treeNodeRender"; std::string cb_name; if (olua_isfunction(L, 2)) { - cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](fairygui::GTreeNode *arg1, fairygui::GComponent *arg2) { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](fairygui::GTreeNode *cb_arg1, fairygui::GComponent *cb_arg2) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); if (olua_contextequal(L, cb_ctx)) { int top = lua_gettop(L); - olua_push_object(L, arg1, "fgui.GTreeNode"); - olua_push_object(L, arg2, "fgui.GComponent"); - - // insert code before call - olua_pushobj(L, (fairygui::GComponent *)cb_store); - olua_addref(L, -1, "nodes", top + 1, OLUA_REF_MULTI); - olua_addref(L, -1, "children",top + 2, OLUA_REF_MULTI); - lua_pop(L, 1); + size_t last = olua_push_objpool(L); + olua_enable_objpool(L); + olua_push_object(L, cb_arg1, "fgui.GTreeNode"); + olua_push_object(L, cb_arg2, "fgui.GComponent"); + olua_disable_objpool(L); olua_callback(L, cb_store, cb_name.c_str(), 2); + //pop stack value + olua_pop_objpool(L, last); lua_settop(L, top); } }; @@ -26411,7 +28982,7 @@ static int _fairygui_GTree_set_treeNodeRender(lua_State *L) arg1 = nullptr; } - // @nullable fairygui::GTree::TreeNodeRenderFunction treeNodeRender + // fairygui::GTree::TreeNodeRenderFunction treeNodeRender self->treeNodeRender = arg1; olua_endinvoke(L); @@ -26419,7 +28990,28 @@ static int _fairygui_GTree_set_treeNodeRender(lua_State *L) return 0; } -static int _fairygui_GTree_get_treeNodeWillExpand(lua_State *L) +static int _olua_fun_fairygui_GTree_treeNodeRender(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // fairygui::GTree::TreeNodeRenderFunction treeNodeRender + return _olua_fun_fairygui_GTree_treeNodeRender$1(L); + } + + if (num_args == 1) { + // if ((olua_is_callback(L, 2, "fgui.GTree.TreeNodeRenderFunction") || olua_isnil(L, 2))) { + // fairygui::GTree::TreeNodeRenderFunction treeNodeRender + return _olua_fun_fairygui_GTree_treeNodeRender$2(L); + // } + } + + luaL_error(L, "method 'fairygui::GTree::treeNodeRender' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_fairygui_GTree_treeNodeWillExpand$1(lua_State *L) { olua_startinvoke(L); @@ -26431,16 +29023,16 @@ static int _fairygui_GTree_get_treeNodeWillExpand(lua_State *L) std::string cb_tag = "treeNodeWillExpand"; olua_getcallback(L, cb_store, cb_tag.c_str(), OLUA_TAG_EQUAL); - // @nullable fairygui::GTree::TreeNodeWillExpandFunction treeNodeWillExpand + // fairygui::GTree::TreeNodeWillExpandFunction treeNodeWillExpand fairygui::GTree::TreeNodeWillExpandFunction ret = self->treeNodeWillExpand; - int num_ret = olua_push_callback(L, &ret, "fgui.GTree::TreeNodeWillExpandFunction"); + int num_ret = olua_push_callback(L, &ret, "fgui.GTree.TreeNodeWillExpandFunction"); olua_endinvoke(L); return num_ret; } -static int _fairygui_GTree_set_treeNodeWillExpand(lua_State *L) +static int _olua_fun_fairygui_GTree_treeNodeWillExpand$2(lua_State *L) { olua_startinvoke(L); @@ -26449,31 +29041,32 @@ static int _fairygui_GTree_set_treeNodeWillExpand(lua_State *L) olua_to_object(L, 1, &self, "fgui.GTree"); if (!olua_isnoneornil(L, 2)) { - olua_check_callback(L, 2, &arg1, "fgui.GTree::TreeNodeWillExpandFunction"); + olua_check_callback(L, 2, &arg1, "fgui.GTree.TreeNodeWillExpandFunction"); } void *cb_store = (void *)self; std::string cb_tag = "treeNodeWillExpand"; std::string cb_name; if (olua_isfunction(L, 2)) { - cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](fairygui::GTreeNode *arg1, bool arg2) { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](fairygui::GTreeNode *cb_arg1, bool cb_arg2) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); if (olua_contextequal(L, cb_ctx)) { int top = lua_gettop(L); - olua_push_object(L, arg1, "fgui.GTreeNode"); - olua_push_bool(L, arg2); - - // insert code before call - olua_pushobj(L, (fairygui::GComponent *)cb_store); - olua_addref(L, -1, "nodes", top + 1, OLUA_REF_MULTI); - lua_pop(L, 1); + size_t last = olua_push_objpool(L); + olua_enable_objpool(L); + olua_push_object(L, cb_arg1, "fgui.GTreeNode"); + olua_push_bool(L, cb_arg2); + olua_disable_objpool(L); olua_callback(L, cb_store, cb_name.c_str(), 2); + //pop stack value + olua_pop_objpool(L, last); lua_settop(L, top); } }; @@ -26482,7 +29075,7 @@ static int _fairygui_GTree_set_treeNodeWillExpand(lua_State *L) arg1 = nullptr; } - // @nullable fairygui::GTree::TreeNodeWillExpandFunction treeNodeWillExpand + // fairygui::GTree::TreeNodeWillExpandFunction treeNodeWillExpand self->treeNodeWillExpand = arg1; olua_endinvoke(L); @@ -26490,35 +29083,83 @@ static int _fairygui_GTree_set_treeNodeWillExpand(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_fairygui_GTree(lua_State *L) +static int _olua_fun_fairygui_GTree_treeNodeWillExpand(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // fairygui::GTree::TreeNodeWillExpandFunction treeNodeWillExpand + return _olua_fun_fairygui_GTree_treeNodeWillExpand$1(L); + } + + if (num_args == 1) { + // if ((olua_is_callback(L, 2, "fgui.GTree.TreeNodeWillExpandFunction") || olua_isnil(L, 2))) { + // fairygui::GTree::TreeNodeWillExpandFunction treeNodeWillExpand + return _olua_fun_fairygui_GTree_treeNodeWillExpand$2(L); + // } + } + + luaL_error(L, "method 'fairygui::GTree::treeNodeWillExpand' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_fairygui_GTree_unselectNode(lua_State *L) +{ + olua_startinvoke(L); + + fairygui::GTree *self = nullptr; + fairygui::GTreeNode *arg1 = nullptr; /** node */ + + olua_to_object(L, 1, &self, "fgui.GTree"); + olua_check_object(L, 2, &arg1, "fgui.GTreeNode"); + + // void unselectNode(fairygui::GTreeNode *node) + self->unselectNode(arg1); + + olua_endinvoke(L); + + return 0; +} + +static int _olua_cls_fgui_GTree(lua_State *L) { oluacls_class(L, "fgui.GTree"); - oluacls_func(L, "collapseAll", _fairygui_GTree_collapseAll); - oluacls_func(L, "create", _fairygui_GTree_create); - oluacls_func(L, "expandAll", _fairygui_GTree_expandAll); - oluacls_func(L, "getClickToExpand", _fairygui_GTree_getClickToExpand); - oluacls_func(L, "getIndent", _fairygui_GTree_getIndent); - oluacls_func(L, "getRootNode", _fairygui_GTree_getRootNode); - oluacls_func(L, "getSelectedNode", _fairygui_GTree_getSelectedNode); - oluacls_func(L, "getSelectedNodes", _fairygui_GTree_getSelectedNodes); - oluacls_func(L, "new", _fairygui_GTree_new); - oluacls_func(L, "selectNode", _fairygui_GTree_selectNode); - oluacls_func(L, "setClickToExpand", _fairygui_GTree_setClickToExpand); - oluacls_func(L, "setIndent", _fairygui_GTree_setIndent); - oluacls_func(L, "unselectNode", _fairygui_GTree_unselectNode); - oluacls_prop(L, "clickToExpand", _fairygui_GTree_getClickToExpand, _fairygui_GTree_setClickToExpand); - oluacls_prop(L, "indent", _fairygui_GTree_getIndent, _fairygui_GTree_setIndent); - oluacls_prop(L, "rootNode", _fairygui_GTree_getRootNode, nullptr); - oluacls_prop(L, "selectedNode", _fairygui_GTree_getSelectedNode, nullptr); - oluacls_prop(L, "treeNodeRender", _fairygui_GTree_get_treeNodeRender, _fairygui_GTree_set_treeNodeRender); - oluacls_prop(L, "treeNodeWillExpand", _fairygui_GTree_get_treeNodeWillExpand, _fairygui_GTree_set_treeNodeWillExpand); + oluacls_func(L, "collapseAll", _olua_fun_fairygui_GTree_collapseAll); + oluacls_func(L, "create", _olua_fun_fairygui_GTree_create); + oluacls_func(L, "expandAll", _olua_fun_fairygui_GTree_expandAll); + oluacls_func(L, "getClickToExpand", _olua_fun_fairygui_GTree_getClickToExpand); + oluacls_func(L, "getIndent", _olua_fun_fairygui_GTree_getIndent); + oluacls_func(L, "getRootNode", _olua_fun_fairygui_GTree_getRootNode); + oluacls_func(L, "getSelectedNode", _olua_fun_fairygui_GTree_getSelectedNode); + oluacls_func(L, "getSelectedNodes", _olua_fun_fairygui_GTree_getSelectedNodes); + oluacls_func(L, "new", _olua_fun_fairygui_GTree_new); + oluacls_func(L, "selectNode", _olua_fun_fairygui_GTree_selectNode); + oluacls_func(L, "setClickToExpand", _olua_fun_fairygui_GTree_setClickToExpand); + oluacls_func(L, "setIndent", _olua_fun_fairygui_GTree_setIndent); + oluacls_func(L, "unselectNode", _olua_fun_fairygui_GTree_unselectNode); + oluacls_prop(L, "clickToExpand", _olua_fun_fairygui_GTree_getClickToExpand, _olua_fun_fairygui_GTree_setClickToExpand); + oluacls_prop(L, "indent", _olua_fun_fairygui_GTree_getIndent, _olua_fun_fairygui_GTree_setIndent); + oluacls_prop(L, "rootNode", _olua_fun_fairygui_GTree_getRootNode, nullptr); + oluacls_prop(L, "selectedNode", _olua_fun_fairygui_GTree_getSelectedNode, nullptr); + oluacls_prop(L, "treeNodeRender", _olua_fun_fairygui_GTree_treeNodeRender, _olua_fun_fairygui_GTree_treeNodeRender); + oluacls_prop(L, "treeNodeWillExpand", _olua_fun_fairygui_GTree_treeNodeWillExpand, _olua_fun_fairygui_GTree_treeNodeWillExpand); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_fgui_GTree(lua_State *L) +{ + olua_require(L, "fairygui", luaopen_fairygui); + if (!olua_getclass(L, "fgui.GTree")) { + luaL_error(L, "class not found: fairygui::GTree"); + } + return 1; +} OLUA_END_DECLS -static int _fairygui_FUIContainer_create(lua_State *L) +static int _olua_fun_fairygui_FUIContainer_create(lua_State *L) { olua_startinvoke(L); @@ -26531,7 +29172,63 @@ static int _fairygui_FUIContainer_create(lua_State *L) return num_ret; } -static int _fairygui_FUIContainer_getAlphaThreshold(lua_State *L) +static int _olua_fun_fairygui_FUIContainer_gOwner$1(lua_State *L) +{ + olua_startinvoke(L); + + fairygui::FUIContainer *self = nullptr; + + olua_to_object(L, 1, &self, "fgui.FUIContainer"); + + // fairygui::GObject *gOwner + fairygui::GObject *ret = self->gOwner; + int num_ret = olua_push_object(L, ret, "fgui.GObject"); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_fairygui_FUIContainer_gOwner$2(lua_State *L) +{ + olua_startinvoke(L); + + fairygui::FUIContainer *self = nullptr; + fairygui::GObject *arg1 = nullptr; /** gOwner */ + + olua_to_object(L, 1, &self, "fgui.FUIContainer"); + olua_check_object(L, 2, &arg1, "fgui.GObject"); + + // fairygui::GObject *gOwner + self->gOwner = arg1; + + olua_endinvoke(L); + + return 0; +} + +static int _olua_fun_fairygui_FUIContainer_gOwner(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // fairygui::GObject *gOwner + return _olua_fun_fairygui_FUIContainer_gOwner$1(L); + } + + if (num_args == 1) { + // if ((olua_is_object(L, 2, "fgui.GObject"))) { + // fairygui::GObject *gOwner + return _olua_fun_fairygui_FUIContainer_gOwner$2(L); + // } + } + + luaL_error(L, "method 'fairygui::FUIContainer::gOwner' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_fairygui_FUIContainer_getAlphaThreshold(lua_State *L) { olua_startinvoke(L); @@ -26548,7 +29245,7 @@ static int _fairygui_FUIContainer_getAlphaThreshold(lua_State *L) return num_ret; } -static int _fairygui_FUIContainer_getClippingRegion(lua_State *L) +static int _olua_fun_fairygui_FUIContainer_getClippingRegion(lua_State *L) { olua_startinvoke(L); @@ -26565,7 +29262,7 @@ static int _fairygui_FUIContainer_getClippingRegion(lua_State *L) return num_ret; } -static int _fairygui_FUIContainer_getStencil(lua_State *L) +static int _olua_fun_fairygui_FUIContainer_getStencil(lua_State *L) { olua_startinvoke(L); @@ -26582,7 +29279,7 @@ static int _fairygui_FUIContainer_getStencil(lua_State *L) return num_ret; } -static int _fairygui_FUIContainer_isClippingEnabled(lua_State *L) +static int _olua_fun_fairygui_FUIContainer_isClippingEnabled(lua_State *L) { olua_startinvoke(L); @@ -26599,7 +29296,7 @@ static int _fairygui_FUIContainer_isClippingEnabled(lua_State *L) return num_ret; } -static int _fairygui_FUIContainer_isInverted(lua_State *L) +static int _olua_fun_fairygui_FUIContainer_isInverted(lua_State *L) { olua_startinvoke(L); @@ -26616,11 +29313,11 @@ static int _fairygui_FUIContainer_isInverted(lua_State *L) return num_ret; } -static int _fairygui_FUIContainer_new(lua_State *L) +static int _olua_fun_fairygui_FUIContainer_new(lua_State *L) { olua_startinvoke(L); - // FUIContainer() + // fairygui::FUIContainer() fairygui::FUIContainer *ret = new fairygui::FUIContainer(); int num_ret = olua_push_object(L, ret, "fgui.FUIContainer"); olua_postnew(L, ret); @@ -26630,7 +29327,7 @@ static int _fairygui_FUIContainer_new(lua_State *L) return num_ret; } -static int _fairygui_FUIContainer_setAlphaThreshold(lua_State *L) +static int _olua_fun_fairygui_FUIContainer_setAlphaThreshold(lua_State *L) { olua_startinvoke(L); @@ -26648,7 +29345,7 @@ static int _fairygui_FUIContainer_setAlphaThreshold(lua_State *L) return 0; } -static int _fairygui_FUIContainer_setClippingEnabled(lua_State *L) +static int _olua_fun_fairygui_FUIContainer_setClippingEnabled(lua_State *L) { olua_startinvoke(L); @@ -26666,25 +29363,25 @@ static int _fairygui_FUIContainer_setClippingEnabled(lua_State *L) return 0; } -static int _fairygui_FUIContainer_setClippingRegion(lua_State *L) +static int _olua_fun_fairygui_FUIContainer_setClippingRegion(lua_State *L) { olua_startinvoke(L); fairygui::FUIContainer *self = nullptr; - cocos2d::Rect arg1; /** clippingRegion */ + cocos2d::Rect *arg1; /** clippingRegion */ olua_to_object(L, 1, &self, "fgui.FUIContainer"); olua_check_object(L, 2, &arg1, "cc.Rect"); // void setClippingRegion(const cocos2d::Rect &clippingRegion) - self->setClippingRegion(arg1); + self->setClippingRegion(*arg1); olua_endinvoke(L); return 0; } -static int _fairygui_FUIContainer_setInverted(lua_State *L) +static int _olua_fun_fairygui_FUIContainer_setInverted(lua_State *L) { olua_startinvoke(L); @@ -26702,7 +29399,7 @@ static int _fairygui_FUIContainer_setInverted(lua_State *L) return 0; } -static int _fairygui_FUIContainer_setStencil(lua_State *L) +static int _olua_fun_fairygui_FUIContainer_setStencil(lua_State *L) { olua_startinvoke(L); @@ -26720,69 +29417,43 @@ static int _fairygui_FUIContainer_setStencil(lua_State *L) return 0; } -static int _fairygui_FUIContainer_get_gOwner(lua_State *L) -{ - olua_startinvoke(L); - - fairygui::FUIContainer *self = nullptr; - - olua_to_object(L, 1, &self, "fgui.FUIContainer"); - - // fairygui::GObject *gOwner - fairygui::GObject *ret = self->gOwner; - int num_ret = olua_push_object(L, ret, "fgui.GObject"); - - olua_endinvoke(L); - - return num_ret; -} - -static int _fairygui_FUIContainer_set_gOwner(lua_State *L) +static int _olua_cls_fgui_FUIContainer(lua_State *L) { - olua_startinvoke(L); - - fairygui::FUIContainer *self = nullptr; - fairygui::GObject *arg1 = nullptr; /** gOwner */ - - olua_to_object(L, 1, &self, "fgui.FUIContainer"); - olua_check_object(L, 2, &arg1, "fgui.GObject"); - - // fairygui::GObject *gOwner - self->gOwner = arg1; - - olua_endinvoke(L); + oluacls_class(L, "fgui.FUIContainer"); + oluacls_func(L, "create", _olua_fun_fairygui_FUIContainer_create); + oluacls_func(L, "getAlphaThreshold", _olua_fun_fairygui_FUIContainer_getAlphaThreshold); + oluacls_func(L, "getClippingRegion", _olua_fun_fairygui_FUIContainer_getClippingRegion); + oluacls_func(L, "getStencil", _olua_fun_fairygui_FUIContainer_getStencil); + oluacls_func(L, "isClippingEnabled", _olua_fun_fairygui_FUIContainer_isClippingEnabled); + oluacls_func(L, "isInverted", _olua_fun_fairygui_FUIContainer_isInverted); + oluacls_func(L, "new", _olua_fun_fairygui_FUIContainer_new); + oluacls_func(L, "setAlphaThreshold", _olua_fun_fairygui_FUIContainer_setAlphaThreshold); + oluacls_func(L, "setClippingEnabled", _olua_fun_fairygui_FUIContainer_setClippingEnabled); + oluacls_func(L, "setClippingRegion", _olua_fun_fairygui_FUIContainer_setClippingRegion); + oluacls_func(L, "setInverted", _olua_fun_fairygui_FUIContainer_setInverted); + oluacls_func(L, "setStencil", _olua_fun_fairygui_FUIContainer_setStencil); + oluacls_prop(L, "alphaThreshold", _olua_fun_fairygui_FUIContainer_getAlphaThreshold, _olua_fun_fairygui_FUIContainer_setAlphaThreshold); + oluacls_prop(L, "clippingEnabled", _olua_fun_fairygui_FUIContainer_isClippingEnabled, _olua_fun_fairygui_FUIContainer_setClippingEnabled); + oluacls_prop(L, "clippingRegion", _olua_fun_fairygui_FUIContainer_getClippingRegion, _olua_fun_fairygui_FUIContainer_setClippingRegion); + oluacls_prop(L, "inverted", _olua_fun_fairygui_FUIContainer_isInverted, _olua_fun_fairygui_FUIContainer_setInverted); + oluacls_prop(L, "stencil", _olua_fun_fairygui_FUIContainer_getStencil, _olua_fun_fairygui_FUIContainer_setStencil); + oluacls_prop(L, "gOwner", _olua_fun_fairygui_FUIContainer_gOwner, _olua_fun_fairygui_FUIContainer_gOwner); - return 0; + return 1; } OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_fairygui_FUIContainer(lua_State *L) +OLUA_LIB int luaopen_fgui_FUIContainer(lua_State *L) { - oluacls_class(L, "fgui.FUIContainer"); - oluacls_func(L, "create", _fairygui_FUIContainer_create); - oluacls_func(L, "getAlphaThreshold", _fairygui_FUIContainer_getAlphaThreshold); - oluacls_func(L, "getClippingRegion", _fairygui_FUIContainer_getClippingRegion); - oluacls_func(L, "getStencil", _fairygui_FUIContainer_getStencil); - oluacls_func(L, "isClippingEnabled", _fairygui_FUIContainer_isClippingEnabled); - oluacls_func(L, "isInverted", _fairygui_FUIContainer_isInverted); - oluacls_func(L, "new", _fairygui_FUIContainer_new); - oluacls_func(L, "setAlphaThreshold", _fairygui_FUIContainer_setAlphaThreshold); - oluacls_func(L, "setClippingEnabled", _fairygui_FUIContainer_setClippingEnabled); - oluacls_func(L, "setClippingRegion", _fairygui_FUIContainer_setClippingRegion); - oluacls_func(L, "setInverted", _fairygui_FUIContainer_setInverted); - oluacls_func(L, "setStencil", _fairygui_FUIContainer_setStencil); - oluacls_prop(L, "alphaThreshold", _fairygui_FUIContainer_getAlphaThreshold, _fairygui_FUIContainer_setAlphaThreshold); - oluacls_prop(L, "clippingEnabled", _fairygui_FUIContainer_isClippingEnabled, _fairygui_FUIContainer_setClippingEnabled); - oluacls_prop(L, "clippingRegion", _fairygui_FUIContainer_getClippingRegion, _fairygui_FUIContainer_setClippingRegion); - oluacls_prop(L, "inverted", _fairygui_FUIContainer_isInverted, _fairygui_FUIContainer_setInverted); - oluacls_prop(L, "stencil", _fairygui_FUIContainer_getStencil, _fairygui_FUIContainer_setStencil); - oluacls_prop(L, "gOwner", _fairygui_FUIContainer_get_gOwner, _fairygui_FUIContainer_set_gOwner); - + olua_require(L, "fairygui", luaopen_fairygui); + if (!olua_getclass(L, "fgui.FUIContainer")) { + luaL_error(L, "class not found: fairygui::FUIContainer"); + } return 1; } OLUA_END_DECLS -static int _fairygui_FUIInput_applyTextFormat(lua_State *L) +static int _olua_fun_fairygui_FUIInput_applyTextFormat(lua_State *L) { olua_startinvoke(L); @@ -26798,7 +29469,7 @@ static int _fairygui_FUIInput_applyTextFormat(lua_State *L) return 0; } -static int _fairygui_FUIInput_create(lua_State *L) +static int _olua_fun_fairygui_FUIInput_create(lua_State *L) { olua_startinvoke(L); @@ -26811,24 +29482,7 @@ static int _fairygui_FUIInput_create(lua_State *L) return num_ret; } -static int _fairygui_FUIInput_getText(lua_State *L) -{ - olua_startinvoke(L); - - fairygui::FUIInput *self = nullptr; - - olua_to_object(L, 1, &self, "fgui.FUIInput"); - - // std::string getText() - std::string ret = self->getText(); - int num_ret = olua_push_string(L, ret); - - olua_endinvoke(L); - - return num_ret; -} - -static int _fairygui_FUIInput_getTextFormat(lua_State *L) +static int _olua_fun_fairygui_FUIInput_getTextFormat(lua_State *L) { olua_startinvoke(L); @@ -26845,7 +29499,7 @@ static int _fairygui_FUIInput_getTextFormat(lua_State *L) return num_ret; } -static int _fairygui_FUIInput_isPassword(lua_State *L) +static int _olua_fun_fairygui_FUIInput_isPassword(lua_State *L) { olua_startinvoke(L); @@ -26862,7 +29516,7 @@ static int _fairygui_FUIInput_isPassword(lua_State *L) return num_ret; } -static int _fairygui_FUIInput_isSingleLine(lua_State *L) +static int _olua_fun_fairygui_FUIInput_isSingleLine(lua_State *L) { olua_startinvoke(L); @@ -26879,7 +29533,7 @@ static int _fairygui_FUIInput_isSingleLine(lua_State *L) return num_ret; } -static int _fairygui_FUIInput_keyboardType(lua_State *L) +static int _olua_fun_fairygui_FUIInput_keyboardType(lua_State *L) { olua_startinvoke(L); @@ -26896,11 +29550,11 @@ static int _fairygui_FUIInput_keyboardType(lua_State *L) return num_ret; } -static int _fairygui_FUIInput_new(lua_State *L) +static int _olua_fun_fairygui_FUIInput_new(lua_State *L) { olua_startinvoke(L); - // FUIInput() + // fairygui::FUIInput() fairygui::FUIInput *ret = new fairygui::FUIInput(); int num_ret = olua_push_object(L, ret, "fgui.FUIInput"); olua_postnew(L, ret); @@ -26910,7 +29564,7 @@ static int _fairygui_FUIInput_new(lua_State *L) return num_ret; } -static int _fairygui_FUIInput_setKeyboardType(lua_State *L) +static int _olua_fun_fairygui_FUIInput_setKeyboardType(lua_State *L) { olua_startinvoke(L); @@ -26928,7 +29582,7 @@ static int _fairygui_FUIInput_setKeyboardType(lua_State *L) return 0; } -static int _fairygui_FUIInput_setPassword(lua_State *L) +static int _olua_fun_fairygui_FUIInput_setPassword(lua_State *L) { olua_startinvoke(L); @@ -26946,7 +29600,7 @@ static int _fairygui_FUIInput_setPassword(lua_State *L) return 0; } -static int _fairygui_FUIInput_setSingleLine(lua_State *L) +static int _olua_fun_fairygui_FUIInput_setSingleLine(lua_State *L) { olua_startinvoke(L); @@ -26964,7 +29618,7 @@ static int _fairygui_FUIInput_setSingleLine(lua_State *L) return 0; } -static int _fairygui_FUIInput_setText(lua_State *L) +static int _olua_fun_fairygui_FUIInput_setText(lua_State *L) { olua_startinvoke(L); @@ -26982,32 +29636,39 @@ static int _fairygui_FUIInput_setText(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_fairygui_FUIInput(lua_State *L) +static int _olua_cls_fgui_FUIInput(lua_State *L) { oluacls_class(L, "fgui.FUIInput"); - oluacls_func(L, "applyTextFormat", _fairygui_FUIInput_applyTextFormat); - oluacls_func(L, "create", _fairygui_FUIInput_create); - oluacls_func(L, "getText", _fairygui_FUIInput_getText); - oluacls_func(L, "getTextFormat", _fairygui_FUIInput_getTextFormat); - oluacls_func(L, "isPassword", _fairygui_FUIInput_isPassword); - oluacls_func(L, "isSingleLine", _fairygui_FUIInput_isSingleLine); - oluacls_func(L, "keyboardType", _fairygui_FUIInput_keyboardType); - oluacls_func(L, "new", _fairygui_FUIInput_new); - oluacls_func(L, "setKeyboardType", _fairygui_FUIInput_setKeyboardType); - oluacls_func(L, "setPassword", _fairygui_FUIInput_setPassword); - oluacls_func(L, "setSingleLine", _fairygui_FUIInput_setSingleLine); - oluacls_func(L, "setText", _fairygui_FUIInput_setText); - oluacls_prop(L, "password", _fairygui_FUIInput_isPassword, _fairygui_FUIInput_setPassword); - oluacls_prop(L, "singleLine", _fairygui_FUIInput_isSingleLine, _fairygui_FUIInput_setSingleLine); - oluacls_prop(L, "text", _fairygui_FUIInput_getText, _fairygui_FUIInput_setText); - oluacls_prop(L, "textFormat", _fairygui_FUIInput_getTextFormat, nullptr); + oluacls_func(L, "applyTextFormat", _olua_fun_fairygui_FUIInput_applyTextFormat); + oluacls_func(L, "create", _olua_fun_fairygui_FUIInput_create); + oluacls_func(L, "getTextFormat", _olua_fun_fairygui_FUIInput_getTextFormat); + oluacls_func(L, "isPassword", _olua_fun_fairygui_FUIInput_isPassword); + oluacls_func(L, "isSingleLine", _olua_fun_fairygui_FUIInput_isSingleLine); + oluacls_func(L, "keyboardType", _olua_fun_fairygui_FUIInput_keyboardType); + oluacls_func(L, "new", _olua_fun_fairygui_FUIInput_new); + oluacls_func(L, "setKeyboardType", _olua_fun_fairygui_FUIInput_setKeyboardType); + oluacls_func(L, "setPassword", _olua_fun_fairygui_FUIInput_setPassword); + oluacls_func(L, "setSingleLine", _olua_fun_fairygui_FUIInput_setSingleLine); + oluacls_func(L, "setText", _olua_fun_fairygui_FUIInput_setText); + oluacls_prop(L, "password", _olua_fun_fairygui_FUIInput_isPassword, _olua_fun_fairygui_FUIInput_setPassword); + oluacls_prop(L, "singleLine", _olua_fun_fairygui_FUIInput_isSingleLine, _olua_fun_fairygui_FUIInput_setSingleLine); + oluacls_prop(L, "textFormat", _olua_fun_fairygui_FUIInput_getTextFormat, nullptr); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_fgui_FUIInput(lua_State *L) +{ + olua_require(L, "fairygui", luaopen_fairygui); + if (!olua_getclass(L, "fgui.FUIInput")) { + luaL_error(L, "class not found: fairygui::FUIInput"); + } return 1; } OLUA_END_DECLS -static int _fairygui_FUILabel_applyTextFormat(lua_State *L) +static int _olua_fun_fairygui_FUILabel_applyTextFormat(lua_State *L) { olua_startinvoke(L); @@ -27023,7 +29684,7 @@ static int _fairygui_FUILabel_applyTextFormat(lua_State *L) return 0; } -static int _fairygui_FUILabel_create(lua_State *L) +static int _olua_fun_fairygui_FUILabel_create(lua_State *L) { olua_startinvoke(L); @@ -27036,7 +29697,7 @@ static int _fairygui_FUILabel_create(lua_State *L) return num_ret; } -static int _fairygui_FUILabel_getText(lua_State *L) +static int _olua_fun_fairygui_FUILabel_getText(lua_State *L) { olua_startinvoke(L); @@ -27053,7 +29714,7 @@ static int _fairygui_FUILabel_getText(lua_State *L) return num_ret; } -static int _fairygui_FUILabel_getTextFormat(lua_State *L) +static int _olua_fun_fairygui_FUILabel_getTextFormat(lua_State *L) { olua_startinvoke(L); @@ -27070,11 +29731,11 @@ static int _fairygui_FUILabel_getTextFormat(lua_State *L) return num_ret; } -static int _fairygui_FUILabel_new(lua_State *L) +static int _olua_fun_fairygui_FUILabel_new(lua_State *L) { olua_startinvoke(L); - // FUILabel() + // fairygui::FUILabel() fairygui::FUILabel *ret = new fairygui::FUILabel(); int num_ret = olua_push_object(L, ret, "fgui.FUILabel"); olua_postnew(L, ret); @@ -27084,13 +29745,13 @@ static int _fairygui_FUILabel_new(lua_State *L) return num_ret; } -static int _fairygui_FUILabel_setBMFontFilePath$1(lua_State *L) +static int _olua_fun_fairygui_FUILabel_setBMFontFilePath$1(lua_State *L) { olua_startinvoke(L); fairygui::FUILabel *self = nullptr; std::string arg1; /** bmfontFilePath */ - cocos2d::Vec2 arg2; /** imageOffset */ + cocos2d::Vec2 *arg2; /** imageOffset */ float arg3 = 0; /** fontSize */ olua_to_object(L, 1, &self, "fgui.FUILabel"); @@ -27099,7 +29760,7 @@ static int _fairygui_FUILabel_setBMFontFilePath$1(lua_State *L) olua_check_number(L, 4, &arg3); // bool setBMFontFilePath(const std::string &bmfontFilePath, const cocos2d::Vec2 &imageOffset, @optional float fontSize) - bool ret = self->setBMFontFilePath(arg1, arg2, arg3); + bool ret = self->setBMFontFilePath(arg1, *arg2, arg3); int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); @@ -27107,20 +29768,20 @@ static int _fairygui_FUILabel_setBMFontFilePath$1(lua_State *L) return num_ret; } -static int _fairygui_FUILabel_setBMFontFilePath$2(lua_State *L) +static int _olua_fun_fairygui_FUILabel_setBMFontFilePath$2(lua_State *L) { olua_startinvoke(L); fairygui::FUILabel *self = nullptr; std::string arg1; /** bmfontFilePath */ - float arg2 = 0; /** fontSize */ + cocos2d::Vec2 *arg2; /** imageOffset */ olua_to_object(L, 1, &self, "fgui.FUILabel"); olua_check_string(L, 2, &arg1); - olua_check_number(L, 3, &arg2); + olua_check_object(L, 3, &arg2, "cc.Vec2"); - // @using bool setBMFontFilePath(const std::string &bmfontFilePath, @optional float fontSize) - bool ret = self->setBMFontFilePath(arg1, arg2); + // bool setBMFontFilePath(const std::string &bmfontFilePath, const cocos2d::Vec2 &imageOffset) + bool ret = self->setBMFontFilePath(arg1, *arg2); int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); @@ -27128,24 +29789,20 @@ static int _fairygui_FUILabel_setBMFontFilePath$2(lua_State *L) return num_ret; } -static int _fairygui_FUILabel_setBMFontFilePath$3(lua_State *L) +static int _olua_fun_fairygui_FUILabel_setBMFontFilePath$3(lua_State *L) { olua_startinvoke(L); fairygui::FUILabel *self = nullptr; std::string arg1; /** bmfontFilePath */ - cocos2d::Rect arg2; /** imageRect */ - bool arg3 = false; /** imageRotated */ - float arg4 = 0; /** fontSize */ + float arg2 = 0; /** fontSize */ olua_to_object(L, 1, &self, "fgui.FUILabel"); olua_check_string(L, 2, &arg1); - olua_check_object(L, 3, &arg2, "cc.Rect"); - olua_check_bool(L, 4, &arg3); - olua_check_number(L, 5, &arg4); + olua_check_number(L, 3, &arg2); - // @using bool setBMFontFilePath(const std::string &bmfontFilePath, const cocos2d::Rect &imageRect, bool imageRotated, @optional float fontSize) - bool ret = self->setBMFontFilePath(arg1, arg2, arg3, arg4); + // @using bool setBMFontFilePath(const std::string &bmfontFilePath, @optional float fontSize) + bool ret = self->setBMFontFilePath(arg1, arg2); int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); @@ -27153,22 +29810,18 @@ static int _fairygui_FUILabel_setBMFontFilePath$3(lua_State *L) return num_ret; } -static int _fairygui_FUILabel_setBMFontFilePath$4(lua_State *L) +static int _olua_fun_fairygui_FUILabel_setBMFontFilePath$4(lua_State *L) { olua_startinvoke(L); fairygui::FUILabel *self = nullptr; std::string arg1; /** bmfontFilePath */ - std::string arg2; /** subTextureKey */ - float arg3 = 0; /** fontSize */ olua_to_object(L, 1, &self, "fgui.FUILabel"); olua_check_string(L, 2, &arg1); - olua_check_string(L, 3, &arg2); - olua_check_number(L, 4, &arg3); - // @using bool setBMFontFilePath(const std::string &bmfontFilePath, const std::string &subTextureKey, @optional float fontSize) - bool ret = self->setBMFontFilePath(arg1, arg2, arg3); + // @using bool setBMFontFilePath(const std::string &bmfontFilePath) + bool ret = self->setBMFontFilePath(arg1); int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); @@ -27176,20 +29829,24 @@ static int _fairygui_FUILabel_setBMFontFilePath$4(lua_State *L) return num_ret; } -static int _fairygui_FUILabel_setBMFontFilePath$5(lua_State *L) +static int _olua_fun_fairygui_FUILabel_setBMFontFilePath$5(lua_State *L) { olua_startinvoke(L); fairygui::FUILabel *self = nullptr; std::string arg1; /** bmfontFilePath */ - cocos2d::Vec2 arg2; /** imageOffset */ + cocos2d::Rect *arg2; /** imageRect */ + bool arg3 = false; /** imageRotated */ + float arg4 = 0; /** fontSize */ olua_to_object(L, 1, &self, "fgui.FUILabel"); olua_check_string(L, 2, &arg1); - olua_check_object(L, 3, &arg2, "cc.Vec2"); + olua_check_object(L, 3, &arg2, "cc.Rect"); + olua_check_bool(L, 4, &arg3); + olua_check_number(L, 5, &arg4); - // bool setBMFontFilePath(const std::string &bmfontFilePath, const cocos2d::Vec2 &imageOffset, @optional float fontSize) - bool ret = self->setBMFontFilePath(arg1, arg2); + // @using bool setBMFontFilePath(const std::string &bmfontFilePath, const cocos2d::Rect &imageRect, bool imageRotated, @optional float fontSize) + bool ret = self->setBMFontFilePath(arg1, *arg2, arg3, arg4); int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); @@ -27197,18 +29854,22 @@ static int _fairygui_FUILabel_setBMFontFilePath$5(lua_State *L) return num_ret; } -static int _fairygui_FUILabel_setBMFontFilePath$6(lua_State *L) +static int _olua_fun_fairygui_FUILabel_setBMFontFilePath$6(lua_State *L) { olua_startinvoke(L); fairygui::FUILabel *self = nullptr; std::string arg1; /** bmfontFilePath */ + cocos2d::Rect *arg2; /** imageRect */ + bool arg3 = false; /** imageRotated */ olua_to_object(L, 1, &self, "fgui.FUILabel"); olua_check_string(L, 2, &arg1); + olua_check_object(L, 3, &arg2, "cc.Rect"); + olua_check_bool(L, 4, &arg3); - // @using bool setBMFontFilePath(const std::string &bmfontFilePath, @optional float fontSize) - bool ret = self->setBMFontFilePath(arg1); + // @using bool setBMFontFilePath(const std::string &bmfontFilePath, const cocos2d::Rect &imageRect, bool imageRotated) + bool ret = self->setBMFontFilePath(arg1, *arg2, arg3); int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); @@ -27216,21 +29877,21 @@ static int _fairygui_FUILabel_setBMFontFilePath$6(lua_State *L) return num_ret; } -static int _fairygui_FUILabel_setBMFontFilePath$7(lua_State *L) +static int _olua_fun_fairygui_FUILabel_setBMFontFilePath$7(lua_State *L) { olua_startinvoke(L); fairygui::FUILabel *self = nullptr; std::string arg1; /** bmfontFilePath */ - cocos2d::Rect arg2; /** imageRect */ - bool arg3 = false; /** imageRotated */ + std::string arg2; /** subTextureKey */ + float arg3 = 0; /** fontSize */ olua_to_object(L, 1, &self, "fgui.FUILabel"); olua_check_string(L, 2, &arg1); - olua_check_object(L, 3, &arg2, "cc.Rect"); - olua_check_bool(L, 4, &arg3); + olua_check_string(L, 3, &arg2); + olua_check_number(L, 4, &arg3); - // @using bool setBMFontFilePath(const std::string &bmfontFilePath, const cocos2d::Rect &imageRect, bool imageRotated, @optional float fontSize) + // @using bool setBMFontFilePath(const std::string &bmfontFilePath, const std::string &subTextureKey, @optional float fontSize) bool ret = self->setBMFontFilePath(arg1, arg2, arg3); int num_ret = olua_push_bool(L, ret); @@ -27239,7 +29900,7 @@ static int _fairygui_FUILabel_setBMFontFilePath$7(lua_State *L) return num_ret; } -static int _fairygui_FUILabel_setBMFontFilePath$8(lua_State *L) +static int _olua_fun_fairygui_FUILabel_setBMFontFilePath$8(lua_State *L) { olua_startinvoke(L); @@ -27251,7 +29912,7 @@ static int _fairygui_FUILabel_setBMFontFilePath$8(lua_State *L) olua_check_string(L, 2, &arg1); olua_check_string(L, 3, &arg2); - // @using bool setBMFontFilePath(const std::string &bmfontFilePath, const std::string &subTextureKey, @optional float fontSize) + // @using bool setBMFontFilePath(const std::string &bmfontFilePath, const std::string &subTextureKey) bool ret = self->setBMFontFilePath(arg1, arg2); int num_ret = olua_push_bool(L, ret); @@ -27260,55 +29921,55 @@ static int _fairygui_FUILabel_setBMFontFilePath$8(lua_State *L) return num_ret; } -static int _fairygui_FUILabel_setBMFontFilePath(lua_State *L) +static int _olua_fun_fairygui_FUILabel_setBMFontFilePath(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_string(L, 2))) { - // @using bool setBMFontFilePath(const std::string &bmfontFilePath, @optional float fontSize) - return _fairygui_FUILabel_setBMFontFilePath$6(L); + // @using bool setBMFontFilePath(const std::string &bmfontFilePath) + return _olua_fun_fairygui_FUILabel_setBMFontFilePath$4(L); // } } if (num_args == 2) { if ((olua_is_string(L, 2)) && (olua_is_object(L, 3, "cc.Vec2"))) { - // bool setBMFontFilePath(const std::string &bmfontFilePath, const cocos2d::Vec2 &imageOffset, @optional float fontSize) - return _fairygui_FUILabel_setBMFontFilePath$5(L); + // bool setBMFontFilePath(const std::string &bmfontFilePath, const cocos2d::Vec2 &imageOffset) + return _olua_fun_fairygui_FUILabel_setBMFontFilePath$2(L); } if ((olua_is_string(L, 2)) && (olua_is_number(L, 3))) { // @using bool setBMFontFilePath(const std::string &bmfontFilePath, @optional float fontSize) - return _fairygui_FUILabel_setBMFontFilePath$2(L); + return _olua_fun_fairygui_FUILabel_setBMFontFilePath$3(L); } // if ((olua_is_string(L, 2)) && (olua_is_string(L, 3))) { - // @using bool setBMFontFilePath(const std::string &bmfontFilePath, const std::string &subTextureKey, @optional float fontSize) - return _fairygui_FUILabel_setBMFontFilePath$8(L); + // @using bool setBMFontFilePath(const std::string &bmfontFilePath, const std::string &subTextureKey) + return _olua_fun_fairygui_FUILabel_setBMFontFilePath$8(L); // } } if (num_args == 3) { if ((olua_is_string(L, 2)) && (olua_is_object(L, 3, "cc.Rect")) && (olua_is_bool(L, 4))) { - // @using bool setBMFontFilePath(const std::string &bmfontFilePath, const cocos2d::Rect &imageRect, bool imageRotated, @optional float fontSize) - return _fairygui_FUILabel_setBMFontFilePath$7(L); + // @using bool setBMFontFilePath(const std::string &bmfontFilePath, const cocos2d::Rect &imageRect, bool imageRotated) + return _olua_fun_fairygui_FUILabel_setBMFontFilePath$6(L); } if ((olua_is_string(L, 2)) && (olua_is_object(L, 3, "cc.Vec2")) && (olua_is_number(L, 4))) { // bool setBMFontFilePath(const std::string &bmfontFilePath, const cocos2d::Vec2 &imageOffset, @optional float fontSize) - return _fairygui_FUILabel_setBMFontFilePath$1(L); + return _olua_fun_fairygui_FUILabel_setBMFontFilePath$1(L); } // if ((olua_is_string(L, 2)) && (olua_is_string(L, 3)) && (olua_is_number(L, 4))) { // @using bool setBMFontFilePath(const std::string &bmfontFilePath, const std::string &subTextureKey, @optional float fontSize) - return _fairygui_FUILabel_setBMFontFilePath$4(L); + return _olua_fun_fairygui_FUILabel_setBMFontFilePath$7(L); // } } if (num_args == 4) { // if ((olua_is_string(L, 2)) && (olua_is_object(L, 3, "cc.Rect")) && (olua_is_bool(L, 4)) && (olua_is_number(L, 5))) { // @using bool setBMFontFilePath(const std::string &bmfontFilePath, const cocos2d::Rect &imageRect, bool imageRotated, @optional float fontSize) - return _fairygui_FUILabel_setBMFontFilePath$3(L); + return _olua_fun_fairygui_FUILabel_setBMFontFilePath$5(L); // } } @@ -27317,7 +29978,7 @@ static int _fairygui_FUILabel_setBMFontFilePath(lua_State *L) return 0; } -static int _fairygui_FUILabel_setGrayed(lua_State *L) +static int _olua_fun_fairygui_FUILabel_setGrayed(lua_State *L) { olua_startinvoke(L); @@ -27335,7 +29996,7 @@ static int _fairygui_FUILabel_setGrayed(lua_State *L) return 0; } -static int _fairygui_FUILabel_setText(lua_State *L) +static int _olua_fun_fairygui_FUILabel_setText(lua_State *L) { olua_startinvoke(L); @@ -27353,7 +30014,7 @@ static int _fairygui_FUILabel_setText(lua_State *L) return 0; } -static int _fairygui_FUILabel_setUnderlineColor(lua_State *L) +static int _olua_fun_fairygui_FUILabel_setUnderlineColor(lua_State *L) { olua_startinvoke(L); @@ -27371,27 +30032,36 @@ static int _fairygui_FUILabel_setUnderlineColor(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_fairygui_FUILabel(lua_State *L) +static int _olua_cls_fgui_FUILabel(lua_State *L) { oluacls_class(L, "fgui.FUILabel"); - oluacls_func(L, "applyTextFormat", _fairygui_FUILabel_applyTextFormat); - oluacls_func(L, "create", _fairygui_FUILabel_create); - oluacls_func(L, "getText", _fairygui_FUILabel_getText); - oluacls_func(L, "getTextFormat", _fairygui_FUILabel_getTextFormat); - oluacls_func(L, "new", _fairygui_FUILabel_new); - oluacls_func(L, "setBMFontFilePath", _fairygui_FUILabel_setBMFontFilePath); - oluacls_func(L, "setGrayed", _fairygui_FUILabel_setGrayed); - oluacls_func(L, "setText", _fairygui_FUILabel_setText); - oluacls_func(L, "setUnderlineColor", _fairygui_FUILabel_setUnderlineColor); - oluacls_prop(L, "text", _fairygui_FUILabel_getText, _fairygui_FUILabel_setText); - oluacls_prop(L, "textFormat", _fairygui_FUILabel_getTextFormat, nullptr); + oluacls_func(L, "applyTextFormat", _olua_fun_fairygui_FUILabel_applyTextFormat); + oluacls_func(L, "create", _olua_fun_fairygui_FUILabel_create); + oluacls_func(L, "getText", _olua_fun_fairygui_FUILabel_getText); + oluacls_func(L, "getTextFormat", _olua_fun_fairygui_FUILabel_getTextFormat); + oluacls_func(L, "new", _olua_fun_fairygui_FUILabel_new); + oluacls_func(L, "setBMFontFilePath", _olua_fun_fairygui_FUILabel_setBMFontFilePath); + oluacls_func(L, "setGrayed", _olua_fun_fairygui_FUILabel_setGrayed); + oluacls_func(L, "setText", _olua_fun_fairygui_FUILabel_setText); + oluacls_func(L, "setUnderlineColor", _olua_fun_fairygui_FUILabel_setUnderlineColor); + oluacls_prop(L, "text", _olua_fun_fairygui_FUILabel_getText, _olua_fun_fairygui_FUILabel_setText); + oluacls_prop(L, "textFormat", _olua_fun_fairygui_FUILabel_getTextFormat, nullptr); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_fgui_FUILabel(lua_State *L) +{ + olua_require(L, "fairygui", luaopen_fairygui); + if (!olua_getclass(L, "fgui.FUILabel")) { + luaL_error(L, "class not found: fairygui::FUILabel"); + } return 1; } OLUA_END_DECLS -static int _fairygui_FUIRichText_applyTextFormat(lua_State *L) +static int _olua_fun_fairygui_FUIRichText_applyTextFormat(lua_State *L) { olua_startinvoke(L); @@ -27407,7 +30077,7 @@ static int _fairygui_FUIRichText_applyTextFormat(lua_State *L) return 0; } -static int _fairygui_FUIRichText_create(lua_State *L) +static int _olua_fun_fairygui_FUIRichText_create(lua_State *L) { olua_startinvoke(L); @@ -27420,7 +30090,7 @@ static int _fairygui_FUIRichText_create(lua_State *L) return num_ret; } -static int _fairygui_FUIRichText_getAnchorFontColor(lua_State *L) +static int _olua_fun_fairygui_FUIRichText_getAnchorFontColor(lua_State *L) { olua_startinvoke(L); @@ -27437,7 +30107,7 @@ static int _fairygui_FUIRichText_getAnchorFontColor(lua_State *L) return num_ret; } -static int _fairygui_FUIRichText_getControl(lua_State *L) +static int _olua_fun_fairygui_FUIRichText_getControl(lua_State *L) { olua_startinvoke(L); @@ -27456,7 +30126,7 @@ static int _fairygui_FUIRichText_getControl(lua_State *L) return num_ret; } -static int _fairygui_FUIRichText_getControls(lua_State *L) +static int _olua_fun_fairygui_FUIRichText_getControls(lua_State *L) { olua_startinvoke(L); @@ -27475,7 +30145,7 @@ static int _fairygui_FUIRichText_getControls(lua_State *L) return num_ret; } -static int _fairygui_FUIRichText_getDimensions(lua_State *L) +static int _olua_fun_fairygui_FUIRichText_getDimensions(lua_State *L) { olua_startinvoke(L); @@ -27492,7 +30162,7 @@ static int _fairygui_FUIRichText_getDimensions(lua_State *L) return num_ret; } -static int _fairygui_FUIRichText_getOverflow(lua_State *L) +static int _olua_fun_fairygui_FUIRichText_getOverflow(lua_State *L) { olua_startinvoke(L); @@ -27509,7 +30179,7 @@ static int _fairygui_FUIRichText_getOverflow(lua_State *L) return num_ret; } -static int _fairygui_FUIRichText_getTextFormat(lua_State *L) +static int _olua_fun_fairygui_FUIRichText_getTextFormat(lua_State *L) { olua_startinvoke(L); @@ -27526,18 +30196,18 @@ static int _fairygui_FUIRichText_getTextFormat(lua_State *L) return num_ret; } -static int _fairygui_FUIRichText_hitTestLink(lua_State *L) +static int _olua_fun_fairygui_FUIRichText_hitTestLink(lua_State *L) { olua_startinvoke(L); fairygui::FUIRichText *self = nullptr; - cocos2d::Vec2 arg1; /** worldPoint */ + cocos2d::Vec2 *arg1; /** worldPoint */ olua_to_object(L, 1, &self, "fgui.FUIRichText"); olua_check_object(L, 2, &arg1, "cc.Vec2"); // const char *hitTestLink(const cocos2d::Vec2 &worldPoint) - const char *ret = self->hitTestLink(arg1); + const char *ret = self->hitTestLink(*arg1); int num_ret = olua_push_string(L, ret); olua_endinvoke(L); @@ -27545,7 +30215,7 @@ static int _fairygui_FUIRichText_hitTestLink(lua_State *L) return num_ret; } -static int _fairygui_FUIRichText_isAnchorTextUnderline(lua_State *L) +static int _olua_fun_fairygui_FUIRichText_isAnchorTextUnderline(lua_State *L) { olua_startinvoke(L); @@ -27562,11 +30232,11 @@ static int _fairygui_FUIRichText_isAnchorTextUnderline(lua_State *L) return num_ret; } -static int _fairygui_FUIRichText_new(lua_State *L) +static int _olua_fun_fairygui_FUIRichText_new(lua_State *L) { olua_startinvoke(L); - // FUIRichText() + // fairygui::FUIRichText() fairygui::FUIRichText *ret = new fairygui::FUIRichText(); int num_ret = olua_push_object(L, ret, "fgui.FUIRichText"); olua_postnew(L, ret); @@ -27576,7 +30246,7 @@ static int _fairygui_FUIRichText_new(lua_State *L) return num_ret; } -static int _fairygui_FUIRichText_parseOptions(lua_State *L) +static int _olua_fun_fairygui_FUIRichText_parseOptions(lua_State *L) { olua_startinvoke(L); @@ -27593,7 +30263,7 @@ static int _fairygui_FUIRichText_parseOptions(lua_State *L) return num_ret; } -static int _fairygui_FUIRichText_setAnchorFontColor(lua_State *L) +static int _olua_fun_fairygui_FUIRichText_setAnchorFontColor(lua_State *L) { olua_startinvoke(L); @@ -27611,7 +30281,7 @@ static int _fairygui_FUIRichText_setAnchorFontColor(lua_State *L) return 0; } -static int _fairygui_FUIRichText_setAnchorTextUnderline(lua_State *L) +static int _olua_fun_fairygui_FUIRichText_setAnchorTextUnderline(lua_State *L) { olua_startinvoke(L); @@ -27629,7 +30299,7 @@ static int _fairygui_FUIRichText_setAnchorTextUnderline(lua_State *L) return 0; } -static int _fairygui_FUIRichText_setDimensions(lua_State *L) +static int _olua_fun_fairygui_FUIRichText_setDimensions(lua_State *L) { olua_startinvoke(L); @@ -27649,7 +30319,7 @@ static int _fairygui_FUIRichText_setDimensions(lua_State *L) return 0; } -static int _fairygui_FUIRichText_setObjectFactory(lua_State *L) +static int _olua_fun_fairygui_FUIRichText_setObjectFactory(lua_State *L) { olua_startinvoke(L); @@ -27661,9 +30331,10 @@ static int _fairygui_FUIRichText_setObjectFactory(lua_State *L) void *cb_store = (void *)self; std::string cb_tag = "ObjectFactory"; - std::string cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + std::string cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](fairygui::HtmlElement *arg1) { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](fairygui::HtmlElement *cb_arg1) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); fairygui::HtmlObject *ret = nullptr; /** ret */ @@ -27671,7 +30342,7 @@ static int _fairygui_FUIRichText_setObjectFactory(lua_State *L) int top = lua_gettop(L); size_t last = olua_push_objpool(L); olua_enable_objpool(L); - olua_push_object(L, arg1, "fgui.HtmlElement"); + olua_push_object(L, cb_arg1, "fgui.HtmlElement"); olua_disable_objpool(L); olua_callback(L, cb_store, cb_name.c_str(), 1); @@ -27687,7 +30358,7 @@ static int _fairygui_FUIRichText_setObjectFactory(lua_State *L) return ret; }; - // void setObjectFactory(@localvar const std::function &value) + // void setObjectFactory(const std::function &value) self->setObjectFactory(arg1); olua_endinvoke(L); @@ -27695,7 +30366,7 @@ static int _fairygui_FUIRichText_setObjectFactory(lua_State *L) return 0; } -static int _fairygui_FUIRichText_setOverflow(lua_State *L) +static int _olua_fun_fairygui_FUIRichText_setOverflow(lua_State *L) { olua_startinvoke(L); @@ -27713,7 +30384,7 @@ static int _fairygui_FUIRichText_setOverflow(lua_State *L) return 0; } -static int _fairygui_FUIRichText_setText(lua_State *L) +static int _olua_fun_fairygui_FUIRichText_setText(lua_State *L) { olua_startinvoke(L); @@ -27731,39 +30402,48 @@ static int _fairygui_FUIRichText_setText(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_fairygui_FUIRichText(lua_State *L) +static int _olua_cls_fgui_FUIRichText(lua_State *L) { oluacls_class(L, "fgui.FUIRichText"); - oluacls_func(L, "applyTextFormat", _fairygui_FUIRichText_applyTextFormat); - oluacls_func(L, "create", _fairygui_FUIRichText_create); - oluacls_func(L, "getAnchorFontColor", _fairygui_FUIRichText_getAnchorFontColor); - oluacls_func(L, "getControl", _fairygui_FUIRichText_getControl); - oluacls_func(L, "getControls", _fairygui_FUIRichText_getControls); - oluacls_func(L, "getDimensions", _fairygui_FUIRichText_getDimensions); - oluacls_func(L, "getOverflow", _fairygui_FUIRichText_getOverflow); - oluacls_func(L, "getTextFormat", _fairygui_FUIRichText_getTextFormat); - oluacls_func(L, "hitTestLink", _fairygui_FUIRichText_hitTestLink); - oluacls_func(L, "isAnchorTextUnderline", _fairygui_FUIRichText_isAnchorTextUnderline); - oluacls_func(L, "new", _fairygui_FUIRichText_new); - oluacls_func(L, "parseOptions", _fairygui_FUIRichText_parseOptions); - oluacls_func(L, "setAnchorFontColor", _fairygui_FUIRichText_setAnchorFontColor); - oluacls_func(L, "setAnchorTextUnderline", _fairygui_FUIRichText_setAnchorTextUnderline); - oluacls_func(L, "setDimensions", _fairygui_FUIRichText_setDimensions); - oluacls_func(L, "setObjectFactory", _fairygui_FUIRichText_setObjectFactory); - oluacls_func(L, "setOverflow", _fairygui_FUIRichText_setOverflow); - oluacls_func(L, "setText", _fairygui_FUIRichText_setText); - oluacls_prop(L, "anchorFontColor", _fairygui_FUIRichText_getAnchorFontColor, _fairygui_FUIRichText_setAnchorFontColor); - oluacls_prop(L, "anchorTextUnderline", _fairygui_FUIRichText_isAnchorTextUnderline, _fairygui_FUIRichText_setAnchorTextUnderline); - oluacls_prop(L, "controls", _fairygui_FUIRichText_getControls, nullptr); - oluacls_prop(L, "overflow", _fairygui_FUIRichText_getOverflow, _fairygui_FUIRichText_setOverflow); - oluacls_prop(L, "textFormat", _fairygui_FUIRichText_getTextFormat, nullptr); + oluacls_func(L, "applyTextFormat", _olua_fun_fairygui_FUIRichText_applyTextFormat); + oluacls_func(L, "create", _olua_fun_fairygui_FUIRichText_create); + oluacls_func(L, "getAnchorFontColor", _olua_fun_fairygui_FUIRichText_getAnchorFontColor); + oluacls_func(L, "getControl", _olua_fun_fairygui_FUIRichText_getControl); + oluacls_func(L, "getControls", _olua_fun_fairygui_FUIRichText_getControls); + oluacls_func(L, "getDimensions", _olua_fun_fairygui_FUIRichText_getDimensions); + oluacls_func(L, "getOverflow", _olua_fun_fairygui_FUIRichText_getOverflow); + oluacls_func(L, "getTextFormat", _olua_fun_fairygui_FUIRichText_getTextFormat); + oluacls_func(L, "hitTestLink", _olua_fun_fairygui_FUIRichText_hitTestLink); + oluacls_func(L, "isAnchorTextUnderline", _olua_fun_fairygui_FUIRichText_isAnchorTextUnderline); + oluacls_func(L, "new", _olua_fun_fairygui_FUIRichText_new); + oluacls_func(L, "parseOptions", _olua_fun_fairygui_FUIRichText_parseOptions); + oluacls_func(L, "setAnchorFontColor", _olua_fun_fairygui_FUIRichText_setAnchorFontColor); + oluacls_func(L, "setAnchorTextUnderline", _olua_fun_fairygui_FUIRichText_setAnchorTextUnderline); + oluacls_func(L, "setDimensions", _olua_fun_fairygui_FUIRichText_setDimensions); + oluacls_func(L, "setObjectFactory", _olua_fun_fairygui_FUIRichText_setObjectFactory); + oluacls_func(L, "setOverflow", _olua_fun_fairygui_FUIRichText_setOverflow); + oluacls_func(L, "setText", _olua_fun_fairygui_FUIRichText_setText); + oluacls_prop(L, "anchorFontColor", _olua_fun_fairygui_FUIRichText_getAnchorFontColor, _olua_fun_fairygui_FUIRichText_setAnchorFontColor); + oluacls_prop(L, "anchorTextUnderline", _olua_fun_fairygui_FUIRichText_isAnchorTextUnderline, _olua_fun_fairygui_FUIRichText_setAnchorTextUnderline); + oluacls_prop(L, "controls", _olua_fun_fairygui_FUIRichText_getControls, nullptr); + oluacls_prop(L, "overflow", _olua_fun_fairygui_FUIRichText_getOverflow, _olua_fun_fairygui_FUIRichText_setOverflow); + oluacls_prop(L, "textFormat", _olua_fun_fairygui_FUIRichText_getTextFormat, nullptr); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_fgui_FUIRichText(lua_State *L) +{ + olua_require(L, "fairygui", luaopen_fairygui); + if (!olua_getclass(L, "fgui.FUIRichText")) { + luaL_error(L, "class not found: fairygui::FUIRichText"); + } + return 1; +} OLUA_END_DECLS -static int _fairygui_FUISprite_clearContent(lua_State *L) +static int _olua_fun_fairygui_FUISprite_clearContent(lua_State *L) { olua_startinvoke(L); @@ -27779,7 +30459,7 @@ static int _fairygui_FUISprite_clearContent(lua_State *L) return 0; } -static int _fairygui_FUISprite_create(lua_State *L) +static int _olua_fun_fairygui_FUISprite_create(lua_State *L) { olua_startinvoke(L); @@ -27792,7 +30472,7 @@ static int _fairygui_FUISprite_create(lua_State *L) return num_ret; } -static int _fairygui_FUISprite_getFillAmount(lua_State *L) +static int _olua_fun_fairygui_FUISprite_getFillAmount(lua_State *L) { olua_startinvoke(L); @@ -27809,7 +30489,7 @@ static int _fairygui_FUISprite_getFillAmount(lua_State *L) return num_ret; } -static int _fairygui_FUISprite_getFillMethod(lua_State *L) +static int _olua_fun_fairygui_FUISprite_getFillMethod(lua_State *L) { olua_startinvoke(L); @@ -27826,7 +30506,7 @@ static int _fairygui_FUISprite_getFillMethod(lua_State *L) return num_ret; } -static int _fairygui_FUISprite_getFillOrigin(lua_State *L) +static int _olua_fun_fairygui_FUISprite_getFillOrigin(lua_State *L) { olua_startinvoke(L); @@ -27843,7 +30523,7 @@ static int _fairygui_FUISprite_getFillOrigin(lua_State *L) return num_ret; } -static int _fairygui_FUISprite_isFillClockwise(lua_State *L) +static int _olua_fun_fairygui_FUISprite_isFillClockwise(lua_State *L) { olua_startinvoke(L); @@ -27860,7 +30540,7 @@ static int _fairygui_FUISprite_isFillClockwise(lua_State *L) return num_ret; } -static int _fairygui_FUISprite_isScaleByTile(lua_State *L) +static int _olua_fun_fairygui_FUISprite_isScaleByTile(lua_State *L) { olua_startinvoke(L); @@ -27877,11 +30557,11 @@ static int _fairygui_FUISprite_isScaleByTile(lua_State *L) return num_ret; } -static int _fairygui_FUISprite_new(lua_State *L) +static int _olua_fun_fairygui_FUISprite_new(lua_State *L) { olua_startinvoke(L); - // FUISprite() + // fairygui::FUISprite() fairygui::FUISprite *ret = new fairygui::FUISprite(); int num_ret = olua_push_object(L, ret, "fgui.FUISprite"); olua_postnew(L, ret); @@ -27891,7 +30571,7 @@ static int _fairygui_FUISprite_new(lua_State *L) return num_ret; } -static int _fairygui_FUISprite_setFillAmount(lua_State *L) +static int _olua_fun_fairygui_FUISprite_setFillAmount(lua_State *L) { olua_startinvoke(L); @@ -27909,7 +30589,7 @@ static int _fairygui_FUISprite_setFillAmount(lua_State *L) return 0; } -static int _fairygui_FUISprite_setFillClockwise(lua_State *L) +static int _olua_fun_fairygui_FUISprite_setFillClockwise(lua_State *L) { olua_startinvoke(L); @@ -27927,7 +30607,7 @@ static int _fairygui_FUISprite_setFillClockwise(lua_State *L) return 0; } -static int _fairygui_FUISprite_setFillMethod(lua_State *L) +static int _olua_fun_fairygui_FUISprite_setFillMethod(lua_State *L) { olua_startinvoke(L); @@ -27945,7 +30625,7 @@ static int _fairygui_FUISprite_setFillMethod(lua_State *L) return 0; } -static int _fairygui_FUISprite_setFillOrigin(lua_State *L) +static int _olua_fun_fairygui_FUISprite_setFillOrigin(lua_State *L) { olua_startinvoke(L); @@ -27963,7 +30643,7 @@ static int _fairygui_FUISprite_setFillOrigin(lua_State *L) return 0; } -static int _fairygui_FUISprite_setGrayed(lua_State *L) +static int _olua_fun_fairygui_FUISprite_setGrayed(lua_State *L) { olua_startinvoke(L); @@ -27981,7 +30661,7 @@ static int _fairygui_FUISprite_setGrayed(lua_State *L) return 0; } -static int _fairygui_FUISprite_setScale9Grid(lua_State *L) +static int _olua_fun_fairygui_FUISprite_setScale9Grid(lua_State *L) { olua_startinvoke(L); @@ -27999,7 +30679,7 @@ static int _fairygui_FUISprite_setScale9Grid(lua_State *L) return 0; } -static int _fairygui_FUISprite_setScaleByTile(lua_State *L) +static int _olua_fun_fairygui_FUISprite_setScaleByTile(lua_State *L) { olua_startinvoke(L); @@ -28017,36 +30697,45 @@ static int _fairygui_FUISprite_setScaleByTile(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_fairygui_FUISprite(lua_State *L) +static int _olua_cls_fgui_FUISprite(lua_State *L) { oluacls_class(L, "fgui.FUISprite"); - oluacls_func(L, "clearContent", _fairygui_FUISprite_clearContent); - oluacls_func(L, "create", _fairygui_FUISprite_create); - oluacls_func(L, "getFillAmount", _fairygui_FUISprite_getFillAmount); - oluacls_func(L, "getFillMethod", _fairygui_FUISprite_getFillMethod); - oluacls_func(L, "getFillOrigin", _fairygui_FUISprite_getFillOrigin); - oluacls_func(L, "isFillClockwise", _fairygui_FUISprite_isFillClockwise); - oluacls_func(L, "isScaleByTile", _fairygui_FUISprite_isScaleByTile); - oluacls_func(L, "new", _fairygui_FUISprite_new); - oluacls_func(L, "setFillAmount", _fairygui_FUISprite_setFillAmount); - oluacls_func(L, "setFillClockwise", _fairygui_FUISprite_setFillClockwise); - oluacls_func(L, "setFillMethod", _fairygui_FUISprite_setFillMethod); - oluacls_func(L, "setFillOrigin", _fairygui_FUISprite_setFillOrigin); - oluacls_func(L, "setGrayed", _fairygui_FUISprite_setGrayed); - oluacls_func(L, "setScale9Grid", _fairygui_FUISprite_setScale9Grid); - oluacls_func(L, "setScaleByTile", _fairygui_FUISprite_setScaleByTile); - oluacls_prop(L, "fillAmount", _fairygui_FUISprite_getFillAmount, _fairygui_FUISprite_setFillAmount); - oluacls_prop(L, "fillClockwise", _fairygui_FUISprite_isFillClockwise, _fairygui_FUISprite_setFillClockwise); - oluacls_prop(L, "fillMethod", _fairygui_FUISprite_getFillMethod, _fairygui_FUISprite_setFillMethod); - oluacls_prop(L, "fillOrigin", _fairygui_FUISprite_getFillOrigin, _fairygui_FUISprite_setFillOrigin); - oluacls_prop(L, "scaleByTile", _fairygui_FUISprite_isScaleByTile, _fairygui_FUISprite_setScaleByTile); + oluacls_func(L, "clearContent", _olua_fun_fairygui_FUISprite_clearContent); + oluacls_func(L, "create", _olua_fun_fairygui_FUISprite_create); + oluacls_func(L, "getFillAmount", _olua_fun_fairygui_FUISprite_getFillAmount); + oluacls_func(L, "getFillMethod", _olua_fun_fairygui_FUISprite_getFillMethod); + oluacls_func(L, "getFillOrigin", _olua_fun_fairygui_FUISprite_getFillOrigin); + oluacls_func(L, "isFillClockwise", _olua_fun_fairygui_FUISprite_isFillClockwise); + oluacls_func(L, "isScaleByTile", _olua_fun_fairygui_FUISprite_isScaleByTile); + oluacls_func(L, "new", _olua_fun_fairygui_FUISprite_new); + oluacls_func(L, "setFillAmount", _olua_fun_fairygui_FUISprite_setFillAmount); + oluacls_func(L, "setFillClockwise", _olua_fun_fairygui_FUISprite_setFillClockwise); + oluacls_func(L, "setFillMethod", _olua_fun_fairygui_FUISprite_setFillMethod); + oluacls_func(L, "setFillOrigin", _olua_fun_fairygui_FUISprite_setFillOrigin); + oluacls_func(L, "setGrayed", _olua_fun_fairygui_FUISprite_setGrayed); + oluacls_func(L, "setScale9Grid", _olua_fun_fairygui_FUISprite_setScale9Grid); + oluacls_func(L, "setScaleByTile", _olua_fun_fairygui_FUISprite_setScaleByTile); + oluacls_prop(L, "fillAmount", _olua_fun_fairygui_FUISprite_getFillAmount, _olua_fun_fairygui_FUISprite_setFillAmount); + oluacls_prop(L, "fillClockwise", _olua_fun_fairygui_FUISprite_isFillClockwise, _olua_fun_fairygui_FUISprite_setFillClockwise); + oluacls_prop(L, "fillMethod", _olua_fun_fairygui_FUISprite_getFillMethod, _olua_fun_fairygui_FUISprite_setFillMethod); + oluacls_prop(L, "fillOrigin", _olua_fun_fairygui_FUISprite_getFillOrigin, _olua_fun_fairygui_FUISprite_setFillOrigin); + oluacls_prop(L, "scaleByTile", _olua_fun_fairygui_FUISprite_isScaleByTile, _olua_fun_fairygui_FUISprite_setScaleByTile); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_fgui_FUISprite(lua_State *L) +{ + olua_require(L, "fairygui", luaopen_fairygui); + if (!olua_getclass(L, "fgui.FUISprite")) { + luaL_error(L, "class not found: fairygui::FUISprite"); + } return 1; } OLUA_END_DECLS -static int _fairygui_HtmlObject___gc(lua_State *L) +static int _olua_fun_fairygui_HtmlObject___gc(lua_State *L) { olua_startinvoke(L); @@ -28058,7 +30747,7 @@ static int _fairygui_HtmlObject___gc(lua_State *L) return 0; } -static int _fairygui_HtmlObject___olua_move(lua_State *L) +static int _olua_fun_fairygui_HtmlObject___olua_move(lua_State *L) { olua_startinvoke(L); @@ -28070,7 +30759,57 @@ static int _fairygui_HtmlObject___olua_move(lua_State *L) return 1; } -static int _fairygui_HtmlObject_create(lua_State *L) +static int _olua_fun_fairygui_HtmlObject_buttonResource$1(lua_State *L) +{ + olua_startinvoke(L); + + // static std::string buttonResource + std::string ret = fairygui::HtmlObject::buttonResource; + int num_ret = olua_push_string(L, ret); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_fairygui_HtmlObject_buttonResource$2(lua_State *L) +{ + olua_startinvoke(L); + + std::string arg1; /** buttonResource */ + + olua_check_string(L, 1, &arg1); + + // static std::string buttonResource + fairygui::HtmlObject::buttonResource = arg1; + + olua_endinvoke(L); + + return 0; +} + +static int _olua_fun_fairygui_HtmlObject_buttonResource(lua_State *L) +{ + int num_args = lua_gettop(L); + + if (num_args == 0) { + // static std::string buttonResource + return _olua_fun_fairygui_HtmlObject_buttonResource$1(L); + } + + if (num_args == 1) { + // if ((olua_is_string(L, 1))) { + // static std::string buttonResource + return _olua_fun_fairygui_HtmlObject_buttonResource$2(L); + // } + } + + luaL_error(L, "method 'fairygui::HtmlObject::buttonResource' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_fairygui_HtmlObject_create(lua_State *L) { olua_startinvoke(L); @@ -28090,7 +30829,7 @@ static int _fairygui_HtmlObject_create(lua_State *L) return 0; } -static int _fairygui_HtmlObject_destroy(lua_State *L) +static int _olua_fun_fairygui_HtmlObject_destroy(lua_State *L) { olua_startinvoke(L); @@ -28106,7 +30845,7 @@ static int _fairygui_HtmlObject_destroy(lua_State *L) return 0; } -static int _fairygui_HtmlObject_getElement(lua_State *L) +static int _olua_fun_fairygui_HtmlObject_getElement(lua_State *L) { olua_startinvoke(L); @@ -28123,7 +30862,7 @@ static int _fairygui_HtmlObject_getElement(lua_State *L) return num_ret; } -static int _fairygui_HtmlObject_getUI(lua_State *L) +static int _olua_fun_fairygui_HtmlObject_getUI(lua_State *L) { olua_startinvoke(L); @@ -28140,7 +30879,57 @@ static int _fairygui_HtmlObject_getUI(lua_State *L) return num_ret; } -static int _fairygui_HtmlObject_isHidden(lua_State *L) +static int _olua_fun_fairygui_HtmlObject_inputResource$1(lua_State *L) +{ + olua_startinvoke(L); + + // static std::string inputResource + std::string ret = fairygui::HtmlObject::inputResource; + int num_ret = olua_push_string(L, ret); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_fairygui_HtmlObject_inputResource$2(lua_State *L) +{ + olua_startinvoke(L); + + std::string arg1; /** inputResource */ + + olua_check_string(L, 1, &arg1); + + // static std::string inputResource + fairygui::HtmlObject::inputResource = arg1; + + olua_endinvoke(L); + + return 0; +} + +static int _olua_fun_fairygui_HtmlObject_inputResource(lua_State *L) +{ + int num_args = lua_gettop(L); + + if (num_args == 0) { + // static std::string inputResource + return _olua_fun_fairygui_HtmlObject_inputResource$1(L); + } + + if (num_args == 1) { + // if ((olua_is_string(L, 1))) { + // static std::string inputResource + return _olua_fun_fairygui_HtmlObject_inputResource$2(L); + // } + } + + luaL_error(L, "method 'fairygui::HtmlObject::inputResource' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_fairygui_HtmlObject_isHidden(lua_State *L) { olua_startinvoke(L); @@ -28157,11 +30946,65 @@ static int _fairygui_HtmlObject_isHidden(lua_State *L) return num_ret; } -static int _fairygui_HtmlObject_new(lua_State *L) +static int _olua_fun_fairygui_HtmlObject_loaderPool$1(lua_State *L) +{ + olua_startinvoke(L); + + // static cocos2d::Vector loaderPool + cocos2d::Vector &ret = fairygui::HtmlObject::loaderPool; + int num_ret = olua_push_array(L, ret, [L](fairygui::GObject *arg1) { + olua_push_object(L, arg1, "fgui.GObject"); + }); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_fairygui_HtmlObject_loaderPool$2(lua_State *L) +{ + olua_startinvoke(L); + + cocos2d::Vector arg1; /** loaderPool */ + + olua_check_array(L, 1, arg1, [L](fairygui::GObject **arg1) { + olua_check_object(L, -1, arg1, "fgui.GObject"); + }); + + // static cocos2d::Vector loaderPool + fairygui::HtmlObject::loaderPool = arg1; + + olua_endinvoke(L); + + return 0; +} + +static int _olua_fun_fairygui_HtmlObject_loaderPool(lua_State *L) +{ + int num_args = lua_gettop(L); + + if (num_args == 0) { + // static cocos2d::Vector loaderPool + return _olua_fun_fairygui_HtmlObject_loaderPool$1(L); + } + + if (num_args == 1) { + // if ((olua_is_array(L, 1))) { + // static cocos2d::Vector loaderPool + return _olua_fun_fairygui_HtmlObject_loaderPool$2(L); + // } + } + + luaL_error(L, "method 'fairygui::HtmlObject::loaderPool' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_fairygui_HtmlObject_new(lua_State *L) { olua_startinvoke(L); - // HtmlObject() + // fairygui::HtmlObject() fairygui::HtmlObject *ret = new fairygui::HtmlObject(); int num_ret = olua_push_object(L, ret, "fgui.HtmlObject"); olua_postnew(L, ret); @@ -28171,12 +31014,12 @@ static int _fairygui_HtmlObject_new(lua_State *L) return num_ret; } -static int _fairygui_HtmlObject_get_buttonResource(lua_State *L) +static int _olua_fun_fairygui_HtmlObject_selectResource$1(lua_State *L) { olua_startinvoke(L); - // static std::string buttonResource - std::string ret = fairygui::HtmlObject::buttonResource; + // static std::string selectResource + std::string ret = fairygui::HtmlObject::selectResource; int num_ret = olua_push_string(L, ret); olua_endinvoke(L); @@ -28184,209 +31027,290 @@ static int _fairygui_HtmlObject_get_buttonResource(lua_State *L) return num_ret; } -static int _fairygui_HtmlObject_set_buttonResource(lua_State *L) +static int _olua_fun_fairygui_HtmlObject_selectResource$2(lua_State *L) { olua_startinvoke(L); - std::string arg1; /** buttonResource */ + std::string arg1; /** selectResource */ olua_check_string(L, 1, &arg1); - // static std::string buttonResource - fairygui::HtmlObject::buttonResource = arg1; + // static std::string selectResource + fairygui::HtmlObject::selectResource = arg1; olua_endinvoke(L); return 0; } -static int _fairygui_HtmlObject_get_inputResource(lua_State *L) +static int _olua_fun_fairygui_HtmlObject_selectResource(lua_State *L) +{ + int num_args = lua_gettop(L); + + if (num_args == 0) { + // static std::string selectResource + return _olua_fun_fairygui_HtmlObject_selectResource$1(L); + } + + if (num_args == 1) { + // if ((olua_is_string(L, 1))) { + // static std::string selectResource + return _olua_fun_fairygui_HtmlObject_selectResource$2(L); + // } + } + + luaL_error(L, "method 'fairygui::HtmlObject::selectResource' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_fairygui_HtmlObject_usePool$1(lua_State *L) { olua_startinvoke(L); - // static std::string inputResource - std::string ret = fairygui::HtmlObject::inputResource; - int num_ret = olua_push_string(L, ret); + // static bool usePool + bool ret = fairygui::HtmlObject::usePool; + int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); return num_ret; } -static int _fairygui_HtmlObject_set_inputResource(lua_State *L) +static int _olua_fun_fairygui_HtmlObject_usePool$2(lua_State *L) { olua_startinvoke(L); - std::string arg1; /** inputResource */ + bool arg1 = false; /** usePool */ - olua_check_string(L, 1, &arg1); + olua_check_bool(L, 1, &arg1); - // static std::string inputResource - fairygui::HtmlObject::inputResource = arg1; + // static bool usePool + fairygui::HtmlObject::usePool = arg1; olua_endinvoke(L); return 0; } -static int _fairygui_HtmlObject_get_loaderPool(lua_State *L) +static int _olua_fun_fairygui_HtmlObject_usePool(lua_State *L) { - olua_startinvoke(L); + int num_args = lua_gettop(L); - // static cocos2d::Vector loaderPool - cocos2d::Vector &ret = fairygui::HtmlObject::loaderPool; - int num_ret = olua_push_array(L, ret, [L](fairygui::GObject *arg1) { - olua_push_object(L, arg1, "fgui.GObject"); - }); + if (num_args == 0) { + // static bool usePool + return _olua_fun_fairygui_HtmlObject_usePool$1(L); + } - olua_endinvoke(L); + if (num_args == 1) { + // if ((olua_is_bool(L, 1))) { + // static bool usePool + return _olua_fun_fairygui_HtmlObject_usePool$2(L); + // } + } - return num_ret; + luaL_error(L, "method 'fairygui::HtmlObject::usePool' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_cls_fgui_HtmlObject(lua_State *L) +{ + oluacls_class(L, "fgui.HtmlObject"); + oluacls_func(L, "__gc", _olua_fun_fairygui_HtmlObject___gc); + oluacls_func(L, "__olua_move", _olua_fun_fairygui_HtmlObject___olua_move); + oluacls_func(L, "create", _olua_fun_fairygui_HtmlObject_create); + oluacls_func(L, "destroy", _olua_fun_fairygui_HtmlObject_destroy); + oluacls_func(L, "getElement", _olua_fun_fairygui_HtmlObject_getElement); + oluacls_func(L, "getUI", _olua_fun_fairygui_HtmlObject_getUI); + oluacls_func(L, "isHidden", _olua_fun_fairygui_HtmlObject_isHidden); + oluacls_func(L, "new", _olua_fun_fairygui_HtmlObject_new); + oluacls_prop(L, "element", _olua_fun_fairygui_HtmlObject_getElement, nullptr); + oluacls_prop(L, "hidden", _olua_fun_fairygui_HtmlObject_isHidden, nullptr); + oluacls_prop(L, "ui", _olua_fun_fairygui_HtmlObject_getUI, nullptr); + oluacls_prop(L, "buttonResource", _olua_fun_fairygui_HtmlObject_buttonResource, _olua_fun_fairygui_HtmlObject_buttonResource); + oluacls_prop(L, "inputResource", _olua_fun_fairygui_HtmlObject_inputResource, _olua_fun_fairygui_HtmlObject_inputResource); + oluacls_prop(L, "loaderPool", _olua_fun_fairygui_HtmlObject_loaderPool, _olua_fun_fairygui_HtmlObject_loaderPool); + oluacls_prop(L, "selectResource", _olua_fun_fairygui_HtmlObject_selectResource, _olua_fun_fairygui_HtmlObject_selectResource); + oluacls_prop(L, "usePool", _olua_fun_fairygui_HtmlObject_usePool, _olua_fun_fairygui_HtmlObject_usePool); + + return 1; +} + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_fgui_HtmlObject(lua_State *L) +{ + olua_require(L, "fairygui", luaopen_fairygui); + if (!olua_getclass(L, "fgui.HtmlObject")) { + luaL_error(L, "class not found: fairygui::HtmlObject"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_fgui_HtmlElement_Type(lua_State *L) +{ + oluacls_class(L, "fgui.HtmlElement.Type"); + oluacls_func(L, "__index", olua_indexerror); + oluacls_func(L, "__newindex", olua_newindexerror); + oluacls_enum(L, "IMAGE", (lua_Integer)fairygui::HtmlElement::Type::IMAGE); + oluacls_enum(L, "INPUT", (lua_Integer)fairygui::HtmlElement::Type::INPUT); + oluacls_enum(L, "LINK", (lua_Integer)fairygui::HtmlElement::Type::LINK); + oluacls_enum(L, "OBJECT", (lua_Integer)fairygui::HtmlElement::Type::OBJECT); + oluacls_enum(L, "SELECT", (lua_Integer)fairygui::HtmlElement::Type::SELECT); + oluacls_enum(L, "TEXT", (lua_Integer)fairygui::HtmlElement::Type::TEXT); + + return 1; +} + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_fgui_HtmlElement_Type(lua_State *L) +{ + olua_require(L, "fairygui", luaopen_fairygui); + if (!olua_getclass(L, "fgui.HtmlElement.Type")) { + luaL_error(L, "class not found: fairygui::HtmlElement::Type"); + } + return 1; } +OLUA_END_DECLS -static int _fairygui_HtmlObject_set_loaderPool(lua_State *L) +static int _olua_fun_fairygui_HtmlElement___gc(lua_State *L) { olua_startinvoke(L); - cocos2d::Vector arg1; /** loaderPool */ - - olua_check_array(L, 1, arg1, [L](fairygui::GObject **arg1) { - olua_check_object(L, -1, arg1, "fgui.GObject"); - }); - - // static cocos2d::Vector loaderPool - fairygui::HtmlObject::loaderPool = arg1; + auto self = (fairygui::HtmlElement *)olua_toobj(L, 1, "fgui.HtmlElement"); + olua_postgc(L, self); olua_endinvoke(L); return 0; } -static int _fairygui_HtmlObject_get_selectResource(lua_State *L) +static int _olua_fun_fairygui_HtmlElement___olua_move(lua_State *L) { olua_startinvoke(L); - // static std::string selectResource - std::string ret = fairygui::HtmlObject::selectResource; - int num_ret = olua_push_string(L, ret); + auto self = (fairygui::HtmlElement *)olua_toobj(L, 1, "fgui.HtmlElement"); + olua_push_object(L, self, "fgui.HtmlElement"); olua_endinvoke(L); - return num_ret; + return 1; } -static int _fairygui_HtmlObject_set_selectResource(lua_State *L) +static int _olua_fun_fairygui_HtmlElement_attrs$1(lua_State *L) { olua_startinvoke(L); - std::string arg1; /** selectResource */ + fairygui::HtmlElement *self = nullptr; - olua_check_string(L, 1, &arg1); + olua_to_object(L, 1, &self, "fgui.HtmlElement"); - // static std::string selectResource - fairygui::HtmlObject::selectResource = arg1; + // cocos2d::ValueMap attrs + cocos2d::ValueMap &ret = self->attrs; + int num_ret = olua_push_cocos2d_ValueMap(L, ret); olua_endinvoke(L); - return 0; + return num_ret; } -static int _fairygui_HtmlObject_get_usePool(lua_State *L) +static int _olua_fun_fairygui_HtmlElement_attrs$2(lua_State *L) { olua_startinvoke(L); - // static bool usePool - bool ret = fairygui::HtmlObject::usePool; - int num_ret = olua_push_bool(L, ret); + fairygui::HtmlElement *self = nullptr; + cocos2d::ValueMap arg1; /** attrs */ + + olua_to_object(L, 1, &self, "fgui.HtmlElement"); + olua_check_cocos2d_ValueMap(L, 2, &arg1); + + // cocos2d::ValueMap attrs + self->attrs = arg1; olua_endinvoke(L); - return num_ret; + return 0; } -static int _fairygui_HtmlObject_set_usePool(lua_State *L) +static int _olua_fun_fairygui_HtmlElement_attrs(lua_State *L) { - olua_startinvoke(L); - - bool arg1 = false; /** usePool */ + int num_args = lua_gettop(L) - 1; - olua_check_bool(L, 1, &arg1); + if (num_args == 0) { + // cocos2d::ValueMap attrs + return _olua_fun_fairygui_HtmlElement_attrs$1(L); + } - // static bool usePool - fairygui::HtmlObject::usePool = arg1; + if (num_args == 1) { + // if ((olua_is_cocos2d_ValueMap(L, 2))) { + // cocos2d::ValueMap attrs + return _olua_fun_fairygui_HtmlElement_attrs$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'fairygui::HtmlElement::attrs' not support '%d' arguments", num_args); return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_fairygui_HtmlObject(lua_State *L) +static int _olua_fun_fairygui_HtmlElement_format$1(lua_State *L) { - oluacls_class(L, "fgui.HtmlObject"); - oluacls_func(L, "__gc", _fairygui_HtmlObject___gc); - oluacls_func(L, "__olua_move", _fairygui_HtmlObject___olua_move); - oluacls_func(L, "create", _fairygui_HtmlObject_create); - oluacls_func(L, "destroy", _fairygui_HtmlObject_destroy); - oluacls_func(L, "getElement", _fairygui_HtmlObject_getElement); - oluacls_func(L, "getUI", _fairygui_HtmlObject_getUI); - oluacls_func(L, "isHidden", _fairygui_HtmlObject_isHidden); - oluacls_func(L, "new", _fairygui_HtmlObject_new); - oluacls_prop(L, "element", _fairygui_HtmlObject_getElement, nullptr); - oluacls_prop(L, "hidden", _fairygui_HtmlObject_isHidden, nullptr); - oluacls_prop(L, "ui", _fairygui_HtmlObject_getUI, nullptr); - oluacls_prop(L, "buttonResource", _fairygui_HtmlObject_get_buttonResource, _fairygui_HtmlObject_set_buttonResource); - oluacls_prop(L, "inputResource", _fairygui_HtmlObject_get_inputResource, _fairygui_HtmlObject_set_inputResource); - oluacls_prop(L, "loaderPool", _fairygui_HtmlObject_get_loaderPool, _fairygui_HtmlObject_set_loaderPool); - oluacls_prop(L, "selectResource", _fairygui_HtmlObject_get_selectResource, _fairygui_HtmlObject_set_selectResource); - oluacls_prop(L, "usePool", _fairygui_HtmlObject_get_usePool, _fairygui_HtmlObject_set_usePool); + olua_startinvoke(L); - return 1; -} -OLUA_END_DECLS + fairygui::HtmlElement *self = nullptr; -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_fairygui_HtmlElement_Type(lua_State *L) -{ - oluacls_class(L, "fgui.HtmlElement::Type"); - oluacls_func(L, "__index", olua_indexerror); - oluacls_func(L, "__newindex", olua_newindexerror); - oluacls_enum(L, "IMAGE", (lua_Integer)fairygui::HtmlElement::Type::IMAGE); - oluacls_enum(L, "INPUT", (lua_Integer)fairygui::HtmlElement::Type::INPUT); - oluacls_enum(L, "LINK", (lua_Integer)fairygui::HtmlElement::Type::LINK); - oluacls_enum(L, "OBJECT", (lua_Integer)fairygui::HtmlElement::Type::OBJECT); - oluacls_enum(L, "SELECT", (lua_Integer)fairygui::HtmlElement::Type::SELECT); - oluacls_enum(L, "TEXT", (lua_Integer)fairygui::HtmlElement::Type::TEXT); + olua_to_object(L, 1, &self, "fgui.HtmlElement"); - return 1; + // fairygui::TextFormat format + fairygui::TextFormat &ret = self->format; + int num_ret = olua_copy_object(L, ret, "fgui.TextFormat"); + + olua_endinvoke(L); + + return num_ret; } -OLUA_END_DECLS -static int _fairygui_HtmlElement___gc(lua_State *L) +static int _olua_fun_fairygui_HtmlElement_format$2(lua_State *L) { olua_startinvoke(L); - auto self = (fairygui::HtmlElement *)olua_toobj(L, 1, "fgui.HtmlElement"); - olua_postgc(L, self); + fairygui::HtmlElement *self = nullptr; + fairygui::TextFormat *arg1; /** format */ + + olua_to_object(L, 1, &self, "fgui.HtmlElement"); + olua_check_object(L, 2, &arg1, "fgui.TextFormat"); + + // fairygui::TextFormat format + self->format = *arg1; olua_endinvoke(L); return 0; } -static int _fairygui_HtmlElement___olua_move(lua_State *L) +static int _olua_fun_fairygui_HtmlElement_format(lua_State *L) { - olua_startinvoke(L); + int num_args = lua_gettop(L) - 1; - auto self = (fairygui::HtmlElement *)olua_toobj(L, 1, "fgui.HtmlElement"); - olua_push_object(L, self, "fgui.HtmlElement"); + if (num_args == 0) { + // fairygui::TextFormat format + return _olua_fun_fairygui_HtmlElement_format$1(L); + } - olua_endinvoke(L); + if (num_args == 1) { + // if ((olua_is_object(L, 2, "fgui.TextFormat"))) { + // fairygui::TextFormat format + return _olua_fun_fairygui_HtmlElement_format$2(L); + // } + } - return 1; + luaL_error(L, "method 'fairygui::HtmlElement::format' not support '%d' arguments", num_args); + + return 0; } -static int _fairygui_HtmlElement_getArray(lua_State *L) +static int _olua_fun_fairygui_HtmlElement_getArray(lua_State *L) { olua_startinvoke(L); @@ -28405,7 +31329,7 @@ static int _fairygui_HtmlElement_getArray(lua_State *L) return num_ret; } -static int _fairygui_HtmlElement_getInt$1(lua_State *L) +static int _olua_fun_fairygui_HtmlElement_getInt$1(lua_State *L) { olua_startinvoke(L); @@ -28426,7 +31350,7 @@ static int _fairygui_HtmlElement_getInt$1(lua_State *L) return num_ret; } -static int _fairygui_HtmlElement_getInt$2(lua_State *L) +static int _olua_fun_fairygui_HtmlElement_getInt$2(lua_State *L) { olua_startinvoke(L); @@ -28436,7 +31360,7 @@ static int _fairygui_HtmlElement_getInt$2(lua_State *L) olua_to_object(L, 1, &self, "fgui.HtmlElement"); olua_check_string(L, 2, &arg1); - // int getInt(const std::string &attrName, @optional int defValue) + // int getInt(const std::string &attrName) int ret = self->getInt(arg1); int num_ret = olua_push_integer(L, ret); @@ -28445,21 +31369,21 @@ static int _fairygui_HtmlElement_getInt$2(lua_State *L) return num_ret; } -static int _fairygui_HtmlElement_getInt(lua_State *L) +static int _olua_fun_fairygui_HtmlElement_getInt(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_string(L, 2))) { - // int getInt(const std::string &attrName, @optional int defValue) - return _fairygui_HtmlElement_getInt$2(L); + // int getInt(const std::string &attrName) + return _olua_fun_fairygui_HtmlElement_getInt$2(L); // } } if (num_args == 2) { // if ((olua_is_string(L, 2)) && (olua_is_integer(L, 3))) { // int getInt(const std::string &attrName, @optional int defValue) - return _fairygui_HtmlElement_getInt$1(L); + return _olua_fun_fairygui_HtmlElement_getInt$1(L); // } } @@ -28468,7 +31392,7 @@ static int _fairygui_HtmlElement_getInt(lua_State *L) return 0; } -static int _fairygui_HtmlElement_getString$1(lua_State *L) +static int _olua_fun_fairygui_HtmlElement_getString$1(lua_State *L) { olua_startinvoke(L); @@ -28489,7 +31413,7 @@ static int _fairygui_HtmlElement_getString$1(lua_State *L) return num_ret; } -static int _fairygui_HtmlElement_getString$2(lua_State *L) +static int _olua_fun_fairygui_HtmlElement_getString$2(lua_State *L) { olua_startinvoke(L); @@ -28499,7 +31423,7 @@ static int _fairygui_HtmlElement_getString$2(lua_State *L) olua_to_object(L, 1, &self, "fgui.HtmlElement"); olua_check_string(L, 2, &arg1); - // std::string getString(const std::string &attrName, @optional const std::string &defValue) + // std::string getString(const std::string &attrName) std::string ret = self->getString(arg1); int num_ret = olua_push_string(L, ret); @@ -28508,21 +31432,21 @@ static int _fairygui_HtmlElement_getString$2(lua_State *L) return num_ret; } -static int _fairygui_HtmlElement_getString(lua_State *L) +static int _olua_fun_fairygui_HtmlElement_getString(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_string(L, 2))) { - // std::string getString(const std::string &attrName, @optional const std::string &defValue) - return _fairygui_HtmlElement_getString$2(L); + // std::string getString(const std::string &attrName) + return _olua_fun_fairygui_HtmlElement_getString$2(L); // } } if (num_args == 2) { // if ((olua_is_string(L, 2)) && (olua_is_string(L, 3))) { // std::string getString(const std::string &attrName, @optional const std::string &defValue) - return _fairygui_HtmlElement_getString$1(L); + return _olua_fun_fairygui_HtmlElement_getString$1(L); // } } @@ -28531,25 +31455,7 @@ static int _fairygui_HtmlElement_getString(lua_State *L) return 0; } -static int _fairygui_HtmlElement_new(lua_State *L) -{ - olua_startinvoke(L); - - fairygui::HtmlElement::Type arg1 = (fairygui::HtmlElement::Type)0; /** type */ - - olua_check_enum(L, 1, &arg1); - - // HtmlElement(fairygui::HtmlElement::Type type) - fairygui::HtmlElement *ret = new fairygui::HtmlElement(arg1); - int num_ret = olua_push_object(L, ret, "fgui.HtmlElement"); - olua_postnew(L, ret); - - olua_endinvoke(L); - - return num_ret; -} - -static int _fairygui_HtmlElement_get_attrs(lua_State *L) +static int _olua_fun_fairygui_HtmlElement_link$1(lua_State *L) { olua_startinvoke(L); @@ -28557,104 +31463,73 @@ static int _fairygui_HtmlElement_get_attrs(lua_State *L) olua_to_object(L, 1, &self, "fgui.HtmlElement"); - // cocos2d::ValueMap attrs - cocos2d::ValueMap &ret = self->attrs; - int num_ret = olua_push_cocos2d_ValueMap(L, ret); + // fairygui::HtmlElement *link + fairygui::HtmlElement *ret = self->link; + int num_ret = olua_push_object(L, ret, "fgui.HtmlElement"); olua_endinvoke(L); return num_ret; } -static int _fairygui_HtmlElement_set_attrs(lua_State *L) +static int _olua_fun_fairygui_HtmlElement_link$2(lua_State *L) { olua_startinvoke(L); fairygui::HtmlElement *self = nullptr; - cocos2d::ValueMap arg1; /** attrs */ + fairygui::HtmlElement *arg1 = nullptr; /** link */ olua_to_object(L, 1, &self, "fgui.HtmlElement"); - olua_check_cocos2d_ValueMap(L, 2, &arg1); + olua_check_object(L, 2, &arg1, "fgui.HtmlElement"); - // cocos2d::ValueMap attrs - self->attrs = arg1; + // fairygui::HtmlElement *link + self->link = arg1; olua_endinvoke(L); return 0; } -static int _fairygui_HtmlElement_get_format(lua_State *L) -{ - olua_startinvoke(L); - - fairygui::HtmlElement *self = nullptr; - - olua_to_object(L, 1, &self, "fgui.HtmlElement"); - - // fairygui::TextFormat format - fairygui::TextFormat &ret = self->format; - int num_ret = olua_pushcopy_object(L, ret, "fgui.TextFormat"); - - olua_endinvoke(L); - - return num_ret; -} - -static int _fairygui_HtmlElement_set_format(lua_State *L) +static int _olua_fun_fairygui_HtmlElement_link(lua_State *L) { - olua_startinvoke(L); - - fairygui::HtmlElement *self = nullptr; - fairygui::TextFormat arg1; /** format */ + int num_args = lua_gettop(L) - 1; - olua_to_object(L, 1, &self, "fgui.HtmlElement"); - olua_check_object(L, 2, &arg1, "fgui.TextFormat"); + if (num_args == 0) { + // fairygui::HtmlElement *link + return _olua_fun_fairygui_HtmlElement_link$1(L); + } - // fairygui::TextFormat format - self->format = arg1; + if (num_args == 1) { + // if ((olua_is_object(L, 2, "fgui.HtmlElement"))) { + // fairygui::HtmlElement *link + return _olua_fun_fairygui_HtmlElement_link$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'fairygui::HtmlElement::link' not support '%d' arguments", num_args); return 0; } -static int _fairygui_HtmlElement_get_link(lua_State *L) +static int _olua_fun_fairygui_HtmlElement_new(lua_State *L) { olua_startinvoke(L); - fairygui::HtmlElement *self = nullptr; + fairygui::HtmlElement::Type arg1 = (fairygui::HtmlElement::Type)0; /** type */ - olua_to_object(L, 1, &self, "fgui.HtmlElement"); + olua_check_enum(L, 1, &arg1); - // fairygui::HtmlElement *link - fairygui::HtmlElement *ret = self->link; + // fairygui::HtmlElement(fairygui::HtmlElement::Type type) + fairygui::HtmlElement *ret = new fairygui::HtmlElement(arg1); int num_ret = olua_push_object(L, ret, "fgui.HtmlElement"); + olua_postnew(L, ret); olua_endinvoke(L); return num_ret; } -static int _fairygui_HtmlElement_set_link(lua_State *L) -{ - olua_startinvoke(L); - - fairygui::HtmlElement *self = nullptr; - fairygui::HtmlElement *arg1 = nullptr; /** link */ - - olua_to_object(L, 1, &self, "fgui.HtmlElement"); - olua_check_object(L, 2, &arg1, "fgui.HtmlElement"); - - // fairygui::HtmlElement *link - self->link = arg1; - - olua_endinvoke(L); - - return 0; -} - -static int _fairygui_HtmlElement_get_obj(lua_State *L) +static int _olua_fun_fairygui_HtmlElement_obj$1(lua_State *L) { olua_startinvoke(L); @@ -28671,7 +31546,7 @@ static int _fairygui_HtmlElement_get_obj(lua_State *L) return num_ret; } -static int _fairygui_HtmlElement_set_obj(lua_State *L) +static int _olua_fun_fairygui_HtmlElement_obj$2(lua_State *L) { olua_startinvoke(L); @@ -28689,7 +31564,28 @@ static int _fairygui_HtmlElement_set_obj(lua_State *L) return 0; } -static int _fairygui_HtmlElement_get_space(lua_State *L) +static int _olua_fun_fairygui_HtmlElement_obj(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // fairygui::HtmlObject *obj + return _olua_fun_fairygui_HtmlElement_obj$1(L); + } + + if (num_args == 1) { + // if ((olua_is_object(L, 2, "fgui.HtmlObject"))) { + // fairygui::HtmlObject *obj + return _olua_fun_fairygui_HtmlElement_obj$2(L); + // } + } + + luaL_error(L, "method 'fairygui::HtmlElement::obj' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_fairygui_HtmlElement_space$1(lua_State *L) { olua_startinvoke(L); @@ -28706,7 +31602,7 @@ static int _fairygui_HtmlElement_get_space(lua_State *L) return num_ret; } -static int _fairygui_HtmlElement_set_space(lua_State *L) +static int _olua_fun_fairygui_HtmlElement_space$2(lua_State *L) { olua_startinvoke(L); @@ -28724,7 +31620,28 @@ static int _fairygui_HtmlElement_set_space(lua_State *L) return 0; } -static int _fairygui_HtmlElement_get_text(lua_State *L) +static int _olua_fun_fairygui_HtmlElement_space(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // int space + return _olua_fun_fairygui_HtmlElement_space$1(L); + } + + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // int space + return _olua_fun_fairygui_HtmlElement_space$2(L); + // } + } + + luaL_error(L, "method 'fairygui::HtmlElement::space' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_fairygui_HtmlElement_text$1(lua_State *L) { olua_startinvoke(L); @@ -28741,7 +31658,7 @@ static int _fairygui_HtmlElement_get_text(lua_State *L) return num_ret; } -static int _fairygui_HtmlElement_set_text(lua_State *L) +static int _olua_fun_fairygui_HtmlElement_text$2(lua_State *L) { olua_startinvoke(L); @@ -28759,7 +31676,28 @@ static int _fairygui_HtmlElement_set_text(lua_State *L) return 0; } -static int _fairygui_HtmlElement_get_type(lua_State *L) +static int _olua_fun_fairygui_HtmlElement_text(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // std::string text + return _olua_fun_fairygui_HtmlElement_text$1(L); + } + + if (num_args == 1) { + // if ((olua_is_string(L, 2))) { + // std::string text + return _olua_fun_fairygui_HtmlElement_text$2(L); + // } + } + + luaL_error(L, "method 'fairygui::HtmlElement::text' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_fairygui_HtmlElement_type$1(lua_State *L) { olua_startinvoke(L); @@ -28776,7 +31714,7 @@ static int _fairygui_HtmlElement_get_type(lua_State *L) return num_ret; } -static int _fairygui_HtmlElement_set_type(lua_State *L) +static int _olua_fun_fairygui_HtmlElement_type$2(lua_State *L) { olua_startinvoke(L); @@ -28794,24 +31732,54 @@ static int _fairygui_HtmlElement_set_type(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_fairygui_HtmlElement(lua_State *L) +static int _olua_fun_fairygui_HtmlElement_type(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // fairygui::HtmlElement::Type type + return _olua_fun_fairygui_HtmlElement_type$1(L); + } + + if (num_args == 1) { + // if ((olua_is_enum(L, 2))) { + // fairygui::HtmlElement::Type type + return _olua_fun_fairygui_HtmlElement_type$2(L); + // } + } + + luaL_error(L, "method 'fairygui::HtmlElement::type' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_cls_fgui_HtmlElement(lua_State *L) { oluacls_class(L, "fgui.HtmlElement"); - oluacls_func(L, "__gc", _fairygui_HtmlElement___gc); - oluacls_func(L, "__olua_move", _fairygui_HtmlElement___olua_move); - oluacls_func(L, "getArray", _fairygui_HtmlElement_getArray); - oluacls_func(L, "getInt", _fairygui_HtmlElement_getInt); - oluacls_func(L, "getString", _fairygui_HtmlElement_getString); - oluacls_func(L, "new", _fairygui_HtmlElement_new); - oluacls_prop(L, "attrs", _fairygui_HtmlElement_get_attrs, _fairygui_HtmlElement_set_attrs); - oluacls_prop(L, "format", _fairygui_HtmlElement_get_format, _fairygui_HtmlElement_set_format); - oluacls_prop(L, "link", _fairygui_HtmlElement_get_link, _fairygui_HtmlElement_set_link); - oluacls_prop(L, "obj", _fairygui_HtmlElement_get_obj, _fairygui_HtmlElement_set_obj); - oluacls_prop(L, "space", _fairygui_HtmlElement_get_space, _fairygui_HtmlElement_set_space); - oluacls_prop(L, "text", _fairygui_HtmlElement_get_text, _fairygui_HtmlElement_set_text); - oluacls_prop(L, "type", _fairygui_HtmlElement_get_type, _fairygui_HtmlElement_set_type); + oluacls_func(L, "__gc", _olua_fun_fairygui_HtmlElement___gc); + oluacls_func(L, "__olua_move", _olua_fun_fairygui_HtmlElement___olua_move); + oluacls_func(L, "getArray", _olua_fun_fairygui_HtmlElement_getArray); + oluacls_func(L, "getInt", _olua_fun_fairygui_HtmlElement_getInt); + oluacls_func(L, "getString", _olua_fun_fairygui_HtmlElement_getString); + oluacls_func(L, "new", _olua_fun_fairygui_HtmlElement_new); + oluacls_prop(L, "attrs", _olua_fun_fairygui_HtmlElement_attrs, _olua_fun_fairygui_HtmlElement_attrs); + oluacls_prop(L, "format", _olua_fun_fairygui_HtmlElement_format, _olua_fun_fairygui_HtmlElement_format); + oluacls_prop(L, "link", _olua_fun_fairygui_HtmlElement_link, _olua_fun_fairygui_HtmlElement_link); + oluacls_prop(L, "obj", _olua_fun_fairygui_HtmlElement_obj, _olua_fun_fairygui_HtmlElement_obj); + oluacls_prop(L, "space", _olua_fun_fairygui_HtmlElement_space, _olua_fun_fairygui_HtmlElement_space); + oluacls_prop(L, "text", _olua_fun_fairygui_HtmlElement_text, _olua_fun_fairygui_HtmlElement_text); + oluacls_prop(L, "type", _olua_fun_fairygui_HtmlElement_type, _olua_fun_fairygui_HtmlElement_type); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_fgui_HtmlElement(lua_State *L) +{ + olua_require(L, "fairygui", luaopen_fairygui); + if (!olua_getclass(L, "fgui.HtmlElement")) { + luaL_error(L, "class not found: fairygui::HtmlElement"); + } return 1; } OLUA_END_DECLS @@ -28819,102 +31787,102 @@ OLUA_END_DECLS OLUA_BEGIN_DECLS OLUA_LIB int luaopen_fairygui(lua_State *L) { - olua_require(L, "fgui.VectorTreeNode", luaopen_fairygui_VectorTreeNode); - olua_require(L, "fgui.Margin", luaopen_fairygui_Margin); - olua_require(L, "fgui.HtmlParseOptions", luaopen_fairygui_HtmlParseOptions); - olua_require(L, "fgui.TweenValue", luaopen_fairygui_TweenValue); - olua_require(L, "fgui.UIEventType", luaopen_fairygui_UIEventType); - olua_require(L, "fgui.EventCallback", luaopen_fairygui_EventCallback); - olua_require(L, "fgui.UIEventDispatcher", luaopen_fairygui_UIEventDispatcher); - olua_require(L, "fgui.EventContext", luaopen_fairygui_EventContext); - olua_require(L, "fgui.IHitTest", luaopen_fairygui_IHitTest); - olua_require(L, "fgui.PixelHitTest", luaopen_fairygui_PixelHitTest); - olua_require(L, "fgui.PixelHitTestData", luaopen_fairygui_PixelHitTestData); - olua_require(L, "fgui.InputProcessor::CaptureEventCallback", luaopen_fairygui_InputProcessor_CaptureEventCallback); - olua_require(L, "fgui.InputProcessor", luaopen_fairygui_InputProcessor); - olua_require(L, "fgui.InputEvent", luaopen_fairygui_InputEvent); - olua_require(L, "fgui.TextFormat", luaopen_fairygui_TextFormat); - olua_require(L, "fgui.EaseType", luaopen_fairygui_EaseType); - olua_require(L, "fgui.EaseManager", luaopen_fairygui_EaseManager); - olua_require(L, "fgui.TweenPropType", luaopen_fairygui_TweenPropType); - olua_require(L, "fgui.GPath", luaopen_fairygui_GPath); - olua_require(L, "fgui.GTweener::GTweenCallback", luaopen_fairygui_GTweener_GTweenCallback); - olua_require(L, "fgui.GTweener::GTweenCallback0", luaopen_fairygui_GTweener_GTweenCallback0); - olua_require(L, "fgui.GTweener", luaopen_fairygui_GTweener); - olua_require(L, "fgui.GTween", luaopen_fairygui_GTween); - olua_require(L, "fgui.UIPackage", luaopen_fairygui_UIPackage); - olua_require(L, "fgui.PackageItem", luaopen_fairygui_PackageItem); - olua_require(L, "fgui.PackageItemType", luaopen_fairygui_PackageItemType); - olua_require(L, "fgui.ObjectType", luaopen_fairygui_ObjectType); - olua_require(L, "fgui.ButtonMode", luaopen_fairygui_ButtonMode); - olua_require(L, "fgui.ChildrenRenderOrder", luaopen_fairygui_ChildrenRenderOrder); - olua_require(L, "fgui.OverflowType", luaopen_fairygui_OverflowType); - olua_require(L, "fgui.ScrollType", luaopen_fairygui_ScrollType); - olua_require(L, "fgui.ScrollBarDisplayType", luaopen_fairygui_ScrollBarDisplayType); - olua_require(L, "fgui.LoaderFillType", luaopen_fairygui_LoaderFillType); - olua_require(L, "fgui.ProgressTitleType", luaopen_fairygui_ProgressTitleType); - olua_require(L, "fgui.ListLayoutType", luaopen_fairygui_ListLayoutType); - olua_require(L, "fgui.ListSelectionMode", luaopen_fairygui_ListSelectionMode); - olua_require(L, "fgui.GroupLayoutType", luaopen_fairygui_GroupLayoutType); - olua_require(L, "fgui.PopupDirection", luaopen_fairygui_PopupDirection); - olua_require(L, "fgui.AutoSizeType", luaopen_fairygui_AutoSizeType); - olua_require(L, "fgui.FlipType", luaopen_fairygui_FlipType); - olua_require(L, "fgui.TransitionActionType", luaopen_fairygui_TransitionActionType); - olua_require(L, "fgui.FillMethod", luaopen_fairygui_FillMethod); - olua_require(L, "fgui.FillOrigin", luaopen_fairygui_FillOrigin); - olua_require(L, "fgui.ObjectPropID", luaopen_fairygui_ObjectPropID); - olua_require(L, "fgui.GController", luaopen_fairygui_GController); - olua_require(L, "fgui.GObject", luaopen_fairygui_GObject); - olua_require(L, "fgui.GComponent", luaopen_fairygui_GComponent); - olua_require(L, "fgui.GRoot", luaopen_fairygui_GRoot); - olua_require(L, "fgui.GGroup", luaopen_fairygui_GGroup); - olua_require(L, "fgui.GScrollBar", luaopen_fairygui_GScrollBar); - olua_require(L, "fgui.GLoader", luaopen_fairygui_GLoader); - olua_require(L, "fgui.GLoader3D", luaopen_fairygui_GLoader3D); - olua_require(L, "fgui.GTextField", luaopen_fairygui_GTextField); - olua_require(L, "fgui.GBasicTextField", luaopen_fairygui_GBasicTextField); - olua_require(L, "fgui.GGraph", luaopen_fairygui_GGraph); - olua_require(L, "fgui.GButton", luaopen_fairygui_GButton); - olua_require(L, "fgui.GImage", luaopen_fairygui_GImage); - olua_require(L, "fgui.GLabel", luaopen_fairygui_GLabel); - olua_require(L, "fgui.GList::ListItemRenderer", luaopen_fairygui_GList_ListItemRenderer); - olua_require(L, "fgui.GList::ListItemProvider", luaopen_fairygui_GList_ListItemProvider); - olua_require(L, "fgui.GList", luaopen_fairygui_GList); - olua_require(L, "fgui.GMovieClip", luaopen_fairygui_GMovieClip); - olua_require(L, "fgui.GProgressBar", luaopen_fairygui_GProgressBar); - olua_require(L, "fgui.GComboBox", luaopen_fairygui_GComboBox); - olua_require(L, "fgui.GRichTextField", luaopen_fairygui_GRichTextField); - olua_require(L, "fgui.GSlider", luaopen_fairygui_GSlider); - olua_require(L, "fgui.GTextInput", luaopen_fairygui_GTextInput); - olua_require(L, "fgui.PopupMenu", luaopen_fairygui_PopupMenu); - olua_require(L, "fgui.Relations", luaopen_fairygui_Relations); - olua_require(L, "fgui.RelationType", luaopen_fairygui_RelationType); - olua_require(L, "fgui.RelationItem", luaopen_fairygui_RelationItem); - olua_require(L, "fgui.ScrollPane", luaopen_fairygui_ScrollPane); - olua_require(L, "fgui.Transition::PlayCompleteCallback", luaopen_fairygui_Transition_PlayCompleteCallback); - olua_require(L, "fgui.Transition::TransitionHook", luaopen_fairygui_Transition_TransitionHook); - olua_require(L, "fgui.Transition", luaopen_fairygui_Transition); - olua_require(L, "fgui.UIConfig", luaopen_fairygui_UIConfig); - olua_require(L, "fgui.IUISource", luaopen_fairygui_IUISource); - olua_require(L, "fgui.UISource", luaopen_fairygui_UISource); - olua_require(L, "fgui.Window", luaopen_fairygui_Window); - olua_require(L, "fgui.DragDropManager", luaopen_fairygui_DragDropManager); - olua_require(L, "fgui.UIObjectFactory::GLoaderCreator", luaopen_fairygui_UIObjectFactory_GLoaderCreator); - olua_require(L, "fgui.UIObjectFactory::GComponentCreator", luaopen_fairygui_UIObjectFactory_GComponentCreator); - olua_require(L, "fgui.UIObjectFactory", luaopen_fairygui_UIObjectFactory); - olua_require(L, "fgui.GearBase", luaopen_fairygui_GearBase); - olua_require(L, "fgui.GTreeNode", luaopen_fairygui_GTreeNode); - olua_require(L, "fgui.GTree::TreeNodeRenderFunction", luaopen_fairygui_GTree_TreeNodeRenderFunction); - olua_require(L, "fgui.GTree::TreeNodeWillExpandFunction", luaopen_fairygui_GTree_TreeNodeWillExpandFunction); - olua_require(L, "fgui.GTree", luaopen_fairygui_GTree); - olua_require(L, "fgui.FUIContainer", luaopen_fairygui_FUIContainer); - olua_require(L, "fgui.FUIInput", luaopen_fairygui_FUIInput); - olua_require(L, "fgui.FUILabel", luaopen_fairygui_FUILabel); - olua_require(L, "fgui.FUIRichText", luaopen_fairygui_FUIRichText); - olua_require(L, "fgui.FUISprite", luaopen_fairygui_FUISprite); - olua_require(L, "fgui.HtmlObject", luaopen_fairygui_HtmlObject); - olua_require(L, "fgui.HtmlElement::Type", luaopen_fairygui_HtmlElement_Type); - olua_require(L, "fgui.HtmlElement", luaopen_fairygui_HtmlElement); + olua_require(L, "fgui.VectorTreeNode", _olua_cls_fgui_VectorTreeNode); + olua_require(L, "fgui.Margin", _olua_cls_fgui_Margin); + olua_require(L, "fgui.HtmlParseOptions", _olua_cls_fgui_HtmlParseOptions); + olua_require(L, "fgui.TweenValue", _olua_cls_fgui_TweenValue); + olua_require(L, "fgui.UIEventType", _olua_cls_fgui_UIEventType); + olua_require(L, "fgui.EventCallback", _olua_cls_fgui_EventCallback); + olua_require(L, "fgui.UIEventDispatcher", _olua_cls_fgui_UIEventDispatcher); + olua_require(L, "fgui.EventContext", _olua_cls_fgui_EventContext); + olua_require(L, "fgui.IHitTest", _olua_cls_fgui_IHitTest); + olua_require(L, "fgui.PixelHitTest", _olua_cls_fgui_PixelHitTest); + olua_require(L, "fgui.PixelHitTestData", _olua_cls_fgui_PixelHitTestData); + olua_require(L, "fgui.InputProcessor.CaptureEventCallback", _olua_cls_fgui_InputProcessor_CaptureEventCallback); + olua_require(L, "fgui.InputProcessor", _olua_cls_fgui_InputProcessor); + olua_require(L, "fgui.InputEvent", _olua_cls_fgui_InputEvent); + olua_require(L, "fgui.TextFormat", _olua_cls_fgui_TextFormat); + olua_require(L, "fgui.EaseType", _olua_cls_fgui_EaseType); + olua_require(L, "fgui.EaseManager", _olua_cls_fgui_EaseManager); + olua_require(L, "fgui.TweenPropType", _olua_cls_fgui_TweenPropType); + olua_require(L, "fgui.GPath", _olua_cls_fgui_GPath); + olua_require(L, "fgui.GTweener.GTweenCallback", _olua_cls_fgui_GTweener_GTweenCallback); + olua_require(L, "fgui.GTweener.GTweenCallback0", _olua_cls_fgui_GTweener_GTweenCallback0); + olua_require(L, "fgui.GTweener", _olua_cls_fgui_GTweener); + olua_require(L, "fgui.GTween", _olua_cls_fgui_GTween); + olua_require(L, "fgui.UIPackage", _olua_cls_fgui_UIPackage); + olua_require(L, "fgui.PackageItem", _olua_cls_fgui_PackageItem); + olua_require(L, "fgui.PackageItemType", _olua_cls_fgui_PackageItemType); + olua_require(L, "fgui.ObjectType", _olua_cls_fgui_ObjectType); + olua_require(L, "fgui.ButtonMode", _olua_cls_fgui_ButtonMode); + olua_require(L, "fgui.ChildrenRenderOrder", _olua_cls_fgui_ChildrenRenderOrder); + olua_require(L, "fgui.OverflowType", _olua_cls_fgui_OverflowType); + olua_require(L, "fgui.ScrollType", _olua_cls_fgui_ScrollType); + olua_require(L, "fgui.ScrollBarDisplayType", _olua_cls_fgui_ScrollBarDisplayType); + olua_require(L, "fgui.LoaderFillType", _olua_cls_fgui_LoaderFillType); + olua_require(L, "fgui.ProgressTitleType", _olua_cls_fgui_ProgressTitleType); + olua_require(L, "fgui.ListLayoutType", _olua_cls_fgui_ListLayoutType); + olua_require(L, "fgui.ListSelectionMode", _olua_cls_fgui_ListSelectionMode); + olua_require(L, "fgui.GroupLayoutType", _olua_cls_fgui_GroupLayoutType); + olua_require(L, "fgui.PopupDirection", _olua_cls_fgui_PopupDirection); + olua_require(L, "fgui.AutoSizeType", _olua_cls_fgui_AutoSizeType); + olua_require(L, "fgui.FlipType", _olua_cls_fgui_FlipType); + olua_require(L, "fgui.TransitionActionType", _olua_cls_fgui_TransitionActionType); + olua_require(L, "fgui.FillMethod", _olua_cls_fgui_FillMethod); + olua_require(L, "fgui.FillOrigin", _olua_cls_fgui_FillOrigin); + olua_require(L, "fgui.ObjectPropID", _olua_cls_fgui_ObjectPropID); + olua_require(L, "fgui.GController", _olua_cls_fgui_GController); + olua_require(L, "fgui.GObject", _olua_cls_fgui_GObject); + olua_require(L, "fgui.GComponent", _olua_cls_fgui_GComponent); + olua_require(L, "fgui.GRoot", _olua_cls_fgui_GRoot); + olua_require(L, "fgui.GGroup", _olua_cls_fgui_GGroup); + olua_require(L, "fgui.GScrollBar", _olua_cls_fgui_GScrollBar); + olua_require(L, "fgui.GLoader", _olua_cls_fgui_GLoader); + olua_require(L, "fgui.GLoader3D", _olua_cls_fgui_GLoader3D); + olua_require(L, "fgui.GTextField", _olua_cls_fgui_GTextField); + olua_require(L, "fgui.GBasicTextField", _olua_cls_fgui_GBasicTextField); + olua_require(L, "fgui.GGraph", _olua_cls_fgui_GGraph); + olua_require(L, "fgui.GButton", _olua_cls_fgui_GButton); + olua_require(L, "fgui.GImage", _olua_cls_fgui_GImage); + olua_require(L, "fgui.GLabel", _olua_cls_fgui_GLabel); + olua_require(L, "fgui.GList.ListItemRenderer", _olua_cls_fgui_GList_ListItemRenderer); + olua_require(L, "fgui.GList.ListItemProvider", _olua_cls_fgui_GList_ListItemProvider); + olua_require(L, "fgui.GList", _olua_cls_fgui_GList); + olua_require(L, "fgui.GMovieClip", _olua_cls_fgui_GMovieClip); + olua_require(L, "fgui.GProgressBar", _olua_cls_fgui_GProgressBar); + olua_require(L, "fgui.GComboBox", _olua_cls_fgui_GComboBox); + olua_require(L, "fgui.GRichTextField", _olua_cls_fgui_GRichTextField); + olua_require(L, "fgui.GSlider", _olua_cls_fgui_GSlider); + olua_require(L, "fgui.GTextInput", _olua_cls_fgui_GTextInput); + olua_require(L, "fgui.PopupMenu", _olua_cls_fgui_PopupMenu); + olua_require(L, "fgui.Relations", _olua_cls_fgui_Relations); + olua_require(L, "fgui.RelationType", _olua_cls_fgui_RelationType); + olua_require(L, "fgui.RelationItem", _olua_cls_fgui_RelationItem); + olua_require(L, "fgui.ScrollPane", _olua_cls_fgui_ScrollPane); + olua_require(L, "fgui.Transition.PlayCompleteCallback", _olua_cls_fgui_Transition_PlayCompleteCallback); + olua_require(L, "fgui.Transition.TransitionHook", _olua_cls_fgui_Transition_TransitionHook); + olua_require(L, "fgui.Transition", _olua_cls_fgui_Transition); + olua_require(L, "fgui.UIConfig", _olua_cls_fgui_UIConfig); + olua_require(L, "fgui.IUISource", _olua_cls_fgui_IUISource); + olua_require(L, "fgui.UISource", _olua_cls_fgui_UISource); + olua_require(L, "fgui.Window", _olua_cls_fgui_Window); + olua_require(L, "fgui.DragDropManager", _olua_cls_fgui_DragDropManager); + olua_require(L, "fgui.UIObjectFactory.GLoaderCreator", _olua_cls_fgui_UIObjectFactory_GLoaderCreator); + olua_require(L, "fgui.UIObjectFactory.GComponentCreator", _olua_cls_fgui_UIObjectFactory_GComponentCreator); + olua_require(L, "fgui.UIObjectFactory", _olua_cls_fgui_UIObjectFactory); + olua_require(L, "fgui.GearBase", _olua_cls_fgui_GearBase); + olua_require(L, "fgui.GTreeNode", _olua_cls_fgui_GTreeNode); + olua_require(L, "fgui.GTree.TreeNodeRenderFunction", _olua_cls_fgui_GTree_TreeNodeRenderFunction); + olua_require(L, "fgui.GTree.TreeNodeWillExpandFunction", _olua_cls_fgui_GTree_TreeNodeWillExpandFunction); + olua_require(L, "fgui.GTree", _olua_cls_fgui_GTree); + olua_require(L, "fgui.FUIContainer", _olua_cls_fgui_FUIContainer); + olua_require(L, "fgui.FUIInput", _olua_cls_fgui_FUIInput); + olua_require(L, "fgui.FUILabel", _olua_cls_fgui_FUILabel); + olua_require(L, "fgui.FUIRichText", _olua_cls_fgui_FUIRichText); + olua_require(L, "fgui.FUISprite", _olua_cls_fgui_FUISprite); + olua_require(L, "fgui.HtmlObject", _olua_cls_fgui_HtmlObject); + olua_require(L, "fgui.HtmlElement.Type", _olua_cls_fgui_HtmlElement_Type); + olua_require(L, "fgui.HtmlElement", _olua_cls_fgui_HtmlElement); cclua::runtime::registerFeature("fairygui", true); diff --git a/frameworks/cclua/src/lua-bindings/lua_fairygui.h b/frameworks/cclua/src/lua-bindings/lua_fairygui.h index 9b57e959..ec667cc2 100644 --- a/frameworks/cclua/src/lua-bindings/lua_fairygui.h +++ b/frameworks/cclua/src/lua-bindings/lua_fairygui.h @@ -1,5 +1,5 @@ // -// AUTO BUILD, DON'T MODIFY! +// AUTO GENERATED, DO NOT MODIFY! // #ifndef __AUTO_GEN_LUA_FAIRYGUI_H__ #define __AUTO_GEN_LUA_FAIRYGUI_H__ diff --git a/frameworks/cclua/src/lua-bindings/lua_spine.cpp b/frameworks/cclua/src/lua-bindings/lua_spine.cpp index 70d5ab4a..7834c2a7 100644 --- a/frameworks/cclua/src/lua-bindings/lua_spine.cpp +++ b/frameworks/cclua/src/lua-bindings/lua_spine.cpp @@ -1,5 +1,5 @@ // -// AUTO BUILD, DON'T MODIFY! +// AUTO GENERATED, DO NOT MODIFY! // #include "lua_spine.h" #include "lua-bindings/lua_cocos2d_types.h" @@ -7,8 +7,7 @@ #include "cocos2d.h" #include "spine/spine-cocos2dx.h" -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_spine_EventType(lua_State *L) +static int _olua_cls_spine_EventType(lua_State *L) { oluacls_class(L, "spine.EventType"); oluacls_func(L, "__index", olua_indexerror); @@ -22,10 +21,19 @@ OLUA_LIB int luaopen_spine_EventType(lua_State *L) return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_spine_AttachmentType(lua_State *L) +OLUA_LIB int luaopen_spine_EventType(lua_State *L) +{ + olua_require(L, "spine", luaopen_spine); + if (!olua_getclass(L, "spine.EventType")) { + luaL_error(L, "class not found: spine::EventType"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_spine_AttachmentType(lua_State *L) { oluacls_class(L, "spine.AttachmentType"); oluacls_func(L, "__index", olua_indexerror); @@ -40,10 +48,19 @@ OLUA_LIB int luaopen_spine_AttachmentType(lua_State *L) return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_spine_BlendMode(lua_State *L) +OLUA_LIB int luaopen_spine_AttachmentType(lua_State *L) +{ + olua_require(L, "spine", luaopen_spine); + if (!olua_getclass(L, "spine.AttachmentType")) { + luaL_error(L, "class not found: spine::AttachmentType"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_spine_BlendMode(lua_State *L) { oluacls_class(L, "spine.BlendMode"); oluacls_func(L, "__index", olua_indexerror); @@ -55,10 +72,19 @@ OLUA_LIB int luaopen_spine_BlendMode(lua_State *L) return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_spine_PositionMode(lua_State *L) +OLUA_LIB int luaopen_spine_BlendMode(lua_State *L) +{ + olua_require(L, "spine", luaopen_spine); + if (!olua_getclass(L, "spine.BlendMode")) { + luaL_error(L, "class not found: spine::BlendMode"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_spine_PositionMode(lua_State *L) { oluacls_class(L, "spine.PositionMode"); oluacls_func(L, "__index", olua_indexerror); @@ -68,10 +94,19 @@ OLUA_LIB int luaopen_spine_PositionMode(lua_State *L) return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_spine_SpacingMode(lua_State *L) +OLUA_LIB int luaopen_spine_PositionMode(lua_State *L) +{ + olua_require(L, "spine", luaopen_spine); + if (!olua_getclass(L, "spine.PositionMode")) { + luaL_error(L, "class not found: spine::PositionMode"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_spine_SpacingMode(lua_State *L) { oluacls_class(L, "spine.SpacingMode"); oluacls_func(L, "__index", olua_indexerror); @@ -83,10 +118,19 @@ OLUA_LIB int luaopen_spine_SpacingMode(lua_State *L) return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_spine_RotateMode(lua_State *L) +OLUA_LIB int luaopen_spine_SpacingMode(lua_State *L) +{ + olua_require(L, "spine", luaopen_spine); + if (!olua_getclass(L, "spine.SpacingMode")) { + luaL_error(L, "class not found: spine::SpacingMode"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_spine_RotateMode(lua_State *L) { oluacls_class(L, "spine.RotateMode"); oluacls_func(L, "__index", olua_indexerror); @@ -97,10 +141,19 @@ OLUA_LIB int luaopen_spine_RotateMode(lua_State *L) return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_spine_MixBlend(lua_State *L) +OLUA_LIB int luaopen_spine_RotateMode(lua_State *L) +{ + olua_require(L, "spine", luaopen_spine); + if (!olua_getclass(L, "spine.RotateMode")) { + luaL_error(L, "class not found: spine::RotateMode"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_spine_MixBlend(lua_State *L) { oluacls_class(L, "spine.MixBlend"); oluacls_func(L, "__index", olua_indexerror); @@ -112,10 +165,19 @@ OLUA_LIB int luaopen_spine_MixBlend(lua_State *L) return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_spine_MixDirection(lua_State *L) +OLUA_LIB int luaopen_spine_MixBlend(lua_State *L) +{ + olua_require(L, "spine", luaopen_spine); + if (!olua_getclass(L, "spine.MixBlend")) { + luaL_error(L, "class not found: spine::MixBlend"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_spine_MixDirection(lua_State *L) { oluacls_class(L, "spine.MixDirection"); oluacls_func(L, "__index", olua_indexerror); @@ -125,10 +187,19 @@ OLUA_LIB int luaopen_spine_MixDirection(lua_State *L) return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_spine_Physics(lua_State *L) +OLUA_LIB int luaopen_spine_MixDirection(lua_State *L) +{ + olua_require(L, "spine", luaopen_spine); + if (!olua_getclass(L, "spine.MixDirection")) { + luaL_error(L, "class not found: spine::MixDirection"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_spine_Physics(lua_State *L) { oluacls_class(L, "spine.Physics"); oluacls_func(L, "__index", olua_indexerror); @@ -140,10 +211,19 @@ OLUA_LIB int luaopen_spine_Physics(lua_State *L) return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_spine_Inherit(lua_State *L) +OLUA_LIB int luaopen_spine_Physics(lua_State *L) +{ + olua_require(L, "spine", luaopen_spine); + if (!olua_getclass(L, "spine.Physics")) { + luaL_error(L, "class not found: spine::Physics"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_spine_Inherit(lua_State *L) { oluacls_class(L, "spine.Inherit"); oluacls_func(L, "__index", olua_indexerror); @@ -156,9 +236,19 @@ OLUA_LIB int luaopen_spine_Inherit(lua_State *L) return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_spine_Inherit(lua_State *L) +{ + olua_require(L, "spine", luaopen_spine); + if (!olua_getclass(L, "spine.Inherit")) { + luaL_error(L, "class not found: spine::Inherit"); + } + return 1; +} OLUA_END_DECLS -static int _spine_SpineObject___gc(lua_State *L) +static int _olua_fun_spine_SpineObject___gc(lua_State *L) { olua_startinvoke(L); @@ -170,7 +260,7 @@ static int _spine_SpineObject___gc(lua_State *L) return 0; } -static int _spine_SpineObject___olua_move(lua_State *L) +static int _olua_fun_spine_SpineObject___olua_move(lua_State *L) { olua_startinvoke(L); @@ -182,18 +272,27 @@ static int _spine_SpineObject___olua_move(lua_State *L) return 1; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_spine_SpineObject(lua_State *L) +static int _olua_cls_spine_SpineObject(lua_State *L) { oluacls_class(L, "spine.SpineObject"); - oluacls_func(L, "__gc", _spine_SpineObject___gc); - oluacls_func(L, "__olua_move", _spine_SpineObject___olua_move); + oluacls_func(L, "__gc", _olua_fun_spine_SpineObject___gc); + oluacls_func(L, "__olua_move", _olua_fun_spine_SpineObject___olua_move); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_spine_SpineObject(lua_State *L) +{ + olua_require(L, "spine", luaopen_spine); + if (!olua_getclass(L, "spine.SpineObject")) { + luaL_error(L, "class not found: spine::SpineObject"); + } + return 1; +} OLUA_END_DECLS -static int _spine_Event_getBalance(lua_State *L) +static int _olua_fun_spine_Event_getBalance(lua_State *L) { olua_startinvoke(L); @@ -210,7 +309,7 @@ static int _spine_Event_getBalance(lua_State *L) return num_ret; } -static int _spine_Event_getData(lua_State *L) +static int _olua_fun_spine_Event_getData(lua_State *L) { olua_startinvoke(L); @@ -227,7 +326,7 @@ static int _spine_Event_getData(lua_State *L) return num_ret; } -static int _spine_Event_getFloatValue(lua_State *L) +static int _olua_fun_spine_Event_getFloatValue(lua_State *L) { olua_startinvoke(L); @@ -244,7 +343,7 @@ static int _spine_Event_getFloatValue(lua_State *L) return num_ret; } -static int _spine_Event_getIntValue(lua_State *L) +static int _olua_fun_spine_Event_getIntValue(lua_State *L) { olua_startinvoke(L); @@ -261,7 +360,7 @@ static int _spine_Event_getIntValue(lua_State *L) return num_ret; } -static int _spine_Event_getStringValue(lua_State *L) +static int _olua_fun_spine_Event_getStringValue(lua_State *L) { olua_startinvoke(L); @@ -278,7 +377,7 @@ static int _spine_Event_getStringValue(lua_State *L) return num_ret; } -static int _spine_Event_getTime(lua_State *L) +static int _olua_fun_spine_Event_getTime(lua_State *L) { olua_startinvoke(L); @@ -295,7 +394,7 @@ static int _spine_Event_getTime(lua_State *L) return num_ret; } -static int _spine_Event_getVolume(lua_State *L) +static int _olua_fun_spine_Event_getVolume(lua_State *L) { olua_startinvoke(L); @@ -312,7 +411,7 @@ static int _spine_Event_getVolume(lua_State *L) return num_ret; } -static int _spine_Event_setBalance(lua_State *L) +static int _olua_fun_spine_Event_setBalance(lua_State *L) { olua_startinvoke(L); @@ -330,7 +429,7 @@ static int _spine_Event_setBalance(lua_State *L) return 0; } -static int _spine_Event_setFloatValue(lua_State *L) +static int _olua_fun_spine_Event_setFloatValue(lua_State *L) { olua_startinvoke(L); @@ -348,7 +447,7 @@ static int _spine_Event_setFloatValue(lua_State *L) return 0; } -static int _spine_Event_setIntValue(lua_State *L) +static int _olua_fun_spine_Event_setIntValue(lua_State *L) { olua_startinvoke(L); @@ -366,7 +465,7 @@ static int _spine_Event_setIntValue(lua_State *L) return 0; } -static int _spine_Event_setStringValue(lua_State *L) +static int _olua_fun_spine_Event_setStringValue(lua_State *L) { olua_startinvoke(L); @@ -384,7 +483,7 @@ static int _spine_Event_setStringValue(lua_State *L) return 0; } -static int _spine_Event_setVolume(lua_State *L) +static int _olua_fun_spine_Event_setVolume(lua_State *L) { olua_startinvoke(L); @@ -402,35 +501,44 @@ static int _spine_Event_setVolume(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_spine_Event(lua_State *L) +static int _olua_cls_spine_Event(lua_State *L) { oluacls_class(L, "spine.Event"); - oluacls_func(L, "getBalance", _spine_Event_getBalance); - oluacls_func(L, "getData", _spine_Event_getData); - oluacls_func(L, "getFloatValue", _spine_Event_getFloatValue); - oluacls_func(L, "getIntValue", _spine_Event_getIntValue); - oluacls_func(L, "getStringValue", _spine_Event_getStringValue); - oluacls_func(L, "getTime", _spine_Event_getTime); - oluacls_func(L, "getVolume", _spine_Event_getVolume); - oluacls_func(L, "setBalance", _spine_Event_setBalance); - oluacls_func(L, "setFloatValue", _spine_Event_setFloatValue); - oluacls_func(L, "setIntValue", _spine_Event_setIntValue); - oluacls_func(L, "setStringValue", _spine_Event_setStringValue); - oluacls_func(L, "setVolume", _spine_Event_setVolume); - oluacls_prop(L, "balance", _spine_Event_getBalance, _spine_Event_setBalance); - oluacls_prop(L, "data", _spine_Event_getData, nullptr); - oluacls_prop(L, "floatValue", _spine_Event_getFloatValue, _spine_Event_setFloatValue); - oluacls_prop(L, "intValue", _spine_Event_getIntValue, _spine_Event_setIntValue); - oluacls_prop(L, "stringValue", _spine_Event_getStringValue, _spine_Event_setStringValue); - oluacls_prop(L, "time", _spine_Event_getTime, nullptr); - oluacls_prop(L, "volume", _spine_Event_getVolume, _spine_Event_setVolume); + oluacls_func(L, "getBalance", _olua_fun_spine_Event_getBalance); + oluacls_func(L, "getData", _olua_fun_spine_Event_getData); + oluacls_func(L, "getFloatValue", _olua_fun_spine_Event_getFloatValue); + oluacls_func(L, "getIntValue", _olua_fun_spine_Event_getIntValue); + oluacls_func(L, "getStringValue", _olua_fun_spine_Event_getStringValue); + oluacls_func(L, "getTime", _olua_fun_spine_Event_getTime); + oluacls_func(L, "getVolume", _olua_fun_spine_Event_getVolume); + oluacls_func(L, "setBalance", _olua_fun_spine_Event_setBalance); + oluacls_func(L, "setFloatValue", _olua_fun_spine_Event_setFloatValue); + oluacls_func(L, "setIntValue", _olua_fun_spine_Event_setIntValue); + oluacls_func(L, "setStringValue", _olua_fun_spine_Event_setStringValue); + oluacls_func(L, "setVolume", _olua_fun_spine_Event_setVolume); + oluacls_prop(L, "balance", _olua_fun_spine_Event_getBalance, _olua_fun_spine_Event_setBalance); + oluacls_prop(L, "data", _olua_fun_spine_Event_getData, nullptr); + oluacls_prop(L, "floatValue", _olua_fun_spine_Event_getFloatValue, _olua_fun_spine_Event_setFloatValue); + oluacls_prop(L, "intValue", _olua_fun_spine_Event_getIntValue, _olua_fun_spine_Event_setIntValue); + oluacls_prop(L, "stringValue", _olua_fun_spine_Event_getStringValue, _olua_fun_spine_Event_setStringValue); + oluacls_prop(L, "time", _olua_fun_spine_Event_getTime, nullptr); + oluacls_prop(L, "volume", _olua_fun_spine_Event_getVolume, _olua_fun_spine_Event_setVolume); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_spine_Event(lua_State *L) +{ + olua_require(L, "spine", luaopen_spine); + if (!olua_getclass(L, "spine.Event")) { + luaL_error(L, "class not found: spine::Event"); + } return 1; } OLUA_END_DECLS -static int _spine_EventData_getAudioPath(lua_State *L) +static int _olua_fun_spine_EventData_getAudioPath(lua_State *L) { olua_startinvoke(L); @@ -447,7 +555,7 @@ static int _spine_EventData_getAudioPath(lua_State *L) return num_ret; } -static int _spine_EventData_getBalance(lua_State *L) +static int _olua_fun_spine_EventData_getBalance(lua_State *L) { olua_startinvoke(L); @@ -464,7 +572,7 @@ static int _spine_EventData_getBalance(lua_State *L) return num_ret; } -static int _spine_EventData_getFloatValue(lua_State *L) +static int _olua_fun_spine_EventData_getFloatValue(lua_State *L) { olua_startinvoke(L); @@ -481,7 +589,7 @@ static int _spine_EventData_getFloatValue(lua_State *L) return num_ret; } -static int _spine_EventData_getIntValue(lua_State *L) +static int _olua_fun_spine_EventData_getIntValue(lua_State *L) { olua_startinvoke(L); @@ -498,7 +606,7 @@ static int _spine_EventData_getIntValue(lua_State *L) return num_ret; } -static int _spine_EventData_getName(lua_State *L) +static int _olua_fun_spine_EventData_getName(lua_State *L) { olua_startinvoke(L); @@ -515,7 +623,7 @@ static int _spine_EventData_getName(lua_State *L) return num_ret; } -static int _spine_EventData_getStringValue(lua_State *L) +static int _olua_fun_spine_EventData_getStringValue(lua_State *L) { olua_startinvoke(L); @@ -532,7 +640,7 @@ static int _spine_EventData_getStringValue(lua_State *L) return num_ret; } -static int _spine_EventData_getVolume(lua_State *L) +static int _olua_fun_spine_EventData_getVolume(lua_State *L) { olua_startinvoke(L); @@ -549,7 +657,7 @@ static int _spine_EventData_getVolume(lua_State *L) return num_ret; } -static int _spine_EventData_new(lua_State *L) +static int _olua_fun_spine_EventData_new(lua_State *L) { olua_startinvoke(L); @@ -557,7 +665,7 @@ static int _spine_EventData_new(lua_State *L) olua_check_string(L, 1, &arg1); - // EventData(const spine::String &name) + // spine::EventData(const spine::String &name) spine::EventData *ret = new spine::EventData(arg1); int num_ret = olua_push_object(L, ret, "spine.EventData"); olua_postnew(L, ret); @@ -567,7 +675,7 @@ static int _spine_EventData_new(lua_State *L) return num_ret; } -static int _spine_EventData_setAudioPath(lua_State *L) +static int _olua_fun_spine_EventData_setAudioPath(lua_State *L) { olua_startinvoke(L); @@ -585,7 +693,7 @@ static int _spine_EventData_setAudioPath(lua_State *L) return 0; } -static int _spine_EventData_setBalance(lua_State *L) +static int _olua_fun_spine_EventData_setBalance(lua_State *L) { olua_startinvoke(L); @@ -603,7 +711,7 @@ static int _spine_EventData_setBalance(lua_State *L) return 0; } -static int _spine_EventData_setFloatValue(lua_State *L) +static int _olua_fun_spine_EventData_setFloatValue(lua_State *L) { olua_startinvoke(L); @@ -621,7 +729,7 @@ static int _spine_EventData_setFloatValue(lua_State *L) return 0; } -static int _spine_EventData_setIntValue(lua_State *L) +static int _olua_fun_spine_EventData_setIntValue(lua_State *L) { olua_startinvoke(L); @@ -639,7 +747,7 @@ static int _spine_EventData_setIntValue(lua_State *L) return 0; } -static int _spine_EventData_setStringValue(lua_State *L) +static int _olua_fun_spine_EventData_setStringValue(lua_State *L) { olua_startinvoke(L); @@ -657,7 +765,7 @@ static int _spine_EventData_setStringValue(lua_State *L) return 0; } -static int _spine_EventData_setVolume(lua_State *L) +static int _olua_fun_spine_EventData_setVolume(lua_State *L) { olua_startinvoke(L); @@ -675,37 +783,46 @@ static int _spine_EventData_setVolume(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_spine_EventData(lua_State *L) +static int _olua_cls_spine_EventData(lua_State *L) { oluacls_class(L, "spine.EventData"); - oluacls_func(L, "getAudioPath", _spine_EventData_getAudioPath); - oluacls_func(L, "getBalance", _spine_EventData_getBalance); - oluacls_func(L, "getFloatValue", _spine_EventData_getFloatValue); - oluacls_func(L, "getIntValue", _spine_EventData_getIntValue); - oluacls_func(L, "getName", _spine_EventData_getName); - oluacls_func(L, "getStringValue", _spine_EventData_getStringValue); - oluacls_func(L, "getVolume", _spine_EventData_getVolume); - oluacls_func(L, "new", _spine_EventData_new); - oluacls_func(L, "setAudioPath", _spine_EventData_setAudioPath); - oluacls_func(L, "setBalance", _spine_EventData_setBalance); - oluacls_func(L, "setFloatValue", _spine_EventData_setFloatValue); - oluacls_func(L, "setIntValue", _spine_EventData_setIntValue); - oluacls_func(L, "setStringValue", _spine_EventData_setStringValue); - oluacls_func(L, "setVolume", _spine_EventData_setVolume); - oluacls_prop(L, "audioPath", _spine_EventData_getAudioPath, _spine_EventData_setAudioPath); - oluacls_prop(L, "balance", _spine_EventData_getBalance, _spine_EventData_setBalance); - oluacls_prop(L, "floatValue", _spine_EventData_getFloatValue, _spine_EventData_setFloatValue); - oluacls_prop(L, "intValue", _spine_EventData_getIntValue, _spine_EventData_setIntValue); - oluacls_prop(L, "name", _spine_EventData_getName, nullptr); - oluacls_prop(L, "stringValue", _spine_EventData_getStringValue, _spine_EventData_setStringValue); - oluacls_prop(L, "volume", _spine_EventData_getVolume, _spine_EventData_setVolume); + oluacls_func(L, "getAudioPath", _olua_fun_spine_EventData_getAudioPath); + oluacls_func(L, "getBalance", _olua_fun_spine_EventData_getBalance); + oluacls_func(L, "getFloatValue", _olua_fun_spine_EventData_getFloatValue); + oluacls_func(L, "getIntValue", _olua_fun_spine_EventData_getIntValue); + oluacls_func(L, "getName", _olua_fun_spine_EventData_getName); + oluacls_func(L, "getStringValue", _olua_fun_spine_EventData_getStringValue); + oluacls_func(L, "getVolume", _olua_fun_spine_EventData_getVolume); + oluacls_func(L, "new", _olua_fun_spine_EventData_new); + oluacls_func(L, "setAudioPath", _olua_fun_spine_EventData_setAudioPath); + oluacls_func(L, "setBalance", _olua_fun_spine_EventData_setBalance); + oluacls_func(L, "setFloatValue", _olua_fun_spine_EventData_setFloatValue); + oluacls_func(L, "setIntValue", _olua_fun_spine_EventData_setIntValue); + oluacls_func(L, "setStringValue", _olua_fun_spine_EventData_setStringValue); + oluacls_func(L, "setVolume", _olua_fun_spine_EventData_setVolume); + oluacls_prop(L, "audioPath", _olua_fun_spine_EventData_getAudioPath, _olua_fun_spine_EventData_setAudioPath); + oluacls_prop(L, "balance", _olua_fun_spine_EventData_getBalance, _olua_fun_spine_EventData_setBalance); + oluacls_prop(L, "floatValue", _olua_fun_spine_EventData_getFloatValue, _olua_fun_spine_EventData_setFloatValue); + oluacls_prop(L, "intValue", _olua_fun_spine_EventData_getIntValue, _olua_fun_spine_EventData_setIntValue); + oluacls_prop(L, "name", _olua_fun_spine_EventData_getName, nullptr); + oluacls_prop(L, "stringValue", _olua_fun_spine_EventData_getStringValue, _olua_fun_spine_EventData_setStringValue); + oluacls_prop(L, "volume", _olua_fun_spine_EventData_getVolume, _olua_fun_spine_EventData_setVolume); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_spine_EventData(lua_State *L) +{ + olua_require(L, "spine", luaopen_spine); + if (!olua_getclass(L, "spine.EventData")) { + luaL_error(L, "class not found: spine::EventData"); + } return 1; } OLUA_END_DECLS -static int _spine_Updatable_isActive(lua_State *L) +static int _olua_fun_spine_Updatable_isActive(lua_State *L) { olua_startinvoke(L); @@ -722,7 +839,7 @@ static int _spine_Updatable_isActive(lua_State *L) return num_ret; } -static int _spine_Updatable_setActive(lua_State *L) +static int _olua_fun_spine_Updatable_setActive(lua_State *L) { olua_startinvoke(L); @@ -740,7 +857,7 @@ static int _spine_Updatable_setActive(lua_State *L) return 0; } -static int _spine_Updatable_update(lua_State *L) +static int _olua_fun_spine_Updatable_update(lua_State *L) { olua_startinvoke(L); @@ -758,20 +875,29 @@ static int _spine_Updatable_update(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_spine_Updatable(lua_State *L) +static int _olua_cls_spine_Updatable(lua_State *L) { oluacls_class(L, "spine.Updatable"); - oluacls_func(L, "isActive", _spine_Updatable_isActive); - oluacls_func(L, "setActive", _spine_Updatable_setActive); - oluacls_func(L, "update", _spine_Updatable_update); - oluacls_prop(L, "active", _spine_Updatable_isActive, _spine_Updatable_setActive); + oluacls_func(L, "isActive", _olua_fun_spine_Updatable_isActive); + oluacls_func(L, "setActive", _olua_fun_spine_Updatable_setActive); + oluacls_func(L, "update", _olua_fun_spine_Updatable_update); + oluacls_prop(L, "active", _olua_fun_spine_Updatable_isActive, _olua_fun_spine_Updatable_setActive); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_spine_Updatable(lua_State *L) +{ + olua_require(L, "spine", luaopen_spine); + if (!olua_getclass(L, "spine.Updatable")) { + luaL_error(L, "class not found: spine::Updatable"); + } return 1; } OLUA_END_DECLS -static int _spine_AnimationStateListener___call(lua_State *L) +static int _olua_fun_spine_AnimationStateListener___call(lua_State *L) { olua_startinvoke(L); @@ -783,17 +909,26 @@ static int _spine_AnimationStateListener___call(lua_State *L) return 1; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_spine_AnimationStateListener(lua_State *L) +static int _olua_cls_spine_AnimationStateListener(lua_State *L) { oluacls_class(L, "spine.AnimationStateListener"); - oluacls_func(L, "__call", _spine_AnimationStateListener___call); + oluacls_func(L, "__call", _olua_fun_spine_AnimationStateListener___call); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_spine_AnimationStateListener(lua_State *L) +{ + olua_require(L, "spine", luaopen_spine); + if (!olua_getclass(L, "spine.AnimationStateListener")) { + luaL_error(L, "class not found: spine::AnimationStateListener"); + } + return 1; +} OLUA_END_DECLS -static int _spine_AnimationState_addAnimation$1(lua_State *L) +static int _olua_fun_spine_AnimationState_addAnimation$1(lua_State *L) { olua_startinvoke(L); @@ -818,7 +953,7 @@ static int _spine_AnimationState_addAnimation$1(lua_State *L) return num_ret; } -static int _spine_AnimationState_addAnimation$2(lua_State *L) +static int _olua_fun_spine_AnimationState_addAnimation$2(lua_State *L) { olua_startinvoke(L); @@ -843,19 +978,19 @@ static int _spine_AnimationState_addAnimation$2(lua_State *L) return num_ret; } -static int _spine_AnimationState_addAnimation(lua_State *L) +static int _olua_fun_spine_AnimationState_addAnimation(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 4) { if ((olua_is_integer(L, 2)) && (olua_is_string(L, 3)) && (olua_is_bool(L, 4)) && (olua_is_number(L, 5))) { // spine::TrackEntry *addAnimation(size_t trackIndex, const spine::String &animationName, bool loop, float delay) - return _spine_AnimationState_addAnimation$1(L); + return _olua_fun_spine_AnimationState_addAnimation$1(L); } // if ((olua_is_integer(L, 2)) && (olua_is_object(L, 3, "spine.Animation")) && (olua_is_bool(L, 4)) && (olua_is_number(L, 5))) { // spine::TrackEntry *addAnimation(size_t trackIndex, spine::Animation *animation, bool loop, float delay) - return _spine_AnimationState_addAnimation$2(L); + return _olua_fun_spine_AnimationState_addAnimation$2(L); // } } @@ -864,7 +999,7 @@ static int _spine_AnimationState_addAnimation(lua_State *L) return 0; } -static int _spine_AnimationState_addEmptyAnimation(lua_State *L) +static int _olua_fun_spine_AnimationState_addEmptyAnimation(lua_State *L) { olua_startinvoke(L); @@ -887,7 +1022,7 @@ static int _spine_AnimationState_addEmptyAnimation(lua_State *L) return num_ret; } -static int _spine_AnimationState_apply(lua_State *L) +static int _olua_fun_spine_AnimationState_apply(lua_State *L) { olua_startinvoke(L); @@ -906,7 +1041,7 @@ static int _spine_AnimationState_apply(lua_State *L) return num_ret; } -static int _spine_AnimationState_clearTrack(lua_State *L) +static int _olua_fun_spine_AnimationState_clearTrack(lua_State *L) { olua_startinvoke(L); @@ -924,7 +1059,7 @@ static int _spine_AnimationState_clearTrack(lua_State *L) return 0; } -static int _spine_AnimationState_clearTracks(lua_State *L) +static int _olua_fun_spine_AnimationState_clearTracks(lua_State *L) { olua_startinvoke(L); @@ -940,7 +1075,7 @@ static int _spine_AnimationState_clearTracks(lua_State *L) return 0; } -static int _spine_AnimationState_disableQueue(lua_State *L) +static int _olua_fun_spine_AnimationState_disableQueue(lua_State *L) { olua_startinvoke(L); @@ -956,7 +1091,7 @@ static int _spine_AnimationState_disableQueue(lua_State *L) return 0; } -static int _spine_AnimationState_disposeTrackEntry(lua_State *L) +static int _olua_fun_spine_AnimationState_disposeTrackEntry(lua_State *L) { olua_startinvoke(L); @@ -974,7 +1109,7 @@ static int _spine_AnimationState_disposeTrackEntry(lua_State *L) return 0; } -static int _spine_AnimationState_enableQueue(lua_State *L) +static int _olua_fun_spine_AnimationState_enableQueue(lua_State *L) { olua_startinvoke(L); @@ -990,7 +1125,7 @@ static int _spine_AnimationState_enableQueue(lua_State *L) return 0; } -static int _spine_AnimationState_getCurrent(lua_State *L) +static int _olua_fun_spine_AnimationState_getCurrent(lua_State *L) { olua_startinvoke(L); @@ -1009,7 +1144,7 @@ static int _spine_AnimationState_getCurrent(lua_State *L) return num_ret; } -static int _spine_AnimationState_getData(lua_State *L) +static int _olua_fun_spine_AnimationState_getData(lua_State *L) { olua_startinvoke(L); @@ -1026,7 +1161,7 @@ static int _spine_AnimationState_getData(lua_State *L) return num_ret; } -static int _spine_AnimationState_getManualTrackEntryDisposal(lua_State *L) +static int _olua_fun_spine_AnimationState_getManualTrackEntryDisposal(lua_State *L) { olua_startinvoke(L); @@ -1043,7 +1178,7 @@ static int _spine_AnimationState_getManualTrackEntryDisposal(lua_State *L) return num_ret; } -static int _spine_AnimationState_getTimeScale(lua_State *L) +static int _olua_fun_spine_AnimationState_getTimeScale(lua_State *L) { olua_startinvoke(L); @@ -1060,7 +1195,7 @@ static int _spine_AnimationState_getTimeScale(lua_State *L) return num_ret; } -static int _spine_AnimationState_getTracks(lua_State *L) +static int _olua_fun_spine_AnimationState_getTracks(lua_State *L) { olua_startinvoke(L); @@ -1079,7 +1214,7 @@ static int _spine_AnimationState_getTracks(lua_State *L) return num_ret; } -static int _spine_AnimationState_new(lua_State *L) +static int _olua_fun_spine_AnimationState_new(lua_State *L) { olua_startinvoke(L); @@ -1087,7 +1222,7 @@ static int _spine_AnimationState_new(lua_State *L) olua_check_object(L, 1, &arg1, "spine.AnimationStateData"); - // AnimationState(spine::AnimationStateData *data) + // spine::AnimationState(spine::AnimationStateData *data) spine::AnimationState *ret = new spine::AnimationState(arg1); int num_ret = olua_push_object(L, ret, "spine.AnimationState"); olua_postnew(L, ret); @@ -1097,7 +1232,7 @@ static int _spine_AnimationState_new(lua_State *L) return num_ret; } -static int _spine_AnimationState_setAnimation$1(lua_State *L) +static int _olua_fun_spine_AnimationState_setAnimation$1(lua_State *L) { olua_startinvoke(L); @@ -1120,7 +1255,7 @@ static int _spine_AnimationState_setAnimation$1(lua_State *L) return num_ret; } -static int _spine_AnimationState_setAnimation$2(lua_State *L) +static int _olua_fun_spine_AnimationState_setAnimation$2(lua_State *L) { olua_startinvoke(L); @@ -1143,19 +1278,19 @@ static int _spine_AnimationState_setAnimation$2(lua_State *L) return num_ret; } -static int _spine_AnimationState_setAnimation(lua_State *L) +static int _olua_fun_spine_AnimationState_setAnimation(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 3) { if ((olua_is_integer(L, 2)) && (olua_is_string(L, 3)) && (olua_is_bool(L, 4))) { // spine::TrackEntry *setAnimation(size_t trackIndex, const spine::String &animationName, bool loop) - return _spine_AnimationState_setAnimation$1(L); + return _olua_fun_spine_AnimationState_setAnimation$1(L); } // if ((olua_is_integer(L, 2)) && (olua_is_object(L, 3, "spine.Animation")) && (olua_is_bool(L, 4))) { // spine::TrackEntry *setAnimation(size_t trackIndex, spine::Animation *animation, bool loop) - return _spine_AnimationState_setAnimation$2(L); + return _olua_fun_spine_AnimationState_setAnimation$2(L); // } } @@ -1164,7 +1299,7 @@ static int _spine_AnimationState_setAnimation(lua_State *L) return 0; } -static int _spine_AnimationState_setEmptyAnimation(lua_State *L) +static int _olua_fun_spine_AnimationState_setEmptyAnimation(lua_State *L) { olua_startinvoke(L); @@ -1185,7 +1320,7 @@ static int _spine_AnimationState_setEmptyAnimation(lua_State *L) return num_ret; } -static int _spine_AnimationState_setEmptyAnimations(lua_State *L) +static int _olua_fun_spine_AnimationState_setEmptyAnimations(lua_State *L) { olua_startinvoke(L); @@ -1203,7 +1338,7 @@ static int _spine_AnimationState_setEmptyAnimations(lua_State *L) return 0; } -static int _spine_AnimationState_setListener(lua_State *L) +static int _olua_fun_spine_AnimationState_setListener(lua_State *L) { olua_startinvoke(L); @@ -1215,18 +1350,19 @@ static int _spine_AnimationState_setListener(lua_State *L) void *cb_store = (void *)self; std::string cb_tag = "Listener"; - std::string cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + std::string cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](spine::AnimationState *arg1, spine::EventType arg2, spine::TrackEntry *arg3, spine::Event *arg4) { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](spine::AnimationState *cb_arg1, spine::EventType cb_arg2, spine::TrackEntry *cb_arg3, spine::Event *cb_arg4) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); if (olua_contextequal(L, cb_ctx)) { int top = lua_gettop(L); - olua_push_object(L, arg1, "spine.AnimationState"); - olua_push_enum(L, arg2); - olua_push_object(L, arg3, "spine.TrackEntry"); - olua_push_object(L, arg4, "spine.Event"); + olua_push_object(L, cb_arg1, "spine.AnimationState"); + olua_push_enum(L, cb_arg2); + olua_push_object(L, cb_arg3, "spine.TrackEntry"); + olua_push_object(L, cb_arg4, "spine.Event"); olua_callback(L, cb_store, cb_name.c_str(), 4); @@ -1242,7 +1378,7 @@ static int _spine_AnimationState_setListener(lua_State *L) return 0; } -static int _spine_AnimationState_setManualTrackEntryDisposal(lua_State *L) +static int _olua_fun_spine_AnimationState_setManualTrackEntryDisposal(lua_State *L) { olua_startinvoke(L); @@ -1260,7 +1396,7 @@ static int _spine_AnimationState_setManualTrackEntryDisposal(lua_State *L) return 0; } -static int _spine_AnimationState_setTimeScale(lua_State *L) +static int _olua_fun_spine_AnimationState_setTimeScale(lua_State *L) { olua_startinvoke(L); @@ -1278,7 +1414,7 @@ static int _spine_AnimationState_setTimeScale(lua_State *L) return 0; } -static int _spine_AnimationState_update(lua_State *L) +static int _olua_fun_spine_AnimationState_update(lua_State *L) { olua_startinvoke(L); @@ -1296,41 +1432,50 @@ static int _spine_AnimationState_update(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_spine_AnimationState(lua_State *L) +static int _olua_cls_spine_AnimationState(lua_State *L) { oluacls_class(L, "spine.AnimationState"); - oluacls_func(L, "addAnimation", _spine_AnimationState_addAnimation); - oluacls_func(L, "addEmptyAnimation", _spine_AnimationState_addEmptyAnimation); - oluacls_func(L, "apply", _spine_AnimationState_apply); - oluacls_func(L, "clearTrack", _spine_AnimationState_clearTrack); - oluacls_func(L, "clearTracks", _spine_AnimationState_clearTracks); - oluacls_func(L, "disableQueue", _spine_AnimationState_disableQueue); - oluacls_func(L, "disposeTrackEntry", _spine_AnimationState_disposeTrackEntry); - oluacls_func(L, "enableQueue", _spine_AnimationState_enableQueue); - oluacls_func(L, "getCurrent", _spine_AnimationState_getCurrent); - oluacls_func(L, "getData", _spine_AnimationState_getData); - oluacls_func(L, "getManualTrackEntryDisposal", _spine_AnimationState_getManualTrackEntryDisposal); - oluacls_func(L, "getTimeScale", _spine_AnimationState_getTimeScale); - oluacls_func(L, "getTracks", _spine_AnimationState_getTracks); - oluacls_func(L, "new", _spine_AnimationState_new); - oluacls_func(L, "setAnimation", _spine_AnimationState_setAnimation); - oluacls_func(L, "setEmptyAnimation", _spine_AnimationState_setEmptyAnimation); - oluacls_func(L, "setEmptyAnimations", _spine_AnimationState_setEmptyAnimations); - oluacls_func(L, "setListener", _spine_AnimationState_setListener); - oluacls_func(L, "setManualTrackEntryDisposal", _spine_AnimationState_setManualTrackEntryDisposal); - oluacls_func(L, "setTimeScale", _spine_AnimationState_setTimeScale); - oluacls_func(L, "update", _spine_AnimationState_update); - oluacls_prop(L, "data", _spine_AnimationState_getData, nullptr); - oluacls_prop(L, "manualTrackEntryDisposal", _spine_AnimationState_getManualTrackEntryDisposal, _spine_AnimationState_setManualTrackEntryDisposal); - oluacls_prop(L, "timeScale", _spine_AnimationState_getTimeScale, _spine_AnimationState_setTimeScale); - oluacls_prop(L, "tracks", _spine_AnimationState_getTracks, nullptr); + oluacls_func(L, "addAnimation", _olua_fun_spine_AnimationState_addAnimation); + oluacls_func(L, "addEmptyAnimation", _olua_fun_spine_AnimationState_addEmptyAnimation); + oluacls_func(L, "apply", _olua_fun_spine_AnimationState_apply); + oluacls_func(L, "clearTrack", _olua_fun_spine_AnimationState_clearTrack); + oluacls_func(L, "clearTracks", _olua_fun_spine_AnimationState_clearTracks); + oluacls_func(L, "disableQueue", _olua_fun_spine_AnimationState_disableQueue); + oluacls_func(L, "disposeTrackEntry", _olua_fun_spine_AnimationState_disposeTrackEntry); + oluacls_func(L, "enableQueue", _olua_fun_spine_AnimationState_enableQueue); + oluacls_func(L, "getCurrent", _olua_fun_spine_AnimationState_getCurrent); + oluacls_func(L, "getData", _olua_fun_spine_AnimationState_getData); + oluacls_func(L, "getManualTrackEntryDisposal", _olua_fun_spine_AnimationState_getManualTrackEntryDisposal); + oluacls_func(L, "getTimeScale", _olua_fun_spine_AnimationState_getTimeScale); + oluacls_func(L, "getTracks", _olua_fun_spine_AnimationState_getTracks); + oluacls_func(L, "new", _olua_fun_spine_AnimationState_new); + oluacls_func(L, "setAnimation", _olua_fun_spine_AnimationState_setAnimation); + oluacls_func(L, "setEmptyAnimation", _olua_fun_spine_AnimationState_setEmptyAnimation); + oluacls_func(L, "setEmptyAnimations", _olua_fun_spine_AnimationState_setEmptyAnimations); + oluacls_func(L, "setListener", _olua_fun_spine_AnimationState_setListener); + oluacls_func(L, "setManualTrackEntryDisposal", _olua_fun_spine_AnimationState_setManualTrackEntryDisposal); + oluacls_func(L, "setTimeScale", _olua_fun_spine_AnimationState_setTimeScale); + oluacls_func(L, "update", _olua_fun_spine_AnimationState_update); + oluacls_prop(L, "data", _olua_fun_spine_AnimationState_getData, nullptr); + oluacls_prop(L, "manualTrackEntryDisposal", _olua_fun_spine_AnimationState_getManualTrackEntryDisposal, _olua_fun_spine_AnimationState_setManualTrackEntryDisposal); + oluacls_prop(L, "timeScale", _olua_fun_spine_AnimationState_getTimeScale, _olua_fun_spine_AnimationState_setTimeScale); + oluacls_prop(L, "tracks", _olua_fun_spine_AnimationState_getTracks, nullptr); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_spine_AnimationState(lua_State *L) +{ + olua_require(L, "spine", luaopen_spine); + if (!olua_getclass(L, "spine.AnimationState")) { + luaL_error(L, "class not found: spine::AnimationState"); + } return 1; } OLUA_END_DECLS -static int _spine_AnimationStateData_clear(lua_State *L) +static int _olua_fun_spine_AnimationStateData_clear(lua_State *L) { olua_startinvoke(L); @@ -1346,7 +1491,7 @@ static int _spine_AnimationStateData_clear(lua_State *L) return 0; } -static int _spine_AnimationStateData_getDefaultMix(lua_State *L) +static int _olua_fun_spine_AnimationStateData_getDefaultMix(lua_State *L) { olua_startinvoke(L); @@ -1363,7 +1508,7 @@ static int _spine_AnimationStateData_getDefaultMix(lua_State *L) return num_ret; } -static int _spine_AnimationStateData_getMix(lua_State *L) +static int _olua_fun_spine_AnimationStateData_getMix(lua_State *L) { olua_startinvoke(L); @@ -1384,7 +1529,7 @@ static int _spine_AnimationStateData_getMix(lua_State *L) return num_ret; } -static int _spine_AnimationStateData_getSkeletonData(lua_State *L) +static int _olua_fun_spine_AnimationStateData_getSkeletonData(lua_State *L) { olua_startinvoke(L); @@ -1401,7 +1546,7 @@ static int _spine_AnimationStateData_getSkeletonData(lua_State *L) return num_ret; } -static int _spine_AnimationStateData_new(lua_State *L) +static int _olua_fun_spine_AnimationStateData_new(lua_State *L) { olua_startinvoke(L); @@ -1409,7 +1554,7 @@ static int _spine_AnimationStateData_new(lua_State *L) olua_check_object(L, 1, &arg1, "spine.SkeletonData"); - // AnimationStateData(spine::SkeletonData *skeletonData) + // spine::AnimationStateData(spine::SkeletonData *skeletonData) spine::AnimationStateData *ret = new spine::AnimationStateData(arg1); int num_ret = olua_push_object(L, ret, "spine.AnimationStateData"); olua_postnew(L, ret); @@ -1419,7 +1564,7 @@ static int _spine_AnimationStateData_new(lua_State *L) return num_ret; } -static int _spine_AnimationStateData_setDefaultMix(lua_State *L) +static int _olua_fun_spine_AnimationStateData_setDefaultMix(lua_State *L) { olua_startinvoke(L); @@ -1437,7 +1582,7 @@ static int _spine_AnimationStateData_setDefaultMix(lua_State *L) return 0; } -static int _spine_AnimationStateData_setMix$1(lua_State *L) +static int _olua_fun_spine_AnimationStateData_setMix$1(lua_State *L) { olua_startinvoke(L); @@ -1459,7 +1604,7 @@ static int _spine_AnimationStateData_setMix$1(lua_State *L) return 0; } -static int _spine_AnimationStateData_setMix$2(lua_State *L) +static int _olua_fun_spine_AnimationStateData_setMix$2(lua_State *L) { olua_startinvoke(L); @@ -1481,19 +1626,19 @@ static int _spine_AnimationStateData_setMix$2(lua_State *L) return 0; } -static int _spine_AnimationStateData_setMix(lua_State *L) +static int _olua_fun_spine_AnimationStateData_setMix(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 3) { if ((olua_is_string(L, 2)) && (olua_is_string(L, 3)) && (olua_is_number(L, 4))) { // void setMix(const spine::String &fromName, const spine::String &toName, float duration) - return _spine_AnimationStateData_setMix$1(L); + return _olua_fun_spine_AnimationStateData_setMix$1(L); } // if ((olua_is_object(L, 2, "spine.Animation")) && (olua_is_object(L, 3, "spine.Animation")) && (olua_is_number(L, 4))) { // void setMix(spine::Animation *from, spine::Animation *to, float duration) - return _spine_AnimationStateData_setMix$2(L); + return _olua_fun_spine_AnimationStateData_setMix$2(L); // } } @@ -1502,25 +1647,34 @@ static int _spine_AnimationStateData_setMix(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_spine_AnimationStateData(lua_State *L) +static int _olua_cls_spine_AnimationStateData(lua_State *L) { oluacls_class(L, "spine.AnimationStateData"); - oluacls_func(L, "clear", _spine_AnimationStateData_clear); - oluacls_func(L, "getDefaultMix", _spine_AnimationStateData_getDefaultMix); - oluacls_func(L, "getMix", _spine_AnimationStateData_getMix); - oluacls_func(L, "getSkeletonData", _spine_AnimationStateData_getSkeletonData); - oluacls_func(L, "new", _spine_AnimationStateData_new); - oluacls_func(L, "setDefaultMix", _spine_AnimationStateData_setDefaultMix); - oluacls_func(L, "setMix", _spine_AnimationStateData_setMix); - oluacls_prop(L, "defaultMix", _spine_AnimationStateData_getDefaultMix, _spine_AnimationStateData_setDefaultMix); - oluacls_prop(L, "skeletonData", _spine_AnimationStateData_getSkeletonData, nullptr); + oluacls_func(L, "clear", _olua_fun_spine_AnimationStateData_clear); + oluacls_func(L, "getDefaultMix", _olua_fun_spine_AnimationStateData_getDefaultMix); + oluacls_func(L, "getMix", _olua_fun_spine_AnimationStateData_getMix); + oluacls_func(L, "getSkeletonData", _olua_fun_spine_AnimationStateData_getSkeletonData); + oluacls_func(L, "new", _olua_fun_spine_AnimationStateData_new); + oluacls_func(L, "setDefaultMix", _olua_fun_spine_AnimationStateData_setDefaultMix); + oluacls_func(L, "setMix", _olua_fun_spine_AnimationStateData_setMix); + oluacls_prop(L, "defaultMix", _olua_fun_spine_AnimationStateData_getDefaultMix, _olua_fun_spine_AnimationStateData_setDefaultMix); + oluacls_prop(L, "skeletonData", _olua_fun_spine_AnimationStateData_getSkeletonData, nullptr); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_spine_AnimationStateData(lua_State *L) +{ + olua_require(L, "spine", luaopen_spine); + if (!olua_getclass(L, "spine.AnimationStateData")) { + luaL_error(L, "class not found: spine::AnimationStateData"); + } return 1; } OLUA_END_DECLS -static int _spine_Animation_getDuration(lua_State *L) +static int _olua_fun_spine_Animation_getDuration(lua_State *L) { olua_startinvoke(L); @@ -1537,7 +1691,7 @@ static int _spine_Animation_getDuration(lua_State *L) return num_ret; } -static int _spine_Animation_getName(lua_State *L) +static int _olua_fun_spine_Animation_getName(lua_State *L) { olua_startinvoke(L); @@ -1554,7 +1708,7 @@ static int _spine_Animation_getName(lua_State *L) return num_ret; } -static int _spine_Animation_getTimelines(lua_State *L) +static int _olua_fun_spine_Animation_getTimelines(lua_State *L) { olua_startinvoke(L); @@ -1573,7 +1727,7 @@ static int _spine_Animation_getTimelines(lua_State *L) return num_ret; } -static int _spine_Animation_hasTimeline(lua_State *L) +static int _olua_fun_spine_Animation_hasTimeline(lua_State *L) { olua_startinvoke(L); @@ -1594,7 +1748,7 @@ static int _spine_Animation_hasTimeline(lua_State *L) return num_ret; } -static int _spine_Animation_new(lua_State *L) +static int _olua_fun_spine_Animation_new(lua_State *L) { olua_startinvoke(L); @@ -1608,7 +1762,7 @@ static int _spine_Animation_new(lua_State *L) }); olua_check_number(L, 3, &arg3); - // Animation(const spine::String &name, spine::Vector &timelines, float duration) + // spine::Animation(const spine::String &name, spine::Vector &timelines, float duration) spine::Animation *ret = new spine::Animation(arg1, arg2, arg3); int num_ret = olua_push_object(L, ret, "spine.Animation"); olua_postnew(L, ret); @@ -1618,7 +1772,7 @@ static int _spine_Animation_new(lua_State *L) return num_ret; } -static int _spine_Animation_search$1(lua_State *L) +static int _olua_fun_spine_Animation_search$1(lua_State *L) { olua_startinvoke(L); @@ -1639,7 +1793,7 @@ static int _spine_Animation_search$1(lua_State *L) return num_ret; } -static int _spine_Animation_search$2(lua_State *L) +static int _olua_fun_spine_Animation_search$2(lua_State *L) { olua_startinvoke(L); @@ -1662,21 +1816,21 @@ static int _spine_Animation_search$2(lua_State *L) return num_ret; } -static int _spine_Animation_search(lua_State *L) +static int _olua_fun_spine_Animation_search(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 2) { // if ((olua_is_array(L, 1)) && (olua_is_number(L, 2))) { // static int search(spine::Vector &values, float target) - return _spine_Animation_search$1(L); + return _olua_fun_spine_Animation_search$1(L); // } } if (num_args == 3) { // if ((olua_is_array(L, 1)) && (olua_is_number(L, 2)) && (olua_is_integer(L, 3))) { // static int search(spine::Vector &values, float target, int step) - return _spine_Animation_search$2(L); + return _olua_fun_spine_Animation_search$2(L); // } } @@ -1685,7 +1839,7 @@ static int _spine_Animation_search(lua_State *L) return 0; } -static int _spine_Animation_setDuration(lua_State *L) +static int _olua_fun_spine_Animation_setDuration(lua_State *L) { olua_startinvoke(L); @@ -1703,26 +1857,35 @@ static int _spine_Animation_setDuration(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_spine_Animation(lua_State *L) +static int _olua_cls_spine_Animation(lua_State *L) { oluacls_class(L, "spine.Animation"); - oluacls_func(L, "getDuration", _spine_Animation_getDuration); - oluacls_func(L, "getName", _spine_Animation_getName); - oluacls_func(L, "getTimelines", _spine_Animation_getTimelines); - oluacls_func(L, "hasTimeline", _spine_Animation_hasTimeline); - oluacls_func(L, "new", _spine_Animation_new); - oluacls_func(L, "search", _spine_Animation_search); - oluacls_func(L, "setDuration", _spine_Animation_setDuration); - oluacls_prop(L, "duration", _spine_Animation_getDuration, _spine_Animation_setDuration); - oluacls_prop(L, "name", _spine_Animation_getName, nullptr); - oluacls_prop(L, "timelines", _spine_Animation_getTimelines, nullptr); + oluacls_func(L, "getDuration", _olua_fun_spine_Animation_getDuration); + oluacls_func(L, "getName", _olua_fun_spine_Animation_getName); + oluacls_func(L, "getTimelines", _olua_fun_spine_Animation_getTimelines); + oluacls_func(L, "hasTimeline", _olua_fun_spine_Animation_hasTimeline); + oluacls_func(L, "new", _olua_fun_spine_Animation_new); + oluacls_func(L, "search", _olua_fun_spine_Animation_search); + oluacls_func(L, "setDuration", _olua_fun_spine_Animation_setDuration); + oluacls_prop(L, "duration", _olua_fun_spine_Animation_getDuration, _olua_fun_spine_Animation_setDuration); + oluacls_prop(L, "name", _olua_fun_spine_Animation_getName, nullptr); + oluacls_prop(L, "timelines", _olua_fun_spine_Animation_getTimelines, nullptr); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_spine_Animation(lua_State *L) +{ + olua_require(L, "spine", luaopen_spine); + if (!olua_getclass(L, "spine.Animation")) { + luaL_error(L, "class not found: spine::Animation"); + } return 1; } OLUA_END_DECLS -static int _spine_Sequence_apply(lua_State *L) +static int _olua_fun_spine_Sequence_apply(lua_State *L) { olua_startinvoke(L); @@ -1742,7 +1905,7 @@ static int _spine_Sequence_apply(lua_State *L) return 0; } -static int _spine_Sequence_copy(lua_State *L) +static int _olua_fun_spine_Sequence_copy(lua_State *L) { olua_startinvoke(L); @@ -1759,7 +1922,7 @@ static int _spine_Sequence_copy(lua_State *L) return num_ret; } -static int _spine_Sequence_getDigits(lua_State *L) +static int _olua_fun_spine_Sequence_getDigits(lua_State *L) { olua_startinvoke(L); @@ -1776,7 +1939,7 @@ static int _spine_Sequence_getDigits(lua_State *L) return num_ret; } -static int _spine_Sequence_getId(lua_State *L) +static int _olua_fun_spine_Sequence_getId(lua_State *L) { olua_startinvoke(L); @@ -1793,7 +1956,7 @@ static int _spine_Sequence_getId(lua_State *L) return num_ret; } -static int _spine_Sequence_getPath(lua_State *L) +static int _olua_fun_spine_Sequence_getPath(lua_State *L) { olua_startinvoke(L); @@ -1814,7 +1977,7 @@ static int _spine_Sequence_getPath(lua_State *L) return num_ret; } -static int _spine_Sequence_getRegions(lua_State *L) +static int _olua_fun_spine_Sequence_getRegions(lua_State *L) { olua_startinvoke(L); @@ -1833,7 +1996,7 @@ static int _spine_Sequence_getRegions(lua_State *L) return num_ret; } -static int _spine_Sequence_getSetupIndex(lua_State *L) +static int _olua_fun_spine_Sequence_getSetupIndex(lua_State *L) { olua_startinvoke(L); @@ -1850,7 +2013,7 @@ static int _spine_Sequence_getSetupIndex(lua_State *L) return num_ret; } -static int _spine_Sequence_getStart(lua_State *L) +static int _olua_fun_spine_Sequence_getStart(lua_State *L) { olua_startinvoke(L); @@ -1867,7 +2030,7 @@ static int _spine_Sequence_getStart(lua_State *L) return num_ret; } -static int _spine_Sequence_new(lua_State *L) +static int _olua_fun_spine_Sequence_new(lua_State *L) { olua_startinvoke(L); @@ -1875,7 +2038,7 @@ static int _spine_Sequence_new(lua_State *L) olua_check_integer(L, 1, &arg1); - // Sequence(int count) + // spine::Sequence(int count) spine::Sequence *ret = new spine::Sequence(arg1); int num_ret = olua_push_object(L, ret, "spine.Sequence"); olua_postnew(L, ret); @@ -1885,7 +2048,7 @@ static int _spine_Sequence_new(lua_State *L) return num_ret; } -static int _spine_Sequence_setDigits(lua_State *L) +static int _olua_fun_spine_Sequence_setDigits(lua_State *L) { olua_startinvoke(L); @@ -1903,7 +2066,7 @@ static int _spine_Sequence_setDigits(lua_State *L) return 0; } -static int _spine_Sequence_setId(lua_State *L) +static int _olua_fun_spine_Sequence_setId(lua_State *L) { olua_startinvoke(L); @@ -1921,7 +2084,7 @@ static int _spine_Sequence_setId(lua_State *L) return 0; } -static int _spine_Sequence_setSetupIndex(lua_State *L) +static int _olua_fun_spine_Sequence_setSetupIndex(lua_State *L) { olua_startinvoke(L); @@ -1939,7 +2102,7 @@ static int _spine_Sequence_setSetupIndex(lua_State *L) return 0; } -static int _spine_Sequence_setStart(lua_State *L) +static int _olua_fun_spine_Sequence_setStart(lua_State *L) { olua_startinvoke(L); @@ -1957,35 +2120,43 @@ static int _spine_Sequence_setStart(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_spine_Sequence(lua_State *L) +static int _olua_cls_spine_Sequence(lua_State *L) { oluacls_class(L, "spine.Sequence"); - oluacls_func(L, "apply", _spine_Sequence_apply); - oluacls_func(L, "copy", _spine_Sequence_copy); - oluacls_func(L, "getDigits", _spine_Sequence_getDigits); - oluacls_func(L, "getId", _spine_Sequence_getId); - oluacls_func(L, "getPath", _spine_Sequence_getPath); - oluacls_func(L, "getRegions", _spine_Sequence_getRegions); - oluacls_func(L, "getSetupIndex", _spine_Sequence_getSetupIndex); - oluacls_func(L, "getStart", _spine_Sequence_getStart); - oluacls_func(L, "new", _spine_Sequence_new); - oluacls_func(L, "setDigits", _spine_Sequence_setDigits); - oluacls_func(L, "setId", _spine_Sequence_setId); - oluacls_func(L, "setSetupIndex", _spine_Sequence_setSetupIndex); - oluacls_func(L, "setStart", _spine_Sequence_setStart); - oluacls_prop(L, "digits", _spine_Sequence_getDigits, _spine_Sequence_setDigits); - oluacls_prop(L, "id", _spine_Sequence_getId, _spine_Sequence_setId); - oluacls_prop(L, "regions", _spine_Sequence_getRegions, nullptr); - oluacls_prop(L, "setupIndex", _spine_Sequence_getSetupIndex, _spine_Sequence_setSetupIndex); - oluacls_prop(L, "start", _spine_Sequence_getStart, _spine_Sequence_setStart); + oluacls_func(L, "apply", _olua_fun_spine_Sequence_apply); + oluacls_func(L, "copy", _olua_fun_spine_Sequence_copy); + oluacls_func(L, "getDigits", _olua_fun_spine_Sequence_getDigits); + oluacls_func(L, "getId", _olua_fun_spine_Sequence_getId); + oluacls_func(L, "getPath", _olua_fun_spine_Sequence_getPath); + oluacls_func(L, "getRegions", _olua_fun_spine_Sequence_getRegions); + oluacls_func(L, "getSetupIndex", _olua_fun_spine_Sequence_getSetupIndex); + oluacls_func(L, "getStart", _olua_fun_spine_Sequence_getStart); + oluacls_func(L, "new", _olua_fun_spine_Sequence_new); + oluacls_func(L, "setDigits", _olua_fun_spine_Sequence_setDigits); + oluacls_func(L, "setId", _olua_fun_spine_Sequence_setId); + oluacls_func(L, "setSetupIndex", _olua_fun_spine_Sequence_setSetupIndex); + oluacls_func(L, "setStart", _olua_fun_spine_Sequence_setStart); + oluacls_prop(L, "digits", _olua_fun_spine_Sequence_getDigits, _olua_fun_spine_Sequence_setDigits); + oluacls_prop(L, "id", _olua_fun_spine_Sequence_getId, _olua_fun_spine_Sequence_setId); + oluacls_prop(L, "regions", _olua_fun_spine_Sequence_getRegions, nullptr); + oluacls_prop(L, "setupIndex", _olua_fun_spine_Sequence_getSetupIndex, _olua_fun_spine_Sequence_setSetupIndex); + oluacls_prop(L, "start", _olua_fun_spine_Sequence_getStart, _olua_fun_spine_Sequence_setStart); return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_spine_SequenceMode(lua_State *L) +OLUA_LIB int luaopen_spine_Sequence(lua_State *L) +{ + olua_require(L, "spine", luaopen_spine); + if (!olua_getclass(L, "spine.Sequence")) { + luaL_error(L, "class not found: spine::Sequence"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_spine_SequenceMode(lua_State *L) { oluacls_class(L, "spine.SequenceMode"); oluacls_func(L, "__index", olua_indexerror); @@ -2000,23 +2171,19 @@ OLUA_LIB int luaopen_spine_SequenceMode(lua_State *L) return 1; } -OLUA_END_DECLS -static int _spine_TextureRegion_new(lua_State *L) +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_spine_SequenceMode(lua_State *L) { - olua_startinvoke(L); - - // TextureRegion() - spine::TextureRegion *ret = new spine::TextureRegion(); - int num_ret = olua_push_object(L, ret, "spine.TextureRegion"); - olua_postnew(L, ret); - - olua_endinvoke(L); - - return num_ret; + olua_require(L, "spine", luaopen_spine); + if (!olua_getclass(L, "spine.SequenceMode")) { + luaL_error(L, "class not found: spine::SequenceMode"); + } + return 1; } +OLUA_END_DECLS -static int _spine_TextureRegion_get_degrees(lua_State *L) +static int _olua_fun_spine_TextureRegion_degrees$1(lua_State *L) { olua_startinvoke(L); @@ -2033,7 +2200,7 @@ static int _spine_TextureRegion_get_degrees(lua_State *L) return num_ret; } -static int _spine_TextureRegion_set_degrees(lua_State *L) +static int _olua_fun_spine_TextureRegion_degrees$2(lua_State *L) { olua_startinvoke(L); @@ -2051,7 +2218,28 @@ static int _spine_TextureRegion_set_degrees(lua_State *L) return 0; } -static int _spine_TextureRegion_get_height(lua_State *L) +static int _olua_fun_spine_TextureRegion_degrees(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // int degrees + return _olua_fun_spine_TextureRegion_degrees$1(L); + } + + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // int degrees + return _olua_fun_spine_TextureRegion_degrees$2(L); + // } + } + + luaL_error(L, "method 'spine::TextureRegion::degrees' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_spine_TextureRegion_height$1(lua_State *L) { olua_startinvoke(L); @@ -2068,7 +2256,7 @@ static int _spine_TextureRegion_get_height(lua_State *L) return num_ret; } -static int _spine_TextureRegion_set_height(lua_State *L) +static int _olua_fun_spine_TextureRegion_height$2(lua_State *L) { olua_startinvoke(L); @@ -2086,7 +2274,42 @@ static int _spine_TextureRegion_set_height(lua_State *L) return 0; } -static int _spine_TextureRegion_get_offsetX(lua_State *L) +static int _olua_fun_spine_TextureRegion_height(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // int height + return _olua_fun_spine_TextureRegion_height$1(L); + } + + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // int height + return _olua_fun_spine_TextureRegion_height$2(L); + // } + } + + luaL_error(L, "method 'spine::TextureRegion::height' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_spine_TextureRegion_new(lua_State *L) +{ + olua_startinvoke(L); + + // spine::TextureRegion() + spine::TextureRegion *ret = new spine::TextureRegion(); + int num_ret = olua_push_object(L, ret, "spine.TextureRegion"); + olua_postnew(L, ret); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_spine_TextureRegion_offsetX$1(lua_State *L) { olua_startinvoke(L); @@ -2103,7 +2326,7 @@ static int _spine_TextureRegion_get_offsetX(lua_State *L) return num_ret; } -static int _spine_TextureRegion_set_offsetX(lua_State *L) +static int _olua_fun_spine_TextureRegion_offsetX$2(lua_State *L) { olua_startinvoke(L); @@ -2121,7 +2344,28 @@ static int _spine_TextureRegion_set_offsetX(lua_State *L) return 0; } -static int _spine_TextureRegion_get_offsetY(lua_State *L) +static int _olua_fun_spine_TextureRegion_offsetX(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float offsetX + return _olua_fun_spine_TextureRegion_offsetX$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float offsetX + return _olua_fun_spine_TextureRegion_offsetX$2(L); + // } + } + + luaL_error(L, "method 'spine::TextureRegion::offsetX' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_spine_TextureRegion_offsetY$1(lua_State *L) { olua_startinvoke(L); @@ -2138,7 +2382,7 @@ static int _spine_TextureRegion_get_offsetY(lua_State *L) return num_ret; } -static int _spine_TextureRegion_set_offsetY(lua_State *L) +static int _olua_fun_spine_TextureRegion_offsetY$2(lua_State *L) { olua_startinvoke(L); @@ -2156,15 +2400,36 @@ static int _spine_TextureRegion_set_offsetY(lua_State *L) return 0; } -static int _spine_TextureRegion_get_originalHeight(lua_State *L) +static int _olua_fun_spine_TextureRegion_offsetY(lua_State *L) { - olua_startinvoke(L); + int num_args = lua_gettop(L) - 1; - spine::TextureRegion *self = nullptr; + if (num_args == 0) { + // float offsetY + return _olua_fun_spine_TextureRegion_offsetY$1(L); + } - olua_to_object(L, 1, &self, "spine.TextureRegion"); + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float offsetY + return _olua_fun_spine_TextureRegion_offsetY$2(L); + // } + } - // int originalHeight + luaL_error(L, "method 'spine::TextureRegion::offsetY' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_spine_TextureRegion_originalHeight$1(lua_State *L) +{ + olua_startinvoke(L); + + spine::TextureRegion *self = nullptr; + + olua_to_object(L, 1, &self, "spine.TextureRegion"); + + // int originalHeight int ret = self->originalHeight; int num_ret = olua_push_integer(L, ret); @@ -2173,7 +2438,7 @@ static int _spine_TextureRegion_get_originalHeight(lua_State *L) return num_ret; } -static int _spine_TextureRegion_set_originalHeight(lua_State *L) +static int _olua_fun_spine_TextureRegion_originalHeight$2(lua_State *L) { olua_startinvoke(L); @@ -2191,7 +2456,28 @@ static int _spine_TextureRegion_set_originalHeight(lua_State *L) return 0; } -static int _spine_TextureRegion_get_originalWidth(lua_State *L) +static int _olua_fun_spine_TextureRegion_originalHeight(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // int originalHeight + return _olua_fun_spine_TextureRegion_originalHeight$1(L); + } + + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // int originalHeight + return _olua_fun_spine_TextureRegion_originalHeight$2(L); + // } + } + + luaL_error(L, "method 'spine::TextureRegion::originalHeight' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_spine_TextureRegion_originalWidth$1(lua_State *L) { olua_startinvoke(L); @@ -2208,7 +2494,7 @@ static int _spine_TextureRegion_get_originalWidth(lua_State *L) return num_ret; } -static int _spine_TextureRegion_set_originalWidth(lua_State *L) +static int _olua_fun_spine_TextureRegion_originalWidth$2(lua_State *L) { olua_startinvoke(L); @@ -2226,7 +2512,28 @@ static int _spine_TextureRegion_set_originalWidth(lua_State *L) return 0; } -static int _spine_TextureRegion_get_rendererObject(lua_State *L) +static int _olua_fun_spine_TextureRegion_originalWidth(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // int originalWidth + return _olua_fun_spine_TextureRegion_originalWidth$1(L); + } + + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // int originalWidth + return _olua_fun_spine_TextureRegion_originalWidth$2(L); + // } + } + + luaL_error(L, "method 'spine::TextureRegion::originalWidth' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_spine_TextureRegion_rendererObject$1(lua_State *L) { olua_startinvoke(L); @@ -2243,7 +2550,7 @@ static int _spine_TextureRegion_get_rendererObject(lua_State *L) return num_ret; } -static int _spine_TextureRegion_set_rendererObject(lua_State *L) +static int _olua_fun_spine_TextureRegion_rendererObject$2(lua_State *L) { olua_startinvoke(L); @@ -2261,7 +2568,28 @@ static int _spine_TextureRegion_set_rendererObject(lua_State *L) return 0; } -static int _spine_TextureRegion_get_u(lua_State *L) +static int _olua_fun_spine_TextureRegion_rendererObject(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // void *rendererObject + return _olua_fun_spine_TextureRegion_rendererObject$1(L); + } + + if (num_args == 1) { + // if ((olua_is_object(L, 2, "void *"))) { + // void *rendererObject + return _olua_fun_spine_TextureRegion_rendererObject$2(L); + // } + } + + luaL_error(L, "method 'spine::TextureRegion::rendererObject' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_spine_TextureRegion_u$1(lua_State *L) { olua_startinvoke(L); @@ -2278,7 +2606,7 @@ static int _spine_TextureRegion_get_u(lua_State *L) return num_ret; } -static int _spine_TextureRegion_set_u(lua_State *L) +static int _olua_fun_spine_TextureRegion_u$2(lua_State *L) { olua_startinvoke(L); @@ -2296,7 +2624,28 @@ static int _spine_TextureRegion_set_u(lua_State *L) return 0; } -static int _spine_TextureRegion_get_u2(lua_State *L) +static int _olua_fun_spine_TextureRegion_u(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float u + return _olua_fun_spine_TextureRegion_u$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float u + return _olua_fun_spine_TextureRegion_u$2(L); + // } + } + + luaL_error(L, "method 'spine::TextureRegion::u' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_spine_TextureRegion_u2$1(lua_State *L) { olua_startinvoke(L); @@ -2313,7 +2662,7 @@ static int _spine_TextureRegion_get_u2(lua_State *L) return num_ret; } -static int _spine_TextureRegion_set_u2(lua_State *L) +static int _olua_fun_spine_TextureRegion_u2$2(lua_State *L) { olua_startinvoke(L); @@ -2331,7 +2680,28 @@ static int _spine_TextureRegion_set_u2(lua_State *L) return 0; } -static int _spine_TextureRegion_get_v(lua_State *L) +static int _olua_fun_spine_TextureRegion_u2(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float u2 + return _olua_fun_spine_TextureRegion_u2$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float u2 + return _olua_fun_spine_TextureRegion_u2$2(L); + // } + } + + luaL_error(L, "method 'spine::TextureRegion::u2' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_spine_TextureRegion_v$1(lua_State *L) { olua_startinvoke(L); @@ -2348,7 +2718,7 @@ static int _spine_TextureRegion_get_v(lua_State *L) return num_ret; } -static int _spine_TextureRegion_set_v(lua_State *L) +static int _olua_fun_spine_TextureRegion_v$2(lua_State *L) { olua_startinvoke(L); @@ -2366,7 +2736,28 @@ static int _spine_TextureRegion_set_v(lua_State *L) return 0; } -static int _spine_TextureRegion_get_v2(lua_State *L) +static int _olua_fun_spine_TextureRegion_v(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float v + return _olua_fun_spine_TextureRegion_v$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float v + return _olua_fun_spine_TextureRegion_v$2(L); + // } + } + + luaL_error(L, "method 'spine::TextureRegion::v' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_spine_TextureRegion_v2$1(lua_State *L) { olua_startinvoke(L); @@ -2383,7 +2774,7 @@ static int _spine_TextureRegion_get_v2(lua_State *L) return num_ret; } -static int _spine_TextureRegion_set_v2(lua_State *L) +static int _olua_fun_spine_TextureRegion_v2$2(lua_State *L) { olua_startinvoke(L); @@ -2401,7 +2792,28 @@ static int _spine_TextureRegion_set_v2(lua_State *L) return 0; } -static int _spine_TextureRegion_get_width(lua_State *L) +static int _olua_fun_spine_TextureRegion_v2(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // float v2 + return _olua_fun_spine_TextureRegion_v2$1(L); + } + + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // float v2 + return _olua_fun_spine_TextureRegion_v2$2(L); + // } + } + + luaL_error(L, "method 'spine::TextureRegion::v2' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_fun_spine_TextureRegion_width$1(lua_State *L) { olua_startinvoke(L); @@ -2418,7 +2830,7 @@ static int _spine_TextureRegion_get_width(lua_State *L) return num_ret; } -static int _spine_TextureRegion_set_width(lua_State *L) +static int _olua_fun_spine_TextureRegion_width$2(lua_State *L) { olua_startinvoke(L); @@ -2436,29 +2848,59 @@ static int _spine_TextureRegion_set_width(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_spine_TextureRegion(lua_State *L) +static int _olua_fun_spine_TextureRegion_width(lua_State *L) +{ + int num_args = lua_gettop(L) - 1; + + if (num_args == 0) { + // int width + return _olua_fun_spine_TextureRegion_width$1(L); + } + + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // int width + return _olua_fun_spine_TextureRegion_width$2(L); + // } + } + + luaL_error(L, "method 'spine::TextureRegion::width' not support '%d' arguments", num_args); + + return 0; +} + +static int _olua_cls_spine_TextureRegion(lua_State *L) { oluacls_class(L, "spine.TextureRegion"); - oluacls_func(L, "new", _spine_TextureRegion_new); - oluacls_prop(L, "degrees", _spine_TextureRegion_get_degrees, _spine_TextureRegion_set_degrees); - oluacls_prop(L, "height", _spine_TextureRegion_get_height, _spine_TextureRegion_set_height); - oluacls_prop(L, "offsetX", _spine_TextureRegion_get_offsetX, _spine_TextureRegion_set_offsetX); - oluacls_prop(L, "offsetY", _spine_TextureRegion_get_offsetY, _spine_TextureRegion_set_offsetY); - oluacls_prop(L, "originalHeight", _spine_TextureRegion_get_originalHeight, _spine_TextureRegion_set_originalHeight); - oluacls_prop(L, "originalWidth", _spine_TextureRegion_get_originalWidth, _spine_TextureRegion_set_originalWidth); - oluacls_prop(L, "rendererObject", _spine_TextureRegion_get_rendererObject, _spine_TextureRegion_set_rendererObject); - oluacls_prop(L, "u", _spine_TextureRegion_get_u, _spine_TextureRegion_set_u); - oluacls_prop(L, "u2", _spine_TextureRegion_get_u2, _spine_TextureRegion_set_u2); - oluacls_prop(L, "v", _spine_TextureRegion_get_v, _spine_TextureRegion_set_v); - oluacls_prop(L, "v2", _spine_TextureRegion_get_v2, _spine_TextureRegion_set_v2); - oluacls_prop(L, "width", _spine_TextureRegion_get_width, _spine_TextureRegion_set_width); + oluacls_func(L, "new", _olua_fun_spine_TextureRegion_new); + oluacls_prop(L, "degrees", _olua_fun_spine_TextureRegion_degrees, _olua_fun_spine_TextureRegion_degrees); + oluacls_prop(L, "height", _olua_fun_spine_TextureRegion_height, _olua_fun_spine_TextureRegion_height); + oluacls_prop(L, "offsetX", _olua_fun_spine_TextureRegion_offsetX, _olua_fun_spine_TextureRegion_offsetX); + oluacls_prop(L, "offsetY", _olua_fun_spine_TextureRegion_offsetY, _olua_fun_spine_TextureRegion_offsetY); + oluacls_prop(L, "originalHeight", _olua_fun_spine_TextureRegion_originalHeight, _olua_fun_spine_TextureRegion_originalHeight); + oluacls_prop(L, "originalWidth", _olua_fun_spine_TextureRegion_originalWidth, _olua_fun_spine_TextureRegion_originalWidth); + oluacls_prop(L, "rendererObject", _olua_fun_spine_TextureRegion_rendererObject, _olua_fun_spine_TextureRegion_rendererObject); + oluacls_prop(L, "u", _olua_fun_spine_TextureRegion_u, _olua_fun_spine_TextureRegion_u); + oluacls_prop(L, "u2", _olua_fun_spine_TextureRegion_u2, _olua_fun_spine_TextureRegion_u2); + oluacls_prop(L, "v", _olua_fun_spine_TextureRegion_v, _olua_fun_spine_TextureRegion_v); + oluacls_prop(L, "v2", _olua_fun_spine_TextureRegion_v2, _olua_fun_spine_TextureRegion_v2); + oluacls_prop(L, "width", _olua_fun_spine_TextureRegion_width, _olua_fun_spine_TextureRegion_width); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_spine_TextureRegion(lua_State *L) +{ + olua_require(L, "spine", luaopen_spine); + if (!olua_getclass(L, "spine.TextureRegion")) { + luaL_error(L, "class not found: spine::TextureRegion"); + } return 1; } OLUA_END_DECLS -static int _spine_ConstraintData_getName(lua_State *L) +static int _olua_fun_spine_ConstraintData_getName(lua_State *L) { olua_startinvoke(L); @@ -2475,7 +2917,7 @@ static int _spine_ConstraintData_getName(lua_State *L) return num_ret; } -static int _spine_ConstraintData_getOrder(lua_State *L) +static int _olua_fun_spine_ConstraintData_getOrder(lua_State *L) { olua_startinvoke(L); @@ -2492,7 +2934,7 @@ static int _spine_ConstraintData_getOrder(lua_State *L) return num_ret; } -static int _spine_ConstraintData_isSkinRequired(lua_State *L) +static int _olua_fun_spine_ConstraintData_isSkinRequired(lua_State *L) { olua_startinvoke(L); @@ -2509,7 +2951,7 @@ static int _spine_ConstraintData_isSkinRequired(lua_State *L) return num_ret; } -static int _spine_ConstraintData_new(lua_State *L) +static int _olua_fun_spine_ConstraintData_new(lua_State *L) { olua_startinvoke(L); @@ -2517,7 +2959,7 @@ static int _spine_ConstraintData_new(lua_State *L) olua_check_string(L, 1, &arg1); - // ConstraintData(const spine::String &name) + // spine::ConstraintData(const spine::String &name) spine::ConstraintData *ret = new spine::ConstraintData(arg1); int num_ret = olua_push_object(L, ret, "spine.ConstraintData"); olua_postnew(L, ret); @@ -2527,7 +2969,7 @@ static int _spine_ConstraintData_new(lua_State *L) return num_ret; } -static int _spine_ConstraintData_setOrder(lua_State *L) +static int _olua_fun_spine_ConstraintData_setOrder(lua_State *L) { olua_startinvoke(L); @@ -2545,7 +2987,7 @@ static int _spine_ConstraintData_setOrder(lua_State *L) return 0; } -static int _spine_ConstraintData_setSkinRequired(lua_State *L) +static int _olua_fun_spine_ConstraintData_setSkinRequired(lua_State *L) { olua_startinvoke(L); @@ -2563,25 +3005,34 @@ static int _spine_ConstraintData_setSkinRequired(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_spine_ConstraintData(lua_State *L) +static int _olua_cls_spine_ConstraintData(lua_State *L) { oluacls_class(L, "spine.ConstraintData"); - oluacls_func(L, "getName", _spine_ConstraintData_getName); - oluacls_func(L, "getOrder", _spine_ConstraintData_getOrder); - oluacls_func(L, "isSkinRequired", _spine_ConstraintData_isSkinRequired); - oluacls_func(L, "new", _spine_ConstraintData_new); - oluacls_func(L, "setOrder", _spine_ConstraintData_setOrder); - oluacls_func(L, "setSkinRequired", _spine_ConstraintData_setSkinRequired); - oluacls_prop(L, "name", _spine_ConstraintData_getName, nullptr); - oluacls_prop(L, "order", _spine_ConstraintData_getOrder, _spine_ConstraintData_setOrder); - oluacls_prop(L, "skinRequired", _spine_ConstraintData_isSkinRequired, _spine_ConstraintData_setSkinRequired); + oluacls_func(L, "getName", _olua_fun_spine_ConstraintData_getName); + oluacls_func(L, "getOrder", _olua_fun_spine_ConstraintData_getOrder); + oluacls_func(L, "isSkinRequired", _olua_fun_spine_ConstraintData_isSkinRequired); + oluacls_func(L, "new", _olua_fun_spine_ConstraintData_new); + oluacls_func(L, "setOrder", _olua_fun_spine_ConstraintData_setOrder); + oluacls_func(L, "setSkinRequired", _olua_fun_spine_ConstraintData_setSkinRequired); + oluacls_prop(L, "name", _olua_fun_spine_ConstraintData_getName, nullptr); + oluacls_prop(L, "order", _olua_fun_spine_ConstraintData_getOrder, _olua_fun_spine_ConstraintData_setOrder); + oluacls_prop(L, "skinRequired", _olua_fun_spine_ConstraintData_isSkinRequired, _olua_fun_spine_ConstraintData_setSkinRequired); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_spine_ConstraintData(lua_State *L) +{ + olua_require(L, "spine", luaopen_spine); + if (!olua_getclass(L, "spine.ConstraintData")) { + luaL_error(L, "class not found: spine::ConstraintData"); + } return 1; } OLUA_END_DECLS -static int _spine_IkConstraintData_getBendDirection(lua_State *L) +static int _olua_fun_spine_IkConstraintData_getBendDirection(lua_State *L) { olua_startinvoke(L); @@ -2598,7 +3049,7 @@ static int _spine_IkConstraintData_getBendDirection(lua_State *L) return num_ret; } -static int _spine_IkConstraintData_getBones(lua_State *L) +static int _olua_fun_spine_IkConstraintData_getBones(lua_State *L) { olua_startinvoke(L); @@ -2617,7 +3068,7 @@ static int _spine_IkConstraintData_getBones(lua_State *L) return num_ret; } -static int _spine_IkConstraintData_getCompress(lua_State *L) +static int _olua_fun_spine_IkConstraintData_getCompress(lua_State *L) { olua_startinvoke(L); @@ -2634,7 +3085,7 @@ static int _spine_IkConstraintData_getCompress(lua_State *L) return num_ret; } -static int _spine_IkConstraintData_getMix(lua_State *L) +static int _olua_fun_spine_IkConstraintData_getMix(lua_State *L) { olua_startinvoke(L); @@ -2651,7 +3102,7 @@ static int _spine_IkConstraintData_getMix(lua_State *L) return num_ret; } -static int _spine_IkConstraintData_getSoftness(lua_State *L) +static int _olua_fun_spine_IkConstraintData_getSoftness(lua_State *L) { olua_startinvoke(L); @@ -2668,7 +3119,7 @@ static int _spine_IkConstraintData_getSoftness(lua_State *L) return num_ret; } -static int _spine_IkConstraintData_getStretch(lua_State *L) +static int _olua_fun_spine_IkConstraintData_getStretch(lua_State *L) { olua_startinvoke(L); @@ -2685,7 +3136,7 @@ static int _spine_IkConstraintData_getStretch(lua_State *L) return num_ret; } -static int _spine_IkConstraintData_getTarget(lua_State *L) +static int _olua_fun_spine_IkConstraintData_getTarget(lua_State *L) { olua_startinvoke(L); @@ -2702,7 +3153,7 @@ static int _spine_IkConstraintData_getTarget(lua_State *L) return num_ret; } -static int _spine_IkConstraintData_getUniform(lua_State *L) +static int _olua_fun_spine_IkConstraintData_getUniform(lua_State *L) { olua_startinvoke(L); @@ -2719,7 +3170,7 @@ static int _spine_IkConstraintData_getUniform(lua_State *L) return num_ret; } -static int _spine_IkConstraintData_new(lua_State *L) +static int _olua_fun_spine_IkConstraintData_new(lua_State *L) { olua_startinvoke(L); @@ -2727,7 +3178,7 @@ static int _spine_IkConstraintData_new(lua_State *L) olua_check_string(L, 1, &arg1); - // IkConstraintData(const spine::String &name) + // spine::IkConstraintData(const spine::String &name) spine::IkConstraintData *ret = new spine::IkConstraintData(arg1); int num_ret = olua_push_object(L, ret, "spine.IkConstraintData"); olua_postnew(L, ret); @@ -2737,7 +3188,7 @@ static int _spine_IkConstraintData_new(lua_State *L) return num_ret; } -static int _spine_IkConstraintData_setBendDirection(lua_State *L) +static int _olua_fun_spine_IkConstraintData_setBendDirection(lua_State *L) { olua_startinvoke(L); @@ -2755,7 +3206,7 @@ static int _spine_IkConstraintData_setBendDirection(lua_State *L) return 0; } -static int _spine_IkConstraintData_setCompress(lua_State *L) +static int _olua_fun_spine_IkConstraintData_setCompress(lua_State *L) { olua_startinvoke(L); @@ -2773,7 +3224,7 @@ static int _spine_IkConstraintData_setCompress(lua_State *L) return 0; } -static int _spine_IkConstraintData_setMix(lua_State *L) +static int _olua_fun_spine_IkConstraintData_setMix(lua_State *L) { olua_startinvoke(L); @@ -2791,7 +3242,7 @@ static int _spine_IkConstraintData_setMix(lua_State *L) return 0; } -static int _spine_IkConstraintData_setSoftness(lua_State *L) +static int _olua_fun_spine_IkConstraintData_setSoftness(lua_State *L) { olua_startinvoke(L); @@ -2809,7 +3260,7 @@ static int _spine_IkConstraintData_setSoftness(lua_State *L) return 0; } -static int _spine_IkConstraintData_setStretch(lua_State *L) +static int _olua_fun_spine_IkConstraintData_setStretch(lua_State *L) { olua_startinvoke(L); @@ -2827,7 +3278,7 @@ static int _spine_IkConstraintData_setStretch(lua_State *L) return 0; } -static int _spine_IkConstraintData_setTarget(lua_State *L) +static int _olua_fun_spine_IkConstraintData_setTarget(lua_State *L) { olua_startinvoke(L); @@ -2845,7 +3296,7 @@ static int _spine_IkConstraintData_setTarget(lua_State *L) return 0; } -static int _spine_IkConstraintData_setUniform(lua_State *L) +static int _olua_fun_spine_IkConstraintData_setUniform(lua_State *L) { olua_startinvoke(L); @@ -2863,40 +3314,49 @@ static int _spine_IkConstraintData_setUniform(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_spine_IkConstraintData(lua_State *L) +static int _olua_cls_spine_IkConstraintData(lua_State *L) { oluacls_class(L, "spine.IkConstraintData"); - oluacls_func(L, "getBendDirection", _spine_IkConstraintData_getBendDirection); - oluacls_func(L, "getBones", _spine_IkConstraintData_getBones); - oluacls_func(L, "getCompress", _spine_IkConstraintData_getCompress); - oluacls_func(L, "getMix", _spine_IkConstraintData_getMix); - oluacls_func(L, "getSoftness", _spine_IkConstraintData_getSoftness); - oluacls_func(L, "getStretch", _spine_IkConstraintData_getStretch); - oluacls_func(L, "getTarget", _spine_IkConstraintData_getTarget); - oluacls_func(L, "getUniform", _spine_IkConstraintData_getUniform); - oluacls_func(L, "new", _spine_IkConstraintData_new); - oluacls_func(L, "setBendDirection", _spine_IkConstraintData_setBendDirection); - oluacls_func(L, "setCompress", _spine_IkConstraintData_setCompress); - oluacls_func(L, "setMix", _spine_IkConstraintData_setMix); - oluacls_func(L, "setSoftness", _spine_IkConstraintData_setSoftness); - oluacls_func(L, "setStretch", _spine_IkConstraintData_setStretch); - oluacls_func(L, "setTarget", _spine_IkConstraintData_setTarget); - oluacls_func(L, "setUniform", _spine_IkConstraintData_setUniform); - oluacls_prop(L, "bendDirection", _spine_IkConstraintData_getBendDirection, _spine_IkConstraintData_setBendDirection); - oluacls_prop(L, "bones", _spine_IkConstraintData_getBones, nullptr); - oluacls_prop(L, "compress", _spine_IkConstraintData_getCompress, _spine_IkConstraintData_setCompress); - oluacls_prop(L, "mix", _spine_IkConstraintData_getMix, _spine_IkConstraintData_setMix); - oluacls_prop(L, "softness", _spine_IkConstraintData_getSoftness, _spine_IkConstraintData_setSoftness); - oluacls_prop(L, "stretch", _spine_IkConstraintData_getStretch, _spine_IkConstraintData_setStretch); - oluacls_prop(L, "target", _spine_IkConstraintData_getTarget, _spine_IkConstraintData_setTarget); - oluacls_prop(L, "uniform", _spine_IkConstraintData_getUniform, _spine_IkConstraintData_setUniform); + oluacls_func(L, "getBendDirection", _olua_fun_spine_IkConstraintData_getBendDirection); + oluacls_func(L, "getBones", _olua_fun_spine_IkConstraintData_getBones); + oluacls_func(L, "getCompress", _olua_fun_spine_IkConstraintData_getCompress); + oluacls_func(L, "getMix", _olua_fun_spine_IkConstraintData_getMix); + oluacls_func(L, "getSoftness", _olua_fun_spine_IkConstraintData_getSoftness); + oluacls_func(L, "getStretch", _olua_fun_spine_IkConstraintData_getStretch); + oluacls_func(L, "getTarget", _olua_fun_spine_IkConstraintData_getTarget); + oluacls_func(L, "getUniform", _olua_fun_spine_IkConstraintData_getUniform); + oluacls_func(L, "new", _olua_fun_spine_IkConstraintData_new); + oluacls_func(L, "setBendDirection", _olua_fun_spine_IkConstraintData_setBendDirection); + oluacls_func(L, "setCompress", _olua_fun_spine_IkConstraintData_setCompress); + oluacls_func(L, "setMix", _olua_fun_spine_IkConstraintData_setMix); + oluacls_func(L, "setSoftness", _olua_fun_spine_IkConstraintData_setSoftness); + oluacls_func(L, "setStretch", _olua_fun_spine_IkConstraintData_setStretch); + oluacls_func(L, "setTarget", _olua_fun_spine_IkConstraintData_setTarget); + oluacls_func(L, "setUniform", _olua_fun_spine_IkConstraintData_setUniform); + oluacls_prop(L, "bendDirection", _olua_fun_spine_IkConstraintData_getBendDirection, _olua_fun_spine_IkConstraintData_setBendDirection); + oluacls_prop(L, "bones", _olua_fun_spine_IkConstraintData_getBones, nullptr); + oluacls_prop(L, "compress", _olua_fun_spine_IkConstraintData_getCompress, _olua_fun_spine_IkConstraintData_setCompress); + oluacls_prop(L, "mix", _olua_fun_spine_IkConstraintData_getMix, _olua_fun_spine_IkConstraintData_setMix); + oluacls_prop(L, "softness", _olua_fun_spine_IkConstraintData_getSoftness, _olua_fun_spine_IkConstraintData_setSoftness); + oluacls_prop(L, "stretch", _olua_fun_spine_IkConstraintData_getStretch, _olua_fun_spine_IkConstraintData_setStretch); + oluacls_prop(L, "target", _olua_fun_spine_IkConstraintData_getTarget, _olua_fun_spine_IkConstraintData_setTarget); + oluacls_prop(L, "uniform", _olua_fun_spine_IkConstraintData_getUniform, _olua_fun_spine_IkConstraintData_setUniform); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_spine_IkConstraintData(lua_State *L) +{ + olua_require(L, "spine", luaopen_spine); + if (!olua_getclass(L, "spine.IkConstraintData")) { + luaL_error(L, "class not found: spine::IkConstraintData"); + } + return 1; +} OLUA_END_DECLS -static int _spine_BoneData_getColor(lua_State *L) +static int _olua_fun_spine_BoneData_getColor(lua_State *L) { olua_startinvoke(L); @@ -2913,7 +3373,7 @@ static int _spine_BoneData_getColor(lua_State *L) return num_ret; } -static int _spine_BoneData_getIcon(lua_State *L) +static int _olua_fun_spine_BoneData_getIcon(lua_State *L) { olua_startinvoke(L); @@ -2930,7 +3390,7 @@ static int _spine_BoneData_getIcon(lua_State *L) return num_ret; } -static int _spine_BoneData_getIndex(lua_State *L) +static int _olua_fun_spine_BoneData_getIndex(lua_State *L) { olua_startinvoke(L); @@ -2947,7 +3407,7 @@ static int _spine_BoneData_getIndex(lua_State *L) return num_ret; } -static int _spine_BoneData_getInherit(lua_State *L) +static int _olua_fun_spine_BoneData_getInherit(lua_State *L) { olua_startinvoke(L); @@ -2964,7 +3424,7 @@ static int _spine_BoneData_getInherit(lua_State *L) return num_ret; } -static int _spine_BoneData_getLength(lua_State *L) +static int _olua_fun_spine_BoneData_getLength(lua_State *L) { olua_startinvoke(L); @@ -2981,7 +3441,7 @@ static int _spine_BoneData_getLength(lua_State *L) return num_ret; } -static int _spine_BoneData_getName(lua_State *L) +static int _olua_fun_spine_BoneData_getName(lua_State *L) { olua_startinvoke(L); @@ -2998,7 +3458,7 @@ static int _spine_BoneData_getName(lua_State *L) return num_ret; } -static int _spine_BoneData_getParent(lua_State *L) +static int _olua_fun_spine_BoneData_getParent(lua_State *L) { olua_startinvoke(L); @@ -3015,7 +3475,7 @@ static int _spine_BoneData_getParent(lua_State *L) return num_ret; } -static int _spine_BoneData_getRotation(lua_State *L) +static int _olua_fun_spine_BoneData_getRotation(lua_State *L) { olua_startinvoke(L); @@ -3032,7 +3492,7 @@ static int _spine_BoneData_getRotation(lua_State *L) return num_ret; } -static int _spine_BoneData_getScaleX(lua_State *L) +static int _olua_fun_spine_BoneData_getScaleX(lua_State *L) { olua_startinvoke(L); @@ -3049,7 +3509,7 @@ static int _spine_BoneData_getScaleX(lua_State *L) return num_ret; } -static int _spine_BoneData_getScaleY(lua_State *L) +static int _olua_fun_spine_BoneData_getScaleY(lua_State *L) { olua_startinvoke(L); @@ -3066,7 +3526,7 @@ static int _spine_BoneData_getScaleY(lua_State *L) return num_ret; } -static int _spine_BoneData_getShearX(lua_State *L) +static int _olua_fun_spine_BoneData_getShearX(lua_State *L) { olua_startinvoke(L); @@ -3083,7 +3543,7 @@ static int _spine_BoneData_getShearX(lua_State *L) return num_ret; } -static int _spine_BoneData_getShearY(lua_State *L) +static int _olua_fun_spine_BoneData_getShearY(lua_State *L) { olua_startinvoke(L); @@ -3100,7 +3560,7 @@ static int _spine_BoneData_getShearY(lua_State *L) return num_ret; } -static int _spine_BoneData_getX(lua_State *L) +static int _olua_fun_spine_BoneData_getX(lua_State *L) { olua_startinvoke(L); @@ -3117,7 +3577,7 @@ static int _spine_BoneData_getX(lua_State *L) return num_ret; } -static int _spine_BoneData_getY(lua_State *L) +static int _olua_fun_spine_BoneData_getY(lua_State *L) { olua_startinvoke(L); @@ -3134,7 +3594,7 @@ static int _spine_BoneData_getY(lua_State *L) return num_ret; } -static int _spine_BoneData_isSkinRequired(lua_State *L) +static int _olua_fun_spine_BoneData_isSkinRequired(lua_State *L) { olua_startinvoke(L); @@ -3151,7 +3611,7 @@ static int _spine_BoneData_isSkinRequired(lua_State *L) return num_ret; } -static int _spine_BoneData_isVisible(lua_State *L) +static int _olua_fun_spine_BoneData_isVisible(lua_State *L) { olua_startinvoke(L); @@ -3168,7 +3628,7 @@ static int _spine_BoneData_isVisible(lua_State *L) return num_ret; } -static int _spine_BoneData_new$1(lua_State *L) +static int _olua_fun_spine_BoneData_new$1(lua_State *L) { olua_startinvoke(L); @@ -3180,7 +3640,7 @@ static int _spine_BoneData_new$1(lua_State *L) olua_check_string(L, 2, &arg2); olua_check_object(L, 3, &arg3, "spine.BoneData"); - // BoneData(int index, const spine::String &name, @optional spine::BoneData *parent) + // spine::BoneData(int index, const spine::String &name, @optional spine::BoneData *parent) spine::BoneData *ret = new spine::BoneData(arg1, arg2, arg3); int num_ret = olua_push_object(L, ret, "spine.BoneData"); olua_postnew(L, ret); @@ -3190,7 +3650,7 @@ static int _spine_BoneData_new$1(lua_State *L) return num_ret; } -static int _spine_BoneData_new$2(lua_State *L) +static int _olua_fun_spine_BoneData_new$2(lua_State *L) { olua_startinvoke(L); @@ -3200,7 +3660,7 @@ static int _spine_BoneData_new$2(lua_State *L) olua_check_integer(L, 1, &arg1); olua_check_string(L, 2, &arg2); - // BoneData(int index, const spine::String &name, @optional spine::BoneData *parent) + // spine::BoneData(int index, const spine::String &name) spine::BoneData *ret = new spine::BoneData(arg1, arg2); int num_ret = olua_push_object(L, ret, "spine.BoneData"); olua_postnew(L, ret); @@ -3210,21 +3670,21 @@ static int _spine_BoneData_new$2(lua_State *L) return num_ret; } -static int _spine_BoneData_new(lua_State *L) +static int _olua_fun_spine_BoneData_new(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 2) { // if ((olua_is_integer(L, 1)) && (olua_is_string(L, 2))) { - // BoneData(int index, const spine::String &name, @optional spine::BoneData *parent) - return _spine_BoneData_new$2(L); + // spine::BoneData(int index, const spine::String &name) + return _olua_fun_spine_BoneData_new$2(L); // } } if (num_args == 3) { // if ((olua_is_integer(L, 1)) && (olua_is_string(L, 2)) && (olua_is_object(L, 3, "spine.BoneData"))) { - // BoneData(int index, const spine::String &name, @optional spine::BoneData *parent) - return _spine_BoneData_new$1(L); + // spine::BoneData(int index, const spine::String &name, @optional spine::BoneData *parent) + return _olua_fun_spine_BoneData_new$1(L); // } } @@ -3233,7 +3693,7 @@ static int _spine_BoneData_new(lua_State *L) return 0; } -static int _spine_BoneData_setIcon(lua_State *L) +static int _olua_fun_spine_BoneData_setIcon(lua_State *L) { olua_startinvoke(L); @@ -3251,7 +3711,7 @@ static int _spine_BoneData_setIcon(lua_State *L) return 0; } -static int _spine_BoneData_setInherit(lua_State *L) +static int _olua_fun_spine_BoneData_setInherit(lua_State *L) { olua_startinvoke(L); @@ -3269,7 +3729,7 @@ static int _spine_BoneData_setInherit(lua_State *L) return 0; } -static int _spine_BoneData_setLength(lua_State *L) +static int _olua_fun_spine_BoneData_setLength(lua_State *L) { olua_startinvoke(L); @@ -3287,7 +3747,7 @@ static int _spine_BoneData_setLength(lua_State *L) return 0; } -static int _spine_BoneData_setRotation(lua_State *L) +static int _olua_fun_spine_BoneData_setRotation(lua_State *L) { olua_startinvoke(L); @@ -3305,7 +3765,7 @@ static int _spine_BoneData_setRotation(lua_State *L) return 0; } -static int _spine_BoneData_setScaleX(lua_State *L) +static int _olua_fun_spine_BoneData_setScaleX(lua_State *L) { olua_startinvoke(L); @@ -3323,7 +3783,7 @@ static int _spine_BoneData_setScaleX(lua_State *L) return 0; } -static int _spine_BoneData_setScaleY(lua_State *L) +static int _olua_fun_spine_BoneData_setScaleY(lua_State *L) { olua_startinvoke(L); @@ -3341,7 +3801,7 @@ static int _spine_BoneData_setScaleY(lua_State *L) return 0; } -static int _spine_BoneData_setShearX(lua_State *L) +static int _olua_fun_spine_BoneData_setShearX(lua_State *L) { olua_startinvoke(L); @@ -3359,7 +3819,7 @@ static int _spine_BoneData_setShearX(lua_State *L) return 0; } -static int _spine_BoneData_setShearY(lua_State *L) +static int _olua_fun_spine_BoneData_setShearY(lua_State *L) { olua_startinvoke(L); @@ -3377,7 +3837,7 @@ static int _spine_BoneData_setShearY(lua_State *L) return 0; } -static int _spine_BoneData_setSkinRequired(lua_State *L) +static int _olua_fun_spine_BoneData_setSkinRequired(lua_State *L) { olua_startinvoke(L); @@ -3395,7 +3855,7 @@ static int _spine_BoneData_setSkinRequired(lua_State *L) return 0; } -static int _spine_BoneData_setVisible(lua_State *L) +static int _olua_fun_spine_BoneData_setVisible(lua_State *L) { olua_startinvoke(L); @@ -3413,7 +3873,7 @@ static int _spine_BoneData_setVisible(lua_State *L) return 0; } -static int _spine_BoneData_setX(lua_State *L) +static int _olua_fun_spine_BoneData_setX(lua_State *L) { olua_startinvoke(L); @@ -3431,7 +3891,7 @@ static int _spine_BoneData_setX(lua_State *L) return 0; } -static int _spine_BoneData_setY(lua_State *L) +static int _olua_fun_spine_BoneData_setY(lua_State *L) { olua_startinvoke(L); @@ -3449,61 +3909,70 @@ static int _spine_BoneData_setY(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_spine_BoneData(lua_State *L) +static int _olua_cls_spine_BoneData(lua_State *L) { oluacls_class(L, "spine.BoneData"); - oluacls_func(L, "getColor", _spine_BoneData_getColor); - oluacls_func(L, "getIcon", _spine_BoneData_getIcon); - oluacls_func(L, "getIndex", _spine_BoneData_getIndex); - oluacls_func(L, "getInherit", _spine_BoneData_getInherit); - oluacls_func(L, "getLength", _spine_BoneData_getLength); - oluacls_func(L, "getName", _spine_BoneData_getName); - oluacls_func(L, "getParent", _spine_BoneData_getParent); - oluacls_func(L, "getRotation", _spine_BoneData_getRotation); - oluacls_func(L, "getScaleX", _spine_BoneData_getScaleX); - oluacls_func(L, "getScaleY", _spine_BoneData_getScaleY); - oluacls_func(L, "getShearX", _spine_BoneData_getShearX); - oluacls_func(L, "getShearY", _spine_BoneData_getShearY); - oluacls_func(L, "getX", _spine_BoneData_getX); - oluacls_func(L, "getY", _spine_BoneData_getY); - oluacls_func(L, "isSkinRequired", _spine_BoneData_isSkinRequired); - oluacls_func(L, "isVisible", _spine_BoneData_isVisible); - oluacls_func(L, "new", _spine_BoneData_new); - oluacls_func(L, "setIcon", _spine_BoneData_setIcon); - oluacls_func(L, "setInherit", _spine_BoneData_setInherit); - oluacls_func(L, "setLength", _spine_BoneData_setLength); - oluacls_func(L, "setRotation", _spine_BoneData_setRotation); - oluacls_func(L, "setScaleX", _spine_BoneData_setScaleX); - oluacls_func(L, "setScaleY", _spine_BoneData_setScaleY); - oluacls_func(L, "setShearX", _spine_BoneData_setShearX); - oluacls_func(L, "setShearY", _spine_BoneData_setShearY); - oluacls_func(L, "setSkinRequired", _spine_BoneData_setSkinRequired); - oluacls_func(L, "setVisible", _spine_BoneData_setVisible); - oluacls_func(L, "setX", _spine_BoneData_setX); - oluacls_func(L, "setY", _spine_BoneData_setY); - oluacls_prop(L, "color", _spine_BoneData_getColor, nullptr); - oluacls_prop(L, "icon", _spine_BoneData_getIcon, _spine_BoneData_setIcon); - oluacls_prop(L, "index", _spine_BoneData_getIndex, nullptr); - oluacls_prop(L, "inherit", _spine_BoneData_getInherit, _spine_BoneData_setInherit); - oluacls_prop(L, "length", _spine_BoneData_getLength, _spine_BoneData_setLength); - oluacls_prop(L, "name", _spine_BoneData_getName, nullptr); - oluacls_prop(L, "parent", _spine_BoneData_getParent, nullptr); - oluacls_prop(L, "rotation", _spine_BoneData_getRotation, _spine_BoneData_setRotation); - oluacls_prop(L, "scaleX", _spine_BoneData_getScaleX, _spine_BoneData_setScaleX); - oluacls_prop(L, "scaleY", _spine_BoneData_getScaleY, _spine_BoneData_setScaleY); - oluacls_prop(L, "shearX", _spine_BoneData_getShearX, _spine_BoneData_setShearX); - oluacls_prop(L, "shearY", _spine_BoneData_getShearY, _spine_BoneData_setShearY); - oluacls_prop(L, "skinRequired", _spine_BoneData_isSkinRequired, _spine_BoneData_setSkinRequired); - oluacls_prop(L, "visible", _spine_BoneData_isVisible, _spine_BoneData_setVisible); - oluacls_prop(L, "x", _spine_BoneData_getX, _spine_BoneData_setX); - oluacls_prop(L, "y", _spine_BoneData_getY, _spine_BoneData_setY); + oluacls_func(L, "getColor", _olua_fun_spine_BoneData_getColor); + oluacls_func(L, "getIcon", _olua_fun_spine_BoneData_getIcon); + oluacls_func(L, "getIndex", _olua_fun_spine_BoneData_getIndex); + oluacls_func(L, "getInherit", _olua_fun_spine_BoneData_getInherit); + oluacls_func(L, "getLength", _olua_fun_spine_BoneData_getLength); + oluacls_func(L, "getName", _olua_fun_spine_BoneData_getName); + oluacls_func(L, "getParent", _olua_fun_spine_BoneData_getParent); + oluacls_func(L, "getRotation", _olua_fun_spine_BoneData_getRotation); + oluacls_func(L, "getScaleX", _olua_fun_spine_BoneData_getScaleX); + oluacls_func(L, "getScaleY", _olua_fun_spine_BoneData_getScaleY); + oluacls_func(L, "getShearX", _olua_fun_spine_BoneData_getShearX); + oluacls_func(L, "getShearY", _olua_fun_spine_BoneData_getShearY); + oluacls_func(L, "getX", _olua_fun_spine_BoneData_getX); + oluacls_func(L, "getY", _olua_fun_spine_BoneData_getY); + oluacls_func(L, "isSkinRequired", _olua_fun_spine_BoneData_isSkinRequired); + oluacls_func(L, "isVisible", _olua_fun_spine_BoneData_isVisible); + oluacls_func(L, "new", _olua_fun_spine_BoneData_new); + oluacls_func(L, "setIcon", _olua_fun_spine_BoneData_setIcon); + oluacls_func(L, "setInherit", _olua_fun_spine_BoneData_setInherit); + oluacls_func(L, "setLength", _olua_fun_spine_BoneData_setLength); + oluacls_func(L, "setRotation", _olua_fun_spine_BoneData_setRotation); + oluacls_func(L, "setScaleX", _olua_fun_spine_BoneData_setScaleX); + oluacls_func(L, "setScaleY", _olua_fun_spine_BoneData_setScaleY); + oluacls_func(L, "setShearX", _olua_fun_spine_BoneData_setShearX); + oluacls_func(L, "setShearY", _olua_fun_spine_BoneData_setShearY); + oluacls_func(L, "setSkinRequired", _olua_fun_spine_BoneData_setSkinRequired); + oluacls_func(L, "setVisible", _olua_fun_spine_BoneData_setVisible); + oluacls_func(L, "setX", _olua_fun_spine_BoneData_setX); + oluacls_func(L, "setY", _olua_fun_spine_BoneData_setY); + oluacls_prop(L, "color", _olua_fun_spine_BoneData_getColor, nullptr); + oluacls_prop(L, "icon", _olua_fun_spine_BoneData_getIcon, _olua_fun_spine_BoneData_setIcon); + oluacls_prop(L, "index", _olua_fun_spine_BoneData_getIndex, nullptr); + oluacls_prop(L, "inherit", _olua_fun_spine_BoneData_getInherit, _olua_fun_spine_BoneData_setInherit); + oluacls_prop(L, "length", _olua_fun_spine_BoneData_getLength, _olua_fun_spine_BoneData_setLength); + oluacls_prop(L, "name", _olua_fun_spine_BoneData_getName, nullptr); + oluacls_prop(L, "parent", _olua_fun_spine_BoneData_getParent, nullptr); + oluacls_prop(L, "rotation", _olua_fun_spine_BoneData_getRotation, _olua_fun_spine_BoneData_setRotation); + oluacls_prop(L, "scaleX", _olua_fun_spine_BoneData_getScaleX, _olua_fun_spine_BoneData_setScaleX); + oluacls_prop(L, "scaleY", _olua_fun_spine_BoneData_getScaleY, _olua_fun_spine_BoneData_setScaleY); + oluacls_prop(L, "shearX", _olua_fun_spine_BoneData_getShearX, _olua_fun_spine_BoneData_setShearX); + oluacls_prop(L, "shearY", _olua_fun_spine_BoneData_getShearY, _olua_fun_spine_BoneData_setShearY); + oluacls_prop(L, "skinRequired", _olua_fun_spine_BoneData_isSkinRequired, _olua_fun_spine_BoneData_setSkinRequired); + oluacls_prop(L, "visible", _olua_fun_spine_BoneData_isVisible, _olua_fun_spine_BoneData_setVisible); + oluacls_prop(L, "x", _olua_fun_spine_BoneData_getX, _olua_fun_spine_BoneData_setX); + oluacls_prop(L, "y", _olua_fun_spine_BoneData_getY, _olua_fun_spine_BoneData_setY); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_spine_BoneData(lua_State *L) +{ + olua_require(L, "spine", luaopen_spine); + if (!olua_getclass(L, "spine.BoneData")) { + luaL_error(L, "class not found: spine::BoneData"); + } return 1; } OLUA_END_DECLS -static int _spine_SlotData_getAttachmentName(lua_State *L) +static int _olua_fun_spine_SlotData_getAttachmentName(lua_State *L) { olua_startinvoke(L); @@ -3520,7 +3989,7 @@ static int _spine_SlotData_getAttachmentName(lua_State *L) return num_ret; } -static int _spine_SlotData_getBlendMode(lua_State *L) +static int _olua_fun_spine_SlotData_getBlendMode(lua_State *L) { olua_startinvoke(L); @@ -3537,7 +4006,7 @@ static int _spine_SlotData_getBlendMode(lua_State *L) return num_ret; } -static int _spine_SlotData_getBoneData(lua_State *L) +static int _olua_fun_spine_SlotData_getBoneData(lua_State *L) { olua_startinvoke(L); @@ -3554,7 +4023,7 @@ static int _spine_SlotData_getBoneData(lua_State *L) return num_ret; } -static int _spine_SlotData_getColor(lua_State *L) +static int _olua_fun_spine_SlotData_getColor(lua_State *L) { olua_startinvoke(L); @@ -3571,7 +4040,7 @@ static int _spine_SlotData_getColor(lua_State *L) return num_ret; } -static int _spine_SlotData_getDarkColor(lua_State *L) +static int _olua_fun_spine_SlotData_getDarkColor(lua_State *L) { olua_startinvoke(L); @@ -3588,7 +4057,7 @@ static int _spine_SlotData_getDarkColor(lua_State *L) return num_ret; } -static int _spine_SlotData_getIndex(lua_State *L) +static int _olua_fun_spine_SlotData_getIndex(lua_State *L) { olua_startinvoke(L); @@ -3605,7 +4074,7 @@ static int _spine_SlotData_getIndex(lua_State *L) return num_ret; } -static int _spine_SlotData_getName(lua_State *L) +static int _olua_fun_spine_SlotData_getName(lua_State *L) { olua_startinvoke(L); @@ -3622,7 +4091,7 @@ static int _spine_SlotData_getName(lua_State *L) return num_ret; } -static int _spine_SlotData_hasDarkColor(lua_State *L) +static int _olua_fun_spine_SlotData_hasDarkColor(lua_State *L) { olua_startinvoke(L); @@ -3639,7 +4108,7 @@ static int _spine_SlotData_hasDarkColor(lua_State *L) return num_ret; } -static int _spine_SlotData_isVisible(lua_State *L) +static int _olua_fun_spine_SlotData_isVisible(lua_State *L) { olua_startinvoke(L); @@ -3656,7 +4125,7 @@ static int _spine_SlotData_isVisible(lua_State *L) return num_ret; } -static int _spine_SlotData_new(lua_State *L) +static int _olua_fun_spine_SlotData_new(lua_State *L) { olua_startinvoke(L); @@ -3668,7 +4137,7 @@ static int _spine_SlotData_new(lua_State *L) olua_check_string(L, 2, &arg2); olua_check_object(L, 3, &arg3, "spine.BoneData"); - // SlotData(int index, const spine::String &name, spine::BoneData &boneData) + // spine::SlotData(int index, const spine::String &name, spine::BoneData &boneData) spine::SlotData *ret = new spine::SlotData(arg1, arg2, *arg3); int num_ret = olua_push_object(L, ret, "spine.SlotData"); olua_postnew(L, ret); @@ -3678,7 +4147,7 @@ static int _spine_SlotData_new(lua_State *L) return num_ret; } -static int _spine_SlotData_setAttachmentName(lua_State *L) +static int _olua_fun_spine_SlotData_setAttachmentName(lua_State *L) { olua_startinvoke(L); @@ -3696,7 +4165,7 @@ static int _spine_SlotData_setAttachmentName(lua_State *L) return 0; } -static int _spine_SlotData_setBlendMode(lua_State *L) +static int _olua_fun_spine_SlotData_setBlendMode(lua_State *L) { olua_startinvoke(L); @@ -3714,7 +4183,7 @@ static int _spine_SlotData_setBlendMode(lua_State *L) return 0; } -static int _spine_SlotData_setHasDarkColor(lua_State *L) +static int _olua_fun_spine_SlotData_setHasDarkColor(lua_State *L) { olua_startinvoke(L); @@ -3732,7 +4201,7 @@ static int _spine_SlotData_setHasDarkColor(lua_State *L) return 0; } -static int _spine_SlotData_setVisible(lua_State *L) +static int _olua_fun_spine_SlotData_setVisible(lua_State *L) { olua_startinvoke(L); @@ -3750,38 +4219,47 @@ static int _spine_SlotData_setVisible(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_spine_SlotData(lua_State *L) +static int _olua_cls_spine_SlotData(lua_State *L) { oluacls_class(L, "spine.SlotData"); - oluacls_func(L, "getAttachmentName", _spine_SlotData_getAttachmentName); - oluacls_func(L, "getBlendMode", _spine_SlotData_getBlendMode); - oluacls_func(L, "getBoneData", _spine_SlotData_getBoneData); - oluacls_func(L, "getColor", _spine_SlotData_getColor); - oluacls_func(L, "getDarkColor", _spine_SlotData_getDarkColor); - oluacls_func(L, "getIndex", _spine_SlotData_getIndex); - oluacls_func(L, "getName", _spine_SlotData_getName); - oluacls_func(L, "hasDarkColor", _spine_SlotData_hasDarkColor); - oluacls_func(L, "isVisible", _spine_SlotData_isVisible); - oluacls_func(L, "new", _spine_SlotData_new); - oluacls_func(L, "setAttachmentName", _spine_SlotData_setAttachmentName); - oluacls_func(L, "setBlendMode", _spine_SlotData_setBlendMode); - oluacls_func(L, "setHasDarkColor", _spine_SlotData_setHasDarkColor); - oluacls_func(L, "setVisible", _spine_SlotData_setVisible); - oluacls_prop(L, "attachmentName", _spine_SlotData_getAttachmentName, _spine_SlotData_setAttachmentName); - oluacls_prop(L, "blendMode", _spine_SlotData_getBlendMode, _spine_SlotData_setBlendMode); - oluacls_prop(L, "boneData", _spine_SlotData_getBoneData, nullptr); - oluacls_prop(L, "color", _spine_SlotData_getColor, nullptr); - oluacls_prop(L, "darkColor", _spine_SlotData_getDarkColor, nullptr); - oluacls_prop(L, "index", _spine_SlotData_getIndex, nullptr); - oluacls_prop(L, "name", _spine_SlotData_getName, nullptr); - oluacls_prop(L, "visible", _spine_SlotData_isVisible, _spine_SlotData_setVisible); + oluacls_func(L, "getAttachmentName", _olua_fun_spine_SlotData_getAttachmentName); + oluacls_func(L, "getBlendMode", _olua_fun_spine_SlotData_getBlendMode); + oluacls_func(L, "getBoneData", _olua_fun_spine_SlotData_getBoneData); + oluacls_func(L, "getColor", _olua_fun_spine_SlotData_getColor); + oluacls_func(L, "getDarkColor", _olua_fun_spine_SlotData_getDarkColor); + oluacls_func(L, "getIndex", _olua_fun_spine_SlotData_getIndex); + oluacls_func(L, "getName", _olua_fun_spine_SlotData_getName); + oluacls_func(L, "hasDarkColor", _olua_fun_spine_SlotData_hasDarkColor); + oluacls_func(L, "isVisible", _olua_fun_spine_SlotData_isVisible); + oluacls_func(L, "new", _olua_fun_spine_SlotData_new); + oluacls_func(L, "setAttachmentName", _olua_fun_spine_SlotData_setAttachmentName); + oluacls_func(L, "setBlendMode", _olua_fun_spine_SlotData_setBlendMode); + oluacls_func(L, "setHasDarkColor", _olua_fun_spine_SlotData_setHasDarkColor); + oluacls_func(L, "setVisible", _olua_fun_spine_SlotData_setVisible); + oluacls_prop(L, "attachmentName", _olua_fun_spine_SlotData_getAttachmentName, _olua_fun_spine_SlotData_setAttachmentName); + oluacls_prop(L, "blendMode", _olua_fun_spine_SlotData_getBlendMode, _olua_fun_spine_SlotData_setBlendMode); + oluacls_prop(L, "boneData", _olua_fun_spine_SlotData_getBoneData, nullptr); + oluacls_prop(L, "color", _olua_fun_spine_SlotData_getColor, nullptr); + oluacls_prop(L, "darkColor", _olua_fun_spine_SlotData_getDarkColor, nullptr); + oluacls_prop(L, "index", _olua_fun_spine_SlotData_getIndex, nullptr); + oluacls_prop(L, "name", _olua_fun_spine_SlotData_getName, nullptr); + oluacls_prop(L, "visible", _olua_fun_spine_SlotData_isVisible, _olua_fun_spine_SlotData_setVisible); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_spine_SlotData(lua_State *L) +{ + olua_require(L, "spine", luaopen_spine); + if (!olua_getclass(L, "spine.SlotData")) { + luaL_error(L, "class not found: spine::SlotData"); + } + return 1; +} OLUA_END_DECLS -static int _spine_IkConstraint_apply$1(lua_State *L) +static int _olua_fun_spine_IkConstraint_apply$1(lua_State *L) { olua_startinvoke(L); @@ -3809,7 +4287,7 @@ static int _spine_IkConstraint_apply$1(lua_State *L) return 0; } -static int _spine_IkConstraint_apply$2(lua_State *L) +static int _olua_fun_spine_IkConstraint_apply$2(lua_State *L) { olua_startinvoke(L); @@ -3841,21 +4319,21 @@ static int _spine_IkConstraint_apply$2(lua_State *L) return 0; } -static int _spine_IkConstraint_apply(lua_State *L) +static int _olua_fun_spine_IkConstraint_apply(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 7) { // if ((olua_is_object(L, 1, "spine.Bone")) && (olua_is_number(L, 2)) && (olua_is_number(L, 3)) && (olua_is_bool(L, 4)) && (olua_is_bool(L, 5)) && (olua_is_bool(L, 6)) && (olua_is_number(L, 7))) { // static void apply(spine::Bone &bone, float targetX, float targetY, bool compress, bool stretch, bool uniform, float alpha) - return _spine_IkConstraint_apply$1(L); + return _olua_fun_spine_IkConstraint_apply$1(L); // } } if (num_args == 9) { // if ((olua_is_object(L, 1, "spine.Bone")) && (olua_is_object(L, 2, "spine.Bone")) && (olua_is_number(L, 3)) && (olua_is_number(L, 4)) && (olua_is_integer(L, 5)) && (olua_is_bool(L, 6)) && (olua_is_bool(L, 7)) && (olua_is_number(L, 8)) && (olua_is_number(L, 9))) { // static void apply(spine::Bone &parent, spine::Bone &child, float targetX, float targetY, int bendDir, bool stretch, bool uniform, float softness, float alpha) - return _spine_IkConstraint_apply$2(L); + return _olua_fun_spine_IkConstraint_apply$2(L); // } } @@ -3864,7 +4342,7 @@ static int _spine_IkConstraint_apply(lua_State *L) return 0; } -static int _spine_IkConstraint_getBendDirection(lua_State *L) +static int _olua_fun_spine_IkConstraint_getBendDirection(lua_State *L) { olua_startinvoke(L); @@ -3881,7 +4359,7 @@ static int _spine_IkConstraint_getBendDirection(lua_State *L) return num_ret; } -static int _spine_IkConstraint_getBones(lua_State *L) +static int _olua_fun_spine_IkConstraint_getBones(lua_State *L) { olua_startinvoke(L); @@ -3900,7 +4378,7 @@ static int _spine_IkConstraint_getBones(lua_State *L) return num_ret; } -static int _spine_IkConstraint_getCompress(lua_State *L) +static int _olua_fun_spine_IkConstraint_getCompress(lua_State *L) { olua_startinvoke(L); @@ -3917,7 +4395,7 @@ static int _spine_IkConstraint_getCompress(lua_State *L) return num_ret; } -static int _spine_IkConstraint_getData(lua_State *L) +static int _olua_fun_spine_IkConstraint_getData(lua_State *L) { olua_startinvoke(L); @@ -3934,7 +4412,7 @@ static int _spine_IkConstraint_getData(lua_State *L) return num_ret; } -static int _spine_IkConstraint_getMix(lua_State *L) +static int _olua_fun_spine_IkConstraint_getMix(lua_State *L) { olua_startinvoke(L); @@ -3951,7 +4429,7 @@ static int _spine_IkConstraint_getMix(lua_State *L) return num_ret; } -static int _spine_IkConstraint_getOrder(lua_State *L) +static int _olua_fun_spine_IkConstraint_getOrder(lua_State *L) { olua_startinvoke(L); @@ -3968,7 +4446,7 @@ static int _spine_IkConstraint_getOrder(lua_State *L) return num_ret; } -static int _spine_IkConstraint_getSoftness(lua_State *L) +static int _olua_fun_spine_IkConstraint_getSoftness(lua_State *L) { olua_startinvoke(L); @@ -3985,7 +4463,7 @@ static int _spine_IkConstraint_getSoftness(lua_State *L) return num_ret; } -static int _spine_IkConstraint_getStretch(lua_State *L) +static int _olua_fun_spine_IkConstraint_getStretch(lua_State *L) { olua_startinvoke(L); @@ -4002,7 +4480,7 @@ static int _spine_IkConstraint_getStretch(lua_State *L) return num_ret; } -static int _spine_IkConstraint_getTarget(lua_State *L) +static int _olua_fun_spine_IkConstraint_getTarget(lua_State *L) { olua_startinvoke(L); @@ -4019,7 +4497,7 @@ static int _spine_IkConstraint_getTarget(lua_State *L) return num_ret; } -static int _spine_IkConstraint_new(lua_State *L) +static int _olua_fun_spine_IkConstraint_new(lua_State *L) { olua_startinvoke(L); @@ -4029,7 +4507,7 @@ static int _spine_IkConstraint_new(lua_State *L) olua_check_object(L, 1, &arg1, "spine.IkConstraintData"); olua_check_object(L, 2, &arg2, "spine.Skeleton"); - // IkConstraint(spine::IkConstraintData &data, spine::Skeleton &skeleton) + // spine::IkConstraint(spine::IkConstraintData &data, spine::Skeleton &skeleton) spine::IkConstraint *ret = new spine::IkConstraint(*arg1, *arg2); int num_ret = olua_push_object(L, ret, "spine.IkConstraint"); olua_postnew(L, ret); @@ -4039,7 +4517,7 @@ static int _spine_IkConstraint_new(lua_State *L) return num_ret; } -static int _spine_IkConstraint_setBendDirection(lua_State *L) +static int _olua_fun_spine_IkConstraint_setBendDirection(lua_State *L) { olua_startinvoke(L); @@ -4057,7 +4535,7 @@ static int _spine_IkConstraint_setBendDirection(lua_State *L) return 0; } -static int _spine_IkConstraint_setCompress(lua_State *L) +static int _olua_fun_spine_IkConstraint_setCompress(lua_State *L) { olua_startinvoke(L); @@ -4075,7 +4553,7 @@ static int _spine_IkConstraint_setCompress(lua_State *L) return 0; } -static int _spine_IkConstraint_setMix(lua_State *L) +static int _olua_fun_spine_IkConstraint_setMix(lua_State *L) { olua_startinvoke(L); @@ -4093,7 +4571,7 @@ static int _spine_IkConstraint_setMix(lua_State *L) return 0; } -static int _spine_IkConstraint_setSoftness(lua_State *L) +static int _olua_fun_spine_IkConstraint_setSoftness(lua_State *L) { olua_startinvoke(L); @@ -4111,7 +4589,7 @@ static int _spine_IkConstraint_setSoftness(lua_State *L) return 0; } -static int _spine_IkConstraint_setStretch(lua_State *L) +static int _olua_fun_spine_IkConstraint_setStretch(lua_State *L) { olua_startinvoke(L); @@ -4129,7 +4607,7 @@ static int _spine_IkConstraint_setStretch(lua_State *L) return 0; } -static int _spine_IkConstraint_setTarget(lua_State *L) +static int _olua_fun_spine_IkConstraint_setTarget(lua_State *L) { olua_startinvoke(L); @@ -4147,7 +4625,7 @@ static int _spine_IkConstraint_setTarget(lua_State *L) return 0; } -static int _spine_IkConstraint_setToSetupPose(lua_State *L) +static int _olua_fun_spine_IkConstraint_setToSetupPose(lua_State *L) { olua_startinvoke(L); @@ -4163,43 +4641,52 @@ static int _spine_IkConstraint_setToSetupPose(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_spine_IkConstraint(lua_State *L) +static int _olua_cls_spine_IkConstraint(lua_State *L) { oluacls_class(L, "spine.IkConstraint"); - oluacls_func(L, "apply", _spine_IkConstraint_apply); - oluacls_func(L, "getBendDirection", _spine_IkConstraint_getBendDirection); - oluacls_func(L, "getBones", _spine_IkConstraint_getBones); - oluacls_func(L, "getCompress", _spine_IkConstraint_getCompress); - oluacls_func(L, "getData", _spine_IkConstraint_getData); - oluacls_func(L, "getMix", _spine_IkConstraint_getMix); - oluacls_func(L, "getOrder", _spine_IkConstraint_getOrder); - oluacls_func(L, "getSoftness", _spine_IkConstraint_getSoftness); - oluacls_func(L, "getStretch", _spine_IkConstraint_getStretch); - oluacls_func(L, "getTarget", _spine_IkConstraint_getTarget); - oluacls_func(L, "new", _spine_IkConstraint_new); - oluacls_func(L, "setBendDirection", _spine_IkConstraint_setBendDirection); - oluacls_func(L, "setCompress", _spine_IkConstraint_setCompress); - oluacls_func(L, "setMix", _spine_IkConstraint_setMix); - oluacls_func(L, "setSoftness", _spine_IkConstraint_setSoftness); - oluacls_func(L, "setStretch", _spine_IkConstraint_setStretch); - oluacls_func(L, "setTarget", _spine_IkConstraint_setTarget); - oluacls_func(L, "setToSetupPose", _spine_IkConstraint_setToSetupPose); - oluacls_prop(L, "bendDirection", _spine_IkConstraint_getBendDirection, _spine_IkConstraint_setBendDirection); - oluacls_prop(L, "bones", _spine_IkConstraint_getBones, nullptr); - oluacls_prop(L, "compress", _spine_IkConstraint_getCompress, _spine_IkConstraint_setCompress); - oluacls_prop(L, "data", _spine_IkConstraint_getData, nullptr); - oluacls_prop(L, "mix", _spine_IkConstraint_getMix, _spine_IkConstraint_setMix); - oluacls_prop(L, "order", _spine_IkConstraint_getOrder, nullptr); - oluacls_prop(L, "softness", _spine_IkConstraint_getSoftness, _spine_IkConstraint_setSoftness); - oluacls_prop(L, "stretch", _spine_IkConstraint_getStretch, _spine_IkConstraint_setStretch); - oluacls_prop(L, "target", _spine_IkConstraint_getTarget, _spine_IkConstraint_setTarget); + oluacls_func(L, "apply", _olua_fun_spine_IkConstraint_apply); + oluacls_func(L, "getBendDirection", _olua_fun_spine_IkConstraint_getBendDirection); + oluacls_func(L, "getBones", _olua_fun_spine_IkConstraint_getBones); + oluacls_func(L, "getCompress", _olua_fun_spine_IkConstraint_getCompress); + oluacls_func(L, "getData", _olua_fun_spine_IkConstraint_getData); + oluacls_func(L, "getMix", _olua_fun_spine_IkConstraint_getMix); + oluacls_func(L, "getOrder", _olua_fun_spine_IkConstraint_getOrder); + oluacls_func(L, "getSoftness", _olua_fun_spine_IkConstraint_getSoftness); + oluacls_func(L, "getStretch", _olua_fun_spine_IkConstraint_getStretch); + oluacls_func(L, "getTarget", _olua_fun_spine_IkConstraint_getTarget); + oluacls_func(L, "new", _olua_fun_spine_IkConstraint_new); + oluacls_func(L, "setBendDirection", _olua_fun_spine_IkConstraint_setBendDirection); + oluacls_func(L, "setCompress", _olua_fun_spine_IkConstraint_setCompress); + oluacls_func(L, "setMix", _olua_fun_spine_IkConstraint_setMix); + oluacls_func(L, "setSoftness", _olua_fun_spine_IkConstraint_setSoftness); + oluacls_func(L, "setStretch", _olua_fun_spine_IkConstraint_setStretch); + oluacls_func(L, "setTarget", _olua_fun_spine_IkConstraint_setTarget); + oluacls_func(L, "setToSetupPose", _olua_fun_spine_IkConstraint_setToSetupPose); + oluacls_prop(L, "bendDirection", _olua_fun_spine_IkConstraint_getBendDirection, _olua_fun_spine_IkConstraint_setBendDirection); + oluacls_prop(L, "bones", _olua_fun_spine_IkConstraint_getBones, nullptr); + oluacls_prop(L, "compress", _olua_fun_spine_IkConstraint_getCompress, _olua_fun_spine_IkConstraint_setCompress); + oluacls_prop(L, "data", _olua_fun_spine_IkConstraint_getData, nullptr); + oluacls_prop(L, "mix", _olua_fun_spine_IkConstraint_getMix, _olua_fun_spine_IkConstraint_setMix); + oluacls_prop(L, "order", _olua_fun_spine_IkConstraint_getOrder, nullptr); + oluacls_prop(L, "softness", _olua_fun_spine_IkConstraint_getSoftness, _olua_fun_spine_IkConstraint_setSoftness); + oluacls_prop(L, "stretch", _olua_fun_spine_IkConstraint_getStretch, _olua_fun_spine_IkConstraint_setStretch); + oluacls_prop(L, "target", _olua_fun_spine_IkConstraint_getTarget, _olua_fun_spine_IkConstraint_setTarget); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_spine_IkConstraint(lua_State *L) +{ + olua_require(L, "spine", luaopen_spine); + if (!olua_getclass(L, "spine.IkConstraint")) { + luaL_error(L, "class not found: spine::IkConstraint"); + } + return 1; +} OLUA_END_DECLS -static int _spine_TransformConstraint_getBones(lua_State *L) +static int _olua_fun_spine_TransformConstraint_getBones(lua_State *L) { olua_startinvoke(L); @@ -4218,7 +4705,7 @@ static int _spine_TransformConstraint_getBones(lua_State *L) return num_ret; } -static int _spine_TransformConstraint_getData(lua_State *L) +static int _olua_fun_spine_TransformConstraint_getData(lua_State *L) { olua_startinvoke(L); @@ -4235,7 +4722,7 @@ static int _spine_TransformConstraint_getData(lua_State *L) return num_ret; } -static int _spine_TransformConstraint_getMixRotate(lua_State *L) +static int _olua_fun_spine_TransformConstraint_getMixRotate(lua_State *L) { olua_startinvoke(L); @@ -4252,7 +4739,7 @@ static int _spine_TransformConstraint_getMixRotate(lua_State *L) return num_ret; } -static int _spine_TransformConstraint_getMixScaleX(lua_State *L) +static int _olua_fun_spine_TransformConstraint_getMixScaleX(lua_State *L) { olua_startinvoke(L); @@ -4269,7 +4756,7 @@ static int _spine_TransformConstraint_getMixScaleX(lua_State *L) return num_ret; } -static int _spine_TransformConstraint_getMixScaleY(lua_State *L) +static int _olua_fun_spine_TransformConstraint_getMixScaleY(lua_State *L) { olua_startinvoke(L); @@ -4286,7 +4773,7 @@ static int _spine_TransformConstraint_getMixScaleY(lua_State *L) return num_ret; } -static int _spine_TransformConstraint_getMixShearY(lua_State *L) +static int _olua_fun_spine_TransformConstraint_getMixShearY(lua_State *L) { olua_startinvoke(L); @@ -4303,7 +4790,7 @@ static int _spine_TransformConstraint_getMixShearY(lua_State *L) return num_ret; } -static int _spine_TransformConstraint_getMixX(lua_State *L) +static int _olua_fun_spine_TransformConstraint_getMixX(lua_State *L) { olua_startinvoke(L); @@ -4320,7 +4807,7 @@ static int _spine_TransformConstraint_getMixX(lua_State *L) return num_ret; } -static int _spine_TransformConstraint_getMixY(lua_State *L) +static int _olua_fun_spine_TransformConstraint_getMixY(lua_State *L) { olua_startinvoke(L); @@ -4337,7 +4824,7 @@ static int _spine_TransformConstraint_getMixY(lua_State *L) return num_ret; } -static int _spine_TransformConstraint_getOrder(lua_State *L) +static int _olua_fun_spine_TransformConstraint_getOrder(lua_State *L) { olua_startinvoke(L); @@ -4354,7 +4841,7 @@ static int _spine_TransformConstraint_getOrder(lua_State *L) return num_ret; } -static int _spine_TransformConstraint_getTarget(lua_State *L) +static int _olua_fun_spine_TransformConstraint_getTarget(lua_State *L) { olua_startinvoke(L); @@ -4371,7 +4858,7 @@ static int _spine_TransformConstraint_getTarget(lua_State *L) return num_ret; } -static int _spine_TransformConstraint_new(lua_State *L) +static int _olua_fun_spine_TransformConstraint_new(lua_State *L) { olua_startinvoke(L); @@ -4381,7 +4868,7 @@ static int _spine_TransformConstraint_new(lua_State *L) olua_check_object(L, 1, &arg1, "spine.TransformConstraintData"); olua_check_object(L, 2, &arg2, "spine.Skeleton"); - // TransformConstraint(spine::TransformConstraintData &data, spine::Skeleton &skeleton) + // spine::TransformConstraint(spine::TransformConstraintData &data, spine::Skeleton &skeleton) spine::TransformConstraint *ret = new spine::TransformConstraint(*arg1, *arg2); int num_ret = olua_push_object(L, ret, "spine.TransformConstraint"); olua_postnew(L, ret); @@ -4391,7 +4878,7 @@ static int _spine_TransformConstraint_new(lua_State *L) return num_ret; } -static int _spine_TransformConstraint_setMixRotate(lua_State *L) +static int _olua_fun_spine_TransformConstraint_setMixRotate(lua_State *L) { olua_startinvoke(L); @@ -4409,7 +4896,7 @@ static int _spine_TransformConstraint_setMixRotate(lua_State *L) return 0; } -static int _spine_TransformConstraint_setMixScaleX(lua_State *L) +static int _olua_fun_spine_TransformConstraint_setMixScaleX(lua_State *L) { olua_startinvoke(L); @@ -4427,7 +4914,7 @@ static int _spine_TransformConstraint_setMixScaleX(lua_State *L) return 0; } -static int _spine_TransformConstraint_setMixScaleY(lua_State *L) +static int _olua_fun_spine_TransformConstraint_setMixScaleY(lua_State *L) { olua_startinvoke(L); @@ -4445,7 +4932,7 @@ static int _spine_TransformConstraint_setMixScaleY(lua_State *L) return 0; } -static int _spine_TransformConstraint_setMixShearY(lua_State *L) +static int _olua_fun_spine_TransformConstraint_setMixShearY(lua_State *L) { olua_startinvoke(L); @@ -4463,7 +4950,7 @@ static int _spine_TransformConstraint_setMixShearY(lua_State *L) return 0; } -static int _spine_TransformConstraint_setMixX(lua_State *L) +static int _olua_fun_spine_TransformConstraint_setMixX(lua_State *L) { olua_startinvoke(L); @@ -4481,7 +4968,7 @@ static int _spine_TransformConstraint_setMixX(lua_State *L) return 0; } -static int _spine_TransformConstraint_setMixY(lua_State *L) +static int _olua_fun_spine_TransformConstraint_setMixY(lua_State *L) { olua_startinvoke(L); @@ -4499,7 +4986,7 @@ static int _spine_TransformConstraint_setMixY(lua_State *L) return 0; } -static int _spine_TransformConstraint_setTarget(lua_State *L) +static int _olua_fun_spine_TransformConstraint_setTarget(lua_State *L) { olua_startinvoke(L); @@ -4517,7 +5004,7 @@ static int _spine_TransformConstraint_setTarget(lua_State *L) return 0; } -static int _spine_TransformConstraint_setToSetupPose(lua_State *L) +static int _olua_fun_spine_TransformConstraint_setToSetupPose(lua_State *L) { olua_startinvoke(L); @@ -4533,45 +5020,54 @@ static int _spine_TransformConstraint_setToSetupPose(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_spine_TransformConstraint(lua_State *L) +static int _olua_cls_spine_TransformConstraint(lua_State *L) { oluacls_class(L, "spine.TransformConstraint"); - oluacls_func(L, "getBones", _spine_TransformConstraint_getBones); - oluacls_func(L, "getData", _spine_TransformConstraint_getData); - oluacls_func(L, "getMixRotate", _spine_TransformConstraint_getMixRotate); - oluacls_func(L, "getMixScaleX", _spine_TransformConstraint_getMixScaleX); - oluacls_func(L, "getMixScaleY", _spine_TransformConstraint_getMixScaleY); - oluacls_func(L, "getMixShearY", _spine_TransformConstraint_getMixShearY); - oluacls_func(L, "getMixX", _spine_TransformConstraint_getMixX); - oluacls_func(L, "getMixY", _spine_TransformConstraint_getMixY); - oluacls_func(L, "getOrder", _spine_TransformConstraint_getOrder); - oluacls_func(L, "getTarget", _spine_TransformConstraint_getTarget); - oluacls_func(L, "new", _spine_TransformConstraint_new); - oluacls_func(L, "setMixRotate", _spine_TransformConstraint_setMixRotate); - oluacls_func(L, "setMixScaleX", _spine_TransformConstraint_setMixScaleX); - oluacls_func(L, "setMixScaleY", _spine_TransformConstraint_setMixScaleY); - oluacls_func(L, "setMixShearY", _spine_TransformConstraint_setMixShearY); - oluacls_func(L, "setMixX", _spine_TransformConstraint_setMixX); - oluacls_func(L, "setMixY", _spine_TransformConstraint_setMixY); - oluacls_func(L, "setTarget", _spine_TransformConstraint_setTarget); - oluacls_func(L, "setToSetupPose", _spine_TransformConstraint_setToSetupPose); - oluacls_prop(L, "bones", _spine_TransformConstraint_getBones, nullptr); - oluacls_prop(L, "data", _spine_TransformConstraint_getData, nullptr); - oluacls_prop(L, "mixRotate", _spine_TransformConstraint_getMixRotate, _spine_TransformConstraint_setMixRotate); - oluacls_prop(L, "mixScaleX", _spine_TransformConstraint_getMixScaleX, _spine_TransformConstraint_setMixScaleX); - oluacls_prop(L, "mixScaleY", _spine_TransformConstraint_getMixScaleY, _spine_TransformConstraint_setMixScaleY); - oluacls_prop(L, "mixShearY", _spine_TransformConstraint_getMixShearY, _spine_TransformConstraint_setMixShearY); - oluacls_prop(L, "mixX", _spine_TransformConstraint_getMixX, _spine_TransformConstraint_setMixX); - oluacls_prop(L, "mixY", _spine_TransformConstraint_getMixY, _spine_TransformConstraint_setMixY); - oluacls_prop(L, "order", _spine_TransformConstraint_getOrder, nullptr); - oluacls_prop(L, "target", _spine_TransformConstraint_getTarget, _spine_TransformConstraint_setTarget); + oluacls_func(L, "getBones", _olua_fun_spine_TransformConstraint_getBones); + oluacls_func(L, "getData", _olua_fun_spine_TransformConstraint_getData); + oluacls_func(L, "getMixRotate", _olua_fun_spine_TransformConstraint_getMixRotate); + oluacls_func(L, "getMixScaleX", _olua_fun_spine_TransformConstraint_getMixScaleX); + oluacls_func(L, "getMixScaleY", _olua_fun_spine_TransformConstraint_getMixScaleY); + oluacls_func(L, "getMixShearY", _olua_fun_spine_TransformConstraint_getMixShearY); + oluacls_func(L, "getMixX", _olua_fun_spine_TransformConstraint_getMixX); + oluacls_func(L, "getMixY", _olua_fun_spine_TransformConstraint_getMixY); + oluacls_func(L, "getOrder", _olua_fun_spine_TransformConstraint_getOrder); + oluacls_func(L, "getTarget", _olua_fun_spine_TransformConstraint_getTarget); + oluacls_func(L, "new", _olua_fun_spine_TransformConstraint_new); + oluacls_func(L, "setMixRotate", _olua_fun_spine_TransformConstraint_setMixRotate); + oluacls_func(L, "setMixScaleX", _olua_fun_spine_TransformConstraint_setMixScaleX); + oluacls_func(L, "setMixScaleY", _olua_fun_spine_TransformConstraint_setMixScaleY); + oluacls_func(L, "setMixShearY", _olua_fun_spine_TransformConstraint_setMixShearY); + oluacls_func(L, "setMixX", _olua_fun_spine_TransformConstraint_setMixX); + oluacls_func(L, "setMixY", _olua_fun_spine_TransformConstraint_setMixY); + oluacls_func(L, "setTarget", _olua_fun_spine_TransformConstraint_setTarget); + oluacls_func(L, "setToSetupPose", _olua_fun_spine_TransformConstraint_setToSetupPose); + oluacls_prop(L, "bones", _olua_fun_spine_TransformConstraint_getBones, nullptr); + oluacls_prop(L, "data", _olua_fun_spine_TransformConstraint_getData, nullptr); + oluacls_prop(L, "mixRotate", _olua_fun_spine_TransformConstraint_getMixRotate, _olua_fun_spine_TransformConstraint_setMixRotate); + oluacls_prop(L, "mixScaleX", _olua_fun_spine_TransformConstraint_getMixScaleX, _olua_fun_spine_TransformConstraint_setMixScaleX); + oluacls_prop(L, "mixScaleY", _olua_fun_spine_TransformConstraint_getMixScaleY, _olua_fun_spine_TransformConstraint_setMixScaleY); + oluacls_prop(L, "mixShearY", _olua_fun_spine_TransformConstraint_getMixShearY, _olua_fun_spine_TransformConstraint_setMixShearY); + oluacls_prop(L, "mixX", _olua_fun_spine_TransformConstraint_getMixX, _olua_fun_spine_TransformConstraint_setMixX); + oluacls_prop(L, "mixY", _olua_fun_spine_TransformConstraint_getMixY, _olua_fun_spine_TransformConstraint_setMixY); + oluacls_prop(L, "order", _olua_fun_spine_TransformConstraint_getOrder, nullptr); + oluacls_prop(L, "target", _olua_fun_spine_TransformConstraint_getTarget, _olua_fun_spine_TransformConstraint_setTarget); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_spine_TransformConstraint(lua_State *L) +{ + olua_require(L, "spine", luaopen_spine); + if (!olua_getclass(L, "spine.TransformConstraint")) { + luaL_error(L, "class not found: spine::TransformConstraint"); + } return 1; } OLUA_END_DECLS -static int _spine_TransformConstraintData_getBones(lua_State *L) +static int _olua_fun_spine_TransformConstraintData_getBones(lua_State *L) { olua_startinvoke(L); @@ -4590,7 +5086,7 @@ static int _spine_TransformConstraintData_getBones(lua_State *L) return num_ret; } -static int _spine_TransformConstraintData_getMixRotate(lua_State *L) +static int _olua_fun_spine_TransformConstraintData_getMixRotate(lua_State *L) { olua_startinvoke(L); @@ -4607,7 +5103,7 @@ static int _spine_TransformConstraintData_getMixRotate(lua_State *L) return num_ret; } -static int _spine_TransformConstraintData_getMixScaleX(lua_State *L) +static int _olua_fun_spine_TransformConstraintData_getMixScaleX(lua_State *L) { olua_startinvoke(L); @@ -4624,7 +5120,7 @@ static int _spine_TransformConstraintData_getMixScaleX(lua_State *L) return num_ret; } -static int _spine_TransformConstraintData_getMixScaleY(lua_State *L) +static int _olua_fun_spine_TransformConstraintData_getMixScaleY(lua_State *L) { olua_startinvoke(L); @@ -4641,7 +5137,7 @@ static int _spine_TransformConstraintData_getMixScaleY(lua_State *L) return num_ret; } -static int _spine_TransformConstraintData_getMixShearY(lua_State *L) +static int _olua_fun_spine_TransformConstraintData_getMixShearY(lua_State *L) { olua_startinvoke(L); @@ -4658,7 +5154,7 @@ static int _spine_TransformConstraintData_getMixShearY(lua_State *L) return num_ret; } -static int _spine_TransformConstraintData_getMixX(lua_State *L) +static int _olua_fun_spine_TransformConstraintData_getMixX(lua_State *L) { olua_startinvoke(L); @@ -4675,7 +5171,7 @@ static int _spine_TransformConstraintData_getMixX(lua_State *L) return num_ret; } -static int _spine_TransformConstraintData_getMixY(lua_State *L) +static int _olua_fun_spine_TransformConstraintData_getMixY(lua_State *L) { olua_startinvoke(L); @@ -4692,7 +5188,7 @@ static int _spine_TransformConstraintData_getMixY(lua_State *L) return num_ret; } -static int _spine_TransformConstraintData_getOffsetRotation(lua_State *L) +static int _olua_fun_spine_TransformConstraintData_getOffsetRotation(lua_State *L) { olua_startinvoke(L); @@ -4709,7 +5205,7 @@ static int _spine_TransformConstraintData_getOffsetRotation(lua_State *L) return num_ret; } -static int _spine_TransformConstraintData_getOffsetScaleX(lua_State *L) +static int _olua_fun_spine_TransformConstraintData_getOffsetScaleX(lua_State *L) { olua_startinvoke(L); @@ -4726,7 +5222,7 @@ static int _spine_TransformConstraintData_getOffsetScaleX(lua_State *L) return num_ret; } -static int _spine_TransformConstraintData_getOffsetScaleY(lua_State *L) +static int _olua_fun_spine_TransformConstraintData_getOffsetScaleY(lua_State *L) { olua_startinvoke(L); @@ -4743,7 +5239,7 @@ static int _spine_TransformConstraintData_getOffsetScaleY(lua_State *L) return num_ret; } -static int _spine_TransformConstraintData_getOffsetShearY(lua_State *L) +static int _olua_fun_spine_TransformConstraintData_getOffsetShearY(lua_State *L) { olua_startinvoke(L); @@ -4760,7 +5256,7 @@ static int _spine_TransformConstraintData_getOffsetShearY(lua_State *L) return num_ret; } -static int _spine_TransformConstraintData_getOffsetX(lua_State *L) +static int _olua_fun_spine_TransformConstraintData_getOffsetX(lua_State *L) { olua_startinvoke(L); @@ -4777,7 +5273,7 @@ static int _spine_TransformConstraintData_getOffsetX(lua_State *L) return num_ret; } -static int _spine_TransformConstraintData_getOffsetY(lua_State *L) +static int _olua_fun_spine_TransformConstraintData_getOffsetY(lua_State *L) { olua_startinvoke(L); @@ -4794,7 +5290,7 @@ static int _spine_TransformConstraintData_getOffsetY(lua_State *L) return num_ret; } -static int _spine_TransformConstraintData_getTarget(lua_State *L) +static int _olua_fun_spine_TransformConstraintData_getTarget(lua_State *L) { olua_startinvoke(L); @@ -4811,7 +5307,7 @@ static int _spine_TransformConstraintData_getTarget(lua_State *L) return num_ret; } -static int _spine_TransformConstraintData_isLocal(lua_State *L) +static int _olua_fun_spine_TransformConstraintData_isLocal(lua_State *L) { olua_startinvoke(L); @@ -4828,7 +5324,7 @@ static int _spine_TransformConstraintData_isLocal(lua_State *L) return num_ret; } -static int _spine_TransformConstraintData_isRelative(lua_State *L) +static int _olua_fun_spine_TransformConstraintData_isRelative(lua_State *L) { olua_startinvoke(L); @@ -4845,7 +5341,7 @@ static int _spine_TransformConstraintData_isRelative(lua_State *L) return num_ret; } -static int _spine_TransformConstraintData_new(lua_State *L) +static int _olua_fun_spine_TransformConstraintData_new(lua_State *L) { olua_startinvoke(L); @@ -4853,7 +5349,7 @@ static int _spine_TransformConstraintData_new(lua_State *L) olua_check_string(L, 1, &arg1); - // TransformConstraintData(const spine::String &name) + // spine::TransformConstraintData(const spine::String &name) spine::TransformConstraintData *ret = new spine::TransformConstraintData(arg1); int num_ret = olua_push_object(L, ret, "spine.TransformConstraintData"); olua_postnew(L, ret); @@ -4863,7 +5359,7 @@ static int _spine_TransformConstraintData_new(lua_State *L) return num_ret; } -static int _spine_TransformConstraintData_setLocal(lua_State *L) +static int _olua_fun_spine_TransformConstraintData_setLocal(lua_State *L) { olua_startinvoke(L); @@ -4881,7 +5377,7 @@ static int _spine_TransformConstraintData_setLocal(lua_State *L) return 0; } -static int _spine_TransformConstraintData_setMixRotate(lua_State *L) +static int _olua_fun_spine_TransformConstraintData_setMixRotate(lua_State *L) { olua_startinvoke(L); @@ -4899,7 +5395,7 @@ static int _spine_TransformConstraintData_setMixRotate(lua_State *L) return 0; } -static int _spine_TransformConstraintData_setMixScaleX(lua_State *L) +static int _olua_fun_spine_TransformConstraintData_setMixScaleX(lua_State *L) { olua_startinvoke(L); @@ -4917,7 +5413,7 @@ static int _spine_TransformConstraintData_setMixScaleX(lua_State *L) return 0; } -static int _spine_TransformConstraintData_setMixScaleY(lua_State *L) +static int _olua_fun_spine_TransformConstraintData_setMixScaleY(lua_State *L) { olua_startinvoke(L); @@ -4935,7 +5431,7 @@ static int _spine_TransformConstraintData_setMixScaleY(lua_State *L) return 0; } -static int _spine_TransformConstraintData_setMixShearY(lua_State *L) +static int _olua_fun_spine_TransformConstraintData_setMixShearY(lua_State *L) { olua_startinvoke(L); @@ -4953,7 +5449,7 @@ static int _spine_TransformConstraintData_setMixShearY(lua_State *L) return 0; } -static int _spine_TransformConstraintData_setMixX(lua_State *L) +static int _olua_fun_spine_TransformConstraintData_setMixX(lua_State *L) { olua_startinvoke(L); @@ -4971,7 +5467,7 @@ static int _spine_TransformConstraintData_setMixX(lua_State *L) return 0; } -static int _spine_TransformConstraintData_setMixY(lua_State *L) +static int _olua_fun_spine_TransformConstraintData_setMixY(lua_State *L) { olua_startinvoke(L); @@ -4989,7 +5485,7 @@ static int _spine_TransformConstraintData_setMixY(lua_State *L) return 0; } -static int _spine_TransformConstraintData_setOffsetRotation(lua_State *L) +static int _olua_fun_spine_TransformConstraintData_setOffsetRotation(lua_State *L) { olua_startinvoke(L); @@ -5007,7 +5503,7 @@ static int _spine_TransformConstraintData_setOffsetRotation(lua_State *L) return 0; } -static int _spine_TransformConstraintData_setOffsetScaleX(lua_State *L) +static int _olua_fun_spine_TransformConstraintData_setOffsetScaleX(lua_State *L) { olua_startinvoke(L); @@ -5025,7 +5521,7 @@ static int _spine_TransformConstraintData_setOffsetScaleX(lua_State *L) return 0; } -static int _spine_TransformConstraintData_setOffsetScaleY(lua_State *L) +static int _olua_fun_spine_TransformConstraintData_setOffsetScaleY(lua_State *L) { olua_startinvoke(L); @@ -5043,7 +5539,7 @@ static int _spine_TransformConstraintData_setOffsetScaleY(lua_State *L) return 0; } -static int _spine_TransformConstraintData_setOffsetShearY(lua_State *L) +static int _olua_fun_spine_TransformConstraintData_setOffsetShearY(lua_State *L) { olua_startinvoke(L); @@ -5061,7 +5557,7 @@ static int _spine_TransformConstraintData_setOffsetShearY(lua_State *L) return 0; } -static int _spine_TransformConstraintData_setOffsetX(lua_State *L) +static int _olua_fun_spine_TransformConstraintData_setOffsetX(lua_State *L) { olua_startinvoke(L); @@ -5079,7 +5575,7 @@ static int _spine_TransformConstraintData_setOffsetX(lua_State *L) return 0; } -static int _spine_TransformConstraintData_setOffsetY(lua_State *L) +static int _olua_fun_spine_TransformConstraintData_setOffsetY(lua_State *L) { olua_startinvoke(L); @@ -5097,7 +5593,7 @@ static int _spine_TransformConstraintData_setOffsetY(lua_State *L) return 0; } -static int _spine_TransformConstraintData_setRelative(lua_State *L) +static int _olua_fun_spine_TransformConstraintData_setRelative(lua_State *L) { olua_startinvoke(L); @@ -5115,7 +5611,7 @@ static int _spine_TransformConstraintData_setRelative(lua_State *L) return 0; } -static int _spine_TransformConstraintData_setTarget(lua_State *L) +static int _olua_fun_spine_TransformConstraintData_setTarget(lua_State *L) { olua_startinvoke(L); @@ -5133,64 +5629,73 @@ static int _spine_TransformConstraintData_setTarget(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_spine_TransformConstraintData(lua_State *L) +static int _olua_cls_spine_TransformConstraintData(lua_State *L) { oluacls_class(L, "spine.TransformConstraintData"); - oluacls_func(L, "getBones", _spine_TransformConstraintData_getBones); - oluacls_func(L, "getMixRotate", _spine_TransformConstraintData_getMixRotate); - oluacls_func(L, "getMixScaleX", _spine_TransformConstraintData_getMixScaleX); - oluacls_func(L, "getMixScaleY", _spine_TransformConstraintData_getMixScaleY); - oluacls_func(L, "getMixShearY", _spine_TransformConstraintData_getMixShearY); - oluacls_func(L, "getMixX", _spine_TransformConstraintData_getMixX); - oluacls_func(L, "getMixY", _spine_TransformConstraintData_getMixY); - oluacls_func(L, "getOffsetRotation", _spine_TransformConstraintData_getOffsetRotation); - oluacls_func(L, "getOffsetScaleX", _spine_TransformConstraintData_getOffsetScaleX); - oluacls_func(L, "getOffsetScaleY", _spine_TransformConstraintData_getOffsetScaleY); - oluacls_func(L, "getOffsetShearY", _spine_TransformConstraintData_getOffsetShearY); - oluacls_func(L, "getOffsetX", _spine_TransformConstraintData_getOffsetX); - oluacls_func(L, "getOffsetY", _spine_TransformConstraintData_getOffsetY); - oluacls_func(L, "getTarget", _spine_TransformConstraintData_getTarget); - oluacls_func(L, "isLocal", _spine_TransformConstraintData_isLocal); - oluacls_func(L, "isRelative", _spine_TransformConstraintData_isRelative); - oluacls_func(L, "new", _spine_TransformConstraintData_new); - oluacls_func(L, "setLocal", _spine_TransformConstraintData_setLocal); - oluacls_func(L, "setMixRotate", _spine_TransformConstraintData_setMixRotate); - oluacls_func(L, "setMixScaleX", _spine_TransformConstraintData_setMixScaleX); - oluacls_func(L, "setMixScaleY", _spine_TransformConstraintData_setMixScaleY); - oluacls_func(L, "setMixShearY", _spine_TransformConstraintData_setMixShearY); - oluacls_func(L, "setMixX", _spine_TransformConstraintData_setMixX); - oluacls_func(L, "setMixY", _spine_TransformConstraintData_setMixY); - oluacls_func(L, "setOffsetRotation", _spine_TransformConstraintData_setOffsetRotation); - oluacls_func(L, "setOffsetScaleX", _spine_TransformConstraintData_setOffsetScaleX); - oluacls_func(L, "setOffsetScaleY", _spine_TransformConstraintData_setOffsetScaleY); - oluacls_func(L, "setOffsetShearY", _spine_TransformConstraintData_setOffsetShearY); - oluacls_func(L, "setOffsetX", _spine_TransformConstraintData_setOffsetX); - oluacls_func(L, "setOffsetY", _spine_TransformConstraintData_setOffsetY); - oluacls_func(L, "setRelative", _spine_TransformConstraintData_setRelative); - oluacls_func(L, "setTarget", _spine_TransformConstraintData_setTarget); - oluacls_prop(L, "bones", _spine_TransformConstraintData_getBones, nullptr); - oluacls_prop(L, "local", _spine_TransformConstraintData_isLocal, _spine_TransformConstraintData_setLocal); - oluacls_prop(L, "mixRotate", _spine_TransformConstraintData_getMixRotate, _spine_TransformConstraintData_setMixRotate); - oluacls_prop(L, "mixScaleX", _spine_TransformConstraintData_getMixScaleX, _spine_TransformConstraintData_setMixScaleX); - oluacls_prop(L, "mixScaleY", _spine_TransformConstraintData_getMixScaleY, _spine_TransformConstraintData_setMixScaleY); - oluacls_prop(L, "mixShearY", _spine_TransformConstraintData_getMixShearY, _spine_TransformConstraintData_setMixShearY); - oluacls_prop(L, "mixX", _spine_TransformConstraintData_getMixX, _spine_TransformConstraintData_setMixX); - oluacls_prop(L, "mixY", _spine_TransformConstraintData_getMixY, _spine_TransformConstraintData_setMixY); - oluacls_prop(L, "offsetRotation", _spine_TransformConstraintData_getOffsetRotation, _spine_TransformConstraintData_setOffsetRotation); - oluacls_prop(L, "offsetScaleX", _spine_TransformConstraintData_getOffsetScaleX, _spine_TransformConstraintData_setOffsetScaleX); - oluacls_prop(L, "offsetScaleY", _spine_TransformConstraintData_getOffsetScaleY, _spine_TransformConstraintData_setOffsetScaleY); - oluacls_prop(L, "offsetShearY", _spine_TransformConstraintData_getOffsetShearY, _spine_TransformConstraintData_setOffsetShearY); - oluacls_prop(L, "offsetX", _spine_TransformConstraintData_getOffsetX, _spine_TransformConstraintData_setOffsetX); - oluacls_prop(L, "offsetY", _spine_TransformConstraintData_getOffsetY, _spine_TransformConstraintData_setOffsetY); - oluacls_prop(L, "relative", _spine_TransformConstraintData_isRelative, _spine_TransformConstraintData_setRelative); - oluacls_prop(L, "target", _spine_TransformConstraintData_getTarget, _spine_TransformConstraintData_setTarget); + oluacls_func(L, "getBones", _olua_fun_spine_TransformConstraintData_getBones); + oluacls_func(L, "getMixRotate", _olua_fun_spine_TransformConstraintData_getMixRotate); + oluacls_func(L, "getMixScaleX", _olua_fun_spine_TransformConstraintData_getMixScaleX); + oluacls_func(L, "getMixScaleY", _olua_fun_spine_TransformConstraintData_getMixScaleY); + oluacls_func(L, "getMixShearY", _olua_fun_spine_TransformConstraintData_getMixShearY); + oluacls_func(L, "getMixX", _olua_fun_spine_TransformConstraintData_getMixX); + oluacls_func(L, "getMixY", _olua_fun_spine_TransformConstraintData_getMixY); + oluacls_func(L, "getOffsetRotation", _olua_fun_spine_TransformConstraintData_getOffsetRotation); + oluacls_func(L, "getOffsetScaleX", _olua_fun_spine_TransformConstraintData_getOffsetScaleX); + oluacls_func(L, "getOffsetScaleY", _olua_fun_spine_TransformConstraintData_getOffsetScaleY); + oluacls_func(L, "getOffsetShearY", _olua_fun_spine_TransformConstraintData_getOffsetShearY); + oluacls_func(L, "getOffsetX", _olua_fun_spine_TransformConstraintData_getOffsetX); + oluacls_func(L, "getOffsetY", _olua_fun_spine_TransformConstraintData_getOffsetY); + oluacls_func(L, "getTarget", _olua_fun_spine_TransformConstraintData_getTarget); + oluacls_func(L, "isLocal", _olua_fun_spine_TransformConstraintData_isLocal); + oluacls_func(L, "isRelative", _olua_fun_spine_TransformConstraintData_isRelative); + oluacls_func(L, "new", _olua_fun_spine_TransformConstraintData_new); + oluacls_func(L, "setLocal", _olua_fun_spine_TransformConstraintData_setLocal); + oluacls_func(L, "setMixRotate", _olua_fun_spine_TransformConstraintData_setMixRotate); + oluacls_func(L, "setMixScaleX", _olua_fun_spine_TransformConstraintData_setMixScaleX); + oluacls_func(L, "setMixScaleY", _olua_fun_spine_TransformConstraintData_setMixScaleY); + oluacls_func(L, "setMixShearY", _olua_fun_spine_TransformConstraintData_setMixShearY); + oluacls_func(L, "setMixX", _olua_fun_spine_TransformConstraintData_setMixX); + oluacls_func(L, "setMixY", _olua_fun_spine_TransformConstraintData_setMixY); + oluacls_func(L, "setOffsetRotation", _olua_fun_spine_TransformConstraintData_setOffsetRotation); + oluacls_func(L, "setOffsetScaleX", _olua_fun_spine_TransformConstraintData_setOffsetScaleX); + oluacls_func(L, "setOffsetScaleY", _olua_fun_spine_TransformConstraintData_setOffsetScaleY); + oluacls_func(L, "setOffsetShearY", _olua_fun_spine_TransformConstraintData_setOffsetShearY); + oluacls_func(L, "setOffsetX", _olua_fun_spine_TransformConstraintData_setOffsetX); + oluacls_func(L, "setOffsetY", _olua_fun_spine_TransformConstraintData_setOffsetY); + oluacls_func(L, "setRelative", _olua_fun_spine_TransformConstraintData_setRelative); + oluacls_func(L, "setTarget", _olua_fun_spine_TransformConstraintData_setTarget); + oluacls_prop(L, "bones", _olua_fun_spine_TransformConstraintData_getBones, nullptr); + oluacls_prop(L, "local", _olua_fun_spine_TransformConstraintData_isLocal, _olua_fun_spine_TransformConstraintData_setLocal); + oluacls_prop(L, "mixRotate", _olua_fun_spine_TransformConstraintData_getMixRotate, _olua_fun_spine_TransformConstraintData_setMixRotate); + oluacls_prop(L, "mixScaleX", _olua_fun_spine_TransformConstraintData_getMixScaleX, _olua_fun_spine_TransformConstraintData_setMixScaleX); + oluacls_prop(L, "mixScaleY", _olua_fun_spine_TransformConstraintData_getMixScaleY, _olua_fun_spine_TransformConstraintData_setMixScaleY); + oluacls_prop(L, "mixShearY", _olua_fun_spine_TransformConstraintData_getMixShearY, _olua_fun_spine_TransformConstraintData_setMixShearY); + oluacls_prop(L, "mixX", _olua_fun_spine_TransformConstraintData_getMixX, _olua_fun_spine_TransformConstraintData_setMixX); + oluacls_prop(L, "mixY", _olua_fun_spine_TransformConstraintData_getMixY, _olua_fun_spine_TransformConstraintData_setMixY); + oluacls_prop(L, "offsetRotation", _olua_fun_spine_TransformConstraintData_getOffsetRotation, _olua_fun_spine_TransformConstraintData_setOffsetRotation); + oluacls_prop(L, "offsetScaleX", _olua_fun_spine_TransformConstraintData_getOffsetScaleX, _olua_fun_spine_TransformConstraintData_setOffsetScaleX); + oluacls_prop(L, "offsetScaleY", _olua_fun_spine_TransformConstraintData_getOffsetScaleY, _olua_fun_spine_TransformConstraintData_setOffsetScaleY); + oluacls_prop(L, "offsetShearY", _olua_fun_spine_TransformConstraintData_getOffsetShearY, _olua_fun_spine_TransformConstraintData_setOffsetShearY); + oluacls_prop(L, "offsetX", _olua_fun_spine_TransformConstraintData_getOffsetX, _olua_fun_spine_TransformConstraintData_setOffsetX); + oluacls_prop(L, "offsetY", _olua_fun_spine_TransformConstraintData_getOffsetY, _olua_fun_spine_TransformConstraintData_setOffsetY); + oluacls_prop(L, "relative", _olua_fun_spine_TransformConstraintData_isRelative, _olua_fun_spine_TransformConstraintData_setRelative); + oluacls_prop(L, "target", _olua_fun_spine_TransformConstraintData_getTarget, _olua_fun_spine_TransformConstraintData_setTarget); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_spine_TransformConstraintData(lua_State *L) +{ + olua_require(L, "spine", luaopen_spine); + if (!olua_getclass(L, "spine.TransformConstraintData")) { + luaL_error(L, "class not found: spine::TransformConstraintData"); + } return 1; } OLUA_END_DECLS -static int _spine_PathConstraintData_getBones(lua_State *L) +static int _olua_fun_spine_PathConstraintData_getBones(lua_State *L) { olua_startinvoke(L); @@ -5209,7 +5714,7 @@ static int _spine_PathConstraintData_getBones(lua_State *L) return num_ret; } -static int _spine_PathConstraintData_getMixRotate(lua_State *L) +static int _olua_fun_spine_PathConstraintData_getMixRotate(lua_State *L) { olua_startinvoke(L); @@ -5226,7 +5731,7 @@ static int _spine_PathConstraintData_getMixRotate(lua_State *L) return num_ret; } -static int _spine_PathConstraintData_getMixX(lua_State *L) +static int _olua_fun_spine_PathConstraintData_getMixX(lua_State *L) { olua_startinvoke(L); @@ -5243,7 +5748,7 @@ static int _spine_PathConstraintData_getMixX(lua_State *L) return num_ret; } -static int _spine_PathConstraintData_getMixY(lua_State *L) +static int _olua_fun_spine_PathConstraintData_getMixY(lua_State *L) { olua_startinvoke(L); @@ -5260,7 +5765,7 @@ static int _spine_PathConstraintData_getMixY(lua_State *L) return num_ret; } -static int _spine_PathConstraintData_getOffsetRotation(lua_State *L) +static int _olua_fun_spine_PathConstraintData_getOffsetRotation(lua_State *L) { olua_startinvoke(L); @@ -5277,7 +5782,7 @@ static int _spine_PathConstraintData_getOffsetRotation(lua_State *L) return num_ret; } -static int _spine_PathConstraintData_getPosition(lua_State *L) +static int _olua_fun_spine_PathConstraintData_getPosition(lua_State *L) { olua_startinvoke(L); @@ -5294,7 +5799,7 @@ static int _spine_PathConstraintData_getPosition(lua_State *L) return num_ret; } -static int _spine_PathConstraintData_getPositionMode(lua_State *L) +static int _olua_fun_spine_PathConstraintData_getPositionMode(lua_State *L) { olua_startinvoke(L); @@ -5311,7 +5816,7 @@ static int _spine_PathConstraintData_getPositionMode(lua_State *L) return num_ret; } -static int _spine_PathConstraintData_getRotateMode(lua_State *L) +static int _olua_fun_spine_PathConstraintData_getRotateMode(lua_State *L) { olua_startinvoke(L); @@ -5328,7 +5833,7 @@ static int _spine_PathConstraintData_getRotateMode(lua_State *L) return num_ret; } -static int _spine_PathConstraintData_getSpacing(lua_State *L) +static int _olua_fun_spine_PathConstraintData_getSpacing(lua_State *L) { olua_startinvoke(L); @@ -5345,7 +5850,7 @@ static int _spine_PathConstraintData_getSpacing(lua_State *L) return num_ret; } -static int _spine_PathConstraintData_getSpacingMode(lua_State *L) +static int _olua_fun_spine_PathConstraintData_getSpacingMode(lua_State *L) { olua_startinvoke(L); @@ -5362,7 +5867,7 @@ static int _spine_PathConstraintData_getSpacingMode(lua_State *L) return num_ret; } -static int _spine_PathConstraintData_getTarget(lua_State *L) +static int _olua_fun_spine_PathConstraintData_getTarget(lua_State *L) { olua_startinvoke(L); @@ -5379,7 +5884,7 @@ static int _spine_PathConstraintData_getTarget(lua_State *L) return num_ret; } -static int _spine_PathConstraintData_new(lua_State *L) +static int _olua_fun_spine_PathConstraintData_new(lua_State *L) { olua_startinvoke(L); @@ -5387,7 +5892,7 @@ static int _spine_PathConstraintData_new(lua_State *L) olua_check_string(L, 1, &arg1); - // PathConstraintData(const spine::String &name) + // spine::PathConstraintData(const spine::String &name) spine::PathConstraintData *ret = new spine::PathConstraintData(arg1); int num_ret = olua_push_object(L, ret, "spine.PathConstraintData"); olua_postnew(L, ret); @@ -5397,7 +5902,7 @@ static int _spine_PathConstraintData_new(lua_State *L) return num_ret; } -static int _spine_PathConstraintData_setMixRotate(lua_State *L) +static int _olua_fun_spine_PathConstraintData_setMixRotate(lua_State *L) { olua_startinvoke(L); @@ -5415,7 +5920,7 @@ static int _spine_PathConstraintData_setMixRotate(lua_State *L) return 0; } -static int _spine_PathConstraintData_setMixX(lua_State *L) +static int _olua_fun_spine_PathConstraintData_setMixX(lua_State *L) { olua_startinvoke(L); @@ -5433,7 +5938,7 @@ static int _spine_PathConstraintData_setMixX(lua_State *L) return 0; } -static int _spine_PathConstraintData_setMixY(lua_State *L) +static int _olua_fun_spine_PathConstraintData_setMixY(lua_State *L) { olua_startinvoke(L); @@ -5451,7 +5956,7 @@ static int _spine_PathConstraintData_setMixY(lua_State *L) return 0; } -static int _spine_PathConstraintData_setOffsetRotation(lua_State *L) +static int _olua_fun_spine_PathConstraintData_setOffsetRotation(lua_State *L) { olua_startinvoke(L); @@ -5469,7 +5974,7 @@ static int _spine_PathConstraintData_setOffsetRotation(lua_State *L) return 0; } -static int _spine_PathConstraintData_setPosition(lua_State *L) +static int _olua_fun_spine_PathConstraintData_setPosition(lua_State *L) { olua_startinvoke(L); @@ -5487,7 +5992,7 @@ static int _spine_PathConstraintData_setPosition(lua_State *L) return 0; } -static int _spine_PathConstraintData_setPositionMode(lua_State *L) +static int _olua_fun_spine_PathConstraintData_setPositionMode(lua_State *L) { olua_startinvoke(L); @@ -5505,7 +6010,7 @@ static int _spine_PathConstraintData_setPositionMode(lua_State *L) return 0; } -static int _spine_PathConstraintData_setRotateMode(lua_State *L) +static int _olua_fun_spine_PathConstraintData_setRotateMode(lua_State *L) { olua_startinvoke(L); @@ -5523,7 +6028,7 @@ static int _spine_PathConstraintData_setRotateMode(lua_State *L) return 0; } -static int _spine_PathConstraintData_setSpacing(lua_State *L) +static int _olua_fun_spine_PathConstraintData_setSpacing(lua_State *L) { olua_startinvoke(L); @@ -5541,7 +6046,7 @@ static int _spine_PathConstraintData_setSpacing(lua_State *L) return 0; } -static int _spine_PathConstraintData_setSpacingMode(lua_State *L) +static int _olua_fun_spine_PathConstraintData_setSpacingMode(lua_State *L) { olua_startinvoke(L); @@ -5559,7 +6064,7 @@ static int _spine_PathConstraintData_setSpacingMode(lua_State *L) return 0; } -static int _spine_PathConstraintData_setTarget(lua_State *L) +static int _olua_fun_spine_PathConstraintData_setTarget(lua_State *L) { olua_startinvoke(L); @@ -5577,60 +6082,69 @@ static int _spine_PathConstraintData_setTarget(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_spine_PathConstraintData(lua_State *L) +static int _olua_cls_spine_PathConstraintData(lua_State *L) { oluacls_class(L, "spine.PathConstraintData"); - oluacls_func(L, "getBones", _spine_PathConstraintData_getBones); - oluacls_func(L, "getMixRotate", _spine_PathConstraintData_getMixRotate); - oluacls_func(L, "getMixX", _spine_PathConstraintData_getMixX); - oluacls_func(L, "getMixY", _spine_PathConstraintData_getMixY); - oluacls_func(L, "getOffsetRotation", _spine_PathConstraintData_getOffsetRotation); - oluacls_func(L, "getPosition", _spine_PathConstraintData_getPosition); - oluacls_func(L, "getPositionMode", _spine_PathConstraintData_getPositionMode); - oluacls_func(L, "getRotateMode", _spine_PathConstraintData_getRotateMode); - oluacls_func(L, "getSpacing", _spine_PathConstraintData_getSpacing); - oluacls_func(L, "getSpacingMode", _spine_PathConstraintData_getSpacingMode); - oluacls_func(L, "getTarget", _spine_PathConstraintData_getTarget); - oluacls_func(L, "new", _spine_PathConstraintData_new); - oluacls_func(L, "setMixRotate", _spine_PathConstraintData_setMixRotate); - oluacls_func(L, "setMixX", _spine_PathConstraintData_setMixX); - oluacls_func(L, "setMixY", _spine_PathConstraintData_setMixY); - oluacls_func(L, "setOffsetRotation", _spine_PathConstraintData_setOffsetRotation); - oluacls_func(L, "setPosition", _spine_PathConstraintData_setPosition); - oluacls_func(L, "setPositionMode", _spine_PathConstraintData_setPositionMode); - oluacls_func(L, "setRotateMode", _spine_PathConstraintData_setRotateMode); - oluacls_func(L, "setSpacing", _spine_PathConstraintData_setSpacing); - oluacls_func(L, "setSpacingMode", _spine_PathConstraintData_setSpacingMode); - oluacls_func(L, "setTarget", _spine_PathConstraintData_setTarget); - oluacls_prop(L, "bones", _spine_PathConstraintData_getBones, nullptr); - oluacls_prop(L, "mixRotate", _spine_PathConstraintData_getMixRotate, _spine_PathConstraintData_setMixRotate); - oluacls_prop(L, "mixX", _spine_PathConstraintData_getMixX, _spine_PathConstraintData_setMixX); - oluacls_prop(L, "mixY", _spine_PathConstraintData_getMixY, _spine_PathConstraintData_setMixY); - oluacls_prop(L, "offsetRotation", _spine_PathConstraintData_getOffsetRotation, _spine_PathConstraintData_setOffsetRotation); - oluacls_prop(L, "position", _spine_PathConstraintData_getPosition, _spine_PathConstraintData_setPosition); - oluacls_prop(L, "positionMode", _spine_PathConstraintData_getPositionMode, _spine_PathConstraintData_setPositionMode); - oluacls_prop(L, "rotateMode", _spine_PathConstraintData_getRotateMode, _spine_PathConstraintData_setRotateMode); - oluacls_prop(L, "spacing", _spine_PathConstraintData_getSpacing, _spine_PathConstraintData_setSpacing); - oluacls_prop(L, "spacingMode", _spine_PathConstraintData_getSpacingMode, _spine_PathConstraintData_setSpacingMode); - oluacls_prop(L, "target", _spine_PathConstraintData_getTarget, _spine_PathConstraintData_setTarget); + oluacls_func(L, "getBones", _olua_fun_spine_PathConstraintData_getBones); + oluacls_func(L, "getMixRotate", _olua_fun_spine_PathConstraintData_getMixRotate); + oluacls_func(L, "getMixX", _olua_fun_spine_PathConstraintData_getMixX); + oluacls_func(L, "getMixY", _olua_fun_spine_PathConstraintData_getMixY); + oluacls_func(L, "getOffsetRotation", _olua_fun_spine_PathConstraintData_getOffsetRotation); + oluacls_func(L, "getPosition", _olua_fun_spine_PathConstraintData_getPosition); + oluacls_func(L, "getPositionMode", _olua_fun_spine_PathConstraintData_getPositionMode); + oluacls_func(L, "getRotateMode", _olua_fun_spine_PathConstraintData_getRotateMode); + oluacls_func(L, "getSpacing", _olua_fun_spine_PathConstraintData_getSpacing); + oluacls_func(L, "getSpacingMode", _olua_fun_spine_PathConstraintData_getSpacingMode); + oluacls_func(L, "getTarget", _olua_fun_spine_PathConstraintData_getTarget); + oluacls_func(L, "new", _olua_fun_spine_PathConstraintData_new); + oluacls_func(L, "setMixRotate", _olua_fun_spine_PathConstraintData_setMixRotate); + oluacls_func(L, "setMixX", _olua_fun_spine_PathConstraintData_setMixX); + oluacls_func(L, "setMixY", _olua_fun_spine_PathConstraintData_setMixY); + oluacls_func(L, "setOffsetRotation", _olua_fun_spine_PathConstraintData_setOffsetRotation); + oluacls_func(L, "setPosition", _olua_fun_spine_PathConstraintData_setPosition); + oluacls_func(L, "setPositionMode", _olua_fun_spine_PathConstraintData_setPositionMode); + oluacls_func(L, "setRotateMode", _olua_fun_spine_PathConstraintData_setRotateMode); + oluacls_func(L, "setSpacing", _olua_fun_spine_PathConstraintData_setSpacing); + oluacls_func(L, "setSpacingMode", _olua_fun_spine_PathConstraintData_setSpacingMode); + oluacls_func(L, "setTarget", _olua_fun_spine_PathConstraintData_setTarget); + oluacls_prop(L, "bones", _olua_fun_spine_PathConstraintData_getBones, nullptr); + oluacls_prop(L, "mixRotate", _olua_fun_spine_PathConstraintData_getMixRotate, _olua_fun_spine_PathConstraintData_setMixRotate); + oluacls_prop(L, "mixX", _olua_fun_spine_PathConstraintData_getMixX, _olua_fun_spine_PathConstraintData_setMixX); + oluacls_prop(L, "mixY", _olua_fun_spine_PathConstraintData_getMixY, _olua_fun_spine_PathConstraintData_setMixY); + oluacls_prop(L, "offsetRotation", _olua_fun_spine_PathConstraintData_getOffsetRotation, _olua_fun_spine_PathConstraintData_setOffsetRotation); + oluacls_prop(L, "position", _olua_fun_spine_PathConstraintData_getPosition, _olua_fun_spine_PathConstraintData_setPosition); + oluacls_prop(L, "positionMode", _olua_fun_spine_PathConstraintData_getPositionMode, _olua_fun_spine_PathConstraintData_setPositionMode); + oluacls_prop(L, "rotateMode", _olua_fun_spine_PathConstraintData_getRotateMode, _olua_fun_spine_PathConstraintData_setRotateMode); + oluacls_prop(L, "spacing", _olua_fun_spine_PathConstraintData_getSpacing, _olua_fun_spine_PathConstraintData_setSpacing); + oluacls_prop(L, "spacingMode", _olua_fun_spine_PathConstraintData_getSpacingMode, _olua_fun_spine_PathConstraintData_setSpacingMode); + oluacls_prop(L, "target", _olua_fun_spine_PathConstraintData_getTarget, _olua_fun_spine_PathConstraintData_setTarget); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_spine_PathConstraintData(lua_State *L) +{ + olua_require(L, "spine", luaopen_spine); + if (!olua_getclass(L, "spine.PathConstraintData")) { + luaL_error(L, "class not found: spine::PathConstraintData"); + } return 1; } OLUA_END_DECLS -static int _spine_SkeletonBounds_aabbIntersectsSkeleton(lua_State *L) +static int _olua_fun_spine_SkeletonBounds_aabbIntersectsSkeleton(lua_State *L) { olua_startinvoke(L); spine::SkeletonBounds *self = nullptr; - spine::SkeletonBounds arg1; /** bounds */ + spine::SkeletonBounds *arg1; /** bounds */ olua_to_object(L, 1, &self, "spine.SkeletonBounds"); olua_check_object(L, 2, &arg1, "spine.SkeletonBounds"); // bool aabbIntersectsSkeleton(spine::SkeletonBounds bounds) - bool ret = self->aabbIntersectsSkeleton(arg1); + bool ret = self->aabbIntersectsSkeleton(*arg1); int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); @@ -5638,7 +6152,7 @@ static int _spine_SkeletonBounds_aabbIntersectsSkeleton(lua_State *L) return num_ret; } -static int _spine_SkeletonBounds_aabbcontainsPoint(lua_State *L) +static int _olua_fun_spine_SkeletonBounds_aabbcontainsPoint(lua_State *L) { olua_startinvoke(L); @@ -5659,7 +6173,7 @@ static int _spine_SkeletonBounds_aabbcontainsPoint(lua_State *L) return num_ret; } -static int _spine_SkeletonBounds_aabbintersectsSegment(lua_State *L) +static int _olua_fun_spine_SkeletonBounds_aabbintersectsSegment(lua_State *L) { olua_startinvoke(L); @@ -5684,7 +6198,7 @@ static int _spine_SkeletonBounds_aabbintersectsSegment(lua_State *L) return num_ret; } -static int _spine_SkeletonBounds_containsPoint$1(lua_State *L) +static int _olua_fun_spine_SkeletonBounds_containsPoint$1(lua_State *L) { olua_startinvoke(L); @@ -5707,7 +6221,7 @@ static int _spine_SkeletonBounds_containsPoint$1(lua_State *L) return num_ret; } -static int _spine_SkeletonBounds_containsPoint$2(lua_State *L) +static int _olua_fun_spine_SkeletonBounds_containsPoint$2(lua_State *L) { olua_startinvoke(L); @@ -5728,21 +6242,21 @@ static int _spine_SkeletonBounds_containsPoint$2(lua_State *L) return num_ret; } -static int _spine_SkeletonBounds_containsPoint(lua_State *L) +static int _olua_fun_spine_SkeletonBounds_containsPoint(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 2) { // if ((olua_is_number(L, 2)) && (olua_is_number(L, 3))) { // spine::BoundingBoxAttachment *containsPoint(float x, float y) - return _spine_SkeletonBounds_containsPoint$2(L); + return _olua_fun_spine_SkeletonBounds_containsPoint$2(L); // } } if (num_args == 3) { // if ((olua_is_object(L, 2, "spine.Polygon")) && (olua_is_number(L, 3)) && (olua_is_number(L, 4))) { // bool containsPoint(spine::Polygon *polygon, float x, float y) - return _spine_SkeletonBounds_containsPoint$1(L); + return _olua_fun_spine_SkeletonBounds_containsPoint$1(L); // } } @@ -5751,7 +6265,7 @@ static int _spine_SkeletonBounds_containsPoint(lua_State *L) return 0; } -static int _spine_SkeletonBounds_getBoundingBox(lua_State *L) +static int _olua_fun_spine_SkeletonBounds_getBoundingBox(lua_State *L) { olua_startinvoke(L); @@ -5770,7 +6284,7 @@ static int _spine_SkeletonBounds_getBoundingBox(lua_State *L) return num_ret; } -static int _spine_SkeletonBounds_getBoundingBoxes(lua_State *L) +static int _olua_fun_spine_SkeletonBounds_getBoundingBoxes(lua_State *L) { olua_startinvoke(L); @@ -5789,7 +6303,7 @@ static int _spine_SkeletonBounds_getBoundingBoxes(lua_State *L) return num_ret; } -static int _spine_SkeletonBounds_getHeight(lua_State *L) +static int _olua_fun_spine_SkeletonBounds_getHeight(lua_State *L) { olua_startinvoke(L); @@ -5806,7 +6320,7 @@ static int _spine_SkeletonBounds_getHeight(lua_State *L) return num_ret; } -static int _spine_SkeletonBounds_getPolygon(lua_State *L) +static int _olua_fun_spine_SkeletonBounds_getPolygon(lua_State *L) { olua_startinvoke(L); @@ -5825,7 +6339,7 @@ static int _spine_SkeletonBounds_getPolygon(lua_State *L) return num_ret; } -static int _spine_SkeletonBounds_getPolygons(lua_State *L) +static int _olua_fun_spine_SkeletonBounds_getPolygons(lua_State *L) { olua_startinvoke(L); @@ -5844,7 +6358,7 @@ static int _spine_SkeletonBounds_getPolygons(lua_State *L) return num_ret; } -static int _spine_SkeletonBounds_getWidth(lua_State *L) +static int _olua_fun_spine_SkeletonBounds_getWidth(lua_State *L) { olua_startinvoke(L); @@ -5861,7 +6375,7 @@ static int _spine_SkeletonBounds_getWidth(lua_State *L) return num_ret; } -static int _spine_SkeletonBounds_intersectsSegment$1(lua_State *L) +static int _olua_fun_spine_SkeletonBounds_intersectsSegment$1(lua_State *L) { olua_startinvoke(L); @@ -5886,7 +6400,7 @@ static int _spine_SkeletonBounds_intersectsSegment$1(lua_State *L) return num_ret; } -static int _spine_SkeletonBounds_intersectsSegment$2(lua_State *L) +static int _olua_fun_spine_SkeletonBounds_intersectsSegment$2(lua_State *L) { olua_startinvoke(L); @@ -5913,21 +6427,21 @@ static int _spine_SkeletonBounds_intersectsSegment$2(lua_State *L) return num_ret; } -static int _spine_SkeletonBounds_intersectsSegment(lua_State *L) +static int _olua_fun_spine_SkeletonBounds_intersectsSegment(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 4) { // if ((olua_is_number(L, 2)) && (olua_is_number(L, 3)) && (olua_is_number(L, 4)) && (olua_is_number(L, 5))) { // spine::BoundingBoxAttachment *intersectsSegment(float x1, float y1, float x2, float y2) - return _spine_SkeletonBounds_intersectsSegment$1(L); + return _olua_fun_spine_SkeletonBounds_intersectsSegment$1(L); // } } if (num_args == 5) { // if ((olua_is_object(L, 2, "spine.Polygon")) && (olua_is_number(L, 3)) && (olua_is_number(L, 4)) && (olua_is_number(L, 5)) && (olua_is_number(L, 6))) { // bool intersectsSegment(spine::Polygon *polygon, float x1, float y1, float x2, float y2) - return _spine_SkeletonBounds_intersectsSegment$2(L); + return _olua_fun_spine_SkeletonBounds_intersectsSegment$2(L); // } } @@ -5936,11 +6450,11 @@ static int _spine_SkeletonBounds_intersectsSegment(lua_State *L) return 0; } -static int _spine_SkeletonBounds_new(lua_State *L) +static int _olua_fun_spine_SkeletonBounds_new(lua_State *L) { olua_startinvoke(L); - // SkeletonBounds() + // spine::SkeletonBounds() spine::SkeletonBounds *ret = new spine::SkeletonBounds(); int num_ret = olua_push_object(L, ret, "spine.SkeletonBounds"); olua_postnew(L, ret); @@ -5950,7 +6464,7 @@ static int _spine_SkeletonBounds_new(lua_State *L) return num_ret; } -static int _spine_SkeletonBounds_update(lua_State *L) +static int _olua_fun_spine_SkeletonBounds_update(lua_State *L) { olua_startinvoke(L); @@ -5970,60 +6484,96 @@ static int _spine_SkeletonBounds_update(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_spine_SkeletonBounds(lua_State *L) +static int _olua_cls_spine_SkeletonBounds(lua_State *L) { oluacls_class(L, "spine.SkeletonBounds"); - oluacls_func(L, "aabbIntersectsSkeleton", _spine_SkeletonBounds_aabbIntersectsSkeleton); - oluacls_func(L, "aabbcontainsPoint", _spine_SkeletonBounds_aabbcontainsPoint); - oluacls_func(L, "aabbintersectsSegment", _spine_SkeletonBounds_aabbintersectsSegment); - oluacls_func(L, "containsPoint", _spine_SkeletonBounds_containsPoint); - oluacls_func(L, "getBoundingBox", _spine_SkeletonBounds_getBoundingBox); - oluacls_func(L, "getBoundingBoxes", _spine_SkeletonBounds_getBoundingBoxes); - oluacls_func(L, "getHeight", _spine_SkeletonBounds_getHeight); - oluacls_func(L, "getPolygon", _spine_SkeletonBounds_getPolygon); - oluacls_func(L, "getPolygons", _spine_SkeletonBounds_getPolygons); - oluacls_func(L, "getWidth", _spine_SkeletonBounds_getWidth); - oluacls_func(L, "intersectsSegment", _spine_SkeletonBounds_intersectsSegment); - oluacls_func(L, "new", _spine_SkeletonBounds_new); - oluacls_func(L, "update", _spine_SkeletonBounds_update); - oluacls_prop(L, "boundingBoxes", _spine_SkeletonBounds_getBoundingBoxes, nullptr); - oluacls_prop(L, "height", _spine_SkeletonBounds_getHeight, nullptr); - oluacls_prop(L, "polygons", _spine_SkeletonBounds_getPolygons, nullptr); - oluacls_prop(L, "width", _spine_SkeletonBounds_getWidth, nullptr); + oluacls_func(L, "aabbIntersectsSkeleton", _olua_fun_spine_SkeletonBounds_aabbIntersectsSkeleton); + oluacls_func(L, "aabbcontainsPoint", _olua_fun_spine_SkeletonBounds_aabbcontainsPoint); + oluacls_func(L, "aabbintersectsSegment", _olua_fun_spine_SkeletonBounds_aabbintersectsSegment); + oluacls_func(L, "containsPoint", _olua_fun_spine_SkeletonBounds_containsPoint); + oluacls_func(L, "getBoundingBox", _olua_fun_spine_SkeletonBounds_getBoundingBox); + oluacls_func(L, "getBoundingBoxes", _olua_fun_spine_SkeletonBounds_getBoundingBoxes); + oluacls_func(L, "getHeight", _olua_fun_spine_SkeletonBounds_getHeight); + oluacls_func(L, "getPolygon", _olua_fun_spine_SkeletonBounds_getPolygon); + oluacls_func(L, "getPolygons", _olua_fun_spine_SkeletonBounds_getPolygons); + oluacls_func(L, "getWidth", _olua_fun_spine_SkeletonBounds_getWidth); + oluacls_func(L, "intersectsSegment", _olua_fun_spine_SkeletonBounds_intersectsSegment); + oluacls_func(L, "new", _olua_fun_spine_SkeletonBounds_new); + oluacls_func(L, "update", _olua_fun_spine_SkeletonBounds_update); + oluacls_prop(L, "boundingBoxes", _olua_fun_spine_SkeletonBounds_getBoundingBoxes, nullptr); + oluacls_prop(L, "height", _olua_fun_spine_SkeletonBounds_getHeight, nullptr); + oluacls_prop(L, "polygons", _olua_fun_spine_SkeletonBounds_getPolygons, nullptr); + oluacls_prop(L, "width", _olua_fun_spine_SkeletonBounds_getWidth, nullptr); return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_spine_SkeletonClipping(lua_State *L) +OLUA_LIB int luaopen_spine_SkeletonBounds(lua_State *L) +{ + olua_require(L, "spine", luaopen_spine); + if (!olua_getclass(L, "spine.SkeletonBounds")) { + luaL_error(L, "class not found: spine::SkeletonBounds"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_spine_SkeletonClipping(lua_State *L) { oluacls_class(L, "spine.SkeletonClipping"); return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_spine_PhysicsConstraint(lua_State *L) +OLUA_LIB int luaopen_spine_SkeletonClipping(lua_State *L) +{ + olua_require(L, "spine", luaopen_spine); + if (!olua_getclass(L, "spine.SkeletonClipping")) { + luaL_error(L, "class not found: spine::SkeletonClipping"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_spine_PhysicsConstraint(lua_State *L) { oluacls_class(L, "spine.PhysicsConstraint"); return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_spine_PhysicsConstraintData(lua_State *L) +OLUA_LIB int luaopen_spine_PhysicsConstraint(lua_State *L) +{ + olua_require(L, "spine", luaopen_spine); + if (!olua_getclass(L, "spine.PhysicsConstraint")) { + luaL_error(L, "class not found: spine::PhysicsConstraint"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_spine_PhysicsConstraintData(lua_State *L) { oluacls_class(L, "spine.PhysicsConstraintData"); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_spine_PhysicsConstraintData(lua_State *L) +{ + olua_require(L, "spine", luaopen_spine); + if (!olua_getclass(L, "spine.PhysicsConstraintData")) { + luaL_error(L, "class not found: spine::PhysicsConstraintData"); + } + return 1; +} OLUA_END_DECLS -static int _spine_Timeline_getDuration(lua_State *L) +static int _olua_fun_spine_Timeline_getDuration(lua_State *L) { olua_startinvoke(L); @@ -6040,7 +6590,7 @@ static int _spine_Timeline_getDuration(lua_State *L) return num_ret; } -static int _spine_Timeline_getFrameCount(lua_State *L) +static int _olua_fun_spine_Timeline_getFrameCount(lua_State *L) { olua_startinvoke(L); @@ -6057,7 +6607,7 @@ static int _spine_Timeline_getFrameCount(lua_State *L) return num_ret; } -static int _spine_Timeline_getFrameEntries(lua_State *L) +static int _olua_fun_spine_Timeline_getFrameEntries(lua_State *L) { olua_startinvoke(L); @@ -6074,7 +6624,7 @@ static int _spine_Timeline_getFrameEntries(lua_State *L) return num_ret; } -static int _spine_Timeline_getFrames(lua_State *L) +static int _olua_fun_spine_Timeline_getFrames(lua_State *L) { olua_startinvoke(L); @@ -6093,7 +6643,7 @@ static int _spine_Timeline_getFrames(lua_State *L) return num_ret; } -static int _spine_Timeline_getPropertyIds(lua_State *L) +static int _olua_fun_spine_Timeline_getPropertyIds(lua_State *L) { olua_startinvoke(L); @@ -6112,26 +6662,35 @@ static int _spine_Timeline_getPropertyIds(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_spine_Timeline(lua_State *L) +static int _olua_cls_spine_Timeline(lua_State *L) { oluacls_class(L, "spine.Timeline"); - oluacls_func(L, "getDuration", _spine_Timeline_getDuration); - oluacls_func(L, "getFrameCount", _spine_Timeline_getFrameCount); - oluacls_func(L, "getFrameEntries", _spine_Timeline_getFrameEntries); - oluacls_func(L, "getFrames", _spine_Timeline_getFrames); - oluacls_func(L, "getPropertyIds", _spine_Timeline_getPropertyIds); - oluacls_prop(L, "duration", _spine_Timeline_getDuration, nullptr); - oluacls_prop(L, "frameCount", _spine_Timeline_getFrameCount, nullptr); - oluacls_prop(L, "frameEntries", _spine_Timeline_getFrameEntries, nullptr); - oluacls_prop(L, "frames", _spine_Timeline_getFrames, nullptr); - oluacls_prop(L, "propertyIds", _spine_Timeline_getPropertyIds, nullptr); + oluacls_func(L, "getDuration", _olua_fun_spine_Timeline_getDuration); + oluacls_func(L, "getFrameCount", _olua_fun_spine_Timeline_getFrameCount); + oluacls_func(L, "getFrameEntries", _olua_fun_spine_Timeline_getFrameEntries); + oluacls_func(L, "getFrames", _olua_fun_spine_Timeline_getFrames); + oluacls_func(L, "getPropertyIds", _olua_fun_spine_Timeline_getPropertyIds); + oluacls_prop(L, "duration", _olua_fun_spine_Timeline_getDuration, nullptr); + oluacls_prop(L, "frameCount", _olua_fun_spine_Timeline_getFrameCount, nullptr); + oluacls_prop(L, "frameEntries", _olua_fun_spine_Timeline_getFrameEntries, nullptr); + oluacls_prop(L, "frames", _olua_fun_spine_Timeline_getFrames, nullptr); + oluacls_prop(L, "propertyIds", _olua_fun_spine_Timeline_getPropertyIds, nullptr); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_spine_Timeline(lua_State *L) +{ + olua_require(L, "spine", luaopen_spine); + if (!olua_getclass(L, "spine.Timeline")) { + luaL_error(L, "class not found: spine::Timeline"); + } + return 1; +} OLUA_END_DECLS -static int _spine_CurveTimeline_getBezierValue(lua_State *L) +static int _olua_fun_spine_CurveTimeline_getBezierValue(lua_State *L) { olua_startinvoke(L); @@ -6156,7 +6715,7 @@ static int _spine_CurveTimeline_getBezierValue(lua_State *L) return num_ret; } -static int _spine_CurveTimeline_getCurves(lua_State *L) +static int _olua_fun_spine_CurveTimeline_getCurves(lua_State *L) { olua_startinvoke(L); @@ -6175,7 +6734,7 @@ static int _spine_CurveTimeline_getCurves(lua_State *L) return num_ret; } -static int _spine_CurveTimeline_setBezier(lua_State *L) +static int _olua_fun_spine_CurveTimeline_setBezier(lua_State *L) { olua_startinvoke(L); @@ -6213,7 +6772,7 @@ static int _spine_CurveTimeline_setBezier(lua_State *L) return 0; } -static int _spine_CurveTimeline_setLinear(lua_State *L) +static int _olua_fun_spine_CurveTimeline_setLinear(lua_State *L) { olua_startinvoke(L); @@ -6231,7 +6790,7 @@ static int _spine_CurveTimeline_setLinear(lua_State *L) return 0; } -static int _spine_CurveTimeline_setStepped(lua_State *L) +static int _olua_fun_spine_CurveTimeline_setStepped(lua_State *L) { olua_startinvoke(L); @@ -6249,22 +6808,31 @@ static int _spine_CurveTimeline_setStepped(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_spine_CurveTimeline(lua_State *L) +static int _olua_cls_spine_CurveTimeline(lua_State *L) { oluacls_class(L, "spine.CurveTimeline"); - oluacls_func(L, "getBezierValue", _spine_CurveTimeline_getBezierValue); - oluacls_func(L, "getCurves", _spine_CurveTimeline_getCurves); - oluacls_func(L, "setBezier", _spine_CurveTimeline_setBezier); - oluacls_func(L, "setLinear", _spine_CurveTimeline_setLinear); - oluacls_func(L, "setStepped", _spine_CurveTimeline_setStepped); - oluacls_prop(L, "curves", _spine_CurveTimeline_getCurves, nullptr); + oluacls_func(L, "getBezierValue", _olua_fun_spine_CurveTimeline_getBezierValue); + oluacls_func(L, "getCurves", _olua_fun_spine_CurveTimeline_getCurves); + oluacls_func(L, "setBezier", _olua_fun_spine_CurveTimeline_setBezier); + oluacls_func(L, "setLinear", _olua_fun_spine_CurveTimeline_setLinear); + oluacls_func(L, "setStepped", _olua_fun_spine_CurveTimeline_setStepped); + oluacls_prop(L, "curves", _olua_fun_spine_CurveTimeline_getCurves, nullptr); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_spine_CurveTimeline(lua_State *L) +{ + olua_require(L, "spine", luaopen_spine); + if (!olua_getclass(L, "spine.CurveTimeline")) { + luaL_error(L, "class not found: spine::CurveTimeline"); + } return 1; } OLUA_END_DECLS -static int _spine_CurveTimeline1_getAbsoluteValue$1(lua_State *L) +static int _olua_fun_spine_CurveTimeline1_getAbsoluteValue$1(lua_State *L) { olua_startinvoke(L); @@ -6291,7 +6859,7 @@ static int _spine_CurveTimeline1_getAbsoluteValue$1(lua_State *L) return num_ret; } -static int _spine_CurveTimeline1_getAbsoluteValue$2(lua_State *L) +static int _olua_fun_spine_CurveTimeline1_getAbsoluteValue$2(lua_State *L) { olua_startinvoke(L); @@ -6320,21 +6888,21 @@ static int _spine_CurveTimeline1_getAbsoluteValue$2(lua_State *L) return num_ret; } -static int _spine_CurveTimeline1_getAbsoluteValue(lua_State *L) +static int _olua_fun_spine_CurveTimeline1_getAbsoluteValue(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 5) { // if ((olua_is_number(L, 2)) && (olua_is_number(L, 3)) && (olua_is_enum(L, 4)) && (olua_is_number(L, 5)) && (olua_is_number(L, 6))) { // float getAbsoluteValue(float time, float alpha, spine::MixBlend blend, float current, float setup) - return _spine_CurveTimeline1_getAbsoluteValue$1(L); + return _olua_fun_spine_CurveTimeline1_getAbsoluteValue$1(L); // } } if (num_args == 6) { // if ((olua_is_number(L, 2)) && (olua_is_number(L, 3)) && (olua_is_enum(L, 4)) && (olua_is_number(L, 5)) && (olua_is_number(L, 6)) && (olua_is_number(L, 7))) { // float getAbsoluteValue(float time, float alpha, spine::MixBlend blend, float current, float setup, float value) - return _spine_CurveTimeline1_getAbsoluteValue$2(L); + return _olua_fun_spine_CurveTimeline1_getAbsoluteValue$2(L); // } } @@ -6343,7 +6911,7 @@ static int _spine_CurveTimeline1_getAbsoluteValue(lua_State *L) return 0; } -static int _spine_CurveTimeline1_getCurveValue(lua_State *L) +static int _olua_fun_spine_CurveTimeline1_getCurveValue(lua_State *L) { olua_startinvoke(L); @@ -6362,7 +6930,7 @@ static int _spine_CurveTimeline1_getCurveValue(lua_State *L) return num_ret; } -static int _spine_CurveTimeline1_getRelativeValue(lua_State *L) +static int _olua_fun_spine_CurveTimeline1_getRelativeValue(lua_State *L) { olua_startinvoke(L); @@ -6389,7 +6957,7 @@ static int _spine_CurveTimeline1_getRelativeValue(lua_State *L) return num_ret; } -static int _spine_CurveTimeline1_getScaleValue(lua_State *L) +static int _olua_fun_spine_CurveTimeline1_getScaleValue(lua_State *L) { olua_startinvoke(L); @@ -6418,20 +6986,29 @@ static int _spine_CurveTimeline1_getScaleValue(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_spine_CurveTimeline1(lua_State *L) +static int _olua_cls_spine_CurveTimeline1(lua_State *L) { oluacls_class(L, "spine.CurveTimeline1"); - oluacls_func(L, "getAbsoluteValue", _spine_CurveTimeline1_getAbsoluteValue); - oluacls_func(L, "getCurveValue", _spine_CurveTimeline1_getCurveValue); - oluacls_func(L, "getRelativeValue", _spine_CurveTimeline1_getRelativeValue); - oluacls_func(L, "getScaleValue", _spine_CurveTimeline1_getScaleValue); + oluacls_func(L, "getAbsoluteValue", _olua_fun_spine_CurveTimeline1_getAbsoluteValue); + oluacls_func(L, "getCurveValue", _olua_fun_spine_CurveTimeline1_getCurveValue); + oluacls_func(L, "getRelativeValue", _olua_fun_spine_CurveTimeline1_getRelativeValue); + oluacls_func(L, "getScaleValue", _olua_fun_spine_CurveTimeline1_getScaleValue); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_spine_CurveTimeline1(lua_State *L) +{ + olua_require(L, "spine", luaopen_spine); + if (!olua_getclass(L, "spine.CurveTimeline1")) { + luaL_error(L, "class not found: spine::CurveTimeline1"); + } return 1; } OLUA_END_DECLS -static int _spine_CurveTimeline2_getCurveValue(lua_State *L) +static int _olua_fun_spine_CurveTimeline2_getCurveValue(lua_State *L) { olua_startinvoke(L); @@ -6450,17 +7027,26 @@ static int _spine_CurveTimeline2_getCurveValue(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_spine_CurveTimeline2(lua_State *L) +static int _olua_cls_spine_CurveTimeline2(lua_State *L) { oluacls_class(L, "spine.CurveTimeline2"); - oluacls_func(L, "getCurveValue", _spine_CurveTimeline2_getCurveValue); + oluacls_func(L, "getCurveValue", _olua_fun_spine_CurveTimeline2_getCurveValue); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_spine_CurveTimeline2(lua_State *L) +{ + olua_require(L, "spine", luaopen_spine); + if (!olua_getclass(L, "spine.CurveTimeline2")) { + luaL_error(L, "class not found: spine::CurveTimeline2"); + } + return 1; +} OLUA_END_DECLS -static int _spine_AttachmentTimeline_getAttachmentNames(lua_State *L) +static int _olua_fun_spine_AttachmentTimeline_getAttachmentNames(lua_State *L) { olua_startinvoke(L); @@ -6479,7 +7065,7 @@ static int _spine_AttachmentTimeline_getAttachmentNames(lua_State *L) return num_ret; } -static int _spine_AttachmentTimeline_getSlotIndex(lua_State *L) +static int _olua_fun_spine_AttachmentTimeline_getSlotIndex(lua_State *L) { olua_startinvoke(L); @@ -6496,7 +7082,7 @@ static int _spine_AttachmentTimeline_getSlotIndex(lua_State *L) return num_ret; } -static int _spine_AttachmentTimeline_new(lua_State *L) +static int _olua_fun_spine_AttachmentTimeline_new(lua_State *L) { olua_startinvoke(L); @@ -6506,7 +7092,7 @@ static int _spine_AttachmentTimeline_new(lua_State *L) olua_check_integer(L, 1, &arg1); olua_check_integer(L, 2, &arg2); - // AttachmentTimeline(size_t frameCount, int slotIndex) + // spine::AttachmentTimeline(size_t frameCount, int slotIndex) spine::AttachmentTimeline *ret = new spine::AttachmentTimeline(arg1, arg2); int num_ret = olua_push_object(L, ret, "spine.AttachmentTimeline"); olua_postnew(L, ret); @@ -6516,7 +7102,7 @@ static int _spine_AttachmentTimeline_new(lua_State *L) return num_ret; } -static int _spine_AttachmentTimeline_setSlotIndex(lua_State *L) +static int _olua_fun_spine_AttachmentTimeline_setSlotIndex(lua_State *L) { olua_startinvoke(L); @@ -6534,22 +7120,31 @@ static int _spine_AttachmentTimeline_setSlotIndex(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_spine_AttachmentTimeline(lua_State *L) +static int _olua_cls_spine_AttachmentTimeline(lua_State *L) { oluacls_class(L, "spine.AttachmentTimeline"); - oluacls_func(L, "getAttachmentNames", _spine_AttachmentTimeline_getAttachmentNames); - oluacls_func(L, "getSlotIndex", _spine_AttachmentTimeline_getSlotIndex); - oluacls_func(L, "new", _spine_AttachmentTimeline_new); - oluacls_func(L, "setSlotIndex", _spine_AttachmentTimeline_setSlotIndex); - oluacls_prop(L, "attachmentNames", _spine_AttachmentTimeline_getAttachmentNames, nullptr); - oluacls_prop(L, "slotIndex", _spine_AttachmentTimeline_getSlotIndex, _spine_AttachmentTimeline_setSlotIndex); + oluacls_func(L, "getAttachmentNames", _olua_fun_spine_AttachmentTimeline_getAttachmentNames); + oluacls_func(L, "getSlotIndex", _olua_fun_spine_AttachmentTimeline_getSlotIndex); + oluacls_func(L, "new", _olua_fun_spine_AttachmentTimeline_new); + oluacls_func(L, "setSlotIndex", _olua_fun_spine_AttachmentTimeline_setSlotIndex); + oluacls_prop(L, "attachmentNames", _olua_fun_spine_AttachmentTimeline_getAttachmentNames, nullptr); + oluacls_prop(L, "slotIndex", _olua_fun_spine_AttachmentTimeline_getSlotIndex, _olua_fun_spine_AttachmentTimeline_setSlotIndex); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_spine_AttachmentTimeline(lua_State *L) +{ + olua_require(L, "spine", luaopen_spine); + if (!olua_getclass(L, "spine.AttachmentTimeline")) { + luaL_error(L, "class not found: spine::AttachmentTimeline"); + } return 1; } OLUA_END_DECLS -static int _spine_RGBATimeline_getSlotIndex(lua_State *L) +static int _olua_fun_spine_RGBATimeline_getSlotIndex(lua_State *L) { olua_startinvoke(L); @@ -6566,7 +7161,7 @@ static int _spine_RGBATimeline_getSlotIndex(lua_State *L) return num_ret; } -static int _spine_RGBATimeline_new(lua_State *L) +static int _olua_fun_spine_RGBATimeline_new(lua_State *L) { olua_startinvoke(L); @@ -6578,7 +7173,7 @@ static int _spine_RGBATimeline_new(lua_State *L) olua_check_integer(L, 2, &arg2); olua_check_integer(L, 3, &arg3); - // RGBATimeline(size_t frameCount, size_t bezierCount, int slotIndex) + // spine::RGBATimeline(size_t frameCount, size_t bezierCount, int slotIndex) spine::RGBATimeline *ret = new spine::RGBATimeline(arg1, arg2, arg3); int num_ret = olua_push_object(L, ret, "spine.RGBATimeline"); olua_postnew(L, ret); @@ -6588,7 +7183,7 @@ static int _spine_RGBATimeline_new(lua_State *L) return num_ret; } -static int _spine_RGBATimeline_setSlotIndex(lua_State *L) +static int _olua_fun_spine_RGBATimeline_setSlotIndex(lua_State *L) { olua_startinvoke(L); @@ -6606,20 +7201,29 @@ static int _spine_RGBATimeline_setSlotIndex(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_spine_RGBATimeline(lua_State *L) +static int _olua_cls_spine_RGBATimeline(lua_State *L) { oluacls_class(L, "spine.RGBATimeline"); - oluacls_func(L, "getSlotIndex", _spine_RGBATimeline_getSlotIndex); - oluacls_func(L, "new", _spine_RGBATimeline_new); - oluacls_func(L, "setSlotIndex", _spine_RGBATimeline_setSlotIndex); - oluacls_prop(L, "slotIndex", _spine_RGBATimeline_getSlotIndex, _spine_RGBATimeline_setSlotIndex); + oluacls_func(L, "getSlotIndex", _olua_fun_spine_RGBATimeline_getSlotIndex); + oluacls_func(L, "new", _olua_fun_spine_RGBATimeline_new); + oluacls_func(L, "setSlotIndex", _olua_fun_spine_RGBATimeline_setSlotIndex); + oluacls_prop(L, "slotIndex", _olua_fun_spine_RGBATimeline_getSlotIndex, _olua_fun_spine_RGBATimeline_setSlotIndex); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_spine_RGBATimeline(lua_State *L) +{ + olua_require(L, "spine", luaopen_spine); + if (!olua_getclass(L, "spine.RGBATimeline")) { + luaL_error(L, "class not found: spine::RGBATimeline"); + } + return 1; +} OLUA_END_DECLS -static int _spine_RGBTimeline_getSlotIndex(lua_State *L) +static int _olua_fun_spine_RGBTimeline_getSlotIndex(lua_State *L) { olua_startinvoke(L); @@ -6636,7 +7240,7 @@ static int _spine_RGBTimeline_getSlotIndex(lua_State *L) return num_ret; } -static int _spine_RGBTimeline_new(lua_State *L) +static int _olua_fun_spine_RGBTimeline_new(lua_State *L) { olua_startinvoke(L); @@ -6648,7 +7252,7 @@ static int _spine_RGBTimeline_new(lua_State *L) olua_check_integer(L, 2, &arg2); olua_check_integer(L, 3, &arg3); - // RGBTimeline(size_t frameCount, size_t bezierCount, int slotIndex) + // spine::RGBTimeline(size_t frameCount, size_t bezierCount, int slotIndex) spine::RGBTimeline *ret = new spine::RGBTimeline(arg1, arg2, arg3); int num_ret = olua_push_object(L, ret, "spine.RGBTimeline"); olua_postnew(L, ret); @@ -6658,7 +7262,7 @@ static int _spine_RGBTimeline_new(lua_State *L) return num_ret; } -static int _spine_RGBTimeline_setSlotIndex(lua_State *L) +static int _olua_fun_spine_RGBTimeline_setSlotIndex(lua_State *L) { olua_startinvoke(L); @@ -6676,20 +7280,29 @@ static int _spine_RGBTimeline_setSlotIndex(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_spine_RGBTimeline(lua_State *L) +static int _olua_cls_spine_RGBTimeline(lua_State *L) { oluacls_class(L, "spine.RGBTimeline"); - oluacls_func(L, "getSlotIndex", _spine_RGBTimeline_getSlotIndex); - oluacls_func(L, "new", _spine_RGBTimeline_new); - oluacls_func(L, "setSlotIndex", _spine_RGBTimeline_setSlotIndex); - oluacls_prop(L, "slotIndex", _spine_RGBTimeline_getSlotIndex, _spine_RGBTimeline_setSlotIndex); + oluacls_func(L, "getSlotIndex", _olua_fun_spine_RGBTimeline_getSlotIndex); + oluacls_func(L, "new", _olua_fun_spine_RGBTimeline_new); + oluacls_func(L, "setSlotIndex", _olua_fun_spine_RGBTimeline_setSlotIndex); + oluacls_prop(L, "slotIndex", _olua_fun_spine_RGBTimeline_getSlotIndex, _olua_fun_spine_RGBTimeline_setSlotIndex); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_spine_RGBTimeline(lua_State *L) +{ + olua_require(L, "spine", luaopen_spine); + if (!olua_getclass(L, "spine.RGBTimeline")) { + luaL_error(L, "class not found: spine::RGBTimeline"); + } + return 1; +} OLUA_END_DECLS -static int _spine_AlphaTimeline_getSlotIndex(lua_State *L) +static int _olua_fun_spine_AlphaTimeline_getSlotIndex(lua_State *L) { olua_startinvoke(L); @@ -6706,7 +7319,7 @@ static int _spine_AlphaTimeline_getSlotIndex(lua_State *L) return num_ret; } -static int _spine_AlphaTimeline_new(lua_State *L) +static int _olua_fun_spine_AlphaTimeline_new(lua_State *L) { olua_startinvoke(L); @@ -6718,7 +7331,7 @@ static int _spine_AlphaTimeline_new(lua_State *L) olua_check_integer(L, 2, &arg2); olua_check_integer(L, 3, &arg3); - // AlphaTimeline(size_t frameCount, size_t bezierCount, int slotIndex) + // spine::AlphaTimeline(size_t frameCount, size_t bezierCount, int slotIndex) spine::AlphaTimeline *ret = new spine::AlphaTimeline(arg1, arg2, arg3); int num_ret = olua_push_object(L, ret, "spine.AlphaTimeline"); olua_postnew(L, ret); @@ -6728,7 +7341,7 @@ static int _spine_AlphaTimeline_new(lua_State *L) return num_ret; } -static int _spine_AlphaTimeline_setSlotIndex(lua_State *L) +static int _olua_fun_spine_AlphaTimeline_setSlotIndex(lua_State *L) { olua_startinvoke(L); @@ -6746,20 +7359,29 @@ static int _spine_AlphaTimeline_setSlotIndex(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_spine_AlphaTimeline(lua_State *L) +static int _olua_cls_spine_AlphaTimeline(lua_State *L) { oluacls_class(L, "spine.AlphaTimeline"); - oluacls_func(L, "getSlotIndex", _spine_AlphaTimeline_getSlotIndex); - oluacls_func(L, "new", _spine_AlphaTimeline_new); - oluacls_func(L, "setSlotIndex", _spine_AlphaTimeline_setSlotIndex); - oluacls_prop(L, "slotIndex", _spine_AlphaTimeline_getSlotIndex, _spine_AlphaTimeline_setSlotIndex); + oluacls_func(L, "getSlotIndex", _olua_fun_spine_AlphaTimeline_getSlotIndex); + oluacls_func(L, "new", _olua_fun_spine_AlphaTimeline_new); + oluacls_func(L, "setSlotIndex", _olua_fun_spine_AlphaTimeline_setSlotIndex); + oluacls_prop(L, "slotIndex", _olua_fun_spine_AlphaTimeline_getSlotIndex, _olua_fun_spine_AlphaTimeline_setSlotIndex); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_spine_AlphaTimeline(lua_State *L) +{ + olua_require(L, "spine", luaopen_spine); + if (!olua_getclass(L, "spine.AlphaTimeline")) { + luaL_error(L, "class not found: spine::AlphaTimeline"); + } return 1; } OLUA_END_DECLS -static int _spine_RGBA2Timeline_getSlotIndex(lua_State *L) +static int _olua_fun_spine_RGBA2Timeline_getSlotIndex(lua_State *L) { olua_startinvoke(L); @@ -6776,7 +7398,7 @@ static int _spine_RGBA2Timeline_getSlotIndex(lua_State *L) return num_ret; } -static int _spine_RGBA2Timeline_new(lua_State *L) +static int _olua_fun_spine_RGBA2Timeline_new(lua_State *L) { olua_startinvoke(L); @@ -6788,7 +7410,7 @@ static int _spine_RGBA2Timeline_new(lua_State *L) olua_check_integer(L, 2, &arg2); olua_check_integer(L, 3, &arg3); - // RGBA2Timeline(size_t frameCount, size_t bezierCount, int slotIndex) + // spine::RGBA2Timeline(size_t frameCount, size_t bezierCount, int slotIndex) spine::RGBA2Timeline *ret = new spine::RGBA2Timeline(arg1, arg2, arg3); int num_ret = olua_push_object(L, ret, "spine.RGBA2Timeline"); olua_postnew(L, ret); @@ -6798,7 +7420,7 @@ static int _spine_RGBA2Timeline_new(lua_State *L) return num_ret; } -static int _spine_RGBA2Timeline_setSlotIndex(lua_State *L) +static int _olua_fun_spine_RGBA2Timeline_setSlotIndex(lua_State *L) { olua_startinvoke(L); @@ -6816,20 +7438,29 @@ static int _spine_RGBA2Timeline_setSlotIndex(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_spine_RGBA2Timeline(lua_State *L) +static int _olua_cls_spine_RGBA2Timeline(lua_State *L) { oluacls_class(L, "spine.RGBA2Timeline"); - oluacls_func(L, "getSlotIndex", _spine_RGBA2Timeline_getSlotIndex); - oluacls_func(L, "new", _spine_RGBA2Timeline_new); - oluacls_func(L, "setSlotIndex", _spine_RGBA2Timeline_setSlotIndex); - oluacls_prop(L, "slotIndex", _spine_RGBA2Timeline_getSlotIndex, _spine_RGBA2Timeline_setSlotIndex); + oluacls_func(L, "getSlotIndex", _olua_fun_spine_RGBA2Timeline_getSlotIndex); + oluacls_func(L, "new", _olua_fun_spine_RGBA2Timeline_new); + oluacls_func(L, "setSlotIndex", _olua_fun_spine_RGBA2Timeline_setSlotIndex); + oluacls_prop(L, "slotIndex", _olua_fun_spine_RGBA2Timeline_getSlotIndex, _olua_fun_spine_RGBA2Timeline_setSlotIndex); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_spine_RGBA2Timeline(lua_State *L) +{ + olua_require(L, "spine", luaopen_spine); + if (!olua_getclass(L, "spine.RGBA2Timeline")) { + luaL_error(L, "class not found: spine::RGBA2Timeline"); + } return 1; } OLUA_END_DECLS -static int _spine_RGB2Timeline_getSlotIndex(lua_State *L) +static int _olua_fun_spine_RGB2Timeline_getSlotIndex(lua_State *L) { olua_startinvoke(L); @@ -6846,7 +7477,7 @@ static int _spine_RGB2Timeline_getSlotIndex(lua_State *L) return num_ret; } -static int _spine_RGB2Timeline_new(lua_State *L) +static int _olua_fun_spine_RGB2Timeline_new(lua_State *L) { olua_startinvoke(L); @@ -6858,7 +7489,7 @@ static int _spine_RGB2Timeline_new(lua_State *L) olua_check_integer(L, 2, &arg2); olua_check_integer(L, 3, &arg3); - // RGB2Timeline(size_t frameCount, size_t bezierCount, int slotIndex) + // spine::RGB2Timeline(size_t frameCount, size_t bezierCount, int slotIndex) spine::RGB2Timeline *ret = new spine::RGB2Timeline(arg1, arg2, arg3); int num_ret = olua_push_object(L, ret, "spine.RGB2Timeline"); olua_postnew(L, ret); @@ -6868,7 +7499,7 @@ static int _spine_RGB2Timeline_new(lua_State *L) return num_ret; } -static int _spine_RGB2Timeline_setSlotIndex(lua_State *L) +static int _olua_fun_spine_RGB2Timeline_setSlotIndex(lua_State *L) { olua_startinvoke(L); @@ -6886,20 +7517,29 @@ static int _spine_RGB2Timeline_setSlotIndex(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_spine_RGB2Timeline(lua_State *L) +static int _olua_cls_spine_RGB2Timeline(lua_State *L) { oluacls_class(L, "spine.RGB2Timeline"); - oluacls_func(L, "getSlotIndex", _spine_RGB2Timeline_getSlotIndex); - oluacls_func(L, "new", _spine_RGB2Timeline_new); - oluacls_func(L, "setSlotIndex", _spine_RGB2Timeline_setSlotIndex); - oluacls_prop(L, "slotIndex", _spine_RGB2Timeline_getSlotIndex, _spine_RGB2Timeline_setSlotIndex); + oluacls_func(L, "getSlotIndex", _olua_fun_spine_RGB2Timeline_getSlotIndex); + oluacls_func(L, "new", _olua_fun_spine_RGB2Timeline_new); + oluacls_func(L, "setSlotIndex", _olua_fun_spine_RGB2Timeline_setSlotIndex); + oluacls_prop(L, "slotIndex", _olua_fun_spine_RGB2Timeline_getSlotIndex, _olua_fun_spine_RGB2Timeline_setSlotIndex); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_spine_RGB2Timeline(lua_State *L) +{ + olua_require(L, "spine", luaopen_spine); + if (!olua_getclass(L, "spine.RGB2Timeline")) { + luaL_error(L, "class not found: spine::RGB2Timeline"); + } return 1; } OLUA_END_DECLS -static int _spine_DeformTimeline_getAttachment(lua_State *L) +static int _olua_fun_spine_DeformTimeline_getAttachment(lua_State *L) { olua_startinvoke(L); @@ -6916,7 +7556,7 @@ static int _spine_DeformTimeline_getAttachment(lua_State *L) return num_ret; } -static int _spine_DeformTimeline_getCurvePercent(lua_State *L) +static int _olua_fun_spine_DeformTimeline_getCurvePercent(lua_State *L) { olua_startinvoke(L); @@ -6937,7 +7577,7 @@ static int _spine_DeformTimeline_getCurvePercent(lua_State *L) return num_ret; } -static int _spine_DeformTimeline_getSlotIndex(lua_State *L) +static int _olua_fun_spine_DeformTimeline_getSlotIndex(lua_State *L) { olua_startinvoke(L); @@ -6954,7 +7594,7 @@ static int _spine_DeformTimeline_getSlotIndex(lua_State *L) return num_ret; } -static int _spine_DeformTimeline_new(lua_State *L) +static int _olua_fun_spine_DeformTimeline_new(lua_State *L) { olua_startinvoke(L); @@ -6968,7 +7608,7 @@ static int _spine_DeformTimeline_new(lua_State *L) olua_check_integer(L, 3, &arg3); olua_check_object(L, 4, &arg4, "spine.VertexAttachment"); - // DeformTimeline(size_t frameCount, size_t bezierCount, int slotIndex, spine::VertexAttachment *attachment) + // spine::DeformTimeline(size_t frameCount, size_t bezierCount, int slotIndex, spine::VertexAttachment *attachment) spine::DeformTimeline *ret = new spine::DeformTimeline(arg1, arg2, arg3, arg4); int num_ret = olua_push_object(L, ret, "spine.DeformTimeline"); olua_postnew(L, ret); @@ -6978,7 +7618,7 @@ static int _spine_DeformTimeline_new(lua_State *L) return num_ret; } -static int _spine_DeformTimeline_setAttachment(lua_State *L) +static int _olua_fun_spine_DeformTimeline_setAttachment(lua_State *L) { olua_startinvoke(L); @@ -6996,7 +7636,7 @@ static int _spine_DeformTimeline_setAttachment(lua_State *L) return 0; } -static int _spine_DeformTimeline_setSlotIndex(lua_State *L) +static int _olua_fun_spine_DeformTimeline_setSlotIndex(lua_State *L) { olua_startinvoke(L); @@ -7014,24 +7654,33 @@ static int _spine_DeformTimeline_setSlotIndex(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_spine_DeformTimeline(lua_State *L) +static int _olua_cls_spine_DeformTimeline(lua_State *L) { oluacls_class(L, "spine.DeformTimeline"); - oluacls_func(L, "getAttachment", _spine_DeformTimeline_getAttachment); - oluacls_func(L, "getCurvePercent", _spine_DeformTimeline_getCurvePercent); - oluacls_func(L, "getSlotIndex", _spine_DeformTimeline_getSlotIndex); - oluacls_func(L, "new", _spine_DeformTimeline_new); - oluacls_func(L, "setAttachment", _spine_DeformTimeline_setAttachment); - oluacls_func(L, "setSlotIndex", _spine_DeformTimeline_setSlotIndex); - oluacls_prop(L, "attachment", _spine_DeformTimeline_getAttachment, _spine_DeformTimeline_setAttachment); - oluacls_prop(L, "slotIndex", _spine_DeformTimeline_getSlotIndex, _spine_DeformTimeline_setSlotIndex); + oluacls_func(L, "getAttachment", _olua_fun_spine_DeformTimeline_getAttachment); + oluacls_func(L, "getCurvePercent", _olua_fun_spine_DeformTimeline_getCurvePercent); + oluacls_func(L, "getSlotIndex", _olua_fun_spine_DeformTimeline_getSlotIndex); + oluacls_func(L, "new", _olua_fun_spine_DeformTimeline_new); + oluacls_func(L, "setAttachment", _olua_fun_spine_DeformTimeline_setAttachment); + oluacls_func(L, "setSlotIndex", _olua_fun_spine_DeformTimeline_setSlotIndex); + oluacls_prop(L, "attachment", _olua_fun_spine_DeformTimeline_getAttachment, _olua_fun_spine_DeformTimeline_setAttachment); + oluacls_prop(L, "slotIndex", _olua_fun_spine_DeformTimeline_getSlotIndex, _olua_fun_spine_DeformTimeline_setSlotIndex); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_spine_DeformTimeline(lua_State *L) +{ + olua_require(L, "spine", luaopen_spine); + if (!olua_getclass(L, "spine.DeformTimeline")) { + luaL_error(L, "class not found: spine::DeformTimeline"); + } + return 1; +} OLUA_END_DECLS -static int _spine_DrawOrderTimeline_new(lua_State *L) +static int _olua_fun_spine_DrawOrderTimeline_new(lua_State *L) { olua_startinvoke(L); @@ -7039,7 +7688,7 @@ static int _spine_DrawOrderTimeline_new(lua_State *L) olua_check_integer(L, 1, &arg1); - // DrawOrderTimeline(size_t frameCount) + // spine::DrawOrderTimeline(size_t frameCount) spine::DrawOrderTimeline *ret = new spine::DrawOrderTimeline(arg1); int num_ret = olua_push_object(L, ret, "spine.DrawOrderTimeline"); olua_postnew(L, ret); @@ -7049,17 +7698,26 @@ static int _spine_DrawOrderTimeline_new(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_spine_DrawOrderTimeline(lua_State *L) +static int _olua_cls_spine_DrawOrderTimeline(lua_State *L) { oluacls_class(L, "spine.DrawOrderTimeline"); - oluacls_func(L, "new", _spine_DrawOrderTimeline_new); + oluacls_func(L, "new", _olua_fun_spine_DrawOrderTimeline_new); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_spine_DrawOrderTimeline(lua_State *L) +{ + olua_require(L, "spine", luaopen_spine); + if (!olua_getclass(L, "spine.DrawOrderTimeline")) { + luaL_error(L, "class not found: spine::DrawOrderTimeline"); + } return 1; } OLUA_END_DECLS -static int _spine_EventTimeline_new(lua_State *L) +static int _olua_fun_spine_EventTimeline_new(lua_State *L) { olua_startinvoke(L); @@ -7067,7 +7725,7 @@ static int _spine_EventTimeline_new(lua_State *L) olua_check_integer(L, 1, &arg1); - // EventTimeline(size_t frameCount) + // spine::EventTimeline(size_t frameCount) spine::EventTimeline *ret = new spine::EventTimeline(arg1); int num_ret = olua_push_object(L, ret, "spine.EventTimeline"); olua_postnew(L, ret); @@ -7077,17 +7735,26 @@ static int _spine_EventTimeline_new(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_spine_EventTimeline(lua_State *L) +static int _olua_cls_spine_EventTimeline(lua_State *L) { oluacls_class(L, "spine.EventTimeline"); - oluacls_func(L, "new", _spine_EventTimeline_new); + oluacls_func(L, "new", _olua_fun_spine_EventTimeline_new); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_spine_EventTimeline(lua_State *L) +{ + olua_require(L, "spine", luaopen_spine); + if (!olua_getclass(L, "spine.EventTimeline")) { + luaL_error(L, "class not found: spine::EventTimeline"); + } + return 1; +} OLUA_END_DECLS -static int _spine_ScaleXTimeline_getBoneIndex(lua_State *L) +static int _olua_fun_spine_ScaleXTimeline_getBoneIndex(lua_State *L) { olua_startinvoke(L); @@ -7104,7 +7771,7 @@ static int _spine_ScaleXTimeline_getBoneIndex(lua_State *L) return num_ret; } -static int _spine_ScaleXTimeline_new(lua_State *L) +static int _olua_fun_spine_ScaleXTimeline_new(lua_State *L) { olua_startinvoke(L); @@ -7116,7 +7783,7 @@ static int _spine_ScaleXTimeline_new(lua_State *L) olua_check_integer(L, 2, &arg2); olua_check_integer(L, 3, &arg3); - // ScaleXTimeline(size_t frameCount, size_t bezierCount, int boneIndex) + // spine::ScaleXTimeline(size_t frameCount, size_t bezierCount, int boneIndex) spine::ScaleXTimeline *ret = new spine::ScaleXTimeline(arg1, arg2, arg3); int num_ret = olua_push_object(L, ret, "spine.ScaleXTimeline"); olua_postnew(L, ret); @@ -7126,7 +7793,7 @@ static int _spine_ScaleXTimeline_new(lua_State *L) return num_ret; } -static int _spine_ScaleXTimeline_setBoneIndex(lua_State *L) +static int _olua_fun_spine_ScaleXTimeline_setBoneIndex(lua_State *L) { olua_startinvoke(L); @@ -7144,20 +7811,29 @@ static int _spine_ScaleXTimeline_setBoneIndex(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_spine_ScaleXTimeline(lua_State *L) +static int _olua_cls_spine_ScaleXTimeline(lua_State *L) { oluacls_class(L, "spine.ScaleXTimeline"); - oluacls_func(L, "getBoneIndex", _spine_ScaleXTimeline_getBoneIndex); - oluacls_func(L, "new", _spine_ScaleXTimeline_new); - oluacls_func(L, "setBoneIndex", _spine_ScaleXTimeline_setBoneIndex); - oluacls_prop(L, "boneIndex", _spine_ScaleXTimeline_getBoneIndex, _spine_ScaleXTimeline_setBoneIndex); + oluacls_func(L, "getBoneIndex", _olua_fun_spine_ScaleXTimeline_getBoneIndex); + oluacls_func(L, "new", _olua_fun_spine_ScaleXTimeline_new); + oluacls_func(L, "setBoneIndex", _olua_fun_spine_ScaleXTimeline_setBoneIndex); + oluacls_prop(L, "boneIndex", _olua_fun_spine_ScaleXTimeline_getBoneIndex, _olua_fun_spine_ScaleXTimeline_setBoneIndex); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_spine_ScaleXTimeline(lua_State *L) +{ + olua_require(L, "spine", luaopen_spine); + if (!olua_getclass(L, "spine.ScaleXTimeline")) { + luaL_error(L, "class not found: spine::ScaleXTimeline"); + } + return 1; +} OLUA_END_DECLS -static int _spine_ScaleYTimeline_getBoneIndex(lua_State *L) +static int _olua_fun_spine_ScaleYTimeline_getBoneIndex(lua_State *L) { olua_startinvoke(L); @@ -7174,7 +7850,7 @@ static int _spine_ScaleYTimeline_getBoneIndex(lua_State *L) return num_ret; } -static int _spine_ScaleYTimeline_new(lua_State *L) +static int _olua_fun_spine_ScaleYTimeline_new(lua_State *L) { olua_startinvoke(L); @@ -7186,7 +7862,7 @@ static int _spine_ScaleYTimeline_new(lua_State *L) olua_check_integer(L, 2, &arg2); olua_check_integer(L, 3, &arg3); - // ScaleYTimeline(size_t frameCount, size_t bezierCount, int boneIndex) + // spine::ScaleYTimeline(size_t frameCount, size_t bezierCount, int boneIndex) spine::ScaleYTimeline *ret = new spine::ScaleYTimeline(arg1, arg2, arg3); int num_ret = olua_push_object(L, ret, "spine.ScaleYTimeline"); olua_postnew(L, ret); @@ -7196,7 +7872,7 @@ static int _spine_ScaleYTimeline_new(lua_State *L) return num_ret; } -static int _spine_ScaleYTimeline_setBoneIndex(lua_State *L) +static int _olua_fun_spine_ScaleYTimeline_setBoneIndex(lua_State *L) { olua_startinvoke(L); @@ -7214,20 +7890,29 @@ static int _spine_ScaleYTimeline_setBoneIndex(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_spine_ScaleYTimeline(lua_State *L) +static int _olua_cls_spine_ScaleYTimeline(lua_State *L) { oluacls_class(L, "spine.ScaleYTimeline"); - oluacls_func(L, "getBoneIndex", _spine_ScaleYTimeline_getBoneIndex); - oluacls_func(L, "new", _spine_ScaleYTimeline_new); - oluacls_func(L, "setBoneIndex", _spine_ScaleYTimeline_setBoneIndex); - oluacls_prop(L, "boneIndex", _spine_ScaleYTimeline_getBoneIndex, _spine_ScaleYTimeline_setBoneIndex); + oluacls_func(L, "getBoneIndex", _olua_fun_spine_ScaleYTimeline_getBoneIndex); + oluacls_func(L, "new", _olua_fun_spine_ScaleYTimeline_new); + oluacls_func(L, "setBoneIndex", _olua_fun_spine_ScaleYTimeline_setBoneIndex); + oluacls_prop(L, "boneIndex", _olua_fun_spine_ScaleYTimeline_getBoneIndex, _olua_fun_spine_ScaleYTimeline_setBoneIndex); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_spine_ScaleYTimeline(lua_State *L) +{ + olua_require(L, "spine", luaopen_spine); + if (!olua_getclass(L, "spine.ScaleYTimeline")) { + luaL_error(L, "class not found: spine::ScaleYTimeline"); + } return 1; } OLUA_END_DECLS -static int _spine_ShearXTimeline_getBoneIndex(lua_State *L) +static int _olua_fun_spine_ShearXTimeline_getBoneIndex(lua_State *L) { olua_startinvoke(L); @@ -7244,7 +7929,7 @@ static int _spine_ShearXTimeline_getBoneIndex(lua_State *L) return num_ret; } -static int _spine_ShearXTimeline_new(lua_State *L) +static int _olua_fun_spine_ShearXTimeline_new(lua_State *L) { olua_startinvoke(L); @@ -7256,7 +7941,7 @@ static int _spine_ShearXTimeline_new(lua_State *L) olua_check_integer(L, 2, &arg2); olua_check_integer(L, 3, &arg3); - // ShearXTimeline(size_t frameCount, size_t bezierCount, int boneIndex) + // spine::ShearXTimeline(size_t frameCount, size_t bezierCount, int boneIndex) spine::ShearXTimeline *ret = new spine::ShearXTimeline(arg1, arg2, arg3); int num_ret = olua_push_object(L, ret, "spine.ShearXTimeline"); olua_postnew(L, ret); @@ -7266,7 +7951,7 @@ static int _spine_ShearXTimeline_new(lua_State *L) return num_ret; } -static int _spine_ShearXTimeline_setBoneIndex(lua_State *L) +static int _olua_fun_spine_ShearXTimeline_setBoneIndex(lua_State *L) { olua_startinvoke(L); @@ -7284,20 +7969,29 @@ static int _spine_ShearXTimeline_setBoneIndex(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_spine_ShearXTimeline(lua_State *L) +static int _olua_cls_spine_ShearXTimeline(lua_State *L) { oluacls_class(L, "spine.ShearXTimeline"); - oluacls_func(L, "getBoneIndex", _spine_ShearXTimeline_getBoneIndex); - oluacls_func(L, "new", _spine_ShearXTimeline_new); - oluacls_func(L, "setBoneIndex", _spine_ShearXTimeline_setBoneIndex); - oluacls_prop(L, "boneIndex", _spine_ShearXTimeline_getBoneIndex, _spine_ShearXTimeline_setBoneIndex); + oluacls_func(L, "getBoneIndex", _olua_fun_spine_ShearXTimeline_getBoneIndex); + oluacls_func(L, "new", _olua_fun_spine_ShearXTimeline_new); + oluacls_func(L, "setBoneIndex", _olua_fun_spine_ShearXTimeline_setBoneIndex); + oluacls_prop(L, "boneIndex", _olua_fun_spine_ShearXTimeline_getBoneIndex, _olua_fun_spine_ShearXTimeline_setBoneIndex); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_spine_ShearXTimeline(lua_State *L) +{ + olua_require(L, "spine", luaopen_spine); + if (!olua_getclass(L, "spine.ShearXTimeline")) { + luaL_error(L, "class not found: spine::ShearXTimeline"); + } return 1; } OLUA_END_DECLS -static int _spine_ShearYTimeline_getBoneIndex(lua_State *L) +static int _olua_fun_spine_ShearYTimeline_getBoneIndex(lua_State *L) { olua_startinvoke(L); @@ -7314,7 +8008,7 @@ static int _spine_ShearYTimeline_getBoneIndex(lua_State *L) return num_ret; } -static int _spine_ShearYTimeline_new(lua_State *L) +static int _olua_fun_spine_ShearYTimeline_new(lua_State *L) { olua_startinvoke(L); @@ -7326,7 +8020,7 @@ static int _spine_ShearYTimeline_new(lua_State *L) olua_check_integer(L, 2, &arg2); olua_check_integer(L, 3, &arg3); - // ShearYTimeline(size_t frameCount, size_t bezierCount, int boneIndex) + // spine::ShearYTimeline(size_t frameCount, size_t bezierCount, int boneIndex) spine::ShearYTimeline *ret = new spine::ShearYTimeline(arg1, arg2, arg3); int num_ret = olua_push_object(L, ret, "spine.ShearYTimeline"); olua_postnew(L, ret); @@ -7336,7 +8030,7 @@ static int _spine_ShearYTimeline_new(lua_State *L) return num_ret; } -static int _spine_ShearYTimeline_setBoneIndex(lua_State *L) +static int _olua_fun_spine_ShearYTimeline_setBoneIndex(lua_State *L) { olua_startinvoke(L); @@ -7354,20 +8048,29 @@ static int _spine_ShearYTimeline_setBoneIndex(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_spine_ShearYTimeline(lua_State *L) +static int _olua_cls_spine_ShearYTimeline(lua_State *L) { oluacls_class(L, "spine.ShearYTimeline"); - oluacls_func(L, "getBoneIndex", _spine_ShearYTimeline_getBoneIndex); - oluacls_func(L, "new", _spine_ShearYTimeline_new); - oluacls_func(L, "setBoneIndex", _spine_ShearYTimeline_setBoneIndex); - oluacls_prop(L, "boneIndex", _spine_ShearYTimeline_getBoneIndex, _spine_ShearYTimeline_setBoneIndex); + oluacls_func(L, "getBoneIndex", _olua_fun_spine_ShearYTimeline_getBoneIndex); + oluacls_func(L, "new", _olua_fun_spine_ShearYTimeline_new); + oluacls_func(L, "setBoneIndex", _olua_fun_spine_ShearYTimeline_setBoneIndex); + oluacls_prop(L, "boneIndex", _olua_fun_spine_ShearYTimeline_getBoneIndex, _olua_fun_spine_ShearYTimeline_setBoneIndex); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_spine_ShearYTimeline(lua_State *L) +{ + olua_require(L, "spine", luaopen_spine); + if (!olua_getclass(L, "spine.ShearYTimeline")) { + luaL_error(L, "class not found: spine::ShearYTimeline"); + } return 1; } OLUA_END_DECLS -static int _spine_TranslateXTimeline_getBoneIndex(lua_State *L) +static int _olua_fun_spine_TranslateXTimeline_getBoneIndex(lua_State *L) { olua_startinvoke(L); @@ -7384,7 +8087,7 @@ static int _spine_TranslateXTimeline_getBoneIndex(lua_State *L) return num_ret; } -static int _spine_TranslateXTimeline_new(lua_State *L) +static int _olua_fun_spine_TranslateXTimeline_new(lua_State *L) { olua_startinvoke(L); @@ -7396,7 +8099,7 @@ static int _spine_TranslateXTimeline_new(lua_State *L) olua_check_integer(L, 2, &arg2); olua_check_integer(L, 3, &arg3); - // TranslateXTimeline(size_t frameCount, size_t bezierCount, int boneIndex) + // spine::TranslateXTimeline(size_t frameCount, size_t bezierCount, int boneIndex) spine::TranslateXTimeline *ret = new spine::TranslateXTimeline(arg1, arg2, arg3); int num_ret = olua_push_object(L, ret, "spine.TranslateXTimeline"); olua_postnew(L, ret); @@ -7406,7 +8109,7 @@ static int _spine_TranslateXTimeline_new(lua_State *L) return num_ret; } -static int _spine_TranslateXTimeline_setBoneIndex(lua_State *L) +static int _olua_fun_spine_TranslateXTimeline_setBoneIndex(lua_State *L) { olua_startinvoke(L); @@ -7424,20 +8127,29 @@ static int _spine_TranslateXTimeline_setBoneIndex(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_spine_TranslateXTimeline(lua_State *L) +static int _olua_cls_spine_TranslateXTimeline(lua_State *L) { oluacls_class(L, "spine.TranslateXTimeline"); - oluacls_func(L, "getBoneIndex", _spine_TranslateXTimeline_getBoneIndex); - oluacls_func(L, "new", _spine_TranslateXTimeline_new); - oluacls_func(L, "setBoneIndex", _spine_TranslateXTimeline_setBoneIndex); - oluacls_prop(L, "boneIndex", _spine_TranslateXTimeline_getBoneIndex, _spine_TranslateXTimeline_setBoneIndex); + oluacls_func(L, "getBoneIndex", _olua_fun_spine_TranslateXTimeline_getBoneIndex); + oluacls_func(L, "new", _olua_fun_spine_TranslateXTimeline_new); + oluacls_func(L, "setBoneIndex", _olua_fun_spine_TranslateXTimeline_setBoneIndex); + oluacls_prop(L, "boneIndex", _olua_fun_spine_TranslateXTimeline_getBoneIndex, _olua_fun_spine_TranslateXTimeline_setBoneIndex); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_spine_TranslateXTimeline(lua_State *L) +{ + olua_require(L, "spine", luaopen_spine); + if (!olua_getclass(L, "spine.TranslateXTimeline")) { + luaL_error(L, "class not found: spine::TranslateXTimeline"); + } + return 1; +} OLUA_END_DECLS -static int _spine_TranslateYTimeline_getBoneIndex(lua_State *L) +static int _olua_fun_spine_TranslateYTimeline_getBoneIndex(lua_State *L) { olua_startinvoke(L); @@ -7454,7 +8166,7 @@ static int _spine_TranslateYTimeline_getBoneIndex(lua_State *L) return num_ret; } -static int _spine_TranslateYTimeline_new(lua_State *L) +static int _olua_fun_spine_TranslateYTimeline_new(lua_State *L) { olua_startinvoke(L); @@ -7466,7 +8178,7 @@ static int _spine_TranslateYTimeline_new(lua_State *L) olua_check_integer(L, 2, &arg2); olua_check_integer(L, 3, &arg3); - // TranslateYTimeline(size_t frameCount, size_t bezierCount, int boneIndex) + // spine::TranslateYTimeline(size_t frameCount, size_t bezierCount, int boneIndex) spine::TranslateYTimeline *ret = new spine::TranslateYTimeline(arg1, arg2, arg3); int num_ret = olua_push_object(L, ret, "spine.TranslateYTimeline"); olua_postnew(L, ret); @@ -7476,7 +8188,7 @@ static int _spine_TranslateYTimeline_new(lua_State *L) return num_ret; } -static int _spine_TranslateYTimeline_setBoneIndex(lua_State *L) +static int _olua_fun_spine_TranslateYTimeline_setBoneIndex(lua_State *L) { olua_startinvoke(L); @@ -7494,20 +8206,29 @@ static int _spine_TranslateYTimeline_setBoneIndex(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_spine_TranslateYTimeline(lua_State *L) +static int _olua_cls_spine_TranslateYTimeline(lua_State *L) { oluacls_class(L, "spine.TranslateYTimeline"); - oluacls_func(L, "getBoneIndex", _spine_TranslateYTimeline_getBoneIndex); - oluacls_func(L, "new", _spine_TranslateYTimeline_new); - oluacls_func(L, "setBoneIndex", _spine_TranslateYTimeline_setBoneIndex); - oluacls_prop(L, "boneIndex", _spine_TranslateYTimeline_getBoneIndex, _spine_TranslateYTimeline_setBoneIndex); + oluacls_func(L, "getBoneIndex", _olua_fun_spine_TranslateYTimeline_getBoneIndex); + oluacls_func(L, "new", _olua_fun_spine_TranslateYTimeline_new); + oluacls_func(L, "setBoneIndex", _olua_fun_spine_TranslateYTimeline_setBoneIndex); + oluacls_prop(L, "boneIndex", _olua_fun_spine_TranslateYTimeline_getBoneIndex, _olua_fun_spine_TranslateYTimeline_setBoneIndex); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_spine_TranslateYTimeline(lua_State *L) +{ + olua_require(L, "spine", luaopen_spine); + if (!olua_getclass(L, "spine.TranslateYTimeline")) { + luaL_error(L, "class not found: spine::TranslateYTimeline"); + } return 1; } OLUA_END_DECLS -static int _spine_IkConstraintTimeline_getIkConstraintIndex(lua_State *L) +static int _olua_fun_spine_IkConstraintTimeline_getIkConstraintIndex(lua_State *L) { olua_startinvoke(L); @@ -7524,7 +8245,7 @@ static int _spine_IkConstraintTimeline_getIkConstraintIndex(lua_State *L) return num_ret; } -static int _spine_IkConstraintTimeline_new(lua_State *L) +static int _olua_fun_spine_IkConstraintTimeline_new(lua_State *L) { olua_startinvoke(L); @@ -7536,7 +8257,7 @@ static int _spine_IkConstraintTimeline_new(lua_State *L) olua_check_integer(L, 2, &arg2); olua_check_integer(L, 3, &arg3); - // IkConstraintTimeline(size_t frameCount, size_t bezierCount, int ikConstraintIndex) + // spine::IkConstraintTimeline(size_t frameCount, size_t bezierCount, int ikConstraintIndex) spine::IkConstraintTimeline *ret = new spine::IkConstraintTimeline(arg1, arg2, arg3); int num_ret = olua_push_object(L, ret, "spine.IkConstraintTimeline"); olua_postnew(L, ret); @@ -7546,7 +8267,7 @@ static int _spine_IkConstraintTimeline_new(lua_State *L) return num_ret; } -static int _spine_IkConstraintTimeline_setIkConstraintIndex(lua_State *L) +static int _olua_fun_spine_IkConstraintTimeline_setIkConstraintIndex(lua_State *L) { olua_startinvoke(L); @@ -7564,20 +8285,29 @@ static int _spine_IkConstraintTimeline_setIkConstraintIndex(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_spine_IkConstraintTimeline(lua_State *L) +static int _olua_cls_spine_IkConstraintTimeline(lua_State *L) { oluacls_class(L, "spine.IkConstraintTimeline"); - oluacls_func(L, "getIkConstraintIndex", _spine_IkConstraintTimeline_getIkConstraintIndex); - oluacls_func(L, "new", _spine_IkConstraintTimeline_new); - oluacls_func(L, "setIkConstraintIndex", _spine_IkConstraintTimeline_setIkConstraintIndex); - oluacls_prop(L, "ikConstraintIndex", _spine_IkConstraintTimeline_getIkConstraintIndex, _spine_IkConstraintTimeline_setIkConstraintIndex); + oluacls_func(L, "getIkConstraintIndex", _olua_fun_spine_IkConstraintTimeline_getIkConstraintIndex); + oluacls_func(L, "new", _olua_fun_spine_IkConstraintTimeline_new); + oluacls_func(L, "setIkConstraintIndex", _olua_fun_spine_IkConstraintTimeline_setIkConstraintIndex); + oluacls_prop(L, "ikConstraintIndex", _olua_fun_spine_IkConstraintTimeline_getIkConstraintIndex, _olua_fun_spine_IkConstraintTimeline_setIkConstraintIndex); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_spine_IkConstraintTimeline(lua_State *L) +{ + olua_require(L, "spine", luaopen_spine); + if (!olua_getclass(L, "spine.IkConstraintTimeline")) { + luaL_error(L, "class not found: spine::IkConstraintTimeline"); + } + return 1; +} OLUA_END_DECLS -static int _spine_PathConstraintMixTimeline_getPathConstraintIndex(lua_State *L) +static int _olua_fun_spine_PathConstraintMixTimeline_getPathConstraintIndex(lua_State *L) { olua_startinvoke(L); @@ -7594,7 +8324,7 @@ static int _spine_PathConstraintMixTimeline_getPathConstraintIndex(lua_State *L) return num_ret; } -static int _spine_PathConstraintMixTimeline_new(lua_State *L) +static int _olua_fun_spine_PathConstraintMixTimeline_new(lua_State *L) { olua_startinvoke(L); @@ -7606,7 +8336,7 @@ static int _spine_PathConstraintMixTimeline_new(lua_State *L) olua_check_integer(L, 2, &arg2); olua_check_integer(L, 3, &arg3); - // PathConstraintMixTimeline(size_t frameCount, size_t bezierCount, int pathConstraintIndex) + // spine::PathConstraintMixTimeline(size_t frameCount, size_t bezierCount, int pathConstraintIndex) spine::PathConstraintMixTimeline *ret = new spine::PathConstraintMixTimeline(arg1, arg2, arg3); int num_ret = olua_push_object(L, ret, "spine.PathConstraintMixTimeline"); olua_postnew(L, ret); @@ -7616,7 +8346,7 @@ static int _spine_PathConstraintMixTimeline_new(lua_State *L) return num_ret; } -static int _spine_PathConstraintMixTimeline_setPathConstraintIndex(lua_State *L) +static int _olua_fun_spine_PathConstraintMixTimeline_setPathConstraintIndex(lua_State *L) { olua_startinvoke(L); @@ -7634,20 +8364,29 @@ static int _spine_PathConstraintMixTimeline_setPathConstraintIndex(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_spine_PathConstraintMixTimeline(lua_State *L) +static int _olua_cls_spine_PathConstraintMixTimeline(lua_State *L) { oluacls_class(L, "spine.PathConstraintMixTimeline"); - oluacls_func(L, "getPathConstraintIndex", _spine_PathConstraintMixTimeline_getPathConstraintIndex); - oluacls_func(L, "new", _spine_PathConstraintMixTimeline_new); - oluacls_func(L, "setPathConstraintIndex", _spine_PathConstraintMixTimeline_setPathConstraintIndex); - oluacls_prop(L, "pathConstraintIndex", _spine_PathConstraintMixTimeline_getPathConstraintIndex, _spine_PathConstraintMixTimeline_setPathConstraintIndex); + oluacls_func(L, "getPathConstraintIndex", _olua_fun_spine_PathConstraintMixTimeline_getPathConstraintIndex); + oluacls_func(L, "new", _olua_fun_spine_PathConstraintMixTimeline_new); + oluacls_func(L, "setPathConstraintIndex", _olua_fun_spine_PathConstraintMixTimeline_setPathConstraintIndex); + oluacls_prop(L, "pathConstraintIndex", _olua_fun_spine_PathConstraintMixTimeline_getPathConstraintIndex, _olua_fun_spine_PathConstraintMixTimeline_setPathConstraintIndex); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_spine_PathConstraintMixTimeline(lua_State *L) +{ + olua_require(L, "spine", luaopen_spine); + if (!olua_getclass(L, "spine.PathConstraintMixTimeline")) { + luaL_error(L, "class not found: spine::PathConstraintMixTimeline"); + } + return 1; +} OLUA_END_DECLS -static int _spine_PathConstraintPositionTimeline_getPathConstraintIndex(lua_State *L) +static int _olua_fun_spine_PathConstraintPositionTimeline_getPathConstraintIndex(lua_State *L) { olua_startinvoke(L); @@ -7664,7 +8403,7 @@ static int _spine_PathConstraintPositionTimeline_getPathConstraintIndex(lua_Stat return num_ret; } -static int _spine_PathConstraintPositionTimeline_new(lua_State *L) +static int _olua_fun_spine_PathConstraintPositionTimeline_new(lua_State *L) { olua_startinvoke(L); @@ -7676,7 +8415,7 @@ static int _spine_PathConstraintPositionTimeline_new(lua_State *L) olua_check_integer(L, 2, &arg2); olua_check_integer(L, 3, &arg3); - // PathConstraintPositionTimeline(size_t frameCount, size_t bezierCount, int pathConstraintIndex) + // spine::PathConstraintPositionTimeline(size_t frameCount, size_t bezierCount, int pathConstraintIndex) spine::PathConstraintPositionTimeline *ret = new spine::PathConstraintPositionTimeline(arg1, arg2, arg3); int num_ret = olua_push_object(L, ret, "spine.PathConstraintPositionTimeline"); olua_postnew(L, ret); @@ -7686,7 +8425,7 @@ static int _spine_PathConstraintPositionTimeline_new(lua_State *L) return num_ret; } -static int _spine_PathConstraintPositionTimeline_setPathConstraintIndex(lua_State *L) +static int _olua_fun_spine_PathConstraintPositionTimeline_setPathConstraintIndex(lua_State *L) { olua_startinvoke(L); @@ -7704,21 +8443,30 @@ static int _spine_PathConstraintPositionTimeline_setPathConstraintIndex(lua_Stat return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_spine_PathConstraintPositionTimeline(lua_State *L) +static int _olua_cls_spine_PathConstraintPositionTimeline(lua_State *L) { oluacls_class(L, "spine.PathConstraintPositionTimeline"); - oluacls_func(L, "getPathConstraintIndex", _spine_PathConstraintPositionTimeline_getPathConstraintIndex); - oluacls_func(L, "new", _spine_PathConstraintPositionTimeline_new); - oluacls_func(L, "setPathConstraintIndex", _spine_PathConstraintPositionTimeline_setPathConstraintIndex); - oluacls_prop(L, "pathConstraintIndex", _spine_PathConstraintPositionTimeline_getPathConstraintIndex, _spine_PathConstraintPositionTimeline_setPathConstraintIndex); + oluacls_func(L, "getPathConstraintIndex", _olua_fun_spine_PathConstraintPositionTimeline_getPathConstraintIndex); + oluacls_func(L, "new", _olua_fun_spine_PathConstraintPositionTimeline_new); + oluacls_func(L, "setPathConstraintIndex", _olua_fun_spine_PathConstraintPositionTimeline_setPathConstraintIndex); + oluacls_prop(L, "pathConstraintIndex", _olua_fun_spine_PathConstraintPositionTimeline_getPathConstraintIndex, _olua_fun_spine_PathConstraintPositionTimeline_setPathConstraintIndex); oluacls_const(L, "ENTRIES", spine::PathConstraintPositionTimeline::ENTRIES); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_spine_PathConstraintPositionTimeline(lua_State *L) +{ + olua_require(L, "spine", luaopen_spine); + if (!olua_getclass(L, "spine.PathConstraintPositionTimeline")) { + luaL_error(L, "class not found: spine::PathConstraintPositionTimeline"); + } + return 1; +} OLUA_END_DECLS -static int _spine_PathConstraintSpacingTimeline_getPathConstraintIndex(lua_State *L) +static int _olua_fun_spine_PathConstraintSpacingTimeline_getPathConstraintIndex(lua_State *L) { olua_startinvoke(L); @@ -7735,7 +8483,7 @@ static int _spine_PathConstraintSpacingTimeline_getPathConstraintIndex(lua_State return num_ret; } -static int _spine_PathConstraintSpacingTimeline_new(lua_State *L) +static int _olua_fun_spine_PathConstraintSpacingTimeline_new(lua_State *L) { olua_startinvoke(L); @@ -7747,7 +8495,7 @@ static int _spine_PathConstraintSpacingTimeline_new(lua_State *L) olua_check_integer(L, 2, &arg2); olua_check_integer(L, 3, &arg3); - // PathConstraintSpacingTimeline(size_t frameCount, size_t bezierCount, int pathConstraintIndex) + // spine::PathConstraintSpacingTimeline(size_t frameCount, size_t bezierCount, int pathConstraintIndex) spine::PathConstraintSpacingTimeline *ret = new spine::PathConstraintSpacingTimeline(arg1, arg2, arg3); int num_ret = olua_push_object(L, ret, "spine.PathConstraintSpacingTimeline"); olua_postnew(L, ret); @@ -7757,7 +8505,7 @@ static int _spine_PathConstraintSpacingTimeline_new(lua_State *L) return num_ret; } -static int _spine_PathConstraintSpacingTimeline_setPathConstraintIndex(lua_State *L) +static int _olua_fun_spine_PathConstraintSpacingTimeline_setPathConstraintIndex(lua_State *L) { olua_startinvoke(L); @@ -7775,20 +8523,29 @@ static int _spine_PathConstraintSpacingTimeline_setPathConstraintIndex(lua_State return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_spine_PathConstraintSpacingTimeline(lua_State *L) +static int _olua_cls_spine_PathConstraintSpacingTimeline(lua_State *L) { oluacls_class(L, "spine.PathConstraintSpacingTimeline"); - oluacls_func(L, "getPathConstraintIndex", _spine_PathConstraintSpacingTimeline_getPathConstraintIndex); - oluacls_func(L, "new", _spine_PathConstraintSpacingTimeline_new); - oluacls_func(L, "setPathConstraintIndex", _spine_PathConstraintSpacingTimeline_setPathConstraintIndex); - oluacls_prop(L, "pathConstraintIndex", _spine_PathConstraintSpacingTimeline_getPathConstraintIndex, _spine_PathConstraintSpacingTimeline_setPathConstraintIndex); + oluacls_func(L, "getPathConstraintIndex", _olua_fun_spine_PathConstraintSpacingTimeline_getPathConstraintIndex); + oluacls_func(L, "new", _olua_fun_spine_PathConstraintSpacingTimeline_new); + oluacls_func(L, "setPathConstraintIndex", _olua_fun_spine_PathConstraintSpacingTimeline_setPathConstraintIndex); + oluacls_prop(L, "pathConstraintIndex", _olua_fun_spine_PathConstraintSpacingTimeline_getPathConstraintIndex, _olua_fun_spine_PathConstraintSpacingTimeline_setPathConstraintIndex); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_spine_PathConstraintSpacingTimeline(lua_State *L) +{ + olua_require(L, "spine", luaopen_spine); + if (!olua_getclass(L, "spine.PathConstraintSpacingTimeline")) { + luaL_error(L, "class not found: spine::PathConstraintSpacingTimeline"); + } return 1; } OLUA_END_DECLS -static int _spine_TranslateTimeline_getBoneIndex(lua_State *L) +static int _olua_fun_spine_TranslateTimeline_getBoneIndex(lua_State *L) { olua_startinvoke(L); @@ -7805,7 +8562,7 @@ static int _spine_TranslateTimeline_getBoneIndex(lua_State *L) return num_ret; } -static int _spine_TranslateTimeline_new(lua_State *L) +static int _olua_fun_spine_TranslateTimeline_new(lua_State *L) { olua_startinvoke(L); @@ -7817,7 +8574,7 @@ static int _spine_TranslateTimeline_new(lua_State *L) olua_check_integer(L, 2, &arg2); olua_check_integer(L, 3, &arg3); - // TranslateTimeline(size_t frameCount, size_t bezierCount, int boneIndex) + // spine::TranslateTimeline(size_t frameCount, size_t bezierCount, int boneIndex) spine::TranslateTimeline *ret = new spine::TranslateTimeline(arg1, arg2, arg3); int num_ret = olua_push_object(L, ret, "spine.TranslateTimeline"); olua_postnew(L, ret); @@ -7827,7 +8584,7 @@ static int _spine_TranslateTimeline_new(lua_State *L) return num_ret; } -static int _spine_TranslateTimeline_setBoneIndex(lua_State *L) +static int _olua_fun_spine_TranslateTimeline_setBoneIndex(lua_State *L) { olua_startinvoke(L); @@ -7845,20 +8602,29 @@ static int _spine_TranslateTimeline_setBoneIndex(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_spine_TranslateTimeline(lua_State *L) +static int _olua_cls_spine_TranslateTimeline(lua_State *L) { oluacls_class(L, "spine.TranslateTimeline"); - oluacls_func(L, "getBoneIndex", _spine_TranslateTimeline_getBoneIndex); - oluacls_func(L, "new", _spine_TranslateTimeline_new); - oluacls_func(L, "setBoneIndex", _spine_TranslateTimeline_setBoneIndex); - oluacls_prop(L, "boneIndex", _spine_TranslateTimeline_getBoneIndex, _spine_TranslateTimeline_setBoneIndex); + oluacls_func(L, "getBoneIndex", _olua_fun_spine_TranslateTimeline_getBoneIndex); + oluacls_func(L, "new", _olua_fun_spine_TranslateTimeline_new); + oluacls_func(L, "setBoneIndex", _olua_fun_spine_TranslateTimeline_setBoneIndex); + oluacls_prop(L, "boneIndex", _olua_fun_spine_TranslateTimeline_getBoneIndex, _olua_fun_spine_TranslateTimeline_setBoneIndex); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_spine_TranslateTimeline(lua_State *L) +{ + olua_require(L, "spine", luaopen_spine); + if (!olua_getclass(L, "spine.TranslateTimeline")) { + luaL_error(L, "class not found: spine::TranslateTimeline"); + } return 1; } OLUA_END_DECLS -static int _spine_ShearTimeline_getBoneIndex(lua_State *L) +static int _olua_fun_spine_ShearTimeline_getBoneIndex(lua_State *L) { olua_startinvoke(L); @@ -7875,7 +8641,7 @@ static int _spine_ShearTimeline_getBoneIndex(lua_State *L) return num_ret; } -static int _spine_ShearTimeline_new(lua_State *L) +static int _olua_fun_spine_ShearTimeline_new(lua_State *L) { olua_startinvoke(L); @@ -7887,7 +8653,7 @@ static int _spine_ShearTimeline_new(lua_State *L) olua_check_integer(L, 2, &arg2); olua_check_integer(L, 3, &arg3); - // ShearTimeline(size_t frameCount, size_t bezierCount, int boneIndex) + // spine::ShearTimeline(size_t frameCount, size_t bezierCount, int boneIndex) spine::ShearTimeline *ret = new spine::ShearTimeline(arg1, arg2, arg3); int num_ret = olua_push_object(L, ret, "spine.ShearTimeline"); olua_postnew(L, ret); @@ -7897,7 +8663,7 @@ static int _spine_ShearTimeline_new(lua_State *L) return num_ret; } -static int _spine_ShearTimeline_setBoneIndex(lua_State *L) +static int _olua_fun_spine_ShearTimeline_setBoneIndex(lua_State *L) { olua_startinvoke(L); @@ -7915,20 +8681,29 @@ static int _spine_ShearTimeline_setBoneIndex(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_spine_ShearTimeline(lua_State *L) +static int _olua_cls_spine_ShearTimeline(lua_State *L) { oluacls_class(L, "spine.ShearTimeline"); - oluacls_func(L, "getBoneIndex", _spine_ShearTimeline_getBoneIndex); - oluacls_func(L, "new", _spine_ShearTimeline_new); - oluacls_func(L, "setBoneIndex", _spine_ShearTimeline_setBoneIndex); - oluacls_prop(L, "boneIndex", _spine_ShearTimeline_getBoneIndex, _spine_ShearTimeline_setBoneIndex); + oluacls_func(L, "getBoneIndex", _olua_fun_spine_ShearTimeline_getBoneIndex); + oluacls_func(L, "new", _olua_fun_spine_ShearTimeline_new); + oluacls_func(L, "setBoneIndex", _olua_fun_spine_ShearTimeline_setBoneIndex); + oluacls_prop(L, "boneIndex", _olua_fun_spine_ShearTimeline_getBoneIndex, _olua_fun_spine_ShearTimeline_setBoneIndex); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_spine_ShearTimeline(lua_State *L) +{ + olua_require(L, "spine", luaopen_spine); + if (!olua_getclass(L, "spine.ShearTimeline")) { + luaL_error(L, "class not found: spine::ShearTimeline"); + } + return 1; +} OLUA_END_DECLS -static int _spine_TransformConstraintTimeline_getTransformConstraintIndex(lua_State *L) +static int _olua_fun_spine_TransformConstraintTimeline_getTransformConstraintIndex(lua_State *L) { olua_startinvoke(L); @@ -7945,7 +8720,7 @@ static int _spine_TransformConstraintTimeline_getTransformConstraintIndex(lua_St return num_ret; } -static int _spine_TransformConstraintTimeline_new(lua_State *L) +static int _olua_fun_spine_TransformConstraintTimeline_new(lua_State *L) { olua_startinvoke(L); @@ -7957,7 +8732,7 @@ static int _spine_TransformConstraintTimeline_new(lua_State *L) olua_check_integer(L, 2, &arg2); olua_check_integer(L, 3, &arg3); - // TransformConstraintTimeline(size_t frameCount, size_t bezierCount, int transformConstraintIndex) + // spine::TransformConstraintTimeline(size_t frameCount, size_t bezierCount, int transformConstraintIndex) spine::TransformConstraintTimeline *ret = new spine::TransformConstraintTimeline(arg1, arg2, arg3); int num_ret = olua_push_object(L, ret, "spine.TransformConstraintTimeline"); olua_postnew(L, ret); @@ -7967,7 +8742,7 @@ static int _spine_TransformConstraintTimeline_new(lua_State *L) return num_ret; } -static int _spine_TransformConstraintTimeline_setTransformConstraintIndex(lua_State *L) +static int _olua_fun_spine_TransformConstraintTimeline_setTransformConstraintIndex(lua_State *L) { olua_startinvoke(L); @@ -7985,20 +8760,29 @@ static int _spine_TransformConstraintTimeline_setTransformConstraintIndex(lua_St return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_spine_TransformConstraintTimeline(lua_State *L) +static int _olua_cls_spine_TransformConstraintTimeline(lua_State *L) { oluacls_class(L, "spine.TransformConstraintTimeline"); - oluacls_func(L, "getTransformConstraintIndex", _spine_TransformConstraintTimeline_getTransformConstraintIndex); - oluacls_func(L, "new", _spine_TransformConstraintTimeline_new); - oluacls_func(L, "setTransformConstraintIndex", _spine_TransformConstraintTimeline_setTransformConstraintIndex); - oluacls_prop(L, "transformConstraintIndex", _spine_TransformConstraintTimeline_getTransformConstraintIndex, _spine_TransformConstraintTimeline_setTransformConstraintIndex); + oluacls_func(L, "getTransformConstraintIndex", _olua_fun_spine_TransformConstraintTimeline_getTransformConstraintIndex); + oluacls_func(L, "new", _olua_fun_spine_TransformConstraintTimeline_new); + oluacls_func(L, "setTransformConstraintIndex", _olua_fun_spine_TransformConstraintTimeline_setTransformConstraintIndex); + oluacls_prop(L, "transformConstraintIndex", _olua_fun_spine_TransformConstraintTimeline_getTransformConstraintIndex, _olua_fun_spine_TransformConstraintTimeline_setTransformConstraintIndex); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_spine_TransformConstraintTimeline(lua_State *L) +{ + olua_require(L, "spine", luaopen_spine); + if (!olua_getclass(L, "spine.TransformConstraintTimeline")) { + luaL_error(L, "class not found: spine::TransformConstraintTimeline"); + } return 1; } OLUA_END_DECLS -static int _spine_ScaleTimeline_getBoneIndex(lua_State *L) +static int _olua_fun_spine_ScaleTimeline_getBoneIndex(lua_State *L) { olua_startinvoke(L); @@ -8015,7 +8799,7 @@ static int _spine_ScaleTimeline_getBoneIndex(lua_State *L) return num_ret; } -static int _spine_ScaleTimeline_new(lua_State *L) +static int _olua_fun_spine_ScaleTimeline_new(lua_State *L) { olua_startinvoke(L); @@ -8027,7 +8811,7 @@ static int _spine_ScaleTimeline_new(lua_State *L) olua_check_integer(L, 2, &arg2); olua_check_integer(L, 3, &arg3); - // ScaleTimeline(size_t frameCount, size_t bezierCount, int boneIndex) + // spine::ScaleTimeline(size_t frameCount, size_t bezierCount, int boneIndex) spine::ScaleTimeline *ret = new spine::ScaleTimeline(arg1, arg2, arg3); int num_ret = olua_push_object(L, ret, "spine.ScaleTimeline"); olua_postnew(L, ret); @@ -8037,7 +8821,7 @@ static int _spine_ScaleTimeline_new(lua_State *L) return num_ret; } -static int _spine_ScaleTimeline_setBoneIndex(lua_State *L) +static int _olua_fun_spine_ScaleTimeline_setBoneIndex(lua_State *L) { olua_startinvoke(L); @@ -8055,20 +8839,29 @@ static int _spine_ScaleTimeline_setBoneIndex(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_spine_ScaleTimeline(lua_State *L) +static int _olua_cls_spine_ScaleTimeline(lua_State *L) { oluacls_class(L, "spine.ScaleTimeline"); - oluacls_func(L, "getBoneIndex", _spine_ScaleTimeline_getBoneIndex); - oluacls_func(L, "new", _spine_ScaleTimeline_new); - oluacls_func(L, "setBoneIndex", _spine_ScaleTimeline_setBoneIndex); - oluacls_prop(L, "boneIndex", _spine_ScaleTimeline_getBoneIndex, _spine_ScaleTimeline_setBoneIndex); + oluacls_func(L, "getBoneIndex", _olua_fun_spine_ScaleTimeline_getBoneIndex); + oluacls_func(L, "new", _olua_fun_spine_ScaleTimeline_new); + oluacls_func(L, "setBoneIndex", _olua_fun_spine_ScaleTimeline_setBoneIndex); + oluacls_prop(L, "boneIndex", _olua_fun_spine_ScaleTimeline_getBoneIndex, _olua_fun_spine_ScaleTimeline_setBoneIndex); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_spine_ScaleTimeline(lua_State *L) +{ + olua_require(L, "spine", luaopen_spine); + if (!olua_getclass(L, "spine.ScaleTimeline")) { + luaL_error(L, "class not found: spine::ScaleTimeline"); + } + return 1; +} OLUA_END_DECLS -static int _spine_RotateTimeline_getBoneIndex(lua_State *L) +static int _olua_fun_spine_RotateTimeline_getBoneIndex(lua_State *L) { olua_startinvoke(L); @@ -8085,7 +8878,7 @@ static int _spine_RotateTimeline_getBoneIndex(lua_State *L) return num_ret; } -static int _spine_RotateTimeline_new(lua_State *L) +static int _olua_fun_spine_RotateTimeline_new(lua_State *L) { olua_startinvoke(L); @@ -8097,7 +8890,7 @@ static int _spine_RotateTimeline_new(lua_State *L) olua_check_integer(L, 2, &arg2); olua_check_integer(L, 3, &arg3); - // RotateTimeline(size_t frameCount, size_t bezierCount, int boneIndex) + // spine::RotateTimeline(size_t frameCount, size_t bezierCount, int boneIndex) spine::RotateTimeline *ret = new spine::RotateTimeline(arg1, arg2, arg3); int num_ret = olua_push_object(L, ret, "spine.RotateTimeline"); olua_postnew(L, ret); @@ -8107,7 +8900,7 @@ static int _spine_RotateTimeline_new(lua_State *L) return num_ret; } -static int _spine_RotateTimeline_setBoneIndex(lua_State *L) +static int _olua_fun_spine_RotateTimeline_setBoneIndex(lua_State *L) { olua_startinvoke(L); @@ -8125,29 +8918,47 @@ static int _spine_RotateTimeline_setBoneIndex(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_spine_RotateTimeline(lua_State *L) +static int _olua_cls_spine_RotateTimeline(lua_State *L) +{ + oluacls_class(L, "spine.RotateTimeline"); + oluacls_func(L, "getBoneIndex", _olua_fun_spine_RotateTimeline_getBoneIndex); + oluacls_func(L, "new", _olua_fun_spine_RotateTimeline_new); + oluacls_func(L, "setBoneIndex", _olua_fun_spine_RotateTimeline_setBoneIndex); + oluacls_prop(L, "boneIndex", _olua_fun_spine_RotateTimeline_getBoneIndex, _olua_fun_spine_RotateTimeline_setBoneIndex); + + return 1; +} + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_spine_RotateTimeline(lua_State *L) +{ + olua_require(L, "spine", luaopen_spine); + if (!olua_getclass(L, "spine.RotateTimeline")) { + luaL_error(L, "class not found: spine::RotateTimeline"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_spine_Polygon(lua_State *L) { - oluacls_class(L, "spine.RotateTimeline"); - oluacls_func(L, "getBoneIndex", _spine_RotateTimeline_getBoneIndex); - oluacls_func(L, "new", _spine_RotateTimeline_new); - oluacls_func(L, "setBoneIndex", _spine_RotateTimeline_setBoneIndex); - oluacls_prop(L, "boneIndex", _spine_RotateTimeline_getBoneIndex, _spine_RotateTimeline_setBoneIndex); + oluacls_class(L, "spine.Polygon"); return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS OLUA_LIB int luaopen_spine_Polygon(lua_State *L) { - oluacls_class(L, "spine.Polygon"); - + olua_require(L, "spine", luaopen_spine); + if (!olua_getclass(L, "spine.Polygon")) { + luaL_error(L, "class not found: spine::Polygon"); + } return 1; } OLUA_END_DECLS -static int _spine_Skin_addSkin(lua_State *L) +static int _olua_fun_spine_Skin_addSkin(lua_State *L) { olua_startinvoke(L); @@ -8165,7 +8976,7 @@ static int _spine_Skin_addSkin(lua_State *L) return 0; } -static int _spine_Skin_copySkin(lua_State *L) +static int _olua_fun_spine_Skin_copySkin(lua_State *L) { olua_startinvoke(L); @@ -8183,7 +8994,7 @@ static int _spine_Skin_copySkin(lua_State *L) return 0; } -static int _spine_Skin_getAttachment(lua_State *L) +static int _olua_fun_spine_Skin_getAttachment(lua_State *L) { olua_startinvoke(L); @@ -8204,7 +9015,7 @@ static int _spine_Skin_getAttachment(lua_State *L) return num_ret; } -static int _spine_Skin_getBones(lua_State *L) +static int _olua_fun_spine_Skin_getBones(lua_State *L) { olua_startinvoke(L); @@ -8223,7 +9034,7 @@ static int _spine_Skin_getBones(lua_State *L) return num_ret; } -static int _spine_Skin_getColor(lua_State *L) +static int _olua_fun_spine_Skin_getColor(lua_State *L) { olua_startinvoke(L); @@ -8240,7 +9051,7 @@ static int _spine_Skin_getColor(lua_State *L) return num_ret; } -static int _spine_Skin_getConstraints(lua_State *L) +static int _olua_fun_spine_Skin_getConstraints(lua_State *L) { olua_startinvoke(L); @@ -8259,7 +9070,7 @@ static int _spine_Skin_getConstraints(lua_State *L) return num_ret; } -static int _spine_Skin_getName(lua_State *L) +static int _olua_fun_spine_Skin_getName(lua_State *L) { olua_startinvoke(L); @@ -8276,7 +9087,7 @@ static int _spine_Skin_getName(lua_State *L) return num_ret; } -static int _spine_Skin_new(lua_State *L) +static int _olua_fun_spine_Skin_new(lua_State *L) { olua_startinvoke(L); @@ -8284,7 +9095,7 @@ static int _spine_Skin_new(lua_State *L) olua_check_string(L, 1, &arg1); - // Skin(const spine::String &name) + // spine::Skin(const spine::String &name) spine::Skin *ret = new spine::Skin(arg1); int num_ret = olua_push_object(L, ret, "spine.Skin"); olua_postnew(L, ret); @@ -8294,7 +9105,7 @@ static int _spine_Skin_new(lua_State *L) return num_ret; } -static int _spine_Skin_removeAttachment(lua_State *L) +static int _olua_fun_spine_Skin_removeAttachment(lua_State *L) { olua_startinvoke(L); @@ -8314,7 +9125,7 @@ static int _spine_Skin_removeAttachment(lua_State *L) return 0; } -static int _spine_Skin_setAttachment(lua_State *L) +static int _olua_fun_spine_Skin_setAttachment(lua_State *L) { olua_startinvoke(L); @@ -8336,39 +9147,57 @@ static int _spine_Skin_setAttachment(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_spine_Skin(lua_State *L) +static int _olua_cls_spine_Skin(lua_State *L) { oluacls_class(L, "spine.Skin"); - oluacls_func(L, "addSkin", _spine_Skin_addSkin); - oluacls_func(L, "copySkin", _spine_Skin_copySkin); - oluacls_func(L, "getAttachment", _spine_Skin_getAttachment); - oluacls_func(L, "getBones", _spine_Skin_getBones); - oluacls_func(L, "getColor", _spine_Skin_getColor); - oluacls_func(L, "getConstraints", _spine_Skin_getConstraints); - oluacls_func(L, "getName", _spine_Skin_getName); - oluacls_func(L, "new", _spine_Skin_new); - oluacls_func(L, "removeAttachment", _spine_Skin_removeAttachment); - oluacls_func(L, "setAttachment", _spine_Skin_setAttachment); - oluacls_prop(L, "bones", _spine_Skin_getBones, nullptr); - oluacls_prop(L, "color", _spine_Skin_getColor, nullptr); - oluacls_prop(L, "constraints", _spine_Skin_getConstraints, nullptr); - oluacls_prop(L, "name", _spine_Skin_getName, nullptr); + oluacls_func(L, "addSkin", _olua_fun_spine_Skin_addSkin); + oluacls_func(L, "copySkin", _olua_fun_spine_Skin_copySkin); + oluacls_func(L, "getAttachment", _olua_fun_spine_Skin_getAttachment); + oluacls_func(L, "getBones", _olua_fun_spine_Skin_getBones); + oluacls_func(L, "getColor", _olua_fun_spine_Skin_getColor); + oluacls_func(L, "getConstraints", _olua_fun_spine_Skin_getConstraints); + oluacls_func(L, "getName", _olua_fun_spine_Skin_getName); + oluacls_func(L, "new", _olua_fun_spine_Skin_new); + oluacls_func(L, "removeAttachment", _olua_fun_spine_Skin_removeAttachment); + oluacls_func(L, "setAttachment", _olua_fun_spine_Skin_setAttachment); + oluacls_prop(L, "bones", _olua_fun_spine_Skin_getBones, nullptr); + oluacls_prop(L, "color", _olua_fun_spine_Skin_getColor, nullptr); + oluacls_prop(L, "constraints", _olua_fun_spine_Skin_getConstraints, nullptr); + oluacls_prop(L, "name", _olua_fun_spine_Skin_getName, nullptr); return 1; } -OLUA_END_DECLS OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_spine_Atlas(lua_State *L) +OLUA_LIB int luaopen_spine_Skin(lua_State *L) +{ + olua_require(L, "spine", luaopen_spine); + if (!olua_getclass(L, "spine.Skin")) { + luaL_error(L, "class not found: spine::Skin"); + } + return 1; +} +OLUA_END_DECLS + +static int _olua_cls_spine_Atlas(lua_State *L) { oluacls_class(L, "spine.Atlas"); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_spine_Atlas(lua_State *L) +{ + olua_require(L, "spine", luaopen_spine); + if (!olua_getclass(L, "spine.Atlas")) { + luaL_error(L, "class not found: spine::Atlas"); + } + return 1; +} OLUA_END_DECLS -static int _spine_Bone_getA(lua_State *L) +static int _olua_fun_spine_Bone_getA(lua_State *L) { olua_startinvoke(L); @@ -8385,7 +9214,7 @@ static int _spine_Bone_getA(lua_State *L) return num_ret; } -static int _spine_Bone_getAScaleX(lua_State *L) +static int _olua_fun_spine_Bone_getAScaleX(lua_State *L) { olua_startinvoke(L); @@ -8402,7 +9231,7 @@ static int _spine_Bone_getAScaleX(lua_State *L) return num_ret; } -static int _spine_Bone_getAScaleY(lua_State *L) +static int _olua_fun_spine_Bone_getAScaleY(lua_State *L) { olua_startinvoke(L); @@ -8419,7 +9248,7 @@ static int _spine_Bone_getAScaleY(lua_State *L) return num_ret; } -static int _spine_Bone_getAShearX(lua_State *L) +static int _olua_fun_spine_Bone_getAShearX(lua_State *L) { olua_startinvoke(L); @@ -8436,7 +9265,7 @@ static int _spine_Bone_getAShearX(lua_State *L) return num_ret; } -static int _spine_Bone_getAShearY(lua_State *L) +static int _olua_fun_spine_Bone_getAShearY(lua_State *L) { olua_startinvoke(L); @@ -8453,7 +9282,7 @@ static int _spine_Bone_getAShearY(lua_State *L) return num_ret; } -static int _spine_Bone_getAX(lua_State *L) +static int _olua_fun_spine_Bone_getAX(lua_State *L) { olua_startinvoke(L); @@ -8470,7 +9299,7 @@ static int _spine_Bone_getAX(lua_State *L) return num_ret; } -static int _spine_Bone_getAY(lua_State *L) +static int _olua_fun_spine_Bone_getAY(lua_State *L) { olua_startinvoke(L); @@ -8487,7 +9316,7 @@ static int _spine_Bone_getAY(lua_State *L) return num_ret; } -static int _spine_Bone_getAppliedRotation(lua_State *L) +static int _olua_fun_spine_Bone_getAppliedRotation(lua_State *L) { olua_startinvoke(L); @@ -8504,7 +9333,7 @@ static int _spine_Bone_getAppliedRotation(lua_State *L) return num_ret; } -static int _spine_Bone_getB(lua_State *L) +static int _olua_fun_spine_Bone_getB(lua_State *L) { olua_startinvoke(L); @@ -8521,7 +9350,7 @@ static int _spine_Bone_getB(lua_State *L) return num_ret; } -static int _spine_Bone_getC(lua_State *L) +static int _olua_fun_spine_Bone_getC(lua_State *L) { olua_startinvoke(L); @@ -8538,7 +9367,7 @@ static int _spine_Bone_getC(lua_State *L) return num_ret; } -static int _spine_Bone_getChildren(lua_State *L) +static int _olua_fun_spine_Bone_getChildren(lua_State *L) { olua_startinvoke(L); @@ -8557,7 +9386,7 @@ static int _spine_Bone_getChildren(lua_State *L) return num_ret; } -static int _spine_Bone_getD(lua_State *L) +static int _olua_fun_spine_Bone_getD(lua_State *L) { olua_startinvoke(L); @@ -8574,7 +9403,7 @@ static int _spine_Bone_getD(lua_State *L) return num_ret; } -static int _spine_Bone_getData(lua_State *L) +static int _olua_fun_spine_Bone_getData(lua_State *L) { olua_startinvoke(L); @@ -8591,7 +9420,7 @@ static int _spine_Bone_getData(lua_State *L) return num_ret; } -static int _spine_Bone_getInherit(lua_State *L) +static int _olua_fun_spine_Bone_getInherit(lua_State *L) { olua_startinvoke(L); @@ -8608,7 +9437,7 @@ static int _spine_Bone_getInherit(lua_State *L) return num_ret; } -static int _spine_Bone_getParent(lua_State *L) +static int _olua_fun_spine_Bone_getParent(lua_State *L) { olua_startinvoke(L); @@ -8625,7 +9454,7 @@ static int _spine_Bone_getParent(lua_State *L) return num_ret; } -static int _spine_Bone_getRotation(lua_State *L) +static int _olua_fun_spine_Bone_getRotation(lua_State *L) { olua_startinvoke(L); @@ -8642,7 +9471,7 @@ static int _spine_Bone_getRotation(lua_State *L) return num_ret; } -static int _spine_Bone_getScaleX(lua_State *L) +static int _olua_fun_spine_Bone_getScaleX(lua_State *L) { olua_startinvoke(L); @@ -8659,7 +9488,7 @@ static int _spine_Bone_getScaleX(lua_State *L) return num_ret; } -static int _spine_Bone_getScaleY(lua_State *L) +static int _olua_fun_spine_Bone_getScaleY(lua_State *L) { olua_startinvoke(L); @@ -8676,7 +9505,7 @@ static int _spine_Bone_getScaleY(lua_State *L) return num_ret; } -static int _spine_Bone_getShearX(lua_State *L) +static int _olua_fun_spine_Bone_getShearX(lua_State *L) { olua_startinvoke(L); @@ -8693,7 +9522,7 @@ static int _spine_Bone_getShearX(lua_State *L) return num_ret; } -static int _spine_Bone_getShearY(lua_State *L) +static int _olua_fun_spine_Bone_getShearY(lua_State *L) { olua_startinvoke(L); @@ -8710,7 +9539,7 @@ static int _spine_Bone_getShearY(lua_State *L) return num_ret; } -static int _spine_Bone_getSkeleton(lua_State *L) +static int _olua_fun_spine_Bone_getSkeleton(lua_State *L) { olua_startinvoke(L); @@ -8727,7 +9556,7 @@ static int _spine_Bone_getSkeleton(lua_State *L) return num_ret; } -static int _spine_Bone_getWorldRotationX(lua_State *L) +static int _olua_fun_spine_Bone_getWorldRotationX(lua_State *L) { olua_startinvoke(L); @@ -8744,7 +9573,7 @@ static int _spine_Bone_getWorldRotationX(lua_State *L) return num_ret; } -static int _spine_Bone_getWorldRotationY(lua_State *L) +static int _olua_fun_spine_Bone_getWorldRotationY(lua_State *L) { olua_startinvoke(L); @@ -8761,7 +9590,7 @@ static int _spine_Bone_getWorldRotationY(lua_State *L) return num_ret; } -static int _spine_Bone_getWorldScaleX(lua_State *L) +static int _olua_fun_spine_Bone_getWorldScaleX(lua_State *L) { olua_startinvoke(L); @@ -8778,7 +9607,7 @@ static int _spine_Bone_getWorldScaleX(lua_State *L) return num_ret; } -static int _spine_Bone_getWorldScaleY(lua_State *L) +static int _olua_fun_spine_Bone_getWorldScaleY(lua_State *L) { olua_startinvoke(L); @@ -8795,7 +9624,7 @@ static int _spine_Bone_getWorldScaleY(lua_State *L) return num_ret; } -static int _spine_Bone_getWorldToLocalRotationX(lua_State *L) +static int _olua_fun_spine_Bone_getWorldToLocalRotationX(lua_State *L) { olua_startinvoke(L); @@ -8812,7 +9641,7 @@ static int _spine_Bone_getWorldToLocalRotationX(lua_State *L) return num_ret; } -static int _spine_Bone_getWorldToLocalRotationY(lua_State *L) +static int _olua_fun_spine_Bone_getWorldToLocalRotationY(lua_State *L) { olua_startinvoke(L); @@ -8829,7 +9658,7 @@ static int _spine_Bone_getWorldToLocalRotationY(lua_State *L) return num_ret; } -static int _spine_Bone_getWorldX(lua_State *L) +static int _olua_fun_spine_Bone_getWorldX(lua_State *L) { olua_startinvoke(L); @@ -8846,7 +9675,7 @@ static int _spine_Bone_getWorldX(lua_State *L) return num_ret; } -static int _spine_Bone_getWorldY(lua_State *L) +static int _olua_fun_spine_Bone_getWorldY(lua_State *L) { olua_startinvoke(L); @@ -8863,7 +9692,7 @@ static int _spine_Bone_getWorldY(lua_State *L) return num_ret; } -static int _spine_Bone_getX(lua_State *L) +static int _olua_fun_spine_Bone_getX(lua_State *L) { olua_startinvoke(L); @@ -8880,7 +9709,7 @@ static int _spine_Bone_getX(lua_State *L) return num_ret; } -static int _spine_Bone_getY(lua_State *L) +static int _olua_fun_spine_Bone_getY(lua_State *L) { olua_startinvoke(L); @@ -8897,7 +9726,7 @@ static int _spine_Bone_getY(lua_State *L) return num_ret; } -static int _spine_Bone_isYDown(lua_State *L) +static int _olua_fun_spine_Bone_isYDown(lua_State *L) { olua_startinvoke(L); @@ -8910,7 +9739,7 @@ static int _spine_Bone_isYDown(lua_State *L) return num_ret; } -static int _spine_Bone_localToWorldRotation(lua_State *L) +static int _olua_fun_spine_Bone_localToWorldRotation(lua_State *L) { olua_startinvoke(L); @@ -8929,7 +9758,7 @@ static int _spine_Bone_localToWorldRotation(lua_State *L) return num_ret; } -static int _spine_Bone_new$1(lua_State *L) +static int _olua_fun_spine_Bone_new$1(lua_State *L) { olua_startinvoke(L); @@ -8941,7 +9770,7 @@ static int _spine_Bone_new$1(lua_State *L) olua_check_object(L, 2, &arg2, "spine.Skeleton"); olua_check_object(L, 3, &arg3, "spine.Bone"); - // Bone(spine::BoneData &data, spine::Skeleton &skeleton, @optional spine::Bone *parent) + // spine::Bone(spine::BoneData &data, spine::Skeleton &skeleton, @optional spine::Bone *parent) spine::Bone *ret = new spine::Bone(*arg1, *arg2, arg3); int num_ret = olua_push_object(L, ret, "spine.Bone"); olua_postnew(L, ret); @@ -8951,7 +9780,7 @@ static int _spine_Bone_new$1(lua_State *L) return num_ret; } -static int _spine_Bone_new$2(lua_State *L) +static int _olua_fun_spine_Bone_new$2(lua_State *L) { olua_startinvoke(L); @@ -8961,7 +9790,7 @@ static int _spine_Bone_new$2(lua_State *L) olua_check_object(L, 1, &arg1, "spine.BoneData"); olua_check_object(L, 2, &arg2, "spine.Skeleton"); - // Bone(spine::BoneData &data, spine::Skeleton &skeleton, @optional spine::Bone *parent) + // spine::Bone(spine::BoneData &data, spine::Skeleton &skeleton) spine::Bone *ret = new spine::Bone(*arg1, *arg2); int num_ret = olua_push_object(L, ret, "spine.Bone"); olua_postnew(L, ret); @@ -8971,21 +9800,21 @@ static int _spine_Bone_new$2(lua_State *L) return num_ret; } -static int _spine_Bone_new(lua_State *L) +static int _olua_fun_spine_Bone_new(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 2) { // if ((olua_is_object(L, 1, "spine.BoneData")) && (olua_is_object(L, 2, "spine.Skeleton"))) { - // Bone(spine::BoneData &data, spine::Skeleton &skeleton, @optional spine::Bone *parent) - return _spine_Bone_new$2(L); + // spine::Bone(spine::BoneData &data, spine::Skeleton &skeleton) + return _olua_fun_spine_Bone_new$2(L); // } } if (num_args == 3) { // if ((olua_is_object(L, 1, "spine.BoneData")) && (olua_is_object(L, 2, "spine.Skeleton")) && (olua_is_object(L, 3, "spine.Bone"))) { - // Bone(spine::BoneData &data, spine::Skeleton &skeleton, @optional spine::Bone *parent) - return _spine_Bone_new$1(L); + // spine::Bone(spine::BoneData &data, spine::Skeleton &skeleton, @optional spine::Bone *parent) + return _olua_fun_spine_Bone_new$1(L); // } } @@ -8994,7 +9823,7 @@ static int _spine_Bone_new(lua_State *L) return 0; } -static int _spine_Bone_parentToWorld(lua_State *L) +static int _olua_fun_spine_Bone_parentToWorld(lua_State *L) { olua_startinvoke(L); @@ -9007,8 +9836,8 @@ static int _spine_Bone_parentToWorld(lua_State *L) olua_to_object(L, 1, &self, "spine.Bone"); olua_check_number(L, 2, &arg1); olua_check_number(L, 3, &arg2); - olua_check_pointer(L, 4, &arg3, "olua.float"); - olua_check_pointer(L, 5, &arg4, "olua.float"); + olua_check_valueptr(L, 4, &arg3, "olua.float"); + olua_check_valueptr(L, 5, &arg4, "olua.float"); // void parentToWorld(float worldX, float worldY, float &outX, float &outY) self->parentToWorld(arg1, arg2, *arg3, *arg4); @@ -9018,7 +9847,7 @@ static int _spine_Bone_parentToWorld(lua_State *L) return 0; } -static int _spine_Bone_rotateWorld(lua_State *L) +static int _olua_fun_spine_Bone_rotateWorld(lua_State *L) { olua_startinvoke(L); @@ -9036,7 +9865,7 @@ static int _spine_Bone_rotateWorld(lua_State *L) return 0; } -static int _spine_Bone_setA(lua_State *L) +static int _olua_fun_spine_Bone_setA(lua_State *L) { olua_startinvoke(L); @@ -9054,7 +9883,7 @@ static int _spine_Bone_setA(lua_State *L) return 0; } -static int _spine_Bone_setAScaleX(lua_State *L) +static int _olua_fun_spine_Bone_setAScaleX(lua_State *L) { olua_startinvoke(L); @@ -9072,7 +9901,7 @@ static int _spine_Bone_setAScaleX(lua_State *L) return 0; } -static int _spine_Bone_setAScaleY(lua_State *L) +static int _olua_fun_spine_Bone_setAScaleY(lua_State *L) { olua_startinvoke(L); @@ -9090,7 +9919,7 @@ static int _spine_Bone_setAScaleY(lua_State *L) return 0; } -static int _spine_Bone_setAShearX(lua_State *L) +static int _olua_fun_spine_Bone_setAShearX(lua_State *L) { olua_startinvoke(L); @@ -9108,7 +9937,7 @@ static int _spine_Bone_setAShearX(lua_State *L) return 0; } -static int _spine_Bone_setAShearY(lua_State *L) +static int _olua_fun_spine_Bone_setAShearY(lua_State *L) { olua_startinvoke(L); @@ -9126,7 +9955,7 @@ static int _spine_Bone_setAShearY(lua_State *L) return 0; } -static int _spine_Bone_setAX(lua_State *L) +static int _olua_fun_spine_Bone_setAX(lua_State *L) { olua_startinvoke(L); @@ -9144,7 +9973,7 @@ static int _spine_Bone_setAX(lua_State *L) return 0; } -static int _spine_Bone_setAY(lua_State *L) +static int _olua_fun_spine_Bone_setAY(lua_State *L) { olua_startinvoke(L); @@ -9162,7 +9991,7 @@ static int _spine_Bone_setAY(lua_State *L) return 0; } -static int _spine_Bone_setAppliedRotation(lua_State *L) +static int _olua_fun_spine_Bone_setAppliedRotation(lua_State *L) { olua_startinvoke(L); @@ -9180,7 +10009,7 @@ static int _spine_Bone_setAppliedRotation(lua_State *L) return 0; } -static int _spine_Bone_setB(lua_State *L) +static int _olua_fun_spine_Bone_setB(lua_State *L) { olua_startinvoke(L); @@ -9198,7 +10027,7 @@ static int _spine_Bone_setB(lua_State *L) return 0; } -static int _spine_Bone_setC(lua_State *L) +static int _olua_fun_spine_Bone_setC(lua_State *L) { olua_startinvoke(L); @@ -9216,7 +10045,7 @@ static int _spine_Bone_setC(lua_State *L) return 0; } -static int _spine_Bone_setD(lua_State *L) +static int _olua_fun_spine_Bone_setD(lua_State *L) { olua_startinvoke(L); @@ -9234,7 +10063,7 @@ static int _spine_Bone_setD(lua_State *L) return 0; } -static int _spine_Bone_setInherit(lua_State *L) +static int _olua_fun_spine_Bone_setInherit(lua_State *L) { olua_startinvoke(L); @@ -9252,7 +10081,7 @@ static int _spine_Bone_setInherit(lua_State *L) return 0; } -static int _spine_Bone_setRotation(lua_State *L) +static int _olua_fun_spine_Bone_setRotation(lua_State *L) { olua_startinvoke(L); @@ -9270,7 +10099,7 @@ static int _spine_Bone_setRotation(lua_State *L) return 0; } -static int _spine_Bone_setScaleX(lua_State *L) +static int _olua_fun_spine_Bone_setScaleX(lua_State *L) { olua_startinvoke(L); @@ -9288,7 +10117,7 @@ static int _spine_Bone_setScaleX(lua_State *L) return 0; } -static int _spine_Bone_setScaleY(lua_State *L) +static int _olua_fun_spine_Bone_setScaleY(lua_State *L) { olua_startinvoke(L); @@ -9306,7 +10135,7 @@ static int _spine_Bone_setScaleY(lua_State *L) return 0; } -static int _spine_Bone_setShearX(lua_State *L) +static int _olua_fun_spine_Bone_setShearX(lua_State *L) { olua_startinvoke(L); @@ -9324,7 +10153,7 @@ static int _spine_Bone_setShearX(lua_State *L) return 0; } -static int _spine_Bone_setShearY(lua_State *L) +static int _olua_fun_spine_Bone_setShearY(lua_State *L) { olua_startinvoke(L); @@ -9342,7 +10171,7 @@ static int _spine_Bone_setShearY(lua_State *L) return 0; } -static int _spine_Bone_setToSetupPose(lua_State *L) +static int _olua_fun_spine_Bone_setToSetupPose(lua_State *L) { olua_startinvoke(L); @@ -9358,7 +10187,7 @@ static int _spine_Bone_setToSetupPose(lua_State *L) return 0; } -static int _spine_Bone_setWorldX(lua_State *L) +static int _olua_fun_spine_Bone_setWorldX(lua_State *L) { olua_startinvoke(L); @@ -9376,7 +10205,7 @@ static int _spine_Bone_setWorldX(lua_State *L) return 0; } -static int _spine_Bone_setWorldY(lua_State *L) +static int _olua_fun_spine_Bone_setWorldY(lua_State *L) { olua_startinvoke(L); @@ -9394,7 +10223,7 @@ static int _spine_Bone_setWorldY(lua_State *L) return 0; } -static int _spine_Bone_setX(lua_State *L) +static int _olua_fun_spine_Bone_setX(lua_State *L) { olua_startinvoke(L); @@ -9412,7 +10241,7 @@ static int _spine_Bone_setX(lua_State *L) return 0; } -static int _spine_Bone_setY(lua_State *L) +static int _olua_fun_spine_Bone_setY(lua_State *L) { olua_startinvoke(L); @@ -9430,7 +10259,7 @@ static int _spine_Bone_setY(lua_State *L) return 0; } -static int _spine_Bone_setYDown(lua_State *L) +static int _olua_fun_spine_Bone_setYDown(lua_State *L) { olua_startinvoke(L); @@ -9446,7 +10275,7 @@ static int _spine_Bone_setYDown(lua_State *L) return 0; } -static int _spine_Bone_updateAppliedTransform(lua_State *L) +static int _olua_fun_spine_Bone_updateAppliedTransform(lua_State *L) { olua_startinvoke(L); @@ -9462,7 +10291,7 @@ static int _spine_Bone_updateAppliedTransform(lua_State *L) return 0; } -static int _spine_Bone_updateWorldTransform$1(lua_State *L) +static int _olua_fun_spine_Bone_updateWorldTransform$1(lua_State *L) { olua_startinvoke(L); @@ -9478,7 +10307,7 @@ static int _spine_Bone_updateWorldTransform$1(lua_State *L) return 0; } -static int _spine_Bone_updateWorldTransform$2(lua_State *L) +static int _olua_fun_spine_Bone_updateWorldTransform$2(lua_State *L) { olua_startinvoke(L); @@ -9508,19 +10337,19 @@ static int _spine_Bone_updateWorldTransform$2(lua_State *L) return 0; } -static int _spine_Bone_updateWorldTransform(lua_State *L) +static int _olua_fun_spine_Bone_updateWorldTransform(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 0) { // void updateWorldTransform() - return _spine_Bone_updateWorldTransform$1(L); + return _olua_fun_spine_Bone_updateWorldTransform$1(L); } if (num_args == 7) { // if ((olua_is_number(L, 2)) && (olua_is_number(L, 3)) && (olua_is_number(L, 4)) && (olua_is_number(L, 5)) && (olua_is_number(L, 6)) && (olua_is_number(L, 7)) && (olua_is_number(L, 8))) { // void updateWorldTransform(float x, float y, float rotation, float scaleX, float scaleY, float shearX, float shearY) - return _spine_Bone_updateWorldTransform$2(L); + return _olua_fun_spine_Bone_updateWorldTransform$2(L); // } } @@ -9529,7 +10358,7 @@ static int _spine_Bone_updateWorldTransform(lua_State *L) return 0; } -static int _spine_Bone_worldToLocalRotation(lua_State *L) +static int _olua_fun_spine_Bone_worldToLocalRotation(lua_State *L) { olua_startinvoke(L); @@ -9548,7 +10377,7 @@ static int _spine_Bone_worldToLocalRotation(lua_State *L) return num_ret; } -static int _spine_Bone_worldToParent(lua_State *L) +static int _olua_fun_spine_Bone_worldToParent(lua_State *L) { olua_startinvoke(L); @@ -9561,8 +10390,8 @@ static int _spine_Bone_worldToParent(lua_State *L) olua_to_object(L, 1, &self, "spine.Bone"); olua_check_number(L, 2, &arg1); olua_check_number(L, 3, &arg2); - olua_check_pointer(L, 4, &arg3, "olua.float"); - olua_check_pointer(L, 5, &arg4, "olua.float"); + olua_check_valueptr(L, 4, &arg3, "olua.float"); + olua_check_valueptr(L, 5, &arg4, "olua.float"); // void worldToParent(float worldX, float worldY, float &outParentX, float &outParentY) self->worldToParent(arg1, arg2, *arg3, *arg4); @@ -9572,111 +10401,120 @@ static int _spine_Bone_worldToParent(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_spine_Bone(lua_State *L) +static int _olua_cls_spine_Bone(lua_State *L) { oluacls_class(L, "spine.Bone"); - oluacls_func(L, "getA", _spine_Bone_getA); - oluacls_func(L, "getAScaleX", _spine_Bone_getAScaleX); - oluacls_func(L, "getAScaleY", _spine_Bone_getAScaleY); - oluacls_func(L, "getAShearX", _spine_Bone_getAShearX); - oluacls_func(L, "getAShearY", _spine_Bone_getAShearY); - oluacls_func(L, "getAX", _spine_Bone_getAX); - oluacls_func(L, "getAY", _spine_Bone_getAY); - oluacls_func(L, "getAppliedRotation", _spine_Bone_getAppliedRotation); - oluacls_func(L, "getB", _spine_Bone_getB); - oluacls_func(L, "getC", _spine_Bone_getC); - oluacls_func(L, "getChildren", _spine_Bone_getChildren); - oluacls_func(L, "getD", _spine_Bone_getD); - oluacls_func(L, "getData", _spine_Bone_getData); - oluacls_func(L, "getInherit", _spine_Bone_getInherit); - oluacls_func(L, "getParent", _spine_Bone_getParent); - oluacls_func(L, "getRotation", _spine_Bone_getRotation); - oluacls_func(L, "getScaleX", _spine_Bone_getScaleX); - oluacls_func(L, "getScaleY", _spine_Bone_getScaleY); - oluacls_func(L, "getShearX", _spine_Bone_getShearX); - oluacls_func(L, "getShearY", _spine_Bone_getShearY); - oluacls_func(L, "getSkeleton", _spine_Bone_getSkeleton); - oluacls_func(L, "getWorldRotationX", _spine_Bone_getWorldRotationX); - oluacls_func(L, "getWorldRotationY", _spine_Bone_getWorldRotationY); - oluacls_func(L, "getWorldScaleX", _spine_Bone_getWorldScaleX); - oluacls_func(L, "getWorldScaleY", _spine_Bone_getWorldScaleY); - oluacls_func(L, "getWorldToLocalRotationX", _spine_Bone_getWorldToLocalRotationX); - oluacls_func(L, "getWorldToLocalRotationY", _spine_Bone_getWorldToLocalRotationY); - oluacls_func(L, "getWorldX", _spine_Bone_getWorldX); - oluacls_func(L, "getWorldY", _spine_Bone_getWorldY); - oluacls_func(L, "getX", _spine_Bone_getX); - oluacls_func(L, "getY", _spine_Bone_getY); - oluacls_func(L, "isYDown", _spine_Bone_isYDown); - oluacls_func(L, "localToWorldRotation", _spine_Bone_localToWorldRotation); - oluacls_func(L, "new", _spine_Bone_new); - oluacls_func(L, "parentToWorld", _spine_Bone_parentToWorld); - oluacls_func(L, "rotateWorld", _spine_Bone_rotateWorld); - oluacls_func(L, "setA", _spine_Bone_setA); - oluacls_func(L, "setAScaleX", _spine_Bone_setAScaleX); - oluacls_func(L, "setAScaleY", _spine_Bone_setAScaleY); - oluacls_func(L, "setAShearX", _spine_Bone_setAShearX); - oluacls_func(L, "setAShearY", _spine_Bone_setAShearY); - oluacls_func(L, "setAX", _spine_Bone_setAX); - oluacls_func(L, "setAY", _spine_Bone_setAY); - oluacls_func(L, "setAppliedRotation", _spine_Bone_setAppliedRotation); - oluacls_func(L, "setB", _spine_Bone_setB); - oluacls_func(L, "setC", _spine_Bone_setC); - oluacls_func(L, "setD", _spine_Bone_setD); - oluacls_func(L, "setInherit", _spine_Bone_setInherit); - oluacls_func(L, "setRotation", _spine_Bone_setRotation); - oluacls_func(L, "setScaleX", _spine_Bone_setScaleX); - oluacls_func(L, "setScaleY", _spine_Bone_setScaleY); - oluacls_func(L, "setShearX", _spine_Bone_setShearX); - oluacls_func(L, "setShearY", _spine_Bone_setShearY); - oluacls_func(L, "setToSetupPose", _spine_Bone_setToSetupPose); - oluacls_func(L, "setWorldX", _spine_Bone_setWorldX); - oluacls_func(L, "setWorldY", _spine_Bone_setWorldY); - oluacls_func(L, "setX", _spine_Bone_setX); - oluacls_func(L, "setY", _spine_Bone_setY); - oluacls_func(L, "setYDown", _spine_Bone_setYDown); - oluacls_func(L, "updateAppliedTransform", _spine_Bone_updateAppliedTransform); - oluacls_func(L, "updateWorldTransform", _spine_Bone_updateWorldTransform); - oluacls_func(L, "worldToLocalRotation", _spine_Bone_worldToLocalRotation); - oluacls_func(L, "worldToParent", _spine_Bone_worldToParent); - oluacls_prop(L, "a", _spine_Bone_getA, _spine_Bone_setA); - oluacls_prop(L, "aScaleX", _spine_Bone_getAScaleX, _spine_Bone_setAScaleX); - oluacls_prop(L, "aScaleY", _spine_Bone_getAScaleY, _spine_Bone_setAScaleY); - oluacls_prop(L, "aShearX", _spine_Bone_getAShearX, _spine_Bone_setAShearX); - oluacls_prop(L, "aShearY", _spine_Bone_getAShearY, _spine_Bone_setAShearY); - oluacls_prop(L, "appliedRotation", _spine_Bone_getAppliedRotation, _spine_Bone_setAppliedRotation); - oluacls_prop(L, "ax", _spine_Bone_getAX, _spine_Bone_setAX); - oluacls_prop(L, "ay", _spine_Bone_getAY, _spine_Bone_setAY); - oluacls_prop(L, "b", _spine_Bone_getB, _spine_Bone_setB); - oluacls_prop(L, "c", _spine_Bone_getC, _spine_Bone_setC); - oluacls_prop(L, "children", _spine_Bone_getChildren, nullptr); - oluacls_prop(L, "d", _spine_Bone_getD, _spine_Bone_setD); - oluacls_prop(L, "data", _spine_Bone_getData, nullptr); - oluacls_prop(L, "inherit", _spine_Bone_getInherit, _spine_Bone_setInherit); - oluacls_prop(L, "parent", _spine_Bone_getParent, nullptr); - oluacls_prop(L, "rotation", _spine_Bone_getRotation, _spine_Bone_setRotation); - oluacls_prop(L, "scaleX", _spine_Bone_getScaleX, _spine_Bone_setScaleX); - oluacls_prop(L, "scaleY", _spine_Bone_getScaleY, _spine_Bone_setScaleY); - oluacls_prop(L, "shearX", _spine_Bone_getShearX, _spine_Bone_setShearX); - oluacls_prop(L, "shearY", _spine_Bone_getShearY, _spine_Bone_setShearY); - oluacls_prop(L, "skeleton", _spine_Bone_getSkeleton, nullptr); - oluacls_prop(L, "worldRotationX", _spine_Bone_getWorldRotationX, nullptr); - oluacls_prop(L, "worldRotationY", _spine_Bone_getWorldRotationY, nullptr); - oluacls_prop(L, "worldScaleX", _spine_Bone_getWorldScaleX, nullptr); - oluacls_prop(L, "worldScaleY", _spine_Bone_getWorldScaleY, nullptr); - oluacls_prop(L, "worldToLocalRotationX", _spine_Bone_getWorldToLocalRotationX, nullptr); - oluacls_prop(L, "worldToLocalRotationY", _spine_Bone_getWorldToLocalRotationY, nullptr); - oluacls_prop(L, "worldX", _spine_Bone_getWorldX, _spine_Bone_setWorldX); - oluacls_prop(L, "worldY", _spine_Bone_getWorldY, _spine_Bone_setWorldY); - oluacls_prop(L, "x", _spine_Bone_getX, _spine_Bone_setX); - oluacls_prop(L, "y", _spine_Bone_getY, _spine_Bone_setY); - oluacls_prop(L, "yDown", _spine_Bone_isYDown, _spine_Bone_setYDown); + oluacls_func(L, "getA", _olua_fun_spine_Bone_getA); + oluacls_func(L, "getAScaleX", _olua_fun_spine_Bone_getAScaleX); + oluacls_func(L, "getAScaleY", _olua_fun_spine_Bone_getAScaleY); + oluacls_func(L, "getAShearX", _olua_fun_spine_Bone_getAShearX); + oluacls_func(L, "getAShearY", _olua_fun_spine_Bone_getAShearY); + oluacls_func(L, "getAX", _olua_fun_spine_Bone_getAX); + oluacls_func(L, "getAY", _olua_fun_spine_Bone_getAY); + oluacls_func(L, "getAppliedRotation", _olua_fun_spine_Bone_getAppliedRotation); + oluacls_func(L, "getB", _olua_fun_spine_Bone_getB); + oluacls_func(L, "getC", _olua_fun_spine_Bone_getC); + oluacls_func(L, "getChildren", _olua_fun_spine_Bone_getChildren); + oluacls_func(L, "getD", _olua_fun_spine_Bone_getD); + oluacls_func(L, "getData", _olua_fun_spine_Bone_getData); + oluacls_func(L, "getInherit", _olua_fun_spine_Bone_getInherit); + oluacls_func(L, "getParent", _olua_fun_spine_Bone_getParent); + oluacls_func(L, "getRotation", _olua_fun_spine_Bone_getRotation); + oluacls_func(L, "getScaleX", _olua_fun_spine_Bone_getScaleX); + oluacls_func(L, "getScaleY", _olua_fun_spine_Bone_getScaleY); + oluacls_func(L, "getShearX", _olua_fun_spine_Bone_getShearX); + oluacls_func(L, "getShearY", _olua_fun_spine_Bone_getShearY); + oluacls_func(L, "getSkeleton", _olua_fun_spine_Bone_getSkeleton); + oluacls_func(L, "getWorldRotationX", _olua_fun_spine_Bone_getWorldRotationX); + oluacls_func(L, "getWorldRotationY", _olua_fun_spine_Bone_getWorldRotationY); + oluacls_func(L, "getWorldScaleX", _olua_fun_spine_Bone_getWorldScaleX); + oluacls_func(L, "getWorldScaleY", _olua_fun_spine_Bone_getWorldScaleY); + oluacls_func(L, "getWorldToLocalRotationX", _olua_fun_spine_Bone_getWorldToLocalRotationX); + oluacls_func(L, "getWorldToLocalRotationY", _olua_fun_spine_Bone_getWorldToLocalRotationY); + oluacls_func(L, "getWorldX", _olua_fun_spine_Bone_getWorldX); + oluacls_func(L, "getWorldY", _olua_fun_spine_Bone_getWorldY); + oluacls_func(L, "getX", _olua_fun_spine_Bone_getX); + oluacls_func(L, "getY", _olua_fun_spine_Bone_getY); + oluacls_func(L, "isYDown", _olua_fun_spine_Bone_isYDown); + oluacls_func(L, "localToWorldRotation", _olua_fun_spine_Bone_localToWorldRotation); + oluacls_func(L, "new", _olua_fun_spine_Bone_new); + oluacls_func(L, "parentToWorld", _olua_fun_spine_Bone_parentToWorld); + oluacls_func(L, "rotateWorld", _olua_fun_spine_Bone_rotateWorld); + oluacls_func(L, "setA", _olua_fun_spine_Bone_setA); + oluacls_func(L, "setAScaleX", _olua_fun_spine_Bone_setAScaleX); + oluacls_func(L, "setAScaleY", _olua_fun_spine_Bone_setAScaleY); + oluacls_func(L, "setAShearX", _olua_fun_spine_Bone_setAShearX); + oluacls_func(L, "setAShearY", _olua_fun_spine_Bone_setAShearY); + oluacls_func(L, "setAX", _olua_fun_spine_Bone_setAX); + oluacls_func(L, "setAY", _olua_fun_spine_Bone_setAY); + oluacls_func(L, "setAppliedRotation", _olua_fun_spine_Bone_setAppliedRotation); + oluacls_func(L, "setB", _olua_fun_spine_Bone_setB); + oluacls_func(L, "setC", _olua_fun_spine_Bone_setC); + oluacls_func(L, "setD", _olua_fun_spine_Bone_setD); + oluacls_func(L, "setInherit", _olua_fun_spine_Bone_setInherit); + oluacls_func(L, "setRotation", _olua_fun_spine_Bone_setRotation); + oluacls_func(L, "setScaleX", _olua_fun_spine_Bone_setScaleX); + oluacls_func(L, "setScaleY", _olua_fun_spine_Bone_setScaleY); + oluacls_func(L, "setShearX", _olua_fun_spine_Bone_setShearX); + oluacls_func(L, "setShearY", _olua_fun_spine_Bone_setShearY); + oluacls_func(L, "setToSetupPose", _olua_fun_spine_Bone_setToSetupPose); + oluacls_func(L, "setWorldX", _olua_fun_spine_Bone_setWorldX); + oluacls_func(L, "setWorldY", _olua_fun_spine_Bone_setWorldY); + oluacls_func(L, "setX", _olua_fun_spine_Bone_setX); + oluacls_func(L, "setY", _olua_fun_spine_Bone_setY); + oluacls_func(L, "setYDown", _olua_fun_spine_Bone_setYDown); + oluacls_func(L, "updateAppliedTransform", _olua_fun_spine_Bone_updateAppliedTransform); + oluacls_func(L, "updateWorldTransform", _olua_fun_spine_Bone_updateWorldTransform); + oluacls_func(L, "worldToLocalRotation", _olua_fun_spine_Bone_worldToLocalRotation); + oluacls_func(L, "worldToParent", _olua_fun_spine_Bone_worldToParent); + oluacls_prop(L, "a", _olua_fun_spine_Bone_getA, _olua_fun_spine_Bone_setA); + oluacls_prop(L, "aScaleX", _olua_fun_spine_Bone_getAScaleX, _olua_fun_spine_Bone_setAScaleX); + oluacls_prop(L, "aScaleY", _olua_fun_spine_Bone_getAScaleY, _olua_fun_spine_Bone_setAScaleY); + oluacls_prop(L, "aShearX", _olua_fun_spine_Bone_getAShearX, _olua_fun_spine_Bone_setAShearX); + oluacls_prop(L, "aShearY", _olua_fun_spine_Bone_getAShearY, _olua_fun_spine_Bone_setAShearY); + oluacls_prop(L, "appliedRotation", _olua_fun_spine_Bone_getAppliedRotation, _olua_fun_spine_Bone_setAppliedRotation); + oluacls_prop(L, "ax", _olua_fun_spine_Bone_getAX, _olua_fun_spine_Bone_setAX); + oluacls_prop(L, "ay", _olua_fun_spine_Bone_getAY, _olua_fun_spine_Bone_setAY); + oluacls_prop(L, "b", _olua_fun_spine_Bone_getB, _olua_fun_spine_Bone_setB); + oluacls_prop(L, "c", _olua_fun_spine_Bone_getC, _olua_fun_spine_Bone_setC); + oluacls_prop(L, "children", _olua_fun_spine_Bone_getChildren, nullptr); + oluacls_prop(L, "d", _olua_fun_spine_Bone_getD, _olua_fun_spine_Bone_setD); + oluacls_prop(L, "data", _olua_fun_spine_Bone_getData, nullptr); + oluacls_prop(L, "inherit", _olua_fun_spine_Bone_getInherit, _olua_fun_spine_Bone_setInherit); + oluacls_prop(L, "parent", _olua_fun_spine_Bone_getParent, nullptr); + oluacls_prop(L, "rotation", _olua_fun_spine_Bone_getRotation, _olua_fun_spine_Bone_setRotation); + oluacls_prop(L, "scaleX", _olua_fun_spine_Bone_getScaleX, _olua_fun_spine_Bone_setScaleX); + oluacls_prop(L, "scaleY", _olua_fun_spine_Bone_getScaleY, _olua_fun_spine_Bone_setScaleY); + oluacls_prop(L, "shearX", _olua_fun_spine_Bone_getShearX, _olua_fun_spine_Bone_setShearX); + oluacls_prop(L, "shearY", _olua_fun_spine_Bone_getShearY, _olua_fun_spine_Bone_setShearY); + oluacls_prop(L, "skeleton", _olua_fun_spine_Bone_getSkeleton, nullptr); + oluacls_prop(L, "worldRotationX", _olua_fun_spine_Bone_getWorldRotationX, nullptr); + oluacls_prop(L, "worldRotationY", _olua_fun_spine_Bone_getWorldRotationY, nullptr); + oluacls_prop(L, "worldScaleX", _olua_fun_spine_Bone_getWorldScaleX, nullptr); + oluacls_prop(L, "worldScaleY", _olua_fun_spine_Bone_getWorldScaleY, nullptr); + oluacls_prop(L, "worldToLocalRotationX", _olua_fun_spine_Bone_getWorldToLocalRotationX, nullptr); + oluacls_prop(L, "worldToLocalRotationY", _olua_fun_spine_Bone_getWorldToLocalRotationY, nullptr); + oluacls_prop(L, "worldX", _olua_fun_spine_Bone_getWorldX, _olua_fun_spine_Bone_setWorldX); + oluacls_prop(L, "worldY", _olua_fun_spine_Bone_getWorldY, _olua_fun_spine_Bone_setWorldY); + oluacls_prop(L, "x", _olua_fun_spine_Bone_getX, _olua_fun_spine_Bone_setX); + oluacls_prop(L, "y", _olua_fun_spine_Bone_getY, _olua_fun_spine_Bone_setY); + oluacls_prop(L, "yDown", _olua_fun_spine_Bone_isYDown, _olua_fun_spine_Bone_setYDown); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_spine_Bone(lua_State *L) +{ + olua_require(L, "spine", luaopen_spine); + if (!olua_getclass(L, "spine.Bone")) { + luaL_error(L, "class not found: spine::Bone"); + } + return 1; +} OLUA_END_DECLS -static int _spine_Slot_getAttachment(lua_State *L) +static int _olua_fun_spine_Slot_getAttachment(lua_State *L) { olua_startinvoke(L); @@ -9693,7 +10531,7 @@ static int _spine_Slot_getAttachment(lua_State *L) return num_ret; } -static int _spine_Slot_getAttachmentState(lua_State *L) +static int _olua_fun_spine_Slot_getAttachmentState(lua_State *L) { olua_startinvoke(L); @@ -9710,7 +10548,7 @@ static int _spine_Slot_getAttachmentState(lua_State *L) return num_ret; } -static int _spine_Slot_getBone(lua_State *L) +static int _olua_fun_spine_Slot_getBone(lua_State *L) { olua_startinvoke(L); @@ -9727,7 +10565,7 @@ static int _spine_Slot_getBone(lua_State *L) return num_ret; } -static int _spine_Slot_getColor(lua_State *L) +static int _olua_fun_spine_Slot_getColor(lua_State *L) { olua_startinvoke(L); @@ -9744,7 +10582,7 @@ static int _spine_Slot_getColor(lua_State *L) return num_ret; } -static int _spine_Slot_getDarkColor(lua_State *L) +static int _olua_fun_spine_Slot_getDarkColor(lua_State *L) { olua_startinvoke(L); @@ -9761,7 +10599,7 @@ static int _spine_Slot_getDarkColor(lua_State *L) return num_ret; } -static int _spine_Slot_getData(lua_State *L) +static int _olua_fun_spine_Slot_getData(lua_State *L) { olua_startinvoke(L); @@ -9778,7 +10616,7 @@ static int _spine_Slot_getData(lua_State *L) return num_ret; } -static int _spine_Slot_getDeform(lua_State *L) +static int _olua_fun_spine_Slot_getDeform(lua_State *L) { olua_startinvoke(L); @@ -9797,7 +10635,7 @@ static int _spine_Slot_getDeform(lua_State *L) return num_ret; } -static int _spine_Slot_getSequenceIndex(lua_State *L) +static int _olua_fun_spine_Slot_getSequenceIndex(lua_State *L) { olua_startinvoke(L); @@ -9814,7 +10652,7 @@ static int _spine_Slot_getSequenceIndex(lua_State *L) return num_ret; } -static int _spine_Slot_getSkeleton(lua_State *L) +static int _olua_fun_spine_Slot_getSkeleton(lua_State *L) { olua_startinvoke(L); @@ -9831,7 +10669,7 @@ static int _spine_Slot_getSkeleton(lua_State *L) return num_ret; } -static int _spine_Slot_hasDarkColor(lua_State *L) +static int _olua_fun_spine_Slot_hasDarkColor(lua_State *L) { olua_startinvoke(L); @@ -9848,7 +10686,7 @@ static int _spine_Slot_hasDarkColor(lua_State *L) return num_ret; } -static int _spine_Slot_new(lua_State *L) +static int _olua_fun_spine_Slot_new(lua_State *L) { olua_startinvoke(L); @@ -9858,7 +10696,7 @@ static int _spine_Slot_new(lua_State *L) olua_check_object(L, 1, &arg1, "spine.SlotData"); olua_check_object(L, 2, &arg2, "spine.Bone"); - // Slot(spine::SlotData &data, spine::Bone &bone) + // spine::Slot(spine::SlotData &data, spine::Bone &bone) spine::Slot *ret = new spine::Slot(*arg1, *arg2); int num_ret = olua_push_object(L, ret, "spine.Slot"); olua_postnew(L, ret); @@ -9868,7 +10706,7 @@ static int _spine_Slot_new(lua_State *L) return num_ret; } -static int _spine_Slot_setAttachment(lua_State *L) +static int _olua_fun_spine_Slot_setAttachment(lua_State *L) { olua_startinvoke(L); @@ -9886,7 +10724,7 @@ static int _spine_Slot_setAttachment(lua_State *L) return 0; } -static int _spine_Slot_setAttachmentState(lua_State *L) +static int _olua_fun_spine_Slot_setAttachmentState(lua_State *L) { olua_startinvoke(L); @@ -9904,7 +10742,7 @@ static int _spine_Slot_setAttachmentState(lua_State *L) return 0; } -static int _spine_Slot_setSequenceIndex(lua_State *L) +static int _olua_fun_spine_Slot_setSequenceIndex(lua_State *L) { olua_startinvoke(L); @@ -9922,7 +10760,7 @@ static int _spine_Slot_setSequenceIndex(lua_State *L) return 0; } -static int _spine_Slot_setToSetupPose(lua_State *L) +static int _olua_fun_spine_Slot_setToSetupPose(lua_State *L) { olua_startinvoke(L); @@ -9938,40 +10776,49 @@ static int _spine_Slot_setToSetupPose(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_spine_Slot(lua_State *L) +static int _olua_cls_spine_Slot(lua_State *L) { oluacls_class(L, "spine.Slot"); - oluacls_func(L, "getAttachment", _spine_Slot_getAttachment); - oluacls_func(L, "getAttachmentState", _spine_Slot_getAttachmentState); - oluacls_func(L, "getBone", _spine_Slot_getBone); - oluacls_func(L, "getColor", _spine_Slot_getColor); - oluacls_func(L, "getDarkColor", _spine_Slot_getDarkColor); - oluacls_func(L, "getData", _spine_Slot_getData); - oluacls_func(L, "getDeform", _spine_Slot_getDeform); - oluacls_func(L, "getSequenceIndex", _spine_Slot_getSequenceIndex); - oluacls_func(L, "getSkeleton", _spine_Slot_getSkeleton); - oluacls_func(L, "hasDarkColor", _spine_Slot_hasDarkColor); - oluacls_func(L, "new", _spine_Slot_new); - oluacls_func(L, "setAttachment", _spine_Slot_setAttachment); - oluacls_func(L, "setAttachmentState", _spine_Slot_setAttachmentState); - oluacls_func(L, "setSequenceIndex", _spine_Slot_setSequenceIndex); - oluacls_func(L, "setToSetupPose", _spine_Slot_setToSetupPose); - oluacls_prop(L, "attachment", _spine_Slot_getAttachment, _spine_Slot_setAttachment); - oluacls_prop(L, "attachmentState", _spine_Slot_getAttachmentState, _spine_Slot_setAttachmentState); - oluacls_prop(L, "bone", _spine_Slot_getBone, nullptr); - oluacls_prop(L, "color", _spine_Slot_getColor, nullptr); - oluacls_prop(L, "darkColor", _spine_Slot_getDarkColor, nullptr); - oluacls_prop(L, "data", _spine_Slot_getData, nullptr); - oluacls_prop(L, "deform", _spine_Slot_getDeform, nullptr); - oluacls_prop(L, "sequenceIndex", _spine_Slot_getSequenceIndex, _spine_Slot_setSequenceIndex); - oluacls_prop(L, "skeleton", _spine_Slot_getSkeleton, nullptr); + oluacls_func(L, "getAttachment", _olua_fun_spine_Slot_getAttachment); + oluacls_func(L, "getAttachmentState", _olua_fun_spine_Slot_getAttachmentState); + oluacls_func(L, "getBone", _olua_fun_spine_Slot_getBone); + oluacls_func(L, "getColor", _olua_fun_spine_Slot_getColor); + oluacls_func(L, "getDarkColor", _olua_fun_spine_Slot_getDarkColor); + oluacls_func(L, "getData", _olua_fun_spine_Slot_getData); + oluacls_func(L, "getDeform", _olua_fun_spine_Slot_getDeform); + oluacls_func(L, "getSequenceIndex", _olua_fun_spine_Slot_getSequenceIndex); + oluacls_func(L, "getSkeleton", _olua_fun_spine_Slot_getSkeleton); + oluacls_func(L, "hasDarkColor", _olua_fun_spine_Slot_hasDarkColor); + oluacls_func(L, "new", _olua_fun_spine_Slot_new); + oluacls_func(L, "setAttachment", _olua_fun_spine_Slot_setAttachment); + oluacls_func(L, "setAttachmentState", _olua_fun_spine_Slot_setAttachmentState); + oluacls_func(L, "setSequenceIndex", _olua_fun_spine_Slot_setSequenceIndex); + oluacls_func(L, "setToSetupPose", _olua_fun_spine_Slot_setToSetupPose); + oluacls_prop(L, "attachment", _olua_fun_spine_Slot_getAttachment, _olua_fun_spine_Slot_setAttachment); + oluacls_prop(L, "attachmentState", _olua_fun_spine_Slot_getAttachmentState, _olua_fun_spine_Slot_setAttachmentState); + oluacls_prop(L, "bone", _olua_fun_spine_Slot_getBone, nullptr); + oluacls_prop(L, "color", _olua_fun_spine_Slot_getColor, nullptr); + oluacls_prop(L, "darkColor", _olua_fun_spine_Slot_getDarkColor, nullptr); + oluacls_prop(L, "data", _olua_fun_spine_Slot_getData, nullptr); + oluacls_prop(L, "deform", _olua_fun_spine_Slot_getDeform, nullptr); + oluacls_prop(L, "sequenceIndex", _olua_fun_spine_Slot_getSequenceIndex, _olua_fun_spine_Slot_setSequenceIndex); + oluacls_prop(L, "skeleton", _olua_fun_spine_Slot_getSkeleton, nullptr); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_spine_Slot(lua_State *L) +{ + olua_require(L, "spine", luaopen_spine); + if (!olua_getclass(L, "spine.Slot")) { + luaL_error(L, "class not found: spine::Slot"); + } return 1; } OLUA_END_DECLS -static int _spine_Attachment_copy(lua_State *L) +static int _olua_fun_spine_Attachment_copy(lua_State *L) { olua_startinvoke(L); @@ -9988,7 +10835,7 @@ static int _spine_Attachment_copy(lua_State *L) return num_ret; } -static int _spine_Attachment_dereference(lua_State *L) +static int _olua_fun_spine_Attachment_dereference(lua_State *L) { olua_startinvoke(L); @@ -10004,7 +10851,7 @@ static int _spine_Attachment_dereference(lua_State *L) return 0; } -static int _spine_Attachment_getName(lua_State *L) +static int _olua_fun_spine_Attachment_getName(lua_State *L) { olua_startinvoke(L); @@ -10021,7 +10868,7 @@ static int _spine_Attachment_getName(lua_State *L) return num_ret; } -static int _spine_Attachment_getRefCount(lua_State *L) +static int _olua_fun_spine_Attachment_getRefCount(lua_State *L) { olua_startinvoke(L); @@ -10038,7 +10885,7 @@ static int _spine_Attachment_getRefCount(lua_State *L) return num_ret; } -static int _spine_Attachment_reference(lua_State *L) +static int _olua_fun_spine_Attachment_reference(lua_State *L) { olua_startinvoke(L); @@ -10054,23 +10901,32 @@ static int _spine_Attachment_reference(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_spine_Attachment(lua_State *L) +static int _olua_cls_spine_Attachment(lua_State *L) { oluacls_class(L, "spine.Attachment"); - oluacls_func(L, "copy", _spine_Attachment_copy); - oluacls_func(L, "dereference", _spine_Attachment_dereference); - oluacls_func(L, "getName", _spine_Attachment_getName); - oluacls_func(L, "getRefCount", _spine_Attachment_getRefCount); - oluacls_func(L, "reference", _spine_Attachment_reference); - oluacls_prop(L, "name", _spine_Attachment_getName, nullptr); - oluacls_prop(L, "refCount", _spine_Attachment_getRefCount, nullptr); + oluacls_func(L, "copy", _olua_fun_spine_Attachment_copy); + oluacls_func(L, "dereference", _olua_fun_spine_Attachment_dereference); + oluacls_func(L, "getName", _olua_fun_spine_Attachment_getName); + oluacls_func(L, "getRefCount", _olua_fun_spine_Attachment_getRefCount); + oluacls_func(L, "reference", _olua_fun_spine_Attachment_reference); + oluacls_prop(L, "name", _olua_fun_spine_Attachment_getName, nullptr); + oluacls_prop(L, "refCount", _olua_fun_spine_Attachment_getRefCount, nullptr); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_spine_Attachment(lua_State *L) +{ + olua_require(L, "spine", luaopen_spine); + if (!olua_getclass(L, "spine.Attachment")) { + luaL_error(L, "class not found: spine::Attachment"); + } return 1; } OLUA_END_DECLS -static int _spine_VertexAttachment_computeWorldVertices$1(lua_State *L) +static int _olua_fun_spine_VertexAttachment_computeWorldVertices$1(lua_State *L) { olua_startinvoke(L); @@ -10080,7 +10936,7 @@ static int _spine_VertexAttachment_computeWorldVertices$1(lua_State *L) olua_to_object(L, 1, &self, "spine.VertexAttachment"); olua_check_object(L, 2, &arg1, "spine.Slot"); - olua_check_pointer(L, 3, &arg2, "olua.float"); + olua_check_valueptr(L, 3, &arg2, "olua.float"); // void computeWorldVertices(spine::Slot &slot, float *worldVertices) self->computeWorldVertices(*arg1, arg2); @@ -10090,7 +10946,7 @@ static int _spine_VertexAttachment_computeWorldVertices$1(lua_State *L) return 0; } -static int _spine_VertexAttachment_computeWorldVertices$2(lua_State *L) +static int _olua_fun_spine_VertexAttachment_computeWorldVertices$2(lua_State *L) { olua_startinvoke(L); @@ -10112,7 +10968,7 @@ static int _spine_VertexAttachment_computeWorldVertices$2(lua_State *L) return 0; } -static int _spine_VertexAttachment_computeWorldVertices$3(lua_State *L) +static int _olua_fun_spine_VertexAttachment_computeWorldVertices$3(lua_State *L) { olua_startinvoke(L); @@ -10128,7 +10984,7 @@ static int _spine_VertexAttachment_computeWorldVertices$3(lua_State *L) olua_check_object(L, 2, &arg1, "spine.Slot"); olua_check_integer(L, 3, &arg2); olua_check_integer(L, 4, &arg3); - olua_check_pointer(L, 5, &arg4, "olua.float"); + olua_check_valueptr(L, 5, &arg4, "olua.float"); olua_check_integer(L, 6, &arg5); olua_check_integer(L, 7, &arg6); @@ -10140,7 +10996,7 @@ static int _spine_VertexAttachment_computeWorldVertices$3(lua_State *L) return 0; } -static int _spine_VertexAttachment_computeWorldVertices$4(lua_State *L) +static int _olua_fun_spine_VertexAttachment_computeWorldVertices$4(lua_State *L) { olua_startinvoke(L); @@ -10148,29 +11004,25 @@ static int _spine_VertexAttachment_computeWorldVertices$4(lua_State *L) spine::Slot *arg1 = nullptr; /** slot */ size_t arg2 = 0; /** start */ size_t arg3 = 0; /** count */ - spine::Vector arg4; /** worldVertices */ + float *arg4 = nullptr; /** worldVertices */ size_t arg5 = 0; /** offset */ - size_t arg6 = 0; /** stride */ olua_to_object(L, 1, &self, "spine.VertexAttachment"); olua_check_object(L, 2, &arg1, "spine.Slot"); olua_check_integer(L, 3, &arg2); olua_check_integer(L, 4, &arg3); - olua_check_array(L, 5, arg4, [L](float *arg1) { - olua_check_number(L, -1, arg1); - }); + olua_check_valueptr(L, 5, &arg4, "olua.float"); olua_check_integer(L, 6, &arg5); - olua_check_integer(L, 7, &arg6); - // void computeWorldVertices(spine::Slot &slot, size_t start, size_t count, spine::Vector &worldVertices, size_t offset, @optional size_t stride) - self->computeWorldVertices(*arg1, arg2, arg3, arg4, arg5, arg6); + // void computeWorldVertices(spine::Slot &slot, size_t start, size_t count, float *worldVertices, size_t offset) + self->computeWorldVertices(*arg1, arg2, arg3, arg4, arg5); olua_endinvoke(L); return 0; } -static int _spine_VertexAttachment_computeWorldVertices$5(lua_State *L) +static int _olua_fun_spine_VertexAttachment_computeWorldVertices$5(lua_State *L) { olua_startinvoke(L); @@ -10178,25 +11030,29 @@ static int _spine_VertexAttachment_computeWorldVertices$5(lua_State *L) spine::Slot *arg1 = nullptr; /** slot */ size_t arg2 = 0; /** start */ size_t arg3 = 0; /** count */ - float *arg4 = nullptr; /** worldVertices */ + spine::Vector arg4; /** worldVertices */ size_t arg5 = 0; /** offset */ + size_t arg6 = 0; /** stride */ olua_to_object(L, 1, &self, "spine.VertexAttachment"); olua_check_object(L, 2, &arg1, "spine.Slot"); olua_check_integer(L, 3, &arg2); olua_check_integer(L, 4, &arg3); - olua_check_pointer(L, 5, &arg4, "olua.float"); + olua_check_array(L, 5, arg4, [L](float *arg1) { + olua_check_number(L, -1, arg1); + }); olua_check_integer(L, 6, &arg5); + olua_check_integer(L, 7, &arg6); - // void computeWorldVertices(spine::Slot &slot, size_t start, size_t count, float *worldVertices, size_t offset, @optional size_t stride) - self->computeWorldVertices(*arg1, arg2, arg3, arg4, arg5); + // void computeWorldVertices(spine::Slot &slot, size_t start, size_t count, spine::Vector &worldVertices, size_t offset, @optional size_t stride) + self->computeWorldVertices(*arg1, arg2, arg3, arg4, arg5, arg6); olua_endinvoke(L); return 0; } -static int _spine_VertexAttachment_computeWorldVertices$6(lua_State *L) +static int _olua_fun_spine_VertexAttachment_computeWorldVertices$6(lua_State *L) { olua_startinvoke(L); @@ -10216,7 +11072,7 @@ static int _spine_VertexAttachment_computeWorldVertices$6(lua_State *L) }); olua_check_integer(L, 6, &arg5); - // void computeWorldVertices(spine::Slot &slot, size_t start, size_t count, spine::Vector &worldVertices, size_t offset, @optional size_t stride) + // void computeWorldVertices(spine::Slot &slot, size_t start, size_t count, spine::Vector &worldVertices, size_t offset) self->computeWorldVertices(*arg1, arg2, arg3, arg4, arg5); olua_endinvoke(L); @@ -10224,43 +11080,43 @@ static int _spine_VertexAttachment_computeWorldVertices$6(lua_State *L) return 0; } -static int _spine_VertexAttachment_computeWorldVertices(lua_State *L) +static int _olua_fun_spine_VertexAttachment_computeWorldVertices(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 2) { - if ((olua_is_object(L, 2, "spine.Slot")) && (olua_is_pointer(L, 3, "olua.float"))) { + if ((olua_is_object(L, 2, "spine.Slot")) && (olua_is_valueptr(L, 3, "olua.float"))) { // void computeWorldVertices(spine::Slot &slot, float *worldVertices) - return _spine_VertexAttachment_computeWorldVertices$1(L); + return _olua_fun_spine_VertexAttachment_computeWorldVertices$1(L); } // if ((olua_is_object(L, 2, "spine.Slot")) && (olua_is_array(L, 3))) { // void computeWorldVertices(spine::Slot &slot, spine::Vector &worldVertices) - return _spine_VertexAttachment_computeWorldVertices$2(L); + return _olua_fun_spine_VertexAttachment_computeWorldVertices$2(L); // } } if (num_args == 5) { - if ((olua_is_object(L, 2, "spine.Slot")) && (olua_is_integer(L, 3)) && (olua_is_integer(L, 4)) && (olua_is_pointer(L, 5, "olua.float")) && (olua_is_integer(L, 6))) { - // void computeWorldVertices(spine::Slot &slot, size_t start, size_t count, float *worldVertices, size_t offset, @optional size_t stride) - return _spine_VertexAttachment_computeWorldVertices$5(L); + if ((olua_is_object(L, 2, "spine.Slot")) && (olua_is_integer(L, 3)) && (olua_is_integer(L, 4)) && (olua_is_valueptr(L, 5, "olua.float")) && (olua_is_integer(L, 6))) { + // void computeWorldVertices(spine::Slot &slot, size_t start, size_t count, float *worldVertices, size_t offset) + return _olua_fun_spine_VertexAttachment_computeWorldVertices$4(L); } // if ((olua_is_object(L, 2, "spine.Slot")) && (olua_is_integer(L, 3)) && (olua_is_integer(L, 4)) && (olua_is_array(L, 5)) && (olua_is_integer(L, 6))) { - // void computeWorldVertices(spine::Slot &slot, size_t start, size_t count, spine::Vector &worldVertices, size_t offset, @optional size_t stride) - return _spine_VertexAttachment_computeWorldVertices$6(L); + // void computeWorldVertices(spine::Slot &slot, size_t start, size_t count, spine::Vector &worldVertices, size_t offset) + return _olua_fun_spine_VertexAttachment_computeWorldVertices$6(L); // } } if (num_args == 6) { - if ((olua_is_object(L, 2, "spine.Slot")) && (olua_is_integer(L, 3)) && (olua_is_integer(L, 4)) && (olua_is_pointer(L, 5, "olua.float")) && (olua_is_integer(L, 6)) && (olua_is_integer(L, 7))) { + if ((olua_is_object(L, 2, "spine.Slot")) && (olua_is_integer(L, 3)) && (olua_is_integer(L, 4)) && (olua_is_valueptr(L, 5, "olua.float")) && (olua_is_integer(L, 6)) && (olua_is_integer(L, 7))) { // void computeWorldVertices(spine::Slot &slot, size_t start, size_t count, float *worldVertices, size_t offset, @optional size_t stride) - return _spine_VertexAttachment_computeWorldVertices$3(L); + return _olua_fun_spine_VertexAttachment_computeWorldVertices$3(L); } // if ((olua_is_object(L, 2, "spine.Slot")) && (olua_is_integer(L, 3)) && (olua_is_integer(L, 4)) && (olua_is_array(L, 5)) && (olua_is_integer(L, 6)) && (olua_is_integer(L, 7))) { // void computeWorldVertices(spine::Slot &slot, size_t start, size_t count, spine::Vector &worldVertices, size_t offset, @optional size_t stride) - return _spine_VertexAttachment_computeWorldVertices$4(L); + return _olua_fun_spine_VertexAttachment_computeWorldVertices$5(L); // } } @@ -10269,7 +11125,7 @@ static int _spine_VertexAttachment_computeWorldVertices(lua_State *L) return 0; } -static int _spine_VertexAttachment_copyTo(lua_State *L) +static int _olua_fun_spine_VertexAttachment_copyTo(lua_State *L) { olua_startinvoke(L); @@ -10287,7 +11143,7 @@ static int _spine_VertexAttachment_copyTo(lua_State *L) return 0; } -static int _spine_VertexAttachment_getBones(lua_State *L) +static int _olua_fun_spine_VertexAttachment_getBones(lua_State *L) { olua_startinvoke(L); @@ -10306,7 +11162,7 @@ static int _spine_VertexAttachment_getBones(lua_State *L) return num_ret; } -static int _spine_VertexAttachment_getId(lua_State *L) +static int _olua_fun_spine_VertexAttachment_getId(lua_State *L) { olua_startinvoke(L); @@ -10323,7 +11179,7 @@ static int _spine_VertexAttachment_getId(lua_State *L) return num_ret; } -static int _spine_VertexAttachment_getTimelineAttachment(lua_State *L) +static int _olua_fun_spine_VertexAttachment_getTimelineAttachment(lua_State *L) { olua_startinvoke(L); @@ -10340,7 +11196,7 @@ static int _spine_VertexAttachment_getTimelineAttachment(lua_State *L) return num_ret; } -static int _spine_VertexAttachment_getVertices(lua_State *L) +static int _olua_fun_spine_VertexAttachment_getVertices(lua_State *L) { olua_startinvoke(L); @@ -10359,7 +11215,7 @@ static int _spine_VertexAttachment_getVertices(lua_State *L) return num_ret; } -static int _spine_VertexAttachment_getWorldVerticesLength(lua_State *L) +static int _olua_fun_spine_VertexAttachment_getWorldVerticesLength(lua_State *L) { olua_startinvoke(L); @@ -10376,7 +11232,7 @@ static int _spine_VertexAttachment_getWorldVerticesLength(lua_State *L) return num_ret; } -static int _spine_VertexAttachment_setTimelineAttachment(lua_State *L) +static int _olua_fun_spine_VertexAttachment_setTimelineAttachment(lua_State *L) { olua_startinvoke(L); @@ -10394,7 +11250,7 @@ static int _spine_VertexAttachment_setTimelineAttachment(lua_State *L) return 0; } -static int _spine_VertexAttachment_setWorldVerticesLength(lua_State *L) +static int _olua_fun_spine_VertexAttachment_setWorldVerticesLength(lua_State *L) { olua_startinvoke(L); @@ -10412,30 +11268,39 @@ static int _spine_VertexAttachment_setWorldVerticesLength(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_spine_VertexAttachment(lua_State *L) +static int _olua_cls_spine_VertexAttachment(lua_State *L) { oluacls_class(L, "spine.VertexAttachment"); - oluacls_func(L, "computeWorldVertices", _spine_VertexAttachment_computeWorldVertices); - oluacls_func(L, "copyTo", _spine_VertexAttachment_copyTo); - oluacls_func(L, "getBones", _spine_VertexAttachment_getBones); - oluacls_func(L, "getId", _spine_VertexAttachment_getId); - oluacls_func(L, "getTimelineAttachment", _spine_VertexAttachment_getTimelineAttachment); - oluacls_func(L, "getVertices", _spine_VertexAttachment_getVertices); - oluacls_func(L, "getWorldVerticesLength", _spine_VertexAttachment_getWorldVerticesLength); - oluacls_func(L, "setTimelineAttachment", _spine_VertexAttachment_setTimelineAttachment); - oluacls_func(L, "setWorldVerticesLength", _spine_VertexAttachment_setWorldVerticesLength); - oluacls_prop(L, "bones", _spine_VertexAttachment_getBones, nullptr); - oluacls_prop(L, "id", _spine_VertexAttachment_getId, nullptr); - oluacls_prop(L, "timelineAttachment", _spine_VertexAttachment_getTimelineAttachment, _spine_VertexAttachment_setTimelineAttachment); - oluacls_prop(L, "vertices", _spine_VertexAttachment_getVertices, nullptr); - oluacls_prop(L, "worldVerticesLength", _spine_VertexAttachment_getWorldVerticesLength, _spine_VertexAttachment_setWorldVerticesLength); + oluacls_func(L, "computeWorldVertices", _olua_fun_spine_VertexAttachment_computeWorldVertices); + oluacls_func(L, "copyTo", _olua_fun_spine_VertexAttachment_copyTo); + oluacls_func(L, "getBones", _olua_fun_spine_VertexAttachment_getBones); + oluacls_func(L, "getId", _olua_fun_spine_VertexAttachment_getId); + oluacls_func(L, "getTimelineAttachment", _olua_fun_spine_VertexAttachment_getTimelineAttachment); + oluacls_func(L, "getVertices", _olua_fun_spine_VertexAttachment_getVertices); + oluacls_func(L, "getWorldVerticesLength", _olua_fun_spine_VertexAttachment_getWorldVerticesLength); + oluacls_func(L, "setTimelineAttachment", _olua_fun_spine_VertexAttachment_setTimelineAttachment); + oluacls_func(L, "setWorldVerticesLength", _olua_fun_spine_VertexAttachment_setWorldVerticesLength); + oluacls_prop(L, "bones", _olua_fun_spine_VertexAttachment_getBones, nullptr); + oluacls_prop(L, "id", _olua_fun_spine_VertexAttachment_getId, nullptr); + oluacls_prop(L, "timelineAttachment", _olua_fun_spine_VertexAttachment_getTimelineAttachment, _olua_fun_spine_VertexAttachment_setTimelineAttachment); + oluacls_prop(L, "vertices", _olua_fun_spine_VertexAttachment_getVertices, nullptr); + oluacls_prop(L, "worldVerticesLength", _olua_fun_spine_VertexAttachment_getWorldVerticesLength, _olua_fun_spine_VertexAttachment_setWorldVerticesLength); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_spine_VertexAttachment(lua_State *L) +{ + olua_require(L, "spine", luaopen_spine); + if (!olua_getclass(L, "spine.VertexAttachment")) { + luaL_error(L, "class not found: spine::VertexAttachment"); + } return 1; } OLUA_END_DECLS -static int _spine_ClippingAttachment_getColor(lua_State *L) +static int _olua_fun_spine_ClippingAttachment_getColor(lua_State *L) { olua_startinvoke(L); @@ -10452,7 +11317,7 @@ static int _spine_ClippingAttachment_getColor(lua_State *L) return num_ret; } -static int _spine_ClippingAttachment_getEndSlot(lua_State *L) +static int _olua_fun_spine_ClippingAttachment_getEndSlot(lua_State *L) { olua_startinvoke(L); @@ -10469,7 +11334,7 @@ static int _spine_ClippingAttachment_getEndSlot(lua_State *L) return num_ret; } -static int _spine_ClippingAttachment_new(lua_State *L) +static int _olua_fun_spine_ClippingAttachment_new(lua_State *L) { olua_startinvoke(L); @@ -10477,7 +11342,7 @@ static int _spine_ClippingAttachment_new(lua_State *L) olua_check_string(L, 1, &arg1); - // ClippingAttachment(const spine::String &name) + // spine::ClippingAttachment(const spine::String &name) spine::ClippingAttachment *ret = new spine::ClippingAttachment(arg1); int num_ret = olua_push_object(L, ret, "spine.ClippingAttachment"); olua_postnew(L, ret); @@ -10487,7 +11352,7 @@ static int _spine_ClippingAttachment_new(lua_State *L) return num_ret; } -static int _spine_ClippingAttachment_setEndSlot(lua_State *L) +static int _olua_fun_spine_ClippingAttachment_setEndSlot(lua_State *L) { olua_startinvoke(L); @@ -10505,22 +11370,31 @@ static int _spine_ClippingAttachment_setEndSlot(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_spine_ClippingAttachment(lua_State *L) +static int _olua_cls_spine_ClippingAttachment(lua_State *L) { oluacls_class(L, "spine.ClippingAttachment"); - oluacls_func(L, "getColor", _spine_ClippingAttachment_getColor); - oluacls_func(L, "getEndSlot", _spine_ClippingAttachment_getEndSlot); - oluacls_func(L, "new", _spine_ClippingAttachment_new); - oluacls_func(L, "setEndSlot", _spine_ClippingAttachment_setEndSlot); - oluacls_prop(L, "color", _spine_ClippingAttachment_getColor, nullptr); - oluacls_prop(L, "endSlot", _spine_ClippingAttachment_getEndSlot, _spine_ClippingAttachment_setEndSlot); + oluacls_func(L, "getColor", _olua_fun_spine_ClippingAttachment_getColor); + oluacls_func(L, "getEndSlot", _olua_fun_spine_ClippingAttachment_getEndSlot); + oluacls_func(L, "new", _olua_fun_spine_ClippingAttachment_new); + oluacls_func(L, "setEndSlot", _olua_fun_spine_ClippingAttachment_setEndSlot); + oluacls_prop(L, "color", _olua_fun_spine_ClippingAttachment_getColor, nullptr); + oluacls_prop(L, "endSlot", _olua_fun_spine_ClippingAttachment_getEndSlot, _olua_fun_spine_ClippingAttachment_setEndSlot); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_spine_ClippingAttachment(lua_State *L) +{ + olua_require(L, "spine", luaopen_spine); + if (!olua_getclass(L, "spine.ClippingAttachment")) { + luaL_error(L, "class not found: spine::ClippingAttachment"); + } + return 1; +} OLUA_END_DECLS -static int _spine_BoundingBoxAttachment_getColor(lua_State *L) +static int _olua_fun_spine_BoundingBoxAttachment_getColor(lua_State *L) { olua_startinvoke(L); @@ -10537,7 +11411,7 @@ static int _spine_BoundingBoxAttachment_getColor(lua_State *L) return num_ret; } -static int _spine_BoundingBoxAttachment_new(lua_State *L) +static int _olua_fun_spine_BoundingBoxAttachment_new(lua_State *L) { olua_startinvoke(L); @@ -10545,7 +11419,7 @@ static int _spine_BoundingBoxAttachment_new(lua_State *L) olua_check_string(L, 1, &arg1); - // BoundingBoxAttachment(const spine::String &name) + // spine::BoundingBoxAttachment(const spine::String &name) spine::BoundingBoxAttachment *ret = new spine::BoundingBoxAttachment(arg1); int num_ret = olua_push_object(L, ret, "spine.BoundingBoxAttachment"); olua_postnew(L, ret); @@ -10555,19 +11429,28 @@ static int _spine_BoundingBoxAttachment_new(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_spine_BoundingBoxAttachment(lua_State *L) +static int _olua_cls_spine_BoundingBoxAttachment(lua_State *L) { oluacls_class(L, "spine.BoundingBoxAttachment"); - oluacls_func(L, "getColor", _spine_BoundingBoxAttachment_getColor); - oluacls_func(L, "new", _spine_BoundingBoxAttachment_new); - oluacls_prop(L, "color", _spine_BoundingBoxAttachment_getColor, nullptr); + oluacls_func(L, "getColor", _olua_fun_spine_BoundingBoxAttachment_getColor); + oluacls_func(L, "new", _olua_fun_spine_BoundingBoxAttachment_new); + oluacls_prop(L, "color", _olua_fun_spine_BoundingBoxAttachment_getColor, nullptr); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_spine_BoundingBoxAttachment(lua_State *L) +{ + olua_require(L, "spine", luaopen_spine); + if (!olua_getclass(L, "spine.BoundingBoxAttachment")) { + luaL_error(L, "class not found: spine::BoundingBoxAttachment"); + } return 1; } OLUA_END_DECLS -static int _spine_MeshAttachment_getColor(lua_State *L) +static int _olua_fun_spine_MeshAttachment_getColor(lua_State *L) { olua_startinvoke(L); @@ -10584,7 +11467,7 @@ static int _spine_MeshAttachment_getColor(lua_State *L) return num_ret; } -static int _spine_MeshAttachment_getEdges(lua_State *L) +static int _olua_fun_spine_MeshAttachment_getEdges(lua_State *L) { olua_startinvoke(L); @@ -10603,7 +11486,7 @@ static int _spine_MeshAttachment_getEdges(lua_State *L) return num_ret; } -static int _spine_MeshAttachment_getHeight(lua_State *L) +static int _olua_fun_spine_MeshAttachment_getHeight(lua_State *L) { olua_startinvoke(L); @@ -10620,7 +11503,7 @@ static int _spine_MeshAttachment_getHeight(lua_State *L) return num_ret; } -static int _spine_MeshAttachment_getHullLength(lua_State *L) +static int _olua_fun_spine_MeshAttachment_getHullLength(lua_State *L) { olua_startinvoke(L); @@ -10637,7 +11520,7 @@ static int _spine_MeshAttachment_getHullLength(lua_State *L) return num_ret; } -static int _spine_MeshAttachment_getParentMesh(lua_State *L) +static int _olua_fun_spine_MeshAttachment_getParentMesh(lua_State *L) { olua_startinvoke(L); @@ -10654,7 +11537,7 @@ static int _spine_MeshAttachment_getParentMesh(lua_State *L) return num_ret; } -static int _spine_MeshAttachment_getPath(lua_State *L) +static int _olua_fun_spine_MeshAttachment_getPath(lua_State *L) { olua_startinvoke(L); @@ -10671,7 +11554,7 @@ static int _spine_MeshAttachment_getPath(lua_State *L) return num_ret; } -static int _spine_MeshAttachment_getRegion(lua_State *L) +static int _olua_fun_spine_MeshAttachment_getRegion(lua_State *L) { olua_startinvoke(L); @@ -10688,7 +11571,7 @@ static int _spine_MeshAttachment_getRegion(lua_State *L) return num_ret; } -static int _spine_MeshAttachment_getRegionUVs(lua_State *L) +static int _olua_fun_spine_MeshAttachment_getRegionUVs(lua_State *L) { olua_startinvoke(L); @@ -10707,7 +11590,7 @@ static int _spine_MeshAttachment_getRegionUVs(lua_State *L) return num_ret; } -static int _spine_MeshAttachment_getSequence(lua_State *L) +static int _olua_fun_spine_MeshAttachment_getSequence(lua_State *L) { olua_startinvoke(L); @@ -10724,7 +11607,7 @@ static int _spine_MeshAttachment_getSequence(lua_State *L) return num_ret; } -static int _spine_MeshAttachment_getTriangles(lua_State *L) +static int _olua_fun_spine_MeshAttachment_getTriangles(lua_State *L) { olua_startinvoke(L); @@ -10743,7 +11626,7 @@ static int _spine_MeshAttachment_getTriangles(lua_State *L) return num_ret; } -static int _spine_MeshAttachment_getUVs(lua_State *L) +static int _olua_fun_spine_MeshAttachment_getUVs(lua_State *L) { olua_startinvoke(L); @@ -10762,7 +11645,7 @@ static int _spine_MeshAttachment_getUVs(lua_State *L) return num_ret; } -static int _spine_MeshAttachment_getWidth(lua_State *L) +static int _olua_fun_spine_MeshAttachment_getWidth(lua_State *L) { olua_startinvoke(L); @@ -10779,7 +11662,7 @@ static int _spine_MeshAttachment_getWidth(lua_State *L) return num_ret; } -static int _spine_MeshAttachment_new(lua_State *L) +static int _olua_fun_spine_MeshAttachment_new(lua_State *L) { olua_startinvoke(L); @@ -10787,7 +11670,7 @@ static int _spine_MeshAttachment_new(lua_State *L) olua_check_string(L, 1, &arg1); - // MeshAttachment(const spine::String &name) + // spine::MeshAttachment(const spine::String &name) spine::MeshAttachment *ret = new spine::MeshAttachment(arg1); int num_ret = olua_push_object(L, ret, "spine.MeshAttachment"); olua_postnew(L, ret); @@ -10797,7 +11680,7 @@ static int _spine_MeshAttachment_new(lua_State *L) return num_ret; } -static int _spine_MeshAttachment_newLinkedMesh(lua_State *L) +static int _olua_fun_spine_MeshAttachment_newLinkedMesh(lua_State *L) { olua_startinvoke(L); @@ -10814,7 +11697,7 @@ static int _spine_MeshAttachment_newLinkedMesh(lua_State *L) return num_ret; } -static int _spine_MeshAttachment_setHeight(lua_State *L) +static int _olua_fun_spine_MeshAttachment_setHeight(lua_State *L) { olua_startinvoke(L); @@ -10832,7 +11715,7 @@ static int _spine_MeshAttachment_setHeight(lua_State *L) return 0; } -static int _spine_MeshAttachment_setHullLength(lua_State *L) +static int _olua_fun_spine_MeshAttachment_setHullLength(lua_State *L) { olua_startinvoke(L); @@ -10850,7 +11733,7 @@ static int _spine_MeshAttachment_setHullLength(lua_State *L) return 0; } -static int _spine_MeshAttachment_setParentMesh(lua_State *L) +static int _olua_fun_spine_MeshAttachment_setParentMesh(lua_State *L) { olua_startinvoke(L); @@ -10868,7 +11751,7 @@ static int _spine_MeshAttachment_setParentMesh(lua_State *L) return 0; } -static int _spine_MeshAttachment_setPath(lua_State *L) +static int _olua_fun_spine_MeshAttachment_setPath(lua_State *L) { olua_startinvoke(L); @@ -10886,7 +11769,7 @@ static int _spine_MeshAttachment_setPath(lua_State *L) return 0; } -static int _spine_MeshAttachment_setRegion(lua_State *L) +static int _olua_fun_spine_MeshAttachment_setRegion(lua_State *L) { olua_startinvoke(L); @@ -10904,7 +11787,7 @@ static int _spine_MeshAttachment_setRegion(lua_State *L) return 0; } -static int _spine_MeshAttachment_setSequence(lua_State *L) +static int _olua_fun_spine_MeshAttachment_setSequence(lua_State *L) { olua_startinvoke(L); @@ -10922,7 +11805,7 @@ static int _spine_MeshAttachment_setSequence(lua_State *L) return 0; } -static int _spine_MeshAttachment_setWidth(lua_State *L) +static int _olua_fun_spine_MeshAttachment_setWidth(lua_State *L) { olua_startinvoke(L); @@ -10940,7 +11823,7 @@ static int _spine_MeshAttachment_setWidth(lua_State *L) return 0; } -static int _spine_MeshAttachment_updateRegion(lua_State *L) +static int _olua_fun_spine_MeshAttachment_updateRegion(lua_State *L) { olua_startinvoke(L); @@ -10956,50 +11839,59 @@ static int _spine_MeshAttachment_updateRegion(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_spine_MeshAttachment(lua_State *L) +static int _olua_cls_spine_MeshAttachment(lua_State *L) { oluacls_class(L, "spine.MeshAttachment"); - oluacls_func(L, "getColor", _spine_MeshAttachment_getColor); - oluacls_func(L, "getEdges", _spine_MeshAttachment_getEdges); - oluacls_func(L, "getHeight", _spine_MeshAttachment_getHeight); - oluacls_func(L, "getHullLength", _spine_MeshAttachment_getHullLength); - oluacls_func(L, "getParentMesh", _spine_MeshAttachment_getParentMesh); - oluacls_func(L, "getPath", _spine_MeshAttachment_getPath); - oluacls_func(L, "getRegion", _spine_MeshAttachment_getRegion); - oluacls_func(L, "getRegionUVs", _spine_MeshAttachment_getRegionUVs); - oluacls_func(L, "getSequence", _spine_MeshAttachment_getSequence); - oluacls_func(L, "getTriangles", _spine_MeshAttachment_getTriangles); - oluacls_func(L, "getUVs", _spine_MeshAttachment_getUVs); - oluacls_func(L, "getWidth", _spine_MeshAttachment_getWidth); - oluacls_func(L, "new", _spine_MeshAttachment_new); - oluacls_func(L, "newLinkedMesh", _spine_MeshAttachment_newLinkedMesh); - oluacls_func(L, "setHeight", _spine_MeshAttachment_setHeight); - oluacls_func(L, "setHullLength", _spine_MeshAttachment_setHullLength); - oluacls_func(L, "setParentMesh", _spine_MeshAttachment_setParentMesh); - oluacls_func(L, "setPath", _spine_MeshAttachment_setPath); - oluacls_func(L, "setRegion", _spine_MeshAttachment_setRegion); - oluacls_func(L, "setSequence", _spine_MeshAttachment_setSequence); - oluacls_func(L, "setWidth", _spine_MeshAttachment_setWidth); - oluacls_func(L, "updateRegion", _spine_MeshAttachment_updateRegion); - oluacls_prop(L, "color", _spine_MeshAttachment_getColor, nullptr); - oluacls_prop(L, "edges", _spine_MeshAttachment_getEdges, nullptr); - oluacls_prop(L, "height", _spine_MeshAttachment_getHeight, _spine_MeshAttachment_setHeight); - oluacls_prop(L, "hullLength", _spine_MeshAttachment_getHullLength, _spine_MeshAttachment_setHullLength); - oluacls_prop(L, "parentMesh", _spine_MeshAttachment_getParentMesh, _spine_MeshAttachment_setParentMesh); - oluacls_prop(L, "path", _spine_MeshAttachment_getPath, _spine_MeshAttachment_setPath); - oluacls_prop(L, "region", _spine_MeshAttachment_getRegion, _spine_MeshAttachment_setRegion); - oluacls_prop(L, "regionUVs", _spine_MeshAttachment_getRegionUVs, nullptr); - oluacls_prop(L, "sequence", _spine_MeshAttachment_getSequence, _spine_MeshAttachment_setSequence); - oluacls_prop(L, "triangles", _spine_MeshAttachment_getTriangles, nullptr); - oluacls_prop(L, "uvs", _spine_MeshAttachment_getUVs, nullptr); - oluacls_prop(L, "width", _spine_MeshAttachment_getWidth, _spine_MeshAttachment_setWidth); + oluacls_func(L, "getColor", _olua_fun_spine_MeshAttachment_getColor); + oluacls_func(L, "getEdges", _olua_fun_spine_MeshAttachment_getEdges); + oluacls_func(L, "getHeight", _olua_fun_spine_MeshAttachment_getHeight); + oluacls_func(L, "getHullLength", _olua_fun_spine_MeshAttachment_getHullLength); + oluacls_func(L, "getParentMesh", _olua_fun_spine_MeshAttachment_getParentMesh); + oluacls_func(L, "getPath", _olua_fun_spine_MeshAttachment_getPath); + oluacls_func(L, "getRegion", _olua_fun_spine_MeshAttachment_getRegion); + oluacls_func(L, "getRegionUVs", _olua_fun_spine_MeshAttachment_getRegionUVs); + oluacls_func(L, "getSequence", _olua_fun_spine_MeshAttachment_getSequence); + oluacls_func(L, "getTriangles", _olua_fun_spine_MeshAttachment_getTriangles); + oluacls_func(L, "getUVs", _olua_fun_spine_MeshAttachment_getUVs); + oluacls_func(L, "getWidth", _olua_fun_spine_MeshAttachment_getWidth); + oluacls_func(L, "new", _olua_fun_spine_MeshAttachment_new); + oluacls_func(L, "newLinkedMesh", _olua_fun_spine_MeshAttachment_newLinkedMesh); + oluacls_func(L, "setHeight", _olua_fun_spine_MeshAttachment_setHeight); + oluacls_func(L, "setHullLength", _olua_fun_spine_MeshAttachment_setHullLength); + oluacls_func(L, "setParentMesh", _olua_fun_spine_MeshAttachment_setParentMesh); + oluacls_func(L, "setPath", _olua_fun_spine_MeshAttachment_setPath); + oluacls_func(L, "setRegion", _olua_fun_spine_MeshAttachment_setRegion); + oluacls_func(L, "setSequence", _olua_fun_spine_MeshAttachment_setSequence); + oluacls_func(L, "setWidth", _olua_fun_spine_MeshAttachment_setWidth); + oluacls_func(L, "updateRegion", _olua_fun_spine_MeshAttachment_updateRegion); + oluacls_prop(L, "color", _olua_fun_spine_MeshAttachment_getColor, nullptr); + oluacls_prop(L, "edges", _olua_fun_spine_MeshAttachment_getEdges, nullptr); + oluacls_prop(L, "height", _olua_fun_spine_MeshAttachment_getHeight, _olua_fun_spine_MeshAttachment_setHeight); + oluacls_prop(L, "hullLength", _olua_fun_spine_MeshAttachment_getHullLength, _olua_fun_spine_MeshAttachment_setHullLength); + oluacls_prop(L, "parentMesh", _olua_fun_spine_MeshAttachment_getParentMesh, _olua_fun_spine_MeshAttachment_setParentMesh); + oluacls_prop(L, "path", _olua_fun_spine_MeshAttachment_getPath, _olua_fun_spine_MeshAttachment_setPath); + oluacls_prop(L, "region", _olua_fun_spine_MeshAttachment_getRegion, _olua_fun_spine_MeshAttachment_setRegion); + oluacls_prop(L, "regionUVs", _olua_fun_spine_MeshAttachment_getRegionUVs, nullptr); + oluacls_prop(L, "sequence", _olua_fun_spine_MeshAttachment_getSequence, _olua_fun_spine_MeshAttachment_setSequence); + oluacls_prop(L, "triangles", _olua_fun_spine_MeshAttachment_getTriangles, nullptr); + oluacls_prop(L, "uvs", _olua_fun_spine_MeshAttachment_getUVs, nullptr); + oluacls_prop(L, "width", _olua_fun_spine_MeshAttachment_getWidth, _olua_fun_spine_MeshAttachment_setWidth); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_spine_MeshAttachment(lua_State *L) +{ + olua_require(L, "spine", luaopen_spine); + if (!olua_getclass(L, "spine.MeshAttachment")) { + luaL_error(L, "class not found: spine::MeshAttachment"); + } return 1; } OLUA_END_DECLS -static int _spine_PathAttachment_getColor(lua_State *L) +static int _olua_fun_spine_PathAttachment_getColor(lua_State *L) { olua_startinvoke(L); @@ -11016,7 +11908,7 @@ static int _spine_PathAttachment_getColor(lua_State *L) return num_ret; } -static int _spine_PathAttachment_getLengths(lua_State *L) +static int _olua_fun_spine_PathAttachment_getLengths(lua_State *L) { olua_startinvoke(L); @@ -11035,7 +11927,7 @@ static int _spine_PathAttachment_getLengths(lua_State *L) return num_ret; } -static int _spine_PathAttachment_isClosed(lua_State *L) +static int _olua_fun_spine_PathAttachment_isClosed(lua_State *L) { olua_startinvoke(L); @@ -11052,7 +11944,7 @@ static int _spine_PathAttachment_isClosed(lua_State *L) return num_ret; } -static int _spine_PathAttachment_isConstantSpeed(lua_State *L) +static int _olua_fun_spine_PathAttachment_isConstantSpeed(lua_State *L) { olua_startinvoke(L); @@ -11069,7 +11961,7 @@ static int _spine_PathAttachment_isConstantSpeed(lua_State *L) return num_ret; } -static int _spine_PathAttachment_new(lua_State *L) +static int _olua_fun_spine_PathAttachment_new(lua_State *L) { olua_startinvoke(L); @@ -11077,7 +11969,7 @@ static int _spine_PathAttachment_new(lua_State *L) olua_check_string(L, 1, &arg1); - // PathAttachment(const spine::String &name) + // spine::PathAttachment(const spine::String &name) spine::PathAttachment *ret = new spine::PathAttachment(arg1); int num_ret = olua_push_object(L, ret, "spine.PathAttachment"); olua_postnew(L, ret); @@ -11087,7 +11979,7 @@ static int _spine_PathAttachment_new(lua_State *L) return num_ret; } -static int _spine_PathAttachment_setClosed(lua_State *L) +static int _olua_fun_spine_PathAttachment_setClosed(lua_State *L) { olua_startinvoke(L); @@ -11105,7 +11997,7 @@ static int _spine_PathAttachment_setClosed(lua_State *L) return 0; } -static int _spine_PathAttachment_setConstantSpeed(lua_State *L) +static int _olua_fun_spine_PathAttachment_setConstantSpeed(lua_State *L) { olua_startinvoke(L); @@ -11123,27 +12015,36 @@ static int _spine_PathAttachment_setConstantSpeed(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_spine_PathAttachment(lua_State *L) +static int _olua_cls_spine_PathAttachment(lua_State *L) { oluacls_class(L, "spine.PathAttachment"); - oluacls_func(L, "getColor", _spine_PathAttachment_getColor); - oluacls_func(L, "getLengths", _spine_PathAttachment_getLengths); - oluacls_func(L, "isClosed", _spine_PathAttachment_isClosed); - oluacls_func(L, "isConstantSpeed", _spine_PathAttachment_isConstantSpeed); - oluacls_func(L, "new", _spine_PathAttachment_new); - oluacls_func(L, "setClosed", _spine_PathAttachment_setClosed); - oluacls_func(L, "setConstantSpeed", _spine_PathAttachment_setConstantSpeed); - oluacls_prop(L, "closed", _spine_PathAttachment_isClosed, _spine_PathAttachment_setClosed); - oluacls_prop(L, "color", _spine_PathAttachment_getColor, nullptr); - oluacls_prop(L, "constantSpeed", _spine_PathAttachment_isConstantSpeed, _spine_PathAttachment_setConstantSpeed); - oluacls_prop(L, "lengths", _spine_PathAttachment_getLengths, nullptr); + oluacls_func(L, "getColor", _olua_fun_spine_PathAttachment_getColor); + oluacls_func(L, "getLengths", _olua_fun_spine_PathAttachment_getLengths); + oluacls_func(L, "isClosed", _olua_fun_spine_PathAttachment_isClosed); + oluacls_func(L, "isConstantSpeed", _olua_fun_spine_PathAttachment_isConstantSpeed); + oluacls_func(L, "new", _olua_fun_spine_PathAttachment_new); + oluacls_func(L, "setClosed", _olua_fun_spine_PathAttachment_setClosed); + oluacls_func(L, "setConstantSpeed", _olua_fun_spine_PathAttachment_setConstantSpeed); + oluacls_prop(L, "closed", _olua_fun_spine_PathAttachment_isClosed, _olua_fun_spine_PathAttachment_setClosed); + oluacls_prop(L, "color", _olua_fun_spine_PathAttachment_getColor, nullptr); + oluacls_prop(L, "constantSpeed", _olua_fun_spine_PathAttachment_isConstantSpeed, _olua_fun_spine_PathAttachment_setConstantSpeed); + oluacls_prop(L, "lengths", _olua_fun_spine_PathAttachment_getLengths, nullptr); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_spine_PathAttachment(lua_State *L) +{ + olua_require(L, "spine", luaopen_spine); + if (!olua_getclass(L, "spine.PathAttachment")) { + luaL_error(L, "class not found: spine::PathAttachment"); + } return 1; } OLUA_END_DECLS -static int _spine_PathConstraint_getBones(lua_State *L) +static int _olua_fun_spine_PathConstraint_getBones(lua_State *L) { olua_startinvoke(L); @@ -11162,7 +12063,7 @@ static int _spine_PathConstraint_getBones(lua_State *L) return num_ret; } -static int _spine_PathConstraint_getData(lua_State *L) +static int _olua_fun_spine_PathConstraint_getData(lua_State *L) { olua_startinvoke(L); @@ -11179,7 +12080,7 @@ static int _spine_PathConstraint_getData(lua_State *L) return num_ret; } -static int _spine_PathConstraint_getMixRotate(lua_State *L) +static int _olua_fun_spine_PathConstraint_getMixRotate(lua_State *L) { olua_startinvoke(L); @@ -11196,7 +12097,7 @@ static int _spine_PathConstraint_getMixRotate(lua_State *L) return num_ret; } -static int _spine_PathConstraint_getMixX(lua_State *L) +static int _olua_fun_spine_PathConstraint_getMixX(lua_State *L) { olua_startinvoke(L); @@ -11213,7 +12114,7 @@ static int _spine_PathConstraint_getMixX(lua_State *L) return num_ret; } -static int _spine_PathConstraint_getMixY(lua_State *L) +static int _olua_fun_spine_PathConstraint_getMixY(lua_State *L) { olua_startinvoke(L); @@ -11230,7 +12131,7 @@ static int _spine_PathConstraint_getMixY(lua_State *L) return num_ret; } -static int _spine_PathConstraint_getOrder(lua_State *L) +static int _olua_fun_spine_PathConstraint_getOrder(lua_State *L) { olua_startinvoke(L); @@ -11247,7 +12148,7 @@ static int _spine_PathConstraint_getOrder(lua_State *L) return num_ret; } -static int _spine_PathConstraint_getPosition(lua_State *L) +static int _olua_fun_spine_PathConstraint_getPosition(lua_State *L) { olua_startinvoke(L); @@ -11264,7 +12165,7 @@ static int _spine_PathConstraint_getPosition(lua_State *L) return num_ret; } -static int _spine_PathConstraint_getSpacing(lua_State *L) +static int _olua_fun_spine_PathConstraint_getSpacing(lua_State *L) { olua_startinvoke(L); @@ -11281,7 +12182,7 @@ static int _spine_PathConstraint_getSpacing(lua_State *L) return num_ret; } -static int _spine_PathConstraint_getTarget(lua_State *L) +static int _olua_fun_spine_PathConstraint_getTarget(lua_State *L) { olua_startinvoke(L); @@ -11298,7 +12199,7 @@ static int _spine_PathConstraint_getTarget(lua_State *L) return num_ret; } -static int _spine_PathConstraint_new(lua_State *L) +static int _olua_fun_spine_PathConstraint_new(lua_State *L) { olua_startinvoke(L); @@ -11308,7 +12209,7 @@ static int _spine_PathConstraint_new(lua_State *L) olua_check_object(L, 1, &arg1, "spine.PathConstraintData"); olua_check_object(L, 2, &arg2, "spine.Skeleton"); - // PathConstraint(spine::PathConstraintData &data, spine::Skeleton &skeleton) + // spine::PathConstraint(spine::PathConstraintData &data, spine::Skeleton &skeleton) spine::PathConstraint *ret = new spine::PathConstraint(*arg1, *arg2); int num_ret = olua_push_object(L, ret, "spine.PathConstraint"); olua_postnew(L, ret); @@ -11318,7 +12219,7 @@ static int _spine_PathConstraint_new(lua_State *L) return num_ret; } -static int _spine_PathConstraint_setMixRotate(lua_State *L) +static int _olua_fun_spine_PathConstraint_setMixRotate(lua_State *L) { olua_startinvoke(L); @@ -11336,7 +12237,7 @@ static int _spine_PathConstraint_setMixRotate(lua_State *L) return 0; } -static int _spine_PathConstraint_setMixX(lua_State *L) +static int _olua_fun_spine_PathConstraint_setMixX(lua_State *L) { olua_startinvoke(L); @@ -11354,7 +12255,7 @@ static int _spine_PathConstraint_setMixX(lua_State *L) return 0; } -static int _spine_PathConstraint_setMixY(lua_State *L) +static int _olua_fun_spine_PathConstraint_setMixY(lua_State *L) { olua_startinvoke(L); @@ -11372,7 +12273,7 @@ static int _spine_PathConstraint_setMixY(lua_State *L) return 0; } -static int _spine_PathConstraint_setPosition(lua_State *L) +static int _olua_fun_spine_PathConstraint_setPosition(lua_State *L) { olua_startinvoke(L); @@ -11390,7 +12291,7 @@ static int _spine_PathConstraint_setPosition(lua_State *L) return 0; } -static int _spine_PathConstraint_setSpacing(lua_State *L) +static int _olua_fun_spine_PathConstraint_setSpacing(lua_State *L) { olua_startinvoke(L); @@ -11408,7 +12309,7 @@ static int _spine_PathConstraint_setSpacing(lua_State *L) return 0; } -static int _spine_PathConstraint_setTarget(lua_State *L) +static int _olua_fun_spine_PathConstraint_setTarget(lua_State *L) { olua_startinvoke(L); @@ -11426,7 +12327,7 @@ static int _spine_PathConstraint_setTarget(lua_State *L) return 0; } -static int _spine_PathConstraint_setToSetupPose(lua_State *L) +static int _olua_fun_spine_PathConstraint_setToSetupPose(lua_State *L) { olua_startinvoke(L); @@ -11442,42 +12343,51 @@ static int _spine_PathConstraint_setToSetupPose(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_spine_PathConstraint(lua_State *L) +static int _olua_cls_spine_PathConstraint(lua_State *L) { oluacls_class(L, "spine.PathConstraint"); - oluacls_func(L, "getBones", _spine_PathConstraint_getBones); - oluacls_func(L, "getData", _spine_PathConstraint_getData); - oluacls_func(L, "getMixRotate", _spine_PathConstraint_getMixRotate); - oluacls_func(L, "getMixX", _spine_PathConstraint_getMixX); - oluacls_func(L, "getMixY", _spine_PathConstraint_getMixY); - oluacls_func(L, "getOrder", _spine_PathConstraint_getOrder); - oluacls_func(L, "getPosition", _spine_PathConstraint_getPosition); - oluacls_func(L, "getSpacing", _spine_PathConstraint_getSpacing); - oluacls_func(L, "getTarget", _spine_PathConstraint_getTarget); - oluacls_func(L, "new", _spine_PathConstraint_new); - oluacls_func(L, "setMixRotate", _spine_PathConstraint_setMixRotate); - oluacls_func(L, "setMixX", _spine_PathConstraint_setMixX); - oluacls_func(L, "setMixY", _spine_PathConstraint_setMixY); - oluacls_func(L, "setPosition", _spine_PathConstraint_setPosition); - oluacls_func(L, "setSpacing", _spine_PathConstraint_setSpacing); - oluacls_func(L, "setTarget", _spine_PathConstraint_setTarget); - oluacls_func(L, "setToSetupPose", _spine_PathConstraint_setToSetupPose); - oluacls_prop(L, "bones", _spine_PathConstraint_getBones, nullptr); - oluacls_prop(L, "data", _spine_PathConstraint_getData, nullptr); - oluacls_prop(L, "mixRotate", _spine_PathConstraint_getMixRotate, _spine_PathConstraint_setMixRotate); - oluacls_prop(L, "mixX", _spine_PathConstraint_getMixX, _spine_PathConstraint_setMixX); - oluacls_prop(L, "mixY", _spine_PathConstraint_getMixY, _spine_PathConstraint_setMixY); - oluacls_prop(L, "order", _spine_PathConstraint_getOrder, nullptr); - oluacls_prop(L, "position", _spine_PathConstraint_getPosition, _spine_PathConstraint_setPosition); - oluacls_prop(L, "spacing", _spine_PathConstraint_getSpacing, _spine_PathConstraint_setSpacing); - oluacls_prop(L, "target", _spine_PathConstraint_getTarget, _spine_PathConstraint_setTarget); + oluacls_func(L, "getBones", _olua_fun_spine_PathConstraint_getBones); + oluacls_func(L, "getData", _olua_fun_spine_PathConstraint_getData); + oluacls_func(L, "getMixRotate", _olua_fun_spine_PathConstraint_getMixRotate); + oluacls_func(L, "getMixX", _olua_fun_spine_PathConstraint_getMixX); + oluacls_func(L, "getMixY", _olua_fun_spine_PathConstraint_getMixY); + oluacls_func(L, "getOrder", _olua_fun_spine_PathConstraint_getOrder); + oluacls_func(L, "getPosition", _olua_fun_spine_PathConstraint_getPosition); + oluacls_func(L, "getSpacing", _olua_fun_spine_PathConstraint_getSpacing); + oluacls_func(L, "getTarget", _olua_fun_spine_PathConstraint_getTarget); + oluacls_func(L, "new", _olua_fun_spine_PathConstraint_new); + oluacls_func(L, "setMixRotate", _olua_fun_spine_PathConstraint_setMixRotate); + oluacls_func(L, "setMixX", _olua_fun_spine_PathConstraint_setMixX); + oluacls_func(L, "setMixY", _olua_fun_spine_PathConstraint_setMixY); + oluacls_func(L, "setPosition", _olua_fun_spine_PathConstraint_setPosition); + oluacls_func(L, "setSpacing", _olua_fun_spine_PathConstraint_setSpacing); + oluacls_func(L, "setTarget", _olua_fun_spine_PathConstraint_setTarget); + oluacls_func(L, "setToSetupPose", _olua_fun_spine_PathConstraint_setToSetupPose); + oluacls_prop(L, "bones", _olua_fun_spine_PathConstraint_getBones, nullptr); + oluacls_prop(L, "data", _olua_fun_spine_PathConstraint_getData, nullptr); + oluacls_prop(L, "mixRotate", _olua_fun_spine_PathConstraint_getMixRotate, _olua_fun_spine_PathConstraint_setMixRotate); + oluacls_prop(L, "mixX", _olua_fun_spine_PathConstraint_getMixX, _olua_fun_spine_PathConstraint_setMixX); + oluacls_prop(L, "mixY", _olua_fun_spine_PathConstraint_getMixY, _olua_fun_spine_PathConstraint_setMixY); + oluacls_prop(L, "order", _olua_fun_spine_PathConstraint_getOrder, nullptr); + oluacls_prop(L, "position", _olua_fun_spine_PathConstraint_getPosition, _olua_fun_spine_PathConstraint_setPosition); + oluacls_prop(L, "spacing", _olua_fun_spine_PathConstraint_getSpacing, _olua_fun_spine_PathConstraint_setSpacing); + oluacls_prop(L, "target", _olua_fun_spine_PathConstraint_getTarget, _olua_fun_spine_PathConstraint_setTarget); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_spine_PathConstraint(lua_State *L) +{ + olua_require(L, "spine", luaopen_spine); + if (!olua_getclass(L, "spine.PathConstraint")) { + luaL_error(L, "class not found: spine::PathConstraint"); + } + return 1; +} OLUA_END_DECLS -static int _spine_PointAttachment_computeWorldPosition(lua_State *L) +static int _olua_fun_spine_PointAttachment_computeWorldPosition(lua_State *L) { olua_startinvoke(L); @@ -11488,8 +12398,8 @@ static int _spine_PointAttachment_computeWorldPosition(lua_State *L) olua_to_object(L, 1, &self, "spine.PointAttachment"); olua_check_object(L, 2, &arg1, "spine.Bone"); - olua_check_pointer(L, 3, &arg2, "olua.float"); - olua_check_pointer(L, 4, &arg3, "olua.float"); + olua_check_valueptr(L, 3, &arg2, "olua.float"); + olua_check_valueptr(L, 4, &arg3, "olua.float"); // void computeWorldPosition(spine::Bone &bone, float &ox, float &oy) self->computeWorldPosition(*arg1, *arg2, *arg3); @@ -11499,7 +12409,7 @@ static int _spine_PointAttachment_computeWorldPosition(lua_State *L) return 0; } -static int _spine_PointAttachment_computeWorldRotation(lua_State *L) +static int _olua_fun_spine_PointAttachment_computeWorldRotation(lua_State *L) { olua_startinvoke(L); @@ -11518,7 +12428,7 @@ static int _spine_PointAttachment_computeWorldRotation(lua_State *L) return num_ret; } -static int _spine_PointAttachment_getColor(lua_State *L) +static int _olua_fun_spine_PointAttachment_getColor(lua_State *L) { olua_startinvoke(L); @@ -11535,7 +12445,7 @@ static int _spine_PointAttachment_getColor(lua_State *L) return num_ret; } -static int _spine_PointAttachment_getRotation(lua_State *L) +static int _olua_fun_spine_PointAttachment_getRotation(lua_State *L) { olua_startinvoke(L); @@ -11552,7 +12462,7 @@ static int _spine_PointAttachment_getRotation(lua_State *L) return num_ret; } -static int _spine_PointAttachment_getX(lua_State *L) +static int _olua_fun_spine_PointAttachment_getX(lua_State *L) { olua_startinvoke(L); @@ -11569,7 +12479,7 @@ static int _spine_PointAttachment_getX(lua_State *L) return num_ret; } -static int _spine_PointAttachment_getY(lua_State *L) +static int _olua_fun_spine_PointAttachment_getY(lua_State *L) { olua_startinvoke(L); @@ -11586,7 +12496,7 @@ static int _spine_PointAttachment_getY(lua_State *L) return num_ret; } -static int _spine_PointAttachment_new(lua_State *L) +static int _olua_fun_spine_PointAttachment_new(lua_State *L) { olua_startinvoke(L); @@ -11594,7 +12504,7 @@ static int _spine_PointAttachment_new(lua_State *L) olua_check_string(L, 1, &arg1); - // PointAttachment(const spine::String &name) + // spine::PointAttachment(const spine::String &name) spine::PointAttachment *ret = new spine::PointAttachment(arg1); int num_ret = olua_push_object(L, ret, "spine.PointAttachment"); olua_postnew(L, ret); @@ -11604,7 +12514,7 @@ static int _spine_PointAttachment_new(lua_State *L) return num_ret; } -static int _spine_PointAttachment_setRotation(lua_State *L) +static int _olua_fun_spine_PointAttachment_setRotation(lua_State *L) { olua_startinvoke(L); @@ -11622,7 +12532,7 @@ static int _spine_PointAttachment_setRotation(lua_State *L) return 0; } -static int _spine_PointAttachment_setX(lua_State *L) +static int _olua_fun_spine_PointAttachment_setX(lua_State *L) { olua_startinvoke(L); @@ -11640,7 +12550,7 @@ static int _spine_PointAttachment_setX(lua_State *L) return 0; } -static int _spine_PointAttachment_setY(lua_State *L) +static int _olua_fun_spine_PointAttachment_setY(lua_State *L) { olua_startinvoke(L); @@ -11658,30 +12568,39 @@ static int _spine_PointAttachment_setY(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_spine_PointAttachment(lua_State *L) +static int _olua_cls_spine_PointAttachment(lua_State *L) { oluacls_class(L, "spine.PointAttachment"); - oluacls_func(L, "computeWorldPosition", _spine_PointAttachment_computeWorldPosition); - oluacls_func(L, "computeWorldRotation", _spine_PointAttachment_computeWorldRotation); - oluacls_func(L, "getColor", _spine_PointAttachment_getColor); - oluacls_func(L, "getRotation", _spine_PointAttachment_getRotation); - oluacls_func(L, "getX", _spine_PointAttachment_getX); - oluacls_func(L, "getY", _spine_PointAttachment_getY); - oluacls_func(L, "new", _spine_PointAttachment_new); - oluacls_func(L, "setRotation", _spine_PointAttachment_setRotation); - oluacls_func(L, "setX", _spine_PointAttachment_setX); - oluacls_func(L, "setY", _spine_PointAttachment_setY); - oluacls_prop(L, "color", _spine_PointAttachment_getColor, nullptr); - oluacls_prop(L, "rotation", _spine_PointAttachment_getRotation, _spine_PointAttachment_setRotation); - oluacls_prop(L, "x", _spine_PointAttachment_getX, _spine_PointAttachment_setX); - oluacls_prop(L, "y", _spine_PointAttachment_getY, _spine_PointAttachment_setY); + oluacls_func(L, "computeWorldPosition", _olua_fun_spine_PointAttachment_computeWorldPosition); + oluacls_func(L, "computeWorldRotation", _olua_fun_spine_PointAttachment_computeWorldRotation); + oluacls_func(L, "getColor", _olua_fun_spine_PointAttachment_getColor); + oluacls_func(L, "getRotation", _olua_fun_spine_PointAttachment_getRotation); + oluacls_func(L, "getX", _olua_fun_spine_PointAttachment_getX); + oluacls_func(L, "getY", _olua_fun_spine_PointAttachment_getY); + oluacls_func(L, "new", _olua_fun_spine_PointAttachment_new); + oluacls_func(L, "setRotation", _olua_fun_spine_PointAttachment_setRotation); + oluacls_func(L, "setX", _olua_fun_spine_PointAttachment_setX); + oluacls_func(L, "setY", _olua_fun_spine_PointAttachment_setY); + oluacls_prop(L, "color", _olua_fun_spine_PointAttachment_getColor, nullptr); + oluacls_prop(L, "rotation", _olua_fun_spine_PointAttachment_getRotation, _olua_fun_spine_PointAttachment_setRotation); + oluacls_prop(L, "x", _olua_fun_spine_PointAttachment_getX, _olua_fun_spine_PointAttachment_setX); + oluacls_prop(L, "y", _olua_fun_spine_PointAttachment_getY, _olua_fun_spine_PointAttachment_setY); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_spine_PointAttachment(lua_State *L) +{ + olua_require(L, "spine", luaopen_spine); + if (!olua_getclass(L, "spine.PointAttachment")) { + luaL_error(L, "class not found: spine::PointAttachment"); + } return 1; } OLUA_END_DECLS -static int _spine_RegionAttachment_computeWorldVertices$1(lua_State *L) +static int _olua_fun_spine_RegionAttachment_computeWorldVertices$1(lua_State *L) { olua_startinvoke(L); @@ -11693,7 +12612,7 @@ static int _spine_RegionAttachment_computeWorldVertices$1(lua_State *L) olua_to_object(L, 1, &self, "spine.RegionAttachment"); olua_check_object(L, 2, &arg1, "spine.Slot"); - olua_check_pointer(L, 3, &arg2, "olua.float"); + olua_check_valueptr(L, 3, &arg2, "olua.float"); olua_check_integer(L, 4, &arg3); olua_check_integer(L, 5, &arg4); @@ -11705,55 +12624,55 @@ static int _spine_RegionAttachment_computeWorldVertices$1(lua_State *L) return 0; } -static int _spine_RegionAttachment_computeWorldVertices$2(lua_State *L) +static int _olua_fun_spine_RegionAttachment_computeWorldVertices$2(lua_State *L) { olua_startinvoke(L); spine::RegionAttachment *self = nullptr; spine::Slot *arg1 = nullptr; /** slot */ - spine::Vector arg2; /** worldVertices */ + float *arg2 = nullptr; /** worldVertices */ size_t arg3 = 0; /** offset */ - size_t arg4 = 0; /** stride */ olua_to_object(L, 1, &self, "spine.RegionAttachment"); olua_check_object(L, 2, &arg1, "spine.Slot"); - olua_check_array(L, 3, arg2, [L](float *arg1) { - olua_check_number(L, -1, arg1); - }); + olua_check_valueptr(L, 3, &arg2, "olua.float"); olua_check_integer(L, 4, &arg3); - olua_check_integer(L, 5, &arg4); - // void computeWorldVertices(spine::Slot &slot, spine::Vector &worldVertices, size_t offset, @optional size_t stride) - self->computeWorldVertices(*arg1, arg2, arg3, arg4); + // void computeWorldVertices(spine::Slot &slot, float *worldVertices, size_t offset) + self->computeWorldVertices(*arg1, arg2, arg3); olua_endinvoke(L); return 0; } -static int _spine_RegionAttachment_computeWorldVertices$3(lua_State *L) +static int _olua_fun_spine_RegionAttachment_computeWorldVertices$3(lua_State *L) { olua_startinvoke(L); spine::RegionAttachment *self = nullptr; spine::Slot *arg1 = nullptr; /** slot */ - float *arg2 = nullptr; /** worldVertices */ + spine::Vector arg2; /** worldVertices */ size_t arg3 = 0; /** offset */ + size_t arg4 = 0; /** stride */ olua_to_object(L, 1, &self, "spine.RegionAttachment"); olua_check_object(L, 2, &arg1, "spine.Slot"); - olua_check_pointer(L, 3, &arg2, "olua.float"); + olua_check_array(L, 3, arg2, [L](float *arg1) { + olua_check_number(L, -1, arg1); + }); olua_check_integer(L, 4, &arg3); + olua_check_integer(L, 5, &arg4); - // void computeWorldVertices(spine::Slot &slot, float *worldVertices, size_t offset, @optional size_t stride) - self->computeWorldVertices(*arg1, arg2, arg3); + // void computeWorldVertices(spine::Slot &slot, spine::Vector &worldVertices, size_t offset, @optional size_t stride) + self->computeWorldVertices(*arg1, arg2, arg3, arg4); olua_endinvoke(L); return 0; } -static int _spine_RegionAttachment_computeWorldVertices$4(lua_State *L) +static int _olua_fun_spine_RegionAttachment_computeWorldVertices$4(lua_State *L) { olua_startinvoke(L); @@ -11769,7 +12688,7 @@ static int _spine_RegionAttachment_computeWorldVertices$4(lua_State *L) }); olua_check_integer(L, 4, &arg3); - // void computeWorldVertices(spine::Slot &slot, spine::Vector &worldVertices, size_t offset, @optional size_t stride) + // void computeWorldVertices(spine::Slot &slot, spine::Vector &worldVertices, size_t offset) self->computeWorldVertices(*arg1, arg2, arg3); olua_endinvoke(L); @@ -11777,31 +12696,31 @@ static int _spine_RegionAttachment_computeWorldVertices$4(lua_State *L) return 0; } -static int _spine_RegionAttachment_computeWorldVertices(lua_State *L) +static int _olua_fun_spine_RegionAttachment_computeWorldVertices(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 3) { - if ((olua_is_object(L, 2, "spine.Slot")) && (olua_is_pointer(L, 3, "olua.float")) && (olua_is_integer(L, 4))) { - // void computeWorldVertices(spine::Slot &slot, float *worldVertices, size_t offset, @optional size_t stride) - return _spine_RegionAttachment_computeWorldVertices$3(L); + if ((olua_is_object(L, 2, "spine.Slot")) && (olua_is_valueptr(L, 3, "olua.float")) && (olua_is_integer(L, 4))) { + // void computeWorldVertices(spine::Slot &slot, float *worldVertices, size_t offset) + return _olua_fun_spine_RegionAttachment_computeWorldVertices$2(L); } // if ((olua_is_object(L, 2, "spine.Slot")) && (olua_is_array(L, 3)) && (olua_is_integer(L, 4))) { - // void computeWorldVertices(spine::Slot &slot, spine::Vector &worldVertices, size_t offset, @optional size_t stride) - return _spine_RegionAttachment_computeWorldVertices$4(L); + // void computeWorldVertices(spine::Slot &slot, spine::Vector &worldVertices, size_t offset) + return _olua_fun_spine_RegionAttachment_computeWorldVertices$4(L); // } } if (num_args == 4) { - if ((olua_is_object(L, 2, "spine.Slot")) && (olua_is_pointer(L, 3, "olua.float")) && (olua_is_integer(L, 4)) && (olua_is_integer(L, 5))) { + if ((olua_is_object(L, 2, "spine.Slot")) && (olua_is_valueptr(L, 3, "olua.float")) && (olua_is_integer(L, 4)) && (olua_is_integer(L, 5))) { // void computeWorldVertices(spine::Slot &slot, float *worldVertices, size_t offset, @optional size_t stride) - return _spine_RegionAttachment_computeWorldVertices$1(L); + return _olua_fun_spine_RegionAttachment_computeWorldVertices$1(L); } // if ((olua_is_object(L, 2, "spine.Slot")) && (olua_is_array(L, 3)) && (olua_is_integer(L, 4)) && (olua_is_integer(L, 5))) { // void computeWorldVertices(spine::Slot &slot, spine::Vector &worldVertices, size_t offset, @optional size_t stride) - return _spine_RegionAttachment_computeWorldVertices$2(L); + return _olua_fun_spine_RegionAttachment_computeWorldVertices$3(L); // } } @@ -11810,7 +12729,7 @@ static int _spine_RegionAttachment_computeWorldVertices(lua_State *L) return 0; } -static int _spine_RegionAttachment_getColor(lua_State *L) +static int _olua_fun_spine_RegionAttachment_getColor(lua_State *L) { olua_startinvoke(L); @@ -11827,7 +12746,7 @@ static int _spine_RegionAttachment_getColor(lua_State *L) return num_ret; } -static int _spine_RegionAttachment_getHeight(lua_State *L) +static int _olua_fun_spine_RegionAttachment_getHeight(lua_State *L) { olua_startinvoke(L); @@ -11844,7 +12763,7 @@ static int _spine_RegionAttachment_getHeight(lua_State *L) return num_ret; } -static int _spine_RegionAttachment_getOffset(lua_State *L) +static int _olua_fun_spine_RegionAttachment_getOffset(lua_State *L) { olua_startinvoke(L); @@ -11863,7 +12782,7 @@ static int _spine_RegionAttachment_getOffset(lua_State *L) return num_ret; } -static int _spine_RegionAttachment_getPath(lua_State *L) +static int _olua_fun_spine_RegionAttachment_getPath(lua_State *L) { olua_startinvoke(L); @@ -11880,7 +12799,7 @@ static int _spine_RegionAttachment_getPath(lua_State *L) return num_ret; } -static int _spine_RegionAttachment_getRegion(lua_State *L) +static int _olua_fun_spine_RegionAttachment_getRegion(lua_State *L) { olua_startinvoke(L); @@ -11897,7 +12816,7 @@ static int _spine_RegionAttachment_getRegion(lua_State *L) return num_ret; } -static int _spine_RegionAttachment_getRotation(lua_State *L) +static int _olua_fun_spine_RegionAttachment_getRotation(lua_State *L) { olua_startinvoke(L); @@ -11914,7 +12833,7 @@ static int _spine_RegionAttachment_getRotation(lua_State *L) return num_ret; } -static int _spine_RegionAttachment_getScaleX(lua_State *L) +static int _olua_fun_spine_RegionAttachment_getScaleX(lua_State *L) { olua_startinvoke(L); @@ -11931,7 +12850,7 @@ static int _spine_RegionAttachment_getScaleX(lua_State *L) return num_ret; } -static int _spine_RegionAttachment_getScaleY(lua_State *L) +static int _olua_fun_spine_RegionAttachment_getScaleY(lua_State *L) { olua_startinvoke(L); @@ -11948,7 +12867,7 @@ static int _spine_RegionAttachment_getScaleY(lua_State *L) return num_ret; } -static int _spine_RegionAttachment_getSequence(lua_State *L) +static int _olua_fun_spine_RegionAttachment_getSequence(lua_State *L) { olua_startinvoke(L); @@ -11965,7 +12884,7 @@ static int _spine_RegionAttachment_getSequence(lua_State *L) return num_ret; } -static int _spine_RegionAttachment_getUVs(lua_State *L) +static int _olua_fun_spine_RegionAttachment_getUVs(lua_State *L) { olua_startinvoke(L); @@ -11984,7 +12903,7 @@ static int _spine_RegionAttachment_getUVs(lua_State *L) return num_ret; } -static int _spine_RegionAttachment_getWidth(lua_State *L) +static int _olua_fun_spine_RegionAttachment_getWidth(lua_State *L) { olua_startinvoke(L); @@ -12001,7 +12920,7 @@ static int _spine_RegionAttachment_getWidth(lua_State *L) return num_ret; } -static int _spine_RegionAttachment_getX(lua_State *L) +static int _olua_fun_spine_RegionAttachment_getX(lua_State *L) { olua_startinvoke(L); @@ -12018,7 +12937,7 @@ static int _spine_RegionAttachment_getX(lua_State *L) return num_ret; } -static int _spine_RegionAttachment_getY(lua_State *L) +static int _olua_fun_spine_RegionAttachment_getY(lua_State *L) { olua_startinvoke(L); @@ -12035,7 +12954,7 @@ static int _spine_RegionAttachment_getY(lua_State *L) return num_ret; } -static int _spine_RegionAttachment_new(lua_State *L) +static int _olua_fun_spine_RegionAttachment_new(lua_State *L) { olua_startinvoke(L); @@ -12043,7 +12962,7 @@ static int _spine_RegionAttachment_new(lua_State *L) olua_check_string(L, 1, &arg1); - // RegionAttachment(const spine::String &name) + // spine::RegionAttachment(const spine::String &name) spine::RegionAttachment *ret = new spine::RegionAttachment(arg1); int num_ret = olua_push_object(L, ret, "spine.RegionAttachment"); olua_postnew(L, ret); @@ -12053,7 +12972,7 @@ static int _spine_RegionAttachment_new(lua_State *L) return num_ret; } -static int _spine_RegionAttachment_setHeight(lua_State *L) +static int _olua_fun_spine_RegionAttachment_setHeight(lua_State *L) { olua_startinvoke(L); @@ -12071,7 +12990,7 @@ static int _spine_RegionAttachment_setHeight(lua_State *L) return 0; } -static int _spine_RegionAttachment_setPath(lua_State *L) +static int _olua_fun_spine_RegionAttachment_setPath(lua_State *L) { olua_startinvoke(L); @@ -12089,7 +13008,7 @@ static int _spine_RegionAttachment_setPath(lua_State *L) return 0; } -static int _spine_RegionAttachment_setRegion(lua_State *L) +static int _olua_fun_spine_RegionAttachment_setRegion(lua_State *L) { olua_startinvoke(L); @@ -12107,7 +13026,7 @@ static int _spine_RegionAttachment_setRegion(lua_State *L) return 0; } -static int _spine_RegionAttachment_setRotation(lua_State *L) +static int _olua_fun_spine_RegionAttachment_setRotation(lua_State *L) { olua_startinvoke(L); @@ -12125,7 +13044,7 @@ static int _spine_RegionAttachment_setRotation(lua_State *L) return 0; } -static int _spine_RegionAttachment_setScaleX(lua_State *L) +static int _olua_fun_spine_RegionAttachment_setScaleX(lua_State *L) { olua_startinvoke(L); @@ -12143,7 +13062,7 @@ static int _spine_RegionAttachment_setScaleX(lua_State *L) return 0; } -static int _spine_RegionAttachment_setScaleY(lua_State *L) +static int _olua_fun_spine_RegionAttachment_setScaleY(lua_State *L) { olua_startinvoke(L); @@ -12161,7 +13080,7 @@ static int _spine_RegionAttachment_setScaleY(lua_State *L) return 0; } -static int _spine_RegionAttachment_setSequence(lua_State *L) +static int _olua_fun_spine_RegionAttachment_setSequence(lua_State *L) { olua_startinvoke(L); @@ -12179,7 +13098,7 @@ static int _spine_RegionAttachment_setSequence(lua_State *L) return 0; } -static int _spine_RegionAttachment_setWidth(lua_State *L) +static int _olua_fun_spine_RegionAttachment_setWidth(lua_State *L) { olua_startinvoke(L); @@ -12197,7 +13116,7 @@ static int _spine_RegionAttachment_setWidth(lua_State *L) return 0; } -static int _spine_RegionAttachment_setX(lua_State *L) +static int _olua_fun_spine_RegionAttachment_setX(lua_State *L) { olua_startinvoke(L); @@ -12215,7 +13134,7 @@ static int _spine_RegionAttachment_setX(lua_State *L) return 0; } -static int _spine_RegionAttachment_setY(lua_State *L) +static int _olua_fun_spine_RegionAttachment_setY(lua_State *L) { olua_startinvoke(L); @@ -12233,7 +13152,7 @@ static int _spine_RegionAttachment_setY(lua_State *L) return 0; } -static int _spine_RegionAttachment_updateRegion(lua_State *L) +static int _olua_fun_spine_RegionAttachment_updateRegion(lua_State *L) { olua_startinvoke(L); @@ -12249,55 +13168,64 @@ static int _spine_RegionAttachment_updateRegion(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_spine_RegionAttachment(lua_State *L) +static int _olua_cls_spine_RegionAttachment(lua_State *L) { oluacls_class(L, "spine.RegionAttachment"); - oluacls_func(L, "computeWorldVertices", _spine_RegionAttachment_computeWorldVertices); - oluacls_func(L, "getColor", _spine_RegionAttachment_getColor); - oluacls_func(L, "getHeight", _spine_RegionAttachment_getHeight); - oluacls_func(L, "getOffset", _spine_RegionAttachment_getOffset); - oluacls_func(L, "getPath", _spine_RegionAttachment_getPath); - oluacls_func(L, "getRegion", _spine_RegionAttachment_getRegion); - oluacls_func(L, "getRotation", _spine_RegionAttachment_getRotation); - oluacls_func(L, "getScaleX", _spine_RegionAttachment_getScaleX); - oluacls_func(L, "getScaleY", _spine_RegionAttachment_getScaleY); - oluacls_func(L, "getSequence", _spine_RegionAttachment_getSequence); - oluacls_func(L, "getUVs", _spine_RegionAttachment_getUVs); - oluacls_func(L, "getWidth", _spine_RegionAttachment_getWidth); - oluacls_func(L, "getX", _spine_RegionAttachment_getX); - oluacls_func(L, "getY", _spine_RegionAttachment_getY); - oluacls_func(L, "new", _spine_RegionAttachment_new); - oluacls_func(L, "setHeight", _spine_RegionAttachment_setHeight); - oluacls_func(L, "setPath", _spine_RegionAttachment_setPath); - oluacls_func(L, "setRegion", _spine_RegionAttachment_setRegion); - oluacls_func(L, "setRotation", _spine_RegionAttachment_setRotation); - oluacls_func(L, "setScaleX", _spine_RegionAttachment_setScaleX); - oluacls_func(L, "setScaleY", _spine_RegionAttachment_setScaleY); - oluacls_func(L, "setSequence", _spine_RegionAttachment_setSequence); - oluacls_func(L, "setWidth", _spine_RegionAttachment_setWidth); - oluacls_func(L, "setX", _spine_RegionAttachment_setX); - oluacls_func(L, "setY", _spine_RegionAttachment_setY); - oluacls_func(L, "updateRegion", _spine_RegionAttachment_updateRegion); - oluacls_prop(L, "color", _spine_RegionAttachment_getColor, nullptr); - oluacls_prop(L, "height", _spine_RegionAttachment_getHeight, _spine_RegionAttachment_setHeight); - oluacls_prop(L, "offset", _spine_RegionAttachment_getOffset, nullptr); - oluacls_prop(L, "path", _spine_RegionAttachment_getPath, _spine_RegionAttachment_setPath); - oluacls_prop(L, "region", _spine_RegionAttachment_getRegion, _spine_RegionAttachment_setRegion); - oluacls_prop(L, "rotation", _spine_RegionAttachment_getRotation, _spine_RegionAttachment_setRotation); - oluacls_prop(L, "scaleX", _spine_RegionAttachment_getScaleX, _spine_RegionAttachment_setScaleX); - oluacls_prop(L, "scaleY", _spine_RegionAttachment_getScaleY, _spine_RegionAttachment_setScaleY); - oluacls_prop(L, "sequence", _spine_RegionAttachment_getSequence, _spine_RegionAttachment_setSequence); - oluacls_prop(L, "uvs", _spine_RegionAttachment_getUVs, nullptr); - oluacls_prop(L, "width", _spine_RegionAttachment_getWidth, _spine_RegionAttachment_setWidth); - oluacls_prop(L, "x", _spine_RegionAttachment_getX, _spine_RegionAttachment_setX); - oluacls_prop(L, "y", _spine_RegionAttachment_getY, _spine_RegionAttachment_setY); + oluacls_func(L, "computeWorldVertices", _olua_fun_spine_RegionAttachment_computeWorldVertices); + oluacls_func(L, "getColor", _olua_fun_spine_RegionAttachment_getColor); + oluacls_func(L, "getHeight", _olua_fun_spine_RegionAttachment_getHeight); + oluacls_func(L, "getOffset", _olua_fun_spine_RegionAttachment_getOffset); + oluacls_func(L, "getPath", _olua_fun_spine_RegionAttachment_getPath); + oluacls_func(L, "getRegion", _olua_fun_spine_RegionAttachment_getRegion); + oluacls_func(L, "getRotation", _olua_fun_spine_RegionAttachment_getRotation); + oluacls_func(L, "getScaleX", _olua_fun_spine_RegionAttachment_getScaleX); + oluacls_func(L, "getScaleY", _olua_fun_spine_RegionAttachment_getScaleY); + oluacls_func(L, "getSequence", _olua_fun_spine_RegionAttachment_getSequence); + oluacls_func(L, "getUVs", _olua_fun_spine_RegionAttachment_getUVs); + oluacls_func(L, "getWidth", _olua_fun_spine_RegionAttachment_getWidth); + oluacls_func(L, "getX", _olua_fun_spine_RegionAttachment_getX); + oluacls_func(L, "getY", _olua_fun_spine_RegionAttachment_getY); + oluacls_func(L, "new", _olua_fun_spine_RegionAttachment_new); + oluacls_func(L, "setHeight", _olua_fun_spine_RegionAttachment_setHeight); + oluacls_func(L, "setPath", _olua_fun_spine_RegionAttachment_setPath); + oluacls_func(L, "setRegion", _olua_fun_spine_RegionAttachment_setRegion); + oluacls_func(L, "setRotation", _olua_fun_spine_RegionAttachment_setRotation); + oluacls_func(L, "setScaleX", _olua_fun_spine_RegionAttachment_setScaleX); + oluacls_func(L, "setScaleY", _olua_fun_spine_RegionAttachment_setScaleY); + oluacls_func(L, "setSequence", _olua_fun_spine_RegionAttachment_setSequence); + oluacls_func(L, "setWidth", _olua_fun_spine_RegionAttachment_setWidth); + oluacls_func(L, "setX", _olua_fun_spine_RegionAttachment_setX); + oluacls_func(L, "setY", _olua_fun_spine_RegionAttachment_setY); + oluacls_func(L, "updateRegion", _olua_fun_spine_RegionAttachment_updateRegion); + oluacls_prop(L, "color", _olua_fun_spine_RegionAttachment_getColor, nullptr); + oluacls_prop(L, "height", _olua_fun_spine_RegionAttachment_getHeight, _olua_fun_spine_RegionAttachment_setHeight); + oluacls_prop(L, "offset", _olua_fun_spine_RegionAttachment_getOffset, nullptr); + oluacls_prop(L, "path", _olua_fun_spine_RegionAttachment_getPath, _olua_fun_spine_RegionAttachment_setPath); + oluacls_prop(L, "region", _olua_fun_spine_RegionAttachment_getRegion, _olua_fun_spine_RegionAttachment_setRegion); + oluacls_prop(L, "rotation", _olua_fun_spine_RegionAttachment_getRotation, _olua_fun_spine_RegionAttachment_setRotation); + oluacls_prop(L, "scaleX", _olua_fun_spine_RegionAttachment_getScaleX, _olua_fun_spine_RegionAttachment_setScaleX); + oluacls_prop(L, "scaleY", _olua_fun_spine_RegionAttachment_getScaleY, _olua_fun_spine_RegionAttachment_setScaleY); + oluacls_prop(L, "sequence", _olua_fun_spine_RegionAttachment_getSequence, _olua_fun_spine_RegionAttachment_setSequence); + oluacls_prop(L, "uvs", _olua_fun_spine_RegionAttachment_getUVs, nullptr); + oluacls_prop(L, "width", _olua_fun_spine_RegionAttachment_getWidth, _olua_fun_spine_RegionAttachment_setWidth); + oluacls_prop(L, "x", _olua_fun_spine_RegionAttachment_getX, _olua_fun_spine_RegionAttachment_setX); + oluacls_prop(L, "y", _olua_fun_spine_RegionAttachment_getY, _olua_fun_spine_RegionAttachment_setY); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_spine_RegionAttachment(lua_State *L) +{ + olua_require(L, "spine", luaopen_spine); + if (!olua_getclass(L, "spine.RegionAttachment")) { + luaL_error(L, "class not found: spine::RegionAttachment"); + } return 1; } OLUA_END_DECLS -static int _spine_TrackEntry_getAlpha(lua_State *L) +static int _olua_fun_spine_TrackEntry_getAlpha(lua_State *L) { olua_startinvoke(L); @@ -12314,7 +13242,7 @@ static int _spine_TrackEntry_getAlpha(lua_State *L) return num_ret; } -static int _spine_TrackEntry_getAlphaAttachmentThreshold(lua_State *L) +static int _olua_fun_spine_TrackEntry_getAlphaAttachmentThreshold(lua_State *L) { olua_startinvoke(L); @@ -12331,7 +13259,7 @@ static int _spine_TrackEntry_getAlphaAttachmentThreshold(lua_State *L) return num_ret; } -static int _spine_TrackEntry_getAnimation(lua_State *L) +static int _olua_fun_spine_TrackEntry_getAnimation(lua_State *L) { olua_startinvoke(L); @@ -12348,7 +13276,7 @@ static int _spine_TrackEntry_getAnimation(lua_State *L) return num_ret; } -static int _spine_TrackEntry_getAnimationEnd(lua_State *L) +static int _olua_fun_spine_TrackEntry_getAnimationEnd(lua_State *L) { olua_startinvoke(L); @@ -12365,7 +13293,7 @@ static int _spine_TrackEntry_getAnimationEnd(lua_State *L) return num_ret; } -static int _spine_TrackEntry_getAnimationLast(lua_State *L) +static int _olua_fun_spine_TrackEntry_getAnimationLast(lua_State *L) { olua_startinvoke(L); @@ -12382,7 +13310,7 @@ static int _spine_TrackEntry_getAnimationLast(lua_State *L) return num_ret; } -static int _spine_TrackEntry_getAnimationStart(lua_State *L) +static int _olua_fun_spine_TrackEntry_getAnimationStart(lua_State *L) { olua_startinvoke(L); @@ -12399,7 +13327,7 @@ static int _spine_TrackEntry_getAnimationStart(lua_State *L) return num_ret; } -static int _spine_TrackEntry_getAnimationTime(lua_State *L) +static int _olua_fun_spine_TrackEntry_getAnimationTime(lua_State *L) { olua_startinvoke(L); @@ -12416,7 +13344,7 @@ static int _spine_TrackEntry_getAnimationTime(lua_State *L) return num_ret; } -static int _spine_TrackEntry_getDelay(lua_State *L) +static int _olua_fun_spine_TrackEntry_getDelay(lua_State *L) { olua_startinvoke(L); @@ -12433,7 +13361,7 @@ static int _spine_TrackEntry_getDelay(lua_State *L) return num_ret; } -static int _spine_TrackEntry_getEventThreshold(lua_State *L) +static int _olua_fun_spine_TrackEntry_getEventThreshold(lua_State *L) { olua_startinvoke(L); @@ -12450,7 +13378,7 @@ static int _spine_TrackEntry_getEventThreshold(lua_State *L) return num_ret; } -static int _spine_TrackEntry_getHoldPrevious(lua_State *L) +static int _olua_fun_spine_TrackEntry_getHoldPrevious(lua_State *L) { olua_startinvoke(L); @@ -12467,7 +13395,7 @@ static int _spine_TrackEntry_getHoldPrevious(lua_State *L) return num_ret; } -static int _spine_TrackEntry_getLoop(lua_State *L) +static int _olua_fun_spine_TrackEntry_getLoop(lua_State *L) { olua_startinvoke(L); @@ -12484,7 +13412,7 @@ static int _spine_TrackEntry_getLoop(lua_State *L) return num_ret; } -static int _spine_TrackEntry_getMixAttachmentThreshold(lua_State *L) +static int _olua_fun_spine_TrackEntry_getMixAttachmentThreshold(lua_State *L) { olua_startinvoke(L); @@ -12501,7 +13429,7 @@ static int _spine_TrackEntry_getMixAttachmentThreshold(lua_State *L) return num_ret; } -static int _spine_TrackEntry_getMixBlend(lua_State *L) +static int _olua_fun_spine_TrackEntry_getMixBlend(lua_State *L) { olua_startinvoke(L); @@ -12518,7 +13446,7 @@ static int _spine_TrackEntry_getMixBlend(lua_State *L) return num_ret; } -static int _spine_TrackEntry_getMixDrawOrderThreshold(lua_State *L) +static int _olua_fun_spine_TrackEntry_getMixDrawOrderThreshold(lua_State *L) { olua_startinvoke(L); @@ -12535,7 +13463,7 @@ static int _spine_TrackEntry_getMixDrawOrderThreshold(lua_State *L) return num_ret; } -static int _spine_TrackEntry_getMixDuration(lua_State *L) +static int _olua_fun_spine_TrackEntry_getMixDuration(lua_State *L) { olua_startinvoke(L); @@ -12552,7 +13480,7 @@ static int _spine_TrackEntry_getMixDuration(lua_State *L) return num_ret; } -static int _spine_TrackEntry_getMixTime(lua_State *L) +static int _olua_fun_spine_TrackEntry_getMixTime(lua_State *L) { olua_startinvoke(L); @@ -12569,7 +13497,7 @@ static int _spine_TrackEntry_getMixTime(lua_State *L) return num_ret; } -static int _spine_TrackEntry_getMixingFrom(lua_State *L) +static int _olua_fun_spine_TrackEntry_getMixingFrom(lua_State *L) { olua_startinvoke(L); @@ -12586,7 +13514,7 @@ static int _spine_TrackEntry_getMixingFrom(lua_State *L) return num_ret; } -static int _spine_TrackEntry_getMixingTo(lua_State *L) +static int _olua_fun_spine_TrackEntry_getMixingTo(lua_State *L) { olua_startinvoke(L); @@ -12603,7 +13531,7 @@ static int _spine_TrackEntry_getMixingTo(lua_State *L) return num_ret; } -static int _spine_TrackEntry_getNext(lua_State *L) +static int _olua_fun_spine_TrackEntry_getNext(lua_State *L) { olua_startinvoke(L); @@ -12620,7 +13548,7 @@ static int _spine_TrackEntry_getNext(lua_State *L) return num_ret; } -static int _spine_TrackEntry_getPrevious(lua_State *L) +static int _olua_fun_spine_TrackEntry_getPrevious(lua_State *L) { olua_startinvoke(L); @@ -12637,7 +13565,7 @@ static int _spine_TrackEntry_getPrevious(lua_State *L) return num_ret; } -static int _spine_TrackEntry_getReverse(lua_State *L) +static int _olua_fun_spine_TrackEntry_getReverse(lua_State *L) { olua_startinvoke(L); @@ -12654,7 +13582,7 @@ static int _spine_TrackEntry_getReverse(lua_State *L) return num_ret; } -static int _spine_TrackEntry_getShortestRotation(lua_State *L) +static int _olua_fun_spine_TrackEntry_getShortestRotation(lua_State *L) { olua_startinvoke(L); @@ -12671,7 +13599,7 @@ static int _spine_TrackEntry_getShortestRotation(lua_State *L) return num_ret; } -static int _spine_TrackEntry_getTimeScale(lua_State *L) +static int _olua_fun_spine_TrackEntry_getTimeScale(lua_State *L) { olua_startinvoke(L); @@ -12688,7 +13616,7 @@ static int _spine_TrackEntry_getTimeScale(lua_State *L) return num_ret; } -static int _spine_TrackEntry_getTrackComplete(lua_State *L) +static int _olua_fun_spine_TrackEntry_getTrackComplete(lua_State *L) { olua_startinvoke(L); @@ -12705,7 +13633,7 @@ static int _spine_TrackEntry_getTrackComplete(lua_State *L) return num_ret; } -static int _spine_TrackEntry_getTrackEnd(lua_State *L) +static int _olua_fun_spine_TrackEntry_getTrackEnd(lua_State *L) { olua_startinvoke(L); @@ -12722,7 +13650,7 @@ static int _spine_TrackEntry_getTrackEnd(lua_State *L) return num_ret; } -static int _spine_TrackEntry_getTrackIndex(lua_State *L) +static int _olua_fun_spine_TrackEntry_getTrackIndex(lua_State *L) { olua_startinvoke(L); @@ -12739,7 +13667,7 @@ static int _spine_TrackEntry_getTrackIndex(lua_State *L) return num_ret; } -static int _spine_TrackEntry_getTrackTime(lua_State *L) +static int _olua_fun_spine_TrackEntry_getTrackTime(lua_State *L) { olua_startinvoke(L); @@ -12756,7 +13684,7 @@ static int _spine_TrackEntry_getTrackTime(lua_State *L) return num_ret; } -static int _spine_TrackEntry_isComplete(lua_State *L) +static int _olua_fun_spine_TrackEntry_isComplete(lua_State *L) { olua_startinvoke(L); @@ -12773,11 +13701,11 @@ static int _spine_TrackEntry_isComplete(lua_State *L) return num_ret; } -static int _spine_TrackEntry_new(lua_State *L) +static int _olua_fun_spine_TrackEntry_new(lua_State *L) { olua_startinvoke(L); - // TrackEntry() + // spine::TrackEntry() spine::TrackEntry *ret = new spine::TrackEntry(); int num_ret = olua_push_object(L, ret, "spine.TrackEntry"); olua_postnew(L, ret); @@ -12787,7 +13715,7 @@ static int _spine_TrackEntry_new(lua_State *L) return num_ret; } -static int _spine_TrackEntry_resetRotationDirections(lua_State *L) +static int _olua_fun_spine_TrackEntry_resetRotationDirections(lua_State *L) { olua_startinvoke(L); @@ -12803,7 +13731,7 @@ static int _spine_TrackEntry_resetRotationDirections(lua_State *L) return 0; } -static int _spine_TrackEntry_setAlpha(lua_State *L) +static int _olua_fun_spine_TrackEntry_setAlpha(lua_State *L) { olua_startinvoke(L); @@ -12821,7 +13749,7 @@ static int _spine_TrackEntry_setAlpha(lua_State *L) return 0; } -static int _spine_TrackEntry_setAlphaAttachmentThreshold(lua_State *L) +static int _olua_fun_spine_TrackEntry_setAlphaAttachmentThreshold(lua_State *L) { olua_startinvoke(L); @@ -12839,7 +13767,7 @@ static int _spine_TrackEntry_setAlphaAttachmentThreshold(lua_State *L) return 0; } -static int _spine_TrackEntry_setAnimationEnd(lua_State *L) +static int _olua_fun_spine_TrackEntry_setAnimationEnd(lua_State *L) { olua_startinvoke(L); @@ -12857,7 +13785,7 @@ static int _spine_TrackEntry_setAnimationEnd(lua_State *L) return 0; } -static int _spine_TrackEntry_setAnimationLast(lua_State *L) +static int _olua_fun_spine_TrackEntry_setAnimationLast(lua_State *L) { olua_startinvoke(L); @@ -12875,7 +13803,7 @@ static int _spine_TrackEntry_setAnimationLast(lua_State *L) return 0; } -static int _spine_TrackEntry_setAnimationStart(lua_State *L) +static int _olua_fun_spine_TrackEntry_setAnimationStart(lua_State *L) { olua_startinvoke(L); @@ -12893,7 +13821,7 @@ static int _spine_TrackEntry_setAnimationStart(lua_State *L) return 0; } -static int _spine_TrackEntry_setDelay(lua_State *L) +static int _olua_fun_spine_TrackEntry_setDelay(lua_State *L) { olua_startinvoke(L); @@ -12911,7 +13839,7 @@ static int _spine_TrackEntry_setDelay(lua_State *L) return 0; } -static int _spine_TrackEntry_setEventThreshold(lua_State *L) +static int _olua_fun_spine_TrackEntry_setEventThreshold(lua_State *L) { olua_startinvoke(L); @@ -12929,7 +13857,7 @@ static int _spine_TrackEntry_setEventThreshold(lua_State *L) return 0; } -static int _spine_TrackEntry_setHoldPrevious(lua_State *L) +static int _olua_fun_spine_TrackEntry_setHoldPrevious(lua_State *L) { olua_startinvoke(L); @@ -12947,7 +13875,7 @@ static int _spine_TrackEntry_setHoldPrevious(lua_State *L) return 0; } -static int _spine_TrackEntry_setListener(lua_State *L) +static int _olua_fun_spine_TrackEntry_setListener(lua_State *L) { olua_startinvoke(L); @@ -12959,18 +13887,19 @@ static int _spine_TrackEntry_setListener(lua_State *L) void *cb_store = (void *)self; std::string cb_tag = "Listener"; - std::string cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + std::string cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](spine::AnimationState *arg1, spine::EventType arg2, spine::TrackEntry *arg3, spine::Event *arg4) { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](spine::AnimationState *cb_arg1, spine::EventType cb_arg2, spine::TrackEntry *cb_arg3, spine::Event *cb_arg4) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); if (olua_contextequal(L, cb_ctx)) { int top = lua_gettop(L); - olua_push_object(L, arg1, "spine.AnimationState"); - olua_push_enum(L, arg2); - olua_push_object(L, arg3, "spine.TrackEntry"); - olua_push_object(L, arg4, "spine.Event"); + olua_push_object(L, cb_arg1, "spine.AnimationState"); + olua_push_enum(L, cb_arg2); + olua_push_object(L, cb_arg3, "spine.TrackEntry"); + olua_push_object(L, cb_arg4, "spine.Event"); olua_callback(L, cb_store, cb_name.c_str(), 4); @@ -12986,7 +13915,7 @@ static int _spine_TrackEntry_setListener(lua_State *L) return 0; } -static int _spine_TrackEntry_setLoop(lua_State *L) +static int _olua_fun_spine_TrackEntry_setLoop(lua_State *L) { olua_startinvoke(L); @@ -13004,7 +13933,7 @@ static int _spine_TrackEntry_setLoop(lua_State *L) return 0; } -static int _spine_TrackEntry_setMixAttachmentThreshold(lua_State *L) +static int _olua_fun_spine_TrackEntry_setMixAttachmentThreshold(lua_State *L) { olua_startinvoke(L); @@ -13022,7 +13951,7 @@ static int _spine_TrackEntry_setMixAttachmentThreshold(lua_State *L) return 0; } -static int _spine_TrackEntry_setMixBlend(lua_State *L) +static int _olua_fun_spine_TrackEntry_setMixBlend(lua_State *L) { olua_startinvoke(L); @@ -13040,7 +13969,7 @@ static int _spine_TrackEntry_setMixBlend(lua_State *L) return 0; } -static int _spine_TrackEntry_setMixDrawOrderThreshold(lua_State *L) +static int _olua_fun_spine_TrackEntry_setMixDrawOrderThreshold(lua_State *L) { olua_startinvoke(L); @@ -13058,7 +13987,7 @@ static int _spine_TrackEntry_setMixDrawOrderThreshold(lua_State *L) return 0; } -static int _spine_TrackEntry_setMixDuration$1(lua_State *L) +static int _olua_fun_spine_TrackEntry_setMixDuration$1(lua_State *L) { olua_startinvoke(L); @@ -13076,7 +14005,7 @@ static int _spine_TrackEntry_setMixDuration$1(lua_State *L) return 0; } -static int _spine_TrackEntry_setMixDuration$2(lua_State *L) +static int _olua_fun_spine_TrackEntry_setMixDuration$2(lua_State *L) { olua_startinvoke(L); @@ -13096,21 +14025,21 @@ static int _spine_TrackEntry_setMixDuration$2(lua_State *L) return 0; } -static int _spine_TrackEntry_setMixDuration(lua_State *L) +static int _olua_fun_spine_TrackEntry_setMixDuration(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_number(L, 2))) { // void setMixDuration(float inValue) - return _spine_TrackEntry_setMixDuration$1(L); + return _olua_fun_spine_TrackEntry_setMixDuration$1(L); // } } if (num_args == 2) { // if ((olua_is_number(L, 2)) && (olua_is_number(L, 3))) { // void setMixDuration(float mixDuration, float delay) - return _spine_TrackEntry_setMixDuration$2(L); + return _olua_fun_spine_TrackEntry_setMixDuration$2(L); // } } @@ -13119,7 +14048,7 @@ static int _spine_TrackEntry_setMixDuration(lua_State *L) return 0; } -static int _spine_TrackEntry_setMixTime(lua_State *L) +static int _olua_fun_spine_TrackEntry_setMixTime(lua_State *L) { olua_startinvoke(L); @@ -13137,7 +14066,7 @@ static int _spine_TrackEntry_setMixTime(lua_State *L) return 0; } -static int _spine_TrackEntry_setReverse(lua_State *L) +static int _olua_fun_spine_TrackEntry_setReverse(lua_State *L) { olua_startinvoke(L); @@ -13155,7 +14084,7 @@ static int _spine_TrackEntry_setReverse(lua_State *L) return 0; } -static int _spine_TrackEntry_setShortestRotation(lua_State *L) +static int _olua_fun_spine_TrackEntry_setShortestRotation(lua_State *L) { olua_startinvoke(L); @@ -13173,7 +14102,7 @@ static int _spine_TrackEntry_setShortestRotation(lua_State *L) return 0; } -static int _spine_TrackEntry_setTimeScale(lua_State *L) +static int _olua_fun_spine_TrackEntry_setTimeScale(lua_State *L) { olua_startinvoke(L); @@ -13191,7 +14120,7 @@ static int _spine_TrackEntry_setTimeScale(lua_State *L) return 0; } -static int _spine_TrackEntry_setTrackEnd(lua_State *L) +static int _olua_fun_spine_TrackEntry_setTrackEnd(lua_State *L) { olua_startinvoke(L); @@ -13209,7 +14138,7 @@ static int _spine_TrackEntry_setTrackEnd(lua_State *L) return 0; } -static int _spine_TrackEntry_setTrackTime(lua_State *L) +static int _olua_fun_spine_TrackEntry_setTrackTime(lua_State *L) { olua_startinvoke(L); @@ -13227,7 +14156,7 @@ static int _spine_TrackEntry_setTrackTime(lua_State *L) return 0; } -static int _spine_TrackEntry_wasApplied(lua_State *L) +static int _olua_fun_spine_TrackEntry_wasApplied(lua_State *L) { olua_startinvoke(L); @@ -13244,95 +14173,104 @@ static int _spine_TrackEntry_wasApplied(lua_State *L) return num_ret; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_spine_TrackEntry(lua_State *L) +static int _olua_cls_spine_TrackEntry(lua_State *L) { oluacls_class(L, "spine.TrackEntry"); - oluacls_func(L, "getAlpha", _spine_TrackEntry_getAlpha); - oluacls_func(L, "getAlphaAttachmentThreshold", _spine_TrackEntry_getAlphaAttachmentThreshold); - oluacls_func(L, "getAnimation", _spine_TrackEntry_getAnimation); - oluacls_func(L, "getAnimationEnd", _spine_TrackEntry_getAnimationEnd); - oluacls_func(L, "getAnimationLast", _spine_TrackEntry_getAnimationLast); - oluacls_func(L, "getAnimationStart", _spine_TrackEntry_getAnimationStart); - oluacls_func(L, "getAnimationTime", _spine_TrackEntry_getAnimationTime); - oluacls_func(L, "getDelay", _spine_TrackEntry_getDelay); - oluacls_func(L, "getEventThreshold", _spine_TrackEntry_getEventThreshold); - oluacls_func(L, "getHoldPrevious", _spine_TrackEntry_getHoldPrevious); - oluacls_func(L, "getLoop", _spine_TrackEntry_getLoop); - oluacls_func(L, "getMixAttachmentThreshold", _spine_TrackEntry_getMixAttachmentThreshold); - oluacls_func(L, "getMixBlend", _spine_TrackEntry_getMixBlend); - oluacls_func(L, "getMixDrawOrderThreshold", _spine_TrackEntry_getMixDrawOrderThreshold); - oluacls_func(L, "getMixDuration", _spine_TrackEntry_getMixDuration); - oluacls_func(L, "getMixTime", _spine_TrackEntry_getMixTime); - oluacls_func(L, "getMixingFrom", _spine_TrackEntry_getMixingFrom); - oluacls_func(L, "getMixingTo", _spine_TrackEntry_getMixingTo); - oluacls_func(L, "getNext", _spine_TrackEntry_getNext); - oluacls_func(L, "getPrevious", _spine_TrackEntry_getPrevious); - oluacls_func(L, "getReverse", _spine_TrackEntry_getReverse); - oluacls_func(L, "getShortestRotation", _spine_TrackEntry_getShortestRotation); - oluacls_func(L, "getTimeScale", _spine_TrackEntry_getTimeScale); - oluacls_func(L, "getTrackComplete", _spine_TrackEntry_getTrackComplete); - oluacls_func(L, "getTrackEnd", _spine_TrackEntry_getTrackEnd); - oluacls_func(L, "getTrackIndex", _spine_TrackEntry_getTrackIndex); - oluacls_func(L, "getTrackTime", _spine_TrackEntry_getTrackTime); - oluacls_func(L, "isComplete", _spine_TrackEntry_isComplete); - oluacls_func(L, "new", _spine_TrackEntry_new); - oluacls_func(L, "resetRotationDirections", _spine_TrackEntry_resetRotationDirections); - oluacls_func(L, "setAlpha", _spine_TrackEntry_setAlpha); - oluacls_func(L, "setAlphaAttachmentThreshold", _spine_TrackEntry_setAlphaAttachmentThreshold); - oluacls_func(L, "setAnimationEnd", _spine_TrackEntry_setAnimationEnd); - oluacls_func(L, "setAnimationLast", _spine_TrackEntry_setAnimationLast); - oluacls_func(L, "setAnimationStart", _spine_TrackEntry_setAnimationStart); - oluacls_func(L, "setDelay", _spine_TrackEntry_setDelay); - oluacls_func(L, "setEventThreshold", _spine_TrackEntry_setEventThreshold); - oluacls_func(L, "setHoldPrevious", _spine_TrackEntry_setHoldPrevious); - oluacls_func(L, "setListener", _spine_TrackEntry_setListener); - oluacls_func(L, "setLoop", _spine_TrackEntry_setLoop); - oluacls_func(L, "setMixAttachmentThreshold", _spine_TrackEntry_setMixAttachmentThreshold); - oluacls_func(L, "setMixBlend", _spine_TrackEntry_setMixBlend); - oluacls_func(L, "setMixDrawOrderThreshold", _spine_TrackEntry_setMixDrawOrderThreshold); - oluacls_func(L, "setMixDuration", _spine_TrackEntry_setMixDuration); - oluacls_func(L, "setMixTime", _spine_TrackEntry_setMixTime); - oluacls_func(L, "setReverse", _spine_TrackEntry_setReverse); - oluacls_func(L, "setShortestRotation", _spine_TrackEntry_setShortestRotation); - oluacls_func(L, "setTimeScale", _spine_TrackEntry_setTimeScale); - oluacls_func(L, "setTrackEnd", _spine_TrackEntry_setTrackEnd); - oluacls_func(L, "setTrackTime", _spine_TrackEntry_setTrackTime); - oluacls_func(L, "wasApplied", _spine_TrackEntry_wasApplied); - oluacls_prop(L, "alpha", _spine_TrackEntry_getAlpha, _spine_TrackEntry_setAlpha); - oluacls_prop(L, "alphaAttachmentThreshold", _spine_TrackEntry_getAlphaAttachmentThreshold, _spine_TrackEntry_setAlphaAttachmentThreshold); - oluacls_prop(L, "animation", _spine_TrackEntry_getAnimation, nullptr); - oluacls_prop(L, "animationEnd", _spine_TrackEntry_getAnimationEnd, _spine_TrackEntry_setAnimationEnd); - oluacls_prop(L, "animationLast", _spine_TrackEntry_getAnimationLast, _spine_TrackEntry_setAnimationLast); - oluacls_prop(L, "animationStart", _spine_TrackEntry_getAnimationStart, _spine_TrackEntry_setAnimationStart); - oluacls_prop(L, "animationTime", _spine_TrackEntry_getAnimationTime, nullptr); - oluacls_prop(L, "complete", _spine_TrackEntry_isComplete, nullptr); - oluacls_prop(L, "delay", _spine_TrackEntry_getDelay, _spine_TrackEntry_setDelay); - oluacls_prop(L, "eventThreshold", _spine_TrackEntry_getEventThreshold, _spine_TrackEntry_setEventThreshold); - oluacls_prop(L, "holdPrevious", _spine_TrackEntry_getHoldPrevious, _spine_TrackEntry_setHoldPrevious); - oluacls_prop(L, "loop", _spine_TrackEntry_getLoop, _spine_TrackEntry_setLoop); - oluacls_prop(L, "mixAttachmentThreshold", _spine_TrackEntry_getMixAttachmentThreshold, _spine_TrackEntry_setMixAttachmentThreshold); - oluacls_prop(L, "mixBlend", _spine_TrackEntry_getMixBlend, _spine_TrackEntry_setMixBlend); - oluacls_prop(L, "mixDrawOrderThreshold", _spine_TrackEntry_getMixDrawOrderThreshold, _spine_TrackEntry_setMixDrawOrderThreshold); - oluacls_prop(L, "mixDuration", _spine_TrackEntry_getMixDuration, _spine_TrackEntry_setMixDuration); - oluacls_prop(L, "mixTime", _spine_TrackEntry_getMixTime, _spine_TrackEntry_setMixTime); - oluacls_prop(L, "mixingFrom", _spine_TrackEntry_getMixingFrom, nullptr); - oluacls_prop(L, "mixingTo", _spine_TrackEntry_getMixingTo, nullptr); - oluacls_prop(L, "next", _spine_TrackEntry_getNext, nullptr); - oluacls_prop(L, "previous", _spine_TrackEntry_getPrevious, nullptr); - oluacls_prop(L, "reverse", _spine_TrackEntry_getReverse, _spine_TrackEntry_setReverse); - oluacls_prop(L, "shortestRotation", _spine_TrackEntry_getShortestRotation, _spine_TrackEntry_setShortestRotation); - oluacls_prop(L, "timeScale", _spine_TrackEntry_getTimeScale, _spine_TrackEntry_setTimeScale); - oluacls_prop(L, "trackComplete", _spine_TrackEntry_getTrackComplete, nullptr); - oluacls_prop(L, "trackEnd", _spine_TrackEntry_getTrackEnd, _spine_TrackEntry_setTrackEnd); - oluacls_prop(L, "trackIndex", _spine_TrackEntry_getTrackIndex, nullptr); - oluacls_prop(L, "trackTime", _spine_TrackEntry_getTrackTime, _spine_TrackEntry_setTrackTime); + oluacls_func(L, "getAlpha", _olua_fun_spine_TrackEntry_getAlpha); + oluacls_func(L, "getAlphaAttachmentThreshold", _olua_fun_spine_TrackEntry_getAlphaAttachmentThreshold); + oluacls_func(L, "getAnimation", _olua_fun_spine_TrackEntry_getAnimation); + oluacls_func(L, "getAnimationEnd", _olua_fun_spine_TrackEntry_getAnimationEnd); + oluacls_func(L, "getAnimationLast", _olua_fun_spine_TrackEntry_getAnimationLast); + oluacls_func(L, "getAnimationStart", _olua_fun_spine_TrackEntry_getAnimationStart); + oluacls_func(L, "getAnimationTime", _olua_fun_spine_TrackEntry_getAnimationTime); + oluacls_func(L, "getDelay", _olua_fun_spine_TrackEntry_getDelay); + oluacls_func(L, "getEventThreshold", _olua_fun_spine_TrackEntry_getEventThreshold); + oluacls_func(L, "getHoldPrevious", _olua_fun_spine_TrackEntry_getHoldPrevious); + oluacls_func(L, "getLoop", _olua_fun_spine_TrackEntry_getLoop); + oluacls_func(L, "getMixAttachmentThreshold", _olua_fun_spine_TrackEntry_getMixAttachmentThreshold); + oluacls_func(L, "getMixBlend", _olua_fun_spine_TrackEntry_getMixBlend); + oluacls_func(L, "getMixDrawOrderThreshold", _olua_fun_spine_TrackEntry_getMixDrawOrderThreshold); + oluacls_func(L, "getMixDuration", _olua_fun_spine_TrackEntry_getMixDuration); + oluacls_func(L, "getMixTime", _olua_fun_spine_TrackEntry_getMixTime); + oluacls_func(L, "getMixingFrom", _olua_fun_spine_TrackEntry_getMixingFrom); + oluacls_func(L, "getMixingTo", _olua_fun_spine_TrackEntry_getMixingTo); + oluacls_func(L, "getNext", _olua_fun_spine_TrackEntry_getNext); + oluacls_func(L, "getPrevious", _olua_fun_spine_TrackEntry_getPrevious); + oluacls_func(L, "getReverse", _olua_fun_spine_TrackEntry_getReverse); + oluacls_func(L, "getShortestRotation", _olua_fun_spine_TrackEntry_getShortestRotation); + oluacls_func(L, "getTimeScale", _olua_fun_spine_TrackEntry_getTimeScale); + oluacls_func(L, "getTrackComplete", _olua_fun_spine_TrackEntry_getTrackComplete); + oluacls_func(L, "getTrackEnd", _olua_fun_spine_TrackEntry_getTrackEnd); + oluacls_func(L, "getTrackIndex", _olua_fun_spine_TrackEntry_getTrackIndex); + oluacls_func(L, "getTrackTime", _olua_fun_spine_TrackEntry_getTrackTime); + oluacls_func(L, "isComplete", _olua_fun_spine_TrackEntry_isComplete); + oluacls_func(L, "new", _olua_fun_spine_TrackEntry_new); + oluacls_func(L, "resetRotationDirections", _olua_fun_spine_TrackEntry_resetRotationDirections); + oluacls_func(L, "setAlpha", _olua_fun_spine_TrackEntry_setAlpha); + oluacls_func(L, "setAlphaAttachmentThreshold", _olua_fun_spine_TrackEntry_setAlphaAttachmentThreshold); + oluacls_func(L, "setAnimationEnd", _olua_fun_spine_TrackEntry_setAnimationEnd); + oluacls_func(L, "setAnimationLast", _olua_fun_spine_TrackEntry_setAnimationLast); + oluacls_func(L, "setAnimationStart", _olua_fun_spine_TrackEntry_setAnimationStart); + oluacls_func(L, "setDelay", _olua_fun_spine_TrackEntry_setDelay); + oluacls_func(L, "setEventThreshold", _olua_fun_spine_TrackEntry_setEventThreshold); + oluacls_func(L, "setHoldPrevious", _olua_fun_spine_TrackEntry_setHoldPrevious); + oluacls_func(L, "setListener", _olua_fun_spine_TrackEntry_setListener); + oluacls_func(L, "setLoop", _olua_fun_spine_TrackEntry_setLoop); + oluacls_func(L, "setMixAttachmentThreshold", _olua_fun_spine_TrackEntry_setMixAttachmentThreshold); + oluacls_func(L, "setMixBlend", _olua_fun_spine_TrackEntry_setMixBlend); + oluacls_func(L, "setMixDrawOrderThreshold", _olua_fun_spine_TrackEntry_setMixDrawOrderThreshold); + oluacls_func(L, "setMixDuration", _olua_fun_spine_TrackEntry_setMixDuration); + oluacls_func(L, "setMixTime", _olua_fun_spine_TrackEntry_setMixTime); + oluacls_func(L, "setReverse", _olua_fun_spine_TrackEntry_setReverse); + oluacls_func(L, "setShortestRotation", _olua_fun_spine_TrackEntry_setShortestRotation); + oluacls_func(L, "setTimeScale", _olua_fun_spine_TrackEntry_setTimeScale); + oluacls_func(L, "setTrackEnd", _olua_fun_spine_TrackEntry_setTrackEnd); + oluacls_func(L, "setTrackTime", _olua_fun_spine_TrackEntry_setTrackTime); + oluacls_func(L, "wasApplied", _olua_fun_spine_TrackEntry_wasApplied); + oluacls_prop(L, "alpha", _olua_fun_spine_TrackEntry_getAlpha, _olua_fun_spine_TrackEntry_setAlpha); + oluacls_prop(L, "alphaAttachmentThreshold", _olua_fun_spine_TrackEntry_getAlphaAttachmentThreshold, _olua_fun_spine_TrackEntry_setAlphaAttachmentThreshold); + oluacls_prop(L, "animation", _olua_fun_spine_TrackEntry_getAnimation, nullptr); + oluacls_prop(L, "animationEnd", _olua_fun_spine_TrackEntry_getAnimationEnd, _olua_fun_spine_TrackEntry_setAnimationEnd); + oluacls_prop(L, "animationLast", _olua_fun_spine_TrackEntry_getAnimationLast, _olua_fun_spine_TrackEntry_setAnimationLast); + oluacls_prop(L, "animationStart", _olua_fun_spine_TrackEntry_getAnimationStart, _olua_fun_spine_TrackEntry_setAnimationStart); + oluacls_prop(L, "animationTime", _olua_fun_spine_TrackEntry_getAnimationTime, nullptr); + oluacls_prop(L, "complete", _olua_fun_spine_TrackEntry_isComplete, nullptr); + oluacls_prop(L, "delay", _olua_fun_spine_TrackEntry_getDelay, _olua_fun_spine_TrackEntry_setDelay); + oluacls_prop(L, "eventThreshold", _olua_fun_spine_TrackEntry_getEventThreshold, _olua_fun_spine_TrackEntry_setEventThreshold); + oluacls_prop(L, "holdPrevious", _olua_fun_spine_TrackEntry_getHoldPrevious, _olua_fun_spine_TrackEntry_setHoldPrevious); + oluacls_prop(L, "loop", _olua_fun_spine_TrackEntry_getLoop, _olua_fun_spine_TrackEntry_setLoop); + oluacls_prop(L, "mixAttachmentThreshold", _olua_fun_spine_TrackEntry_getMixAttachmentThreshold, _olua_fun_spine_TrackEntry_setMixAttachmentThreshold); + oluacls_prop(L, "mixBlend", _olua_fun_spine_TrackEntry_getMixBlend, _olua_fun_spine_TrackEntry_setMixBlend); + oluacls_prop(L, "mixDrawOrderThreshold", _olua_fun_spine_TrackEntry_getMixDrawOrderThreshold, _olua_fun_spine_TrackEntry_setMixDrawOrderThreshold); + oluacls_prop(L, "mixDuration", _olua_fun_spine_TrackEntry_getMixDuration, nullptr); + oluacls_prop(L, "mixTime", _olua_fun_spine_TrackEntry_getMixTime, _olua_fun_spine_TrackEntry_setMixTime); + oluacls_prop(L, "mixingFrom", _olua_fun_spine_TrackEntry_getMixingFrom, nullptr); + oluacls_prop(L, "mixingTo", _olua_fun_spine_TrackEntry_getMixingTo, nullptr); + oluacls_prop(L, "next", _olua_fun_spine_TrackEntry_getNext, nullptr); + oluacls_prop(L, "previous", _olua_fun_spine_TrackEntry_getPrevious, nullptr); + oluacls_prop(L, "reverse", _olua_fun_spine_TrackEntry_getReverse, _olua_fun_spine_TrackEntry_setReverse); + oluacls_prop(L, "shortestRotation", _olua_fun_spine_TrackEntry_getShortestRotation, _olua_fun_spine_TrackEntry_setShortestRotation); + oluacls_prop(L, "timeScale", _olua_fun_spine_TrackEntry_getTimeScale, _olua_fun_spine_TrackEntry_setTimeScale); + oluacls_prop(L, "trackComplete", _olua_fun_spine_TrackEntry_getTrackComplete, nullptr); + oluacls_prop(L, "trackEnd", _olua_fun_spine_TrackEntry_getTrackEnd, _olua_fun_spine_TrackEntry_setTrackEnd); + oluacls_prop(L, "trackIndex", _olua_fun_spine_TrackEntry_getTrackIndex, nullptr); + oluacls_prop(L, "trackTime", _olua_fun_spine_TrackEntry_getTrackTime, _olua_fun_spine_TrackEntry_setTrackTime); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_spine_TrackEntry(lua_State *L) +{ + olua_require(L, "spine", luaopen_spine); + if (!olua_getclass(L, "spine.TrackEntry")) { + luaL_error(L, "class not found: spine::TrackEntry"); + } return 1; } OLUA_END_DECLS -static int _spine_SkeletonData___gc(lua_State *L) +static int _olua_fun_spine_SkeletonData___gc(lua_State *L) { olua_startinvoke(L); @@ -13344,7 +14282,7 @@ static int _spine_SkeletonData___gc(lua_State *L) return (int)ret; } -static int _spine_SkeletonData_create$1(lua_State *L) +static int _olua_fun_spine_SkeletonData_create$1(lua_State *L) { olua_startinvoke(L); @@ -13364,7 +14302,7 @@ static int _spine_SkeletonData_create$1(lua_State *L) return (int)ret; } -static int _spine_SkeletonData_create$2(lua_State *L) +static int _olua_fun_spine_SkeletonData_create$2(lua_State *L) { olua_startinvoke(L); @@ -13374,7 +14312,7 @@ static int _spine_SkeletonData_create$2(lua_State *L) olua_check_string(L, 1, &arg2); olua_check_string(L, 2, &arg3); - // @extend(spine::SkeletonDataExtend) static olua_Return create(lua_State *L, const char *skelPath, const char *atlasPath, @optional float scale) + // @extend(spine::SkeletonDataExtend) static olua_Return create(lua_State *L, const char *skelPath, const char *atlasPath) olua_Return ret = spine::SkeletonDataExtend::create(L, arg2, arg3); olua_endinvoke(L); @@ -13382,21 +14320,21 @@ static int _spine_SkeletonData_create$2(lua_State *L) return (int)ret; } -static int _spine_SkeletonData_create(lua_State *L) +static int _olua_fun_spine_SkeletonData_create(lua_State *L) { int num_args = lua_gettop(L); - if (num_args == 2) { + if (num_args == 1) { // if ((olua_is_string(L, 1)) && (olua_is_string(L, 2))) { - // @extend(spine::SkeletonDataExtend) static olua_Return create(lua_State *L, const char *skelPath, const char *atlasPath, @optional float scale) - return _spine_SkeletonData_create$2(L); + // @extend(spine::SkeletonDataExtend) static olua_Return create(lua_State *L, const char *skelPath, const char *atlasPath) + return _olua_fun_spine_SkeletonData_create$2(L); // } } - if (num_args == 3) { + if (num_args == 2) { // if ((olua_is_string(L, 1)) && (olua_is_string(L, 2)) && (olua_is_number(L, 3))) { // @extend(spine::SkeletonDataExtend) static olua_Return create(lua_State *L, const char *skelPath, const char *atlasPath, @optional float scale) - return _spine_SkeletonData_create$1(L); + return _olua_fun_spine_SkeletonData_create$1(L); // } } @@ -13405,7 +14343,19 @@ static int _spine_SkeletonData_create(lua_State *L) return 0; } -static int _spine_SkeletonData_findAnimation(lua_State *L) +static int _olua_fun_spine_SkeletonData_dispose(lua_State *L) +{ + olua_startinvoke(L); + + // @extend(spine::SkeletonDataExtend) static olua_Return dispose(lua_State *L) + olua_Return ret = spine::SkeletonDataExtend::dispose(L); + + olua_endinvoke(L); + + return (int)ret; +} + +static int _olua_fun_spine_SkeletonData_findAnimation(lua_State *L) { olua_startinvoke(L); @@ -13424,7 +14374,7 @@ static int _spine_SkeletonData_findAnimation(lua_State *L) return num_ret; } -static int _spine_SkeletonData_findBone(lua_State *L) +static int _olua_fun_spine_SkeletonData_findBone(lua_State *L) { olua_startinvoke(L); @@ -13443,7 +14393,7 @@ static int _spine_SkeletonData_findBone(lua_State *L) return num_ret; } -static int _spine_SkeletonData_findEvent(lua_State *L) +static int _olua_fun_spine_SkeletonData_findEvent(lua_State *L) { olua_startinvoke(L); @@ -13462,7 +14412,7 @@ static int _spine_SkeletonData_findEvent(lua_State *L) return num_ret; } -static int _spine_SkeletonData_findIkConstraint(lua_State *L) +static int _olua_fun_spine_SkeletonData_findIkConstraint(lua_State *L) { olua_startinvoke(L); @@ -13481,7 +14431,7 @@ static int _spine_SkeletonData_findIkConstraint(lua_State *L) return num_ret; } -static int _spine_SkeletonData_findPathConstraint(lua_State *L) +static int _olua_fun_spine_SkeletonData_findPathConstraint(lua_State *L) { olua_startinvoke(L); @@ -13500,7 +14450,7 @@ static int _spine_SkeletonData_findPathConstraint(lua_State *L) return num_ret; } -static int _spine_SkeletonData_findPhysicsConstraint(lua_State *L) +static int _olua_fun_spine_SkeletonData_findPhysicsConstraint(lua_State *L) { olua_startinvoke(L); @@ -13519,7 +14469,7 @@ static int _spine_SkeletonData_findPhysicsConstraint(lua_State *L) return num_ret; } -static int _spine_SkeletonData_findSkin(lua_State *L) +static int _olua_fun_spine_SkeletonData_findSkin(lua_State *L) { olua_startinvoke(L); @@ -13538,7 +14488,7 @@ static int _spine_SkeletonData_findSkin(lua_State *L) return num_ret; } -static int _spine_SkeletonData_findSlot(lua_State *L) +static int _olua_fun_spine_SkeletonData_findSlot(lua_State *L) { olua_startinvoke(L); @@ -13557,7 +14507,7 @@ static int _spine_SkeletonData_findSlot(lua_State *L) return num_ret; } -static int _spine_SkeletonData_findTransformConstraint(lua_State *L) +static int _olua_fun_spine_SkeletonData_findTransformConstraint(lua_State *L) { olua_startinvoke(L); @@ -13576,7 +14526,7 @@ static int _spine_SkeletonData_findTransformConstraint(lua_State *L) return num_ret; } -static int _spine_SkeletonData_getAnimations(lua_State *L) +static int _olua_fun_spine_SkeletonData_getAnimations(lua_State *L) { olua_startinvoke(L); @@ -13595,7 +14545,7 @@ static int _spine_SkeletonData_getAnimations(lua_State *L) return num_ret; } -static int _spine_SkeletonData_getAudioPath(lua_State *L) +static int _olua_fun_spine_SkeletonData_getAudioPath(lua_State *L) { olua_startinvoke(L); @@ -13612,7 +14562,7 @@ static int _spine_SkeletonData_getAudioPath(lua_State *L) return num_ret; } -static int _spine_SkeletonData_getBones(lua_State *L) +static int _olua_fun_spine_SkeletonData_getBones(lua_State *L) { olua_startinvoke(L); @@ -13631,7 +14581,7 @@ static int _spine_SkeletonData_getBones(lua_State *L) return num_ret; } -static int _spine_SkeletonData_getDefaultSkin(lua_State *L) +static int _olua_fun_spine_SkeletonData_getDefaultSkin(lua_State *L) { olua_startinvoke(L); @@ -13648,7 +14598,7 @@ static int _spine_SkeletonData_getDefaultSkin(lua_State *L) return num_ret; } -static int _spine_SkeletonData_getEvents(lua_State *L) +static int _olua_fun_spine_SkeletonData_getEvents(lua_State *L) { olua_startinvoke(L); @@ -13667,7 +14617,7 @@ static int _spine_SkeletonData_getEvents(lua_State *L) return num_ret; } -static int _spine_SkeletonData_getFps(lua_State *L) +static int _olua_fun_spine_SkeletonData_getFps(lua_State *L) { olua_startinvoke(L); @@ -13684,7 +14634,7 @@ static int _spine_SkeletonData_getFps(lua_State *L) return num_ret; } -static int _spine_SkeletonData_getHash(lua_State *L) +static int _olua_fun_spine_SkeletonData_getHash(lua_State *L) { olua_startinvoke(L); @@ -13701,7 +14651,7 @@ static int _spine_SkeletonData_getHash(lua_State *L) return num_ret; } -static int _spine_SkeletonData_getHeight(lua_State *L) +static int _olua_fun_spine_SkeletonData_getHeight(lua_State *L) { olua_startinvoke(L); @@ -13718,7 +14668,7 @@ static int _spine_SkeletonData_getHeight(lua_State *L) return num_ret; } -static int _spine_SkeletonData_getIkConstraints(lua_State *L) +static int _olua_fun_spine_SkeletonData_getIkConstraints(lua_State *L) { olua_startinvoke(L); @@ -13737,7 +14687,7 @@ static int _spine_SkeletonData_getIkConstraints(lua_State *L) return num_ret; } -static int _spine_SkeletonData_getImagesPath(lua_State *L) +static int _olua_fun_spine_SkeletonData_getImagesPath(lua_State *L) { olua_startinvoke(L); @@ -13754,7 +14704,7 @@ static int _spine_SkeletonData_getImagesPath(lua_State *L) return num_ret; } -static int _spine_SkeletonData_getName(lua_State *L) +static int _olua_fun_spine_SkeletonData_getName(lua_State *L) { olua_startinvoke(L); @@ -13771,7 +14721,7 @@ static int _spine_SkeletonData_getName(lua_State *L) return num_ret; } -static int _spine_SkeletonData_getPathConstraints(lua_State *L) +static int _olua_fun_spine_SkeletonData_getPathConstraints(lua_State *L) { olua_startinvoke(L); @@ -13790,7 +14740,7 @@ static int _spine_SkeletonData_getPathConstraints(lua_State *L) return num_ret; } -static int _spine_SkeletonData_getPhysicsConstraints(lua_State *L) +static int _olua_fun_spine_SkeletonData_getPhysicsConstraints(lua_State *L) { olua_startinvoke(L); @@ -13809,7 +14759,7 @@ static int _spine_SkeletonData_getPhysicsConstraints(lua_State *L) return num_ret; } -static int _spine_SkeletonData_getReferenceScale(lua_State *L) +static int _olua_fun_spine_SkeletonData_getReferenceScale(lua_State *L) { olua_startinvoke(L); @@ -13826,7 +14776,7 @@ static int _spine_SkeletonData_getReferenceScale(lua_State *L) return num_ret; } -static int _spine_SkeletonData_getSkins(lua_State *L) +static int _olua_fun_spine_SkeletonData_getSkins(lua_State *L) { olua_startinvoke(L); @@ -13845,7 +14795,7 @@ static int _spine_SkeletonData_getSkins(lua_State *L) return num_ret; } -static int _spine_SkeletonData_getSlots(lua_State *L) +static int _olua_fun_spine_SkeletonData_getSlots(lua_State *L) { olua_startinvoke(L); @@ -13864,7 +14814,7 @@ static int _spine_SkeletonData_getSlots(lua_State *L) return num_ret; } -static int _spine_SkeletonData_getTransformConstraints(lua_State *L) +static int _olua_fun_spine_SkeletonData_getTransformConstraints(lua_State *L) { olua_startinvoke(L); @@ -13883,7 +14833,7 @@ static int _spine_SkeletonData_getTransformConstraints(lua_State *L) return num_ret; } -static int _spine_SkeletonData_getVersion(lua_State *L) +static int _olua_fun_spine_SkeletonData_getVersion(lua_State *L) { olua_startinvoke(L); @@ -13900,7 +14850,7 @@ static int _spine_SkeletonData_getVersion(lua_State *L) return num_ret; } -static int _spine_SkeletonData_getWidth(lua_State *L) +static int _olua_fun_spine_SkeletonData_getWidth(lua_State *L) { olua_startinvoke(L); @@ -13917,7 +14867,7 @@ static int _spine_SkeletonData_getWidth(lua_State *L) return num_ret; } -static int _spine_SkeletonData_getX(lua_State *L) +static int _olua_fun_spine_SkeletonData_getX(lua_State *L) { olua_startinvoke(L); @@ -13934,7 +14884,7 @@ static int _spine_SkeletonData_getX(lua_State *L) return num_ret; } -static int _spine_SkeletonData_getY(lua_State *L) +static int _olua_fun_spine_SkeletonData_getY(lua_State *L) { olua_startinvoke(L); @@ -13951,7 +14901,7 @@ static int _spine_SkeletonData_getY(lua_State *L) return num_ret; } -static int _spine_SkeletonData_setAudioPath(lua_State *L) +static int _olua_fun_spine_SkeletonData_setAudioPath(lua_State *L) { olua_startinvoke(L); @@ -13969,7 +14919,7 @@ static int _spine_SkeletonData_setAudioPath(lua_State *L) return 0; } -static int _spine_SkeletonData_setDefaultSkin(lua_State *L) +static int _olua_fun_spine_SkeletonData_setDefaultSkin(lua_State *L) { olua_startinvoke(L); @@ -13987,7 +14937,7 @@ static int _spine_SkeletonData_setDefaultSkin(lua_State *L) return 0; } -static int _spine_SkeletonData_setFps(lua_State *L) +static int _olua_fun_spine_SkeletonData_setFps(lua_State *L) { olua_startinvoke(L); @@ -14005,7 +14955,7 @@ static int _spine_SkeletonData_setFps(lua_State *L) return 0; } -static int _spine_SkeletonData_setHash(lua_State *L) +static int _olua_fun_spine_SkeletonData_setHash(lua_State *L) { olua_startinvoke(L); @@ -14023,7 +14973,7 @@ static int _spine_SkeletonData_setHash(lua_State *L) return 0; } -static int _spine_SkeletonData_setHeight(lua_State *L) +static int _olua_fun_spine_SkeletonData_setHeight(lua_State *L) { olua_startinvoke(L); @@ -14041,7 +14991,7 @@ static int _spine_SkeletonData_setHeight(lua_State *L) return 0; } -static int _spine_SkeletonData_setImagesPath(lua_State *L) +static int _olua_fun_spine_SkeletonData_setImagesPath(lua_State *L) { olua_startinvoke(L); @@ -14059,7 +15009,7 @@ static int _spine_SkeletonData_setImagesPath(lua_State *L) return 0; } -static int _spine_SkeletonData_setName(lua_State *L) +static int _olua_fun_spine_SkeletonData_setName(lua_State *L) { olua_startinvoke(L); @@ -14077,7 +15027,7 @@ static int _spine_SkeletonData_setName(lua_State *L) return 0; } -static int _spine_SkeletonData_setReferenceScale(lua_State *L) +static int _olua_fun_spine_SkeletonData_setReferenceScale(lua_State *L) { olua_startinvoke(L); @@ -14095,7 +15045,7 @@ static int _spine_SkeletonData_setReferenceScale(lua_State *L) return 0; } -static int _spine_SkeletonData_setVersion(lua_State *L) +static int _olua_fun_spine_SkeletonData_setVersion(lua_State *L) { olua_startinvoke(L); @@ -14113,7 +15063,7 @@ static int _spine_SkeletonData_setVersion(lua_State *L) return 0; } -static int _spine_SkeletonData_setWidth(lua_State *L) +static int _olua_fun_spine_SkeletonData_setWidth(lua_State *L) { olua_startinvoke(L); @@ -14131,7 +15081,7 @@ static int _spine_SkeletonData_setWidth(lua_State *L) return 0; } -static int _spine_SkeletonData_setX(lua_State *L) +static int _olua_fun_spine_SkeletonData_setX(lua_State *L) { olua_startinvoke(L); @@ -14149,7 +15099,7 @@ static int _spine_SkeletonData_setX(lua_State *L) return 0; } -static int _spine_SkeletonData_setY(lua_State *L) +static int _olua_fun_spine_SkeletonData_setY(lua_State *L) { olua_startinvoke(L); @@ -14167,83 +15117,91 @@ static int _spine_SkeletonData_setY(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_spine_SkeletonData(lua_State *L) +static int _olua_cls_spine_SkeletonData(lua_State *L) { oluacls_class(L, "spine.SkeletonData"); - oluacls_func(L, "__gc", _spine_SkeletonData___gc); - oluacls_func(L, "create", _spine_SkeletonData_create); - oluacls_func(L, "dispose", _spine_SkeletonData___gc); - oluacls_func(L, "findAnimation", _spine_SkeletonData_findAnimation); - oluacls_func(L, "findBone", _spine_SkeletonData_findBone); - oluacls_func(L, "findEvent", _spine_SkeletonData_findEvent); - oluacls_func(L, "findIkConstraint", _spine_SkeletonData_findIkConstraint); - oluacls_func(L, "findPathConstraint", _spine_SkeletonData_findPathConstraint); - oluacls_func(L, "findPhysicsConstraint", _spine_SkeletonData_findPhysicsConstraint); - oluacls_func(L, "findSkin", _spine_SkeletonData_findSkin); - oluacls_func(L, "findSlot", _spine_SkeletonData_findSlot); - oluacls_func(L, "findTransformConstraint", _spine_SkeletonData_findTransformConstraint); - oluacls_func(L, "getAnimations", _spine_SkeletonData_getAnimations); - oluacls_func(L, "getAudioPath", _spine_SkeletonData_getAudioPath); - oluacls_func(L, "getBones", _spine_SkeletonData_getBones); - oluacls_func(L, "getDefaultSkin", _spine_SkeletonData_getDefaultSkin); - oluacls_func(L, "getEvents", _spine_SkeletonData_getEvents); - oluacls_func(L, "getFps", _spine_SkeletonData_getFps); - oluacls_func(L, "getHash", _spine_SkeletonData_getHash); - oluacls_func(L, "getHeight", _spine_SkeletonData_getHeight); - oluacls_func(L, "getIkConstraints", _spine_SkeletonData_getIkConstraints); - oluacls_func(L, "getImagesPath", _spine_SkeletonData_getImagesPath); - oluacls_func(L, "getName", _spine_SkeletonData_getName); - oluacls_func(L, "getPathConstraints", _spine_SkeletonData_getPathConstraints); - oluacls_func(L, "getPhysicsConstraints", _spine_SkeletonData_getPhysicsConstraints); - oluacls_func(L, "getReferenceScale", _spine_SkeletonData_getReferenceScale); - oluacls_func(L, "getSkins", _spine_SkeletonData_getSkins); - oluacls_func(L, "getSlots", _spine_SkeletonData_getSlots); - oluacls_func(L, "getTransformConstraints", _spine_SkeletonData_getTransformConstraints); - oluacls_func(L, "getVersion", _spine_SkeletonData_getVersion); - oluacls_func(L, "getWidth", _spine_SkeletonData_getWidth); - oluacls_func(L, "getX", _spine_SkeletonData_getX); - oluacls_func(L, "getY", _spine_SkeletonData_getY); - oluacls_func(L, "new", _spine_SkeletonData_create); - oluacls_func(L, "setAudioPath", _spine_SkeletonData_setAudioPath); - oluacls_func(L, "setDefaultSkin", _spine_SkeletonData_setDefaultSkin); - oluacls_func(L, "setFps", _spine_SkeletonData_setFps); - oluacls_func(L, "setHash", _spine_SkeletonData_setHash); - oluacls_func(L, "setHeight", _spine_SkeletonData_setHeight); - oluacls_func(L, "setImagesPath", _spine_SkeletonData_setImagesPath); - oluacls_func(L, "setName", _spine_SkeletonData_setName); - oluacls_func(L, "setReferenceScale", _spine_SkeletonData_setReferenceScale); - oluacls_func(L, "setVersion", _spine_SkeletonData_setVersion); - oluacls_func(L, "setWidth", _spine_SkeletonData_setWidth); - oluacls_func(L, "setX", _spine_SkeletonData_setX); - oluacls_func(L, "setY", _spine_SkeletonData_setY); - oluacls_prop(L, "animations", _spine_SkeletonData_getAnimations, nullptr); - oluacls_prop(L, "audioPath", _spine_SkeletonData_getAudioPath, _spine_SkeletonData_setAudioPath); - oluacls_prop(L, "bones", _spine_SkeletonData_getBones, nullptr); - oluacls_prop(L, "defaultSkin", _spine_SkeletonData_getDefaultSkin, _spine_SkeletonData_setDefaultSkin); - oluacls_prop(L, "events", _spine_SkeletonData_getEvents, nullptr); - oluacls_prop(L, "fps", _spine_SkeletonData_getFps, _spine_SkeletonData_setFps); - oluacls_prop(L, "hash", _spine_SkeletonData_getHash, _spine_SkeletonData_setHash); - oluacls_prop(L, "height", _spine_SkeletonData_getHeight, _spine_SkeletonData_setHeight); - oluacls_prop(L, "ikConstraints", _spine_SkeletonData_getIkConstraints, nullptr); - oluacls_prop(L, "imagesPath", _spine_SkeletonData_getImagesPath, _spine_SkeletonData_setImagesPath); - oluacls_prop(L, "name", _spine_SkeletonData_getName, _spine_SkeletonData_setName); - oluacls_prop(L, "pathConstraints", _spine_SkeletonData_getPathConstraints, nullptr); - oluacls_prop(L, "physicsConstraints", _spine_SkeletonData_getPhysicsConstraints, nullptr); - oluacls_prop(L, "referenceScale", _spine_SkeletonData_getReferenceScale, _spine_SkeletonData_setReferenceScale); - oluacls_prop(L, "skins", _spine_SkeletonData_getSkins, nullptr); - oluacls_prop(L, "slots", _spine_SkeletonData_getSlots, nullptr); - oluacls_prop(L, "transformConstraints", _spine_SkeletonData_getTransformConstraints, nullptr); - oluacls_prop(L, "version", _spine_SkeletonData_getVersion, _spine_SkeletonData_setVersion); - oluacls_prop(L, "width", _spine_SkeletonData_getWidth, _spine_SkeletonData_setWidth); - oluacls_prop(L, "x", _spine_SkeletonData_getX, _spine_SkeletonData_setX); - oluacls_prop(L, "y", _spine_SkeletonData_getY, _spine_SkeletonData_setY); + oluacls_func(L, "__gc", _olua_fun_spine_SkeletonData___gc); + oluacls_func(L, "create", _olua_fun_spine_SkeletonData_create); + oluacls_func(L, "dispose", _olua_fun_spine_SkeletonData_dispose); + oluacls_func(L, "findAnimation", _olua_fun_spine_SkeletonData_findAnimation); + oluacls_func(L, "findBone", _olua_fun_spine_SkeletonData_findBone); + oluacls_func(L, "findEvent", _olua_fun_spine_SkeletonData_findEvent); + oluacls_func(L, "findIkConstraint", _olua_fun_spine_SkeletonData_findIkConstraint); + oluacls_func(L, "findPathConstraint", _olua_fun_spine_SkeletonData_findPathConstraint); + oluacls_func(L, "findPhysicsConstraint", _olua_fun_spine_SkeletonData_findPhysicsConstraint); + oluacls_func(L, "findSkin", _olua_fun_spine_SkeletonData_findSkin); + oluacls_func(L, "findSlot", _olua_fun_spine_SkeletonData_findSlot); + oluacls_func(L, "findTransformConstraint", _olua_fun_spine_SkeletonData_findTransformConstraint); + oluacls_func(L, "getAnimations", _olua_fun_spine_SkeletonData_getAnimations); + oluacls_func(L, "getAudioPath", _olua_fun_spine_SkeletonData_getAudioPath); + oluacls_func(L, "getBones", _olua_fun_spine_SkeletonData_getBones); + oluacls_func(L, "getDefaultSkin", _olua_fun_spine_SkeletonData_getDefaultSkin); + oluacls_func(L, "getEvents", _olua_fun_spine_SkeletonData_getEvents); + oluacls_func(L, "getFps", _olua_fun_spine_SkeletonData_getFps); + oluacls_func(L, "getHash", _olua_fun_spine_SkeletonData_getHash); + oluacls_func(L, "getHeight", _olua_fun_spine_SkeletonData_getHeight); + oluacls_func(L, "getIkConstraints", _olua_fun_spine_SkeletonData_getIkConstraints); + oluacls_func(L, "getImagesPath", _olua_fun_spine_SkeletonData_getImagesPath); + oluacls_func(L, "getName", _olua_fun_spine_SkeletonData_getName); + oluacls_func(L, "getPathConstraints", _olua_fun_spine_SkeletonData_getPathConstraints); + oluacls_func(L, "getPhysicsConstraints", _olua_fun_spine_SkeletonData_getPhysicsConstraints); + oluacls_func(L, "getReferenceScale", _olua_fun_spine_SkeletonData_getReferenceScale); + oluacls_func(L, "getSkins", _olua_fun_spine_SkeletonData_getSkins); + oluacls_func(L, "getSlots", _olua_fun_spine_SkeletonData_getSlots); + oluacls_func(L, "getTransformConstraints", _olua_fun_spine_SkeletonData_getTransformConstraints); + oluacls_func(L, "getVersion", _olua_fun_spine_SkeletonData_getVersion); + oluacls_func(L, "getWidth", _olua_fun_spine_SkeletonData_getWidth); + oluacls_func(L, "getX", _olua_fun_spine_SkeletonData_getX); + oluacls_func(L, "getY", _olua_fun_spine_SkeletonData_getY); + oluacls_func(L, "setAudioPath", _olua_fun_spine_SkeletonData_setAudioPath); + oluacls_func(L, "setDefaultSkin", _olua_fun_spine_SkeletonData_setDefaultSkin); + oluacls_func(L, "setFps", _olua_fun_spine_SkeletonData_setFps); + oluacls_func(L, "setHash", _olua_fun_spine_SkeletonData_setHash); + oluacls_func(L, "setHeight", _olua_fun_spine_SkeletonData_setHeight); + oluacls_func(L, "setImagesPath", _olua_fun_spine_SkeletonData_setImagesPath); + oluacls_func(L, "setName", _olua_fun_spine_SkeletonData_setName); + oluacls_func(L, "setReferenceScale", _olua_fun_spine_SkeletonData_setReferenceScale); + oluacls_func(L, "setVersion", _olua_fun_spine_SkeletonData_setVersion); + oluacls_func(L, "setWidth", _olua_fun_spine_SkeletonData_setWidth); + oluacls_func(L, "setX", _olua_fun_spine_SkeletonData_setX); + oluacls_func(L, "setY", _olua_fun_spine_SkeletonData_setY); + oluacls_prop(L, "animations", _olua_fun_spine_SkeletonData_getAnimations, nullptr); + oluacls_prop(L, "audioPath", _olua_fun_spine_SkeletonData_getAudioPath, _olua_fun_spine_SkeletonData_setAudioPath); + oluacls_prop(L, "bones", _olua_fun_spine_SkeletonData_getBones, nullptr); + oluacls_prop(L, "defaultSkin", _olua_fun_spine_SkeletonData_getDefaultSkin, _olua_fun_spine_SkeletonData_setDefaultSkin); + oluacls_prop(L, "events", _olua_fun_spine_SkeletonData_getEvents, nullptr); + oluacls_prop(L, "fps", _olua_fun_spine_SkeletonData_getFps, _olua_fun_spine_SkeletonData_setFps); + oluacls_prop(L, "hash", _olua_fun_spine_SkeletonData_getHash, _olua_fun_spine_SkeletonData_setHash); + oluacls_prop(L, "height", _olua_fun_spine_SkeletonData_getHeight, _olua_fun_spine_SkeletonData_setHeight); + oluacls_prop(L, "ikConstraints", _olua_fun_spine_SkeletonData_getIkConstraints, nullptr); + oluacls_prop(L, "imagesPath", _olua_fun_spine_SkeletonData_getImagesPath, _olua_fun_spine_SkeletonData_setImagesPath); + oluacls_prop(L, "name", _olua_fun_spine_SkeletonData_getName, _olua_fun_spine_SkeletonData_setName); + oluacls_prop(L, "pathConstraints", _olua_fun_spine_SkeletonData_getPathConstraints, nullptr); + oluacls_prop(L, "physicsConstraints", _olua_fun_spine_SkeletonData_getPhysicsConstraints, nullptr); + oluacls_prop(L, "referenceScale", _olua_fun_spine_SkeletonData_getReferenceScale, _olua_fun_spine_SkeletonData_setReferenceScale); + oluacls_prop(L, "skins", _olua_fun_spine_SkeletonData_getSkins, nullptr); + oluacls_prop(L, "slots", _olua_fun_spine_SkeletonData_getSlots, nullptr); + oluacls_prop(L, "transformConstraints", _olua_fun_spine_SkeletonData_getTransformConstraints, nullptr); + oluacls_prop(L, "version", _olua_fun_spine_SkeletonData_getVersion, _olua_fun_spine_SkeletonData_setVersion); + oluacls_prop(L, "width", _olua_fun_spine_SkeletonData_getWidth, _olua_fun_spine_SkeletonData_setWidth); + oluacls_prop(L, "x", _olua_fun_spine_SkeletonData_getX, _olua_fun_spine_SkeletonData_setX); + oluacls_prop(L, "y", _olua_fun_spine_SkeletonData_getY, _olua_fun_spine_SkeletonData_setY); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_spine_SkeletonData(lua_State *L) +{ + olua_require(L, "spine", luaopen_spine); + if (!olua_getclass(L, "spine.SkeletonData")) { + luaL_error(L, "class not found: spine::SkeletonData"); + } return 1; } OLUA_END_DECLS -static int _spine_Skeleton_findBone(lua_State *L) +static int _olua_fun_spine_Skeleton_findBone(lua_State *L) { olua_startinvoke(L); @@ -14262,7 +15220,7 @@ static int _spine_Skeleton_findBone(lua_State *L) return num_ret; } -static int _spine_Skeleton_findIkConstraint(lua_State *L) +static int _olua_fun_spine_Skeleton_findIkConstraint(lua_State *L) { olua_startinvoke(L); @@ -14281,7 +15239,7 @@ static int _spine_Skeleton_findIkConstraint(lua_State *L) return num_ret; } -static int _spine_Skeleton_findPathConstraint(lua_State *L) +static int _olua_fun_spine_Skeleton_findPathConstraint(lua_State *L) { olua_startinvoke(L); @@ -14300,7 +15258,7 @@ static int _spine_Skeleton_findPathConstraint(lua_State *L) return num_ret; } -static int _spine_Skeleton_findPhysicsConstraint(lua_State *L) +static int _olua_fun_spine_Skeleton_findPhysicsConstraint(lua_State *L) { olua_startinvoke(L); @@ -14319,7 +15277,7 @@ static int _spine_Skeleton_findPhysicsConstraint(lua_State *L) return num_ret; } -static int _spine_Skeleton_findSlot(lua_State *L) +static int _olua_fun_spine_Skeleton_findSlot(lua_State *L) { olua_startinvoke(L); @@ -14338,7 +15296,7 @@ static int _spine_Skeleton_findSlot(lua_State *L) return num_ret; } -static int _spine_Skeleton_findTransformConstraint(lua_State *L) +static int _olua_fun_spine_Skeleton_findTransformConstraint(lua_State *L) { olua_startinvoke(L); @@ -14357,7 +15315,7 @@ static int _spine_Skeleton_findTransformConstraint(lua_State *L) return num_ret; } -static int _spine_Skeleton_getAttachment$1(lua_State *L) +static int _olua_fun_spine_Skeleton_getAttachment$1(lua_State *L) { olua_startinvoke(L); @@ -14378,7 +15336,7 @@ static int _spine_Skeleton_getAttachment$1(lua_State *L) return num_ret; } -static int _spine_Skeleton_getAttachment$2(lua_State *L) +static int _olua_fun_spine_Skeleton_getAttachment$2(lua_State *L) { olua_startinvoke(L); @@ -14399,19 +15357,19 @@ static int _spine_Skeleton_getAttachment$2(lua_State *L) return num_ret; } -static int _spine_Skeleton_getAttachment(lua_State *L) +static int _olua_fun_spine_Skeleton_getAttachment(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 2) { if ((olua_is_string(L, 2)) && (olua_is_string(L, 3))) { // spine::Attachment *getAttachment(const spine::String &slotName, const spine::String &attachmentName) - return _spine_Skeleton_getAttachment$1(L); + return _olua_fun_spine_Skeleton_getAttachment$1(L); } // if ((olua_is_integer(L, 2)) && (olua_is_string(L, 3))) { // spine::Attachment *getAttachment(int slotIndex, const spine::String &attachmentName) - return _spine_Skeleton_getAttachment$2(L); + return _olua_fun_spine_Skeleton_getAttachment$2(L); // } } @@ -14420,7 +15378,7 @@ static int _spine_Skeleton_getAttachment(lua_State *L) return 0; } -static int _spine_Skeleton_getBones(lua_State *L) +static int _olua_fun_spine_Skeleton_getBones(lua_State *L) { olua_startinvoke(L); @@ -14439,7 +15397,7 @@ static int _spine_Skeleton_getBones(lua_State *L) return num_ret; } -static int _spine_Skeleton_getColor(lua_State *L) +static int _olua_fun_spine_Skeleton_getColor(lua_State *L) { olua_startinvoke(L); @@ -14456,7 +15414,7 @@ static int _spine_Skeleton_getColor(lua_State *L) return num_ret; } -static int _spine_Skeleton_getData(lua_State *L) +static int _olua_fun_spine_Skeleton_getData(lua_State *L) { olua_startinvoke(L); @@ -14473,7 +15431,7 @@ static int _spine_Skeleton_getData(lua_State *L) return num_ret; } -static int _spine_Skeleton_getDrawOrder(lua_State *L) +static int _olua_fun_spine_Skeleton_getDrawOrder(lua_State *L) { olua_startinvoke(L); @@ -14492,7 +15450,7 @@ static int _spine_Skeleton_getDrawOrder(lua_State *L) return num_ret; } -static int _spine_Skeleton_getIkConstraints(lua_State *L) +static int _olua_fun_spine_Skeleton_getIkConstraints(lua_State *L) { olua_startinvoke(L); @@ -14511,7 +15469,7 @@ static int _spine_Skeleton_getIkConstraints(lua_State *L) return num_ret; } -static int _spine_Skeleton_getPathConstraints(lua_State *L) +static int _olua_fun_spine_Skeleton_getPathConstraints(lua_State *L) { olua_startinvoke(L); @@ -14530,7 +15488,7 @@ static int _spine_Skeleton_getPathConstraints(lua_State *L) return num_ret; } -static int _spine_Skeleton_getPhysicsConstraints(lua_State *L) +static int _olua_fun_spine_Skeleton_getPhysicsConstraints(lua_State *L) { olua_startinvoke(L); @@ -14549,7 +15507,7 @@ static int _spine_Skeleton_getPhysicsConstraints(lua_State *L) return num_ret; } -static int _spine_Skeleton_getRootBone(lua_State *L) +static int _olua_fun_spine_Skeleton_getRootBone(lua_State *L) { olua_startinvoke(L); @@ -14566,7 +15524,7 @@ static int _spine_Skeleton_getRootBone(lua_State *L) return num_ret; } -static int _spine_Skeleton_getScaleX(lua_State *L) +static int _olua_fun_spine_Skeleton_getScaleX(lua_State *L) { olua_startinvoke(L); @@ -14583,7 +15541,7 @@ static int _spine_Skeleton_getScaleX(lua_State *L) return num_ret; } -static int _spine_Skeleton_getScaleY(lua_State *L) +static int _olua_fun_spine_Skeleton_getScaleY(lua_State *L) { olua_startinvoke(L); @@ -14600,7 +15558,7 @@ static int _spine_Skeleton_getScaleY(lua_State *L) return num_ret; } -static int _spine_Skeleton_getSkin(lua_State *L) +static int _olua_fun_spine_Skeleton_getSkin(lua_State *L) { olua_startinvoke(L); @@ -14617,7 +15575,7 @@ static int _spine_Skeleton_getSkin(lua_State *L) return num_ret; } -static int _spine_Skeleton_getSlots(lua_State *L) +static int _olua_fun_spine_Skeleton_getSlots(lua_State *L) { olua_startinvoke(L); @@ -14636,7 +15594,7 @@ static int _spine_Skeleton_getSlots(lua_State *L) return num_ret; } -static int _spine_Skeleton_getTime(lua_State *L) +static int _olua_fun_spine_Skeleton_getTime(lua_State *L) { olua_startinvoke(L); @@ -14653,7 +15611,7 @@ static int _spine_Skeleton_getTime(lua_State *L) return num_ret; } -static int _spine_Skeleton_getTransformConstraints(lua_State *L) +static int _olua_fun_spine_Skeleton_getTransformConstraints(lua_State *L) { olua_startinvoke(L); @@ -14672,7 +15630,7 @@ static int _spine_Skeleton_getTransformConstraints(lua_State *L) return num_ret; } -static int _spine_Skeleton_getUpdateCacheList(lua_State *L) +static int _olua_fun_spine_Skeleton_getUpdateCacheList(lua_State *L) { olua_startinvoke(L); @@ -14691,7 +15649,7 @@ static int _spine_Skeleton_getUpdateCacheList(lua_State *L) return num_ret; } -static int _spine_Skeleton_getX(lua_State *L) +static int _olua_fun_spine_Skeleton_getX(lua_State *L) { olua_startinvoke(L); @@ -14708,7 +15666,7 @@ static int _spine_Skeleton_getX(lua_State *L) return num_ret; } -static int _spine_Skeleton_getY(lua_State *L) +static int _olua_fun_spine_Skeleton_getY(lua_State *L) { olua_startinvoke(L); @@ -14725,7 +15683,7 @@ static int _spine_Skeleton_getY(lua_State *L) return num_ret; } -static int _spine_Skeleton_new(lua_State *L) +static int _olua_fun_spine_Skeleton_new(lua_State *L) { olua_startinvoke(L); @@ -14733,7 +15691,7 @@ static int _spine_Skeleton_new(lua_State *L) olua_check_object(L, 1, &arg1, "spine.SkeletonData"); - // Skeleton(spine::SkeletonData *skeletonData) + // spine::Skeleton(spine::SkeletonData *skeletonData) spine::Skeleton *ret = new spine::Skeleton(arg1); int num_ret = olua_push_object(L, ret, "spine.Skeleton"); olua_postnew(L, ret); @@ -14743,7 +15701,7 @@ static int _spine_Skeleton_new(lua_State *L) return num_ret; } -static int _spine_Skeleton_physicsRotate(lua_State *L) +static int _olua_fun_spine_Skeleton_physicsRotate(lua_State *L) { olua_startinvoke(L); @@ -14765,7 +15723,7 @@ static int _spine_Skeleton_physicsRotate(lua_State *L) return 0; } -static int _spine_Skeleton_physicsTranslate(lua_State *L) +static int _olua_fun_spine_Skeleton_physicsTranslate(lua_State *L) { olua_startinvoke(L); @@ -14785,7 +15743,7 @@ static int _spine_Skeleton_physicsTranslate(lua_State *L) return 0; } -static int _spine_Skeleton_printUpdateCache(lua_State *L) +static int _olua_fun_spine_Skeleton_printUpdateCache(lua_State *L) { olua_startinvoke(L); @@ -14801,7 +15759,7 @@ static int _spine_Skeleton_printUpdateCache(lua_State *L) return 0; } -static int _spine_Skeleton_setAttachment(lua_State *L) +static int _olua_fun_spine_Skeleton_setAttachment(lua_State *L) { olua_startinvoke(L); @@ -14821,7 +15779,7 @@ static int _spine_Skeleton_setAttachment(lua_State *L) return 0; } -static int _spine_Skeleton_setBonesToSetupPose(lua_State *L) +static int _olua_fun_spine_Skeleton_setBonesToSetupPose(lua_State *L) { olua_startinvoke(L); @@ -14837,7 +15795,7 @@ static int _spine_Skeleton_setBonesToSetupPose(lua_State *L) return 0; } -static int _spine_Skeleton_setPosition(lua_State *L) +static int _olua_fun_spine_Skeleton_setPosition(lua_State *L) { olua_startinvoke(L); @@ -14857,7 +15815,7 @@ static int _spine_Skeleton_setPosition(lua_State *L) return 0; } -static int _spine_Skeleton_setScaleX(lua_State *L) +static int _olua_fun_spine_Skeleton_setScaleX(lua_State *L) { olua_startinvoke(L); @@ -14875,7 +15833,7 @@ static int _spine_Skeleton_setScaleX(lua_State *L) return 0; } -static int _spine_Skeleton_setScaleY(lua_State *L) +static int _olua_fun_spine_Skeleton_setScaleY(lua_State *L) { olua_startinvoke(L); @@ -14893,7 +15851,7 @@ static int _spine_Skeleton_setScaleY(lua_State *L) return 0; } -static int _spine_Skeleton_setSkin$1(lua_State *L) +static int _olua_fun_spine_Skeleton_setSkin$1(lua_State *L) { olua_startinvoke(L); @@ -14911,7 +15869,7 @@ static int _spine_Skeleton_setSkin$1(lua_State *L) return 0; } -static int _spine_Skeleton_setSkin$2(lua_State *L) +static int _olua_fun_spine_Skeleton_setSkin$2(lua_State *L) { olua_startinvoke(L); @@ -14929,19 +15887,19 @@ static int _spine_Skeleton_setSkin$2(lua_State *L) return 0; } -static int _spine_Skeleton_setSkin(lua_State *L) +static int _olua_fun_spine_Skeleton_setSkin(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { if ((olua_is_string(L, 2))) { // void setSkin(const spine::String &skinName) - return _spine_Skeleton_setSkin$1(L); + return _olua_fun_spine_Skeleton_setSkin$1(L); } // if ((olua_is_object(L, 2, "spine.Skin"))) { // void setSkin(spine::Skin *newSkin) - return _spine_Skeleton_setSkin$2(L); + return _olua_fun_spine_Skeleton_setSkin$2(L); // } } @@ -14950,7 +15908,7 @@ static int _spine_Skeleton_setSkin(lua_State *L) return 0; } -static int _spine_Skeleton_setSlotsToSetupPose(lua_State *L) +static int _olua_fun_spine_Skeleton_setSlotsToSetupPose(lua_State *L) { olua_startinvoke(L); @@ -14966,7 +15924,7 @@ static int _spine_Skeleton_setSlotsToSetupPose(lua_State *L) return 0; } -static int _spine_Skeleton_setTime(lua_State *L) +static int _olua_fun_spine_Skeleton_setTime(lua_State *L) { olua_startinvoke(L); @@ -14984,7 +15942,7 @@ static int _spine_Skeleton_setTime(lua_State *L) return 0; } -static int _spine_Skeleton_setToSetupPose(lua_State *L) +static int _olua_fun_spine_Skeleton_setToSetupPose(lua_State *L) { olua_startinvoke(L); @@ -15000,7 +15958,7 @@ static int _spine_Skeleton_setToSetupPose(lua_State *L) return 0; } -static int _spine_Skeleton_setX(lua_State *L) +static int _olua_fun_spine_Skeleton_setX(lua_State *L) { olua_startinvoke(L); @@ -15018,7 +15976,7 @@ static int _spine_Skeleton_setX(lua_State *L) return 0; } -static int _spine_Skeleton_setY(lua_State *L) +static int _olua_fun_spine_Skeleton_setY(lua_State *L) { olua_startinvoke(L); @@ -15036,7 +15994,7 @@ static int _spine_Skeleton_setY(lua_State *L) return 0; } -static int _spine_Skeleton_update(lua_State *L) +static int _olua_fun_spine_Skeleton_update(lua_State *L) { olua_startinvoke(L); @@ -15054,7 +16012,7 @@ static int _spine_Skeleton_update(lua_State *L) return 0; } -static int _spine_Skeleton_updateCache(lua_State *L) +static int _olua_fun_spine_Skeleton_updateCache(lua_State *L) { olua_startinvoke(L); @@ -15070,7 +16028,7 @@ static int _spine_Skeleton_updateCache(lua_State *L) return 0; } -static int _spine_Skeleton_updateWorldTransform$1(lua_State *L) +static int _olua_fun_spine_Skeleton_updateWorldTransform$1(lua_State *L) { olua_startinvoke(L); @@ -15088,7 +16046,7 @@ static int _spine_Skeleton_updateWorldTransform$1(lua_State *L) return 0; } -static int _spine_Skeleton_updateWorldTransform$2(lua_State *L) +static int _olua_fun_spine_Skeleton_updateWorldTransform$2(lua_State *L) { olua_startinvoke(L); @@ -15108,21 +16066,21 @@ static int _spine_Skeleton_updateWorldTransform$2(lua_State *L) return 0; } -static int _spine_Skeleton_updateWorldTransform(lua_State *L) +static int _olua_fun_spine_Skeleton_updateWorldTransform(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_enum(L, 2))) { // void updateWorldTransform(spine::Physics physics) - return _spine_Skeleton_updateWorldTransform$1(L); + return _olua_fun_spine_Skeleton_updateWorldTransform$1(L); // } } if (num_args == 2) { // if ((olua_is_enum(L, 2)) && (olua_is_object(L, 3, "spine.Bone"))) { // void updateWorldTransform(spine::Physics physics, spine::Bone *parent) - return _spine_Skeleton_updateWorldTransform$2(L); + return _olua_fun_spine_Skeleton_updateWorldTransform$2(L); // } } @@ -15131,75 +16089,84 @@ static int _spine_Skeleton_updateWorldTransform(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_spine_Skeleton(lua_State *L) +static int _olua_cls_spine_Skeleton(lua_State *L) { oluacls_class(L, "spine.Skeleton"); - oluacls_func(L, "findBone", _spine_Skeleton_findBone); - oluacls_func(L, "findIkConstraint", _spine_Skeleton_findIkConstraint); - oluacls_func(L, "findPathConstraint", _spine_Skeleton_findPathConstraint); - oluacls_func(L, "findPhysicsConstraint", _spine_Skeleton_findPhysicsConstraint); - oluacls_func(L, "findSlot", _spine_Skeleton_findSlot); - oluacls_func(L, "findTransformConstraint", _spine_Skeleton_findTransformConstraint); - oluacls_func(L, "getAttachment", _spine_Skeleton_getAttachment); - oluacls_func(L, "getBones", _spine_Skeleton_getBones); - oluacls_func(L, "getColor", _spine_Skeleton_getColor); - oluacls_func(L, "getData", _spine_Skeleton_getData); - oluacls_func(L, "getDrawOrder", _spine_Skeleton_getDrawOrder); - oluacls_func(L, "getIkConstraints", _spine_Skeleton_getIkConstraints); - oluacls_func(L, "getPathConstraints", _spine_Skeleton_getPathConstraints); - oluacls_func(L, "getPhysicsConstraints", _spine_Skeleton_getPhysicsConstraints); - oluacls_func(L, "getRootBone", _spine_Skeleton_getRootBone); - oluacls_func(L, "getScaleX", _spine_Skeleton_getScaleX); - oluacls_func(L, "getScaleY", _spine_Skeleton_getScaleY); - oluacls_func(L, "getSkin", _spine_Skeleton_getSkin); - oluacls_func(L, "getSlots", _spine_Skeleton_getSlots); - oluacls_func(L, "getTime", _spine_Skeleton_getTime); - oluacls_func(L, "getTransformConstraints", _spine_Skeleton_getTransformConstraints); - oluacls_func(L, "getUpdateCacheList", _spine_Skeleton_getUpdateCacheList); - oluacls_func(L, "getX", _spine_Skeleton_getX); - oluacls_func(L, "getY", _spine_Skeleton_getY); - oluacls_func(L, "new", _spine_Skeleton_new); - oluacls_func(L, "physicsRotate", _spine_Skeleton_physicsRotate); - oluacls_func(L, "physicsTranslate", _spine_Skeleton_physicsTranslate); - oluacls_func(L, "printUpdateCache", _spine_Skeleton_printUpdateCache); - oluacls_func(L, "setAttachment", _spine_Skeleton_setAttachment); - oluacls_func(L, "setBonesToSetupPose", _spine_Skeleton_setBonesToSetupPose); - oluacls_func(L, "setPosition", _spine_Skeleton_setPosition); - oluacls_func(L, "setScaleX", _spine_Skeleton_setScaleX); - oluacls_func(L, "setScaleY", _spine_Skeleton_setScaleY); - oluacls_func(L, "setSkin", _spine_Skeleton_setSkin); - oluacls_func(L, "setSlotsToSetupPose", _spine_Skeleton_setSlotsToSetupPose); - oluacls_func(L, "setTime", _spine_Skeleton_setTime); - oluacls_func(L, "setToSetupPose", _spine_Skeleton_setToSetupPose); - oluacls_func(L, "setX", _spine_Skeleton_setX); - oluacls_func(L, "setY", _spine_Skeleton_setY); - oluacls_func(L, "update", _spine_Skeleton_update); - oluacls_func(L, "updateCache", _spine_Skeleton_updateCache); - oluacls_func(L, "updateWorldTransform", _spine_Skeleton_updateWorldTransform); - oluacls_prop(L, "bones", _spine_Skeleton_getBones, nullptr); - oluacls_prop(L, "color", _spine_Skeleton_getColor, nullptr); - oluacls_prop(L, "data", _spine_Skeleton_getData, nullptr); - oluacls_prop(L, "drawOrder", _spine_Skeleton_getDrawOrder, nullptr); - oluacls_prop(L, "ikConstraints", _spine_Skeleton_getIkConstraints, nullptr); - oluacls_prop(L, "pathConstraints", _spine_Skeleton_getPathConstraints, nullptr); - oluacls_prop(L, "physicsConstraints", _spine_Skeleton_getPhysicsConstraints, nullptr); - oluacls_prop(L, "rootBone", _spine_Skeleton_getRootBone, nullptr); - oluacls_prop(L, "scaleX", _spine_Skeleton_getScaleX, _spine_Skeleton_setScaleX); - oluacls_prop(L, "scaleY", _spine_Skeleton_getScaleY, _spine_Skeleton_setScaleY); - oluacls_prop(L, "skin", _spine_Skeleton_getSkin, _spine_Skeleton_setSkin); - oluacls_prop(L, "slots", _spine_Skeleton_getSlots, nullptr); - oluacls_prop(L, "time", _spine_Skeleton_getTime, _spine_Skeleton_setTime); - oluacls_prop(L, "transformConstraints", _spine_Skeleton_getTransformConstraints, nullptr); - oluacls_prop(L, "updateCacheList", _spine_Skeleton_getUpdateCacheList, nullptr); - oluacls_prop(L, "x", _spine_Skeleton_getX, _spine_Skeleton_setX); - oluacls_prop(L, "y", _spine_Skeleton_getY, _spine_Skeleton_setY); + oluacls_func(L, "findBone", _olua_fun_spine_Skeleton_findBone); + oluacls_func(L, "findIkConstraint", _olua_fun_spine_Skeleton_findIkConstraint); + oluacls_func(L, "findPathConstraint", _olua_fun_spine_Skeleton_findPathConstraint); + oluacls_func(L, "findPhysicsConstraint", _olua_fun_spine_Skeleton_findPhysicsConstraint); + oluacls_func(L, "findSlot", _olua_fun_spine_Skeleton_findSlot); + oluacls_func(L, "findTransformConstraint", _olua_fun_spine_Skeleton_findTransformConstraint); + oluacls_func(L, "getAttachment", _olua_fun_spine_Skeleton_getAttachment); + oluacls_func(L, "getBones", _olua_fun_spine_Skeleton_getBones); + oluacls_func(L, "getColor", _olua_fun_spine_Skeleton_getColor); + oluacls_func(L, "getData", _olua_fun_spine_Skeleton_getData); + oluacls_func(L, "getDrawOrder", _olua_fun_spine_Skeleton_getDrawOrder); + oluacls_func(L, "getIkConstraints", _olua_fun_spine_Skeleton_getIkConstraints); + oluacls_func(L, "getPathConstraints", _olua_fun_spine_Skeleton_getPathConstraints); + oluacls_func(L, "getPhysicsConstraints", _olua_fun_spine_Skeleton_getPhysicsConstraints); + oluacls_func(L, "getRootBone", _olua_fun_spine_Skeleton_getRootBone); + oluacls_func(L, "getScaleX", _olua_fun_spine_Skeleton_getScaleX); + oluacls_func(L, "getScaleY", _olua_fun_spine_Skeleton_getScaleY); + oluacls_func(L, "getSkin", _olua_fun_spine_Skeleton_getSkin); + oluacls_func(L, "getSlots", _olua_fun_spine_Skeleton_getSlots); + oluacls_func(L, "getTime", _olua_fun_spine_Skeleton_getTime); + oluacls_func(L, "getTransformConstraints", _olua_fun_spine_Skeleton_getTransformConstraints); + oluacls_func(L, "getUpdateCacheList", _olua_fun_spine_Skeleton_getUpdateCacheList); + oluacls_func(L, "getX", _olua_fun_spine_Skeleton_getX); + oluacls_func(L, "getY", _olua_fun_spine_Skeleton_getY); + oluacls_func(L, "new", _olua_fun_spine_Skeleton_new); + oluacls_func(L, "physicsRotate", _olua_fun_spine_Skeleton_physicsRotate); + oluacls_func(L, "physicsTranslate", _olua_fun_spine_Skeleton_physicsTranslate); + oluacls_func(L, "printUpdateCache", _olua_fun_spine_Skeleton_printUpdateCache); + oluacls_func(L, "setAttachment", _olua_fun_spine_Skeleton_setAttachment); + oluacls_func(L, "setBonesToSetupPose", _olua_fun_spine_Skeleton_setBonesToSetupPose); + oluacls_func(L, "setPosition", _olua_fun_spine_Skeleton_setPosition); + oluacls_func(L, "setScaleX", _olua_fun_spine_Skeleton_setScaleX); + oluacls_func(L, "setScaleY", _olua_fun_spine_Skeleton_setScaleY); + oluacls_func(L, "setSkin", _olua_fun_spine_Skeleton_setSkin); + oluacls_func(L, "setSlotsToSetupPose", _olua_fun_spine_Skeleton_setSlotsToSetupPose); + oluacls_func(L, "setTime", _olua_fun_spine_Skeleton_setTime); + oluacls_func(L, "setToSetupPose", _olua_fun_spine_Skeleton_setToSetupPose); + oluacls_func(L, "setX", _olua_fun_spine_Skeleton_setX); + oluacls_func(L, "setY", _olua_fun_spine_Skeleton_setY); + oluacls_func(L, "update", _olua_fun_spine_Skeleton_update); + oluacls_func(L, "updateCache", _olua_fun_spine_Skeleton_updateCache); + oluacls_func(L, "updateWorldTransform", _olua_fun_spine_Skeleton_updateWorldTransform); + oluacls_prop(L, "bones", _olua_fun_spine_Skeleton_getBones, nullptr); + oluacls_prop(L, "color", _olua_fun_spine_Skeleton_getColor, nullptr); + oluacls_prop(L, "data", _olua_fun_spine_Skeleton_getData, nullptr); + oluacls_prop(L, "drawOrder", _olua_fun_spine_Skeleton_getDrawOrder, nullptr); + oluacls_prop(L, "ikConstraints", _olua_fun_spine_Skeleton_getIkConstraints, nullptr); + oluacls_prop(L, "pathConstraints", _olua_fun_spine_Skeleton_getPathConstraints, nullptr); + oluacls_prop(L, "physicsConstraints", _olua_fun_spine_Skeleton_getPhysicsConstraints, nullptr); + oluacls_prop(L, "rootBone", _olua_fun_spine_Skeleton_getRootBone, nullptr); + oluacls_prop(L, "scaleX", _olua_fun_spine_Skeleton_getScaleX, _olua_fun_spine_Skeleton_setScaleX); + oluacls_prop(L, "scaleY", _olua_fun_spine_Skeleton_getScaleY, _olua_fun_spine_Skeleton_setScaleY); + oluacls_prop(L, "skin", _olua_fun_spine_Skeleton_getSkin, nullptr); + oluacls_prop(L, "slots", _olua_fun_spine_Skeleton_getSlots, nullptr); + oluacls_prop(L, "time", _olua_fun_spine_Skeleton_getTime, _olua_fun_spine_Skeleton_setTime); + oluacls_prop(L, "transformConstraints", _olua_fun_spine_Skeleton_getTransformConstraints, nullptr); + oluacls_prop(L, "updateCacheList", _olua_fun_spine_Skeleton_getUpdateCacheList, nullptr); + oluacls_prop(L, "x", _olua_fun_spine_Skeleton_getX, _olua_fun_spine_Skeleton_setX); + oluacls_prop(L, "y", _olua_fun_spine_Skeleton_getY, _olua_fun_spine_Skeleton_setY); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_spine_Skeleton(lua_State *L) +{ + olua_require(L, "spine", luaopen_spine); + if (!olua_getclass(L, "spine.Skeleton")) { + luaL_error(L, "class not found: spine::Skeleton"); + } + return 1; +} OLUA_END_DECLS -static int _spine_SkeletonRenderer_as(lua_State *L) +static int _olua_fun_spine_SkeletonRenderer_as(lua_State *L) { olua_startinvoke(L); @@ -15227,7 +16194,7 @@ static int _spine_SkeletonRenderer_as(lua_State *L) return 1; } -static int _spine_SkeletonRenderer_create(lua_State *L) +static int _olua_fun_spine_SkeletonRenderer_create(lua_State *L) { olua_startinvoke(L); @@ -15240,7 +16207,7 @@ static int _spine_SkeletonRenderer_create(lua_State *L) return num_ret; } -static int _spine_SkeletonRenderer_createWithData$1(lua_State *L) +static int _olua_fun_spine_SkeletonRenderer_createWithData$1(lua_State *L) { olua_startinvoke(L); @@ -15262,7 +16229,7 @@ static int _spine_SkeletonRenderer_createWithData$1(lua_State *L) return num_ret; } -static int _spine_SkeletonRenderer_createWithData$2(lua_State *L) +static int _olua_fun_spine_SkeletonRenderer_createWithData$2(lua_State *L) { olua_startinvoke(L); @@ -15270,7 +16237,7 @@ static int _spine_SkeletonRenderer_createWithData$2(lua_State *L) olua_check_object(L, 1, &arg1, "spine.SkeletonData"); - // static spine::SkeletonRenderer *createWithData(@addref(skeletonData ^) spine::SkeletonData *skeletonData, @optional bool ownsSkeletonData) + // static spine::SkeletonRenderer *createWithData(@addref(skeletonData ^) spine::SkeletonData *skeletonData) spine::SkeletonRenderer *ret = spine::SkeletonRenderer::createWithData(arg1); int num_ret = olua_push_object(L, ret, "spine.SkeletonRenderer"); @@ -15282,21 +16249,21 @@ static int _spine_SkeletonRenderer_createWithData$2(lua_State *L) return num_ret; } -static int _spine_SkeletonRenderer_createWithData(lua_State *L) +static int _olua_fun_spine_SkeletonRenderer_createWithData(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 1) { // if ((olua_is_object(L, 1, "spine.SkeletonData"))) { - // static spine::SkeletonRenderer *createWithData(@addref(skeletonData ^) spine::SkeletonData *skeletonData, @optional bool ownsSkeletonData) - return _spine_SkeletonRenderer_createWithData$2(L); + // static spine::SkeletonRenderer *createWithData(@addref(skeletonData ^) spine::SkeletonData *skeletonData) + return _olua_fun_spine_SkeletonRenderer_createWithData$2(L); // } } if (num_args == 2) { // if ((olua_is_object(L, 1, "spine.SkeletonData")) && (olua_is_bool(L, 2))) { // static spine::SkeletonRenderer *createWithData(@addref(skeletonData ^) spine::SkeletonData *skeletonData, @optional bool ownsSkeletonData) - return _spine_SkeletonRenderer_createWithData$1(L); + return _olua_fun_spine_SkeletonRenderer_createWithData$1(L); // } } @@ -15305,7 +16272,7 @@ static int _spine_SkeletonRenderer_createWithData(lua_State *L) return 0; } -static int _spine_SkeletonRenderer_createWithFile$1(lua_State *L) +static int _olua_fun_spine_SkeletonRenderer_createWithFile$1(lua_State *L) { olua_startinvoke(L); @@ -15326,20 +16293,18 @@ static int _spine_SkeletonRenderer_createWithFile$1(lua_State *L) return num_ret; } -static int _spine_SkeletonRenderer_createWithFile$2(lua_State *L) +static int _olua_fun_spine_SkeletonRenderer_createWithFile$2(lua_State *L) { olua_startinvoke(L); std::string arg1; /** skeletonDataFile */ - std::string arg2; /** atlasFile */ - float arg3 = 0; /** scale */ + spine::Atlas *arg2 = nullptr; /** atlas */ olua_check_string(L, 1, &arg1); - olua_check_string(L, 2, &arg2); - olua_check_number(L, 3, &arg3); + olua_check_object(L, 2, &arg2, "spine.Atlas"); - // static spine::SkeletonRenderer *createWithFile(const std::string &skeletonDataFile, const std::string &atlasFile, @optional float scale) - spine::SkeletonRenderer *ret = spine::SkeletonRenderer::createWithFile(arg1, arg2, arg3); + // static spine::SkeletonRenderer *createWithFile(const std::string &skeletonDataFile, spine::Atlas *atlas) + spine::SkeletonRenderer *ret = spine::SkeletonRenderer::createWithFile(arg1, arg2); int num_ret = olua_push_object(L, ret, "spine.SkeletonRenderer"); olua_endinvoke(L); @@ -15347,18 +16312,20 @@ static int _spine_SkeletonRenderer_createWithFile$2(lua_State *L) return num_ret; } -static int _spine_SkeletonRenderer_createWithFile$3(lua_State *L) +static int _olua_fun_spine_SkeletonRenderer_createWithFile$3(lua_State *L) { olua_startinvoke(L); std::string arg1; /** skeletonDataFile */ - spine::Atlas *arg2 = nullptr; /** atlas */ + std::string arg2; /** atlasFile */ + float arg3 = 0; /** scale */ olua_check_string(L, 1, &arg1); - olua_check_object(L, 2, &arg2, "spine.Atlas"); + olua_check_string(L, 2, &arg2); + olua_check_number(L, 3, &arg3); - // static spine::SkeletonRenderer *createWithFile(const std::string &skeletonDataFile, spine::Atlas *atlas, @optional float scale) - spine::SkeletonRenderer *ret = spine::SkeletonRenderer::createWithFile(arg1, arg2); + // static spine::SkeletonRenderer *createWithFile(const std::string &skeletonDataFile, const std::string &atlasFile, @optional float scale) + spine::SkeletonRenderer *ret = spine::SkeletonRenderer::createWithFile(arg1, arg2, arg3); int num_ret = olua_push_object(L, ret, "spine.SkeletonRenderer"); olua_endinvoke(L); @@ -15366,7 +16333,7 @@ static int _spine_SkeletonRenderer_createWithFile$3(lua_State *L) return num_ret; } -static int _spine_SkeletonRenderer_createWithFile$4(lua_State *L) +static int _olua_fun_spine_SkeletonRenderer_createWithFile$4(lua_State *L) { olua_startinvoke(L); @@ -15376,7 +16343,7 @@ static int _spine_SkeletonRenderer_createWithFile$4(lua_State *L) olua_check_string(L, 1, &arg1); olua_check_string(L, 2, &arg2); - // static spine::SkeletonRenderer *createWithFile(const std::string &skeletonDataFile, const std::string &atlasFile, @optional float scale) + // static spine::SkeletonRenderer *createWithFile(const std::string &skeletonDataFile, const std::string &atlasFile) spine::SkeletonRenderer *ret = spine::SkeletonRenderer::createWithFile(arg1, arg2); int num_ret = olua_push_object(L, ret, "spine.SkeletonRenderer"); @@ -15385,31 +16352,31 @@ static int _spine_SkeletonRenderer_createWithFile$4(lua_State *L) return num_ret; } -static int _spine_SkeletonRenderer_createWithFile(lua_State *L) +static int _olua_fun_spine_SkeletonRenderer_createWithFile(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 2) { if ((olua_is_string(L, 1)) && (olua_is_object(L, 2, "spine.Atlas"))) { - // static spine::SkeletonRenderer *createWithFile(const std::string &skeletonDataFile, spine::Atlas *atlas, @optional float scale) - return _spine_SkeletonRenderer_createWithFile$3(L); + // static spine::SkeletonRenderer *createWithFile(const std::string &skeletonDataFile, spine::Atlas *atlas) + return _olua_fun_spine_SkeletonRenderer_createWithFile$2(L); } // if ((olua_is_string(L, 1)) && (olua_is_string(L, 2))) { - // static spine::SkeletonRenderer *createWithFile(const std::string &skeletonDataFile, const std::string &atlasFile, @optional float scale) - return _spine_SkeletonRenderer_createWithFile$4(L); + // static spine::SkeletonRenderer *createWithFile(const std::string &skeletonDataFile, const std::string &atlasFile) + return _olua_fun_spine_SkeletonRenderer_createWithFile$4(L); // } } if (num_args == 3) { if ((olua_is_string(L, 1)) && (olua_is_object(L, 2, "spine.Atlas")) && (olua_is_number(L, 3))) { // static spine::SkeletonRenderer *createWithFile(const std::string &skeletonDataFile, spine::Atlas *atlas, @optional float scale) - return _spine_SkeletonRenderer_createWithFile$1(L); + return _olua_fun_spine_SkeletonRenderer_createWithFile$1(L); } // if ((olua_is_string(L, 1)) && (olua_is_string(L, 2)) && (olua_is_number(L, 3))) { // static spine::SkeletonRenderer *createWithFile(const std::string &skeletonDataFile, const std::string &atlasFile, @optional float scale) - return _spine_SkeletonRenderer_createWithFile$2(L); + return _olua_fun_spine_SkeletonRenderer_createWithFile$3(L); // } } @@ -15418,7 +16385,7 @@ static int _spine_SkeletonRenderer_createWithFile(lua_State *L) return 0; } -static int _spine_SkeletonRenderer_createWithSkeleton$1(lua_State *L) +static int _olua_fun_spine_SkeletonRenderer_createWithSkeleton$1(lua_State *L) { olua_startinvoke(L); @@ -15439,7 +16406,7 @@ static int _spine_SkeletonRenderer_createWithSkeleton$1(lua_State *L) return num_ret; } -static int _spine_SkeletonRenderer_createWithSkeleton$2(lua_State *L) +static int _olua_fun_spine_SkeletonRenderer_createWithSkeleton$2(lua_State *L) { olua_startinvoke(L); @@ -15447,7 +16414,7 @@ static int _spine_SkeletonRenderer_createWithSkeleton$2(lua_State *L) olua_check_object(L, 1, &arg1, "spine.Skeleton"); - // static spine::SkeletonRenderer *createWithSkeleton(spine::Skeleton *skeleton, @optional bool ownsSkeleton, @optional bool ownsSkeletonData) + // static spine::SkeletonRenderer *createWithSkeleton(spine::Skeleton *skeleton) spine::SkeletonRenderer *ret = spine::SkeletonRenderer::createWithSkeleton(arg1); int num_ret = olua_push_object(L, ret, "spine.SkeletonRenderer"); @@ -15456,7 +16423,7 @@ static int _spine_SkeletonRenderer_createWithSkeleton$2(lua_State *L) return num_ret; } -static int _spine_SkeletonRenderer_createWithSkeleton$3(lua_State *L) +static int _olua_fun_spine_SkeletonRenderer_createWithSkeleton$3(lua_State *L) { olua_startinvoke(L); @@ -15466,7 +16433,7 @@ static int _spine_SkeletonRenderer_createWithSkeleton$3(lua_State *L) olua_check_object(L, 1, &arg1, "spine.Skeleton"); olua_check_bool(L, 2, &arg2); - // static spine::SkeletonRenderer *createWithSkeleton(spine::Skeleton *skeleton, @optional bool ownsSkeleton, @optional bool ownsSkeletonData) + // static spine::SkeletonRenderer *createWithSkeleton(spine::Skeleton *skeleton, @optional bool ownsSkeleton) spine::SkeletonRenderer *ret = spine::SkeletonRenderer::createWithSkeleton(arg1, arg2); int num_ret = olua_push_object(L, ret, "spine.SkeletonRenderer"); @@ -15475,28 +16442,28 @@ static int _spine_SkeletonRenderer_createWithSkeleton$3(lua_State *L) return num_ret; } -static int _spine_SkeletonRenderer_createWithSkeleton(lua_State *L) +static int _olua_fun_spine_SkeletonRenderer_createWithSkeleton(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 1) { // if ((olua_is_object(L, 1, "spine.Skeleton"))) { - // static spine::SkeletonRenderer *createWithSkeleton(spine::Skeleton *skeleton, @optional bool ownsSkeleton, @optional bool ownsSkeletonData) - return _spine_SkeletonRenderer_createWithSkeleton$2(L); + // static spine::SkeletonRenderer *createWithSkeleton(spine::Skeleton *skeleton) + return _olua_fun_spine_SkeletonRenderer_createWithSkeleton$2(L); // } } if (num_args == 2) { // if ((olua_is_object(L, 1, "spine.Skeleton")) && (olua_is_bool(L, 2))) { - // static spine::SkeletonRenderer *createWithSkeleton(spine::Skeleton *skeleton, @optional bool ownsSkeleton, @optional bool ownsSkeletonData) - return _spine_SkeletonRenderer_createWithSkeleton$3(L); + // static spine::SkeletonRenderer *createWithSkeleton(spine::Skeleton *skeleton, @optional bool ownsSkeleton) + return _olua_fun_spine_SkeletonRenderer_createWithSkeleton$3(L); // } } if (num_args == 3) { // if ((olua_is_object(L, 1, "spine.Skeleton")) && (olua_is_bool(L, 2)) && (olua_is_bool(L, 3))) { // static spine::SkeletonRenderer *createWithSkeleton(spine::Skeleton *skeleton, @optional bool ownsSkeleton, @optional bool ownsSkeletonData) - return _spine_SkeletonRenderer_createWithSkeleton$1(L); + return _olua_fun_spine_SkeletonRenderer_createWithSkeleton$1(L); // } } @@ -15505,7 +16472,7 @@ static int _spine_SkeletonRenderer_createWithSkeleton(lua_State *L) return 0; } -static int _spine_SkeletonRenderer_findBone(lua_State *L) +static int _olua_fun_spine_SkeletonRenderer_findBone(lua_State *L) { olua_startinvoke(L); @@ -15524,7 +16491,7 @@ static int _spine_SkeletonRenderer_findBone(lua_State *L) return num_ret; } -static int _spine_SkeletonRenderer_findSlot(lua_State *L) +static int _olua_fun_spine_SkeletonRenderer_findSlot(lua_State *L) { olua_startinvoke(L); @@ -15543,7 +16510,7 @@ static int _spine_SkeletonRenderer_findSlot(lua_State *L) return num_ret; } -static int _spine_SkeletonRenderer_getAttachment(lua_State *L) +static int _olua_fun_spine_SkeletonRenderer_getAttachment(lua_State *L) { olua_startinvoke(L); @@ -15564,7 +16531,7 @@ static int _spine_SkeletonRenderer_getAttachment(lua_State *L) return num_ret; } -static int _spine_SkeletonRenderer_getBlendFunc(lua_State *L) +static int _olua_fun_spine_SkeletonRenderer_getBlendFunc(lua_State *L) { olua_startinvoke(L); @@ -15581,7 +16548,7 @@ static int _spine_SkeletonRenderer_getBlendFunc(lua_State *L) return num_ret; } -static int _spine_SkeletonRenderer_getDebugBonesEnabled(lua_State *L) +static int _olua_fun_spine_SkeletonRenderer_getDebugBonesEnabled(lua_State *L) { olua_startinvoke(L); @@ -15598,7 +16565,7 @@ static int _spine_SkeletonRenderer_getDebugBonesEnabled(lua_State *L) return num_ret; } -static int _spine_SkeletonRenderer_getDebugBoundingRectEnabled(lua_State *L) +static int _olua_fun_spine_SkeletonRenderer_getDebugBoundingRectEnabled(lua_State *L) { olua_startinvoke(L); @@ -15615,7 +16582,7 @@ static int _spine_SkeletonRenderer_getDebugBoundingRectEnabled(lua_State *L) return num_ret; } -static int _spine_SkeletonRenderer_getDebugMeshesEnabled(lua_State *L) +static int _olua_fun_spine_SkeletonRenderer_getDebugMeshesEnabled(lua_State *L) { olua_startinvoke(L); @@ -15632,7 +16599,7 @@ static int _spine_SkeletonRenderer_getDebugMeshesEnabled(lua_State *L) return num_ret; } -static int _spine_SkeletonRenderer_getDebugSlotsEnabled(lua_State *L) +static int _olua_fun_spine_SkeletonRenderer_getDebugSlotsEnabled(lua_State *L) { olua_startinvoke(L); @@ -15649,7 +16616,7 @@ static int _spine_SkeletonRenderer_getDebugSlotsEnabled(lua_State *L) return num_ret; } -static int _spine_SkeletonRenderer_getSkeleton(lua_State *L) +static int _olua_fun_spine_SkeletonRenderer_getSkeleton(lua_State *L) { olua_startinvoke(L); @@ -15666,7 +16633,7 @@ static int _spine_SkeletonRenderer_getSkeleton(lua_State *L) return num_ret; } -static int _spine_SkeletonRenderer_getTimeScale(lua_State *L) +static int _olua_fun_spine_SkeletonRenderer_getTimeScale(lua_State *L) { olua_startinvoke(L); @@ -15683,7 +16650,7 @@ static int _spine_SkeletonRenderer_getTimeScale(lua_State *L) return num_ret; } -static int _spine_SkeletonRenderer_initWithBinaryFile$1(lua_State *L) +static int _olua_fun_spine_SkeletonRenderer_initWithBinaryFile$1(lua_State *L) { olua_startinvoke(L); @@ -15705,49 +16672,49 @@ static int _spine_SkeletonRenderer_initWithBinaryFile$1(lua_State *L) return 0; } -static int _spine_SkeletonRenderer_initWithBinaryFile$2(lua_State *L) +static int _olua_fun_spine_SkeletonRenderer_initWithBinaryFile$2(lua_State *L) { olua_startinvoke(L); spine::SkeletonRenderer *self = nullptr; std::string arg1; /** skeletonDataFile */ - std::string arg2; /** atlasFile */ - float arg3 = 0; /** scale */ + spine::Atlas *arg2 = nullptr; /** atlas */ olua_to_object(L, 1, &self, "spine.SkeletonRenderer"); olua_check_string(L, 2, &arg1); - olua_check_string(L, 3, &arg2); - olua_check_number(L, 4, &arg3); + olua_check_object(L, 3, &arg2, "spine.Atlas"); - // void initWithBinaryFile(const std::string &skeletonDataFile, const std::string &atlasFile, @optional float scale) - self->initWithBinaryFile(arg1, arg2, arg3); + // void initWithBinaryFile(const std::string &skeletonDataFile, spine::Atlas *atlas) + self->initWithBinaryFile(arg1, arg2); olua_endinvoke(L); return 0; } -static int _spine_SkeletonRenderer_initWithBinaryFile$3(lua_State *L) +static int _olua_fun_spine_SkeletonRenderer_initWithBinaryFile$3(lua_State *L) { olua_startinvoke(L); spine::SkeletonRenderer *self = nullptr; std::string arg1; /** skeletonDataFile */ - spine::Atlas *arg2 = nullptr; /** atlas */ + std::string arg2; /** atlasFile */ + float arg3 = 0; /** scale */ olua_to_object(L, 1, &self, "spine.SkeletonRenderer"); olua_check_string(L, 2, &arg1); - olua_check_object(L, 3, &arg2, "spine.Atlas"); + olua_check_string(L, 3, &arg2); + olua_check_number(L, 4, &arg3); - // void initWithBinaryFile(const std::string &skeletonDataFile, spine::Atlas *atlas, @optional float scale) - self->initWithBinaryFile(arg1, arg2); + // void initWithBinaryFile(const std::string &skeletonDataFile, const std::string &atlasFile, @optional float scale) + self->initWithBinaryFile(arg1, arg2, arg3); olua_endinvoke(L); return 0; } -static int _spine_SkeletonRenderer_initWithBinaryFile$4(lua_State *L) +static int _olua_fun_spine_SkeletonRenderer_initWithBinaryFile$4(lua_State *L) { olua_startinvoke(L); @@ -15759,7 +16726,7 @@ static int _spine_SkeletonRenderer_initWithBinaryFile$4(lua_State *L) olua_check_string(L, 2, &arg1); olua_check_string(L, 3, &arg2); - // void initWithBinaryFile(const std::string &skeletonDataFile, const std::string &atlasFile, @optional float scale) + // void initWithBinaryFile(const std::string &skeletonDataFile, const std::string &atlasFile) self->initWithBinaryFile(arg1, arg2); olua_endinvoke(L); @@ -15767,31 +16734,31 @@ static int _spine_SkeletonRenderer_initWithBinaryFile$4(lua_State *L) return 0; } -static int _spine_SkeletonRenderer_initWithBinaryFile(lua_State *L) +static int _olua_fun_spine_SkeletonRenderer_initWithBinaryFile(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 2) { if ((olua_is_string(L, 2)) && (olua_is_object(L, 3, "spine.Atlas"))) { - // void initWithBinaryFile(const std::string &skeletonDataFile, spine::Atlas *atlas, @optional float scale) - return _spine_SkeletonRenderer_initWithBinaryFile$3(L); + // void initWithBinaryFile(const std::string &skeletonDataFile, spine::Atlas *atlas) + return _olua_fun_spine_SkeletonRenderer_initWithBinaryFile$2(L); } // if ((olua_is_string(L, 2)) && (olua_is_string(L, 3))) { - // void initWithBinaryFile(const std::string &skeletonDataFile, const std::string &atlasFile, @optional float scale) - return _spine_SkeletonRenderer_initWithBinaryFile$4(L); + // void initWithBinaryFile(const std::string &skeletonDataFile, const std::string &atlasFile) + return _olua_fun_spine_SkeletonRenderer_initWithBinaryFile$4(L); // } } if (num_args == 3) { if ((olua_is_string(L, 2)) && (olua_is_object(L, 3, "spine.Atlas")) && (olua_is_number(L, 4))) { // void initWithBinaryFile(const std::string &skeletonDataFile, spine::Atlas *atlas, @optional float scale) - return _spine_SkeletonRenderer_initWithBinaryFile$1(L); + return _olua_fun_spine_SkeletonRenderer_initWithBinaryFile$1(L); } // if ((olua_is_string(L, 2)) && (olua_is_string(L, 3)) && (olua_is_number(L, 4))) { // void initWithBinaryFile(const std::string &skeletonDataFile, const std::string &atlasFile, @optional float scale) - return _spine_SkeletonRenderer_initWithBinaryFile$2(L); + return _olua_fun_spine_SkeletonRenderer_initWithBinaryFile$3(L); // } } @@ -15800,7 +16767,7 @@ static int _spine_SkeletonRenderer_initWithBinaryFile(lua_State *L) return 0; } -static int _spine_SkeletonRenderer_initWithData$1(lua_State *L) +static int _olua_fun_spine_SkeletonRenderer_initWithData$1(lua_State *L) { olua_startinvoke(L); @@ -15820,7 +16787,7 @@ static int _spine_SkeletonRenderer_initWithData$1(lua_State *L) return 0; } -static int _spine_SkeletonRenderer_initWithData$2(lua_State *L) +static int _olua_fun_spine_SkeletonRenderer_initWithData$2(lua_State *L) { olua_startinvoke(L); @@ -15830,7 +16797,7 @@ static int _spine_SkeletonRenderer_initWithData$2(lua_State *L) olua_to_object(L, 1, &self, "spine.SkeletonRenderer"); olua_check_object(L, 2, &arg1, "spine.SkeletonData"); - // void initWithData(spine::SkeletonData *skeletonData, @optional bool ownsSkeletonData) + // void initWithData(spine::SkeletonData *skeletonData) self->initWithData(arg1); olua_endinvoke(L); @@ -15838,21 +16805,21 @@ static int _spine_SkeletonRenderer_initWithData$2(lua_State *L) return 0; } -static int _spine_SkeletonRenderer_initWithData(lua_State *L) +static int _olua_fun_spine_SkeletonRenderer_initWithData(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_object(L, 2, "spine.SkeletonData"))) { - // void initWithData(spine::SkeletonData *skeletonData, @optional bool ownsSkeletonData) - return _spine_SkeletonRenderer_initWithData$2(L); + // void initWithData(spine::SkeletonData *skeletonData) + return _olua_fun_spine_SkeletonRenderer_initWithData$2(L); // } } if (num_args == 2) { // if ((olua_is_object(L, 2, "spine.SkeletonData")) && (olua_is_bool(L, 3))) { // void initWithData(spine::SkeletonData *skeletonData, @optional bool ownsSkeletonData) - return _spine_SkeletonRenderer_initWithData$1(L); + return _olua_fun_spine_SkeletonRenderer_initWithData$1(L); // } } @@ -15861,7 +16828,7 @@ static int _spine_SkeletonRenderer_initWithData(lua_State *L) return 0; } -static int _spine_SkeletonRenderer_initWithJsonFile$1(lua_State *L) +static int _olua_fun_spine_SkeletonRenderer_initWithJsonFile$1(lua_State *L) { olua_startinvoke(L); @@ -15883,49 +16850,49 @@ static int _spine_SkeletonRenderer_initWithJsonFile$1(lua_State *L) return 0; } -static int _spine_SkeletonRenderer_initWithJsonFile$2(lua_State *L) +static int _olua_fun_spine_SkeletonRenderer_initWithJsonFile$2(lua_State *L) { olua_startinvoke(L); spine::SkeletonRenderer *self = nullptr; std::string arg1; /** skeletonDataFile */ - std::string arg2; /** atlasFile */ - float arg3 = 0; /** scale */ + spine::Atlas *arg2 = nullptr; /** atlas */ olua_to_object(L, 1, &self, "spine.SkeletonRenderer"); olua_check_string(L, 2, &arg1); - olua_check_string(L, 3, &arg2); - olua_check_number(L, 4, &arg3); + olua_check_object(L, 3, &arg2, "spine.Atlas"); - // void initWithJsonFile(const std::string &skeletonDataFile, const std::string &atlasFile, @optional float scale) - self->initWithJsonFile(arg1, arg2, arg3); + // void initWithJsonFile(const std::string &skeletonDataFile, spine::Atlas *atlas) + self->initWithJsonFile(arg1, arg2); olua_endinvoke(L); return 0; } -static int _spine_SkeletonRenderer_initWithJsonFile$3(lua_State *L) +static int _olua_fun_spine_SkeletonRenderer_initWithJsonFile$3(lua_State *L) { olua_startinvoke(L); spine::SkeletonRenderer *self = nullptr; std::string arg1; /** skeletonDataFile */ - spine::Atlas *arg2 = nullptr; /** atlas */ + std::string arg2; /** atlasFile */ + float arg3 = 0; /** scale */ olua_to_object(L, 1, &self, "spine.SkeletonRenderer"); olua_check_string(L, 2, &arg1); - olua_check_object(L, 3, &arg2, "spine.Atlas"); + olua_check_string(L, 3, &arg2); + olua_check_number(L, 4, &arg3); - // void initWithJsonFile(const std::string &skeletonDataFile, spine::Atlas *atlas, @optional float scale) - self->initWithJsonFile(arg1, arg2); + // void initWithJsonFile(const std::string &skeletonDataFile, const std::string &atlasFile, @optional float scale) + self->initWithJsonFile(arg1, arg2, arg3); olua_endinvoke(L); return 0; } -static int _spine_SkeletonRenderer_initWithJsonFile$4(lua_State *L) +static int _olua_fun_spine_SkeletonRenderer_initWithJsonFile$4(lua_State *L) { olua_startinvoke(L); @@ -15937,7 +16904,7 @@ static int _spine_SkeletonRenderer_initWithJsonFile$4(lua_State *L) olua_check_string(L, 2, &arg1); olua_check_string(L, 3, &arg2); - // void initWithJsonFile(const std::string &skeletonDataFile, const std::string &atlasFile, @optional float scale) + // void initWithJsonFile(const std::string &skeletonDataFile, const std::string &atlasFile) self->initWithJsonFile(arg1, arg2); olua_endinvoke(L); @@ -15945,31 +16912,31 @@ static int _spine_SkeletonRenderer_initWithJsonFile$4(lua_State *L) return 0; } -static int _spine_SkeletonRenderer_initWithJsonFile(lua_State *L) +static int _olua_fun_spine_SkeletonRenderer_initWithJsonFile(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 2) { if ((olua_is_string(L, 2)) && (olua_is_object(L, 3, "spine.Atlas"))) { - // void initWithJsonFile(const std::string &skeletonDataFile, spine::Atlas *atlas, @optional float scale) - return _spine_SkeletonRenderer_initWithJsonFile$3(L); + // void initWithJsonFile(const std::string &skeletonDataFile, spine::Atlas *atlas) + return _olua_fun_spine_SkeletonRenderer_initWithJsonFile$2(L); } // if ((olua_is_string(L, 2)) && (olua_is_string(L, 3))) { - // void initWithJsonFile(const std::string &skeletonDataFile, const std::string &atlasFile, @optional float scale) - return _spine_SkeletonRenderer_initWithJsonFile$4(L); + // void initWithJsonFile(const std::string &skeletonDataFile, const std::string &atlasFile) + return _olua_fun_spine_SkeletonRenderer_initWithJsonFile$4(L); // } } if (num_args == 3) { if ((olua_is_string(L, 2)) && (olua_is_object(L, 3, "spine.Atlas")) && (olua_is_number(L, 4))) { // void initWithJsonFile(const std::string &skeletonDataFile, spine::Atlas *atlas, @optional float scale) - return _spine_SkeletonRenderer_initWithJsonFile$1(L); + return _olua_fun_spine_SkeletonRenderer_initWithJsonFile$1(L); } // if ((olua_is_string(L, 2)) && (olua_is_string(L, 3)) && (olua_is_number(L, 4))) { // void initWithJsonFile(const std::string &skeletonDataFile, const std::string &atlasFile, @optional float scale) - return _spine_SkeletonRenderer_initWithJsonFile$2(L); + return _olua_fun_spine_SkeletonRenderer_initWithJsonFile$3(L); // } } @@ -15978,7 +16945,7 @@ static int _spine_SkeletonRenderer_initWithJsonFile(lua_State *L) return 0; } -static int _spine_SkeletonRenderer_initWithSkeleton$1(lua_State *L) +static int _olua_fun_spine_SkeletonRenderer_initWithSkeleton$1(lua_State *L) { olua_startinvoke(L); @@ -16002,7 +16969,7 @@ static int _spine_SkeletonRenderer_initWithSkeleton$1(lua_State *L) return 0; } -static int _spine_SkeletonRenderer_initWithSkeleton$2(lua_State *L) +static int _olua_fun_spine_SkeletonRenderer_initWithSkeleton$2(lua_State *L) { olua_startinvoke(L); @@ -16012,7 +16979,7 @@ static int _spine_SkeletonRenderer_initWithSkeleton$2(lua_State *L) olua_to_object(L, 1, &self, "spine.SkeletonRenderer"); olua_check_object(L, 2, &arg1, "spine.Skeleton"); - // void initWithSkeleton(spine::Skeleton *skeleton, @optional bool ownsSkeleton, @optional bool ownsSkeletonData, @optional bool ownsAtlas) + // void initWithSkeleton(spine::Skeleton *skeleton) self->initWithSkeleton(arg1); olua_endinvoke(L); @@ -16020,7 +16987,7 @@ static int _spine_SkeletonRenderer_initWithSkeleton$2(lua_State *L) return 0; } -static int _spine_SkeletonRenderer_initWithSkeleton$3(lua_State *L) +static int _olua_fun_spine_SkeletonRenderer_initWithSkeleton$3(lua_State *L) { olua_startinvoke(L); @@ -16032,7 +16999,7 @@ static int _spine_SkeletonRenderer_initWithSkeleton$3(lua_State *L) olua_check_object(L, 2, &arg1, "spine.Skeleton"); olua_check_bool(L, 3, &arg2); - // void initWithSkeleton(spine::Skeleton *skeleton, @optional bool ownsSkeleton, @optional bool ownsSkeletonData, @optional bool ownsAtlas) + // void initWithSkeleton(spine::Skeleton *skeleton, @optional bool ownsSkeleton) self->initWithSkeleton(arg1, arg2); olua_endinvoke(L); @@ -16040,7 +17007,7 @@ static int _spine_SkeletonRenderer_initWithSkeleton$3(lua_State *L) return 0; } -static int _spine_SkeletonRenderer_initWithSkeleton$4(lua_State *L) +static int _olua_fun_spine_SkeletonRenderer_initWithSkeleton$4(lua_State *L) { olua_startinvoke(L); @@ -16054,7 +17021,7 @@ static int _spine_SkeletonRenderer_initWithSkeleton$4(lua_State *L) olua_check_bool(L, 3, &arg2); olua_check_bool(L, 4, &arg3); - // void initWithSkeleton(spine::Skeleton *skeleton, @optional bool ownsSkeleton, @optional bool ownsSkeletonData, @optional bool ownsAtlas) + // void initWithSkeleton(spine::Skeleton *skeleton, @optional bool ownsSkeleton, @optional bool ownsSkeletonData) self->initWithSkeleton(arg1, arg2, arg3); olua_endinvoke(L); @@ -16062,35 +17029,35 @@ static int _spine_SkeletonRenderer_initWithSkeleton$4(lua_State *L) return 0; } -static int _spine_SkeletonRenderer_initWithSkeleton(lua_State *L) +static int _olua_fun_spine_SkeletonRenderer_initWithSkeleton(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_object(L, 2, "spine.Skeleton"))) { - // void initWithSkeleton(spine::Skeleton *skeleton, @optional bool ownsSkeleton, @optional bool ownsSkeletonData, @optional bool ownsAtlas) - return _spine_SkeletonRenderer_initWithSkeleton$2(L); + // void initWithSkeleton(spine::Skeleton *skeleton) + return _olua_fun_spine_SkeletonRenderer_initWithSkeleton$2(L); // } } if (num_args == 2) { // if ((olua_is_object(L, 2, "spine.Skeleton")) && (olua_is_bool(L, 3))) { - // void initWithSkeleton(spine::Skeleton *skeleton, @optional bool ownsSkeleton, @optional bool ownsSkeletonData, @optional bool ownsAtlas) - return _spine_SkeletonRenderer_initWithSkeleton$3(L); + // void initWithSkeleton(spine::Skeleton *skeleton, @optional bool ownsSkeleton) + return _olua_fun_spine_SkeletonRenderer_initWithSkeleton$3(L); // } } if (num_args == 3) { // if ((olua_is_object(L, 2, "spine.Skeleton")) && (olua_is_bool(L, 3)) && (olua_is_bool(L, 4))) { - // void initWithSkeleton(spine::Skeleton *skeleton, @optional bool ownsSkeleton, @optional bool ownsSkeletonData, @optional bool ownsAtlas) - return _spine_SkeletonRenderer_initWithSkeleton$4(L); + // void initWithSkeleton(spine::Skeleton *skeleton, @optional bool ownsSkeleton, @optional bool ownsSkeletonData) + return _olua_fun_spine_SkeletonRenderer_initWithSkeleton$4(L); // } } if (num_args == 4) { // if ((olua_is_object(L, 2, "spine.Skeleton")) && (olua_is_bool(L, 3)) && (olua_is_bool(L, 4)) && (olua_is_bool(L, 5))) { // void initWithSkeleton(spine::Skeleton *skeleton, @optional bool ownsSkeleton, @optional bool ownsSkeletonData, @optional bool ownsAtlas) - return _spine_SkeletonRenderer_initWithSkeleton$1(L); + return _olua_fun_spine_SkeletonRenderer_initWithSkeleton$1(L); // } } @@ -16099,7 +17066,7 @@ static int _spine_SkeletonRenderer_initWithSkeleton(lua_State *L) return 0; } -static int _spine_SkeletonRenderer_initialize(lua_State *L) +static int _olua_fun_spine_SkeletonRenderer_initialize(lua_State *L) { olua_startinvoke(L); @@ -16115,7 +17082,7 @@ static int _spine_SkeletonRenderer_initialize(lua_State *L) return 0; } -static int _spine_SkeletonRenderer_isTwoColorTint(lua_State *L) +static int _olua_fun_spine_SkeletonRenderer_isTwoColorTint(lua_State *L) { olua_startinvoke(L); @@ -16132,11 +17099,11 @@ static int _spine_SkeletonRenderer_isTwoColorTint(lua_State *L) return num_ret; } -static int _spine_SkeletonRenderer_new$1(lua_State *L) +static int _olua_fun_spine_SkeletonRenderer_new$1(lua_State *L) { olua_startinvoke(L); - // SkeletonRenderer() + // spine::SkeletonRenderer() spine::SkeletonRenderer *ret = new spine::SkeletonRenderer(); int num_ret = olua_push_object(L, ret, "spine.SkeletonRenderer"); olua_postnew(L, ret); @@ -16146,7 +17113,7 @@ static int _spine_SkeletonRenderer_new$1(lua_State *L) return num_ret; } -static int _spine_SkeletonRenderer_new$2(lua_State *L) +static int _olua_fun_spine_SkeletonRenderer_new$2(lua_State *L) { olua_startinvoke(L); @@ -16160,7 +17127,7 @@ static int _spine_SkeletonRenderer_new$2(lua_State *L) olua_check_bool(L, 3, &arg3); olua_check_bool(L, 4, &arg4); - // SkeletonRenderer(spine::Skeleton *skeleton, @optional bool ownsSkeleton, @optional bool ownsSkeletonData, @optional bool ownsAtlas) + // spine::SkeletonRenderer(spine::Skeleton *skeleton, @optional bool ownsSkeleton, @optional bool ownsSkeletonData, @optional bool ownsAtlas) spine::SkeletonRenderer *ret = new spine::SkeletonRenderer(arg1, arg2, arg3, arg4); int num_ret = olua_push_object(L, ret, "spine.SkeletonRenderer"); olua_postnew(L, ret); @@ -16170,18 +17137,16 @@ static int _spine_SkeletonRenderer_new$2(lua_State *L) return num_ret; } -static int _spine_SkeletonRenderer_new$3(lua_State *L) +static int _olua_fun_spine_SkeletonRenderer_new$3(lua_State *L) { olua_startinvoke(L); - spine::SkeletonData *arg1 = nullptr; /** skeletonData */ - bool arg2 = false; /** ownsSkeletonData */ + spine::Skeleton *arg1 = nullptr; /** skeleton */ - olua_check_object(L, 1, &arg1, "spine.SkeletonData"); - olua_check_bool(L, 2, &arg2); + olua_check_object(L, 1, &arg1, "spine.Skeleton"); - // SkeletonRenderer(spine::SkeletonData *skeletonData, @optional bool ownsSkeletonData) - spine::SkeletonRenderer *ret = new spine::SkeletonRenderer(arg1, arg2); + // spine::SkeletonRenderer(spine::Skeleton *skeleton) + spine::SkeletonRenderer *ret = new spine::SkeletonRenderer(arg1); int num_ret = olua_push_object(L, ret, "spine.SkeletonRenderer"); olua_postnew(L, ret); @@ -16190,20 +17155,18 @@ static int _spine_SkeletonRenderer_new$3(lua_State *L) return num_ret; } -static int _spine_SkeletonRenderer_new$4(lua_State *L) +static int _olua_fun_spine_SkeletonRenderer_new$4(lua_State *L) { olua_startinvoke(L); - std::string arg1; /** skeletonDataFile */ - spine::Atlas *arg2 = nullptr; /** atlas */ - float arg3 = 0; /** scale */ + spine::Skeleton *arg1 = nullptr; /** skeleton */ + bool arg2 = false; /** ownsSkeleton */ - olua_check_string(L, 1, &arg1); - olua_check_object(L, 2, &arg2, "spine.Atlas"); - olua_check_number(L, 3, &arg3); + olua_check_object(L, 1, &arg1, "spine.Skeleton"); + olua_check_bool(L, 2, &arg2); - // SkeletonRenderer(const std::string &skeletonDataFile, spine::Atlas *atlas, @optional float scale) - spine::SkeletonRenderer *ret = new spine::SkeletonRenderer(arg1, arg2, arg3); + // spine::SkeletonRenderer(spine::Skeleton *skeleton, @optional bool ownsSkeleton) + spine::SkeletonRenderer *ret = new spine::SkeletonRenderer(arg1, arg2); int num_ret = olua_push_object(L, ret, "spine.SkeletonRenderer"); olua_postnew(L, ret); @@ -16212,19 +17175,19 @@ static int _spine_SkeletonRenderer_new$4(lua_State *L) return num_ret; } -static int _spine_SkeletonRenderer_new$5(lua_State *L) +static int _olua_fun_spine_SkeletonRenderer_new$5(lua_State *L) { olua_startinvoke(L); - std::string arg1; /** skeletonDataFile */ - std::string arg2; /** atlasFile */ - float arg3 = 0; /** scale */ + spine::Skeleton *arg1 = nullptr; /** skeleton */ + bool arg2 = false; /** ownsSkeleton */ + bool arg3 = false; /** ownsSkeletonData */ - olua_check_string(L, 1, &arg1); - olua_check_string(L, 2, &arg2); - olua_check_number(L, 3, &arg3); + olua_check_object(L, 1, &arg1, "spine.Skeleton"); + olua_check_bool(L, 2, &arg2); + olua_check_bool(L, 3, &arg3); - // SkeletonRenderer(const std::string &skeletonDataFile, const std::string &atlasFile, @optional float scale) + // spine::SkeletonRenderer(spine::Skeleton *skeleton, @optional bool ownsSkeleton, @optional bool ownsSkeletonData) spine::SkeletonRenderer *ret = new spine::SkeletonRenderer(arg1, arg2, arg3); int num_ret = olua_push_object(L, ret, "spine.SkeletonRenderer"); olua_postnew(L, ret); @@ -16234,16 +17197,18 @@ static int _spine_SkeletonRenderer_new$5(lua_State *L) return num_ret; } -static int _spine_SkeletonRenderer_new$6(lua_State *L) +static int _olua_fun_spine_SkeletonRenderer_new$6(lua_State *L) { olua_startinvoke(L); - spine::Skeleton *arg1 = nullptr; /** skeleton */ + spine::SkeletonData *arg1 = nullptr; /** skeletonData */ + bool arg2 = false; /** ownsSkeletonData */ - olua_check_object(L, 1, &arg1, "spine.Skeleton"); + olua_check_object(L, 1, &arg1, "spine.SkeletonData"); + olua_check_bool(L, 2, &arg2); - // SkeletonRenderer(spine::Skeleton *skeleton, @optional bool ownsSkeleton, @optional bool ownsSkeletonData, @optional bool ownsAtlas) - spine::SkeletonRenderer *ret = new spine::SkeletonRenderer(arg1); + // spine::SkeletonRenderer(spine::SkeletonData *skeletonData, @optional bool ownsSkeletonData) + spine::SkeletonRenderer *ret = new spine::SkeletonRenderer(arg1, arg2); int num_ret = olua_push_object(L, ret, "spine.SkeletonRenderer"); olua_postnew(L, ret); @@ -16252,18 +17217,16 @@ static int _spine_SkeletonRenderer_new$6(lua_State *L) return num_ret; } -static int _spine_SkeletonRenderer_new$7(lua_State *L) +static int _olua_fun_spine_SkeletonRenderer_new$7(lua_State *L) { olua_startinvoke(L); - spine::Skeleton *arg1 = nullptr; /** skeleton */ - bool arg2 = false; /** ownsSkeleton */ + spine::SkeletonData *arg1 = nullptr; /** skeletonData */ - olua_check_object(L, 1, &arg1, "spine.Skeleton"); - olua_check_bool(L, 2, &arg2); + olua_check_object(L, 1, &arg1, "spine.SkeletonData"); - // SkeletonRenderer(spine::Skeleton *skeleton, @optional bool ownsSkeleton, @optional bool ownsSkeletonData, @optional bool ownsAtlas) - spine::SkeletonRenderer *ret = new spine::SkeletonRenderer(arg1, arg2); + // spine::SkeletonRenderer(spine::SkeletonData *skeletonData) + spine::SkeletonRenderer *ret = new spine::SkeletonRenderer(arg1); int num_ret = olua_push_object(L, ret, "spine.SkeletonRenderer"); olua_postnew(L, ret); @@ -16272,19 +17235,19 @@ static int _spine_SkeletonRenderer_new$7(lua_State *L) return num_ret; } -static int _spine_SkeletonRenderer_new$8(lua_State *L) +static int _olua_fun_spine_SkeletonRenderer_new$8(lua_State *L) { olua_startinvoke(L); - spine::Skeleton *arg1 = nullptr; /** skeleton */ - bool arg2 = false; /** ownsSkeleton */ - bool arg3 = false; /** ownsSkeletonData */ + std::string arg1; /** skeletonDataFile */ + spine::Atlas *arg2 = nullptr; /** atlas */ + float arg3 = 0; /** scale */ - olua_check_object(L, 1, &arg1, "spine.Skeleton"); - olua_check_bool(L, 2, &arg2); - olua_check_bool(L, 3, &arg3); + olua_check_string(L, 1, &arg1); + olua_check_object(L, 2, &arg2, "spine.Atlas"); + olua_check_number(L, 3, &arg3); - // SkeletonRenderer(spine::Skeleton *skeleton, @optional bool ownsSkeleton, @optional bool ownsSkeletonData, @optional bool ownsAtlas) + // spine::SkeletonRenderer(const std::string &skeletonDataFile, spine::Atlas *atlas, @optional float scale) spine::SkeletonRenderer *ret = new spine::SkeletonRenderer(arg1, arg2, arg3); int num_ret = olua_push_object(L, ret, "spine.SkeletonRenderer"); olua_postnew(L, ret); @@ -16294,16 +17257,18 @@ static int _spine_SkeletonRenderer_new$8(lua_State *L) return num_ret; } -static int _spine_SkeletonRenderer_new$9(lua_State *L) +static int _olua_fun_spine_SkeletonRenderer_new$9(lua_State *L) { olua_startinvoke(L); - spine::SkeletonData *arg1 = nullptr; /** skeletonData */ + std::string arg1; /** skeletonDataFile */ + spine::Atlas *arg2 = nullptr; /** atlas */ - olua_check_object(L, 1, &arg1, "spine.SkeletonData"); + olua_check_string(L, 1, &arg1); + olua_check_object(L, 2, &arg2, "spine.Atlas"); - // SkeletonRenderer(spine::SkeletonData *skeletonData, @optional bool ownsSkeletonData) - spine::SkeletonRenderer *ret = new spine::SkeletonRenderer(arg1); + // spine::SkeletonRenderer(const std::string &skeletonDataFile, spine::Atlas *atlas) + spine::SkeletonRenderer *ret = new spine::SkeletonRenderer(arg1, arg2); int num_ret = olua_push_object(L, ret, "spine.SkeletonRenderer"); olua_postnew(L, ret); @@ -16312,18 +17277,20 @@ static int _spine_SkeletonRenderer_new$9(lua_State *L) return num_ret; } -static int _spine_SkeletonRenderer_new$10(lua_State *L) +static int _olua_fun_spine_SkeletonRenderer_new$10(lua_State *L) { olua_startinvoke(L); std::string arg1; /** skeletonDataFile */ - spine::Atlas *arg2 = nullptr; /** atlas */ + std::string arg2; /** atlasFile */ + float arg3 = 0; /** scale */ olua_check_string(L, 1, &arg1); - olua_check_object(L, 2, &arg2, "spine.Atlas"); + olua_check_string(L, 2, &arg2); + olua_check_number(L, 3, &arg3); - // SkeletonRenderer(const std::string &skeletonDataFile, spine::Atlas *atlas, @optional float scale) - spine::SkeletonRenderer *ret = new spine::SkeletonRenderer(arg1, arg2); + // spine::SkeletonRenderer(const std::string &skeletonDataFile, const std::string &atlasFile, @optional float scale) + spine::SkeletonRenderer *ret = new spine::SkeletonRenderer(arg1, arg2, arg3); int num_ret = olua_push_object(L, ret, "spine.SkeletonRenderer"); olua_postnew(L, ret); @@ -16332,7 +17299,7 @@ static int _spine_SkeletonRenderer_new$10(lua_State *L) return num_ret; } -static int _spine_SkeletonRenderer_new$11(lua_State *L) +static int _olua_fun_spine_SkeletonRenderer_new$11(lua_State *L) { olua_startinvoke(L); @@ -16342,7 +17309,7 @@ static int _spine_SkeletonRenderer_new$11(lua_State *L) olua_check_string(L, 1, &arg1); olua_check_string(L, 2, &arg2); - // SkeletonRenderer(const std::string &skeletonDataFile, const std::string &atlasFile, @optional float scale) + // spine::SkeletonRenderer(const std::string &skeletonDataFile, const std::string &atlasFile) spine::SkeletonRenderer *ret = new spine::SkeletonRenderer(arg1, arg2); int num_ret = olua_push_object(L, ret, "spine.SkeletonRenderer"); olua_postnew(L, ret); @@ -16352,70 +17319,70 @@ static int _spine_SkeletonRenderer_new$11(lua_State *L) return num_ret; } -static int _spine_SkeletonRenderer_new(lua_State *L) +static int _olua_fun_spine_SkeletonRenderer_new(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 0) { - // SkeletonRenderer() - return _spine_SkeletonRenderer_new$1(L); + // spine::SkeletonRenderer() + return _olua_fun_spine_SkeletonRenderer_new$1(L); } if (num_args == 1) { if ((olua_is_object(L, 1, "spine.Skeleton"))) { - // SkeletonRenderer(spine::Skeleton *skeleton, @optional bool ownsSkeleton, @optional bool ownsSkeletonData, @optional bool ownsAtlas) - return _spine_SkeletonRenderer_new$6(L); + // spine::SkeletonRenderer(spine::Skeleton *skeleton) + return _olua_fun_spine_SkeletonRenderer_new$3(L); } // if ((olua_is_object(L, 1, "spine.SkeletonData"))) { - // SkeletonRenderer(spine::SkeletonData *skeletonData, @optional bool ownsSkeletonData) - return _spine_SkeletonRenderer_new$9(L); + // spine::SkeletonRenderer(spine::SkeletonData *skeletonData) + return _olua_fun_spine_SkeletonRenderer_new$7(L); // } } if (num_args == 2) { - if ((olua_is_object(L, 1, "spine.SkeletonData")) && (olua_is_bool(L, 2))) { - // SkeletonRenderer(spine::SkeletonData *skeletonData, @optional bool ownsSkeletonData) - return _spine_SkeletonRenderer_new$3(L); + if ((olua_is_object(L, 1, "spine.Skeleton")) && (olua_is_bool(L, 2))) { + // spine::SkeletonRenderer(spine::Skeleton *skeleton, @optional bool ownsSkeleton) + return _olua_fun_spine_SkeletonRenderer_new$4(L); } if ((olua_is_string(L, 1)) && (olua_is_object(L, 2, "spine.Atlas"))) { - // SkeletonRenderer(const std::string &skeletonDataFile, spine::Atlas *atlas, @optional float scale) - return _spine_SkeletonRenderer_new$10(L); + // spine::SkeletonRenderer(const std::string &skeletonDataFile, spine::Atlas *atlas) + return _olua_fun_spine_SkeletonRenderer_new$9(L); } - if ((olua_is_object(L, 1, "spine.Skeleton")) && (olua_is_bool(L, 2))) { - // SkeletonRenderer(spine::Skeleton *skeleton, @optional bool ownsSkeleton, @optional bool ownsSkeletonData, @optional bool ownsAtlas) - return _spine_SkeletonRenderer_new$7(L); + if ((olua_is_object(L, 1, "spine.SkeletonData")) && (olua_is_bool(L, 2))) { + // spine::SkeletonRenderer(spine::SkeletonData *skeletonData, @optional bool ownsSkeletonData) + return _olua_fun_spine_SkeletonRenderer_new$6(L); } // if ((olua_is_string(L, 1)) && (olua_is_string(L, 2))) { - // SkeletonRenderer(const std::string &skeletonDataFile, const std::string &atlasFile, @optional float scale) - return _spine_SkeletonRenderer_new$11(L); + // spine::SkeletonRenderer(const std::string &skeletonDataFile, const std::string &atlasFile) + return _olua_fun_spine_SkeletonRenderer_new$11(L); // } } if (num_args == 3) { - if ((olua_is_string(L, 1)) && (olua_is_object(L, 2, "spine.Atlas")) && (olua_is_number(L, 3))) { - // SkeletonRenderer(const std::string &skeletonDataFile, spine::Atlas *atlas, @optional float scale) - return _spine_SkeletonRenderer_new$4(L); + if ((olua_is_object(L, 1, "spine.Skeleton")) && (olua_is_bool(L, 2)) && (olua_is_bool(L, 3))) { + // spine::SkeletonRenderer(spine::Skeleton *skeleton, @optional bool ownsSkeleton, @optional bool ownsSkeletonData) + return _olua_fun_spine_SkeletonRenderer_new$5(L); } - if ((olua_is_string(L, 1)) && (olua_is_string(L, 2)) && (olua_is_number(L, 3))) { - // SkeletonRenderer(const std::string &skeletonDataFile, const std::string &atlasFile, @optional float scale) - return _spine_SkeletonRenderer_new$5(L); + if ((olua_is_string(L, 1)) && (olua_is_object(L, 2, "spine.Atlas")) && (olua_is_number(L, 3))) { + // spine::SkeletonRenderer(const std::string &skeletonDataFile, spine::Atlas *atlas, @optional float scale) + return _olua_fun_spine_SkeletonRenderer_new$8(L); } - // if ((olua_is_object(L, 1, "spine.Skeleton")) && (olua_is_bool(L, 2)) && (olua_is_bool(L, 3))) { - // SkeletonRenderer(spine::Skeleton *skeleton, @optional bool ownsSkeleton, @optional bool ownsSkeletonData, @optional bool ownsAtlas) - return _spine_SkeletonRenderer_new$8(L); + // if ((olua_is_string(L, 1)) && (olua_is_string(L, 2)) && (olua_is_number(L, 3))) { + // spine::SkeletonRenderer(const std::string &skeletonDataFile, const std::string &atlasFile, @optional float scale) + return _olua_fun_spine_SkeletonRenderer_new$10(L); // } } if (num_args == 4) { // if ((olua_is_object(L, 1, "spine.Skeleton")) && (olua_is_bool(L, 2)) && (olua_is_bool(L, 3)) && (olua_is_bool(L, 4))) { - // SkeletonRenderer(spine::Skeleton *skeleton, @optional bool ownsSkeleton, @optional bool ownsSkeletonData, @optional bool ownsAtlas) - return _spine_SkeletonRenderer_new$2(L); + // spine::SkeletonRenderer(spine::Skeleton *skeleton, @optional bool ownsSkeleton, @optional bool ownsSkeletonData, @optional bool ownsAtlas) + return _olua_fun_spine_SkeletonRenderer_new$2(L); // } } @@ -16424,7 +17391,7 @@ static int _spine_SkeletonRenderer_new(lua_State *L) return 0; } -static int _spine_SkeletonRenderer_setAttachment$1(lua_State *L) +static int _olua_fun_spine_SkeletonRenderer_setAttachment$1(lua_State *L) { olua_startinvoke(L); @@ -16445,7 +17412,7 @@ static int _spine_SkeletonRenderer_setAttachment$1(lua_State *L) return num_ret; } -static int _spine_SkeletonRenderer_setAttachment$2(lua_State *L) +static int _olua_fun_spine_SkeletonRenderer_setAttachment$2(lua_State *L) { olua_startinvoke(L); @@ -16466,19 +17433,19 @@ static int _spine_SkeletonRenderer_setAttachment$2(lua_State *L) return num_ret; } -static int _spine_SkeletonRenderer_setAttachment(lua_State *L) +static int _olua_fun_spine_SkeletonRenderer_setAttachment(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 2) { if ((olua_is_string(L, 2)) && (olua_is_string(L, 3))) { // bool setAttachment(const std::string &slotName, const std::string &attachmentName) - return _spine_SkeletonRenderer_setAttachment$1(L); + return _olua_fun_spine_SkeletonRenderer_setAttachment$1(L); } // if ((olua_is_string(L, 2)) && (olua_is_string(L, 3))) { // bool setAttachment(const std::string &slotName, const char *attachmentName) - return _spine_SkeletonRenderer_setAttachment$2(L); + return _olua_fun_spine_SkeletonRenderer_setAttachment$2(L); // } } @@ -16487,25 +17454,25 @@ static int _spine_SkeletonRenderer_setAttachment(lua_State *L) return 0; } -static int _spine_SkeletonRenderer_setBlendFunc(lua_State *L) +static int _olua_fun_spine_SkeletonRenderer_setBlendFunc(lua_State *L) { olua_startinvoke(L); spine::SkeletonRenderer *self = nullptr; - cocos2d::BlendFunc arg1; /** blendFunc */ + cocos2d::BlendFunc *arg1; /** blendFunc */ olua_to_object(L, 1, &self, "spine.SkeletonRenderer"); olua_check_object(L, 2, &arg1, "cc.BlendFunc"); // void setBlendFunc(const cocos2d::BlendFunc &blendFunc) - self->setBlendFunc(arg1); + self->setBlendFunc(*arg1); olua_endinvoke(L); return 0; } -static int _spine_SkeletonRenderer_setBonesToSetupPose(lua_State *L) +static int _olua_fun_spine_SkeletonRenderer_setBonesToSetupPose(lua_State *L) { olua_startinvoke(L); @@ -16521,7 +17488,7 @@ static int _spine_SkeletonRenderer_setBonesToSetupPose(lua_State *L) return 0; } -static int _spine_SkeletonRenderer_setDebugBonesEnabled(lua_State *L) +static int _olua_fun_spine_SkeletonRenderer_setDebugBonesEnabled(lua_State *L) { olua_startinvoke(L); @@ -16539,7 +17506,7 @@ static int _spine_SkeletonRenderer_setDebugBonesEnabled(lua_State *L) return 0; } -static int _spine_SkeletonRenderer_setDebugBoundingRectEnabled(lua_State *L) +static int _olua_fun_spine_SkeletonRenderer_setDebugBoundingRectEnabled(lua_State *L) { olua_startinvoke(L); @@ -16557,7 +17524,7 @@ static int _spine_SkeletonRenderer_setDebugBoundingRectEnabled(lua_State *L) return 0; } -static int _spine_SkeletonRenderer_setDebugMeshesEnabled(lua_State *L) +static int _olua_fun_spine_SkeletonRenderer_setDebugMeshesEnabled(lua_State *L) { olua_startinvoke(L); @@ -16575,7 +17542,7 @@ static int _spine_SkeletonRenderer_setDebugMeshesEnabled(lua_State *L) return 0; } -static int _spine_SkeletonRenderer_setDebugSlotsEnabled(lua_State *L) +static int _olua_fun_spine_SkeletonRenderer_setDebugSlotsEnabled(lua_State *L) { olua_startinvoke(L); @@ -16593,7 +17560,7 @@ static int _spine_SkeletonRenderer_setDebugSlotsEnabled(lua_State *L) return 0; } -static int _spine_SkeletonRenderer_setSkin$1(lua_State *L) +static int _olua_fun_spine_SkeletonRenderer_setSkin$1(lua_State *L) { olua_startinvoke(L); @@ -16611,7 +17578,7 @@ static int _spine_SkeletonRenderer_setSkin$1(lua_State *L) return 0; } -static int _spine_SkeletonRenderer_setSkin$2(lua_State *L) +static int _olua_fun_spine_SkeletonRenderer_setSkin$2(lua_State *L) { olua_startinvoke(L); @@ -16629,19 +17596,19 @@ static int _spine_SkeletonRenderer_setSkin$2(lua_State *L) return 0; } -static int _spine_SkeletonRenderer_setSkin(lua_State *L) +static int _olua_fun_spine_SkeletonRenderer_setSkin(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { if ((olua_is_string(L, 2))) { // void setSkin(const std::string &skinName) - return _spine_SkeletonRenderer_setSkin$1(L); + return _olua_fun_spine_SkeletonRenderer_setSkin$1(L); } // if ((olua_is_string(L, 2))) { // void setSkin(const char *skinName) - return _spine_SkeletonRenderer_setSkin$2(L); + return _olua_fun_spine_SkeletonRenderer_setSkin$2(L); // } } @@ -16650,7 +17617,7 @@ static int _spine_SkeletonRenderer_setSkin(lua_State *L) return 0; } -static int _spine_SkeletonRenderer_setSlotsRange(lua_State *L) +static int _olua_fun_spine_SkeletonRenderer_setSlotsRange(lua_State *L) { olua_startinvoke(L); @@ -16670,7 +17637,7 @@ static int _spine_SkeletonRenderer_setSlotsRange(lua_State *L) return 0; } -static int _spine_SkeletonRenderer_setSlotsToSetupPose(lua_State *L) +static int _olua_fun_spine_SkeletonRenderer_setSlotsToSetupPose(lua_State *L) { olua_startinvoke(L); @@ -16686,7 +17653,7 @@ static int _spine_SkeletonRenderer_setSlotsToSetupPose(lua_State *L) return 0; } -static int _spine_SkeletonRenderer_setTimeScale(lua_State *L) +static int _olua_fun_spine_SkeletonRenderer_setTimeScale(lua_State *L) { olua_startinvoke(L); @@ -16704,7 +17671,7 @@ static int _spine_SkeletonRenderer_setTimeScale(lua_State *L) return 0; } -static int _spine_SkeletonRenderer_setToSetupPose(lua_State *L) +static int _olua_fun_spine_SkeletonRenderer_setToSetupPose(lua_State *L) { olua_startinvoke(L); @@ -16720,7 +17687,7 @@ static int _spine_SkeletonRenderer_setToSetupPose(lua_State *L) return 0; } -static int _spine_SkeletonRenderer_setTwoColorTint(lua_State *L) +static int _olua_fun_spine_SkeletonRenderer_setTwoColorTint(lua_State *L) { olua_startinvoke(L); @@ -16738,7 +17705,7 @@ static int _spine_SkeletonRenderer_setTwoColorTint(lua_State *L) return 0; } -static int _spine_SkeletonRenderer_updateWorldTransform(lua_State *L) +static int _olua_fun_spine_SkeletonRenderer_updateWorldTransform(lua_State *L) { olua_startinvoke(L); @@ -16756,60 +17723,69 @@ static int _spine_SkeletonRenderer_updateWorldTransform(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_spine_SkeletonRenderer(lua_State *L) +static int _olua_cls_spine_SkeletonRenderer(lua_State *L) { oluacls_class(L, "spine.SkeletonRenderer"); - oluacls_func(L, "as", _spine_SkeletonRenderer_as); - oluacls_func(L, "create", _spine_SkeletonRenderer_create); - oluacls_func(L, "createWithData", _spine_SkeletonRenderer_createWithData); - oluacls_func(L, "createWithFile", _spine_SkeletonRenderer_createWithFile); - oluacls_func(L, "createWithSkeleton", _spine_SkeletonRenderer_createWithSkeleton); - oluacls_func(L, "findBone", _spine_SkeletonRenderer_findBone); - oluacls_func(L, "findSlot", _spine_SkeletonRenderer_findSlot); - oluacls_func(L, "getAttachment", _spine_SkeletonRenderer_getAttachment); - oluacls_func(L, "getBlendFunc", _spine_SkeletonRenderer_getBlendFunc); - oluacls_func(L, "getDebugBonesEnabled", _spine_SkeletonRenderer_getDebugBonesEnabled); - oluacls_func(L, "getDebugBoundingRectEnabled", _spine_SkeletonRenderer_getDebugBoundingRectEnabled); - oluacls_func(L, "getDebugMeshesEnabled", _spine_SkeletonRenderer_getDebugMeshesEnabled); - oluacls_func(L, "getDebugSlotsEnabled", _spine_SkeletonRenderer_getDebugSlotsEnabled); - oluacls_func(L, "getSkeleton", _spine_SkeletonRenderer_getSkeleton); - oluacls_func(L, "getTimeScale", _spine_SkeletonRenderer_getTimeScale); - oluacls_func(L, "initWithBinaryFile", _spine_SkeletonRenderer_initWithBinaryFile); - oluacls_func(L, "initWithData", _spine_SkeletonRenderer_initWithData); - oluacls_func(L, "initWithJsonFile", _spine_SkeletonRenderer_initWithJsonFile); - oluacls_func(L, "initWithSkeleton", _spine_SkeletonRenderer_initWithSkeleton); - oluacls_func(L, "initialize", _spine_SkeletonRenderer_initialize); - oluacls_func(L, "isTwoColorTint", _spine_SkeletonRenderer_isTwoColorTint); - oluacls_func(L, "new", _spine_SkeletonRenderer_new); - oluacls_func(L, "setAttachment", _spine_SkeletonRenderer_setAttachment); - oluacls_func(L, "setBlendFunc", _spine_SkeletonRenderer_setBlendFunc); - oluacls_func(L, "setBonesToSetupPose", _spine_SkeletonRenderer_setBonesToSetupPose); - oluacls_func(L, "setDebugBonesEnabled", _spine_SkeletonRenderer_setDebugBonesEnabled); - oluacls_func(L, "setDebugBoundingRectEnabled", _spine_SkeletonRenderer_setDebugBoundingRectEnabled); - oluacls_func(L, "setDebugMeshesEnabled", _spine_SkeletonRenderer_setDebugMeshesEnabled); - oluacls_func(L, "setDebugSlotsEnabled", _spine_SkeletonRenderer_setDebugSlotsEnabled); - oluacls_func(L, "setSkin", _spine_SkeletonRenderer_setSkin); - oluacls_func(L, "setSlotsRange", _spine_SkeletonRenderer_setSlotsRange); - oluacls_func(L, "setSlotsToSetupPose", _spine_SkeletonRenderer_setSlotsToSetupPose); - oluacls_func(L, "setTimeScale", _spine_SkeletonRenderer_setTimeScale); - oluacls_func(L, "setToSetupPose", _spine_SkeletonRenderer_setToSetupPose); - oluacls_func(L, "setTwoColorTint", _spine_SkeletonRenderer_setTwoColorTint); - oluacls_func(L, "updateWorldTransform", _spine_SkeletonRenderer_updateWorldTransform); - oluacls_prop(L, "blendFunc", _spine_SkeletonRenderer_getBlendFunc, _spine_SkeletonRenderer_setBlendFunc); - oluacls_prop(L, "debugBonesEnabled", _spine_SkeletonRenderer_getDebugBonesEnabled, _spine_SkeletonRenderer_setDebugBonesEnabled); - oluacls_prop(L, "debugBoundingRectEnabled", _spine_SkeletonRenderer_getDebugBoundingRectEnabled, _spine_SkeletonRenderer_setDebugBoundingRectEnabled); - oluacls_prop(L, "debugMeshesEnabled", _spine_SkeletonRenderer_getDebugMeshesEnabled, _spine_SkeletonRenderer_setDebugMeshesEnabled); - oluacls_prop(L, "debugSlotsEnabled", _spine_SkeletonRenderer_getDebugSlotsEnabled, _spine_SkeletonRenderer_setDebugSlotsEnabled); - oluacls_prop(L, "skeleton", _spine_SkeletonRenderer_getSkeleton, nullptr); - oluacls_prop(L, "timeScale", _spine_SkeletonRenderer_getTimeScale, _spine_SkeletonRenderer_setTimeScale); - oluacls_prop(L, "twoColorTint", _spine_SkeletonRenderer_isTwoColorTint, _spine_SkeletonRenderer_setTwoColorTint); + oluacls_func(L, "as", _olua_fun_spine_SkeletonRenderer_as); + oluacls_func(L, "create", _olua_fun_spine_SkeletonRenderer_create); + oluacls_func(L, "createWithData", _olua_fun_spine_SkeletonRenderer_createWithData); + oluacls_func(L, "createWithFile", _olua_fun_spine_SkeletonRenderer_createWithFile); + oluacls_func(L, "createWithSkeleton", _olua_fun_spine_SkeletonRenderer_createWithSkeleton); + oluacls_func(L, "findBone", _olua_fun_spine_SkeletonRenderer_findBone); + oluacls_func(L, "findSlot", _olua_fun_spine_SkeletonRenderer_findSlot); + oluacls_func(L, "getAttachment", _olua_fun_spine_SkeletonRenderer_getAttachment); + oluacls_func(L, "getBlendFunc", _olua_fun_spine_SkeletonRenderer_getBlendFunc); + oluacls_func(L, "getDebugBonesEnabled", _olua_fun_spine_SkeletonRenderer_getDebugBonesEnabled); + oluacls_func(L, "getDebugBoundingRectEnabled", _olua_fun_spine_SkeletonRenderer_getDebugBoundingRectEnabled); + oluacls_func(L, "getDebugMeshesEnabled", _olua_fun_spine_SkeletonRenderer_getDebugMeshesEnabled); + oluacls_func(L, "getDebugSlotsEnabled", _olua_fun_spine_SkeletonRenderer_getDebugSlotsEnabled); + oluacls_func(L, "getSkeleton", _olua_fun_spine_SkeletonRenderer_getSkeleton); + oluacls_func(L, "getTimeScale", _olua_fun_spine_SkeletonRenderer_getTimeScale); + oluacls_func(L, "initWithBinaryFile", _olua_fun_spine_SkeletonRenderer_initWithBinaryFile); + oluacls_func(L, "initWithData", _olua_fun_spine_SkeletonRenderer_initWithData); + oluacls_func(L, "initWithJsonFile", _olua_fun_spine_SkeletonRenderer_initWithJsonFile); + oluacls_func(L, "initWithSkeleton", _olua_fun_spine_SkeletonRenderer_initWithSkeleton); + oluacls_func(L, "initialize", _olua_fun_spine_SkeletonRenderer_initialize); + oluacls_func(L, "isTwoColorTint", _olua_fun_spine_SkeletonRenderer_isTwoColorTint); + oluacls_func(L, "new", _olua_fun_spine_SkeletonRenderer_new); + oluacls_func(L, "setAttachment", _olua_fun_spine_SkeletonRenderer_setAttachment); + oluacls_func(L, "setBlendFunc", _olua_fun_spine_SkeletonRenderer_setBlendFunc); + oluacls_func(L, "setBonesToSetupPose", _olua_fun_spine_SkeletonRenderer_setBonesToSetupPose); + oluacls_func(L, "setDebugBonesEnabled", _olua_fun_spine_SkeletonRenderer_setDebugBonesEnabled); + oluacls_func(L, "setDebugBoundingRectEnabled", _olua_fun_spine_SkeletonRenderer_setDebugBoundingRectEnabled); + oluacls_func(L, "setDebugMeshesEnabled", _olua_fun_spine_SkeletonRenderer_setDebugMeshesEnabled); + oluacls_func(L, "setDebugSlotsEnabled", _olua_fun_spine_SkeletonRenderer_setDebugSlotsEnabled); + oluacls_func(L, "setSkin", _olua_fun_spine_SkeletonRenderer_setSkin); + oluacls_func(L, "setSlotsRange", _olua_fun_spine_SkeletonRenderer_setSlotsRange); + oluacls_func(L, "setSlotsToSetupPose", _olua_fun_spine_SkeletonRenderer_setSlotsToSetupPose); + oluacls_func(L, "setTimeScale", _olua_fun_spine_SkeletonRenderer_setTimeScale); + oluacls_func(L, "setToSetupPose", _olua_fun_spine_SkeletonRenderer_setToSetupPose); + oluacls_func(L, "setTwoColorTint", _olua_fun_spine_SkeletonRenderer_setTwoColorTint); + oluacls_func(L, "updateWorldTransform", _olua_fun_spine_SkeletonRenderer_updateWorldTransform); + oluacls_prop(L, "blendFunc", _olua_fun_spine_SkeletonRenderer_getBlendFunc, _olua_fun_spine_SkeletonRenderer_setBlendFunc); + oluacls_prop(L, "debugBonesEnabled", _olua_fun_spine_SkeletonRenderer_getDebugBonesEnabled, _olua_fun_spine_SkeletonRenderer_setDebugBonesEnabled); + oluacls_prop(L, "debugBoundingRectEnabled", _olua_fun_spine_SkeletonRenderer_getDebugBoundingRectEnabled, _olua_fun_spine_SkeletonRenderer_setDebugBoundingRectEnabled); + oluacls_prop(L, "debugMeshesEnabled", _olua_fun_spine_SkeletonRenderer_getDebugMeshesEnabled, _olua_fun_spine_SkeletonRenderer_setDebugMeshesEnabled); + oluacls_prop(L, "debugSlotsEnabled", _olua_fun_spine_SkeletonRenderer_getDebugSlotsEnabled, _olua_fun_spine_SkeletonRenderer_setDebugSlotsEnabled); + oluacls_prop(L, "skeleton", _olua_fun_spine_SkeletonRenderer_getSkeleton, nullptr); + oluacls_prop(L, "timeScale", _olua_fun_spine_SkeletonRenderer_getTimeScale, _olua_fun_spine_SkeletonRenderer_setTimeScale); + oluacls_prop(L, "twoColorTint", _olua_fun_spine_SkeletonRenderer_isTwoColorTint, _olua_fun_spine_SkeletonRenderer_setTwoColorTint); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_spine_SkeletonRenderer(lua_State *L) +{ + olua_require(L, "spine", luaopen_spine); + if (!olua_getclass(L, "spine.SkeletonRenderer")) { + luaL_error(L, "class not found: spine::SkeletonRenderer"); + } return 1; } OLUA_END_DECLS -static int _spine_StartListener___call(lua_State *L) +static int _olua_fun_spine_StartListener___call(lua_State *L) { olua_startinvoke(L); @@ -16821,17 +17797,26 @@ static int _spine_StartListener___call(lua_State *L) return 1; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_spine_StartListener(lua_State *L) +static int _olua_cls_spine_StartListener(lua_State *L) { oluacls_class(L, "spine.StartListener"); - oluacls_func(L, "__call", _spine_StartListener___call); + oluacls_func(L, "__call", _olua_fun_spine_StartListener___call); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_spine_StartListener(lua_State *L) +{ + olua_require(L, "spine", luaopen_spine); + if (!olua_getclass(L, "spine.StartListener")) { + luaL_error(L, "class not found: spine::StartListener"); + } return 1; } OLUA_END_DECLS -static int _spine_InterruptListener___call(lua_State *L) +static int _olua_fun_spine_InterruptListener___call(lua_State *L) { olua_startinvoke(L); @@ -16843,17 +17828,26 @@ static int _spine_InterruptListener___call(lua_State *L) return 1; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_spine_InterruptListener(lua_State *L) +static int _olua_cls_spine_InterruptListener(lua_State *L) { oluacls_class(L, "spine.InterruptListener"); - oluacls_func(L, "__call", _spine_InterruptListener___call); + oluacls_func(L, "__call", _olua_fun_spine_InterruptListener___call); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_spine_InterruptListener(lua_State *L) +{ + olua_require(L, "spine", luaopen_spine); + if (!olua_getclass(L, "spine.InterruptListener")) { + luaL_error(L, "class not found: spine::InterruptListener"); + } return 1; } OLUA_END_DECLS -static int _spine_EndListener___call(lua_State *L) +static int _olua_fun_spine_EndListener___call(lua_State *L) { olua_startinvoke(L); @@ -16865,17 +17859,26 @@ static int _spine_EndListener___call(lua_State *L) return 1; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_spine_EndListener(lua_State *L) +static int _olua_cls_spine_EndListener(lua_State *L) { oluacls_class(L, "spine.EndListener"); - oluacls_func(L, "__call", _spine_EndListener___call); + oluacls_func(L, "__call", _olua_fun_spine_EndListener___call); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_spine_EndListener(lua_State *L) +{ + olua_require(L, "spine", luaopen_spine); + if (!olua_getclass(L, "spine.EndListener")) { + luaL_error(L, "class not found: spine::EndListener"); + } + return 1; +} OLUA_END_DECLS -static int _spine_DisposeListener___call(lua_State *L) +static int _olua_fun_spine_DisposeListener___call(lua_State *L) { olua_startinvoke(L); @@ -16887,17 +17890,26 @@ static int _spine_DisposeListener___call(lua_State *L) return 1; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_spine_DisposeListener(lua_State *L) +static int _olua_cls_spine_DisposeListener(lua_State *L) { oluacls_class(L, "spine.DisposeListener"); - oluacls_func(L, "__call", _spine_DisposeListener___call); + oluacls_func(L, "__call", _olua_fun_spine_DisposeListener___call); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_spine_DisposeListener(lua_State *L) +{ + olua_require(L, "spine", luaopen_spine); + if (!olua_getclass(L, "spine.DisposeListener")) { + luaL_error(L, "class not found: spine::DisposeListener"); + } return 1; } OLUA_END_DECLS -static int _spine_CompleteListener___call(lua_State *L) +static int _olua_fun_spine_CompleteListener___call(lua_State *L) { olua_startinvoke(L); @@ -16909,17 +17921,26 @@ static int _spine_CompleteListener___call(lua_State *L) return 1; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_spine_CompleteListener(lua_State *L) +static int _olua_cls_spine_CompleteListener(lua_State *L) { oluacls_class(L, "spine.CompleteListener"); - oluacls_func(L, "__call", _spine_CompleteListener___call); + oluacls_func(L, "__call", _olua_fun_spine_CompleteListener___call); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_spine_CompleteListener(lua_State *L) +{ + olua_require(L, "spine", luaopen_spine); + if (!olua_getclass(L, "spine.CompleteListener")) { + luaL_error(L, "class not found: spine::CompleteListener"); + } return 1; } OLUA_END_DECLS -static int _spine_EventListener___call(lua_State *L) +static int _olua_fun_spine_EventListener___call(lua_State *L) { olua_startinvoke(L); @@ -16931,17 +17952,26 @@ static int _spine_EventListener___call(lua_State *L) return 1; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_spine_EventListener(lua_State *L) +static int _olua_cls_spine_EventListener(lua_State *L) { oluacls_class(L, "spine.EventListener"); - oluacls_func(L, "__call", _spine_EventListener___call); + oluacls_func(L, "__call", _olua_fun_spine_EventListener___call); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_spine_EventListener(lua_State *L) +{ + olua_require(L, "spine", luaopen_spine); + if (!olua_getclass(L, "spine.EventListener")) { + luaL_error(L, "class not found: spine::EventListener"); + } return 1; } OLUA_END_DECLS -static int _spine_UpdateWorldTransformsListener___call(lua_State *L) +static int _olua_fun_spine_UpdateWorldTransformsListener___call(lua_State *L) { olua_startinvoke(L); @@ -16953,17 +17983,26 @@ static int _spine_UpdateWorldTransformsListener___call(lua_State *L) return 1; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_spine_UpdateWorldTransformsListener(lua_State *L) +static int _olua_cls_spine_UpdateWorldTransformsListener(lua_State *L) { oluacls_class(L, "spine.UpdateWorldTransformsListener"); - oluacls_func(L, "__call", _spine_UpdateWorldTransformsListener___call); + oluacls_func(L, "__call", _olua_fun_spine_UpdateWorldTransformsListener___call); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_spine_UpdateWorldTransformsListener(lua_State *L) +{ + olua_require(L, "spine", luaopen_spine); + if (!olua_getclass(L, "spine.UpdateWorldTransformsListener")) { + luaL_error(L, "class not found: spine::UpdateWorldTransformsListener"); + } + return 1; +} OLUA_END_DECLS -static int _spine_SkeletonAnimation_addAnimation$1(lua_State *L) +static int _olua_fun_spine_SkeletonAnimation_addAnimation$1(lua_State *L) { olua_startinvoke(L); @@ -16991,7 +18030,7 @@ static int _spine_SkeletonAnimation_addAnimation$1(lua_State *L) return num_ret; } -static int _spine_SkeletonAnimation_addAnimation$2(lua_State *L) +static int _olua_fun_spine_SkeletonAnimation_addAnimation$2(lua_State *L) { olua_startinvoke(L); @@ -17005,7 +18044,7 @@ static int _spine_SkeletonAnimation_addAnimation$2(lua_State *L) olua_check_string(L, 3, &arg2); olua_check_bool(L, 4, &arg3); - // @addref(trackEntries |) spine::TrackEntry *addAnimation(int trackIndex, const std::string &name, bool loop, @optional float delay) + // @addref(trackEntries |) spine::TrackEntry *addAnimation(int trackIndex, const std::string &name, bool loop) spine::TrackEntry *ret = self->addAnimation(arg1, arg2, arg3); int num_ret = olua_push_object(L, ret, "spine.TrackEntry"); @@ -17017,21 +18056,21 @@ static int _spine_SkeletonAnimation_addAnimation$2(lua_State *L) return num_ret; } -static int _spine_SkeletonAnimation_addAnimation(lua_State *L) +static int _olua_fun_spine_SkeletonAnimation_addAnimation(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 3) { // if ((olua_is_integer(L, 2)) && (olua_is_string(L, 3)) && (olua_is_bool(L, 4))) { - // @addref(trackEntries |) spine::TrackEntry *addAnimation(int trackIndex, const std::string &name, bool loop, @optional float delay) - return _spine_SkeletonAnimation_addAnimation$2(L); + // @addref(trackEntries |) spine::TrackEntry *addAnimation(int trackIndex, const std::string &name, bool loop) + return _olua_fun_spine_SkeletonAnimation_addAnimation$2(L); // } } if (num_args == 4) { // if ((olua_is_integer(L, 2)) && (olua_is_string(L, 3)) && (olua_is_bool(L, 4)) && (olua_is_number(L, 5))) { // @addref(trackEntries |) spine::TrackEntry *addAnimation(int trackIndex, const std::string &name, bool loop, @optional float delay) - return _spine_SkeletonAnimation_addAnimation$1(L); + return _olua_fun_spine_SkeletonAnimation_addAnimation$1(L); // } } @@ -17040,7 +18079,7 @@ static int _spine_SkeletonAnimation_addAnimation(lua_State *L) return 0; } -static int _spine_SkeletonAnimation_addEmptyAnimation$1(lua_State *L) +static int _olua_fun_spine_SkeletonAnimation_addEmptyAnimation$1(lua_State *L) { olua_startinvoke(L); @@ -17066,7 +18105,7 @@ static int _spine_SkeletonAnimation_addEmptyAnimation$1(lua_State *L) return num_ret; } -static int _spine_SkeletonAnimation_addEmptyAnimation$2(lua_State *L) +static int _olua_fun_spine_SkeletonAnimation_addEmptyAnimation$2(lua_State *L) { olua_startinvoke(L); @@ -17078,7 +18117,7 @@ static int _spine_SkeletonAnimation_addEmptyAnimation$2(lua_State *L) olua_check_integer(L, 2, &arg1); olua_check_number(L, 3, &arg2); - // @addref(trackEntries |) spine::TrackEntry *addEmptyAnimation(int trackIndex, float mixDuration, @optional float delay) + // @addref(trackEntries |) spine::TrackEntry *addEmptyAnimation(int trackIndex, float mixDuration) spine::TrackEntry *ret = self->addEmptyAnimation(arg1, arg2); int num_ret = olua_push_object(L, ret, "spine.TrackEntry"); @@ -17090,21 +18129,21 @@ static int _spine_SkeletonAnimation_addEmptyAnimation$2(lua_State *L) return num_ret; } -static int _spine_SkeletonAnimation_addEmptyAnimation(lua_State *L) +static int _olua_fun_spine_SkeletonAnimation_addEmptyAnimation(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 2) { // if ((olua_is_integer(L, 2)) && (olua_is_number(L, 3))) { - // @addref(trackEntries |) spine::TrackEntry *addEmptyAnimation(int trackIndex, float mixDuration, @optional float delay) - return _spine_SkeletonAnimation_addEmptyAnimation$2(L); + // @addref(trackEntries |) spine::TrackEntry *addEmptyAnimation(int trackIndex, float mixDuration) + return _olua_fun_spine_SkeletonAnimation_addEmptyAnimation$2(L); // } } if (num_args == 3) { // if ((olua_is_integer(L, 2)) && (olua_is_number(L, 3)) && (olua_is_number(L, 4))) { // @addref(trackEntries |) spine::TrackEntry *addEmptyAnimation(int trackIndex, float mixDuration, @optional float delay) - return _spine_SkeletonAnimation_addEmptyAnimation$1(L); + return _olua_fun_spine_SkeletonAnimation_addEmptyAnimation$1(L); // } } @@ -17113,7 +18152,7 @@ static int _spine_SkeletonAnimation_addEmptyAnimation(lua_State *L) return 0; } -static int _spine_SkeletonAnimation_clearTrack$1(lua_State *L) +static int _olua_fun_spine_SkeletonAnimation_clearTrack$1(lua_State *L) { olua_startinvoke(L); @@ -17131,7 +18170,7 @@ static int _spine_SkeletonAnimation_clearTrack$1(lua_State *L) return 0; } -static int _spine_SkeletonAnimation_clearTrack$2(lua_State *L) +static int _olua_fun_spine_SkeletonAnimation_clearTrack$2(lua_State *L) { olua_startinvoke(L); @@ -17139,7 +18178,7 @@ static int _spine_SkeletonAnimation_clearTrack$2(lua_State *L) olua_to_object(L, 1, &self, "spine.SkeletonAnimation"); - // void clearTrack(@optional int trackIndex) + // void clearTrack() self->clearTrack(); olua_endinvoke(L); @@ -17147,19 +18186,19 @@ static int _spine_SkeletonAnimation_clearTrack$2(lua_State *L) return 0; } -static int _spine_SkeletonAnimation_clearTrack(lua_State *L) +static int _olua_fun_spine_SkeletonAnimation_clearTrack(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 0) { - // void clearTrack(@optional int trackIndex) - return _spine_SkeletonAnimation_clearTrack$2(L); + // void clearTrack() + return _olua_fun_spine_SkeletonAnimation_clearTrack$2(L); } if (num_args == 1) { // if ((olua_is_integer(L, 2))) { // void clearTrack(@optional int trackIndex) - return _spine_SkeletonAnimation_clearTrack$1(L); + return _olua_fun_spine_SkeletonAnimation_clearTrack$1(L); // } } @@ -17168,7 +18207,7 @@ static int _spine_SkeletonAnimation_clearTrack(lua_State *L) return 0; } -static int _spine_SkeletonAnimation_clearTracks(lua_State *L) +static int _olua_fun_spine_SkeletonAnimation_clearTracks(lua_State *L) { olua_startinvoke(L); @@ -17184,7 +18223,7 @@ static int _spine_SkeletonAnimation_clearTracks(lua_State *L) return 0; } -static int _spine_SkeletonAnimation_create(lua_State *L) +static int _olua_fun_spine_SkeletonAnimation_create(lua_State *L) { olua_startinvoke(L); @@ -17197,7 +18236,7 @@ static int _spine_SkeletonAnimation_create(lua_State *L) return num_ret; } -static int _spine_SkeletonAnimation_createWithBinaryFile$1(lua_State *L) +static int _olua_fun_spine_SkeletonAnimation_createWithBinaryFile$1(lua_State *L) { olua_startinvoke(L); @@ -17218,20 +18257,18 @@ static int _spine_SkeletonAnimation_createWithBinaryFile$1(lua_State *L) return num_ret; } -static int _spine_SkeletonAnimation_createWithBinaryFile$2(lua_State *L) +static int _olua_fun_spine_SkeletonAnimation_createWithBinaryFile$2(lua_State *L) { olua_startinvoke(L); std::string arg1; /** skeletonBinaryFile */ - std::string arg2; /** atlasFile */ - float arg3 = 0; /** scale */ + spine::Atlas *arg2 = nullptr; /** atlas */ olua_check_string(L, 1, &arg1); - olua_check_string(L, 2, &arg2); - olua_check_number(L, 3, &arg3); + olua_check_object(L, 2, &arg2, "spine.Atlas"); - // static spine::SkeletonAnimation *createWithBinaryFile(const std::string &skeletonBinaryFile, const std::string &atlasFile, @optional float scale) - spine::SkeletonAnimation *ret = spine::SkeletonAnimation::createWithBinaryFile(arg1, arg2, arg3); + // static spine::SkeletonAnimation *createWithBinaryFile(const std::string &skeletonBinaryFile, spine::Atlas *atlas) + spine::SkeletonAnimation *ret = spine::SkeletonAnimation::createWithBinaryFile(arg1, arg2); int num_ret = olua_push_object(L, ret, "spine.SkeletonAnimation"); olua_endinvoke(L); @@ -17239,18 +18276,20 @@ static int _spine_SkeletonAnimation_createWithBinaryFile$2(lua_State *L) return num_ret; } -static int _spine_SkeletonAnimation_createWithBinaryFile$3(lua_State *L) +static int _olua_fun_spine_SkeletonAnimation_createWithBinaryFile$3(lua_State *L) { olua_startinvoke(L); std::string arg1; /** skeletonBinaryFile */ - spine::Atlas *arg2 = nullptr; /** atlas */ + std::string arg2; /** atlasFile */ + float arg3 = 0; /** scale */ olua_check_string(L, 1, &arg1); - olua_check_object(L, 2, &arg2, "spine.Atlas"); + olua_check_string(L, 2, &arg2); + olua_check_number(L, 3, &arg3); - // static spine::SkeletonAnimation *createWithBinaryFile(const std::string &skeletonBinaryFile, spine::Atlas *atlas, @optional float scale) - spine::SkeletonAnimation *ret = spine::SkeletonAnimation::createWithBinaryFile(arg1, arg2); + // static spine::SkeletonAnimation *createWithBinaryFile(const std::string &skeletonBinaryFile, const std::string &atlasFile, @optional float scale) + spine::SkeletonAnimation *ret = spine::SkeletonAnimation::createWithBinaryFile(arg1, arg2, arg3); int num_ret = olua_push_object(L, ret, "spine.SkeletonAnimation"); olua_endinvoke(L); @@ -17258,7 +18297,7 @@ static int _spine_SkeletonAnimation_createWithBinaryFile$3(lua_State *L) return num_ret; } -static int _spine_SkeletonAnimation_createWithBinaryFile$4(lua_State *L) +static int _olua_fun_spine_SkeletonAnimation_createWithBinaryFile$4(lua_State *L) { olua_startinvoke(L); @@ -17268,7 +18307,7 @@ static int _spine_SkeletonAnimation_createWithBinaryFile$4(lua_State *L) olua_check_string(L, 1, &arg1); olua_check_string(L, 2, &arg2); - // static spine::SkeletonAnimation *createWithBinaryFile(const std::string &skeletonBinaryFile, const std::string &atlasFile, @optional float scale) + // static spine::SkeletonAnimation *createWithBinaryFile(const std::string &skeletonBinaryFile, const std::string &atlasFile) spine::SkeletonAnimation *ret = spine::SkeletonAnimation::createWithBinaryFile(arg1, arg2); int num_ret = olua_push_object(L, ret, "spine.SkeletonAnimation"); @@ -17277,31 +18316,31 @@ static int _spine_SkeletonAnimation_createWithBinaryFile$4(lua_State *L) return num_ret; } -static int _spine_SkeletonAnimation_createWithBinaryFile(lua_State *L) +static int _olua_fun_spine_SkeletonAnimation_createWithBinaryFile(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 2) { if ((olua_is_string(L, 1)) && (olua_is_object(L, 2, "spine.Atlas"))) { - // static spine::SkeletonAnimation *createWithBinaryFile(const std::string &skeletonBinaryFile, spine::Atlas *atlas, @optional float scale) - return _spine_SkeletonAnimation_createWithBinaryFile$3(L); + // static spine::SkeletonAnimation *createWithBinaryFile(const std::string &skeletonBinaryFile, spine::Atlas *atlas) + return _olua_fun_spine_SkeletonAnimation_createWithBinaryFile$2(L); } // if ((olua_is_string(L, 1)) && (olua_is_string(L, 2))) { - // static spine::SkeletonAnimation *createWithBinaryFile(const std::string &skeletonBinaryFile, const std::string &atlasFile, @optional float scale) - return _spine_SkeletonAnimation_createWithBinaryFile$4(L); + // static spine::SkeletonAnimation *createWithBinaryFile(const std::string &skeletonBinaryFile, const std::string &atlasFile) + return _olua_fun_spine_SkeletonAnimation_createWithBinaryFile$4(L); // } } if (num_args == 3) { if ((olua_is_string(L, 1)) && (olua_is_object(L, 2, "spine.Atlas")) && (olua_is_number(L, 3))) { // static spine::SkeletonAnimation *createWithBinaryFile(const std::string &skeletonBinaryFile, spine::Atlas *atlas, @optional float scale) - return _spine_SkeletonAnimation_createWithBinaryFile$1(L); + return _olua_fun_spine_SkeletonAnimation_createWithBinaryFile$1(L); } // if ((olua_is_string(L, 1)) && (olua_is_string(L, 2)) && (olua_is_number(L, 3))) { // static spine::SkeletonAnimation *createWithBinaryFile(const std::string &skeletonBinaryFile, const std::string &atlasFile, @optional float scale) - return _spine_SkeletonAnimation_createWithBinaryFile$2(L); + return _olua_fun_spine_SkeletonAnimation_createWithBinaryFile$3(L); // } } @@ -17310,7 +18349,7 @@ static int _spine_SkeletonAnimation_createWithBinaryFile(lua_State *L) return 0; } -static int _spine_SkeletonAnimation_createWithData$1(lua_State *L) +static int _olua_fun_spine_SkeletonAnimation_createWithData$1(lua_State *L) { olua_startinvoke(L); @@ -17332,7 +18371,7 @@ static int _spine_SkeletonAnimation_createWithData$1(lua_State *L) return num_ret; } -static int _spine_SkeletonAnimation_createWithData$2(lua_State *L) +static int _olua_fun_spine_SkeletonAnimation_createWithData$2(lua_State *L) { olua_startinvoke(L); @@ -17340,7 +18379,7 @@ static int _spine_SkeletonAnimation_createWithData$2(lua_State *L) olua_check_object(L, 1, &arg1, "spine.SkeletonData"); - // static spine::SkeletonAnimation *createWithData(@addref(skeletonData ^) spine::SkeletonData *skeletonData, @optional bool ownsSkeletonData) + // static spine::SkeletonAnimation *createWithData(@addref(skeletonData ^) spine::SkeletonData *skeletonData) spine::SkeletonAnimation *ret = spine::SkeletonAnimation::createWithData(arg1); int num_ret = olua_push_object(L, ret, "spine.SkeletonAnimation"); @@ -17352,21 +18391,21 @@ static int _spine_SkeletonAnimation_createWithData$2(lua_State *L) return num_ret; } -static int _spine_SkeletonAnimation_createWithData(lua_State *L) +static int _olua_fun_spine_SkeletonAnimation_createWithData(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 1) { // if ((olua_is_object(L, 1, "spine.SkeletonData"))) { - // static spine::SkeletonAnimation *createWithData(@addref(skeletonData ^) spine::SkeletonData *skeletonData, @optional bool ownsSkeletonData) - return _spine_SkeletonAnimation_createWithData$2(L); + // static spine::SkeletonAnimation *createWithData(@addref(skeletonData ^) spine::SkeletonData *skeletonData) + return _olua_fun_spine_SkeletonAnimation_createWithData$2(L); // } } if (num_args == 2) { // if ((olua_is_object(L, 1, "spine.SkeletonData")) && (olua_is_bool(L, 2))) { // static spine::SkeletonAnimation *createWithData(@addref(skeletonData ^) spine::SkeletonData *skeletonData, @optional bool ownsSkeletonData) - return _spine_SkeletonAnimation_createWithData$1(L); + return _olua_fun_spine_SkeletonAnimation_createWithData$1(L); // } } @@ -17375,7 +18414,7 @@ static int _spine_SkeletonAnimation_createWithData(lua_State *L) return 0; } -static int _spine_SkeletonAnimation_createWithJsonFile$1(lua_State *L) +static int _olua_fun_spine_SkeletonAnimation_createWithJsonFile$1(lua_State *L) { olua_startinvoke(L); @@ -17396,20 +18435,18 @@ static int _spine_SkeletonAnimation_createWithJsonFile$1(lua_State *L) return num_ret; } -static int _spine_SkeletonAnimation_createWithJsonFile$2(lua_State *L) +static int _olua_fun_spine_SkeletonAnimation_createWithJsonFile$2(lua_State *L) { olua_startinvoke(L); std::string arg1; /** skeletonJsonFile */ - std::string arg2; /** atlasFile */ - float arg3 = 0; /** scale */ + spine::Atlas *arg2 = nullptr; /** atlas */ olua_check_string(L, 1, &arg1); - olua_check_string(L, 2, &arg2); - olua_check_number(L, 3, &arg3); + olua_check_object(L, 2, &arg2, "spine.Atlas"); - // static spine::SkeletonAnimation *createWithJsonFile(const std::string &skeletonJsonFile, const std::string &atlasFile, @optional float scale) - spine::SkeletonAnimation *ret = spine::SkeletonAnimation::createWithJsonFile(arg1, arg2, arg3); + // static spine::SkeletonAnimation *createWithJsonFile(const std::string &skeletonJsonFile, spine::Atlas *atlas) + spine::SkeletonAnimation *ret = spine::SkeletonAnimation::createWithJsonFile(arg1, arg2); int num_ret = olua_push_object(L, ret, "spine.SkeletonAnimation"); olua_endinvoke(L); @@ -17417,18 +18454,20 @@ static int _spine_SkeletonAnimation_createWithJsonFile$2(lua_State *L) return num_ret; } -static int _spine_SkeletonAnimation_createWithJsonFile$3(lua_State *L) +static int _olua_fun_spine_SkeletonAnimation_createWithJsonFile$3(lua_State *L) { olua_startinvoke(L); std::string arg1; /** skeletonJsonFile */ - spine::Atlas *arg2 = nullptr; /** atlas */ + std::string arg2; /** atlasFile */ + float arg3 = 0; /** scale */ olua_check_string(L, 1, &arg1); - olua_check_object(L, 2, &arg2, "spine.Atlas"); + olua_check_string(L, 2, &arg2); + olua_check_number(L, 3, &arg3); - // static spine::SkeletonAnimation *createWithJsonFile(const std::string &skeletonJsonFile, spine::Atlas *atlas, @optional float scale) - spine::SkeletonAnimation *ret = spine::SkeletonAnimation::createWithJsonFile(arg1, arg2); + // static spine::SkeletonAnimation *createWithJsonFile(const std::string &skeletonJsonFile, const std::string &atlasFile, @optional float scale) + spine::SkeletonAnimation *ret = spine::SkeletonAnimation::createWithJsonFile(arg1, arg2, arg3); int num_ret = olua_push_object(L, ret, "spine.SkeletonAnimation"); olua_endinvoke(L); @@ -17436,7 +18475,7 @@ static int _spine_SkeletonAnimation_createWithJsonFile$3(lua_State *L) return num_ret; } -static int _spine_SkeletonAnimation_createWithJsonFile$4(lua_State *L) +static int _olua_fun_spine_SkeletonAnimation_createWithJsonFile$4(lua_State *L) { olua_startinvoke(L); @@ -17446,7 +18485,7 @@ static int _spine_SkeletonAnimation_createWithJsonFile$4(lua_State *L) olua_check_string(L, 1, &arg1); olua_check_string(L, 2, &arg2); - // static spine::SkeletonAnimation *createWithJsonFile(const std::string &skeletonJsonFile, const std::string &atlasFile, @optional float scale) + // static spine::SkeletonAnimation *createWithJsonFile(const std::string &skeletonJsonFile, const std::string &atlasFile) spine::SkeletonAnimation *ret = spine::SkeletonAnimation::createWithJsonFile(arg1, arg2); int num_ret = olua_push_object(L, ret, "spine.SkeletonAnimation"); @@ -17455,31 +18494,31 @@ static int _spine_SkeletonAnimation_createWithJsonFile$4(lua_State *L) return num_ret; } -static int _spine_SkeletonAnimation_createWithJsonFile(lua_State *L) +static int _olua_fun_spine_SkeletonAnimation_createWithJsonFile(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 2) { if ((olua_is_string(L, 1)) && (olua_is_object(L, 2, "spine.Atlas"))) { - // static spine::SkeletonAnimation *createWithJsonFile(const std::string &skeletonJsonFile, spine::Atlas *atlas, @optional float scale) - return _spine_SkeletonAnimation_createWithJsonFile$3(L); + // static spine::SkeletonAnimation *createWithJsonFile(const std::string &skeletonJsonFile, spine::Atlas *atlas) + return _olua_fun_spine_SkeletonAnimation_createWithJsonFile$2(L); } // if ((olua_is_string(L, 1)) && (olua_is_string(L, 2))) { - // static spine::SkeletonAnimation *createWithJsonFile(const std::string &skeletonJsonFile, const std::string &atlasFile, @optional float scale) - return _spine_SkeletonAnimation_createWithJsonFile$4(L); + // static spine::SkeletonAnimation *createWithJsonFile(const std::string &skeletonJsonFile, const std::string &atlasFile) + return _olua_fun_spine_SkeletonAnimation_createWithJsonFile$4(L); // } } if (num_args == 3) { if ((olua_is_string(L, 1)) && (olua_is_object(L, 2, "spine.Atlas")) && (olua_is_number(L, 3))) { // static spine::SkeletonAnimation *createWithJsonFile(const std::string &skeletonJsonFile, spine::Atlas *atlas, @optional float scale) - return _spine_SkeletonAnimation_createWithJsonFile$1(L); + return _olua_fun_spine_SkeletonAnimation_createWithJsonFile$1(L); } // if ((olua_is_string(L, 1)) && (olua_is_string(L, 2)) && (olua_is_number(L, 3))) { // static spine::SkeletonAnimation *createWithJsonFile(const std::string &skeletonJsonFile, const std::string &atlasFile, @optional float scale) - return _spine_SkeletonAnimation_createWithJsonFile$2(L); + return _olua_fun_spine_SkeletonAnimation_createWithJsonFile$3(L); // } } @@ -17488,7 +18527,7 @@ static int _spine_SkeletonAnimation_createWithJsonFile(lua_State *L) return 0; } -static int _spine_SkeletonAnimation_findAnimation(lua_State *L) +static int _olua_fun_spine_SkeletonAnimation_findAnimation(lua_State *L) { olua_startinvoke(L); @@ -17507,7 +18546,7 @@ static int _spine_SkeletonAnimation_findAnimation(lua_State *L) return num_ret; } -static int _spine_SkeletonAnimation_getCurrent$1(lua_State *L) +static int _olua_fun_spine_SkeletonAnimation_getCurrent$1(lua_State *L) { olua_startinvoke(L); @@ -17529,7 +18568,7 @@ static int _spine_SkeletonAnimation_getCurrent$1(lua_State *L) return num_ret; } -static int _spine_SkeletonAnimation_getCurrent$2(lua_State *L) +static int _olua_fun_spine_SkeletonAnimation_getCurrent$2(lua_State *L) { olua_startinvoke(L); @@ -17537,7 +18576,7 @@ static int _spine_SkeletonAnimation_getCurrent$2(lua_State *L) olua_to_object(L, 1, &self, "spine.SkeletonAnimation"); - // @addref(trackEntries |) spine::TrackEntry *getCurrent(@optional int trackIndex) + // @addref(trackEntries |) spine::TrackEntry *getCurrent() spine::TrackEntry *ret = self->getCurrent(); int num_ret = olua_push_object(L, ret, "spine.TrackEntry"); @@ -17549,19 +18588,19 @@ static int _spine_SkeletonAnimation_getCurrent$2(lua_State *L) return num_ret; } -static int _spine_SkeletonAnimation_getCurrent(lua_State *L) +static int _olua_fun_spine_SkeletonAnimation_getCurrent(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 0) { - // @addref(trackEntries |) spine::TrackEntry *getCurrent(@optional int trackIndex) - return _spine_SkeletonAnimation_getCurrent$2(L); + // @addref(trackEntries |) spine::TrackEntry *getCurrent() + return _olua_fun_spine_SkeletonAnimation_getCurrent$2(L); } if (num_args == 1) { // if ((olua_is_integer(L, 2))) { // @addref(trackEntries |) spine::TrackEntry *getCurrent(@optional int trackIndex) - return _spine_SkeletonAnimation_getCurrent$1(L); + return _olua_fun_spine_SkeletonAnimation_getCurrent$1(L); // } } @@ -17570,7 +18609,7 @@ static int _spine_SkeletonAnimation_getCurrent(lua_State *L) return 0; } -static int _spine_SkeletonAnimation_getState(lua_State *L) +static int _olua_fun_spine_SkeletonAnimation_getState(lua_State *L) { olua_startinvoke(L); @@ -17590,11 +18629,11 @@ static int _spine_SkeletonAnimation_getState(lua_State *L) return num_ret; } -static int _spine_SkeletonAnimation_new(lua_State *L) +static int _olua_fun_spine_SkeletonAnimation_new(lua_State *L) { olua_startinvoke(L); - // SkeletonAnimation() + // spine::SkeletonAnimation() spine::SkeletonAnimation *ret = new spine::SkeletonAnimation(); int num_ret = olua_push_object(L, ret, "spine.SkeletonAnimation"); olua_postnew(L, ret); @@ -17604,7 +18643,7 @@ static int _spine_SkeletonAnimation_new(lua_State *L) return num_ret; } -static int _spine_SkeletonAnimation_onAnimationStateEvent(lua_State *L) +static int _olua_fun_spine_SkeletonAnimation_onAnimationStateEvent(lua_State *L) { olua_startinvoke(L); @@ -17626,7 +18665,7 @@ static int _spine_SkeletonAnimation_onAnimationStateEvent(lua_State *L) return 0; } -static int _spine_SkeletonAnimation_onTrackEntryEvent(lua_State *L) +static int _olua_fun_spine_SkeletonAnimation_onTrackEntryEvent(lua_State *L) { olua_startinvoke(L); @@ -17648,7 +18687,7 @@ static int _spine_SkeletonAnimation_onTrackEntryEvent(lua_State *L) return 0; } -static int _spine_SkeletonAnimation_setAnimation(lua_State *L) +static int _olua_fun_spine_SkeletonAnimation_setAnimation(lua_State *L) { olua_startinvoke(L); @@ -17674,7 +18713,7 @@ static int _spine_SkeletonAnimation_setAnimation(lua_State *L) return num_ret; } -static int _spine_SkeletonAnimation_setAnimationStateData(lua_State *L) +static int _olua_fun_spine_SkeletonAnimation_setAnimationStateData(lua_State *L) { olua_startinvoke(L); @@ -17692,7 +18731,7 @@ static int _spine_SkeletonAnimation_setAnimationStateData(lua_State *L) return 0; } -static int _spine_SkeletonAnimation_setCompleteListener(lua_State *L) +static int _olua_fun_spine_SkeletonAnimation_setCompleteListener(lua_State *L) { olua_startinvoke(L); @@ -17704,15 +18743,16 @@ static int _spine_SkeletonAnimation_setCompleteListener(lua_State *L) void *cb_store = (void *)self; std::string cb_tag = "CompleteListener"; - std::string cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + std::string cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](spine::TrackEntry *arg1) { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](spine::TrackEntry *cb_arg1) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); if (olua_contextequal(L, cb_ctx)) { int top = lua_gettop(L); - olua_push_object(L, arg1, "spine.TrackEntry"); + olua_push_object(L, cb_arg1, "spine.TrackEntry"); olua_callback(L, cb_store, cb_name.c_str(), 1); @@ -17728,7 +18768,7 @@ static int _spine_SkeletonAnimation_setCompleteListener(lua_State *L) return 0; } -static int _spine_SkeletonAnimation_setDisposeListener(lua_State *L) +static int _olua_fun_spine_SkeletonAnimation_setDisposeListener(lua_State *L) { olua_startinvoke(L); @@ -17740,15 +18780,16 @@ static int _spine_SkeletonAnimation_setDisposeListener(lua_State *L) void *cb_store = (void *)self; std::string cb_tag = "DisposeListener"; - std::string cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + std::string cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](spine::TrackEntry *arg1) { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](spine::TrackEntry *cb_arg1) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); if (olua_contextequal(L, cb_ctx)) { int top = lua_gettop(L); - olua_push_object(L, arg1, "spine.TrackEntry"); + olua_push_object(L, cb_arg1, "spine.TrackEntry"); olua_callback(L, cb_store, cb_name.c_str(), 1); @@ -17764,7 +18805,7 @@ static int _spine_SkeletonAnimation_setDisposeListener(lua_State *L) return 0; } -static int _spine_SkeletonAnimation_setEmptyAnimation(lua_State *L) +static int _olua_fun_spine_SkeletonAnimation_setEmptyAnimation(lua_State *L) { olua_startinvoke(L); @@ -17788,7 +18829,7 @@ static int _spine_SkeletonAnimation_setEmptyAnimation(lua_State *L) return num_ret; } -static int _spine_SkeletonAnimation_setEmptyAnimations(lua_State *L) +static int _olua_fun_spine_SkeletonAnimation_setEmptyAnimations(lua_State *L) { olua_startinvoke(L); @@ -17806,7 +18847,7 @@ static int _spine_SkeletonAnimation_setEmptyAnimations(lua_State *L) return 0; } -static int _spine_SkeletonAnimation_setEndListener(lua_State *L) +static int _olua_fun_spine_SkeletonAnimation_setEndListener(lua_State *L) { olua_startinvoke(L); @@ -17818,15 +18859,16 @@ static int _spine_SkeletonAnimation_setEndListener(lua_State *L) void *cb_store = (void *)self; std::string cb_tag = "EndListener"; - std::string cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + std::string cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](spine::TrackEntry *arg1) { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](spine::TrackEntry *cb_arg1) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); if (olua_contextequal(L, cb_ctx)) { int top = lua_gettop(L); - olua_push_object(L, arg1, "spine.TrackEntry"); + olua_push_object(L, cb_arg1, "spine.TrackEntry"); olua_callback(L, cb_store, cb_name.c_str(), 1); @@ -17842,7 +18884,7 @@ static int _spine_SkeletonAnimation_setEndListener(lua_State *L) return 0; } -static int _spine_SkeletonAnimation_setEventListener(lua_State *L) +static int _olua_fun_spine_SkeletonAnimation_setEventListener(lua_State *L) { olua_startinvoke(L); @@ -17854,16 +18896,17 @@ static int _spine_SkeletonAnimation_setEventListener(lua_State *L) void *cb_store = (void *)self; std::string cb_tag = "EventListener"; - std::string cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + std::string cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](spine::TrackEntry *arg1, spine::Event *arg2) { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](spine::TrackEntry *cb_arg1, spine::Event *cb_arg2) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); if (olua_contextequal(L, cb_ctx)) { int top = lua_gettop(L); - olua_push_object(L, arg1, "spine.TrackEntry"); - olua_push_object(L, arg2, "spine.Event"); + olua_push_object(L, cb_arg1, "spine.TrackEntry"); + olua_push_object(L, cb_arg2, "spine.Event"); olua_callback(L, cb_store, cb_name.c_str(), 2); @@ -17879,7 +18922,7 @@ static int _spine_SkeletonAnimation_setEventListener(lua_State *L) return 0; } -static int _spine_SkeletonAnimation_setInterruptListener(lua_State *L) +static int _olua_fun_spine_SkeletonAnimation_setInterruptListener(lua_State *L) { olua_startinvoke(L); @@ -17891,15 +18934,16 @@ static int _spine_SkeletonAnimation_setInterruptListener(lua_State *L) void *cb_store = (void *)self; std::string cb_tag = "InterruptListener"; - std::string cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + std::string cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](spine::TrackEntry *arg1) { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](spine::TrackEntry *cb_arg1) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); if (olua_contextequal(L, cb_ctx)) { int top = lua_gettop(L); - olua_push_object(L, arg1, "spine.TrackEntry"); + olua_push_object(L, cb_arg1, "spine.TrackEntry"); olua_callback(L, cb_store, cb_name.c_str(), 1); @@ -17915,7 +18959,7 @@ static int _spine_SkeletonAnimation_setInterruptListener(lua_State *L) return 0; } -static int _spine_SkeletonAnimation_setMix(lua_State *L) +static int _olua_fun_spine_SkeletonAnimation_setMix(lua_State *L) { olua_startinvoke(L); @@ -17937,7 +18981,7 @@ static int _spine_SkeletonAnimation_setMix(lua_State *L) return 0; } -static int _spine_SkeletonAnimation_setPostUpdateWorldTransformsListener(lua_State *L) +static int _olua_fun_spine_SkeletonAnimation_setPostUpdateWorldTransformsListener(lua_State *L) { olua_startinvoke(L); @@ -17949,9 +18993,10 @@ static int _spine_SkeletonAnimation_setPostUpdateWorldTransformsListener(lua_Sta void *cb_store = (void *)self; std::string cb_tag = "PostUpdateWorldTransformsListener"; - std::string cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + std::string cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](spine::SkeletonAnimation *arg1) { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](spine::SkeletonAnimation *cb_arg1) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); @@ -17959,7 +19004,7 @@ static int _spine_SkeletonAnimation_setPostUpdateWorldTransformsListener(lua_Sta int top = lua_gettop(L); size_t last = olua_push_objpool(L); olua_enable_objpool(L); - olua_push_object(L, arg1, "spine.SkeletonAnimation"); + olua_push_object(L, cb_arg1, "spine.SkeletonAnimation"); olua_disable_objpool(L); olua_callback(L, cb_store, cb_name.c_str(), 1); @@ -17970,7 +19015,7 @@ static int _spine_SkeletonAnimation_setPostUpdateWorldTransformsListener(lua_Sta } }; - // void setPostUpdateWorldTransformsListener(@localvar const spine::UpdateWorldTransformsListener &listener) + // void setPostUpdateWorldTransformsListener(const spine::UpdateWorldTransformsListener &listener) self->setPostUpdateWorldTransformsListener(arg1); olua_endinvoke(L); @@ -17978,7 +19023,7 @@ static int _spine_SkeletonAnimation_setPostUpdateWorldTransformsListener(lua_Sta return 0; } -static int _spine_SkeletonAnimation_setPreUpdateWorldTransformsListener(lua_State *L) +static int _olua_fun_spine_SkeletonAnimation_setPreUpdateWorldTransformsListener(lua_State *L) { olua_startinvoke(L); @@ -17990,9 +19035,10 @@ static int _spine_SkeletonAnimation_setPreUpdateWorldTransformsListener(lua_Stat void *cb_store = (void *)self; std::string cb_tag = "PreUpdateWorldTransformsListener"; - std::string cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + std::string cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](spine::SkeletonAnimation *arg1) { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](spine::SkeletonAnimation *cb_arg1) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); @@ -18000,7 +19046,7 @@ static int _spine_SkeletonAnimation_setPreUpdateWorldTransformsListener(lua_Stat int top = lua_gettop(L); size_t last = olua_push_objpool(L); olua_enable_objpool(L); - olua_push_object(L, arg1, "spine.SkeletonAnimation"); + olua_push_object(L, cb_arg1, "spine.SkeletonAnimation"); olua_disable_objpool(L); olua_callback(L, cb_store, cb_name.c_str(), 1); @@ -18011,7 +19057,7 @@ static int _spine_SkeletonAnimation_setPreUpdateWorldTransformsListener(lua_Stat } }; - // void setPreUpdateWorldTransformsListener(@localvar const spine::UpdateWorldTransformsListener &listener) + // void setPreUpdateWorldTransformsListener(const spine::UpdateWorldTransformsListener &listener) self->setPreUpdateWorldTransformsListener(arg1); olua_endinvoke(L); @@ -18019,7 +19065,7 @@ static int _spine_SkeletonAnimation_setPreUpdateWorldTransformsListener(lua_Stat return 0; } -static int _spine_SkeletonAnimation_setStartListener(lua_State *L) +static int _olua_fun_spine_SkeletonAnimation_setStartListener(lua_State *L) { olua_startinvoke(L); @@ -18031,15 +19077,16 @@ static int _spine_SkeletonAnimation_setStartListener(lua_State *L) void *cb_store = (void *)self; std::string cb_tag = "StartListener"; - std::string cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); + std::string cb_name = olua_setcallback(L, cb_store, 2, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](spine::TrackEntry *arg1) { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](spine::TrackEntry *cb_arg1) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); if (olua_contextequal(L, cb_ctx)) { int top = lua_gettop(L); - olua_push_object(L, arg1, "spine.TrackEntry"); + olua_push_object(L, cb_arg1, "spine.TrackEntry"); olua_callback(L, cb_store, cb_name.c_str(), 1); @@ -18055,7 +19102,7 @@ static int _spine_SkeletonAnimation_setStartListener(lua_State *L) return 0; } -static int _spine_SkeletonAnimation_setTrackCompleteListener(lua_State *L) +static int _olua_fun_spine_SkeletonAnimation_setTrackCompleteListener(lua_State *L) { olua_startinvoke(L); @@ -18069,15 +19116,16 @@ static int _spine_SkeletonAnimation_setTrackCompleteListener(lua_State *L) void *cb_store = (void *)self; std::string cb_tag = "TrackCompleteListener"; - std::string cb_name = olua_setcallback(L, cb_store, 3, cb_tag.c_str(), OLUA_TAG_REPLACE); + std::string cb_name = olua_setcallback(L, cb_store, 3, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg2 = [cb_store, cb_name, cb_ctx](spine::TrackEntry *arg1) { + // lua_State *ML = olua_mainthread(L); + arg2 = [cb_store, cb_name, cb_ctx /*, ML */](spine::TrackEntry *cb_arg1) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); if (olua_contextequal(L, cb_ctx)) { int top = lua_gettop(L); - olua_push_object(L, arg1, "spine.TrackEntry"); + olua_push_object(L, cb_arg1, "spine.TrackEntry"); olua_callback(L, cb_store, cb_name.c_str(), 1); @@ -18093,7 +19141,7 @@ static int _spine_SkeletonAnimation_setTrackCompleteListener(lua_State *L) return 0; } -static int _spine_SkeletonAnimation_setTrackDisposeListener(lua_State *L) +static int _olua_fun_spine_SkeletonAnimation_setTrackDisposeListener(lua_State *L) { olua_startinvoke(L); @@ -18107,15 +19155,16 @@ static int _spine_SkeletonAnimation_setTrackDisposeListener(lua_State *L) void *cb_store = (void *)self; std::string cb_tag = "TrackDisposeListener"; - std::string cb_name = olua_setcallback(L, cb_store, 3, cb_tag.c_str(), OLUA_TAG_REPLACE); + std::string cb_name = olua_setcallback(L, cb_store, 3, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg2 = [cb_store, cb_name, cb_ctx](spine::TrackEntry *arg1) { + // lua_State *ML = olua_mainthread(L); + arg2 = [cb_store, cb_name, cb_ctx /*, ML */](spine::TrackEntry *cb_arg1) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); if (olua_contextequal(L, cb_ctx)) { int top = lua_gettop(L); - olua_push_object(L, arg1, "spine.TrackEntry"); + olua_push_object(L, cb_arg1, "spine.TrackEntry"); olua_callback(L, cb_store, cb_name.c_str(), 1); @@ -18131,7 +19180,7 @@ static int _spine_SkeletonAnimation_setTrackDisposeListener(lua_State *L) return 0; } -static int _spine_SkeletonAnimation_setTrackEndListener(lua_State *L) +static int _olua_fun_spine_SkeletonAnimation_setTrackEndListener(lua_State *L) { olua_startinvoke(L); @@ -18145,15 +19194,16 @@ static int _spine_SkeletonAnimation_setTrackEndListener(lua_State *L) void *cb_store = (void *)self; std::string cb_tag = "TrackEndListener"; - std::string cb_name = olua_setcallback(L, cb_store, 3, cb_tag.c_str(), OLUA_TAG_REPLACE); + std::string cb_name = olua_setcallback(L, cb_store, 3, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg2 = [cb_store, cb_name, cb_ctx](spine::TrackEntry *arg1) { + // lua_State *ML = olua_mainthread(L); + arg2 = [cb_store, cb_name, cb_ctx /*, ML */](spine::TrackEntry *cb_arg1) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); if (olua_contextequal(L, cb_ctx)) { int top = lua_gettop(L); - olua_push_object(L, arg1, "spine.TrackEntry"); + olua_push_object(L, cb_arg1, "spine.TrackEntry"); olua_callback(L, cb_store, cb_name.c_str(), 1); @@ -18169,7 +19219,7 @@ static int _spine_SkeletonAnimation_setTrackEndListener(lua_State *L) return 0; } -static int _spine_SkeletonAnimation_setTrackEventListener(lua_State *L) +static int _olua_fun_spine_SkeletonAnimation_setTrackEventListener(lua_State *L) { olua_startinvoke(L); @@ -18183,16 +19233,17 @@ static int _spine_SkeletonAnimation_setTrackEventListener(lua_State *L) void *cb_store = (void *)self; std::string cb_tag = "TrackEventListener"; - std::string cb_name = olua_setcallback(L, cb_store, 3, cb_tag.c_str(), OLUA_TAG_REPLACE); + std::string cb_name = olua_setcallback(L, cb_store, 3, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg2 = [cb_store, cb_name, cb_ctx](spine::TrackEntry *arg1, spine::Event *arg2) { + // lua_State *ML = olua_mainthread(L); + arg2 = [cb_store, cb_name, cb_ctx /*, ML */](spine::TrackEntry *cb_arg1, spine::Event *cb_arg2) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); if (olua_contextequal(L, cb_ctx)) { int top = lua_gettop(L); - olua_push_object(L, arg1, "spine.TrackEntry"); - olua_push_object(L, arg2, "spine.Event"); + olua_push_object(L, cb_arg1, "spine.TrackEntry"); + olua_push_object(L, cb_arg2, "spine.Event"); olua_callback(L, cb_store, cb_name.c_str(), 2); @@ -18208,7 +19259,7 @@ static int _spine_SkeletonAnimation_setTrackEventListener(lua_State *L) return 0; } -static int _spine_SkeletonAnimation_setTrackInterruptListener(lua_State *L) +static int _olua_fun_spine_SkeletonAnimation_setTrackInterruptListener(lua_State *L) { olua_startinvoke(L); @@ -18222,15 +19273,16 @@ static int _spine_SkeletonAnimation_setTrackInterruptListener(lua_State *L) void *cb_store = (void *)self; std::string cb_tag = "TrackInterruptListener"; - std::string cb_name = olua_setcallback(L, cb_store, 3, cb_tag.c_str(), OLUA_TAG_REPLACE); + std::string cb_name = olua_setcallback(L, cb_store, 3, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg2 = [cb_store, cb_name, cb_ctx](spine::TrackEntry *arg1) { + // lua_State *ML = olua_mainthread(L); + arg2 = [cb_store, cb_name, cb_ctx /*, ML */](spine::TrackEntry *cb_arg1) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); if (olua_contextequal(L, cb_ctx)) { int top = lua_gettop(L); - olua_push_object(L, arg1, "spine.TrackEntry"); + olua_push_object(L, cb_arg1, "spine.TrackEntry"); olua_callback(L, cb_store, cb_name.c_str(), 1); @@ -18246,7 +19298,7 @@ static int _spine_SkeletonAnimation_setTrackInterruptListener(lua_State *L) return 0; } -static int _spine_SkeletonAnimation_setTrackStartListener(lua_State *L) +static int _olua_fun_spine_SkeletonAnimation_setTrackStartListener(lua_State *L) { olua_startinvoke(L); @@ -18260,15 +19312,16 @@ static int _spine_SkeletonAnimation_setTrackStartListener(lua_State *L) void *cb_store = (void *)self; std::string cb_tag = "TrackStartListener"; - std::string cb_name = olua_setcallback(L, cb_store, 3, cb_tag.c_str(), OLUA_TAG_REPLACE); + std::string cb_name = olua_setcallback(L, cb_store, 3, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg2 = [cb_store, cb_name, cb_ctx](spine::TrackEntry *arg1) { + // lua_State *ML = olua_mainthread(L); + arg2 = [cb_store, cb_name, cb_ctx /*, ML */](spine::TrackEntry *cb_arg1) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); if (olua_contextequal(L, cb_ctx)) { int top = lua_gettop(L); - olua_push_object(L, arg1, "spine.TrackEntry"); + olua_push_object(L, cb_arg1, "spine.TrackEntry"); olua_callback(L, cb_store, cb_name.c_str(), 1); @@ -18284,7 +19337,7 @@ static int _spine_SkeletonAnimation_setTrackStartListener(lua_State *L) return 0; } -static int _spine_SkeletonAnimation_setUpdateOnlyIfVisible(lua_State *L) +static int _olua_fun_spine_SkeletonAnimation_setUpdateOnlyIfVisible(lua_State *L) { olua_startinvoke(L); @@ -18302,46 +19355,55 @@ static int _spine_SkeletonAnimation_setUpdateOnlyIfVisible(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_spine_SkeletonAnimation(lua_State *L) +static int _olua_cls_spine_SkeletonAnimation(lua_State *L) { oluacls_class(L, "spine.SkeletonAnimation"); - oluacls_func(L, "addAnimation", _spine_SkeletonAnimation_addAnimation); - oluacls_func(L, "addEmptyAnimation", _spine_SkeletonAnimation_addEmptyAnimation); - oluacls_func(L, "clearTrack", _spine_SkeletonAnimation_clearTrack); - oluacls_func(L, "clearTracks", _spine_SkeletonAnimation_clearTracks); - oluacls_func(L, "create", _spine_SkeletonAnimation_create); - oluacls_func(L, "createWithBinaryFile", _spine_SkeletonAnimation_createWithBinaryFile); - oluacls_func(L, "createWithData", _spine_SkeletonAnimation_createWithData); - oluacls_func(L, "createWithJsonFile", _spine_SkeletonAnimation_createWithJsonFile); - oluacls_func(L, "findAnimation", _spine_SkeletonAnimation_findAnimation); - oluacls_func(L, "getCurrent", _spine_SkeletonAnimation_getCurrent); - oluacls_func(L, "getState", _spine_SkeletonAnimation_getState); - oluacls_func(L, "new", _spine_SkeletonAnimation_new); - oluacls_func(L, "onAnimationStateEvent", _spine_SkeletonAnimation_onAnimationStateEvent); - oluacls_func(L, "onTrackEntryEvent", _spine_SkeletonAnimation_onTrackEntryEvent); - oluacls_func(L, "setAnimation", _spine_SkeletonAnimation_setAnimation); - oluacls_func(L, "setAnimationStateData", _spine_SkeletonAnimation_setAnimationStateData); - oluacls_func(L, "setCompleteListener", _spine_SkeletonAnimation_setCompleteListener); - oluacls_func(L, "setDisposeListener", _spine_SkeletonAnimation_setDisposeListener); - oluacls_func(L, "setEmptyAnimation", _spine_SkeletonAnimation_setEmptyAnimation); - oluacls_func(L, "setEmptyAnimations", _spine_SkeletonAnimation_setEmptyAnimations); - oluacls_func(L, "setEndListener", _spine_SkeletonAnimation_setEndListener); - oluacls_func(L, "setEventListener", _spine_SkeletonAnimation_setEventListener); - oluacls_func(L, "setInterruptListener", _spine_SkeletonAnimation_setInterruptListener); - oluacls_func(L, "setMix", _spine_SkeletonAnimation_setMix); - oluacls_func(L, "setPostUpdateWorldTransformsListener", _spine_SkeletonAnimation_setPostUpdateWorldTransformsListener); - oluacls_func(L, "setPreUpdateWorldTransformsListener", _spine_SkeletonAnimation_setPreUpdateWorldTransformsListener); - oluacls_func(L, "setStartListener", _spine_SkeletonAnimation_setStartListener); - oluacls_func(L, "setTrackCompleteListener", _spine_SkeletonAnimation_setTrackCompleteListener); - oluacls_func(L, "setTrackDisposeListener", _spine_SkeletonAnimation_setTrackDisposeListener); - oluacls_func(L, "setTrackEndListener", _spine_SkeletonAnimation_setTrackEndListener); - oluacls_func(L, "setTrackEventListener", _spine_SkeletonAnimation_setTrackEventListener); - oluacls_func(L, "setTrackInterruptListener", _spine_SkeletonAnimation_setTrackInterruptListener); - oluacls_func(L, "setTrackStartListener", _spine_SkeletonAnimation_setTrackStartListener); - oluacls_func(L, "setUpdateOnlyIfVisible", _spine_SkeletonAnimation_setUpdateOnlyIfVisible); - oluacls_prop(L, "state", _spine_SkeletonAnimation_getState, nullptr); + oluacls_func(L, "addAnimation", _olua_fun_spine_SkeletonAnimation_addAnimation); + oluacls_func(L, "addEmptyAnimation", _olua_fun_spine_SkeletonAnimation_addEmptyAnimation); + oluacls_func(L, "clearTrack", _olua_fun_spine_SkeletonAnimation_clearTrack); + oluacls_func(L, "clearTracks", _olua_fun_spine_SkeletonAnimation_clearTracks); + oluacls_func(L, "create", _olua_fun_spine_SkeletonAnimation_create); + oluacls_func(L, "createWithBinaryFile", _olua_fun_spine_SkeletonAnimation_createWithBinaryFile); + oluacls_func(L, "createWithData", _olua_fun_spine_SkeletonAnimation_createWithData); + oluacls_func(L, "createWithJsonFile", _olua_fun_spine_SkeletonAnimation_createWithJsonFile); + oluacls_func(L, "findAnimation", _olua_fun_spine_SkeletonAnimation_findAnimation); + oluacls_func(L, "getCurrent", _olua_fun_spine_SkeletonAnimation_getCurrent); + oluacls_func(L, "getState", _olua_fun_spine_SkeletonAnimation_getState); + oluacls_func(L, "new", _olua_fun_spine_SkeletonAnimation_new); + oluacls_func(L, "onAnimationStateEvent", _olua_fun_spine_SkeletonAnimation_onAnimationStateEvent); + oluacls_func(L, "onTrackEntryEvent", _olua_fun_spine_SkeletonAnimation_onTrackEntryEvent); + oluacls_func(L, "setAnimation", _olua_fun_spine_SkeletonAnimation_setAnimation); + oluacls_func(L, "setAnimationStateData", _olua_fun_spine_SkeletonAnimation_setAnimationStateData); + oluacls_func(L, "setCompleteListener", _olua_fun_spine_SkeletonAnimation_setCompleteListener); + oluacls_func(L, "setDisposeListener", _olua_fun_spine_SkeletonAnimation_setDisposeListener); + oluacls_func(L, "setEmptyAnimation", _olua_fun_spine_SkeletonAnimation_setEmptyAnimation); + oluacls_func(L, "setEmptyAnimations", _olua_fun_spine_SkeletonAnimation_setEmptyAnimations); + oluacls_func(L, "setEndListener", _olua_fun_spine_SkeletonAnimation_setEndListener); + oluacls_func(L, "setEventListener", _olua_fun_spine_SkeletonAnimation_setEventListener); + oluacls_func(L, "setInterruptListener", _olua_fun_spine_SkeletonAnimation_setInterruptListener); + oluacls_func(L, "setMix", _olua_fun_spine_SkeletonAnimation_setMix); + oluacls_func(L, "setPostUpdateWorldTransformsListener", _olua_fun_spine_SkeletonAnimation_setPostUpdateWorldTransformsListener); + oluacls_func(L, "setPreUpdateWorldTransformsListener", _olua_fun_spine_SkeletonAnimation_setPreUpdateWorldTransformsListener); + oluacls_func(L, "setStartListener", _olua_fun_spine_SkeletonAnimation_setStartListener); + oluacls_func(L, "setTrackCompleteListener", _olua_fun_spine_SkeletonAnimation_setTrackCompleteListener); + oluacls_func(L, "setTrackDisposeListener", _olua_fun_spine_SkeletonAnimation_setTrackDisposeListener); + oluacls_func(L, "setTrackEndListener", _olua_fun_spine_SkeletonAnimation_setTrackEndListener); + oluacls_func(L, "setTrackEventListener", _olua_fun_spine_SkeletonAnimation_setTrackEventListener); + oluacls_func(L, "setTrackInterruptListener", _olua_fun_spine_SkeletonAnimation_setTrackInterruptListener); + oluacls_func(L, "setTrackStartListener", _olua_fun_spine_SkeletonAnimation_setTrackStartListener); + oluacls_func(L, "setUpdateOnlyIfVisible", _olua_fun_spine_SkeletonAnimation_setUpdateOnlyIfVisible); + oluacls_prop(L, "state", _olua_fun_spine_SkeletonAnimation_getState, nullptr); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_spine_SkeletonAnimation(lua_State *L) +{ + olua_require(L, "spine", luaopen_spine); + if (!olua_getclass(L, "spine.SkeletonAnimation")) { + luaL_error(L, "class not found: spine::SkeletonAnimation"); + } return 1; } OLUA_END_DECLS @@ -18349,93 +19411,93 @@ OLUA_END_DECLS OLUA_BEGIN_DECLS OLUA_LIB int luaopen_spine(lua_State *L) { - olua_require(L, "spine.EventType", luaopen_spine_EventType); - olua_require(L, "spine.AttachmentType", luaopen_spine_AttachmentType); - olua_require(L, "spine.BlendMode", luaopen_spine_BlendMode); - olua_require(L, "spine.PositionMode", luaopen_spine_PositionMode); - olua_require(L, "spine.SpacingMode", luaopen_spine_SpacingMode); - olua_require(L, "spine.RotateMode", luaopen_spine_RotateMode); - olua_require(L, "spine.MixBlend", luaopen_spine_MixBlend); - olua_require(L, "spine.MixDirection", luaopen_spine_MixDirection); - olua_require(L, "spine.Physics", luaopen_spine_Physics); - olua_require(L, "spine.Inherit", luaopen_spine_Inherit); - olua_require(L, "spine.SpineObject", luaopen_spine_SpineObject); - olua_require(L, "spine.Event", luaopen_spine_Event); - olua_require(L, "spine.EventData", luaopen_spine_EventData); - olua_require(L, "spine.Updatable", luaopen_spine_Updatable); - olua_require(L, "spine.AnimationStateListener", luaopen_spine_AnimationStateListener); - olua_require(L, "spine.AnimationState", luaopen_spine_AnimationState); - olua_require(L, "spine.AnimationStateData", luaopen_spine_AnimationStateData); - olua_require(L, "spine.Animation", luaopen_spine_Animation); - olua_require(L, "spine.Sequence", luaopen_spine_Sequence); - olua_require(L, "spine.SequenceMode", luaopen_spine_SequenceMode); - olua_require(L, "spine.TextureRegion", luaopen_spine_TextureRegion); - olua_require(L, "spine.ConstraintData", luaopen_spine_ConstraintData); - olua_require(L, "spine.IkConstraintData", luaopen_spine_IkConstraintData); - olua_require(L, "spine.BoneData", luaopen_spine_BoneData); - olua_require(L, "spine.SlotData", luaopen_spine_SlotData); - olua_require(L, "spine.IkConstraint", luaopen_spine_IkConstraint); - olua_require(L, "spine.TransformConstraint", luaopen_spine_TransformConstraint); - olua_require(L, "spine.TransformConstraintData", luaopen_spine_TransformConstraintData); - olua_require(L, "spine.PathConstraintData", luaopen_spine_PathConstraintData); - olua_require(L, "spine.SkeletonBounds", luaopen_spine_SkeletonBounds); - olua_require(L, "spine.SkeletonClipping", luaopen_spine_SkeletonClipping); - olua_require(L, "spine.PhysicsConstraint", luaopen_spine_PhysicsConstraint); - olua_require(L, "spine.PhysicsConstraintData", luaopen_spine_PhysicsConstraintData); - olua_require(L, "spine.Timeline", luaopen_spine_Timeline); - olua_require(L, "spine.CurveTimeline", luaopen_spine_CurveTimeline); - olua_require(L, "spine.CurveTimeline1", luaopen_spine_CurveTimeline1); - olua_require(L, "spine.CurveTimeline2", luaopen_spine_CurveTimeline2); - olua_require(L, "spine.AttachmentTimeline", luaopen_spine_AttachmentTimeline); - olua_require(L, "spine.RGBATimeline", luaopen_spine_RGBATimeline); - olua_require(L, "spine.RGBTimeline", luaopen_spine_RGBTimeline); - olua_require(L, "spine.AlphaTimeline", luaopen_spine_AlphaTimeline); - olua_require(L, "spine.RGBA2Timeline", luaopen_spine_RGBA2Timeline); - olua_require(L, "spine.RGB2Timeline", luaopen_spine_RGB2Timeline); - olua_require(L, "spine.DeformTimeline", luaopen_spine_DeformTimeline); - olua_require(L, "spine.DrawOrderTimeline", luaopen_spine_DrawOrderTimeline); - olua_require(L, "spine.EventTimeline", luaopen_spine_EventTimeline); - olua_require(L, "spine.ScaleXTimeline", luaopen_spine_ScaleXTimeline); - olua_require(L, "spine.ScaleYTimeline", luaopen_spine_ScaleYTimeline); - olua_require(L, "spine.ShearXTimeline", luaopen_spine_ShearXTimeline); - olua_require(L, "spine.ShearYTimeline", luaopen_spine_ShearYTimeline); - olua_require(L, "spine.TranslateXTimeline", luaopen_spine_TranslateXTimeline); - olua_require(L, "spine.TranslateYTimeline", luaopen_spine_TranslateYTimeline); - olua_require(L, "spine.IkConstraintTimeline", luaopen_spine_IkConstraintTimeline); - olua_require(L, "spine.PathConstraintMixTimeline", luaopen_spine_PathConstraintMixTimeline); - olua_require(L, "spine.PathConstraintPositionTimeline", luaopen_spine_PathConstraintPositionTimeline); - olua_require(L, "spine.PathConstraintSpacingTimeline", luaopen_spine_PathConstraintSpacingTimeline); - olua_require(L, "spine.TranslateTimeline", luaopen_spine_TranslateTimeline); - olua_require(L, "spine.ShearTimeline", luaopen_spine_ShearTimeline); - olua_require(L, "spine.TransformConstraintTimeline", luaopen_spine_TransformConstraintTimeline); - olua_require(L, "spine.ScaleTimeline", luaopen_spine_ScaleTimeline); - olua_require(L, "spine.RotateTimeline", luaopen_spine_RotateTimeline); - olua_require(L, "spine.Polygon", luaopen_spine_Polygon); - olua_require(L, "spine.Skin", luaopen_spine_Skin); - olua_require(L, "spine.Atlas", luaopen_spine_Atlas); - olua_require(L, "spine.Bone", luaopen_spine_Bone); - olua_require(L, "spine.Slot", luaopen_spine_Slot); - olua_require(L, "spine.Attachment", luaopen_spine_Attachment); - olua_require(L, "spine.VertexAttachment", luaopen_spine_VertexAttachment); - olua_require(L, "spine.ClippingAttachment", luaopen_spine_ClippingAttachment); - olua_require(L, "spine.BoundingBoxAttachment", luaopen_spine_BoundingBoxAttachment); - olua_require(L, "spine.MeshAttachment", luaopen_spine_MeshAttachment); - olua_require(L, "spine.PathAttachment", luaopen_spine_PathAttachment); - olua_require(L, "spine.PathConstraint", luaopen_spine_PathConstraint); - olua_require(L, "spine.PointAttachment", luaopen_spine_PointAttachment); - olua_require(L, "spine.RegionAttachment", luaopen_spine_RegionAttachment); - olua_require(L, "spine.TrackEntry", luaopen_spine_TrackEntry); - olua_require(L, "spine.SkeletonData", luaopen_spine_SkeletonData); - olua_require(L, "spine.Skeleton", luaopen_spine_Skeleton); - olua_require(L, "spine.SkeletonRenderer", luaopen_spine_SkeletonRenderer); - olua_require(L, "spine.StartListener", luaopen_spine_StartListener); - olua_require(L, "spine.InterruptListener", luaopen_spine_InterruptListener); - olua_require(L, "spine.EndListener", luaopen_spine_EndListener); - olua_require(L, "spine.DisposeListener", luaopen_spine_DisposeListener); - olua_require(L, "spine.CompleteListener", luaopen_spine_CompleteListener); - olua_require(L, "spine.EventListener", luaopen_spine_EventListener); - olua_require(L, "spine.UpdateWorldTransformsListener", luaopen_spine_UpdateWorldTransformsListener); - olua_require(L, "spine.SkeletonAnimation", luaopen_spine_SkeletonAnimation); + olua_require(L, "spine.EventType", _olua_cls_spine_EventType); + olua_require(L, "spine.AttachmentType", _olua_cls_spine_AttachmentType); + olua_require(L, "spine.BlendMode", _olua_cls_spine_BlendMode); + olua_require(L, "spine.PositionMode", _olua_cls_spine_PositionMode); + olua_require(L, "spine.SpacingMode", _olua_cls_spine_SpacingMode); + olua_require(L, "spine.RotateMode", _olua_cls_spine_RotateMode); + olua_require(L, "spine.MixBlend", _olua_cls_spine_MixBlend); + olua_require(L, "spine.MixDirection", _olua_cls_spine_MixDirection); + olua_require(L, "spine.Physics", _olua_cls_spine_Physics); + olua_require(L, "spine.Inherit", _olua_cls_spine_Inherit); + olua_require(L, "spine.SpineObject", _olua_cls_spine_SpineObject); + olua_require(L, "spine.Event", _olua_cls_spine_Event); + olua_require(L, "spine.EventData", _olua_cls_spine_EventData); + olua_require(L, "spine.Updatable", _olua_cls_spine_Updatable); + olua_require(L, "spine.AnimationStateListener", _olua_cls_spine_AnimationStateListener); + olua_require(L, "spine.AnimationState", _olua_cls_spine_AnimationState); + olua_require(L, "spine.AnimationStateData", _olua_cls_spine_AnimationStateData); + olua_require(L, "spine.Animation", _olua_cls_spine_Animation); + olua_require(L, "spine.Sequence", _olua_cls_spine_Sequence); + olua_require(L, "spine.SequenceMode", _olua_cls_spine_SequenceMode); + olua_require(L, "spine.TextureRegion", _olua_cls_spine_TextureRegion); + olua_require(L, "spine.ConstraintData", _olua_cls_spine_ConstraintData); + olua_require(L, "spine.IkConstraintData", _olua_cls_spine_IkConstraintData); + olua_require(L, "spine.BoneData", _olua_cls_spine_BoneData); + olua_require(L, "spine.SlotData", _olua_cls_spine_SlotData); + olua_require(L, "spine.IkConstraint", _olua_cls_spine_IkConstraint); + olua_require(L, "spine.TransformConstraint", _olua_cls_spine_TransformConstraint); + olua_require(L, "spine.TransformConstraintData", _olua_cls_spine_TransformConstraintData); + olua_require(L, "spine.PathConstraintData", _olua_cls_spine_PathConstraintData); + olua_require(L, "spine.SkeletonBounds", _olua_cls_spine_SkeletonBounds); + olua_require(L, "spine.SkeletonClipping", _olua_cls_spine_SkeletonClipping); + olua_require(L, "spine.PhysicsConstraint", _olua_cls_spine_PhysicsConstraint); + olua_require(L, "spine.PhysicsConstraintData", _olua_cls_spine_PhysicsConstraintData); + olua_require(L, "spine.Timeline", _olua_cls_spine_Timeline); + olua_require(L, "spine.CurveTimeline", _olua_cls_spine_CurveTimeline); + olua_require(L, "spine.CurveTimeline1", _olua_cls_spine_CurveTimeline1); + olua_require(L, "spine.CurveTimeline2", _olua_cls_spine_CurveTimeline2); + olua_require(L, "spine.AttachmentTimeline", _olua_cls_spine_AttachmentTimeline); + olua_require(L, "spine.RGBATimeline", _olua_cls_spine_RGBATimeline); + olua_require(L, "spine.RGBTimeline", _olua_cls_spine_RGBTimeline); + olua_require(L, "spine.AlphaTimeline", _olua_cls_spine_AlphaTimeline); + olua_require(L, "spine.RGBA2Timeline", _olua_cls_spine_RGBA2Timeline); + olua_require(L, "spine.RGB2Timeline", _olua_cls_spine_RGB2Timeline); + olua_require(L, "spine.DeformTimeline", _olua_cls_spine_DeformTimeline); + olua_require(L, "spine.DrawOrderTimeline", _olua_cls_spine_DrawOrderTimeline); + olua_require(L, "spine.EventTimeline", _olua_cls_spine_EventTimeline); + olua_require(L, "spine.ScaleXTimeline", _olua_cls_spine_ScaleXTimeline); + olua_require(L, "spine.ScaleYTimeline", _olua_cls_spine_ScaleYTimeline); + olua_require(L, "spine.ShearXTimeline", _olua_cls_spine_ShearXTimeline); + olua_require(L, "spine.ShearYTimeline", _olua_cls_spine_ShearYTimeline); + olua_require(L, "spine.TranslateXTimeline", _olua_cls_spine_TranslateXTimeline); + olua_require(L, "spine.TranslateYTimeline", _olua_cls_spine_TranslateYTimeline); + olua_require(L, "spine.IkConstraintTimeline", _olua_cls_spine_IkConstraintTimeline); + olua_require(L, "spine.PathConstraintMixTimeline", _olua_cls_spine_PathConstraintMixTimeline); + olua_require(L, "spine.PathConstraintPositionTimeline", _olua_cls_spine_PathConstraintPositionTimeline); + olua_require(L, "spine.PathConstraintSpacingTimeline", _olua_cls_spine_PathConstraintSpacingTimeline); + olua_require(L, "spine.TranslateTimeline", _olua_cls_spine_TranslateTimeline); + olua_require(L, "spine.ShearTimeline", _olua_cls_spine_ShearTimeline); + olua_require(L, "spine.TransformConstraintTimeline", _olua_cls_spine_TransformConstraintTimeline); + olua_require(L, "spine.ScaleTimeline", _olua_cls_spine_ScaleTimeline); + olua_require(L, "spine.RotateTimeline", _olua_cls_spine_RotateTimeline); + olua_require(L, "spine.Polygon", _olua_cls_spine_Polygon); + olua_require(L, "spine.Skin", _olua_cls_spine_Skin); + olua_require(L, "spine.Atlas", _olua_cls_spine_Atlas); + olua_require(L, "spine.Bone", _olua_cls_spine_Bone); + olua_require(L, "spine.Slot", _olua_cls_spine_Slot); + olua_require(L, "spine.Attachment", _olua_cls_spine_Attachment); + olua_require(L, "spine.VertexAttachment", _olua_cls_spine_VertexAttachment); + olua_require(L, "spine.ClippingAttachment", _olua_cls_spine_ClippingAttachment); + olua_require(L, "spine.BoundingBoxAttachment", _olua_cls_spine_BoundingBoxAttachment); + olua_require(L, "spine.MeshAttachment", _olua_cls_spine_MeshAttachment); + olua_require(L, "spine.PathAttachment", _olua_cls_spine_PathAttachment); + olua_require(L, "spine.PathConstraint", _olua_cls_spine_PathConstraint); + olua_require(L, "spine.PointAttachment", _olua_cls_spine_PointAttachment); + olua_require(L, "spine.RegionAttachment", _olua_cls_spine_RegionAttachment); + olua_require(L, "spine.TrackEntry", _olua_cls_spine_TrackEntry); + olua_require(L, "spine.SkeletonData", _olua_cls_spine_SkeletonData); + olua_require(L, "spine.Skeleton", _olua_cls_spine_Skeleton); + olua_require(L, "spine.SkeletonRenderer", _olua_cls_spine_SkeletonRenderer); + olua_require(L, "spine.StartListener", _olua_cls_spine_StartListener); + olua_require(L, "spine.InterruptListener", _olua_cls_spine_InterruptListener); + olua_require(L, "spine.EndListener", _olua_cls_spine_EndListener); + olua_require(L, "spine.DisposeListener", _olua_cls_spine_DisposeListener); + olua_require(L, "spine.CompleteListener", _olua_cls_spine_CompleteListener); + olua_require(L, "spine.EventListener", _olua_cls_spine_EventListener); + olua_require(L, "spine.UpdateWorldTransformsListener", _olua_cls_spine_UpdateWorldTransformsListener); + olua_require(L, "spine.SkeletonAnimation", _olua_cls_spine_SkeletonAnimation); cclua::runtime::registerFeature("spine", true); diff --git a/frameworks/cclua/src/lua-bindings/lua_spine.h b/frameworks/cclua/src/lua-bindings/lua_spine.h index c007922e..0cfdb11c 100644 --- a/frameworks/cclua/src/lua-bindings/lua_spine.h +++ b/frameworks/cclua/src/lua-bindings/lua_spine.h @@ -1,5 +1,5 @@ // -// AUTO BUILD, DON'T MODIFY! +// AUTO GENERATED, DO NOT MODIFY! // #ifndef __AUTO_GEN_LUA_SPINE_H__ #define __AUTO_GEN_LUA_SPINE_H__ diff --git a/frameworks/cclua/src/lua-bindings/lua_types.cpp b/frameworks/cclua/src/lua-bindings/lua_types.cpp index a13a113a..c93e6680 100644 --- a/frameworks/cclua/src/lua-bindings/lua_types.cpp +++ b/frameworks/cclua/src/lua-bindings/lua_types.cpp @@ -1,10 +1,10 @@ // -// AUTO BUILD, DON'T MODIFY! +// AUTO GENERATED, DO NOT MODIFY! // #include "lua_types.h" #include "cclua/olua-2dx.h" -static int _olua_bool___gc(lua_State *L) +static int _olua_fun_olua_bool___gc(lua_State *L) { olua_startinvoke(L); @@ -20,7 +20,7 @@ static int _olua_bool___gc(lua_State *L) return (int)ret; } -static int _olua_bool___index(lua_State *L) +static int _olua_fun_olua_bool___index(lua_State *L) { olua_startinvoke(L); @@ -39,7 +39,7 @@ static int _olua_bool___index(lua_State *L) return num_ret; } -static int _olua_bool___newindex(lua_State *L) +static int _olua_fun_olua_bool___newindex(lua_State *L) { olua_startinvoke(L); @@ -59,7 +59,7 @@ static int _olua_bool___newindex(lua_State *L) return 0; } -static int _olua_bool___olua_move(lua_State *L) +static int _olua_fun_olua_bool___olua_move(lua_State *L) { olua_startinvoke(L); @@ -71,27 +71,41 @@ static int _olua_bool___olua_move(lua_State *L) return 1; } -static int _olua_bool_assign(lua_State *L) +static int _olua_fun_olua_bool_buffer(lua_State *L) { olua_startinvoke(L); olua_bool *self = nullptr; - const char *arg1 = nullptr; /** data */ - size_t arg2 = 0; /** len */ olua_to_object(L, 1, &self, "olua.bool"); - olua_check_string(L, 2, &arg1); - olua_check_integer(L, 3, &arg2); - // void assign(const char *data, size_t len) - self->assign(arg1, arg2); + // @getter @name(buffer) @type(void *) bool *buffer() + void *ret = self->buffer(); + int num_ret = olua_push_object(L, ret, "void *"); olua_endinvoke(L); - return 0; + return num_ret; +} + +static int _olua_fun_olua_bool_length(lua_State *L) +{ + olua_startinvoke(L); + + olua_bool *self = nullptr; + + olua_to_object(L, 1, &self, "olua.bool"); + + // @getter @name(length) size_t length() + size_t ret = self->length(); + int num_ret = olua_push_integer(L, ret); + + olua_endinvoke(L); + + return num_ret; } -static int _olua_bool_create$1(lua_State *L) +static int _olua_fun_olua_bool_new$1(lua_State *L) { olua_startinvoke(L); @@ -111,11 +125,11 @@ static int _olua_bool_create$1(lua_State *L) return num_ret; } -static int _olua_bool_create$2(lua_State *L) +static int _olua_fun_olua_bool_new$2(lua_State *L) { olua_startinvoke(L); - // @postnew @name(new) static olua_bool *create(@optional size_t len) + // @postnew @name(new) static olua_bool *create() olua_bool *ret = olua_bool::create(); int num_ret = olua_push_object(L, ret, "olua.bool"); @@ -127,28 +141,28 @@ static int _olua_bool_create$2(lua_State *L) return num_ret; } -static int _olua_bool_create(lua_State *L) +static int _olua_fun_olua_bool_new(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 0) { - // @postnew @name(new) static olua_bool *create(@optional size_t len) - return _olua_bool_create$2(L); + // @postnew @name(new) static olua_bool *create() + return _olua_fun_olua_bool_new$2(L); } if (num_args == 1) { // if ((olua_is_integer(L, 1))) { // @postnew @name(new) static olua_bool *create(@optional size_t len) - return _olua_bool_create$1(L); + return _olua_fun_olua_bool_new$1(L); // } } - luaL_error(L, "method 'olua_bool::create' not support '%d' arguments", num_args); + luaL_error(L, "method 'olua_bool::new' not support '%d' arguments", num_args); return 0; } -static int _olua_bool_slice$1(lua_State *L) +static int _olua_fun_olua_bool_slice$1(lua_State *L) { olua_startinvoke(L); @@ -172,7 +186,7 @@ static int _olua_bool_slice$1(lua_State *L) return num_ret; } -static int _olua_bool_slice$2(lua_State *L) +static int _olua_fun_olua_bool_slice$2(lua_State *L) { olua_startinvoke(L); @@ -182,7 +196,7 @@ static int _olua_bool_slice$2(lua_State *L) olua_to_object(L, 1, &self, "olua.bool"); olua_check_integer(L, 2, &arg1); - // @postnew olua_bool *slice(size_t from, @optional size_t to) + // @postnew olua_bool *slice(size_t from) olua_bool *ret = self->slice(arg1); int num_ret = olua_push_object(L, ret, "olua.bool"); @@ -194,21 +208,21 @@ static int _olua_bool_slice$2(lua_State *L) return num_ret; } -static int _olua_bool_slice(lua_State *L) +static int _olua_fun_olua_bool_slice(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_integer(L, 2))) { - // @postnew olua_bool *slice(size_t from, @optional size_t to) - return _olua_bool_slice$2(L); + // @postnew olua_bool *slice(size_t from) + return _olua_fun_olua_bool_slice$2(L); // } } if (num_args == 2) { // if ((olua_is_integer(L, 2)) && (olua_is_integer(L, 3))) { // @postnew olua_bool *slice(size_t from, @optional size_t to) - return _olua_bool_slice$1(L); + return _olua_fun_olua_bool_slice$1(L); // } } @@ -217,7 +231,7 @@ static int _olua_bool_slice(lua_State *L) return 0; } -static int _olua_bool_sub$1(lua_State *L) +static int _olua_fun_olua_bool_sub$1(lua_State *L) { olua_startinvoke(L); @@ -241,7 +255,7 @@ static int _olua_bool_sub$1(lua_State *L) return num_ret; } -static int _olua_bool_sub$2(lua_State *L) +static int _olua_fun_olua_bool_sub$2(lua_State *L) { olua_startinvoke(L); @@ -251,7 +265,7 @@ static int _olua_bool_sub$2(lua_State *L) olua_to_object(L, 1, &self, "olua.bool"); olua_check_integer(L, 2, &arg1); - // @postnew olua_bool *sub(size_t from, @optional size_t to) + // @postnew olua_bool *sub(size_t from) olua_bool *ret = self->sub(arg1); int num_ret = olua_push_object(L, ret, "olua.bool"); @@ -263,21 +277,21 @@ static int _olua_bool_sub$2(lua_State *L) return num_ret; } -static int _olua_bool_sub(lua_State *L) +static int _olua_fun_olua_bool_sub(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_integer(L, 2))) { - // @postnew olua_bool *sub(size_t from, @optional size_t to) - return _olua_bool_sub$2(L); + // @postnew olua_bool *sub(size_t from) + return _olua_fun_olua_bool_sub$2(L); // } } if (num_args == 2) { // if ((olua_is_integer(L, 2)) && (olua_is_integer(L, 3))) { // @postnew olua_bool *sub(size_t from, @optional size_t to) - return _olua_bool_sub$1(L); + return _olua_fun_olua_bool_sub$1(L); // } } @@ -286,7 +300,7 @@ static int _olua_bool_sub(lua_State *L) return 0; } -static int _olua_bool_take(lua_State *L) +static int _olua_fun_olua_bool_take(lua_State *L) { olua_startinvoke(L); @@ -303,7 +317,7 @@ static int _olua_bool_take(lua_State *L) return num_ret; } -static int _olua_bool_tostring(lua_State *L) +static int _olua_fun_olua_bool_tostring(lua_State *L) { olua_startinvoke(L); @@ -321,7 +335,7 @@ static int _olua_bool_tostring(lua_State *L) return (int)ret; } -static int _olua_bool_length(lua_State *L) +static int _olua_fun_olua_bool_value$1(lua_State *L) { olua_startinvoke(L); @@ -329,90 +343,85 @@ static int _olua_bool_length(lua_State *L) olua_to_object(L, 1, &self, "olua.bool"); - // @getter @name(length) size_t length() - size_t ret = self->length(); - int num_ret = olua_push_integer(L, ret); + // @getter @name(value) const bool &value() + const bool &ret = self->value(); + int num_ret = olua_push_bool(L, ret); olua_endinvoke(L); return num_ret; } -static int _olua_bool_rawdata(lua_State *L) +static int _olua_fun_olua_bool_value$2(lua_State *L) { olua_startinvoke(L); olua_bool *self = nullptr; + bool arg1 = false; /** v */ olua_to_object(L, 1, &self, "olua.bool"); + olua_check_bool(L, 2, &arg1); - // @getter @name(rawdata) void *rawdata() - void *ret = self->rawdata(); - int num_ret = olua_push_object(L, ret, "void *"); + // @setter @name(value) void value(const bool &v) + self->value(arg1); olua_endinvoke(L); - return num_ret; + return 0; } -static int _olua_bool_size(lua_State *L) +static int _olua_fun_olua_bool_value(lua_State *L) { - olua_startinvoke(L); - - olua_bool *self = nullptr; + int num_args = lua_gettop(L) - 1; - olua_to_object(L, 1, &self, "olua.bool"); + if (num_args == 0) { + // @getter @name(value) const bool &value() + return _olua_fun_olua_bool_value$1(L); + } - // @getter @name(sizeof) size_t size() - size_t ret = self->size(); - int num_ret = olua_push_integer(L, ret); + if (num_args == 1) { + // if ((olua_is_bool(L, 2))) { + // @setter @name(value) void value(const bool &v) + return _olua_fun_olua_bool_value$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'olua_bool::value' not support '%d' arguments", num_args); - return num_ret; + return 0; } -static int _olua_bool_value(lua_State *L) +static int _olua_cls_olua_bool(lua_State *L) { - olua_startinvoke(L); - - olua_bool *self = nullptr; - - olua_to_object(L, 1, &self, "olua.bool"); - - // @getter @name(value) const bool &value() - const bool &ret = self->value(); - int num_ret = olua_push_bool(L, ret); - - olua_endinvoke(L); + oluacls_class(L, "olua.bool"); + oluacls_func(L, "__gc", _olua_fun_olua_bool___gc); + oluacls_func(L, "__index", _olua_fun_olua_bool___index); + oluacls_func(L, "__newindex", _olua_fun_olua_bool___newindex); + oluacls_func(L, "__olua_move", _olua_fun_olua_bool___olua_move); + oluacls_func(L, "new", _olua_fun_olua_bool_new); + oluacls_func(L, "slice", _olua_fun_olua_bool_slice); + oluacls_func(L, "sub", _olua_fun_olua_bool_sub); + oluacls_func(L, "take", _olua_fun_olua_bool_take); + oluacls_func(L, "tostring", _olua_fun_olua_bool_tostring); + oluacls_prop(L, "buffer", _olua_fun_olua_bool_buffer, nullptr); + oluacls_prop(L, "length", _olua_fun_olua_bool_length, nullptr); + oluacls_prop(L, "value", _olua_fun_olua_bool_value, _olua_fun_olua_bool_value); - return num_ret; + return 1; } OLUA_BEGIN_DECLS OLUA_LIB int luaopen_olua_bool(lua_State *L) { - oluacls_class(L, "olua.bool"); - oluacls_func(L, "__gc", _olua_bool___gc); - oluacls_func(L, "__index", _olua_bool___index); - oluacls_func(L, "__newindex", _olua_bool___newindex); - oluacls_func(L, "__olua_move", _olua_bool___olua_move); - oluacls_func(L, "assign", _olua_bool_assign); - oluacls_func(L, "new", _olua_bool_create); - oluacls_func(L, "slice", _olua_bool_slice); - oluacls_func(L, "sub", _olua_bool_sub); - oluacls_func(L, "take", _olua_bool_take); - oluacls_func(L, "tostring", _olua_bool_tostring); - oluacls_prop(L, "length", _olua_bool_length, _olua_bool_length); - oluacls_prop(L, "rawdata", _olua_bool_rawdata, nullptr); - oluacls_prop(L, "sizeof", _olua_bool_size, nullptr); - oluacls_prop(L, "value", _olua_bool_value, _olua_bool_value); - + olua_require(L, "types", luaopen_types); + if (!olua_getclass(L, "olua.bool")) { + luaL_error(L, "class not found: olua_bool"); + } return 1; } OLUA_END_DECLS -static int _olua_string___gc(lua_State *L) +static int _olua_fun_olua_string___gc(lua_State *L) { olua_startinvoke(L); @@ -428,7 +437,7 @@ static int _olua_string___gc(lua_State *L) return (int)ret; } -static int _olua_string___index(lua_State *L) +static int _olua_fun_olua_string___index(lua_State *L) { olua_startinvoke(L); @@ -447,7 +456,7 @@ static int _olua_string___index(lua_State *L) return num_ret; } -static int _olua_string___newindex(lua_State *L) +static int _olua_fun_olua_string___newindex(lua_State *L) { olua_startinvoke(L); @@ -467,7 +476,7 @@ static int _olua_string___newindex(lua_State *L) return 0; } -static int _olua_string___olua_move(lua_State *L) +static int _olua_fun_olua_string___olua_move(lua_State *L) { olua_startinvoke(L); @@ -479,27 +488,41 @@ static int _olua_string___olua_move(lua_State *L) return 1; } -static int _olua_string_assign(lua_State *L) +static int _olua_fun_olua_string_buffer(lua_State *L) { olua_startinvoke(L); olua_string *self = nullptr; - const char *arg1 = nullptr; /** data */ - size_t arg2 = 0; /** len */ olua_to_object(L, 1, &self, "olua.string"); - olua_check_string(L, 2, &arg1); - olua_check_integer(L, 3, &arg2); - // void assign(const char *data, size_t len) - self->assign(arg1, arg2); + // @getter @name(buffer) @type(void *) std::string *buffer() + void *ret = self->buffer(); + int num_ret = olua_push_object(L, ret, "void *"); olua_endinvoke(L); - return 0; + return num_ret; +} + +static int _olua_fun_olua_string_length(lua_State *L) +{ + olua_startinvoke(L); + + olua_string *self = nullptr; + + olua_to_object(L, 1, &self, "olua.string"); + + // @getter @name(length) size_t length() + size_t ret = self->length(); + int num_ret = olua_push_integer(L, ret); + + olua_endinvoke(L); + + return num_ret; } -static int _olua_string_create$1(lua_State *L) +static int _olua_fun_olua_string_new$1(lua_State *L) { olua_startinvoke(L); @@ -519,11 +542,11 @@ static int _olua_string_create$1(lua_State *L) return num_ret; } -static int _olua_string_create$2(lua_State *L) +static int _olua_fun_olua_string_new$2(lua_State *L) { olua_startinvoke(L); - // @postnew @name(new) static olua_string *create(@optional size_t len) + // @postnew @name(new) static olua_string *create() olua_string *ret = olua_string::create(); int num_ret = olua_push_object(L, ret, "olua.string"); @@ -535,28 +558,28 @@ static int _olua_string_create$2(lua_State *L) return num_ret; } -static int _olua_string_create(lua_State *L) +static int _olua_fun_olua_string_new(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 0) { - // @postnew @name(new) static olua_string *create(@optional size_t len) - return _olua_string_create$2(L); + // @postnew @name(new) static olua_string *create() + return _olua_fun_olua_string_new$2(L); } if (num_args == 1) { // if ((olua_is_integer(L, 1))) { // @postnew @name(new) static olua_string *create(@optional size_t len) - return _olua_string_create$1(L); + return _olua_fun_olua_string_new$1(L); // } } - luaL_error(L, "method 'olua_string::create' not support '%d' arguments", num_args); + luaL_error(L, "method 'olua_string::new' not support '%d' arguments", num_args); return 0; } -static int _olua_string_slice$1(lua_State *L) +static int _olua_fun_olua_string_slice$1(lua_State *L) { olua_startinvoke(L); @@ -580,7 +603,7 @@ static int _olua_string_slice$1(lua_State *L) return num_ret; } -static int _olua_string_slice$2(lua_State *L) +static int _olua_fun_olua_string_slice$2(lua_State *L) { olua_startinvoke(L); @@ -590,7 +613,7 @@ static int _olua_string_slice$2(lua_State *L) olua_to_object(L, 1, &self, "olua.string"); olua_check_integer(L, 2, &arg1); - // @postnew olua_string *slice(size_t from, @optional size_t to) + // @postnew olua_string *slice(size_t from) olua_string *ret = self->slice(arg1); int num_ret = olua_push_object(L, ret, "olua.string"); @@ -602,21 +625,21 @@ static int _olua_string_slice$2(lua_State *L) return num_ret; } -static int _olua_string_slice(lua_State *L) +static int _olua_fun_olua_string_slice(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_integer(L, 2))) { - // @postnew olua_string *slice(size_t from, @optional size_t to) - return _olua_string_slice$2(L); + // @postnew olua_string *slice(size_t from) + return _olua_fun_olua_string_slice$2(L); // } } if (num_args == 2) { // if ((olua_is_integer(L, 2)) && (olua_is_integer(L, 3))) { // @postnew olua_string *slice(size_t from, @optional size_t to) - return _olua_string_slice$1(L); + return _olua_fun_olua_string_slice$1(L); // } } @@ -625,7 +648,7 @@ static int _olua_string_slice(lua_State *L) return 0; } -static int _olua_string_sub$1(lua_State *L) +static int _olua_fun_olua_string_sub$1(lua_State *L) { olua_startinvoke(L); @@ -649,7 +672,7 @@ static int _olua_string_sub$1(lua_State *L) return num_ret; } -static int _olua_string_sub$2(lua_State *L) +static int _olua_fun_olua_string_sub$2(lua_State *L) { olua_startinvoke(L); @@ -659,7 +682,7 @@ static int _olua_string_sub$2(lua_State *L) olua_to_object(L, 1, &self, "olua.string"); olua_check_integer(L, 2, &arg1); - // @postnew olua_string *sub(size_t from, @optional size_t to) + // @postnew olua_string *sub(size_t from) olua_string *ret = self->sub(arg1); int num_ret = olua_push_object(L, ret, "olua.string"); @@ -671,21 +694,21 @@ static int _olua_string_sub$2(lua_State *L) return num_ret; } -static int _olua_string_sub(lua_State *L) +static int _olua_fun_olua_string_sub(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_integer(L, 2))) { - // @postnew olua_string *sub(size_t from, @optional size_t to) - return _olua_string_sub$2(L); + // @postnew olua_string *sub(size_t from) + return _olua_fun_olua_string_sub$2(L); // } } if (num_args == 2) { // if ((olua_is_integer(L, 2)) && (olua_is_integer(L, 3))) { // @postnew olua_string *sub(size_t from, @optional size_t to) - return _olua_string_sub$1(L); + return _olua_fun_olua_string_sub$1(L); // } } @@ -694,7 +717,7 @@ static int _olua_string_sub(lua_State *L) return 0; } -static int _olua_string_take(lua_State *L) +static int _olua_fun_olua_string_take(lua_State *L) { olua_startinvoke(L); @@ -711,7 +734,7 @@ static int _olua_string_take(lua_State *L) return num_ret; } -static int _olua_string_tostring(lua_State *L) +static int _olua_fun_olua_string_tostring(lua_State *L) { olua_startinvoke(L); @@ -729,7 +752,7 @@ static int _olua_string_tostring(lua_State *L) return (int)ret; } -static int _olua_string_length(lua_State *L) +static int _olua_fun_olua_string_value$1(lua_State *L) { olua_startinvoke(L); @@ -737,96 +760,91 @@ static int _olua_string_length(lua_State *L) olua_to_object(L, 1, &self, "olua.string"); - // @getter @name(length) size_t length() - size_t ret = self->length(); - int num_ret = olua_push_integer(L, ret); + // @getter @name(value) const std::string &value() + const std::string &ret = self->value(); + int num_ret = olua_push_string(L, ret); olua_endinvoke(L); return num_ret; } -static int _olua_string_rawdata(lua_State *L) +static int _olua_fun_olua_string_value$2(lua_State *L) { olua_startinvoke(L); olua_string *self = nullptr; + std::string arg1; /** v */ olua_to_object(L, 1, &self, "olua.string"); + olua_check_string(L, 2, &arg1); - // @getter @name(rawdata) void *rawdata() - void *ret = self->rawdata(); - int num_ret = olua_push_object(L, ret, "void *"); + // @setter @name(value) void value(const std::string &v) + self->value(arg1); olua_endinvoke(L); - return num_ret; + return 0; } -static int _olua_string_size(lua_State *L) +static int _olua_fun_olua_string_value(lua_State *L) { - olua_startinvoke(L); - - olua_string *self = nullptr; + int num_args = lua_gettop(L) - 1; - olua_to_object(L, 1, &self, "olua.string"); + if (num_args == 0) { + // @getter @name(value) const std::string &value() + return _olua_fun_olua_string_value$1(L); + } - // @getter @name(sizeof) size_t size() - size_t ret = self->size(); - int num_ret = olua_push_integer(L, ret); + if (num_args == 1) { + // if ((olua_is_string(L, 2))) { + // @setter @name(value) void value(const std::string &v) + return _olua_fun_olua_string_value$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'olua_string::value' not support '%d' arguments", num_args); - return num_ret; + return 0; } -static int _olua_string_value(lua_State *L) +static int _olua_cls_olua_string(lua_State *L) { - olua_startinvoke(L); - - olua_string *self = nullptr; - - olua_to_object(L, 1, &self, "olua.string"); - - // @getter @name(value) const std::string &value() - const std::string &ret = self->value(); - int num_ret = olua_push_string(L, ret); - - olua_endinvoke(L); + oluacls_class(L, "olua.string"); + oluacls_func(L, "__gc", _olua_fun_olua_string___gc); + oluacls_func(L, "__index", _olua_fun_olua_string___index); + oluacls_func(L, "__newindex", _olua_fun_olua_string___newindex); + oluacls_func(L, "__olua_move", _olua_fun_olua_string___olua_move); + oluacls_func(L, "new", _olua_fun_olua_string_new); + oluacls_func(L, "slice", _olua_fun_olua_string_slice); + oluacls_func(L, "sub", _olua_fun_olua_string_sub); + oluacls_func(L, "take", _olua_fun_olua_string_take); + oluacls_func(L, "tostring", _olua_fun_olua_string_tostring); + oluacls_prop(L, "buffer", _olua_fun_olua_string_buffer, nullptr); + oluacls_prop(L, "length", _olua_fun_olua_string_length, nullptr); + oluacls_prop(L, "value", _olua_fun_olua_string_value, _olua_fun_olua_string_value); - return num_ret; + return 1; } OLUA_BEGIN_DECLS OLUA_LIB int luaopen_olua_string(lua_State *L) { - oluacls_class(L, "olua.string"); - oluacls_func(L, "__gc", _olua_string___gc); - oluacls_func(L, "__index", _olua_string___index); - oluacls_func(L, "__newindex", _olua_string___newindex); - oluacls_func(L, "__olua_move", _olua_string___olua_move); - oluacls_func(L, "assign", _olua_string_assign); - oluacls_func(L, "new", _olua_string_create); - oluacls_func(L, "slice", _olua_string_slice); - oluacls_func(L, "sub", _olua_string_sub); - oluacls_func(L, "take", _olua_string_take); - oluacls_func(L, "tostring", _olua_string_tostring); - oluacls_prop(L, "length", _olua_string_length, _olua_string_length); - oluacls_prop(L, "rawdata", _olua_string_rawdata, nullptr); - oluacls_prop(L, "sizeof", _olua_string_size, nullptr); - oluacls_prop(L, "value", _olua_string_value, _olua_string_value); - + olua_require(L, "types", luaopen_types); + if (!olua_getclass(L, "olua.string")) { + luaL_error(L, "class not found: olua_string"); + } return 1; } OLUA_END_DECLS -static int _olua_int8_t___gc(lua_State *L) +static int _olua_fun_olua_int8___gc(lua_State *L) { olua_startinvoke(L); - olua_int8_t *self = nullptr; + olua_int8 *self = nullptr; - olua_to_object(L, 1, &self, "olua.int8_t"); + olua_to_object(L, 1, &self, "olua.int8"); // olua_Return __gc(lua_State *L) olua_Return ret = self->__gc(L); @@ -836,14 +854,14 @@ static int _olua_int8_t___gc(lua_State *L) return (int)ret; } -static int _olua_int8_t___index(lua_State *L) +static int _olua_fun_olua_int8___index(lua_State *L) { olua_startinvoke(L); - olua_int8_t *self = nullptr; + olua_int8 *self = nullptr; unsigned int arg1 = 0; /** idx */ - olua_to_object(L, 1, &self, "olua.int8_t"); + olua_to_object(L, 1, &self, "olua.int8"); olua_check_integer(L, 2, &arg1); // int8_t __index(unsigned int idx) @@ -855,15 +873,15 @@ static int _olua_int8_t___index(lua_State *L) return num_ret; } -static int _olua_int8_t___newindex(lua_State *L) +static int _olua_fun_olua_int8___newindex(lua_State *L) { olua_startinvoke(L); - olua_int8_t *self = nullptr; + olua_int8 *self = nullptr; unsigned int arg1 = 0; /** idx */ int8_t arg2 = 0; /** v */ - olua_to_object(L, 1, &self, "olua.int8_t"); + olua_to_object(L, 1, &self, "olua.int8"); olua_check_integer(L, 2, &arg1); olua_check_integer(L, 3, &arg2); @@ -875,39 +893,53 @@ static int _olua_int8_t___newindex(lua_State *L) return 0; } -static int _olua_int8_t___olua_move(lua_State *L) +static int _olua_fun_olua_int8___olua_move(lua_State *L) { olua_startinvoke(L); - auto self = (olua_int8_t *)olua_toobj(L, 1, "olua.int8_t"); - olua_push_object(L, self, "olua.int8_t"); + auto self = (olua_int8 *)olua_toobj(L, 1, "olua.int8"); + olua_push_object(L, self, "olua.int8"); olua_endinvoke(L); return 1; } -static int _olua_int8_t_assign(lua_State *L) +static int _olua_fun_olua_int8_buffer(lua_State *L) { olua_startinvoke(L); - olua_int8_t *self = nullptr; - const char *arg1 = nullptr; /** data */ - size_t arg2 = 0; /** len */ + olua_int8 *self = nullptr; - olua_to_object(L, 1, &self, "olua.int8_t"); - olua_check_string(L, 2, &arg1); - olua_check_integer(L, 3, &arg2); + olua_to_object(L, 1, &self, "olua.int8"); - // void assign(const char *data, size_t len) - self->assign(arg1, arg2); + // @getter @name(buffer) @type(void *) int8_t *buffer() + void *ret = self->buffer(); + int num_ret = olua_push_object(L, ret, "void *"); olua_endinvoke(L); - return 0; + return num_ret; +} + +static int _olua_fun_olua_int8_length(lua_State *L) +{ + olua_startinvoke(L); + + olua_int8 *self = nullptr; + + olua_to_object(L, 1, &self, "olua.int8"); + + // @getter @name(length) size_t length() + size_t ret = self->length(); + int num_ret = olua_push_integer(L, ret); + + olua_endinvoke(L); + + return num_ret; } -static int _olua_int8_t_create$1(lua_State *L) +static int _olua_fun_olua_int8_new$1(lua_State *L) { olua_startinvoke(L); @@ -915,9 +947,9 @@ static int _olua_int8_t_create$1(lua_State *L) olua_check_integer(L, 1, &arg1); - // @postnew @name(new) static olua_int8_t *create(@optional size_t len) - olua_int8_t *ret = olua_int8_t::create(arg1); - int num_ret = olua_push_object(L, ret, "olua.int8_t"); + // @postnew @name(new) static olua_int8 *create(@optional size_t len) + olua_int8 *ret = olua_int8::create(arg1); + int num_ret = olua_push_object(L, ret, "olua.int8"); // insert code after call olua_postnew(L, ret); @@ -927,13 +959,13 @@ static int _olua_int8_t_create$1(lua_State *L) return num_ret; } -static int _olua_int8_t_create$2(lua_State *L) +static int _olua_fun_olua_int8_new$2(lua_State *L) { olua_startinvoke(L); - // @postnew @name(new) static olua_int8_t *create(@optional size_t len) - olua_int8_t *ret = olua_int8_t::create(); - int num_ret = olua_push_object(L, ret, "olua.int8_t"); + // @postnew @name(new) static olua_int8 *create() + olua_int8 *ret = olua_int8::create(); + int num_ret = olua_push_object(L, ret, "olua.int8"); // insert code after call olua_postnew(L, ret); @@ -943,42 +975,42 @@ static int _olua_int8_t_create$2(lua_State *L) return num_ret; } -static int _olua_int8_t_create(lua_State *L) +static int _olua_fun_olua_int8_new(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 0) { - // @postnew @name(new) static olua_int8_t *create(@optional size_t len) - return _olua_int8_t_create$2(L); + // @postnew @name(new) static olua_int8 *create() + return _olua_fun_olua_int8_new$2(L); } if (num_args == 1) { // if ((olua_is_integer(L, 1))) { - // @postnew @name(new) static olua_int8_t *create(@optional size_t len) - return _olua_int8_t_create$1(L); + // @postnew @name(new) static olua_int8 *create(@optional size_t len) + return _olua_fun_olua_int8_new$1(L); // } } - luaL_error(L, "method 'olua_int8_t::create' not support '%d' arguments", num_args); + luaL_error(L, "method 'olua_int8::new' not support '%d' arguments", num_args); return 0; } -static int _olua_int8_t_slice$1(lua_State *L) +static int _olua_fun_olua_int8_slice$1(lua_State *L) { olua_startinvoke(L); - olua_int8_t *self = nullptr; + olua_int8 *self = nullptr; size_t arg1 = 0; /** from */ size_t arg2 = 0; /** to */ - olua_to_object(L, 1, &self, "olua.int8_t"); + olua_to_object(L, 1, &self, "olua.int8"); olua_check_integer(L, 2, &arg1); olua_check_integer(L, 3, &arg2); - // @postnew olua_int8_t *slice(size_t from, @optional size_t to) - olua_int8_t *ret = self->slice(arg1, arg2); - int num_ret = olua_push_object(L, ret, "olua.int8_t"); + // @postnew olua_int8 *slice(size_t from, @optional size_t to) + olua_int8 *ret = self->slice(arg1, arg2); + int num_ret = olua_push_object(L, ret, "olua.int8"); // insert code after call olua_postnew(L, ret); @@ -988,19 +1020,19 @@ static int _olua_int8_t_slice$1(lua_State *L) return num_ret; } -static int _olua_int8_t_slice$2(lua_State *L) +static int _olua_fun_olua_int8_slice$2(lua_State *L) { olua_startinvoke(L); - olua_int8_t *self = nullptr; + olua_int8 *self = nullptr; size_t arg1 = 0; /** from */ - olua_to_object(L, 1, &self, "olua.int8_t"); + olua_to_object(L, 1, &self, "olua.int8"); olua_check_integer(L, 2, &arg1); - // @postnew olua_int8_t *slice(size_t from, @optional size_t to) - olua_int8_t *ret = self->slice(arg1); - int num_ret = olua_push_object(L, ret, "olua.int8_t"); + // @postnew olua_int8 *slice(size_t from) + olua_int8 *ret = self->slice(arg1); + int num_ret = olua_push_object(L, ret, "olua.int8"); // insert code after call olua_postnew(L, ret); @@ -1010,44 +1042,44 @@ static int _olua_int8_t_slice$2(lua_State *L) return num_ret; } -static int _olua_int8_t_slice(lua_State *L) +static int _olua_fun_olua_int8_slice(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_integer(L, 2))) { - // @postnew olua_int8_t *slice(size_t from, @optional size_t to) - return _olua_int8_t_slice$2(L); + // @postnew olua_int8 *slice(size_t from) + return _olua_fun_olua_int8_slice$2(L); // } } if (num_args == 2) { // if ((olua_is_integer(L, 2)) && (olua_is_integer(L, 3))) { - // @postnew olua_int8_t *slice(size_t from, @optional size_t to) - return _olua_int8_t_slice$1(L); + // @postnew olua_int8 *slice(size_t from, @optional size_t to) + return _olua_fun_olua_int8_slice$1(L); // } } - luaL_error(L, "method 'olua_int8_t::slice' not support '%d' arguments", num_args); + luaL_error(L, "method 'olua_int8::slice' not support '%d' arguments", num_args); return 0; } -static int _olua_int8_t_sub$1(lua_State *L) +static int _olua_fun_olua_int8_sub$1(lua_State *L) { olua_startinvoke(L); - olua_int8_t *self = nullptr; + olua_int8 *self = nullptr; size_t arg1 = 0; /** from */ size_t arg2 = 0; /** to */ - olua_to_object(L, 1, &self, "olua.int8_t"); + olua_to_object(L, 1, &self, "olua.int8"); olua_check_integer(L, 2, &arg1); olua_check_integer(L, 3, &arg2); - // @postnew olua_int8_t *sub(size_t from, @optional size_t to) - olua_int8_t *ret = self->sub(arg1, arg2); - int num_ret = olua_push_object(L, ret, "olua.int8_t"); + // @postnew olua_int8 *sub(size_t from, @optional size_t to) + olua_int8 *ret = self->sub(arg1, arg2); + int num_ret = olua_push_object(L, ret, "olua.int8"); // insert code after call olua_postnew(L, ret); @@ -1057,19 +1089,19 @@ static int _olua_int8_t_sub$1(lua_State *L) return num_ret; } -static int _olua_int8_t_sub$2(lua_State *L) +static int _olua_fun_olua_int8_sub$2(lua_State *L) { olua_startinvoke(L); - olua_int8_t *self = nullptr; + olua_int8 *self = nullptr; size_t arg1 = 0; /** from */ - olua_to_object(L, 1, &self, "olua.int8_t"); + olua_to_object(L, 1, &self, "olua.int8"); olua_check_integer(L, 2, &arg1); - // @postnew olua_int8_t *sub(size_t from, @optional size_t to) - olua_int8_t *ret = self->sub(arg1); - int num_ret = olua_push_object(L, ret, "olua.int8_t"); + // @postnew olua_int8 *sub(size_t from) + olua_int8 *ret = self->sub(arg1); + int num_ret = olua_push_object(L, ret, "olua.int8"); // insert code after call olua_postnew(L, ret); @@ -1079,54 +1111,54 @@ static int _olua_int8_t_sub$2(lua_State *L) return num_ret; } -static int _olua_int8_t_sub(lua_State *L) +static int _olua_fun_olua_int8_sub(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_integer(L, 2))) { - // @postnew olua_int8_t *sub(size_t from, @optional size_t to) - return _olua_int8_t_sub$2(L); + // @postnew olua_int8 *sub(size_t from) + return _olua_fun_olua_int8_sub$2(L); // } } if (num_args == 2) { // if ((olua_is_integer(L, 2)) && (olua_is_integer(L, 3))) { - // @postnew olua_int8_t *sub(size_t from, @optional size_t to) - return _olua_int8_t_sub$1(L); + // @postnew olua_int8 *sub(size_t from, @optional size_t to) + return _olua_fun_olua_int8_sub$1(L); // } } - luaL_error(L, "method 'olua_int8_t::sub' not support '%d' arguments", num_args); + luaL_error(L, "method 'olua_int8::sub' not support '%d' arguments", num_args); return 0; } -static int _olua_int8_t_take(lua_State *L) +static int _olua_fun_olua_int8_take(lua_State *L) { olua_startinvoke(L); - olua_int8_t *self = nullptr; + olua_int8 *self = nullptr; - olua_to_object(L, 1, &self, "olua.int8_t"); + olua_to_object(L, 1, &self, "olua.int8"); - // olua_int8_t *take() - olua_int8_t *ret = self->take(); - int num_ret = olua_push_object(L, ret, "olua.int8_t"); + // olua_int8 *take() + olua_int8 *ret = self->take(); + int num_ret = olua_push_object(L, ret, "olua.int8"); olua_endinvoke(L); return num_ret; } -static int _olua_int8_t_tostring(lua_State *L) +static int _olua_fun_olua_int8_tostring(lua_State *L) { olua_startinvoke(L); - olua_int8_t *self = nullptr; + olua_int8 *self = nullptr; size_t arg2 = 0; /** len */ - olua_to_object(L, 1, &self, "olua.int8_t"); + olua_to_object(L, 1, &self, "olua.int8"); olua_check_integer(L, 2, &arg2); // olua_Return tostring(lua_State *L, size_t len) @@ -1137,16 +1169,16 @@ static int _olua_int8_t_tostring(lua_State *L) return (int)ret; } -static int _olua_int8_t_length(lua_State *L) +static int _olua_fun_olua_int8_value$1(lua_State *L) { olua_startinvoke(L); - olua_int8_t *self = nullptr; + olua_int8 *self = nullptr; - olua_to_object(L, 1, &self, "olua.int8_t"); + olua_to_object(L, 1, &self, "olua.int8"); - // @getter @name(length) size_t length() - size_t ret = self->length(); + // @getter @name(value) const int8_t &value() + const int8_t &ret = self->value(); int num_ret = olua_push_integer(L, ret); olua_endinvoke(L); @@ -1154,87 +1186,82 @@ static int _olua_int8_t_length(lua_State *L) return num_ret; } -static int _olua_int8_t_rawdata(lua_State *L) +static int _olua_fun_olua_int8_value$2(lua_State *L) { olua_startinvoke(L); - olua_int8_t *self = nullptr; + olua_int8 *self = nullptr; + int8_t arg1 = 0; /** v */ - olua_to_object(L, 1, &self, "olua.int8_t"); + olua_to_object(L, 1, &self, "olua.int8"); + olua_check_integer(L, 2, &arg1); - // @getter @name(rawdata) void *rawdata() - void *ret = self->rawdata(); - int num_ret = olua_push_object(L, ret, "void *"); + // @setter @name(value) void value(const int8_t &v) + self->value(arg1); olua_endinvoke(L); - return num_ret; + return 0; } -static int _olua_int8_t_size(lua_State *L) +static int _olua_fun_olua_int8_value(lua_State *L) { - olua_startinvoke(L); - - olua_int8_t *self = nullptr; + int num_args = lua_gettop(L) - 1; - olua_to_object(L, 1, &self, "olua.int8_t"); + if (num_args == 0) { + // @getter @name(value) const int8_t &value() + return _olua_fun_olua_int8_value$1(L); + } - // @getter @name(sizeof) size_t size() - size_t ret = self->size(); - int num_ret = olua_push_integer(L, ret); + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // @setter @name(value) void value(const int8_t &v) + return _olua_fun_olua_int8_value$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'olua_int8::value' not support '%d' arguments", num_args); - return num_ret; + return 0; } -static int _olua_int8_t_value(lua_State *L) +static int _olua_cls_olua_int8(lua_State *L) { - olua_startinvoke(L); - - olua_int8_t *self = nullptr; - - olua_to_object(L, 1, &self, "olua.int8_t"); - - // @getter @name(value) const int8_t &value() - const int8_t &ret = self->value(); - int num_ret = olua_push_integer(L, ret); - - olua_endinvoke(L); + oluacls_class(L, "olua.int8"); + oluacls_func(L, "__gc", _olua_fun_olua_int8___gc); + oluacls_func(L, "__index", _olua_fun_olua_int8___index); + oluacls_func(L, "__newindex", _olua_fun_olua_int8___newindex); + oluacls_func(L, "__olua_move", _olua_fun_olua_int8___olua_move); + oluacls_func(L, "new", _olua_fun_olua_int8_new); + oluacls_func(L, "slice", _olua_fun_olua_int8_slice); + oluacls_func(L, "sub", _olua_fun_olua_int8_sub); + oluacls_func(L, "take", _olua_fun_olua_int8_take); + oluacls_func(L, "tostring", _olua_fun_olua_int8_tostring); + oluacls_prop(L, "buffer", _olua_fun_olua_int8_buffer, nullptr); + oluacls_prop(L, "length", _olua_fun_olua_int8_length, nullptr); + oluacls_prop(L, "value", _olua_fun_olua_int8_value, _olua_fun_olua_int8_value); - return num_ret; + return 1; } OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_olua_int8_t(lua_State *L) -{ - oluacls_class(L, "olua.int8_t"); - oluacls_func(L, "__gc", _olua_int8_t___gc); - oluacls_func(L, "__index", _olua_int8_t___index); - oluacls_func(L, "__newindex", _olua_int8_t___newindex); - oluacls_func(L, "__olua_move", _olua_int8_t___olua_move); - oluacls_func(L, "assign", _olua_int8_t_assign); - oluacls_func(L, "new", _olua_int8_t_create); - oluacls_func(L, "slice", _olua_int8_t_slice); - oluacls_func(L, "sub", _olua_int8_t_sub); - oluacls_func(L, "take", _olua_int8_t_take); - oluacls_func(L, "tostring", _olua_int8_t_tostring); - oluacls_prop(L, "length", _olua_int8_t_length, _olua_int8_t_length); - oluacls_prop(L, "rawdata", _olua_int8_t_rawdata, nullptr); - oluacls_prop(L, "sizeof", _olua_int8_t_size, nullptr); - oluacls_prop(L, "value", _olua_int8_t_value, _olua_int8_t_value); - +OLUA_LIB int luaopen_olua_int8(lua_State *L) +{ + olua_require(L, "types", luaopen_types); + if (!olua_getclass(L, "olua.int8")) { + luaL_error(L, "class not found: olua_int8"); + } return 1; } OLUA_END_DECLS -static int _olua_int16_t___gc(lua_State *L) +static int _olua_fun_olua_int16___gc(lua_State *L) { olua_startinvoke(L); - olua_int16_t *self = nullptr; + olua_int16 *self = nullptr; - olua_to_object(L, 1, &self, "olua.int16_t"); + olua_to_object(L, 1, &self, "olua.int16"); // olua_Return __gc(lua_State *L) olua_Return ret = self->__gc(L); @@ -1244,14 +1271,14 @@ static int _olua_int16_t___gc(lua_State *L) return (int)ret; } -static int _olua_int16_t___index(lua_State *L) +static int _olua_fun_olua_int16___index(lua_State *L) { olua_startinvoke(L); - olua_int16_t *self = nullptr; + olua_int16 *self = nullptr; unsigned int arg1 = 0; /** idx */ - olua_to_object(L, 1, &self, "olua.int16_t"); + olua_to_object(L, 1, &self, "olua.int16"); olua_check_integer(L, 2, &arg1); // int16_t __index(unsigned int idx) @@ -1263,15 +1290,15 @@ static int _olua_int16_t___index(lua_State *L) return num_ret; } -static int _olua_int16_t___newindex(lua_State *L) +static int _olua_fun_olua_int16___newindex(lua_State *L) { olua_startinvoke(L); - olua_int16_t *self = nullptr; + olua_int16 *self = nullptr; unsigned int arg1 = 0; /** idx */ int16_t arg2 = 0; /** v */ - olua_to_object(L, 1, &self, "olua.int16_t"); + olua_to_object(L, 1, &self, "olua.int16"); olua_check_integer(L, 2, &arg1); olua_check_integer(L, 3, &arg2); @@ -1283,39 +1310,53 @@ static int _olua_int16_t___newindex(lua_State *L) return 0; } -static int _olua_int16_t___olua_move(lua_State *L) +static int _olua_fun_olua_int16___olua_move(lua_State *L) { olua_startinvoke(L); - auto self = (olua_int16_t *)olua_toobj(L, 1, "olua.int16_t"); - olua_push_object(L, self, "olua.int16_t"); + auto self = (olua_int16 *)olua_toobj(L, 1, "olua.int16"); + olua_push_object(L, self, "olua.int16"); olua_endinvoke(L); return 1; } -static int _olua_int16_t_assign(lua_State *L) +static int _olua_fun_olua_int16_buffer(lua_State *L) { olua_startinvoke(L); - olua_int16_t *self = nullptr; - const char *arg1 = nullptr; /** data */ - size_t arg2 = 0; /** len */ + olua_int16 *self = nullptr; - olua_to_object(L, 1, &self, "olua.int16_t"); - olua_check_string(L, 2, &arg1); - olua_check_integer(L, 3, &arg2); + olua_to_object(L, 1, &self, "olua.int16"); - // void assign(const char *data, size_t len) - self->assign(arg1, arg2); + // @getter @name(buffer) @type(void *) int16_t *buffer() + void *ret = self->buffer(); + int num_ret = olua_push_object(L, ret, "void *"); olua_endinvoke(L); - return 0; + return num_ret; +} + +static int _olua_fun_olua_int16_length(lua_State *L) +{ + olua_startinvoke(L); + + olua_int16 *self = nullptr; + + olua_to_object(L, 1, &self, "olua.int16"); + + // @getter @name(length) size_t length() + size_t ret = self->length(); + int num_ret = olua_push_integer(L, ret); + + olua_endinvoke(L); + + return num_ret; } -static int _olua_int16_t_create$1(lua_State *L) +static int _olua_fun_olua_int16_new$1(lua_State *L) { olua_startinvoke(L); @@ -1323,9 +1364,9 @@ static int _olua_int16_t_create$1(lua_State *L) olua_check_integer(L, 1, &arg1); - // @postnew @name(new) static olua_int16_t *create(@optional size_t len) - olua_int16_t *ret = olua_int16_t::create(arg1); - int num_ret = olua_push_object(L, ret, "olua.int16_t"); + // @postnew @name(new) static olua_int16 *create(@optional size_t len) + olua_int16 *ret = olua_int16::create(arg1); + int num_ret = olua_push_object(L, ret, "olua.int16"); // insert code after call olua_postnew(L, ret); @@ -1335,13 +1376,13 @@ static int _olua_int16_t_create$1(lua_State *L) return num_ret; } -static int _olua_int16_t_create$2(lua_State *L) +static int _olua_fun_olua_int16_new$2(lua_State *L) { olua_startinvoke(L); - // @postnew @name(new) static olua_int16_t *create(@optional size_t len) - olua_int16_t *ret = olua_int16_t::create(); - int num_ret = olua_push_object(L, ret, "olua.int16_t"); + // @postnew @name(new) static olua_int16 *create() + olua_int16 *ret = olua_int16::create(); + int num_ret = olua_push_object(L, ret, "olua.int16"); // insert code after call olua_postnew(L, ret); @@ -1351,42 +1392,42 @@ static int _olua_int16_t_create$2(lua_State *L) return num_ret; } -static int _olua_int16_t_create(lua_State *L) +static int _olua_fun_olua_int16_new(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 0) { - // @postnew @name(new) static olua_int16_t *create(@optional size_t len) - return _olua_int16_t_create$2(L); + // @postnew @name(new) static olua_int16 *create() + return _olua_fun_olua_int16_new$2(L); } if (num_args == 1) { // if ((olua_is_integer(L, 1))) { - // @postnew @name(new) static olua_int16_t *create(@optional size_t len) - return _olua_int16_t_create$1(L); + // @postnew @name(new) static olua_int16 *create(@optional size_t len) + return _olua_fun_olua_int16_new$1(L); // } } - luaL_error(L, "method 'olua_int16_t::create' not support '%d' arguments", num_args); + luaL_error(L, "method 'olua_int16::new' not support '%d' arguments", num_args); return 0; } -static int _olua_int16_t_slice$1(lua_State *L) +static int _olua_fun_olua_int16_slice$1(lua_State *L) { olua_startinvoke(L); - olua_int16_t *self = nullptr; + olua_int16 *self = nullptr; size_t arg1 = 0; /** from */ size_t arg2 = 0; /** to */ - olua_to_object(L, 1, &self, "olua.int16_t"); + olua_to_object(L, 1, &self, "olua.int16"); olua_check_integer(L, 2, &arg1); olua_check_integer(L, 3, &arg2); - // @postnew olua_int16_t *slice(size_t from, @optional size_t to) - olua_int16_t *ret = self->slice(arg1, arg2); - int num_ret = olua_push_object(L, ret, "olua.int16_t"); + // @postnew olua_int16 *slice(size_t from, @optional size_t to) + olua_int16 *ret = self->slice(arg1, arg2); + int num_ret = olua_push_object(L, ret, "olua.int16"); // insert code after call olua_postnew(L, ret); @@ -1396,19 +1437,19 @@ static int _olua_int16_t_slice$1(lua_State *L) return num_ret; } -static int _olua_int16_t_slice$2(lua_State *L) +static int _olua_fun_olua_int16_slice$2(lua_State *L) { olua_startinvoke(L); - olua_int16_t *self = nullptr; + olua_int16 *self = nullptr; size_t arg1 = 0; /** from */ - olua_to_object(L, 1, &self, "olua.int16_t"); + olua_to_object(L, 1, &self, "olua.int16"); olua_check_integer(L, 2, &arg1); - // @postnew olua_int16_t *slice(size_t from, @optional size_t to) - olua_int16_t *ret = self->slice(arg1); - int num_ret = olua_push_object(L, ret, "olua.int16_t"); + // @postnew olua_int16 *slice(size_t from) + olua_int16 *ret = self->slice(arg1); + int num_ret = olua_push_object(L, ret, "olua.int16"); // insert code after call olua_postnew(L, ret); @@ -1418,44 +1459,44 @@ static int _olua_int16_t_slice$2(lua_State *L) return num_ret; } -static int _olua_int16_t_slice(lua_State *L) +static int _olua_fun_olua_int16_slice(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_integer(L, 2))) { - // @postnew olua_int16_t *slice(size_t from, @optional size_t to) - return _olua_int16_t_slice$2(L); + // @postnew olua_int16 *slice(size_t from) + return _olua_fun_olua_int16_slice$2(L); // } } if (num_args == 2) { // if ((olua_is_integer(L, 2)) && (olua_is_integer(L, 3))) { - // @postnew olua_int16_t *slice(size_t from, @optional size_t to) - return _olua_int16_t_slice$1(L); + // @postnew olua_int16 *slice(size_t from, @optional size_t to) + return _olua_fun_olua_int16_slice$1(L); // } } - luaL_error(L, "method 'olua_int16_t::slice' not support '%d' arguments", num_args); + luaL_error(L, "method 'olua_int16::slice' not support '%d' arguments", num_args); return 0; } -static int _olua_int16_t_sub$1(lua_State *L) +static int _olua_fun_olua_int16_sub$1(lua_State *L) { olua_startinvoke(L); - olua_int16_t *self = nullptr; + olua_int16 *self = nullptr; size_t arg1 = 0; /** from */ size_t arg2 = 0; /** to */ - olua_to_object(L, 1, &self, "olua.int16_t"); + olua_to_object(L, 1, &self, "olua.int16"); olua_check_integer(L, 2, &arg1); olua_check_integer(L, 3, &arg2); - // @postnew olua_int16_t *sub(size_t from, @optional size_t to) - olua_int16_t *ret = self->sub(arg1, arg2); - int num_ret = olua_push_object(L, ret, "olua.int16_t"); + // @postnew olua_int16 *sub(size_t from, @optional size_t to) + olua_int16 *ret = self->sub(arg1, arg2); + int num_ret = olua_push_object(L, ret, "olua.int16"); // insert code after call olua_postnew(L, ret); @@ -1465,19 +1506,19 @@ static int _olua_int16_t_sub$1(lua_State *L) return num_ret; } -static int _olua_int16_t_sub$2(lua_State *L) +static int _olua_fun_olua_int16_sub$2(lua_State *L) { olua_startinvoke(L); - olua_int16_t *self = nullptr; + olua_int16 *self = nullptr; size_t arg1 = 0; /** from */ - olua_to_object(L, 1, &self, "olua.int16_t"); + olua_to_object(L, 1, &self, "olua.int16"); olua_check_integer(L, 2, &arg1); - // @postnew olua_int16_t *sub(size_t from, @optional size_t to) - olua_int16_t *ret = self->sub(arg1); - int num_ret = olua_push_object(L, ret, "olua.int16_t"); + // @postnew olua_int16 *sub(size_t from) + olua_int16 *ret = self->sub(arg1); + int num_ret = olua_push_object(L, ret, "olua.int16"); // insert code after call olua_postnew(L, ret); @@ -1487,54 +1528,54 @@ static int _olua_int16_t_sub$2(lua_State *L) return num_ret; } -static int _olua_int16_t_sub(lua_State *L) +static int _olua_fun_olua_int16_sub(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_integer(L, 2))) { - // @postnew olua_int16_t *sub(size_t from, @optional size_t to) - return _olua_int16_t_sub$2(L); + // @postnew olua_int16 *sub(size_t from) + return _olua_fun_olua_int16_sub$2(L); // } } if (num_args == 2) { // if ((olua_is_integer(L, 2)) && (olua_is_integer(L, 3))) { - // @postnew olua_int16_t *sub(size_t from, @optional size_t to) - return _olua_int16_t_sub$1(L); + // @postnew olua_int16 *sub(size_t from, @optional size_t to) + return _olua_fun_olua_int16_sub$1(L); // } } - luaL_error(L, "method 'olua_int16_t::sub' not support '%d' arguments", num_args); + luaL_error(L, "method 'olua_int16::sub' not support '%d' arguments", num_args); return 0; } -static int _olua_int16_t_take(lua_State *L) +static int _olua_fun_olua_int16_take(lua_State *L) { olua_startinvoke(L); - olua_int16_t *self = nullptr; + olua_int16 *self = nullptr; - olua_to_object(L, 1, &self, "olua.int16_t"); + olua_to_object(L, 1, &self, "olua.int16"); - // olua_int16_t *take() - olua_int16_t *ret = self->take(); - int num_ret = olua_push_object(L, ret, "olua.int16_t"); + // olua_int16 *take() + olua_int16 *ret = self->take(); + int num_ret = olua_push_object(L, ret, "olua.int16"); olua_endinvoke(L); return num_ret; } -static int _olua_int16_t_tostring(lua_State *L) +static int _olua_fun_olua_int16_tostring(lua_State *L) { olua_startinvoke(L); - olua_int16_t *self = nullptr; + olua_int16 *self = nullptr; size_t arg2 = 0; /** len */ - olua_to_object(L, 1, &self, "olua.int16_t"); + olua_to_object(L, 1, &self, "olua.int16"); olua_check_integer(L, 2, &arg2); // olua_Return tostring(lua_State *L, size_t len) @@ -1545,16 +1586,16 @@ static int _olua_int16_t_tostring(lua_State *L) return (int)ret; } -static int _olua_int16_t_length(lua_State *L) +static int _olua_fun_olua_int16_value$1(lua_State *L) { olua_startinvoke(L); - olua_int16_t *self = nullptr; + olua_int16 *self = nullptr; - olua_to_object(L, 1, &self, "olua.int16_t"); + olua_to_object(L, 1, &self, "olua.int16"); - // @getter @name(length) size_t length() - size_t ret = self->length(); + // @getter @name(value) const int16_t &value() + const int16_t &ret = self->value(); int num_ret = olua_push_integer(L, ret); olua_endinvoke(L); @@ -1562,87 +1603,82 @@ static int _olua_int16_t_length(lua_State *L) return num_ret; } -static int _olua_int16_t_rawdata(lua_State *L) +static int _olua_fun_olua_int16_value$2(lua_State *L) { olua_startinvoke(L); - olua_int16_t *self = nullptr; + olua_int16 *self = nullptr; + int16_t arg1 = 0; /** v */ - olua_to_object(L, 1, &self, "olua.int16_t"); + olua_to_object(L, 1, &self, "olua.int16"); + olua_check_integer(L, 2, &arg1); - // @getter @name(rawdata) void *rawdata() - void *ret = self->rawdata(); - int num_ret = olua_push_object(L, ret, "void *"); + // @setter @name(value) void value(const int16_t &v) + self->value(arg1); olua_endinvoke(L); - return num_ret; + return 0; } -static int _olua_int16_t_size(lua_State *L) +static int _olua_fun_olua_int16_value(lua_State *L) { - olua_startinvoke(L); - - olua_int16_t *self = nullptr; + int num_args = lua_gettop(L) - 1; - olua_to_object(L, 1, &self, "olua.int16_t"); + if (num_args == 0) { + // @getter @name(value) const int16_t &value() + return _olua_fun_olua_int16_value$1(L); + } - // @getter @name(sizeof) size_t size() - size_t ret = self->size(); - int num_ret = olua_push_integer(L, ret); + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // @setter @name(value) void value(const int16_t &v) + return _olua_fun_olua_int16_value$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'olua_int16::value' not support '%d' arguments", num_args); - return num_ret; + return 0; } -static int _olua_int16_t_value(lua_State *L) +static int _olua_cls_olua_int16(lua_State *L) { - olua_startinvoke(L); - - olua_int16_t *self = nullptr; - - olua_to_object(L, 1, &self, "olua.int16_t"); - - // @getter @name(value) const int16_t &value() - const int16_t &ret = self->value(); - int num_ret = olua_push_integer(L, ret); - - olua_endinvoke(L); + oluacls_class(L, "olua.int16"); + oluacls_func(L, "__gc", _olua_fun_olua_int16___gc); + oluacls_func(L, "__index", _olua_fun_olua_int16___index); + oluacls_func(L, "__newindex", _olua_fun_olua_int16___newindex); + oluacls_func(L, "__olua_move", _olua_fun_olua_int16___olua_move); + oluacls_func(L, "new", _olua_fun_olua_int16_new); + oluacls_func(L, "slice", _olua_fun_olua_int16_slice); + oluacls_func(L, "sub", _olua_fun_olua_int16_sub); + oluacls_func(L, "take", _olua_fun_olua_int16_take); + oluacls_func(L, "tostring", _olua_fun_olua_int16_tostring); + oluacls_prop(L, "buffer", _olua_fun_olua_int16_buffer, nullptr); + oluacls_prop(L, "length", _olua_fun_olua_int16_length, nullptr); + oluacls_prop(L, "value", _olua_fun_olua_int16_value, _olua_fun_olua_int16_value); - return num_ret; + return 1; } OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_olua_int16_t(lua_State *L) -{ - oluacls_class(L, "olua.int16_t"); - oluacls_func(L, "__gc", _olua_int16_t___gc); - oluacls_func(L, "__index", _olua_int16_t___index); - oluacls_func(L, "__newindex", _olua_int16_t___newindex); - oluacls_func(L, "__olua_move", _olua_int16_t___olua_move); - oluacls_func(L, "assign", _olua_int16_t_assign); - oluacls_func(L, "new", _olua_int16_t_create); - oluacls_func(L, "slice", _olua_int16_t_slice); - oluacls_func(L, "sub", _olua_int16_t_sub); - oluacls_func(L, "take", _olua_int16_t_take); - oluacls_func(L, "tostring", _olua_int16_t_tostring); - oluacls_prop(L, "length", _olua_int16_t_length, _olua_int16_t_length); - oluacls_prop(L, "rawdata", _olua_int16_t_rawdata, nullptr); - oluacls_prop(L, "sizeof", _olua_int16_t_size, nullptr); - oluacls_prop(L, "value", _olua_int16_t_value, _olua_int16_t_value); - +OLUA_LIB int luaopen_olua_int16(lua_State *L) +{ + olua_require(L, "types", luaopen_types); + if (!olua_getclass(L, "olua.int16")) { + luaL_error(L, "class not found: olua_int16"); + } return 1; } OLUA_END_DECLS -static int _olua_int32_t___gc(lua_State *L) +static int _olua_fun_olua_int32___gc(lua_State *L) { olua_startinvoke(L); - olua_int32_t *self = nullptr; + olua_int32 *self = nullptr; - olua_to_object(L, 1, &self, "olua.int32_t"); + olua_to_object(L, 1, &self, "olua.int32"); // olua_Return __gc(lua_State *L) olua_Return ret = self->__gc(L); @@ -1652,14 +1688,14 @@ static int _olua_int32_t___gc(lua_State *L) return (int)ret; } -static int _olua_int32_t___index(lua_State *L) +static int _olua_fun_olua_int32___index(lua_State *L) { olua_startinvoke(L); - olua_int32_t *self = nullptr; + olua_int32 *self = nullptr; unsigned int arg1 = 0; /** idx */ - olua_to_object(L, 1, &self, "olua.int32_t"); + olua_to_object(L, 1, &self, "olua.int32"); olua_check_integer(L, 2, &arg1); // int32_t __index(unsigned int idx) @@ -1671,15 +1707,15 @@ static int _olua_int32_t___index(lua_State *L) return num_ret; } -static int _olua_int32_t___newindex(lua_State *L) +static int _olua_fun_olua_int32___newindex(lua_State *L) { olua_startinvoke(L); - olua_int32_t *self = nullptr; + olua_int32 *self = nullptr; unsigned int arg1 = 0; /** idx */ int32_t arg2 = 0; /** v */ - olua_to_object(L, 1, &self, "olua.int32_t"); + olua_to_object(L, 1, &self, "olua.int32"); olua_check_integer(L, 2, &arg1); olua_check_integer(L, 3, &arg2); @@ -1691,49 +1727,63 @@ static int _olua_int32_t___newindex(lua_State *L) return 0; } -static int _olua_int32_t___olua_move(lua_State *L) +static int _olua_fun_olua_int32___olua_move(lua_State *L) { olua_startinvoke(L); - auto self = (olua_int32_t *)olua_toobj(L, 1, "olua.int32_t"); - olua_push_object(L, self, "olua.int32_t"); + auto self = (olua_int32 *)olua_toobj(L, 1, "olua.int32"); + olua_push_object(L, self, "olua.int32"); olua_endinvoke(L); return 1; } -static int _olua_int32_t_assign(lua_State *L) +static int _olua_fun_olua_int32_buffer(lua_State *L) { olua_startinvoke(L); - olua_int32_t *self = nullptr; - const char *arg1 = nullptr; /** data */ - size_t arg2 = 0; /** len */ + olua_int32 *self = nullptr; - olua_to_object(L, 1, &self, "olua.int32_t"); - olua_check_string(L, 2, &arg1); - olua_check_integer(L, 3, &arg2); + olua_to_object(L, 1, &self, "olua.int32"); - // void assign(const char *data, size_t len) - self->assign(arg1, arg2); + // @getter @name(buffer) @type(void *) int32_t *buffer() + void *ret = self->buffer(); + int num_ret = olua_push_object(L, ret, "void *"); olua_endinvoke(L); - return 0; + return num_ret; } -static int _olua_int32_t_create$1(lua_State *L) +static int _olua_fun_olua_int32_length(lua_State *L) { olua_startinvoke(L); - size_t arg1 = 0; /** len */ + olua_int32 *self = nullptr; - olua_check_integer(L, 1, &arg1); + olua_to_object(L, 1, &self, "olua.int32"); - // @postnew @name(new) static olua_int32_t *create(@optional size_t len) - olua_int32_t *ret = olua_int32_t::create(arg1); - int num_ret = olua_push_object(L, ret, "olua.int32_t"); + // @getter @name(length) size_t length() + size_t ret = self->length(); + int num_ret = olua_push_integer(L, ret); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_olua_int32_new$1(lua_State *L) +{ + olua_startinvoke(L); + + size_t arg1 = 0; /** len */ + + olua_check_integer(L, 1, &arg1); + + // @postnew @name(new) static olua_int32 *create(@optional size_t len) + olua_int32 *ret = olua_int32::create(arg1); + int num_ret = olua_push_object(L, ret, "olua.int32"); // insert code after call olua_postnew(L, ret); @@ -1743,13 +1793,13 @@ static int _olua_int32_t_create$1(lua_State *L) return num_ret; } -static int _olua_int32_t_create$2(lua_State *L) +static int _olua_fun_olua_int32_new$2(lua_State *L) { olua_startinvoke(L); - // @postnew @name(new) static olua_int32_t *create(@optional size_t len) - olua_int32_t *ret = olua_int32_t::create(); - int num_ret = olua_push_object(L, ret, "olua.int32_t"); + // @postnew @name(new) static olua_int32 *create() + olua_int32 *ret = olua_int32::create(); + int num_ret = olua_push_object(L, ret, "olua.int32"); // insert code after call olua_postnew(L, ret); @@ -1759,42 +1809,42 @@ static int _olua_int32_t_create$2(lua_State *L) return num_ret; } -static int _olua_int32_t_create(lua_State *L) +static int _olua_fun_olua_int32_new(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 0) { - // @postnew @name(new) static olua_int32_t *create(@optional size_t len) - return _olua_int32_t_create$2(L); + // @postnew @name(new) static olua_int32 *create() + return _olua_fun_olua_int32_new$2(L); } if (num_args == 1) { // if ((olua_is_integer(L, 1))) { - // @postnew @name(new) static olua_int32_t *create(@optional size_t len) - return _olua_int32_t_create$1(L); + // @postnew @name(new) static olua_int32 *create(@optional size_t len) + return _olua_fun_olua_int32_new$1(L); // } } - luaL_error(L, "method 'olua_int32_t::create' not support '%d' arguments", num_args); + luaL_error(L, "method 'olua_int32::new' not support '%d' arguments", num_args); return 0; } -static int _olua_int32_t_slice$1(lua_State *L) +static int _olua_fun_olua_int32_slice$1(lua_State *L) { olua_startinvoke(L); - olua_int32_t *self = nullptr; + olua_int32 *self = nullptr; size_t arg1 = 0; /** from */ size_t arg2 = 0; /** to */ - olua_to_object(L, 1, &self, "olua.int32_t"); + olua_to_object(L, 1, &self, "olua.int32"); olua_check_integer(L, 2, &arg1); olua_check_integer(L, 3, &arg2); - // @postnew olua_int32_t *slice(size_t from, @optional size_t to) - olua_int32_t *ret = self->slice(arg1, arg2); - int num_ret = olua_push_object(L, ret, "olua.int32_t"); + // @postnew olua_int32 *slice(size_t from, @optional size_t to) + olua_int32 *ret = self->slice(arg1, arg2); + int num_ret = olua_push_object(L, ret, "olua.int32"); // insert code after call olua_postnew(L, ret); @@ -1804,19 +1854,19 @@ static int _olua_int32_t_slice$1(lua_State *L) return num_ret; } -static int _olua_int32_t_slice$2(lua_State *L) +static int _olua_fun_olua_int32_slice$2(lua_State *L) { olua_startinvoke(L); - olua_int32_t *self = nullptr; + olua_int32 *self = nullptr; size_t arg1 = 0; /** from */ - olua_to_object(L, 1, &self, "olua.int32_t"); + olua_to_object(L, 1, &self, "olua.int32"); olua_check_integer(L, 2, &arg1); - // @postnew olua_int32_t *slice(size_t from, @optional size_t to) - olua_int32_t *ret = self->slice(arg1); - int num_ret = olua_push_object(L, ret, "olua.int32_t"); + // @postnew olua_int32 *slice(size_t from) + olua_int32 *ret = self->slice(arg1); + int num_ret = olua_push_object(L, ret, "olua.int32"); // insert code after call olua_postnew(L, ret); @@ -1826,44 +1876,44 @@ static int _olua_int32_t_slice$2(lua_State *L) return num_ret; } -static int _olua_int32_t_slice(lua_State *L) +static int _olua_fun_olua_int32_slice(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_integer(L, 2))) { - // @postnew olua_int32_t *slice(size_t from, @optional size_t to) - return _olua_int32_t_slice$2(L); + // @postnew olua_int32 *slice(size_t from) + return _olua_fun_olua_int32_slice$2(L); // } } if (num_args == 2) { // if ((olua_is_integer(L, 2)) && (olua_is_integer(L, 3))) { - // @postnew olua_int32_t *slice(size_t from, @optional size_t to) - return _olua_int32_t_slice$1(L); + // @postnew olua_int32 *slice(size_t from, @optional size_t to) + return _olua_fun_olua_int32_slice$1(L); // } } - luaL_error(L, "method 'olua_int32_t::slice' not support '%d' arguments", num_args); + luaL_error(L, "method 'olua_int32::slice' not support '%d' arguments", num_args); return 0; } -static int _olua_int32_t_sub$1(lua_State *L) +static int _olua_fun_olua_int32_sub$1(lua_State *L) { olua_startinvoke(L); - olua_int32_t *self = nullptr; + olua_int32 *self = nullptr; size_t arg1 = 0; /** from */ size_t arg2 = 0; /** to */ - olua_to_object(L, 1, &self, "olua.int32_t"); + olua_to_object(L, 1, &self, "olua.int32"); olua_check_integer(L, 2, &arg1); olua_check_integer(L, 3, &arg2); - // @postnew olua_int32_t *sub(size_t from, @optional size_t to) - olua_int32_t *ret = self->sub(arg1, arg2); - int num_ret = olua_push_object(L, ret, "olua.int32_t"); + // @postnew olua_int32 *sub(size_t from, @optional size_t to) + olua_int32 *ret = self->sub(arg1, arg2); + int num_ret = olua_push_object(L, ret, "olua.int32"); // insert code after call olua_postnew(L, ret); @@ -1873,19 +1923,19 @@ static int _olua_int32_t_sub$1(lua_State *L) return num_ret; } -static int _olua_int32_t_sub$2(lua_State *L) +static int _olua_fun_olua_int32_sub$2(lua_State *L) { olua_startinvoke(L); - olua_int32_t *self = nullptr; + olua_int32 *self = nullptr; size_t arg1 = 0; /** from */ - olua_to_object(L, 1, &self, "olua.int32_t"); + olua_to_object(L, 1, &self, "olua.int32"); olua_check_integer(L, 2, &arg1); - // @postnew olua_int32_t *sub(size_t from, @optional size_t to) - olua_int32_t *ret = self->sub(arg1); - int num_ret = olua_push_object(L, ret, "olua.int32_t"); + // @postnew olua_int32 *sub(size_t from) + olua_int32 *ret = self->sub(arg1); + int num_ret = olua_push_object(L, ret, "olua.int32"); // insert code after call olua_postnew(L, ret); @@ -1895,54 +1945,54 @@ static int _olua_int32_t_sub$2(lua_State *L) return num_ret; } -static int _olua_int32_t_sub(lua_State *L) +static int _olua_fun_olua_int32_sub(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_integer(L, 2))) { - // @postnew olua_int32_t *sub(size_t from, @optional size_t to) - return _olua_int32_t_sub$2(L); + // @postnew olua_int32 *sub(size_t from) + return _olua_fun_olua_int32_sub$2(L); // } } if (num_args == 2) { // if ((olua_is_integer(L, 2)) && (olua_is_integer(L, 3))) { - // @postnew olua_int32_t *sub(size_t from, @optional size_t to) - return _olua_int32_t_sub$1(L); + // @postnew olua_int32 *sub(size_t from, @optional size_t to) + return _olua_fun_olua_int32_sub$1(L); // } } - luaL_error(L, "method 'olua_int32_t::sub' not support '%d' arguments", num_args); + luaL_error(L, "method 'olua_int32::sub' not support '%d' arguments", num_args); return 0; } -static int _olua_int32_t_take(lua_State *L) +static int _olua_fun_olua_int32_take(lua_State *L) { olua_startinvoke(L); - olua_int32_t *self = nullptr; + olua_int32 *self = nullptr; - olua_to_object(L, 1, &self, "olua.int32_t"); + olua_to_object(L, 1, &self, "olua.int32"); - // olua_int32_t *take() - olua_int32_t *ret = self->take(); - int num_ret = olua_push_object(L, ret, "olua.int32_t"); + // olua_int32 *take() + olua_int32 *ret = self->take(); + int num_ret = olua_push_object(L, ret, "olua.int32"); olua_endinvoke(L); return num_ret; } -static int _olua_int32_t_tostring(lua_State *L) +static int _olua_fun_olua_int32_tostring(lua_State *L) { olua_startinvoke(L); - olua_int32_t *self = nullptr; + olua_int32 *self = nullptr; size_t arg2 = 0; /** len */ - olua_to_object(L, 1, &self, "olua.int32_t"); + olua_to_object(L, 1, &self, "olua.int32"); olua_check_integer(L, 2, &arg2); // olua_Return tostring(lua_State *L, size_t len) @@ -1953,16 +2003,16 @@ static int _olua_int32_t_tostring(lua_State *L) return (int)ret; } -static int _olua_int32_t_length(lua_State *L) +static int _olua_fun_olua_int32_value$1(lua_State *L) { olua_startinvoke(L); - olua_int32_t *self = nullptr; + olua_int32 *self = nullptr; - olua_to_object(L, 1, &self, "olua.int32_t"); + olua_to_object(L, 1, &self, "olua.int32"); - // @getter @name(length) size_t length() - size_t ret = self->length(); + // @getter @name(value) const int32_t &value() + const int32_t &ret = self->value(); int num_ret = olua_push_integer(L, ret); olua_endinvoke(L); @@ -1970,87 +2020,82 @@ static int _olua_int32_t_length(lua_State *L) return num_ret; } -static int _olua_int32_t_rawdata(lua_State *L) +static int _olua_fun_olua_int32_value$2(lua_State *L) { olua_startinvoke(L); - olua_int32_t *self = nullptr; + olua_int32 *self = nullptr; + int32_t arg1 = 0; /** v */ - olua_to_object(L, 1, &self, "olua.int32_t"); + olua_to_object(L, 1, &self, "olua.int32"); + olua_check_integer(L, 2, &arg1); - // @getter @name(rawdata) void *rawdata() - void *ret = self->rawdata(); - int num_ret = olua_push_object(L, ret, "void *"); + // @setter @name(value) void value(const int32_t &v) + self->value(arg1); olua_endinvoke(L); - return num_ret; + return 0; } -static int _olua_int32_t_size(lua_State *L) +static int _olua_fun_olua_int32_value(lua_State *L) { - olua_startinvoke(L); - - olua_int32_t *self = nullptr; + int num_args = lua_gettop(L) - 1; - olua_to_object(L, 1, &self, "olua.int32_t"); + if (num_args == 0) { + // @getter @name(value) const int32_t &value() + return _olua_fun_olua_int32_value$1(L); + } - // @getter @name(sizeof) size_t size() - size_t ret = self->size(); - int num_ret = olua_push_integer(L, ret); + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // @setter @name(value) void value(const int32_t &v) + return _olua_fun_olua_int32_value$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'olua_int32::value' not support '%d' arguments", num_args); - return num_ret; + return 0; } -static int _olua_int32_t_value(lua_State *L) +static int _olua_cls_olua_int32(lua_State *L) { - olua_startinvoke(L); - - olua_int32_t *self = nullptr; - - olua_to_object(L, 1, &self, "olua.int32_t"); - - // @getter @name(value) const int32_t &value() - const int32_t &ret = self->value(); - int num_ret = olua_push_integer(L, ret); - - olua_endinvoke(L); + oluacls_class(L, "olua.int32"); + oluacls_func(L, "__gc", _olua_fun_olua_int32___gc); + oluacls_func(L, "__index", _olua_fun_olua_int32___index); + oluacls_func(L, "__newindex", _olua_fun_olua_int32___newindex); + oluacls_func(L, "__olua_move", _olua_fun_olua_int32___olua_move); + oluacls_func(L, "new", _olua_fun_olua_int32_new); + oluacls_func(L, "slice", _olua_fun_olua_int32_slice); + oluacls_func(L, "sub", _olua_fun_olua_int32_sub); + oluacls_func(L, "take", _olua_fun_olua_int32_take); + oluacls_func(L, "tostring", _olua_fun_olua_int32_tostring); + oluacls_prop(L, "buffer", _olua_fun_olua_int32_buffer, nullptr); + oluacls_prop(L, "length", _olua_fun_olua_int32_length, nullptr); + oluacls_prop(L, "value", _olua_fun_olua_int32_value, _olua_fun_olua_int32_value); - return num_ret; + return 1; } OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_olua_int32_t(lua_State *L) -{ - oluacls_class(L, "olua.int32_t"); - oluacls_func(L, "__gc", _olua_int32_t___gc); - oluacls_func(L, "__index", _olua_int32_t___index); - oluacls_func(L, "__newindex", _olua_int32_t___newindex); - oluacls_func(L, "__olua_move", _olua_int32_t___olua_move); - oluacls_func(L, "assign", _olua_int32_t_assign); - oluacls_func(L, "new", _olua_int32_t_create); - oluacls_func(L, "slice", _olua_int32_t_slice); - oluacls_func(L, "sub", _olua_int32_t_sub); - oluacls_func(L, "take", _olua_int32_t_take); - oluacls_func(L, "tostring", _olua_int32_t_tostring); - oluacls_prop(L, "length", _olua_int32_t_length, _olua_int32_t_length); - oluacls_prop(L, "rawdata", _olua_int32_t_rawdata, nullptr); - oluacls_prop(L, "sizeof", _olua_int32_t_size, nullptr); - oluacls_prop(L, "value", _olua_int32_t_value, _olua_int32_t_value); - +OLUA_LIB int luaopen_olua_int32(lua_State *L) +{ + olua_require(L, "types", luaopen_types); + if (!olua_getclass(L, "olua.int32")) { + luaL_error(L, "class not found: olua_int32"); + } return 1; } OLUA_END_DECLS -static int _olua_int64_t___gc(lua_State *L) +static int _olua_fun_olua_int64___gc(lua_State *L) { olua_startinvoke(L); - olua_int64_t *self = nullptr; + olua_int64 *self = nullptr; - olua_to_object(L, 1, &self, "olua.int64_t"); + olua_to_object(L, 1, &self, "olua.int64"); // olua_Return __gc(lua_State *L) olua_Return ret = self->__gc(L); @@ -2060,14 +2105,14 @@ static int _olua_int64_t___gc(lua_State *L) return (int)ret; } -static int _olua_int64_t___index(lua_State *L) +static int _olua_fun_olua_int64___index(lua_State *L) { olua_startinvoke(L); - olua_int64_t *self = nullptr; + olua_int64 *self = nullptr; unsigned int arg1 = 0; /** idx */ - olua_to_object(L, 1, &self, "olua.int64_t"); + olua_to_object(L, 1, &self, "olua.int64"); olua_check_integer(L, 2, &arg1); // int64_t __index(unsigned int idx) @@ -2079,15 +2124,15 @@ static int _olua_int64_t___index(lua_State *L) return num_ret; } -static int _olua_int64_t___newindex(lua_State *L) +static int _olua_fun_olua_int64___newindex(lua_State *L) { olua_startinvoke(L); - olua_int64_t *self = nullptr; + olua_int64 *self = nullptr; unsigned int arg1 = 0; /** idx */ int64_t arg2 = 0; /** v */ - olua_to_object(L, 1, &self, "olua.int64_t"); + olua_to_object(L, 1, &self, "olua.int64"); olua_check_integer(L, 2, &arg1); olua_check_integer(L, 3, &arg2); @@ -2099,39 +2144,53 @@ static int _olua_int64_t___newindex(lua_State *L) return 0; } -static int _olua_int64_t___olua_move(lua_State *L) +static int _olua_fun_olua_int64___olua_move(lua_State *L) { olua_startinvoke(L); - auto self = (olua_int64_t *)olua_toobj(L, 1, "olua.int64_t"); - olua_push_object(L, self, "olua.int64_t"); + auto self = (olua_int64 *)olua_toobj(L, 1, "olua.int64"); + olua_push_object(L, self, "olua.int64"); olua_endinvoke(L); return 1; } -static int _olua_int64_t_assign(lua_State *L) +static int _olua_fun_olua_int64_buffer(lua_State *L) { olua_startinvoke(L); - olua_int64_t *self = nullptr; - const char *arg1 = nullptr; /** data */ - size_t arg2 = 0; /** len */ + olua_int64 *self = nullptr; - olua_to_object(L, 1, &self, "olua.int64_t"); - olua_check_string(L, 2, &arg1); - olua_check_integer(L, 3, &arg2); + olua_to_object(L, 1, &self, "olua.int64"); - // void assign(const char *data, size_t len) - self->assign(arg1, arg2); + // @getter @name(buffer) @type(void *) int64_t *buffer() + void *ret = self->buffer(); + int num_ret = olua_push_object(L, ret, "void *"); olua_endinvoke(L); - return 0; + return num_ret; +} + +static int _olua_fun_olua_int64_length(lua_State *L) +{ + olua_startinvoke(L); + + olua_int64 *self = nullptr; + + olua_to_object(L, 1, &self, "olua.int64"); + + // @getter @name(length) size_t length() + size_t ret = self->length(); + int num_ret = olua_push_integer(L, ret); + + olua_endinvoke(L); + + return num_ret; } -static int _olua_int64_t_create$1(lua_State *L) +static int _olua_fun_olua_int64_new$1(lua_State *L) { olua_startinvoke(L); @@ -2139,9 +2198,9 @@ static int _olua_int64_t_create$1(lua_State *L) olua_check_integer(L, 1, &arg1); - // @postnew @name(new) static olua_int64_t *create(@optional size_t len) - olua_int64_t *ret = olua_int64_t::create(arg1); - int num_ret = olua_push_object(L, ret, "olua.int64_t"); + // @postnew @name(new) static olua_int64 *create(@optional size_t len) + olua_int64 *ret = olua_int64::create(arg1); + int num_ret = olua_push_object(L, ret, "olua.int64"); // insert code after call olua_postnew(L, ret); @@ -2151,13 +2210,13 @@ static int _olua_int64_t_create$1(lua_State *L) return num_ret; } -static int _olua_int64_t_create$2(lua_State *L) +static int _olua_fun_olua_int64_new$2(lua_State *L) { olua_startinvoke(L); - // @postnew @name(new) static olua_int64_t *create(@optional size_t len) - olua_int64_t *ret = olua_int64_t::create(); - int num_ret = olua_push_object(L, ret, "olua.int64_t"); + // @postnew @name(new) static olua_int64 *create() + olua_int64 *ret = olua_int64::create(); + int num_ret = olua_push_object(L, ret, "olua.int64"); // insert code after call olua_postnew(L, ret); @@ -2167,42 +2226,42 @@ static int _olua_int64_t_create$2(lua_State *L) return num_ret; } -static int _olua_int64_t_create(lua_State *L) +static int _olua_fun_olua_int64_new(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 0) { - // @postnew @name(new) static olua_int64_t *create(@optional size_t len) - return _olua_int64_t_create$2(L); + // @postnew @name(new) static olua_int64 *create() + return _olua_fun_olua_int64_new$2(L); } if (num_args == 1) { // if ((olua_is_integer(L, 1))) { - // @postnew @name(new) static olua_int64_t *create(@optional size_t len) - return _olua_int64_t_create$1(L); + // @postnew @name(new) static olua_int64 *create(@optional size_t len) + return _olua_fun_olua_int64_new$1(L); // } } - luaL_error(L, "method 'olua_int64_t::create' not support '%d' arguments", num_args); + luaL_error(L, "method 'olua_int64::new' not support '%d' arguments", num_args); return 0; } -static int _olua_int64_t_slice$1(lua_State *L) +static int _olua_fun_olua_int64_slice$1(lua_State *L) { olua_startinvoke(L); - olua_int64_t *self = nullptr; + olua_int64 *self = nullptr; size_t arg1 = 0; /** from */ size_t arg2 = 0; /** to */ - olua_to_object(L, 1, &self, "olua.int64_t"); + olua_to_object(L, 1, &self, "olua.int64"); olua_check_integer(L, 2, &arg1); olua_check_integer(L, 3, &arg2); - // @postnew olua_int64_t *slice(size_t from, @optional size_t to) - olua_int64_t *ret = self->slice(arg1, arg2); - int num_ret = olua_push_object(L, ret, "olua.int64_t"); + // @postnew olua_int64 *slice(size_t from, @optional size_t to) + olua_int64 *ret = self->slice(arg1, arg2); + int num_ret = olua_push_object(L, ret, "olua.int64"); // insert code after call olua_postnew(L, ret); @@ -2212,19 +2271,19 @@ static int _olua_int64_t_slice$1(lua_State *L) return num_ret; } -static int _olua_int64_t_slice$2(lua_State *L) +static int _olua_fun_olua_int64_slice$2(lua_State *L) { olua_startinvoke(L); - olua_int64_t *self = nullptr; + olua_int64 *self = nullptr; size_t arg1 = 0; /** from */ - olua_to_object(L, 1, &self, "olua.int64_t"); + olua_to_object(L, 1, &self, "olua.int64"); olua_check_integer(L, 2, &arg1); - // @postnew olua_int64_t *slice(size_t from, @optional size_t to) - olua_int64_t *ret = self->slice(arg1); - int num_ret = olua_push_object(L, ret, "olua.int64_t"); + // @postnew olua_int64 *slice(size_t from) + olua_int64 *ret = self->slice(arg1); + int num_ret = olua_push_object(L, ret, "olua.int64"); // insert code after call olua_postnew(L, ret); @@ -2234,44 +2293,44 @@ static int _olua_int64_t_slice$2(lua_State *L) return num_ret; } -static int _olua_int64_t_slice(lua_State *L) +static int _olua_fun_olua_int64_slice(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_integer(L, 2))) { - // @postnew olua_int64_t *slice(size_t from, @optional size_t to) - return _olua_int64_t_slice$2(L); + // @postnew olua_int64 *slice(size_t from) + return _olua_fun_olua_int64_slice$2(L); // } } if (num_args == 2) { // if ((olua_is_integer(L, 2)) && (olua_is_integer(L, 3))) { - // @postnew olua_int64_t *slice(size_t from, @optional size_t to) - return _olua_int64_t_slice$1(L); + // @postnew olua_int64 *slice(size_t from, @optional size_t to) + return _olua_fun_olua_int64_slice$1(L); // } } - luaL_error(L, "method 'olua_int64_t::slice' not support '%d' arguments", num_args); + luaL_error(L, "method 'olua_int64::slice' not support '%d' arguments", num_args); return 0; } -static int _olua_int64_t_sub$1(lua_State *L) +static int _olua_fun_olua_int64_sub$1(lua_State *L) { olua_startinvoke(L); - olua_int64_t *self = nullptr; + olua_int64 *self = nullptr; size_t arg1 = 0; /** from */ size_t arg2 = 0; /** to */ - olua_to_object(L, 1, &self, "olua.int64_t"); + olua_to_object(L, 1, &self, "olua.int64"); olua_check_integer(L, 2, &arg1); olua_check_integer(L, 3, &arg2); - // @postnew olua_int64_t *sub(size_t from, @optional size_t to) - olua_int64_t *ret = self->sub(arg1, arg2); - int num_ret = olua_push_object(L, ret, "olua.int64_t"); + // @postnew olua_int64 *sub(size_t from, @optional size_t to) + olua_int64 *ret = self->sub(arg1, arg2); + int num_ret = olua_push_object(L, ret, "olua.int64"); // insert code after call olua_postnew(L, ret); @@ -2281,19 +2340,19 @@ static int _olua_int64_t_sub$1(lua_State *L) return num_ret; } -static int _olua_int64_t_sub$2(lua_State *L) +static int _olua_fun_olua_int64_sub$2(lua_State *L) { olua_startinvoke(L); - olua_int64_t *self = nullptr; + olua_int64 *self = nullptr; size_t arg1 = 0; /** from */ - olua_to_object(L, 1, &self, "olua.int64_t"); + olua_to_object(L, 1, &self, "olua.int64"); olua_check_integer(L, 2, &arg1); - // @postnew olua_int64_t *sub(size_t from, @optional size_t to) - olua_int64_t *ret = self->sub(arg1); - int num_ret = olua_push_object(L, ret, "olua.int64_t"); + // @postnew olua_int64 *sub(size_t from) + olua_int64 *ret = self->sub(arg1); + int num_ret = olua_push_object(L, ret, "olua.int64"); // insert code after call olua_postnew(L, ret); @@ -2303,54 +2362,54 @@ static int _olua_int64_t_sub$2(lua_State *L) return num_ret; } -static int _olua_int64_t_sub(lua_State *L) +static int _olua_fun_olua_int64_sub(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_integer(L, 2))) { - // @postnew olua_int64_t *sub(size_t from, @optional size_t to) - return _olua_int64_t_sub$2(L); + // @postnew olua_int64 *sub(size_t from) + return _olua_fun_olua_int64_sub$2(L); // } } if (num_args == 2) { // if ((olua_is_integer(L, 2)) && (olua_is_integer(L, 3))) { - // @postnew olua_int64_t *sub(size_t from, @optional size_t to) - return _olua_int64_t_sub$1(L); + // @postnew olua_int64 *sub(size_t from, @optional size_t to) + return _olua_fun_olua_int64_sub$1(L); // } } - luaL_error(L, "method 'olua_int64_t::sub' not support '%d' arguments", num_args); + luaL_error(L, "method 'olua_int64::sub' not support '%d' arguments", num_args); return 0; } -static int _olua_int64_t_take(lua_State *L) +static int _olua_fun_olua_int64_take(lua_State *L) { olua_startinvoke(L); - olua_int64_t *self = nullptr; + olua_int64 *self = nullptr; - olua_to_object(L, 1, &self, "olua.int64_t"); + olua_to_object(L, 1, &self, "olua.int64"); - // olua_int64_t *take() - olua_int64_t *ret = self->take(); - int num_ret = olua_push_object(L, ret, "olua.int64_t"); + // olua_int64 *take() + olua_int64 *ret = self->take(); + int num_ret = olua_push_object(L, ret, "olua.int64"); olua_endinvoke(L); return num_ret; } -static int _olua_int64_t_tostring(lua_State *L) +static int _olua_fun_olua_int64_tostring(lua_State *L) { olua_startinvoke(L); - olua_int64_t *self = nullptr; + olua_int64 *self = nullptr; size_t arg2 = 0; /** len */ - olua_to_object(L, 1, &self, "olua.int64_t"); + olua_to_object(L, 1, &self, "olua.int64"); olua_check_integer(L, 2, &arg2); // olua_Return tostring(lua_State *L, size_t len) @@ -2361,16 +2420,16 @@ static int _olua_int64_t_tostring(lua_State *L) return (int)ret; } -static int _olua_int64_t_length(lua_State *L) +static int _olua_fun_olua_int64_value$1(lua_State *L) { olua_startinvoke(L); - olua_int64_t *self = nullptr; + olua_int64 *self = nullptr; - olua_to_object(L, 1, &self, "olua.int64_t"); + olua_to_object(L, 1, &self, "olua.int64"); - // @getter @name(length) size_t length() - size_t ret = self->length(); + // @getter @name(value) const int64_t &value() + const int64_t &ret = self->value(); int num_ret = olua_push_integer(L, ret); olua_endinvoke(L); @@ -2378,87 +2437,82 @@ static int _olua_int64_t_length(lua_State *L) return num_ret; } -static int _olua_int64_t_rawdata(lua_State *L) +static int _olua_fun_olua_int64_value$2(lua_State *L) { olua_startinvoke(L); - olua_int64_t *self = nullptr; + olua_int64 *self = nullptr; + int64_t arg1 = 0; /** v */ - olua_to_object(L, 1, &self, "olua.int64_t"); + olua_to_object(L, 1, &self, "olua.int64"); + olua_check_integer(L, 2, &arg1); - // @getter @name(rawdata) void *rawdata() - void *ret = self->rawdata(); - int num_ret = olua_push_object(L, ret, "void *"); + // @setter @name(value) void value(const int64_t &v) + self->value(arg1); olua_endinvoke(L); - return num_ret; + return 0; } -static int _olua_int64_t_size(lua_State *L) +static int _olua_fun_olua_int64_value(lua_State *L) { - olua_startinvoke(L); - - olua_int64_t *self = nullptr; + int num_args = lua_gettop(L) - 1; - olua_to_object(L, 1, &self, "olua.int64_t"); + if (num_args == 0) { + // @getter @name(value) const int64_t &value() + return _olua_fun_olua_int64_value$1(L); + } - // @getter @name(sizeof) size_t size() - size_t ret = self->size(); - int num_ret = olua_push_integer(L, ret); + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // @setter @name(value) void value(const int64_t &v) + return _olua_fun_olua_int64_value$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'olua_int64::value' not support '%d' arguments", num_args); - return num_ret; + return 0; } -static int _olua_int64_t_value(lua_State *L) +static int _olua_cls_olua_int64(lua_State *L) { - olua_startinvoke(L); - - olua_int64_t *self = nullptr; - - olua_to_object(L, 1, &self, "olua.int64_t"); - - // @getter @name(value) const int64_t &value() - const int64_t &ret = self->value(); - int num_ret = olua_push_integer(L, ret); + oluacls_class(L, "olua.int64"); + oluacls_func(L, "__gc", _olua_fun_olua_int64___gc); + oluacls_func(L, "__index", _olua_fun_olua_int64___index); + oluacls_func(L, "__newindex", _olua_fun_olua_int64___newindex); + oluacls_func(L, "__olua_move", _olua_fun_olua_int64___olua_move); + oluacls_func(L, "new", _olua_fun_olua_int64_new); + oluacls_func(L, "slice", _olua_fun_olua_int64_slice); + oluacls_func(L, "sub", _olua_fun_olua_int64_sub); + oluacls_func(L, "take", _olua_fun_olua_int64_take); + oluacls_func(L, "tostring", _olua_fun_olua_int64_tostring); + oluacls_prop(L, "buffer", _olua_fun_olua_int64_buffer, nullptr); + oluacls_prop(L, "length", _olua_fun_olua_int64_length, nullptr); + oluacls_prop(L, "value", _olua_fun_olua_int64_value, _olua_fun_olua_int64_value); - olua_endinvoke(L); - - return num_ret; + return 1; } OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_olua_int64_t(lua_State *L) -{ - oluacls_class(L, "olua.int64_t"); - oluacls_func(L, "__gc", _olua_int64_t___gc); - oluacls_func(L, "__index", _olua_int64_t___index); - oluacls_func(L, "__newindex", _olua_int64_t___newindex); - oluacls_func(L, "__olua_move", _olua_int64_t___olua_move); - oluacls_func(L, "assign", _olua_int64_t_assign); - oluacls_func(L, "new", _olua_int64_t_create); - oluacls_func(L, "slice", _olua_int64_t_slice); - oluacls_func(L, "sub", _olua_int64_t_sub); - oluacls_func(L, "take", _olua_int64_t_take); - oluacls_func(L, "tostring", _olua_int64_t_tostring); - oluacls_prop(L, "length", _olua_int64_t_length, _olua_int64_t_length); - oluacls_prop(L, "rawdata", _olua_int64_t_rawdata, nullptr); - oluacls_prop(L, "sizeof", _olua_int64_t_size, nullptr); - oluacls_prop(L, "value", _olua_int64_t_value, _olua_int64_t_value); - +OLUA_LIB int luaopen_olua_int64(lua_State *L) +{ + olua_require(L, "types", luaopen_types); + if (!olua_getclass(L, "olua.int64")) { + luaL_error(L, "class not found: olua_int64"); + } return 1; } OLUA_END_DECLS -static int _olua_uint8_t___gc(lua_State *L) +static int _olua_fun_olua_uint8___gc(lua_State *L) { olua_startinvoke(L); - olua_uint8_t *self = nullptr; + olua_uint8 *self = nullptr; - olua_to_object(L, 1, &self, "olua.uint8_t"); + olua_to_object(L, 1, &self, "olua.uint8"); // olua_Return __gc(lua_State *L) olua_Return ret = self->__gc(L); @@ -2468,14 +2522,14 @@ static int _olua_uint8_t___gc(lua_State *L) return (int)ret; } -static int _olua_uint8_t___index(lua_State *L) +static int _olua_fun_olua_uint8___index(lua_State *L) { olua_startinvoke(L); - olua_uint8_t *self = nullptr; + olua_uint8 *self = nullptr; unsigned int arg1 = 0; /** idx */ - olua_to_object(L, 1, &self, "olua.uint8_t"); + olua_to_object(L, 1, &self, "olua.uint8"); olua_check_integer(L, 2, &arg1); // uint8_t __index(unsigned int idx) @@ -2487,15 +2541,15 @@ static int _olua_uint8_t___index(lua_State *L) return num_ret; } -static int _olua_uint8_t___newindex(lua_State *L) +static int _olua_fun_olua_uint8___newindex(lua_State *L) { olua_startinvoke(L); - olua_uint8_t *self = nullptr; + olua_uint8 *self = nullptr; unsigned int arg1 = 0; /** idx */ uint8_t arg2 = 0; /** v */ - olua_to_object(L, 1, &self, "olua.uint8_t"); + olua_to_object(L, 1, &self, "olua.uint8"); olua_check_integer(L, 2, &arg1); olua_check_integer(L, 3, &arg2); @@ -2507,39 +2561,53 @@ static int _olua_uint8_t___newindex(lua_State *L) return 0; } -static int _olua_uint8_t___olua_move(lua_State *L) +static int _olua_fun_olua_uint8___olua_move(lua_State *L) { olua_startinvoke(L); - auto self = (olua_uint8_t *)olua_toobj(L, 1, "olua.uint8_t"); - olua_push_object(L, self, "olua.uint8_t"); + auto self = (olua_uint8 *)olua_toobj(L, 1, "olua.uint8"); + olua_push_object(L, self, "olua.uint8"); olua_endinvoke(L); return 1; } -static int _olua_uint8_t_assign(lua_State *L) +static int _olua_fun_olua_uint8_buffer(lua_State *L) { olua_startinvoke(L); - olua_uint8_t *self = nullptr; - const char *arg1 = nullptr; /** data */ - size_t arg2 = 0; /** len */ + olua_uint8 *self = nullptr; - olua_to_object(L, 1, &self, "olua.uint8_t"); - olua_check_string(L, 2, &arg1); - olua_check_integer(L, 3, &arg2); + olua_to_object(L, 1, &self, "olua.uint8"); - // void assign(const char *data, size_t len) - self->assign(arg1, arg2); + // @getter @name(buffer) @type(void *) uint8_t *buffer() + void *ret = self->buffer(); + int num_ret = olua_push_object(L, ret, "void *"); olua_endinvoke(L); - return 0; + return num_ret; +} + +static int _olua_fun_olua_uint8_length(lua_State *L) +{ + olua_startinvoke(L); + + olua_uint8 *self = nullptr; + + olua_to_object(L, 1, &self, "olua.uint8"); + + // @getter @name(length) size_t length() + size_t ret = self->length(); + int num_ret = olua_push_integer(L, ret); + + olua_endinvoke(L); + + return num_ret; } -static int _olua_uint8_t_create$1(lua_State *L) +static int _olua_fun_olua_uint8_new$1(lua_State *L) { olua_startinvoke(L); @@ -2547,9 +2615,9 @@ static int _olua_uint8_t_create$1(lua_State *L) olua_check_integer(L, 1, &arg1); - // @postnew @name(new) static olua_uint8_t *create(@optional size_t len) - olua_uint8_t *ret = olua_uint8_t::create(arg1); - int num_ret = olua_push_object(L, ret, "olua.uint8_t"); + // @postnew @name(new) static olua_uint8 *create(@optional size_t len) + olua_uint8 *ret = olua_uint8::create(arg1); + int num_ret = olua_push_object(L, ret, "olua.uint8"); // insert code after call olua_postnew(L, ret); @@ -2559,13 +2627,13 @@ static int _olua_uint8_t_create$1(lua_State *L) return num_ret; } -static int _olua_uint8_t_create$2(lua_State *L) +static int _olua_fun_olua_uint8_new$2(lua_State *L) { olua_startinvoke(L); - // @postnew @name(new) static olua_uint8_t *create(@optional size_t len) - olua_uint8_t *ret = olua_uint8_t::create(); - int num_ret = olua_push_object(L, ret, "olua.uint8_t"); + // @postnew @name(new) static olua_uint8 *create() + olua_uint8 *ret = olua_uint8::create(); + int num_ret = olua_push_object(L, ret, "olua.uint8"); // insert code after call olua_postnew(L, ret); @@ -2575,42 +2643,42 @@ static int _olua_uint8_t_create$2(lua_State *L) return num_ret; } -static int _olua_uint8_t_create(lua_State *L) +static int _olua_fun_olua_uint8_new(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 0) { - // @postnew @name(new) static olua_uint8_t *create(@optional size_t len) - return _olua_uint8_t_create$2(L); + // @postnew @name(new) static olua_uint8 *create() + return _olua_fun_olua_uint8_new$2(L); } if (num_args == 1) { // if ((olua_is_integer(L, 1))) { - // @postnew @name(new) static olua_uint8_t *create(@optional size_t len) - return _olua_uint8_t_create$1(L); + // @postnew @name(new) static olua_uint8 *create(@optional size_t len) + return _olua_fun_olua_uint8_new$1(L); // } } - luaL_error(L, "method 'olua_uint8_t::create' not support '%d' arguments", num_args); + luaL_error(L, "method 'olua_uint8::new' not support '%d' arguments", num_args); return 0; } -static int _olua_uint8_t_slice$1(lua_State *L) +static int _olua_fun_olua_uint8_slice$1(lua_State *L) { olua_startinvoke(L); - olua_uint8_t *self = nullptr; + olua_uint8 *self = nullptr; size_t arg1 = 0; /** from */ size_t arg2 = 0; /** to */ - olua_to_object(L, 1, &self, "olua.uint8_t"); + olua_to_object(L, 1, &self, "olua.uint8"); olua_check_integer(L, 2, &arg1); olua_check_integer(L, 3, &arg2); - // @postnew olua_uint8_t *slice(size_t from, @optional size_t to) - olua_uint8_t *ret = self->slice(arg1, arg2); - int num_ret = olua_push_object(L, ret, "olua.uint8_t"); + // @postnew olua_uint8 *slice(size_t from, @optional size_t to) + olua_uint8 *ret = self->slice(arg1, arg2); + int num_ret = olua_push_object(L, ret, "olua.uint8"); // insert code after call olua_postnew(L, ret); @@ -2620,19 +2688,19 @@ static int _olua_uint8_t_slice$1(lua_State *L) return num_ret; } -static int _olua_uint8_t_slice$2(lua_State *L) +static int _olua_fun_olua_uint8_slice$2(lua_State *L) { olua_startinvoke(L); - olua_uint8_t *self = nullptr; + olua_uint8 *self = nullptr; size_t arg1 = 0; /** from */ - olua_to_object(L, 1, &self, "olua.uint8_t"); + olua_to_object(L, 1, &self, "olua.uint8"); olua_check_integer(L, 2, &arg1); - // @postnew olua_uint8_t *slice(size_t from, @optional size_t to) - olua_uint8_t *ret = self->slice(arg1); - int num_ret = olua_push_object(L, ret, "olua.uint8_t"); + // @postnew olua_uint8 *slice(size_t from) + olua_uint8 *ret = self->slice(arg1); + int num_ret = olua_push_object(L, ret, "olua.uint8"); // insert code after call olua_postnew(L, ret); @@ -2642,44 +2710,44 @@ static int _olua_uint8_t_slice$2(lua_State *L) return num_ret; } -static int _olua_uint8_t_slice(lua_State *L) +static int _olua_fun_olua_uint8_slice(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_integer(L, 2))) { - // @postnew olua_uint8_t *slice(size_t from, @optional size_t to) - return _olua_uint8_t_slice$2(L); + // @postnew olua_uint8 *slice(size_t from) + return _olua_fun_olua_uint8_slice$2(L); // } } if (num_args == 2) { // if ((olua_is_integer(L, 2)) && (olua_is_integer(L, 3))) { - // @postnew olua_uint8_t *slice(size_t from, @optional size_t to) - return _olua_uint8_t_slice$1(L); + // @postnew olua_uint8 *slice(size_t from, @optional size_t to) + return _olua_fun_olua_uint8_slice$1(L); // } } - luaL_error(L, "method 'olua_uint8_t::slice' not support '%d' arguments", num_args); + luaL_error(L, "method 'olua_uint8::slice' not support '%d' arguments", num_args); return 0; } -static int _olua_uint8_t_sub$1(lua_State *L) +static int _olua_fun_olua_uint8_sub$1(lua_State *L) { olua_startinvoke(L); - olua_uint8_t *self = nullptr; + olua_uint8 *self = nullptr; size_t arg1 = 0; /** from */ size_t arg2 = 0; /** to */ - olua_to_object(L, 1, &self, "olua.uint8_t"); + olua_to_object(L, 1, &self, "olua.uint8"); olua_check_integer(L, 2, &arg1); olua_check_integer(L, 3, &arg2); - // @postnew olua_uint8_t *sub(size_t from, @optional size_t to) - olua_uint8_t *ret = self->sub(arg1, arg2); - int num_ret = olua_push_object(L, ret, "olua.uint8_t"); + // @postnew olua_uint8 *sub(size_t from, @optional size_t to) + olua_uint8 *ret = self->sub(arg1, arg2); + int num_ret = olua_push_object(L, ret, "olua.uint8"); // insert code after call olua_postnew(L, ret); @@ -2689,19 +2757,19 @@ static int _olua_uint8_t_sub$1(lua_State *L) return num_ret; } -static int _olua_uint8_t_sub$2(lua_State *L) +static int _olua_fun_olua_uint8_sub$2(lua_State *L) { olua_startinvoke(L); - olua_uint8_t *self = nullptr; + olua_uint8 *self = nullptr; size_t arg1 = 0; /** from */ - olua_to_object(L, 1, &self, "olua.uint8_t"); + olua_to_object(L, 1, &self, "olua.uint8"); olua_check_integer(L, 2, &arg1); - // @postnew olua_uint8_t *sub(size_t from, @optional size_t to) - olua_uint8_t *ret = self->sub(arg1); - int num_ret = olua_push_object(L, ret, "olua.uint8_t"); + // @postnew olua_uint8 *sub(size_t from) + olua_uint8 *ret = self->sub(arg1); + int num_ret = olua_push_object(L, ret, "olua.uint8"); // insert code after call olua_postnew(L, ret); @@ -2711,54 +2779,54 @@ static int _olua_uint8_t_sub$2(lua_State *L) return num_ret; } -static int _olua_uint8_t_sub(lua_State *L) +static int _olua_fun_olua_uint8_sub(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_integer(L, 2))) { - // @postnew olua_uint8_t *sub(size_t from, @optional size_t to) - return _olua_uint8_t_sub$2(L); + // @postnew olua_uint8 *sub(size_t from) + return _olua_fun_olua_uint8_sub$2(L); // } } if (num_args == 2) { // if ((olua_is_integer(L, 2)) && (olua_is_integer(L, 3))) { - // @postnew olua_uint8_t *sub(size_t from, @optional size_t to) - return _olua_uint8_t_sub$1(L); + // @postnew olua_uint8 *sub(size_t from, @optional size_t to) + return _olua_fun_olua_uint8_sub$1(L); // } } - luaL_error(L, "method 'olua_uint8_t::sub' not support '%d' arguments", num_args); + luaL_error(L, "method 'olua_uint8::sub' not support '%d' arguments", num_args); return 0; } -static int _olua_uint8_t_take(lua_State *L) +static int _olua_fun_olua_uint8_take(lua_State *L) { olua_startinvoke(L); - olua_uint8_t *self = nullptr; + olua_uint8 *self = nullptr; - olua_to_object(L, 1, &self, "olua.uint8_t"); + olua_to_object(L, 1, &self, "olua.uint8"); - // olua_uint8_t *take() - olua_uint8_t *ret = self->take(); - int num_ret = olua_push_object(L, ret, "olua.uint8_t"); + // olua_uint8 *take() + olua_uint8 *ret = self->take(); + int num_ret = olua_push_object(L, ret, "olua.uint8"); olua_endinvoke(L); return num_ret; } -static int _olua_uint8_t_tostring(lua_State *L) +static int _olua_fun_olua_uint8_tostring(lua_State *L) { olua_startinvoke(L); - olua_uint8_t *self = nullptr; + olua_uint8 *self = nullptr; size_t arg2 = 0; /** len */ - olua_to_object(L, 1, &self, "olua.uint8_t"); + olua_to_object(L, 1, &self, "olua.uint8"); olua_check_integer(L, 2, &arg2); // olua_Return tostring(lua_State *L, size_t len) @@ -2769,16 +2837,16 @@ static int _olua_uint8_t_tostring(lua_State *L) return (int)ret; } -static int _olua_uint8_t_length(lua_State *L) +static int _olua_fun_olua_uint8_value$1(lua_State *L) { olua_startinvoke(L); - olua_uint8_t *self = nullptr; + olua_uint8 *self = nullptr; - olua_to_object(L, 1, &self, "olua.uint8_t"); + olua_to_object(L, 1, &self, "olua.uint8"); - // @getter @name(length) size_t length() - size_t ret = self->length(); + // @getter @name(value) const uint8_t &value() + const uint8_t &ret = self->value(); int num_ret = olua_push_integer(L, ret); olua_endinvoke(L); @@ -2786,87 +2854,82 @@ static int _olua_uint8_t_length(lua_State *L) return num_ret; } -static int _olua_uint8_t_rawdata(lua_State *L) +static int _olua_fun_olua_uint8_value$2(lua_State *L) { olua_startinvoke(L); - olua_uint8_t *self = nullptr; + olua_uint8 *self = nullptr; + uint8_t arg1 = 0; /** v */ - olua_to_object(L, 1, &self, "olua.uint8_t"); + olua_to_object(L, 1, &self, "olua.uint8"); + olua_check_integer(L, 2, &arg1); - // @getter @name(rawdata) void *rawdata() - void *ret = self->rawdata(); - int num_ret = olua_push_object(L, ret, "void *"); + // @setter @name(value) void value(const uint8_t &v) + self->value(arg1); olua_endinvoke(L); - return num_ret; + return 0; } -static int _olua_uint8_t_size(lua_State *L) +static int _olua_fun_olua_uint8_value(lua_State *L) { - olua_startinvoke(L); - - olua_uint8_t *self = nullptr; + int num_args = lua_gettop(L) - 1; - olua_to_object(L, 1, &self, "olua.uint8_t"); + if (num_args == 0) { + // @getter @name(value) const uint8_t &value() + return _olua_fun_olua_uint8_value$1(L); + } - // @getter @name(sizeof) size_t size() - size_t ret = self->size(); - int num_ret = olua_push_integer(L, ret); + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // @setter @name(value) void value(const uint8_t &v) + return _olua_fun_olua_uint8_value$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'olua_uint8::value' not support '%d' arguments", num_args); - return num_ret; + return 0; } -static int _olua_uint8_t_value(lua_State *L) +static int _olua_cls_olua_uint8(lua_State *L) { - olua_startinvoke(L); - - olua_uint8_t *self = nullptr; - - olua_to_object(L, 1, &self, "olua.uint8_t"); - - // @getter @name(value) const uint8_t &value() - const uint8_t &ret = self->value(); - int num_ret = olua_push_integer(L, ret); - - olua_endinvoke(L); + oluacls_class(L, "olua.uint8"); + oluacls_func(L, "__gc", _olua_fun_olua_uint8___gc); + oluacls_func(L, "__index", _olua_fun_olua_uint8___index); + oluacls_func(L, "__newindex", _olua_fun_olua_uint8___newindex); + oluacls_func(L, "__olua_move", _olua_fun_olua_uint8___olua_move); + oluacls_func(L, "new", _olua_fun_olua_uint8_new); + oluacls_func(L, "slice", _olua_fun_olua_uint8_slice); + oluacls_func(L, "sub", _olua_fun_olua_uint8_sub); + oluacls_func(L, "take", _olua_fun_olua_uint8_take); + oluacls_func(L, "tostring", _olua_fun_olua_uint8_tostring); + oluacls_prop(L, "buffer", _olua_fun_olua_uint8_buffer, nullptr); + oluacls_prop(L, "length", _olua_fun_olua_uint8_length, nullptr); + oluacls_prop(L, "value", _olua_fun_olua_uint8_value, _olua_fun_olua_uint8_value); - return num_ret; + return 1; } OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_olua_uint8_t(lua_State *L) -{ - oluacls_class(L, "olua.uint8_t"); - oluacls_func(L, "__gc", _olua_uint8_t___gc); - oluacls_func(L, "__index", _olua_uint8_t___index); - oluacls_func(L, "__newindex", _olua_uint8_t___newindex); - oluacls_func(L, "__olua_move", _olua_uint8_t___olua_move); - oluacls_func(L, "assign", _olua_uint8_t_assign); - oluacls_func(L, "new", _olua_uint8_t_create); - oluacls_func(L, "slice", _olua_uint8_t_slice); - oluacls_func(L, "sub", _olua_uint8_t_sub); - oluacls_func(L, "take", _olua_uint8_t_take); - oluacls_func(L, "tostring", _olua_uint8_t_tostring); - oluacls_prop(L, "length", _olua_uint8_t_length, _olua_uint8_t_length); - oluacls_prop(L, "rawdata", _olua_uint8_t_rawdata, nullptr); - oluacls_prop(L, "sizeof", _olua_uint8_t_size, nullptr); - oluacls_prop(L, "value", _olua_uint8_t_value, _olua_uint8_t_value); - +OLUA_LIB int luaopen_olua_uint8(lua_State *L) +{ + olua_require(L, "types", luaopen_types); + if (!olua_getclass(L, "olua.uint8")) { + luaL_error(L, "class not found: olua_uint8"); + } return 1; } OLUA_END_DECLS -static int _olua_uint16_t___gc(lua_State *L) +static int _olua_fun_olua_uint16___gc(lua_State *L) { olua_startinvoke(L); - olua_uint16_t *self = nullptr; + olua_uint16 *self = nullptr; - olua_to_object(L, 1, &self, "olua.uint16_t"); + olua_to_object(L, 1, &self, "olua.uint16"); // olua_Return __gc(lua_State *L) olua_Return ret = self->__gc(L); @@ -2876,14 +2939,14 @@ static int _olua_uint16_t___gc(lua_State *L) return (int)ret; } -static int _olua_uint16_t___index(lua_State *L) +static int _olua_fun_olua_uint16___index(lua_State *L) { olua_startinvoke(L); - olua_uint16_t *self = nullptr; + olua_uint16 *self = nullptr; unsigned int arg1 = 0; /** idx */ - olua_to_object(L, 1, &self, "olua.uint16_t"); + olua_to_object(L, 1, &self, "olua.uint16"); olua_check_integer(L, 2, &arg1); // uint16_t __index(unsigned int idx) @@ -2895,15 +2958,15 @@ static int _olua_uint16_t___index(lua_State *L) return num_ret; } -static int _olua_uint16_t___newindex(lua_State *L) +static int _olua_fun_olua_uint16___newindex(lua_State *L) { olua_startinvoke(L); - olua_uint16_t *self = nullptr; + olua_uint16 *self = nullptr; unsigned int arg1 = 0; /** idx */ uint16_t arg2 = 0; /** v */ - olua_to_object(L, 1, &self, "olua.uint16_t"); + olua_to_object(L, 1, &self, "olua.uint16"); olua_check_integer(L, 2, &arg1); olua_check_integer(L, 3, &arg2); @@ -2915,39 +2978,53 @@ static int _olua_uint16_t___newindex(lua_State *L) return 0; } -static int _olua_uint16_t___olua_move(lua_State *L) +static int _olua_fun_olua_uint16___olua_move(lua_State *L) { olua_startinvoke(L); - auto self = (olua_uint16_t *)olua_toobj(L, 1, "olua.uint16_t"); - olua_push_object(L, self, "olua.uint16_t"); + auto self = (olua_uint16 *)olua_toobj(L, 1, "olua.uint16"); + olua_push_object(L, self, "olua.uint16"); olua_endinvoke(L); return 1; } -static int _olua_uint16_t_assign(lua_State *L) +static int _olua_fun_olua_uint16_buffer(lua_State *L) { olua_startinvoke(L); - olua_uint16_t *self = nullptr; - const char *arg1 = nullptr; /** data */ - size_t arg2 = 0; /** len */ + olua_uint16 *self = nullptr; - olua_to_object(L, 1, &self, "olua.uint16_t"); - olua_check_string(L, 2, &arg1); - olua_check_integer(L, 3, &arg2); + olua_to_object(L, 1, &self, "olua.uint16"); - // void assign(const char *data, size_t len) - self->assign(arg1, arg2); + // @getter @name(buffer) @type(void *) uint16_t *buffer() + void *ret = self->buffer(); + int num_ret = olua_push_object(L, ret, "void *"); olua_endinvoke(L); - return 0; + return num_ret; +} + +static int _olua_fun_olua_uint16_length(lua_State *L) +{ + olua_startinvoke(L); + + olua_uint16 *self = nullptr; + + olua_to_object(L, 1, &self, "olua.uint16"); + + // @getter @name(length) size_t length() + size_t ret = self->length(); + int num_ret = olua_push_integer(L, ret); + + olua_endinvoke(L); + + return num_ret; } -static int _olua_uint16_t_create$1(lua_State *L) +static int _olua_fun_olua_uint16_new$1(lua_State *L) { olua_startinvoke(L); @@ -2955,9 +3032,9 @@ static int _olua_uint16_t_create$1(lua_State *L) olua_check_integer(L, 1, &arg1); - // @postnew @name(new) static olua_uint16_t *create(@optional size_t len) - olua_uint16_t *ret = olua_uint16_t::create(arg1); - int num_ret = olua_push_object(L, ret, "olua.uint16_t"); + // @postnew @name(new) static olua_uint16 *create(@optional size_t len) + olua_uint16 *ret = olua_uint16::create(arg1); + int num_ret = olua_push_object(L, ret, "olua.uint16"); // insert code after call olua_postnew(L, ret); @@ -2967,13 +3044,13 @@ static int _olua_uint16_t_create$1(lua_State *L) return num_ret; } -static int _olua_uint16_t_create$2(lua_State *L) +static int _olua_fun_olua_uint16_new$2(lua_State *L) { olua_startinvoke(L); - // @postnew @name(new) static olua_uint16_t *create(@optional size_t len) - olua_uint16_t *ret = olua_uint16_t::create(); - int num_ret = olua_push_object(L, ret, "olua.uint16_t"); + // @postnew @name(new) static olua_uint16 *create() + olua_uint16 *ret = olua_uint16::create(); + int num_ret = olua_push_object(L, ret, "olua.uint16"); // insert code after call olua_postnew(L, ret); @@ -2983,42 +3060,42 @@ static int _olua_uint16_t_create$2(lua_State *L) return num_ret; } -static int _olua_uint16_t_create(lua_State *L) +static int _olua_fun_olua_uint16_new(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 0) { - // @postnew @name(new) static olua_uint16_t *create(@optional size_t len) - return _olua_uint16_t_create$2(L); + // @postnew @name(new) static olua_uint16 *create() + return _olua_fun_olua_uint16_new$2(L); } if (num_args == 1) { // if ((olua_is_integer(L, 1))) { - // @postnew @name(new) static olua_uint16_t *create(@optional size_t len) - return _olua_uint16_t_create$1(L); + // @postnew @name(new) static olua_uint16 *create(@optional size_t len) + return _olua_fun_olua_uint16_new$1(L); // } } - luaL_error(L, "method 'olua_uint16_t::create' not support '%d' arguments", num_args); + luaL_error(L, "method 'olua_uint16::new' not support '%d' arguments", num_args); return 0; } -static int _olua_uint16_t_slice$1(lua_State *L) +static int _olua_fun_olua_uint16_slice$1(lua_State *L) { olua_startinvoke(L); - olua_uint16_t *self = nullptr; + olua_uint16 *self = nullptr; size_t arg1 = 0; /** from */ size_t arg2 = 0; /** to */ - olua_to_object(L, 1, &self, "olua.uint16_t"); + olua_to_object(L, 1, &self, "olua.uint16"); olua_check_integer(L, 2, &arg1); olua_check_integer(L, 3, &arg2); - // @postnew olua_uint16_t *slice(size_t from, @optional size_t to) - olua_uint16_t *ret = self->slice(arg1, arg2); - int num_ret = olua_push_object(L, ret, "olua.uint16_t"); + // @postnew olua_uint16 *slice(size_t from, @optional size_t to) + olua_uint16 *ret = self->slice(arg1, arg2); + int num_ret = olua_push_object(L, ret, "olua.uint16"); // insert code after call olua_postnew(L, ret); @@ -3028,19 +3105,19 @@ static int _olua_uint16_t_slice$1(lua_State *L) return num_ret; } -static int _olua_uint16_t_slice$2(lua_State *L) +static int _olua_fun_olua_uint16_slice$2(lua_State *L) { olua_startinvoke(L); - olua_uint16_t *self = nullptr; + olua_uint16 *self = nullptr; size_t arg1 = 0; /** from */ - olua_to_object(L, 1, &self, "olua.uint16_t"); + olua_to_object(L, 1, &self, "olua.uint16"); olua_check_integer(L, 2, &arg1); - // @postnew olua_uint16_t *slice(size_t from, @optional size_t to) - olua_uint16_t *ret = self->slice(arg1); - int num_ret = olua_push_object(L, ret, "olua.uint16_t"); + // @postnew olua_uint16 *slice(size_t from) + olua_uint16 *ret = self->slice(arg1); + int num_ret = olua_push_object(L, ret, "olua.uint16"); // insert code after call olua_postnew(L, ret); @@ -3050,44 +3127,44 @@ static int _olua_uint16_t_slice$2(lua_State *L) return num_ret; } -static int _olua_uint16_t_slice(lua_State *L) +static int _olua_fun_olua_uint16_slice(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_integer(L, 2))) { - // @postnew olua_uint16_t *slice(size_t from, @optional size_t to) - return _olua_uint16_t_slice$2(L); + // @postnew olua_uint16 *slice(size_t from) + return _olua_fun_olua_uint16_slice$2(L); // } } if (num_args == 2) { // if ((olua_is_integer(L, 2)) && (olua_is_integer(L, 3))) { - // @postnew olua_uint16_t *slice(size_t from, @optional size_t to) - return _olua_uint16_t_slice$1(L); + // @postnew olua_uint16 *slice(size_t from, @optional size_t to) + return _olua_fun_olua_uint16_slice$1(L); // } } - luaL_error(L, "method 'olua_uint16_t::slice' not support '%d' arguments", num_args); + luaL_error(L, "method 'olua_uint16::slice' not support '%d' arguments", num_args); return 0; } -static int _olua_uint16_t_sub$1(lua_State *L) +static int _olua_fun_olua_uint16_sub$1(lua_State *L) { olua_startinvoke(L); - olua_uint16_t *self = nullptr; + olua_uint16 *self = nullptr; size_t arg1 = 0; /** from */ size_t arg2 = 0; /** to */ - olua_to_object(L, 1, &self, "olua.uint16_t"); + olua_to_object(L, 1, &self, "olua.uint16"); olua_check_integer(L, 2, &arg1); olua_check_integer(L, 3, &arg2); - // @postnew olua_uint16_t *sub(size_t from, @optional size_t to) - olua_uint16_t *ret = self->sub(arg1, arg2); - int num_ret = olua_push_object(L, ret, "olua.uint16_t"); + // @postnew olua_uint16 *sub(size_t from, @optional size_t to) + olua_uint16 *ret = self->sub(arg1, arg2); + int num_ret = olua_push_object(L, ret, "olua.uint16"); // insert code after call olua_postnew(L, ret); @@ -3097,19 +3174,19 @@ static int _olua_uint16_t_sub$1(lua_State *L) return num_ret; } -static int _olua_uint16_t_sub$2(lua_State *L) +static int _olua_fun_olua_uint16_sub$2(lua_State *L) { olua_startinvoke(L); - olua_uint16_t *self = nullptr; + olua_uint16 *self = nullptr; size_t arg1 = 0; /** from */ - olua_to_object(L, 1, &self, "olua.uint16_t"); + olua_to_object(L, 1, &self, "olua.uint16"); olua_check_integer(L, 2, &arg1); - // @postnew olua_uint16_t *sub(size_t from, @optional size_t to) - olua_uint16_t *ret = self->sub(arg1); - int num_ret = olua_push_object(L, ret, "olua.uint16_t"); + // @postnew olua_uint16 *sub(size_t from) + olua_uint16 *ret = self->sub(arg1); + int num_ret = olua_push_object(L, ret, "olua.uint16"); // insert code after call olua_postnew(L, ret); @@ -3119,54 +3196,54 @@ static int _olua_uint16_t_sub$2(lua_State *L) return num_ret; } -static int _olua_uint16_t_sub(lua_State *L) +static int _olua_fun_olua_uint16_sub(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_integer(L, 2))) { - // @postnew olua_uint16_t *sub(size_t from, @optional size_t to) - return _olua_uint16_t_sub$2(L); + // @postnew olua_uint16 *sub(size_t from) + return _olua_fun_olua_uint16_sub$2(L); // } } if (num_args == 2) { // if ((olua_is_integer(L, 2)) && (olua_is_integer(L, 3))) { - // @postnew olua_uint16_t *sub(size_t from, @optional size_t to) - return _olua_uint16_t_sub$1(L); + // @postnew olua_uint16 *sub(size_t from, @optional size_t to) + return _olua_fun_olua_uint16_sub$1(L); // } } - luaL_error(L, "method 'olua_uint16_t::sub' not support '%d' arguments", num_args); + luaL_error(L, "method 'olua_uint16::sub' not support '%d' arguments", num_args); return 0; } -static int _olua_uint16_t_take(lua_State *L) +static int _olua_fun_olua_uint16_take(lua_State *L) { olua_startinvoke(L); - olua_uint16_t *self = nullptr; + olua_uint16 *self = nullptr; - olua_to_object(L, 1, &self, "olua.uint16_t"); + olua_to_object(L, 1, &self, "olua.uint16"); - // olua_uint16_t *take() - olua_uint16_t *ret = self->take(); - int num_ret = olua_push_object(L, ret, "olua.uint16_t"); + // olua_uint16 *take() + olua_uint16 *ret = self->take(); + int num_ret = olua_push_object(L, ret, "olua.uint16"); olua_endinvoke(L); return num_ret; } -static int _olua_uint16_t_tostring(lua_State *L) +static int _olua_fun_olua_uint16_tostring(lua_State *L) { olua_startinvoke(L); - olua_uint16_t *self = nullptr; + olua_uint16 *self = nullptr; size_t arg2 = 0; /** len */ - olua_to_object(L, 1, &self, "olua.uint16_t"); + olua_to_object(L, 1, &self, "olua.uint16"); olua_check_integer(L, 2, &arg2); // olua_Return tostring(lua_State *L, size_t len) @@ -3177,16 +3254,16 @@ static int _olua_uint16_t_tostring(lua_State *L) return (int)ret; } -static int _olua_uint16_t_length(lua_State *L) +static int _olua_fun_olua_uint16_value$1(lua_State *L) { olua_startinvoke(L); - olua_uint16_t *self = nullptr; + olua_uint16 *self = nullptr; - olua_to_object(L, 1, &self, "olua.uint16_t"); + olua_to_object(L, 1, &self, "olua.uint16"); - // @getter @name(length) size_t length() - size_t ret = self->length(); + // @getter @name(value) const uint16_t &value() + const uint16_t &ret = self->value(); int num_ret = olua_push_integer(L, ret); olua_endinvoke(L); @@ -3194,87 +3271,82 @@ static int _olua_uint16_t_length(lua_State *L) return num_ret; } -static int _olua_uint16_t_rawdata(lua_State *L) +static int _olua_fun_olua_uint16_value$2(lua_State *L) { olua_startinvoke(L); - olua_uint16_t *self = nullptr; + olua_uint16 *self = nullptr; + uint16_t arg1 = 0; /** v */ - olua_to_object(L, 1, &self, "olua.uint16_t"); + olua_to_object(L, 1, &self, "olua.uint16"); + olua_check_integer(L, 2, &arg1); - // @getter @name(rawdata) void *rawdata() - void *ret = self->rawdata(); - int num_ret = olua_push_object(L, ret, "void *"); + // @setter @name(value) void value(const uint16_t &v) + self->value(arg1); olua_endinvoke(L); - return num_ret; + return 0; } -static int _olua_uint16_t_size(lua_State *L) +static int _olua_fun_olua_uint16_value(lua_State *L) { - olua_startinvoke(L); - - olua_uint16_t *self = nullptr; + int num_args = lua_gettop(L) - 1; - olua_to_object(L, 1, &self, "olua.uint16_t"); + if (num_args == 0) { + // @getter @name(value) const uint16_t &value() + return _olua_fun_olua_uint16_value$1(L); + } - // @getter @name(sizeof) size_t size() - size_t ret = self->size(); - int num_ret = olua_push_integer(L, ret); + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // @setter @name(value) void value(const uint16_t &v) + return _olua_fun_olua_uint16_value$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'olua_uint16::value' not support '%d' arguments", num_args); - return num_ret; + return 0; } -static int _olua_uint16_t_value(lua_State *L) +static int _olua_cls_olua_uint16(lua_State *L) { - olua_startinvoke(L); - - olua_uint16_t *self = nullptr; - - olua_to_object(L, 1, &self, "olua.uint16_t"); - - // @getter @name(value) const uint16_t &value() - const uint16_t &ret = self->value(); - int num_ret = olua_push_integer(L, ret); - - olua_endinvoke(L); + oluacls_class(L, "olua.uint16"); + oluacls_func(L, "__gc", _olua_fun_olua_uint16___gc); + oluacls_func(L, "__index", _olua_fun_olua_uint16___index); + oluacls_func(L, "__newindex", _olua_fun_olua_uint16___newindex); + oluacls_func(L, "__olua_move", _olua_fun_olua_uint16___olua_move); + oluacls_func(L, "new", _olua_fun_olua_uint16_new); + oluacls_func(L, "slice", _olua_fun_olua_uint16_slice); + oluacls_func(L, "sub", _olua_fun_olua_uint16_sub); + oluacls_func(L, "take", _olua_fun_olua_uint16_take); + oluacls_func(L, "tostring", _olua_fun_olua_uint16_tostring); + oluacls_prop(L, "buffer", _olua_fun_olua_uint16_buffer, nullptr); + oluacls_prop(L, "length", _olua_fun_olua_uint16_length, nullptr); + oluacls_prop(L, "value", _olua_fun_olua_uint16_value, _olua_fun_olua_uint16_value); - return num_ret; + return 1; } OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_olua_uint16_t(lua_State *L) -{ - oluacls_class(L, "olua.uint16_t"); - oluacls_func(L, "__gc", _olua_uint16_t___gc); - oluacls_func(L, "__index", _olua_uint16_t___index); - oluacls_func(L, "__newindex", _olua_uint16_t___newindex); - oluacls_func(L, "__olua_move", _olua_uint16_t___olua_move); - oluacls_func(L, "assign", _olua_uint16_t_assign); - oluacls_func(L, "new", _olua_uint16_t_create); - oluacls_func(L, "slice", _olua_uint16_t_slice); - oluacls_func(L, "sub", _olua_uint16_t_sub); - oluacls_func(L, "take", _olua_uint16_t_take); - oluacls_func(L, "tostring", _olua_uint16_t_tostring); - oluacls_prop(L, "length", _olua_uint16_t_length, _olua_uint16_t_length); - oluacls_prop(L, "rawdata", _olua_uint16_t_rawdata, nullptr); - oluacls_prop(L, "sizeof", _olua_uint16_t_size, nullptr); - oluacls_prop(L, "value", _olua_uint16_t_value, _olua_uint16_t_value); - +OLUA_LIB int luaopen_olua_uint16(lua_State *L) +{ + olua_require(L, "types", luaopen_types); + if (!olua_getclass(L, "olua.uint16")) { + luaL_error(L, "class not found: olua_uint16"); + } return 1; } OLUA_END_DECLS -static int _olua_uint32_t___gc(lua_State *L) +static int _olua_fun_olua_uint32___gc(lua_State *L) { olua_startinvoke(L); - olua_uint32_t *self = nullptr; + olua_uint32 *self = nullptr; - olua_to_object(L, 1, &self, "olua.uint32_t"); + olua_to_object(L, 1, &self, "olua.uint32"); // olua_Return __gc(lua_State *L) olua_Return ret = self->__gc(L); @@ -3284,14 +3356,14 @@ static int _olua_uint32_t___gc(lua_State *L) return (int)ret; } -static int _olua_uint32_t___index(lua_State *L) +static int _olua_fun_olua_uint32___index(lua_State *L) { olua_startinvoke(L); - olua_uint32_t *self = nullptr; + olua_uint32 *self = nullptr; unsigned int arg1 = 0; /** idx */ - olua_to_object(L, 1, &self, "olua.uint32_t"); + olua_to_object(L, 1, &self, "olua.uint32"); olua_check_integer(L, 2, &arg1); // uint32_t __index(unsigned int idx) @@ -3303,15 +3375,15 @@ static int _olua_uint32_t___index(lua_State *L) return num_ret; } -static int _olua_uint32_t___newindex(lua_State *L) +static int _olua_fun_olua_uint32___newindex(lua_State *L) { olua_startinvoke(L); - olua_uint32_t *self = nullptr; + olua_uint32 *self = nullptr; unsigned int arg1 = 0; /** idx */ uint32_t arg2 = 0; /** v */ - olua_to_object(L, 1, &self, "olua.uint32_t"); + olua_to_object(L, 1, &self, "olua.uint32"); olua_check_integer(L, 2, &arg1); olua_check_integer(L, 3, &arg2); @@ -3323,39 +3395,53 @@ static int _olua_uint32_t___newindex(lua_State *L) return 0; } -static int _olua_uint32_t___olua_move(lua_State *L) +static int _olua_fun_olua_uint32___olua_move(lua_State *L) { olua_startinvoke(L); - auto self = (olua_uint32_t *)olua_toobj(L, 1, "olua.uint32_t"); - olua_push_object(L, self, "olua.uint32_t"); + auto self = (olua_uint32 *)olua_toobj(L, 1, "olua.uint32"); + olua_push_object(L, self, "olua.uint32"); olua_endinvoke(L); return 1; } -static int _olua_uint32_t_assign(lua_State *L) +static int _olua_fun_olua_uint32_buffer(lua_State *L) { olua_startinvoke(L); - olua_uint32_t *self = nullptr; - const char *arg1 = nullptr; /** data */ - size_t arg2 = 0; /** len */ + olua_uint32 *self = nullptr; - olua_to_object(L, 1, &self, "olua.uint32_t"); - olua_check_string(L, 2, &arg1); - olua_check_integer(L, 3, &arg2); + olua_to_object(L, 1, &self, "olua.uint32"); - // void assign(const char *data, size_t len) - self->assign(arg1, arg2); + // @getter @name(buffer) @type(void *) uint32_t *buffer() + void *ret = self->buffer(); + int num_ret = olua_push_object(L, ret, "void *"); olua_endinvoke(L); - return 0; + return num_ret; +} + +static int _olua_fun_olua_uint32_length(lua_State *L) +{ + olua_startinvoke(L); + + olua_uint32 *self = nullptr; + + olua_to_object(L, 1, &self, "olua.uint32"); + + // @getter @name(length) size_t length() + size_t ret = self->length(); + int num_ret = olua_push_integer(L, ret); + + olua_endinvoke(L); + + return num_ret; } -static int _olua_uint32_t_create$1(lua_State *L) +static int _olua_fun_olua_uint32_new$1(lua_State *L) { olua_startinvoke(L); @@ -3363,9 +3449,9 @@ static int _olua_uint32_t_create$1(lua_State *L) olua_check_integer(L, 1, &arg1); - // @postnew @name(new) static olua_uint32_t *create(@optional size_t len) - olua_uint32_t *ret = olua_uint32_t::create(arg1); - int num_ret = olua_push_object(L, ret, "olua.uint32_t"); + // @postnew @name(new) static olua_uint32 *create(@optional size_t len) + olua_uint32 *ret = olua_uint32::create(arg1); + int num_ret = olua_push_object(L, ret, "olua.uint32"); // insert code after call olua_postnew(L, ret); @@ -3375,13 +3461,13 @@ static int _olua_uint32_t_create$1(lua_State *L) return num_ret; } -static int _olua_uint32_t_create$2(lua_State *L) +static int _olua_fun_olua_uint32_new$2(lua_State *L) { olua_startinvoke(L); - // @postnew @name(new) static olua_uint32_t *create(@optional size_t len) - olua_uint32_t *ret = olua_uint32_t::create(); - int num_ret = olua_push_object(L, ret, "olua.uint32_t"); + // @postnew @name(new) static olua_uint32 *create() + olua_uint32 *ret = olua_uint32::create(); + int num_ret = olua_push_object(L, ret, "olua.uint32"); // insert code after call olua_postnew(L, ret); @@ -3391,42 +3477,42 @@ static int _olua_uint32_t_create$2(lua_State *L) return num_ret; } -static int _olua_uint32_t_create(lua_State *L) +static int _olua_fun_olua_uint32_new(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 0) { - // @postnew @name(new) static olua_uint32_t *create(@optional size_t len) - return _olua_uint32_t_create$2(L); + // @postnew @name(new) static olua_uint32 *create() + return _olua_fun_olua_uint32_new$2(L); } if (num_args == 1) { // if ((olua_is_integer(L, 1))) { - // @postnew @name(new) static olua_uint32_t *create(@optional size_t len) - return _olua_uint32_t_create$1(L); + // @postnew @name(new) static olua_uint32 *create(@optional size_t len) + return _olua_fun_olua_uint32_new$1(L); // } } - luaL_error(L, "method 'olua_uint32_t::create' not support '%d' arguments", num_args); + luaL_error(L, "method 'olua_uint32::new' not support '%d' arguments", num_args); return 0; } -static int _olua_uint32_t_slice$1(lua_State *L) +static int _olua_fun_olua_uint32_slice$1(lua_State *L) { olua_startinvoke(L); - olua_uint32_t *self = nullptr; + olua_uint32 *self = nullptr; size_t arg1 = 0; /** from */ size_t arg2 = 0; /** to */ - olua_to_object(L, 1, &self, "olua.uint32_t"); + olua_to_object(L, 1, &self, "olua.uint32"); olua_check_integer(L, 2, &arg1); olua_check_integer(L, 3, &arg2); - // @postnew olua_uint32_t *slice(size_t from, @optional size_t to) - olua_uint32_t *ret = self->slice(arg1, arg2); - int num_ret = olua_push_object(L, ret, "olua.uint32_t"); + // @postnew olua_uint32 *slice(size_t from, @optional size_t to) + olua_uint32 *ret = self->slice(arg1, arg2); + int num_ret = olua_push_object(L, ret, "olua.uint32"); // insert code after call olua_postnew(L, ret); @@ -3436,19 +3522,19 @@ static int _olua_uint32_t_slice$1(lua_State *L) return num_ret; } -static int _olua_uint32_t_slice$2(lua_State *L) +static int _olua_fun_olua_uint32_slice$2(lua_State *L) { olua_startinvoke(L); - olua_uint32_t *self = nullptr; + olua_uint32 *self = nullptr; size_t arg1 = 0; /** from */ - olua_to_object(L, 1, &self, "olua.uint32_t"); + olua_to_object(L, 1, &self, "olua.uint32"); olua_check_integer(L, 2, &arg1); - // @postnew olua_uint32_t *slice(size_t from, @optional size_t to) - olua_uint32_t *ret = self->slice(arg1); - int num_ret = olua_push_object(L, ret, "olua.uint32_t"); + // @postnew olua_uint32 *slice(size_t from) + olua_uint32 *ret = self->slice(arg1); + int num_ret = olua_push_object(L, ret, "olua.uint32"); // insert code after call olua_postnew(L, ret); @@ -3458,44 +3544,44 @@ static int _olua_uint32_t_slice$2(lua_State *L) return num_ret; } -static int _olua_uint32_t_slice(lua_State *L) +static int _olua_fun_olua_uint32_slice(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_integer(L, 2))) { - // @postnew olua_uint32_t *slice(size_t from, @optional size_t to) - return _olua_uint32_t_slice$2(L); + // @postnew olua_uint32 *slice(size_t from) + return _olua_fun_olua_uint32_slice$2(L); // } } if (num_args == 2) { // if ((olua_is_integer(L, 2)) && (olua_is_integer(L, 3))) { - // @postnew olua_uint32_t *slice(size_t from, @optional size_t to) - return _olua_uint32_t_slice$1(L); + // @postnew olua_uint32 *slice(size_t from, @optional size_t to) + return _olua_fun_olua_uint32_slice$1(L); // } } - luaL_error(L, "method 'olua_uint32_t::slice' not support '%d' arguments", num_args); + luaL_error(L, "method 'olua_uint32::slice' not support '%d' arguments", num_args); return 0; } -static int _olua_uint32_t_sub$1(lua_State *L) +static int _olua_fun_olua_uint32_sub$1(lua_State *L) { olua_startinvoke(L); - olua_uint32_t *self = nullptr; + olua_uint32 *self = nullptr; size_t arg1 = 0; /** from */ size_t arg2 = 0; /** to */ - olua_to_object(L, 1, &self, "olua.uint32_t"); + olua_to_object(L, 1, &self, "olua.uint32"); olua_check_integer(L, 2, &arg1); olua_check_integer(L, 3, &arg2); - // @postnew olua_uint32_t *sub(size_t from, @optional size_t to) - olua_uint32_t *ret = self->sub(arg1, arg2); - int num_ret = olua_push_object(L, ret, "olua.uint32_t"); + // @postnew olua_uint32 *sub(size_t from, @optional size_t to) + olua_uint32 *ret = self->sub(arg1, arg2); + int num_ret = olua_push_object(L, ret, "olua.uint32"); // insert code after call olua_postnew(L, ret); @@ -3505,19 +3591,19 @@ static int _olua_uint32_t_sub$1(lua_State *L) return num_ret; } -static int _olua_uint32_t_sub$2(lua_State *L) +static int _olua_fun_olua_uint32_sub$2(lua_State *L) { olua_startinvoke(L); - olua_uint32_t *self = nullptr; + olua_uint32 *self = nullptr; size_t arg1 = 0; /** from */ - olua_to_object(L, 1, &self, "olua.uint32_t"); + olua_to_object(L, 1, &self, "olua.uint32"); olua_check_integer(L, 2, &arg1); - // @postnew olua_uint32_t *sub(size_t from, @optional size_t to) - olua_uint32_t *ret = self->sub(arg1); - int num_ret = olua_push_object(L, ret, "olua.uint32_t"); + // @postnew olua_uint32 *sub(size_t from) + olua_uint32 *ret = self->sub(arg1); + int num_ret = olua_push_object(L, ret, "olua.uint32"); // insert code after call olua_postnew(L, ret); @@ -3527,54 +3613,54 @@ static int _olua_uint32_t_sub$2(lua_State *L) return num_ret; } -static int _olua_uint32_t_sub(lua_State *L) +static int _olua_fun_olua_uint32_sub(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_integer(L, 2))) { - // @postnew olua_uint32_t *sub(size_t from, @optional size_t to) - return _olua_uint32_t_sub$2(L); + // @postnew olua_uint32 *sub(size_t from) + return _olua_fun_olua_uint32_sub$2(L); // } } if (num_args == 2) { // if ((olua_is_integer(L, 2)) && (olua_is_integer(L, 3))) { - // @postnew olua_uint32_t *sub(size_t from, @optional size_t to) - return _olua_uint32_t_sub$1(L); + // @postnew olua_uint32 *sub(size_t from, @optional size_t to) + return _olua_fun_olua_uint32_sub$1(L); // } } - luaL_error(L, "method 'olua_uint32_t::sub' not support '%d' arguments", num_args); + luaL_error(L, "method 'olua_uint32::sub' not support '%d' arguments", num_args); return 0; } -static int _olua_uint32_t_take(lua_State *L) +static int _olua_fun_olua_uint32_take(lua_State *L) { olua_startinvoke(L); - olua_uint32_t *self = nullptr; + olua_uint32 *self = nullptr; - olua_to_object(L, 1, &self, "olua.uint32_t"); + olua_to_object(L, 1, &self, "olua.uint32"); - // olua_uint32_t *take() - olua_uint32_t *ret = self->take(); - int num_ret = olua_push_object(L, ret, "olua.uint32_t"); + // olua_uint32 *take() + olua_uint32 *ret = self->take(); + int num_ret = olua_push_object(L, ret, "olua.uint32"); olua_endinvoke(L); return num_ret; } -static int _olua_uint32_t_tostring(lua_State *L) +static int _olua_fun_olua_uint32_tostring(lua_State *L) { olua_startinvoke(L); - olua_uint32_t *self = nullptr; + olua_uint32 *self = nullptr; size_t arg2 = 0; /** len */ - olua_to_object(L, 1, &self, "olua.uint32_t"); + olua_to_object(L, 1, &self, "olua.uint32"); olua_check_integer(L, 2, &arg2); // olua_Return tostring(lua_State *L, size_t len) @@ -3585,16 +3671,16 @@ static int _olua_uint32_t_tostring(lua_State *L) return (int)ret; } -static int _olua_uint32_t_length(lua_State *L) +static int _olua_fun_olua_uint32_value$1(lua_State *L) { olua_startinvoke(L); - olua_uint32_t *self = nullptr; + olua_uint32 *self = nullptr; - olua_to_object(L, 1, &self, "olua.uint32_t"); + olua_to_object(L, 1, &self, "olua.uint32"); - // @getter @name(length) size_t length() - size_t ret = self->length(); + // @getter @name(value) const uint32_t &value() + const uint32_t &ret = self->value(); int num_ret = olua_push_integer(L, ret); olua_endinvoke(L); @@ -3602,87 +3688,82 @@ static int _olua_uint32_t_length(lua_State *L) return num_ret; } -static int _olua_uint32_t_rawdata(lua_State *L) +static int _olua_fun_olua_uint32_value$2(lua_State *L) { olua_startinvoke(L); - olua_uint32_t *self = nullptr; + olua_uint32 *self = nullptr; + uint32_t arg1 = 0; /** v */ - olua_to_object(L, 1, &self, "olua.uint32_t"); + olua_to_object(L, 1, &self, "olua.uint32"); + olua_check_integer(L, 2, &arg1); - // @getter @name(rawdata) void *rawdata() - void *ret = self->rawdata(); - int num_ret = olua_push_object(L, ret, "void *"); + // @setter @name(value) void value(const uint32_t &v) + self->value(arg1); olua_endinvoke(L); - return num_ret; + return 0; } -static int _olua_uint32_t_size(lua_State *L) +static int _olua_fun_olua_uint32_value(lua_State *L) { - olua_startinvoke(L); - - olua_uint32_t *self = nullptr; + int num_args = lua_gettop(L) - 1; - olua_to_object(L, 1, &self, "olua.uint32_t"); + if (num_args == 0) { + // @getter @name(value) const uint32_t &value() + return _olua_fun_olua_uint32_value$1(L); + } - // @getter @name(sizeof) size_t size() - size_t ret = self->size(); - int num_ret = olua_push_integer(L, ret); + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // @setter @name(value) void value(const uint32_t &v) + return _olua_fun_olua_uint32_value$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'olua_uint32::value' not support '%d' arguments", num_args); - return num_ret; + return 0; } -static int _olua_uint32_t_value(lua_State *L) +static int _olua_cls_olua_uint32(lua_State *L) { - olua_startinvoke(L); - - olua_uint32_t *self = nullptr; + oluacls_class(L, "olua.uint32"); + oluacls_func(L, "__gc", _olua_fun_olua_uint32___gc); + oluacls_func(L, "__index", _olua_fun_olua_uint32___index); + oluacls_func(L, "__newindex", _olua_fun_olua_uint32___newindex); + oluacls_func(L, "__olua_move", _olua_fun_olua_uint32___olua_move); + oluacls_func(L, "new", _olua_fun_olua_uint32_new); + oluacls_func(L, "slice", _olua_fun_olua_uint32_slice); + oluacls_func(L, "sub", _olua_fun_olua_uint32_sub); + oluacls_func(L, "take", _olua_fun_olua_uint32_take); + oluacls_func(L, "tostring", _olua_fun_olua_uint32_tostring); + oluacls_prop(L, "buffer", _olua_fun_olua_uint32_buffer, nullptr); + oluacls_prop(L, "length", _olua_fun_olua_uint32_length, nullptr); + oluacls_prop(L, "value", _olua_fun_olua_uint32_value, _olua_fun_olua_uint32_value); - olua_to_object(L, 1, &self, "olua.uint32_t"); - - // @getter @name(value) const uint32_t &value() - const uint32_t &ret = self->value(); - int num_ret = olua_push_integer(L, ret); - - olua_endinvoke(L); - - return num_ret; + return 1; } OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_olua_uint32_t(lua_State *L) -{ - oluacls_class(L, "olua.uint32_t"); - oluacls_func(L, "__gc", _olua_uint32_t___gc); - oluacls_func(L, "__index", _olua_uint32_t___index); - oluacls_func(L, "__newindex", _olua_uint32_t___newindex); - oluacls_func(L, "__olua_move", _olua_uint32_t___olua_move); - oluacls_func(L, "assign", _olua_uint32_t_assign); - oluacls_func(L, "new", _olua_uint32_t_create); - oluacls_func(L, "slice", _olua_uint32_t_slice); - oluacls_func(L, "sub", _olua_uint32_t_sub); - oluacls_func(L, "take", _olua_uint32_t_take); - oluacls_func(L, "tostring", _olua_uint32_t_tostring); - oluacls_prop(L, "length", _olua_uint32_t_length, _olua_uint32_t_length); - oluacls_prop(L, "rawdata", _olua_uint32_t_rawdata, nullptr); - oluacls_prop(L, "sizeof", _olua_uint32_t_size, nullptr); - oluacls_prop(L, "value", _olua_uint32_t_value, _olua_uint32_t_value); - +OLUA_LIB int luaopen_olua_uint32(lua_State *L) +{ + olua_require(L, "types", luaopen_types); + if (!olua_getclass(L, "olua.uint32")) { + luaL_error(L, "class not found: olua_uint32"); + } return 1; } OLUA_END_DECLS -static int _olua_uint64_t___gc(lua_State *L) +static int _olua_fun_olua_uint64___gc(lua_State *L) { olua_startinvoke(L); - olua_uint64_t *self = nullptr; + olua_uint64 *self = nullptr; - olua_to_object(L, 1, &self, "olua.uint64_t"); + olua_to_object(L, 1, &self, "olua.uint64"); // olua_Return __gc(lua_State *L) olua_Return ret = self->__gc(L); @@ -3692,14 +3773,14 @@ static int _olua_uint64_t___gc(lua_State *L) return (int)ret; } -static int _olua_uint64_t___index(lua_State *L) +static int _olua_fun_olua_uint64___index(lua_State *L) { olua_startinvoke(L); - olua_uint64_t *self = nullptr; + olua_uint64 *self = nullptr; unsigned int arg1 = 0; /** idx */ - olua_to_object(L, 1, &self, "olua.uint64_t"); + olua_to_object(L, 1, &self, "olua.uint64"); olua_check_integer(L, 2, &arg1); // uint64_t __index(unsigned int idx) @@ -3711,15 +3792,15 @@ static int _olua_uint64_t___index(lua_State *L) return num_ret; } -static int _olua_uint64_t___newindex(lua_State *L) +static int _olua_fun_olua_uint64___newindex(lua_State *L) { olua_startinvoke(L); - olua_uint64_t *self = nullptr; + olua_uint64 *self = nullptr; unsigned int arg1 = 0; /** idx */ uint64_t arg2 = 0; /** v */ - olua_to_object(L, 1, &self, "olua.uint64_t"); + olua_to_object(L, 1, &self, "olua.uint64"); olua_check_integer(L, 2, &arg1); olua_check_integer(L, 3, &arg2); @@ -3731,39 +3812,53 @@ static int _olua_uint64_t___newindex(lua_State *L) return 0; } -static int _olua_uint64_t___olua_move(lua_State *L) +static int _olua_fun_olua_uint64___olua_move(lua_State *L) { olua_startinvoke(L); - auto self = (olua_uint64_t *)olua_toobj(L, 1, "olua.uint64_t"); - olua_push_object(L, self, "olua.uint64_t"); + auto self = (olua_uint64 *)olua_toobj(L, 1, "olua.uint64"); + olua_push_object(L, self, "olua.uint64"); olua_endinvoke(L); return 1; } -static int _olua_uint64_t_assign(lua_State *L) +static int _olua_fun_olua_uint64_buffer(lua_State *L) { olua_startinvoke(L); - olua_uint64_t *self = nullptr; - const char *arg1 = nullptr; /** data */ - size_t arg2 = 0; /** len */ + olua_uint64 *self = nullptr; - olua_to_object(L, 1, &self, "olua.uint64_t"); - olua_check_string(L, 2, &arg1); - olua_check_integer(L, 3, &arg2); + olua_to_object(L, 1, &self, "olua.uint64"); + + // @getter @name(buffer) @type(void *) uint64_t *buffer() + void *ret = self->buffer(); + int num_ret = olua_push_object(L, ret, "void *"); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_olua_uint64_length(lua_State *L) +{ + olua_startinvoke(L); + + olua_uint64 *self = nullptr; - // void assign(const char *data, size_t len) - self->assign(arg1, arg2); + olua_to_object(L, 1, &self, "olua.uint64"); + + // @getter @name(length) size_t length() + size_t ret = self->length(); + int num_ret = olua_push_integer(L, ret); olua_endinvoke(L); - return 0; + return num_ret; } -static int _olua_uint64_t_create$1(lua_State *L) +static int _olua_fun_olua_uint64_new$1(lua_State *L) { olua_startinvoke(L); @@ -3771,9 +3866,9 @@ static int _olua_uint64_t_create$1(lua_State *L) olua_check_integer(L, 1, &arg1); - // @postnew @name(new) static olua_uint64_t *create(@optional size_t len) - olua_uint64_t *ret = olua_uint64_t::create(arg1); - int num_ret = olua_push_object(L, ret, "olua.uint64_t"); + // @postnew @name(new) static olua_uint64 *create(@optional size_t len) + olua_uint64 *ret = olua_uint64::create(arg1); + int num_ret = olua_push_object(L, ret, "olua.uint64"); // insert code after call olua_postnew(L, ret); @@ -3783,13 +3878,13 @@ static int _olua_uint64_t_create$1(lua_State *L) return num_ret; } -static int _olua_uint64_t_create$2(lua_State *L) +static int _olua_fun_olua_uint64_new$2(lua_State *L) { olua_startinvoke(L); - // @postnew @name(new) static olua_uint64_t *create(@optional size_t len) - olua_uint64_t *ret = olua_uint64_t::create(); - int num_ret = olua_push_object(L, ret, "olua.uint64_t"); + // @postnew @name(new) static olua_uint64 *create() + olua_uint64 *ret = olua_uint64::create(); + int num_ret = olua_push_object(L, ret, "olua.uint64"); // insert code after call olua_postnew(L, ret); @@ -3799,42 +3894,42 @@ static int _olua_uint64_t_create$2(lua_State *L) return num_ret; } -static int _olua_uint64_t_create(lua_State *L) +static int _olua_fun_olua_uint64_new(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 0) { - // @postnew @name(new) static olua_uint64_t *create(@optional size_t len) - return _olua_uint64_t_create$2(L); + // @postnew @name(new) static olua_uint64 *create() + return _olua_fun_olua_uint64_new$2(L); } if (num_args == 1) { // if ((olua_is_integer(L, 1))) { - // @postnew @name(new) static olua_uint64_t *create(@optional size_t len) - return _olua_uint64_t_create$1(L); + // @postnew @name(new) static olua_uint64 *create(@optional size_t len) + return _olua_fun_olua_uint64_new$1(L); // } } - luaL_error(L, "method 'olua_uint64_t::create' not support '%d' arguments", num_args); + luaL_error(L, "method 'olua_uint64::new' not support '%d' arguments", num_args); return 0; } -static int _olua_uint64_t_slice$1(lua_State *L) +static int _olua_fun_olua_uint64_slice$1(lua_State *L) { olua_startinvoke(L); - olua_uint64_t *self = nullptr; + olua_uint64 *self = nullptr; size_t arg1 = 0; /** from */ size_t arg2 = 0; /** to */ - olua_to_object(L, 1, &self, "olua.uint64_t"); + olua_to_object(L, 1, &self, "olua.uint64"); olua_check_integer(L, 2, &arg1); olua_check_integer(L, 3, &arg2); - // @postnew olua_uint64_t *slice(size_t from, @optional size_t to) - olua_uint64_t *ret = self->slice(arg1, arg2); - int num_ret = olua_push_object(L, ret, "olua.uint64_t"); + // @postnew olua_uint64 *slice(size_t from, @optional size_t to) + olua_uint64 *ret = self->slice(arg1, arg2); + int num_ret = olua_push_object(L, ret, "olua.uint64"); // insert code after call olua_postnew(L, ret); @@ -3844,19 +3939,19 @@ static int _olua_uint64_t_slice$1(lua_State *L) return num_ret; } -static int _olua_uint64_t_slice$2(lua_State *L) +static int _olua_fun_olua_uint64_slice$2(lua_State *L) { olua_startinvoke(L); - olua_uint64_t *self = nullptr; + olua_uint64 *self = nullptr; size_t arg1 = 0; /** from */ - olua_to_object(L, 1, &self, "olua.uint64_t"); + olua_to_object(L, 1, &self, "olua.uint64"); olua_check_integer(L, 2, &arg1); - // @postnew olua_uint64_t *slice(size_t from, @optional size_t to) - olua_uint64_t *ret = self->slice(arg1); - int num_ret = olua_push_object(L, ret, "olua.uint64_t"); + // @postnew olua_uint64 *slice(size_t from) + olua_uint64 *ret = self->slice(arg1); + int num_ret = olua_push_object(L, ret, "olua.uint64"); // insert code after call olua_postnew(L, ret); @@ -3866,44 +3961,44 @@ static int _olua_uint64_t_slice$2(lua_State *L) return num_ret; } -static int _olua_uint64_t_slice(lua_State *L) +static int _olua_fun_olua_uint64_slice(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_integer(L, 2))) { - // @postnew olua_uint64_t *slice(size_t from, @optional size_t to) - return _olua_uint64_t_slice$2(L); + // @postnew olua_uint64 *slice(size_t from) + return _olua_fun_olua_uint64_slice$2(L); // } } if (num_args == 2) { // if ((olua_is_integer(L, 2)) && (olua_is_integer(L, 3))) { - // @postnew olua_uint64_t *slice(size_t from, @optional size_t to) - return _olua_uint64_t_slice$1(L); + // @postnew olua_uint64 *slice(size_t from, @optional size_t to) + return _olua_fun_olua_uint64_slice$1(L); // } } - luaL_error(L, "method 'olua_uint64_t::slice' not support '%d' arguments", num_args); + luaL_error(L, "method 'olua_uint64::slice' not support '%d' arguments", num_args); return 0; } -static int _olua_uint64_t_sub$1(lua_State *L) +static int _olua_fun_olua_uint64_sub$1(lua_State *L) { olua_startinvoke(L); - olua_uint64_t *self = nullptr; + olua_uint64 *self = nullptr; size_t arg1 = 0; /** from */ size_t arg2 = 0; /** to */ - olua_to_object(L, 1, &self, "olua.uint64_t"); + olua_to_object(L, 1, &self, "olua.uint64"); olua_check_integer(L, 2, &arg1); olua_check_integer(L, 3, &arg2); - // @postnew olua_uint64_t *sub(size_t from, @optional size_t to) - olua_uint64_t *ret = self->sub(arg1, arg2); - int num_ret = olua_push_object(L, ret, "olua.uint64_t"); + // @postnew olua_uint64 *sub(size_t from, @optional size_t to) + olua_uint64 *ret = self->sub(arg1, arg2); + int num_ret = olua_push_object(L, ret, "olua.uint64"); // insert code after call olua_postnew(L, ret); @@ -3913,19 +4008,19 @@ static int _olua_uint64_t_sub$1(lua_State *L) return num_ret; } -static int _olua_uint64_t_sub$2(lua_State *L) +static int _olua_fun_olua_uint64_sub$2(lua_State *L) { olua_startinvoke(L); - olua_uint64_t *self = nullptr; + olua_uint64 *self = nullptr; size_t arg1 = 0; /** from */ - olua_to_object(L, 1, &self, "olua.uint64_t"); + olua_to_object(L, 1, &self, "olua.uint64"); olua_check_integer(L, 2, &arg1); - // @postnew olua_uint64_t *sub(size_t from, @optional size_t to) - olua_uint64_t *ret = self->sub(arg1); - int num_ret = olua_push_object(L, ret, "olua.uint64_t"); + // @postnew olua_uint64 *sub(size_t from) + olua_uint64 *ret = self->sub(arg1); + int num_ret = olua_push_object(L, ret, "olua.uint64"); // insert code after call olua_postnew(L, ret); @@ -3935,54 +4030,54 @@ static int _olua_uint64_t_sub$2(lua_State *L) return num_ret; } -static int _olua_uint64_t_sub(lua_State *L) +static int _olua_fun_olua_uint64_sub(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_integer(L, 2))) { - // @postnew olua_uint64_t *sub(size_t from, @optional size_t to) - return _olua_uint64_t_sub$2(L); + // @postnew olua_uint64 *sub(size_t from) + return _olua_fun_olua_uint64_sub$2(L); // } } if (num_args == 2) { // if ((olua_is_integer(L, 2)) && (olua_is_integer(L, 3))) { - // @postnew olua_uint64_t *sub(size_t from, @optional size_t to) - return _olua_uint64_t_sub$1(L); + // @postnew olua_uint64 *sub(size_t from, @optional size_t to) + return _olua_fun_olua_uint64_sub$1(L); // } } - luaL_error(L, "method 'olua_uint64_t::sub' not support '%d' arguments", num_args); + luaL_error(L, "method 'olua_uint64::sub' not support '%d' arguments", num_args); return 0; } -static int _olua_uint64_t_take(lua_State *L) +static int _olua_fun_olua_uint64_take(lua_State *L) { olua_startinvoke(L); - olua_uint64_t *self = nullptr; + olua_uint64 *self = nullptr; - olua_to_object(L, 1, &self, "olua.uint64_t"); + olua_to_object(L, 1, &self, "olua.uint64"); - // olua_uint64_t *take() - olua_uint64_t *ret = self->take(); - int num_ret = olua_push_object(L, ret, "olua.uint64_t"); + // olua_uint64 *take() + olua_uint64 *ret = self->take(); + int num_ret = olua_push_object(L, ret, "olua.uint64"); olua_endinvoke(L); return num_ret; } -static int _olua_uint64_t_tostring(lua_State *L) +static int _olua_fun_olua_uint64_tostring(lua_State *L) { olua_startinvoke(L); - olua_uint64_t *self = nullptr; + olua_uint64 *self = nullptr; size_t arg2 = 0; /** len */ - olua_to_object(L, 1, &self, "olua.uint64_t"); + olua_to_object(L, 1, &self, "olua.uint64"); olua_check_integer(L, 2, &arg2); // olua_Return tostring(lua_State *L, size_t len) @@ -3993,16 +4088,16 @@ static int _olua_uint64_t_tostring(lua_State *L) return (int)ret; } -static int _olua_uint64_t_length(lua_State *L) +static int _olua_fun_olua_uint64_value$1(lua_State *L) { olua_startinvoke(L); - olua_uint64_t *self = nullptr; + olua_uint64 *self = nullptr; - olua_to_object(L, 1, &self, "olua.uint64_t"); + olua_to_object(L, 1, &self, "olua.uint64"); - // @getter @name(length) size_t length() - size_t ret = self->length(); + // @getter @name(value) const uint64_t &value() + const uint64_t &ret = self->value(); int num_ret = olua_push_integer(L, ret); olua_endinvoke(L); @@ -4010,81 +4105,76 @@ static int _olua_uint64_t_length(lua_State *L) return num_ret; } -static int _olua_uint64_t_rawdata(lua_State *L) +static int _olua_fun_olua_uint64_value$2(lua_State *L) { olua_startinvoke(L); - olua_uint64_t *self = nullptr; + olua_uint64 *self = nullptr; + uint64_t arg1 = 0; /** v */ - olua_to_object(L, 1, &self, "olua.uint64_t"); + olua_to_object(L, 1, &self, "olua.uint64"); + olua_check_integer(L, 2, &arg1); - // @getter @name(rawdata) void *rawdata() - void *ret = self->rawdata(); - int num_ret = olua_push_object(L, ret, "void *"); + // @setter @name(value) void value(const uint64_t &v) + self->value(arg1); olua_endinvoke(L); - return num_ret; + return 0; } -static int _olua_uint64_t_size(lua_State *L) +static int _olua_fun_olua_uint64_value(lua_State *L) { - olua_startinvoke(L); - - olua_uint64_t *self = nullptr; + int num_args = lua_gettop(L) - 1; - olua_to_object(L, 1, &self, "olua.uint64_t"); + if (num_args == 0) { + // @getter @name(value) const uint64_t &value() + return _olua_fun_olua_uint64_value$1(L); + } - // @getter @name(sizeof) size_t size() - size_t ret = self->size(); - int num_ret = olua_push_integer(L, ret); + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // @setter @name(value) void value(const uint64_t &v) + return _olua_fun_olua_uint64_value$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'olua_uint64::value' not support '%d' arguments", num_args); - return num_ret; + return 0; } -static int _olua_uint64_t_value(lua_State *L) +static int _olua_cls_olua_uint64(lua_State *L) { - olua_startinvoke(L); - - olua_uint64_t *self = nullptr; - - olua_to_object(L, 1, &self, "olua.uint64_t"); + oluacls_class(L, "olua.uint64"); + oluacls_func(L, "__gc", _olua_fun_olua_uint64___gc); + oluacls_func(L, "__index", _olua_fun_olua_uint64___index); + oluacls_func(L, "__newindex", _olua_fun_olua_uint64___newindex); + oluacls_func(L, "__olua_move", _olua_fun_olua_uint64___olua_move); + oluacls_func(L, "new", _olua_fun_olua_uint64_new); + oluacls_func(L, "slice", _olua_fun_olua_uint64_slice); + oluacls_func(L, "sub", _olua_fun_olua_uint64_sub); + oluacls_func(L, "take", _olua_fun_olua_uint64_take); + oluacls_func(L, "tostring", _olua_fun_olua_uint64_tostring); + oluacls_prop(L, "buffer", _olua_fun_olua_uint64_buffer, nullptr); + oluacls_prop(L, "length", _olua_fun_olua_uint64_length, nullptr); + oluacls_prop(L, "value", _olua_fun_olua_uint64_value, _olua_fun_olua_uint64_value); - // @getter @name(value) const uint64_t &value() - const uint64_t &ret = self->value(); - int num_ret = olua_push_integer(L, ret); - - olua_endinvoke(L); - - return num_ret; + return 1; } OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_olua_uint64_t(lua_State *L) -{ - oluacls_class(L, "olua.uint64_t"); - oluacls_func(L, "__gc", _olua_uint64_t___gc); - oluacls_func(L, "__index", _olua_uint64_t___index); - oluacls_func(L, "__newindex", _olua_uint64_t___newindex); - oluacls_func(L, "__olua_move", _olua_uint64_t___olua_move); - oluacls_func(L, "assign", _olua_uint64_t_assign); - oluacls_func(L, "new", _olua_uint64_t_create); - oluacls_func(L, "slice", _olua_uint64_t_slice); - oluacls_func(L, "sub", _olua_uint64_t_sub); - oluacls_func(L, "take", _olua_uint64_t_take); - oluacls_func(L, "tostring", _olua_uint64_t_tostring); - oluacls_prop(L, "length", _olua_uint64_t_length, _olua_uint64_t_length); - oluacls_prop(L, "rawdata", _olua_uint64_t_rawdata, nullptr); - oluacls_prop(L, "sizeof", _olua_uint64_t_size, nullptr); - oluacls_prop(L, "value", _olua_uint64_t_value, _olua_uint64_t_value); - +OLUA_LIB int luaopen_olua_uint64(lua_State *L) +{ + olua_require(L, "types", luaopen_types); + if (!olua_getclass(L, "olua.uint64")) { + luaL_error(L, "class not found: olua_uint64"); + } return 1; } OLUA_END_DECLS -static int _olua_char___gc(lua_State *L) +static int _olua_fun_olua_char___gc(lua_State *L) { olua_startinvoke(L); @@ -4100,7 +4190,7 @@ static int _olua_char___gc(lua_State *L) return (int)ret; } -static int _olua_char___index(lua_State *L) +static int _olua_fun_olua_char___index(lua_State *L) { olua_startinvoke(L); @@ -4119,7 +4209,7 @@ static int _olua_char___index(lua_State *L) return num_ret; } -static int _olua_char___newindex(lua_State *L) +static int _olua_fun_olua_char___newindex(lua_State *L) { olua_startinvoke(L); @@ -4139,7 +4229,7 @@ static int _olua_char___newindex(lua_State *L) return 0; } -static int _olua_char___olua_move(lua_State *L) +static int _olua_fun_olua_char___olua_move(lua_State *L) { olua_startinvoke(L); @@ -4151,27 +4241,41 @@ static int _olua_char___olua_move(lua_State *L) return 1; } -static int _olua_char_assign(lua_State *L) +static int _olua_fun_olua_char_buffer(lua_State *L) { olua_startinvoke(L); olua_char *self = nullptr; - const char *arg1 = nullptr; /** data */ - size_t arg2 = 0; /** len */ olua_to_object(L, 1, &self, "olua.char"); - olua_check_string(L, 2, &arg1); - olua_check_integer(L, 3, &arg2); - // void assign(const char *data, size_t len) - self->assign(arg1, arg2); + // @getter @name(buffer) @type(void *) olua_char_t *buffer() + void *ret = self->buffer(); + int num_ret = olua_push_object(L, ret, "void *"); olua_endinvoke(L); - return 0; + return num_ret; +} + +static int _olua_fun_olua_char_length(lua_State *L) +{ + olua_startinvoke(L); + + olua_char *self = nullptr; + + olua_to_object(L, 1, &self, "olua.char"); + + // @getter @name(length) size_t length() + size_t ret = self->length(); + int num_ret = olua_push_integer(L, ret); + + olua_endinvoke(L); + + return num_ret; } -static int _olua_char_create$1(lua_State *L) +static int _olua_fun_olua_char_new$1(lua_State *L) { olua_startinvoke(L); @@ -4191,11 +4295,11 @@ static int _olua_char_create$1(lua_State *L) return num_ret; } -static int _olua_char_create$2(lua_State *L) +static int _olua_fun_olua_char_new$2(lua_State *L) { olua_startinvoke(L); - // @postnew @name(new) static olua_char *create(@optional size_t len) + // @postnew @name(new) static olua_char *create() olua_char *ret = olua_char::create(); int num_ret = olua_push_object(L, ret, "olua.char"); @@ -4207,28 +4311,28 @@ static int _olua_char_create$2(lua_State *L) return num_ret; } -static int _olua_char_create(lua_State *L) +static int _olua_fun_olua_char_new(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 0) { - // @postnew @name(new) static olua_char *create(@optional size_t len) - return _olua_char_create$2(L); + // @postnew @name(new) static olua_char *create() + return _olua_fun_olua_char_new$2(L); } if (num_args == 1) { // if ((olua_is_integer(L, 1))) { // @postnew @name(new) static olua_char *create(@optional size_t len) - return _olua_char_create$1(L); + return _olua_fun_olua_char_new$1(L); // } } - luaL_error(L, "method 'olua_char::create' not support '%d' arguments", num_args); + luaL_error(L, "method 'olua_char::new' not support '%d' arguments", num_args); return 0; } -static int _olua_char_slice$1(lua_State *L) +static int _olua_fun_olua_char_slice$1(lua_State *L) { olua_startinvoke(L); @@ -4252,7 +4356,7 @@ static int _olua_char_slice$1(lua_State *L) return num_ret; } -static int _olua_char_slice$2(lua_State *L) +static int _olua_fun_olua_char_slice$2(lua_State *L) { olua_startinvoke(L); @@ -4262,7 +4366,7 @@ static int _olua_char_slice$2(lua_State *L) olua_to_object(L, 1, &self, "olua.char"); olua_check_integer(L, 2, &arg1); - // @postnew olua_char *slice(size_t from, @optional size_t to) + // @postnew olua_char *slice(size_t from) olua_char *ret = self->slice(arg1); int num_ret = olua_push_object(L, ret, "olua.char"); @@ -4274,21 +4378,21 @@ static int _olua_char_slice$2(lua_State *L) return num_ret; } -static int _olua_char_slice(lua_State *L) +static int _olua_fun_olua_char_slice(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_integer(L, 2))) { - // @postnew olua_char *slice(size_t from, @optional size_t to) - return _olua_char_slice$2(L); + // @postnew olua_char *slice(size_t from) + return _olua_fun_olua_char_slice$2(L); // } } if (num_args == 2) { // if ((olua_is_integer(L, 2)) && (olua_is_integer(L, 3))) { // @postnew olua_char *slice(size_t from, @optional size_t to) - return _olua_char_slice$1(L); + return _olua_fun_olua_char_slice$1(L); // } } @@ -4297,7 +4401,7 @@ static int _olua_char_slice(lua_State *L) return 0; } -static int _olua_char_sub$1(lua_State *L) +static int _olua_fun_olua_char_sub$1(lua_State *L) { olua_startinvoke(L); @@ -4321,7 +4425,7 @@ static int _olua_char_sub$1(lua_State *L) return num_ret; } -static int _olua_char_sub$2(lua_State *L) +static int _olua_fun_olua_char_sub$2(lua_State *L) { olua_startinvoke(L); @@ -4331,7 +4435,7 @@ static int _olua_char_sub$2(lua_State *L) olua_to_object(L, 1, &self, "olua.char"); olua_check_integer(L, 2, &arg1); - // @postnew olua_char *sub(size_t from, @optional size_t to) + // @postnew olua_char *sub(size_t from) olua_char *ret = self->sub(arg1); int num_ret = olua_push_object(L, ret, "olua.char"); @@ -4343,21 +4447,21 @@ static int _olua_char_sub$2(lua_State *L) return num_ret; } -static int _olua_char_sub(lua_State *L) +static int _olua_fun_olua_char_sub(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_integer(L, 2))) { - // @postnew olua_char *sub(size_t from, @optional size_t to) - return _olua_char_sub$2(L); + // @postnew olua_char *sub(size_t from) + return _olua_fun_olua_char_sub$2(L); // } } if (num_args == 2) { // if ((olua_is_integer(L, 2)) && (olua_is_integer(L, 3))) { // @postnew olua_char *sub(size_t from, @optional size_t to) - return _olua_char_sub$1(L); + return _olua_fun_olua_char_sub$1(L); // } } @@ -4366,7 +4470,7 @@ static int _olua_char_sub(lua_State *L) return 0; } -static int _olua_char_take(lua_State *L) +static int _olua_fun_olua_char_take(lua_State *L) { olua_startinvoke(L); @@ -4383,7 +4487,7 @@ static int _olua_char_take(lua_State *L) return num_ret; } -static int _olua_char_tostring(lua_State *L) +static int _olua_fun_olua_char_tostring(lua_State *L) { olua_startinvoke(L); @@ -4401,7 +4505,7 @@ static int _olua_char_tostring(lua_State *L) return (int)ret; } -static int _olua_char_length(lua_State *L) +static int _olua_fun_olua_char_value$1(lua_State *L) { olua_startinvoke(L); @@ -4409,8 +4513,8 @@ static int _olua_char_length(lua_State *L) olua_to_object(L, 1, &self, "olua.char"); - // @getter @name(length) size_t length() - size_t ret = self->length(); + // @getter @name(value) const olua_char_t &value() + const olua_char_t &ret = self->value(); int num_ret = olua_push_integer(L, ret); olua_endinvoke(L); @@ -4418,81 +4522,76 @@ static int _olua_char_length(lua_State *L) return num_ret; } -static int _olua_char_rawdata(lua_State *L) +static int _olua_fun_olua_char_value$2(lua_State *L) { olua_startinvoke(L); olua_char *self = nullptr; + olua_char_t arg1 = 0; /** v */ olua_to_object(L, 1, &self, "olua.char"); + olua_check_integer(L, 2, &arg1); - // @getter @name(rawdata) void *rawdata() - void *ret = self->rawdata(); - int num_ret = olua_push_object(L, ret, "void *"); + // @setter @name(value) void value(const olua_char_t &v) + self->value(arg1); olua_endinvoke(L); - return num_ret; + return 0; } -static int _olua_char_size(lua_State *L) +static int _olua_fun_olua_char_value(lua_State *L) { - olua_startinvoke(L); - - olua_char *self = nullptr; + int num_args = lua_gettop(L) - 1; - olua_to_object(L, 1, &self, "olua.char"); + if (num_args == 0) { + // @getter @name(value) const olua_char_t &value() + return _olua_fun_olua_char_value$1(L); + } - // @getter @name(sizeof) size_t size() - size_t ret = self->size(); - int num_ret = olua_push_integer(L, ret); + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // @setter @name(value) void value(const olua_char_t &v) + return _olua_fun_olua_char_value$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'olua_char::value' not support '%d' arguments", num_args); - return num_ret; + return 0; } -static int _olua_char_value(lua_State *L) +static int _olua_cls_olua_char(lua_State *L) { - olua_startinvoke(L); - - olua_char *self = nullptr; - - olua_to_object(L, 1, &self, "olua.char"); - - // @getter @name(value) const olua_char_t &value() - const olua_char_t &ret = self->value(); - int num_ret = olua_push_integer(L, ret); - - olua_endinvoke(L); + oluacls_class(L, "olua.char"); + oluacls_func(L, "__gc", _olua_fun_olua_char___gc); + oluacls_func(L, "__index", _olua_fun_olua_char___index); + oluacls_func(L, "__newindex", _olua_fun_olua_char___newindex); + oluacls_func(L, "__olua_move", _olua_fun_olua_char___olua_move); + oluacls_func(L, "new", _olua_fun_olua_char_new); + oluacls_func(L, "slice", _olua_fun_olua_char_slice); + oluacls_func(L, "sub", _olua_fun_olua_char_sub); + oluacls_func(L, "take", _olua_fun_olua_char_take); + oluacls_func(L, "tostring", _olua_fun_olua_char_tostring); + oluacls_prop(L, "buffer", _olua_fun_olua_char_buffer, nullptr); + oluacls_prop(L, "length", _olua_fun_olua_char_length, nullptr); + oluacls_prop(L, "value", _olua_fun_olua_char_value, _olua_fun_olua_char_value); - return num_ret; + return 1; } OLUA_BEGIN_DECLS OLUA_LIB int luaopen_olua_char(lua_State *L) { - oluacls_class(L, "olua.char"); - oluacls_func(L, "__gc", _olua_char___gc); - oluacls_func(L, "__index", _olua_char___index); - oluacls_func(L, "__newindex", _olua_char___newindex); - oluacls_func(L, "__olua_move", _olua_char___olua_move); - oluacls_func(L, "assign", _olua_char_assign); - oluacls_func(L, "new", _olua_char_create); - oluacls_func(L, "slice", _olua_char_slice); - oluacls_func(L, "sub", _olua_char_sub); - oluacls_func(L, "take", _olua_char_take); - oluacls_func(L, "tostring", _olua_char_tostring); - oluacls_prop(L, "length", _olua_char_length, _olua_char_length); - oluacls_prop(L, "rawdata", _olua_char_rawdata, nullptr); - oluacls_prop(L, "sizeof", _olua_char_size, nullptr); - oluacls_prop(L, "value", _olua_char_value, _olua_char_value); - + olua_require(L, "types", luaopen_types); + if (!olua_getclass(L, "olua.char")) { + luaL_error(L, "class not found: olua_char"); + } return 1; } OLUA_END_DECLS -static int _olua_short___gc(lua_State *L) +static int _olua_fun_olua_short___gc(lua_State *L) { olua_startinvoke(L); @@ -4508,7 +4607,7 @@ static int _olua_short___gc(lua_State *L) return (int)ret; } -static int _olua_short___index(lua_State *L) +static int _olua_fun_olua_short___index(lua_State *L) { olua_startinvoke(L); @@ -4527,7 +4626,7 @@ static int _olua_short___index(lua_State *L) return num_ret; } -static int _olua_short___newindex(lua_State *L) +static int _olua_fun_olua_short___newindex(lua_State *L) { olua_startinvoke(L); @@ -4547,7 +4646,7 @@ static int _olua_short___newindex(lua_State *L) return 0; } -static int _olua_short___olua_move(lua_State *L) +static int _olua_fun_olua_short___olua_move(lua_State *L) { olua_startinvoke(L); @@ -4559,27 +4658,41 @@ static int _olua_short___olua_move(lua_State *L) return 1; } -static int _olua_short_assign(lua_State *L) +static int _olua_fun_olua_short_buffer(lua_State *L) { olua_startinvoke(L); olua_short *self = nullptr; - const char *arg1 = nullptr; /** data */ - size_t arg2 = 0; /** len */ olua_to_object(L, 1, &self, "olua.short"); - olua_check_string(L, 2, &arg1); - olua_check_integer(L, 3, &arg2); - // void assign(const char *data, size_t len) - self->assign(arg1, arg2); + // @getter @name(buffer) @type(void *) olua_short_t *buffer() + void *ret = self->buffer(); + int num_ret = olua_push_object(L, ret, "void *"); olua_endinvoke(L); - return 0; + return num_ret; +} + +static int _olua_fun_olua_short_length(lua_State *L) +{ + olua_startinvoke(L); + + olua_short *self = nullptr; + + olua_to_object(L, 1, &self, "olua.short"); + + // @getter @name(length) size_t length() + size_t ret = self->length(); + int num_ret = olua_push_integer(L, ret); + + olua_endinvoke(L); + + return num_ret; } -static int _olua_short_create$1(lua_State *L) +static int _olua_fun_olua_short_new$1(lua_State *L) { olua_startinvoke(L); @@ -4599,11 +4712,11 @@ static int _olua_short_create$1(lua_State *L) return num_ret; } -static int _olua_short_create$2(lua_State *L) +static int _olua_fun_olua_short_new$2(lua_State *L) { olua_startinvoke(L); - // @postnew @name(new) static olua_short *create(@optional size_t len) + // @postnew @name(new) static olua_short *create() olua_short *ret = olua_short::create(); int num_ret = olua_push_object(L, ret, "olua.short"); @@ -4615,28 +4728,28 @@ static int _olua_short_create$2(lua_State *L) return num_ret; } -static int _olua_short_create(lua_State *L) +static int _olua_fun_olua_short_new(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 0) { - // @postnew @name(new) static olua_short *create(@optional size_t len) - return _olua_short_create$2(L); + // @postnew @name(new) static olua_short *create() + return _olua_fun_olua_short_new$2(L); } if (num_args == 1) { // if ((olua_is_integer(L, 1))) { // @postnew @name(new) static olua_short *create(@optional size_t len) - return _olua_short_create$1(L); + return _olua_fun_olua_short_new$1(L); // } } - luaL_error(L, "method 'olua_short::create' not support '%d' arguments", num_args); + luaL_error(L, "method 'olua_short::new' not support '%d' arguments", num_args); return 0; } -static int _olua_short_slice$1(lua_State *L) +static int _olua_fun_olua_short_slice$1(lua_State *L) { olua_startinvoke(L); @@ -4660,7 +4773,7 @@ static int _olua_short_slice$1(lua_State *L) return num_ret; } -static int _olua_short_slice$2(lua_State *L) +static int _olua_fun_olua_short_slice$2(lua_State *L) { olua_startinvoke(L); @@ -4670,7 +4783,7 @@ static int _olua_short_slice$2(lua_State *L) olua_to_object(L, 1, &self, "olua.short"); olua_check_integer(L, 2, &arg1); - // @postnew olua_short *slice(size_t from, @optional size_t to) + // @postnew olua_short *slice(size_t from) olua_short *ret = self->slice(arg1); int num_ret = olua_push_object(L, ret, "olua.short"); @@ -4682,21 +4795,21 @@ static int _olua_short_slice$2(lua_State *L) return num_ret; } -static int _olua_short_slice(lua_State *L) +static int _olua_fun_olua_short_slice(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_integer(L, 2))) { - // @postnew olua_short *slice(size_t from, @optional size_t to) - return _olua_short_slice$2(L); + // @postnew olua_short *slice(size_t from) + return _olua_fun_olua_short_slice$2(L); // } } if (num_args == 2) { // if ((olua_is_integer(L, 2)) && (olua_is_integer(L, 3))) { // @postnew olua_short *slice(size_t from, @optional size_t to) - return _olua_short_slice$1(L); + return _olua_fun_olua_short_slice$1(L); // } } @@ -4705,7 +4818,7 @@ static int _olua_short_slice(lua_State *L) return 0; } -static int _olua_short_sub$1(lua_State *L) +static int _olua_fun_olua_short_sub$1(lua_State *L) { olua_startinvoke(L); @@ -4729,7 +4842,7 @@ static int _olua_short_sub$1(lua_State *L) return num_ret; } -static int _olua_short_sub$2(lua_State *L) +static int _olua_fun_olua_short_sub$2(lua_State *L) { olua_startinvoke(L); @@ -4739,7 +4852,7 @@ static int _olua_short_sub$2(lua_State *L) olua_to_object(L, 1, &self, "olua.short"); olua_check_integer(L, 2, &arg1); - // @postnew olua_short *sub(size_t from, @optional size_t to) + // @postnew olua_short *sub(size_t from) olua_short *ret = self->sub(arg1); int num_ret = olua_push_object(L, ret, "olua.short"); @@ -4751,21 +4864,21 @@ static int _olua_short_sub$2(lua_State *L) return num_ret; } -static int _olua_short_sub(lua_State *L) +static int _olua_fun_olua_short_sub(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_integer(L, 2))) { - // @postnew olua_short *sub(size_t from, @optional size_t to) - return _olua_short_sub$2(L); + // @postnew olua_short *sub(size_t from) + return _olua_fun_olua_short_sub$2(L); // } } if (num_args == 2) { // if ((olua_is_integer(L, 2)) && (olua_is_integer(L, 3))) { // @postnew olua_short *sub(size_t from, @optional size_t to) - return _olua_short_sub$1(L); + return _olua_fun_olua_short_sub$1(L); // } } @@ -4774,7 +4887,7 @@ static int _olua_short_sub(lua_State *L) return 0; } -static int _olua_short_take(lua_State *L) +static int _olua_fun_olua_short_take(lua_State *L) { olua_startinvoke(L); @@ -4791,7 +4904,7 @@ static int _olua_short_take(lua_State *L) return num_ret; } -static int _olua_short_tostring(lua_State *L) +static int _olua_fun_olua_short_tostring(lua_State *L) { olua_startinvoke(L); @@ -4809,7 +4922,7 @@ static int _olua_short_tostring(lua_State *L) return (int)ret; } -static int _olua_short_length(lua_State *L) +static int _olua_fun_olua_short_value$1(lua_State *L) { olua_startinvoke(L); @@ -4817,8 +4930,8 @@ static int _olua_short_length(lua_State *L) olua_to_object(L, 1, &self, "olua.short"); - // @getter @name(length) size_t length() - size_t ret = self->length(); + // @getter @name(value) const olua_short_t &value() + const olua_short_t &ret = self->value(); int num_ret = olua_push_integer(L, ret); olua_endinvoke(L); @@ -4826,81 +4939,76 @@ static int _olua_short_length(lua_State *L) return num_ret; } -static int _olua_short_rawdata(lua_State *L) +static int _olua_fun_olua_short_value$2(lua_State *L) { olua_startinvoke(L); olua_short *self = nullptr; + olua_short_t arg1 = 0; /** v */ olua_to_object(L, 1, &self, "olua.short"); + olua_check_integer(L, 2, &arg1); - // @getter @name(rawdata) void *rawdata() - void *ret = self->rawdata(); - int num_ret = olua_push_object(L, ret, "void *"); + // @setter @name(value) void value(const olua_short_t &v) + self->value(arg1); olua_endinvoke(L); - return num_ret; + return 0; } -static int _olua_short_size(lua_State *L) +static int _olua_fun_olua_short_value(lua_State *L) { - olua_startinvoke(L); - - olua_short *self = nullptr; + int num_args = lua_gettop(L) - 1; - olua_to_object(L, 1, &self, "olua.short"); + if (num_args == 0) { + // @getter @name(value) const olua_short_t &value() + return _olua_fun_olua_short_value$1(L); + } - // @getter @name(sizeof) size_t size() - size_t ret = self->size(); - int num_ret = olua_push_integer(L, ret); + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // @setter @name(value) void value(const olua_short_t &v) + return _olua_fun_olua_short_value$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'olua_short::value' not support '%d' arguments", num_args); - return num_ret; + return 0; } -static int _olua_short_value(lua_State *L) +static int _olua_cls_olua_short(lua_State *L) { - olua_startinvoke(L); - - olua_short *self = nullptr; - - olua_to_object(L, 1, &self, "olua.short"); - - // @getter @name(value) const olua_short_t &value() - const olua_short_t &ret = self->value(); - int num_ret = olua_push_integer(L, ret); - - olua_endinvoke(L); + oluacls_class(L, "olua.short"); + oluacls_func(L, "__gc", _olua_fun_olua_short___gc); + oluacls_func(L, "__index", _olua_fun_olua_short___index); + oluacls_func(L, "__newindex", _olua_fun_olua_short___newindex); + oluacls_func(L, "__olua_move", _olua_fun_olua_short___olua_move); + oluacls_func(L, "new", _olua_fun_olua_short_new); + oluacls_func(L, "slice", _olua_fun_olua_short_slice); + oluacls_func(L, "sub", _olua_fun_olua_short_sub); + oluacls_func(L, "take", _olua_fun_olua_short_take); + oluacls_func(L, "tostring", _olua_fun_olua_short_tostring); + oluacls_prop(L, "buffer", _olua_fun_olua_short_buffer, nullptr); + oluacls_prop(L, "length", _olua_fun_olua_short_length, nullptr); + oluacls_prop(L, "value", _olua_fun_olua_short_value, _olua_fun_olua_short_value); - return num_ret; + return 1; } OLUA_BEGIN_DECLS OLUA_LIB int luaopen_olua_short(lua_State *L) { - oluacls_class(L, "olua.short"); - oluacls_func(L, "__gc", _olua_short___gc); - oluacls_func(L, "__index", _olua_short___index); - oluacls_func(L, "__newindex", _olua_short___newindex); - oluacls_func(L, "__olua_move", _olua_short___olua_move); - oluacls_func(L, "assign", _olua_short_assign); - oluacls_func(L, "new", _olua_short_create); - oluacls_func(L, "slice", _olua_short_slice); - oluacls_func(L, "sub", _olua_short_sub); - oluacls_func(L, "take", _olua_short_take); - oluacls_func(L, "tostring", _olua_short_tostring); - oluacls_prop(L, "length", _olua_short_length, _olua_short_length); - oluacls_prop(L, "rawdata", _olua_short_rawdata, nullptr); - oluacls_prop(L, "sizeof", _olua_short_size, nullptr); - oluacls_prop(L, "value", _olua_short_value, _olua_short_value); - + olua_require(L, "types", luaopen_types); + if (!olua_getclass(L, "olua.short")) { + luaL_error(L, "class not found: olua_short"); + } return 1; } OLUA_END_DECLS -static int _olua_int___gc(lua_State *L) +static int _olua_fun_olua_int___gc(lua_State *L) { olua_startinvoke(L); @@ -4916,7 +5024,7 @@ static int _olua_int___gc(lua_State *L) return (int)ret; } -static int _olua_int___index(lua_State *L) +static int _olua_fun_olua_int___index(lua_State *L) { olua_startinvoke(L); @@ -4935,7 +5043,7 @@ static int _olua_int___index(lua_State *L) return num_ret; } -static int _olua_int___newindex(lua_State *L) +static int _olua_fun_olua_int___newindex(lua_State *L) { olua_startinvoke(L); @@ -4955,7 +5063,7 @@ static int _olua_int___newindex(lua_State *L) return 0; } -static int _olua_int___olua_move(lua_State *L) +static int _olua_fun_olua_int___olua_move(lua_State *L) { olua_startinvoke(L); @@ -4967,27 +5075,41 @@ static int _olua_int___olua_move(lua_State *L) return 1; } -static int _olua_int_assign(lua_State *L) +static int _olua_fun_olua_int_buffer(lua_State *L) { olua_startinvoke(L); olua_int *self = nullptr; - const char *arg1 = nullptr; /** data */ - size_t arg2 = 0; /** len */ olua_to_object(L, 1, &self, "olua.int"); - olua_check_string(L, 2, &arg1); - olua_check_integer(L, 3, &arg2); - // void assign(const char *data, size_t len) - self->assign(arg1, arg2); + // @getter @name(buffer) @type(void *) olua_int_t *buffer() + void *ret = self->buffer(); + int num_ret = olua_push_object(L, ret, "void *"); olua_endinvoke(L); - return 0; + return num_ret; +} + +static int _olua_fun_olua_int_length(lua_State *L) +{ + olua_startinvoke(L); + + olua_int *self = nullptr; + + olua_to_object(L, 1, &self, "olua.int"); + + // @getter @name(length) size_t length() + size_t ret = self->length(); + int num_ret = olua_push_integer(L, ret); + + olua_endinvoke(L); + + return num_ret; } -static int _olua_int_create$1(lua_State *L) +static int _olua_fun_olua_int_new$1(lua_State *L) { olua_startinvoke(L); @@ -5007,11 +5129,11 @@ static int _olua_int_create$1(lua_State *L) return num_ret; } -static int _olua_int_create$2(lua_State *L) +static int _olua_fun_olua_int_new$2(lua_State *L) { olua_startinvoke(L); - // @postnew @name(new) static olua_int *create(@optional size_t len) + // @postnew @name(new) static olua_int *create() olua_int *ret = olua_int::create(); int num_ret = olua_push_object(L, ret, "olua.int"); @@ -5023,28 +5145,28 @@ static int _olua_int_create$2(lua_State *L) return num_ret; } -static int _olua_int_create(lua_State *L) +static int _olua_fun_olua_int_new(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 0) { - // @postnew @name(new) static olua_int *create(@optional size_t len) - return _olua_int_create$2(L); + // @postnew @name(new) static olua_int *create() + return _olua_fun_olua_int_new$2(L); } if (num_args == 1) { // if ((olua_is_integer(L, 1))) { // @postnew @name(new) static olua_int *create(@optional size_t len) - return _olua_int_create$1(L); + return _olua_fun_olua_int_new$1(L); // } } - luaL_error(L, "method 'olua_int::create' not support '%d' arguments", num_args); + luaL_error(L, "method 'olua_int::new' not support '%d' arguments", num_args); return 0; } -static int _olua_int_slice$1(lua_State *L) +static int _olua_fun_olua_int_slice$1(lua_State *L) { olua_startinvoke(L); @@ -5068,7 +5190,7 @@ static int _olua_int_slice$1(lua_State *L) return num_ret; } -static int _olua_int_slice$2(lua_State *L) +static int _olua_fun_olua_int_slice$2(lua_State *L) { olua_startinvoke(L); @@ -5078,7 +5200,7 @@ static int _olua_int_slice$2(lua_State *L) olua_to_object(L, 1, &self, "olua.int"); olua_check_integer(L, 2, &arg1); - // @postnew olua_int *slice(size_t from, @optional size_t to) + // @postnew olua_int *slice(size_t from) olua_int *ret = self->slice(arg1); int num_ret = olua_push_object(L, ret, "olua.int"); @@ -5090,21 +5212,21 @@ static int _olua_int_slice$2(lua_State *L) return num_ret; } -static int _olua_int_slice(lua_State *L) +static int _olua_fun_olua_int_slice(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_integer(L, 2))) { - // @postnew olua_int *slice(size_t from, @optional size_t to) - return _olua_int_slice$2(L); + // @postnew olua_int *slice(size_t from) + return _olua_fun_olua_int_slice$2(L); // } } if (num_args == 2) { // if ((olua_is_integer(L, 2)) && (olua_is_integer(L, 3))) { // @postnew olua_int *slice(size_t from, @optional size_t to) - return _olua_int_slice$1(L); + return _olua_fun_olua_int_slice$1(L); // } } @@ -5113,7 +5235,7 @@ static int _olua_int_slice(lua_State *L) return 0; } -static int _olua_int_sub$1(lua_State *L) +static int _olua_fun_olua_int_sub$1(lua_State *L) { olua_startinvoke(L); @@ -5137,7 +5259,7 @@ static int _olua_int_sub$1(lua_State *L) return num_ret; } -static int _olua_int_sub$2(lua_State *L) +static int _olua_fun_olua_int_sub$2(lua_State *L) { olua_startinvoke(L); @@ -5147,7 +5269,7 @@ static int _olua_int_sub$2(lua_State *L) olua_to_object(L, 1, &self, "olua.int"); olua_check_integer(L, 2, &arg1); - // @postnew olua_int *sub(size_t from, @optional size_t to) + // @postnew olua_int *sub(size_t from) olua_int *ret = self->sub(arg1); int num_ret = olua_push_object(L, ret, "olua.int"); @@ -5159,21 +5281,21 @@ static int _olua_int_sub$2(lua_State *L) return num_ret; } -static int _olua_int_sub(lua_State *L) +static int _olua_fun_olua_int_sub(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_integer(L, 2))) { - // @postnew olua_int *sub(size_t from, @optional size_t to) - return _olua_int_sub$2(L); + // @postnew olua_int *sub(size_t from) + return _olua_fun_olua_int_sub$2(L); // } } if (num_args == 2) { // if ((olua_is_integer(L, 2)) && (olua_is_integer(L, 3))) { // @postnew olua_int *sub(size_t from, @optional size_t to) - return _olua_int_sub$1(L); + return _olua_fun_olua_int_sub$1(L); // } } @@ -5182,7 +5304,7 @@ static int _olua_int_sub(lua_State *L) return 0; } -static int _olua_int_take(lua_State *L) +static int _olua_fun_olua_int_take(lua_State *L) { olua_startinvoke(L); @@ -5199,7 +5321,7 @@ static int _olua_int_take(lua_State *L) return num_ret; } -static int _olua_int_tostring(lua_State *L) +static int _olua_fun_olua_int_tostring(lua_State *L) { olua_startinvoke(L); @@ -5217,7 +5339,7 @@ static int _olua_int_tostring(lua_State *L) return (int)ret; } -static int _olua_int_length(lua_State *L) +static int _olua_fun_olua_int_value$1(lua_State *L) { olua_startinvoke(L); @@ -5225,8 +5347,8 @@ static int _olua_int_length(lua_State *L) olua_to_object(L, 1, &self, "olua.int"); - // @getter @name(length) size_t length() - size_t ret = self->length(); + // @getter @name(value) const olua_int_t &value() + const olua_int_t &ret = self->value(); int num_ret = olua_push_integer(L, ret); olua_endinvoke(L); @@ -5234,81 +5356,76 @@ static int _olua_int_length(lua_State *L) return num_ret; } -static int _olua_int_rawdata(lua_State *L) +static int _olua_fun_olua_int_value$2(lua_State *L) { olua_startinvoke(L); olua_int *self = nullptr; + olua_int_t arg1 = 0; /** v */ olua_to_object(L, 1, &self, "olua.int"); + olua_check_integer(L, 2, &arg1); - // @getter @name(rawdata) void *rawdata() - void *ret = self->rawdata(); - int num_ret = olua_push_object(L, ret, "void *"); + // @setter @name(value) void value(const olua_int_t &v) + self->value(arg1); olua_endinvoke(L); - return num_ret; + return 0; } -static int _olua_int_size(lua_State *L) +static int _olua_fun_olua_int_value(lua_State *L) { - olua_startinvoke(L); - - olua_int *self = nullptr; + int num_args = lua_gettop(L) - 1; - olua_to_object(L, 1, &self, "olua.int"); + if (num_args == 0) { + // @getter @name(value) const olua_int_t &value() + return _olua_fun_olua_int_value$1(L); + } - // @getter @name(sizeof) size_t size() - size_t ret = self->size(); - int num_ret = olua_push_integer(L, ret); + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // @setter @name(value) void value(const olua_int_t &v) + return _olua_fun_olua_int_value$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'olua_int::value' not support '%d' arguments", num_args); - return num_ret; + return 0; } -static int _olua_int_value(lua_State *L) +static int _olua_cls_olua_int(lua_State *L) { - olua_startinvoke(L); + oluacls_class(L, "olua.int"); + oluacls_func(L, "__gc", _olua_fun_olua_int___gc); + oluacls_func(L, "__index", _olua_fun_olua_int___index); + oluacls_func(L, "__newindex", _olua_fun_olua_int___newindex); + oluacls_func(L, "__olua_move", _olua_fun_olua_int___olua_move); + oluacls_func(L, "new", _olua_fun_olua_int_new); + oluacls_func(L, "slice", _olua_fun_olua_int_slice); + oluacls_func(L, "sub", _olua_fun_olua_int_sub); + oluacls_func(L, "take", _olua_fun_olua_int_take); + oluacls_func(L, "tostring", _olua_fun_olua_int_tostring); + oluacls_prop(L, "buffer", _olua_fun_olua_int_buffer, nullptr); + oluacls_prop(L, "length", _olua_fun_olua_int_length, nullptr); + oluacls_prop(L, "value", _olua_fun_olua_int_value, _olua_fun_olua_int_value); - olua_int *self = nullptr; - - olua_to_object(L, 1, &self, "olua.int"); - - // @getter @name(value) const olua_int_t &value() - const olua_int_t &ret = self->value(); - int num_ret = olua_push_integer(L, ret); - - olua_endinvoke(L); - - return num_ret; -} + return 1; +} OLUA_BEGIN_DECLS OLUA_LIB int luaopen_olua_int(lua_State *L) { - oluacls_class(L, "olua.int"); - oluacls_func(L, "__gc", _olua_int___gc); - oluacls_func(L, "__index", _olua_int___index); - oluacls_func(L, "__newindex", _olua_int___newindex); - oluacls_func(L, "__olua_move", _olua_int___olua_move); - oluacls_func(L, "assign", _olua_int_assign); - oluacls_func(L, "new", _olua_int_create); - oluacls_func(L, "slice", _olua_int_slice); - oluacls_func(L, "sub", _olua_int_sub); - oluacls_func(L, "take", _olua_int_take); - oluacls_func(L, "tostring", _olua_int_tostring); - oluacls_prop(L, "length", _olua_int_length, _olua_int_length); - oluacls_prop(L, "rawdata", _olua_int_rawdata, nullptr); - oluacls_prop(L, "sizeof", _olua_int_size, nullptr); - oluacls_prop(L, "value", _olua_int_value, _olua_int_value); - + olua_require(L, "types", luaopen_types); + if (!olua_getclass(L, "olua.int")) { + luaL_error(L, "class not found: olua_int"); + } return 1; } OLUA_END_DECLS -static int _olua_long___gc(lua_State *L) +static int _olua_fun_olua_long___gc(lua_State *L) { olua_startinvoke(L); @@ -5324,7 +5441,7 @@ static int _olua_long___gc(lua_State *L) return (int)ret; } -static int _olua_long___index(lua_State *L) +static int _olua_fun_olua_long___index(lua_State *L) { olua_startinvoke(L); @@ -5343,7 +5460,7 @@ static int _olua_long___index(lua_State *L) return num_ret; } -static int _olua_long___newindex(lua_State *L) +static int _olua_fun_olua_long___newindex(lua_State *L) { olua_startinvoke(L); @@ -5363,7 +5480,7 @@ static int _olua_long___newindex(lua_State *L) return 0; } -static int _olua_long___olua_move(lua_State *L) +static int _olua_fun_olua_long___olua_move(lua_State *L) { olua_startinvoke(L); @@ -5375,27 +5492,41 @@ static int _olua_long___olua_move(lua_State *L) return 1; } -static int _olua_long_assign(lua_State *L) +static int _olua_fun_olua_long_buffer(lua_State *L) { olua_startinvoke(L); olua_long *self = nullptr; - const char *arg1 = nullptr; /** data */ - size_t arg2 = 0; /** len */ olua_to_object(L, 1, &self, "olua.long"); - olua_check_string(L, 2, &arg1); - olua_check_integer(L, 3, &arg2); - // void assign(const char *data, size_t len) - self->assign(arg1, arg2); + // @getter @name(buffer) @type(void *) olua_long_t *buffer() + void *ret = self->buffer(); + int num_ret = olua_push_object(L, ret, "void *"); olua_endinvoke(L); - return 0; + return num_ret; +} + +static int _olua_fun_olua_long_length(lua_State *L) +{ + olua_startinvoke(L); + + olua_long *self = nullptr; + + olua_to_object(L, 1, &self, "olua.long"); + + // @getter @name(length) size_t length() + size_t ret = self->length(); + int num_ret = olua_push_integer(L, ret); + + olua_endinvoke(L); + + return num_ret; } -static int _olua_long_create$1(lua_State *L) +static int _olua_fun_olua_long_new$1(lua_State *L) { olua_startinvoke(L); @@ -5415,11 +5546,11 @@ static int _olua_long_create$1(lua_State *L) return num_ret; } -static int _olua_long_create$2(lua_State *L) +static int _olua_fun_olua_long_new$2(lua_State *L) { olua_startinvoke(L); - // @postnew @name(new) static olua_long *create(@optional size_t len) + // @postnew @name(new) static olua_long *create() olua_long *ret = olua_long::create(); int num_ret = olua_push_object(L, ret, "olua.long"); @@ -5431,28 +5562,28 @@ static int _olua_long_create$2(lua_State *L) return num_ret; } -static int _olua_long_create(lua_State *L) +static int _olua_fun_olua_long_new(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 0) { - // @postnew @name(new) static olua_long *create(@optional size_t len) - return _olua_long_create$2(L); + // @postnew @name(new) static olua_long *create() + return _olua_fun_olua_long_new$2(L); } if (num_args == 1) { // if ((olua_is_integer(L, 1))) { // @postnew @name(new) static olua_long *create(@optional size_t len) - return _olua_long_create$1(L); + return _olua_fun_olua_long_new$1(L); // } } - luaL_error(L, "method 'olua_long::create' not support '%d' arguments", num_args); + luaL_error(L, "method 'olua_long::new' not support '%d' arguments", num_args); return 0; } -static int _olua_long_slice$1(lua_State *L) +static int _olua_fun_olua_long_slice$1(lua_State *L) { olua_startinvoke(L); @@ -5476,7 +5607,7 @@ static int _olua_long_slice$1(lua_State *L) return num_ret; } -static int _olua_long_slice$2(lua_State *L) +static int _olua_fun_olua_long_slice$2(lua_State *L) { olua_startinvoke(L); @@ -5486,7 +5617,7 @@ static int _olua_long_slice$2(lua_State *L) olua_to_object(L, 1, &self, "olua.long"); olua_check_integer(L, 2, &arg1); - // @postnew olua_long *slice(size_t from, @optional size_t to) + // @postnew olua_long *slice(size_t from) olua_long *ret = self->slice(arg1); int num_ret = olua_push_object(L, ret, "olua.long"); @@ -5498,21 +5629,21 @@ static int _olua_long_slice$2(lua_State *L) return num_ret; } -static int _olua_long_slice(lua_State *L) +static int _olua_fun_olua_long_slice(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_integer(L, 2))) { - // @postnew olua_long *slice(size_t from, @optional size_t to) - return _olua_long_slice$2(L); + // @postnew olua_long *slice(size_t from) + return _olua_fun_olua_long_slice$2(L); // } } if (num_args == 2) { // if ((olua_is_integer(L, 2)) && (olua_is_integer(L, 3))) { // @postnew olua_long *slice(size_t from, @optional size_t to) - return _olua_long_slice$1(L); + return _olua_fun_olua_long_slice$1(L); // } } @@ -5521,7 +5652,7 @@ static int _olua_long_slice(lua_State *L) return 0; } -static int _olua_long_sub$1(lua_State *L) +static int _olua_fun_olua_long_sub$1(lua_State *L) { olua_startinvoke(L); @@ -5545,7 +5676,7 @@ static int _olua_long_sub$1(lua_State *L) return num_ret; } -static int _olua_long_sub$2(lua_State *L) +static int _olua_fun_olua_long_sub$2(lua_State *L) { olua_startinvoke(L); @@ -5555,7 +5686,7 @@ static int _olua_long_sub$2(lua_State *L) olua_to_object(L, 1, &self, "olua.long"); olua_check_integer(L, 2, &arg1); - // @postnew olua_long *sub(size_t from, @optional size_t to) + // @postnew olua_long *sub(size_t from) olua_long *ret = self->sub(arg1); int num_ret = olua_push_object(L, ret, "olua.long"); @@ -5567,21 +5698,21 @@ static int _olua_long_sub$2(lua_State *L) return num_ret; } -static int _olua_long_sub(lua_State *L) +static int _olua_fun_olua_long_sub(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_integer(L, 2))) { - // @postnew olua_long *sub(size_t from, @optional size_t to) - return _olua_long_sub$2(L); + // @postnew olua_long *sub(size_t from) + return _olua_fun_olua_long_sub$2(L); // } } if (num_args == 2) { // if ((olua_is_integer(L, 2)) && (olua_is_integer(L, 3))) { // @postnew olua_long *sub(size_t from, @optional size_t to) - return _olua_long_sub$1(L); + return _olua_fun_olua_long_sub$1(L); // } } @@ -5590,7 +5721,7 @@ static int _olua_long_sub(lua_State *L) return 0; } -static int _olua_long_take(lua_State *L) +static int _olua_fun_olua_long_take(lua_State *L) { olua_startinvoke(L); @@ -5607,7 +5738,7 @@ static int _olua_long_take(lua_State *L) return num_ret; } -static int _olua_long_tostring(lua_State *L) +static int _olua_fun_olua_long_tostring(lua_State *L) { olua_startinvoke(L); @@ -5625,7 +5756,7 @@ static int _olua_long_tostring(lua_State *L) return (int)ret; } -static int _olua_long_length(lua_State *L) +static int _olua_fun_olua_long_value$1(lua_State *L) { olua_startinvoke(L); @@ -5633,8 +5764,8 @@ static int _olua_long_length(lua_State *L) olua_to_object(L, 1, &self, "olua.long"); - // @getter @name(length) size_t length() - size_t ret = self->length(); + // @getter @name(value) const olua_long_t &value() + const olua_long_t &ret = self->value(); int num_ret = olua_push_integer(L, ret); olua_endinvoke(L); @@ -5642,81 +5773,76 @@ static int _olua_long_length(lua_State *L) return num_ret; } -static int _olua_long_rawdata(lua_State *L) +static int _olua_fun_olua_long_value$2(lua_State *L) { olua_startinvoke(L); olua_long *self = nullptr; + olua_long_t arg1 = 0; /** v */ olua_to_object(L, 1, &self, "olua.long"); + olua_check_integer(L, 2, &arg1); - // @getter @name(rawdata) void *rawdata() - void *ret = self->rawdata(); - int num_ret = olua_push_object(L, ret, "void *"); + // @setter @name(value) void value(const olua_long_t &v) + self->value(arg1); olua_endinvoke(L); - return num_ret; + return 0; } -static int _olua_long_size(lua_State *L) +static int _olua_fun_olua_long_value(lua_State *L) { - olua_startinvoke(L); - - olua_long *self = nullptr; + int num_args = lua_gettop(L) - 1; - olua_to_object(L, 1, &self, "olua.long"); + if (num_args == 0) { + // @getter @name(value) const olua_long_t &value() + return _olua_fun_olua_long_value$1(L); + } - // @getter @name(sizeof) size_t size() - size_t ret = self->size(); - int num_ret = olua_push_integer(L, ret); + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // @setter @name(value) void value(const olua_long_t &v) + return _olua_fun_olua_long_value$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'olua_long::value' not support '%d' arguments", num_args); - return num_ret; + return 0; } -static int _olua_long_value(lua_State *L) +static int _olua_cls_olua_long(lua_State *L) { - olua_startinvoke(L); - - olua_long *self = nullptr; - - olua_to_object(L, 1, &self, "olua.long"); - - // @getter @name(value) const olua_long_t &value() - const olua_long_t &ret = self->value(); - int num_ret = olua_push_integer(L, ret); - - olua_endinvoke(L); + oluacls_class(L, "olua.long"); + oluacls_func(L, "__gc", _olua_fun_olua_long___gc); + oluacls_func(L, "__index", _olua_fun_olua_long___index); + oluacls_func(L, "__newindex", _olua_fun_olua_long___newindex); + oluacls_func(L, "__olua_move", _olua_fun_olua_long___olua_move); + oluacls_func(L, "new", _olua_fun_olua_long_new); + oluacls_func(L, "slice", _olua_fun_olua_long_slice); + oluacls_func(L, "sub", _olua_fun_olua_long_sub); + oluacls_func(L, "take", _olua_fun_olua_long_take); + oluacls_func(L, "tostring", _olua_fun_olua_long_tostring); + oluacls_prop(L, "buffer", _olua_fun_olua_long_buffer, nullptr); + oluacls_prop(L, "length", _olua_fun_olua_long_length, nullptr); + oluacls_prop(L, "value", _olua_fun_olua_long_value, _olua_fun_olua_long_value); - return num_ret; + return 1; } OLUA_BEGIN_DECLS OLUA_LIB int luaopen_olua_long(lua_State *L) { - oluacls_class(L, "olua.long"); - oluacls_func(L, "__gc", _olua_long___gc); - oluacls_func(L, "__index", _olua_long___index); - oluacls_func(L, "__newindex", _olua_long___newindex); - oluacls_func(L, "__olua_move", _olua_long___olua_move); - oluacls_func(L, "assign", _olua_long_assign); - oluacls_func(L, "new", _olua_long_create); - oluacls_func(L, "slice", _olua_long_slice); - oluacls_func(L, "sub", _olua_long_sub); - oluacls_func(L, "take", _olua_long_take); - oluacls_func(L, "tostring", _olua_long_tostring); - oluacls_prop(L, "length", _olua_long_length, _olua_long_length); - oluacls_prop(L, "rawdata", _olua_long_rawdata, nullptr); - oluacls_prop(L, "sizeof", _olua_long_size, nullptr); - oluacls_prop(L, "value", _olua_long_value, _olua_long_value); - + olua_require(L, "types", luaopen_types); + if (!olua_getclass(L, "olua.long")) { + luaL_error(L, "class not found: olua_long"); + } return 1; } OLUA_END_DECLS -static int _olua_llong___gc(lua_State *L) +static int _olua_fun_olua_llong___gc(lua_State *L) { olua_startinvoke(L); @@ -5732,7 +5858,7 @@ static int _olua_llong___gc(lua_State *L) return (int)ret; } -static int _olua_llong___index(lua_State *L) +static int _olua_fun_olua_llong___index(lua_State *L) { olua_startinvoke(L); @@ -5751,7 +5877,7 @@ static int _olua_llong___index(lua_State *L) return num_ret; } -static int _olua_llong___newindex(lua_State *L) +static int _olua_fun_olua_llong___newindex(lua_State *L) { olua_startinvoke(L); @@ -5771,7 +5897,7 @@ static int _olua_llong___newindex(lua_State *L) return 0; } -static int _olua_llong___olua_move(lua_State *L) +static int _olua_fun_olua_llong___olua_move(lua_State *L) { olua_startinvoke(L); @@ -5783,27 +5909,41 @@ static int _olua_llong___olua_move(lua_State *L) return 1; } -static int _olua_llong_assign(lua_State *L) +static int _olua_fun_olua_llong_buffer(lua_State *L) { olua_startinvoke(L); olua_llong *self = nullptr; - const char *arg1 = nullptr; /** data */ - size_t arg2 = 0; /** len */ olua_to_object(L, 1, &self, "olua.llong"); - olua_check_string(L, 2, &arg1); - olua_check_integer(L, 3, &arg2); - // void assign(const char *data, size_t len) - self->assign(arg1, arg2); + // @getter @name(buffer) @type(void *) olua_llong_t *buffer() + void *ret = self->buffer(); + int num_ret = olua_push_object(L, ret, "void *"); olua_endinvoke(L); - return 0; + return num_ret; +} + +static int _olua_fun_olua_llong_length(lua_State *L) +{ + olua_startinvoke(L); + + olua_llong *self = nullptr; + + olua_to_object(L, 1, &self, "olua.llong"); + + // @getter @name(length) size_t length() + size_t ret = self->length(); + int num_ret = olua_push_integer(L, ret); + + olua_endinvoke(L); + + return num_ret; } -static int _olua_llong_create$1(lua_State *L) +static int _olua_fun_olua_llong_new$1(lua_State *L) { olua_startinvoke(L); @@ -5823,11 +5963,11 @@ static int _olua_llong_create$1(lua_State *L) return num_ret; } -static int _olua_llong_create$2(lua_State *L) +static int _olua_fun_olua_llong_new$2(lua_State *L) { olua_startinvoke(L); - // @postnew @name(new) static olua_llong *create(@optional size_t len) + // @postnew @name(new) static olua_llong *create() olua_llong *ret = olua_llong::create(); int num_ret = olua_push_object(L, ret, "olua.llong"); @@ -5839,28 +5979,28 @@ static int _olua_llong_create$2(lua_State *L) return num_ret; } -static int _olua_llong_create(lua_State *L) +static int _olua_fun_olua_llong_new(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 0) { - // @postnew @name(new) static olua_llong *create(@optional size_t len) - return _olua_llong_create$2(L); + // @postnew @name(new) static olua_llong *create() + return _olua_fun_olua_llong_new$2(L); } if (num_args == 1) { // if ((olua_is_integer(L, 1))) { // @postnew @name(new) static olua_llong *create(@optional size_t len) - return _olua_llong_create$1(L); + return _olua_fun_olua_llong_new$1(L); // } } - luaL_error(L, "method 'olua_llong::create' not support '%d' arguments", num_args); + luaL_error(L, "method 'olua_llong::new' not support '%d' arguments", num_args); return 0; } -static int _olua_llong_slice$1(lua_State *L) +static int _olua_fun_olua_llong_slice$1(lua_State *L) { olua_startinvoke(L); @@ -5884,7 +6024,7 @@ static int _olua_llong_slice$1(lua_State *L) return num_ret; } -static int _olua_llong_slice$2(lua_State *L) +static int _olua_fun_olua_llong_slice$2(lua_State *L) { olua_startinvoke(L); @@ -5894,7 +6034,7 @@ static int _olua_llong_slice$2(lua_State *L) olua_to_object(L, 1, &self, "olua.llong"); olua_check_integer(L, 2, &arg1); - // @postnew olua_llong *slice(size_t from, @optional size_t to) + // @postnew olua_llong *slice(size_t from) olua_llong *ret = self->slice(arg1); int num_ret = olua_push_object(L, ret, "olua.llong"); @@ -5906,21 +6046,21 @@ static int _olua_llong_slice$2(lua_State *L) return num_ret; } -static int _olua_llong_slice(lua_State *L) +static int _olua_fun_olua_llong_slice(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_integer(L, 2))) { - // @postnew olua_llong *slice(size_t from, @optional size_t to) - return _olua_llong_slice$2(L); + // @postnew olua_llong *slice(size_t from) + return _olua_fun_olua_llong_slice$2(L); // } } if (num_args == 2) { // if ((olua_is_integer(L, 2)) && (olua_is_integer(L, 3))) { // @postnew olua_llong *slice(size_t from, @optional size_t to) - return _olua_llong_slice$1(L); + return _olua_fun_olua_llong_slice$1(L); // } } @@ -5929,7 +6069,7 @@ static int _olua_llong_slice(lua_State *L) return 0; } -static int _olua_llong_sub$1(lua_State *L) +static int _olua_fun_olua_llong_sub$1(lua_State *L) { olua_startinvoke(L); @@ -5953,7 +6093,7 @@ static int _olua_llong_sub$1(lua_State *L) return num_ret; } -static int _olua_llong_sub$2(lua_State *L) +static int _olua_fun_olua_llong_sub$2(lua_State *L) { olua_startinvoke(L); @@ -5963,7 +6103,7 @@ static int _olua_llong_sub$2(lua_State *L) olua_to_object(L, 1, &self, "olua.llong"); olua_check_integer(L, 2, &arg1); - // @postnew olua_llong *sub(size_t from, @optional size_t to) + // @postnew olua_llong *sub(size_t from) olua_llong *ret = self->sub(arg1); int num_ret = olua_push_object(L, ret, "olua.llong"); @@ -5975,21 +6115,21 @@ static int _olua_llong_sub$2(lua_State *L) return num_ret; } -static int _olua_llong_sub(lua_State *L) +static int _olua_fun_olua_llong_sub(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_integer(L, 2))) { - // @postnew olua_llong *sub(size_t from, @optional size_t to) - return _olua_llong_sub$2(L); + // @postnew olua_llong *sub(size_t from) + return _olua_fun_olua_llong_sub$2(L); // } } if (num_args == 2) { // if ((olua_is_integer(L, 2)) && (olua_is_integer(L, 3))) { // @postnew olua_llong *sub(size_t from, @optional size_t to) - return _olua_llong_sub$1(L); + return _olua_fun_olua_llong_sub$1(L); // } } @@ -5998,7 +6138,7 @@ static int _olua_llong_sub(lua_State *L) return 0; } -static int _olua_llong_take(lua_State *L) +static int _olua_fun_olua_llong_take(lua_State *L) { olua_startinvoke(L); @@ -6015,7 +6155,7 @@ static int _olua_llong_take(lua_State *L) return num_ret; } -static int _olua_llong_tostring(lua_State *L) +static int _olua_fun_olua_llong_tostring(lua_State *L) { olua_startinvoke(L); @@ -6033,7 +6173,7 @@ static int _olua_llong_tostring(lua_State *L) return (int)ret; } -static int _olua_llong_length(lua_State *L) +static int _olua_fun_olua_llong_value$1(lua_State *L) { olua_startinvoke(L); @@ -6041,8 +6181,8 @@ static int _olua_llong_length(lua_State *L) olua_to_object(L, 1, &self, "olua.llong"); - // @getter @name(length) size_t length() - size_t ret = self->length(); + // @getter @name(value) const olua_llong_t &value() + const olua_llong_t &ret = self->value(); int num_ret = olua_push_integer(L, ret); olua_endinvoke(L); @@ -6050,81 +6190,76 @@ static int _olua_llong_length(lua_State *L) return num_ret; } -static int _olua_llong_rawdata(lua_State *L) +static int _olua_fun_olua_llong_value$2(lua_State *L) { olua_startinvoke(L); olua_llong *self = nullptr; + olua_llong_t arg1 = 0; /** v */ olua_to_object(L, 1, &self, "olua.llong"); + olua_check_integer(L, 2, &arg1); - // @getter @name(rawdata) void *rawdata() - void *ret = self->rawdata(); - int num_ret = olua_push_object(L, ret, "void *"); + // @setter @name(value) void value(const olua_llong_t &v) + self->value(arg1); olua_endinvoke(L); - return num_ret; + return 0; } -static int _olua_llong_size(lua_State *L) +static int _olua_fun_olua_llong_value(lua_State *L) { - olua_startinvoke(L); - - olua_llong *self = nullptr; + int num_args = lua_gettop(L) - 1; - olua_to_object(L, 1, &self, "olua.llong"); + if (num_args == 0) { + // @getter @name(value) const olua_llong_t &value() + return _olua_fun_olua_llong_value$1(L); + } - // @getter @name(sizeof) size_t size() - size_t ret = self->size(); - int num_ret = olua_push_integer(L, ret); + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // @setter @name(value) void value(const olua_llong_t &v) + return _olua_fun_olua_llong_value$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'olua_llong::value' not support '%d' arguments", num_args); - return num_ret; + return 0; } -static int _olua_llong_value(lua_State *L) +static int _olua_cls_olua_llong(lua_State *L) { - olua_startinvoke(L); - - olua_llong *self = nullptr; - - olua_to_object(L, 1, &self, "olua.llong"); - - // @getter @name(value) const olua_llong_t &value() - const olua_llong_t &ret = self->value(); - int num_ret = olua_push_integer(L, ret); - - olua_endinvoke(L); + oluacls_class(L, "olua.llong"); + oluacls_func(L, "__gc", _olua_fun_olua_llong___gc); + oluacls_func(L, "__index", _olua_fun_olua_llong___index); + oluacls_func(L, "__newindex", _olua_fun_olua_llong___newindex); + oluacls_func(L, "__olua_move", _olua_fun_olua_llong___olua_move); + oluacls_func(L, "new", _olua_fun_olua_llong_new); + oluacls_func(L, "slice", _olua_fun_olua_llong_slice); + oluacls_func(L, "sub", _olua_fun_olua_llong_sub); + oluacls_func(L, "take", _olua_fun_olua_llong_take); + oluacls_func(L, "tostring", _olua_fun_olua_llong_tostring); + oluacls_prop(L, "buffer", _olua_fun_olua_llong_buffer, nullptr); + oluacls_prop(L, "length", _olua_fun_olua_llong_length, nullptr); + oluacls_prop(L, "value", _olua_fun_olua_llong_value, _olua_fun_olua_llong_value); - return num_ret; + return 1; } OLUA_BEGIN_DECLS OLUA_LIB int luaopen_olua_llong(lua_State *L) { - oluacls_class(L, "olua.llong"); - oluacls_func(L, "__gc", _olua_llong___gc); - oluacls_func(L, "__index", _olua_llong___index); - oluacls_func(L, "__newindex", _olua_llong___newindex); - oluacls_func(L, "__olua_move", _olua_llong___olua_move); - oluacls_func(L, "assign", _olua_llong_assign); - oluacls_func(L, "new", _olua_llong_create); - oluacls_func(L, "slice", _olua_llong_slice); - oluacls_func(L, "sub", _olua_llong_sub); - oluacls_func(L, "take", _olua_llong_take); - oluacls_func(L, "tostring", _olua_llong_tostring); - oluacls_prop(L, "length", _olua_llong_length, _olua_llong_length); - oluacls_prop(L, "rawdata", _olua_llong_rawdata, nullptr); - oluacls_prop(L, "sizeof", _olua_llong_size, nullptr); - oluacls_prop(L, "value", _olua_llong_value, _olua_llong_value); - + olua_require(L, "types", luaopen_types); + if (!olua_getclass(L, "olua.llong")) { + luaL_error(L, "class not found: olua_llong"); + } return 1; } OLUA_END_DECLS -static int _olua_uchar___gc(lua_State *L) +static int _olua_fun_olua_uchar___gc(lua_State *L) { olua_startinvoke(L); @@ -6140,7 +6275,7 @@ static int _olua_uchar___gc(lua_State *L) return (int)ret; } -static int _olua_uchar___index(lua_State *L) +static int _olua_fun_olua_uchar___index(lua_State *L) { olua_startinvoke(L); @@ -6159,7 +6294,7 @@ static int _olua_uchar___index(lua_State *L) return num_ret; } -static int _olua_uchar___newindex(lua_State *L) +static int _olua_fun_olua_uchar___newindex(lua_State *L) { olua_startinvoke(L); @@ -6179,7 +6314,7 @@ static int _olua_uchar___newindex(lua_State *L) return 0; } -static int _olua_uchar___olua_move(lua_State *L) +static int _olua_fun_olua_uchar___olua_move(lua_State *L) { olua_startinvoke(L); @@ -6191,27 +6326,41 @@ static int _olua_uchar___olua_move(lua_State *L) return 1; } -static int _olua_uchar_assign(lua_State *L) +static int _olua_fun_olua_uchar_buffer(lua_State *L) { olua_startinvoke(L); olua_uchar *self = nullptr; - const char *arg1 = nullptr; /** data */ - size_t arg2 = 0; /** len */ olua_to_object(L, 1, &self, "olua.uchar"); - olua_check_string(L, 2, &arg1); - olua_check_integer(L, 3, &arg2); - // void assign(const char *data, size_t len) - self->assign(arg1, arg2); + // @getter @name(buffer) @type(void *) olua_uchar_t *buffer() + void *ret = self->buffer(); + int num_ret = olua_push_object(L, ret, "void *"); olua_endinvoke(L); - return 0; + return num_ret; +} + +static int _olua_fun_olua_uchar_length(lua_State *L) +{ + olua_startinvoke(L); + + olua_uchar *self = nullptr; + + olua_to_object(L, 1, &self, "olua.uchar"); + + // @getter @name(length) size_t length() + size_t ret = self->length(); + int num_ret = olua_push_integer(L, ret); + + olua_endinvoke(L); + + return num_ret; } -static int _olua_uchar_create$1(lua_State *L) +static int _olua_fun_olua_uchar_new$1(lua_State *L) { olua_startinvoke(L); @@ -6231,11 +6380,11 @@ static int _olua_uchar_create$1(lua_State *L) return num_ret; } -static int _olua_uchar_create$2(lua_State *L) +static int _olua_fun_olua_uchar_new$2(lua_State *L) { olua_startinvoke(L); - // @postnew @name(new) static olua_uchar *create(@optional size_t len) + // @postnew @name(new) static olua_uchar *create() olua_uchar *ret = olua_uchar::create(); int num_ret = olua_push_object(L, ret, "olua.uchar"); @@ -6247,28 +6396,28 @@ static int _olua_uchar_create$2(lua_State *L) return num_ret; } -static int _olua_uchar_create(lua_State *L) +static int _olua_fun_olua_uchar_new(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 0) { - // @postnew @name(new) static olua_uchar *create(@optional size_t len) - return _olua_uchar_create$2(L); + // @postnew @name(new) static olua_uchar *create() + return _olua_fun_olua_uchar_new$2(L); } if (num_args == 1) { // if ((olua_is_integer(L, 1))) { // @postnew @name(new) static olua_uchar *create(@optional size_t len) - return _olua_uchar_create$1(L); + return _olua_fun_olua_uchar_new$1(L); // } } - luaL_error(L, "method 'olua_uchar::create' not support '%d' arguments", num_args); + luaL_error(L, "method 'olua_uchar::new' not support '%d' arguments", num_args); return 0; } -static int _olua_uchar_slice$1(lua_State *L) +static int _olua_fun_olua_uchar_slice$1(lua_State *L) { olua_startinvoke(L); @@ -6292,7 +6441,7 @@ static int _olua_uchar_slice$1(lua_State *L) return num_ret; } -static int _olua_uchar_slice$2(lua_State *L) +static int _olua_fun_olua_uchar_slice$2(lua_State *L) { olua_startinvoke(L); @@ -6302,7 +6451,7 @@ static int _olua_uchar_slice$2(lua_State *L) olua_to_object(L, 1, &self, "olua.uchar"); olua_check_integer(L, 2, &arg1); - // @postnew olua_uchar *slice(size_t from, @optional size_t to) + // @postnew olua_uchar *slice(size_t from) olua_uchar *ret = self->slice(arg1); int num_ret = olua_push_object(L, ret, "olua.uchar"); @@ -6314,21 +6463,21 @@ static int _olua_uchar_slice$2(lua_State *L) return num_ret; } -static int _olua_uchar_slice(lua_State *L) +static int _olua_fun_olua_uchar_slice(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_integer(L, 2))) { - // @postnew olua_uchar *slice(size_t from, @optional size_t to) - return _olua_uchar_slice$2(L); + // @postnew olua_uchar *slice(size_t from) + return _olua_fun_olua_uchar_slice$2(L); // } } if (num_args == 2) { // if ((olua_is_integer(L, 2)) && (olua_is_integer(L, 3))) { // @postnew olua_uchar *slice(size_t from, @optional size_t to) - return _olua_uchar_slice$1(L); + return _olua_fun_olua_uchar_slice$1(L); // } } @@ -6337,7 +6486,7 @@ static int _olua_uchar_slice(lua_State *L) return 0; } -static int _olua_uchar_sub$1(lua_State *L) +static int _olua_fun_olua_uchar_sub$1(lua_State *L) { olua_startinvoke(L); @@ -6361,7 +6510,7 @@ static int _olua_uchar_sub$1(lua_State *L) return num_ret; } -static int _olua_uchar_sub$2(lua_State *L) +static int _olua_fun_olua_uchar_sub$2(lua_State *L) { olua_startinvoke(L); @@ -6371,7 +6520,7 @@ static int _olua_uchar_sub$2(lua_State *L) olua_to_object(L, 1, &self, "olua.uchar"); olua_check_integer(L, 2, &arg1); - // @postnew olua_uchar *sub(size_t from, @optional size_t to) + // @postnew olua_uchar *sub(size_t from) olua_uchar *ret = self->sub(arg1); int num_ret = olua_push_object(L, ret, "olua.uchar"); @@ -6383,21 +6532,21 @@ static int _olua_uchar_sub$2(lua_State *L) return num_ret; } -static int _olua_uchar_sub(lua_State *L) +static int _olua_fun_olua_uchar_sub(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_integer(L, 2))) { - // @postnew olua_uchar *sub(size_t from, @optional size_t to) - return _olua_uchar_sub$2(L); + // @postnew olua_uchar *sub(size_t from) + return _olua_fun_olua_uchar_sub$2(L); // } } if (num_args == 2) { // if ((olua_is_integer(L, 2)) && (olua_is_integer(L, 3))) { // @postnew olua_uchar *sub(size_t from, @optional size_t to) - return _olua_uchar_sub$1(L); + return _olua_fun_olua_uchar_sub$1(L); // } } @@ -6406,7 +6555,7 @@ static int _olua_uchar_sub(lua_State *L) return 0; } -static int _olua_uchar_take(lua_State *L) +static int _olua_fun_olua_uchar_take(lua_State *L) { olua_startinvoke(L); @@ -6423,7 +6572,7 @@ static int _olua_uchar_take(lua_State *L) return num_ret; } -static int _olua_uchar_tostring(lua_State *L) +static int _olua_fun_olua_uchar_tostring(lua_State *L) { olua_startinvoke(L); @@ -6441,7 +6590,7 @@ static int _olua_uchar_tostring(lua_State *L) return (int)ret; } -static int _olua_uchar_length(lua_State *L) +static int _olua_fun_olua_uchar_value$1(lua_State *L) { olua_startinvoke(L); @@ -6449,8 +6598,8 @@ static int _olua_uchar_length(lua_State *L) olua_to_object(L, 1, &self, "olua.uchar"); - // @getter @name(length) size_t length() - size_t ret = self->length(); + // @getter @name(value) const olua_uchar_t &value() + const olua_uchar_t &ret = self->value(); int num_ret = olua_push_integer(L, ret); olua_endinvoke(L); @@ -6458,81 +6607,76 @@ static int _olua_uchar_length(lua_State *L) return num_ret; } -static int _olua_uchar_rawdata(lua_State *L) +static int _olua_fun_olua_uchar_value$2(lua_State *L) { olua_startinvoke(L); olua_uchar *self = nullptr; + olua_uchar_t arg1 = 0; /** v */ olua_to_object(L, 1, &self, "olua.uchar"); + olua_check_integer(L, 2, &arg1); - // @getter @name(rawdata) void *rawdata() - void *ret = self->rawdata(); - int num_ret = olua_push_object(L, ret, "void *"); + // @setter @name(value) void value(const olua_uchar_t &v) + self->value(arg1); olua_endinvoke(L); - return num_ret; + return 0; } -static int _olua_uchar_size(lua_State *L) +static int _olua_fun_olua_uchar_value(lua_State *L) { - olua_startinvoke(L); - - olua_uchar *self = nullptr; + int num_args = lua_gettop(L) - 1; - olua_to_object(L, 1, &self, "olua.uchar"); + if (num_args == 0) { + // @getter @name(value) const olua_uchar_t &value() + return _olua_fun_olua_uchar_value$1(L); + } - // @getter @name(sizeof) size_t size() - size_t ret = self->size(); - int num_ret = olua_push_integer(L, ret); + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // @setter @name(value) void value(const olua_uchar_t &v) + return _olua_fun_olua_uchar_value$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'olua_uchar::value' not support '%d' arguments", num_args); - return num_ret; + return 0; } -static int _olua_uchar_value(lua_State *L) +static int _olua_cls_olua_uchar(lua_State *L) { - olua_startinvoke(L); - - olua_uchar *self = nullptr; - - olua_to_object(L, 1, &self, "olua.uchar"); - - // @getter @name(value) const olua_uchar_t &value() - const olua_uchar_t &ret = self->value(); - int num_ret = olua_push_integer(L, ret); - - olua_endinvoke(L); + oluacls_class(L, "olua.uchar"); + oluacls_func(L, "__gc", _olua_fun_olua_uchar___gc); + oluacls_func(L, "__index", _olua_fun_olua_uchar___index); + oluacls_func(L, "__newindex", _olua_fun_olua_uchar___newindex); + oluacls_func(L, "__olua_move", _olua_fun_olua_uchar___olua_move); + oluacls_func(L, "new", _olua_fun_olua_uchar_new); + oluacls_func(L, "slice", _olua_fun_olua_uchar_slice); + oluacls_func(L, "sub", _olua_fun_olua_uchar_sub); + oluacls_func(L, "take", _olua_fun_olua_uchar_take); + oluacls_func(L, "tostring", _olua_fun_olua_uchar_tostring); + oluacls_prop(L, "buffer", _olua_fun_olua_uchar_buffer, nullptr); + oluacls_prop(L, "length", _olua_fun_olua_uchar_length, nullptr); + oluacls_prop(L, "value", _olua_fun_olua_uchar_value, _olua_fun_olua_uchar_value); - return num_ret; + return 1; } OLUA_BEGIN_DECLS OLUA_LIB int luaopen_olua_uchar(lua_State *L) { - oluacls_class(L, "olua.uchar"); - oluacls_func(L, "__gc", _olua_uchar___gc); - oluacls_func(L, "__index", _olua_uchar___index); - oluacls_func(L, "__newindex", _olua_uchar___newindex); - oluacls_func(L, "__olua_move", _olua_uchar___olua_move); - oluacls_func(L, "assign", _olua_uchar_assign); - oluacls_func(L, "new", _olua_uchar_create); - oluacls_func(L, "slice", _olua_uchar_slice); - oluacls_func(L, "sub", _olua_uchar_sub); - oluacls_func(L, "take", _olua_uchar_take); - oluacls_func(L, "tostring", _olua_uchar_tostring); - oluacls_prop(L, "length", _olua_uchar_length, _olua_uchar_length); - oluacls_prop(L, "rawdata", _olua_uchar_rawdata, nullptr); - oluacls_prop(L, "sizeof", _olua_uchar_size, nullptr); - oluacls_prop(L, "value", _olua_uchar_value, _olua_uchar_value); - + olua_require(L, "types", luaopen_types); + if (!olua_getclass(L, "olua.uchar")) { + luaL_error(L, "class not found: olua_uchar"); + } return 1; } OLUA_END_DECLS -static int _olua_ushort___gc(lua_State *L) +static int _olua_fun_olua_ushort___gc(lua_State *L) { olua_startinvoke(L); @@ -6548,7 +6692,7 @@ static int _olua_ushort___gc(lua_State *L) return (int)ret; } -static int _olua_ushort___index(lua_State *L) +static int _olua_fun_olua_ushort___index(lua_State *L) { olua_startinvoke(L); @@ -6567,7 +6711,7 @@ static int _olua_ushort___index(lua_State *L) return num_ret; } -static int _olua_ushort___newindex(lua_State *L) +static int _olua_fun_olua_ushort___newindex(lua_State *L) { olua_startinvoke(L); @@ -6587,7 +6731,7 @@ static int _olua_ushort___newindex(lua_State *L) return 0; } -static int _olua_ushort___olua_move(lua_State *L) +static int _olua_fun_olua_ushort___olua_move(lua_State *L) { olua_startinvoke(L); @@ -6599,27 +6743,41 @@ static int _olua_ushort___olua_move(lua_State *L) return 1; } -static int _olua_ushort_assign(lua_State *L) +static int _olua_fun_olua_ushort_buffer(lua_State *L) { olua_startinvoke(L); olua_ushort *self = nullptr; - const char *arg1 = nullptr; /** data */ - size_t arg2 = 0; /** len */ olua_to_object(L, 1, &self, "olua.ushort"); - olua_check_string(L, 2, &arg1); - olua_check_integer(L, 3, &arg2); - // void assign(const char *data, size_t len) - self->assign(arg1, arg2); + // @getter @name(buffer) @type(void *) olua_ushort_t *buffer() + void *ret = self->buffer(); + int num_ret = olua_push_object(L, ret, "void *"); olua_endinvoke(L); - return 0; + return num_ret; +} + +static int _olua_fun_olua_ushort_length(lua_State *L) +{ + olua_startinvoke(L); + + olua_ushort *self = nullptr; + + olua_to_object(L, 1, &self, "olua.ushort"); + + // @getter @name(length) size_t length() + size_t ret = self->length(); + int num_ret = olua_push_integer(L, ret); + + olua_endinvoke(L); + + return num_ret; } -static int _olua_ushort_create$1(lua_State *L) +static int _olua_fun_olua_ushort_new$1(lua_State *L) { olua_startinvoke(L); @@ -6639,11 +6797,11 @@ static int _olua_ushort_create$1(lua_State *L) return num_ret; } -static int _olua_ushort_create$2(lua_State *L) +static int _olua_fun_olua_ushort_new$2(lua_State *L) { olua_startinvoke(L); - // @postnew @name(new) static olua_ushort *create(@optional size_t len) + // @postnew @name(new) static olua_ushort *create() olua_ushort *ret = olua_ushort::create(); int num_ret = olua_push_object(L, ret, "olua.ushort"); @@ -6655,28 +6813,28 @@ static int _olua_ushort_create$2(lua_State *L) return num_ret; } -static int _olua_ushort_create(lua_State *L) +static int _olua_fun_olua_ushort_new(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 0) { - // @postnew @name(new) static olua_ushort *create(@optional size_t len) - return _olua_ushort_create$2(L); + // @postnew @name(new) static olua_ushort *create() + return _olua_fun_olua_ushort_new$2(L); } if (num_args == 1) { // if ((olua_is_integer(L, 1))) { // @postnew @name(new) static olua_ushort *create(@optional size_t len) - return _olua_ushort_create$1(L); + return _olua_fun_olua_ushort_new$1(L); // } } - luaL_error(L, "method 'olua_ushort::create' not support '%d' arguments", num_args); + luaL_error(L, "method 'olua_ushort::new' not support '%d' arguments", num_args); return 0; } -static int _olua_ushort_slice$1(lua_State *L) +static int _olua_fun_olua_ushort_slice$1(lua_State *L) { olua_startinvoke(L); @@ -6700,7 +6858,7 @@ static int _olua_ushort_slice$1(lua_State *L) return num_ret; } -static int _olua_ushort_slice$2(lua_State *L) +static int _olua_fun_olua_ushort_slice$2(lua_State *L) { olua_startinvoke(L); @@ -6710,7 +6868,7 @@ static int _olua_ushort_slice$2(lua_State *L) olua_to_object(L, 1, &self, "olua.ushort"); olua_check_integer(L, 2, &arg1); - // @postnew olua_ushort *slice(size_t from, @optional size_t to) + // @postnew olua_ushort *slice(size_t from) olua_ushort *ret = self->slice(arg1); int num_ret = olua_push_object(L, ret, "olua.ushort"); @@ -6722,21 +6880,21 @@ static int _olua_ushort_slice$2(lua_State *L) return num_ret; } -static int _olua_ushort_slice(lua_State *L) +static int _olua_fun_olua_ushort_slice(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_integer(L, 2))) { - // @postnew olua_ushort *slice(size_t from, @optional size_t to) - return _olua_ushort_slice$2(L); + // @postnew olua_ushort *slice(size_t from) + return _olua_fun_olua_ushort_slice$2(L); // } } if (num_args == 2) { // if ((olua_is_integer(L, 2)) && (olua_is_integer(L, 3))) { // @postnew olua_ushort *slice(size_t from, @optional size_t to) - return _olua_ushort_slice$1(L); + return _olua_fun_olua_ushort_slice$1(L); // } } @@ -6745,7 +6903,7 @@ static int _olua_ushort_slice(lua_State *L) return 0; } -static int _olua_ushort_sub$1(lua_State *L) +static int _olua_fun_olua_ushort_sub$1(lua_State *L) { olua_startinvoke(L); @@ -6769,7 +6927,7 @@ static int _olua_ushort_sub$1(lua_State *L) return num_ret; } -static int _olua_ushort_sub$2(lua_State *L) +static int _olua_fun_olua_ushort_sub$2(lua_State *L) { olua_startinvoke(L); @@ -6779,7 +6937,7 @@ static int _olua_ushort_sub$2(lua_State *L) olua_to_object(L, 1, &self, "olua.ushort"); olua_check_integer(L, 2, &arg1); - // @postnew olua_ushort *sub(size_t from, @optional size_t to) + // @postnew olua_ushort *sub(size_t from) olua_ushort *ret = self->sub(arg1); int num_ret = olua_push_object(L, ret, "olua.ushort"); @@ -6791,21 +6949,21 @@ static int _olua_ushort_sub$2(lua_State *L) return num_ret; } -static int _olua_ushort_sub(lua_State *L) +static int _olua_fun_olua_ushort_sub(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_integer(L, 2))) { - // @postnew olua_ushort *sub(size_t from, @optional size_t to) - return _olua_ushort_sub$2(L); + // @postnew olua_ushort *sub(size_t from) + return _olua_fun_olua_ushort_sub$2(L); // } } if (num_args == 2) { // if ((olua_is_integer(L, 2)) && (olua_is_integer(L, 3))) { // @postnew olua_ushort *sub(size_t from, @optional size_t to) - return _olua_ushort_sub$1(L); + return _olua_fun_olua_ushort_sub$1(L); // } } @@ -6814,7 +6972,7 @@ static int _olua_ushort_sub(lua_State *L) return 0; } -static int _olua_ushort_take(lua_State *L) +static int _olua_fun_olua_ushort_take(lua_State *L) { olua_startinvoke(L); @@ -6831,7 +6989,7 @@ static int _olua_ushort_take(lua_State *L) return num_ret; } -static int _olua_ushort_tostring(lua_State *L) +static int _olua_fun_olua_ushort_tostring(lua_State *L) { olua_startinvoke(L); @@ -6849,7 +7007,7 @@ static int _olua_ushort_tostring(lua_State *L) return (int)ret; } -static int _olua_ushort_length(lua_State *L) +static int _olua_fun_olua_ushort_value$1(lua_State *L) { olua_startinvoke(L); @@ -6857,8 +7015,8 @@ static int _olua_ushort_length(lua_State *L) olua_to_object(L, 1, &self, "olua.ushort"); - // @getter @name(length) size_t length() - size_t ret = self->length(); + // @getter @name(value) const olua_ushort_t &value() + const olua_ushort_t &ret = self->value(); int num_ret = olua_push_integer(L, ret); olua_endinvoke(L); @@ -6866,81 +7024,76 @@ static int _olua_ushort_length(lua_State *L) return num_ret; } -static int _olua_ushort_rawdata(lua_State *L) +static int _olua_fun_olua_ushort_value$2(lua_State *L) { olua_startinvoke(L); olua_ushort *self = nullptr; + olua_ushort_t arg1 = 0; /** v */ olua_to_object(L, 1, &self, "olua.ushort"); + olua_check_integer(L, 2, &arg1); - // @getter @name(rawdata) void *rawdata() - void *ret = self->rawdata(); - int num_ret = olua_push_object(L, ret, "void *"); + // @setter @name(value) void value(const olua_ushort_t &v) + self->value(arg1); olua_endinvoke(L); - return num_ret; + return 0; } -static int _olua_ushort_size(lua_State *L) +static int _olua_fun_olua_ushort_value(lua_State *L) { - olua_startinvoke(L); + int num_args = lua_gettop(L) - 1; - olua_ushort *self = nullptr; + if (num_args == 0) { + // @getter @name(value) const olua_ushort_t &value() + return _olua_fun_olua_ushort_value$1(L); + } - olua_to_object(L, 1, &self, "olua.ushort"); - - // @getter @name(sizeof) size_t size() - size_t ret = self->size(); - int num_ret = olua_push_integer(L, ret); + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // @setter @name(value) void value(const olua_ushort_t &v) + return _olua_fun_olua_ushort_value$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'olua_ushort::value' not support '%d' arguments", num_args); - return num_ret; + return 0; } -static int _olua_ushort_value(lua_State *L) +static int _olua_cls_olua_ushort(lua_State *L) { - olua_startinvoke(L); - - olua_ushort *self = nullptr; - - olua_to_object(L, 1, &self, "olua.ushort"); - - // @getter @name(value) const olua_ushort_t &value() - const olua_ushort_t &ret = self->value(); - int num_ret = olua_push_integer(L, ret); - - olua_endinvoke(L); + oluacls_class(L, "olua.ushort"); + oluacls_func(L, "__gc", _olua_fun_olua_ushort___gc); + oluacls_func(L, "__index", _olua_fun_olua_ushort___index); + oluacls_func(L, "__newindex", _olua_fun_olua_ushort___newindex); + oluacls_func(L, "__olua_move", _olua_fun_olua_ushort___olua_move); + oluacls_func(L, "new", _olua_fun_olua_ushort_new); + oluacls_func(L, "slice", _olua_fun_olua_ushort_slice); + oluacls_func(L, "sub", _olua_fun_olua_ushort_sub); + oluacls_func(L, "take", _olua_fun_olua_ushort_take); + oluacls_func(L, "tostring", _olua_fun_olua_ushort_tostring); + oluacls_prop(L, "buffer", _olua_fun_olua_ushort_buffer, nullptr); + oluacls_prop(L, "length", _olua_fun_olua_ushort_length, nullptr); + oluacls_prop(L, "value", _olua_fun_olua_ushort_value, _olua_fun_olua_ushort_value); - return num_ret; + return 1; } OLUA_BEGIN_DECLS OLUA_LIB int luaopen_olua_ushort(lua_State *L) { - oluacls_class(L, "olua.ushort"); - oluacls_func(L, "__gc", _olua_ushort___gc); - oluacls_func(L, "__index", _olua_ushort___index); - oluacls_func(L, "__newindex", _olua_ushort___newindex); - oluacls_func(L, "__olua_move", _olua_ushort___olua_move); - oluacls_func(L, "assign", _olua_ushort_assign); - oluacls_func(L, "new", _olua_ushort_create); - oluacls_func(L, "slice", _olua_ushort_slice); - oluacls_func(L, "sub", _olua_ushort_sub); - oluacls_func(L, "take", _olua_ushort_take); - oluacls_func(L, "tostring", _olua_ushort_tostring); - oluacls_prop(L, "length", _olua_ushort_length, _olua_ushort_length); - oluacls_prop(L, "rawdata", _olua_ushort_rawdata, nullptr); - oluacls_prop(L, "sizeof", _olua_ushort_size, nullptr); - oluacls_prop(L, "value", _olua_ushort_value, _olua_ushort_value); - + olua_require(L, "types", luaopen_types); + if (!olua_getclass(L, "olua.ushort")) { + luaL_error(L, "class not found: olua_ushort"); + } return 1; } OLUA_END_DECLS -static int _olua_uint___gc(lua_State *L) +static int _olua_fun_olua_uint___gc(lua_State *L) { olua_startinvoke(L); @@ -6956,7 +7109,7 @@ static int _olua_uint___gc(lua_State *L) return (int)ret; } -static int _olua_uint___index(lua_State *L) +static int _olua_fun_olua_uint___index(lua_State *L) { olua_startinvoke(L); @@ -6975,7 +7128,7 @@ static int _olua_uint___index(lua_State *L) return num_ret; } -static int _olua_uint___newindex(lua_State *L) +static int _olua_fun_olua_uint___newindex(lua_State *L) { olua_startinvoke(L); @@ -6995,7 +7148,7 @@ static int _olua_uint___newindex(lua_State *L) return 0; } -static int _olua_uint___olua_move(lua_State *L) +static int _olua_fun_olua_uint___olua_move(lua_State *L) { olua_startinvoke(L); @@ -7007,27 +7160,41 @@ static int _olua_uint___olua_move(lua_State *L) return 1; } -static int _olua_uint_assign(lua_State *L) +static int _olua_fun_olua_uint_buffer(lua_State *L) { olua_startinvoke(L); olua_uint *self = nullptr; - const char *arg1 = nullptr; /** data */ - size_t arg2 = 0; /** len */ olua_to_object(L, 1, &self, "olua.uint"); - olua_check_string(L, 2, &arg1); - olua_check_integer(L, 3, &arg2); - // void assign(const char *data, size_t len) - self->assign(arg1, arg2); + // @getter @name(buffer) @type(void *) olua_uint_t *buffer() + void *ret = self->buffer(); + int num_ret = olua_push_object(L, ret, "void *"); olua_endinvoke(L); - return 0; + return num_ret; } -static int _olua_uint_create$1(lua_State *L) +static int _olua_fun_olua_uint_length(lua_State *L) +{ + olua_startinvoke(L); + + olua_uint *self = nullptr; + + olua_to_object(L, 1, &self, "olua.uint"); + + // @getter @name(length) size_t length() + size_t ret = self->length(); + int num_ret = olua_push_integer(L, ret); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_olua_uint_new$1(lua_State *L) { olua_startinvoke(L); @@ -7047,11 +7214,11 @@ static int _olua_uint_create$1(lua_State *L) return num_ret; } -static int _olua_uint_create$2(lua_State *L) +static int _olua_fun_olua_uint_new$2(lua_State *L) { olua_startinvoke(L); - // @postnew @name(new) static olua_uint *create(@optional size_t len) + // @postnew @name(new) static olua_uint *create() olua_uint *ret = olua_uint::create(); int num_ret = olua_push_object(L, ret, "olua.uint"); @@ -7063,28 +7230,28 @@ static int _olua_uint_create$2(lua_State *L) return num_ret; } -static int _olua_uint_create(lua_State *L) +static int _olua_fun_olua_uint_new(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 0) { - // @postnew @name(new) static olua_uint *create(@optional size_t len) - return _olua_uint_create$2(L); + // @postnew @name(new) static olua_uint *create() + return _olua_fun_olua_uint_new$2(L); } if (num_args == 1) { // if ((olua_is_integer(L, 1))) { // @postnew @name(new) static olua_uint *create(@optional size_t len) - return _olua_uint_create$1(L); + return _olua_fun_olua_uint_new$1(L); // } } - luaL_error(L, "method 'olua_uint::create' not support '%d' arguments", num_args); + luaL_error(L, "method 'olua_uint::new' not support '%d' arguments", num_args); return 0; } -static int _olua_uint_slice$1(lua_State *L) +static int _olua_fun_olua_uint_slice$1(lua_State *L) { olua_startinvoke(L); @@ -7108,7 +7275,7 @@ static int _olua_uint_slice$1(lua_State *L) return num_ret; } -static int _olua_uint_slice$2(lua_State *L) +static int _olua_fun_olua_uint_slice$2(lua_State *L) { olua_startinvoke(L); @@ -7118,7 +7285,7 @@ static int _olua_uint_slice$2(lua_State *L) olua_to_object(L, 1, &self, "olua.uint"); olua_check_integer(L, 2, &arg1); - // @postnew olua_uint *slice(size_t from, @optional size_t to) + // @postnew olua_uint *slice(size_t from) olua_uint *ret = self->slice(arg1); int num_ret = olua_push_object(L, ret, "olua.uint"); @@ -7130,21 +7297,21 @@ static int _olua_uint_slice$2(lua_State *L) return num_ret; } -static int _olua_uint_slice(lua_State *L) +static int _olua_fun_olua_uint_slice(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_integer(L, 2))) { - // @postnew olua_uint *slice(size_t from, @optional size_t to) - return _olua_uint_slice$2(L); + // @postnew olua_uint *slice(size_t from) + return _olua_fun_olua_uint_slice$2(L); // } } if (num_args == 2) { // if ((olua_is_integer(L, 2)) && (olua_is_integer(L, 3))) { // @postnew olua_uint *slice(size_t from, @optional size_t to) - return _olua_uint_slice$1(L); + return _olua_fun_olua_uint_slice$1(L); // } } @@ -7153,7 +7320,7 @@ static int _olua_uint_slice(lua_State *L) return 0; } -static int _olua_uint_sub$1(lua_State *L) +static int _olua_fun_olua_uint_sub$1(lua_State *L) { olua_startinvoke(L); @@ -7177,7 +7344,7 @@ static int _olua_uint_sub$1(lua_State *L) return num_ret; } -static int _olua_uint_sub$2(lua_State *L) +static int _olua_fun_olua_uint_sub$2(lua_State *L) { olua_startinvoke(L); @@ -7187,7 +7354,7 @@ static int _olua_uint_sub$2(lua_State *L) olua_to_object(L, 1, &self, "olua.uint"); olua_check_integer(L, 2, &arg1); - // @postnew olua_uint *sub(size_t from, @optional size_t to) + // @postnew olua_uint *sub(size_t from) olua_uint *ret = self->sub(arg1); int num_ret = olua_push_object(L, ret, "olua.uint"); @@ -7199,21 +7366,21 @@ static int _olua_uint_sub$2(lua_State *L) return num_ret; } -static int _olua_uint_sub(lua_State *L) +static int _olua_fun_olua_uint_sub(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_integer(L, 2))) { - // @postnew olua_uint *sub(size_t from, @optional size_t to) - return _olua_uint_sub$2(L); + // @postnew olua_uint *sub(size_t from) + return _olua_fun_olua_uint_sub$2(L); // } } if (num_args == 2) { // if ((olua_is_integer(L, 2)) && (olua_is_integer(L, 3))) { // @postnew olua_uint *sub(size_t from, @optional size_t to) - return _olua_uint_sub$1(L); + return _olua_fun_olua_uint_sub$1(L); // } } @@ -7222,7 +7389,7 @@ static int _olua_uint_sub(lua_State *L) return 0; } -static int _olua_uint_take(lua_State *L) +static int _olua_fun_olua_uint_take(lua_State *L) { olua_startinvoke(L); @@ -7239,7 +7406,7 @@ static int _olua_uint_take(lua_State *L) return num_ret; } -static int _olua_uint_tostring(lua_State *L) +static int _olua_fun_olua_uint_tostring(lua_State *L) { olua_startinvoke(L); @@ -7257,7 +7424,7 @@ static int _olua_uint_tostring(lua_State *L) return (int)ret; } -static int _olua_uint_length(lua_State *L) +static int _olua_fun_olua_uint_value$1(lua_State *L) { olua_startinvoke(L); @@ -7265,8 +7432,8 @@ static int _olua_uint_length(lua_State *L) olua_to_object(L, 1, &self, "olua.uint"); - // @getter @name(length) size_t length() - size_t ret = self->length(); + // @getter @name(value) const olua_uint_t &value() + const olua_uint_t &ret = self->value(); int num_ret = olua_push_integer(L, ret); olua_endinvoke(L); @@ -7274,81 +7441,76 @@ static int _olua_uint_length(lua_State *L) return num_ret; } -static int _olua_uint_rawdata(lua_State *L) +static int _olua_fun_olua_uint_value$2(lua_State *L) { olua_startinvoke(L); olua_uint *self = nullptr; + olua_uint_t arg1 = 0; /** v */ olua_to_object(L, 1, &self, "olua.uint"); + olua_check_integer(L, 2, &arg1); - // @getter @name(rawdata) void *rawdata() - void *ret = self->rawdata(); - int num_ret = olua_push_object(L, ret, "void *"); + // @setter @name(value) void value(const olua_uint_t &v) + self->value(arg1); olua_endinvoke(L); - return num_ret; + return 0; } -static int _olua_uint_size(lua_State *L) +static int _olua_fun_olua_uint_value(lua_State *L) { - olua_startinvoke(L); - - olua_uint *self = nullptr; + int num_args = lua_gettop(L) - 1; - olua_to_object(L, 1, &self, "olua.uint"); + if (num_args == 0) { + // @getter @name(value) const olua_uint_t &value() + return _olua_fun_olua_uint_value$1(L); + } - // @getter @name(sizeof) size_t size() - size_t ret = self->size(); - int num_ret = olua_push_integer(L, ret); + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // @setter @name(value) void value(const olua_uint_t &v) + return _olua_fun_olua_uint_value$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'olua_uint::value' not support '%d' arguments", num_args); - return num_ret; + return 0; } -static int _olua_uint_value(lua_State *L) +static int _olua_cls_olua_uint(lua_State *L) { - olua_startinvoke(L); - - olua_uint *self = nullptr; - - olua_to_object(L, 1, &self, "olua.uint"); - - // @getter @name(value) const olua_uint_t &value() - const olua_uint_t &ret = self->value(); - int num_ret = olua_push_integer(L, ret); - - olua_endinvoke(L); + oluacls_class(L, "olua.uint"); + oluacls_func(L, "__gc", _olua_fun_olua_uint___gc); + oluacls_func(L, "__index", _olua_fun_olua_uint___index); + oluacls_func(L, "__newindex", _olua_fun_olua_uint___newindex); + oluacls_func(L, "__olua_move", _olua_fun_olua_uint___olua_move); + oluacls_func(L, "new", _olua_fun_olua_uint_new); + oluacls_func(L, "slice", _olua_fun_olua_uint_slice); + oluacls_func(L, "sub", _olua_fun_olua_uint_sub); + oluacls_func(L, "take", _olua_fun_olua_uint_take); + oluacls_func(L, "tostring", _olua_fun_olua_uint_tostring); + oluacls_prop(L, "buffer", _olua_fun_olua_uint_buffer, nullptr); + oluacls_prop(L, "length", _olua_fun_olua_uint_length, nullptr); + oluacls_prop(L, "value", _olua_fun_olua_uint_value, _olua_fun_olua_uint_value); - return num_ret; + return 1; } OLUA_BEGIN_DECLS OLUA_LIB int luaopen_olua_uint(lua_State *L) { - oluacls_class(L, "olua.uint"); - oluacls_func(L, "__gc", _olua_uint___gc); - oluacls_func(L, "__index", _olua_uint___index); - oluacls_func(L, "__newindex", _olua_uint___newindex); - oluacls_func(L, "__olua_move", _olua_uint___olua_move); - oluacls_func(L, "assign", _olua_uint_assign); - oluacls_func(L, "new", _olua_uint_create); - oluacls_func(L, "slice", _olua_uint_slice); - oluacls_func(L, "sub", _olua_uint_sub); - oluacls_func(L, "take", _olua_uint_take); - oluacls_func(L, "tostring", _olua_uint_tostring); - oluacls_prop(L, "length", _olua_uint_length, _olua_uint_length); - oluacls_prop(L, "rawdata", _olua_uint_rawdata, nullptr); - oluacls_prop(L, "sizeof", _olua_uint_size, nullptr); - oluacls_prop(L, "value", _olua_uint_value, _olua_uint_value); - + olua_require(L, "types", luaopen_types); + if (!olua_getclass(L, "olua.uint")) { + luaL_error(L, "class not found: olua_uint"); + } return 1; } OLUA_END_DECLS -static int _olua_ulong___gc(lua_State *L) +static int _olua_fun_olua_ulong___gc(lua_State *L) { olua_startinvoke(L); @@ -7364,7 +7526,7 @@ static int _olua_ulong___gc(lua_State *L) return (int)ret; } -static int _olua_ulong___index(lua_State *L) +static int _olua_fun_olua_ulong___index(lua_State *L) { olua_startinvoke(L); @@ -7383,7 +7545,7 @@ static int _olua_ulong___index(lua_State *L) return num_ret; } -static int _olua_ulong___newindex(lua_State *L) +static int _olua_fun_olua_ulong___newindex(lua_State *L) { olua_startinvoke(L); @@ -7403,7 +7565,7 @@ static int _olua_ulong___newindex(lua_State *L) return 0; } -static int _olua_ulong___olua_move(lua_State *L) +static int _olua_fun_olua_ulong___olua_move(lua_State *L) { olua_startinvoke(L); @@ -7415,27 +7577,41 @@ static int _olua_ulong___olua_move(lua_State *L) return 1; } -static int _olua_ulong_assign(lua_State *L) +static int _olua_fun_olua_ulong_buffer(lua_State *L) { olua_startinvoke(L); olua_ulong *self = nullptr; - const char *arg1 = nullptr; /** data */ - size_t arg2 = 0; /** len */ olua_to_object(L, 1, &self, "olua.ulong"); - olua_check_string(L, 2, &arg1); - olua_check_integer(L, 3, &arg2); - // void assign(const char *data, size_t len) - self->assign(arg1, arg2); + // @getter @name(buffer) @type(void *) olua_ulong_t *buffer() + void *ret = self->buffer(); + int num_ret = olua_push_object(L, ret, "void *"); olua_endinvoke(L); - return 0; + return num_ret; } -static int _olua_ulong_create$1(lua_State *L) +static int _olua_fun_olua_ulong_length(lua_State *L) +{ + olua_startinvoke(L); + + olua_ulong *self = nullptr; + + olua_to_object(L, 1, &self, "olua.ulong"); + + // @getter @name(length) size_t length() + size_t ret = self->length(); + int num_ret = olua_push_integer(L, ret); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_olua_ulong_new$1(lua_State *L) { olua_startinvoke(L); @@ -7455,11 +7631,11 @@ static int _olua_ulong_create$1(lua_State *L) return num_ret; } -static int _olua_ulong_create$2(lua_State *L) +static int _olua_fun_olua_ulong_new$2(lua_State *L) { olua_startinvoke(L); - // @postnew @name(new) static olua_ulong *create(@optional size_t len) + // @postnew @name(new) static olua_ulong *create() olua_ulong *ret = olua_ulong::create(); int num_ret = olua_push_object(L, ret, "olua.ulong"); @@ -7471,28 +7647,28 @@ static int _olua_ulong_create$2(lua_State *L) return num_ret; } -static int _olua_ulong_create(lua_State *L) +static int _olua_fun_olua_ulong_new(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 0) { - // @postnew @name(new) static olua_ulong *create(@optional size_t len) - return _olua_ulong_create$2(L); + // @postnew @name(new) static olua_ulong *create() + return _olua_fun_olua_ulong_new$2(L); } if (num_args == 1) { // if ((olua_is_integer(L, 1))) { // @postnew @name(new) static olua_ulong *create(@optional size_t len) - return _olua_ulong_create$1(L); + return _olua_fun_olua_ulong_new$1(L); // } } - luaL_error(L, "method 'olua_ulong::create' not support '%d' arguments", num_args); + luaL_error(L, "method 'olua_ulong::new' not support '%d' arguments", num_args); return 0; } -static int _olua_ulong_slice$1(lua_State *L) +static int _olua_fun_olua_ulong_slice$1(lua_State *L) { olua_startinvoke(L); @@ -7516,7 +7692,7 @@ static int _olua_ulong_slice$1(lua_State *L) return num_ret; } -static int _olua_ulong_slice$2(lua_State *L) +static int _olua_fun_olua_ulong_slice$2(lua_State *L) { olua_startinvoke(L); @@ -7526,7 +7702,7 @@ static int _olua_ulong_slice$2(lua_State *L) olua_to_object(L, 1, &self, "olua.ulong"); olua_check_integer(L, 2, &arg1); - // @postnew olua_ulong *slice(size_t from, @optional size_t to) + // @postnew olua_ulong *slice(size_t from) olua_ulong *ret = self->slice(arg1); int num_ret = olua_push_object(L, ret, "olua.ulong"); @@ -7538,21 +7714,21 @@ static int _olua_ulong_slice$2(lua_State *L) return num_ret; } -static int _olua_ulong_slice(lua_State *L) +static int _olua_fun_olua_ulong_slice(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_integer(L, 2))) { - // @postnew olua_ulong *slice(size_t from, @optional size_t to) - return _olua_ulong_slice$2(L); + // @postnew olua_ulong *slice(size_t from) + return _olua_fun_olua_ulong_slice$2(L); // } } if (num_args == 2) { // if ((olua_is_integer(L, 2)) && (olua_is_integer(L, 3))) { // @postnew olua_ulong *slice(size_t from, @optional size_t to) - return _olua_ulong_slice$1(L); + return _olua_fun_olua_ulong_slice$1(L); // } } @@ -7561,7 +7737,7 @@ static int _olua_ulong_slice(lua_State *L) return 0; } -static int _olua_ulong_sub$1(lua_State *L) +static int _olua_fun_olua_ulong_sub$1(lua_State *L) { olua_startinvoke(L); @@ -7585,7 +7761,7 @@ static int _olua_ulong_sub$1(lua_State *L) return num_ret; } -static int _olua_ulong_sub$2(lua_State *L) +static int _olua_fun_olua_ulong_sub$2(lua_State *L) { olua_startinvoke(L); @@ -7595,7 +7771,7 @@ static int _olua_ulong_sub$2(lua_State *L) olua_to_object(L, 1, &self, "olua.ulong"); olua_check_integer(L, 2, &arg1); - // @postnew olua_ulong *sub(size_t from, @optional size_t to) + // @postnew olua_ulong *sub(size_t from) olua_ulong *ret = self->sub(arg1); int num_ret = olua_push_object(L, ret, "olua.ulong"); @@ -7607,21 +7783,21 @@ static int _olua_ulong_sub$2(lua_State *L) return num_ret; } -static int _olua_ulong_sub(lua_State *L) +static int _olua_fun_olua_ulong_sub(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_integer(L, 2))) { - // @postnew olua_ulong *sub(size_t from, @optional size_t to) - return _olua_ulong_sub$2(L); + // @postnew olua_ulong *sub(size_t from) + return _olua_fun_olua_ulong_sub$2(L); // } } if (num_args == 2) { // if ((olua_is_integer(L, 2)) && (olua_is_integer(L, 3))) { // @postnew olua_ulong *sub(size_t from, @optional size_t to) - return _olua_ulong_sub$1(L); + return _olua_fun_olua_ulong_sub$1(L); // } } @@ -7630,7 +7806,7 @@ static int _olua_ulong_sub(lua_State *L) return 0; } -static int _olua_ulong_take(lua_State *L) +static int _olua_fun_olua_ulong_take(lua_State *L) { olua_startinvoke(L); @@ -7647,7 +7823,7 @@ static int _olua_ulong_take(lua_State *L) return num_ret; } -static int _olua_ulong_tostring(lua_State *L) +static int _olua_fun_olua_ulong_tostring(lua_State *L) { olua_startinvoke(L); @@ -7665,7 +7841,7 @@ static int _olua_ulong_tostring(lua_State *L) return (int)ret; } -static int _olua_ulong_length(lua_State *L) +static int _olua_fun_olua_ulong_value$1(lua_State *L) { olua_startinvoke(L); @@ -7673,8 +7849,8 @@ static int _olua_ulong_length(lua_State *L) olua_to_object(L, 1, &self, "olua.ulong"); - // @getter @name(length) size_t length() - size_t ret = self->length(); + // @getter @name(value) const olua_ulong_t &value() + const olua_ulong_t &ret = self->value(); int num_ret = olua_push_integer(L, ret); olua_endinvoke(L); @@ -7682,81 +7858,76 @@ static int _olua_ulong_length(lua_State *L) return num_ret; } -static int _olua_ulong_rawdata(lua_State *L) +static int _olua_fun_olua_ulong_value$2(lua_State *L) { olua_startinvoke(L); olua_ulong *self = nullptr; + olua_ulong_t arg1 = 0; /** v */ olua_to_object(L, 1, &self, "olua.ulong"); + olua_check_integer(L, 2, &arg1); - // @getter @name(rawdata) void *rawdata() - void *ret = self->rawdata(); - int num_ret = olua_push_object(L, ret, "void *"); + // @setter @name(value) void value(const olua_ulong_t &v) + self->value(arg1); olua_endinvoke(L); - return num_ret; + return 0; } -static int _olua_ulong_size(lua_State *L) +static int _olua_fun_olua_ulong_value(lua_State *L) { - olua_startinvoke(L); - - olua_ulong *self = nullptr; + int num_args = lua_gettop(L) - 1; - olua_to_object(L, 1, &self, "olua.ulong"); + if (num_args == 0) { + // @getter @name(value) const olua_ulong_t &value() + return _olua_fun_olua_ulong_value$1(L); + } - // @getter @name(sizeof) size_t size() - size_t ret = self->size(); - int num_ret = olua_push_integer(L, ret); + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // @setter @name(value) void value(const olua_ulong_t &v) + return _olua_fun_olua_ulong_value$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'olua_ulong::value' not support '%d' arguments", num_args); - return num_ret; + return 0; } -static int _olua_ulong_value(lua_State *L) +static int _olua_cls_olua_ulong(lua_State *L) { - olua_startinvoke(L); - - olua_ulong *self = nullptr; - - olua_to_object(L, 1, &self, "olua.ulong"); - - // @getter @name(value) const olua_ulong_t &value() - const olua_ulong_t &ret = self->value(); - int num_ret = olua_push_integer(L, ret); - - olua_endinvoke(L); + oluacls_class(L, "olua.ulong"); + oluacls_func(L, "__gc", _olua_fun_olua_ulong___gc); + oluacls_func(L, "__index", _olua_fun_olua_ulong___index); + oluacls_func(L, "__newindex", _olua_fun_olua_ulong___newindex); + oluacls_func(L, "__olua_move", _olua_fun_olua_ulong___olua_move); + oluacls_func(L, "new", _olua_fun_olua_ulong_new); + oluacls_func(L, "slice", _olua_fun_olua_ulong_slice); + oluacls_func(L, "sub", _olua_fun_olua_ulong_sub); + oluacls_func(L, "take", _olua_fun_olua_ulong_take); + oluacls_func(L, "tostring", _olua_fun_olua_ulong_tostring); + oluacls_prop(L, "buffer", _olua_fun_olua_ulong_buffer, nullptr); + oluacls_prop(L, "length", _olua_fun_olua_ulong_length, nullptr); + oluacls_prop(L, "value", _olua_fun_olua_ulong_value, _olua_fun_olua_ulong_value); - return num_ret; + return 1; } OLUA_BEGIN_DECLS OLUA_LIB int luaopen_olua_ulong(lua_State *L) { - oluacls_class(L, "olua.ulong"); - oluacls_func(L, "__gc", _olua_ulong___gc); - oluacls_func(L, "__index", _olua_ulong___index); - oluacls_func(L, "__newindex", _olua_ulong___newindex); - oluacls_func(L, "__olua_move", _olua_ulong___olua_move); - oluacls_func(L, "assign", _olua_ulong_assign); - oluacls_func(L, "new", _olua_ulong_create); - oluacls_func(L, "slice", _olua_ulong_slice); - oluacls_func(L, "sub", _olua_ulong_sub); - oluacls_func(L, "take", _olua_ulong_take); - oluacls_func(L, "tostring", _olua_ulong_tostring); - oluacls_prop(L, "length", _olua_ulong_length, _olua_ulong_length); - oluacls_prop(L, "rawdata", _olua_ulong_rawdata, nullptr); - oluacls_prop(L, "sizeof", _olua_ulong_size, nullptr); - oluacls_prop(L, "value", _olua_ulong_value, _olua_ulong_value); - + olua_require(L, "types", luaopen_types); + if (!olua_getclass(L, "olua.ulong")) { + luaL_error(L, "class not found: olua_ulong"); + } return 1; } OLUA_END_DECLS -static int _olua_ullong___gc(lua_State *L) +static int _olua_fun_olua_ullong___gc(lua_State *L) { olua_startinvoke(L); @@ -7772,7 +7943,7 @@ static int _olua_ullong___gc(lua_State *L) return (int)ret; } -static int _olua_ullong___index(lua_State *L) +static int _olua_fun_olua_ullong___index(lua_State *L) { olua_startinvoke(L); @@ -7791,7 +7962,7 @@ static int _olua_ullong___index(lua_State *L) return num_ret; } -static int _olua_ullong___newindex(lua_State *L) +static int _olua_fun_olua_ullong___newindex(lua_State *L) { olua_startinvoke(L); @@ -7811,7 +7982,7 @@ static int _olua_ullong___newindex(lua_State *L) return 0; } -static int _olua_ullong___olua_move(lua_State *L) +static int _olua_fun_olua_ullong___olua_move(lua_State *L) { olua_startinvoke(L); @@ -7823,27 +7994,41 @@ static int _olua_ullong___olua_move(lua_State *L) return 1; } -static int _olua_ullong_assign(lua_State *L) +static int _olua_fun_olua_ullong_buffer(lua_State *L) { olua_startinvoke(L); olua_ullong *self = nullptr; - const char *arg1 = nullptr; /** data */ - size_t arg2 = 0; /** len */ olua_to_object(L, 1, &self, "olua.ullong"); - olua_check_string(L, 2, &arg1); - olua_check_integer(L, 3, &arg2); - // void assign(const char *data, size_t len) - self->assign(arg1, arg2); + // @getter @name(buffer) @type(void *) olua_ullong_t *buffer() + void *ret = self->buffer(); + int num_ret = olua_push_object(L, ret, "void *"); olua_endinvoke(L); - return 0; + return num_ret; } -static int _olua_ullong_create$1(lua_State *L) +static int _olua_fun_olua_ullong_length(lua_State *L) +{ + olua_startinvoke(L); + + olua_ullong *self = nullptr; + + olua_to_object(L, 1, &self, "olua.ullong"); + + // @getter @name(length) size_t length() + size_t ret = self->length(); + int num_ret = olua_push_integer(L, ret); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_olua_ullong_new$1(lua_State *L) { olua_startinvoke(L); @@ -7863,11 +8048,11 @@ static int _olua_ullong_create$1(lua_State *L) return num_ret; } -static int _olua_ullong_create$2(lua_State *L) +static int _olua_fun_olua_ullong_new$2(lua_State *L) { olua_startinvoke(L); - // @postnew @name(new) static olua_ullong *create(@optional size_t len) + // @postnew @name(new) static olua_ullong *create() olua_ullong *ret = olua_ullong::create(); int num_ret = olua_push_object(L, ret, "olua.ullong"); @@ -7879,28 +8064,28 @@ static int _olua_ullong_create$2(lua_State *L) return num_ret; } -static int _olua_ullong_create(lua_State *L) +static int _olua_fun_olua_ullong_new(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 0) { - // @postnew @name(new) static olua_ullong *create(@optional size_t len) - return _olua_ullong_create$2(L); + // @postnew @name(new) static olua_ullong *create() + return _olua_fun_olua_ullong_new$2(L); } if (num_args == 1) { // if ((olua_is_integer(L, 1))) { // @postnew @name(new) static olua_ullong *create(@optional size_t len) - return _olua_ullong_create$1(L); + return _olua_fun_olua_ullong_new$1(L); // } } - luaL_error(L, "method 'olua_ullong::create' not support '%d' arguments", num_args); + luaL_error(L, "method 'olua_ullong::new' not support '%d' arguments", num_args); return 0; } -static int _olua_ullong_slice$1(lua_State *L) +static int _olua_fun_olua_ullong_slice$1(lua_State *L) { olua_startinvoke(L); @@ -7924,7 +8109,7 @@ static int _olua_ullong_slice$1(lua_State *L) return num_ret; } -static int _olua_ullong_slice$2(lua_State *L) +static int _olua_fun_olua_ullong_slice$2(lua_State *L) { olua_startinvoke(L); @@ -7934,7 +8119,7 @@ static int _olua_ullong_slice$2(lua_State *L) olua_to_object(L, 1, &self, "olua.ullong"); olua_check_integer(L, 2, &arg1); - // @postnew olua_ullong *slice(size_t from, @optional size_t to) + // @postnew olua_ullong *slice(size_t from) olua_ullong *ret = self->slice(arg1); int num_ret = olua_push_object(L, ret, "olua.ullong"); @@ -7946,21 +8131,21 @@ static int _olua_ullong_slice$2(lua_State *L) return num_ret; } -static int _olua_ullong_slice(lua_State *L) +static int _olua_fun_olua_ullong_slice(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_integer(L, 2))) { - // @postnew olua_ullong *slice(size_t from, @optional size_t to) - return _olua_ullong_slice$2(L); + // @postnew olua_ullong *slice(size_t from) + return _olua_fun_olua_ullong_slice$2(L); // } } if (num_args == 2) { // if ((olua_is_integer(L, 2)) && (olua_is_integer(L, 3))) { // @postnew olua_ullong *slice(size_t from, @optional size_t to) - return _olua_ullong_slice$1(L); + return _olua_fun_olua_ullong_slice$1(L); // } } @@ -7969,7 +8154,7 @@ static int _olua_ullong_slice(lua_State *L) return 0; } -static int _olua_ullong_sub$1(lua_State *L) +static int _olua_fun_olua_ullong_sub$1(lua_State *L) { olua_startinvoke(L); @@ -7993,7 +8178,7 @@ static int _olua_ullong_sub$1(lua_State *L) return num_ret; } -static int _olua_ullong_sub$2(lua_State *L) +static int _olua_fun_olua_ullong_sub$2(lua_State *L) { olua_startinvoke(L); @@ -8003,7 +8188,7 @@ static int _olua_ullong_sub$2(lua_State *L) olua_to_object(L, 1, &self, "olua.ullong"); olua_check_integer(L, 2, &arg1); - // @postnew olua_ullong *sub(size_t from, @optional size_t to) + // @postnew olua_ullong *sub(size_t from) olua_ullong *ret = self->sub(arg1); int num_ret = olua_push_object(L, ret, "olua.ullong"); @@ -8015,21 +8200,21 @@ static int _olua_ullong_sub$2(lua_State *L) return num_ret; } -static int _olua_ullong_sub(lua_State *L) +static int _olua_fun_olua_ullong_sub(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_integer(L, 2))) { - // @postnew olua_ullong *sub(size_t from, @optional size_t to) - return _olua_ullong_sub$2(L); + // @postnew olua_ullong *sub(size_t from) + return _olua_fun_olua_ullong_sub$2(L); // } } if (num_args == 2) { // if ((olua_is_integer(L, 2)) && (olua_is_integer(L, 3))) { // @postnew olua_ullong *sub(size_t from, @optional size_t to) - return _olua_ullong_sub$1(L); + return _olua_fun_olua_ullong_sub$1(L); // } } @@ -8038,7 +8223,7 @@ static int _olua_ullong_sub(lua_State *L) return 0; } -static int _olua_ullong_take(lua_State *L) +static int _olua_fun_olua_ullong_take(lua_State *L) { olua_startinvoke(L); @@ -8055,7 +8240,7 @@ static int _olua_ullong_take(lua_State *L) return num_ret; } -static int _olua_ullong_tostring(lua_State *L) +static int _olua_fun_olua_ullong_tostring(lua_State *L) { olua_startinvoke(L); @@ -8073,7 +8258,7 @@ static int _olua_ullong_tostring(lua_State *L) return (int)ret; } -static int _olua_ullong_length(lua_State *L) +static int _olua_fun_olua_ullong_value$1(lua_State *L) { olua_startinvoke(L); @@ -8081,8 +8266,8 @@ static int _olua_ullong_length(lua_State *L) olua_to_object(L, 1, &self, "olua.ullong"); - // @getter @name(length) size_t length() - size_t ret = self->length(); + // @getter @name(value) const olua_ullong_t &value() + const olua_ullong_t &ret = self->value(); int num_ret = olua_push_integer(L, ret); olua_endinvoke(L); @@ -8090,81 +8275,76 @@ static int _olua_ullong_length(lua_State *L) return num_ret; } -static int _olua_ullong_rawdata(lua_State *L) +static int _olua_fun_olua_ullong_value$2(lua_State *L) { olua_startinvoke(L); olua_ullong *self = nullptr; + olua_ullong_t arg1 = 0; /** v */ olua_to_object(L, 1, &self, "olua.ullong"); + olua_check_integer(L, 2, &arg1); - // @getter @name(rawdata) void *rawdata() - void *ret = self->rawdata(); - int num_ret = olua_push_object(L, ret, "void *"); + // @setter @name(value) void value(const olua_ullong_t &v) + self->value(arg1); olua_endinvoke(L); - return num_ret; + return 0; } -static int _olua_ullong_size(lua_State *L) +static int _olua_fun_olua_ullong_value(lua_State *L) { - olua_startinvoke(L); - - olua_ullong *self = nullptr; + int num_args = lua_gettop(L) - 1; - olua_to_object(L, 1, &self, "olua.ullong"); + if (num_args == 0) { + // @getter @name(value) const olua_ullong_t &value() + return _olua_fun_olua_ullong_value$1(L); + } - // @getter @name(sizeof) size_t size() - size_t ret = self->size(); - int num_ret = olua_push_integer(L, ret); + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // @setter @name(value) void value(const olua_ullong_t &v) + return _olua_fun_olua_ullong_value$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'olua_ullong::value' not support '%d' arguments", num_args); - return num_ret; + return 0; } -static int _olua_ullong_value(lua_State *L) +static int _olua_cls_olua_ullong(lua_State *L) { - olua_startinvoke(L); - - olua_ullong *self = nullptr; - - olua_to_object(L, 1, &self, "olua.ullong"); - - // @getter @name(value) const olua_ullong_t &value() - const olua_ullong_t &ret = self->value(); - int num_ret = olua_push_integer(L, ret); - - olua_endinvoke(L); + oluacls_class(L, "olua.ullong"); + oluacls_func(L, "__gc", _olua_fun_olua_ullong___gc); + oluacls_func(L, "__index", _olua_fun_olua_ullong___index); + oluacls_func(L, "__newindex", _olua_fun_olua_ullong___newindex); + oluacls_func(L, "__olua_move", _olua_fun_olua_ullong___olua_move); + oluacls_func(L, "new", _olua_fun_olua_ullong_new); + oluacls_func(L, "slice", _olua_fun_olua_ullong_slice); + oluacls_func(L, "sub", _olua_fun_olua_ullong_sub); + oluacls_func(L, "take", _olua_fun_olua_ullong_take); + oluacls_func(L, "tostring", _olua_fun_olua_ullong_tostring); + oluacls_prop(L, "buffer", _olua_fun_olua_ullong_buffer, nullptr); + oluacls_prop(L, "length", _olua_fun_olua_ullong_length, nullptr); + oluacls_prop(L, "value", _olua_fun_olua_ullong_value, _olua_fun_olua_ullong_value); - return num_ret; + return 1; } OLUA_BEGIN_DECLS OLUA_LIB int luaopen_olua_ullong(lua_State *L) { - oluacls_class(L, "olua.ullong"); - oluacls_func(L, "__gc", _olua_ullong___gc); - oluacls_func(L, "__index", _olua_ullong___index); - oluacls_func(L, "__newindex", _olua_ullong___newindex); - oluacls_func(L, "__olua_move", _olua_ullong___olua_move); - oluacls_func(L, "assign", _olua_ullong_assign); - oluacls_func(L, "new", _olua_ullong_create); - oluacls_func(L, "slice", _olua_ullong_slice); - oluacls_func(L, "sub", _olua_ullong_sub); - oluacls_func(L, "take", _olua_ullong_take); - oluacls_func(L, "tostring", _olua_ullong_tostring); - oluacls_prop(L, "length", _olua_ullong_length, _olua_ullong_length); - oluacls_prop(L, "rawdata", _olua_ullong_rawdata, nullptr); - oluacls_prop(L, "sizeof", _olua_ullong_size, nullptr); - oluacls_prop(L, "value", _olua_ullong_value, _olua_ullong_value); - + olua_require(L, "types", luaopen_types); + if (!olua_getclass(L, "olua.ullong")) { + luaL_error(L, "class not found: olua_ullong"); + } return 1; } OLUA_END_DECLS -static int _olua_float___gc(lua_State *L) +static int _olua_fun_olua_float___gc(lua_State *L) { olua_startinvoke(L); @@ -8180,7 +8360,7 @@ static int _olua_float___gc(lua_State *L) return (int)ret; } -static int _olua_float___index(lua_State *L) +static int _olua_fun_olua_float___index(lua_State *L) { olua_startinvoke(L); @@ -8199,7 +8379,7 @@ static int _olua_float___index(lua_State *L) return num_ret; } -static int _olua_float___newindex(lua_State *L) +static int _olua_fun_olua_float___newindex(lua_State *L) { olua_startinvoke(L); @@ -8219,7 +8399,7 @@ static int _olua_float___newindex(lua_State *L) return 0; } -static int _olua_float___olua_move(lua_State *L) +static int _olua_fun_olua_float___olua_move(lua_State *L) { olua_startinvoke(L); @@ -8231,27 +8411,41 @@ static int _olua_float___olua_move(lua_State *L) return 1; } -static int _olua_float_assign(lua_State *L) +static int _olua_fun_olua_float_buffer(lua_State *L) +{ + olua_startinvoke(L); + + olua_float *self = nullptr; + + olua_to_object(L, 1, &self, "olua.float"); + + // @getter @name(buffer) @type(void *) olua_float_t *buffer() + void *ret = self->buffer(); + int num_ret = olua_push_object(L, ret, "void *"); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_olua_float_length(lua_State *L) { olua_startinvoke(L); olua_float *self = nullptr; - const char *arg1 = nullptr; /** data */ - size_t arg2 = 0; /** len */ olua_to_object(L, 1, &self, "olua.float"); - olua_check_string(L, 2, &arg1); - olua_check_integer(L, 3, &arg2); - // void assign(const char *data, size_t len) - self->assign(arg1, arg2); + // @getter @name(length) size_t length() + size_t ret = self->length(); + int num_ret = olua_push_integer(L, ret); olua_endinvoke(L); - return 0; + return num_ret; } -static int _olua_float_create$1(lua_State *L) +static int _olua_fun_olua_float_new$1(lua_State *L) { olua_startinvoke(L); @@ -8271,11 +8465,11 @@ static int _olua_float_create$1(lua_State *L) return num_ret; } -static int _olua_float_create$2(lua_State *L) +static int _olua_fun_olua_float_new$2(lua_State *L) { olua_startinvoke(L); - // @postnew @name(new) static olua_float *create(@optional size_t len) + // @postnew @name(new) static olua_float *create() olua_float *ret = olua_float::create(); int num_ret = olua_push_object(L, ret, "olua.float"); @@ -8287,28 +8481,28 @@ static int _olua_float_create$2(lua_State *L) return num_ret; } -static int _olua_float_create(lua_State *L) +static int _olua_fun_olua_float_new(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 0) { - // @postnew @name(new) static olua_float *create(@optional size_t len) - return _olua_float_create$2(L); + // @postnew @name(new) static olua_float *create() + return _olua_fun_olua_float_new$2(L); } if (num_args == 1) { // if ((olua_is_integer(L, 1))) { // @postnew @name(new) static olua_float *create(@optional size_t len) - return _olua_float_create$1(L); + return _olua_fun_olua_float_new$1(L); // } } - luaL_error(L, "method 'olua_float::create' not support '%d' arguments", num_args); + luaL_error(L, "method 'olua_float::new' not support '%d' arguments", num_args); return 0; } -static int _olua_float_slice$1(lua_State *L) +static int _olua_fun_olua_float_slice$1(lua_State *L) { olua_startinvoke(L); @@ -8332,7 +8526,7 @@ static int _olua_float_slice$1(lua_State *L) return num_ret; } -static int _olua_float_slice$2(lua_State *L) +static int _olua_fun_olua_float_slice$2(lua_State *L) { olua_startinvoke(L); @@ -8342,7 +8536,7 @@ static int _olua_float_slice$2(lua_State *L) olua_to_object(L, 1, &self, "olua.float"); olua_check_integer(L, 2, &arg1); - // @postnew olua_float *slice(size_t from, @optional size_t to) + // @postnew olua_float *slice(size_t from) olua_float *ret = self->slice(arg1); int num_ret = olua_push_object(L, ret, "olua.float"); @@ -8354,21 +8548,21 @@ static int _olua_float_slice$2(lua_State *L) return num_ret; } -static int _olua_float_slice(lua_State *L) +static int _olua_fun_olua_float_slice(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_integer(L, 2))) { - // @postnew olua_float *slice(size_t from, @optional size_t to) - return _olua_float_slice$2(L); + // @postnew olua_float *slice(size_t from) + return _olua_fun_olua_float_slice$2(L); // } } if (num_args == 2) { // if ((olua_is_integer(L, 2)) && (olua_is_integer(L, 3))) { // @postnew olua_float *slice(size_t from, @optional size_t to) - return _olua_float_slice$1(L); + return _olua_fun_olua_float_slice$1(L); // } } @@ -8377,7 +8571,7 @@ static int _olua_float_slice(lua_State *L) return 0; } -static int _olua_float_sub$1(lua_State *L) +static int _olua_fun_olua_float_sub$1(lua_State *L) { olua_startinvoke(L); @@ -8401,7 +8595,7 @@ static int _olua_float_sub$1(lua_State *L) return num_ret; } -static int _olua_float_sub$2(lua_State *L) +static int _olua_fun_olua_float_sub$2(lua_State *L) { olua_startinvoke(L); @@ -8411,7 +8605,7 @@ static int _olua_float_sub$2(lua_State *L) olua_to_object(L, 1, &self, "olua.float"); olua_check_integer(L, 2, &arg1); - // @postnew olua_float *sub(size_t from, @optional size_t to) + // @postnew olua_float *sub(size_t from) olua_float *ret = self->sub(arg1); int num_ret = olua_push_object(L, ret, "olua.float"); @@ -8423,21 +8617,21 @@ static int _olua_float_sub$2(lua_State *L) return num_ret; } -static int _olua_float_sub(lua_State *L) +static int _olua_fun_olua_float_sub(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_integer(L, 2))) { - // @postnew olua_float *sub(size_t from, @optional size_t to) - return _olua_float_sub$2(L); + // @postnew olua_float *sub(size_t from) + return _olua_fun_olua_float_sub$2(L); // } } if (num_args == 2) { // if ((olua_is_integer(L, 2)) && (olua_is_integer(L, 3))) { // @postnew olua_float *sub(size_t from, @optional size_t to) - return _olua_float_sub$1(L); + return _olua_fun_olua_float_sub$1(L); // } } @@ -8446,7 +8640,7 @@ static int _olua_float_sub(lua_State *L) return 0; } -static int _olua_float_take(lua_State *L) +static int _olua_fun_olua_float_take(lua_State *L) { olua_startinvoke(L); @@ -8463,7 +8657,7 @@ static int _olua_float_take(lua_State *L) return num_ret; } -static int _olua_float_tostring(lua_State *L) +static int _olua_fun_olua_float_tostring(lua_State *L) { olua_startinvoke(L); @@ -8481,7 +8675,7 @@ static int _olua_float_tostring(lua_State *L) return (int)ret; } -static int _olua_float_length(lua_State *L) +static int _olua_fun_olua_float_value$1(lua_State *L) { olua_startinvoke(L); @@ -8489,90 +8683,85 @@ static int _olua_float_length(lua_State *L) olua_to_object(L, 1, &self, "olua.float"); - // @getter @name(length) size_t length() - size_t ret = self->length(); - int num_ret = olua_push_integer(L, ret); + // @getter @name(value) const olua_float_t &value() + const olua_float_t &ret = self->value(); + int num_ret = olua_push_number(L, ret); olua_endinvoke(L); return num_ret; } -static int _olua_float_rawdata(lua_State *L) +static int _olua_fun_olua_float_value$2(lua_State *L) { olua_startinvoke(L); olua_float *self = nullptr; + olua_float_t arg1 = 0; /** v */ olua_to_object(L, 1, &self, "olua.float"); + olua_check_number(L, 2, &arg1); - // @getter @name(rawdata) void *rawdata() - void *ret = self->rawdata(); - int num_ret = olua_push_object(L, ret, "void *"); + // @setter @name(value) void value(const olua_float_t &v) + self->value(arg1); olua_endinvoke(L); - return num_ret; + return 0; } -static int _olua_float_size(lua_State *L) +static int _olua_fun_olua_float_value(lua_State *L) { - olua_startinvoke(L); - - olua_float *self = nullptr; + int num_args = lua_gettop(L) - 1; - olua_to_object(L, 1, &self, "olua.float"); + if (num_args == 0) { + // @getter @name(value) const olua_float_t &value() + return _olua_fun_olua_float_value$1(L); + } - // @getter @name(sizeof) size_t size() - size_t ret = self->size(); - int num_ret = olua_push_integer(L, ret); + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // @setter @name(value) void value(const olua_float_t &v) + return _olua_fun_olua_float_value$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'olua_float::value' not support '%d' arguments", num_args); - return num_ret; + return 0; } -static int _olua_float_value(lua_State *L) +static int _olua_cls_olua_float(lua_State *L) { - olua_startinvoke(L); - - olua_float *self = nullptr; - - olua_to_object(L, 1, &self, "olua.float"); - - // @getter @name(value) const olua_float_t &value() - const olua_float_t &ret = self->value(); - int num_ret = olua_push_number(L, ret); - - olua_endinvoke(L); + oluacls_class(L, "olua.float"); + oluacls_func(L, "__gc", _olua_fun_olua_float___gc); + oluacls_func(L, "__index", _olua_fun_olua_float___index); + oluacls_func(L, "__newindex", _olua_fun_olua_float___newindex); + oluacls_func(L, "__olua_move", _olua_fun_olua_float___olua_move); + oluacls_func(L, "new", _olua_fun_olua_float_new); + oluacls_func(L, "slice", _olua_fun_olua_float_slice); + oluacls_func(L, "sub", _olua_fun_olua_float_sub); + oluacls_func(L, "take", _olua_fun_olua_float_take); + oluacls_func(L, "tostring", _olua_fun_olua_float_tostring); + oluacls_prop(L, "buffer", _olua_fun_olua_float_buffer, nullptr); + oluacls_prop(L, "length", _olua_fun_olua_float_length, nullptr); + oluacls_prop(L, "value", _olua_fun_olua_float_value, _olua_fun_olua_float_value); - return num_ret; + return 1; } OLUA_BEGIN_DECLS OLUA_LIB int luaopen_olua_float(lua_State *L) { - oluacls_class(L, "olua.float"); - oluacls_func(L, "__gc", _olua_float___gc); - oluacls_func(L, "__index", _olua_float___index); - oluacls_func(L, "__newindex", _olua_float___newindex); - oluacls_func(L, "__olua_move", _olua_float___olua_move); - oluacls_func(L, "assign", _olua_float_assign); - oluacls_func(L, "new", _olua_float_create); - oluacls_func(L, "slice", _olua_float_slice); - oluacls_func(L, "sub", _olua_float_sub); - oluacls_func(L, "take", _olua_float_take); - oluacls_func(L, "tostring", _olua_float_tostring); - oluacls_prop(L, "length", _olua_float_length, _olua_float_length); - oluacls_prop(L, "rawdata", _olua_float_rawdata, nullptr); - oluacls_prop(L, "sizeof", _olua_float_size, nullptr); - oluacls_prop(L, "value", _olua_float_value, _olua_float_value); - + olua_require(L, "types", luaopen_types); + if (!olua_getclass(L, "olua.float")) { + luaL_error(L, "class not found: olua_float"); + } return 1; } OLUA_END_DECLS -static int _olua_double___gc(lua_State *L) +static int _olua_fun_olua_double___gc(lua_State *L) { olua_startinvoke(L); @@ -8588,7 +8777,7 @@ static int _olua_double___gc(lua_State *L) return (int)ret; } -static int _olua_double___index(lua_State *L) +static int _olua_fun_olua_double___index(lua_State *L) { olua_startinvoke(L); @@ -8607,7 +8796,7 @@ static int _olua_double___index(lua_State *L) return num_ret; } -static int _olua_double___newindex(lua_State *L) +static int _olua_fun_olua_double___newindex(lua_State *L) { olua_startinvoke(L); @@ -8627,7 +8816,7 @@ static int _olua_double___newindex(lua_State *L) return 0; } -static int _olua_double___olua_move(lua_State *L) +static int _olua_fun_olua_double___olua_move(lua_State *L) { olua_startinvoke(L); @@ -8636,30 +8825,44 @@ static int _olua_double___olua_move(lua_State *L) olua_endinvoke(L); - return 1; + return 1; +} + +static int _olua_fun_olua_double_buffer(lua_State *L) +{ + olua_startinvoke(L); + + olua_double *self = nullptr; + + olua_to_object(L, 1, &self, "olua.double"); + + // @getter @name(buffer) @type(void *) olua_double_t *buffer() + void *ret = self->buffer(); + int num_ret = olua_push_object(L, ret, "void *"); + + olua_endinvoke(L); + + return num_ret; } -static int _olua_double_assign(lua_State *L) +static int _olua_fun_olua_double_length(lua_State *L) { olua_startinvoke(L); olua_double *self = nullptr; - const char *arg1 = nullptr; /** data */ - size_t arg2 = 0; /** len */ olua_to_object(L, 1, &self, "olua.double"); - olua_check_string(L, 2, &arg1); - olua_check_integer(L, 3, &arg2); - // void assign(const char *data, size_t len) - self->assign(arg1, arg2); + // @getter @name(length) size_t length() + size_t ret = self->length(); + int num_ret = olua_push_integer(L, ret); olua_endinvoke(L); - return 0; + return num_ret; } -static int _olua_double_create$1(lua_State *L) +static int _olua_fun_olua_double_new$1(lua_State *L) { olua_startinvoke(L); @@ -8679,11 +8882,11 @@ static int _olua_double_create$1(lua_State *L) return num_ret; } -static int _olua_double_create$2(lua_State *L) +static int _olua_fun_olua_double_new$2(lua_State *L) { olua_startinvoke(L); - // @postnew @name(new) static olua_double *create(@optional size_t len) + // @postnew @name(new) static olua_double *create() olua_double *ret = olua_double::create(); int num_ret = olua_push_object(L, ret, "olua.double"); @@ -8695,28 +8898,28 @@ static int _olua_double_create$2(lua_State *L) return num_ret; } -static int _olua_double_create(lua_State *L) +static int _olua_fun_olua_double_new(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 0) { - // @postnew @name(new) static olua_double *create(@optional size_t len) - return _olua_double_create$2(L); + // @postnew @name(new) static olua_double *create() + return _olua_fun_olua_double_new$2(L); } if (num_args == 1) { // if ((olua_is_integer(L, 1))) { // @postnew @name(new) static olua_double *create(@optional size_t len) - return _olua_double_create$1(L); + return _olua_fun_olua_double_new$1(L); // } } - luaL_error(L, "method 'olua_double::create' not support '%d' arguments", num_args); + luaL_error(L, "method 'olua_double::new' not support '%d' arguments", num_args); return 0; } -static int _olua_double_slice$1(lua_State *L) +static int _olua_fun_olua_double_slice$1(lua_State *L) { olua_startinvoke(L); @@ -8740,7 +8943,7 @@ static int _olua_double_slice$1(lua_State *L) return num_ret; } -static int _olua_double_slice$2(lua_State *L) +static int _olua_fun_olua_double_slice$2(lua_State *L) { olua_startinvoke(L); @@ -8750,7 +8953,7 @@ static int _olua_double_slice$2(lua_State *L) olua_to_object(L, 1, &self, "olua.double"); olua_check_integer(L, 2, &arg1); - // @postnew olua_double *slice(size_t from, @optional size_t to) + // @postnew olua_double *slice(size_t from) olua_double *ret = self->slice(arg1); int num_ret = olua_push_object(L, ret, "olua.double"); @@ -8762,21 +8965,21 @@ static int _olua_double_slice$2(lua_State *L) return num_ret; } -static int _olua_double_slice(lua_State *L) +static int _olua_fun_olua_double_slice(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_integer(L, 2))) { - // @postnew olua_double *slice(size_t from, @optional size_t to) - return _olua_double_slice$2(L); + // @postnew olua_double *slice(size_t from) + return _olua_fun_olua_double_slice$2(L); // } } if (num_args == 2) { // if ((olua_is_integer(L, 2)) && (olua_is_integer(L, 3))) { // @postnew olua_double *slice(size_t from, @optional size_t to) - return _olua_double_slice$1(L); + return _olua_fun_olua_double_slice$1(L); // } } @@ -8785,7 +8988,7 @@ static int _olua_double_slice(lua_State *L) return 0; } -static int _olua_double_sub$1(lua_State *L) +static int _olua_fun_olua_double_sub$1(lua_State *L) { olua_startinvoke(L); @@ -8809,7 +9012,7 @@ static int _olua_double_sub$1(lua_State *L) return num_ret; } -static int _olua_double_sub$2(lua_State *L) +static int _olua_fun_olua_double_sub$2(lua_State *L) { olua_startinvoke(L); @@ -8819,7 +9022,7 @@ static int _olua_double_sub$2(lua_State *L) olua_to_object(L, 1, &self, "olua.double"); olua_check_integer(L, 2, &arg1); - // @postnew olua_double *sub(size_t from, @optional size_t to) + // @postnew olua_double *sub(size_t from) olua_double *ret = self->sub(arg1); int num_ret = olua_push_object(L, ret, "olua.double"); @@ -8831,21 +9034,21 @@ static int _olua_double_sub$2(lua_State *L) return num_ret; } -static int _olua_double_sub(lua_State *L) +static int _olua_fun_olua_double_sub(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_integer(L, 2))) { - // @postnew olua_double *sub(size_t from, @optional size_t to) - return _olua_double_sub$2(L); + // @postnew olua_double *sub(size_t from) + return _olua_fun_olua_double_sub$2(L); // } } if (num_args == 2) { // if ((olua_is_integer(L, 2)) && (olua_is_integer(L, 3))) { // @postnew olua_double *sub(size_t from, @optional size_t to) - return _olua_double_sub$1(L); + return _olua_fun_olua_double_sub$1(L); // } } @@ -8854,7 +9057,7 @@ static int _olua_double_sub(lua_State *L) return 0; } -static int _olua_double_take(lua_State *L) +static int _olua_fun_olua_double_take(lua_State *L) { olua_startinvoke(L); @@ -8871,7 +9074,7 @@ static int _olua_double_take(lua_State *L) return num_ret; } -static int _olua_double_tostring(lua_State *L) +static int _olua_fun_olua_double_tostring(lua_State *L) { olua_startinvoke(L); @@ -8889,7 +9092,7 @@ static int _olua_double_tostring(lua_State *L) return (int)ret; } -static int _olua_double_length(lua_State *L) +static int _olua_fun_olua_double_value$1(lua_State *L) { olua_startinvoke(L); @@ -8897,90 +9100,85 @@ static int _olua_double_length(lua_State *L) olua_to_object(L, 1, &self, "olua.double"); - // @getter @name(length) size_t length() - size_t ret = self->length(); - int num_ret = olua_push_integer(L, ret); + // @getter @name(value) const olua_double_t &value() + const olua_double_t &ret = self->value(); + int num_ret = olua_push_number(L, ret); olua_endinvoke(L); return num_ret; } -static int _olua_double_rawdata(lua_State *L) +static int _olua_fun_olua_double_value$2(lua_State *L) { olua_startinvoke(L); olua_double *self = nullptr; + olua_double_t arg1 = 0; /** v */ olua_to_object(L, 1, &self, "olua.double"); + olua_check_number(L, 2, &arg1); - // @getter @name(rawdata) void *rawdata() - void *ret = self->rawdata(); - int num_ret = olua_push_object(L, ret, "void *"); + // @setter @name(value) void value(const olua_double_t &v) + self->value(arg1); olua_endinvoke(L); - return num_ret; + return 0; } -static int _olua_double_size(lua_State *L) +static int _olua_fun_olua_double_value(lua_State *L) { - olua_startinvoke(L); - - olua_double *self = nullptr; + int num_args = lua_gettop(L) - 1; - olua_to_object(L, 1, &self, "olua.double"); + if (num_args == 0) { + // @getter @name(value) const olua_double_t &value() + return _olua_fun_olua_double_value$1(L); + } - // @getter @name(sizeof) size_t size() - size_t ret = self->size(); - int num_ret = olua_push_integer(L, ret); + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // @setter @name(value) void value(const olua_double_t &v) + return _olua_fun_olua_double_value$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'olua_double::value' not support '%d' arguments", num_args); - return num_ret; + return 0; } -static int _olua_double_value(lua_State *L) +static int _olua_cls_olua_double(lua_State *L) { - olua_startinvoke(L); - - olua_double *self = nullptr; - - olua_to_object(L, 1, &self, "olua.double"); - - // @getter @name(value) const olua_double_t &value() - const olua_double_t &ret = self->value(); - int num_ret = olua_push_number(L, ret); - - olua_endinvoke(L); + oluacls_class(L, "olua.double"); + oluacls_func(L, "__gc", _olua_fun_olua_double___gc); + oluacls_func(L, "__index", _olua_fun_olua_double___index); + oluacls_func(L, "__newindex", _olua_fun_olua_double___newindex); + oluacls_func(L, "__olua_move", _olua_fun_olua_double___olua_move); + oluacls_func(L, "new", _olua_fun_olua_double_new); + oluacls_func(L, "slice", _olua_fun_olua_double_slice); + oluacls_func(L, "sub", _olua_fun_olua_double_sub); + oluacls_func(L, "take", _olua_fun_olua_double_take); + oluacls_func(L, "tostring", _olua_fun_olua_double_tostring); + oluacls_prop(L, "buffer", _olua_fun_olua_double_buffer, nullptr); + oluacls_prop(L, "length", _olua_fun_olua_double_length, nullptr); + oluacls_prop(L, "value", _olua_fun_olua_double_value, _olua_fun_olua_double_value); - return num_ret; + return 1; } OLUA_BEGIN_DECLS OLUA_LIB int luaopen_olua_double(lua_State *L) { - oluacls_class(L, "olua.double"); - oluacls_func(L, "__gc", _olua_double___gc); - oluacls_func(L, "__index", _olua_double___index); - oluacls_func(L, "__newindex", _olua_double___newindex); - oluacls_func(L, "__olua_move", _olua_double___olua_move); - oluacls_func(L, "assign", _olua_double_assign); - oluacls_func(L, "new", _olua_double_create); - oluacls_func(L, "slice", _olua_double_slice); - oluacls_func(L, "sub", _olua_double_sub); - oluacls_func(L, "take", _olua_double_take); - oluacls_func(L, "tostring", _olua_double_tostring); - oluacls_prop(L, "length", _olua_double_length, _olua_double_length); - oluacls_prop(L, "rawdata", _olua_double_rawdata, nullptr); - oluacls_prop(L, "sizeof", _olua_double_size, nullptr); - oluacls_prop(L, "value", _olua_double_value, _olua_double_value); - + olua_require(L, "types", luaopen_types); + if (!olua_getclass(L, "olua.double")) { + luaL_error(L, "class not found: olua_double"); + } return 1; } OLUA_END_DECLS -static int _olua_ldouble___gc(lua_State *L) +static int _olua_fun_olua_ldouble___gc(lua_State *L) { olua_startinvoke(L); @@ -8996,7 +9194,7 @@ static int _olua_ldouble___gc(lua_State *L) return (int)ret; } -static int _olua_ldouble___index(lua_State *L) +static int _olua_fun_olua_ldouble___index(lua_State *L) { olua_startinvoke(L); @@ -9015,7 +9213,7 @@ static int _olua_ldouble___index(lua_State *L) return num_ret; } -static int _olua_ldouble___newindex(lua_State *L) +static int _olua_fun_olua_ldouble___newindex(lua_State *L) { olua_startinvoke(L); @@ -9035,7 +9233,7 @@ static int _olua_ldouble___newindex(lua_State *L) return 0; } -static int _olua_ldouble___olua_move(lua_State *L) +static int _olua_fun_olua_ldouble___olua_move(lua_State *L) { olua_startinvoke(L); @@ -9047,27 +9245,41 @@ static int _olua_ldouble___olua_move(lua_State *L) return 1; } -static int _olua_ldouble_assign(lua_State *L) +static int _olua_fun_olua_ldouble_buffer(lua_State *L) { olua_startinvoke(L); olua_ldouble *self = nullptr; - const char *arg1 = nullptr; /** data */ - size_t arg2 = 0; /** len */ olua_to_object(L, 1, &self, "olua.ldouble"); - olua_check_string(L, 2, &arg1); - olua_check_integer(L, 3, &arg2); - // void assign(const char *data, size_t len) - self->assign(arg1, arg2); + // @getter @name(buffer) @type(void *) olua_ldouble_t *buffer() + void *ret = self->buffer(); + int num_ret = olua_push_object(L, ret, "void *"); olua_endinvoke(L); - return 0; + return num_ret; +} + +static int _olua_fun_olua_ldouble_length(lua_State *L) +{ + olua_startinvoke(L); + + olua_ldouble *self = nullptr; + + olua_to_object(L, 1, &self, "olua.ldouble"); + + // @getter @name(length) size_t length() + size_t ret = self->length(); + int num_ret = olua_push_integer(L, ret); + + olua_endinvoke(L); + + return num_ret; } -static int _olua_ldouble_create$1(lua_State *L) +static int _olua_fun_olua_ldouble_new$1(lua_State *L) { olua_startinvoke(L); @@ -9087,11 +9299,11 @@ static int _olua_ldouble_create$1(lua_State *L) return num_ret; } -static int _olua_ldouble_create$2(lua_State *L) +static int _olua_fun_olua_ldouble_new$2(lua_State *L) { olua_startinvoke(L); - // @postnew @name(new) static olua_ldouble *create(@optional size_t len) + // @postnew @name(new) static olua_ldouble *create() olua_ldouble *ret = olua_ldouble::create(); int num_ret = olua_push_object(L, ret, "olua.ldouble"); @@ -9103,28 +9315,28 @@ static int _olua_ldouble_create$2(lua_State *L) return num_ret; } -static int _olua_ldouble_create(lua_State *L) +static int _olua_fun_olua_ldouble_new(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 0) { - // @postnew @name(new) static olua_ldouble *create(@optional size_t len) - return _olua_ldouble_create$2(L); + // @postnew @name(new) static olua_ldouble *create() + return _olua_fun_olua_ldouble_new$2(L); } if (num_args == 1) { // if ((olua_is_integer(L, 1))) { // @postnew @name(new) static olua_ldouble *create(@optional size_t len) - return _olua_ldouble_create$1(L); + return _olua_fun_olua_ldouble_new$1(L); // } } - luaL_error(L, "method 'olua_ldouble::create' not support '%d' arguments", num_args); + luaL_error(L, "method 'olua_ldouble::new' not support '%d' arguments", num_args); return 0; } -static int _olua_ldouble_slice$1(lua_State *L) +static int _olua_fun_olua_ldouble_slice$1(lua_State *L) { olua_startinvoke(L); @@ -9148,7 +9360,7 @@ static int _olua_ldouble_slice$1(lua_State *L) return num_ret; } -static int _olua_ldouble_slice$2(lua_State *L) +static int _olua_fun_olua_ldouble_slice$2(lua_State *L) { olua_startinvoke(L); @@ -9158,7 +9370,7 @@ static int _olua_ldouble_slice$2(lua_State *L) olua_to_object(L, 1, &self, "olua.ldouble"); olua_check_integer(L, 2, &arg1); - // @postnew olua_ldouble *slice(size_t from, @optional size_t to) + // @postnew olua_ldouble *slice(size_t from) olua_ldouble *ret = self->slice(arg1); int num_ret = olua_push_object(L, ret, "olua.ldouble"); @@ -9170,21 +9382,21 @@ static int _olua_ldouble_slice$2(lua_State *L) return num_ret; } -static int _olua_ldouble_slice(lua_State *L) +static int _olua_fun_olua_ldouble_slice(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_integer(L, 2))) { - // @postnew olua_ldouble *slice(size_t from, @optional size_t to) - return _olua_ldouble_slice$2(L); + // @postnew olua_ldouble *slice(size_t from) + return _olua_fun_olua_ldouble_slice$2(L); // } } if (num_args == 2) { // if ((olua_is_integer(L, 2)) && (olua_is_integer(L, 3))) { // @postnew olua_ldouble *slice(size_t from, @optional size_t to) - return _olua_ldouble_slice$1(L); + return _olua_fun_olua_ldouble_slice$1(L); // } } @@ -9193,7 +9405,7 @@ static int _olua_ldouble_slice(lua_State *L) return 0; } -static int _olua_ldouble_sub$1(lua_State *L) +static int _olua_fun_olua_ldouble_sub$1(lua_State *L) { olua_startinvoke(L); @@ -9217,7 +9429,7 @@ static int _olua_ldouble_sub$1(lua_State *L) return num_ret; } -static int _olua_ldouble_sub$2(lua_State *L) +static int _olua_fun_olua_ldouble_sub$2(lua_State *L) { olua_startinvoke(L); @@ -9227,7 +9439,7 @@ static int _olua_ldouble_sub$2(lua_State *L) olua_to_object(L, 1, &self, "olua.ldouble"); olua_check_integer(L, 2, &arg1); - // @postnew olua_ldouble *sub(size_t from, @optional size_t to) + // @postnew olua_ldouble *sub(size_t from) olua_ldouble *ret = self->sub(arg1); int num_ret = olua_push_object(L, ret, "olua.ldouble"); @@ -9239,21 +9451,21 @@ static int _olua_ldouble_sub$2(lua_State *L) return num_ret; } -static int _olua_ldouble_sub(lua_State *L) +static int _olua_fun_olua_ldouble_sub(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_integer(L, 2))) { - // @postnew olua_ldouble *sub(size_t from, @optional size_t to) - return _olua_ldouble_sub$2(L); + // @postnew olua_ldouble *sub(size_t from) + return _olua_fun_olua_ldouble_sub$2(L); // } } if (num_args == 2) { // if ((olua_is_integer(L, 2)) && (olua_is_integer(L, 3))) { // @postnew olua_ldouble *sub(size_t from, @optional size_t to) - return _olua_ldouble_sub$1(L); + return _olua_fun_olua_ldouble_sub$1(L); // } } @@ -9262,7 +9474,7 @@ static int _olua_ldouble_sub(lua_State *L) return 0; } -static int _olua_ldouble_take(lua_State *L) +static int _olua_fun_olua_ldouble_take(lua_State *L) { olua_startinvoke(L); @@ -9279,7 +9491,7 @@ static int _olua_ldouble_take(lua_State *L) return num_ret; } -static int _olua_ldouble_tostring(lua_State *L) +static int _olua_fun_olua_ldouble_tostring(lua_State *L) { olua_startinvoke(L); @@ -9297,7 +9509,7 @@ static int _olua_ldouble_tostring(lua_State *L) return (int)ret; } -static int _olua_ldouble_length(lua_State *L) +static int _olua_fun_olua_ldouble_value$1(lua_State *L) { olua_startinvoke(L); @@ -9305,90 +9517,85 @@ static int _olua_ldouble_length(lua_State *L) olua_to_object(L, 1, &self, "olua.ldouble"); - // @getter @name(length) size_t length() - size_t ret = self->length(); - int num_ret = olua_push_integer(L, ret); + // @getter @name(value) const olua_ldouble_t &value() + const olua_ldouble_t &ret = self->value(); + int num_ret = olua_push_number(L, ret); olua_endinvoke(L); return num_ret; } -static int _olua_ldouble_rawdata(lua_State *L) +static int _olua_fun_olua_ldouble_value$2(lua_State *L) { olua_startinvoke(L); olua_ldouble *self = nullptr; + olua_ldouble_t arg1 = 0; /** v */ olua_to_object(L, 1, &self, "olua.ldouble"); + olua_check_number(L, 2, &arg1); - // @getter @name(rawdata) void *rawdata() - void *ret = self->rawdata(); - int num_ret = olua_push_object(L, ret, "void *"); + // @setter @name(value) void value(const olua_ldouble_t &v) + self->value(arg1); olua_endinvoke(L); - return num_ret; + return 0; } -static int _olua_ldouble_size(lua_State *L) +static int _olua_fun_olua_ldouble_value(lua_State *L) { - olua_startinvoke(L); - - olua_ldouble *self = nullptr; + int num_args = lua_gettop(L) - 1; - olua_to_object(L, 1, &self, "olua.ldouble"); + if (num_args == 0) { + // @getter @name(value) const olua_ldouble_t &value() + return _olua_fun_olua_ldouble_value$1(L); + } - // @getter @name(sizeof) size_t size() - size_t ret = self->size(); - int num_ret = olua_push_integer(L, ret); + if (num_args == 1) { + // if ((olua_is_number(L, 2))) { + // @setter @name(value) void value(const olua_ldouble_t &v) + return _olua_fun_olua_ldouble_value$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'olua_ldouble::value' not support '%d' arguments", num_args); - return num_ret; + return 0; } -static int _olua_ldouble_value(lua_State *L) +static int _olua_cls_olua_ldouble(lua_State *L) { - olua_startinvoke(L); - - olua_ldouble *self = nullptr; - - olua_to_object(L, 1, &self, "olua.ldouble"); - - // @getter @name(value) const olua_ldouble_t &value() - const olua_ldouble_t &ret = self->value(); - int num_ret = olua_push_number(L, ret); - - olua_endinvoke(L); + oluacls_class(L, "olua.ldouble"); + oluacls_func(L, "__gc", _olua_fun_olua_ldouble___gc); + oluacls_func(L, "__index", _olua_fun_olua_ldouble___index); + oluacls_func(L, "__newindex", _olua_fun_olua_ldouble___newindex); + oluacls_func(L, "__olua_move", _olua_fun_olua_ldouble___olua_move); + oluacls_func(L, "new", _olua_fun_olua_ldouble_new); + oluacls_func(L, "slice", _olua_fun_olua_ldouble_slice); + oluacls_func(L, "sub", _olua_fun_olua_ldouble_sub); + oluacls_func(L, "take", _olua_fun_olua_ldouble_take); + oluacls_func(L, "tostring", _olua_fun_olua_ldouble_tostring); + oluacls_prop(L, "buffer", _olua_fun_olua_ldouble_buffer, nullptr); + oluacls_prop(L, "length", _olua_fun_olua_ldouble_length, nullptr); + oluacls_prop(L, "value", _olua_fun_olua_ldouble_value, _olua_fun_olua_ldouble_value); - return num_ret; + return 1; } OLUA_BEGIN_DECLS OLUA_LIB int luaopen_olua_ldouble(lua_State *L) { - oluacls_class(L, "olua.ldouble"); - oluacls_func(L, "__gc", _olua_ldouble___gc); - oluacls_func(L, "__index", _olua_ldouble___index); - oluacls_func(L, "__newindex", _olua_ldouble___newindex); - oluacls_func(L, "__olua_move", _olua_ldouble___olua_move); - oluacls_func(L, "assign", _olua_ldouble_assign); - oluacls_func(L, "new", _olua_ldouble_create); - oluacls_func(L, "slice", _olua_ldouble_slice); - oluacls_func(L, "sub", _olua_ldouble_sub); - oluacls_func(L, "take", _olua_ldouble_take); - oluacls_func(L, "tostring", _olua_ldouble_tostring); - oluacls_prop(L, "length", _olua_ldouble_length, _olua_ldouble_length); - oluacls_prop(L, "rawdata", _olua_ldouble_rawdata, nullptr); - oluacls_prop(L, "sizeof", _olua_ldouble_size, nullptr); - oluacls_prop(L, "value", _olua_ldouble_value, _olua_ldouble_value); - + olua_require(L, "types", luaopen_types); + if (!olua_getclass(L, "olua.ldouble")) { + luaL_error(L, "class not found: olua_ldouble"); + } return 1; } OLUA_END_DECLS -static int _olua_size_t___gc(lua_State *L) +static int _olua_fun_olua_size_t___gc(lua_State *L) { olua_startinvoke(L); @@ -9404,7 +9611,7 @@ static int _olua_size_t___gc(lua_State *L) return (int)ret; } -static int _olua_size_t___index(lua_State *L) +static int _olua_fun_olua_size_t___index(lua_State *L) { olua_startinvoke(L); @@ -9423,7 +9630,7 @@ static int _olua_size_t___index(lua_State *L) return num_ret; } -static int _olua_size_t___newindex(lua_State *L) +static int _olua_fun_olua_size_t___newindex(lua_State *L) { olua_startinvoke(L); @@ -9443,7 +9650,7 @@ static int _olua_size_t___newindex(lua_State *L) return 0; } -static int _olua_size_t___olua_move(lua_State *L) +static int _olua_fun_olua_size_t___olua_move(lua_State *L) { olua_startinvoke(L); @@ -9455,27 +9662,41 @@ static int _olua_size_t___olua_move(lua_State *L) return 1; } -static int _olua_size_t_assign(lua_State *L) +static int _olua_fun_olua_size_t_buffer(lua_State *L) { olua_startinvoke(L); olua_size_t *self = nullptr; - const char *arg1 = nullptr; /** data */ - size_t arg2 = 0; /** len */ olua_to_object(L, 1, &self, "olua.size_t"); - olua_check_string(L, 2, &arg1); - olua_check_integer(L, 3, &arg2); - // void assign(const char *data, size_t len) - self->assign(arg1, arg2); + // @getter @name(buffer) @type(void *) size_t *buffer() + void *ret = self->buffer(); + int num_ret = olua_push_object(L, ret, "void *"); olua_endinvoke(L); - return 0; + return num_ret; } -static int _olua_size_t_create$1(lua_State *L) +static int _olua_fun_olua_size_t_length(lua_State *L) +{ + olua_startinvoke(L); + + olua_size_t *self = nullptr; + + olua_to_object(L, 1, &self, "olua.size_t"); + + // @getter @name(length) size_t length() + size_t ret = self->length(); + int num_ret = olua_push_integer(L, ret); + + olua_endinvoke(L); + + return num_ret; +} + +static int _olua_fun_olua_size_t_new$1(lua_State *L) { olua_startinvoke(L); @@ -9495,11 +9716,11 @@ static int _olua_size_t_create$1(lua_State *L) return num_ret; } -static int _olua_size_t_create$2(lua_State *L) +static int _olua_fun_olua_size_t_new$2(lua_State *L) { olua_startinvoke(L); - // @postnew @name(new) static olua_size_t *create(@optional size_t len) + // @postnew @name(new) static olua_size_t *create() olua_size_t *ret = olua_size_t::create(); int num_ret = olua_push_object(L, ret, "olua.size_t"); @@ -9511,28 +9732,28 @@ static int _olua_size_t_create$2(lua_State *L) return num_ret; } -static int _olua_size_t_create(lua_State *L) +static int _olua_fun_olua_size_t_new(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 0) { - // @postnew @name(new) static olua_size_t *create(@optional size_t len) - return _olua_size_t_create$2(L); + // @postnew @name(new) static olua_size_t *create() + return _olua_fun_olua_size_t_new$2(L); } if (num_args == 1) { // if ((olua_is_integer(L, 1))) { // @postnew @name(new) static olua_size_t *create(@optional size_t len) - return _olua_size_t_create$1(L); + return _olua_fun_olua_size_t_new$1(L); // } } - luaL_error(L, "method 'olua_size_t::create' not support '%d' arguments", num_args); + luaL_error(L, "method 'olua_size_t::new' not support '%d' arguments", num_args); return 0; } -static int _olua_size_t_slice$1(lua_State *L) +static int _olua_fun_olua_size_t_slice$1(lua_State *L) { olua_startinvoke(L); @@ -9556,7 +9777,7 @@ static int _olua_size_t_slice$1(lua_State *L) return num_ret; } -static int _olua_size_t_slice$2(lua_State *L) +static int _olua_fun_olua_size_t_slice$2(lua_State *L) { olua_startinvoke(L); @@ -9566,7 +9787,7 @@ static int _olua_size_t_slice$2(lua_State *L) olua_to_object(L, 1, &self, "olua.size_t"); olua_check_integer(L, 2, &arg1); - // @postnew olua_size_t *slice(size_t from, @optional size_t to) + // @postnew olua_size_t *slice(size_t from) olua_size_t *ret = self->slice(arg1); int num_ret = olua_push_object(L, ret, "olua.size_t"); @@ -9578,21 +9799,21 @@ static int _olua_size_t_slice$2(lua_State *L) return num_ret; } -static int _olua_size_t_slice(lua_State *L) +static int _olua_fun_olua_size_t_slice(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_integer(L, 2))) { - // @postnew olua_size_t *slice(size_t from, @optional size_t to) - return _olua_size_t_slice$2(L); + // @postnew olua_size_t *slice(size_t from) + return _olua_fun_olua_size_t_slice$2(L); // } } if (num_args == 2) { // if ((olua_is_integer(L, 2)) && (olua_is_integer(L, 3))) { // @postnew olua_size_t *slice(size_t from, @optional size_t to) - return _olua_size_t_slice$1(L); + return _olua_fun_olua_size_t_slice$1(L); // } } @@ -9601,7 +9822,7 @@ static int _olua_size_t_slice(lua_State *L) return 0; } -static int _olua_size_t_sub$1(lua_State *L) +static int _olua_fun_olua_size_t_sub$1(lua_State *L) { olua_startinvoke(L); @@ -9625,7 +9846,7 @@ static int _olua_size_t_sub$1(lua_State *L) return num_ret; } -static int _olua_size_t_sub$2(lua_State *L) +static int _olua_fun_olua_size_t_sub$2(lua_State *L) { olua_startinvoke(L); @@ -9635,7 +9856,7 @@ static int _olua_size_t_sub$2(lua_State *L) olua_to_object(L, 1, &self, "olua.size_t"); olua_check_integer(L, 2, &arg1); - // @postnew olua_size_t *sub(size_t from, @optional size_t to) + // @postnew olua_size_t *sub(size_t from) olua_size_t *ret = self->sub(arg1); int num_ret = olua_push_object(L, ret, "olua.size_t"); @@ -9647,21 +9868,21 @@ static int _olua_size_t_sub$2(lua_State *L) return num_ret; } -static int _olua_size_t_sub(lua_State *L) +static int _olua_fun_olua_size_t_sub(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_integer(L, 2))) { - // @postnew olua_size_t *sub(size_t from, @optional size_t to) - return _olua_size_t_sub$2(L); + // @postnew olua_size_t *sub(size_t from) + return _olua_fun_olua_size_t_sub$2(L); // } } if (num_args == 2) { // if ((olua_is_integer(L, 2)) && (olua_is_integer(L, 3))) { // @postnew olua_size_t *sub(size_t from, @optional size_t to) - return _olua_size_t_sub$1(L); + return _olua_fun_olua_size_t_sub$1(L); // } } @@ -9670,7 +9891,7 @@ static int _olua_size_t_sub(lua_State *L) return 0; } -static int _olua_size_t_take(lua_State *L) +static int _olua_fun_olua_size_t_take(lua_State *L) { olua_startinvoke(L); @@ -9687,7 +9908,7 @@ static int _olua_size_t_take(lua_State *L) return num_ret; } -static int _olua_size_t_tostring(lua_State *L) +static int _olua_fun_olua_size_t_tostring(lua_State *L) { olua_startinvoke(L); @@ -9705,7 +9926,7 @@ static int _olua_size_t_tostring(lua_State *L) return (int)ret; } -static int _olua_size_t_length(lua_State *L) +static int _olua_fun_olua_size_t_value$1(lua_State *L) { olua_startinvoke(L); @@ -9713,8 +9934,8 @@ static int _olua_size_t_length(lua_State *L) olua_to_object(L, 1, &self, "olua.size_t"); - // @getter @name(length) size_t length() - size_t ret = self->length(); + // @getter @name(value) const size_t &value() + const size_t &ret = self->value(); int num_ret = olua_push_integer(L, ret); olua_endinvoke(L); @@ -9722,81 +9943,76 @@ static int _olua_size_t_length(lua_State *L) return num_ret; } -static int _olua_size_t_rawdata(lua_State *L) +static int _olua_fun_olua_size_t_value$2(lua_State *L) { olua_startinvoke(L); olua_size_t *self = nullptr; + size_t arg1 = 0; /** v */ olua_to_object(L, 1, &self, "olua.size_t"); + olua_check_integer(L, 2, &arg1); - // @getter @name(rawdata) void *rawdata() - void *ret = self->rawdata(); - int num_ret = olua_push_object(L, ret, "void *"); + // @setter @name(value) void value(const size_t &v) + self->value(arg1); olua_endinvoke(L); - return num_ret; + return 0; } -static int _olua_size_t_size(lua_State *L) +static int _olua_fun_olua_size_t_value(lua_State *L) { - olua_startinvoke(L); - - olua_size_t *self = nullptr; + int num_args = lua_gettop(L) - 1; - olua_to_object(L, 1, &self, "olua.size_t"); + if (num_args == 0) { + // @getter @name(value) const size_t &value() + return _olua_fun_olua_size_t_value$1(L); + } - // @getter @name(sizeof) size_t size() - size_t ret = self->size(); - int num_ret = olua_push_integer(L, ret); + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // @setter @name(value) void value(const size_t &v) + return _olua_fun_olua_size_t_value$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'olua_size_t::value' not support '%d' arguments", num_args); - return num_ret; + return 0; } -static int _olua_size_t_value(lua_State *L) +static int _olua_cls_olua_size_t(lua_State *L) { - olua_startinvoke(L); - - olua_size_t *self = nullptr; - - olua_to_object(L, 1, &self, "olua.size_t"); - - // @getter @name(value) const size_t &value() - const size_t &ret = self->value(); - int num_ret = olua_push_integer(L, ret); - - olua_endinvoke(L); + oluacls_class(L, "olua.size_t"); + oluacls_func(L, "__gc", _olua_fun_olua_size_t___gc); + oluacls_func(L, "__index", _olua_fun_olua_size_t___index); + oluacls_func(L, "__newindex", _olua_fun_olua_size_t___newindex); + oluacls_func(L, "__olua_move", _olua_fun_olua_size_t___olua_move); + oluacls_func(L, "new", _olua_fun_olua_size_t_new); + oluacls_func(L, "slice", _olua_fun_olua_size_t_slice); + oluacls_func(L, "sub", _olua_fun_olua_size_t_sub); + oluacls_func(L, "take", _olua_fun_olua_size_t_take); + oluacls_func(L, "tostring", _olua_fun_olua_size_t_tostring); + oluacls_prop(L, "buffer", _olua_fun_olua_size_t_buffer, nullptr); + oluacls_prop(L, "length", _olua_fun_olua_size_t_length, nullptr); + oluacls_prop(L, "value", _olua_fun_olua_size_t_value, _olua_fun_olua_size_t_value); - return num_ret; + return 1; } OLUA_BEGIN_DECLS OLUA_LIB int luaopen_olua_size_t(lua_State *L) { - oluacls_class(L, "olua.size_t"); - oluacls_func(L, "__gc", _olua_size_t___gc); - oluacls_func(L, "__index", _olua_size_t___index); - oluacls_func(L, "__newindex", _olua_size_t___newindex); - oluacls_func(L, "__olua_move", _olua_size_t___olua_move); - oluacls_func(L, "assign", _olua_size_t_assign); - oluacls_func(L, "new", _olua_size_t_create); - oluacls_func(L, "slice", _olua_size_t_slice); - oluacls_func(L, "sub", _olua_size_t_sub); - oluacls_func(L, "take", _olua_size_t_take); - oluacls_func(L, "tostring", _olua_size_t_tostring); - oluacls_prop(L, "length", _olua_size_t_length, _olua_size_t_length); - oluacls_prop(L, "rawdata", _olua_size_t_rawdata, nullptr); - oluacls_prop(L, "sizeof", _olua_size_t_size, nullptr); - oluacls_prop(L, "value", _olua_size_t_value, _olua_size_t_value); - + olua_require(L, "types", luaopen_types); + if (!olua_getclass(L, "olua.size_t")) { + luaL_error(L, "class not found: olua_size_t"); + } return 1; } OLUA_END_DECLS -static int _olua_ssize_t___gc(lua_State *L) +static int _olua_fun_olua_ssize_t___gc(lua_State *L) { olua_startinvoke(L); @@ -9812,7 +10028,7 @@ static int _olua_ssize_t___gc(lua_State *L) return (int)ret; } -static int _olua_ssize_t___index(lua_State *L) +static int _olua_fun_olua_ssize_t___index(lua_State *L) { olua_startinvoke(L); @@ -9831,7 +10047,7 @@ static int _olua_ssize_t___index(lua_State *L) return num_ret; } -static int _olua_ssize_t___newindex(lua_State *L) +static int _olua_fun_olua_ssize_t___newindex(lua_State *L) { olua_startinvoke(L); @@ -9851,7 +10067,7 @@ static int _olua_ssize_t___newindex(lua_State *L) return 0; } -static int _olua_ssize_t___olua_move(lua_State *L) +static int _olua_fun_olua_ssize_t___olua_move(lua_State *L) { olua_startinvoke(L); @@ -9863,27 +10079,41 @@ static int _olua_ssize_t___olua_move(lua_State *L) return 1; } -static int _olua_ssize_t_assign(lua_State *L) +static int _olua_fun_olua_ssize_t_buffer(lua_State *L) { olua_startinvoke(L); olua_ssize_t *self = nullptr; - const char *arg1 = nullptr; /** data */ - size_t arg2 = 0; /** len */ olua_to_object(L, 1, &self, "olua.ssize_t"); - olua_check_string(L, 2, &arg1); - olua_check_integer(L, 3, &arg2); - // void assign(const char *data, size_t len) - self->assign(arg1, arg2); + // @getter @name(buffer) @type(void *) ssize_t *buffer() + void *ret = self->buffer(); + int num_ret = olua_push_object(L, ret, "void *"); olua_endinvoke(L); - return 0; + return num_ret; +} + +static int _olua_fun_olua_ssize_t_length(lua_State *L) +{ + olua_startinvoke(L); + + olua_ssize_t *self = nullptr; + + olua_to_object(L, 1, &self, "olua.ssize_t"); + + // @getter @name(length) size_t length() + size_t ret = self->length(); + int num_ret = olua_push_integer(L, ret); + + olua_endinvoke(L); + + return num_ret; } -static int _olua_ssize_t_create$1(lua_State *L) +static int _olua_fun_olua_ssize_t_new$1(lua_State *L) { olua_startinvoke(L); @@ -9903,11 +10133,11 @@ static int _olua_ssize_t_create$1(lua_State *L) return num_ret; } -static int _olua_ssize_t_create$2(lua_State *L) +static int _olua_fun_olua_ssize_t_new$2(lua_State *L) { olua_startinvoke(L); - // @postnew @name(new) static olua_ssize_t *create(@optional size_t len) + // @postnew @name(new) static olua_ssize_t *create() olua_ssize_t *ret = olua_ssize_t::create(); int num_ret = olua_push_object(L, ret, "olua.ssize_t"); @@ -9919,28 +10149,28 @@ static int _olua_ssize_t_create$2(lua_State *L) return num_ret; } -static int _olua_ssize_t_create(lua_State *L) +static int _olua_fun_olua_ssize_t_new(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 0) { - // @postnew @name(new) static olua_ssize_t *create(@optional size_t len) - return _olua_ssize_t_create$2(L); + // @postnew @name(new) static olua_ssize_t *create() + return _olua_fun_olua_ssize_t_new$2(L); } if (num_args == 1) { // if ((olua_is_integer(L, 1))) { // @postnew @name(new) static olua_ssize_t *create(@optional size_t len) - return _olua_ssize_t_create$1(L); + return _olua_fun_olua_ssize_t_new$1(L); // } } - luaL_error(L, "method 'olua_ssize_t::create' not support '%d' arguments", num_args); + luaL_error(L, "method 'olua_ssize_t::new' not support '%d' arguments", num_args); return 0; } -static int _olua_ssize_t_slice$1(lua_State *L) +static int _olua_fun_olua_ssize_t_slice$1(lua_State *L) { olua_startinvoke(L); @@ -9964,7 +10194,7 @@ static int _olua_ssize_t_slice$1(lua_State *L) return num_ret; } -static int _olua_ssize_t_slice$2(lua_State *L) +static int _olua_fun_olua_ssize_t_slice$2(lua_State *L) { olua_startinvoke(L); @@ -9974,7 +10204,7 @@ static int _olua_ssize_t_slice$2(lua_State *L) olua_to_object(L, 1, &self, "olua.ssize_t"); olua_check_integer(L, 2, &arg1); - // @postnew olua_ssize_t *slice(size_t from, @optional size_t to) + // @postnew olua_ssize_t *slice(size_t from) olua_ssize_t *ret = self->slice(arg1); int num_ret = olua_push_object(L, ret, "olua.ssize_t"); @@ -9986,21 +10216,21 @@ static int _olua_ssize_t_slice$2(lua_State *L) return num_ret; } -static int _olua_ssize_t_slice(lua_State *L) +static int _olua_fun_olua_ssize_t_slice(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_integer(L, 2))) { - // @postnew olua_ssize_t *slice(size_t from, @optional size_t to) - return _olua_ssize_t_slice$2(L); + // @postnew olua_ssize_t *slice(size_t from) + return _olua_fun_olua_ssize_t_slice$2(L); // } } if (num_args == 2) { // if ((olua_is_integer(L, 2)) && (olua_is_integer(L, 3))) { // @postnew olua_ssize_t *slice(size_t from, @optional size_t to) - return _olua_ssize_t_slice$1(L); + return _olua_fun_olua_ssize_t_slice$1(L); // } } @@ -10009,7 +10239,7 @@ static int _olua_ssize_t_slice(lua_State *L) return 0; } -static int _olua_ssize_t_sub$1(lua_State *L) +static int _olua_fun_olua_ssize_t_sub$1(lua_State *L) { olua_startinvoke(L); @@ -10033,7 +10263,7 @@ static int _olua_ssize_t_sub$1(lua_State *L) return num_ret; } -static int _olua_ssize_t_sub$2(lua_State *L) +static int _olua_fun_olua_ssize_t_sub$2(lua_State *L) { olua_startinvoke(L); @@ -10043,7 +10273,7 @@ static int _olua_ssize_t_sub$2(lua_State *L) olua_to_object(L, 1, &self, "olua.ssize_t"); olua_check_integer(L, 2, &arg1); - // @postnew olua_ssize_t *sub(size_t from, @optional size_t to) + // @postnew olua_ssize_t *sub(size_t from) olua_ssize_t *ret = self->sub(arg1); int num_ret = olua_push_object(L, ret, "olua.ssize_t"); @@ -10055,21 +10285,21 @@ static int _olua_ssize_t_sub$2(lua_State *L) return num_ret; } -static int _olua_ssize_t_sub(lua_State *L) +static int _olua_fun_olua_ssize_t_sub(lua_State *L) { int num_args = lua_gettop(L) - 1; if (num_args == 1) { // if ((olua_is_integer(L, 2))) { - // @postnew olua_ssize_t *sub(size_t from, @optional size_t to) - return _olua_ssize_t_sub$2(L); + // @postnew olua_ssize_t *sub(size_t from) + return _olua_fun_olua_ssize_t_sub$2(L); // } } if (num_args == 2) { // if ((olua_is_integer(L, 2)) && (olua_is_integer(L, 3))) { // @postnew olua_ssize_t *sub(size_t from, @optional size_t to) - return _olua_ssize_t_sub$1(L); + return _olua_fun_olua_ssize_t_sub$1(L); // } } @@ -10078,7 +10308,7 @@ static int _olua_ssize_t_sub(lua_State *L) return 0; } -static int _olua_ssize_t_take(lua_State *L) +static int _olua_fun_olua_ssize_t_take(lua_State *L) { olua_startinvoke(L); @@ -10095,7 +10325,7 @@ static int _olua_ssize_t_take(lua_State *L) return num_ret; } -static int _olua_ssize_t_tostring(lua_State *L) +static int _olua_fun_olua_ssize_t_tostring(lua_State *L) { olua_startinvoke(L); @@ -10113,7 +10343,7 @@ static int _olua_ssize_t_tostring(lua_State *L) return (int)ret; } -static int _olua_ssize_t_length(lua_State *L) +static int _olua_fun_olua_ssize_t_value$1(lua_State *L) { olua_startinvoke(L); @@ -10121,8 +10351,8 @@ static int _olua_ssize_t_length(lua_State *L) olua_to_object(L, 1, &self, "olua.ssize_t"); - // @getter @name(length) size_t length() - size_t ret = self->length(); + // @getter @name(value) const ssize_t &value() + const ssize_t &ret = self->value(); int num_ret = olua_push_integer(L, ret); olua_endinvoke(L); @@ -10130,76 +10360,71 @@ static int _olua_ssize_t_length(lua_State *L) return num_ret; } -static int _olua_ssize_t_rawdata(lua_State *L) +static int _olua_fun_olua_ssize_t_value$2(lua_State *L) { olua_startinvoke(L); olua_ssize_t *self = nullptr; + ssize_t arg1 = 0; /** v */ olua_to_object(L, 1, &self, "olua.ssize_t"); + olua_check_integer(L, 2, &arg1); - // @getter @name(rawdata) void *rawdata() - void *ret = self->rawdata(); - int num_ret = olua_push_object(L, ret, "void *"); + // @setter @name(value) void value(const ssize_t &v) + self->value(arg1); olua_endinvoke(L); - return num_ret; + return 0; } -static int _olua_ssize_t_size(lua_State *L) +static int _olua_fun_olua_ssize_t_value(lua_State *L) { - olua_startinvoke(L); - - olua_ssize_t *self = nullptr; + int num_args = lua_gettop(L) - 1; - olua_to_object(L, 1, &self, "olua.ssize_t"); + if (num_args == 0) { + // @getter @name(value) const ssize_t &value() + return _olua_fun_olua_ssize_t_value$1(L); + } - // @getter @name(sizeof) size_t size() - size_t ret = self->size(); - int num_ret = olua_push_integer(L, ret); + if (num_args == 1) { + // if ((olua_is_integer(L, 2))) { + // @setter @name(value) void value(const ssize_t &v) + return _olua_fun_olua_ssize_t_value$2(L); + // } + } - olua_endinvoke(L); + luaL_error(L, "method 'olua_ssize_t::value' not support '%d' arguments", num_args); - return num_ret; + return 0; } -static int _olua_ssize_t_value(lua_State *L) +static int _olua_cls_olua_ssize_t(lua_State *L) { - olua_startinvoke(L); - - olua_ssize_t *self = nullptr; - - olua_to_object(L, 1, &self, "olua.ssize_t"); - - // @getter @name(value) const ssize_t &value() - const ssize_t &ret = self->value(); - int num_ret = olua_push_integer(L, ret); - - olua_endinvoke(L); + oluacls_class(L, "olua.ssize_t"); + oluacls_func(L, "__gc", _olua_fun_olua_ssize_t___gc); + oluacls_func(L, "__index", _olua_fun_olua_ssize_t___index); + oluacls_func(L, "__newindex", _olua_fun_olua_ssize_t___newindex); + oluacls_func(L, "__olua_move", _olua_fun_olua_ssize_t___olua_move); + oluacls_func(L, "new", _olua_fun_olua_ssize_t_new); + oluacls_func(L, "slice", _olua_fun_olua_ssize_t_slice); + oluacls_func(L, "sub", _olua_fun_olua_ssize_t_sub); + oluacls_func(L, "take", _olua_fun_olua_ssize_t_take); + oluacls_func(L, "tostring", _olua_fun_olua_ssize_t_tostring); + oluacls_prop(L, "buffer", _olua_fun_olua_ssize_t_buffer, nullptr); + oluacls_prop(L, "length", _olua_fun_olua_ssize_t_length, nullptr); + oluacls_prop(L, "value", _olua_fun_olua_ssize_t_value, _olua_fun_olua_ssize_t_value); - return num_ret; + return 1; } OLUA_BEGIN_DECLS OLUA_LIB int luaopen_olua_ssize_t(lua_State *L) { - oluacls_class(L, "olua.ssize_t"); - oluacls_func(L, "__gc", _olua_ssize_t___gc); - oluacls_func(L, "__index", _olua_ssize_t___index); - oluacls_func(L, "__newindex", _olua_ssize_t___newindex); - oluacls_func(L, "__olua_move", _olua_ssize_t___olua_move); - oluacls_func(L, "assign", _olua_ssize_t_assign); - oluacls_func(L, "new", _olua_ssize_t_create); - oluacls_func(L, "slice", _olua_ssize_t_slice); - oluacls_func(L, "sub", _olua_ssize_t_sub); - oluacls_func(L, "take", _olua_ssize_t_take); - oluacls_func(L, "tostring", _olua_ssize_t_tostring); - oluacls_prop(L, "length", _olua_ssize_t_length, _olua_ssize_t_length); - oluacls_prop(L, "rawdata", _olua_ssize_t_rawdata, nullptr); - oluacls_prop(L, "sizeof", _olua_ssize_t_size, nullptr); - oluacls_prop(L, "value", _olua_ssize_t_value, _olua_ssize_t_value); - + olua_require(L, "types", luaopen_types); + if (!olua_getclass(L, "olua.ssize_t")) { + luaL_error(L, "class not found: olua_ssize_t"); + } return 1; } OLUA_END_DECLS @@ -10207,31 +10432,31 @@ OLUA_END_DECLS OLUA_BEGIN_DECLS OLUA_LIB int luaopen_types(lua_State *L) { - olua_require(L, "olua.bool", luaopen_olua_bool); - olua_require(L, "olua.string", luaopen_olua_string); - olua_require(L, "olua.int8_t", luaopen_olua_int8_t); - olua_require(L, "olua.int16_t", luaopen_olua_int16_t); - olua_require(L, "olua.int32_t", luaopen_olua_int32_t); - olua_require(L, "olua.int64_t", luaopen_olua_int64_t); - olua_require(L, "olua.uint8_t", luaopen_olua_uint8_t); - olua_require(L, "olua.uint16_t", luaopen_olua_uint16_t); - olua_require(L, "olua.uint32_t", luaopen_olua_uint32_t); - olua_require(L, "olua.uint64_t", luaopen_olua_uint64_t); - olua_require(L, "olua.char", luaopen_olua_char); - olua_require(L, "olua.short", luaopen_olua_short); - olua_require(L, "olua.int", luaopen_olua_int); - olua_require(L, "olua.long", luaopen_olua_long); - olua_require(L, "olua.llong", luaopen_olua_llong); - olua_require(L, "olua.uchar", luaopen_olua_uchar); - olua_require(L, "olua.ushort", luaopen_olua_ushort); - olua_require(L, "olua.uint", luaopen_olua_uint); - olua_require(L, "olua.ulong", luaopen_olua_ulong); - olua_require(L, "olua.ullong", luaopen_olua_ullong); - olua_require(L, "olua.float", luaopen_olua_float); - olua_require(L, "olua.double", luaopen_olua_double); - olua_require(L, "olua.ldouble", luaopen_olua_ldouble); - olua_require(L, "olua.size_t", luaopen_olua_size_t); - olua_require(L, "olua.ssize_t", luaopen_olua_ssize_t); + olua_require(L, "olua.bool", _olua_cls_olua_bool); + olua_require(L, "olua.string", _olua_cls_olua_string); + olua_require(L, "olua.int8", _olua_cls_olua_int8); + olua_require(L, "olua.int16", _olua_cls_olua_int16); + olua_require(L, "olua.int32", _olua_cls_olua_int32); + olua_require(L, "olua.int64", _olua_cls_olua_int64); + olua_require(L, "olua.uint8", _olua_cls_olua_uint8); + olua_require(L, "olua.uint16", _olua_cls_olua_uint16); + olua_require(L, "olua.uint32", _olua_cls_olua_uint32); + olua_require(L, "olua.uint64", _olua_cls_olua_uint64); + olua_require(L, "olua.char", _olua_cls_olua_char); + olua_require(L, "olua.short", _olua_cls_olua_short); + olua_require(L, "olua.int", _olua_cls_olua_int); + olua_require(L, "olua.long", _olua_cls_olua_long); + olua_require(L, "olua.llong", _olua_cls_olua_llong); + olua_require(L, "olua.uchar", _olua_cls_olua_uchar); + olua_require(L, "olua.ushort", _olua_cls_olua_ushort); + olua_require(L, "olua.uint", _olua_cls_olua_uint); + olua_require(L, "olua.ulong", _olua_cls_olua_ulong); + olua_require(L, "olua.ullong", _olua_cls_olua_ullong); + olua_require(L, "olua.float", _olua_cls_olua_float); + olua_require(L, "olua.double", _olua_cls_olua_double); + olua_require(L, "olua.ldouble", _olua_cls_olua_ldouble); + olua_require(L, "olua.size_t", _olua_cls_olua_size_t); + olua_require(L, "olua.ssize_t", _olua_cls_olua_ssize_t); return 0; } diff --git a/frameworks/cclua/src/lua-bindings/lua_types.h b/frameworks/cclua/src/lua-bindings/lua_types.h index 24ba6cad..888c7b0c 100644 --- a/frameworks/cclua/src/lua-bindings/lua_types.h +++ b/frameworks/cclua/src/lua-bindings/lua_types.h @@ -1,5 +1,5 @@ // -// AUTO BUILD, DON'T MODIFY! +// AUTO GENERATED, DO NOT MODIFY! // #ifndef __AUTO_GEN_LUA_TYPES_H__ #define __AUTO_GEN_LUA_TYPES_H__ diff --git a/frameworks/cclua/src/olua/olua.c b/frameworks/cclua/src/olua/olua.c index 744e63d6..30437011 100644 --- a/frameworks/cclua/src/olua/olua.c +++ b/frameworks/cclua/src/olua/olua.c @@ -46,6 +46,8 @@ #define OLUA_VMENV ".olua.vmenv" #define OLUA_REF_FMT ".olua.ref.%s" +#define OLUA_GET_NAME ".olua.getname" + #define registry_rawgeti(L, f) olua_rawgeti(L, LUA_REGISTRYINDEX, (f)) #define registry_rawgetf(L, f) olua_rawgetf(L, LUA_REGISTRYINDEX, (f)) #define registry_rawsetf(L, f) olua_rawsetf(L, LUA_REGISTRYINDEX, (f)) @@ -541,7 +543,7 @@ OLUA_API void olua_printobj(lua_State *L, const char *tag, int idx) env->objcount, olua_objstring(L, idx), luaobj, - luaobj->self ? olua_optfieldstring(L, idx, "name", "") : "", + luaobj->self ? olua_optfieldstring(L, idx, OLUA_GET_NAME, "") : "", tobitstr(luaobj->flags, bitstr)); olua_print(L, buf); } @@ -908,9 +910,9 @@ static void aux_changeref(lua_State *L, int idx, const char *name, int obj, int lua_settop(L, top); return; } + olua_getreftable(L, idx, name); if (flags & OLUA_REF_TABLE) { olua_assert(olua_istable(L, obj), "expect table"); - olua_getreftable(L, idx, name); lua_pushnil(L); while (lua_next(L, obj)) { if (olua_isuserdata(L, -2)) { @@ -929,7 +931,6 @@ static void aux_changeref(lua_State *L, int idx, const char *name, int obj, int } } else { olua_assert(olua_isuserdata(L, obj), "expect userdata"); - olua_getreftable(L, idx, name); lua_pushvalue(L, obj); lua_pushvalue(L, top + 1); // L: reftable obj obj|nil @@ -1070,7 +1071,7 @@ static int cls_metamethod(lua_State *L) ); if (luaobj->self && len < max_len) { snprintf(buf + len, max_len - len, ",%s", - olua_optfieldstring(L, 2, "name", "")); + olua_optfieldstring(L, 2, OLUA_GET_NAME, "")); len = strlen(buf); } } @@ -1226,10 +1227,10 @@ OLUA_API void oluacls_class(lua_State *L, const char *cls, const char *supercls) if (olua_strequal(supercls, OLUA_VOIDCLS)) { olua_require(L, "void *", luaopen_voidp); olua_require(L, "enum *", luaopen_enum); - olua_require(L, "olua", luaopen_olua); + olua_require(L, "olua.c", luaopen_olua); olua_getmetatable(L, OLUA_VOIDCLS); lua_replace(L, -2); - olua_debug_assert(lua_istable(L, -1), "class 'void *' not found"); + olua_assert(lua_istable(L, -1), "class 'void *' not found"); } else { luaL_error(L, "super class not found: %s => %s", cls, supercls); } @@ -1705,7 +1706,6 @@ int luaopen_olua(lua_State *L) }; luaL_newlib(L, lib); lua_pushvalue(L, -1); - olua_setglobal(L, "olua"); return 1; } @@ -1722,26 +1722,24 @@ static int l_voidp_tostring(lua_State *L) static int l_voidp_getname(lua_State *L) { - lua_pushstring(L, "name"); - olua_getvariable(L, 1); + lua_getmetatable(L, 1); + lua_getfield(L, -1, OLUA_CKEY_GET); + if (lua_getfield(L, -1, "name") == LUA_TFUNCTION) { + lua_getfield(L, 1, "name"); + return 1; + } else { + return 0; + } return 1; } -static int l_voidp_setname(lua_State *L) -{ - lua_pushstring(L, "name"); - lua_insert(L, 2); - olua_setvariable(L, 1); - return 0; -} - int luaopen_voidp(lua_State *L) { oluacls_class(L, OLUA_VOIDCLS, NULL); oluacls_func(L, "__gc", l_voidp_stub); oluacls_func(L, "__eq", l_voidp_stub); oluacls_func(L, "__tostring", l_voidp_tostring); - oluacls_prop(L, "name", l_voidp_getname, l_voidp_setname); + oluacls_prop(L, OLUA_GET_NAME, l_voidp_getname, NULL); return 1; } @@ -1952,7 +1950,7 @@ OLUA_API lua_State *olua_mainthread(lua_State *L) mt = lua_tothread(L, -1); lua_pop(L, 1); } else { - olua_assert(L, "main thread not found"); + printf("main thread not found, set 'olua.CAPTURE_MAINTHREAD = true' and export again!\n"); } return mt; } diff --git a/frameworks/cclua/src/olua/olua.h b/frameworks/cclua/src/olua/olua.h index 6b72eaa4..83171547 100644 --- a/frameworks/cclua/src/olua/olua.h +++ b/frameworks/cclua/src/olua/olua.h @@ -62,14 +62,6 @@ OLUA_BEGIN_DECLS #endif #endif // olua_assert -#ifndef olua_debug_assert -#ifdef OLUA_DEBUG -#define olua_debug_assert(e, msg) assert((e) && (msg)) -#else -#define olua_debug_assert(e, msg) ((void)0) -#endif -#endif // olua_debug_assert - #define olua_noapi(api) static_assert(false, #api" is not defined") #if !defined(olua_likely) @@ -86,11 +78,15 @@ OLUA_BEGIN_DECLS #define OLUA_API extern #endif +#ifndef OLUA_LIB #ifdef _WIN32 #define OLUA_LIB __declspec(dllexport) +#elif defined(__cplusplus) +#define OLUA_LIB __attribute__((visibility ("default"))) #else #define OLUA_LIB extern -#endif +#endif // _WIN32 +#endif // OLUA_LIB // olua config file: https://codetypes.com/posts/c505b168/ #ifdef OLUA_AUTOCONF diff --git a/frameworks/cclua/src/olua/olua.hpp b/frameworks/cclua/src/olua/olua.hpp index b36d7bb6..a70879ee 100644 --- a/frameworks/cclua/src/olua/olua.hpp +++ b/frameworks/cclua/src/olua/olua.hpp @@ -226,29 +226,42 @@ OLUA_END_DECLS template inline void olua_registerluatype(lua_State *L, const char *cls) { - olua_registerluatype(L, typeid(T).name(), cls); + const char *cpptype = typeid(T).name(); + const char *last = olua_getluatype(L, cpptype); + if (last) { + if (last[0] != '*') { + lua_pushfstring(L, "*%s", last); + olua_registerluatype(L, cpptype, lua_tostring(L, -1)); + lua_pop(L, 1); + } + } else { + olua_registerluatype(L, cpptype, cls); + } } template const char *olua_getluatype(lua_State *L, const T *obj, const char *cls) { - const char *preferred; + const char *preferred = NULL; // try obj RTTI if (olua_likely(obj)) { preferred = olua_getluatype(L, typeid(*obj).name()); - if (olua_likely(preferred)) { - return preferred; - } } - + // try class RTTI - preferred = olua_getluatype(L, typeid(T).name()); + if (olua_unlikely(!preferred)) { + preferred = olua_getluatype(L, typeid(T).name()); + } + if (olua_likely(preferred)) { + if (preferred[0] == '*') { + preferred = cls == NULL ? (preferred + 1) : cls; + } return preferred; + } else { + return cls; } - - return cls; } template <> inline @@ -568,50 +581,44 @@ int olua_push_enum(lua_State *L, T value) static inline bool olua_is_object(lua_State *L, int idx, const char *cls) { - olua_debug_assert(cls, "cls is null"); return olua_isa(L, idx, cls); } template inline void olua_check_object(lua_State *L, int idx, T **value, const char *cls) { - olua_debug_assert(cls, "cls is null"); *value = (T *)olua_checkobj(L, idx, cls); } template inline void olua_to_object(lua_State *L, int idx, T **value, const char *cls) { - olua_debug_assert(cls, "cls is null"); *value = (T *)olua_toobj(L, idx, cls); } template inline void olua_check_object(lua_State *L, int idx, T *value, const char *cls) { - olua_debug_assert(cls, "cls is null"); *value = *(T *)olua_checkobj(L, idx, cls); } template inline int olua_push_object(lua_State *L, const T *value, const char *cls) { - olua_debug_assert(cls, "cls is null"); return olua_pushobj(L, value, cls); } template ::value, bool> = true> inline int olua_push_object(lua_State *L, const T &value, const char *cls) { - olua_debug_assert(cls, "cls is null"); return olua_pushobj(L, &value, cls); } -template ::value, bool> = true> inline -int olua_pushcopy_object(lua_State *L, T &value, const char *cls) +template ::value + && std::is_copy_constructible::value, bool> = true> inline +int olua_copy_object(lua_State *L, T &value, const char *cls) { using Type = typename std::remove_const::type; - olua_debug_assert(cls, "cls is null"); void *ptr = olua_newrawobj(L, nullptr, sizeof(T)); Type *obj = new (ptr) Type(value); olua_setobjflag(L, -1, OLUA_FLAG_IN_USERDATA); @@ -619,8 +626,22 @@ int olua_pushcopy_object(lua_State *L, T &value, const char *cls) return 1; } -// std::shared_prt & std::weak_ptr -#define OLUA_SMART_PRT "smart_ptr" +template ::value + && !std::is_copy_constructible::value + && std::is_copy_assignable::value, bool> = true> inline +int olua_copy_object(lua_State *L, T &value, const char *cls) +{ + using Type = typename std::remove_const::type; + void *ptr = olua_newrawobj(L, nullptr, sizeof(T)); + Type *obj = new (ptr) Type(); + *obj = value; + olua_setobjflag(L, -1, OLUA_FLAG_IN_USERDATA); + olua_pushobj(L, (void *)obj, olua_getluatype(L, nullptr, cls)); + return 1; +} + +// std::shared_ptr & std::weak_ptr +#define OLUA_SMART_PRT ".olua.ref.smartptr<>" template class SmartPtr, class T> int olua_smartptr_gc(lua_State *L) @@ -664,8 +685,19 @@ void oluacls_class_smartptr(lua_State *L) } } +static inline +bool olua_is_smartptr(lua_State *L, int idx, const char *cls) +{ + if (olua_isa(L, idx, cls)) { + int type = olua_loadref(L, idx, OLUA_SMART_PRT); + lua_pop(L, 1); + return type == LUA_TUSERDATA; + } + return false; +} + template -void olua_check_object(lua_State *L, int idx, std::shared_ptr *value, const char *) +void olua_check_smartptr(lua_State *L, int idx, std::shared_ptr *value, const char *) { idx = lua_absindex(L, idx); olua_checkobj(L, idx); @@ -675,7 +707,7 @@ void olua_check_object(lua_State *L, int idx, std::shared_ptr *value, const c } template -int olua_push_object(lua_State *L, const std::shared_ptr *value, const char *cls) +int olua_push_smartptr(lua_State *L, const std::shared_ptr *value, const char *cls) { oluacls_class_smartptr(L); @@ -703,7 +735,7 @@ int olua_push_object(lua_State *L, const std::shared_ptr *value, const char * } template -void olua_check_object(lua_State *L, int idx, std::weak_ptr *value, const char *) +void olua_check_smartptr(lua_State *L, int idx, std::weak_ptr *value, const char *) { idx = lua_absindex(L, idx); olua_loadref(L, idx, OLUA_SMART_PRT); @@ -712,7 +744,7 @@ void olua_check_object(lua_State *L, int idx, std::weak_ptr *value, const cha } template -int olua_push_object(lua_State *L, const std::weak_ptr *value, const char *cls) +int olua_push_smartptr(lua_State *L, const std::weak_ptr *value, const char *cls) { std::shared_ptr sp = value->lock(); return olua_push_object(L, &sp, cls); @@ -766,8 +798,8 @@ void olua_check_map(lua_State *L, int idx, Map &map, const std::fun } // array -template -void olua_insert_array(std::vector &array, const T &value) +template class Array, class ...Ts> +void olua_insert_array(Array &array, const T &value) { array.push_back(value); } @@ -778,8 +810,8 @@ void olua_insert_array(std::set &array, const T &value) array.insert(value); } -template class Vector, class ...Ts> -void olua_foreach_array(const Vector &array, const std::function &callback) +template class Array, class ...Ts> +void olua_foreach_array(const Array &array, const std::function &callback) { for (auto &itor : array) { callback(const_cast(itor)); @@ -801,8 +833,8 @@ bool olua_is_array(lua_State *L, int idx) return olua_istable(L, idx); } -template class Vector, class ...Ts> -int olua_push_array(lua_State *L, const Vector &array, const std::function &push) +template class Array, class ...Ts> +int olua_push_array(lua_State *L, const Array &array, const std::function &push) { int idx = 0; lua_newtable(L); @@ -813,8 +845,8 @@ int olua_push_array(lua_State *L, const Vector &array, const std::func return 1; } -template class Vector, class ...Ts> -void olua_check_array(lua_State *L, int idx, Vector &array, const std::function &check) +template class Array, class ...Ts> +void olua_check_array(lua_State *L, int idx, Array &array, const std::function &check) { idx = lua_absindex(L, idx); luaL_checktype(L, idx, LUA_TTABLE); @@ -828,8 +860,8 @@ void olua_check_array(lua_State *L, int idx, Vector &array, const std: } } -template class Vector, class ...Ts> -void olua_pack_array(lua_State *L, int idx, Vector &array, const std::function &check) +template class Array, class ...Ts> +void olua_pack_array(lua_State *L, int idx, Array &array, const std::function &check) { idx = lua_absindex(L, idx); int total = (int)(lua_gettop(L) - (idx - 1)); @@ -869,28 +901,28 @@ typedef SSIZE_T ssize_t; namespace olua { template -class pointer { +class value_ptr { public: - pointer(const pointer &) = delete; - pointer &operator=(const pointer &) = delete; + value_ptr(const value_ptr &) = delete; + value_ptr &operator=(const value_ptr &) = delete; - pointer() {} - ~pointer() + value_ptr() {} + ~value_ptr() { if (_owner) { delete[] _data; } } - pointer(T *v) + value_ptr(T *v) :_len(0) ,_owner(false) ,_data(v) {} - OLUA_POSTNEW OLUA_NAME(new) static pointer *create(size_t len = 1) + OLUA_POSTNEW OLUA_NAME(new) static value_ptr *create(size_t len = 1) { - pointer *ret = new pointer(); + value_ptr *ret = new value_ptr(); ret->_len = len; ret->_data = new T[len](); return ret; @@ -910,10 +942,16 @@ class pointer { olua_Return __gc(lua_State *L) { - pointer *self = (pointer *)olua_toobj(L, 1, OLUA_VOIDCLS); + value_ptr *self = (value_ptr *)olua_toobj(L, 1, OLUA_VOIDCLS); if (self) { - olua_setrawobj(L, 1, nullptr); - delete self; + if (olua_hasobjflag(L, -1, OLUA_FLAG_IN_HEAP)) { + olua_setrawobj(L, 1, nullptr); + delete self; + } else if (olua_hasobjflag(L, -1, OLUA_FLAG_IN_USERDATA)) { + olua_setrawobj(L, 1, nullptr); + self->~value_ptr(); + } + } return 0; } @@ -925,56 +963,44 @@ class pointer { return 1; } - void assign(const char *data, size_t len) - { - olua_assert(sizeof(T) == sizeof(char), "expect char type"); - olua_assert(len <= _len, "data too long"); - strncpy((char *)_data, data, len); - } - - pointer *take() + value_ptr *take() { olua_assert(_owner, "take only allow when owner is true "); _owner = false; return this; } - OLUA_POSTNEW pointer *sub(size_t from, size_t to = -1) + OLUA_POSTNEW value_ptr *sub(size_t from, size_t to = -1) { if (to == -1) { to = _len; } olua_assert(from <= _len && from <= to, "invalid 'from' position"); olua_assert(to <= _len, "invalid 'to' position"); - pointer *ret = create(to - from + 1); + value_ptr *ret = create(to - from + 1); for (size_t i = 0; i < ret->_len; i++) { ret->_data[i] = _data[from + i - 1]; } return ret; } - OLUA_POSTNEW pointer *slice(size_t from, size_t to = -1) + OLUA_POSTNEW value_ptr *slice(size_t from, size_t to = -1) { if (to == -1) { to = _len; } - pointer *ret = new pointer(&_data[from - 1]); + olua_assert(from <= _len && from <= to, "invalid 'from' position"); + olua_assert(to <= _len, "invalid 'to' position"); + value_ptr *ret = new value_ptr(&_data[from - 1]); ret->_len = to - from + 1; ret->_owner = false; return ret; } - OLUA_EXCLUDE T *data() {return _data;} - OLUA_GETTER OLUA_NAME(rawdata) void *rawdata() {return _data;} - OLUA_GETTER OLUA_NAME(sizeof) size_t size() {return sizeof(T);} + OLUA_GETTER OLUA_NAME(buffer) OLUA_TYPE(void *) T *buffer() {return _data;} OLUA_GETTER OLUA_NAME(value) const T &value() {return *_data;} OLUA_SETTER OLUA_NAME(value) void value(const T &v) {*_data = v;} OLUA_GETTER OLUA_NAME(length) size_t length() {return _len;} - OLUA_SETTER OLUA_NAME(length) void length(size_t len) - { - olua_assert(!_owner, "not allow set length when own the data"); - _len = len; - } private: T *_data = nullptr; size_t _len = 0; @@ -996,73 +1022,54 @@ typedef float olua_float_t; typedef double olua_double_t; typedef long double olua_ldouble_t; -typedef olua::pointer olua_bool; -typedef olua::pointer olua_int8_t; -typedef olua::pointer olua_uint8_t; -typedef olua::pointer olua_int16_t; -typedef olua::pointer olua_uint16_t; -typedef olua::pointer olua_int32_t; -typedef olua::pointer olua_uint32_t; -typedef olua::pointer olua_int64_t; -typedef olua::pointer olua_uint64_t; -typedef olua::pointer olua_char; -typedef olua::pointer olua_short; -typedef olua::pointer olua_int; -typedef olua::pointer olua_long; -typedef olua::pointer olua_llong; -typedef olua::pointer olua_uchar; -typedef olua::pointer olua_ushort; -typedef olua::pointer olua_uint; -typedef olua::pointer olua_ulong; -typedef olua::pointer olua_ullong; -typedef olua::pointer olua_float; -typedef olua::pointer olua_double; -typedef olua::pointer olua_ldouble; -typedef olua::pointer olua_size_t; -typedef olua::pointer olua_ssize_t; -typedef olua::pointer olua_string; - -template inline -int olua_pushobj(lua_State *L, const olua::pointer *value, const char *cls) -{ - olua_postpush(L, (olua::pointer *)value, olua_pushobj(L, (void *)value, cls)); - return 1; -} - -template inline -int olua_pushobj(lua_State *L, const olua::pointer *value) -{ - static_assert(sizeof(T) == 0, "push olua::pointer object must specify the lua class"); - return 0; -} - -template inline -int olua_push_object(lua_State *L, const olua::pointer *value, const char *cls) -{ - return olua_pushobj(L, value, cls); -} - -// pointer +typedef olua::value_ptr olua_bool; +typedef olua::value_ptr olua_int8; +typedef olua::value_ptr olua_uint8; +typedef olua::value_ptr olua_int16; +typedef olua::value_ptr olua_uint16; +typedef olua::value_ptr olua_int32; +typedef olua::value_ptr olua_uint32; +typedef olua::value_ptr olua_int64; +typedef olua::value_ptr olua_uint64; +typedef olua::value_ptr olua_char; +typedef olua::value_ptr olua_short; +typedef olua::value_ptr olua_int; +typedef olua::value_ptr olua_long; +typedef olua::value_ptr olua_llong; +typedef olua::value_ptr olua_uchar; +typedef olua::value_ptr olua_ushort; +typedef olua::value_ptr olua_uint; +typedef olua::value_ptr olua_ulong; +typedef olua::value_ptr olua_ullong; +typedef olua::value_ptr olua_float; +typedef olua::value_ptr olua_double; +typedef olua::value_ptr olua_ldouble; +typedef olua::value_ptr olua_size_t; +typedef olua::value_ptr olua_ssize_t; +typedef olua::value_ptr olua_string; + +// value_ptr static inline -int olua_is_pointer(lua_State *L, int idx, const char *cls) +int olua_is_valueptr(lua_State *L, int idx, const char *cls) { return olua_isa(L, idx, cls); } template inline -void olua_check_pointer(lua_State *L, int idx, T **value, const char *cls) +void olua_check_valueptr(lua_State *L, int idx, T **value, const char *cls) { - olua::pointer *obj = (olua::pointer *)olua_checkobj(L, idx, cls); - *value = obj->data(); + olua::value_ptr *obj = (olua::value_ptr *)olua_checkobj(L, idx, cls); + *value = obj->buffer(); } template -int olua_push_pointer(lua_State *L, T *value, const char *cls) +int olua_push_valueptr(lua_State *L, T *value, const char *cls) { if (value) { - olua::pointer *obj = new olua::pointer(value); - olua_pushobj>(L, obj, cls); - olua_postnew(L, obj); + void *ptr = olua_newrawobj(L, nullptr, sizeof(olua::value_ptr)); + olua::value_ptr *obj = new (ptr) olua::value_ptr(value); + olua_setobjflag(L, -1, OLUA_FLAG_IN_USERDATA); + olua_pushobj(L, (void *)obj, olua_getluatype>(L, nullptr, cls)); } else { lua_pushnil(L); } diff --git a/frameworks/plugins/alipay/lua_alipay.cpp b/frameworks/plugins/alipay/lua_alipay.cpp index 453c07ca..73dae2d5 100644 --- a/frameworks/plugins/alipay/lua_alipay.cpp +++ b/frameworks/plugins/alipay/lua_alipay.cpp @@ -1,5 +1,5 @@ // -// AUTO BUILD, DON'T MODIFY! +// AUTO GENERATED, DO NOT MODIFY! // #include "lua_alipay.h" #include "lua-bindings/lua_cocos2d_types.h" @@ -7,7 +7,7 @@ #include "alipay/alipay.h" #ifdef CCLUA_BUILD_ALIPAY -static int _cclua_plugin_alipay___gc(lua_State *L) +static int _olua_fun_cclua_plugin_alipay___gc(lua_State *L) { olua_startinvoke(L); @@ -19,7 +19,7 @@ static int _cclua_plugin_alipay___gc(lua_State *L) return 0; } -static int _cclua_plugin_alipay___olua_move(lua_State *L) +static int _olua_fun_cclua_plugin_alipay___olua_move(lua_State *L) { olua_startinvoke(L); @@ -31,7 +31,7 @@ static int _cclua_plugin_alipay___olua_move(lua_State *L) return 1; } -static int _cclua_plugin_alipay_dispatch(lua_State *L) +static int _olua_fun_cclua_plugin_alipay_dispatch(lua_State *L) { olua_startinvoke(L); @@ -49,7 +49,7 @@ static int _cclua_plugin_alipay_dispatch(lua_State *L) return 0; } -static int _cclua_plugin_alipay_pay(lua_State *L) +static int _olua_fun_cclua_plugin_alipay_pay(lua_State *L) { olua_startinvoke(L); @@ -65,7 +65,7 @@ static int _cclua_plugin_alipay_pay(lua_State *L) return 0; } -static int _cclua_plugin_alipay_setDispatcher(lua_State *L) +static int _olua_fun_cclua_plugin_alipay_setDispatcher(lua_State *L) { olua_startinvoke(L); @@ -75,9 +75,10 @@ static int _cclua_plugin_alipay_setDispatcher(lua_State *L) void *cb_store = (void *)olua_pushclassobj(L, "cclua.plugin.alipay"); std::string cb_tag = "Dispatcher"; - std::string cb_name = olua_setcallback(L, cb_store, 1, cb_tag.c_str(), OLUA_TAG_REPLACE); + std::string cb_name = olua_setcallback(L, cb_store, 1, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](const std::string &arg1, const cocos2d::Value &arg2) { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](const std::string &cb_arg1, const cocos2d::Value &cb_arg2) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); @@ -85,8 +86,8 @@ static int _cclua_plugin_alipay_setDispatcher(lua_State *L) int top = lua_gettop(L); size_t last = olua_push_objpool(L); olua_enable_objpool(L); - olua_push_string(L, arg1); - olua_push_cocos2d_Value(L, arg2); + olua_push_string(L, cb_arg1); + olua_push_cocos2d_Value(L, cb_arg2); olua_disable_objpool(L); olua_callback(L, cb_store, cb_name.c_str(), 2); @@ -97,7 +98,7 @@ static int _cclua_plugin_alipay_setDispatcher(lua_State *L) } }; - // static void setDispatcher(@localvar const cclua::Callback &dispatcher) + // static void setDispatcher(const cclua::Callback &dispatcher) cclua::plugin::alipay::setDispatcher(arg1); olua_endinvoke(L); @@ -105,16 +106,25 @@ static int _cclua_plugin_alipay_setDispatcher(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cclua_plugin_alipay(lua_State *L) +static int _olua_cls_cclua_plugin_alipay(lua_State *L) { oluacls_class(L, "cclua.plugin.alipay"); - oluacls_func(L, "__gc", _cclua_plugin_alipay___gc); - oluacls_func(L, "__olua_move", _cclua_plugin_alipay___olua_move); - oluacls_func(L, "dispatch", _cclua_plugin_alipay_dispatch); - oluacls_func(L, "pay", _cclua_plugin_alipay_pay); - oluacls_func(L, "setDispatcher", _cclua_plugin_alipay_setDispatcher); + oluacls_func(L, "__gc", _olua_fun_cclua_plugin_alipay___gc); + oluacls_func(L, "__olua_move", _olua_fun_cclua_plugin_alipay___olua_move); + oluacls_func(L, "dispatch", _olua_fun_cclua_plugin_alipay_dispatch); + oluacls_func(L, "pay", _olua_fun_cclua_plugin_alipay_pay); + oluacls_func(L, "setDispatcher", _olua_fun_cclua_plugin_alipay_setDispatcher); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cclua_plugin_alipay(lua_State *L) +{ + olua_require(L, "alipay", luaopen_alipay); + if (!olua_getclass(L, "cclua.plugin.alipay")) { + luaL_error(L, "class not found: cclua::plugin::alipay"); + } return 1; } OLUA_END_DECLS @@ -124,7 +134,7 @@ OLUA_BEGIN_DECLS OLUA_LIB int luaopen_alipay(lua_State *L) { #ifdef CCLUA_BUILD_ALIPAY - olua_require(L, "cclua.plugin.alipay", luaopen_cclua_plugin_alipay); + olua_require(L, "cclua.plugin.alipay", _olua_cls_cclua_plugin_alipay); #endif return 0; diff --git a/frameworks/plugins/alipay/lua_alipay.h b/frameworks/plugins/alipay/lua_alipay.h index aaf5a61c..93d4ed48 100644 --- a/frameworks/plugins/alipay/lua_alipay.h +++ b/frameworks/plugins/alipay/lua_alipay.h @@ -1,5 +1,5 @@ // -// AUTO BUILD, DON'T MODIFY! +// AUTO GENERATED, DO NOT MODIFY! // #ifndef __AUTO_GEN_LUA_ALIPAY_H__ #define __AUTO_GEN_LUA_ALIPAY_H__ diff --git a/frameworks/plugins/apple/lua_apple.cpp b/frameworks/plugins/apple/lua_apple.cpp index 895a06e7..bef2f8b7 100644 --- a/frameworks/plugins/apple/lua_apple.cpp +++ b/frameworks/plugins/apple/lua_apple.cpp @@ -1,5 +1,5 @@ // -// AUTO BUILD, DON'T MODIFY! +// AUTO GENERATED, DO NOT MODIFY! // #include "lua_apple.h" #include "lua-bindings/lua_cocos2d_types.h" @@ -7,7 +7,7 @@ #include "apple/apple.h" #ifdef CCLUA_OS_IOS -static int _cclua_plugin_apple___gc(lua_State *L) +static int _olua_fun_cclua_plugin_apple___gc(lua_State *L) { olua_startinvoke(L); @@ -19,7 +19,7 @@ static int _cclua_plugin_apple___gc(lua_State *L) return 0; } -static int _cclua_plugin_apple___olua_move(lua_State *L) +static int _olua_fun_cclua_plugin_apple___olua_move(lua_State *L) { olua_startinvoke(L); @@ -31,7 +31,7 @@ static int _cclua_plugin_apple___olua_move(lua_State *L) return 1; } -static int _cclua_plugin_apple_auth(lua_State *L) +static int _olua_fun_cclua_plugin_apple_auth(lua_State *L) { olua_startinvoke(L); @@ -43,7 +43,7 @@ static int _cclua_plugin_apple_auth(lua_State *L) return 0; } -static int _cclua_plugin_apple_canMakeAuth(lua_State *L) +static int _olua_fun_cclua_plugin_apple_canMakeAuth(lua_State *L) { olua_startinvoke(L); @@ -56,7 +56,7 @@ static int _cclua_plugin_apple_canMakeAuth(lua_State *L) return num_ret; } -static int _cclua_plugin_apple_canMakePayments(lua_State *L) +static int _olua_fun_cclua_plugin_apple_canMakePayments(lua_State *L) { olua_startinvoke(L); @@ -69,7 +69,7 @@ static int _cclua_plugin_apple_canMakePayments(lua_State *L) return num_ret; } -static int _cclua_plugin_apple_dispatch(lua_State *L) +static int _olua_fun_cclua_plugin_apple_dispatch(lua_State *L) { olua_startinvoke(L); @@ -87,7 +87,7 @@ static int _cclua_plugin_apple_dispatch(lua_State *L) return 0; } -static int _cclua_plugin_apple_finishTransaction(lua_State *L) +static int _olua_fun_cclua_plugin_apple_finishTransaction(lua_State *L) { olua_startinvoke(L); @@ -103,7 +103,7 @@ static int _cclua_plugin_apple_finishTransaction(lua_State *L) return 0; } -static int _cclua_plugin_apple_getPendingTransactions(lua_State *L) +static int _olua_fun_cclua_plugin_apple_getPendingTransactions(lua_State *L) { olua_startinvoke(L); @@ -116,7 +116,7 @@ static int _cclua_plugin_apple_getPendingTransactions(lua_State *L) return num_ret; } -static int _cclua_plugin_apple_purchase$1(lua_State *L) +static int _olua_fun_cclua_plugin_apple_purchase$1(lua_State *L) { olua_startinvoke(L); @@ -134,7 +134,7 @@ static int _cclua_plugin_apple_purchase$1(lua_State *L) return 0; } -static int _cclua_plugin_apple_purchase$2(lua_State *L) +static int _olua_fun_cclua_plugin_apple_purchase$2(lua_State *L) { olua_startinvoke(L); @@ -142,7 +142,7 @@ static int _cclua_plugin_apple_purchase$2(lua_State *L) olua_check_string(L, 1, &arg1); - // static void purchase(const std::string &product, @optional uint32_t quantify) + // static void purchase(const std::string &product) cclua::plugin::apple::purchase(arg1); olua_endinvoke(L); @@ -150,21 +150,21 @@ static int _cclua_plugin_apple_purchase$2(lua_State *L) return 0; } -static int _cclua_plugin_apple_purchase(lua_State *L) +static int _olua_fun_cclua_plugin_apple_purchase(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 1) { // if ((olua_is_string(L, 1))) { - // static void purchase(const std::string &product, @optional uint32_t quantify) - return _cclua_plugin_apple_purchase$2(L); + // static void purchase(const std::string &product) + return _olua_fun_cclua_plugin_apple_purchase$2(L); // } } if (num_args == 2) { // if ((olua_is_string(L, 1)) && (olua_is_integer(L, 2))) { // static void purchase(const std::string &product, @optional uint32_t quantify) - return _cclua_plugin_apple_purchase$1(L); + return _olua_fun_cclua_plugin_apple_purchase$1(L); // } } @@ -173,7 +173,7 @@ static int _cclua_plugin_apple_purchase(lua_State *L) return 0; } -static int _cclua_plugin_apple_requestProducts(lua_State *L) +static int _olua_fun_cclua_plugin_apple_requestProducts(lua_State *L) { olua_startinvoke(L); @@ -191,7 +191,7 @@ static int _cclua_plugin_apple_requestProducts(lua_State *L) return 0; } -static int _cclua_plugin_apple_restoreTransactions$1(lua_State *L) +static int _olua_fun_cclua_plugin_apple_restoreTransactions$1(lua_State *L) { olua_startinvoke(L); @@ -207,11 +207,11 @@ static int _cclua_plugin_apple_restoreTransactions$1(lua_State *L) return 0; } -static int _cclua_plugin_apple_restoreTransactions$2(lua_State *L) +static int _olua_fun_cclua_plugin_apple_restoreTransactions$2(lua_State *L) { olua_startinvoke(L); - // static void restoreTransactions(@optional const std::string &appUsername) + // static void restoreTransactions() cclua::plugin::apple::restoreTransactions(); olua_endinvoke(L); @@ -219,19 +219,19 @@ static int _cclua_plugin_apple_restoreTransactions$2(lua_State *L) return 0; } -static int _cclua_plugin_apple_restoreTransactions(lua_State *L) +static int _olua_fun_cclua_plugin_apple_restoreTransactions(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 0) { - // static void restoreTransactions(@optional const std::string &appUsername) - return _cclua_plugin_apple_restoreTransactions$2(L); + // static void restoreTransactions() + return _olua_fun_cclua_plugin_apple_restoreTransactions$2(L); } if (num_args == 1) { // if ((olua_is_string(L, 1))) { // static void restoreTransactions(@optional const std::string &appUsername) - return _cclua_plugin_apple_restoreTransactions$1(L); + return _olua_fun_cclua_plugin_apple_restoreTransactions$1(L); // } } @@ -240,7 +240,7 @@ static int _cclua_plugin_apple_restoreTransactions(lua_State *L) return 0; } -static int _cclua_plugin_apple_setDispatcher(lua_State *L) +static int _olua_fun_cclua_plugin_apple_setDispatcher(lua_State *L) { olua_startinvoke(L); @@ -250,9 +250,10 @@ static int _cclua_plugin_apple_setDispatcher(lua_State *L) void *cb_store = (void *)olua_pushclassobj(L, "cclua.plugin.apple"); std::string cb_tag = "Dispatcher"; - std::string cb_name = olua_setcallback(L, cb_store, 1, cb_tag.c_str(), OLUA_TAG_REPLACE); + std::string cb_name = olua_setcallback(L, cb_store, 1, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](const std::string &arg1, const cocos2d::Value &arg2) { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](const std::string &cb_arg1, const cocos2d::Value &cb_arg2) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); @@ -260,8 +261,8 @@ static int _cclua_plugin_apple_setDispatcher(lua_State *L) int top = lua_gettop(L); size_t last = olua_push_objpool(L); olua_enable_objpool(L); - olua_push_string(L, arg1); - olua_push_cocos2d_Value(L, arg2); + olua_push_string(L, cb_arg1); + olua_push_cocos2d_Value(L, cb_arg2); olua_disable_objpool(L); olua_callback(L, cb_store, cb_name.c_str(), 2); @@ -272,7 +273,7 @@ static int _cclua_plugin_apple_setDispatcher(lua_State *L) } }; - // static void setDispatcher(@localvar const cclua::Callback &dispatcher) + // static void setDispatcher(const cclua::Callback &dispatcher) cclua::plugin::apple::setDispatcher(arg1); olua_endinvoke(L); @@ -280,28 +281,37 @@ static int _cclua_plugin_apple_setDispatcher(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cclua_plugin_apple(lua_State *L) +static int _olua_cls_cclua_plugin_apple(lua_State *L) { oluacls_class(L, "cclua.plugin.apple"); - oluacls_func(L, "__gc", _cclua_plugin_apple___gc); - oluacls_func(L, "__olua_move", _cclua_plugin_apple___olua_move); - oluacls_func(L, "auth", _cclua_plugin_apple_auth); - oluacls_func(L, "canMakeAuth", _cclua_plugin_apple_canMakeAuth); - oluacls_func(L, "canMakePayments", _cclua_plugin_apple_canMakePayments); - oluacls_func(L, "dispatch", _cclua_plugin_apple_dispatch); - oluacls_func(L, "finishTransaction", _cclua_plugin_apple_finishTransaction); - oluacls_func(L, "getPendingTransactions", _cclua_plugin_apple_getPendingTransactions); - oluacls_func(L, "purchase", _cclua_plugin_apple_purchase); - oluacls_func(L, "requestProducts", _cclua_plugin_apple_requestProducts); - oluacls_func(L, "restoreTransactions", _cclua_plugin_apple_restoreTransactions); - oluacls_func(L, "setDispatcher", _cclua_plugin_apple_setDispatcher); - oluacls_prop(L, "pendingTransactions", _cclua_plugin_apple_getPendingTransactions, nullptr); + oluacls_func(L, "__gc", _olua_fun_cclua_plugin_apple___gc); + oluacls_func(L, "__olua_move", _olua_fun_cclua_plugin_apple___olua_move); + oluacls_func(L, "auth", _olua_fun_cclua_plugin_apple_auth); + oluacls_func(L, "canMakeAuth", _olua_fun_cclua_plugin_apple_canMakeAuth); + oluacls_func(L, "canMakePayments", _olua_fun_cclua_plugin_apple_canMakePayments); + oluacls_func(L, "dispatch", _olua_fun_cclua_plugin_apple_dispatch); + oluacls_func(L, "finishTransaction", _olua_fun_cclua_plugin_apple_finishTransaction); + oluacls_func(L, "getPendingTransactions", _olua_fun_cclua_plugin_apple_getPendingTransactions); + oluacls_func(L, "purchase", _olua_fun_cclua_plugin_apple_purchase); + oluacls_func(L, "requestProducts", _olua_fun_cclua_plugin_apple_requestProducts); + oluacls_func(L, "restoreTransactions", _olua_fun_cclua_plugin_apple_restoreTransactions); + oluacls_func(L, "setDispatcher", _olua_fun_cclua_plugin_apple_setDispatcher); + oluacls_prop(L, "pendingTransactions", _olua_fun_cclua_plugin_apple_getPendingTransactions, nullptr); cclua::runtime::registerFeature("cclua.plugin.apple.ios", true); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cclua_plugin_apple(lua_State *L) +{ + olua_require(L, "apple", luaopen_apple); + if (!olua_getclass(L, "cclua.plugin.apple")) { + luaL_error(L, "class not found: cclua::plugin::apple"); + } + return 1; +} OLUA_END_DECLS #endif @@ -309,7 +319,7 @@ OLUA_BEGIN_DECLS OLUA_LIB int luaopen_apple(lua_State *L) { #ifdef CCLUA_OS_IOS - olua_require(L, "cclua.plugin.apple", luaopen_cclua_plugin_apple); + olua_require(L, "cclua.plugin.apple", _olua_cls_cclua_plugin_apple); #endif return 0; diff --git a/frameworks/plugins/apple/lua_apple.h b/frameworks/plugins/apple/lua_apple.h index f13d079b..5e3365b2 100644 --- a/frameworks/plugins/apple/lua_apple.h +++ b/frameworks/plugins/apple/lua_apple.h @@ -1,5 +1,5 @@ // -// AUTO BUILD, DON'T MODIFY! +// AUTO GENERATED, DO NOT MODIFY! // #ifndef __AUTO_GEN_LUA_APPLE_H__ #define __AUTO_GEN_LUA_APPLE_H__ diff --git a/frameworks/plugins/huawei/lua_huawei.cpp b/frameworks/plugins/huawei/lua_huawei.cpp index e8eb57ae..293e6fb3 100644 --- a/frameworks/plugins/huawei/lua_huawei.cpp +++ b/frameworks/plugins/huawei/lua_huawei.cpp @@ -1,5 +1,5 @@ // -// AUTO BUILD, DON'T MODIFY! +// AUTO GENERATED, DO NOT MODIFY! // #include "lua_huawei.h" #include "lua-bindings/lua_cocos2d_types.h" @@ -7,7 +7,7 @@ #include "huawei/huawei.h" #ifdef CCLUA_BUILD_HUAWEI -static int _cclua_plugin_huawei___gc(lua_State *L) +static int _olua_fun_cclua_plugin_huawei___gc(lua_State *L) { olua_startinvoke(L); @@ -19,7 +19,7 @@ static int _cclua_plugin_huawei___gc(lua_State *L) return 0; } -static int _cclua_plugin_huawei___olua_move(lua_State *L) +static int _olua_fun_cclua_plugin_huawei___olua_move(lua_State *L) { olua_startinvoke(L); @@ -31,7 +31,7 @@ static int _cclua_plugin_huawei___olua_move(lua_State *L) return 1; } -static int _cclua_plugin_huawei_dispatch(lua_State *L) +static int _olua_fun_cclua_plugin_huawei_dispatch(lua_State *L) { olua_startinvoke(L); @@ -49,7 +49,7 @@ static int _cclua_plugin_huawei_dispatch(lua_State *L) return 0; } -static int _cclua_plugin_huawei_init(lua_State *L) +static int _olua_fun_cclua_plugin_huawei_init(lua_State *L) { olua_startinvoke(L); @@ -61,7 +61,7 @@ static int _cclua_plugin_huawei_init(lua_State *L) return 0; } -static int _cclua_plugin_huawei_login(lua_State *L) +static int _olua_fun_cclua_plugin_huawei_login(lua_State *L) { olua_startinvoke(L); @@ -73,7 +73,7 @@ static int _cclua_plugin_huawei_login(lua_State *L) return 0; } -static int _cclua_plugin_huawei_logout(lua_State *L) +static int _olua_fun_cclua_plugin_huawei_logout(lua_State *L) { olua_startinvoke(L); @@ -85,7 +85,7 @@ static int _cclua_plugin_huawei_logout(lua_State *L) return 0; } -static int _cclua_plugin_huawei_pay(lua_State *L) +static int _olua_fun_cclua_plugin_huawei_pay(lua_State *L) { olua_startinvoke(L); @@ -117,7 +117,7 @@ static int _cclua_plugin_huawei_pay(lua_State *L) return 0; } -static int _cclua_plugin_huawei_revokeAccess(lua_State *L) +static int _olua_fun_cclua_plugin_huawei_revokeAccess(lua_State *L) { olua_startinvoke(L); @@ -129,7 +129,7 @@ static int _cclua_plugin_huawei_revokeAccess(lua_State *L) return 0; } -static int _cclua_plugin_huawei_setDispatcher(lua_State *L) +static int _olua_fun_cclua_plugin_huawei_setDispatcher(lua_State *L) { olua_startinvoke(L); @@ -139,9 +139,10 @@ static int _cclua_plugin_huawei_setDispatcher(lua_State *L) void *cb_store = (void *)olua_pushclassobj(L, "cclua.plugin.huawei"); std::string cb_tag = "Dispatcher"; - std::string cb_name = olua_setcallback(L, cb_store, 1, cb_tag.c_str(), OLUA_TAG_REPLACE); + std::string cb_name = olua_setcallback(L, cb_store, 1, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](const std::string &arg1, const cocos2d::Value &arg2) { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](const std::string &cb_arg1, const cocos2d::Value &cb_arg2) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); @@ -149,8 +150,8 @@ static int _cclua_plugin_huawei_setDispatcher(lua_State *L) int top = lua_gettop(L); size_t last = olua_push_objpool(L); olua_enable_objpool(L); - olua_push_string(L, arg1); - olua_push_cocos2d_Value(L, arg2); + olua_push_string(L, cb_arg1); + olua_push_cocos2d_Value(L, cb_arg2); olua_disable_objpool(L); olua_callback(L, cb_store, cb_name.c_str(), 2); @@ -161,7 +162,7 @@ static int _cclua_plugin_huawei_setDispatcher(lua_State *L) } }; - // static void setDispatcher(@localvar const cclua::Callback &dispatcher) + // static void setDispatcher(const cclua::Callback &dispatcher) cclua::plugin::huawei::setDispatcher(arg1); olua_endinvoke(L); @@ -169,20 +170,29 @@ static int _cclua_plugin_huawei_setDispatcher(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cclua_plugin_huawei(lua_State *L) +static int _olua_cls_cclua_plugin_huawei(lua_State *L) { oluacls_class(L, "cclua.plugin.huawei"); - oluacls_func(L, "__gc", _cclua_plugin_huawei___gc); - oluacls_func(L, "__olua_move", _cclua_plugin_huawei___olua_move); - oluacls_func(L, "dispatch", _cclua_plugin_huawei_dispatch); - oluacls_func(L, "init", _cclua_plugin_huawei_init); - oluacls_func(L, "login", _cclua_plugin_huawei_login); - oluacls_func(L, "logout", _cclua_plugin_huawei_logout); - oluacls_func(L, "pay", _cclua_plugin_huawei_pay); - oluacls_func(L, "revokeAccess", _cclua_plugin_huawei_revokeAccess); - oluacls_func(L, "setDispatcher", _cclua_plugin_huawei_setDispatcher); + oluacls_func(L, "__gc", _olua_fun_cclua_plugin_huawei___gc); + oluacls_func(L, "__olua_move", _olua_fun_cclua_plugin_huawei___olua_move); + oluacls_func(L, "dispatch", _olua_fun_cclua_plugin_huawei_dispatch); + oluacls_func(L, "init", _olua_fun_cclua_plugin_huawei_init); + oluacls_func(L, "login", _olua_fun_cclua_plugin_huawei_login); + oluacls_func(L, "logout", _olua_fun_cclua_plugin_huawei_logout); + oluacls_func(L, "pay", _olua_fun_cclua_plugin_huawei_pay); + oluacls_func(L, "revokeAccess", _olua_fun_cclua_plugin_huawei_revokeAccess); + oluacls_func(L, "setDispatcher", _olua_fun_cclua_plugin_huawei_setDispatcher); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cclua_plugin_huawei(lua_State *L) +{ + olua_require(L, "huawei", luaopen_huawei); + if (!olua_getclass(L, "cclua.plugin.huawei")) { + luaL_error(L, "class not found: cclua::plugin::huawei"); + } return 1; } OLUA_END_DECLS @@ -192,7 +202,7 @@ OLUA_BEGIN_DECLS OLUA_LIB int luaopen_huawei(lua_State *L) { #ifdef CCLUA_BUILD_HUAWEI - olua_require(L, "cclua.plugin.huawei", luaopen_cclua_plugin_huawei); + olua_require(L, "cclua.plugin.huawei", _olua_cls_cclua_plugin_huawei); #endif return 0; diff --git a/frameworks/plugins/huawei/lua_huawei.h b/frameworks/plugins/huawei/lua_huawei.h index 54eeda1c..21378e26 100644 --- a/frameworks/plugins/huawei/lua_huawei.h +++ b/frameworks/plugins/huawei/lua_huawei.h @@ -1,5 +1,5 @@ // -// AUTO BUILD, DON'T MODIFY! +// AUTO GENERATED, DO NOT MODIFY! // #ifndef __AUTO_GEN_LUA_HUAWEI_H__ #define __AUTO_GEN_LUA_HUAWEI_H__ diff --git a/frameworks/plugins/janalytics/lua_janalytics.cpp b/frameworks/plugins/janalytics/lua_janalytics.cpp index 3ad51dc2..ba163460 100644 --- a/frameworks/plugins/janalytics/lua_janalytics.cpp +++ b/frameworks/plugins/janalytics/lua_janalytics.cpp @@ -1,5 +1,5 @@ // -// AUTO BUILD, DON'T MODIFY! +// AUTO GENERATED, DO NOT MODIFY! // #include "lua_janalytics.h" #include "lua-bindings/lua_cocos2d_types.h" @@ -7,8 +7,7 @@ #include "janalytics/janalytics.h" #ifdef CCLUA_BUILD_JANALYTICS -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cclua_plugin_janalytics_EventType(lua_State *L) +static int _olua_cls_cclua_plugin_janalytics_EventType(lua_State *L) { oluacls_class(L, "cclua.plugin.janalytics.EventType"); oluacls_func(L, "__index", olua_indexerror); @@ -22,11 +21,21 @@ OLUA_LIB int luaopen_cclua_plugin_janalytics_EventType(lua_State *L) return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cclua_plugin_janalytics_EventType(lua_State *L) +{ + olua_require(L, "janalytics", luaopen_janalytics); + if (!olua_getclass(L, "cclua.plugin.janalytics.EventType")) { + luaL_error(L, "class not found: cclua::plugin::janalytics::EventType"); + } + return 1; +} OLUA_END_DECLS #endif #ifdef CCLUA_BUILD_JANALYTICS -static int _cclua_plugin_janalytics___gc(lua_State *L) +static int _olua_fun_cclua_plugin_janalytics___gc(lua_State *L) { olua_startinvoke(L); @@ -38,7 +47,7 @@ static int _cclua_plugin_janalytics___gc(lua_State *L) return 0; } -static int _cclua_plugin_janalytics___olua_move(lua_State *L) +static int _olua_fun_cclua_plugin_janalytics___olua_move(lua_State *L) { olua_startinvoke(L); @@ -50,7 +59,7 @@ static int _cclua_plugin_janalytics___olua_move(lua_State *L) return 1; } -static int _cclua_plugin_janalytics_detachAccount(lua_State *L) +static int _olua_fun_cclua_plugin_janalytics_detachAccount(lua_State *L) { olua_startinvoke(L); @@ -62,7 +71,7 @@ static int _cclua_plugin_janalytics_detachAccount(lua_State *L) return 0; } -static int _cclua_plugin_janalytics_identifyAccount(lua_State *L) +static int _olua_fun_cclua_plugin_janalytics_identifyAccount(lua_State *L) { olua_startinvoke(L); @@ -78,7 +87,7 @@ static int _cclua_plugin_janalytics_identifyAccount(lua_State *L) return 0; } -static int _cclua_plugin_janalytics_init(lua_State *L) +static int _olua_fun_cclua_plugin_janalytics_init(lua_State *L) { olua_startinvoke(L); @@ -96,7 +105,7 @@ static int _cclua_plugin_janalytics_init(lua_State *L) return 0; } -static int _cclua_plugin_janalytics_setDebug(lua_State *L) +static int _olua_fun_cclua_plugin_janalytics_setDebug(lua_State *L) { olua_startinvoke(L); @@ -112,7 +121,7 @@ static int _cclua_plugin_janalytics_setDebug(lua_State *L) return 0; } -static int _cclua_plugin_janalytics_setFrequency(lua_State *L) +static int _olua_fun_cclua_plugin_janalytics_setFrequency(lua_State *L) { olua_startinvoke(L); @@ -128,7 +137,7 @@ static int _cclua_plugin_janalytics_setFrequency(lua_State *L) return 0; } -static int _cclua_plugin_janalytics_startTrackPage(lua_State *L) +static int _olua_fun_cclua_plugin_janalytics_startTrackPage(lua_State *L) { olua_startinvoke(L); @@ -144,7 +153,7 @@ static int _cclua_plugin_janalytics_startTrackPage(lua_State *L) return 0; } -static int _cclua_plugin_janalytics_stopTrackPage(lua_State *L) +static int _olua_fun_cclua_plugin_janalytics_stopTrackPage(lua_State *L) { olua_startinvoke(L); @@ -160,7 +169,7 @@ static int _cclua_plugin_janalytics_stopTrackPage(lua_State *L) return 0; } -static int _cclua_plugin_janalytics_trackEvent(lua_State *L) +static int _olua_fun_cclua_plugin_janalytics_trackEvent(lua_State *L) { olua_startinvoke(L); @@ -178,25 +187,34 @@ static int _cclua_plugin_janalytics_trackEvent(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cclua_plugin_janalytics(lua_State *L) +static int _olua_cls_cclua_plugin_janalytics(lua_State *L) { oluacls_class(L, "cclua.plugin.janalytics"); - oluacls_func(L, "__gc", _cclua_plugin_janalytics___gc); - oluacls_func(L, "__olua_move", _cclua_plugin_janalytics___olua_move); - oluacls_func(L, "detachAccount", _cclua_plugin_janalytics_detachAccount); - oluacls_func(L, "identifyAccount", _cclua_plugin_janalytics_identifyAccount); - oluacls_func(L, "init", _cclua_plugin_janalytics_init); - oluacls_func(L, "setDebug", _cclua_plugin_janalytics_setDebug); - oluacls_func(L, "setFrequency", _cclua_plugin_janalytics_setFrequency); - oluacls_func(L, "startTrackPage", _cclua_plugin_janalytics_startTrackPage); - oluacls_func(L, "stopTrackPage", _cclua_plugin_janalytics_stopTrackPage); - oluacls_func(L, "trackEvent", _cclua_plugin_janalytics_trackEvent); + oluacls_func(L, "__gc", _olua_fun_cclua_plugin_janalytics___gc); + oluacls_func(L, "__olua_move", _olua_fun_cclua_plugin_janalytics___olua_move); + oluacls_func(L, "detachAccount", _olua_fun_cclua_plugin_janalytics_detachAccount); + oluacls_func(L, "identifyAccount", _olua_fun_cclua_plugin_janalytics_identifyAccount); + oluacls_func(L, "init", _olua_fun_cclua_plugin_janalytics_init); + oluacls_func(L, "setDebug", _olua_fun_cclua_plugin_janalytics_setDebug); + oluacls_func(L, "setFrequency", _olua_fun_cclua_plugin_janalytics_setFrequency); + oluacls_func(L, "startTrackPage", _olua_fun_cclua_plugin_janalytics_startTrackPage); + oluacls_func(L, "stopTrackPage", _olua_fun_cclua_plugin_janalytics_stopTrackPage); + oluacls_func(L, "trackEvent", _olua_fun_cclua_plugin_janalytics_trackEvent); cclua::runtime::registerFeature("cclua.plugin.janalytics.ios", true); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cclua_plugin_janalytics(lua_State *L) +{ + olua_require(L, "janalytics", luaopen_janalytics); + if (!olua_getclass(L, "cclua.plugin.janalytics")) { + luaL_error(L, "class not found: cclua::plugin::janalytics"); + } + return 1; +} OLUA_END_DECLS #endif @@ -204,8 +222,8 @@ OLUA_BEGIN_DECLS OLUA_LIB int luaopen_janalytics(lua_State *L) { #ifdef CCLUA_BUILD_JANALYTICS - olua_require(L, "cclua.plugin.janalytics.EventType", luaopen_cclua_plugin_janalytics_EventType); - olua_require(L, "cclua.plugin.janalytics", luaopen_cclua_plugin_janalytics); + olua_require(L, "cclua.plugin.janalytics.EventType", _olua_cls_cclua_plugin_janalytics_EventType); + olua_require(L, "cclua.plugin.janalytics", _olua_cls_cclua_plugin_janalytics); #endif return 0; diff --git a/frameworks/plugins/janalytics/lua_janalytics.h b/frameworks/plugins/janalytics/lua_janalytics.h index f4c9cbcb..4fb0288a 100644 --- a/frameworks/plugins/janalytics/lua_janalytics.h +++ b/frameworks/plugins/janalytics/lua_janalytics.h @@ -1,5 +1,5 @@ // -// AUTO BUILD, DON'T MODIFY! +// AUTO GENERATED, DO NOT MODIFY! // #ifndef __AUTO_GEN_LUA_JANALYTICS_H__ #define __AUTO_GEN_LUA_JANALYTICS_H__ diff --git a/frameworks/plugins/jauth/lua_jauth.cpp b/frameworks/plugins/jauth/lua_jauth.cpp index 68898c16..ca3a4eb9 100644 --- a/frameworks/plugins/jauth/lua_jauth.cpp +++ b/frameworks/plugins/jauth/lua_jauth.cpp @@ -1,5 +1,5 @@ // -// AUTO BUILD, DON'T MODIFY! +// AUTO GENERATED, DO NOT MODIFY! // #include "lua_jauth.h" #include "lua-bindings/lua_cocos2d_types.h" @@ -7,7 +7,7 @@ #include "jauth/jauth.h" #ifdef CCLUA_BUILD_JAUTH -static int _cclua_plugin_jauth___gc(lua_State *L) +static int _olua_fun_cclua_plugin_jauth___gc(lua_State *L) { olua_startinvoke(L); @@ -19,7 +19,7 @@ static int _cclua_plugin_jauth___gc(lua_State *L) return 0; } -static int _cclua_plugin_jauth___olua_move(lua_State *L) +static int _olua_fun_cclua_plugin_jauth___olua_move(lua_State *L) { olua_startinvoke(L); @@ -31,7 +31,7 @@ static int _cclua_plugin_jauth___olua_move(lua_State *L) return 1; } -static int _cclua_plugin_jauth_checkVerifyEnable(lua_State *L) +static int _olua_fun_cclua_plugin_jauth_checkVerifyEnable(lua_State *L) { olua_startinvoke(L); @@ -44,7 +44,7 @@ static int _cclua_plugin_jauth_checkVerifyEnable(lua_State *L) return num_ret; } -static int _cclua_plugin_jauth_clearPreLoginCache(lua_State *L) +static int _olua_fun_cclua_plugin_jauth_clearPreLoginCache(lua_State *L) { olua_startinvoke(L); @@ -56,7 +56,7 @@ static int _cclua_plugin_jauth_clearPreLoginCache(lua_State *L) return 0; } -static int _cclua_plugin_jauth_configUI$1(lua_State *L) +static int _olua_fun_cclua_plugin_jauth_configUI$1(lua_State *L) { olua_startinvoke(L); @@ -74,7 +74,7 @@ static int _cclua_plugin_jauth_configUI$1(lua_State *L) return 0; } -static int _cclua_plugin_jauth_configUI$2(lua_State *L) +static int _olua_fun_cclua_plugin_jauth_configUI$2(lua_State *L) { olua_startinvoke(L); @@ -82,7 +82,7 @@ static int _cclua_plugin_jauth_configUI$2(lua_State *L) olua_check_cocos2d_ValueMap(L, 1, &arg1); - // static void configUI(const cocos2d::ValueMap &value, @optional bool landscape) + // static void configUI(const cocos2d::ValueMap &value) cclua::plugin::jauth::configUI(arg1); olua_endinvoke(L); @@ -90,21 +90,21 @@ static int _cclua_plugin_jauth_configUI$2(lua_State *L) return 0; } -static int _cclua_plugin_jauth_configUI(lua_State *L) +static int _olua_fun_cclua_plugin_jauth_configUI(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 1) { // if ((olua_is_cocos2d_ValueMap(L, 1))) { - // static void configUI(const cocos2d::ValueMap &value, @optional bool landscape) - return _cclua_plugin_jauth_configUI$2(L); + // static void configUI(const cocos2d::ValueMap &value) + return _olua_fun_cclua_plugin_jauth_configUI$2(L); // } } if (num_args == 2) { // if ((olua_is_cocos2d_ValueMap(L, 1)) && (olua_is_bool(L, 2))) { // static void configUI(const cocos2d::ValueMap &value, @optional bool landscape) - return _cclua_plugin_jauth_configUI$1(L); + return _olua_fun_cclua_plugin_jauth_configUI$1(L); // } } @@ -113,7 +113,7 @@ static int _cclua_plugin_jauth_configUI(lua_State *L) return 0; } -static int _cclua_plugin_jauth_dismissLoginAuth$1(lua_State *L) +static int _olua_fun_cclua_plugin_jauth_dismissLoginAuth$1(lua_State *L) { olua_startinvoke(L); @@ -129,11 +129,11 @@ static int _cclua_plugin_jauth_dismissLoginAuth$1(lua_State *L) return 0; } -static int _cclua_plugin_jauth_dismissLoginAuth$2(lua_State *L) +static int _olua_fun_cclua_plugin_jauth_dismissLoginAuth$2(lua_State *L) { olua_startinvoke(L); - // static void dismissLoginAuth(@optional bool needCloseAnim) + // static void dismissLoginAuth() cclua::plugin::jauth::dismissLoginAuth(); olua_endinvoke(L); @@ -141,19 +141,19 @@ static int _cclua_plugin_jauth_dismissLoginAuth$2(lua_State *L) return 0; } -static int _cclua_plugin_jauth_dismissLoginAuth(lua_State *L) +static int _olua_fun_cclua_plugin_jauth_dismissLoginAuth(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 0) { - // static void dismissLoginAuth(@optional bool needCloseAnim) - return _cclua_plugin_jauth_dismissLoginAuth$2(L); + // static void dismissLoginAuth() + return _olua_fun_cclua_plugin_jauth_dismissLoginAuth$2(L); } if (num_args == 1) { // if ((olua_is_bool(L, 1))) { // static void dismissLoginAuth(@optional bool needCloseAnim) - return _cclua_plugin_jauth_dismissLoginAuth$1(L); + return _olua_fun_cclua_plugin_jauth_dismissLoginAuth$1(L); // } } @@ -162,7 +162,7 @@ static int _cclua_plugin_jauth_dismissLoginAuth(lua_State *L) return 0; } -static int _cclua_plugin_jauth_dispatch(lua_State *L) +static int _olua_fun_cclua_plugin_jauth_dispatch(lua_State *L) { olua_startinvoke(L); @@ -180,7 +180,7 @@ static int _cclua_plugin_jauth_dispatch(lua_State *L) return 0; } -static int _cclua_plugin_jauth_getSmsCode(lua_State *L) +static int _olua_fun_cclua_plugin_jauth_getSmsCode(lua_State *L) { olua_startinvoke(L); @@ -200,7 +200,7 @@ static int _cclua_plugin_jauth_getSmsCode(lua_State *L) return 0; } -static int _cclua_plugin_jauth_getToken(lua_State *L) +static int _olua_fun_cclua_plugin_jauth_getToken(lua_State *L) { olua_startinvoke(L); @@ -216,7 +216,7 @@ static int _cclua_plugin_jauth_getToken(lua_State *L) return 0; } -static int _cclua_plugin_jauth_init(lua_State *L) +static int _olua_fun_cclua_plugin_jauth_init(lua_State *L) { olua_startinvoke(L); @@ -234,7 +234,7 @@ static int _cclua_plugin_jauth_init(lua_State *L) return 0; } -static int _cclua_plugin_jauth_isInitSuccess(lua_State *L) +static int _olua_fun_cclua_plugin_jauth_isInitSuccess(lua_State *L) { olua_startinvoke(L); @@ -247,7 +247,7 @@ static int _cclua_plugin_jauth_isInitSuccess(lua_State *L) return num_ret; } -static int _cclua_plugin_jauth_loginAuth(lua_State *L) +static int _olua_fun_cclua_plugin_jauth_loginAuth(lua_State *L) { olua_startinvoke(L); @@ -263,7 +263,7 @@ static int _cclua_plugin_jauth_loginAuth(lua_State *L) return 0; } -static int _cclua_plugin_jauth_preLogin(lua_State *L) +static int _olua_fun_cclua_plugin_jauth_preLogin(lua_State *L) { olua_startinvoke(L); @@ -279,7 +279,7 @@ static int _cclua_plugin_jauth_preLogin(lua_State *L) return 0; } -static int _cclua_plugin_jauth_setDebug(lua_State *L) +static int _olua_fun_cclua_plugin_jauth_setDebug(lua_State *L) { olua_startinvoke(L); @@ -295,7 +295,7 @@ static int _cclua_plugin_jauth_setDebug(lua_State *L) return 0; } -static int _cclua_plugin_jauth_setDispatcher(lua_State *L) +static int _olua_fun_cclua_plugin_jauth_setDispatcher(lua_State *L) { olua_startinvoke(L); @@ -305,9 +305,10 @@ static int _cclua_plugin_jauth_setDispatcher(lua_State *L) void *cb_store = (void *)olua_pushclassobj(L, "cclua.plugin.jauth"); std::string cb_tag = "Dispatcher"; - std::string cb_name = olua_setcallback(L, cb_store, 1, cb_tag.c_str(), OLUA_TAG_REPLACE); + std::string cb_name = olua_setcallback(L, cb_store, 1, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](const std::string &arg1, const cocos2d::Value &arg2) { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](const std::string &cb_arg1, const cocos2d::Value &cb_arg2) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); @@ -315,8 +316,8 @@ static int _cclua_plugin_jauth_setDispatcher(lua_State *L) int top = lua_gettop(L); size_t last = olua_push_objpool(L); olua_enable_objpool(L); - olua_push_string(L, arg1); - olua_push_cocos2d_Value(L, arg2); + olua_push_string(L, cb_arg1); + olua_push_cocos2d_Value(L, cb_arg2); olua_disable_objpool(L); olua_callback(L, cb_store, cb_name.c_str(), 2); @@ -327,7 +328,7 @@ static int _cclua_plugin_jauth_setDispatcher(lua_State *L) } }; - // static void setDispatcher(@localvar const cclua::Callback &dispatcher) + // static void setDispatcher(const cclua::Callback &dispatcher) cclua::plugin::jauth::setDispatcher(arg1); olua_endinvoke(L); @@ -335,7 +336,7 @@ static int _cclua_plugin_jauth_setDispatcher(lua_State *L) return 0; } -static int _cclua_plugin_jauth_setSmsIntervalTime(lua_State *L) +static int _olua_fun_cclua_plugin_jauth_setSmsIntervalTime(lua_State *L) { olua_startinvoke(L); @@ -351,32 +352,41 @@ static int _cclua_plugin_jauth_setSmsIntervalTime(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cclua_plugin_jauth(lua_State *L) +static int _olua_cls_cclua_plugin_jauth(lua_State *L) { oluacls_class(L, "cclua.plugin.jauth"); - oluacls_func(L, "__gc", _cclua_plugin_jauth___gc); - oluacls_func(L, "__olua_move", _cclua_plugin_jauth___olua_move); - oluacls_func(L, "checkVerifyEnable", _cclua_plugin_jauth_checkVerifyEnable); - oluacls_func(L, "clearPreLoginCache", _cclua_plugin_jauth_clearPreLoginCache); - oluacls_func(L, "configUI", _cclua_plugin_jauth_configUI); - oluacls_func(L, "dismissLoginAuth", _cclua_plugin_jauth_dismissLoginAuth); - oluacls_func(L, "dispatch", _cclua_plugin_jauth_dispatch); - oluacls_func(L, "getSmsCode", _cclua_plugin_jauth_getSmsCode); - oluacls_func(L, "getToken", _cclua_plugin_jauth_getToken); - oluacls_func(L, "init", _cclua_plugin_jauth_init); - oluacls_func(L, "isInitSuccess", _cclua_plugin_jauth_isInitSuccess); - oluacls_func(L, "loginAuth", _cclua_plugin_jauth_loginAuth); - oluacls_func(L, "preLogin", _cclua_plugin_jauth_preLogin); - oluacls_func(L, "setDebug", _cclua_plugin_jauth_setDebug); - oluacls_func(L, "setDispatcher", _cclua_plugin_jauth_setDispatcher); - oluacls_func(L, "setSmsIntervalTime", _cclua_plugin_jauth_setSmsIntervalTime); - oluacls_prop(L, "initSuccess", _cclua_plugin_jauth_isInitSuccess, nullptr); + oluacls_func(L, "__gc", _olua_fun_cclua_plugin_jauth___gc); + oluacls_func(L, "__olua_move", _olua_fun_cclua_plugin_jauth___olua_move); + oluacls_func(L, "checkVerifyEnable", _olua_fun_cclua_plugin_jauth_checkVerifyEnable); + oluacls_func(L, "clearPreLoginCache", _olua_fun_cclua_plugin_jauth_clearPreLoginCache); + oluacls_func(L, "configUI", _olua_fun_cclua_plugin_jauth_configUI); + oluacls_func(L, "dismissLoginAuth", _olua_fun_cclua_plugin_jauth_dismissLoginAuth); + oluacls_func(L, "dispatch", _olua_fun_cclua_plugin_jauth_dispatch); + oluacls_func(L, "getSmsCode", _olua_fun_cclua_plugin_jauth_getSmsCode); + oluacls_func(L, "getToken", _olua_fun_cclua_plugin_jauth_getToken); + oluacls_func(L, "init", _olua_fun_cclua_plugin_jauth_init); + oluacls_func(L, "isInitSuccess", _olua_fun_cclua_plugin_jauth_isInitSuccess); + oluacls_func(L, "loginAuth", _olua_fun_cclua_plugin_jauth_loginAuth); + oluacls_func(L, "preLogin", _olua_fun_cclua_plugin_jauth_preLogin); + oluacls_func(L, "setDebug", _olua_fun_cclua_plugin_jauth_setDebug); + oluacls_func(L, "setDispatcher", _olua_fun_cclua_plugin_jauth_setDispatcher); + oluacls_func(L, "setSmsIntervalTime", _olua_fun_cclua_plugin_jauth_setSmsIntervalTime); + oluacls_prop(L, "initSuccess", _olua_fun_cclua_plugin_jauth_isInitSuccess, nullptr); cclua::runtime::registerFeature("cclua.plugin.jauth.ios", true); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cclua_plugin_jauth(lua_State *L) +{ + olua_require(L, "jauth", luaopen_jauth); + if (!olua_getclass(L, "cclua.plugin.jauth")) { + luaL_error(L, "class not found: cclua::plugin::jauth"); + } + return 1; +} OLUA_END_DECLS #endif @@ -384,7 +394,7 @@ OLUA_BEGIN_DECLS OLUA_LIB int luaopen_jauth(lua_State *L) { #ifdef CCLUA_BUILD_JAUTH - olua_require(L, "cclua.plugin.jauth", luaopen_cclua_plugin_jauth); + olua_require(L, "cclua.plugin.jauth", _olua_cls_cclua_plugin_jauth); #endif return 0; diff --git a/frameworks/plugins/jauth/lua_jauth.h b/frameworks/plugins/jauth/lua_jauth.h index b1bb38db..81cae4da 100644 --- a/frameworks/plugins/jauth/lua_jauth.h +++ b/frameworks/plugins/jauth/lua_jauth.h @@ -1,5 +1,5 @@ // -// AUTO BUILD, DON'T MODIFY! +// AUTO GENERATED, DO NOT MODIFY! // #ifndef __AUTO_GEN_LUA_JAUTH_H__ #define __AUTO_GEN_LUA_JAUTH_H__ diff --git a/frameworks/plugins/jpush/lua_jpush.cpp b/frameworks/plugins/jpush/lua_jpush.cpp index 30229744..9126ae94 100644 --- a/frameworks/plugins/jpush/lua_jpush.cpp +++ b/frameworks/plugins/jpush/lua_jpush.cpp @@ -1,5 +1,5 @@ // -// AUTO BUILD, DON'T MODIFY! +// AUTO GENERATED, DO NOT MODIFY! // #include "lua_jpush.h" #include "lua-bindings/lua_cocos2d_types.h" @@ -7,7 +7,7 @@ #include "jpush/jpush.h" #ifdef CCLUA_BUILD_JPUSH -static int _cclua_plugin_jpush___gc(lua_State *L) +static int _olua_fun_cclua_plugin_jpush___gc(lua_State *L) { olua_startinvoke(L); @@ -19,7 +19,7 @@ static int _cclua_plugin_jpush___gc(lua_State *L) return 0; } -static int _cclua_plugin_jpush___olua_move(lua_State *L) +static int _olua_fun_cclua_plugin_jpush___olua_move(lua_State *L) { olua_startinvoke(L); @@ -31,7 +31,7 @@ static int _cclua_plugin_jpush___olua_move(lua_State *L) return 1; } -static int _cclua_plugin_jpush_addTags(lua_State *L) +static int _olua_fun_cclua_plugin_jpush_addTags(lua_State *L) { olua_startinvoke(L); @@ -49,7 +49,7 @@ static int _cclua_plugin_jpush_addTags(lua_State *L) return 0; } -static int _cclua_plugin_jpush_cleanTags(lua_State *L) +static int _olua_fun_cclua_plugin_jpush_cleanTags(lua_State *L) { olua_startinvoke(L); @@ -61,7 +61,7 @@ static int _cclua_plugin_jpush_cleanTags(lua_State *L) return 0; } -static int _cclua_plugin_jpush_deleteAlias(lua_State *L) +static int _olua_fun_cclua_plugin_jpush_deleteAlias(lua_State *L) { olua_startinvoke(L); @@ -73,7 +73,7 @@ static int _cclua_plugin_jpush_deleteAlias(lua_State *L) return 0; } -static int _cclua_plugin_jpush_deleteTags(lua_State *L) +static int _olua_fun_cclua_plugin_jpush_deleteTags(lua_State *L) { olua_startinvoke(L); @@ -91,7 +91,7 @@ static int _cclua_plugin_jpush_deleteTags(lua_State *L) return 0; } -static int _cclua_plugin_jpush_getRegistrationID(lua_State *L) +static int _olua_fun_cclua_plugin_jpush_getRegistrationID(lua_State *L) { olua_startinvoke(L); @@ -104,7 +104,7 @@ static int _cclua_plugin_jpush_getRegistrationID(lua_State *L) return num_ret; } -static int _cclua_plugin_jpush_init(lua_State *L) +static int _olua_fun_cclua_plugin_jpush_init(lua_State *L) { olua_startinvoke(L); @@ -122,7 +122,7 @@ static int _cclua_plugin_jpush_init(lua_State *L) return 0; } -static int _cclua_plugin_jpush_isEnabled(lua_State *L) +static int _olua_fun_cclua_plugin_jpush_isEnabled(lua_State *L) { olua_startinvoke(L); @@ -135,7 +135,7 @@ static int _cclua_plugin_jpush_isEnabled(lua_State *L) return num_ret; } -static int _cclua_plugin_jpush_requestPermission(lua_State *L) +static int _olua_fun_cclua_plugin_jpush_requestPermission(lua_State *L) { olua_startinvoke(L); @@ -147,7 +147,7 @@ static int _cclua_plugin_jpush_requestPermission(lua_State *L) return 0; } -static int _cclua_plugin_jpush_setAlias(lua_State *L) +static int _olua_fun_cclua_plugin_jpush_setAlias(lua_State *L) { olua_startinvoke(L); @@ -163,7 +163,7 @@ static int _cclua_plugin_jpush_setAlias(lua_State *L) return 0; } -static int _cclua_plugin_jpush_setBadge(lua_State *L) +static int _olua_fun_cclua_plugin_jpush_setBadge(lua_State *L) { olua_startinvoke(L); @@ -179,7 +179,7 @@ static int _cclua_plugin_jpush_setBadge(lua_State *L) return 0; } -static int _cclua_plugin_jpush_setDebug(lua_State *L) +static int _olua_fun_cclua_plugin_jpush_setDebug(lua_State *L) { olua_startinvoke(L); @@ -195,7 +195,7 @@ static int _cclua_plugin_jpush_setDebug(lua_State *L) return 0; } -static int _cclua_plugin_jpush_setLogOFF(lua_State *L) +static int _olua_fun_cclua_plugin_jpush_setLogOFF(lua_State *L) { olua_startinvoke(L); @@ -207,7 +207,7 @@ static int _cclua_plugin_jpush_setLogOFF(lua_State *L) return 0; } -static int _cclua_plugin_jpush_setTags(lua_State *L) +static int _olua_fun_cclua_plugin_jpush_setTags(lua_State *L) { olua_startinvoke(L); @@ -225,32 +225,41 @@ static int _cclua_plugin_jpush_setTags(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cclua_plugin_jpush(lua_State *L) +static int _olua_cls_cclua_plugin_jpush(lua_State *L) { oluacls_class(L, "cclua.plugin.jpush"); - oluacls_func(L, "__gc", _cclua_plugin_jpush___gc); - oluacls_func(L, "__olua_move", _cclua_plugin_jpush___olua_move); - oluacls_func(L, "addTags", _cclua_plugin_jpush_addTags); - oluacls_func(L, "cleanTags", _cclua_plugin_jpush_cleanTags); - oluacls_func(L, "deleteAlias", _cclua_plugin_jpush_deleteAlias); - oluacls_func(L, "deleteTags", _cclua_plugin_jpush_deleteTags); - oluacls_func(L, "getRegistrationID", _cclua_plugin_jpush_getRegistrationID); - oluacls_func(L, "init", _cclua_plugin_jpush_init); - oluacls_func(L, "isEnabled", _cclua_plugin_jpush_isEnabled); - oluacls_func(L, "requestPermission", _cclua_plugin_jpush_requestPermission); - oluacls_func(L, "setAlias", _cclua_plugin_jpush_setAlias); - oluacls_func(L, "setBadge", _cclua_plugin_jpush_setBadge); - oluacls_func(L, "setDebug", _cclua_plugin_jpush_setDebug); - oluacls_func(L, "setLogOFF", _cclua_plugin_jpush_setLogOFF); - oluacls_func(L, "setTags", _cclua_plugin_jpush_setTags); - oluacls_prop(L, "enabled", _cclua_plugin_jpush_isEnabled, nullptr); - oluacls_prop(L, "registrationID", _cclua_plugin_jpush_getRegistrationID, nullptr); + oluacls_func(L, "__gc", _olua_fun_cclua_plugin_jpush___gc); + oluacls_func(L, "__olua_move", _olua_fun_cclua_plugin_jpush___olua_move); + oluacls_func(L, "addTags", _olua_fun_cclua_plugin_jpush_addTags); + oluacls_func(L, "cleanTags", _olua_fun_cclua_plugin_jpush_cleanTags); + oluacls_func(L, "deleteAlias", _olua_fun_cclua_plugin_jpush_deleteAlias); + oluacls_func(L, "deleteTags", _olua_fun_cclua_plugin_jpush_deleteTags); + oluacls_func(L, "getRegistrationID", _olua_fun_cclua_plugin_jpush_getRegistrationID); + oluacls_func(L, "init", _olua_fun_cclua_plugin_jpush_init); + oluacls_func(L, "isEnabled", _olua_fun_cclua_plugin_jpush_isEnabled); + oluacls_func(L, "requestPermission", _olua_fun_cclua_plugin_jpush_requestPermission); + oluacls_func(L, "setAlias", _olua_fun_cclua_plugin_jpush_setAlias); + oluacls_func(L, "setBadge", _olua_fun_cclua_plugin_jpush_setBadge); + oluacls_func(L, "setDebug", _olua_fun_cclua_plugin_jpush_setDebug); + oluacls_func(L, "setLogOFF", _olua_fun_cclua_plugin_jpush_setLogOFF); + oluacls_func(L, "setTags", _olua_fun_cclua_plugin_jpush_setTags); + oluacls_prop(L, "enabled", _olua_fun_cclua_plugin_jpush_isEnabled, nullptr); + oluacls_prop(L, "registrationID", _olua_fun_cclua_plugin_jpush_getRegistrationID, nullptr); cclua::runtime::registerFeature("cclua.plugin.jpush.ios", true); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cclua_plugin_jpush(lua_State *L) +{ + olua_require(L, "jpush", luaopen_jpush); + if (!olua_getclass(L, "cclua.plugin.jpush")) { + luaL_error(L, "class not found: cclua::plugin::jpush"); + } + return 1; +} OLUA_END_DECLS #endif @@ -258,7 +267,7 @@ OLUA_BEGIN_DECLS OLUA_LIB int luaopen_jpush(lua_State *L) { #ifdef CCLUA_BUILD_JPUSH - olua_require(L, "cclua.plugin.jpush", luaopen_cclua_plugin_jpush); + olua_require(L, "cclua.plugin.jpush", _olua_cls_cclua_plugin_jpush); #endif return 0; diff --git a/frameworks/plugins/jpush/lua_jpush.h b/frameworks/plugins/jpush/lua_jpush.h index d3ccdf31..a8d25d4c 100644 --- a/frameworks/plugins/jpush/lua_jpush.h +++ b/frameworks/plugins/jpush/lua_jpush.h @@ -1,5 +1,5 @@ // -// AUTO BUILD, DON'T MODIFY! +// AUTO GENERATED, DO NOT MODIFY! // #ifndef __AUTO_GEN_LUA_JPUSH_H__ #define __AUTO_GEN_LUA_JPUSH_H__ diff --git a/frameworks/plugins/oppo/lua_oppo.cpp b/frameworks/plugins/oppo/lua_oppo.cpp index 7378d8db..cf0eed34 100644 --- a/frameworks/plugins/oppo/lua_oppo.cpp +++ b/frameworks/plugins/oppo/lua_oppo.cpp @@ -1,5 +1,5 @@ // -// AUTO BUILD, DON'T MODIFY! +// AUTO GENERATED, DO NOT MODIFY! // #include "lua_oppo.h" #include "lua-bindings/lua_cocos2d_types.h" @@ -7,7 +7,7 @@ #include "oppo/oppo.h" #ifdef CCLUA_BUILD_OPPO -static int _cclua_plugin_oppo___gc(lua_State *L) +static int _olua_fun_cclua_plugin_oppo___gc(lua_State *L) { olua_startinvoke(L); @@ -19,7 +19,7 @@ static int _cclua_plugin_oppo___gc(lua_State *L) return 0; } -static int _cclua_plugin_oppo___olua_move(lua_State *L) +static int _olua_fun_cclua_plugin_oppo___olua_move(lua_State *L) { olua_startinvoke(L); @@ -31,7 +31,7 @@ static int _cclua_plugin_oppo___olua_move(lua_State *L) return 1; } -static int _cclua_plugin_oppo_dispatch(lua_State *L) +static int _olua_fun_cclua_plugin_oppo_dispatch(lua_State *L) { olua_startinvoke(L); @@ -49,7 +49,7 @@ static int _cclua_plugin_oppo_dispatch(lua_State *L) return 0; } -static int _cclua_plugin_oppo_init(lua_State *L) +static int _olua_fun_cclua_plugin_oppo_init(lua_State *L) { olua_startinvoke(L); @@ -61,7 +61,7 @@ static int _cclua_plugin_oppo_init(lua_State *L) return 0; } -static int _cclua_plugin_oppo_pay(lua_State *L) +static int _olua_fun_cclua_plugin_oppo_pay(lua_State *L) { olua_startinvoke(L); @@ -87,7 +87,7 @@ static int _cclua_plugin_oppo_pay(lua_State *L) return 0; } -static int _cclua_plugin_oppo_setDispatcher(lua_State *L) +static int _olua_fun_cclua_plugin_oppo_setDispatcher(lua_State *L) { olua_startinvoke(L); @@ -97,9 +97,10 @@ static int _cclua_plugin_oppo_setDispatcher(lua_State *L) void *cb_store = (void *)olua_pushclassobj(L, "cclua.plugin.oppo"); std::string cb_tag = "Dispatcher"; - std::string cb_name = olua_setcallback(L, cb_store, 1, cb_tag.c_str(), OLUA_TAG_REPLACE); + std::string cb_name = olua_setcallback(L, cb_store, 1, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](const std::string &arg1, const cocos2d::Value &arg2) { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](const std::string &cb_arg1, const cocos2d::Value &cb_arg2) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); @@ -107,8 +108,8 @@ static int _cclua_plugin_oppo_setDispatcher(lua_State *L) int top = lua_gettop(L); size_t last = olua_push_objpool(L); olua_enable_objpool(L); - olua_push_string(L, arg1); - olua_push_cocos2d_Value(L, arg2); + olua_push_string(L, cb_arg1); + olua_push_cocos2d_Value(L, cb_arg2); olua_disable_objpool(L); olua_callback(L, cb_store, cb_name.c_str(), 2); @@ -119,7 +120,7 @@ static int _cclua_plugin_oppo_setDispatcher(lua_State *L) } }; - // static void setDispatcher(@localvar const cclua::Callback &dispatcher) + // static void setDispatcher(const cclua::Callback &dispatcher) cclua::plugin::oppo::setDispatcher(arg1); olua_endinvoke(L); @@ -127,17 +128,26 @@ static int _cclua_plugin_oppo_setDispatcher(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cclua_plugin_oppo(lua_State *L) +static int _olua_cls_cclua_plugin_oppo(lua_State *L) { oluacls_class(L, "cclua.plugin.oppo"); - oluacls_func(L, "__gc", _cclua_plugin_oppo___gc); - oluacls_func(L, "__olua_move", _cclua_plugin_oppo___olua_move); - oluacls_func(L, "dispatch", _cclua_plugin_oppo_dispatch); - oluacls_func(L, "init", _cclua_plugin_oppo_init); - oluacls_func(L, "pay", _cclua_plugin_oppo_pay); - oluacls_func(L, "setDispatcher", _cclua_plugin_oppo_setDispatcher); + oluacls_func(L, "__gc", _olua_fun_cclua_plugin_oppo___gc); + oluacls_func(L, "__olua_move", _olua_fun_cclua_plugin_oppo___olua_move); + oluacls_func(L, "dispatch", _olua_fun_cclua_plugin_oppo_dispatch); + oluacls_func(L, "init", _olua_fun_cclua_plugin_oppo_init); + oluacls_func(L, "pay", _olua_fun_cclua_plugin_oppo_pay); + oluacls_func(L, "setDispatcher", _olua_fun_cclua_plugin_oppo_setDispatcher); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cclua_plugin_oppo(lua_State *L) +{ + olua_require(L, "oppo", luaopen_oppo); + if (!olua_getclass(L, "cclua.plugin.oppo")) { + luaL_error(L, "class not found: cclua::plugin::oppo"); + } return 1; } OLUA_END_DECLS @@ -147,7 +157,7 @@ OLUA_BEGIN_DECLS OLUA_LIB int luaopen_oppo(lua_State *L) { #ifdef CCLUA_BUILD_OPPO - olua_require(L, "cclua.plugin.oppo", luaopen_cclua_plugin_oppo); + olua_require(L, "cclua.plugin.oppo", _olua_cls_cclua_plugin_oppo); #endif return 0; diff --git a/frameworks/plugins/oppo/lua_oppo.h b/frameworks/plugins/oppo/lua_oppo.h index 6360a104..5bdd3f9f 100644 --- a/frameworks/plugins/oppo/lua_oppo.h +++ b/frameworks/plugins/oppo/lua_oppo.h @@ -1,5 +1,5 @@ // -// AUTO BUILD, DON'T MODIFY! +// AUTO GENERATED, DO NOT MODIFY! // #ifndef __AUTO_GEN_LUA_OPPO_H__ #define __AUTO_GEN_LUA_OPPO_H__ diff --git a/frameworks/plugins/talkingdata/lua_talkingdata.cpp b/frameworks/plugins/talkingdata/lua_talkingdata.cpp index 8c6ef23c..06e2170b 100644 --- a/frameworks/plugins/talkingdata/lua_talkingdata.cpp +++ b/frameworks/plugins/talkingdata/lua_talkingdata.cpp @@ -1,5 +1,5 @@ // -// AUTO BUILD, DON'T MODIFY! +// AUTO GENERATED, DO NOT MODIFY! // #include "lua_talkingdata.h" #include "lua-bindings/lua_cocos2d_types.h" @@ -7,7 +7,7 @@ #include "talkingdata/talkingdata.h" #ifdef CCLUA_BUILD_TALKINGDATA -static int _cclua_plugin_talkingdata___gc(lua_State *L) +static int _olua_fun_cclua_plugin_talkingdata___gc(lua_State *L) { olua_startinvoke(L); @@ -19,7 +19,7 @@ static int _cclua_plugin_talkingdata___gc(lua_State *L) return 0; } -static int _cclua_plugin_talkingdata___olua_move(lua_State *L) +static int _olua_fun_cclua_plugin_talkingdata___olua_move(lua_State *L) { olua_startinvoke(L); @@ -31,7 +31,7 @@ static int _cclua_plugin_talkingdata___olua_move(lua_State *L) return 1; } -static int _cclua_plugin_talkingdata_backgroundSessionEnabled(lua_State *L) +static int _olua_fun_cclua_plugin_talkingdata_backgroundSessionEnabled(lua_State *L) { olua_startinvoke(L); @@ -43,7 +43,7 @@ static int _cclua_plugin_talkingdata_backgroundSessionEnabled(lua_State *L) return 0; } -static int _cclua_plugin_talkingdata_getDeviceId(lua_State *L) +static int _olua_fun_cclua_plugin_talkingdata_getDeviceId(lua_State *L) { olua_startinvoke(L); @@ -56,7 +56,7 @@ static int _cclua_plugin_talkingdata_getDeviceId(lua_State *L) return num_ret; } -static int _cclua_plugin_talkingdata_init$1(lua_State *L) +static int _olua_fun_cclua_plugin_talkingdata_init$1(lua_State *L) { olua_startinvoke(L); @@ -76,7 +76,7 @@ static int _cclua_plugin_talkingdata_init$1(lua_State *L) return 0; } -static int _cclua_plugin_talkingdata_init$2(lua_State *L) +static int _olua_fun_cclua_plugin_talkingdata_init$2(lua_State *L) { olua_startinvoke(L); @@ -86,7 +86,7 @@ static int _cclua_plugin_talkingdata_init$2(lua_State *L) olua_check_string(L, 1, &arg1); olua_check_string(L, 2, &arg2); - // static void init(const std::string &appkey, const std::string &channel, @optional const std::string &custom) + // static void init(const std::string &appkey, const std::string &channel) cclua::plugin::talkingdata::init(arg1, arg2); olua_endinvoke(L); @@ -94,21 +94,21 @@ static int _cclua_plugin_talkingdata_init$2(lua_State *L) return 0; } -static int _cclua_plugin_talkingdata_init(lua_State *L) +static int _olua_fun_cclua_plugin_talkingdata_init(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 2) { // if ((olua_is_string(L, 1)) && (olua_is_string(L, 2))) { - // static void init(const std::string &appkey, const std::string &channel, @optional const std::string &custom) - return _cclua_plugin_talkingdata_init$2(L); + // static void init(const std::string &appkey, const std::string &channel) + return _olua_fun_cclua_plugin_talkingdata_init$2(L); // } } if (num_args == 3) { // if ((olua_is_string(L, 1)) && (olua_is_string(L, 2)) && (olua_is_string(L, 3))) { // static void init(const std::string &appkey, const std::string &channel, @optional const std::string &custom) - return _cclua_plugin_talkingdata_init$1(L); + return _olua_fun_cclua_plugin_talkingdata_init$1(L); // } } @@ -117,7 +117,7 @@ static int _cclua_plugin_talkingdata_init(lua_State *L) return 0; } -static int _cclua_plugin_talkingdata_onCreateCard(lua_State *L) +static int _olua_fun_cclua_plugin_talkingdata_onCreateCard(lua_State *L) { olua_startinvoke(L); @@ -137,7 +137,7 @@ static int _cclua_plugin_talkingdata_onCreateCard(lua_State *L) return 0; } -static int _cclua_plugin_talkingdata_onEvent(lua_State *L) +static int _olua_fun_cclua_plugin_talkingdata_onEvent(lua_State *L) { olua_startinvoke(L); @@ -157,7 +157,7 @@ static int _cclua_plugin_talkingdata_onEvent(lua_State *L) return 0; } -static int _cclua_plugin_talkingdata_onFavorite(lua_State *L) +static int _olua_fun_cclua_plugin_talkingdata_onFavorite(lua_State *L) { olua_startinvoke(L); @@ -175,7 +175,7 @@ static int _cclua_plugin_talkingdata_onFavorite(lua_State *L) return 0; } -static int _cclua_plugin_talkingdata_onLogin(lua_State *L) +static int _olua_fun_cclua_plugin_talkingdata_onLogin(lua_State *L) { olua_startinvoke(L); @@ -193,7 +193,7 @@ static int _cclua_plugin_talkingdata_onLogin(lua_State *L) return 0; } -static int _cclua_plugin_talkingdata_onPageBegin(lua_State *L) +static int _olua_fun_cclua_plugin_talkingdata_onPageBegin(lua_State *L) { olua_startinvoke(L); @@ -209,7 +209,7 @@ static int _cclua_plugin_talkingdata_onPageBegin(lua_State *L) return 0; } -static int _cclua_plugin_talkingdata_onPageEnd(lua_State *L) +static int _olua_fun_cclua_plugin_talkingdata_onPageEnd(lua_State *L) { olua_startinvoke(L); @@ -225,7 +225,7 @@ static int _cclua_plugin_talkingdata_onPageEnd(lua_State *L) return 0; } -static int _cclua_plugin_talkingdata_onProfileUpdate(lua_State *L) +static int _olua_fun_cclua_plugin_talkingdata_onProfileUpdate(lua_State *L) { olua_startinvoke(L); @@ -241,7 +241,7 @@ static int _cclua_plugin_talkingdata_onProfileUpdate(lua_State *L) return 0; } -static int _cclua_plugin_talkingdata_onPunch(lua_State *L) +static int _olua_fun_cclua_plugin_talkingdata_onPunch(lua_State *L) { olua_startinvoke(L); @@ -259,7 +259,7 @@ static int _cclua_plugin_talkingdata_onPunch(lua_State *L) return 0; } -static int _cclua_plugin_talkingdata_onReceiveDeepLink(lua_State *L) +static int _olua_fun_cclua_plugin_talkingdata_onReceiveDeepLink(lua_State *L) { olua_startinvoke(L); @@ -275,7 +275,7 @@ static int _cclua_plugin_talkingdata_onReceiveDeepLink(lua_State *L) return 0; } -static int _cclua_plugin_talkingdata_onRegister(lua_State *L) +static int _olua_fun_cclua_plugin_talkingdata_onRegister(lua_State *L) { olua_startinvoke(L); @@ -295,7 +295,7 @@ static int _cclua_plugin_talkingdata_onRegister(lua_State *L) return 0; } -static int _cclua_plugin_talkingdata_onSearch(lua_State *L) +static int _olua_fun_cclua_plugin_talkingdata_onSearch(lua_State *L) { olua_startinvoke(L); @@ -311,7 +311,7 @@ static int _cclua_plugin_talkingdata_onSearch(lua_State *L) return 0; } -static int _cclua_plugin_talkingdata_onShare(lua_State *L) +static int _olua_fun_cclua_plugin_talkingdata_onShare(lua_State *L) { olua_startinvoke(L); @@ -329,7 +329,7 @@ static int _cclua_plugin_talkingdata_onShare(lua_State *L) return 0; } -static int _cclua_plugin_talkingdata_removeGlobalKV(lua_State *L) +static int _olua_fun_cclua_plugin_talkingdata_removeGlobalKV(lua_State *L) { olua_startinvoke(L); @@ -345,7 +345,7 @@ static int _cclua_plugin_talkingdata_removeGlobalKV(lua_State *L) return 0; } -static int _cclua_plugin_talkingdata_setConfigurationDisable(lua_State *L) +static int _olua_fun_cclua_plugin_talkingdata_setConfigurationDisable(lua_State *L) { olua_startinvoke(L); @@ -361,7 +361,7 @@ static int _cclua_plugin_talkingdata_setConfigurationDisable(lua_State *L) return 0; } -static int _cclua_plugin_talkingdata_setExceptionReportEnabled(lua_State *L) +static int _olua_fun_cclua_plugin_talkingdata_setExceptionReportEnabled(lua_State *L) { olua_startinvoke(L); @@ -377,7 +377,7 @@ static int _cclua_plugin_talkingdata_setExceptionReportEnabled(lua_State *L) return 0; } -static int _cclua_plugin_talkingdata_setGlobalKV(lua_State *L) +static int _olua_fun_cclua_plugin_talkingdata_setGlobalKV(lua_State *L) { olua_startinvoke(L); @@ -395,7 +395,7 @@ static int _cclua_plugin_talkingdata_setGlobalKV(lua_State *L) return 0; } -static int _cclua_plugin_talkingdata_setLocation(lua_State *L) +static int _olua_fun_cclua_plugin_talkingdata_setLocation(lua_State *L) { olua_startinvoke(L); @@ -413,7 +413,7 @@ static int _cclua_plugin_talkingdata_setLocation(lua_State *L) return 0; } -static int _cclua_plugin_talkingdata_setSignalReportEnabled(lua_State *L) +static int _olua_fun_cclua_plugin_talkingdata_setSignalReportEnabled(lua_State *L) { olua_startinvoke(L); @@ -429,7 +429,7 @@ static int _cclua_plugin_talkingdata_setSignalReportEnabled(lua_State *L) return 0; } -static int _cclua_plugin_talkingdata_setVendorId(lua_State *L) +static int _olua_fun_cclua_plugin_talkingdata_setVendorId(lua_State *L) { olua_startinvoke(L); @@ -447,7 +447,7 @@ static int _cclua_plugin_talkingdata_setVendorId(lua_State *L) return 0; } -static int _cclua_plugin_talkingdata_setVerboseLogDisable(lua_State *L) +static int _olua_fun_cclua_plugin_talkingdata_setVerboseLogDisable(lua_State *L) { olua_startinvoke(L); @@ -459,41 +459,50 @@ static int _cclua_plugin_talkingdata_setVerboseLogDisable(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cclua_plugin_talkingdata(lua_State *L) +static int _olua_cls_cclua_plugin_talkingdata(lua_State *L) { oluacls_class(L, "cclua.plugin.talkingdata"); - oluacls_func(L, "__gc", _cclua_plugin_talkingdata___gc); - oluacls_func(L, "__olua_move", _cclua_plugin_talkingdata___olua_move); - oluacls_func(L, "backgroundSessionEnabled", _cclua_plugin_talkingdata_backgroundSessionEnabled); - oluacls_func(L, "getDeviceId", _cclua_plugin_talkingdata_getDeviceId); - oluacls_func(L, "init", _cclua_plugin_talkingdata_init); - oluacls_func(L, "onCreateCard", _cclua_plugin_talkingdata_onCreateCard); - oluacls_func(L, "onEvent", _cclua_plugin_talkingdata_onEvent); - oluacls_func(L, "onFavorite", _cclua_plugin_talkingdata_onFavorite); - oluacls_func(L, "onLogin", _cclua_plugin_talkingdata_onLogin); - oluacls_func(L, "onPageBegin", _cclua_plugin_talkingdata_onPageBegin); - oluacls_func(L, "onPageEnd", _cclua_plugin_talkingdata_onPageEnd); - oluacls_func(L, "onProfileUpdate", _cclua_plugin_talkingdata_onProfileUpdate); - oluacls_func(L, "onPunch", _cclua_plugin_talkingdata_onPunch); - oluacls_func(L, "onReceiveDeepLink", _cclua_plugin_talkingdata_onReceiveDeepLink); - oluacls_func(L, "onRegister", _cclua_plugin_talkingdata_onRegister); - oluacls_func(L, "onSearch", _cclua_plugin_talkingdata_onSearch); - oluacls_func(L, "onShare", _cclua_plugin_talkingdata_onShare); - oluacls_func(L, "removeGlobalKV", _cclua_plugin_talkingdata_removeGlobalKV); - oluacls_func(L, "setConfigurationDisable", _cclua_plugin_talkingdata_setConfigurationDisable); - oluacls_func(L, "setExceptionReportEnabled", _cclua_plugin_talkingdata_setExceptionReportEnabled); - oluacls_func(L, "setGlobalKV", _cclua_plugin_talkingdata_setGlobalKV); - oluacls_func(L, "setLocation", _cclua_plugin_talkingdata_setLocation); - oluacls_func(L, "setSignalReportEnabled", _cclua_plugin_talkingdata_setSignalReportEnabled); - oluacls_func(L, "setVendorId", _cclua_plugin_talkingdata_setVendorId); - oluacls_func(L, "setVerboseLogDisable", _cclua_plugin_talkingdata_setVerboseLogDisable); - oluacls_prop(L, "deviceId", _cclua_plugin_talkingdata_getDeviceId, nullptr); + oluacls_func(L, "__gc", _olua_fun_cclua_plugin_talkingdata___gc); + oluacls_func(L, "__olua_move", _olua_fun_cclua_plugin_talkingdata___olua_move); + oluacls_func(L, "backgroundSessionEnabled", _olua_fun_cclua_plugin_talkingdata_backgroundSessionEnabled); + oluacls_func(L, "getDeviceId", _olua_fun_cclua_plugin_talkingdata_getDeviceId); + oluacls_func(L, "init", _olua_fun_cclua_plugin_talkingdata_init); + oluacls_func(L, "onCreateCard", _olua_fun_cclua_plugin_talkingdata_onCreateCard); + oluacls_func(L, "onEvent", _olua_fun_cclua_plugin_talkingdata_onEvent); + oluacls_func(L, "onFavorite", _olua_fun_cclua_plugin_talkingdata_onFavorite); + oluacls_func(L, "onLogin", _olua_fun_cclua_plugin_talkingdata_onLogin); + oluacls_func(L, "onPageBegin", _olua_fun_cclua_plugin_talkingdata_onPageBegin); + oluacls_func(L, "onPageEnd", _olua_fun_cclua_plugin_talkingdata_onPageEnd); + oluacls_func(L, "onProfileUpdate", _olua_fun_cclua_plugin_talkingdata_onProfileUpdate); + oluacls_func(L, "onPunch", _olua_fun_cclua_plugin_talkingdata_onPunch); + oluacls_func(L, "onReceiveDeepLink", _olua_fun_cclua_plugin_talkingdata_onReceiveDeepLink); + oluacls_func(L, "onRegister", _olua_fun_cclua_plugin_talkingdata_onRegister); + oluacls_func(L, "onSearch", _olua_fun_cclua_plugin_talkingdata_onSearch); + oluacls_func(L, "onShare", _olua_fun_cclua_plugin_talkingdata_onShare); + oluacls_func(L, "removeGlobalKV", _olua_fun_cclua_plugin_talkingdata_removeGlobalKV); + oluacls_func(L, "setConfigurationDisable", _olua_fun_cclua_plugin_talkingdata_setConfigurationDisable); + oluacls_func(L, "setExceptionReportEnabled", _olua_fun_cclua_plugin_talkingdata_setExceptionReportEnabled); + oluacls_func(L, "setGlobalKV", _olua_fun_cclua_plugin_talkingdata_setGlobalKV); + oluacls_func(L, "setLocation", _olua_fun_cclua_plugin_talkingdata_setLocation); + oluacls_func(L, "setSignalReportEnabled", _olua_fun_cclua_plugin_talkingdata_setSignalReportEnabled); + oluacls_func(L, "setVendorId", _olua_fun_cclua_plugin_talkingdata_setVendorId); + oluacls_func(L, "setVerboseLogDisable", _olua_fun_cclua_plugin_talkingdata_setVerboseLogDisable); + oluacls_prop(L, "deviceId", _olua_fun_cclua_plugin_talkingdata_getDeviceId, nullptr); cclua::runtime::registerFeature("cclua.plugin.talkingdata.ios", true); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cclua_plugin_talkingdata(lua_State *L) +{ + olua_require(L, "talkingdata", luaopen_talkingdata); + if (!olua_getclass(L, "cclua.plugin.talkingdata")) { + luaL_error(L, "class not found: cclua::plugin::talkingdata"); + } + return 1; +} OLUA_END_DECLS #endif @@ -501,7 +510,7 @@ OLUA_BEGIN_DECLS OLUA_LIB int luaopen_talkingdata(lua_State *L) { #ifdef CCLUA_BUILD_TALKINGDATA - olua_require(L, "cclua.plugin.talkingdata", luaopen_cclua_plugin_talkingdata); + olua_require(L, "cclua.plugin.talkingdata", _olua_cls_cclua_plugin_talkingdata); #endif return 0; diff --git a/frameworks/plugins/talkingdata/lua_talkingdata.h b/frameworks/plugins/talkingdata/lua_talkingdata.h index c4081eb8..85097c88 100644 --- a/frameworks/plugins/talkingdata/lua_talkingdata.h +++ b/frameworks/plugins/talkingdata/lua_talkingdata.h @@ -1,5 +1,5 @@ // -// AUTO BUILD, DON'T MODIFY! +// AUTO GENERATED, DO NOT MODIFY! // #ifndef __AUTO_GEN_LUA_TALKINGDATA_H__ #define __AUTO_GEN_LUA_TALKINGDATA_H__ diff --git a/frameworks/plugins/vivo/lua_vivo.cpp b/frameworks/plugins/vivo/lua_vivo.cpp index 1e607173..e027b405 100644 --- a/frameworks/plugins/vivo/lua_vivo.cpp +++ b/frameworks/plugins/vivo/lua_vivo.cpp @@ -1,5 +1,5 @@ // -// AUTO BUILD, DON'T MODIFY! +// AUTO GENERATED, DO NOT MODIFY! // #include "lua_vivo.h" #include "lua-bindings/lua_cocos2d_types.h" @@ -7,7 +7,7 @@ #include "vivo/vivo.h" #ifdef CCLUA_BUILD_VIVO -static int _cclua_plugin_vivo___gc(lua_State *L) +static int _olua_fun_cclua_plugin_vivo___gc(lua_State *L) { olua_startinvoke(L); @@ -19,7 +19,7 @@ static int _cclua_plugin_vivo___gc(lua_State *L) return 0; } -static int _cclua_plugin_vivo___olua_move(lua_State *L) +static int _olua_fun_cclua_plugin_vivo___olua_move(lua_State *L) { olua_startinvoke(L); @@ -31,7 +31,7 @@ static int _cclua_plugin_vivo___olua_move(lua_State *L) return 1; } -static int _cclua_plugin_vivo_dispatch(lua_State *L) +static int _olua_fun_cclua_plugin_vivo_dispatch(lua_State *L) { olua_startinvoke(L); @@ -49,7 +49,7 @@ static int _cclua_plugin_vivo_dispatch(lua_State *L) return 0; } -static int _cclua_plugin_vivo_init(lua_State *L) +static int _olua_fun_cclua_plugin_vivo_init(lua_State *L) { olua_startinvoke(L); @@ -61,7 +61,7 @@ static int _cclua_plugin_vivo_init(lua_State *L) return 0; } -static int _cclua_plugin_vivo_pay(lua_State *L) +static int _olua_fun_cclua_plugin_vivo_pay(lua_State *L) { olua_startinvoke(L); @@ -89,7 +89,7 @@ static int _cclua_plugin_vivo_pay(lua_State *L) return 0; } -static int _cclua_plugin_vivo_setDispatcher(lua_State *L) +static int _olua_fun_cclua_plugin_vivo_setDispatcher(lua_State *L) { olua_startinvoke(L); @@ -99,9 +99,10 @@ static int _cclua_plugin_vivo_setDispatcher(lua_State *L) void *cb_store = (void *)olua_pushclassobj(L, "cclua.plugin.vivo"); std::string cb_tag = "Dispatcher"; - std::string cb_name = olua_setcallback(L, cb_store, 1, cb_tag.c_str(), OLUA_TAG_REPLACE); + std::string cb_name = olua_setcallback(L, cb_store, 1, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](const std::string &arg1, const cocos2d::Value &arg2) { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](const std::string &cb_arg1, const cocos2d::Value &cb_arg2) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); @@ -109,8 +110,8 @@ static int _cclua_plugin_vivo_setDispatcher(lua_State *L) int top = lua_gettop(L); size_t last = olua_push_objpool(L); olua_enable_objpool(L); - olua_push_string(L, arg1); - olua_push_cocos2d_Value(L, arg2); + olua_push_string(L, cb_arg1); + olua_push_cocos2d_Value(L, cb_arg2); olua_disable_objpool(L); olua_callback(L, cb_store, cb_name.c_str(), 2); @@ -121,7 +122,7 @@ static int _cclua_plugin_vivo_setDispatcher(lua_State *L) } }; - // static void setDispatcher(@localvar const cclua::Callback &dispatcher) + // static void setDispatcher(const cclua::Callback &dispatcher) cclua::plugin::vivo::setDispatcher(arg1); olua_endinvoke(L); @@ -129,17 +130,26 @@ static int _cclua_plugin_vivo_setDispatcher(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cclua_plugin_vivo(lua_State *L) +static int _olua_cls_cclua_plugin_vivo(lua_State *L) { oluacls_class(L, "cclua.plugin.vivo"); - oluacls_func(L, "__gc", _cclua_plugin_vivo___gc); - oluacls_func(L, "__olua_move", _cclua_plugin_vivo___olua_move); - oluacls_func(L, "dispatch", _cclua_plugin_vivo_dispatch); - oluacls_func(L, "init", _cclua_plugin_vivo_init); - oluacls_func(L, "pay", _cclua_plugin_vivo_pay); - oluacls_func(L, "setDispatcher", _cclua_plugin_vivo_setDispatcher); + oluacls_func(L, "__gc", _olua_fun_cclua_plugin_vivo___gc); + oluacls_func(L, "__olua_move", _olua_fun_cclua_plugin_vivo___olua_move); + oluacls_func(L, "dispatch", _olua_fun_cclua_plugin_vivo_dispatch); + oluacls_func(L, "init", _olua_fun_cclua_plugin_vivo_init); + oluacls_func(L, "pay", _olua_fun_cclua_plugin_vivo_pay); + oluacls_func(L, "setDispatcher", _olua_fun_cclua_plugin_vivo_setDispatcher); + + return 1; +} +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cclua_plugin_vivo(lua_State *L) +{ + olua_require(L, "vivo", luaopen_vivo); + if (!olua_getclass(L, "cclua.plugin.vivo")) { + luaL_error(L, "class not found: cclua::plugin::vivo"); + } return 1; } OLUA_END_DECLS @@ -149,7 +159,7 @@ OLUA_BEGIN_DECLS OLUA_LIB int luaopen_vivo(lua_State *L) { #ifdef CCLUA_BUILD_VIVO - olua_require(L, "cclua.plugin.vivo", luaopen_cclua_plugin_vivo); + olua_require(L, "cclua.plugin.vivo", _olua_cls_cclua_plugin_vivo); #endif return 0; diff --git a/frameworks/plugins/vivo/lua_vivo.h b/frameworks/plugins/vivo/lua_vivo.h index d65f9025..37b8beab 100644 --- a/frameworks/plugins/vivo/lua_vivo.h +++ b/frameworks/plugins/vivo/lua_vivo.h @@ -1,5 +1,5 @@ // -// AUTO BUILD, DON'T MODIFY! +// AUTO GENERATED, DO NOT MODIFY! // #ifndef __AUTO_GEN_LUA_VIVO_H__ #define __AUTO_GEN_LUA_VIVO_H__ diff --git a/frameworks/plugins/wechat/lua_wechat.cpp b/frameworks/plugins/wechat/lua_wechat.cpp index 2b5a4417..0b010863 100644 --- a/frameworks/plugins/wechat/lua_wechat.cpp +++ b/frameworks/plugins/wechat/lua_wechat.cpp @@ -1,5 +1,5 @@ // -// AUTO BUILD, DON'T MODIFY! +// AUTO GENERATED, DO NOT MODIFY! // #include "lua_wechat.h" #include "lua-bindings/lua_cocos2d_types.h" @@ -7,8 +7,7 @@ #include "wechat/wechat.h" #ifdef CCLUA_BUILD_WECHAT -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cclua_plugin_wechat_ShareType(lua_State *L) +static int _olua_cls_cclua_plugin_wechat_ShareType(lua_State *L) { oluacls_class(L, "cclua.plugin.wechat.ShareType"); oluacls_func(L, "__index", olua_indexerror); @@ -22,12 +21,21 @@ OLUA_LIB int luaopen_cclua_plugin_wechat_ShareType(lua_State *L) return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cclua_plugin_wechat_ShareType(lua_State *L) +{ + olua_require(L, "wechat", luaopen_wechat); + if (!olua_getclass(L, "cclua.plugin.wechat.ShareType")) { + luaL_error(L, "class not found: cclua::plugin::wechat::ShareType"); + } + return 1; +} OLUA_END_DECLS #endif #ifdef CCLUA_BUILD_WECHAT -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cclua_plugin_wechat_ProgramType(lua_State *L) +static int _olua_cls_cclua_plugin_wechat_ProgramType(lua_State *L) { oluacls_class(L, "cclua.plugin.wechat.ProgramType"); oluacls_func(L, "__index", olua_indexerror); @@ -38,11 +46,21 @@ OLUA_LIB int luaopen_cclua_plugin_wechat_ProgramType(lua_State *L) return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cclua_plugin_wechat_ProgramType(lua_State *L) +{ + olua_require(L, "wechat", luaopen_wechat); + if (!olua_getclass(L, "cclua.plugin.wechat.ProgramType")) { + luaL_error(L, "class not found: cclua::plugin::wechat::ProgramType"); + } + return 1; +} OLUA_END_DECLS #endif #ifdef CCLUA_BUILD_WECHAT -static int _cclua_plugin_wechat___gc(lua_State *L) +static int _olua_fun_cclua_plugin_wechat___gc(lua_State *L) { olua_startinvoke(L); @@ -54,7 +72,7 @@ static int _cclua_plugin_wechat___gc(lua_State *L) return 0; } -static int _cclua_plugin_wechat___olua_move(lua_State *L) +static int _olua_fun_cclua_plugin_wechat___olua_move(lua_State *L) { olua_startinvoke(L); @@ -66,7 +84,7 @@ static int _cclua_plugin_wechat___olua_move(lua_State *L) return 1; } -static int _cclua_plugin_wechat_auth(lua_State *L) +static int _olua_fun_cclua_plugin_wechat_auth(lua_State *L) { olua_startinvoke(L); @@ -84,7 +102,7 @@ static int _cclua_plugin_wechat_auth(lua_State *L) return 0; } -static int _cclua_plugin_wechat_authQRCode(lua_State *L) +static int _olua_fun_cclua_plugin_wechat_authQRCode(lua_State *L) { olua_startinvoke(L); @@ -108,7 +126,7 @@ static int _cclua_plugin_wechat_authQRCode(lua_State *L) return 0; } -static int _cclua_plugin_wechat_dispatch(lua_State *L) +static int _olua_fun_cclua_plugin_wechat_dispatch(lua_State *L) { olua_startinvoke(L); @@ -126,7 +144,7 @@ static int _cclua_plugin_wechat_dispatch(lua_State *L) return 0; } -static int _cclua_plugin_wechat_init(lua_State *L) +static int _olua_fun_cclua_plugin_wechat_init(lua_State *L) { olua_startinvoke(L); @@ -144,7 +162,7 @@ static int _cclua_plugin_wechat_init(lua_State *L) return 0; } -static int _cclua_plugin_wechat_isInstalled(lua_State *L) +static int _olua_fun_cclua_plugin_wechat_isInstalled(lua_State *L) { olua_startinvoke(L); @@ -157,7 +175,7 @@ static int _cclua_plugin_wechat_isInstalled(lua_State *L) return num_ret; } -static int _cclua_plugin_wechat_open$1(lua_State *L) +static int _olua_fun_cclua_plugin_wechat_open$1(lua_State *L) { olua_startinvoke(L); @@ -177,7 +195,7 @@ static int _cclua_plugin_wechat_open$1(lua_State *L) return 0; } -static int _cclua_plugin_wechat_open$2(lua_State *L) +static int _olua_fun_cclua_plugin_wechat_open$2(lua_State *L) { olua_startinvoke(L); @@ -185,7 +203,7 @@ static int _cclua_plugin_wechat_open$2(lua_State *L) olua_check_string(L, 1, &arg1); - // static void open(const std::string &username, @optional const std::string &path, @optional cclua::plugin::wechat::ProgramType type) + // static void open(const std::string &username) cclua::plugin::wechat::open(arg1); olua_endinvoke(L); @@ -193,7 +211,7 @@ static int _cclua_plugin_wechat_open$2(lua_State *L) return 0; } -static int _cclua_plugin_wechat_open$3(lua_State *L) +static int _olua_fun_cclua_plugin_wechat_open$3(lua_State *L) { olua_startinvoke(L); @@ -203,7 +221,7 @@ static int _cclua_plugin_wechat_open$3(lua_State *L) olua_check_string(L, 1, &arg1); olua_check_string(L, 2, &arg2); - // static void open(const std::string &username, @optional const std::string &path, @optional cclua::plugin::wechat::ProgramType type) + // static void open(const std::string &username, @optional const std::string &path) cclua::plugin::wechat::open(arg1, arg2); olua_endinvoke(L); @@ -211,28 +229,28 @@ static int _cclua_plugin_wechat_open$3(lua_State *L) return 0; } -static int _cclua_plugin_wechat_open(lua_State *L) +static int _olua_fun_cclua_plugin_wechat_open(lua_State *L) { int num_args = lua_gettop(L); if (num_args == 1) { // if ((olua_is_string(L, 1))) { - // static void open(const std::string &username, @optional const std::string &path, @optional cclua::plugin::wechat::ProgramType type) - return _cclua_plugin_wechat_open$2(L); + // static void open(const std::string &username) + return _olua_fun_cclua_plugin_wechat_open$2(L); // } } if (num_args == 2) { // if ((olua_is_string(L, 1)) && (olua_is_string(L, 2))) { - // static void open(const std::string &username, @optional const std::string &path, @optional cclua::plugin::wechat::ProgramType type) - return _cclua_plugin_wechat_open$3(L); + // static void open(const std::string &username, @optional const std::string &path) + return _olua_fun_cclua_plugin_wechat_open$3(L); // } } if (num_args == 3) { // if ((olua_is_string(L, 1)) && (olua_is_string(L, 2)) && (olua_is_enum(L, 3))) { // static void open(const std::string &username, @optional const std::string &path, @optional cclua::plugin::wechat::ProgramType type) - return _cclua_plugin_wechat_open$1(L); + return _olua_fun_cclua_plugin_wechat_open$1(L); // } } @@ -241,7 +259,7 @@ static int _cclua_plugin_wechat_open(lua_State *L) return 0; } -static int _cclua_plugin_wechat_openCustomerService(lua_State *L) +static int _olua_fun_cclua_plugin_wechat_openCustomerService(lua_State *L) { olua_startinvoke(L); @@ -260,7 +278,7 @@ static int _cclua_plugin_wechat_openCustomerService(lua_State *L) } #ifdef CCLUA_OS_ANDROID -static int _cclua_plugin_wechat_pay(lua_State *L) +static int _olua_fun_cclua_plugin_wechat_pay(lua_State *L) { olua_startinvoke(L); @@ -287,7 +305,7 @@ static int _cclua_plugin_wechat_pay(lua_State *L) } #endif -static int _cclua_plugin_wechat_setDispatcher(lua_State *L) +static int _olua_fun_cclua_plugin_wechat_setDispatcher(lua_State *L) { olua_startinvoke(L); @@ -297,9 +315,10 @@ static int _cclua_plugin_wechat_setDispatcher(lua_State *L) void *cb_store = (void *)olua_pushclassobj(L, "cclua.plugin.wechat"); std::string cb_tag = "Dispatcher"; - std::string cb_name = olua_setcallback(L, cb_store, 1, cb_tag.c_str(), OLUA_TAG_REPLACE); + std::string cb_name = olua_setcallback(L, cb_store, 1, cb_tag.c_str(), OLUA_TAG_REPLACE); olua_Context cb_ctx = olua_context(L); - arg1 = [cb_store, cb_name, cb_ctx](const std::string &arg1, const cocos2d::Value &arg2) { + // lua_State *ML = olua_mainthread(L); + arg1 = [cb_store, cb_name, cb_ctx /*, ML */](const std::string &cb_arg1, const cocos2d::Value &cb_arg2) { lua_State *L = olua_mainthread(NULL); olua_checkhostthread(); @@ -307,8 +326,8 @@ static int _cclua_plugin_wechat_setDispatcher(lua_State *L) int top = lua_gettop(L); size_t last = olua_push_objpool(L); olua_enable_objpool(L); - olua_push_string(L, arg1); - olua_push_cocos2d_Value(L, arg2); + olua_push_string(L, cb_arg1); + olua_push_cocos2d_Value(L, cb_arg2); olua_disable_objpool(L); olua_callback(L, cb_store, cb_name.c_str(), 2); @@ -319,7 +338,7 @@ static int _cclua_plugin_wechat_setDispatcher(lua_State *L) } }; - // static void setDispatcher(@localvar const cclua::Callback &dispatcher) + // static void setDispatcher(const cclua::Callback &dispatcher) cclua::plugin::wechat::setDispatcher(arg1); olua_endinvoke(L); @@ -327,7 +346,7 @@ static int _cclua_plugin_wechat_setDispatcher(lua_State *L) return 0; } -static int _cclua_plugin_wechat_share(lua_State *L) +static int _olua_fun_cclua_plugin_wechat_share(lua_State *L) { olua_startinvoke(L); @@ -335,7 +354,7 @@ static int _cclua_plugin_wechat_share(lua_State *L) cocos2d::ValueMap *arg2 = nullptr; /** value */ olua_check_enum(L, 1, &arg1); - olua_check_pointer(L, 2, &arg2, "cc.ValueMap"); + olua_check_valueptr(L, 2, &arg2, "cc.types.ValueMap"); // static void share(cclua::plugin::wechat::ShareType type, cocos2d::ValueMap &value) cclua::plugin::wechat::share(arg1, *arg2); @@ -345,7 +364,7 @@ static int _cclua_plugin_wechat_share(lua_State *L) return 0; } -static int _cclua_plugin_wechat_stopAuth(lua_State *L) +static int _olua_fun_cclua_plugin_wechat_stopAuth(lua_State *L) { olua_startinvoke(L); @@ -361,31 +380,40 @@ static int _cclua_plugin_wechat_stopAuth(lua_State *L) return 0; } -OLUA_BEGIN_DECLS -OLUA_LIB int luaopen_cclua_plugin_wechat(lua_State *L) +static int _olua_cls_cclua_plugin_wechat(lua_State *L) { oluacls_class(L, "cclua.plugin.wechat"); - oluacls_func(L, "__gc", _cclua_plugin_wechat___gc); - oluacls_func(L, "__olua_move", _cclua_plugin_wechat___olua_move); - oluacls_func(L, "auth", _cclua_plugin_wechat_auth); - oluacls_func(L, "authQRCode", _cclua_plugin_wechat_authQRCode); - oluacls_func(L, "dispatch", _cclua_plugin_wechat_dispatch); - oluacls_func(L, "init", _cclua_plugin_wechat_init); - oluacls_func(L, "isInstalled", _cclua_plugin_wechat_isInstalled); - oluacls_func(L, "open", _cclua_plugin_wechat_open); - oluacls_func(L, "openCustomerService", _cclua_plugin_wechat_openCustomerService); + oluacls_func(L, "__gc", _olua_fun_cclua_plugin_wechat___gc); + oluacls_func(L, "__olua_move", _olua_fun_cclua_plugin_wechat___olua_move); + oluacls_func(L, "auth", _olua_fun_cclua_plugin_wechat_auth); + oluacls_func(L, "authQRCode", _olua_fun_cclua_plugin_wechat_authQRCode); + oluacls_func(L, "dispatch", _olua_fun_cclua_plugin_wechat_dispatch); + oluacls_func(L, "init", _olua_fun_cclua_plugin_wechat_init); + oluacls_func(L, "isInstalled", _olua_fun_cclua_plugin_wechat_isInstalled); + oluacls_func(L, "open", _olua_fun_cclua_plugin_wechat_open); + oluacls_func(L, "openCustomerService", _olua_fun_cclua_plugin_wechat_openCustomerService); #ifdef CCLUA_OS_ANDROID - oluacls_func(L, "pay", _cclua_plugin_wechat_pay); + oluacls_func(L, "pay", _olua_fun_cclua_plugin_wechat_pay); #endif - oluacls_func(L, "setDispatcher", _cclua_plugin_wechat_setDispatcher); - oluacls_func(L, "share", _cclua_plugin_wechat_share); - oluacls_func(L, "stopAuth", _cclua_plugin_wechat_stopAuth); - oluacls_prop(L, "installed", _cclua_plugin_wechat_isInstalled, nullptr); + oluacls_func(L, "setDispatcher", _olua_fun_cclua_plugin_wechat_setDispatcher); + oluacls_func(L, "share", _olua_fun_cclua_plugin_wechat_share); + oluacls_func(L, "stopAuth", _olua_fun_cclua_plugin_wechat_stopAuth); + oluacls_prop(L, "installed", _olua_fun_cclua_plugin_wechat_isInstalled, nullptr); cclua::runtime::registerFeature("cclua.plugin.wechat.ios", true); return 1; } + +OLUA_BEGIN_DECLS +OLUA_LIB int luaopen_cclua_plugin_wechat(lua_State *L) +{ + olua_require(L, "wechat", luaopen_wechat); + if (!olua_getclass(L, "cclua.plugin.wechat")) { + luaL_error(L, "class not found: cclua::plugin::wechat"); + } + return 1; +} OLUA_END_DECLS #endif @@ -393,9 +421,9 @@ OLUA_BEGIN_DECLS OLUA_LIB int luaopen_wechat(lua_State *L) { #ifdef CCLUA_BUILD_WECHAT - olua_require(L, "cclua.plugin.wechat.ShareType", luaopen_cclua_plugin_wechat_ShareType); - olua_require(L, "cclua.plugin.wechat.ProgramType", luaopen_cclua_plugin_wechat_ProgramType); - olua_require(L, "cclua.plugin.wechat", luaopen_cclua_plugin_wechat); + olua_require(L, "cclua.plugin.wechat.ShareType", _olua_cls_cclua_plugin_wechat_ShareType); + olua_require(L, "cclua.plugin.wechat.ProgramType", _olua_cls_cclua_plugin_wechat_ProgramType); + olua_require(L, "cclua.plugin.wechat", _olua_cls_cclua_plugin_wechat); #endif return 0; diff --git a/frameworks/plugins/wechat/lua_wechat.h b/frameworks/plugins/wechat/lua_wechat.h index a9d6819f..e2fab1c5 100644 --- a/frameworks/plugins/wechat/lua_wechat.h +++ b/frameworks/plugins/wechat/lua_wechat.h @@ -1,5 +1,5 @@ // -// AUTO BUILD, DON'T MODIFY! +// AUTO GENERATED, DO NOT MODIFY! // #ifndef __AUTO_GEN_LUA_WECHAT_H__ #define __AUTO_GEN_LUA_WECHAT_H__ diff --git a/tools/lua-bindings/build.lua b/tools/lua-bindings/build.lua index bc80253c..fc93c136 100644 --- a/tools/lua-bindings/build.lua +++ b/tools/lua-bindings/build.lua @@ -1,4 +1,6 @@ -require "olua.tools" +package.path = "./?/init.lua;" .. package.path + +require "olua" autoconf 'conf/clang-args.lua' autoconf 'conf/exclude-type.lua' diff --git a/tools/lua-bindings/conf/exclude-type.lua b/tools/lua-bindings/conf/exclude-type.lua index de07437f..0ae68a30 100644 --- a/tools/lua-bindings/conf/exclude-type.lua +++ b/tools/lua-bindings/conf/exclude-type.lua @@ -1,23 +1,23 @@ -excludetype 'va_list' -excludetype 'cpBody' -excludetype 'cocos2d::AABB' -excludetype 'cocos2d::Console::Command' -excludetype 'cocos2d::Font' -excludetype 'cocos2d::FontDefinition' -excludetype 'cocos2d::FontLetterDefinition' -excludetype 'cocos2d::Grabber' -excludetype 'cocos2d::GroupCommandManager' -excludetype 'cocos2d::IMEKeyboardNotificationInfo' -excludetype 'cocos2d::MeshIndexData' -excludetype 'cocos2d::_MipmapInfo' -excludetype 'cocos2d::MipmapInfo' -excludetype 'cocos2d::NodeData' -excludetype 'cocos2d::NodeDatas' -excludetype 'cocos2d::Physics3DWorld' -excludetype 'cocos2d::PhysicsContactData' -excludetype 'cocos2d::PolygonInfo' -excludetype 'cocos2d::RenderState::StateBlock' -excludetype 'cocos2d::SEL_SCHEDULE' -excludetype 'cocos2d::Tile' -excludetype 'cocos2d::V3F_C4B_T2F_Quad' -excludetype 'cocos2d::_ccArray' \ No newline at end of file +exclude_type 'va_list' +exclude_type 'cpBody' +exclude_type 'cocos2d::AABB' +exclude_type 'cocos2d::Console::Command' +exclude_type 'cocos2d::Font' +exclude_type 'cocos2d::FontDefinition' +exclude_type 'cocos2d::FontLetterDefinition' +exclude_type 'cocos2d::Grabber' +exclude_type 'cocos2d::GroupCommandManager' +exclude_type 'cocos2d::IMEKeyboardNotificationInfo' +exclude_type 'cocos2d::MeshIndexData' +exclude_type 'cocos2d::_MipmapInfo' +exclude_type 'cocos2d::MipmapInfo' +exclude_type 'cocos2d::NodeData' +exclude_type 'cocos2d::NodeDatas' +exclude_type 'cocos2d::Physics3DWorld' +exclude_type 'cocos2d::PhysicsContactData' +exclude_type 'cocos2d::PolygonInfo' +exclude_type 'cocos2d::RenderState::StateBlock' +exclude_type 'cocos2d::SEL_SCHEDULE' +exclude_type 'cocos2d::Tile' +exclude_type 'cocos2d::V3F_C4B_T2F_Quad' +exclude_type 'cocos2d::_ccArray' \ No newline at end of file diff --git a/tools/lua-bindings/conf/lua-box2d.lua b/tools/lua-bindings/conf/lua-box2d.lua index 993a49d2..09b79476 100644 --- a/tools/lua-bindings/conf/lua-box2d.lua +++ b/tools/lua-bindings/conf/lua-box2d.lua @@ -1,6 +1,8 @@ module 'box2d' -path '../../frameworks/cclua/src/lua-bindings' +output_dir '../../frameworks/cclua/src/lua-bindings' + +api_dir"../../addons/cclua/box2d" headers [[ #include "lua-bindings/lua_cocos2d_types.h" @@ -30,7 +32,7 @@ luacls(function (cppname) return cppname end) -excludetype 'b2BlockAllocator' +exclude_type 'b2BlockAllocator' local _typeconf = typeconf local function typeconf(...) diff --git a/tools/lua-bindings/conf/lua-cclua.lua b/tools/lua-bindings/conf/lua-cclua.lua index fe132366..f69d37f0 100644 --- a/tools/lua-bindings/conf/lua-cclua.lua +++ b/tools/lua-bindings/conf/lua-cclua.lua @@ -1,6 +1,8 @@ module 'cclua' -path '../../frameworks/cclua/src/lua-bindings' +output_dir '../../frameworks/cclua/src/lua-bindings' + +api_dir"../../addons/cclua/cclua" headers [[ #include "lua-bindings/lua_cocos2d_types.h" @@ -8,7 +10,7 @@ headers [[ #include "cclua/cclua.h" ]] -excludetype 'cclua::BufferReader' +exclude_type 'cclua::BufferReader' typeconf 'cclua::Callback' typeconf 'cclua::QRCode::ECLevel' @@ -40,30 +42,30 @@ typeconf 'cclua::permission' }]] typeconf 'cclua::runtime' - .callback 'setDispatcher' .tag_mode 'replace' - .callback 'openURL' .tag_mode 'new' .tag_scope 'once' - .callback 'requestPermission' .tag_mode 'new' .tag_scope 'once' - .callback 'alert' .tag_mode 'new' .tag_scope 'once' + .func 'setDispatcher' .tag_mode 'replace' + .func 'openURL' .tag_mode 'new' .tag_scope 'once' + .func 'requestPermission' .tag_mode 'new' .tag_scope 'once' + .func 'alert' .tag_mode 'new' .tag_scope 'once' typeconf 'cclua::filesystem' typeconf 'cclua::preferences' typeconf 'cclua::timer' - .callback 'delayWithTag' + .func 'delayWithTag' .tag_mode 'replace' .tag_maker '(#2)' .tag_scope 'once' - .callback 'killDelay' + .func 'killDelay' .tag_maker '(#1)' .tag_mode 'equal' - .callback 'delay' + .func 'delay' .tag_mode 'new' .tag_maker 'delay' .tag_scope 'once' - .callback 'schedule' + .func 'schedule' .tag_mode 'replace' .tag_maker '(#2)' - .callback 'unschedule' + .func 'unschedule' .tag_mode 'equal' .tag_maker '(#1)' @@ -82,7 +84,7 @@ typeconf 'cclua::microphone' .luaopen 'cclua::runtime::registerFeature("cclua.microphone", true);' typeconf 'cclua::photo' .luaopen 'cclua::runtime::registerFeature("cclua.photo", true);' - .callback 'selectAvatar' .tag_mode 'replace' .tag_maker 'select' .tag_scope 'once' - .callback 'takeAvatar' .tag_mode 'replace' .tag_maker 'select' .tag_scope 'once' - .callback 'select' .tag_mode 'replace' .tag_maker 'select' .tag_scope 'once' + .func 'selectAvatar' .tag_mode 'replace' .tag_maker 'select' .tag_scope 'once' + .func 'takeAvatar' .tag_mode 'replace' .tag_maker 'select' .tag_scope 'once' + .func 'select' .tag_mode 'replace' .tag_maker 'select' .tag_scope 'once' macro '' diff --git a/tools/lua-bindings/conf/lua-cocos2d-3d.lua b/tools/lua-bindings/conf/lua-cocos2d-3d.lua index 22deea03..13abb017 100644 --- a/tools/lua-bindings/conf/lua-cocos2d-3d.lua +++ b/tools/lua-bindings/conf/lua-cocos2d-3d.lua @@ -1,6 +1,8 @@ module 'cocos2d_3d' -path '../../frameworks/cclua/src/lua-bindings' +output_dir '../../frameworks/cclua/src/lua-bindings' + +api_dir"../../addons/cclua/cocos2d" headers [[ #include "lua-bindings/lua_cocos2d_types.h" diff --git a/tools/lua-bindings/conf/lua-cocos2d-action.lua b/tools/lua-bindings/conf/lua-cocos2d-action.lua index a7e2b0c3..96392f3c 100644 --- a/tools/lua-bindings/conf/lua-cocos2d-action.lua +++ b/tools/lua-bindings/conf/lua-cocos2d-action.lua @@ -1,6 +1,8 @@ module 'cocos2d_action' -path '../../frameworks/cclua/src/lua-bindings' +output_dir '../../frameworks/cclua/src/lua-bindings' + +api_dir"../../addons/cclua/cocos2d" headers [[ #include "lua-bindings/lua_cocos2d_types.h" @@ -144,7 +146,7 @@ typeconf 'cocos2d::TargetedAction' typeconf 'cocos2d::ActionFloat::ActionFloatCallback' typeconf 'cocos2d::ActionFloat' - .callback 'create' + .func 'create' .tag_maker 'ActionFloat' .tag_mode 'new' .tag_store '-1' @@ -214,7 +216,7 @@ typeconf "cocos2d::FlipY" typeconf "cocos2d::Place" typeconf "cocos2d::CallFunc" - .callback 'create' + .func 'create' .tag_maker 'CallFunc' .tag_mode 'new' .tag_store '-1' @@ -257,7 +259,7 @@ typeconf 'cocos2d::SplitRows' typeconf 'cocos2d::SplitCols' typeconf 'cocos2d::LuaTweenNode' - .callback 'create' + .func 'create' .tag_maker 'ActionTween' .tag_mode 'new' .tag_store '-1' \ No newline at end of file diff --git a/tools/lua-bindings/conf/lua-cocos2d-backend.lua b/tools/lua-bindings/conf/lua-cocos2d-backend.lua index 779a6bd4..f9c54e89 100644 --- a/tools/lua-bindings/conf/lua-cocos2d-backend.lua +++ b/tools/lua-bindings/conf/lua-cocos2d-backend.lua @@ -1,6 +1,8 @@ module 'cocos2d_backend' -path '../../frameworks/cclua/src/lua-bindings' +output_dir '../../frameworks/cclua/src/lua-bindings' + +api_dir"../../addons/cclua/cocos2d" headers [[ #include "lua-bindings/lua_cocos2d_types.h" @@ -14,7 +16,7 @@ luacls(function (cppname) return cppname end) -excludetype 'cocos2d::backend::RenderPassDescriptor' +exclude_type 'cocos2d::backend::RenderPassDescriptor' typeconf 'cocos2d::backend::UniformLocation' typeconf 'cocos2d::backend::BufferUsage' @@ -47,7 +49,7 @@ typeconf 'cocos2d::backend::DepthStencilState' typeconf 'cocos2d::backend::VertexLayout' typeconf 'cocos2d::backend::CommandBuffer' - .callback 'captureScreen' + .func 'captureScreen' .tag_scope 'once' .tag_mode 'new' @@ -80,7 +82,7 @@ typeconf 'cocos2d::backend::ProgramState' typeconf 'cocos2d::backend::Program' typeconf 'cocos2d::backend::TextureBackend' - .callback 'getBytes' + .func 'getBytes' .tag_mode 'new' .tag_scope 'once' diff --git a/tools/lua-bindings/conf/lua-cocos2d-physics.lua b/tools/lua-bindings/conf/lua-cocos2d-physics.lua index 8b114c90..b1fcaad2 100644 --- a/tools/lua-bindings/conf/lua-cocos2d-physics.lua +++ b/tools/lua-bindings/conf/lua-cocos2d-physics.lua @@ -1,6 +1,8 @@ module 'cocos2d_physics' -path "../../frameworks/cclua/src/lua-bindings" +output_dir "../../frameworks/cclua/src/lua-bindings" + +api_dir"../../addons/cclua/cocos2d" headers [[ #include "lua-bindings/lua_cocos2d_types.h" @@ -55,7 +57,7 @@ typeconf 'cocos2d::PhysicsShapeEdgeSegment' typeconf 'cocos2d::PhysicsRayCastInfo' typeconf 'cocos2d::PhysicsWorld' - .callback 'setPreUpdateCallback' .arg1 '@nullable' - .callback 'setPostUpdateCallback' .arg1 '@nullable' + .func 'setPreUpdateCallback' .arg1 '@nullable' + .func 'setPostUpdateCallback' .arg1 '@nullable' macro '' -- CC_USE_PHYSICS diff --git a/tools/lua-bindings/conf/lua-cocos2d-studio.lua b/tools/lua-bindings/conf/lua-cocos2d-studio.lua index 2127e4aa..a557bc57 100644 --- a/tools/lua-bindings/conf/lua-cocos2d-studio.lua +++ b/tools/lua-bindings/conf/lua-cocos2d-studio.lua @@ -1,6 +1,8 @@ module 'cocos2d_studio' -path '../../frameworks/cclua/src/lua-bindings' +output_dir '../../frameworks/cclua/src/lua-bindings' + +api_dir"../../addons/cclua/cocos2d" headers [[ #include "lua-bindings/lua_cocos2d_types.h" @@ -9,7 +11,7 @@ headers [[ #include "editor-support/cocostudio/CocoStudio.h" ]] -chunk [[ +codeblock[[ static std::string makeFrameEndCallbackTag(lua_Integer index, const std::string &key) { if (index < 0) { @@ -35,23 +37,23 @@ luacls(function (cppname) return cppname end) -excludetype 'cocos2d::ObjectFactory::TInfo' -excludetype 'cocos2d::ObjectFactory::Instance' -excludetype 'cocostudio::DataReaderHelper::DataInfo' -excludetype 'cocostudio::stExpCocoNode' -excludetype 'flatbuffers::NodeTree' -excludetype 'rapidjson::Value' -excludetype 'cocostudio::SEL_ParseEvent' +exclude_type 'cocos2d::ObjectFactory::TInfo' +exclude_type 'cocos2d::ObjectFactory::Instance' +exclude_type 'cocostudio::DataReaderHelper::DataInfo' +exclude_type 'cocostudio::stExpCocoNode' +exclude_type 'flatbuffers::NodeTree' +exclude_type 'rapidjson::Value' +exclude_type 'cocostudio::SEL_ParseEvent' typeconf 'cocostudio::timeline::AnimationInfo' typeconf "cocos2d::CSLoader" - .callback 'createNode' + .func 'createNode' .tag_mode 'new' - .tag_scope 'function' - .callback 'createNodeWithVisibleSize' + .tag_scope 'invoker' + .func 'createNodeWithVisibleSize' .tag_mode 'new' - .tag_scope 'function' + .tag_scope 'invoker' typeconf "cocostudio::MovementEventType" typeconf "cocostudio::DisplayType" @@ -75,8 +77,8 @@ typeconf "cocostudio::ActionNode" typeconf "cocostudio::ActionObject" typeconf "cocostudio::ArmatureAnimation" - .callback 'setMovementEventCallFunc' .arg1 '@nullable' - .callback 'setFrameEventCallFunc' .arg1 '@nullable' + .func 'setMovementEventCallFunc' .arg1 '@nullable' + .func 'setFrameEventCallFunc' .arg1 '@nullable' typeconf "cocostudio::ArmatureData" typeconf "cocostudio::ArmatureDataManager" @@ -133,7 +135,7 @@ typeconf "cocostudio::ParticleDisplayData" typeconf "cocostudio::SceneReader::AttachComponentType" typeconf "cocostudio::SceneReader" - .callback 'setTarget' .arg1 '@nullable' + .func 'setTarget' .arg1 '@nullable' typeconf "cocostudio::Skin" typeconf "cocostudio::SpriteDisplayData" @@ -204,10 +206,10 @@ typeconf "cocostudio::timeline::ActionTimeline" .func 'addTimeline' .arg1 "@addref(timelines |)" .func 'removeTimeline' .arg1 "@delref(timelines |)" .func 'getTimelines' .ret "@addref(timelines |)" - .callback 'setAnimationEndCallFunc' + .func 'setAnimationEndCallFunc' .tag_mode 'replace' .tag_maker "makeFrameEndCallbackTag(#0, #1)" - .callback 'setFrameEventCallFunc' + .func 'setFrameEventCallFunc' .tag_maker "frameEventCallFunc" .tag_mode 'replace' .arg1 '@nullable' @@ -221,26 +223,26 @@ typeconf "cocostudio::timeline::ActionTimeline" lua_pop(L, 3); } ]] - .callback 'clearFrameEventCallFunc' + .func 'clearFrameEventCallFunc' .tag_maker "frameEventCallFunc" .tag_mode 'startwith' - .callback 'setLastFrameCallFunc' + .func 'setLastFrameCallFunc' .tag_maker 'lastFrameCallFunc' .tag_mode 'replace' .arg1 '@nullable' - .callback 'clearLastFrameCallFunc' + .func 'clearLastFrameCallFunc' .tag_maker "lastFrameCallFunc" .tag_mode 'startwith' - .callback 'addFrameEndCallFunc' + .func 'addFrameEndCallFunc' .tag_mode 'replace' .tag_maker "makeFrameEndCallbackTag(#1, #2)" - .callback 'removeFrameEndCallFunc' + .func 'removeFrameEndCallFunc' .tag_mode 'startwith' .tag_maker "makeFrameEndCallbackTag(#1, #2)" - .callback 'removeFrameEndCallFuncs' + .func 'removeFrameEndCallFuncs' .tag_mode 'startwith' .tag_maker 'makeFrameEndCallbackTag(#1, "")' - .callback 'clearFrameEndCallFuncs' + .func 'clearFrameEndCallFuncs' .tag_mode 'startwith' .tag_maker 'makeFrameEndCallbackTag(-1, "")' .func 'addAnimationInfo' diff --git a/tools/lua-bindings/conf/lua-cocos2d-types.lua b/tools/lua-bindings/conf/lua-cocos2d-types.lua index 3e328cb4..d5989438 100644 --- a/tools/lua-bindings/conf/lua-cocos2d-types.lua +++ b/tools/lua-bindings/conf/lua-cocos2d-types.lua @@ -1,6 +1,8 @@ module 'cocos2d_types' -path "../../frameworks/cclua/src/lua-bindings" +output_dir "../../frameworks/cclua/src/lua-bindings" + +api_dir"../../addons/cclua/cocos2d" headers [[ #include "cclua/cclua.h" @@ -13,12 +15,14 @@ headers [[ #endif ]] +-- api_dir"../../addons/cclua/cocos2d" + luacls(function (cppname) return cppname:gsub("^cocos2d::backend::", "ccb.") - :gsub("^cocos2d::types::", "cc.") - :gsub("^cocos2d::", "cc.") - :gsub("::", ".") - :gsub("GLContextAttrs", "cc.GLContextAttrs") + :gsub("^cocos2d::types::", "cc.types.") + :gsub("^cocos2d::", "cc.") + :gsub("::", ".") + :gsub("GLContextAttrs", "cc.GLContextAttrs") end) typedef 'cocos2d::Data' @@ -37,7 +41,7 @@ typedef 'cocos2d::network::WebSocket::Data' typeconf 'cocos2d::Vec2' .packable 'true' - .var '*' .optional 'false' + -- .var '*' .optional 'false' typeconf 'cocos2d::Vec3' .packable 'true' typeconf 'cocos2d::Vec4' @@ -65,7 +69,6 @@ typeconf 'cocos2d::ccBezierConfig' .packable 'true' typeconf 'cocos2d::TTFConfig' - .var '*' .optional 'true' typeconf 'cocos2d::BlendFunc' typeconf 'cocos2d::ui::Margin' diff --git a/tools/lua-bindings/conf/lua-cocos2d-ui.lua b/tools/lua-bindings/conf/lua-cocos2d-ui.lua index b6e3fb48..bffbf700 100644 --- a/tools/lua-bindings/conf/lua-cocos2d-ui.lua +++ b/tools/lua-bindings/conf/lua-cocos2d-ui.lua @@ -1,6 +1,8 @@ module 'cocos2d_ui' -path '../../frameworks/cclua/src/lua-bindings' +output_dir '../../frameworks/cclua/src/lua-bindings' + +api_dir"../../addons/cclua/cocos2d" headers [[ #include "lua-bindings/lua_cocos2d_types.h" @@ -17,7 +19,7 @@ luacls(function (cppname) return cppname end) -excludetype 'cocos2d::ui::PageViewIndicator' +exclude_type 'cocos2d::ui::PageViewIndicator' typeconf 'cocos2d::ui::Widget::FocusDirection' typeconf 'cocos2d::ui::Widget::PositionType' @@ -38,10 +40,10 @@ typeconf 'cocos2d::ui::Widget' .func 'findNextFocusedWidget' .arg2 '@nullable' .func 'onFocusChange' .arg1 '@nullable' .arg2 '@nullable' .func 'dispatchFocusEvent' .arg1 '@nullable' .arg2 '@nullable' - .callback 'onFocusChanged' .localvar 'false' - .callback 'addTouchEventListener' .arg1 '@nullable' .localvar 'false' - .callback 'addClickEventListener' .arg1 '@nullable' .localvar 'false' - .callback 'addCCSEventListener' .arg1 '@nullable' .localvar 'false' + .func 'onFocusChanged' .tag_usepool 'false' + .func 'addTouchEventListener' .arg1 '@nullable' .tag_usepool 'false' + .func 'addClickEventListener' .arg1 '@nullable' .tag_usepool 'false' + .func 'addCCSEventListener' .arg1 '@nullable' .tag_usepool 'false' typeconf 'cocos2d::ui::Helper' typeconf 'cocos2d::ui::Scale9Sprite::State' @@ -61,7 +63,7 @@ typeconf 'cocos2d::ui::Layout::ClippingType' typeconf 'cocos2d::ui::Layout::BackGroundColorType' typeconf 'cocos2d::ui::Layout' - .callback 'onPassFocusToChild' .localvar 'false' + .func 'onPassFocusToChild' .tag_usepool 'false' typeconf 'cocos2d::ui::HBox' typeconf 'cocos2d::ui::VBox' @@ -70,18 +72,18 @@ typeconf 'cocos2d::ui::RelativeBox' macro '#if defined(CCLUA_OS_IOS) || defined(CCLUA_OS_ANDROID)' typeconf 'cocos2d::ui::WebView::ccWebViewCallback' typeconf 'cocos2d::ui::WebView' - .callback 'setOnShouldStartLoading' .arg1 '@nullable' .localvar 'false' - .callback 'setOnDidFinishLoading' .arg1 '@nullable' .localvar 'false' - .callback 'setOnDidFailLoading' .arg1 '@nullable' .localvar 'false' - .callback 'setOnJSCallback' .arg1 '@nullable' .localvar 'false' + .func 'setOnShouldStartLoading' .arg1 '@nullable' .tag_usepool 'false' + .func 'setOnDidFinishLoading' .arg1 '@nullable' .tag_usepool 'false' + .func 'setOnDidFailLoading' .arg1 '@nullable' .tag_usepool 'false' + .func 'setOnJSCallback' .arg1 '@nullable' .tag_usepool 'false' typeconf 'cocos2d::ui::VideoPlayer::EventType' typeconf 'cocos2d::ui::VideoPlayer::ccVideoPlayerCallback' typeconf 'cocos2d::ui::VideoPlayer::StyleType' typeconf 'cocos2d::ui::VideoPlayer' - .callback 'addEventListener' + .func 'addEventListener' .tag_maker 'videoPlayerCallback' .tag_mode 'replace' - .localvar 'false' + .tag_usepool 'false' macro '' typeconf 'cocos2d::ui::AbstractCheckButton' @@ -105,7 +107,7 @@ typeconf 'cocos2d::ui::TabControl' .func 'getTabHeader' .ret '@addref(protectedChildren |)' .func 'getTabContainer' .ret '@addref(protectedChildren |)' .func 'insertTab' .arg2 '@addref(protectedChildren |)' .arg3 '@addref(protectedChildren |)' - .callback 'setTabChangedEventListener' + .func 'setTabChangedEventListener' .tag_maker 'tabChangedEventListener' .tag_mode 'replace' .arg1 '@nullable' @@ -116,10 +118,10 @@ typeconf 'cocos2d::ui::ScrollView::ccScrollViewCallback' typeconf 'cocos2d::ui::ScrollView' .func 'getInnerContainer' .ret '@addref(protectedChildren |)' - .callback 'addEventListener' + .func 'addEventListener' .tag_maker 'scrollViewCallback' .tag_mode 'replace' - .localvar 'false' + .tag_usepool 'false' typeconf 'cocos2d::ui::ListView::Gravity' typeconf 'cocos2d::ui::ListView::EventType' @@ -134,10 +136,10 @@ typeconf 'cocos2d::ui::ListView' .func 'removeAllItems' .ret '@delref(children ~)' .func 'getItem' .ret '@addref(children |)' .func 'getItems' .ret '@addref(children |)' - .callback 'addEventListener' + .func 'addEventListener' .tag_maker 'ListViewCallback' .tag_mode 'replace' - .localvar 'false' + .tag_usepool 'false' typeconf 'cocos2d::ui::LoadingBar::Direction' typeconf 'cocos2d::ui::LoadingBar' @@ -151,10 +153,10 @@ typeconf 'cocos2d::ui::PageView' .func 'removePage' .arg1 '@delref(children |)' .func 'removePageAtIndex' .ret '@delref(children ~)' .func 'removeAllPages' .ret '@delref(children *)' - .callback 'addEventListener' + .func 'addEventListener' .tag_maker 'PageViewCallback' .tag_mode 'replace' - .localvar 'false' + .tag_usepool 'false' typeconf 'cocos2d::ui::RichElement::Type' typeconf 'cocos2d::ui::RichElement' @@ -169,7 +171,7 @@ typeconf 'cocos2d::ui::RichText::OpenUrlHandler' typeconf 'cocos2d::ui::RichText' .exclude 'setTagDescription' .exclude 'initWithXML' - .callback 'createWithXML' + .func 'createWithXML' .tag_maker 'OpenUrlHandler' .tag_mode 'replace' .tag_store '-1' @@ -183,10 +185,10 @@ typeconf 'cocos2d::ui::Slider' .func 'getSlidBallPressedRenderer' .ret '@addref(protectedChildren |)' .func 'getSlidBallDisabledRenderer' .ret '@addref(protectedChildren |)' .func 'getSlidBallRenderer' .ret '@addref(protectedChildren |)' - .callback 'addEventListener' + .func 'addEventListener' .tag_maker 'sliderCallback' .tag_mode 'replace' - .localvar 'false' + .tag_usepool 'false' typeconf 'cocos2d::ui::Text::Type' typeconf 'cocos2d::ui::Text' @@ -197,10 +199,10 @@ typeconf 'cocos2d::ui::TextField::EventType' typeconf 'cocos2d::ui::TextField::ccTextFieldCallback' typeconf 'cocos2d::ui::TextField' - .callback 'addEventListener' + .func 'addEventListener' .tag_maker 'textFieldCallback' .tag_mode 'replace' - .localvar 'false' + .tag_usepool 'false' typeconf 'cocos2d::ui::Button' .func 'setTitleLabel' .arg1 '@addref(protectedChildren |)' @@ -214,28 +216,28 @@ typeconf 'cocos2d::ui::CheckBox::EventType' typeconf 'cocos2d::ui::CheckBox::ccCheckBoxCallback' typeconf 'cocos2d::ui::CheckBox' - .callback 'addEventListener' + .func 'addEventListener' .tag_maker 'checkBoxCallback' .tag_mode 'replace' - .localvar 'false' + .tag_usepool 'false' typeconf 'cocos2d::ui::RadioButton::EventType' typeconf 'cocos2d::ui::RadioButton::ccRadioButtonCallback' typeconf 'cocos2d::ui::RadioButton' - .callback 'addEventListener' + .func 'addEventListener' .tag_maker 'radioButtonCallback' .tag_mode 'replace' - .localvar 'false' + .tag_usepool 'false' typeconf 'cocos2d::ui::RadioButtonGroup::EventType' typeconf 'cocos2d::ui::RadioButtonGroup::ccRadioButtonGroupCallback' typeconf 'cocos2d::ui::RadioButtonGroup' - .callback 'addEventListener' + .func 'addEventListener' .tag_maker 'radioButtonCallback' .tag_mode 'replace' - .localvar 'false' + .tag_usepool 'false' typeconf 'cocos2d::ui::ImageView' typeconf 'cocos2d::ui::EditBoxDelegate::EditBoxEndAction' diff --git a/tools/lua-bindings/conf/lua-cocos2d.lua b/tools/lua-bindings/conf/lua-cocos2d.lua index d2f7cdb8..b3a356aa 100644 --- a/tools/lua-bindings/conf/lua-cocos2d.lua +++ b/tools/lua-bindings/conf/lua-cocos2d.lua @@ -1,6 +1,8 @@ module 'cocos2d' -path '../../frameworks/cclua/src/lua-bindings' +output_dir '../../frameworks/cclua/src/lua-bindings' + +api_dir"../../addons/cclua/cocos2d" headers [[ #include "lua-bindings/lua_cocos2d_types.h" @@ -12,7 +14,7 @@ headers [[ #include "navmesh/CCNavMesh.h" ]] -chunk [[ +codeblock[[ static const std::string makeScheduleCallbackTag(const std::string &key) { return "schedule." + key; @@ -53,7 +55,6 @@ typeconf 'cocos2d::Acceleration' typeconf 'cocos2d::Director' .exclude 'getCocos2dThreadId' - .alias 'end' .to 'exit' .func 'getRunningScene' .ret '@addref(scenes |)' .func 'runWithScene' .arg1 '@addref(scenes |)' .func 'pushScene' .arg1 '@addref(scenes |)' @@ -80,7 +81,7 @@ typeconf 'cocos2d::ccSchedulerFunc' typeconf 'cocos2d::Scheduler' .exclude 'performFunctionInCocosThread' - .chunk [[ + .codeblock[[ template bool doScheduleUpdate(lua_State *L) { if (olua_isa(L, 2)) { @@ -95,19 +96,19 @@ typeconf 'cocos2d::Scheduler' return false; } ]] - .callback 'schedule' + .func 'schedule' .tag_mode 'replace' .tag_maker 'makeScheduleCallbackTag(#-1)' .tag_store '2' -- 2th void *target - .callback 'unschedule' + .func 'unschedule' .tag_mode 'equal' .tag_maker 'makeScheduleCallbackTag(#1)' .tag_store '2' -- 2th void *target - .callback 'unscheduleAllForTarget' + .func 'unscheduleAllForTarget' .tag_mode 'startwith' .tag_maker 'makeScheduleCallbackTag("")' .tag_store '1' -- 1th void *target - .callback 'unscheduleAll' + .func 'unscheduleAll' .tag_maker 'makeScheduleCallbackTag("")' .tag_mode 'startwith' .func 'scheduleUpdate' @@ -131,8 +132,8 @@ typeconf 'cocos2d::Scheduler' -- event & event listener -- typeconf 'cocos2d::EventDispatcher' - .chunk [[ - static int _cocos2d_EventDispatcher_addEventListenerWithFixedPriority(lua_State *L); + .codeblock[[ + static int _olua_fun_cocos2d_EventDispatcher_addEventListenerWithFixedPriority(lua_State *L); static void doRemoveEventListenersForTarget(lua_State *L, cocos2d::Node *target, bool recursive, const char *refname) { @@ -169,9 +170,9 @@ typeconf 'cocos2d::EventDispatcher' { lua_settop(L, 2); olua_pushinteger(L, 1); - return _cocos2d_EventDispatcher_addEventListenerWithFixedPriority(L); + return _olua_fun_cocos2d_EventDispatcher_addEventListenerWithFixedPriority(L); }]] - .callback 'addCustomEventListener' + .func 'addCustomEventListener' .ret '@addref(listeners |)' .tag_maker '(#1)' .tag_store '-1' @@ -190,12 +191,12 @@ typeconf 'cocos2d::EventListenerTouchAllAtOnce::ccTouchesCallback' typeconf 'cocos2d::EventListenerTouchAllAtOnce' typeconf 'cocos2d::EventListenerCustom' - .callback 'create' .tag_store '-1' .tag_maker 'listener' + .func 'create' .tag_store '-1' .tag_maker 'listener' typeconf 'cocos2d::EventListenerKeyboard' typeconf 'cocos2d::EventListenerAcceleration' - .callback 'create' .tag_store '-1' .tag_maker 'listener' + .func 'create' .tag_store '-1' .tag_maker 'listener' typeconf 'cocos2d::EventListenerFocus' typeconf 'cocos2d::EventListenerMouse' @@ -226,7 +227,7 @@ typeconf 'cocos2d::AudioProfile' typeconf 'cocos2d::AudioEngine::AudioState' typeconf 'cocos2d::AudioEngine' - .chunk [[ + .codeblock[[ NS_CC_BEGIN class LuaAudioEngine : public cocos2d::AudioEngine { @@ -264,14 +265,14 @@ typeconf 'cocos2d::AudioEngine' olua_removecallback(L, cb_store, tag.c_str(), OLUA_TAG_EQUAL); } ]] - .callback 'stop' .tag_mode 'equal' .tag_maker 'makeAudioEngineFinishCallbackTag(#1)' - .callback 'stopAll' .tag_mode "startwith" .tag_maker 'makeAudioEngineFinishCallbackTag(-1)' - .callback 'uncacheAll' .tag_mode "startwith" .tag_maker 'makeAudioEngineFinishCallbackTag(-1)' - .callback 'setFinishCallback' + .func 'stop' .tag_mode 'equal' .tag_maker 'makeAudioEngineFinishCallbackTag(#1)' + .func 'stopAll' .tag_mode "startwith" .tag_maker 'makeAudioEngineFinishCallbackTag(-1)' + .func 'uncacheAll' .tag_mode "startwith" .tag_maker 'makeAudioEngineFinishCallbackTag(-1)' + .func 'setFinishCallback' + .arg2 '@nullable' .tag_maker 'makeAudioEngineFinishCallbackTag(#1)' .tag_scope 'once' - .arg2 '@nullable' - .callback 'preload' .tag_scope 'once' + .func 'preload' .tag_scope 'once' typeconf 'cocos2d::ApplicationProtocol::Platform' typeconf 'cocos2d::LanguageType' @@ -289,21 +290,21 @@ typeconf 'cocos2d::FileUtils::Status' typeconf 'cocos2d::FileUtils' .extend 'cocos2d::FileUtilsExtend' - .callback "getStringFromFile" .tag_scope 'once' .tag_mode 'new' - .callback "getDataFromFile" .tag_scope 'once' .tag_mode 'new' - .callback "writeStringToFile" .tag_scope 'once' .tag_mode 'new' - .callback "writeDataToFile" .tag_scope 'once' .tag_mode 'new' - .callback "writeValueMapToFile" .tag_scope 'once' .tag_mode 'new' - .callback "writeValueVectorToFile" .tag_scope 'once' .tag_mode 'new' - .callback "isFileExist" .tag_scope 'once' .tag_mode 'new' - .callback "isDirectoryExist" .tag_scope 'once' .tag_mode 'new' - .callback "createDirectory" .tag_scope 'once' .tag_mode 'new' - .callback "removeDirectory" .tag_scope 'once' .tag_mode 'new' - .callback "removeFile" .tag_scope 'once' .tag_mode 'new' - .callback "renameFile" .tag_scope 'once' .tag_mode 'new' - .callback "getFileSize" .tag_scope 'once' .tag_mode 'new' - .callback "listFilesAsync" .tag_scope 'once' .tag_mode 'new' - .callback "listFilesRecursivelyAsync" .tag_scope 'once' .tag_mode 'new' + .func "getStringFromFile" .tag_scope 'once' .tag_mode 'new' + .func "getDataFromFile" .tag_scope 'once' .tag_mode 'new' + .func "writeStringToFile" .tag_scope 'once' .tag_mode 'new' + .func "writeDataToFile" .tag_scope 'once' .tag_mode 'new' + .func "writeValueMapToFile" .tag_scope 'once' .tag_mode 'new' + .func "writeValueVectorToFile" .tag_scope 'once' .tag_mode 'new' + .func "isFileExist" .tag_scope 'once' .tag_mode 'new' + .func "isDirectoryExist" .tag_scope 'once' .tag_mode 'new' + .func "createDirectory" .tag_scope 'once' .tag_mode 'new' + .func "removeDirectory" .tag_scope 'once' .tag_mode 'new' + .func "removeFile" .tag_scope 'once' .tag_mode 'new' + .func "renameFile" .tag_scope 'once' .tag_mode 'new' + .func "getFileSize" .tag_scope 'once' .tag_mode 'new' + .func "listFilesAsync" .tag_scope 'once' .tag_mode 'new' + .func "listFilesRecursivelyAsync" .tag_scope 'once' .tag_mode 'new' typeconf 'ResolutionPolicy' typeconf 'cocos2d::GLView' @@ -335,21 +336,26 @@ typeconf 'cocos2d::MeshCommand' .exclude 'listenRendererRecreated' typeconf 'cocos2d::TextureCache' - .chunk [[ + .codeblock[[ static const std::string makeTextureCacheCallbackTag(const std::string &key) { return "addImageAsync." + key; } ]] - .callback 'addImageAsync' - .tag_maker {'makeTextureCacheCallbackTag(#1)', 'makeTextureCacheCallbackTag(#-1)'} + .func 'addImageAsync' + .tag_maker "makeTextureCacheCallbackTag(#1)" .tag_mode 'replace' .tag_scope 'once' - .localvar 'false' - .callback 'unbindImageAsync' + .tag_usepool 'false' + .func 'addImageAsync(const std::string &, const std::function &, const std::string &)' + .tag_maker "makeTextureCacheCallbackTag(#-1)" + .tag_mode 'replace' + .tag_scope 'once' + .tag_usepool 'false' + .func 'unbindImageAsync' .tag_maker 'makeTextureCacheCallbackTag(#1)' .tag_mode 'equal' - .callback 'unbindAllImageAsync' + .func 'unbindAllImageAsync' .tag_maker 'makeTextureCacheCallbackTag("")' .tag_mode 'startwith' @@ -461,33 +467,33 @@ typeconf 'cocos2d::Node' .func 'onEnter' .insert_before(check_node_parent) .func 'onExit' .insert_before(check_node_parent) .func 'getBounds' .ret '@unpack' - .prop 'x' .get 'float getPositionX()' .set 'void setPositionX(float x)' - .prop 'y' .get 'float getPositionY()' .set 'void setPositionY(float y)' - .prop 'z' .get 'float getPositionZ()' .set 'void setPositionZ(float z)' - .callback 'setOnEnterCallback' .arg1 '@nullable' - .callback 'getOnEnterCallback' .ret '@nullable' - .callback 'setOnExitCallback' .arg1 '@nullable' - .callback 'getOnExitCallback' .ret '@nullable' - .callback 'setOnEnterTransitionDidFinishCallback' .arg1 '@nullable' - .callback 'getOnEnterTransitionDidFinishCallback' .ret '@nullable' - .callback 'setOnExitTransitionDidStartCallback' .arg1 '@nullable' - .callback 'getOnExitTransitionDidStartCallback' .ret '@nullable' - .callback 'scheduleOnce' + .prop 'x' .get 'float getPositionX()' .set 'void setPositionX(float)' + .prop 'y' .get 'float getPositionY()' .set 'void setPositionY(float)' + .prop 'z' .get 'float getPositionZ()' .set 'void setPositionZ(float)' + .func 'setOnEnterCallback' .arg1 '@nullable' + .func 'getOnEnterCallback' .ret '@nullable' + .func 'setOnExitCallback' .arg1 '@nullable' + .func 'getOnExitCallback' .ret '@nullable' + .func 'setOnEnterTransitionDidFinishCallback' .arg1 '@nullable' + .func 'getOnEnterTransitionDidFinishCallback' .ret '@nullable' + .func 'setOnExitTransitionDidStartCallback' .arg1 '@nullable' + .func 'getOnExitTransitionDidStartCallback' .ret '@nullable' + .func 'scheduleOnce' .tag_maker 'makeScheduleCallbackTag(#-1)' .tag_mode 'replace' .tag_scope 'once' - .callback 'schedule' + .func 'schedule' .tag_maker "makeScheduleCallbackTag(#-1)" .tag_mode 'replace' - .callback 'unschedule' + .func 'unschedule' .tag_maker "makeScheduleCallbackTag(#1)" .tag_mode 'equal' - .callback 'unscheduleAllCallbacks' + .func 'unscheduleAllCallbacks' .tag_maker 'makeScheduleCallbackTag("")' .tag_mode "startwith" - .callback 'enumerateChildren' + .func 'enumerateChildren' .tag_mode 'new' - .tag_scope 'function' + .tag_scope 'invoker' typeconf 'cocos2d::BlendProtocol' typeconf 'cocos2d::TextureProtocol' @@ -508,7 +514,7 @@ typeconf 'cocos2d::ProtectedNode' typeconf 'cocos2d::DrawNode' typeconf 'cocos2d::ParallaxNode' - .func 'addChild' .arg1 '@addref(chilren |)' + .func 'addChild' .arg1 '@addref(children |)' typeconf 'cocos2d::TextHAlignment' typeconf 'cocos2d::TextVAlignment' @@ -527,19 +533,18 @@ typeconf 'cocos2d::FontAtlas' typeconf 'cocos2d::ClippingRectangleNode' typeconf 'cocos2d::RenderTexture' - .callback 'saveToFile' - .localvar 'false' + .extend 'cocos2d::RenderTextureExtend' + .func 'saveToFile' + .tag_usepool 'false' .tag_scope 'once' - .callback 'saveToFileAsNonPMA' + .func 'saveToFileAsNonPMA' .tag_maker 'saveToFile' - .localvar 'false' + .tag_usepool 'false' .tag_scope 'once' - .callback 'newImage' + .func 'newImage' .tag_mode 'new' - .localvar 'false' + .tag_usepool 'false' .tag_scope 'once' - .alias 'begin' .to 'beginVisit' - .alias 'end' .to 'endVisit' typeconf 'cocos2d::ProgressTimer::Type' typeconf 'cocos2d::ProgressTimer' diff --git a/tools/lua-bindings/conf/lua-dragonbones.lua b/tools/lua-bindings/conf/lua-dragonbones.lua index 270965d6..283e1739 100644 --- a/tools/lua-bindings/conf/lua-dragonbones.lua +++ b/tools/lua-bindings/conf/lua-dragonbones.lua @@ -1,6 +1,6 @@ module 'dragonbones' -path "../../frameworks/cclua/src/lua-bindings" +output_dir "../../frameworks/cclua/src/lua-bindings" headers [[ #include "lua-bindings/lua_cocos2d_types.h" @@ -18,10 +18,10 @@ luacls(function (cppname) return cppname end) -excludetype 'dragonBones::Matrix' -excludetype 'dragonBones::Transform' -excludetype 'dragonBones::ColorTransform' -excludetype 'dragonBones::MeshDisplayData' +exclude_type 'dragonBones::Matrix' +exclude_type 'dragonBones::Transform' +exclude_type 'dragonBones::ColorTransform' +exclude_type 'dragonBones::MeshDisplayData' typeconf 'dragonBones::Rectangle' @@ -48,13 +48,6 @@ typeconf 'dragonBones::TimelineData' typeconf 'dragonBones::IAnimatable' typeconf 'dragonBones::WorldClock' - .exclude 'clock' - .prop 'clock' - .get [[ - { - olua_pushobj(L, &dragonBones::WorldClock::clock); - return 1; - }]] typeconf 'dragonBones::Slot' .exclude 'getDisplayList' @@ -114,7 +107,6 @@ typeconf 'dragonBones::BaseFactory' .exclude 'getTextureAtlasData' typeconf 'dragonBones::Armature' - .supercls 'dragonBones::BaseObject' .exclude '_addBone' .exclude '_addConstraint' .exclude '_addSlot' @@ -126,10 +118,10 @@ typeconf 'dragonBones::CCFactory' typeconf 'dragonBones::IEventDispatcher' typeconf 'dragonBones::IArmatureProxy' typeconf 'dragonBones::CCArmatureDisplay' - .callback 'addDBEventListener' + .func 'addDBEventListener' .tag_maker '(#1)' .tag_mode 'new' - .callback 'removeDBEventListener' + .func 'removeDBEventListener' + .arg2 '@nullable' .tag_maker '(#1)' - .tag_mode 'equal' - .arg2 '@nullable' \ No newline at end of file + .tag_mode 'equal' \ No newline at end of file diff --git a/tools/lua-bindings/conf/lua-fairygui.lua b/tools/lua-bindings/conf/lua-fairygui.lua index 5e9687c2..c1c5ae71 100644 --- a/tools/lua-bindings/conf/lua-fairygui.lua +++ b/tools/lua-bindings/conf/lua-fairygui.lua @@ -1,6 +1,8 @@ module 'fairygui' -path "../../frameworks/cclua/src/lua-bindings" +output_dir "../../frameworks/cclua/src/lua-bindings" + +api_dir "../../addons/cclua/fairygui" headers [[ #include "lua-bindings/lua_cocos2d_types.h" @@ -15,7 +17,7 @@ headers [[ #include "utils/html/HtmlParser.h" ]] -chunk [[ +codeblock[[ bool olua_is_fairygui_EventTag(lua_State *L, int idx) { return olua_isinteger(L, idx) || olua_isa(L, idx); @@ -37,11 +39,12 @@ luaopen [[cclua::runtime::registerFeature("fairygui", true);]] luacls(function (cppname) cppname = string.gsub(cppname, '^fairygui::', 'fgui.') + cppname = string.gsub(cppname, '::', '.') return cppname end) -excludetype 'fairygui::ByteBuffer' -excludetype 'fairygui::GObjectPool' +exclude_type 'fairygui::ByteBuffer' +exclude_type 'fairygui::GObjectPool' typedef 'fairygui::EventTag' @@ -50,14 +53,14 @@ typeconf 'fairygui::Margin' typeconf 'fairygui::HtmlParseOptions' typeconf 'fairygui::TweenValue' - .var '*' .optional 'true' + -- .var '*' .optional 'true' typeconf 'fairygui::UIEventType' .indexerror 'r' typeconf 'fairygui::EventCallback' typeconf 'fairygui::UIEventDispatcher' - .chunk [[ + .codeblock[[ static std::string makeListenerTag(lua_State *L, lua_Integer type, int tagidx) { char buf[64]; @@ -79,13 +82,19 @@ typeconf 'fairygui::UIEventDispatcher' return std::string(buf); } ]] - .callback 'addEventListener' - .tag_maker {'makeListenerTag(L, #1, 0)', 'makeListenerTag(L, #1, 4)'} + .func 'addEventListener' + .tag_maker "makeListenerTag(L, #1, 0)" + .tag_mode 'new' + .func 'addEventListener(int, const fairygui::EventCallback &, const fairygui::EventTag &)' + .tag_maker 'makeListenerTag(L, #1, 4)' .tag_mode 'new' - .callback 'removeEventListener' - .tag_maker {'makeListenerTag(L, #1, 0)', 'makeListenerTag(L, #1, 3)'} - .tag_mode {'startwith', 'equal'} - .callback 'removeEventListeners' + .func 'removeEventListener' + .tag_maker "makeListenerTag(L, #1, 0)" + .tag_mode 'startwith' + .func 'removeEventListener(int, const fairygui::EventTag &)' + .tag_maker "makeListenerTag(L, #1, 3)" + .tag_mode "equal" + .func 'removeEventListeners' .tag_maker 'makeListenerTag(L, -1, 0)' .tag_mode 'startwith' @@ -97,7 +106,7 @@ typeconf 'fairygui::PixelHitTestData' typeconf 'fairygui::InputProcessor::CaptureEventCallback' typeconf 'fairygui::InputProcessor' - .callback 'setCaptureCallback' .arg1 '@nullable' + .func 'setCaptureCallback' .arg1 '@nullable' typeconf 'fairygui::InputEvent' typeconf 'fairygui::TextFormat' @@ -110,10 +119,10 @@ typeconf 'fairygui::GTweener::GTweenCallback' typeconf 'fairygui::GTweener::GTweenCallback0' typeconf 'fairygui::GTweener' - .callback 'onUpdate' .localvar 'false' - .callback 'onStart' .localvar 'false' - .callback 'onComplete' .localvar 'false' - .callback 'onComplete1' .localvar 'false' + .func 'onUpdate' .tag_usepool 'false' + .func 'onStart' .tag_usepool 'false' + .func 'onComplete' .tag_usepool 'false' + .func 'onComplete1' .tag_usepool 'false' local def_gtween_ref = [[ olua_pushclassobj(L); @@ -123,7 +132,7 @@ local def_gtween_ref = [[ ]] typeconf 'fairygui::GTween' - .chunk [[ + .codeblock[[ static bool should_del_tweener_ref(lua_State *L, int idx) { if (olua_isa(L, idx)) { @@ -160,6 +169,7 @@ typeconf 'fairygui::PackageItem' .exclude 'extensionCreator' .exclude 'bitmapFont' .exclude 'scale9Grid' + .exclude 'highResolution' typeconf 'fairygui::PackageItemType' typeconf 'fairygui::ObjectType' @@ -202,27 +212,25 @@ typeconf 'fairygui::GObject' luaL_error(L, "UIRoot is nullptr"); } ]] - .prop 'relations' .get 'Relations* relations()' - .prop 'displayObject' .get 'cocos2d::Node* displayObject()' - .callback 'addClickListener' - .tag_maker { - 'makeListenerTag(L, fairygui::UIEventType::Click, 0)', -- no tag - 'makeListenerTag(L, fairygui::UIEventType::Click, 3)', -- tag stack idx - } + .prop 'relations' .get 'fairygui::Relations *relations()' + .prop 'displayObject' .get 'cocos2d::Node *displayObject()' + .func 'addClickListener' + .tag_maker 'makeListenerTag(L, fairygui::UIEventType::Click, 0)' .tag_mode 'new' - .callback 'removeClickListener' + .func 'addClickListener(int, const fairygui::EventCallback &, const fairygui::EventTag &)' + .tag_maker 'makeListenerTag(L, fairygui::UIEventType::Click, 3)' + .tag_mode 'new' + .func 'removeClickListener' .tag_maker 'makeListenerTag(L, fairygui::UIEventType::Click, 2)' .tag_mode 'equal' typeconf 'fairygui::GComponent' - .chunk [[ - static int _fairygui_GComponent_getController(lua_State *L); - static int _fairygui_GComponent_getTransition(lua_State *L); - static int _fairygui_GComponent_getChild(lua_State *L); + .codeblock[[ + static int _olua_fun_fairygui_GComponent_getController(lua_State *L); + static int _olua_fun_fairygui_GComponent_getTransition(lua_State *L); + static int _olua_fun_fairygui_GComponent_getChild(lua_State *L); ]] - .exclude 'getChildByPath' .exclude 'constructFromResource' - .alias 'resolve' .to 'getChildByPath' .func 'addChild' .arg1 '@addref(children |)' .func 'addChildAt' .arg1 '@addref(children |)' .func 'removeChild' .arg1 '@delref(children |)' @@ -265,6 +273,10 @@ typeconf 'fairygui::GComponent' } }]] .func 'resolve' + .luacats [[ + ---@param name string + ---@return unknown + ]] .body [[ { auto self = olua_toobj(L, 1); @@ -281,11 +293,11 @@ typeconf 'fairygui::GComponent' sep = name + strlen(name); } if (type == '#') { - lua_pushcfunction(L, _fairygui_GComponent_getController); + lua_pushcfunction(L, _olua_fun_fairygui_GComponent_getController); } else if (type == '~') { - lua_pushcfunction(L, _fairygui_GComponent_getTransition); + lua_pushcfunction(L, _olua_fun_fairygui_GComponent_getTransition); } else { - lua_pushcfunction(L, _fairygui_GComponent_getChild); + lua_pushcfunction(L, _olua_fun_fairygui_GComponent_getChild); } olua_pushobj(L, self); lua_pushlstring(L, name, sep - name); @@ -331,7 +343,7 @@ typeconf 'fairygui::GRoot' olua_addref(L, 1, "children", -1, OLUA_REF_MULTI); lua_pop(L, 1); ]] - .prop 'UIRoot' .get 'static GRoot* getInstance()' + .prop 'UIRoot' .get 'static fairygui::GRoot *getInstance()' typeconf 'fairygui::GGroup' typeconf 'fairygui::GScrollBar' @@ -372,7 +384,7 @@ typeconf 'fairygui::GList' .func 'setVirtual' .ret '@delref(children ~)' .func 'setVirtualAndLoop' .ret '@delref(children ~)' .func 'setNumItems' .ret '@delref(children ~)' - .callback 'itemRenderer' .localvar 'false' + .func 'itemRenderer' .tag_usepool 'false' .insert_cbefore [[ olua_pushobj(L, (fairygui::GComponent *)cb_store); olua_addref(L, -1, "children", top + 2, OLUA_REF_MULTI); @@ -416,13 +428,13 @@ typeconf 'fairygui::PopupMenu' olua_pushobj(L, root); int parent = lua_gettop(L); ]] - .callback 'addItem' + .func 'addItem' .ret '@addref(children | parent)' .tag_maker 'makeListenerTag(L, fairygui::UIEventType::ClickMenu, 0)' .tag_mode 'replace' .tag_store '-1' .insert_before(push_popup_menu_parent) - .callback 'addItemAt' + .func 'addItemAt' .ret '@addref(children | parent)' .tag_maker 'makeListenerTag(L, fairygui::UIEventType::ClickMenu, 0)' .tag_mode 'replace' @@ -466,24 +478,24 @@ typeconf 'fairygui::Transition::TransitionHook' typeconf 'fairygui::Transition' .func 'getOwner' .ret '@addref(^)' - .callback 'play' + .func 'play' .tag_maker 'play' .tag_mode 'replace' - .callback 'playReverse' + .func 'playReverse' .tag_maker 'playReverse' .tag_mode 'replace' - .callback 'setHook' + .func 'setHook' + .arg2 '@nullable' .tag_maker '("hook." + #1)' .tag_mode 'replace' - .arg2 '@nullable' - .callback 'clearHooks' + .func 'clearHooks' .tag_maker '("hook.")' .tag_mode 'startwith' typeconf 'fairygui::UIConfig' typeconf 'fairygui::IUISource' - .callback 'load' .arg1 '@nullable' + .func 'load' .arg1 '@nullable' typeconf 'fairygui::UISource' local push_uiroot = [[ @@ -553,15 +565,15 @@ typeconf 'fairygui::GTree' .func 'getRootNode' .ret '@addref(^)' .func 'getSelectedNode' .ret '@addref(nodes |)' .func 'getSelectedNodes' .arg1 '@addref(nodes |)' - .callback 'treeNodeRender' - .localvar 'false' + .func 'treeNodeRender' + .tag_usepool 'false' .insert_cbefore [[ olua_pushobj(L, (fairygui::GComponent *)cb_store); olua_addref(L, -1, "nodes", top + 1, OLUA_REF_MULTI); olua_addref(L, -1, "children",top + 2, OLUA_REF_MULTI); lua_pop(L, 1); ]] - .callback 'treeNodeWillExpand' .localvar 'false' + .func 'treeNodeWillExpand' .tag_usepool 'false' .insert_cbefore [[ olua_pushobj(L, (fairygui::GComponent *)cb_store); olua_addref(L, -1, "nodes", top + 1, OLUA_REF_MULTI); diff --git a/tools/lua-bindings/conf/lua-spine.lua b/tools/lua-bindings/conf/lua-spine.lua index c5ca5f5c..3264e80f 100644 --- a/tools/lua-bindings/conf/lua-spine.lua +++ b/tools/lua-bindings/conf/lua-spine.lua @@ -1,6 +1,8 @@ module 'spine' -path "../../frameworks/cclua/src/lua-bindings" +output_dir "../../frameworks/cclua/src/lua-bindings" + +api_dir"../../addons/cclua/spine" headers [[ #include "lua-bindings/lua_cocos2d_types.h" @@ -11,11 +13,11 @@ headers [[ luaopen [[cclua::runtime::registerFeature("spine", true);]] -excludetype 'spine::HasRendererObject' -excludetype 'spine::RTTI' -excludetype 'spine::Interpolation' -excludetype 'spine::Vector *' -excludetype 'spine::AnimationStateListenerObject' +exclude_type 'spine::HasRendererObject' +exclude_type 'spine::RTTI' +exclude_type 'spine::Interpolation' +exclude_type 'spine::Vector *' +exclude_type 'spine::AnimationStateListenerObject' local function typeenum(classname) local cls = typeconf(classname) @@ -53,7 +55,7 @@ typeconf 'spine::Updatable' typeconf 'spine::AnimationStateListener' typeconf 'spine::AnimationState' - .callback 'setListener' .localvar 'false' + .func 'setListener' .tag_usepool 'false' typeconf 'spine::AnimationStateData' typeconf 'spine::Animation' @@ -133,13 +135,11 @@ typeconf 'spine::PointAttachment' typeconf 'spine::RegionAttachment' typeconf 'spine::TrackEntry' - .callback 'setListener' .localvar 'false' + .func 'setListener' .tag_usepool 'false' typeconf 'spine::SkeletonData' .exclude 'new' .extend 'spine::SkeletonDataExtend' - .alias '__gc' .to 'dispose' - .alias 'create' .to 'new' typeconf 'spine::Skeleton' .exclude 'getBounds' @@ -163,15 +163,15 @@ typeconf 'spine::SkeletonAnimation' .func 'setEmptyAnimation' .ret '@addref(trackEntries |)' .func 'addEmptyAnimation' .ret '@addref(trackEntries |)' .func 'getCurrent' .ret '@addref(trackEntries |)' - .callback 'setStartListener' .localvar 'false' - .callback 'setInterruptListener' .localvar 'false' - .callback 'setEndListener' .localvar 'false' - .callback 'setDisposeListener' .localvar 'false' - .callback 'setCompleteListener' .localvar 'false' - .callback 'setEventListener' .localvar 'false' - .callback 'setTrackStartListener' .localvar 'false' - .callback 'setTrackInterruptListener' .localvar 'false' - .callback 'setTrackEndListener' .localvar 'false' - .callback 'setTrackDisposeListener' .localvar 'false' - .callback 'setTrackCompleteListener' .localvar 'false' - .callback 'setTrackEventListener' .localvar 'false' + .func 'setStartListener' .tag_usepool 'false' + .func 'setInterruptListener' .tag_usepool 'false' + .func 'setEndListener' .tag_usepool 'false' + .func 'setDisposeListener' .tag_usepool 'false' + .func 'setCompleteListener' .tag_usepool 'false' + .func 'setEventListener' .tag_usepool 'false' + .func 'setTrackStartListener' .tag_usepool 'false' + .func 'setTrackInterruptListener' .tag_usepool 'false' + .func 'setTrackEndListener' .tag_usepool 'false' + .func 'setTrackDisposeListener' .tag_usepool 'false' + .func 'setTrackCompleteListener' .tag_usepool 'false' + .func 'setTrackEventListener' .tag_usepool 'false' diff --git a/tools/lua-bindings/conf/lua-types.lua b/tools/lua-bindings/conf/lua-types.lua index 67bf09df..9866dd32 100644 --- a/tools/lua-bindings/conf/lua-types.lua +++ b/tools/lua-bindings/conf/lua-types.lua @@ -1,6 +1,8 @@ module "types" -path "../../frameworks/cclua/src/lua-bindings" +output_dir "../../frameworks/cclua/src/lua-bindings" + +api_dir"../../addons/cclua/olua" headers [[ #include "cclua/olua-2dx.h" diff --git a/tools/lua-bindings/conf/plugin-alipay.lua b/tools/lua-bindings/conf/plugin-alipay.lua index e91da5d0..30ed3b32 100644 --- a/tools/lua-bindings/conf/plugin-alipay.lua +++ b/tools/lua-bindings/conf/plugin-alipay.lua @@ -1,6 +1,8 @@ module 'alipay' -path "../../frameworks/plugins/alipay" +output_dir "../../frameworks/plugins/alipay" + +api_dir"../../addons/cclua/plugin/alipay" headers [[ #include "lua-bindings/lua_cocos2d_types.h" diff --git a/tools/lua-bindings/conf/plugin-apple.lua b/tools/lua-bindings/conf/plugin-apple.lua index 607ea43a..7f0530a9 100644 --- a/tools/lua-bindings/conf/plugin-apple.lua +++ b/tools/lua-bindings/conf/plugin-apple.lua @@ -1,6 +1,8 @@ module 'apple' -path "../../frameworks/plugins/apple" +output_dir "../../frameworks/plugins/apple" + +api_dir"../../addons/cclua/plugin/apple" headers [[ #include "lua-bindings/lua_cocos2d_types.h" diff --git a/tools/lua-bindings/conf/plugin-bugly.lua b/tools/lua-bindings/conf/plugin-bugly.lua index 06aac875..520d887a 100644 --- a/tools/lua-bindings/conf/plugin-bugly.lua +++ b/tools/lua-bindings/conf/plugin-bugly.lua @@ -1,6 +1,8 @@ module 'bugly' -path "../../frameworks/cclua/src/bugly" +output_dir "../../frameworks/cclua/src/bugly" + +api_dir"../../addons/cclua/plugin/bugly" headers [[ #include "lua-bindings/lua_cocos2d_types.h" diff --git a/tools/lua-bindings/conf/plugin-huawei.lua b/tools/lua-bindings/conf/plugin-huawei.lua index e124ea1b..cc7c6e8b 100644 --- a/tools/lua-bindings/conf/plugin-huawei.lua +++ b/tools/lua-bindings/conf/plugin-huawei.lua @@ -1,6 +1,8 @@ module 'huawei' -path "../../frameworks/plugins/huawei" +output_dir "../../frameworks/plugins/huawei" + +api_dir"../../addons/cclua/plugin/huawei" headers [[ #include "lua-bindings/lua_cocos2d_types.h" diff --git a/tools/lua-bindings/conf/plugin-janalytics.lua b/tools/lua-bindings/conf/plugin-janalytics.lua index 2b1d567e..182e37d1 100644 --- a/tools/lua-bindings/conf/plugin-janalytics.lua +++ b/tools/lua-bindings/conf/plugin-janalytics.lua @@ -1,6 +1,8 @@ module 'janalytics' -path "../../frameworks/plugins/janalytics" +output_dir "../../frameworks/plugins/janalytics" + +api_dir"../../addons/cclua/plugin/janalytics" headers [[ #include "lua-bindings/lua_cocos2d_types.h" diff --git a/tools/lua-bindings/conf/plugin-jauth.lua b/tools/lua-bindings/conf/plugin-jauth.lua index af16b0f8..8f06120d 100644 --- a/tools/lua-bindings/conf/plugin-jauth.lua +++ b/tools/lua-bindings/conf/plugin-jauth.lua @@ -1,6 +1,8 @@ module 'jauth' -path "../../frameworks/plugins/jauth" +output_dir "../../frameworks/plugins/jauth" + +api_dir"../../addons/cclua/plugin/jauth" headers [[ #include "lua-bindings/lua_cocos2d_types.h" @@ -11,8 +13,8 @@ headers [[ macro '#ifdef CCLUA_BUILD_JAUTH' typeconf "cclua::plugin::jauth" .luaopen 'cclua::runtime::registerFeature("cclua.plugin.jauth.ios", true);' - .callback "getToken" .tag_mode 'new' .tag_scope 'once' - .callback "preLogin" .tag_mode 'new' .tag_scope 'once' - .callback "loginAuth" .tag_mode 'new' .tag_scope 'once' - .callback "getSmsCode" .tag_mode 'new' .tag_scope 'once' + .func "getToken" .tag_mode 'new' .tag_scope 'once' + .func "preLogin" .tag_mode 'new' .tag_scope 'once' + .func "loginAuth" .tag_mode 'new' .tag_scope 'once' + .func "getSmsCode" .tag_mode 'new' .tag_scope 'once' macro '' diff --git a/tools/lua-bindings/conf/plugin-jpush.lua b/tools/lua-bindings/conf/plugin-jpush.lua index 3a1c6ad8..a76d98a7 100644 --- a/tools/lua-bindings/conf/plugin-jpush.lua +++ b/tools/lua-bindings/conf/plugin-jpush.lua @@ -1,6 +1,8 @@ module 'jpush' -path "../../frameworks/plugins/jpush" +output_dir "../../frameworks/plugins/jpush" + +api_dir"../../addons/cclua/plugin/jpush" headers [[ #include "lua-bindings/lua_cocos2d_types.h" diff --git a/tools/lua-bindings/conf/plugin-oppo.lua b/tools/lua-bindings/conf/plugin-oppo.lua index 7136e437..19a9b4fb 100644 --- a/tools/lua-bindings/conf/plugin-oppo.lua +++ b/tools/lua-bindings/conf/plugin-oppo.lua @@ -1,6 +1,8 @@ module 'oppo' -path "../../frameworks/plugins/oppo" +output_dir "../../frameworks/plugins/oppo" + +api_dir"../../addons/cclua/plugin/oppo" headers [[ #include "lua-bindings/lua_cocos2d_types.h" diff --git a/tools/lua-bindings/conf/plugin-talkingdata.lua b/tools/lua-bindings/conf/plugin-talkingdata.lua index e8a31cbd..8fbe4ae2 100644 --- a/tools/lua-bindings/conf/plugin-talkingdata.lua +++ b/tools/lua-bindings/conf/plugin-talkingdata.lua @@ -1,6 +1,8 @@ module 'talkingdata' -path "../../frameworks/plugins/talkingdata" +output_dir "../../frameworks/plugins/talkingdata" + +api_dir"../../addons/cclua/plugin/talkingdata" headers [[ #include "lua-bindings/lua_cocos2d_types.h" diff --git a/tools/lua-bindings/conf/plugin-vivo.lua b/tools/lua-bindings/conf/plugin-vivo.lua index f9a7324b..96cbb031 100644 --- a/tools/lua-bindings/conf/plugin-vivo.lua +++ b/tools/lua-bindings/conf/plugin-vivo.lua @@ -1,6 +1,8 @@ module 'vivo' -path "../../frameworks/plugins/vivo" +output_dir "../../frameworks/plugins/vivo" + +api_dir"../../addons/cclua/plugin/vivo" headers [[ #include "lua-bindings/lua_cocos2d_types.h" diff --git a/tools/lua-bindings/conf/plugin-wechat.lua b/tools/lua-bindings/conf/plugin-wechat.lua index 539f6d0b..5948034b 100644 --- a/tools/lua-bindings/conf/plugin-wechat.lua +++ b/tools/lua-bindings/conf/plugin-wechat.lua @@ -1,6 +1,8 @@ module 'wechat' -path "../../frameworks/plugins/wechat" +output_dir "../../frameworks/plugins/wechat" + +api_dir"../../addons/cclua/plugin/wechat" headers [[ #include "lua-bindings/lua_cocos2d_types.h" @@ -16,8 +18,8 @@ typeconf "cclua::plugin::wechat" .func('pay') .macro '' .luaopen 'cclua::runtime::registerFeature("cclua.plugin.wechat.ios", true);' - .callback 'auth' .tag_maker 'auth' .tag_mode 'replace' .tag_scope 'once' - .callback 'authQRCode' .tag_maker 'authQRCode' .tag_mode 'replace' - .callback 'stopAuth' .tag_maker 'authQRCode' .tag_mode 'equal' - .callback 'share' .tag_scope 'once' + .func 'auth' .tag_maker 'auth' .tag_mode 'replace' .tag_scope 'once' + .func 'authQRCode' .tag_maker 'authQRCode' .tag_mode 'replace' + .func 'stopAuth' .tag_maker 'authQRCode' .tag_mode 'equal' + .func 'share' .tag_scope 'once' macro '' diff --git a/tools/lua-bindings/olua b/tools/lua-bindings/olua index af65e69a..94f516af 160000 --- a/tools/lua-bindings/olua +++ b/tools/lua-bindings/olua @@ -1 +1 @@ -Subproject commit af65e69a97e5a3cfc02cf6cc58bd69728a033017 +Subproject commit 94f516afe040517da6ff235ac3dd08b96994c2a1